neuron-7.5/000077500000000000000000000000001323325274500127015ustar00rootroot00000000000000neuron-7.5/Copyright000066400000000000000000000035141323325274500145770ustar00rootroot00000000000000Copyright (c) 2016, Michael Hines All rights reserved. This Copyright refers to all files in this distribution that do not have an explicit Copyright notice. See: grep -r '\' * All files are intended to have a license compatible with the following "three clause" open source BSD license. Please notify michael.hines@yale.edu if you believe any file is not compatible with the "three clause" open source BSD license. Redistribution and use in source and binary forms, with or without modification are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. neuron-7.5/INSTALL000066400000000000000000000373651323325274500137500ustar00rootroot00000000000000Brief instructions: First, install the interviews distribution that comes from the same place as you got the neuron distribution (see the INSTALL file there for details). following: % gzip -dc nrn-4.2.3.tar.gz | tar -xf - # You've already done this if you're % # reading this file. % cd nrn-4.2.3 % ./configure --prefix=/where/you/want/neuron --with-iv=/where/you/put/interviews % make % make install % cd .. % rm -rf nrn-4.2.3 # You don't need this directory any more. % /where/you/want/neuron/bin/neurondemo # the above line tests the nrnivmodl script and runs the demo. alternatively # you can run the bare executable (with only built in model descriptions # with % /where/you/want/neuron/bin/nrniv % cd (directory where you have all your .mod files) % /where/you/want/neuron/bin/nrnivmodl % i686/special # Will be in a different subdirectory depending % # on your architecture. # the above special may be only a script with the actual executable in # i686/.libs/special # this latter can be moved to another location and executed. ------------------------------------------------------------------------------- MACHINE PROBLEMS Some machines have problems which have work arounds specifically incorporated into the configure script. Those machines are listed here as examples of what has gone occasionally wrong in the past with generic installation attempts and how to fix them. If installation on your machine does not work the first time execute config.guess and see if your machine appears in this list for some hints about how to install. If your machine does not appear in this list but it still doesn't install, look at the list of occasional problems. No machines in list. ----------- OCCASIONAL INSTALLATION PROBLEMS (machines indicated for each problem automatically do the indicated work around within the configure file) bison exists but it doesn't work alpha-cray-unicosmk2.0.4.90 (at least on the t3e at sdsc) force use of yacc with setenv YACC yacc ; configure .... parse1.c or lex.c does not compile alpha-cray-unicosmk2.0.4.90 (at least on the t3e at sdsc) force the re-translation of .y and .l files with touch `find . -name \*.\[yl\] -print` too many ld warnings mips-sgi-irix6.2 suppress warnings with: setenv LDFLAGS -w ; configure .... compiler internal error gcc-2.8.1 compile c++ files without optimization setenv CXXFLAGS -g applications fail to launch because shared libraries cannot be found setenv LD_LIBRARY_PATH /list/of:/library/paths:/to/find/them/in ------------------------------------------------------------------------------- More detailed instructions: When neuron is configured it checks to see if the GNU readline library is already installed. If not then it builds an old version of the readline library which is located in src/readline. In addition, you will need to install the interviews library. You cannot use the vanilla interviews library that may come packaged with X11, or may be available as a separate package with your operating system. You must use the custom-modified interviews library which is available from the neuron web site neuron.yale.edu or wherever you got the this neuron distribution from. Read the INSTALL file in that distribution for details. Again, you can install the interviews library in the same directory that you're going to install neuron in. Once you've got these libraries installed, do ./configure --prefix=/where/you/want/neuron If you don't specify a prefix, it defaults to /usr/local. Unlike previous versions of neuron, it is difficult to move neuron once you've installed it, so pick your installation directory carefully. There are a couple of options to configure that you may need: --with-iv=/where/you/put/interviews Use this if you didn't install your interviews distribution in a standard place (like /usr/local). --with-readline=/where/you/put/readline Use this if you didn't install readline in a standard place. --enable-static --enable-debug This may be useful if you're trying to debug the neuron sources themselves. This builds static libraries in addition to the shared libraries. --with-nrnpython=/where/you/put/python Access the NEURON python API It's possible that you need to specify the location of your X11 files, if they aren't in some standard place like /usr/X11R6/lib or /usr/lib/X11; do "configure --help" and look at the --with-X options. You may also need to specify the name of your C++ compiler. (The configure script can guess the name of the C++ compiler for many systems.) Do this with a command like this: CXX=/some/weird/place/bin/my_special_c++ ./configure or on systems with the env command, env CXX=/some/weird/place/bin/my_special_c++ ./configure You might also need to specify the LIBS variable in the same way if there are special libraries you need to link with. Once the configure procedure has successfully run, type "make". This will take a few minutes and will build everything in neuron. (Unlike previous versions of neuron, this builds both nrnoc and nrniv.) If you run into compilation errors with the files "lex.c", then you will need to rerun lex or flex on the .l files. In this case, you must have lex or flex installed on your system and in your path. (Flex is freely available from the Free Software Foundation, www.gnu.org.) Delete all the files named "lex.c" (there are several in different directories), and make should automatically rebuild them for you using the version of flex that you have installed on your system. Similarly, if you run into compilation errors with the files "ytab.c" or "d_ytab.c", then you will probably need to rerun bison or yacc on the .y files. To do this, simply delete the offending .c files and the make procedure will automatically rebuild them for you using the bison that you have on your system. If your problem is with d_ytab.c, then you must have bison (yacc isn't good enough, sorry). Bison is freely available from www.gnu.org. Once compilation is complete, you will need to install neuron in order to use it. (This is different from previous versions.) Type "make install" to do so. Once you've installed neuron, no files in the directory tree that you untarred neuron into are needed any more; you may delete the whole thing. (This is also different from previous versions.) As with any other unix package, it is not a good idea to move neuron around once you've installed it, because the directory names are coded into the files themselves. If you need to move it, put a soft link in its original location that points to the new location (so the old filenames will still work). Better yet, simply recompile neuron specifying the new installation directory. In previous versions of NEURON, you needed to set the NEURONHOME environment variable and the CPU variable, and often LD_LIBRARY_PATH as well. This should no longer be necessary. Simply run the binaries that are installed. E.g., if you did "configure --prefix=/usr/local/stow/neuron-4.2.2", then you would run /usr/local/stow/neuron-4.2.2/bin/nrniv Or you can put that directory in your path. To compile your own special purpose .mod files into neuron, use the following procedure: 1) Cd to the directory that contains your .mod files. 2) Type "/where/you/put/neuron/bin/nrnivmodl" (or, if you put that directory in your path, just type "nrnivmodl"). This will create a subdirectory of the current directory which is your CPU name (e.g., if you're running neuron on a pentium II or III, the subdirectory is called "i686". Inside this directory is created the program "special", which is the neuron binary that you want to run. Automake and autoconf scripts were originally done for this package by Gary Holt (holt@LNC.usc.edu). These replace the treacherous primitive Imakefile jungle with the modern temperate forest of autoconf. If you wish to modify the Makefile.am files, you will need both autoconf and automake. I used autoconf-2.13 and automake-1.4; I doubt you can use earlier versions. Following are the generic installation instructions for any package with a configure script. ------------------------------------------------------------------------------- Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. neuron-7.5/Makefile.am000066400000000000000000000110641323325274500147370ustar00rootroot00000000000000## This is the top level Makefile.am. #AUTOMAKE_OPTIONS = foreign dist-zip dist-tarZ AUTOMAKE_OPTIONS = foreign dist-zip ACLOCAL_AMFLAGS = -I m4 host_cpu = @host_cpu@ NVER = $(PACKAGE_VERSION) if NMODL_ONLY SUBDIRS = src else SUBDIRS = src bin share endif # # Install libtool; it's needed to compile the "special" program. # pkgdata_SCRIPTS = libtool ## Unfortunately nrnconf.h is architecture dependent so the standard ## installation of it does not allow multiarchitectures, ## i.e the following is wrong. ## pkginclude_HEADERS = nrnconf.h ## So we do it as data libobjdir = $(libdir) libobj_DATA = nrnconf.h CONFIGURE_DEPENDENCIES = m4/acx_mpi.m4 m4/ivcheck.m4 m4/java_support.m4 \ m4/nrnjava.m4 m4/nrnpython.m4 m4/nrnrt.m4 \ m4/oddities.m4 m4/parcon.m4 m4/readline.m4 \ m4/withmpi.m4 m4/nrnbg.m4 EXTRA_DIST = $(CONFIGURE_DEPENDENCIES) installunix.html build.sh \ nrnversion.sh git2nrnversion_h.sh hg2nrnversion_h.sh \ extend_depcomp.sh Copyright if BUILD_PARANEURON PARANEURON='yes' else PARANEURON='no' endif if BUILD_CYGWIN #install from the build directories to the mswin destination #uses the classical positions of files mswin: top_srcdir=$(top_srcdir) marshal_dir=$(marshal_dir) \ top_builddir=$(top_builddir) \ ivbindir=$(IV_LIBDIR)/../bin \ CC=$(CC) \ host_cpu=$(host_cpu) \ $(top_srcdir)/src/mswin/batch/instal.sh endif if BUILD_MINGW #install from the build directories to the mswin destination #uses the classical positions of files mswin: top_srcdir=$(top_srcdir) marshal_dir=$(marshal_dir) \ top_builddir=$(top_builddir) \ ivbindir=$(IV_LIBDIR)/../bin \ CC=$(CC) \ PARANEURON=$(PARANEURON) \ host_cpu=$(host_cpu) \ $(top_srcdir)/src/mswin/batch/instalmingw.sh endif if BUILD_NRNPYTHON install-exec-hook: echo "enter install-exec-hook in nrn/Makefile.am" if test "@ac_pysetup@" != "no" ; then \ cd src/nrnpython ; \ $(PYTHON) setup.py install @ac_pysetup@ ;\ fi echo "leave install-exec-hook in nrn/Makefile.am" endif ALPHADIR = hines@neuron.yale.edu:/home/htdocs/ftp/neuron/versions/alpha if MAKE_RPMS rpm: @RPM_TARGET@ .PHONY: rpm $(RPM_TARGET): $(DISTFILES) (cd $(libdir) ; strip -d *.so*) (cd @IV_LIBDIR@ ; strip -d *.so*) -rm $(pkgdatadir)/demo/neuron (cd $(pkgdatadir)/demo/release ; $(bindir)/nrnivmodl ; cd $(host_cpu) ; rm -f *.c *.o *.lo *.mod *.la ; cd ../.. ; ln -s release/$(host_cpu)/special neuron ) -mkdir -p `dirname $(RPM_TARGET)` (cd `dirname $(RPM_TARGET)` && rm -f nrn*.deb nrn*.rpm) ln -s / /tmp/nrnrpmbld $(RPM_PROG) -bb --buildroot /tmp/nrnrpmbld nrnrpm.spec @echo Congratulations, $(RPM_TARGET) "(and friends) should now exist." (cd `dirname $(RPM_TARGET)` && alien --to-deb $(RPM_TARGET)) rpmdist: scp $(RPM_TARGET) $(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host_cpu).rpm scp `dirname $(RPM_TARGET)`/nrn*.deb $(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host_cpu).deb else endif if MAC_DARWIN ivlibdir = @IV_LIBDIR@ after_install: carbon="@enable_carbon@" sh $(srcdir)/src/mac/after-install.sh "$(host_cpu)" "$(prefix)" "$(top_srcdir)" "$(ivlibdir)" dmg: carbon="@enable_carbon@" sh $(srcdir)/src/mac/mkdmg.sh NEURON-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`" pkg: $(srcdir)/src/mac/nrn_x11_opt2usr.sh $(prefix) $(host_cpu) /usr/local/bin/packagesbuild $(top_builddir)/src/mac/macdist.pkgproj $(srcdir)/src/mac/nrnproductsign.sh $(top_builddir)/src/mac/build/NEURON-$(NVER).pkg alphadist: if UniversalMacBinary a=$(ALPHADIR)/nrn-"``(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`"-MacOSX"`sw_vers -productVersion`".dmg && \ echo $$a && \ scp $(HOME)/NEURON-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`".dmg "$$a" else a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host_cpu)-osx.pkg &&\ b=$(top_builddir)/src/mac/build/NEURON-$(NVER).pkg &&\ echo "scp $$b $$a" && \ scp $$b $$a endif else if BUILD_CYGWIN alphadist: a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host)-setup.exe &&\ echo $$a && \ scp src/mswin/nrn"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 3)`"setup.exe $$a else if BUILD_MINGW alphadist: a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host)-setup.exe && \ echo $$a && \ scp src/mswin/nrn"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 3)`"setup-$(host_cpu).exe $$a else alphadist: a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".tar.gz && \ echo $$a && \ scp nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`".tar.gz $$a endif endif endif neuron-7.5/Makefile.in000066400000000000000000001162451323325274500147570ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = nrnrpm.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(libobjdir)" SCRIPTS = $(pkgdata_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(libobj_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in nmodlconf.h.in nrnconf.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = src bin share am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/nmodlconf.h.in $(srcdir)/nrnconf.h.in \ $(srcdir)/nrnrpm.spec.in INSTALL compile config.guess \ config.sub depcomp install-sh ltmain.sh missing ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best DIST_TARGETS = dist-gzip dist-zip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ #AUTOMAKE_OPTIONS = foreign dist-zip dist-tarZ AUTOMAKE_OPTIONS = foreign dist-zip ACLOCAL_AMFLAGS = -I m4 NVER = $(PACKAGE_VERSION) @NMODL_ONLY_FALSE@SUBDIRS = src bin share @NMODL_ONLY_TRUE@SUBDIRS = src # # Install libtool; it's needed to compile the "special" program. # pkgdata_SCRIPTS = libtool libobjdir = $(libdir) libobj_DATA = nrnconf.h CONFIGURE_DEPENDENCIES = m4/acx_mpi.m4 m4/ivcheck.m4 m4/java_support.m4 \ m4/nrnjava.m4 m4/nrnpython.m4 m4/nrnrt.m4 \ m4/oddities.m4 m4/parcon.m4 m4/readline.m4 \ m4/withmpi.m4 m4/nrnbg.m4 EXTRA_DIST = $(CONFIGURE_DEPENDENCIES) installunix.html build.sh \ nrnversion.sh git2nrnversion_h.sh hg2nrnversion_h.sh \ extend_depcomp.sh Copyright ALPHADIR = hines@neuron.yale.edu:/home/htdocs/ftp/neuron/versions/alpha @MAC_DARWIN_TRUE@ivlibdir = @IV_LIBDIR@ all: config.h nmodlconf.h nrnconf.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ nmodlconf.h: stamp-h2 @test -f $@ || rm -f stamp-h2 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 stamp-h2: $(srcdir)/nmodlconf.h.in $(top_builddir)/config.status @rm -f stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status nmodlconf.h nrnconf.h: stamp-h4 @test -f $@ || rm -f stamp-h4 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h4 stamp-h4: $(srcdir)/nrnconf.h.in $(top_builddir)/config.status @rm -f stamp-h4 cd $(top_builddir) && $(SHELL) ./config.status nrnconf.h distclean-hdr: -rm -f config.h stamp-h1 nmodlconf.h stamp-h2 nrnconf.h stamp-h4 nrnrpm.spec: $(top_builddir)/config.status $(srcdir)/nrnrpm.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS) @$(NORMAL_INSTALL) @list='$(pkgdata_SCRIPTS)'; test -n "$(pkgdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkgdatadir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgdatadir)$$dir" || exit $$?; \ } \ ; done uninstall-pkgdataSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pkgdata_SCRIPTS)'; test -n "$(pkgdatadir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-libobjDATA: $(libobj_DATA) @$(NORMAL_INSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libobjdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libobjdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libobjdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(libobjdir)" || exit $$?; \ done uninstall-libobjDATA: @$(NORMAL_UNINSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libobjdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) config.h nmodlconf.h nrnconf.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(libobjdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @BUILD_NRNPYTHON_FALSE@install-exec-hook: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-libobjDATA install-pkgdataSCRIPTS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libobjDATA uninstall-pkgdataSCRIPTS .MAKE: $(am__recursive_targets) all install-am install-exec-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-exec-hook install-html install-html-am install-info \ install-info-am install-libobjDATA install-man install-pdf \ install-pdf-am install-pkgdataSCRIPTS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-libobjDATA uninstall-pkgdataSCRIPTS .PRECIOUS: Makefile @BUILD_PARANEURON_TRUE@ PARANEURON='yes' @BUILD_PARANEURON_FALSE@ PARANEURON='no' #install from the build directories to the mswin destination #uses the classical positions of files @BUILD_CYGWIN_TRUE@mswin: @BUILD_CYGWIN_TRUE@ top_srcdir=$(top_srcdir) marshal_dir=$(marshal_dir) \ @BUILD_CYGWIN_TRUE@ top_builddir=$(top_builddir) \ @BUILD_CYGWIN_TRUE@ ivbindir=$(IV_LIBDIR)/../bin \ @BUILD_CYGWIN_TRUE@ CC=$(CC) \ @BUILD_CYGWIN_TRUE@ host_cpu=$(host_cpu) \ @BUILD_CYGWIN_TRUE@ $(top_srcdir)/src/mswin/batch/instal.sh #install from the build directories to the mswin destination #uses the classical positions of files @BUILD_MINGW_TRUE@mswin: @BUILD_MINGW_TRUE@ top_srcdir=$(top_srcdir) marshal_dir=$(marshal_dir) \ @BUILD_MINGW_TRUE@ top_builddir=$(top_builddir) \ @BUILD_MINGW_TRUE@ ivbindir=$(IV_LIBDIR)/../bin \ @BUILD_MINGW_TRUE@ CC=$(CC) \ @BUILD_MINGW_TRUE@ PARANEURON=$(PARANEURON) \ @BUILD_MINGW_TRUE@ host_cpu=$(host_cpu) \ @BUILD_MINGW_TRUE@ $(top_srcdir)/src/mswin/batch/instalmingw.sh @BUILD_NRNPYTHON_TRUE@install-exec-hook: @BUILD_NRNPYTHON_TRUE@ echo "enter install-exec-hook in nrn/Makefile.am" @BUILD_NRNPYTHON_TRUE@ if test "@ac_pysetup@" != "no" ; then \ @BUILD_NRNPYTHON_TRUE@ cd src/nrnpython ; \ @BUILD_NRNPYTHON_TRUE@ $(PYTHON) setup.py install @ac_pysetup@ ;\ @BUILD_NRNPYTHON_TRUE@ fi @BUILD_NRNPYTHON_TRUE@ echo "leave install-exec-hook in nrn/Makefile.am" @MAKE_RPMS_TRUE@rpm: @RPM_TARGET@ @MAKE_RPMS_TRUE@.PHONY: rpm @MAKE_RPMS_TRUE@$(RPM_TARGET): $(DISTFILES) @MAKE_RPMS_TRUE@ (cd $(libdir) ; strip -d *.so*) @MAKE_RPMS_TRUE@ (cd @IV_LIBDIR@ ; strip -d *.so*) @MAKE_RPMS_TRUE@ -rm $(pkgdatadir)/demo/neuron @MAKE_RPMS_TRUE@ (cd $(pkgdatadir)/demo/release ; $(bindir)/nrnivmodl ; cd $(host_cpu) ; rm -f *.c *.o *.lo *.mod *.la ; cd ../.. ; ln -s release/$(host_cpu)/special neuron ) @MAKE_RPMS_TRUE@ -mkdir -p `dirname $(RPM_TARGET)` @MAKE_RPMS_TRUE@ (cd `dirname $(RPM_TARGET)` && rm -f nrn*.deb nrn*.rpm) @MAKE_RPMS_TRUE@ ln -s / /tmp/nrnrpmbld @MAKE_RPMS_TRUE@ $(RPM_PROG) -bb --buildroot /tmp/nrnrpmbld nrnrpm.spec @MAKE_RPMS_TRUE@ @echo Congratulations, $(RPM_TARGET) "(and friends) should now exist." @MAKE_RPMS_TRUE@ (cd `dirname $(RPM_TARGET)` && alien --to-deb $(RPM_TARGET)) @MAKE_RPMS_TRUE@rpmdist: @MAKE_RPMS_TRUE@ scp $(RPM_TARGET) $(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host_cpu).rpm @MAKE_RPMS_TRUE@ scp `dirname $(RPM_TARGET)`/nrn*.deb $(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host_cpu).deb @MAC_DARWIN_TRUE@after_install: @MAC_DARWIN_TRUE@ carbon="@enable_carbon@" sh $(srcdir)/src/mac/after-install.sh "$(host_cpu)" "$(prefix)" "$(top_srcdir)" "$(ivlibdir)" @MAC_DARWIN_TRUE@dmg: @MAC_DARWIN_TRUE@ carbon="@enable_carbon@" sh $(srcdir)/src/mac/mkdmg.sh NEURON-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`" @MAC_DARWIN_TRUE@pkg: @MAC_DARWIN_TRUE@ $(srcdir)/src/mac/nrn_x11_opt2usr.sh $(prefix) $(host_cpu) @MAC_DARWIN_TRUE@ /usr/local/bin/packagesbuild $(top_builddir)/src/mac/macdist.pkgproj @MAC_DARWIN_TRUE@ $(srcdir)/src/mac/nrnproductsign.sh $(top_builddir)/src/mac/build/NEURON-$(NVER).pkg @MAC_DARWIN_TRUE@alphadist: @MAC_DARWIN_TRUE@@UniversalMacBinary_TRUE@ a=$(ALPHADIR)/nrn-"``(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`"-MacOSX"`sw_vers -productVersion`".dmg && \ @MAC_DARWIN_TRUE@@UniversalMacBinary_TRUE@ echo $$a && \ @MAC_DARWIN_TRUE@@UniversalMacBinary_TRUE@ scp $(HOME)/NEURON-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`".dmg "$$a" @MAC_DARWIN_TRUE@@UniversalMacBinary_FALSE@ a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host_cpu)-osx.pkg &&\ @MAC_DARWIN_TRUE@@UniversalMacBinary_FALSE@ b=$(top_builddir)/src/mac/build/NEURON-$(NVER).pkg &&\ @MAC_DARWIN_TRUE@@UniversalMacBinary_FALSE@ echo "scp $$b $$a" && \ @MAC_DARWIN_TRUE@@UniversalMacBinary_FALSE@ scp $$b $$a @BUILD_CYGWIN_TRUE@@MAC_DARWIN_FALSE@alphadist: @BUILD_CYGWIN_TRUE@@MAC_DARWIN_FALSE@ a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host)-setup.exe &&\ @BUILD_CYGWIN_TRUE@@MAC_DARWIN_FALSE@ echo $$a && \ @BUILD_CYGWIN_TRUE@@MAC_DARWIN_FALSE@ scp src/mswin/nrn"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 3)`"setup.exe $$a @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@@MAC_DARWIN_FALSE@alphadist: @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@@MAC_DARWIN_FALSE@ a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".$(host)-setup.exe && \ @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@@MAC_DARWIN_FALSE@ echo $$a && \ @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@@MAC_DARWIN_FALSE@ scp src/mswin/nrn"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 3)`"setup-$(host_cpu).exe $$a @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@@MAC_DARWIN_FALSE@alphadist: @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@@MAC_DARWIN_FALSE@ a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 2)`".tar.gz && \ @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@@MAC_DARWIN_FALSE@ echo $$a && \ @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@@MAC_DARWIN_FALSE@ scp nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`".tar.gz $$a # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/aclocal.m4000066400000000000000000001275601323325274500145540ustar00rootroot00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1998-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ([2.50])dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/acinclude.m4]) m4_include([m4/acx_mpi.m4]) m4_include([m4/acx_pthread.m4]) m4_include([m4/ivcheck.m4]) m4_include([m4/java_support.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nrnbg.m4]) m4_include([m4/nrnjava.m4]) m4_include([m4/nrnpython.m4]) m4_include([m4/nrnrt.m4]) m4_include([m4/oddities.m4]) m4_include([m4/parcon.m4]) m4_include([m4/pkg.m4]) m4_include([m4/readline.m4]) m4_include([m4/withmpi.m4]) neuron-7.5/bin/000077500000000000000000000000001323325274500134515ustar00rootroot00000000000000neuron-7.5/bin/Makefile.am000077500000000000000000000005641323325274500155150ustar00rootroot00000000000000## This directory contains several files that need to be installed in the ## neuron binary directory. bin_SCRIPTS = nrnivmodl nrnocmodl neurondemo mkthreadsafe \ nrnoc_makefile nrniv_makefile nrnmech_makefile \ mos2nrn2.sh hel2mos1.sh bbswork.sh nrngui sortspike \ nrnpyenv.sh set_nrnpyenv.sh EXTRA_DIST = bbswork.sh mkthreadsafe sortspike nrnpyenv.sh set_nrnpyenv.sh neuron-7.5/bin/Makefile.in000066400000000000000000000504571323325274500155310ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = nrnoc_makefile nrniv_makefile nrnmech_makefile \ nrnocmodl nrnivmodl neurondemo nrngui bbswork.sh mos2nrn2.sh \ hel2mos1.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/bbswork.sh.in \ $(srcdir)/hel2mos1.sh.in $(srcdir)/mos2nrn2.sh.in \ $(srcdir)/neurondemo.in $(srcdir)/nrngui.in \ $(srcdir)/nrniv_makefile.in $(srcdir)/nrnivmodl.in \ $(srcdir)/nrnmech_makefile.in $(srcdir)/nrnoc_makefile.in \ $(srcdir)/nrnocmodl.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ bin_SCRIPTS = nrnivmodl nrnocmodl neurondemo mkthreadsafe \ nrnoc_makefile nrniv_makefile nrnmech_makefile \ mos2nrn2.sh hel2mos1.sh bbswork.sh nrngui sortspike \ nrnpyenv.sh set_nrnpyenv.sh EXTRA_DIST = bbswork.sh mkthreadsafe sortspike nrnpyenv.sh set_nrnpyenv.sh all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign bin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrnoc_makefile: $(top_builddir)/config.status $(srcdir)/nrnoc_makefile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrniv_makefile: $(top_builddir)/config.status $(srcdir)/nrniv_makefile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrnmech_makefile: $(top_builddir)/config.status $(srcdir)/nrnmech_makefile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrnocmodl: $(top_builddir)/config.status $(srcdir)/nrnocmodl.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrnivmodl: $(top_builddir)/config.status $(srcdir)/nrnivmodl.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ neurondemo: $(top_builddir)/config.status $(srcdir)/neurondemo.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrngui: $(top_builddir)/config.status $(srcdir)/nrngui.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ bbswork.sh: $(top_builddir)/config.status $(srcdir)/bbswork.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mos2nrn2.sh: $(top_builddir)/config.status $(srcdir)/mos2nrn2.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ hel2mos1.sh: $(top_builddir)/config.status $(srcdir)/hel2mos1.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-binSCRIPTS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/bin/bbswork.sh000066400000000000000000000005661323325274500154650ustar00rootroot00000000000000#!/bin/sh prefix=/home/hines/neuron/nrnmpi exec_prefix=/home/hines/neuron/nrnmpi/x86_64 NRNBIN=${exec_prefix}/bin ARCH=x86_64 MODSUBDIR=x86_64 NEURONHOME=/home/hines/neuron/nrnmpi/share/nrn cd $1 if [ -x ${MODSUBDIR}/special ] ; then program="./${MODSUBDIR}/special" else program="${NRNBIN}/nrniv" fi hostname pwd shift shift echo "time $program $*" time $program $* neuron-7.5/bin/bbswork.sh.in000077500000000000000000000005001323325274500160610ustar00rootroot00000000000000#!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ NRNBIN=@bindir@ ARCH=@host_cpu@ MODSUBDIR=@modsubdir@ NEURONHOME=@prefix@/share/nrn cd $1 if [ -x ${MODSUBDIR}/special ] ; then program="./${MODSUBDIR}/special" else program="${NRNBIN}/nrniv" fi hostname pwd shift shift echo "time $program $*" time $program $* neuron-7.5/bin/hel2mos1.sh.in000066400000000000000000000011541323325274500160450ustar00rootroot00000000000000#!/bin/sh #NETSCAPE='/u3/local/hines/netscape/netscape' NETSCAPE=`which netscape` help='http://neuron.yale.edu/neuron/help' #help="file:$NEURONHOME/html/help" #dict=$NEURONHOME/lib/helpdict #echo "$*" #url=`sed -n '/^'"$*"'/{ # s/.* //p # q #}' $dict` url=$1 if [ -z "$url" ] ; then echo "|$*|" url='contents.html' fi cmd="$NETSCAPE -remote openURL(${help}/${url})" if [ -x $NETSCAPE ] ; then $cmd if [ ! $? ] ; then $NEURONHOME/bin/ivdialog "$0: $cmd failed" "Continue" "Continue" exit 2 fi else $NEURONHOME/bin/ivdialog "$0: $NETSCAPE not executable from this shell" "Continue" "Continue" exit 1 fi neuron-7.5/bin/mkthreadsafe000077500000000000000000000035361323325274500160440ustar00rootroot00000000000000#!/bin/bash if test $# = 0 ; then files="`ls *.mod`" else files="$*" fi echo $files t=temp words="EXTERNAL discontinuity LINEAR DISCRETE PARTIAL ERROR" for i in $files ; do f="`echo $i | sed 's/\.mod//'`" nocmodl $f.mod 2>&1 | sed '/^Translating/d' > $t nline=`wc -l $t` rm $f.c thread_safe="" for word in $words ; do if grep -q "$word"' is not thread safe' $t ; then thread_safe=no fi done if grep -q 'Complain to hines' $t ; then thread_safe=no fi echo " $f.mod:" if test "$nline" = "0 temp" ; then echo "$f.mod is Thread Safe" elif grep -q '^Thread Safe$' $t ; then echo "$f.mod is Thread Safe" elif test "$thread_safe" = "no" ; then cat $t echo -n "Continue:" read a elif grep -q 'POINTER is not thread safe' $t ; then cat $t echo "$f.mod should be examined and if, in fact, it is or can be modified to be thread safe, the THREADSAFE keyword can be prepended to the NEURON block." echo -n "Continue:" read a elif grep -q 'Assignment to the GLOBAL' $t ; then sed -n '/NEURON *{/,/}/p' $f.mod sed -n '/VERBATIM/,/ENDVERBATIM/p' $f.mod cat $t a="n" echo "If you know that this model is in fact thread safe when the GLOBAL variables that are written to are promoted to thread instance variables, and therefore it is ok to add the THREADSAFE keyword, then ..." echo "Add THREADSAFE? [y][n]: $a" read a if test "$a" = "y" ; then sed '/NEURON *{/a \ THREADSAFE ' $f.mod > $t cp $t $f.mod fi elif grep -q 'VERBATIM' $t ; then sed -n '/VERBATIM/,/ENDVERBATIM/p' $f.mod cat $t a="n" echo "If you know that this model is in fact thread safe so that it is ok to add the THREADSAFE keyword, then ..." echo "Add THREADSAFE? [y][n]: $a" read a if test "$a" = "y" ; then sed '/NEURON *{/a \ THREADSAFE ' $f.mod > $t cp $t $f.mod fi else cat $t echo -n "Continue:" read a fi rm $t done neuron-7.5/bin/mos2nrn2.sh.in000077500000000000000000000053051323325274500161000ustar00rootroot00000000000000#!/bin/sh # mos2nrn2 zipfile simdir running ARCH=@host_cpu@ MODSUBDIR=@modsubdir@ if test "x${NRNHOME}" = x ; then prefix="@prefix@" exec_prefix="@exec_prefix@" NRNBIN="@bindir@/" else prefix="$NRNHOME" exec_prefix="${prefix}/${ARCH}" NRNBIN="${exec_prefix}/bin/" fi if test "${NRNHOME_EXEC}" != "" ; then exec_prefix="${NRNHOME_EXEC}" NRNBIN="${exec_prefix}/bin/" fi if [ "$3" = "1" ] ; then echo "Already running neuron controlled by mosaic. Must quit that instance before running another." read a exit 0 fi current=`pwd` simdir=$2 askread="yes" doclean() { if test "$a" = "y" ; then echo "removing $simdir" cd $simdir/.. rm -r $simdir else echo " not removing $simdir" fi sleep 2 exit 0 } cleanup() { a=y if test "$askread" = "yes" ; then echo "Clean up by removing directory $simdir ? (n/y):$a" read a fi if test "$a" = "" ; then a=y fi doclean } asklaunch() { a=C if test "$askread" = "yes" ; then echo "[C]lean up by removing directory $simdir, [R]elaunch NEURON, or immediately e[X]it ? (C/R/X):$a" read a fi case "$a" in R|r) a=R;; X|x) a=n;; *) a=y;; esac } if test -f $simdir ; then rm -f $simdir # maybe mkstemp was used and the file was created. fi if mkdir $simdir ; then true else echo "Couldn't mkdir $simdir" read a exit 0 fi # make a file for communication with neuron cp $1 $simdir/nrnzip.zip echo "Changing the current directory to $simdir" cd $simdir unzip -n nrnzip.zip for MOSINIT in mosinit.py mosinit.hoc ; do if [ -r $MOSINIT ] ; then first=./$MOSINIT else first=`find . -name $MOSINIT -print |sed -n 1p` fi if [ "$first" ] ; then break fi done if [ -z "$first" ] ; then echo "Missing the mosinit.hoc or mosinit.py file" cleanup fi cd `dirname $first` first=`basename $first` if [ -f moslocal.tmp ] ; then askread="no" fi if [ "$MOSINIT" = "mosinit.hoc" ] ; then moddirs="`sed -n '1s;^//moddir;;p' < $first | tr -d '\r'`" MOSINITARGS="$first -" else moddirs="`sed -n '1s;^#moddir;;p' < $first | tr -d '\r'`" MOSINITARGS="-python $first" fi if test "$moddirs" != "" ; then modfiles='yes' else modfiles="`ls *.mod 2>/dev/null`" fi if [ "$modfiles" ] ; then # run special a=y if test "$askread" = "yes" ; then echo "Create the special version and run it? (y/n):" read a fi if [ "$a" != "y" -a "$a" != "" ] ; then cleanup fi "${NRNBIN}nrnivmodl" $moddirs a=R while test "$a" = "R" ; do ./${MODSUBDIR}/special $MOSINITARGS asklaunch done else # run neuron a=y if test "$askread" = "yes" ; then echo "Run NEURON? (y/n):" read a fi if [ "$a" != "y" -a "$a" != "" ] ; then cleanup fi a=R while test "$a" = "R" ; do "${NRNBIN}nrniv" $MOSINITARGS asklaunch done fi doclean neuron-7.5/bin/neurondemo.in000077500000000000000000000012051323325274500161550ustar00rootroot00000000000000#!/bin/sh ARCH=@host_cpu@ MODSUBDIR=@modsubdir@ if test "x${NRNHOME}" = x ; then prefix="@prefix@" exec_prefix=@exec_prefix@ NRNBIN=@bindir@/ NRNDEMO=@prefix@/share/@PACKAGE@/demo/ else prefix="$NRNHOME" exec_prefix="${prefix}/${ARCH}" NRNBIN="${exec_prefix}/bin/" NRNDEMO="${prefix}/share/@PACKAGE@/demo/" fi if test "${NRNHOME_EXEC}" != "" ; then exec_prefix="${NRNHOME_EXEC}" NRNBIN="${exec_prefix}/bin/" fi export NRNDEMO if [ ! -f "${NRNDEMO}neuron" ] ; then (cd "${NRNDEMO}release" ; "${NRNBIN}nrnivmodl" ; cd .. ; ln -s release/${MODSUBDIR}/special neuron) fi "${NRNDEMO}neuron" "${NRNDEMO}demo.hoc" "$@" - neuron-7.5/bin/nrngui.in000077500000000000000000000012621323325274500153070ustar00rootroot00000000000000#!/bin/sh ARCH=@host_cpu@ MODSUBDIR=@modsubdir@ if test "x${NRNHOME}" = x ; then prefix=@prefix@ exec_prefix=@exec_prefix@ NRNBIN=@bindir@/ else prefix="$NRNHOME" exec_prefix="${prefix}/${ARCH}" NRNBIN="${exec_prefix}/bin/" fi if test "${NRNHOME_EXEC}" != "" ; then exec_prefix="${NRNHOME_EXEC}" NRNBIN="${exec_prefix}/bin/" fi if test "@enable_carbon@" = "yes" ; then NRNIV="${exec_prefix}/bin/nrniv.app/Contents/MacOS/nrniv" else NRNIV="${NRNBIN}nrniv" fi NEURONHOME="${prefix}/share/nrn" export NEURONHOME if [ -x ${MODSUBDIR}/special ] ; then program="./${MODSUBDIR}/special" else program="${NRNIV}" fi exec "$program" "$NEURONHOME/lib/hoc/nrngui.hoc" "$@" - neuron-7.5/bin/nrniv_makefile.in000077500000000000000000000100711323325274500167740ustar00rootroot00000000000000# # This makefile has the rules necessary for making the custom version of nrniv # called "special" from various mod files. The variable "MODOBJFILES" should # be set on the command line to list the .o files that are needed. # prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ libobjdir = $(libdir) DEFS = @DEFS@ LDFLAGS = $(UserLDFLAGS) @LDFLAGS@ LIBS = $(BGTRACE_LIBS) @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ IV_LIBS = @IV_LIBS_LIBTOOL@ $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) IVOS_LIB = @IVOS_LIB@ PVM_LIBS = @PVM_LIBS@ @PVM_XTRA_LIBS@ NJ_LIBS = @NRNJAVA_LIBS@ PY_LIBS = @NRNPYTHON_LIBS@ NRNNI_LIBS = @NRNNI_LIBS@ PTHREAD_CC=@PTHREAD_CC@ PTHREAD_CFLAGS=@PTHREAD_CFLAGS@ PTHREAD_LIBS=@PTHREAD_LIBS@ INCLUDES = -I. -I.. -I$(pkgincludedir) -I$(libdir) $(UserINCFLAGS) LIBTOOL = $(pkgdatadir)/libtool @LIBTOOLTAG@ CC = @CC@ CXX = @CXX@ CFLAGS = @CFLAGS@ $(PTHREAD_CFLAGS) CXXFLAGS = @CXXFLAGS@ $(PTHREAD_CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CCLD = $(CC) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) @NRNPURIFY_TRUE@CXXPURELINK = $(LIBTOOL) --tag=purify --mode=link purify $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) @BUILD_NRNMPI_DYNAMIC_TRUE@lnrnmpi = @BUILD_NRNMPI_DYNAMIC_FALSE@lnrnmpi = -lnrnmpi NRNLIBS = -L$(libdir) -lnrnoc -loc \ -lnrniv -livoc -loc \ -lneuron_gnu -lscopmath -lsparse13 -lsundials $(lnrnmpi) \ @MEMACSLIB@ -lmeschach \ $(IVOS_LIB) $(IV_LIBS) \ @READLINE_LIBS@ \ $(NJ_LIBS) $(PY_LIBS) $(NRNNI_LIBS) $(PVM_LIBS) $(PTHREAD_LIBS) NRNOCOBJS = $(libobjdir)/ocmain.o $(libobjdir)/nrnnoiv.o $(libobjdir)/ocnoiv.o NRNIVOBJS = $(libobjdir)/nrnmain.o $(libobjdir)/ivocmain.o $(libobjdir)/nvkludge.o .SUFFIXES: .SUFFIXES: .c .mod .o # # How to make a .o file from a .mod file. Note that we have to delete the # .c file, or else make will get confused. We have to go directly from # a .mod to a .o file because otherwise GNU make will try to use a rule # involving m2c. Argh!! Why did they have to build in so many implicit # rules? # #.mod.o: # $(bindir)/nocmodl $* || (rm -f $*.c; exit 1) # $(COMPILE) -c $*.c # rm -f $*.c # # some experimentation gave promising results for the following. # it remains to be seen how portable it is. It seems to work # for gnu make and the /usr/ccs/bin/make distributed with solaris. #%.o : %.mod .mod.c: $(bindir)/nocmodl $* .c.o: $(COMPILE) -c $*.c .mod.o: $(bindir)/nocmodl $* $(COMPILE) -c $*.c mod_func.o: mod_func.c $(COMPILE) -c $< @NRNPURIFY_FALSE@special: $(MODOBJFILES) $(COBJFILES) mod_func.o @NRNPURIFY_FALSE@ $(CXXLINK) -o special $(NRNIVOBJS) $(MODOBJFILES) mod_func.o $(COBJFILES) $(NRNLIBS) $(LIBS) @NRNPURIFY_TRUE@special: $(MODOBJFILES) $(COBJFILES) mod_func.o @NRNPURIFY_TRUE@ if test "$(USEPURIFY)" = "yes" ; then \ @NRNPURIFY_TRUE@ $(CXXPURELINK) -o special $(NRNIVOBJS) $(MODOBJFILES) mod_func.o $(COBJFILES) $(NRNLIBS) $(LIBS) ;\ @NRNPURIFY_TRUE@ echo "if there is an error perhaps you need '/opt/Rational/config/start_lmgrd_on_NeuronDev'"; \ @NRNPURIFY_TRUE@ echo 'if you cannot run then perhaps you need a LD_LIBRARY_PATH as in:'; \ @NRNPURIFY_TRUE@ echo 'export LD_LIBRARY_PATH=/home/hines/pcache/home/hines/neuron/iv/i686/lib:/home/hines/pcache/home/hines/neuron/purify/i686/lib:/home/hines/neuron/iv/i686/lib:/home/hines/neuron/purify/i686/lib:/usr/X11R6/lib:/usr/X11R6/lib/modules'; \ @NRNPURIFY_TRUE@ else \ @NRNPURIFY_TRUE@ $(CXXLINK) -o special $(NRNIVOBJS) $(MODOBJFILES) mod_func.o $(COBJFILES) $(NRNLIBS) $(LIBS) ;\ @NRNPURIFY_TRUE@ fi neuron-7.5/bin/nrnivmodl.in000077500000000000000000000114561323325274500160230ustar00rootroot00000000000000#!/bin/sh ARCH=@host_cpu@ MODSUBDIR=@modsubdir@ if test "x${NRNHOME}" = x ; then prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ else prefix="$NRNHOME" exec_prefix="${prefix}/${ARCH}" bindir="${prefix}/${ARCH}/bin" libdir="${prefix}/${ARCH}/lib" fi if test "${NRNHOME_EXEC}" != "" ; then exec_prefix="${NRNHOME_EXEC}" bindir="${exec_prefix}/bin" libdir="${exec_prefix}/lib" fi export prefix export exec_prefix export bindir export libdir MAKEFILEDIR="${bindir}" PURIFY="USEPURIFY=no" if [ "$1" = "-p" ] ; then PURIFY="USEPURIFY=yes" shift fi TRACE="BGTRACE_LIBS=" if [ "$1" = "-trace" ] ; then TRACE="BGTRACE_LIBS = -L/bgl/hpct_bgl/mp_profiler/lib -lmpitrace.rts -L/bgl/hpct_bgl/binutils-2.14/lib -lbfd -liberty -lhandle_MPID_Win_start_error.rts" shift fi UserINCFLAGS="" if [ "$1" = "-incflags" ] ; then UserINCFLAGS="$2" shift shift fi UserLDFLAGS="" if [ "$1" = "-loadflags" ] ; then UserLDFLAGS="$2" shift shift fi if [ ! -d $MODSUBDIR ] ; then echo "Creating $MODSUBDIR directory for .o files." echo mkdir $MODSUBDIR fi pwd files="" incs="" if test $# -gt 0 ; then for i in "$@" ; do if test -d "$i" ; then files="$files $(ls $i/*.mod)" incs="$incs $(ls $i/*.inc)" else files="$files $i" fi done else files=$(ls *.mod) fi mfiles="" for i in $files ; do mfiles="$mfiles `basename $i`" done echo $files echo $mfiles files=`echo "$files" | sed 's/\.mod//g'` if test "$files" = '*' ; then files="" fi cd $MODSUBDIR mdir=`pwd` for i in $files; do rm -f "`basename $i`".mod ln -s ../$i.mod . done if test "$incs" != "" ; then for i in $incs ; do rm -f "`basename $i`" ln -s ../$i . done fi bfiles=`echo "$mfiles" | sed 's/\.mod//g'` for i in $cfiles; do rm -f $i ln -s ../$i . done COBJS= MODOBJS= if [ `echo "\n"` ] ; then newline="\n" else newline="\\\\n" fi echo '#include #include "hocdec.h" extern int nrnmpi_myid; extern int nrn_nobanner_; ' > mod_func.c for i in $bfiles ; do echo 'extern void _'$i'_reg(void);' >> mod_func.c done echo ' void modl_reg(){ if (!nrn_nobanner_) if (nrnmpi_myid < 1) { fprintf(stderr, "Additional mechanisms from files'$newline'"); ' >> mod_func.c if true ; then # the standard order for i in $files do echo ' fprintf(stderr," '$i'.mod");' >>mod_func.c done else # use "ls -x" to sort alphabetically by lines # use "ls -C" to sort alphabetically by columns ls -C $mfiles | sed 's/\(.*\)/ fprintf(stderr,"\1\\n");/' >> mod_func.c fi echo ' fprintf(stderr, "'$newline'"); }' >>mod_func.c for i in $bfiles; do echo ' _'$i'_reg();' >> mod_func.c MODOBJS="$MODOBJS $i.o" done echo "}" >> mod_func.c if test -n "$cfiles" ; then COBJS=`echo "$cfiles" | sed 's/\.c/.o/g'` fi @NRNMECH_DLL_STYLE_FALSE@make -f "${MAKEFILEDIR}/nrniv_makefile" "$PURIFY" "$TRACE" "MODOBJFILES=$MODOBJS" "COBJFILES=$COBJS" "UserLDFLAGS=$UserLDFLAGS" "UserINCFLAGS=$UserINCFLAGS" special && @NRNMECH_DLL_STYLE_FALSE@ echo "Successfully created $MODSUBDIR/special" @NRNMECH_DLL_STYLE_TRUE@MODLO=`echo "$MODOBJS" | sed 's/\.o/.lo/g'` @NRNMECH_DLL_STYLE_TRUE@CLO=`echo "$COBJS" | sed 's/\.o/.lo/g'` @NRNMECH_DLL_STYLE_TRUE@if test "${mdir}" = "${prefix}/share/nrn/demo/release/powerpc" ; then @NRNMECH_DLL_STYLE_TRUE@ mdir='${NRNHOME}'/share/nrn/demo/release/${MODSUBDIR} @NRNMECH_DLL_STYLE_TRUE@fi @NRNMECH_DLL_STYLE_TRUE@make -f "$MAKEFILEDIR/nrnmech_makefile" "MODOBJFILES=$MODLO" "COBJFILES=$CLO" "UserLDFLAGS=$UserLDFLAGS" "UserINCFLAGS=$UserINCFLAGS" libnrnmech.la && @NRNMECH_DLL_STYLE_TRUE@ echo '#!/bin/sh @NRNMECH_DLL_STYLE_TRUE@if test "x${NRNHOME}" = "x" ; then @NRNMECH_DLL_STYLE_TRUE@ NRNHOME='"\"${prefix}\""' @NRNMECH_DLL_STYLE_TRUE@fi'> special && @NRNMECH_DLL_STYLE_TRUE@ echo 'if test "x${NRNBIN}" = "x" ; then @NRNMECH_DLL_STYLE_TRUE@ NRNBIN='"\"${bindir}/\""' @NRNMECH_DLL_STYLE_TRUE@fi'>> special && @NRNMECH_DLL_STYLE_TRUE@echo 'if test "@enable_carbon@" = "yes" ; then @NRNMECH_DLL_STYLE_TRUE@ NRNIV="${NRNBIN}nrniv.app/Contents/MacOS/nrniv" @NRNMECH_DLL_STYLE_TRUE@else @NRNMECH_DLL_STYLE_TRUE@ NRNIV="${NRNBIN}nrniv" @NRNMECH_DLL_STYLE_TRUE@fi' >> special && @NRNMECH_DLL_STYLE_TRUE@ echo '"${NRNIV}"'" -dll \"${mdir}/.libs/libnrnmech.so\" \"\$@\"" >> special && @NRNMECH_DLL_STYLE_TRUE@ chmod 755 special && @NRNMECH_DLL_STYLE_TRUE@ echo "Successfully created $MODSUBDIR/special" @NRNMECH_DLL_STYLE_TRUE@@MAC_DARWIN_TRUE@if false ; then @NRNMECH_DLL_STYLE_TRUE@@MAC_DARWIN_FALSE@if false ; then @NRNMECH_DLL_STYLE_FALSE@if false ; then vv=`sw_vers -productVersion|sed 's/.*\.\(.*\)\..*/\1/'` #if test $vv -gt 6 ; then if false ; then echo "use @executable_path prefix for install_name for dylib absolute paths" ff="${mdir}/.libs/libnrnmech.so" f=`otool -L "$ff" | sed -n "s,.*$libdir/\(.*dylib\).*,\ -change $libdir/\1 @executable_path/../lib/\1,p"` install_name_tool $f "$ff" fi fi neuron-7.5/bin/nrnmech_makefile.in000077500000000000000000000056731323325274500173060ustar00rootroot00000000000000# # This makefile has the rules necessary for making a nrnmech library that # can be dlopen'd from nrniv. # The variable "MODOBJFILES" should # be set on the command line to list the .o files that are needed. includedir = $(prefix)/include datadir = $(prefix)/share pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ libobjdir = $(libdir) DEFS = @DEFS@ LDFLAGS = $(UserLDFLAGS) @LDFLAGS@ LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ #IV_LIBS = @IV_LIBS_LIBTOOL@ $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) IV_LIBS = IVOS_LIB = @IVOS_LIB@ PVM_LIBS = @PVM_LIBS@ @PVM_XTRA_LIBS@ NJ_LIBS = @NRNJAVA_LIBS@ #PY_LIBS = @NRNPYTHON_LIBS@ PY_LIBS = NRNNI_LIBS = @NRNNI_LIBS@ INCLUDES = -I. -I.. -I"$(pkgincludedir)" -I"$(libdir)" $(UserINCFLAGS) LIBTOOL = "$(pkgdatadir)/libtool" @LIBTOOLTAG@ CC = @CC@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) -module $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_NRNMPI_DYNAMIC_TRUE@lnrnmpi = @BUILD_NRNMPI_DYNAMIC_FALSE@lnrnmpi = -lnrnmpi NRNOCLIBS = -L"$(libdir)" -lnrnoc -loc @MEMACSLIB@ \ $(lnrnmpi) -lscopmath -lsparse13 @READLINE_LIBS@ NRNIVLIBS = -L"$(libdir)" "$(libdir)/libnrniv.la" -livoc \ -lneuron_gnu -lmeschach -lsundials \ $(IVOS_LIB) $(IV_LIBS) $(NJ_LIBS) $(PY_LIBS) $(NRNNI_LIBS) $(PVM_LIBS) NRNOCOBJS = "$(libobjdir)/ocmain.o" "$(libobjdir)/nrnnoiv.o" "$(libobjdir)/ocnoiv.o" NRNIVOBJS = "$(libobjdir)/nrnmain.o" "$(libobjdir)/ivocmain.o" "$(libobjdir)/nvkludge.o" .SUFFIXES: .SUFFIXES: .c .mod .lo # # How to make a .o file from a .mod file. Note that we have to delete the # .c file, or else make will get confused. We have to go directly from # a .mod to a .o file because otherwise GNU make will try to use a rule # involving m2c. Argh!! Why did they have to build in so many implicit # rules? # #.mod.o: # $(bindir)/nocmodl $* || (rm -f $*.c; exit 1) # $(COMPILE) -c $*.c # rm -f $*.c # # some experimentation gave promising results for the following. # it remains to be seen how portable it is. It seems to work # for gnu make and the /usr/ccs/bin/make distributed with solaris. #%.o : %.mod .mod.c: "$(bindir)/nocmodl" $* .c.lo: $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .mod.lo: "$(bindir)/nocmodl" $* $(LTCOMPILE) -c -o $@ $*.c mod_func.lo: mod_func.c $(LTCOMPILE) -c -o $@ $*.c libnrnmech_la_OBJECTS = $(MODOBJFILES) mod_func.lo $(COBJFILES) libnrnmech_la_LIBADD = $(NRNOCLIBS) $(NRNIVLIBS) libnrnmech.la: $(libnrnmech_la_OBJECTS) $(libnrnmech_la_DEPENDENCIES) $(LINK) -rpath "$(libdir)" $(libnrnmech_la_LDFLAGS) $(libnrnmech_la_OBJECTS) $(libnrnmech_la_LIBADD) $(LIBS) neuron-7.5/bin/nrnoc_makefile.in000077500000000000000000000042551323325274500167660ustar00rootroot00000000000000# # This makefile has the rules necessary for making the custom version of nrnoc # called "special" from various mod files. The variable "MODOBJFILES" should # be set on the command line to list the .o files that are needed. # prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ libobjdir = $(libdir) DEFS = @DEFS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ INCLUDES = -I. -I$(pkgincludedir) -I$(libdir) LIBTOOL = $(pkgdatadir)/libtool CC = @CC@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) NRNOCLIBS = -L$(libdir) $(libdir)/libnrnoc.la -loc @MEMACSLIB@ \ -lscopmath -lsparse13 @READLINE_LIBS@ \ $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) NRNOCOBJS = $(libobjdir)/ocmain.o $(libobjdir)/nrnnoiv.o $(libobjdir)/ocnoiv.o .SUFFIXES: .SUFFIXES: .c .mod .o # # How to make a .o file from a .mod file. Note that we have to delete the # .c file, or else make will get confused. We have to go directly from # a .mod to a .o file because otherwise GNU make will try to use a rule # involving m2c. Argh!! Why did they have to build in so many implicit # rules? # #.mod.o: # $(bindir)/nocmodl $* || (rm -f $*.c; exit 1) # $(COMPILE) -c $*.c # rm -f $*.c # # some experimentation gave promising results for the following. # it remains to be seen how portable it is. It seems to work # for gnu make and the /usr/ccs/bin/make distributed with solaris. #%.o : %.mod .mod.c: $(bindir)/nocmodl $* .c.o: $(COMPILE) -c $*.c .mod.o: $(bindir)/nocmodl $* $(COMPILE) -c $*.c mod_func.o: mod_func.c $(COMPILE) -c $< special: $(MODOBJFILES) mod_func.o $(LINK) -o special $(NRNOCOBJS) $(MODOBJFILES) mod_func.o $(NRNOCLIBS) $(LIBS) neuron-7.5/bin/nrnocmodl.in000077500000000000000000000021341323325274500157770ustar00rootroot00000000000000#!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ LIBOBJDIR=${libdir} MAKEFILEDIR=${bindir} ARCH=@host_cpu@ MODSUBDIR=@modsubdir@ if [ ! -d $MODSUBDIR ] then echo "Creating $MODSUBDIR directory for .o files." echo mkdir $MODSUBDIR fi if test $# -gt 0 ; then files=$* else files=`echo *.mod` fi files=`echo "$files" | sed s/\.mod//g` if test "$files" = '*' ; then files="" fi cd $MODSUBDIR for i in $files; do rm -f $i.mod ln -s ../$i.mod . done MODOBJS= if [ `echo "\n"` ] then newline="\n" else newline="\\\\n" fi echo '#include #include "hocdec.h" modl_reg(){ NOT_PARALLEL_SUB(fprintf(stderr, "Additional mechanisms from files'$newline'");) ' > mod_func.c for i in $files do echo 'NOT_PARALLEL_SUB(fprintf(stderr," '$i'.mod");)' >>mod_func.c done echo 'NOT_PARALLEL_SUB(fprintf(stderr, "'$newline'");)' >>mod_func.c for i in $files do echo _"$i"_reg"();" >> mod_func.c MODOBJS="$MODOBJS $i.o" done echo "}" >> mod_func.c make -f $MAKEFILEDIR/nrnoc_makefile "MODOBJFILES=$MODOBJS" special && echo "Successfully created $MODSUBDIR/special" neuron-7.5/bin/nrnpyenv.sh000077500000000000000000000232051323325274500156710ustar00rootroot00000000000000#!/bin/bash # eval "`sh nrnpyenv.sh`" # if PYTHONHOME does not exist, # will set bash environment variables so that nrniv -python has same # environment as python # Overcome environment issues when --with-nrnpython=dynamic . # The problems might be an immediate exit due to 'No module named site', # inability to find common modules and shared libraries that support them, # and not loading the correct python library. #Run python and generate the following on stdout #export PYTHONHOME=... #export PYTHONPATH=... #export LD_LIBRARY_PATH=... #export PATH=... #export NRN_PYLIB=... #with NRN_PYLIB as a full path to the Python library, #it may not be necessary to change LD_LIBRARY_PATH #Some python installations, such as enthought canopy, do not have site #in a subfolder of prefix. In that case, the site folder defines home and #if there is a site-packages subfolder of prefix, that is added to the #pythonpath. Also the lib under home is added to the ld_library_path. # This script is useful for linux, mingw, and mac versions. # Append the output to your .bashrc file. export originalPATH="$PATH" export originalPYTHONPATH="$PYTHONPATH" export originalPYTHONHOME="$PYTHONHOME" export originalLDLIBRARYPATH="$LD_LIBRARY_PATH" if test "$PYTHONHOME" != "" ; then echo '# PYTHONHOME exists. Do nothing' 1>&2 exit 0 fi PYTHON=python if test "$1" != "" ; then PYTHON="$1" fi # what is the python library for Darwin z='' if type -P uname > /dev/null ; then z=`uname` fi if test "$z" = "Darwin" ; then DYLD_PRINT_LIBRARIES=1 export DYLD_PRINT_LIBRARIES z=`$PYTHON -c 'quit()' 2>&1 | sed -n 's/^dyld: loaded: //p' | sed -n /libpython/p` if test "$z" = "" ; then z=`$PYTHON -c 'quit()' 2>&1 | sed -n 's/^dyld: loaded: //p' | sed -n 2p` fi unset DYLD_PRINT_LIBRARIES PYLIB_DARWIN=$z export PYLIB_DARWIN fi $PYTHON << 'here' ########################################### import sys, os, site usep = "/" upathsep = ":" def upath(path): #return linux path if path == None: return "" import posixpath plist = path.split(os.pathsep) for i, p in enumerate(plist): p = os.path.splitdrive(p) if p[0]: p = usep + p[0][:p[0].rfind(":")] + usep + p[1].replace(os.sep, usep) else: p = p[1].replace(os.sep, usep) p = posixpath.normpath(p) plist[i] = p p = upathsep.join(plist) return p #a copy of nrnpylib_linux() but with some os x specific modifications def nrnpylib_darwin_helper(): import os, sys, re, subprocess #in case it was dynamically loaded by python pid = os.getpid() cmd = "lsof -p %d"%pid f = [] try: # in case lsof does not exist f = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout except: pass nrn_pylib = None cnt = 0 for bline in f: fields = bline.decode().split() if len(fields) > 8: line = fields[8] if re.search(r'libpython.*\.[ds]', line): print ("from lsof: %s" % line) nrn_pylib = line.strip() return nrn_pylib if re.search(r'[Ll][Ii][Bb].*[Pp]ython', line): cnt += 1 if cnt == 1: # skip 1st since it is the python executable continue print ("from lsof: %s" % line) nrn_pylib = line.strip() return nrn_pylib else: # figure it out from the os path p = os.path.sep.join(os.__file__.split(os.path.sep)[:-1]) name = "libpython%d.%d" % (sys.version_info[0], sys.version_info[1]) cmd = r'find %s -name %s\*.dylib' % (p, name) print ('# %s'%cmd) f = os.popen(cmd) libs = [] for line in f: libs.append(line.strip()) if len(libs) == 0: # try again searching the parent folder p = os.path.sep.join(os.__file__.split(os.path.sep)[:-2]) cmd = r'find %s -name %s\*.dylib' % (p, name) print ('# %s'%cmd) f = os.popen(cmd) for line in f: libs.append(line.strip()) print ('# %s'%str(libs)) if len(libs) == 1: return libs[0] if len(libs) > 1: # which one do we want? Check the name of an imported shared object try: import _ctypes except: import ctypes for i in sys.modules.values(): try: s = i.__file__ if s.endswith('.dylib'): match = re.search(r'-%d%d([^-]*)-' % (sys.version_info[0], sys.version_info[1]), s) if match: name = name + match.group(1) + '.dylib' break elif s.endswith('.so'): match = re.search(r'-%d%d([^-]*)-' % (sys.version_info[0], sys.version_info[1]), s) if match: name = name + match.group(1) + '.so' break except: pass for i in libs: if name in i: return i return nrn_pylib def nrnpylib_darwin(): import os nrn_pylib = os.getenv("PYLIB_DARWIN") if nrn_pylib is not "": return nrn_pylib return nrnpylib_darwin_helper() def nrnpylib_mswin(): import os, sys, re e = '/'.join(sys.executable.split(os.path.sep)) cmd = 'cygcheck "%s"' % e f = os.popen(cmd) nrn_pylib = None for line in f: if re.search('ython..\.dll', line): nrn_pylib = '/'.join(line.split(os.path.sep)).strip() return nrn_pylib def nrnpylib_linux(): import os, sys, re, subprocess #in case it was dynamically loaded by python pid = os.getpid() cmd = "lsof -p %d"%pid f = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout nrn_pylib = None for bline in f: fields = bline.decode().split() if len(fields) > 8: line = fields[8] if re.search(r'libpython.*\.so', line): print ("from lsof: %s" % line) nrn_pylib = line.strip() return nrn_pylib else: # figure it out from the os path p = os.path.sep.join(os.__file__.split(os.path.sep)[:-1]) name = "libpython%d.%d" % (sys.version_info[0], sys.version_info[1]) cmd = r'find %s -name %s\*.so' % (p, name) print ('# %s'%cmd) f = os.popen(cmd) libs = [] for line in f: libs.append(line.strip()) if len(libs) == 0: # try again searching the parent folder p = os.path.sep.join(os.__file__.split(os.path.sep)[:-2]) cmd = r'find %s -name %s\*.so' % (p, name) print ('# %s'%cmd) f = os.popen(cmd) for line in f: libs.append(line.strip()) print ('# %s'%str(libs)) if len(libs) == 1: return libs[0] if len(libs) > 1: # which one do we want? Check the name of an imported shared object try: import _ctypes except: import ctypes for i in sys.modules.values(): try: s = i.__file__ if s.endswith('.so'): match = re.search(r'-%d%d([^-]*)-' % (sys.version_info[0], sys.version_info[1]), s) if match: name = name + match.group(1) + '.so' break except: pass for i in libs: if name in i: return i return nrn_pylib nrn_pylib = None if 'darwin' in sys.platform: nrn_pylib = nrnpylib_darwin() elif 'win' in sys.platform: nrn_pylib = nrnpylib_mswin() elif 'linux' in sys.platform: nrn_pylib = nrnpylib_linux() #there is a question about whether to use sys.prefix for PYTHONHOME #or whether to derive from site.__file__. #to help answer, ask how many sys.path items begin with sys.prefix and #how many begin with site.__file__ - 3 p = [upath(i) for i in sys.path] print ("# items in sys.path = " + str(len(p))) sp = upath(sys.prefix) print ("# beginning with sys.prefix = " + str(len([i for i in p if sp in i]))) s = usep.join(upath(site.__file__).split(usep)[:-3]) if s == sp: print ("# site-3 same as sys.prefix") else: print ("# beginning with site-3 = " + str(len([i for i in p if s in i]))) foo = [i for i in p if sp not in i] foo = [i for i in foo if s not in i] print ("# in neither location " + str(foo)) print ("# sys.prefix = " + sp) print ("# site-3 = " + s) if "darwin" in sys.platform or "linux" in sys.platform or "win" in sys.platform: # What, if anything, did python prepend to PATH path="" oldpath = upath(os.getenv("originalPATH")) newpath = upath(os.getenv("PATH")) i = newpath.find(oldpath) if i > 1: path = newpath[:i] pythonhome = upath(sys.prefix) pythonpath = upath(os.getenv("PYTHONPATH")) ldpath = "" oldldpath = upath(os.getenv("originalLD_LIBRARY_PATH")) newldpath = upath(os.getenv("LD_LIBRARY_PATH")) i = newldpath.find(oldldpath) if i > 1: ldpath = newldpath[:i] sitedir = usep.join(upath(site.__file__).split(usep)[:-1]) # if sitedir is not a subfolder of pythonhome, add to pythonpath if not pythonhome in sitedir: if not sitedir in pythonpath: pythonpath = (pythonpath + upathsep if pythonpath else "") + sitedir # add the parent of sitedir to LD_LIBRARY_PATH ldp = usep.join(sitedir.split(usep)[:-1]) if ldp not in oldldpath: ldpath = (ldpath + upathsep if ldpath else "") + ldp try: #if a representative shared libary not under pythonhome, add to pythonpath import _ctypes f = usep.join(upath(_ctypes.__file__).split(usep)[:-1]) if f.find(pythonhome) == -1: pythonpath = (pythonpath + upathsep if pythonpath else "") + f except: pass dq = "\"" if pythonpath: print ("\n# if launch python, then need:") print ("export PYTHONPATH=" + dq + pythonpath + dq) print ("\n# if launch nrniv, then likely need:") if pythonhome: print ("export PYTHONHOME=" + dq + pythonhome + dq) if ldpath and nrn_pylib == None: print ("export LD_LIBRARY_PATH=" + dq + ldpath + upathsep + "$LD_LIBRARY_PATH" + dq) if path: print ("export PATH=" + dq + path + "$PATH" + dq) if nrn_pylib != None: print ('export NRN_PYLIB="%s"' % nrn_pylib) quit() ################################### here neuron-7.5/bin/set_nrnpyenv.sh000077500000000000000000000014721323325274500165460ustar00rootroot00000000000000#!/bin/bash #if nrniv does not work then see if we can fix the problem if nrniv -c 'quit()' >& /dev/null ; then true else orig_pythonhome="$PYTHONHOME" orig_pythonpath="$PYTHONPATH" orig_ldlibpath="$LD_LIBRARY_PATH" orig_path="$PATH" eval "`nrnpyenv.sh`" if nrniv -c 'quit()' >& /dev/null ; then true else echo Attempt to fix nrniv failure using: 'eval "`mk_nrnpyenv.sh`"' failed. if test "$orig_pythonhome" = "" ; then unset PYTHONHOME else export PYTHONHOME="$orig_pythonhome" fi if test "$orig_pythonpath" = "" ; then unset PYTHONPATH else export PYTHONPATH="$orig_pythonpath" fi if test "$orig_ldlibpath" = "" ; then unset LD_LIBRARY_PATH else export LD_LIBRARY_PATH="$orig_ldlibpath" fi export PATH="$orig_path" fi fi neuron-7.5/bin/sortspike000077500000000000000000000000511323325274500154160ustar00rootroot00000000000000#!/bin/sh sort -k 1n,1n -k 2n,2n $1 > $2 neuron-7.5/build.sh000077500000000000000000000035531323325274500143450ustar00rootroot00000000000000#!/bin/sh # how to build from just the cvs sources # takes us only to the distribution level. # must still run a ./configure commmand (see examples after autoconf command) ######################################## ######################################## # the following commands must be executed in this directory aclocal -I m4 ltarg="-i" if test -f "`which glibtoolize`" ; then ltver=`glibtoolize --version | sed -n '1s/.* \([0-9]\).*/\1/p'` if test "${ltver}" = 1 ; then ltarg="" ; fi echo "glibtoolize -c -f $ltarg" glibtoolize -c -f $ltarg else ltver=`libtoolize --version | sed -n '1s/.* \([0-9]\).*/\1/p'` if test "${ltver}" = 1 ; then ltarg="" ; fi echo "libtoolize -c -f $ltarg" libtoolize -c -f $ltarg fi autoheader #autoheader constructs config.h.in. From that, construct nrnconf.h.in # and nmodlconf.h.in. The former is for binaries executed on the host machine # and the latte is for binaryies executed on the build machine sed '/Remove from nrnconf\.h\.in/,/^$/d' config.h.in > temp.tmp ! cmp -s temp.tmp nrnconf.h.in && cp temp.tmp nrnconf.h.in ! cmp -s temp.tmp nmodlconf.h.in && cp temp.tmp nmodlconf.h.in rm temp.tmp automake --add-missing --copy sh extend_depcomp.sh autoconf # at this point the rest of the build process is identical as if you # had just extracted a nrn-5.4.tar.gz file # the configure, make, make install may be executed in this directory # or a completely different build directory. Examples for this directory # are: # if Interviews was installed in ../iv and you want java # ./configure --prefix=`pwd` --with-nrnjava # if InterViews was installed in $HOME/iv-15 # ./configure --prefix=`pwd` --with-iv=$HOME/iv-15 # if this directory is $NSRC, InterViews was installed in $IV # and you want to build in $NOBJ then cd to $NOBJ and use at least # $NSRC/configure --prefix=`pwd` --with-iv=$IV --srcdir=$NSRC # make # make install ########### neuron-7.5/compile000077500000000000000000000162451323325274500142670ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: neuron-7.5/config.guess000077500000000000000000001247531323325274500152350ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: neuron-7.5/config.h.in000066400000000000000000000257011323325274500147310ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ #ifndef H_nrnconf_included #define H_nrnconf_included 1 /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* (Remove from nrnconf.h.in) */ #undef ALWAYS_CALL_MPI_INIT /* (Remove from nrnconf.h.in) */ #undef BGPDMA /* (Remove from nrnconf.h.in) */ #undef BLUEGENE /* (Remove from nrnconf.h.in) */ #undef BLUEGENEP /* (Remove from nrnconf.h.in) */ #undef BLUEGENEQ /* (Remove from nrnconf.h.in) */ #undef BLUEGENE_CHECKPOINT /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* define if using cygwin */ #undef CYGWIN /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* if mac os x */ #undef DARWIN /* (Remove from nrnconf.h.in) */ #undef DISCRETE_EVENT_OBSERVER /* (Remove from nrnconf.h.in) */ #undef DLL_DEFAULT_FNAME /* (Remove from nrnconf.h.in) */ #undef FILE_OPEN_RETRY /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FENV_H /* Define to 1 if you have the `fesetround' function. */ #undef HAVE_FESETROUND /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getpw' function. */ #undef HAVE_GETPW /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY /* define if using InterViews */ #undef HAVE_IV /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF /* Define to 1 if you have the `mallinfo' function. */ #undef HAVE_MALLINFO /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* (Remove from nrnconf.h.in) */ #undef HAVE_PKMESG /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* (Remove from nrnconf.h.in) */ #undef HAVE_PVM3_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setitimer' function. */ #undef HAVE_SETITIMER /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* (Define if this signal exists) */ #undef HAVE_SIGBUS /* (Remove from nrnconf.h.in) */ #undef HAVE_SIGPOLL /* (Define if this signal exists) */ #undef HAVE_SIGSEGV /* define if the compiler has stringstream */ #undef HAVE_SSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* (Remove from nrnconf.h.in) */ #undef HAVE_STL /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STREAM_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `stty' function. */ #undef HAVE_STTY /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CONF_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIO_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VARARGS_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the <_G_config.h> header file. */ #undef HAVE__G_CONFIG_H /* define if can declare inline float abs(float) */ #undef INLINE_FLOAT_ABS /* define if can declare inline long abs(long) */ #undef INLINE_LONG_ABS /* undefined or ::fabs or std::fabs */ #undef IVOS_FABS /* (Remove from nrnconf.h.in) */ #undef JVM_DLOPEN /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* (Remove from nrnconf.h.in) */ #undef METIS /* define if using mingw */ #undef MINGW /* define if using Mike Neubig contributions */ #undef MikeNeubig /* where the lib hoc is */ #undef NEURON_DATA_DIR /* host triplet */ #undef NRNHOST /* cpu type consistent with nrnivmodl */ #undef NRNHOSTCPU /* (Remove from nrnconf.h.in) */ #undef NRNIDXTYPE /* if 1 then dlopen nrnmech instead of special */ #undef NRNMECH_DLL_STYLE /* (Remove from nrnconf.h.in) */ #undef NRNMPI /* (Remove from nrnconf.h.in) */ #undef NRNMPI_DYNAMICLOAD /* if nrnoc can use X11 */ #undef NRNOC_X11 /* (Remove from nrnconf.h.in) */ #undef NRNPYTHON_DYNAMICLOAD /* (Remove from nrnconf.h.in) */ #undef NRN_6229 /* (Remove from nrnconf.h.in) */ #undef NRN_CONFIG_ARGS /* (Remove from nrnconf.h.in) */ #undef NRN_MUSIC /* (Remove from nrnconf.h.in) */ #undef NRN_REALTIME /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* (Remove from nrnconf.h.in) */ #undef PARANEURON /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* define if RETSIGTYPE(*)(int) is not the prototype for a signal handler */ #undef SIGNAL_CAST /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define SUNDIALS data type 'realtype' as 'long double' */ #undef SUNDIALS_DOUBLE_PRECISION /* Use generic math functions */ #undef SUNDIALS_USE_GENERIC_MATH /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* (Remove from nrnconf.h.in) */ #undef USEJVM /* (Remove from nrnconf.h.in) */ #undef USENCS /* (Remove from nrnconf.h.in) */ #undef USENEOSIM /* (Remove from nrnconf.h.in) */ #undef USENRNJAVA /* (Remove from nrnconf.h.in) */ #undef USE_NRNFILEWRAP /* (Remove from nrnconf.h.in) */ #undef USE_PTHREAD /* (Remove from nrnconf.h.in) */ #undef USE_PYTHON /* Version number of package */ #undef VERSION /* define if no terminal capabilities */ #undef WITHOUT_MEMACS /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* define if using Carbon libraries */ #undef carbon /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t #if defined(__cplusplus) #include #endif #if defined(CYGWIN) || defined(MINGW) #define WIN32 1 #endif #if defined(MINGW) #define CYGWIN #endif #if defined(carbon) && defined(__cplusplus) #define MAC 1 #include #endif #endif /* H_nrnconf_included */ neuron-7.5/config.sub000077500000000000000000001064601323325274500146730ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: neuron-7.5/configure000077500000000000000000031455031323325274500146230ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for nrn 7.5. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nrn' PACKAGE_TARNAME='nrn' PACKAGE_VERSION='7.5' PACKAGE_STRING='nrn 7.5' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/memacs/main.c" ac_default_prefix=/usr/local/nrn # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS PVM_LIBS PVM_XTRA_LIBS PVM_INCLUDES BUILD_NRNPYTHON_DYNAMIC_FALSE BUILD_NRNPYTHON_DYNAMIC_TRUE BUILD_NRNPYTHON_FALSE BUILD_NRNPYTHON_TRUE BUILD_MINGW_FALSE BUILD_MINGW_TRUE BUILD_CYGWIN_FALSE BUILD_CYGWIN_TRUE BUILD_NRNMPI_DYNAMIC_FALSE BUILD_NRNMPI_DYNAMIC_TRUE BUILD_PARANEURON_FALSE BUILD_PARANEURON_TRUE BUILD_IVOS_FALSE BUILD_IVOS_TRUE BUILD_NRNIV_FALSE BUILD_NRNIV_TRUE BUILD_NRNJAVA_FALSE BUILD_NRNJAVA_TRUE BUILD_READLINE_FALSE BUILD_READLINE_TRUE nrndef_mswin nrndef_mac nrndef_unix NRN_LIBDIR modsubdir IVHINES IV_LIBDIR IVOS_LIB IVOS_DIR IV_INCLUDE IV_LIBS_LIBTOOL IV_LIBS LIBOBJS ALLOCA PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC acx_pthread_config BUILD_6229_FALSE BUILD_6229_TRUE NRNNI_DEP NRNNI_LIBS NRNNI_LIBLA NIDDK NRN_REALTIME_INCLUDE nrnskip_rebase enable_carbon X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF dos_marshal_dir binsuffix marshal_dir NRNJAVA_DEP NRNJAVA_LIBS NRNJAVA_LIBLA JNI_INCLUDE_FLAGS JDKDIR JAVAH uudecode JAVA JAVAC _ACJNI_JAVAC MEMACSLIBLA MEMACSLIB BUILD_MEMACS_FALSE BUILD_MEMACS_TRUE NRN_READLINE_DEP NRN_READLINE_LIBS READLINE_LIBS TERMCAP_CFLAGS TERMCAP_LIB NCURSES_LIBS NCURSES_CFLAGS MAC_DARWIN_FALSE MAC_DARWIN_TRUE NRNMECH_DLL_STYLE_FALSE NRNMECH_DLL_STYLE_TRUE NRNPURIFY_FALSE NRNPURIFY_TRUE CXXCPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL MPICCnrnmpi METISLIB METISLIBADD METISOBJADD METISINCLUDE LIBTOOLTAG MPICXX MPILIBS MPICC MUSIC_LIBDIR MUSIC_INCDIR MUSIC_LIBLA BUILD_NEURONMUSIC_FALSE BUILD_NEURONMUSIC_TRUE EXTRA_CYGWIN_FLAGS MINGW_CFLAG BUILD_RX3D_FALSE BUILD_RX3D_TRUE BUILD_RX3D HAVE_CYTHON_FALSE HAVE_CYTHON_TRUE CYTHON have_cython PYTHON_BLD npy_pyver10 npy_apiver npy_NRNPYTHON_INCLUDES PYTHON PY2TO3 NRNPYTHON_PYVER NRNPYTHON_PYMAJOR rxd_mingw_args setup_extra_link_args NRNPYTHON_PYLIBLINK NRNPYTHON_EXEC NRNPYTHON_DEFINES NRNPYTHON_INCLUDES NRNPYTHON_DEP NRNPYTHON_LIBS NRNPYTHON_LIBLA ac_pysetup NRN_PYTHON_ON_FALSE NRN_PYTHON_ON_TRUE LIBM LN_S YFLAGS YACC LEXLIB LEX_OUTPUT_ROOT LEX CPP MAKE_RPMS_FALSE MAKE_RPMS_TRUE RPM_CONFIGURE_ARGS RPM_TARBALL RPM_ARGS RPM_TARGET RPM_DIR RPM_PROG RPM_RELEASE NRN_SRCDIR BUILD_CARBON_FALSE BUILD_CARBON_TRUE am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX NRNPYTHON_ONLY_FALSE NRNPYTHON_ONLY_TRUE NMODL_BUILD_FALSE NMODL_BUILD_TRUE NMODL_ONLY_FALSE NMODL_ONLY_TRUE UniversalMacBinary_FALSE UniversalMacBinary_TRUE host_os host_vendor host_cpu host build_os build_vendor build_cpu build PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_UniversalMacBinary enable_DiscreteEventObserver with_nmodl_only with_nmodl enable_bluegene enable_bluegeneP enable_bgPlinux enable_bluegeneQ with_nrnpython_only with_rpm_prog enable_rpm_rules with_rpm_extra_args enable_shared enable_static enable_pysetup with_nrnpython enable_cygwin enable_rx3d with_pyexe with_music with_paranrn with_multisend with_mpi with_metis with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock with_memacs with_readline with_neosim enable_ncs with_nrnjava with_x enable_realtime enable_NI6229 with_nrniv with_iv with_nrnoc_x11 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CXX CXXFLAGS CCC CPP YACC YFLAGS MPICC MPICXX LT_SYS_LIBRARY_PATH CXXCPP NCURSES_CFLAGS NCURSES_LIBS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures nrn 7.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/nrn] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of nrn 7.5:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-UniversalMacBinary combined binary for ppc and i386, fake arch is called umac --disable-DiscreteEventObserver Save space, but danger of use of freed memory if any NetCon destroyed. --enable-bluegene For BlueGene/L, supplies many extra configuration options --enable-bluegeneP For BlueGene/P, supplies many extra configuration options --enable-bgPlinux For BlueGene/P mpicc, supplies many extra configuration options --enable-bluegeneQ For BlueGene/Q, supplies many extra configuration options --enable-rpm-rules Try to create rpm make rules (defaults to yes for Linux) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-pysetup=installoption Execute 'python setup.py install installoption' as the last installation step. --disable-pysetup or an installoption of 'no' means do NOT execute 'python setup.py...' The default installoption is '--home=' --disable-cygwin build as MINGW program. Only for mswin. --disable-rx3d Do not compile the cython translated 3-d rxd features --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-ncs Compile with USENCS defined - Allows NCS to use NEURON --disable-ncs This is the default --enable-realtime rtlinux dynamic clamp --enable-NI6229 use National Instruments PCI-6229 DAQ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-nmodl-only When cross compiling, nocmodl need to be compiled for the build machine --without-nmodl When cross compiling, nocmodl should NOT be compiled for the host machine --with-nrnpython-only configure and make only the nrnpython folder --with-rpm-prog=PROG Which rpm to use (optional) --with-rpm-extra-args=ARGS Run rpm with extra arguments (defaults to none) --with-nrnpython=desired python binary or 'dynamic' Python interpreter can be used (default is NO) Probably need to set PYLIBDIR to find libpython... and PYINCDIR to find Python.h --with-pyexe=desired python binary (when --with-nrnpython=dynamic --with-music=/prefix/of/music/installation Want to use the MUSIC - MUlti SImulation Coordinator --with-paranrn parallel variable step integration for individual cells --with-paranrn=dynamic as above, but with dynamic loading of mpi shared libaries --without-paranrn default. No parallel integration --with-multisend Allow optional MPI_ISend/Recv for spike transfer --with-multisend=bgp Use BlueGene/P style dma spike transfer --with-multisend=all Allow ISend or BGP style dma --with-multisend=allreplay Allow ISend or BGP style dma, and with possiblity of Record/Replay --with-mpi Also compile the parallel code in src/sundials/shared --without-mpi This is the default. Do not compile the parallel sundials code --with-metis use METIS to distribute cell equations among processors --without-metis default. --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --without-memacs leave out everything that depends on terminal cursor capabilities -with-readline=dir Specify the location of the readline library. You must specify this option if readline is not located in a standard place. The configure script looks for the library in the subdirectory lib underneath the directory you specify. --with-neosim Compile with USENEOSIM defined --without-neosim This is the default --with-nrnjava Must explicitly use it if you want it. Enable the java interface. This builds libnrnjava.so and makes the NrnJava class available in hoc. --without-nrnjava No java interface. This is the default --with-x use the X Window System --without-x disable everything depending on x11 equivalent to --without-iv --without-nrnoc-x11 --without-x --with-nrniv This is the default. Build as much of nrniv as is consistent with the existence or non-existence of InterViews. I.e if InterViews is not found List, Vector, File, Impedance, SaveState, etc. will still be built. --without-nrniv Build only nrnoc --with-iv=dir Specify the location of the InterViews graphics package. You must specify this option if you do not have them installed in a standard place. The standard places are (from high to low precedence) prefix/../iv /usr/local/iv /usr/local --without-iv Do not compile graphics into neuron. --with-nrnoc-x11 This is the default Add the x11 window code to NRNOC to allow the old style x11 window for plot, axis, etc. --without-nrnoc-x11 Do not compile the old style nrnoc x11 window Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. MPICC MPI C compiler command MPICXX MPI C++ compiler command LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXXCPP C++ preprocessor NCURSES_CFLAGS C compiler flags for NCURSES, overriding pkg-config NCURSES_LIBS linker flags for NCURSES, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF nrn configure 7.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by nrn $as_me 7.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='nrn' VERSION='7.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac if test "x$ac_cv_prog_cc_stdc" = xno ; then as_fn_error $? "C compiler not ISO Standard C" "$LINENO" 5 fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.22 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi ac_config_headers="$ac_config_headers config.h" if test "$prefix" = NONE ; then prefix=/usr/local/nrn fi if test "$prefix" = "NONE" ; then prefix=$ac_default_prefix fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac mlh_cc="$CC" mlh_cflag="$CFLAGS" mlh_cxx="$CXX" mlh_cxxflag="$CXXFLAGS" mlh_yacc="$YACC" mlh_ldflag="$LDFLAGS" # Check whether --enable-UniversalMacBinary was given. if test "${enable_UniversalMacBinary+set}" = set; then : enableval=$enable_UniversalMacBinary; enable_dependency_tracking=no CFLAGS="$CFLAGS -arch ppc -arch i386" CXXFLAGS="$CXXFLAGS -arch ppc -arch i386" host_cpu=umac fi if test x$enable_UniversalMacBinary = xyes; then UniversalMacBinary_TRUE= UniversalMacBinary_FALSE='#' else UniversalMacBinary_TRUE='#' UniversalMacBinary_FALSE= fi # Check whether --enable-DiscreteEventObserver was given. if test "${enable_DiscreteEventObserver+set}" = set; then : enableval=$enable_DiscreteEventObserver; if test "$enable_DiscreteEventObserver" != "no" ; then enable_DiscreteEventObserver="yes" fi else enable_DiscreteEventObserver=yes fi if test "$enable_DiscreteEventObserver" = "yes" ; then $as_echo "#define DISCRETE_EVENT_OBSERVER 1" >>confdefs.h fi # Check whether --with-nmodl-only was given. if test "${with_nmodl_only+set}" = set; then : withval=$with_nmodl_only; if test "$with_nmodl_only" = "yes" ; then nmodl_build=yes fi else with_nmodl_only=no fi # Check whether --with-nmodl was given. if test "${with_nmodl+set}" = set; then : withval=$with_nmodl; if test "$with_nmodl" = "yes" ; then nmodl_build=yes else nmodl_build=no fi else nmodl_build=yes fi # Check whether --enable-bluegene was given. if test "${enable_bluegene+set}" = set; then : enableval=$enable_bluegene; if test "$enable_bluegene" = "yes" ; then with_x="no" with_memacs="no" enable_shared="no" enable_pysetup="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BGLSYS" = "" ; then BGLSYS=/bgl/BlueLight/ppcfloor/bglsys fi if test "$CC" = "" ; then CC=blrts_xlc fi if test "$CXX" = "" ; then CXX=blrts_xlc++ fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-qarch=440d -qtune=440 -O3 -qstrict -qhot" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS -g -I$BGLSYS/include" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BGL_LIBS" = "" ; then BGL_LIBS="-lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -ldevices.rts -L/opt/ibmcmp/xlmass/bg/4.3/blrts_lib -lmass" fi if test "$BG_CHECKPOINT" = "yes" ; then $as_echo "#define BLUEGENE_CHECKPOINT 1" >>confdefs.h BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi if test "$LIBS" = "" ; then LIBS="-L$BGLSYS/lib $BGL_LIBS" fi am_cv_CC_dependencies_compiler_type=xlc am_cv_CXX_dependencies_compiler_type=xlc else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi $as_echo "#define BLUEGENE 1" >>confdefs.h fi fi # Check whether --enable-bluegeneP was given. if test "${enable_bluegeneP+set}" = set; then : enableval=$enable_bluegeneP; if test "$enable_bluegeneP" = "yes" ; then with_x="no" with_memacs="no" enable_pysetup="no" enable_shared="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BG_BASE" = "" ; then BG_BASE="/bgsys/drivers/ppcfloor/" fi if test "$BG_INCLUDE" = "" ; then BG_INCLUDE="-I$BG_BASE/comm/include -I$BG_BASE/arch/include" fi if test "$PYINCDIR" = "" ; then PYINCDIR="$BG_BASE/gnu-linux/include/python2.6" fi if test "$PYLIB" = "" ; then PYLIB="-L$BG_BASE/gnu-linux/lib -lpython2.6" PYLIBDIR="$BG_BASE/gnu-linux/lib" PYLIBLINK="-L$BG_BASE/gnu-linux/lib -lpython2.6" fi if test "$LIBS" = "" ; then LIBS='-lmass' fi if test "$LDFLAGS" = "" ; then LDFLAGS='-qsmp -qnostaticlink' fi if test "$with_multisend" = "" ; then with_multisend=bgp fi if test "$CC" = "" ; then CC=mpixlc fi if test "$CXX" = "" ; then CXX=mpixlcxx fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-O3 -qarch=450d" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS $BG_INCLUDE" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BG_CHECKPOINT" = "yes" ; then $as_echo "#define BLUEGENE_CHECKPOINT 1" >>confdefs.h BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi if test "$deptype" = "" ; then am_cv_CC_dependencies_compiler_type=xlc am_cv_CXX_dependencies_compiler_type=xlc fi else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi $as_echo "#define BLUEGENE 1" >>confdefs.h $as_echo "#define BLUEGENEP 1" >>confdefs.h fi fi # Check whether --enable-bgPlinux was given. if test "${enable_bgPlinux+set}" = set; then : enableval=$enable_bgPlinux; if test "$enable_bgPlinux" = "yes" ; then with_x="no" with_memacs="no" # enable_shared="no" enable_pysetup="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BG_BASE" = "" ; then BG_BASE="/bgsys/drivers/ppcfloor" fi BG_INCLUDE="-I$BG_BASE/comm/include -I$BG_BASE/arch/include" if test "$PYINCDIR" = "" ; then PYINCDIR="$BG_BASE/gnu-linux/include/python2.5" fi if test "$PYLIB" = "" ; then PYLIB="-L$BG_BASE/gnu-linux/lib -lpython2.5" PYLIBDIR="$BG_BASE/gnu-linux/lib" PYLIBLINK="-L$BG_BASE/gnu-linux/lib -lpython2.5" fi if test "$with_multisend" = "" ; then with_multisend=bgp fi if test "$CC" = "" ; then CC=mpicc fi if test "$CXX" = "" ; then CXX=mpicxx fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-O3 -g" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS $BG_INCLUDE" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BG_CHECKPOINT" = "yes" ; then $as_echo "#define BLUEGENE_CHECKPOINT 1" >>confdefs.h BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi # if test "$LDFLAGS" = "" ; then # LDFLAGS="-shared" # fi else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi $as_echo "#define BLUEGENE 1" >>confdefs.h $as_echo "#define BLUEGENEP 1" >>confdefs.h fi fi # Check whether --enable-bluegeneQ was given. if test "${enable_bluegeneQ+set}" = set; then : enableval=$enable_bluegeneQ; if test "$enable_bluegeneQ" = "yes" ; then with_x="no" with_memacs="no" enable_shared="no" enable_pysetup="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BG_BASE" = "" ; then BG_BASE="/bgsys/drivers/ppcfloor/" fi if test "$BG_INCLUDE" = "" ; then BG_INCLUDE="-I$BG_BASE/comm/include -I$BG_BASE/arch/include" fi PYBASE=$BG_BASE/tools/python/bldsrc-2.6.7/Python-2.6.7 if test "$PYINCDIR" = "" ; then PYINCDIR="$PYBASE/Include -I$PYBASE" fi if test "$PYLIB" = "" ; then PYLIB="-L$PYBASE -lpython2.6" PYLIBDIR="$PYBASE" PYLIBLINK="$PYLIB" fi if test "$LIBS" = "" ; then LIBS='-lmass' fi if test "$LDFLAGS" = "" ; then LDFLAGS='-qsmp -qnostaticlink' fi if test "$with_multisend" = "" ; then with_multisend=yes fi if test "$CC" = "" ; then CC=mpixlc fi if test "$CXX" = "" ; then CXX=mpixlcxx fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-O3 -qarch=qp -q64 -qstrict -qnohot" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS $BG_INCLUDE" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BG_CHECKPOINT" = "yes" ; then $as_echo "#define BLUEGENE_CHECKPOINT 1" >>confdefs.h BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi if test "$deptype" = "" ; then am_cv_CC_dependencies_compiler_type=xlc am_cv_CXX_dependencies_compiler_type=xlc fi else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi $as_echo "#define BLUEGENE 1" >>confdefs.h $as_echo "#define BLUEGENEQ 1" >>confdefs.h fi fi if test x$with_nmodl_only = xyes ; then nmodl_build=yes fi if test "$nmodl_build" != "no" ; then nmodl_build=yes fi if test x$with_nmodl_only = xyes; then NMODL_ONLY_TRUE= NMODL_ONLY_FALSE='#' else NMODL_ONLY_TRUE='#' NMODL_ONLY_FALSE= fi if test x$nmodl_build = xyes; then NMODL_BUILD_TRUE= NMODL_BUILD_FALSE='#' else NMODL_BUILD_TRUE='#' NMODL_BUILD_FALSE= fi # Check whether --with-nrnpython-only was given. if test "${with_nrnpython_only+set}" = set; then : withval=$with_nrnpython_only; else with_nrnpython_only=no fi if test x$with_nrnpython_only = xyes; then NRNPYTHON_ONLY_TRUE= NRNPYTHON_ONLY_FALSE='#' else NRNPYTHON_ONLY_TRUE='#' NRNPYTHON_ONLY_FALSE= fi if test "$always_call_mpi_init" = "yes" ; then $as_echo "#define ALWAYS_CALL_MPI_INIT 1" >>confdefs.h fi if test "$file_open_retry" != "" ; then cat >>confdefs.h <<_ACEOF #define FILE_OPEN_RETRY $file_open_retry _ACEOF fi cat >>confdefs.h <<_ACEOF #define DLL_DEFAULT_FNAME "$host_cpu/.libs/libnrnmech.so" _ACEOF nrndef_unix="//" nrndef_mac="//" nrndef_mswin="//" case $host_os in cygwin* ) CYGWIN=yes MINGW=no;; mingw* ) MINGW=yes CYGWIN=no;; * ) CYGWIN=no MINGW=no;; esac echo "CYGWIN=$CYGWIN" echo "MINGW=$MINGW" nrnskip_rebase='' if test "$CYGWIN" = "yes" -o "$MINGW" = "yes" ; then nrndef_mswin="" fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$enable_carbon = xyes; then BUILD_CARBON_TRUE= BUILD_CARBON_FALSE='#' else BUILD_CARBON_TRUE='#' BUILD_CARBON_FALSE= fi NRN_SRCDIR=$srcdir RPM_RELEASE="`export NSRC=$srcdir ; sh $srcdir/nrnversion.sh commit`" if test "$rpm_extra_args" = "" ; then rpm_extra_args="-ba nrnrpm.spec" fi # Check whether --with-rpm-prog was given. if test "${with_rpm_prog+set}" = set; then : withval=$with_rpm_prog; rpm_prog="$withval" else rpm_prog="" fi # Check whether --enable-rpm-rules was given. if test "${enable_rpm_rules+set}" = set; then : enableval=$enable_rpm_rules; enable_rpm_rules="$withval" else enable_rpm_rules=no fi # Check whether --with-rpm-extra-args was given. if test "${with_rpm_extra_args+set}" = set; then : withval=$with_rpm_extra_args; rpm_extra_args="$withval" else rpm_extra_args="" fi RPM_TARGET="" if test x$enable_rpm_rules = xno ; then echo "Not trying to build rpms for your system (use --enable-rpm-rules to override) " no_rpm=yes else if test x$rpm_prog != x ; then if test x${RPM_PROG+set} != xset ; then RPM_PROG=$rpm_prog fi fi # Extract the first word of "rpmbuild", so it can be a program name with args. set dummy rpmbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RPM_PROG+:} false; then : $as_echo_n "(cached) " >&6 else case $RPM_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_RPM_PROG="$RPM_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RPM_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RPM_PROG" && ac_cv_path_RPM_PROG="no" ;; esac fi RPM_PROG=$ac_cv_path_RPM_PROG if test -n "$RPM_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPM_PROG" >&5 $as_echo "$RPM_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$RPM_PROG" = "no" ; then # Extract the first word of "rpm", so it can be a program name with args. set dummy rpm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RPM_PROG+:} false; then : $as_echo_n "(cached) " >&6 else case $RPM_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_RPM_PROG="$RPM_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RPM_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RPM_PROG" && ac_cv_path_RPM_PROG="no" ;; esac fi RPM_PROG=$ac_cv_path_RPM_PROG if test -n "$RPM_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPM_PROG" >&5 $as_echo "$RPM_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi no_rpm=no if test "$RPM_PROG" = "no" ; then echo *** RPM Configuration Failed echo *** Failed to find the rpm program. If you want to build rpm packages echo *** indicate the path to the rpm program using --with-rpm-prog=PROG no_rpm=yes RPM_MAKE_RULES="" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking how rpm sets %{_rpmdir}" >&5 $as_echo_n "checking how rpm sets %{_rpmdir}... " >&6; } rpmdir=`rpm --eval %{_rpmdir}` if test x$rpmdir = x"%{_rpmdir}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set (cannot build rpms?)" >&5 $as_echo "not set (cannot build rpms?)" >&6; } echo *** Could not determine the value of %{_rpmdir} echo *** This could be because it is not set, or your version of rpm does not set it echo *** It must be set in order to generate the correct rpm generation commands echo *** echo *** You might still be able to create rpms, but I could not automate it for you echo *** BTW, if you know this is wrong, please help to improve the rpm.m4 module echo *** Send corrections, updates and fixes to dhawkins@cdrgts.com. Thanks. else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rpmdir" >&5 $as_echo "$rpmdir" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how rpm sets %{_rpmfilename}" >&5 $as_echo_n "checking how rpm sets %{_rpmfilename}... " >&6; } rpmfilename=$rpmdir/`rpm --eval %{_rpmfilename} | sed "s/%{ARCH}/${host_cpu}/g" | sed "s/%{NAME}/$PACKAGE/g" | sed "s/%{VERSION}/${VERSION}/g" | sed "s/%{RELEASE}/${RPM_RELEASE}/g"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rpmfilename" >&5 $as_echo "$rpmfilename" >&6; } RPM_DIR=${rpmdir} RPM_TARGET=$rpmfilename RPM_ARGS="-ta $rpm_extra_args" RPM_TARBALL=${PACKAGE}-${VERSION}.tar.gz fi fi case "${no_rpm}" in yes) make_rpms=false;; no) make_rpms=true;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${no_rpm} for no_rpm (not making rpms)" >&5 $as_echo "$as_me: WARNING: bad value ${no_rpm} for no_rpm (not making rpms)" >&2;} make_rpms=false;; esac RPM_CONFIGURE_ARGS=${ac_configure_args} if test x$make_rpms = xtrue; then MAKE_RPMS_TRUE= MAKE_RPMS_FALSE='#' else MAKE_RPMS_TRUE='#' MAKE_RPMS_FALSE= fi if test x$make_rpms = xtrue ; then # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi if test "$with_readline" = "" ; then with_readline="no" fi elif test x$CYGWIN = xyes ; then # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi elif test x$MINGW = xyes ; then # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi else # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=no fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi enable_dlopen=yes LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _mwvalidcheckl (); int main () { return _mwvalidcheckl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mw__mwvalidcheckl=yes else ac_cv_lib_mw__mwvalidcheckl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : LIBM=-lmw fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="$LIBM -lm" fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM=-lm fi ;; esac LIBS="$LIBS $LIBM" NRNPYTHON_LIBLA="" NRNPYTHON_LIBS="" NRNPYTHON_DEP="" NRNPYTHON_INCLUDES="" npy_NRNPYTHON_INCLUDES="" NRNPYTHON_PYLIBLINK="" NRNPYTHON_PYMAJOR=2 PY2TO3="2to3" build_nrnpython=no build_nrnpython_dynamic=no npy_apiver="" npy_pyver10="" # Check whether --enable-pysetup was given. if test "${enable_pysetup+set}" = set; then : enableval=$enable_pysetup; ac_pysetup="$enableval" else ac_pysetup='--home=$(prefix)' fi if test "$ac_pysetup" = "yes" ; then ac_pysetup='--home=$(prefix)' fi # Check whether --with-nrnpython was given. if test "${with_nrnpython+set}" = set; then : withval=$with_nrnpython; ac_nrn_python="$withval" else ac_nrn_python=no fi if test x$ac_nrn_python != xno; then NRN_PYTHON_ON_TRUE= NRN_PYTHON_ON_FALSE='#' else NRN_PYTHON_ON_TRUE='#' NRN_PYTHON_ON_FALSE= fi nrn_temp_cflags="$CFLAGS" # Check whether --enable-cygwin was given. if test "${enable_cygwin+set}" = set; then : enableval=$enable_cygwin; ac_nrn_cygwin=$enableval else ac_nrn_cygwin=yes fi # Check whether --enable-rx3d was given. if test "${enable_rx3d+set}" = set; then : enableval=$enable_rx3d; ac_nrn_rx3d=$enableval else ac_nrn_rx3d=yes fi # Check whether --with-pyexe was given. if test "${with_pyexe+set}" = set; then : withval=$with_pyexe; ac_nrn_pyexe="$withval" else ac_nrn_pyexe="python" fi if test "$ac_nrn_python" = "yes" ; then ac_nrn_python="$ac_nrn_pyexe" fi if test "$ac_nrn_python" = "dynamic" ; then ac_nrn_python="$ac_nrn_pyexe" build_nrnpython_dynamic="yes" $as_echo "#define USE_PYTHON 1" >>confdefs.h npy_apiver=`$ac_nrn_python -c "import sys;print (sys.api_version)"` echo "dynamic npy_apiver=$npy_apiver" if test "$MINGW" = yes ; then # every library has to have majorminor same as python ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_python_version())" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx=2.4 echo "get_python_version() '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_python_version() '$ac_nrn_pyconf_val'" fi npy_pyver10=`echo ${xxx} | sed 's/\\.//'` else ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.sys.version_info[0])" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx=2 echo "sys.version_info[0] '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "sys.version_info[0] '$ac_nrn_pyconf_val'" fi npy_pyver10=${xxx} fi echo "dynamic npy_pyver10=$npy_pyver10" cat >>confdefs.h <<_ACEOF #define NRNPYTHON_DYNAMICLOAD $npy_pyver10 _ACEOF fi if test "$ac_nrn_python" != "no" ; then ac_nrn_python=`which ${ac_nrn_python}` if test "$ac_nrn_python" = "" ; then as_fn_error $? "Either python is not in the path or the specified python does not exist." "$LINENO" 5 fi echo "Python binary found ($ac_nrn_python)" PYTHON=$ac_nrn_python if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = "yes" ; then cygcheck "$ac_nrn_python" | grep cygwin1.dll > /dev/null if test $? != 0 ; then ac_nrn_cygwin=no with_memacs=no with_readline=no with_iv=no { $as_echo "$as_me:${as_lineno-$LINENO}: Because this python is not a CYGWIN program, build as a MinGW program as though --disable-cygwin --with-readline=no --without-iv --without-memacs was invoked. That is, build a version suitable mostly as a Python extension." >&5 $as_echo "$as_me: Because this python is not a CYGWIN program, build as a MinGW program as though --disable-cygwin --with-readline=no --without-iv --without-memacs was invoked. That is, build a version suitable mostly as a Python extension." >&6;} fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking nrnpython configuration" >&5 $as_echo_n "checking nrnpython configuration... " >&6; } $as_echo "#define USE_PYTHON 1" >>confdefs.h if test "$PYVER" = "" ; then ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_python_version())" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx=2.4 echo "get_python_version() '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_python_version() '$ac_nrn_pyconf_val'" fi PYVER=${xxx} #Notice how brackets are escaped ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.sys.version_info[0])" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx=2 echo "sys.version_info[0] '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "sys.version_info[0] '$ac_nrn_pyconf_val'" fi #following only for 2.7 and 3.x #AC_NRN_PYCONF(xxx,sys.version_info.major,2,$ac_nrn_python) NRNPYTHON_PYMAJOR=${xxx} fi NRNPYTHON_PYVER="$PYVER" if test "$PYINCDIR" = "" ; then ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_python_inc(0))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx="" echo "get_python_inc(0) '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_python_inc(0) '$ac_nrn_pyconf_val'" fi if test "$xxx" = "" ; then as_fn_error $? "cannot determine python include directory. Need to explicitly specify PYINCDIR" "$LINENO" 5 else if test "$CYGWIN" = "yes" ; then xxx="`cygpath -u $xxx`" ; fi PYINCDIR="${xxx}" fi fi if test "$EXTRAPYLIBS" = "" ; then ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LIBS'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then EXTRAPYLIBS="" echo "get_config_var('LIBS') '$ac_nrn_pyconf_val' returning '$EXTRAPYLIBS'" else EXTRAPYLIBS=${ac_nrn_pyconf_val} echo "get_config_var('LIBS') '$ac_nrn_pyconf_val'" fi fi setup_extra_link_args=extra_link_args case "$host_os" in darwin*) setup_extra_link_args='#extra_link_args' ;; esac if test "$PYLIB" = "" ; then ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LIBRARY'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then gcfLIBRARY="" echo "get_config_var('LIBRARY') '$ac_nrn_pyconf_val' returning '$gcfLIBRARY'" else gcfLIBRARY=${ac_nrn_pyconf_val} echo "get_config_var('LIBRARY') '$ac_nrn_pyconf_val'" fi ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LIBDIR'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then gcfLIBDIR="" echo "get_config_var('LIBDIR') '$ac_nrn_pyconf_val' returning '$gcfLIBDIR'" else gcfLIBDIR=${ac_nrn_pyconf_val} echo "get_config_var('LIBDIR') '$ac_nrn_pyconf_val'" fi ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LIBS'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then gcfLIBS="" echo "get_config_var('LIBS') '$ac_nrn_pyconf_val' returning '$gcfLIBS'" else gcfLIBS=${ac_nrn_pyconf_val} echo "get_config_var('LIBS') '$ac_nrn_pyconf_val'" fi ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('MODLIBS'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then gcfMODLIBS="" echo "get_config_var('MODLIBS') '$ac_nrn_pyconf_val' returning '$gcfMODLIBS'" else gcfMODLIBS=${ac_nrn_pyconf_val} echo "get_config_var('MODLIBS') '$ac_nrn_pyconf_val'" fi PYLIB=`echo $gcfLIBRARY|sed 's/lib\(.*\)\.a/\1/'` if test "$PYLIB" != "" ; then PYLIBDIR="$gcfLIBDIR" PYLIBLINK="-L$PYLIBDIR -l$PYLIB $gcfLIBS $gcfMODLIBS" PYLIB="$PYLIBLINK -R$PYLIBDIR" fi fi if test "$PYLIB" = "" ; then case "$host_os" in darwin*) ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LINKFORSHARED'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx="" echo "get_config_var('LINKFORSHARED') '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_config_var('LINKFORSHARED') '$ac_nrn_pyconf_val'" fi PYLIBLINK="$xxx" PYLIB="$PYLIBLINK" ;; *) ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LINKFORSHARED'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx="" echo "get_config_var('LINKFORSHARED') '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_config_var('LINKFORSHARED') '$ac_nrn_pyconf_val'" fi PYLINKFORSHARED="$xxx" if test "$host_os" = "cygwin" ; then ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LIBPL'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx="" echo "get_config_var('LIBPL') '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_config_var('LIBPL') '$ac_nrn_pyconf_val'" fi else ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$ac_nrn_python -c "import distutils.sysconfig print (distutils.sysconfig.get_config_var('LIBDIR'))" | tr -d '\r'` if test $? != 0 ; then as_fn_error $? "could not run python in order to determine a configuration variable." "$LINENO" 5 fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then xxx="" echo "get_config_var('LIBDIR') '$ac_nrn_pyconf_val' returning '$xxx'" else xxx=${ac_nrn_pyconf_val} echo "get_config_var('LIBDIR') '$ac_nrn_pyconf_val'" fi fi if test "$xxx" == "" ; then xxx=1 if test "$host_os" = "cygwin" -a "$ac_nrn_cygwin" = "no" ; then PYLIBDIR="`dirname $ac_nrn_python`/libs" if test -d "$PYLIBDIR" ; then PYLIB="`ls $PYLIBDIR/libpython*.a 2> /dev/null`" if test "$PYLIB" != "" ; then PYLIB=`basename "$PYLIB" | sed 's/lib\(.*\)\.a/\1/'` PYLIBLINK="-L${PYLIBDIR} -l${PYLIB}" PYLIB="${PYLIBLINK}" xxx=0 fi fi fi if test "$xxx" = 1 ; then as_fn_error $? "Could not determine PYLIBDIR, explicitly set PYLIBDIR, PYLIB, and PYLIBLINK." "$LINENO" 5 fi else PYLIBDIR="${xxx}" PYLIBLINK="-L${PYLIBDIR} -lpython${PYVER} ${EXTRAPYLIBS}" PYLIB="${PYLIBLINK} ${PYLINKFORSHARED} -R${PYLIBDIR}" fi ;; esac fi if test "$build_nrnpython_dynamic" = "no" ; then NRNPYTHON_LIBS="-lnrnpython $PYLIB" NRNPYTHON_LIBLA="../nrnpython/libnrnpython.la $PYLIB" NRNPYTHON_DEP="../nrnpython/libnrnpython.la" NRNPYTHON_INCLUDES="-I${PYINCDIR}" NRNPYTHON_EXEC="${ac_nrn_python}" build_nrnpython=yes if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = "no" ; then CFLAGS="-mno-cygwin $CFLAGS" fi fi if test "$enable_bluegene" != yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if python include files and libraries work" >&5 $as_echo_n "checking if python include files and libraries work... " >&6; } zzzLD_LIBRARY_PATH=${LD_LIBRARY_PATH} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PYLIBDIR}" export LD_LIBRARY_PATH zzzCFLAGS="$CFLAGS" zzzLIBS="$LIBS" CFLAGS="$CFLAGS -I${PYINCDIR}" LIBS="${PYLIBLINK} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { Py_Initialize(); Py_Finalize(); return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "could not run a test that used the python library. Examine config.log to see error details. Something wrong with PYLIB=$PYLIB or PYLIBDIR=$PYLIBDIR or PYLIBLINK=$PYLIBLINK or PYINCDIR=$PYINCDIR " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$zzzCFLAGS" LIBS="$zzzLIBS" LD_LIBRARY_PATH="$zzzLD_LIBRARY_PATH" export LD_LIBRARY_PATH fi fi NRNPYTHON_PYLIBLINK="$PYLIBLINK" npy_NRNPYTHON_INCLUDES="-I${PYINCDIR}" build_nrnpython=yes fi if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = "no" ; then CFLAGS="$nrn_temp_cflags" fi fi rxd_mingw_args='-c mingw32' if test $NRNPYTHON_PYMAJOR -gt 2 ; then rxd_mingw_args='' pypath=`dirname $NRNPYTHON_EXEC` if test -x $pypath/2to3 ; then PY2TO3=$pypath/2to3 fi fi # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON_BLD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON_BLD"; then ac_cv_prog_PYTHON_BLD="$PYTHON_BLD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_BLD="python" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON_BLD=$ac_cv_prog_PYTHON_BLD if test -n "$PYTHON_BLD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BLD" >&5 $as_echo "$PYTHON_BLD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$have_cython" != "xno" ; then # Extract the first word of "cython", so it can be a program name with args. set dummy cython; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_cython+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_cython"; then ac_cv_prog_have_cython="$have_cython" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_cython="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_cython" && ac_cv_prog_have_cython="no" fi fi have_cython=$ac_cv_prog_have_cython if test -n "$have_cython"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_cython" >&5 $as_echo "$have_cython" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # Extract the first word of "cython", so it can be a program name with args. set dummy cython; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CYTHON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CYTHON"; then ac_cv_prog_CYTHON="$CYTHON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CYTHON="cython" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_CYTHON" && ac_cv_prog_CYTHON="cython" fi fi CYTHON=$ac_cv_prog_CYTHON if test -n "$CYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYTHON" >&5 $as_echo "$CYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$have_cython = xyes; then HAVE_CYTHON_TRUE= HAVE_CYTHON_FALSE='#' else HAVE_CYTHON_TRUE='#' HAVE_CYTHON_FALSE= fi BUILD_RX3D=0 if test "$ac_nrn_rx3d" = "yes" ; then if test x$have_cython = xyes -o -f share/lib/python/neuron/rxd/geometry3d/ctng.cpp ; then BUILD_RX3D=1 else BUILD_RX3D=0 fi fi if test "x$BUILD_RX3D" = "x1"; then BUILD_RX3D_TRUE= BUILD_RX3D_FALSE='#' else BUILD_RX3D_TRUE='#' BUILD_RX3D_FALSE= fi MINGW_CFLAG="" EXTRA_CYGWIN_FLAGS='$(EXTRA_CYGWIN)' if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Build using MinGW." >&5 $as_echo "$as_me: Build using MinGW." >&6;} MINGW_CFLAG="-mno-cygwin" EXTRA_CYGWIN_FLAGS='' CFLAGS="-mno-cygwin $CFLAGS" CXXFLAGS="-mno-cygwin $CXXFLAGS" fi fi # Check whether --with-music was given. if test "${with_music+set}" = set; then : withval=$with_music; if test ! -f "$with_music/bin/music" ; then as_fn_error $? "MUSIC is not installed at the indicated location" "$LINENO" 5 fi if test x$with_nrnpython = x$no ; then as_fn_error $? "--with-music can be used only if --with-nrnpython is also used." "$LINENO" 5 fi with_mpi=yes with_paranrn=yes use_music=yes $as_echo "#define NRN_MUSIC 1" >>confdefs.h MUSIC_LIBLA="$with_music/lib/libmusic.la" MUSIC_INCDIR="$with_music/include" MUSIC_LIBDIR="$with_music/lib" else use_music=no MUSIC_INCDIR='.' MUSIC_LIBDIR='.' fi if test x$use_music = xyes; then BUILD_NEURONMUSIC_TRUE= BUILD_NEURONMUSIC_FALSE='#' else BUILD_NEURONMUSIC_TRUE='#' BUILD_NEURONMUSIC_FALSE= fi # Check whether --with-paranrn was given. if test "${with_paranrn+set}" = set; then : withval=$with_paranrn; nrnmpi_dynamic="no" if test "$with_paranrn" = "dynamic" ; then with_paranrn=yes nrnmpi_dynamic="yes" $as_echo "#define NRNMPI_DYNAMICLOAD 1" >>confdefs.h fi if test "$with_paranrn" = "yes" ; then with_mpi=yes use_paranrn=yes $as_echo "#define PARANEURON 1" >>confdefs.h else use_paranrn=no fi else nrnmpi_dynamic="no" use_paranrn=no fi # Check whether --with-multisend was given. if test "${with_multisend+set}" = set; then : withval=$with_multisend; if test "$with_multisend" = "yes" ; then with_mpi=yes use_bgpdma=yes $as_echo "#define BGPDMA 1" >>confdefs.h elif test "$with_multisend" = "bgp" ; then with_mpi=yes use_bgpdma=yes $as_echo "#define BGPDMA 2" >>confdefs.h elif test "$with_multisend" = "all" ; then with_mpi=yes use_bgpdma=yes $as_echo "#define BGPDMA 3" >>confdefs.h elif test "$with_multisend" = "allreplay" ; then with_mpi=yes use_bgpdma=yes $as_echo "#define BGPDMA 7" >>confdefs.h else use_bgpdma=no $as_echo "#define BGPDMA 0" >>confdefs.h fi if test "$use_bgpdma" = "yes" ; then $as_echo "#define USE_NRNFILEWRAP 1" >>confdefs.h fi else use_bgpdma=no fi MPICCnrnmpi=$CC # Check whether --with-mpi was given. if test "${with_mpi+set}" = set; then : withval=$with_mpi; if test "$with_mpi" = "yes" ; then for ac_prog in mpicc hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MPICC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPICC"; then ac_cv_prog_MPICC="$MPICC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5 $as_echo "$MPICC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MPICC" && break done test -n "$MPICC" || MPICC="$CC" acx_mpi_save_CC="$CC" CC="$MPICC" if test x = x"$MPILIBS"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" if test "x$ac_cv_func_MPI_Init" = xyes; then : MPILIBS=" " fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mpi_MPI_Init=yes else ac_cv_lib_mpi_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mpich_MPI_Init=yes else ac_cv_lib_mpich_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 $as_echo_n "checking for mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else MPILIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$acx_mpi_save_CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then as_fn_error $? "Cannot compile MPI program" "$LINENO" 5 : else use_mpi=yes $as_echo "#define NRNMPI 1" >>confdefs.h ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_prog in mpic++ mpicxx mpiCC mpCC hcp mpxlC mpxlC_r cmpic++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MPICXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPICXX"; then ac_cv_prog_MPICXX="$MPICXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MPICXX=$ac_cv_prog_MPICXX if test -n "$MPICXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5 $as_echo "$MPICXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MPICXX" && break done test -n "$MPICXX" || MPICXX="$CXX" acx_mpi_save_CXX="$CXX" CXX="$MPICXX" if test x = x"$MPILIBS"; then ac_fn_cxx_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" if test "x$ac_cv_func_MPI_Init" = xyes; then : MPILIBS=" " fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mpi_MPI_Init=yes else ac_cv_lib_mpi_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_mpich_MPI_Init=yes else ac_cv_lib_mpich_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 $as_echo_n "checking for mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else MPILIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CXX="$acx_mpi_save_CXX" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then : else use_mpi=yes : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$nrnmpi_dynamic" = "no" ; then CC=$MPICC CXX=$MPICXX fi MPICCnrnmpi=$MPICC LIBTOOLTAG='--tag=CC' : fi else use_mpi=no fi else use_mpi=no fi # Check whether --with-metis was given. if test "${with_metis+set}" = set; then : withval=$with_metis; if test "$with_metis" != "no" ; then use_metis=yes $as_echo "#define METIS 1" >>confdefs.h if test "$with_metis" != "yes" ; then METISDIR="$with_metis" else METISDIR=/home/hines/metis-4.0 fi METISINCLUDE="-I$METISDIR/Lib" METISLIB="-L$METISDIR -lmetis" METISLIBADD="$METISDIR/libmetis.a" zzzCFLAGS="$CFLAGS" zzzLIBS="$LIBS" CFLAGS="$CFLAGS $METISINCLUDE" LIBS="$METISLIB $LIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { sizeof(idxtype) == sizeof(int); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if grep 'define *IDXTYPE_INT' $METISDIR/Lib/struct.h ; then $as_echo "#define NRNIDXTYPE int" >>confdefs.h else $as_echo "#define NRNIDXTYPE short" >>confdefs.h fi else as_fn_error $? "Could not compile or link metis" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$zzzCFLAGS" LIBS="$zzzLIBS" else use_metis=no fi else use_metis=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf # Set options enable_win32_dll=no # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: if test "$enable_purify" = "yes" ; then linux_nrnmech="no" cat << __EOF__ >> libtool # ### BEGIN LIBTOOL TAG CONFIG: purify hardcode_libdir_flag_spec="" # ### END LIBTOOL TAG CONFIG: purify __EOF__ fi if test x$enable_purify = xyes; then NRNPURIFY_TRUE= NRNPURIFY_FALSE='#' else NRNPURIFY_TRUE='#' NRNPURIFY_FALSE= fi case "$host_os" in *linux*) if test x${linux_nrnmech} = x ; then linux_nrnmech="yes" addlibdl="yes" fi if test x${java_dlopen} = x ; then java_dlopen="yes" addlibdl="yes" fi ;; esac case "$host_os" in darwin*) $as_echo "#define DARWIN 1" >>confdefs.h if test x${macdarwin} = x ; then macdarwin=yes fi if test x${linux_nrnmech} = x ; then linux_nrnmech="yes" fi if test x${java_dlopen} = x ; then java_dlopen="yes" fi nrndef_mac="" ;; esac if test x${linux_nrnmech} = xyes ; then $as_echo "#define NRNMECH_DLL_STYLE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: Use the NRNMECH_DLL_STYLE for \"special\"" >&5 $as_echo "$as_me: Use the NRNMECH_DLL_STYLE for \"special\"" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: Use the default unix style for \"special\" (not NRNMECH_DLL_STYLE)" >&5 $as_echo "$as_me: Use the default unix style for \"special\" (not NRNMECH_DLL_STYLE)" >&6;} fi if test x${linux_nrnmech} = xyes; then NRNMECH_DLL_STYLE_TRUE= NRNMECH_DLL_STYLE_FALSE='#' else NRNMECH_DLL_STYLE_TRUE='#' NRNMECH_DLL_STYLE_FALSE= fi if test x${macdarwin} = xyes; then MAC_DARWIN_TRUE= MAC_DARWIN_FALSE='#' else MAC_DARWIN_TRUE='#' MAC_DARWIN_FALSE= fi if test x${addlibdl} = xyes ; then LIBS="$LIBS -ldl" fi if test "$with_memacs" = "" ; then with_memacs=yes fi # Check whether --with-memacs was given. if test "${with_memacs+set}" = set; then : withval=$with_memacs; fi if test "$with_memacs" = "yes" ; then if test "X$nrn_cv_termcap_lib" = "X"; then _nrn_needmsg=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 $as_echo_n "checking which library has the termcap functions... " >&6; } _nrn_needmsg= fi if ${nrn_cv_termcap_lib+:} false; then : $as_echo_n "(cached) " >&6 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 $as_echo_n "checking for tgetent in -lncurses... " >&6; } if ${ac_cv_lib_ncurses_tgetent+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ncurses_tgetent=yes else ac_cv_lib_ncurses_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then : nrn_cv_termcap_lib=libncurses else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 $as_echo_n "checking for tgetent in -lcurses... " >&6; } if ${ac_cv_lib_curses_tgetent+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_tgetent=yes else ac_cv_lib_curses_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 $as_echo "$ac_cv_lib_curses_tgetent" >&6; } if test "x$ac_cv_lib_curses_tgetent" = xyes; then : nrn_cv_termcap_lib=libcurses else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 $as_echo_n "checking for tgetent in -ltermcap... " >&6; } if ${ac_cv_lib_termcap_tgetent+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_termcap_tgetent=yes else ac_cv_lib_termcap_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 $as_echo "$ac_cv_lib_termcap_tgetent" >&6; } if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : nrn_cv_termcap_lib=libtermcap else pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NCURSES" >&5 $as_echo_n "checking for NCURSES... " >&6; } if test -n "$NCURSES_CFLAGS"; then pkg_cv_NCURSES_CFLAGS="$NCURSES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NCURSES_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$NCURSES_LIBS"; then pkg_cv_NCURSES_LIBS="$NCURSES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NCURSES_LIBS=`$PKG_CONFIG --libs "ncurses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then NCURSES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` else NCURSES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$NCURSES_PKG_ERRORS" >&5 as_fn_error $? "cannot find one of ncurses, curses, or termcap" "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "cannot find one of ncurses, curses, or termcap" "$LINENO" 5 else NCURSES_CFLAGS=$pkg_cv_NCURSES_CFLAGS NCURSES_LIBS=$pkg_cv_NCURSES_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } nrn_cv_termcap_lib=pkgconfig_ncurses fi fi fi fi fi if test "X$_nrn_needmsg" = "Xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 $as_echo_n "checking which library has the termcap functions... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $nrn_cv_termcap_lib" >&5 $as_echo "using $nrn_cv_termcap_lib" >&6; } if test $nrn_cv_termcap_lib = libtermcap ; then TERMCAP_LIB=-ltermcap TERMCAP_DEP= TERMCAP_CFLAGS= elif test $nrn_cv_termcap_lib = libncurses ; then TERMCAP_LIB=-lncurses TERMCAP_DEP= TERMCAP_CFLAGS= elif test $nrn_cv_termcap_lib = pkgconfig_ncurses ; then TERMCAP_LIB="$NCURSES_LIBS" TERMCAP_DEP= TERMCAP_CFLAGS="$NCURSES_CFLAGS" else TERMCAP_LIB=-lcurses TERMCAP_DEP= TERMCAP_CFLAGS= fi if test "$with_readline" = ""; then if test "$CYGWIN" = "yes" ; then with_readline=no #use ours. we hacked so neuron exits when rxvt closed. else with_readline=yes # Readline should be there. fi fi # Check whether --with-readline was given. if test "${with_readline+set}" = set; then : withval=$with_readline; if test "$with_readline" = "yes"; then # default READLINE_LIBS="-lreadline $TERMCAP_LIB" elif test "$with_readline" = "no" ; then # build our own echo "build our own version of libreadline" READLINE_LIBS="-lreadline $TERMCAP_LIB" build_readline=yes NRN_READLINE_LIBS="../readline/libreadline.la $TERMCAP_LIB" NRN_READLINE_DEP="../readline/libreadline.la" else # Location of readline specified? READLINE_LIBS="-L$with_readline/lib -lreadline $TERMCAP_LIB" fi xLIBS="$LIBS" if test "$build_readline" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking compilation with -lreadline" >&5 $as_echo_n "checking checking compilation with -lreadline... " >&6; } LIBS="$LIBS $READLINE_LIBS" build_readline=no NRN_READLINE_LIBS="$READLINE_LIBS" NRN_READLINE_DEP="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char * rl_deprep_terminal(); int main () { rl_deprep_terminal() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else cat << EOF failed Link with the readline library failed. Will attempt to compile and link with the older version of readline that comes with this installation. If this is not what you want, i.e. you want to use the latest gnu version of readline and it is not installed in a standard place (e.g., /usr/lib or /usr/local/lib), you must specify the proper location of libreadline using configure --with-readline=/where/you/put/it The file libreadline.a (or libreadline.so or whatever) should be located in /where/you/put/it/lib. If you don't have readline installed, you can get it from the GNU web site, www.gnu.org. EOF build_readline="yes" NRN_READLINE_LIBS="../readline/libreadline.la $TERMCAP_LIB" NRN_READLINE_DEP="../readline/libreadline.la" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi LIBS="$xLIBS" # Put the library flags back. else cat << EOF The GNU readline library must be installed somewhere on your system before you can compile neuron. If you don't have it anywhere, you can get it from the GNU web site, www.gnu.org. If you install it in a non-standard location, you must specify its location to this configure procedure using configure --with-readline=/where/you/put/it/lib EOF exit 1 fi MEMACSLIB="-lmemacs" MEMACSLIBLA="../memacs/libmemacs.la" else echo "no memacs or anything else that depends on terminal capabilities" READLINE_LIBS="" NRN_READLINE_LIBS="" NRN_READLINE_DEP="" TERMCAP_LIB="" $as_echo "#define WITHOUT_MEMACS 1" >>confdefs.h MEMACSLIB="" MEMACSLIBLA="" fi if test x$with_memacs = xyes; then BUILD_MEMACS_TRUE= BUILD_MEMACS_FALSE='#' else BUILD_MEMACS_TRUE='#' BUILD_MEMACS_FALSE= fi if test "$with_nrnjava" = "" ; then with_nrnjava=no # Maybe someday it will be the default fi if test "$with_neosim" = "" ; then with_neosim=no fi # Check whether --with-neosim was given. if test "${with_neosim+set}" = set; then : withval=$with_neosim; if test "$with_neosim" = "yes" ; then echo "Allow use of neosim. This also forces with-nrnjava." $as_echo "#define USENEOSIM 1" >>confdefs.h with_nrnjava=yes else echo "Do not compile neosim specific code." fi fi # Check whether --enable-ncs was given. if test "${enable_ncs+set}" = set; then : enableval=$enable_ncs; if test "$enable_ncs" = "yes" ; then if test "$with_neosim" = "yes" ; then as_fn_error $? "Cannot combine enable-ncs and with-neosim" "$LINENO" 5 else echo "Allow NCS to use NEURON." $as_echo "#define USENCS 1" >>confdefs.h fi else echo "Do not compile NCS specific code." fi fi # Check whether --with-nrnjava was given. if test "${with_nrnjava+set}" = set; then : withval=$with_nrnjava; if test "$with_nrnjava" = "no" ; then echo "Not building the nrnjava interface" build_nrnjava=no else build_nrnjava=yes fi fi if test "$build_nrnjava" = "yes" ; then echo "Build the nrnjava interface" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$JAVAC" = "" ; then JAVAC=javac fi if test "$JAVA" = "" ; then JAVA=java fi if test "$JAVAH" = "" ; then JAVAH=javah fi if test "$JNI_INCLUDE_FLAGS" = "" ; then JNI_INCLUDE_DIRS="" test "x$JAVAC" = x && as_fn_error $? "'$JAVAC' undefined" "$LINENO" 5 # Extract the first word of "$JAVAC", so it can be a program name with args. set dummy $JAVAC; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path__ACJNI_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else case $_ACJNI_JAVAC in [\\/]* | ?:[\\/]*) ac_cv_path__ACJNI_JAVAC="$_ACJNI_JAVAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path__ACJNI_JAVAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path__ACJNI_JAVAC" && ac_cv_path__ACJNI_JAVAC="no" ;; esac fi _ACJNI_JAVAC=$ac_cv_path__ACJNI_JAVAC if test -n "$_ACJNI_JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ACJNI_JAVAC" >&5 $as_echo "$_ACJNI_JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test "x$_ACJNI_JAVAC" = xno && as_fn_error $? "$JAVAC could not be found in path" "$LINENO" 5 # find the include directory relative to the javac executable _cur=""$_ACJNI_JAVAC"" while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking symlink for $_cur" >&5 $as_echo_n "checking symlink for $_cur... " >&6; } _slink=`ls -ld "$_cur" | sed 's/.* -> //'` case "$_slink" in /*) _cur="$_slink";; # 'X' avoids triggering unwanted echo options. *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[^/]*$::'`"$_slink";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cur" >&5 $as_echo "$_cur" >&6; } done _ACJNI_FOLLOWED="$_cur" _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[^/]*$::'` case "$host_os" in darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'` _JINC="$_JTOPDIR/Headers";; *) _JINC="$_JTOPDIR/include";; esac if test -f "$_JINC/jni.h"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC" else _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'` if test -f "$_JTOPDIR/include/jni.h"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include" else as_fn_error $? "cannot find java include files" "$LINENO" 5 fi fi # get the likely subdirectories for system specific java includes # Hines added cygwin. The example was for /cygdrive/c/j2sdk1.4.1_02 case "$host_os" in bsdi*) _JNI_INC_SUBDIRS="bsdos";; linux*) _JNI_INC_SUBDIRS="linux genunix";; osf*) _JNI_INC_SUBDIRS="alpha";; solaris*) _JNI_INC_SUBDIRS="solaris";; cygwin*) _JNI_INC_SUBDIRS="win32";; *) _JNI_INC_SUBDIRS="genunix";; esac # add any subdirectories that are present for JINCSUBDIR in $_JNI_INC_SUBDIRS do if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" fi done JNI_INCLUDE_DIR="" for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS ; do JNI_INCLUDE_FLAGS="$JNI_INCLUDE_FLAGS -I$JNI_INCLUDE_DIR" done JDKDIR="$_JTOPDIR" fi echo "JDKDIR=$JDKDIR" jvm_do_test=yes if test $host_os = cygwin ; then jvm_do_test=no $as_echo "#define USEJVM 2" >>confdefs.h $as_echo "#define USENRNJAVA 1" >>confdefs.h fi if test "$JVM_LIB_FLAGS" = "" ; then case "$host_os" in darwin*) JVM_LIB_FLAGS="-framework JavaVM" JVM_RPATH="" ;; cygwin*) JVM_LIB_FLAGS="" JVM_RPATH="" ;; *) if test -z "$JVMLIBDIR" ; then if test -z "$JDKDIR" ; then echo "Cannot determine JVMLIBDIR without JDKDIR" exit 1 fi xjava=`find $JDKDIR/jre -name libjvm\* -print|sed -n 1p` echo "Found a path to the libjvm" echo "$xjava" xjava=`echo $xjava | sed -n 's;\(.*\)/libjvm.*;\1;p'` JVMLIBDIR=$xjava echo "Determined JVMLIBDIR=$JVMLIBDIR" fi JLIBDIR=`echo $JVMLIBDIR | sed 's;/[^/]*$;;'` echo "JLIBDIR=$JLIBDIR" JVM_LIB_FLAGS="-L$JLIBDIR -L$JVMLIBDIR -ljvm -lpthread" JVM_RPATH="-R $JLIBDIR -R $JVMLIBDIR" ;; esac fi echo "Using JNI_INCLUDE_FLAGS=\"${JNI_INCLUDE_FLAGS}\"" echo "Using JVM_LIB_FLAGS=\"${JVM_LIB_FLAGS}\"" if test $jvm_do_test = "yes" ; then JCFLAGS="$JNI_INCLUDE_FLAGS" JLFLAGS="$JVM_LIB_FLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking whether the java 2 virtual machine can be created" >&5 $as_echo_n "checking checking whether the java 2 virtual machine can be created... " >&6; } xLD_LIBRARY_PATH=${LD_LIBRARY_PATH} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JLIBDIR}:${JVMLIBDIR}" export LD_LIBRARY_PATH zzzCFLAGS=$CFLAGS zzzLIBS=$LIBS CFLAGS="$CFLAGS $JCFLAGS" LIBS="$JLFLAGS $LIBS" if test "$cross_compiling" = yes; then : echo "cross compiling not allowed." exit 1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { jint res; void* jenv; JavaVM* jvm; JavaVMInitArgs args; args.version = JNI_VERSION_1_2; args.nOptions = 0; args.options = 0; args.ignoreUnrecognized = JNI_FALSE; res = JNI_CreateJavaVM(&jvm, &jenv, &args); printf("JNI_CreateJavaVM returned %d\n", res); if (res < 0) { exit(res); }else{ exit(0); } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo "The present configuration allows initialization of the java 2 virtual" echo " machine to succeed." jvmcreate=yes else echo "The test program that tests initialization of the java 2 virtual machine," echo " failed. See config.log ." echo " It may be that linking requires some more -l libraries" echo " or extended LD_LIBRARY_PATH" echo " or perhaps the java vm is not JNI_VERSION_1_2." jvmcreate=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi echo "JCFLAGS=${JCFLAGS}" echo "JLFLAGS=${JLFLAGS}" CFLAGS=$zzzCFLAGS LIBS=$zzzLIBS LD_LIBRARY_PATH=${xLD_LIBRARY_PATH} export LD_LIBRARY_PATH if test "$jvmcreate" = "no" ; then JCFLAGS="$JNI_INCLUDE_FLAGS" JLFLAGS="$JVM_LIB_FLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking whether the java 1 virtual machine can be created" >&5 $as_echo_n "checking checking whether the java 1 virtual machine can be created... " >&6; } xLD_LIBRARY_PATH=${LD_LIBRARY_PATH} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JLIBDIR}:${JVMLIBDIR}" export LD_LIBRARY_PATH zzzCFLAGS=$CFLAGS CFLAGS="$CFLAGS $JCFLAGS $JLFLAGS" if test "$cross_compiling" = yes; then : echo "cross compiling not allowed." exit 1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { jint res; void* jenv; JavaVM* jvm; JDK1_1InitArgs args; args.version = 0x00010001; JNI_GetDefaultJavaVMInitArgs(&args); res = JNI_CreateJavaVM(&jvm, &jenv, &args); printf("JNI_CreateJavaVM returned %d\n", res); if (res < 0) { exit(res); }else{ exit(0); } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo "The present configuration allows initialization of the java 1 virtual" echo " machine to succeed." jvmcreate=yes else echo "The test program that tests initialization of the java 1 virtual machine," echo " failed. See config.log ." echo " It may be that linking requires some more -l libraries" echo " or extended LD_LIBRARY_PATH" echo " or perhaps the java vm is not 0x00010001." jvmcreate=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi echo "JCFLAGS=${JCFLAGS}" echo "JLFLAGS=${JLFLAGS}" CFLAGS=$zzzCFLAGS LD_LIBRARY_PATH=${xLD_LIBRARY_PATH} export LD_LIBRARY_PATH if test "$jvmcreate" = "no" ; then echo "Assuming that the test failed because" echo "JVMLIBS=\"${JVMLIBS}\"" echo "is missing some paths and/or libraries", look echo "for examples of machine and java specific values for JVMLIBS in" echo "ftp://ftp.neuron.yale.edu/neuron/unix/jvmlibs" echo "If you don't see yours in the list and you figure out the" echo "correct value send it to me at michael.hines@yale.edu." exit 1 else $as_echo "#define USEJVM 1" >>confdefs.h $as_echo "#define USENRNJAVA 1" >>confdefs.h fi else $as_echo "#define USEJVM 2" >>confdefs.h $as_echo "#define USENRNJAVA 1" >>confdefs.h fi fi if test "$java_dlopen" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Use the dlopen technique to load the jvm" >&5 $as_echo "$as_me: Use the dlopen technique to load the jvm" >&6;} $as_echo "#define JVM_DLOPEN 1" >>confdefs.h NRNJAVA_LIBS="-lnrnjava" NRNJAVA_LIBLA="../nrnjava/libnrnjava.la" else NRNJAVA_LIBS="-lnrnjava $JLFLAGS $JVM_RPATH" NRNJAVA_LIBLA="../nrnjava/libnrnjava.la $JLFLAGS $JVM_RPATH" fi NRNJAVA_DEP="../nrnjava/libnrnjava.la" if test "x$CLASSPATH" = x; then echo "You have no CLASSPATH, I hope it is good" else echo "You have CLASSPATH $CLASSPATH, hope it is correct" fi if test "x$JAVAPREFIX" = x; then test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done else test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC="$JAVAPREFIX" fi test "x$JAVAC" = x && as_fn_error $? "no acceptable Java compiler found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC works" >&5 $as_echo_n "checking if $JAVAC works... " >&6; } if ${ac_cv_prog_javac_works+:} false; then : $as_echo_n "(cached) " >&6 else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST /* #line 21244 "configure" */ public class Test { } EOF if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } >/dev/null 2>&1; then ac_cv_prog_javac_works=yes else as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 fi rm -f $JAVA_TEST $CLASS_TEST fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_works" >&5 $as_echo "$ac_cv_prog_javac_works" >&6; } if test x$JAVAPREFIX = x; then test x$JAVA = x && for ac_prog in kaffe$EXEEXT java$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA"; then ac_cv_prog_JAVA="$JAVA" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVA=$ac_cv_prog_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVA" && break done else test x$JAVA = x && for ac_prog in kaffe$EXEEXT java$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA"; then ac_cv_prog_JAVA="$JAVA" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVA=$ac_cv_prog_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVA" && break done test -n "$JAVA" || JAVA="$JAVAPREFIX" fi test x$JAVA = x && as_fn_error $? "no acceptable Java virtual machine found in \$PATH" "$LINENO" 5 # Extract the first word of "uudecode$EXEEXT", so it can be a program name with args. set dummy uudecode$EXEEXT; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_uudecode+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$uudecode"; then ac_cv_prog_uudecode="$uudecode" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_uudecode="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi uudecode=$ac_cv_prog_uudecode if test -n "$uudecode"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $uudecode" >&5 $as_echo "$uudecode" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$uudecode = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uudecode can decode base 64 file" >&5 $as_echo_n "checking if uudecode can decode base 64 file... " >&6; } if ${ac_cv_prog_uudecode_base64+:} false; then : $as_echo_n "(cached) " >&6 else cat << \EOF > Test.uue begin-base64 644 Test.class yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= ==== EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else echo "configure: 21416: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: failed file was:" >&5 cat Test.uue >&5 ac_cv_prog_uudecode_base64=no fi rm -f Test.uue fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_uudecode_base64" >&5 $as_echo "$ac_cv_prog_uudecode_base64" >&6; } fi if test x$ac_cv_prog_uudecode_base64 != xyes; then rm -f Test.class { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I have to compile Test.class from scratch" >&5 $as_echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;} if test x$ac_cv_prog_javac_works = xno; then as_fn_error $? "Cannot compile java source. $JAVAC does not work properly" "$LINENO" 5 fi if test x$ac_cv_prog_javac_works = x; then if test "x$JAVAPREFIX" = x; then test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done else test "x$JAVAC" = x && for ac_prog in "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC="$JAVAPREFIX" fi test "x$JAVAC" = x && as_fn_error $? "no acceptable Java compiler found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC works" >&5 $as_echo_n "checking if $JAVAC works... " >&6; } if ${ac_cv_prog_javac_works+:} false; then : $as_echo_n "(cached) " >&6 else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST /* #line 21534 "configure" */ public class Test { } EOF if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } >/dev/null 2>&1; then ac_cv_prog_javac_works=yes else as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 fi rm -f $JAVA_TEST $CLASS_TEST fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_works" >&5 $as_echo "$ac_cv_prog_javac_works" >&6; } fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVA works" >&5 $as_echo_n "checking if $JAVA works... " >&6; } if ${ac_cv_prog_java_works+:} false; then : $as_echo_n "(cached) " >&6 else JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST /* [#]line 21569 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); } } EOF if test x$ac_cv_prog_uudecode_base64 != xyes; then if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } && test -s $CLASS_TEST; then : else echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 fi fi if { ac_try='$JAVA $JAVAFLAGS $TEST' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } >/dev/null 2>&1; then ac_cv_prog_java_works=yes else echo "configure: failed program was:" >&5 cat $JAVA_TEST >&5 as_fn_error $? "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5 fi rm -fr $JAVA_TEST $CLASS_TEST Test.uue fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_java_works" >&5 $as_echo "$ac_cv_prog_java_works" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else NRNJAVA_LIBS="" NRNJAVA_LIBLA="" NRNJAVA_DEP="" fi if test "$CYGWIN" = "yes" ; then no_x=yes echo " CYGWIN and no X11 so make MSWwin version" build_cygwin=yes $as_echo "#define CYGWIN /**/" >>confdefs.h if test "$marshal_dir" = "" ; then #do not change without changing instal.sh and nrnsetup.nsi marshal_dir=/cygdrive/c/marshalnrn binsuffix="" fi if test "$LDFLAGS" = "" ; then LDFLAGS='-Wl,--enable-auto-import' fi { $as_echo "$as_me:${as_lineno-$LINENO}: 'make mswin' will marshal for building the installer in the marshal_dir = $marshal_dir" >&5 $as_echo "$as_me: 'make mswin' will marshal for building the installer in the marshal_dir = $marshal_dir" >&6;} elif test "$MINGW" = "yes" ; then no_x=yes echo " MINGW and no X11 so make MSWwin version" build_mingw=yes $as_echo "#define MINGW /**/" >>confdefs.h if test "$marshal_dir" = "" ; then #do not change without changing instalmingw.sh # and nrnsetupmingw.nsi if test "$host_cpu" = x86_64 ; then marshal_dir='c:/marshalnrn64' dos_marshal_dir='c:\marshalnrn64' binsuffix="" nrnskip_rebase='#' else marshal_dir='c:/marshalnrn' dos_marshal_dir='c:\marshalnrn' binsuffix="" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: 'make mswin' will marshal for building the installer in the marshal_dir = $marshal_dir" >&5 $as_echo "$as_me: 'make mswin' will marshal for building the installer in the marshal_dir = $marshal_dir" >&6;} elif test "$enable_carbon" = "yes" ; then no_x=yes echo "Make the carbon version on max os x" $as_echo "#define carbon 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi if test "$no_x" = "" ; then X_LIBS="$X_LIBS -lX11" fi fi # Check whether --enable-realtime was given. if test "${enable_realtime+set}" = set; then : enableval=$enable_realtime; if test "$enable_realtime" = "yes" ; then $as_echo "#define NRN_REALTIME 1" >>confdefs.h if test "$NRN_REALTIME_INCLUDE" = "" ; then NRN_REALTIME_INCLUDE="-I/home/hines/rtlinux/realtime/include" fi if test "$NRN_REALTIME_LIB" = "" ; then NRN_REALTIME_LIB="-L/home/hines/rtlinux/realtime/lib -llxrt -lpthread" fi LIBS="$LIBS $NRN_REALTIME_LIB" fi fi # Check whether --enable-NI6229 was given. if test "${enable_NI6229+set}" = set; then : enableval=$enable_NI6229; NIDDK="/home/hines/rtlinux/ni/niddk" NRNNI_LIBS="-lni6229" NRNNI_LIBLA="../ni_pci_6229/libni6229.la" NRNNI_DEP="../ni_pci_6229/libni6229.la" $as_echo "#define NRN_6229 1" >>confdefs.h else NIDDK="" NRNNI_LIBLA="" NRNNI_LIBS="" NRNNI_DEP="" fi if test x$enable_NI6229 = xyes; then BUILD_6229_TRUE= BUILD_6229_FALSE='#' else BUILD_6229_TRUE='#' BUILD_6229_FALSE= fi if test "$enable_MikeNeubig" = "yes" ; then $as_echo "#define MikeNeubig 1" >>confdefs.h fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in fcntl.h limits.h malloc.h sgtty.h strings.h sys/file.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/ioctl.h sys/time.h termio.h unistd.h stdarg.h varargs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stropts.h sys/conf.h locale.h fenv.h pthread.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$use_pthread" != "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_cond_t cond; pthread_cond_init(&cond, (void*)0); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define USE_PTHREAD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: Using pthreads." >&5 $as_echo "$as_me: Using pthreads." >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: Have pthread.h but not using threads." >&5 $as_echo "$as_me: Have pthread.h but not using threads." >&6;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 $as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; -*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_acx_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_acx_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 $as_echo "$acx_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 $as_echo_n "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=$attr; return attr; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : attr_name=$attr; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 $as_echo "$attr_name" >&6; } if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<_ACEOF #define PTHREAD_CREATE_JOINABLE $attr_name _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then for ac_prog in xlc_r cc_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 $as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: successful." >&5 $as_echo "$as_me: successful." >&6;} echo "PTHREAD_LIBS=$PTHREAD_LIBS" echo "PTHREAD_CFLAGS=$PTHREAD_CFLAGS" echo "PTHREAD_CC=$PTHREAD_CC" : else acx_pthread_ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: did not succeed." >&5 $as_echo "$as_me: did not succeed." >&6;} fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi for ac_header in float.h math.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done $as_echo "#define SUNDIALS_DOUBLE_PRECISION 1" >>confdefs.h $as_echo "#define SUNDIALS_USE_GENERIC_MATH 1" >>confdefs.h ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_header in stream.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "stream.h" "ac_cv_header_stream_h" "$ac_includes_default" if test "x$ac_cv_header_stream_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STREAM_H 1 _ACEOF fi done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in ftime getcwd getpw gethostname gettimeofday mkdir putenv setenv select strdup strstr index bzero bcopy stty lockf isatty mkstemp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setitimer sigaction fesetround posix_memalign mallinfo do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIGBUS defined in signal.h" >&5 $as_echo_n "checking if SIGBUS defined in signal.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { signal(SIGBUS, SIG_DFL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_SIGBUS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIGSEGV defined in signal.h" >&5 $as_echo_n "checking if SIGSEGV defined in signal.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { signal(SIGSEGV, SIG_DFL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_SIGSEGV 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi for ac_header in _G_config.h do : ac_fn_c_check_header_mongrel "$LINENO" "_G_config.h" "ac_cv_header__G_config_h" "$ac_includes_default" if test "x$ac_cv_header__G_config_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__G_CONFIG_H 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #define myfabs ::fabs int main () { double d; d = -25.0; d = myfabs(d); return (d == 25.0)?0:1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ivos_fabs="::fabs" else ivos_fabs="" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ivos_fabs" = "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #define myfabs std::fabs int main () { double d; d = -25.0; d = myfabs(d); return (d == 25.0)?0:1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ivos_fabs="std::fabs" else ivos_fabs="" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$ivos_fabs" != "" ; then cat >>confdefs.h <<_ACEOF #define IVOS_FABS $ivos_fabs _ACEOF fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include float abs(float arg); inline float abs(float arg) { return (arg < 0.0)? -arg : arg; } int main () { return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define INLINE_FLOAT_ABS 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include long abs(long arg); inline long abs(long arg) { return (arg < 0.0)? -arg : arg; } int main () { return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define INLINE_LONG_ABS 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler implements namespaces" >&5 $as_echo_n "checking whether the compiler implements namespaces... " >&6; } if ${ac_cv_cxx_namespaces+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace Outer { namespace Inner { int i = 0; }} int main () { using namespace Outer::Inner; return i; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_namespaces=yes else ac_cv_cxx_namespaces=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespaces" >&5 $as_echo "$ac_cv_cxx_namespaces" >&6; } if test "$ac_cv_cxx_namespaces" = yes; then $as_echo "#define HAVE_NAMESPACES /**/" >>confdefs.h fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler has stringstream" >&5 $as_echo_n "checking whether the compiler has stringstream... " >&6; } if ${ac_cv_cxx_have_sstream+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { stringstream message; message << "Hello"; return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_sstream=yes else ac_cv_cxx_have_sstream=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_sstream" >&5 $as_echo "$ac_cv_cxx_have_sstream" >&6; } if test "$ac_cv_cxx_have_sstream" = yes; then $as_echo "#define HAVE_SSTREAM /**/" >>confdefs.h fi if test "$with_iv" = ""; then with_iv=yes # Enable interviews by default. fi if test "$with_nrniv" = ""; then with_nrniv=yes # Enable nrniv by default fi use_ivos=no build_nrniv=yes # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; if test "$with_x" = "no"; then echo "disable everything depending on x11" use_ivos=yes with_iv=no with_nrnoc_x11=no fi fi # Check whether --with-nrniv was given. if test "${with_nrniv+set}" = set; then : withval=$with_nrniv; if test "$with_nrniv" = "no" ; then echo "Not building nrniv and" echo "not building in any subdirectories that are only" echo "needed by nrniv" HAVE_IV=0 IV_LIBS="" IV_DIR="" IV_INCLUDE="" IV_LIBS_LIBTOOL="" build_nrniv=no fi fi if test "$build_nrniv" = "yes" ; then # Check whether --with-iv was given. if test "${with_iv+set}" = set; then : withval=$with_iv; HAVE_IV=1 IVHINES=IVhines if test "$with_iv" = "no" ; then HAVE_IV=0 IVHINES=ivos echo "Not compiling with interviews." elif test "$with_iv" = "yes" ; then # look in default places echo "Looking for InterViews in the usual places--" xprefix=`echo "$prefix" | sed 's;/[^/]*$;;'` if test -d $xprefix/iv ; then IV_DIR=$xprefix/iv IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib if test ! -d $IV_LIBDIR ; then IV_LIBDIR="$IV_DIR"/lib fi IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la" IV_INCLUDE=-I$IV_DIR/include elif test -d /usr/local/iv ; then echo " not in $IV_DIR" IV_DIR=/usr/local/iv IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib if test ! -d $IV_LIBDIR ; then IV_LIBDIR="$IV_DIR"/lib fi IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la" IV_INCLUDE=-I$IV_DIR/include else echo " not in $IV_DIR" IV_LIBS="-lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBS" fi if test -n "$IV_DIR" ; then echo "Assuming top level iv directory at $IV_DIR" echo " and libraries in $IV_LIBDIR" else echo "Assuming InterViews in a standard? place." fi else # Location specified IV_DIR=$with_iv IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib if test ! -d $IV_LIBDIR ; then IV_LIBDIR="$IV_DIR"/lib fi IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la" IV_INCLUDE=-I$IV_DIR/include fi if test "$enable_carbon" = "yes" ; then IV_LIBS="$IV_LIBS -framework Carbon" IV_LIBS_LIBTOOL="$IV_LIBS_LIBTOOL -framework Carbon" fi if test "$HAVE_IV" = 1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation with interviews" >&5 $as_echo_n "checking compilation with interviews... " >&6; } xLIBS=$LIBS LIBS="$IV_LIBS $LIBS" xCXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $IV_INCLUDE" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "OS/string.h" int main () { String xyz; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else cat << EOF failed I can't compile and/or link an interviews program. If InterViews is not installed in /usr or /usr/local or /usr/local/iv, specify the proper location of the interviews tree using configure --with-iv=/where/you/put/iv The interviews headers should be in subdirectories of /where/you/put/iv/include, and the libraries should be in /where/you/put/iv/lib or /where/you/put/iv/${host_cpu}/lib (not in /where/you/put/iv/lib/ALPHA or /where/you/put/iv/lib/LINUX or some other subdirectory of lib). If you don't want interviews, but do want nrniv built with the non-gui c++ classes then specify configure --without-iv. EOF exit 1 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if InterViews is up to date with respect to nrn-7.4 and later" >&5 $as_echo_n "checking if InterViews is up to date with respect to nrn-7.4 and later... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if (iv_hines_version < 19) #error InterViews version is iv_hines_version #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else cat << EOF failed The installed version of InterViews is out of date. Install iv-19.tar.gz EOF exit 1 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$xCXXFLAGS LIBS=$xLIBS fi fi fi if test "$build_nrniv" = "yes" ; then if test "$HAVE_IV" = 0 ; then echo "Building nrniv only with classes that do not depend on InterViews." use_ivos=yes IV_DIR="" IV_LIBS="$X_LIBS" IV_LIBS_LIBTOOL="$X_LIBS" IV_INCLUDE='-I$(top_srcdir)/src/ivos' IVOS_DIR="../ivos/libivos.la" IVOS_LIB="-livos" fi fi cat >>confdefs.h <<_ACEOF #define HAVE_IV $HAVE_IV _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$nrndef_mac" = "//" -a "$nrndef_mswin" = "//" ; then nrndef_unix="" fi if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = no ; then CFLAGS="$mlh_CFLAGS" CXXFLAGS="$mlh_CXXFLAGS" fi fi case "$exec_prefix" in NONE*) exec_prefix="${prefix}/${host_cpu}" ;; esac if test "$modsubdir" = "" ; then modsubdir=$host_cpu fi cat >>confdefs.h <<_ACEOF #define NRNHOSTCPU "$host_cpu" _ACEOF NRN_LIBDIR=$exec_prefix/lib if test x$build_readline = xyes; then BUILD_READLINE_TRUE= BUILD_READLINE_FALSE='#' else BUILD_READLINE_TRUE='#' BUILD_READLINE_FALSE= fi if test x$build_nrnjava = xyes; then BUILD_NRNJAVA_TRUE= BUILD_NRNJAVA_FALSE='#' else BUILD_NRNJAVA_TRUE='#' BUILD_NRNJAVA_FALSE= fi if test x$build_nrniv = xyes; then BUILD_NRNIV_TRUE= BUILD_NRNIV_FALSE='#' else BUILD_NRNIV_TRUE='#' BUILD_NRNIV_FALSE= fi if test x$use_ivos = xyes; then BUILD_IVOS_TRUE= BUILD_IVOS_FALSE='#' else BUILD_IVOS_TRUE='#' BUILD_IVOS_FALSE= fi if test x$use_paranrn = xyes; then BUILD_PARANEURON_TRUE= BUILD_PARANEURON_FALSE='#' else BUILD_PARANEURON_TRUE='#' BUILD_PARANEURON_FALSE= fi if test x$nrnmpi_dynamic = xyes; then BUILD_NRNMPI_DYNAMIC_TRUE= BUILD_NRNMPI_DYNAMIC_FALSE='#' else BUILD_NRNMPI_DYNAMIC_TRUE='#' BUILD_NRNMPI_DYNAMIC_FALSE= fi if test x$build_cygwin = xyes; then BUILD_CYGWIN_TRUE= BUILD_CYGWIN_FALSE='#' else BUILD_CYGWIN_TRUE='#' BUILD_CYGWIN_FALSE= fi if test x$build_mingw = xyes; then BUILD_MINGW_TRUE= BUILD_MINGW_FALSE='#' else BUILD_MINGW_TRUE='#' BUILD_MINGW_FALSE= fi if test x$build_nrnpython = xyes; then BUILD_NRNPYTHON_TRUE= BUILD_NRNPYTHON_FALSE='#' else BUILD_NRNPYTHON_TRUE='#' BUILD_NRNPYTHON_FALSE= fi if test x$build_nrnpython_dynamic = xyes; then BUILD_NRNPYTHON_DYNAMIC_TRUE= BUILD_NRNPYTHON_DYNAMIC_FALSE='#' else BUILD_NRNPYTHON_DYNAMIC_TRUE='#' BUILD_NRNPYTHON_DYNAMIC_FALSE= fi if test -z "$mlh_yacc" ; then case "$host" in alpha-cray-unicosmk* ) echo "Setting YACC=yacc since bison once didn't work on this machine at SDSC" YACC=yacc ;; esac fi case "$host" in alpha-cray-unicosmk* ) echo "Touching *.y and *.l since on this machine the distributed" echo "c files may not compile." touch `find . -name \*.\[yl\] -print` ;; esac if test -z "$mlh_cxxflag" ; then if test "$GXX"='yes' ; then zzz="`$CXX -v 2>&1 | sed -n '2s/ /_/gp'`" case "$zzz" in *version_2.8.1 ) echo "Compiling several c++ files will fail with an internal error" echo "because of a g++-2.8.1 optimization bug. Setting CXXFLAGS=-g" CXXFLAGS=-g ;; esac fi fi if test -z "$mlh_ldflag" ; then case "$host_os" in irix6* ) echo "This machine gives so many ld warnings that it fails. So:" echo "setting LDFLAGS=-w" LDFLAGS="$LDFLAGS -w" ;; darwin6* ) LDFLAGS="$LDFLAGS -Wl,-bind_at_load" echo "This machine requires LDFLAGS=$LDFLAGS" ;; esac fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include RETSIGTYPE sighand(int) {} int main () { signal(SIGUSR1, sighand); return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : echo "The signal function does not need a cast for the handler" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include RETSIGTYPE sighand(int) {} int main () { signal(SIGUSR1, (RETSIGTYPE(*)(...))sighand); return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define SIGNAL_CAST RETSIGTYPE(*)(...)" >>confdefs.h echo "The signal function needs a cast to RETSIGTYPE(*)(...) for the handler" else echo "The signal function needs an unknown cast for the handler" echo "Neither RETSIGTYPE (*)(int) or RETSIGTYPE (*)(...) are correct prototypes." fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case "$host_os" in darwin*) LDFLAGS="$LDFLAGS -headerpad_max_install_names" ;; esac xLIBS="$LIBS" if test "$use_mpi" = "no" ; then as_ac_Header=`$as_echo "ac_cv_header_$PVM_ROOT/include/pvm3.h" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$PVM_ROOT/include/pvm3.h" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : PVM_INCLUDES='-I${PVM_ROOT}/include' PVM_XTRA_LIBS="`sed -n '/^ARCHLIB/s/[^-]*//p' ${PVM_ROOT}/conf/${PVM_ARCH}.def`" echo "PVM_XTRA_LIBS=$PVM_XTRA_LIBS" PVM_LIBS='-L${PVM_ROOT}/lib/${PVM_ARCH} -lpvm3' tPVM_LIBS="-L${PVM_ROOT}/lib/${PVM_ARCH} -lpvm3 ${PVM_XTRA_LIBS}" LIBS="$tPVM_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pvm_parent in -lpvm3" >&5 $as_echo_n "checking for pvm_parent in -lpvm3... " >&6; } if ${ac_cv_lib_pvm3_pvm_parent+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpvm3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pvm_parent (); int main () { return pvm_parent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pvm3_pvm_parent=yes else ac_cv_lib_pvm3_pvm_parent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pvm3_pvm_parent" >&5 $as_echo "$ac_cv_lib_pvm3_pvm_parent" >&6; } if test "x$ac_cv_lib_pvm3_pvm_parent" = xyes; then : $as_echo "#define HAVE_PVM3_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pvm_pkmesg in -lpvm3" >&5 $as_echo_n "checking for pvm_pkmesg in -lpvm3... " >&6; } if ${ac_cv_lib_pvm3_pvm_pkmesg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpvm3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pvm_pkmesg (); int main () { return pvm_pkmesg (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pvm3_pvm_pkmesg=yes else ac_cv_lib_pvm3_pvm_pkmesg=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pvm3_pvm_pkmesg" >&5 $as_echo "$ac_cv_lib_pvm3_pvm_pkmesg" >&6; } if test "x$ac_cv_lib_pvm3_pvm_pkmesg" = xyes; then : $as_echo "#define HAVE_PKMESG 1" >>confdefs.h fi else echo "There is a pvm3.h but I can't link with -lpvm3" echo "So not using pvm afterall." PVM_INCLUDES="" PVM_LIBS="" tPVM_LIBS="" case "$host_os" in irix6* ) echo "This is a $host so if you want to use ParallelContext under PVM" echo "you probably need to rebuild" echo "everything (including interviews) with the environment variables" if test "$GCC"='yes' ; then echo setenv CC '"'"$CC -mabi=64"'"' else echo setenv CC '"'"$CC -64"'"' fi if test "$GXX"='yes' ; then echo setenv CXX '"'"$CXX -mabi=64"'"' else echo setenv CXX '"'"$CXX -64"'"' fi ;; esac fi LIBS="$xLIBS" fi else PVM_INCLUDES="" PVM_LIBS="" tPVM_LIBS="" PVM_XTRA_LIBS="" fi echo ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$cross_compiling" = yes; then : echo "cross compiling: Assume HAVE_SIGPOLL is 0" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include int main() { int fd, arg; sighold(SIGPOLL); fd = fileno(popen("ls", "r")); if (ioctl(fd, I_GETSIG, &arg) < 0 && errno != EINVAL) { exit(1); } exit(0); return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : $as_echo "#define HAVE_SIGPOLL 1" >>confdefs.h echo "do SIGPOLL and I_GETSIG work: yes" else echo "do SIGPOLL and I_GETSIG work: no" echo " But see config.log to see why it failed." fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports Standard Template Library" >&5 $as_echo_n "checking whether the compiler supports Standard Template Library... " >&6; } if ${ac_cv_cxx_have_stl+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { list x; x.push_back(5); list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_stl=yes else ac_cv_cxx_have_stl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_stl" >&5 $as_echo "$ac_cv_cxx_have_stl" >&6; } if test "$ac_cv_cxx_have_stl" = yes; then $as_echo "#define HAVE_STL /**/" >>confdefs.h fi cat >>confdefs.h <<_ACEOF #define NEURON_DATA_DIR "$prefix/share/$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define NRNHOST "$host" _ACEOF cat >>confdefs.h <<_ACEOF #define NRN_CONFIG_ARGS "${ac_configure_args}" _ACEOF NRNOC_X11=1 if test "$with_nrnoc_x11" = "" ; then with_nrnoc_x11=yes fi # Check whether --with-nrnoc-x11 was given. if test "${with_nrnoc_x11+set}" = set; then : withval=$with_nrnoc_x11; if test "$with_nrnoc_x11" = "no" ; then NRNOC_X11=0 fi fi if test "$no_x" = "yes" ; then NRNOC_X11=0 fi echo "NRNOC_X11 = $NRNOC_X11" cat >>confdefs.h <<_ACEOF #define NRNOC_X11 $NRNOC_X11 _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile" if test "$nmodl_build" = "yes" ; then ac_config_headers="$ac_config_headers nmodlconf.h" ac_config_files="$ac_config_files src/modlunit/Makefile src/nmodl/Makefile" fi if test "$with_nmodl_only" != "yes"; then ac_config_headers="$ac_config_headers src/nrnpython/nrnpython_config.h" ac_config_files="$ac_config_files src/nrnpython/Makefile src/mswin/nrncygso.sh src/nrnpython/setup.py share/lib/python/neuron/rxd/geometry3d/Makefile share/lib/python/neuron/rxd/geometry3d/setup.py" fi if test "$with_nmodl_only" != "yes" -a "$with_nrnpython_only" != "yes" ; then ac_config_headers="$ac_config_headers nrnconf.h" ac_config_headers="$ac_config_headers src/nrnoc/nrnconfigargs.h" ac_config_headers="$ac_config_headers src/oc/nrnmpiuse.h" ac_config_headers="$ac_config_headers src/oc/nrnrtuse.h" ac_config_headers="$ac_config_headers src/oc/nrnpthread.h" ac_config_headers="$ac_config_headers src/parallel/bbsconf.h" ac_config_headers="$ac_config_headers src/nrnjava/njconf.h" ac_config_headers="$ac_config_headers src/nrncvode/nrnneosm.h" ac_config_headers="$ac_config_headers src/ivos/ivstream.h" ac_config_headers="$ac_config_headers src/sundials/sundials_config.h" ac_config_files="$ac_config_files nrnrpm.spec src/sundials/Makefile src/sundials/shared/Makefile src/sundials/cvodes/Makefile src/sundials/ida/Makefile src/sparse/Makefile src/memacs/Makefile src/readline/Makefile src/sparse13/Makefile src/Random123/Makefile src/oc/Makefile src/scopmath/Makefile src/nrnoc/Makefile src/gnu/Makefile src/uxnrnbbs/Makefile src/mesch/Makefile src/uxnrnbbs/mos2nrn.h src/nrnmpi/Makefile src/ivoc/Makefile src/nrncvode/Makefile src/parallel/Makefile src/nrniv/Makefile src/ivos/Makefile src/ivos/InterViews/Makefile src/ivos/OS/Makefile src/nrnjava/Makefile src/nrnjava/nrnccmb/Makefile src/nrnjava/neuron/Makefile src/ni_pci_6229/Makefile src/mac/Makefile src/mswin/Makefile src/mswin/batch/Makefile src/mac/macdist.pkgproj src/mac/postinstall.sh src/mswin/nrnsetup.nsi src/mswin/lib/mknrndll.mak src/mswin/nrnsetupmingw.nsi src/mswin/EnvVarUpdate.nsh src/mswin/AddToPath.nsh src/mswin/extra/Makefile src/mswin/rdln/Makefile src/mswin/windll/Makefile src/mswin/wnrnbbs/Makefile src/mswin/lib/Makefile src/mswin/bin/Makefile src/neuronmusic/Makefile src/neuronmusic/setup.py share/Makefile bin/nrnoc_makefile bin/nrniv_makefile bin/nrnmech_makefile share/lib/Makefile share/lib/hoc/Makefile share/lib/python/Makefile share/lib/hoc/celbild/Makefile share/lib/hoc/mulfit/Makefile share/lib/hoc/netbild/Makefile share/lib/hoc/lincir/Makefile share/lib/hoc/mview/Makefile share/lib/hoc/chanbild/Makefile share/lib/hoc/import3d/Makefile share/lib/auditscripts/Makefile share/lib/nrn.defaults bin/Makefile bin/nrnocmodl bin/nrnivmodl bin/neurondemo bin/nrngui bin/bbswork.sh bin/mos2nrn2.sh bin/hel2mos1.sh share/examples/Makefile share/examples/ivoc/Makefile share/examples/nrniv/Makefile share/examples/nrniv/cable/Makefile share/examples/nrniv/kkin/Makefile share/examples/nrniv/netcon/Makefile share/examples/nrniv/netsyn/Makefile share/examples/nrniv/nmodl/Makefile share/examples/nrniv/nrnoc/Makefile share/examples/nrniv/randomsyn/Makefile share/examples/nrniv/soma/Makefile share/examples/nrniv/vrecorder/Makefile share/examples/nrniv/xmech/Makefile share/demo/Makefile share/demo/release/Makefile share/demo/dend3/Makefile share/demo/sync/Makefile share/lib/python/neuron/Makefile share/lib/python/neuron/rxd/Makefile" fi test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${UniversalMacBinary_TRUE}" && test -z "${UniversalMacBinary_FALSE}"; then as_fn_error $? "conditional \"UniversalMacBinary\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NMODL_ONLY_TRUE}" && test -z "${NMODL_ONLY_FALSE}"; then as_fn_error $? "conditional \"NMODL_ONLY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NMODL_BUILD_TRUE}" && test -z "${NMODL_BUILD_FALSE}"; then as_fn_error $? "conditional \"NMODL_BUILD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NRNPYTHON_ONLY_TRUE}" && test -z "${NRNPYTHON_ONLY_FALSE}"; then as_fn_error $? "conditional \"NRNPYTHON_ONLY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CARBON_TRUE}" && test -z "${BUILD_CARBON_FALSE}"; then as_fn_error $? "conditional \"BUILD_CARBON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAKE_RPMS_TRUE}" && test -z "${MAKE_RPMS_FALSE}"; then as_fn_error $? "conditional \"MAKE_RPMS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NRN_PYTHON_ON_TRUE}" && test -z "${NRN_PYTHON_ON_FALSE}"; then as_fn_error $? "conditional \"NRN_PYTHON_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CYTHON_TRUE}" && test -z "${HAVE_CYTHON_FALSE}"; then as_fn_error $? "conditional \"HAVE_CYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_RX3D_TRUE}" && test -z "${BUILD_RX3D_FALSE}"; then as_fn_error $? "conditional \"BUILD_RX3D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_NEURONMUSIC_TRUE}" && test -z "${BUILD_NEURONMUSIC_FALSE}"; then as_fn_error $? "conditional \"BUILD_NEURONMUSIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NRNPURIFY_TRUE}" && test -z "${NRNPURIFY_FALSE}"; then as_fn_error $? "conditional \"NRNPURIFY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NRNMECH_DLL_STYLE_TRUE}" && test -z "${NRNMECH_DLL_STYLE_FALSE}"; then as_fn_error $? "conditional \"NRNMECH_DLL_STYLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAC_DARWIN_TRUE}" && test -z "${MAC_DARWIN_FALSE}"; then as_fn_error $? "conditional \"MAC_DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_MEMACS_TRUE}" && test -z "${BUILD_MEMACS_FALSE}"; then as_fn_error $? "conditional \"BUILD_MEMACS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_6229_TRUE}" && test -z "${BUILD_6229_FALSE}"; then as_fn_error $? "conditional \"BUILD_6229\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_READLINE_TRUE}" && test -z "${BUILD_READLINE_FALSE}"; then as_fn_error $? "conditional \"BUILD_READLINE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_NRNJAVA_TRUE}" && test -z "${BUILD_NRNJAVA_FALSE}"; then as_fn_error $? "conditional \"BUILD_NRNJAVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_NRNIV_TRUE}" && test -z "${BUILD_NRNIV_FALSE}"; then as_fn_error $? "conditional \"BUILD_NRNIV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_IVOS_TRUE}" && test -z "${BUILD_IVOS_FALSE}"; then as_fn_error $? "conditional \"BUILD_IVOS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PARANEURON_TRUE}" && test -z "${BUILD_PARANEURON_FALSE}"; then as_fn_error $? "conditional \"BUILD_PARANEURON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_NRNMPI_DYNAMIC_TRUE}" && test -z "${BUILD_NRNMPI_DYNAMIC_FALSE}"; then as_fn_error $? "conditional \"BUILD_NRNMPI_DYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CYGWIN_TRUE}" && test -z "${BUILD_CYGWIN_FALSE}"; then as_fn_error $? "conditional \"BUILD_CYGWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_MINGW_TRUE}" && test -z "${BUILD_MINGW_FALSE}"; then as_fn_error $? "conditional \"BUILD_MINGW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_NRNPYTHON_TRUE}" && test -z "${BUILD_NRNPYTHON_FALSE}"; then as_fn_error $? "conditional \"BUILD_NRNPYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_NRNPYTHON_DYNAMIC_TRUE}" && test -z "${BUILD_NRNPYTHON_DYNAMIC_FALSE}"; then as_fn_error $? "conditional \"BUILD_NRNPYTHON_DYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by nrn $as_me 7.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ nrn config.status 7.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "nmodlconf.h") CONFIG_HEADERS="$CONFIG_HEADERS nmodlconf.h" ;; "src/modlunit/Makefile") CONFIG_FILES="$CONFIG_FILES src/modlunit/Makefile" ;; "src/nmodl/Makefile") CONFIG_FILES="$CONFIG_FILES src/nmodl/Makefile" ;; "src/nrnpython/nrnpython_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/nrnpython/nrnpython_config.h" ;; "src/nrnpython/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrnpython/Makefile" ;; "src/mswin/nrncygso.sh") CONFIG_FILES="$CONFIG_FILES src/mswin/nrncygso.sh" ;; "src/nrnpython/setup.py") CONFIG_FILES="$CONFIG_FILES src/nrnpython/setup.py" ;; "share/lib/python/neuron/rxd/geometry3d/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/python/neuron/rxd/geometry3d/Makefile" ;; "share/lib/python/neuron/rxd/geometry3d/setup.py") CONFIG_FILES="$CONFIG_FILES share/lib/python/neuron/rxd/geometry3d/setup.py" ;; "nrnconf.h") CONFIG_HEADERS="$CONFIG_HEADERS nrnconf.h" ;; "src/nrnoc/nrnconfigargs.h") CONFIG_HEADERS="$CONFIG_HEADERS src/nrnoc/nrnconfigargs.h" ;; "src/oc/nrnmpiuse.h") CONFIG_HEADERS="$CONFIG_HEADERS src/oc/nrnmpiuse.h" ;; "src/oc/nrnrtuse.h") CONFIG_HEADERS="$CONFIG_HEADERS src/oc/nrnrtuse.h" ;; "src/oc/nrnpthread.h") CONFIG_HEADERS="$CONFIG_HEADERS src/oc/nrnpthread.h" ;; "src/parallel/bbsconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/parallel/bbsconf.h" ;; "src/nrnjava/njconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/nrnjava/njconf.h" ;; "src/nrncvode/nrnneosm.h") CONFIG_HEADERS="$CONFIG_HEADERS src/nrncvode/nrnneosm.h" ;; "src/ivos/ivstream.h") CONFIG_HEADERS="$CONFIG_HEADERS src/ivos/ivstream.h" ;; "src/sundials/sundials_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/sundials/sundials_config.h" ;; "nrnrpm.spec") CONFIG_FILES="$CONFIG_FILES nrnrpm.spec" ;; "src/sundials/Makefile") CONFIG_FILES="$CONFIG_FILES src/sundials/Makefile" ;; "src/sundials/shared/Makefile") CONFIG_FILES="$CONFIG_FILES src/sundials/shared/Makefile" ;; "src/sundials/cvodes/Makefile") CONFIG_FILES="$CONFIG_FILES src/sundials/cvodes/Makefile" ;; "src/sundials/ida/Makefile") CONFIG_FILES="$CONFIG_FILES src/sundials/ida/Makefile" ;; "src/sparse/Makefile") CONFIG_FILES="$CONFIG_FILES src/sparse/Makefile" ;; "src/memacs/Makefile") CONFIG_FILES="$CONFIG_FILES src/memacs/Makefile" ;; "src/readline/Makefile") CONFIG_FILES="$CONFIG_FILES src/readline/Makefile" ;; "src/sparse13/Makefile") CONFIG_FILES="$CONFIG_FILES src/sparse13/Makefile" ;; "src/Random123/Makefile") CONFIG_FILES="$CONFIG_FILES src/Random123/Makefile" ;; "src/oc/Makefile") CONFIG_FILES="$CONFIG_FILES src/oc/Makefile" ;; "src/scopmath/Makefile") CONFIG_FILES="$CONFIG_FILES src/scopmath/Makefile" ;; "src/nrnoc/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrnoc/Makefile" ;; "src/gnu/Makefile") CONFIG_FILES="$CONFIG_FILES src/gnu/Makefile" ;; "src/uxnrnbbs/Makefile") CONFIG_FILES="$CONFIG_FILES src/uxnrnbbs/Makefile" ;; "src/mesch/Makefile") CONFIG_FILES="$CONFIG_FILES src/mesch/Makefile" ;; "src/uxnrnbbs/mos2nrn.h") CONFIG_FILES="$CONFIG_FILES src/uxnrnbbs/mos2nrn.h" ;; "src/nrnmpi/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrnmpi/Makefile" ;; "src/ivoc/Makefile") CONFIG_FILES="$CONFIG_FILES src/ivoc/Makefile" ;; "src/nrncvode/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrncvode/Makefile" ;; "src/parallel/Makefile") CONFIG_FILES="$CONFIG_FILES src/parallel/Makefile" ;; "src/nrniv/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrniv/Makefile" ;; "src/ivos/Makefile") CONFIG_FILES="$CONFIG_FILES src/ivos/Makefile" ;; "src/ivos/InterViews/Makefile") CONFIG_FILES="$CONFIG_FILES src/ivos/InterViews/Makefile" ;; "src/ivos/OS/Makefile") CONFIG_FILES="$CONFIG_FILES src/ivos/OS/Makefile" ;; "src/nrnjava/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrnjava/Makefile" ;; "src/nrnjava/nrnccmb/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrnjava/nrnccmb/Makefile" ;; "src/nrnjava/neuron/Makefile") CONFIG_FILES="$CONFIG_FILES src/nrnjava/neuron/Makefile" ;; "src/ni_pci_6229/Makefile") CONFIG_FILES="$CONFIG_FILES src/ni_pci_6229/Makefile" ;; "src/mac/Makefile") CONFIG_FILES="$CONFIG_FILES src/mac/Makefile" ;; "src/mswin/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/Makefile" ;; "src/mswin/batch/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/batch/Makefile" ;; "src/mac/macdist.pkgproj") CONFIG_FILES="$CONFIG_FILES src/mac/macdist.pkgproj" ;; "src/mac/postinstall.sh") CONFIG_FILES="$CONFIG_FILES src/mac/postinstall.sh" ;; "src/mswin/nrnsetup.nsi") CONFIG_FILES="$CONFIG_FILES src/mswin/nrnsetup.nsi" ;; "src/mswin/lib/mknrndll.mak") CONFIG_FILES="$CONFIG_FILES src/mswin/lib/mknrndll.mak" ;; "src/mswin/nrnsetupmingw.nsi") CONFIG_FILES="$CONFIG_FILES src/mswin/nrnsetupmingw.nsi" ;; "src/mswin/EnvVarUpdate.nsh") CONFIG_FILES="$CONFIG_FILES src/mswin/EnvVarUpdate.nsh" ;; "src/mswin/AddToPath.nsh") CONFIG_FILES="$CONFIG_FILES src/mswin/AddToPath.nsh" ;; "src/mswin/extra/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/extra/Makefile" ;; "src/mswin/rdln/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/rdln/Makefile" ;; "src/mswin/windll/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/windll/Makefile" ;; "src/mswin/wnrnbbs/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/wnrnbbs/Makefile" ;; "src/mswin/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/lib/Makefile" ;; "src/mswin/bin/Makefile") CONFIG_FILES="$CONFIG_FILES src/mswin/bin/Makefile" ;; "src/neuronmusic/Makefile") CONFIG_FILES="$CONFIG_FILES src/neuronmusic/Makefile" ;; "src/neuronmusic/setup.py") CONFIG_FILES="$CONFIG_FILES src/neuronmusic/setup.py" ;; "share/Makefile") CONFIG_FILES="$CONFIG_FILES share/Makefile" ;; "bin/nrnoc_makefile") CONFIG_FILES="$CONFIG_FILES bin/nrnoc_makefile" ;; "bin/nrniv_makefile") CONFIG_FILES="$CONFIG_FILES bin/nrniv_makefile" ;; "bin/nrnmech_makefile") CONFIG_FILES="$CONFIG_FILES bin/nrnmech_makefile" ;; "share/lib/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/Makefile" ;; "share/lib/hoc/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/Makefile" ;; "share/lib/python/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/python/Makefile" ;; "share/lib/hoc/celbild/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/celbild/Makefile" ;; "share/lib/hoc/mulfit/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/mulfit/Makefile" ;; "share/lib/hoc/netbild/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/netbild/Makefile" ;; "share/lib/hoc/lincir/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/lincir/Makefile" ;; "share/lib/hoc/mview/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/mview/Makefile" ;; "share/lib/hoc/chanbild/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/chanbild/Makefile" ;; "share/lib/hoc/import3d/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/hoc/import3d/Makefile" ;; "share/lib/auditscripts/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/auditscripts/Makefile" ;; "share/lib/nrn.defaults") CONFIG_FILES="$CONFIG_FILES share/lib/nrn.defaults" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "bin/nrnocmodl") CONFIG_FILES="$CONFIG_FILES bin/nrnocmodl" ;; "bin/nrnivmodl") CONFIG_FILES="$CONFIG_FILES bin/nrnivmodl" ;; "bin/neurondemo") CONFIG_FILES="$CONFIG_FILES bin/neurondemo" ;; "bin/nrngui") CONFIG_FILES="$CONFIG_FILES bin/nrngui" ;; "bin/bbswork.sh") CONFIG_FILES="$CONFIG_FILES bin/bbswork.sh" ;; "bin/mos2nrn2.sh") CONFIG_FILES="$CONFIG_FILES bin/mos2nrn2.sh" ;; "bin/hel2mos1.sh") CONFIG_FILES="$CONFIG_FILES bin/hel2mos1.sh" ;; "share/examples/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/Makefile" ;; "share/examples/ivoc/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/ivoc/Makefile" ;; "share/examples/nrniv/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/Makefile" ;; "share/examples/nrniv/cable/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/cable/Makefile" ;; "share/examples/nrniv/kkin/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/kkin/Makefile" ;; "share/examples/nrniv/netcon/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/netcon/Makefile" ;; "share/examples/nrniv/netsyn/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/netsyn/Makefile" ;; "share/examples/nrniv/nmodl/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/nmodl/Makefile" ;; "share/examples/nrniv/nrnoc/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/nrnoc/Makefile" ;; "share/examples/nrniv/randomsyn/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/randomsyn/Makefile" ;; "share/examples/nrniv/soma/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/soma/Makefile" ;; "share/examples/nrniv/vrecorder/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/vrecorder/Makefile" ;; "share/examples/nrniv/xmech/Makefile") CONFIG_FILES="$CONFIG_FILES share/examples/nrniv/xmech/Makefile" ;; "share/demo/Makefile") CONFIG_FILES="$CONFIG_FILES share/demo/Makefile" ;; "share/demo/release/Makefile") CONFIG_FILES="$CONFIG_FILES share/demo/release/Makefile" ;; "share/demo/dend3/Makefile") CONFIG_FILES="$CONFIG_FILES share/demo/dend3/Makefile" ;; "share/demo/sync/Makefile") CONFIG_FILES="$CONFIG_FILES share/demo/sync/Makefile" ;; "share/lib/python/neuron/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/python/neuron/Makefile" ;; "share/lib/python/neuron/rxd/Makefile") CONFIG_FILES="$CONFIG_FILES share/lib/python/neuron/rxd/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi neuron-7.5/configure.ac000066400000000000000000000463101323325274500151730ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. dnl disable caching. When configure fails, it is best to start from scratch. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl dnl PACKAGE_VERSION makes its way into hg2nrnversion_h.sh, etc. AC_INIT([nrn],[7.5]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/memacs/main.c) AM_INIT_AUTOMAKE([foreign]) AM_MAINTAINER_MODE([enable]) m4_pattern_allow([^AC_MSG_ERROR$]) AC_PROG_CC_STDC if test "x$ac_cv_prog_cc_stdc" = xno ; then AC_MSG_ERROR([C compiler not ISO Standard C]) fi PKG_PROG_PKG_CONFIG([0.22]) dnl The following line causes us to make a config.h instead of putting all dnl the defines into the makefile. AC_CONFIG_HEADERS(config.h) AH_TOP([ #ifndef H_nrnconf_included #define H_nrnconf_included 1 ]) AH_BOTTOM([ #if defined(__cplusplus) #include #endif #if defined(CYGWIN) || defined(MINGW) #define WIN32 1 #endif #if defined(MINGW) #define CYGWIN #endif #if defined(carbon) && defined(__cplusplus) #define MAC 1 #include #endif #endif /* H_nrnconf_included */ ]) dnl following does not seem to work in the sense of dnl causing problems with exec_prefix AC_PREFIX_DEFAULT(/usr/local/nrn) dnl so do it explicitly if test "$prefix" = NONE ; then prefix=/usr/local/nrn fi if test "$prefix" = "NONE" ; then prefix=$ac_default_prefix fi AC_CANONICAL_HOST dnl Make generic macros for the kind of system. dnl for later testing with regard to special work arounds dnl if the user has taken the trouble to set them then we don't want dnl to re-set them mlh_cc="$CC" mlh_cflag="$CFLAGS" mlh_cxx="$CXX" mlh_cxxflag="$CXXFLAGS" mlh_yacc="$YACC" mlh_ldflag="$LDFLAGS" dnl dont want prefix/share/nrn to be the default data directory dnl if test "$datadir" = '${prefix}/share' && test "$prefix" != '/usr/local' ; then dnl datadir='${prefix}' dnl fi AC_ARG_ENABLE([UniversalMacBinary], AC_HELP_STRING([--enable-UniversalMacBinary], [combined binary for ppc and i386, fake arch is called umac]),[ enable_dependency_tracking=no CFLAGS="$CFLAGS -arch ppc -arch i386" CXXFLAGS="$CXXFLAGS -arch ppc -arch i386" host_cpu=umac ]) AM_CONDITIONAL(UniversalMacBinary, test x$enable_UniversalMacBinary = xyes) AC_ARG_ENABLE([DiscreteEventObserver], AC_HELP_STRING([--disable-DiscreteEventObserver], [Save space, but danger of use of freed memory if any NetCon destroyed.]),[ if test "$enable_DiscreteEventObserver" != "no" ; then enable_DiscreteEventObserver="yes" fi ],[ enable_DiscreteEventObserver=yes ]) if test "$enable_DiscreteEventObserver" = "yes" ; then NRN_DEFINE(DISCRETE_EVENT_OBSERVER,1,[Undef if do not want Observer to be a subclass of DiscreteEvent]) fi AC_ARG_WITH([nmodl-only], AC_HELP_STRING([--with-nmodl-only],[When cross compiling, nocmodl need to be compiled for the build machine]), [ if test "$with_nmodl_only" = "yes" ; then nmodl_build=yes fi ],[ with_nmodl_only=no ]) AC_ARG_WITH([nmodl], AC_HELP_STRING([--without-nmodl],[When cross compiling, nocmodl should NOT be compiled for the host machine]), [ if test "$with_nmodl" = "yes" ; then nmodl_build=yes else nmodl_build=no fi ],[ nmodl_build=yes ]) AC_NRN_BLUEGENE if test x$with_nmodl_only = xyes ; then nmodl_build=yes fi if test "$nmodl_build" != "no" ; then nmodl_build=yes fi AM_CONDITIONAL(NMODL_ONLY, test x$with_nmodl_only = xyes) AM_CONDITIONAL(NMODL_BUILD, test x$nmodl_build = xyes) AC_ARG_WITH([nrnpython-only], AC_HELP_STRING([--with-nrnpython-only],[configure and make only the nrnpython folder]), [ ],[ with_nrnpython_only=no ]) AM_CONDITIONAL(NRNPYTHON_ONLY, test x$with_nrnpython_only = xyes) if test "$always_call_mpi_init" = "yes" ; then NRN_DEFINE(ALWAYS_CALL_MPI_INIT,1,[define if needed]) fi if test "$file_open_retry" != "" ; then NRN_DEFINE_UNQUOTED(FILE_OPEN_RETRY,$file_open_retry,[Number of times to retry a failed open]) fi dnl Use to be only when configured with mpi. Now always since it is so useful. NRN_DEFINE_UNQUOTED(DLL_DEFAULT_FNAME,"$host_cpu/.libs/libnrnmech.so",[Define if want a automatic dll load]) dnl there are some os dependent properties in nrn.defaults. nrndef_unix="//" nrndef_mac="//" nrndef_mswin="//" case $host_os in cygwin* ) CYGWIN=yes MINGW=no;; mingw* ) MINGW=yes CYGWIN=no;; * ) CYGWIN=no MINGW=no;; esac echo "CYGWIN=$CYGWIN" echo "MINGW=$MINGW" dnl for mswin, rebase will be skipped only for mingw64 nrnskip_rebase='' if test "$CYGWIN" = "yes" -o "$MINGW" = "yes" ; then nrndef_mswin="" fi dnl for some unknown reason this is needed to tickle the use of mpic++ dnl if requested later. AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([],[return 0;],,) AC_LANG_RESTORE AM_CONDITIONAL(BUILD_CARBON, test x$enable_carbon = xyes) NRN_SRCDIR=$srcdir AC_SUBST(NRN_SRCDIR) dnl use the --enable-rpm-rules=yes RPM_RELEASE="`export NSRC=$srcdir ; sh $srcdir/nrnversion.sh commit`" AC_SUBST(RPM_RELEASE) if test "$rpm_extra_args" = "" ; then rpm_extra_args="-ba nrnrpm.spec" fi AM_RPM_INIT dnl Enable or disable the rpm making rules in Makefile.am AM_CONDITIONAL(MAKE_RPMS, test x$make_rpms = xtrue) dnl rpm is most generic when linked statically dnl however we would need to deal with libnrnmech.so and dlopen if test x$make_rpms = xtrue ; then dnl AM_ENABLE_SHARED(no) AM_ENABLE_SHARED(yes) if test "$with_readline" = "" ; then with_readline="no" fi elif test x$CYGWIN = xyes ; then dnl shared libraries cannot have undefined names. src/mswin/nrncygso.sh dnl will combine .o files into a single nrniv.dll (-fPIC is not needed) AM_ENABLE_SHARED(no) AM_ENABLE_STATIC(yes) elif test x$MINGW = xyes ; then AM_ENABLE_SHARED(no) AM_ENABLE_STATIC(yes) else AM_ENABLE_SHARED(yes) AM_ENABLE_STATIC(no) fi dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_AWK AC_PROG_INSTALL dnl AM_PROG_LEX has a bug in it, but it's required by automake 1.4. We dnl replace this by a call to AC_PROG_LEX. See acinclude.m4. This should dnl probably be undone for the next version of automake. AM_PROG_LEX AC_PROG_YACC AC_PROG_LN_S dnl following line allows java to be the controller for NEURON AC_LIBTOOL_DLOPEN dnl Older versions of automake insist on having the AM_PROG_LIBTOOL, dnl although it is now obsolete. We used to leave it in here, and then define dnl AM_PROG_LIBTOOL to call AC_PROG_LIBTOOL, which is the modern dnl way of doing it. dnl Checks for libraries AC_CHECK_LIBM LIBS="$LIBS $LIBM" dnl Python for cygwin and mingw has to be done early because later tests may dnl have to be done with a CFLAGS="-mno-cygwin" (obsolete after gcc2.3) dnl What to do about Python AC_NRN_PYTHON dnl Python that runs on the build machine needed to create hocusr.h AC_CHECK_PROG(PYTHON_BLD, python, python) dnl Only needed if making a distribution. In that case cython must work. dnl Otherwise, to make a distribution, need to modify dnl src/neuronmusic/Makefile.am and remove neuronmusic.cpp from the list dnl of extra dist files. dnl Also needed for neuron.rxd.geometry3d module if test "x$have_cython" != "xno" ; then AC_CHECK_PROG(have_cython, cython, yes, no) fi AC_CHECK_PROG(CYTHON, cython, cython, cython) AM_CONDITIONAL(HAVE_CYTHON, test x$have_cython = xyes) BUILD_RX3D=0 if test "$ac_nrn_rx3d" = "yes" ; then if test x$have_cython = xyes -o -f share/lib/python/neuron/rxd/geometry3d/ctng.cpp ; then BUILD_RX3D=1 else BUILD_RX3D=0 fi fi AC_SUBST(BUILD_RX3D) AM_CONDITIONAL(BUILD_RX3D, test "x$BUILD_RX3D" = "x1") MINGW_CFLAG="" EXTRA_CYGWIN_FLAGS='$(EXTRA_CYGWIN)' if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = no ; then AC_MSG_NOTICE([Build using MinGW.]) MINGW_CFLAG="-mno-cygwin" EXTRA_CYGWIN_FLAGS='' dnl following will be put back at end CFLAGS="-mno-cygwin $CFLAGS" CXXFLAGS="-mno-cygwin $CXXFLAGS" fi fi AC_SUBST(MINGW_CFLAG) AC_SUBST(EXTRA_CYGWIN_FLAGS) AC_NRN_MUSIC AC_NRN_PARANEURON AC_NRN_WITH_MPI AC_NRN_WITH_METIS AM_PROG_LIBTOOL dnl when purify is enabled then one can use dnl nrnivmodl -p dnl to create a special which linked with purify. if test "$enable_purify" = "yes" ; then dnl special is a program, not a shell script for nrniv -dll... linux_nrnmech="no" dnl I believe this is the way it should be done but then all the dnl CXX variables would have to be set dnl xtagname=$tagname dnl tagname=purify dnl AC_LIBTOOL_CONFIG([purify]) dnl tagname=$xtagname dnl On the other hand, this appends to the end and seems to work. dnl All we really wanted was to avoid the rpath args. cat << __EOF__ >> libtool # ### BEGIN LIBTOOL TAG CONFIG: purify hardcode_libdir_flag_spec="" # ### END LIBTOOL TAG CONFIG: purify __EOF__ fi AM_CONDITIONAL(NRNPURIFY, test x$enable_purify = xyes) dnl linux rpm works only with nrnmech.dll style case "$host_os" in *linux*) if test x${linux_nrnmech} = x ; then linux_nrnmech="yes" addlibdl="yes" fi if test x${java_dlopen} = x ; then java_dlopen="yes" addlibdl="yes" fi ;; esac case "$host_os" in darwin*) AC_DEFINE(DARWIN, 1, [if mac os x]) if test x${macdarwin} = x ; then macdarwin=yes fi if test x${linux_nrnmech} = x ; then linux_nrnmech="yes" fi if test x${java_dlopen} = x ; then java_dlopen="yes" fi nrndef_mac="" ;; esac if test x${linux_nrnmech} = xyes ; then AC_DEFINE(NRNMECH_DLL_STYLE, 1,[if 1 then dlopen nrnmech instead of special]) AC_MSG_NOTICE([Use the NRNMECH_DLL_STYLE for "special"]) else AC_MSG_NOTICE([Use the default unix style for "special" (not NRNMECH_DLL_STYLE)]) fi AM_CONDITIONAL(NRNMECH_DLL_STYLE, test x${linux_nrnmech} = xyes) AM_CONDITIONAL(MAC_DARWIN, test x${macdarwin} = xyes) if test x${addlibdl} = xyes ; then LIBS="$LIBS -ldl" fi dnl what to do with the readline library and memacs AC_NRN_READLINE dnl What to do about nrnjava AC_NRN_JAVA dnl CYGWIN or X11. Former takes precedence if test "$CYGWIN" = "yes" ; then no_x=yes echo " CYGWIN and no X11 so make MSWwin version" build_cygwin=yes AC_DEFINE(CYGWIN,,[define if using cygwin]) if test "$marshal_dir" = "" ; then #do not change without changing instal.sh and nrnsetup.nsi marshal_dir=/cygdrive/c/marshalnrn binsuffix="" fi if test "$LDFLAGS" = "" ; then LDFLAGS='-Wl,--enable-auto-import' fi AC_MSG_NOTICE(['make mswin' will marshal for building the installer in the marshal_dir = $marshal_dir]) AC_SUBST(marshal_dir) AC_SUBST(binsuffix) elif test "$MINGW" = "yes" ; then no_x=yes echo " MINGW and no X11 so make MSWwin version" build_mingw=yes AC_DEFINE(MINGW,,[define if using mingw]) if test "$marshal_dir" = "" ; then #do not change without changing instalmingw.sh # and nrnsetupmingw.nsi if test "$host_cpu" = x86_64 ; then marshal_dir='c:/marshalnrn64' dos_marshal_dir='c:\marshalnrn64' binsuffix="" nrnskip_rebase='#' else marshal_dir='c:/marshalnrn' dos_marshal_dir='c:\marshalnrn' binsuffix="" fi fi AC_MSG_NOTICE(['make mswin' will marshal for building the installer in the marshal_dir = $marshal_dir]) AC_SUBST(marshal_dir) AC_SUBST(dos_marshal_dir) AC_SUBST(binsuffix) elif test "$enable_carbon" = "yes" ; then no_x=yes echo "Make the carbon version on max os x" AC_DEFINE(carbon,1,[define if using Carbon libraries]) else AC_PATH_XTRA dnl Find X11. if test "$no_x" = "" ; then X_LIBS="$X_LIBS -lX11" fi fi AC_SUBST(enable_carbon) AC_SUBST(nrnskip_rebase) dnl Real time dynamic clamp AC_NRN_REALTIME dnl Contributions by collaborators if test "$enable_MikeNeubig" = "yes" ; then AC_DEFINE(MikeNeubig,1,[define if using Mike Neubig contributions]) fi dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sgtty.h strings.h sys/file.h) AC_CHECK_HEADERS(sys/ioctl.h sys/time.h termio.h unistd.h stdarg.h varargs.h) AC_CHECK_HEADERS(stropts.h sys/conf.h locale.h fenv.h pthread.h) dnl but sometimes pthreads does not work so we use USE_PTHREAD if test "$use_pthread" != "no" ; then AC_TRY_COMPILE( [#include ], [ pthread_cond_t cond; pthread_cond_init(&cond, (void*)0); ], NRN_DEFINE(USE_PTHREAD,1,[Configure with use_pthead=no if you have pthread but do not want to use it]) AC_MSG_NOTICE([Using pthreads.]) , AC_MSG_NOTICE([Have pthread.h but not using threads.]) ) dnl here is a better way ACX_PTHREAD([ AC_MSG_NOTICE([successful.]) echo "PTHREAD_LIBS=$PTHREAD_LIBS" echo "PTHREAD_CFLAGS=$PTHREAD_CFLAGS" echo "PTHREAD_CC=$PTHREAD_CC" ],[ AC_MSG_NOTICE([did not succeed.]) ]) fi AC_CHECK_HEADERS(float.h math.h) AC_DEFINE(SUNDIALS_DOUBLE_PRECISION, 1, [Define SUNDIALS data type 'realtype' as 'long double']) AC_DEFINE(SUNDIALS_USE_GENERIC_MATH, 1, [Use generic math functions]) AC_LANG_PUSH([C++]) AC_CHECK_HEADERS(stream.h) AC_LANG_POP([]) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T m4_pattern_allow([^AC_TYPE_INT32_T$]) m4_pattern_allow([^AC_TYPE_UINT32_T$]) AC_TYPE_INT64_T dnl This causes a warning message from automake and autoconf because, I dnl suppose, it hasn't been updated. There's nothing that can be done about dnl this except to fix autoconf, since it comes from the autoconf distribution. AC_C_BIGENDIAN AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MEMCMP AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(ftime getcwd getpw gethostname gettimeofday mkdir putenv setenv select strdup strstr index bzero bcopy stty lockf isatty mkstemp) AC_CHECK_FUNCS(setitimer sigaction fesetround posix_memalign mallinfo) NRN_CHECK_SIGNAL(SIGBUS) NRN_CHECK_SIGNAL(SIGSEGV) dnl Do this after the above checks, so they're run with the C compiler rather dnl than the C++ compiler. This is only a problem with complex.h, which dnl always exists for the C++ compilers but meschach needs it for a C dnl compiler. AC_PROG_CXX AC_CHECK_HEADERS(_G_config.h) dnl std::fabs or ::fabs or explicitly declare NRN_FABS dnl Check for interviews. If --with-iv=dir is specified, then AC_NRN_InterViews if test "$nrndef_mac" = "//" -a "$nrndef_mswin" = "//" ; then nrndef_unix="" fi dnl put back the flags if mingw if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = no ; then CFLAGS="$mlh_CFLAGS" CXXFLAGS="$mlh_CXXFLAGS" fi fi case "$exec_prefix" in NONE*) exec_prefix="${prefix}/${host_cpu}" ;; esac dnl allow the nrnivmodl created subfolder to be explicitly specified if test "$modsubdir" = "" ; then modsubdir=$host_cpu fi AC_SUBST(modsubdir) AC_DEFINE_UNQUOTED(NRNHOSTCPU,"$host_cpu",[cpu type consistent with nrnivmodl]) NRN_LIBDIR=$exec_prefix/lib AC_SUBST(NRN_LIBDIR) AC_SUBST(nrndef_unix) AC_SUBST(nrndef_mac) AC_SUBST(nrndef_mswin) AM_CONDITIONAL(BUILD_READLINE, test x$build_readline = xyes) AM_CONDITIONAL(BUILD_NRNJAVA, test x$build_nrnjava = xyes) AM_CONDITIONAL(BUILD_NRNIV, test x$build_nrniv = xyes) AM_CONDITIONAL(BUILD_IVOS, test x$use_ivos = xyes) AM_CONDITIONAL(BUILD_PARANEURON, test x$use_paranrn = xyes) AM_CONDITIONAL(BUILD_NRNMPI_DYNAMIC, test x$nrnmpi_dynamic = xyes) AM_CONDITIONAL(BUILD_CYGWIN, test x$build_cygwin = xyes) AM_CONDITIONAL(BUILD_MINGW, test x$build_mingw = xyes) AM_CONDITIONAL(BUILD_NRNPYTHON, test x$build_nrnpython = xyes) AM_CONDITIONAL(BUILD_NRNPYTHON_DYNAMIC, test x$build_nrnpython_dynamic = xyes) dnl special problem work arounds AC_NRN_ODDITIES dnl some configuration checking for ParallelContext AC_NRN_ParallelContext dnl This, in conjunction with a line in acconfig.h, causes the preprocessor dnl symbol NEURON_DATA_DIR to point to the neuron data directory. AC_DEFINE_UNQUOTED(NEURON_DATA_DIR, "$prefix/share/$PACKAGE", where the lib hoc is) AC_DEFINE_UNQUOTED(NRNHOST, "$host", host triplet) NRN_DEFINE_UNQUOTED(NRN_CONFIG_ARGS, "${ac_configure_args}", args given to configure) NRNOC_X11=1 if test "$with_nrnoc_x11" = "" ; then with_nrnoc_x11=yes fi AC_ARG_WITH(nrnoc-x11, AC_HELP_STRING([--with-nrnoc-x11],[This is the default Add the x11 window code to NRNOC to allow the old style x11 window for plot, axis, etc.]) AC_HELP_STRING([--without-nrnoc-x11],[Do not compile the old style nrnoc x11 window]) ,[ if test "$with_nrnoc_x11" = "no" ; then NRNOC_X11=0 fi ]) if test "$no_x" = "yes" ; then NRNOC_X11=0 fi echo "NRNOC_X11 = $NRNOC_X11" AC_DEFINE_UNQUOTED(NRNOC_X11,$NRNOC_X11, if nrnoc can use X11) dnl This list specifies what files configure actually makes. AC_CONFIG_FILES([ Makefile src/Makefile ]) if test "$nmodl_build" = "yes" ; then AC_CONFIG_HEADERS([nmodlconf.h]) AC_CONFIG_FILES([ src/modlunit/Makefile src/nmodl/Makefile ]) fi if test "$with_nmodl_only" != "yes"; then AC_CONFIG_HEADERS([ src/nrnpython/nrnpython_config.h ]) AC_CONFIG_FILES([ src/nrnpython/Makefile src/mswin/nrncygso.sh src/nrnpython/setup.py share/lib/python/neuron/rxd/geometry3d/Makefile share/lib/python/neuron/rxd/geometry3d/setup.py ]) fi if test "$with_nmodl_only" != "yes" -a "$with_nrnpython_only" != "yes" ; then AC_CONFIG_HEADERS([nrnconf.h]) AC_CONFIG_HEADERS([src/nrnoc/nrnconfigargs.h]) AC_CONFIG_HEADERS([src/oc/nrnmpiuse.h]) AC_CONFIG_HEADERS([src/oc/nrnrtuse.h]) AC_CONFIG_HEADERS([src/oc/nrnpthread.h]) AC_CONFIG_HEADERS([src/parallel/bbsconf.h]) AC_CONFIG_HEADERS([src/nrnjava/njconf.h]) AC_CONFIG_HEADERS([src/nrncvode/nrnneosm.h]) AC_CONFIG_HEADERS([src/ivos/ivstream.h]) AC_CONFIG_HEADERS([src/sundials/sundials_config.h]) AC_CONFIG_FILES([ nrnrpm.spec src/sundials/Makefile src/sundials/shared/Makefile src/sundials/cvodes/Makefile src/sundials/ida/Makefile src/sparse/Makefile src/memacs/Makefile src/readline/Makefile src/sparse13/Makefile src/Random123/Makefile src/oc/Makefile src/scopmath/Makefile src/nrnoc/Makefile src/gnu/Makefile src/uxnrnbbs/Makefile src/mesch/Makefile src/uxnrnbbs/mos2nrn.h src/nrnmpi/Makefile src/ivoc/Makefile src/nrncvode/Makefile src/parallel/Makefile src/nrniv/Makefile src/ivos/Makefile src/ivos/InterViews/Makefile src/ivos/OS/Makefile src/nrnjava/Makefile src/nrnjava/nrnccmb/Makefile src/nrnjava/neuron/Makefile src/ni_pci_6229/Makefile src/mac/Makefile src/mswin/Makefile src/mswin/batch/Makefile src/mac/macdist.pkgproj src/mac/postinstall.sh src/mswin/nrnsetup.nsi src/mswin/lib/mknrndll.mak src/mswin/nrnsetupmingw.nsi src/mswin/EnvVarUpdate.nsh src/mswin/AddToPath.nsh src/mswin/extra/Makefile src/mswin/rdln/Makefile src/mswin/windll/Makefile src/mswin/wnrnbbs/Makefile src/mswin/lib/Makefile src/mswin/bin/Makefile src/neuronmusic/Makefile src/neuronmusic/setup.py share/Makefile bin/nrnoc_makefile bin/nrniv_makefile bin/nrnmech_makefile share/lib/Makefile share/lib/hoc/Makefile share/lib/python/Makefile share/lib/hoc/celbild/Makefile share/lib/hoc/mulfit/Makefile share/lib/hoc/netbild/Makefile share/lib/hoc/lincir/Makefile share/lib/hoc/mview/Makefile share/lib/hoc/chanbild/Makefile share/lib/hoc/import3d/Makefile share/lib/auditscripts/Makefile share/lib/nrn.defaults bin/Makefile bin/nrnocmodl bin/nrnivmodl bin/neurondemo bin/nrngui bin/bbswork.sh bin/mos2nrn2.sh bin/hel2mos1.sh share/examples/Makefile share/examples/ivoc/Makefile share/examples/nrniv/Makefile share/examples/nrniv/cable/Makefile share/examples/nrniv/kkin/Makefile share/examples/nrniv/netcon/Makefile share/examples/nrniv/netsyn/Makefile share/examples/nrniv/nmodl/Makefile share/examples/nrniv/nrnoc/Makefile share/examples/nrniv/randomsyn/Makefile share/examples/nrniv/soma/Makefile share/examples/nrniv/vrecorder/Makefile share/examples/nrniv/xmech/Makefile share/demo/Makefile share/demo/release/Makefile share/demo/dend3/Makefile share/demo/sync/Makefile share/lib/python/neuron/Makefile share/lib/python/neuron/rxd/Makefile ]) fi AC_OUTPUT neuron-7.5/depcomp000077500000000000000000000560161323325274500142660ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: neuron-7.5/extend_depcomp.sh000077500000000000000000000004701323325274500162370ustar00rootroot00000000000000if grep -q xlc depcomp ; then #echo "depcomp already extended to handle xlc. No change to file." true; else sed '/^aix)/,/;;/ { H s/\.u/.d/ s/^aix)/xlc) #following fragment is just like AIX but the extension is .d instead of .u/ } /^icc)/ { x G } ' depcomp > temp mv temp depcomp fi neuron-7.5/git2nrnversion_h.sh000077500000000000000000000016551323325274500165470ustar00rootroot00000000000000#!/bin/sh a=$1 if test "$a" = "" ; then a=. fi cd $a if git log > /dev/null && test -d .git ; then lcs=`git log --format="%h" | wc -l | sed 's/ *//g'` # count of changesets branch="`git rev-parse --abbrev-ref HEAD`" # branch name modified="`git status -s -uno --porcelain | sed -n '1s/.*/+/p'`" # + if modified gcs=`git log --format="%h" -n 1` #short commit hash d="`git log --format="%ad" -n 1 --date=short`" # date echo "#define GIT_DATE \"$d\"" echo "#define GIT_BRANCH \"$branch\"" echo "#define GIT_CHANGESET \"${gcs}${modified}\"" echo "#define GIT_LOCAL \"${lcs}${modified}\"" elif test -f src/nrnoc/nrnversion.h ; then sed -n '1,$p' src/nrnoc/nrnversion.h else echo "#define GIT_DATE \"1999-12-31\"" echo "#define GIT_BRANCH \"?\"" echo "#define GIT_CHANGESET \"?\"" echo "#define GIT_LOCAL \"?\"" exit 1 fi neuron-7.5/hg2nrnversion_h.sh000077500000000000000000000013171323325274500163550ustar00rootroot00000000000000#!/bin/sh a=$1 if test "$a" = "" ; then a=. fi cd $a if hg identify > /dev/null && test -d .hg ; then gcs=`hg identify -i` lcs=`hg identify -n` branch="`hg identify -b`" tags="`hg identify -t`" sha=`echo $gcs | sed 's/\+//'` d=`hg log -r $sha --template '{date|shortdate}'` echo "#define HG_DATE \"$d\"" echo "#define HG_BRANCH \"$branch\"" echo "#define HG_CHANGESET \"$gcs\"" echo "#define HG_LOCAL \"$lcs\"" echo "#define HG_TAG \"$tags\"" elif test -f src/nrnoc/nrnversion.h ; then sed -n '1,$p' src/nrnoc/nrnversion.h else echo "#define HG_DATE \"1999-12-31\"" echo "#define HG_BRANCH \"\"" echo "#define HG_CHANGESET \"?\"" echo "#define HG_LOCAL \"?\"" echo "#define HG_TAG \"\"" exit 1 fi neuron-7.5/install-sh000077500000000000000000000345231323325274500147140ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: neuron-7.5/installunix.html000077500000000000000000000171621323325274500161530ustar00rootroot00000000000000.....2 NEURON Installation for UNIX and Linux

NEURON Installation for UNIX and Linux

This version of InterViews and NEURON uses autoconf and should be much easier to install than with the older Imake installation method (e.g. 4.2.1 and earlier). I (Michael Hines) am extremely grateful to Gary Holt (holt@LNC.usc.edu) for writing the original autoconf scripts for this package. I have modified these scripts in several ways and all bugs should be considered my own. Please notify me (michael.hines@yale.edu) if this package does not install properly on your machine.

In general there should no longer be any requirement for CPU, NEURONHOME, or LD_LIBRARY_PATH environment variables. However, if you have trouble launching NEURON it may be because I am not using libtool generically in the configuration files and need an explicit LD_LIBRARY_PATH for interviews or for the compiler libraries.

A very important addition to NEURON is the ability to use JAVA. At this time, installation of this feature requires the explicit invocation of the --with-nrnjava argument to the configure command when configuring nrn-5.3. I am very grateful to Fred Howell (fwh@anc.ed.ac.uk) of Nigel Goddard's lab for designing and providing a sample implementation of the NEURON to Java interface.

Quick Installation Instructions

Note: Neuron may be installed in its extraction directory. Use --prefix=`pwd` in the ./configure command.

Full installation with InterViews (strongly recommended)

Download iv-15.tar.gz into home directory and then
cd $HOME
gunzip -c iv-15.tar.gz | tar xf -
cd iv-15
./config.guess #your hostcpu is printed in the form hostcpu-vendor-osversion
./configure --prefix=$HOME/iv
make
make install
Download nrn-5.3.tar.gz into home directory and then
cd $HOME
gunzip -c nrn-5.3.tar.gz | tar xf -
cd nrn-5.3
./configure --prefix=$HOME/nrn --with-iv=$HOME/iv --with-nrnjava

make
make install
Finally, test NEURON by running its "demonstration" program.
#hostcpu is the output of config.guess in the form hostcpu-vendor-osversion
$HOME/nrn/hostcpu/bin/neurondemo
If the last instruction fails, try the last instruction again after
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib:${HOME}/iv/hostcpu/lib"

Installation of NRNIV without GUI classes (no GUI)

Download nrn-5.3.tar.gz into home directory and then
cd $HOME
gunzip -c nrn-5.3.tar.gz | tar xf -
cd nrn-5.3
./configure --prefix=$HOME/nrn --without-iv
make
make install
cd $HOME/nrn/share/nrn/demo/release
$HOME/nrn/hostcpu/bin/nrnivmodl
hostcpu/special
If the last command fails you may need a
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib"

NRNOC only (no c++ classes)

Download nrn-5.3.tar.gz into home directory and then
cd $HOME
gunzip -c nrn-5.3.tar.gz | tar xf -
cd nrn-5.3
./configure --prefix=$HOME/nrn --without-nrniv
make
make install
cd $HOME/nrn/share/nrn/demo/release
$HOME/nrn/hostcpu/bin/nrnocmodl
hostcpu/special
If the last command fails you may need a
setenv LD_LIBRARY_PATH "${HOME}/nrn/hostcpu/lib"

More details

To install the package first download
iv-15.tar.gz
and then download
nrn-5.3.tar.gz
In most cases the following should be sufficient for a complete installation
gunzip -c iv-15.tar.gz | tar xf -
cd iv-15
#read the INSTALL file.
./configure --prefix=/where/you/want/it
make
make install
cd ..
rm -r -f iv-15

If you don't specify a prefix it defaults to /usr/local/iv
I use:

./configure --prefix=$HOME/iv

To install the NEURON part

gunzip -c nrn-5.3.tar.gz | tar xf -
cd nrn-5.3
#read the INSTALL file
./configure --prefix=/where/you/want/it --with-iv=/where/you/installed/interviews
make
make install
cd ..
rm -r -f nrn-5.3

If you don't specify a prefix it defaults to /usr/local/nrn
If you don't specify a --with-iv it first looks in prefix/../iv and then in /usr/local/iv
I use:

./configure --prefix=$HOME/nrn --with-iv=$HOME/iv
Notice that in my case
./configure --prefix=$HOME/nrn
would suffice because interviews was installed in $HOME/iv

In general there should no longer be any requirement for CPU, NEURONHOME, or LD_LIBRARY_PATH environment variables. However, if you have trouble launching NEURON it may be because I am not using libtool generically in the configuration files and need an explicit LD_LIBRARY_PATH for interviews or for the compiler libraries. Installation is successful if

/where/you/want/it/hostcpu/bin/neurondemo
creates /where/you/want/it/share/nrn/demo/neuron (if it doesn't already exist) and launches the demo.

NEURON and Java together

When Java is built into NEURON, launching NEURON (with nrniv, special, nrngui, etc) also initializes the java virtual machine. With load_java("java.class.name") or load_java("java.class.name", "HocName") one loads and registers Java classes and their methods with the hoc interpreter. From the hoc interpreter, one can then instantiate and use java objects. Furthermore, user developed java classes can obtain information from NEURON and execute NEURON statements. It is likely that all future GUI development for NEURON will take place in java.
src/nrnjava/nrnjava.html

Building Java into NEURON

Configure makes some half hearted attempts to figure out where the java development environment, include files, and libjvm are located but may not always be successful. We assume
1) jni.h is in $JDKDIR/include and that may include a file in $JDKDIR/include/$JDKINCLUDEARCH. Generally, java, javac, etc. are located in $JDKDIR/bin.
2) libjvm... is in $JDKDIR/jre/lib/$JDKLIBARCH

Important Note!! README!

If this is not the case then set these environment variables manually. After configuration, these environment variables are no longer needed.

On my machine these end up as

JDKDIR=/usr/j2se
JDKLIBARCH=sparc
JDKINCLUDEARECH=solaris
After building NEURON, you may need a LD_LIBRARY_PATH addition to tell where to find this library at run time. On my machine I use:
setenv LD_LIBRARY_PATH $HOME/iv/sparc/lib:/local/gnu/lib
setenv LD_LIBRARY_PATH $JDKDIR/jre/lib/sparc:$LD_LIBRARY_PATH

Your PATH should be set so that it can find java, javac, and javah. On my machine I use:

set path=($JDKDIR/bin $path)

Important Note

You must have a relatively recent version of Java installed. Mine is
hines <~>% java -version
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
hines <~>% 
The key is for jni.h to have
#define JNI_VERSION_1_2 0x00010002

Page and graphics copyright © 1999-2002 N.T. Carnevale and M.L. Hines, All Rights Reserved. neuron-7.5/ltmain.sh000066400000000000000000011714641323325274500145370ustar00rootroot00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-0.1" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: neuron-7.5/m4/000077500000000000000000000000001323325274500132215ustar00rootroot00000000000000neuron-7.5/m4/acinclude.m4000077500000000000000000000256421323325274500154260ustar00rootroot00000000000000 dnl I cant figure out how to hide AC_DEFINE so that autoheader does not dnl put it in nrnconf.h.in (it will exist in some other header precursor.) dnl AC_DEFUN([NRN_DEFINE], [ AC_DEFINE($1,$2,[(Remove from nrnconf.h.in)]) ]) AC_DEFUN([NRN_DEFINE_UNQUOTED], [ AC_DEFINE_UNQUOTED($1,$2,[(Remove from nrnconf.h.in)]) ]) dnl Check for signal macros AC_DEFUN([NRN_CHECK_SIGNAL], [ AC_MSG_CHECKING([if $1 defined in signal.h]) AC_TRY_COMPILE([#include ],[ signal($1, SIG_DFL); ],[ AC_DEFINE(HAVE_$1,1,[(Define if this signal exists)]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) ] ) ]) dnl dnl This was stolen from readlin-4.0. Hines changed the name from dnl BASH_CHECK_LIB_TERMCAP dnl Hines reversed the order from termcap, curses, ncurses in hopes that dnl all linux boxes have ncurses and the rpm will not need any other installation dnl This obviates prefer_curses. Also the gnutermcap makes no sense in dnl our context and I replaced that last resort with an error dnl AC_DEFUN([NRN_CHECK_LIB_TERMCAP], [ if test "X$nrn_cv_termcap_lib" = "X"; then _nrn_needmsg=yes else AC_MSG_CHECKING(which library has the termcap functions) _nrn_needmsg= fi AC_CACHE_VAL(nrn_cv_termcap_lib, [AC_CHECK_LIB(ncurses, tgetent, nrn_cv_termcap_lib=libncurses, [AC_CHECK_LIB(curses, tgetent, nrn_cv_termcap_lib=libcurses, [AC_CHECK_LIB(termcap, tgetent, nrn_cv_termcap_lib=libtermcap, [PKG_CHECK_MODULES([NCURSES], [ncurses], nrn_cv_termcap_lib=pkgconfig_ncurses, [AC_MSG_ERROR([cannot find one of ncurses, curses, or termcap])])])])])]) if test "X$_nrn_needmsg" = "Xyes"; then AC_MSG_CHECKING(which library has the termcap functions) fi AC_MSG_RESULT(using $nrn_cv_termcap_lib) if test $nrn_cv_termcap_lib = libtermcap ; then TERMCAP_LIB=-ltermcap TERMCAP_DEP= TERMCAP_CFLAGS= elif test $nrn_cv_termcap_lib = libncurses ; then TERMCAP_LIB=-lncurses TERMCAP_DEP= TERMCAP_CFLAGS= elif test $nrn_cv_termcap_lib = pkgconfig_ncurses ; then TERMCAP_LIB="$NCURSES_LIBS" TERMCAP_DEP= TERMCAP_CFLAGS="$NCURSES_CFLAGS" else TERMCAP_LIB=-lcurses TERMCAP_DEP= TERMCAP_CFLAGS= fi ]) dnl Stolen from the autoconf archive dnl @synopsis AC_CXX_NAMESPACES dnl dnl If the compiler can prevent names clashes using namespaces, define dnl HAVE_NAMESPACES. dnl dnl @version $Id: acinclude.m4 1883 2007-11-10 19:32:20Z hines $ dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_NAMESPACES], [AC_CACHE_CHECK(whether the compiler implements namespaces, ac_cv_cxx_namespaces, [AC_LANG_PUSH([C++]) AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], [using namespace Outer::Inner; return i;], ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) AC_LANG_POP([]) ]) if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) fi ]) dnl @synopsis AC_CXX_HAVE_STL dnl dnl If the compiler supports the Standard Template Library, define HAVE_STL. dnl dnl @version $Id: acinclude.m4 1883 2007-11-10 19:32:20Z hines $ dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_STL], [AC_CACHE_CHECK(whether the compiler supports Standard Template Library, ac_cv_cxx_have_stl, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_PUSH([C++]) AC_TRY_COMPILE([#include #include #ifdef HAVE_NAMESPACES using namespace std; #endif],[list x; x.push_back(5); list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no) AC_LANG_POP([]) ]) if test "$ac_cv_cxx_have_stl" = yes; then NRN_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library]) fi ]) dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_jni_include_dirs.html dnl AC_DEFUN([AC_JNI_INCLUDE_DIR],[ JNI_INCLUDE_DIRS="" test "x$JAVAC" = x && AC_MSG_ERROR(['$JAVAC' undefined]) AC_PATH_PROG(_ACJNI_JAVAC, $JAVAC, no) test "x$_ACJNI_JAVAC" = xno && AC_MSG_ERROR([$JAVAC could not be found in path]) _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC") _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` case "$host_os" in darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` _JINC="$_JTOPDIR/Headers";; *) _JINC="$_JTOPDIR/include";; esac if test -f "$_JINC/jni.h"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC" else _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` if test -f "$_JTOPDIR/include/jni.h"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include" else AC_MSG_ERROR([cannot find java include files]) fi fi # get the likely subdirectories for system specific java includes # Hines added cygwin. The example was for /cygdrive/c/j2sdk1.4.1_02 case "$host_os" in bsdi*) _JNI_INC_SUBDIRS="bsdos";; linux*) _JNI_INC_SUBDIRS="linux genunix";; osf*) _JNI_INC_SUBDIRS="alpha";; solaris*) _JNI_INC_SUBDIRS="solaris";; cygwin*) _JNI_INC_SUBDIRS="win32";; *) _JNI_INC_SUBDIRS="genunix";; esac # add any subdirectories that are present for JINCSUBDIR in $_JNI_INC_SUBDIRS do if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" fi done ]) # _ACJNI_FOLLOW_SYMLINKS # Follows symbolic links on , # finally setting variable _ACJNI_FOLLOWED # -------------------- AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[ # find the include directory relative to the javac executable _cur="$1" while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do AC_MSG_CHECKING(symlink for $_cur) _slink=`ls -ld "$_cur" | sed 's/.* -> //'` case "$_slink" in /*) _cur="$_slink";; # 'X' avoids triggering unwanted echo options. *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; esac AC_MSG_RESULT($_cur) done _ACJNI_FOLLOWED="$_cur" ])# _ACJNI dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/am_rpm_init.html dnl dnl AM_RPM_INIT dnl Figure out how to create rpms for this system and setup for an dnl automake target AC_DEFUN([AM_RPM_INIT], [dnl AC_REQUIRE([AC_CANONICAL_HOST]) dnl Find the RPM program AC_ARG_WITH(rpm-prog,[ --with-rpm-prog=PROG Which rpm to use (optional)], rpm_prog="$withval", rpm_prog="") AC_ARG_ENABLE(rpm-rules, [ --enable-rpm-rules Try to create rpm make rules (defaults to yes for Linux)], enable_rpm_rules="$withval",enable_rpm_rules=no) AC_ARG_WITH(rpm-extra-args, [ --with-rpm-extra-args=ARGS Run rpm with extra arguments (defaults to none)], rpm_extra_args="$withval", rpm_extra_args="") dnl AC_ARG_ENABLE(rpm-topdir, [ --enable-rpm Try to create rpm make rules (defaults to yes for Linux)], dnl enable_rpm_rules="$withval",no) dnl echo enable_rpm_rules is $enable_rpm_rules dnl echo rpm_prog is $rpm_prog RPM_TARGET="" if test x$enable_rpm_rules = xno ; then echo "Not trying to build rpms for your system (use --enable-rpm-rules to override) " no_rpm=yes else if test x$rpm_prog != x ; then if test x${RPM_PROG+set} != xset ; then RPM_PROG=$rpm_prog fi fi AC_PATH_PROG(RPM_PROG, rpmbuild, no) if test "$RPM_PROG" = "no" ; then AC_PATH_PROG(RPM_PROG, rpm, no) fi no_rpm=no if test "$RPM_PROG" = "no" ; then echo *** RPM Configuration Failed echo *** Failed to find the rpm program. If you want to build rpm packages echo *** indicate the path to the rpm program using --with-rpm-prog=PROG no_rpm=yes RPM_MAKE_RULES="" else AC_MSG_CHECKING(how rpm sets %{_rpmdir}) rpmdir=`rpm --eval %{_rpmdir}` if test x$rpmdir = x"%{_rpmdir}" ; then AC_MSG_RESULT([not set (cannot build rpms?)]) echo *** Could not determine the value of %{_rpmdir} echo *** This could be because it is not set, or your version of rpm does not set it echo *** It must be set in order to generate the correct rpm generation commands echo *** echo *** You might still be able to create rpms, but I could not automate it for you echo *** BTW, if you know this is wrong, please help to improve the rpm.m4 module echo *** Send corrections, updates and fixes to dhawkins@cdrgts.com. Thanks. else AC_MSG_RESULT([$rpmdir]) fi AC_MSG_CHECKING(how rpm sets %{_rpmfilename}) rpmfilename=$rpmdir/`rpm --eval %{_rpmfilename} | sed "s/%{ARCH}/${host_cpu}/g" | sed "s/%{NAME}/$PACKAGE/g" | sed "s/%{VERSION}/${VERSION}/g" | sed "s/%{RELEASE}/${RPM_RELEASE}/g"` AC_MSG_RESULT([$rpmfilename]) RPM_DIR=${rpmdir} RPM_TARGET=$rpmfilename RPM_ARGS="-ta $rpm_extra_args" RPM_TARBALL=${PACKAGE}-${VERSION}.tar.gz fi fi case "${no_rpm}" in yes) make_rpms=false;; no) make_rpms=true;; *) AC_MSG_WARN([bad value ${no_rpm} for no_rpm (not making rpms)]) make_rpms=false;; esac AC_SUBST(RPM_DIR) AC_SUBST(RPM_TARGET) AC_SUBST(RPM_ARGS) AC_SUBST(RPM_TARBALL) RPM_CONFIGURE_ARGS=${ac_configure_args} AC_SUBST(RPM_CONFIGURE_ARGS) ]) dnl If the C++ library has a working stringstream, define HAVE_SSTREAM dnl Ben Stanley dnl 1.1 (2001/03/16) AC_DEFUN([AC_CXX_HAVE_SSTREAM], [AC_CACHE_CHECK(whether the compiler has stringstream, ac_cv_cxx_have_sstream, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_PUSH([C++]) AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace std; #endif],[stringstream message; message << "Hello"; return 0;], ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) AC_LANG_POP([]) ]) if test "$ac_cv_cxx_have_sstream" = yes; then AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) fi ]) dnl decide whether to use std::fabs or ::fabs or declare it explicitly AC_DEFUN([NRN_FABS],[ AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #include #include #include #define myfabs ::fabs ],[ double d; d = -25.0; d = myfabs(d); return (d == 25.0)?0:1; ], ivos_fabs="::fabs" , ivos_fabs="" ) if test "$ivos_fabs" = "" ; then AC_TRY_COMPILE([ #include #include #include #define myfabs std::fabs ],[ double d; d = -25.0; d = myfabs(d); return (d == 25.0)?0:1; ], ivos_fabs="std::fabs" , ivos_fabs="" ) fi if test "$ivos_fabs" != "" ; then AC_DEFINE_UNQUOTED(IVOS_FABS,$ivos_fabs,[undefined or ::fabs or std::fabs]) fi AC_TRY_COMPILE([ #include #include #include float abs(float arg); inline float abs(float arg) { return (arg < 0.0)? -arg : arg; } ],[ return 0; ], AC_DEFINE(INLINE_FLOAT_ABS,1,[define if can declare inline float abs(float)]) ) AC_TRY_COMPILE([ #include #include #include long abs(long arg); inline long abs(long arg) { return (arg < 0.0)? -arg : arg; } ],[ return 0; ], AC_DEFINE(INLINE_LONG_ABS,1,[define if can declare inline long abs(long)]) ) AC_LANG_RESTORE ])dnl neuron-7.5/m4/acx_mpi.m4000077500000000000000000000065101323325274500151100ustar00rootroot00000000000000dnl @synopsis ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl This macro tries to find out how to compile programs that use MPI dnl (Message Passing Interface), a standard API for parallel process dnl communication (see http://www-unix.mcs.anl.gov/mpi/) dnl dnl On success, it sets the MPICC, MPICXX, or MPIF77 output variable to dnl the name of the MPI compiler, depending upon the current language. dnl (This may just be $CC/$CXX/$F77, but is more often something like dnl mpicc/mpiCC/mpif77.) It also sets MPILIBS to any libraries that are dnl needed for linking MPI (e.g. -lmpi, if a special dnl MPICC/MPICXX/MPIF77 was not found). dnl dnl If you want to compile everything with MPI, you should set: dnl dnl CC="$MPICC" #OR# CXX="$MPICXX" #OR# F77="$MPIF77" dnl LIBS="$MPILIBS $LIBS" dnl dnl The user can force a particular library/compiler by setting the dnl MPICC/MPICXX/MPIF77 and/or MPILIBS environment variables. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if an MPI dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the dnl default action will define HAVE_MPI. dnl dnl @category InstalledPackages dnl @author Steven G. Johnson dnl @version 2004-11-05 dnl @license GPLWithACException AC_DEFUN([ACX_MPI], [ AC_PREREQ(2.50) dnl for AC_LANG_CASE AC_LANG_CASE([C], [ AC_REQUIRE([AC_PROG_CC]) AC_ARG_VAR(MPICC,[MPI C compiler command]) AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc cmpicc, $CC) acx_mpi_save_CC="$CC" CC="$MPICC" AC_SUBST(MPICC) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) AC_ARG_VAR(MPICXX,[MPI C++ compiler command]) AC_CHECK_PROGS(MPICXX, mpic++ mpicxx mpiCC mpCC hcp mpxlC mpxlC_r cmpic++, $CXX) acx_mpi_save_CXX="$CXX" CXX="$MPICXX" AC_SUBST(MPICXX) ], [Fortran 77], [ AC_REQUIRE([AC_PROG_F77]) AC_ARG_VAR(MPIF77,[MPI Fortran compiler command]) AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c, $F77) acx_mpi_save_F77="$F77" F77="$MPIF77" AC_SUBST(MPIF77) ]) if test x = x"$MPILIBS"; then AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [Fortran 77], [AC_MSG_CHECKING([for MPI_Init]) AC_TRY_LINK([],[ call MPI_Init], [MPILIBS=" " AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"]) fi dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the dnl latter uses $CPP, not $CC (which may be mpicc). AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi], [C++], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi]) AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"], [C++], [CXX="$acx_mpi_save_CXX"], [Fortran 77], [F77="$acx_mpi_save_F77"]) AC_SUBST(MPILIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then $2 : else ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1]) : fi ])dnl ACX_MPI neuron-7.5/m4/acx_pthread.m4000066400000000000000000000223741323325274500157550ustar00rootroot00000000000000dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl @summary figure out how to build C programs using POSIX threads dnl dnl This macro figures out how to build C programs using POSIX threads. dnl It sets the PTHREAD_LIBS output variable to the threads library and dnl linker flags, and the PTHREAD_CFLAGS output variable to any special dnl C compiler flags that are needed. (The user can also force certain dnl compiler flags/libs to be tested by setting these environment dnl variables.) dnl dnl Also sets PTHREAD_CC to any special C compiler that is needed for dnl multi-threaded programs (defaults to the value of CC otherwise). dnl (This is necessary on AIX to use the special cc_r compiler alias.) dnl dnl NOTE: You are assumed to not only compile your program with these dnl flags, but also link it with them as well. e.g. you should link dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS dnl $LIBS dnl dnl If you are only building threads programs, you may wish to use dnl these variables in your default LIBS, CFLAGS, and CC: dnl dnl LIBS="$PTHREAD_LIBS $LIBS" dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" dnl CC="$PTHREAD_CC" dnl dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a threads dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the dnl default action will define HAVE_PTHREAD. dnl dnl Please let the authors know if this macro fails on any platform, or dnl if you have any other suggestions or comments. This macro was based dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. dnl We are also grateful for the helpful feedback of numerous users. dnl dnl @category InstalledPackages dnl @author Steven G. Johnson dnl @version 2006-05-29 dnl @license GPLWithACException AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_TRY_LINK([#include ], [int attr=$attr; return attr;], [attr_name=$attr; break]) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD neuron-7.5/m4/ivcheck.m4000077500000000000000000000137301323325274500151060ustar00rootroot00000000000000dnl There are several options with regard to how much InterViews is dnl actually used dnl --without-nrniv means do not use it at all. ie build only nrnoc dnl --without-iv means to build as much of nrniv as possible using only dnl the OS part of interviews which becomes built-in to ivoc and dnl is found in src/ivos AC_DEFUN([AC_NRN_InterViews],[ AC_LANG_PUSH([C++]) AC_CXX_HAVE_SSTREAM dnl Check for interviews. If --with-iv=dir is specified, then if test "$with_iv" = ""; then with_iv=yes # Enable interviews by default. fi if test "$with_nrniv" = ""; then with_nrniv=yes # Enable nrniv by default fi use_ivos=no build_nrniv=yes AC_ARG_WITH(x, AC_HELP_STRING([--without-x],[disable everything depending on x11 equivalent to --without-iv --without-nrnoc-x11 --without-x ]),[ if test "$with_x" = "no"; then echo "disable everything depending on x11" use_ivos=yes with_iv=no with_nrnoc_x11=no fi ]) AC_ARG_WITH(nrniv, AC_HELP_STRING([--with-nrniv],[This is the default. Build as much of nrniv as is consistent with the existence or non-existence of InterViews. I.e if InterViews is not found List, Vector, File, Impedance, SaveState, etc. will still be built.]) AC_HELP_STRING([--without-nrniv],[Build only nrnoc]) ,[ if test "$with_nrniv" = "no" ; then dnl take away with the left what has been given with the right echo "Not building nrniv and" echo "not building in any subdirectories that are only" echo "needed by nrniv" HAVE_IV=0 IV_LIBS="" IV_DIR="" IV_INCLUDE="" IV_LIBS_LIBTOOL="" build_nrniv=no fi ]) if test "$build_nrniv" = "yes" ; then AC_ARG_WITH(iv, AC_HELP_STRING([--with-iv=dir],[Specify the location of the InterViews graphics package. You must specify this option if you do not have them installed in a standard place. The standard places are (from high to low precedence) prefix/../iv /usr/local/iv /usr/local]) AC_HELP_STRING([--without-iv],[Do not compile graphics into neuron.]) ,[ dnl Interviews was specified: HAVE_IV=1 IVHINES=IVhines if test "$with_iv" = "no" ; then dnl Interviews is not desired: HAVE_IV=0 IVHINES=ivos echo "Not compiling with interviews." elif test "$with_iv" = "yes" ; then # look in default places echo "Looking for InterViews in the usual places--" dnl calculate prefix of prefix xprefix=`echo "$prefix" | sed 's;/[[^/]]*$;;'` dnl check in prefix/../iv if test -d $xprefix/iv ; then IV_DIR=$xprefix/iv IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib if test ! -d $IV_LIBDIR ; then IV_LIBDIR="$IV_DIR"/lib fi IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la" IV_INCLUDE=-I$IV_DIR/include dnl check in /usr/local/iv elif test -d /usr/local/iv ; then echo " not in $IV_DIR" IV_DIR=/usr/local/iv IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib if test ! -d $IV_LIBDIR ; then IV_LIBDIR="$IV_DIR"/lib fi IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la" IV_INCLUDE=-I$IV_DIR/include dnl a standard? place else echo " not in $IV_DIR" IV_LIBS="-lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBS" fi if test -n "$IV_DIR" ; then echo "Assuming top level iv directory at $IV_DIR" echo " and libraries in $IV_LIBDIR" else echo "Assuming InterViews in a standard? place." fi else # Location specified IV_DIR=$with_iv IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib if test ! -d $IV_LIBDIR ; then IV_LIBDIR="$IV_DIR"/lib fi IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS" IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la" IV_INCLUDE=-I$IV_DIR/include fi if test "$enable_carbon" = "yes" ; then IV_LIBS="$IV_LIBS -framework Carbon" IV_LIBS_LIBTOOL="$IV_LIBS_LIBTOOL -framework Carbon" fi if test "$HAVE_IV" = 1 ; then dnl Make sure that compilation and linking works: AC_MSG_CHECKING([compilation with interviews]) xLIBS=$LIBS LIBS="$IV_LIBS $LIBS" xCXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $IV_INCLUDE" AC_TRY_LINK( [#include "OS/string.h"], dnl Random include file. [String xyz;], dnl Random function to make sure link works. [AC_MSG_RESULT(ok)], [cat << EOF failed I can't compile and/or link an interviews program. If InterViews is not installed in /usr or /usr/local or /usr/local/iv, specify the proper location of the interviews tree using configure --with-iv=/where/you/put/iv The interviews headers should be in subdirectories of /where/you/put/iv/include, and the libraries should be in /where/you/put/iv/lib or /where/you/put/iv/${host_cpu}/lib (not in /where/you/put/iv/lib/ALPHA or /where/you/put/iv/lib/LINUX or some other subdirectory of lib). If you don't want interviews, but do want nrniv built with the non-gui c++ classes then specify configure --without-iv. EOF exit 1 ]) dnl Make sure we are up to date for nrn7.3 AC_MSG_CHECKING([if InterViews is up to date with respect to nrn-7.4 and later]) AC_TRY_COMPILE( [#include ], [ #if (iv_hines_version < 19) #error InterViews version is iv_hines_version #endif ], [AC_MSG_RESULT(ok)], [cat << EOF failed The installed version of InterViews is out of date. Install iv-19.tar.gz EOF exit 1 ]) CXXFLAGS=$xCXXFLAGS LIBS=$xLIBS fi ]) fi if test "$build_nrniv" = "yes" ; then if test "$HAVE_IV" = 0 ; then dnl At least build the c++ stuff that does not dnl depend on anything more than src/ivos echo "Building nrniv only with classes that do not depend on InterViews." use_ivos=yes IV_DIR="" IV_LIBS="$X_LIBS" IV_LIBS_LIBTOOL="$X_LIBS" IV_INCLUDE='-I$(top_srcdir)/src/ivos' IVOS_DIR="../ivos/libivos.la" IVOS_LIB="-livos" fi fi AC_DEFINE_UNQUOTED(HAVE_IV, $HAVE_IV, define if using InterViews) AC_SUBST(IV_LIBS) AC_SUBST(IV_LIBS_LIBTOOL) AC_SUBST(IV_INCLUDE) AC_SUBST(IVOS_DIR) AC_SUBST(IVOS_LIB) AC_SUBST(IV_LIBDIR) AC_SUBST(IVHINES) AC_LANG_POP([]) ])dnl end of AC_NRN_InterViews neuron-7.5/m4/java_support.m4000077500000000000000000000434611323325274500162130ustar00rootroot00000000000000dnl @synopsis AC_CHECK_CLASS dnl dnl AC_CHECK_CLASS tests the existence of a given Java class, either in dnl a jar or in a '.class' file. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_CHECK_CLASS],[ AC_REQUIRE([AC_PROG_JAVA]) ac_var_name=`echo $1 | sed 's/\./_/g'` dnl Normaly I'd use a AC_CACHE_CHECK here but since the variable name is dnl dynamic I need an extra level of extraction AC_MSG_CHECKING([for $1 class]) AC_CACHE_VAL(ac_cv_class_$ac_var_name, [ if test x$ac_cv_prog_uudecode_base64 = xyes; then dnl /** dnl * Test.java: used to test dynamicaly if a class exists. dnl */ dnl public class Test dnl { dnl dnl public static void dnl main( String[] argv ) dnl { dnl Class lib; dnl if (argv.length < 1) dnl { dnl System.err.println ("Missing argument"); dnl System.exit (77); dnl } dnl try dnl { dnl lib = Class.forName (argv[0]); dnl } dnl catch (ClassNotFoundException e) dnl { dnl System.exit (1); dnl } dnl lib = null; dnl System.exit (0); dnl } dnl dnl } cat << \EOF > Test.uue begin-base64 644 Test.class yv66vgADAC0AKQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 bWJlclRhYmxlDAAKAAsBAANlcnIBABVMamF2YS9pby9QcmludFN0cmVhbTsJ AA0ACQcADgEAEGphdmEvbGFuZy9TeXN0ZW0IABABABBNaXNzaW5nIGFyZ3Vt ZW50DAASABMBAAdwcmludGxuAQAVKExqYXZhL2xhbmcvU3RyaW5nOylWCgAV ABEHABYBABNqYXZhL2lvL1ByaW50U3RyZWFtDAAYABkBAARleGl0AQAEKEkp VgoADQAXDAAcAB0BAAdmb3JOYW1lAQAlKExqYXZhL2xhbmcvU3RyaW5nOylM amF2YS9sYW5nL0NsYXNzOwoAHwAbBwAgAQAPamF2YS9sYW5nL0NsYXNzBwAi AQAgamF2YS9sYW5nL0NsYXNzTm90Rm91bmRFeGNlcHRpb24BAAY8aW5pdD4B AAMoKVYMACMAJAoAAwAlAQAKU291cmNlRmlsZQEACVRlc3QuamF2YQAhAAEA AwAAAAAAAgAJAAUABgABAAcAAABtAAMAAwAAACkqvgSiABCyAAwSD7YAFBBN uAAaKgMyuAAeTKcACE0EuAAaAUwDuAAasQABABMAGgAdACEAAQAIAAAAKgAK AAAACgAAAAsABgANAA4ADgATABAAEwASAB4AFgAiABgAJAAZACgAGgABACMA JAABAAcAAAAhAAEAAQAAAAUqtwAmsQAAAAEACAAAAAoAAgAAAAQABAAEAAEA JwAAAAIAKA== ==== EOF if uudecode$EXEEXT Test.uue; then : else echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AC_FD_CC echo "configure: failed file was:" >&AC_FD_CC cat Test.uue >&AC_FD_CC ac_cv_prog_uudecode_base64=no fi rm -f Test.uue if AC_TRY_COMMAND($JAVA $JAVAFLAGS Test $1) >/dev/null 2>&1; then eval "ac_cv_class_$ac_var_name=yes" else eval "ac_cv_class_$ac_var_name=no" fi rm -f Test.class else AC_TRY_COMPILE_JAVA([$1], , [eval "ac_cv_class_$ac_var_name=yes"], [eval "ac_cv_class_$ac_var_name=no"]) fi eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`" eval "HAVE_$ac_var_name=$`echo ac_cv_class_$ac_var_val`" HAVE_LAST_CLASS=$ac_var_val if test x$ac_var_val = xyes; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi ]) dnl for some reason the above statment didn't fall though here? dnl do scripts have variable scoping? eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`" AC_MSG_RESULT($ac_var_val) ]) dnl @synopsis AC_CHECK_CLASSPATH dnl dnl AC_CHECK_CLASSPATH just displays the CLASSPATH, for the edification dnl of the user. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_CHECK_CLASSPATH],[ if test "x$CLASSPATH" = x; then echo "You have no CLASSPATH, I hope it is good" else echo "You have CLASSPATH $CLASSPATH, hope it is correct" fi ]) dnl @synopsis AC_CHECK_RQRD_CLASS dnl dnl AC_CHECK_RQRD_CLASS tests the existence of a given Java class, either in dnl a jar or in a '.class' file and fails if it doesn't exist. dnl Its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_CHECK_RQRD_CLASS],[ CLASS=`echo $1|sed 's/\./_/g'` AC_CHECK_CLASS($1) if test "$HAVE_LAST_CLASS" = "no"; then AC_MSG_ERROR([Required class $1 missing, exiting.]) fi ]) dnl @synopsis AC_JAVA_OPTIONS dnl dnl AC_JAVA_OPTIONS adds configure command line options used for Java m4 dnl macros. This Macro is optional. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Devin Weaver dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_JAVA_OPTIONS],[ AC_ARG_WITH(java-prefix, [ --with-java-prefix=PFX prefix where Java runtime is installed (optional)]) AC_ARG_WITH(javac-flags, [ --with-javac-flags=FLAGS flags to pass to the Java compiler (optional)]) AC_ARG_WITH(java-flags, [ --with-java-flags=FLAGS flags to pass to the Java VM (optional)]) JAVAPREFIX=$with_java_prefix JAVACFLAGS=$with_javac_flags JAVAFLAGS=$with_java_flags AC_SUBST(JAVAPREFIX)dnl AC_SUBST(JAVACFLAGS)dnl AC_SUBST(JAVAFLAGS)dnl AC_SUBST(JAVA)dnl AC_SUBST(JAVAC)dnl ]) dnl @synopsis AC_PROG_JAVA dnl dnl Here is a summary of the main macros: dnl dnl AC_PROG_JAVAC: finds a Java compiler. dnl dnl AC_PROG_JAVA: finds a Java virtual machine. dnl dnl AC_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!). dnl dnl AC_CHECK_RQRD_CLASS: finds if we have the given class and stops otherwise. dnl dnl AC_TRY_COMPILE_JAVA: attempt to compile user given source. dnl dnl AC_TRY_RUN_JAVA: attempt to compile and run user given source. dnl dnl AC_JAVA_OPTIONS: adds Java configure options. dnl dnl AC_PROG_JAVA tests an existing Java virtual machine. It uses the dnl environment variable JAVA then tests in sequence various common Java dnl virtual machines. For political reasons, it starts with the free ones. dnl You *must* call [AC_PROG_JAVAC] before. dnl dnl If you want to force a specific VM: dnl dnl - at the configure.in level, set JAVA=yourvm before calling AC_PROG_JAVA dnl (but after AC_INIT) dnl dnl - at the configure level, setenv JAVA dnl dnl You can use the JAVA variable in your Makefile.in, with @JAVA@. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl TODO: allow to exclude virtual machines (rationale: most Java programs dnl cannot run with some VM like kaffe). dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl dnl A Web page, with a link to the latest CVS snapshot is at dnl . dnl dnl This is a sample configure.in dnl Process this file with autoconf to produce a configure script. dnl dnl AC_INIT(UnTag.java) dnl dnl dnl Checks for programs. dnl AC_CHECK_CLASSPATH dnl AC_PROG_JAVAC dnl AC_PROG_JAVA dnl dnl dnl Checks for classes dnl AC_CHECK_RQRD_CLASS(org.xml.sax.Parser) dnl AC_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver) dnl dnl AC_OUTPUT(Makefile) dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_PROG_JAVA],[ AC_REQUIRE([AC_EXEEXT])dnl if test x$JAVAPREFIX = x; then test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT) else test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT, $JAVAPREFIX) fi test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH]) AC_PROG_JAVA_WORKS AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVA_WORKS dnl dnl Internal use ONLY. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_PROG_JAVA_WORKS], [ AC_CHECK_PROG(uudecode, uudecode$EXEEXT, yes) if test x$uudecode = xyes; then AC_CACHE_CHECK([if uudecode can decode base 64 file], ac_cv_prog_uudecode_base64, [ dnl /** dnl * Test.java: used to test if java compiler works. dnl */ dnl public class Test dnl { dnl dnl public static void dnl main( String[] argv ) dnl { dnl System.exit (0); dnl } dnl dnl } cat << \EOF > Test.uue begin-base64 644 Test.class yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= ==== EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AC_FD_CC echo "configure: failed file was:" >&AC_FD_CC cat Test.uue >&AC_FD_CC ac_cv_prog_uudecode_base64=no fi rm -f Test.uue]) fi if test x$ac_cv_prog_uudecode_base64 != xyes; then rm -f Test.class AC_MSG_WARN([I have to compile Test.class from scratch]) if test x$ac_cv_prog_javac_works = xno; then AC_MSG_ERROR([Cannot compile java source. $JAVAC does not work properly]) fi if test x$ac_cv_prog_javac_works = x; then AC_PROG_JAVAC fi fi AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test changequote(, )dnl cat << \EOF > $JAVA_TEST /* [#]line __oline__ "configure" */ public class Test { public static void main (String args[]) { System.exit (0); } } EOF changequote([, ])dnl if test x$ac_cv_prog_uudecode_base64 != xyes; then if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then : else echo "configure: failed program was:" >&AC_FD_CC cat $JAVA_TEST >&AC_FD_CC AC_MSG_ERROR(The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)) fi fi if AC_TRY_COMMAND($JAVA $JAVAFLAGS $TEST) >/dev/null 2>&1; then ac_cv_prog_java_works=yes else echo "configure: failed program was:" >&AC_FD_CC cat $JAVA_TEST >&AC_FD_CC AC_MSG_ERROR(The Java VM $JAVA failed (see config.log, check the CLASSPATH?)) fi rm -fr $JAVA_TEST $CLASS_TEST Test.uue ]) AC_PROVIDE([$0])dnl ] ) dnl @synopsis AC_PROG_JAVAC dnl dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the environment dnl variable JAVAC then tests in sequence various common Java compilers. For dnl political reasons, it starts with the free ones. dnl dnl If you want to force a specific compiler: dnl dnl - at the configure.in level, set JAVAC=yourcompiler before calling dnl AC_PROG_JAVAC dnl dnl - at the configure level, setenv JAVAC dnl dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl TODO: allow to exclude compilers (rationale: most Java programs cannot compile dnl with some compilers like guavac). dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_PROG_JAVAC],[ AC_REQUIRE([AC_EXEEXT])dnl if test "x$JAVAPREFIX" = x; then test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT) else test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX) fi test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH]) AC_PROG_JAVAC_WORKS AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_PROG_JAVAC_WORKS dnl dnl Internal use ONLY. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Stephane Bortzmeyer dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_PROG_JAVAC_WORKS],[ AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [ JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST /* [#]line __oline__ "configure" */ public class Test { } EOF if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then ac_cv_prog_javac_works=yes else AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)]) echo "configure: failed program was:" >&AC_FD_CC cat $JAVA_TEST >&AC_FD_CC fi rm -f $JAVA_TEST $CLASS_TEST ]) AC_PROVIDE([$0])dnl ]) dnl @synopsis AC_TRY_COMPILE_JAVA dnl dnl AC_TRY_COMPILE_JAVA attempt to compile user given source. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Devin Weaver dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_TRY_COMPILE_JAVA],[ AC_REQUIRE([AC_PROG_JAVAC])dnl cat << \EOF > Test.java /* [#]line __oline__ "configure" */ ifelse([$1], , , [import $1;]) public class Test { [$2] } EOF if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class then dnl Don't remove the temporary files here, so they can be examined. ifelse([$3], , :, [$3]) else echo "configure: failed program was:" >&AC_FD_CC cat Test.java >&AC_FD_CC ifelse([$4], , , [ rm -fr Test* $4 ])dnl fi rm -fr Test*]) dnl @synopsis AC_TRY_RUN_JAVA dnl dnl AC_TRY_RUN_JAVA attempt to compile and run user given source. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl The general documentation, as well as the sample configure.in, is dnl included in the AC_PROG_JAVA macro. dnl dnl @author Devin Weaver dnl @version $Id: java_support.m4 716 2004-07-22 18:04:23Z hines $ dnl AC_DEFUN([AC_TRY_RUN_JAVA],[ AC_REQUIRE([AC_PROG_JAVAC])dnl AC_REQUIRE([AC_PROG_JAVA])dnl cat << \EOF > Test.java /* [#]line __oline__ "configure" */ ifelse([$1], , , [include $1;]) public class Test { [$2] } EOF if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class && ($JAVA $JAVAFLAGS Test; exit) 2>/dev/null then dnl Don't remove the temporary files here, so they can be examined. ifelse([$3], , :, [$3]) else echo "configure: failed program was:" >&AC_FD_CC cat Test.java >&AC_FD_CC ifelse([$4], , , [ rm -fr Test* $4 ])dnl fi rm -fr Test*]) neuron-7.5/m4/libtool.m4000066400000000000000000011263111323325274500151340ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS neuron-7.5/m4/ltoptions.m4000066400000000000000000000342621323325274500155250ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) neuron-7.5/m4/ltsugar.m4000066400000000000000000000104401323325274500151430ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) neuron-7.5/m4/ltversion.m4000066400000000000000000000012731323325274500155130ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) neuron-7.5/m4/lt~obsolete.m4000066400000000000000000000137741323325274500160510ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) neuron-7.5/m4/nrnbg.m4000066400000000000000000000216711323325274500146000ustar00rootroot00000000000000AC_DEFUN([AC_NRN_BLUEGENE],[ AC_ARG_ENABLE([bluegene], AC_HELP_STRING([--enable-bluegene],[For BlueGene/L, supplies many extra configuration options]),[ if test "$enable_bluegene" = "yes" ; then with_x="no" with_memacs="no" enable_shared="no" enable_pysetup="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BGLSYS" = "" ; then BGLSYS=/bgl/BlueLight/ppcfloor/bglsys fi if test "$CC" = "" ; then CC=blrts_xlc fi if test "$CXX" = "" ; then CXX=blrts_xlc++ fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-qarch=440d -qtune=440 -O3 -qstrict -qhot" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS -g -I$BGLSYS/include" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BGL_LIBS" = "" ; then BGL_LIBS="-lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts -ldevices.rts -L/opt/ibmcmp/xlmass/bg/4.3/blrts_lib -lmass" fi if test "$BG_CHECKPOINT" = "yes" ; then NRN_DEFINE(BLUEGENE_CHECKPOINT,1,[enable the checkpointing on BlueGene hardware]) BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi if test "$LIBS" = "" ; then LIBS="-L$BGLSYS/lib $BGL_LIBS" fi am_cv_CC_dependencies_compiler_type=xlc am_cv_CXX_dependencies_compiler_type=xlc else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi NRN_DEFINE(BLUEGENE,1,[define if cross compiling for IBM BlueGene]) fi ]) AC_ARG_ENABLE([bluegeneP], AC_HELP_STRING([--enable-bluegeneP],[For BlueGene/P, supplies many extra configuration options]),[ if test "$enable_bluegeneP" = "yes" ; then with_x="no" with_memacs="no" enable_pysetup="no" enable_shared="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BG_BASE" = "" ; then BG_BASE="/bgsys/drivers/ppcfloor/" fi if test "$BG_INCLUDE" = "" ; then BG_INCLUDE="-I$BG_BASE/comm/include -I$BG_BASE/arch/include" fi if test "$PYINCDIR" = "" ; then PYINCDIR="$BG_BASE/gnu-linux/include/python2.6" fi if test "$PYLIB" = "" ; then PYLIB="-L$BG_BASE/gnu-linux/lib -lpython2.6" PYLIBDIR="$BG_BASE/gnu-linux/lib" PYLIBLINK="-L$BG_BASE/gnu-linux/lib -lpython2.6" fi if test "$LIBS" = "" ; then LIBS='-lmass' fi if test "$LDFLAGS" = "" ; then LDFLAGS='-qsmp -qnostaticlink' fi if test "$with_multisend" = "" ; then with_multisend=bgp fi if test "$CC" = "" ; then CC=mpixlc fi if test "$CXX" = "" ; then CXX=mpixlcxx fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-O3 -qarch=450d" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS $BG_INCLUDE" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BG_CHECKPOINT" = "yes" ; then NRN_DEFINE(BLUEGENE_CHECKPOINT,1,[enable the checkpointing on BlueGene hardware]) BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi if test "$deptype" = "" ; then am_cv_CC_dependencies_compiler_type=xlc am_cv_CXX_dependencies_compiler_type=xlc fi else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi NRN_DEFINE(BLUEGENE,1,[define if cross compiling for IBM BlueGene L or P]) NRN_DEFINE(BLUEGENEP,1,[define if cross compiling for IBM BlueGene/P]) fi ]) AC_ARG_ENABLE([bgPlinux], AC_HELP_STRING([--enable-bgPlinux],[For BlueGene/P mpicc, supplies many extra configuration options]),[ if test "$enable_bgPlinux" = "yes" ; then with_x="no" with_memacs="no" # enable_shared="no" enable_pysetup="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BG_BASE" = "" ; then BG_BASE="/bgsys/drivers/ppcfloor" fi BG_INCLUDE="-I$BG_BASE/comm/include -I$BG_BASE/arch/include" if test "$PYINCDIR" = "" ; then PYINCDIR="$BG_BASE/gnu-linux/include/python2.5" fi if test "$PYLIB" = "" ; then PYLIB="-L$BG_BASE/gnu-linux/lib -lpython2.5" PYLIBDIR="$BG_BASE/gnu-linux/lib" PYLIBLINK="-L$BG_BASE/gnu-linux/lib -lpython2.5" fi if test "$with_multisend" = "" ; then with_multisend=bgp fi if test "$CC" = "" ; then CC=mpicc fi if test "$CXX" = "" ; then CXX=mpicxx fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-O3 -g" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS $BG_INCLUDE" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BG_CHECKPOINT" = "yes" ; then NRN_DEFINE(BLUEGENE_CHECKPOINT,1,[enable the checkpointing on BlueGene hardware]) BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi # if test "$LDFLAGS" = "" ; then # LDFLAGS="-shared" # fi else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi NRN_DEFINE(BLUEGENE,1,[define if cross compiling for IBM BlueGene L or P]) NRN_DEFINE(BLUEGENEP,1,[define if cross compiling for IBM BlueGene/P]) fi ]) AC_ARG_ENABLE([bluegeneQ], AC_HELP_STRING([--enable-bluegeneQ],[For BlueGene/Q, supplies many extra configuration options]),[ if test "$enable_bluegeneQ" = "yes" ; then with_x="no" with_memacs="no" enable_shared="no" enable_pysetup="no" with_readline="no" java_dlopen="no" linux_nrnmech="no" if test x$with_nmodl_only != xyes ; then nmodl_build="no" if test "$BG_BASE" = "" ; then BG_BASE="/bgsys/drivers/ppcfloor/" fi if test "$BG_INCLUDE" = "" ; then BG_INCLUDE="-I$BG_BASE/comm/include -I$BG_BASE/arch/include" fi PYBASE=$BG_BASE/tools/python/bldsrc-2.6.7/Python-2.6.7 if test "$PYINCDIR" = "" ; then PYINCDIR="$PYBASE/Include -I$PYBASE" fi if test "$PYLIB" = "" ; then PYLIB="-L$PYBASE -lpython2.6" PYLIBDIR="$PYBASE" PYLIBLINK="$PYLIB" fi if test "$LIBS" = "" ; then LIBS='-lmass' fi if test "$LDFLAGS" = "" ; then LDFLAGS='-qsmp -qnostaticlink' fi if test "$with_multisend" = "" ; then with_multisend=yes fi if test "$CC" = "" ; then CC=mpixlc fi if test "$CXX" = "" ; then CXX=mpixlcxx fi if test "$MPICC" = "" ; then MPICC=$CC fi if test "$MPICXX" = "" ; then MPICXX=$CXX fi if test "$OPTFLAGS" = "" ; then OPTFLAGS="-O3 -qarch=qp -q64 -qstrict -qnohot" fi if test "$CFLAGS" = "" ; then CFLAGS="$OPTFLAGS $BG_INCLUDE" fi if test "$CXXFLAGS" = "" ; then CXXFLAGS=$CFLAGS fi if test "$BG_CHECKPOINT" = "yes" ; then NRN_DEFINE(BLUEGENE_CHECKPOINT,1,[enable the checkpointing on BlueGene hardware]) BGL_LIBS = "-lchkpt.rts $BGL_LIBS" fi if test "$deptype" = "" ; then am_cv_CC_dependencies_compiler_type=xlc am_cv_CXX_dependencies_compiler_type=xlc fi else nmodl_build="yes" fi always_call_mpi_init=yes if test "$file_open_retry" = "" ; then file_open_retry=1 fi NRN_DEFINE(BLUEGENE,1,[define if cross compiling for IBM BlueGene L or P]) NRN_DEFINE(BLUEGENEQ,1,[define if cross compiling for IBM BlueGene/Q]) fi ]) ]) dnl end of AC_NRN_BLUEGENE neuron-7.5/m4/nrnjava.m4000077500000000000000000000167401323325274500151350ustar00rootroot00000000000000dnl --with-nrnjava is the default and means that libnrnjava.so will dnl be built so that neuron can be dlopened by java AC_DEFUN([AC_JVM2_CREATE], [ AC_MSG_CHECKING([checking whether the java 2 virtual machine can be created]) xLD_LIBRARY_PATH=${LD_LIBRARY_PATH} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JLIBDIR}:${JVMLIBDIR}" export LD_LIBRARY_PATH zzzCFLAGS=$CFLAGS zzzLIBS=$LIBS CFLAGS="$CFLAGS $JCFLAGS" LIBS="$JLFLAGS $LIBS" AC_TRY_RUN([ #include #include int main() { jint res; void* jenv; JavaVM* jvm; JavaVMInitArgs args; args.version = JNI_VERSION_1_2; args.nOptions = 0; args.options = 0; args.ignoreUnrecognized = JNI_FALSE; res = JNI_CreateJavaVM(&jvm, &jenv, &args); printf("JNI_CreateJavaVM returned %d\n", res); if (res < 0) { exit(res); }else{ exit(0); } return 0; } ],[ echo "The present configuration allows initialization of the java 2 virtual" echo " machine to succeed." jvmcreate=yes ],[ echo "The test program that tests initialization of the java 2 virtual machine," echo " failed. See config.log ." echo " It may be that linking requires some more -l libraries" echo " or extended LD_LIBRARY_PATH" echo " or perhaps the java vm is not JNI_VERSION_1_2." jvmcreate=no ],[ echo "cross compiling not allowed." exit 1 ]) echo "JCFLAGS=${JCFLAGS}" echo "JLFLAGS=${JLFLAGS}" CFLAGS=$zzzCFLAGS LIBS=$zzzLIBS LD_LIBRARY_PATH=${xLD_LIBRARY_PATH} export LD_LIBRARY_PATH ]) dnl end of AC_JVM2_CREATE AC_DEFUN([AC_JVM1_CREATE], [ AC_MSG_CHECKING([checking whether the java 1 virtual machine can be created]) xLD_LIBRARY_PATH=${LD_LIBRARY_PATH} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JLIBDIR}:${JVMLIBDIR}" export LD_LIBRARY_PATH zzzCFLAGS=$CFLAGS CFLAGS="$CFLAGS $JCFLAGS $JLFLAGS" AC_TRY_RUN([ #include #include int main() { jint res; void* jenv; JavaVM* jvm; JDK1_1InitArgs args; args.version = 0x00010001; JNI_GetDefaultJavaVMInitArgs(&args); res = JNI_CreateJavaVM(&jvm, &jenv, &args); printf("JNI_CreateJavaVM returned %d\n", res); if (res < 0) { exit(res); }else{ exit(0); } return 0; } ],[ echo "The present configuration allows initialization of the java 1 virtual" echo " machine to succeed." jvmcreate=yes ],[ echo "The test program that tests initialization of the java 1 virtual machine," echo " failed. See config.log ." echo " It may be that linking requires some more -l libraries" echo " or extended LD_LIBRARY_PATH" echo " or perhaps the java vm is not 0x00010001." jvmcreate=no ],[ echo "cross compiling not allowed." exit 1 ]) echo "JCFLAGS=${JCFLAGS}" echo "JLFLAGS=${JLFLAGS}" CFLAGS=$zzzCFLAGS LD_LIBRARY_PATH=${xLD_LIBRARY_PATH} export LD_LIBRARY_PATH ]) dnl end of AC_JVM1_CREATE AC_DEFUN([AC_NRN_JAVA], [ if test "$with_nrnjava" = "" ; then with_nrnjava=no # Maybe someday it will be the default fi dnl however if neosim is requested then nrnjava is not optional if test "$with_neosim" = "" ; then with_neosim=no fi AC_ARG_WITH([neosim], AC_HELP_STRING([--with-neosim],[Compile with USENEOSIM defined]) AC_HELP_STRING([--without-neosim],[This is the default]) ,[ if test "[$with_neosim]" = "yes" ; then echo "Allow use of neosim. This also forces with-nrnjava." NRN_DEFINE([USENEOSIM], 1, [define if want to use NEOSIM]) with_nrnjava=yes else echo "Do not compile neosim specific code." fi ])dnl AC_ARG_ENABLE([ncs], AC_HELP_STRING([--enable-ncs],[Compile with USENCS defined - Allows NCS to use NEURON]) AC_HELP_STRING([--disable-ncs],[This is the default]) ,[ if test "$enable_ncs" = "yes" ; then if test "[$with_neosim]" = "yes" ; then AC_MSG_ERROR([Cannot combine enable-ncs and with-neosim]) else echo "Allow NCS to use NEURON." NRN_DEFINE([USENCS], 1, [define if want to be usable by NCS]) fi else echo "Do not compile NCS specific code." fi ])dnl AC_ARG_WITH(nrnjava, AC_HELP_STRING([--with-nrnjava],[Must explicitly use it if you want it. Enable the java interface. This builds libnrnjava.so and makes the NrnJava class available in hoc.]) AC_HELP_STRING([--without-nrnjava],[No java interface. This is the default]) ,[ if test "$with_nrnjava" = "no" ; then dnl take away with the left what has been given with the right echo "Not building the nrnjava interface" build_nrnjava=no else build_nrnjava=yes fi ]) if test "$build_nrnjava" = "yes" ; then echo "Build the nrnjava interface" dnl EXEEXT is used by java tests and that does not work if not using C AC_LANG_PUSH([C]) if test "$JAVAC" = "" ; then JAVAC=javac fi if test "$JAVA" = "" ; then JAVA=java fi if test "$JAVAH" = "" ; then JAVAH=javah fi if test "$JNI_INCLUDE_FLAGS" = "" ; then AC_JNI_INCLUDE_DIR JNI_INCLUDE_DIR="" for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS ; do JNI_INCLUDE_FLAGS="$JNI_INCLUDE_FLAGS -I$JNI_INCLUDE_DIR" done JDKDIR="$_JTOPDIR" fi echo "JDKDIR=$JDKDIR" jvm_do_test=yes if test $host_os = cygwin ; then jvm_do_test=no NRN_DEFINE(USEJVM,2,[1 then version 0x00010001, 2 then JNI_VERSION_1_2]) NRN_DEFINE(USENRNJAVA,1,[if 1 then NrnJava will be a class in hoc]) fi if test "$JVM_LIB_FLAGS" = "" ; then case "$host_os" in darwin*) JVM_LIB_FLAGS="-framework JavaVM" JVM_RPATH="" ;; cygwin*) JVM_LIB_FLAGS="" JVM_RPATH="" ;; *) if test -z "$JVMLIBDIR" ; then if test -z "$JDKDIR" ; then echo "Cannot determine JVMLIBDIR without JDKDIR" exit 1 fi xjava=`find $JDKDIR/jre -name libjvm\* -print|sed -n 1p` echo "Found a path to the libjvm" echo "$xjava" xjava=`echo $xjava | sed -n 's;\(.*\)/libjvm.*;\1;p'` JVMLIBDIR=$xjava echo "Determined JVMLIBDIR=$JVMLIBDIR" fi JLIBDIR=`echo $JVMLIBDIR | sed 's;/[[^/]]*$;;'` echo "JLIBDIR=$JLIBDIR" JVM_LIB_FLAGS="-L$JLIBDIR -L$JVMLIBDIR -ljvm -lpthread" JVM_RPATH="-R $JLIBDIR -R $JVMLIBDIR" ;; esac fi echo "Using JNI_INCLUDE_FLAGS=\"${JNI_INCLUDE_FLAGS}\"" echo "Using JVM_LIB_FLAGS=\"${JVM_LIB_FLAGS}\"" dnl Test if the java virtual machine version 2 can be created dnl returns jvmcreate as yes or no if test $jvm_do_test = "yes" ; then JCFLAGS="$JNI_INCLUDE_FLAGS" JLFLAGS="$JVM_LIB_FLAGS" AC_JVM2_CREATE if test "$jvmcreate" = "no" ; then JCFLAGS="$JNI_INCLUDE_FLAGS" JLFLAGS="$JVM_LIB_FLAGS" AC_JVM1_CREATE if test "$jvmcreate" = "no" ; then echo "Assuming that the test failed because" echo "JVMLIBS=\"${JVMLIBS}\"" echo "is missing some paths and/or libraries", look echo "for examples of machine and java specific values for JVMLIBS in" echo "ftp://ftp.neuron.yale.edu/neuron/unix/jvmlibs" echo "If you don't see yours in the list and you figure out the" echo "correct value send it to me at michael.hines@yale.edu." exit 1 else NRN_DEFINE(USEJVM,1,[1 then version 0x00010001, 2 then JNI_VERSION_1_2]) NRN_DEFINE(USENRNJAVA,1,[if 1 then NrnJava will be a class in hoc]) fi else NRN_DEFINE(USEJVM,2,[1 then version 0x00010001, 2 then JNI_VERSION_1_2]) NRN_DEFINE(USENRNJAVA,1,[if 1 then NrnJava will be a class in hoc]) fi fi if test "$java_dlopen" = "yes" ; then AC_MSG_NOTICE([Use the dlopen technique to load the jvm]) NRN_DEFINE(JVM_DLOPEN,1,[if defined then try to dlopen the jvm]) NRNJAVA_LIBS="-lnrnjava" NRNJAVA_LIBLA="../nrnjava/libnrnjava.la" else NRNJAVA_LIBS="-lnrnjava $JLFLAGS $JVM_RPATH" NRNJAVA_LIBLA="../nrnjava/libnrnjava.la $JLFLAGS $JVM_RPATH" fi NRNJAVA_DEP="../nrnjava/libnrnjava.la" AC_CHECK_CLASSPATH AC_PROG_JAVAC AC_PROG_JAVA AC_SUBST(JAVAH) AC_SUBST(JDKDIR) AC_SUBST(JNI_INCLUDE_FLAGS) AC_LANG_POP([]) else NRNJAVA_LIBS="" NRNJAVA_LIBLA="" NRNJAVA_DEP="" fi AC_SUBST(NRNJAVA_LIBLA) AC_SUBST(NRNJAVA_LIBS) AC_SUBST(NRNJAVA_DEP) ]) neuron-7.5/m4/nrnpython.m4000077500000000000000000000213041323325274500155250ustar00rootroot00000000000000dnl distutils.sysconfig.get_python_version() dnl distutils.sysconfig.get_python_inc() AC_DEFUN([AC_NRN_PYCONF],[ dnl determine configuration if able to run python ac_nrn_pyconf_val="" ac_nrn_pyconf_val=`$4 -c "import distutils.sysconfig print (distutils.sysconfig.$2)" | tr -d '\r'` if test $? != 0 ; then AC_MSG_ERROR([could not run python in order to determine a configuration variable.]) fi if test "$ac_nrn_pyconf_val" = "" -o "$ac_nrn_pyconf_val" = "None" ; then [$1]=[$3] echo "[$2] '$ac_nrn_pyconf_val' returning '$[$1]'" else [$1]=${ac_nrn_pyconf_val} echo "[$2] '$ac_nrn_pyconf_val'" fi ]) AC_DEFUN([AC_NRN_RUNPYTHON], [ AC_MSG_CHECKING([if python include files and libraries work]) zzzLD_LIBRARY_PATH=${LD_LIBRARY_PATH} LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PYLIBDIR}" export LD_LIBRARY_PATH zzzCFLAGS="$CFLAGS" zzzLIBS="$LIBS" CFLAGS="$CFLAGS -I${PYINCDIR}" LIBS="${PYLIBLINK} $LIBS" AC_TRY_LINK([ #include ],[ Py_Initialize(); Py_Finalize(); return 0; ],[ AC_MSG_RESULT(yes) ],[ AC_MSG_ERROR(could not run a test that used the python library. Examine config.log to see error details. Something wrong with PYLIB=$PYLIB or PYLIBDIR=$PYLIBDIR or PYLIBLINK=$PYLIBLINK or PYINCDIR=$PYINCDIR ) ],[ AC_MSG_ERROR(Cross compiling not allowed) ]) CFLAGS="$zzzCFLAGS" LIBS="$zzzLIBS" LD_LIBRARY_PATH="$zzzLD_LIBRARY_PATH" export LD_LIBRARY_PATH ]) AC_DEFUN([AC_NRN_PYTHON],[ NRNPYTHON_LIBLA="" NRNPYTHON_LIBS="" NRNPYTHON_DEP="" NRNPYTHON_INCLUDES="" npy_NRNPYTHON_INCLUDES="" NRNPYTHON_PYLIBLINK="" NRNPYTHON_PYMAJOR=2 PY2TO3="2to3" build_nrnpython=no build_nrnpython_dynamic=no npy_apiver="" npy_pyver10="" AC_ARG_ENABLE([pysetup], AC_HELP_STRING([--enable-pysetup=[installoption]], [Execute 'python setup.py install installoption' as the last installation step. --disable-pysetup or an installoption of 'no' means do NOT execute 'python setup.py...' The default installoption is '--home='] ), [ac_pysetup="$enableval"], [ac_pysetup='--home=$(prefix)'] ) if test "$ac_pysetup" = "yes" ; then ac_pysetup='--home=$(prefix)' fi AC_ARG_WITH([nrnpython], AC_HELP_STRING([--with-nrnpython=[desired python binary or 'dynamic']], [Python interpreter can be used (default is NO) Probably need to set PYLIBDIR to find libpython... and PYINCDIR to find Python.h ]), [ac_nrn_python="$withval"], [ac_nrn_python=no] ) AM_CONDITIONAL(NRN_PYTHON_ON, test x$ac_nrn_python != xno) nrn_temp_cflags="$CFLAGS" AC_ARG_ENABLE([cygwin], AC_HELP_STRING([--disable-cygwin], [build as MINGW program. Only for mswin.]), [ac_nrn_cygwin=$enableval], [ac_nrn_cygwin=yes] ) AC_ARG_ENABLE([rx3d], AC_HELP_STRING([--disable-rx3d], [Do not compile the cython translated 3-d rxd features]), [ac_nrn_rx3d=$enableval], [ac_nrn_rx3d=yes] ) AC_ARG_WITH([pyexe], AC_HELP_STRING([--with-pyexe=[desired python binary (when --with-nrnpython=dynamic]]), [ac_nrn_pyexe="$withval"], [ac_nrn_pyexe="python"] ) if test "$ac_nrn_python" = "yes" ; then ac_nrn_python="$ac_nrn_pyexe" fi if test "$ac_nrn_python" = "dynamic" ; then ac_nrn_python="$ac_nrn_pyexe" build_nrnpython_dynamic="yes" NRN_DEFINE(USE_PYTHON,1,[Define if Python available]) dnl 1013 good for 2.5-2.7, 1012 good for 2.3-2.4 npy_apiver=`$ac_nrn_python -c "import sys;print (sys.api_version)"` echo "dynamic npy_apiver=$npy_apiver" if test "$MINGW" = yes ; then # every library has to have majorminor same as python AC_NRN_PYCONF(xxx,get_python_version(),2.4,$ac_nrn_python) npy_pyver10=`echo ${xxx} | sed 's/\\.//'` else AC_NRN_PYCONF(xxx,sys.version_info@<:@0@:>@,2,$ac_nrn_python) npy_pyver10=${xxx} fi echo "dynamic npy_pyver10=$npy_pyver10" NRN_DEFINE_UNQUOTED(NRNPYTHON_DYNAMICLOAD,$npy_pyver10,[Define to value of sys.version (without the dot) if dynamic loading desired]) fi if test "$ac_nrn_python" != "no" ; then ac_nrn_python=`which ${ac_nrn_python}` if test "$ac_nrn_python" = "" ; then AC_MSG_ERROR([Either python is not in the path or the specified python does not exist.]) fi echo "Python binary found ($ac_nrn_python)" PYTHON=$ac_nrn_python if test "$CYGWIN" = "yes" ; then dnl if python does not use cygwin then neither should we if test "$ac_nrn_cygwin" = "yes" ; then cygcheck "$ac_nrn_python" | grep cygwin1.dll > /dev/null if test $? != 0 ; then ac_nrn_cygwin=no with_memacs=no with_readline=no with_iv=no AC_MSG_NOTICE([Because this python is not a CYGWIN program, build as a MinGW program as though --disable-cygwin --with-readline=no --without-iv --without-memacs was invoked. That is, build a version suitable mostly as a Python extension.]) fi fi fi AC_MSG_CHECKING([nrnpython configuration]) NRN_DEFINE(USE_PYTHON,1,[define if Python available]) if test "$PYVER" = "" ; then AC_NRN_PYCONF(xxx,get_python_version(),2.4,$ac_nrn_python) PYVER=${xxx} #Notice how brackets are escaped AC_NRN_PYCONF(xxx,sys.version_info@<:@0@:>@,2,$ac_nrn_python) #following only for 2.7 and 3.x #AC_NRN_PYCONF(xxx,sys.version_info.major,2,$ac_nrn_python) NRNPYTHON_PYMAJOR=${xxx} fi NRNPYTHON_PYVER="$PYVER" if test "$PYINCDIR" = "" ; then AC_NRN_PYCONF(xxx,get_python_inc(0),"",$ac_nrn_python) if test "$xxx" = "" ; then AC_MSG_ERROR([cannot determine python include directory. Need to explicitly specify PYINCDIR]) else if test "$CYGWIN" = "yes" ; then xxx="`cygpath -u $xxx`" ; fi PYINCDIR="${xxx}" fi fi if test "$EXTRAPYLIBS" = "" ; then AC_NRN_PYCONF(EXTRAPYLIBS,get_config_var('LIBS'),"",$ac_nrn_python) fi setup_extra_link_args=extra_link_args case "$host_os" in darwin*) setup_extra_link_args='#extra_link_args' ;; esac dnl standard hopefully if test "$PYLIB" = "" ; then AC_NRN_PYCONF(gcfLIBRARY, get_config_var('LIBRARY'),"",$ac_nrn_python) AC_NRN_PYCONF(gcfLIBDIR, get_config_var('LIBDIR'),"",$ac_nrn_python) AC_NRN_PYCONF(gcfLIBS, get_config_var('LIBS'),"",$ac_nrn_python) AC_NRN_PYCONF(gcfMODLIBS, get_config_var('MODLIBS'),"",$ac_nrn_python) PYLIB=`echo $gcfLIBRARY|sed 's/lib\(.*\)\.a/\1/'` if test "$PYLIB" != "" ; then PYLIBDIR="$gcfLIBDIR" PYLIBLINK="-L$PYLIBDIR -l$PYLIB $gcfLIBS $gcfMODLIBS" PYLIB="$PYLIBLINK -R$PYLIBDIR" fi fi if test "$PYLIB" = "" ; then case "$host_os" in darwin*) AC_NRN_PYCONF(xxx,get_config_var('LINKFORSHARED'),"",$ac_nrn_python) PYLIBLINK="$xxx" PYLIB="$PYLIBLINK" ;; *) AC_NRN_PYCONF(xxx,get_config_var('LINKFORSHARED'),"",$ac_nrn_python) PYLINKFORSHARED="$xxx" if test "$host_os" = "cygwin" ; then AC_NRN_PYCONF(xxx,get_config_var('LIBPL'),"",$ac_nrn_python) else AC_NRN_PYCONF(xxx,get_config_var('LIBDIR'),"",$ac_nrn_python) fi if test "$xxx" == "" ; then xxx=1 if test "$host_os" = "cygwin" -a "$ac_nrn_cygwin" = "no" ; then PYLIBDIR="`dirname $ac_nrn_python`/libs" if test -d "$PYLIBDIR" ; then PYLIB="`ls $PYLIBDIR/libpython*.a 2> /dev/null`" if test "$PYLIB" != "" ; then PYLIB=`basename "$PYLIB" | sed 's/lib\(.*\)\.a/\1/'` PYLIBLINK="-L${PYLIBDIR} -l${PYLIB}" PYLIB="${PYLIBLINK}" xxx=0 fi fi fi if test "$xxx" = 1 ; then AC_MSG_ERROR([Could not determine PYLIBDIR, explicitly set PYLIBDIR, PYLIB, and PYLIBLINK.]) fi else PYLIBDIR="${xxx}" PYLIBLINK="-L${PYLIBDIR} -lpython${PYVER} ${EXTRAPYLIBS}" PYLIB="${PYLIBLINK} ${PYLINKFORSHARED} -R${PYLIBDIR}" fi ;; esac fi if test "$build_nrnpython_dynamic" = "no" ; then NRNPYTHON_LIBS="-lnrnpython $PYLIB" NRNPYTHON_LIBLA="../nrnpython/libnrnpython.la $PYLIB" NRNPYTHON_DEP="../nrnpython/libnrnpython.la" NRNPYTHON_INCLUDES="-I${PYINCDIR}" NRNPYTHON_EXEC="${ac_nrn_python}" build_nrnpython=yes if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = "no" ; then CFLAGS="-mno-cygwin $CFLAGS" fi fi if test "$enable_bluegene" != yes ; then AC_NRN_RUNPYTHON fi fi NRNPYTHON_PYLIBLINK="$PYLIBLINK" npy_NRNPYTHON_INCLUDES="-I${PYINCDIR}" build_nrnpython=yes fi if test "$CYGWIN" = "yes" ; then if test "$ac_nrn_cygwin" = "no" ; then CFLAGS="$nrn_temp_cflags" fi fi rxd_mingw_args='-c mingw32' if test $NRNPYTHON_PYMAJOR -gt 2 ; then rxd_mingw_args='' pypath=`dirname $NRNPYTHON_EXEC` if test -x $pypath/2to3 ; then PY2TO3=$pypath/2to3 fi fi AC_SUBST(ac_pysetup) AC_SUBST(NRNPYTHON_LIBLA) AC_SUBST(NRNPYTHON_LIBS) AC_SUBST(NRNPYTHON_DEP) AC_SUBST(NRNPYTHON_INCLUDES) AC_SUBST(NRNPYTHON_DEFINES) AC_SUBST(NRNPYTHON_EXEC) AC_SUBST(NRNPYTHON_PYLIBLINK) AC_SUBST(setup_extra_link_args) AC_SUBST(rxd_mingw_args) AC_SUBST(NRNPYTHON_PYMAJOR) AC_SUBST(NRNPYTHON_PYVER) AC_SUBST(PY2TO3) AC_SUBST(PYTHON) AC_SUBST(npy_NRNPYTHON_INCLUDES) AC_SUBST(npy_apiver) AC_SUBST(npy_pyver10) ]) dnl end of AC_NRN_PYTHON neuron-7.5/m4/nrnrt.m4000066400000000000000000000021221323325274500146230ustar00rootroot00000000000000AC_DEFUN([AC_NRN_REALTIME],[ AC_ARG_ENABLE([realtime], AC_HELP_STRING([--enable-realtime],[rtlinux dynamic clamp]),[ if test "$enable_realtime" = "yes" ; then NRN_DEFINE(NRN_REALTIME,1,[define if want to use as rtlinux dynamic clamp]) if test "$NRN_REALTIME_INCLUDE" = "" ; then NRN_REALTIME_INCLUDE="-I/home/hines/rtlinux/realtime/include" fi if test "$NRN_REALTIME_LIB" = "" ; then NRN_REALTIME_LIB="-L/home/hines/rtlinux/realtime/lib -llxrt -lpthread" fi LIBS="$LIBS $NRN_REALTIME_LIB" fi ]) AC_ARG_ENABLE([NI6229], AC_HELP_STRING([--enable-NI6229], [use National Instruments PCI-6229 DAQ]) ,[ NIDDK="/home/hines/rtlinux/ni/niddk" NRNNI_LIBS="-lni6229" NRNNI_LIBLA="../ni_pci_6229/libni6229.la" NRNNI_DEP="../ni_pci_6229/libni6229.la" NRN_DEFINE(NRN_6229, 1, [define if have National Instruments PCI-6229 DAQ]) ],[ NIDDK="" NRNNI_LIBLA="" NRNNI_LIBS="" NRNNI_DEP="" ] ) AC_SUBST(NRN_REALTIME_INCLUDE) AC_SUBST(NIDDK) AC_SUBST(NRNNI_LIBLA) AC_SUBST(NRNNI_LIBS) AC_SUBST(NRNNI_DEP) AM_CONDITIONAL(BUILD_6229, test x$enable_NI6229 = xyes) ]) dnl end of AC_NRN_REALTIME neuron-7.5/m4/oddities.m4000077500000000000000000000041301323325274500152700ustar00rootroot00000000000000dnl special problem work arounds AC_DEFUN([AC_NRN_ODDITIES],[ dnl bison exists but it doesnt work if test -z "$mlh_yacc" ; then case "$host" in alpha-cray-unicosmk* ) echo "Setting YACC=yacc since bison once didn't work on this machine at SDSC" YACC=yacc ;; esac fi dnl parse or lex does not compile case "$host" in alpha-cray-unicosmk* ) echo "Touching *.y and *.l since on this machine the distributed" echo "c files may not compile." touch `find . -name \*.\[[yl\]] -print` ;; esac dnl g++-2.8.1 compiler internal errors if test -z "$mlh_cxxflag" ; then if test "$GXX"='yes' ; then zzz="`$CXX -v 2>&1 | sed -n '2s/ /_/gp'`" case "$zzz" in *version_2.8.1 ) dnl -O fails on deck2_6.cpp and xfont.cpp echo "Compiling several c++ files will fail with an internal error" echo "because of a g++-2.8.1 optimization bug. Setting CXXFLAGS=-g" CXXFLAGS=-g ;; esac fi fi dnl Too many ld warnings if test -z "$mlh_ldflag" ; then case "$host_os" in irix6* ) echo "This machine gives so many ld warnings that it fails. So:" echo "setting LDFLAGS=-w" LDFLAGS="$LDFLAGS -w" ;; darwin6* ) LDFLAGS="$LDFLAGS -Wl,-bind_at_load" echo "This machine requires LDFLAGS=$LDFLAGS" ;; esac fi dnl Does a signal call need a cast for the handler. AC_LANG_PUSH([C++]) AC_TRY_LINK([ #include RETSIGTYPE sighand(int) {} ],[ signal(SIGUSR1, sighand); return 0; ],[ echo "The signal function does not need a cast for the handler" ],[ AC_TRY_LINK([ #include RETSIGTYPE sighand(int) {} ],[ signal(SIGUSR1, (RETSIGTYPE(*)(...))sighand); return 0; ],[ AC_DEFINE(SIGNAL_CAST,RETSIGTYPE(*)(...),[define if RETSIGTYPE(*)(int) is not the prototype for a signal handler]) echo "The signal function needs a cast to RETSIGTYPE(*)(...) for the handler" ],[ echo "The signal function needs an unknown cast for the handler" echo "Neither RETSIGTYPE (*)(int) or RETSIGTYPE (*)(...) are correct prototypes." ]) ]) AC_LANG_POP([]) dnl see src/mac/after_install . Allow safe changing of install_name case "$host_os" in darwin*) LDFLAGS="$LDFLAGS -headerpad_max_install_names" ;; esac ])dnl end of AC_NRN_ODDITIES neuron-7.5/m4/parcon.m4000077500000000000000000000041731323325274500147550ustar00rootroot00000000000000AC_DEFUN([AC_NRN_ParallelContext],[ xLIBS="$LIBS" dnl does PVM exist. specifically pvm3.h if test "$use_mpi" = "no" ; then AC_CHECK_HEADER($PVM_ROOT/include/pvm3.h, [ PVM_INCLUDES='-I${PVM_ROOT}/include' PVM_XTRA_LIBS="`sed -n '/^ARCHLIB/s/[[^-]]*//p' ${PVM_ROOT}/conf/${PVM_ARCH}.def`" echo "PVM_XTRA_LIBS=$PVM_XTRA_LIBS" PVM_LIBS='-L${PVM_ROOT}/lib/${PVM_ARCH} -lpvm3' tPVM_LIBS="-L${PVM_ROOT}/lib/${PVM_ARCH} -lpvm3 ${PVM_XTRA_LIBS}" LIBS="$tPVM_LIBS $LIBS" AC_CHECK_LIB(pvm3,pvm_parent,[ NRN_DEFINE(HAVE_PVM3_H,1,[define if pvm3.h exists]) AC_CHECK_LIB(pvm3,pvm_pkmesg,[ NRN_DEFINE(HAVE_PKMESG,1,[define if pvm_pkmesg in the -lpvm3 library]) ]) ],[ echo "There is a pvm3.h but I can't link with -lpvm3" echo "So not using pvm afterall." PVM_INCLUDES="" PVM_LIBS="" tPVM_LIBS="" case "$host_os" in irix6* ) echo "This is a $host so if you want to use ParallelContext under PVM" echo "you probably need to rebuild" echo "everything (including interviews) with the environment variables" if test "$GCC"='yes' ; then echo setenv CC '"'"$CC -mabi=64"'"' else echo setenv CC '"'"$CC -64"'"' fi if test "$GXX"='yes' ; then echo setenv CXX '"'"$CXX -mabi=64"'"' else echo setenv CXX '"'"$CXX -64"'"' fi ;; esac ]) LIBS="$xLIBS" ]) else dnl use_mpi is not "no" so avoid pvm PVM_INCLUDES="" PVM_LIBS="" tPVM_LIBS="" PVM_XTRA_LIBS="" fi dnl Check for SIGPOLL and verify that it works echo AC_LANG_PUSH([C++]) AC_TRY_RUN([ #include #include #include #include #include int main() { int fd, arg; sighold(SIGPOLL); fd = fileno(popen("ls", "r")); if (ioctl(fd, I_GETSIG, &arg) < 0 && errno != EINVAL) { exit(1); } exit(0); return 0; } ],[ NRN_DEFINE(HAVE_SIGPOLL,1,[define if SIGPOLL in signal.h]) echo "do SIGPOLL and I_GETSIG work: yes" ],[ echo "do SIGPOLL and I_GETSIG work: no" echo " But see config.log to see why it failed." ],[ echo "cross compiling: Assume HAVE_SIGPOLL is 0" ]) AC_LANG_POP([]) dnl Check for STL AC_CXX_HAVE_STL AC_SUBST(PVM_INCLUDES) AC_SUBST(PVM_XTRA_LIBS) AC_SUBST(PVM_LIBS) ])dnl end of AC_NRN_ParallelContext neuron-7.5/m4/pkg.m4000066400000000000000000000240051323325274500142450ustar00rootroot00000000000000dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR neuron-7.5/m4/readline.m4000077500000000000000000000073021323325274500152530ustar00rootroot00000000000000 dnl This was ripped out of the readline-4.0 distribution. It defines the dnl variable TERMCAP_LIB, which tells us what to link memacs with. dnl AC_DEFUN([AC_NRN_READLINE],[ dnl decide whether we want to disable all terminal capabilities if test "$with_memacs" = "" ; then with_memacs=yes fi AC_ARG_WITH(memacs, AC_HELP_STRING([--without-memacs],[leave out everything that depends on terminal cursor capabilities]) ) if test "$with_memacs" = "yes" ; then dnl begining of with_memacs NRN_CHECK_LIB_TERMCAP AC_SUBST(TERMCAP_LIB) AC_SUBST(TERMCAP_CFLAGS) dnl Check for the readline library. if test "$with_readline" = ""; then if test "$CYGWIN" = "yes" ; then with_readline=no #use ours. we hacked so neuron exits when rxvt closed. else with_readline=yes # Readline should be there. fi fi AC_ARG_WITH(readline, AC_HELP_STRING([-with-readline=dir],[Specify the location of the readline library. You must specify this option if readline is not located in a standard place. The configure script looks for the library in the subdirectory lib underneath the directory you specify.]) , [if test "$with_readline" = "yes"; then # default READLINE_LIBS="-lreadline $TERMCAP_LIB" elif test "$with_readline" = "no" ; then # build our own echo "build our own version of libreadline" READLINE_LIBS="-lreadline $TERMCAP_LIB" build_readline=yes NRN_READLINE_LIBS="../readline/libreadline.la $TERMCAP_LIB" NRN_READLINE_DEP="../readline/libreadline.la" else # Location of readline specified? READLINE_LIBS="-L$with_readline/lib -lreadline $TERMCAP_LIB" fi xLIBS="$LIBS" if test "$build_readline" != "yes" ; then AC_MSG_CHECKING([checking compilation with -lreadline]) LIBS="$LIBS $READLINE_LIBS" build_readline=no NRN_READLINE_LIBS="$READLINE_LIBS" NRN_READLINE_DEP="" AC_TRY_LINK([extern char * rl_deprep_terminal();], [rl_deprep_terminal()], [AC_MSG_RESULT(ok)], [cat << EOF failed Link with the readline library failed. Will attempt to compile and link with the older version of readline that comes with this installation. If this is not what you want, i.e. you want to use the latest gnu version of readline and it is not installed in a standard place (e.g., /usr/lib or /usr/local/lib), you must specify the proper location of libreadline using configure --with-readline=/where/you/put/it The file libreadline.a (or libreadline.so or whatever) should be located in /where/you/put/it/lib. If you don't have readline installed, you can get it from the GNU web site, www.gnu.org. EOF build_readline="yes" NRN_READLINE_LIBS="../readline/libreadline.la $TERMCAP_LIB" NRN_READLINE_DEP="../readline/libreadline.la" ]) fi LIBS="$xLIBS" # Put the library flags back. ],[cat << EOF The GNU readline library must be installed somewhere on your system before you can compile neuron. If you don't have it anywhere, you can get it from the GNU web site, www.gnu.org. If you install it in a non-standard location, you must specify its location to this configure procedure using configure --with-readline=/where/you/put/it/lib EOF exit 1 ]) MEMACSLIB="-lmemacs" MEMACSLIBLA="../memacs/libmemacs.la" else dnl end of with_memacs and beginning of without_memacs echo "no memacs or anything else that depends on terminal capabilities" READLINE_LIBS="" NRN_READLINE_LIBS="" NRN_READLINE_DEP="" TERMCAP_LIB="" AC_SUBST(TERMCAP_LIB) AC_DEFINE(WITHOUT_MEMACS,1,[define if no terminal capabilities]) MEMACSLIB="" MEMACSLIBLA="" fi AC_SUBST(READLINE_LIBS) AC_SUBST(NRN_READLINE_LIBS) AC_SUBST(NRN_READLINE_DEP) AM_CONDITIONAL(BUILD_MEMACS, test x$with_memacs = xyes) AC_SUBST(MEMACSLIB) AC_SUBST(MEMACSLIBLA) ])dnl end of AC_NRN_READLINE neuron-7.5/m4/withmpi.m4000077500000000000000000000132651323325274500151560ustar00rootroot00000000000000AC_DEFUN([AC_NRN_WITH_MPI],[ MPICCnrnmpi=$CC AC_ARG_WITH(mpi, AC_HELP_STRING([--with-mpi],[Also compile the parallel code in src/sundials/shared]) AC_HELP_STRING([--without-mpi],[This is the default. Do not compile the parallel sundials code]) ,[ if test "$with_mpi" = "yes" ; then ACX_MPI([ use_mpi=yes NRN_DEFINE(NRNMPI,1,[Define if you want MPI specific features.]) AC_LANG_PUSH([C++]) ACX_MPI([use_mpi=yes]) AC_LANG_POP() dnl The following is the only way I can figure out how to use mpicc or mpicxx dnl since libtool complains when CC=mpicc that there is no tag. dnl Therefore when mpicc is desired a LIBTOOLTAG = --tag=CC is put into dnl the Makefile.am. Hopefully the following will always take precedence dnl over the AC_SUBST in AC_PROC_LIBTOOL dnl The latest version of automake and libtool now seem to handle tags dnl so we commnt out the next two lines. However we still need it dnl for nrnivmodl. dnl LIBTOOL='$(SHELL) $(top_builddir)/libtool $(LIBTOOLTAG)' dnl AC_SUBST(LIBTOOL) if test "$nrnmpi_dynamic" = "no" ; then CC=$MPICC CXX=$MPICXX fi MPICCnrnmpi=$MPICC LIBTOOLTAG='--tag=CC' dnl AC_SUBST(CC) dnl AC_SUBST(CXX) AC_SUBST(LIBTOOLTAG) ],[ AC_MSG_ERROR([Cannot compile MPI program]) ]) else use_mpi=no fi ],[ use_mpi=no ]) ])dnl end of AC_NRN_WITH_MPI AC_DEFUN([AC_NRN_PARANEURON],[ AC_ARG_WITH(paranrn, AC_HELP_STRING([--with-paranrn],[parallel variable step integration for individual cells]) AC_HELP_STRING([--with-paranrn=dynamic],[as above, but with dynamic loading of mpi shared libaries]) AC_HELP_STRING([--without-paranrn],[default. No parallel integration]) ,[ nrnmpi_dynamic="no" if test "$with_paranrn" = "dynamic" ; then with_paranrn=yes nrnmpi_dynamic="yes" NRN_DEFINE(NRNMPI_DYNAMICLOAD,1,[define to 1 if you want mpi dynamically loaded instead of linked normally]) fi if test "$with_paranrn" = "yes" ; then with_mpi=yes use_paranrn=yes NRN_DEFINE(PARANEURON,1,[Define if allowing distributed variable step integration]) else use_paranrn=no fi ],[ nrnmpi_dynamic="no" use_paranrn=no ]) AC_ARG_WITH(multisend, AC_HELP_STRING([--with-multisend],[Allow optional MPI_ISend/Recv for spike transfer]) AC_HELP_STRING([--with-multisend=bgp],[Use BlueGene/P style dma spike transfer]) AC_HELP_STRING([--with-multisend=all],[Allow ISend or BGP style dma]) AC_HELP_STRING([--with-multisend=allreplay],[Allow ISend or BGP style dma, and with possiblity of Record/Replay]) ,[ if test "$with_multisend" = "yes" ; then with_mpi=yes use_bgpdma=yes NRN_DEFINE(BGPDMA,1, [Define bits for BGPDMA & 1 (ISend) & 2 (DMA spike transfer) & 4 (DMA Record Replay)]) elif test "$with_multisend" = "bgp" ; then with_mpi=yes use_bgpdma=yes NRN_DEFINE(BGPDMA,2,[Define bits for BGPDMA & 1 (ISend) & 2 (DMA spike transfer) & 4 (DMA Record Replay)]) elif test "$with_multisend" = "all" ; then with_mpi=yes use_bgpdma=yes NRN_DEFINE(BGPDMA,3,[Define bits for BGPDMA & 1 (ISend) & 2 (DMA spike transfer) & 4 (DMA Record Replay)]) elif test "$with_multisend" = "allreplay" ; then with_mpi=yes use_bgpdma=yes NRN_DEFINE(BGPDMA,7,[Define bits for BGPDMA & 1 (ISend) & 2 (DMA spike transfer) & 4 (DMA Record Replay)]) else use_bgpdma=no NRN_DEFINE(BGPDMA,0,[Define bits for BGPDMA & 1 (ISend) & 2 (DMA spike transfer) & 4 (DMA Record Replay)]) fi if test "$use_bgpdma" = "yes" ; then NRN_DEFINE(USE_NRNFILEWRAP,1,[Define to allow possibility of rank 0 read file into buffer and broadcast to all ranks.]) fi ],[ use_bgpdma=no ]) ])dnl end of AC_NRN_PARANEURON AC_DEFUN([AC_NRN_MUSIC],[ AC_ARG_WITH(music, AC_HELP_STRING([--with-music=/prefix/of/music/installation],[Want to use the MUSIC - MUlti SImulation Coordinator]) ,[ if test ! -f "$with_music/bin/music" ; then AC_MSG_ERROR([MUSIC is not installed at the indicated location]) fi if test x$with_nrnpython = x$no ; then AC_MSG_ERROR([--with-music can be used only if --with-nrnpython is also used.]) fi with_mpi=yes with_paranrn=yes use_music=yes NRN_DEFINE(NRN_MUSIC,1,[Define if you want the MUSIC - MUlti SImulation Coordinator]) MUSIC_LIBLA="$with_music/lib/libmusic.la" MUSIC_INCDIR="$with_music/include" MUSIC_LIBDIR="$with_music/lib" ],[ use_music=no MUSIC_INCDIR='.' MUSIC_LIBDIR='.' ]) AM_CONDITIONAL(BUILD_NEURONMUSIC, test x$use_music = xyes) AC_SUBST(MUSIC_LIBLA) AC_SUBST(MUSIC_INCDIR) AC_SUBST(MUSIC_LIBDIR) ])dnl end of AC_NRN_MUSIC AC_DEFUN([AC_NRN_WITH_METIS],[ AC_ARG_WITH(metis, AC_HELP_STRING([--with-metis],[use METIS to distribute cell equations among processors]) AC_HELP_STRING([--without-metis],[default.]) ,[ if test "$with_metis" != "no" ; then use_metis=yes NRN_DEFINE(METIS,1,[Define if allowing distributed variable step integration]) if test "$with_metis" != "yes" ; then METISDIR="$with_metis" else METISDIR=/home/hines/metis-4.0 fi METISINCLUDE="-I$METISDIR/Lib" METISLIB="-L$METISDIR -lmetis" METISLIBADD="$METISDIR/libmetis.a" zzzCFLAGS="$CFLAGS" zzzLIBS="$LIBS" CFLAGS="$CFLAGS $METISINCLUDE" LIBS="$METISLIB $LIBS" AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_SOURCE([ #include #include int main() { sizeof(idxtype) == sizeof(int); return 0; } ])],[ if grep 'define *IDXTYPE_INT' $METISDIR/Lib/struct.h ; then NRN_DEFINE(NRNIDXTYPE,int,[Define int or short depending on idxtype in metis struct.h]) else NRN_DEFINE(NRNIDXTYPE,short,[Define int or short depending on idxtype in metis struct.h]) fi ],[ AC_MSG_ERROR([Could not compile or link metis]) ]) AC_LANG_POP(C) CFLAGS="$zzzCFLAGS" LIBS="$zzzLIBS" else use_metis=no fi ],[ use_metis=no ]) AC_SUBST(METISINCLUDE) AC_SUBST(METISOBJADD) AC_SUBST(METISLIBADD) AC_SUBST(METISLIB) AC_SUBST(MPICCnrnmpi) ])dnl end of AC_NRN_WITH_METIS neuron-7.5/missing000077500000000000000000000153301323325274500143020ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: neuron-7.5/nmodlconf.h.in000066400000000000000000000225041323325274500154410ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ #ifndef H_nrnconf_included #define H_nrnconf_included 1 /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* define if using cygwin */ #undef CYGWIN /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* if mac os x */ #undef DARWIN /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FENV_H /* Define to 1 if you have the `fesetround' function. */ #undef HAVE_FESETROUND /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getpw' function. */ #undef HAVE_GETPW /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY /* define if using InterViews */ #undef HAVE_IV /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF /* Define to 1 if you have the `mallinfo' function. */ #undef HAVE_MALLINFO /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setitimer' function. */ #undef HAVE_SETITIMER /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* (Define if this signal exists) */ #undef HAVE_SIGBUS /* (Define if this signal exists) */ #undef HAVE_SIGSEGV /* define if the compiler has stringstream */ #undef HAVE_SSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STREAM_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `stty' function. */ #undef HAVE_STTY /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CONF_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIO_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VARARGS_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the <_G_config.h> header file. */ #undef HAVE__G_CONFIG_H /* define if can declare inline float abs(float) */ #undef INLINE_FLOAT_ABS /* define if can declare inline long abs(long) */ #undef INLINE_LONG_ABS /* undefined or ::fabs or std::fabs */ #undef IVOS_FABS /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* define if using mingw */ #undef MINGW /* define if using Mike Neubig contributions */ #undef MikeNeubig /* where the lib hoc is */ #undef NEURON_DATA_DIR /* host triplet */ #undef NRNHOST /* cpu type consistent with nrnivmodl */ #undef NRNHOSTCPU /* if 1 then dlopen nrnmech instead of special */ #undef NRNMECH_DLL_STYLE /* if nrnoc can use X11 */ #undef NRNOC_X11 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* define if RETSIGTYPE(*)(int) is not the prototype for a signal handler */ #undef SIGNAL_CAST /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define SUNDIALS data type 'realtype' as 'long double' */ #undef SUNDIALS_DOUBLE_PRECISION /* Use generic math functions */ #undef SUNDIALS_USE_GENERIC_MATH /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* define if no terminal capabilities */ #undef WITHOUT_MEMACS /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* define if using Carbon libraries */ #undef carbon /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t #if defined(__cplusplus) #include #endif #if defined(CYGWIN) || defined(MINGW) #define WIN32 1 #endif #if defined(MINGW) #define CYGWIN #endif #if defined(carbon) && defined(__cplusplus) #define MAC 1 #include #endif #endif /* H_nrnconf_included */ neuron-7.5/nrnconf.h.in000066400000000000000000000225041323325274500151250ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ #ifndef H_nrnconf_included #define H_nrnconf_included 1 /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* define if using cygwin */ #undef CYGWIN /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* if mac os x */ #undef DARWIN /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FENV_H /* Define to 1 if you have the `fesetround' function. */ #undef HAVE_FESETROUND /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getpw' function. */ #undef HAVE_GETPW /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY /* define if using InterViews */ #undef HAVE_IV /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF /* Define to 1 if you have the `mallinfo' function. */ #undef HAVE_MALLINFO /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setitimer' function. */ #undef HAVE_SETITIMER /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* (Define if this signal exists) */ #undef HAVE_SIGBUS /* (Define if this signal exists) */ #undef HAVE_SIGSEGV /* define if the compiler has stringstream */ #undef HAVE_SSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STREAM_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `stty' function. */ #undef HAVE_STTY /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CONF_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIO_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VARARGS_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the <_G_config.h> header file. */ #undef HAVE__G_CONFIG_H /* define if can declare inline float abs(float) */ #undef INLINE_FLOAT_ABS /* define if can declare inline long abs(long) */ #undef INLINE_LONG_ABS /* undefined or ::fabs or std::fabs */ #undef IVOS_FABS /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* define if using mingw */ #undef MINGW /* define if using Mike Neubig contributions */ #undef MikeNeubig /* where the lib hoc is */ #undef NEURON_DATA_DIR /* host triplet */ #undef NRNHOST /* cpu type consistent with nrnivmodl */ #undef NRNHOSTCPU /* if 1 then dlopen nrnmech instead of special */ #undef NRNMECH_DLL_STYLE /* if nrnoc can use X11 */ #undef NRNOC_X11 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* define if RETSIGTYPE(*)(int) is not the prototype for a signal handler */ #undef SIGNAL_CAST /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define SUNDIALS data type 'realtype' as 'long double' */ #undef SUNDIALS_DOUBLE_PRECISION /* Use generic math functions */ #undef SUNDIALS_USE_GENERIC_MATH /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* define if no terminal capabilities */ #undef WITHOUT_MEMACS /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* define if using Carbon libraries */ #undef carbon /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t #if defined(__cplusplus) #include #endif #if defined(CYGWIN) || defined(MINGW) #define WIN32 1 #endif #if defined(MINGW) #define CYGWIN #endif #if defined(carbon) && defined(__cplusplus) #define MAC 1 #include #endif #endif /* H_nrnconf_included */ neuron-7.5/nrnrpm.spec.in000066400000000000000000000106201323325274500154750ustar00rootroot00000000000000# # Neuron @VERSION@ and InterViews 17 spec file # # Organization: have the installed files in # /usr/local/nrn # /usr/local/iv # and then provide symbolic links to the executables from # /usr/local/bin # links to the library files are performed at the moment the # the neuron package is requested to be installed by having what # would normally be in PercentBuild in PercentInstall # # note that the version numbers (e.g. 5.3 for nrn and 15 for iv) # are excluded from the directory names # because rpm prohibits having multiple versions # of the same package. It would be possible for a user to # change their $PATH so that executables are searched for first # within their directory hierarchy - so that they can install different # versions of neuron in their home dir if they desire. Summary: Neuron for empirically-based simulations of neurons and networks of neurons. # for redhat 8 this is a hack until buildroot is understood %define __check_files %{nil} BuildRoot: /tmp/foo %define rel @RPM_RELEASE@ %define version @VERSION@ %define pkgname @PACKAGE@ %define prefix /usr # This is a hack until I can figure out how to better handle replacing # autoconf macros... (gotta love autoconf...) %define __aclocal aclocal || aclocal -I ./macros %define configure_args @RPM_CONFIGURE_ARGS@ # so that it goes into /usr/src/redhat/RPMS/i686/ instead of i386 %define _target_cpu @build_cpu@ Name: %{pkgname} Version: %{version} Release: %{rel} License: GPL Group: Sciences/Other Source: ftp://ftp.neuron.yale.edu/neuron/unix/nrn-@VERSION@.tar.gz URL: http://neuron.yale.edu/neuron/install/installunix.html Distribution: Linux Neuron Vendor: Yale University Packager: Michael Hines %description A flexible and powerful simulator of neurons and networks NEURON is a simulation environment for developing and exercising models of neurons and networks of neurons. It is particularly well-suited to problems where cable properties of cells play an important role, possibly including extracellular potential close to the membrane), and where cell membrane properties are complex, involving many ion-specific channels, ion accumulation, and second messengers. It evolved from a long collaboration between Michael Hines and John W. Moore at the Department of Neurobiology, Duke University. Their express goal was to create a tool designed specifically for solving the equations that describe nerve cells. NEURON has benefited from judicious revision and selective enhancement, guided and assisted by the growing number of neuroscientists who have incorporated empirically-based modeling into their research strategies. Their feedback and collaboration have led to many improvements. %prep # the below may be replaced by a percentsetup? # get rid of any possible remenant of previous attempts to build including symbolic # links in /usr/local/bin and /usr/local/nrn and /usr/local/iv directories ( cd /usr/local/bin rm -r -f memacs neurondemo nrnivmodl modlunit nrnpyenv.sh rm -r -f nrngui nrniv rm -r -f iclass idraw idemo cd .. ) # this is where system-wide applications are typically added # NRNDEST=/usr/local # see organization note above %build %install # # nrn bin symbolic links # ln -s /usr/local/nrn/%{_target_cpu}/bin/memacs /usr/local/bin/memacs ln -s /usr/local/nrn/%{_target_cpu}/bin/neurondemo /usr/local/bin/neurondemo ln -s /usr/local/nrn/%{_target_cpu}/bin/modlunit /usr/local/bin/modlunit ln -s /usr/local/nrn/%{_target_cpu}/bin/nrnivmodl /usr/local/bin/nrnivmodl ln -s /usr/local/nrn/%{_target_cpu}/bin/nrngui /usr/local/bin/nrngui ln -s /usr/local/nrn/%{_target_cpu}/bin/nrniv /usr/local/bin/nrniv ln -s /usr/local/nrn/%{_target_cpu}/bin/nrnpyenv.sh /usr/local/bin/nrnpyenv.sh # # iv bin symbolic links # ln -s /usr/local/iv/%{_target_cpu}/bin/iclass /usr/local/bin/iclass ln -s /usr/local/iv/%{_target_cpu}/bin/idemo /usr/local/bin/idemo ln -s /usr/local/iv/%{_target_cpu}/bin/idraw /usr/local/bin/idraw # # %files # # The files listed here are preserved after rpm installation # all other files are deleted. Recall that the listing of # a directory includes all files from that directory. # # nrn bin symbolic links # /usr/local/bin/memacs /usr/local/bin/neurondemo /usr/local/bin/modlunit /usr/local/bin/nrnivmodl /usr/local/bin/nrngui /usr/local/bin/nrniv /usr/local/bin/nrnpyenv.sh # # nrn files # /usr/local/nrn # # iv bin symbolic links # /usr/local/bin/iclass /usr/local/bin/idemo /usr/local/bin/idraw # # iv files # /usr/local/iv # neuron-7.5/nrnversion.sh000077500000000000000000000024051323325274500154440ustar00rootroot00000000000000#!/bin/sh # extract commit version info from src/nrnoc/nrnversion.h # and PACKAGE_VERSION from configure.ac if test "$NSRC" = "" ; then NSRC=$HOME/neuron/nrn fi if test -f $NSRC/src/nrnoc/nrnversion.h ; then VERHFILE=`cat $NSRC/src/nrnoc/nrnversion.h` elif test -d $NSRC/.git ; then VERHFILE=`sh $NSRC/git2nrnversion_h.sh` elif test -d $NSRC/.hg ; then VERHFILE=`sh $NSRC/hg2nrnversion_h.sh` fi ver=`sed -n '/^AC_INIT/s/^.*nrn\],\[\(.*\)\].*/\1/p' < $NSRC/configure.ac` HG=HG global=`echo "$VERHFILE" | sed -n '/HG_CHANGESET/s/.*"\(.*\)".*/\1/p'` if test "$global" = "" ; then global=`echo "$VERHFILE" | sed -n '/GIT_CHANGESET/s/.*"\(.*\)".*/\1/p'` HG=GIT fi type=`echo "$VERHFILE" | sed -n /${HG}'_BRANCH/s/.*\(".*"\).*/\1/p' | sed ' s/"trunk"/alpha/ s/"Release.*"/rel/ s/"\(.*\)"/\1/ '` local=`echo "$VERHFILE" | sed -n /${HG}'_LOCAL/s/.*"\(.*\)".*/\1/p'` base=`echo $global | sed 's/\+//'` commit=`echo "$VERHFILE" | sed -n /${HG}'_LOCAL/s/.*"\(.*\)".*/\1/p'` date=`echo "$VERHFILE" | sed -n /${HG}'_DATE/s/.*"\(.*\)".*/\1/p'` case $1 in 2) echo $ver.$type-$commit ;; 3) echo ${ver} ;; "type") echo $type ;; "commit") echo ${type}${commit} ;; "local") echo $local ;; "base") echo $base ;; "global") echo $global ;; "date") echo $date ;; *) echo $ver ;; esac neuron-7.5/share/000077500000000000000000000000001323325274500140035ustar00rootroot00000000000000neuron-7.5/share/Makefile.am000077500000000000000000000001201323325274500160330ustar00rootroot00000000000000## Files which get installed in $(prefix)/share: SUBDIRS = lib examples demo neuron-7.5/share/Makefile.in000066400000000000000000000535461323325274500160650ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = lib examples demo all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/demo/000077500000000000000000000000001323325274500147275ustar00rootroot00000000000000neuron-7.5/share/demo/Makefile.am000077500000000000000000000005551323325274500167730ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/demo SUBDIRS = release dend3 sync this_DATA = \ cycle.hoc \ d3init.hoc \ demo.hoc \ demo.ses \ dend3.ses \ hh.hoc \ hh.ses \ nomodel.hoc \ pyramid.nrn \ pyramid.ses \ reconst.hoc \ release.hoc \ release.ses \ dynchan.ses dynclamp.ses dynclamp.hoc \ singhh.hoc singhh.ses singhhchan.hoc \ testca.hoc EXTRA_DIST = $(this_DATA) neuron-7.5/share/demo/Makefile.in000066400000000000000000000605141323325274500170020ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/demo ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(thisdir)" DATA = $(this_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/demo SUBDIRS = release dend3 sync this_DATA = \ cycle.hoc \ d3init.hoc \ demo.hoc \ demo.ses \ dend3.ses \ hh.hoc \ hh.ses \ nomodel.hoc \ pyramid.nrn \ pyramid.ses \ reconst.hoc \ release.hoc \ release.ses \ dynchan.ses dynclamp.ses dynclamp.hoc \ singhh.hoc singhh.ses singhhchan.hoc \ testca.hoc EXTRA_DIST = $(this_DATA) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/demo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/demo/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-thisDATA: $(this_DATA) @$(NORMAL_INSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(thisdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(thisdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(thisdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(thisdir)" || exit $$?; \ done uninstall-thisDATA: @$(NORMAL_UNINSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(thisdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(thisdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-thisDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-thisDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-thisDATA installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-thisDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/demo/cycle.hoc000077500000000000000000000013211323325274500165210ustar00rootroot00000000000000load_file("demo.hoc") load_file("electrod.hoc") xpanel("Demo Control") cycling = 1 xbutton("Quit Cycle", "cycling = 0") xpanel() proc crun() {local i for i=1,5 if (cycling) { run() doNotify() system("sleep 2") doEvents() } } objectvar e proc cyc() {local cycle, i cycling = 1 cycle = 0 while (cycling) { cycle = cycle%4 + 1 demo(cycle) doNotify() crun() if (cycle == 1) { // switch to vc family cyckeep() e = Electrode[0] execute("installFamily()", e) execute("varyamp(1)", e) system("sleep 5") objref e } } } proc cyckeep() {local i, j for i=0, n_graph_lists - 1 { cnt = graphList[i].count() for j=0, cnt - 1 { graphList[i].object(j).family(1) } } } cyc() neuron-7.5/share/demo/d3init.hoc000077500000000000000000000015201323325274500166150ustar00rootroot00000000000000objectvar vbox { xopen("$(NRNDEMO)dend3/dend3.nrn") xopen("$(NRNDEMO)dend3/syn3.hoc") xopen("$(NRNDEMO)dend3/control.hoc") } movie_frame_dur_ = .01 {variable_domain(&movie_frame_dur_, .001, 1e9) units(&movie_frame_dur_, "s")} objref movie_timer movie_timer = new Timer("moviestep()") proc moviestep() { steprun() realtime = startsw() - rtstart if (t >= tstop || stoprun) { movie_timer.end running_ = 0 } } proc movierun() { realtime = 0 rtstart = startsw() running_ = 1 // run button checkbox stoprun = 0 stdinit() movie_timer.seconds(movie_frame_dur_) movie_timer.start } xpanel("Movie Run") xbutton("Init & Run", "movierun()") xpvalue("Seconds per step", &movie_frame_dur_, 1) xpanel(400, 300) proc destroy() { objref vbox, syn[1], movie_timer while (PWManager[0].count > 6) { PWManager[0].close(PWManager[0].count-1) } } neuron-7.5/share/demo/demo.hoc000077500000000000000000000114111323325274500163470ustar00rootroot00000000000000/* ?0 GUI NEURONDemonstrations Switches between simulations. On a switch an attempt is made to destroy all windows pertaining to the previous simulation. ? PatchHH Hodgkin Huxley Membrane patch (single compartment model) Pressing the "InitRun" button on the "RunControl" panel shows a membrane action potential. ? Stylized soma, hillock, initial axon segment, 3 dendrites, and myelinated axon. Running this simulation shows voltage at soma and near end of axon as well as movie of voltage profile along the cable. Three AlphaSynapse's are used to elicit the action potential. ? Pyramidal 3-D reconstruction of neuron obtained as example from Eutectic. Passive everywhere but soma and dendrite_5[0] instead have normal density hh channels. ? Release Fairly complicated transmitter release model in single compartment involving radial calcium diffusion, calcium pump, channel, and sodium-calcium exchange, etc. The models for these mechanisms are located in $NEURONHOME/demo/release ? Sychronizing net (artificial cells) All to all inhibitory connections between cells that intrinsically fire at a specified interval between spikes. The intrinsic firing interval varies uniformly between the "Lowest natural interval" and the "Highest natural interval". With proper delay and inhibitory connection weight, the cells will synchronize to within the variation of the intervals. ? LinearCircuit:DynamicClamp The soma contains HH k and leak channels. The synth model contains HH na channels and no capacitance. The soma is stimulated by an IClamp. The synth model is clamped to the voltage of the soma with amplifier Ac, VIc is proportional to the total membrane current through the synth model. This voltage is converted to a current by the Acmd amplfier (with help from Ai which measures the voltage across Ri) and is fed back through the current electrode Re2. ? StochasticSingleChannels: HH Several values for Nsingle are available to simulate an HH patch action potential ? Nomodel Just destroys the windows of the previous simulation leaving only the main menus. ?0 User HocCode NEURONDemonstrations */ help ?0 create soma access soma //soma delete_section() strdef demolabel demolabel = "Choose one of the demonstrations " objref tempobj { load_file("stdgui.hoc") load_file("electrod.hoc") load_file("pointman.hoc") load_file("showmech.hoc") //xopen("$(NRNDEMO)synchronize.hoc") //xopen("$(NRNDEMO)spkplot.hoc") nrnmainmenu() } proc demopanel() { xpanel("NEURON Demonstrations") xvarlabel(demolabel) xradiobutton("Patch: HH", "demo(1)") xradiobutton("Stylized", "demo(2)") xradiobutton("Pyramidal", "demo(3)") xradiobutton("Release", "demo(4)") xradiobutton("Synchronizing net (artificial cells)", "demo(5)") xradiobutton("LinearCircuit: Dynamic Clamp", "demo(6)") xradiobutton("Stochastic Single Channels: HH", "demo(7)") xradiobutton("No model", "demo(0)", 1) xpanel() } proc destroy(){} // redefined by each subdemo proc destroy1() { local i // widgets the user may have created from the gui. objectvar graphList[n_graph_lists], graphItem, flush_list, fast_flush_list for i=0,n_graph_lists-1 graphList[i] = new List(1) flush_list = new List(1) fast_flush_list = new List(1) tempobj = new List("Inserter") while (tempobj.count()) { tempobj.object(0).v1.unmap() } tempobj = new List("Electrode") while (tempobj.count()) { tempobj.object(0).v1.unmap() } tempobj = new List("PointProcessManager") while (tempobj.count()) { tempobj.object(0).v1.unmap() } tempobj = new List("ShowMechanism") while (tempobj.count()) { tempobj.object(0).v1.unmap() } } proc demo() { cvode_active(0) destroy() destroy1() objectvar e, stim, menu_explore, pplocator, s objectvar save_window_[1], rvp_[1], scene_vector_[1], ocbox_[1] objectvar ocbox_list_[1], scene_list_[1], scene_[1] doEvents() forall delete_section() if ($1 == 1) { demolabel = "Patch with HH channels" xopen("$(NRNDEMO)hh.hoc") xopen("$(NRNDEMO)hh.ses") }else if ($1 == 2) { demolabel = "Stylized" xopen("$(NRNDEMO)d3init.hoc") xopen("$(NRNDEMO)dend3.ses") }else if ($1 == 3) { demolabel = "Pyramidal: HH soma, passive dendrites" xopen("$(NRNDEMO)pyramid.nrn") xopen("$(NRNDEMO)reconst.hoc") xopen("$(NRNDEMO)pyramid.ses") }else if ($1 == 4) { demolabel = "Synaptic release" xopen("$(NRNDEMO)release.hoc") xopen("$(NRNDEMO)release.ses") }else if ($1 == 5) { demolabel = "Synchronizing net (artificial cells)" load_file(1, "$(NRNDEMO)sync/demosync.hoc") }else if ($1 == 6) { demolabel = "LinearCircuit: Dynamic Clamp" load_file(1, "$(NRNDEMO)dynclamp.hoc") }else if ($1 == 7) { demolabel = "Stochastic Single Channels: HH" load_file(1, "$(NRNDEMO)singhh.hoc") }else if ($1 == 0) { demolabel = "Choose one of the demonstrations" xopen("$(NRNDEMO)nomodel.hoc") } finitialize() } {xopen("$(NRNDEMO)demo.ses")} neuron-7.5/share/demo/demo.ses000077500000000000000000000033651323325274500164010ustar00rootroot00000000000000{load_file("nrngui.hoc")} objectvar save_window_, rvp_ objectvar scene_vector_[2] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,25,0)} { xpanel("Temperature", 0) celsius = 16.3 xvalue("celsius","celsius", 1,"", 0, 1 ) xpanel(383,204) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] } {object_push(ocbox_)} { atol_ = 0.001 CVode[0].atol(atol_) restore(1, 1) } {object_pop()} { ocbox_.map("VariableTimeStep", 377, 684, 280.32, 106.56) } objref ocbox_ //End VariableTimeStep { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 0 xvalue("t","t", 2 ) tstop = 5 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) screen_update_invl = 0.05 xvalue("Scrn update invl","screen_update_invl", 1,"", 0, 1 ) realtime = 0 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(377,289) } { xpanel("NEURON Demonstrations", 0) xvarlabel(demolabel) xradiobutton("Patch: HH","demo(1)") xradiobutton("Stylized","demo(2)") xradiobutton("Pyramidal","demo(3)") xradiobutton("Release","demo(4)") xradiobutton("Synchronizing net (artificial cells)","demo(5)") xradiobutton("LinearCircuit: Dynamic Clamp","demo(6)") xradiobutton("Stochastic Single Channels: HH","demo(7)") xradiobutton("No model","demo(0)") xpanel(383,0) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/dend3.ses000077500000000000000000000043171323325274500164500ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} { ocbox_ = new VBox() ocbox_list_.prepend(ocbox_) ocbox_.intercept(1) } { xpanel("Synaptic Parameters", 0) synamp = 1.68 xvalue("Conductance (umho), all","synamp", 1,"synset() run()", 1, 0 ) syn[0].onset = 1 xvalue("Delay (ms), Syn 0","syn[0].onset", 1,"", 0, 0 ) syn[1].onset = 0.5 xvalue("Delay Syn 1","syn[1].onset", 1,"", 0, 0 ) syn[2].onset = 0 xvalue("Delay Syn 2","syn[2].onset", 1,"", 0, 0 ) xvarlabel(synlocstr) xslider(&locsyn[0], 0, 1, "change_loc(0)", 0, 0) xslider(&locsyn[1], 0, 1, "change_loc(1)", 0, 0) xslider(&locsyn[2], 0, 1, "change_loc(2)", 0, 0) xpanel() } { ocbox_ = ocbox_list_.object(0) ocbox_.intercept(0) ocbox_.map("Synaptic Parameters", 33, 137, 326.4, 224.64) } objref ocbox_ { save_window_ = new PlotShape(0) save_window_.size(-4764.64,1847.78,-3397.16,3397.16) save_window_.variable("v") scene_vector_[2] = save_window_ {save_window_.view(-4764.64, -3397.16, 6612.42, 6794.31, 128, 416, 197.76, 203.2)} flush_list.append(save_window_) save_window_.save_name("flush_list.") } { save_window_ = new Graph(0) save_window_.size(0,5,-80,40) scene_vector_[3] = save_window_ {save_window_.view(0, -80, 5, 120, 712, 30, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addvar("soma.v(.5)", 2, 1, 1.98734, 34.5243, 1) save_window_.addexpr("node[5].v( 0.5 )", 3, 1, 2.00633, 33.1262, 1) } { save_window_ = new Graph(0) save_window_.size(-5059.2,2136.29,-80,40) scene_vector_[4] = save_window_ {save_window_.view(-5059.2, -80, 7195.49, 120, 714, 305, 303.36, 203.2)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("v") node[5] rvp_.begin(1) dend[0] rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.8, 0.9) objectvar rvp_ rvp_ = new RangeVarPlot("v") dend[1] rvp_.begin(0) dend[1] rvp_.end(1) rvp_.origin(100) save_window_.addobject(rvp_, 2, 1, 0.8, 0.9) objectvar rvp_ rvp_ = new RangeVarPlot("v") dend[2] rvp_.begin(0) dend[2] rvp_.end(1) rvp_.origin(100) save_window_.addobject(rvp_, 3, 1, 0.8, 0.9) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/dend3/000077500000000000000000000000001323325274500157245ustar00rootroot00000000000000neuron-7.5/share/demo/dend3/Makefile.am000077500000000000000000000001751323325274500177660ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/demo/dend3 this_DATA = \ control.hoc \ dend3.nrn \ syn3.hoc EXTRA_DIST = $(this_DATA) neuron-7.5/share/demo/dend3/Makefile.in000066400000000000000000000435771323325274500200110ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/demo/dend3 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(thisdir)" DATA = $(this_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/demo/dend3 this_DATA = \ control.hoc \ dend3.nrn \ syn3.hoc EXTRA_DIST = $(this_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/demo/dend3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/demo/dend3/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-thisDATA: $(this_DATA) @$(NORMAL_INSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(thisdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(thisdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(thisdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(thisdir)" || exit $$?; \ done uninstall-thisDATA: @$(NORMAL_UNINSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(thisdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(thisdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-thisDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-thisDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-thisDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-thisDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/demo/dend3/control.hoc000077500000000000000000000010141323325274500200760ustar00rootroot00000000000000access soma x=0 objectvar sg, g, sh proc spaceplot() {local i g = new Graph() sg = new RangeVarPlot("v") node[nmyelin-1] sg.begin(1) dend[0] sg.end(1) g.size(sg.left(), sg.right(), -80, 40) g.yaxis() g.addobject(sg) for i=1,2 { sg = new RangeVarPlot("v") dend[i] sg.begin(0) dend[i] sg.end(1) sg.origin(soma.L) g.color(i+1) g.addobject(sg) } flush_list.append(g) g.save_name("flush_list.") sh = new PlotShape() flush_list.append(sh) sh.save_name("flush_list.") } //spaceplot() objectvar sg, g, sh neuron-7.5/share/demo/dend3/dend3.nrn000077500000000000000000000121261323325274500174450ustar00rootroot00000000000000func eq_diam() { return (($1^(3/2))/$2)^(2/3) } /* eq_diam() calculates the equivalent diameter of $2 children according to the 3/2 power constraint of rall. Parameters ---------------- $1 diameter of bp ( eq. cylinder ) $2 degree of branching assumes equivalent electrotonic distances */ func eq_leng() { return $2 * sqrt(1e4*$1/4/global_ra/$3) } /* Calculates the equivalent length, L, for a section from diameter, conductance and equivalent electronic length, Z. Parameters ---------------- $1 diameter of section $2 Z, eletrotonic distance section is to have $3 conductance of passive section Ra in a global constant */ func eq_z() { return $2 / sqrt(1e4*$1/4/global_ra/$3) } /* Returns the equivalent electrotonic distance, Z, from diameter, length and number of children. $1 ? $2 length of eq cylinder $3 ? returns z for $1, $2, & $3 */ func Q() { return 3^(($1-16.3)/10) } /* computes the Q(10)=3 for a base temp of 16.3 C */ strdef nrnname nrnname = "MH5" /* MH6, Revised from MH5 in densities, hillock and myelin lengths for best fit to vc and antidromic expts. July '93 MH5.NRN a NEURON program, Revised from mh4 Aug 1991 (c) John Moore, Mike Hines * nmyelin=6, five node-myelin pairs * Dendrites now each have nseg=9 * Hillock now tapered in geometry and channel density * Axon now tapered in channel density - previous uniformity made Vclamp currents almost linear with GNa in axon to add: * a dynamic dendritic tree * a coefficent for nseg ( a segmentation factor ). */ proc model_globals() { /* membrane defaults */ celsius = 15 v_init = -70 /* initial voltage; v at rest */ g_passive = .0003 /* the standard pas conductance */ erev_passive = -70 /* the pas reversal potential */ global_ra = 200 /* the axial resistance */ set_ra() gnaHH = .12 gkHH = .036 glHH = .0003 /* Conductance coefficients for various sections */ /* gfhillock = tapered from gfsoma to gfaxon */ gfsoma = .5 gfhill = 2 gfaxon = 4 gfnode = 10 /*I soma independent of this */ gfdend = 0 /* dendritic tree description */ num_of_levels = 1 /* number of levels in the dendritic tree */ root_diam = 46 /* diameter of the equiv. cylinder of tree */ z = 1.5 /* electrotonic length of tree */ /* Motoneuron */ nmyelin = 6 /* the number of myelin-node pairs */ ndend = 3 /* the # of dendrites connected to the soma */ br_degree = 2 /* degree of branching @ every level of tree */ /* shape parameters */ mlen0 = 250 mlen1 = 500 mlen2 = 1000 hlen = 10 alen = 100 } model_globals() create soma, hillock, axon, myelin[nmyelin], node[nmyelin], \ dend[ndend] access soma /* set soma as default section */ proc mhg() { /* TOPOLOGY connect sections such that all indices radiate out from the soma. */ soma connect hillock(0), 0 hillock connect axon(0), 1 if (nmyelin>0) { axon connect myelin[0](0), 1 myelin[0] connect node[0](0), 1 if (nmyelin>1) { for i=1,nmyelin-1 { node[i-1] connect myelin[i](0),1 myelin[i] connect node[i](0), 1 } } } for i=0,ndend-1 { soma connect dend[i](0), 1 } /* compartmentalization */ soma { nseg= 1 } axon { nseg= 5 } hillock { nseg= 4 } for i=0, nmyelin-1 { myelin[i].nseg = 5 node[i].nseg = 1 } dz= z/num_of_levels /* electrotonic length of each level */ for i=0,ndend-1 { dend[i] { nseg = 27 } } set_ra() morphol() membrane() } proc morphol() { /* MORPHOLOGY */ soma { L= 100 diam= 100 } axon { L= alen diam= 10 } /* put axon before hillock, since hillock uses diam.axon(.5) */ hillock { L= hlen /* linearly tapering hillock */ dsoma = soma.diam(0) daxon = axon.diam(0) diam(0:1) = dsoma:daxon } mdiam=20 myelin[0] { L= mlen0 diam= mdiam } node[0] { L= 6 diam= 7 } myelin[1] { L= mlen1 diam= mdiam } node[1] { L= 6 diam= 7 } if (nmyelin > 2) for i=2,nmyelin-1 { myelin[i] { L= mlen2 diam= mdiam } node[i] { L= 6 diam= 7 } } dz= z/num_of_levels /* electrotonic length of each level */ for i=0,ndend-1 { dend[i] { diam = eq_diam(root_diam,ndend) L = eq_leng(diam,dz,g_passive) } } } proc membrane() { /* MEMBRANE */ soma { insert hh gnabar_hh= gfsoma*gnaHH gkbar_hh= gfsoma*gkHH gl_hh= gfsoma*glHH } hillock { insert hh gnabar_hh(0:1) = gfsoma*gnaHH:gfhill*gnaHH gkbar_hh(0:1) = gfsoma*gkHH:gfhill*gkHH gl_hh(0:1) = gfsoma*glHH:gfhill*glHH } axon { insert hh /* with tapering density */ gnabar_hh(0:1) = gfhill*gnaHH:gfaxon*gnaHH gkbar_hh(0:1) = gfhill*gkHH:gfaxon*gkHH gl_hh(0:1) = gfhill*glHH:gfaxon*glHH } for i=0,nmyelin-1 { /* check whether g_pas.myelin should = g_passive/200 */ myelin[i] { insert pas g_pas= .003/200 e_pas= v_init cm= .005} node[i] { insert hh gnabar_hh= gfnode*gnaHH gkbar_hh= gfnode*gkHH gl_hh= gfnode*glHH } } for i=0,ndend-1 { dend[i] { insert pas g_pas= g_passive e_pas= erev_passive } } /* set el_hh for compatibility with FRED3.NRN */ finitialize(v_init) fcurrent() forall { if (ismembrane("hh")) { el_hh= v + (ina +ik)/gl_hh } } } mhg() proc model_defaults() { model_globals() morphol() membrane() } neuron-7.5/share/demo/dend3/syn3.hoc000077500000000000000000000033261323325274500173220ustar00rootroot00000000000000/* ?0 GUI NEURONDemonstrations Stylized ?1 SynapticParameters Three AlphaSynapse's with same conductance, one per dendrite. Value editors set the common conductance and separate onset times. Sliders specify the position along the dendrites. Synapse 1 is located on dendrite[0] colored black on the shape plot movie. Syanpse 3 is on the dedrite colored blue. ?0 User HocCode SynapticParameters */ help ?0 nsyn = ndend syndel = 1 synamp = 1.68 objectvar syn[nsyn] double locsyn[3] { locsyn[0] = .5/3 locsyn[1] = .5 locsyn[2] = 2.5/3 } for i=0,nsyn-1 { dend[i] syn[i] = new AlphaSynapse(locsyn[i]) syn[i].tau = .1 syn[i].e = 0 } syn[0].onset = 1 syn[1].onset = .5 syn[2].onset = 0 proc synset() {local i for i=0, nsyn-1 { syn[i].gmax = synamp } } synset() strdef synlocstr proc change_loc() {local x syn[$1].get_loc() syn[$1].loc(locsyn[$1]) pop_section() locsyn[$1] = syn[$1].get_loc() pop_section() sprint(synlocstr, "Syn 1-3 Locations %.3f %.3f %.3f",\ locsyn[0], locsyn[1], locsyn[2]) } change_loc(0) objectvar tempobj proc syn3menu() { objectvar vbox vbox = new VBox() vbox.intercept(1) /* doesn't notify tempobj = new Shape() tempobj.point_mark(syn[0], 1) tempobj.point_mark(syn[1], 2) tempobj.point_mark(syn[2], 3) */ vbox.ref(tempobj) xpanel("Synaptic Parameters") xvalue("Conductance (umho), all", "synamp", 1, "synset() run()", 1) xvalue("Delay (ms), Syn 0", "syn[0].onset", 1) xvalue("Delay Syn 1", "syn[1].onset", 1) xvalue("Delay Syn 2", "syn[2].onset", 1) xvarlabel(synlocstr) xslider(&locsyn[0],0, 1, "change_loc(0)") xslider(&locsyn[1],0, 1, "change_loc(1)") xslider(&locsyn[2],0, 1, "change_loc(2)") xpanel() vbox.intercept(0) vbox.map("Synaptic Parameters") } //syn3menu() neuron-7.5/share/demo/dynchan.ses000077500000000000000000000156601323325274500171020ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[10] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} //Begin ChannelBuild[0] managed KSChan[0] { load_file("chanbild.hoc", "ChannelBuild") } {ion_register("na", 1)} {ocbox_ = new ChannelBuild(1)} {object_push(ocbox_)} {genprop.set_data("nahh", 1, 1, 5, "na")} {genprop.set_defstr(0.12, 0)} tobj = new ChannelBuildKSGate(this) {gatelist.append(tobj)} {tobj.begin_restore(1)} {tobj.set_state("m0h0", 0, 60, 90)} {tobj.set_state("m1h0", 0, 110, 90)} {tobj.set_state("m2h0", 0, 160, 90)} {tobj.set_state("m3h0", 0, 200, 90)} {tobj.set_state("m0h1", 0, 60, 120)} {tobj.set_state("m1h1", 0, 110, 120)} {tobj.set_state("m2h1", 0, 160, 120)} {tobj.set_state("m3h1", 1, 200, 120)} {tobj.set_trans(0, 1, 0)} {tobj.transitions.object(0).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 3 0.1 -40 {tobj.transitions.object(0).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 4 -0.055556 -65 {tobj.transitions.object(0).set_f(1, 2, tobj1)} {tobj.set_trans(1, 2, 0)} {tobj.transitions.object(1).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 2 0.1 -40 {tobj.transitions.object(1).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 8 -0.055556 -65 {tobj.transitions.object(1).set_f(1, 2, tobj1)} {tobj.set_trans(2, 3, 0)} {tobj.transitions.object(2).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 1 0.1 -40 {tobj.transitions.object(2).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 12 -0.055556 -65 {tobj.transitions.object(2).set_f(1, 2, tobj1)} {tobj.set_trans(4, 5, 0)} {tobj.transitions.object(3).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 3 0.1 -40 {tobj.transitions.object(3).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 4 -0.055556 -65 {tobj.transitions.object(3).set_f(1, 2, tobj1)} {tobj.set_trans(5, 6, 0)} {tobj.transitions.object(4).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 2 0.1 -40 {tobj.transitions.object(4).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 8 -0.055556 -65 {tobj.transitions.object(4).set_f(1, 2, tobj1)} {tobj.set_trans(6, 7, 0)} {tobj.transitions.object(5).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 1 0.1 -40 {tobj.transitions.object(5).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 12 -0.055556 -65 {tobj.transitions.object(5).set_f(1, 2, tobj1)} {tobj.set_trans(0, 4, 0)} {tobj.transitions.object(6).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.07 -0.05 -65 {tobj.transitions.object(6).set_f(0, 2, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 1 -0.1 -35 {tobj.transitions.object(6).set_f(1, 4, tobj1)} {tobj.set_trans(1, 5, 0)} {tobj.transitions.object(7).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.07 -0.05 -65 {tobj.transitions.object(7).set_f(0, 2, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 1 -0.1 -35 {tobj.transitions.object(7).set_f(1, 4, tobj1)} {tobj.set_trans(2, 6, 0)} {tobj.transitions.object(8).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.07 -0.05 -65 {tobj.transitions.object(8).set_f(0, 2, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 1 -0.1 -35 {tobj.transitions.object(8).set_f(1, 4, tobj1)} {tobj.set_trans(3, 7, 0)} {tobj.transitions.object(9).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.07 -0.05 -65 {tobj.transitions.object(9).set_f(0, 2, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 1 -0.1 -35 {tobj.transitions.object(9).set_f(1, 4, tobj1)} {tobj.end_restore()} end_restore() {genprop.set_single(0)} {set_alias(0)} {object_pop()} { ocbox_.map("ChannelBuild[0] managed KSChan[0]", 11, 262, 246.72, 197.76) } objref ocbox_ //End ChannelBuild[0] managed KSChan[0] {WindowMenu[0].ses_gid(1, 0, 1, "channels for dyn clamp")} //Begin ChannelBuild[1] managed KSChan[1] { load_file("chanbild.hoc", "ChannelBuild") } {ion_register("k", 1)} {ocbox_ = new ChannelBuild(1)} {object_push(ocbox_)} {genprop.set_data("khh", 1, 1, 6, "k")} {genprop.set_defstr(0.036, 0)} tobj = new ChannelBuildKSGate(this) {gatelist.append(tobj)} {tobj.begin_restore(1)} {tobj.set_state("n0", 0, 60, 120)} {tobj.set_state("n1", 0, 100, 120)} {tobj.set_state("n2", 0, 140, 120)} {tobj.set_state("n3", 0, 180, 120)} {tobj.set_state("n4", 1, 230, 120)} {tobj.set_trans(0, 1, 0)} {tobj.transitions.object(0).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.4 0.1 -55 {tobj.transitions.object(0).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.125 -0.0125 -65 {tobj.transitions.object(0).set_f(1, 2, tobj1)} {tobj.set_trans(1, 2, 0)} {tobj.transitions.object(1).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.3 0.1 -55 {tobj.transitions.object(1).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.25 -0.0125 -65 {tobj.transitions.object(1).set_f(1, 2, tobj1)} {tobj.set_trans(2, 3, 0)} {tobj.transitions.object(2).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.2 0.1 -55 {tobj.transitions.object(2).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.375 -0.0125 -65 {tobj.transitions.object(2).set_f(1, 2, tobj1)} {tobj.set_trans(3, 4, 0)} {tobj.transitions.object(3).settype(0, "")} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.1 0.1 -55 {tobj.transitions.object(3).set_f(0, 3, tobj1)} {tobj1 = new Vector(3) for (i=0; i < 3; i += 1) tobj1.x[i] = fscan() } 0.5 -0.0125 -65 {tobj.transitions.object(3).set_f(1, 2, tobj1)} {tobj.end_restore()} end_restore() {genprop.set_single(0)} {set_alias(0)} {object_pop()} { ocbox_.map("ChannelBuild[1] managed KSChan[1]", 11, 496, 247.68, 197.76) } objref ocbox_ //End ChannelBuild[1] managed KSChan[1] {WindowMenu[0].ses_gid(0, 0, 1, "channels for dyn clamp")} //Begin ChannelBuild[2] managed KSChan[2] { load_file("chanbild.hoc", "ChannelBuild") } {ocbox_ = new ChannelBuild(1)} {object_push(ocbox_)} {genprop.set_data("leak", 1, 1, -1, "NonSpecific")} {genprop.set_defstr(0.0003, -54.3)} end_restore() {genprop.set_single(0)} {set_alias(0)} {object_pop()} { ocbox_.map("ChannelBuild[2] managed KSChan[2]", 11, 731, 247.68, 197.76) } objref ocbox_ //End ChannelBuild[2] managed KSChan[2] {WindowMenu[0].ses_gid(0, 0, 1, "channels for dyn clamp")} objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/dynclamp.hoc000077500000000000000000000003021323325274500172270ustar00rootroot00000000000000load_file("dynchan.ses") load_file(1, "dynclamp.ses") proc destroy() {local i WindowMenu[0].groups.remove_all while (PWManager[0].count > 6) { PWManager[0].close(PWManager[0].count-1) } } neuron-7.5/share/demo/dynclamp.ses000077500000000000000000000173711323325274500172660ustar00rootroot00000000000000{load_file("nrngui.hoc")} objectvar save_window_, rvp_ objectvar scene_vector_[10] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin CellBuild[0] { load_file("celbild.hoc", "CellBuild") } {ocbox_ = new CellBuild(1)} {object_push(ocbox_)} { version(5.7) continuous = 1 } {object_push(topol)} { first = 0 slist.remove_all() sname = "soma" objref tobj } { tobj = new CellBuildSection("soma",0, 0, tobj, 0) slist.append(tobj) tobj.position(0,0,15,0) tobj.lx=8.75202 tobj.ly=-19.3733 tobj.i3d=0 all_init() } for i=0, slist.count-1 {slist.object(i).rdses()} {object_pop()} { } {object_push(subsets)} {first = 0} {consist()} {object_pop()} { } {object_push(geom)} { first = 0 tobj = new GeoSpec(4) tobj.value = 100 bild.subsets.snlist.object(0).geo.append(tobj) set_default() } {object_pop()} { } {object_push(memb)} {first=0} { tobj = new FakeMechStan(0) tobj.value = 80 tobj.set_default() tobj = new MStanWrap(tobj, 0) bild.subsets.snlist.object(0).ml.append(tobj) } { tobj = new FakeMechStan(1) tobj.value = 1 tobj.set_default() tobj = new MStanWrap(tobj, 0) bild.subsets.snlist.object(0).ml.append(tobj) } { tobj = new MechanismStandard("khh") tobj.set("gmax_khh", 0.036, 0) tobj = new MStanWrap(tobj, 1) bild.subsets.snlist.object(0).ml.append(tobj) } { tobj = new MechanismStandard("leak") tobj.set("gmax_leak", 0.0003, 0) tobj.set("e_leak", -54.3, 0) tobj = new MStanWrap(tobj, 1) bild.subsets.snlist.object(0).ml.append(tobj) } {object_pop()} { } {object_push(manage)} { first = 0 classname = "Cell" etop=1 esub=1 egeom=1 emem=1 itop=1 isub=0 igeom=0 imem=0 bild.topol.names_off = 0 bild.topol.circles_off = 0 output_index = 0 output_x = 1 } {object_pop()} { cexport() } {object_pop()} { save_window_=ocbox_.gtopol save_window_.size(-200,200,-150,150) scene_vector_[2] = save_window_ ocbox_.gtopol = save_window_ save_window_.save_name("ocbox_.gtopol") } { ocbox_.map("CellBuild[0]", 16, 540, 609.6, 287.04) } objref ocbox_ //End CellBuild[0] //Begin CellBuild[1] { load_file("celbild.hoc", "CellBuild") } {ocbox_ = new CellBuild(1)} {object_push(ocbox_)} { version(5.7) continuous = 1 } {object_push(topol)} { first = 0 slist.remove_all() sname = "synth" objref tobj } { tobj = new CellBuildSection("synth",0, 0, tobj, 0) slist.append(tobj) tobj.position(0,20,15,0) tobj.lx=4.86222 tobj.ly=-16.7801 tobj.i3d=0 all_init() } for i=0, slist.count-1 {slist.object(i).rdses()} {object_pop()} { } {object_push(subsets)} {first = 0} {consist()} {object_pop()} { } {object_push(geom)} { first = 0 tobj = new GeoSpec(4) tobj.value = 100 bild.subsets.snlist.object(0).geo.append(tobj) set_default() } {object_pop()} { } {object_push(memb)} {first=0} { tobj = new FakeMechStan(1) tobj.value = 1e-06 tobj.set_default() tobj = new MStanWrap(tobj, 0) bild.subsets.snlist.object(0).ml.append(tobj) } { tobj = new MechanismStandard("nahh") tobj.set("gmax_nahh", 0.12, 0) tobj = new MStanWrap(tobj, 1) bild.subsets.snlist.object(0).ml.append(tobj) } { tobj = new MechanismStandard("extracellular") tobj.set("xraxial", 1e+09, 0) tobj.set("xraxial", 1e+09, 1) tobj.set("xg", 1e-09, 0) tobj.set("xg", 1e+09, 1) tobj.set("xc", 0, 0) tobj.set("xc", 0, 1) tobj.set("e_extracellular", 0, 0) tobj = new MStanWrap(tobj, 1) bild.topol.slist.object(0).ml.append(tobj) } {object_pop()} { } {object_push(manage)} { first = 0 classname = "Cell" etop=1 esub=1 egeom=1 emem=1 itop=1 isub=0 igeom=0 imem=0 bild.topol.names_off = 0 bild.topol.circles_off = 0 output_index = 0 output_x = 1 } {object_pop()} { cexport() } {object_pop()} { save_window_=ocbox_.gtopol save_window_.size(-200,200,-150,150) scene_vector_[3] = save_window_ ocbox_.gtopol = save_window_ save_window_.save_name("ocbox_.gtopol") } { ocbox_.map("CellBuild[1]", 11, 626, 611.52, 288.96) } objref ocbox_ //End CellBuild[1] //Begin PointProcessManager { load_file("pointman.hoc") } { soma ocbox_ = new PointProcessManager(0) } {object_push(ocbox_)} { mt.select("IClamp") i = mt.selected() ms[i] = new MechanismStandard("IClamp") ms[i].set("del", 0.5, 0) ms[i].set("dur", 0.1, 0) ms[i].set("amp", 0.3, 0) mt.select("IClamp") i = mt.selected() maction(i) hoc_ac_ = 0.5 sec.sec move() d1.flip_to(0) } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessManager", 137, 466, 208.32, 326.4) } objref ocbox_ //End PointProcessManager //Begin LinearCircuit[0] { load_file("lincir.hoc", "LinearCircuit") } { ocbox_ = new LinearCircuit(1) } {object_push(ocbox_)} {version(2)} {mkelm(8, 190, 20, 3, 0)} {mklabel(0, "soma(0.5)", 0.115, -19.654)} {mklabel(1, "Vm", -14.669, -2.8385)} {sel.extra_info.set("soma", 0.5) sel.extra_info.name(sel)} {mkelm(1, 220, 70, 3.60555, 0.588003)} 5 {mklabel(0, "Re2", 12.002, -9.6973)} {mklabel(2, "Vx", -1.571, 10.548)} {restore_ic(2, -65)} {mkelm(7, 110, 80, 1, 3.14159)} 1 0 {mklabel(0, "Ac", 3.732, 0.8358)} {mklabel(3, "Vc", 4.0199, 13.1556)} {restore_ic(3, -65)} {mkelm(1, 270, 190, 1, 0)} 1 {mklabel(0, "Ri", -0.073, -9.409)} {mkelm(7, 270, 230, 1, 1.5708)} 1 0 {mklabel(0, "Ai", -2.301, 2.1792)} {mkelm(0, 245, 250, 2.5, 0)} {mkelm(7, 240, 190, 1, 0)} 100000 0 {mklabel(0, "Acmd", 1.251, 2.6388)} {mkelm(0, 220, 225, 2.5, -1.5708)} {mkelm(0, 290, 190, 1, 3.14159)} {mkelm(9, 50, 135, 2.5, 1.5708)} {mklabel(0, "synth(0.5)", 44.0199, 1.686)} {sel.extra_info.set("synth", 0.5) sel.extra_info.name(sel)} {mkelm(7, 110, 180, 1, 0)} 1e+06 0 {mklabel(0, "AI", -1.5878, 1.3549)} {mklabel(3, "VIc", 2.622, -7.997)} {mkelm(1, 110, 210, 2, 0)} 1 {mklabel(0, "RI", 0.3138, 10.3188)} {mkelm(0, 175, 180, 4.5, 3.14159)} {mkelm(1, 160, 70, 3.60555, -0.588003)} 100 {mklabel(0, "Re1", 16.974, 14.1211)} {mkelm(0, 300, 140, 5, 1.5708)} {mkelm(0, 270, 200, 1.41421, 0.785398)} {mkelm(0, 270, 200, 1.41421, -0.785398)} {mkelm(4, 275, 90, 2.5, 3.14159)} {mklabel(0, "I2", -0.289, -19.8414)} {sel.extra_info.restore()} 3 1e+09 0 1e+09 0 1e+09 0 {mkelm(4, 70, 80, 2, 3.14159)} {mklabel(0, "I1", -1.4411, -15.5907)} {sel.extra_info.restore()} 3 1e+09 0 1e+09 0 1e+09 0 {mkelm(6, 130, 60, 1, 0)} {mkelm(0, 130, 195, 1.5, -1.5708)} {mkelm(0, 90, 200, 1, 1.5708)} {mkelm(6, 90, 160, 1, 0)} {mkelm(0, 70, 190, 2, 0)} {mkelm(0, 50, 175, 1.5, -1.5708)} {mkelm(0, 50, 95, 1.5, 1.5708)} {parasitic_ = 0 noconsist_ = 0} {graphlist.append(new LincirGraph(this, 1))} 1 Vm (mV) 2 1 0.8 0.9 2 0 5 -80 40 // graph size 687 25 338.88 245.76 // box size // end info {graphlist.append(new LincirGraph(this, 1))} 2 I1 I (nA) 1 1 0.8 0.9 2 I2 I (nA) 2 1 0.8 0.9 2 0 5 -1 1 // graph size 684 293 342.72 240 // box size // end info {g.exec_menu("Simulate") tool(2)} {sel = nil} {object_pop()} { { save_window_=ocbox_.g save_window_.size(0,300,0,200) scene_vector_[5] = save_window_ ocbox_.g = save_window_ save_window_.save_name("ocbox_.g") save_window_.label(190.115, 0.346, "soma(0.5)", 1, 1, 0.5, 0.5, 1) save_window_.label(175.331, 47.1615, "Vm", 1, 1, 0.5, 0.5, 1) save_window_.label(232.002, 60.3027, "Re2", 1, 1, 0.5, 0.5, 1) save_window_.label(248.429, 100.548, "Vx", 1, 1, 0.5, 0.5, 1) save_window_.label(113.732, 80.8358, "Ac", 1, 1, 0.5, 0.5, 1) save_window_.label(94.0199, 93.1557, "Vc", 1, 1, 0.5, 0.5, 1) save_window_.label(269.927, 180.591, "Ri", 1, 1, 0.5, 0.5, 1) save_window_.label(267.699, 232.179, "Ai", 1, 1, 0.5, 0.5, 1) save_window_.label(241.251, 192.639, "Acmd", 1, 1, 0.5, 0.5, 1) save_window_.label(94.0199, 136.686, "synth(0.5)", 1, 1, 0.5, 0.5, 1) save_window_.label(108.412, 181.355, "AI", 1, 1, 0.5, 0.5, 1) save_window_.label(132.622, 172.003, "VIc", 1, 1, 0.5, 0.5, 1) save_window_.label(110.314, 220.319, "RI", 1, 1, 0.5, 0.5, 1) save_window_.label(176.974, 84.1211, "Re1", 1, 1, 0.5, 0.5, 1) save_window_.label(274.711, 70.1586, "I2", 1, 1, 0.5, 0.5, 1) save_window_.label(68.5589, 64.4093, "I1", 1, 1, 0.5, 0.5, 1) } ocbox_.map("LinearCircuit[0]", 681, 572, 477.12, 299.52) } objref ocbox_ //End LinearCircuit[0] objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/hh.hoc000077500000000000000000000003641323325274500160270ustar00rootroot00000000000000create soma access soma nseg=1 {L=10/PI diam=10} //100 um2 area (i_vc graphs on same scale as ina) insert hh global_ra = 35.4 set_ra() celsius = 6.3 { ion_style("na_ion", 1, 2, 1, 0, 0) ion_style("k_ion", 1, 2, 1, 0, 0) } proc destroy() { } neuron-7.5/share/demo/hh.ses000077500000000000000000000024571323325274500160550ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} //Begin I/V Clamp Electrode { load_file("electrod.hoc") } { ocbox_=new Electrode(0) execute("can_locate=1 sec=\"soma\" xloc=0.5 locate(0)", ocbox_) execute("vc.dur[0]=0.1 vc.amp[0]=-65", ocbox_) execute("vc.dur[1]=4 vc.amp[1]=10", ocbox_) execute("vc.dur[2]=100 vc.amp[2]=-65", ocbox_) execute("stim.del=0 stim.dur=0.1 stim.amp=0.25", ocbox_) execute("vcsteps=5", ocbox_) execute("samp=stim.amp store_vclamp() glyph()", ocbox_) ocbox_ = ocbox_.v1 ocbox_.map("I/V Clamp Electrode", 82, 123, 273.6, 412.8) } objref ocbox_ //End I/V Clamp Electrode { save_window_ = new Graph(0) save_window_.size(0,5,-80,60) scene_vector_[2] = save_window_ {save_window_.view(0, -80, 5, 140, 712, 32, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("v", 1, 1, 0.756329, 0.735899, 2) } { save_window_ = new Graph(0) save_window_.size(0,5,-3,5) scene_vector_[4] = save_window_ {save_window_.view(0, -3, 5, 8, 714, 307, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("Electrode[0].vc.i", 1, 1, 0.273629, 0.959715, 2) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/nomodel.hoc000077500000000000000000000000511323325274500170560ustar00rootroot00000000000000create soma access soma proc destroy(){} neuron-7.5/share/demo/pyramid.nrn000077500000000000000000002416061323325274500171270ustar00rootroot00000000000000/*---------------------------------------------------------------- %W% %G% pyramid.txt (null) translated Thu Jun 4 14:02:28 1992 by ntscable %I% source file syntax: Eutectic output file syntax: NEURON soma: diameter = 20.8716 um length = 39.351 um area = 2580.25 um2 30 three-D points; 44 outline points numbered 1-44 outline diameter = 23.1936 um 8 primary neurites 43 branches totaling 5349.55 um in length, 27653 um2 in area 2018 tree points translated to 79 segments (1 requested) Neurites divided into segments of equal dx over each entire branch. Segment length constrained to be < 5349.55 um. No. points 2956 No. trees 15 Text Pat McAllister, Ch140-17 (2) Mod Hydro Golgi ----------------------------------------------------------------*/ /* create sections */ create soma,\ dendrite_1[31],\ dendrite_2[3],\ dendrite_3[11],\ dendrite_4[13],\ dendrite_5[1],\ dendrite_6[9],\ dendrite_7[9],\ dendrite_8[1] //global_ra = 75 //forall Ra = global_ra /*----------------------------------------------------------------*/ nspine=0 proc chkspine() { if($4 < 0) { nspine = nspine + 1 } pt3dadd($1,$2,$3,abs($4)) } /*----------------------------------------------------------------*/ proc geometry() { local i, j /* soma geometry */ soma { nseg = 1 pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } /* connect primary neurites */ soma connect dendrite_1[0] (0), 0.5 soma connect dendrite_2[0] (0), 0.5 soma connect dendrite_3[0] (0), 0.5 soma connect dendrite_4[0] (0), 0.5 soma connect dendrite_5[0] (0), 0.5 soma connect dendrite_6[0] (0), 0.5 soma connect dendrite_7[0] (0), 0.5 soma connect dendrite_8[0] (0), 0.5 /* neurite geometry*/ for i = 0,30 { dendrite_1[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,2 { dendrite_2[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,10 { dendrite_3[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,12 { dendrite_4[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,0 { dendrite_5[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,8 { dendrite_6[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,8 { dendrite_7[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } for i = 0,0 { dendrite_8[i] { nseg = fscan() pt3dclear() for j = 1, fscan() { chkspine(fscan(),fscan(),fscan(),fscan()) } } } /* branching topology*/ for i = 1,30 { dendrite_1[fscan()] connect dendrite_1[i] (0), fscan() } for i = 1,2 { dendrite_2[fscan()] connect dendrite_2[i] (0), fscan() } for i = 1,10 { dendrite_3[fscan()] connect dendrite_3[i] (0), fscan() } for i = 1,12 { dendrite_4[fscan()] connect dendrite_4[i] (0), fscan() } for i = 1,0 { dendrite_5[fscan()] connect dendrite_5[i] (0), fscan() } for i = 1,8 { dendrite_6[fscan()] connect dendrite_6[i] (0), fscan() } for i = 1,8 { dendrite_7[fscan()] connect dendrite_7[i] (0), fscan() } for i = 1,0 { dendrite_8[fscan()] connect dendrite_8[i] (0), fscan() } } geometry() SOMA COORDINATES AND DIAMETERS: 28 -10 0.75 0 2.5 -9.5 -0.0625 0 4.875 -8 0 0 7 -7 0.75 0 9.5 -6.5 1.875 0 12.25 -6 2.125 0 13.25 -5.5 2.1667 0 14.667 -5 3.3333 0 18.333 -5 4.3333 0 20.333 -4.5 5.75 0 24.5 -3 5.4375 0 26.125 -3 7.9375 0 31.125 -2.5 9.25 0 34.5 -0.5 9.1 0 35.8 0 9 0 36 0.5 8.25 0 37.5 1.5 8 0 38 2.5 6.5 0 35 3 5.5 0 33 3.5 4.5 0 31 4 1 0 24 4.5 0 0 22 6 -2 0 18 6.5 -3.1667 0 15.333 7.5 -3.75 0 13.5 8.5 -4.5 0 9 9 -3.75 0 5.5 10.5 -3 0 2 NEURITE COORDINATES AND DIAMETERS: 1 4 -0.5 27 0 3.5 0 29 2 3.5 0.5 31 3.5 3.5 -0.5 34.5 5 3.5 1 64 -0.5 34.5 5 3.5 1 35.5 6 1.7 3.5 35 5 1.7 5.5 35.5 3 1.3 7 37 1.5 1.3 8.5 37 1.5 -1.3 10 37.5 1.5 -1.3 13 36.5 1 -1.3 15.5 37.5 0 -1.3 19 38.5 -1 -1.3 21.5 38.5 -1.5 -1.3 25.5 38.5 -2 -1.3 26.5 38.5 -2 -1.3 27.5 38.5 -1.5 -1.3 29.5 39 -1.5 -1.3 30.5 39 -3 -1.3 33.5 38.5 -4 -1.3 37 40 -5.5 -1.3 38 39.5 -6 -1.3 39 39 -6.5 -1.3 41.5 39.5 -7.5 -1.3 44.5 39.5 -8 -1.3 47.5 38 -9 -1.3 48.5 38.5 -9 -1.3 51 39 -9 -1.3 53 38.5 -9 -1.3 54.5 39 -9.5 -1.3 55.5 37.5 -10 -1.3 57.5 38.5 -10.5 -1.3 60 38 -11 -1.3 62.5 38.5 -11 -1.3 63.5 38 -11.5 -1.3 65 39 -12 -1.3 66.5 39.5 -11.5 1.3 68 39 -11.5 -1.3 71.5 40 -11.5 1.3 74 41 -12 -1.3 76.5 41.5 -12 -1.3 77.5 42 -12.5 -1.3 80 42 -13 -1.3 82 43 -13 -1.5 84 43 -13.5 -1.5 86.5 44 -14.5 -1.5 91 44 -15.5 -1.5 93 45.5 -15 -1.5 96 46 -15 -1.5 98.5 46.5 -14.5 -1.5 100.5 47 -15 -1.5 103.5 46.5 -16 -1.5 105.5 47 -17 -1.5 108 48 -18 -1.5 109 47.5 -19 -1.5 111.5 48 -20 -1.5 113.5 48.5 -21.5 -1.5 116.5 49.5 -22.5 -1.5 118 50 -23 -1.5 121 49.5 -23.5 -1.5 123 51 -24 -1 126.5 50.5 -23.5 1 128 49.5 -22.5 1 130 49 -21.5 1 134.5 50.5 -21 1 135.5 51.5 -21 1 137 52 -21.5 1 1 5 -0.5 34.5 5 3.5 -1.5 38.5 5 3.5 -2 41 5.5 3.5 -2 44 5.5 3.5 -3 46.5 5.5 3.5 1 23 -3 46.5 5.5 3.5 -5 47 6.5 1.2 -7 47.5 7.5 1.2 -9 48 7.5 1.2 -11 48.5 7.5 1.2 -13 49 7.5 -1.2 -14.5 49.5 9 -1.2 -17.5 51.5 10.5 1.2 -19 50.5 12.5 -1.2 -20 52.5 13 -1.2 -22 52 13.5 -1.2 -25.5 52.5 15.5 -1.2 -26.5 53.5 17 -1.2 -28.5 54 18.5 -1.2 -30 55.5 20.5 -1.2 -32 56.5 22.5 -1.2 -34.5 58 24 1.2 -35.5 60 25.5 1.2 -39 60.5 27.5 -1.2 -42 62 29 -1.2 -44.5 63 30 -1.2 -48.5 64 30.5 -1.2 -50 65 31.5 1.2 1 4 -3 46.5 5.5 3.5 -3 48.5 5.5 3.5 -3 51 7 3.5 -3 54 10 3.5 1 9 -3 54 10 3.5 -6 56 11.5 1.4 -9 56 15.5 1.4 -11 55.5 19.5 1.4 -14.5 56.5 22.5 1.4 -16.5 57.5 22 1.1 -18 58.5 22 1.1 -19.5 60 21.5 1.1 -21.5 62 21.5 1.1 1 4 -3 54 10 3.5 -3.5 57 8 2.9 -3 59 6.5 2.9 -4 63 6.5 3.4 1 62 -4 63 6.5 3.4 -6 64 7 1 -7 64 7.5 -1 -9.5 64.5 7.5 -1 -12.5 65.5 7.5 1 -13.5 66 7.5 -1 -14 67 7.5 -1 -15.5 70.5 7.5 1.1 -16 72 8 -1.1 -16 73 9 -1.1 -18.5 74.5 10 1.1 -20.5 73.5 11 -1.1 -21.5 73.5 11 -1.1 -24.5 71.5 10 -1.1 -27 71.5 9 -1.1 -29 72.5 9 -1.1 -31 73.5 9 -1.1 -33.5 74.5 9 -1.1 -36 76 9 -1.1 -38.5 76 9.5 -1.1 -39.5 77.5 10 -1.1 -41.5 78.5 9.5 1.1 -43.5 80.5 8.5 1.1 -45.5 81.5 7.5 1.1 -47.5 83 6.5 1.1 -50.5 83.5 6.5 1.1 -53.5 84.5 6.5 1.1 -55 84.5 6.5 -1.1 -56.5 85 5 -1.1 -58.5 86.5 4 -1.1 -60.5 86.5 3 -1.1 -63 87 3 -1.1 -67 85.5 3 -1.1 -69.5 87 3 -1.1 -73 87 3 -1.1 -75.5 89 2.5 -1.1 -77.5 90.5 1.5 -1.1 -79.5 90.5 1 -1.1 -83.5 91 0 -1.1 -86 91 0 -1.1 -88 91.5 0 1.1 -89.5 91.5 0 -1.1 -92 91 0 -1.1 -95.5 92 0 -1.1 -97.5 92.5 0 -1.1 -101 93.5 0 -1.1 -106 95.5 -0.5 -1.1 -109 96.5 -2 -1.1 -111.5 98 -3 -1.1 -115 99.5 -3.5 -1.1 -118.5 101 -4 1.1 -120 101.5 -4.5 -1.1 -123.5 102 -5 1.1 -125 103 -5 1.1 -127 103.5 -4.5 -1.1 -130.5 106 -4.5 -1.1 -132.5 106.5 -4.5 1.1 -135 110 -5 1.1 -137 111 -5.5 1.1 -139 111.5 -5.5 1.1 -141.5 113 -5.5 1.1 -142 114.5 -5.5 0.9 1 123 -4 63 6.5 3.4 -4.5 66.5 6.5 -2.7 -4 69 7 -2.7 -4 70 7 -2.7 -4 72.5 7 -2.7 -4.5 74.5 7 -2.7 -4.5 77.5 7 -2.7 -5 79.5 7 -2.7 -5 81 7 -2.7 -6 83 7.5 -2.7 -5.5 84.5 7 -2.7 -5.5 87.5 6.5 -2.7 -6 90 6 -2.7 -7 94.5 6 -2.7 -7.5 98.5 6.5 -2.7 -7 102 6.5 -2.7 -7.5 105 6.5 -2.7 -8.5 107 6.5 -2.7 -9 110 5.5 2.7 -8.5 113 5 -2.7 -9 116 5.5 -2.7 -9.5 118.5 7 -2.7 -9.5 120 9.5 -2.7 -9.5 121 10 -2.7 -11 123 12.5 -2.7 -11 123 13.5 -2.7 -10.5 126 14.5 -2.7 -9 128.5 14 -2.7 -9.5 129 14 -2.7 -8.5 132.5 14 -2.7 -8 133.5 14 -2.7 -8 135.5 14 -2.7 -8.5 137 14 -2.7 -8 138 14 -2.7 -6.5 140 14 -2.7 -6 144 14 -2.7 -6 146.5 14 -2.7 -5 150 14 -2.7 -6 152.5 14.5 -2.7 -6 156.5 15 -2.7 -6.5 160 15.5 -2.7 -6.5 163 15.5 -2.7 -7 164.5 15.5 -2.7 -6.5 169 15.5 -2.9 -7 171 15.5 -2.9 -7 172 15.5 -2.9 -6.5 174 15.5 -2.9 -7.5 177 16.5 -2.9 -7 179 17 -2.9 -8 181 17.5 -2.9 -8 183.5 17.5 -2.9 -7.5 186 17 -2.9 -7.5 189 16.5 -2.9 -8 192.5 16 -2.9 -8 196.5 17.5 -2.9 -8.5 198.5 19 -2.9 -8.5 199.5 20.5 -2.9 -8 200.5 20.5 -2.9 -8.5 202 20.5 -2.9 -8.5 204 20.5 -2.9 -8.5 206 21 -2.9 -9.5 208 20.5 -2.9 -9 210 20 -2.9 -9 212.5 19.5 -2.9 -8.5 215.5 19.5 -2.9 -8 217 19.5 -2.9 -8 220 19.5 -2.9 -9 221 20 -2.9 -9 224 20.5 -2.9 -9 227.5 21 -2.9 -8.5 230 21 -2.9 -9.5 232 21 -2.9 -10 234.5 21 -2.9 -10 236.5 21 -2.9 -10 239.5 21 -2.9 -10.5 241.5 21 -2.9 -10 245.5 21 -2.9 -10 248.5 21 -2.9 -10 248.5 21 -2.9 -11 250.5 21 -2.9 -10.5 254.5 21 -2.9 -10.5 257 21.5 -2.9 -10.5 260 21.5 -2.9 -10.5 262.5 21.5 -2.9 -10 264.5 21.5 -2.9 -11 267 21.5 -2.9 -10.5 270 21.5 -2.9 -10 272 21.5 -2.9 -9.5 275 21 2.9 -9 278 21 -2.9 -10 281 20.5 -2.9 -10.5 284 20.5 -2.9 -9 285.5 20.5 -2.9 -8 290 21 -2.9 -8 292 20.5 -2.9 -7 295.5 20.5 -2.9 -7.5 297.5 20.5 -2.9 -7 299 20 -2.7 -6.5 301.5 19.5 -2.7 -7.5 304.5 19.5 -2.7 -7.5 308 19.5 -2.7 -6.5 309 19.5 -2.7 -6 312 19 -2.7 -6.5 313.5 19 -2.7 -5.5 315 19 -2.7 -5 318 19 -2.7 -5 320.5 19 -2.7 -4 322 19 -2.7 -4 324 19 -2.7 -4.5 325 19.5 -2.7 -4 326.5 20 -2.7 -4.5 331 20 -2.7 -4.5 336.5 19.5 -2.7 -4.5 339 19 -2.7 -4 340.5 19 -2.7 -4 342 19 2.7 -3.5 346.5 19 -2.7 -4.5 348 19 -2.7 -3.5 349.5 19 -2.7 -3.5 351.5 19 -2.7 -3 353.5 19 -2.7 -3.5 356.5 19 -2.7 -3.5 356.5 19 2.7 1 116 -3.5 356.5 19 2.7 -3 359.5 23 -2.2 -0.5 362 27 -2.2 0.5 363.5 30 -2.2 1.5 368 32 -2.2 3 371 33.5 -2.2 2.5 374 34.5 -2.1 3 377.5 35.5 -2.1 2.5 378.5 35.5 -2.1 4.5 382.5 35.5 -2.1 4.5 383.5 35.5 -2.1 5.5 386 36 -2.1 6 389.5 37 -2.1 6 392.5 37.5 -2.1 5.5 395 39 -2.1 5.5 396.5 39.5 -2.1 6 399 40 -2.1 5.5 400.5 40 -2.1 5 404.5 40 -2.1 4 408.5 40 -2.1 4 409.5 40.5 -2.1 4.5 410.5 40.5 -1.9 4 411.5 40.5 -1.9 3.5 413 40.5 -1.9 3 414 40.5 -1.9 3 415 40.5 -1.9 2.5 415.5 40.5 -1.9 3 416.5 40 -1.9 3.5 418 40 -1.6 4.5 420 40 -1.6 5.5 421 40 -1.6 7 421.5 39.5 -1.6 7.5 422.5 39 -1.6 7.5 424 39 -1.6 7.5 426.5 39.5 -1.6 8.5 427 40 -1.6 8 429 39.5 -1.6 8.5 430 39 -1.6 8 432.5 38.5 -1.6 9 436 38 -1.6 8 437.5 38 -1.6 8 439 38 -1.6 8 442 38 -1.6 9 444 38 -1.6 9 446 38.5 -1.6 9 446.5 38.5 -1.6 9.5 448 39.5 -1.6 9.5 449 39.5 -1.6 8.5 451.5 40.5 -1.6 8 454.5 41 -1.6 9 456 42 -1.6 9 459 42 -1.6 10.5 462.5 42 1.6 10.5 465 42 -1.6 10 466.5 42 -1.6 10.5 469.5 42 -1.6 11 474.5 42.5 -1.6 12 476.5 42.5 -1.6 11.5 478 42.5 -1.6 12 482 42 -1.6 12.5 485 42 -1.6 12 487 41.5 -1.6 14.5 490.5 42 -1.6 14.5 493 42.5 -1.6 15 495 43.5 -1.6 15.5 497.5 43 -1.6 15 498.5 42.5 -1.6 16.5 501 42.5 -1.6 17.5 503 43 -1.6 18.5 506.5 43.5 -1.6 19 507.5 43.5 -1.6 19.5 510 43.5 -1.6 20 512.5 44 -1.6 20.5 514.5 44 -1.6 21 515.5 44 -1.6 20.5 516.5 44 -1.6 22.5 519 44.5 -1.6 23.5 522 45 -1.7 24 522.5 45 -1.7 23.5 525.5 45.5 -1.7 25 528 46 -1.7 26 530.5 46.5 -1.7 26.5 532.5 47 -1.7 27.5 536 47 -1.7 28 538 47.5 -1.7 28.5 539.5 47.5 -1.7 29.5 542 47.5 -1.7 31 545.5 47 1.3 30.5 547 46.5 1.3 31.5 549 46 1.3 33 550 46 1.3 34 550.5 46 -1.4 35 551.5 46 -1.4 34.5 553.5 46 -1.4 35 555.5 46.5 -1.4 35.5 557 47 -1.4 36.5 558 47.5 -1.4 36.5 560.5 48 -1.4 38.5 562.5 48.5 -1.4 38.5 565.5 48.5 -1.4 39 567 48.5 -1.4 39.5 570.5 48 -1.4 40 573 47.5 -1.4 40.5 576.5 47 -1.4 41.5 578.5 47 -1.4 43 580.5 47 -1.4 42.5 583.5 47.5 -1.4 44 587 48 -1.4 45 588 48.5 -1.4 46 590 48.5 -1.4 47 593.5 48.5 -1.4 47.5 597 49 -1.4 49 602 50.5 -1.4 50 603 52 -1.4 51 604.5 53 -1.4 50 606 53 1.4 1 11 50 606 53 1.4 52.5 607.5 51.5 -1.5 53 610.5 50.5 -1.5 55 614.5 50.5 -1.5 56 616 51 -1.5 57.5 621 53.5 -1.5 58 625.5 55.5 -1.5 59.5 626 57.5 -1.5 60 628 58 -1.5 59 630 58.5 -1.5 59.5 630.5 59 1.5 1 9 59.5 630.5 59 1.5 61 632.5 59 -1 62 634.5 59 -1 63.5 636.5 59 -1 65 639.5 59 -1 64.5 641.5 59 -1 65.5 643 59.5 -1 67 644.5 59.5 -1 67.5 648 60 0.8 1 8 59.5 630.5 59 1.5 60 633.5 59.5 -1.2 59 636.5 60.5 -1 58.5 637.5 61.5 -1 60.5 641 62 -1 60 642 62.5 -1 61 644.5 63 -1 62 647.5 63.5 1 1 88 50 606 53 1.4 50 609.5 52.5 -1.2 49.5 611.5 52.5 -1.2 49.5 614.5 52.5 -1.2 48 617 53 -1.2 48.5 618.5 53.5 -1.2 49 621.5 54.5 -1.2 49 622 54 -1.2 48.5 624 54.5 -1.2 48.5 627 55 -1.2 49 629 56.5 -1.2 49.5 632 56.5 -1.2 49 633 57.5 -1.2 49.5 635.5 58 -1.2 50 637.5 59 -1.2 49 639 58.5 -1.2 49.5 641.5 58.5 -1.3 48.5 645.5 58 -1.3 48 647 58.5 -1.3 48 648 58.5 -1.3 48 651.5 59 -1.3 47 653.5 59 -1.3 47 655.5 59 -1.3 46 657 59.5 -1.3 46.5 661 60.5 -1.3 46.5 663 62 -1.3 45.5 667 62.5 -1.3 45 669 62.5 -1.3 45 671 62.5 -1.3 46 673 63 -1.3 45.5 675.5 64 -1.3 45 677.5 64 -1.3 44.5 680 64.5 -1.3 45.5 684.5 64.5 -1.3 44.5 686 65.5 -1.3 45 691 66 -1.3 44 693 67.5 -1.3 44 696 68 1.3 43.5 699 69 1.3 43 700.5 70 -1.3 42.5 701 71 -1.3 41.5 704 71.5 -1.3 42 707.5 71.5 -1.3 41 709 72 -1.3 42 712 72.5 -1.3 42 714 72.5 -1.3 43 716 72 -1.3 43.5 720.5 72 -1.3 44.5 722.5 72 -1.3 46.5 725 72.5 -1.3 46 726.5 72.5 -1.3 45.5 729 72 -1.3 46.5 731.5 71.5 -1.3 47 735 71 -1.3 47 738 70.5 -1.3 48 741 70 -1.3 48.5 745.5 70 -1.3 49.5 747 70.5 -1.3 50 748.5 70 -1.3 50 751 70 -1.3 50.5 753 70 -1.3 50.5 757.5 69 -1.3 51 758.5 68 -1.3 51.5 760 67 -1.3 52.5 764 66 -1.3 52.5 768 65 -1.3 53 771.5 64.5 -1.3 52 773.5 64 -1.3 52.5 776 64 -1.3 52.5 779 64 -1.3 51.5 783.5 64.5 -1.3 53.5 786.5 64.5 1.3 53.5 791.5 65 -1.3 54.5 795.5 65.5 1.3 55 798.5 66 -1.3 54.5 800.5 66 -1.3 55 801.5 66 1.3 56 804 66.5 1.3 57.5 808 67 1.3 57.5 809.5 67 1.3 58 812.5 66.5 -1.3 59 815.5 65.5 -1.3 58.5 817.5 64.5 -1.3 58.5 820.5 63.5 -1.3 58 823.5 62.5 1.3 58 825.5 62.5 1.3 57 828.5 62.5 1.3 56 831.5 62.5 1.3 1 100 -3.5 356.5 19 2.7 -3 358.5 19 -2.7 -3.5 361 19 -2.7 -3.5 362.5 19 -2.7 -2.5 364 19.5 -2.7 -3.5 366 20 -2.7 -2.5 367.5 20.5 -2.7 -2 369.5 20.5 -2.7 -2.5 372 20 -2.7 -2.5 375 19.5 -2.7 -2 376 19 -2.7 -3 379.5 19 -2.7 -2.5 381.5 19.5 -2.7 -3 385 20 -2.7 -3.5 387 20.5 -2.7 -4 388.5 20.5 -2.7 -2.5 390 20 -2.7 -2.5 392 19.5 -2.7 -4.5 394 19.5 -2.7 -4 395 19.5 -2.7 -3.5 399 20 -2.7 -4.5 400 20.5 -2.7 -4.5 401.5 20.5 -2.7 -4 403.5 20.5 -2.7 -5.5 405.5 21 -2.7 -4.5 408.5 21 -2.2 -3.5 410.5 20.5 -2.2 -4 411.5 20.5 -2.2 -2.5 414.5 19.5 -2.2 -2 416 18.5 -2.4 -2.5 417 17.5 -2.4 -2.5 418 17.5 -2.4 -1.5 421 17.5 -2.4 -2 423 17.5 -2.4 -2 424.5 17.5 -2.4 -2.5 428.5 17.5 -2.4 -2.5 429.5 17 -2.4 -2.5 434.5 17 -2.4 -2.5 436 17 -2.4 -2 437 17 -2.4 -3 440 17 -2.4 -2 441.5 17.5 -2.4 -2 444.5 17.5 -2.4 -3 446.5 17 -2.4 -2.5 449 17 2.4 -1.5 451 17 -2.5 -3 453 17 -2.5 -2.5 454 17 -2.5 -1.5 455.5 17 -2.5 -2.5 457.5 17.5 -2.5 -2.5 460 17.5 -2.5 -2.5 463.5 17.5 -2.5 -2.5 466.5 17.5 -2.5 -2.5 468.5 18 -2.5 -2.5 470 18.5 -2.5 -3 472 18.5 -2.5 -3.5 475.5 19 -2.5 -3 477.5 19.5 -2.5 -4.5 480 20.5 -2.5 -5 482.5 22 -2.9 -5.5 484 22.5 2.9 -5 487 23.5 -2.9 -4.5 489 23.5 -2.9 -4 491 24.5 -2.9 -5 497 25 2.4 -5 501 26 -2.4 -4.5 503 26 -2.4 -5 504.5 25.5 -2.4 -5 507 25.5 -2 -4.5 509 26 -2 -4.5 511 26.5 -2 -5 512.5 26.5 -2 -4.5 514.5 26.5 -2 -4.5 518.5 26.5 -2 -5.5 521.5 26.5 -2 -5.5 525 26.5 -2 -6 527 27 -2 -6 530 28 -2 -6.5 531.5 29.5 -2 -6.5 534 30 -2 -7.5 539.5 30.5 -2 -7.5 542 31.5 -2 -7.5 544.5 32.5 -2 -8 546.5 33 -2 -9.5 550.5 32.5 -2 -8.5 554 31.5 -2 -9.5 555 31.5 -2 -8 559.5 31.5 2 -9 563 31.5 -2 -8 565.5 31.5 -2 -8.5 567.5 31.5 -2 -8.5 568 31.5 -2 -7.5 571 31.5 -2 -7.5 572.5 31.5 -2 -6.5 577 31 -2 -5 579 30.5 -2 -5 583 30 -2 -5 585 29.5 -2 -4.5 586.5 29 -2 -4.5 590 28 2 1 51 -4.5 590 28 2 -5.5 594.5 26 -2 -4.5 597 25 -2 -4.5 599.5 24.5 -2 -4 603 24 -2 -3.5 606 23.5 -2 -4.5 608 23.5 -2 -4 610.5 22.5 -2 -5 613.5 21.5 -2 -5 615.5 20.5 -1.8 -3 622 19 -1.8 -2 625.5 18 -1.8 -3 628.5 17.5 -1.8 -1.5 630 17 -1.8 -0.5 631.5 16.5 -1.8 -1 635 16 -1.8 -3 638 15.5 -1.8 -2.5 642 15 -1.8 -2.5 645 14 -1.8 -1 649 13.5 -1.8 -1 650.5 13 -1.8 0.5 656 12 -1.8 1 659.5 11 -1.8 1 660.5 11 -1.8 1.5 661.5 11 -1.8 3 664.5 11.5 -1.8 2 666 11.5 -1.8 3.5 668 11 -1.8 3.5 669 10 -1.8 5 673.5 9.5 -1.8 5 674 9 -1.8 6 676 9 -1.8 7.5 678.5 9 -1.8 9 679 9 -1.8 9 681.5 10 -1.8 11.5 687 10.5 -1.8 12 689 11 -1.8 13 693.5 11.5 -1.8 13.5 695 12 -1.8 13.5 697.5 12 -1.8 14 699.5 12 -1.8 14.5 701 12 -1.8 16 703.5 11.5 -1.8 16.5 705 10.5 -1.8 16 707.5 9.5 -1.8 18 711.5 9 -1.8 19.5 717 8.5 -1.8 19 719.5 9 -1.8 19.5 722 8.5 -1.8 20.5 723.5 8 -1.8 20.5 725.5 7.5 1.9 1 32 20.5 725.5 7.5 1.9 22 727.5 8.5 -1.8 23 732 9.5 -1.8 25 734 10 1.8 25 737 10 -1.8 25 739 9.5 -1.8 27 743 9 -1.8 27 744 8.5 -1.8 26.5 746.5 8.5 -1.8 26 748.5 8.5 -1.8 26 753.5 8.5 -1.8 26.5 757.5 9 1.8 26.5 758 9 -1.8 27.5 759.5 9 -1.8 28 762 9.5 -1.8 28 764 9.5 -1.8 29 768 9 -1.8 30.5 769 8.5 -1.8 31 770 8.5 -1.8 32.5 772.5 8.5 1.8 33.5 777.5 8 1.8 35 780.5 7.5 -1.8 34.5 783.5 6.5 -1.8 36.5 787.5 6.5 -1.8 37.5 790.5 6 -1.8 38.5 792.5 5 -1.8 40 797.5 4.5 1.8 41.5 802 4 -1.8 41 805.5 3 -1.8 40.5 810 2 -1.8 40.5 814.5 0.5 -1.8 41.5 818.5 0 1.8 1 17 41.5 818.5 0 1.8 42.5 819 -0.5 1 44.5 820 -1 1 45.5 821.5 -1.5 -1 46.5 822.5 -1.5 -1 48 824 -1.5 -1 48.5 826 -1.5 1 49.5 827 -1.5 1 50.5 829 -1.5 -1 50.5 830.5 -1.5 -1 52.5 831.5 -1.5 1 53.5 833.5 -1.5 -1 54 834 -1.5 -1 56 837 -1.5 1 58 838.5 -1.5 -1 60 840 -1.5 -1 61.5 841 -1.5 1 1 13 41.5 818.5 0 1.8 41.5 820 0 -1.7 43 822.5 0 1.7 43 826 0 -1.7 42 830.5 0 -1.7 42 833 0 -1.7 42 835.5 -1 -1.7 40.5 840 -2 1.1 41 841.5 -3 -1.1 41.5 843 -3 -1.1 41 845 -3.5 -1.1 39.5 846 -4 -1.1 39 846.5 -4 1.1 1 23 20.5 725.5 7.5 1.9 20.5 728 8 -1.9 20 730 8.5 -1.9 20 730.5 8.5 -1.9 19.5 732.5 8 -1.7 19 736.5 8.5 -1.7 19 738.5 9 -1.7 18.5 739.5 9.5 -1.7 18.5 742.5 10 -1.7 19 747.5 11 -1.7 19 751 12 -1.7 18.5 753 12.5 -1.7 17.5 755.5 13 -1.7 17.5 758 13.5 -1.7 17 759 13.5 -1.7 17 761 14 -1.7 16 765.5 15 -1.7 16.5 766 16 -1.7 17 768.5 16 -1.7 15 772 16 -1.7 13.5 774.5 16 -1.7 14 775 16.5 -1.7 15 779 17.5 1.7 1 6 15 779 17.5 1.7 16 779.5 18.5 -1.2 17 782 19.5 -1.2 19 785 20 -1.2 20 787.5 20.5 -1.2 20 787.5 21 1.2 1 8 15 779 17.5 1.7 14 780.5 17.5 1.6 13 783 18 1.6 13.5 784.5 18.5 1.6 12.5 786 19 1.6 12 788 20 -1.6 13 789.5 20.5 -1.6 13 791 20.5 1.6 1 48 -4.5 590 28 2 -4.5 592 28 -2 -5 593.5 28.5 -2 -5.5 595.5 29 -2 -5.5 597.5 30 -2 -5.5 600.5 30.5 -2 -6 601.5 31 -2 -5.5 605.5 31 -2 -5.5 605.5 30.5 -2 -6 606.5 30.5 -2 -6.5 608.5 30.5 -2 -6.5 609.5 31.5 -1.8 -7 612 31.5 -1.8 -7 612.5 31.5 -1.8 -6.5 615 31.5 -1.8 -6.5 616.5 32 -1.8 -7 618 32 -1.8 -6.5 619.5 32.5 -1.8 -6.5 623 33.5 -1.8 -6 626 34 -1.8 -5.5 628 34 -1.8 -5.5 633 34 -1.8 -6.5 635.5 34 -1.8 -7 636.5 34 -1.8 -7 638 33.5 -1.8 -7 639.5 33.5 -1.8 -6.5 641.5 33.5 -1.8 -7.5 646.5 34 -1.8 -7.5 648 34.5 -1.8 -7.5 649.5 35.5 -1.8 -8.5 653.5 36 -1.8 -8.5 655.5 36.5 -1.8 -8.5 656 37 -1.8 -9 657.5 37 -1.8 -9 660 37 -1.8 -10 664 37 -1.8 -11 666 38 -1.8 -12.5 667 39 1.8 -13 669.5 40 -1.8 -11.5 672 40 -1.8 -12 672.5 40.5 -1.8 -11 674.5 41 1.8 -10.5 677 41.5 -1.8 -11 680 42 -1.8 -12 680.5 42 -1.8 -11.5 683 42.5 -1.8 -11.5 684 42.5 -1.8 -12 685.5 42.5 1.8 1 53 -12 685.5 42.5 1.8 -12 687.5 45.5 -1.8 -11.5 693 47.5 -1.8 -12 696 48 -1.8 -11.5 697 48.5 -1.8 -11.5 699 48.5 -1.8 -11 700 49 -1.8 -10 704.5 50 -1.8 -9.5 706 50.5 -1.8 -9 710 50.5 -1.8 -8.5 713 50.5 -1.8 -7.5 714 51 -1.8 -6.5 719.5 51 -1.8 -6.5 721.5 51 -1.8 -6.5 722.5 50.5 -1.8 -6 728 50.5 -1.8 -4.5 733 51 -1.8 -3 737 51.5 -1.8 -2.5 740.5 53 -1.8 -0.5 744 53.5 -1.8 0.5 746.5 54 -1.8 0.5 747.5 54 -1.8 1.5 751.5 53.5 1.8 2.5 755.5 53 -1.8 2.5 756 53 -1.8 2.5 760 54 1.8 4 763 55.5 1.8 3.5 765 57.5 -1.8 3.5 766 58 -1.8 4 769.5 58.5 -1.8 3.5 771 59 -1.8 4.5 773 59 -1.8 3.5 776.5 59 -1.8 4.5 779 59 -1.8 4.5 783 59 -1.8 4 784 58.5 -1.8 4 786 58.5 -1.8 5 790.5 58.5 -1.8 4.5 793 59 -1.8 4 795.5 59 -1.8 4.5 797.5 59 -1.8 4.5 798 59 -1.8 4.5 799.5 59 -1.8 5.5 801 59 -1.8 5.5 803.5 59 -1.8 7 805.5 59 -1.8 6.5 808 59 2.3 5.5 809.5 59.5 -2 6.5 810.5 60 -2 9 816 60.5 -2 8.5 817 60.5 -2 8.5 818.5 60 -2 10 820 59.5 2 1 7 10 820 59.5 2 11 821 59.5 1 11.5 821 59.5 1 13 821.5 60 1 16 820 60 1 18 819 60 -1.1 19.5 821 61 1.1 1 2 10 820 59.5 2 9 821.5 60 2 1 12 9 821.5 60 2 9 823 60 1.6 7 827.5 60 -1.6 7 828.5 60 -1.6 8 831 60.5 1.6 8 832.5 61 -1.6 8.5 834.5 61.5 -1.6 6 837 62 -1.6 4 839.5 62.5 1.6 3.5 840.5 62.5 1.5 2.5 843.5 62.5 1.3 2 845 62.5 1.3 1 12 9 821.5 60 2 8 823.5 59.5 -1.8 6.5 825 59 -1.8 3.5 827 58 -1.8 2.5 829 57 -1.8 0.5 830 56.5 -1.8 -0.5 832 56.5 -1.8 -0.5 833 56.5 -1.8 -1.5 835 56.5 -1.8 -3.5 838 56.5 1.6 -5.5 838.5 56.5 -1.6 -6 839.5 56.5 1.4 1 49 -12 685.5 42.5 1.8 -12.5 688 43 -1.8 -13 689 44 -1.8 -13.5 692.5 44 -1.8 -14 694 44 -1.8 -14.5 697.5 44 -1.8 -14 698 44.5 -1.8 -13.5 700 45 -1.8 -13 703 46 -1.8 -12.5 708 46 -1.8 -13.5 709 46.5 -1.8 -12.5 713.5 47.5 -1.8 -12 715.5 48.5 -1.8 -11 720.5 48.5 -1.8 -10 723 48.5 -1.8 -10.5 725.5 48.5 -1.8 -10.5 728.5 48.5 -1.8 -10 729.5 48.5 -1.8 -10.5 730.5 48.5 -1.8 -10.5 732 48.5 -1.8 -10 734.5 48.5 -1.8 -9 737 49 -1.8 -8 743.5 49 -1.8 -9 747 49.5 -1.8 -9.5 751 49 -1.8 -9.5 751 49 -1.8 -9 754 49 -1.8 -10 756.5 50 -1.8 -9 764.5 51 -1.8 -10 769 52 -1.5 -9 771 52 -1.5 -9.5 775 52 -1.5 -9.5 775 52.5 -1.5 -10 778 52.5 -1.5 -10.5 780 52.5 -1.5 -10 781.5 52.5 -1.5 -10.5 783 52.5 -1.5 -11 784.5 52.5 -1.5 -11 785.5 52.5 -1.5 -11.5 787.5 52.5 -1.5 -11 789 52.5 -1.5 -12 790.5 52.5 -1.5 -13 792 52 -1.5 -13 794 52 -1.5 -14.5 796 52 -1.5 -15 800 52 -1.5 -15.5 803 52.5 -1.5 -16 804 52.5 -1.5 -16.5 806 52.5 1.5 1 40 -16.5 806 52.5 1.5 -16 808.5 47 -1.5 -16 811 43.5 -1.5 -15 814.5 42 -1.5 -15 818 41.5 -1.5 -15.5 820.5 40.5 -1.5 -16 822 39.5 -1.5 -17 824 38.5 -1.5 -18 828 38 -1.5 -18 829 37 -1.5 -18.5 831.5 36 -1.5 -19 833 34.5 -1.5 -19.5 835.5 33.5 -1.5 -21.5 839 32.5 -1.5 -22.5 841.5 31.5 -1.5 -23 843 30 -1.5 -25 846 28 -1.5 -26 849.5 25.5 -1.5 -28 853 24 1.5 -29 857.5 23 1.5 -30.5 858.5 22 1.5 -31.5 860.5 21.5 -1.5 -34 865 21 -1.5 -35 867 21 -1.5 -38 870.5 20 1.5 -40.5 872.5 19.5 -1.5 -43.5 874 19.5 -1.5 -44.5 874 19.5 -1.5 -48 881 19.5 -1.5 -49 883 19.5 -1.5 -50.5 884 19 -1.5 -53 887.5 19 -1.5 -55.5 889 19 -1.5 -58 890.5 19 1.5 -60 891.5 19 1.5 -62 892.5 19 1.5 -64.5 894.5 19 1.2 -67 895 19 1.1 -68 897 18.5 1 -68 898 18 1 1 11 -16.5 806 52.5 1.5 -17.5 808.5 52.5 -1.5 -18 809.5 53 -1.5 -20 812.5 54.5 -1.5 -20.5 813.5 57 -1.5 -20.5 814.5 60 -1.5 -19 816.5 62.5 -1.5 -18.5 817.5 65 -1.5 -19 819 66.5 -1.5 -18 819.5 68 -1.5 -17 821.5 70 1.5 1 7 3 22 0 2.1 5 21.5 0 1.9 6.5 22.5 0 1.7 9 25.5 0 1.7 11 26.5 0 1.7 12.5 28 0 1.7 14 29 0 1.7 1 69 14 29 0 1.7 15.5 28.5 0 -1.2 17 28.5 0 -1.2 22.5 28.5 0 1.2 26 28.5 0 -1.2 28 28 0 -1.2 31.5 28.5 0 -1.2 34 28.5 0 -1.2 35.5 30 -0.5 -1.2 38 30.5 -1 -1.2 39 29.5 -2 -1.2 41 30.5 -2 -1.2 43 30.5 -2.5 -1.2 47.5 31 -4.5 -1.2 49.5 31 -7.5 -1.2 50 31.5 -11 -1.2 51.5 32 -13 -1.2 53 32.5 -14.5 -1.2 54.5 31.5 -15.5 -1.2 56.5 31.5 -16.5 -1.2 57.5 31.5 -17 -1.2 60.5 32 -18.5 -1.2 63 32.5 -19 -1.6 65 33.5 -20 -1.6 68 33.5 -22 -1.6 69.5 34 -23.5 -1.6 71 34 -25.5 -1.6 72 34 -26 -1.6 74.5 34 -27 -1.6 76.5 35 -28.5 -1.6 79 35 -30.5 -1.6 82 36 -31.5 1.6 83.5 36.5 -32 -1.6 85 37 -32.5 -1.6 87 38 -33.5 -1.6 88.5 38.5 -34.5 1.6 92 40 -35 -1.6 94 41 -35 -1.6 95.5 41.5 -36.5 -1.6 97.5 42.5 -38 -1.6 100 42 -40.5 1.6 103.5 43.5 -43 -1.6 104.5 43 -45 -1.6 105 43 -46.5 -1.6 107 43.5 -47 -1.6 108 42.5 -47.5 -1.6 109.5 42.5 -49 1.6 113 42 -50.5 -1.6 118.5 42.5 -52.5 -1.6 122 44 -55 -1.6 126.5 44.5 -56.5 -1.6 128 45 -58 -1.6 133 46.5 -60 -1.6 137 46.5 -62.5 -1.6 139.5 48 -64 1.6 140.5 48 -65 -1.6 142 48.5 -65 -1.6 146 48.5 -65.5 -1.6 149 49.5 -66.5 -1.6 152 49 -67.5 -1.6 155 49.5 -68.5 -1.2 156 49 -70 -1.2 158.5 47.5 -71 1.2 160 48 -72.5 1.2 162 49 -74 -1.2 163 49.5 -75 -1.2 163.5 50 -76 -1.2 164 50.5 -77 -1.2 165.5 52 -79 1.2 1 85 14 29 0 1.7 14 30.5 0 1.6 15.5 32 0 -1.6 16.5 34 0 -1.6 18 37.5 0 -1.6 21 39.5 0 -1.6 24 43 0 -1.6 26 44 0.5 -1.6 27 47 0.5 -1.6 27 48 0.5 -1.6 30.5 50.5 0.5 -1.6 31.5 51.5 0.5 -1.6 33.5 53 0.5 -1.6 36 55.5 0.5 -1.6 37 56.5 0.5 -1.6 39 58.5 0.5 -1.6 39.5 60 0.5 -1.6 41 61 0.5 -1.6 41.5 63 0.5 -1.6 42.5 64 0.5 -1.6 43.5 65.5 0.5 -1.6 44.5 65.5 0.5 -1.6 46 67 1 -1.6 46.5 69 1.5 -1.6 47 69 1.5 -1.6 47.5 69.5 1.5 -1.6 48.5 70 1.5 -1.6 49.5 71 1.5 -1.6 51.5 73 1.5 -1.6 52.5 73 1.5 -1.6 54.5 74.5 1.5 -1.6 54.5 74.5 1.5 -1.6 56 76.5 1.5 -1.6 57.5 79 1.5 -1.6 59 80 1.5 -1.6 59.5 81.5 1.5 -1.6 60.5 83.5 1 -1.6 61 84 0.5 -1.6 62.5 86.5 0.5 -1.6 62.5 88 0 -1.6 64 90.5 0 -1.3 63.5 93 0 -1.3 63 95 0 -1.3 65 97 0 -1.2 66.5 99 0 -1.2 66.5 100 0 -1.2 66.5 100.5 0 -1.2 69.5 103 0 -1.2 70.5 103.5 0 -1.2 72.5 105.5 0 -1.2 72.5 107 -0.5 -1.2 75.5 111 -0.5 -1.2 77.5 112 -0.5 -1.2 79.5 113 -0.5 -1.2 80.5 115.5 0 -1.2 82.5 117.5 0.5 -1.2 84.5 119 1.5 -1.2 84.5 120 1.5 -1.2 86 122 1.5 -1.2 86.5 122 1.5 -1.2 86.5 123.5 1.5 -1.2 86.5 125 1.5 -1.2 87.5 126 1.5 -1.2 87.5 127 1.5 -1.2 89 130 1.5 -1.2 89.5 131.5 1.5 -1.2 91 133.5 1.5 -1.2 92 135.5 1.5 -1.2 92.5 136 1.5 -1.2 94 137.5 1 -1.2 95 139 0.5 -1.2 98.5 142 0.5 -1.2 100.5 145 1 1.2 101 147 1 1.2 101 148 0.5 -1.2 103.5 150 0 -1.2 105 151.5 0 -1.2 105 154 0 -1.2 107 157 0 -1.2 108 158 0 -1.2 111 160 -0.5 -1.2 112 162 -1 -1.2 114 163.5 -2 -1.2 115 164 -2 -1.2 116 164 -2 1.2 1 12 10.5 -4 0 2.9 11.5 -4 -1.5 2.6 13.5 -4.5 -3 2.6 15.5 -6 -4.5 2.3 18 -7.5 -6 2.3 19 -7 -6.5 -2.3 21 -9 -7 2.3 22 -8.5 -7.5 -2.3 24 -8 -8 -2.3 27 -10 -9.5 -2.3 31.5 -12.5 -11.5 -2.3 33.5 -11 -14.5 2.3 1 34 33.5 -11 -14.5 2.3 35.5 -10.5 -10.5 1.8 37.5 -9.5 -8.5 1.8 41 -10.5 -8.5 1.8 43.5 -8 -8.5 1.8 45.5 -6 -10 1.8 47.5 -5.5 -11.5 1.8 50.5 -4.5 -13.5 1.8 53 -5.5 -13.5 -1.8 54.5 -5 -13.5 -1.8 57.5 -4.5 -15 -1.8 61 -6.5 -17 -1.8 64 -5 -19.5 -1.8 66 -5 -20.5 -1.8 70 -3.5 -21 -1.8 72.5 -4 -21 -1.8 75.5 -2 -21.5 -1.8 78.5 -0.5 -21.5 -1.8 80.5 0 -22 -1.8 83 0 -22.5 -1.8 86.5 1.5 -23 -1.8 88 2 -24 -1.8 90 4.5 -26.5 -1.8 92.5 4.5 -29 -1.8 93 5 -30.5 -1.8 95 6.5 -30 -1.6 98 6 -30 -1.6 99.5 5 -30 -1.6 101.5 5 -30 -1.6 103.5 5.5 -30 -1.6 104.5 6 -30 -1.6 105 6 -30 -1.6 106 5 -30 -1.6 107 6 -30 1.6 1 25 107 6 -30 1.6 109 8.5 -30 -1.7 111 9 -29.5 -1.7 111.5 11.5 -29.5 -1.7 113 12.5 -29.5 -1.7 115 14 -29 -1.7 119.5 16.5 -28.5 -1.7 121.5 19 -28 -1.7 125 21.5 -28.5 -1.7 126.5 22 -29.5 -1.7 128.5 24.5 -31 -1.7 130.5 26 -32.5 -1.7 132 27.5 -33.5 -1.7 133 28.5 -34 -1.7 136 32 -35 -1.7 137.5 35 -36 1.4 140 36.5 -37 1.4 140.5 39 -37 -1.4 142.5 40 -37.5 -1.4 143.5 43.5 -38.5 -1.4 145 45 -39 -1.4 147.5 48.5 -39.5 1.4 148 49 -41 -1.4 150.5 52.5 -42 -1.4 152 53.5 -43.5 1.2 1 63 107 6 -30 1.6 108.5 7 -30 -1.6 111 7 -30 -1.6 111.5 6 -30 -1.6 115 6 -30 -1.6 116.5 6 -30 -1.6 117.5 7 -30 -1.6 120.5 5.5 -30 -1.6 121.5 6 -30 -1.4 122 6.5 -30 -1.4 124 7 -30 -1.4 124.5 7 -30 -1.4 126 6.5 -30 -1.4 128 5.5 -30 -1.4 129 5 -30 -1.4 130.5 6 -30 -1.4 131.5 6 -30 -1.4 135 6.5 -30 1.4 136 7 -30 -1.4 138.5 7.5 -30 -1.4 140.5 8 -30 -1.4 143 7 -30 -1.4 145 7 -30 -1.4 147 8 -30 -1.4 147.5 8 -30 -1.4 149 8 -30 -1.4 150.5 8 -30 -1.4 152 8.5 -30 -1.4 154 9 -30 -1.4 155.5 9.5 -30 -1.4 157.5 10.5 -30 -1.4 160 11.5 -30 -1.4 163 12 -29.5 -1.4 163.5 11.5 -29 -1.4 165.5 12 -28.5 -1.4 166.5 12.5 -28.5 -1.4 168.5 13.5 -28.5 1.4 170.5 14 -28 -1.4 173.5 13.5 -28 -1.4 175.5 14 -27.5 -1.4 178 14.5 -26.5 -1.2 180 16 -25.5 -1.2 181.5 16 -25 -1.1 182.5 15.5 -24.5 -1.1 184.5 15.5 -23.5 -1.1 186.5 15.5 -22.5 -1.1 188 16 -21.5 -1.1 190 16.5 -20 -1.1 192 17 -19 -0.9 193.5 18 -18 -0.9 195.5 18.5 -18 0.9 197.5 19.5 -18 0.9 198.5 20 -18 0.7 200 19.5 -18 0.7 202.5 19.5 -18 -0.7 204 19.5 -17 -0.7 207 17.5 -16.5 -0.7 207.5 17.5 -15.5 -0.7 210 17.5 -15 -0.7 210.5 18 -14 -0.7 213 18 -13.5 -0.7 214.5 17.5 -13.5 -0.7 217 16.5 -13.5 0.7 1 3 33.5 -11 -14.5 2.3 36.5 -13 -12 2.3 38 -14.5 -11 2.3 1 7 38 -14.5 -11 2.3 40.5 -15.5 -12.5 2.3 43 -17 -14.5 2.3 44.5 -18.5 -18 -2.3 48 -20 -19.5 2.3 51 -20.5 -21 2.3 56 -22.5 -21 2.3 1 11 56 -22.5 -21 2.3 55 -25.5 -24 -1.9 54.5 -27 -27 -1.9 55 -29.5 -30.5 -1.9 55.5 -31.5 -31 -2 57.5 -35 -31 -2 57.5 -37.5 -32 -2 57.5 -38.5 -33 -2 58.5 -42 -36 -2 59 -44.5 -39 -2 59.5 -47.5 -43.5 2 1 7 59.5 -47.5 -43.5 2 57.5 -48.5 -45.5 -1.6 58 -50.5 -47.5 -1.6 57 -53 -49.5 -1.6 55.5 -53.5 -50.5 -1.6 54.5 -53.5 -52.5 1.6 53.5 -54 -54.5 1.6 1 10 59.5 -47.5 -43.5 2 61.5 -50.5 -43.5 -1.7 62.5 -52 -44 -1.7 63.5 -55.5 -45.5 -1.7 65 -57.5 -47.5 -1.7 65.5 -58 -50 -1.7 66.5 -59.5 -51 -1.7 68 -60.5 -52.5 -1.7 70 -62.5 -54 -1.7 71 -63.5 -56 1.7 1 78 56 -22.5 -21 2.3 57.5 -23.5 -21 -1.8 58.5 -23 -22.5 -1.8 59.5 -24.5 -23.5 -1.8 61.5 -24.5 -24.5 -1.8 62.5 -26 -24.5 -1.8 65 -28 -24.5 -1.8 67.5 -30 -25 -1.8 69.5 -31 -26 -1.8 73 -34 -27.5 1.8 76 -35 -29 -1.8 79.5 -37.5 -30 -1.8 80 -38.5 -30.5 -1.8 82 -40 -31 -1.8 83 -40.5 -31 -1.8 84 -42 -31 -1.8 86.5 -43.5 -31 -1.8 88.5 -45 -31 -1.8 90 -46.5 -31 -1.8 93 -49.5 -31 -1.8 94 -49.5 -31 -1.8 96 -51 -31 -1.8 96.5 -52 -31 -1.8 98 -52.5 -31 -1.8 99 -53 -30.5 -1.8 99.5 -53.5 -30 -1.8 100.5 -54 -29.5 -1.8 103 -55 -29.5 -1.8 105 -56 -29 -1.8 107 -57 -28.5 -1.8 110 -59.5 -28.5 -1.8 110.5 -60 -28.5 -1.8 112.5 -61 -28.5 -1.8 114.5 -62.5 -28.5 -1.8 116 -64.5 -28.5 -1.8 119 -67.5 -28.5 -1.8 119.5 -67 -28.5 -1.8 122 -70 -28.5 -1.8 123 -70.5 -28.5 -1.8 125.5 -72 -29 -1.8 126 -72.5 -29.5 -1.8 128.5 -73.5 -29.5 -1.8 128.5 -74.5 -29.5 -1.8 131.5 -74.5 -29.5 -1.8 133 -76 -29.5 -1.8 133.5 -76 -29.5 -1.8 136 -77 -29.5 -1.8 136.5 -78 -29.5 -1.8 138.5 -79 -30 -1.8 140.5 -81.5 -31 -1.8 142.5 -81.5 -32 -1.8 145 -82.5 -32 -1.8 148 -83.5 -32.5 -1.8 149.5 -85.5 -33.5 -1.8 152.5 -85.5 -34.5 -1.8 155.5 -86.5 -35.5 -1.8 159.5 -88 -36 -1.8 161.5 -89.5 -36.5 -1.5 162.5 -91 -37 -1.5 164.5 -92 -38.5 -1.4 167.5 -93 -40.5 -1.4 172 -95 -41.5 -1.4 174 -96.5 -42 -1.4 176.5 -97.5 -42.5 -1.4 179 -98 -44 -1.4 180.5 -98 -45.5 -1.4 183.5 -99 -47 -1.4 186 -100.5 -47 -1.4 188 -101 -47 -1.4 189 -102 -47.5 -1.4 192 -103 -48 -1.4 193 -103.5 -49 -1.4 195 -103.5 -50 -1.4 196.5 -106 -50.5 -1.4 197 -106 -51 -1.4 198.5 -106.5 -51.5 -1.4 200 -108.5 -52 -1.4 202 -110 -53 1.4 1 13 38 -14.5 -11 2.3 40 -14.5 -10.5 1.5 43.5 -16 -10.5 1.5 47 -16.5 -10 1.5 49 -17 -10 -1.5 49.5 -17 -10 -1.5 52 -17.5 -10 -1.5 53.5 -17.5 -9 -1.5 55.5 -19 -8.5 -1.2 56.5 -19 -7.5 -1.2 61 -21 -8.5 1.2 62.5 -20 -9.5 -1.2 66.5 -18.5 -10.5 1.2 1 9 8.5 -9 0 2.2 10 -10 1.5 2.2 10.5 -11.5 2.5 2.2 11.5 -12.5 3.5 2.3 13 -14 4 2.3 14.5 -15.5 5.5 2.3 14.5 -16.5 7.5 2.3 15.5 -18 10 2.3 17 -20 14 2.3 1 24 17 -20 14 2.3 18.5 -22.5 6 -2.1 18 -25 2 -2.1 18 -26.5 2 -2.1 19.5 -28.5 2 -2.1 20.5 -30.5 2 -1.9 21.5 -32 2.5 -1.9 21.5 -34 3.5 -1.9 22.5 -37 5 -1.9 21 -39 8.5 -1.9 22.5 -41.5 12 -1.9 24 -43 15.5 -1.9 23.5 -45.5 17.5 -1.9 24 -49 19.5 -1.9 22.5 -52.5 21.5 -1.9 23 -54.5 22 -1.9 22 -57.5 22 1.9 21 -62 21.5 1.9 22.5 -64.5 21.5 -1.9 23.5 -65.5 22.5 -1.9 23.5 -67 24 -1.9 25 -70 25.5 -1.9 24 -72.5 25.5 -1.9 25.5 -75 25 1.9 1 14 25.5 -75 25 1.9 22.5 -76 26 1.8 21 -76 26.5 1.8 19 -77 26.5 1.8 17.5 -77.5 26.5 1.8 17.5 -79 26 -1.8 15.5 -81.5 25.5 -1.8 14 -84 25 -1.8 12 -84.5 25 -1.8 10 -85 25 -1.8 8 -88 25.5 -1.8 8 -88.5 27 -1.8 7 -92 28.5 -1.8 7 -92 29.5 1.8 1 5 7 -92 29.5 1.8 6 -94 30 -1.7 6.5 -97 32 -1.7 4 -99 34 -1.7 3.5 -100.5 35.5 1.7 1 5 7 -92 29.5 1.8 10 -94 30.5 1.1 11.5 -95 31 1.1 14 -102 31 1.1 14 -105 31 1.1 1 5 25.5 -75 25 1.9 28.5 -76 24.5 1.5 29 -77.5 24.5 1.5 30 -79.5 24.5 1.5 31 -81.5 24.5 1.5 1 13 17 -20 14 2.3 19.5 -21 15.5 2 21.5 -22 16.5 -2 23.5 -22 18 -2 25 -24 19 -1.6 27 -25 20 -1.6 29 -27 20.5 -1.6 31.5 -28 21.5 1.6 32.5 -29 22 1.6 34.5 -31.5 22.5 -1.6 36 -31.5 22.5 -1.6 36.5 -31.5 22.5 -1.6 38 -32 23 1.6 1 12 38 -32 23 1.6 38 -32 29.5 1.5 39 -34.5 34.5 1.5 40 -36.5 38.5 1.5 40 -39 41 -1.4 41 -41.5 43.5 -1.4 40.5 -43.5 44 -1.4 43.5 -45.5 44.5 -1.4 42 -48 44.5 -1.4 43 -49.5 45 -1.4 44 -52 46.5 -1.4 44 -54 48.5 1.4 1 19 44 -54 48.5 1.4 45 -54 47 2.2 46 -56 46 -2.2 46 -56.5 45.5 -2.2 49 -58 46.5 -2.2 50 -62 48.5 -2.2 52.5 -63.5 51 -2.2 54 -65.5 52.5 -1.4 56 -65.5 53 -1.2 58.5 -67 53 -1.2 59 -68.5 53 -1.2 61.5 -69.5 53 -1.2 62.5 -71.5 53.5 -1.2 65.5 -73 53.5 -1.2 67.5 -73.5 53 -1.2 69.5 -75 52.5 -1.2 71.5 -76 52.5 -1.2 73.5 -77 52.5 -1.2 76.5 -80 53 1.2 1 11 44 -54 48.5 1.4 43.5 -56 47 1.1 43 -59 47 1.5 43 -59 48 1.2 42.5 -61.5 48 1.2 44.5 -64 48.5 -1.2 43.5 -66.5 50 -1.2 42 -67 51.5 1.3 41 -68.5 52.5 -1.3 41 -73 53 1.3 40.5 -75 54 1.3 1 17 38 -32 23 1.6 39 -33 24 -1.6 40.5 -33.5 24.5 -1.6 42.5 -34 25 -1.6 43.5 -34.5 26 -1.6 46 -35.5 28 -1.6 47 -35 30.5 -1.6 49 -36.5 31.5 -1.6 50.5 -37.5 32 1.2 53 -38 31 -1.2 56 -39 29.5 -1.1 57.5 -40.5 28 -1.1 59 -41.5 28 -1.1 60.5 -43 28 -1.1 62 -44 27.5 -1.1 64.5 -44 27 -1.1 64.5 -45.5 26.5 1.1 1 80 64.5 -45.5 26.5 1.1 67 -46.5 31.5 1.2 69 -46.5 34.5 1.2 70 -46.5 34.5 -1.2 73.5 -48 35 -1.2 74.5 -48 35 -1.2 76 -48 35 -1.2 78.5 -48.5 35 -1.2 80.5 -47.5 35 -1.2 82.5 -50 35 -1.2 84 -50 35 -1.2 87 -51 35 1.2 88.5 -52 35.5 -1.2 90.5 -53 36 -1.2 92 -53.5 36.5 -1.2 94 -54.5 36.5 -1.2 95.5 -55 36.5 -1.2 96.5 -56 36.5 -1.2 96.5 -56.5 36 -1.2 97 -56.5 35.5 -1.2 98 -57.5 35.5 -1.2 99 -58.5 35.5 -1.2 100 -58 35.5 -1.2 101.5 -58.5 35.5 -1.2 103 -59 35.5 -1.2 104.5 -59.5 35.5 -1.2 106 -60 35 -1.2 106.5 -60.5 35 -1.2 108.5 -60.5 35 -1.2 109.5 -60.5 35 -1.2 110.5 -61.5 35 -1.2 112 -61 35 -1.2 114.5 -63 35 -1.2 116.5 -63.5 35 -1.2 117.5 -64 35 -1.2 118 -65 35 -1.2 119 -65 35 -1.2 120 -65.5 34.5 -1.2 120.5 -67 34 -1.2 122 -66.5 33.5 -1.2 123 -66 33.5 -1.2 124.5 -66.5 33.5 -1.2 125.5 -66 33 -1.2 127.5 -67.5 33 -1.2 129 -68 33 -1.2 130.5 -68 33 -1.2 133 -68.5 32.5 -1.2 133 -68.5 32 -1.2 135.5 -69.5 31.5 -1.2 138 -69.5 31.5 -1.2 139 -71 31.5 -1.2 142 -70.5 31 -1.2 145.5 -70 31 1.2 147 -69.5 31 -1.2 148.5 -69 31 -1.2 149.5 -69 31 -1.2 151 -70 31 -1.2 152.5 -69 30.5 -1.2 155 -69.5 30.5 -1.2 155.5 -69 31 -1.2 158 -69.5 31.5 -1.2 159 -70.5 31.5 -1.2 161.5 -71.5 31.5 -1.2 164 -70.5 32 -1.2 167 -70.5 32.5 -1.2 167.5 -70 33.5 -1.2 169.5 -69 35 -1 172 -68.5 36 -1 176 -68.5 36 -1 178 -69.5 35 -1 180.5 -69.5 34.5 -1 182.5 -69.5 34 1 184.5 -70 33 1 187 -69.5 32 1 189 -71.5 32 0.8 191 -71.5 31.5 0.8 191 -71.5 31.5 0.7 193 -73.5 31.5 0.7 195 -74 32 0.7 198 -75 33 0.7 1 66 64.5 -45.5 26.5 1.1 67 -46 26 -1.1 70.5 -45 25.5 -1.1 73 -45.5 25 -1.1 73.5 -45.5 25.5 -1.1 75.5 -45 26 -1.1 78.5 -45 25.5 -1.1 79.5 -44.5 24.5 -1.1 80 -44 24 -1.1 81.5 -44 23 -1.1 85 -44 22 -1.1 88 -43.5 21.5 -1.1 90 -43.5 21 -1.1 93 -44 21 -1.1 94 -43 21 -1.1 95.5 -43 21 -1.1 96.5 -43.5 21 -1.1 97 -44.5 21 -1.1 100 -45.5 21 -1.1 101 -45.5 21 -1.1 103 -46 21 -1.1 104 -47 21 -1.1 106 -48.5 20.5 -1.1 108 -50 20 -1.1 110.5 -50 19 -1.1 112 -50 18.5 -1.1 113.5 -50 18 -1.1 115.5 -51.5 18 -1.1 117 -51.5 17 -1.1 118 -51 16.5 -1.1 121 -52 15.5 -1.1 123.5 -52.5 15.5 -1.1 126 -52 15.5 -1.1 128 -51 15.5 -1.1 130 -50.5 15.5 -1.1 131.5 -50.5 14.5 -1.1 132 -50.5 14 -1.1 132.5 -51 13 -1.1 133.5 -51 12.5 -1.1 134.5 -50.5 12 -1.1 135 -50.5 12 -1.1 135.5 -51 11.5 -1.1 137 -51.5 10.5 -1.1 137.5 -51.5 9 -1.1 138.5 -52 8 -1.1 140 -51.5 7.5 -1.1 141.5 -52.5 8 -1.1 143.5 -52 8 -1.1 144.5 -52 7.5 -1.1 145 -52 7 -1.1 148 -52 6.5 -1.1 149.5 -52 6 -1.1 150 -52 3.5 -1.1 151.5 -50.5 1.5 -1.1 152.5 -51 0 -1.1 154 -51.5 0 -1.1 155 -51.5 0 -1.1 155.5 -51.5 -0.5 -1.1 156.5 -52.5 -1 -1.1 158 -53 -2 -1.1 160.5 -54 -2.5 -1.1 163.5 -54.5 -3.5 -1.1 165 -54.5 -4.5 -1.1 167.5 -53.5 -5.5 -1.1 168.5 -53.5 -6.5 -1.1 170.5 -55 -7.5 1.1 1 87 6 -11 0 2.4 6.5 -14 2 2.4 7.5 -16.5 2.5 2.1 8.5 -20.5 2 2.1 9.5 -24.5 1.5 2.1 10.5 -28 1.5 2.1 10 -31.5 1 2.1 10.5 -34.5 0.5 2.1 12 -37.5 0 2.1 12 -41 0 2.1 13 -47.5 0 2.1 14 -52 0 2.1 15.5 -55.5 0 2.1 16 -59 0 1.8 16.5 -62 0 1.5 17 -62.5 0 -1.5 17.5 -64 0 -1.5 19.5 -67.5 0 1.5 22 -70.5 0 1.5 23 -72 0 1.5 24.5 -74.5 0 1.2 24.5 -76.5 0 1.2 24.5 -78.5 0 1.2 27.5 -82.5 0 1.2 29.5 -85.5 0 1.2 31.5 -90 0 1.1 34 -94 0 1.1 35.5 -97 0 1.1 38 -101 0 1.1 40 -105.5 0 1.1 42.5 -110.5 0.5 1.1 45 -114.5 0 1.1 45.5 -117.5 -0.5 1.1 47 -120.5 -2 1.1 49.5 -125.5 -2 1.1 49.5 -130.5 -2 1.1 52 -133.5 -1.5 0.9 52.5 -137 -2 0.9 54 -140 -2 0.9 56 -141.5 -1.5 0.9 59.5 -145 0 0.9 67 -151 0 0.9 67.5 -152 0 0.9 69.5 -155 0 0.9 72 -159 0 0.9 74 -162.5 0 0.9 76.5 -166.5 0 0.9 79 -170 0 0.9 81 -174 0 0.9 83 -178 0 0.9 84.5 -182 0 0.9 86.5 -186 0 0.9 89.5 -189 0 0.9 93 -191.5 0 0.9 96.5 -194 0 0.9 99.5 -197 0 0.9 102.5 -200.5 0 0.9 105 -204.5 0 0.9 108 -208 0 0.9 110.5 -211.5 0 0.9 112.5 -215 0 0.9 113 -218 0 0.9 113.5 -221 0 0.9 114 -223.5 0 0.8 116 -226.5 0 0.8 118.5 -229 0 0.8 122 -231.5 0 0.8 125.5 -234 0 0.8 128.5 -237 0 0.8 131.5 -240.5 0 0.8 133.5 -244 0 0.8 135.5 -248 0 0.8 137.5 -252.5 0 0.8 139 -256.5 0 0.8 142 -260 0 0.8 145 -262.5 0 0.8 148.5 -265 0 0.8 151.5 -268 0 0.8 154 -272 0 0.8 156.5 -275.5 0 0.8 158.5 -279.5 0 0.8 161.5 -282.5 0 0.8 164.5 -285.5 0 0.8 167.5 -287.5 0 0.8 170.5 -289.5 0 0.8 171.5 -290.5 0 0.8 173.5 -295 0 0.8 1 6 0.5 -10.5 0 2.7 0 -14.5 -5 2.7 -0.5 -17 -10 -2.7 -1.5 -19.5 -13 -2 -1.5 -21.5 -14 2.2 -2 -24 -14 2.4 1 18 -2 -24 -14 2.4 -4.5 -23 -15 -1.8 -6 -24 -15.5 -1.7 -8 -27 -16.5 -1.7 -10.5 -28 -18 -1.7 -13 -29.5 -20 -1.7 -16 -30.5 -22 -1.7 -18.5 -31 -23.5 -1.7 -20.5 -32 -24 -1.7 -23.5 -34.5 -24 -1.7 -24 -36.5 -24.5 -1.7 -27 -38 -25.5 -1.7 -29 -39 -26.5 -1.9 -31 -40 -27 -1.9 -33.5 -41.5 -27.5 -1.9 -35 -43.5 -28 -1.9 -38 -45 -29 -1.9 -40.5 -46 -32 1.9 1 14 -40.5 -46 -32 1.9 -42 -48.5 -31.5 -1.8 -44 -49.5 -31.5 -1.8 -46.5 -50.5 -32 -1.8 -48 -51 -32.5 -1.8 -50.5 -52.5 -33 -1.7 -54 -53.5 -36 -1.7 -56 -57.5 -38.5 -1.7 -57 -59.5 -41.5 -1.7 -59.5 -60 -41.5 -1.7 -61.5 -62.5 -42.5 -1.1 -63.5 -63.5 -45 -1.1 -62.5 -66 -47.5 -1.1 -64.5 -68.5 -51 1.1 1 4 -40.5 -46 -32 1.9 -42 -46 -32 -1.1 -44.5 -45.5 -33.5 -1.1 -45.5 -46 -36.5 1.1 1 21 -45.5 -46 -36.5 1.1 -48 -46.5 -34 -1.7 -50.5 -46.5 -32.5 -1.7 -53 -48 -32 -1.7 -54.5 -48.5 -31.5 -1.7 -56.5 -49 -31 -1.7 -58 -50 -31.5 -1.7 -59 -48.5 -32.5 -1.7 -61.5 -49 -34 -1.7 -63 -49 -35 -1.7 -65.5 -49 -36.5 -1.7 -67 -49.5 -38 -1.7 -69 -50.5 -39.5 -1.7 -70 -51 -41 -1.7 -72 -52 -42.5 -1.7 -75 -53.5 -44.5 -1.7 -75.5 -53.5 -45.5 -1.7 -77 -54.5 -46 -0.8 -78.5 -54.5 -46.5 0.8 -80 -55 -47 -0.8 -81 -57 -47.5 0.8 1 9 -45.5 -46 -36.5 1.1 -48 -44.5 -36.5 0.8 -51 -43 -36.5 0.6 -53.5 -42 -37.5 0.6 -57 -41 -39 0.6 -59 -40 -40 0.6 -61.5 -39 -41 0.6 -63.5 -39.5 -42 0.6 -65 -40 -43.5 0.6 1 18 -2 -24 -14 2.4 -1 -26.5 -16.5 2.4 -0.5 -27 -19 -2 0 -29 -20 -2 0 -30 -21 -2 0.5 -31 -21 -2 1 -33 -21 -2 1 -34 -21.5 -2 2 -34.5 -22 -1.8 3 -37 -24 -1.8 3 -37 -25.5 -1.8 5 -38.5 -28.5 -1.8 5.5 -40 -31.5 -1.8 6 -41 -33.5 -1.8 7.5 -42 -34.5 -1.8 8.5 -43 -34.5 -1.8 9 -45 -35.5 -1.8 9 -45 -38.5 1.8 1 5 9 -45 -38.5 1.8 7.5 -46.5 -38 -1.8 7.5 -47.5 -38.5 -1.8 8.5 -48.5 -40 -1.8 9.5 -50.5 -41.5 1.8 1 6 9 -45 -38.5 1.8 9.5 -45.5 -38 -1.8 10.5 -46.5 -38 -1.8 12 -47 -38 -1.8 12.5 -47 -38 -1.8 13.5 -47 -38.5 1.8 1 6 -10 -0.5 0 4.2 -13.5 -0.5 -0.5 3.8 -18 -0.5 -1 -3.2 -20 -0.5 -2 -3.2 -24 0 -2.5 -3.2 -24.5 -0.5 -3.5 3.2 1 16 -24.5 -0.5 -3.5 3.2 -26 2 -3 -2.1 -28 2.5 -3 -2.1 -30.5 4 -3.5 -2.1 -31.5 4 -4.5 -2.1 -34.5 5.5 -5.5 -2.1 -37 6.5 -6 -2.1 -40 7.5 -5.5 -2.1 -42 9 -4 -2.1 -43 9.5 -2 -1.9 -45 10.5 -0.5 -1.9 -47 12 1 -1.9 -48.5 12.5 4 -1.9 -50 12.5 7 -1.9 -52 13.5 9.5 -1.9 -54.5 14.5 12 1.9 1 13 -54.5 14.5 12 1.9 -58 16 14 -1.9 -58.5 19 15.5 -1.9 -60.5 21 16.5 -1.9 -63.5 24 18 -1.9 -65.5 26.5 19 -1.9 -67 30 19.5 -1.9 -69 29.5 21 -1.9 -69 33 22 -1.9 -70.5 36.5 24 -1.9 -72.5 36.5 25 -1.9 -75 38 26 -1.9 -76.5 39.5 26 1.9 1 16 -54.5 14.5 12 1.9 -58 13 12 -1.9 -61 14 12 -1.9 -62.5 13.5 12 -1.9 -67.5 12 13.5 -1.9 -69.5 11.5 15.5 -1.9 -71.5 11.5 17.5 -1.9 -73.5 12 17.5 -1.9 -76 13 18.5 -1.9 -79 13.5 20.5 -1.9 -83 13.5 22.5 -1.9 -85 14 26 -1.9 -88 14.5 29.5 -1.9 -91 13.5 34 -1.9 -93 12 37 -1.9 -95 11.5 39 1.9 1 7 -24.5 -0.5 -3.5 3.2 -27 -3 -5 -2.5 -29.5 -4.5 -6 -1.8 -32.5 -7.5 -6.5 -1.8 -34.5 -9.5 -6.5 -1.8 -35.5 -11.5 -6.5 -1.8 -36 -13.5 -6.5 1.8 1 62 -36 -13.5 -6.5 1.8 -37.5 -14.5 -4.5 -1.7 -39 -15 -3 -1.3 -41.5 -15.5 -2.5 -1.3 -42.5 -16.5 -2 -1.3 -44.5 -15.5 -1.5 -1.3 -46 -15 -1.5 -1.3 -48.5 -16 -1.5 -1.3 -50.5 -15 -2 -1.3 -53 -14 -1.5 -1.3 -55 -14 0 -1.3 -57.5 -12.5 1.5 -1.3 -60 -12.5 3 -1.3 -62 -11 3.5 -1.3 -63 -11 5 -1.3 -66 -11 6 -1.3 -68 -9.5 7 -1.3 -70.5 -8 7 -1.3 -72 -8 7 -1.3 -76.5 -6 7 -1.3 -77.5 -6 7 -1.3 -79.5 -6 8 -1.3 -82 -3.5 9 -1.4 -84 -1.5 9.5 -1.4 -85 0 9 -1.4 -87 1.5 9.5 -1.4 -89 3 10.5 -1.6 -90 4 12.5 1.6 -92 5 13 -1.6 -95.5 7 13.5 -1.1 -98 8 15 -1.1 -101.5 9.5 16.5 -1.1 -104 11 17.5 -1.1 -107.5 11.5 17.5 -1.1 -111 12.5 17.5 -1.1 -112.5 13 17.5 -1.1 -118.5 17 17.5 -1.1 -121.5 18 18 -1.1 -125.5 19 19 -1.1 -127.5 19 20 -1.1 -130 20 21 -1.1 -133 21 21.5 -1.1 -135.5 21.5 23.5 -1.1 -137 20 26 -1.1 -140 22.5 27.5 -1.1 -142 23.5 28.5 -1.1 -144.5 24.5 30.5 -1.1 -147.5 26.5 33 -1.1 -150.5 25 34.5 -1.1 -152 25 35 -1.1 -155 25 35.5 -1.1 -158.5 26 35.5 -1.1 -161 25 35.5 -1.1 -163.5 26.5 36 -1.1 -165.5 26 36.5 -1.1 -167 26 37 -1.1 -169.5 26.5 37 -1 -170.5 27 37 -1 -173 28.5 37 -0.8 -177 29 37 -0.8 -180.5 30 37 -0.8 -183.5 29 37 0.7 1 8 -36 -13.5 -6.5 1.8 -37 -16.5 -6.5 -1.8 -36.5 -19.5 -6 -1.8 -37 -22.5 -5.5 -1.8 -37.5 -23.5 -5.5 -1.8 -37.5 -25.5 -6 -1.9 -37.5 -27.5 -6.5 -1.9 -38 -30 -7 2 1 8 -38 -30 -7 2 -39.5 -31.5 -7 -2 -41 -33.5 -7.5 -2 -42 -35.5 -7.5 -2 -43 -38.5 -7 -2 -45.5 -39.5 -6 -1.7 -46.5 -42.5 -4.5 -1.7 -47 -45.5 -1.5 1.7 1 8 -38 -30 -7 2 -39 -33 -9.5 2 -39 -36 -11.5 -2 -40 -38.5 -13.5 -2 -39 -41 -15.5 -2 -39 -41 -18 -2 -41.5 -46 -21.5 -2 -42 -48.5 -26.5 2 1 38 -5.5 18 0 1.9 -7.5 18 0 1.9 -11 20 -1 -1.8 -12 21 -3 -1.8 -14.5 21 -5 -1.8 -17 23 -7 -1.8 -18.5 23.5 -8 -1.8 -20 25.5 -9 -1.8 -22 26.5 -10.5 -1.8 -24 26.5 -11.5 -1.8 -25 28 -13 -1.8 -30 30 -14.5 -1.8 -33 33 -17 -1.8 -34.5 33.5 -19 -1.8 -35.5 34.5 -20.5 -1.8 -38 36 -20.5 -1.8 -39 36.5 -20.5 -1.6 -40.5 36.5 -20.5 -1.6 -42 38 -21 -1.6 -43.5 39 -21.5 -1.6 -45 39.5 -22 -1.6 -47 40.5 -23 -1.6 -49 42.5 -23.5 -1.6 -52.5 42.5 -23.5 -1.1 -54.5 44 -24 -1.1 -56.5 45 -24 -1.1 -58.5 46 -25 -1.1 -60 47 -25.5 -1.1 -62.5 49.5 -26 -1.1 -65.5 51.5 -26.5 -1.1 -67 51.5 -26.5 -1.1 -67 52.5 -26.5 -1.1 -68.5 54 -26.5 -1.1 -70.5 55.5 -26.5 -1.1 -73.5 57 -27 -1.1 -76 57.5 -28.5 -1.1 -78.5 58.5 -30.5 -1.1 -81 58 -31.5 1.1 CONNECTIONS: 0 1 0 1 2 1 2 1 4 1 4 1 6 1 6 1 8 1 9 1 10 1 10 1 9 1 8 1 14 1 15 1 16 1 16 1 15 1 19 1 19 1 14 1 22 1 23 1 23 1 25 1 25 1 22 1 28 1 28 1 0 1 0 1 0 1 1 1 1 1 0 1 4 1 5 1 6 1 6 1 5 1 4 1 0 1 1 1 2 1 2 1 1 1 0 1 6 1 7 1 7 1 6 1 10 1 10 1 0 1 1 1 1 1 3 1 3 1 0 1 6 1 6 1 0 1 1 1 1 1 0 1 4 1 4 1 6 1 6 1 /*----------------------------------------------------------------*/ proc geometry() { /* NULL geometry procedure: keeps the user from calling the geometry procedure in isolation. */ printf("\nYou must re-read the entire geometry\n") printf("file to execute geometry().\n\n") } neuron-7.5/share/demo/pyramid.ses000077500000000000000000000024351323325274500171170ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} //Begin PointProcessManager { load_file("pointman.hoc") } { soma ocbox_ = new PointProcessManager(0) } {object_push(ocbox_)} { mt.select("IClamp") i = mt.selected() ms[i] = new MechanismStandard("IClamp") ms[i].set("del", 0, 0) ms[i].set("dur", 0.5, 0) ms[i].set("amp", 10, 0) mt.select("IClamp") i = mt.selected() maction(i) hoc_ac_ = 0.5 sec.sec move() d1.flip_to(0) } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessManager", 135, 141, 217.92, 264) } objref ocbox_ //End PointProcessManager { save_window_ = new PlotShape(0) save_window_.size(-513.704,547.706,-228.057,831.661) save_window_.variable("v") scene_vector_[3] = save_window_ {save_window_.view(-513.704, -228.057, 1061.41, 1059.72, 139, 456, 200.64, 200.32)} fast_flush_list.append(save_window_) save_window_.save_name("fast_flush_list.") } { save_window_ = new Graph(0) save_window_.size(0,5,-80,40) scene_vector_[4] = save_window_ {save_window_.view(0, -80, 5, 120, 697, 31, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addvar("soma.v(.5)", 2, 1, 4, 28, 1) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/reconst.hoc000077500000000000000000000004001323325274500170740ustar00rootroot00000000000000forall nseg = L/50 + 1 access soma proc membrane() { forall {insert pas g_pas=.0001 e_pas=-65 } soma uninsert pas dendrite_5[0] uninsert pas soma insert hh dendrite_5[0] insert hh } global_ra = 100 set_ra() celsius = 15 membrane() proc destroy() { } neuron-7.5/share/demo/release.hoc000077500000000000000000000046311323325274500170510ustar00rootroot00000000000000/* ?0 GUI NEURONDemonstrations Release Code */ help ?0 create terminal access terminal {nseg=1 L=10 diam=1} celsius = 16.3 {insert HHna insert HHk insert cachan insert cadifpmp } {insert nacax insert trel insert capump insert pas} proc set_al() { al_trel = alnorm*1e4^(power_trel - 2) } proc default() { g_pas = .0003 e_pas = -53.1 k1_cadifpmp = 30e8 k2_cadifpmp = .25e6 k3_cadifpmp = 1.5e3 k4_cadifpmp = 5e0 pump0_cadifpmp = 1e-13 beta_cadifpmp = 100 kmp_capump=.2 vmax_capump=.0667*0 pcabar_cachan=2.5e-5 gnabar_HHna=.120 gkbar_HHk=.036 k_nacax=.00015 cao0_ca_ion = 2 // these global variables initialize cao/cai cai0_ca_ion = 3e-6 nao=115 nai=15 ion_style("na_ion", 1, 2, 1, 0, 0) // ena initialized from constant nai/nao GenVes_trel=.0004 tauGen_trel=10 al_trel= 7.5e5 power_trel=2 alnorm = 75 set_al() } default() proc releasemenubody() { /* ? Releasevariables */ xpanel("Release variables") xvalue("tauGen","tauGen_trel",1) xvalue("Ach Gen rate","Agen_trel",1) xvalue("Ach Split rate","Aase_trel",1) xvalue("power","power_trel",1, "set_al()") xvalue("al (norm)","alnorm",1, "set_al()") xvalue("Kd","Kd_trel",1) xpanel() } proc fluxmenubody() { /* ? ionfluxes */ xpanel("ion fluxes") xvalue("kinetic pmp", "pump0_cadifpmp",1) xvalue("beta","beta_cadifpmp", 1) xvalue("kmp","kmp_capump", 1) xvalue("vmax","vmax_capump", 1) xvalue("pcabar","pcabar_cachan", 1) xvalue("gnabar","gnabar_HHna", 1) xvalue("gkbar","gkbar_HHk", 1) xvalue("k exchange","k_nacax", 1) xvalue("nao", "nao", 1, "init()") xvalue("cai init","cai0_ca_ion", 1, "init()") xpanel() } objectvar relmenu /* relmenu = new VBox() relmenu.intercept(1) releasemenubody() relmenu.intercept(0) relmenu.map("Release Variables", 5, 650, 100, 100) */ objectvar fluxmenu /* fluxmenu = new VBox() fluxmenu.intercept(1) fluxmenubody() fluxmenu.intercept(0) fluxmenu.map("Ion Fluxes", 250, 130, 100, 100) */ {xopen("$(NRNDEMO)testca.hoc")} proc init() {local ca finitialize(v_init) fcurrent() integ_ica() } proc advance() { fadvance() integ_ica() } /* objectvar e e = new Electrode(0) e.stim.amp=.05 e.stim.del=.25 e.vc.dur[1]=3 e.map(5, 50) e.installIclamp() */ proc destroy() { objectvar relmenu, fluxmenu execute("~proc init(){finitialize(v_init) fcurrent()}") execute("~proc advance(){fadvance()}") } neuron-7.5/share/demo/release.ses000077500000000000000000000055131323325274500170720ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[6] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} //Begin I/V Clamp Electrode { load_file("electrod.hoc") } { ocbox_=new Electrode(0) execute("can_locate=1 sec=\"terminal\" xloc=0.5 locate(0)", ocbox_) execute("vc.dur[0]=0.1 vc.amp[0]=-65", ocbox_) execute("vc.dur[1]=3 vc.amp[1]=10", ocbox_) execute("vc.dur[2]=100 vc.amp[2]=-65", ocbox_) execute("stim.del=0 stim.dur=0.1 stim.amp=0.05", ocbox_) execute("vcsteps=5", ocbox_) execute("samp=stim.amp store_vclamp() glyph()", ocbox_) ocbox_ = ocbox_.v1 ocbox_.map("I/V Clamp Electrode", 18, 118, 273.6, 412.8) } objref ocbox_ //End I/V Clamp Electrode { ocbox_ = new VBox() ocbox_list_.prepend(ocbox_) ocbox_.intercept(1) } { xpanel("ion fluxes", 0) pump0_cadifpmp = 1e-13 xvalue("kinetic pmp","pump0_cadifpmp", 1,"", 0, 0 ) beta_cadifpmp = 100 xvalue("beta","beta_cadifpmp", 1,"", 0, 0 ) kmp_capump = 0.2 xvalue("kmp","kmp_capump", 1,"", 0, 0 ) vmax_capump = 0 xvalue("vmax","vmax_capump", 1,"", 0, 0 ) pcabar_cachan = 2.5e-05 xvalue("pcabar","pcabar_cachan", 1,"", 0, 0 ) gnabar_HHna = 0.12 xvalue("gnabar","gnabar_HHna", 1,"", 0, 0 ) gkbar_HHk = 0.036 xvalue("gkbar","gkbar_HHk", 1,"", 0, 0 ) k_nacax = 0.00015 xvalue("k exchange","k_nacax", 1,"", 0, 0 ) nao = 115 xvalue("nao","nao", 1,"init()", 0, 0 ) cai0_ca_ion = 3e-06 xvalue("cai init","cai0_ca_ion", 1,"init()", 0, 0 ) xpanel() } { ocbox_ = ocbox_list_.object(0) ocbox_.intercept(0) ocbox_.map("Ion Fluxes", 62, 348, 298.56, 307.2) } objref ocbox_ { save_window_ = new Graph(0) save_window_.size(0,5,-80,40) scene_vector_[3] = save_window_ {save_window_.view(0, -80, 5, 120, 704, 25, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("terminal.v( 0.5 )", 1, 1, 0.553797, 0.873786, 2) } { save_window_ = new Graph(0) save_window_.size(0,5,-0.04,0.02) scene_vector_[4] = save_window_ {save_window_.view(0, -0.04, 5, 0.06, 706, 298, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("ica", 1, 1, 0.49214, 0.971132, 2) save_window_.addexpr("ica_nacax", 2, 1, 0.496598, 0.980711, 2) save_window_.addexpr("ica_capump", 3, 1, 0.50973, 0.692392, 2) save_window_.addexpr("ica_cachan", 4, 1, 2.50949, 0.00180314, 1) save_window_.addexpr("ica_pmp_cadifpmp", 5, 1, 2.44857, 0.0350366, 1) } { save_window_ = new Graph(0) save_window_.size(0,5,0,0.5) scene_vector_[5] = save_window_ {save_window_.view(0, 0, 5, 0.5, 707, 573, 303.36, 203.2)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("cai*1e4", 2, 1, 0.367087, 0.966017, 2) save_window_.addexpr("ca_cadifpmp[5]*1e4", 1, 1, 0.367089, 0.876387, 2) save_window_.addexpr("ca_cadifpmp[2]*1e4", 3, 1, 0.366456, 1.03701, 2) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/release/000077500000000000000000000000001323325274500163475ustar00rootroot00000000000000neuron-7.5/share/demo/release/Makefile.am000077500000000000000000000003411323325274500204040ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/demo/release this_DATA = \ cabpump.mod \ cachan1.mod \ camchan.mod \ capump.mod \ khhchan.mod \ mcna.mod \ nacaex.mod \ nachan.mod \ release.mod \ invlfire.mod EXTRA_DIST = $(this_DATA) neuron-7.5/share/demo/release/Makefile.in000066400000000000000000000437511323325274500204260ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/demo/release ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(thisdir)" DATA = $(this_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/demo/release this_DATA = \ cabpump.mod \ cachan1.mod \ camchan.mod \ capump.mod \ khhchan.mod \ mcna.mod \ nacaex.mod \ nachan.mod \ release.mod \ invlfire.mod EXTRA_DIST = $(this_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/demo/release/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/demo/release/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-thisDATA: $(this_DATA) @$(NORMAL_INSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(thisdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(thisdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(thisdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(thisdir)" || exit $$?; \ done uninstall-thisDATA: @$(NORMAL_UNINSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(thisdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(thisdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-thisDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-thisDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-thisDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-thisDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/demo/release/cabpump.mod000077500000000000000000000100241323325274500204770ustar00rootroot00000000000000TITLE Calcium ion accumulation and diffusion with pump : The internal coordinate system is set up in PROCEDURE coord_cadifus() : and must be executed before computing the concentrations. : The scale factors set up in this procedure do not have to be recomputed : when diam or DFree are changed. : The amount of calcium in an annulus is ca[i]*diam^2*vol[i] with : ca[0] being the second order correct concentration at the exact edge : and ca[NANN-1] being the concentration at the exact center ? interface NEURON { SUFFIX cadifpmp USEION ca READ cao, ica WRITE cai, ica RANGE ica_pmp, ica_pmp_last GLOBAL vol, pump0 } DEFINE NANN 10 UNITS { (mV) = (millivolt) (molar) = (1/liter) (mM) = (millimolar) (um) = (micron) (mA) = (milliamp) (mol) = (1) FARADAY = (faraday) (coulomb) PI = (pi) (1) R = (k-mole) (joule/degC) } PARAMETER { DFree = .6 (um2/ms) <0,1e9> beta = 50 <0, 1e9> k1 = 5e8 (/mM-s) <0, 1e10>:optional mm formulation k2 = .25e6 (/s) <0, 1e10> k3 = .5e3 (/s) <0, 1e10> k4 = 5e0 (/mM-s) <0, 1e10> pump0 = 3e-14 (mol/cm2) <0, 1e9> : set to 0 in hoc if this pump not wanted } ASSIGNED { celsius (degC) diam (um) v (millivolt) cao (mM) cai (mM) ica (mA/cm2) vol[NANN] (1) : gets extra cm2 when multiplied by diam^2 ica_pmp (mA/cm2) area1 (um2) c1 (1+8 um5/ms) c2 (1-10 um2/ms) c3 (1-10 um2/ms) c4 (1+8 um5/ms) ica_pmp_last (mA/cm2) } CONSTANT { volo = 1 (liter) } STATE { ca[NANN] (mM) <1e-6> : ca[0] is equivalent to cai pump (mol/cm2) <1e-15> pumpca (mol/cm2) <1e-15> } INITIAL {LOCAL total parms() FROM i=0 TO NANN-1 { ca[i] = cai } pumpca = cai*pump*c1/c2 total = pumpca + pump if (total > 1e-9) { pump = pump*(pump/total) pumpca = pumpca*(pump/total) } ica_pmp = 0 ica_pmp_last = 0 } BREAKPOINT { SOLVE state METHOD sparse ica_pmp_last = ica_pmp ica = ica_pmp : printf("Breakpoint t=%g v=%g cai=%g ica=%g\n", t, v, cai, ica) } LOCAL frat[NANN] : gets extra cm when multiplied by diam PROCEDURE coord() { LOCAL r, dr2 : cylindrical coordinate system with constant annuli thickness to : center of cell. Note however that the first annulus is half thickness : so that the concentration is second order correct spatially at : the membrane or exact edge of the cell. : note ca[0] is at edge of cell : ca[NANN-1] is at center of cell r = 1/2 :starts at edge (half diam) dr2 = r/(NANN-1)/2 :half thickness of annulus vol[0] = 0 frat[0] = 2*r FROM i=0 TO NANN-2 { vol[i] = vol[i] + PI*(r-dr2/2)*2*dr2 :interior half r = r - dr2 frat[i+1] = 2*PI*r/(2*dr2) :exterior edge of annulus : divided by distance between centers r = r - dr2 vol[i+1] = PI*(r+dr2/2)*2*dr2 :outer half of annulus } } KINETIC state { : printf("Solve begin t=%g v=%g cai=%g ica_pmp=%g\n", t, v, cai, ica_pmp) COMPARTMENT i, (1+beta)*diam*diam*vol[i]*1(um) {ca} COMPARTMENT (1e10)*area1 {pump pumpca} COMPARTMENT volo*(1e15) {cao} ? kinetics ~ pumpca <-> pump + cao (c3, c4) ica_pmp = (1e-4)*2*FARADAY*(f_flux - b_flux)/area1 : all currents except pump ~ ca[0] << (-(ica-ica_pmp_last)*PI*diam*1(um)*(1e4)*frat[0]/(2*FARADAY)) :diffusion FROM i=0 TO NANN-2 { ~ ca[i] <-> ca[i+1] (DFree*frat[i+1]*1(um), DFree*frat[i+1]*1(um)) } :pump ~ ca[0] + pump <-> pumpca (c1, c2) cai = ca[0] : this assignment statement is used specially by cvode : printf("Solve end cai=%g ica=%g ica_pmp=%g ica_pmp_last=%g\n", : cai, ica, ica_pmp,ica_pmp_last) } PROCEDURE parms() { coord() area1 = 2*PI*(diam/2) * 1(um) c1 = (1e7)*area1 * k1 c2 = (1e7)*area1 * k2 c3 = (1e7)*area1 * k3 c4 = (1e7)*area1 * k4 } FUNCTION ss() (mM) { SOLVE state STEADYSTATE sparse ss = cai } COMMENT At this time, conductances (and channel states and currents are calculated at the midpoint of a dt interval. Membrane potential and concentrations are calculated at the edges of a dt interval. With secondorder=2 everything turns out to be second order correct. ENDCOMMENT neuron-7.5/share/demo/release/cachan1.mod000077500000000000000000000021601323325274500203500ustar00rootroot00000000000000TITLE ca channel : Ca channel used by Augustine (1990) J. Physiol. 431 : 341-364 should use at celsius = 16 NEURON { SUFFIX cachan1 USEION ca READ cao,cai WRITE ica RANGE K, ica, imax GLOBAL inf, tau, rfac THREADSAFE } UNITS { (mA) = (milliamp) (mV) = (millivolt) (M) = (1/liter) (mM) = (milliM) k = (k) (joule/degC) e = (e) (coulombs) } PARAMETER { rfac = 1 <.01, 1e5> K = 140 (/M) <1e-6, 1e6> imax = 1 (mA/cm2) <0, 1e9> } STATE { S } ASSIGNED { v (mV) cao (mM) cai (mM) celsius (degC) : 16 ica (mA/cm2) inf tau (ms) } INITIAL { rate(v) S = inf } BREAKPOINT {LOCAL kca SOLVE states METHOD cnexp kca = K*cao*exp(-.08(/mV)*(v+70)) ica = -imax * S^5 * (kca - K*cai)/(1 + kca) } DERIVATIVE states { : exact when v held constant rate(v) S' = (inf - S)/tau } FUNCTION alp(v(mV))(/ms) { alp = rfac * 1.1(/ms)*exp(.85*(.001)*e/k/(273+celsius)*v) } FUNCTION bet(v(mV))(/ms) { bet = rfac * .168(/ms)*exp(-.38*(.001)*e/k/(273+celsius)*v) } PROCEDURE rate(v(mV)) {LOCAL a, b TABLE inf, tau DEPEND celsius, rfac FROM -100 TO 100 WITH 200 a = alp(v) b=bet(v) tau = 1/(a + b) inf = a/(a + b) } neuron-7.5/share/demo/release/camchan.mod000077500000000000000000000107741323325274500204560ustar00rootroot00000000000000TITLE CaChan : Calcium Channel with Goldman- Hodgkin-Katz permeability : The fraction of open calcium channels has the same kinetics as : the HH m process but is slower by taufactor UNITS { (molar) = (1/liter) } UNITS { (mV) = (millivolt) (mA) = (milliamp) (mM) = (millimolar) } NEURON { SUFFIX cachan USEION ca READ cai, cao WRITE ica RANGE pcabar, ica } UNITS { :FARADAY = 96520 (coul) :R = 8.3134 (joule/degC) FARADAY = (faraday) (coulomb) R = (k-mole) (joule/degC) } PARAMETER { taufactor=2 <1e-6, 1e6>: Time constant factor relative to standard HH pcabar=.2e-7 (cm/s) <0, 1e9>: Maximum Permeability } ASSIGNED { celsius (degC) v (mV) cai (mM) cao (mM) ica (mA/cm2) } STATE { oca } : fraction of open channels INITIAL { oca = oca_ss(v) } BREAKPOINT { SOLVE castate METHOD cnexp ica = pcabar*oca*oca*ghk(v, cai, cao) } DERIVATIVE castate { LOCAL inf, tau inf = oca_ss(v) tau = oca_tau(v) oca' = (inf - oca)/tau } FUNCTION ghk(v(mV), ci(mM), co(mM)) (.001 coul/cm3) { LOCAL z, eci, eco z = (1e-3)*2*FARADAY*v/(R*(celsius+273.15)) eco = co*efun(z) eci = ci*efun(-z) :high cao charge moves inward :negative potential charge moves inward ghk = (.001)*2*FARADAY*(eci - eco) } FUNCTION efun(z) { if (fabs(z) < 1e-4) { efun = 1 - z/2 }else{ efun = z/(exp(z) - 1) } } FUNCTION oca_ss(v(mV)) { LOCAL a, b TABLE FROM -150 TO 150 WITH 200 v = v+65 a = 1(1/ms)*efun(.1(1/mV)*(25-v)) b = 4(1/ms)*exp(-v/18(mV)) oca_ss = a/(a + b) } FUNCTION oca_tau(v(mV)) (ms) { LOCAL a, b, q TABLE DEPEND celsius, taufactor FROM -150 TO 150 WITH 200 q = 3^((celsius - 6.3)/10 (degC)) v = v+65 a = 1(1/ms)*efun(.1(1/mV)*(25-v)) b = 4(1/ms)*exp(-v/18(mV)) oca_tau = taufactor/(a + b) } COMMENT This model is related to the passive model in that it also describes a membrane channel. However it involves two new concepts in that the channel is ion selective and the conductance of the channel is described by a state variable. Since many membrane mechanisms involve specific ions whose concentration governs a channel current (either directly or via a Nernst potential) and since the sum of the ionic currents of these mechanisms in turn may govern the concentration, it is necessary that NEURON be explicitly told which ionic variables are being used by this model and which are being computed. This is done by the USEION statement. This statement uses the indicated base name for an ion (call it `base') and ensures the existance of four range variables that can be used by any mechanism that requests them via the USEION statement. I.e. these variables are shared by the different mechanisms. The four variables are the current, ibase; the equilibrium potential, ebase; the internal concentration, basei; and the external concentration, baseo. (Note that Ca and ca would be distinct ion species). The READ part of the statement lists the subset of these four variables which are needed as input to the this model's computations. Any changes to those variables within this mechanism will be lost on exit. The WRITE part of the statement lists the subset which are computed by the present mechanism. If the current is computed, then it's value on exit will be added to the neuron wide value of ibase and will also be added to the total membrane current that is used to calculate the membrane potential. When this model is `insert'ed, fcurrent() executes all the statements of the EQUATION block EXCEPT the SOLVE statement. I.e. the states are NOT integrated in time. The fadvance() function executes the entire EQUATION block including the SOLVE statement; thus the states are integrated over the interval t to t+dt. Notice that several mechanisms can WRITE to ibase; but it is an error if several mechanisms (in the same section) WRITE to ebase, baseo, or basei. This model makes use of several variables known specially to NEURON. They are celsius, v, and t. It implicitly makes use of dt. TABLE refers to a special type of FUNCTION in which the value of the function is computed by table lookup with linear interpolation of the table entries. TABLE's are recomputed automatically whenever a variable that the table depends on (Through the DEPEND list; not needed in these tables) is changed. The TABLE statement indicates the minimum and maximum values of the argument and the number of table entries. From NEURON, the function oca_ss_cachan(v) returns the proper value in the table. When the variable "usetable_cachan" is set to 0, oca_ss_cachan(v)returns the true function value. Thus the table error can be easily plotted. ENDCOMMENT neuron-7.5/share/demo/release/capump.mod000077500000000000000000000007361323325274500203460ustar00rootroot00000000000000NEURON { SUFFIX capump USEION ca READ cai WRITE ica RANGE vmax, kmp, ica } UNITS { (uM) = (micro/liter) (mM) = (milli/liter) (mA) = (milliamp) } PARAMETER { vmax = .0667 (mA/cm2) <0, 1e6>: at 6.3 deg, Q10 = 3 kmp = .2 (uM) <0, 1e6> } ASSIGNED { celsius (degC) ica (mA/cm2) cai (mM) } LOCAL Q, s_celsius BREAKPOINT { if (s_celsius*1(degC) != celsius) { s_celsius = celsius Q = 3^((celsius - 6.3)/10 (degC)) } ica = vmax*Q*cai/(cai + (.001)*kmp) / 5.18 } neuron-7.5/share/demo/release/invlfire.mod000077500000000000000000000015451323325274500206760ustar00rootroot00000000000000: dm/dt = (minf - m)/tau : input event adds w to m : when m = 1, or event makes m >= 1 cell fires : minf is calculated so that the natural interval between spikes is invl NEURON { ARTIFICIAL_CELL IntervalFire RANGE tau, m, invl : m plays the role of voltage } PARAMETER { tau = 5 (ms) <1e-9,1e9> invl = 10 (ms) <1e-9,1e9> } ASSIGNED { m minf t0(ms) } INITIAL { minf = 1/(1 - exp(-invl/tau)) : so natural spike interval is invl m = 0 t0 = t net_send(firetime(), 1) } FUNCTION M() { M = minf + (m - minf)*exp(-(t - t0)/tau) } NET_RECEIVE (w) { m = M() t0 = t if (flag == 0) { m = m + w if (m > 1) { m = 0 net_event(t) } net_move(t+firetime()) }else{ net_event(t) m = 0 net_send(firetime(), 1) } } FUNCTION firetime()(ms) { : m < 1 and minf > 1 firetime = tau*log((minf-m)/(minf - 1)) : printf("firetime=%g\n", firetime) } neuron-7.5/share/demo/release/khhchan.mod000077500000000000000000000021611323325274500204570ustar00rootroot00000000000000TITLE HH k channel channel : Hodgkin - Huxley k channel NEURON { SUFFIX HHk USEION k READ ek WRITE ik RANGE gkbar, ik GLOBAL inf, tau THREADSAFE } UNITS { (mA) = (milliamp) (mV) = (millivolt) } PARAMETER { gkbar=.036 (mho/cm2) <0,1e9> ek (mV) : -77 suggested, default set by NEURON } STATE { n } ASSIGNED { v (mV) celsius (degC) : 16 ik (mA/cm2) inf tau (ms) } INITIAL { rate(v*1(/mV)) n = inf } BREAKPOINT { SOLVE states METHOD cnexp ik = gkbar*n*n*n*n*(v - ek) } DERIVATIVE states { : exact when v held constant rate(v*1(/mV)) n' = (inf - n)/tau } UNITSOFF FUNCTION alp(v(mV)) { LOCAL q10 v = -v - 65 q10 = 3^((celsius - 6.3)/10) alp = q10 * .01*expM1(v + 10, 10) } FUNCTION bet(v(mV)) { LOCAL q10 v = -v - 65 q10 = 3^((celsius - 6.3)/10) bet = q10 * .125*exp(v/80) } FUNCTION expM1(x,y) { if (fabs(x/y) < 1e-6) { expM1 = y*(1 - x/y/2) }else{ expM1 = x/(exp(x/y) - 1) } } PROCEDURE rate(v) {LOCAL a, b :rest = -70 TABLE inf, tau DEPEND celsius FROM -100 TO 100 WITH 200 a = alp(v) b=bet(v) tau = 1/(a + b) inf = a/(a + b) } UNITSON neuron-7.5/share/demo/release/mcna.mod000077500000000000000000000056271323325274500200030ustar00rootroot00000000000000TITLE Moore-Cox sodium channel : Biophy. J. (1976) 16:171 : This paper mapped HH VClamp currents, no attention paid to resting currents. : Used V-jump @ T=0 to check match with HH action potential; fig shows equal V-threshold levels : Ramon first noted instability at rest, spontaneous impulse generation. : Same problem noted with resimulation with NEURON. Now thresholds rather different : Revised July 28, 1995 to remove instability. Added back reaction rate coefficients for HH beta m : First use of NEURON's new "Run Fitter" to find best values of these coefficients, : using delay and fitting ina to just beyond peak. : Excellent fit to HH AP with these coefficients except for "gratituitous hump" in HH : Changed from HH reference potential level at rest to NEURON @-65mV NEURON { SUFFIX MCna USEION na READ ena WRITE ina RANGE gnabar, gna, ina, lp, ml, nm, porate :lp, ml, nm, porate coefficients of HH betas for re-fitting GLOBAL cnt1, cnt2 } UNITS { (mA) = (milliamp) (mV) = (millivolt) } PARAMETER { gnabar=.120 (mho/cm2) <0,1e9> lp=1.9 <0, 1e9> ml=.75 <0, 1e9> nm=.3 <0, 1e9> : porate=1 } STATE { P L M N O } ASSIGNED { v (mV) celsius (degC) : 6.3 ena (mV) cnt1 cnt2 ina (mA/cm2) gna (mho/cm2) } ASSIGNED { am (/ms) bm (/ms) ah (/ms) bh (/ms)} INITIAL { cnt1 = 0 cnt2 = 0 P=1 rate(v*1(/mV)) SOLVE states STEADYSTATE sparse } BREAKPOINT { SOLVE states METHOD sparse ina = gnabar*N*(v - ena) PROTECT cnt1 = cnt1 + 1 } KINETIC states { PROTECT cnt2 = cnt2 + 1 rate(v*1(/mV)) : CONSERVE P + L + M + N + O = 1 ~ P <-> L (am, lp*bm) :back reaction in original = 3.5 ~ L <-> M (2*am, ml*bm) :back reaction in original = 0 ~ M <-> N (3*am, nm*bm) :back reaction in original = 0 ~ N <-> O (1.1*bh, 0) ~ N <-> P (3*bm, 0) ~ P <-> O (bh, ah) :back reaction in original = 1, : found this to still be good } UNITSOFF FUNCTION alp(v(mV),i) { LOCAL a,b,c,q10 :rest = -65 order m,h v = -v - 65 :convert to hh convention q10 = 3^((celsius - 6.3)/10) if (i==0) { alp = q10*.1*expM1(v + 25, 10) }else if (i==1){ alp = q10*.07*exp(v/20) } } FUNCTION bet(v,i) { LOCAL a,b,c,q10 :rest = -70 order m,h v = -v - 65 q10 = 3^((celsius - 6.3)/10) if (i==0) { bet = q10* 4*exp(v/18) }else if (i==1){ bet = q10*1/(exp(.1*v + 3) + 1) } } FUNCTION expM1(x,y) { if (fabs(x/y) < 1e-6) { expM1 = y*(1 - x/y/2) : for singular point }else{ expM1 = x/(exp(x/y) - 1) } } PROCEDURE rate(v) {LOCAL a, b, tau :rest = -65 TABLE am, ah, bm, bh DEPEND celsius FROM -100 TO 100 WITH 200 am = alp(v, 0) ah = alp(v, 1) bm = bet(v, 0) bh = bet(v, 1) } UNITSON neuron-7.5/share/demo/release/nacaex.mod000077500000000000000000000011011323325274500203030ustar00rootroot00000000000000TITLE sodium calcium exchange : taken from jwm simulation NEURON { SUFFIX nacax USEION ca READ eca WRITE ica USEION na READ ena WRITE ina RANGE k, ica, ina, ex } UNITS { (mA) = (milliamp) (mV) = (millivolt) } PARAMETER { k = .0002 (mho/cm2) <0,1e6>: at 6.3 deg. Q10 of 3 } ASSIGNED { celsius (degC) v (mV) eca (mV) ena (mV) ica (mA/cm2) ina (mA/cm2) ex (mV) } LOCAL s_celsius, Q BREAKPOINT {LOCAL kca if (s_celsius*1(degC) != celsius) { s_celsius = celsius Q = 3^((celsius - 6.3)/10 (degC)) } ex = 2*ena - eca ina = 2*k*Q*(v - ex) ica = -ina/2 } neuron-7.5/share/demo/release/nachan.mod000077500000000000000000000026451323325274500203120ustar00rootroot00000000000000TITLE HH sodium channel : Hodgkin - Huxley squid sodium channel NEURON { SUFFIX HHna USEION na READ ena WRITE ina RANGE gnabar, ina GLOBAL minf, hinf, mtau, htau THREADSAFE } UNITS { (mA) = (milliamp) (mV) = (millivolt) } PARAMETER { gnabar=.120 (mho/cm2) <0,1e9> } STATE { m h } ASSIGNED { v (mV) celsius (degC) : 6.3 ena (mV) ina (mA/cm2) minf hinf mtau (ms) htau (ms) } INITIAL { rates(v) m = minf h = hinf } BREAKPOINT { SOLVE states METHOD cnexp ina = gnabar*m*m*m*h*(v - ena) } DERIVATIVE states { rates(v) m' = (minf - m)/mtau h' = (hinf - h)/htau } FUNCTION alp(v(mV),i) (/ms) { LOCAL a,b,c,q10 :rest = -70 order m,h v = -v - 65(mV) :convert to hh convention q10 = 3^((celsius - 6.3(degC))/10(degC)) if (i==0) { alp = q10*.1(/ms)*expM1(v *1(/mV) + 25, 10) }else if (i==1){ alp = q10*.07(/ms)*exp(v/20(mV)) } } FUNCTION bet(v(mV),i)(/ms) { LOCAL a,b,c,q10 :rest = -70 order m,h v = -v - 65 q10 = 3^((celsius - 6.3(degC))/10(degC)) if (i==0) { bet = q10* 4(/ms)*exp(v/18(mV)) }else if (i==1){ bet = q10*1(/ms)/(exp(.1(/mV)*v + 3) + 1) } } FUNCTION expM1(x,y) { if (fabs(x/y) < 1e-6) { expM1 = y*(1 - x/y/2) }else{ expM1 = x/(exp(x/y) - 1) } } PROCEDURE rates(v(mV)) {LOCAL a, b TABLE minf, hinf, mtau, htau DEPEND celsius FROM -100 TO 100 WITH 200 a = alp(v,0) b=bet(v,0) mtau = 1/(a + b) minf = a/(a + b) a = alp(v,1) b=bet(v,1) htau = 1/(a + b) hinf = a/(a + b) } neuron-7.5/share/demo/release/release.mod000077500000000000000000000015021323325274500204710ustar00rootroot00000000000000TITLE transmitter release : taken from jwm simulation NEURON { SUFFIX trel USEION ca READ cai } UNITS { (mA) = (milliamp) (mV) = (millivolt) (mM) = (milli/liter) } PARAMETER { GenVes = 5 (mM) <0,1e9> tauGen = 0 (ms) <1e-6,1e9> power = 2 <0,10> al = 141 (/mM2-ms) <0,1e9> Kd = 1e-12 (mM2) <0,1e9> Agen = 4 (/ms) <0,1e9> Arev = 0 (/ms) <0,1e9> Aase = 4 (/ms) <0,1e9> } ASSIGNED { cai (mM) } STATE { Ves (mM) B (mM) Ach (mM) X (mM) } INITIAL { Ves = GenVes } BREAKPOINT { SOLVE release METHOD sparse } ASSIGNED { b (/ms) kt (/ms) kpow (/ms) } KINETIC release { b = Kd*al if (tauGen == 0) { kt=1e9 }else{ kt = 1/tauGen } kpow = al*cai^power : set up so dimensionally correct when power=2 ~ GenVes <-> Ves (kt, kt) ~ Ves <-> B (kpow, b) ~ B <-> Ach (Agen, Arev) ~ Ach <-> X (Aase, 0) } neuron-7.5/share/demo/singhh.hoc000077500000000000000000000015521323325274500167100ustar00rootroot00000000000000load_file("singhhchan.hoc") create soma access soma {diam=10 L=100/PI/diam} {insert leak} objref nachan, kchan, stim nachan = new nahh0(.5) kchan = new khh0(.5) gmaxna = .12 gmaxk = .036 proc nsing() { nachan.gmax = gmaxna kchan.gmax = gmaxk nachan.Nsingle = $1 kchan.Nsingle = $1 if ($1 > 0) { nachan.gmax /= nachan.Nsingle kchan.gmax /= kchan.Nsingle } stdinit() } nsing(1000) /* xpanel("AP with a set of single channels") xradiobutton("Continuous", "nsing(0)", 1) xradiobutton("1 channel", "nsing(1)") xradiobutton("10 channels", "nsing(10)") xradiobutton("100 channels", "nsing(100)") xradiobutton("1000 channels", "nsing(1000), 1") xradiobutton("10000 channels", "nsing(10000)") xpanel(100, 100) */ load_file(1, "singhh.ses") proc destroy() { objref nachan, kchan, stim while (PWManager[0].count > 6) { PWManager[0].close(PWManager[0].count-1) } } neuron-7.5/share/demo/singhh.ses000077500000000000000000000026501323325274500167310ustar00rootroot00000000000000{load_file("nrngui.hoc")} objectvar save_window_, rvp_ objectvar scene_vector_[4] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin PointProcessManager { load_file("pointman.hoc") } { soma ocbox_ = new PointProcessManager(0) } {object_push(ocbox_)} { mt.select("IClamp") i = mt.selected() ms[i] = new MechanismStandard("IClamp") ms[i].set("del", 0.5, 0) ms[i].set("dur", 0.1, 0) ms[i].set("amp", 0.3, 0) mt.select("IClamp") i = mt.selected() maction(i) hoc_ac_ = 0.5 sec.sec move() d1.flip_to(0) } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessManager", 126, 268, 208.32, 326.4) } objref ocbox_ //End PointProcessManager { xpanel("AP with a set of single channels", 0) xradiobutton("Continuous","nsing(0)") xradiobutton("1 channel","nsing(1)") xradiobutton("10 channels","nsing(10)") xradiobutton("100 channels","nsing(100)") xradiobutton("1000 channels","nsing(1000)", 1) xradiobutton("10000 channels","nsing(10000)") xpanel(100,100) } { save_window_ = new Graph(0) save_window_.size(0,5,-80,40) scene_vector_[3] = save_window_ {save_window_.view(0, -80, 5, 120, 617, 3, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2) } { xpanel("Run", 0) xcheckbox("Init & Run",&running_,"runbutton()") xpanel(266,87) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/singhhchan.hoc000077500000000000000000000135721323325274500175470ustar00rootroot00000000000000load_file("nrngui.hoc") { ion_register("na", 1) } objref ks, ksvec, ksgate, ksstates, kstransitions, tobj { ksvec = new Vector() ksstates = new List() kstransitions = new List() ks = new KSChan(1) } // nahh0 Point Process (Allow Single Channels) // na ohmic ion current // ina (mA/cm2) = nahh0.g * (v - ena)*(0.01/area) { ks.name("nahh0") ks.ion("na") ks.iv_type(0) ks.gmax(0.12) ks.erev(0) } // g = gmax * m3h1 // m3h1: 8 state, 10 transitions { objref ksgate ksstates.append(ks.add_ksstate(ksgate, "m0h0")) ksgate = ksstates.object(0).gate ksstates.object(0).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m1h0")) ksstates.object(1).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m2h0")) ksstates.object(2).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m3h0")) ksstates.object(3).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m0h1")) ksstates.object(4).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m1h1")) ksstates.object(5).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m2h1")) ksstates.object(6).frac(0) ksstates.append(ks.add_ksstate(ksgate, "m3h1")) ksstates.object(7).frac(1) } { kstransitions.append(ks.add_transition(ksstates.object(0), ksstates.object(1))) kstransitions.append(ks.add_transition(ksstates.object(1), ksstates.object(2))) kstransitions.append(ks.add_transition(ksstates.object(2), ksstates.object(3))) kstransitions.append(ks.add_transition(ksstates.object(4), ksstates.object(5))) kstransitions.append(ks.add_transition(ksstates.object(5), ksstates.object(6))) kstransitions.append(ks.add_transition(ksstates.object(6), ksstates.object(7))) kstransitions.append(ks.add_transition(ksstates.object(0), ksstates.object(4))) kstransitions.append(ks.add_transition(ksstates.object(1), ksstates.object(5))) kstransitions.append(ks.add_transition(ksstates.object(2), ksstates.object(6))) kstransitions.append(ks.add_transition(ksstates.object(3), ksstates.object(7))) } { tobj = kstransitions.object(0) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(3, 0.1, -40)) tobj.set_f(1, 2, ksvec.c.append(4, -0.055556, -65)) } { tobj = kstransitions.object(1) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(2, 0.1, -40)) tobj.set_f(1, 2, ksvec.c.append(8, -0.055556, -65)) } { tobj = kstransitions.object(2) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(1, 0.1, -40)) tobj.set_f(1, 2, ksvec.c.append(12, -0.055556, -65)) } { tobj = kstransitions.object(3) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(3, 0.1, -40)) tobj.set_f(1, 2, ksvec.c.append(4, -0.055556, -65)) } { tobj = kstransitions.object(4) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(2, 0.1, -40)) tobj.set_f(1, 2, ksvec.c.append(8, -0.055556, -65)) } { tobj = kstransitions.object(5) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(1, 0.1, -40)) tobj.set_f(1, 2, ksvec.c.append(12, -0.055556, -65)) } { tobj = kstransitions.object(6) tobj.type(0) tobj.set_f(0, 2, ksvec.c.append(0.07, -0.05, -65)) tobj.set_f(1, 4, ksvec.c.append(1, -0.1, -35)) } { tobj = kstransitions.object(7) tobj.type(0) tobj.set_f(0, 2, ksvec.c.append(0.07, -0.05, -65)) tobj.set_f(1, 4, ksvec.c.append(1, -0.1, -35)) } { tobj = kstransitions.object(8) tobj.type(0) tobj.set_f(0, 2, ksvec.c.append(0.07, -0.05, -65)) tobj.set_f(1, 4, ksvec.c.append(1, -0.1, -35)) } { tobj = kstransitions.object(9) tobj.type(0) tobj.set_f(0, 2, ksvec.c.append(0.07, -0.05, -65)) tobj.set_f(1, 4, ksvec.c.append(1, -0.1, -35)) } { ksstates.remove_all kstransitions.remove_all } { ks.single(1) } {objref ks, ksvec, ksgate, ksstates, kstransitions, tobj} { ion_register("k", 1) } objref ks, ksvec, ksgate, ksstates, kstransitions, tobj { ksvec = new Vector() ksstates = new List() kstransitions = new List() ks = new KSChan(1) } // khh0 Point Process (Allow Single Channels) // k ohmic ion current // ik (mA/cm2) = khh0.g * (v - ek)*(0.01/area) { ks.name("khh0") ks.ion("k") ks.iv_type(0) ks.gmax(0.036) ks.erev(0) } // g = gmax * n4 // n4: 5 state, 4 transitions { objref ksgate ksstates.append(ks.add_ksstate(ksgate, "n0")) ksgate = ksstates.object(0).gate ksstates.object(0).frac(0) ksstates.append(ks.add_ksstate(ksgate, "n1")) ksstates.object(1).frac(0) ksstates.append(ks.add_ksstate(ksgate, "n2")) ksstates.object(2).frac(0) ksstates.append(ks.add_ksstate(ksgate, "n3")) ksstates.object(3).frac(0) ksstates.append(ks.add_ksstate(ksgate, "n4")) ksstates.object(4).frac(1) } { kstransitions.append(ks.add_transition(ksstates.object(0), ksstates.object(1))) kstransitions.append(ks.add_transition(ksstates.object(1), ksstates.object(2))) kstransitions.append(ks.add_transition(ksstates.object(2), ksstates.object(3))) kstransitions.append(ks.add_transition(ksstates.object(3), ksstates.object(4))) } { tobj = kstransitions.object(0) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(0.4, 0.1, -55)) tobj.set_f(1, 2, ksvec.c.append(0.125, -0.0125, -65)) } { tobj = kstransitions.object(1) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(0.3, 0.1, -55)) tobj.set_f(1, 2, ksvec.c.append(0.25, -0.0125, -65)) } { tobj = kstransitions.object(2) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(0.2, 0.1, -55)) tobj.set_f(1, 2, ksvec.c.append(0.375, -0.0125, -65)) } { tobj = kstransitions.object(3) tobj.type(0) tobj.set_f(0, 3, ksvec.c.append(0.1, 0.1, -55)) tobj.set_f(1, 2, ksvec.c.append(0.5, -0.0125, -65)) } { ksstates.remove_all kstransitions.remove_all } { ks.single(1) } {objref ks, ksvec, ksgate, ksstates, kstransitions, tobj} objref ks, ksvec, ksgate, ksstates, kstransitions, tobj { ksvec = new Vector() ksstates = new List() kstransitions = new List() ks = new KSChan(0) } // leak Density Mechanism // NonSpecific ohmic ion current // i_leak (mA/cm2) = g_leak * (v - e_leak) { ks.name("leak") ks.iv_type(0) ks.gmax(0.0003) ks.erev(-54.3) } // g = gmax {objref ks, ksvec, ksgate, ksstates, kstransitions, tobj} neuron-7.5/share/demo/sync/000077500000000000000000000000001323325274500157035ustar00rootroot00000000000000neuron-7.5/share/demo/sync/Makefile.am000077500000000000000000000002511323325274500177400ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/demo/sync this_DATA = \ demosync.hoc \ cell.hoc \ init.hoc \ spkplot.hoc \ start.ses \ synchronize.hoc EXTRA_DIST = $(this_DATA) neuron-7.5/share/demo/sync/Makefile.in000066400000000000000000000436471323325274500177660ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/demo/sync ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(thisdir)" DATA = $(this_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/demo/sync this_DATA = \ demosync.hoc \ cell.hoc \ init.hoc \ spkplot.hoc \ start.ses \ synchronize.hoc EXTRA_DIST = $(this_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/demo/sync/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/demo/sync/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-thisDATA: $(this_DATA) @$(NORMAL_INSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(thisdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(thisdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(thisdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(thisdir)" || exit $$?; \ done uninstall-thisDATA: @$(NORMAL_UNINSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(thisdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(thisdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-thisDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-thisDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-thisDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-thisDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/demo/sync/cell.hoc000077500000000000000000000005261323325274500173230ustar00rootroot00000000000000//Network cell templates // C_IntervalFire begintemplate Cell public pp, connect2target, x, y, z, position, is_art objref pp proc init() { pp = new IntervalFire(.5) pp.tau = 10 pp.invl = 20 } func is_art() { return 1 } proc connect2target() { $o2 = new NetCon(pp, $o1) } proc position(){x=$1 y=$2 z=$3} endtemplate Cell neuron-7.5/share/demo/sync/demosync.hoc000077500000000000000000000007501323325274500202240ustar00rootroot00000000000000tstopold = tstop cvactive = cvode_active() { load_file("init.hoc") load_file(1, "start.ses") } proc destroy() {local i sp.unmap() doNotify() sp = nil netcon = nil nclist.remove_all() cells.remove_all() cvode_active(cvactive) tstop = tstopold tstop_changed() for i=0, PWManager[0].count-1 { if (strcmp(PWManager[0].name(i), "Synchronizing network parameters") == 0) { PWManager[0].close(i) break } } } tstop = 500 tstop_changed() {cvode_active(1)} recreate(ncell) neuron-7.5/share/demo/sync/init.hoc000077500000000000000000000014711323325274500173470ustar00rootroot00000000000000{ load_file("nrngui.hoc") load_file("synchronize.hoc") load_file("spkplot.hoc") cvode_active(1) } createnet(2) tau(10) weight(0) delay(1) interval(10, 11) objref sp sp = new SpikePlot1(cells) proc recreate() { if (sp != nil) { sp.unmap() sp = nil } doNotify() createnet($1) weight(w) delay(del) tau(ta) interval(low, high) sp = new SpikePlot1(cells, 0) sp.map("", 700, 50, 300, 300) } /* xpanel("Synchronizing network parameters") xvalue("Number of all to all cells", "ncell", 1, "recreate(ncell)") xvalue("All to all connection weight", "w", 1, "weight(w)") xvalue("Delay (ms)", "del", 1, "delay(del)") xvalue("Cell time constant (ms)", "ta", 1, "tau(ta)") xvalue("Lowest natural interval", "low", 1, "interval(low, high)") xvalue("Highest natural interval", "high", 1, "interval(low, high)") xpanel() */ neuron-7.5/share/demo/sync/spkplot.hoc000077500000000000000000000053301323325274500200760ustar00rootroot00000000000000begintemplate SpikePlot1 public cells, vecs, g, update public map, save_data, b, unmap public flush, begin, plot, size, view_count, fastflush, simgraph external addplot, tstop, graphList, graphItem objref cells, vecs[1], nc, g, this, y, tobj, b, outlist, nil strdef tstr, modestr proc init() { fwindow = 100 binwidth = .1 modestr = "Spikes " mode=1 y = new Vector(1000) cells = $o1 if (numarg() == 1) { map() } } proc map() { build() sprint(tstr, "%s for %s", this, cells) if (numarg() > 1) { b.map(tstr, $2,$3,$4,$5) }else{ b.map(tstr) } update() flush() } proc unmap() {local i b.unmap() g = nil i = graphList[1].index(this) if (i >= 0) { graphList[1].remove(i) } graphItem = nil } proc build() { b = new VBox(3) b.priority(600) b.save("") b.ref(this) b.dismiss_action("unmap()") b.intercept(1) xpanel("") xmenu("Plot") xbutton("Update", "update() flush()") xradiobutton("Spikes", "pmode(1)", mode==1) xradiobutton("Frequency", "pmode(2)", mode==2) xradiobutton("Histogram", "pmode(3)", mode==3) xmenu() xvarlabel(modestr) xpvalue("Freq Window (ms)", &fwindow, 1, "flush()") xpvalue("Hist Bin (ms)", &binwidth, 1, "flush()") xpanel() g = new Graph() b.intercept(0) addplot(this, 1) begin() pmode(mode) } proc pmode() { mode = $1 if (mode == 1) { modestr = "Spikes " }else if (mode == 2) { modestr = "Frequency" }else if (mode == 3) { modestr = "Histogram" } flush() } proc update() {local i localobj vec n = cells.count if (n == 0) return objref vecs[n] for i=0, n-1 { vecs[i] = new Vector(0) tobj = cells.object(i) tobj.connect2target(nil, nc) sprint(tstr, "%s", tobj) vec=nc.get_recordvec() if(vec==nil){ nc.record(vecs[i]) }else{ vecs[i]=vec } vecs[i].label(tstr) } objref nc, tobj } proc begin() { } func view_count() { if (g == nil) { return 0 } return g.view_count() } proc plot() { } proc simgraph() { } func size() { if (numarg() == 4) { g.size($1,$2,0,cells.count+1) return 1. }else{ return g.size($1) } } proc fastflush() {} proc flush() {local i g.erase_all g.vfixed(1) g.label(.9,1) if (mode == 1) { for (i=n-1; i >= 0; i -= 1) { y.resize(vecs[i].size).fill(i+1) y.label(vecs[i].label) y.mark(g, vecs[i], "|", 8, 1, 1) y.line(g, vecs[i], 1, 0) } }else if (mode == 2) { for (i=n-1; i >= 0; i -= 1) { y = vecs[i].sumgauss(0, tstop, tstop/100, fwindow) y.label(vecs[i].label) y.mul(1000).line(g, y.c.indgen(0, tstop/100), 1,1) } }else if (mode == 3) { for (i=n-1; i >= 0; i -= 1) if (vecs[i].size > 1){ y = vecs[i].c.deriv(1,1) high = y.max y = y.sumgauss(0, high, high/50, binwidth) y.label(vecs[i].label) y.line(g, y.c.indgen(0, high/50), 1,1) } } g.flush() } endtemplate SpikePlot1 neuron-7.5/share/demo/sync/start.ses000077500000000000000000000013121323325274500175540ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} { xpanel("Synchronizing network parameters", 0) ncell = 10 xvalue("Number of all to all cells","ncell", 1,"recreate(ncell)", 0, 0 ) w = -0.3 xvalue("All to all connection weight","w", 1,"weight(w)", 0, 0 ) del = 4 xvalue("Delay (ms)","del", 1,"delay(del)", 0, 0 ) ta = 10 xvalue("Cell time constant (ms)","ta", 1,"tau(ta)", 0, 0 ) low = 10 xvalue("Lowest natural interval","low", 1,"interval(low, high)", 0, 0 ) high = 15 xvalue("Highest natural interval","high", 1,"interval(low, high)", 0, 0 ) xpanel(700,400) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/demo/sync/synchronize.hoc000077500000000000000000000025121323325274500207540ustar00rootroot00000000000000{load_file("cell.hoc")} //Network specification interface objref cells, nclist, netcon, nil {cells = new List() nclist = new List()} func cell_append() {cells.append($o1) $o1.position($2,$3,$4) return cells.count - 1 } proc cell_append() {cells.append($o1) $o1.position($2,$3,$4) } func nc_append() {//srcindex, tarcelindex, synindex if ($3 >= 0) { cells.object($1).connect2target(cells.object($2).synlist.object($3),netcon) netcon.weight = $4 netcon.delay = $5 }else{ cells.object($1).connect2target(cells.object($2).pp,netcon) netcon.weight = $4 netcon.delay = $5 } nclist.append(netcon) return nclist.count - 1 } proc createnet() {local i, j ncell = $1 netcon = nil nclist.remove_all() cells.remove_all() for i=0, $1-1 { cell_append(new Cell(), i, 0, 0) } for i=0, $1-1 for j=0, $1-1 if (i != j) { nc_append(i, j, -1, 0, 1) } } proc weight() {local i w = $1 for i=0, nclist.count-1 { nclist.object(i).weight = $1 } } proc delay() {local i del = $1 for i=0, nclist.count-1 { nclist.object(i).delay = $1 } } proc tau() {local i ta = $1 for i=0, cells.count-1 { cells.object(i).pp.tau = $1 } } proc interval() {local i, x, dx // args are low and high low = $1 high = $2 x = low dx = (high - low)/cells.count for i=0, cells.count-1 { cells.object(i).pp.invl = x x += dx } } neuron-7.5/share/demo/testca.hoc000077500000000000000000000023521323325274500167120ustar00rootroot00000000000000PI=3.14159 FARADAY=96520 nann = 9 /* total calcium in cell */ func tot_ca() {local i, c /* picomoles */ c=0 forall if(ismembrane("cadifpmp")) for(x) if(x > 0 && x < 1) { for i=0,nann { /* from units command you have: micron3 milli/liter you want: pico * 1.000000e-06 */ c = c + diam(x)^2*vol_cadifpmp[i]*(1 + beta_cadifpmp) \ *(ca_cadifpmp[i](x))*1e-6*L/nseg } c = c + PI*diam(x)*L/nseg*pumpca_cadifpmp*(1e4) /*in pump*/ } return c } /* integrate ica throughout cell */ tot_from_ica = 0 tot_ca_init = 0 proc integ_ica() {local ic, c /* picomoles */ if (t == 0) { tot_ca_init = tot_ca() tot_from_ica = 0 last_ica_pmp_cadifpmp = ica_pmp_cadifpmp return } c = 0 forall if (ismembrane("ca_ion")) for (x) if (x > 0 && x < 1) { /* from units command you have: mA/cm2 micron2 ms / coulomb you want: pico * 1.e-2 */ ic = ica - last_ica_pmp_cadifpmp + ica_pmp_cadifpmp c = c + PI*diam(x)*L/nseg*ic/(2*FARADAY) * dt *(1.e-2) } tot_from_ica = tot_from_ica + c } func compare_ca() { local tot tot = tot_ca() - tot_ca_init printf("totca=%g tot_from_ica=%g\n", tot, tot_from_ica) return tot + tot_from_ica } neuron-7.5/share/examples/000077500000000000000000000000001323325274500156215ustar00rootroot00000000000000neuron-7.5/share/examples/Makefile.am000077500000000000000000000000251323325274500176550ustar00rootroot00000000000000SUBDIRS = ivoc nrniv neuron-7.5/share/examples/Makefile.in000066400000000000000000000535721323325274500177020ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = ivoc nrniv all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/ivoc/000077500000000000000000000000001323325274500165615ustar00rootroot00000000000000neuron-7.5/share/examples/ivoc/Makefile.am000077500000000000000000000000001323325274500206060ustar00rootroot00000000000000neuron-7.5/share/examples/ivoc/Makefile.in000066400000000000000000000372071323325274500206370ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/ivoc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/ivoc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/ivoc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/000077500000000000000000000000001323325274500167555ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/5state.hoc000077500000000000000000000021301323325274500206540ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(5,24)} //Begin KineticBuild[1] { load_template("KineticBuild")} { ocbox_=new KineticBuild(0) } {object_push(ocbox_)} { build() resize(5) xpos.x[0]=-15.0788 ypos.x[0]=-1.21956 cvec.x[0]=0 xpos.x[1]=112.64 ypos.x[1]=-6.6202 cvec.x[1]=1 xpos.x[2]=-7.50838 ypos.x[2]=129.996 cvec.x[2]=0 xpos.x[3]=-18.4865 ypos.x[3]=-126.159 cvec.x[3]=0 xpos.x[4]=104.102 ypos.x[4]=-136.527 cvec.x[4]=1 m.x[0][1] = 0.0666667 m.x[0][2] = 0.0005 m.x[0][3] = 0.02 m.x[1][0] = 0.000333333 m.x[1][4] = 0.02 m.x[2][0] = 0.1 m.x[3][0] = 0.00025 m.x[3][4] = 6.66667e-05 m.x[4][1] = 1.5 m.x[4][3] = 0.002 maphist(new SChanHist(0, 100, 100, 1, -7)) sch.set_rates(m) setcond() } {object_pop()} { { save_window_=ocbox_.g save_window_.size(-114.794,214.794,-110,110) ocbox_.g = save_window_ save_window_.save_name("ocbox_.g") } ocbox_.map("KineticBuild[1]", 155, 73, 356.16, 757.44) } objref ocbox_ //End KineticBuild[1] objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/Makefile.am000077500000000000000000000002651323325274500210170ustar00rootroot00000000000000SUBDIRS = cable kkin netcon netsyn nmodl nrnoc randomsyn soma vrecorder xmech thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv thisdata = \ 5state.hoc EXTRA_DIST = $(thisdata) neuron-7.5/share/examples/nrniv/Makefile.in000066400000000000000000000540521323325274500210300ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = cable kkin netcon netsyn nmodl nrnoc randomsyn soma vrecorder xmech thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv thisdata = \ 5state.hoc EXTRA_DIST = $(thisdata) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/cable/000077500000000000000000000000001323325274500200235ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/cable/Makefile.am000077500000000000000000000000001323325274500220500ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/cable/Makefile.in000066400000000000000000000372341323325274500221010ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/cable ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/cable/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/cable/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/kkin/000077500000000000000000000000001323325274500177115ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/kkin/Makefile.am000077500000000000000000000000001323325274500217360ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/kkin/Makefile.in000066400000000000000000000372311323325274500217640ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/kkin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/kkin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/kkin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/netcon/000077500000000000000000000000001323325274500202435ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/netcon/Makefile.am000077500000000000000000000005371323325274500223070ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv/netcon this_DATA = \ ampa.hoc \ ampa.mod \ ampa.ses \ expsyn.hoc \ expsyn.ses \ gsyn.hoc \ gsyn.mod \ gsyn.ses \ k2syn.hoc \ k2syn.mod \ k2syn.ses \ line.hoc \ line.ses \ netcon.inc \ pregen.mod \ sns.hoc \ sns.ses \ test.hoc \ vecevent.mod \ vecevent.hoc \ vecevent.ses EXTRA_DIST = $(this_DATA) neuron-7.5/share/examples/nrniv/netcon/Makefile.in000066400000000000000000000442021323325274500223120ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/netcon ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(thisdir)" DATA = $(this_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv/netcon this_DATA = \ ampa.hoc \ ampa.mod \ ampa.ses \ expsyn.hoc \ expsyn.ses \ gsyn.hoc \ gsyn.mod \ gsyn.ses \ k2syn.hoc \ k2syn.mod \ k2syn.ses \ line.hoc \ line.ses \ netcon.inc \ pregen.mod \ sns.hoc \ sns.ses \ test.hoc \ vecevent.mod \ vecevent.hoc \ vecevent.ses EXTRA_DIST = $(this_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/netcon/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/netcon/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-thisDATA: $(this_DATA) @$(NORMAL_INSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(thisdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(thisdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(thisdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(thisdir)" || exit $$?; \ done uninstall-thisDATA: @$(NORMAL_UNINSTALL) @list='$(this_DATA)'; test -n "$(thisdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(thisdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(thisdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-thisDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-thisDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-thisDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-thisDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/netcon/ampa.hoc000077500000000000000000000003751323325274500216640ustar00rootroot00000000000000load_file("nrngui.hoc") create soma access soma objref nclist, syn, gen[3] xopen("ampa.ses") proc con() { nclist = new List() syn = AMPA_S[0] for i=0, 2 { gen[i] = SpikeGenerator[i] nclist.append(new NetCon(gen[i], syn, -20, 1, 1)) } } con() neuron-7.5/share/examples/nrniv/netcon/ampa.mod000077500000000000000000000070341323325274500216710ustar00rootroot00000000000000TITLE simple AMPA receptors COMMENT ----------------------------------------------------------------------------- Simple model for glutamate AMPA receptors ========================================= - FIRST-ORDER KINETICS, FIT TO WHOLE-CELL RECORDINGS Whole-cell recorded postsynaptic currents mediated by AMPA/Kainate receptors (Xiang et al., J. Neurophysiol. 71: 2552-2556, 1994) were used to estimate the parameters of the present model; the fit was performed using a simplex algorithm (see Destexhe et al., J. Computational Neurosci. 1: 195-230, 1994). - SHORT PULSES OF TRANSMITTER (0.3 ms, 0.5 mM) The simplified model was obtained from a detailed synaptic model that included the release of transmitter in adjacent terminals, its lateral diffusion and uptake, and its binding on postsynaptic receptors (Destexhe and Sejnowski, 1995). Short pulses of transmitter with first-order kinetics were found to be the best fast alternative to represent the more detailed models. - ANALYTIC EXPRESSION The first-order model can be solved analytically, leading to a very fast mechanism for simulating synapses, since no differential equation must be solved (see references below). References Destexhe, A., Mainen, Z.F. and Sejnowski, T.J. An efficient method for computing synaptic conductances based on a kinetic model of receptor binding Neural Computation 6: 10-14, 1994. Destexhe, A., Mainen, Z.F. and Sejnowski, T.J. Synthesis of models for excitable membranes, synaptic transmission and neuromodulation using a common kinetic formalism, Journal of Computational Neuroscience 1: 195-230, 1994. ----------------------------------------------------------------------------- ENDCOMMENT NEURON { THREADSAFE POINT_PROCESS AMPA_S RANGE R, g NONSPECIFIC_CURRENT i GLOBAL Cdur, Alpha, Beta, Erev, Rinf, Rtau } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (umho) = (micromho) (mM) = (milli/liter) } PARAMETER { Cdur = 0.3 (ms) : transmitter duration (rising phase) Alpha = 0.94 (/ms) : forward (binding) rate Beta = 0.18 (/ms) : backward (unbinding) rate Erev = 0 (mV) : reversal potential } ASSIGNED { v (mV) : postsynaptic voltage i (nA) : current = g*(v - Erev) g (umho) : conductance Rinf : steady state channels open Rtau (ms) : time constant of channel binding synon } STATE {Ron Roff} INITIAL { Rinf = Alpha / (Alpha + Beta) Rtau = 1 / (Alpha + Beta) synon = 0 } BREAKPOINT { SOLVE release METHOD cnexp g = (Ron + Roff)*1(umho) i = g*(v - Erev) } DERIVATIVE release { Ron' = (synon*Rinf - Ron)/Rtau Roff' = -Beta*Roff } : following supports both saturation from single input and : summation from multiple inputs : if spike occurs during CDur then new off time is t + CDur : ie. transmitter concatenates but does not summate : Note: automatic initialization of all reference args to 0 except first NET_RECEIVE(weight, on, nspike, r0, t0 (ms)) { : flag is an implicit argument of NET_RECEIVE and normally 0 if (flag == 0) { : a spike, so turn on if not already in a Cdur pulse nspike = nspike + 1 if (!on) { r0 = r0*exp(-Beta*(t - t0)) t0 = t on = 1 synon = synon + weight Ron = Ron + r0 Roff = Roff - r0 } : come again in Cdur with flag = current value of nspike net_send(Cdur, nspike) } if (flag == nspike) { : if this associated with last spike then turn off r0 = weight*Rinf + (r0 - weight*Rinf)*exp(-(t - t0)/Rtau) t0 = t synon = synon - weight Ron = Ron - r0 Roff = Roff + r0 on = 0 } } neuron-7.5/share/examples/nrniv/netcon/ampa.ses000077500000000000000000000074341323325274500217100ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[6] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin PointProcessGroupManager { load_file("pointgrp.hoc") } { ocbox_ = new PointProcessGroupManager(0) } {object_push(ocbox_)} { ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 2, 0) ms.set("slow_invl", 10, 0) ms.set("burst_len", 5, 0) ms.set("start", 0, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(0) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 2, 0) ms.set("slow_invl", 40, 0) ms.set("burst_len", 4, 0) ms.set("start", 40, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(1) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 1, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 10, 0) ms.set("start", 100, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(2) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("AMPA_S") mnews("AMPA_S", ms) select(3) execute("soma ocbox_.move(0.5)") } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessGroupManager", 116, 584, 596.16, 311.04) } objref ocbox_ //End PointProcessGroupManager { save_window_ = new Graph(0) save_window_.size(0,50,-80,40) scene_vector_[3] = save_window_ {save_window_.view(0, -80, 50, 120, 810, 62, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2) } { save_window_ = new Graph(0) save_window_.size(0,50,0,2) scene_vector_[4] = save_window_ {save_window_.view(0, 0, 50, 2, 806, 335, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addvar("AMPA_S[0].g", 1, 1, 0.605112, 0.904792, 2) } { save_window_ = new Graph(0) save_window_.size(0,50,-90,320) scene_vector_[5] = save_window_ {save_window_.view(0, -90, 50, 410, 808, 606, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("SpikeGenerator[0].y+300", 1, 1, 0.413418, 0.995847, 2) save_window_.addexpr("SpikeGenerator[1].y+150", 1, 1, 0.419808, 0.995847, 2) save_window_.addexpr("SpikeGenerator[2].y", 1, 1, 0.416613, 0.986262, 2) } { xpanel("AMPA_S (Globals)", 0) Cmax_AMPA_S = 1 xvalue("Cmax_AMPA_S","Cmax_AMPA_S", 1,"", 0, 0 ) Cdur_AMPA_S = 1 xvalue("Cdur_AMPA_S","Cdur_AMPA_S", 1,"", 0, 0 ) Alpha_AMPA_S = 0.47 xvalue("Alpha_AMPA_S","Alpha_AMPA_S", 1,"", 0, 0 ) Beta_AMPA_S = 0.01 xvalue("Beta_AMPA_S","Beta_AMPA_S", 1,"", 0, 0 ) Erev_AMPA_S = 0 xvalue("Erev_AMPA_S","Erev_AMPA_S", 1,"", 0, 0 ) Rinf_AMPA_S = 0.97917 xvalue("Rinf_AMPA_S","Rinf_AMPA_S", 1,"", 0, 0 ) Rtau_AMPA_S = 2.0833 xvalue("Rtau_AMPA_S","Rtau_AMPA_S", 1,"", 0, 0 ) xpanel(182,112) } { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 50 xvalue("t","t", 2 ) tstop = 50 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 1 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(502,35) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 498, 427, 272.64, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/netcon/expsyn.hoc000077500000000000000000000003601323325274500222660ustar00rootroot00000000000000load_file("nrngui.hoc") create soma access soma objref nclist, syn, gen[3] xopen("expsyn.ses") syn = ExpSyn[0] nclist = new List() for i=0, 2 { gen[i] = SpikeGenerator[i] nclist.append(new NetCon(gen[i], syn, -20, i+1, (i+1)*.001)) } neuron-7.5/share/examples/nrniv/netcon/expsyn.ses000077500000000000000000000060141323325274500223110ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[6] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} //Begin PointProcessGroupManager { load_file("pointgrp.hoc") } { ocbox_ = new PointProcessGroupManager(0) } {object_push(ocbox_)} { ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 1, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 10, 0) ms.set("start", 0, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(0) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 1, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 10, 0) ms.set("start", 4.5, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(1) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 1, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 10, 0) ms.set("start", 50, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(2) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("ExpSyn") ms.set("tau", 100, 0) ms.set("e", 0, 0) mnews("ExpSyn", ms) select(3) execute("soma ocbox_.move(0.5)") } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessGroupManager", 42, 522, 596.16, 311.04) } objref ocbox_ //End PointProcessGroupManager { save_window_ = new Graph(0) save_window_.size(0,20,-65,-53) scene_vector_[2] = save_window_ {save_window_.view(0, -65, 20, 12, 773, 26, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2) } { save_window_ = new Graph(0) save_window_.size(0,20,0,0.029) scene_vector_[4] = save_window_ {save_window_.view(0, 0, 20, 0.029, 771, 296, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("syn.g", 1, 1, 0.8, 0.9, 2) } { save_window_ = new Graph(0) save_window_.size(0,20,-90,120) scene_vector_[5] = save_window_ {save_window_.view(0, -90, 20, 210, 774, 567, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("SpikeGenerator[0].y+100", 1, 1, 0.8, 0.9, 2) save_window_.addexpr("SpikeGenerator[1].y", 1, 1, 0.8, 0.9, 2) } { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 9.5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 20 xvalue("t","t", 2 ) tstop = 20 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 1 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(470,33) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/netcon/gsyn.hoc000077500000000000000000000003541323325274500217230ustar00rootroot00000000000000load_file("nrngui.hoc") create soma access soma objref nclist, syn, gen[3] xopen("gsyn.ses") syn = GSyn[0] nclist = new List() for i=0, 2 { gen[i] = SpikeGenerator[i] nclist.append(new NetCon(gen[i], syn, -20, i+1, (i+1)*.001)) } neuron-7.5/share/examples/nrniv/netcon/gsyn.mod000077500000000000000000000040051323325274500217260ustar00rootroot00000000000000COMMENT Two state kinetic scheme synapse described by rise time tau1, decay time constant tau2, and peak conductance gtrig. Decay time MUST be greater than rise time. As they approach each other it approaches an alpha function. The solution of A->G->bath with rate constants 1/tau1 and 1/tau2 is A = a*exp(-t/tau1) and G = a*tau2/(tau2-tau1)*(-exp(-t/tau1) + exp(-t/tau2)) where tau1 < tau2 (Notice if tau1 -> 0 then we have just single exponential decay.) The factor is evaluated in the initial block such that the peak conductance is 1. Because the solution is a sum of exponentials, the coupled equations can be solved as a pair of independent equations by the more efficient cnexp method. Specify an incremental delivery event (synapse starts delay after the source crosses threshold. The weight is proportional to the quantity of substance G which is identical to conductance g but with its own Gtau1, Gtau1, and increments by a factor such that peak G increases by Ginc on each spike (on a single line) ENDCOMMENT NEURON { POINT_PROCESS GSyn RANGE tau1, tau2, e, i RANGE Gtau1, Gtau2, Ginc NONSPECIFIC_CURRENT i RANGE g } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (umho) = (micromho) } PARAMETER { tau1=0.1 (ms) tau2 = 1 (ms) Gtau1 = 20 (ms) Gtau2 = 21 (ms) Ginc = 1 e=0 (mV) } ASSIGNED { v (mV) i (nA) g (umho) factor Gfactor } STATE { A (umho) B (umho) } INITIAL { LOCAL tp A = 0 B = 0 tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1) factor = -exp(-tp/tau1) + exp(-tp/tau2) factor = 1/factor tp = (Gtau1*Gtau2)/(Gtau2 - Gtau1) * log(Gtau2/Gtau1) Gfactor = -exp(-tp/Gtau1) + exp(-tp/Gtau2) Gfactor = 1/Gfactor } BREAKPOINT { SOLVE state METHOD cnexp g = B - A i = g*(v - e) } DERIVATIVE state { A' = -A/tau1 B' = -B/tau2 } NET_RECEIVE(weight (umho), w, G1, G2, t0 (ms)) { INITIAL { w = 0 G1 = 0 G2 = 0 t0 = t } G1 = G1*exp(-(t-t0)/Gtau1) G2 = G2*exp(-(t-t0)/Gtau2) G1 = G1 + Ginc*Gfactor G2 = G2 + Ginc*Gfactor t0 = t w = weight*(1 + G2 - G1) A = A + w*factor B = B + w*factor } neuron-7.5/share/examples/nrniv/netcon/gsyn.ses000077500000000000000000000114071323325274500217450ustar00rootroot00000000000000{load_file("nrngui.hoc")} objectvar save_window_, rvp_ objectvar scene_vector_[7] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin ArtCellGUI[0] { load_file("netbild.hoc") } ocbox_ = new ArtCellGUI(1) {object_push(ocbox_)} { tobj = new MechanismStandard("NetStim") tobj.set("interval", 10, 0) tobj.set("number", 10, 0) tobj.set("start", 10, 0) tobj.set("noise", 0, 0) } {append(tobj, "S1")} { tobj = new MechanismStandard("NetStim") tobj.set("interval", 40, 0) tobj.set("number", 2, 0) tobj.set("start", 35, 0) tobj.set("noise", 0, 0) } {append(tobj, "S2")} {object_pop()} { ocbox_.map("ArtCellGUI[0]", 393, 64, 449.28, 291.84) } objref ocbox_ //End ArtCellGUI[0] //Begin NetReadyCellGUI[0] { load_file("netbild.hoc") } {ocbox_ = new NetReadyCellGUI(1)} {ocbox_.tobj = new CellBuild(1)} {object_push(ocbox_.tobj)} { version(5.7) continuous = 0 } {object_push(topol)} { first = 0 slist.remove_all() sname = "dend" objref tobj } { tobj = new CellBuildSection("soma",0, 0, tobj, 0) slist.append(tobj) tobj.position(0,0,15,0) tobj.lx=7.5 tobj.ly=0 tobj.i3d=0 all_init() } for i=0, slist.count-1 {slist.object(i).rdses()} {object_pop()} { } {object_push(subsets)} {first = 0} { tobj = snlist.object(0)} {consist()} {object_pop()} { } {object_push(geom)} { first = 0 tobj = new GeoSpec(4) tobj.value = 100 bild.topol.slist.object(0).geo.append(tobj) set_default() } {object_pop()} { } {object_push(memb)} {first=0} { tobj = new FakeMechStan(1) tobj.value = 1 tobj.set_default() tobj = new MStanWrap(tobj, 0) bild.subsets.snlist.object(0).ml.append(tobj) } { tobj = new MechanismStandard("pas") tobj.set("g_pas", 0.001, 0) tobj.set("e_pas", -70, 0) tobj = new MStanWrap(tobj, 1) bild.subsets.snlist.object(0).ml.append(tobj) } {object_pop()} { } {object_push(manage)} { first = 0 classname = "Cell" etop=1 esub=1 egeom=1 emem=1 itop=1 isub=0 igeom=0 imem=0 bild.topol.names_off = 0 bild.topol.circles_off = 0 output_index = 0 output_x = 1 thresh = 10 } {object_pop()} { cexport() } {object_pop()} { save_window_=ocbox_.tobj.gtopol save_window_.size(-200,200,-150,150) scene_vector_[2] = save_window_ ocbox_.tobj.gtopol = save_window_ save_window_.save_name("ocbox_.tobj.gtopol") } {object_push(ocbox_)} stgui = new SynTypeGUI(1) {object_push(stgui)} { tobj = new MechanismStandard("GSyn") tobj.set("tau1", 0.1, 0) tobj.set("tau2", 1, 0) tobj.set("Gtau1", 20, 0) tobj.set("Gtau2", 21, 0) tobj.set("Ginc", 1, 0) tobj.set("e", 0, 0) } {append(tobj, "G")} {object_pop()} nrc = new NetReadyCell(tobj, stgui.stypelist) nrc.name = "C" tobj = nrc.cb.topol.slist.object(0) {nrc.synlist.append(new SynTypeInstance(nrc.stype.object[0],tobj,0.5,0.5,-1))} {g.size(-166.667,166.667,-125,125)} {object_pop()} { ocbox_.map("NetReadyCellGUI[0]", 777, 26, 404.16, 361.92) } objref ocbox_ //End NetReadyCellGUI[0] //Begin NetGUI[0] { load_file("netbild.hoc") } {ocbox_ = new NetGUI(1)} {object_push(ocbox_)} {mapold2new = new Vector() missing = new List()} original_type("C") original_type("S1") original_type("S2") newnode(0, 22, 10) newnode(1, -45, 35) newnode(2, -55, -29) newedge(1, 0, 0, 0.001, 1) newedge(2, 0, 0, 0.0005, 1) {create_ = 1 create1()} {g.size(-166.667,166.667,-125,125)} {set_alias(0)} {object_pop()} { ocbox_.map("NetGUI[0]", 599, 140, 528, 327.36) } objref ocbox_ //End NetGUI[0] //Begin SpikePlot[1] for NetData[0] { load_file("netbild.hoc") } {ocbox_ = new SpikePlot(NetData[0],1)} {object_push(ocbox_)} mode = 1 spikeplotstyle= 0 marksize= 4 markcolor= 1 useline= 1 fwindow = 100 binwidth = 1 build() subset_start=0 subset_end = 3 {g.size(0,100,0,4)} {object_pop()} { ocbox_.map("SpikePlot[1] for NetData[0]", 766, 512, 304.32, 333.12) } objref ocbox_ //End SpikePlot[1] for NetData[0] { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 100 xvalue("t","t", 2 ) tstop = 100 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) screen_update_invl = 0.05 xvalue("Scrn update invl","screen_update_invl", 1,"", 0, 1 ) realtime = 0.04 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(71,161) } { save_window_ = new Graph(0) save_window_.size(0,110,0,0.0061) scene_vector_[6] = save_window_ {save_window_.view(0, 0, 110, 0.0061, 408, 516, 300.48, 200.32)} graphList[2].append(save_window_) save_window_.save_name("graphList[2].") save_window_.addvar("GSyn[0].g", 1, 1, 0.8, 0.9, 2) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/netcon/k2syn.hoc000077500000000000000000000003561323325274500220130ustar00rootroot00000000000000load_file("nrngui.hoc") create soma access soma objref nclist, syn, gen[3] xopen("k2syn.ses") syn = K2Syn[0] nclist = new List() for i=0, 2 { gen[i] = SpikeGenerator[i] nclist.append(new NetCon(gen[i], syn, -20, i+1, (i+1)*.001)) } neuron-7.5/share/examples/nrniv/netcon/k2syn.mod000077500000000000000000000030711323325274500220160ustar00rootroot00000000000000COMMENT Two state kinetic scheme synapse described by rise time tau1, decay time constant tau2, and peak conductance gtrig. Decay time MUST be greater than rise time. The solution of A->G->bath with rate constants 1/tau1 and 1/tau2 is A = a*exp(-t/tau1) and G = a*tau2/(tau2-tau1)*(-exp(-t/tau1) + exp(-t/tau2)) where tau1 < tau2 (Notice if tau1 -> 0 then we have just single exponential decay.) The factor is evaluated in the initial block such that the peak conductance is gtrig. Because the solution is a sum of exponentials, the coupled equations can be solved as a pair of independent equations by the more efficient cnexp method. Specify an incremental delivery event (synapse starts delay after the source crosses threshold. gtrig is incremented by the amount specified in the delivery event, onset will be set to the proper time) ENDCOMMENT NEURON { POINT_PROCESS K2Syn RANGE tau1, tau2, e, i NONSPECIFIC_CURRENT i RANGE g GLOBAL total } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (umho) = (micromho) } PARAMETER { tau1=.1 (ms) tau2 = 10 (ms) e=0 (mV) } ASSIGNED { v (mV) i (nA) g (umho) factor total (umho) } STATE { A (umho) B (umho) } INITIAL { LOCAL tp total = 0 A = 0 B = 0 tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1) factor = -exp(-tp/tau1) + exp(-tp/tau2) factor = 1/factor } BREAKPOINT { SOLVE state METHOD cnexp g = B - A i = g*(v - e) } DERIVATIVE state { A' = -A/tau1 B' = -B/tau2 } NET_RECEIVE(weight (umho)) { state_discontinuity(A, A + weight*factor) state_discontinuity(B, B + weight*factor) total = total+weight } neuron-7.5/share/examples/nrniv/netcon/k2syn.ses000077500000000000000000000063651323325274500220420ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[6] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin PointProcessGroupManager { load_file("pointgrp.hoc") } { ocbox_ = new PointProcessGroupManager(0) } {object_push(ocbox_)} { ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 4, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 5, 0) ms.set("start", 0, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(0) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 2, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 3, 0) ms.set("start", 4.5, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(1) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("SpikeGenerator") ms.set("fast_invl", 1, 0) ms.set("slow_invl", 50, 0) ms.set("burst_len", 10, 0) ms.set("start", 100, 0) ms.set("end", 1e+10, 0) ms.set("noise", 0, 0) mnews("SpikeGenerator", ms) select(2) execute("soma ocbox_.move(0.5)") ms = new MechanismStandard("K2Syn") ms.set("tau1", 1, 0) ms.set("tau2", 5, 0) ms.set("e", 0, 0) mnews("K2Syn", ms) select(3) execute("soma ocbox_.move(0.5)") } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessGroupManager", 28, 577, 596.16, 311.04) } objref ocbox_ //End PointProcessGroupManager { save_window_ = new Graph(0) save_window_.size(0,20,-65,-53) scene_vector_[2] = save_window_ {save_window_.view(0, -65, 20, 12, 778, 24, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2) } { save_window_ = new Graph(0) save_window_.size(0,20,2.32831e-10,0.01) scene_vector_[4] = save_window_ {save_window_.view(0, 2.32831e-10, 20, 0.01, 778, 291, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("syn.g", 1, 1, 0.8, 0.9, 2) } { save_window_ = new Graph(0) save_window_.size(0,20,-90,120) scene_vector_[5] = save_window_ {save_window_.view(0, -90, 20, 210, 778, 562, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("SpikeGenerator[0].y+100", 1, 1, 0.8, 0.9, 2) save_window_.addexpr("SpikeGenerator[1].y", 1, 1, 0.8, 0.9, 2) } { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 9.5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 20 xvalue("t","t", 2 ) tstop = 20 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 0 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(469,22) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 464, 417, 272.64, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/netcon/line.hoc000077500000000000000000000021061323325274500216670ustar00rootroot00000000000000load_file("nrngui.hoc") begintemplate Cell public soma, connect_pre, nclist, syn create soma objref nclist, syn proc init() { nclist = new List() create soma soma { nseg=10 L=10 diam = 100/(PI*L) insert hh syn = new ExpSyn(0) } } proc connect_pre() {// arg is presynaptic Cell $o1.soma nclist.append( new NetCon(&v(1), syn, -20, 1, .002)) } endtemplate Cell ncell = 100 objref cell[ncell] for i=0, ncell - 1 { cell[i] = new Cell() } access cell[0].soma for i=1, ncell-1 { cell[i].connect_pre(cell[i-1]) } load_file("line.ses") nplt = 3 objref vx[nplt], vy[nplt], g for i=0,nplt-1 {vx[i] = new Vector() vy[i] = new Vector()} Cell[0].soma cvode.record(&v(.5), vy[0], vx[0]) Cell[15].soma cvode.record(&v(.5), vy[1], vx[1]) Cell[15].soma cvode.record(&ina(.5), vy[2], vx[2]) proc p() {local i g = new Graph() for i=0, nplt-1 { vy[i].plot(g, vx[i]) } } objref s, sl sl = new SectionList() s = new PlotShape(sl) fast_flush_list.append(s) for i=0, ncell-1 { s.hinton(&cell[i].soma.v(.5), i%10, int(i/10), .25) } s.size(-3,11,0,10) //s.exec_menu("Shape Plot") neuron-7.5/share/examples/nrniv/netcon/line.ses000077500000000000000000000044061323325274500217150ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin PointProcessManager { load_file("pointman.hoc") } { Cell[0].soma ocbox_ = new PointProcessManager(0) } {object_push(ocbox_)} { mt.select("IClamp") i = mt.selected() ms[i] = new MechanismStandard("IClamp") ms[i].set("del", 0, 0) ms[i].set("dur", 0.1, 0) ms[i].set("amp", 0.3, 0) mt.select("IClamp") i = mt.selected() maction(i) hoc_ac_ = 0.5 sec.sec move() d1.flip_to(0) } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("PointProcessManager", 229, 113, 225.6, 264) } objref ocbox_ //End PointProcessManager { save_window_ = new Graph(0) save_window_.size(0,100,-80,40) scene_vector_[3] = save_window_ {save_window_.view(0, -80, 100, 120, 779, 24, 300.48, 200.32)} graphList[0].append(save_window_) save_window_.save_name("graphList[0].") save_window_.addexpr("Cell[0].soma.v( 0.5 )", 1, 1, 0.8, 0.904792, 2) save_window_.addexpr("Cell[1].soma.v( 0.5 )", 1, 1, 0.8, 0.9, 2) save_window_.addexpr("Cell[2].soma.v( 0.5 )", 1, 1, 0.8, 0.9, 2) save_window_.addexpr("Cell[3].soma.v( 0.5 )", 1, 1, 0.8, 0.9, 2) save_window_.addexpr("Cell[15].soma.v( 0.5 )", 1, 1, 0.796805, 0.507029, 2) save_window_.addexpr("Cell[20].soma.v( 0.5 )", 1, 1, 0.79361, 0.511821, 2) } { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 100.012 xvalue("t","t", 2 ) tstop = 100 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 1.0983 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 11 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(474,24) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 174, 429, 280.32, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/netcon/netcon.inc000077500000000000000000000061531323325274500222340ustar00rootroot00000000000000COMMENT USAGE: for most receptors ***************************************************************************** NEURON { POINT_PROCESS NAME } PARAMETER { Cdur = 1.08 (ms) : transmitter duration (rising phase) Alpha = 1 (/ms mM) : forward (binding) rate Beta = 0.02 (/ms) : backward (unbinding) rate Erev = -80 (mV) : reversal potential } INCLUDE "netsyn.inc" ***************************************************************************** USAGE: for NMDA receptor ***************************************************************************** NEURON{ POINT_PROCESS NMDA RANGE B } PARAMETER { mg = 1. (mM) : external magnesium concentration Cdur = 1. (ms) : transmitter duration (rising phase) Alpha = 4. (/ms mM) : forward (binding) rate Beta = 0.0067 (/ms) : backward (unbinding) rate 1/150 Erev = 0. (mV) : reversal potential } ASSIGNED { B } INCLUDE "netcon.inc" : EXTRA BREAKPOINT MUST BE BELOW THE INCLUDE BREAKPOINT { rates(v) g = g * B : but don't really need to readjust conductance i = i * B : i = g*(v - Erev) } PROCEDURE rates(v(mV)) { TABLE B DEPEND mg FROM -100 TO 80 WITH 180 B = 1 / (1 + exp(0.062 (/mV) * -v) * (mg / 3.57 (mM))) } ***************************************************************************** ENDCOMMENT INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)} NEURON { RANGE g NONSPECIFIC_CURRENT i GLOBAL Cdur, Alpha, Beta, Erev, Rinf, Rtau } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (umho) = (micromho) (mM) = (milli/liter) } ASSIGNED { v (mV) : postsynaptic voltage i (nA) : current = g*(v - Erev) g (umho) : conductance Rinf : steady state channels open Rtau (ms) : time constant of channel binding R : fraction of open channels synon } STATE {Ron Roff} INITIAL { R = 0 Rinf = Alpha / (Alpha + Beta) Rtau = 1 / (Alpha + Beta) synon = 0 } BREAKPOINT { SOLVE release METHOD cnexp g = (Ron + Roff)*1(umho) i = g*(v - Erev) } DERIVATIVE release { Ron' = (synon*Rinf - Ron)/Rtau Roff' = -Beta*Roff } : following supports both saturation from single input and : summation from multiple inputs : if spike occurs during CDur then new off time is t + CDur : ie. transmitter concatenates but does not summate : Note: automatic initialization of all reference args to 0 except first NET_RECEIVE(weight, on, nspike, r0, t0 (ms)) { : flag is an implicit argument of NET_RECEIVE and normally 0 if (flag == 0) { : a spike, so turn on if not already in a Cdur pulse nspike = nspike + 1 if (!on) { r0 = r0*exp(-Beta*(t - t0)) t0 = t on = 1 synon = synon + weight state_discontinuity(Ron, Ron + r0) state_discontinuity(Roff, Roff - r0) } : come again in Cdur with flag = current value of nspike net_send(Cdur, nspike) } if (flag == nspike) { : if this associated with last spike then turn off r0 = weight*Rinf + (r0 - weight*Rinf)*exp(-(t - t0)/Rtau) t0 = t synon = synon - weight state_discontinuity(Ron, Ron - r0) state_discontinuity(Roff, Roff + r0) on = 0 } } neuron-7.5/share/examples/nrniv/netcon/pregen.mod000077500000000000000000000053241323325274500222330ustar00rootroot00000000000000: $Id: pregen.mod 3 2003-02-11 18:36:05Z hines $ : comments at end NEURON { POINT_PROCESS SpikeGenerator RANGE y RANGE fast_invl, slow_invl, burst_len, start, end RANGE noise } PARAMETER { fast_invl = 1 (ms) : time between spikes in a burst (msec) slow_invl = 50 (ms) : burst period (msec) : actually, above is interburst period in conformity with original version : see burst_len = 10 : burst length (# spikes) start = 50 (ms) : start of first interburst interval end = 1e10 (ms) : time to stop bursting noise = 0 : amount of randomeaness (0.0 - 1.0) } ASSIGNED { y burst event (ms) burst_off (ms) burst_on (ms) toff (ms) on } PROCEDURE seed(x) { set_seed(x) } INITIAL { on = 1 toff = 1e9 y = -90 burst = 0 event = start - slow_invl event_time() while (on == 1 && event < 0) { event_time() } if (on == 1) { net_send(event, 1) } } FUNCTION interval(mean (ms)) (ms) { if (mean <= 0.) { mean = .01 (ms) : I would worry if it were 0. : since mean is a local variable, if the number it is set : to is dimensionless, mean will be dimensionless. } if (noise == 0) { interval = mean }else{ interval = (1. - noise)*mean + noise*mean*exprand(1) } } PROCEDURE event_time() { if (slow_invl == 0 || (burst != 0. && burst_len > 1)) { event = event + interval(fast_invl) if (event > burst_on + burst_off) { burst = 0. } }else{ burst = 1. : if slow_invl from beginning of burst to beginning of burst : event = event + interval(slow_invl - (burst_len-1)*fast_invl) : use following if slow_invl is interburst interval event = event + interval(slow_invl) burst_on = event burst_off = interval((burst_len - 1)*fast_invl)-1e-6 } if (event > end) { on = 0 } } NET_RECEIVE (w) { :printf("Pregen receive t=%g flag=%g\n", t, flag) if (flag == 1 && on == 1) { y = 20 net_event(t) event_time() net_send(event - t, 1) net_send(.1, 2) } if (flag == 2) { y = -90 } } COMMENT Presynaptic spike generator --------------------------- This mechanism has been written to be able to use synapses in a single neuron receiving various types of presynaptic trains. This is a "fake" presynaptic compartment containing a fast spike generator. The trains of spikes can be either periodic or noisy (Poisson-distributed), and either tonic or bursting. Parameters; noise: between 0 (no noise-periodic) and 1 (fully noisy) fast_invl: fast interval, mean time between spikes (ms) slow_invl: slow interval, mean burst silent period (ms), 0=tonic train burst_len: mean burst length (nb. spikes) Written by Z. Mainen, modified by A. Destexhe, The Salk Institute Modified by Michael Hines for use with CVode Modified by Michael Hines to use logical event style with NET_RECEIVE ENDCOMMENT neuron-7.5/share/examples/nrniv/netcon/sns.hoc000077500000000000000000000043541323325274500215520ustar00rootroot00000000000000load_file("nrngui.hoc") begintemplate NRN public soma public ampa // postsyn hook objectvar ampa create soma proc init() { soma ampa = new K2Syn(.5) } endtemplate NRN objref ncl // netconlist ncl = new List() create nullseg nullseg.v = -100 num = 50 // num generators objectvar pg[num] for (i=0;i 0) { net_send(etime - t, 1) } } NET_RECEIVE (w) { if (flag == 1) { net_event(t) element() if (index > 0) { net_send(etime - t, 1) } } } DESTRUCTOR { VERBATIM void* vv = (void*)(_p_ptr); if (vv) { hoc_obj_unref(*vector_pobj(vv)); } ENDVERBATIM } PROCEDURE element() { VERBATIM { void* vv; int i, size; double* px; i = (int)index; if (i >= 0) { vv = (void*)(_p_ptr); if (vv) { size = vector_capacity(vv); px = vector_vec(vv); if (i < size) { etime = px[i]; index += 1.; }else{ index = -1.; } }else{ index = -1.; } } } ENDVERBATIM } PROCEDURE play() { VERBATIM void** pv; void* ptmp = NULL; if (ifarg(1)) { ptmp = vector_arg(1); hoc_obj_ref(*vector_pobj(ptmp)); } pv = (void**)(&_p_ptr); if (*pv) { hoc_obj_unref(*vector_pobj(*pv)); } *pv = ptmp; ENDVERBATIM } neuron-7.5/share/examples/nrniv/netcon/vecevent.ses000077500000000000000000000040451323325274500226040ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[4] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin ArtCellGUI[0] { load_file("netbild.hoc") } ocbox_ = new ArtCellGUI(1) {object_push(ocbox_)} { tobj = new MechanismStandard("VecStim") } {append(tobj, "vs")} {object_pop()} { ocbox_.map("ArtCellGUI[0]", 397, 26, 449.28, 291.84) } objref ocbox_ //End ArtCellGUI[0] //Begin NetGUI[0] { load_file("netbild.hoc") } {ocbox_ = new NetGUI(1)} {object_push(ocbox_)} {mapold2new = new Vector() missing = new List()} original_type("vs") newnode(0, -23, 27) {create_ = 1 create1()} {g.size(-166.667,166.667,-125.277,125.277)} {object_pop()} { ocbox_.map("NetGUI[0]", 334, 390, 527.04, 327.36) } objref ocbox_ //End NetGUI[0] //Begin SpikePlot[0] for NetData[0] { load_file("netbild.hoc") } {ocbox_ = new SpikePlot(NetData[0],1)} {object_push(ocbox_)} mode = 1 fwindow = 100 binwidth = 0.1 build() {g.size(0,150,0,2)} {object_pop()} { ocbox_.map("SpikePlot[0] for NetData[0]", 893, 30, 304.32, 333.12) } objref ocbox_ //End SpikePlot[0] for NetData[0] { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 3813.58 xvalue("t","t", 2 ) tstop = 150 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 0 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(16,105) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 6, 504, 272.64, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/netsyn/000077500000000000000000000000001323325274500202755ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/netsyn/Makefile.am000077500000000000000000000000001323325274500223220ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/netsyn/Makefile.in000066400000000000000000000372371323325274500223560ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/netsyn ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/netsyn/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/netsyn/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/nmodl/000077500000000000000000000000001323325274500200665ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/nmodl/Makefile.am000077500000000000000000000020251323325274500221240ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv/nmodl #change to thisdata to this_DATA if installation desired. thisdata = \ argpass.mod \ ca_ap.hoc \ cabpump.hoc \ cabpump.mod \ cachan.hoc \ cachan.mod \ cacum.mod \ cacur.mod \ cadfusl1.hoc \ cadfusl2.hoc \ cadif.hoc \ cadif.mod \ cadif.ses \ cadifusl.hoc \ cadifusl.mod \ cagk.hoc \ cagk.mod \ capmp.hoc \ capmp.mod \ cv.hoc \ fh.hoc \ fh.mod \ fit1.hoc \ fit1.mod \ gap.hoc \ gap.mod \ hh1.hoc \ hh1.mod \ hhvect.hoc \ hhvect.mod \ inatest.mod \ ionleak.mod \ nacum.hoc \ nacum.mod \ nacur.mod \ nadifl.mod \ nadifl1.hoc \ nadifl1.ses \ nadifl2.hoc \ nadifl2.ses \ nadifl3.hoc \ nadifl3.ses \ nadifl4.hoc \ nadifl4.ses \ obj_ex.hoc \ obj_ex.mod \ order.hoc \ order.mod \ passiv.hoc \ passiv.mod \ rchan.mod \ standard.inc \ stim1.hoc \ stim1.mod \ str.mod \ syn1.hoc \ syn1.mod \ synpre.hoc \ synpre.mod \ trivial.mod \ tstdarray.mod \ tstextrn.hoc \ tstextrn.mod \ tstpnt1.hoc \ tstpnt1.mod \ tstpnt2.hoc \ tstpnt2.mod \ tstvec.hoc \ tstvec.mod \ vclmp1.mod EXTRA_DIST = $(thisdata) neuron-7.5/share/examples/nrniv/nmodl/Makefile.in000066400000000000000000000412571323325274500221440ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/nmodl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv/nmodl #change to thisdata to this_DATA if installation desired. thisdata = \ argpass.mod \ ca_ap.hoc \ cabpump.hoc \ cabpump.mod \ cachan.hoc \ cachan.mod \ cacum.mod \ cacur.mod \ cadfusl1.hoc \ cadfusl2.hoc \ cadif.hoc \ cadif.mod \ cadif.ses \ cadifusl.hoc \ cadifusl.mod \ cagk.hoc \ cagk.mod \ capmp.hoc \ capmp.mod \ cv.hoc \ fh.hoc \ fh.mod \ fit1.hoc \ fit1.mod \ gap.hoc \ gap.mod \ hh1.hoc \ hh1.mod \ hhvect.hoc \ hhvect.mod \ inatest.mod \ ionleak.mod \ nacum.hoc \ nacum.mod \ nacur.mod \ nadifl.mod \ nadifl1.hoc \ nadifl1.ses \ nadifl2.hoc \ nadifl2.ses \ nadifl3.hoc \ nadifl3.ses \ nadifl4.hoc \ nadifl4.ses \ obj_ex.hoc \ obj_ex.mod \ order.hoc \ order.mod \ passiv.hoc \ passiv.mod \ rchan.mod \ standard.inc \ stim1.hoc \ stim1.mod \ str.mod \ syn1.hoc \ syn1.mod \ synpre.hoc \ synpre.mod \ trivial.mod \ tstdarray.mod \ tstextrn.hoc \ tstextrn.mod \ tstpnt1.hoc \ tstpnt1.mod \ tstpnt2.hoc \ tstpnt2.mod \ tstvec.hoc \ tstvec.mod \ vclmp1.mod EXTRA_DIST = $(thisdata) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/nmodl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/nmodl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/nmodl/argpass.mod000077500000000000000000000002431323325274500222310ustar00rootroot00000000000000NEURON{ SUFFIX nothing} : in hoc, call with testpass("string", number) PROCEDURE testpass() { VERBATIM printf("%s %g\n", gargstr(1), *getarg(2)); ENDVERBATIM } neuron-7.5/share/examples/nrniv/nmodl/ca_ap.hoc000077500000000000000000000021351323325274500216300ustar00rootroot00000000000000/* calcium membrane action potential */ /* derived from the hhmemb.hoc file in examples directory. */ /* needs a special version with cachan and cadifus */ /* generate special version of NEURON with: nrnmodl cachan cadifus */ /* Illustrative only, because buffering parameters are not realistic (0) */ // Physical properties create a access a nann = 4-1 {nseg=1 diam=1 L=1 insert cachan insert cadifus} diam = 3 {insert hh gnabar_hh=0 /* but normal k and leakage*/} cao0_ca_ion = 10 cai0_cadifus = 1e-5 // run parameters tstop = 5 strength = .005 /*namps*/ tstim = .1 // graphical interface appearance objref g g = new Graph() g.size(0,tstop,-80,60) g.color(1) g.vfixed g.label(0,.5,"mV") g.label(.325,.09,"t (ms)") g.label(.2,.01,"Ca membrane action potential") g.label(.6,1,"") g.addexpr("v",1,1) g.addexpr("ica*80",2,1) g.addexpr("ca_cadifus[0]*100",3,1) // simulation control proc init() { finitialize(-65) fcurrent() g.begin() } proc step() { g.plot(t) fadvance() } proc run() { init() t=0 fstim(1) fstim(0, 0, 0, tstim, strength) while(t 0 && x < 1) { for i=0,nann { /* from units command you have: micron3 milli/liter you want: pico * 1.000000e-06 */ c = c + diam(x)^2*vol_cadifpmp[i]*(1 + beta_cadifpmp) \ *(ca_cadifpmp[i](x))*1e-6*L/nseg } c = c + PI*diam(x)*L/nseg*pumpca_cadifpmp*(1e4) /*in pump*/ } return c } /* integrate ica throughout cell */ tot_from_ica = 0 tot_ca_init = 0 proc integ_ica() {local ic, c /* picomoles */ if (t == 0) { tot_ca_init = tot_ca() tot_from_ica = 0 last_ica_pmp_cadifpmp = ica_pmp_cadifpmp return } c = 0 forall if (ismembrane("ca_ion")) for (x) if (x > 0 && x < 1) { /* from units command you have: mA/cm2 micron2 ms / coulomb you want: pico * 1.e-2 */ ic = ica - last_ica_pmp_cadifpmp + ica_pmp_cadifpmp c = c + PI*diam(x)*L/nseg*ic/(2*FARADAY) * dt *(1.e-2) } tot_from_ica = tot_from_ica + c } func compare_ca() { local tot tot = tot_ca() - tot_ca_init printf("totca=%g tot_from_ica=%g\n", tot, tot_from_ica) return tot + tot_from_ica } /*--------------------------*/ proc init() {local ca finitialize(-65) fcurrent() integ_ica() } proc advance() { fadvance() integ_ica() } objref stim stim = new IClamp(.5) stim.amp = .05 stim.del = .25 stim.dur = .1 //xopen("cabpump.session") tstop=1.5 run() compare_ca() tstop=5 run() compare_ca() neuron-7.5/share/examples/nrniv/nmodl/cabpump.mod000077500000000000000000000102501323325274500222170ustar00rootroot00000000000000TITLE Calcium ion accumulation and diffusion with pump : The internal coordinate system is set up in PROCEDURE coord_cadifus() : and must be executed before computing the concentrations. : The scale factors set up in this procedure do not have to be recomputed : when diam or DFree are changed. : The amount of calcium in an annulus is ca[i]*diam^2*vol[i] with : ca[0] being the second order correct concentration at the exact edge : and ca[NANN-1] being the concentration at the exact center : Free internal calcium is in fast equilibrium with a non-saturable buffer. : The ratio of bound to free is beta. NEURON { SUFFIX cadifpmp USEION ca READ cao, ica, cai WRITE cai, ica RANGE ica_pmp, last_ica_pmp GLOBAL vol, pump0 } DEFINE NANN 4 UNITS { (mV) = (millivolt) (molar) = (1/liter) (mM) = (millimolar) (um) = (micron) (mA) = (milliamp) (mol) = (1) FARADAY = (faraday) (coulomb) PI = (pi) (1) R = (k-mole) (joule/degC) } PARAMETER { celsius (degC) DFree = .6 (um2/ms) diam (um) cao (mM) beta = 50 k1 = 5e8 (/mM-s) :optional mm formulation k2 = .25e6 (/s) k3 = .5e3 (/s) k4 = 5e0 (/mM-s) pump0 = 3e-14 (mol/cm2) : set to 0 in hoc if this pump not wanted } ASSIGNED { ica (mA/cm2) cai (mM) vol[NANN] (1) : gets extra cm2 when multiplied by diam^2 ica_pmp (mA/cm2) last_ica_pmp (mA/cm2) area1 (um2) c1 (1+8 um5/ms) c2 (1-10 um2/ms) c3 (1-10 um2/ms) c4 (1+8 um5/ms) } CONSTANT { volo = 1 (liter) } STATE { ca[NANN] (mM) : ca[0] is equivalent to cai pump (mol/cm2) pumpca (mol/cm2) } INITIAL {LOCAL total parms() FROM i=0 TO NANN-1 { ca[i] = cai } pumpca = cai*pump*c1/c2 total = pumpca + pump if (total > 1e-9) { pump = pump*(pump/total) pumpca = pumpca*(pump/total) } ica_pmp = 0 last_ica_pmp = 0 } BREAKPOINT { SOLVE state METHOD sparse last_ica_pmp = ica_pmp ica = ica_pmp } LOCAL frat[NANN] : gets extra cm when multiplied by diam PROCEDURE coord() { LOCAL r, dr2 : cylindrical coordinate system with constant annuli thickness to : center of cell. Note however that the first annulus is half thickness : so that the concentration is second order correct spatially at : the membrane or exact edge of the cell. : note ca[0] is at edge of cell : ca[NANN-1] is at center of cell r = 1/2 :starts at edge (half diam) dr2 = r/(NANN-1)/2 :half thickness of annulus vol[0] = 0 frat[0] = 2*r FROM i=0 TO NANN-2 { vol[i] = vol[i] + PI*(r-dr2/2)*2*dr2 :interior half r = r - dr2 frat[i+1] = 2*PI*r/(2*dr2) :exterior edge of annulus : divided by distance between centers r = r - dr2 vol[i+1] = PI*(r+dr2/2)*2*dr2 :outer half of annulus } } KINETIC state { COMPARTMENT i, (1+beta)*diam*diam*vol[i]*1(um) {ca} COMPARTMENT (1e10)*area1 {pump pumpca} COMPARTMENT volo*(1e15) {cao} : all currents except pump ~ ca[0] << (-(ica-last_ica_pmp)*PI*diam*1(um)*(1e4)*frat[0]/(2*FARADAY)) :diffusion FROM i=0 TO NANN-2 { ~ ca[i] <-> ca[i+1] (DFree*frat[i+1]*1(um), DFree*frat[i+1]*1(um)) } :pump ~ ca[0] + pump <-> pumpca (c1, c2) ~ pumpca <-> pump + cao (c3, c4) ica_pmp = (1e-4)*2*FARADAY*(f_flux - b_flux)/area1 cai = ca[0] } PROCEDURE parms() { coord() area1 = 2*PI*(diam/2) * 1(um) c1 = (1e7)*area1 * k1 c2 = (1e7)*area1 * k2 c3 = (1e7)*area1 * k3 c4 = (1e7)*area1 * k4 } FUNCTION ss() (mM) { SOLVE state STEADYSTATE sparse ss = cai } COMMENT The combination of voltage independent current and calcium accumulation is more difficult because care must be taken not to count the pump current twice in the computation of the change ca[0]. Hence the usage of last_ica_pmp to subtract the pump portion of the total calcium current in ica so that its effect can be calculated implicitly via the reaction "pumpca <-> pump + cao". This artifice makes the pumping much more stable than the assumption of constant pump current during the step. Otherwise, ca[0] is prone to become negative and that crashes the simulation (especially the automatic computation of eca). Calcium currents that are inward are generally safe to compute in separate models. ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/cachan.hoc000077500000000000000000000043651323325274500220110ustar00rootroot00000000000000 // Physical properties create a access a {nseg=1 insert cachan} // graphical interface appearance objref g g = new Graph() strdef tstr // simulation control proc pefun() { g.size(-10,10,0,10) g.beginline for (z=-10; z<10; z=z+.1) { g.line(z, efun_cachan(z)) } g.flush() } proc pghk() {local i g.vfixed i=1 g.label(.6,1,"") g.erase_all() g.size(-100,100,-1.5e3,1.5e3) for (co = 1e-3; co < 1e3; co = co*10) { g.color(i) i=i+1 g.beginline for (v=-100; v<100; v=v+1) { g.line(v, ghk_cachan(v, 1e-3, co)/co) } sprint(tstr, "co=%g", co) g.label(tstr) g.flush() } } proc curca() { g.erase_all() g.color(1) g.size(-80,100,-1,1) g.vfixed g.label(.37, .95, "current with oca=1") { g.beginline for (v=-80; v<100; v=v+1) { fcurrent() g.line(v,ica) } } g.flush() } proc pica1() { oca_cachan = 1 cao = 10 cai = cao curca() cai = cao/10 curca() cai = cao/10000 curca() } proc prate() { g.erase_all() g.vfixed g.color(0) g.label(.6,.8,"") g.color(1) g.label("oca_ss_cachan(v)") g.color(2) g.label("oca_tau_cachan(v)") g.size(-80,100,0,1) g.beginline for (v=-80; v<100; v=v+1) { g.color(1) g.line(v, oca_ss_cachan(v)) } g.beginline for (v=-80; v<100; v=v+1) { g.color(2) g.line(v, oca_tau_cachan(v)) } g.flush() } proc pica() { /*steady state current*/ cao = 10 cai = cao curca_oca() cai = cao/10 curca_oca() cai = cao/10000 curca_oca() } proc curca_oca() { g.size(-80,100,-6,6) { g.beginline for (v=-80; v<100; v=v+1) { oca_cachan = oca_ss_cachan(v) fcurrent() g.line(v,ica) } } g.flush() } proc runvc() { g.beginline v=-65 oca_cachan=oca_ss_cachan(v) t=0 fcurrent() //plot(1, t, ica) g.line(t, ica) fclamp(2,.5) fclamp(0, 5, $1) fclamp(1,1e9,-65) while (t < 7) { fadvance() g.line(t,ica) } g.flush() } proc pvc() { g.erase_all() g.color(1) dt=.005 g.vfixed g.label(.5,.5,"vc") i=1 g.size(0,6,-2,.1) cai=$1 cao=$2 g.label(.95,.9,"") for (vc=-50; vc<=50; vc=vc+20) { g.color(i) sprint(tstr,"%g",vc) g.label(tstr) i=i+1 runvc(vc) } } proc menu() { xpanel("Select plot") xbutton("G-H-K func", "pghk()") xbutton("rate", "prate()") xbutton("i-v (oca=1)", "pica1()") xbutton("i-v (oca=ocainf)","pvc(.001,10)") xpanel() } // run simulation menu() neuron-7.5/share/examples/nrniv/nmodl/cachan.mod000077500000000000000000000106071323325274500220130ustar00rootroot00000000000000TITLE CaChan : Calcium Channel with Goldman- Hodgkin-Katz permeability : The fraction of open calcium channels has the same kinetics as : the HH m process but is slower by taufactor UNITS { (molar) = (1/liter) } UNITS { (mV) = (millivolt) (mA) = (milliamp) (mM) = (millimolar) } NEURON { SUFFIX cachan USEION ca READ cai, cao WRITE ica RANGE pcabar, ica } UNITS { :FARADAY = 96520 (coul) :R = 8.3134 (joule/degC) FARADAY = (faraday) (coulomb) R = (k-mole) (joule/degC) } PARAMETER { taufactor=.5 : Time constant factor relative to standard HH celsius (degC) : 20 v (mV) pcabar=.2e-3 (cm/s) : Maximum Permeability cai (mM) cao (mM) } ASSIGNED { ica (mA/cm2)} STATE { oca } : fraction of open channels BREAKPOINT { SOLVE castate METHOD euler ica = pcabar*oca*oca*ghk(v, cai, cao) } DERIVATIVE castate { oca' = (oca_ss(v) - oca)/oca_tau(v) } INITIAL { oca = oca_ss(v) } FUNCTION ghk(v(mV), ci(mM), co(mM)) (.001 coul/cm3) { LOCAL z, eci, eco z = (1e-3)*2*FARADAY*v/(R*(celsius+273.15)) eco = co*efun(z) eci = ci*efun(-z) :high cao charge moves inward :negative potential charge moves inward ghk = (.001)*2*FARADAY*(eci - eco) } FUNCTION efun(z) { if (fabs(z) < 1e-4) { efun = 1 - z/2 }else{ efun = z/(exp(z) - 1) } } FUNCTION oca_ss(v(mV)) { LOCAL a, b TABLE FROM -150 TO 150 WITH 200 v = v+65 a = 1(1/ms)*efun(.1(1/mV)*(25-v)) b = 4(1/ms)*exp(-v/18(mV)) oca_ss = a/(a + b) } FUNCTION oca_tau(v(mV)) (ms) { LOCAL a, b TABLE FROM -150 TO 150 WITH 200 v = v+65 a = 1(1/ms)*efun(.1(1/mV)*(25-v)) b = 4(1/ms)*exp(-v/18(mV)) oca_tau = taufactor/(a + b) } COMMENT This model is related to the passive model in that it also describes a membrane channel. However it involves two new concepts in that the channel is ion selective and the conductance of the channel is described by a state variable. Since many membrane mechanisms involve specific ions whose concentration governs a channel current (either directly or via a Nernst potential) and since the sum of the ionic currents of these mechanisms in turn may govern the concentration, it is necessary that NEURON be explicitly told which ionic variables are being used by this model and which are being computed. This is done by the USEION statement. This statement uses the indicated base name for an ion (call it `base') and ensures the existance of four range variables that can be used by any mechanism that requests them via the USEION statement. I.e. these variables are shared by the different mechanisms. The four variables are the current, ibase; the equilibrium potential, ebase; the internal concentration, basei; and the external concentration, baseo. (Note that Ca and ca would be distinct ion species). The READ part of the statement lists the subset of these four variables which are needed as input to the this model's computations. Any changes to those variables within this mechanism will be lost on exit. The WRITE part of the statement lists the subset which are computed by the present mechanism. If the current is computed, then it's value on exit will be added to the neuron wide value of ibase and will also be added to the total membrane current that is used to calculate the membrane potential. When this model is `insert'ed, fcurrent() executes all the statements of the EQUATION block EXCEPT the SOLVE statement. I.e. the states are NOT integrated in time. The fadvance() function executes the entire EQUATION block including the SOLVE statement; thus the states are integrated over the interval t to t+dt. Notice that several mechanisms can WRITE to ibase; but it is an error if several mechanisms (in the same section) WRITE to ebase, baseo, or basei. This model makes use of several variables known specially to NEURON. They are celsius, v, and t. It implicitly makes use of dt. TABLE refers to a special type of FUNCTION in which the value of the function is computed by table lookup with linear interpolation of the table entries. TABLE's are recomputed automatically whenever a variable that the table depends on (Through the DEPEND list; not needed in these tables) is changed. The TABLE statement indicates the minimum and maximum values of the argument and the number of table entries. From NEURON, the function oca_ss_cachan(v) returns the proper value in the table. When the variable "usetable_cachan" is set to 0, oca_ss_cachan(v)returns the true function value. Thus the table error can be easily plotted. ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/cacum.mod000077500000000000000000000014551323325274500216670ustar00rootroot00000000000000COMMENT calcium accumulation into a volume of area*depth next to the membrane with a decay (time constant tau) to resting level given by the global calcium variable cai0_ca_ion ENDCOMMENT NEURON { SUFFIX cacum USEION ca READ ica WRITE cai RANGE depth, tau, cai0 } UNITS { (mM) = (milli/liter) (mA) = (milliamp) F = (faraday) (coulombs) } PARAMETER { depth = 1 (nm) : assume volume = area*depth tau = 10 (ms) cai0 = 50e-6 (mM) : Requires explicit use in INITIAL : block for it to take precedence over cai0_ca_ion : Do not forget to initialize in hoc if different : from this default. } ASSIGNED { ica (mA/cm2) } STATE { cai (mM) } INITIAL { cai = cai0 } BREAKPOINT { SOLVE integrate METHOD derivimplicit } DERIVATIVE integrate { cai' = -ica/depth/F/2 * (1e7) + (cai0 - cai)/tau } neuron-7.5/share/examples/nrniv/nmodl/cacur.mod000077500000000000000000000004771323325274500216770ustar00rootroot00000000000000NEURON { SUFFIX cacur USEION ca WRITE ica RANGE del, dur, amp } PARAMETER { del (ms) dur = 1 (ms) amp = -1 (milliamp/cm2) : negative is inward } ASSIGNED { ica (milliamp/cm2) } BREAKPOINT { if (amp) { at_time(del) at_time(del + dur) } if (t > del && t < del + dur) { ica = amp }else{ ica = 0 } } neuron-7.5/share/examples/nrniv/nmodl/cadfusl1.hoc000077500000000000000000000031501323325274500222650ustar00rootroot00000000000000/*radial and longitudinal diffusion of calcium using model in cadifusl*/ /* This verifies the longitudinal time course of calcium diffusion by comparing with the voltage time course of a cable. */ /* also checks two sections with different segment lengths */ nann = 4 - 1 create a, b, c b connect c(0),1 access a Dt = 2 dt=.025 forall{nseg = 10 diam=10 L=10 insert cadifus} b{nseg = 2 diam=10 L=2 insert cadifus} c{nseg = 20 diam=10 L=8 insert cadifus} objref g g = new Graph() g.size(0,1,0,1) proc init() {local i t = 0 forall v = 0 coord_cadifus() forall for i=0,nann { ca_cadifus[i] = 0 CaBuffer_cadifus[i] = 0 Buffer_cadifus[i] = 0 } } proc run() { local next /* diam/(4*Ra*cm) is equivalent to DFree_cadifus. Units are you have: micron cm/ohm microfarad you want: micron2/ms * 1.000000e+07 */ init() cm = diam/(4*Ra*DFree_cadifus*1e-7) for i=0,nann ca_cadifus[i](.001) = 1 /* first seg uniform */ b for i=0,nann ca_cadifus[i](.001) = 1 /* first seg uniform */ v(.001) = 1 startsw() while (t < 10) { plotca() plotv() plotca2() next = t + Dt while (t < next) { fadvance() } } printf("elapsed time = %g\n", stopsw()) } proc plotca() {local i, x g.beginline(1,1) for(x) if (x >0 && x < 1) { g.line(x, ca_cadifus[0](x)) } g.flush } proc plotv() {local i, x g.beginline(2,1) for(x) if (x > 0 && x < 1){ g.line(x, v(x)) } g.flush } proc plotca2() {local i, lrat, x lrat = b.L/(b.L+c.L) g.beginline(3,1) b for(x) if (x > 0 && x < 1){ g.line(x*lrat, ca_cadifus[0](x)) } c for(x) if (x > 0 && x < 1){ g.line(lrat+x*(1-lrat), ca_cadifus[0](x)) } g.flush } run() neuron-7.5/share/examples/nrniv/nmodl/cadfusl2.hoc000077500000000000000000000021111323325274500222620ustar00rootroot00000000000000/*radial and longitudinal diffusion of calcium using model in cadifusl*/ /* This verifies the longitudinal time course of calcium diffusion by comparing with the voltage time course of a cable. */ nann = 4 - 1 create a,b access a Dt = 2 dt=.025 a {nseg = 4 L=10 diam(0:1)=10:10 insert cadifus} /* longitudinal diffusion */ b {nseg = 1 L=10 diam=20 insert cadifus} /* radial diffusion */ objref g g = new Graph() g.size(0,1,0,1) proc init() {local i t = 0 forall v = 0 coord_cadifus() forall for i=0,nann { ca_cadifus[i] = 0 CaBuffer_cadifus[i] = 0 Buffer_cadifus[i] = 0 } } proc run() { local next init() for i=0,nann ca_cadifus[i](.001) = 1 /* first seg uniform */ b {ca_cadifus[0] = 1} startsw() while (t < 10) { plotca() b plotcarad() next = t + Dt while (t < next) { fadvance() } } printf("elapsed time = %g\n", stopsw()) } proc plotca() {local i g.beginline(1,1) for(x) if (x >0 && x < 1) { g.line(x, ca_cadifus[0](x)) } g.flush } proc plotcarad() {local i g.beginline(2,1) for i=0,nann { g.line(i/nann, ca_cadifus[i]) } g.flush } run() neuron-7.5/share/examples/nrniv/nmodl/cadif.hoc000077500000000000000000000005761323325274500216420ustar00rootroot00000000000000load_file("nrngui.hoc") create cable access cable { nseg = 10 L = 1 diam = 1 insert cadifus } proc init() { finitialize(v_init) ca_cadifus[0](.001) = 1e-2 cvode.re_init() } xopen("cadif.ses") tstop = .02 run() objref ss ss = new SaveState() xpanel("test") xbutton("save and init", "ss.save() stdinit()") xbutton("restore", "ss.restore for i=0,2 Graph[i].flush()") xpanel() neuron-7.5/share/examples/nrniv/nmodl/cadif.mod000077500000000000000000000061111323325274500216370ustar00rootroot00000000000000 TITLE Calcium ion accumulation with longitudinal and radial diffusion COMMENT PROCEDURE factors_cadifus() sets up the scale factors needed to model radial diffusion. These scale factors do not have to be recomputed when diam or DFree is changed. The amount of calcium in an annulus is ca[i]*diam^2*vol[i] with ca[0] being the 2nd order correct concentration at the exact edge and ca[NANN-1] being the concentration at the exact center. Buffer concentration and rates are based on Yamada et al. 1989 model of bullfrog sympathetic ganglion cell. ENDCOMMENT NEURON { SUFFIX cadifus USEION ca READ cai, ica WRITE cai GLOBAL vol, TotalBuffer RANGE cai0 THREADSAFE } DEFINE NANN 4 UNITS { (molar) = (1/liter) (mM) = (millimolar) (um) = (micron) (mA) = (milliamp) FARADAY = (faraday) (10000 coulomb) PI = (pi) (1) } PARAMETER { DCa = 0.6 (um2/ms) : to change rate of buffering without disturbing equilibrium : multiply the following two by the same factor k1buf = 100 (/mM-ms) k2buf = 0.1 (/ms) TotalBuffer = 0.003 (mM) cai0 = 50e-6 (mM) : Requires explicit use in INITIAL block } ASSIGNED { diam (um) ica (mA/cm2) cai (mM) vol[NANN] (1) : gets extra um2 when multiplied by diam^2 Kd (/mM) B0 (mM) } STATE { ca[NANN] (mM) <1e-6> : ca[0] is equivalent to cai CaBuffer[NANN] (mM) Buffer[NANN] (mM) } BREAKPOINT { SOLVE state METHOD sparse } LOCAL factors_done INITIAL { MUTEXLOCK if (factors_done == 0) { factors_done = 1 factors() } MUTEXUNLOCK cai = cai0 Kd = k1buf/k2buf B0 = TotalBuffer/(1 + Kd*cai) FROM i=0 TO NANN-1 { ca[i] = cai Buffer[i] = B0 CaBuffer[i] = TotalBuffer - B0 } } COMMENT factors() sets up factors needed for radial diffusion modeled by NANN concentric compartments. The outermost shell is half as thick as the other shells so the concentration is spatially second order correct at the surface of the cell. The radius of the cylindrical core equals the thickness of the outermost shell. The intervening NANN-2 shells each have thickness = r/(NANN-1) (NANN must be >= 2). ca[0] is at the edge of the cell, ca[NANN-1] is at the center of the cell, and ca[i] for 0 < i < NANN-1 is midway through the thickness of each annulus. ENDCOMMENT LOCAL frat[NANN] PROCEDURE factors() { LOCAL r, dr2 r = 1/2 :starts at edge (half diam) dr2 = r/(NANN-1)/2 :half thickness of annulus vol[0] = 0 frat[0] = 2*r FROM i=0 TO NANN-2 { vol[i] = vol[i] + PI*(r-dr2/2)*2*dr2 :interior half r = r - dr2 frat[i+1] = 2*PI*r/(2*dr2) :exterior edge of annulus : divided by distance between centers r = r - dr2 vol[i+1] = PI*(r+dr2/2)*2*dr2 :outer half of annulus } } LOCAL dsq, dsqvol : can't define local variable in KINETIC block : or use in COMPARTMENT KINETIC state { COMPARTMENT i, diam*diam*vol[i] {ca CaBuffer Buffer} LONGITUDINAL_DIFFUSION i, DCa*diam*diam*vol[i] {ca} ~ ca[0] << (-ica*PI*diam/(2*FARADAY)) FROM i=0 TO NANN-2 { ~ ca[i] <-> ca[i+1] (DCa*frat[i+1], DCa*frat[i+1]) } dsq = diam*diam FROM i=0 TO NANN-1 { dsqvol = dsq*vol[i] ~ ca[i] + Buffer[i] <-> CaBuffer[i] (k1buf*dsqvol, k2buf*dsqvol) } cai = ca[0] } neuron-7.5/share/examples/nrniv/nmodl/cadif.ses000077500000000000000000000070671323325274500216650ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[5] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} { save_window_ = new Graph(0) save_window_.size(0,1,8.73115e-11,0.0025) scene_vector_[2] = save_window_ {save_window_.view(0, 8.73115e-11, 1, 0.0025, 389, 28, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("ca_cadifus[0]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.480511, 0.976677) objectvar rvp_ rvp_ = new RangeVarPlot("ca_cadifus[1]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.480511, 0.986262) objectvar rvp_ rvp_ = new RangeVarPlot("ca_cadifus[2]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.480511, 0.995847) objectvar rvp_ rvp_ = new RangeVarPlot("ca_cadifus[3]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.480511, 1.00543) } { save_window_ = new Graph(0) save_window_.size(0,1,0,0.0003) scene_vector_[3] = save_window_ {save_window_.view(0, 0, 1, 0.0003, 388, 299, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("CaBuffer_cadifus[0]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.343131, 1.05815) objectvar rvp_ rvp_ = new RangeVarPlot("CaBuffer_cadifus[1]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.346326, 1.06773) objectvar rvp_ rvp_ = new RangeVarPlot("CaBuffer_cadifus[2]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.349521, 1.07252) objectvar rvp_ rvp_ = new RangeVarPlot("CaBuffer_cadifus[3]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.352716, 1.08211) } { save_window_ = new Graph(0) save_window_.size(0,1,0.002,0.003) scene_vector_[4] = save_window_ {save_window_.view(0, 0.002, 1, 0.001, 724, 27, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("Buffer_cadifus[0]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.432588, 1.05335) objectvar rvp_ rvp_ = new RangeVarPlot("Buffer_cadifus[1]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.432588, 1.05815) objectvar rvp_ rvp_ = new RangeVarPlot("Buffer_cadifus[2]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.432588, 1.05815) objectvar rvp_ rvp_ = new RangeVarPlot("Buffer_cadifus[3]") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.432588, 1.06294) } { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 0.025 xvalue("t","t", 2 ) tstop = 0.02 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 0 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(5,123) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/nmodl/cadifusl.hoc000077500000000000000000000036121323325274500223600ustar00rootroot00000000000000/*radial and longitudinal diffusion of calcium using model in cadifusl*/ /* this verifies conservation of calcium but the time dependent aspects of calcium diffusion have not yet been verified. */ nann = 4 - 1 create a,b,c access a a connect b(0),1 a connect c(0),.5 dt=.025 forall{nseg = 3 diam=6 L=3 insert cadifus} /* note width is 1 x 1 */ topology() /* initlong_cadifus will crash unless internal tree made */ /* fcurrent() or fadvance() will also build the tree */ strdef sec proc printca() { sectionname(sec) printf("section %s x horizontal, nann vertical\n", sec) for i=0,nann { for (x) if(x > 0 && x < 1) { printf(" %10g", ca_cadifus[i](x)) } printf("\n") } } proc init() {local i t = 0 /* v = 0 coord_cadifus() forall for i=0,nann { ca_cadifus[i] = 0 CaBuffer_cadifus[i] = 0 Buffer_cadifus[i] = 0 } */ forall ion_style("ca_ion", 2,2,0,0,0) // no auto computation of cai/cao/eca forall cai=0 finitialize(0) } proc run() { init() b icabar_cadifus(.5:.51) = 0:0 /* minus means inward */ b ca_cadifus[2](.5:.51) = 1:1 startsw() while (t < 5) { /* b {print "t=", t printca()} xred("continue",0,0,0)*/ fadvance() } printf("elapsed time = %g\n", stopsw()) printf("total internal calcium = %g (pmole)\n", tot_ca()) /*you have: ms milliamp micron micron/cm2-coulomb you want: pico * 1.000000e-02 */ b printf("total output = %g (pmole)\n",\ t*icabar_cadifus(.5)*PI*diam(.5)/96520/2*1e-2*L/nseg) b printca() } axis(0, nann, nann, 0,1,1) proc plotca() {local i plot(1) for i=0,nann { plot(i, ca_cadifus[i]) } plt(-1) } func tot_ca() {local i, c /* picomoles */ c=0 forall if(ismembrane("cadifus")) for(x) if(x > 0 && x < 1) { for i=0,nann { /* from units command you have: micron3 milli/liter you want: pico * 1.000000e-06 */ c = c + diam(x)^2*vol_cadifus[i]*(CaBuffer_cadifus[i](x)+ca_cadifus[i](x))\ *1e-6*L/nseg } } return c } run() run() neuron-7.5/share/examples/nrniv/nmodl/cadifusl.mod000077500000000000000000000050561323325274500223720ustar00rootroot00000000000000 TITLE Calcium ion accumulation with longitudinal and radial diffusion : The internal coordinate system is set up in PROCEDURE coord_cadifus() : The scale factors set up in this procedure do not have to be recomputed : when diam or DFree are changed. : The amount of calcium in an annulus is ca[i]*diam^2*vol[i] with : ca[0] being the second order correct concentration at the exact edge : and ca[NANN-1] being the concentration at the exact center NEURON { SUFFIX cadifus USEION ca READ cao, cai, ica WRITE cai, ica RANGE icabar GLOBAL vol, Buffer0 } DEFINE NANN 4 UNITS { (molar) = (1/liter) (mM) = (millimolar) (um) = (micron) (mA) = (milliamp) FARADAY = (faraday) (10000 coulomb) PI = (pi) (1) } PARAMETER { DFree = .6 (um2/ms) diam (um) cao (mM) ica (mA/cm2) k1buf (/mM-ms) k2buf (/ms) icabar (mA/cm2) } ASSIGNED { cai (mM) vol[NANN] (1) : gets extra cm2 when multiplied by diam^2 } STATE { ca[NANN] (mM) : ca[0] is equivalent to cai CaBuffer[NANN] (mM) Buffer[NANN] (mM) } BREAKPOINT { SOLVE state METHOD sparse ica = icabar } LOCAL coord_done INITIAL { if (coord_done == 0) { coord_done = 1 coord() } : note Buffer gets set to Buffer0 automatically : and CaBuffer gets set to 0 (Default value of CaBuffer0) as well FROM i=0 TO NANN-1 { ca[i] = cai } } LOCAL frat[NANN] : gets extra cm when multiplied by diam PROCEDURE coord() { LOCAL r, dr2 : cylindrical coordinate system with constant annuli thickness to : center of cell. Note however that the first annulus is half thickness : so that the concentration is second order correct spatially at : the membrane or exact edge of the cell. : note ca[0] is at edge of cell : ca[NANN-1] is at center of cell r = 1/2 :starts at edge (half diam) dr2 = r/(NANN-1)/2 :half thickness of annulus vol[0] = 0 frat[0] = 2*r FROM i=0 TO NANN-2 { vol[i] = vol[i] + PI*(r-dr2/2)*2*dr2 :interior half r = r - dr2 frat[i+1] = 2*PI*r/(2*dr2) :exterior edge of annulus : divided by distance between centers r = r - dr2 vol[i+1] = PI*(r+dr2/2)*2*dr2 :outer half of annulus } } LOCAL dsq, dsqvol : can't define local variable in KINETIC block or use : in COMPARTMENT KINETIC state { COMPARTMENT i, diam*diam*vol[i] {ca CaBuffer Buffer} LONGITUDINAL_DIFFUSION j, DFree*diam*diam*vol[j] {ca} ~ ca[0] << (-ica*PI*diam*frat[0]/(2*FARADAY)) FROM i=0 TO NANN-2 { ~ ca[i] <-> ca[i+1] (DFree*frat[i+1], DFree*frat[i+1]) } dsq = diam*diam FROM i=0 TO NANN-1 { dsqvol = dsq*vol[i] ~ ca[i] + Buffer[i] <-> CaBuffer[i] (k1buf*dsqvol,k2buf*dsqvol) } cai = ca[0] } neuron-7.5/share/examples/nrniv/nmodl/cagk.hoc000077500000000000000000000040461323325274500214750ustar00rootroot00000000000000/* cagk.hoc test of calcium activated potassium channel */ // initialization and graph updates work with NEURON 6.x // Physical properties create a {access a nseg=1 insert cagk} {cao = 2 diam=10 L=10} // graphical interface appearance objref g g = new Graph() strdef s // simulation control proc prate() { local v,cai /*plot of cagk channel rate constants*/ g.erase_all() i=0 g.label(.3,.95,"infcagk & tau vs. V") g.label(.8,1,"") g.size(-80,100,0,1) g.vfixed for (cai=1e-3; cai<1.1e-1; cai=cai*10) { i=i+1 g.color(i) sprint(s,"cai=%g",cai) g.label(s) g.beginline for (v=-80; v<=100; v = v+1) { rate_cagk(v, cai) g.line(v,oinf_cagk) } g.beginline for (v=-80; v<=100; v = v+1) { rate_cagk(v, cai) g.line(v,tau_cagk/10) } } g.flush() } proc pcur20() { /*plot potassium current -- used in following proc*/ g.beginline for (v=-80; v<=100; v=v+1) { rate_cagk(v,cai) o_cagk=oinf_cagk fcurrent() g.line(v,ik) } } proc pcur2() { /*steady state channel current as function of v and ca*/ g.erase_all() g.color(1) g.size(-80,100,0,2) g.label(.1,.35,"ik vs V") i=0 g.label(.7,1,"") for (cai=1e-3; cai<1.1e-1; cai=cai*10) { i=i+1 g.color(i) sprint(s,"cai=%g",cai) g.label(s) pcur20() } } proc runvc() { /* cagk current as function of time under voltage clamp*/ finitialize(v_init) fcurrent() g.beginline while (t < 15) { fadvance() g.line(t,ik) } } proc pvc() { /*voltage clamp of calcium activated potassium channel*/ g.erase_all() dt=.2 tstop = 15 v_init = -65 g.size(0,10,0,1) g.color(1) g.label(.2,.95,"ik vs t (V = 20 mV)") i=0 g.label(.8,1,"") fclamp(2,.5) fclamp(0,10,20) fclamp(1,1e9,-65) for (cai=1e-3; cai<1.1e-1; cai=cai*10){ i=i+1 g.color(i) sprint(s,"cai=%g",cai) g.label(s) runvc() } g.flush() } proc menu(){ xpanel("cagk simulations") xlabel("Default cagk properties in cagk.mod") xlabel("For details see cagk.hoc and cagk.mod") xbutton("rate","prate()") xbutton("steady state current","pcur2()") xbutton("voltage clamp","pvc()") xpanel() } // run simulation menu() neuron-7.5/share/examples/nrniv/nmodl/cagk.mod000077500000000000000000000024341323325274500215020ustar00rootroot00000000000000: Calcium activated K channel. : From Moczydlowski and Latorre (1983) J. Gen. Physiol. 82 : Made THREADSAFE 9/16/08 UNITS { (molar) = (1/liter) (mV) = (millivolt) (mA) = (milliamp) (mM) = (millimolar) FARADAY = (faraday) (kilocoulombs) R = (k-mole) (joule/degC) } NEURON { SUFFIX cagk USEION ca READ cai USEION k READ ek WRITE ik RANGE gkbar GLOBAL oinf, tau THREADSAFE : assigned GLOBALs will be per thread } PARAMETER { celsius (degC) : 20 v (mV) gkbar=.01 (mho/cm2) : Maximum Permeability cai (mM) : 1e-3 ek (mV) d1 = .84 d2 = 1. k1 = .18 (mM) k2 = .011 (mM) bbar = .28 (/ms) abar = .48 (/ms) } ASSIGNED { ik (mA/cm2) oinf tau (ms) } STATE { o } : fraction of open channels BREAKPOINT { SOLVE state METHOD cnexp ik = gkbar*o*(v - ek) } DERIVATIVE state { rate(v, cai) o' = (oinf - o)/tau } INITIAL { rate(v, cai) o = oinf } FUNCTION alp(v (mV), ca (mM)) (1/ms) { :callable from hoc alp = abar/(1 + exp1(k1,d1,v)/ca) } FUNCTION bet(v (mV), ca (mM)) (1/ms) { :callable from hoc bet = bbar/(1 + ca/exp1(k2,d2,v)) } FUNCTION exp1(k (mM), d, v (mV)) (mM) { :callable from hoc exp1 = k*exp(-2*d*FARADAY*v/R/(273.15 + celsius)) } PROCEDURE rate(v (mV), ca (mM)) { :callable from hoc LOCAL a a = alp(v,ca) tau = 1/(a + bet(v, ca)) oinf = a*tau } neuron-7.5/share/examples/nrniv/nmodl/capmp.hoc000066400000000000000000000034161323325274500216650ustar00rootroot00000000000000// Physical properties create a access a // {nseg=1 insert capump} {nseg=1 insert capr} cao=2 // run parameters tstop=40 // simulation control proc init() { local tausav, done done = 0 forall if (ismembrane("capr") && done==0) { tausav = tau_capr tau_capr = 1e-6 // so cai tracks car closely during initialization car_capr = cai0 done = 1 } finitialize(0) done = 0 forall if (ismembrane("capr") && done==0) { tau_capr = tausav done = 1 } // must re-initialize cvode after abrupt parameter change // if cvode is not being used, just call fcurrent() if (cvode.active()) { cvode.re_init() } else { fcurrent() } } // plot relationship between cai and ica_capmp CAIMIN = 1e-5 // lowest and highest cai to test CAIMAX = 0.1 INCREMENT = 10^0.1 // multiplier objref caivec, icavec // to record the data that will be plotted caivec = new Vector() icavec = new Vector() cai0 = CAIMIN while (cai0<=CAIMAX) { init() caivec.append(cai(0.5)) icavec.append(ica(0.5)) cai0 *= INCREMENT } objref g { g = new Graph(0) g.size(-5,-1,0,0.003) g.view(-5, 0, 4, 0.003, 292, 109, 300.48, 200.32) g.label(0.115016, 0.814697, "ica_capmp", 2, 1, 0, 0, 1) g.label(0.69968, 0.177316, "log10(cai)", 2, 1, 0, 0, 1) icavec.plot(g, caivec.c.log10()) } // generate plot of cai vs. t objref g1 g1 = new Graph() proc run1() { cai0 = $1 init() g1.size(0,tstop,0,$1) g1.beginline while(t < tstop) { g1.line(t, cai) step(.1) } g1.flush() } proc run() { run1(.01) } proc change_d(){ g1.color(1) g1.label(.8,.8,"diam=100") diam=100 run() g1.color(2) g1.label(.8,.7,"diam=1") diam=1 run() g1.color(3) g1.label(.8,.6,"diam=.2") diam=.2 run() } // run simulations that show time course of cai for different diameters change_d() neuron-7.5/share/examples/nrniv/nmodl/capmp.mod000066400000000000000000000032331323325274500216700ustar00rootroot00000000000000: capump.mod plus a "reservoir" used to initialize cai to desired concentrations UNITS { (mM) = (milli/liter) (mA) = (milliamp) (um) = (micron) (mol) = (1) PI = (pi) (1) FARADAY = (faraday) (coulomb) } NEURON { SUFFIX capr USEION ca READ cao, cai WRITE cai, ica GLOBAL k1, k2, k3, k4 GLOBAL car, tau } STATE { pump (mol/cm2) pumpca (mol/cm2) cai (mM) } PARAMETER { car = 5e-5 (mM) : ca in reservoir, used to initialize cai to desired concentrations tau = 1e9 (ms) : rate of equilibration between cai and car k1 = 5e8 (/mM-s) k2 = .25e6 (/s) k3 = .5e3 (/s) k4 = 5e0 (/mM-s) pumpdens = 3e-14 (mol/cm2) } CONSTANT { volo = 1 (liter) } ASSIGNED { diam (um) cao (mM) ica (mA/cm2) ipump (mA/cm2) ipump_last (mA/cm2) voli (um3) area1 (um2) c1 (1+8 um5/ms) c2 (1-10 um2/ms) c3 (1-10 um2/ms) c4 (1+8 um5/ms) } BREAKPOINT { SOLVE pmp METHOD sparse ipump_last = ipump ica = ipump } KINETIC pmp { COMPARTMENT voli {cai} COMPARTMENT (1e10)*area1 {pump pumpca} COMPARTMENT volo*(1e15) {cao car} ~ car <-> cai (1(um3)/tau,1(um3)/tau) ~ cai + pump <-> pumpca (c1,c2) ~ pumpca <-> pump + cao (c3,c4) : note that forward flux here is the outward flux ipump = (1e-4)*2*FARADAY*(f_flux - b_flux)/area1 : ipump_last vs ipump needed because of STEADYSTATE calculation ~ cai << (-(ica - ipump_last)*area1/(2*FARADAY)*(1e4)) CONSERVE pump + pumpca = (1e10)*area1*pumpdens } INITIAL { :cylindrical coordinates; actually vol and area1/unit length voli = PI*(diam/2)^2 * 1(um) area1 = 2*PI*(diam/2) * 1(um) c1 = (1e7)*area1 * k1 c2 = (1e7)*area1 * k2 c3 = (1e7)*area1 * k3 c4 = (1e7)*area1 * k4 SOLVE pmp STEADYSTATE sparse } neuron-7.5/share/examples/nrniv/nmodl/cv.hoc000077500000000000000000000003501323325274500211720ustar00rootroot00000000000000objref cvode cvode = new CVode() cv = 0 dtsav_ = dt xpanel("CVODE") xstatebutton("Use CVode", &cv, "setcv()") xbutton("run", "run() if (cv) cvode.statistics") xpanel() proc setcv() { cvode.active(cv) if(!cv) { dt = dtsav_ } } neuron-7.5/share/examples/nrniv/nmodl/fh.hoc000077500000000000000000000035611323325274500211660ustar00rootroot00000000000000/* Frankenhaeuser-Huxley action potential, Fig 1 to Fig 6 */ // Physical properties create node access node { nseg=1 L=2 diam=8 cm=2 insert fh nai=13.74 nao=114.5 ki=120 ko=2.5 } areafac = PI*L*diam/100 /* mamps/cm^2 to namps (units of 1e-6 cm^2) */ {celsius=20 secondorder=2 dt=.025} // experimental tools // run parameters // graphical interface appearance variable_domain(&dt,.0001,1) objref g g = new Graph() // simulation control proc init() { t = 0 forall { v = -70 mhnp_fh(v) if (ismembrane("fh")) { m_fh = inf_fh[0] h_fh = inf_fh[1] n_fh = inf_fh[2] p_fh = inf_fh[3] } } fcurrent() } proc run() { /*arg is tstop*/ init() fstim(1) fstim(0, .5, 0, .12, 1*areafac) g.begin() finitialize() while (t <= $1) { g.plot(t+ddt) /*plot(t, v+70)*/ fadvance() } g.flush() } proc fig1() { g.erase_all() g.size(0,2,0,100) g.begin() g.addexpr("v+70",2,1) ddt=0 run(2) } proc fig3() { g.erase_all() g.size(0,3,0,1) g.addexpr("m_fh",2,1) g.addexpr("h_fh",3,1) g.addexpr("n_fh",4,1) g.addexpr("p_fh",5,1) ddt=dt/2 run(3) } proc fig6() { g.erase_all printf("currents are inaccurate unless dt < .005. dt now %g\n",dt) printf(" or unless secondorder=2. (secondorder now %d)\n", secondorder) g.size(0,2,-10,5) g.addexpr("ina",2,1) g.addexpr("ik",3,1) g.addexpr("ip_fh",4,1) g.addexpr("il_fh",5,1) ddt=-dt/2 run(2) } f=1 proc runlast() { g.erase_all() if (f == 1) { fig1() }else if (f == 3) { fig3() }else if (f == 6) { fig6() } } proc menu() { xpanel("Frankenhaeuser-Huxley action potential") xbutton("fig 1", "f=1 fig1()") xbutton("fig 3", "f=3 fig3()") xbutton("fig 6", "f=6 fig6()") xvalue("dt","dt",1,"runlast()") xmenu("secondorder") xradiobutton("0", "secondorder=0 runlast()") xradiobutton("1", "secondorder=1 runlast()") xradiobutton("2", "secondorder=2 runlast()") xmenu() xpanel() } // run simulation menu()neuron-7.5/share/examples/nrniv/nmodl/fh.mod000077500000000000000000000045311323325274500211720ustar00rootroot00000000000000TITLE FH channel : Frankenhaeuser - Huxley channels for Xenopus NEURON { SUFFIX fh USEION na READ nai, nao WRITE ina USEION k READ ki, ko WRITE ik NONSPECIFIC_CURRENT il, ip RANGE pnabar, pkbar, ppbar, gl, el, il, ip GLOBAL inf,tau } INCLUDE "standard.inc" PARAMETER { v (mV) celsius (degC) : 20 pnabar=8e-3 (cm/s) ppbar=.54e-3 (cm/s) pkbar=1.2e-3 (cm/s) nai (mM) : 13.74 nao (mM) : 114.5 ki (mM) : 120 ko (mM) : 2.5 gl=30.3e-3 (mho/cm2) el = -69.74 (mV) } STATE { m h n p } ASSIGNED { ina (mA/cm2) ik (mA/cm2) ip (mA/cm2) il (mA/cm2) inf[4] tau[4] (ms) } INITIAL { mhnp(v*1(/mV)) m = inf[0] h = inf[1] n = inf[2] p = inf[3] } BREAKPOINT { LOCAL ghkna SOLVE states METHOD cnexp ghkna = ghk(v, nai, nao) ina = pnabar*m*m*h*ghkna ip = ppbar*p*p*ghkna ik = pkbar*n*n*ghk(v, ki, ko) il = gl*(v - el) } FUNCTION ghk(v(mV), ci(mM), co(mM)) (.001 coul/cm3) { :assume a single charge LOCAL z, eci, eco z = (1e-3)*FARADAY*v/(R*(celsius+273.15)) eco = co*efun(z) eci = ci*efun(-z) ghk = (.001)*FARADAY*(eci - eco) } FUNCTION efun(z) { if (fabs(z) < 1e-4) { efun = 1 - z/2 }else{ efun = z/(exp(z) - 1) } } DERIVATIVE states { : exact when v held constant mhnp(v*1(/mV)) m' = (inf[0] - m)/tau[0] h' = (inf[1] - h)/tau[1] n' = (inf[2] - n)/tau[2] p' = (inf[3] - p)/tau[3] } UNITSOFF FUNCTION alp(v(mV),i) { LOCAL a,b,c,q10 :rest = -70 order m,h,n,p v = v+70 q10 = 3^((celsius - 20)/10) if (i==0) { a=.36 b=22. c=3. alp = q10*a*expM1(b - v, c) }else if (i==1){ a=.1 b=-10. c=6. alp = q10*a*expM1(v - b, c) }else if (i==2){ a=.02 b= 35. c=10. alp = q10*a*expM1(b - v, c) }else{ a=.006 b= 40. c=10. alp = q10*a*expM1(b - v , c) } } FUNCTION bet(v,i) { LOCAL a,b,c,q10 :rest = -70 order m,h,n,p v = v+70 q10 = 3^((celsius - 20)/10) if (i==0) { a=.4 b= 13. c=20. bet = q10*a*expM1(v - b, c) }else if (i==1){ a=4.5 b= 45. c=10. bet = q10*a/(exp((b - v)/c) + 1) }else if (i==2){ a=.05 b= 10. c=10. bet = q10*a*expM1(v - b, c) }else{ a=.09 b= -25. c=20. bet = q10*a*expM1(v - b, c) } } FUNCTION expM1(x,y) { if (fabs(x/y) < 1e-6) { expM1 = y*(1 - x/y/2) }else{ expM1 = x/(exp(x/y) - 1) } } PROCEDURE mhnp(v) {LOCAL a, b :rest = -70 TABLE inf, tau DEPEND celsius FROM -100 TO 100 WITH 200 FROM i=0 TO 3 { a = alp(v,i) b=bet(v,i) tau[i] = 1/(a + b) inf[i] = a/(a + b) } } UNITSON neuron-7.5/share/examples/nrniv/nmodl/fit1.hoc000077500000000000000000000003161323325274500214270ustar00rootroot00000000000000for i=0,29 { data_fit1[i] = 2*exp(-.9*i/10) } double parm[2] parm[0] = 1 parm[1] = 1.5 attr_praxis(1e-5, .1, 1) fit_praxis(2, "err_fit1", &parm[0]) printf("Final value a=%g k=%g\n", parm[0], parm[1]) neuron-7.5/share/examples/nrniv/nmodl/fit1.mod000077500000000000000000000006211323325274500214340ustar00rootroot00000000000000:example of faster fit function for use with praxis. NEURON { SUFFIX fit1 GLOBAL data } ASSIGNED { data[30] } FUNCTION err(n) { LOCAL d, x, a, k VERBATIM { double* pp, *hoc_pgetarg(); pp = hoc_pgetarg(2); _la = pp[0]; _lk = pp[1]; } ENDVERBATIM err = 0 FROM i=0 TO 29 { x = i/10 d = data[i] - fun(a, k, x) err= err + d*d } } FUNCTION fun(a, k, x) { fun = a * exp(-k*x) } neuron-7.5/share/examples/nrniv/nmodl/gap.hoc000077500000000000000000000013701323325274500213340ustar00rootroot00000000000000// Physical properties create a,b forall {nseg=10 L=1000 diam=10 insert hh} objref g[2] for i=0,1 g[i] = new gap() a g[0].loc(.9999) /*distal end of a*/ b g[1].loc(.0001) /*proximal end of b*/ setpointer g[0].vgap, b.v(.001) setpointer g[1].vgap, a.v(.999) // run parameters tstop=5 // graphical interface appearance objref grph grph = new Graph() grph.size(0,tstop,-80,40) grph.addexpr("a.v(.001)",1,1) grph.addexpr("a.v(.999)",2,1) grph.addexpr("b.v(.001)",3,1) grph.addexpr("b.v(.999)",4,1) // simulation control objref stim a stim = new IClamp(.001) {stim.del=0 stim.dur=.1 stim.amp=40} proc run() { for i=0,1 g[i].r=3 finitialize(-65) grph.begin while ( t < tstop) { grph.plot(t) fadvance() } grph.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nmodl/gap.mod000077500000000000000000000003151323325274500213400ustar00rootroot00000000000000NEURON { POINT_PROCESS gap NONSPECIFIC_CURRENT i RANGE r, i POINTER vgap } PARAMETER { v (millivolt) vgap (millivolt) r = 1e10 (megohm) } ASSIGNED { i (nanoamp) } BREAKPOINT { i = (v - vgap)/r } neuron-7.5/share/examples/nrniv/nmodl/hh1.hoc000077500000000000000000000011001323325274500212340ustar00rootroot00000000000000// Physical properties create soma, test access soma forall nseg=1 {insert hh test insert hh1} forall {L=10 diam=10} // run parameters tstop=5 // graphical interface appearance objref g g = new Graph() objref s[2] // simulation control i=0 forall { s[i] = new IClamp(.5) s[i].del=0 s[i].dur=.1 i = i+1 } proc vinit() { finitialize(-65) } proc run() { g.size(0,tstop,-80,40) g.addexpr("test.v",3,1) for i=0,1 s[i].amp=$1 vinit() g.color(2) g.beginline while (t < tstop) { g.line(t, v) g.plot(t) fadvance() } g.flush() } // run simulation run(.5) neuron-7.5/share/examples/nrniv/nmodl/hh1.mod000077500000000000000000000060271323325274500212570ustar00rootroot00000000000000TITLE gsquid.mod squid sodium, potassium, and leak channels COMMENT This is the original Hodgkin-Huxley treatment for the set of sodium, potassium, and leakage channels found in the squid giant axon membrane. ("A quantitative description of membrane current and its application conduction and excitation in nerve" J.Physiol. (Lond.) 117:500-544 (1952).) Membrane voltage is in absolute mV and has been reversed in polarity from the original HH convention and shifted to reflect a resting potential of -65 mV. Initialize this mechanism to steady-state voltage by calling rates_gsquid(v) from HOC, then setting m_gsquid=minf_gsquid, etc. Remember to set celsius=6.3 (or whatever) in your HOC file. See hh1.hoc for an example of a simulation using this model. SW Jaslove 6 March, 1992 ENDCOMMENT UNITS { (mA) = (milliamp) (mV) = (millivolt) } NEURON { SUFFIX hh1 USEION na READ ena WRITE ina USEION k READ ek WRITE ik NONSPECIFIC_CURRENT il RANGE gnabar, gkbar, gl, el GLOBAL minf, hinf, ninf, mexp, hexp, nexp } PARAMETER { v (mV) celsius = 6.3 (degC) dt (ms) gnabar = .12 (mho/cm2) ena = 50 (mV) gkbar = .036 (mho/cm2) ek = -77.5 (mV) gl = .0003 (mho/cm2) el = -54.3 (mV) } STATE { m h n } ASSIGNED { ina (mA/cm2) ik (mA/cm2) il (mA/cm2) minf hinf ninf mexp hexp nexp } BREAKPOINT { SOLVE states ina = gnabar*m*m*m*h*(v - ena) ik = gkbar*n*n*n*n*(v - ek) il = gl*(v - el) } UNITSOFF INITIAL { rates(v) m = minf h = hinf n = ninf } PROCEDURE states() { :Computes state variables m, h, and n rates(v) : at the current v and dt. m = m + mexp*(minf-m) h = h + hexp*(hinf-h) n = n + nexp*(ninf-n) } PROCEDURE rates(v) { :Computes rate and other constants at current v. :Call once from HOC to initialize inf at resting v. LOCAL q10, tinc, alpha, beta, sum TABLE minf, mexp, hinf, hexp, ninf, nexp DEPEND dt, celsius FROM -100 TO 100 WITH 200 q10 = 3^((celsius - 6.3)/10) tinc = -dt * q10 :"m" sodium activation system alpha = .1 * vtrap(-(v+40),10) beta = 4 * exp(-(v+65)/18) sum = alpha + beta minf = alpha/sum mexp = 1 - exp(tinc*sum) :"h" sodium inactivation system alpha = .07 * exp(-(v+65)/20) beta = 1 / (exp(-(v+35)/10) + 1) sum = alpha + beta hinf = alpha/sum hexp = 1 - exp(tinc*sum) :"n" potassium activation system alpha = .01*vtrap(-(v+55),10) beta = .125*exp(-(v+65)/80) sum = alpha + beta ninf = alpha/sum nexp = 1 - exp(tinc*sum) } FUNCTION vtrap(x,y) { :Traps for 0 in denominator of rate eqns. if (fabs(x/y) < 1e-6) { vtrap = y*(1 - x/y/2) }else{ vtrap = x/(exp(x/y) - 1) } } UNITSON neuron-7.5/share/examples/nrniv/nmodl/hhvect.hoc000077500000000000000000000011311323325274500220410ustar00rootroot00000000000000// Physical properties create soma, test access soma forall nseg=1 {insert hh test insert hh2} forall {L=10 diam=10} // run parameters tstop=5 // graphical interface appearance objref g g = new Graph() objref s[2] // simulation control i=0 forall { s[i] = new IClamp(.5) s[i].del=0 s[i].dur=.1 i = i+1 } proc vinit() { finitialize(-65) } proc run() { g.color(1) g.size(0,tstop,-80,40) g.begin() g.addexpr("test.v", 3,1) for i=0,1 s[i].amp=$1 vinit() g.color(2) g.beginline() while (t < tstop) { g.line(t,v) g.plot(t) fadvance() } g.flush() } // run simulation run(.5) neuron-7.5/share/examples/nrniv/nmodl/hhvect.mod000077500000000000000000000061111323325274500220520ustar00rootroot00000000000000TITLE gsquid.mod squid sodium, potassium, and leak channels COMMENT This is the original Hodgkin-Huxley treatment for the set of sodium, potassium, and leakage channels found in the squid giant axon membrane. ("A quantitative description of membrane current and its application conduction and excitation in nerve" J.Physiol. (Lond.) 117:500-544 (1952).) Membrane voltage is in absolute mV and has been reversed in polarity from the original HH convention and shifted to reflect a resting potential of -65 mV. Initialize this mechanism to steady-state voltage by calling rates_gsquid(v) from HOC, then setting m_gsquid=minf_gsquid, etc. Remember to set celsius=6.3 (or whatever) in your HOC file. See hh1.hoc for an example of a simulation using this model. SW Jaslove 6 March, 1992 ENDCOMMENT UNITS { (mA) = (milliamp) (mV) = (millivolt) } NEURON { SUFFIX hh2 USEION na READ ena WRITE ina USEION k READ ek WRITE ik NONSPECIFIC_CURRENT il RANGE gnabar, gkbar, gl, el } PARAMETER { v (mV) celsius = 6.3 (degC) dt (ms) gnabar = .12 (mho/cm2) ena = 50 (mV) gkbar = .036 (mho/cm2) ek = -77.5 (mV) gl = .0003 (mho/cm2) el = -54.3 (mV) } STATE { m h n } ASSIGNED { gna (mho/cm2) gk (mho/cm2) ina (mA/cm2) ik (mA/cm2) il (mA/cm2) minf hinf ninf mexp hexp nexp } BREAKPOINT { SOLVE states ina = gna*(v - ena) ik = gk*(v - ek) il = gl*(v - el) } UNITSOFF INITIAL { rates(v) m = minf h = hinf n = ninf gna = gnabar*m*m*m*h gk = gkbar*n*n*n*n } PROCEDURE states() { :Computes state variables m, h, and n rates(v) : at the current v and dt. m = m + mexp*(minf-m) h = h + hexp*(hinf-h) n = n + nexp*(ninf-n) gna = gnabar*m*m*m*h gk = gkbar*n*n*n*n } PROCEDURE rates(v) { :Computes rate and other constants at current v. :Call once from HOC to initialize inf at resting v. LOCAL q10, tinc, alpha, beta, sum TABLE minf, mexp, hinf, hexp, ninf, nexp DEPEND dt, celsius FROM -100 TO 100 WITH 200 q10 = 3^((celsius - 6.3)/10) tinc = -dt * q10 :"m" sodium activation system alpha = .1 * vtrap(-(v+40),10) beta = 4 * exp(-(v+65)/18) sum = alpha + beta minf = alpha/sum mexp = 1 - exp(tinc*sum) :"h" sodium inactivation system alpha = .07 * exp(-(v+65)/20) beta = 1 / (exp(-(v+35)/10) + 1) sum = alpha + beta hinf = alpha/sum hexp = 1 - exp(tinc*sum) :"n" potassium activation system alpha = .01*vtrap(-(v+55),10) beta = .125*exp(-(v+65)/80) sum = alpha + beta ninf = alpha/sum nexp = 1 - exp(tinc*sum) } FUNCTION vtrap(x,y) { :Traps for 0 in denominator of rate eqns. if (fabs(x/y) < 1e-6) { vtrap = y*(1 - x/y/2) }else{ vtrap = x/(exp(x/y) - 1) } } UNITSON neuron-7.5/share/examples/nrniv/nmodl/inatest.mod000077500000000000000000000002101323325274500222320ustar00rootroot00000000000000NEURON { USEION na WRITE ina RANGE inabar } PARAMETER {inabar (milliamp/cm2)} ASSIGNED {ina (milliamp/cm2)} BREAKPOINT { ina=inabar} neuron-7.5/share/examples/nrniv/nmodl/ionleak.mod000077500000000000000000000006061323325274500222160ustar00rootroot00000000000000NEURON { USEION na READ ena WRITE ina USEION k READ ek WRITE ik USEION ca READ eca WRITE ica RANGE gna, gk, gca } UNITS { (mV) = (millivolt) (mA) = (milliamp) } PARAMETER { gna (mho/cm2) gk(mho/cm2) gca(mho/cm2) } ASSIGNED { v (mV) ena (mV) ek (mV) eca (mV) ina (mA/cm2) ik (mA/cm2) ica (mA/cm2) } BREAKPOINT { ina = gna*(v - ena) ik = gk*(v - ek) ica = gca*(v - eca) } neuron-7.5/share/examples/nrniv/nmodl/nacum.hoc000077500000000000000000000010171323325274500216660ustar00rootroot00000000000000// Physical properties create a access a {nseg=1 L=1 diam=1 insert inatest insert na} // run parameters area1 = PI*diam*L vol = PI*diam^2/4*L // graphical interface appearance objref g g = new Graph() // simulation control proc run() { diam=.001 fhspace_na=2 inabar_inatest = -1e-2 nai0_na_ion = 1 nao0_na_ion = 10 finitialize(0) g.color(1) g.size(0,1,0,10) g.beginline() g.addexpr("nai",2,1) g.addexpr("nao",3,1) while (t < 1) { g.line(t,v) g.plot(t) fadvance() } g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nmodl/nacum.mod000077500000000000000000000035531323325274500217030ustar00rootroot00000000000000TITLE Sodium ion accumulation : Sodium ion accumulation inside and outside NEURON { SUFFIX na USEION na READ ina, nai, nao WRITE nai, nao RANGE fhspace, k } UNITS { (molar) = (1/liter) (mV) = (millivolt) (um) = (micron) (mM) = (millimolar) (mA) = (milliamp) FARADAY = 96520 (coul) R = 8.3134 (joule/degC) } PARAMETER { nabath = 116 (mM) diam (um) ina (mA/cm2) fhspace =200 (angstrom) : width of frankenhaeuser-hodgkin space k = 0 (1/s) : transfer rate from bath to : FH space } STATE { nai START 15.7 (mM) nao START 116 (mM) } INITIAL { } BREAKPOINT { SOLVE state METHOD euler } DERIVATIVE state { nai' = -ina * 4/(diam*FARADAY) * (1e4) nao' = ina/fhspace/FARADAY*(1e8) + k*(nabath - nao)*(1e-3) } COMMENT This model uses ina but does not WRITE it; thus this model does not add anything to the total ionic current. The initial block works around a difficulty that arises from a STATE in this model having the same name as an ion. (Note: in the cabpump model there is no name conflict between the ca[] states and the cai ion concentration.) The sequence of events when finitialize is called is that the na_ion's nai,nao are initialized to the global variables nai0_na_ion and nao0_na_ion respectively. Then this model's INITIAL block is called. By default, nai/nao would be set to the initial state values nai0/nao0 implicitly declared in this model and on exit from the intitial block, the na_ion values would be assigned these local values. We therefore directly set the local state values to the na_ion values. See the "nocmodl nacum" generated nacum.c file to see the precise sequence on the nrn_init() call. diam is a special range variable in NEURON and refers to the diameter in microns. Under scop and hocmodl its default value is specified in the PARAMETER block. In NEURON, however, its value is taken from the "morphology" mechanism. ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/nacur.mod000077500000000000000000000004771323325274500217120ustar00rootroot00000000000000NEURON { SUFFIX nacur USEION na WRITE ina RANGE del, dur, amp } PARAMETER { del (ms) dur = 1 (ms) amp = -1 (milliamp/cm2) : negative is inward } ASSIGNED { ina (milliamp/cm2) } BREAKPOINT { if (amp) { at_time(del) at_time(del + dur) } if (t > del && t < del + dur) { ina = amp }else{ ina = 0 } } neuron-7.5/share/examples/nrniv/nmodl/nadifl.mod000077500000000000000000000011471323325274500220320ustar00rootroot00000000000000COMMENT Longitudinal diffusion of sodium (no buffering) (equivalent modified euler with standard method and equivalent to diagonalized linear solver with CVODE ) ENDCOMMENT NEURON { SUFFIX nadifl USEION na READ ina WRITE nai RANGE D } UNITS { (mM) = (milli/liter) (um) = (micron) FARADAY = (faraday) (coulomb) PI = (pi) (1) } PARAMETER { D = .6 (um2/ms) } ASSIGNED { ina (milliamp/cm2) diam (um) } STATE { nai (mM) } BREAKPOINT { SOLVE conc METHOD sparse } KINETIC conc { COMPARTMENT PI*diam*diam/4 {nai} LONGITUDINAL_DIFFUSION D*PI*diam*diam/4 {nai} ~ nai << (-ina/(FARADAY)*PI*diam*(1e4)) } neuron-7.5/share/examples/nrniv/nmodl/nadifl1.hoc000077500000000000000000000022351323325274500221040ustar00rootroot00000000000000xopen("$(NEURONHOME)/lib/hoc/noload.hoc") // compare cable voltage profile with equivalent sodium diffusion create cable access cable nseg=20 insert nadifl insert nacur nao0_na_ion = 1 nai0_na_ion = 1 L=10 diam = .1 v_init = 1 proc init() { if (ismembrane("nadifl")) { vcoef() } nai0_na_ion = v_init finitialize(v_init) fcurrent() } proc vcoef() { // Ra and cm so nai has same solution as v // Good only for uniform cable // D in (um2/ms), amp_nacur = mA/cm2 over one segment // Want v(mV) equivalent to nai (mM) // From the diffusion and cable equation we need // D_nadifl = diam/(4*Ra*cm)*(1e7) // Charge injected is amp_nacur*dur_nacur*PI*diam*L/nseg // Material injected is amp_nacur*dur_nacur/(FARADAY)*PI*diam*L/nseg // Charge on cable is PI*diam*L*cm*v // Material in cable is PI*(diam/2)^2*L*nai // so steadystate v is amp_nacur*dur_nacur/(nseg*cm)*(1e3) // nai = amp_nacur*dur_nacur/(nseg*diam/4)/(FARADAY)*(1e4) // so cm = diam*FARADAY/40 cm = diam*FARADAY/40 Ra = diam/D_nadifl/4/cm*1e7 // amp for 100 mV change amp_nacur = -100*cm/dur_nacur*(1e-3) amp_nacur = 0 amp_nacur(.0001) = -100*cm/dur_nacur*(1e-3) } xopen("nadifl1.ses") neuron-7.5/share/examples/nrniv/nmodl/nadifl1.ses000077500000000000000000000032771323325274500221340ustar00rootroot00000000000000objectvar save_window_, rvp_ objectvar scene_vector_[3] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} //Begin Insert/Remove Mechanisms { load_file("inserter.hoc", "Inserter") } { cable ocbox_ = new Inserter(0) } {object_push(ocbox_)} { } {object_pop() doNotify()} { ocbox_ = ocbox_.v1 ocbox_.map("Insert/Remove Mechanisms", 279, 142, 93.12, 186.24) } objref ocbox_ //End Insert/Remove Mechanisms { save_window_ = new Graph(0) save_window_.size(0,10,0,100) scene_vector_[2] = save_window_ {save_window_.view(0, 0, 10, 100, 726, 54, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("v") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.8, 0.9) objectvar rvp_ rvp_ = new RangeVarPlot("nai") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 2, 1, 0.8, 0.9) } { xpanel("RunControl", 0) v_init = 1 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 5 xvalue("t","t", 2 ) tstop = 5 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 2 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(404,33) } objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/nmodl/nadifl2.hoc000077500000000000000000000007001323325274500221000ustar00rootroot00000000000000xopen("$(NEURONHOME)/lib/hoc/noload.hoc") // test of Longitudinal diffusion create source, cable1, cable2, sink access cable1 source connect cable1(0), .5 cable1 connect cable2(0), 1 cable2 connect sink(0), 1 forsec "cable" nseg = 20 source { L=.5 diam=1 } sink { L=.5 diam=1 } forsec "cable" {L=10 diam=1} forall { insert nadifl insert ionleak insert pas g_pas = 2 e_pas=0} source { insert nacur } sink { gna_ionleak = 1 } xopen("nadifl2.ses") neuron-7.5/share/examples/nrniv/nmodl/nadifl2.ses000077500000000000000000000060451323325274500221310ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[4] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} { save_window_ = new Graph(0) save_window_.size(0,20.75,0,100) scene_vector_[2] = save_window_ {save_window_.view(0, 0, 20.75, 100, 698, 31, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("nai") source rvp_.begin(0) sink rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.8, 0.9) } { xpanel("na_ion (Globals)", 0) nai0_na_ion = 1 xvalue("nai0_na_ion","nai0_na_ion", 1,"", 0, 0 ) nao0_na_ion = 1 xvalue("nao0_na_ion","nao0_na_ion", 1,"", 0, 0 ) xpanel(79,618) } { xpanel("source(0 - 1) (Parameters)", 0) xlabel("source(0 - 1) (Parameters)") xlabel("nseg = 1") source.L = 0.5 xvalue("L","source.L", 1,"define_shape()", 0, 0 ) source.cm = 1 xvalue("cm","source.cm", 1,"", 0, 0 ) source.D_nadifl = 0.6 xvalue("D_nadifl","source.D_nadifl", 1,"", 0, 0 ) source.diam = 1 xvalue("diam","source.diam", 1,"", 0, 0 ) source.gna_ionleak = 0 xvalue("gna_ionleak","source.gna_ionleak", 1,"", 0, 0 ) source.gk_ionleak = 0 xvalue("gk_ionleak","source.gk_ionleak", 1,"", 0, 0 ) source.gca_ionleak = 0 xvalue("gca_ionleak","source.gca_ionleak", 1,"", 0, 0 ) source.ek = -77 xvalue("ek","source.ek", 1,"", 0, 0 ) source.eca = 132.46 xvalue("eca","source.eca", 1,"", 0, 0 ) source.g_pas = 2 xvalue("g_pas","source.g_pas", 1,"", 0, 0 ) source.e_pas = 0 xvalue("e_pas","source.e_pas", 1,"", 0, 0 ) source.del_nacur = 0 xvalue("del_nacur","source.del_nacur", 1,"", 0, 0 ) source.dur_nacur = 1e+09 xvalue("dur_nacur","source.dur_nacur", 1,"", 0, 0 ) source.amp_nacur = -10 xvalue("amp_nacur","source.amp_nacur", 1,"", 0, 0 ) xpanel(23,110) } { save_window_ = new Graph(0) save_window_.size(-1,21,-1,1) scene_vector_[3] = save_window_ {save_window_.view(-1, -1, 22, 2, 701, 304, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("v") source rvp_.begin(1) sink rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.8, 0.9) } { xpanel("RunControl", 0) v_init = 0 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 10103.3 xvalue("t","t", 2 ) tstop = 10000 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 6 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(393,27) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 395, 423, 280.32, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/nmodl/nadifl3.hoc000077500000000000000000000022331323325274500221040ustar00rootroot00000000000000xopen("$(NEURONHOME)/lib/hoc/noload.hoc") // compare cable voltage profile with equivalent sodium diffusion create cable access cable nseg=2 insert nadifl insert nacur nao0_na_ion = 1 nai0_na_ion = 1 L=1 diam = .1 v_init = 1 proc init() { if (ismembrane("nadifl")) { vcoef() } nai0_na_ion = v_init finitialize(v_init) fcurrent() } proc vcoef() { // Ra and cm so nai has same solution as v // Good only for uniform cable // D in (um2/ms), amp_nacur = mA/cm2 over one segment // Want v(mV) equivalent to nai (mM) // From the diffusion and cable equation we need // D_nadifl = diam/(4*Ra*cm)*(1e7) // Charge injected is amp_nacur*dur_nacur*PI*diam*L/nseg // Material injected is amp_nacur*dur_nacur/(FARADAY)*PI*diam*L/nseg // Charge on cable is PI*diam*L*cm*v // Material in cable is PI*(diam/2)^2*L*nai // so steadystate v is amp_nacur*dur_nacur/(nseg*cm)*(1e3) // nai = amp_nacur*dur_nacur/(nseg*diam/4)/(FARADAY)*(1e4) // so cm = diam*FARADAY/40 cm = diam*FARADAY/40 Ra = diam/D_nadifl/4/cm*1e7 // amp for 100 mV change amp_nacur = -100*cm/dur_nacur*(1e-3) amp_nacur = 0 amp_nacur(.0001) = -100*cm/dur_nacur*(1e-3) } xopen("nadifl3.ses") neuron-7.5/share/examples/nrniv/nmodl/nadifl3.ses000077500000000000000000000074571323325274500221420ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[3] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} { save_window_ = new Graph(0) save_window_.size(0,1,0,100) scene_vector_[2] = save_window_ {save_window_.view(0, 0, 1, 100, 729, 24, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("nai") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.8, 0.9) } { xpanel("cable(0.25) (Parameters)", 0) xlabel("cable(0.25) (Parameters)") cable.cm(0.25) = 241.21 xvalue("cm","cable.cm(0.25)", 1,"", 0, 1 ) cable.D_nadifl(0.25) = 0.6 xvalue("D_nadifl","cable.D_nadifl(0.25)", 1,"", 0, 1 ) cable.diam(0.25) = 0.1 xvalue("diam","cable.diam(0.25)", 1,"diam_changed=1", 0, 1 ) cable.del_nacur(0.25) = 0 xvalue("del_nacur","cable.del_nacur(0.25)", 1,"", 0, 1 ) cable.dur_nacur(0.25) = 1 xvalue("dur_nacur","cable.dur_nacur(0.25)", 1,"", 0, 1 ) cable.amp_nacur(0.25) = -24.121 xvalue("amp_nacur","cable.amp_nacur(0.25)", 1,"", 0, 1 ) xpanel(42,111) } { xpanel("cable(0.25) (Assigned)", 0) xlabel("cable(0.25) (Assigned)") cable.v(0.25) = 1 xvalue("v","cable.v(0.25)", 0,"", 0, 1 ) cable.i_cap(0.25) = 0 xvalue("i_cap","cable.i_cap(0.25)", 0,"", 0, 1 ) cable.ena(0.25) = 0 xvalue("ena","cable.ena(0.25)", 0,"", 0, 1 ) cable.ina(0.25) = 0 xvalue("ina","cable.ina(0.25)", 0,"", 0, 1 ) xpanel(37,370) } { xpanel("cable(0.25) (States)", 0) xlabel("cable(0.25) (States)") cable.v(0.25) = 1 xvalue("v","cable.v(0.25)", 0,"", 0, 1 ) cable.nai(0.25) = 1 xvalue("nai","cable.nai(0.25)", 0,"", 0, 1 ) cable.nao(0.25) = 1 xvalue("nao","cable.nao(0.25)", 0,"", 0, 1 ) xpanel(41,565) } { xpanel("cable(0.75) (Parameters)", 0) xlabel("cable(0.75) (Parameters)") cable.cm(0.75) = 241.21 xvalue("cm","cable.cm(0.75)", 1,"", 0, 1 ) cable.D_nadifl(0.75) = 0.6 xvalue("D_nadifl","cable.D_nadifl(0.75)", 1,"", 0, 1 ) cable.diam(0.75) = 0.1 xvalue("diam","cable.diam(0.75)", 1,"diam_changed=1", 0, 1 ) cable.del_nacur(0.75) = 0 xvalue("del_nacur","cable.del_nacur(0.75)", 1,"", 0, 1 ) cable.dur_nacur(0.75) = 1 xvalue("dur_nacur","cable.dur_nacur(0.75)", 1,"", 0, 1 ) cable.amp_nacur(0.75) = 0 xvalue("amp_nacur","cable.amp_nacur(0.75)", 1,"", 0, 1 ) xpanel(387,28) } { xpanel("cable(0.75) (Assigned)", 0) xlabel("cable(0.75) (Assigned)") cable.v(0.75) = 1 xvalue("v","cable.v(0.75)", 0,"", 0, 1 ) cable.i_cap(0.75) = 0 xvalue("i_cap","cable.i_cap(0.75)", 0,"", 0, 1 ) cable.ena(0.75) = 0 xvalue("ena","cable.ena(0.75)", 0,"", 0, 1 ) cable.ina(0.75) = 0 xvalue("ina","cable.ina(0.75)", 0,"", 0, 1 ) xpanel(256,370) } { xpanel("cable(0.75) (States)", 0) xlabel("cable(0.75) (States)") cable.v(0.75) = 1 xvalue("v","cable.v(0.75)", 0,"", 0, 1 ) cable.nai(0.75) = 1 xvalue("nai","cable.nai(0.75)", 0,"", 0, 1 ) cable.nao(0.75) = 1 xvalue("nao","cable.nao(0.75)", 0,"", 0, 1 ) xpanel(241,568) } { xpanel("RunControl", 0) v_init = 1 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 0 xvalue("t","t", 2 ) tstop = 5 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.025 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 40 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 0 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(473,303) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 467, 703, 280.32, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/nmodl/nadifl4.hoc000077500000000000000000000003031323325274500221010ustar00rootroot00000000000000xopen("$(NEURONHOME)/lib/hoc/noload.hoc") create cable access cable nseg=50 L=50 diam=1 insert nadifl insert nacur xopen("nadifl4.ses") diam(0:.41) = 10:10 amp_nacur==0 amp_nacur(.49) == -200 neuron-7.5/share/examples/nrniv/nmodl/nadifl4.ses000077500000000000000000000055641323325274500221400ustar00rootroot00000000000000load_file("nrngui.hoc") objectvar save_window_, rvp_ objectvar scene_vector_[4] objectvar ocbox_, ocbox_list_, scene_, scene_list_ {ocbox_list_ = new List() scene_list_ = new List()} {pwman_place(0,0,0)} { save_window_ = new PlotShape(0) save_window_.size(0.708333,49.2916,-24.253,24.2528) save_window_.variable("nai") scene_vector_[2] = save_window_ {save_window_.view(0.708333, -24.253, 48.5833, 48.5058, 698, 299, 200.64, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") } { save_window_ = new Graph(0) save_window_.size(0,50,10,62) scene_vector_[3] = save_window_ {save_window_.view(0, 10, 50, 52, 695, 30, 300.48, 200.32)} flush_list.append(save_window_) save_window_.save_name("flush_list.") objectvar rvp_ rvp_ = new RangeVarPlot("nai") cable rvp_.begin(0) cable rvp_.end(1) rvp_.origin(0) save_window_.addobject(rvp_, 1, 1, 0.8, 0.9) } { xpanel("cable(0 - 1) (Parameters)", 0) xlabel("cable(0 - 1) (Parameters)") xlabel("nseg = 50") cable.L = 50 xvalue("L","cable.L", 1,"define_shape()", 0, 0 ) cable.cm = 1 xvalue("cm","cable.cm", 1,"", 0, 0 ) cable.D_nadifl = 0.6 xvalue("D_nadifl","cable.D_nadifl", 1,"", 0, 0 ) cable.diam = 1 xvalue("diam","cable.diam", 1,"", 0, 0 ) cable.del_nacur = 0 xvalue("del_nacur","cable.del_nacur", 1,"", 0, 0 ) cable.dur_nacur = 1 xvalue("dur_nacur","cable.dur_nacur", 1,"", 0, 0 ) cable.amp_nacur = 0 xvalue("amp_nacur","cable.amp_nacur", 1,"", 0, 0 ) xpanel(34,113) } { xpanel("cable(0.49) (Parameters)", 0) xlabel("cable(0.49) (Parameters)") cable.cm(0.49) = 1 xvalue("cm","cable.cm(0.49)", 1,"", 0, 1 ) cable.D_nadifl(0.49) = 0.6 xvalue("D_nadifl","cable.D_nadifl(0.49)", 1,"", 0, 1 ) cable.diam(0.49) = 1 xvalue("diam","cable.diam(0.49)", 1,"diam_changed=1", 0, 1 ) cable.del_nacur(0.49) = 0 xvalue("del_nacur","cable.del_nacur(0.49)", 1,"", 0, 1 ) cable.dur_nacur(0.49) = 1 xvalue("dur_nacur","cable.dur_nacur(0.49)", 1,"", 0, 1 ) cable.amp_nacur(0.49) = -200 xvalue("amp_nacur","cable.amp_nacur(0.49)", 1,"", 0, 1 ) xpanel(26,428) } { xpanel("RunControl", 0) v_init = -65 xvalue("Init","v_init", 1,"stdinit()", 1, 1 ) xbutton("Init & Run","run()") xbutton("Stop","stoprun=1") runStopAt = 5 xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 ) runStopIn = 1 xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 ) xbutton("Single Step","steprun()") t = 100 xvalue("t","t", 2 ) tstop = 100 xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 ) dt = 0.1 xvalue("dt","dt", 1,"setdt()", 0, 1 ) steps_per_ms = 10 xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 ) xcheckbox("Quiet",&stdrun_quiet,"") realtime = 11 xvalue("Real Time","realtime", 0,"", 0, 1 ) xpanel(385,24) } //Begin VariableTimeStep { ocbox_ = NumericalMethodPanel[0] ocbox_ = ocbox_.b1 ocbox_.map("VariableTimeStep", 380, 424, 280.32, 106.56) } objref ocbox_ //End VariableTimeStep objectvar scene_vector_[1] {doNotify()} neuron-7.5/share/examples/nrniv/nmodl/obj_ex.hoc000077500000000000000000000003021323325274500220250ustar00rootroot00000000000000create utility objref o, ob utility { o = new ObjectExample(.5) ob=new ObjectExample(.5) } o.a = 5 ob.a = 6 o.aval() ob.aval() for i=0,2 o.x[i] = i+10 for i=0,2 ob.x[i] = i+20 o.prx() ob.prx() neuron-7.5/share/examples/nrniv/nmodl/obj_ex.mod000077500000000000000000000010111323325274500220310ustar00rootroot00000000000000NEURON { POINT_PROCESS ObjectExample RANGE a, x } PARAMETER {a} ASSIGNED {x[3]} FUNCTION aval() { aval = a } PROCEDURE prx() { FROM i=0 TO 2 { printf ("x[%g] = %g\n", i, x[i]) } } COMMENT This model demonstrates how to add a new class as an alternative to the begintemplate interpreted method. Unfortunately the instantiation of an object like this must take place within a section but that is not too odious since one can always define a utility section that is not connected to any other section. ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/order.hoc000077500000000000000000000003611323325274500216770ustar00rootroot00000000000000load_file("nrngui.hoc") create soma[2] access soma insert pas ii=1 forall {insert order index_order = ii ii+=ii} tstop = .2 print "fixed step" run() cvode_active(1) print "global variable" run() cvode_local(1) print "local variable" run() neuron-7.5/share/examples/nrniv/nmodl/order.mod000077500000000000000000000012441323325274500217060ustar00rootroot00000000000000: demonstrate the order in which various tasks are done NEURON { SUFFIX order : NONSPECIFIC_CURRENT i ELECTRODE_CURRENT i RANGE index } PARAMETER { index = 0 } ASSIGNED { v (millivolt) i (milliamp/cm2) } INITIAL { printf("INITIAL index=%g t=%g v=%g\n", index, t, v) } BREAKPOINT { printf("BREAKPOINT index=%g t=%g v=%g\n", index, t, v) i = 0 } BEFORE BREAKPOINT { printf("BEFORE BREAKPOINT index=%g t=%g v=%g\n", index, t, v) } AFTER SOLVE { printf("AFTER SOLVE index=%g t=%g v=%g\n", index, t, v) } BEFORE INITIAL { printf("BEFORE INITIAL index=%g t=%g v=%g\n", index, t, v) } AFTER INITIAL { printf("AFTER INITIAL index=%g t=%g v=%g\n", index, t, v) } neuron-7.5/share/examples/nrniv/nmodl/passiv.hoc000077500000000000000000000006731323325274500220770ustar00rootroot00000000000000// Physical properties create a access a nseg = 1 insert Passive g_Passive=.001 erev_Passive=0 // graphical interface appearance objref g g = new Graph() // simulation control proc cur() { g.size(0,1,0,.001) g.beginline() for (v=0; v < 1; v=v+.01) { fcurrent() g.line(v, i_Passive) } g.flush() } proc run() { g.size(0,3,0,1) t = 0 v=1 g.beginline() while (t < 3) { g.line(t,v) fadvance() } } // run simulation run() neuron-7.5/share/examples/nrniv/nmodl/passiv.mod000077500000000000000000000060001323325274500220730ustar00rootroot00000000000000TITLE passive membrane channel UNITS { (mV) = (millivolt) (mA) = (milliamp) } NEURON { SUFFIX Passive NONSPECIFIC_CURRENT i RANGE g, erev } PARAMETER { g = .001 (mho/cm2) erev = -70 (mV) } ASSIGNED { i (mA/cm2)} BREAKPOINT { i = g*(v - erev) } COMMENT The passive channel is very simple but illustrates several features of the interface to NEURON. As a SCoP or hoc model the NEURON block is ignored. About the only thing you can do with this as an isolated channel in SCoP is plot the current vs the potential. Notice that stand alone models require that all variables be declared, The calculation is done in the BREAKPOINT block. The intended semantics of the breakpoint block are that after the block is executed, ALL variables are consistent with the value of the independent variable (t). In this case, of course a trivial assignment statement suffices. PARAMETER declares variables which generally do not change during solution of the BREAKPOINT block and ASSIGNED declares variables which get values via assignment statements (as opposed to STATE variables whose values can only be determined by solving differential or simultaneous algebraic equations.) The values of PARAMETERs are the default values and can be changed in SCoP. The NEURON block serves as the interface to NEURON. One has to imagine many models linked to NEURON at the same time. Therefore in order to avoid conflicts with names of variables in other mechanisms a SUFFIX is applied to all the declared names that are accessible from NEURON. Accessible PARAMETERs are of two types. Those appearing in the PARAMETER list become range variables that can be used in any section in which the mechanism is "insert"ed. PARAMETERs that do not appear in the PARAMETER list become global scalars which are the same for every section. ASSIGNED variables and STATE variables also become range variables that depend on position in a section. NONSPECIFIC_CURRENT specifies a list of currents not associated with any particular ion but computed by this model that affect the calculation of the membrane potential. I.e. a nonspecific current adds its contribution to the total membrane current. The following neuron program is suitable for investigating the behavior of the channel and determining its effect on the membrane. create a access a nseg = 1 insert Passive g_Passive=.001 erev_Passive=0 proc cur() { axis(0,1,1,0,.001,1) axis() plot(1) for (v=0; v < 1; v=v+.01) { fcurrent() plot(v, i_Passive) } plt(-1) } proc run() { axis(0,3,3,0,1,1) axis() t = 0 v=1 plot(1) while (t < 3) { plot(t,v) fadvance() } } /* the cur() procedure uses the fcurrent() function of neuron to calculate all the currents and conductances with all states (including v) held constant. In the run() procedure fadvance() integrates all equations by one time step. In this case the Passive channel in combination with the default capacitance of 1uF/cm2 give a membrane with a time constant of 1 ms. Thus the voltage decreases exponentially toward 0 from its initial value of 1. ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/rchan.mod000077500000000000000000000005071323325274500216670ustar00rootroot00000000000000NEURON { SUFFIX rchan NONSPECIFIC_CURRENT i GLOBAL mean, stdev } PARAMETER { mean = 0 stdev = .001 } ASSIGNED { i (milliamp/cm2) i_ran (milliamp/cm2) } BREAKPOINT { SOLVE ran i = i_ran } PROCEDURE ran() { i_ran = normrand(mean, stdev) } neuron-7.5/share/examples/nrniv/nmodl/standard.inc000077500000000000000000000002771323325274500223720ustar00rootroot00000000000000 UNITS { (molar) = (/liter) (mA) = (milliamp) (mV) = (millivolt) (mM) = (millimolar) FARADAY = (faraday) (coulomb) R = (k-mole) (joule/degC) } INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)} neuron-7.5/share/examples/nrniv/nmodl/stim1.hoc000077500000000000000000000010431323325274500216170ustar00rootroot00000000000000// Physical properties create a access a nseg=1 // graphical interface appearance objref s[2] for i=0,1 s[i] = new stim1() {insert pas e_pas=0 g_pas=.001 diam=10 L=10} s[0].loc(.5) s[0].del=1 s[0].dur=1 s[0].amp=.01 s[1].loc(.5) s[1].del=1 s[1].dur=.2 s[1].amp=.02 objref g g = new Graph() // simulation control proc pcur() { for (t=0; t<3; t=t+.1) { fcurrent() print t, s[0].i } } proc prun() { t=0 v=0 g.size(0,3,0,2.5) g.beginline() while (t < 3) { g.line(t,v) fadvance() } g.flush() } // run simulation pcur() prun() neuron-7.5/share/examples/nrniv/nmodl/stim1.mod000077500000000000000000000014521323325274500216310ustar00rootroot00000000000000:this model is built-in to neuron with suffix stim COMMENT Note: $NEURONHOME/nrnoc/SRC/stim.mod shows the correct current stimulus model. The model here does not work correctly if the "extracellular" mechanism is also inserted at the same location because the NONSPECIFIC_CURRENT is treated as a transmembrane current. For electrodes, there is a special ELECTRODE_CURRENT directive in the NEURON block that should be used. Also a positive ELECTRODE_CURRENT is equivalent to an inward membrane current so the assignment to i has a different sign. ENDCOMMENT NEURON { POINT_PROCESS stim1 RANGE del, dur, amp, i NONSPECIFIC_CURRENT i } UNITS { (nA) = (nanoamp) } PARAMETER { del (ms) dur (ms) amp (nA) } ASSIGNED { i (nA) } BREAKPOINT { if (t < del + dur && t > del) { i = -amp }else{ i = 0 } } neuron-7.5/share/examples/nrniv/nmodl/str.mod000077500000000000000000000005541323325274500214060ustar00rootroot00000000000000NEURON{ SUFFIX nothing} : in hoc, call with strpass(strdefout,stringin) VERBATIM extern char *gargstr(), **hoc_pgargstr(); ENDVERBATIM PROCEDURE strpass() { VERBATIM { char *in; char **out; in = gargstr(2); out = hoc_pgargstr(1); hoc_assign_str(out, in); } ENDVERBATIM } COMMENT //test with strdef a a = "hello" strpass(a, "goodbye") print a ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/syn1.hoc000077500000000000000000000016251323325274500214620ustar00rootroot00000000000000// Physical properties create a access a nseg=1 // graphical interface appearance objref s s = new syn1(.5) {insert pas e_pas=-65 g_pas=.001 L=10 diam=10} {s.onset=1 s.tau=.5 s.gmax=.01 s.e=0 } objref g g = new Graph() // simulation control proc pcond() { g.size(0,5,0,s.gmax) g.beginline() for (t=0; t<5; t=t+.1) { fcurrent() g.line(t,s.g) } } proc pcur() { g.size(0,5,-1,0) g.beginline() v=-65 for (t=0; t<5; t=t+.1) { fcurrent() g.line(t,s.i) } } proc prun() { t=0 v=-65 g.size(0,5,-70,0) g.beginline() while (t < 5) { g.line(t,v) fadvance() } g.flush() } proc comparerun() {local savg /* compare built-in synapse with fsyn.mod */ prun() savg=s.gmax fsyn(1) fsyn(0,.5,s.onset, s.tau, s.gmax, s.e) s.gmax=0 t=0 v=-65 g.color(2) g.beginline() while (t < 5) { g.line(t,v) fadvance() } g.flush() g.color(1) s.gmax=savg fsyn(0) } // run simulation comparerun() neuron-7.5/share/examples/nrniv/nmodl/syn1.mod000077500000000000000000000015171323325274500214700ustar00rootroot00000000000000: this model is built-in to neuron with suffix syn COMMENT an synaptic current with alpha function conductance defined by i = g * (v - e) i(nanoamps), g(micromhos); where g = 0 for t < onset and g = gmax * (t - onset)/tau * exp(-(t - onset - tau)/tau) for t > onset this has the property that the maximum value is gmax and occurs at t = delay + tau. ENDCOMMENT NEURON { POINT_PROCESS syn1 RANGE onset, tau, gmax, e, i NONSPECIFIC_CURRENT i } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (umho) = (micromho) } PARAMETER { onset=0 (ms) tau=.1 (ms) gmax=0 (umho) e=0 (mV) v (mV) } ASSIGNED { i (nA) g (umho)} BREAKPOINT { g = gmax * alpha( (t - onset)/tau ) i = g*(v - e) } FUNCTION alpha(x) { if (x < 0 || x > 10) { alpha = 0 }else{ alpha = x * exp(1 - x) } } neuron-7.5/share/examples/nrniv/nmodl/synpre.hoc000077500000000000000000000026021323325274500221040ustar00rootroot00000000000000/*Two unconnected sections. Section a stimulated by depolarizing left end as initial condition. PAP moves right to presynaptic terminal at right end. The synapse is located at the middle of section b. Plotting voltage for sections a and b, presynaptic voltage, postsynaptic current and voltage */ // Physical properties create a, b access a forall {nseg=40 L=5000 diam=10 insert hh } // run parameters tstop=10 // graphical interface appearance objref g g = new Graph() objref s b s = new synp(.5) setpointer s.vpre, a.v(1) deadtime_synp = 3 {s.tau=.2 s.gmax=.4 s.e=0 s.vprethresh=0 } // simulation control proc init() { finitialize(-65) } objref g1 proc run() { init() a.v(0:.1)= -20:20 /*stimulus*/ g1.begin while (t < 10) { g.erase a pl(0) /*snapshot of section voltage at instant of time*/ b pl(1) padvance(.4) doNotify() } g1.flush() } proc padvance() { local ts /* simulate for $1 msecs */ ts = t + $1 while (t < ts) { g1.plot(t) fadvance() } } proc gr() { g1 = new Graph() g1.size(0,10,-80,60) g1.addexpr("b.v(.5)",3,1) g1.addexpr("s.vpre",2,1) g1.addexpr("s.i",4,1) } gr() /* plots of variables vs time ; sets up plot panels*/ proc pl() { if ($1 == 0) { g.color(2) }else{ g.color(3) } g.size(0,a.L,-80,60) g.beginline() for (x) { g.line(x*L, v(x)) } g.flush() g.color(1) } // run simulation run() xpanel("run") xbutton("run", "run()") xpanel() neuron-7.5/share/examples/nrniv/nmodl/synpre.mod000077500000000000000000000034301323325274500221120ustar00rootroot00000000000000COMMENT A synaptic current with alpha function conductance defined by i = g * (v - e) i(nanoamps), g(micromhos); where g = 0 for t < onset and g = gmax * (t - onset)/tau * exp(-(t - onset - tau)/tau) for t > onset this has the property that the maximum value is gmax and occurs at t = onset + tau. The synaptic onset time has been modified to occur when the presynaptic voltage, vpre, rises above threshold, vprethresh. Another event is not allowed to occur for, deadtime, milliseconds after vpre rises above threshold. The user specifies the presynaptic location in hoc via the statement connect vpre_syn[i] = v.section(x) where x is the arc length (0 - 1) along the presynaptic section (the currently specified section), and i is the synapse number (Which is located at the postsynaptic location in the usual way via postsynaptic_section {loc_syn(i, x)} Notice that loc_syn() must be executed first since that function also allocates space for the synapse. ENDCOMMENT NEURON { POINT_PROCESS synp POINTER vpre RANGE onset, tau, gmax, e, i, vprethresh NONSPECIFIC_CURRENT i } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (umho) = (micromho) } PARAMETER { tau=.1 (ms) gmax=0 (umho) e=0 (mV) v (mV) vprethresh (mV) onset (ms) : initialize to < -deadtime } PARAMETER { deadtime =1 (ms) } ASSIGNED { i (nA) g (umho) vpre (mV) } INITIAL { onset = -1e10 } BREAKPOINT { SOLVE getonset g = gmax * alpha( (t - onset)/tau ) i = g*(v - e) } FUNCTION alpha(x) { if (x < 0 || x > 10) { alpha = 0 }else{ alpha = x * exp(1 - x) } } PROCEDURE getonset() { :will crash if user hasn't set vpre with the connect statement */ if (vpre > vprethresh && t > onset + deadtime) { onset = t } VERBATIM return 0; ENDVERBATIM } neuron-7.5/share/examples/nrniv/nmodl/trivial.mod000077500000000000000000000026271323325274500222530ustar00rootroot00000000000000NEURON{ SUFFIX nothing} COMMENT This is the most trivial mechanism possible. It will translate into boilerplate C code with empty structures and mechanism calls. In principle one can use this code by adding your own code to fill in the structures and write functions to communicate with the NEURON user level. The first statement used to be required by the model language definition. In a NEURON context it doesn't do anything but MODL requires it in order to specify the plot range for the independent variable and the number of points to plot. One can leave it out if the model will only be used with neuron (linking with nrnocmodl or nrnivmodl) and will not be used as a standalone model linked only with the interpreter (ocmodl, ivmodl). The second statement turns off automatic suffixes which are normally added to every variable and function name at the user lever of NEURON. Without it all variables and functions declared in the model (except special variables known to NEURON such as v, celsius, dt, etc.) would get the suffix, _trivial, from the base name of the file. By the way, this model generates an empty mechanism called "trivial" which can be "insert"ed into a section. The reason, trivial mechanisms like this can be useful is to write functions callable from NEURON which have nothing to do with membrane mechanisms per se. For example, one can link in a fast fourier transform function. ENDCOMMENT neuron-7.5/share/examples/nrniv/nmodl/tstdarray.mod000077500000000000000000000001731323325274500226100ustar00rootroot00000000000000NEURON{ SUFFIX nothing POINTER y } ASSIGNED {y[1]} PROCEDURE set(i, x) { y[i] = x } FUNCTION get(i) { get = y[i] } neuron-7.5/share/examples/nrniv/nmodl/tstextrn.hoc000077500000000000000000000001731323325274500224600ustar00rootroot00000000000000cr_tstextrn() clamp_resist=100 cr_tstextrn() rates_hh(-65) minf_hh minf_tstextrn() rates_hh(-0) minf_hh minf_tstextrn() neuron-7.5/share/examples/nrniv/nmodl/tstextrn.mod000077500000000000000000000006041323325274500224650ustar00rootroot00000000000000: a test of the new EXTERNAL keyword and its usage. :Note Ra is built-in to NEURON through the init.c file : minf_hh is GLOBAL via the built in hh.mod file. : it was declared GLOBAL minf and the SUFFIX was hh NEURON { EXTERNAL clamp_resist, minf_hh } ASSIGNED { clamp_resist (megohm) minf_hh } FUNCTION cr() (megohm) { cr = clamp_resist } FUNCTION minf() { minf = minf_hh } neuron-7.5/share/examples/nrniv/nmodl/tstpnt1.hoc000077500000000000000000000004631323325274500222040ustar00rootroot00000000000000/* How to use a POINTER in a POINT_PROCESS mechanism */ create a access a nseg=1 double d[10] for i=0,9 d[i]=i+100 objectvar tp[10] for i=0,9 tp[i] = new t1(.5) v = 10 tp[2].f1() setpointer tp[0].p1, v(.5) for i=1,9 setpointer tp[i].p1, d[i] for i=0,9 print i, tp[i].p1 for i=0,9 { print i, tp[i].f1()} neuron-7.5/share/examples/nrniv/nmodl/tstpnt1.mod000077500000000000000000000003341323325274500222070ustar00rootroot00000000000000: Demo of POINTER in a POINT_PROCESS NEURON { POINT_PROCESS t1 POINTER p1, p2 } ASSIGNED { p1 p2 } FUNCTION f1() { if (nrn_pointing(p1)) { f1 = p1 }else{ f1 = 0 printf("p1 does not point anywhere\n") } } neuron-7.5/share/examples/nrniv/nmodl/tstpnt2.hoc000077500000000000000000000007321323325274500222040ustar00rootroot00000000000000/* how to use a POINTER in a Continuous mechanism */ create a,b forall { nseg=10 insert t2} a.r_t2(0:1) = 10:19 b.r_t2(0:1) = 40:49 a for(x) if (x!=0 && x!=1) setpointer p_t2(x), b.r_t2(x) b for(x) if (x!=0 && x!=1) setpointer p_t2(x), a.r_t2(x) strdef sname proc pr() { sectionname(sname) for (x) if (x!=0 && x != 1) { printf("%s x=%g r=%g p=%g", sname, x, r_t2(x), p_t2(x)) setdata_t2(x) printf(" f()=%g\n", f_t2()) } printf("\n") } a pr() b pr() neuron-7.5/share/examples/nrniv/nmodl/tstpnt2.mod000077500000000000000000000002111323325274500222020ustar00rootroot00000000000000:Demo of POINTER in Continuous mechanism NEURON { SUFFIX t2 POINTER p RANGE r } ASSIGNED { r p } FUNCTION f() { f = r*100 + p } neuron-7.5/share/examples/nrniv/nmodl/tstvec.hoc000077500000000000000000000002261323325274500220740ustar00rootroot00000000000000install_vector_methods() objref v1, v2 v1 = new Vector(5, .1) v2 = new Vector(7, .2) v1.extra(v2) v2.extra(v1) objref v2 execute1("v1.extra(v2)") neuron-7.5/share/examples/nrniv/nmodl/tstvec.mod000077500000000000000000000010671323325274500221060ustar00rootroot00000000000000: adding methods to the Vector class from NMODl NEURON { SUFFIX nothing } VERBATIM static double extra(void* vv) { /* v is a reserved word in nmodl */ int i, nx, ny; double* x, *y; /* how to get the instance data */ nx = vector_instance_px(vv, &x); /* how to get a Vector argument */ ny = vector_arg_px(1, &y); for (i=0; i < nx && i < ny; ++i) { printf("%d %g %g\n", i, x[i], y[i]); } return i; } ENDVERBATIM PROCEDURE install_vector_methods() { VERBATIM /* the list of additional methods */ install_vector_method("extra", extra); ENDVERBATIM } neuron-7.5/share/examples/nrniv/nmodl/vclmp1.mod000077500000000000000000000100031323325274500217660ustar00rootroot00000000000000:this model is built-in to neuron with suffix vc1 COMMENT Voltage clamp with three levels. Clamp is on at time 0, and off at time dur[0]+dur[1]+dur[2]. When clamp is off the injected current is 0. Do not insert several instances of this model at the same location in order to make level changes. That is equivalent to independent clamps and they will have incompatible internal state values. The control amplifier has the indicated gain and time constant. The input amplifier is ideal. tau2 gain +-|\____rstim____>to cell -amp --'\/`-------|/ | |----||--- |___ __|-----/|___from cell `'`' \| tau1 The clamp has a three states which are the voltage input of the gain amplifier, the voltage output of the gain amplfier, and the voltage output of the measuring amplifier. A good initial condition for these voltages are 0, 0, and v respectively. This model is quite stiff. For this reason the current is updated within the solve block before updating the state of the clamp. This gives the correct value of the current on exit from fadvance(). If we didn't do this and instead used the values computed in the breakpoint block, it would look like the clamp current is much larger than it actually is since it doesn't take into account the change in voltage within the timestep, ie equivalent to an almost infinite capacitance. Also, because of stiffness, do not use this model except with secondorder=0. This model makes use of implementation details of how models are interfaced to neuron. At some point I will make the translation such that these kinds of models can be handled straightforwardly. Note: The model in this file does not work when "extracellular" is inserted at the same location. For that case see $NEURONHOME/src/nrnoc/vclmp.mod which does work in this circumstance. ie that model makes use of the ELECTRODE_CURRENT directive in the NEURON block which defines v to be the internal potential (ie v + vext) and does not treat the current as a transmembrane current. ENDCOMMENT DEFINE NSTEP 3 NEURON { POINT_PROCESS vc1 NONSPECIFIC_CURRENT I RANGE e0,vo0,vi0,dur,amp,gain,rstim,tau1,tau2,fac,I } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (micromho) } PARAMETER { v (mV) dt (ms) gain = 1e5 rstim = 1 (megohm) tau1 = .001 (ms) tau2 = 0 (ms) e0 (mV) vo0 (mV) vi0(mV) fac=0 } ASSIGNED { I (nA) dur[NSTEP] (ms) amp[NSTEP] (mV) stim (mV) tc (ms) } STATE { e (mV) vo (mV) vi (mV) } INITIAL { e0 = 0 vo = v vo0 = v vi = v vi0 = v e = 0 } BREAKPOINT { SOLVE update vstim() I = icur() } PROCEDURE vstim() { : can't be called from update since vinput must : remain constant throughout dt interval and : update is called at t+dt tc = 0 (ms) FROM i=0 TO NSTEP-1 { stim = amp[i] tc = tc + dur[i] if (t < tc) { tc = tc + 100 : clamp is definitely not off VERBATIM break; ENDVERBATIM } } } FUNCTION icur()(nA) { : since this function uses range variables, it : should not be called from hoc. If you want to : know the current, look in I_vc[number] LOCAL vout if (t > tc) { e0 = 0 vo0 = 0 icur = 0 }else{ SOLVE clamp icur = -(vo - v)/rstim } } LINEAR clamp { LOCAL t1, t2 t1 = tau1/dt t2 = tau2/dt ~ vi = v + fac*vo - fac*v ~ t2*vo - t2*vo0 + vo = -gain * e ~ -stim - e + vi - e + t1*vi - t1*e - t1*(vi0 - e0) = 0 } PROCEDURE update() { I = icur() e0 = e vo0 = vo vi0 = vi VERBATIM return 0; ENDVERBATIM } COMMENT This implementation is not very high level since the clamp uses a state which must be computed at the same time as the membrane potential and doesn't fit into the paradigm normally used for channel states. The state, vinput0, at t is integrated from its old value saved in vinput. The value of vinput (as well as the initial values of v and the output of the control amplifier) is updated when the SOLVE is executed. Notice that the icur function is very stiff with respect to v. For this reason I is only good for the user after the SOLVE is executed. ENDCOMMENT neuron-7.5/share/examples/nrniv/nrnoc/000077500000000000000000000000001323325274500200745ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/nrnoc/Makefile.am000077500000000000000000000011141323325274500221300ustar00rootroot00000000000000thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv/nrnoc # change to this_DATA if installation desired thisdata = \ ancab.hoc \ batch.hoc \ clamp.hoc \ craytest.hoc \ diamtst.hoc \ distance.hoc \ extcab1.hoc \ extcab11.hoc \ extcab2.hoc \ extcab4.hoc \ extcab41.hoc \ extvc.hoc \ fit1.hoc \ hhmemb.hoc \ hhpap.hoc \ hhrate.hoc \ implic.hoc \ motor.hoc \ pascab1.hoc \ pascab2.hoc \ pascab3.hoc \ pascab4.hoc \ pascab5.hoc \ pascab6.hoc \ ppatch.hoc \ recon.hoc \ secrefte.hoc \ soma.hoc \ syn1.hoc \ test1.hoc \ test2.hoc \ test3.hoc \ test4.hoc \ test6.hoc EXTRA_DIST = $(thisdata) neuron-7.5/share/examples/nrniv/nrnoc/Makefile.in000066400000000000000000000403451323325274500221470ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/nrnoc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ thisdir = $(prefix)/share/@PACKAGE@/examples/nrniv/nrnoc # change to this_DATA if installation desired thisdata = \ ancab.hoc \ batch.hoc \ clamp.hoc \ craytest.hoc \ diamtst.hoc \ distance.hoc \ extcab1.hoc \ extcab11.hoc \ extcab2.hoc \ extcab4.hoc \ extcab41.hoc \ extvc.hoc \ fit1.hoc \ hhmemb.hoc \ hhpap.hoc \ hhrate.hoc \ implic.hoc \ motor.hoc \ pascab1.hoc \ pascab2.hoc \ pascab3.hoc \ pascab4.hoc \ pascab5.hoc \ pascab6.hoc \ ppatch.hoc \ recon.hoc \ secrefte.hoc \ soma.hoc \ syn1.hoc \ test1.hoc \ test2.hoc \ test3.hoc \ test4.hoc \ test6.hoc EXTRA_DIST = $(thisdata) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/nrnoc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/nrnoc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/nrnoc/ancab.hoc000077500000000000000000000012101323325274500216300ustar00rootroot00000000000000objref g g = new Graph() func ancab() { local X, T, coef, temp1, temp2 /* equation 3.24 of Jack, Noble, Tsien */ /* analytical v of infinite cable due to current injection */ /* args are X, T , ra*I*lambda*/ X=$1 T=$2 coef=$3 if (T <= 0 || X < 0) return 0 temp1 = sqrt(T) temp2 = X/(2*temp1) return coef/4*(exp(-X)*erfc(temp2 - temp1) - exp(X)*erfc(temp2 + temp1)) } proc pancab() {local x /* Figure 3.4 */ g.size(0,3,0,1) for (x=0; x<2.1; x=x+.5) { g.beginline() for (t=0; t < 3-1e-9; t=t+dt) { g.line(t, ancab(x, t, 2)) } strdef s g.fixed(1) sprint(s, "X=%g", x) g.label(t,ancab(x,t,2),s) } g.flush() } pancab() neuron-7.5/share/examples/nrniv/nrnoc/batch.hoc000077500000000000000000000006321323325274500216540ustar00rootroot00000000000000/* HH propagated action potential */ create a access a {nseg=25 diam=250 L=40000 insert hh} proc init() { finitialize(-65) } objectvar stim tstop=5 proc run() {local x init() stim = new IClamp(0) stim.dur = tstim stim.amp = strength batch_save() for (x=.1; x < .99; x=x+.2) { batch_save(&v(x)) } batch_save(&m_hh(.5)) batch_run(tstop, 2*dt, "temp.batch") } strength = 10000 /*namps*/ tstim = .1 neuron-7.5/share/examples/nrniv/nrnoc/clamp.hoc000077500000000000000000000013651323325274500216730ustar00rootroot00000000000000/* HH membrane clamp and release */ // physical properties of the cell create a access a {nseg=1 diam=1 L=1 insert hh} // experimental tools objref clmp clmp = new VClamp(.5) // run parameters tstop=5 strength = -20 /*namps*/ dur=2 // graphical interface appearance objref g g = new Graph() g.size(0,tstop,-80,60) strdef s proc label() { g.label(0,.5,"mV") g.label(.4, .15, "t (ms)") sprint(s, "HH membrane clamped at %g mV for %g ms",strength,dur) g.label(.08,.01,s) } label() // simulation control proc init() { finitialize(-65) g.begin() } proc step() { g.line(t,v) fadvance() } proc run() { init() clmp.gain = 1e7 clmp.tau1 = 0 clmp.dur[0] = dur clmp.amp[0] = strength while(t 0) g.line(x, ri(x)/(L/nseg)) a=0 for(x) a=a+area(x) print "total area = ", a r=0 for(x) if(x!=0) r=r+ri(x) print "resist 0-1 = ", r g.flush() } proc newdiam2() {local x, d pt3dclear() ndiam = 20 for i=0,ndiam-1 { x = (i/(ndiam-1))^2 d = 1 + 5*sin(PI*x/2) pt3dadd(1, 10*x, 2, d) } for i=0,ndiam-1 print i, y3d(i), diam3d(i) } proc newdiam3() {local x, d pt3dclear() ndiam = 20 for i=0,ndiam-1 { x = i/(ndiam-1) if (i%2) d=2 else d=1 pt3dadd(1,2, 10*x, d) } for i=0,ndiam-1 print i, z3d(i), diam3d(i) } proc newdiam4() {local x, d, dx /* if the area plot has spikes on it, it is because the segments that overlap the change in diameter have additional area due to the diameter change itself which is taken into account in the implementation of diam_from_list() in c.treeset at the lines dealing with taking taper into account. One can remove this option the by changing the #if at the indicated location */ pt3dclear() ndiam = 10 dx=1 x=0 for i=0,ndiam-1 { pt3dadd(1,2, x, 1) pt3dadd(1,2, x=x+1, 1 ) pt3dadd(1,2, x=x+.001, 2) pt3dadd(1,2, x=x+1,2) x=x+.001 } for i=0,n3d()-1 print i, z3d(i), diam3d(i) } proc newdiam5() {local x, d ndiam = 3 pt3dclear() pt3dadd(0,0,0,01) pt3dadd(.48,0,0, 10) pt3dadd(1,0,0,10) for i=0,ndiam-1 print i, x3d(i), diam3d(i) } newdiam1() tst(5) neuron-7.5/share/examples/nrniv/nrnoc/distance.hoc000077500000000000000000000005271323325274500223700ustar00rootroot00000000000000strdef s proc d() { sectionname(s) print s, distance(0), distance(.5),distance(1) } create a, b proc run() { forall nseg=11 topology() a distance() a d() b d() print "" } run() create a, b connect a(0), b(0) run() create a, b connect a(1), b(0) run() create a, b connect a(0), b(1) run() create a, b connect a(1), b(1) run() neuron-7.5/share/examples/nrniv/nrnoc/extcab1.hoc000077500000000000000000000013151323325274500221210ustar00rootroot00000000000000/* test of extracellular using 1 segment and current stimulus */ /* time constant .5 msec, initial jump 1mV steady state 2mv */ // physical properties of the cell create a {access a nseg=1 L=10 diam=10 insert pas g_pas=1 cm=.5e3*g_pas e_pas=0 } {insert extracellular xraxial=1e9 xg=1 xc=0} // graphical interface appearance objref g g = new Graph() g.size(0,2,0,5) g.addexpr("vext(.5)") /*{cm=0 g=1e9 xraxial=1e9 xc=.5e3} /* test of xc scale. note xc/xg=.5msec*/ tstop=2 // simulation control proc run() { v = 0 vext=0 t=0 g.begin() g.beginline() fstim(1) fstim(0,.5,0,1,1*(PI*diam*L/100)) while (t < tstop) { g.line(t, v(.5) + vext(.5)) g.plot(t) fadvance() } g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nrnoc/extcab11.hoc000077500000000000000000000014131323325274500222010ustar00rootroot00000000000000/* test of extracellular using 1 segment and current stimulus */ /* time constant .5 msec, initial jump 1mV steady state 2mv */ // physical properties of the cell create a {access a nseg=1 L=10 diam=10 insert pas g_pas=1 cm=.5e3*g_pas e_pas=0 } {insert extracellular xraxial=1e9 xg=1 xc=0} // experimental tools objref stim stim = new IClamp(.5) // run parameters tstop=2 stim.dur = 1 stim.amp = PI*diam*L/100 // graphical interface appearance objref g g = new Graph() g.size(0,2,0,5) /*{cm=0 g=1e9 xraxial=1e9 xc=.5e3} /* test of xc scale. note xc/xg=.5msec*/ // simulation control proc run() { v = 0 vext=0 t = 0 g.beginline() g.addexpr("vext(.5)") while (t < tstop) { g.line(t, v(.5) + vext(.5)) g.plot(t) fadvance() } g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nrnoc/extcab2.hoc000077500000000000000000000036041323325274500221250ustar00rootroot00000000000000/* test of extracellular cable such that extracellular replaces intracellular */ /* hoc.pascab1 -- steady state infinite passive cable. Test of cable using units of lambda and tau. Compare steady state analytic solution, voltage clamp, and current injection. */ /* lambda = sqrt(1e4/4 * diam / (Ra * gl)) microns */ /* tau = 1e-3 * cm / gl msec */ // physical properties of the cell create a {access a nseg = 20 } // graphical interface appearance length = 8 objref g g = new Graph() g.size(0,length,0,1) g.color(0) g.color(1) proc labelaxis() { g.vfixed g.label(.3,.01, "x (Lambda)") g.label(0, .5, "V") g.label(0,.95,"Steady state voltage as function of distance for infinite cable") g.label(" Compare current injection, voltage clamp, and analytic sol'n.") } labelaxis() // simulation control proc geometry() { local i L = length diam = 1 Ra = 1e7/4 } proc membrane() { local i, temp insert pas g_pas = .001 e_pas = 0 insert extracellular xg=.001 xgaxial=(PI*diam^2/4)/Ra * nseg/length * 100 xraxial= Ra/(PI*diam^2/4 *1e-8)*1e-6 temp = xgaxial/(PI*diam*length/nseg/2*1e-2) g_pas=1e-9 g_pas(.001)=temp Ra=1 xc=1000 cm=0 } proc analytic() {local x,y,z g.beginline() z = exp(length) + exp(-length) for (x=0; x<=length; x=x+.1) { y = (exp(length - x) + exp(x - length))/z g.line(x,y) } g.flush() } proc plotvolt() { local x, i g.beginline() for (x) { g.line(x*length, v(x)) } g.flush() } proc run() { geometry() membrane() v = 0 t = 0 dt = 1e9 g.color(1) g.vfixed(1) g.label(.5,.8,"Analytic") analytic() g.color(2) g.label("voltage clamp") fstim(0) fclamp(1,0) fclamp(0,1e9, 1) fadvance() g.beginline() for (x) g.line((x)*length, vext(x)) g.flush() fclamp(0,0) g.color(3) g.label("Current injection") fstim(1) fstim(0, 0, 0, 1e20, PI*1e-5) fadvance() g.beginline() for (x) g.line((x)*length, vext(x)) g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nrnoc/extcab4.hoc000077500000000000000000000040331323325274500221240ustar00rootroot00000000000000/* test of extracellular cable such that extracellular replaces intracellular */ /* hoc.pascab1 -- steady state infinite passive cable. Test of cable using units of lambda and tau. Compare steady state analytic solution, voltage clamp, and current injection. */ /* lambda = sqrt(1e4/4 * diam / (Ra * gl)) microns */ /* tau = 1e-3 * cm / gl msec */ // physical properties of the cell create a,b a connect b(0), 1 access a forall {nseg = 10 insert pas insert extracellular} // graphical interface appearance length = 2 objref g g = new Graph() g.size(0,length,0,1) g.color(0) g.color(1) proc label() { g.vfixed g.label(.315,.01, "x (Lambda)") g.label(0, .5, "V") g.label(0,.95,"Steady state voltage as function of distance for infinite cable") g.label("Compare current injection, voltage clamp, and analytic sol'n.") } label() // simulation control proc geometry() { local i L = length/2 diam = 1 } proc membrane() { local i, temp g_pas = .001 e_pas = 0 xg=.001 xgaxial=(PI*diam^2/4)/Ra * nseg/(length/2) * 100 /* since conductance to parent */ /*b xgaxial(.001) = xgaxial*2*/ xraxial=Ra/(PI*diam^2/4)*100 temp = xgaxial/(PI*diam*length/2/nseg/2*1e-2) g_pas=1e-9 g_pas(.001)=temp b g_pas=1.e-9 xc=1 cm=0 } proc analytic() {local x,y,z g.beginline() z = exp(length) + exp(-length) for (x=0; x<=length; x=x+.1) { y = (exp(length - x) + exp(x - length))/z g.line(x,y) } } proc plotvolt() { local x, i g.beginline() a for (x) { g.line(x*length/2, vext(x)) } b for (x) { g.line((1+x)*length/2, vext(x)) } g.flush() } proc run() { forall Ra = 1e7/4 forall {geometry() membrane()} forall Ra=1 forall v = 0 t = 0 dt = 1e9 g.color(1) g.vfixed(1) g.label(.5,.8,"Analytic") analytic() g.color(2) g.label("voltage clamp") fstim(0) fclamp(1,0) fclamp(0,1e9, 1) fadvance() g.beginline() plot(1) plotvolt() print v+vext, "\n" fclamp(0,0) g.color(3) g.label("Current injection") fstim(1) fstim(0, 0, 0, 1e20, PI*1e-5) fadvance() g.beginline() plot(1) plotvolt() g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nrnoc/extcab41.hoc000077500000000000000000000040461323325274500222110ustar00rootroot00000000000000/* test of extracellular cable such that extracellular replaces intracellular */ /* hoc.pascab1 -- steady state infinite passive cable. Test of cable using units of lambda and tau. Compare steady state analytic solution, voltage clamp, and current injection. */ /* lambda = sqrt(1e4/4 * diam / (Ra * gl)) microns */ /* tau = 1e-3 * cm / gl msec */ // physical properties of the cell create a,b a connect b(0), 1 access a forall {nseg = 10 insert pas insert extracellular} // experimental tools objref e e = new VClamp(0) // graphical interface appearance length = 2 objref g g = new Graph() g.size(0,length,0,1) g.color(0) g.color(1) proc label() { g.vfixed g.label(.315,.01, "x (Lambda)") g.label(0, .5, "V") g.label(0,.95,"Steady state voltage as function of distance for infinite cable") g.label(" Compare current injection, voltage clamp, and analytic sol'n.") } label() // simulation control proc geometry() { local i L = length/2 diam = 1 } proc membrane() { local i, temp g_pas = .001 e_pas = 0 xg=.001 xgaxial=(PI*diam^2/4)/Ra * nseg/(length/2) * 100 /* since conductance to parent */ /*b xgaxial(.001) = xgaxial*2*/ xraxial=Ra/(PI*diam^2/4)*100 temp = xgaxial/(PI*diam*length/2/nseg/2*1e-2) g_pas=1e-9 g_pas(.001)=temp b g_pas=1.e-9 xc=1 cm=0 } proc analytic() {local x,y,z g.beginline() z = exp(length) + exp(-length) for (x=0; x<=length; x=x+.1) { y = (exp(length - x) + exp(x - length))/z g.line(x,y) } g.flush() } proc plotvolt() { local x, i g.beginline() a for (x) { g.line(x*length/2, vext(x)) } b for (x) { g.line((1+x)*length/2, vext(x)) } g.flush() } proc run() { forall Ra = 1e7/4 forall {geometry() membrane()} forall Ra=1 forall v = 0 t = 0 dt = 1e9 g.color(1) g.vfixed(1) g.label(.5,.8,"Analytic") analytic() g.color(2) g.label("voltage clamp") e.dur[0]=1e9 e.amp[0]=1 fadvance() plot(1) plotvolt() print v+vext, "\n" g.color(3) g.label("Current injection") e = new IClamp(0) e.dur=1e20 e.amp=PI*1e-5 fadvance() plot(1) plotvolt() g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nrnoc/extvc.hoc000077500000000000000000000011131323325274500217170ustar00rootroot00000000000000// voltage clamp with extracellular series resistance // physical properties of the cell create a access a {insert extracellular xg = .001} // experimental tools objref vc vc = new VClamp(.5) // run parameters tstop = 3 // graphical interface appearance objref g g = new Graph() g.size(0,tstop,0,100) g.color(1) g.addexpr("v") g.color(2) g.addexpr("v + vext") g.color(3) g.addexpr("vc.i") // simulation control vc.amp[0] = 50 vc.dur[0] = 1e9 proc run() { finitialize(0) g.begin() while (t < tstop) { g.plot(t) fadvance() } g.flush() } // run simulation run() neuron-7.5/share/examples/nrniv/nrnoc/fit1.hoc000077500000000000000000000005351323325274500214400ustar00rootroot00000000000000double x[2] attr_praxis(1e-5, 1, 1) func f() {local t1, t2, t3 return ($1-1)^2 + 2*($2 - 2)^4 } fit_praxis(2, "f", &x[0]) double a[2] { printf( "f(%g,%g)=%g\n", x[0], x[1], f(x[0],x[1])) for i=0,1 { pval = pval_praxis(i, &a) printf("i=%d principal value = %g ", i, pval) printf("axis = (%g, %g)", a[0], a[1]) printf("\n") } } neuron-7.5/share/examples/nrniv/nrnoc/hhmemb.hoc000077500000000000000000000014431323325274500220340ustar00rootroot00000000000000/* HH membrane action potential */ // physical properties of the cell create a access a {nseg=1 diam=1 L=1 insert hh} // experimental tools objref stim, c stim = new IClamp(0) c = new APCount(.5) // run parameters tstop=5 strength = .005 /*namps*/ tstim = .1 // graphical interface appearance objref g g = new Graph() g.size(0,tstop,-70,50) g.addexpr("v",1,1) g.addexpr("ina*80",2,1) proc label() { g.color(1) g.vfixed(1) g.label(0, .5, "mV") g.label(.4, .15, "t (ms)") g.label(.1, .01, "HH membrane action potential") } label() // simulation control proc init() { finitialize(-65) g.begin() } proc step() { g.plot(t) fadvance() } proc run() { stim.dur = tstim stim.amp = $1 init() while(t < tstop) { step() } g.flush() print "apcount = ",c.n } // run simulation {run(strength)}neuron-7.5/share/examples/nrniv/nrnoc/hhpap.hoc000077500000000000000000000014441323325274500216750ustar00rootroot00000000000000/* HH propagated action potential */ // physical properties of the cell create a access a {nseg=25 diam=250 L=40000 insert hh} // experimental tools objref stim stim = new IClamp(0) // run parameters tstop=5 strength = 10000 /*namps*/ tstim = .1 // graphical interface appearance objref g g = new Graph() g.size(0,tstop,-80,40) strdef s g.label(2,0.,"") for (x=.1; x < .99; x=x+.1) { sprint(s, "v(%g)", x) g.addexpr(s) } proc label() { g.vfixed(1) g.label(0, .5, "mV") g.label(.43, .07, "t (ms)") g.label(.23, .01, "HH propagated action potential") } label() // simulation control proc init() { finitialize(-65) g.begin() } proc step() { g.plot(t) fadvance() } proc run() { init() stim.dur = tstim stim.amp = strength while(t&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/randomsyn ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/randomsyn/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/randomsyn/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/soma/000077500000000000000000000000001323325274500177145ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/soma/Makefile.am000077500000000000000000000000001323325274500217410ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/soma/Makefile.in000066400000000000000000000372311323325274500217670ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/soma ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/soma/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/soma/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/vrecorder/000077500000000000000000000000001323325274500207505ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/vrecorder/Makefile.am000077500000000000000000000000001323325274500227750ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/vrecorder/Makefile.in000066400000000000000000000372501323325274500230240ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/vrecorder ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/vrecorder/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/vrecorder/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/examples/nrniv/xmech/000077500000000000000000000000001323325274500200615ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/xmech/Makefile.am000077500000000000000000000000001323325274500221060ustar00rootroot00000000000000neuron-7.5/share/examples/nrniv/xmech/Makefile.in000066400000000000000000000372341323325274500221370ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/examples/nrniv/xmech ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/examples/nrniv/xmech/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/examples/nrniv/xmech/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/000077500000000000000000000000001323325274500145515ustar00rootroot00000000000000neuron-7.5/share/lib/Makefile.am000077500000000000000000000012251323325274500166100ustar00rootroot00000000000000## This Makefile.am installs stuff in $NEURONHOME/lib. This is now a ## subdirectory of $(prefix)/share, but it used to all be in $(prefix)/lib. ## Now $(prefix)/lib is reserved for architecture-dependent files. ## Files that need to be installed from this directory. neuronhomedir = $(prefix)/share/@PACKAGE@/lib data_and_dist = helpdict nrnunits.lib \ prologue.id shape.cm1 shape.cm2 neuronhome_DATA = $(data_and_dist) nrn.defaults neuronhome_SCRIPTS = cleanup hocload.sh EXTRA_DIST = $(data_and_dist) $(neuronhome_SCRIPTS) DIST_SUBDIRS = auditscripts hoc python if NRN_PYTHON_ON SUBDIRS = auditscripts hoc python else SUBDIRS = auditscripts hoc endif neuron-7.5/share/lib/Makefile.in000066400000000000000000000644611323325274500166310ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = nrn.defaults CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomedir)" \ "$(DESTDIR)$(neuronhomedir)" SCRIPTS = $(neuronhome_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(neuronhome_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/nrn.defaults.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib data_and_dist = helpdict nrnunits.lib \ prologue.id shape.cm1 shape.cm2 neuronhome_DATA = $(data_and_dist) nrn.defaults neuronhome_SCRIPTS = cleanup hocload.sh EXTRA_DIST = $(data_and_dist) $(neuronhome_SCRIPTS) DIST_SUBDIRS = auditscripts hoc python @NRN_PYTHON_ON_FALSE@SUBDIRS = auditscripts hoc @NRN_PYTHON_ON_TRUE@SUBDIRS = auditscripts hoc python all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrn.defaults: $(top_builddir)/config.status $(srcdir)/nrn.defaults.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-neuronhomeSCRIPTS: $(neuronhome_SCRIPTS) @$(NORMAL_INSTALL) @list='$(neuronhome_SCRIPTS)'; test -n "$(neuronhomedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(neuronhomedir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(neuronhomedir)$$dir" || exit $$?; \ } \ ; done uninstall-neuronhomeSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(neuronhome_SCRIPTS)'; test -n "$(neuronhomedir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(neuronhomedir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomeDATA: $(neuronhome_DATA) @$(NORMAL_INSTALL) @list='$(neuronhome_DATA)'; test -n "$(neuronhomedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomedir)" || exit $$?; \ done uninstall-neuronhomeDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhome_DATA)'; test -n "$(neuronhomedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(neuronhomedir)" "$(DESTDIR)$(neuronhomedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-neuronhomeDATA install-neuronhomeSCRIPTS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-neuronhomeDATA uninstall-neuronhomeSCRIPTS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomeDATA install-neuronhomeSCRIPTS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-neuronhomeDATA \ uninstall-neuronhomeSCRIPTS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/auditscripts/000077500000000000000000000000001323325274500172675ustar00rootroot00000000000000neuron-7.5/share/lib/auditscripts/Makefile.am000077500000000000000000000004531323325274500213300ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomeauditscriptsdir = $(neuronhomedir)/auditscripts neuronhomeauditscripts_DATA = notes neuronhomeauditscripts_SCRIPTS = gettarname hocaudit.sh retrieve.sh saveaudit EXTRA_DIST = $(neuronhomeauditscripts_DATA) $(neuronhomeauditscripts_SCRIPTS) neuron-7.5/share/lib/auditscripts/Makefile.in000066400000000000000000000505041323325274500213400ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/auditscripts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomeauditscriptsdir)" \ "$(DESTDIR)$(neuronhomeauditscriptsdir)" SCRIPTS = $(neuronhomeauditscripts_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(neuronhomeauditscripts_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomeauditscriptsdir = $(neuronhomedir)/auditscripts neuronhomeauditscripts_DATA = notes neuronhomeauditscripts_SCRIPTS = gettarname hocaudit.sh retrieve.sh saveaudit EXTRA_DIST = $(neuronhomeauditscripts_DATA) $(neuronhomeauditscripts_SCRIPTS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/auditscripts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/auditscripts/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-neuronhomeauditscriptsSCRIPTS: $(neuronhomeauditscripts_SCRIPTS) @$(NORMAL_INSTALL) @list='$(neuronhomeauditscripts_SCRIPTS)'; test -n "$(neuronhomeauditscriptsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomeauditscriptsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomeauditscriptsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(neuronhomeauditscriptsdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(neuronhomeauditscriptsdir)$$dir" || exit $$?; \ } \ ; done uninstall-neuronhomeauditscriptsSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(neuronhomeauditscripts_SCRIPTS)'; test -n "$(neuronhomeauditscriptsdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(neuronhomeauditscriptsdir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomeauditscriptsDATA: $(neuronhomeauditscripts_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomeauditscripts_DATA)'; test -n "$(neuronhomeauditscriptsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomeauditscriptsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomeauditscriptsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomeauditscriptsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomeauditscriptsdir)" || exit $$?; \ done uninstall-neuronhomeauditscriptsDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomeauditscripts_DATA)'; test -n "$(neuronhomeauditscriptsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomeauditscriptsdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomeauditscriptsdir)" "$(DESTDIR)$(neuronhomeauditscriptsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomeauditscriptsDATA \ install-neuronhomeauditscriptsSCRIPTS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomeauditscriptsDATA \ uninstall-neuronhomeauditscriptsSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomeauditscriptsDATA \ install-neuronhomeauditscriptsSCRIPTS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomeauditscriptsDATA \ uninstall-neuronhomeauditscriptsSCRIPTS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/auditscripts/gettarname000077500000000000000000000004541323325274500213470ustar00rootroot00000000000000#!/bin/sh # look in tardir and print the next available id number as a name tardir=$1 if [ ! -d $tardir ] ; then mkdir $tardir echo "" > $tardir/1000. fi cd $tardir # wish I knew how to lock n=`ls | sed -n '$s/\..*//p'` n=`expr $n + 1` echo "$n" > $n.tar rm lockgettarname echo $tardir/$n.tar neuron-7.5/share/lib/auditscripts/hocaudit.sh000077500000000000000000000031331323325274500214260ustar00rootroot00000000000000#!/bin/sh auditprogpath=`dirname $0` pid=$1 auditdir=$2 tmpdir=$auditdir/$pid tardir=$auditdir/TAR if [ ! -d $tmpdir ] ; then echo "$0: tmpdir:$tmpdir does not exist" exit 1 fi datefile=$tmpdir/datefile date > $tmpdir/datefile commandfile=$tmpdir/commands xopenlist=$tmpdir/xopens diffile=$tmpdir/diffile savefile=$tmpdir/savefile auditlist=$auditdir/auditlist export datefile commandfile xopenlist savefile n=0 while read typ str do echo "$str" >> temp case $typ in 0) # just a command to save echo "$str" >> $commandfile ;; 1) # manage an xopen rcsdiff -e $str > $diffile 2> /dev/null case $? in 0) # identical with most recent rcs version rev=`rlog -h $str | sed -n '/^head:/s/head://p'` echo "0 $str x $rev" >> $xopenlist ;; 1) # differs from rcs version so save the diff rev=`rlog -h $str | sed -n '/^head:/s/head://p'` echo "1 $str f$n $rev" >> $xopenlist mv $diffile $tmpdir/f$n n=`expr $n + 1` ;; 2) # no rcs version so save the file echo "2 $str f$n x" >> $xopenlist cp $str $tmpdir/f$n n=`expr $n + 1` ;; esac ;; 2) # manage execution of an emacs buffer echo "3 $str" >> $xopenlist ;; 3) # save audit echo "$str `date`" >> $savefile echo "-1 $str x x" >> $xopenlist $auditprogpath/saveaudit ;; esac done if [ -f $savefile ] ; then # save everything tarfile=`$auditprogpath/gettarname $tardir` cat $tarfile $savefile >> $auditlist (cd $tmpdir ; tar cf ../$pid.tar *) mv $tmpdir/../$pid.tar $tarfile chmod 444 $tarfile compress $tarfile fi if true ; then # clean up echo "Removing $tmpdir"; rm -r $tmpdir fi neuron-7.5/share/lib/auditscripts/notes000077500000000000000000000070041323325274500203460ustar00rootroot00000000000000The audit system will work with a variety of simulation styles but I hope it will prove very effective with the following: 1) At some point you will want to switch from a very casual exploratory methodology to one which is carefully managed. When this occurs you can start the simulation in the audit mode and prior to doing any lengthy runs say: saveaudit() This will store all the information up to that point so that in the future you can return to that point. More later about the database of audits and how you can return to any audit point. The information it stores will be very compact if you have already placed the files used in the simulation under RCS control. When a saveaudit is done only the differences between the working files and the latest RCS checkin is stored. (Note that the audit system never replaces working copies with RCS versions nor does it ever checkin anything outside of the AUDIT directory). This means that there are NO changes to the files you are using to carry out simulations. At the same time, if some files you are using are not under RCS control then they will be copied to the AUDIT directory. 2) You can start again from any stored audit with the command: nrnrunaudit executed in the same subdirectory from which you ran the original simulation. You will see a list of audits from which you can select one to execute. At the end of execution you should be in exactly the same state as when the original saveaudit() was executed. When doing something new, the general usage will be to start from the original audit that does no runs, change a few variables, do a run and, if you think you may ever want to reproduce this result, do a saveaudit(). When you make a postscript file from the print window manager and auditing is turned on, then you are asked if you want to save the audit and mark the page with the date and audit id. 3) Audits are just an implicit list of all the commands executed by the interpreter and this generally implies space benefits and time liabilities. This methodology is at the other extreme from trying to save the state of the simulation (a core dump?) which is very fast but uses a lot of disk space. The space benefit comes from the fact that usually the text that defines a simulation is much smaller than the space required to store all the states, variables, and parameters (which, at any rate loses the programmed relationship among variables as well as the procedures used to analyze the results). In fact, in most cases, the save audit will just be a short list of xopen statements with the appropriate rcs version number. The command list can get lengthy ( for example when sliders are heavily used) but there may be some ways to work around this. The most serious problem is that the command list may involve lengthy runs that dont have anything to do with setting relevant state as in: setup() run() setup() diam=20 run() saveaudit() Here one would want to throw away the first two statments but in general this can't be done by the computer because there is no guarantee against run() not incrementing a counter whose value needs to be correct for the second run(). This kind of programming practice is to be deplored but the user should probably edit the command list anyway to emphasize only what is important in the setting of the state. I would probably edit the above command list to: setup() diam=20 and avoid the run overhead even of the saved audit. Of course, if the command list is changed nontrivially it is essential to verify that the nrnrunaudit produces the same result. neuron-7.5/share/lib/auditscripts/retrieve.sh000077500000000000000000000014441323325274500214560ustar00rootroot00000000000000#!/bin/sh # to be executed by retrieve_audit auditprogpath=`dirname $0` pid=ret id=$1 auditdir=$2 tmpdir=$auditdir/$pid tardir=$auditdir/TAR if [ -d $tmpdir ] ; then exit 1; fi mkdir $tmpdir zcat $tardir/$id.tar.Z | ( cd $tmpdir ; tar xf - ) cd $tmpdir n=0 echo $tmpdir read cmdfile str < savefile cp $cmdfile $cmdfile.tmp echo $tmpdir/$cmdfile.tmp cat xopens | while true ; do read type fname localname rev # echo $type $fname $localname $rev 1>&2 case $type in 0) co -p$rev $fname > $n.tmp 2>/dev/null echo $fname ;; 1) co -p$rev $fname > $n.tmp 2>/dev/null (cat $localname ; echo 'w' ; echo 'q') | ed - $n.tmp echo $fname ;; 2) cp $localname $n.tmp echo $fname ;; 3) cp $fname $n.tmp echo "em" ;; -1) exit 0; esac echo $tmpdir/$n.tmp n=`expr $n + 1` done neuron-7.5/share/lib/auditscripts/saveaudit000077500000000000000000000000341323325274500211770ustar00rootroot00000000000000#!/bin/sh echo "inside $0" neuron-7.5/share/lib/cleanup000077500000000000000000000001341323325274500161240ustar00rootroot00000000000000#!/bin/sh if [ $TEMP ] ; then tmpdir=$TEMP else tmpdir="/tmp" fi rm -f $tmpdir/oc"$1".hl neuron-7.5/share/lib/helpdict000077500000000000000000002772531323325274500163130ustar00rootroot00000000000000abs math functions general neuron.exe Reference 216 neuron/general/function/sin.html#abs abs Vector classes general neuron.exe Reference 158 neuron/general/classes/vector/vect2.html#abs AbsoluteTolerance VariableStepControl Tools NEURONMainMenu GUI Reference 418 neuron/stdrun/0stdrun.html#AbsoluteTolerance accept_action List classes general neuron.exe Reference 69 neuron/general/classes/list.html#accept_action accept_action SectionBrowser classes neuron neuron.exe Reference 316 neuron/neuron/classes/secbrows.html#accept_action access CurrentlyAccessedSection Section neuron neuron.exe Reference 380 neuron/neuron/secspec.html#access ACG Random classes general neuron.exe Reference 97 neuron/general/classes/random.html#ACG action MechanismStandard classes neuron neuron.exe Reference 268 neuron/neuron/classes/mechstan.html#action action MechanismType classes neuron neuron.exe Reference 274 neuron/neuron/classes/mechtype.html#action action Shape classes neuron neuron.exe Reference 325 neuron/neuron/classes/shape.html#action active CVode classes neuron neuron.exe Reference 253 neuron/neuron/classes/cvode.html#active active NetCon classes neuron neuron.exe Reference 277 neuron/neuron/classes/netcon.html#active add Matrix classes general neuron.exe Reference 82 neuron/general/classes/matrix/matrix.html#add add Vector classes general neuron.exe Reference 163 neuron/general/classes/vector/vect2.html#add addexpr Graph classes general neuron.exe Reference 43 neuron/general/classes/graph.html#addexpr addobject Graph classes general neuron.exe Reference 43 neuron/general/classes/graph.html#addobject addrand Vector classes general neuron.exe Reference 147 neuron/general/classes/vector/vect.html#addrand addvar Graph classes general neuron.exe Reference 42 neuron/general/classes/graph.html#addvar align Graph classes general neuron.exe Reference 53 neuron/general/classes/graph.html#align allobjects functions general neuron.exe Reference 201 neuron/general/function/ocfunc.html#allobjects allobjectvars functions general neuron.exe Reference 201 neuron/general/function/ocfunc.html#allobjectvars AlphaSynapse pointprocesses neuron neuron.exe Reference 348 neuron/neuron/mech.html#AlphaSynapse amp IClamp Electrode StandardRunTools GUI Reference 427 neuron/stdrun/electrod.html#amp amp0 VClamp Electrode StandardRunTools GUI Reference 427 neuron/stdrun/electrod.html#amp0 AnotherVariableToFit Extras RunFitter StandardRunTools GUI Reference 450 neuron/stdrun/runfit.html#AnotherVariableToFit aopen File classes general neuron.exe Reference 28 neuron/general/classes/file.html#aopen APCount pointprocesses neuron neuron.exe Reference 352 neuron/neuron/mech.html#APCount append List classes general neuron.exe Reference 65 neuron/general/classes/list.html#append append SectionList classes neuron neuron.exe Reference 317 neuron/neuron/classes/seclist.html#append append Vector classes general neuron.exe Reference 128 neuron/general/classes/vector/vect.html#append apply Vector classes general neuron.exe Reference 148 neuron/general/classes/vector/vect.html#apply arc3d Geometry Section neuron neuron.exe Reference 344 neuron/neuron/geometry.html#arc3d ArchiveAndHardcopy Tools NEURONMainMenu GUI Reference 425 neuron/stdrun/0stdrun.html#ArchiveAndHardcopy area Geometry Section neuron neuron.exe Reference 345 neuron/neuron/geometry.html#area Args FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#Args arguments syntax general neuron.exe Reference 240 neuron/general/ocsyntax.html#arguments ArgValues FunctionFitter StandardRunTools GUI Reference 432 neuron/stdrun/funfit.html#ArgValues ArtificialCell NetworkCell Build NEURONMainMenu GUI Reference 417 neuron/stdrun/0stdrun.html#ArtificialCell Ascii PrintToFile PWM LookAndFeel GUI Reference 12 neuron/agui/gui.html#Ascii Assigned BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 393 neuron/nmodl/nmodl.html#Assigned at Vector classes general neuron.exe Reference 132 neuron/general/classes/vector/vect.html#at atan math functions general neuron.exe Reference 215 neuron/general/function/sin.html#atan atol CVode classes neuron neuron.exe Reference 251 neuron/neuron/classes/cvode.html#atol atolscale CVode classes neuron neuron.exe Reference 252 neuron/neuron/classes/cvode.html#atolscale attr_praxis functions neuron neuron.exe Reference 366 neuron/neuron/nrnoc.html#attr_praxis axis Graph classes general neuron.exe Reference 40 neuron/general/classes/graph.html#axis axis obsolete functions general neuron.exe Reference 194 neuron/general/function/obsolete/plot.html#axis AxisType Graph LookAndFeel GUI Reference 17 neuron/agui/gui.html#AxisType BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 392 neuron/nmodl/nmodl.html#BasicNMODLStatements batch_run functions neuron neuron.exe Reference 362 neuron/neuron/nrnoc.html#batch_run batch_save functions neuron neuron.exe Reference 363 neuron/neuron/nrnoc.html#batch_save bcopy Matrix classes general neuron.exe Reference 74 neuron/general/classes/matrix/matrix.html#bcopy begin Graph classes general neuron.exe Reference 44 neuron/general/classes/graph.html#begin begin RangeVarPlot classes neuron neuron.exe Reference 309 neuron/neuron/classes/rvarplt.html#begin beginline Graph classes general neuron.exe Reference 55 neuron/general/classes/graph.html#beginline beginline PlotShape classes neuron neuron.exe Reference 304 neuron/neuron/classes/pltshape.html#beginline beginline Shape classes neuron neuron.exe Reference 328 neuron/neuron/classes/shape.html#beginline begintemplate ObjectOrientedProgramming general neuron.exe Reference 241 neuron/general/oop.html#begintemplate BeQuiet RunFitter StandardRunTools GUI Reference 451 neuron/stdrun/runfit.html#BeQuiet binomial Random classes general neuron.exe Reference 104 neuron/general/classes/random.html#binomial boolean_dialog dialogs functions general neuron.exe Reference 180 neuron/general/function/dialog.html#boolean_dialog break keywords general neuron.exe Reference 224 neuron/general/keywords/ockeywor.html#break Breakpoint BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 395 neuron/nmodl/nmodl.html#Breakpoint browser List classes general neuron.exe Reference 67 neuron/general/classes/list.html#browser Browser LookAndFeel GUI Reference 8 neuron/agui/gui.html#Browser brush Graph classes general neuron.exe Reference 54 neuron/general/classes/graph.html#brush buffer_size Vector classes general neuron.exe Reference 122 neuron/general/classes/vector/vect.html#buffer_size Build NEURONMainMenu GUI Reference 413 neuron/stdrun/0stdrun.html#Build Builders Miscellaneous Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#Builders Button Panel LookAndFeel GUI Reference 9 neuron/agui/gui.html#Button button-menu-panel general neuron.exe Reference 207 neuron/general/function/panel.html#button-menu-panel c Matrix classes general neuron.exe Reference 74 neuron/general/classes/matrix/matrix.html#c c Vector classes general neuron.exe Reference 131 neuron/general/classes/vector/vect.html#c CellBuilder Build NEURONMainMenu GUI Reference 416 neuron/stdrun/0stdrun.html#CellBuilder CellBuilder StandardRunTools GUI Reference 426 neuron/stdrun/celbild.html#CellBuilder celsius DistributedMechanisms Tools NEURONMainMenu GUI Reference 420 neuron/stdrun/0stdrun.html#celsius celsius globals neuron neuron.exe Reference 374 neuron/neuron/nrnoc.html#celsius ChangeColor-Brush Graph LookAndFeel GUI Reference 16 neuron/agui/gui.html#ChangeColor-Brush Changeparmfromlist Extras RunFitter StandardRunTools GUI Reference 449 neuron/stdrun/runfit.html#Changeparmfromlist ChangeText Graph LookAndFeel GUI Reference 18 neuron/agui/gui.html#ChangeText Channels ModelDescriptionIssues CVode classes neuron neuron.exe Reference 258 neuron/neuron/classes/cvode.html#Channels chdir functions general neuron.exe Reference 177 neuron/general/function/0fun.html#chdir checkpoint functions general neuron.exe Reference 179 neuron/general/function/checkpnt.html#checkpoint child SectionRef classes neuron neuron.exe Reference 320 neuron/neuron/classes/secref.html#child children SectionList classes neuron neuron.exe Reference 317 neuron/neuron/classes/seclist.html#children chooser File classes general neuron.exe Reference 32 neuron/general/classes/file.html#chooser cl Vector classes general neuron.exe Reference 132 neuron/general/classes/vector/vect.html#cl clamp_resist globals neuron neuron.exe Reference 373 neuron/neuron/nrnoc.html#clamp_resist classes general neuron.exe Reference 4 neuron/0nrn.html#classes classes neuron neuron.exe Reference 5 neuron/1nrn.html#classes close File classes general neuron.exe Reference 28 neuron/general/classes/file.html#close close PWManager classes general neuron.exe Reference 93 neuron/general/classes/pwman.html#close close_path Glyph classes general neuron.exe Reference 36 neuron/general/classes/glyph.html#close_path color Graph classes general neuron.exe Reference 53 neuron/general/classes/graph.html#color color PlotShape classes neuron neuron.exe Reference 305 neuron/neuron/classes/pltshape.html#color color RangeVarPlot classes neuron neuron.exe Reference 311 neuron/neuron/classes/rvarplt.html#color color Shape classes neuron neuron.exe Reference 325 neuron/neuron/classes/shape.html#color colormap PlotShape classes neuron neuron.exe Reference 305 neuron/neuron/classes/pltshape.html#colormap color_all PlotShape classes neuron neuron.exe Reference 305 neuron/neuron/classes/pltshape.html#color_all color_all Shape classes neuron neuron.exe Reference 325 neuron/neuron/classes/shape.html#color_all color_list PlotShape classes neuron neuron.exe Reference 305 neuron/neuron/classes/pltshape.html#color_list color_list Shape classes neuron neuron.exe Reference 326 neuron/neuron/classes/shape.html#color_list Command Family Miscellaneous Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#Command comments syntax general neuron.exe Reference 236 neuron/general/ocsyntax.html#comments CommonFunctionalForms FittoData FunctionFitter StandardRunTools GUI Reference 433 neuron/stdrun/funfit.html#CommonFunctionalForms CompileTimeOptions neuron neuron.exe Reference 376 neuron/neuron/nrnoc.html#CompileTimeOptions compute Impedance classes neuron neuron.exe Reference 261 neuron/neuron/classes/impedanc.html#compute Concentrations ModelDescriptionIssues CVode classes neuron neuron.exe Reference 258 neuron/neuron/classes/cvode.html#Concentrations connect Topology Section neuron neuron.exe Reference 385 neuron/neuron/topology.html#connect ConnectingMechanismsTogether ModelDescriptionLanguage NMODL Reference 406 neuron/nmodl/nmodl2.html#ConnectingMechanismsTogether Constant BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 393 neuron/nmodl/nmodl.html#Constant Constants predeclared-variables general neuron.exe Reference 248 neuron/general/predec.html#Constants contains Vector classes general neuron.exe Reference 129 neuron/general/classes/vector/vect.html#contains context ParallelContext classes neuron neuron.exe Reference 293 neuron/neuron/classes/parcon.html#context continue keywords general neuron.exe Reference 224 neuron/general/keywords/ockeywor.html#continue Continuefor RunControl StandardRunTools GUI Reference 445 neuron/stdrun/runctrl.html#Continuefor Continuetil RunControl StandardRunTools GUI Reference 445 neuron/stdrun/runctrl.html#Continuetil continue_dialog dialogs functions general neuron.exe Reference 180 neuron/general/function/dialog.html#continue_dialog control_point Glyph classes general neuron.exe Reference 37 neuron/general/classes/glyph.html#control_point convlv Fourier Vector classes general neuron.exe Reference 166 neuron/general/classes/vector/vect2.html#convlv copy Vector classes general neuron.exe Reference 130 neuron/general/classes/vector/vect.html#copy coredump_on_error functions general neuron.exe Reference 206 neuron/general/function/ocfunc.html#coredump_on_error correl Fourier Vector classes general neuron.exe Reference 166 neuron/general/classes/vector/vect2.html#correl cos math functions general neuron.exe Reference 215 neuron/general/function/sin.html#cos count List classes general neuron.exe Reference 67 neuron/general/classes/list.html#count count MechanismStandard classes neuron neuron.exe Reference 271 neuron/neuron/classes/mechstan.html#count count MechanismType classes neuron neuron.exe Reference 274 neuron/neuron/classes/mechtype.html#count count PWManager classes general neuron.exe Reference 91 neuron/general/classes/pwman.html#count create Topology Section neuron neuron.exe Reference 385 neuron/neuron/topology.html#create crosshair Graph classes general neuron.exe Reference 58 neuron/general/classes/graph.html#crosshair Crosshair Graph LookAndFeel GUI Reference 15 neuron/agui/gui.html#Crosshair Currentaxis Graph NEURONMainMenu GUI Reference 420 neuron/stdrun/0stdrun.html#Currentaxis CurrentlyAccessedSection Section neuron neuron.exe Reference 379 neuron/neuron/secspec.html#CurrentlyAccessedSection CurrentValuesAsDefault ArgValues FunctionFitter StandardRunTools GUI Reference 432 neuron/stdrun/funfit.html#CurrentValuesAsDefault CurrentValuesAsDefault RunFitter StandardRunTools GUI Reference 447 neuron/stdrun/runfit.html#CurrentValuesAsDefault curve_to Glyph classes general neuron.exe Reference 36 neuron/general/classes/glyph.html#curve_to CVode classes neuron neuron.exe Reference 248 neuron/neuron/classes/cvode.html#CVode d2line GUIMath classes general neuron.exe Reference 64 neuron/general/classes/guimath.html#d2line d2line_seg GUIMath classes general neuron.exe Reference 64 neuron/general/classes/guimath.html#d2line_seg DataWeights Extras RunFitter StandardRunTools GUI Reference 448 neuron/stdrun/runfit.html#DataWeights DataWeights FittoData FunctionFitter StandardRunTools GUI Reference 433 neuron/stdrun/funfit.html#DataWeights debug keywords general neuron.exe Reference 230 neuron/general/keywords/ockeywor.html#debug Deck classes general neuron.exe Reference 21 neuron/general/classes/deck.html#Deck default ValueFieldEditor classes general neuron.exe Reference 176 neuron/general/classes/vfe.html#default DefaultValueEditor Panel LookAndFeel GUI Reference 10 neuron/agui/gui.html#DefaultValueEditor define_shape Geometry Section neuron neuron.exe Reference 345 neuron/neuron/geometry.html#define_shape deiconify PWManager classes general neuron.exe Reference 93 neuron/general/classes/pwman.html#deiconify del IClamp Electrode StandardRunTools GUI Reference 427 neuron/stdrun/electrod.html#del delay NetCon classes neuron neuron.exe Reference 282 neuron/neuron/classes/netcon.html#delay Delete Graph LookAndFeel GUI Reference 18 neuron/agui/gui.html#Delete delete keywords general neuron.exe Reference 229 neuron/general/keywords/ockeywor.html#delete delete_section Topology Section neuron neuron.exe Reference 386 neuron/neuron/topology.html#delete_section deltafac Impedance classes neuron neuron.exe Reference 264 neuron/neuron/classes/impedanc.html#deltafac depvar keywords general neuron.exe Reference 232 neuron/general/keywords/ockeywor.html#depvar deriv Vector classes general neuron.exe Reference 150 neuron/general/classes/vector/vect2.html#deriv Derivative BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 396 neuron/nmodl/nmodl.html#Derivative dialog VBox classes general neuron.exe Reference 116 neuron/general/classes/vbox.html#dialog dialogs functions general neuron.exe Reference 180 neuron/general/function/dialog.html#dialogs diam Geometry Section neuron neuron.exe Reference 347 neuron/neuron/geometry.html#diam diam3d Geometry Section neuron neuron.exe Reference 343 neuron/neuron/geometry.html#diam3d diam_changed Geometry Section neuron neuron.exe Reference 347 neuron/neuron/geometry.html#diam_changed dir File classes general neuron.exe Reference 31 neuron/general/classes/file.html#dir disconnect Topology Section neuron neuron.exe Reference 387 neuron/neuron/topology.html#disconnect discunif Random classes general neuron.exe Reference 101 neuron/general/classes/random.html#discunif dismiss_action VBox classes general neuron.exe Reference 116 neuron/general/classes/vbox.html#dismiss_action Display Vector NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#Display distance Geometry Section neuron neuron.exe Reference 346 neuron/neuron/geometry.html#distance DistributedMechanisms Tools NEURONMainMenu GUI Reference 418 neuron/stdrun/0stdrun.html#DistributedMechanisms div Vector classes general neuron.exe Reference 164 neuron/general/classes/vector/vect2.html#div doEvents Notification mcell_ran4_init functions general neuron.exe Reference 189 neuron/general/function/notify.html#doEvents Dofit RunFitter StandardRunTools GUI Reference 450 neuron/stdrun/runfit.html#Dofit done ParallelContext classes neuron neuron.exe Reference 293 neuron/neuron/classes/parcon.html#done doNotify Notification mcell_ran4_init functions general neuron.exe Reference 190 neuron/general/function/notify.html#doNotify dot Vector classes general neuron.exe Reference 163 neuron/general/classes/vector/vect2.html#dot double keywords general neuron.exe Reference 230 neuron/general/keywords/ockeywor.html#double Draw Vector NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#Draw dstates CVode classes neuron neuron.exe Reference 254 neuron/neuron/classes/cvode.html#dstates dt globals neuron neuron.exe Reference 373 neuron/neuron/nrnoc.html#dt dt RunControl StandardRunTools GUI Reference 444 neuron/stdrun/runctrl.html#dt dur IClamp Electrode StandardRunTools GUI Reference 427 neuron/stdrun/electrod.html#dur dur0 VClamp Electrode StandardRunTools GUI Reference 427 neuron/stdrun/electrod.html#dur0 Edit NEURONMainMenu GUI Reference 413 neuron/stdrun/0stdrun.html#Edit Electrode Managers PointProcesses Tools NEURONMainMenu GUI Reference 441 neuron/stdrun/pointman.html#Electrode Electrode StandardRunTools GUI Reference 426 neuron/stdrun/electrod.html#Electrode else keywords general neuron.exe Reference 226 neuron/general/keywords/ockeywor.html#else em keywords general neuron.exe Reference 231 neuron/general/keywords/ockeywor.html#em end RangeVarPlot classes neuron neuron.exe Reference 309 neuron/neuron/classes/rvarplt.html#end endtemplate ObjectOrientedProgramming general neuron.exe Reference 242 neuron/general/oop.html#endtemplate eof File classes general neuron.exe Reference 31 neuron/general/classes/file.html#eof eq Vector classes general neuron.exe Reference 165 neuron/general/classes/vector/vect2.html#eq eqinit functions general neuron.exe Reference 199 neuron/general/function/ocfunc.html#eqinit eqn keywords general neuron.exe Reference 232 neuron/general/keywords/ockeywor.html#eqn erase Glyph classes general neuron.exe Reference 37 neuron/general/classes/glyph.html#erase erase Graph classes general neuron.exe Reference 50 neuron/general/classes/graph.html#erase Erase Graph LookAndFeel GUI Reference 18 neuron/agui/gui.html#Erase erase PlotShape classes neuron neuron.exe Reference 303 neuron/neuron/classes/pltshape.html#erase erase Shape classes neuron neuron.exe Reference 328 neuron/neuron/classes/shape.html#erase EraseAll Grapher StandardRunTools GUI Reference 435 neuron/stdrun/grapher.html#EraseAll erase_all Graph classes general neuron.exe Reference 51 neuron/general/classes/graph.html#erase_all erase_all PlotShape classes neuron neuron.exe Reference 304 neuron/neuron/classes/pltshape.html#erase_all erase_all Shape classes neuron neuron.exe Reference 328 neuron/neuron/classes/shape.html#erase_all erf math functions general neuron.exe Reference 217 neuron/general/function/sin.html#erf erfc math functions general neuron.exe Reference 217 neuron/general/function/sin.html#erfc erlang Random classes general neuron.exe Reference 106 neuron/general/classes/random.html#erlang event CVode classes neuron neuron.exe Reference 257 neuron/neuron/classes/cvode.html#event event NetCon classes neuron neuron.exe Reference 278 neuron/neuron/classes/netcon.html#event Events ModelDescriptionIssues CVode classes neuron neuron.exe Reference 258 neuron/neuron/classes/cvode.html#Events ExecCommand StandardRunTools GUI Reference 429 neuron/stdrun/family.html#ExecCommand execute functions general neuron.exe Reference 202 neuron/general/function/ocfunc.html#execute execute1 functions general neuron.exe Reference 203 neuron/general/function/ocfunc.html#execute1 exec_menu Graph classes general neuron.exe Reference 60 neuron/general/classes/graph.html#exec_menu exec_menu PlotShape classes neuron neuron.exe Reference 303 neuron/neuron/classes/pltshape.html#exec_menu exec_menu Shape classes neuron neuron.exe Reference 328 neuron/neuron/classes/shape.html#exec_menu exp math functions general neuron.exe Reference 216 neuron/general/function/sin.html#exp exp Matrix classes general neuron.exe Reference 85 neuron/general/classes/matrix/matrix.html#exp Exp2Syn pointprocesses neuron neuron.exe Reference 353 neuron/neuron/mech.html#Exp2Syn expression syntax general neuron.exe Reference 236 neuron/general/ocsyntax.html#expression ExpSyn pointprocesses neuron neuron.exe Reference 352 neuron/neuron/mech.html#ExpSyn External NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 405 neuron/nmodl/nmodl2.html#External external ObjectOrientedProgramming general neuron.exe Reference 244 neuron/general/oop.html#external extracellular mechanisms neuron neuron.exe Reference 358 neuron/neuron/mech.html#extracellular Extras RunFitter StandardRunTools GUI Reference 448 neuron/stdrun/runfit.html#Extras fadvance functions neuron neuron.exe Reference 364 neuron/neuron/nrnoc.html#fadvance family Graph classes general neuron.exe Reference 48 neuron/general/classes/graph.html#family Family Miscellaneous Tools NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#Family Family StandardRunTools GUI Reference 429 neuron/stdrun/family.html#Family Family1 Family Miscellaneous Tools NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#Family1 FamilyLabel Graph LookAndFeel GUI Reference 18 neuron/agui/gui.html#FamilyLabel fastflush Graph classes general neuron.exe Reference 47 neuron/general/classes/graph.html#fastflush fastflush PlotShape classes neuron neuron.exe Reference 301 neuron/neuron/classes/pltshape.html#fastflush fastpas mechanisms neuron neuron.exe Reference 358 neuron/neuron/mech.html#fastpas fclamp functions neuron neuron.exe Reference 367 neuron/neuron/nrnoc.html#fclamp fclampi functions neuron neuron.exe Reference 368 neuron/neuron/nrnoc.html#fclampi fclampv functions neuron neuron.exe Reference 368 neuron/neuron/nrnoc.html#fclampv fcurrent functions neuron neuron.exe Reference 368 neuron/neuron/nrnoc.html#fcurrent fft Fourier Vector classes general neuron.exe Reference 167 neuron/general/classes/vector/vect2.html#fft FieldEditor LookAndFeel GUI Reference 8 neuron/agui/gui.html#FieldEditor File classes general neuron.exe Reference 26 neuron/general/classes/file.html#File File NEURONMainMenu GUI Reference 413 neuron/stdrun/0stdrun.html#File fill Glyph classes general neuron.exe Reference 36 neuron/general/classes/glyph.html#fill fill Vector classes general neuron.exe Reference 123 neuron/general/classes/vector/vect.html#fill filter Fourier Vector classes general neuron.exe Reference 167 neuron/general/classes/vector/vect2.html#filter finitialize functions neuron neuron.exe Reference 365 neuron/neuron/nrnoc.html#finitialize fit Vector classes general neuron.exe Reference 171 neuron/general/classes/vector/vfit.html#fit FitCriterion FittoData FunctionFitter StandardRunTools GUI Reference 433 neuron/stdrun/funfit.html#FitCriterion Fitting Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#Fitting FittoData FunctionFitter StandardRunTools GUI Reference 432 neuron/stdrun/funfit.html#FittoData fit_praxis functions neuron neuron.exe Reference 365 neuron/neuron/nrnoc.html#fit_praxis fixed Graph classes general neuron.exe Reference 52 neuron/general/classes/graph.html#fixed flip_to Deck classes general neuron.exe Reference 25 neuron/general/classes/deck.html#flip_to float_epsilon predeclared-variables general neuron.exe Reference 246 neuron/general/predec.html#float_epsilon flush Graph classes general neuron.exe Reference 46 neuron/general/classes/graph.html#flush flush PlotShape classes neuron neuron.exe Reference 301 neuron/neuron/classes/pltshape.html#flush flush Shape classes neuron neuron.exe Reference 323 neuron/neuron/classes/shape.html#flush fmatrix functions neuron neuron.exe Reference 369 neuron/neuron/nrnoc.html#fmatrix fmenu obsolete functions general neuron.exe Reference 190 neuron/general/function/obsolete/lw.html#fmenu for keywords general neuron.exe Reference 227 neuron/general/keywords/ockeywor.html#for forall CurrentlyAccessedSection Section neuron neuron.exe Reference 381 neuron/neuron/secspec.html#forall forsec CurrentlyAccessedSection Section neuron neuron.exe Reference 383 neuron/neuron/secspec.html#forsec Fourier Vector classes general neuron.exe Reference 165 neuron/general/classes/vector/vect2.html#Fourier fprint IO functions general neuron.exe Reference 187 neuron/general/function/io/ropen.html#fprint fprint Matrix classes general neuron.exe Reference 76 neuron/general/classes/matrix/matrix.html#fprint fread SaveState classes neuron neuron.exe Reference 313 neuron/neuron/classes/savstate.html#fread fread Vector classes general neuron.exe Reference 136 neuron/general/classes/vector/vect.html#fread Frequency Impedance Tools NEURONMainMenu GUI Reference 424 neuron/stdrun/0stdrun.html#Frequency FromCellBuilder NetworkCell Build NEURONMainMenu GUI Reference 417 neuron/stdrun/0stdrun.html#FromCellBuilder from_double Vector classes general neuron.exe Reference 133 neuron/general/classes/vector/vect.html#from_double from_vector RangeVarPlot classes neuron neuron.exe Reference 311 neuron/neuron/classes/rvarplt.html#from_vector fscan IO functions general neuron.exe Reference 184 neuron/general/function/io/read.html#fscan fstim functions neuron neuron.exe Reference 365 neuron/neuron/nrnoc.html#fstim fstimi functions neuron neuron.exe Reference 365 neuron/neuron/nrnoc.html#fstimi func syntax general neuron.exe Reference 239 neuron/general/ocsyntax.html#func Function BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 398 neuron/nmodl/nmodl.html#Function FunctionFitter StandardRunTools GUI Reference 430 neuron/stdrun/funfit.html#FunctionFitter functions general neuron.exe Reference 3 neuron/0nrn.html#functions functions neuron neuron.exe Reference 362 neuron/neuron/nrnoc.html#functions fwrite SaveState classes neuron neuron.exe Reference 314 neuron/neuron/classes/savstate.html#fwrite fwrite Vector classes general neuron.exe Reference 136 neuron/general/classes/vector/vect.html#fwrite GatherValues Vector NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#GatherValues GatherVec StandardRunTools GUI Reference 430 neuron/stdrun/family.html#GatherVec general neuron.exe Reference 3 neuron/0nrn.html#general GeneralParadigm ModelDescriptionLanguage NMODL Reference 391 neuron/nmodl/nmodl.html#GeneralParadigm Generator Grapher StandardRunTools GUI Reference 436 neuron/stdrun/grapher.html#Generator geometric Random classes general neuron.exe Reference 104 neuron/general/classes/random.html#geometric Geometry Section neuron neuron.exe Reference 335 neuron/neuron/geometry.html#Geometry get MechanismStandard classes neuron neuron.exe Reference 270 neuron/neuron/classes/mechstan.html#get get Vector classes general neuron.exe Reference 122 neuron/general/classes/vector/vect.html#get getcol Matrix classes general neuron.exe Reference 78 neuron/general/classes/matrix/matrix.html#getcol getcwd functions general neuron.exe Reference 178 neuron/general/function/0fun.html#getcwd getdiag Matrix classes general neuron.exe Reference 79 neuron/general/classes/matrix/matrix.html#getdiag getline Graph classes general neuron.exe Reference 49 neuron/general/classes/graph.html#getline getname File classes general neuron.exe Reference 30 neuron/general/classes/file.html#getname getrow Matrix classes general neuron.exe Reference 78 neuron/general/classes/matrix/matrix.html#getrow gets File classes general neuron.exe Reference 30 neuron/general/classes/file.html#gets getSpineArea Geometry Section neuron neuron.exe Reference 345 neuron/neuron/geometry.html#getSpineArea getstr IO functions general neuron.exe Reference 183 neuron/general/function/io/read.html#getstr getval Matrix classes general neuron.exe Reference 75 neuron/general/classes/matrix/matrix.html#getval ghk ion neuron neuron.exe Reference 378 neuron/neuron/nrnoc.html#ghk gif Glyph classes general neuron.exe Reference 38 neuron/general/classes/glyph.html#gif gif Graph classes general neuron.exe Reference 62 neuron/general/classes/graph.html#gif Global NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 401 neuron/nmodl/nmodl2.html#Global globalRa DistributedMechanisms Tools NEURONMainMenu GUI Reference 420 neuron/stdrun/0stdrun.html#globalRa globals neuron neuron.exe Reference 5 neuron/1nrn.html#globals Glyph classes general neuron.exe Reference 34 neuron/general/classes/glyph.html#Glyph glyph Glyph classes general neuron.exe Reference 38 neuron/general/classes/glyph.html#glyph glyph Graph classes general neuron.exe Reference 63 neuron/general/classes/graph.html#glyph Graph classes general neuron.exe Reference 38 neuron/general/classes/graph.html#Graph Graph LookAndFeel GUI Reference 15 neuron/agui/gui.html#Graph Graph NEURONMainMenu GUI Reference 414 neuron/stdrun/0stdrun.html#Graph graph obsolete functions general neuron.exe Reference 192 neuron/general/function/obsolete/oldgrph.html#graph Grapher Graph NEURONMainMenu GUI Reference 421 neuron/stdrun/0stdrun.html#Grapher Grapher StandardRunTools GUI Reference 433 neuron/stdrun/grapher.html#Grapher graphmode obsolete functions general neuron.exe Reference 192 neuron/general/function/obsolete/oldgrph.html#graphmode group PWManager classes general neuron.exe Reference 94 neuron/general/classes/pwman.html#group GroupManager Window NEURONMainMenu GUI Reference 415 neuron/stdrun/0stdrun.html#GroupManager GUI Reference 5 neuron/agui/gui.html#GUI GUIMath classes general neuron.exe Reference 63 neuron/general/classes/guimath.html#GUIMath has_net_event MechanismType classes neuron neuron.exe Reference 275 neuron/neuron/classes/mechtype.html#has_net_event has_parent SectionRef classes neuron neuron.exe Reference 321 neuron/neuron/classes/secref.html#has_parent HBox classes general neuron.exe Reference 112 neuron/general/classes/vbox.html#HBox head StringFunctions classes general neuron.exe Reference 108 neuron/general/classes/strfun.html#head help keywords general neuron.exe Reference 222 neuron/general/keywords/ockeywor.html#help Help PWM LookAndFeel GUI Reference 11 neuron/agui/gui.html#Help hh mechanisms neuron neuron.exe Reference 357 neuron/neuron/mech.html#hh hide PWManager classes general neuron.exe Reference 92 neuron/general/classes/pwman.html#hide hinton PlotShape classes neuron neuron.exe Reference 306 neuron/neuron/classes/pltshape.html#hinton hist Vector classes general neuron.exe Reference 145 neuron/general/classes/vector/vect.html#hist histogram Vector classes general neuron.exe Reference 144 neuron/general/classes/vector/vect.html#histogram History Introduction ModelDescriptionLanguage NMODL Reference 389 neuron/nmodl/nmodl.html#History hocmech functions neuron neuron.exe Reference 332 neuron/neuron/function/hocmech.html#hocmech hoc_ac_ predeclared-variables general neuron.exe Reference 247 neuron/general/predec.html#hoc_ac_ hoc_cross_x_ predeclared-variables general neuron.exe Reference 247 neuron/general/predec.html#hoc_cross_x_ hoc_cross_y_ predeclared-variables general neuron.exe Reference 248 neuron/general/predec.html#hoc_cross_y_ hoc_obj_ predeclared-variables general neuron.exe Reference 247 neuron/general/predec.html#hoc_obj_ hoc_pointer_ functions general neuron.exe Reference 202 neuron/general/function/ocfunc.html#hoc_pointer_ hoc_stdio IO functions general neuron.exe Reference 181 neuron/general/function/io/printf.html#hoc_stdio Holding VClampFamily Electrode StandardRunTools GUI Reference 428 neuron/stdrun/electrod.html#Holding HomogeneousSpec Managers DistributedMechanisms Tools NEURONMainMenu GUI Reference 419 neuron/stdrun/0stdrun.html#HomogeneousSpec hypergeo Random classes general neuron.exe Reference 105 neuron/general/classes/random.html#hypergeo IClamp Electrode StandardRunTools GUI Reference 426 neuron/stdrun/electrod.html#IClamp IClamp pointprocesses neuron neuron.exe Reference 348 neuron/neuron/mech.html#IClamp iconify PWManager classes general neuron.exe Reference 93 neuron/general/classes/pwman.html#iconify ident Matrix classes general neuron.exe Reference 85 neuron/general/classes/matrix/matrix.html#ident Idraw PrintToFile PWM LookAndFeel GUI Reference 12 neuron/agui/gui.html#Idraw if keywords general neuron.exe Reference 226 neuron/general/keywords/ockeywor.html#if ifsec CurrentlyAccessedSection Section neuron neuron.exe Reference 382 neuron/neuron/secspec.html#ifsec Impedance classes neuron neuron.exe Reference 260 neuron/neuron/classes/impedanc.html#Impedance Impedance Tools NEURONMainMenu GUI Reference 424 neuron/stdrun/0stdrun.html#Impedance ImpedanceRatio ImpedanceTools StandardRunTools GUI Reference 437 neuron/stdrun/impratio.html#ImpedanceRatio ImpedanceTools StandardRunTools GUI Reference 425 neuron/stdrun/attshape.html#ImpedanceTools ImplementationNotes ParallelContext classes neuron neuron.exe Reference 298 neuron/neuron/classes/parcon.html#ImplementationNotes ImpShape ImpedanceTools StandardRunTools GUI Reference 425 neuron/stdrun/attshape.html#ImpShape Impx ImpedanceTools StandardRunTools GUI Reference 436 neuron/stdrun/impedanx.html#Impx in MechanismStandard classes neuron neuron.exe Reference 269 neuron/neuron/classes/mechstan.html#in Include BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 395 neuron/nmodl/nmodl.html#Include ind Vector classes general neuron.exe Reference 146 neuron/general/classes/vector/vect.html#ind IndepBegin Grapher StandardRunTools GUI Reference 436 neuron/stdrun/grapher.html#IndepBegin IndepEnd Grapher StandardRunTools GUI Reference 436 neuron/stdrun/grapher.html#IndepEnd Independent BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 394 neuron/nmodl/nmodl.html#Independent IndependentVar FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#IndependentVar IndependentVar Grapher StandardRunTools GUI Reference 435 neuron/stdrun/grapher.html#IndependentVar index List classes general neuron.exe Reference 67 neuron/general/classes/list.html#index index Vector classes general neuron.exe Reference 159 neuron/general/classes/vector/vect2.html#index indgen Vector classes general neuron.exe Reference 127 neuron/general/classes/vector/vect.html#indgen indvwhere Vector classes general neuron.exe Reference 135 neuron/general/classes/vector/vect.html#indvwhere indwhere Vector classes general neuron.exe Reference 134 neuron/general/classes/vector/vect.html#indwhere inf Vector classes general neuron.exe Reference 175 neuron/general/classes/vector/vneur.html#inf init ObjectOrientedProgramming general neuron.exe Reference 245 neuron/general/oop.html#init Init RunControl StandardRunTools GUI Reference 445 neuron/stdrun/runctrl.html#Init Initial BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 399 neuron/nmodl/nmodl.html#Initial initnrn functions neuron neuron.exe Reference 364 neuron/neuron/nrnoc.html#initnrn InitRun RunControl StandardRunTools GUI Reference 444 neuron/stdrun/runctrl.html#InitRun input Impedance classes neuron neuron.exe Reference 262 neuron/neuron/classes/impedanc.html#input input_phase Impedance classes neuron neuron.exe Reference 263 neuron/neuron/classes/impedanc.html#input_phase insert keywords general neuron.exe Reference 235 neuron/general/keywords/ockeywor.html#insert Inserter Managers DistributedMechanisms Tools NEURONMainMenu GUI Reference 419 neuron/stdrun/0stdrun.html#Inserter Inserter StandardRunTools GUI Reference 438 neuron/stdrun/inserter.html#Inserter inside GUIMath classes general neuron.exe Reference 64 neuron/general/classes/guimath.html#inside insrt List classes general neuron.exe Reference 66 neuron/general/classes/list.html#insrt insrt Vector classes general neuron.exe Reference 129 neuron/general/classes/vector/vect.html#insrt int math functions general neuron.exe Reference 216 neuron/general/function/sin.html#int integral Vector classes general neuron.exe Reference 152 neuron/general/classes/vector/vect2.html#integral intercept Deck classes general neuron.exe Reference 23 neuron/general/classes/deck.html#intercept intercept VBox classes general neuron.exe Reference 113 neuron/general/classes/vbox.html#intercept interpolate Vector classes general neuron.exe Reference 149 neuron/general/classes/vector/vect2.html#interpolate IntFire1 pointprocesses neuron neuron.exe Reference 355 neuron/neuron/mech.html#IntFire1 IntFire2 pointprocesses neuron neuron.exe Reference 355 neuron/neuron/mech.html#IntFire2 IntFire4 pointprocesses neuron neuron.exe Reference 356 neuron/neuron/mech.html#IntFire4 Introduction ModelDescriptionLanguage NMODL Reference 388 neuron/nmodl/nmodl.html#Introduction inverse Matrix classes general neuron.exe Reference 87 neuron/general/classes/matrix/matrix.html#inverse IO functions general neuron.exe Reference 181 neuron/general/function/io/printf.html#IO ion neuron neuron.exe Reference 377 neuron/neuron/nrnoc.html#ion ion_style ion neuron neuron.exe Reference 377 neuron/neuron/nrnoc.html#ion_style ismembrane functions neuron neuron.exe Reference 370 neuron/neuron/nrnoc.html#ismembrane isopen File classes general neuron.exe Reference 31 neuron/general/classes/file.html#isopen issection functions neuron neuron.exe Reference 369 neuron/neuron/nrnoc.html#issection is_cas SectionRef classes neuron neuron.exe Reference 321 neuron/neuron/classes/secref.html#is_cas is_mapped PWManager classes general neuron.exe Reference 92 neuron/general/classes/pwman.html#is_mapped is_name StringFunctions classes general neuron.exe Reference 109 neuron/general/classes/strfun.html#is_name is_netcon_target MechanismType classes neuron neuron.exe Reference 275 neuron/neuron/classes/mechtype.html#is_netcon_target iterator syntax general neuron.exe Reference 239 neuron/general/ocsyntax.html#iterator ivdialog ProjectManagement tools Reference 412 neuron/project/project.html#ivdialog ivoc_style functions general neuron.exe Reference 176 neuron/general/function/0fun.html#ivoc_style jacobian CVode classes neuron neuron.exe Reference 254 neuron/neuron/classes/cvode.html#jacobian jwindow PWManager classes general neuron.exe Reference 95 neuron/general/classes/pwman.html#jwindow KeepLines Graph LookAndFeel GUI Reference 17 neuron/agui/gui.html#KeepLines keywords general neuron.exe Reference 3 neuron/0nrn.html#keywords keywords neuron neuron.exe Reference 4 neuron/1nrn.html#keywords Kinetic BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 397 neuron/nmodl/nmodl.html#Kinetic KineticBuild StandardRunTools GUI Reference 426 neuron/stdrun/celbild.html#KineticBuild KineticSchemeBuilder Builders Miscellaneous Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#KineticSchemeBuilder L Geometry Section neuron neuron.exe Reference 347 neuron/neuron/geometry.html#L label Glyph classes general neuron.exe Reference 37 neuron/general/classes/glyph.html#label label Graph classes general neuron.exe Reference 51 neuron/general/classes/graph.html#label label PlotShape classes neuron neuron.exe Reference 304 neuron/neuron/classes/pltshape.html#label label Shape classes neuron neuron.exe Reference 329 neuron/neuron/classes/shape.html#label label Vector classes general neuron.exe Reference 124 neuron/general/classes/vector/vect.html#label LandPort Other PWM LookAndFeel GUI Reference 14 neuron/agui/gui.html#LandPort leader PWManager classes general neuron.exe Reference 93 neuron/general/classes/pwman.html#leader left RangeVarPlot classes neuron neuron.exe Reference 310 neuron/neuron/classes/rvarplt.html#left left StringFunctions classes general neuron.exe Reference 109 neuron/general/classes/strfun.html#left len StringFunctions classes general neuron.exe Reference 107 neuron/general/classes/strfun.html#len len_scale PlotShape classes neuron neuron.exe Reference 307 neuron/neuron/classes/pltshape.html#len_scale len_scale Shape classes neuron neuron.exe Reference 331 neuron/neuron/classes/shape.html#len_scale line Graph classes general neuron.exe Reference 56 neuron/general/classes/graph.html#line line PlotShape classes neuron neuron.exe Reference 304 neuron/neuron/classes/pltshape.html#line line Shape classes neuron neuron.exe Reference 328 neuron/neuron/classes/shape.html#line line Vector classes general neuron.exe Reference 141 neuron/general/classes/vector/vect.html#line LinearMechanism classes neuron neuron.exe Reference 264 neuron/neuron/classes/linmod.html#LinearMechanism line_info Graph classes general neuron.exe Reference 50 neuron/general/classes/graph.html#line_info line_to Glyph classes general neuron.exe Reference 35 neuron/general/classes/glyph.html#line_to List classes general neuron.exe Reference 65 neuron/general/classes/list.html#List list RangeVarPlot classes neuron neuron.exe Reference 310 neuron/neuron/classes/rvarplt.html#list LoadDLL File NEURONMainMenu GUI Reference 415 neuron/stdrun/0stdrun.html#LoadDLL LoadHoc File NEURONMainMenu GUI Reference 415 neuron/stdrun/0stdrun.html#LoadHoc LoadSession File NEURONMainMenu GUI Reference 415 neuron/stdrun/0stdrun.html#LoadSession load_file functions general neuron.exe Reference 204 neuron/general/function/ocfunc.html#load_file load_func functions general neuron.exe Reference 205 neuron/general/function/ocfunc.html#load_func load_proc functions general neuron.exe Reference 203 neuron/general/function/ocfunc.html#load_proc load_template functions general neuron.exe Reference 205 neuron/general/function/ocfunc.html#load_template loc Impedance classes neuron neuron.exe Reference 261 neuron/neuron/classes/impedanc.html#loc Local BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 394 neuron/nmodl/nmodl.html#Local local keywords general neuron.exe Reference 233 neuron/general/keywords/ockeywor.html#local Localvariabledt VariableStepControl Tools NEURONMainMenu GUI Reference 418 neuron/stdrun/0stdrun.html#Localvariabledt Location Electrode StandardRunTools GUI Reference 429 neuron/stdrun/electrod.html#Location log math functions general neuron.exe Reference 216 neuron/general/function/sin.html#log log Vector classes general neuron.exe Reference 157 neuron/general/classes/vector/vect2.html#log log10 math functions general neuron.exe Reference 216 neuron/general/function/sin.html#log10 log10 Vector classes general neuron.exe Reference 158 neuron/general/classes/vector/vect2.html#log10 LogAvsX Impedance Tools NEURONMainMenu GUI Reference 424 neuron/stdrun/0stdrun.html#LogAvsX LogAvsX ImpedanceTools StandardRunTools GUI Reference 437 neuron/stdrun/impedanx.html#LogAvsX lognormal Random classes general neuron.exe Reference 102 neuron/general/classes/random.html#lognormal look ParallelContext classes neuron neuron.exe Reference 296 neuron/neuron/classes/parcon.html#look LookAndFeel GUI Reference 5 neuron/agui/gui.html#LookAndFeel look_take ParallelContext classes neuron neuron.exe Reference 296 neuron/neuron/classes/parcon.html#look_take lw obsolete functions general neuron.exe Reference 191 neuron/general/function/obsolete/lw.html#lw machine_name functions general neuron.exe Reference 205 neuron/general/function/ocfunc.html#machine_name mag Vector classes general neuron.exe Reference 163 neuron/general/classes/vector/vect2.html#mag make MechanismType classes neuron neuron.exe Reference 273 neuron/neuron/classes/mechtype.html#make manager PWManager classes general neuron.exe Reference 94 neuron/general/classes/pwman.html#manager Managers DistributedMechanisms Tools NEURONMainMenu GUI Reference 418 neuron/stdrun/0stdrun.html#Managers Managers PointProcesses Tools NEURONMainMenu GUI Reference 441 neuron/stdrun/pointman.html#Managers map Deck classes general neuron.exe Reference 23 neuron/general/classes/deck.html#map map PWManager classes general neuron.exe Reference 92 neuron/general/classes/pwman.html#map map TextEditor classes general neuron.exe Reference 112 neuron/general/classes/tedit.html#map map VBox classes general neuron.exe Reference 114 neuron/general/classes/vbox.html#map mark Graph classes general neuron.exe Reference 57 neuron/general/classes/graph.html#mark mark PlotShape classes neuron neuron.exe Reference 304 neuron/neuron/classes/pltshape.html#mark mark Shape classes neuron neuron.exe Reference 329 neuron/neuron/classes/shape.html#mark mark Vector classes general neuron.exe Reference 143 neuron/general/classes/vector/vect.html#mark math functions general neuron.exe Reference 215 neuron/general/function/sin.html#math Matrix classes general neuron.exe Reference 70 neuron/general/classes/matrix/matrix.html#Matrix max Vector classes general neuron.exe Reference 160 neuron/general/classes/vector/vect2.html#max maxorder CVode classes neuron neuron.exe Reference 253 neuron/neuron/classes/cvode.html#maxorder max_ind Vector classes general neuron.exe Reference 160 neuron/general/classes/vector/vect2.html#max_ind MCellRan4 Random classes general neuron.exe Reference 98 neuron/general/classes/random.html#MCellRan4 mcell_ran4 functions general neuron.exe Reference 187 neuron/general/function/mcran4.html#mcell_ran4 mcell_ran4_init functions general neuron.exe Reference 189 neuron/general/function/mcran4.html#mcell_ran4_init mean Vector classes general neuron.exe Reference 161 neuron/general/classes/vector/vect2.html#mean meansqerr Vector classes general neuron.exe Reference 165 neuron/general/classes/vector/vect2.html#meansqerr mechanisms neuron neuron.exe Reference 357 neuron/neuron/mech.html#mechanisms MechanismsGlobals Viewers DistributedMechanisms Tools NEURONMainMenu GUI Reference 419 neuron/stdrun/0stdrun.html#MechanismsGlobals MechanismStandard classes neuron neuron.exe Reference 266 neuron/neuron/classes/mechstan.html#MechanismStandard MechanismType classes neuron neuron.exe Reference 271 neuron/neuron/classes/mechtype.html#MechanismType MechType ShowMechanism StandardRunTools GUI Reference 452 neuron/stdrun/showmech.html#MechType medfltr Vector classes general neuron.exe Reference 153 neuron/general/classes/vector/vect2.html#medfltr median Vector classes general neuron.exe Reference 153 neuron/general/classes/vector/vect2.html#median menu MechanismType classes neuron neuron.exe Reference 274 neuron/neuron/classes/mechtype.html#menu Menu Panel LookAndFeel GUI Reference 9 neuron/agui/gui.html#Menu MenuExplore StandardRunTools GUI Reference 451 neuron/stdrun/shapebox.html#MenuExplore menu_action Graph classes general neuron.exe Reference 60 neuron/general/classes/graph.html#menu_action menu_action PlotShape classes neuron neuron.exe Reference 302 neuron/neuron/classes/pltshape.html#menu_action menu_action Shape classes neuron neuron.exe Reference 327 neuron/neuron/classes/shape.html#menu_action menu_remove Graph classes general neuron.exe Reference 60 neuron/general/classes/graph.html#menu_remove menu_tool Graph classes general neuron.exe Reference 61 neuron/general/classes/graph.html#menu_tool menu_tool PlotShape classes neuron neuron.exe Reference 302 neuron/neuron/classes/pltshape.html#menu_tool menu_tool Shape classes neuron neuron.exe Reference 329 neuron/neuron/classes/shape.html#menu_tool min Vector classes general neuron.exe Reference 160 neuron/general/classes/vector/vect2.html#min min_ind Vector classes general neuron.exe Reference 160 neuron/general/classes/vector/vect2.html#min_ind Miscellaneous Tools NEURONMainMenu GUI Reference 418 neuron/stdrun/0stdrun.html#Miscellaneous mktemp File classes general neuron.exe Reference 29 neuron/general/classes/file.html#mktemp MLCG Random classes general neuron.exe Reference 97 neuron/general/classes/random.html#MLCG ModelDescriptionIssues CVode classes neuron neuron.exe Reference 257 neuron/neuron/classes/cvode.html#ModelDescriptionIssues ModelDescriptionLanguage NMODL Reference 388 neuron/nmodl/nmodl.html#ModelDescriptionLanguage MoveText Graph LookAndFeel GUI Reference 18 neuron/agui/gui.html#MoveText MoveText PlotShape LookAndFeel GUI Reference 21 neuron/agui/pltshape.html#MoveText move_last Deck classes general neuron.exe Reference 25 neuron/general/classes/deck.html#move_last move_to Glyph classes general neuron.exe Reference 35 neuron/general/classes/glyph.html#move_to mul Vector classes general neuron.exe Reference 164 neuron/general/classes/vector/vect2.html#mul mulm Matrix classes general neuron.exe Reference 81 neuron/general/classes/matrix/matrix.html#mulm MulRunFitter StandardRunTools GUI Reference 438 neuron/stdrun/mulfit.html#MulRunFitter muls Matrix classes general neuron.exe Reference 82 neuron/general/classes/matrix/matrix.html#muls MultipleRunFitter Fitting Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#MultipleRunFitter mulv Matrix classes general neuron.exe Reference 77 neuron/general/classes/matrix/matrix.html#mulv n3d Geometry Section neuron neuron.exe Reference 342 neuron/neuron/geometry.html#n3d name MechanismStandard classes neuron neuron.exe Reference 271 neuron/neuron/classes/mechstan.html#name name PWManager classes general neuron.exe Reference 96 neuron/general/classes/pwman.html#name NameValues Viewers DistributedMechanisms Tools NEURONMainMenu GUI Reference 419 neuron/stdrun/0stdrun.html#NameValues name_declared functions general neuron.exe Reference 207 neuron/general/function/ocfunc.html#name_declared nchild SectionRef classes neuron neuron.exe Reference 321 neuron/neuron/classes/secref.html#nchild ncol Matrix classes general neuron.exe Reference 73 neuron/general/classes/matrix/matrix.html#ncol nearest PlotShape classes neuron neuron.exe Reference 303 neuron/neuron/classes/pltshape.html#nearest nearest Shape classes neuron neuron.exe Reference 330 neuron/neuron/classes/shape.html#nearest negexp Random classes general neuron.exe Reference 105 neuron/general/classes/random.html#negexp nernst ion neuron neuron.exe Reference 378 neuron/neuron/nrnoc.html#nernst NetCon classes neuron neuron.exe Reference 275 neuron/neuron/classes/netcon.html#NetCon netconlist CVode classes neuron neuron.exe Reference 255 neuron/neuron/classes/cvode.html#netconlist NetStim pointprocesses neuron neuron.exe Reference 354 neuron/neuron/mech.html#NetStim NetworkBuilder Build NEURONMainMenu GUI Reference 417 neuron/stdrun/0stdrun.html#NetworkBuilder NetworkCell Build NEURONMainMenu GUI Reference 416 neuron/stdrun/0stdrun.html#NetworkCell neuron neuron.exe Reference 4 neuron/1nrn.html#neuron Neuron NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 400 neuron/nmodl/nmodl2.html#Neuron neuron.exe Reference 3 neuron/0nrn.html#neuron.exe neuronhome functions general neuron.exe Reference 221 neuron/general/function/system.html#neuronhome NEURONMainMenu GUI Reference 413 neuron/stdrun/0stdrun.html#NEURONMainMenu new ObjectOrientedProgramming general neuron.exe Reference 245 neuron/general/oop.html#new NewAxis AxisType Graph LookAndFeel GUI Reference 17 neuron/agui/gui.html#NewAxis NewView Scene LookAndFeel GUI Reference 6 neuron/agui/gui.html#NewView new_path Glyph classes general neuron.exe Reference 35 neuron/general/classes/glyph.html#new_path nhost ParallelContext classes neuron neuron.exe Reference 288 neuron/neuron/classes/parcon.html#nhost NMODL Reference 388 neuron/nmodl/nmodl.html#NMODL NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 400 neuron/nmodl/nmodl2.html#NMODLtoNEURON Nonlinear BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 396 neuron/nmodl/nmodl.html#Nonlinear Nonspecific_Current NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 402 neuron/nmodl/nmodl2.html#Nonspecific_Current normal Random classes general neuron.exe Reference 101 neuron/general/classes/random.html#normal Notification mcell_ran4_init functions general neuron.exe Reference 189 neuron/general/function/notify.html#Notification nrnglobalmechmenu functions neuron neuron.exe Reference 333 neuron/neuron/function/nfunc.html#nrnglobalmechmenu nrnmechmenu functions neuron neuron.exe Reference 333 neuron/neuron/function/nfunc.html#nrnmechmenu nrnpointmenu functions neuron neuron.exe Reference 333 neuron/neuron/function/nfunc.html#nrnpointmenu nrnsecmenu functions neuron neuron.exe Reference 334 neuron/neuron/function/nfunc.html#nrnsecmenu nrn_load_dll functions general neuron.exe Reference 222 neuron/general/function/system.html#nrn_load_dll nrow Matrix classes general neuron.exe Reference 73 neuron/general/classes/matrix/matrix.html#nrow nseg Topology Section neuron neuron.exe Reference 387 neuron/neuron/topology.html#nseg numarg functions general neuron.exe Reference 201 neuron/general/function/ocfunc.html#numarg NumberOfDataRegions Extras RunFitter StandardRunTools GUI Reference 449 neuron/stdrun/runfit.html#NumberOfDataRegions object List classes general neuron.exe Reference 70 neuron/general/classes/list.html#object ObjectName Scene LookAndFeel GUI Reference 8 neuron/agui/gui.html#ObjectName ObjectOrientedProgramming general neuron.exe Reference 241 neuron/general/oop.html#ObjectOrientedProgramming objectvar ObjectOrientedProgramming general neuron.exe Reference 243 neuron/general/oop.html#objectvar object_id functions general neuron.exe Reference 200 neuron/general/function/ocfunc.html#object_id object_pop functions general neuron.exe Reference 206 neuron/general/function/ocfunc.html#object_pop object_push functions general neuron.exe Reference 206 neuron/general/function/ocfunc.html#object_push objref ObjectOrientedProgramming general neuron.exe Reference 243 neuron/general/oop.html#objref observe PlotShape classes neuron neuron.exe Reference 303 neuron/neuron/classes/pltshape.html#observe observe Shape classes neuron neuron.exe Reference 323 neuron/neuron/classes/shape.html#observe obsolete functions general neuron.exe Reference 190 neuron/general/function/obsolete/lw.html#obsolete origin RangeVarPlot classes neuron neuron.exe Reference 309 neuron/neuron/classes/rvarplt.html#origin Other PWM LookAndFeel GUI Reference 13 neuron/agui/gui.html#Other out MechanismStandard classes neuron neuron.exe Reference 269 neuron/neuron/classes/mechstan.html#out pack ParallelContext classes neuron neuron.exe Reference 297 neuron/neuron/classes/parcon.html#pack Panel LookAndFeel GUI Reference 9 neuron/agui/gui.html#Panel panel MechanismStandard classes neuron neuron.exe Reference 268 neuron/neuron/classes/mechstan.html#panel PaperItem PWM LookAndFeel GUI Reference 11 neuron/agui/gui.html#PaperItem ParallelContext classes neuron neuron.exe Reference 284 neuron/neuron/classes/parcon.html#ParallelContext Parameter BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 392 neuron/nmodl/nmodl.html#Parameter ParameterizedFunction Fitting Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#ParameterizedFunction ParameterRangeLimits FittoData FunctionFitter StandardRunTools GUI Reference 433 neuron/stdrun/funfit.html#ParameterRangeLimits ParameterRanges Extras RunFitter StandardRunTools GUI Reference 449 neuron/stdrun/runfit.html#ParameterRanges Parameterstovary RunFitter StandardRunTools GUI Reference 448 neuron/stdrun/runfit.html#Parameterstovary parent SectionRef classes neuron neuron.exe Reference 320 neuron/neuron/classes/secref.html#parent parent_connection functions neuron neuron.exe Reference 375 neuron/neuron/nrnoc.html#parent_connection parent_node functions neuron neuron.exe Reference 375 neuron/neuron/nrnoc.html#parent_node parent_section functions neuron neuron.exe Reference 374 neuron/neuron/nrnoc.html#parent_section pas mechanisms neuron neuron.exe Reference 358 neuron/neuron/mech.html#pas Path Impedance Tools NEURONMainMenu GUI Reference 424 neuron/stdrun/0stdrun.html#Path PhasePlane Graph NEURONMainMenu GUI Reference 421 neuron/stdrun/0stdrun.html#PhasePlane PickVector Graph LookAndFeel GUI Reference 16 neuron/agui/gui.html#PickVector play Random classes general neuron.exe Reference 99 neuron/general/classes/random.html#play play Vector classes general neuron.exe Reference 126 neuron/general/classes/vector/vect.html#play Play Vector NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#Play play_remove Vector classes general neuron.exe Reference 127 neuron/general/classes/vector/vect.html#play_remove Plot FunctionFitter StandardRunTools GUI Reference 430 neuron/stdrun/funfit.html#Plot plot Graph classes general neuron.exe Reference 45 neuron/general/classes/graph.html#plot Plot Grapher StandardRunTools GUI Reference 435 neuron/stdrun/grapher.html#Plot plot obsolete functions general neuron.exe Reference 194 neuron/general/function/obsolete/plot.html#plot plot Vector classes general neuron.exe Reference 140 neuron/general/classes/vector/vect.html#plot ploterr Vector classes general neuron.exe Reference 142 neuron/general/classes/vector/vect.html#ploterr PlotRange Graph LookAndFeel GUI Reference 16 neuron/agui/gui.html#PlotRange PlotShape classes neuron neuron.exe Reference 300 neuron/neuron/classes/pltshape.html#PlotShape PlotShape LookAndFeel GUI Reference 19 neuron/agui/pltshape.html#PlotShape Plotsms RunControl StandardRunTools GUI Reference 446 neuron/stdrun/runctrl.html#Plotsms PlotWhat Graph LookAndFeel GUI Reference 16 neuron/agui/gui.html#PlotWhat PlotWhat PlotShape LookAndFeel GUI Reference 20 neuron/agui/pltshape.html#PlotWhat plotx obsolete functions general neuron.exe Reference 194 neuron/general/function/obsolete/plot.html#plotx ploty obsolete functions general neuron.exe Reference 194 neuron/general/function/obsolete/plot.html#ploty plt obsolete functions general neuron.exe Reference 196 neuron/general/function/obsolete/plt.html#plt Pointer classes general neuron.exe Reference 90 neuron/general/classes/pointer.html#Pointer Pointer NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 405 neuron/nmodl/nmodl2.html#Pointer Pointer-Communication ConnectingMechanismsTogether ModelDescriptionLanguage NMODL Reference 406 neuron/nmodl/nmodl2.html#Pointer-Communication PointGroup Managers PointProcesses Tools NEURONMainMenu GUI Reference 441 neuron/stdrun/pointman.html#PointGroup PointManager Managers PointProcesses Tools NEURONMainMenu GUI Reference 441 neuron/stdrun/pointman.html#PointManager pointprocesses neuron neuron.exe Reference 348 neuron/neuron/mech.html#pointprocesses PointProcesses Tools NEURONMainMenu GUI Reference 418 neuron/stdrun/0stdrun.html#PointProcesses PointProcesses Viewers PointProcesses Tools NEURONMainMenu GUI Reference 442 neuron/stdrun/pointman.html#PointProcesses PointProcessGroupManager StandardRunTools GUI Reference 443 neuron/stdrun/pointman.html#PointProcessGroupManager PointProcessLocator StandardRunTools GUI Reference 452 neuron/stdrun/shapebox.html#PointProcessLocator PointProcessManager StandardRunTools GUI Reference 442 neuron/stdrun/pointman.html#PointProcessManager point_mark Shape classes neuron neuron.exe Reference 326 neuron/neuron/classes/shape.html#point_mark point_mark_remove Shape classes neuron neuron.exe Reference 326 neuron/neuron/classes/shape.html#point_mark_remove Point_Process NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 404 neuron/nmodl/nmodl2.html#Point_Process poisson Random classes general neuron.exe Reference 103 neuron/general/classes/random.html#poisson pop_section CurrentlyAccessedSection Section neuron neuron.exe Reference 383 neuron/neuron/secspec.html#pop_section post ParallelContext classes neuron neuron.exe Reference 295 neuron/neuron/classes/parcon.html#post postcell NetCon classes neuron neuron.exe Reference 280 neuron/neuron/classes/netcon.html#postcell postcelllist NetCon classes neuron neuron.exe Reference 281 neuron/neuron/classes/netcon.html#postcelllist postloc NetCon classes neuron neuron.exe Reference 279 neuron/neuron/classes/netcon.html#postloc PostScript PrintToFile PWM LookAndFeel GUI Reference 12 neuron/agui/gui.html#PostScript pow Matrix classes general neuron.exe Reference 86 neuron/general/classes/matrix/matrix.html#pow pow Vector classes general neuron.exe Reference 157 neuron/general/classes/vector/vect2.html#pow PraxisFit FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#PraxisFit pre NetCon classes neuron neuron.exe Reference 278 neuron/neuron/classes/netcon.html#pre precell NetCon classes neuron neuron.exe Reference 279 neuron/neuron/classes/netcon.html#precell precelllist NetCon classes neuron neuron.exe Reference 281 neuron/neuron/classes/netcon.html#precelllist predeclared-variables general neuron.exe Reference 246 neuron/general/predec.html#predeclared-variables prelist NetCon classes neuron neuron.exe Reference 280 neuron/neuron/classes/netcon.html#prelist preloc NetCon classes neuron neuron.exe Reference 278 neuron/neuron/classes/netcon.html#preloc prepend List classes general neuron.exe Reference 65 neuron/general/classes/list.html#prepend print keywords general neuron.exe Reference 229 neuron/general/keywords/ockeywor.html#print Print PWM LookAndFeel GUI Reference 12 neuron/agui/gui.html#Print printf File classes general neuron.exe Reference 29 neuron/general/classes/file.html#printf printf IO functions general neuron.exe Reference 181 neuron/general/function/io/printf.html#printf printf Matrix classes general neuron.exe Reference 75 neuron/general/classes/matrix/matrix.html#printf printf Vector classes general neuron.exe Reference 138 neuron/general/classes/vector/vect.html#printf printfile Graph classes general neuron.exe Reference 59 neuron/general/classes/graph.html#printfile printfile PlotShape classes neuron neuron.exe Reference 302 neuron/neuron/classes/pltshape.html#printfile printfile Shape classes neuron neuron.exe Reference 327 neuron/neuron/classes/shape.html#printfile printnames SectionList classes neuron neuron.exe Reference 318 neuron/neuron/classes/seclist.html#printnames PrintToFile PWM LookAndFeel GUI Reference 12 neuron/agui/gui.html#PrintToFile print_session functions general neuron.exe Reference 198 neuron/general/function/ocfunc.html#print_session priority VBox classes general neuron.exe Reference 117 neuron/general/classes/vbox.html#priority prjnrnci ProjectManagement tools Reference 411 neuron/project/project.html#prjnrnci prjnrncmp ProjectManagement tools Reference 410 neuron/project/project.html#prjnrncmp prjnrnco ProjectManagement tools Reference 411 neuron/project/project.html#prjnrnco prjnrninit ProjectManagement tools Reference 410 neuron/project/project.html#prjnrninit prjnrnpr ProjectManagement tools Reference 411 neuron/project/project.html#prjnrnpr prmat functions general neuron.exe Reference 199 neuron/general/function/ocfunc.html#prmat proc syntax general neuron.exe Reference 238 neuron/general/ocsyntax.html#proc Procedure BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 397 neuron/nmodl/nmodl.html#Procedure ProjectManagement tools Reference 407 neuron/project/project.html#ProjectManagement prstim functions neuron neuron.exe Reference 368 neuron/neuron/nrnoc.html#prstim psection functions neuron neuron.exe Reference 372 neuron/neuron/nrnoc.html#psection psth Vector classes general neuron.exe Reference 173 neuron/general/classes/vector/vneur.html#psth pt3dadd Geometry Section neuron neuron.exe Reference 340 neuron/neuron/geometry.html#pt3dadd pt3dchange Geometry Section neuron neuron.exe Reference 342 neuron/neuron/geometry.html#pt3dchange pt3dclear Geometry Section neuron neuron.exe Reference 340 neuron/neuron/geometry.html#pt3dclear pt3dconst Geometry Section neuron neuron.exe Reference 340 neuron/neuron/geometry.html#pt3dconst pt3dinsert Geometry Section neuron neuron.exe Reference 341 neuron/neuron/geometry.html#pt3dinsert pt3dremove Geometry Section neuron neuron.exe Reference 341 neuron/neuron/geometry.html#pt3dremove public ObjectOrientedProgramming general neuron.exe Reference 244 neuron/general/oop.html#public push_section CurrentlyAccessedSection Section neuron neuron.exe Reference 384 neuron/neuron/secspec.html#push_section push_selected PlotShape classes neuron neuron.exe Reference 303 neuron/neuron/classes/pltshape.html#push_selected push_selected Shape classes neuron neuron.exe Reference 330 neuron/neuron/classes/shape.html#push_selected pval_praxis functions neuron neuron.exe Reference 367 neuron/neuron/nrnoc.html#pval_praxis PWM LookAndFeel GUI Reference 10 neuron/agui/gui.html#PWM PWManager classes general neuron.exe Reference 91 neuron/general/classes/pwman.html#PWManager pwman_place functions general neuron.exe Reference 214 neuron/general/function/pwmplace.html#pwman_place Quiet RunControl StandardRunTools GUI Reference 446 neuron/stdrun/runctrl.html#Quiet Quit File NEURONMainMenu GUI Reference 416 neuron/stdrun/0stdrun.html#Quit quit functions general neuron.exe Reference 206 neuron/general/function/ocfunc.html#quit Quit Other PWM LookAndFeel GUI Reference 15 neuron/agui/gui.html#Quit Ra Geometry Section neuron neuron.exe Reference 347 neuron/neuron/geometry.html#Ra Random classes general neuron.exe Reference 96 neuron/general/classes/random.html#Random Range NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 401 neuron/nmodl/nmodl2.html#Range RangeVarPlot classes neuron neuron.exe Reference 308 neuron/neuron/classes/rvarplt.html#RangeVarPlot ratio Impedance classes neuron neuron.exe Reference 263 neuron/neuron/classes/impedanc.html#ratio Rationale Introduction ModelDescriptionLanguage NMODL Reference 390 neuron/nmodl/nmodl.html#Rationale read keywords general neuron.exe Reference 229 neuron/general/keywords/ockeywor.html#read Read Useion NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 403 neuron/nmodl/nmodl2.html#Read ReadData RunFitter StandardRunTools GUI Reference 447 neuron/stdrun/runfit.html#ReadData ReadDataFile FittoData FunctionFitter StandardRunTools GUI Reference 432 neuron/stdrun/funfit.html#ReadDataFile readonly TextEditor classes general neuron.exe Reference 112 neuron/general/classes/tedit.html#readonly RealTime RunControl StandardRunTools GUI Reference 446 neuron/stdrun/runctrl.html#RealTime rebin Vector classes general neuron.exe Reference 156 neuron/general/classes/vector/vect2.html#rebin recentdir File NEURONMainMenu GUI Reference 416 neuron/stdrun/0stdrun.html#recentdir record CVode classes neuron neuron.exe Reference 256 neuron/neuron/classes/cvode.html#record record NetCon classes neuron neuron.exe Reference 283 neuron/neuron/classes/netcon.html#record record Vector classes general neuron.exe Reference 124 neuron/general/classes/vector/vect.html#record record_remove CVode classes neuron neuron.exe Reference 257 neuron/neuron/classes/cvode.html#record_remove reduce Vector classes general neuron.exe Reference 149 neuron/general/classes/vector/vect.html#reduce ref VBox classes general neuron.exe Reference 115 neuron/general/classes/vbox.html#ref Reference 3 neuron/0nrn.html#Reference regraph obsolete functions general neuron.exe Reference 194 neuron/general/function/obsolete/plot.html#regraph relative Graph classes general neuron.exe Reference 53 neuron/general/classes/graph.html#relative remove Deck classes general neuron.exe Reference 26 neuron/general/classes/deck.html#remove remove List classes general neuron.exe Reference 66 neuron/general/classes/list.html#remove remove MechanismType classes neuron neuron.exe Reference 273 neuron/neuron/classes/mechtype.html#remove remove SectionList classes neuron neuron.exe Reference 317 neuron/neuron/classes/seclist.html#remove remove Vector classes general neuron.exe Reference 129 neuron/general/classes/vector/vect.html#remove Removeparmfromlist Extras RunFitter StandardRunTools GUI Reference 449 neuron/stdrun/runfit.html#Removeparmfromlist remove_all List classes general neuron.exe Reference 66 neuron/general/classes/list.html#remove_all remove_last Deck classes general neuron.exe Reference 25 neuron/general/classes/deck.html#remove_last repick Random classes general neuron.exe Reference 99 neuron/general/classes/random.html#repick resample Vector classes general neuron.exe Reference 175 neuron/general/classes/vector/vneur.html#resample resize Matrix classes general neuron.exe Reference 73 neuron/general/classes/matrix/matrix.html#resize resize Vector classes general neuron.exe Reference 121 neuron/general/classes/vector/vect.html#resize restore SaveState classes neuron neuron.exe Reference 313 neuron/neuron/classes/savstate.html#restore Retrieve Session PWM LookAndFeel GUI Reference 13 neuron/agui/gui.html#Retrieve retrieveaudit functions general neuron.exe Reference 205 neuron/general/function/ocfunc.html#retrieveaudit RetrievefromFile Vector NEURONMainMenu GUI Reference 422 neuron/stdrun/0stdrun.html#RetrievefromFile return keywords general neuron.exe Reference 223 neuron/general/keywords/ockeywor.html#return Returnlevel VClampFamily Electrode StandardRunTools GUI Reference 428 neuron/stdrun/electrod.html#Returnlevel retval ParallelContext classes neuron neuron.exe Reference 292 neuron/neuron/classes/parcon.html#retval reverse Vector classes general neuron.exe Reference 155 neuron/general/classes/vector/vect2.html#reverse re_init CVode classes neuron neuron.exe Reference 252 neuron/neuron/classes/cvode.html#re_init ri Geometry Section neuron neuron.exe Reference 346 neuron/neuron/geometry.html#ri right RangeVarPlot classes neuron neuron.exe Reference 310 neuron/neuron/classes/rvarplt.html#right right StringFunctions classes general neuron.exe Reference 108 neuron/general/classes/strfun.html#right root SectionRef classes neuron neuron.exe Reference 321 neuron/neuron/classes/secref.html#root ropen File classes general neuron.exe Reference 27 neuron/general/classes/file.html#ropen ropen IO functions general neuron.exe Reference 185 neuron/general/function/io/ropen.html#ropen rotate PlotShape classes neuron neuron.exe Reference 307 neuron/neuron/classes/pltshape.html#rotate rotate Shape classes neuron neuron.exe Reference 331 neuron/neuron/classes/shape.html#rotate rotate Vector classes general neuron.exe Reference 155 neuron/general/classes/vector/vect2.html#rotate Rotate3D PlotShape LookAndFeel GUI Reference 19 neuron/agui/pltshape.html#Rotate3D RoughFit FunctionFitter StandardRunTools GUI Reference 432 neuron/stdrun/funfit.html#RoughFit Roughfit RunFitter StandardRunTools GUI Reference 451 neuron/stdrun/runfit.html#Roughfit RoundView Scene LookAndFeel GUI Reference 7 neuron/agui/gui.html#RoundView rtol CVode classes neuron neuron.exe Reference 250 neuron/neuron/classes/cvode.html#rtol run SymChooser classes general neuron.exe Reference 110 neuron/general/classes/symchoos.html#run RunControl StandardRunTools GUI Reference 444 neuron/stdrun/runctrl.html#RunControl RunControl Tools NEURONMainMenu GUI Reference 417 neuron/stdrun/0stdrun.html#RunControl RunFitter Fitting Tools NEURONMainMenu GUI Reference 423 neuron/stdrun/0stdrun.html#RunFitter RunFitter StandardRunTools GUI Reference 446 neuron/stdrun/runfit.html#RunFitter Running FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#Running Running RunFitter StandardRunTools GUI Reference 451 neuron/stdrun/runfit.html#Running runworker ParallelContext classes neuron neuron.exe Reference 292 neuron/neuron/classes/parcon.html#runworker s Pointer classes general neuron.exe Reference 91 neuron/general/classes/pointer.html#s save Deck classes general neuron.exe Reference 24 neuron/general/classes/deck.html#save save MechanismStandard classes neuron neuron.exe Reference 270 neuron/neuron/classes/mechstan.html#save save PWManager classes general neuron.exe Reference 94 neuron/general/classes/pwman.html#save save SaveState classes neuron neuron.exe Reference 312 neuron/neuron/classes/savstate.html#save save VBox classes general neuron.exe Reference 115 neuron/general/classes/vbox.html#save SaveAll Session PWM LookAndFeel GUI Reference 13 neuron/agui/gui.html#SaveAll saveaudit functions general neuron.exe Reference 205 neuron/general/function/ocfunc.html#saveaudit SaveRestoreFitParams Extras RunFitter StandardRunTools GUI Reference 449 neuron/stdrun/runfit.html#SaveRestoreFitParams SaveRestoreFunction FittoData FunctionFitter StandardRunTools GUI Reference 433 neuron/stdrun/funfit.html#SaveRestoreFunction SaveSelected Session PWM LookAndFeel GUI Reference 13 neuron/agui/gui.html#SaveSelected savesession File NEURONMainMenu GUI Reference 415 neuron/stdrun/0stdrun.html#savesession SaveState classes neuron neuron.exe Reference 312 neuron/neuron/classes/savstate.html#SaveState SavetoFile Vector NEURONMainMenu GUI Reference 421 neuron/stdrun/0stdrun.html#SavetoFile save_name Graph classes general neuron.exe Reference 55 neuron/general/classes/graph.html#save_name save_name PlotShape classes neuron neuron.exe Reference 302 neuron/neuron/classes/pltshape.html#save_name save_name Shape classes neuron neuron.exe Reference 326 neuron/neuron/classes/shape.html#save_name save_session functions general neuron.exe Reference 198 neuron/general/function/ocfunc.html#save_session scale PlotShape classes neuron neuron.exe Reference 300 neuron/neuron/classes/pltshape.html#scale scale PWManager classes general neuron.exe Reference 95 neuron/general/classes/pwman.html#scale scale Vector classes general neuron.exe Reference 164 neuron/general/classes/vector/vect2.html#scale scanf Matrix classes general neuron.exe Reference 76 neuron/general/classes/matrix/matrix.html#scanf scanf Vector classes general neuron.exe Reference 139 neuron/general/classes/vector/vect.html#scanf scanstr File classes general neuron.exe Reference 30 neuron/general/classes/file.html#scanstr scantil Vector classes general neuron.exe Reference 140 neuron/general/classes/vector/vect.html#scantil scanvar File classes general neuron.exe Reference 30 neuron/general/classes/file.html#scanvar Scene LookAndFeel GUI Reference 5 neuron/agui/gui.html#Scene Scene_equal_View Scene LookAndFeel GUI Reference 8 neuron/agui/gui.html#Scene_equal_View ScreenItem PWM LookAndFeel GUI Reference 11 neuron/agui/gui.html#ScreenItem sec SectionRef classes neuron neuron.exe Reference 319 neuron/neuron/classes/secref.html#sec SEClamp pointprocesses neuron neuron.exe Reference 350 neuron/neuron/mech.html#SEClamp secname functions neuron neuron.exe Reference 371 neuron/neuron/nrnoc.html#secname secondorder globals neuron neuron.exe Reference 372 neuron/neuron/nrnoc.html#secondorder Section neuron neuron.exe Reference 334 neuron/neuron/geometry.html#Section Section PlotShape LookAndFeel GUI Reference 19 neuron/agui/pltshape.html#Section SectionBrowser classes neuron neuron.exe Reference 314 neuron/neuron/classes/secbrows.html#SectionBrowser SectionList classes neuron neuron.exe Reference 316 neuron/neuron/classes/seclist.html#SectionList sectionname functions neuron neuron.exe Reference 371 neuron/neuron/nrnoc.html#sectionname SectionRef classes neuron neuron.exe Reference 319 neuron/neuron/classes/secref.html#SectionRef section_orientation functions neuron neuron.exe Reference 375 neuron/neuron/nrnoc.html#section_orientation seek File classes general neuron.exe Reference 33 neuron/general/classes/file.html#seek select List classes general neuron.exe Reference 68 neuron/general/classes/list.html#select select MechanismType classes neuron neuron.exe Reference 272 neuron/neuron/classes/mechtype.html#select select SectionBrowser classes neuron neuron.exe Reference 315 neuron/neuron/classes/secbrows.html#select select Shape classes neuron neuron.exe Reference 324 neuron/neuron/classes/shape.html#select selected List classes general neuron.exe Reference 68 neuron/general/classes/list.html#selected selected MechanismType classes neuron neuron.exe Reference 273 neuron/neuron/classes/mechtype.html#selected SelectPrinter Other PWM LookAndFeel GUI Reference 14 neuron/agui/gui.html#SelectPrinter select_action List classes general neuron.exe Reference 69 neuron/general/classes/list.html#select_action select_action SectionBrowser classes neuron neuron.exe Reference 315 neuron/neuron/classes/secbrows.html#select_action Session PWM LookAndFeel GUI Reference 13 neuron/agui/gui.html#Session set MechanismStandard classes neuron neuron.exe Reference 270 neuron/neuron/classes/mechstan.html#set set Vector classes general neuron.exe Reference 123 neuron/general/classes/vector/vect.html#set setcol Matrix classes general neuron.exe Reference 83 neuron/general/classes/matrix/matrix.html#setcol setcolor obsolete functions general neuron.exe Reference 196 neuron/general/function/obsolete/plt.html#setcolor setdiag Matrix classes general neuron.exe Reference 83 neuron/general/classes/matrix/matrix.html#setdiag setpointer keywords general neuron.exe Reference 234 neuron/general/keywords/ockeywor.html#setpointer setrand Vector classes general neuron.exe Reference 148 neuron/general/classes/vector/vect.html#setrand setrow Matrix classes general neuron.exe Reference 83 neuron/general/classes/matrix/matrix.html#setrow setSpineArea Geometry Section neuron neuron.exe Reference 344 neuron/neuron/geometry.html#setSpineArea settext obsolete functions general neuron.exe Reference 196 neuron/general/function/obsolete/plt.html#settext SetView Scene LookAndFeel GUI Reference 7 neuron/agui/gui.html#SetView Shape classes neuron neuron.exe Reference 322 neuron/neuron/classes/shape.html#Shape Shape Impedance Tools NEURONMainMenu GUI Reference 424 neuron/stdrun/0stdrun.html#Shape ShapeBrowser StandardRunTools GUI Reference 452 neuron/stdrun/shapebox.html#ShapeBrowser ShapeName Viewers DistributedMechanisms Tools NEURONMainMenu GUI Reference 419 neuron/stdrun/0stdrun.html#ShapeName Shapeplot Graph NEURONMainMenu GUI Reference 420 neuron/stdrun/0stdrun.html#Shapeplot ShapePlot PlotShape LookAndFeel GUI Reference 21 neuron/agui/pltshape.html#ShapePlot ShapeStyle PlotShape LookAndFeel GUI Reference 20 neuron/agui/pltshape.html#ShapeStyle show PlotShape classes neuron neuron.exe Reference 301 neuron/neuron/classes/pltshape.html#show show Shape classes neuron neuron.exe Reference 323 neuron/neuron/classes/shape.html#show ShowMechanism StandardRunTools GUI Reference 452 neuron/stdrun/showmech.html#ShowMechanism show_errmess_always functions general neuron.exe Reference 207 neuron/general/function/ocfunc.html#show_errmess_always sin math functions general neuron.exe Reference 215 neuron/general/function/sin.html#sin sin Vector classes general neuron.exe Reference 148 neuron/general/classes/vector/vect.html#sin singlecompartment Build NEURONMainMenu GUI Reference 416 neuron/stdrun/0stdrun.html#singlecompartment SingleRunFit RunFitter StandardRunTools GUI Reference 450 neuron/stdrun/runfit.html#SingleRunFit SingleStep RunControl StandardRunTools GUI Reference 445 neuron/stdrun/runctrl.html#SingleStep size Graph classes general neuron.exe Reference 51 neuron/general/classes/graph.html#size size PlotShape classes neuron neuron.exe Reference 300 neuron/neuron/classes/pltshape.html#size size Shape classes neuron neuron.exe Reference 322 neuron/neuron/classes/shape.html#size size Vector classes general neuron.exe Reference 120 neuron/general/classes/vector/vect.html#size smhist Vector classes general neuron.exe Reference 146 neuron/general/classes/vector/vect.html#smhist snap PWManager classes general neuron.exe Reference 95 neuron/general/classes/pwman.html#snap solv Matrix classes general neuron.exe Reference 80 neuron/general/classes/matrix/matrix.html#solv solve CVode classes neuron neuron.exe Reference 250 neuron/neuron/classes/cvode.html#solve solve functions general neuron.exe Reference 199 neuron/general/function/ocfunc.html#solve sort Vector classes general neuron.exe Reference 154 neuron/general/classes/vector/vect2.html#sort sortindex Vector classes general neuron.exe Reference 154 neuron/general/classes/vector/vect2.html#sortindex SpacePlot PlotShape LookAndFeel GUI Reference 20 neuron/agui/pltshape.html#SpacePlot spctrm Fourier Vector classes general neuron.exe Reference 167 neuron/general/classes/vector/vect2.html#spctrm spikebin Vector classes general neuron.exe Reference 173 neuron/general/classes/vector/vneur.html#spikebin spine3d Geometry Section neuron neuron.exe Reference 344 neuron/neuron/geometry.html#spine3d sprint functions general neuron.exe Reference 199 neuron/general/function/ocfunc.html#sprint sqrt math functions general neuron.exe Reference 216 neuron/general/function/sin.html#sqrt sqrt Vector classes general neuron.exe Reference 157 neuron/general/classes/vector/vect2.html#sqrt sred IO functions general neuron.exe Reference 184 neuron/general/function/io/read.html#sred sscanf functions general neuron.exe Reference 217 neuron/general/function/sscanf.html#sscanf StandardRunTools GUI Reference 412 neuron/stdrun/0stdrun.html#StandardRunTools startsw functions general neuron.exe Reference 200 neuron/general/function/ocfunc.html#startsw State BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 393 neuron/nmodl/nmodl.html#State Stateaxis Graph NEURONMainMenu GUI Reference 420 neuron/stdrun/0stdrun.html#Stateaxis statement syntax general neuron.exe Reference 237 neuron/general/ocsyntax.html#statement statename CVode classes neuron neuron.exe Reference 255 neuron/neuron/classes/cvode.html#statename states CVode classes neuron neuron.exe Reference 254 neuron/neuron/classes/cvode.html#states statistics CVode classes neuron neuron.exe Reference 250 neuron/neuron/classes/cvode.html#statistics stderr Vector classes general neuron.exe Reference 162 neuron/general/classes/vector/vect2.html#stderr stdev Vector classes general neuron.exe Reference 162 neuron/general/classes/vector/vect2.html#stdev Steps FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#Steps Steps Grapher StandardRunTools GUI Reference 435 neuron/stdrun/grapher.html#Steps stiff CVode classes neuron neuron.exe Reference 252 neuron/neuron/classes/cvode.html#stiff stop keywords general neuron.exe Reference 225 neuron/general/keywords/ockeywor.html#stop Stop RunControl StandardRunTools GUI Reference 445 neuron/stdrun/runctrl.html#Stop StopAtNextQuadForm FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#StopAtNextQuadForm StopatnextQuadForm RunFitter StandardRunTools GUI Reference 450 neuron/stdrun/runfit.html#StopatnextQuadForm stopsw functions general neuron.exe Reference 200 neuron/general/function/ocfunc.html#stopsw stopwatch functions general neuron.exe Reference 220 neuron/general/function/system.html#stopwatch stop_praxis functions neuron neuron.exe Reference 367 neuron/neuron/nrnoc.html#stop_praxis strcmp functions general neuron.exe Reference 200 neuron/general/function/ocfunc.html#strcmp strdef keywords general neuron.exe Reference 234 neuron/general/keywords/ockeywor.html#strdef StringFunctions classes general neuron.exe Reference 107 neuron/general/classes/strfun.html#StringFunctions string_dialog dialogs functions general neuron.exe Reference 180 neuron/general/function/dialog.html#string_dialog stroke Glyph classes general neuron.exe Reference 35 neuron/general/classes/glyph.html#stroke sub Vector classes general neuron.exe Reference 163 neuron/general/classes/vector/vect2.html#sub submit ParallelContext classes neuron neuron.exe Reference 288 neuron/neuron/classes/parcon.html#submit substr StringFunctions classes general neuron.exe Reference 107 neuron/general/classes/strfun.html#substr subtree SectionList classes neuron neuron.exe Reference 317 neuron/neuron/classes/seclist.html#subtree Suffix NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 401 neuron/nmodl/nmodl2.html#Suffix sum Vector classes general neuron.exe Reference 161 neuron/general/classes/vector/vect2.html#sum sumgauss Vector classes general neuron.exe Reference 145 neuron/general/classes/vector/vect.html#sumgauss sumsq Vector classes general neuron.exe Reference 161 neuron/general/classes/vector/vect2.html#sumsq svd Matrix classes general neuron.exe Reference 87 neuron/general/classes/matrix/matrix.html#svd symbols functions general neuron.exe Reference 219 neuron/general/function/symbols.html#symbols SymChooser classes general neuron.exe Reference 109 neuron/general/classes/symchoos.html#SymChooser symmeig Matrix classes general neuron.exe Reference 89 neuron/general/classes/matrix/matrix.html#symmeig syn NetCon classes neuron neuron.exe Reference 278 neuron/neuron/classes/netcon.html#syn synlist NetCon classes neuron neuron.exe Reference 280 neuron/neuron/classes/netcon.html#synlist syntax general neuron.exe Reference 236 neuron/general/ocsyntax.html#syntax system functions general neuron.exe Reference 219 neuron/general/function/system.html#system t globals neuron neuron.exe Reference 373 neuron/neuron/nrnoc.html#t t RunControl StandardRunTools GUI Reference 444 neuron/stdrun/runctrl.html#t Table BasicNMODLStatements ModelDescriptionLanguage NMODL Reference 398 neuron/nmodl/nmodl.html#Table tail StringFunctions classes general neuron.exe Reference 108 neuron/general/classes/strfun.html#tail take ParallelContext classes neuron neuron.exe Reference 295 neuron/neuron/classes/parcon.html#take tanh math functions general neuron.exe Reference 216 neuron/general/function/sin.html#tanh tanh Vector classes general neuron.exe Reference 158 neuron/general/classes/vector/vect2.html#tanh tell File classes general neuron.exe Reference 34 neuron/general/classes/file.html#tell Testlevel VClampFamily Electrode StandardRunTools GUI Reference 428 neuron/stdrun/electrod.html#Testlevel text SymChooser classes general neuron.exe Reference 110 neuron/general/classes/symchoos.html#text text TextEditor classes general neuron.exe Reference 111 neuron/general/classes/tedit.html#text TextEditor classes general neuron.exe Reference 111 neuron/general/classes/tedit.html#TextEditor this_node functions neuron neuron.exe Reference 374 neuron/neuron/nrnoc.html#this_node this_section functions neuron neuron.exe Reference 374 neuron/neuron/nrnoc.html#this_section threshold NetCon classes neuron neuron.exe Reference 283 neuron/neuron/classes/netcon.html#threshold TimePlot PlotShape LookAndFeel GUI Reference 20 neuron/agui/pltshape.html#TimePlot Tools NEURONMainMenu GUI Reference 414 neuron/stdrun/0stdrun.html#Tools tools Reference 4 neuron/0nrn.html#tools Topology Section neuron neuron.exe Reference 385 neuron/neuron/topology.html#Topology topology Topology Section neuron neuron.exe Reference 386 neuron/neuron/topology.html#topology to_vector RangeVarPlot classes neuron neuron.exe Reference 311 neuron/neuron/classes/rvarplt.html#to_vector transfer Impedance classes neuron neuron.exe Reference 262 neuron/neuron/classes/impedanc.html#transfer transfer_phase Impedance classes neuron neuron.exe Reference 263 neuron/neuron/classes/impedanc.html#transfer_phase Translate Scene LookAndFeel GUI Reference 7 neuron/agui/gui.html#Translate transpose Matrix classes general neuron.exe Reference 88 neuron/general/classes/matrix/matrix.html#transpose Tray Other PWM LookAndFeel GUI Reference 15 neuron/agui/gui.html#Tray trigavg Vector classes general neuron.exe Reference 173 neuron/general/classes/vector/vneur.html#trigavg Tstop RunControl StandardRunTools GUI Reference 446 neuron/stdrun/runctrl.html#Tstop Ungrouped Window NEURONMainMenu GUI Reference 414 neuron/stdrun/0stdrun.html#Ungrouped uniform Random classes general neuron.exe Reference 100 neuron/general/classes/random.html#uniform uninsert keywords general neuron.exe Reference 235 neuron/general/keywords/ockeywor.html#uninsert unique SectionList classes neuron neuron.exe Reference 318 neuron/neuron/classes/seclist.html#unique units functions general neuron.exe Reference 178 neuron/general/function/0fun.html#units unix_mac_pc functions general neuron.exe Reference 222 neuron/general/function/system.html#unix_mac_pc unlink File classes general neuron.exe Reference 29 neuron/general/classes/file.html#unlink unmap Deck classes general neuron.exe Reference 24 neuron/general/classes/deck.html#unmap unmap Graph classes general neuron.exe Reference 59 neuron/general/classes/graph.html#unmap unmap PlotShape classes neuron neuron.exe Reference 302 neuron/neuron/classes/pltshape.html#unmap unmap Shape classes neuron neuron.exe Reference 327 neuron/neuron/classes/shape.html#unmap unmap VBox classes general neuron.exe Reference 115 neuron/general/classes/vbox.html#unmap unpack ParallelContext classes neuron neuron.exe Reference 297 neuron/neuron/classes/parcon.html#unpack unref ObjectOrientedProgramming general neuron.exe Reference 245 neuron/general/oop.html#unref upkscalar ParallelContext classes neuron neuron.exe Reference 298 neuron/neuron/classes/parcon.html#upkscalar upkstr ParallelContext classes neuron neuron.exe Reference 298 neuron/neuron/classes/parcon.html#upkstr upkvec ParallelContext classes neuron neuron.exe Reference 298 neuron/neuron/classes/parcon.html#upkvec Usage Introduction ModelDescriptionLanguage NMODL Reference 390 neuron/nmodl/nmodl.html#Usage Useion NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 402 neuron/nmodl/nmodl2.html#Useion userid ParallelContext classes neuron neuron.exe Reference 292 neuron/neuron/classes/parcon.html#userid Usevariabledt VariableStepControl Tools NEURONMainMenu GUI Reference 417 neuron/stdrun/0stdrun.html#Usevariabledt use_mcell_ran4 functions general neuron.exe Reference 188 neuron/general/function/mcran4.html#use_mcell_ran4 val Pointer classes general neuron.exe Reference 90 neuron/general/classes/pointer.html#val Valence Useion NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 404 neuron/nmodl/nmodl2.html#Valence valid NetCon classes neuron neuron.exe Reference 277 neuron/neuron/classes/netcon.html#valid ValueEditor Panel LookAndFeel GUI Reference 10 neuron/agui/gui.html#ValueEditor ValueFieldEditor classes general neuron.exe Reference 176 neuron/general/classes/vfe.html#ValueFieldEditor var Vector classes general neuron.exe Reference 162 neuron/general/classes/vector/vect2.html#var variable PlotShape classes neuron neuron.exe Reference 301 neuron/neuron/classes/pltshape.html#variable VariableScale PlotShape LookAndFeel GUI Reference 20 neuron/agui/pltshape.html#VariableScale VariableStepControl Tools NEURONMainMenu GUI Reference 417 neuron/stdrun/0stdrun.html#VariableStepControl Variabletofit RunFitter StandardRunTools GUI Reference 448 neuron/stdrun/runfit.html#Variabletofit variable_domain functions general neuron.exe Reference 177 neuron/general/function/0fun.html#variable_domain VBox classes general neuron.exe Reference 112 neuron/general/classes/vbox.html#VBox VClamp Electrode StandardRunTools GUI Reference 427 neuron/stdrun/electrod.html#VClamp VClamp pointprocesses neuron neuron.exe Reference 349 neuron/neuron/mech.html#VClamp VClampFamily Electrode StandardRunTools GUI Reference 428 neuron/stdrun/electrod.html#VClampFamily VClampigraph VClamp Electrode StandardRunTools GUI Reference 428 neuron/stdrun/electrod.html#VClampigraph Vector classes general neuron.exe Reference 118 neuron/general/classes/vector/vect.html#Vector vector Graph classes general neuron.exe Reference 48 neuron/general/classes/graph.html#vector Vector NEURONMainMenu GUI Reference 414 neuron/stdrun/0stdrun.html#Vector VectorMovie Graph NEURONMainMenu GUI Reference 421 neuron/stdrun/0stdrun.html#VectorMovie VectorPlay StandardRunTools GUI Reference 430 neuron/stdrun/family.html#VectorPlay VecWrap StandardRunTools GUI Reference 430 neuron/stdrun/family.html#VecWrap vfixed Graph classes general neuron.exe Reference 52 neuron/general/classes/graph.html#vfixed view Graph classes general neuron.exe Reference 55 neuron/general/classes/graph.html#view view PlotShape classes neuron neuron.exe Reference 300 neuron/neuron/classes/pltshape.html#view view Shape classes neuron neuron.exe Reference 322 neuron/neuron/classes/shape.html#view ViewAxis AxisType Graph LookAndFeel GUI Reference 17 neuron/agui/gui.html#ViewAxis ViewBox AxisType Graph LookAndFeel GUI Reference 17 neuron/agui/gui.html#ViewBox Viewers DistributedMechanisms Tools NEURONMainMenu GUI Reference 419 neuron/stdrun/0stdrun.html#Viewers Viewers PointProcesses Tools NEURONMainMenu GUI Reference 442 neuron/stdrun/pointman.html#Viewers view_count Graph classes general neuron.exe Reference 59 neuron/general/classes/graph.html#view_count view_count PlotShape classes neuron neuron.exe Reference 301 neuron/neuron/classes/pltshape.html#view_count view_count Shape classes neuron neuron.exe Reference 324 neuron/neuron/classes/shape.html#view_count View_equal_Plot Scene LookAndFeel GUI Reference 6 neuron/agui/gui.html#View_equal_Plot view_info Graph classes general neuron.exe Reference 62 neuron/general/classes/graph.html#view_info VirtualScreen Other PWM LookAndFeel GUI Reference 14 neuron/agui/gui.html#VirtualScreen Voltageaxis Graph NEURONMainMenu GUI Reference 420 neuron/stdrun/0stdrun.html#Voltageaxis vread File classes general neuron.exe Reference 33 neuron/general/classes/file.html#vread vread Vector classes general neuron.exe Reference 137 neuron/general/classes/vector/vect.html#vread vwrite File classes general neuron.exe Reference 32 neuron/general/classes/file.html#vwrite vwrite Vector classes general neuron.exe Reference 137 neuron/general/classes/vector/vect.html#vwrite WatchTheFit FunctionFitter StandardRunTools GUI Reference 432 neuron/stdrun/funfit.html#WatchTheFit wcnt NetCon classes neuron neuron.exe Reference 282 neuron/neuron/classes/netcon.html#wcnt weibull Random classes general neuron.exe Reference 106 neuron/general/classes/random.html#weibull weight NetCon classes neuron neuron.exe Reference 282 neuron/neuron/classes/netcon.html#weight where Vector classes general neuron.exe Reference 133 neuron/general/classes/vector/vect.html#where while keywords general neuron.exe Reference 227 neuron/general/keywords/ockeywor.html#while WholeScene Scene LookAndFeel GUI Reference 7 neuron/agui/gui.html#WholeScene wholetree SectionList classes neuron neuron.exe Reference 318 neuron/neuron/classes/seclist.html#wholetree Window NEURONMainMenu GUI Reference 414 neuron/stdrun/0stdrun.html#Window WindowTitlesPrinted Other PWM LookAndFeel GUI Reference 14 neuron/agui/gui.html#WindowTitlesPrinted WinExec functions general neuron.exe Reference 221 neuron/general/function/system.html#WinExec winio_show functions general neuron.exe Reference 221 neuron/general/function/system.html#winio_show wopen File classes general neuron.exe Reference 27 neuron/general/classes/file.html#wopen wopen IO functions general neuron.exe Reference 186 neuron/general/function/io/ropen.html#wopen working ParallelContext classes neuron neuron.exe Reference 290 neuron/neuron/classes/parcon.html#working workingdir File NEURONMainMenu GUI Reference 416 neuron/stdrun/0stdrun.html#workingdir Write Useion NMODLtoNEURON ModelDescriptionLanguage NMODL Reference 403 neuron/nmodl/nmodl2.html#Write writehoc SaveState classes neuron neuron.exe Reference 314 neuron/neuron/classes/savstate.html#writehoc x Matrix classes general neuron.exe Reference 72 neuron/general/classes/matrix/matrix.html#x x NetCon classes neuron neuron.exe Reference 283 neuron/neuron/classes/netcon.html#x x Vector classes general neuron.exe Reference 120 neuron/general/classes/vector/vect.html#x x3d Geometry Section neuron neuron.exe Reference 342 neuron/neuron/geometry.html#x3d xaxis Graph classes general neuron.exe Reference 40 neuron/general/classes/graph.html#xaxis xbutton button-menu-panel general neuron.exe Reference 208 neuron/general/function/panel.html#xbutton xcheckbox button-menu-panel general neuron.exe Reference 209 neuron/general/function/panel.html#xcheckbox xexpr Graph classes general neuron.exe Reference 45 neuron/general/classes/graph.html#xexpr Xexpr Grapher StandardRunTools GUI Reference 436 neuron/stdrun/grapher.html#Xexpr xfixedvalue button-menu-panel general neuron.exe Reference 213 neuron/general/function/panel.html#xfixedvalue xlabel button-menu-panel general neuron.exe Reference 212 neuron/general/function/panel.html#xlabel xmenu button-menu-panel general neuron.exe Reference 210 neuron/general/function/panel.html#xmenu xopen File classes general neuron.exe Reference 28 neuron/general/classes/file.html#xopen xopen IO functions general neuron.exe Reference 186 neuron/general/function/io/ropen.html#xopen xpanel button-menu-panel general neuron.exe Reference 208 neuron/general/function/panel.html#xpanel xpvalue button-menu-panel general neuron.exe Reference 213 neuron/general/function/panel.html#xpvalue xradiobutton button-menu-panel general neuron.exe Reference 209 neuron/general/function/panel.html#xradiobutton xred IO functions general neuron.exe Reference 183 neuron/general/function/io/read.html#xred xslider button-menu-panel general neuron.exe Reference 214 neuron/general/function/panel.html#xslider xstatebutton button-menu-panel general neuron.exe Reference 209 neuron/general/function/panel.html#xstatebutton xvalue button-menu-panel general neuron.exe Reference 212 neuron/general/function/panel.html#xvalue xvarlabel button-menu-panel general neuron.exe Reference 212 neuron/general/function/panel.html#xvarlabel y3d Geometry Section neuron neuron.exe Reference 343 neuron/neuron/geometry.html#y3d yaxis Graph classes general neuron.exe Reference 40 neuron/general/classes/graph.html#yaxis Yexpr FunctionFitter StandardRunTools GUI Reference 431 neuron/stdrun/funfit.html#Yexpr z3d Geometry Section neuron neuron.exe Reference 343 neuron/neuron/geometry.html#z3d zero Matrix classes general neuron.exe Reference 84 neuron/general/classes/matrix/matrix.html#zero ZoomIn10 Scene LookAndFeel GUI Reference 6 neuron/agui/gui.html#ZoomIn10 ZoomInOut Scene LookAndFeel GUI Reference 7 neuron/agui/gui.html#ZoomInOut ZoomOut10 Scene LookAndFeel GUI Reference 6 neuron/agui/gui.html#ZoomOut10 neuron-7.5/share/lib/hoc/000077500000000000000000000000001323325274500153225ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/Makefile.am000077500000000000000000000015641323325274500173670ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehoc_DATA = attshape.hoc celbild.hoc electrod.hoc \ family.hoc funfit.hoc gatherv.hoc grapher.hoc impedanc.hoc \ impedanx.hoc impratio.hoc inserter.hoc kinbuild.hoc logax.hoc \ macload.hoc mulfit.hoc noload.hoc nrngui.hoc nrngui1.hoc \ pcchdir.hoc pointbsr.hoc pointgrp.hoc pointman.hoc rcs.hoc rcs.iv \ runfit.hoc shapebox.hoc showmech.hoc single.hoc single1.hoc \ singlech.hoc stdgui.hoc stdlib.hoc stdrun.hoc thresh.hoc vecwrap.hoc \ vplay.hoc wingroup.hoc mkcurve.hoc netbild.hoc lincir.hoc \ mknrndll.hoc modlunit.hoc varmeth1.hoc atoltool.hoc \ mview.hoc chanbild.hoc subiter.hoc movierun.hoc import3d.hoc \ netparmpi.hoc loadbal.hoc binfo.hoc parcom.hoc prcellstate.hoc EXTRA_DIST = $(neuronhomehoc_DATA) SUBDIRS = celbild mulfit netbild lincir mview chanbild import3d neuron-7.5/share/lib/hoc/Makefile.in000066400000000000000000000620101323325274500173660ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehocdir)" DATA = $(neuronhomehoc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehoc_DATA = attshape.hoc celbild.hoc electrod.hoc \ family.hoc funfit.hoc gatherv.hoc grapher.hoc impedanc.hoc \ impedanx.hoc impratio.hoc inserter.hoc kinbuild.hoc logax.hoc \ macload.hoc mulfit.hoc noload.hoc nrngui.hoc nrngui1.hoc \ pcchdir.hoc pointbsr.hoc pointgrp.hoc pointman.hoc rcs.hoc rcs.iv \ runfit.hoc shapebox.hoc showmech.hoc single.hoc single1.hoc \ singlech.hoc stdgui.hoc stdlib.hoc stdrun.hoc thresh.hoc vecwrap.hoc \ vplay.hoc wingroup.hoc mkcurve.hoc netbild.hoc lincir.hoc \ mknrndll.hoc modlunit.hoc varmeth1.hoc atoltool.hoc \ mview.hoc chanbild.hoc subiter.hoc movierun.hoc import3d.hoc \ netparmpi.hoc loadbal.hoc binfo.hoc parcom.hoc prcellstate.hoc EXTRA_DIST = $(neuronhomehoc_DATA) SUBDIRS = celbild mulfit netbild lincir mview chanbild import3d all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehocDATA: $(neuronhomehoc_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehoc_DATA)'; test -n "$(neuronhomehocdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehocdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehocdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehocdir)" || exit $$?; \ done uninstall-neuronhomehocDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehoc_DATA)'; test -n "$(neuronhomehocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehocdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(neuronhomehocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-neuronhomehocDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-neuronhomehocDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehocDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-neuronhomehocDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/atoltool.hoc000077500000000000000000000140571323325274500176640ustar00rootroot00000000000000begintemplate AtolToolItem public name, max, acmax, scale, rescale, original external cvode strdef name proc init() { name = $s1 max = -1e9 acmax = -1e9 scale = $2 if (scale > 0) { original = cvode.atolscale(name) } } proc rescale() { if (scale == -1) { return } if (numarg() == 0) { if (max*1e20 <= 0) { return } scale = log10(max) if (scale < 0) { scale -= .99 } scale = 10^(int(scale)) }else{ scale = $1 } cvode.atolscale(name, scale) } endtemplate AtolToolItem begintemplate AtolTool public activate, analyse, rescale, states, anrun, refresh public pr, map, save, scales external cvode, hoc_sf_ objref ms, mt, states, tobj, used strdef tstr, tstr1, mname objref box, this proc init() { used = new List() mkstates() } proc activate() { activate_ = $1 cvode.state_magnitudes($1) } proc analyse() {local i cvode.state_magnitudes(2) for i=0, states.count-1 { tobj = states.object(i) tobj.max = cvode.state_magnitudes(tobj.name, &tobj.acmax) } activate(0) } proc rescale() { local i for i=0, states.count-1 { states.object(i).rescale() } } proc original() { local i for i=0, states.count-1 { tobj = states.object(i) tobj.rescale(tobj.original) } } proc scales() {local i for i=0, states.count-1 { tobj = states.object(i) if (tobj.scale != -1) { tobj.scale = cvode.atolscale(tobj.name) } } } proc mkstates() { states = new List() tobj = new AtolToolItem("v", 1) states.append(tobj) mkstates2(0) mkstates2(1) tobj = new AtolToolItem("Vector", -1) states.append(tobj) scales() } proc mkstates2() {local i, it mt = new MechanismType($1) for it=1, mt.count-1 { mt.select(it) mt.selected(mname) if (hoc_sf_.head(mname, "_ion", tstr) != -1) { sprint(tstr1, "%si", tstr) tobj = new AtolToolItem(tstr1, 1) states.append(tobj) sprint(tstr1, "%so", tstr) tobj = new AtolToolItem(tstr1, 1) states.append(tobj) }else{ ms = new MechanismStandard(mname, 3) for i=0, ms.count-1 { ms.name(tstr, i) if ($1 == 1) { sprint(tstr, "%s.%s", mname, tstr) } tobj = new AtolToolItem(tstr, 1) states.append(tobj) } } } } proc pr() {local i for i=0, states.count-1 { tobj = states.object(i) if (tobj.max < 0) continue printf("%-20s %-8.2g %-8.2g %-8.2g\n", tobj.name, tobj.acmax, tobj.max, tobj.scale) } } proc map() { if (object_id(box) == 0) { build() } box.map("Absolute Tolerance Scale Factors") } proc fill_used() {local i used.remove_all() for i=0, states.count-1 { tobj = states.object(i) if (tobj.max >= 0) { used.append(tobj) } } used.select(-1) } proc label() { tobj = used.object($1) sprint(tstr, "%-20s %-8.2g %-8.2g %-8.2g", tobj.name, tobj.scale, tobj.max, tobj.acmax) // sprint(tstr, "%.2e %-20s %.2e %.2e", tobj.scale, tobj.name, tobj.max, tobj.amax) } proc anrun() { if (!cvode.active()) { execute("cvode_active(1)") } execute("init()") activate(1) execute("run()") analyse() fill_used() } proc refresh() { fill_used() } proc scl() {local i, pos i = used.selected() if (i < 0) { return } pos = used.scroll_pos tobj = used.object(i) tobj.rescale(tobj.scale *= $1) used.remove(i) used.insrt(i, tobj) used.select(i) used.scroll_pos(pos) } proc build() { fill_used() box = new VBox() box.save("") box.ref(this) box.intercept(1) xpanel("",1) xbutton("Analysis Run", "anrun()") xbutton("Rescale", "rescale() fill_used()") xbutton("Original", "original() fill_used()") xpanel() xpanel("",1) xbutton("*10", "scl(10)") xbutton("/10", "scl(.1)") xbutton("Hints", "hints()") xpanel() used.browser("", tstr, "label(hoc_ac_)") box.intercept(0) } proc save() {local i for i=0, states.count-1 { tobj = states.object(i) if (tobj.scale != tobj.original) { sprint(tstr, " ats(\"%s\", %g)", tobj.name, tobj.scale) $o1.save(tstr) } } } proc hints() { xpanel("Hints for Absolute Tolerance Scale Factors") xlabel("The absolute error tolerance for each state is the product of the") xlabel("overall cvode.atol() and the cvode.atolscale(\"statename\"). Default") xlabel("atolscale is 1 unless specified explicitly in its state declaration") xlabel("in its model description. The default atolscale may be wildly") xlabel("inappropriate for states with very small values. e.g. a calcium pump") xlabel("may vary in the 1e-14 magnitude range and an error tolerance of 10-6") xlabel("essentially means the variation of the state can have no effect on") xlabel("the choice of time step. Visible symptoms of poor error control") xlabel("are oscillations in the state with a period equal to the time step") xlabel("and invisible symptoms are poor accuracy of the overall simulation.") xlabel("") xlabel("The list in the \"Absolute Tolerance Scale Factors\" panel shows the") xlabel("generic state types, e.g. \"v\" which represents all the voltage states") xlabel("of all segments of all sections of all cells;") xlabel("the present value of the absolute tolerance scale factor of each type;") xlabel("the maximum magnitude of the states of each type (see \"Analysis Run\" below);") xlabel("and the maximum corrector error of the states of each type.") xlabel("") xlabel("When the AtolTool is created, the atolscale for each state type is saved") xlabel("and can be restored with the \"Original\" button. ") xlabel("") xlabel("When a state type is selected, the atolscale can be multiplied or") xlabel("divided by 10 with the \"*10\" or \"/10\" buttons. ") xlabel("") xlabel("The \"Rescale\" button sets the atolscale for each state type according") xlabel("to the order of magnitude of the maximum magnitude. ") xlabel("") xlabel("The \"Analysis Run\" makes cvode active (if it is not already active)") xlabel("and executes the top level \"run()\" procedure with \"maximum state") xlabel("recording\" activated. At the end of the run (or when the StopRun button") xlabel("on the RunControl is pressed) the maximum state values and corrector") xlabel("errors are collected into columns 3 and 4 of the state type list. ") xlabel("") xlabel("The scale factors that differ from the default are saved in a session file") xlabel("when the \"VariableTimeStep\" panel is saved. ") xpanel() } endtemplate AtolTool neuron-7.5/share/lib/hoc/attshape.hoc000077500000000000000000000072001323325274500176300ustar00rootroot00000000000000/* modified 3/19/96 NTC to give access to Ra and to include spines via diameter correction as per Cauller & Connors */ begintemplate ImpShape public out, in, imp, run, sl, extended public view_count, begin, flush // allow this in flush_list double att[1] objref imp, sl, sh, b, this, sec, shmorph, mark strdef sname, tstr i = 0 nsec = 0 hz = 0 iterator sections() { $&1 = 0 forsec $o2 { iterator_statement $&1 += 1 } } proc outside_sections() { sl = new SectionList() sl.wholetree() } proc init() { variable_domain(&hz, 0, 1e9) units(&hz, "Hz") extended = 0 direct = 0 scale_ = 1 sec = new SectionRef() loc = .5 if (numarg() == 1) { sl = $o1 }else{ outside_sections() } for sections(&nsec, sl) {} double att[nsec] finitialize() imp = new Impedance() build() changesec(loc) } flush_ = 0 proc build() { b = new VBox() b.ref(this) b.save("") b.intercept(1) sec.sec sprint(sname, "Measure (red) %s(%g)", secname(), loc) xpanel("", 1) xbutton("Redraw", "run()") xmenu("Extras") xstatebutton("Movie Mode", &flush_, "add_flush()") xstatebutton("Auto Scale", &scale_, "run()") xmenu() xpanel() xpanel("") xcheckbox("include dstate/dt contribution", &extended, "run()") xpvalue("Frequency", &hz, 1, "run()") xradiobutton("Vin", "setdir(0)", 1) xradiobutton("Vout", "setdir(1)") xvarlabel(sname) xpanel() shmorph = new Shape(sl) sh = new Shape(sl) shmorph.action("changesec(hoc_ac_)") mark = new PointProcessMark(loc) shmorph.point_mark(mark, 2) sh.point_mark(mark, 2, 4) b.intercept(0) sprint(tstr, "%s", this) b.map(tstr) } proc changesec() {local x loc = $1 sec = new SectionRef() setmark() sh.select() x = this_section(.5) for sections(&i, sl) { if (x == this_section(.5)) { iloc = i } } setdir(direct) run() } proc setmark(){ mark.loc(loc) } proc run() { if (direct == 0) { sec.sec in(hz) }else{ sec.sec out(hz) } flush1() } proc flush1() {local x, y x = log(rmin)*1000/4 y = x/2 sh.erase() sh.beginline() sh.line(x, y) sh.line(x,y+1000) sh.beginline() sh.line(-100+x,y) sh.line(100+x,y) sh.beginline() sh.line(-100+x,1000+y) sh.line(100+x,1000+y) if (scale_) { sh.exec_menu("View = plot") } doNotify() } proc setdir() { direct = $1 sec.sec { if (direct == 0) { sprint(sname, "Measure (red) %s(%g)", secname(), loc) }else{ sprint(sname, "Inject (red) %s(%g)", secname(), loc) } } run() } proc in() {local d, r1, r2 imp.loc(loc) imp.compute($1, extended) rmin = 1 for sections(&i, sl){ r1 = imp.ratio(0) r2 = imp.ratio(1) if (rmin > r2) rmin = r2 if (r1 > 1e-10 && r2 > 1e-10) { if (iloc == i) { d = log(r1) + log(r2) }else{ d = log(r1) - log(r2) } }else{ rmin = 1e-10 d = 20 } d = abs(d) if (d < .0001) d = .0001 sh.len_scale(d/L*1000) } sh.flush() } proc out() {local r, d, r1, r2 imp.loc(loc) imp.compute($1, extended) r = imp.input(loc) rmin = 1 for sections(&i, sl){ r1 = imp.transfer(0)/r r2 = imp.transfer(1)/r if (rmin > r2) rmin = r2 if (r1 > 1e-10 && r2 > 1e-10) { if (iloc == i) { d = log(r1) + log(r2) }else{ d = log(r1) - log(r2) } }else{ rmin = 1e-10 d = 20 } d = abs(d) if (d < .0001) d = .0001 sh.len_scale(d/L*1000) } sh.flush() } proc add_flush() { if (flush_) { sprint(tstr, "flush_list.append(%s)", this) execute(tstr) } } func view_count() { if (flush_) { return sh.view_count() }else{ return 0 } } proc begin() { } proc flush() { run() } endtemplate ImpShape proc makeImpShape() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an ImpShape") return } hoc_obj_[0] = new ImpShape() objref hoc_obj_[2] } neuron-7.5/share/lib/hoc/binfo.hoc000066400000000000000000000540051323325274500171160ustar00rootroot00000000000000// like a file in that scanvar returns next vector element begintemplate VectorStream public scanvar, i, vec objref vec proc init() { i = -1 vec = $o1 } func scanvar() { return vec.x[i += 1] } endtemplate VectorStream // each cell has a gid and each piece has a special spgid which will be // equal to gid on the piece containing the output port. The idea is that // from a spgid, one can derive the gid. // Also the set of sid for each cell is encoded to make one cells set distinct // from any other cell. {load_file("stdlib.hoc")} begintemplate CellBalancePiece public sid, idvec, cx, host, merge, root objref idvec, root proc init() {local i, n sid = $2 host = -1 cx = $o1.scanvar n = $o1.scanvar idvec = new Vector() for i=0, n-1 { idvec.append($o1.scanvar) } } // all subtrees of the idvec connected to 0 of the first idvec // $o1 is the cell SectionRef list proc merge() {local i localobj sr if(0) for i=0,idvec.size-1 { sr = $o1.object(idvec.x[i]) sr.parent printf("original %s connect ", secname()) sr.sec printf("%s(%g), (%g) : %d\n", secname(), section_orientation(), parent_connection(), idvec.x[i]) } root = $o1.object(idvec.x[0]) for i=1, idvec.size-1 { sr = $o1.object(idvec.x[i]) //sr.sec {printf("disconnect %d %s\n", i, secname())} //$o1.object(idvec.x[0]).sec { printf("reconnect to %s(0)\n", secname())} sr.sec { disconnect() } $o1.object(idvec.x[0]).sec { connect sr.sec(0), 0 } } } endtemplate CellBalancePiece begintemplate CellBalanceInfo public gid, cx, subtrees, pcx, host, distinct_hosts, nsid, spgid public multisplit, tmphost, root objref subtrees, root proc init() {local isid, nsub, isub tmphost = -1 // prevent multiple pieces on one host for trial host = -1 subtrees = new List() gid = $o1.scanvar spgid = gid cx = $o1.scanvar nsid = $o1.scanvar for isid = 0, nsid-1 { nsub = $o1.scanvar for isub = 0, nsub-1 { subtrees.append(new CellBalancePiece($o1, isid)) } } if (subtrees.count == 1) { // printf("%d only has 1 piece. Do not split\n", gid) nsid = 0 subtrees.remove_all } } func pcx() {local i, c c = 0 if (subtrees.count == 0 || $1 == 0) { c = cx }else for i = 0, subtrees.count-1 { c += subtrees.object(i).cx } return c } func distinct_hosts() {local i, j, h for i=0, subtrees.count-2 { h = subtrees.object(i).host for j=i+1, subtrees.count-1 { if (h == subtrees.object(j).host) { return 0 } } } return 1 } // $o1 NetCon with cell output source // $2 is the binfo msgid. // $o3 is the ParallelContext // $4 is the possibly fake pnm.myid // on entry the entire cell exists, on exit only the subtrees // for this host. spgid will be gid for the subtree left containing // the output port and otherwise will be derived from $2 and the subtree index // The spgid will be registered for this machine and associated with the // root of the subtree (but without it being an output port). The exception // is that the subtree with the output port will have gid registered and // be associated with that output port. func multisplit() {local i localobj srout, cell $o1.preloc() srout = new SectionRef() pop_section() cell = $o1.precell // spgid = gid + $2*(subtree_index + 1) except the subtree // with the output port has spgid = gid msdiv(cell, srout, $2, $o3, $4) if (spgid == gid) { $o3.cell(gid, $o1, 1) } return spgid } proc msdiv() {local i, sid, msgid, px, cnt, x, max_sid \ localobj cell, srout, pc, sl, allsr, srlist, sidvec, sr, vsav, vdispl, hosts, nil max_sid = 100 cell = $o1 srout = $o2 msgid = $3 pc = $o4 allsr = new List() sl = new SectionList() // if top level cell use currently accessed section if (object_id(cell) == 0) { sl.wholetree }else{ if (section_exists("soma", cell)) { $o1.soma { sl.wholetree } }else{ // at least there should be an all SectionList i = 0 forsec cell.all { if (i == 0) { sl.wholetree } i += 1 } } } forsec sl { allsr.append(new SectionRef()) } root = allsr.object(0) for i=0, subtrees.count-1 { subtrees.object(i).merge(allsr) } // in case the voltages are encoding information, save them vdispl = new Vector(allsr.count) cnt = 0 for i=0, allsr.count-1 allsr.o(i).sec { vdispl.x[i] = cnt cnt += nseg + 2 } vsav = new Vector(cnt) cnt = 0 for i=0, allsr.count-1 allsr.object(i).sec { for (x) { vsav.x[cnt] = v(x) cnt += 1 } } for i=0, allsr.count-1 allsr.object(i).sec { v = -1 } srlist = new List() sidvec = new Vector() hosts = new Vector() sid = 0 for i=1, subtrees.count-1 { sr = allsr.object(subtrees.object(i).idvec.x[0]) sr.sec px = parent_connection() sr.parent if (v(px) == -1) {v(px) = sid sid += 1 } } if (sid >= max_sid) { printf("%d gid %d with %d pieces has %d >= max %d sids\n", pc.id, gid, subtrees.count, sid, max_sid) execerror("Cell has too many sids. Increase max_sid in binfo.hoc") } for (i = subtrees.count-1; i > 0; i -= 1) { sr = allsr.object(subtrees.object(i).idvec.x[0]) srlist.append(sr) sr.sec px = parent_connection() sr.parent { sidvec.append(gid*max_sid + v(px)) } hosts.append(subtrees.object(i).host) } sidvec.append(-1) allsr.object(0).root srlist.append(new SectionRef()) hosts.append(subtrees.object(0).host) if (0 && pc.id == 0) for i=0, sidvec.size-1 srlist.object(i).sec { printf("%d %ld %d %s\n", i, sidvec.x[i], hosts.x[i], secname()) } multisplit_divide(sidvec, srlist, hosts, $5, pc) // restore saved voltages for still existing sections for i=0, allsr.count-1 { sr = allsr.object(i) if (sr.exists) sr.sec { cnt = vdispl.x[i] for (x) { v(x) = vsav.x[cnt] cnt += 1 } } } spgid = -1 for i=0, srlist.count-1 { sr = srlist.object(i) if (sr.exists()) { spgid = gid + msgid*(i + 1) if (srout.exists()) srout.root if (sr.is_cas()) { spgid = gid } pc.set_gid2node(spgid, pc.id) if (spgid != gid) sr.sec { pc.cell(spgid, new NetCon(&v(.5), nil), 0) //printf("%d spgid=%d for %s\n", pc.id, spgid, secname()) } // else pc.cell will be called on outport after return } } } // division information format is a leaf to root ordered list of // sid sectionname hostid // where each triple refers to the subtree for which the triple defines // the root of the subtree. // Note that root of the whole cell defines a subtree which is what is // left over when all other subtrees have been disconnected. Some point // on this subtree (typically for convenience, soma(0)) should be the // last item in the list and may have a sid of -1. In fact the only information // used in the last item is the host field which defines where it will // continue to exists. // Note that consistency requires that if two pairs have the same parent // then they must also have the same sid. // Also required is that there cannot be more than two distinct connection // points into the root subtree from other subtrees. Furthermore, there // can only be at most one connection point into a non-root subtree from // other (child) subtrees. // args are sid Vector, SectionRefList, host vector // Note that any subtree with a host != pc.id is deleted. // This algorithm allows multiple subtrees from the same cell on // one cpu. In fact all the subtrees can be on one cpu. // Note: occasionally the root parent piece (containing the soma) // is an orphan at its sid == 0 (root) // in the sense that // no other piece connects to that location. This is naturally handled // in that we do not call multisplit at that point and so there is // no wasteful backbone. proc multisplit_divide() {local i, x \ localobj sids, subroots, subroot, hosts, sr, sl1, sl2, pc, parents, px pc = $o5 sids = $o1 subroots = $o2 hosts = $o3 // sl1 is the whole tree sl1 = new SectionList() $o2.object(0).sec { sl1.wholetree } // create a parallel list of true_parent SectionRef and parent // connection points. We use that to help construct the parents // parent to child multisplit connection near the end. parents = new List() px = new Vector() for i=0, subroots.count - 2 { // do not use the root subtree subroot = subroots.object(i) if (subroot.has_parent) { // if not then root(0) subroot.parent parents.append(new SectionRef()) subroot.sec px.append(parent_connection()) }else{ subroot.root parents.append(new SectionRef()) px.append(0) } } // now disconnect leaving only subtrees for i=0, subroots.count - 2 { subroots.object(i).sec disconnect() } // delete any subtree not on this cpu. for i=0, subroots.count - 1 { if (hosts.x[i] != $4) { sl1 = new SectionList() subroots.object(i).sec sl1.wholetree() forsec sl1 delete_section() } } // now we can do the multisplit for each subroot for i=0, subroots.count - 2 { if (subroots.object(i).exists()) subroots.object(i).sec { //printf("%d %s pc.multisplit(%g, %d, 2)\n", pc.id, secname(), 0, sids.x[i]) pc.multisplit(0, sids.x[i], 2) // and it will be helpful to initialize v marks sl1 = new SectionList() sl1.wholetree() forsec sl1 v = -1 } } // mark all the subtree parents for i=0, subroots.count - 2 { if (parents.object(i).exists()) parents.object(i).sec { v(px.x[i]) = -1 } } // and we can do the multisplit for the parents // but we should only do any given parent location once // (that is why we find the v mark useful) for i=0, subroots.count - 2 { if (parents.object(i).exists()) parents.object(i).sec { if (v(px.x[i]) == -1) { // multisplit needs to be done //printf("%d %s pc.multisplit(%g, %d, 2)\n", pc.id, secname(), px.x[i], sids.x[i]) pc.multisplit(px.x[i], sids.x[i], 2) v(px.x[i]) = sids.x[i] }else if (v(px.x[i]) != sids.x[i]) { // sanity check printf("i=%d px.x[i]=%d v=%g sids.x[i]=%g\n", i, px.x[i], v(px.x[i]), sids.x[i]) execerror("Subtrees at same parent with different sid", "") } } } } endtemplate CellBalanceInfo begintemplate BalanceInfo public bilist, cx, npiece, locality_balance public nhost, stat, basename, write_balhost, msgid, write_hostcontext public items, gids, sindices, mymetis2, mybal, cbindex public base_gid, thishost_gid, gid2cx, write_colgid, ihost objref bilist strdef basename objref items, gids, sindices, cbindex // when only a few are read proc init() { msgid = -1 nhost = -1 ihost = -1 bilist = new List() if (numarg() == 0) { return } if (numarg() > 0) { basename = $s1 } if (numarg() == 1) { read_all() }else if (numarg() == 3) { read_host($2, $3, 1) }else if (numarg() == 4) { // balance file must have nhost*nthread rank lines // read nthread contiguous lines starting at rank*nthread read_host($2, $3, $4) //rank, nhost, nthread } } proc read_all() {local i1, i2, n1, n2 localobj f, s f = new File() s = new String() sprint(s.s, "%s.dat", basename) f.ropen(s.s) n1 = f.scanvar for i1=0, n1 - 1 { n2 = f.scanvar for i2=0, n2 -1 { bilist.append(new CellBalanceInfo(f)) } } f.close() } proc read_host() {local i, j, n, k, i1, i2, n1, n2, rank, np, nthread, md, spgid \ localobj f, s, cb, pc pc = new ParallelContext() md = 2^31 - 1 // maximum possible gid rank = $1 np = $2 nthread = $3 items = new Vector() gids = new Vector() sindices = new Vector() f = new File() s = new String() sprint(s.s, "%s.%d.dat", basename, np*nthread) f.ropen(s.s) msgid = f.scanvar nhost = f.scanvar if (nhost != np*nthread) { execerror("read_host() wrong number of lines", "") } ihost = rank for i=0, rank*nthread-1 {f.gets(s.s)} for j=0, nthread-1 { if (f.scanvar != (rank*nthread + j)) { execerror("read_host() format error", "") } n = f.scanvar // number of triples for i=0, n-1 { items.append(f.scanvar) gids.append(f.scanvar) sindices.append(f.scanvar) } } cbindex = new Vector(n) f.close if (0) { printf("msgid=%d nhost=%d ihost=%d\n", msgid, nhost, ihost) print "items" items.printf print "gids" gids.printf print "sindices" sindices.printf } if (items.size == 0) { return } i = 0 k = 0 sprint(s.s, "%s.dat", basename) f.ropen(s.s) n1 = f.scanvar for i1=0, n1 - 1 { n2 = f.scanvar for i2=0, n2 - 1 { if (k == items.x[i]) { cb = new CellBalanceInfo(f) cbindex.x[i] = bilist.count bilist.append(cb) //printf("k=%d items.x[%d]=%d gid=%d %d\n", k, i, items.x[i], gids.x[i], \ //bilist.object(i).gid) spgid = cb.gid + msgid*(cb.subtrees.count + 1) if (spgid > md) { printf("%d Cell %d with %d pieces has spgid=%ld > 2^31 - 1. Decrease msgid %d in %s.%d.dat file\n", pc.id, cb.gid, cb.subtrees.count, spgid, msgid, basename, np*nthread) execerror("msgid too large relative to number of pieces of cell") } while(1) { if (gids.x[i] != cb.gid) { execerror("gid inconsistency in read_host ", "") } cb.host = ihost if (cb.subtrees.count > 0) { cb.subtrees.object(sindices.x[i]).host = ihost } i += 1 if ( i >= items.size) { f.close return } if (k != items.x[i]) { break } } }else{ s = new CellBalanceInfo(f) // skip } k += 1 } } f.close() } // legacy name proc mymetis2() { nhost = $1 balance($1, 0, bilist) } // $1 total number of cpus // $2 cpu group size // Return balance // whole cells are used to balance the $1/$2 group partitions // and then the cpus in the groups are balanced using the cell // pieces. func locality_balance() {local i, j, gsize, ngroup, pw, mw, cavg \ localobj clist, cb, wt, ipart, wpart, indices nhost = $1 gsize = $2 ngroup = $1/$2 wt = new Vector() for i=0, bilist.count-1 { cb = bilist.o(i) if (cb.subtrees.count == 0) { wt.append(cb.cx) }else{ wt.append(0) for j=0, cb.subtrees.count-1 { wt.x[i] += cb.subtrees.object(j).cx } } } cavg = wt.sum/nhost lpt(wt, ngroup, ipart, wpart) indices = new Vector() clist = new List() mw = 0 for i=0, ngroup-1 { // should parallelize this indices.indvwhere(ipart, "==", i) clist.remove_all() for j=0, indices.size-1 { clist.append(bilist.o(indices.x[j])) } pw = balance(gsize, i*gsize, clist) if (pw > mw) { mw = pw } } return mw/cavg } // $1 is the number of cpus in the group // $2 is the cpu offset for the group // $o3 is the list of CellBalance objects // Returns the max partition weight // and fills the CellBalance objects (or pieces if they // exist, with the hostid (cpu index + offset) func balance() {local i, j, k, ncpu, mw, coff \ localobj wt, cb, cpu, wcpu ncpu = $1 coff = $2 wt = new Vector() for i=0, $o3.count-1 { cb = $o3.object(i) if (cb.subtrees.count == 0) { wt.append(cb.cx) } else for j=0, cb.subtrees.count-1 { wt.append(cb.subtrees.object(j).cx) } } // printf("%d pieces size max=%g min=%g\n", wt.size, wt.max, wt.min) mw = lpt(wt, ncpu, cpu, wcpu) //printf("npiece = %d npart = %d\n", wt.size, $1) //printf("max and min complexity %g %g avg = %g\n", wcpu.max, wcpu.min, wcpu.mean) //printf("load balance %g\n", b) k = -1 for i=0, $o3.count-1 { cb = $o3.object(i) if (cb.subtrees.count == 0) { cb.host = cpu.x[k += 1] + coff } else for j=0, cb.subtrees.count-1 { cb.subtrees.object(j).host = cpu.x[k += 1] + coff } } return mw } // least processing time algorithm // $o1 is vector of weights $2 is number of partitions // return value is the max partition weight, return in $o3 a // partition indices parallel to weights($o1), return in $o4 // a vector of partition weights func lpt() {local i, j localobj wx, ix, pw wx = $o1.sortindex.reverse ix = new Vector($o1.size) pw = new Vector($2) for i=0, $o1.size-1 { j = wx.x[i] w = $o1.x[j] ip = pw.min_ind pw.x[ip] += w ix.x[j] = ip } $o3 = ix $o4 = pw return pw.max } func cx() {local i, c, j j = 0 if (numarg() == 1) { j = $1 } c = 0 for i = 0, bilist.count-1 { c += bilist.object(i).pcx(j) } return c } func npiece() {local i, n n = 0 for i=0, bilist.count-1 { if ( bilist.object(i).subtrees.count == 0) { n += 1 }else{ n += bilist.object(i).subtrees.count } } return n } proc stat() {local i, j, c, cmax, mcp, mxs, mcpi, mxsi localobj cxvec, npvec, cb, p if (nhost == -1) return mcp = 1 mxs = 0 cxvec = new Vector(nhost) npvec = new Vector(nhost) for i=0, bilist.count-1 { cb = bilist.object(i) if (cb.nsid > mxs) { mxs = cb.nsid mxsi = i } if (cb.subtrees.count > mcp) { mcp = cb.subtrees.count mcpi = i } if (cb.subtrees.count == 0) { cxvec.x[cb.host] += cb.cx npvec.x[cb.host] += 1 }else for j=0, cb.subtrees.count-1 { p = cb.subtrees.object(j) cxvec.x[p.host] += p.cx npvec.x[p.host] += 1 } } c = cx() cmax = cxvec.max printf("total complexity is %g\n", c) printf("%d cells\n", bilist.count) printf("%d pieces\n", npiece()) printf("maximum complexity is %g for host %g\n", cmax, cxvec.max_ind) printf("load imbalance is %.1f%%\n", 100*cmax*nhost/c - 100) printf("maximum of %d pieces on host %g\n", npvec.max, npvec.max_ind) if (mcp > 1) { printf("at least one cell is broken into %d pieces (bilist[%d], gid %d)\n", mcp, mcpi, bilist.object(mcpi).gid) printf("at least one cell has %d sids (bilist[%d], gid %d)\n", mxs, mxsi, bilist.object(mxsi).gid) }else{ printf("no broken cells\n") } } // write a host file with the format // max_gid // nhost // ihost ngid for that host followed by a list of (index, gid, subtreeindex) triples // the indices will be in order and the gid is just for error checking // the idea is to allow the parallel run to not have to save all the info proc write_balhost() {local i, j, mg localobj hostgids, cb, p, f, s if (nhost == -1) return hostgids = new List() for i=0, nhost-1 { hostgids.append(new Vector()) } mg = -1 for i=0, bilist.count-1 { cb = bilist.object(i) if (cb.gid > mg) { mg = cb.gid } } for (msgid=10; msgid <= mg; msgid *= 10) {}// encode gid in spgid along with subtree index if (msgid < 1e7) { msgid = 1e7 // there may be unused gids in BlueBrain } for i=0, bilist.count-1 { cb = bilist.object(i) if (cb.subtrees.count == 0) { hostgids.object(cb.host).append(i) hostgids.object(cb.host).append(0) }else for j=0, cb.subtrees.count-1 { p = cb.subtrees.object(j) hostgids.object(p.host).append(i) hostgids.object(p.host).append(j) } } s = new String() sprint(s.s, "%s.%d.dat", basename, nhost) f = new File() f.wopen(s.s) f.printf("msgid %d\n", msgid) f.printf("nhost %d\n", hostgids.count) for i=0, hostgids.count-1 { p = hostgids.object(i) f.printf("%d %d", i, p.size/2) for (j = 0; j < p.size; j += 2) { f.printf(" %d %d %d", p.x[j], bilist.object(p.x[j]).gid, p.x[j+1]) } f.printf("\n") } f.close } // derived from write_balhost but output format is suitable for // the fast_create.hoc file proc write_colgid() {local i, j, mg localobj hostgids, cb, p, f, s if (nhost == -1) return hostgids = new List() for i=0, nhost-1 { hostgids.append(new Vector()) } mg = -1 for i=0, bilist.count-1 { cb = bilist.object(i) if (cb.gid > mg) { mg = cb.gid } } for (msgid=10; msgid <= mg; msgid *= 10) {}// encode gid in spgid along with subtree index if (msgid < 1e7) { msgid = 1e7 // there may be unused gids in BlueBrain } for i=0, bilist.count-1 { cb = bilist.object(i) if (cb.subtrees.count == 0) { hostgids.object(cb.host).append(i) hostgids.object(cb.host).append(0) }else for j=0, cb.subtrees.count-1 { p = cb.subtrees.object(j) hostgids.object(p.host).append(i) hostgids.object(p.host).append(j) } } s = new String() sprint(s.s, "%s.%d.dat", basename, nhost) f = new File() f.wopen(s.s) f.printf("ncell %d\nnhost %d\n", bilist.count, hostgids.count) for i=0, hostgids.count-1 { p = hostgids.object(i) for (j = 0; j < p.size; j += 2) { f.printf("%d %d\n", bilist.object(p.x[j]).gid, i) } } f.close } // just enough basename.ncpu.dat to get complete host communication for // specified host arg. 2nd arg is the nhost for the original basename.nhost.dat // file // $3 is the level proc write_hostcontext() {local i, j, il, ngid, gid, host \ localobj f, s, cb, hostgids, gvec, mark, marked, gidvec, hostvec, gi //first, read the complete basename.$2.dat file f = new File() s = new String() sprint(s.s, "%s.%d.dat", basename, $2) f.ropen(s.s) msgid = f.scanvar nhost = f.scanvar gidvec = new Vector() hostvec = new Vector() hostgids = new List() mark = new Vector(nhost) for i=0, nhost-1 { if (i != f.scanvar) { execerror("bad format for ", s.s) } gvec = new Vector() hostgids.append(gvec) ngid = f.scanvar for j=0, ngid-1 { gvec.append(f.scanvar) gid = f.scanvar gvec.append(gid) gvec.append(f.scanvar) gidvec.append(gid) hostvec.append(i) } } // now mark the hosts we need, ie. every host that has a gid // referred to by $1 mark.x[$1] = 1 gvec = hostgids.object($1) domark(gvec, gidvec, hostvec, mark) for il=1, $3-1 { // try the second level gi = mark.c.indvwhere("==", 1) for i=0, gi.size-1 { domark(hostgids.object(gi.x[i]), gidvec, hostvec, mark) } } // print the reduced basename.ncpu.dat file marked = mark.c.indvwhere("==", 1) sprint(s.s, "%s.%d.dat", basename, marked.size) f.wopen(s.s) f.printf("msgid %d\n", msgid) f.printf("nhost %d\n", marked.size) for i=0, marked.size-1 { j = marked.x[i] gvec = hostgids.object(j) f.printf("%d %d", i, gvec.size/3) // f.printf("%d %d", marked.x[i], gvec.size/3) for (j=0; j < gvec.size; j += 3) { f.printf(" %d %d %d", gvec.x[j], gvec.x[j+1], gvec.x[j+2]) } f.printf("\n") } print "wrote ", s.s } proc domark() {local i, j, gid localobj gvec, gidvec, hostvec, mark, gi gvec = $o1 gidvec = $o2 hostvec=$o3 mark=$o4 for (i=0; i < gvec.size-1; i += 3) { gid = gvec.x[i+1] gi = gidvec.c.indvwhere("==", gid) for j=0, gi.size-1 { mark.x[hostvec.x[gi.x[j]]] = 1 } } } func base_gid() { return $1 % msgid } func thishost_gid() {local i if ($1 >= msgid) { return $1 } i = gids.indwhere("==", $1) if (i < 0) { return -1 } return bilist.object(cbindex.x[i]).spgid } func gid2cx() {local i localobj cb for i=0, bilist.count-1 { cb = bilist.object(i) if (cb.spgid == $1) { return cb.cx } } return 0 } endtemplate BalanceInfo proc mymetis2() { localobj bi bi = new BalanceInfo($s1) bi.mymetis2($2) bi.stat() bi.write_colgid() } proc mymetis3() { localobj bi bi = new BalanceInfo($s1) bi.mymetis2($2) bi.stat() bi.write_balhost() } proc locality_balance() { localobj bi bi = new BalanceInfo($s1) bi.locality_balance($2, $3) bi.stat() bi.write_balhost() } /* objref bi if (0) { bi = new BalanceInfo("cx") bi.mymetis2(8192) } */ neuron-7.5/share/lib/hoc/celbild.hoc000077500000000000000000000006571323325274500174260ustar00rootroot00000000000000{ivoc_style("*panel_scroll", "20")} {ivoc_style("*radioScale", "1.2")} //{xopen("celbild/subiter.hoc")} {xopen("celbild/celtopol.hoc")} {xopen("celbild/celgeom.hoc")} {xopen("celbild/inhomofn.hoc")} {xopen("celbild/psubset.hoc")} {xopen("celbild/celset.hoc")} {xopen("celbild/celmemb.hoc")} {xopen("celbild/celmang.hoc")} {xopen("celbild/celbild1.hoc")} objref tobj proc makecellbuilder() { tobj = new CellBuild() objref tobj } neuron-7.5/share/lib/hoc/celbild/000077500000000000000000000000001323325274500167205ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/celbild/Makefile.am000077500000000000000000000004711323325274500207610ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehoccelbilddir = $(neuronhomehocdir)/celbild neuronhomehoccelbild_DATA = celbild1.hoc celgeom.hoc celmang.hoc celmemb.hoc \ celset.hoc celtopol.hoc inhomofn.hoc psubset.hoc EXTRA_DIST = $(neuronhomehoccelbild_DATA) neuron-7.5/share/lib/hoc/celbild/Makefile.in000066400000000000000000000445761323325274500210050ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/celbild ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehoccelbilddir)" DATA = $(neuronhomehoccelbild_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehoccelbilddir = $(neuronhomehocdir)/celbild neuronhomehoccelbild_DATA = celbild1.hoc celgeom.hoc celmang.hoc celmemb.hoc \ celset.hoc celtopol.hoc inhomofn.hoc psubset.hoc EXTRA_DIST = $(neuronhomehoccelbild_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/celbild/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/celbild/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehoccelbildDATA: $(neuronhomehoccelbild_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehoccelbild_DATA)'; test -n "$(neuronhomehoccelbilddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehoccelbilddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehoccelbilddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehoccelbilddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehoccelbilddir)" || exit $$?; \ done uninstall-neuronhomehoccelbildDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehoccelbild_DATA)'; test -n "$(neuronhomehoccelbilddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehoccelbilddir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomehoccelbilddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomehoccelbildDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomehoccelbildDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehoccelbildDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomehoccelbildDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/celbild/celbild1.hoc000077500000000000000000000176731323325274500211130ustar00rootroot00000000000000if (!name_declared("scene_vector_")) { execute("~objref scene_vector_[1]") execute("~objref save_window_") } begintemplate CellBuild public vbox, map, topol, geom, subsets, memb, changed_, consist, changed public version, gtopol, continuous, manage, save_data, all, mech_export public file_version_, append_inhomofun, inhomofuns, geom_cnt_, page public leave, leave_, cexport external graph_menu_remove_most external scene_vector_, save_window_ // only for sessions prior to 5.1 objref this, vbox, deck1, deck2, topol, geom, subsets, memb, manage objref gtopol, hbox, all, inhomofuns, leave_ strdef tstr proc init() { geom_cnt_ = 0 inhomofuns = new List() leave_ = new List() // first three are boltzmann, ramp, and exp append_inhomofun("A0 A k d", "A0 + A/(1 + exp(k*(d - p)))", "Boltzmann") append_inhomofun("b m","b + m*p/(p1 - p0)", "Ramp") append_inhomofun("A0 A k","A0 + A*exp(-k*(p - p0))", "Exponential") version_ = 5.7 file_version_ = version_ continuous = 0 all = new SNList("all") build() if (numarg() == 0) { map() } changed_ = 0 } func version() { file_version_ = $1 if (file_version_ > version_) { printf("Data format version %g is incompatible with this version %g tool\n",\ $1, version_) stop return 0 } if (file_version_ < 5.7) { // 5.7 uses GeoSpec type 0 and 1 for specifying distinct // L and diam values for each section in a section list // and no longer uses GeoSpec for Ra and Cm // Thus for celgeom, increase each GeoSpec arg by 2. // and for celmemb replace GeoSpec by FakeMechStan printf("CellBuild data format version %g is compatible with this version %g\n but an update to the session file is recommended and will\n prevent this message.\n",\ $1, version_) } if (file_version_ < 5) { // versions prior to 5 declare the all subset explicitly // in the session file. So // remove the default "all" subset from subsets list. // The all variable will be updated when cexport is // execute all.del_all() subsets.snlist.remove(0) } return 1 } proc leave() {local i for (i=leave_.count-1; i >= 0; i -= 1) { leave_.object(i).leave() leave_.remove(i) } } proc mech_export() { // if topol or subsets change then... memb.cexport(manage.emem) geom.cexport(manage.egeom) } proc map() { if (vbox.ismapped) return vbox.ref(this) sprint(tstr, "%s", this) if (numarg() > 1) { vbox.map(tstr, $2,$3,$4,$5) }else{ vbox.map(tstr) } topol.pl() } proc page() { leave() page_ = $1 deck1.flip_to($1 != 0) if ($1 == 1) { topol.update() }else if ($1 == 2) { subsets.update() }else if ($1 == 3) { geom.update() }else if ($1 == 4) { memb.update() }else if ($1 == 5) { manage.update() } if ($1 > 0) { deck1.flip_to(1) deck2.flip_to($1-1) } } proc build() {local i vbox = new VBox(3) vbox.priority(1000) vbox.intercept(1) vbox.full_request(1) vbox.ref(this) vbox.dismiss_action("dismiss()") vbox.save("save()") xpanel("",1) xradiobutton("About ", "page(0)", 1) xradiobutton("Topology ", "page(1)") xradiobutton("Subsets ", "page(2)") xradiobutton("Geometry ", "page(3)") xradiobutton("Biophysics ", "page(4)") xradiobutton("Management ", "page(5)") xcheckbox("Continuous Create", &continuous, "cexport()") xpanel() deck1 = new Deck(3) deck1.intercept(1) xpanel("") xlabel("Topology refers to section names, connections, and 2d orientation") xlabel(" without regard to section length or diameter.") xlabel(" Short sections are represented in that tool as circles, longer ones as lines.") xlabel("Subsets allows one to define named section subsets as functional") xlabel(" groups for the purpose of specifying membrane properties.") xlabel("Geometry refers to specification of L and diam (microns), and nseg") xlabel(" for each section (or subset) in the topology of the cell.") xlabel("Biophysics is used to insert membrane density mechanisms and specify their parameters.") xlabel("Management specifies how to actually bring the cell into existence for simulation.") xlabel(" The default is to first build the entire cell and export it to the top level") xlabel(" Or else specify it as a cell type for use in networks,") xlabel(" It also allows you to import the existing top level cell into this builder") xlabel(" for modification.") xlabel("If \"Continuous Create\" is checked, the spec is continuously instantiated") xlabel(" at the top level as it is changed.") xpanel() hbox = new HBox(3) hbox.intercept(1) hbox.adjuster(300) gtopol = new Graph(0) graph_menu_remove_most(gtopol) gtopol.size(-200,200,-150,150) gtopol.yaxis(3) gtopol.view(2) deck2 = new Deck(3) deck2.intercept(1) topol = new CellBuildTopology(this) subsets = new SectionSubsets(this) geom = new CellGeometry(this) memb = new CellMembrane(this) manage = new CellManage(this) deck2.intercept(0) deck2.map() hbox.intercept(0) hbox.map() deck1.intercept(0) deck1.flip_to(0) deck1.map vbox.intercept(0) consist() } proc consist() { topol.consist() subsets.consist() geom.consist() memb.consist() } func changed() { if (memb.changed()) { changed_ = 1 } if (geom.changed()) { changed_ = 1 } return changed_ } proc fixall() { // we throw away the default all subset now (it is not in the subset // list) all.del_all() // and make the first one the "all" subset if (subsets.snlist.count > 0) { if (strcmp(subsets.snlist.object(0).name_, "all") == 0) { file_version_ = version_ all = subsets.snlist.object(0) subsets.consist() return } } print "The version ", file_version_, " session file did not have as the first of" print " its subsets, the \"all\" subset and therefore the attempted" print " fixup to version 5.1 failed. It can be repaired manually." print " Either send the session file to michael.hines@yale.edu or" print " try changing the version number in the session file to 5.1" continue_dialog("Could not update the session file to version 5.1") } proc cexport() { if (numarg() == 1) { continuous = $1 } // the last thing done in old versions so take care of // the all subset and update the version number if (file_version_ < 5) { fixall() } if (continuous) { topol.cexport(manage.etop) // need to recalculate subsets in case there is no soma if (numarg() == 0) {subsets.consist()} subsets.cexport(manage.esub) memb.cexport(manage.emem) geom.cexport(manage.egeom) if (manage.esub && manage.emem && manage.egeom) { memb.cexport(manage.emem) } }else{ topol.cexport(0) subsets.cexport(0) memb.cexport(0) geom.cexport(0) } } proc unref() { //print this, "refcount=", $1 if ($1 == 5) { for i=0, topol.slist.count-1 { topol.slist.object(i).sets.remove_all } memb.free() objref topol, geom, subsets, memb, manage } } proc dismiss() {local i, b, kill if (changed()) { sprint(tstr, "%s has changed since last save", this) if (boolean_dialog(tstr, "Close anyway", "Don't Close")) { b = 1 }else{ b = 0 } }else{ b = 1 } if (b) { vbox.unmap() } } proc save() { vbox.save("load_file(\"celbild.hoc\", \"CellBuild\")\n}") // the one in .. save_data(vbox, "ocbox_") vbox.save("{") } proc save_data() {local i sprint(tstr, "{%s = new CellBuild(1)}", $s2) $o1.save(tstr) sprint(tstr, "{object_push(%s)}\n{", $s2) $o1.save(tstr) sprint(tstr, "version(%g)", version_) $o1.save(tstr) sprint(tstr, "continuous = %d", continuous) $o1.save(tstr) for i=3, inhomofuns.count-1 { sprint(tstr, "append_inhomofun(\"%s\", \"%s\")", \ inhomofuns.object(i).argstr, inhomofuns.object(i).expr) $o1.save(tstr) } topol.save_data($o1, "topol") subsets.save_data($o1, "subsets") geom.save_data($o1, "geom") memb.save_data($o1, "memb") manage.save_data($o1, "manage") $o1.save("cexport()") $o1.save("}") gtopol.erase_all $o1.save("{object_pop()}") sprint(tstr, "%s.gtopol", $s2) gtopol.save_name(tstr, 1) topol.pl() changed_ = 0 page(page_) } proc append_inhomofun() { if (numarg() == 3) { inhomofuns.append(new InhomoFun($s1, $s2, $s3)) }else{ inhomofuns.append(new InhomoFun($s1, $s2, $s2)) } } endtemplate CellBuild neuron-7.5/share/lib/hoc/celbild/celgeom.hoc000077500000000000000000000547771323325274500210550ustar00rootroot00000000000000if (name_declared("ocbox_") == 0) { execute("~objref ocbox_") } // if it is a CellBuild then we can determine the version begintemplate GeoType public name strdef name proc init() { name = $s1 } endtemplate GeoType begintemplate GeoSpec public type, value, oldval, changed, set_default, chk // type 0 and 1 are L and diam distinct values over subset // all others are constant // for per section value in a section list. only maintained for type 0 and 1 public snlist, update objref snlist // For <5.7 this is also a fake MechanismStandard in MechStanWrap for Ra and cm. external ocbox_, tstr, classname public name, panel, action objref mod_ func oldver() { classname(ocbox_, tstr) if (strcmp(tstr, "CellBuild") == 0) { if (ocbox_.file_version_ < 5.7) { //printf("GeoSpec constructor with type %d called with file_version_ %g\n", $1, ocbox_.file_version_) return 1 } } if (strcmp(tstr, "NetReadyCellGUI") == 0) { if (ocbox_.tobj.file_version_ < 5.7) { //printf("GeoSpec constructor with type %d called with file_version_ %g\n", $1, ocbox_.tobj.file_version_) return 1 } } return 0 } proc init() { local skip skip = 0 // worry about whether the context is earlier than a 5.7 CellBuild session // if so and calling from CellGeometry context then type should be // increased by 2 and if calling from CellMemb then type 0,1 stands for // Ra, cm and need to mimic a MechanismStandard. if (oldver($1)) { skip = 1 // was caller the CellGeometry or CellMemb context //printf("object pushed %s\n", object_pushed(0)) classname(object_pushed(0), tstr) if (strcmp(tstr, "CellGeometry") == 0) { $1 = $1 + 2 }// Fortunately the CellMemb context implies a nil snlist // and type of 0 or 1 so resuming 5.7 style works. } // ok, now resume 5.7 style type = $1 if (type == 0 || type == 2) { value = 100 }else{ value = 1 } if (skip == 0) if (type < 2) { snlist = $o2 update() } set_default() } proc update() {local i if (object_id(snlist) == 0) { return } for i=0, snlist.list.count-1 { if (object_id(snlist.list.object(i).ldiaminfo) == 0) { snlist.list.object(i).ldiaminfo = new LDiamInfo(100, 1) } } } proc set_default() {local i oldval = value if (object_id(snlist)) { for i=0, snlist.list.count-1 { snlist.list.object(i).ldiaminfo.oldx[type] = snlist.list.object(i).ldiaminfo.x[type] } } } func changed() {local i if (object_id(snlist)) { for i=0, snlist.list.count-1 { if (snlist.list.object(i).ldiaminfo.oldx[type] != snlist.list.object(i).ldiaminfo.x[type]) { return 1 } } }else if (oldval != value) { return 1 } return 0 } proc chk() { if (type == 6) { // nseg if (value < 1) { value = 1 } value = int(value) }else{ if (value <= 0) { value = 1e-6 } } } // following needed to mimic a MechanismStandard for <5.7 CellBuild version // From 5.7 on, we are supposed to use a FakeMechStan in the celmemb.hoc file. proc name() { if (type == 0) $s1 = "Ra" if (type == 1) $s1 = "cm" } proc panel() { xpanel("") xlabel($s1) if (type == 0) xpvalue("Ra (ohm-cm)", &value, 1, "mod()") if (type == 1) xpvalue("cm (uF/cm2)", &value, 1, "mod()") xpanel() } proc action() { mod_ = $o2 } proc mod() { chk() mod_.modified() } endtemplate GeoSpec begintemplate CellGeometry public update, save_data, g, bild, changed, pr, consist, cexport, export public export_autonseg, xmlwrite, neuroml external GeoSpec, lambda_f objref g, this, setlist, tobj, hbox, bild, sf, vbox, d1,d2, vb2 objref geolist, nil, tobj1 strdef tstr, tstr2, tstr3, dstr double geostate[1] objref geotype[1] proc init() {local i egeom = 0 ngeotype = 9 sepLtype = 0 sepdiamtype = 1 constLtype = 2 // earlir GeoSpec has separate value for each section constdiamtype = 3 areatype = 4 cirtype = 5 nsegtype = 6 // begins a new type set. See geo_consist dlambdatype = 7 dxtype = 8 double geostate[ngeotype] objref geotype[ngeotype] geotype[sepLtype] = new GeoType("L") geotype[sepdiamtype] = new GeoType("diam") geotype[constLtype] = new GeoType("L") geotype[constdiamtype] = new GeoType("diam") geotype[areatype] = new GeoType("area") geotype[cirtype] = new GeoType("circuit") geotype[nsegtype] = new GeoType("nseg") geotype[dlambdatype] = new GeoType("d_lambda") geotype[dxtype] = new GeoType("d_X") first = 1 bild = $o1 g = bild.gtopol setlist = new List() geolist = new List() sf = new StringFunctions() panel() sprint(tstr, "%s", this) hbox.map(tstr) } proc hints() { xpanel("CellBuild Geometry hints") xlabel("Usage Hints:") xlabel("First, use \"Specify Strategy\" to define a (compact)") xlabel(" strategy of which geometric assignments should be") xlabel(" associated with which subsets and individual sections.") xlabel(" If a subset or section is used for a geometric assignment") xlabel(" that fact is noted in its label.") xlabel("") xlabel("Next, unselect the strategy button to use the strategy.") xlabel(" Only the subsets and sections with assignments are shown.") xlabel(" If a subset or section has geometric values that differ") xlabel(" from the values when this tool was last saved in a session") xlabel(" file, an \"x\" is shown in front of its strategy label.") xlabel("") xlabel("The strategy order should be general to specific since the") xlabel(" specification will be executed in the order given.") xlabel(" Go back to \"Subsets\" if more subsets are needed or if the") xlabel(" order needs to be changed.") xpanel() } proc cexport() {local i egeom = $1 if (bild.continuous == 0) { egeom = 0 } consist() } proc export() {local i, j, k, ii, type, x if (egeom) { is_auto = 0 for i=0, geolist.count - 1 { tobj = geolist.object(i) type = ltype(tobj) tobj.name(tstr2) if (type == 1) { sprint(tstr2, "forsec %s {", tstr2) }else if (type == 2) { sprint(tstr2, "%s {", tstr2) }else { continue } tobj = tobj.geo for j=0, tobj.count-1 { k = tobj.object(j).type if (k < constLtype) { continue } if (k == areatype) { x = tobj.object(j).value sprint(tstr2, "%s L = diam = %g ", tstr2, sqrt(x/PI)) }else if (k == cirtype) { sprint(tstr2, "%s L= 43.0127 diam=100/L/PI ", tstr2) }else if (k == dlambdatype) { is_auto = 1 }else if (k == dxtype) { is_auto = 1 }else if (k == nsegtype) { is_auto = 1 }else{ sprint(tstr2,"%s %s = %g ", tstr2, geotype[tobj.object(j).type].name, tobj.object(j).value) } } sprint(tstr2, "%s }", tstr2) //print tstr2 execute(tstr2) for j=0, tobj.count-1 { tobj1 = tobj.object(j) k = tobj1.type if (k >= constLtype) { continue } for ii = 0, tobj1.snlist.list.count-1 { tobj1.snlist.list.object(ii).name(tstr) sprint(tstr2, "%s.%s = %g", tstr, geotype[k].name, tobj1.snlist.list.object(ii).ldiaminfo.x[k]) execute(tstr2) } } tobj1 = nil } execute("area(.5)") } export_autonseg() } proc export_autonseg() {local i, j, type, b, k if (egeom && is_auto) { for i=0, geolist.count - 1 { b = 0 tobj = geolist.object(i) type = ltype(tobj) tobj.name(tstr2) if (type == 1) { sprint(tstr2, "forsec %s {", tstr2) }else if (type == 2) { sprint(tstr2, "%s {", tstr2) }else { continue } tobj = tobj.geo for j=0, tobj.count-1 { k = tobj.object(j).type if (k == areatype) { }else if (k == cirtype) { }else if (k == dlambdatype) { b=1 x = tobj.object(j).value sprint(tstr2, "%s nseg = int((L/(%g*lambda_f(100))+.999)/2)*2 + 1 ", tstr2, x) }else if (k == dxtype) { b=1 x = tobj.object(j).value sprint(tstr2, "%s nseg = int((L/%g + .999)/2)*2 + 1 ", tstr2, x) }else if (k == nsegtype) { b=1 x = tobj.object(j).value sprint(tstr2, "%s nseg = %d ", tstr2, x) }else{ } } sprint(tstr2, "%s }", tstr2) //print tstr2 if (b) { execute(tstr2) } } } } func changed() { local i for i=0, geolist.count - 1 { if (ltype(geolist.object(i)) == 0) { if (geolist.object(i).changed()) { return 1 } } } return 0 } func ltype() { //0 GeoSpec, 1 SNList, 2 CellBuildSection sprint(tstr, "%s", $o1) if (sf.head(tstr, "GeoSpec", tstr2) >= 0) { return 0 }else if (sf.head(tstr, "SNList", tstr2) >= 0) { return 1 } return 2 } proc consist() { setlist.remove_all() geolist.remove_all() for i=0, bild.subsets.snlist.count-1 { tobj = bild.subsets.snlist.object(i) setlist.append(tobj) if (tobj.geo.count > 0) { geolist.append(tobj) } } for i=0, bild.topol.slist.count-1 { tobj = bild.topol.slist.object(i) setlist.append(tobj) if (tobj.geo.count > 0) { geolist.append(tobj) } } if (geolist.count > geolist_selected) { geolist.select(geolist_selected) }else{ geolist.select(-1) } export() } proc update() {local i, j bild.subsets.update() if (geolist.count) { inmode_ = 0 // if there are GeoSpec for separate L,diam, then the geobox // may be invalid. i.e topology or subsets may have changed. for i=0, geolist.count-1 { for j=0, geolist.object(i).geo.count-1 { tobj = geolist.object(i).geo.object(j) if (tobj.type < constLtype) { geolist.object(i).geobox = nil tobj.update() } } } }else{ inmode_ = 1 consist() } if (setlist.count > 0) { setlist.select(0) } inmode() // if (first) hints() first = 0 g.exec_menu("Crosshair") } proc panel() { local i hbox = new HBox(3) hbox.intercept(1) hbox.ref(this) hbox.save("save()") vbox = new VBox(3) vbox.intercept(1) xpanel("") inmode_ = 1 xcheckbox("Specify Strategy", &inmode_, "inmode()") xpanel() d1 = new Deck(3) d1.intercept(1) setlist.browser("", tstr, "setlistname(hoc_ac_)") setlist.select_action("selsub(hoc_ac_)") setlist.accept_action("selsub(hoc_ac_)") geolist.browser("", tstr, "geolistname(hoc_ac_)") geolist.select_action("selgeo(hoc_ac_)") geolist.accept_action("selgeo(hoc_ac_)") d1.intercept(0) d1.map() d1.flip_to(0) xpanel("") xbutton("Hints", "hints()") xpanel() vbox.intercept(0) vbox.map() vb2 = new VBox(3) vb2.intercept(1) d2 = new Deck(3) d2.intercept(1) xpanel("") double geostate[ngeotype] for i=0, ngeotype-1 { if (i == 0) { xlabel("Distinct values over subset") } else if (i == constLtype) { xlabel("Constant value over subset") } else if (i == nsegtype) { xlabel("-------------") xlabel("Spatial Grid") } sprint(tstr, "selgeotype(%d)", i) xcheckbox(geotype[i].name, &geostate[i], tstr) } xpanel() xpanel("") xlabel("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz") xpanel() d2.intercept(0) d2.flip_to(0) d2.map() vb2.intercept(0) vb2.map() hbox.intercept(0) } proc neuroml() {localobj gs gs = new GeoSpec(dlambdatype) gs.value = 0.1 bild.subsets.snlist.object(0).geo.append(gs) set_default() } proc inmode() { if (inmode_ == 1) { d1.flip_to(0) d2.flip_to(0) selsub(0) }else{ consist() d1.flip_to(1) if (geolist.count > 0) { geolist.select(0) doNotify() selgeo(0) }else{ d2.flip_to(-1) } } } proc selgeo() {local i, j, k, l, scroll, sav if ($1 == -1) return if (in_selgeo_) { return } in_selgeo_ = 1 scroll = 0 while ((l = ltype(geolist.object($1))) == 0) { $1 -= 1 } geolist.select($1) geolist_selected = $1 d2.remove_last() d2.intercept(1) tobj = geolist.object($1) if (tobj.geobox == nil) { tobj.geobox = new VBox(3) tobj.geobox.intercept(1) xpanel("") if (l == 1) { sprint(tstr, "forsec %s { ...", tobj.name_) scroll += 2 }else{ tobj.name(tstr2) sprint(tstr, "%s { ...", tstr2) } xlabel(tstr) for i=0, tobj.geo.count-1 { j = tobj.geo.object(i).type if (j <= 1) { continue } // handle distinct L,diam after this loop if (j == cirtype) { // circuit xlabel(" // area : (S, uF, mA)/cm2 == uS, pF, nA") xlabel(" // Ra : ohm-cm == Mohm") xlabel(" L = 43.0127 diam = 100/L/PI = .74 ") scroll += 3 }else{ sprint(tstr, "%s.chk() modified() area2diam(\"%s\", %d)", \ tobj.geo.object(i), tobj.geo.object(i), tobj.geo.object(i).type) if (j == areatype) { sprint(tstr2, "%s (um2)", geotype[j].name) }else if (j == dlambdatype) { xlabel(" // lambda_w(f)^2 = diam/(4*PI*f*Ra*cm)") xlabel(" // nseg = ~L/(d_lambda*lambda_w(100))") xlabel(" // fraction of space constant at 100Hz") scroll += 3 sprint(tstr2, "d_lambda", geotype[j].name) }else if (j == dxtype) { xlabel(" // nseg = ~L/d_X") scroll += 1 sprint(tstr2, "d_X (um)", geotype[j].name) }else if (j <= constdiamtype) { sprint(tstr2, "%s (um)", geotype[j].name) }else{ sprint(tstr2, "%s", geotype[j].name) } sav = tobj.geo.object(i).value tobj.geo.object(i).value = tobj.geo.object(i).oldval xpvalue(tstr2, &tobj.geo.object(i).value, 1, tstr) tobj.geo.object(i).value = sav scroll += 1 if (j == areatype) { xvarlabel(dstr) } } } if (l == 1) {xlabel("}") for i=0, tobj.geo.count-1 { // handle distinct L,diam case tobj1 = tobj.geo.object(i) j = tobj1.type if (j > 1) { continue } // loop over all sections in section list sprint(tstr, "%s.chk() modified()", tobj1) scroll += tobj.list.count for k=0, tobj.list.count - 1 { tobj.list.object(k).name(tstr2) sprint(tstr2, "%s.%s (um)", tstr2, geotype[j].name) sav = tobj.list.object(k).ldiaminfo.x[j] tobj.list.object(k).ldiaminfo.x[j] = tobj.list.object(k).ldiaminfo.oldx[j] xpvalue(tstr2, &tobj.list.object(k).ldiaminfo.x[j], 1, tstr) tobj.list.object(k).ldiaminfo.x[j] = sav } }} tobj1 = nil xpanel(2*(scroll > 8) - 1) tobj.geobox.intercept(0) } for i=0, tobj.geo.count-1 { sprint(tstr, "%s", tobj.geo.object(i)) area2diam(tstr, tobj.geo.object(i).type) } tobj.geobox.map() d2.intercept(0) d2.flip_to(1) if (l == 1) { // SNList for j=0, setlist.count-1 { if (setlist.object(j) == tobj) { bild.subsets.showsel(j, g) in_selgeo_ = 0 return } } }else if (l == 2) { //CellBuildSection bild.topol.sel_only(geolist.object($1), g) in_selgeo_ = 0 return } in_selgeo_ = 0 } proc area2diam() { if ($2 == areatype) { sprint(tstr, "hoc_ac_ = %s.value", $s1) execute(tstr) x = sqrt(hoc_ac_/PI) sprint(dstr, " L = diam = %g", x) } } proc modified() {local x bild.geom_cnt_ += 1 i = geolist.selected() if (i < 0) { i = geolist_selected } tobj = geolist.object(i) geolist.remove(i) geolist.insrt(i, tobj) geolist.select(i) export() bild.memb.inhomo_export() } proc geolistname() { name($1, geolist) if (chg) { sprint(tstr, "x %s", tstr) }else{ sprint(tstr, " %s", tstr) } } proc setlistname() { name($1, setlist) } proc name() {local type, i, c type = ltype($o2.object($1)) if (type == 0) { sprint(tstr, "%s", geotype[$o2.object($1).type].name) return } $o2.object($1).name(tstr) sprint(tstr3, " %s", tstr) chg = 0 for i=0, $o2.object($1).geo.count-1 { name(i, $o2.object($1).geo) if ($o2.object($1).geo.object(i).changed() == 1) { chg = 1 } if (i == 0) { sprint(tstr3, "%s: %s", tstr3, tstr) }else{ sprint(tstr3, "%s, %s", tstr3, tstr) } } tstr = tstr3 } proc selsub() {local i, j, l i = $1 if (i > -1) { l = ltype(setlist.object($1)) setlist.select($1) for j=0, ngeotype-1 { geostate[j] = 0 } tobj = setlist.object(i).geo for j=0, tobj.count-1 { geostate[tobj.object(j).type] = 1 } if (l == 1) { bild.subsets.showsel(i, g) }else{ bild.topol.sel_only(setlist.object(i), g) } }else{ //print "celgeom selsub(-1)" // bild.topol.sel_all(0, g) } } proc selgeotype() {local i, j i = setlist.selected() bild.changed_ = 1 bild.geom_cnt_ += 1 if (i > -1) { // do not allow sepLtype or sepdiamtype if not subset if ($1 < constLtype && ltype(setlist.object(i)) != 1) { geostate[$1] = 0 return } setlist.object(i).geobox = nil tobj = setlist.object(i).geo if (geostate[$1]) { // add to list tobj1 = new GeoSpec($1, setlist.object(i)) tobj.append(tobj1) if ($1 == areatype) { tobj1.value = 100 }else if ($1 == dlambdatype) { tobj1.value = .1 }else if ($1 == dxtype) { tobj1.value = 50 } tobj1.set_default() }else{ for j=0, tobj.count-1 { if (tobj.object(j).type == $1) { tobj.remove(j) break } } } if (geostate[$1]) { geo_consist(i, $1) } tobj = setlist.object(i) j = geolist.index(tobj) if (j == -1 && tobj.geo.count > 0) { geolist.append(tobj) }else if (j != -1 && tobj.geo.count == 0) { geolist.remove(j) } setlist.remove(i) setlist.insrt(i,tobj) setlist.select(i) export() }else{ geostate[$1] = 0 } } proc geo_consist() {local i, j, b tobj = setlist.object($1).geo for (i=tobj.count - 1; i >= 0; i -= 1) { j = tobj.object(i).type if (j == $2) continue b = 0 if ($2 < nsegtype && j < nsegtype) { // remove other geom types but L,diam may be together b = 1 if ($2 == constdiamtype || $2 == sepdiamtype) { //allow L if (j == constLtype || j == sepLtype) { b = 0 } }else if ($2 == constLtype || $2 == sepLtype) { //allow diam if (j == constdiamtype || j == sepdiamtype) { b = 0 } } }else if ($2 >= nsegtype && j >= nsegtype) { // remove other compartmentization types b = 1 } if (b) { tobj.remove(i) geostate[j] = 0 export() } } } proc save_data() { local i, j, k, l, ii, type consist() sprint(tstr, "}\n{object_push(%s)}\n{\nfirst = 0", $s2) $o1.save(tstr) k = 1 for i=0, setlist.count-1 { tobj = setlist.object(i) l = ltype(tobj) tobj = tobj.geo for j=0, tobj.count-1 { k += 1 if (k%25 == 0) { $o1.save("}\n{") } type = tobj.object(j).type if (type < 2) { sprint(tstr, "tobj = new GeoSpec(%d, bild.subsets.snlist.object(%d))", type, i) $o1.save(tstr) sprint(tstr, "for i=0, %d {tobj.snlist.list.object(i).ldiaminfo.x[%d] = fscan()}}", tobj.object(j).snlist.list.count-1, type) $o1.save(tstr) for ii=0, tobj.object(j).snlist.list.count-1 { sprint(tstr, "%g", tobj.object(j).snlist.list.object[ii].ldiaminfo.x[type]) $o1.save(tstr) } $o1.save("{") }else{ sprint(tstr, "tobj = new GeoSpec(%d)", type) $o1.save(tstr) sprint(tstr, "tobj.value = %g", tobj.object(j).value) $o1.save(tstr) } if (l == 1) { sprint(tstr2, "bild.subsets.snlist.object(%d).geo.append(tobj)", i) }else{ sprint(tstr2, "bild.topol.slist.object(%d).geo.append(tobj)", \ bild.topol.slist.index(setlist.object(i))) } $o1.save(tstr2) } } $o1.save("set_default()") $o1.save("}\n{object_pop()}\n{") sprint(tstr, "%s.g", $s2) g.erase_all() selsub(setlist.selected) set_default() } proc set_default() {local i, j consist() for i=0, setlist.count-1 { tobj = setlist.object(i).geo for j=0, tobj.count-1 { tobj.object(j).set_default() } setlist.object(i).geobox = nil } export() inmode() } proc pr() {local i, j, l, k, x, is_auto, ii, nline, isg consist() is_auto = 0 $o1.printf("proc geom() {\n") nline = 0 isg = 0 for i=0, setlist.count-1{ tobj = setlist.object(i) if (tobj.geo.count) { l = ltype(tobj) if (l == 1) { $o1.printf(" forsec %s { ", tobj.name_) }else{ tobj.name(tstr) $o1.printf(" %s { ", tstr) } tobj = tobj.geo for j=0, tobj.count-1 { k = tobj.object(j).type if (k < constLtype) { continue } // do distinct L,diam after the forsec if (k == areatype) { x = tobj.object(j).value $o1.printf(" /*area = %g */ L = diam = %g ", x, sqrt(x/PI)) }else if (k == cirtype) { $o1.printf(" /*circuit*/ L= 43.0127 diam=100/L/PI ") }else if (k == dlambdatype) { is_auto=1 }else if (k == dxtype) { is_auto=1 }else if (k == nsegtype) { is_auto=1 }else{ $o1.printf(" %s = %g ", geotype[tobj.object(j).type].name, tobj.object(j).value) } } $o1.printf(" }\n") nline += 1 if (nline%200 == 0) { isg += 1 $o1.printf(" geom_%d()\n}\nproc geom_%d() {\n", isg, isg) } // the distinct L,diam for j=0, tobj.count-1 { k = tobj.object(j).type if (k >= constLtype) { continue } tobj1 = tobj.object(j).snlist.list for ii=0, tobj1.count-1 { tobj1.object(ii).name(tstr) $o1.printf(" %s.%s = %g\n", tstr, geotype[k].name, tobj1.object(ii).ldiaminfo.x[k]) nline += 1 if (nline%200 == 0) { isg += 1 $o1.printf(" geom_%d()\n}\nproc geom_%d() {\n", isg, isg) } } } tobj1 = nil } } $o1.printf("}\n") pr_autonseg($o1) } proc pr_autonseg() {local i, j, type, x, k, nline, isa if (bild.manage.toplevel == 0) { $o1.printf("external lambda_f\n") } nline = 0 isa = 0 $o1.printf("proc geom_nseg() {\n") // Do not need following line since lambda_f no longer needs diam from pt3d // This was a performance killer since every time a cell is created the entire // net is re-calculated. // $o1.printf(" %s area(.5) // make sure diam reflects 3d points\n", bild.topol.slist.object(0).name_) for i=0, geolist.count - 1 { is_auto = 0 tobj = geolist.object(i) type = ltype(tobj) tobj.name(tstr2) if (type == 1) { sprint(tstr2, " forsec %s {", tstr2) }else if (type == 2) { sprint(tstr2, " %s {", tstr2) }else { continue } tobj = tobj.geo for j=0, tobj.count-1 { k = tobj.object(j).type if (k == areatype) { }else if (k == cirtype) { }else if (k == dlambdatype) { is_auto=1 x = tobj.object(j).value sprint(tstr2, "%s nseg = int((L/(%g*lambda_f(100))+.999)/2)*2 + 1 ", tstr2, x) }else if (k == dxtype) { is_auto=1 x = tobj.object(j).value sprint(tstr2, " %s nseg = int((L/%g + .999)/2)*2 + 1 ", tstr2, x) }else if (k == nsegtype) { is_auto=1 x = tobj.object(j).value sprint(tstr2, " %s nseg = %d ", tstr2, x) }else{ } } sprint(tstr2, "%s }", tstr2) //print tstr2 if (is_auto) { $o1.printf("%s\n", tstr2) nline += 1 if (nline%100 == 0) { isa += 1 $o1.printf(" geom_nseg_%d()\n}\nproc geom_nseg_%d() {\n", isa, isa) } } } $o1.printf("}\n") } proc xmlwrite() {local i, j, l, k, x, is_auto consist() is_auto = 0 $o1.printf(" \n") for i=0, setlist.count-1{ tobj = setlist.object(i) if (tobj.geo.count) { l = ltype(tobj) if (l == 1) { $o1.printf(" \n", tobj.name_) }else{ tobj.name(tstr) $o1.printf("
\n", tstr) } tobj = tobj.geo for j=0, tobj.count-1 { k = tobj.object[j].type if (k == areatype) { x = tobj.object(j).value $o1.printf(" %g\n", x) }else if (k == cirtype) { $o1.printf(" \n") }else if (k == autonseg1) { is_auto=1 }else if (k == autonseg2) { is_auto=1 }else if (k == nsegtype) { is_auto=1 }else{ $o1.printf(" \n", geotype[tobj.object[j].type].name, tobj.object[j].value) } } if (l == 1) { $o1.printf(" \n") }else{ $o1.printf("
\n") } } } $o1.printf("
\n") xml_autonseg($o1) } proc xml_autonseg() { } endtemplate CellGeometry neuron-7.5/share/lib/hoc/celbild/celmang.hoc000077500000000000000000000325561323325274500210370ustar00rootroot00000000000000begintemplate CellManage public save_data, pr, update, classname, save_classbody public etop, esub, egeom, emem, toplevel, xmlwrite, neuroml external valid_name_syntax, hoc_sf_ objref bild, hbox, g, vbox, ewarn, deck objref tobj, tobj1, this, f, fc, nil strdef tstr, classname, output_str proc init() { thresh = 10 first = 1 etop = 1 esub = 1 egeom = 1 emem = 1 no_warn_ = 0 itop = 1 i3d = 1 isub = 0 igeom = 0 imem = 0 xml_ = 0 classname = "Cell" output_index = 0 output_str = "***********************" output_x = 1 bild = $o1 g = bild.gtopol panel() sprint(tstr, "%s", this) hbox.map(tstr) } proc hints() { xpanel("CellBuild Management hints") xlabel("Usage Hints:") xlabel("\"Cell Type\" is used to declare a type for use in networks.") xlabel("") xlabel("\"Export\" saves the current cell specification in a hoc") xlabel(" file without encapsulating the cell in") xlabel(" an object. Most common usage is to export all the information") xlabel(" but in the case where a 3-d cell with valid geometry has been") xlabel(" imported (see below), do not export the \"topology\"") xlabel(" unless you have also imported the 3-d info.") xlabel("When \"Continuous Create\" is checked, the cell is built at the") xlabel(" top level as it is changed.") xlabel("") xlabel("\"Import\" discards the existing specification in this tool") xlabel(" and copies the indicated information from the interpreter,") xlabel(" or the full information from a NeuroML file,") xlabel(" into this tool. This is most useful for 3-d reconstructions") xlabel(" for which one wishes to specify membrane properties (and Ra)") xlabel("") xlabel("It is a good idea to save this builder in a session file before") xlabel(" executing the exported file since the interpreter may not accept") xlabel(" the spec due to section name and subset name conflicts with") xlabel(" keywords or existing interpreter variables. If this happens you") xlabel(" may lose the changes since the last session save.") xpanel() } proc update() { bild.consist() if (output_index < 0) { output_index = 0 } output_draw(output_index) if (output_index >= 0) { bild.topol.sel_only(bild.topol.slist.object(output_index), g) } // if (first) hints(g) first = 0 g.exec_menu("Crosshair") } proc output_draw() { output_index = $1 tobj = bild.topol.slist if (output_index >= tobj.count) { output_index = tobj.count-1 } if (output_index >= 0) { tobj = tobj.object(output_index) tobj.name(tstr) sprint(output_str, "%s.v(%g)", tstr, output_x) }else{ output_str = "****" } objref tobj } proc panel() { hbox = new HBox(3) hbox.intercept(1) hbox.ref(this) hbox.save("save()") vbox = new VBox(3) vbox.intercept(1) xpanel("", 1) xradiobutton("Cell Type ", "deck.flip_to(0)") xradiobutton("Export ", "deck.flip_to(1)") xradiobutton("Import ", "deck.flip_to(2)") xbutton("Hints", "hints()") xpanel() deck = new Deck(3) deck.intercept(1) xpanel("cell type") xlabel("This is necessary only if the cell is used in a network") xlabel("") xlabel("This creates a file that declares a cell type") xlabel(" with the current specification") xlabel("Such a cell class is usable in networks and") xlabel(" can be employed by the network builder tool.") xbutton("Classname", "set_class()") xvarlabel(classname) xlabel("") g.menu_tool("Select Output", "seloutput") xvarlabel(output_str) xpvalue("threshold (mV)", &thresh, 1) xlabel("") xbutton("Save hoc code in file", "save_class()") xpanel() xpanel("export") xlabel("Export to file (or top level with \"Continuous\")") xlabel(" i.e. does not encapsulate the cell in an object.") xlabel("Kind of information exported") xcheckbox("Topology (Destroys all existing top level sections)", &etop) xcheckbox("Subsets", &esub) xcheckbox("Geometry", &egeom) xcheckbox("Membrane", &emem) xlabel("") xcheckbox("xml", &xml_, "f = nil") xbutton("Export to file", "xport()") xpanel() xpanel("import") xlabel("Import from top level of interpreter.") xlabel(" This works only if there is one cell in the interpreter.") xlabel("Or import from NeuroML (Level 2) file.") xlabel("") xlabel("From top level, imports: Topology, 3-D info.") xlabel("From NeuroML file: Topology, 3-D info, Subsets, Biophysics.") xlabel(" Don't forget to specify compartmentalization in Geometry.") //xcheckbox("Topology", &itop) //xcheckbox("3-D info", &i3d) //xcheckbox("Subsets (only for NeuroML)", &isub, "isub = 0") //xcheckbox("Geometry (not implemented)", &igeom, "igeom = 0") //xcheckbox("Membrane(only for NeuroML)", &imem, "imem = 0") xlabel("") xmenu("Import") xbutton("Top Level", "iport()") xbutton("NeuroML", "neuroml1()") xmenu() xcheckbox("Turn off indexed name display.", &bild.topol.names_off, "bild.topol.draw(g)") xcheckbox("Don't draw short sections as circles.", &bild.topol.circles_off, "bild.topol.draw(g)") xpanel() deck.intercept(0) deck.map() deck.flip_to(-1) vbox.intercept(0) vbox.map() hbox.intercept(0) } proc seloutput() {local i if ($1 == 2) { tobj = bild.topol tobj.sel1($1,$2,$3,0) tobj = tobj.slist for i=0, tobj.count-1 { if (tobj.object(i).selected) { output_draw(i) break } } } } proc set_class() { tstr = classname while (string_dialog("Classname", tstr)) { if (valid_name_syntax(tstr, 1)) { classname = tstr break } } } proc save_class() {local i, j, dp if (object_id(fc) == 0) { fc = new File() fc.chooser("w", "Save cell class in file", "*.hoc") } if (fc.chooser()) { fc.wopen() fc.printf("//execute1(\"celltypes.element(\\\"%s\\\")\")\n\n",classname) dp = bild.subsets.have_domainparm() if (dp) { fc.printf("load_file(\"subiter.hoc\")\n\n") } fc.printf("begintemplate %s\n", classname) save_classbody(fc) fc.printf("proc synapses() {}\n") fc.printf("endtemplate %s\n", classname) fc.close() } } proc save_classbody() {local dp toplevel = 0 bild.consist() dp = bild.subsets.have_domainparm() $o1.printf("public init, topol, basic_shape, subsets, geom, biophys, geom_nseg, biophys_inhomo\n") $o1.printf("public synlist, x, y, z, position, connect2target\n") j = 0 for i=0, bild.topol.unique_name.size-1 { tstr = bild.topol.slist.object(bild.topol.unique_name.x[i]).name_ if (j%7 == 0) { $o1.printf("\npublic %s", tstr) }else{ $o1.printf(", %s", tstr) } j += 1 } j = 0 for i=0, bild.subsets.snlist.count-1 { tstr = bild.subsets.snlist.object(i).name_ if (j%7 == 0) { $o1.printf("\npublic %s", tstr) }else{ $o1.printf(", %s", tstr) } j += 1 } $o1.printf("\n\nobjref synlist\n\n") $o1.printf("proc init() {\n") $o1.printf(" topol()\n") $o1.printf(" subsets()\n") $o1.printf(" geom()\n") $o1.printf(" biophys()\n") $o1.printf(" geom_nseg()\n") if (dp) { $o1.printf(" biophys_inhomo()\n") } $o1.printf(" synlist = new List()\n") $o1.printf(" synapses()\n") $o1.printf(" x = y = z = 0 // only change via position\n") $o1.printf("}\n") bild.topol.pr($o1) bild.subsets.pr($o1) bild.geom.pr($o1) bild.memb.pr($o1) if (!dp) { $o1.printf("proc biophys_inhomo(){}\n") } $o1.printf("proc position() { local i\n") bild.topol.slist.object(0).name(tstr) $o1.printf(" %s for i = 0, n3d()-1 {\n", tstr) $o1.printf(" pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))\n }\n") $o1.printf(" x = $1 y = $2 z = $3\n") $o1.printf("}\n") $o1.printf("obfunc connect2target() { localobj nc //$o1 target point process, optional $o2 returned NetCon\n") bild.topol.slist.object(output_index).name(tstr) $o1.printf(" %s nc = new NetCon(&v(%g), $o1)\n", tstr, output_x) $o1.printf(" nc.threshold = %g\n", thresh) $o1.printf(" if (numarg() == 2) { $o2 = nc } // for backward compatibility\n") $o1.printf(" return nc\n") $o1.printf("}\n") } proc iport() { define_shape() if (i3d) { if (!warn3d()) { return } } if (itop) {bild.topol.iport()} if (i3d) {bild.topol.iport3d()} if (isub) {bild.subsets.iport()} if (igeom) {bild.geom.iport()} if (imem) {bild.memb.iport()} bild.consist() g.exec_menu("View = plot") g.exec_menu("Scene=View") bild.topol.draw(g) } proc neuroml() {localobj s, p s = new String() nrnpython("from neuron.neuroml.rdxml import rdxml") p = new PythonObject() p.rdxml($s1, this) bild.consist() bild.page(5) deck.flip_to(2) g.exec_menu("View = plot") g.exec_menu("Scene=View") bild.topol.names_off = 1 bild.topol.circles_off = 1 bild.topol.draw(g) } proc neuroml1() {localobj f, s, p if (nrnpython("") == 0) { continue_dialog("Can't read NeuroML: Python not available.") return } f = new File() f.chooser("r", "Import NeuroML file", "*.xml") s = new String() while(f.chooser()) { f.gets(s.s) f.close() if (hoc_sf_.head(s.s, "^\\<\\?xml", s.s) != -1) { neuroml(f.getname()) break }else{ sprint(s.s, "%s is not a NeuroML file", f.getname()) continue_dialog(s.s) continue } } } proc parsed() { //print "parsed ", $o1, $o1.cables_.__len__() bild.topol.neuroml($o1) bild.subsets.neuroml($o1) bild.geom.neuroml($o1) bild.memb.neuroml($o1) if (strcmp($o1.cellname, "") != 0) { classname = $o1.cellname } } func warn3d() { tobj = new VBox() tobj.intercept(1) xpanel("") xlabel("Importing 3-D geometry will change the names of") xlabel("indexed sections to conform to the") xlabel("CellBuilder's indexing policy.") xlabel("(Section names without indices will stay the same.)") xlabel("This means that most section names at the top level") xlabel("will change RIGHT NOW!") xpanel() tobj.intercept(0) return tobj.dialog("Warning:", "Go ahead and import", "Cancel") } proc xport() { if (object_id(f) == 0) { f = new File() if (xml_) { f.chooser("w", "Save cell in file", "*.xml") }else{ f.chooser("w", "Save cell in file", "*.hoc") } } // if (warn() == 0) return if (f.chooser()) { f.wopen() if (xml_) { xmlwrite(f) }else{ toplevel=1 pr(f) if (bild.topol.slist.count > 0) { bild.topol.slist.object(0).name(tstr) f.printf("access %s\n", tstr) } f.printf("\ncelldef()\n") } f.close() } // if (check_names()) { // if (execute1("xopen(\"tmpxxx.tmp\")") == 0) { // continue_dialog("the hoc spec saved in tmpxxx.tmp failed") // } // }else{ // continue_dialog("The hoc spec saved in tmpxxx.tmp was not exported") // } } func check_names() {local b, i, j b = 1 tobj = bild.topol.unique_name if (etop) { for i=0, tobj.size-1 { tstr = bild.topol.slist.object(tobj.x[i]).name_ j = name_declared(tstr) if (j != 0 && j != 3) { b = 0 sprint(tstr, "%s already exists and can't be re-declared as a Section",tstr) continue_dialog(tstr) }else{ sprint(tstr, "create %s", tstr) execute(tstr) } } } tobj = bild.subsets.snlist for i=0, tobj.count-1 { tstr = tobj.object(i).name_ j = name_declared(tstr) if (j != 0 && j != 2) { b = 0 sprint(tstr, "%s already exists and can't be re-declared as a SectionList",tstr) continue_dialog(tstr) }else{ sprint(tstr, "objref %s", tstr) execute(tstr) } } return b } func warn() { if (no_warn_==0 && bild.changed()) { if (object_id(ewarn) == 0) { ewarn = new VBox() ewarn.intercept(1) xpanel("") xlabel("Warning: existing cell spec has changed since the last session save") xlabel(" and this implementation does not know if the names") xlabel(" of the sections and subsets are syntactically valid.") xlabel(" If not, the interpreter may crash which will lose those cell changes.") xlabel(" It is recommended that you Cancel and save the session before exporting.") xcheckbox("Do not give this warning again", &no_warn_) xpanel() ewarn.intercept(0) } return ewarn.dialog("CellBuilder Export Warning", "Export anyway", "Cancel") } return 1 } proc save_data() { sprint(tstr, "}\n{object_push(%s)}\n{\nfirst = 0", $s2) $o1.save(tstr) sprint(tstr, "classname = \"%s\"", classname) $o1.save(tstr) sprint(tstr, "etop=%d esub=%d egeom=%d emem=%g", etop,esub,egeom,emem) $o1.save(tstr) sprint(tstr, "itop=%d isub=%d igeom=%d imem=%g", itop,isub,igeom,imem) $o1.save(tstr) sprint(tstr, "bild.topol.names_off = %d", bild.topol.names_off) $o1.save(tstr) sprint(tstr, "bild.topol.circles_off = %d", bild.topol.circles_off) $o1.save(tstr) sprint(tstr, "output_index = %d output_x = %g", output_index, output_x) $o1.save(tstr) sprint(tstr, "thresh = %g", thresh) $o1.save(tstr) $o1.save("}\n{object_pop()}\n{") } proc pr() {local dp dp = bild.subsets.have_domainparm() if (dp) { $o1.printf("load_file(\"subiter.hoc\")\n\n") } $o1.printf("proc celldef() {\n") if (etop) $o1.printf(" topol()\n") if (esub) $o1.printf(" subsets()\n") if (egeom) $o1.printf(" geom()\n") if (emem) $o1.printf(" biophys()\n") if (egeom) $o1.printf(" geom_nseg()\n") if (emem) if (dp) $o1.printf(" biophys_inhomo()\n") $o1.printf("}\n") if (etop) bild.topol.pr($o1) if (esub) bild.subsets.pr($o1) if (egeom) bild.geom.pr($o1) if (emem) bild.memb.pr($o1) } proc xmlwrite() { strdef date $o1.printf("\n", $o1.getname()) $o1.printf("\n") $o1.printf("\n") $o1.printf("\n") system("date ", date) $o1.printf("\n", date) $o1.printf("\n", classname) $o1.printf(" \n") bild.topol.xmlwrite($o1) bild.subsets.xmlwrite($o1) $o1.printf(" \n") // bild.geom.xmlwrite($o1) bild.memb.xmlwrite($o1) $o1.printf("\n") } endtemplate CellManage neuron-7.5/share/lib/hoc/celbild/celmemb.hoc000077500000000000000000000453431323325274500210330ustar00rootroot00000000000000begintemplate FakeMechStan public type, value, oldval, changed, set_default, chk, count public name, panel, action // a fake MechanismStandard in MechStanWrap for Ra and cm objref mod_ proc init() { type = $1 if (type == 0) { value = 35.4 }else{ value = 1 } set_default() } proc set_default() { oldval = value } func changed() { if (oldval != value) { return 1 } return 0 } func count() { return 1 } proc name() { if (type == 0) $s1 = "Ra" if (type == 1) $s1 = "cm" } proc panel() { xpanel("") xlabel($s1) if (type == 0) xpvalue("Ra (ohm-cm)", &value, 1, "mod()") if (type == 1) xpvalue("cm (uF/cm2)", &value, 1, "mod()") xpanel() } proc action() { mod_ = $o2 } proc mod() { chk() mod_.modified() } proc chk() { if (type == 4) { // nseg if (value < 1) { value = 1 } value = int(value) }else{ if (value <= 0) { value = 1e-6 } } } endtemplate FakeMechStan begintemplate MStanWrap public ms, msold, changed, set_default, box, is_ms objref ms, msold, box strdef tstr proc init() { ms = $o1 is_ms = 1 if (numarg() == 2) { is_ms = $2 } if (is_ms) { ms.name(tstr) msold = new MechanismStandard(tstr) } set_default() } proc set_default() { if (is_ms) { ms.out(msold) }else{ ms.set_default() } } func changed() {local i, j if (is_ms) { for i = 0, ms.count-1 { for j=0, ms.name(tstr, i) - 1 { if (ms.get(tstr, j) != msold.get(tstr, j)) { return 1 } } } }else{ return ms.changed() } return 0 } endtemplate MStanWrap begintemplate CellMembrane public update, mstate, save_data, g, bild, changed, pr, consist, modified public free, cexport, export, inhomo_export, xmlwrite, neuroml objref g, this, setlist, mt, tobj, hbox, bild, sf, ms[1], vbox, d1,d2 objref mlist, tobj1, nil, inhomo, inhomonames double mstate[1] strdef tstr, tstr1, tstr2, lab1 proc init() { emem = 0 lab1 = "mmmmmmmmmmmmmmmmmmmmmmmmmmmmm" inhomo = new Vector(100) inhomonames = new List() first = 1 bild = $o1 g = bild.gtopol setlist = new List() mlist = new List() sf = new StringFunctions() mt = new MechanismType(0) panel() sprint(tstr, "%s", this) hbox.map(tstr) } proc hints() { xpanel("CellBuild Biophysics hints") xlabel("Usage Hints:") xlabel("First, use \"Specify Strategy\" to define a (hopefully compact)") xlabel(" strategy of which membrane parameter sets should be") xlabel(" associated with which subsets and individual sections.") xlabel(" If a subset or section is used for a membrane spec that ") xlabel(" fact is noted in its label.") xlabel("") xlabel("Next, unselect the strategy button to use the strategy.") xlabel(" Only the subsets and sections with mechanisms are shown.") xlabel(" If a subset or section has mechanism values that differ") xlabel(" from the values when this tool was last saved in a session") xlabel(" file, an \"x\" is shown in front of its strategy label.") xlabel("") xlabel("The strategy order should be general to specific since the") xlabel(" specification will be executed in the order given.") xlabel(" Go back to \"Subsets\" if more subsets are needed or if the") xlabel(" order needs to be changed.") xpanel() } proc cexport() { local i emem = $1 if (bild.continuous == 0) { emem = 0 } consist() } proc export() {local i, j, l, m, n, ii if (emem) { for i=0, setlist.count-1{ tobj = setlist.object(i) l = ltype(tobj) if (l != 3) if(tobj.ml.count) { if (l == 1) { sprint(tstr2, "forsec %s {", tobj.name_) }else{ tobj.name(tstr) sprint(tstr2, "%s {", tstr) } tobj = tobj.ml for j=0, tobj.count-1 { tobj1 = tobj.object(j).ms tobj1.name(tstr) if (tobj.object(j).is_ms) { sprint(tstr, "%s insert %s }", tstr2, tstr) //print tstr execute(tstr) for m=0, tobj1.count-1 { n = tobj1.name(tstr, m) if (n == 1) { sprint(tstr, "%s %s = %g }", tstr2, tstr, tobj1.get(tstr)) //print tstr execute(tstr) }else{ for ii=0, n-1 { sprint(tstr1, "%s %s[%d] = %g }", tstr2, tstr, ii, tobj1.get(tstr, ii)) //print tstr1 execute(tstr1) } } } }else{ sprint(tstr, "%s %s = %g }", tstr2, tstr, tobj1.value) //print tstr execute(tstr) } } } } inhomo_export() } } proc inhomo_export() { if (emem) { for i=0, setlist.count-1 { tobj = setlist.object(i) if (ltype(tobj) == 3) { tobj.export() } } } } proc free() {local i, j for i = 0, mlist.count-1 { tobj = mlist.object(i) if (ltype(tobj) == 0) { tobj.ms.action("modified()", nil) } } } func changed() {local i for i=0, mlist.count - 1 { if (ltype(mlist.object(i)) == 0) { if (mlist.object(i).changed()) { return 1 } } } return 0 } func ltype() { //0 MechanismStandard, 1 SNList, 2 CellBuildSection, // 3 DomainParmInfo sprint(tstr, "%s", $o1) if (sf.head(tstr, "MStanWrap", tstr2) >= 0) { return 0 }else if (sf.head(tstr, "SNList", tstr2) >= 0) { return 1 }else if (sf.head(tstr, "DomainParmInfo", tstr2) >= 0) { return 3 }else if (sf.head(tstr, "InhomoParm", tstr2) >= 0) { return 4 } return 2 } proc consist() { local i, j, k setlist.remove_all() mlist.remove_all() for i=0, bild.subsets.snlist.count-1 { tobj = bild.subsets.snlist.object(i) setlist.append(tobj) if (tobj.ml.count > 0) { mlist.append(tobj) for j=0, tobj.ml.count-1 { tobj.ml.object(j).ms.action("modified()", this) mlist.append(tobj.ml.object(j)) } } if (tobj.domainparms != nil) { for j=0, tobj.domainparms.count-1 { setlist.append(tobj.domainparms.object(j)) } } } for i=0, bild.subsets.snlist.count-1 { tobj = bild.subsets.snlist.object(i).domainparms if (tobj != nil) for j=0, tobj.count-1 { tobj1 = tobj.object(j) if (tobj1.using_.count) { mlist.append(tobj1) } for k=0, tobj1.using_.count-1 { mlist.append(tobj1.using_.object(k)) } } } for i=0, bild.topol.slist.count-1 { tobj = bild.topol.slist.object(i) setlist.append(tobj) if (tobj.ml.count > 0) { mlist.append(tobj) for j=0, tobj.ml.count-1 { tobj.ml.object(j).ms.action("modified()",this) mlist.append(tobj.ml.object(j)) } } } if (mlist.count > mlist_selected) { mlist.select(mlist_selected) }else{ mlist.select(-1) } export() } proc update() {local i, j bild.subsets.update() consist() if (mlist.count) { inmode_ = 0 }else{ inmode_ = 1 } first = 0 if (setlist.count > 0) { setlist.select(0) } inmode() g.exec_menu("Crosshair") } proc panel() { local i hbox = new HBox(3) hbox.intercept(1) hbox.ref(this) hbox.save("save()") vbox = new VBox(3) vbox.intercept(1) xpanel("") inmode_ = 1 xcheckbox("Specify Strategy", &inmode_, "inmode()") xpanel() d1 = new Deck(3) d1.intercept(1) setlist.browser("", tstr, "setlistname(hoc_ac_)") setlist.select_action("selsub(hoc_ac_)") setlist.accept_action("selsub(hoc_ac_)") mlist.browser("", tstr, "mlistname(hoc_ac_)") mlist.select_action("selms(hoc_ac_)") mlist.accept_action("selms(hoc_ac_)") d1.intercept(0) d1.map() d1.flip_to(0) xpanel("") xbutton("Hints", "hints()") xpanel() vbox.intercept(0) vbox.map() double mstate[mt.count] objref ms[mt.count] d2 = new Deck(3) d2.intercept(1) xpanel("") xvarlabel(lab1) for i=0, mt.count-1 { mt.select(i) mt.selected(tstr) if (i == 4) { continue } if (i == 0) tstr = "Ra" if (i == 1) tstr = "cm" if (sf.substr(tstr, "_ion") >= 0) { continue } sprint(tstr2, "selmt(%d)", i) xcheckbox(tstr, &mstate[i], tstr2) } xpanel() xpanel("") xlabel("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz") xpanel() d2.intercept(0) d2.flip_to(0) d2.map() hbox.intercept(0) } proc inmode() { bild.leave() if (inmode_ == 1) { d1.flip_to(0) selsub(setlist.selected) g.exec_menu("Crosshair") }else{ consist() d1.flip_to(1) if (mlist.count > 0) { mlist.select(0) doNotify() selms(0) }else{ d2.flip_to(-1) g.exec_menu("Crosshair") } } } proc modified() {local i i = mlist.selected() if (i < 0) { i = mlist_selected } tobj = mlist.object(i) mlist.remove(i) mlist.insrt(i, tobj) mlist.select(i) export() if ( mlist.object(i).is_ms == 0 && emem) { //Ra or cm bild.geom.export_autonseg() inhomo_export() } } proc selms() {local i, j, l, k if (in_selms_) { return } in_selms_ = 1 bild.leave() if ($1 == -1) { in_selms_ = 0 return } l = ltype(mlist.object($1)) if (l != 0 && l != 4) { //mechanism or inhomoparm $1 += 1 mlist.select($1) } for (i=$1-1; i >= 0; i -= 1) { tobj = mlist.object(i) l = ltype(tobj) if (l == 1) { // SNList for j=0, setlist.count-1 { if (setlist.object(j) == tobj) { k = bild.subsets.snlist.index(tobj) bild.subsets.showsel(k, g) mspan(1, $1, tobj) g.exec_menu("Crosshair") in_selms_ = 0 return } } }else if (l == 2) { //CellBuildSection bild.topol.sel_only(tobj, g) mspan(2, $1, tobj) g.exec_menu("Crosshair") in_selms_ = 0 return }else if (l == 3) { k = bild.subsets.snlist.index(tobj.subset) bild.subsets.showsel(k, g) mspan(3, $1, tobj) in_selms_ = 0 return } } in_selms_ = 0 } proc mspan() { name($o3) tobj = mlist.object($2) mlist_selected = $2 tobj.ms.name(tstr2) if (tobj.is_ms) { tstr1 = "insert " }else{ tstr1 = "// specify " } if ($1 == 1) { sprint(tstr, "forsec %s { %s%s", tstr, tstr1, tstr2) }else if ($1 == 3) { sprint(tstr, "for %s.loop(&x, &p) {", tstr) // force rebuild of panel tobj.box = nil }else{ sprint(tstr, "%s { %s%s", tstr, tstr1, tstr2) } if (object_id(tobj.box) == 0) { tobj.box = new VBox(3) tobj.box.intercept(1) tobj.ms.panel(tstr) tobj.box.intercept(0) } d2.remove_last() d2.intercept(1) tobj.box.map() d2.intercept(0) d2.flip_to(1) } proc setlistname() {local type type = name(setlist.object($1)) if (type == 2) { sprint(tstr, " %s", tstr) } if (type == 3) { if (setlist.object($1).using_.count) { sprint(tstr, " %s: manage ...", tstr) }else{ sprint(tstr, " %s", tstr) } return } if (setlist.object($1).ml.count) { sprint(tstr,"%s: manage ...", tstr) } } proc mlistname() {local type type = name(mlist.object($1)) if (type == 0) { //mechanism if (mlist.object($1).changed()) { sprint(tstr, "x %s", tstr) }else{ sprint(tstr, " %s", tstr) } }else if (type == 2) { // CellBuildSection sprint(tstr, " %s", tstr) }else if (type == 3) { sprint(tstr, " %s", tstr) }else if (type == 4) { sprint(tstr, " %s", tstr) }else{ sprint(tstr, " %s", tstr) } } func name() {local type type = ltype($o1) if (type == 0) { //mechanism $o1.ms.name(tstr) }else{ $o1.name(tstr) } return type } proc selsub() {local i, j, l, k if ($1 == -1) return if (in_selsub_) { return } in_selsub_ = 1 l = ltype(setlist.object($1)) i = $1 setlist.select($1) for j=0, mt.count-1 { mstate[j] = 0 } if (i > -1 && l == 3) { setlist.object(i).name(tstr) sprint(lab1, "for %s.loop(&x,&p) { // specify", tstr) k = bild.subsets.snlist.index(setlist.object(i).subset) bild.subsets.showsel(k, g) range_selector(i) in_selsub_ = 0 return } d2.flip_to(0) if (i > -1) { tobj = setlist.object(i).ml for j=0, tobj.count-1 { if (tobj.object(j).is_ms) { tobj.object(j).ms.name(tstr) mt.select(tstr) mstate[mt.selected] = 1 }else{ mstate[tobj.object(j).ms.type] = 1 } } name(setlist.object(i)) if (l == 1) { sprint(lab1, "forsec %s { //specify", tstr) k = bild.subsets.snlist.index(setlist.object(i)) bild.subsets.showsel(k, g) }else{ sprint(lab1, "%s { //specify", tstr) bild.topol.sel_only(setlist.object(i), g) } } in_selsub_ = 0 } proc range_selector() {local i, j, k, size d2.remove_last() d2.intercept(1) xpanel("") xlabel(lab1) tobj = setlist.object($1).subset.list.object(0).sets inhomo.resize(0) inhomonames.remove_all for i=0, tobj.count-1 { for j=0, tobj.object(i).ml.count-1 { tobj1 = tobj.object(i).ml.object(j).ms tobj1.name(tstr) for k=0, tobj1.count-1 { tobj1.name(tstr, k) if (strcmp(tstr, "Ra") == 0) {continue} if (in_inhomonames(tstr)) {continue} inhomonames.append(new String(tstr)) sprint(tstr1, "selinhomo(%d, \"%s\")", inhomo.size, tstr) inhomo.append(setlist.object($1).is_using(tstr)) xcheckbox(tstr, &inhomo.x[inhomo.size-1], tstr1) } } } xpanel(1) d2.intercept(0) d2.flip_to(1) // make sure not using anything not in list tobj = setlist.object($1).using_ for (i=tobj.count-1; i >= 0; i -= 1) { if (in_inhomonames(tobj.object(i).s) == 0) { tobj.remove(i) } } } func in_inhomonames() {local i for i=0, inhomonames.count-1 { if (strcmp(inhomonames.object(i).s, $s1) == 0) { return 1 } } return 0 } proc selinhomo() {local i // printf("%s is %d\n", $s2, $1) i = setlist.selected tobj = setlist.object(i) tobj.using(inhomo.x[$1], $s2) setlist.remove(i) setlist.insrt(i, tobj) setlist.select(i) export() } proc unexport() {//can't use tobj or tstr, $3 is tstr2 if (emem) { if ($2 == 1) { sprint(tstr1, "forsec %s uninsert %s", $o1.name_,$s3) }else{ $o1.name(tstr1) sprint(tstr1, "%s uninsert %s", tstr1, $s3) } execute(tstr1) } } proc selmt() {local i, j, l, b i = setlist.selected() bild.changed_ = 1 b = 0 if (i > -1) { l = ltype(setlist.object(i)) tobj = setlist.object(i).ml mt.select($1) mt.selected(tstr) if (mstate[$1]) { // add to list if ($1 <= 1) { tobj.append(new MStanWrap(new FakeMechStan($1), 0)) b = 1 }else{ tobj.append(new MStanWrap(new MechanismStandard(tstr))) } }else{ for j=0, tobj.count-1 { if (tobj.object(j).is_ms) { tobj.object(j).ms.name(tstr2) if (strcmp(tstr, tstr2) == 0) { unexport(setlist.object(i), l, tstr2) tobj.remove(j) break } }else{ if (tobj.object(j).ms.type == $1){ tobj.remove(j) break } } } } tobj = setlist.object(i) j = mlist.index(tobj) if (j == -1 && tobj.ml.count > 0) { mlist.append(tobj) }else if (j != -1 && tobj.ml.count == 0) { mlist.remove(j) } setlist.remove(i) setlist.insrt(i, tobj) setlist.select(i) export() if ( b == 1 && emem) { //Ra or cm bild.geom.export_autonseg() inhomo_export() } }else{ mstate[$1] = 0 } } proc set_default() { if ($o1.changed()) { $o1.set_default() $o1.box = nil } } proc neuroml() {local i, j, g_index, isms localobj bm, parm, ms, cg // NeuroML files from ModelView // have group a subitem of parm instead of biomech // CellBuild requires all parms of a biomech to be set for // each group the biomech is in. for g_index = 0, $o1.cablegroups_.__len__() - 1 { cg = $o1.cablegroups_[g_index] for i = 0, cg.mechs_.__len__() - 1 { bm = cg.mechs_[i] //print bm.name_ if (bm.parms_.__len__() == 0) { continue } isms = 0 if (strcmp("Ra", bm.name_) == 0) { ms = new FakeMechStan(0) ms.value = bm.parms_[0].value_ ms.set_default() }else if (strcmp("cm", bm.name_) == 0) { ms = new FakeMechStan(1) ms.value = bm.parms_[0].value_ ms.set_default() }else{ isms = 1 ms = new MechanismStandard(bm.name_) for j=0, bm.parms_.__len__() - 1 { parm = bm.parms_[j] ms.set(parm.name_, parm.value_, 0) } } ms = new MStanWrap(ms, isms) bild.subsets.snlist.object(g_index).ml.append(ms) } } } proc save_data() { local i, j, l, k consist() sprint(tstr, "}\n{object_push(%s)}\n{first=0}", $s2) $o1.save(tstr) for i=0, setlist.count-1 { tobj = setlist.object(i) l = ltype(tobj) if (l == 3) { continue } tobj = tobj.ml for j=0, tobj.count-1 { $o1.save("{") if (tobj.object(j).is_ms) { tobj.object(j).ms.save("tobj") }else{ sprint(tstr2, "tobj = new FakeMechStan(%d)", tobj.object(j).ms.type) $o1.save(tstr2) sprint(tstr2, "tobj.value = %g", tobj.object(j).ms.value) $o1.save(tstr2) $o1.save("tobj.set_default()") } set_default(tobj.object(j)) sprint(tstr2, "tobj = new MStanWrap(tobj, %d)", tobj.object(j).is_ms) $o1.save(tstr2) if (l == 1) { sprint(tstr2, "bild.subsets.snlist.object(%d).ml.append(tobj)", \ bild.subsets.snlist.index(setlist.object(i))) }else{ sprint(tstr2, "bild.topol.slist.object(%d).ml.append(tobj)", \ bild.topol.slist.index(setlist.object(i))) } $o1.save(tstr2) $o1.save("}") } } $o1.save("{object_pop()}\n{") inmode() } proc pr() {local i, j, l, m, n, ii, have_inhomo, nline, isb consist() $o1.printf("proc biophys() {\n") nline = 0 isb = 0 have_inhomo = 0 for i=0, setlist.count-1{ tobj = setlist.object(i) l = ltype(tobj) if (l != 3 && l != 4) if (tobj.ml.count) { if (l == 1) { $o1.printf(" forsec %s {\n", tobj.name_) nline += 1 }else{ tobj.name(tstr) $o1.printf(" %s {\n", tstr) nline += 1 } tobj = tobj.ml for j=0, tobj.count-1 { tobj1 = tobj.object(j).ms tobj1.name(tstr) if (tobj.object(j).is_ms) { $o1.printf(" insert %s\n", tstr) for m=0, tobj1.count-1 { n = tobj1.name(tstr, m) if (n == 1) { $o1.printf(" %s = %g\n", tstr, tobj1.get(tstr)) nline += 1 }else{ for ii=0, n-1 { $o1.printf(" %s[%d] = %g\n", tstr, ii, tobj1.get(tstr)) nline += 1 } } } }else{ $o1.printf(" %s = %g\n", tstr, tobj1.value) nline += 1 } } $o1.printf(" }\n") nline += 1 } if (nline > 200) { nline = 0 isb += 1 $o1.printf(" biophys_%d()\n}\nproc biophys_%d() {\n", isb, isb) } if( l == 3) { have_inhomo = 1 } } $o1.printf("}\n") if (have_inhomo) { j = 0 for bild.subsets.domain_iter(tobj) { tobj.name(tstr) if (j == 0) { $o1.printf("objref %s", tstr) }else{ $o1.printf(", %s", tstr) } j = 1 } nline = 0 isb = 0 $o1.printf("\nproc biophys_inhomo() {\n") for bild.subsets.domain_iter(tobj) { tobj.prmemb1($o1, &nline, &isb) } $o1.printf("}\n") for bild.subsets.domain_iter(tobj) { tobj.prmemb2($o1) } } } proc xmlwrite() {local i, j, l, m, n, ii consist() $o1.printf(" \n") for i=0, setlist.count-1{ tobj = setlist.object(i) l = ltype(tobj) if (l != 3 && l != 4 ) if (tobj.ml.count) { if (l == 1) { $o1.printf(" \n", tobj.name_) }else{ tobj.name(tstr) $o1.printf("
\n", tobj.id_) } tobj = tobj.ml for j=0, tobj.count-1 { tobj1 = tobj.object(j).ms tobj1.name(tstr) if (tobj.object(j).is_ms) { $o1.printf(" \n", tstr) for m=0, tobj1.count-1 { n = tobj1.name(tstr, m) if (n == 1) { $o1.printf(" \n", tstr, tobj1.get(tstr)) }else{ for ii=0, n-1 { $o1.printf(" \n", tstr, ii, tobj1.get(tstr)) } } } $o1.printf(" \n") }else{ $o1.printf(" \n", tstr, tobj1.value) } } if (l == 1) { $o1.printf(" \n") }else{ $o1.printf("
\n") } } } for bild.subsets.domain_iter(tobj) { tobj.xmlwrite($o1) } $o1.printf("
\n") } endtemplate CellMembrane neuron-7.5/share/lib/hoc/celbild/celset.hoc000077500000000000000000000457121323325274500207060ustar00rootroot00000000000000begintemplate SNList // Like a Section List public name, name_, list, differ, name_differ, add, del_all, ml, geo, geobox public domainparms, is_subset public export, sectionlist objref list, this, ml, geo, geobox, domainparms, sectionlist strdef name_, tstr proc init() { name_ = $s1 parm_ = .5 list = new List() ml = new List() geo = new List() differ = 0 name_differ = 0 } func is_subset() { return 1 } proc add() { if ($o1.sets.index(this) == -1) { // only add if not already in list list.append($o1) $o1.sets.append(this) }else{ printf("Section already present in subset.\n") } } proc del_all() { local i, j for i=0, list.count-1 { j = list.object(i).sets.index(this) list.object(i).sets.remove(j) } list.remove_all() } proc name() { $s1 = name_ } proc export() {local i sprint(tstr, "objref %s", name_) //print tstr execute(tstr) sprint(tstr, "%s = new SectionList()", name_) //print tstr execute(tstr) if (object_id(domainparms)) { sprint(tstr, "%s.sectionlist = %s", this, name_) execute(tstr) } for i=0, list.count-1 { list.object(i).name(tstr) sprint(tstr, "%s %s.append()", tstr, name_) //print tstr execute(tstr) } } endtemplate SNList // subset domain info display list item is either a subset or a // subset domain info object begintemplate SDIDispListItem public name, item objref item proc init() { item = $o1 } proc name() { item.name($s1) } endtemplate SDIDispListItem begintemplate SectionSubsets public topol, hbox, g, update, snlist, save_data, showsel, bild, pr public consist, esub, cexport, dpi, have_domainparm, xmlwrite public domain_iter, delsdi, neuroml objref g, this, snlist, tobj, tobj1, tobj2, bild, smap, imap objref hb1, hb2, vb1, vb2, vb3, dk1, dk2 objref sdidisplist, nil, dpi strdef tstr, tstr1 proc init() { sdidisp_working_ = 0 parspecpage_=0 showcel_active = 1 esub = 0 first = 1 i=0 sdidisplist = new List() snlist = new List() oldsel = -1 bild = $o1 snlist.append(bild.all) g = bild.gtopol panel() dk1.map() dk1.flip_to(0) } func have_domainparm() {local i for i = 0, snlist.count-1 { if (object_id(snlist.object(i).domainparms) != 0) { return 1 } } return 0 } iterator domain_iter() {local i, j for i=0, snlist.count-1 { if (object_id(snlist.object(i).domainparms)) { for j=0, snlist.object(i).domainparms.count-1 { $o1 = snlist.object(i).domainparms.object(j) iterator_statement } } } } proc cexport() {local i esub = $1 if (bild.continuous == 0) { esub = 0 } if (esub) { for i=0, snlist.count - 1 { snlist.object(i).export() } } } proc consist() { for i=0, snlist.count-1 { tobj = snlist.object(i).list tobj.remove_all() } for i=0, bild.topol.slist.count-1 { tobj = bild.topol.slist.object(i) for j=0, tobj.sets.count-1 { tobj.sets.object(j).list.append(tobj) } } } proc update() {local i, j showsel_active = 1 consist() bild.topol.sel_all(0) snlist.select(oldsel) if (snlist.count > 0 && snlist.selected < 0) { snlist.select(0) } showsel1(snlist.selected) bild.topol.draw(g) name_differ() if (first) { first = 0 } g.exec_menu("Crosshair") subselpage(parspecpage_) cexport(esub) } proc hints() { if (parspecpage_ == 0) { xpanel("CellBuild Subsets hints") xlabel("Usage Hints:") xlabel("FIRST make a selection in the left Graph subwindow THEN press an action!") xlabel(" That is, start by selecting some sections and then pressing") xlabel(" the \"New SectionList\" button") xlabel("") xlabel("If the selection in this panel differs from the selected subset in the") xlabel(" middle panel, that fact is indicated next to the subset name") xlabel("") xlabel("In the Graph panel:") xlabel(" Add to selection by dragging mouse.") xlabel(" Add to selection by holding down shift key while pressing mouse.") xlabel(" Mouse press selects nearest section, not nearest name.") xlabel("") xlabel("If a section occurs in more than one section list then") xlabel(" the order of the list of section lists matters! They should") xlabel(" generally be ordered from general to specific. This determines") xlabel(" the order of execution of the Geometry and Membrane specification.") xlabel("") xlabel("Biophysical parameters will later be specified as constants over a subset.") xlabel(" Note: SubsetDomainIterators can be declared over the subset to allow") xlabel(" inhomogenous parameters. (See \"Hints\" in \"Parameterized Domain Page\".)") xlabel("") xpanel(0) }else{ xpanel("CellBuild Parameterized Domain Subsets hints") xlabel("A \"new SubsetDomainIterator(subset)\" helps specify inhomogeneous") xlabel("\"Biophysics\" parameters by specifying a position function, p,") xlabel("which essentially carries out the idiom:") xlabel(" forsec subset for (x, 0) { rangevar_suffix(x) = f(p(x)) }") xlabel("(f will be specified in the \"Biophysics\" page).") xlabel("The default position function is arc path distance from the") bild.topol.slist.object(0).name(tstr) sprint(tstr, "root section which presently has the name, \"%s\".", tstr) xlabel(tstr) xlabel("") xlabel("Note: For efficiency and flexibility the implementation of the") xlabel(" position function is enclosed in a class with an iterator") xlabel(" so that the domain iteration idiom is actually:") xlabel(" for subset_x.loop(&x, &p) { rangevar_suffix(x) = f(p) }") xlabel(" where: subset_x = new SubsetDomainIterator(subset)") xlabel(" After the cell has been created this domain iterator may be used") xlabel(" with any user defined body, e.g:") xlabel(" for subset_x.loop() {") xlabel(" printf(\"%s x=%g p=%g\\n\", secname(), subset_x.x, subset_x.p)") xlabel(" }") xlabel("") //xbutton("More Hints", "hints3()") xpanel(0) } } proc hints3() { xpanel("CellBuild Parameterized Domain Type hints") xlabel("") xlabel("") xlabel("") xlabel("") xlabel("") xlabel("") xlabel("") xlabel("") xlabel("") xlabel("") xpanel(0) } proc panel() { dk1 = new Deck() dk1.intercept(1) hb1 = new HBox(3) hb1.intercept(1) vb1 = new VBox(3) vb1.intercept(1) snlist.browser("",tstr, "list_label(hoc_ac_)") snlist.select_action("showsel1(hoc_ac_)") snlist.accept_action("showsel1(hoc_ac_)") xpanel("") xbutton("Hints", "hints()") xpanel() vb1.intercept(0) vb1.map() xpanel("") xlabel("First, select,") xmenu("Select") xbutton("All", "sel_all(1)") xbutton("None", "sel_all(0)") xbutton("Xor", "sel_xor(1)") xmenu("Union", "op_menu(1)") xmenu("Intersection", "op_menu(2)") xmenu("Subtract", "op_menu(3)") xmenu() g.menu_tool("Select One", "sel1") g.menu_tool("Select Subtree", "sel2") g.menu_tool("Select Basename", "sel3") xlabel("then, act.") xbutton("New SectionList", "newslist()") xbutton("Selection->SecList", "sel2slist()") xbutton("Delete SecList", "delslist() oldsel = -1") xbutton("Change Name", "chslist()") xbutton("Move up", "move(-1)") xbutton("Move down", "move(1)") xbutton("Parameterized Domain Page", "subselpage(1)") xpanel() hb1.intercept(0) hb1.map() hb2 = new HBox(3) hb2.intercept(1) vb2 = new VBox(3) vb2.intercept(1) sdidisplist.browser("",tstr, "sdidisplist_label(hoc_ac_)") sdidisplist.select_action("sdidispsel1(hoc_ac_)") sdidisplist.accept_action("sdidispsel1(hoc_ac_)") xpanel("") xbutton("Hints", "hints()") xpanel() vb2.intercept(0) vb2.map() vb3 = new VBox(3) vb3.intercept(1) xpanel("") xlabel("Parameterized Domain Specification") xbutton("Return to Subset Selection Page", "subselpage(0)") xpanel() dk2 = new Deck() dk2.intercept(1) xpanel("") xbutton("Create a SubsetDomainIterator", "newsdi()") xpanel() xpanel("") xlabel("this is temporary") xpanel() dk2.intercept(0) dk2.map() vb3.intercept(0) vb3.map() hb2.intercept(0) hb2.map() dk1.intercept(0) } proc subselpage() {local i, j, i1, i2 parspecpage_ = $1 if ($1 == 1) { g.exec_menu("Crosshair") i1 = snlist.selected dk1.flip_to($1) doNotify() i2 = -1 sdidisplist.remove_all() for i=0, snlist.count-1 { tobj = snlist.object(i) sdidisplist.append(new SDIDispListItem(tobj)) if (object_id(tobj.domainparms)) for j=0, tobj.domainparms.count-1 { sdidisplist.append(new SDIDispListItem(tobj.domainparms.object(j))) } if (i1 == i) { i2 = sdidisplist.count-1 } } sdidisplist.select(i2) if (i2 >= 0) { dpi = sdidisplist.object(i2).item if (dpi.is_subset) { dk2.flip_to(0) g.exec_menu("Crosshair") dpi = nil }else{ dpi.flip(dk2) dpi.selih = nil } }else{ dk2.flip_to(-1) g.exec_menu("Crosshair") } }else{ dk1.flip_to($1) g.exec_menu("Crosshair") } } proc op_menu() {local i for i=0, snlist.count-1 { sprint(tstr, "opsel(%d, %d)", $1, i) xbutton(snlist.object(i).name_, tstr) } } proc opsel() {local i tobj = snlist.object($2) for i=0, tobj.list.count-1 { tobj1 = tobj.list.object(i) if ($1 == 1) { //union tobj1.selected = 1 }else if ($1 == 2) { // intersection tobj1.selected += 1 // and look for the 2's below }else if ($1 == 3) { // difference tobj1.selected = 0 } } if ($1 == 2) { // finish up the intersection tobj = bild.topol.slist for i=0, tobj.count-1 { tobj1 = tobj.object(i) if (tobj1.selected == 2) { tobj1.selected = 1 }else{ tobj1.selected = 0 } } } bild.topol.draw(g) differs(snlist.selected) } proc move() {local i, j i = snlist.selected() bild.changed_ = 1 bild.geom_cnt_ += 1 if (i > -1) { j = i + $1 if (j > -1 && j < snlist.count) { tobj1 = snlist.object(i) snlist.select(-1) snlist.remove(i) snlist.insrt(j,tobj1) snlist.select(j) oldsel = -1 showsel1(j, g) } } } proc list_label() {local i i = $1 if (snlist.object(i).name_differ) { sprint(tstr, "%s differs from selection", snlist.object(i).name_) }else{ if (object_id(snlist.object(i).domainparms)) { sprint(tstr, "%s (parameterized)", snlist.object(i).name_) }else{ sprint(tstr, "%s", snlist.object(i).name_) } } } proc sdidisplist_label() {local i i = $1 sdidisplist.object(i).name(tstr) if (sdidisplist.object(i).item.is_subset() == 0) { sprint(tstr, " %s", tstr) } } proc sdidispsel1() {local i if (sdidisp_working_) { return } sdidisp_working_ = 1 if ($1 >= 0) { tobj = sdidisplist.object($1).item if (tobj.is_subset()) { i = snlist.index(tobj) dk2.flip_to(0) g.exec_menu("Crosshair") showsel1(i) }else{ dpi = tobj i = snlist.index(tobj.subset) showsel1(i) dpi.flip(dk2) dpi.selih = nil } } sdidisp_working_ = 0 } proc add_domainparm() {local i i = snlist.index($o1) if (object_id($o1.domainparms) == 0) { $o1.domainparms = new List() } $o2 = new DomainParmInfo($o1, bild) $o1.domainparms.append($o2) tobj2 = $o1 snlist.remove(i) $o1 = tobj2 snlist.insrt(i, $o1) } proc newsdi() {local i i = sdidisplist.selected if (i >= 0) { tobj = sdidisplist.object(i).item add_domainparm(tobj, tobj1) sdidisplist.insrt(i+tobj.domainparms.count, new SDIDispListItem(tobj1)) sdidisplist.select(-1) sdidisplist.select(i) showsel1(snlist.index(tobj)) } } proc delsdi() {local i, iss i = sdidisplist.selected if (i >= 0) { tobj1 = sdidisplist.object(i).item sdidisplist.remove(i) tobj2 = tobj1.subset iss = snlist.index(tobj2) tobj2.domainparms.remove(tobj2.domainparms.index(tobj1)) if (tobj2.domainparms.count == 0) { tobj2.domainparms= nil snlist.remove(iss) snlist.insrt(iss, tobj2) } subselpage(0) } } proc showsel1() { if (showcel_active) showsel($1, g) } proc showsel() { local i bild.topol.sel_all(0) if ($1 > -1) { tobj = snlist.object($1).list for i=0, tobj.count - 1 { tobj.object(i).selected = 1 } } bild.topol.draw($o2) differs($1) oldsel = $1 } proc sel1() { bild.topol.sel1($1,$2,$3,$4) bild.topol.draw(g) differs(snlist.selected) } proc sel2() { bild.topol.sel2($1,$2,$3,$4) bild.topol.draw(g) differs(snlist.selected) } proc sel3() {local i, dmin, imin, d, x if ($1 == 2) { bild.topol.sel3($1,$2,$3,$4) bild.topol.draw(g) differs(snlist.selected) } } proc sel_all() { bild.topol.sel_all($1) bild.topol.draw(g) differs(snlist.selected) } proc sel_xor() { bild.topol.sel_xor($1) bild.topol.draw(g) differs(snlist.selected) } func get_subname() {local in if (string_dialog($s1, $s2) == 0) { return 0 } if (bild.topol.checkname($s2, bild.topol.slist, "Section", 1) == 0) { return 0 } i = name_declared($s2) if (i != 0 && i != 2) { sprint($s2, "%s is already declared and is not an objref", $s2) continue_dialog($s2) return 0 } return 1 } proc newslist() {local i bild.changed_ = 1 tstr = "" i = snlist.selected() if (i >= 0) { tstr = snlist.object(i).name_ } if (get_subname("New SectionList name", tstr) == 0) { return } for i=0, snlist.count-1 { if (strcmp(tstr, snlist.object(i).name_) == 0) { sprint(tstr, "%s is already a SectionList name", tstr) continue_dialog(tstr) return } } snlist.append(new SNList(tstr)) snlist.select(snlist.count-1) name_differ() oldsel = snlist.count-1 sel2slist() } proc chslist() { local i, j bild.changed_ = 1 i = snlist.selected() if (i >= 0) { tstr = snlist.object(i).name_ if (get_subname("Change SectionList name to", tstr) == 0) { return } for j=0, snlist.count-1 { if (i != j && strcmp(tstr, snlist.object(j).name_) == 0) { sprint(tstr, "%s is already a SectionList name", tstr) continue_dialog(tstr) return } } tobj1 = snlist.object(i) if (esub) { sprint(tstr1, "objref %s", tobj1.name_) //print tstr1 execute(tstr1) bild.mech_export() } tobj1.name_ = tstr snlist.select(-1) snlist.remove(i) snlist.insrt(i, tobj1) snlist.select(i) showsel1(i) // name_differ() // sel2slist() } } proc delslist() {local i bild.changed_ = 1 bild.geom_cnt_ += 1 i = snlist.selected() if (i >= 0) { snlist.object(i).del_all() if (esub) { sprint(tstr1, "objref %s", snlist.object(i).name_) //print tstr1 execute(tstr1) bild.mech_export() } snlist.select(-1) snlist.remove(i) bild.topol.sel_all(0) } } proc sel2slist() {local i, j bild.changed_ = 1 bild.geom_cnt_ += 1 i = snlist.selected if (i >= 0) { tobj = snlist.object(i) tobj.del_all() for j=0, bild.topol.slist.count-1 { tobj1 = bild.topol.slist.object(j) if (tobj1.selected) { tobj.add(tobj1) } } if (esub) {tobj.export() bild.mech_export()} } differs(snlist.selected) } proc differs() {local i, j, k, b i = $1 b = 1 if (i >= 0) { tobj = snlist.object(i).list k = 0 for j = 0, tobj.count-1 { if (tobj.object(j).selected) { tobj.object(j).selected += 1 }else{ b = 0 } } tobj = bild.topol.slist for j=0, tobj.count-1 { k = tobj.object(j).selected if (k == 1) { b = 0 }else if (k == 2) { tobj.object(j).selected = 1 } } snlist.object(i).differ = (b == 0) snlist.select(i) } name_differ() } proc name_differ() {local i, j j = snlist.selected for i=0, snlist.count-1 { tobj = snlist.object(i) if (i != j) { tobj.differ = 0 } //printf("differ=%d name_differ=%d\n", tobj.differ, tobj.name_differ) if (tobj.differ != tobj.name_differ) { tobj.name_differ = tobj.differ showcel_active = 0 snlist.remove(i) snlist.insrt(i, tobj) snlist.select(j) showcel_active = 1 } } } proc save_data() {local i, j update() sprint(tstr, "}\n{object_push(%s)}\n{first = 0}", $s2) $o1.save(tstr) for i=0,bild.topol.slist.count-1 { bild.topol.slist.object(i).selected = i } for i=0, snlist.count-1 { tobj = snlist.object(i) if (tobj != bild.all) { sprint(tstr, "{tobj = new SNList(\"%s\") snlist.append(tobj)}",tobj.name_) $o1.save(tstr) tobj = tobj.list sprint(tstr, "for i=0,%d tobj.add(bild.topol.slist.object(fscan()))",tobj.count-1) $o1.save(tstr) for j=0,tobj.count-1 { sprint(tstr, "%d", tobj.object(j).selected) $o1.save(tstr) } tobj = snlist.object(i) }else{ sprint(tstr, "{ tobj = snlist.object(%d)}", i) $o1.save(tstr) } if (tobj.domainparms != nil) { for j=0, tobj.domainparms.count-1 { $o1.save("add_domainparm(tobj, tobj1)") tobj.domainparms.object(j).save_data($o1, "tobj1") } } } $o1.save("{consist()}\n{object_pop()}\n{") } proc neuroml() {local i, j localobj s, sl, snl, cbs, cg s = new String() sl = bild.topol.slist for i = 0, $o1.cablegroups_.__len__() - 1 { cg = $o1.cablegroups_[i] if (strcmp(cg.name_, "all") == 0) { continue } snl = new SNList(cg.name_) snlist.append(snl) for j=0, cg.cable_indices_.__len__() - 1 { cbs = sl.object(cg.cable_indices_[j]) snl.add(cbs) } } } proc pr() {local i, j, nline, isss update() prdec($o1, "") $o1.printf("\nproc subsets() { local i") prdec($o1," ") $o1.printf("\n") nline = 0 isss = 0 for i = 0, snlist.count - 1 { tobj = snlist.object(i) $o1.printf(" %s = new SectionList()\n", tobj.name_) nline += 1 if (nline%200 == 0) { isss += 1 $o1.printf(" subsets_%d()\n}\nproc subsets_%d(){\n", isss, isss) } pr_subset($o1, tobj, &nline, &isss) $o1.printf("\n") } $o1.printf("}\n") } proc prdec() { for i = 0, snlist.count - 1 { if (i%7 == 0) { $o1.printf("\n%sobjref %s", $s2, snlist.object(i).name_) }else{ $o1.printf(", %s", snlist.object(i).name_) } } } proc pr_subset() { local i, j, ni1, ni2, id1, id2 // To be a bit more compact in expressing // the SectionList in hoc, we use for loops for contiguous indices. // args are File and SNList // topol.validname() has already been called and so // topol.unique_name is a Vector // that contains the object indices of the names with largest id. // This vector thus gives us our order for the unique names. // Furthermore the unique_name_index field of each section object // gives the index into the unique_name Vector. // construct Vector index map for subset of form // uniquenameindex*1e6 + arayindex imap = new Vector($o2.list.count) for i=0, imap.size-1 { tobj1 = $o2.list.object(i) imap.x[i] = tobj1.unique_name_index*1e6 + tobj1.id } // index vector sort gives us easily findable contiguous sets of // indices smap = imap.sortindex() for i=0, smap.size-1 { j = imap.x[smap.x[i]] ni1 = int(j/1e6) id1 = j - ni1*1e6 id2 = id1 for i = i+1, smap.size-1 { j = imap.x[smap.x[i]] ni2 = int(j/1e6) if ( ni2 > ni1 || id2 != j - ni2*1e6 - 1) { break } id2 = j - ni2*1e6 } i = i-1 tobj1 = bild.topol.slist.object(bild.topol.unique_name.x[ni1]) if (id2 > id1) { $o1.printf(" for i=%d, %d %s[i] %s.append()\n",\ id1, id2, tobj1.name_, $o2.name_) }else if (id1 > 0){ $o1.printf(" %s[%d] %s.append()\n",\ tobj1.name_, id1, $o2.name_) }else{ $o1.printf(" %s %s.append()\n",\ tobj1.name_, $o2.name_) } $&3 += 1 if ($&3%200 == 0) { $&4 += 1 $o1.printf(" subsets_%d()\n}\nproc subsets_%d(){\n", $&4, $&4) } } } proc xmlwrite() {local i, j update() $o1.printf(" \n") for i = 0, snlist.count - 1 { tobj = snlist.object(i) $o1.printf(" \n", tobj.name_) $o1.printf(" \n") xmlwrite_subset($o1, tobj) $o1.printf(" \n") $o1.printf(" \n") } $o1.printf(" \n") } proc xmlwrite_subset() { local i for i=0, $o2.list.count-1 { tobj1 = $o2.list.object(i) $o1.printf(" \n", tobj1.id_) } } endtemplate SectionSubsets neuron-7.5/share/lib/hoc/celbild/celtopol.hoc000077500000000000000000001107161323325274500212450ustar00rootroot00000000000000{load_file("stdlib.hoc")} // need object_index begintemplate P3D public x, y, z, d, init, sesstr, sesstr1, set public setid, id, xmlwrite objref x, y, z, d, idvec proc init() { x = new Vector($1) y = new Vector($1) z = new Vector($1) d = new Vector($1) idvec = new Vector($1) } proc set() { x.x[$1] = $2 y.x[$1] = $3 z.x[$1] = $4 d.x[$1] = $5 } proc sesstr() { sprint($s2, "%g %g %g %g", x.x[$1], y.x[$1], z.x[$1], d.x[$1]) } proc sesstr1() { sprint($s2, "pt3dadd(%g, %g, %g, %g)", x.x[$1], y.x[$1], z.x[$1], d.x[$1]) } func id() { return idvec.x($1) } proc setid() { idvec.x($1) = $2 } proc xmlwrite() { sprint($s2, "", idvec.x($1), x.x[$1], y.x[$1], z.x[$1], d.x[$1]) } endtemplate P3D // LDiamInfo used by the GeoSpec for separate length and diameter specs // as opposed to constant values for subsets. GeoSpec cannot // use a space efficient Vector for this because of the difficulty // of maintaining a Vector when the topology and subsets change. // Hence we associate this info with individual sections. begintemplate LDiamInfo public x, oldx double x[2], oldx[2] proc init() { oldx[0] = x[0] = $1 oldx[1] = x[1] = $2 } endtemplate LDiamInfo // difference between id and id_: id is an index for multiple sections // having the same base name, e.g. dend_1[1], dend_1[2],... // id_ is a unique identifier given to each section. begintemplate CellBuildSection public name_, id, id_, name, parent, xparent, x0,y0, x1,y1, lx, ly, selected, proximal public clone, ml, index, ldiaminfo, tmp1, tmp2, tmp3, xml3d, xmlready public logstyle, logpt, neuroml public export, export_topol, export_3d, export_rm, i3d, p3d, get3d, rdses public panel, this, position, sets, geo, geobox, unique_name_index, sref objref parent, sets, ml, geo, geobox, sref, p3d, ldiaminfo, xml3d, logpt strdef name_, tstr proc init() { tmp1 = tmp2 = tmp3 = 0 name_ = $s1 id = $2 id_ = $2 proximal = $3 parent = $o4 xparent = $5 selected = 0 sets = new List() // the sets this section is in ml = new List() // as a singleton, the mechanisms geo = new List() // as a singleton, the shape unique_name_index = 0 i3d = 0 index = -1 xmlready = 0 } proc logstyle() { logpt = new Vector() logpt.append($1, $2, $3) } proc position() { x0=$1 y0=$2 x1=$3 y1=$4 lx = (x0+x1)/2 ly = (y0+y1)/2 } proc name() { if (id > 0) { sprint($s1, "%s[%d]", name_, id) }else{ $s1 = name_ } } proc panel() { } proc clone() { //shallow copy $o1 = new CellBuildSection(name_, id, proximal, parent, xparent) $o1.selected = selected $o1.position(x0,y0,x1,y1) $o1.lx = lx $o1.ly = ly $o1.sets = sets $o1.ml = ml $o1.geo = geo $o1.i3d = i3d $o1.sref = sref $o1.p3d = p3d $o1.logpt = logpt } proc export_topol() { sref.sec disconnect() if (object_id(parent) == 0) return parent.sref.sec connect sref.sec (proximal), (xparent) } proc export_3d() {local l, d, i sref.sec { l = L d = diam // print tstr, " 3d ", x0, y0, 0, d, " and ", x1,y1,0,d pt3dclear() if (i3d > 0) { for i=0, i3d-1 { pt3dadd(p3d.x.x[i], p3d.y.x[i], p3d.z.x[i], p3d.d.x[i]) } if (object_id(logpt)) { pt3dstyle(1, logpt.x[0], logpt.x[1], logpt.x[2]) } }else{ pt3dadd(x0, y0, 0, d) pt3dadd(x1, y1, 0, d) L = l } } } proc export() { export_topol() export_3d() } proc export_rm() { sref.sec delete_section() } proc get3d() {local i, x, y, z sref.sec { i3d = n3d() p3d = new P3D(i3d) for i=0, i3d-1 { p3d.set(i, x3d(i), y3d(i), z3d(i), diam3d(i)) } if (pt3dstyle() == 1) { pt3dstyle(1, &x, &y, &z) logstyle(x, y, z) } } } proc neuroml() {local i, i0 localobj pt i3d = $o2.pcnt_ p3d = new P3D($o2.pcnt_) i0 = $o2.first_ for i=0, $o2.pcnt_ - 1 { pt = $o1.points_[i0 + i] p3d.set(i, pt.x_, pt.y_, pt.z_, pt.d_) } } proc rdses() {local i if (i3d > 0) { p3d = new P3D(i3d) for i=0, i3d-1 { p3d.set(i, fscan(), fscan(), fscan(), fscan()) } } } endtemplate CellBuildSection begintemplate CellBuildTopology public slist, g, hbox, save, map, pr, save_data, pl, bild, consist, iport public draw, sel_only, sel_all, sel_xor, sel1, sel2, sel3, update, names_off public nameindex, unique_name, cexport, iport3d, checkname, gridres, circles_off public nearest_sec, setindex, xmlwrite, make3d, neuroml external object_index, valid_name_syntax objref slist, this, hbox, g, parent, tobj, tobj1, tobj2, math, undo_, nil objref vbox, sf, bild, unique_name, smap, lists[1] strdef tstr, tstr1, sname, debugstr create dummy proc init() { gridres = 15 dummy delete_section() etop = 0 names_off = 0 circles_off = 0 bild = $o1 g = bild.gtopol first = 1 math = new GUIMath() sf = new StringFunctions() sname = "soma" nameindex = 0 slist = new List() undo_ = new List() panel() sprint(tstr, "%s", this) hbox.map(tstr) mksection(2,0,0,0) mksection(3,19,0,0) sname = "dend" i=0 } proc all_init() { local i for i=0, slist.count-1 { bild.all.add(slist.object(i)) } } proc mech_export() { bild.subsets.cexport(bild.manage.esub) bild.mech_export() } proc cexport() {local i etop = $1 if (bild.continuous == 0) { etop = 0 } if (etop) { consist() for i=0, slist.count - 1 { slist.object(i).export() } if (slist.count > 0) { slist.object(0).name(tstr) sprint(tstr, "access %s", tstr) // print tstr execute(tstr) } } } proc consist() { validname() validposition() } proc setindex() { local i for i=0,slist.count-1 { slist.object(i).index = i } } proc update() { sel_all(0) if (first) { first = 0 } g.exec_menu("Make Section") } proc hints() { xpanel("CellBuild Topology Hints") xlabel("Usage Hints: Radio buttons in the panel on the right determine left button") xlabel(" mouse action in the left Graph subwindow.") xlabel("Start building with \"Make Section\". Drag lines to make a tree.") xlabel(" Short sections are drawn as circles.") xlabel("This only builds ONE cell type. (single tree)") xlabel("You can only connect to the distal (1) end of a section. The") xlabel(" root section (first created section) is an exception in that") xlabel(" you can also connect to its proximal (0) end.") xlabel("Won't delete root unless all others deleted first.") xlabel("When creating a lot of sections of same type, change the") xlabel(" default name first with \"Basename\".") xlabel("") xlabel("Except for \"Move Label\" the selection is the nearest line, not the nearest label") xlabel("") xpanel() } proc map() { sprint(tstr, "%s", this) hbox.map(tstr, $2,$3,$4,$5) copy(slist, undo_) pl() } proc panel() { hbox = new HBox(3) hbox.intercept(1) hbox.ref(this) hbox.save("save()") vbox = new VBox(3) vbox.intercept(1) xpanel("", 1) xbutton("Basename:", "basename()") xvarlabel(sname) xpanel() xpanel("") xbutton("Undo Last", "undo()") xlabel("Click and drag to") g.menu_tool("Make Section", "mksection") g.menu_tool("Copy Subtree", "copysub") g.menu_tool("Reconnect Subtree", "reconsub") g.menu_tool("Reposition", "move") g.menu_tool("Move Label", "movelabel") xlabel("Click to") g.menu_tool("Insert Section", "inser") g.menu_tool("Delete Section", "del1") g.menu_tool("Delete Subtree", "delsub") g.menu_tool("Change Name", "rename") xlabel("") xbutton("Hints", "hints()") xpanel() vbox.intercept(0) vbox.map() hbox.intercept(0) } proc copy() {local i $o2.remove_all() for i=0, $o1.count-1 { $o1.object(i).clone(tobj) $o2.append(tobj) if (i > 0) { tobj.parent = $o2.object($o1.index(tobj.parent)) } } } proc undo() {local i, nu, ns if (etop) { // unref sections in undo_ that are not in slist // delete sections in slist that are not in undo_ // sort the sref indices of both lists nu = undo_.count ns = slist.count tobj1 = new Vector(nu + ns) for i=0, nu-1 { tobj1.x[i] = object_index(undo_.object(i).sref) } for i=0, ns-1 { tobj1.x[nu+i] = object_index(slist.object(i).sref) } //print "nu=",nu, " ns=",ns //print "sref indices" //tobj1.printf tobj2 = tobj1.sortindex() //print "sort index" //tobj2.printf // most are now pairs, if not then < nu means unique to // undo_, otherwise unique to slist for i=0, tobj2.size-1 { if (i < tobj2.size-1) { if (tobj1.x[tobj2.x[i]] == tobj1.x[tobj2.x[i+1]]) { // a pair. skip one i += 1 continue } } if (tobj2.x[i] < nu) { // alone in undo //undo_.object(tobj2.x[i]).name(tstr) //printf("%s alone in undo_\n", tstr) undo_.object(tobj2.x[i]).sref = nil }else{ // alone in slist //slist.object(tobj2.x[i]-nu).name(tstr) //printf("%s alone in slist\n", tstr) slist.object(tobj2.x[i]-nu).sref.sec delete_section() } } } copy(undo_, slist) pl() cexport(etop) if (etop) { mech_export() } } proc save() {local i hbox.save("load_file(\"celtopol.hoc\", \"CellBuildTopology\")\n}\n{") hbox.save("ocbox_ = new CellBuildTopology(1)") save_data(hbox, "ocbox_") } proc save_data() { sprint(tstr, "}\n{object_push(%s)}\n{", $s2) $o1.save(tstr) sprint(tstr, "first = 0\nslist.remove_all()\nsname = \"%s\"", sname) $o1.save(tstr) $o1.save("objref tobj") for i=0, slist.count-1 { if (i%25 == 0) { $o1.save("}\n{") } tobj = slist.object(i) sprint(tstr, "tobj = new CellBuildSection(\"%s\",%d, %g, tobj, %g) slist.append(tobj)", tobj.name_,tobj.id,tobj.proximal,tobj.xparent) $o1.save(tstr) if (i > 0) { sprint(tstr, "tobj.parent=slist.object(%d)", slist.index(tobj.parent)) $o1.save(tstr) } sprint(tstr, " tobj.position(%g,%g,%g,%g) tobj.lx=%g tobj.ly=%g tobj.i3d=%d",\ tobj.x0,tobj.y0,tobj.x1,tobj.y1, tobj.lx, tobj.ly, tobj.i3d) $o1.save(tstr) if (object_id(tobj.logpt)) { sprint(tstr, " tobj.logstyle(%g, %g, %g)", tobj.logpt.x[0], tobj.logpt.x[1], tobj.logpt.x[2]) $o1.save(tstr) } } $o1.save("all_init()\n}") save3d($o1) $o1.save("{object_pop()}\n{") } proc save3d() { local i,j // tobj is the CellBuildSection and $o1 is the Vbox for saving $o1.save("for i=0, slist.count-1 {slist.object(i).rdses()}") for i=0, slist.count-1 { tobj = slist.object(i) for j=0, tobj.i3d - 1 { tobj.p3d.sesstr(j, tstr) $o1.save(tstr) } } } proc inser() {local i, x, y if ($1 == 2) { sel_all(0) sel1($1,$2,$3,0) copy(slist, undo_) bild.changed_ = 1 bild.geom_cnt_ += 1 for (i=1; i < slist.count; i += 1) { tobj = slist.object(i) if (tobj.selected == 1) { nameindex += 1 slist.insrt(i, new CellBuildSection(sname, nameindex,\ tobj.proximal, tobj.parent, tobj.xparent)) bild.all.add(slist.object(i)) tobj.parent = slist.object(i) tobj.xparent = 1 x = (2*tobj.x0+tobj.x1)/3 y = (2*tobj.y0+tobj.y1)/3 slist.object(i).position(tobj.x0, tobj.y0,x, y) tobj.position(x, y, tobj.x1, tobj.y1) tobj2 = tobj validname() if (etop) { tobj2.export() tobj2.parent.export() mech_export() } sel_only(slist.object(i), g) break } } } if ($1 == 3) { sel_all(0) } } proc del1() { if ($1 == 2) { sel1($1,$2,$3,0) del() } } proc delsub() { if ($1 == 2) { sel2($1,$2,$3,0) del() } } proc del() {local i copy(slist, undo_) bild.geom_cnt_ += 1 bild.changed_ = 1 //if only one section and it is selected then delete it if (slist.count == 1) { if (slist.object(0).selected == 1) { if (etop) slist.object(0).export_rm() slist.remove(0) } } if (slist.count > 0) slist.object(0).selected = 0 for i=1,slist.count - 1 { tobj = slist.object(i) if (tobj.parent.selected == 1) { tobj.parent = tobj.parent.parent if (etop) tobj.export_topol() } } for (i=slist.count-1; i >= 1; i -=1) {// can't delete root tobj = slist.object(i) if (tobj.selected == 1) { if (etop) tobj.export_rm() slist.remove(i) } } validposition() validname() pl() if (etop) { mech_export() } } proc validposition() {local i for i=1, slist.count-1 { tobj = slist.object(i) if (tobj.xparent == 1) { tobj.x0 = tobj.parent.x1 tobj.y0 = tobj.parent.y1 }else if (tobj.xparent == 0){ tobj.x0 = tobj.parent.x0 tobj.y0 = tobj.parent.y0 }else{ tobj.x0 = (tobj.parent.x0 + tobj.parent.x1)/2 tobj.y0 = (tobj.parent.y0 + tobj.parent.y1)/2 } if (etop) tobj.export_3d() } } func checkname() {local i if (!valid_name_syntax($s1, $4)) { return 0 } if (object_id($o2)) { for i=0, $o2.count-1 { if (strcmp($s1, $o2.object(i).name_) == 0) { sprint(tstr1, "%s is already used as a %s", $s1,$s3) if ($4 == 1) continue_dialog(tstr1) return 0 } } if ($o2 == slist) { if (strcmp($s1, sname) == 0) { sprint(tstr1, "%s is the basename for new sections",$s1) if ($4 == 1) continue_dialog(tstr1) return 0 } } } return 1 } proc basename() { local l, i tstr = sname while (string_dialog("Section name prefix:", tstr)) { l = sf.len(tstr) if (checkname(tstr, bild.subsets.snlist, "SectionList", 1)) { i = name_declared(tstr) if (i != 0 && i != 3) { continue_dialog("Already declared and not a Section") continue } sname = tstr // following turned out to be a bad idea. Stick with last selected mode. // g.exec_menu("Change Name") break } } } proc rename() {local i, j if ($1 == 2) { nearestline($2, $3) if (parent == nil) return copy(slist, undo_) bild.changed_ = 1 parent.name_ = sname validname() pl() } } proc validname() {local i, j, found nameindex = 0 unique_name = new Vector() for i=0, slist.count-1 { tobj = slist.object(i) tobj.id = 0 nameindex += 1 tobj.id_ = nameindex found = 0 for j=0, unique_name.size-1 { if (strcmp(slist.object(unique_name.x[j]).name_, tobj.name_)==0){ tobj.id = slist.object(unique_name.x[j]).id + 1 tobj.unique_name_index = j unique_name.x[j] = i found = 1 } } if (!found){ unique_name.append(i) tobj.unique_name_index = unique_name.size-1 tobj.id = 0 } } if (etop && slist.count > 0) { for i=0, slist.count-1 { tobj = slist.object(i) if (object_id(tobj.sref) == 0) { create dummy dummy tobj.sref = new SectionRef() } //printf("unname %s %s\n", tobj.sref, tobj.name_) tobj.sref.unname } objref lists[unique_name.size] for i=0, unique_name.size-1 { lists[i] = new List() } for i=0, slist.count-1 { tobj = slist.object(i) lists[tobj.unique_name_index].append(tobj.sref) } for i=0, unique_name.size-1 { tobj = slist.object(unique_name.x[i]) if (tobj.id == 0) { //printf("rename %s to %s\n", tobj.sref, tobj.name_) tobj.sref.rename(tobj.name_) }else{ //printf("rename %s to %s\n", lists[i], tobj.name_) tobj.sref.rename(tobj.name_, lists[i]) } } objref lists[1] } } proc gridRes() { if (gridres > 0) { if ( $1 > 0) { x1 = int($1/gridres + .5)*gridres }else{ x1 = int($1/gridres - .5)*gridres } if ( $2 > 0) { y1 = int($2/gridres + .5)*gridres }else{ y1 = int($2/gridres - .5)*gridres } }else{ x1 = $1 y1 = $2 } } proc mksection() {local l if ($1 == 2) { copy(slist, undo_) bild.geom_cnt_ += 1 bild.changed_ = 1 nearest($2, $3) sel_all(0) } if ($1 == 2 || $1 == 1) { gridRes($2,$3) pl() g.beginline(2,2) draw1(g, x0,y0,x1,y1) g.flush() }else{ gridRes($2,$3) l = sqrt((x1-x0)^2 + (y1-y0)^2) if (l < 3) { if (object_id(parent)) { l = sqrt((parent.x1 - parent.x0)^2 + (parent.y1 - parent.y0)^2) x1 = x0 + (parent.x1 - parent.x0)*3/l y1 = y0 + (parent.y1 - parent.y0)*3/l } } nameindex += 1 tobj = new CellBuildSection(sname,nameindex, 0, parent, xparent) bild.all.add(tobj) tobj.position(x0, y0, x1, y1) slist.append(tobj) validname() pl() if(etop) { tobj.export() if (slist.count == 1) { slist.object(0).name(tstr) sprint(tstr, "access %s", tstr) print tstr execute(tstr) } mech_export() } } } proc sel1() { nearestline($2, $3) if (parent == nil) return if ($1 == 2) { copy(slist, undo_) if ($4 == 0) { sel_all(0) } sel_one(parent) newselstate = parent.selected } else if ($1 == 1) { parent.selected = newselstate pl() } } proc sel2() { if ($1 == 2) { copy(slist, undo_) nearestline($2, $3) if ($4 == 0) { sel_all(0) } sel_subtree(parent) } } proc sel3() {local i, dmin, imin, d, x if ($1 == 2) { if ($4 == 0) { sel_all(0) } dmin = 1e9 imin = -1 for i=0, slist.count - 1 { tobj = slist.object(i) d = ($2-tobj.lx)^2 + ($3-tobj.ly)^2 if (d < dmin) { dmin = d imin = i } } if (imin >= 0) { tstr = slist.object(imin).name_ x = (slist.object(imin).selected == 0) for i=0, slist.count - 1 { tobj = slist.object(i) if (strcmp(tstr, tobj.name_) == 0) { tobj.selected = x } } } pl() } } proc copysub() {local i if ($1 == 2) { copy(slist, undo_) bild.changed_ = 1 bild.geom_cnt_ += 1 nearestline($2, $3) if (parent == nil) return if (parent == slist.object(0)) { parent = slist.object(1) if (parent == nil) return } sel_all(0) sel_subtree(parent) slist.object(0).selected = 0 // can't copy root tobj2 = new List() copy(slist, tobj2) for (i = tobj2.count -1; i >= 0; i -= 1) { tobj = tobj2.object(i) tobj.sref = nil tobj.p3d = nil tobj.i3d = 0 if (tobj.selected == 0) { tobj2.remove(i) } } tobj2.object(0).parent = parent.parent parent = tobj2.object(0) sel_all(0) for i=0, tobj2.count-1 { slist.append(tobj2.object(i)) tobj2.object(i).selected = 1 } validname() if (etop) for i=0, tobj2.count-1 { tobj2.object(i).export() } tobj2 = tobj2.object(0) if (etop) { mech_export() } } reconsub1($1,$2,$3) } proc reconsub() {local i if ($1 == 2) { bild.changed_ = 1 bild.geom_cnt_ += 1 sel2($1, $2, $3, 0) if (parent == nil) return if (parent == slist.object(0)) { parent = slist.object(1) if (parent == nil) return } slist.object(0).selected = 0 // can't copy root } reconsub1($1,$2,$3) } proc reconsub1() { if (parent == nil) return tobj2 = parent nearest($2,$3,0) //nearest unselected tobj2.parent = parent if (parent == slist.object(0) && xparent < 1) { if (xparent == 0) { tobj2.x0 = parent.x0 tobj2.y0 = parent.y0 tobj2.xparent = 0 }else{ tobj2.x0 = (parent.x0 + parent.x1)/2 tobj2.y0 = (parent.y0 + parent.y1)/2 tobj2.xparent = .5 } }else{ tobj2.x0 = parent.x1 tobj2.y0 = parent.y1 tobj2.xparent = 1 } parent = tobj2 if ($1 == 2) $1 = 1 move($1,$2,$3) if ($1 == 3) { consistency() if (etop) parent.export_topol() } } proc consistency() {local i, j // reorder so connections are all to earlier indices for (i=0; i < slist.count(); i += 1) { tobj = slist.object(i) j = slist.index(tobj.parent) if (j > i) { slist.remove(i) slist.insrt(j, tobj) i -= 1 } } validname() pl() } proc move() {local i, dx, dy if ($1 == 2) { copy(slist, undo_) bild.changed_ = 1 bild.geom_cnt_ += 1 unsel() nearest($2, $3) if (parent == nil) return if (parent == slist.object(0) && xparent == 0) { sel_all(1) moveall_ = 1 }else{ sel_subtree(parent) moveall_ = 0 } } if (parent == nil) return if ($1 == 1 || $1 == 2) { gridRes($2,$3) if (moveall_) { dx = x1 - parent.x0 dy = y1 - parent.y0 parent.x0 = x1 parent.y0 = y1 parent.x1 += dx parent.y1 += dy }else{ dx = x1 - parent.x1 dy = y1 - parent.y1 parent.x1 = x1 parent.y1 = y1 } parent.lx += dx parent.ly += dy for i=slist.index(parent)+1, slist.count-1 { tobj = slist.object(i) if (tobj.selected == 1) { tobj.x0 += dx tobj.y0 += dy tobj.x1 += dx tobj.y1 += dy tobj.lx += dx tobj.ly += dy } } }else{ validposition() moveall_ = 0 unsel() if (etop) parent.export_3d() } pl() } proc unsel() {local i for i =0, slist.count-1 { slist.object(i).selected = 0 } } proc movelabel() { if ($1 == 2) { copy(slist, undo_) bild.changed_ = 1 unsel() nearest_label($2,$3) if (parent != nil) sel_one(parent) } if (parent == nil) return if ($1 == 1 || $1 == 2) { parent.lx = $2 parent.ly = $3 }else{ unsel() } pl() } proc pl() { draw(g) } proc draw() {local i, color $o1.erase_all $o1.fixed(1) for i=0, slist.count - 1 { tobj = slist.object(i) if (tobj.selected == 1) { color = 2} else {color = 1} $o1.beginline(color, 2) draw1($o1, tobj.x0, tobj.y0, tobj.x1, tobj.y1) if (names_off == 0 || tobj.id == 0) { tobj.name(tstr) $o1.label(tobj.lx, tobj.ly, tstr,\ 1, 1, .5, .5, color) } } $o1.flush() } func len() { return sqrt(($1- $3)^2 + ($2 - $4)^2) } proc draw1() {local l l = len($2,$3,$4,$5) if (l < 20 && circles_off == 0) { circle($o1, ($2+$4)/2, ($3 + $5)/2, l/2) }else{ $o1.line($2, $3) $o1.line($4, $5) } } proc circle() { local i, x, y for i=0, 20 { x = $4*sin(PI*i/10) y = $4*cos(PI*i/10) $o1.line($2+x, $3 + y) } } proc sel_all() { local i for i=0, slist.count-1 { slist.object(i).selected = $1 } if (numarg() == 2) { draw($o2) }else{ pl() } } proc sel_xor() { local i for i=0, slist.count-1 { slist.object(i).selected = slist.object(i).selected == 0 } pl() } proc sel_one() {local i if ($o1.selected == 0) { $o1.selected = 1 }else{ $o1.selected = 0 } pl() } proc sel_only() {local i for i=0, slist.count -1 { slist.object(i).selected = 0 } $o1.selected = 1 draw($o2) } proc sel_subtree() {local i, old old = $o1.selected $o1.selected = 2 for i=1, slist.count-1 { // only 0 does not have parent tobj = slist.object(i) // don't include children connected to 0 if (tobj.parent.selected == 2 && tobj.xparent == 1) { tobj.selected = 2 } } old = old==0 for i=0, slist.count-1 { tobj = slist.object(i) if (tobj.selected == 2) { tobj.selected = old } } pl() } proc nearestline() { nearest_sec($1,$2,parent) } func nearest_sec() { local i, dmin, d dmin = 1e9 for i=0, slist.count - 1 { tobj = slist.object(i) d = math.d2line_seg($1,$2,tobj.x0,tobj.y0,tobj.x1,tobj.y1) if (d < dmin) { dmin = d $o3 = tobj } } return dmin } proc nearest() {local i, dmin, d objref parent x0 = $1 y0 = $2 dmin = 1e9 for i=0, slist.count -1 { tobj = slist.object(i) if (numarg() == 3) { if ($3 != tobj.selected) { continue } } d = ($1-tobj.x0)^2 + ($2-tobj.y0)^2 if (d < dmin) { dmin = d parent = tobj xparent = 0 x0 = tobj.x0 y0 = tobj.y0 } d = ($1-tobj.x1)^2 + ($2-tobj.y1)^2 if (d < dmin) { dmin = d parent = tobj xparent = 1 x0 = tobj.x1 y0 = tobj.y1 } //connecting to .5 location of soma causes confusion for beginners. continue if (i == 0) { d = ($1 - (tobj.x0 + tobj.x1)/2)^2 + ($2 - (tobj.y0 + tobj.y1)/2)^2 if (d < dmin) { dmin = d parent = tobj xparent = .5 x0 = (tobj.x0 + tobj.x1)/2 y0 = (tobj.y0 + tobj.y1)/2 } } } } proc nearest_label() {local i, dmin, d objref parent dmin = 1e9 for i=0, slist.count - 1 { tobj = slist.object(i) d = ($1-tobj.lx)^2 + ($2-tobj.ly)^2 if (d < dmin) { dmin = d parent = tobj } } } proc pr() {local i, j, x0, y0, x1, y1, is3d, nline, isba // create names validname() //unique_name contains object indices of names with largest id j = 0 for i=0, unique_name.size-1 { tobj = slist.object(unique_name.x[i]) if (tobj.id ==0) { sprint(tstr, "%s", tobj.name_) }else{ sprint(tstr, "%s[%d]", tobj.name_, tobj.id + 1) } if (j%7 == 0) { $o1.printf("\ncreate %s", tstr) }else{ $o1.printf(", %s", tstr) } j += 1 } $o1.printf("\n\nproc topol() { local i\n") // connect pr_connect($o1) $o1.printf(" basic_shape()\n}\n") is3d = 0 nline = 0 for i=0, slist.count - 1 { tobj = slist.object(i) if (tobj.i3d > 0) { tobj.name(tstr) if (nline == 0) { is3d += 1 $o1.printf("proc shape3d_%d() {\n", is3d) } $o1.printf(" %s {pt3dclear()\n", tstr) if (object_id(tobj.logpt)) { nline += 1 $o1.printf("\tpt3dstyle(1, %g, %g, %g)\n", tobj.logpt.x[0], tobj.logpt.x[1], tobj.logpt.x[2]) } for j=0, tobj.i3d-1 { tobj.p3d.sesstr1(j, tstr1) $o1.printf(" %s\n", tstr1) nline += 1 if (nline > 200) { nline = 1 is3d += 1 $o1.printf(" }\n}\nproc shape3d_%d() {\n %s {", is3d, tstr) } } $o1.printf(" }\n") } } if (is3d) { $o1.printf("}\n")} nline = 0 isba = 0 $o1.printf("proc basic_shape() {\n") if (is3d) { for i=1, is3d { $o1.printf(" shape3d_%d()\n", i) nline += 1 if (nline%100 == 0) { isba += 1 $o1.printf(" basic_shape_%d()\n}\nproc basic_shape_%d() {\n", isba, isba) } } } for i=0, slist.count-1 { tobj = slist.object(i) if (tobj.i3d == 0) { tobj.name(tstr) // rounding to nearest integer (micron)is only in order to // make the hoc code more compact x0 = tobj.x0 y0 = tobj.y0 x1 = tobj.x1 y1 = tobj.y1 if (((x0-x1)^2 + (y0-y1)^2) > 16) { x0 = int(x0 + .5) y0 = int(y0 + .5) x1 = int(x1 + .5) y1 = int(y1 + .5) } $o1.printf(" %s {pt3dclear() pt3dadd(%g, %g, 0, 1) pt3dadd(%g, %g, 0, 1)}\n",\ tstr, x0, y0, x1, y1) nline += 1 if (nline%100 == 0) { isba += 1 $o1.printf(" basic_shape_%d()\n}\nproc basic_shape_%d() {\n", isba, isba) } } } $o1.printf("}\n") } proc iport() {local i, ps, ncell slist = new List() tobj = new SectionList() if (object_id(section_owner()) != 0) { sprint(tstr, "Can only import a top level cell. Currently accessed\ section is in %s", section_owner()) continue_dialog(tstr) return } tobj.wholetree() i = 0 forsec tobj { tobj1 = new CellBuildSection(secname(), 0, Ra, nil, 0) bild.all.add(tobj1) Ra = i i += 1 slist.append(tobj1) } i = 0 forsec tobj { tobj1 = slist.object(i) i += 1 ps = parent_section(.5) if (ps) { push_section(ps) tobj1.parent = slist.object(Ra) pop_section() tobj1.xparent = parent_connection() } } i = 0 forsec tobj { tobj1 = slist.object(i) i += 1 Ra = tobj1.proximal tobj1.proximal = 0 tobj1.position(x3d(0), y3d(0), x3d(n3d()-1), y3d(n3d()-1)) } consistency() ncell = 0 for i=0, slist.count-1 { tobj = slist.object(i) tobj.selected = 0 if (tobj.parent == nil) { ncell += 1 if (ncell > 1) { tobj.selected = 1 } }else if (tobj.parent.selected == 1) { tobj.selected = 1 } } if (ncell > 1) { for (i=slist.count - 1; i >= 0; i -= 1) { tobj = slist.object(i) if (tobj.selected == 1) { slist.remove(i) } } objref tobj slist.object(0).name(tstr) sprint(tstr, "There were %d top level cells. Only the cell rooted by %s was imported",ncell,tstr) continue_dialog(tstr) }else if (ncell == 0) { continue_dialog("There are no top level cells") } validposition() bild.changed_ = 1 bild.geom_cnt_ += 1 tobj = nil } proc iport3d() {local i, oldetop for i=0, slist.count-1 { tobj = slist.object(i) sprint(tstr, "%s %s.sref = new SectionRef()", tobj.name_, tobj) execute(tstr) if (sf.head(tobj.name_, "\\[", tstr) > 0) { tobj.name_ = tstr } tobj.get3d() } oldetop = etop etop = 1 validname() etop = oldetop pl() } proc neuroml() {local i, ip, nx, oldetop localobj cab, cbs, s, pcbs, pt, pt2 slist = new List() s = new String() for i=0, $o1.cables_.__len__() - 1 { cab = $o1.cables_[i] if ( cab.parent_cable_id_ >= 0) { ip = $o1.cableid2index_[cab.parent_cable_id_] pcbs = slist.object(ip) }else{ ip = -1 pcbs = nil } nx = 0 sscanf(cab.name_, "%s[%d]", s.s, &nx) //printf("i=%d id=%d %s[%d]\n", i, cab.id_, s.s, nx) cbs = new CellBuildSection(s.s, i, 0, pcbs, cab.px_) bild.all.add(cbs) slist.append(cbs) pt = $o1.points_[cab.first_] pt2 = $o1.points_[cab.first_ + cab.pcnt_ - 1] cbs.position(pt.x_, pt.y_, pt2.x_, pt2.y_) cbs.neuroml($o1, cab) } consistency() validposition() bild.changed_ = 1 bild.geom_cnt_ += 1 oldetop = etop etop = 1 validname() etop = oldetop pl() } proc pr_connect() { local i,j,j1,ni1,ni2,id1,id2,kind,nip1,nip2,idp1,idp2,x,xp,lcnt,pcnt,icnt // To be a bit more compact in expressing // the connect statements in hoc, // we use for loops for contiguous indices. // arg is the File // validname() has already been called and so // unique_name is a Vector // that contains the object indices of the names with largest id. // This vector thus gives us our order for the unique names. // Furthermore the unique_name_index field of each section object // gives the index into the unique_name Vector. // construct Vector index map for subset of form // uniquenameindex*1e6 + arayindex smap = new Vector(slist.count) for i=0, smap.size-1 { tobj1 = slist.object(i) smap.x[i] = tobj1.unique_name_index*1e6 + tobj1.id } // index vector sort gives us easily findable contiguous sets of // indices //print "before sort" //smap.printf smap = smap.sortindex() //print "after sort" //smap.printf lcnt = 0 // separate procedure into 200 line blocks pcnt = 0 // procedure name suffix for i=1, smap.size-1 { j1 = smap.x[i] ni1 = slist.object(j1).unique_name_index id1 = slist.object(j1).id nip1 = slist.object(j1).parent.unique_name_index idp1 = slist.object(j1).parent.id x = slist.object(j1).proximal xp = slist.object(j1).xparent kind = idp1 - id1 //printf("base %d %s[%d] to %s[%d] kind=%g\n", i, slist.object(j1).name_,\ // id1, slist.object(j1).parent.name_, idp1, kind) icnt = 0 for i = i+1, smap.size-1 { j = smap.x[i] ni2 = slist.object(j).unique_name_index id2 = slist.object(j).id nip2 = slist.object(j).parent.unique_name_index idp2 = slist.object(j).parent.id if (x != slist.object(j).proximal || xp != slist.object(j).xparent){ break } if (ni1 == ni2 && nip1 == nip2) { if (idp1 == idp2) { if (icnt > 0 && kind != 1e9) { break } kind = 1e9 // constant }else if (kind != (idp2 - id2)) { break } }else{ break } icnt += 1 //printf(" also %d %s[%d] to %s[%d] kind=%g\n", i, slist.object(j).name_,\ // id2, slist.object(j).parent.name_, idp2, kind) } i = i-1 j = smap.x[i] id2 = slist.object(j).id idp2 = slist.object(j).parent.id tstr = slist.object(unique_name.x[ni1]).name_ tstr1 = slist.object(unique_name.x[nip1]).name_ if (id1 == id2) { slist.object(j1).name(tstr) if (idp1 == 0) { $o1.printf(" connect %s(%d), %s(%g)\n", tstr, x, tstr1, xp) }else{ $o1.printf(" connect %s(%d), %s[%d](%g)\n", tstr, x, tstr1, idp1, xp) } }else if (kind == 1e9) { if (idp1 == 0) { $o1.printf(" for i = %d, %d connect %s[i](%d), %s(%g)\n", \ id1, id2, tstr, x, tstr1, xp) }else{ $o1.printf(" for i = %d, %d connect %s[i](%d), %s[%d](%g)\n", \ id1, id2, tstr, x, tstr1, idp1, xp) } }else if (kind == 0) { $o1.printf(" for i = %d, %d connect %s[i](%d), %s[i](%g)\n", \ id1, id2, tstr, x, tstr1, xp) }else if (kind > 0) { $o1.printf(" for i = %d, %d connect %s[i](%d), %s[i+%d](%g)\n", \ id1, id2, tstr, x, tstr1, kind, xp) }else{ // kind < 0 $o1.printf(" for i = %d, %d connect %s[i](%d), %s[i%d](%g)\n", \ id1, id2, tstr, x, tstr1, kind, xp) } lcnt = (lcnt + 1)%200 if (lcnt == 0) { // each procedure cannot have more than 200 lines pcnt += 1 $o1.printf(" topol_%d()\n}\nproc topol_%d() {\n", pcnt, pcnt) } } } proc xmlsegment () {local proximalPoint, distalPoint proximalPoint = $o2.id($3) distalPoint = $o2.id($3 + 1) $o1.printf(" \n", $4, proximalPoint, distalPoint) } proc xmlwrite() {local i, j, x0, y0, x1, y1, is3d, nline, pointcount, pointid, diam, lastpoint, segcount // create names validname() //unique_name contains object indices of names with largest id make3d() j = 0 $o1.printf(" \n") is3d = 0 pointcount = 0 segcount = 0 for i=0, slist.count - 1 { tobj = slist.object(i) tobj.name(tstr) if (tobj.i3d > 0) { for j=0, tobj.i3d-1 { pointcount += 1 tobj.p3d.setid(j, pointcount) tobj.p3d.xmlwrite(j, tstr1) $o1.printf(" %s\n", tstr1) } } else { for j=0, 1 { pointcount += 1 tobj.xml3d.setid(j, pointcount) tobj.xml3d.xmlwrite(j, tstr1) $o1.printf(" %s\n", tstr1) } // rounding to nearest integer (micron)is only in order to // make the hoc code more compact x0 = tobj.x0 y0 = tobj.y0 x1 = tobj.x1 y1 = tobj.y1 if (((x0-x1)^2 + (y0-y1)^2) > 16) { x0 = int(x0 + .5) y0 = int(y0 + .5) x1 = int(x1 + .5) y1 = int(y1 + .5) } // if (tobj.parent == nil) { // $o1.printf(" ", tobj.id_) // $o1.printf("",\ // x0, y0, 0) // $o1.printf("", diam) // $o1.printf("\n") // } // pointid = tobj.id_ + 1 // $o1.printf(" ", pointid) // $o1.printf("",\ // x1, y1, 0) // $o1.printf("", diam) // $o1.printf("\n") } // pointcount += 1 } $o1.printf(" \n") $o1.printf(" \n") $o1.printf(" \n") for i=0, slist.count-1 { tobj = slist.object(i) if (tobj.id == 0) { sprint(tstr, "%s", tobj.name_) }else{ sprint(tstr, "%s__%d__", tobj.name_, tobj.id + 1) } $o1.printf(" \n", tstr) if (tobj.i3d > 0) { tobj.name(tstr) if (tobj.parent != nil) { segcount += 1 $o1.printf("", segcount, tobj.parent.p3d.id[tobj.parent.i3d - 1], tobj.p3d.id[0]) } for j=0, tobj.i3d-2 { segcount += 1 xmlsegment($o1, tobj.p3d, j, segcount) } } else { if (tobj.parent != nil) { if (tobj.xparent == 0) { pointid = tobj.parent.xml3d.id(0) } else { // pointid = tobj.parent.xml3d.id(tobj.parent.xml3d.count - 1) pointid = tobj.parent.xml3d.id(1) } // $o1.printf(" \n", tobj.id_, tobj.parent.id_, tstr) } else { pointid = tobj.xml3d.id(0) } $o1.printf(" \n", tobj.id_, tstr) $o1.printf(" \n", pointid) $o1.printf(" \n", tobj.xml3d.id(1)) $o1.printf(" \n") } $o1.printf(" \n") } $o1.printf(" \n") $o1.printf(" \n") // $o1.printf("%s ", debugstr) } // if an imported cell is changed, this is not reflected in the // xml export. This mimics the current behavior, because the // hoc export doesn't reflect the change either. proc make3d () { local L, diam, len, x0, y0, x1, y1, i, j, k, defd, defL // first pass -- scale the points for i = 0, slist.count - 1 { tobj = slist.object(i) if (tobj.i3d == 0) { // is it possible to have a mix? defd = defL = 0 // not defined L = 80 diam = 1 if (tobj.geo.count > 0) { for j = 0, tobj.geo.count - 1 { if (tobj.geo.object(j).type == 2) { L = tobj.geo.object(j).value defL += 1 } else if (tobj.geo.object(j).type == 3) { diam = tobj.geo.object(j).value defd += 1 } else if (tobj.geo.object(j).type == 4) { L = diam = sqrt(tobj.geo.object(j).value)/PI defd += 1 defL += 1 } else if (tobj.geo.object(j).type == 5) { L = 43.0127 diam = 100/L/PI defd += 1 defL += 1 } } } else { // there will be at least one set: all for j = 0, tobj.sets.count - 1 { tobj1 = tobj.sets.object(j) for k = 0, tobj1.geo.count - 1 { if (tobj1.geo.object(k).type == 2) { L = tobj1.geo.object(k).value defL += 1 } else if (tobj1.geo.object(k).type == 3) { diam = tobj1.geo.object(k).value defd += 1 } else if (tobj1.geo.object(k).type == 0) { L = tobj.ldiaminfo.x[0] defL += 1 } else if (tobj1.geo.object(k).type == 1) { diam = tobj.ldiaminfo.x[1] defd += 1 } else if (tobj1.geo.object(k).type == 4) { L = diam = sqrt(tobj1.geo.object(k).value)/PI defd += 1 defL += 1 } else if (tobj1.geo.object(k).type == 5) { L = 43.0127 diam = 100/L/PI defd += 1 defL += 1 } } } } if (!defd || !defL) { tobj.name(tstr) printf("L and/or diam is not defined for %s\n", tstr) } //tobj.name(tstr) //print tstr, " ", L, diam x0 = tobj.x0 y0 = tobj.y0 x1 = tobj.x1 y1 = tobj.y1 len = ((x0-x1)^2 + (y0-y1)^2)^.5 x1 = int(1.0 * (x1 - x0) * L / len) + x0 y1 = int(1.0 * (y1 - y0) * L / len) + y0 tobj.xml3d = new P3D(2) tobj.xml3d.set(0, x0, y0, 0, diam) tobj.xml3d.set(1, x1, y1, 0, diam) } } // second pass -- translate points for i = 0, slist.count - 1 { tobj = slist.object(i) if (tobj.i3d == 0) { // is it possible to have a mix? if (tobj.xmlready == 0) { makeready(tobj) } } } } proc makeready () { local x0, y0, x1, y1, px0, py0, z, d if ($o1.parent != nil) { if ($o1.parent.xmlready != 1) { makeready($o1.parent) } x0 = $o1.xml3d.x.x[0] y0 = $o1.xml3d.y.x[0] z0 = $o1.xml3d.z.x[0] d0 = $o1.xml3d.d.x[0] x1 = $o1.xml3d.x.x[1] y1 = $o1.xml3d.y.x[1] z1 = $o1.xml3d.z.x[1] d1 = $o1.xml3d.d.x[1] px1 = $o1.parent.xml3d.x.x[1] py1 = $o1.parent.xml3d.y.x[1] $o1.xml3d.set(0, px1, py1, z0, d0) $o1.xml3d.set(1, x1 + px1 - x0, y1 + py1 - y0, z1, d1) } $o1.xmlready = 1 } endtemplate CellBuildTopology neuron-7.5/share/lib/hoc/celbild/inhomofn.hoc000077500000000000000000000137741323325274500212470ustar00rootroot00000000000000inhomofun_template_index_ = 0 begintemplate InhomoFun public argstr, expr, name, args, fobj, f objref this, fobj external hoc_sf_, object_index, inhomofun_template_index_ strdef argstr, expr, name, tstr, tstr1, tstr2, xfname proc init() { argstr = $s1 expr = $s2 name = $s3 sprint(xfname, "InhomoFun%dfun", inhomofun_template_index_) mkfobj() sprint(tstr, "fobj = new %s()", xfname) execute(tstr, this) inhomofun_template_index_ += 1 } func f() { return fobj.f($1,$2,$3,$&4) } iterator args() {local i if (numarg() == 1) { tstr = argstr }else{ tstr = $s2 } if (hoc_sf_.head(tstr, ",", $s1) >= 0) { $s1 = "commas$not$allowed" iterator_statement return } while (hoc_sf_.len(tstr) > 0) { if (hoc_sf_.head(tstr, " *", $s1) <= 0) { $s1 = tstr } iterator_statement hoc_sf_.tail(tstr, " *", tstr) } } proc mkfobj() {local i sprint(tstr1, "begintemplate %s\npublic f\nfunc f() {local p, p0, p1", xfname) for args(tstr2) { sprint(tstr1, "%s,%s", tstr1, tstr2) } i=0 for args(tstr2) { sprint(tstr1, "%s %s=$&4[%d]", tstr1, tstr2, i) i += 1 } sprint(tstr1, "%s p=$1 p0=$2 p1=$3 return %s}\nendtemplate %s\n", tstr1, expr, xfname) //print "mkfobj ", tstr1 execute1(tstr1) } endtemplate InhomoFun func dummy_inhomo() { return 0 } begintemplate InhomoParm public s, name, ms, is_ms, box, panel, findex, leave public save_data, restore, selpos, prmemb, export, xmlwrite external hoc_sf_, dummy_inhomo objref ms, this, box, dpi, dk1, argvec, fun, g strdef s, tstr1, tstr2, tstr3, tstr4, targstr strdef fdef proc init() { need_update_ = 1 geom_cnt_ = 0 argvec = new Vector(20) dpi = $o1 s = $s2 ms = this is_ms = 0 dk1 = new Deck() dk1.intercept(1) xpanel("") xpanel() dk1.intercept(0) ufun(0) } proc leave() { objref g } proc name() { $s1 = s } proc panel() { dpi.update() xpanel("") dpi.display(tstr1, tstr2, tstr3, tstr4) sprint(tstr1, "/* p is %s", tstr1) xlabel(tstr1) if (dpi.proxstyle_ != 0) {xlabel(tstr2)} if (dpi.distalstyle_ != 0) { xlabel(tstr3) } sprint(tstr1, "and %s */", tstr4) xlabel(tstr1) xlabel($s1) sprint(tstr1, " %s(x) = f(p)", s) xlabel(tstr1) xlabel("}") xmenu("f(p)", "fpmenu()") xmenu("show", 1) xbutton("Graph", "gshow()") xbutton("Show f(p) on shape", "showf()") xmenu() xpanel() dk1.map showf() } proc showf() { dpi.selih = this dpi.bild.subsets.dpi = dpi dpi.showdomain() selpos(dpi.parm) } proc selpos() {local y y = fun.fobj.f($1, dpi.p0, dpi.p1, &argvec.x[0]) sprint(tstr1, "f(p)=%g", y) dpi.bild.topol.g.label(.7,.15, tstr1, 2, 1, 0, 0, 1) export() } proc gshow() { if (object_id(g) == 0) { g = new Graph() dpi.bild.leave_.append(this) }else if (g.view_count == 0) { g = new Graph() dpi.bild.leave_.append(this) } g.size(dpi.p0, dpi.p1, 0, 1) pl() } proc pl() {local p, dp if (object_id(g) == 0) { return } if (g.view_count == 0) { return } g.erase() dp = (dpi.p1 - dpi.p0)/100 g.beginline(1,1) for (p = dpi.p0; p <= dpi.p1; p += dp) { g.line(p, fun.fobj.f(p, dpi.p0, dpi.p1, &argvec.x[0])) } g.flush() } proc fpmenu() {local i for i=0, dpi.bild.inhomofuns.count-1 { sprint(tstr1, "ufun(%d)", i) xbutton(dpi.bild.inhomofuns.object(i).name, tstr1) } xbutton("New", "usrdef()") } proc ufun() { findex = $1 fun = dpi.bild.inhomofuns.object($1) sprint(fdef, "f(p) = %s", fun.expr) mkdeck(fun.argstr) if (object_id(dpi.subset.sectionlist)) { export() } } proc usrdef() { tstr1 = fun.argstr while (string_dialog("Step 1 of 2: Enter parameter names separated by spaces", tstr1)) { tstr2 = "func dummy_inhomo() {local p, p0, p1" add_local(tstr2, tstr1) sprint(tstr2, "%s p=$1 return p}", tstr2) if (execute1(tstr2) == 1) { targstr = tstr1 fdef = "f(p) = p" mkdeck(targstr) usrdef2() break } sprint(tstr2, "Invalid test function: %s", tstr2) continue_dialog(tstr2) } } proc usrdef2() { tstr1 = "p" while (string_dialog("Step 2 of 2: Enter expression involving p and parameter names", tstr1)) { tstr2 = "func dummy_inhomo() {local p, p0, p1" add_local(tstr2, targstr) sprint(tstr2, "%s p=$1 return %s}", tstr2, tstr1) if (execute1(tstr2) == 1) { dpi.bild.append_inhomofun(targstr, tstr1) ufun(dpi.bild.inhomofuns.count-1) break } sprint(tstr2, "Invalid test function: %s", tstr2) continue_dialog(tstr2) } } proc add_local() { tstr3 = $s2 for fun.args(tstr4, $s2) { sprint($s1, "%s, %s", $s1, tstr4) } } proc argchange() { dpi.pl() selpos(dpi.parm) pl() } proc mkdeck() { size=0 dk1.remove_last() dk1.intercept(1) xpanel("") xlabel(fdef) for fun.args(tstr2, $s1) { sprint(tstr3, "argchange(%d)", size) xpvalue(tstr2, &argvec.x[size], 1, tstr3) size += 1 } xpanel() dk1.intercept(0) dk1.flip_to(0) } proc save_data() {local i, size size=0 for fun.args(tstr1) { size += 1 } sprint(tstr1, "{%s.restore(%d, %d)}", $s2, findex, size) $o1.save(tstr1) for i=0, size-1 { sprint(tstr1, "%g", argvec.x[i]) $o1.save(tstr1) } } proc restore() {local i for i=0, $2-1 { argvec.x[i] = fscan() } ufun($1) } proc prmemb() {local i i = 0 $o1.printf("proc %s_%s() {local x, p, p0, p1", s, $s2) for fun.args(tstr1) { $o1.printf(", %s", tstr1) } $o1.printf("\n %s.update()\n p0 = %s.p0 p1 = %s.p1\n", $s2, $s2, $s2) for fun.args(tstr1) { $o1.printf(" %s = %g\n", tstr1, argvec.x[i]) i += 1 } $o1.printf(" for %s.loop() {\n x = %s.x p = %s.p\n %s(x) = %s\n }\n}\n", $s2, $s2, $s2, s, fun.expr) } proc export() { if (!dpi.bild.continuous) return sprint(tstr1, "func dummy_inhomo() { for $o1.loop() { %s($o1.x) = $o2.f($o1.p, $o1.p0, $o1.p1, &$&3)} return 0}", s) execute1(tstr1) dpi.update() //printf("%s.export\n", this) dummy_inhomo(dpi, fun.fobj, &argvec.x[0]) } proc xmlwrite() {local i $o1.printf(" \n", s) $o1.printf(" \n") i = 0 for fun.args(tstr1) { $o1.printf(" \n", tstr1, argvec.x[i]) i += 1 } $o1.printf(" \n", fun.expr) $o1.printf(" \n") $o1.printf(" \n") } endtemplate InhomoParm neuron-7.5/share/lib/hoc/celbild/psubset.hoc000077500000000000000000000372231323325274500211120ustar00rootroot00000000000000 begintemplate DomainParmInfo public subset, name, is_subset, save_data, pl, styleset, update, prmemb1, prmemb2 public dstyle_, proxstyle_, distalstyle_, display, setparm, selparm, flip public using, is_using, using_, prox, dist, bild, selih, parm, export public loop, x, p, p0, p1, showdomain, origin_, theta_, xmlwrite, ox_, oy_ objref subset, this, prox, dist, bild, tobj, tobj1, tobj2 objref g, using_, nil, selih, dk2 strdef tstr, tstr1, tstr2, tstr3, tstr4 strdef ds1, ds2, ds3, ds4 proc init() { parm=.5 relparm=parm subset = $o1 bild = $o2 using_ = new List() g = bild.topol.g dstyle_ = 0 proxstyle_ = 0 distalstyle_ = 0 prox = new Vector() dist = new Vector() ox_ = oy_ = origin_ = 0 theta_ = 90 } func is_subset() { return 0 } func is_using() {local i for i=0, using_.count-1 { if (strcmp(using_.object(i).s, $s1) == 0) { return 1 } } return 0 } proc using() { local i for i=0, using_.count-1 { if (strcmp(using_.object(i).s, $s2) == 0) { break } } if ($1 == 0 && i < using_.count) { using_.object(i).ms = nil // avoid assertion error using_.remove(i) }else if ($1 == 1 && i >= using_.count) { // interpreter bug when an object holds pointer to itself // to see keep managing and unmanaging a range variable // using_.append(new InhomoParm(this, $s2)) tobj = new InhomoParm(this, $s2) using_.append(tobj) tobj = nil } } proc name() { i = subset.domainparms.index(this) if (i == 0) { sprint($s1, "%s_x", subset.name_) }else{ sprint($s1, "%s_x%d", subset.name_, i) } } proc styleset() { dstyle_ = $1 proxstyle_ = $2 distalstyle_ = $3 } iterator loop() {local i i = 0 forsec subset.sectionlist { for (x, 0) { p = (1 - x)*prox.x[i] + x*dist.x[i] iterator_statement } i += 1 } } proc save_data() {local i sprint(tstr, "{tobj1.styleset(%d, %d, %d)}", dstyle_, proxstyle_, distalstyle_) $o1.save(tstr) if (dstyle_ == 2) { sprint(tstr, "{tobj1.ox_ = %g tobj1.oy_ = %g}", ox_, oy_) $o1.save(tstr) } if (dstyle_ == 3) { sprint(tstr, "{tobj1.origin_ = %g tobj1.theta_ = %g}", origin_, theta_) $o1.save(tstr) } for i=0, using_.count-1 { sprint(tstr, "{tobj1.using(1, \"%s\")}", using_.object(i).s) $o1.save(tstr) sprint(tstr, "tobj1.using_.object(%d)", i) using_.object(i).save_data($o1, tstr) } } func min() {local d p0 = prox.min d = dist.min if (d < p0) { p0 = d } return p0 } func max() {local d p1 = prox.max d = dist.max if (d > p1) { p1 = d } return p1 } proc pr() { local i printf("min=%g max=%g\n", p0, p1) for i=0, subset.list.count - 1 { subset.list.object(i).name(tstr) printf("%s\t%g\t%g\n", tstr, prox.x[i], dist.x[i]) // printf("\ttmp2=%g\n", subset.list.object(i).tmp2) } } proc showdomain() { g.menu_remove("Show domain value") g.menu_remove("Specify origin") g.menu_remove("Specify projection axis") g.menu_tool("Show domain value", "selparm1") g.exec_menu("Show domain value") relparm=.5 setparm(relparm) } proc flip() { dk2 = $o1 $o1.flip_to(-1) $o1.remove_last() $o1.intercept(1) panel() $o1.intercept(0) $o1.flip_to(1) relparm=.5 setparm(relparm) } proc panel() { //print "panel" xpanel("") display(ds1, ds2, ds3, ds4) xvarlabel(ds1) xvarlabel(ds2) xvarlabel(ds3) xvarlabel(ds4) xslider(&relparm, 0, 1, "setparm(relparm)", 0, 1) showdomain() if (dstyle_ == 2) { g.menu_tool("Specify origin", "orgloc") xpvalue("x (um)", &ox_, 1, "chorg1()") xpvalue("y (um)", &oy_, 1, "chorg1()") } if (dstyle_ == 3) { g.menu_tool("Specify projection axis", "projax") xpvalue("origin_ (um)", &origin_, 1, "chorg()") xpvalue("Angle (deg)", &theta_, 1, "chorg()") } xmenu("metric") xbutton("Path Length from root", "dstyle(0)") // xbutton("Path Length from origin_", "dstyle(1)") xbutton("3D radial position", "dstyle(2)") xbutton("3D projection onto line", "dstyle(3)") // xbutton("3D distance from line", "dstyle(4)") xmenu() xmenu("proximal", "proxmenu()", 1) xmenu("distal", "distmenu()", 1) xlabel("") xbutton("Remove", "bild.subsets.delsdi()") xpanel() } proc proxmenu() { xbutton("No translation", "proxstyle(0)") if (dstyle_ == 0) { xbutton("Most proximal at 0", "proxstyle(1)") xbutton("All proximal ends at 0", "proxstyle(2)") }else if (dstyle_ == 2) { xbutton("Closest point to origin is 0", "proxstyle(1)") }else if (dstyle_ == 3) { xbutton("Minimum projection value is 0", "proxstyle(1)") } } proc distmenu() { xbutton("No normalization", "distalstyle(0)") if (dstyle_ == 0) { xbutton("Most distal at 1", "distalstyle(1)") xbutton("All distal ends at 1", "distalstyle(2)") }else if (dstyle_ == 2) { xbutton("Furthest point from origin is 1", "distalstyle(1)") }else if (dstyle_ == 3) { xbutton("Maximum projection value is 1", "distalstyle(1)") } } proc selparm1() {local x, dx, dy localobj tobj bild.topol.nearest_sec($2,$3,tobj) if (tobj.selected == 1) { dx = tobj.x1 - tobj.x0 dy = tobj.y1 - tobj.y0 x = (($2 - tobj.x0)*dx + ($3 - tobj.y0)*dy)/(dx^2 + dy^2) if (x > 1) { x = 1 } else if (x < 0) { x = 0 } relparm = selparm(x, tobj) }else{ setparm(0) } } proc projax() { if ($1 == 2) { // mouse down, what is selected if (ptdist($2,$3, ox_, oy_) < 100) { adjust_ = 1 }else{ adjust_ = 2 } } if (adjust_ == 1) { ox_ = $2 oy_ = $3 } if (adjust_ == 2) { theta_ = atan2($3 - oy_, $2 - ox_)*DEG } origin_ = ox_*cos(theta_/DEG) + oy_*sin(theta_/DEG) chorg1() } proc orgloc() { ox_ = $2 oy_ = $3 chorg1() } func ptdist() {local i, x1, y1, x2, y2 i = g.view_info() x1 = g.view_info(i, 13, $1) y1 = g.view_info(i, 14, $2) x2 = g.view_info(i, 13, $3) y2 = g.view_info(i, 14, $4) return (x1 - x2)^2 + (y1 - y2)^2 } proc dstyle() { dstyle_ = $1 flip(dk2) display(ds1, ds2, ds3, ds4) } proc proxstyle() { proxstyle_ = $1 display(ds1, ds2, ds3, ds4) } proc distalstyle() { distalstyle_ = $1 display(ds1, ds2, ds3, ds4) } proc display() { need_update_ = 1 export() // pr() if (proxstyle_ == 0) { $s2 = "with no translation" } if (distalstyle_ == 0) { $s3 = "and no normalization" } if (dstyle_ == 0) { $s1 = "Path Length from root" if (proxstyle_ == 1) { $s2 = "translated so most proximal end at 0" } if (proxstyle_ == 2) { $s2 = "translated so all proximal ends shifted to 0" } if (distalstyle_ == 1) { $s3 = "and normalized so most distal end at 1" } if (distalstyle_ == 2) { $s3 = "and normalized so all distal ends at 1" } }else if (dstyle_ == 1) { // not implemented $s1 = "Path Length from origin" }else if (dstyle_ == 2) { $s1 = "3D radial position from specified location" if (proxstyle_ == 1) { $s2 = "with closest point at 0" } if (distalstyle_ == 1) { $s3 = "and normalized so furthest point at 1" } }else if (dstyle_ == 3) { $s1 = "3D projection onto line" if (proxstyle_ == 1) { $s2 = "with minimum projection value at 0" } if (distalstyle_ == 1) { $s3 = "and normalized so max is 1" } }else if (dstyle_ == 4) { // not implemented $s1 = "3D distance from line" } sprint($s4, "ranges from %g to %g", p0, p1) setparm(relparm) } proc update() { if (geom_cnt_ != bild.geom_cnt_) { need_update_ = 1 geom_cnt_ = bild.geom_cnt_ } if (!need_update_) { return } // printf("%s.update\n", this) if (subset.list.count != prox.size) { prox.resize(subset.list.count) dist.resize(subset.list.count) } if (dstyle_ == 0) { update_path() }else if (dstyle_ == 2) { update_sphere() }else if (dstyle_ == 3) { update_proj() } min() max() sprint(ds4, "ranges from %g to %g", p0, p1) need_update_ = 0 } proc update_path() { local x absolute_path() // also does proxstyle_ == 2 if (proxstyle_ == 1) { // shift by most prox value x = min() prox.sub(x) dist.sub(x) } if (distalstyle_ == 1) { // normalize by most distal value x = max() prox.div(x) dist.div(x) }else if (distalstyle_ == 2) { // normalize so all distal values = 1 alldist1() } } proc update_sphere() {local x spherical_loc() if (proxstyle_ == 1) { // shift by least value x = min() prox.sub(x) dist.sub(x) } if (distalstyle_ == 1) { // normalize by greatest value x = max() prox.div(x) dist.div(x) } } proc update_proj() {local x absolute_proj() if (proxstyle_ == 1) { // shift by least value x = min() prox.sub(x) dist.sub(x) } if (distalstyle_ == 1) { // normalize by greatest value x = max() prox.div(x) dist.div(x) } } proc absolute_path() {local l // absolute arc lengths --- possibly shifted so all prox ends at 0 tobj = bild.topol.slist // cannot use tobj1.selected since we may be exporting // due to change to another subset parameter for i=0, tobj.count-1 { tobj.object(i).tmp3 = 0 } for i=0, subset.list.count-1 { subset.list.object(i).tmp3 = 1 } for i=0, tobj.count-1 { tobj1 = tobj.object(i) if (proxstyle_ == 2 && tobj1.tmp3 == 0) { l = 0 }else{ l = len(tobj1) } if (i == 0) { tobj1.tmp1 = 0 }else if (tobj1.xparent == 1) { tobj1.tmp1 = tobj1.parent.tmp2 }else{ tobj1.tmp1 = tobj1.parent.tmp1 } tobj1.tmp2 = tobj1.tmp1 + l } for i=0, subset.list.count-1 { tobj = subset.list.object(i) prox.x[i] = tobj.tmp1 dist.x[i] = tobj.tmp2 } } proc alldist1() {local i, nfac // arc lengths normalized so all distal ends at 1 // note that branch point arc values are normalized with // respect to longest distal length from branch. i.e the branch // point of ___|___ has a value of 3/6 instead of 1/4 // // strategy is to fill tmp2 with proper normalization factors which // are the most distal tips from that section. // first fill tmp2 with current distal values // but need to 0 so parent will be set corrrectly for i = 0, bild.topol.slist.count-1 { bild.topol.slist.object(i).tmp2 = 0 } for i = 0, subset.list.count-1 { subset.list.object(i).tmp2 = dist.x[i] } for (i=subset.list.count-1; i >= 0; i -= 1) { // from leaf order tobj = subset.list.object(i) if (object_id(tobj.parent) != 0) if (tobj.parent.tmp2 < tobj.tmp2) { tobj.parent.tmp2 = tobj.tmp2 } } // normalize prox and dist for i=0, subset.list.count-1 { tobj = subset.list.object(i) dist.x[i] /= tobj.tmp2 if (object_id(tobj.parent) != 0) { // if there is no parent then it is the root and so // 0 anyway prox.x[i] /= tobj.parent.tmp2 } } } func len() {local i, a a = 0 if ($o1.i3d > 0) { tobj2 = $o1.p3d.x.c.deriv(1,1).pow(2) tobj2.add($o1.p3d.y.c.deriv(1,1).pow(2)) tobj2.add($o1.p3d.z.c.deriv(1,1).pow(2)) a = tobj2.sqrt.sum }else if (object_id($o1.ldiaminfo)) { a = $o1.ldiaminfo.x[0] }else if (object_id($o1.geo)) { for i=0, $o1.geo.count-1 { if ($o1.geo.object(i).type == 2) { a = $o1.geo.object(i).value return a }else if ($o1.geo.object(i).type == 4) { a = $o1.geo.object(i).value a = sqrt(a/PI) return a } } $o1.name(tstr) print "cannot determine length of ", tstr, ", assume 500" a = 500 } else { // either unspecified or via a subset constant $o1.name(tstr) print "cannot determine length of ", tstr, ", assume 500" a = 500 } //printf("%s[%d] %g\n", $o1.name_, $o1.id, a) return a } proc absolute_proj() {local i, x, y, c, s, n tobj = bild.topol.slist c = cos(theta_/DEG) s = sin(theta_/DEG) for i=0, subset.list.count-1 { tobj = subset.list.object(i) if (tobj.i3d > 0) { x = tobj.p3d.x.x[0] y = tobj.p3d.y.x[0] prox.x[i] = x*c + y*s n = tobj.p3d.x.size - 1 x = tobj.p3d.x.x[n] y = tobj.p3d.y.x[n] dist.x[i] = x*c + y*s } else { execerror("3D projection onto line only works with 3-d reconstructions") } } dist.sub(origin_) prox.sub(origin_) } proc spherical_loc() {local i, x, y, z tobj = bild.topol.slist for i=0, subset.list.count-1 { tobj = subset.list.object(i) if (tobj.i3d > 0) { x = tobj.p3d.x.x[0] - ox_ y = tobj.p3d.y.x[0] - oy_ z = tobj.p3d.z.x[0] prox.x[i] = x*x + y*y + z*z n = tobj.p3d.x.size - 1 x = tobj.p3d.x.x[n] - ox_ y = tobj.p3d.y.x[n] - oy_ z = tobj.p3d.z.x[n] dist.x[i] = x*x + y*y + z*z } else { execerror("3D radial position only works with 3-d reconstructions") } } dist.sqrt() prox.sqrt() } proc setparm() { parm = p0 + $1*(p1-p0) pl() } proc chorg() {local s, c, x // preserve the line but make ox, oy consistent with origin s = sin(theta_/DEG) c = cos(theta_/DEG) // well, what is the line position at current ox_, oy_ x = ox_*c + oy_*s // so translate along line by x = origin_ - x ox_ += x*c oy_ += x*s chorg1() } proc chorg1() { need_update_ = 1 update() setparm(relparm) } func selparm() {local i, x i = subset.list.index($o2) if (i >= 0) { parm = prox.x[i] + $1*(dist.x[i] - prox.x[i]) }else{ parm = 0 } pl() $o2.name(tstr) g.label(.7,.05, tstr, 2, 1, 1, 0, 1) sprint(tstr, " (%g)", $1) g.label(.7,.05, tstr, 2, 1, 0, 0, 1) if (object_id(selih)){selih.selpos(parm)} return (parm - p0)/(p1 - p0) } proc pl() {local i, th, x, y g.erase_all() tobj = bild.topol.slist for i=0, tobj.count-1 { tobj1 = tobj.object(i) if (tobj1.selected == 0) { g.beginline(9,1) g.line(tobj1.x0, tobj1.y0) g.line(tobj1.x1, tobj1.y1) } } for i=0, subset.list.count - 1 { tobj = subset.list.object(i) if (dist.x[i] < prox.x[i]) { if (prox.x[i] <= parm) { g.beginline(2,2) g.line(tobj.x0, tobj.y0) g.line(tobj.x1, tobj.y1) }else if (dist.x[i] >= parm) { g.beginline(1,2) g.line(tobj.x0, tobj.y0) g.line(tobj.x1, tobj.y1) }else{ th = (parm - prox.x[i])/(dist.x[i] - prox.x[i]) x = (1-th)*tobj.x0 + th*tobj.x1 y = (1-th)*tobj.y0 + th*tobj.y1 g.beginline(2,2) g.line(tobj.x1, tobj.y1) g.line(x, y) g.beginline(1,2) g.line(x, y) g.line(tobj.x0, tobj.y0) } }else{ if (dist.x[i] <= parm) { g.beginline(2,2) g.line(tobj.x0, tobj.y0) g.line(tobj.x1, tobj.y1) }else if (prox.x[i] >= parm) { g.beginline(1,2) g.line(tobj.x0, tobj.y0) g.line(tobj.x1, tobj.y1) }else{ th = (parm - prox.x[i])/(dist.x[i] - prox.x[i]) x = (1-th)*tobj.x0 + th*tobj.x1 y = (1-th)*tobj.y0 + th*tobj.y1 g.beginline(2,2) g.line(tobj.x0, tobj.y0) g.line(x, y) g.beginline(1,2) g.line(x, y) g.line(tobj.x1, tobj.y1) } } } if (dstyle_ == 2) { g.mark(ox_, oy_, "s", 10, 3, 1) } if (dstyle_ == 3) { projax_pl() } sprint(tstr, "p=%g", parm) g.label(.7,.1,tstr,2,1,0,0,1) g.flush() } proc projax_pl() {local dx, dy, sc sc = (g.size(2) - g.size(1)) dx = cos(theta_/DEG) dy = sin(theta_/DEG) g.beginline(3, 1) sc = g.size(3) - oy_ g.line(sc*dx + ox_, sc*dy + oy_) sc = g.size(4) - oy_ g.line(sc*dx + ox_, sc*dy + oy_) g.mark(ox_, oy_, "s", 10, 3, 1) } proc prmemb1() {local i display(tstr1, tstr2, tstr3, tstr4) $o1.printf(" // %s %s\n", tstr1, tstr2) $o1.printf(" // %s %s\n", tstr3, tstr4) $&2 += 2 name(tstr) $o1.printf(" %s = new SubsetDomainIterator(%s, %d, %d, %d", tstr, subset.name_, dstyle_, proxstyle_, distalstyle_) if (dstyle_ == 2) { $o1.printf(", %g, %g, %g", ox_, oy_, 0) } if (dstyle_ == 3) { $o1.printf(", %g, %g", origin_, theta_) } $o1.printf(")\n") for i=0, using_.count-1 { $o1.printf(" %s_%s()\n", using_.object(i).s, tstr) $&2 += 1 if ($&2 > 200) { $&2 = 0 $&3 += 1 $o1.printf(" biophys_inhomo_%d()\n}\nproc biophys_inhomo_%d() {\n", $&3, $&3) } } } proc prmemb2() {local i name(tstr) for i=0, using_.count-1 { using_.object(i).prmemb($o1, tstr) } } proc export() {local i update() for i=0, using_.count-1 { using_.object(i).export() } } proc xmlwrite() {local i name(tstr) $o1.printf(" \n", tstr) subset.name(tstr) $o1.printf(" \n", tstr) $o1.printf(" \n") display(ds1, ds2, ds3, ds4) $o1.printf(" %s\n %s\n %s\n %s\n", ds1, ds2, ds3, ds4) if (dstyle_ == 3) { $o1.printf(" \n", origin_, theta_) } $o1.printf(" \n") for i=0, using_.count-1 { using_.object(i).xmlwrite($o1) } $o1.printf(" \n", tstr) } endtemplate DomainParmInfo neuron-7.5/share/lib/hoc/chanbild.hoc000077500000000000000000000010761323325274500175700ustar00rootroot00000000000000objref nil, tobj { load_file("stdlib.hoc") xopen("chanbild/const.hoc") xopen("chanbild/exp.hoc") xopen("chanbild/sigmoid.hoc") xopen("chanbild/linoid.hoc") xopen("chanbild/kschanbg.hoc") xopen("chanbild/table.hoc") xopen("chanbild/ksstate.hoc") xopen("chanbild/kstrans.hoc") xopen("chanbild/ksgate.hoc") xopen("chanbild/kstgui.hoc") xopen("chanbild/gategui.hoc") xopen("chanbild/properties.hoc") xopen("chanbild/chanbild1.hoc") } proc chanbild() { if (argtype(1) == 0) { tobj = new ChannelBuild($1) }else{ tobj = new ChannelBuild($o1) } tobj.map() tobj = nil } neuron-7.5/share/lib/hoc/chanbild/000077500000000000000000000000001323325274500170665ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/chanbild/Makefile.am000077500000000000000000000005041323325274500211240ustar00rootroot00000000000000nrndir = $(prefix)/share/@PACKAGE@/lib nrnhocdir = $(nrndir)/hoc nrnhocchanbilddir = $(nrnhocdir)/chanbild nrnhocchanbild_DATA = chanbild1.hoc const.hoc exp.hoc gategui.hoc \ kschanbg.hoc ksgate.hoc ksstate.hoc kstgui.hoc kstrans.hoc \ linoid.hoc properties.hoc sigmoid.hoc table.hoc EXTRA_DIST = $(nrnhocchanbild_DATA) neuron-7.5/share/lib/hoc/chanbild/Makefile.in000066400000000000000000000444321323325274500211420ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/chanbild ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(nrnhocchanbilddir)" DATA = $(nrnhocchanbild_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ nrndir = $(prefix)/share/@PACKAGE@/lib nrnhocdir = $(nrndir)/hoc nrnhocchanbilddir = $(nrnhocdir)/chanbild nrnhocchanbild_DATA = chanbild1.hoc const.hoc exp.hoc gategui.hoc \ kschanbg.hoc ksgate.hoc ksstate.hoc kstgui.hoc kstrans.hoc \ linoid.hoc properties.hoc sigmoid.hoc table.hoc EXTRA_DIST = $(nrnhocchanbild_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/chanbild/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/chanbild/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nrnhocchanbildDATA: $(nrnhocchanbild_DATA) @$(NORMAL_INSTALL) @list='$(nrnhocchanbild_DATA)'; test -n "$(nrnhocchanbilddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(nrnhocchanbilddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(nrnhocchanbilddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(nrnhocchanbilddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(nrnhocchanbilddir)" || exit $$?; \ done uninstall-nrnhocchanbildDATA: @$(NORMAL_UNINSTALL) @list='$(nrnhocchanbild_DATA)'; test -n "$(nrnhocchanbilddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(nrnhocchanbilddir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(nrnhocchanbilddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nrnhocchanbildDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nrnhocchanbildDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nrnhocchanbildDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nrnhocchanbildDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/chanbild/chanbild1.hoc000077500000000000000000000362541323325274500214230ustar00rootroot00000000000000if (!name_declared("EmptyClass")) { // for aliases unpolluted by other names execute1("begintemplate EmptyClass\nendtemplate EmptyClass\n") } begintemplate ChannelBuild public aliases public box, save, gatelist, mkgatemenu, map, genprop, change, ggui public newgate, gatestr, changegate, set_gatestr, pr, clone, nahh, khh public rgui, newrate, ks, ksth, displaystr, dispsel, ks2cb, cb2ks, end_restore public is_sname, new_sname, destroy, kshoc, set_alias, usetable external hoc_sf_ objref genprop, this, box, gatelist, displist, tobj, tobj1, clone_, rgui, ks objref ksth, ggui, gvec, ksvec, gate, kst, hf, aliases strdef tstr, gatestr, displaystr proc init() {local den, imp, sin // 5.6 compatible, all old session files should be density and they // either had no arg from the main menu or had an arg of 1 from // the session save. Now the map is handled completely separately // (see proc chanbild()) and the arg refers to boolean density // note that density vs point process cannot be changed after KSChan // is constructed. // If the arg is a KSChan then this becomes a controller for it. aliases = new EmptyClass() use_alias_ = 0 usetable_ = 0 usetable_disp = 0 den = 1 imp = 0 if (numarg() != 0) { if (argtype(1) == 0) { den = $1 }else{ imp = 1 den = $o1.is_point != 1 ks = $o1 sin = ks.single } } if (object_id(ks) == 0) { ks = new KSChan( den != 1 ) } ksth = new KSTransHelper() gvec = new Vector(3) ksvec = new Vector(20) gatelist = new List() displist = new List() displaystr = "Select here to construct gates" displist.append(this) genprop = new ChannelBuildSelectProperties(this, imp) if (imp) { import() } set_gatestr() build() i = 0 if ( imp && sin) { genprop.single_ = sin } } proc import() {local i, j, k, srcindex, tarindex, ut ut = ks.usetable for i=0, ks.ngate-1 { tobj = new ChannelBuildKSGate(this) gatelist.append(tobj) gate = ks.gate(i) tobj.ksg = gate tobj.power = gate.power for j=0, gate.nstate-1 { tobj1 = ks.state(gate.sindex + j) tobj.set_state(tobj1.name, tobj1.frac, 50+j*50, 100 - i*20) tobj.states.object(tobj.states.count-1).kss = tobj1 } for j=0, ks.ntrans-1 { kst = ks.trans(j) srcindex = kst.src.index - gate.sindex if (srcindex >= 0 && srcindex < gate.nstate) { tarindex = kst.target.index - gate.sindex tobj.set_trans(srcindex, tarindex, kst.type) tobj1 = tobj.transitions.object(tobj.transitions.count-1) tobj1.kst = kst tobj1.settype(kst.type, kst.ligand) tobj1.stoichiometry(kst.stoichiometry) for k=0, 1 { tobj1.cbf[k].kst = kst tobj1.cbf[k].ks2cb() } } } tobj.end_restore() } // end_restore() // need to avoid cb2ks() so explicitly do following changegate() set_alias() usetable(ut) objref gate, kst, tobj,tobj1 } proc destroy() {local i objref genprop, displist, tobj, tobj1, clone_, rgui, ks if (object_id(ggui)) { ggui.g_dismiss() } objref ksth, ggui, gvec, ksvec, gate, aliases for i=0, gatelist.count-1 { gatelist.object(i).destroy() } objref gatelist doNotify() box.unmap() } proc map() { if (box.ismapped) return sprint(tstr, "%s managed %s", this, ks) if (numarg() > 1) { box.map(tstr, $2, $3, $4, $5) }else{ box.map(tstr) } } proc build() { box = new VBox(3) box.priority(2000) box.dismiss_action("destroy()") box.intercept(1) box.ref(this) box.save("save()") xpanel("") xmenu("Properties") genprop.menu() // xbutton("General Properties", "genprop.map()") xbutton(" HH sodium channel", "nahh()") xbutton(" HH potassium channel","khh()") xmenu("Clone channel type") xbutton("As Density channel", "clone(1)") xbutton("As Point Process", "clone(0)") xbutton("Hoc file for KSChan", "kshoc()") xmenu() xmenu("Copy gates from", "mkcgmenu()") xbutton("Text to stdout", "pr()") xcheckbox("Provide transition aliases", &use_alias_, "set_alias(use_alias_)") xcheckbox("Use fixed step HH rate tables", &usetable_, "usetable(usetable_)") xbutton("Gate Constructor", "dispsel(1000)") xmenu() xvarlabel(genprop.namestr) xvarlabel(genprop.useionstr1) xvarlabel(genprop.useionstr2) xvarlabel(gatestr) xvarlabel(genprop.defstr) xpanel() displist.browser("", "displaystr") displist.select_action("dispsel(hoc_ac_)", 1) box.intercept(0) } proc kshoc() {local i, n, vmin, vmax if (object_id(hf) == 0) { sprint(tstr, "./%s.hoc", ks.name) hf = new File() hf.chooser("w", "Write Hoc description of KSChan (no GUI)", "*.hoc", "Write", "Cancel", tstr) } if (numarg() == 1) { hf.wopen($s1) }else if (hf.chooser) { hf.wopen() }else{ return } if (strcmp(ks.ion, "NonSpecific") != 0) { sprint(tstr, "%s_ion", ks.ion) hf.printf("{ ion_register(\"%s\", %d) }\n", ks.ion, ion_charge(tstr)) } for i = 0, ks.nligand-1 { hoc_sf_.head(ks.ligand(i), "_ion", tstr) hf.printf("{ ion_register(\"%s\", %d) }\n", tstr, ion_charge(ks.ligand(i))) } hf.printf("objref ks, ksvec, ksgate, ksstates, kstransitions, tobj\n") hf.printf("{\n ksvec = new Vector()\n ksstates = new List()\n kstransitions = new List()\n") hf.printf(" ks = new KSChan(%d)\n}\n", ks.is_point) hf.printf("// %s\n", genprop.namestr) hf.printf("// %s\n", genprop.useionstr1) hf.printf("// %s\n", genprop.useionstr2) hf.printf("{\n ks.name(\"%s\")\n", ks.name) if (strcmp(ks.ion, "NonSpecific") != 0) { hf.printf(" ks.ion(\"%s\")\n", ks.ion) } hf.printf(" ks.iv_type(%d)\n", ks.iv_type) hf.printf(" ks.gmax(%g)\n", ks.gmax) if (ks.iv_type == 0) { hf.printf(" ks.erev(%g)\n", ks.erev) } hf.printf("}\n") hf.printf("// %s\n", gatestr) for i=0, gatelist.count-1 { gatelist.object(i).kshoc(hf) } if (ks.single) { hf.printf("{ ks.single(1) }\n") } n = ks.usetable(&vmin, &vmax) if (ks.usetable()) { vmin = vmax = 0 n = ks.usetable(&vmin, &vmax) hf.printf("{ ks.usetable(%d, %d, %g, %g) }\n", ks.usetable(), n, vmin, vmax) } hf.printf("{objref ks, ksvec, ksgate, ksstates, kstransitions, tobj}\n") hf.close } func is_sname() {local i, j for j=0, gatelist.count-1 { gate = gatelist.object(j) for i=0, gate.states.count-1 { if (strcmp(gate.states.object(i).name, $s1) == 0) { return 1 } } } return 0 } proc new_sname() {local i if (!is_sname($s1)) { return } for (i = 2; 1; i += 1) { sprint(tstr, "%s%d", $s1, i) if (!is_sname(tstr)) { $s1 = tstr return } } } proc mkcgmenu() { tobj = new List("KSChan") for i=0, tobj.count - 1 { sprint(tstr, "copygates(%s)", tobj.object(i)) xbutton(tobj.object(i).name, tstr) } } proc copygates() {local i set_alias(0) for i=0, $o1.ngate-1 { tobj = new ChannelBuildKSGate(this) gatelist.append(tobj) tobj.copygate($o1, $o1.gate(i)) } end_restore() } proc pr() {local i printf("\n%s\n", genprop.namestr) printf(" %s\n", genprop.useionstr1) printf(" %s\n", genprop.useionstr2) printf(" %s\n", gatestr) printf(" %s\n", genprop.defstr) for i=0, gatelist.count - 1 { gatelist.object(i).pr() } } proc newrate() { if ($1 == 2) { $o2 = new VExpRate() }else if ($1 == 3) { $o2 = new VLinoidRate() }else if ($1 == 4) { $o2 = new VSigmoidRate() }else{ $o2 = new VExpRate() } } proc set_gatestr() {local i sprint(tstr, "%s = %smax", genprop.g_or_p, genprop.g_or_p) for i=0, gatelist.count-1 { sprint(tstr, "%s * %s", tstr, gatelist.object(i).gatestr) } gatestr = tstr genprop.set_defstr() } proc dispsel() {local i localobj ob if ($1 < displist.count) { if ($1 >= 0) { ob = displist.object($1) } if (ks.usetable) { usetable_ = 1 if (ob == this) { tablewarn() return } } i = gatelist.index(ob) }else{ i = $1 } if (object_id(ggui) == 0) { ggui = new ChannelBuildGateGUI(this) } ggui.dispsel(i) } proc changegate() { local i for i=0, gatelist.count - 1 { tobj = gatelist.object(i) tobj.set_gatestr() tobj.set_displaystr() } set_gatestr() mk_displist() } proc mk_displist() { local i //print "mk_displist" displist.remove_all() usetable_ = ks.usetable if (usetable_) { displist.append(this) } for i=0, gatelist.count - 1 { gatelist.object(i).append_displist(displist) } displist.select(-1) } func change() {local i i = displist.index($o1) if (i >= 0) { displist.remove(i) displist.insrt(i, $o1) displist.select(i) } return i } proc end_restore() {local i cb2ks() changegate() set_alias() } proc set_alias() {local i, j, k localobj kst, tobj, tobj1 hoc_sf_.alias(aliases) if (numarg() == 1) { use_alias_ = $1 } if (use_alias_ == 0) { return } for i=0, ks.ntrans-1 { kst = ks.trans(i) for j=0, 1 { ksth.coef(kst, j, kst.type, tstr) tobj = new EmptyClass() hoc_sf_.alias(aliases, tstr, tobj) tobj1 = kst.parm(j) if (kst.ftype(j) == 6) { continue } if (kst.ftype(j) == 7) { hoc_sf_.alias(tobj, "table", tobj1) continue } for k=0, tobj1.size-1 { ksth.pname(kst, j, k, tstr, 0) hoc_sf_.alias(tobj, tstr, &tobj1.x[k]) } } } } func usetable() {local old old = usetable_disp_ if (displist.count > 0) { old = old && (displist.object(0) == this) } if (numarg() > 0) { usetable_ = ks.usetable($1) if ($1 == 0 && old == 0) { return 0 }// since this gets called a lot }else{ usetable_ = ks.usetable(usetable_) } if (usetable_) { displaystr = "Warning: Using hh rate tables (for fixed step method)" usetable_disp_ = 1 }else{ displaystr = "Select here to construct gates" usetable_disp_ = 0 } if (usetable_ != old) { mk_displist() } return usetable_ } proc tablewarn() { xpanel("HH rate table warning") xlabel("Warning: Using fixed step rate tables for the hh style gates.") xlabel("These tables do NOT get automatically updated when the rate parameters change.") xlabel("They are used only for the fixed step method and are updated only when") xlabel(" dt changes. If parameters are changed externally, be sure to call") sprint(tstr, " %s.usetable() or %s.usetable(1)", this, ks) xlabel(tstr) xpanel(200, 200) } proc save() {local i box.save("load_file(\"chanbild.hoc\", \"ChannelBuild\")\n}") genprop.save_ion(box) for i=0, ks.nligand-1 { save_ligand(box, ks.ligand(i)) } sprint(tstr, "{ocbox_ = new ChannelBuild(%d)}", ks.is_point == 0) box.save(tstr) box.save("{object_push(ocbox_)}") genprop.save_data(box, "ocbox_") for i=0, gatelist.count-1 { gatelist.object(i).save_data(box, "ocbox_") } box.save("end_restore()") sprint(tstr, "{genprop.set_single(%d)}", genprop.single_) box.save(tstr) sprint(tstr, "{set_alias(%d)}", use_alias_) box.save(tstr) sprint(tstr, "{usetable(%d)}", usetable_) box.save(tstr) box.save("{object_pop()}") box.save("{") } proc save_ligand() {local c c = ion_charge($s2) hoc_sf_.head($s2, "_ion", tstr) sprint(tstr, "{ion_register(\"%s\", %d)}", tstr, c) $o1.save(tstr) } proc clone() {local i clone_ = new ChannelBuild($1) genprop.clone(clone_.genprop) for i=0, gatelist.count-1 { gatelist.object(i).clone(clone_) } clone_.end_restore() clone_.map() objref clone_ } proc nahh() {local i set_alias(0) for i=0, gatelist.count-1 { gatelist.object(i).remove() } gatelist.remove_all() genprop.set_data("nahh", 1, 1, 0, "na") tobj = new ChannelBuildKSGate(this) gatelist.append(tobj) tobj.begin_restore(3) tobj.set_state("m", 1, 140, 140) tobj.set_trans(0, 0, 0) tobj.transitions.object(0).settype(0, "") tobj1 = new Vector() tobj1.append(1, .1, -40) tobj.transitions.object(0).set_f(0, 3, tobj1) tobj1 = new Vector() tobj1.append(4, -1/18, -65) tobj.transitions.object(0).set_f(1, 2, tobj1) tobj.end_restore() tobj = new ChannelBuildKSGate(this) gatelist.append(tobj) tobj.begin_restore(1) tobj.set_state("h", 1, 140, 110) tobj.set_trans(0, 0, 0) tobj.transitions.object(0).settype(0, "") tobj1 = new Vector() tobj1.append(.07, -1/20, -65) tobj.transitions.object(0).set_f(0, 2, tobj1) tobj1 = new Vector() tobj1.append(1, -1/10, -35) tobj.transitions.object(0).set_f(1, 4, tobj1) tobj.end_restore() end_restore() if (object_id(ggui) != 0) if (ggui.g_map_ == 1) { dispsel(0) } } proc khh() {local i set_alias(0) for i=0, gatelist.count-1 { gatelist.object(i).remove() } gatelist.remove_all() genprop.set_data("khh", 1, 1, 0, "k") tobj = new ChannelBuildKSGate(this) gatelist.append(tobj) tobj.begin_restore(4) tobj.set_state("n", 1, 140, 140) tobj.set_trans(0, 0, 0) tobj.transitions.object(0).settype(0, "") tobj1 = new Vector() tobj1.append(.1, .1, -55) tobj.transitions.object(0).set_f(0, 3, tobj1) tobj1 = new Vector() tobj1.append(.125, -1/80, -65) tobj.transitions.object(0).set_f(1, 2, tobj1) tobj.end_restore() end_restore() if (object_id(ggui) != 0) if (ggui.g_map_ == 1) { dispsel(0) } } proc ks2cb() { } proc cb2ks() {local i, is, it, nstate, ntrans, ngate, nhhstate, iligtrans gvec.resize(0) // order gates so hh gates first ksvec.resize(0) ksvec.append(ks.iv_type) ngate = gatelist.count nstate = 0 nhhstate = 0 ntrans = 0 iligtrans = 0 nligand = 0 it = 0 for i=0, ngate - 1 { tobj = gatelist.object(i) nstate += tobj.states.count if (tobj.states.count == 1) { tobj.states.object(0).i = nhhstate gvec.append(i) nhhstate += 1 } ntrans += tobj.transitions.count for j=0, tobj.transitions.count -1 { if (tobj.transitions.object(j).type >= 2) { iligtrans += 1 } } } // index the remaining states and gates is = nhhstate for i=0, ngate - 1 { tobj = gatelist.object(i) if (tobj.states.count > 1) { gvec.append(i) for j=0, tobj.states.count-1 { tobj.states.object(j).i = is is += 1 } } } // actually, forget the ligands and let the future kst objects // take care of it. i.e. we continue to assume nligand = 0 iligtrans = ntrans nligand = 0 ksvec.append(ngate, nstate, nhhstate, ntrans, nligand, iligtrans) for i=0, ngate-1 { tobj = gatelist.object(gvec.x[i]) ksvec.append(tobj.states.object(0).i, tobj.states.count) ksvec.append(tobj.power) for j=0, tobj.states.count-1 { ksvec.append(tobj.states.object(j).frac) } } // twice, first for non-ligand and then for ligand it = 0 // actually only use the first and late future kst take care of it for i=0, ngate-1 { tobj = gatelist.object(gvec.x[i]) for j=0, tobj.transitions.count-1 { tobj1 = tobj.transitions.object(j) // if (tobj1.type < 2) { ksvec.append(tobj1.src.i, tobj1.target.i) // ksvec.append(tobj1.type, -1) ksvec.append(0, -1) tobj1.i = it it += 1 // } } } // assert (it == iligtrans) if (0) { for i=0, ngate-1 { tobj = gatelist.object(gvec.x[i]) for j=0, tobj.transitions.count-1 { tobj1 = tobj.transitions.object(j) if (tobj1.type >= 2) { ksvec.append(tobj1.src.i, tobj1.target.i) ksvec.append(tobj1.type, tobj1.ligdex) tobj1.i = it it += 1 } } } } ks.setstructure(ksvec) // get the ks objects for i=0, ngate-1 { tobj = gatelist.object(i) tobj.ksg = ks.gate(gvec.x[i]) for j=0, tobj.states.count-1 { tobj1 = tobj.states.object(j) tobj1.kss = ks.state(tobj1.i) } for j=0, tobj.transitions.count-1 { tobj1 = tobj.transitions.object(j) tobj1.kst = ks.trans(tobj1.i) } } // do the rest of the cb2ks, note that because of ligands the // transition indices are volatile but kst are not for i=0, ngate-1 { tobj = gatelist.object(i) // nothing to do, already have power for j=0, tobj.states.count-1 { tobj.states.object(j).cb2ks() // only the name } for j=0, tobj.transitions.count-1 { tobj.transitions.object(j).cb2ks() // type, ligand, and f0,f1 } } // ks.pr } endtemplate ChannelBuild neuron-7.5/share/lib/hoc/chanbild/const.hoc000077500000000000000000000015201323325274500207100ustar00rootroot00000000000000{load_file("nrngui.hoc")} begintemplate VConstRate public A, f, inv, Asol, ksol, form, parms, restore, save_data, type public kstset, parm2vec, vec2parm, chk proc init() { parms(.1) } proc kstset() { parms(.1) $o1.set_f($2, type(), new Vector(1)) parm2vec($o1.parm($2)) } proc chk() { if ($o3.x[0] < 0) { $o3.x[0] = 0 } if ($1 == 1) if ($2 == 0) if ($o3.x[0] > 1) $o3.x[0] = 1 } proc parm2vec() { $o1.resize(0) $o1.append(A) } proc vec2parm() { A = $o1.x[0] } func type() { return 1 } proc parms() { A = $1 } proc save_data() { sprint($s2, "%g", A) $o1.save($s2) } proc restore() { parms(fscan()) } proc form() { if ($2 == 1) { sprint($s1, "A%s", $s3) }else{ sprint($s1, "%.4g", A) } } func f() { return A } func inv() { return 1e6 } func Asol() { return $2 } func ksol() { return 0 } endtemplate VConstRate neuron-7.5/share/lib/hoc/chanbild/exp.hoc000077500000000000000000000022231323325274500203570ustar00rootroot00000000000000{load_file("nrngui.hoc")} begintemplate VExpRate public A, k, d, f, inv, Asol, ksol, form, parms, restore, save_data, type public kstset, parm2vec, vec2parm, chk proc init() { parms(.5, .1, -40) } proc kstset() { parms(.5, .1, -40) $o1.set_f($2, type(), new Vector(3)) parm2vec($o1.parm($2)) } proc chk() { if ($o3.x[0] < 0) { $o3.x[0] = 0 } } proc parm2vec() { $o1.resize(0) $o1.append(A, k, d) } proc vec2parm() { A = $o1.x[0] k = $o1.x[1] d = $o1.x[2] } func type() { return 2 } proc parms() { A = $1 k = $2 d=$3 } proc save_data() { sprint($s2, "%g %g %g", A, k, d) $o1.save($s2) } proc restore() { parms(fscan(), fscan(), fscan()) } proc form() { if ($2 == 1) { sprint($s1, "A%s*exp(k%s*(v - d%s)))", $s3, $s3, $s3) }else{ if (d < 0) {$s1 = "+"} else {$s1 = "-"} sprint($s1, "%.4g*exp(%.4g*(v %s %.4g)))", A, k, $s1, abs(d)) } } func f() {local x x = k*($1 - d) if (x > 700) { x = 700 } return A*exp(x) } func inv() {local x x = log($1/A) if (k == 0) { return 1e6 } return x/k + d } func Asol() { return $2 } func ksol() {local x x = $1 - d if (abs(x) < 1e-6) { x = 1e-6 } return log($2/A)/x } endtemplate VExpRate neuron-7.5/share/lib/hoc/chanbild/gategui.hoc000077500000000000000000000322061323325274500212140ustar00rootroot00000000000000begintemplate ChannelBuildGateGUI public name, displaystr, gatestr, power, set_data, dispsel public gid, cb, pl, g_dismiss public remove, g_map_ external graph_menu_remove_most, valid_name_syntax objref gates, tobj, tobj1, this, cb, stglyph, ksg, selgate, selstate, srcstate objref gate, state, trans strdef tstr, hint, name objref g, box, box2, box3, box4, math, rgui, deck, ks, nil, seltrans proc init() { cb = $o1 ks = cb.ks math = new GUIMath() gates = cb.gatelist // default() // set_disp() } proc default() { begin_restore(1) power = 1 set_state("O", 1, 200, 100) set_state("C", 0, 100, 100) set_trans(1, 0, 0) tobj.set_f(0, 1, new Vector(1)) tobj.set_f(1, 1, new Vector(1)) } proc build() { box = new VBox(3) box.full_request(1) //print box box.save("") box.intercept(1) box2 = new HBox(3) box2.intercept(1) // box2.adjuster(200) //print box2 box3 = new VBox(3) box3.save("") box3.intercept(1) g = new Graph(0) xpanel("", 1) g.menu_tool("States", "st_tool", "tool(0)") g.menu_tool("Transitions", "trans_tool", "tool(1)") g.menu_tool("Properties", "properties_tool", "tool(2)") xpanel() g.view(2) g.xaxis(3) graph_menu_remove_most(g) box3.intercept(0) box3.map("",0,0,400,200) deck = new Deck() deck.intercept(1) xpanel("") xlabel("...............no gate selected....................................") xpanel() deck.intercept(0) deck.flip_to(0) deck.map box2.intercept(0) box.adjuster(200) box2.map() rgui = new KSTransGUI(this) box.intercept(0) box.dismiss_action("g_dismiss()") } proc gatepanel() { deck.flip_to(-1) deck.remove(0) deck.intercept(1) xpanel("") if (selgate == nil || tooltype_ != 2) { xlabel("no gate selected") }else{ set_disp() xvarlabel(selgate.gatestr) xvarlabel(selgate.displaystr) power = selgate.power xpvalue("Power", &power, 1, "change_power()") if (seltrans != nil) { xlabel("Fractional Conductance") sprint(tstr, "%s fraction", seltrans.src.name) frac0_ = seltrans.src.kss.frac xpvalue(tstr, &frac0_, 1, "set_frac(0)") xslider(&frac0_, 0, 1, "set_frac(0)") if (seltrans.src != seltrans.target) { sprint(tstr, "%s fraction", seltrans.target.name) frac1_ = seltrans.target.kss.frac xpvalue(tstr, &frac1_, 1, "set_frac(1)") xslider(&frac1_, 0, 1, "set_frac(1)") } } } xpanel() deck.intercept(0) deck.flip_to(0) } proc gui() { if (object_id(g) == 0) { build() } if (g_map_ == 0) { g_map_ = 1 sprint(tstr, "%s for %s", this, cb) box.map(tstr) } pl() } proc g_dismiss() { g_map_ = 0 box.unmap() } proc tool() { blacken() tooltype_ = $1 if ($1 == 0) { hint = "Drag new state from left. Drag off canvas to delete" }else if ($1 == 1){ hint = "New transition pair: select source and drag to target" }else { hint = "Select hh state or ks transition to change properties" } pl() rgui.set_cbt(nil) selgate = nil seltrans = nil selstate = nil gatepanel() } proc blacken() {local i, j for j=0, gates.count-1 { gate = gates.object(j) for i=0, gate.states.count-1 { gate.states.object(i).color = 1 } for i=0, gate.transitions.count-1 { gate.transitions.object(i).color = 1 } } } proc st_tool() { if ($1 == 2) { cb.set_alias(0) x0 = 1e9 y0 = 1e9 new_state($2, $3) if (selstate == nil) { select_state($2,$3) if (selstate != nil) { x0 = int(($2 + 5)/10)*10 y0 = int(($3 + 5)/10)*10 } } if (selstate != nil) { selstate.color = 2 } } if (selstate == nil) { return } selstate.x = int(($2 + 5)/10)*10 selstate.y = int(($3 + 5)/10)*10 if (x0 != selstate.x || y0 != selstate.y) { x0 = 1e9 y0 = 1e9 } if ($1 == 3) { if (x0 == selstate.x && y0 == selstate.y) { change_stname() } selstate.color = 1 if (!on_canvas($2,$3)) { removestate(selstate) cb.changegate() } selstate = nil pl() } pl() } proc trans_tool() { if ($1 == 2) { cb.set_alias(0) select_state($2,$3) srcstate = nil if (selstate != nil) { srcstate = selstate srcstate.color = 2 } } if (srcstate == nil) { return } select_state($2,$3) if (selstate == srcstate) { selstate = nil } if (selstate != nil) { selstate.color = 2 } pl() g.beginline(2,3*(selstate != nil)) g.line(srcstate.x, srcstate.y) g.line($2, $3) g.flush() if (selstate != nil) { selstate.color = 1 } if ($1 == 3) { srcstate.color = 1 if (selstate != nil) { handle_trans(srcstate, selstate) cb.changegate() } selstate = nil srcstate = nil pl() } } proc properties_tool() { if ($1 == 3) { if (in_properties_tool_) { return } in_properties_tool_ = 1 select_state($2, $3) if (selstate != nil) { st_dialog() }else { select_trans($2, $3) if ( seltrans != nil) { trans_dialog() } } in_properties_tool_ = 0 } } proc st_dialog() { if (selgate.states.count != 1) { return } blacken() selstate.color = 2 seltrans = selgate.transitions.object(0) gatepanel() pl() rgui.set_cbt(seltrans) } proc set_frac() { if ($1 == 0) { if (frac0_ < 0) { frac0_ = 0 } if (frac0_ > 1) { frac0_ = 1 } seltrans.src.setfrac(frac0_) }else{ if (frac1_ < 0) { frac1_ = 0 } if (frac1_ > 1) { frac1_ = 1 } seltrans.target.setfrac(frac1_) } set_disp() rgui.ch_dorun() } proc trans_dialog() {local i, j blacken() gatepanel() seltrans.color = 2 seltrans.src.color = 2 seltrans.target.color = 2 pl() rgui.set_cbt(seltrans) /* if (0) { for i = 0, transitions.count-1 { tobj = transitions.object(i) for j = 0, 1 { if (i != $1 || j != $2) { rgui.bglist.append(tobj.r[j].vr) } } } } */ rgui.pl() } func select_trans() {local i, j, d, dmin, imin, xav, yav dmin = 1e9 for j=0, gates.count-1 { gate = gates.object(j) for i=0, gate.transitions.count - 1 { tobj = gate.transitions.object(i) xav = (tobj.src.x + tobj.target.x)/2 yav = (tobj.src.y + tobj.target.y)/2 d = math.d2line_seg($1, $2, tobj.src.x, tobj.src.y, xav, yav) if (d < dmin) { dmin = d imin = i seltrans = tobj } d = math.d2line_seg($1, $2, xav, yav, tobj.target.x, tobj.target.y) if (d < dmin) { dmin = d imin = i seltrans = tobj } } } if (dmin < 10) { selgate = seltrans.src.gate return imin } seltrans = nil selgate = nil return -1 } proc handle_trans() {local i, j // if exists, remove gate = $o1.gate for (i= gate.transitions.count - 1; i >= 0; i -= 1) { tobj = gate.transitions.object(i) if (tobj.src == $o1 && tobj.target == $o2) { removetrans(tobj) return }else if (tobj.target == $o1 && tobj.src == $o2) { removetrans(tobj) return } } // otherwise add it newtrans($o1, $o2) } proc set_disp() { selgate.set_gatestr() selgate.set_displaystr() cb.set_gatestr() cb.change(selgate) } proc change_stname() {local is tstr = selstate.name while (string_dialog("Change state name", tstr)) { if (valid_name_syntax(tstr, 1)) { if (!cb.is_sname(tstr)) { selstate.setname(tstr) set_disp() }else{ if (strcmp(tstr, selstate.name) != 0) { sprint(tstr, "State name %s already in use", tstr) continue_dialog(tstr) continue } } break } } } func new_state() { if (near(1, $1,$2, .05, .8)) { tstr = "O" cb.new_sname(tstr) newstate(tstr, 1, $1, $2) }else if (near(1, $1,$2, .05, .7)) { tstr = "C" cb.new_sname(tstr) newstate(tstr, 0, $1, $2) }else{ return 0 } selstate = state cb.changegate() return 1 } func near() { local x, y, h, x1, y1 iview = g.view_info() x = g.view_info(iview, 13, $2) y = g.view_info(iview, 14, $3) h = g.view_info(iview, 15)/2 if ($1 == 0) { x1 = g.view_info(iview, 13, $4) y1 = g.view_info(iview, 14, $5) }else{ x1 = g.view_info(iview, 3)*$4 y1 = g.view_info(iview, 4)*(1-$5) } if (abs(x1 - x) < h) { if (abs(y1 - y) < h) { return 1 } } return 0 } proc select_state() {local x, y, h, i, j for j = 0, gates.count-1 { gate = gates.object(j) for i=0, gate.states.count - 1 { tobj = gate.states.object(i) if (near(0, $1, $2, tobj.x, tobj.y)) { selstate = tobj selgate = selstate.gate return } } } selstate = nil } func on_canvas() { if (math.inside(g.view_info(iview, 11, $1), g.view_info(iview, 12, $2),\ 0,0,1,1)) { return 1 } return 0 } proc pl() {local i, j, color g.erase_all g.label(.1,.9,hint, 2, 1,0,0,1) if (tooltype_ == 0) {plparts()} for j=0, gates.count-1 { gate = gates.object(j) for i=0, gate.states.count-1 { gate.states.object(i).pl(g) } for i=0, gate.transitions.count-1 { gate.transitions.object(i).pl(g) } } } proc plparts() { g.label(.05, .8, "O",2,1,.5,.5,1) g.label(.05, .7, "C",2,1,.5,.5,1) } proc remove() { begin_restore(1) } proc newstate() { local i state = new ChannelBuildKSState($s1, $2, $3, $4) trans = new ChannelBuildKSTrans(state, state, cb) gate = new ChannelBuildKSGate(cb) state.gate = gate gates.append(gate) gate.states.append(state) gate.transitions.append(trans) gate.power = 1 restruct() } proc removestate() {local i state = $o1 gate = state.gate gate.states.remove(gate.states.index(state)) for (i=gate.transitions.count-1; i >= 0; i -= 1) { trans = gate.transitions.object(i) if (trans.src == state || trans.target == state) { gate.transitions.remove(i) } } tobj = gate // because call by ref regate(tobj) restruct() } proc newtrans() {local i trans = new ChannelBuildKSTrans($o1, $o2, cb) gate = $o1.gate tobj = $o2.gate // the gate that may be removed if (tobj != gate) { // merge gates but not hh-transitions // remove hh transitions if any if(gate.states.count == 1) { gate.transitions.remove_all } if (tobj.states.count == 1) { tobj.transitions.remove_all } // merge what is left for i=0, tobj.states.count-1 { state = tobj.states.object(i) gate.states.append(state) state.gate = gate } for i=0, tobj.transitions.count - 1 { gate.transitions.append(tobj.transitions.object(i)) } tobj.states.remove_all tobj.transitions.remove_all gates.remove(gates.index(tobj)) } gate.transitions.append(trans) restruct() } proc removetrans() { // not for hh state gates trans = $o1 gate = $o1.src.gate gate.transitions.remove(gate.transitions.index(trans)) tobj = gate // because call by ref regate(tobj) restruct() } proc regate() {local gindex, i, j, min, max // now how many gates are there. The single hh states do not // have transitions gindex = gates.index($o1) // remove and add back new gates here gates.remove(gindex) // first do the singles // count the transitions to the states for i=0, $o1.states.count - 1 { $o1.states.object(i).i = 0 } for i=0, $o1.transitions.count - 1 { $o1.transitions.object(i).src.i += 1 $o1.transitions.object(i).target.i += 1 } // all with count of 0 are new hh states for (i=$o1.states.count - 1; i >= 0; i -= 1) { state = $o1.states.object(i) if (state.i > 0) { continue } gate = new ChannelBuildKSGate(cb) $o1.states.remove(i) gates.insrt(gindex, gate) state.gate = gate gate.states.append(state) trans = new ChannelBuildKSTrans(state, state, cb) gate.transitions.append(trans) gate.power = $o1.power } // any gates that remain have multiple states // mark states in same gate with the same number for i=0, $o1.states.count - 1 { $o1.states.object(i).i = i } // now mark states with the lesser state of the transition for i=0, $o1.transitions.count -1 { trans = $o1.transitions.object(i) if (trans.src.i < trans.target.i) { max = trans.target.i min = trans.src.i }else{ max = trans.src.i min = trans.target.i } // change all max to min for j=0, $o1.states.count - 1 { state = $o1.states.object(j) if (state.i == max) { state.i = min } } } // now all states with the same i are in a new gate // iterate til empty while ($o1.states.count > 0) { min = $o1.states.object(0).i gate = new ChannelBuildKSGate(cb) gates.insrt(gindex, gate) for (i=$o1.states.count-1; i >= 0; i -= 1) { state = $o1.states.object(i) if (state.i == min) { gate.states.append(state) state.gate = gate $o1.states.remove(i) } } } // now put transitions in right gates for i=0, $o1.transitions.count - 1 { trans = $o1.transitions.object(i) trans.src.gate.transitions.append(trans) } $o1.transitions.remove_all } proc cdebug() {local i, j return for i=0, gates.count - 1 { gate = gates.object(i) print gate for j=0, gate.states.count-1 { state = gate.states.object(j) printf(" %s %s\n", state, state.gate) } for j=0, gate.transitions.count-1 { trans = gate.transitions.object(j) printf(" %s\n", trans) state = trans.src printf(" %s %s\n", state, state.gate) state = trans.target printf(" %s %s\n", state, state.gate) } } print "" } proc restruct() { cb.cb2ks() } proc dispsel() { gui() if ($1 >= 0 && $1 < gates.count) { g.exec_menu("Properties") tool(2) selgate = gates.object($1) if (selgate.states.count == 1) { selstate = selgate.states.object(0) st_dialog() }else{ seltrans = selgate.transitions.object(0) trans_dialog() } }else{ g.exec_menu("States") tool(0) } } proc change_power() { local igate selgate.ksg.power(power) selgate.power = power selgate.set_gatestr() cb.set_gatestr() rgui.ch_dorun() } endtemplate ChannelBuildGateGUI neuron-7.5/share/lib/hoc/chanbild/kschanbg.hoc000077500000000000000000000067761323325274500213640ustar00rootroot00000000000000{load_file("nrngui.hoc")} begintemplate VKSChanBG public K, vhalf, z, gam, tau0, adjust public f, inv, Asol, ksol, form, parms, restore, save_data, type public kstset, parm2vec, vec2parm, chk, pname objref kst, nil proc init() { type_ = $1 parms(1, -20, 4, .5 , .1) } proc kstset() { if (type_ == 5 && $o1.ftype(0) != 5) { parms(1, -20, 4, .5 , .1) $o1.set_f(0, 5, new Vector(5)) $o1.set_f(1, 6, $o1.parm(0)) parm2vec($o1.parm(0)) } } proc chk() { if ($o3.x[0] < 1e-9) { $o3.x[0] = 1e-9 } if ($o3.x[3] < 0) { $o3.x[3] = 0 } if ($o3.x[3] > 1) { $o3.x[3] = 1 } if ($o3.x[4] < 0) { $o3.x[4] = 0 } } proc pname() { if ($5 == 1) { if ($3 == 0) { $s4 = "K (/ms)" }else if ($3 == 1) { $s4 = "vhalf (mV)" }else if ($3 == 2) { $s4 = "z" }else if ($3 == 3) { $s4 = "gam" }else if ($3 == 4) { $s4 = "tau0 (ms)" } }else{ if ($3 == 0) { $s4 = "K" }else if ($3 == 1) { $s4 = "vhalf" }else if ($3 == 2) { $s4 = "z" }else if ($3 == 3) { $s4 = "gam" }else if ($3 == 4) { $s4 = "tau0" } } } proc parm2vec() { $o1.resize(0) $o1.append(K, vhalf, z, gam, tau0) } proc vec2parm() { K = $o1.x[0] vhalf = $o1.x[1] z = $o1.x[2] gam = $o1.x[3] tau0 = $o1.x[4] } func type() { return type_ } proc parms() { K = $1 vhalf = $2 z = $3 gam = $4 tau0 = $5 } proc save_data() { if (type() == 5) { sprint($s2, "%g %g %g %g %g", K, vhalf, z, gam , tau0) $o1.save($s2) } } proc restore() { if (type() == 5) { parms(fscan(), fscan(), fscan(), fscan(), fscan()) } } proc form() { if ($2 == 1) { if (type_ == 5) { sprint($s1, "KSChanBGinf") }else{ sprint($s1, "KSChanBGtau") } }else{ sprint($s1, "KSChanBG") } } func f() { return 0 } func inv() { if (type_ == 5) { return invz($1) }else{ return invgam($1 - tau0) } } func invz() {local x, fac if ($1 >= 1) { x = 700 }else if ($1 <= 0){ x = -700 }else{ x = log(1/$1 - 1) } if (z == 0) { return 1e9 } fac = -(273+celsius)/11.605 x = vhalf + x/(fac*z) return x } func invgam() { return 1e5 } func fgam() { kst.parm(1).x[3] = $1 return kst.f(1, $2) } func gamsearch() {local i, x, g, g0, g1, f, f0, f1 // search gam so that abs(f($1)- $2) is minimum g0 = 0 g1 = 1 f0 = fgam(g0, $1) - $2 f1 = fgam(g1, $1) - $2 if (f0*f1 < 0) { // then there must be a solution // binary seems to work more robustly than newton chord search for i=1, 10 { //x = -f0/(f1-f0) // between 0 and 1 // try to avoid staying on one side of the ordinate //if (x < .1) {x += .1}else if (x > .9) { x -= .1 } x = .5 g = (g1-g0)*x + g0 f = fgam(g, $1) - $2 if (abs(f) < 1e-4) { break } if (f0*f > 0) { // same sign f0 = f g0 = g }else{ f1 = f g1 = g } } return g }else{ // no solution and return best if (abs(f0) == abs(f1)) { return (g0+g1)/2 }else if (abs(f0) < abs(f1)) { return g0 }else{ return g1 } } } func ksol() { if ($1 > $2) { return .5/($1-$2) }else{ return 1e6 } } func zsol() {local x x = $1 - $o3.x[1] if (abs(x) < 1e-6) { x = 1e-6 } if ($2 < 0) { $2 = 1e-6 } else if ($2 > 1) {$2 = 1 - 1e-6} x = log(1/$2 - 1)/x return -(273+celsius)/11.605*x } proc adjust() {local a // adjust_, parm, x, y, kst a = $1 - 3 if (a == 0) { // K $o2.x[a] = ksol($4, $o2.x[4]) }else if (a == 1) { // vhalf $o2.x[a] = $3 }else if (a == 2) { // z $o2.x[2] = zsol($3,$4,$o2) }else if (a == 3) { // gam kst = $o5 $o2.x[3] = gamsearch($3,$4) kst = nil }else if (a == 4) { // tau0 $o2.x[a] = $4 } } endtemplate VKSChanBG neuron-7.5/share/lib/hoc/chanbild/ksgate.hoc000077500000000000000000000144701323325274500210500ustar00rootroot00000000000000begintemplate ChannelBuildKSGate public transitions, states, power, pr, append_displist, save_data, i public set_gatestr, set_displaystr, gatestr, displaystr, remove, cb public begin_restore, set_state, set_trans, end_restore, ksg, clone public copygate, destroy, kshoc objref transitions, states, ksg objref tobj, tobj1, cb, this, nil strdef displaystr, gatestr, tstr proc init() { i = -1 cb = $o1 transitions = new List() states = new List() power = 1 } proc destroy() { objref transitions, states, ksg objref tobj, tobj1, cb } proc kshoc() {local i if (states.count == 0) { return } $o1.printf("// %s\n", displaystr) if (states.count == 1) { $o1.printf("{\n ksstates.append(ks.add_hhstate(\"%s\"))\n ksgate = ksstates.object(0).gate\n", states.object(0).kss.name) $o1.printf(" ksgate.power(%g)\n", ksg.power) $o1.printf(" kstransitions.append(ks.trans(ksstates.object(0), ksstates.object(0)))\n}\n") }else{ $o1.printf("{\n objref ksgate\n") for i=0, states.count-1 { $o1.printf(" ksstates.append(ks.add_ksstate(ksgate, \"%s\"))\n", states.object(i).kss.name) if (i == 0) { $o1.printf(" ksgate = ksstates.object(0).gate\n") } states.object(i).index = i $o1.printf(" ksstates.object(%d).frac(%g)\n", i, states.object(i).kss.frac) } if (ksg.power != 1) { $o1.printf(" ksgate.power(%g)\n", ksg.power) } $o1.printf("}\n{\n") for i=0, transitions.count-1 { tobj = transitions.object(i) $o1.printf(" kstransitions.append(ks.add_transition(ksstates.object(%d), ksstates.object(%d)))\n", tobj.src.index, tobj.target.index) } $o1.printf("}\n") } for i=0, transitions.count-1 { transitions.object(i).kshoc($o1, i) } $o1.printf("{ ksstates.remove_all kstransitions.remove_all }\n") } proc remove() {local i for i=0, transitions.count-1 { transitions.object(i).src = nil transitions.object(i).target = nil } for i=0, states.count-1 { states.object(i).gate = nil } transitions.remove_all states.remove_all objref tobj, cb, ksg } proc clone() {local i, j tobj1 = new ChannelBuildKSGate($o1) $o1.gatelist.append(tobj1) tobj1.begin_restore(power) for i=0, states.count - 1 { tobj = states.object(i) tobj.i = i tobj1.set_state(tobj.name, tobj.frac, tobj.x, tobj.y) } for i=0, transitions.count-1 { tobj = transitions.object(i) tobj1.set_trans(tobj.src.i, tobj.target.i, tobj.kst.type) tobj = transitions.object(i) tobj1.transitions.object(i).settype(tobj.kst.type, tobj.kst.ligand) tobj1.transitions.object(i).set_f(0, tobj.kst.ftype(0), tobj.kst.parm(0).c) tobj1.transitions.object(i).set_f(1, tobj.kst.ftype(1), tobj.kst.parm(1).c) } tobj1.end_restore() objref tobj1 } proc copygate() {local i, j, k, vmin, vmax // $o1 is the source KSChan, $o2 is the source KSGate begin_restore($o2.power) for i=0, $o2.nstate-1 { j = i + $o2.sindex tobj = $o1.state(j) tstr = tobj.name cb.new_sname(tstr) set_state(tstr, tobj.frac, j*50, 100) // if the source state index is i then // the new states index is i - $o2.sindex } for i=0, $o1.ntrans - 1 { tobj1 = $o1.trans(i) if (tobj1.src.gate == $o2) { set_trans(tobj1.src.index - $o2.sindex, \ tobj1.target.index - $o2.sindex, tobj1.type) tobj = transitions.object(transitions.count-1) tobj.settype(tobj1.type, tobj1.ligand) for k=0, 1 { vmin = vmax = 0 if (tobj1.ftype(k) == 7) { tobj.set_f(k, tobj1.ftype(k), tobj1.parm(k,&vmin,&vmax).c, vmin, vmax) }else{ tobj.set_f(k, tobj1.ftype(k), tobj1.parm(k,&vmin,&vmax).c) } } } } end_restore() } proc pr() {local i if (states.count == 1) { tobj = transitions.object(0).kst printf(" %-46s (%s)\n", displaystr, tobj) cb.ksth.pr(tobj) return } printf(" %s\n", displaystr) printf(" states: %s", states.object(0).kss.name) for i=1, states.count-1 { printf(", %s", states.object(i).kss.name) } printf("\n") for i=0, transitions.count-1 { tobj = transitions.object(i) tobj.traneqstr(tstr) // sprint(tstr, " %s <-> %s", tobj.kst.src.name, tobj.kst.target.name) printf(" %-50s (%s)\n", tstr, tobj.kst) cb.ksth.pr(tobj.kst) } } proc append_displist() {local i $o1.append(this) } proc set_gatestr() { set_basic(tstr) if (power != 1) { sprint(tstr, "%s^%d", tstr, power) } gatestr = tstr } proc set_basic() {local i, enclose enclose = 0 $s1 = "" for i = 0, states.count-1 { tobj = states.object(i) if (tobj.frac == 1) { if (strcmp($s1, "") == 0) { sprint($s1, "%s", tobj.name) }else{ enclose = 1 sprint($s1, "%s + %s", $s1, tobj.name) } }else if (tobj.frac > 0) { if (strcmp($s1, "") == 0) { sprint($s1, "%.4g*%s", tobj.frac, tobj.name) enclose = 1 }else{ enclose = 1 sprint($s1, "%s + %.4g*%s", $s1, tobj.frac, tobj.name) } } } if (strcmp($s1, "") == 0) { $s1 = "0" } if (enclose) { sprint($s1, "(%s)", $s1) } } proc set_displaystr() { if (states.count == 1) { hh_displaystr() return } set_basic(tstr) sprint(tstr, "%s: %d state, %d transitions", tstr, states.count, transitions.count) displaystr = tstr } proc hh_displaystr() { tobj = states.object(0) if (transitions.object(0).type == 1) { sprint(displaystr, "%s' = (%sinf - %s)/%stau",\ tobj.name, tobj.name, tobj.name, tobj.name) }else{ sprint(displaystr, "%s' = a%s*(1 - %s) - b%s*%s",\ tobj.name, tobj.name, tobj.name, tobj.name, tobj.name) } } proc save_data() {local i $o1.save("tobj = new ChannelBuildKSGate(this)") $o1.save("{gatelist.append(tobj)}") sprint(tstr, "{tobj.begin_restore(%d)}", power) $o1.save(tstr) for i=0, states.count-1 { tobj = states.object(i) tobj.index = i sprint(tstr, "{tobj.set_state(\"%s\", %g, %g, %g)}", tobj.name, tobj.frac, tobj.x, tobj.y) $o1.save(tstr) } for i=0, transitions.count-1 { tobj = transitions.object(i) sprint(tstr, "{tobj.set_trans(%d, %d, %d)}", \ tobj.src.index, tobj.target.index, tobj.type) $o1.save(tstr) sprint(tstr, "tobj.transitions.object(%d)", i) cb.ksth.kst = transitions.object(i).kst cb.ksth.save_data($o1, tstr) } $o1.save("{tobj.end_restore()}") } proc begin_restore() {local i power = $1 } proc end_restore() { // set_disp() } proc set_state() { tobj = new ChannelBuildKSState($s1, $2, $3, $4) states.append(tobj) tobj.gate = this } proc set_trans() { tobj = new ChannelBuildKSTrans(states.object($1), states.object($2), cb) tobj.type = $3 transitions.append(tobj) } endtemplate ChannelBuildKSGate neuron-7.5/share/lib/hoc/chanbild/ksstate.hoc000077500000000000000000000006721323325274500212470ustar00rootroot00000000000000begintemplate ChannelBuildKSState public index, x, y, pl, color, gate, i, frac, name, kss, setfrac, setname, cb2ks objref gate, kss strdef name proc init() { i = -1 name = $s1 frac = $2 color = 1 index = -1 x = $3 y = $4 } proc pl() { $o1.label(x, y, name,1,1,.5,.5,color) } proc setfrac() { frac = $1 kss.frac($1) } proc setname() { name = $s1 kss.name($s1) } proc cb2ks() { kss.name(name) } endtemplate ChannelBuildKSState neuron-7.5/share/lib/hoc/chanbild/kstgui.hoc000077500000000000000000000313511323325274500210750ustar00rootroot00000000000000begintemplate KSTransHelper public pr, save_data, form, aform, coef, pname, fstyle, setdisp public kst, chk objref kst, tobj, fstyle[1] strdef tstr, tstr1, tstr2, tstr3 proc init(){local i objref fstyle[8] fstyle[1] = new VConstRate() fstyle[2] = new VExpRate() fstyle[3] = new VLinoidRate() fstyle[4] = new VSigmoidRate() fstyle[5] = new VKSChanBG(5) fstyle[6] = new VKSChanBG(6) fstyle[7] = new VTableRate() } proc setdisp() { form($o1,$2,tstr) coef($o1,$2,$o1.type, tstr1) sprint($s3, " %s = %s", tstr1, tstr) } proc pr() {local i if ($o1.src == $o1.target) { tstr3 = "" }else{ tstr3 = " " } for i=0, 1 { form($o1, i, tstr) coef($o1, i, $o1.type, tstr1) sprint(tstr, " %s%s = %s", tstr3, tstr1, tstr) printf("%-55s (%s)\n", tstr, $o1.parm(i)) } } proc chk() { fstyle[$o1.ftype(0)].chk($o1.type, 0, $o1.parm(0)) fstyle[$o1.ftype(1)].chk($o1.type, 1, $o1.parm(1)) } proc pname() {//kst, dir, index, resultstr, flag if units in resultstr if ($o1.ftype(0) == 5) { fstyle[5].pname($o1, $2, $3, $s4, $5) return } if ($5 == 1) { if ($3 == 1) { $s4 = "k (/mV)" } if ($3 == 2) { $s4 = "d (mV)" } if ($3 == 0) { if ($o1.type >= 2) { if ($2 == 0) { if ($o1.stoichiometry == 1) { $s4 = "A (/ms-mM)" }else{ sprint($s4, "A (/ms-mM%d)", $o1.stoichiometry) } }else{ $s4 = "A (/ms)" } }else if ($o1.type == 0) { $s4 = "A (/ms)" }else if ($o1.type == 1) { if ($2 == 0) { $s4 = "A (1)" }else{ $s4 = "A (ms)" } } } }else{ if ($3 == 0) {$s4 = "A"} if ($3 == 1) {$s4 = "k"} if ($3 == 2) {$s4 = "d"} } } proc coef() {// kst, dir, type, resultstr if ($o1.src == $o1.target) { tstr2 = $o1.src.name }else{ sprint(tstr2, "%s%s", $o1.src.name, $o1.target.name) } if ($3 != 1) { if ($2 == 0) { sprint($s4, "a%s", tstr2) }else{ sprint($s4, "b%s", tstr2) } }else{ if ($2 == 0) { sprint($s4, "inf%s", tstr2) }else{ sprint($s4, "tau%s", tstr2) } } } proc save_data() { local i, n, k, vmin, vmax sprint(tstr, "{%s.settype(%d, \"%s\")}", $s2, kst.type(), kst.ligand()) $o1.save(tstr) if (kst.stoichiometry != 1) { sprint(tstr, "{%s.stoichiometry(%d)}", $s2, kst.stoichiometry) $o1.save(tstr) } vmin = vmax = 0 for k = 0, 1 { tobj = kst.parm(k, &vmin, &vmax) n = tobj.size if (kst.ftype(k) != 6) { sprint(tstr, "{tobj1 = new Vector(%d) for (i=0; i < %d; i += 1) tobj1.x[i] = fscan() }", n, n) $o1.save(tstr) for i=0, n-1 { sprint(tstr, "%g", tobj.x[i]) $o1.save(tstr) } } if (kst.ftype(k) == 7) { sprint(tstr, "{%s.set_f(%d, %d, tobj1, %g, %g)}", $s2, k, kst.ftype(k), vmin, vmax) }else{ sprint(tstr, "{%s.set_f(%d, %d, tobj1)}", $s2, k, kst.ftype(k)) } $o1.save(tstr) } } proc form() { // KSTrans, direction, strdef ... assume numeric style fstyle[$o1.ftype($2)].vec2parm($o1.parm($2)) fstyle[$o1.ftype($2)].form($s3, 0) } proc aform() { // KSTrans, direction, strdef ... assume algebraic style fstyle[$o1.ftype($2)].vec2parm($o1.parm($2)) fstyle[$o1.ftype($2)].form($s3, 1, "") } endtemplate KSTransHelper // Only one of these is necessary. Merely call set_kst to switch to a gui // for a different one // This is meant to be a part of a larger window so no window management // is implemented begintemplate KSTransGUI public cbt, kst, set_cbt, pl, ch_dorun external hoc_sf_, case, run, hoc_obj_ objref kst, ksth, gate, cbt, pbox, cb objref g, box, vvec, avec, bvec, deck, tobj, nil, tobj1, gbox, psel, fstyle strdef tstr, tstr1, tstr2 proc init() { charge = 0 dorun_ = 0 running_ = 0 disp_inf_ = 0 gate = $o1 cb = gate.cb ksth = cb.ksth vvec = new Vector(100) avec = vvec.c bvec = vvec.c build() set_cbt(nil) } proc build() {local i box = new HBox(3) box.save("") box.intercept(1) g = new Graph(0) gbox = new VBox(3) gbox.intercept(1) xpanel("", 1) g.menu_tool("Adjust ", "adjust") xcheckbox("Run", &dorun_, "ch_dorun()") g.menu_action("inf rescale", "scale(0)") g.menu_action("tau rescale", "scale(1)") xpanel() g.view(0, 1, 2, 3, 0, 0, 300, 200) gbox.intercept(0) g.size(-80, 60, 0, 1) gbox.map() pbox = new VBox(3) pbox.intercept(1) deck = new Deck() deck.intercept(1) xpanel("") xlabel("this is a test") xpanel() deck.intercept(0) deck.map pbox.intercept(0) pbox.map() box.intercept(0) box.map() } proc sel_adjust() { g.exec_menu("Crosshair") if (kst != nil) if ( disp_inf_ == kst.type) { g.exec_menu("Adjust ") } if (kst != nil) { ksth.coef(kst, 0, disp_inf_, tstr) avec.label(tstr) ksth.coef(kst, 1, disp_inf_, tstr) bvec.label(tstr) } } proc set_cbt() { cbt = $o1 if (cbt != nil) { kst = $o1.kst }else{ kst = nil } build_panel() sel_adjust() pl() } proc build_panel() { deck.remove(0) deck.intercept(1) xpanel("") if (kst == nil) { xlabel("no KSTrans selected") }else{ name(tstr) xlabel(tstr) xcheckbox("Display inf, tau", &disp_inf_, "sel_adjust() pl()") pmenu(0) pmenu(1) xlabel("") xmenu("EquationType", "eqnmenu()") } xpanel(1) deck.intercept(0) deck.flip_to(0) doNotify() } proc pmenu() {local vmin, vmax xlabel("") ksth.coef(kst, $1, kst.type, tstr) ksth.aform(kst, $1, tstr1) tobj = kst.parm($1) sprint(tstr, "%s = %s", tstr, tstr1) xlabel(tstr) if (kst.ftype($1) == 6) { return } if (kst.ftype($1) == 7) { vmin = vmax = 0 tobj = kst.parm($1, &vmin, &vmax) sprint(tstr, " %s from %g (mV) to %g (mV)", tobj, vmin, vmax) xlabel(tstr) xmenu(" Fill") sprint(tstr, "filltable(%d)", $1) xbutton("from Clipboard", tstr) xmenu() return } for i=0, tobj.size-1 { ksth.pname(kst, $1, i, tstr, 1) xpvalue(tstr, &tobj.x[i], 1, "chval()") } } proc chval() { cb.usetable(0) pl() } proc filltable() {localobj tobj if (object_id(hoc_obj_) == 0) { continue_dialog("Clipboard has no vector") return } cb.usetable(0) tobj = kst.parm($1) tobj.copy(hoc_obj_) kst.set_f($1, 7, tobj, hoc_obj_[1].x[0], hoc_obj_[1].x[hoc_obj_[1].size-1]) build_panel() pl() } proc name() { cbt.traneqstr($s1) if (kst.type == 1) { sprint($s1, "%s (inf, tau)", $s1) }else{ sprint($s1, "%s (a, b)", $s1) } sprint($s1, "%-22s (%s)", $s1, kst) } proc ksttypestr() { if (kst.type == 0) $s1 = "alpha,beta" if (kst.type == 1) $s1 = "inf,tau" if (kst.type >= 2) $s1 = kst.ligand } proc eqnmenu() {local i j = 0 ksttypestr(tstr) xmenu(tstr) xbutton("a,b", "change_kst_type(0)") xbutton("inf,tau", "change_kst_type(1)") if (kst.src != kst.target) { // then can be ligand gated xmenu("Ligand", "mkligandmenu()") } if (gate.cb.ks.ntrans > 1) { xmenu("Copy", "mkcopymenu()") } xmenu() for i=0, 1 { ksth.coef(kst, i, kst.type, tstr) if (kst.type == 0) { xmenu(tstr) if (i == 0) { for case(&j, 1,2,3,4,7) abitem(i, j) }else{ for case(&j, 1,2,3,4,7) abitem(i, j) } xmenu() }else if (kst.type == 1) { xmenu(tstr) if (i == 0) { for case(&j, 1, 4, 5, 7) abitem(i, j) }else if (kst.ftype(0) != 5) { for case(&j, 1, 2, 7) abitem(i, j) } xmenu() } } if (kst.type > 1) { xmenu("stoic coef") for i=1, 4 { sprint(tstr, "%d", i) sprint(tstr1, "stoichiometry(%d)", i) xbutton(tstr, tstr1) } xmenu() } } proc stoichiometry() { cbt.stoichiometry($1) set_cbt(cbt) gate.pl() } proc mkcopymenu() {local i tobj = gate.cb.ks for i = 0, tobj.ntrans-1 { tobj1 = tobj.trans(i) if (kst != tobj1) { sprint(tstr, "%s <-> %s", tobj1.src.name, tobj1.target.name) sprint(tstr1, "copytrans(%d)", i) xbutton(tstr, tstr1) } } } proc copytrans() {local i cb.usetable(0) gate.cb.set_alias() tobj = gate.cb.ks.trans($1) cbt.settype(tobj.type, tobj.ligand) for i=0, 1 { cbt.set_f(i, tobj.ftype(i), tobj.parm(i).c) } set_cbt(cbt) } proc abitem() { ksth.fstyle[$2].form(tstr, 1, "") sprint(tstr1, "change_eqn(%d, %d)", $1, $2) xbutton(tstr, tstr1) } proc mkligandmenu() {local i tobj = new MechanismType(0) for i=0, tobj.count-1 { tobj.select(i) tobj.selected(tstr) if (hoc_sf_.head(tstr, "_ion", tstr2) != -1) { sprint(tstr1, "%si", tstr2) sprint(tstr, "selion(\"%s\", 3)", tstr1) xbutton(tstr1, tstr) sprint(tstr1, "%so", tstr2) sprint(tstr, "selion(\"%s\", 2)", tstr1) xbutton(tstr1, tstr) } } xbutton("New Ligand", "newligand()") } proc newligand() {local i tstr = "ca 2" while (string_dialog("ionname charge --e.g. ca 2", tstr)) { if (sscanf(tstr, "%s %d", tstr2, &charge) == 2) { i = ion_register(tstr2, charge) if (i != -1) { sprint(tstr1, "%s_ion", tstr2) if (ion_charge(tstr1) != charge) { sprint(tstr, "Warning: %s already exists and the charge is %d", tstr1, ion_charge(tstr1)) continue_dialog(tstr) } return }else{ sprint(tstr2, "One of the names associated with \"%s\" is already in use", tstr2) continue_dialog(tstr2) } }else{ sprint(tstr2, "\"%s\" not in \"name integer\" format", tstr) continue_dialog(tstr2) } } } proc selion() { cbt.type = $2 cbt.ligand = $s1 kst.type($2, $s1) stoichiometry(kst.stoichiometry) } proc change_kst_type() { if ($1 == 0 && kst.ftype(0) == 5) { // a,b cant use bg functions ksth.fstyle[1].kstset(kst, 0) ksth.fstyle[1].kstset(kst, 1) } cb.set_alias(0) cbt.type = $1 kst.type($1) fconsist(kst.type, kst.ftype(0), kst.ftype(1)) cbt.src.gate.set_displaystr() cb.usetable(0) cb.change(cbt.src.gate) gate.pl() set_cbt(cbt) } proc fconsist() { if ($1 == 1) { if ($2 != 1 && $2 != 4 && $2 != 7) { cbt.set_f(0, 4, kst.parm(0)) } if ($3 != 1 && $3 != 2 && $3 != 7) { cbt.set_f(1, 2, kst.parm(1)) } }else if ($1 != 0) { cbt.set_f(0, 1, kst.parm(0)) cbt.set_f(1, 1, kst.parm(1)) } } proc change_eqn() { if ($2 != 5 && kst.ftype(1) == 6) { // parm(1) is same as parm(0) vector // so set to constant ksth.fstyle[1].kstset(kst, 1) } cb.usetable(0) gate.cb.set_alias(0) ksth.fstyle[$2].kstset(kst, $1) cbt.cbf[0].ks2cb() cbt.cbf[1].ks2cb() set_cbt(cbt) } proc pl() {local x, x1, x2 g.erase_all if (kst == nil) { return } ksth.chk(kst) x1 = g.size(1) x2 = g.size(2) vvec.indgen(x1, (x2 - x1)/100) if (disp_inf_) { kst.inftau(vvec, avec, bvec) }else{ kst.ab(vvec, avec, bvec) } avec.line(g, vvec, 1, 1) bvec.line(g, vvec, 2, 1) mark() ch_dorun() } proc scale() {local x0, x1, y0, y1 localobj tobj if ($1 == 0) { tobj = avec } else { tobj = bvec } y0 = tobj.min y1 = tobj.max if (y1 == 0) { y0 = 0 y1 = 1 }else if (y0 == y1) { y0 = 0 }else if (y0/(y1 - y0) < 1) { y0 = 0 } g.size(g.size(1), g.size(2), y0, y1) } proc ch_dorun() { if (dorun_) { dorun() } } proc dorun() { if (!running_) { running_ = 1 run() running_ = 0 } } proc mark() {local i, d, x if (disp_inf_ == kst.type) { for i=0, 1 { if (kst.ftype(i) == 7) { continue } tobj = kst.parm(i) if (tobj.size == 3) { d = tobj.x[2] } else { d = 0 } if (tobj.size == 5) { // Borg-Graham d = tobj.x[1] if (i == 1) { x = g.size(2) g.mark(0, tobj.x[4], "-", 10, i+1, 3) } } g.mark(d, kst.f(i, d), "s", 8, i+1, 1) } } } proc adjust() { if ($3 <= 0) { $3 = 1e-6 } if ($1 == 2) { adjust_ = 0 // check marks first for fsel=0, 1 { if (kst.ftype(fsel) == 7) { continue } psel = kst.parm(fsel) fstyle = ksth.fstyle[kst.ftype(fsel)] fstyle.vec2parm(psel) if (psel.size == 3) { d = psel.x[2] } else { d = 0 } if (psel.size == 5) { // Borg-Graham d = psel.x[1] if (fsel == 1) { if (ptdist($2,$3, 0, psel.x[4]) < 100) { adjust_ = 3+4 // tau0 break }else if (ptdist($2,$3, d, kst.f(fsel,d)) < 100) { adjust_ = 3+0 // K break } }else{ if (ptdist($2,$3, d, kst.f(fsel,d)) < 100) { adjust_ = 3+1 // vhalf break } } } if (ptdist($2,$3, d, kst.f(fsel,d)) < 100) { adjust_ = 1 break } } if (adjust_ == 0) for fsel=0, 1 { if (kst.ftype(fsel) == 7) { continue } psel = kst.parm(fsel) fstyle = ksth.fstyle[kst.ftype(fsel)] fstyle.vec2parm(psel) if (psel.size == 3) { d = psel.x[2] } else { d = 0 } if (psel.size == 5) { // Borg-Graham d = psel.x[1] } if (ptdist($2,$3, $2, kst.f(fsel,$2)) < 100 \ || ptdist($2,$3,fstyle.inv($3),$3) < 100) { if (psel.size == 5) { if (fsel == 0) { adjust_ = 3+2 // Borg-Graham z }else{ adjust_ = 3+3 // Borg-Graham gam } }else{ adjust_ = 2 } break } } if (adjust_) { cb.usetable(0) } } if (adjust_ == 1) { if (psel.size == 3) { psel.x[2] = $2 } psel.x[0] = fstyle.Asol($2,$3) }else if (adjust_ == 2) { if (psel.size == 3) { psel.x[1] = fstyle.ksol($2, $3) } }else if (adjust_ > 2) { // Borg-Graham fstyle.adjust(adjust_, psel, $2, $3, kst) } if (adjust_ || $1 == 3) { pl() } } func ptdist() {local i, x1, y1, x2, y2 i = g.view_info() x1 = g.view_info(i, 13, $1) y1 = g.view_info(i, 14, $2) x2 = g.view_info(i, 13, $3) y2 = g.view_info(i, 14, $4) return (x1 - x2)^2 + (y1 - y2)^2 } endtemplate KSTransGUI neuron-7.5/share/lib/hoc/chanbild/kstrans.hoc000077500000000000000000000104271323325274500212550ustar00rootroot00000000000000begintemplate ChannelBuildF public kst, dir, cb, displaystr, setdisp, dispsel, type, vec, ks2cb public set_f, vmin, vmax objref kst, cb, vec strdef displaystr proc init() { cb = $o1 dir = $2 type = 1 vec = new Vector(1) vmin = -100 vmax = 50 } proc setdisp() { cb.ksth.setdisp(kst, dir, displaystr) } proc dispsel() { } proc ks2cb() { type = kst.ftype(dir) if (type == 7) { vec = kst.parm(dir, &vmin, &vmax) }else{ vec = kst.parm(dir) } } endtemplate ChannelBuildF begintemplate ChannelBuildKSTrans public src, target, pl, color, kst, cbf, type, ligand, i, kst public set_f, settype, traneqstr, stoichiom, stoichiometry public cb2ks, kshoc objref src, target, kst, cbf[2] strdef ligand, liglab proc init() { stoichiom = 1 i = -1 color = 1 src = $o1 target = $o2 type = 0 cbf[0] = new ChannelBuildF($o3, 0) cbf[1] = new ChannelBuildF($o3, 1) } proc kshoc() {local i, j, vmin, vmax localobj tobj $o1.printf("{\n tobj = kstransitions.object(%d)\n", $2) if (kst.type >= 2) { $o1.printf(" tobj.type(%d, \"%s\")\n", kst.type, kst.ligand) if (kst.stoichiometry != 1) { $o1.printf(" tobj.stoichiometry(%d)\n", kst.stoichiometry) } }else{ $o1.printf(" tobj.type(%d)\n", kst.type) } for i=0, 1 { if (kst.ftype(i) == 7) { // the compound statement may grow too large vmin = vmax = 0 tobj = kst.parm(i, &vmin, &vmax) $o1.printf(" }\n tobj.set_f(%d, %d, ksvec.c.resize(%d), %g, %g)\n", i, kst.ftype(i), tobj.size, vmin, vmax) $o1.printf(" for i=0, %d {tobj.parm(%d).x[i] = fscan()}", tobj.size-1, i) for j=0, tobj.size-1 { if (j%10 == 0) { $o1.printf("\n") } $o1.printf(" %g", tobj.x[j]) } $o1.printf("\n {") }else{ $o1.printf(" tobj.set_f(%d, %d, ksvec.c.append(", i, kst.ftype(i)) for j=0, kst.parm(i).size-1 { if (j > 0) { $o1.printf(", ") } $o1.printf("%g", kst.parm(i).x[j]) } $o1.printf("))\n") } } $o1.printf("}\n") } proc traneqstr() { if (kst.type < 2) { sprint($s1, "%s <-> %s", kst.src.name, kst.target.name) }else{ if (kst.stoichiometry == 1) { sprint($s1, "%s + %s <-> %s", kst.src.name, kst.ligand, kst.target.name) }else{ sprint($s1, "%s + %d%s <-> %s", kst.src.name, kst.stoichiometry, kst.ligand, kst.target.name) } } } proc cb2ks() { local i kst.type(type, ligand) for i=0, 1 { cbf[i].kst = kst kst.set_f(cbf[i].dir, cbf[i].type, cbf[i].vec, cbf[i].vmin, cbf[i].vmax) stoichiometry(stoichiom) } } proc settype() { type = $1 ligand=$s2 if (object_id(kst)) { kst.type($1, $s2) } } proc stoichiometry() { stoichiom = $1 if ($1 != 1) { sprint(liglab, "%d%s", stoichiom, ligand) }else{ liglab = ligand } if (object_id(kst)) { kst.stoichiometry(stoichiom) } } proc set_f() { if (object_id(kst)) { if (numarg() > 3) { kst.set_f($1, $2, $o3, $4, $5) }else{ kst.set_f($1, $2, $o3) } } cbf[$1].type = $2 cbf[$1].vec = $o3 if (numarg() > 3) { cbf[$1].vmin = $4 cbf[$1].vmax = $5 } } proc pl() {local i, x1, y1, x2, y2, dx, dy, pdx, pdy, pf, th, len if (src == target) { return } i = $o1.view_info() if (i < 0) {i = 0} pdx = $o1.view_info(i, 9) pdy = $o1.view_info(i, 10) pf = $o1.view_info(i, 15) x1 = src.x y1 = src.y x2 = target.x y2 = target.y dx = x2 - x1 dy = y2 - y1 len = sqrt(dx^2 + dy^2) th = atan2(dy, dx) dx = 2*pdx*pf*cos(th) dy = 2*pdy*pf*sin(th) // only shorten if long enough th = sqrt(dx^2 + dy^2) if (len < 4*th) { dx *= len/4/th dy *= len/4/th } x1 = src.x + dx y1 = src.y + dy x2 = target.x - dx y2 = target.y - dy $o1.beginline(color,1) $o1.line(x1, y1) $o1.line(x2, y2) $o1.flush // source2target a arrowhead pdx = (cos(PI/6)*dx + sin(PI/6)*dy)/2 pdy = (cos(PI/6)*dy - sin(PI/6)*dx)/2 if (type < 2) { $o1.label(x2-dx/4-pdx, y2-dy/4-pdy, "v",1,1,.5,0,color) }else{ $o1.label(x2-dx/4-pdx, y2-dy/4-pdy, liglab,1,1,.5,0,color) } $o1.beginline(color,1) $o1.line(x2-pdx,y2-pdy) $o1.line(x2, y2) pdx = (cos(PI/6)*dx - sin(PI/6)*dy)/2 pdy = (cos(PI/6)*dy + sin(PI/6)*dx)/2 $o1.line(x2-pdx, y2-pdy) $o1.flush // target2source b arrowhead $o1.beginline(color,1) pdx = (cos(PI/6)*dx + sin(PI/6)*dy)/2 pdy = (cos(PI/6)*dy - sin(PI/6)*dx)/2 $o1.line(x1+pdx,y1+pdy) $o1.line(x1, y1) pdx = (cos(PI/6)*dx - sin(PI/6)*dy)/2 pdy = (cos(PI/6)*dy + sin(PI/6)*dx)/2 $o1.line(x1+pdx, y1+pdy) $o1.flush } endtemplate ChannelBuildKSTrans neuron-7.5/share/lib/hoc/chanbild/linoid.hoc000077500000000000000000000033511323325274500210440ustar00rootroot00000000000000{load_file("nrngui.hoc")} begintemplate VLinoidRate public A, k, d, f, inv, Asol, ksol, form, parms, save_data, restore, type public kstset, parm2vec, vec2parm, chk proc init() { parms(.5, .1, -40) } proc kstset() { parms(.5, .1, -40) $o1.set_f($2, type(), new Vector(3)) parm2vec($o1.parm($2)) } proc chk() { if ($o3.x[0] < 0) { $o3.x[0] = 0 } } proc parm2vec() { $o1.resize(0) $o1.append(A, k, d) } proc vec2parm() { A = $o1.x[0] k = $o1.x[1] d = $o1.x[2] } func type() { return 3 } proc parms() { A = $1 k = $2 d=$3 } proc save_data() { sprint($s2, "%g %g %g", A, k, d) $o1.save($s2) } proc restore() { parms(fscan(), fscan(), fscan()) } proc form() { if ($2 == 1) { sprint($s1, "A%s*x/(1 - exp(-x)) where x = k%s*(v - d%s)", $s3, $s3, $s3) }else{ if (d < 0) {$s1 = "+"} else {$s1 = "-"} sprint($s1, "%.4g*x/(1 - exp(-x)) where x = %.4g*(v %s %.4g)", A, k, $s1, abs(d)) // sprint($s1, "%.4g*(v - %.4d)/(1 - exp(%.4g*(v - %.4g)))", A*k, d, -k, d) } } func Exp() { if ($1 > 100) { return exp(100) } return exp($1) } func f() {local x if (abs(k) < 1e-6) { k = 1e-6*(2*(k < 0)-1) } x = k*($1 - d) return A*linoid(x) } func inv() { local x x = sol($1/A) return x/k + d } func Asol() { return $2 } func ksol() {local x x = sol($2/A) if (abs($1 - d) < 1e-6) { x = 1e6 }else{ x /= ($1 - d) } return x } func linoid() { if (abs($1) < 1e-4) { return 1 + $1/2 } return $1/(1 - Exp(-$1)) } func sol() {local x, dx, i, y, y2, yp // find x so that $1 = f(x) x = 1 i = 0 while (1) { i += 1 y = linoid(x) - $1 y2 = linoid(x + .001) - $1 yp = (y2 - y)/.001 if (abs(yp) < 1e-6) { yp = 1e-6 } dx = -y/yp x += dx if (abs(dx) < 1e-6) { break } } return x } endtemplate VLinoidRate neuron-7.5/share/lib/hoc/chanbild/properties.hoc000077500000000000000000000145341323325274500217670ustar00rootroot00000000000000begintemplate ChannelBuildSelectProperties public b, namestr, useionstr1, useionstr2, g_or_p, menu, single_ public save_data, set_data, clone, save_ion, set_defstr, defstr, set_single external hoc_sf_, valid_name_syntax objref cb, b, this, mt, ks, panelbox_ strdef tstr, tstr1, tstr2, ionstr, namestr, useionstr1, useionstr2, defstr strdef g_or_p, ionmech_ charge=0 proc init() {local i cb = $o1 ks = cb.ks single_ = 0 cb.genprop = this tstr = ks.name if ($2 == 0) { set_data("leak", 1, 1, -1, "") set_defstr(0,0) }else{ if (strcmp(ks.ion, "NonSpecific") == 0) {i = -1}else{i=1} set_data(ks.name, ks.is_point == 0, ks.iv_type != 2, i, ks.ion) set_defstr(ks.gmax, ks.erev) } } proc save_data() { sprint(tstr, "{genprop.set_data(\"%s\", %d, %d, %d, \"%s\")}", ks.name, ks.is_point == 0, ohmictype_, iontype_, ks.ion) $o1.save(tstr) sprint(tstr, "{genprop.set_defstr(%g, %g)}", ks.gmax, ks.erev) $o1.save(tstr) } proc save_ion() {local c if (iontype_ != -1) { sprint(tstr, "%s_ion", ks.ion) c = ion_charge(tstr) sprint(tstr, "{ion_register(\"%s\", %d)}", ks.ion, c) $o1.save(tstr) } } proc set_data() { ks.name($s1) ohmictype_ = $3 iontype_ = $4 if (iontype_ != -1) { mt = new MechanismType(0) sprint(tstr, "%s_ion", $s5) mt.select(tstr) iontype_ = mt.selected() } selion(iontype_, $s5) set_namestr() ohmictype(0) set_useionstr() } proc clone() { $o1.set_data(ks.name, ks.is_point, ohmictype_, iontype_, ks.ion) $o1.set_defstr(ks.gmax, ks.erev) } proc menu() { xbutton("Channel Name", "chname()") xmenu("Selective for Ion...", "mkionmenu()") if (ks.is_point) { xcheckbox("Allow Single Channels", &single_, "set_single(single_)") } xcheckbox("Ohmic i=g*(v-e)", &ohmictype_, "ohmictype(0)") xcheckbox("Goldman-Hodgkin-Katz", &ghktype_, "ohmictype(1)") xbutton("Default gmax (or pmax)", "defpanel()") } proc defpanel() { panelbox_ = new VBox() panelbox_.intercept(1) xpanel("") if (ohmictype_ == 1) { if (ks.is_point) { xpvalue("Default gmax (uS)", &gmax_, 1, "set_defstr(gmax_,erev_)") }else{ xpvalue("Default gmax (S/cm2)", &gmax_, 1, "set_defstr(gmax_,erev_)") } }else{ if (ks.is_point) { xpvalue("Default pmax (cm3/s)", &gmax_, 1, "set_defstr(gmax_,erev_)") }else{ xpvalue("Default pmax (cm/s)", &gmax_, 1, "set_defstr(gmax_,erev_)") } } if (iontype_ == -1) { xpvalue("Default e (mV)", &erev_, 1, "set_defstr(gmax_,erev_)") } xpanel() panelbox_.intercept(0) panelbox_.save("") sprint(tstr, "Default gmax for %s", cb) panelbox_.map(tstr) } proc set_defstr() { if (numarg() == 2) { ks.gmax($1) ks.erev($2) } gmax_ = ks.gmax erev_ = ks.erev tstr = " Default" if (ohmictype_ == 1) { if (ks.is_point) { sprint(tstr, "%s gmax = %g (uS)", tstr, ks.gmax) }else{ sprint(tstr, "%s gmax = %g (S/cm2)", tstr, ks.gmax) } }else{ if (ks.is_point) { sprint(tstr, "%s pmax = %g (cm3/s)", tstr, ks.gmax) }else{ sprint(tstr, "%s pmax = %g (cm/s)", tstr, ks.gmax) } } if (iontype_ == -1) { sprint(tstr, "%s e = %g (mV)", tstr, ks.erev) } defstr = tstr } proc set_single() { if ($1 == ks.single) { return } ks.single($1) single_ = ks.single set_namestr() } proc chname() { tstr = ks.name while (string_dialog("Channel Name", tstr)) { if (valid_name_syntax(tstr, 1)) { ks.name(tstr) break } } set_namestr() } proc set_namestr() { if (ks.is_point == 0) { sprint(namestr, "%s Density Mechanism", ks.name) }else{ if (ks.single) { sprint(namestr, "%s Point Process (Allow Single Channels)", ks.name) }else{ sprint(namestr, "%s Point Process", ks.name) } } set_useionstr() } proc hhtype() { if ($1 == 0) { // hhtype changed kstype_ = (hhtype_ == 0) }else{ hhtype_ = (kstype_ == 0) } } proc ohmictype() { objref panelbox_ if ($1 == 0) { // ohmictype changed ghktype_ = (ohmictype_ == 0) }else{ ohmictype_ = (ghktype_ == 0) } if (iontype_ == -1) { ohmictype_ = 1 ghktype_ = 0 } if (ohmictype_ == 1) { ks.iv_type(0) }else if (ghktype_ == 1) { ks.iv_type(2) } set_useionstr() } proc mkionmenu() { mt = new MechanismType(0) xbutton("NonSpecific", "selion(-1)") for i=0, mt.count-1 { mt.select(i) mt.selected(tstr) if (hoc_sf_.head(tstr, "_ion", tstr2) != -1) { sprint(tstr, "selion(%d, \"%s\")", i, tstr2) xbutton(tstr2, tstr) } } xbutton("Create new type", "newion()") } proc selion() { objref panelbox_ iontype_ = $1 if ($1 == -1) { ks.ion("NonSpecific") sprint(ionstr, "NonSpecific ion current/voltage relationship") ohmictype_ = 1 ghktype_ = 0 }else{ mt.select($s2) iontype_ = mt.selected() ks.ion($s2) sprint(ionstr, "%s current/voltage relationship", $s2) } set_useionstr() } proc newion() {local i tstr = "ca 2" while (string_dialog("ionname charge --e.g. ca 2", tstr)) { if (sscanf(tstr, "%s %d", tstr2, &charge) == 2) { i = ion_register(tstr2, charge) if (i != -1) { sprint(ionmech_, "%s_ion", tstr2) mt.select(ionmech_) i = mt.selected selion(i, tstr2) if (ion_charge(ionmech_) != charge) { sprint(tstr, "Warning: %s already exists and the charge is %d", ks.ion, ion_charge(ionmech_)) continue_dialog(tstr) } return }else{ sprint(tstr2, "One of the names associated with \"%s\" is already in use", tstr2) continue_dialog(tstr2) } }else{ sprint(tstr2, "\"%s\" not in \"name integer\" format", tstr) continue_dialog(tstr2) } } } proc set_useionstr() { if (ohmictype_) { g_or_p = "g" sprint(useionstr1, "%s ohmic ion current", ks.ion) tstr = ks.name if (iontype_ == -1) { if (ks.is_point == 0) { sprint(useionstr2, " i_%s (mA/cm2) = g_%s * (v - e_%s)", tstr, tstr, tstr) }else{ sprint(useionstr2, " %s.i (nA) = %s.g * (v - %s.e)", tstr, tstr, tstr) } }else{ if (ks.is_point == 0) { sprint(useionstr2, " i%s (mA/cm2) = g_%s * (v - e%s)", ks.ion, tstr, ks.ion) }else{ sprint(useionstr2, " i%s (mA/cm2) = %s.g * (v - e%s)*(0.01/area)", ks.ion, tstr, ks.ion) } } }else{ sprint(tstr1, "%s_ion", ks.ion) g_or_p = "p" sprint(useionstr1, "%s Goldman-Hodgkin-Katz ion current", ks.ion) if (ks.is_point == 0) { sprint(useionstr2, " i%s (mA/cm2) = p_%s * ghk(v, %si, %so, %d)", ks.ion, ks.name, ks.ion, ks.ion, ion_charge(tstr1)) }else{ sprint(useionstr2, " i%s (mA/cm2) = (1e6)*%s.p * ghk(v, %si, %so, %d)*(0.01/area)", ks.ion, ks.name, ks.ion, ks.ion, ion_charge(tstr1)) } } cb.set_gatestr() } endtemplate ChannelBuildSelectProperties neuron-7.5/share/lib/hoc/chanbild/sigmoid.hoc000077500000000000000000000025001323325274500212140ustar00rootroot00000000000000{load_file("nrngui.hoc")} begintemplate VSigmoidRate public A, k, d, f, inv, Asol, ksol, form, parms, save_data, restore, type public kstset, parm2vec, vec2parm, chk proc init() { parms(1, .1, -40) } proc kstset() { parms(1, .1, -40) $o1.set_f($2, type(), new Vector(3)) parm2vec($o1.parm($2)) } proc chk() { if ($o3.x[0] < 0) { $o3.x[0] = 0 } if ($1 == 1) if ($2 == 0) $o3.x[0] = 1 } proc parm2vec() { $o1.resize(0) $o1.append(A, k, d) } proc vec2parm() { A = $o1.x[0] k = $o1.x[1] d = $o1.x[2] } func type() { return 4 } proc parms() { A = $1 k = $2 d=$3 } proc save_data() { sprint($s2, "%g %g %g", A, k, d) $o1.save($s2) } proc restore() { parms(fscan(), fscan(), fscan()) } proc form() { if ($2 == 1) { sprint($s1, "A%s/(1 + exp(-k%s*(d%s - v)))", $s3, $s3, $s3) }else{ sprint($s1, "%.4g/(1 + exp(%.4g*(%.4g - v)))", A, -k, d) } } func f() {local x x = k*($1 - d) if (x > 700) { return 0 } return A/(1 + exp(x)) } func inv() {local x if ($1 >= A) { x = 700 }else if ($1 <= 0){ x = -700 }else{ x = log(A/$1 - 1) } if (k == 0) { return 1e9 } return d + x/k } func Asol() { return $2*2 } func ksol() {local x x = $1 - d if (abs(x) < 1e-6) { x = 1e-6 } if ($2 < 0) { $2 = 1e-6 } else if ($2 > A) {$2 = 1 - 1e-6} x = log(A/$2 - 1)/x return x } endtemplate VSigmoidRate neuron-7.5/share/lib/hoc/chanbild/table.hoc000077500000000000000000000010131323325274500206460ustar00rootroot00000000000000{load_file("nrngui.hoc")} begintemplate VTableRate public f, inv, Asol, ksol, form, parms, type public kstset, parm2vec, vec2parm, chk proc init() { } proc kstset() { $o1.set_f($2, type(), new Vector(10)) $o1.parm($2).fill(.5) } proc chk() { } proc parm2vec() { } proc vec2parm() { } func type() { return 7 } proc parms() { } proc form() { $s1 = "KSChanTable" } func f() { return 0 } func inv() {local x return 0 } func Asol() { return 0 } func ksol() {local x return 0 } endtemplate VTableRate neuron-7.5/share/lib/hoc/electrod.hoc000077500000000000000000000207221323325274500176240ustar00rootroot00000000000000/* ?0 UserClasses Electrode An current injection electrode inserted in the middle of the current section which can be switched between current and voltage clamp modes and can do simple voltage clamp families. usage: section e = new Electrode([xplacement, yplacement]) e.stim and e.vc can used to set parameters programatically. Electrode can be saved in a .session file and is best used anonymously so that it is dismissed and point processes deleted when the graphic is dismissed. ?1 IClamp Switches the Electrode to single pulse current injection. Uses IClamp point process. ? del Time (ms) of the onset of the current stimulus relative to t = 0. ? dur Duration (ms) of the current stimulus ? amp Amplitude (nA) of the current stimulus ?1 VClamp Switches the Electrode to two electrode voltage clamp. Uses VClamp point process that allows up to three level changes. The clamp is set to be ideal. ?2 dur0 dur1 dur2 Duration in milliseconds of each level change starting at t=0. Each level is concatenated. At t = dur0+dur1+dur2 the clamp is switched off and no longer injects current. ?2 amp0 amp1 amp2 Amplitude in millivolts of each level. ? VClampigraph Creates a currentgraph displaying the voltage clamp current. This button exists because, with the present implementation, it is generally not possible to reference the Electrode object from hoc because the only reference is held by a vbox which in turn is only referenced by this Electrode. In this way, when the Electrode window is dismissed, the Electrode is destroyed and the point processes are removed from the neuron. ?1 VClampFamily Several common families for voltage clamp experiments. One should bring up a current graph (VClampigraph button in VClamp card) and select KeepLines in the graph popup menu. Only one clamp parameter is changed and the other duration and amplitude levels are given by the values set in the VClamp panel See User HocCode Electrode varyamp for the how the levels are varied. ? Conditioning varies amp0 in 10 steps. Initialization is carried out at the value of amp0 so it is equivalent to the holding potential. ? Testlevel varies amp1 in 10 steps ? Returnlevel varies amp2 in 10 steps. ?1 Location Shows a Shape scene of the neuron with the Electrode location marked as a blue dot. The electrode location can be changed by making sure the Section item in the selection menu is selected (right mouse button) and pressing the left mouse button at any point on the picture of the neuron. The position of the electrode is also reflected in the varlabel in the panel just above the Shape. ?0 User HocCode Electrode */ help ?0 begintemplate Electrode public stim, vc, unmap, map, v1, installIclamp external run, set_v_init, stoppedrun, addplot objectvar stim, vc, v1, d1, this, shape, g strdef durstr, ampstr, tempstr, grname, string1,string2,string3 double vdur[3] double vamp[3] proc set_vclamp() { setstring() for i=0,2 {vc.dur[i] = vdur[i] vc.amp[i] = vamp[i]} } proc store_vclamp() { for i=0,2 {vdur[i] = vc.dur[i] vamp[i] = vc.amp[i]} } proc installVclamp() {local i set_vclamp() if (is_cl == 0) { samp=stim.amp stim.amp=0 is_cl = 1 } d1.flip_to(0) } proc installIclamp() {local i if (is_cl == 1) { stim.amp = samp for i=0,2 {vc.dur[i] = -1} is_cl = 0 } d1.flip_to(1) } proc installFamily() { installVclamp() d1.flip_to(2) sprint(durstr, "dur %g %g %g", vdur[0], vdur[1], vdur[2]) sprint(ampstr, "amp %g %g %g", vamp[0], vamp[1], vamp[2]) } strdef sec strdef location proc init() {local i can_locate = 1 sectionname(sec) xloc=.5 sprint(location, "%s(%g)", sec, xloc) stim = new IClamp(.5) stim.del=.1 stim.dur=.1 stim.amp=0 vc = new VClamp(.5) sprint(grname, "%s Graph", vc) vc.dur[0]=.1 vc.amp[0]=-65 vc.dur[1] = 2.5 vc.amp[1]=10 vc.dur[2]=100 vc.amp[2]=-65 vcincrement=10 //jwm added 7/24/97 vcsteps=5 //jwm added 7/24/97 if (numarg() == 1) { if ($1 == 0) { return } } map() } proc locate() { if ($1 == 1 && can_locate == 1) { d1.flip_to(3) return }else{ push_section(sec) hoc_ac_ = xloc move() pop_section() } } proc move() { xloc = hoc_ac_ if (object_id(shape)) { shape.select() } stim.loc(xloc) vc.loc(xloc) sectionname(sec) sprint(location, "%s(%g)", sec, xloc) } // setstring procedure added to provide text info for Vclamp Family Panel proc setstring(){ sprint(string1, " Starting at %g mV for %g ms",vamp[0],vdur[0]) sprint(string3, " starting at %g mV for %g ms",vamp[2],vdur[2]) sprint(string2, " starting at %g mV for %g ms",vamp[1],vdur[1]) } proc glyph() { // v1 is the main box and contains a panel and deck v1 = new VBox() v1.priority(990) v1.ref(this) v1.save("save()") v1.intercept(1) xpanel("Electrode") xradiobutton("IClamp", "installIclamp()") xradiobutton("VClamp", "installVclamp()") xradiobutton("VClamp Family", "installFamily()") if (can_locate) { xradiobutton("Location", "locate(1)") } xvarlabel(location) xpanel() v1.intercept(0) d1 = new Deck() d1.intercept(1) xpanel("VClamp") sprint(tempstr, "%s pulses", vc) xlabel(tempstr) xlabel("Conditioning Level") sprint(tempstr, "duration , ms", 0) xpvalue(tempstr, &vdur[0], 1, "set_vclamp()") sprint(tempstr, "amplitude %d, mV ", 0) xpvalue(tempstr, &vamp[0], 1, "set_vclamp()") xlabel("Testing Level") sprint(tempstr, "duration , ms", 1) xpvalue(tempstr, &vdur[1], 1, "set_vclamp()") sprint(tempstr, "amplitude , mV ", 1) xpvalue(tempstr, &vamp[1], 1, "set_vclamp()") xlabel("Return Level") sprint(tempstr, "duration , ms", 2) xpvalue(tempstr, &vdur[2], 1, "set_vclamp()") sprint(tempstr, "amplitude , mV ", 1) xpvalue(tempstr, &vamp[2], 1, "set_vclamp()") xbutton("VClamp.i graph", "mkgraph()") xpanel() xpanel("IClamp") sprint(tempstr, "%s pulse", stim) xlabel(tempstr) xpvalue("delay in ms", &stim.del, 1) xpvalue("duration, ms", &stim.dur, 1) xpvalue("amplitude, nA", &stim.amp, 1) xpanel() xpanel("VClampFamily") sprint(tempstr, "%s Families", vc) xlabel(tempstr) sprint(tempstr, "Set initial values in 'VClamp'", vc) xlabel(tempstr) xbutton("Vary Conditioning level","varyamp(0)") xvarlabel(string1) xbutton("Vary Test level", "varyamp(1)") xvarlabel(string2) xbutton("Vary Return level","varyamp(2)") xvarlabel(string3) sprint(tempstr, " ") xlabel(tempstr) sprint(tempstr, "Family parameters", vc) xlabel(tempstr) xpvalue("# of steps ",&vcsteps,1) xpvalue("# mV/step ",&vcincrement,1) xpanel() if (can_locate) { shape = new Shape() shape.point_mark(stim, 3) shape.action("move()") locate(0) } d1.intercept(0) v1.intercept(1) d1.map() v1.intercept(0) installVclamp() installIclamp() if (can_locate) { d1.flip_to(3) } } objectvar grbox proc mkgraph() { grbox = new VBox() grbox.save("") grbox.intercept(1) g = new Graph() g.addvar("vc.i") grbox.intercept(0) grbox.map(grname) addplot(g, 0) } proc varyamp() {local i, x, x1, x2, dx, old dx=vcincrement i = $1 set_vclamp() old = set_v_init() if (i == 0) { x1 = vamp[0] //jwm 10/10/97 -100 }else if (i == 1) { x1 = vamp[1] //jwm 10/10/97 -50 }else{ x1=vamp[2] //jwm 10/10/97 -100 } for j=0,vcsteps { x=x1+j*dx vc.amp[i] = x if (i == 0) { set_v_init(x) } run() if (stoppedrun()) { break } set_v_init(old) } } proc varydur() { set_vclamp() } proc map() { samp = stim.amp store_vclamp() glyph() if (numarg() == 2) { v1.map("I/V Clamp Electrode", $1, $2, 100, 100) }else{ v1.map("I/V Clamp Electrode") } } proc unmap() { v1.unmap() } proc save() {local i v1.save("load_file(\"electrod.hoc\")\n}\n{") //has to be executed first v1.save("ocbox_=new Electrode(0)") sprint(tempstr, "can_locate=%d sec=\\\"%s\\\" xloc=%g locate(0)",\ can_locate, sec, xloc) v1.save(tempstr, "ocbox_") //execute in scope of the object installVclamp() for i=0,2 { sprint(tempstr, "vc.dur[%d]=%g vc.amp[%d]=%g",\ i, vc.dur[i], i, vc.amp[i]) v1.save(tempstr, "ocbox_") } installIclamp() sprint(tempstr, "stim.del=%g stim.dur=%g stim.amp=%g",\ stim.del, stim.dur, stim.amp) v1.save(tempstr, "ocbox_") sprint(tempstr, "vcincrement=%g", vcincrement) sprint(tempstr, "vcsteps=%g", vcsteps) v1.save(tempstr, "ocbox_") v1.save("samp=stim.amp store_vclamp() glyph()", "ocbox_") v1.save("ocbox_ = ocbox_.v1") } endtemplate Electrode objectvar tempobj proc makeelectrode() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an Electrode") return } tempobj = new Electrode() objectvar tempobj } neuron-7.5/share/lib/hoc/family.hoc000077500000000000000000000075071323325274500173120ustar00rootroot00000000000000/* ?0 UserClasses Family For several values of a variable, execute an action. Basically just a form for specifying a for loop. usage: makeFamily() constructs a Family and maps it to the screen. The Family instance is destroyed when its window is dismissed. The slider value ranges from start to end. Due to the length of time it generally takes to complete an action it is best to use the middle button to select a value with the slider. Dragging the slider button or using it too rapidly will cause many action requests to be ignored since a slider event taking place while handling the previous event is prevented from executing the action recursively. The occasionally has the unintended effect of missing the last action when one releases the mouse button. ?1 start end numbersteps Beginning and final values of the loop variable. The number of steps includes these limiting values so should be at least 2 but if it is 1 then the loop reduces to only the start value. ?1 Variable Pops up a SymChooser for selection of a variable name. The Family object cannot work without a variable since there is no default. ?1 Action Pops up a stringchooser for selectionof the body of the loop. The default run() action is typically what is desired. ?1 Run Starts the loop ?1 Stop ? Now stops the loop even in the middle of the action. (The stdrun.hoc run() action regularly checks the stop_run variable.) ? Atendofaction Waits for the current action to finish before stopping. ?1 Cont starts the action with the next value of the variable. (If the previous action was stopped in the middle, that action is not restarted where it left off.) */ help ?0 begintemplate Family public frun, box nstep = 0 strdef variable, generator, cmd, tempstr objref sc, box, this proc init() { generator = "run()" sc = new SymChooser() xstart = 0 xend = 0 xinc = 0 x = 0 slideval = 0 nstep = 1 istep = 0 vstop = 0 if (numarg() == 1) { if ($1 == 0) { return } } setval() build() box.map() } proc build() { box = new VBox() box.ref(this) box.save("save()") box.intercept(1) xpanel("Family") xpvalue("start", &xstart, 1, "setval()") xpvalue("end", &xend, 1, "setval()") xpvalue("number steps", &nstep, 1, "setval()") xvarlabel(variable) xvarlabel(generator) xpanel() xpanel("Family", 1) xbutton("Variable", "changevar()") xbutton("Action", "changegen()") xpanel() xpanel("Family", 1) xbutton("Run", "frun()") xmenu("Stop") xbutton("Now", "fstop()") xbutton("At end of action", "vstop = 1") xmenu() xbutton("Cont", "fcontinue()") xpanel() xpanel("Family") xslider(&slideval, 0, 1, "slcmd()", 0, 1) // slow slider xpanel() box.intercept(0) } proc setval() { if (nstep > 1) { inc = (xend - xstart)/(nstep-1) }else{ nstep = 1 inc = 0 } } proc changevar() { if (sc.run()) { sc.text(variable) } } proc changegen() { string_dialog("Action", generator) } proc frun() { istep = 0 fcontinue() } proc fcontinue() { vstop = 0 for (istep = istep; istep < nstep; istep = istep + 1) { x = xstart + istep * inc act() if (vstop) break } } proc act() { sprint(cmd, "%s = %g %s", variable, x, generator) execute(cmd) } proc fstop() { vstop = 1 execute("stoprun=1") // makes sense if we are doing a stdrun run() } proc slcmd() { x = xstart + slideval*(xend - xstart) act() } proc save() { box.save("load_file(\"family.hoc\", \"Family\")\n}\n{") sprint(tempstr, "ocbox_ = new Family(0)") box.save(tempstr) box.save("}\n{object_push(ocbox_)}\n{") sprint(tempstr, "xstart=%g xend=%g nstep=%d setval() build()\n",\ xstart, xend, nstep) box.save(tempstr) sprint(tempstr, "variable = \"%s\"", variable) box.save(tempstr) sprint(tempstr, "generator = \"%s\"", generator) box.save(tempstr) box.save("}\n{object_pop()}\n{") box.save("ocbox_ = ocbox_.box") } endtemplate Family objref tempobj proc makeFamily(){ tempobj = new Family() objref tempobj } neuron-7.5/share/lib/hoc/funfit.hoc000077500000000000000000000534671323325274500173320ustar00rootroot00000000000000/* funfit.hoc ?0 UserClasses FunctionFitter A widget for graphing a parameterized function while exploring parameter variations. Also can adjust the parameters automatically to fit data. Function, parameters, independent variable can be specified by the user. This widget may be saved in a session. ?1 Usage The FunctionFitter starts out with entries for graphing a single exponential with two parameters. When a parameter value is changed the graph is replotted. ?0 UserClasses FunctionFitter PanelUsage ? Plot Replots function with current arg values ? Steps Number of values of independent variable used in plot ? IndependentVar Enter the name of independent variable in a string dialog ? Args Enter space separated names of parameters in a string dialog. Default value editors for these parameters will appear in the rightmost box. ? Yexpr Enter an expression involving the independent variable and the parameters (args). Any valid top level hoc expression is acceptable. ? PraxisFit Starts fitting the function to the data with respect to the DataWeights by adjusting the checked argument values. ? StopAtNextQuadForm Stop the praxis fitter when it finishes its current/next cycle. At this point it contains a computation of the quadratic form of the parameter phase space (printed in the terminal window). ? Running Checked when the praxis fitter is executing. ? WatchTheFit Plot the function on each call to the error function during fitting. Things are slower if this box is checked. ? RoughFit Instead of fitting all the data according to the data weights, use only 5 equally spaced points in each of the two central data regions. Things can be much faster if this box is checked. ?1 ArgValues The values of the arguments are used in the plot. When a value is changed the function is replotted. When fit data is present, a checkbox is added to the left of each argument button. When the box is checked then the fitter adjusts the value for a best fit. When not checked the parameter is treated as a constant. ? CurrentValuesAsDefault Resets the default values of the parameter field editors to their current values. ?1 FittoData ? ReadDataFile Get data from a file. The format is the number of data points followed by pairs of x,y data. ? CommonFunctionalForms ? FitCriterion not implemented ? ParameterRangeLimits Pops up a panel of parameters with their range limits. When the fitter calls the error function and one of the parameters is outside its range the error function will return a value of 1e6. ? DataWeights Pops up a panel of data weight intervals and weights. The first interval ranges from the beginning of the data to the interval 1 endpoint. From the interval3 endpoint to the end of the data, the weight is 0. The entire interval is given the weight indicated. Intervals can be manipulated directly by the AdjustWeightRegions tool of the Graph menu. ? SaveRestoreFunction Arg values and the y-expression can be saved in a list and restored by selection with a browser. ?0 User HocCode FunctionFitter */ help ?0 begintemplate FunFitModel public indep, yexpr, args, argstr, arglow, arghigh, doargfit strdef indep, yexpr, argstr objref args, arglow, arghigh, doargfit proc init() { args = new Vector() arglow = new Vector() arghigh = new Vector() doargfit = new Vector() } endtemplate FunFitModel t = 0 // make sure it is defined if used in ivoc context strdef temp_string_ objectvar grapherlist, temp_object_ { grapherlist = new List(1) load_file("stdlib.hoc", "String") } // fitter_apply must be at top level for xexpr and plot to get the // right symbols. execute would work even inside a template proc fitter_addexpr() { $o1.addexpr($s2) } strdef tempstr proc fitter_apply() {local i, argcnt argcnt = $o3.count() for i=0, argcnt-1 { hoc_ac_ = $o4.x[i] sprint(tempstr, "%s = hoc_ac_", $o3.object(i).s) execute(tempstr) } $o1.apply($s2) } func fitter_fit() {return 0} begintemplate FunctionFitter public vbox, info, save, g, set_datavec, setfun, args, doplt, make_vec public get_argname, yexpr, argstr, err, w_boundary, w_weight public dweight, xdatavec_, ydatavec_ external fitter_apply, fitter_addexpr, fitter_fit // this class was modified from Grapher and has a lot of vestigial // variables and functions. objectvar g, vbox, hbox, this, hb1, vb2, d1, tobj, sf, tobj2 strdef indep, xexpr, generate, body, temp, yexpr, argstr, func_yexpr strdef tstr1, temp1, temp2, temp3, fitfunname {x1=0 x2=0 steps=0 err=0 running=0 stopstate=0 watch=0 rough_=0} objref xvec, yvec, args, argnames, arglow, arghigh, pvbox, doargfit objref xdatavec, ydatavec, ansvec objref savfunlist, dfile objref dweight, w_boundary, w_weight, xdatavec_, ydatavec_ objref prin_val, prin_fac, prin_origargs, prin_axis[1], prin_index proc init() { i=0 savfunlist = new List() sf = new StringFunctions() indep = "t" xexpr = "t" generate = "" x1 = 0 x2 = 10 steps = 100 vbox = new VBox() vbox.priority(100) vbox.ref(this) vbox.save("save()") vbox.intercept(1) initparms() g = new Graph() g.size(x1, x2, -10, 10) g.menu_tool("Adjust Weight Regions", "adjust_weights") g.menu_action("Data from Clipboard", "clipboard_data()") change_x() vbox.intercept(0) init1() make_vec() init_weights() doplt() } proc init1() { sprint(func_yexpr, "fitter_yexpr_%x", object_id(this)) expon(1) } func defargs() {local i, n argnames.remove_all() argstr2argname($s1) n = argnames.count() tobj = new Vector(n) for i=0, n-1 { sprint(temp, "hoc_ac_ = %s", argnames.object(i).s) if (execute1(temp, 0)) { tobj.x[i] = hoc_ac_ }else{ tobj.x[i] = 1 } sprint(temp, "%s = %g", argnames.object(i).s, tobj.x[i]) if (!execute1(temp)) { print "defargs" defargs(argstr) return 0 } } argstr = $s1 args = tobj arglow = new Vector(args.size(), -1e6) arghigh = new Vector(args.size(), 1e6) doargfit = new Vector(args.size(), 1) objref prin_fac argpanel() return 1 } proc argstr2argname() { if (sf.len($s1) > 0) { if (sf.head($s1, " ", temp) <= 0) { // wish functions could return strings temp = $s1 } tobj = new String(temp) argnames.append(tobj) sf.tail($s1, " ", temp2) argstr2argname(temp2) } } proc get_argname() { $s2 = argnames.object($1).s } proc initparms() { hb1 = new HBox() hb1.intercept(1) vb2 = new VBox() vb2.intercept(1) xpanel("PanelUsage", 1) xbutton("Plot", "doplt()") xmenu("Fit to Data") xbutton("Read Data File", "read_data()") // xbutton("Fit to Data", "fit_data()") xmenu("Common Functional Forms") xbutton("Nth order Lag", "lag()") xbutton("Linear", "linear()") xbutton("Single Exponential", "expon(1)") xbutton("Double Exponential", "expon(2)") xbutton("Two state Boltzmann", "bolz(1)") xbutton("Three state Boltzmann", "bolz(2)") xbutton("Michaelis-Menton", "michael()") xbutton("Remove data", "valid_data = 0 argpanel()") xmenu() xbutton("Fit criterion", "fit_criterion()") xbutton("Parameter Range Limits", "parm_range()") xbutton("data weights", "weight_panel()") xmenu("Save/Restore function") xbutton("Save function info", "savfun()") xbutton("Saved function browser", "rfunbsr()") xmenu() xbutton("Principal Axis Variation", "prin_panel()") xmenu("Number of Data Regions") xbutton("1", "init_weights(1)") xbutton("2", "init_weights(2)") xbutton("3", "init_weights(3)") xbutton("4", "init_weights(4)") xbutton("5", "init_weights(5)") xbutton("one more", "init_weights(0)") xbutton("one fewer", "init_weights(-1)") xmenu() xmenu() xpvalue("Steps", &steps,0, "make_vec() doplt()") xpanel() exprval("Independent Var", indep, "change_indep()") exprval("Args", argstr, "change_args()") exprval("Y-expr", yexpr, "change_yexpr()") xpanel("PraxisFit") xbutton("Praxis fit", "fit_data2()") xcheckbox("Stop at next Quad Form", &stopstate, "stopstate=1 stop_praxis()") xcheckbox("Running", &running, "running = (running == 0)") xcheckbox("Watch the fit", &watch) xcheckbox("Rough fit", &rough_, "weight()") xpanel() vb2.intercept(0) vb2.map() d1 = new Deck() d1.intercept(1) xpanel("dummy") xlabel("dummy") xpanel() d1.intercept(0) d1.map() argnames = new List() args = new Vector(1) argpanel() hb1.intercept(0) hb1.map() } proc prin_panel() {local i, narg prin_index = doargfit.c.indvwhere("==", 1) narg = prin_index.size prin_origargs = args.ind(prin_index) prin_val = new Vector(narg) prin_fac = new Vector(narg) objref prin_axis[narg] for i=0, narg-1 { prin_axis[i] = new Vector(narg) prin_val.x[i] = pval_praxis(i, &prin_axis[i].x[0]) } xpanel("Principal Axis Variation") for i=0, narg-1 { sprint(tstr1, "%d %g", i, prin_val.x[i]) xpvalue(tstr1, &prin_fac.x[i], 1, "prin_dovar()") } xpanel() } proc prin_dovar() {local i, narg narg = prin_index.size tobj = prin_origargs.c for i=0,narg-1 { tobj.add(prin_axis[i].c.mul(prin_fac.x[i])) } for i=0, narg-1 { args.x[prin_index.x[i]] = tobj.x[i] } redraw() } proc import() {local i for i=0, argnames.count - 1 { sprint(tstr1, "%s.x[%d] = %s", args, i, argnames.object(i).s) execute(tstr1) } doplt() } proc argpanel() {local i d1.remove_last() d1.intercept(1) if (valid_data) { tobj = new VBox() tobj.intercept(1) xpanel("ArgValues") xmenu("Current Values") xbutton("Current Values as default", "argpanel()") xbutton("Import values", "import()") xmenu() xpanel() for i=0, argnames.count()-1 { xpanel("ArgValues", 1) xcheckbox("", &doargfit.x[i]) xpvalue(argnames.object(i).s, &args.x[i], 1, "doplt()") xpanel() } xpanel("") xpvalue("Mean Sq Error", &err) xpanel() tobj.intercept(0) tobj.map() }else{ xpanel("ArgValues") xbutton("Current Values as default", "argpanel()") for i=0, argnames.count()-1 { xpvalue(argnames.object(i).s, &args.x[i], 1, "doplt()") } xpanel() } d1.intercept(0) d1.flip_to(0) } proc doplt() {local i if (x1 != g.size(1) || x2 != g.size(2)) { make_vec() } yvec.copy(xvec) fitter_apply(yvec, func_yexpr, argnames, args) g.flush() if (valid_data) { err = errfun() } } proc change_indep() { temp = indep while (string_dialog("Enter independent variable name", indep)) { hoc_ac_ = x1 sprint(body, "%s = hoc_ac_", indep) if (execute1(body)) { xexpr = indep er() return }else{ continue_dialog("invalid independent variable") } } indep = temp } proc change_xexpr() { temp = xexpr while (string_dialog("Enter x-axis expression", xexpr)) { sprint(body, "hoc_ac = %s", xexpr) if (execute1(body)) { return }else{ continue_dialog("invalid expression") } } xexpr = temp } proc change_x() { if (x2 > x1) { g.size(x1, x2, g.size(3), g.size(4)) }else if (x2 < x1) { g.size(x2, x1, g.size(3), g.size(4)) } } proc change_generate() { print "A generator statement is only required if x and y\ plot expressions are not explicit functions of the independent variable" temp = generate while (string_dialog("Enter Generator statement", generate)) { if (execute1(generate)) { return }else{ continue_dialog("invalid statement") } } generate = temp } proc change_args() { temp3 = argstr while (string_dialog("Enter arg names separated by spaces", temp3)) { if (defargs(temp3)) { er() return } } } proc redraw() { make_vec() doplt() } proc make_vec() { er() xvec = new Vector(steps+1) yvec = new Vector(steps+1) x1 = g.size(1) x2 = g.size(2) xvec.indgen(x1, x2, (x2 - x1)/steps) yvec.plot(g, xvec) } proc make_func() { sprint(temp2,"~func %s() {local %s %s=$1 return %s }", func_yexpr, indep, indep,yexpr) execute(temp2) } proc new_yexpr() { argpanel() yexpr = $s1 make_func() make_vec() doplt() } proc change_yexpr() { temp = yexpr while (string_dialog("Enter expression involving independent variable and args", temp)) { if (execute1(temp)) { new_yexpr(temp) return } } } proc exprval() { xpanel("", 1) xbutton($s1, $s3) xvarlabel($s2) xpanel() } proc save() {local i vbox.save("load_file(\"funfit.hoc\")\n}\n{") sprint(body, "ocbox_=new FunctionFitter()\n\ ocbox_.info(\"%s\",\"%s\", \"%s\", %g, %g, %g, %g, %d, %g, %g)",\ indep, argstr, yexpr, g.size(1), g.size(2), g.size(3), g.size(4), steps,\ x1, x2) vbox.save(body) vbox.save("}\n{object_push(ocbox_)}\n{") for i=0, args.size()-1 { sprint(body, "args.x[%d] = %g", i, args.x[i]) vbox.save(body) sprint(body, "arglow.x[%d] = %g", i, arglow.x[i]) vbox.save(body) sprint(body, "arghigh.x[%d] = %g", i, arghigh.x[i]) vbox.save(body) sprint(body, "doargfit.x[%d] = %g", i, doargfit.x[i]) vbox.save(body) } sprint(tstr1, "init_weights(%d)", w_boundary.size()-1) vbox.save(tstr1) for i=0, w_boundary.size() - 1 { sprint(body, "w_boundary.x[%d] = %g", i, w_boundary.x[i]) vbox.save(body) sprint(body, "w_weight.x[%d] = %g", i, w_weight.x[i]) vbox.save(body) } if (object_id(dfile) != 0) { dfile.getname(tempstr) sprint(tstr1, "read_data1(\"%s\")\n}", tempstr) vbox.save(tstr1) }else if (object_id(xdatavec)) { sprint(tstr1, "xdatavec_ = new Vector(%d)", xdatavec.size) vbox.save(tstr1) sprint(tstr1, "ydatavec_ = new Vector(%d)", ydatavec.size) vbox.save(tstr1) sprint(tstr1, "ydatavec_.label(\"%s\")", ydatavec.label) vbox.save(tstr1) sprint(tstr1, "for i=0,%d { xdatavec_.x[i]=fscan() ydatavec_.x[i]=fscan()}\n}",\ xdatavec.size - 1) vbox.save(tstr1) for i=0,xdatavec.size-1 { sprint(tstr1, "%g %g", xdatavec.x[i], ydatavec.x[i]) vbox.save(tstr1) } vbox.save("set_datavec(xdatavec_, ydatavec_)") }else{ vbox.save("}") } vbox.save("{doplt() argpanel()}\n{object_pop()}\n{") g.save_name("ocbox_.g", 1) vbox.save("ocbox_ = ocbox_.vbox") } proc info() { indep = $s1 sprint(body, "%s = 0", indep) execute(body) defargs($s2) new_yexpr($s3) g.size($4, $5, $6, $7) steps = $8 x1 = $9 x2 = $10 } proc set_datavec() {//xvec, yvec valid_data = 0 xdatavec = $o1.c ydatavec = $o2.c ydatavec.label($o2.label) xdatavec_ = xdatavec ydatavec_ = ydatavec ansvec = new Vector(ydatavec.size()) ydatavec.line(g, xdatavec, 2, 1) valid_data = 1 g.size(xdatavec.min(), xdatavec.max(), ydatavec.min(), ydatavec.max()) argpanel() dweight = new Vector(xdatavec.size()) weight() } proc clipboard_data() { sprint(tstr1, "%s.set_datavec(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr1) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc read_data() {local i, n if (object_id(dfile) == 0) { dfile = new File() dfile.chooser("r", "Read Data File", "*.dat", "Read") } if (dfile.chooser()) { dfile.ropen() n = dfile.scanvar() xdatavec = new Vector(n) ydatavec = new Vector(n) for i=0, n-1 { xdatavec.x[i] = dfile.scanvar() ydatavec.x[i] = dfile.scanvar() } dfile.close() dfile.getname(tstr1) ydatavec.label(tstr1) set_datavec(xdatavec, ydatavec) } } proc er() { local j, ymin, ymax g.erase() if (valid_data) { g.label(.6,.95) ydatavec_.line(g, xdatavec_, 2, 1) ymin = ydatavec_.min() ymax = ydatavec_.max() for j=0, w_boundary.size()-1 { g.beginline(3, 1) g.line(w_boundary.x[j], ymin) g.line(w_boundary.x[j], ymax) } } } proc fit_criterion() { } proc parm_range() {local i pvbox = new VBox() pvbox.save("") pvbox.intercept(1) xpanel("FunFitter") for i=0,argnames.count()-1 { sprint(tstr1, "xpvalue(\"%s low\", &arglow.x[%d], 1)",\ argnames.object(i).s, i) execute(tstr1, this) sprint(tstr1, "xpvalue(\"%s high\", &arghigh.x[%d], 1)",\ argnames.object(i).s, i) execute(tstr1, this) } xpanel() sprint(tstr1, "Parameter Ranges for %s", this) pvbox.intercept(0) pvbox.map(tstr1) } func chklimits() {local i for i=0, $o1.size()-1 { if ($o1.x[i] < arglow.x[i] || $o1.x[i] > arghigh.x[i]) { return 1 } } return 0 } func errfun() { if (chklimits(args)) { return 1e6 } ansvec.copy(xdatavec_) fitter_apply(ansvec, func_yexpr, argnames, args) return ansvec.meansqerr(ydatavec_, dweight) } func praxis_errfun() {local i, j, e doNotify() i = 0 for j = 0, args.size()-1 { if (doargfit.x[j] == 1) { args.x[j] = ($&2[i]) i += 1 } } if (chklimits(tobj)) { return 1e10 } ansvec.copy(xdatavec_) fitter_apply(ansvec, func_yexpr, argnames, args) e = ansvec.meansqerr(ydatavec_, dweight) if (e < emin) { emin = e if (watch) { doplt() } } return e } proc fit_data() {local terr if (valid_data == 0) { continue_dialog("Must first select Read Data") return } create_fitfun() terr = 0 err = errfun() while (abs(terr - err) > 1e-8) { terr = err err = fitter_fit(ydatavec, ansvec, fitfunname, xdatavec, args) doplt() doNotify() } } proc fit_data2() {local i, n if (valid_data == 0) { continue_dialog("Must first select Read Data") return } if (running) { if (boolean_dialog("Running flag is on, Turn it off?")) { running = 0 } return } running = 1 tobj = args.c n = 0 tobj2 = new Vector(args.size()) for i=0, args.size() - 1 { if (doargfit.x[i] == 1) { tobj2.x[n] = (args.x[i]) n += 1 } } attr_praxis(1e-6, .5, 1) stoprun=0 emin = 1e9 fit_praxis(n, "praxis_errfun", &tobj2.x[0]) stopstate = 0 doplt() running = 0 } proc create_fitfun() {local i sprint(fitfunname, "fitfun_%x", object_id(this)) sprint(temp, "~func %s() {local %s ", fitfunname, indep) for i=0, argnames.count()-1 { sprint(temp, "%s, %s", temp, argnames.object(i).s) } sprint(temp, "%s %s=$1", temp, indep) for i=0, argnames.count()-1 { sprint(temp, "%s %s=$%d", temp, argnames.object(i).s, i+2) } sprint(temp, "%s return %s }", temp, yexpr) execute(temp) sprint(temp, "~func fitter_fit() { return $o1.fit($o2,$s3,$o4") for i=0, argnames.count()-1 { sprint(temp, "%s, &$o5.x[%d]", temp, i) } sprint(temp, "%s)}", temp) execute(temp) } proc linear() { xexpr = "t" defargs("m b") new_yexpr("m*t + b") } proc expon() { xexpr = "t" if ($1 == 1) { defargs("A k1") new_yexpr("A*exp(-k1*t)") }else{ defargs("A k1 B k2") new_yexpr("A*exp(-k1*t) + B*exp(-k2*t)") } } proc bolz() { xexpr = "t" if ($1 == 1) { defargs("A d1 k1") new_yexpr("A/(1 + exp(k1*(d1-t)))") }else{ defargs("A d1 k1 d2 k2") new_yexpr("A/(1 + exp(k1*(d1-t)) + exp(k2*(d2-t)))") } } proc michael() { xexpr = "t" defargs("A k1") new_yexpr("A*k1*t/(1 + k1*t)") } proc lag() { xexpr = "t" defargs("A k1 n") new_yexpr("A*(1 - exp(-k1*t))^n") } proc rfunbsr() { savfunlist.browser("", "yexpr") savfunlist.accept_action("restorefun()") } proc savfun() { tobj = new FunFitModel() tobj.indep = indep tobj.yexpr = yexpr tobj.argstr = argstr tobj.args.copy(args) tobj.arglow.copy(arglow) tobj.arghigh.copy(arghigh) tobj.doargfit.copy(doargfit) savfunlist.append(tobj) } proc restorefun() {local i i = hoc_ac_ tobj2 = savfunlist.object(i) setfun(tobj2) } proc setfun() { defargs($o1.argstr) args.copy($o1.args) arglow.copy($o1.arglow) arghigh.copy($o1.arghigh) doargfit.copy($o1.doargfit) indep = $o1.indep new_yexpr($o1.yexpr) } proc init_weights() {local i, n, min, max if (numarg() == 1) { if ($1 == 0) { // one more n = w_boundary.size }else if ($1 == -1) { // one fewer n = w_boundary.size-2 if (n < 1) n = 1 }else{ n = $1 } }else{ n = 1 } w_boundary = new Vector(n+1) w_weight = new Vector(n+1, 1) if (valid_data) { min = xdatavec.x[0] max = xdatavec.x[xdatavec.size-1] w_boundary.indgen(min, (max-min)/n) weight() }else{ w_boundary.indgen(-1e6,1e7) } } proc weight_panel() {local i xpanel("data weights") xpvalue("interval 1 startpoint", &w_boundary.x[0], 1, "weight()") for i=1, w_boundary.size() - 1 { sprint(tstr1, "interval %d endpoint", i) xpvalue(tstr1, &w_boundary.x[i], 1, "weight()") sprint(tstr1, "interval %d weight", i) xpvalue(tstr1, &w_weight.x[i], 1, "weight()") } xpanel() } proc weight() {local i, j, t, w, d, tmin, tmax, n // make sure weight regions are within boundaries tmin = xdatavec.x[0] tmax = xdatavec.x[xdatavec.size - 1] n = w_boundary.size() for i=0, n-1 { t = w_boundary.x[i] if (t < tmin) { w_boundary.x[i] = tmin } if (t > tmax) { w_boundary.x[i] = tmax } } if (rough_) { rough() return } xdatavec_ = xdatavec ydatavec_ = ydatavec dweight.resize(xdatavec_.size()) j = 0 tmax = w_boundary.x[0] w = 0 for i=0, dweight.size() - 1 { t = xdatavec.x[i] while (t >= tmax && j < n) { j += 1 w_boundary.x[j-1] = t if (j >= n) { tmax = 1e9 w = 0 break } tmax = w_boundary.x[j] d = w_boundary.x[j] - w_boundary.x[j-1] if (d <= 0) { continue } w = w_weight.x[j]/d } dweight.x[i] = w } tobj = new Vector(xdatavec.size()) errnorm = ydatavec.meansqerr(tobj, dweight) if (errnorm > 0) { dweight.div(errnorm) } redraw() } proc rough() {local i, j, n, x, dx, nb // one data point on each boundary with three points equally spaced // in the interior of each region nb = w_boundary.size() n = (nb-1)*4 + 1 xdatavec_ = new Vector(n) ydatavec_ = new Vector(n) ydatavec_.label(ydatavec.label) dweight.resize(n) tobj = new Vector(n) tobj.x[0] = w_boundary.x[0] dweight.x[0] = w_weight.x[0] for i=1, nb - 1 { x = w_boundary.x[i-1] dx = (w_boundary.x[i] - x)/4 for j = 1, 4 { tobj.x[(i-1)*4 + j] = x + j*dx if (dx <= 0) { dweight.x[(i-1)*4 + j] = 0 }else{ dweight.x[(i-1)*4 + j] = w_weight.x[i] } } } j=0 for i=0, xdatavec.size() - 1 { t = xdatavec.x[i] if (t >= tobj.x[j]) { xdatavec_.x[j] = t ydatavec_.x[j] = ydatavec.x[i] j += 1 if (j >= n) { break } } } tobj.fill(0) errnorm = ydatavec_.meansqerr(tobj, dweight) if (errnorm > 0) { dweight.div(errnorm) } redraw() } proc adjust_weights() { //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_weight($2) } if (adjust == -1) { return } if ($1 == 1) { // drag w_boundary.x[adjust] = $2 weight() er() g.flush() } if ($1 == 3) { // release w_boundary.sort() weight() adjust = -1 } } func pick_weight() {local i, j, x, m m = 1e9 for i=0, w_boundary.size() - 1 { x = abs($1 - w_boundary.x[i]) if (x < m) { m = x j = i } } return j } endtemplate FunctionFitter proc makefitter() {local i i=0 if (numarg()) { i=$1 } temp_object_ = new FunctionFitter(i) temp_object_.vbox.map("FunctionFitter") objectvar temp_object_ } neuron-7.5/share/lib/hoc/gatherv.hoc000077500000000000000000000073221323325274500174640ustar00rootroot00000000000000begintemplate GatherVec public xvar, list, b, g begintemplate GVItem public v, add strdef stmt objref v proc init() { v = new Vector(100) v.label($s1) v.resize(0) sprint(stmt, "%s.append(%s)", v, v.label) } proc add() { execute(stmt) } endtemplate GVItem objref list, sc, b, g, xvar objref tobj, tobj1, this strdef tstr, tstr1 i=0 iterator allitems() {local i if (object_id(xvar)) { $o1 = xvar iterator_statement } for i=0, list.count - 1 { $o1 = list.object(i) iterator_statement } } proc init() { action = 0 list = new List() sc = new SymChooser("Gather Variable into Vector") build() sprint(tstr, "%s", this) if (numarg() == 0) { b.map(tstr) } } proc build() { b = new VBox() b.ref(this) b.save("save()") b.intercept(1) xpanel("", 1) xmenu("Variables") xbutton("X variable", "x_var()") xbutton("Y variable", "y_var()") xbutton("Crosshair X value", "y_var(\"hoc_cross_x_\")") xbutton("Crosshair Y value", "y_var(\"hoc_cross_y_\")") xmenu() xmenu("CrossAction") xradiobutton("Nothing", "action=0") xradiobutton("Remove Point", "action=1") xradiobutton("Remove Variable", "action=2") xradiobutton("Put Back", "action=3") xmenu() xbutton("SortX", "sort()") xbutton("Record Val", "get_val()") xpanel() g = new Graph() b.intercept(0) g.crosshair_action("caction", 1) } proc x_var() { if (sc.run()) { sc.text(tstr) xvar = new GVItem(tstr) } flush() } proc y_var() { if (!object_id(xvar)) { continue_dialog("Choose an x variable first") return } if (numarg() == 1) { listadd($s1) }else if (sc.run()) { sc.text(tstr) listadd(tstr) } flush() } proc listadd() { clear() tobj = new GVItem($s1) list.append(tobj) } proc caction(){local i, x if (action == 1) { remove($1) } if (action == 2) { for i=0, list.count - 1 { x = $o4.c.sub(list.object(i).v).sumsq() if (x < 1e-9) { sprint(tstr, "Remove %s?", list.object(i).v.label) if (boolean_dialog(tstr, "Yes", "No")) { list.remove(i) } break } } flush() } if (action == 3) { for allitems(tobj) { sprint(tstr, "%s = %g", tobj.v.label, tobj.v.x[$1]) execute(tstr) } } } proc sort() { if (list.count == 0) return tobj1 = xvar.v.sortindex for allitems(tobj) { tobj.v.index(tobj1) } flush() } proc remove() { for allitems(tobj) { tobj.v.remove($1) } flush() } proc get_val() { if (list.count == 0) { continue_dialog("No y variables") return } for allitems(tobj) { tobj.add() } flush() } proc clear() { for allitems(tobj) { tobj.v.resize(0) } } proc flush() {local i g.erase_all() sprint(tstr, "%s :x-axis", xvar.v.label) g.label(.5, .8, tstr) for i=0, list.count-1 { g.color(i+1) tobj = list.object(i) tobj.v.line(g, xvar.v) tobj.v.mark(g, xvar.v, "O", 10) } g.color(1) } proc save() {local i b.save("load_file(\"gatherv.hoc\")\n}\n{") b.save("ocbox_=new GatherVec(1)") b.save("}\n{object_push(ocbox_)}") if (object_id(xvar)) { sprint(tstr, "{xvar = new GVItem(\"%s\")}", xvar.v.label) b.save(tstr) } for i=0, list.count-1 { sprint(tstr, "{listadd(\"%s\")}", list.object(i).v.label) b.save(tstr) } if (object_id(xvar)) { save1(xvar.v, "xvar.v") } for i=0, list.count-1 { sprint(tstr, "list.object(%d).v", i) save1(list.object(i).v, tstr) } if (object_id(xvar)) { b.save("{flush()}") } b.save("{object_pop()}\n{") g.erase_all() g.save_name("ocbox_.g", 1) b.save("ocbox_ = ocbox_.b") flush() } proc save1() {local i sprint(tstr1, "{%s.resize(%d) for i=0, %d { %s.x[i] = fscan() }}",\ $s2, $o1.size, $o1.size-1, $s2) b.save(tstr1) for i = 0, $o1.size - 1 { sprint(tstr1, "%g", $o1.x[i]) b.save(tstr1) } } endtemplate GatherVec objref tobj proc makeGatherVec() { objref tobj tobj = new GatherVec() objref tobj } neuron-7.5/share/lib/hoc/grapher.hoc000077500000000000000000000164401323325274500174550ustar00rootroot00000000000000/* ?0 UserClasses Grapher A widget for graphing any set of expressions as a function of an independent variable. To pop up the widget say: load_file("grahper.hoc") // reads this file makegrapher() // simple way to pop up a new grapher Graphers may be saved in a .session file. ?1 Usage To use the grapher widget: 1) enter the independent variable name (press the button) eg. x 2) specify the y variables: in the graph panel press the left button and select "Plot What?" and enter an expression or variable to plot. eg. sin(x) You can do this several times to plot several expressions. 3) either press the Plot button. the independent variable will range from the beginning to the end of the x-axis or ---- 3) Specify the view from the graph panel popup menu by selecting the "Set View" item. You may also want to fix this as the Scene size by subsequently selecting the "Scene=View" item 4) If the y variables are actual functions of the independent variable press the Plot button to see the plot. If the y variables are in fact just variables then you will need a generator statement that tells how to compute the y variables given a value of the independent variable. eg. Just for fun you can try entering the generator statement: print x, sin(x) ?1 Examples Example 1: plot sin(t) 1) PlotWhat: sin(t) 2) Plot Example 2: plot of steady state m process in nrniv 1) Independent Var: x 2) Generator: rates_hh(x) 3) Set View: x: -100 50 y: 0 1 4) PlotWhat: minf_hh 5) Plot Example 3: In context of Neuron Main Menu simulation 0) pop up grapher by selecting appropriate "New Graph" submenu item. 1) Independent Var: v_init 2) Generator: init() 3) PlotWhat: 4) SetView: x: -100 50 y:cancel 5) Plot Example 4: peak inward current during voltage clamp Replace the standard: proc advance() {fadvance()} with a procedure that stores the peak inward current (and possibly sets stoprun=1 when you are past the peak). Then in the Grapher set Steps to 20 the independent variable to the voltage clamp amplitude and the generator to run(). ?1 abscissa creating a grapher using makegrapher(1) will add an item for setting the x-expression and buttons for specifying the limits of the independent variable ?1 PanelUsage ? Plot For each value of the independent variable the generator statement is executed (if it exists) and the PlotWhat expressions are plotted. ? EraseAll Removes all expressions from the graph. ? Steps Number of independent variable values used to make the graph. For the small grapher, the range of the independent variable is the length of the x-axis. ? IndependentVar Dialog appears requesting the variable to be used as the independent variable (default t). If the variable is undefined it will be created. ? Generator A statement to be executed after setting a value of the independent variable but before plotting the expressions. This allows plotting of variables that depend implicitly on the independent variable. ? IndepBegin For a grapher made with makegrapher(1), specifies initial value of the independent variable. ? IndepEnd Specifies final value of independent variable. ? Xexpr A grapher made with makegrapher(1) allows separate specification of independent variable and the x axis plot functions. This allows phase plane plots. The Xexpr may be any function of the independent variable or an implicit function if a generator statement exists. ?0 User HocCode Grapher */ help ?0 t = 0 // make sure it is defined if used in ivoc context strdef temp_string_ objectvar grapherlist, temp_object_ grapherlist = new List(1) // grapher_doplt must be at top level for xexpr and plot to get the // right symbols. execute would work even inside a template proc grapher_doplt(){local x, i, j j = 2 if ($2 > 100) { j = sqrt($2) } stoprun = 0 for i=0, $2 { x = $3 + $4*i hoc_ac_ = x if (!execute1($s5)) { continue_dialog("Error in Generator statement") break } if (i == 0) { // must be here in case valid expressions /// depend on initial value of dependend variable $o1.xexpr($s6) $o1.begin() } $o1.plot(1) if (i%j == 0) { $o1.fastflush() doEvents() } if (stoprun) break } $o1.flush() } begintemplate Grapher public vbox, info, save, g, doplt external grapher_doplt objectvar g, vbox, hbox, this strdef indep, xexpr, generate, body, temp {x1=0 x2=0 steps=0} proc init() { indep = "t" xexpr = "t" generate = "" x1 = 0 x2 = 10 steps = 100 vbox = new VBox() vbox.ref(this) vbox.save("save()") vbox.intercept(1) big = 0 if (numarg() == 1) { big = $1 } if (big == 1) { initbig() }else{ initsmall() } g = new Graph() g.size(x1, x2, -10, 10) change_x() vbox.intercept(0) } proc initsmall() { xpanel("PanelUsage", 1) xbutton("Plot", "doplt_small()") xbutton("Stop", "dostop()") xpvalue("Steps", &steps) xpanel() exprval("Independent Var", indep, "change_indep()") exprval("Generator", generate, "change_generate()") } proc dostop() { execute("stoprun = 1") } proc initbig() { xpanel("PanelUsage", 1) xbutton("Plot", "doplt()") xbutton("Erase All", "g.erase_all()") xpanel() xpanel("") xpvalue("Indep Begin", &x1, 0) xpvalue("Indep End", &x2, 0) xpvalue("Steps", &steps) xpanel() exprval("Independent Var", indep, "change_indep()") exprval("X-expr", xexpr, "change_xexpr()") exprval("Generator", generate, "change_generate()") } proc doplt_small() { x1 = g.size(1) x2 = g.size(2) doplt() } proc doplt() {local d sprint(body, "{%s=hoc_ac_ %s}", indep, generate) d = (x2 - x1)/steps grapher_doplt(g, steps, x1, d, body, xexpr) } proc change_indep() { temp = indep while (string_dialog("Enter independent variable name", indep)) { hoc_ac_ = x1 sprint(body, "%s = hoc_ac_", indep) if (execute1(body) == 1) { xexpr = indep // g.erase_all() return }else{ continue_dialog("invalid independent variable") } } indep = temp } proc change_xexpr() { temp = xexpr while (string_dialog("Enter x-axis expression", xexpr)) { sprint(body, "hoc_ac = %s", xexpr) if (execute1(body) == 1) { return }else{ continue_dialog("invalid expression") } } xexpr = temp } proc change_x() { if (x2 > x1) { g.size(x1, x2, g.size(3), g.size(4)) }else if (x2 < x1) { g.size(x2, x1, g.size(3), g.size(4)) } } proc change_generate() { print "A generator statement is only required if x and y\ plot expressions are not explicit functions of the independent variable" temp = generate while (string_dialog("Enter Generator statement", generate)) { return } generate = temp } proc exprval() { xpanel("", 1) xbutton($s1, $s3) xvarlabel($s2) xpanel() } proc save() {local i vbox.save("load_file(\"grapher.hoc\")}\n{") sprint(body, "ocbox_=new Grapher(%d)\n\ ocbox_.info(\"%s\",\"%s\", \"%s\", %g, %g, %g, %g, %d, %g, %g)",\ big, indep, xexpr, generate, g.size(1), g.size(2), g.size(3), g.size(4), steps,\ x1, x2) vbox.save(body) g.save_name("ocbox_.g", 1) vbox.save("ocbox_ = ocbox_.vbox") } proc info() { indep = $s1 sprint(body, "%s = 0", indep) execute(body) xexpr = $s2 generate = $s3 g.size($4, $5, $6, $7) steps = $8 x1 = $9 x2 = $10 doNotify() } endtemplate Grapher proc makegrapher() {local i i=0 if (numarg()) { i=$1 } temp_object_ = new Grapher(i) temp_object_.vbox.map("Grapher") objectvar temp_object } neuron-7.5/share/lib/hoc/impedanc.hoc000066400000000000000000000074331323325274500176040ustar00rootroot00000000000000/* A wrapper for the Impedance class that makes it convenient to define measuring electrode location, and current injection location This is useful for plotting impedance vs time and freq. usage: imp = new Imp1([impedanceobject]) // if no arg then this creates one section imp.measure(x) //specify measurement location section imp.inject(x) //specify injection location imp.ratio(freq) // v(measure)/v(inject) imp.input(freq) // v(measure)/i(measure) imp.transfer(freq) // v(measure)/i(inject) imp.map() // a widget for setting measure and inject // locations imp.move_callback = object // if you want object.move() called // each time inject or measure is moved imp.extended = 1 // if you want to perform the extended impedance // calculation described in // http://neuron.yale.edu/neuron/docs/help/neuron/neuron/classes/impedanc.html Notes: Impedance objects are expensive in terms of storage but efficiently calculate input impedances everywhere and transfer impedances everywhere relative to a specific location. For this reason the Imp1 constructor can use a pre-existing Impedance object if you don't want it to construct its own instance. This object calls Impedance.compute(freq, extended) everytime a ratio, etc is requested. */ begintemplate Imp1 public measure, inject, ratio, input, transfer, map, move_callback, extended objectvar imp, sec[2], shape, b1, this, move_callback double x[2], color[2] strdef s0, s1, stemp, sdist proc init() { if (numarg() > 0) { imp = $o1 }else{ imp = new Impedance() } measure(.5) inject(.5) } proc measure() { sec[0] = new SectionRef() x[0] = $1 sectionname(stemp) sprint(s0, "measure (red): %s(%g)", stemp, $1) } proc inject() { sec[1] = new SectionRef() x[1] = $1 sectionname(stemp) sprint(s1, "inject (blue): %s(%g)", stemp, $1) } func ratio() {local y compute($1) sec[1].sec y = imp.ratio(x[1]) return y } func transfer() {local y compute($1) sec[1].sec y = imp.transfer(x[1]) // since v(x)/i(loc) == v(loc)/i(x) return y } func input() {local y compute($1) sec[0].sec y = imp.input(x[0]) return y } proc compute() { sec[0].sec imp.loc(x[0]) imp.compute($1, extended) } objectvar rvp proc dist() {local y sec[0].sec distance(0,x[0]) sec[1].sec y = distance(x[1]) sprint(sdist, "distance(um) %g", y) } proc map() {local i mark = 0 dist() b1 = new VBox() b1.ref(this) b1.save("save()") b1.intercept(1) xpanel("") xmenu("measure/inject") xradiobutton("measure", "mark=0", 1) xradiobutton("inject", "mark=1") xbutton("Exchange", "exchange()") xmenu() xvarlabel(s0) xvarlabel(s1) xvarlabel(sdist) xpanel() shape = new Shape() for i=0,1 color[i]=i+2 shapemark(2) for i=0,1 { color[i] = i+2 // red, blue shapemark(i, sec[i], x[i], color[i]) } shape.action("move()") b1.intercept(0) sprint(stemp, "%s", this) b1.map(stemp) } proc move() {local i, xx i = mark xx = hoc_ac_ if (i == 0) { measure(xx) }else{ inject(xx) } shapemark(i, sec[i], x[i], color[i]) dist() if (object_id(move_callback)) { move_callback.move() } } objectvar etmp proc exchange() {local xx, i //swap inject and measure etmp = sec[0] xx = x[0] sec[1].sec measure(x[1]) etmp.sec inject(xx) objectvar etmp for i=0,1 shapemark(i, sec[i], x[i], color[i]) if (object_id(move_callback)) { move_callback.move() } } // should put this in plotshape class and avoid a meaningless point process objectvar stim[1] proc shapemark() {local i if (numarg() == 1) { objectvar stim[$1] for i=0,1 sec[i].sec stim[i] = new PointProcessMark(x[i]) for i=0,1 shape.point_mark(stim[i], color[i]) }else{ $o2.sec stim[$1].loc($3) } } proc save() {} endtemplate Imp1 proc makeImp1() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an Imp1") return } hoc_obj_[0] = new Imp1() hoc_obj_[0].map() } neuron-7.5/share/lib/hoc/impedanx.hoc000077500000000000000000000157451323325274500176410ustar00rootroot00000000000000/* impedanx.hoc Modified 7/12/95 for space plot of natural log Atten vs. x Based on Imp1 (impedanc.hoc> A wrapper for the Impedance class that makes it convenient to define measuring electrode location, and current injection location This is useful for plotting impedance vs time and freq. usage: imp = new Imp1([impedanceobject]) // if no arg then this creates one section imp.measure(x) //specify measurement location section imp.inject(x) //specify injection location imp.ratio(freq) // v(measure)/v(inject) imp.input(freq) // v(measure)/i(measure) imp.transfer(freq) // v(measure)/i(inject) imp.map() // a widget for setting measure and inject // locations imp.move_callback = object // if you want object.move() called // each time inject or measure is moved Notes: Impedance objects are expensive in terms of storage but efficiently calculate input impedances everywhere and transfer impedances everywhere relative to a specific location. For this reason the Imp1 constructor can use a pre-existing Impedance object if you don't want it to construct its own instance. This object calls Impedance.compute() everytime a ratio,etc is requested. */ begintemplate Impx public measure, inject, ratio, input, transfer, extended, imp public begin, flush, view_count objectvar imp, sec[3], shape, b1, this objref seclist, g, rvp double x[3], color[3] strdef s0, s1, s2, stemp, sdist, fstyle, tstr proc init() { style_ = 0 fstyle = "log(Attenuation)" extended = 0 mark_ = 0 flush_ = 0 scale_ = 0 direct_ = 0 freq = 0 variable_domain(&freq, 0, 1e9) units(&freq, "Hz") /* if (numarg() > 0) { imp = $o1 }else{ imp = new Impedance() } don't bother checking for pre-existing object of Impedance class this is called without argument, so always must create a new object that way won't get mixed up with stuff created by Imp1 */ imp = new Impedance() imp.deltafac(.0001) sec[0] = new SectionRef() x[0] = .5 startpath(0) endpath(1) build() measure(.5) } proc measure() { sec[0] = new SectionRef() x[0] = $1 setdir(direct_) } proc setdir() { sec[0].sec { direct_ = $1 if (style_ == 1) { // input sprint(s0, "(red) %s(%g)", secname(), x[0]) }else if (direct_ == 0) { sprint(s0, "Measure (red) %s(%g)", secname(), x[0]) }else { sprint(s0, "Inject (red) %s(%g)", secname(), x[0]) } } draw() } proc startpath() { sec[1] = new SectionRef() x[1] = $1 sectionname(stemp) sprint(s1, "path start (blue): %s(%g)", stemp, $1) } proc endpath() { sec[2] = new SectionRef() x[2] = $1 sectionname(stemp) sprint(s2, "path end (green): %s(%g)", stemp, $1) } /* func ratio() {local y compute($1) sec[1].sec y = imp.ratio(x[1]) return y } func transfer() {local y compute($1) sec[1].sec y = imp.transfer(x[1]) // since v(x)/i(loc) == v(loc)/i(x) return y } func input() {local y compute($1) sec[0].sec y = imp.input(x[0]) return y } */ proc compute() { // calcs impedances, argument is freq (Hz) sec[0].sec imp.loc(x[0]) imp.compute($1, extended) } double sz[4] proc draw() { // MLH says this is the most inefficient way to do this // but if it works fast enough, who cares? // e.g. computing and setting path do not need to be linked compute(freq) // freq is set by a field editor sec[1].sec rvp.begin(x[1]) sec[2].sec rvp.end(x[2]) seclist = new SectionList() rvp.list(seclist) shape.color_all(1) // foreground color shape.color_list(seclist, 2) // color 2 g.flush() if (scale_) {// only after the flush does a graph vector have info g.size(&sz[0]) g.size(sz[0], sz[1], 0, sz[3]) } } proc dist() {local y // sec[0].sec distance(0,x[0]) sec[1].sec distance(0,x[1]) sec[2].sec y = distance(x[2]) sprint(sdist, "path length (um) %g", y) } proc build() {local i dist() b1 = new VBox() b1.ref(this) b1.save("") b1.intercept(1) xpanel("", 1) xbutton("Redraw", "draw()") xmenu("SelectLocation") xradiobutton("measure/inject", "mark_=0", 1) xradiobutton("path start", "mark_=1") xradiobutton("path end", "mark_=2") xmenu() xmenu("Plot") xradiobutton("log(Attenuation", "style(0)", 1) xradiobutton("Zin (Mohm)", "style(1)") xradiobutton("Ztransfer (Mohm)", "style(2)") xradiobutton("V(measure)/V(inject)", "style(3)") xmenu() xmenu("Extras") xstatebutton("Movie mode", &flush_, "add_flush()") xstatebutton("Auto Scale", &scale_, "draw()") xmenu() xpanel() xpanel("") xcheckbox("include dstate/dt contribution", &extended, "draw()") // now a field editor for frequency xpvalue("frequency", &freq, 1, "draw()") xradiobutton("Vin", "setdir(0)", 1) xradiobutton("Vout", "setdir(1)") xvarlabel(s0) xvarlabel(s1) xvarlabel(s2) // new line here xvarlabel(sdist) xpanel() shape = new Shape() for i=0,2 { color[i] = i+2 // red, blue } shapemark(3) for i=0,2 { shapemark(i, sec[i], x[i]) } shape.action("move()") g = new Graph() // appends graph to box b1.intercept(0) sprint(stemp, "%s", this) b1.map(stemp) rvp = new RangeVarPlot("fun($1)") add_rvp() draw() } proc add_rvp() { g.erase_all() g.label(-100, -100, "") g.addobject(rvp) g.label(.5, .9, fstyle) } func fun() {local xx if (style_ == 0) { if (direct_ == 0) { return -log(imp.ratio($1)) }else{ sec[0].sec xx = imp.input(x[0]) return -log(imp.transfer($1)/xx) } }else if (style_ == 1) { return imp.input($1) }else if (style_ == 2 ){ return imp.transfer($1) }else{ if (direct_ == 0) { return imp.ratio($1) }else{ sec[0].sec xx = imp.input(x[0]) return imp.transfer($1)/xx } } } proc style() { style_ = $1 if (style_ == 0) { fstyle = "log(Attenuation)" }else if (style_ == 1) { fstyle = "Zin" }else if (style_ == 2) { fstyle = "Ztransfer" }else if (style_ == 3) { fstyle = "V(measure)/V(inject)" } setdir(direct_) add_rvp() draw() } proc move() {local i, xx i = mark_ xx = hoc_ac_ if (i == 0) { measure(xx) }else if (i == 1) { startpath(xx) }else { endpath(xx) } shapemark(i, sec[i], x[i], color[i]) dist() draw() } // should put this in plotshape class and avoid a meaningless point process objectvar stim[1] proc shapemark() {local i if (numarg() == 1) { objectvar stim[$1] for i=0,$1-1 sec[i].sec stim[i] = new PointProcessMark(x[i]) for i=0,$1-1 shape.point_mark(stim[i], color[i]) }else{ $o2.sec stim[$1].loc($3) } } proc add_flush() { if (flush_) { sprint(tstr, "flush_list.append(%s)", this) execute(tstr) } } func view_count() { if (flush_) { return g.view_count() }else{ return 0 } } proc begin() { } proc flush() { draw() } proc save() {} endtemplate Impx proc makeImpx() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an Impx") return } hoc_obj_[0] = new Impx() hoc_obj_[0] = hoc_obj_[1] } neuron-7.5/share/lib/hoc/import3d.hoc000077500000000000000000000005171323325274500175640ustar00rootroot00000000000000{xopen("import3d/import3d_sec.hoc")} {xopen("import3d/read_swc.hoc")} {xopen("import3d/read_nlcda.hoc")} {xopen("import3d/read_nlcda3.hoc")} {xopen("import3d/read_nts.hoc")} {xopen("import3d/read_morphml.hoc")} {xopen("import3d/import3d_gui.hoc")} objref tobj, nil proc makeimport3dtool() { tobj = new Import3d_GUI(nil) tobj = nil } neuron-7.5/share/lib/hoc/import3d/000077500000000000000000000000001323325274500170635ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/import3d/Makefile.am000077500000000000000000000005221323325274500211210ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocimport3ddir = $(neuronhomehocdir)/import3d neuronhomehocimport3d_DATA = \ import3d_gui.hoc \ import3d_sec.hoc \ read_nlcda3.hoc \ read_nlcda.hoc \ read_nts.hoc \ read_swc.hoc \ read_morphml.hoc EXTRA_DIST = $(neuronhomehocimport3d_DATA) neuron-7.5/share/lib/hoc/import3d/Makefile.in000066400000000000000000000446551323325274500211460ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/import3d ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehocimport3ddir)" DATA = $(neuronhomehocimport3d_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocimport3ddir = $(neuronhomehocdir)/import3d neuronhomehocimport3d_DATA = \ import3d_gui.hoc \ import3d_sec.hoc \ read_nlcda3.hoc \ read_nlcda.hoc \ read_nts.hoc \ read_swc.hoc \ read_morphml.hoc EXTRA_DIST = $(neuronhomehocimport3d_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/import3d/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/import3d/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehocimport3dDATA: $(neuronhomehocimport3d_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehocimport3d_DATA)'; test -n "$(neuronhomehocimport3ddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehocimport3ddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehocimport3ddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehocimport3ddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehocimport3ddir)" || exit $$?; \ done uninstall-neuronhomehocimport3dDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehocimport3d_DATA)'; test -n "$(neuronhomehocimport3ddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehocimport3ddir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomehocimport3ddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomehocimport3dDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomehocimport3dDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehocimport3dDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomehocimport3dDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/import3d/import3d_gui.hoc000077500000000000000000000706301323325274500221740ustar00rootroot00000000000000{load_file("celbild.hoc")} {load_file("stdlib.hoc")} begintemplate Import3d_GUI public swc, diam_glyph, box, plrot, readfile, redraw, name public origin, rotmatold, raworigin, g, rotraw, instantiate external hoc_sf_ objref swc, g, box, this, rotmat, m2, origin, tobj, rotmatold objref raworigin, rotsav, viewsec, rawsel, deck objref file, nil, problist, types, editbox strdef tstr, tstr1, typelabel_, filename proc init() { if (numarg() == 2) if ($2 == 0) { swc = $o1 return } if ($o1 == nil) { file = new File() filename = "choose a file " }else{ file = $o1.file hoc_sf_.head(file.getname(), "[^/]*$", tstr) file.chooser("r", "Import 3-D Reconstruction File", "*", "Read", "Cancel", tstr) filename =file.getname() } ztrans_ = 0 dummy_ = 0 undo_type_ = 0 show_point_ = 1 show_diam_ = 1 if ($o1 == nil) { build() map() return } init1($o1) build() map() init2() } proc map() { sprint(tstr, "%s", this) if (numarg() == 0) { box.map(tstr) }else{ box.map(tstr, $2, $3, $4, $5) } } proc init1() { i=0 j=0 swc = $o1 selpoint_ = -1 selid_ = swc.pt2id(selpoint_) viewsec = new List() showtype(-10000) rotated_ = 0 rotmat = new Matrix(3,3) rotmatold = rotmat.c.ident rotsav = rotmat.c.ident origin = new Vector(3) raworigin = new Vector(3) rawsel = new Vector(3) m2 = new Matrix(3,3) } proc init2() { rot(0,0) pl() g.exec_menu("View = plot") g.exec_menu("Zoom") } proc build() {local i box = new HBox(3) box.full_request(1) box.save("") box.ref(this) box.intercept(1) box.adjuster(400) g = new Graph(0) g.view(2) g.xaxis(3) deck = new Deck(3) build_panel() deck.map box.intercept(0) } proc build_panel() {local i deck.intercept(1) xpanel("") xcheckbox(filename, &readfile_, "readfile()") if (swc == nil) { xlabel(" accepted file formats:") xlabel(" SWC") xlabel(" Neurolucida (v1 and v3)") xlabel(" Eutectic") if (nrnpython("")) xlabel(" MorphML") for i = 0, 15 { xlabel("") } xpanel(0) deck.intercept(0) deck.flip_to(0) return } sprint(tstr, "File format: %s", swc.filetype) xlabel(tstr) xlabel("-------------------------------") g.menu_remove("Zoom") g.menu_tool("Zoom", "zoom") g.menu_remove("Translate ") g.menu_tool("Translate ", "translate") g.menu_remove("Rotate") g.menu_tool("Rotate (about axis in plane)", "rotate") xcheckbox("Rotate 45deg about y axis", &dummy_, "rot45()") xcheckbox("Rotated (vs Raw view)", &rotated_, "rotraw()") xcheckbox("Show Points", &show_point_, "pl()") xcheckbox("Show Diam", &show_diam_, "pl()") xvarlabel(typelabel_) xmenu("View type") xradiobutton("All", "showtype(-10000) pl()", 1) xradiobutton("Section containing selected point", "showsec() pl()") xradiobutton("Distal (tree) from selected point", "showdistal() pl()") xradiobutton("Proximal (path to root) from selected point", "showprox() pl()") xradiobutton("Root sections", "showroot() pl()") if (swc.type.min != swc.type.max) { for i = swc.type.min, swc.type.max { if (swc.type.indwhere("==", i) != -1) { sprint(tstr, "type %d", i) sprint(tstr1, "showtype(%d) pl()", i) xradiobutton(tstr, tstr1) } } } xmenu() g.menu_remove("Select point") g.menu_tool("Select point", "selpoint", "selpoint1(1)") if (strcmp(swc.filetype, "Neurolucida") == 0) { xpvalue("Line#", &selid_, 1, "selid(1)") if (swc.err) { xbutton("Problem points", "probpointpanel()") } }else if (strcmp(swc.filetype, "Neurolucida V3") == 0) { xpvalue("Line#", &selid_, 1, "selid(1)") }else{ xpvalue("Select id", &selid_, 1, "selid(1)") } xlabel("-------------------------------") xbutton("Edit", "map_edit()") xmenu("Export") xbutton("CellBuilder", "cbexport()") xbutton("Instantiate", "instantiate(nil)") xmenu() sprint(tstr, "%s filter facts", swc.filetype) xbutton(tstr, "swc.helptxt()") xpanel(0) deck.intercept(0) deck.flip_to(0) } proc map_edit() { if (editbox == nil) { build_edit() } if (editbox.ismapped) { return } sprint(tstr, "Edit %s", this) editbox.map(tstr) } proc build_edit() { editbox = new VBox() editbox.intercept(1) editbox.save("") xpanel("") ztransitem() xlabel("Select point:") xcheckbox("Largest z change", &dummy_, "sel_largest_dz()") xlabel("then action:") xcheckbox("z-translate rest of tree to parent point", &dummy_, "edit2()") xcheckbox("z-translate to average of adjacent points", &dummy_, "edit1()") xcheckbox("undo last", &dummy_, "edit0()") xlabel("-------------------") xcheckbox("3 point filter of all z values (no undo)", &dummy_, "edit3()") xpanel() editbox.intercept(0) } proc sel_largest_dz() {local i, j, dz, dzmax, imax, jmax localobj sec, tobj dummy_ = 0 dzmax = -1 for i = 0, swc.sections.count-1 { sec = swc.sections.object(i) tobj = sec.raw.getrow(2).deriv(1,1).abs j = tobj.max_ind dz = tobj.x[j] if (dz > dzmax) { jmax = j+1 imax = i dzmax = dz } } if (dzmax > 0) { selpoint_ = swc.sec2pt(imax, jmax) selpoint_dependent_show() swc.sections.object(imax).raw.getcol(jmax, rawsel) selid_ = swc.pt2id(selpoint_) pl() } } proc ztransitem() {local i, n localobj raw n = 0 for i = 0, swc.sections.count-1 { raw = swc.sections.object(i).raw if (abs(raw.x[2][0] - raw.x[2][1]) > 10) { n += 1 } } if (n > 0) { sprint(tstr, "z translation for %d abrupt branch backlash", n) xcheckbox(tstr, &ztrans_, "ztrans()") } } proc ztrans() { local i, zd, pn localobj sec if (ztrans_) { for i = 0, swc.sections.count-1 { sec = swc.sections.object(i) if (object_id(sec.parentsec) == 0) { continue } if (object_id(sec.parentsec.parentsec) == 0) { continue } zd = sec.raw.x[2][1] - sec.raw.x[2][0] if (abs(zd) > 5) { zd += sec.parentsec.ztrans }else{ zd = sec.parentsec.ztrans } sec.ztrans = zd sec.raw.setrow(2, sec.raw.getrow(2).sub(sec.ztrans)) pn = sec.parentsec.raw.ncol sec.raw.x[2][0] = sec.parentsec.raw.x[2][pn-1] } }else{ for i = 0, swc.sections.count-1 { sec = swc.sections.object(i) if (sec.ztrans) { sec.raw.setrow(2, sec.raw.getrow(2).add(sec.ztrans)) pn = sec.parentsec.raw.ncol sec.raw.x[2][0] = sec.parentsec.raw.x[2][pn-1] sec.ztrans = 0 } } } redraw() } proc edit0() {local i, n localobj sec dummy_ = 0 if (undo_type_ == 1) { i = swc.pt2sec(undo_selpoint_, sec) sec.raw.x[2][i] = undo_z_ sec.raw.getcol(i, rawsel) }else if (undo_type_ == 2) { i = swc.pt2sec(undo_selpoint_, sec) n = sec.raw.ncol for i=i, n-1 { sec.raw.x[2][i] += undo_z_ } sec.raw.getcol(i, rawsel) for i=0, swc.sections.count-1 { swc.sections.object(i).volatile = 0 } sec.volatile = 1 for i=0, swc.sections.count-1 { sec = swc.sections.object(i) if (object_id(sec.parentsec)) if (sec.parentsec.volatile) { sec.volatile = 1 sec.raw.setrow(2, sec.raw.getrow(2).add(undo_z_)) } } } undo_type_ = 0 redraw() } proc edit1() {local i, z1, z2 localobj sec // z translate to average of adjacent points dummy_ = 0 if (selpoint_ >= 0) { i = swc.pt2sec(selpoint_, sec) if (i > 0) { z1 = sec.raw.x[2][i-1] }else{ return } if (i < sec.raw.ncol-1) { z2 = sec.raw.x[2][i+1] }else{ return } undo_selpoint_ = selpoint_ undo_type_ = 1 undo_z_ = sec.raw.x[2][i] sec.raw.x[2][i] = (z1 + z2)/2 sec.raw.getcol(i, rawsel) } redraw() } proc edit2() {local i, ip, z1, n localobj sec // z-translate rest of tree to parent point dummy_ = 0 if (selpoint_ >= 0) { ip = swc.pt2sec(selpoint_, sec) if (ip > 0) { z1 = sec.raw.x[2][ip] - sec.raw.x[2][ip-1] }else{ return } undo_selpoint_ = selpoint_ undo_type_ = 2 undo_z_ = z1 n = sec.raw.ncol for i=ip, n-1 { sec.raw.x[2][i] -= z1 } sec.raw.getcol(ip, rawsel) for i=0, swc.sections.count-1 { swc.sections.object(i).volatile = 0 } sec.volatile = 1 for i=0, swc.sections.count-1 { sec = swc.sections.object(i) if (object_id(sec.parentsec)) if (sec.parentsec.volatile) { sec.volatile = 1 sec.raw.setrow(2, sec.raw.getrow(2).sub(z1)) } } } redraw() } proc edit3() {local i localobj sec dummy_ = 0 for i=0, swc.sections.count-1 { sec = swc.sections.object(i) sec.raw.setrow(2, sec.raw.getrow(2).medfltr) } if (selpoint_ >= 0) { i = swc.pt2sec(selpoint_, sec) sec.raw.getcol(i, rawsel) } redraw() } proc probpointpanel() { problist = new List() problist.browser("Problem points", "s") problist.select_action("probpoint(hoc_ac_)") swc.fillproblist(problist) problist.select(-1) } proc probpoint() {local i if ($1 < 0) {return} sscanf(problist.object($1).s, "%d:", &i) selid_ = i selid(0) } proc readfile() { readfile_ = 0 if (numarg() == 0) { file.chooser("r", "Import 3-D Reconstruction File", "*", "Read", "Cancel") if (file.chooser()) { if (!some_format()) { return } }else{ return } }else{ file = new File($s1) if (!some_format()) { return } } // if new file problist = nil deck.flip_to(-1) build_panel() deck.move_last(0) deck.flip_to(0) init1(swc) init2() doNotify() if (swc.err) { printf("\n") sprint(tstr, "%s: File translation problems. See the messages on the terminal", file.getname) continue_dialog(tstr) if (strcmp(swc.filetype, "Neurolucida V3") == 0) { swc.b2spanel(this) } } deck.remove_last() } func some_format() {local i, a,b,c,d,e,f,g, n if (!file.ropen()) { sprint(tstr, "Can't read %s", file.getname) continue_dialog(tstr) return 0 } while (1) { if (file.eof) { file.close sprint(tstr, "Can't figure out file format for %s", file.getname) continue_dialog(tstr) return 0 } file.gets(tstr) if (hoc_sf_.head(tstr, "^\\<\\?xml", tstr1) != -1) { if (nrnpython("")) { swc = new Import3d_MorphML() break }else{ file.close sprint(tstr, "Can't read MorphML: Python not available.") continue_dialog(tstr) return 0 } } n = sscanf(tstr, "%f %f %f %f %f %f %f", &a, &b, &c, &d, &e, &f, &g) if (n == 7) { swc = new Import3d_SWC_read() break } n = sscanf(tstr, "[%d,%d] (%f,%f,%f) %f", &a, &b, &c, &d, &e, &f) if (n == 6) { swc = new Import3d_Neurolucida_read() break } n = sscanf(tstr, "%d %s %d %f %f %f %f", &a, tstr, &b, &c, &d, &e, &f) if (n == 7) { swc = new Import3d_Eutectic_read() break } if (hoc_sf_.tail(tstr, "^[ \t]*", tstr1) != -1) { //unfortunately regexp does not allow an explicit "(" hoc_sf_.left(tstr1, 1) if (strcmp(tstr1, "(") == 0) { swc = new Import3d_Neurolucida3() break } } if (hoc_sf_.head(tstr, "^;[ \t]*V3", tstr1) != -1) { swc = new Import3d_Neurolucida3() break } } file.close filename = file.getname swc.input(filename) return 1 } proc pl_point() { local i, j, i1 localobj m, m0 if (viewsec.count) {m0 = swc.sections.object(0).xyz} for i=0, viewsec.count-1 { viewsec.object(i).pl_point(g) } } proc pl_centroid() {local i for i=0, swc.sections.count-1 { swc.sections.object(i).pl_centroid(g) } } proc pl_diam() {local i localobj sec for i=0, viewsec.count-1 { viewsec.object(i).pl_diam(g) } } proc pl() { localobj tobj g.erase_all if (show_diam_) {pl_diam()} pl_centroid() if (show_point_) {pl_point()} if (selpoint_ >= 0) { tobj = m2.mulv(rawsel) g.mark(tobj.x[0], tobj.x[1], "O", 12, 2, 1) swc.label(selpoint_, tstr) g.label(.1, .05, tstr, 2, 1, 0, 0, 1) } } proc redraw() { local i localobj sec if (selpoint_ >= 0) { i = swc.pt2sec(selpoint_, sec) sec.raw.getcol(i, rawsel) } showtype(viewtype_) rot(0,0) pl() } proc showtype() { viewtype_ = $1 viewsec.remove_all if ($1 == -10000) { typelabel_ = "View all types" for i=0, swc.sections.count - 1 { viewsec.append(swc.sections.object(i)) swc.sections.object(i).centroid_color = 2 } }else{ sprint(typelabel_, "View type %d", viewtype_) for i=0, swc.sections.count - 1 { if (swc.sections.object(i).type == viewtype_) { viewsec.append(swc.sections.object(i)) swc.sections.object(i).centroid_color = 2 }else{ swc.sections.object(i).centroid_color = 9 } } } } proc selpoint_dependent_show() { if (viewtype_ == -20000) { showdistal() }else if (viewtype_ == -30000) { showprox() }else if (viewtype_ == -40000) { showsec() }else if (viewtype_ == -50000) { showroot() } } proc showdistal() {local i localobj sec viewtype_ = -20000 typelabel_ = "Show distal (tree) from selected point" viewsec.remove_all for i=0, swc.sections.count - 1 { swc.sections.object(i).centroid_color = 9 } if (selpoint_ < 0) { return } swc.pt2sec(selpoint_, sec) // recursion is trivial but I want to avoid the depth so use the // fact that children are after the parent in the sections list sec.centroid_color = 2 viewsec.append(sec) for i=0, swc.sections.count - 1 { if (swc.sections.object(i).centroid_color == 2) { break } } for i=i+1, swc.sections.count - 1 { sec = swc.sections.object(i) if (sec.parentsec != nil) if (sec.parentsec.centroid_color == 2) { sec.centroid_color = 2 viewsec.append(sec) } } } proc showprox() {localobj sec viewtype_ = -30000 typelabel_ = "Show proximal (path to root) from selected point" viewsec.remove_all for i=0, swc.sections.count - 1 { swc.sections.object(i).centroid_color = 9 } if (selpoint_ < 0) { return } for (swc.pt2sec(selpoint_, sec); sec != nil; sec = sec.parentsec) { viewsec.append(sec) sec.centroid_color = 2 } } proc showsec() {localobj sec viewtype_ = -40000 typelabel_ = "Show section containing selected point" viewsec.remove_all for i=0, swc.sections.count - 1 { swc.sections.object(i).centroid_color = 9 } if (selpoint_ < 0) { return } swc.pt2sec(selpoint_, sec) if (sec != nil) { viewsec.append(sec) sec.centroid_color = 2 } } proc showroot() {localobj sec viewtype_ = -50000 typelabel_ = "Show root sections" viewsec.remove_all for i=0, swc.sections.count - 1 { sec = swc.sections.object(i) sec.centroid_color = 9 if (sec.parentsec == nil) { sec.centroid_color = 2 viewsec.append(sec) } } } proc selpoint1() { // deselection not supported by menu_tool if ($1 == 0) { selpoint_ = -1 } } proc selpoint() {local i, j if ($1 == 2) { nearest_point($2, $3, &i, &j) selpoint_ = swc.sec2pt(i, j) selpoint_dependent_show() swc.sections.object(i).raw.getcol(j, rawsel) selid_ = swc.pt2id(selpoint_) pl() } } proc selid() {local i, j localobj sec selpoint_ = swc.id2pt(selid_) selid_ = swc.pt2id(selpoint_) if (selpoint_ >= 0) { i = swc.pt2sec(selpoint_, sec) sec.raw.getcol(i, rawsel) } selpoint_dependent_show() pl() if ($1 == 1) { swc.label(selpoint_, tstr) print tstr } } proc zoom() {local x1,y1,scale,w,h,x0,y0 if ($1 == 2) { i = g.view_info() x = $2 y = $3 xrel=g.view_info(i, 11, $2) yrel=g.view_info(i, 12, $3) width=g.view_info(i,1) height=g.view_info(i,2) } if ($1 == 1) { x1 = g.view_info(i, 11, $2) y1 = g.view_info(i, 12, $3) y1 = (y1 - yrel) + (x1 - xrel) if(y1 > 2) { y1 = 2 } else if (y1 < -2) { y1 = -2 } scale = 10^(y1) w = width/scale h = height/scale x0 = x - w*xrel y0 = y - h*yrel g.view_size(i, x0, x0+w, y0, y0+h) } } proc translate() {local x0,y0 if ($1 == 2) { i = g.view_info() x = g.view_info(i, 5) y = g.view_info(i, 7) xrel=g.view_info(i, 11, $2) yrel=g.view_info(i, 12, $3) width=g.view_info(i,1) height=g.view_info(i,2) } if ($1 == 1) { x1 = g.view_info(i, 11, $2) y1 = g.view_info(i, 12, $3) x0 = x - width*(x1 - xrel) y0 = y - height*(y1 - yrel) g.view_size(i, x0, x0 + width, y0, y0 + height) } } func nearest_point() { local i, j, xmin localobj m, v1 // return section index and sectionpoint index in $3 and $4 xmin = 1e9 for i=0, swc.sections.count-1 { m = swc.sections.object(i).xyz v1 = m.getrow(0).sub($1).pow(2).add(m.getrow(1).sub($2).pow(2)) j = v1.min_ind if (v1.x[j] < xmin) { xmin = v1.x[j] $&3 = i $&4 = j } } return xmin } proc rotate() {local x, y, x0, y0, len, a if ($1 == 2) { rotated_ = 1 nearest_point($2, $3, &i, &j) swc.sections.object(i).xyz.getcol(j, origin) swc.sections.object(i).raw.getcol(j, raworigin) //print i, j origin.printf i = g.view_info() xpix = g.view_info(i,13, $2) ypix = g.view_info(i, 14, $3) // from top left = g.view_info(i, 5) bottom = g.view_info(i, 7) width=g.view_info(i,1) height=g.view_info(i,2) }else{ x = g.view_info(i,13, $2) - xpix y = ypix - g.view_info(i, 14, $3) // rotation axis is normal to the line, rotation magnitude // proportional to length of line len = sqrt(x*x + y*y) // rotation axis angle if (len > 0) { a = atan2(x, y) b = len/50 }else{ a = 0 b = 0 } rot(a, b) pl() tobj = rotmat.mulv(origin) //tobj.x[0] should be at same place as origin.x[0] x0 = left - origin.x[0] + tobj.x[0] y0 = bottom - origin.x[1] + tobj.x[1] g.view_size(i, x0, x0 + width, y0, y0 + height) } if ($1 == 3) { m2.c(rotmatold) //rotmatold.printf } } proc rotraw() {local x0, y0 width = g.view_info(0, 1) height = g.view_info(0, 2) left = g.view_info(0,5) bottom = g.view_info(0,7) if (rotated_ == 0) { //turn off rotmatold.c(rotsav) tobj = rotmatold.mulv(raworigin) //tobj.x[0] should be at same place as origin.x[0] x0 = left + raworigin.x[0] - tobj.x[0] y0 = bottom + raworigin.x[1] - tobj.x[1] rotmatold.ident }else{ // back to previous rotation rotsav.c(rotmatold) tobj = rotmatold.mulv(raworigin) //tobj.x[0] should be at same place as origin.x[0] x0 = left - raworigin.x[0] + tobj.x[0] y0 = bottom - raworigin.x[1] + tobj.x[1] } rot(0,0) pl() g.view_size(0, x0, x0 + width, y0, y0 + height) } proc rot45() { rot(PI/2, PI/4) rotated_=1 m2.c(rotmatold) pl() dummy_ = 0 } proc rot() {local s, c, i localobj sec s = sin($1) c = cos($1) m2.zero m2.x[2][2] = 1 m2.x[1][1] = m2.x[0][0] = c m2.x[1][0] = -s m2.x[0][1] = s //m2.printf s = sin($2) c = cos($2) rotmat.zero rotmat.x[0][0] = 1 rotmat.x[1][1] = rotmat.x[2][2] = c rotmat.x[1][2] = s rotmat.x[2][1] = -s //rotmat.printf m2.mulm(rotmat).mulm(m2.transpose(m2), rotmat) rotmat.mulm(rotmatold, m2) //rotmat.printf for i=0, swc.sections.count-1 { sec = swc.sections.object(i) sec.rotate(m2) } } proc cbexport() {local i, j, k localobj sec, cell chk_valid() j = 0 for i=0, swc.sections.count-1 { sec = swc.sections.object(i) if (sec.is_subsidiary) { continue } if (sec.parentsec == nil) { sec.volatile2 = j j += 1 }else{ sec.volatile2 = sec.parentsec.volatile2 } } cell = new List() for k=0, j-1 { cell.remove_all() for i=0, swc.sections.count-1 { sec = swc.sections.object(i) if (sec.is_subsidiary) { continue } if (sec.volatile2 == k) { cell.append(sec) } } cbexport1(cell) } } proc sphere_rep() { local i localobj x, y, z, d x = new Vector(3) y = x.c z = x.c d = x.c x.fill($o1.x[0]) y.fill($o2.x[0]) z.fill($o3.x[0]) d.fill($o4.x[0]) x.x[0] -= $o4.x[0]/2 x.x[2] += $o4.x[0]/2 $o1 = x $o2 = y $o3 = z $o4 = d } proc cbexport1() {local i, j, k, min localobj cb, sec, psec, cbsec, slist, m, subsetindex, xx, yy, zz, dd for i=0, $o1.count-1 { sec = $o1.object(i) sec.volatile = i } min = set_nameindex($o1) cb = new CellBuild() cb.topol.names_off = 1 cb.topol.circles_off = 1 slist = cb.topol.slist slist.remove_all() for i=0, $o1.count-1 { sec = $o1.object(i) psec = nil if (sec.parentsec != nil) { psec = slist.object(sec.parentsec.volatile) } type2name(sec.type, tstr) cbsec = new CellBuildSection(tstr, sec.nameindex, 0, psec, sec.parentx) slist.append(cbsec) m = sec.raw j = sec.first xx = m.getrow(0).c(j) yy = m.getrow(1).c(j) zz = m.getrow(2).c(j) dd = sec.d.c(j) if (sec.iscontour_) { contour2centroid(xx, yy, zz, dd, sec) } if (sec.parentsec == nil && dd.size == 1) { // represent spherical soma as 3 point cylinder // with L=diam sphere_rep(xx, yy, zz, dd) } k = dd.size-1 cbsec.position(xx.x[0], yy.x[0], xx.x[k], yy.x[k]) cbsec.i3d = k+1 cbsec.p3d = new P3D(k + 1) cbsec.p3d.x = xx cbsec.p3d.y = yy cbsec.p3d.z = zz cbsec.p3d.d = dd if (sec.first == 1) { cbsec.logstyle(m.x[0][0], m.x[1][0], m.x[2][0]) } cb.all.add(cbsec) } cb.topol.consist() cb.topol.update() cb.subsets.update() subsetindex = types.c.fill(0) k = 0 for i=0, types.size-1 { if (types.x[i] > 0) { k += 1 // after all subsetindex.x[i] = k j = i + min if (j == 1) { tstr = "somatic" }else if (j == 2) { tstr = "axonal" }else if (j == 3) { tstr = "basal" }else if (j == 4) { tstr = "apical" }else if (j < 0) { sprint(tstr, "minus_%dset", -j) }else{ sprint(tstr, "dendritic_%d", j) } m = new SNList(tstr) cb.subsets.snlist.append(m) } } for i=0, slist.count-1 { sec = $o1.object(i) cbsec = slist.object(i) cb.subsets.snlist.object(subsetindex.x[sec.type-min]).add(cbsec) } //cb.page(2) //unfortunately not able to blacken the radiobutton } func set_nameindex() {local i, min localobj sec min = swc.type.min types = new Vector(swc.type.max - min + 1) for i = 0, $o1.count-1 { sec = $o1.object(i) if (sec.is_subsidiary) { continue } sec.nameindex = types.x[sec.type - min] types.x[sec.type-min] += 1 } return min } proc instantiate() {local i, j, min, haspy, ispycontext localobj sec, xx, yy, zz, dd, pyobj, allpyobjs chk_valid() haspy = nrnpython("import neuron") ispycontext = 0 if (haspy) { pyobj = new PythonObject() allpyobjs = new List("PythonObject") if (allpyobjs.index($o1) >= 0) { ispycontext = 1 pyobj.neuron._create_all_list($o1) } } min = set_nameindex(swc.sections) // create for i = 0, types.size-1 { type2name(i+min, tstr) if (types.x[i] > 0) { if (!ispycontext) { sprint(tstr1, "~create %s[%d]\n", tstr, types.x[i]) execute(tstr1, $o1) } else { pyobj.neuron._create_sections_in_obj($o1, tstr, types.x[i]) $o1.all.extend(pyobj.getattr($o1, tstr)) } } if ($o1 != nil && !ispycontext) { mksubset($o1, i+min, tstr) } } if ($o1 != nil && !ispycontext) {execute("forall all.append", $o1) } // connect for i = 0, swc.sections.count-1 { sec = swc.sections.object(i) if (sec.is_subsidiary) { continue } name(sec, tstr) if (i == 0 && !ispycontext) { sprint(tstr1, "access %s", tstr) if ($o1 == nil) { execute(tstr1, $o1) } } if (sec.parentsec != nil) { name(sec.parentsec, tstr1) if (!ispycontext) { sprint(tstr1, "%s connect %s(0), %g", tstr1, tstr, sec.parentx) execute(tstr1, $o1) } else { pyobj.neuron._connect_sections_in_obj($o1, tstr, 0, tstr1, sec.parentx) } } // 3-d point info if (sec.first == 1) { if (ispycontext) { pyobj.neuron._pt3dstyle_in_obj($o1, tstr, sec.raw.x[0][0], sec.raw.x[1][0], sec.raw.x[2][0]) } else { sprint(tstr1, "%s { pt3dstyle(1, %g, %g, %g) }", tstr, sec.raw.x[0][0], sec.raw.x[1][0], sec.raw.x[2][0]) execute(tstr1, $o1) } } j = sec.first xx = sec.raw.getrow(0).c(j) yy = sec.raw.getrow(1).c(j) zz = sec.raw.getrow(2).c(j) dd = sec.d.c(j) if (sec.iscontour_) { if (haspy) { pyobj.neuron._declare_contour(sec, tstr) } // ensure stk_triang_vec available if needed (necessary for soma stack case) sec.pl_diam_mk_stk_triang_vec() contour2centroid(xx, yy, zz, dd, sec) } if (dd.size == 1) { sphere_rep(xx, yy, zz, dd) } for j = 0, dd.size-1 { if (ispycontext) { pyobj.neuron._pt3dadd_in_obj($o1, tstr, xx.x[j], yy.x[j], zz.x[j], dd.x[j]) } else { sprint(tstr1, "%s { pt3dadd(%g, %g, %g, %g) }",\ tstr,xx.x[j], yy.x[j], zz.x[j], dd.x[j]) execute(tstr1, $o1) } } } } proc chk_valid() {local i, x, replot localobj sec replot = 0 // some validity checks added in response to experienced file errors // sometimes we can work around them // two point sections with 0 length, remove, unless root for (i=swc.sections.count-1; i >= 0; i -= 1) { sec = swc.sections.object(i) if (sec.parentsec == nil) { continue } if ((sec.raw.ncol - sec.first) <= 1) { printf("One point section %s ending at line %d has been removed\n", sec, swc.iline.x[swc.id2line(sec.id)]) rm0len(i, sec) replot = 1 }else if ((sec.raw.ncol - sec.first) <= 2) { if (sec.raw.getcol(sec.first).eq(sec.raw.getcol(sec.first + 1))) { printf("Two point section ending at line %d with 0 length has been removed\n", swc.iline.x[swc.id2line(sec.id)]) rm0len(i, sec) replot = 1 } } } if (replot && g != nil) { redraw() } } proc rm0len() {local i localobj sec swc.sections.remove($1) for i=$1, swc.sections.count-1 { sec = swc.sections.object(i) if (sec.parentsec == $o2) { sec.parentsec = $o2.parentsec sec.parentx = $o2.parentx printf("\tand child %s reattached\n", sec) } } } proc mksubset() { if ($2 == 1) { tstr1 = "somatic" }else if ($2 == 2) { tstr1 = "axonal" }else if ($2 == 3) { tstr1 = "basal" }else if ($2 == 4) { tstr1 = "apical" }else if ($2 < 0) { sprint(tstr1, "minus_%dset", -$2) }else{ sprint(tstr1, "dendritic_%d", $2) } sprint(tstr1, "forsec \"%s\" %s.append", $s3, tstr1) execute(tstr1, $o1) } proc contour2centroid() {local i, j, imax, imin, ok localobj mean, pts, d, max, min, tobj, rad, rad2, side2, pt, major, m, minor if (object_id($o5.contour_list)) { contourstack2centroid($o1, $o2, $o3, $o4, $o5) return } mean = swc.sections.object(0).contourcenter($o1, $o2, $o3) if (g != nil) { g.beginline(6,1) for i=0, $o1.size-1 { g.line($o1.x[i], $o2.x[i]) } g.flush() } pts = new Matrix(3, $o1.size) for i=1,3 { pts.setrow(i-1, $oi.c.sub(mean.x[i-1])) } // find the major axis of the ellipsoid that best fits the shape // assuming (falsely in general) that the center is the mean m = new Matrix(3,3) for i=0, 2 { for j=i, 2 { m.x[i][j] = pts.getrow(i).mul(pts.getrow(j)).sum m.x[j][i] = m.x[i][j] } } tobj = m.symmeig(m) // major axis is the one with largest eigenvalue major = m.getcol(tobj.max_ind) // minor is normal and in xy plane minor = m.getcol(3-tobj.min_ind-tobj.max_ind) minor.x[2] = 0 minor.div(minor.mag) if (g != nil) { g.beginline(4, 3) g.line(mean.x[0], mean.x[1]) g.line(mean.x[0] + 20*major.x[0], mean.x[1] + 20*major.x[1]) g.flush } d = new Vector(pts.ncol) rad = new Vector(pts.ncol) for i=0, pts.ncol-1 { pt = pts.getcol(i) d.x[i] = pt.dot(major) // position on the line tobj = major.c.mul(d.x[i]) rad.x[i] = pt.dot(minor) } imax = d.max_ind d.rotate(-imax) rad.rotate(-imax) imin = d.min_ind side2 = d.c(imin) rad2 = rad.c(imin) d.resize(imin).reverse rad.resize(imin).reverse // now we have the two sides without the min and max points (rad=0) // we hope both sides now monotonically increase, i.e. convex // make it convex for (j = d.size-1; j > 0; j -= 1) { if (d.x[j] <= d.x[j-1]) { //printf("removed d %d %g\n", j, d.x[j]) d.remove(j) rad.remove(j) if (j != d.size()) { j += 1 } } } for (j = side2.size-1; j > 0; j -= 1) { if (side2.x[j] <= side2.x[j-1]) { //printf("removed side2 %d %g\n", j, side2.x[j]) side2.remove(j) rad2.remove(j) if (j != side2.size()) { j += 1 } } } // can interpolate so diams on either side of major have same d tobj = d.c.append(side2) tobj.sort i = tobj.x[1] j = tobj.x[tobj.size-2] tobj.indgen(i, j, (j-i)/20) rad.interpolate(tobj, d) rad2.interpolate(tobj,side2) d = tobj pts.resize(3, d.size) $o4.resize(d.size) for i = 0, d.size-1 { pt = major.c.mul(d.x[i]).add(mean) $o4.x[i] = abs(rad.x[i] - rad2.x[i]) tobj = pt.c.add(minor.c.mul(rad.x[i])) if (g != nil) g.beginline(5,3) g.line(tobj.x[0], tobj.x[1]) tobj = pt.c.add(minor.c.mul(rad2.x[i])) if (g != nil) g.line(tobj.x[0], tobj.x[1]) g.flush // pt.add(minor.c.mul(rad2.x[i])).add(minor.c.mul(rad.x[i])) pts.setcol(i, pt) } // avoid 0 diameter ends $o4.x[0] = ($o4.x[0]+$o4.x[1])/2 i = $o4.size-1 $o4.x[i] = ($o4.x[i]+$o4.x[i-1])/2 for i=1,3 { $oi = pts.getrow(i-1) } // print d d.printf print rad rad.printf // print side2 side2.printf print rad2 rad2.printf } proc contourstack2centroid() {local i, j, area, d localobj c area = $o5.stk_triang_area() printf("stk_triang_area = %g\n", area) for i=1,4 { $oi.resize(0) } c = $o5.approximate_contour_by_circle(&d) $o4.append(d) for i=1,3 { $oi.append(c.x[i-1]) } for j=0, $o5.contour_list.count-1 { c = $o5.contour_list.object(j).approximate_contour_by_circle(&d) $o4.append(d) for i=1,3 { $oi.append(c.x[i-1]) } } } proc name() { type2name($o1.type, $s2) if ($o1.nameindex > 0) { sprint($s2, "%s[%d]", $s2, $o1.nameindex) } } proc type2name() { if ($1 == 1) { $s2 = "soma" }else if ($1 == 2) { $s2 = "axon" }else if ($1 == 3) { $s2 = "dend" }else if ($1 == 4) { $s2 = "apic" }else if ($1 < 0) { sprint($s2, "minus_%d", -$1) }else{ sprint($s2, "dend_%d", $1) } } endtemplate Import3d_GUI neuron-7.5/share/lib/hoc/import3d/import3d_sec.hoc000077500000000000000000000237441323325274500221660ustar00rootroot00000000000000begintemplate Import3d_Section // primarily for display. Allows gui without instantiating sections // fid refers to the raw index of the point that id refers to. // For a root section fid is normally 0. For sections that have // parents, fid is normally 1 since the first point is often a copy of // the last point of the parent. // The variable first=0 means that when diam is shown, there // should be a glyph drawn defined by raw indices 0 and 1. // if this is a contour it may also contain a list of contours that // define a 3-d object public raw, xyz, d, id, append, g, mkglyph, rotate, type, centroid_color public iscontour_, pid, parentsec, parentx, volatile, nameindex, first, fid public contour_list, pl_centroid, pl_diam, pl_diam_mk_stk_triang_vec public stk_triang_vec, stk_triang_area, is_subsidiary public volatile2, contourcenter, ztrans, approximate_contour_by_circle public pl_point, insrt, set_pt, stk_center, accurate_triangle_area objref raw, xyz, d, g, parentsec, contour_list, this, stk_triang_vec proc init() { is_subsidiary = 0 ztrans = 0 first = 0 fid = 0 nameindex=0 parentx = 1 volatile = 0 volatile2 = 0 pid = -1 iscontour_ = 0 type = 0 centroid_color = 2 id = $1 raw = new Matrix(3, $2) xyz = new Matrix(3, $2) d = new Vector($2) } proc set_pt() { raw.x[0][$1] = $2 raw.x[1][$1] = $3 raw.x[2][$1] = $4 d.x[$1] = $5 } proc append() {local i, j for i=0, $3-1 { j = $1 + i k = $2 + i set_pt(j, $o4.x[k], $o5.x[k], $o6.x[k], $o7.x[k]) } } proc insrt() {local i, nr, nc nr = raw.nrow nc = raw.ncol d.resize(nc+1) raw.resize(nr, nc+1) xyz.resize(nr, nc+1) for (i=nc-1; i >= $1; i -= 1) { raw.setcol(i+1, raw.getcol(i)) d.x[i+1] = d.x[i] } set_pt($1, $2, $3, $4, $5) } proc pl_centroid() {local i, n xyz.getrow(1).line($o1, xyz.getrow(0), centroid_color, 1) if (iscontour_) { n = xyz.ncol - 1 $o1.beginline(centroid_color, 1) $o1.line(xyz.x[0][0], xyz.x[1][0]) $o1.line(xyz.x[0][n], xyz.x[1][n]) } if (0) { if (object_id(contour_list)) { for i=0, contour_list.count-1 { contour_list.object(i).pl_centroid($o1) } } } } proc pl_diam_mk_stk_triang_vec() { if (object_id(contour_list)) { if (!object_id(contour_list.object(0).stk_triang_vec)) { mk_stk_triang_vec(this, contour_list.object(0)) for i=1, contour_list.count-1 { mk_stk_triang_vec(contour_list.object(i-1), contour_list.object(i)) } } } } proc pl_diam() {local i if (!iscontour_) { mkglyph() $o1.glyph(g, 0, 0) }else{ if (object_id(contour_list)) { pl_diam_mk_stk_triang_vec() pl_stk_triang($o1, this, contour_list.object(0)) for i=1, contour_list.count-1 { pl_stk_triang($o1, contour_list.object(i-1), contour_list.object(i)) } } } } proc pl_point() {local i for i=first, xyz.ncol-1 { $o1.mark(xyz.x[0][i], xyz.x[1][i], "s", 5, 3, 1) } if (object_id(parentsec) == 0) { $o1.mark(xyz.x[0][0], xyz.x[1][0], "S", 8, 3, 1) } if (0) { if (object_id(contour_list)) { for i=0, contour_list.count-1 { contour_list.object(i).pl_point($o1) } } } } proc mkglyph() {local i, d1, d2 localobj x, y, norm, x1, y1, i1 g = new Glyph() if (xyz.ncol - first < 1) { return } // normal x1 = xyz.getrow(0) y1 = xyz.getrow(1) if (xyz.ncol - first == 1) { // render as spherical g.circle(x1.x[0], y1.x[0], d.x[0]/2) g.fill(1) return } // may or may not want to include parent point in glyph x = x1.c(first).deriv(1,1) y = y1.c(first).deriv(1,1) // point separations norm = x.c.mul(x).add(y.c.mul(y)).sqrt.mul(2) // d is diam, need radius // only want frustra for the non-zero separations i1=norm.c.indvwhere("!=", 0) if (i1.size == 0) { // printf("Section with id=%d has 0 length in this projection\n", id) return } norm.index(norm, i1) x.index(x, i1).div(norm) y.index(y, i1).div(norm) // but take care of the possible index offset due to missing parent point if (first) { i1.add(first) } i1.append(x1.size-1) x1.index(x1, i1) y1.index(y1, i1) for i = 0, x.size-1 { d1 = d.x[i1.x[i]] d2=d.x[i1.x[i]+1] g.path() g.m(x1.x[i]+y.x[i]*d1, y1.x[i]-x.x[i]*d1) g.l(x1.x[i+1]+y.x[i]*d2, y1.x[i+1]-x.x[i]*d2) g.l(x1.x[i+1]-y.x[i]*d2, y1.x[i+1]+x.x[i]*d2) g.l(x1.x[i]-y.x[i]*d1, y1.x[i]+x.x[i]*d1) g.close() g.fill(1) } } proc rotate() { $o1.mulm(raw, xyz) if (1) { if (object_id(contour_list)) { for i=0, contour_list.count-1 { contour_list.object(i).rotate($o1) } } } } // a utility function obfunc contourcenter() {local i localobj mean, pts, perim, d // convert contour defined by $o1, $o2, $o3 vectors to // 100 uniform points around perimeter // and return the center coordinates as well as the uniform contour // vectors (in $o1, $o2, $o3) pts = new Matrix(3, $o1.size) for i=1,2 { pts.setrow(i-1, $oi) } for i=0,2 {pts.setrow(i, pts.getrow(i).append(pts.x[i][0]).deriv(1,1)) } perim = new Vector(pts.ncol) for i=1, pts.ncol-1 { perim.x[i] = perim.x[i-1] + pts.getcol(i-1).mag } d = new Vector(101) d.indgen(perim.x(perim.size-1)/100) for i=1,3 $oi.interpolate(d, perim) mean = new Vector(3) for i=1, 3 { mean.x[i-1] = $oi.mean } return mean } // return center (Vector.size=3) and average diameter in $&1 obfunc approximate_contour_by_circle() {local i,n, perim localobj center, x, y, z x=raw.getrow(0) y=raw.getrow(1) z=raw.getrow(2) perim = 0 n = x.size for i = 0, n-1 { perim += edgelen(raw.getcol(i), raw.getcol((i+1)%n)) } center = contourcenter(x, y, z) if (0) { $&1 = perim/PI }else{ x.sub(center.x[0]).mul(x) y.sub(center.x[1]).mul(y) z.sub(center.x[2]).mul(z) // $&1 = 2*x.add(y).add(z).sqrt.mean // average of radius based on perim and mean radius of all points $&1 = x.add(y).add(z).sqrt.mean + perim/(2*PI) } // printf("%g %g %g %g\n", center.x[0], center.x[1], center.x[2], $&1) // printf("perimeter approx = %g actual = %g\n", PI*$&1, perim) return center } proc mk_stk_triang_vec() {local i, j, n1, n2, d1, d2 localobj i1, i2, trv trv = new Vector() $o2.stk_triang_vec = trv // contour indices are chosen so points 0 cross 1 of a contour from center // are in +z direction and points 0 between the two contours are // guaranteed to be an edge. An extra index added to end to close the polygon // I suppose this could fail if angle does not increase monotonically stk_contour_indices($o1, i1, $o1.raw.getcol(0)) stk_contour_indices($o2, i2, $o1.raw.getcol(0)) i = 0 j = 0 n1 = i1.size-1 n2 = i2.size-1 while(i < n1 || j < n2) { trv.append(i1.x[i], i2.x[j]) if (i < n1 && j < n2) { // which next one is shorter d1 = ($o1.raw.x[0][i1.x[i]] - $o2.raw.x[0][i2.x[j+1]])^2 + ($o1.raw.x[1][i1.x[i]] - $o2.raw.x[1][i2.x[j+1]])^2 d2 = ($o1.raw.x[0][i1.x[i+1]] - $o2.raw.x[0][i2.x[j]])^2 + ($o1.raw.x[1][i1.x[i+1]] - $o2.raw.x[1][i2.x[j]])^2 if (d2 < d1) { i += 1 }else{ j += 1 } }else{ if (i < n1) { i += 1 }else{ j += 1 } } } trv.append(i1.x[i], i2.x[j]) } proc stk_contour_indices() {local i, d, dmin, imin localobj c, x, y, z $o2 = new Vector($o1.raw.ncol) $o2.indgen() // order the points counterclockwise. ie 0 cross 1 in -z direction x = $o1.raw.getrow(0) y = $o1.raw.getrow(1) z = $o1.raw.getrow(2) c = contourcenter(x, y, z) x = $o1.raw.getcol(0).sub(c) y = $o1.raw.getcol(1).sub(c) if (x.x[0]*y.x[1] - x.x[1]*y.x[0] > 0) { $o2.reverse() } // which point is closest to $o3 imin = -1 dmin = 1e9 for i=0, $o2.size - 1 { d = edgelen($o1.raw.getcol($o2.x[i]), $o3) if (d < dmin) { dmin = d imin = i } } $o2.rotate(-imin) $o2.append($o2.x[0]) } proc pl_stk_triang() {local i, j localobj g, m1, m2, trv g = $o1 m1 = $o2.xyz m2 = $o3.xyz trv = $o3.stk_triang_vec for i=0, trv.size-1 { g.beginline(centroid_color, 1) j = trv.x[i] g.line(m1.x[0][j], m1.x[1][j]) i += 1 j = trv.x[i] g.line(m2.x[0][j], m2.x[1][j]) } } func edgelen() { return sqrt($o1.c.sub($o2).sumsq) } func stk_triang_area1() {local area, i, i1, i2, j1, j2, a, b, c, na localobj m1, m2, trv area = 0 m1 = $o1.raw m2 = $o2.raw trv = $o2.stk_triang_vec i1 = trv.x[0] i2 = trv.x[1] a = edgelen(m1.getcol(i1), m2.getcol(i2)) na = 0 for i=2, trv.size-1 { j1 = trv.x[i] i += 1 j2 = trv.x[i] b = edgelen(m1.getcol(j1), m2.getcol(j2)) // which contour for side c if (i1 == j1) { c = edgelen(m2.getcol(i2), m2.getcol(j2)) }else{ c = edgelen(m1.getcol(i1), m1.getcol(j1)) } area += accurate_triangle_area(a, b, c) na += 1 i1 = j1 i2 = j2 a = b } //printf("stk_triang_area1 na=%d npoints=%d\n", na, m1.ncol+m2.ncol) // missing one triangle return area } func stk_triang_area() {local area, i area = stk_triang_area1(this, contour_list.object(0)) for i=1, contour_list.count-1 { area += stk_triang_area1(contour_list.object(i-1), contour_list.object(i)) } return area } // the center of the centroid of the contour stack obfunc stk_center() {local i, len, th localobj c, centroid, x, y, z, r, lenvec centroid = new Matrix(3, 1 + contour_list.count) lenvec = new Vector(centroid.ncol) lenvec.resize(1) x = raw.getrow(0) y = raw.getrow(1) z = raw.getrow(2) c = contourcenter(x, y, z) centroid.setcol(0, c) len = 0 for i=0, contour_list.count-1 { r = contour_list.object(i).raw x = r.getrow(0) y = r.getrow(1) z = r.getrow(2) c = contourcenter(x, y, z) centroid.setcol(i+1, c) len += sqrt(c.sub(centroid.getcol(i)).sumsq) lenvec.append(len) } len = len/2 if (len == 0) { c = centroid.getcol(0) return c } i = lenvec.indwhere(">", len) th = (len - lenvec.x[i-1])/(lenvec.x[i] - lenvec.x[i-1]) for j=0, 2 { c.x[j] = th*centroid.x[j][i] + (1 - th)*centroid.x[j][i-1] } return c } func accurate_triangle_area() {local x localobj a // from http://http.cs.berkeley.edu/~wkahan/Triangle.pdf // W. Kahan x = float_epsilon float_epsilon = 0 a = new Vector(3) a.resize(0) a.append($1, $2, $3).sort if ((a.x[0] - (a.x[2] - a.x[1])) < 0) { float_epsilon = x execerror("accurate_triangle_area:","not a triangle") } float_epsilon = x x = .25*sqrt((a.x[2]+(a.x[1]+a.x[0])) * (a.x[0]-(a.x[2]-a.x[1])) \ * (a.x[0]+(a.x[2]-a.x[1])) * (a.x[2]+(a.x[1]-a.x[0]))) return x } endtemplate Import3d_Section neuron-7.5/share/lib/hoc/import3d/read_morphml.hoc000066400000000000000000000037661323325274500222430ustar00rootroot00000000000000 begintemplate Import3d_MorphML public input, filetype, type, sections, err, parsed public pt2id, id2pt, pt2sec, sec2pt, label, id2line objref type, sections, this, p, nil objref cables, points, cableid2index strdef filetype, tstr proc init() { nrnpython("from neuron.neuroml.rdxml import rdxml") //print "Import3d_MorphML" filetype = "MorphML" p = new PythonObject() } proc input() { //print "Import3d_MorphML.input" type = new Vector() sections = new List(1000) err = 0 p.rdxml($s1, this) } proc parsed() {local i, j, ip, jp localobj cab, sec, pt cables = $o1.cables_ points = $o1.points_ cableid2index = $o1.cableid2index_ // ptid2pt = $o1.ptid2pt_ //print $o1, cables.__len__() for i=0, cables.__len__() - 1 { cab = cables._[i] sec = new Import3d_Section(cab.first_, cab.pcnt_) sections.append(sec) if (cab.parent_cable_id_ >= 0) { ip = $o1.cableid2index_[cab.parent_cable_id_] sec.parentsec = sections.object(ip) sec.parentx = cab.px_ } //print i, cab.id_, cab.name_ for j=0, cab.pcnt_ - 1 { jp = cab.first_ + j pt = points._[jp] sec.set_pt(j, pt.x_, pt.y_, pt.z_, pt.d_) } } } func pt2id() { //print "pt2id ", $1 if ($1 < 0) { return 0 } if ($1 >= points.__len__()) { return points.__len__() - 1 } return $1 } func id2pt() { //print "id2pt ", $1 return $1 } func pt2sec() {local cid, cindex //print "pt2sec ", $1, " cid=", points._[$1].cid_ cid = points._[$1].cid_ cindex = cableid2index._[cid] //print " cindex=", cindex, " first=", cables._[cindex].first_ $o2 = sections.object(cindex) //printf("pt2sec %s\n", $o2) return $1 - cables._[cindex].first_ } func sec2pt() {local i localobj sec sec = sections.object($1) //print "sec2pnt ", $1, $2, " secid=", sec.id, " cabid=", cables._[$1].id_ i = sec.id + $2 - sec.fid return i } func id2line() { //print "id2line ", $1 return $1 } proc label() {localobj pt pt = points._[$1] sprint($s2, "pt[%d] Line %d x=%g y=%g z=%g d=%g", $1, pt.lineno_, pt.x_, pt.y_, pt.z_, pt.d_) } endtemplate Import3d_MorphML neuron-7.5/share/lib/hoc/import3d/read_nlcda.hoc000077500000000000000000000400741323325274500216420ustar00rootroot00000000000000// Assume that except for soma, the move and line items form a tree // where, generally, a move is at the same point of the line to which // it is connected. Under this assumption, all major codes except 1 and 2 // can be ignored. // An exception is the [10,5] code for branch point. The next point // is generally a line (not a move) with the same x,y,z of the branch point. begintemplate Import3d_Neurolucida_read public input, pheader public type, x, y, z, d, iline, header, point2sec, sections, lines public label, id2pt, id2line, pt2id, pt2sec, sec2pt, file, filetype, err public points, pointtype, branchpoints, firstpoints public helptxt, iline2pt, mark, fillproblist external hoc_sf_ objref major, minor, x, y, z, d, iline, header, lines, iline2sec objref type, pointtype, points, iline2pt objref file, vectors, sec2point, point2sec, sections objref firstpoints, branchpoints objref cursec, diam, nil, gm objref line_branch_err, parse_err, xyparent_err, xynotnearest_err, noparent_err objref line_coincide_err, line_branch_err_pt, somabbox_err strdef tstr, line, filetype double a[7] proc init() { filetype = "Neurolucida" vectors = new List() header = new List() lines = new List() gm = new GUIMath() } proc input() { err = 0 line_branch_err = new List() parse_err = new List() xyparent_err = new List() xynotnearest_err = new List() noparent_err = new List() line_coincide_err = new List() somabbox_err = new List() line_branch_err_pt = new Vector() rdfile($s1) find_parents() repair_diam() connect2soma() if (err) { errout() } } proc repair_diam() {local i localobj sec // I am told, and it seems the case, that // the first point incorrectly always has the diameter of // the last point of the previous branch. For this reason // we set the diameter of the first point to the diameter // of the second point in the section for i=0, sections.count-1 { sec = sections.object(i) if (sec.parentsec != nil) { if (sec.first < sec.d.size-1){ sec.d.x[sec.first] = sec.d.x[sec.first + 1] } } } } proc rdfile() {local i, j file = new File($s1) // count lines for vector allocation space (not really necessary) if (!file.ropen()) { err = 1 printf("could not open %s\n", $s1) } for (i = 0; !file.eof(); i += 1) { file.gets(line) } file.close() // printf("%s has %d lines\n", $s1, i) alloc(i, major, minor, x, y, z, d, iline, pointtype, points) diam = d file.ropen() for (i = 1; !file.eof(); i += 1) { file.gets(line) parse(i, line) } file.close() iline2pt = new Vector(iline.x[iline.size-1]) j = 0 for i=0, points.size-2 { while(j <= iline.x[points.x[i]]) { iline2pt.x[j] = i j += 1 } } for j=j, iline2pt.size-1 { iline2pt.x[j] = points.size-1 } } proc alloc() { local i // $oi.size = 0 but enough space for $1 elements for i = 2, numarg() { $oi = new Vector($1) $oi.resize(0) vectors.append($oi) } } func dist() {local x1, y1, z1 x1 = ($1 - x.x[$4]) y1 = ($2 - y.x[$4]) z1 = ($3 - z.x[$4]) return sqrt(x1*x1 + y1*y1 + z1*z1) } func xydist() {local x1, y1 x1 = (x.x[$1] - x.x[$2]) y1 = (y.x[$1] - y.x[$2]) return sqrt(x1*x1 + y1*y1) } func xysame() { if ($1 == x.x[$3]) { if ($2 == y.x[$3]) { return 1 } } return 0 } proc parse() {local i, n, m n = sscanf($s2, "[%d,%d] (%f,%f,%f) %f", &a[0], &a[1], &a[2],\ &a[3], &a[4], &a[5]) hoc_sf_.left($s2, hoc_sf_.len($s2)-1) if (n == 6) { a[5] *= 2 iline_ = major.size if (a[0] == 1) { // line m = major.x[iline_ - 1] if (m == 10 && minor.x[iline_-1] == 5) { pointtype.append(0) points.append(iline_) if (!xysame(a[2], a[3], iline_-1)) { err = 1 line_branch_err_pt.append(points.size-1) sprint(tstr, "%d: %s separated by %g from branch",\ $1, $s2, dist(a[2], a[3], a[4], iline_-1)) line_branch_err.append(new String(tstr)) } }else if (m == 1 || m == 2) { pointtype.append(1) points.append(iline_) }else{ pointtype.append(1) points.append(iline_) } }else if (a[0] == 2) { // move pointtype.append(0) points.append(iline_) }else if (a[0] == 10 && a[1] == 5) { // branch pointtype.append(2) points.append(iline_) }else{ } for i=0, 5 { vectors.object(i).append(a[i]) } iline.append($1) // for error messages lines.append(new String($s2)) } else if (n == 0) { // comment header.append(new String($s2)) } else { err = 1 sprint(tstr, "%d: %s parse failure after item %d", $1, $s2, n) parse_err.append(new String(tstr)) } } proc mark() {local i, a,b,c,d,e,f print $o1, $2, iline, lines i = iline.indwhere("==",$2) printf("%d,%d: %s\n", i, iline.x[i], lines.object(i).s) n = sscanf(lines.object(i).s, "[%d,%d] (%f,%f,%f) %f", &a,&b,&c,\ &d,&e,&f) if (n == 6) { print a,b,c,d,e,f $o1.mark(c,d,"S",12,4,1) } } proc pheader() {local i for i=0, header.count-1 { printf("%s", header.object(i).s) } } proc find_parents() {local i, j, m, ip, jp, jpmin, d, dmin, xi,yi,zi, bp, ip1 // we need to associate all pointtype=0 with a branch point (except the // ones conceptually connected to the soma // assume the pid is earlier than the pointtype=0 point2sec = points.c.fill(-1) branchpoints = pointtype.c.indvwhere("==", 2) firstpoints = pointtype.c.indvwhere("==", 0) sections = new List() type = firstpoints.c.fill(0) for i=0, firstpoints.size-1 { ip = points.x[firstpoints.x[i]] newsec(i) type.x[i] = cursec.type xi = x.x[ip] yi = y.x[ip] zi = z.x[ip] dmin = 1e9 jpmin = -1 m = minor.x[ip] if (m == 41) { // soma start (contour continue /* some files use these as branch beginnings so check this after seeing if there are coincident points. }else if (m == 1) { // dendrite start continue }else if (m == 21) { // axon start continue }else if (m == 61) { // apical dendrite start continue */ } if (line_branch_err_pt.size) { j = line_branch_err_pt.x[0] if (ip == points.x[j]) { physcon(i, ip, ip-1, j-1) line_branch_err_pt.remove(0) continue } } for j=0, branchpoints.size-1 { jp = points.x[branchpoints.x[j]] if (ip <= jp) { break } d = dist(xi, yi, zi, jp) if (d < dmin) { bp = branchpoints.x[j] dmin = d jpmin = jp } } if (dmin <= 0) { cursec.parentsec = sections.object(point2sec.x[bp]) }else if (m == 1) { // dendrite start continue }else if (m == 21) { // axon start continue }else if (m == 61) { // apical dendrite start continue }else{ err = 1 sprint(tstr, "%d: %s branch at line %d is %.4g away",\ iline.x[ip], lines.object(ip).s, iline.x[jpmin], dmin) d = xydist(ip, jpmin) if (d <= 0) { // overlay branch point in xy plane? xyparent_err.append(new String(tstr)) physcon(i, ip, jpmin, bp) }else if (ip > 0) { // sometime it coincides with a previous LineTo ip1 = firstpoints.x[i]-1 d = dist(xi, yi, zi, points.x[ip1]) if (d <= 0) { sprint(tstr, "%s\n but coincides with line %d", tstr, iline.x[points.x[ip1]]) line_coincide_err.append(new String(tstr)) cursec.parentsec = sections.object(point2sec.x[ip1]) }else if (try_xy_coincide(i, ip)){ xynotnearest_err.append(new String(tstr)) }else{ noparent_err.append(new String(tstr)) } } } } } func try_xy_coincide() {local j, jp, d // sometimes it coincides in the xy plane with a branch point // even though it is not the nearest point and therefore we // assume that is the parent point for j=0, branchpoints.size-1 { jp = points.x[branchpoints.x[j]] if ($2 <= jp) { break } d = xydist($2, jp) if (d <= 0) { sprint(tstr, "%s\n but coincides with branch point at line %d", tstr, iline.x[jp]) bp = branchpoints.x[j] physcon($1, $2, jp, bp) return 1 } } return 0 } proc physcon() { cursec.parentsec = sections.object(point2sec.x[$4]) cursec.insrt(0, x.x[$3], y.x[$3], z.x[$3], d.x[$2]) cursec.id -= 1 } proc newsec() {local i, ip, n, m, first, isec first = firstpoints.x[$1] ip = points.x[first] if ($1 < firstpoints.size-1) { n = firstpoints.x[$1+1] - first }else{ n = points.size - first } cursec = new Import3d_Section(first, n) isec = sections.count sections.append(cursec) for i = 0, n-1 { cursec.append(i, points.x[i+first], 1, x, y, z, d) point2sec.x[i+first] = isec } m = minor.x[ip] if (m == 1 || m == 2) { // dendrite cursec.type = 3 }else if (m == 21 || m == 22) { //axon cursec.type = 2 }else if (m == 41 || m == 42) { // soma cursec.type = 1 cursec.iscontour_ = 1 }else if (m == 61 || m == 62) { // apdendrite cursec.type = 4 }else{ err = 1 printf("%s line %d: don't know section type: %s\n",\ file.getname, iline.x[ip], lines.object(ip).s) } } proc connect2soma() {local i, ip, j, jp, bp, jpmin, dmin, d, xmin, xmax, ymin, ymax localobj soma, sec, xc, yc, zc, c, psec, r // find centroid of soma if outline and connect all dangling // dendrites to that if inside the contour for i=0, sections.count-1 { sec = sections.object(i) if (sec.type == 1 && sec.iscontour_ == 1) { soma = sec sections.remove(i) sections.insrt(0, soma) break } } if (soma == nil) { return } xc = soma.raw.getrow(0) yc = soma.raw.getrow(1) zc = soma.raw.getrow(2) xmin = xc.min-.5 xmax = xc.max + .5 ymin = yc.min-.5 ymax = yc.max + .5 c = soma.contourcenter(xc, yc, zc) for i=0, sections.count-1 { sec = sections.object(i) if (sec.parentsec == nil && sec != soma) { if (gm.inside(sec.raw.x[0][0], sec.raw.x[1][0], xmin, ymin, xmax, ymax)) { sec.parentsec = soma sec.parentx = .5 sec.insrt(0, c.x[0], c.x[1], c.x[2], .01) sec.id -= 1 sec.first = 1 }else{ // is same as end point of earlier section? ip = points.x[sec2pt(i, 0)] d = 1e9 for j=0, i-1 { psec = sections.object(j) jp = psec.d.size-1 r = psec.raw d = dist(r.x[0][jp], r.x[1][jp], r.x[2][jp], ip) if (d == 0) { sec.parentsec = psec break } } if (d == 0) { continue } ip = points.x[sec2pt(i, 0)] dmin = dist(c.x[0], c.x[1], c.x[2], ip) jpmin = -1 for j=0, branchpoints.size-1 { jp = points.x[branchpoints.x[j]] if (ip <= jp) { break } d = dist(x.x[ip], y.x[ip], z.x[ip], jp) if (d < dmin) { bp = branchpoints.x[j] dmin = d jpmin = jp } } err = 1 sprint(tstr, "%d: %s is outside soma, logically connect to", iline.x[ip], lines.object(ip).s) if (jpmin == -1) { sprint(tstr, "%s soma", tstr) sec.parentsec = soma sec.insrt(0, c.x[0], c.x[1], c.x[2], .01) sec.id -= 1 }else{ jp = jpmin sprint(tstr, "%s %d", tstr, iline.x[jp]) sec.parentsec = sections.object(point2sec.x[bp]) sec.insrt(0, x.x[jp], y.x[jp], z.x[jp], .01) sec.id -= 1 } sec.first = 1 somabbox_err.append(new String(tstr)) } } } } // note selpoint defined in swc_gui.hoc as sec.id + j // selpoint is the points index // ie. the first points of the sections are firstpoints proc label() {local i i = points.x[$1] sprint($s2, "Line %d: %s", iline.x[i], lines.object(i).s) } func id2pt() { if ($1 < 0) { return -1 } if ($1 >= iline2pt.size) { return iline2pt.x[iline2pt.size-1]} return iline2pt.x[$1] } func id2line() { return points.x[$1] } func pt2id() { if ($1 < 0) {return -1} return iline.x[points.x[$1]] } func pt2sec() {local i i = firstpoints.indwhere(">", $1) if (i == -1) { i = firstpoints.size } $o2 = sections.object(i-1) j = $1 - $o2.id return j } func sec2pt() { //print "sec2pt ", $1, $2, sections.object($1).id return sections.object($1).id + $2 } proc helptxt() { xpanel("Neurolucida file filter characteristics") xlabel(" The only lines utilized are [1,x], [2,x], and [5,10]. i.e , LineTo,") xlabel("MoveTo, and Branch lines. ") xlabel(" Sections generally consist of MoveTo followed by sequence of LineTo,") xlabel("and possibly ending with Branch. Intervening lines of other major types") xlabel("are ignored. ") xlabel(" The type of the section (dendrite, axon, soma outline, or apical) is") xlabel("determined by the minor code of the first point in the branch. ") xlabel(" Coincidence of the first x,y,z point of a section with the last") xlabel("(branch) point of some section defines a connection between child and") xlabel("parent section. However most files contain errors and the following") xlabel("heuristics are applied to the first points of problem sections when the") xlabel("parent is not obvious. EACH PROBLEM POINT SHOULD BE EXAMINED to") xlabel("determine if the correction is suitable. ") xlabel(" 1) The first point after a Branch point is a MoveTo which is") xlabel("coincident in the xy plane but not in the z axis. A physical connection") xlabel("is made with the diam of the MoveTo. ") xlabel(" 2) The nearest branch point is coincident in the xy plane. A physical") xlabel("connection is made with the diam of the MoveTo.") xlabel(" 3) There is no coincident branchpoint in the xy plane but the MoveTo") xlabel("is 3-d coincident with the preceding LineTo point. A logical connection") xlabel("is made to the section containing the LineTo point.") xlabel(" 4) There is an xy plane coincident branch point but it is not the") xlabel("nearest in a 3-d sense. A physical connection is made to the section") xlabel("containing the xy plane coincident point. ") xlabel(" 5) The first point of the branch is not a soma, dendrite, axon, or") xlabel("apical start point and there is no xy plane coincident branch point. ") xlabel("The branch remains unattached (but see heuristic 6). ") xlabel(" 6) All unattached branches within 0.5 microns of the soma contour") xlabel("bounding box are logically connected to the soma contour section. ") xlabel("I am told, and it seems to be the case, that the first point in a") xlabel("branch always has a diameter value of the last point in the previous") xlabel("branch. For this reason we set the first point to the diameter of") xlabel("of the second point in each section that has a parent branch.") xlabel("If this is not the right thing to do then comment out the call to") xlabel("repair_diam() in the input() procedure of read_nlcda.hoc") xpanel(1) } proc errout() {local i printf("\n%s problems and default fixes\n\n", file.getname) if (parse_err.count) { printf(" Following lines could not be parsed\n") for i=0, parse_err.count-1 { printf(" %s\n", parse_err.object(i).s) } printf("\n") } if (line_branch_err.count) { printf(" LINETO follows branch and does not coincide in the xy plane.\n") printf(" Make a physical connection using the LINETO diameter.\n") for i = 0, line_branch_err.count-1 { printf(" %s\n", line_branch_err.object(i).s) } printf("\n") } if (xyparent_err.count) { printf(" Nearest branch point is coincident in xy plane.\n Make a physical connection with diam of the MOVETO\n") for i=0, xyparent_err.count-1 { printf(" %s\n", xyparent_err.object(i).s) } printf("\n") } if (line_coincide_err.count) { printf(" No coincident branchpoint in xy plane but 3-d coincident to previous LINETO.\n") printf(" point. Make a logical connection to the section containing that LINETO\n") for i=0, line_coincide_err.count-1 { printf(" %s\n", line_coincide_err.object(i).s) } printf("\n") } if (xynotnearest_err.count) { printf(" The xy plane coincident branch point is not the nearest in the 3-d sense.\n") printf(" However we connect physically to the indicated xy coincident branch point\n") for i=0, xynotnearest_err.count-1 { printf(" %s\n", xynotnearest_err.object(i).s) } printf("\n") } if (noparent_err.count) { printf(" Cannot figure out which is the parent\n") printf(" No coincident (even in xy plane) branch point.\n") for i=0, noparent_err.count-1 { printf(" %s\n", noparent_err.object(i).s) } printf("\n") } if (somabbox_err.count) { printf(" Unconnected branch is more than .5 microns outside the soma bounding box.\n") printf(" Connect logically to nearest branch point\n") for i=0, somabbox_err.count-1 { printf(" %s\n", somabbox_err.object(i).s) } printf("\n") } } proc fillproblist() { fillproblist1($o1, parse_err, line_branch_err, xyparent_err, line_coincide_err, xynotnearest_err, noparent_err, somabbox_err) } proc fillproblist1() { local i, j for i=2, numarg() { for j=0, $oi.count-1 { $o1.append($oi.object(j)) } } } endtemplate Import3d_Neurolucida_read neuron-7.5/share/lib/hoc/import3d/read_nlcda3.hoc000077500000000000000000000663541323325274500217360ustar00rootroot00000000000000// Read neurolucida // ; V3 text file written for MicroBrightField products. // file. // The format is given by a context free grammar that would be easy // to handle with lex/yacc but we can do reasonably well using recursive descent // that more or less matches each production rules for the grammar. // Presently we only handle contours and trees but with spines ignored. begintemplate Branch2SomaInfo // info to carry out decision about which to connect to for // possible root branch mistakes // may have to split the parent public sec, sindex, pbranch, ipoint, d2p, d2s, connected2p objref sec, pbranch proc init() { sec = $o1 pbranch = $o2 sindex = $3 d2p = $4 d2s = $5 ipoint = $6 connected2p = 0 } endtemplate Branch2SomaInfo begintemplate Import3d_LexToken public token, x, s, itok, iline, clone strdef s token = 0 x = 0 itok = 0 iline = 0 obfunc clone() { localobj r r = new Import3d_LexToken() r.s = s r.token = token r.x = x r.itok = itok r.iline = iline return r } endtemplate Import3d_LexToken begintemplate Import3d_Neurolucida3 public type public filetype, input, file, sections public label, id2pt, id2line, pt2id, pt2sec, sec2pt, helptxt, mark, err, b2spanel public x, y, z, d, iline, lines, quiet external hoc_sf_ objref type, firstpoints, gm, plist objref current, look_ahead, look_ahead2 objref file, tokens, sections, cursec, parentsec, nil objref x, y, z, d, iline, lines objref somas, centers, b2serr, b2sinfo strdef line, tstr, tstr2, filetype, fline proc init() { quiet = 0 debug_on = 0 gm = new GUIMath() filetype = "Neurolucida V3" current = new Import3d_LexToken() look_ahead = new Import3d_LexToken() look_ahead2 = new Import3d_LexToken() eof=0 number=1 leftpar=2 rightpar=3 comma=4 bar=5 set=6 rgb=7 string=8 label_=9 err_=10 leftsp=11 rightsp=12 tokens = new List() tokensappend("eof", "number", "leftpar", "rightpar", "comma", "bar") tokensappend("set", "rgb", "string", "label", "err") tokensappend("leftsp", "rightsp") plist = new List() } proc tokensappend() {local i for i=1, numarg() { tokens.append(new String($si)) } } proc input() { b2serr = new List() b2sinfo = new List() nspine = 0 err = 0 type = new Vector() sections = new List(1000) alloc(25000, x, y, z, d, iline) lines = new List(25000) itoken = 0 depth = 0 rdfile($s1) firstpoints = new Vector(sections.count) set_firstpoints() connect2soma() if (err) { errout() } } proc set_firstpoints() {local i firstpoints.resize(sections.count) for i=0, sections.count-1 { firstpoints.x[i] = sections.object(i).id } } proc alloc() {local i for i=2, numarg() { $oi = new Vector($1) $oi.resize(0) } } proc connect2soma() {local i, j, d, dmin localobj sec, roots, xx // first make sure all somas are at the beginning centers = new List() j = 0 // next soma index somas = new List() roots = new List() for i=0, sections.count-1 { sec = sections.object(i) if (sec.iscontour_) { if (i > j) { sections.remove(i) sections.insrt(j, sec) } somas.append(sec) j += 1 } } // mark the soma contours that are part of a // contour stack and link them into a list // that is in the main contour section. // we do not remove them from the sections since // we want to be able to select their points soma_contour_stack() for i=0, sections.count-1 { sec = sections.object(i) if (!sec.iscontour_) if (sec.parentsec == nil) { roots.append(sec) } } if (somas.count == 0) { return } // note that j is the number of soma's for i = 0, somas.count-1 { connect2soma_2(somas.object(i), roots) } for i=0, roots.count-1 { sec = roots.object(i) xx = sec.raw.getcol(0) dmin = 1e9 for j=0, centers.count-1 { d = xx.c.sub(centers.object(j)).mag if (d < dmin) { imin = j dmin = d } } err = 1 xx = centers.object(imin) sprint(tstr, "\nMain branch starting at line %d is outside the soma bounding boxes", pt2id(sec.id)) b2serr.append(new String(tstr)) sprint(tstr, " Making a logical connection to center of nearest soma") b2serr.append(new String(tstr)) sec.parentsec = somas.object(imin) sec.parentx = .5 sec.insrt(0, xx.x[0], xx.x[1], xx.x[2], .01) sec.first = 1 sec.fid = 1 opt_connect(sec, imin, dmin) } } proc soma_contour_stack() {local i, j localobj bb1, bb2, first, next // if soma contour bounding boxes overlap, treat as single soma if (somas.count == 0) return first = somas.object(0) bb1 = bounding_box(first) j = 0 for i = 1, somas.count-1 { j += 1 next = somas.object(j) bb2 = bounding_box(next) if (xy_intersect(bb1, bb2)) { if (!object_id(first.contour_list)) { first.contour_list = new List() } first.contour_list.append(next) next.is_subsidiary = 1 somas.remove(j) j -= 1 }else{ first = next } bb1 = bb2 } for i=0, somas.count-1 { somastack_makes_sense(somas.object(i)) somastack_process(somas.object(i)) } } obfunc bounding_box() {localobj bb bb = new Vector(6) bb.x[0] = $o1.raw.getrow(0).min bb.x[1] = $o1.raw.getrow(1).min bb.x[2] = $o1.raw.getrow(2).min bb.x[3] = $o1.raw.getrow(0).max bb.x[4] = $o1.raw.getrow(1).max bb.x[5] = $o1.raw.getrow(2).max return bb } func xy_intersect() {local i for i = 0, 1 { if ($o1.x[i] > $o2.x[3+i] || $o2.x[i] > $o1.x[3+i]) { return 0 } } return 1 } proc somastack_makes_sense() {local i, j, z, z2, dz, dz2 localobj sec if (!object_id($o1.contour_list)) { return } // the soma stack must be monotonic in the z axis and all points // on a contour must have same z value. z = $o1.raw.x[2][0] for i = 1, $o1.raw.ncol-1 if (z != $o1.raw.x[2][i]) { sprint(tstr, "Soma stack contour %s does not have constant z value.", $o1) b2serr.append(new String(tstr)) b2serr.append(new String(" Soma area calculation may be serious in error.")) return } dz = 0 for j=0, $o1.contour_list.count-1 { sec = $o1.contour_list.object(j) z2 = sec.raw.x[2][0] dz2 = z2 - z if (dz2 == 0) { sprint(tstr, "Adjacent contour %d of soma stack %s has same z coordinate and previous.", j, $o1) b2serr.append(new String(tstr)) return }else if (dz2 > 0) { dz2 = 1 }else{ dz2 = -1 } if (dz == 0) { dz = dz2 }else if (dz != dz2) { sprint(tstr, "Contour %d of the Soma stack %s is not monotonic in z.", j, $o1) b2serr.append(new String(tstr)) b2serr.append(new String(" Manually edit the neurolucida file and reorder or eliminate some contours.")) b2serr.append(new String(" Presently the soma surface is nonsense.")) return } z = z2 for i = 1, sec.raw.ncol-1 if (z != sec.raw.x[2][i]) { sprint(tstr, "contour %d of the Soma stack %s does not have constant z value.", j, $o1) b2serr.append(new String(tstr)) b2serr.append(new String(" Soma area calculation may be serious in error.")) return } } } proc somastack_process() {local i, n, n1 localobj pts, m, center, pv if (!object_id($o1.contour_list)) { return } printf("somastack_process %d\n", $o1.contour_list.count + 1) // The stack defines a volume. Determine the principle axes // and slice the volume along the major axis, approximating // each slice by a circle and shifting the circle to be // along the major axis. So the set of soma contours ends // up being one straight cylindrically symetric soma centroid // note then that curved carrots don't look quite right but // straight carrots do. // for each contour use 100 points equally spaced. // we should, but do not, make the stack equally spaced. // then all the points are used to find the principle axes // this pretty much follows the corresponding analysis in // Import3d_GUI // Heck. Let's just use all the contour points and approximate // the thing as an ellipsoid // copy all the centroids into one matrix // size of matrix n = $o1.raw.nrow for i=0, $o1.contour_list.count-1 { n += $o1.contour_list.object(i).raw.nrow} pts = new Matrix(3, n) n = 0 n1 = $o1.raw.nrow $o1.raw.bcopy(0, 0, 3, n1, 0, n, pts) n = n1 for i=0, $o1.contour_list.count-1 { n1 = $o1.contour_list.object(i).raw.nrow $o1.contour_list.object(i).raw.bcopy(0, 0, 3, n1, 0, n, pts) n += n1 } center = new Vector(3) for i=0, 2 { center.x[i] = pts.getrow(i).mean } printf("center\n") center.printf //principle axes m = new Matrix(3,3) for i=0, 2 { pts.setrow(i, pts.getrow(i).sub(center.x[i])) } for i=0, 2 { for j=i, 2 { m.x[i][j] = pts.getrow(i).mul(pts.getrow(j)).sum m.x[j][i] = m.x[i][j] } } pv = m.symmeig(m) printf("Principle values\n") pv.printf() printf("Principle axes\n") m.printf() } proc stk_bbox() {local i, j localobj bbs, bbc bbs = bounding_box($o1) for i=0, $o1.contour_list.count-1 { bbc = bounding_box($o1.contour_list.o(i)) for j=0, 2 { if (bbs.x[j] > bbc.x[j]) bbs.x[j] = bbc.x[j] if (bbs.x[j+3] < bbc.x[j+3]) bbs.x[j+3] = bbc.x[j+3] } } $&2 = bbs.x[0] $&3 = bbs.x[3] $&4 = bbs.x[1] $&5 = bbs.x[4] } proc connect2soma_2() {local i, xmin, xmax, ymin, ymax localobj sec, xc, yc, zc, center // find centroid of soma if outline and connect all dangling // dendrites to that if inside the contour if (object_id($o1.contour_list)) { center = $o1.stk_center() stk_bbox($o1, &xmin, &xmax, &ymin, &ymax) }else{ xc = $o1.raw.getrow(0) yc = $o1.raw.getrow(1) zc = $o1.raw.getrow(2) xmin = xc.min-.5 xmax = xc.max + .5 ymin = yc.min-.5 ymax = yc.max + .5 center = $o1.contourcenter(xc, yc, zc) } centers.append(center) for (i=$o2.count-1; i >= 0; i -= 1) { sec = $o2.object(i) if (gm.inside(sec.raw.x[0][0], sec.raw.x[1][0], xmin, ymin, xmax, ymax)) { sec.parentsec = $o1 sec.parentx = .5 sec.insrt(0, center.x[0], center.x[1], center.x[2], .01) sec.first = 1 sec.fid = 1 $o2.remove(i) } } } proc opt_connect() {local i, j, d, dmin, imin, n, ip localobj psec, xx dmin = 1e9 xx = $o1.raw.getcol(1) for i=0, sections.count - 1 { psec = sections.object(i) if (psec == $o1) { break } n = psec.raw.ncol for j=0, n-1 { d = xx.c.sub(psec.raw.getcol(j)).set(2,0).mag if (d < dmin) { dmin = d imin = i ip = j } } } if (dmin == 1e9) { return } psec = sections.object(imin) // if (dmin < psec.d.x[psec.d.size-1]) { if (dmin < $3) { b2sinfo.append(new Branch2SomaInfo($o1, psec, $2, dmin, $3, ip)) } } proc b2spanel() {local i localobj b2s if (b2sinfo.count == 0) { return } xpanel("Possible root branch errors") xlabel("Default logical connection to nearest soma.") xlabel("Check to physically connect to closest parent") xlabel(" in the xy plane.") xlabel(" (Note: may split the parent into two sections)") for i=0, b2sinfo.count -1 { b2s = b2sinfo.object(i) sprint(tstr, "Line #%d connect to #%d %g (um) away", pt2id(sec2pto(b2s.sec, 1)), \ pt2id(sec2pto(b2s.pbranch, b2s.ipoint)), b2s.d2p) sprint(tstr2, "b2soption_act(%d, \"%s\")", i, $o1) xcheckbox(tstr, &b2s.connected2p(), tstr2) } xpanel() } proc b2soption_act() {local i localobj b2s, sec, parent, soma, xx b2s = b2sinfo.object($1) sec = b2s.sec soma = somas.object(b2s.sindex) parent = b2s.pbranch if (sec.parentsec == soma) { // connect to parent if (b2s.ipoint != parent.raw.ncol-1) { // need to split b2soption_split(b2s) parent = b2s.pbranch set_firstpoints() } xx = parent.raw.getcol(b2s.ipoint) sec.parentsec = parent sec.parentx = 1 sec.raw.setcol(0, xx) sec.d.x[0] = sec.d.x[1] sec.first = 0 sec.fid = 1 }else{ // connect to soma xx = centers.object(b2s.sindex) sec.parentsec = soma sec.parentx = .5 sec.raw.setcol(0, xx) sec.d.x[0] = .01 sec.first = 1 sec.fid = 1 } sprint(tstr, "%s.redraw()", $s2) execute(tstr) } proc b2soption_split() {local i, n, id, ip localobj p, newsec, tobj p = $o1.pbranch ip = $o1.ipoint id = sec2pto(p, ip) n = p.raw.ncol newsec = new Import3d_Section(p.id, ip+1) p.id = id tobj = p.raw.c tobj.bcopy(0,0,3,ip+1,newsec.raw) p.raw.resize(3, n - ip) p.xyz.resize(3, n - ip) tobj.bcopy(0, ip, 3, n - ip, p.raw) tobj = p.d.c newsec.d.copy(tobj, 0, ip) p.d.resize(n - ip) p.d.copy(tobj, ip, n-1) newsec.parentsec = p.parentsec p.parentsec = newsec newsec.parentx = p.parentx p.parentx = 1 newsec.type = p.type newsec.first = p.first newsec.fid = p.fid p.first = 0 p.fid = 0 newsec.type = p.type $o1.pbranch = newsec $o1.ipoint = newsec.d.size-1 // now adjust any screwed up b2sinfo items that also reference p for i=0, b2sinfo.count-1 { tobj = b2sinfo.object(i) if (tobj == $o1) { continue } if (tobj.pbranch == p) { if (tobj.ipoint <= ip) { // on newsec tobj.pbranch = newsec }else{ // still on p tobj.ipoint -= ip } } } sections.insrt(sections.index(p), newsec) } proc remove_trailspace() { // yuck hoc_sf_.head(line, " *$", line) sprint(line, "%s\n", line) } func lex() {local n $o1.x = 0 $o1.s = "" while (hoc_sf_.len(line) <= 1 || sscanf(line, " ;%[^@]", line) == 1) { if (!getline(fline)) { $o1.token = eof itoken += 1 $o1.itok = itoken $o1.iline = iline_ return eof } line = fline remove_trailspace() hoc_sf_.left(fline, hoc_sf_.len(fline)-1) } if (sscanf(line, " %lf%[^@]", &$o1.x, line) == 2) { $o1.token = number }else if (sscanf(line, " (%[^@]", line) == 1) { $o1.token = leftpar }else if (sscanf(line, " )%[^@]", line) == 1) { $o1.token = rightpar }else if (sscanf(line, " ,%[^@]", line) == 1) { $o1.token = comma }else if (sscanf(line, " |%[^@]", line) == 1) { $o1.token = bar }else if (sscanf(line, " <%[^@]", line) == 1) { $o1.token = leftsp }else if (sscanf(line, " >%[^@]", line) == 1) { $o1.token = rightsp }else if (sscanf(line, " set %[^@]", line) == 1) { $o1.token = set }else if (sscanf(line, " Set %[^@]", line) == 1) { $o1.token = set }else if (sscanf(line, " SET %[^@]", line) == 1) { $o1.token = set }else if (sscanf(line, " RGB %[^@]", line) == 1) { $o1.token = rgb }else if ((n = sscanf(line, " \"%[^\"]\"%[^@]", $o1.s, line)) > 0) { // not allowing quotes in quote $o1.token = string if (n == 1) { printf("Lexical error: no closing '\"' in string. The entire line %d in ||is\n", iline_) printf("|%s|\n", fline) line = "" $o1.token = err_ } }else if (sscanf(line, " %[A-Za-z0-9_]%[^@]", $o1.s, line) == 2) { $o1.token = label_ }else{ $o1.token = err_ } itoken += 1 $o1.itok = itoken $o1.iline = iline_ return $o1.token } func getline() { if (file.eof) { if (!quiet) { printf("\r%d lines read\n", iline_) } return 0 } file.gets($s1) iline_ += 1 // printf("%d: %s", iline_, $s1) if ((iline_%1000) == 0) { if (!quiet) { printf("\r%d lines read", iline_) } } return 1 } proc rdfile() {local i iline_ = 0 file = new File($s1) if (!file.ropen()) { err = 1 printf("could not open %s\n", $s1) } for (i=0; !file.eof(); i += 1) { file.gets(line) } alloc(i, x, y, z, d, iline) file.close lines = new List(25000) line="" if (!quiet) { printf("\n") } file.ropen() p_file() file.close } objref rollback proc save_for_rollback() { if (object_id(rollback)) { printf("rollback in use\n") p_err() } rollback = new List() rollback.append(current.clone()) rollback.append(look_ahead.clone()) rollback.append(look_ahead2.clone()) use_rollback_ = 0 } proc use_rollback() { use_rollback_ = 1 current = rollback.o(0) rollback.remove(0) look_ahead = rollback.o(0) rollback.remove(0) look_ahead2 = rollback.o(0) rollback.remove(0) if (rollback.count == 0) {clear_rollback()} } proc clear_rollback() {localobj nil rollback = nil use_rollback_ = 0 } proc read_next_token() { if (use_rollback_) { current = look_ahead look_ahead = look_ahead2 look_ahead2 = rollback.o(0) rollback.remove(0) if (rollback.count == 0) { clear_rollback() } }else{ read_next_token_lex() if (object_id(rollback)){ rollback.append(look_ahead2.clone()) } } } proc read_next_token_lex() {localobj tobj tobj = current current = look_ahead look_ahead = look_ahead2 look_ahead2 = tobj if (look_ahead.token != eof) { lex(look_ahead2) }else{ look_ahead2.token = eof } // printf("current token=%s x=%g s=%s\n", tokens.object(current.token).s, current.x, current.s) } func need_extra() {local i, n localobj m if (parentsec == nil) { return 0 } m = parentsec.raw n = m.ncol-1 if ( m.x[0][n] == x.x[$1]) { if ( m.x[1][n] == y.x[$1]) { if ( m.x[2][n] == z.x[$1]) { return 0 } } } return 1 } proc newsec() {local i, n, first, n1 localobj m first = 0 n = $2 - $1 if (need_extra($1)) { cursec = new Import3d_Section($1, n+1) first = 1 cursec.fid = 1 m = parentsec.raw n1 = m.ncol-1 cursec.set_pt(0, m.x[0][n1], m.x[1][n1], m.x[2][n1], d.x[$1]) }else{ cursec = new Import3d_Section($1, n) } cursec.type = sectype type.append(sectype) sections.append(cursec) cursec.append(first, $1, n, x, y, z, d) } proc set_sectype() {localobj tobj sectype = 0 if (plist.count) { tobj = plist.object(plist.count-1) if (strcmp(tobj.s, "Axon") == 0) { sectype = 2 }else if (strcmp(tobj.s, "Dendrite") == 0) { sectype = 3 }else if (strcmp(tobj.s, "Apical") == 0) { sectype = 4 } } } proc label() { sprint($s2, "Line %d: %s", iline.x[$1], lines.object($1).s) } func id2pt() {local i i = iline.indwhere(">=", $1) if (i < 0) { i = iline.size-1 } return i } func id2line() { return $1 } func pt2id() {local i i = $1 if (i < 0) { i == 0 } if (i >= iline.size) { i = iline.size-1 } return iline.x[i] } func pt2sec() {local i, j i = firstpoints.indwhere(">", $1) if (i == -1) { i = firstpoints.size } $o2 = sections.object(i-1) j = $1 - $o2.id + $o2.fid return j } func sec2pt() {local i localobj sec sec = sections.object($1) i = sec.id + $2 - sec.fid return i } func sec2pto() {local i localobj sec sec = $o1 i = sec.id + $2 - sec.fid return i } proc mark() {local i print $o1, $2, iline, lines i = iline.indwhere("==", $2) if (i != -1) { printf("%d,%d,%d (%g,%g): %s\n", $2, iline.x[i], i, x.x[i], y.x[i], lines.object(i).s) $o1.mark(x.x[i], y.x[i], "S",12,4,1) } } proc helptxt() { xpanel("Neurolucida V3 file filter characteristics") xlabel("The elaborate file format is handled by a reasonably complete") xlabel("recursive descent parser that more or less matches the production") xlabel("rules for the grammar. However, at present, only contours and trees") xlabel("are given any semantic actions (in particular, spines are ignored).") xpanel(1) } proc chk() { if (current.token != $1) { p_err() } } proc demand() { read_next_token() chk($1) } proc pcur() { printf("itok=%d on line %d token=%s x=%g s=%s\n", current.itok, current.iline, tokens.object(current.token).s, current.x, current.s) } proc plook() { // printf("lookahead: itok=%d token=%s x=%g s=%s\n", look_ahead.itok, tokens.object(look_ahead.token).s, look_ahead.x, look_ahead.s) } proc enter() {local i if (debug_on == 0) {return} for i=1, depth {printf(" ")} printf("enter %s: ", $s1) pcur() depth += 1 } proc leave() {local i if (debug_on == 0) {return} depth -= 1 for i=1, depth {printf(" ")} printf("leave %s: ", $s1) pcur() } // p stands for production if needed to avoid conflict with variable proc p_file() { look_ahead2.token = eof look_ahead.token = eof if (lex(current) != eof) { if (lex(look_ahead) != eof) { lex(look_ahead2) } } enter("p_file") objects() leave("p_file") } proc objects() { enter("objects") object() while(1) { optionalcomma() if (current.token != leftpar) { break } object() } leave("objects") } proc object() {local i i = current.itok enter("object") if (current.token == leftpar) { plook() if (look_ahead.token == string) { contour() }else if (look_ahead.token == label_) { marker_or_property() }else if (look_ahead.token == leftpar) { tree_or_text() }else if (look_ahead.token == set) { p_set() }else{ p_err() } }else{ p_err() } leave("object") if (i == current.itok) { print "internal error: ", "object consumed no tokens" stop } } proc marker_or_property() { enter("marker_or_property") if (look_ahead2.token == leftpar) { marker() }else{ property() } leave("marker_or_property") } proc tree_or_text() { // the tree and text productions are poorly conceived since they // match each other for arbitrarily long sequences of Properties tokens. // And after the properties they both have a Point. // For now just assume it is a tree. // It will be painful to consume the [ '(' Properties Point ] here // and then disambiguate between Tree or Text and then more // often than not, start the tree production after having already // read the first point (Branch currently assumes it is supposed // to read the first point of the tree.) enter("tree_or_text") save_for_rollback() if (text()) { clear_rollback() }else{ use_rollback() tree() } leave("tree_or_text") } proc properties() { enter("properties") plist.remove_all() if (current.token == leftpar) { if(look_ahead.token == label_ || look_ahead.token == set) { property_or_set() while (1) { optionalcomma() if (current.token != leftpar || (look_ahead.token != label_ && look_ahead.token != set)) { break } property_or_set() } } } leave("properties") } proc property_or_set() { if (look_ahead.token == label_) { property() }else{ p_set() } } proc property() { enter("property") chk(leftpar) demand(label_) plist.append(new String(current.s)) read_next_token() optionalvalues() chk(rightpar) read_next_token() leave("property") } proc optionalvalues() {local c enter("optionalvalues") c = current.token if (c == number || c == string || c == label_ || c == rgb) { values() } leave("optionalvalues") } proc values() {local c enter("values") value() while (1) { c = current.token if (c != number && c != string && c != label_ && c != rgb) { break } value() } leave("values") } proc value() {local c enter("value") c = current.token if (c == number) { }else if (c == string) { }else if (c == label_) { }else if (c == rgb) { demand(leftpar) demand(number) read_next_token() optionalcomma() chk(number) read_next_token() optionalcomma() chk(number) demand(rightpar) }else{ p_err() } read_next_token() leave("value") } proc p_set() { // presently, I am imagining that we ignore sets // and I hope we never see objects() in them. enter("p_set") chk(leftpar) demand(set) demand(string) read_next_token() if (current.token != rightpar) { objects() } chk(rightpar) read_next_token() leave("p_set") } proc contour() {local begin, end, keep, il enter("contour") chk(leftpar) begin = x.size keep = 0 demand(string) if (strcmp(current.s, "CellBody") == 0) { keep = 1 } if (strcmp(current.s, "Cell Body") == 0) { keep = 1 } if (strcmp(current.s, "Soma") == 0) { keep = 1 } il = current.iline read_next_token() contourinfo() if (keep) { end = x.size if (end - begin > 2) { sectype = 1 newsec(begin, end) cursec.iscontour_ = 1 }else{ sprint(tstr, "CellBody contour has less than three points at line %d. Ignoring.", il) b2serr.append(new String(tstr)) } } chk(rightpar) read_next_token() leave("contour") } proc contourinfo() { enter("contourinfo") properties() points() morepoints() leave("contourinfo") } proc morepoints() { enter("morepoints") optmarkerlist() leave("morepoints") } proc optmarkerlist() { enter("optmarkerlist") leave("optmarkerlist") } proc markerlist() {local pcnt enter("markerlist") chk(leftpar) pcnt = 1 // not handling markers. when pcnt goes to 0 then leave while (pcnt != 0) { read_next_token() if (current.token == rightpar) { pcnt -= 1 }else if (current.token == leftpar) { pcnt += 1 } } read_next_token() leave("markerlist") } proc tree() { enter("tree") parentsec = nil chk(leftpar) read_next_token() properties() set_sectype() branch() chk(rightpar) read_next_token() parentsec = nil leave("tree") } proc branch() {local begin, end localobj psav enter("branch") psav = parentsec begin = x.size treepoints() end = x.size newsec(begin, end) cursec.parentsec = parentsec parentsec = cursec branchend() parentsec = psav leave("branch") } proc treepoints() { enter("treepoints") treepoint() while (1) { optionalcomma() if (current.token != leftpar || look_ahead.token != number) { break } treepoint() } leave("treepoints") } proc treepoint() { enter("treepoint") if (look_ahead.token == label_) { marker_or_property() } else { point() if (current.token == leftsp) { spines() } } leave("treepoint") } proc spines() { enter("spines") spine() while(current.token == leftsp) { spine() } leave("spines") } proc spine() { enter("spine") chk(leftsp) read_next_token() nspine += 1 err = 1 // properties() points() while (current.token != rightsp) { read_next_token() } chk(rightsp) read_next_token() leave("spine") } proc branchend() { enter("branchend") optionalcomma() if (current.token == leftpar) { while (look_ahead.token == label_) { markerlist() } } optionalcomma() if (current.token == leftpar || current.token == label_) { node() } leave("branchend") } proc node() { enter("node") if (current.token == leftpar) { read_next_token() split() chk(rightpar) read_next_token() }else if (current.token == label_) { read_next_token() }else{ p_err() } leave("node") } proc split() { enter("split") branch() while (current.token == bar) { read_next_token() branch() } leave("split") } proc marker() { enter("marker") chk(leftpar) demand(label_) read_next_token() properties() points() chk(rightpar) read_next_token() leave("marker") } func text() { // if text fails then it may be a tree enter("text") chk(leftpar) read_next_token() properties() point() if (current.token != string) { leave("text invalid --- expect string") return 0 } chk(string) // demand(rightpar) read_next_token() if (current.token != rightpar) { leave("text invalid --- expect rightpar") return 0 } chk(rightpar) read_next_token() leave("text") return 1 } proc points() { enter("points") point() while (1) { optionalcomma() if (current.token != leftpar) { break } point() } leave("points") } proc point() { enter("point") chk(leftpar) demand(number) xval = current.x iline.append(iline_) lines.append(new String(fline)) read_next_token() optionalcomma() chk(number) yval = current.x zval = dval = 0 read_next_token() optz() x.append(xval) y.append(yval) z.append(zval) d.append(dval) chk(rightpar) read_next_token() //printf("%g %g %g %g\n", xval, yval, zval, dval) leave("point") } proc optz() { enter("optz") optionalcomma() if (current.token == number) { zval = current.x read_next_token() optmodifier() } leave("optz") } proc optmodifier() { enter("optmodifier") optionalcomma() if (current.token == number) { dval = current.x read_next_token() optionalcomma() if (current.token == label_) { read_next_token() } optbezier() } leave("optmodifier") } proc optbezier() { enter("optbezier") optionalcomma() if (current.token == leftpar) { demand(number) read_next_token() optionalcomma() chk(number) read_next_token() optionalcomma() chk(number) read_next_token() optionalcomma() chk(number) demand(rightpar) read_next_token() } leave("optbezier") } proc optionalcomma() { enter("optionalcomma") if (current.token == comma) { read_next_token() } leave("optionalcomma") } proc p_err() { printf("\nparse error\n") pcur() printf("line %d: %s\n", iline_, fline) stop } proc errout() {local i if (quiet) { return } printf("\n%s problems\n\n", file.getname) if (nspine) { printf("Ignored %d spines\n", nspine) } for i=0, b2serr.count-1 { printf("%s\n", b2serr.object(i).s) } } endtemplate Import3d_Neurolucida3 neuron-7.5/share/lib/hoc/import3d/read_nts.hoc000077500000000000000000000170211323325274500213610ustar00rootroot00000000000000// translation of ntscable's read_nts.c file for importing // eutectic files. After reading and parsing lines, the logic // follows that in nlcda_read.hoc begintemplate Import3d_Eutectic_read public filetype, sections, input, type, file, err public label, id2pt, id2line, pt2id, pt2sec, sec2pt, mark external hoc_sf_ public id, ptype, tag, x, y, z, d, iline, pointtype, points, type public firstpoints, lastpoints objref sections, file, stack, cursec, firstpoints, lastpoints, gm objref id, ptype, tag, x, y, z, d, iline, pointtype, points, type objref iline2pt, vectors, header, lines, diam, parse_err, nil, soma strdef tstr, tstr1, point_type_names, filetype, line proc init() { filetype = "Eutectic" vectors = new List() header = new List() lines = new List() gm = new GUIMath() MTO = 0 TTO = 3 BTO = 6 CP = 9+1 FS = 12+1 SB = 15+1 BP = 18+1 NE = 21+1 ES = 24+1 MAE = 27 TAE = 30 BAE = 33 SOS = 36 SCP = 39 SOE = 42 OS = 45+1 OCP = 48 OE = 51+1 DS = 54+1 DCP = 57 DE = 60+1 point_type_names = \ "MTOTTOBTO CP FS SB BP NE ESMAETAEBAESOSSCPSOE OSOCP OE DSDCP DE" // note numbering for two char item is 1 more than in read_nts.c // since space is not included in first char } proc input() {local i nspine = 0 err = 0 parse_err = new List() sections = new List() stack = new List() lastpoints = new Vector() firstpoints = new Vector() rdfile($s1) parse2() type = new Vector(sections.count) for i=0, sections.count-1 { type.x[i] = tag.x[sections.object(i).id] } connect2soma() if (err) { errout() } } proc rdfile() {local i, j file = new File($s1) // count lines for vector allocation space (not really necessary) if (!file.ropen()) { err = 1 printf("could not open %s\n", $s1) } for (i = 0; !file.eof(); i += 1) { file.gets(line) } file.close() // printf("%s has %d lines\n", $s1, i) alloc(i, id, ptype, tag, x, y, z, d, iline, pointtype, points) tag diam = d file.ropen() for (i = 1; !file.eof(); i += 1) { file.gets(line) parse(i, line) } file.close() } proc alloc() { local i // $oi.size = 0 but enough space for $1 elements for i = 2, numarg() { $oi = new Vector($1) $oi.resize(0) vectors.append($oi) } } proc parse() {local a1 ,a2, a3, a4, a5, a6, a7 n = sscanf($s2, "%d %s %d %f %f %f %f", &a1, tstr, &a3, &a4, &a5, &a6, &a7) hoc_sf_.left($s2, hoc_sf_.len($s2)-1) if (n <= 0) { header.append(new String($s2)) return } if (n != 7) { err = 1 sprint(tstr, "%d: %s parse failure after item %d", $1, $s2, n) parse_err.append(new String(tstr)) return } a2 = hoc_sf_.head(point_type_names, tstr, tstr1) // print tstr, " ", a2 // first points of branches (before physical connection) is 1 // continuation points are 2 // branch are 3 // ends are 4 // a branch point can also be a first point // so easiest to accumulate them here if (a2 == MTO) { last = 1 firstpoints.append(id.size) }else if (a2 == BP ){ if (last == 3 || last == 4){ firstpoints.append(id.size) } last = 3 }else if (a2 == FS || a2 == SB || a2 == CP){ if (a2 == SB) { err = 1 nspine += 1 } if (last == 3 || last == 4){ firstpoints.append(id.size) last = 1 }else{ last = 2 } }else if (a2 == NE || a2 == ES || a2 == MAE || a2 == TAE || a2 == BAE){ if (last == 3 || last == 4){ firstpoints.append(id.size) } last = 4 }else if (a2 == SOS){ last = 10 }else if (a2 == SCP){ last = 10 }else if (a2 == SOE){ last = 10 }else if (a2 == OS){ return }else if (a2 == DS){ return }else if (a2 == DCP || OCP){ return }else if (a2 == DE || a2 == OE){ return }else{ return } pointtype.append(last) points.append(a1) id.append(a1) ptype.append(a2) tag.append(a3) x.append(a4) y.append(a5) z.append(a6) d.append(a7) iline.append($1) lines.append(new String($s2)) } proc parse2() {local i, j, k localobj parent i = ptype.indwhere("==", SOS) j = ptype.indwhere("==", SOE) if (i > -1 && j > i) { mksec(i, j, nil) cursec.iscontour_ = 1 // cursec.type=1 soma = cursec } for i=0, firstpoints.size-1 { j = firstpoints.x[i] for (k=j; pointtype.x[k] <= 2; k += 1) { } parent = pop() if (parent != nil) { if (parent.volatile < 1) { push(parent) parent.volatile += 1 } } mksec(j, k, parent) //printf("%s %d %d: %s | %s\n", cursec, j, k, lines.object(j).s, lines.object(k).s) cursec.parentsec = parent // logic_connect(cursec, parent) if (pointtype.x[k] == 3) { push(cursec) } } if (stack.count > 0) { err = 1 } } proc push() { stack.append($o1) } obfunc pop() {localobj p if (stack.count > 0) { p = stack.object(stack.count-1) stack.remove(stack.count-1) }else{ p = nil } return p } proc mksec() {local i, x1, y1, z1, d1 if ($o3 == nil) { cursec = new Import3d_Section($1, $2-$1+1) cursec.append(0, $1, $2-$1+1, x, y, z, d) }else{ cursec = new Import3d_Section($1, $2-$1+2) cursec.append(1, $1, $2-$1+1, x, y, z, d) cursec.first = 0 // physical connection i = $o3.raw.ncol-1 x1 = $o3.raw.x[0][i] y1 = $o3.raw.x[1][i] z1 = $o3.raw.x[2][i] //d1 = $o3.d.x[i] cursec.set_pt(0, x1, y1, z1, cursec.d.x[1]) cursec.fid = 1 } cursec.volatile = 0 cursec.type = tag.x[$1] sections.append(cursec) lastpoints.append($2) } proc logic_connect() {local i, x1, y1, z1, d1 if ($o2 == nil) { return } i = $o2.raw.ncol-1 x1 = $o2.raw.x[0][i] y1 = $o2.raw.x[1][i] z1 = $o2.raw.x[2][i] d1 = $o2.d.x[i] $o1.insrt(0, x1, y1, z1, $o1.d.x[0]) $o1.first = 1 } proc connect2soma() {local i, ip, j, jp, bp, jpmin, dmin, d, xmin, xmax, ymin, ymax localobj sec, xc, yc, zc, c // find centroid of soma if outline and connect all dangling // dendrites to that if inside the contour if (soma == nil) { return } xc = soma.raw.getrow(0) yc = soma.raw.getrow(1) zc = soma.raw.getrow(2) xmin = xc.min-.5 xmax = xc.max + .5 ymin = yc.min-.5 ymax = yc.max + .5 c = soma.contourcenter(xc, yc, zc) for i=0, sections.count-1 { sec = sections.object(i) if (sec.parentsec == nil && sec != soma) { if (gm.inside(sec.raw.x[0][0], sec.raw.x[1][0], xmin, ymin, xmax, ymax)) { sec.parentsec = soma sec.parentx = .5 sec.insrt(0, c.x[0], c.x[1], c.x[2], .01) sec.first = 1 sec.fid = 1 } } } } proc label(){ sprint($s2, "Line %d: %s", iline.x[$1], lines.object($1).s) } func id2pt() { i = id.indwhere(">=", $1) //print "id2pt ", $1, i, id.x[i] return i } func id2line() { return points.x[$1] } func pt2id() {local i //print "pt2id ", $1, id.x[$1] return id.x[$1] } func pt2sec(){local i, j i = lastpoints.indwhere(">=", $1) if (i == -1) { i = lastpoints.size-1 } $o2 = sections.object(i) j = $1 - $o2.id + $o2.fid //print "pt2sec ", $1, $o2, $o2.id, j return j } func sec2pt(){local i localobj sec sec = sections.object($1) i = sec.id + $2 - sec.fid //print "sec2pt ", $1, $2, sec.id, sec.first, i return i } proc mark() {local i, a,b,c,d,e,f print $o1, $2, iline, lines i = id.indwhere("==",$2) printf("%d,%d,%d: %s\n", i, id.x[i], iline.x[i], lines.object(i).s) n = sscanf(lines.object(i).s, "%d %s %d %f %f %f %f", &a, tstr, &b, &c, &d, &e, &f) if (n == 7) { print a," ",tstr," ",b,c,d,e,f $o1.mark(c,d,"S",12,4,1) } } proc errout() { printf("\n%s problems and default fixes\n\n", file.getname) if (parse_err.count) { printf(" Following lines could not be parsed\n") for i=0, parse_err.count-1 { printf(" %s\n", parse_err.object(i).s) } printf("\n") } if (stack.count > 0) { printf(" stack.count = %d\n", stack.count) } if (nspine > 0) { printf(" Ignore %d spines\n", nspine) } } endtemplate Import3d_Eutectic_read neuron-7.5/share/lib/hoc/import3d/read_swc.hoc000077500000000000000000000276711323325274500213650ustar00rootroot00000000000000// read swc file, create and verify that it is a single tree, // and identify the lists of unbranched points. begintemplate Import3d_SWC_read public input, pheader, instantiate public id, type, x, y, z, d, pid, iline, header, point2sec, sections, lines public idoffset, label, id2pt, id2line, pt2id, pt2sec, sec2pt, file, mark public filetype, err, helptxt public quiet external hoc_sf_ objref id, type, x, y, z, d, pid, iline, header, lines objref file, vectors, sec2point, point2sec, sections objref connect2prox strdef tstr, line, filetype double a[7] objref id2index_ // id and pid contain the raw id values (1st and 7th values on each line) // from the file. After the file is read id2index(id.x[i]) == i // Note that the only requireement for a valid swc file is the tree // topology condition pid.x[i] < id.x[i] proc init() { quiet = 0 filetype = "SWC" vectors = new List() header = new List() lines = new List() } func id2index() { return id2index_.x[$1] } func pix2ix() {local pid_ pid_ = pid.x[$1] if (pid_ < 0) { return -1 } return id2index_.x[pid_] } proc input() { err = 0 rdfile($s1) check_pid() // and also creates id2index_ sectionify() // create point2sec index map mksections() // Import3dSection list // instantiate() } proc rdfile() {local i file = new File($s1) // count lines for vector allocation space (not really necessary) if (!file.ropen()) { err = 1 printf("could not open %s\n", $s1) } for (i = 0; !file.eof(); i += 1) { file.gets(line) } file.close() // printf("%s has %d lines\n", $s1, i) alloc(i, id, type, x, y, z, d, pid, iline) file.ropen() for (i = 1; !file.eof(); i += 1) { file.gets(line) parse(i, line) } file.close() } proc alloc() { local i // $oi.size = 0 but enough space for $1 elements for i = 2, numarg() { $oi = new Vector($1) $oi.resize(0) vectors.append($oi) } } proc parse() {local i, n n = sscanf($s2, "%f %f %f %f %f %f %f", &a[0], &a[1], &a[2],\ &a[3], &a[4], &a[5], &a[6]) if (n == 7) { a[5] *= 2 // radius to diameter for i=0, 6 { vectors.object(i).append(a[i]) } iline.append($1) // for error messages hoc_sf_.left($s2, hoc_sf_.len($s2)-1) lines.append(new String($s2)) } else if (hoc_sf_.head($s2, "#", tstr) == 0) { // comment header.append(new String($s2)) } else { err = 1 printf("error %s line %d: could not parse: %s", file.getname, $1, $s2) // Note: only swcdata/n120.swc and swcdata/n423.swc last lines are invalid } } proc pheader() {local i for i=0, header.count-1 { printf("%s", header.object(i).s) } } proc shift_id() { local i, ierr, imin // Note: swcdata/*.swc have sequential id's // shift id and pid so that id.x[0] == 0. Then verify that // id.x[i] == i if (id.size > 0) { imin = id.min_ind idoffset = id.x[imin] // is the first one the smallest? if (id.x[0] != idoffset) { err = 1 printf("error %s lines %d and %d: id's %d and %d are not sequential\n", \ file.getname, iline.x[0], iline.x[imin], \ id.x[0], idoffset) } id.sub(idoffset) pid.sub(idoffset) } ierr = 0 for i=0, id.size-1 { if (id.x[i] != i ) { err = 1 printf("error %s line %d: id's shifted by %d are not sequential: id.x[%d] != %g\n", \ file.getname, iline.x[i], idoffset, i, id.x[i]) ierr += 1 } if (ierr > 5) { break } } } proc check_pid() {local i, ierr, needsort localobj tobj // if all pid.x[i] < id.x[i] then we must be 1 or more trees with no loops // Note: swcdata/*.swc conforms. needsort = 0 ierr = 0 for i=0, id.size-1 { if (i > 0) if (id.x[i] <= id.x[i-1]) { needsort = 1 } if (pid.x[i] >= id.x[i]) { err = 1 printf("error %s line %d: index %d pid=%d is not less than id=%d\n",\ file.getname, iline.x[i], i, pid.x[i], id.x[i]) } } if (needsort) { // sort in id order tobj = id.sortindex() id.sortindex(id, tobj) pid.sortindex(pid, tobj) x.sortindex(x, tobj) y.sortindex(y, tobj) z.sortindex(z, tobj) d.sortindex(diam, tobj) iline.sortindex(iline, tobj) } // the number of trees is just the number of pid's < 0 // Note: swcdata/*.swc have only one tree tobj = new Vector() tobj.indvwhere(pid, "<", 0) if (tobj.size > 1) { err = 1 printf("warning %s: more than one tree:\n", file.getname) for i=0, tobj.size-1 { printf(" root at line %d\n", iline.x[tobj.x[i]]) } } // check for duplicate id for i=1, id.size-1 if (id.x[i] == id.x[i-1]) { err = 1 printf("error %s: duplicate id:\n", file.getname) printf(" %d: %s\n", iline.x[i-1], lines.o(iline.x[i-1]).s) printf(" %d: %s\n", iline.x[i], lines.o(iline.x[i]).s) } // create the id2index_ map id2index_ = new Vector(id.max()+1) id2index_.fill(-1) for i=0, id.size-1 { id2index_.x[id.x[i]] = i } } proc sectionify() {local i, si localobj tobj // create point2sec map and sections list // point2sec gives immediate knowledge of the section a point is in // sections list is for display purposes if (id.size < 1) { return } // tobj stores the number of child nodes with pid equal to i // actually every non-contiguous child adds 1.01 and a contiguous // child adds 1 mark_branch(tobj) point2sec = new Vector(id.size) // first point in the root and if only one point it will be interpreted // as spherical. point2sec.x[0] = 0 si = 0 for i=1, id.size-1 { if (tobj.x[pix2ix(i)] > 1 || connect2prox.x[i]) { si += 1 } point2sec.x[i] = si } sec2point = new Vector(si) tobj.x[0] = 1 sec2point.indvwhere(tobj, "!=", 1) // sec2point.x[i] is the last point of section i // 0 is the first point of section 0 // sec2point.x[i-1]+1 is the first point of section i } proc mark_branch() { local i, p //$o1 is used to store the number of child nodes with pid equal to i // actually add a bit more than 1 // if noncontiguous child and 1 if contiguous child // this is the basic computation that defines sections, i.e. // contiguous 1's with perhaps a final 0 (a leaf) // As usual, the only ambiguity will be how to treat the soma // Another wrinkle is that we do not want any sections that // have multiple point types. E.g. point type 1 is often // associated with the soma. Therefore we identify // point type changes with branch points. // however warn if the first two points do not have the same type // if single point soma set the spherical_soma flag if ( type.size() > 1) if (type.x[0] != type.x[1]) { err = 1 if (0 && !quiet) { printf("\nNotice: %s:\nThe first two points have different types (%d and %d) but\n a single point NEURON section is not allowed.\n Interpreting the point as the center of a sphere of\n radius %g at location (%g, %g, %g)\n Will represent as 3-point cylinder with L=diam and with all\n children kept at their 1st point positions and connected\n with wire to middle point.\n If this is an incorrect guess, then change the file.\n"\ , file.getname, type.x[0], type.x[1], d.x[0]/2, x.x[0], y.x[0], z.x[0]) } } // another wrinkle is that when a dendrite connects to the soma // by a wire, // another branch may connect to the first point of that dendrite // In this case (to avoid single point sections) // that branch should be connected to position 0 // of the dendrite (and the first point of that branch should be // the same position as the first point of the dendrite. // use connect2prox to indicate the parent point is not // the distal end but the proximal end of the parent section connect2prox = new Vector(id.size) $o1 = new Vector(id.size) for i=0, id.size-1 { p = pix2ix(i) if (p >= 0) { $o1.x[p] += 1 if ( p != i-1) { $o1.x[p] += .01 //i noncontiguous with parent and // if parent is not soma and parent of parent is soma // then i appended to connect2prox if (p > 1) if (type.x[p] != 1 && type.x[pix2ix(p)] == 1) { connect2prox.x[i] = 1 $o1.x[p] = 1 // p not treated as a 1pt section err = 1 if (0 && !quiet) { printf("\nNotice: %s:\n %d parent is %d which is the proximal point of a section\n connected by a wire to the soma.\n The dendrite is being connected to\n the proximal end of the parent dendrite.\n If this is an incorrect guess, then change the file.\n"\ , file.getname, id.x[i], id.x[p]) } } } if (type.x[p] != type.x[i]) { // increment enough to get past 1 // so force end of section but // not really a branch $o1.x[p] += .01 } } } } proc mksections() {local i, j, isec, first localobj sec, psec, pts sections = new List() isec = 0 first = 0 for i=0, id.size-1 { if (point2sec.x[i] > isec) { mksection(isec, first, i) isec += 1 first = i } } mksection(isec, first, i) } proc mksection() { local i, isec, first localobj sec isec = $1 first=$2 i=$3 if (isec > 0) {// branches have pid as first point sec = new Import3d_Section(first, i-first+1) pt2sec(pix2ix(first), sec.parentsec) // but if the parent is the root and the branch has more than // one point, then connect to center of root with wire if (point2sec.x[pix2ix(first)] == 0 && i > 1) { sec.parentx = 0.5 sec.first = 1 }else{ if (pix2ix(first) == 0) { sec.parentx = 0 } } sec.append(0, pix2ix(first), 1, x, y, z, d) sec.append(1, first, i-first, x, y, z, d) }else{// pid not first point in root section sec = new Import3d_Section(first, i-first) sec.append(0, first, i-first, x, y, z, d) } sec.type = type.x[first] sections.append(sec) if (object_id(sec.parentsec)) { if (sec.parentsec.type == 1 && sec.type != 1) { sec.d.x[0] = sec.d.x[1] } } if (connect2prox.x[first]) { sec.pid = sec.parentsec.id sec.parentx = 0 } } func same() { if ($2 < 0) return 0 if (x.x[$1] == x.x[$2]) { if (y.x[$1] == y.x[$2]) { // if (z.x[$1] == z.x[$2]) { return 1 // } } } return 0 } proc instantiate() {local i, isec, psec, pp, si, px if (id.size < 2) { return } sprint(tstr, "~create K[%d]", sec2point.size) execute(tstr) // connect for i = 2, id.size-1 { if (point2sec.x[pix2ix(i)] == point2sec.x[i]) { continue } if (pix2ix(i) == 0) { px = 0 } else { px = 1 } sprint(tstr, "K[%d] connect K[%d](0), (%g)", \ point2sec.x[pix2ix(i)], point2sec.x[i], px) execute(tstr) } // 3-d point info // needs some thought with regard to interior duplicate // points, and whether it is appropriate to make the first // point in the section the same location and diam as the // pid point isec = 0 for i=0, id.size-1 { if (point2sec.x[i] > isec ) { // in next section ptadd(pix2ix(i), point2sec.x[i]) } isec = point2sec.x[i] ptadd(i, isec) } } proc ptadd() { sprint(tstr, "K[%d] { pt3dadd(%g, %g, %g, %g) }", \ $2, x.x[$1], y.x[$1], z.x[$1], d.x[$1]) execute(tstr) } proc label() { sprint($s2, "Line %d: %s", iline.x[$1], lines.object($1).s) } func id2pt() {local i if ($1 < 0) { $1 = 0 }else if ( $1 > id2index_.size-1) { $1 = id2index_.size-1 } return id2index($1) } func id2line() { return $1 } func pt2id() { return id.x[$1] } func pt2sec() { local i,j //from selpoint i = point2sec.x[$1] $o2 = sections.object(i) j = $1 - $o2.id if (i > 0) { j += 1 } return j } func sec2pt() {local i i = sections.object($1).id + $2 if ($1 > 0) { i -= 1 } return i } proc mark() {local i print $o1, $2, iline, lines i = id2index($2) printf("%d %d %g %g: %s\n", i, iline.x[i], x.x[i], y.x[i], lines.object(i).s) $o1.mark(x.x[i], y.x[i], "S", 12, 4, 1) } proc helptxt() { xpanel("SWC file filter characteristics") xlabel(" Sections consist of unbranched sequences of points having") xlabel("the same type. All sections connect from 0 to 1") xlabel("(except those connecting to the first point") xlabel("of the root section connect from 0 to 0).") xlabel("With one exception, all child sections have as their first pt3d") xlabel("point a copy of the parent point and the diameter of that first") xlabel("point is the diameter of the parent point") xlabel(" The exception, so that the error in area is not so") xlabel("egregious, is that dendrite branches that connect to the soma") xlabel("get a copy of the parent point as their first pt3d point but") xlabel("the diameter of that point is the diameter of the second point") xlabel(" The root section does not contain an extra parent point.") xpanel(0) } endtemplate Import3d_SWC_read neuron-7.5/share/lib/hoc/impratio.hoc000077500000000000000000000115731323325274500176530ustar00rootroot00000000000000begintemplate ImpedanceRatio public measure, inject, ratio, input, transfer, logfmin, logfmax, extended,logres public box, move, imp, style, pl, shape, flush, view_count, begin objectvar imp, sec[2], shape, b1, this, move_callback objectvar g, imp, box, pbox double x[2], color[2] strdef s0, s1, stemp, sdist, fstyle, tstr // kludge to use graphline() in pl() f = 0 proc init() { extended = 0 deltafac = .001 logres = .2 logfmin = -1 logfmax = 3 style_ = 0 fstyle = "log(Attenuation)" mark_ = 1 flush_ = 0 scale_ = 0 measure(.5) inject(.5) imp = new Impedance() build() doNotify() style(1) scale_ = 1 pl() scale_ = 0 } proc build(){ dist() box = new VBox() box.ref(this) box.save("") box.intercept(1) xpanel("", 1) xbutton("Redraw", "pl()") xmenu("SelectLocation") xradiobutton("Select Measure", "mark_=0") xradiobutton("Select Inject", "mark_=1", 1) xbutton("Swap Measure/Inject", "exchange()") xmenu() xmenu("Plot") xradiobutton("log(Attenuation)", "style(0)") xradiobutton("Zin (Mohm)", "style(1)", 1) xradiobutton("Ztransfer (Mohm)", "style(2)") xradiobutton("V(measure)/V(inject)", "style(3)") xmenu() xmenu("Extras") xstatebutton("Movie mode", &flush_, "add_flush()") xstatebutton("Auto Scale", &scale_, "pl()") xbutton("Parameters", "parm()") xmenu() xpanel() xpanel("") xcheckbox("include dstate/dt contribution", &extended, "pl()") xvarlabel(s0) xvarlabel(s1) xvarlabel(sdist) xpanel() shape = new Shape() for i=0,1 color[i]=i+2 shapemark(2) for i=0,1 { color[i] = i+2 // red, blue shapemark(i, sec[i], x[i], color[i]) } shape.action("move()") defgraph() box.intercept(0) sprint(tstr, "%s Impedance vs Frequency", this) box.map(tstr) } proc parm() { pbox = new VBox() pbox.save("") pbox.intercept(1) xpanel("") xlabel("x axis scale (press redraw after changes)") xpvalue("log(fmin)", &logfmin, 2) xpvalue("log(fmax)", &logfmax, 2) xpvalue("x resolution)", &logres, 2) xlabel("") xlabel("dy for df/dy calculation of extended y' = f(y)") xpvalue("delta factor", &deltafac, 2, "imp.deltafac(deltafac)") xpanel() pbox.intercept(0) sprint(tstr, "Params for %s", this) pbox.map(tstr) } proc defgraph() { g = new Graph() g.size(0,3,0,1) style(0) } proc style() { style_ = $1 g.erase_all() g.label(-100, -100, "") if ($1 == 0) { g.addexpr("-log(ratio(f))") fstyle="log(Attenuation)" }else if ($1 == 1) { g.addexpr("input(f)") fstyle="Zin" }else if ($1 == 2) { g.addexpr("transfer(f)") fstyle = "Ztransfer" }else if ($1 == 3) { g.addexpr("ratio(f)") fstyle = "V(measure)/V(inject)" } g.label(.5, .9, "freq log10(Hz)") g.label(fstyle) sec[0].sec measure(x[0]) sec[1].sec inject(x[1]) pl() } proc move() {local i, xx i = mark_ xx = hoc_ac_ if (i == 0) { measure(xx) }else{ inject(xx) } shapemark(i, sec[i], x[i], color[i]) dist() pl() } objectvar etmp proc exchange() {local xx, i //swap inject and measure etmp = sec[0] xx = x[0] sec[1].sec measure(x[1]) etmp.sec inject(xx) objectvar etmp for i=0,1 shapemark(i, sec[i], x[i], color[i]) pl() } double sz[4] proc pl() {local max, x, val g.begin() for (x=logfmin; x <= logfmax; x=x+logres) { f = 10^x g.plot(x) } if (scale_) { g.size(&sz[0]) g.size(logfmin, logfmax, 0, sz[3]) } g.flush() } proc measure() { sec[0] = new SectionRef() x[0] = $1 sectionname(stemp) if (style_ == 1) { sprint(s0, "unused (red): %s(%g)", stemp, $1) }else{ sprint(s0, "measure (red): %s(%g)", stemp, $1) } } proc inject() { sec[1] = new SectionRef() x[1] = $1 sectionname(stemp) if (style_ == 1) { sprint(s1, "measure/inject (blue): %s(%g)", stemp, $1) }else{ sprint(s1, "inject (blue): %s(%g)", stemp, $1) } } func ratio() {local y compute($1) sec[1].sec y = imp.ratio(x[1]) return y } func transfer() {local y compute($1) sec[1].sec y = imp.transfer(x[1]) // since v(x)/i(loc) == v(loc)/i(x) return y } func input() {local y compute($1) sec[1].sec y = imp.input(x[1]) return y } proc compute() { sec[0].sec imp.loc(x[0]) imp.compute($1, extended) } objectvar rvp proc dist() {local y sec[0].sec distance(0,x[0]) sec[1].sec y = distance(x[1]) sprint(sdist, "distance(um) %g", y) } // should put this in plotshape class and avoid a meaningless point process objectvar stim[1] proc shapemark() {local i if (numarg() == 1) { objectvar stim[$1] for i=0,1 sec[i].sec stim[i] = new PointProcessMark(x[i]) for i=0,1 shape.point_mark(stim[i], color[i]) }else{ $o2.sec stim[$1].loc($3) } } proc add_flush() { if (flush_) { sprint(tstr, "flush_list.append(%s)", this) execute(tstr) } } func view_count() { if (flush_) { return g.view_count() }else{ return 0 } } proc begin() { } proc flush() { pl() } proc save() {} endtemplate ImpedanceRatio proc makeImpRatio() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an ImpedanceRatio") return } hoc_obj_[0] = new ImpedanceRatio() objref hoc_obj_[2] } neuron-7.5/share/lib/hoc/inserter.hoc000077500000000000000000000055141323325274500176600ustar00rootroot00000000000000/* ?0 UserClasses Inserter Insert and remove mechanisms. Keep default parameters between removal and re-insertion. Most useful in context of single compartment simulations. Note that when a mechanism is removed by clicking on a checkmarked mechanism, the parameters are saved in a MechanismStandard. When the Mechanism is re-installed, those parameters are restored. If the Inserter panel is saved in a session, the MechanismStandards are saved as well. ?0 User HocCode Inserter */ help ?0 begintemplate Inserter public v1, dsave objectvar mt, sec, ms[1], sf, v1, this strdef mname, tempstr double mstate[1] proc init() { sec = new SectionRef() build() if (numarg() == 1) if ($1 == 0) return v1.map("Insert/Remove Mechanisms") } proc build() { local i v1 = new VBox() v1.priority(900) v1.ref(this) v1.save("save()") v1.intercept(1) sf = new StringFunctions() mt = new MechanismType(0) double mstate[mt.count()] objectvar ms[mt.count()] xpanel("Inserter") sec.sec sectionname(tempstr) xlabel(tempstr) for i=0,mt.count-1 { mt.select(i) mt.selected(mname) // don't do certain ones if (i < 7 && i != 2) { continue } if (sf.substr(mname, "_ion") >= 0) { continue } sprint(tempstr, "maction(%d)", i) xcheckbox(mname, &mstate[i], tempstr) sec.sec if(ismembrane(mname)) { mstate[i] = 1 ms[i] = new MechanismStandard(mname) ms[i].in() } } xpanel() v1.intercept(0) } proc maction() { local i i = $1 mt.select(i) mt.selected(mname) if (object_id(ms[i]) == 0) { ms[i] = new MechanismStandard(mname) } sec.sec { if (mstate[i]) { sprint(tempstr, "insert %s", mname) execute(tempstr) ms[i].out() }else{ ms[i].in() mt.remove() } } } proc save() { v1.save("load_file(\"inserter.hoc\", \"Inserter\")\n}\n{") sec.sec sectionname(tempstr) sprint(tempstr, "%s ocbox_ = new Inserter(0)", tempstr) v1.save(tempstr) v1.save("}\n{object_push(ocbox_)}\n{") dsave(v1) v1.save("{\nocbox_ = ocbox_.v1") } proc dsave() { for i = 0, mt.count() - 1 { if (object_id(ms[i])) { ms[i].in() ms[i].name(tempstr) sprint(tempstr, "mt.select(\"%s\") i = mt.selected()", tempstr) $o1.save(tempstr) ms[i].save("ms[i]") sprint(tempstr, "mstate[i]= %d", mstate[i]) $o1.save(tempstr) if (mstate[i]) { $o1.save("maction(i)") } } } $o1.save("}\n{object_pop() doNotify()}") } endtemplate Inserter objectvar tempobj objectvar tempobj2 {load_file("shapebox.hoc","ShapeBrowser")} proc makeinserter() {local single if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an Inserter") return } if (numarg()) { single = $1 }else{ single = 0 forall { single = single + 1 if (single > 1) { single = 0 break } } } if (single == 0) { tempobj = new ShapeBrowser("makeinserter(1)") tempobj.hbox.map() }else{ tempobj = new Inserter() } objectvar tempobj } neuron-7.5/share/lib/hoc/kinbuild.hoc000077500000000000000000000254361323325274500176330ustar00rootroot00000000000000/* This is proof of concept. to be complete it should also 1) Have a tool for setting Boltzmann factors for voltage sensitive rates. 2) For single channel set random initial condition with respect to steady state probabilities. 3) Allow macroscopic current simulations (plot total conductance and plot time dependent probabilities) 4) Sum single channel sweeps during voltage clamp 5) Calculate log liklihood of a data trace given a model (should take into account brief transitions too fast for data acquisition.) */ begintemplate SChanAnal public q, perm, qa, qf, qfa, qaf, odist, cdist, pinf, phio, phis, r, R objref q, perm, tobj, qa, qf, qaf, qfa, pinf, phio, phis, r, R proc init() {local i, j q = $o1.c for i=0, q.nrow-1 { for j=0, q.nrow-1 if (q.x[i][j] > 0) q.x[i][j] = 1/q.x[i][j] q.x[i][i] = -q.getrow(i).sum } perm = q.getdiag(0) na = q.nrow for i=0, q.nrow-1 if ($o2.x[i] == 0) {perm.x[i] = -1/perm.x[i] na -= 1} perm = perm.sortindex permute() qa = q.bcopy(0,0,na,na) qf = q.bcopy(na,na,q.nrow-na,q.ncol-na) qaf = q.bcopy(0, na, na, q.ncol-na) qfa = q.bcopy(na, 0, q.nrow-na, na) //print "m" $o1.printf //print "perm" perm.printf //print "q" q.printf //print "qa" qa.printf //print "qf" qf.printf //print "qaf" qaf.printf //print "qfa" qfa.printf steady_state() //print "pinf" pinf.printf //print "q*pinf" q.transpose.mulv(pinf).printf //print "phio" phio.printf //print "phis" phis.printf } proc permute() {local i, j tobj = q.c for i=0, q.nrow-1 for j=0, q.ncol-1 { q.x[i][j] = tobj.x[perm.x[i]][perm.x[j]] } } proc steady_state() {local i r = q.getrow(q.nrow-1).resize(q.nrow-1) R = q.bcopy(0,0,q.nrow-1, q.ncol-1) for i=0, r.size-1 { R.setrow(i, R.getrow(i).sub(r)) } pinf = R.inverse.transpose.mulv(r).mul(-1) pinf.append(1 - pinf.sum) phio = qfa.transpose.mulv(pinf.c(na, q.nrow-1)) phio.div(phio.sum) phis = qaf.transpose.mulv(pinf.c(0, na-1)) phis.div(phis.sum) } func odist() { return qa.c.muls($1).exp.mulm(qa).muls(-1).transpose.mulv(phio).sum } func cdist() { return qf.c.muls($1).exp.mulm(qf).muls(-1).transpose.mulv(phis).sum } endtemplate SChanAnal begintemplate SChanHist public hist, g, vbox, thist, nbin, tmax, meanstr, cond, tobj, analysis, plog, ltmin objref thist, g, vbox, time, this, tobj strdef meanstr proc init() { plog = 0 cond = 0 nbin = 20 tmax = 10 ltmin = -2 if (numarg() > 1) { cond = $1 nbin = $2 tmax = $3 plog = $4 ltmin = $5 } build() } proc build() { vbox = new VBox() vbox.save("") vbox.intercept(1) xpanel("") xstatebutton("Sqrt(Frequency) vs log10(time)", &plog, "g.erase()") xpvalue("Conductance", &cond, 1, "g.erase") xpvalue("# Bins", &nbin, 1, "hist1()") xpvalue("log10(tmin) (for log scale)", <min) xpvalue("Tmax", &tmax, 1, "hist1()") meanstr = "Mean = ????????????" xvarlabel(meanstr) xbutton("Erase", "g.erase") xpanel() g = new Graph() vbox.intercept(0) } proc analysis() {local i, t, y, ltmax, lt, dt g.beginline(2,1) if (plog) { ltmax = log10(tmax) for i=0,nbin { lt =(ltmin + i*(ltmax - ltmin)/nbin) t = 10^lt dt = log(10)*10^lt if (cond==0) { y = $o1.cdist(t)*dt }else{ y = $o1.odist(t)*dt } g.line(lt, sqrt(y)) } }else{ for i=0,nbin { t = i*tmax/nbin if (cond==0) { y = $o1.cdist(t) }else{ y = $o1.odist(t) } g.line(t, y) } } g.flush() } proc hist() {local m time = $o1.ind($o2.c.indvwhere("==", cond)) hist1() } proc hist1() {local i, m2, dlt, ltmax if (object_id(time) == 0) return m2 = tmax sprint(meanstr, "Mean = %g", time.mean) if (plog) { ltmax = log10(tmax) dlt = (ltmax - ltmin)/nbin thist = time.c.log10.histogram(ltmin, ltmax, dlt) thist.remove(0) thist.div(thist.sum) tobj = thist.c.indgen(ltmin+dlt/2, dlt) //for i=0, thist.size-1 thist.x[i] *= 10^(ltmin+dlt+i*dlt) - 10^(ltmin+i*dlt) thist.mul(1/dlt) thist.sqrt }else{ thist = time.histogram(0, m2, m2/nbin) thist.remove(0) tobj = thist.c.indgen(m2/2/nbin, m2/nbin) thist.mul(nbin/m2/thist.sum) } thist.line(g, tobj) } proc save() { } endtemplate SChanHist begintemplate KineticBuild public m, g, vbox, map, sch, cvec objref m, xpos, ypos, vbox, g, tobj, cvec, this, sch, cpan, taupan objref svec, tvec, hlist, gman, tman, sman, anal strdef tstr, tstr1 proc init() {local i radius = 20 m = new Matrix(2,2) m.setdiag(1,1) m.setdiag(-1,1) ntran=100 sch = new SingleChan(m) xpos = new Vector(m.nrow) xpos.indgen(100) ypos = new Vector(m.nrow) cvec = new Vector(m.nrow) cvec.x[1] = 1 svec = new Vector() tvec=svec.c tman=svec.c sman=svec.c gman = new Graph(0) hlist = new List() if (numarg() == 0) { build() draw() center() map() setcond() } } proc build() { vbox = new VBox() vbox.dismiss_action("dismiss()") vbox.save("save()") vbox.ref(this) vbox.intercept(1) xpanel("Control") xbutton("Conductances", "conductance_panel()") xbutton("Tau's", "tau_panel()") xpvalue("# Conductance transitions in run", &ntran, 1) xbutton("Run", "run()") xbutton("Conductance vs time Graph", "gman = new Graph()") xbutton("Conductance Prob Distribution", "maphist(new SChanHist())") xbutton("Analysis", "analysis()") xpanel() g = new Graph(0) g.view(2) g.menu_tool("Arrange State Diagram", "arrange") g.menu_tool("Draw new transition", "newtrans") g.menu_tool("Remove transition", "removetrans") g.menu_tool("New States", "newstate") g.menu_tool("Remove state", "removestate") vbox.intercept(0) } proc dismiss() {local i for i=0, hlist.count-1 { hlist.object(i).vbox.unmap } vbox.unmap() } proc analysis() {local i anal = new SChanAnal(m, cvec) for i=0, hlist.count-1 { hlist.object(i).analysis(anal) } } proc maphist() { hlist.append($o1) sprint(tstr, "Histogram for %s", this) hlist.object(hlist.count-1).vbox.map(tstr) } proc run() {local i tvec.resize(ntran) sch.current_state(0) sch.cond_transitions(tvec, svec) manhattan(tvec, svec) for i=0, hlist.count-1 { hlist.object(i).hist(tvec, svec) } } proc manhattan() { if (gman.view_count > 0) { gman.erase() tman.resample($o1.c.integral(),2) tman.rotate(1,0) sman.resample($o2,2) sman.line(gman, tman) } } proc draw() {local i, j g.xaxis(3) g.erase_all for i=0, m.nrow()-1 { circle(i) } for i=0, m.nrow()-1 { for j=0, m.ncol()-1 { if (m.x[i][j] > 0) { arrow(i, j) } } } if (numarg() > 0) return for i=0, m.nrow()-1 { sprint(tstr, "%g", i) g.label(xpos.x[i], ypos.x[i], tstr, 1, 1, .5, 0, 1) sprint(tstr, "%g", cvec.x[i]) g.label(xpos.x[i], ypos.x[i], tstr, 1, 1, .5, 1, 1) } g.flush() } proc center() {local w, h, sx, sy, cx, cy tobj = new Vector(4) g.size(&tobj.x[0]) g.size(tobj.x[0], tobj.x[1], tobj.x[2], tobj.x[3]) draw() } proc circle() {local i, x, y g.beginline() for i=0, 20 { x = radius*sin(PI*i/10) y = radius*cos(PI*i/10) g.line(x+xpos.x[$1], y + ypos.x[$1]) } g.flush() } proc arrow() {local x, y, d, x1, y1, r, r2, x2, y2, ax, ay r = 3*radius/2 r2 = radius/4 x = xpos.x[$2] - xpos.x[$1] y = ypos.x[$2] - ypos.x[$1] d = sqrt(x*x + y*y) x /= d y /= d x1 = xpos.x[$1] + x*r - y*r2 y1 = ypos.x[$1] + y*r + x*r2 g.beginline() g.line(x1, y1) x2 = xpos.x[$2] - x*r - y*r2 y2 = ypos.x[$2] - y*r + x*r2 g.line(x2, y2) x2 += -y*r2 - 2*x*r2 y2 += x*r2 - 2*y*r2 g.line(x2, y2) g.flush() sprint(tstr, "1/%g", m.x[$1][$2]) if (x > 0) { if (y > 0) { ax = 1 ay = 0 }else{ ax = 0 ay = 0 } }else{ if (y >= 0) { ax = 1 ay = 1 }else{ ax = 0 ay = 1 } } g.label(x1, y1, tstr, 1, 1, ax, ay, 1) } func selstate() {local i for i=0, m.nrow-1 { if ((($1-xpos.x[i])^2 + ($2-ypos.x[i])^2) < radius^2) { return i } } return -1 } proc arrange() {local i if ($1 == 2) { imove = selstate($2,$3) $1 = 1 } if (imove == -1) return xpos.x[imove] = $2 ypos.x[imove] = $3 if ($1 == 1) { draw(0) } if ($1 == 3) { draw() imove = -1 } } proc newstate() { if ($1 == 2) { m.resize(m.nrow+1, m.ncol+1) cvec.resize(m.nrow) xpos.resize(m.nrow) ypos.resize(m.nrow) cvec.x[xpos.size-1] = 0 xpos.x[xpos.size-1] = $2 ypos.x[xpos.size-1] = $3 draw() sch.set_rates(m) objref taupan, cpan } arrange($1, $2, $3) } proc removestate() {local i, j if ($1 == 2 && m.nrow > 2) { i = selstate($2, $3) cvec.remove(i) xpos.remove(i) ypos.remove(i) for j = i, m.nrow-2 { m.setcol(j, m.getcol(j+1)) m.setrow(j, m.getrow(j+1)) } m.resize(m.nrow-1, m.ncol-1) draw() sch.set_rates(m) objref taupan, cpan } } proc dotrans() {local i if ($1 == 2) { imove = selstate($2,$3) $1 = 1 } if (imove == -1) return if ($1 == 1) { draw(0) g.beginline() g.line(xpos.x[imove], ypos.x[imove]) g.line($2, $3) g.flush() } if ($1 == 3) { i = selstate($2,$3) if (i >= 0) { m.x[imove][i] = $4 m.x[i][imove] = $4 } draw() imove = -1 sch.set_rates(m) objref taupan } } proc newtrans() { dotrans($1,$2,$3,1) } proc removetrans() { dotrans($1,$2,$3,0) } proc conductance_panel() {local i cpan = new VBox() cpan.intercept(1) cpan.save("") xpanel("") for i=0, cvec.size-1 { sprint(tstr, "State %d", i) xpvalue(tstr, &cvec.x[i], 1, "setcond()") } xpanel() cpan.intercept(0) sprint(tstr, "Conductance for %s", this) cpan.map(tstr) } proc tau_panel() {local i, j taupan = new VBox() taupan.intercept(1) taupan.save("") xpanel("") for i=0, m.nrow-1 for j=0, m.ncol-1 if (m.x[i][j] > 0) { sprint(tstr, "From %d to %d", i, j) sprint(tstr1, "set_rate(%d,%d)", i, j) xpvalue(tstr, &m.x[i][j], 1, tstr1) } xpanel() taupan.intercept(0) sprint(tstr, "Tau (ms) values for %s", this) taupan.map(tstr) } proc setcond() {local i for i=0, m.nrow-1 { cvec.x[i] = abs(int(cvec.x[i])) sch.cond(i, cvec.x[i]) } draw() } proc set_rate() { if (m.x[$1][$2] < 1e-6) { m.x[$1][$2] = 1e-6 } sch.set_rates($1, $2, m.x[$1][$2]) draw() } proc map() { sprint(tstr, "%s", this) if (numarg() > 1) { vbox.map(tstr, $2, $3, $4, $5) }else{ vbox.map(tstr) } } proc resize() { m.resize($1,$1) cvec.resize($1) ypos.resize($1) xpos.resize($1) } proc save() {local i, j vbox.save("load_file(\"kinbuild.hoc\")}\n{") sprint(tstr, "ocbox_=new KineticBuild(0)") vbox.save(tstr) vbox.save("}\n{object_push(ocbox_)}\n{") sprint(tstr, "build() resize(%d)", m.nrow) vbox.save(tstr) for i=0, m.nrow-1 { sprint(tstr, "xpos.x[%d]=%g ypos.x[%d]=%g cvec.x[%d]=%g",\ i, xpos.x[i], i, ypos.x[i], i, cvec.x[i]) vbox.save(tstr) } for i=0, m.nrow-1 for j=0,m.ncol-1 if (m.x[i][j] > 0) { sprint(tstr, "m.x[%d][%d] = %g", i, j, m.x[i][j]) vbox.save(tstr) } for i=0, hlist.count-1 { tobj = hlist.object(i) sprint(tstr, "maphist(new SChanHist(%g, %g, %g, %g, %g))",\ tobj.cond, tobj.nbin, tobj.tmax, tobj.plog, tobj.ltmin) vbox.save(tstr) } objref tobj objref tobj g.erase_all() vbox.save("sch.set_rates(m) setcond()\n}\n{object_pop()}\n{") g.save_name("ocbox_.g", 1) draw() } endtemplate KineticBuild objref tobj proc makekineticbuilder() { tobj = new KineticBuild() objref tobj } neuron-7.5/share/lib/hoc/lincir.hoc000077500000000000000000000003401323325274500172750ustar00rootroot00000000000000{load_file("stdlib.hoc")} {xopen("lincir/elmbase.hoc")} {xopen("lincir/linmech.hoc")} {xopen("lincir/lingraph.hoc")} {xopen("lincir/lincir1.hoc")} objref tobj proc makeCircuit() { tobj = new LinearCircuit() objref tobj } neuron-7.5/share/lib/hoc/lincir/000077500000000000000000000000001323325274500166025ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/lincir/Makefile.am000077500000000000000000000004011323325274500206340ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehoclincirdir = $(neuronhomehocdir)/lincir neuronhomehoclincir_DATA = lincir1.hoc elmbase.hoc linmech.hoc lingraph.hoc EXTRA_DIST = $(neuronhomehoclincir_DATA) neuron-7.5/share/lib/hoc/lincir/Makefile.in000066400000000000000000000444571323325274500206650ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/lincir ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehoclincirdir)" DATA = $(neuronhomehoclincir_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehoclincirdir = $(neuronhomehocdir)/lincir neuronhomehoclincir_DATA = lincir1.hoc elmbase.hoc linmech.hoc lingraph.hoc EXTRA_DIST = $(neuronhomehoclincir_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/lincir/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/lincir/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehoclincirDATA: $(neuronhomehoclincir_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehoclincir_DATA)'; test -n "$(neuronhomehoclincirdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehoclincirdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehoclincirdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehoclincirdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehoclincirdir)" || exit $$?; \ done uninstall-neuronhomehoclincirDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehoclincir_DATA)'; test -n "$(neuronhomehoclincirdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehoclincirdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomehoclincirdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomehoclincirDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomehoclincirDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehoclincirDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomehoclincirDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/lincir/elmbase.hoc000077500000000000000000000507571323325274500207260ustar00rootroot00000000000000{load_file("shapebox.hoc")} begintemplate LinearCircuitNode public elements, ends, add, merge, index, re_index objref elements, ends, this, tobj proc init() { index = -1 elements = new List() ends = new Vector() } proc add() { elements.append($o1) ends.append($2) $o1.lincirnodes[$2] = this } proc merge() { local i tobj = $o1 // because $o1 will change!!! if (tobj == this) return for i = 0, tobj.elements.count - 1 { add(tobj.elements.object(i), tobj.ends.x[i]) } tobj.elements.remove_all() tobj.ends.resize(0) } proc re_index() {local i index = $1 } endtemplate LinearCircuitNode begintemplate LinCirMatSym public add, sub, val, exists, zerorow, nrow, ncol, pr objref m[1][1] proc init() { nrow = $1 ncol = $2 objref m[$1][$2] } obfunc val() { return m[$1][$2] } func exists() { if (object_id(m[$1][$2]) == 0) return 0 else return 1 } proc add() { if (!exists($1,$2)) { m[$1][$2] = new String($s3) }else{ sprint(m[$1][$2].s, "%s + %s", m[$1][$2].s, $s3) } } proc sub() { if (!exists($1,$2)) { m[$1][$2] = new String() sprint(m[$1][$2].s, "-%s", $s3) }else{ sprint(m[$1][$2].s, "%s - %s", m[$1][$2].s, $s3) } } proc zerorow() {local j localobj nil for j=0, ncol-1 { m[$1][j] = nil } } proc pr() { local i, j, nc nc = 0 if (numarg() > 2) { nc = $3 } //ground equation and ground voltage state removed if $s1 for i=0,nrow-1 { for j=0, ncol-1 { if (exists(i,j)) { if (numarg() > 0) { if (i == 0 || j == 0) { continue } if (ncol == 1) { if (numarg() > 1) { if (i <= nc) { $o2.printf("%s[%d] = (%s)*_afac.x[%d]\n", $s1, i-1, m[i][0].s, i-1) }else{ $o2.printf("%s[%d] = %s\n", $s1, i-1, m[i][0].s) } }else{ printf("%s[%d] = %s\n", $s1, i-1, m[i][0].s) } }else{ if (numarg() > 1) { if (i <= nc) { $o2.printf("%s[%d][%d] = (%s)*_afac.x[%d]\n", $s1, i-1, j-1, m[i][j].s, i-1) }else{ $o2.printf("%s[%d][%d] = %s\n", $s1, i-1, j-1, m[i][j].s) } }else{ printf("%s[%d][%d] = %s\n", $s1, i-1, j-1, m[i][j].s) } } }else{ printf("m[%d][%d] = %s\n", i, j, m[i][j].s) } } } } } endtemplate LinCirMatSym // too bad there is no inheritance // patterns involve a set of nodes so that every node is at a grid point // as long as the location is at a grid point. This basically means that // angle and scale may be limited. ie the scale can be any integer if the // angle is nPI/2. // all patterns have nodes at integer coords relative to the origin. begintemplate ElementBase public indices, extra_eqn, setup_mat, setup_mat_sym, extra_info public pat, scale, angle, selected, x, y, location, move, ends, pl, plc, val public nodes, tr, nd, part, valedit, lincirnodes, nnode, setalias public move_label, names, names_x, names_y, valmap, ic external hoc_sf_ objref pat, val, nd, tr, this, lincirnodes[1], indices, extra_info objref names[1], names_x, names_y, ic strdef tstr proc init() { res_ = 10 val = new Vector() pat = $o1 pat.default(val, extra_info) nnode = pat.nodes.nrow part = $2 scale = 2 angle = 0 tr = new Matrix(2,2) x = 0 y = 0 objref lincirnodes[nnode] objref names[nnode+1] ic = new Vector(nnode+1) //print pat.name if (strcmp(pat.name, "") != 0) { sprint(tstr, "%s%d", pat.name, object_id(this, 1)) names[0] = new String(tstr) //print names[0].s names_x = new Vector(nnode+1, 15) names_y = new Vector(nnode+1, 15) // default cell label location should not interfere // with selecting a node to specify a label if (strcmp(pat.name, "S") == 0) { names_x.x[0] = 0 names_y.x[0] = 0 } } indices = new Vector(pat.extra_eqn + nnode) } proc move_label() { names_x.x[$1] = $2 - x names_y.x[$1] = $3 - y if ($1 > 0) { names_x.x[$1] -= nd.x[$1-1][0] names_y.x[$1] -= nd.x[$1-1][1] } } proc valedit() { local i for i=0, val.size-1 { pat.val(tstr, i) sprint(tstr, "%s %s", names[0].s, tstr) sprint(tstr, "xpvalue(\"%s\", &%s.val.x[%d], 1, \"%s\")",\ tstr, this, i, $s1) execute(tstr) //xpvalue(tstr, &val.x[i], 1, $s1) } } proc valmap() {local i for i=0, val.size-1 { pat.val(tstr, i) sprint(tstr, "%s %s %s.val.x[%d]", names[0].s, tstr, this, i) $o1.append(new String(tstr)) } } proc setalias() {local i for i=0, val.size-1 { pat.setalias(tstr, i) sprint(tstr, "%s%s", names[0].s, tstr) hoc_sf_.alias($o1, tstr, &val.x[i]) } } func extra_eqn() { for i=0, nnode-1 { indices.x[i] = lincirnodes[i].index } for i=0, pat.extra_eqn - 1 { indices.x[nnode + i] = $1 + i } return $1 + pat.extra_eqn } proc setup_mat() { pat.setup_matrix($o1, $o2, $o3, val, indices) } proc setup_mat_sym() { pat.setup_matrix_sym($o1, $o2, $o3, names[0], indices) } func res() { return int($1/res_ + .5) * res_ } proc pl() {local i, x1, y1 $o1.glyph(pat.g, x, y, scale, scale, angle*DEG) if (object_id(nd) == 0) { nodes() } if (object_id(names[0])) { $o1.label(names_x.x[0] + x, names_y.x[0] + y, names[0].s, 1, 1, .5, .5, 1) } for i=1, nnode { if (object_id(names[i])) { x1 = nd.x[i-1][0] + x y1 = nd.x[i-1][1] + y $o1.label(names_x.x[i] + x1, names_y.x[i] + y1, names[i].s, 1, 1, .5, .5, 1) } } } proc plc() { $o1.glyph($o2.g, x, y, scale, scale, angle*DEG) } proc nodes() {local c, s c = cos(angle)*scale s = sin(angle)*scale tr.set(c, s, -s, c) nd = pat.nodes.mulm(tr) } proc old() { x0 = x y0 = y } func selected() {local i, x1, y1 nodes() x1 = $1 - x y1 = $2 - y for i=0, nd.nrow-1 { if ((nd.x[i][0] - x1)^2 < 100) { if ((nd.x[i][1] - y1)^2 < 100) { old() return i + 1 } } } if (x1^2 + y1^2 < 100) { old() return 0 } return -1 } proc location() { x = x0 + res($1 - x0) y = y0 + res($2 - y0) } proc move() { if ($1 == 0) { location($2, $3) }else if (nd.nrow == 2){ consist2($2, $3, $1-1, $1%2) }else if (nd.nrow == 1) { consist1($2, $3) }else{ consist3($2,$3,$1-1) } } proc consist2() {local i, j $1 = res($1) $2 = res($2) x = (($1 + nd.x[$4][0] + x)/2) y = (($2 + nd.x[$4][1] + y)/2) scale = sqrt(($1 - x)^2 + ($2 - y)^2)*2/pat.len if (scale == 0) { angle = 0 scale = 1 }else{ if ($3 == 1) { angle = atan2($2 - y, $1 - x) }else{ angle = atan2(y - $2, x - $1) } } } proc consist1() { $1 = res($1) $2 = res($2) // x = ($1 - nd.x[0][0] + x)/2 // y = ($2 - nd.x[0][1] + y)/2 scale = sqrt(($1 - x)^2 + ($2 - y)^2)*2/pat.len if (scale == 0) { angle = 0 scale = 1 }else{ angle = atan2(x - $1, $2 - y) } } proc consist3() {local fix // if ($3 != 2) return $1 = res($1) $2 = res($2) scale = sqrt(($1 - x)^2 + ($2 - y)^2)*2/pat.len scale = int(scale + .5) if (scale == 0) { angle = 0 scale = 1 }else{ if ($3 == 0) { angle = atan2(y - $2, x - $1) }else if ($3 == 1) { angle = atan2(y - $2, x - $1) }else{ angle = atan2($2 - y, $1 - x) } angle = int(angle*DEG/45)*(45/DEG) } } proc ends() { nodes() $o1.append(nd.getcol(0).add(x)) $o2.append(nd.getcol(1).add(y)) } endtemplate ElementBase begintemplate Resistor public nodes, g, len, val, default, extra_eqn, setup_matrix, name public setup_matrix_sym public setalias objref nodes, g strdef name proc init() { name = "R" extra_eqn = 0 len = 20 nodes = new Matrix(2,2) nodes.set(-10, 0, 10, 0) g = new Glyph() g.path.m(-10,0).l(-7,0).l(-5,2).l(-3,-2).l(-1,2).l(1,-2).l(3,2) g.l(5,-2).l(7,0).l(10,0).s($1) } proc setup_matrix() {local g, i, j // cmat, rmat, bvec, val, indices if ($o4.x[0] <= 0) { $o4.x[0] = 1e-9 } g = 1/$o4.x[0] i = $o5.x[0] j = $o5.x[1] $o2.x[i][i] -= g $o2.x[i][j] += g $o2.x[j][j] -= g $o2.x[j][i] += g } proc setup_matrix_sym() {local i, j localobj g // cmat, rmat, bvec, val, indices g = new String() sprint(g.s, "1.0/%s", $o4.s) i = $o5.x[0] j = $o5.x[1] $o2.sub(i, i, g.s) $o2.add(i, j, g.s) $o2.sub(j, j, g.s) $o2.add(j, i, g.s) } proc default() { $o1.append(1) //Mohm } proc val() { sprint($s1, "(Mohm)") } proc setalias() { $s1 = "" } endtemplate Resistor begintemplate Wire public nodes, g, len, val, default, extra_eqn, setup_matrix, name public setup_matrix_sym public setalias objref nodes, g strdef name proc init() { extra_eqn = 0 len = 20 nodes = new Matrix(2,2) nodes.set(-10, 0, 10, 0) g = new Glyph() g.path.m(-10,0).l(-5,0).s($1) g.path.m(-5,0).l(5,0).s($1,5) g.path.m(5,0).l(10,0).s($1) } proc setup_matrix(){} proc setup_matrix_sym(){} proc default() { } proc val() { } proc setalias() { $s1 = "" } endtemplate Wire begintemplate Capacitor public nodes, g, len, val, default, extra_eqn, setup_matrix, name public setup_matrix_sym public setalias objref nodes, g strdef name proc init() { name = "C" extra_eqn = 0 if (numarg() == 2) { $o2.append(1) // nanofarad } len = 20 nodes = new Matrix(2,2) nodes.set(-10, 0, 10, 0) g = new Glyph() g.path.m(-10,0).l(-2,0).s($1) g.path.m(1,0).l(10,0).s($1) g.path.m(-2,5).l(-2,-5).s($1) // g.path.m(2,5).curve(2,-5, 1,2, 1,-2).s($1) g.path.m(2,5).curve(2,-5, .9,2, .9,-2).s($1) } proc setup_matrix() {local c, i, j // cmat, rmat, bvec, val, indices if ($o4.x[0] < 0) { $o4.x[0] = 0 } c = $o4.x[0] i = $o5.x[0] j = $o5.x[1] $o1.x[i][i] -= c $o1.x[i][j] += c $o1.x[j][j] -= c $o1.x[j][i] += c } proc setup_matrix_sym() {local i, j localobj c// cmat, rmat, bvec, val, indices c = new String() sprint(c.s, "%s", $o4.s) i = $o5.x[0] j = $o5.x[1] $o1.sub(i,i,c.s) $o1.add(i,j,c.s) $o1.sub(j,j,c.s) $o1.add(j,i,c.s) } proc default() { $o1.append(1) // nanofarad } proc val() { sprint($s1, "(nF)") } proc setalias() { $s1 = "" } endtemplate Capacitor begintemplate Inductor public nodes, g, len, val, default, extra_eqn, setup_matrix, name, ename public setup_matrix_sym public setalias objref nodes, g strdef name proc init() {local x, y, loops, wirelen name = "L" extra_eqn = 1 if (numarg() == 2) { $o2.append(1000) // 1 kiloHenry } len = 20 nodes = new Matrix(2,2) nodes.set(-10, 0, 10, 0) x=-10 y=0 loops=2 wirelen = (len - (4.1*(loops+1) - 2.15*loops))/2 g = new Glyph() g.path.m(x,y).l(x+=wirelen,y) for idx=1,loops { g.curve(x+4.1,y-0.75,x+3,12,x+=4.1,y-=0.75) g.curve(x-2.15,y+0.75,x-1.125,y-.3,x-=2.15,y+=.75) } g.curve(x+4.1,y,x+3,12,x+=4.1,y) g.l(10,y).s($1) } proc setup_matrix() {local ell, i, j, k // cmat, rmat, bvec, val, indices // since cy' + gy = b we want vj - vi = LI' // equations are analogous to both a battery and a capacitor if ($o4.x[0] < 0) { $o4.x[0] = 0 } ell = $o4.x[0] // Henry i = $o5.x[0] j = $o5.x[1] k = $o5.x[2] $o2.x[i][k] -= 1 $o2.x[j][k] += 1 $o2.x[k][i] -= 1 $o2.x[k][j] += 1 $o1.x[k][k] += 0.001*ell //kiloHenry } proc setup_matrix_sym() {local i, j, k localobj ell// cmat, rmat, bvec, val, indices // since cy' + gy = b we want vj - vi = LI' // equations are analogous to both a battery and a capacitor ell = new String() sprint(ell.s, "0.001*%s", $o4.s) i = $o5.x[0] j = $o5.x[1] k = $o5.x[2] $o2.sub(i,k,"1.0") $o2.add(j,k,"1.0") $o2.sub(k,i,"1.0") $o2.add(k,i,"1.0") $o2.add(k,k,ell.s) } proc default() { $o1.append(1000) // 1 kiloHenry } proc val() { sprint($s1, "(H)") } proc setalias() { $s1 = "" } proc ename() { sprint($s1, "I (nA)") } endtemplate Inductor begintemplate SourceInfo public dur, amp, tvec, changed_dur, play, box, save, restore public setup_matrix_sym public setalias, xtrn, set_xtrn objref dur, amp, tvec, box strdef tstr proc init() { xtrn = 0 dur = new Vector(3,1e9) amp = new Vector(3,0) tvec = new Vector(3) changed_dur() } proc changed_dur() { tvec.integral(dur).rotate(1,0) } proc play() { if (xtrn == 0) { amp.play(&$o2.x[$o1.indices.x[2]-1], tvec) } } proc set_xtrn() { if (numarg() == 0) { // toggled by xcheckbox so xtrn is correct if (xtrn == 0) { play() }else{ amp.play_remove() } }else{ if (xtrn == 0 && $1 == 1) { amp.play_remove() }else if (xtrn == 1 && $1 == 0) { play() } xtrn = $1 } } proc save() {local i sprint(tstr, "%d", dur.size) $o1.save(tstr) for i=0, dur.size-1 { sprint(tstr, "%g %g", dur.x[i], amp.x[i]) $o1.save(tstr) } if (xtrn == 1) { $o1.save("{sel.extra_info.set_xtrn(1)}") } } proc restore() {local i, n n = fscan() dur.resize(n) amp.resize(n) tvec.resize(n) for i=0, n-1 { dur.x[i] = fscan() amp.x[i] = fscan() } changed_dur() } endtemplate SourceInfo begintemplate Battery public nodes, g, len, val, default, extra_eqn, setup_matrix, name, ename public setup_matrix_sym public setalias objref nodes, g strdef name proc init() { name = "B" extra_eqn = 1 if (numarg() == 2) { $o2.append(1) // 1 mV } len = 20 nodes = new Matrix(2,2) nodes.set(-10, 0, 10, 0) g = new Glyph() g.path.m(-10,0).l(-1,0).s($1) g.path.m(1,0).l(10,0).s($1) g.path.m(1,5).l(1,-5).s($1) g.path.m(-1,2).l(-1,-2).s($1,3) g.path.m(4,3).l(2,3).s($1) g.path.m(3,4).l(3,2).s($1) } proc setup_matrix() {local e, i, j, k // cmat, rmat, bvec, val, indices // since cy' + gy = b, we want vj - vi = e // for the k equation. current leaves node i and enters node j. i = $o5.x[0] j = $o5.x[1] k = $o5.x[2] $o2.x[i][k] -= 1 $o2.x[j][k] += 1 $o3.x[k] = 0 // e $o2.x[k][i] = -1 $o2.x[k][j] = 1 } proc setup_matrix_sym() {local i, j, k localobj e // cmat, rmat, bvec, val, indices // since cy' + gy = b, we want vj - vi = e // for the k equation. current leaves node i and enters node j. i = $o5.x[0] j = $o5.x[1] k = $o5.x[2] e = new String() sprint(e.s, "e_%s", $o4.s) $o2.sub(i,k,"1.0") $o2.add(j,k,"1.0") $o3.add(k,0, e.s) $o2.sub(k,i,"1.0") $o2.add(k,j,"1.0") } proc default() { $o2 = new SourceInfo() } proc val() { } proc setalias() { $s1 = "" } proc ename() { sprint($s1, "I (nA)") } endtemplate Battery begintemplate Current public nodes, g, len, val, default, extra_eqn, setup_matrix, name, ename public setup_matrix_sym public setalias objref nodes, g strdef name //the only reason for the extra_eqn, i = ival is to allow a time // dependent i that changes only one rhs element // otherwise the value adds and subtracts from two rhs elements respectively proc init() { name = "I" extra_eqn = 1 if (numarg() == 2) { $o2.append(0) // nA } len = 20 nodes = new Matrix(2,2) nodes.set(-10, 0, 10, 0) g = new Glyph() g.path.m(-10,0).l(10,0).s($1) g.path.m(-5,3).l(5,3).s($1) g.path.m(3,1).l(5,3).l(3,5).s($1) } proc setup_matrix() {local cur, i, j, k // cmat, rmat, bvec, val, indices // add and subtract current at the nodes i = $o5.x[0] j = $o5.x[1] k = $o5.x[2] //print "Current ", cur, " to nodes ", i, j $o3.x[k] = 0 //cur $o2.x[k][k] = 1 $o2.x[i][k] -= 1 $o2.x[j][k] += 1 } proc setup_matrix_sym() {local i, j, k localobj cur// cmat, rmat, bvec, val, indices // add and subtract current at the nodes i = $o5.x[0] j = $o5.x[1] k = $o5.x[2] //print "Current ", cur, " to nodes ", i, j cur = new String() sprint(cur.s, "i_%s", $o4.s) $o3.add(k,0, cur.s) $o2.add(k,k, "1.0") // must turn out = $o2.sub(i,k, "1.0") $o2.add(k,i, "1.0") } proc default() { $o2 = new SourceInfo() } proc val() { } proc setalias() { $s1 = "" } proc ename() { sprint($s1, "(nA)") } endtemplate Current begintemplate Ground public nodes, g, len, val, default, extra_eqn, setup_matrix, name public setup_matrix_sym public setalias objref nodes, g strdef name proc init() { extra_eqn = 0 len = 20 nodes = new Matrix(1,2) nodes.set(0,10) g = new Glyph() g.path.m(0,10).l(0,0).s($1) g.path.m(5, 0).l(-5, 0).l(0, -5).close.fill($1) } proc setup_matrix(){local i, j // cmat, rmat, bvec, val, indices // no extra equation. the common ground equation is done elsewhere return // j equation is v[i] = 0 - j variable is current and subtracted from node i = $o5.x[0] j = $o5.x[1] $o2.x[i][j] = -1 $o2.x[j][i] = 1 } proc setup_matrix_sym(){ } proc default() { } proc val() { } proc setalias() { $s1 = "" } endtemplate Ground begintemplate OpAmp public nodes, g, len, val, default, extra_eqn, setup_matrix, name, ename public setup_matrix_sym, xparm public setalias objref nodes, g, xparm[2] strdef name proc init() { name = "A" xparm[0] = new String("gain_") xparm[1] = new String("tau_") extra_eqn = 1 len = 40 nodes = new Matrix(3,2) nodes.set(-20, 10, -20, -10, 20, 0) g = new Glyph() g.path.m(-20,10).l(-14,10).s($1) g.path.m(-20,-10).l(-14,-10).s($1) g.path.m(20,0).l(14,0).s($1) g.path.m(-14,20).l(-14,-20).l(14,0).close.s($1) g.path.m(-10,10).l(-6,10).s($1) g.path.m(-10,-10).l(-6,-10).s($1) g.path.m(-8,-12).l(-8,-8).s($1) } proc setup_matrix() {local gain, tau, i, j, k, o // cmat, rmat, bvec, val, indices // o is the current output and the row is the equation that determines vk gain = $o4.x[0] if ($o4.x[1] < 0) { $o4.x[1] = 0 } tau = $o4.x[1] i = $o5.x[0] // - node j = $o5.x[1] // + node k = $o5.x[2] // output node o = $o5.x[3] // current output //printf("i=%d j=%d k=%d o=%d\n", i, j, k, o) // nothing for the input nodes // the output node adds the o current $o2.x[k][o] += 1 // now the o equation tau*dvk/dt + gain*(vi - vj) + vk = 0 $o1.x[o][k] = tau $o2.x[o][i] = gain $o2.x[o][j] = -gain $o2.x[o][k] = 1 } proc setup_matrix_sym() {local i, j, k, o localobj gain, tau// cmat, rmat, bvec, val, indices // o is the current output and the row is the equation that determines vk gain = new String() sprint(gain.s, "%s%s", xparm[0].s, $o4.s) tau = new String() sprint(tau.s, "%s%s", xparm[1].s, $o4.s) i = $o5.x[0] // - node j = $o5.x[1] // + node k = $o5.x[2] // output node o = $o5.x[3] // current output //printf("i=%d j=%d k=%d o=%d\n", i, j, k, o) // nothing for the input nodes // the output node adds the o current $o2.add(k,o,"1.0") // now the o equation tau*dvk/dt + gain*(vi - vj) + vk = 0 $o1.add(o,k,tau.s) $o2.add(o,i,gain.s) $o2.sub(o,j,gain.s) $o2.add(o,k,"1.0") } proc default() { $o1.append(1e6, 0) // gain, tau (ms) } proc val() { if ($2 == 0) { sprint($s1, " Gain") }else{ sprint($s1, "Tau (ms)") } } proc setalias() { if ($2 == 0) { $s1 = "_Gain" }else{ $s1 = "_Tau" } } proc ename() { sprint($s1, "I (nA)") } endtemplate OpAmp begintemplate InsideCell_Info public sec, x, select, set, name, has_loc public setup_matrix_sym public setalias objref sec, sh, this, pp strdef tstr proc init() { has_loc() } func has_loc() { if (execute1("sec.sec.v", this, 0)) { return 1 }else if (execute1("v", 0)) { sec = new SectionRef() x = .5 pp = new PointProcessMark(x) sh = new ShapeLocation(pp) return 1 }else{ objref sec, sh, pp } return 0 } func select() {local b if (!has_loc()) { continue_dialog("No accessed section and current location invalid") return 0 } b = sh.dialog() if (b) { x = pp.get_loc() sec = new SectionRef() pop_section() }else{ sec.sec sh.move(x) } return b } proc set() { sprint(tstr, "%s %s.sec = new SectionRef()", $s1, this) execute(tstr) x = $2 sec.sec { pp = new PointProcessMark(x) sh = new ShapeLocation(pp) } } proc name() { if (has_loc()) { sec.sec sprint(tstr, "%s(%g)", secname(), x) $o1.names[0].s = tstr }else{ $o1.names[0].s = "no location" } } endtemplate InsideCell_Info begintemplate InsideCell public nodes, g, len, val, default, extra_eqn, setup_matrix, name public setup_matrix_sym public setalias objref nodes, g, sloc strdef name proc init() { name = "S" extra_eqn = 0 len = 20 nodes = new Matrix(1,2) nodes.set(0,10) g = new Glyph() g.path.m(-10,-5).l(0,0).s($1) g.path.m(-10,5).l(0,0).s($1) g.path.m(0,0).l(10,0).s($1) g.path.m(-2,10).l(0,0).l(2,10).close.fill($1) } proc setup_matrix(){local i, c, g // cmat, rmat, bvec, val, indices //g = $o4.x[0] //c = $o4.x[1] //i = $o5.x[0] //$o1.x[i][i] -= c //$o2.x[i][i] -= g } proc setup_matrix_sym(){local i, c, g // cmat, rmat, bvec, val, indices } proc default() { // $o1.append(.001, 1) // S, uF $o2 = new InsideCell_Info() } proc val() { } proc setalias() { $s1 = "" } endtemplate InsideCell begintemplate OutsideCell // actually just InsideCell + 1 extracellular layer public nodes, g, len, val, default, extra_eqn, setup_matrix, name public setup_matrix_sym public setalias objref nodes, g, sloc strdef name proc init() { name = "S" extra_eqn = 0 len = 20 nodes = new Matrix(2,2) nodes.set(-10,0,10,0) g = new Glyph() g.path.m(-5,-10).l(0,0).s($1) g.path.m(5,-10).l(0,0).s($1) g.path.m(0,0).l(0,10).s($1) g.path.m(-10,2).l(0,0).l(-10,-2).close.fill($1) g.path.m(10,-2).l(3,0).l(10,2).close.fill($1) } proc setup_matrix(){local i, c, g // cmat, rmat, bvec, val, indices //g = $o4.x[0] //c = $o4.x[1] //i = $o5.x[0] //$o1.x[i][i] -= c //$o2.x[i][i] -= g } proc setup_matrix_sym(){local i, c, g // cmat, rmat, bvec, val, indices } proc default() { // $o1.append(.001, 1) // S, uF $o2 = new InsideCell_Info() } proc val() { } proc setalias() { $s1 = "" } endtemplate OutsideCell neuron-7.5/share/lib/hoc/lincir/lincir1.hoc000077500000000000000000001237451323325274500206550ustar00rootroot00000000000000begintemplate LinearCircuit public box, g, map, elements, sel, lincirnodes, model, change_val public pr_singular, prnodes, toggle_xtrn, setalias, version public con, plotwhat, dismiss_graph, varptrname, simulate_, ystate, yinit public gmat, cmat, bvec public gmatsym , cmatsym, bvecsym, mkclass, varnames, varname_indices external graph_menu_remove_most, LincirGraph, ElementBase, hoc_sf_ external valid_name_syntax objref box, g, this, elements, nil, sel, tobj, parts, model, fih objref xends, yends, tobj1, groundnode, si, con, lincirnodes objref gmat, cmat, bvec, inmat, inb, umat, vmat, dvec, almat, alvec objref valbox, namebox, deck, b1, statebox, icbox, graphlist objref varnames, varname_indices, namelist, ystate, yinit, icptrs objref ic_name_indices_, csx, csy, csp objref gmatsym, cmatsym, bvecsym objref label_dialog_title strdef tstr, tstr1 proc init() {local i label_dialog_title = new String("Enter Name") noconsist_ = 0 parasitic_ = 0 show_parts_ = 1 simulate_ = 0 keepcon_ = 0 show_con_ = 1 res_ = 10 csx = new Vector(3) csy = new Vector(3) // for coloring marks during label move ystate = new Vector(50) // for persistence yinit = new Vector(50) // for persistence graphlist = new List() lincirnodes = new List() elements = new List() xends = new Vector() yends = new Vector() ic_name_indices_ = new Vector(5) con = new Vector() parts = new List() WIRE = parts.count parts.append(new Wire(1, con)) parts.append(new Resistor(1, con)) parts.append(new Capacitor(1, con)) INDUCT = parts.count parts.append(new Inductor(1, con)) BAT = parts.count parts.append(new Battery(1, con)) CUR = parts.count parts.append(new Current(1, con)) GND = parts.count parts.append(new Ground(1, con)) OPAMP = parts.count parts.append(new OpAmp(1, con)) // following must be last so that part>=CELL logic clause works CELL = parts.count parts.append(new InsideCell(1, con)) parts.append(new OutsideCell(1, con)) ncellnode = 0 build() if (numarg() == 0) { map() } version_ = 2 version(version_) mkelm(GND, -100, -100, 1, 0) // but don't save it if it has these coords version(1) // assume absence of specific version command in session file fih = new FInitializeHandler(3, "finit()", this) } func version() { if (numarg() > 0) { if ($1 > 1) { part_offset = 0 }else{ part_offset = 1 } } return version_ } proc hints_arrange() { xpanel("LinearCircuit Arrange Hints") xlabel(" This tool is used to construct the structure of the circuit. The circuit") xlabel("is not actually in existence except when the \"Simulate\" radiobutton is active.") xlabel(" Selecting the center of one of the part types on the left of the scene") xlabel("creates an instance of the part which can be dragged to its desired position.") xlabel(" Selecting the center of an existing part allows moving it to a new position.") xlabel(" Moving a part off the scene destroys the part.") xlabel(" An unconnected end is denoted by a red circle. When the end of a part") xlabel("overlays the end of another part, its end is denoted by a black square.") xlabel(" Selecting the end of a part allows scaling and rotation of the part") xlabel("usually without changing the location of the other ends of the part.") xlabel("When \"Keep Connected\" is toggled on, moving of a part or end automatically") xlabel("rotates and scales the connecting parts to keep them connected.") xpanel() } proc hints_label() { xpanel("LinearCircuit Label Hints") xlabel(" Labels are used to construct parameter and state names.") xlabel(" While \"Move\" is selected, labels may be dragged to a new position") xlabel(" While \"Change\" is selected, selecting a label, center of a part,") xlabel("or an end connected to a part (GND and WIRE excluded) pops up") xlabel("a string chooser for entering a label for the part or end.") xlabel("Labels have priority so if they interfere with selecting the part or") xlabel("end, move them away temporarily") xlabel(" For, cell labels, a Shape Scene pops up for selecting the") xlabel("desired location of the circuit connection to the cell.") xlabel(" Since connection nodes involve multiple parts, they may have more") xlabel("than one label. The voltage state name will be determined by whichever") xlabel("part happens to be first in the list of parts.") xlabel(" Labels cannot be erased from the end of a part. Instead remove and") xlabel("recreate the part.") xlabel(" Grounds and Wires cannot be labeled.") xpanel() } proc hints_parm() { xpanel("LinearCircuit Parameters Hints") xlabel(" Parameter units are nF, MOhm, H, ms, mV, nA.") xlabel(" Parameter panels are destroyed when the simulate or parameters") xlabel("radio buttons are not chosen.") xlabel(" Battery and Current sources are defined in terms of three duration") xlabel("amplitude pairs.") xlabel(" This tool is useful for changing parameters when the Simulate") xlabel("tool cannot be chosen because the singular value test gives one or") xlabel("values < 1e-10 due not to an error in the circuit but only because") xlabel("of inappropriate parameter values.") xlabel(" The circuit can be forced to have a solution. Selecting the") xlabel("\"Parasitics\" checkbox connects each node to ground with a 1e-9 nF") xlabel("capacitance and gives each battery a 1e-9 MOhm series resistance.") xlabel(" \"Create class\" button creates a foo.hoc file with template Foo.") xlabel("At least one port of each cell location must be labeled and the class") xlabel("will have \"label\"_loc() methods to identify the segments the circuit") xlabel("connects to. After identifying the locations, one calls the install()") xlabel("method to activate the LinearMechanism object wrapped by the instance.") xlabel("Must call refill() method if element parameters or segment area") xlabel("is changed after install() is called.") xpanel() } proc hints_simulate() { xpanel("LinearCircuit Simulate Hints") xlabel(" The circuit exists only when the \"Simulate\" radiobutton is active.") xlabel(" Circuits can exist even if no cable sections exist but unlocated cell") xlabel("parts will have no capacitance or conductance to ground.") xlabel(" Extracellular cell nodes are ground if the extracellular mechanism is not") xlabel("inserted at the location.") xlabel("") xlabel(" Parameter units are nF, MOhm, H, ms, mV, nA. State units are mV for nodes.") xlabel(" State panels are destroyed whenever the simulate") xlabel("radio button becomes inactive.") xlabel(" Battery and Current sources are defined in terms of three duration") xlabel("amplitude pairs.") xlabel(" Graphs are limited to the states listed in the \"PlotWhat?\" menu.") xpanel() } proc hints_solution() { xpanel("LinearCircuit No Solution Hints") xlabel(" (Sub)Circuits have no solution if they have no path to ground (e.g. through") xlabel("a cell location), or if Batteries are in parallel or shorted, or a current source") xlabel("is not in a circuit loop.") xlabel(" Cells with the \"no location\" label have no capacitance or conductance to ground.") xlabel(" Cell nodes (inside or outside) cannot be directly connected together or to") xlabel("ground. To make connections with 0 resistance, use a battery with 0 potential.") xlabel(" The system is considered not to have a solution when the g+c matrix has") xlabel("one or more singular values < 1e-10. In some circumstances this") xlabel("test yields a false negative due to particular parameter values (e.g.") xlabel("op amp gain) and the circuit can be repaired simply by adjusting parameters.") xlabel(" See the Parameters Hints with regard to turning off consistency checking") xlabel("or forcing the existence of a solution by employing parasitic capacitance.") xpanel() } proc dismiss() {local i for i=0, graphlist.count - 1 { graphlist.object(i).box.unmap } for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == BAT || tobj.part == CUR) { tobj.extra_info.box = nil } } objref graphlist, statebox, valbox, namebox, icbox box.unmap() } proc free_lincirnode() { lincirnodes.object($1).elements = nil lincirnodes.remove($1) } proc free_lincirnodes() {local i for i = 0, lincirnodes.count - 1 { lincirnodes.object(i).elements = nil } lincirnodes.remove_all } proc unref() { if ($1 == 0) { free_lincirnodes() // print this, " freed" } } proc plparts() {local x, y, a a=0 for i=0, parts.count-1 { x = .05 y = .95 - i*.1 if (i== CELL+1) a = -90 g.glyph(parts.object(i).g, x, y, 1,1,a,2) } } proc pl() {local i g.erase_all if (show_parts_) plparts() if (simulate_) plsim() for i=0, elements.count-1 { elements.object(i).pl(g) } if (show_con_) pl_connection() g.flush } proc plsim() { if (parasitic_) { g.label(.1,.9,"Using Parasitics", 2,1,0,0,2) } } proc def_con() {local i, xmax, xmin, n xends.resize(0) yends.resize(0) for i=0, elements.count-1 { elements.object(i).ends(xends, yends) } xmin = xends.min xmax = xends.max if (xmax - xmin < 1) { xmax = xmin + 1 } tobj = yends.c.add(xends.c.add(xmin).mul(.5/(xmax - xmin + 1e-5))) si = tobj.sortindex tobj = tobj.index(tobj, si) con.resize(xends.size).fill(0) j = 1 n = tobj.size fe = float_epsilon float_epsilon = .01 nnode = 0 for i=1, n-1 { if (tobj.x[i] == tobj.x[i-1]) { nnode += 1 con.x[si.x[i]] = nnode con.x[si.x[i-1]] = nnode i+=1 while (i < n ) { if (tobj.x[i] == tobj.x[i-1]) { con.x[si.x[i]] = nnode i += 1 }else { break } } } } float_epsilon = fe } proc pl_connection() { local i def_con() for i=0, con.size-1 { if (con.x[i] > 0) { g.mark(xends.x[i], yends.x[i], "s", 6, 1, 1) }else{ g.mark(xends.x[i], yends.x[i], "o", 12, 2, 1) } } } proc build() { box = new HBox(3) box.save("save()") box.priority(900) box.ref(this) box.dismiss_action("dismiss()") box.intercept(1) g = new Graph(0) graph_menu_remove_most(g) g.view(2) g.xaxis(3) b1 = new VBox(3) b1.intercept(1) xpanel("") g.menu_tool("Arrange", "move", "tool(0)") g.menu_tool("Label", "label", "tool(1)") g.menu_tool("Parameters", "sim", "tool(3)") g.menu_tool("Simulate", "sim", "tool(2)") xpanel() deck = new Deck(3) deck.intercept(1) xpanel("") xcheckbox("Keep Connected", &keepcon_) xbutton("Hints", "hints_arrange()") xpanel() xpanel("") label_mode_ = 1 xradiobutton("Move", "label_mode_ = 1", 1) xradiobutton("Change", "label_mode_ = 0") xbutton("Hints", "hints_label()") xpanel() xpanel("") xbutton("Parameters", "values()") xmenu("Source f(t)", "srcmenu()") xbutton("Initial Conditions", "ics()") xbutton("States", "states()") xbutton("New Graph", "newgraph()") xbutton("Name map", "namemap()") xbutton("Hints", "hints_simulate()") xpanel() xpanel("") xbutton("Parameters", "values()") xmenu("Source f(t)", "srcmenu()") xcheckbox("Turn off consistency checking", &noconsist_) xcheckbox("Parasitic aF/battery mOhm", ¶sitic_) xbutton("Print Matrix Info", "pr_singular()") xbutton("Create class", "mkclass()") xbutton("Hints", "hints_parm()") xpanel() deck.intercept(0) deck.map b1.intercept(0) b1.map() g.exec_menu("Arrange") box.intercept(0) } proc ng() { sprint(tstr, "%s.x[%d]", model.y, $2) $o3.g.addvar($s1,tstr) } func varptrname() { // return 1 and $s2 as the proper vector element if $s1 is a proper variable name for i=0, varnames.count - 1 { tobj = varnames.object(i) if (strcmp($s1, tobj.s) == 0) { sprint($s2, "%s.x[%d]", model.y, varname_indices.x[i]) return 1 } } return 0 } proc tool() {local i localobj tobj tooltype_ = $1 deck.flip_to($1) simulate_ = ($1 == 2) show_parts_ = ($1 == 0) show_con_ = ($1 <= 1) pl() // print "remove all aliases" hoc_sf_.alias(this) // wipe out any that are already there if (simulate_) { if (!simdef()) { g.exec_menu("Parameters") }else{ setalias() // tobj = hoc_sf_.alias_list(this) // for i = 0, tobj.count - 1 { // print tobj.object(i).s // } } }else{ if ($1 != 3) valbox = nil statebox = nil namebox = nil model = nil icbox = nil for i=0, graphlist.count-1 { graphlist.object(i).re_add() } if ($1 != 3) for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == BAT || tobj.part == CUR) { tobj.extra_info.box = nil } } } } proc values() {local i valbox = new VBox() valbox.intercept(1) valbox.save("") xpanel("") sprint(tstr, "%s.change_val()", this) for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part != BAT && tobj.part != CUR) { tobj.valedit(tstr) } } xpanel() valbox.intercept(0) sprint(tstr, "Values for %s", this) valbox.map(tstr) } proc finit() { // e.g if mulrunfitter changes one or more parameters because an alias // was used in the parameter list, then we need to update // the LinearMechanism. At the beginning of finitialize() is a // good place // printf("finitialize called %s.finit()\n", this) change_val() } proc setalias() {local i, j localobj tobj, tobj1 for i=0, elements.count - 1 { elements.object(i).setalias(this) } for i=0, varnames.count - 1 { if (aname(varnames.object(i).s, tstr)) { hoc_sf_.alias(this, tstr, &model.y.x[varname_indices.x[i]]) } } for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == BAT || tobj.part == CUR) { tobj1 = tobj.extra_info if (tobj1.xtrn == 1) { hoc_sf_.alias(this, tobj.names[0].s, &model.b.x[tobj.indices.x[2]-1]) }else{ for j=0, tobj1.amp.size-1 { sprint(tstr, "%s_dur%d", tobj.names[0].s, j) hoc_sf_.alias(this, tstr, &tobj1.dur.x[j]) sprint(tstr, "%s_amp%d", tobj.names[0].s, j) hoc_sf_.alias(this, tstr, &tobj1.amp.x[j]) } } } } for i=0, ic_name_indices_.size-1 { j = ic_name_indices_.x[i] aname(varnames.object(j).s, tstr) sprint(tstr, "%s_0", tstr) hoc_sf_.alias(this, tstr, &yinit.x[varname_indices.x[j]]) } } func aname() {local i if (sscanf($s1, "%[0-9]", $s2) == 1) { return 0 } sscanf($s1, "%[^(]", $s2) if (sscanf($s2, "%s %s", $s2, tstr1) == 2) { sprint($s2, "%s_%s", $s2, tstr1) } return 1 } proc namemap() {local i namebox = new VBox() namebox.intercept(1) namebox.save("") namelist = new List() namelist.append(new String("Parameters...")) for i=0, elements.count - 1 { tobj = elements.object(i) tobj.valmap(namelist) } namelist.append(new String("States...")) for i=0, varnames.count - 1 { sprint(tstr, "%s %s.x[%d]", varnames.object(i).s, model.y, varname_indices.x[i]) namelist.append(new String(tstr)) } namelist.browser("", "s") namebox.intercept(0) sprint(tstr, "Name map for %s", this) namebox.map(tstr) } proc srcmenu() {local i for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == BAT || tobj.part == CUR) { sprint(tstr,"srcval(%s)", tobj) xbutton(tobj.names[0].s, tstr) } } } proc toggle_xtrn() { $o1.extra_info.set_xtrn() $o2.unmap() if (simulate_) { setalias() } } proc srcval() {local i tobj = $o1.extra_info tobj.box = new VBox() tobj.box.save("") tobj.box.intercept(1) xpanel("") sprint(tstr, "toggle_xtrn(%s, %s)", $o1, tobj.box) xcheckbox("External Stim Pattern", &$o1.extra_info.xtrn, tstr) if ($o1.extra_info.xtrn == 0) { sprint(tstr1, "%s.extra_info.changed_dur()", $o1) for i=0, tobj.amp.size-1 { sprint(tstr, "dur%d (ms)", i) xpvalue(tstr, &tobj.dur.x[i], 1, tstr1) if ($o1.part == BAT) { sprint(tstr, "amp%d (mV)", i) }else{ sprint(tstr, "amp%d (nA)", i) } xpvalue(tstr, &tobj.amp.x[i], 1) } sprint(tstr, "tvec is %s", tobj.tvec) xlabel(tstr) sprint(tstr, "amp is %s", tobj.amp) xlabel(tstr) }else{ xlabel("... should play into the alias") sprint(tstr, "%s.%s", this, $o1.names[0].s) } xlabel(tstr) xpanel() tobj.box.intercept(0) sprint(tstr, "f(t) for %s of %s", $o1.names[0].s, this) tobj.box.map(tstr) } proc states() {local i statebox = new VBox() statebox.intercept(1) statebox.save("") xpanel("") xlabel("nodes...") for i=0, varnames.count-1 { if (i == varnames_internal_index) { xlabel("internal...") } xpvalue(varnames.object(i).s, &model.y.x[varname_indices.x[i]]) } xpanel() statebox.intercept(0) sprint(tstr, "States for %s", this) statebox.map(tstr) } proc ic_name_indices() {local i, save ic_name_indices_.resize(0) for i=0, varnames.count-1 { if (i == varnames_internal_index) { break } if (is_cell_node(lincirnodes.object(varname_indices.x[i]+1))) { continue } save = icptrs.object(i).val icptrs.object(i).val = -999e9 if (yinit.x[varname_indices.x[i]] == -999e9) { //unnamed node icptrs.object(i).val = save continue } icptrs.object(i).val = save ic_name_indices_.append(i) } } proc ics() {local i, j icbox = new VBox() icbox.intercept(1) icbox.save("") xpanel("") xlabel("Initial values for named") xlabel(" voltage nodes not associated") xlabel(" with potential of cells.") for i=0, ic_name_indices_.size-1 { j = ic_name_indices_.x[i] yinit.x[varname_indices.x[j]] = icptrs.object(j).val sprint(tstr, "change_ic(%d)", j) xpvalue(varnames.object(j).s, &yinit.x[varname_indices.x[j]], 1, tstr) } xlabel("Note: Unnamed nodes are 0") xlabel(" and cell nodes are v_init") xpanel() icbox.intercept(0) sprint(tstr, "Initial Conditions for %s", this) icbox.map(tstr) } func is_cell_node() {local i for i=0, $o1.elements.count-1 { if ($o1.elements.object(i).part >= CELL) { return 1 } } return 0 } proc change_ic() { // only for persistance under circuit modifications //and saving in a session icptrs.object($1).val = yinit.x[varname_indices.x[$1]] } proc newgraph() { graphlist.append(new LincirGraph(this)) } proc dismiss_graph() {local i i = graphlist.index($o1) if (i >= 0) { graphlist.remove(i) } } proc plotwhat() {local i for i=0, varnames.count-1 { if (i == varnames_internal_index) { xlabel("internal...") } sprint(tstr, "ng(\"%s\", %d, %s)", varnames.object(i).s, varname_indices.x[i], $o1) xbutton(varnames.object(i).s, tstr) } } proc statemap() {local i, j, in varnames = new List() varname_indices = new Vector() varnames_internal_index = 0 icptrs = new List() for i=1, lincirnodes.count - 1 { // skip groundnode tobj = lincirnodes.object(i) in = tobj.index k = -1 for j=0, tobj.elements.count-1 { sel = tobj.elements.object(j) k = tobj.ends.x(j) + 1 if (sel.names[k] == nil) { k = -1 }else{ break } } if (k != -1) { sprint(tstr, "%s (mV)", sel.names[k].s) // We really need a better representation of a persistent // named node. The initial condition is hard to save // if the circuit is re-arranged. So we parallel // the node name icptrs.append(new Pointer(&sel.ic.x[k])) yinit.x[in-1] = icptrs.object(icptrs.count-1).val }else{ sprint(tstr, "%d (mV)", in) // must keep things in parallel with varnames // unfortunately we can't add nil to a list // so just use yinit itself icptrs.append(new Pointer(&yinit.x[in-1])) } varnames.append(new String(tstr)) varname_indices.append(in-1) varnames_internal_index += 1 } for i=0, elements.count - 1 { tobj = elements.object(i) for j=0, tobj.pat.extra_eqn-1 { if (tobj.names[0] != nil) { tobj.pat.ename(tstr, j) sprint(tstr, "%s %s", tobj.names[0].s, tstr) varnames.append(new String(tstr)) varname_indices.append(tobj.indices.x[tobj.nnode+j]-1) } } } // update graphs for i = 0, graphlist.count-1 { graphlist.object(i).re_add() } ic_name_indices() } proc install() { model.install(cmat, gmat, bvec, CELL, lincirnodes) statemap() for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == BAT || tobj.part == CUR) { tobj.extra_info.play(tobj, model.b) } } if (statebox != nil) { states() } } proc change_val() {local i if (simulate_) { fill_eqn() if (!model.change_val(cmat, gmat, bvec)){ install() } } } func res() { return int($1/res_ + .5) * res_ } proc move() { if ($1 == 2) { if (select($2, $3, 0) == -1) { select_part($2, $3) }else{ keepcon1() } } if (selindex > -1) { sel.move(selsub, $2, $3) if ($1 == 3) { if (!inside($2,$3)) { elements.remove(selindex) keepcondel() }else{ keepcon2() } } pl() } } proc label() {local i if (label_mode_ == 1) { label_move($1,$2,$3) return } if ($1 == 2) { select_label($2, $3) if (sel == nil) { for (i=0; select($2, $3, i) != -1; i = selindex+1) { if (sel != nil) { if(sel.part != GND && sel.part != WIRE) { break } } } } } // dialog on press gives exception on mswin if ($1 == 3) { if (sel != nil) { if (selsub) { label_dialog_title.s = "Enter Voltage node name" }else{ label_dialog_title.s = "Enter device name" } if (sel.names[selsub] == nil) { sel.names[selsub] = new String("") } if (sel.names_x == nil) { sel.names_x = new Vector(sel.nnode+1,15) sel.names_y = new Vector(sel.nnode+1, 15) } tstr = sel.names[selsub].s if (sel.part >= CELL && selsub == 0) { tobj = sel.extra_info tobj.select() tobj.name(sel) }else{ while (string_dialog(label_dialog_title.s, tstr)) { if (valid_name_syntax(tstr, 1)) { sel.names[selsub].s = tstr break } } } } pl() } } proc label_move() { if ($1 == 2) { select_label($2, $3) } if (sel != nil) { sel.move_label(selsub, $2, $3) pl() color_sel($1) } if ($1 == 3) { pl() } } proc color_sel() { if (selsub > 0) { if ($1 == 2) { csx.resize(0) csy.resize(0) sel.ends(csx, csy) } g.mark(csx.x[selsub-1], csy.x[selsub-1], "S", 10, 2, 1) }else{ if ($1 == 2) { sprint(tstr, "%s", sel.pat) sscanf(tstr, "%[^[]", tstr) sprint(tstr, "csp = new %s(2)", tstr) execute(tstr, this) } sel.plc(g, csp) } } proc sim() {} func near_label() {local x, y, h, i x = sel.x + sel.names_x.x[selsub] y = sel.y + sel.names_y.x[selsub] if (selsub > 0) { x += sel.nd.x[selsub-1][0] y += sel.nd.x[selsub-1][1] } i = g.view_info() x = g.view_info(i, 13, x) - g.view_info(i, 13, $1) y = g.view_info(i, 14, y) - g.view_info(i, 14, $2) h = g.view_info(i, 15) if (abs(x) < h && abs(y) < h) { return 1 } return 0 } proc select_label() {local i, j for i=0, elements.count-1 { sel = elements.object(i) for selsub=0, sel.nnode { // really mean sel.nnode if (sel.names[selsub] != nil) { if (near_label($1,$2)) { return } } } } sel = nil } proc keepcon1() { if (keepcon_ == 0) { return } keepcon1_ = 1 def_nodes() } proc keepcon2() {local i, j, k, x, y if (keepcon1_ == 0) { return } keepcon1_ = 0 xends.resize(0) yends.resize(0) sel.ends(xends, yends) if (selsub > 0) { tobj = sel.lincirnodes[selsub-1] x = xends.x[selsub-1] y = yends.x[selsub-1] for i=0, tobj.elements.count-1 { j = tobj.ends.x[i] tobj.elements.object(i).move(j+1, x, y) } }else{ for k=0, sel.nnode-1 { tobj = sel.lincirnodes[k] x = xends.x[k] y = yends.x[k] for i=0, tobj.elements.count-1 { j = tobj.ends.x[i] tobj.elements.object(i).move(j+1, x, y) } } } } proc keepcondel() {local i, j, k if (keepcon1_ == 0) { return } keepcon1_ = 0 if (selsub > 0) { tobj = sel.lincirnodes[selsub-1] for i=0, tobj.elements.count-1 { k = elements.index(tobj.elements.object(i)) if (k > -1) { elements.remove(k) } } }else{ for k=0, sel.nnode-1 { tobj = sel.lincirnodes[k] for i=0, tobj.elements.count-1 { j = elements.index(tobj.elements.object(i)) if (j > -1) { elements.remove(j) } } } } } proc setval() { if ($1 == 3) { if (select($2, $3, 0) > -1) { sel.setval() } } } func simdef() {local b b = 0 if (setup_matrix(1)) { if (neq > 1) { if (has_solution()) { model = new Lincir2Linmech(ystate, yinit) install() return 1 }else{ return 0 } }else{ b = 1 } } model = nil statemap() // if we did not call install return b } func select() {local i for i = $3, elements.count-1 { sel = elements.object(i) selsub = sel.selected($1, $2) if (selsub > -1) { // elements.remove(i) // elements.prepend(sel) selindex = i return selindex } } selindex = -1 sel = nil return selindex } proc select_part() {local cnt, iv, x, i cnt = parts.count iv = g.view_info() $1 = g.view_info(iv, 11, $1) $2 = g.view_info(iv, 12, $2) i = int((1 - $2)/.1) if (i < cnt && $1 < .1) { sel = new ElementBase(parts.object(i), i) elements.append(sel) if (sel.part >= CELL) { sel.extra_info.name(sel) if (sel.part == CELL+1) { sel.angle = -PI/2 } } selindex = elements.count-1 selsub = 0 } } func inside() {local iv iv = g.view_info() $1 = g.view_info(iv, 11, $1) $2 = g.view_info(iv, 12, $2) if ($1 < 1 && $1 > 0 && $2 > 0 && $2 < 1) { return 1 } return 0 } proc def_nodes() { def_con() // From pl_connection(), the ends of elements have 1,nnode indices in con. // con[] = 0 means unconnected. // Due to wires, subsets of nodes may be identical // number the 0 nodes for i=0, con.size-1 { if (con.x[i] == 0) { nnode += 1 con.x[i] = nnode } } free_lincirnodes() for i = 0, nnode-1 { lincirnodes.append(new LinearCircuitNode()) } // let the elements know the nodes --- and the nodes their elements j = 0 for i=0, elements.count - 1 { tobj = elements.object(i) for k = 0, tobj.nnode-1 { lincirnodes.object(con.x[j+k]-1).add(elements.object(i), k) } j += tobj.nnode } } proc mkclass() {localobj f setup_matrix(0) fill_eqn_sym() statemap() //print "cmatsym" cmatsym.pr("c") //print "gmatsym" gmatsym.pr("g") //print "bvecsym" bvecsym.pr("b") f = new File("LM.tmp") if (numarg() > 0) { f = new File($s1) }else{ f.chooser("w", "Write multiply instantiable Linear Circuit class to file", "*.*", "Write", "Cancel") if (!f.chooser()) { return } } f.wopen() head_out(f) f.printf("begintemplate LM\n") decl_out(f) init_out(f) portfunc_out(f) mat_out(f) install_out(f) f.printf("endtemplate LM\n") f.close() } obfunc cellname() {local j, k localobj o, lcn, name // node name is bizarrely complex o = $o1 for j=0, o.nnode-1 { lcn = o.lincirnodes[j] for k=0, lcn.elements.count-1 { name = lcn.elements.o(k).names[lcn.ends.x[k]+1] if (name != nil) { break } } if (name != nil) { break } } return name } proc head_out() {local i,j localobj o, sname, scon, s $o1.printf("// Created by %s of %s\n", this, nrnversion()) $o1.printf("// manages LinearMechanism of rank %d\n", gmat.nrow-1) $o1.printf("// See first public declaration and proc init() for important\ // methods and variable names\n") $o1.printf("// Change begintemplate and endtemplate statements if LM is not\ // an appropriate name for the class.\n") $o1.printf("// Usage: (assume object reference is \"lm\")\n") $o1.printf("// 1) Attach segments to all the lm.*_loc(x) methods.\n") $o1.printf("// 2) lm.install() creates the LinearMechanism\n") $o1.printf("// 3) If any parameters are changed after lm.install(), call lm.refill()\n") $o1.printf("// Named voltage nodes and internal states can be plotted using their alias\ // names in proc init()\ // Stimuli can be changed dynamically during a run using Vector.play. See\ // their alias names in proc init()\ // Initial conditions for named voltage nodes can be changed prior to finitialize().\ // Initial conditions are 0 by default (not copied from the original\ // LinearCircuit builder that generated this file).\ ") $o1.printf("\n// netlist: %d v nodes %d elements\n", lincirnodes.count, elements.count) $o1.printf("// index type name (endname)...(endname) (v node indices)\n") scon = new String() s = new String() for i=0, elements.count - 1 { o = elements.o(i) sname = new String() if (o.names[0] != nil) { sname.s = o.names[0].s } for j=1, o.nnode { if (o.names[j] != nil) { s.s = o.names[j].s }else{ s.s = "" } sprint(sname.s, "%s (%s)", sname.s, s.s) } scon = new String(" ") for j=0, o.nnode-1 { sprint(scon.s, "%s %d ", scon.s, o.lincirnodes[j].index-1) } $o1.printf("// %2d %s %s (%s)\n", i, o.pat, sname.s, scon.s) } $o1.printf("\n") } proc decl_out() {local i, j localobj o, s, name s = new String() $o1.printf("public install, refill") for i=0, elements.count-1 { o = elements.o(i) if (o.part >= CELL) { name = cellname(o) if (name == nil) {execerror("no label on cell port")} $o1.printf(", %s_loc", name.s) } } for i=0, elements.count-1 { o = elements.o(i) s.s = "" for j=0, o.val.size-1 { if (o.part == OPAMP) { s.s = o.pat.xparm[j].s } $o1.printf(", %s%s", s.s, o.names[0].s) } } $o1.printf("\n //also see the aliases in proc init() for more public names\n") $o1.printf("public _lm, _c, _g, _b, _y, _y0, _sl, _xloc, _layer, _afac\n") $o1.printf("objref this,_lm, _c, _g, _b, _y, _y0, _srs[1], _sl, _xloc, _layer, _afac\n") } proc init_out() {local n, nc, i, j, k localobj o, sel, s s = new String() n = bvec.size-1 $o1.printf("proc init() { localobj _sf\ _n = %d\ _c = new Matrix(_n,_n,2)\ _g = new Matrix(_n,_n,2)\ _b = new Vector(_n)\ _y = new Vector(_n)\ _y0 = new Vector(_n)\ ", n) // count the cell ports nc = 0 for i=0, elements.count-1 { o = elements.o(i) if (o.pat == parts.o(CELL)) { nc += 1 } if (o.pat == parts.o(CELL+1)) { nc += 2 } } ncellport = nc // needed in mat_out // space to describe cell ports $o1.printf("\ _ncellport = %d\ objref _srs[_ncellport+1] // in case _ncellport=0\ _xloc = new Vector(_ncellport)\ _layer = new Vector(_ncellport)\ _afac = new Vector(_ncellport)\ ", nc) $o1.printf(" _sf = new StringFunctions()\n") // analogous to statemap code $o1.printf(" // element parameters\n") for i=0, elements.count-1 { o = elements.o(i) s.s = "" for j=0, o.val.size-1 { if (o.part == OPAMP) { s.s = o.pat.xparm[j].s } $o1.printf(" %s%s = %g\n", s.s, o.names[0].s, o.val.x[j]) } } $o1.printf(" // named voltage nodes and initial conditions\n") for i=1, lincirnodes.count - 1 { // skip ground node o = lincirnodes.o(i) k = -1 for j=0, o.elements.count-1 { sel = o.elements.o(j) k = o.ends.x(j) + 1 if (sel.names[k] == nil) { k = -1 }else{ break } } if (k != -1) { $o1.printf(" _sf.alias(this, \"%s\", &_y.x[%d])\n", sel.names[k].s, o.index - 1) if (i > ncellport) { $o1.printf(" _sf.alias(this, \"%s_0\", &_y0.x[%d])\n", sel.names[k].s, o.index - 1) } } } $o1.printf(" // internal states\n") for i=0, elements.count-1 { o = elements.o(i) for j=0, o.pat.extra_eqn-1 { if (o.names[0] != nil) { $o1.printf(" _sf.alias(this, \"i_%s\", &_y.x[%d])\n", o.names[0].s, o.indices.x[o.nnode+j]-1) } } } $o1.printf(" // stimuli\n") for i=0, elements.count-1 { o = elements.o(i) if (o.part == BAT || o.part == CUR) { if (o.part == BAT) { s.s = "E" } else {s.s = "I"} if (o.names[0] != nil) { $o1.printf(" _sf.alias(this, \"%s_%s\", &_b.x[%d])\n", s.s, o.names[0].s, o.indices.x[2]-1) } } } $o1.printf("}\n") } proc portfunc_out() {local i,j,k, ix localobj o, lcn, name for i=0, elements.count-1 { o = elements.o(i) if (o.part >= CELL) { // node name is bizarrely complex name = cellname(o) if (name == nil) {execerror("no label on cell port")} $o1.printf("proc %s_loc() {local ix\n", name.s) for j=0, o.nnode-1 { $o1.printf(" ix = %d\n", o.lincirnodes[j].index-1) $o1.printf(" _srs[ix] = new SectionRef()\ _xloc.x[ix] = $1\ _layer.x[ix] = %d\n", j) } $o1.printf("}\n") } } } proc mat_out() { $o1.printf("proc refill() {local i,a\n") $o1.printf(" for i=0, _ncellport-1 _srs[i].sec {\ a = area(_xloc.x[i])\ if (a == 0) { a = 100 }\ _afac.x[i] = -100./a\ }\n") cmatsym.pr(" _c.x", $o1, ncellport) gmatsym.pr(" _g.x", $o1, ncellport) bvecsym.pr(" _b.x", $o1, ncellport) $o1.printf("}\n") } proc install_out() { $o1.printf("proc install() { local i\ _sl = new SectionList()\ for i=0, _ncellport-1 {\ _srs[i].sec { _sl.append() }\ }\ refill()\ _y.copy(_y0)\ _lm = new LinearMechanism(_c, _g, _y, _y0, _b, _sl, _xloc, _layer)\ }\n") } proc fill_eqn_sym() { local i, j, a, inode cmat.zero gmat.zero bvec.fill(0) cmatsym = new LinCirMatSym(cmat.nrow, gmat.ncol) gmatsym = new LinCirMatSym(cmat.nrow, gmat.ncol) bvecsym = new LinCirMatSym(cmat.nrow, 1) for i=0, elements.count - 1 { elements.object(i).setup_mat(cmat, gmat, bvec) elements.object(i).setup_mat_sym(cmatsym, gmatsym, bvecsym) } // the groundnode equation is just v[groundnode] = 0 i = groundnode.index cmatsym.zerorow(i) gmatsym.zerorow(i) bvecsym.zerorow(i) gmatsym.add(i,i,"1.0") // multiply segment current balance equations by -100/area to satisfy our convention // fac is 100 for since we must convert nanoamps/micron2 to millamp/cm2 // thus for our circuit, R is Megohm, v is mV, t is ms, C is nF for i=0, elements.count-1 { tobj = elements.object(i) if (tobj.part >= CELL) { if (tobj.extra_info.sec == nil) { a = 0 }else{ tobj.extra_info.sec.sec { a = area(tobj.extra_info.x)} } if (a == 0) { a = 100 } for j=0, tobj.nnode-1 { inode = tobj.lincirnodes[j].index //print tobj.names[0].s, " inode=", inode, "a=", a cmat.setrow(inode, cmat.getrow(inode).mul(-100/a)) gmat.setrow(inode, gmat.getrow(inode).mul(-100/a)) bvec.x[inode] *= -100/a } } } } func setup_matrix() {local i, j, k def_nodes() // merge the ground nodes groundnode = nil for i=0, elements.count-1 { tobj = elements.object(i) if (tobj.part == GND) { if (groundnode == nil) { groundnode = tobj.lincirnodes[0] //print "in loop groundnode = ", groundnode }else{ groundnode.merge(tobj.lincirnodes[0]) } } } for i = 0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == WIRE) { if (groundnode == tobj.lincirnodes[1]) { groundnode = tobj.lincirnodes[0] } tobj.lincirnodes[0].merge(tobj.lincirnodes[1]) } } // clear away the irrelevant nodes, grounds, and wires. for (i=lincirnodes.count - 1; i >= 0; i -= 1) { tobj = lincirnodes.object(i) if (tobj.elements.count == 0) { free_lincirnode(i) }else{ for (j = tobj.elements.count - 1; j >= 0 ; j -= 1) { tobj1 = tobj.elements.object(j) if (tobj1.part == GND) { tobj.elements.remove(j) tobj.ends.remove(j) }else if (tobj1.part == WIRE){ tobj.elements.remove(j) tobj.ends.remove(j) } } } } //print "groundnode ", groundnode if (groundnode == nil) { continue_dialog("No common ground, so voltages indeterminate") // unless there is a cell connection return 0 } if (!valid_cell_con()) { return 0 } reorder() // prnodes("non-trivial") neq = lincirnodes.count if (0) { print "node map" for i=0, lincirnodes.count - 1 { tobj = lincirnodes.object(i) print tobj, " ", tobj.index } } // no special // handling of battery or op-amp output here. Each device can // keep its own indices for internal states, such as current, if // desired. for i=0, elements.count - 1 { neq = elements.object(i).extra_eqn(neq) } if (neq == 0) return 0 cmat = new Matrix(neq, neq) gmat = new Matrix(neq, neq) bvec = new Vector(neq) yinit.resize(neq) if ($1 == 1) { fill_eqn() } return 1 } proc reorder() {local i, j, k // order must be ground node then located cell nodes j = 0 for i=0, lincirnodes.count - 1 { tobj = lincirnodes.object(i) if (tobj == groundnode) { lincirnodes.remove(i) lincirnodes.insrt(0, tobj) j += 1 }else{ for k=0, tobj.elements.count-1 { tobj1 = tobj.elements.object(k) if (tobj1.part >= CELL) { // reorder even if not located //if (tobj1.extra_info.sec != nil) { lincirnodes.remove(i) lincirnodes.insrt(j, tobj) j += 1 //} } } } } for i=0, lincirnodes.count - 1 { lincirnodes.object(i).re_index(i) } } proc fill_eqn() { local i, j, a, inode cmat.zero gmat.zero bvec.fill(0) for i=0, elements.count - 1 { elements.object(i).setup_mat(cmat, gmat, bvec) } // the groundnode equation is just v[groundnode] = 0 i = groundnode.index cmat.setrow(i, 0) gmat.setrow(i, 0) bvec.x[i] = 0 gmat.x[i][i] = 1 // multiply segment current balance equations by -100/area to satisfy our convention // fac is 100 for since we must convert nanoamps/micron2 to millamp/cm2 // thus for our circuit, R is Megohm, v is mV, t is ms, C is nF for i=0, elements.count-1 { tobj = elements.object(i) if (tobj.part >= CELL) { if (tobj.extra_info.sec == nil) { a = 0 }else{ tobj.extra_info.sec.sec { a = area(tobj.extra_info.x)} } if (a == 0) { a = 100 } for j=0, tobj.nnode-1 { inode = tobj.lincirnodes[j].index //print tobj.names[0].s, " inode=", inode, "a=", a cmat.setrow(inode, cmat.getrow(inode).mul(-100/a)) gmat.setrow(inode, gmat.getrow(inode).mul(-100/a)) bvec.x[inode] *= -100/a } } } if (parasitic_) { // connect every node to ground with an attofarad capacitor for i=0, lincirnodes.count - 1 { if (i != groundnode.index) { cmat.x[i][i] -= 1e-9 } } // every battery has a 1e-9 Mohm series resistance // thus instead of the ib row equation v2 - v1 = e // we have v2 - v1 + R*ib = e for i=0, elements.count - 1 { tobj = elements.object(i) if (tobj.part == BAT) { j = tobj.indices.x[2] gmat.x[j][j] += 1e-9 } } } // print "cmat" cmat.printf // print "gmat" gmat.printf // print "bvec" bvec.printf } func n_singular() {local ns, i, j, k, nrow // ensure c*y' + g*y is invertable with dt=1 nrow = bvec.size if (nrow == 0) return 0 inmat = cmat.c.add(gmat) // can consider cell nodes as resistors to ground for i=0, elements.count-1 { tobj = elements.object(i) if (tobj.part >= CELL) { if (tobj.extra_info.sec != nil) { for k=0, tobj.nnode - 1 { j = tobj.lincirnodes[k].index inmat.x[j][j] -= 1 } } } } // find the singular values of inmat and the tranformation that makes it // diagonal in order to determine the algebraic equations. umat = new Matrix() vmat = new Matrix() dvec = inmat.svd(umat, vmat) // is the system partly algebraic, if so how much ns = dvec.indwhere("<", 1e-10) if (ns >= 0) { return nrow - ns } return 0 } func has_solution() {local ns ns = n_singular() if (noconsist_ == 0 && ns > 0) { prnodes("Matrix equations have no solution") print "cmat" cmat.printf print "gmat" gmat.printf print "singular values" dvec.printf sprint(tstr, "Circuit equations have %d inconsistencies", ns) if (boolean_dialog(tstr,"Hints","Continue")) hints_solution() return 0 } return 1 } proc pr_singular() {local ns setup_matrix(1) ns = n_singular() prnodes("Matrix equations") print "cmat" cmat.printf print "gmat" gmat.printf print "singular values" dvec.printf printf("Circuit equations have %d inconsistencies\n", ns) } func valid_cell_con() {local i //make sure not directly connected to another cell node or ground for i=0, elements.count-1 { tobj = elements.object(i) if (tobj.part >= CELL) { if (!valid_cell_con1(elements.object(i))) { return 0 } } } return 1 } func valid_cell_con1() {local i, j for i=0, $o1.nnode-1 { tobj = $o1.lincirnodes[i] if (tobj == groundnode) { tstr= "Cell nodes cannot be connected directly to Ground." if (boolean_dialog(tstr,"Hints","Continue")) hints_solution() return 0 } for j=0, tobj.elements.count-1 { tobj1 = tobj.elements.object(j) if (tobj1.part >= CELL) { if ($o1 != tobj1 || i != tobj.ends.x[j]) { tstr = "Cell nodes cannot be connected directly together." if (boolean_dialog(tstr,"Hints","Continue")) hints_solution() return 0 } } } } return 1 } proc prnodes() { print $s1 for i=0,lincirnodes.count-1 { tobj = lincirnodes.object(i) print tobj for j=0, tobj.elements.count-1 { printf(" %s %s %d\n", tobj.elements.object(j),\ tobj.elements.object(j).pat, tobj.ends.x[j]) } } } proc map() { sprint(tstr, "%s", this) if (numarg() == 0) { box.map(tstr) }else{ box.map(tstr, $2, $3, $4, $5) } pl() } proc mkelm() {local i if ($1 >= INDUCT) { $1 += part_offset } sel = new ElementBase(parts.object($1), $1) elements.append(sel) sel.x = $2 sel.y = $3 sel.scale = $4 sel.angle = $5 tobj = sel.val for i=0, tobj.size-1 { tobj.x[i] = fscan() } } proc mklabel() {local n n = sel.nnode if (sel.names_x == nil) { sel.names_x = new Vector(n+1) sel.names_y = new Vector(n+1) } sel.names[$1] = new String($s2) sel.names_x.x[$1] = $3 sel.names_y.x[$1] = $4 } proc restore_ic() { sel.ic.x[$1] = $2 } proc save() {local i, j box.save("load_file(\"lincir.hoc\", \"LinearCircuit\")\n}\n{") box.save("ocbox_ = new LinearCircuit(1)") box.save("}\n{object_push(ocbox_)}") sprint(tstr, "{version(%d)}", version_) box.save(tstr) for i=0, elements.count-1 { sel = elements.object(i) if (sel.part == GND && sel.x==-100 && sel.y==-100) { if (sel.scale == 1 && sel.angle == 0) { continue // created automatically } } sprint(tstr, "{mkelm(%d, %g, %g, %g, %g)}", sel.part, sel.x, sel.y, sel.scale,\ sel.angle) box.save(tstr) // mkelm also reads the values tobj = sel.val for j = 0, tobj.size - 1 { sprint(tstr, "%g", tobj.x[j]) box.save(tstr) } for j=0, sel.nnode { if (sel.names[j] != nil) { sprint(tstr, "{mklabel(%d, \"%s\", %g, %g)}", j, sel.names[j].s, sel.names_x.x[j], sel.names_y.x[j]) box.save(tstr) if (j > 0) { if (sel.ic.x[j] != 0) { // save initial condition // note that initial conditions are only saved for named states sprint(tstr, "{restore_ic(%d, %g)}", j, sel.ic.x[j]) box.save(tstr) } } } } if (sel.part >= CELL) { tobj = sel.extra_info if (tobj.sec != nil) { tobj.sec.sec sprint(tstr, "{sel.extra_info.set(\"%s\", %g) sel.extra_info.name(sel)}", secname(), tobj.x) box.save(tstr) } } if (sel.part == BAT || sel.part == CUR) { sprint(tstr, "{sel.extra_info.restore()}") box.save(tstr) sel.extra_info.save(box) } } sel = nil sprint(tstr, "{parasitic_ = %d noconsist_ = %d}", parasitic_, noconsist_) box.save(tstr) // save the graphs for i=0, graphlist.count-1 { tobj = graphlist.object(i) box.save("{graphlist.append(new LincirGraph(this, 1))}") tobj.save(box) } if (tooltype_ == 1) { box.save("{g.exec_menu(\"Label\")}") }else if (tooltype_ == 2) { // the explicit tool call ensures simulation mode in // case no DISPLAY box.save("{g.exec_menu(\"Simulate\") tool(2)}") } box.save("{sel = nil}") box.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) } endtemplate LinearCircuit neuron-7.5/share/lib/hoc/lincir/lingraph.hoc000077500000000000000000000042561323325274500211130ustar00rootroot00000000000000begintemplate LincirGraph public owner, box, g, re_add, getinfo, map, save, dismiss external addplot objref owner, box, g, this, p, info strdef tstr proc init() { dummy=0 owner = $o1 build() addplot(g, 0) info = new List() if (numarg() == 2) { restore() }else{ map() } } proc map() { sprint(tstr, "%s for %s", this, owner) if (numarg() > 1) { box.map(tstr, $2,$3,$4,$5) }else{ box.map(tstr) } } proc build() { box = new VBox() box.intercept(1) box.save("") box.dismiss_action("dismiss()") xpanel("") xmenu("PlotWhat?", "plotwhat()") xpanel() g = new Graph() g.menu_remove("Plot what?") g.menu_remove("Change Text") box.intercept(0) } proc dismiss() { box.unmap owner.dismiss_graph(this) } proc plotwhat() { owner.plotwhat(this) } proc getinfo() {local i info.remove_all() // save all the line information p = new Vector(5) for (i=-1; (i = g.line_info(i, p)) != -1;) { info.append(p) p = new Vector(5) } } proc re_add() {local i getinfo() g.erase_all // put back the lines if they still exist if (owner.simulate_) { for i=0, info.count-1 { p = info.object(i) if (owner.varptrname(p.label, tstr)) { g.addvar(p.label, tstr, p.x[0], p.x[1], p.x[2], p.x[3], p.x[4]) } } }else{ for i=0, info.count-1 { p = info.object(i) g.addvar(p.label, "dummy", p.x[0], p.x[1], p.x[2], p.x[3], p.x[4]) } } } proc save() {local i getinfo() sprint(tstr, "%d", info.count) $o1.save(tstr) for i=0, info.count-1 { p = info.object(i) $o1.save(p.label) sprint(tstr, "%d %d %g %g %g", p.x[0], p.x[1], p.x[2], p.x[3], p.x[4]) $o1.save(tstr) } sprint(tstr, "%g %g %g %g // graph size", g.size(1), g.size(2), g.size(3), g.size(4)) $o1.save(tstr) p = new Vector(4) box.size(&p.x[0]) sprint(tstr, "%g %g %g %g // box size", p.x[0], p.x[1], p.x[2], p.x[3]) $o1.save(tstr) $o1.save("// end info") } proc restore() {local i, j, n n = fscan() for i=0, n-1 { getstr(tstr) sscanf(tstr, "%[^\n]", tstr) // will be calling re_add() later //print "restore ", tstr g.addvar(tstr, "dummy", fscan(), fscan(), fscan(), fscan(), fscan()) } g.size(fscan(), fscan(), fscan(), fscan()) map("", fscan(), fscan(), fscan(), fscan()) } endtemplate LincirGraph neuron-7.5/share/lib/hoc/lincir/linmech.hoc000077500000000000000000000042431323325274500207220ustar00rootroot00000000000000begintemplate Lincir2Linmech public install, c, g, y, y0, b, sl, xloc, model, ctopol, gtopol, change_val, layer objref c, g, y, y0, b, model, nil objref sl, xloc, tobj, tobj1, ctopol, gtopol, layer // the first row and column are for ground // the next rows and columns of type CELL are for membrane // current balance and membrane voltage proc init() { nsec = 0 sl = new SectionList() xloc = new Vector(0) y = $o1 y0 = $o2 } proc install() { // c, g, b, CELL, lincirnodes copy2sparse($o1, c, ctopol) copy2sparse($o2, g, gtopol) b = $o3.c(1, $o3.size-1) y0.resize(b.size) y.resize(b.size) y.copy(y0) set_sl($4, $o5) model = new LinearMechanism(c, g, y, y0, b, sl, xloc, layer) if (0) { print "LinearMechanism" print "c" c.printf print "g" g.printf print "b" b.printf print "section list" sl.printnames xloc.printf layer.printf } } func change_val() { // c, g, b if (!copycheck($o1, c, ctopol)) { return 0 } if (!copycheck($o2, g, gtopol)) { return 0 } b.copy($o3, 1, $o3.size-1) return 1 } proc copy2sparse() {local n, m, i, j, x n = $o1.nrow m = $o1.ncol $o2 = new Matrix(n-1, m-1, 2) $o3 = new Matrix(n-1, m-1, 2) for i=1, n-1 for j=1, m-1 { x = $o1.getval(i, j) if (x != 0) { $o2.x[i-1][j-1] = x $o3.x[i-1][j-1] = 1 } } } func copycheck() {local n, m, i, j, x, s n = $o1.nrow m = $o1.ncol for i=1, n-1 for j=1, m-1 { x = $o1.getval(i, j) s = $o3.getval(i-1, j-1) if (x != 0) { if (s == 0) return 0 $o2.x[i-1][j-1] = x }else{ if (s == 1) $o2.x[i-1][j-1] = 0 } } return 1 } proc set_sl() {local i, j xloc = new Vector() layer = new Vector() sl = new SectionList() for i = 0, $o2.count-1 { tobj = $o2.object(i) for j = 0, tobj.elements.count-1 { tobj1 = tobj.elements.object(j) if (tobj1.part >= $1){ tobj1 = tobj1.extra_info if (tobj1.sec != nil) { if (i-1 == xloc.size) { tobj1.sec.sec {sl.append()} xloc.append(tobj1.x) layer.append(tobj.ends.x[j]) }else{ continue_dialog("Internal error: Cell node indices are not consistent.") sl = new SectionList() xloc.resize(0) nsec = 0 return } } } } } nsec = xloc.size } endtemplate Lincir2Linmech neuron-7.5/share/lib/hoc/loadbal.hoc000066400000000000000000001004161323325274500174150ustar00rootroot00000000000000{load_file("stdgui.hoc")} // utility to help compute computational complexity of a cell // and determine best split locations begintemplate LoadBalance public cell_complexity, subtree_complexity, secref, resolutions public ExperimentalMechComplex, distrib, multisplit, read_load_balance_info, cpu_complexity public sec_complex_, roots_complex_, cell_complexity_, m_complex_, ion_complex_, cplx public srlist, backbone_cx_, mt, compute_roots, parent_vec_ public host, gid, splitx, spliti, splitb, unsplitx, splitbit, read_mcomplex public thread_partition, slthread, thread_cxbal_, npiece_, pieces_cx, lpt external hoc_obj_, hoc_sf_, cvode objref srlist, sec_complex_, roots_complex_, parent_vec_, save_capac_ objref mt[2], m_complex_[2], cplx, this, pc, ion_complex_ objref slthread[1] objref cx_piece_indices, bb_piece_cx strdef mname // temporaries for distrib objref cvec, splitxlist, splitixlist, cpu, splitcplx, splitindex, allocated, sorted, sp, si objref splitbrlist, splitbres, sb objref gid, splitx, spliti, splitb, host objref unsplitx proc init() {local i, j localobj ms if (numarg() == 0) { pc = new ParallelContext() }else{ pc = $o1 } backbone_cx_ = .6 // extra complexity due to backbone segments thread_cxbal_ = 1.0 splitbit = 2^28 sec_complex_ = new Vector() roots_complex_ = new Vector() parent_vec_ = new Vector() for j=0, 1 { mt[j] = new MechanismType(j) m_complex_[j] = new Vector(mt[j].count) if (j == 0) {ion_complex_ = new Vector(mt[0].count)} for i=0, mt[j].count-1 { if (j == 1) if(mt[j].is_artificial(i) == 1) continue mt[j].select(i) mt[j].selected(mname) ms = new MechanismStandard(mname, 3) m_complex_[j].x[i] = 1 + ms.count // printf("complexity %d for %s\n", m_complex_[j].x[i], mname) if (j == 0 && hoc_sf_.substr(mname, "_ion") != -1) { m_complex_[j].x[i] = 0 ion_complex_.x[i] = 1 } } } } iterator sections() {local i for i=0, srlist.count-1 srlist.object(i).sec { $&1 = i iterator_statement } } // least processing time algorithm // $o1 is vector of weights $2 is number of partitions // return is vector of partition indices parallel to weights obfunc lpt() {local i, j localobj wx, ix, pw if ($3) { print $o1.size, " piece weights" $o1.printf } wx = $o1.sortindex.reverse ix = new Vector($o1.size) pw = new Vector($2) for i=0, $o1.size-1 { j = wx.x[i] w = $o1.x[j] ip = pw.min_ind pw.x[ip] += w ix.x[j] = ip } if ($3) { print $2, " partition complexities" pw.printf } if (pw.mean) { thread_cxbal_ = pw.max/(pw.mean) }else{ thread_cxbal_ = 1 } return ix } // piece complexities can only be called after srlist exists obfunc pieces_cx() {local i localobj cx, srl, sr, roots cx = new Vector() roots = new List() srl = srlist for i = 0, srl.count-1 { sr = srl.object(i) if (!sr.has_parent) sr.sec { roots.append(sr) cx.append(cell_complexity()) } } if (numarg() == 1) { $o1 = roots } return cx } // lpt distribution of pieces on all the threads proc thread_partition() { local i localobj roots, cx, tid cx = pieces_cx(roots) npiece_ = roots.count() // if (pc.nthread == 1) { return } // do not bother tid = lpt(cx, pc.nthread, $1) objref slthread[pc.nthread] for i=0, pc.nthread - 1 { slthread[i] = new SectionList() } for i=0, tid.size-1 { roots.object(i).sec slthread[tid.x[i]].append() } for i=0, pc.nthread - 1 { pc.partition(i, slthread[i]) } } func is_nernst() { return int(ion_style($s1)/64)%2 } // complexity of currently accessed section func sec_complexity() {local c, i, x localobj pp c = m_complex_[0].x[0] // one zero area node for i=1, mt[0].count-1 { mt[0].select(i) mt[0].selected(mname) if (ismembrane(mname)) { x = m_complex_[0].x[i] if (ion_complex_.x[i] > 0) if (is_nernst(mname)) { x = ion_complex_.x[i] } c += x * nseg } } for i=0, mt[1].count-1 { mt[1].select(i) for (pp = mt[1].pp_begin; object_id(pp); pp = mt[1].pp_next) { c += m_complex_[1].x[i] } } return c } // complexity of entire cell containing currently accessed section // or, if there is an arg, the complexity of the cell object. // keep the individual section complexities in a parallel vector // for split analysis func cell_complexity() {local x, i, c localobj sl, sr sl = new SectionList() if (numarg() == 1) { if (!execute1("{all}", $o1, 0)) { srlist = new List() sec_complex_.resize(0) return 0 } forsec $o1.all { if (object_id(sr) == 0) { sr = new SectionRef() } } sr.sec { sl.wholetree() } }else{ sl.wholetree() // note this is root to leaf order } return cplx_helper(sl) + m_complex_[0].x[0] } func cpu_complexity() { local n localobj s, sl s = new String() srlist = new SectionList() srlist.allroots() n = 0 forsec srlist { n += 1 } sl = new SectionList() forsec srlist { sl.wholetree() } return cplx_helper(sl) + n * m_complex_[0].x[0] } func cplx_helper() {local x, i, c localobj sl sl = $o1 srlist = new List() forsec sl { srlist.append(new SectionRef()) } sec_complex_.resize(srlist.count) c = 0 for sections(&i) { x = sec_complexity() sec_complex_.x[i] = x c += x } cell_complexity_ = c return c } proc compute_roots() {local i // construct a trueparent index vector save_capac() for sections(&i) { cm(.0001) = i } parent_vec_.resize(srlist.count) for i=0, srlist.count-1 { if (srlist.object(i).has_trueparent) { srlist.object(i).trueparent {parent_vec_.x[i] = cm(.0001)} }else if (srlist.object(i).has_parent) { srlist.object(i).parent {parent_vec_.x[i] = cm(.0001)} }else{ parent_vec_.x[i] = -1 } } restore_capac() // accumulate the subtree complexities roots_complex_.copy(sec_complex_) for (i = srlist.count-1; i > 0; i -= 1) { if (parent_vec_.x[i] >= 0) { roots_complex_.x[parent_vec_.x[i]] += roots_complex_.x[i] } } } // returns the index of the complexity that is closest to the desired // complexity (argument 1) but less than // or equal to the upper bound complexity (argument 2) // Note if scalar reference arg3 returns as 0 then the subtree // rooted at that section index is the one referred to. If 1, then // subtree rerooted at the parent is the on referred to. func subtree_complexity() {local i, j, k, min compute_roots() min = 1e9 for i = 0, srlist.count-1 { c = roots_complex_.x[i] if (c < $2 && abs(c - $1) < min) { j = i k = 0 min = abs(c - $1) } c = cell_complexity_ - c if (c < $2 && abs(c - $1) < min) { j = i k = 1 min = abs(c - $1) } } $&3 = k return j } //returns the SectionRef of the section associated with index (arg1) obfunc secref() { return srlist.object($1) } //returns a vector with the distinct possible resolutions //the indices of these resolutions are returned as a new parallel vector in $o1 // and the branch set index as a vector in $o2. // note that at a branch point where n sections connect together // with m different complexities, // there are n!/(n - m)! - 1 potentially distinct complexity resolutions. // For complicated trees, e.g. 3d reconstructions, most often n = 3 and // so there are generally 5 resolutions available. The TCR Traub // cell has 10 subtrees each of weight 418 connected to a soma/axon // subtree of weight 4306 - 10*418 = 126 so there would be // 11*10 - 1 possible resolutions at the 1 end of the soma. obfunc resolutions() {local i, j, ibegin, pbegin, c, oldres \ localobj si, res, v1, v2, bres, corder compute_roots() v1 = new Vector() v2 = new Vector() res = new Vector() bres = new Vector() corder = new Vector() if (srlist.count == 0) { $o1 = v2 $o2 = bres return v1 } si = parent_vec_.sortindex ibegin = 0 pbegin = parent_vec_.x[si.x[ibegin]] for i=0, si.size-1 { if (parent_vec_.x[si.x[i]] == pbegin) {continue} if (parent_vec_.x[si.x[ibegin]] >= 0) { // do not allow split at root n = i - ibegin res.resize(n) corder.resize(n) // child resolutions of the pbegin index for j=0, n-1 { res.x[j] = roots_complex_.x[si.x[j + ibegin]] corder.x[j] = si.x[j + ibegin] } // want the res to be in child order corder = corder.sortindex res.index(res, corder) // the parent tree is implicit with respect to the // remainder // for simplicity, instead of analyzing all the // possiblities, just do all individual and the sums // (and, of course, the remainders). Associate every // resolution with ibegin and a index for the // specific branch set. Note that this gets all of // the binary branch combinations and is good // for stylized multibranches where all are identical // individuals c = cell_complexity_ for j=0, n-1 { v1.append(res.x[j]) v1.append(c - res.x[j]) v2.append(si.x[ibegin]) v2.append(si.x[ibegin]) bres.append(j+1) bres.append(-(j+1)) } // sums oldres = res.x[0] for j=1, n-1 { oldres += res.x[j] if (oldres < c) { v1.append(oldres) v1.append(c - oldres) v2.append(si.x[ibegin]) v2.append(si.x[ibegin]) bres.append(n+j) bres.append(-(n+j)) } } } ibegin = i pbegin = parent_vec_.x[si.x[ibegin]] } // now only the distinct ones si = v1.sortindex v1.index(v1, si) v2.index(v2, si) bres.index(bres, si) for (i=v1.size-1; i >= 1; i -= 1) { if (v1.x[i] == v1.x[i-1]) { v1.remove(i) v2.remove(i) bres.remove(i) } } $o1 = v2 $o2 = bres return v1 } proc save_capac() {local i save_capac_ = new Vector(sec_complex_.size) for sections(&i) { save_capac_.x[i] = cm(.0001) } } proc restore_capac() {local i for sections(&i) { cm(.0001) = save_capac_.x[i] } } // all the mechanism type 0 then 1, then base and ion with style eadvance (64 bit set) // generate a vector of computation time and a list of type vectors of types inserted proc setcol() {local i for i=0, $o1.nrow-1 { $o1.x[i][$2] = $3 } } proc ExperimentalMechComplex() {local i, j, k, b, ts, ns, baseindex, irun, par \ localobj s, cmd, sr, ionindices, ct, names, ninstance, pc, ionname, f, dvec, vcnts, dvec1 //if something uses a mechanism of type i then if ionindices.x[i] > 0 then // the mechanism is an ion and if the eadvance bit is set for the ionstyle // then the index for the element is ionindices.x[i] pc = new ParallelContext() par = 0 if (pc.nhost > 1) { par = 1 dvec = new Vector() } //printf("id=%d nhost=%d\n", pc.id, pc.nhost) baseindex = mt[0].count + mt[1].count j = baseindex + 1 ionindices = new Vector(mt[0].count) s = new String() ionname = new String() for i=0, mt[0].count-1 { mt[0].select(i) mt[0].selected(s.s) if (hoc_sf_.substr(s.s, "_ion") != -1) { ionindices.x[i] = j j += 1 } } // start empty forall delete_section() // do three runs for each mechanism ct = new Matrix(j, 3) names = new List() for i=0, ct.nrow-1 { names.append(new String()) } ninstance = new Matrix(j, j, 2) // fixed step with cache efficiency cvode.active(0) cvode.cache_efficient(1) cmd = new String() ts = 100 ns = 100 for irun=0, ct.ncol-1 { ct.x[baseindex][irun] = dorun(ts) } // setcol(ninstance,baseindex,1) // everyone has the overhead names.o(baseindex).s = "overhead" // morphology and capacitance go together by default. But treat 0 and 1 // as 100 empty sections with one segment and 1 empty section with 100 // segments respectively sr = makesec(ns, 1) for irun=0, ct.ncol-1 { ct.x[0][irun] = dorun(ts) } // setcol(ninstance, 0, 2) // everyone has 2 zero area nodes except // ninstance.x[0][0] = 1 + ns // this one is sausage of ns sections // ninstance.x[baseindex][0] = 0 // overhead has none names.o(0).s = "zero_area_node" sr = makesec(1, ns) for irun=0, ct.ncol-1 { ct.x[1][irun] = dorun(ts) } // setcol(ninstance, 1, ns) // everyone has capacitance names.o(1).s = "capacitance" // from now on 1 section ns segments for j=0, 1 for k = 0, mt[j].count-1 { if (j == 0 && k < 2) { continue } kk = k + j*mt[0].count mt[j].select(k) mt[j].selected(s.s) names.o(kk).s = s.s // parallelism added on top of working version b = 1 if (kk%pc.nhost != pc.id) { b = 0 } // ions must be done on id 0 (because names for // ionindices.x[k] needs to be assigned ) if (j == 0) if (ionindices.x[k] > 0) { if (pc.id == 0) { b = 1 }else{ b = 0 } } if (b == 0) { continue } //printf("%d %s\n", pc.id, s.s) sr = makesec(1, ns) b = 0 for i=1, numarg() { if (hoc_sf_.substr(s.s, $si) != -1) { b = 1 } } if (b) { continue } if (j == 0) { sprint(cmd.s, "insert %s", s.s) }else{ if (mt[j].is_artificial(k)) { continue } hoc_obj_ = new List(ns) sprint(cmd.s, "for (hoc_ac_, 0) hoc_obj_.append(new %s(hoc_ac_))", s.s) } sr.sec execute(cmd.s) if (dorun(1) == 1000) { printf("mcomplex failed for %s\n", s.s) continue } if (par) { dvec.append(kk) } for irun=0, ct.ncol-1 { ct.x[kk][irun] = dorun(ts) if (par) { dvec.append(ct.x[kk][irun]) } } // ninstance.x[kk][kk] = ns // if it is an ion, do again with style eadvance b = 0 if (j == 0) if (ionindices.x[k] > 0) { b = 1 } if (b) { ion_style(s.s, 3, 2, 1, 1, 0) for irun=0, ct.ncol-1 { ct.x[ionindices.x[k]][irun] = dorun(ts) } ninstance.x[ionindices.x[k]][ionindices.x[k]] = ns names.o(ionindices.x[k]).s = s.s }else{ // otherwise, what ions are used with what style for i=2, ionindices.size-1 if (ionindices.x[i] > 0) { mt[0].select(i) mt[0].selected(ionname.s) sr.sec if (ismembrane(ionname.s)) { if (int(ion_style(ionname.s)/64)%2) { //eadvance is 1 ninstance.x[kk][ionindices.x[i]] = ns }else{ ninstance.x[kk][i] = ns } } } } } execute("objref hoc_obj_[2]") if (object_id(sr)) sr.sec delete_section() if (par) {// now do an alltoall so id 0 has all the info vcnts = new Vector(pc.nhost) if (pc.id == 0) {dvec.resize(0)} vcnts.x[0] = dvec.size dvec1 = new Vector() pc.alltoall(dvec, vcnts, dvec1) for (i=0; i < dvec1.size; i += ct.ncol+1) { kk = dvec1.x[i] for irun=0, ct.ncol-1 { ct.x[kk][irun] = dvec1.x[i+irun+1] } } if (pc.id > 0) { // the id==0 barrier is at the end pc.barrier() return } } // lastly, get some indication of time it takes to solve a backbone if (0) { pc.gid_clear() sr.sec delete_section() sr = makesec(ns) sr.sec { pc.multisplit(0, 1, 2) pc.multisplit(1, 2, 2) } pc.multisplit() cx = (dorun(ts)-base)/base if (cx < 0) { cx = 0 } printf("backbone %g\n", cx) pc.gid_clear() sr.sec delete_section() } // subtract the overhead f = ct.getrow(baseindex) for i=0, ct.nrow-1 if (i != baseindex) { ct.setrow(i, ct.getrow(i).sub(f)) } // the capacitance contains the zero area node contribution. subtract from mech f = ct.getrow(1) for i=2, ct.nrow-1 if (i != baseindex) { ct.setrow(i, ct.getrow(i).sub(f)) } // separate the zero-area_node and the capacitance ct.setrow(0, ct.getrow(0).sub(ct.getrow(1)).div(ns-1)) // single zero-area-node ct.setrow(1, ct.getrow(1).sub(ct.getrow(0).mul(2)).div(ns)) // single capacitance after subtract two zero nodes // subtract ions from mechanisms for i=2, baseindex-1 { for k = 0, ninstance.sprowlen(i)-1 { ninstance.spgetrowval(i, k, &j) ct.setrow(i, ct.getrow(i).sub(ct.getrow(j))) } } // unit values for i=2, ct.nrow-1 if (i != baseindex) { ct.setrow(i, ct.getrow(i).div(ns)) } f = new File() f.wopen("mcomplex.dat") // scale to capacitance j = ct.getrow(1).mean for i=0, ct.nrow-1 { // take average. negative is artificial and undone k = ct.getrow(i).mean if (k < 0) { k = 0 } f.printf("%g %s\n", k/j, names.o(i).s) } f.close() if (par) { pc.barrier() } } proc read_mcomplex() {local i, j, k, c localobj f, s, s2, pc pc = new ParallelContext() f = new File() if (!f.ropen("mcomplex.dat")) { return } s = new String() s2 = new String() for j=0,1 { k = 0 for i=0, mt[j].count - 1 { c = f.scanvar() f.scanstr(s2.s) mt[j].select(i) mt[j].selected(s.s) if (pc.id == 0) if (j == 0 && k == 0) { if (strcmp("zero_area_node", s2.s) != 0) { execerror(s2.s, " should be zero_area_node") } }else{ if (strcmp(s.s, s2.s) != 0) { execerror(s2.s, " not loaded") } } m_complex_[j].x[k] = c k += 1 } } c = f.scanvar() f.scanstr(s2.s) if (strcmp(s2.s, "overhead") != 0) { execerror(s2.s, "should be overhead")} while (f.gets(s.s) != -1) if (hoc_sf_.substr(s.s, "_ion") != -1) { sscanf(s.s, "%lf %s", &c, s2.s) mt[0].select(s2.s) ion_complex_.x[mt[0].selected()] = c } if (0) { for i=0, mt[0].count-1 { printf("%g %g\n", m_complex_[0].x[i], ion_complex_.x[i]) } for i=0, mt[1].count-1 { printf("%g\n", m_complex_[1].x[i]) } } } func dorun() { xrun_ = $1 if (execute1("xrun()", this) == 0) { return 1000 } return xrun_ } proc xrun() {local tstop localobj pc tstop = xrun_ pc = new ParallelContext() finitialize(-70) xrun_ = pc.time batch_run(tstop, tstop) xrun_ = pc.time - xrun_ } obfunc makesec() {localobj s, sr s = new String() sprint(s.s, "create tempsec[%d]", $1) execute(s.s) sprint(s.s, "forall nseg=%d", $2) execute(s.s) sprint(s.s, "for i=1, %d { connect tempsec[i](0), tempsec[i-1](1) }", $1-1) execute(s.s) sprint(s.s, "tempsec[0] hoc_obj_[1] = new SectionRef()") execute(s.s) sr = hoc_obj_[1] cvode.use_mxb(0) // extracellular would turn this on cvode.cache_efficient(1) // extracellular would turn this off return sr } //args //input $1=#ncpu, $o2=Vector of complexity values, $o3=List of Vectors of split point complexities // $o4=List of Vectors of split point indices // $o8 = List of Vectors of split point branch set indices //output (parallel to $o2) $o5 = Vector of cpu indices, $o6 = Vector of split point complexity // $o7 = Vector of split point indices // $o9 = Vector of split point branch set indices // if a return split point complexity is -1 then means it was not split // return % load balance error func distrib() {local i, n $o5.resize($o2.size) $o6.resize($o2.size) $o7.resize($o2.size) $o9.resize($o2.size) cplx = new Vector() for i = 0, 50 { cvec = $o2 splitxlist = $o3 splitixlist = $o4 cpu = $o5 splitcplx = $o6 splitindex = $o7 splitbrlist = $o8 splitbres = $o9 n = distrib_trial($1, i+.5) //printf("i=%d n=%d\n", i, n) if (n <= $1) { break } } //print "distrib returning with i=",i return int((cplx.max*$1/$o2.sum - 1)*100 + .5) } func distrib_trial() {local i, i1, j1, j2, j, k, c, cmax, cmin, climit, n, ncpu, margin ncpu = $1 margin = (1 + $2/100) splitcplx.fill(-1) splitindex.fill(0) splitbres.fill(0) allocated = new Vector(cvec.size) sorted = cvec.sortindex cplx.resize(0) i = 0 j = sorted.size - 1 n = 0 c = 0 climit = cvec.sum/ncpu //printf("climit = %g climit*margin = %g\n", climit, climit*margin) while (i <= j) { i1 = sorted.x[i] // smallest j1 = sorted.x[j] // largest if (allocated.x[i1]) { i += 1 continue } if (allocated.x[j1]) { j -= 1 continue } cmax = cvec.x[j1] cmin = cvec.x[i1] if (c + cmax <= climit*margin) { // largest whole cell fits into cpu cpu.x[j1] = n // hopefully the most common case //printf("largest fits j=%d j1=%d cold=%d cmax=%d cnew=%d n=%d\n", j, j1, c, cmax, c+cmax, n) c += cmax allocated.x[j1] = 1 }else{ // if (cmax > climit) { // must split if (c + cmax > 2*climit) { // may want to defer til c==0 if (c == 0) { // no choice but to split as evenly as possible // and put the largest part first cpu.x[j1] = n allocated.x[j1] = 1 sp = splitxlist.object(j1) si = splitixlist.object(j1) sb = splitbrlist.object(j1) k = sp.indwhere(">=", cmax/2) splitcplx.x[j1] = sp.x[k] splitindex.x[j1] = si.x[k] splitbres.x[j1] = sb.x[k] c += sp.x[k] //printf("no choice even split j=%d j1=%d c=%d cmax=%d othersplit=%d", j, j1, c, cmax, cmax-c, n) n = addone(n, ncpu, c) c = cmax - c if (c > climit) { // satisfied if n is full n = addone(n, ncpu, c) c = 0 }else if ( greedy(i, j, c, climit, margin, &j2, &k) ) { // see if there is a cell available which will fill this // and the next cpu to within the margin. cpu.x[j2] = n allocated.x[j2] = 1 sp = splitxlist.object(j2) si = splitixlist.object(j2) sb = splitbrlist.object(j2) splitcplx.x[j2] = sp.x[k] splitindex.x[j2] = si.x[k] splitbres.x[j2] = sb.x[k] c += sp.x[k] n = addone(n, ncpu, c) c = cvec.x[j2] - sp.x[k] n = addone(n, ncpu, c) c = 0 }else{ // not clear what to do. // attempt to fill more? // probably pretty close to full //printf("fail %d %d\n", n, c) n = addone(n, ncpu, c) c = 0 } }else if ( greedy(i, j, c, climit, margin, &j2, &k) ) { // see if there is a cell available which will fill this // and the next cpu to within the margin. cpu.x[j2] = n allocated.x[j2] = 1 sp = splitxlist.object(j2) si = splitixlist.object(j2) sb = splitbrlist.object(j2) splitcplx.x[j2] = sp.x[k] splitindex.x[j2] = si.x[k] splitbres.x[j2] = sb.x[k] c += sp.x[k] n = addone(n, ncpu, c) c = cvec.x[j2] - sp.x[k] n = addone(n, ncpu, c) c = 0 }else{ //printf("leave as is, use next cpu c=%d n=%d\n", c, n) n = addone(n, ncpu, c) c = 0 } }else{ //safe to split // fill up n cpu.x[j1] = n sp = splitxlist.object(j1) si = splitixlist.object(j1) sb = splitbrlist.object(j1) k = sp.indwhere(">=", climit - c) if (k == -1) k = sp.size-1 if (k > 1 && c + sp.x[k] > climit*margin) k -= 1 if (c + sp.x[k] > climit*margin) { //printf("leave as is, use next cpu c=%d n=%d\n", c, n) n = addone(n, ncpu, c) c = 0 continue } allocated.x[j1] = 1 // should check if k-1 is better split point splitcplx.x[j1] = sp.x[k] splitindex.x[j1] = si.x[k] splitbres.x[j1] = sb.x[k] //printf("safe split j=%d j1=%d cold=%d cmax=%d sp=%d cnew=%d remain=%d n=%d k=%d\n",\ //j, j1, c, cmax, sp.x[k], c+sp.x[k], cmax-sp.x[k], n, k) c += sp.x[k] n = addone(n, ncpu, c) c = cmax - sp.x[k] } } } if (c > 0) { cplx.append(c) } objref cvec, splitxlist, splitixlist, cpu, splitcplx, splitindex, allocated, sorted, sp, si objref splitbrlist, splitbres, sb //printf("trial %d ncpu=%d max=%g avg=%g min=%g %d\n", $2, cplx.size, cplx.max, cplx.mean, cplx.min, cplx.min_ind) return cplx.size } //greedy(i, j, c, climit, margin, &j2, &k) func greedy() {local i, i1, k, c, climit, margin, rest, remain, max, min \ localobj sp c = $3 climit = $4 margin = $5 rest = climit*margin remain = rest - c max = rest + remain min = 2*climit - c for i = $1, $2 { i1 = sorted.x[i] if (allocated.x[i1]) { continue } if (max < cvec.x[i1]) { continue } if (min > cvec.x[i1]) { continue } sp = splitxlist.object(i1) k = sp.indwhere(">=", climit - c) if ( sp.x[k] <= remain && cvec.x[i1] - sp.x[k] <= rest) { $&6 = i1 $&7 = k return 1 } } return 0 } func addone() {local n cplx.append($3) n = $1 + 1 if (n >= $2) { // printf("Warning, increasing the cpu index past %d\n", $2) } return n } proc read_load_balance_info() {local i, n, h, g, si, sx, sb, cx, myid localobj f myid = $2 f = new File() if (!f.ropen($s1)) { execerror("could not open", $s1) } n = f.scanvar() host = new Vector() gid = new Vector() splitx = new Vector() spliti = new Vector() splitb = new Vector() unsplitx = new Vector() for i=0, n-1 { h = f.scanvar() g = f.scanvar() si = f.scanvar() sb = f.scanvar() sx = f.scanvar() cx = f.scanvar() if (h == myid) { host.append(h) gid.append(g) spliti.append(si) splitb.append(sb) splitx.append(sx) unsplitx.append(cx) }else if (h == (myid - 1) && sx > -1) { host.append(h) gid.append(g) spliti.append(si) splitb.append(sb) splitx.append(sx) unsplitx.append(cx) } } f.close() } // here we split a cell at the soma and at one other point (to form // a short backbone) so that the maximum size piece is as small as // possible. Return the index of the section which we will split // at the 1 end. // enhanced to try to split consistent with the optional second arg value for // maximum complexity // 12/24/2006 try again. several issues were revealed in the experience // with the first implementation. Need to divide into possibly many pieces, // not just 3 and each piece has to be < some max complexity. // Do not worry about adjacent backbone sizes since we plan on enhancing // ParallelContext.multisplit to solve exactly anyway. Sometimes branches // are at several locations on soma. Generally the user will coalesce these // and the problem will go away. But if not... // Usually choose a split point at the // largest branch, but the collection of (smaller) branches at the other point // may total > cmax. If the collections of branches at both points that do // not include our largest branch is still > cmax then we are forced to // have two split points in the soma. // With respect to returning a result, originally we used a String but that // is getting out of hand so switch to Vector with a suitable format where // the information is not too difficult to extract for use by mssel, msdiv, // and pmetis. Format is // gid // total complexity // how many split points, may be 0 if cell is not split // for the first split point, the number of subtrees // Note, the first subtree of the first split point is assumed to contain // the soma (parent). Therefore the sum of all the subtree complexities // is the same as the total complexity. // for the first subtree: complexity, number of children, ids of children // ... iterator children() {local i localobj p p = srlist.object($1) for i=0, p.nchild - 1 p.child[i] { $&2 = cm(.0001) iterator_statement } } func x2iseg() { local x if ($1 <= 0) { return -1 } if ($1 >= 1) { return $2 } return $1*$2 - .5 } // args: gid, cmax, result Vector // return number of pieces func multisplit() {local i, x, ilargest, cmax, c \ localobj root, cc, xcon npiece = 1 cbk_soma = 0 cmax = $2 $o3.resize(0) $o3.append($1) compute_roots() if (0 && $1 == 79) { printf("compute_roots\n") for i=0, roots_complex_.size-1 { printf(" %d %d %g %g\n", i, parent_vec_.x[i], sec_complex_.x[i], roots_complex_.x[i]) } } $o3.append(roots_complex_.x[0]) $o3.append(0) // update later if we do, in fact, split // maybe the cell is small enough that we do not have to split at all if (roots_complex_.x[0] < cmax) { return npiece } // cannot split if only one section if (roots_complex_.size < 2) { return npiece } // map from section to srlist index save_capac() root = srlist.object(0) for sections(&i) { cm(.0001) = i } // what is the pattern of connection at the soma // this helps us determine the best sid0 split point xcon = new Vector() root.sec for (x) xcon.append(x) cc = new Vector(xcon.size) // complexity of child trees for children(0, &i) { x = x2iseg(parent_connection(), root.sec.nseg) + 1 c = roots_complex_.x[i] cc.x[x] += c } // First splitpoint is on the soma. That is a mistake if // the soma has only one branch... // The first split subtree contains the soma. // It must also contain the complexity of other branches // at different locations (if they are not also at a split point). // on the soma. // The soma cannot have more than two split points. // The first is the maximum cc. // The second is the next largest if it is larger than the // max. c = sec_complex_.x[0] cx_piece_indices = new Vector() bb_piece_cx = new Vector() if ((c + cc.sum - cc.max) < cmax) { // one split point at max point c += cc.sum - cc.max // everything except max subtree $o3.x[2] += 1 ms_split($o3, 0, xcon.x[cc.max_ind], c, cmax) }else{ // two split points on soma i = cc.max_ind c += cc.sum - cc.max cc.x[i] = 0 c -= cc.max // everything except max and next max subtree $o3.x[2] += 1 ms_split($o3, 0, xcon.x[i], c, cmax) if (cc.max > 0) { //another split point on soma $o3.x[2] += 1 ms_split($o3, 0, xcon.x[cc.max_ind], 0, cmax) } } // Note: if the root split point (contains the soma complexity) has // a child piece count of $o3.x[3] == 1, then that split point does // not have to be used. if ($o3.x[3] == 1) { $o3.x[4] -= cbk_soma } restore_capac() // the total complexity needs to be increased because of the extra // zero area nodes. It is also increased by multisplit // piece overhead and the someday perhaps the overhead of the reduced tree. //$o3.x[0] = npiece + 1000*cx_piece_indices.size $o3.x[1] += m_complex_[0].x[0] * (cx_piece_indices.size - 1) for i = 1, cx_piece_indices.size-1 { $o3.x[cx_piece_indices.x[i]] += m_complex_[0].x[0] } $o3.x[1] += bb_piece_cx.sum for i=1, cx_piece_indices.size-1 { $o3.x[cx_piece_indices.x[i]] += bb_piece_cx.x[i] } return npiece - 1 } // split at srlist.object($2).sec($3) // $o1 is result vector to append // $4 is extra complexity to be added to first subtree (for soma, otherwise 0) // $5 is max complexity of a subtree // return value is the total complexity of the subtree (includes complexity // of that portion which was recursively split away.) func ms_split() {local i, j, cbk, ctotal, nsubtree_index, cx_index, nchild_index, c \ localobj cx, is, sort cx = new Vector() is = cx.c for children($2, &i) if ($3 == parent_connection()) { is.append(i) cx.append(roots_complex_.x[i]) } if (cx.size == 0) { srlist.object($2).sec printf("No children of %s(%g)\n", secname(), $3) execerror("LoadBalance failure:") } sort = cx.c.sortindex is.index(sort) cx.index(sort) cx.x[0] += $4 // add to smallest ctotal = cx.sum nsubtree_index = $o1.size $o1.append(1) // number of subtrees cx_index = $o1.size $o1.append(cx.x[0]) // subtree complexity cx_piece_indices.append(cx_index) bb_piece_cx.append(0) nchild_index = $o1.size $o1.append(1) // number of children in subtree $o1.append(is.x[0]) for i=1, is.size-1 { if ($o1.x[cx_index] + cx.x[i] < $5) { $o1.x[cx_index] += cx.x[i] $o1.x[nchild_index] += 1 }else{ $o1.x[nsubtree_index] += 1 cx_index = $o1.size $o1.append(cx.x[i]) nchild_index = $o1.size $o1.append(1) } $o1.append(is.x[i]) } // some of the individuals may be large and need to be split themselves // so the complexity added above may need to be updated cx_index = nsubtree_index + 1 for i = 0, $o1.x[nsubtree_index] - 1 { if ($o1.x[cx_index] > $5) { // needs splitting if (cansplit(srlist, $o1, cx_index+2)) { // if (srlist.object($o1.x[cx_index+2]).nchild > 0 ) { j = ms_getsplit($o1.x[cx_index+2], $5) $o1.x[2] += 1 c = ms_split($o1, j, 1, 0, $5) $o1.x[cx_index] -= c // but now this subtree has a backbone so there // is extra complexity proportional to the number // of segments on the backbone. Count from (j,1) to // ($2,$3) if (backbone_cx_) { cbk = backbone_cx_ * cnt_bb_seg($2, $3, j, 1) if ($2 == 0) { // in case we do not in fact split // cbk_soma = cbk } bb_piece_cx.x[cx_piece_indices.indwhere("==", cx_index)] += cbk } }else{ // printf("Piece %d with complexity %g cannot be split\n", cx_index, $o1.x[cx_index]) } } if (i < $o1.x[nsubtree_index] - 1) { cx_index += 2 + $o1.x[cx_index + 1] cx_piece_indices.append(cx_index) bb_piece_cx.append(0) } } npiece += $o1.x[nsubtree_index] return ctotal } // if (cansplit(srlist, $o1, cx_index+2)) { replaces // if (srlist.object($o1.x[cx_index+2]).nchild > 0 ) { func cansplit() {local i, b, x localobj sr sr = $o1.o($o2.x[$3]) // sr.sec print "cansplit ", secname(), " ", $3 if (sr.nchild == 0) { return 0 } b = 0 for i=0, sr.nchild -1 sr.child[i] { x = parent_connection() if (x == 0 || x == 1) { b = 1 } } return b } func cnt_bb_seg() {local i, j, ns, xp ns = 0 // all segs until reach the first section for (i = $3; i != $1; i = j) { srlist.object(i).sec { ns += nseg + 1 // include the 0 area node xp = parent_connection() } srlist.object(i).parent { j = cm(.0001) } } // only the segs in first section from $2 to ... srlist.object($1).sec { j = (nseg*abs($2-xp)) + 1 } ns += j // srlist.object($3).sec printf("%d segments from %s(%g) to ", ns, secname(), $4) // srlist.object($1).sec printf("%s(%g)\n", secname(), $2) return ns } // return a split parent index descending from srlist.object($1) // so the backbone is < $2 // The only problem is that one or more of the children at the // split point should be allowed to be part of the parent backbone func ms_getsplit() {local i, id, idold, c, ctotal, clargest, ilargest id = $1 idold = $1 ctotal = roots_complex_.x[id] c = ctotal while (ctotal - c < $2 && c > $2) { c = 0 clargest = 0 for children(id, &i) { c += roots_complex_.x[i] if (roots_complex_.x[i] > clargest) { clargest = roots_complex_.x[i] ilargest = i } } if (ctotal - c > $2) { break } idold = id id = ilargest } return idold } endtemplate LoadBalance neuron-7.5/share/lib/hoc/logax.hoc000077500000000000000000000121651323325274500171370ustar00rootroot00000000000000begintemplate LogAvsX public measure, inject, ratio, input, transfer, move_callback, sl, extended, imp public flush, begin, view_count objectvar imp, sec, shape, b1, this, move_callback objref seclist, g, rvp[1], sl double orig[1] strdef s0, s1, s2, stemp, sdist, sname, fstyle, tstr proc init() { extended = 0 direct_ = 0 style_ = 0 fstyle = "log(Attenuation)" flush_ = 0 scale_ = 0 sel_act_ = 0 sec = new SectionRef() x = .5 outside_sections() nsec = 0 forsec sl { nsec += 1 } objref rvp[nsec] double orig[nsec] freq = 0 variable_domain(&freq, 0, 1e9) units(&freq, "Hz") imp = new Impedance() build() measure(.5) } proc outside_sections() { sl = new SectionList() sl.wholetree() } proc measure() { sec = new SectionRef() x = $1 setdir(direct_) } proc setdir() { sec.sec { direct_ = $1 if (style_ == 1) { // input sprint(s0, "unused (red) %s(%g)", secname(), x) }else if (direct_ == 0) { sprint(s0, "Measure (red) %s(%g)", secname(), x) }else { sprint(s0, "Inject (red) %s(%g)", secname(), x) } } draw() } proc compute() { // calcs impedances, argument is freq (Hz) sec.sec imp.loc(x) imp.compute($1, extended) } double sz[4] proc draw() { local i compute(freq) // freq is set by a field editor g.flush() if (scale_) { g.size(&sz[0]) g.size(sz[0], sz[1], 0, sz[3]) } } proc build() {local i b1 = new VBox() b1.ref(this) b1.save("") b1.intercept(1) xpanel("", 1) xbutton("Redraw", "draw()") xmenu("Shape Select Action") xradiobutton("Move electrode", "sel_act_ = 0 gcolor()", 1) xradiobutton("Show Position", "sel_act_ = 1") xmenu() xmenu("Plot") xradiobutton("log(Attenuation)", "style(0)", 1) xradiobutton("Zin (Mohm)", "style(1)") xradiobutton("Ztransfer (Mohm)", "style(2)") xradiobutton("V(measure)/V(inject)", "style(3)") xmenu() xmenu("Extras") xstatebutton("Movie mode", &flush_, "add_flush()") xstatebutton("Auto Scale", &scale_, "draw()") xmenu() xpanel() xpanel("") xcheckbox("include dstate/dt contribution", &extended, "draw()") xpvalue("frequency", &freq, 1, "draw()") xradiobutton("Vin", "setdir(0)", 1) xradiobutton("Vout", "setdir(1)") s0 = " Please Wait " xvarlabel(s0) xpanel() shape = new Shape() g = new Graph() // appends graph to box g.menu_tool("Show position", "show_position") color = 2 shapemark(1) shapemark(0, sec, x) shape.action("move()") b1.intercept(0) sprint(stemp, "%s", this) b1.map(stemp) compute(freq) sec.root distance() i=-1 forsec sl {i+=1 orig[i] = distance(0)} i=-1 forsec sl {i+=1 rvp[i] = new RangeVarPlot("fun($1)") rvp[i].begin(0) rvp[i].end(1) rvp[i].origin(orig[i]) } add_rvp() } proc add_rvp() {local i g.erase_all() g.label(-100,-100, "") for i=0, nsec-1 { g.addobject(rvp[i]) } g.label(.5, .9, fstyle) } func vmvi() {local xx, y, z if (direct_ == 0) { y = imp.ratio($1) }else{ sec.sec xx = imp.input(x) y = imp.transfer($1)/xx } if (y*1e20 <= 0) { return 1e-30 } return y } func fun() { if (style_ == 0) { return -log(vmvi($1)) }else if (style_ == 1) { return imp.input($1) }else if (style_ == 2) { return imp.transfer($1) }else{ return vmvi($1) } } proc style() { style_ = $1 if (style_ == 0) { fstyle = "log(Attenuation)" }else if (style_ == 1) { fstyle = "Zin" }else if (style_ == 2){ fstyle = "Ztransfer" }else if (style_ == 3) { fstyle = "V(measure)/V(inject)" } setdir(direct_) add_rvp() draw() } imin=0 proc gcolor() {local i i=-1 forsec sl { i+=1 rvp[i].color(1) } } proc move() {local i, xx, ss xx = hoc_ac_ rvp[imin].color(1) if (sel_act_ == 0) { measure(xx) shapemark(0, sec, x, color) shape.color_all(1) draw() }else{ ss = this_section(.5) i=-1 forsec sl {i+=1 if (ss == this_section(.5)) { rvp[i].color(2) }else{ rvp[i].color(1) } } g.flush() } } // should put this in plotshape class and avoid a meaningless point process objectvar stim proc shapemark() {local i if (numarg() == 1) { objectvar stim for i=0,$1-1 sec.sec stim = new PointProcessMark(x) for i=0,$1-1 shape.point_mark(stim, color) }else{ $o2.sec stim.loc($3) } } proc show_position() {local i, xx, min, x, xs, ys if ($1 == 2) { min = 1e9 imin= -1 xs = g.size(2) - g.size(1) ys = g.size(4) - g.size(3) i=-1 forsec sl {i+=1 x = rvp[i].left() for (xx) { f = ((x + xx*L - $2)/xs)^2 + ((fun(xx) - $3)/ys)^2 if (f < min) { min = f imin = i } } } shape.color_all(1) i=-1 forsec sl {i+=1 if (i==imin) { rvp[i].color(2) shape.color(2) }else{ rvp[i].color(1) } } g.flush() shape.flush() } } proc add_flush() { if (flush_) { sprint(tstr, "flush_list.append(%s)", this) execute(tstr) } } func view_count() { if (flush_) { return g.view_count() }else{ return 0 } } proc begin() { } proc flush() { draw() } proc save() {} endtemplate LogAvsX proc makelogax() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start an LogAvsX") return } hoc_obj_[0] = new LogAvsX() } neuron-7.5/share/lib/hoc/macload.hoc000077500000000000000000000000311323325274500174120ustar00rootroot00000000000000load_file("nrngui.hoc") neuron-7.5/share/lib/hoc/mkcurve.hoc000077500000000000000000000153301323325274500174760ustar00rootroot00000000000000begintemplate MakeCurve public vx, vy, b, map, g, set external hoc_obj_ objref vx, vy, g, b, this, edialog, tobj, exo, eyo strdef tstr, sval_, sres_ proc init() { rg_ = 0 hres_ = .1 vres_ = .01 variable_domain(&hres_, 0, 1e9) variable_domain(&vres_, 0, 1e9) ex_ = 0 ey_ = 0 i = 0 vx = new Vector(0) vx.append(0,10) vy = new Vector(2) vy.fill(0) build() if (numarg() == 0) { map() } } proc set() { vx.copy($o1) vy.copy($o2) vy.label($o2.label) draw() } proc build() { b = new HBox(3) b.save("save()") b.ref(this) b.intercept(1) g = new Graph() g.size(0,10, 0, 1) prune_menu(g) xpanel("") xvarlabel(sval_) xlabel("Control Points") g.menu_tool("Add/Move", "edit") // g.menu_tool("Add", "add") // g.menu_tool("Move", "move") g.menu_tool("Remove", "remove") g.menu_tool("Enter Value", "enter") // xcheckbox("Horizontal only", &honly_, "honly()") // xcheckbox("Vertical only", &vonly_, "vonly()") res() xvarlabel(sres_) xcheckbox("RightGroup", &rg_) xpanel() g.menu_action("Copy from Clipboard", "from_clip()") g.menu_action("Set Resolution", "set_res()") b.intercept(0) edialog = new VBox() edialog.intercept(1) xpanel("") exo = new ValueFieldEditor("x", &ex_, 1, "edact()") eyo = new ValueFieldEditor("y", &ey_, 1, "edact()") xpanel() edialog.intercept(0) } proc prune_menu() { $o1.menu_remove("Plot what?") $o1.menu_remove("Color/Brush") $o1.menu_remove("Keep Lines") $o1.menu_remove("Family Label?") $o1.menu_remove("Erase") $o1.menu_remove("Move Text") $o1.menu_remove("Change Text") $o1.menu_remove("Delete") } proc from_clip() { if (object_id(hoc_obj_[0]) != 0) { vx = hoc_obj_[1].c vy = hoc_obj_[0].c draw() } } proc map() { sprint(tstr, "%s", this) if (numarg() > 1) { b.map(tstr, $2, $3, $4, $5) }else{ b.map(tstr) } g.exec_menu("Add/Move") draw() } proc honly() { if (honly_) { vonly_ = 0 } } proc vonly() { if (vonly_) { honly_ = 0 } } proc sval() { if ($1 >= 0 && $1 < vx.size) { sprint(sval_, "(%g, %g)", vx.x[ipt], vy.x[ipt]) }else{ sval_ = "" } } proc draw() {local i, x, y g.erase() vy.line(g, vx) vy.mark(g, vx, "s", 8) for i=0, vx.size-2 { x = (vx.x[i] + vx.x[i+1])/2 y = (vy.x[i] + vy.x[i+1])/2 g.mark(x, y, "S", 4, 2, 1) } g.flush() } proc edit() {local i, x, y, d, dmin, imin, type if ($1 == 2) { type = 0 imin = 0 dmin = dist2(0, $2, $3, vx.x[0], vy.x[0]) for i=1, vx.size-1 { d = dist2(0, $2, $3, vx.x[i], vy.x[i]) if (d < dmin) { imin = i dmin = d type = 0 } d = dist2(0, $2, $3, (vx.x[i-1] + vx.x[i])/2, (vy.x[i-1] + vy.x[i])/2) if (d < dmin) { imin = i dmin = d type = 1 } } if (type == 0) { ipt = imin }else{ vx.insrt(imin, $2) vy.insrt(imin, $3) ipt = imin } setxy(ipt, $2, $3) draw() }else{ move($1, $2, $3, $4) } } proc add() {local i if ($1 == 2) { $2 = round($2, hres_) $3 = round($3, vres_) i = vx.indwhere(">", $2) if (i == -1) { vx.append($2) vy.append($3) ipt = vx.size - 1 }else{ vx.insrt(i, $2) vy.insrt(i, $3) ipt = i } setxy(ipt, $2, $3) draw() sval(ipt) }else{ move($1,$2,$3,$4) } } // dist2(fixed, x, y, x1, y1, Graph) // pixel coordinate square cartesian distance between point // (assumes the mouse was last in Graph) // if (x,y) is within a character size of (x1,y1) return true // fixed = 1 means x1,y1 are window coords ranging from 0,1, otherwise // model coords. func dist2() { local x, y, x1, y1 iview = g.view_info() if (iview == -1) { return 0 } x = g.view_info(iview, 13, $2) y = g.view_info(iview, 14, $3) h = g.view_info(iview, 15)/2 if ($1 == 0) { x1 = g.view_info(iview, 13, $4) y1 = g.view_info(iview, 14, $5) }else{ x1 = g.view_info(iview, 3)*$4 y1 = g.view_info(iview, 4)*(1-$5) } x1 -= x y1 -= y return x1*x1 + y1*y1 } func nearest() {local i i = vx.indwhere(">", $1) if (i == -1) { return vx.size - 1 }else if (i == 0) { return i }else if ((vx.x[i] - $1) > ($1 - vx.x[i-1])) { return i - 1 }else{ return i } } proc move() {local i if (vx.size == 0) return if ($1 == 2) { ipt = nearest($2) } setxy(ipt, $2, $3) draw() if ($1 == 3) { sval(-1) }else{ sval(ipt) } } proc remove() { if (vx.size == 0) return if ($1 == 3) { if (ipt >= 0) { vx.remove(ipt) vy.remove(ipt) } draw() sval(-1) }else{ ipt = nearest($2) draw() if ($2 < vx.x[0] - hres_ || $2 > vx.x[vx.size-1] + hres_ ) { ipt = -1 }else{ g.mark(vx.x(ipt), vy.x(ipt), "S", 8, 2, 1) } sval(ipt) } } proc res() { sprint(sres_, "Resolution %g %g", hres_, vres_) } func round() {local x if ($2 > 0) { x = $1 + $2/2 return x - x%$2 } return $1 } proc set_res() {local x, y x = hres_ y = vres_ tobj = new VBox() tobj.intercept(1) xpanel("") xpvalue("Horizontal", &hres_, 1) xpvalue("Vertical", &vres_, 1) xpanel() tobj.intercept(0) sprint(tstr, "Enter x and y grid resolution") if (tobj.dialog(tstr) == 0) { hres_ = x vres_ = y } res() objref tobj } proc setxy() {local i, dx, dy $2 = round($2, hres_) $3 = round($3, vres_) dx = 0 dy = 0 // do not allow moving past adjacent points if (vonly_ == 0) { if ($1 > 0) if ($2 < vx.x[ipt-1]) $2 = vx.x[ipt-1]+1e-6 if (!rg_) if ($1 < vx.size - 1) if ($2 > vx.x[ipt+1]) $2 = vx.x[ipt+1]-1e-6 dx = $2 - vx.x[ipt] vx.x[ipt] = $2 } if (honly_ == 0) { dy = $3 - vy.x[ipt] vy.x[ipt] = $3 } if (rg_) { for i=ipt+1, vx.size-1 { vx.x[i] += dx vy.x[i] += dy } } } proc edact() { setxy(ipt, ex_, ey_) ex_ = vx.x[ipt] ey_ = vy.x[ipt] draw() g.mark(vx.x[ipt], vy.x[ipt], "S", 8, 2, 1) sval(ipt) } proc enter() { local i, x, y if (vx.size == 0) return if ($1 == 3) { if (ipt >= 0) { ex_ = x = vx.x[ipt] ey_ = y = vy.x[ipt] exo.default eyo.default sprint(tstr, "Enter coords for point %d at (%g, %g)", ipt, x, y) doNotify() if (edialog.dialog(tstr) == 0) { vx.x[ipt] = x vy.x[ipt] = y } } draw() sval(-1) }else{ ipt = nearest($2) draw() if ($2 < vx.x[0] - hres_ || $2 > vx.x[vx.size-1] + hres_ ) { ipt = -1 }else{ g.mark(vx.x(ipt), vy.x(ipt), "S", 8, 2, 1) } sval(ipt) } } proc save() {local i b.save("load_file(\"mkcurve.hoc\", \"MakeCurve\")\n}\n{") b.save("ocbox_=new MakeCurve(1)") b.save("}\n{object_push(ocbox_)}") sprint(tstr, "{honly_=%g vonly_=%g hres_=%g vres_=%g res()}", honly_, vonly_, hres_, vres_) b.save(tstr) sprint(tstr, "{vx.resize(%d) vy.resize(%d)}", vx.size, vy.size) b.save(tstr) sprint(tstr, "for i=0,%d { vx.x[i]=fscan() vy.x[i]=fscan()}",\ vx.size-1) b.save(tstr) for i=0, vx.size-1 { sprint(tstr, "%g %g", vx.x[i], vy.x[i]) b.save(tstr) } b.save("{draw() object_pop()}\n{") g.save_name("ocbox_.g", 1) } endtemplate MakeCurve objref tobj proc makeMakeCurve() { tobj = new MakeCurve() objref tobj } neuron-7.5/share/lib/hoc/mknrndll.hoc000077500000000000000000000050761323325274500176510ustar00rootroot00000000000000xpanel("") xbutton("nothing", "print 1") xpanel(5000, 5000) show_winio(0) {load_file("stdlib.hoc", "String")} objref rwl_, rwf_, sf_, tobj, box objref ldfile strdef tstr, rwdname, path sprint(path, "%s", getcwd()) ldfile = new File() sf_ = new StringFunctions() if (unix_mac_pc() == 1) { rwdname = "$(HOME)/.NRNWorkingDirs" }else{ rwdname = "$(NEURONHOME)/RecentWorkingDirs" } proc filemenu() { box = new VBox() box.intercept(1) xpanel("") xmenu("Recent directories", "recent_working_dirs()") xmenu() xpanel() box.intercept(0) } proc doit() {local b filemenu() while (1) { index = -1 b = box.dialog("Choose directory (containing .mod files) for creating nrnmech.dll", "Choose directory", "Quit") if (b == 0) { break } if (index != -1) { chdir(rwl_.object(index).s) } change_working_dir() } quit() } proc change_working_dir() { ldfile.chooser("d", "Directory", "", "Make nrnmech.dll", "Cancel", getcwd()) if (ldfile.chooser()) { read_recent_working_dirs() if (change_working_dir1(ldfile.dir)) { exec() } } } func change_working_dir1() { if(chdir($s1) != 0) { sprint(tstr, "No such directory: %s", $s1) continue_dialog(tstr) return 0 } sprint(path, "%s", getcwd()) write_recent_working_dirs() return 1 } proc read_recent_working_dirs() {local i rwf_ = new File() rwl_ = new List() if (rwf_.ropen(rwdname)) { while (!rwf_.eof()) { rwf_.gets(tstr) sf_.left(tstr, sf_.len(tstr) - 1) tobj = new String(tstr) rwl_.append(tobj) } rwf_.close() } } proc write_recent_working_dirs() {local i rwf_ = new File() if (rwf_.wopen(rwdname)) { rwf_.printf("%s\n", path) for i=0, rwl_.count-1 { if (strcmp(path, rwl_.object(i).s) != 0) { rwf_.printf("%s\n", rwl_.object(i).s) if (i > 10) break } } rwf_.close() } } proc recent_working_dirs() {local i read_recent_working_dirs() for i=0, rwl_.count-1 { //sprint(tstr, "change_working_dir2(%d)", i) sprint(tstr, "index=%d box.unmap(1)", i) xbutton(rwl_.object(i).s, tstr) } } proc exec() {localobj s1, s2 chdir(path) if (sf_.substr(nrnversion(8), "mingw") > 0) { s1 = new String() s2 = new String() sscanf(neuronhome(), "%[^:]:%s", s1.s, s2.s) sprint(s1.s, "/%s%s", s1.s, s2.s) sprint(tstr, "%s/mingw/bin/sh %s/lib/mknrndll.sh %s", neuronhome(), neuronhome(), s1.s) print tstr system(tstr) quit() }else{ sprint(tstr, "%s\\bin\\mintty -c %s/lib/minttyrc %s/bin/bash --rcfile %s/lib/nrnstart.bsh %s/lib/mknrndll.sh %s", neuronhome(1), neuronhome(), neuronhome(), neuronhome(), neuronhome(), neuronhome()) print tstr WinExec(tstr) quit() } } doit() neuron-7.5/share/lib/hoc/modlunit.hoc000077500000000000000000000062741323325274500176640ustar00rootroot00000000000000// check units on selected .mod files // bug on some machines requires that a window exists before a dialog xpanel("") xbutton("nothing", "print 1") xpanel(5000, 5000) show_winio(0) {load_file("stdlib.hoc", "String")} objref rwl_, rwf_, sf_, tobj, box objref ldfile strdef tstr, rwdname, path, fname sprint(path, "%s", getcwd()) ldfile = new File() sf_ = new StringFunctions() if (unix_mac_pc() == 1) { rwdname = "$(HOME)/.NRNWorkingDirs" }else{ rwdname = "$(NEURONHOME)/RecentWorkingDirs" } proc filemenu() {localobj s box = new VBox() box.intercept(1) xpanel("") xmenu("Recent directories", "recent_working_dirs()") xmenu() xlabel("An alternative to this selection tool is to") xlabel("start a shell or dos box, move to a directory") xlabel("containing .mod files, and execute") s = new String("bin") if (sf_.substr(nrnversion(6), "host=x86_64-w64-mingw32") > 0) { s.s = "bin64" } sprint(tstr, " %s/%s/modlunit file.mod", neuronhome(), s.s) xlabel(tstr) xpanel() box.intercept(0) } proc doit() {local b filemenu() while (1) { index = -1 b = box.dialog("Choose directory for checking mod files", "Choose directory", "Quit") if (b == 0) { break } if (index != -1) { chdir(rwl_.object(index).s) } change_working_dir() } quit() } proc change_working_dir() { ldfile.chooser("d", "Directory", "", "Selected Directory", "Cancel", getcwd()) if (ldfile.chooser()) { read_recent_working_dirs() if (change_working_dir1(ldfile.dir)) { checker() } } } func change_working_dir1() { if(chdir($s1) != 0) { sprint(tstr, "No such directory: %s", $s1) continue_dialog(tstr) return 0 } sprint(path, "%s", getcwd()) write_recent_working_dirs() return 1 } proc read_recent_working_dirs() {local i rwf_ = new File() rwl_ = new List() if (rwf_.ropen(rwdname)) { while (!rwf_.eof()) { rwf_.gets(tstr) sf_.left(tstr, sf_.len(tstr) - 1) tobj = new String(tstr) rwl_.append(tobj) } rwf_.close() } } proc write_recent_working_dirs() {local i rwf_ = new File() if (rwf_.wopen(rwdname)) { rwf_.printf("%s\n", path) for i=0, rwl_.count-1 { if (strcmp(path, rwl_.object(i).s) != 0) { rwf_.printf("%s\n", rwl_.object(i).s) if (i > 10) break } } rwf_.close() } } proc recent_working_dirs() {local i read_recent_working_dirs() for i=0, rwl_.count-1 { //sprint(tstr, "change_working_dir2(%d)", i) sprint(tstr, "index=%d box.unmap(1)", i) xbutton(rwl_.object(i).s, tstr) } } proc exec() {localobj s1, s2 if (sf_.substr(nrnversion(8), "mingw") > 0) { s1 = new String() s2 = new String() sscanf(neuronhome(), "%[^:]:%s", s1.s, s2.s) sprint(s1.s, "/%s%s", s1.s, s2.s) sprint(tstr, "%s/mingw/bin/sh %s/lib/modlunit.sh %s %s", neuronhome(), neuronhome(), s1.s, $s1) // print tstr system(tstr) }else{ sprint(tstr, "%s\\bin\\mintty -c %s/lib/minttyrc %s/bin/bash --rcfile %s/lib/nrnstart.bsh %s/lib/modlunit.sh %s %s", neuronhome(1), neuronhome(), neuronhome(), neuronhome(), neuronhome(), neuronhome(), $s1) print tstr WinExec(tstr) } } proc checker() { chdir(path) ldfile.chooser("", "Check Units for:", "*.mod", "Check Units", "Quit", getcwd()) while (ldfile.chooser()) { ldfile.getname(fname) exec(fname) } quit() } doit() neuron-7.5/share/lib/hoc/movierun.hoc000077500000000000000000000020561323325274500176670ustar00rootroot00000000000000movie_frame_dur_ = .01 {variable_domain(&movie_frame_dur_, .001, 1e9) units(&movie_frame_dur_, "s")} objref movie_timer, movierunbox proc moviestep() { steprun() realtime = startsw() - rtstart if (t >= tstop || stoprun) { movie_timer.end running_ = 0 } } proc movierun() { if (object_id(movie_timer) == 0) { movie_timer = new Timer("moviestep()")} realtime = 0 rtstart = startsw() running_ = 1 // run button checkbox stoprun = 0 stdinit() movie_timer.seconds(movie_frame_dur_) movie_timer.start } proc movierunpanel() {localobj b movie_timer = new Timer("moviestep()") b = new VBox(3) movierunbox = b b.save("movierunsave()") b.intercept(1) xpanel("Movie Run") xbutton("Init & Run", "movierun()") xpvalue("Seconds per step", &movie_frame_dur_, 1) xpanel() b.intercept(0) if (numarg() == 0) { b.map("Movie Run", 400, 300, 280, 85) } } proc movierunsave() {localobj b, s b = movierunbox s = new String() sprint(s.s, "movie_frame_dur_ = %g\n", movie_frame_dur_) b.save(s.s) b.save("movierunpanel(0)") b.save("ocbox_ = movierunbox") } neuron-7.5/share/lib/hoc/mulfit.hoc000077500000000000000000000020611323325274500173170ustar00rootroot00000000000000{load_file("$(NEURONHOME)/lib/hoc/stdgui.hoc", "nrnmainmenu")} objref parmfitness_efun_list_, parmfitness_generator_list_ objref mulfit_optimizers_, mulfit_optimizer_names_ parmfitness_efun_list_ = new List() parmfitness_generator_list_ = new List() mulfit_optimizers_ = new List() mulfit_optimizer_names_ = new List() proc parmfitness_efun_append() { parmfitness_efun_list_.append(new String($s1)) } proc parmfitness_generator_append() { parmfitness_generator_list_.append(new String($s1)) } proc mulfit_optimizers_append() { mulfit_optimizer_names_.append(new String($s1)) mulfit_optimizers_.append(new String($s2)) } { xopen("mulfit/protorun.hoc") xopen("mulfit/e_norm.hoc") xopen("mulfit/e_actpot.hoc") xopen("mulfit/e_y.hoc") xopen("mulfit/e_xy.hoc") xopen("mulfit/clampfit.hoc") xopen("mulfit/eonerun.hoc") xopen("mulfit/eonefunc.hoc") xopen("mulfit/eoneprim.hoc") xopen("mulfit/eparmlst.hoc") xopen("mulfit/fitparm.hoc") xopen("mulfit/optwrap.hoc") xopen("mulfit/mulfit1.hoc") } objref tobj proc makemulrunfitter() { tobj = new MulRunFitter() objref tobj } neuron-7.5/share/lib/hoc/mulfit/000077500000000000000000000000001323325274500166225ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/mulfit/Makefile.am000077500000000000000000000005601323325274500206620ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocmulfitdir = $(neuronhomehocdir)/mulfit neuronhomehocmulfit_DATA = e_actpot.hoc e_norm.hoc e_xy.hoc e_y.hoc \ eonefunc.hoc eoneprim.hoc eonerun.hoc eparmlst.hoc fitparm.hoc optwrap.hoc \ mulfit1.hoc protorun.hoc clampfit.hoc EXTRA_DIST = $(neuronhomehocmulfit_DATA) neuron-7.5/share/lib/hoc/mulfit/Makefile.in000066400000000000000000000446371323325274500207050ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/mulfit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehocmulfitdir)" DATA = $(neuronhomehocmulfit_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocmulfitdir = $(neuronhomehocdir)/mulfit neuronhomehocmulfit_DATA = e_actpot.hoc e_norm.hoc e_xy.hoc e_y.hoc \ eonefunc.hoc eoneprim.hoc eonerun.hoc eparmlst.hoc fitparm.hoc optwrap.hoc \ mulfit1.hoc protorun.hoc clampfit.hoc EXTRA_DIST = $(neuronhomehocmulfit_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/mulfit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/mulfit/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehocmulfitDATA: $(neuronhomehocmulfit_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehocmulfit_DATA)'; test -n "$(neuronhomehocmulfitdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehocmulfitdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehocmulfitdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehocmulfitdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehocmulfitdir)" || exit $$?; \ done uninstall-neuronhomehocmulfitDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehocmulfit_DATA)'; test -n "$(neuronhomehocmulfitdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehocmulfitdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomehocmulfitdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomehocmulfitDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomehocmulfitDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehocmulfitDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomehocmulfitDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/mulfit/clampfit.hoc000077500000000000000000000204721323325274500211240ustar00rootroot00000000000000parmfitness_efun_append("ClampFitness") begintemplate ClampFitness public efun, g, boundary, weight, set_data, set_modelx, rfile, wfile, dw_,ydat_ public unmap, map, vbox, use_x, tag, xvec, yvec, xdat, ydat, xdat_, have_data public before_run, sref, mintstop public clone, scale, build, get_stable_context public save_context, restore_context external stdrun_quiet objref boundary, weight objref xdat, vdat, ydat // authoritative data, ydat a synonym for vdat objref xvec, yvec, xdat_, vdat_, dw_ // interpolated data consistent with model x values objref g, vbox, tobj, this, cur, clamp, zerovec, varptr, sf, sref, nil strdef tstr, mserrlabel, scalelabel, tag i=0 x=0 func efun() { local e // the least squares error function. // if xdat_ does not correspond to $o1 x values then should // re-interpolate vdat_, xdat_, and re-calculate dw_ if (have_data && vdat_.size > 0) { e = cur.meansqerr(zerovec, dw_) }else{ e = 0 } if (use_gui) { sprint(mserrlabel, "%g", e) if (stdrun_quiet == 0) { redraw(xdat_, cur) } } after_run() return scale*e } func mintstop() { return clamp.off } proc before_run() {local x if ($o1 != varptr) { if (locate_clamp($o1) == 0) { return } } clamp.switched_on = 1 clamp.on = xdat_.x[0] clamp.off = xdat_.x[xdat_.size-1] cur.record(&clamp.i, xdat_) vdat_.play(&clamp.vc, xdat_) } proc after_run() { clamp.switched_on = 0 vdat_.play_remove cur.play_remove } func locate_clamp() { sf.tail($o1.s, "\\.v[^a-zA-Z0-9_]", tstr) sscanf(tstr, "%f", &x) sf.head($o1.s, "\\.v", tstr) sprint(tstr, "%s %s.sref = new SectionRef()", tstr, this) if(execute1(tstr) == 0) { sprint(tstr, "%s is not in form section.v(x)", $o1.s) continue_dialog(tstr) return 0 } varptr = $o1 sref.sec { if (clamp == nil) { clamp = new OClamp(x) }else{ clamp.loc(x) } } return 1 } proc save_context() { $o1.pack(tag, scale, vdat, vdat.label, xdat, boundary, weight) } proc restore_context() { $o1.unpack(tag, &scale, vdat) $o1.unpack(tstr, xdat) vdat.label(tstr) set_data(xdat, vdat) $o1.unpack(boundary, weight) set_w() } proc init() {local i sf = new StringFunctions() sprint(tag, "%s", this) sscanf(tag, "%[^[]", tag) use_x = 1 use_gui = 0 have_data = 0 have_modelx = 0 xdat = new Vector(0) vdat = new Vector(0) ydat = vdat xvec = new Vector(0) yvec = new Vector(0) zerovec = new Vector(0) cur = new Vector(0) scale=1 init_weights(1) } proc clone() { $o1 = new ClampFitness() $o1.have_data = have_data $o1.boundary = boundary.c $o1.weight = weight.c if (have_data) { $o1.set_data(xdat, vdat) ydat = vdat } $o1.scale = scale sprint(scalelabel, "scale=%g ", scale) } proc redraw() {local ymin, ymax if (use_gui) { g.erase() if (have_data) { g.label(.8, .95) vdat.plot(g, xdat, 2, 1) // ymin = vdat.min() // ymax = vdat.max() for j=0, boundary.size() - 1 { g.beginline(3, 1) g.line(boundary.x[j], g.size(3)) g.line(boundary.x[j], g.size(4)) } if (numarg() == 2) { $o2.line(g, $o1) } } g.flush() } } proc set_data() {local i have_data = 0 i = $o1.indwhere(">=", 0) if (i < 0 || $o1.size < 1) return xdat = $o1.c(i) vdat = $o2.cl(i) ydat = vdat if (have_data == 0) { have_data = 1 init_weights(1) } xdat_ = xdat.c vdat_ = vdat.c xvec = xdat yvec = vdat dw_ = new Vector(xdat.size) have_modelx = 1 if (use_gui) { g.size(xdat.min(), xdat.max(), vdat.min(), vdat.max()) redraw() } set_w() } proc set_modelx() {local n, i, j, theta xdat_ = $o1 have_modelx = 1 n = xdat_.size vdat_ = new Vector(n) j = 0 //xdat's before and after xdat will have weight 0 anyway. while(xdat_.x[j] < xdat.x[0]) { j += 1 if (j >= n) break } for i=1, xdat.size-1 { if (j >= n) break while (xdat_.x[j] >= xdat.x[i-1] && xdat_.x[j] <= xdat.x[i]){ // linear interpolation theta = (xdat.x[i] - xdat.x[i-1]) theta = (xdat_.x[j] - xdat_.x[i-1])/theta vdat_.x[j] = (1-theta)*vdat.x[i-1] + theta*vdat.x[i] j += 1 if (j >= n) break } } set_w() } proc clipboard_data() { sprint(tstr, "%s.set_data(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc build() { if (use_gui) return use_gui = 1 vbox = new VBox() vbox.ref(this) sprint(tstr, "execute(\"%s.unmap()\")", this) vbox.dismiss_action(tstr) vbox.save("save()") vbox.intercept(1) xpanel("", 1) xmenu("Regions") xbutton("Data Weights", "weight_panel()") xbutton("Copy data weights", "copy_weights()") xmenu("Number of Data Regions") xbutton("1", "init_weights(1)") xbutton("2", "init_weights(2)") xbutton("3", "init_weights(3)") xbutton("4", "init_weights(4)") xbutton("5", "init_weights(5)") xbutton("one more", "init_weights(0)") xbutton("one fewer", "init_weights(-1)") xmenu() xmenu() mserrlabel="MeanSqErr xxxxxxxxxxx" sprint(scalelabel, "scale= %g ", scale) xvarlabel(scalelabel) xvarlabel(mserrlabel) xpanel() g = new Graph() if (have_data) { g.size(xdat.min(), xdat.max(), vdat.min(), vdat.max()) } g.menu_tool("Adjust Weight Regions", "adjust_weights") g.menu_action("Data from Clipboard", "clipboard_data()") vbox.intercept(0) } proc map() { if (!use_gui) build() if (numarg() > 1) { vbox.map($s1, $2, $3, $4, $5) }else if (numarg() == 1){ vbox.map($s1) }else{ vbox.map() } redraw() } proc unmap() { } proc wfile() {local i $o1.printf("ClampFitness xdat vdat boundary weight (lines=%d) %g\n",\ 4 + 2*xdat.size + 2*boundary.size, scale) $o1.printf("|%s|\n", vdat.label) $o1.printf("%d\n", xdat.size) xdat.printf($o1) vdat.printf($o1) $o1.printf("%d\n", boundary.size) boundary.printf($o1) weight.printf($o1) } proc rfile() {local i, n scale = $o1.scanvar sprint(scalelabel, "scale=%g", scale) $o1.gets(tstr) if (sscanf(tstr, "|%[^|]", tstr) == 1) { vdat.label(tstr) } n = $o1.scanvar if (n > 0) { xdat.resize(n) vdat.resize(n) xdat.scanf($o1, n) vdat.scanf($o1, n) set_data(xdat, vdat) } n = $o1.scanvar boundary = new Vector(n) boundary.scanf($o1, n) weight = new Vector(n) weight.scanf($o1, n) set_w() } proc init_weights() {local i, n, min, max if (numarg() == 1) { if ($1 == 0) { // one more n = boundary.size }else if ($1 == -1) { // one fewer n = boundary.size-2 if (n < 1) n = 1 }else{ n = $1 } }else{ n = 1 } boundary = new Vector(n+1) weight = new Vector(n+1, 1) if (have_data) { min = xdat.x[0] max = xdat.x[xdat.size-1] boundary.indgen(min, (max-min)/n) set_w() } } proc weight_panel() {local i xpanel("data weights") xpvalue("Total weight (scale)", &scale, 1, "sprint(scalelabel, \"scale=%g \", scale)") xpvalue("interval 1 startpoint", &boundary.x[0], 1, "set_w()") for i=1, boundary.size() - 1 { sprint(tstr, "interval %d endpoint", i) xpvalue(tstr, &boundary.x[i], 1, "set_w()") sprint(tstr, "interval %d weight", i) xpvalue(tstr, &weight.x[i], 1, "set_w()") } xpanel() } proc set_w() {local i, j, t, w, d, tmin, tmax, n, res if (have_data){ // make sure weight regions are within boundaries tmin = xdat.x[0] tmax = xdat.x[xdat.size - 1] n = boundary.size() for i=0, n-1 { t = boundary.x[i] if (t < tmin) { boundary.x[i] = tmin } if (t > tmax) { boundary.x[i] = tmax } } } if (have_modelx) { dw_.resize(xdat.size) j = 0 tmax = boundary.x[0] w = 0 for i=0, dw_.size - 1 { t = xdat.x[i] while ((t > tmax && j < n) || (t == tmax && i == 0)) { j += 1 if (i > 0) { boundary.x[j-1] = (t + xdat.x[i-1])/2 }else{ boundary.x[j-1] = t } if (j >= n) { tmax = 1e9 w = 0 break } tmax = boundary.x[j] d = boundary.x[j] - boundary.x[j-1] if (d <= 0) { continue } w = weight.x[j]/d } dw_.x[i] = w } // throw out the 0 weight points. tobj = dw_.c.indvwhere(">", 0) dw_.index(dw_.c, tobj) xdat_.index(xdat, tobj) vdat_.index(vdat, tobj) zerovec.resize(xdat_.size).fill(0) w = dw_.sum() if (w > 0) { dw_.mul(dw_.size/w) } } redraw() } proc adjust_weights() { //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_weight($2) } if (adjust == -1) { return } if ($1 == 1) { // drag boundary.x[adjust] = $2 set_w() } if ($1 == 3) { // release boundary.sort() set_w() adjust = -1 } } func pick_weight() {local i, j, x, m m = 1e9 for i=0, boundary.size() - 1 { x = abs($1 - boundary.x[i]) if (x < m) { m = x j = i } } return j } endtemplate ClampFitness neuron-7.5/share/lib/hoc/mulfit/e_actpot.hoc000077500000000000000000000225161323325274500211240ustar00rootroot00000000000000/* A primitive error function class for multiple run fitter must have a func efun(y_vec, x_vec) which is the simulation result of the run. Also, it should register itself with a call to parmfitness_efun_append("classname"). Finally it should supply rfile and wfile procedures for saving its state. */ /* fitness features useful for an action potential we imagine that there is one point on the AP which is used to locate the AP on the x-axis (eg the peak or some point on the rise) and then there are a two sets of points with relative-x values. In the first set the error is the relative x-difference between fixed y values and in the second set the error is the absolute y-difference between fixed relative x values. y-values with absolute and a set of relative x-values points w = yvec.width(xvec, yval) fitness = yvec.xfitness(xvec, xpeak, yval_list, xrel_list) fitness = yvec.yfitness(xvec, xpeak, ydata_list, xrel_list) peakindex = yvec.maxind peak = yvec.max xpeak = xvec.x[yvec.maxind] xloc = xvec.x[yvec.where(">=", yval)] /* /* error is independent of position of Action potential peak */ {install_vector_fitness()} parmfitness_efun_append("APFitness") begintemplate APFitness public efun, g, set_data, set_modelx, xdat, ydat, idx_, peak, have_data public unmap, map, vbox, rfile, wfile, use_x, peakscale, xscale, yscale, tag public clone, build, before_run, mintstop public save_context, restore_context objref xdat, ydat // authoritative data objref xdat_[2], ydat_[2], idx_[2] // subset of data points to fit // 0 refers to error in y and 1 refers to error in x objref g, vbox, tobj, this strdef tstr, mserrlabel, modelabel, scalelabel, tag external clipboard_set, clipboard_get i=0 proc before_run() {} func efun() { local e // the least squares error function. peak = $o2.x[$o1.firstpeak] e = peak - xpeak e = peakscale*e*e if (xdat_[0].size > 0) { e += yscale*$o1.yfitness($o2, peak, ydat_[0], xdat_[0]) } if (xdat_[1].size > 0) { e += xscale*$o1.xfitness($o2, peak, ydat_[1], xdat_[1]) } if (use_gui) { sprint(mserrlabel, "%g", e) redraw($o2, $o1) } return e } proc save_context() { $o1.pack(tag, peakscale, xscale, yscale, ydat, ydat.label, xdat) $o1.pack(idx_[0], idx_[1]) } proc restore_context() { $o1.unpack(tag, &peakscale, &xscale, &yscale, ydat) $o1.unpack(tstr, xdat) ydat.label(tstr) set_data(xdat, ydat) $o1.unpack(idx_[0], idx_[1]) setxy() } proc init() {local i sprint(tag, "%s", this) sscanf(tag, "%[^[]", tag) use_x = 0 use_gui = 0 have_data = 0 xdat = new Vector(0) ydat = new Vector(0) for i=0,1 { idx_[i] = new Vector(0) xdat_[i] = new Vector(0) ydat_[i] = new Vector(0) } xpeak = 0 setmode(0) peakscale=1 xscale=1 yscale=.1 sprint(scalelabel, "peakscale=%g xscl=%g yscl=%g", peakscale, xscale, yscale) } proc clone() { $o1 = new APFitness() $o1.have_data = have_data if (have_data) { $o1.set_data(xdat, ydat) } $o1.set_modelx(idx_[0], idx_[1]) $o1.peakscale = peakscale $o1.xscale = xscale $o1.yscale = yscale sprint(scalelabel, "peakscale=%g xscl=%g yscl=%g", peakscale, xscale, yscale) } proc redraw() { if (use_gui) { g.erase() if (have_data) { g.label(.8, .95) ydat.plot(g, xdat, 2, 1) ydat_[0].mark(g, xdat_[0].c.add(xpeak),"|",12, 3, 1) ydat_[1].mark(g, xdat_[1].c.add(xpeak),"-", 14, 3, 1) } if (numarg() == 2) { $o2.line(g, $o1) } g.flush() } } proc set_data() {local i have_data = 0 i = $o1.indwhere(">=", 0) if (i < 0 || $o1.size < 1) return xdat = $o1.c(i) ydat = $o2.cl(i) have_data = 1 xpeak = xdat.x[ydat.max_ind] if (use_gui) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } } proc set_modelx() {local n, i, j, theta idx_[0] = $o1.c idx_[1] = $o2.c setxy() } func mintstop() { return mintstop_ } proc setxy() {local i mintstop_ = 0 for i=0, 1 { xdat_[i].index(xdat, idx_[i]) xdat_[i].sub(xpeak) ydat_[i].index(ydat, idx_[i]) if (mintstop_ < xdat_[i].x[xdat_[i].size-1]) { mintstop_ = xdat_[i].x[xdat_[i].size-1] } } mintstop_ += xpeak // not enough if the simulation peak is too past the data // in that case should make tstop explicitly long enough in the RunControl redraw() } proc clipboard_data() { sprint(tstr, "%s.set_data(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc build() { if (use_gui) return use_gui = 1 vbox = new VBox(3) vbox.ref(this) sprint(tstr, "execute(\"%s.unmap()\")", this) vbox.dismiss_action(tstr) vbox.save("save()") vbox.intercept(1) xpanel("", 1) xmenu("Select") xradiobutton("Error in X-direction", "setmode(1)") xradiobutton("Error in Y-direction", "setmode(0)") xbutton("Copy x,y subsets", "copy_points()") xbutton("Paste x,y subsets", "paste_points()") xbutton("peak, x and y error factors", "scale()") xmenu() xvarlabel(modelabel) xvarlabel(scalelabel) mserrlabel="MeanSqErr xxxxxxxxxxx" xvarlabel(mserrlabel) xpanel() g = new Graph() if (have_data) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } g.menu_tool("Add Point","add_point") g.menu_tool("Move Point","move_point") g.menu_tool("Remove Point","remove_point") g.menu_action("Data from Clipboard", "clipboard_data()") vbox.intercept(0) } proc scale() {local x, y, ps ps = peakscale x = xscale y = yscale sprint(tstr, "%g %g %g", peakscale, xscale, yscale) while (1) { if (string_dialog("Enter space separated peak x and y error scale factors",tstr)){ if (sscanf(tstr, "%g %g %g", &peakscale, &xscale, &yscale) == 3) { sprint(scalelabel, "peakscale=%g xscl=%g yscl=%g", peakscale, xscale, yscale) return } }else{ break } } peakscale = ps xscale = x yscale = y } proc copy_points() { clipboard_set(xdat_[0], xdat_[1]) } proc paste_points() {local i clipboard_get(xdat_[0], xdat_[1]) for i=0,1 { xdat_[i].add(xpeak) idx_[i] = xdat.c.indgen idx_[i].interpolate(xdat_[i], xdat).add(.5) } setxy() } proc setmode() { mode = $1 if (mode == 0) { sprint(modelabel, "(Y subset)") }else{ sprint(modelabel, "(X subset)") } } proc map() { if (!use_gui) build() if (numarg() > 1) { vbox.map($s1, $2, $3, $4, $5) }else if (numarg() == 1){ vbox.map($s1) }else{ vbox.map() } } proc unmap() { } proc save() {local i vbox.save("load_file(\"e_actpot.hoc\", \"APFitness\")}\n{") vbox.save("ocbox_=new APFitness(1)") vbox.save("}\n{object_push(ocbox_)}\n{build()") if (object_id(xdat)) { sprint(tstr, "xdat = new Vector(%d)", xdat.size) vbox.save(tstr) sprint(tstr, "ydat = new Vector(%d)", ydat.size) vbox.save(tstr) sprint(tstr, "ydat.label(\"%s\")", ydat.label) vbox.save(tstr) sprint(tstr, "for i=0,%d { xdat.x[i]=fscan() ydat.x[i]=fscan()}}",\ xdat.size - 1) vbox.save(tstr) for i=0,xdat.size-1 { sprint(tstr, "%g %g", xdat.x[i], ydat.x[i]) vbox.save(tstr) } vbox.save("{set_data(xdat, ydat)}") if (idx_[0].size > 0) { sprint(tstr, "idx_[0] = new Vector(%d)", idx_[0].size) vbox.save(tstr) sprint(tstr, "for i=0,%d { idx_[0].x[i]=fscan()}", idx_[0].size - 1) vbox.save(tstr) for i=0,idx_[0].size-1 { sprint(tstr, "%g", idx_[0].x[i]) vbox.save(tstr) } vbox.save("{setxy()}") } if (idx_[1].size > 0) { sprint(tstr, "idx_[1] = new Vector(%d)", idx_[1].size) vbox.save(tstr) sprint(tstr, "for i=0,%d { idx_[1].x[i]=fscan()}", idx_[1].size - 1) vbox.save(tstr) for i=0,idx_[1].size-1 { sprint(tstr, "%g", idx_[1].x[i]) vbox.save(tstr) } vbox.save("{setxy()}") } }else{ vbox.save("}") } vbox.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) } proc add_point() {local i if ($1 == 2) { i = pick_x($2) idx_[mode].append(i) idx_[mode].sort() setxy() } } proc remove_point() { if ($1 == 2) { i = pick_point($2-xpeak) if (i >= 0) { idx_[mode].remove(i) setxy() } } } proc move_point() { //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_point($2-xpeak) } if (adjust == -1) { return } if ($1 == 1) { // drag idx_[mode].x[adjust] = pick_x($2) setxy() } if ($1 == 3) { // release idx_[mode].x[adjust] = pick_x($2) idx_[mode].sort() adjust = -1 setxy() } } func pick_x() {local i i = xdat.indwhere(">=", $1) if (i == -1) i = 0 return i } func pick_point() {local i, j, x, m if (idx_[mode].size == 0) return -1 i = xdat_[mode].indwhere(">=", $1) if (i == -1 && idx_[mode].size > 0) { return xdat_[mode].size-1 } d = ($1-xdat_[mode].x[i])^2 if (i > 0) { d1 = ($1-xdat_[mode].x[i-1])^2 if (d1 < d) { return i-1 } } if (i < xdat_[mode].size-1) { d1 = ($1-xdat_[mode].x[i+1])^2 if (d1 < d) { return i+1 } } return i } proc wfile() {local i $o1.printf("APFitness xdat ydat erry errx (lines=%d) %g %g %g\n",\ 8 + 2*xdat.size + idx_[0].size + idx_[1].size, peakscale,xscale,yscale) $o1.printf("|%s|\n", ydat.label) $o1.printf("%d\n", xdat.size) xdat.printf($o1) ydat.printf($o1) for i=0,1 { $o1.printf("%d\n", idx_[i].size) idx_[i].printf($o1) } } proc rfile() {local i, n peakscale = $o1.scanvar xscale = $o1.scanvar yscale = $o1.scanvar sprint(scalelabel, "peakscale=%g xscl=%g yscl=%g", peakscale, xscale, yscale) $o1.gets(tstr) if (sscanf(tstr, "|%[^|]", tstr) == 1) { ydat.label(tstr) } n = $o1.scanvar if (n > 0) { xdat.resize(n) ydat.resize(n) xdat.scanf($o1, n) ydat.scanf($o1, n) set_data(xdat, ydat) } for j=0, 1 { n = $o1.scanvar idx_[j].resize(n) idx_[j].scanf($o1, n) } setxy() } endtemplate APFitness neuron-7.5/share/lib/hoc/mulfit/e_norm.hoc000077500000000000000000000231661323325274500206070ustar00rootroot00000000000000/* error is weighted sum of normalized error in each region. Region i has weight[i] and domain boundary[i] < x < boundary[i+1]. Normalized region error is an approximation to the integral of (y(x) - ydat(x))^2 over the integral of x. The boundary and weight vectors are the only substantive variables owned by this class. Usage: 1) if using a gui, map a vbox by calling map(). The Graph is in the public variable g of this instance. Note that this graph menu contains some class dependent functionality. Although you may attach and detach this graph to the standard run system and graph some variable or expression, it is faster and probably better to plot the y model vector and flush the graph after a call to efun. 2)specify xdat and ydat by call to set_data(x, y) 3)specify boundaries and weights either by gui or by calling set_region(boundary, weight) where weight[1] is the weight for the region between boundary[0] and boundary[1]. Therfore weight[0] is unused. */ parmfitness_efun_append("RegionFitness") begintemplate RegionFitness public efun, g, boundary, weight, set_data, set_modelx, rfile, wfile, dw_,ydat_ public unmap, map, vbox, use_x, tag, xvec, yvec, xdat, ydat, xdat_, have_data public clone, scale, build, get_stable_context, before_run, mintstop public save_context, restore_context external stdrun_quiet, hoc_obj_ objref boundary, weight objref xdat, ydat // authoritative data objref xvec, yvec, xdat_, ydat_, dw_ // interpolated data consistent with model x values objref g, vbox, tobj, this strdef tstr1, mserrlabel, scalelabel, tag i=0 proc before_run() {} func efun() { local e // the least squares error function. // if xdat_ does not correspond to $o1 x values then should // re-interpolate ydat_, xdat_, and re-calculate dw_ if (have_data && ydat_.size > 0) { if (use_x == 1) { e = ydat_.meansqerr($o1, dw_) }else{ // printf("ydat_=%s xdat_=%s dw_=%s $o1=%s $o2=%s\n", ydat_, xdat_, dw_,$o1,$o2) hoc_obj_ = $o1.c hoc_obj_[1] = $o2.c.interpolate(xdat_,$o2) e = ydat_.meansqerr($o1.interpolate(xdat_,$o2), dw_) } }else{ e = 0 } if (use_gui) { sprint(mserrlabel, "%g", e) if (stdrun_quiet == 0) { redraw(xdat_, $o1) } } return scale*e } proc save_context() { $o1.pack(tag, scale, ydat, ydat.label, xdat, boundary, weight) } proc restore_context() { $o1.unpack(tag, &scale, ydat) $o1.unpack(tstr1, xdat) ydat.label(tstr1) set_data(xdat, ydat) $o1.unpack(boundary, weight) set_w() } proc init() {local i sprint(tag, "%s", this) sscanf(tag, "%[^[]", tag) use_x = 0 use_gui = 0 have_data = 0 have_modelx = 0 xdat = new Vector(0) ydat = new Vector(0) xvec = new Vector(0) yvec = new Vector(0) scale=1 weight = new Vector(10) boundary = new Vector(10) init_weights(1) } proc clone() { $o1 = new RegionFitness() $o1.have_data = have_data $o1.boundary = boundary.c $o1.weight = weight.c if (have_data) { $o1.set_data(xdat, ydat) } $o1.scale = scale sprint(scalelabel, "scale=%g ", scale) } proc redraw() {local ymin, ymax if (use_gui) { g.erase() if (have_data) { g.label(.8, .95) ydat.plot(g, xdat, 2, 1) // ymin = ydat.min() // ymax = ydat.max() for j=0, boundary.size() - 1 { g.beginline(3, 1) g.line(boundary.x[j], g.size(3)) g.line(boundary.x[j], g.size(4)) } if (numarg() == 2) { $o2.line(g, $o1) } } g.flush() } } func mintstop() { return xdat_.x[xdat_.size-1] } proc set_data() {local i have_data = 0 // i = $o1.indwhere(">=", 0) // if (i < 0 || $o1.size < 1) return xdat = $o1.c() ydat = $o2.cl() if (have_data == 0) { have_data = 1 init_weights(1) } xdat_ = xdat.c ydat_ = ydat.c xvec = xdat yvec = ydat dw_ = new Vector(xdat.size) have_modelx = 1 if (use_gui) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } set_w() } proc set_modelx() {local n, i, j, theta xdat_ = $o1 have_modelx = 1 n = xdat_.size ydat_ = new Vector(n) j = 0 //xdat's before and after xdat will have weight 0 anyway. while(xdat_.x[j] < xdat.x[0]) { j += 1 if (j >= n) break } for i=1, xdat.size-1 { if (j >= n) break while (xdat_.x[j] >= xdat.x[i-1] && xdat_.x[j] <= xdat.x[i]){ // linear interpolation theta = (xdat.x[i] - xdat.x[i-1]) theta = (xdat_.x[j] - xdat_.x[i-1])/theta ydat_.x[j] = (1-theta)*ydat.x[i-1] + theta*ydat.x[i] j += 1 if (j >= n) break } } set_w() } proc clipboard_data() { sprint(tstr1, "%s.set_data(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr1) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc build() { if (use_gui) return use_gui = 1 vbox = new VBox() vbox.ref(this) sprint(tstr1, "execute(\"%s.unmap()\")", this) vbox.dismiss_action(tstr1) vbox.save("save()") vbox.intercept(1) g = new Graph(0) xpanel("", 1) g.menu_tool("Adjust", "adjust_weights") xmenu("Regions") xbutton("Data from Clipboard", "clipboard_data()") xbutton("Weight panel", "weight_panel()") xbutton("Copy weights", "copy_weights()") xbutton("Paste weights", "paste_weights()") xmenu() mserrlabel="MeanSqErr xxxxxxxxxxx" sprint(scalelabel, "scale= %g ", scale) xvarlabel(scalelabel) xvarlabel(mserrlabel) xpanel() g.view(0, -80, 5, 40, 0,300,0,200) if (have_data) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) } vbox.intercept(0) } proc map() { if (!use_gui) build() if (numarg() > 1) { vbox.map($s1, $2, $3, $4, $5) }else if (numarg() == 1){ vbox.map($s1) }else{ vbox.map() } redraw() } proc unmap() { } proc copy_weights() { hoc_obj_[0] = weight.c hoc_obj_[1] = boundary.c } proc paste_weights() { weight = hoc_obj_[0].c boundary = hoc_obj_[1].c set_w() } proc wfile() {local i $o1.printf("RegionFitness xdat ydat boundary weight (lines=%d) %g\n",\ 4 + 2*xdat.size + 2*boundary.size, scale) $o1.printf("|%s|\n", ydat.label) $o1.printf("%d\n", xdat.size) xdat.printf($o1) ydat.printf($o1) $o1.printf("%d\n", boundary.size) boundary.printf($o1) weight.printf($o1) } proc rfile() {local i, n scale = $o1.scanvar sprint(scalelabel, "scale=%g", scale) $o1.gets(tstr1) if (sscanf(tstr1, "|%[^|]", tstr1) == 1) { ydat.label(tstr1) } n = $o1.scanvar if (n > 0) { xdat.resize(n) ydat.resize(n) xdat.scanf($o1, n) ydat.scanf($o1, n) set_data(xdat, ydat) } n = $o1.scanvar boundary.resize(n) boundary.scanf($o1, n) weight.resize(n) weight.scanf($o1, n) set_w() } proc init_weights() {local i, n, min, max if (numarg() == 1) { if ($1 == 0) { // one more n = boundary.size }else if ($1 == -1) { // one fewer n = boundary.size-2 if (n < 1) n = 1 }else{ n = $1 } }else{ n = 1 } // boundary = new Vector(n+1) // weight = new Vector(n+1, 1) boundary.resize(n+1) weight.resize(n+1) weight.x[n] = 1 if (have_data) { min = xdat.x[0] max = xdat.x[xdat.size-1] boundary.indgen(min, (max-min)/n) set_w() } } proc weight_panel() {local i xpanel("data weights") xpvalue("Total weight (scale)", &scale, 1, "sprint(scalelabel, \"scale=%g \", scale)") xpvalue("interval 1 startpoint", &boundary.x[0], 1, "set_w()") for i=1, boundary.size() - 1 { sprint(tstr1, "interval %d endpoint", i) xpvalue(tstr1, &boundary.x[i], 1, "set_w()") sprint(tstr1, "interval %d weight", i) xpvalue(tstr1, &weight.x[i], 1, "set_w()") } xpanel() } proc set_w() {local i, j, t, w, d, tmin, tmax, n, res if (have_data){ // make sure weight regions are within boundaries tmin = xdat.x[0] tmax = xdat.x[xdat.size - 1] n = boundary.size() for i=0, n-1 { t = boundary.x[i] if (t < tmin) { boundary.x[i] = tmin } if (t > tmax) { boundary.x[i] = tmax } } } if (have_modelx) { dw_.resize(xdat.size) j = 0 tmax = boundary.x[0] w = 0 for i=0, dw_.size - 1 { t = xdat.x[i] while ((t > tmax && j < n) || (t == tmax && i == 0)) { j += 1 if (i > 0) { boundary.x[j-1] = (t + xdat.x[i-1])/2 }else{ boundary.x[j-1] = t } if (j >= n) { tmax = 1e9 w = 0 break } tmax = boundary.x[j] d = boundary.x[j] - boundary.x[j-1] if (d <= 0) { continue } w = weight.x[j]/d } dw_.x[i] = w } // throw out the 0 weight points. tobj = dw_.c.indvwhere(">", 0) dw_.index(dw_.c, tobj) xdat_.index(xdat, tobj) ydat_.index(ydat, tobj) w = dw_.sum() if (w > 0) { dw_.mul(dw_.size/w) } } redraw() } proc adjust_weights() {local x //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_weight($2) set_w() } if (adjust == -1) { return } if ($1 == 1) { // drag boundary.x[adjust] = $2 if (adjust < boundary.size-1) if ($2 > boundary.x[adjust+1]){ boundary.x[adjust] = boundary.x[adjust+1] } set_w() } if ($1 == 3) { // release x = g.view_info(g.view_info, 11, $2) if (boundary.size > 2) { if (x < 0) { boundary.remove(0) weight.remove(1) }else if (x > 1) { boundary.remove(boundary.size-1) weight.remove(weight.size-1) }else{ x = boundary.x[adjust] tobj = boundary.c.indvwhere("==", x) if (tobj.size > 1) { boundary.remove[adjust] if (tobj.x[0] == adjust) { weight.remove(adjust+1) }else{ weight.remove(adjust) } } } } boundary.sort() set_w() adjust = -1 //print boundary.size, " boundaries" //print "boundary" boundary.printf //print "weight" weight.printf } } func pick_weight() {local vi, d, i, j, x, m vi = g.view_info x = g.view_info(vi, 13, $1) for i=0, boundary.size() - 1 { d = x - g.view_info(vi, 13, boundary.x[i]) if (d < 12) { // before or on i break } } if (i == boundary.size()) { boundary.append($1) weight.append(weight.x[i-1]) return i } if (d > -12) { // actual selection of line return i } boundary.insrt(i, $1) if (i == 0) { weight.insrt(1, weight.x[1]) }else{ weight.insrt(i, weight.x[i]) } return i } endtemplate RegionFitness neuron-7.5/share/lib/hoc/mulfit/e_xy.hoc000077500000000000000000000170231323325274500202670ustar00rootroot00000000000000/* error is independent of position of Action potential peak */ {install_vector_fitness()} parmfitness_efun_append("XYFitness") begintemplate XYFitness public efun, g, set_data, set_modelx, xdat, ydat, idx_, peak, have_data public unmap, map, vbox, rfile, wfile, use_x, peakscale, xscale, yscale, tag public clone, build, before_run, mintstop objref xdat, ydat // authoritative data objref xdat_[2], ydat_[2], idx_[2] // subset of data points to fit // 0 refers to error in y and 1 refers to error in x objref g, vbox, tobj, this strdef tstr, mserrlabel, modelabel, scalelabel, tag external clipboard_set, clipboard_get i=0 proc before_run() {} func efun() { local e // the least squares error function. if (xdat_[0].size > 0) { e += yscale*$o1.yfitness($o2, peak, ydat_[0], xdat_[0]) } if (xdat_[1].size > 0) { e += xscale*$o1.xfitness($o2, peak, ydat_[1], xdat_[1]) } if (use_gui) { sprint(mserrlabel, "%g", e) redraw($o2, $o1) } return e } func mintstop() { return mintstop_ } proc init() {local i sprint(tag, "%s", this) sscanf(tag, "%[^[]", tag) use_x = 0 use_gui = 0 have_data = 0 xdat = new Vector(0) ydat = new Vector(0) mintstop_ = 0 for i=0,1 { idx_[i] = new Vector(0) xdat_[i] = new Vector(0) ydat_[i] = new Vector(0) } xpeak = 0 peak = 0 setmode(0) peakscale=0 xscale=1 yscale=.1 sprint(scalelabel, "xscl=%g yscl=%g", xscale, yscale) } proc clone() { $o1 = new XYFitness() $o1.have_data = have_data if (have_data) { $o1.set_data(xdat, ydat) } set_modelx(idx_[0], idx_[1]) $o1.xscale = xscale $o1.yscale = yscale sprint(scalelabel, "xscl=%g yscl=%g", xscale, yscale) } proc redraw() { if (use_gui) { g.erase() if (have_data) { g.label(.8, .95) ydat.plot(g, xdat, 2, 1) ydat_[0].mark(g, xdat_[0].c.add(xpeak),"|",12, 3, 1) ydat_[1].mark(g, xdat_[1].c.add(xpeak),"-", 14, 3, 1) } if (numarg() == 2) { $o2.line(g, $o1) } g.flush() } } proc set_data() {local i have_data = 0 i = $o1.indwhere(">=", 0) if (i < 0 || $o1.size < 1) return xdat = $o1.c(i) ydat = $o2.cl(i) have_data = 1 xpeak = 0 if (use_gui) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } } proc set_modelx() {local n, i, j, theta idx_[0] = $o1.c idx_[1] = $o2.c setxy() } proc setxy() {local i mintstop_ = 0 for i=0, 1 { xdat_[i].index(xdat, idx_[i]) xdat_[i].sub(xpeak) ydat_[i].index(ydat, idx_[i]) if (mintstop_ < xdat_[i].x[xdat_[i].size-1]) { mintstop_ = xdat_[i].x[xdat_[i].size-1] } } redraw() } proc clipboard_data() { sprint(tstr, "%s.set_data(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc build() { if (use_gui) return use_gui = 1 vbox = new VBox(3) vbox.ref(this) sprint(tstr, "execute(\"%s.unmap()\")", this) vbox.dismiss_action(tstr) vbox.save("save()") vbox.intercept(1) xpanel("", 1) xmenu("Select") xradiobutton("Error in X-direction", "setmode(1)") xradiobutton("Error in Y-direction", "setmode(0)") xbutton("Copy x,y subsets", "copy_points()") xbutton("Paste x,y subsets", "paste_points()") xbutton("x and y error factors", "scale()") xmenu() xvarlabel(modelabel) xvarlabel(scalelabel) mserrlabel="MeanSqErr xxxxxxxxxxx" xvarlabel(mserrlabel) xpanel() g = new Graph() if (have_data) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } g.menu_tool("Add Point","add_point") g.menu_tool("Move Point","move_point") g.menu_tool("Remove Point","remove_point") g.menu_action("Data from Clipboard", "clipboard_data()") vbox.intercept(0) } proc scale() {local x, y, ps x = xscale y = yscale sprint(tstr, "%g %g", xscale, yscale) while (1) { if (string_dialog("Enter space separated x and y error scale factors",tstr)){ if (sscanf(tstr, "%g %g", &xscale, &yscale) == 2) { sprint(scalelabel, "xscl=%g yscl=%g", xscale, yscale) return } }else{ break } } xscale = x yscale = y } proc copy_points() { clipboard_set(xdat_[0], xdat_[1]) } proc paste_points() {local i clipboard_get(xdat_[0], xdat_[1]) for i=0,1 { xdat_[i].add(xpeak) idx_[i] = xdat.c.indgen idx_[i].interpolate(xdat_[i], xdat).add(.5) } setxy() } proc setmode() { mode = $1 if (mode == 0) { sprint(modelabel, "(Y subset)") }else{ sprint(modelabel, "(X subset)") } } proc map() { if (!use_gui) build() if (numarg() > 1) { vbox.map($s1, $2, $3, $4, $5) }else if (numarg() == 1){ vbox.map($s1) }else{ vbox.map() } } proc unmap() { } proc save() {local i vbox.save("load_file(\"e_xy.hoc\", \"YFitness\")}\n{") vbox.save("ocbox_=new YFitness(1)") vbox.save("}\n{object_push(ocbox_)}\n{build()") if (object_id(xdat)) { sprint(tstr, "xdat = new Vector(%d)", xdat.size) vbox.save(tstr) sprint(tstr, "ydat = new Vector(%d)", ydat.size) vbox.save(tstr) sprint(tstr, "ydat.label(\"%s\")", ydat.label) vbox.save(tstr) sprint(tstr, "for i=0,%d { xdat.x[i]=fscan() ydat.x[i]=fscan()}}",\ xdat.size - 1) vbox.save(tstr) for i=0,xdat.size-1 { sprint(tstr, "%g %g", xdat.x[i], ydat.x[i]) vbox.save(tstr) } vbox.save("{set_data(xdat, ydat)}") if (idx_[0].size > 0) { sprint(tstr, "idx_[0] = new Vector(%d)", idx_[0].size) vbox.save(tstr) sprint(tstr, "for i=0,%d { idx_[0].x[i]=fscan()}", idx_[0].size - 1) vbox.save(tstr) for i=0,idx_[0].size-1 { sprint(tstr, "%g", idx_[0].x[i]) vbox.save(tstr) } vbox.save("{setxy()}") } if (idx_[1].size > 0) { sprint(tstr, "idx_[1] = new Vector(%d)", idx_[1].size) vbox.save(tstr) sprint(tstr, "for i=0,%d { idx_[1].x[i]=fscan()}", idx_[1].size - 1) vbox.save(tstr) for i=0,idx_[1].size-1 { sprint(tstr, "%g", idx_[1].x[i]) vbox.save(tstr) } vbox.save("{setxy()}") } }else{ vbox.save("}") } vbox.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) } proc add_point() {local i if ($1 == 2) { i = pick_x($2) idx_[mode].append(i) idx_[mode].sort() setxy() } } proc remove_point() { if ($1 == 2) { i = pick_point($2-xpeak) if (i >= 0) { idx_[mode].remove(i) setxy() } } } proc move_point() { //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_point($2-xpeak) } if (adjust == -1) { return } if ($1 == 1) { // drag idx_[mode].x[adjust] = pick_x($2) setxy() } if ($1 == 3) { // release idx_[mode].x[adjust] = pick_x($2) idx_[mode].sort() adjust = -1 setxy() } } func pick_x() {local i i = xdat.indwhere(">=", $1) if (i == -1) i = 0 return i } func pick_point() {local i, j, x, m if (idx_[mode].size == 0) return -1 i = xdat_[mode].indwhere(">=", $1) if (i == -1 && idx_[mode].size > 0) { return xdat_[mode].size-1 } d = ($1-xdat_[mode].x[i])^2 if (i > 0) { d1 = ($1-xdat_[mode].x[i-1])^2 if (d1 < d) { return i-1 } } if (i < xdat_[mode].size-1) { d1 = ($1-xdat_[mode].x[i+1])^2 if (d1 < d) { return i+1 } } return i } proc wfile() {local i $o1.printf("YFitness xdat ydat erry errx (lines=%d) %g %g %g\n",\ 8 + 2*xdat.size + idx_[0].size + idx_[1].size, peakscale,xscale,yscale) $o1.printf("%d\n", xdat.size) xdat.printf($o1) ydat.printf($o1) for i=0,1 { $o1.printf("%d\n", idx_[i].size) idx_[i].printf($o1) } } proc rfile() {local i, n peakscale = $o1.scanvar xscale = $o1.scanvar yscale = $o1.scanvar sprint(scalelabel, "xscl=%g yscl=%g", xscale, yscale) $o1.gets(tstr) if (sscanf(tstr, "|%[^|]", tstr) == 1) { ydat.label(tstr) } n = $o1.scanvar if (n > 0) { xdat.resize(n) ydat.resize(n) xdat.scanf($o1, n) ydat.scanf($o1, n) set_data(xdat, ydat) } for j=0, 1 { n = $o1.scanvar idx_[j].resize(n) idx_[j].scanf($o1, n) } setxy() } endtemplate XYFitness neuron-7.5/share/lib/hoc/mulfit/e_y.hoc000077500000000000000000000143511323325274500201000ustar00rootroot00000000000000/* error is sum of square differences of the selected points Usage: Same as RFitness except must supply the xdat indices (or use the gui to specify them) */ {install_vector_fitness()} parmfitness_efun_append("YFitness") begintemplate YFitness public efun, g, set_data, set_modelx, use_x, have_data, clone public xdat_, xdat, ydat, weight, tag, build public unmap, map, vbox, rfile, wfile, before_run, mintstop public n_chdat objref xdat, ydat // authoritative data objref xdat_, ydat_, indx_ // subset of data points to fit objref g, vbox, tobj, this strdef tstr1, mserrlabel, tag external clipboard_set, clipboard_get i=0 proc before_run() {} func efun() { local e // the least squares error function. e = 0 if (xdat_.size > 0) { e = $o1.yfitness($o2, 0, ydat_, xdat_) } if (use_gui) { sprint(mserrlabel, "w=%g e=%g", weight, e) redraw($o2, $o1) } return weight*e } func mintstop() { return xdat_.x[xdat_.size - 1] } proc init() {local i n_chdat = 0 sprint(tag, "%s", this) sscanf(tag, "%[^[]", tag) weight = 1 use_x = 1 use_gui = 0 have_data = 0 xdat = new Vector(0) ydat = new Vector(0) indx_ = new Vector(0) xdat_ = new Vector(0) ydat_ = new Vector(0) } proc clone() { $o1 = new YFitness() $o1.have_data = have_data if (have_data) { $o1.set_data(xdat, ydat) } $o1.set_modelx(indx_) } proc redraw() { if (use_gui) { g.erase() if (have_data) { g.label(.8, .95) ydat.plot(g, xdat, 2, 1) ydat_.mark(g, xdat_,"|",12, 3, 1) } if (numarg() == 2) { $o2.line(g, $o1) } g.flush() } } proc set_data() {local i have_data = 0 // i = $o1.indwhere(">=", 0) // if (i < 0 || $o1.size < 1) return xdat = $o1.c(0) ydat = $o2.cl(0) have_data = 1 if (use_gui) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } } proc set_modelx() { indx_ = $o1.c setxy() } proc setxy() {local i n_chdat += 1 for (i = indx_.size-1; i > 0; i -= 1) { if (indx_.x[i] == indx_.x[i-1]) { indx_.remove(i) } } xdat_.index(xdat, indx_) ydat_.index(ydat, indx_) redraw() } proc clipboard_data() { sprint(tstr1, "%s.set_data(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr1) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc build() { if (use_gui) return use_gui = 1 vbox = new VBox() vbox.ref(this) sprint(tstr1, "execute(\"%s.unmap()\")", this) vbox.dismiss_action(tstr1) vbox.save("save()") vbox.intercept(1) xpanel("", 1) xmenu("Select") xbutton("Copy points", "copy_points()") xbutton("Paste points", "paste_points()") xbutton("# equally spaced points", "npoints()") xmenu() mserrlabel="MeanSqErr xxxxxxxxxxx" xvarlabel(mserrlabel) xpanel() g = new Graph() if (have_data) { g.size(xdat.min(), xdat.max(), ydat.min(), ydat.max()) redraw() } g.menu_tool("Add Point","add_point") g.menu_tool("Move Point","move_point") g.menu_tool("Remove Point","remove_point") g.menu_action("Data from Clipboard", "clipboard_data()") vbox.intercept(0) } proc map() { if (!use_gui) build() if (numarg() > 1) { vbox.map($s1, $2, $3, $4, $5) }else if (numarg() == 1){ vbox.map($s1) }else{ vbox.map() } redraw() } proc unmap() { } proc copy_points() { clipboard_set(xdat_, xdat_) } proc paste_points() { clipboard_get(xdat_, xdat_) indx_ = xdat.c.indgen indx_.interpolate(xdat_, xdat).add(.5) setxy() } proc npoints() {local n, xn localobj s if (numarg() == 0) { s = new String("5") while(1) { if (string_dialog("#equidistant points", s.s) == 0) { return } if (sscanf(s.s, "%d", &n) == 1) if (n > 1 && n < xdat.size) { break } } }else{ n = $1 } xn = xdat.x[xdat.size-1] xdat_.indgen(xdat.x[0], xn, (xn-xdat.x[0])/(n-1)) indx_ = xdat.c.indgen indx_.interpolate(xdat_, xdat).add(.5) setxy() } proc save() {local i vbox.save("load_file(\"e_y.hoc\", \"YFitness\")}\n{") vbox.save("ocbox_=new YFitness(1)") vbox.save("}\n{object_push(ocbox_)}\n{build()") if (object_id(xdat)) { sprint(tstr1, "xdat = new Vector(%d)", xdat.size) vbox.save(tstr1) sprint(tstr1, "ydat = new Vector(%d)", ydat.size) vbox.save(tstr1) sprint(tstr1, "ydat.label(\"%s\")", ydat.label) vbox.save(tstr1) sprint(tstr1, "for i=0,%d { xdat.x[i]=fscan() ydat.x[i]=fscan()}}",\ xdat.size - 1) vbox.save(tstr1) for i=0,xdat.size-1 { sprint(tstr1, "%g %g", xdat.x[i], ydat.x[i]) vbox.save(tstr1) } vbox.save("{set_data(xdat, ydat)}") if (indx_.size > 0) { sprint(tstr1, "indx_ = new Vector(%d)", indx_.size) vbox.save(tstr1) sprint(tstr1, "for i=0,%d { indx_.x[i]=fscan()}", indx_.size - 1) vbox.save(tstr1) for i=0,indx_.size-1 { sprint(tstr1, "%g", indx_.x[i]) vbox.save(tstr1) } vbox.save("{setxy()}") } }else{ vbox.save("}") } vbox.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) } proc add_point() {local i if ($1 == 2) { i = pick_x($2) indx_.append(i) indx_.sort() setxy() } } proc remove_point() { if ($1 == 2) { i = pick_point($2) if (i >= 0) { indx_.remove(i) setxy() } } } proc move_point() { //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_point($2) } if (adjust == -1) { return } if ($1 == 1) { // drag indx_.x[adjust] = pick_x($2) setxy() } if ($1 == 3) { // release indx_.x[adjust] = pick_x($2) indx_.sort() adjust = -1 setxy() } } func pick_x() {local i i = xdat.indwhere(">=", $1) if (i == -1) i = 0 return i } func pick_point() {local i, j, x, m if (indx_.size == 0) return -1 i = xdat_.indwhere(">=", $1) if (i == -1 && indx_.size > 0) { return xdat_.size-1 } d = ($1-xdat_.x[i])^2 if (i > 0) { d1 = ($1-xdat_.x[i-1])^2 if (d1 < d) { return i-1 } } if (i < xdat_.size-1) { d1 = ($1-xdat_.x[i+1])^2 if (d1 < d) { return i+1 } } return i } proc wfile() {local i $o1.printf("YFitness xdat ydat erry (lines=%d)\n",\ 6 + 2*xdat.size + indx_.size) $o1.printf("%d\n", xdat.size) xdat.printf($o1) ydat.printf($o1) $o1.printf("%d\n", indx_.size) indx_.printf($o1) } proc rfile() {local i, n $o1.gets(tstr1) if (sscanf(tstr1, "|%[^|]", tstr1) == 1) { ydat.label(tstr1) } n = $o1.scanvar if (n > 0) { xdat.resize(n) ydat.resize(n) xdat.scanf($o1, n) ydat.scanf($o1, n) set_data(xdat, ydat) } n = $o1.scanvar indx_.resize(n) indx_.scanf($o1, n) setxy() } endtemplate YFitness neuron-7.5/share/lib/hoc/mulfit/eonefunc.hoc000077500000000000000000000113551323325274500211270ustar00rootroot00000000000000parmfitness_generator_append("FitnessFunction") begintemplate FitnessFunction public efun, fitness, yvec, title, yexpr, clone public rfile, wfile, map, pelist, chtitle, gview, newexpr1 public save_context, restore_context external classname objref fitness, yvec, tobj, tobj1, sf, this objref vbox, g, hb1, pelist objref deck strdef title, tstr, tstr1, tstr2, tag, cmd, yexpr, fname external object_index func efun() {local i, e, use_t use_t = 0 if (fitness.use_x) { yvec.copy(fitness.xdat_) }else{ yvec.copy(fitness.xdat) } yvec.apply(fname) e = 0 if (fitness.use_x) { e += fitness.efun(yvec, fitness.xdat_) }else{ e += fitness.efun(yvec, fitness.xdat) } errval = e return e } func gview() {local i, l,b,r,t i = 0 tobj = fitness.g l=tobj.size(1) r=tobj.size(2) b=tobj.size(3) t=tobj.size(4) tobj.view(l,b,r-l,t-b,i*200,$1*150,200,150) tobj.label(.1,.9,$s2) tobj.label(title) tobj.label(yexpr) return $1 + 1.2 } proc init() { title = "Unnamed Function Fitness" sf = new StringFunctions() sprint(fname, "FitnessFunction_%d", object_index(this)) newexpr1("exp(-$1)") sprint(tag, "%s", this) sprint(tstr, "%s.pelist = parmfitness_efun_list_", this) execute(tstr) sscanf(tag, "%[^[]", tag) yvec = new Vector() fitness = new RegionFitness() } proc save_context() { $o1.pack(tag, title, yexpr) classname(fitness, tstr) $o1.pack(tstr) fitness.save_context($o1) } proc restore_context() { $o1.unpack(tag, title, yexpr) $o1.upkstr(tstr) sprint(tstr, "fitness = new %s()", tstr) execute(tstr, this) } proc clone() { $o1 = new FitnessFunction() $o1.title = title fitness.clone($o1.fitness) $o1.newexpr1(yexpr) } proc chtitle() { title = $s1 } proc newexpr() {local i tstr = $s1 while (string_dialog("Expression involving the independent variable, $1 ", tstr)){ if (newexpr1(tstr) == 0) { sprint(tstr1, "%s is an invalid expression or function body", tstr) continue_dialog(tstr1) }else{ for i=2, numarg() { if (name_declared($si) != 5) { sprint(tstr1, "%s = 1", $si) execute(tstr1) } } break } } } func newexpr1() {local b if (sf.head($s1, "return ", tstr2) > -1) { sprint(tstr2, "func %s() { %s }", fname, $s1) }else{ sprint(tstr2, "func %s() { return %s }", fname, $s1) } b = execute1(tstr2) if (b) { yexpr = $s1 } return b } proc wfile() {local i $o1.printf("\t%s: %s\n", tag, title) $o1.printf("\t\t%s\n", yexpr) sprint(tstr, "%s", fitness.tag) $o1.printf("\t\t%s:\n", tstr) if ($o2.isopen) fitness.wfile($o2) $o1.printf("\n") } proc rfile() {local i i = sscanf($s3, "%*[\t ]%[^:]:%*[\t ]%[^\n]", tag, title) if (i != 2) { i = sscanf($s3, "%[^:]:%*[\t ]%[^\n]", tag, title) } if (i != 2) { printf("Invalid format for Fitness Function\n%stag=|%s| title=|%s|\n", $s3, tag, title) } $o1.gets(tstr) sscanf(tstr, "%*[\t ]%[^\n]", tstr1) newexpr1(tstr1) $o1.gets(tstr) while (sf.substr(tstr, "Fitness") > -1) { i = sscanf(tstr, "%*[\t ]%[^:]", tstr) if (i != 1) { i = sscanf(tstr, "%[^:]", tstr) } if (i != 1) { printf("Invalid format for Fitness line\n%s", tstr) } sscanf(tstr, "%[^[]", tstr1) sprint(tstr1, "tobj = new %s()", tstr1) execute(tstr1, this) tobj.tag = tstr fitness = tobj if ($o2.isopen) tobj.rfile($o2) $o1.gets(tstr) } } proc chfit() {local i deck.flip_to(-1) sprint(tstr, "tobj = new %s()", pelist.object($1).s) execute(tstr, this) tobj.set_data(fitness.xdat, fitness.ydat) deck.remove_last fitness = tobj deck.intercept(1) fitness.map() deck.intercept(0) deck.flip_to(0) objref tobj, tobj1 } proc map() {local i vbox = new VBox(3) vbox.intercept(1) xpanel("",1) xlabel(title) xpvalue("Error Value", &errval, 0, "efun()") xmenu("Fitness") xmenu("Change Method to") for i=0, pelist.count-1 { sprint(tstr, "chfit(%d)", i) xbutton(pelist.object(i).s, tstr) } xmenu() xbutton("Expression with $1", "newexpr(yexpr)") xbutton("Or function body", "newexpr(yexpr)") xmenu("Common Functional Forms") xbutton("Nth order Lag", "newexpr(\"A*(1 - exp(-k1*$1))^n\", \"A\", \"k1\")") xbutton("Linear", "newexpr(\"m*$1 + b\", \"m\", \"b\")") xbutton("Single Exponential", "newexpr(\"A*exp(-k1*$1)\", \"A\", \"k1\")") xbutton("Double Exponential", "newexpr(\"A*exp(-k1*$1) + B*exp(-k2*$1)\", \"A\",\"k1\",\"B\",\"k2\")") xbutton("Two state Boltzmann", "newexpr(\"A/(1 + exp(k1*(d1-$1)))\", \"A\",\"k1\",\"d1\")") xbutton("Three state Boltzmann", "newexpr(\"A/(1 + exp(k1*(d1-$1)) + exp(k2*(d2-$1)))\", \"A\",\"k1\",\"d1\",\"k2\",\"d2\")") xbutton("Michaelis-Menton", "newexpr(\"A*k1*$1/(1 + k1*$1)\", \"A\",\"k1\")") xmenu() xmenu() xpanel() xpanel("") xvarlabel(yexpr) xpanel() deck = new Deck() deck.intercept(1) fitness.map() deck.intercept(0) deck.map() deck.flip_to(0) vbox.intercept(0) vbox.map() } endtemplate FitnessFunction neuron-7.5/share/lib/hoc/mulfit/eoneprim.hoc000077500000000000000000000042171323325274500211420ustar00rootroot00000000000000parmfitness_generator_append("FitnessPrimitive") begintemplate FitnessPrimitive public efun, title, yexpr, errval, clone public rfile, wfile, map, pelist, chtitle, gview public save_context, restore_context objref tobj, tobj1, sf, this objref vbox, g, hb1, pelist strdef title, tstr, tstr1, tag, cmd, yexpr, fname, callfname external object_index func efun() { execute(callfname) return errval } func gview() { return $1 } proc init() { title = "Unnamed Fitness Primitive" errval = 0 sf = new StringFunctions() sprint(fname, "FitnessPrimitive_%d", object_index(this)) yexpr = "0" newexpr1() sprint(callfname, "%s.errval = %s()", this, fname) sprint(tag, "%s", this) sscanf(tag, "%[^[]", tag) } proc clone() { $o1 = new FitnessPrimitive() $o1.title = title $o1.yexpr = yexpr newexpr1() } proc save_context() { $o1.pack(tag, title, yexpr) } proc restore_context() { $o1.unpack(tag, title, yexpr) newexpr1() } proc chtitle() { title = $s1 } proc newexpr() { while (string_dialog("Expression", yexpr)){ if (newexpr1() == 0) { sprint(tstr, "%s is an invalid expression or function body", yexpr) continue_dialog(tstr) }else{ break } } } func newexpr1() { if (sf.head(yexpr, "return ", tstr) > -1) { sprint(tstr, "func %s() { %s }", fname, yexpr) }else{ sprint(tstr, "func %s() { return %s }", fname, yexpr) } return execute1(tstr) } proc wfile() {local i $o1.printf("\t%s: %s\n", tag, title) $o1.printf("\t\t%s\n", yexpr) $o1.printf("\n") } proc rfile() {local i i = sscanf($s3, "%*[\t ]%[^:]:%*[\t ]%[^\n]", tag, title) if (i != 2) { i = sscanf($s3, "%[^:]:%*[\t ]%[^\n]", tag, title) } if (i != 2) { printf("Invalid format for Fitness Function\n%stag=|%s| title=|%s|\n", $s3, tag, title) } $o1.gets(tstr) sscanf(tstr, "%*[\t ]%[^\n]", yexpr) newexpr1() $o1.gets(tstr) } proc map() {local i vbox = new VBox(3) vbox.intercept(1) xpanel("",1) xlabel(title) xpvalue("Error Value", &errval, 0, "efun()") xmenu("Fitness") xbutton("Expression", "newexpr()") xbutton("Or function body", "newexpr()") xmenu() xpanel() xpanel("") xvarlabel(yexpr) xpanel() vbox.intercept(0) vbox.map() } endtemplate FitnessPrimitive neuron-7.5/share/lib/hoc/mulfit/eonerun.hoc000077500000000000000000000216311323325274500207760ustar00rootroot00000000000000parmfitness_generator_append("FitnessGenerator") begintemplate FitnessGenerator public efun, fitnesslist, generator, yvarlist, yveclist, tvec, title public rfile, wfile, map, pelist, chtitle, gview, clone, add public save_context, restore_context external classname, tstop objref fitnesslist, generator, yvarlist, yveclist, tvec, tobj, tobj1, sf, this objref vbox, g, hb1, pelist objref dec, gdeck, fdeck, deck, symch_ strdef title, tstr, tstr1, tag, cmd proc save_context() { local i $o1.pack(tag, title, yvarlist.count) for i=0, yvarlist.count - 1 { $o1.pack(yvarlist.object(i).s) classname(fitnesslist.object(i), tstr) $o1.pack(tstr) fitnesslist.object(i).save_context($o1) } classname(generator, tstr) $o1.pack(tstr) generator.save_context($o1) } proc restore_context() {local i, n $o1.unpack(tag, title) n = $o1.upkscalar yvarlist.remove_all() yveclist.remove_all() fitnesslist.remove_all() for i=0, n-1 { yvarlist.append(new Pointer($o1.upkstr(tstr))) yveclist.append(new Vector(1000)) $o1.upkstr(tstr) sprint(tstr, "tobj = new %s()", tstr) execute(tstr, this) fitnesslist.append(tobj) tobj.restore_context($o1) } $o1.upkstr(tstr) sprint(tstr, "generator = new %s()", tstr) execute(tstr, this) generator.restore_context($o1) } func efun() {local i, e, use_t, tssav, mintstop use_t = 0 mintstop = tstop for i=0, yvarlist.count-1 { tobj = fitnesslist.object(i) tobj.before_run(yvarlist.object(i)) tssav = tobj.mintstop() if (mintstop < tssav) { mintstop = tssav } if (tobj.use_x) { yveclist.object(i).record(&yvarlist.object(i).val,\ tobj.xdat_) }else{ yveclist.object(i).record(&yvarlist.object(i).val) use_t = 1 } } if (use_t) { tvec.record(&t) } tssav = tstop tstop = mintstop + .1 generator.frun() tstop = tssav if (stoprun) {errval=0 return 0} e = 0 for i=0, yvarlist.count-1 { if (fitnesslist.object(i).use_x) { e += fitnesslist.object(i).efun(yveclist.object(i),\ fitnesslist.object(i).xdat_) }else{ e += fitnesslist.object(i).efun(yveclist.object(i),\ tvec) } yveclist.object(i).play_remove() } errval = e return e } func gview() {local i, j, l,b,r,t for i=0, fitnesslist.count - 1 { j = i + .2 fitnesslist.object(i).build() tobj = fitnesslist.object(i).g l=tobj.size(1) r=tobj.size(2) b=tobj.size(3) t=tobj.size(4) tobj.view(l,b,r-l,t-b,j*200,$1*150,200,150) tobj.label(.1,.9,$s2) tobj.label(title) tobj.label(yvarlist.object(i).s) } return $1 + 1.2 } proc init() { title = "Unnamed single run protocol" context_ = 1 sprint(tag, "%s", this) sprint(tstr, "%s.pelist = parmfitness_efun_list_", this) execute(tstr) sscanf(tag, "%[^[]", tag) generator = new FitnessRun() fitnesslist = new List() yvarlist = new List() yveclist = new List() tvec = new Vector(1000) sf = new StringFunctions() dshow=0 } proc clone() {local i $o1 = new FitnessGenerator() $o1.title = title for i=0, yvarlist.count-1 { fitnesslist.object(i).clone(tobj) $o1.add(yvarlist.object(i).s, tobj) } generator.clone($o1.generator) } proc chtitle() { context_ += 1 title = $s1 } proc add() { // variable string, fitness object context_ += 1 tobj = new Pointer($s1) yvarlist.append(tobj) fitnesslist.append($o2) tobj = new Vector(1000) tobj.label($s1) yveclist.append(tobj) } proc wfile() {local i $o1.printf("\t%s: %s\n", tag, title) generator.wfile($o1, $o2) for i=0, fitnesslist.count-1 { sprint(tstr, "%s", fitnesslist.object(i).tag) $o1.printf("\t\t%s:\t%s\n", tstr, yvarlist.object(i).s) if ($o2.isopen) fitnesslist.object(i).wfile($o2) } $o1.printf("\n") } proc rfile() {local i context_ += 1 i = sscanf($s3, "%*[\t ]%[^:]:%*[\t ]%[^\n]", tag, title) if (i == 0) { i = sscanf($s3, "%[^:]:%*[\t ]%[^\n]", tag, title) } if (i == 0) { printf("Invalid format for Fitness Generator\n%stag=|%s| title=|%s|\n", $s3, tag, title) } $o1.gets(tstr) if (sf.substr(tstr, ":") > -1) { generator.rfile($o1, tstr) } while (sf.substr(tstr, "Fitness") > -1) { i = sscanf(tstr, "%*[\t ]%[^:]:%*[\t ]%[^\n]", tstr, tstr1) if (i != 2) { i = sscanf(tstr, "%[^:]:%*[\t ]%[^\n]", tstr, tstr1) } if (i != 2) { printf("Invalid format for Fitness line\n%s", tstr) } yvarlist.append(new Pointer(tstr1)) yveclist.append(new Vector(1000)) sscanf(tstr, "%[^[]", tstr1) sprint(tstr1, "tobj = new %s()", tstr1) execute(tstr1, this) tobj.tag = tstr fitnesslist.append(tobj) if ($o2.isopen) tobj.rfile($o2) $o1.gets(tstr) } if (sf.len(tstr) > 1) { printf("Invalid format. Nonempty line that does not contain a Fitness substring.\n%s", tstr) } } proc chfit() {local i context_ += 1 deck.flip_to(-1) if (dshow < 0) return tobj1 = fitnesslist.object(dshow) sprint(tstr, "tobj = new %s()", pelist.object($1).s) execute(tstr, this) if (tobj1.have_data) { tobj.set_data(tobj1.xdat, tobj1.ydat) } for i=0, fitnesslist.count-1 { deck.remove_last } fitnesslist.remove(dshow) fitnesslist.insrt(dshow, tobj) deck.intercept(1) for i=0, fitnesslist.count-1 { fitnesslist.object(i).map() } deck.intercept(0) deck.flip_to(dshow) objref tobj, tobj1 } proc newconst() { if (object_id(symch_) == 0 || symch_type_ != 1) { symch_ = new SymChooser("Protocol constant") symch_type_ = 1 } if (symch_.run()) { context_ += 1 symch_.text(tstr) tobj = new RunConstant(tstr) tobj.offval = tobj.p.val tobj.onval = tobj.p.val generator.constantlist.append(tobj) gendeck(0) } } proc newstmt() { while (string_dialog("RunStatement to be executed before and after generator run (hoc_ac_=1 then 0)", cmd)){ if (execute1(cmd) == 0) { continue_dialog("invalid statement") continue } context_ += 1 tobj = new RunStatement(2,cmd) generator.stmtlist.append(tobj) gendeck(0) break } } proc newvar() { if (object_id(symch_) == 0 || symch_type_ != 0) { symch_ = new SymChooser("Dependent variable to fit") symch_type_ = 0 } if (symch_.run()) { context_ += 1 symch_.text(tstr) add(tstr, new RegionFitness()) fitdeck(0) } } proc rmvar() { yvarlist.browser("Double click to remove a fit variable", "s") yvarlist.accept_action("rmvar1()") } proc rmvar1() {local i context_ += 1 i = hoc_ac_ if (i < 0) return yvarlist.remove(i) yveclist.remove(i) fitnesslist.remove(i) deck.remove(i) fitdeck(1) } proc chvar() { yvarlist.browser("Double click to change a fit variable", "s") yvarlist.accept_action("chvar1()") } proc chvar1() { context_ += 1 i = hoc_ac_ if (i < 0) return tstr = yvarlist.object(i).s if (string_dialog("Change fit variable name", tstr)) { yvarlist.remove(i) yvarlist.insrt(i, new Pointer(tstr)) yveclist.object(i).label(tstr) } fitdeck(1) } proc rmconst() { generator.constantlist.browser("Double click to remove a Protocol Constant","name") generator.constantlist.accept_action("rmconst1(0)") generator.stmtlist.browser("Double click to remove a Protocol Statement","stmt") generator.stmtlist.accept_action("rmconst1(1)") } proc rmconst1() { context_ += 1 if (hoc_ac_ < 0) return if ($1 == 0) { generator.constantlist.remove(hoc_ac_) }else{ generator.stmtlist.remove(hoc_ac_) } gendeck(0) } proc gendeck() { if ($1 == 0) { gdeck.remove(0) } gdeck.intercept(1) xpanel("") for i=0, generator.constantlist.count-1 { tobj = generator.constantlist.object(i) xpvalue(tobj.p.s, &tobj.onval, 1) } for i=0, generator.stmtlist.count-1 { tobj = generator.stmtlist.object(i) if (tobj.do_before == 1) { sprint(tstr, "Before: %s", tobj.stmt) }else if (tobj.do_before == 2) { sprint(tstr, "%s", tobj.stmt) }else{ sprint(tstr, "After: %s\n", tobj.stmt) } xlabel(tstr) } xpanel() gdeck.intercept(0) gdeck.flip_to(0) } proc fitdeck() { if ($1 >= 0) { fdeck.remove(0) } fdeck.intercept(1) xpanel("") for i=0, fitnesslist.count-1 { sprint(tstr, "dshow=%d deck.flip_to(dshow)", i) xradiobutton(yvarlist.object(i).s, tstr, i == 0) } xpanel() fdeck.intercept(0) fdeck.flip_to(0) if ($1 == 0) { deck.intercept(1) fitnesslist.object(fitnesslist.count-1).map() deck.intercept(0) } } proc map() {local i vbox = new VBox(3) vbox.intercept(1) xpanel("",1) xlabel(title) xpvalue("Error Value", &errval, 0, "efun()") xmenu("Fitness") xmenu("Change Method to") for i=0, pelist.count-1 { sprint(tstr, "chfit(%d)", i) xbutton(pelist.object(i).s, tstr) } xmenu() xbutton("Variable to fit", "newvar()") xbutton("Remove a fit Variable", "rmvar()") xbutton("Change a fit Variable", "chvar()") xbutton("Protocol Constant", "newconst()") xbutton("Protocol Statement", "newstmt()") xbutton("Remove a protocol", "rmconst()") xmenu() xpanel() hb1 = new HBox(3) hb1.intercept(1) gdeck = new Deck(3) gendeck(-1) gdeck.map() fdeck = new Deck(3) fitdeck(-1) fdeck.map() hb1.intercept(0) hb1.map() deck = new Deck() deck.intercept(1) for i=0, fitnesslist.count-1 { fitnesslist.object(i).map() } deck.intercept(0) deck.map() dshow = 0 if (fitnesslist.count == 0) { dshow = -1 } deck.flip_to(dshow) vbox.intercept(0) vbox.map() } endtemplate FitnessGenerator neuron-7.5/share/lib/hoc/mulfit/eparmlst.hoc000077500000000000000000000462761323325274500211660ustar00rootroot00000000000000begintemplate RunFitParm public name, val, low, high, doarg, invalid, copy, set, play_one public setln, getln, uselog, domain, domain_, setname strdef name, domain_ objref pval proc init() { uselog = 0 set($s1, 1, -1e6, 1e6, 1, 0) } proc set() { setname($s1) val = $2 low = $3 high = $4 doarg = $5 uselog = $6 domain() } proc setname() { name = $s1 if (strcmp(name, "") != 0) { pval = new Pointer(&val, name) }else{ objref pval } } proc domain() { if (uselog && ((low > 0) || (high < 0))) { sprint(domain_, " X %g %g %s", low, high, name) }else{ sprint(domain_, " %g %g %s", low, high, name) } } proc copy() { set($o1.name, $o1.val, $o1.low, $o1.high, $o1.doarg, $o1.uselog) } func invalid() { if (val < low || val > high) { return 1 } return 0 } proc play_one() { pval.assign(val) } proc setln() { if (uselog) { if (low > 0) { val = exp($1) }else if (high < 0) { val = -exp($1) }else{ val = $1 } }else{ val = $1 } } func getln() { if (uselog) { if (low > 0) { return log(val) }else if (high < 0) { return log(-val) } return val }else{ return val } } endtemplate RunFitParm begintemplate GenInfo public gen, use, s, toggle objref gen strdef s proc init() { gen = $o1 if (numarg() > 1) { use = $o2.scanvar }else{ use = 0 } use = (use + 1) % 2 toggle() } proc toggle() { use = (use+1)%2 if (use) { sprint(s, "+ %s", gen.title) }else { sprint(s, "- %s", gen.title) } } endtemplate GenInfo begintemplate ParmFitness public parmlist, efun, doarg_get, generatorlist, title, errval, pc public rfile, wfile, usegen, parmlist_use, putall, argget, randomize public use_parallel, save_context, declare, verbose, def_parmlist_use external classname objref parmlist, generatorlist, tobj, sf, this, usegen, parmlist_use objref ran, pc, parmvec strdef title, tstr, tstr1 func efun() {local e, i if (use_parallel_) { return efun_parallel($1, &$&2) } for i=0, $1-1 { tobj = parmlist_use.object(i) tobj.setln($&2[i]) if (tobj.invalid) { if (verbose) printf("invalid %s low=%g val=%g high=%g\n", tobj.name, tobj.low, tobj.val,tobj.high) return 1e9 } tobj.play_one() } doNotify() e = 0 for i=0, generatorlist.count-1 { if (generatorlist.object(i).use) { e += generatorlist.object(i).gen.efun() if (stoprun) {break} } } errval = e return e } func parm() {local i for i=0, $o1.size-1 { tobj = parmlist_use.object(i) tobj.setln($o1.x[i]) if (tobj.invalid) { if (verbose) printf("invalid %s low=%g val=%g high=%g\n", tobj.name, tobj.low, tobj.val,tobj.high) return 0 } tobj.play_one() } return 1 } func efun1() { if ($3 != context_) { printf("%s bad context: mine=%d needed=%d\n", \ this, context_, $3) quit() } parm($o2) return generatorlist.object($1).gen.efun() } func efun_parallel() {local e, i, j, n, b if (parm(parmvec.from_double($1, &$&2)) == 0) { return 1e9 } n = generatorlist.count for j=0, n - 1 { if (generatorlist.object(j).use) { break } } b = 0 for i=j+1, n-1 { if (generatorlist.object(i).use) { pc.submit(this, "efun1", i, parmvec, context_) b = 1 } } if (j < n) { e = generatorlist.object(j).gen.efun() } if (b) { while (pc.working()) { e += pc.retval } } errval = e return e } proc save_context() {local i context_ += 1 sprint(tstr, "%s", this) pc.look_take(tstr) pc.pack(title, context_) pc.pack(generatorlist.count) for i=0, generatorlist.count-1 { tobj = generatorlist.object(i) classname(tobj.gen, tstr) pc.pack(tstr) tobj.gen.save_context(pc) pc.pack(tobj.use) } pc.pack(parmlist.count) for i=0, parmlist.count-1 { tobj = parmlist.object(i) pc.pack(tobj.name, tobj.val, tobj.low, tobj.high, \ tobj.doarg, tobj.uselog) } sprint(tstr, "%s", this) pc.post(tstr) pc.context(this, "restore_context", tstr) } proc restore_context() {local i, n pc.look($s1) pc.unpack(title, &context_) generatorlist.remove_all n = pc.upkscalar for i=0, n-1 { pc.upkstr(tstr) sprint(tstr, "tobj = new GenInfo(new %s())", tstr) execute(tstr, this) tobj.gen.restore_context(pc) if (pc.upkscalar == 1) tobj.toggle() generatorlist.append(tobj) } parmlist.remove_all n = pc.upkscalar for i=0, n-1 { tobj = new RunFitParm(pc.upkstr(tstr)) pc.unpack(&tobj.val, &tobj.low, &tobj.high, \ &tobj.doarg, &tobj.uselog) tobj.domain() declare(tobj) tobj.play_one() parmlist.append(tobj) } def_parmlist_use() } proc use_parallel() { if ($1 == 1) { save_context() } use_parallel_ = $1 } proc init() { verbose = 0 context_ = 1 use_parallel_ = 0 if (numarg() > 0) { title = $s1 } // "this" is the stable context (all publics and descendants) pc = new ParallelContext() parmvec = new Vector() parmlist = new List() parmlist_use = new List() generatorlist = new List() sf = new StringFunctions() } proc randomize() { local i, x if (object_id(ran) == 0) { ran = new Random(startsw()) } if ($1 <= 0) return ran.uniform(-log($1),log($1)) for i=0, parmlist.count-1 { tobj = parmlist.object(i) if (tobj.doarg) { x = tobj.val * exp(ran.repick) tobj.val = x tobj.play_one() } } } proc def_parmlist_use() {local i parmlist_use.remove_all() for i=0, parmlist.count-1 { if (parmlist.object(i).doarg) { parmlist_use.append(parmlist.object(i)) //printf("def_parmlist_use %d %s\n", i, parmlist.object(i).name) } } } func doarg_get() {local i, n def_parmlist_use() n = parmlist_use.count $o1.resize(n) for i=0, n-1 { $o1.x[i] = parmlist_use.object(i).getln() } return n } proc argget() {local i j = 0 $o1.resize(parmlist.count) for i=0, parmlist.count-1 { $o1.x[i] = parmlist.object(i).val } } proc putall() {local i for i=0, parmlist.count-1 { parmlist.object(i).play_one() } } proc wfile() {local i $o1.printf("ParmFitness: %s\n", title) for i=0, generatorlist.count-1 { generatorlist.object(i).gen.wfile($o1, $o2) $o2.printf("%d\n", generatorlist.object(i).use) } $o1.printf("\tParameters:\n") for i=0, parmlist.count-1 { tobj = parmlist.object(i) $o1.printf("\t\t\"%s\", %g, %g, %g, %g, %g\n", tobj.name,\ tobj.val, tobj.low, tobj.high, tobj.doarg, tobj.uselog) } $o1.printf("End ParmFitness\n") } proc rfile() {local use if (numarg() == 3) { tstr = $s3 }else{ $o1.gets(tstr) } sscanf(tstr,"ParmFitness: %[^\n]", title) while (1) { $o1.gets(tstr) if (sf.len(tstr) == 1) continue sscanf(tstr, "%[^:]:", tstr1) if (sf.substr(tstr1, "Parameters") > -1) break sprint(tstr1, "tobj = new %s(0)", tstr1) execute(tstr1, this) tobj.rfile($o1, $o2, tstr) // printf("%s %s\n", tobj, tobj.title) generatorlist.append(new GenInfo(tobj, $o2)) } while (1) { $o1.gets(tstr) if (sf.substr(tstr, "End ParmFitness") > -1) break tobj = new RunFitParm("",0,0,0,0,0) sscanf(tstr, "%*[^\"]\"%[^\"]\",%g,%g,%g,%g,%g", tobj.name, &tobj.val,\ &tobj.low, &tobj.high, &tobj.doarg, &tobj.uselog) tobj.setname(tobj.name) tobj.domain() // sscanf(tstr, "%*[^\"]\"%[^\"]\",%g,%g,%g,%g", tobj.name, &tobj.val,\ // &tobj.low, &tobj.high, &tobj.doarg) // tobj.setname(tobj.name) // printf("%s |%s| %s", tobj, tobj.name, tstr) declare(tobj) tobj.play_one() parmlist.append(tobj) } objref tobj } // this is probably not necessary because the Pointer will do it automatically proc declare() { // function fitters often declare their own variables if (sf.substr($o1.name, "$") == -1) { sprint(tstr, "{%s}", $o1.name) if(!execute1(tstr, 0)) { sprint(tstr, "%s = %g", $o1.name, $o1.val) execute1(tstr) } } } endtemplate ParmFitness begintemplate ParmFitnessGui public pf, map, unmap, dact, mulfit, run, c2p, p2c public mapsave, gengui, showargs, showdomain, usepanel objref pf, sf, symch_, mulfit external hoc_obj_, parmfitness_generator_list_ external mulfit_optimizers_, mulfit_optimizer_names_ strdef amodestr, gmodestr, tstr, tstr1 objref vbox, hbox, this, tobj, domainlist objref parmbox, domainbox objref gengui_, genguibox_ objref usepanelbox_ proc init() { busy = 0 pf = $o1 mulfit = $o2 build() sf = new StringFunctions() } func run() { pf.putall() tobj = new Vector(50) pf.doarg_get(tobj) if (tobj.size) { return pf.efun(tobj.size, &tobj.x[0]) }else{ return pf.efun(0) } } proc runall() {local i run() for i=0, pf.generatorlist.count-1 { if (!pf.generatorlist.object(i).use) { pf.generatorlist.object(i).gen.efun() } } } proc build() {local i vbox = new VBox(3) vbox.save("") vbox.dismiss_action("unmap()") vbox.intercept(1) xpanel(pf.title, 1) xvarlabel(pf.title) xpvalue("ErrorValue", &pf.errval, 0, "run()") xpanel() hbox = new HBox(3) hbox.intercept(1) tobj = new VBox(3) tobj.intercept(1) xpanel("", 1) xmenu("Parameters") xmenu("Select Optimizer") for i= 0, mulfit_optimizers_.count - 1 { sprint(tstr, "showopt(%d)", i) xbutton(mulfit_optimizer_names_.object(i).s, tstr) } xmenu() xbutton("Parameter Panel", "showargs()") xbutton("Domain Panel", "showdomain()") xbutton("Add Parameter", "addarg()") xradiobutton("Remove Parameter", "amode=3 amodestr=\"Remove\"") xradiobutton("Change Parameter", "amode=4 amodestr=\"Change\"") xmenu("Parm import/export") xbutton("Top level to Parm", "t2p()") xbutton("Clipboard to Parm", "c2p()") xbutton("Parm to Clipboard", "p2c()") xmenu() if (pf.pc.nhost > 0) { xmenu("Parallel") xbutton("Update context", "update_context()") xbutton("Test context", "test_context()") xmenu() } xmenu() amode=1 amodestr="" xvarlabel(amodestr) xpanel() pf.parmlist.browser("", "name") pf.parmlist.accept_action("parmsel(hoc_ac_)") tobj.intercept(0) tobj.map() tobj = new VBox(3) tobj.intercept(1) xpanel("", 1) xmenu("Generators") xmenu("Add Fitness Generator") xbutton("Add Run Fitness", "addgen(0)") xbutton("Add Function Fitness", "addgen(1)") xbutton("Add Fitness Primitive", "addgen(2)") xbutton("Add Multiple Run Fitter", "addgen(3)") for i=4, parmfitness_generator_list_.count - 1 { sprint(tstr, "addgen(%d)", i) sprint(tstr1, "Add %s", parmfitness_generator_list_.object(i).s) xbutton(tstr1, tstr) } xmenu() xradiobutton("Display Generator", "gmode=1 gmodestr=\"Display\"") xradiobutton("Use Generator", "gmode=2 gmodestr=\"Toggle\"") xradiobutton("Remove Generator", "gmode=3 gmodestr=\"Remove\"") xradiobutton("Change Name", "gmode=4 gmodestr=\"Change Name\"") xradiobutton("Clone Generator", "gmode=5 gmodestr=\"Clone\"") xbutton("Reorder upward", "reorder(-1)") xbutton("Rorder downward", "reorder(1)") xbutton("Multiple protocol name", "chtitle()") xbutton("View all Graphs", "gview()") xbutton("Pop up \"Use\" panel", "usepanel()") xbutton("Run all", "runall()") xmenu() gmode = 1 gmodestr="Display" xvarlabel(gmodestr) xpanel() pf.generatorlist.browser("", "s") pf.generatorlist.select_action("gensel(hoc_ac_, 0)") pf.generatorlist.accept_action("gensel(hoc_ac_, 1)") tobj.intercept(0) tobj.map() hbox.intercept(0) hbox.map() vbox.intercept(0) } proc update_context() { pf.save_context() } proc test_context() {local p tobj = new Vector(50) pf.doarg_get(tobj) pf.pc.context(this, "partest_efun", tobj) partest_efun(tobj) } proc partest_efun() { tobj = $o1 if (tobj.size) { pf.efun(tobj.size, &tobj.x[0]) }else{ pf.efun(0) } print pf.errval } proc showopt() { mulfit.opt.set_optimizer(mulfit_optimizers_.object($1).s) mulfit.showopt() } proc t2p() {local i for i=0, pf.parmlist.count-1 { tobj = pf.parmlist.object(i) if (sf.head(tobj.name, "\\$", tstr) == -1) { sprint(tstr, "%s.val = %s", tobj, tobj.name) execute1(tstr) } } } proc p2c() { hoc_obj_[0] = new Vector() pf.argget(hoc_obj_[0]) hoc_obj_[1] = new Vector(hoc_obj_[0].size) hoc_obj_[1].indgen } proc c2p() {local i, n n = pf.parmlist.count if (n != hoc_obj_[0].size) { print "clipboard not same size as parmlist" sqrt(-1) } for i=0, n-1 { pf.parmlist.object(i).val = hoc_obj_[0].x[i] } pf.putall() } proc gview() {local i, j j = .2 for i=0, pf.generatorlist.count-1 { tobj = pf.generatorlist.object(i) // if (tobj.use) { j = tobj.gen.gview(j, pf.title) // } } } proc usepanel() {local i usepanelbox_ = new VBox() usepanelbox_.save("") usepanelbox_.intercept(1) xpanel("") for i=0, pf.generatorlist.count-1 { tobj = pf.generatorlist.object(i) sprint(tstr, "use_action(%d)", i) xcheckbox(tobj.gen.title, &tobj.use, tstr) } xpanel() usepanelbox_.intercept(0) sprint(tstr, "%s use toggle", mulfit) if (numarg() > 3) { usepanelbox_.map(tstr, $1, $2, $3, $4) }else{ usepanelbox_.map(tstr) } objref tobj } proc use_action() {local i i = pf.generatorlist.selected pf.generatorlist.select(-1) tobj = pf.generatorlist.object($1) tobj.use += 1 tobj.toggle() pf.generatorlist.remove($1) pf.generatorlist.insrt($1, tobj) pf.generatorlist.select(i) } proc reorder() { local i localobj tobj //selected upward -1, downward 1 i = pf.generatorlist.selected if (i != -1 && i + $1 > -1 && i + $1 < pf.generatorlist.count) { tobj = pf.generatorlist.object(i) pf.generatorlist.select(-1) pf.generatorlist.remove(i) pf.generatorlist.insrt(i+$1, tobj) pf.generatorlist.select(i+$1) dgen() } } proc chtitle() { tstr = pf.title if (string_dialog("Multiple Run Protocol name", tstr)) { pf.title = tstr mulfit.title = pf.title } } proc addgen() { if ($1 >= 0 && $1 < parmfitness_generator_list_.count) { sprint(tstr, "tobj = new %s(0)", parmfitness_generator_list_.object($1).s) execute(tstr, this) pf.generatorlist.append(new GenInfo(tobj)) if (object_id(gengui_) != 0) { gengui_.intercept(1) pf.generatorlist.object(pf.generatorlist.count-1).gen.map() gengui_.intercept(0) } objref tobj } } proc parmsel() { if ($1 < 0) return if (amode == 3) { pf.parmlist.remove($1) objref domainbox, domainlist, parmbox } if (amode == 4) { tstr = pf.parmlist.object($1).name if (string_dialog("Change parameter name", tstr)) { tobj = pf.parmlist.object($1) tobj.setname(tstr) pf.parmlist.remove($1) pf.parmlist.insrt($1, tobj) objref tobj objref domainbox, domainlist, parmbox } } } proc addarg() { if (object_id(symch_) == 0) { symch_ = new SymChooser("Fit Parameter") } if (symch_.run()) { symch_.text(tstr) tobj = new RunFitParm(tstr) pf.declare(tobj) pf.parmlist.append(tobj) objref domainbox, domainlist, parmbox if (sf.head(tstr, "\\$", tstr1) == -1) { sprint(tstr, "%s.val = %s", tobj, tstr) execute1(tstr) } } } proc gensel() {local i if (busy) { return } busy = 1 i = $1 if (gmode == 1) { // display gengui(i) } if ($2 == 0) { busy = 0 return} if (gmode == 2) { // use toggle tobj = pf.generatorlist.object(i) tobj.toggle() pf.generatorlist.remove(i) pf.generatorlist.insrt(i, tobj) pf.generatorlist.select(i) } if (gmode == 3) { // remove tobj = pf.generatorlist.object(i) pf.generatorlist.remove(i) pf.generatorlist.select(-1) objref tobj dgen() } if (gmode == 4) { // change name tobj = pf.generatorlist.object(i) tstr = tobj.gen.title if (string_dialog("Change generator title", tstr)) { tobj.gen.chtitle(tstr) tobj.toggle() tobj.toggle() pf.generatorlist.remove(i) pf.generatorlist.insrt(i,tobj) pf.generatorlist.select(i) dgen() } } if (gmode == 5) { // clone pf.generatorlist.object(i).gen.clone(tobj) pf.generatorlist.insrt(i+1, new GenInfo(tobj)) dgen() } busy = 0 } proc gengui() {local i doNotify() // without this, mswin gives error when mulrunfit window not the top window card_ = $1 if (object_id(gengui_) == 0) { tobj = new VBox(3) tobj.intercept(1) tobj.save("") // tobj.ref(this) tobj.dismiss_action("dact()") gengui_ = new Deck() gengui_.intercept(1) for i=0, pf.generatorlist.count-1 { pf.generatorlist.object(i).gen.map() } gengui_.intercept(0) gengui_.flip_to($1) gengui_.map() tobj.intercept(0) sprint(tstr, "%s Generators", mulfit) if (numarg() > 4) { tobj.map(tstr, $2, $3, $4, $5) }else{ tobj.map(tstr) } genguibox_ = tobj } gengui_.flip_to($1) } proc dgen() { if (object_id(genguibox_) != 0) { genguibox_.unmap } objref gengui_, usepanelbox_ } proc dact() { dgen() objref parmbox, domainbox, domainlist } proc mapsave() { if (object_id(genguibox_)) if (genguibox_.ismapped) { $o2.resize(4) genguibox_.size(&$o2.x[0]) sprint(tstr, "{p.gengui(%d, %g, %g, %g, %g)}", card_, $o2.x[0], $o2.x[1], $o2.x[2], $o2.x[3]) $o1.save(tstr) } if (object_id(parmbox)) if (parmbox.ismapped) { parmbox.size(&$o2.x[0]) sprint(tstr, "{p.showargs(%g, %g, %g, %g)}", $o2.x[0], $o2.x[1], $o2.x[2], $o2.x[3]) $o1.save(tstr) } if (object_id(domainbox)) if (domainbox.ismapped) { domainbox.size(&$o2.x[0]) sprint(tstr, "{p.showdomain(%g, %g, %g, %g)}", $o2.x[0], $o2.x[1], $o2.x[2], $o2.x[3]) $o1.save(tstr) } if (object_id(usepanelbox_)) if (usepanelbox_.ismapped) { usepanelbox_.size(&$o2.x[0]) sprint(tstr, "{p.usepanel(%g, %g, %g, %g)}", $o2.x[0], $o2.x[1], $o2.x[2], $o2.x[3]) $o1.save(tstr) } } proc map() { sprint(tstr, "%s", mulfit) vbox.map(tstr) } proc unmap() { if (object_id(genguibox_) != 0) { genguibox_.unmap } vbox.unmap } proc showargs() {local n n = pf.parmlist.count if (n > 5) { //scrollbox parmbox = new VBox(3,1) }else{ parmbox = new VBox() } parmbox.save("") parmbox.intercept(1) for i=0, n-1 { tobj = pf.parmlist.object(i) xpanel("ParmValues", 1) xcheckbox("", &tobj.doarg) tstr = tobj.name sprint(tstr1, "pf.parmlist.object(%d).play_one()", i) xpvalue(tobj.name, &tobj.val, 1, tstr1) xpanel() } parmbox.intercept(0) parmbox.save("") sprint(tstr, "%s parameters", mulfit) if (numarg() > 3) { parmbox.map(tstr, $1, $2, $3, $4) }else{ parmbox.map(tstr) } objref tobj } proc chdomain() { tobj = domainlist.object($1) sprint(tstr1, "Enter: 0 low high or 1 low high for %s", tobj.name) sprint(tstr, "%d %g %g", tobj.uselog, tobj.low, tobj.high) while (string_dialog(tstr1, tstr)) { if (sscanf(tstr, "%g %g %g", &x1, &x2, &x3) == 3) { tobj.uselog = (x1 != 0) tobj.low = x2 tobj.high = x3 tobj.domain() domainlist.remove($1) domainlist.insrt($1, tobj) objref tobj break }else{ sprint(tstr, "%d %g %g", tobj.uselog, tobj.low, tobj.high) continue_dialog(\ "Must enter three space separated items, e.g. \"0 1e-6 1e6\" or \"1 1e-6 1e6\"") } } } proc uselog() {local i domainlist.remove_all for i=0, pf.parmlist.count-1 { tobj = pf.parmlist.object(i) tobj.uselog = $1 tobj.domain() domainlist.append(tobj) } objref tobj } proc limits() { domainlist.remove_all for i=0, pf.parmlist.count-1 { tobj = pf.parmlist.object(i) tobj.low = $1 tobj.high = $2 tobj.domain() domainlist.append(tobj) } objref tobj } proc showdomain() {local n x1 = x2 = x3 = 0 n = pf.parmlist.count domainlist = new List() for i=0, n-1 { domainlist.append(pf.parmlist.object(i)) } domainbox = new VBox() domainbox.save("") domainbox.intercept(1) xpanel("") xmenu("group attributes") xbutton("use log scale", "uselog(1)") xbutton("use linear scale", "uselog(0)") xbutton("positive definite limits", "limits(1e-9,1e9)") xbutton("unbounded limits", "limits(-1e6,1e6)") xmenu() xlabel("Log low high name ") xpanel() domainlist.browser("", "domain_") domainlist.accept_action("chdomain(hoc_ac_)") domainbox.intercept(0) domainbox.save("") sprint(tstr, "%s Domain", mulfit) if (numarg() > 3) { domainbox.map(tstr, $1, $2, $3, $4) }else{ domainbox.map(tstr) } objref tobj } endtemplate ParmFitnessGui neuron-7.5/share/lib/hoc/mulfit/fitparm.hoc000077500000000000000000000047371323325274500207750ustar00rootroot00000000000000mulfit_optimizers_append("Praxis", "MulfitPraxWrap") begintemplate MulfitPraxWrap // public functions public prun, praxis_efun, after_quad, nquad, showopt, save_optimizer // public variables public minerr, nstep objref savepath, tl, pf, tobj, opt objref start objref prin_origargs, prin_val, prin_fac, prin_ax strdef tstr proc init() { nstep = 0 pf = $o1 start = new Vector() savepath = new File() nquad = 0 st = 0 currenterr = 1e9 attr_praxis(1e-4, .5, 0) e = 0 } proc after_quad() { if (savepath.isopen) { lines += 1 savepath.printf("%d %d %d %-12.8g ", nquad, opt.nefun, opt.time, opt.minerr) saveval() } printf("nquad=%d nefun=%d time=%d e=%-12.8g\n", nquad, opt.nefun, opt.time, opt.minerr) nquad += 1 } proc saveval() { if (numarg() == 1) savepath.printf("%s", $s1) tl = pf.parmlist for i=0, tl.count-1 { savepath.printf("%-12.8g ", tl.object(i).val) } savepath.printf("\n") } func call_opt_efun() { return opt.optwrap_efun($1, &$&2) } func prun() { opt = $o1 if (opt.saveflag) { savepath.wopen("savepath.tmp") // need to put in rank later lines = 0 } nquad = 0 stop_praxis(nstep) after_quad() minerr = fit_praxis(opt.start.size, "call_opt_efun", &opt.start.x[0],"after_quad()\n") if (savepath.isopen) { savepath.close savepath.aopen("savepath.fit") savepath.printf("start\n") savepath.printf("%d %d\n", lines, pf.parmlist.count + 2) savepath.close system("cat savepath.tmp >> savepath.fit") } return minerr } proc showopt() { xlabel("quad forms = 0 means praxis returns by itself") xpvalue("# quad forms before return", &nstep, 1) xbutton("Principal axis variation", "prin_panel()") } proc prin_panel() {local i, narg prin_origargs = new Vector()//TODO narg = pf.doarg_get(prin_origargs) prin_val = new Vector(narg) prin_fac = new Vector(narg) prin_ax = new Matrix(narg, narg) for i=0, narg-1 { prin_val.x[i] = pval_praxis(i, &prin_ax.x[i][0]) } prin_ax = prin_ax.transpose xpanel("Principal Axis Variation") for i=0, narg-1 { sprint(tstr, "%d %g", i, prin_val.x[i]) xpvalue(tstr, &prin_fac.x[i], 1, "prin_dovar()") } xpanel() } proc prin_dovar() { local i, narg narg = prin_val.size tobj = prin_origargs.c tobj.add(prin_ax.mulv(prin_fac)) pf.efun(narg, &tobj.x[0]) print "prin_val" prin_val.printf print "prin_ax" prin_ax.printf print "prin_ax.mulv(prin_fac)" prin_ax.mulv(prin_fac).printf } proc save_optimizer() {localobj vbox vbox = $o1 sprint(tstr, "nstep = %d", nstep) vbox.save(tstr) } endtemplate MulfitPraxWrap neuron-7.5/share/lib/hoc/mulfit/mulfit1.hoc000077500000000000000000000104061323325274500207020ustar00rootroot00000000000000parmfitness_generator_append("MulRunFitter") begintemplate MulRunFitter public p, vbox, save, version, map, unmap, showopt, opt, prun public wfile, rfile, efun, build, title, chtitle public optsave, optrestore external object_index strdef tstr, title, basename_ objref p, vbox, this, fspec, fdat, opt, optbox, nil, tobj, sf, optimizer proc init() { running = 0 sf = new StringFunctions() ranfac = 2 id = object_index(this) + 1 fspec = new File("temp.ft1") fdat = new File("temp.fd1") version_ = 6 title = "Unnamed multiple run protocol" p = new ParmFitnessGui(new ParmFitness(title),this) opt = new OptimizerWrap(p.pf) opt.set_optimizer("MulfitPraxWrap") if (numarg() == 0) { build() map() }else if($1 == 0) { build(0) // this is slave so don't ref by vbox } } proc chtitle() { title = $s1 p.pf.title = $s1 } func version() { if ($1 > version_) { printf("MulrunFitter data format version %d is incompatible with this version %d tool\n",\ $1, version_) stop return 0 } return 1 } func efun() { opt.prun() return opt.minerr } proc map() { sprint(tstr, "%s", this) if (numarg() > 0) { vbox.map(tstr, $2, $3, $4, $5) }else{ vbox.map(tstr) } } proc unref() { if ($1 == 1) { objref p } } proc unmap() { p.dact() objref optbox, opt vbox.unmap } proc build() { vbox = new VBox(3) vbox.priority(100) vbox.save("save()") if (numarg() == 0) { vbox.ref(this) } vbox.dismiss_action("unmap()") vbox.intercept(1) p.map() vbox.intercept(0) } proc showopt() { optbox = new VBox() optbox.save("") optbox.intercept(1) xpanel("") xpvalue("Real time", &opt.time) xpvalue("# multiple runs", &opt.nefun) xpvalue("Minimum so far", &opt.minerr) xpvalue("Randomize with factor", &ranfac, 1, "randomize()") xcheckbox("Append the path to savepath.fit", &opt.saveflag) xcheckbox("Running", &running, "running = !running") xbutton("Stop", "stoprun = 1") xbutton("Optimize", "prun()") if (p.pf.pc.nhost > 1) { xbutton("|| Optimize", "paropt()") } xpanel() xpanel("") opt.showopt() xpanel() optbox.intercept(0) sprint(tstr, "%s Optimize", this) if (numarg() > 3) { optbox.map(tstr, $1, $2, $3, $4) }else{ optbox.map(tstr) } } proc prun() { if (running){ if (boolean_dialog("Running flag is on.", "Turn it off", "Keep it on")){ running = 0 } } stoprun = 0 running = 1 opt.prun() running = 0 } proc paropt() { p.pf.use_parallel(1) opt.prun() p.pf.use_parallel(0) } proc randomize() { p.pf.randomize(ranfac) } proc rfile() { $o1.gets($s3) p.pf.rfile($o1, $o2, $s3) } proc wfile() { $o1.printf("MulRunFitter: %s\n", title) p.pf.wfile($o1, $o2) } proc basename() {local i i = sf.tail($s1, ".*[/:\\]", basename_) if (i == -1) { basename_ = $s1 } } proc read_data() { if (!fspec.ropen()) { fspec.getname(tstr) printf("missing MulRunFit spec file: %s\n", tstr) } if (!fdat.ropen()) { fdat.getname(tstr) printf("missing MulRunFit data file: %s\n", tstr) return } p.pf.rfile(fspec, fdat) fspec.close fdat.close } proc save_data() { fspec.wopen() fdat.wopen() p.pf.wfile(fspec, fdat) fspec.close fdat.close } proc save() { vbox.save("load_file(\"mulfit.hoc\", \"MulRunFitter\")\n}\n{") vbox.save("ocbox_ = new MulRunFitter(1)") vbox.save("}\n{object_push(ocbox_)}\n{") sprint(tstr, "version(%d)", version_) vbox.save(tstr) sprint(tstr, "ranfac = %g", ranfac) vbox.save(tstr) vbox.save(tstr, 1) // get name of session file sprint(tstr, "%s.ft%d", tstr, id) fspec = new File(tstr) vbox.save(tstr, 1) // get name of session file sprint(tstr, "%s.fd%d", tstr, id) fdat = new File(tstr) save_data() fspec.getname(tstr) basename(tstr) // assume session retrieved with load_file sprint(tstr, "fspec = new File(\"%s\")", basename_) vbox.save(tstr) fdat.getname(tstr) basename(tstr) sprint(tstr, "fdat = new File(\"%s\")", basename_) vbox.save(tstr) vbox.save("read_data()") vbox.save("build()") vbox.save("}") tobj = new Vector(4) opt.save_optimizer(vbox) p.mapsave(vbox, tobj) optsave(vbox, tobj) vbox.save("{object_pop()}\n{") } proc optsave() { if (object_id(optbox)) if (optbox.ismapped) { $o2.resize(4) optbox.size(&$o2.x[0]) sprint(tstr, "{optrestore(%g, %g, %g, %g)}", $o2.x[0], $o2.x[1], $o2.x[2], $o2.x[3]) $o1.save(tstr) } } proc optrestore() { showopt($1, $2, $3, $4) } endtemplate MulRunFitter neuron-7.5/share/lib/hoc/mulfit/optwrap.hoc000066400000000000000000000040211323325274500210060ustar00rootroot00000000000000begintemplate OptimizerWrap external classname, mulfit_optimizers_, mulfit_optimizer_names_ // public functions public prun, set_optimizer, save_optimizer, optwrap_efun, showopt // public variables public saveflag, start, nquad, wfile, optimizer, opt_index, minerr, nefun, time objref savepath, tl, pf, tobj, opt, this, start, optimizer strdef tstr proc init() { pf = $o1 start = new Vector() savepath = new File() nefun = 0 st = startsw() time = 0 currenterr = 1e9 saveflag = 0 e = 0 } proc set_optimizer() { for i=0, mulfit_optimizers_.count-1 { // need to know index too if (!strcmp(mulfit_optimizers_.object(i).s, $s1)) { opt_index = i } } sprint(tstr, "optimizer = new %s(pf)", $s1) execute(tstr, this) } func optwrap_efun() {local i nefun += 1 e = pf.efun($1, &$&2) if (!stoprun) { if (minerr == -1 || e < minerr) { minerr = e } } doNotify() time = startsw() - st return e } proc saveval() { if (numarg() == 1) savepath.printf("%s", $s1) tl = pf.parmlist for i=0, tl.count-1 { savepath.printf("%-12.8g ", tl.object(i).val) } savepath.printf("\n") } func prun() { nefun = 0 minerr = -1 pf.doarg_get(start) nquad = 0 if (start.size == 0) { minerr = pf.efun(0, &time) // time is dummy here }else{ minerr = optwrap_efun(start.size, &start.x[0]) if (stoprun) {return minerr} st = startsw() time = startsw() - st minerr = optimizer.prun(this) time = startsw() - st minerr = optwrap_efun(start.size, &start.x[0]) } return minerr } proc showopt() { sprint(tstr, "%s specific items", mulfit_optimizer_names_.object(opt_index).s) xlabel(tstr) optimizer.showopt() } strdef opt_class proc save_optimizer() { localobj vbox vbox = $o1 classname(optimizer, opt_class) // set the optimizer than let it save itself sprint(tstr, "opt.set_optimizer(\"%s\")", mulfit_optimizers_.object(opt_index).s) vbox.save(tstr) vbox.save("{object_push(opt.optimizer)}") vbox.save("{") optimizer.save_optimizer(vbox) vbox.save("}") vbox.save("{object_pop()}") } endtemplate OptimizerWrap neuron-7.5/share/lib/hoc/mulfit/protorun.hoc000077500000000000000000000072051323325274500212140ustar00rootroot00000000000000// a fitness generator that does a run begintemplate RunConstant public p, onval, offval, name, clone objref p strdef name proc init() { name = $s1 p = new Pointer($s1) onval = p.val offval = p.val } proc clone() { $o1 = new RunConstant(name) $o1.onval = onval $o1.offval = offval } endtemplate RunConstant // RunStatements are executed before the run, after the run, or both. // For all three cases, before the run, hoc_ac_ = 1, after the run hoc_ac=0 begintemplate RunStatement public stmt, do_before, clone strdef stmt proc init() { do_before = $1 // before run if 1 after run if 0, both if 2 stmt = $s2 } proc clone() { $o1 = new RunStatement(do_before, stmt) } endtemplate RunStatement begintemplate FitnessRun public frun, save_up, save_down, up, down, rfile, wfile, constantlist public stmtlist, clone public save_context, restore_context external run objref constantlist, stmtlist, rc, sf strdef tstr proc init(){ sf = new StringFunctions() constantlist = new List() stmtlist = new List() on=0 off=0 } proc save_context() {local i $o1.pack(constantlist.count) for i=0, constantlist.count-1 { rc = constantlist.object(i) $o1.pack(rc.p.s, rc.onval, rc.offval) } $o1.pack(stmtlist.count) for i=0, stmtlist.count-1 { rc = stmtlist.object(i) $o1.pack(rc.do_before, rc.stmt) } } proc restore_context() {local i, n constantlist.remove_all stmtlist.remove_all n = $o1.upkscalar for i=0, n-1 { rc = new RunConstant($o1.upkstr(tstr)) $o1.unpack(&rc.onval, &rc.offval) constantlist.append(rc) } n = $o1.upkscalar for i=0, n-1 { rc = new RunStatement($o1.upkscalar, $o1.upkstr(tstr)) stmtlist.append(rc) } } proc clone() {local i $o1 = new FitnessRun() for i=0, constantlist.count-1 { constantlist.object(i).clone(rc) $o1.constantlist.append(rc) } for i=0, stmtlist.count-1 { stmtlist.object(i).clone(rc) $o1.stmtlist.append(rc) } } proc frun() { up() run() down() } proc up() {local i for i=0, constantlist.count-1 { rc = constantlist.object(i) rc.p.val = rc.onval } for i=0, stmtlist.count-1 { rc = stmtlist.object(i) if (rc.do_before > 0) { hoc_ac_ = 1 execute(rc.stmt) } } } proc down() {local i for i=0, constantlist.count-1 { rc = constantlist.object(i) rc.p.val = rc.offval } for i=0, stmtlist.count-1 { rc = stmtlist.object(i) if (rc.do_before != 1) { hoc_ac_ = 0 execute(rc.stmt) } } } proc save_up() {local i for i=0, constantlist.count-1 { rc = constantlist.object(i) rc.onval = rc.p.val } } proc save_down() {local i for i=0, constantlist.count-1 { rc = constantlist.object(i) rc.offval = rc.p.val } } proc wfile() {local i for i=0, constantlist.count - 1 { rc = constantlist.object(i) if (i== 0) { $o1.printf("\t\tRunConstant:\t") }else{ $o1.printf("\t\t\t\t") } $o1.printf("%s %g %g\n", rc.p.s, rc.onval, rc.offval) } for i=0, stmtlist.count - 1 { rc = stmtlist.object(i) if (i== 0) { $o1.printf("\t\tRunStatement:\t") }else{ $o1.printf("\t\t\t\t") } $o1.printf("%d, %s\n", rc.do_before, rc.stmt) } } proc rfile() { while(1) { if (sf.substr($s2, "RunConstant:") > -1) { sscanf($s2, "%*[^:]:%s %g %g", tstr, &on, &off) }else if (sf.substr($s2, ":") > -1) { break }else{ sscanf($s2, "%s %g %g", tstr, &on, &off) } rc = new RunConstant(tstr) rc.onval = on rc.offval = off constantlist.append(rc) $o1.gets($s2) } while(1) { if (sf.substr($s2, "RunStatement:") > -1) { sscanf($s2, "%*[^:]:%d, %[^\n]", &on, tstr) }else if (sf.substr($s2, ":") > -1) { break }else{ sscanf($s2, "%d, %[^\n]", &on, tstr) } rc = new RunStatement(on, tstr) stmtlist.append(rc) $o1.gets($s2) } } endtemplate FitnessRun neuron-7.5/share/lib/hoc/mview.hoc000077500000000000000000000010701323325274500171450ustar00rootroot00000000000000objref nil, tobj {load_file("chanbild.hoc")} // need KSTransHelper { xopen("mview/treeview.hoc") xopen("mview/mviewgui.hoc") xopen("mview/distinct.hoc") xopen("mview/parmsets.hoc") xopen("mview/parmvals.hoc") xopen("mview/secanal.hoc") xopen("mview/ppanal.hoc") xopen("mview/artview.hoc") xopen("mview/realcell.hoc") xopen("mview/distinctparm.hoc") xopen("mview/ncview.hoc") xopen("mview/rcclasses.hoc") xopen("mview/allcell.hoc") xopen("mview/allpp.hoc") xopen("mview/mviewxml.hoc") xopen("mview/mview1.hoc") } proc mview() { tobj = new ModelView() tobj = nil } neuron-7.5/share/lib/hoc/mview/000077500000000000000000000000001323325274500164515ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/mview/Makefile.am000077500000000000000000000006411323325274500205110ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocmviewdir = $(neuronhomehocdir)/mview neuronhomehocmview_DATA = \ allcell.hoc allpp.hoc artview.hoc distinct.hoc distinctparm.hoc \ mview1.hoc mviewgui.hoc ncview.hoc parmsets.hoc parmvals.hoc \ ppanal.hoc rcclasses.hoc realcell.hoc secanal.hoc treeview.hoc \ mviewxml.hoc EXTRA_DIST = $(neuronhomehocmview_DATA) neuron-7.5/share/lib/hoc/mview/Makefile.in000066400000000000000000000446721323325274500205330ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/mview ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehocmviewdir)" DATA = $(neuronhomehocmview_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocmviewdir = $(neuronhomehocdir)/mview neuronhomehocmview_DATA = \ allcell.hoc allpp.hoc artview.hoc distinct.hoc distinctparm.hoc \ mview1.hoc mviewgui.hoc ncview.hoc parmsets.hoc parmvals.hoc \ ppanal.hoc rcclasses.hoc realcell.hoc secanal.hoc treeview.hoc \ mviewxml.hoc EXTRA_DIST = $(neuronhomehocmview_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/mview/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/mview/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehocmviewDATA: $(neuronhomehocmview_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehocmview_DATA)'; test -n "$(neuronhomehocmviewdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehocmviewdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehocmviewdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehocmviewdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehocmviewdir)" || exit $$?; \ done uninstall-neuronhomehocmviewDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehocmview_DATA)'; test -n "$(neuronhomehocmviewdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehocmviewdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomehocmviewdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomehocmviewDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomehocmviewDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehocmviewDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomehocmviewDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/mview/allcell.hoc000077500000000000000000000045631323325274500205670ustar00rootroot00000000000000begintemplate ModelViewAllCell public mkdisplay, mechs, sall, dall, kschans objref disp, dall, sall, this, nil, tobj objref dmech, dparm, dpelm, disp1, disp2, ms, mview strdef tstr, name proc init() { mview = $o1 sall = new SectionList() sprint(tstr, "forall %s.sall.append()", this) execute(tstr) } proc mkdisplay() {local i dall = new ModelViewSeclistAnalysis(mview, sall) dall.analyse() if (dall.all.count == 0) { return } disp = new TreeViewItem(nil, "Density Mechanisms", dall, -2) $o1.display.top.append(disp) disp1 = new TreeViewItem(disp, "Mechanisms in use", dall, -2) miu(disp1) disp1 = new TreeViewItem(disp, "Homogeneous Parameters", dall, -2) disp2 = new TreeViewItem(disp, "Heterogeneous Parameters", dall, -2) homo(disp1, disp2) disp1 = new TreeViewItem(disp, "Global parameters for density mechanisms", dall, -2) glob($o1, disp1) disp1 = new TreeViewItem(disp, "KSChan definitions for density mechanisms", dall, -2) kschan($o1, disp1) } iterator mechs() {local i for i=0, dall.dmlist.count-1 { $o1 = dall.dmlist.object(i) if (object_id($o1.location)) { iterator_statement } } } iterator kschans() {local i, j tobj = new List("KSChan") for j=0, dall.dmlist.count-1 { dmech = dall.dmlist.object(j) if (object_id(dmech.location)) { for i=0, tobj.count-1 { if (strcmp(tobj.object(i).name, dmech.name) == 0) { $o1 = tobj.object(i) iterator_statement } } } } tobj = nil } proc miu() { for mechs(dmech) { $o1.append(dmech.name, dmech.location, 0) } } proc homo() {local i, n for mechs(dmech) { for dmech.parmiter(dparm) { for dparm.parmiter(dpelm) { n = 0 for i = 0, dpelm.parms.count-1 { tobj = dpelm.parms.object(i) if (tobj.type() == 1) { n += 1 }else if (tobj.type() == 2) { n += tobj.vec.size } } if (n == 1) { dparm.display($o1, tstr, n, dmech.location) }else if (n > 1) { dparm.display($o2, tstr, n, dmech.location) } } } } } proc glob() {local i, j, size for mechs(dmech) { if (strcmp(dmech.name, "Ra") == 0) { continue } $o1.glob($o2, dmech.name) } } proc kschan() {local i, j, size tobj = new List("KSChan") for mechs(dmech) { for i=0, tobj.count-1 { if (strcmp(tobj.object(i).name, dmech.name) == 0) { dmech.kschan = tobj.object(i) $o1.kschan($o2, tobj.object(i)) } } } tobj = nil } endtemplate ModelViewAllCell neuron-7.5/share/lib/hoc/mview/allpp.hoc000077500000000000000000000021671323325274500202650ustar00rootroot00000000000000begintemplate ModelViewAllPP public mkdisplay, ppa objref mview, ppa, tobj, mt, disp, tobj1, nil strdef tstr, name proc init() { mview = $o1 ppa = new ModelViewPPAnalysis(mview) } proc mkdisplay() {local i for mview.artcell_types(mt, tobj, 0) { for i = 0, tobj.count - 1 { ppa.ppsappend(tobj.object(i), mt.selected()) } } ppa.analyse() ppa.mkdisplay($o1) disp = new TreeViewItem($o1, "Global parameters for Point Processes") for mview.artcell_types(mt, tobj, 0) { mt.selected(name) mview.glob(disp, name) } disp = new TreeViewItem($o1, "KSChan definitions for Point Processes") kschan($o1, disp) } proc kschan() {local i, j, size, sing tobj = new List("KSChan") sing = 0 if (tobj.count > 0) { for i=0, tobj.count - 1 { if (tobj.object(i).single) { sing = 1 } } } if (sing) { sprint(tstr, "%s.vres(%g)", tobj.object(0), tobj.object(0).vres) $o2.append(tstr, nil, 0) } for mview.artcell_types(mt, tobj1, 0) { for i=0, tobj.count - 1 { mt.selected(name) if (strcmp(tobj.object(i).name, name) == 0) { mview.kschan($o2, tobj.object(i)) } } } tobj = nil } endtemplate ModelViewAllPP neuron-7.5/share/lib/hoc/mview/artview.hoc000077500000000000000000000052771323325274500206430ustar00rootroot00000000000000begintemplate ModelViewArtCell public selpp, selsub, grph, unlink, alist objref mview, disp, mt, alist, tobj, tobj1, amech, ms, pmat objref distinctvalues, dislist, this strdef tstr proc init() { mview = $o1 distinctvalues = mview.distinctvalues disp = $o2 analyse() display() } proc unlink() {local i if (object_id(alist)) for i=0, alist.count - 1 { alist.object(i).unlink() } objref mview, disp, mt, alist, tobj, tobj1, amech, ms, pmat objref distinctvalues, dislist } proc analyse() { dislist = new List() alist = new List() for mview.artcell_types(mt, tobj, 1) { amech = new ModelViewPMech(mt.selected(tstr), this) alist.append(amech) amech.pps = tobj ms = new MechanismStandard(tstr) amech.fill(ms) amech.subsets.subsets.append(new ModelViewParmSubset(new Vector(amech.pps.count), amech)) amech.subsets.subsets.object(0).subset.indgen mk_amech() } } proc mk_amech() {local i, iname, is, size, icol if (amech.parms.count == 0) { return } pmat = new Matrix(amech.pps.count, amech.parms.count) for i=0, amech.pps.count-1 { ms.in(amech.pps.object(i)) icol = 0 for iname=0, ms.count-1 { size = ms.name(tstr, iname) for is = 0, size-1 { pmat.x[i][icol] = ms.get(tstr, is) icol += 1 } } } icol = 0 for iname=0, ms.count-1 { size = ms.name(tstr, iname) for is=0, size-1 { parm_assess(pmat.getcol(icol), iname, is) icol += 1 } } } func parm_assess() {local n, i, val n = distinctvalues.ndistinct($o1) if (n == 0) { return n } if (n > 20) { sprint(tstr, "%d values ranging from %g to %g", n, distinctvalues.min, distinctvalues.max) amech.parms.object($2).parmelms.object($3).append(new ModelViewParmStr(tstr, amech.subsets.subsets.object(0))) }else{ distinctvalues.dislist(dislist) for i=0, dislist.count-1 { tobj1 = dislist.object(i) val = $o1.x[tobj1.x[0]] addparm2subset(tobj1, val, $2, $3) } } if (n > 1) { amech.grph = this amech.parms.object($2).parmelms.object($3).dmech = amech } return n } proc grph() { mview.gui.pgrph($o1,$o2) } proc addparm2subset() {local i i = amech.subsets.isubset($o1.c.index(amech.subsets.subsets.object(0).subset, $o1).sort, amech) tobj1 = new ModelViewParmVal($2, amech.subsets.subsets.object(i)) amech.append($3,$4,tobj1) amech.subsets.subsets.object(i).parmlist.append(tobj1) } proc selpp() { // printf("ModelViewArtCell selpp\n") } proc selsub() { // printf("ModelViewArtCell selsub\n") } proc display() {local i for i=0, alist.count - 1 { alist.object(i).display(disp, tstr) } if (alist.count == 0) { return } tobj1 = new TreeViewItem(disp, "Global parameters for Artificial Cells") for i=0, alist.count - 1 { mview.glob(tobj1, alist.object(i).name) } } endtemplate ModelViewArtCell neuron-7.5/share/lib/hoc/mview/distinct.hoc000077500000000000000000000032261323325274500207730ustar00rootroot00000000000000begintemplate ModelViewDistinctValues public ndistinct, dislist, sortx, scaled, pscl, min, max objref sortx, scaled proc init() { scaled = new Vector() sortx = new Vector() } //return number of distinct values // computed pscl is the scale factor // for comparison (in case values are very close to 0) // sortx is the sortindex func ndistinct() {local fe, i, j, val, distinct if ($o1.size == 0) { return 0 } distinct = 1 // do not allow the sentinals to affect the scale if ($o1.indwhere("==", -1e50) == -1) { min = $o1.min max = $o1.max }else{ scaled.index($o1, scaled.indvwhere($o1, "!=", -1e50)) if (scaled.size == 0) { return 0 }// only inhomogeneous min = scaled.min max = scaled.max } pscl = abs(min) + abs(max) fe = float_epsilon float_epsilon = 0 if (pscl == 0) { pscl = 1 } // value = 0 case float_epsilon = fe sortx = $o1.sortindex scaled.copy($o1) scaled.div(pscl) j = sortx.x[0] val = scaled.x[j] for i=1, sortx.size-1 { j = sortx.x[i] if (scaled.x[j] != val) { val = scaled.x[j] distinct += 1 } } return distinct // not uniform } // assume ndistinct has been called so sortx is the sortindex and scaled // are scaled values. This builds a list // of vectors of subset indices each of which has constant parm value // argument must be a List proc dislist() {local i, j, dcnt, val // do not change tstr $o1.remove_all() $o1.append(new Vector()) j = sortx.x[0] val = scaled.x[j] dcnt = 0 $o1.object(dcnt).append(j) for i=1, sortx.size-1 { j = sortx.x[i] if (scaled.x[j] != val) { val = scaled.x[j] $o1.append(new Vector()) dcnt += 1 } $o1.object(dcnt).append(j) } } endtemplate ModelViewDistinctValues neuron-7.5/share/lib/hoc/mview/distinctparm.hoc000077500000000000000000000056231323325274500216560ustar00rootroot00000000000000begintemplate ModelViewDistinctParameters external nil, hoc_sf_ objref this, tobj, tobj1, mt, dparm, allsec, modelview objref mlist, pvec, ms, inhomo, distinctvalues strdef tstr, mname, pname in_=0 x=0 is_ion = 0 proc init() {local i modelview = $o1 distinctvalues = modelview.distinctvalues allsec = modelview.allsec dparm = new TreeViewItem(nil, "") modelview.display.top.append(dparm) mkdparm() if (dparm.children != nil) { i = dparm.children.count } sprint(tstr, "%d heterogeneous parameters", i) dparm.str(tstr) allsec = nil } proc mkdparm() {local i, j, k i = 0 forsec allsec {i += nseg} if (i<2) return pvec = new Vector(i) for modelview.strings(pname, "nseg", "Ra", "rallbranch", "L") { pvec.resize(0) sprint(tstr, "forsec allsec pvec.append(%s)", pname) execute(tstr, this) distinct() } mt = new MechanismType(0) for i = 0, mt.count - 1 { mt.select(i) mt.selected(mname) mlist = new SectionList() j = 0 forsec allsec if (ismembrane(mname)) { j += 1 mlist.append() } if (j) { if (hoc_sf_.tail(mname, "_ion", tstr) != -1) { ms = new MechanismStandard(mname, 0) is_ion = 1 }else{ ms = new MechanismStandard(mname, 1) is_ion = 0 } for j=0, ms.count-1 { size = ms.name(pname, j) for k=0, size-1 { pvec.resize(0) if (size > 1) { sprint(tstr, "forsec mlist if (doit(%d)) for(x,0) {pvec.append(%s[%d](x))}", j, pname, k) }else{ sprint(tstr, "forsec mlist if (doit(%d)) for(x,0) {pvec.append(%s(x))}", j, pname) } execute(tstr, this) distinct() } } } } mt = new MechanismType(1) for i=0, mt.count-1 { mt.select(i) mt.selected(mname) tobj = new List(mname) if (tobj.count > 0) { ms = new MechanismStandard(mname, 1) for j=0, ms.count-1 { size = ms.name(pname, j) for k=0, size-1 { pvec.resize(0) if (size > 1) { sprint(tstr, "for in_=0, tobj.count-1 {pvec.append(tobj.object(in_).%s[%d])}", pname, k) }else{ sprint(tstr, "for in_=0, tobj.count-1 {pvec.append(tobj.object(in_).%s)}", pname) } execute(tstr, this) distinct(mname) } } } } mname = "NetCon" tobj = new List(mname) if (tobj.count > 1) { for modelview.strings(pname, "weight", "delay", "threshold") { pvec.resize(0) sprint(tstr, "for in_=0, tobj.count-1 {pvec.append(tobj.object(in_).%s)}", pname) execute(tstr, this) distinct(mname) } } printf("\n") } func doit() {local i, b b = 1 if (is_ion) { b = 0 i = ion_style(mname) i = ((i%4) == 1) + 2*((int(i/8)%4) == 1) if (i==1 &&($1 == 1 || $1 == 2)) { b = 1 } if (i == 2 && $1 == 0) { b = 1 } } return b } proc distinct() { if (pvec.size) { n = distinctvalues.ndistinct(pvec) if (n > 1) { if (numarg() == 0) { sprint(tstr, "%-3d %s", n, pname) }else{ sprint(tstr, "%-3d %s.%s", n, $s1, pname) } dparm.append(tstr) } } } endtemplate ModelViewDistinctParameters neuron-7.5/share/lib/hoc/mview/mview1.hoc000077500000000000000000000255201323325274500203630ustar00rootroot00000000000000begintemplate ModelView public rlist, display, selected, allsec, strings, artcell_types, realcells public glob, gui, destroy, distinctvalues, kschan, dparm, acview, xml public count_artcells, appv, text public seclists external nil, classname, hoc_sf_ objref this, realcells_, tobj, tobj1, mt, rc_classes, dparm, allsec objref ms, display, storecm, cdis, adis, acview, ncv, appv, pdis, gui objref topcelldis, distinctvalues, tvi, tvi2, kst, ksth, xml objref seclists, pyobj strdef tstr, tstr1, cond, name in_=0 x=0 is_ion = 0 proc destroy() {local i display.unlink() display = nil destroy1(new List("ModelViewSeclistAnalysis")) destroy1(new List("ModelViewPPAnalysis")) // destroy1(new List("ModelViewArtCell")) if (acview != nil) {acview.unlink()} if (ncv != nil) {ncv.unlink()} objref realcells_, tobj, tobj1, mt, rc_classes, dparm, allsec objref ms, display, storecm, cdis, adis, acview, ncv, appv, pdis, gui objref topcelldis, distinctvalues } proc destroy1() {local i for (i = $o1.count-1; i >= 0; i -= 1) { if ($o1.object(i).mview == this) { $o1.object(i).unlink() } } } proc init() {local i, n, icdis, ntop, has_rxd if (nrnpython("import neuron")) { pyobj = new PythonObject() } distinctvalues = new ModelViewDistinctValues() ndrco = 0 // n distinct real cell objects realcells_ = new List() display = new TreeView() what_are_the_sectionlists() mkallsec() mkrlist() i = 0 n = 0 forsec allsec {i += nseg n += 1} sprint(tstr, "%d sections; %d segments", n, i) display.top.append(new TreeViewItem(nil, tstr)) display.top.append(new TreeViewItem(nil, "")) i = count_rco() // sets ndrco and rc_classes if (i == 0) { sprint(tstr, "%d real cells", realcells_.count) }else{ sprint(tstr, "%d real cells (%d encapsulated in %d distinct objects of %d classes)", realcells_.count, i, ndrco, rc_classes.count) } cdis = new TreeViewItem(nil, tstr) display.top.append(cdis) icdis = display.top.count i = count_artcells() // sets nc if (i == 0) { sprint(tstr, "%d artificial cells", i) }else{ sprint(tstr, "%d artificial cells of %d base classes", i, nc) } adis = new TreeViewItem(nil, tstr) display.top.append(adis) acview = new ModelViewArtCell(this, adis) i = count_pps() // sets nc if (i == 0) { sprint(tstr, "%d point processes", i) }else{ sprint(tstr, "%d point processes (%d can receive events) of %d base classes",i, count_nrs(), nc) } pdis = new TreeViewItem(nil, tstr) ntop = 0 for i=0, realcells_.count-1 { if (realcells_.object(i).cellobj == nil) { ntop += 1 } } if (ntop > 1 && rc_classes.count > 0) { sprint(tstr, "%d top level cells", ntop) topcelldis = new TreeViewItem(cdis, tstr) }else{ topcelldis = cdis } for i=0, realcells_.count-1 { if (realcells_.object(i).cellobj == nil) { realcells_.object(i).mkdisplay(topcelldis) } } for i=0, rc_classes.count-1 { rc_classes.object(i).mkdisplay(cdis) } tobj = new List("NetCon") sprint(tstr, "%d NetCon objects", tobj.count) display.top.append(new TreeViewItem(nil, tstr)) if (tobj.count != 0) { ncv = new ModelViewNetCon(tobj, display.top.object(display.top.count - 1), this) } tobj = new List("LinearMechanism") sprint(tstr, "%d LinearMechanism objects", tobj.count) display.top.append(new TreeViewItem(nil, tstr)) display.top.append(new TreeViewItem(nil, "")) dparm = new ModelViewAllCell(this) dparm.mkdisplay(this) display.top.append(pdis) has_rxd = 0 if (object_id(pyobj) != 0) { has_rxd = pyobj.neuron._has_scipy() } if (has_rxd) { nrnpython("import neuron.rxd") pyobj.neuron.rxd._model_view(display.top) } appv = new ModelViewAllPP(this) appv.mkdisplay(pdis) if (numarg() == 1) if ( $1 == 0 ) { return } gui = new ModelViewGUI(this) display.before = gui // display.top.append(new TreeViewItem(nil, "")) xml = new ModelViewXML(this) // tobj = new TreeViewItem(nil, "Export XML", xml, 2 ) // display.top.append(tobj) } proc text() {local i localobj file print "inside text" file = new File() file.chooser("w", "Copy treeview to text file", "*.txt") if (file.chooser()) { file.wopen() for i=0, display.top.count-1 { textout(file, display.top.object(i)) } file.close() } } proc textout() { local i $o1.printf("%s\n", $o2.s) if ($o2.children != nil) { for i=0, $o2.children.count-1 { textout($o1, $o2.children.object(i)) } } } proc mkallsec() { allsec = new SectionList() sprint(tstr, "forall %s.append()", allsec) execute(tstr) } proc mkrlist() { forsec allsec{ tobj = new SectionRef() if (!tobj.has_parent) { realcells_.append(new ModelViewRealCell(this)) } } tobj = nil } iterator artcell_types() {local i $o1 = new MechanismType(1) for i=0, $o1.count-1 { if ($o1.is_artificial(i) == $3) { $o1.select(i) $o1.selected(tstr) $o2 = new List(tstr) if ($o2.count > 0) { iterator_statement } } } } iterator realcells() {local i for i=0, realcells_.count - 1 { $o1 = realcells_.object(i) iterator_statement } } iterator strings() {local i, n n = numarg() for i=2, n { $s1 = $si iterator_statement } } func count_artcells() { local cnt // and also return count of classes in nc nc = 0 cnt = 0 for artcell_types(mt, tobj, 1) { cnt += tobj.count nc += 1 } tobj = nil return cnt } func count_pps() { local cnt, i // and also return count of classes in nc cnt = 0 nc = 0 storecm = new Vector(realcells_.count) assoc_cell_number(1) for artcell_types(mt, tobj, 0) { cnt += tobj.count nc += 1 rcell_pps(tobj) } assoc_cell_number(0) tobj = nil return cnt } // store cell number in cm of first seg of root of cell (and restore original cm proc assoc_cell_number() {local i, j i = 0 forsec allsec { tobj = new SectionRef() if (!tobj.has_parent) { if ($1 == 1) { storecm.x[i] = cm(.00001) cm(.00001) = i }else{ cm(.00001) = storecm.x[i] } i += 1 } } } proc rcell_pps() {local i, j for i=0, $o1.count-1 { if (!$o1.object(i).has_loc()) { continue } $o1.object(i).get_loc() tobj1 = new SectionRef() pop_section() j = tobj1.root.cm(.00001) realcells_.object(j).ppsappend($o1.object(i), mt.selected) } } func count_nrs() { local cnt cnt = 0 for artcell_types(mt, tobj, 0) { if (mt.is_netcon_target(mt.selected())) { cnt += tobj.count } } tobj = nil return cnt } func count_rco() {local i, cnt, x // and also makes list of classes and counts distinct objects ndrco = 0 // n distinct real cell objects cnt = 0 tobj1 = new Vector(realcells_.count) tobj1.resize(0) rc_classes = new List() for i=0, realcells_.count-1 { tobj = realcells_.object(i) x = object_id(tobj.cellobj) if (x) { cnt += 1 tobj1.append(x) add_type(rc_classes, tobj) } } for i=0, rc_classes.count-1 { rc_classes.o(i).mklist() } if (cnt > 0) { tobj1.sort ndrco = 1 x = tobj1.x[0] for i=1, tobj1.size-1 { if (x != tobj1.x[i]) { ndrco += 1 x = tobj1.x[i] } } } tobj = nil tobj1 = nil return cnt } proc add_type() {local i classname($o2.cellobj, tstr) if (strcmp(tstr, "PythonObject") == 0) { // __str__ not always defined //hoc_sf_.head($o2.cellobj.__str__(), " object at", tstr) if (hoc_sf_.head(pyobj.str($o2.cellobj), " ", tstr) < 0) { tstr = pyobj.str($o2.cellobj) } } for i=0, $o1.count-1 { if (strcmp($o1.object(i).tname, tstr) == 0) { $o1.object(i).rcell.append($o2) return } } $o1.append(new ModelViewRCClasses(this, tstr, $o2)) } proc glob() {local i, j, size ms = new MechanismStandard($s2, -1) if (ms.count == 0) { return } tobj = new TreeViewItem($o1, $s2) for i=0, ms.count -1 { size = ms.name(name, i) if (size == 1) { sprint(tstr, "hoc_ac_ = %s", name) execute(tstr) sprint(tstr, "%s = %g", name, hoc_ac_) tobj.append(tstr) }else if (size < 20){ for j=0, size-1 { sprint(tstr, "hoc_ac_ = %s[%d]", name, j) execute(tstr) sprint(tstr, "%s[%d] = %g", name, j, hoc_ac_) tobj.append(tstr) } }else{ sprint(tstr, "%s[0 - %d]", name, size-1) tobj.append(tstr) } } } proc kschan() { local i, it sprint(tstr, "%-50s (%s)", $o2.name, $o2) tvi = new TreeViewItem($o1, tstr) cond = "g = gmax" if (strcmp($o2.ion, "NonSpecific") == 0) { sprint(tstr, "i = g*(v - e)") }else if ($o2.iv_type == 0) { sprint(tstr, "i = g*(v - e%s)", $o2.ion) }else{ sprint(tstr1, "%s_ion", $o2.ion) sprint(tstr, "i = p*ghk(v, %si, %so, %d)", $o2.ion, $o2.ion, ion_charge(tstr1)) cond = "p = pmax" } tvi.append(tstr, nil, 0) for i=0, $o2.ngate-1 { ksgate1($o2, $o2.gate(i)) sprint(cond, "%s * %s", cond, tstr) } tvi.append(cond, nil, 0) it = 0 for i=0, $o2.ngate-1 { ksgate1($o2, $o2.gate(i)) sprint(tstr, "%-52s (%s)", tstr, $o2.gate(i)) tvi2 = new TreeViewItem(tvi, tstr) if ($o2.gate(i).nstate == 1) { // hh gate kst = $o2.trans(it) it += 1 tobj = kst.src() if (kst.type == 1) { sprint(tstr, "%s' = (inf - %s)/tau", tobj.name, tobj.name) }else{ sprint(tstr, "%s' = a*(1 - %s) - b*%s", tobj.name, tobj.name, tobj.name) } sprint(tstr, "%-52s (%s)", tstr, kst) tvi2.append(tstr, nil, 0) kstrans2($o2, kst) }else{ for it=0, $o2.ntrans-1 { kst = $o2.trans(it) if (kst.src.gate.index == i) { kstrans1($o2, kst) kstrans2($o2, kst) } } } } } proc ksgate1() { local i, enclose enclose = 0 tstr = "" for i = 0, $o2.nstate-1 { tobj = $o1.state($o2.sindex + i) if (tobj.frac == 1) { if (strcmp(tstr, "") == 0) { sprint(tstr, "%s", tobj.name) }else{ enclose = 1 sprint(tstr, "%s + %s", tstr, tobj.name) } }else if (tobj.frac > 0) { if (strcmp(tstr, "") == 0) { sprint(tstr, "%.4g*%s", tobj.frac, tobj.name) enclose = 1 }else{ enclose = 1 sprint(tstr, "%s + %.4g*%s", tstr, tobj.frac, tobj.name) } } } if (strcmp(tstr, "") == 0) { tstr = "0" } if (enclose) { sprint(tstr, "(%s)", tstr) } if ($o2.power != 1) { sprint(tstr, "%s^%d", tstr, $o2.power) } } proc kstrans1() { tstr = $o2.src.name if (strcmp($o2.ligand, "") != 0) { sprint(tstr, "%s + %s", tstr, $o2.ligand) } sprint(tstr, "%s <-> %s", tstr, $o2.target.name) if ($o2.type == 1) { sprint(tstr, "%s (inf, tau)", tstr) }else{ sprint(tstr, "%s (a, b)", tstr) } sprint(tstr, "%-52s (%s)", tstr, $o2) tvi2.append(tstr, nil, 0) } proc kstrans2() { local i if (ksth == nil) { ksth = new KSTransHelper() } for i=0, 1 { ksth.coef($o2, i, $o2.type, tstr1) ksth.form($o2, i, tstr) sprint(tstr, " %s = %s", tstr1, tstr) sprint(tstr, "%-55s (%s)", tstr, $o2.parm(i)) tvi2.append(tstr, nil, 0) } } proc what_are_the_sectionlists() {local i // must be called near the beginning in order so as not // to count the ones we create in ModelView // the reason we take the trouble to identify them is in order // to reuse their existing names. tobj = new List("SectionList") // but not referenced seclists = new List() for i=0, tobj.count-1 { seclists.append(tobj.object(i)) // print tobj.object(i) } tobj = nil } endtemplate ModelView neuron-7.5/share/lib/hoc/mview/mviewgui.hoc000077500000000000000000000123741323325274500210120ustar00rootroot00000000000000begintemplate ModelViewGUI public b, sh, selsub, selsec, selpp, selected, grph, pgrph external nil, hoc_sf_ objref modelview, this, b, sh, bsh, g, bg objref all, svec, xvec, psh, yvec, tobj, xpvec strdef tstr proc init() { x = 0 j = 0 sh_map_ = 0 g_map_ = 0 spacepl_ = 0 modelview=$o1 build() map() } proc destroy() { if (sh_map_) { sh_dismiss() } if (g_map_) { g_dismiss() } modelview.destroy() objref modelview, sh, bsh, g, bg objref all, svec, xvec, psh, yvec, xpvec b.unmap() } proc build() { b = new VBox() b.dismiss_action("destroy()") b.save("") b.ref(this) b.intercept(1) xpanel("") xmenu("File") xbutton("Write text", "modelview.text()") xmenu("Export to NeuroML (Warning: run define_shape() first!)") xbutton("Write NeuroML Level 1 (anatomy only)", "modelview.xml.xportLevel1()") xbutton("Write NeuroML Level 2 (anatomy and biophysics)", "modelview.xml.xportLevel2()") xmenu() xmenu() xpanel() modelview.display.browser("") b.intercept(0) } proc map() { sprint(tstr, "%s", modelview) b.map(tstr, 200, 300, 600, 500) } proc shape() { if (object_id(sh) == 0) { build_sh() } if (sh_map_ == 0) { sprint(tstr, "%s Shape", modelview) bsh.map(tstr) sh_map_ = 1 sh.point_mark_remove() sh.color_all(9) } } proc build_sh() { bsh = new VBox() bsh.save("") bsh.ref(this) bsh.intercept(1) xpanel("") xmenu("LengthScale") xradiobutton("Normal", "ls(0)", 1) xradiobutton("Topological", "ls(1)") xradiobutton("Scale long sections", "ls(2)") xmenu() xpanel() sh = new Shape() bsh.intercept(0) bsh.dismiss_action("sh_dismiss()") } proc ls() { if ($1 == 1) { sprint(tstr, "forall %s.len_scale(100/L)", sh) }else if ($1 == 2) { sprint(tstr, "forall if (L > 20*diam) %s.len_scale(.2) else %s.len_scale(1) ", sh, sh) }else{ sprint(tstr, "forall %s.len_scale(1)", sh) } execute(tstr) doNotify() sh.exec_menu("View = plot") } proc sh_sp() { psh.exec_menu("Time Plot") doNotify() psh.exec_menu("View = plot") if (spacepl_) { psh.exec_menu("Space Plot") }else{ psh.exec_menu("Shape Plot") } } proc lspsh() { if ($1 == 1) { sprint(tstr, "forall %s.len_scale(100/L)", psh) }else if ($1 == 2) { sprint(tstr, "forall if (L > 20*diam) %s.len_scale(.2) else %s.len_scale(1) ", psh, psh) }else{ sprint(tstr, "forall %s.len_scale(1)", psh) } execute(tstr) spacepl_ = 0 sh_sp() } proc sh_dismiss() { sh_map_ = 0 bsh.unmap() } proc selsub() { shape() if (numarg() > 0) { sh.color_list($o1, 2) } } proc selsec() { shape() $o1.sec sh.color(2) } proc selpp() {local i shape() for i=0, $o1.pps.count-1 { sh.point_mark($o1.pps.object(i), 1) } for i=0, $o2.size-1 { sh.point_mark($o1.pps.object($o2.x[i]), 2) } } proc selected() { if ($1 == 0) { if (sh_map_) { sh.point_mark_remove() sh.color_all(9) } if (g_map_) { g.erase_all psh.exec_menu("Time Plot") } } } proc mapbg() { if (object_id(g) == 0) { build_g() yvec = new Vector() xpvec = new Vector() } if (g_map_ == 0) { sprint(tstr, "%s Range Graph", modelview) bg.map(tstr) g_map_ = 1 } } proc grph() { local i, min, max, del if (strcmp($o1.name, "Ra") == 0) { // if (g_map_) {g_dismiss()} return } mapbg() g.label(.5, .9, $o1.name, 2, 1, 0,0,1) all = $o2.location.realcell.all svec = $o2.location.subset if (object_id($o2.location.xgrph) == 0) { mk_xgrph($o2) } xvec = $o2.location.xgrph yvec.resize(xvec.size) yvec.resize(0) j = 0 for i=0, svec.size - 1 all.object(svec.x[i]).sec { // g.beginline() // sprint(tstr, "for (x,0) { g.line(xvec.x[j], %s(x)) j+=1 }", $o1.name) sprint(tstr, "for (x,0) {gcall(%s(x))}", $o1.name) execute(tstr, this) g.flush() } g.exec_menu("View = plot") psh.variable($o1.name) min = yvec.min max = yvec.max //print min, max del = 10^(int(log10(max - min)-.999)) min = int(min/del-.999)*del max = int(max/del+.999)*del //print min, max, del psh.scale(min, max) spacepl_ = 0 sh_sp() } proc gcall() { yvec.append($1) g.mark(xvec.x[j], $1, "+", 5) j += 1 } proc pgrph() { mapbg() tobj = new List($o2.name) xpvec.resize(tobj.count) yvec.resize(tobj.count) for j=0, tobj.count-1 { if (hoc_sf_.is_point_process(tobj.o(j))) { if (tobj.o(j).has_loc() == 0) { continue } } sprint(tstr, "yvec.x[j] = %s.%s", tobj.object(j), $o1.name) execute(tstr, this) xpvec.x[j] = object_id(tobj.object(j), 1) } sprint(tstr, "%s[x].%s", $o2.name, $o1.name) g.label(.5, .9, tstr, 2, 1, 0,0,1) yvec.mark(g, xpvec, "+", 5) g.exec_menu("View = plot") } proc mk_xgrph() {local i, ns, x ns = 0 for i=0, svec.size - 1 all.object(svec.x[i]).sec { ns += nseg + 2 } xvec = new Vector(ns) $o1.location.xgrph = xvec xvec.resize(0) all.object(0).root distance() for i=0, svec.size - 1 all.object(svec.x[i]).sec { for (x,0) { xvec.append(distance(x)) } } } proc build_g() { bg = new VBox() bg.save("") bg.ref(this) bg.intercept(1) xpanel("", 1) xmenu("LengthScale") xradiobutton("Normal", "lspsh(0)", 1) xradiobutton("Topological", "lspsh(1)") xradiobutton("Scale long sections", "lspsh(2)") xmenu() xcheckbox("SpacePlot", &spacepl_, "sh_sp()") xpanel() psh = new PlotShape() g = new Graph() bg.intercept(0) bg.dismiss_action("g_dismiss()") } proc g_dismiss() { g_map_ = 0 bg.unmap() } endtemplate ModelViewGUI neuron-7.5/share/lib/hoc/mview/mviewxml.hoc000066400000000000000000001011441323325274500210150ustar00rootroot00000000000000begintemplate ModelViewSegment public proximal, distal, id proc init() { proximal = $2 distal = $3 id = $1 } endtemplate ModelViewSegment begintemplate ModelViewSection public name, segmentList, getName, addSegment objref segmentList objref strobj strdef name proc init() { segmentList = new List() name = $s1 } proc addSegment() { segmentList.append($o1) } func getName() { return name } func hashCode() {local hash, length, i strobj = new StringFunctions() length = strobj.len(name) for i = 0, len - 1 { } return 0 } endtemplate ModelViewSection begintemplate ModelViewXML public selected public selsub, selsec, disp, xportLevel1, xportLevel2 public subsets, prependname, mview, unlink public exportNeuroML external nil, hoc_sf_ objref tobj, tobj1, mview, secref, cellref, fileref objref dmech, dparm, dpelm, dmlist objref storecm, pointvec, segmentvec objref ksstate, ksgate, kstrans strdef tstr strdef nameForGroupWithAll strdef singleSecGroupPrefix objref singleSecGroupsCreated proc init() {local i mview = $o1 nameForGroupWithAll = "" singleSecGroupPrefix = "OneSecGrp_" } proc unlink() {local i if (dmlist != nil) for i=0, dmlist.count - 1 { dmlist.object(i).unlink() } objref tobj, tobj1, mview objref parmsubsets, parmsecs, parminhomos, dmech, dmlist } proc selected() { if ($4 == -2) { }else if ($4 == -1) { }else if ($4 > -1) { } xport() } proc xportLevel1() { if (numarg() == 1) { fileref = new File($s1) xport1(1) return } fileref = new File() fileref.chooser("w", "Save model in NeuroML v1.8.1 Level 1 file", "*.xml") if (fileref.chooser()) { xport1(1) } } proc xportLevel2() { if (numarg() == 1) { fileref = new File($s1) xport1(2) return } fileref = new File() fileref.chooser("w", "Save model in NeuroML v1.8.1 Level 2 file", "*.xml") if (fileref.chooser()) { xport1(2) } } proc xport1() { exportNeuroML(fileref.getname, $1) } // Takes args: fileName, level proc exportNeuroML() {local ok fileref = new File($s1) level = $2 print "Exporting NeuroML Level ", level, "into: ",fileref.getname ok = fileref.wopen() if (!ok) { printf("could not open %s\n", fileref.getname) return } fileref.printf("\n") header(fileref, level) xmlwrite(fileref, level) fileref.printf("\n") fileref.close() } proc header() { $o1.printf("\n\n") } // store cell number in cm of first seg of root of cell (and restore original cm proc assoc_cell_number() {local i, j, pointcount i = 0 pointcount = 0 forsec mview.dparm.sall { tobj = new SectionRef() if ($1 == 1) { storecm.x[i] = cm(.00001) cm(.00001) = i pointvec.x[i] = pointcount + 1 segmentvec.x[i] = pointcount + 1 - i for j = 0, n3d() - 1 { pointcount += 1 // $o2.printf(" \n", pointcount, x3d(j), y3d(j), z3d(j), diam3d(j)) // $o2.printf(" \n", pointcount, x3d(j), y3d(j), z3d(j), diam3d(j)) } } else { cm(.00001) = storecm.x[i] } i += 1 } } proc xmlwrite() {local proximalid, pointcount, segmentcount, sectioncount, i, j, k, l, m strdef date ///////$o1.printf("\n", $o1.getname()) $o1.printf("NeuroML Level %d file generated from ModelView by: %s\n", $2, nrnversion()) $o1.printf("Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,\n") $o1.printf("Yale University and UCL\n\n") proximalid = 0 pointcount = 0 sectioncount = 0 forsec mview.dparm.sall {sectioncount += 1} pointvec = new Vector(sectioncount) segmentvec = new Vector(sectioncount) storecm = new Vector(sectioncount) // go over all points in all sections in all cells assoc_cell_number(1, $o1) $o1.printf("\n") totalnumcells = 0 oldidrootseg = -1 for mview.realcells(cellref) { totalnumcells =totalnumcells+1 } for mview.realcells(cellref) { strdef cellName cellName = cellref.name if (hoc_sf_.substr(cellName,"[")>=0 && hoc_sf_.substr(cellName,"]")>=0) { hoc_sf_.left(cellName, hoc_sf_.substr(cellName,"]")) strdef index index = cellName hoc_sf_.left(cellName, hoc_sf_.substr(cellName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(cellName, "%s_%s", cellName, index) } $o1.printf(" \n", cellName) $o1.printf(" Cell: %s exported from NEURON ModelView\n", cellName) $o1.printf(" \n") forsec cellref.secanal.allseclist { $o1.printf("\n", secname(), n3d(), (n3d() - 1)) sectioncount = cm(.00001) tobj = new SectionRef() proximalid = pointvec.x[sectioncount] pointcount = pointvec.x[sectioncount] segmentcount = segmentvec.x[sectioncount] for i = 1, n3d() - 1 { strdef newSec newSec = secname() hoc_sf_.right(newSec, hoc_sf_.substr(newSec, ".")+1) thissegid = segmentcount if (i == 1 && totalnumcells == 1 && !tobj.has_parent){ // i.e. the first seg of parentless sec on only cell oldidrootseg = thissegid thissegid = 0 } $o1.printf(" =0 && hoc_sf_.substr(newSec,"]")>=0) { hoc_sf_.left(newSec, hoc_sf_.substr(newSec,"]")) strdef index index = newSec hoc_sf_.left(newSec, hoc_sf_.substr(newSec,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(newSec, "%s_%s", newSec, index) } $o1.printf(" name = \"Seg%d_%s\"", i-1, newSec) strdef parentNameInfo parentNameInfo = "" if (i == 1) { if (tobj.has_parent) { tobj.parent { fract = -1 tobj.sec {fract = parent_connection()} if (fract==1) { sprint(parentNameInfo, " ", secname()) parentsegid = segmentvec.x[cm(.00001)] + n3d() - 2 if (parentsegid == oldidrootseg) {parentsegid = 0} $o1.printf(" parent=\"%d\"", parentsegid) } else { parentSeg = -1 sprint(parentNameInfo, " ",fract, secname()) for pointIndex = 1, n3d() - 1 { if (parentSeg<0) { arcFract = arc3d(pointIndex)/L if (arcFract>=fract) { parentSeg = segmentvec.x[cm(.00001)] + pointIndex -2 } } } if (parentSeg == oldidrootseg) {parentSeg = 0} $o1.printf(" parent=\"%d\"", parentSeg) } } } } else { parentsegid = segmentcount - 1 if (parentsegid == oldidrootseg) {parentsegid = 0} $o1.printf(" parent=\"%d\"", parentsegid) } $o1.printf(" cable = \"%d\">%s\n", sectioncount, parentNameInfo) if (i == 1) { $o1.printf(" \n", \ x3d(i-1), y3d(i-1), z3d(i-1), diam3d(i-1)) } $o1.printf(" \n", \ x3d(i), y3d(i), z3d(i), diam3d(i)) $o1.printf(" \n") pointcount += 1 segmentcount += 1 } } $o1.printf(" \n") $o1.printf(" \n") totalNumCables = 0 forsec cellref.secanal.allseclist { sectioncount = cm(.00001) tobj = new SectionRef() strdef newSectionName newSectionName = secname() hoc_sf_.right(newSectionName, hoc_sf_.substr(newSectionName, ".")+1) if (hoc_sf_.substr(newSectionName,"[")>=0 && hoc_sf_.substr(newSectionName,"]")>=0) { hoc_sf_.left(newSectionName, hoc_sf_.substr(newSectionName,"]")) strdef index index = newSectionName hoc_sf_.left(newSectionName, hoc_sf_.substr(newSectionName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(newSectionName, "%s_%s", newSectionName, index) } $o1.printf(" 1) { $o1.printf(">\n") $o1.printf(" \n \n") $o1.printf(" numberInternalDivisions \n %d\n", nseg) $o1.printf(" \n \n") $o1.printf(" \n") } else { $o1.printf("/>\n") } totalNumCables = totalNumCables + 1 } if (object_id(cellref.secanal.parmsubsets) == 0) { cellref.secanal.analyse() } if (cellref.secanal.parmsubsets.subsets.count >= 1) { for i=0, cellref.secanal.parmsubsets.subsets.count-1 { tobj1 = cellref.secanal.parmsubsets.subsets.object(i) strdef groupName sprint(groupName, "%s", tobj1) strdef comment comment = "" if (hoc_sf_.substr(groupName,"[")>=0 && hoc_sf_.substr(groupName,"]")>=0) { hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"]")) strdef index index = groupName hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(groupName, "%s_%s", groupName, index) } if (hoc_sf_.len(nameForGroupWithAll)==0 && tobj1.subset.size== totalNumCables) { nameForGroupWithAll = groupName groupName = "all" sprint(comment, "", nameForGroupWithAll) } $o1.printf(" %s\n", groupName, comment) for j=0, tobj1.subset.size - 1 { secref = cellref.secanal.all.object(tobj1.subset.x(j)) $o1.printf(" \n",secref.sec.cm(.00001)) } $o1.printf(" \n") } } else { $o1.printf(" \n") } /// Must check if there is an easier way of doing this!!! singleSecGroupsCreated = new Vector() for i=0, cellref.secanal.dmlist.count - 1 { dmech = cellref.secanal.dmlist.object(i) if (object_id(dmech.location) == 0) { continue } for dmech.parmiter(dparm) { for dparm.parmiter(dpelm) { for l=0, dpelm.parms.count - 1 { ///printparmval($o1, cellref.secanal.all, "", dpelm.parms.object(l), 1) // Converting ohm cm (NEURON units) to Kohm cm (Phys units) trySingleSecGroup = 1 if (dpelm.parms.object(l).type() == 1){ if (dpelm.parms.object(l).location.type() == 8) { trySingleSecGroup = 0} } if(trySingleSecGroup==1) { secref = cellref.secanal.all.object(dpelm.parms.object(l).location.isec) strdef groupName sprint(groupName, "%s%s", singleSecGroupPrefix, secref) if (hoc_sf_.substr(groupName,"[")>=0 && hoc_sf_.substr(groupName,"]")>=0) { hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"]")) strdef index index = groupName hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(groupName, "%s_%s", groupName, index) } strdef currsecname secref.sec {currsecname = secname()} cableid = secref.sec.cm(.00001) sprint(comment, "", currsecname) if (!singleSecGroupsCreated.contains(cableid)) { // so no repeats... $o1.printf(" %s\n", groupName, comment) $o1.printf(" \n", cableid) $o1.printf(" \n") } singleSecGroupsCreated.append(cableid) } } } } } $o1.printf(" \n") // biophysics element for THIS cell. Only include if level > 1 if ($2 > 1) { // i.e. Level 2 of NeuroML or greater $o1.printf(" \n") for mview.dparm.kschans(tobj) { kschan_xmlwrite($o1, tobj) } ///////////for mview.realcells(cellref) { // to distinguish b/w toplevel and encapsulated real cells if (object_id(cellref.secanal.parmsubsets) == 0) { continue } //////////////$o1.printf("\n", cellref.name) for i=0, cellref.secanal.dmlist.count - 1 { dmech = cellref.secanal.dmlist.object(i) // TODO: for tobj.mechs(dmech) { } if (dmech.parms.count > 0) { } if (object_id(dmech.location) == 0) { continue } if (strcmp(dmech.name,"capacitance") != 0 && strcmp(dmech.name,"Ra") != 0 && hoc_sf_.substr(dmech.name, "_ion") == -1) { strdef passiveAttr passiveAttr = "" // If mech name is built in passive conductance in NEURON if (strcmp(dmech.name,"pas") == 0) { passiveAttr = " passive_conductance=\"true\"" } // If mech name is default passive conductance from neuroConstruct if (strcmp(dmech.name,"LeakConductance") == 0) { passiveAttr = " passive_conductance=\"true\"" } $o1.printf(" \n", dmech.name, passiveAttr) for j=0, dmech.location.subset.size()-1 { secref = cellref.secanal.all.object(dmech.location.subset.x(j)) // printsec($o1, secref) } for dmech.parmiter(dparm) { for dparm.parmiter(dpelm) { for l=0, dpelm.parms.count - 1 { strdef paramNameToUse paramNameToUse = dparm.name strdef comment comment = "" // strip suffix if (hoc_sf_.substr(paramNameToUse, "_")>=0) { hoc_sf_.left(paramNameToUse, hoc_sf_.substr(paramNameToUse, "_")) } if (strcmp(dparm.name,"g_pas") == 0) { paramNameToUse = "gmax" sprint(comment, "", paramNameToUse) } if (strcmp(paramNameToUse,"g") == 0) { paramNameToUse = "gmax" sprint(comment, "", paramNameToUse) } else if (hoc_sf_.substr(paramNameToUse, "g")==0 && hoc_sf_.substr(paramNameToUse, "bar")>=1) { sprint(comment, "", paramNameToUse) paramNameToUse = "gmax" } else if (strcmp(paramNameToUse,"gl") == 0) { paramNameToUse = "gmax" sprint(comment, "", paramNameToUse) } else if (hoc_sf_.substr(dmech.name, "_") >= 0) { strdef paramNameSuspect paramNameSuspect = dmech.name hoc_sf_.left(paramNameSuspect, hoc_sf_.substr(paramNameSuspect, "_")) sprint(paramNameSuspect, "g%s", paramNameSuspect) print "Suspecting: ",paramNameSuspect if (strcmp(paramNameToUse,paramNameSuspect) == 0) { sprint(comment, "Assuming parameter %s refers to the maximum cond density, so replacing it with gmax", paramNameToUse) paramNameToUse = "gmax" } } //print "Checking param: ",paramNameToUse, " in ", dmech.name //print comment factor = 1 if (hoc_sf_.substr(paramNameToUse,"gmax") >= 0) { factor = 1000 /// converting S cm-2 (NEURON units) to mS cm-2 (Phys units) } printparmval($o1, cellref.secanal.all, paramNameToUse, dpelm.parms.object(l), factor, comment, dmech.name) } } } $o1.printf(" \n") } } strdef noComment noComment = "" for i=0, cellref.secanal.dmlist.count - 1 { dmech = cellref.secanal.dmlist.object(i) if (object_id(dmech.location) == 0) { continue } if (strcmp(dmech.name,"capacitance") == 0) { $o1.printf(" \n") for dmech.parmiter(dparm) { for dparm.parmiter(dpelm) { for l=0, dpelm.parms.count - 1 { printparmval($o1, cellref.secanal.all, "", dpelm.parms.object(l), 1, noComment, dmech.name) // Converting μF cm-2 (NEURON units) to μF cm-2 (Phys units) } } } $o1.printf(" \n") } } for i=0, cellref.secanal.dmlist.count - 1 { dmech = cellref.secanal.dmlist.object(i) if (object_id(dmech.location) == 0) { continue } if (strcmp(dmech.name,"Ra") == 0) { $o1.printf(" \n") for dmech.parmiter(dparm) { for dparm.parmiter(dpelm) { for l=0, dpelm.parms.count - 1 { printparmval($o1, cellref.secanal.all, "", dpelm.parms.object(l), 0.001, noComment, dmech.name) // Converting ohm cm (NEURON units) to Kohm cm (Phys units) } } } $o1.printf(" \n") } } //////////// ion_xmlwrite($o1) $o1.printf(" \n") } $o1.printf(" \n") } $o1.printf("\n") assoc_cell_number(0, $o1) ////////PG: not required //// $o1.printf("\n") /* if (parmsubsets.subsets.count > 1) { sprint(tstr, "%d subsets with constant parameters", parmsubsets.subsets.count) disp1 = new TreeViewItem(disp, tstr, this, -1) }else{ disp1 = disp } for i=0, parmsubsets.subsets.count-1 { tobj = parmsubsets.subsets.object(i) sprint(tstr, "%s (%d sections)", tobj, tobj.subset.size) msub = new TreeViewItem(disp1, tstr, tobj, -1) prsub(tobj.subset) for j=0, tobj.parmlist.count-1 { tobj1 = tobj.parmlist.object(j) sprint(tstr, "%s = %g", tobj1.parmelm.name, tobj1.value) msub.append(tstr, tobj, j) } } if (parmsecs.count + parminhomos.count > 1) { sprint(tstr, "%d sections with unique parameters", parmsecs.count + parminhomos.count) disp1 = new TreeViewItem(disp, tstr) }else{ disp1 = disp } for i=0, parmsecs.count-1 { tobj = parmsecs.object(i) all.object(tobj.isec).sec sprint(tstr, "%s {", secname()) msub = new TreeViewItem(disp1, tstr, tobj, -1) for j=0, tobj.parmlist.count-1 { tobj1 = tobj.parmlist.object(j) sprint(tstr, " %s = %g", tobj1.parmelm.name, tobj1.value) msub.append(tstr, tobj, j) } msub.append("}", tobj, j) } for i=0, parminhomos.count-1 { tobj = parminhomos.object(i) all.object(tobj.isec).sec sprint(tstr, "%s {", secname()) msub = new TreeViewItem(disp1, tstr, tobj, -1) for j=0, tobj.parmlist.count-1 { tobj1 = tobj.parmlist.object(j) sprint(tstr, " %s =", tobj1.parmelm.name) for k=0, tobj1.vec.size-1 { sprint(tstr, " %s %g", tstr, tobj1.vec.x[k]) } msub.append(tstr, tobj, j) } msub.append("}", tobj, j) } */ artcell($o1) // $o1.printf("\n") } proc artcell() {local i,j,l for i=0, mview.acview.alist.count-1 { dmech = mview.acview.alist.object(i) $o1.printf(" \n", dmech.name) for j=0, dmech.parms.count-1 { dparm = dmech.parms.object(j) for dparm.parmiter(dpelm) { for l=0, dpelm.parms.count - 1 { tobj = dpelm.parms.object(l) // 1 is ModelViewParmVal, 2 is ModelViewParmVec if (tobj.type() == 1) { $o1.printf(" \n", dpelm.name, tobj.value) } } } } $o1.printf(" \n") } } proc printparmval() { // 1 is ModelViewParmVal, 2 is ModelViewParmVec if ($o4.type() == 1) { strdef nameattr nameattr = "" strdef comment comment = "" if (hoc_sf_.len($s3)>0) { // only incl if $s3 is set strdef newParamName newParamName = $s3 sprint(nameattr, " name=\"%s\"", newParamName) } $o1.printf(" %s\n", nameattr, $o4.value * $5, $s6) // 8 is ModelViewParmSubset, 9 is ModelViewParmSec if ($o4.location.type() == 8) { // for m=0, $o4.location.subset.size()-1 { // secref = $o2.object($o4.location.subset.x(m)) // printsec($o1, secref) // } strdef groupName sprint(groupName, "%s", $o4.location) if (hoc_sf_.substr(groupName,"[")>=0 && hoc_sf_.substr(groupName,"]")>=0) { hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"]")) strdef index index = groupName hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(groupName, "%s_%s", groupName, index) } if (strcmp(groupName,nameForGroupWithAll) == 0) { groupName = "all" } $o1.printf(" %s\n", groupName) } else { secref = $o2.object($o4.location.isec) //printsec($o1, secref) strdef groupName sprint(groupName, "%s%s", singleSecGroupPrefix, secref) if (hoc_sf_.substr(groupName,"[")>=0 && hoc_sf_.substr(groupName,"]")>=0) { hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"]")) strdef index index = groupName hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(groupName, "%s_%s", groupName, index) } $o1.printf(" %s\n", groupName) } $o1.printf(" \n") } else if ($o4.type() == 2) { // ModelViewParmVec secref = $o2.object($o4.location.isec) strdef groupName sprint(groupName, "%s%s", singleSecGroupPrefix, secref) if (hoc_sf_.substr(groupName,"[")>=0 && hoc_sf_.substr(groupName,"]")>=0) { hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"]")) strdef index index = groupName hoc_sf_.left(groupName, hoc_sf_.substr(groupName,"[")) hoc_sf_.right(index, hoc_sf_.substr(index,"[")+1) sprint(groupName, "%s_%s", groupName, index) } strdef currsecname secref.sec {currsecname = secname()} $o1.printf(" \n", $s3, $s7, groupName, currsecname) avgVal = 0 strdef infoVals infoVals = "" for i=0, $o4.vec.size - 1 { sprint(infoVals, "%s %g, ", infoVals, $o4.vec.x(i)) avgVal = avgVal + $o4.vec.x(i) } avgVal = avgVal / $o4.vec.size $o1.printf(" \n", infoVals, avgVal) //printvecvals($o1, $o4) $o1.printf(" \n", $s3, avgVal * $5) $o1.printf(" %s\n", groupName) $o1.printf(" \n") } } proc printsec() { $o2.sec { $o1.printf("
\n", secname()) } } proc printvecvals() {local i $o2.location.realcell.all.object($o2.location.isec).sec { $o1.printf(" \n", secname()) ///$o1.printf("
\n", secname()) } for i=0, $o2.vec.size - 1 { //$o1.printf(" %g\n", $o2.vec.x(i)) $o1.printf(" \n", i, $o2.vec.x(i)) } //$o1.printf("
\n") } proc ion_xmlwrite() { for mview.dparm.mechs(tobj) { if (hoc_sf_.head(tobj.name, "_ion", tstr) != -1) { $o1.printf(" \n", tstr, ion_charge(tobj.name)) } } } proc kschan_xmlwrite() {local i, j $o1.printf(" \n") $o1.printf(" \n") if ($o2.iv_type == 0) { if (strcmp($o2.ion, "NonSpecific") == 0) { $o1.printf(" \n", $o2.erev) }else{ $o1.printf(" \n", $o2.ion) } $o1.printf(" \n", $o2.gmax) kschan_cond_xmlwrite($o1, $o2) $o1.printf(" \n") }else{ $o1.printf(" \n", $o2.ion) $o1.printf(" \n", $o2.gmax) kschan_cond_xmlwrite($o1, $o2) $o1.printf(" \n") } if ($o2.iv_type == 0) { $o1.printf(" \n") }else{ $o1.printf(" \n") } $o1.printf(" \n") for i=0, $o2.ngate-1 { ksgate = $o2.gate(i) if (ksgate.nstate == 1) { ksstate = $o2.state(ksgate.sindex) $o1.printf(" \n", ksstate.name) kstrans = $o2.trans(i) kstrans1($o1, $o2, kstrans) $o1.printf(" \n") }else{ $o1.printf(" \n") for j=0, ksgate.nstate-1 { ksstate = $o2.state(ksgate.sindex + j) $o1.printf(" \n", ksstate.name) } for j=0, $o2.ntrans-1 { kstrans = $o2.trans(j) if (kstrans.src.gate.index == i) { kstrans1($o1, $o2, kstrans) } } $o1.printf(" \n") } } $o1.printf(" \n") } proc kschan_cond_xmlwrite() {local i, j for i=0, $o2.ngate-1 { ksgate = $o2.gate(i) $o1.printf(" \n", ksgate.power) for j=0, ksgate.nstate-1 { ksstate = $o2.state(ksgate.sindex + j) if (ksstate.frac != 0) { $o1.printf(" \n", ksstate.name, ksstate.frac) } } $o1.printf(" \n") } } proc kstrans1() { if ($o3.src == $o3.target) { $o1.printf(" \n") }else{ $o1.printf(" \n", $o3.src.name, $o3.target.name) } if ($o3.type <= 1) { $o1.printf(" \n") if($o3.type == 0) { kstrans2($o1, "alpha", $o3.ftype(0), $o3.parm(0)) kstrans2($o1, "beta", $o3.ftype(1), $o3.parm(1)) }else{ kstrans2($o1, "infinity", $o3.ftype(0), $o3.parm(0)) kstrans2($o1, "tau", $o3.ftype(1), $o3.parm(1)) } $o1.printf(" \n") }else if ($o3.type > 1) { if ($o3.type == 2) { tstr = "no" } else { tstr = "yes" } $o1.printf(" \n", $o3.ligand, tstr) kstrans2($o1, "alpha", $o3.ftype(0), $o3.parm(0)) kstrans2($o1, "beta", $o3.ftype(1), $o3.parm(1)) $o1.printf(" \n") } $o1.printf(" \n") } proc kstrans2() {local i $o1.printf(" <%s>\n", $s2) $o1.printf(" ", $o4.x[0]) return }else if ($3 == 2) { $o1.printf(" type=\"exponential\" expr=\"A*exp(k*(v-d))\"") }else if ($3 == 3) { $o1.printf(" type=\"linoid\" expr=\"A*x/(1 - exp(-x)) where x = k*v-d)\"") }else if ($3 == 4) { $o1.printf(" type=\"sigmoid\" expr=\"A/(1 + exp(-k*(d-v))\"") } $o1.printf(">\n") $o1.printf(" \n", $o4.x[0]) $o1.printf(" \n", $o4.x[1]) $o1.printf(" \n", $o4.x[2]) $o1.printf(" \n") $o1.printf(" \n", $s2) } endtemplate ModelViewXML neuron-7.5/share/lib/hoc/mview/ncview.hoc000077500000000000000000000041741323325274500204500ustar00rootroot00000000000000begintemplate ModelViewNetCon public display, selsub, unlink, selected, name objref nclist, disp, valvec, dpe, parms, dv, this, tobj, subsets, dislist, mview strdef tstr, name proc init() {local i nclist = new List() for i=0, $o1.count-1 if ($o1.o(i).valid()) { nclist.append($o1.o(i)) } disp = $o2 mview = $o3 analyse() display() name = "NetCon" } proc unlink() {local i if (object_id(parms)) for i=0, parms.count - 1 { parms.object(i).unlink() } objref nclist, disp, valvec, dpe, parms, dv, tobj, subsets, dislist, mview } proc analyse() { dislist = new List() dv = new ModelViewDistinctValues() parms = new List() subsets = new ModelViewSubsetList() subsets.subsets.append(new ModelViewParmSubset(new Vector(nclist.count), this)) subsets.subsets.object(0).subset.indgen valvec = new Vector(nclist.count) parms.append(new ModelViewDParmElm("weight", 0, 1)) for i=0, nclist.count-1 { valvec.x[i] = nclist.object(i).weight } parm_assess(valvec, parms.object(parms.count-1)) parms.append(new ModelViewDParmElm("delay", 0, 1)) for i=0, nclist.count-1 { valvec.x[i] = nclist.object(i).delay } parm_assess(valvec, parms.object(parms.count-1)) parms.append(new ModelViewDParmElm("threshold", 0, 1)) for i=0, nclist.count-1 { valvec.x[i] = nclist.object(i).threshold } parm_assess(valvec, parms.object(parms.count-1)) } proc display() {local i for i=0, parms.count-1 { parms.object(i).display(disp, tstr, subsets.subsets.count, subsets.subsets.object(0)) } } func parm_assess(){local n, i, val n = dv.ndistinct($o1) if (n == 0) {return n} if (n > 20) { sprint(tstr, "%d values ranging from %g to %g", n, dv.min, dv.max) $o2.append(new ModelViewParmStr(tstr, this)) }else{ dv.dislist(dislist) for i=0, dislist.count-1 { addparm2subset(dislist.object(i), $o1.x[dislist.object(i).x[0]], $o2) } } return n } proc addparm2subset() {local i i = subsets.isubset($o1.sort, this) tobj = new ModelViewParmVal($2, subsets.subsets.object(i)) $o3.append(tobj) subsets.subsets.object(i).parmlist.append(tobj) } proc selsub() { } proc selected() { mview.gui.pgrph($o3.saction, this) } endtemplate ModelViewNetCon neuron-7.5/share/lib/hoc/mview/parmsets.hoc000077500000000000000000000040201323325274500210010ustar00rootroot00000000000000begintemplate ModelViewParmSubset // subset which has a bunch of constant parameters public subset, parmlist, selected, prependlocstr, realcell, xgrph, type // subset elements are indices into realcell all list // parmlist specifies parameters which are uniform over // this subset (and whose values are different in the complement to // the existence subset) objref subset, parmlist, realcell, xgrph proc init() { subset = $o1 parmlist = new List() realcell = $o2 } proc selected() { realcell.selsub(subset) } proc prependlocstr() { sprint($s1, "%d %s", subset.size, $s1) } func type() { return 8 } endtemplate ModelViewParmSubset begintemplate ModelViewSubsetList // a list of ModelViewParmSubsets public subsets, isubset objref subsets proc init() { subsets = new List() } func isubset() { local i //the ModelViewParmSubset associated with Vector $o1 for i=0, subsets.count-1 { if ($o1.eq(subsets.object(i).subset)) { return i } } subsets.append(new ModelViewParmSubset($o1, $o2)) return subsets.count-1 } endtemplate ModelViewSubsetList begintemplate ModelViewParmSec // Section which has a bunch of unique parameters public isec, parmlist, selected, prependlocstr, realcell, type // isec is the index into realcell all list // parmlist specifies parameters which are unique constants to // this section objref parmlist, realcell proc init() { isec = $1 parmlist = new List() realcell = $o2 } proc selected() { realcell.selsec(isec) } proc prependlocstr() { realcell.prependname(isec, $s1) } func type() { return 9 } endtemplate ModelViewParmSec begintemplate ModelViewParmInhomo // Section which has inhomogeneous parameters public isec, parmlist, selected, prependlocstr, realcell // isec is the index into realcell all list // parmlist specifies parameters which are inhomogeneous in // this section objref parmlist, realcell proc init() { isec = $1 parmlist = new List() realcell = $o2 } proc selected() { realcell.selsec(isec) } proc prependlocstr() { realcell.prependname(isec, $s1) } endtemplate ModelViewParmInhomo neuron-7.5/share/lib/hoc/mview/parmvals.hoc000077500000000000000000000124271323325274500210020ustar00rootroot00000000000000// A Mechanism standard defines a list of parameters along with a structure // of values associated with a subset, section, or inhomogeneous section begintemplate ModelViewParmVal public value, location, valstr, parmelm, type, unlink objref location, parmelm proc init() { value = $1 location = $o2 } proc unlink() { objref location, parmelm } func type() { return 1 } proc valstr() { sprint($s1, "%g", value) } endtemplate ModelViewParmVal begintemplate ModelViewParmVec public vec, location, valstr, parmelm, type, unlink objref vec, location, parmelm proc init() { vec = $o1 location = $o2 } proc unlink() { objref vec, location, parmelm } func type() { return 2 } proc valstr() {local i if (vec.size < 5) { sprint($s1, "%g", vec.x[0]) for i=1, vec.size-1 { sprint($s1, "%s %g", $s1, vec.x[i]) } }else{ sprint($s1, "%d distinct values", vec.size) } } endtemplate ModelViewParmVec begintemplate ModelViewParmStr public str, location, valstr, parmelm, type, unlink objref location, parmelm strdef str proc init() { str = $s1 location = $o2 } proc unlink() { objref location, parmelm } func type() { return 3 } proc valstr() { $s1 = str } endtemplate ModelViewParmStr begintemplate ModelViewDParmElm public name, parms, append, display, selected, dmech, unlink objref parms, tobj, this, o4, grph, dmech strdef name proc init() {local i if ($3 == 1) { name = $s1 }else{ sprint(name, "%s[%d]", $s1, $2) } parms = new List() } proc unlink() {local i for i=0, parms.count - 1 { parms.object(i).unlink } objref parms, tobj, o4, grph, dmech } proc display() {local i, n n = parms.count if (n == 0) { return } if (n > 1) { sprint($s2, "%d %s", parms.count, name) // tobj = new TreeViewItem($o1, $s2, $o4, 0) o4 = $o4 tobj = new TreeViewItem($o1, $s2, this, -1) }else{ tobj = $o1 } if (n > 40) { sprint($s2, "%d or more distinct values", n) tobj.append($s2, this, -1) return } for i=0, n-1 { parms.object(i).valstr($s2) if (n > 1) { sprint($s2, "%s = %s", name, $s2) parms.object(i).location.prependlocstr($s2) }else{ sprint($s2, "%s = %s", name, $s2) } // tobj.append($s2, parms.object(i).location, 0) tobj.append($s2, this, i) } } proc selected() { if ($4 == -1) { o4.selected($o1, $2, $o3, 0) }else{ parms.object($4).location.selected($o1, $2, $o3,0) } if (object_id(dmech)) { dmech.grph.grph(this, dmech) } } // ModelViewParmStr, ModelViewParmVal, or ModelViewParmVec // finally a subset vector proc append() {local i parms.append($o1) $o1.parmelm = this } endtemplate ModelViewDParmElm begintemplate ModelViewDParm public name, parmelms, display, parmiter, unlink objref parmelms strdef name proc init() {local i parmelms = new List() if (object_id($o1) != 0) { size = $o1.name(name, $2) for i=0, size-1 { parmelms.append(new ModelViewDParmElm(name, i, size)) } }else{ parmelms.append(new ModelViewDParmElm($s3, 0, 1)) } } proc unlink() {local i for i=0, parmelms.count - 1 { parmelms.object(i).unlink() } objref parmelms } iterator parmiter() {local i for i=0, parmelms.count -1 { $o1 = parmelms.object(i) iterator_statement } } proc display() {local i for i=0, parmelms.count-1 { parmelms.object(i).display($o1, $s2, $3, $o4) } } endtemplate ModelViewDParm begintemplate ModelViewDMech public name, location, parms, display, append, fill, parmiter, grph, unlink public kschan objref location, parms, tobj, grph, kschan strdef name proc init() { name = $s1 parms = new List() } proc unlink() {local i for i=0, parms.count -1 { parms.object(i).unlink() } objref location, parms, tobj, grph } proc fill() {local i for i=0, $o1.count - 1 { parms.append(new ModelViewDParm($o1, i)) } } proc append() { parms.object($1).parmelms.object($2).append($o3) } iterator parmiter() {local i for i=0, parms.count -1 { $o1 = parms.object(i) iterator_statement } } proc display() {local i, j, n n = 0 for i=0, parms.count-1 { for j=0, parms.object(i).parmelms.count-1{ n += parms.object(i).parmelms.object(j).parms.count } } if (n != 1) { tobj = new TreeViewItem($o1, name, location, 0) }else{ tobj = $o1 } for i=0, parms.count - 1 { parms.object(i).display(tobj, $s2, n, location) } } endtemplate ModelViewDMech begintemplate ModelViewPMech public selsub, realcell, grph, unlink public type, name, location, parms, display, append, fill, pps, subsets objref location, parms, pps, subsets, tobj, this, realcell, grph strdef name proc init() { type = $1 realcell = $o2 pps = new List() subsets = new ModelViewSubsetList() parms = new List() } proc unlink() {local i for i=0, parms.count -1 { parms.object(i).unlink() } objref location, parms, pps, subsets, tobj, realcell, grph } proc fill() {local i $o1.name(name) for i=0, $o1.count - 1 { parms.append(new ModelViewDParm($o1, i)) } } proc append() { parms.object($1).parmelms.object($2).append($o3) } proc display() {local i, j, n n = 0 for i=0, parms.count-1 { for j=0, parms.object(i).parmelms.count-1{ n += parms.object(i).parmelms.object(j).parms.count } } sprint($s2, "%d %s", pps.count, name) tobj = new TreeViewItem($o1, $s2, subsets.subsets.object(0), 0) for i=0, parms.count - 1 { parms.object(i).display(tobj, $s2, n, subsets.subsets.object(0)) } } proc selsub() { realcell.selpp(this, $o1) } endtemplate ModelViewPMech neuron-7.5/share/lib/hoc/mview/ppanal.hoc000077500000000000000000000075201323325274500204260ustar00rootroot00000000000000begintemplate ModelViewPPAnalysis public all, analyse, pr, name, mkdisplay public disp, selpp, merge, grph, unlink, mview public subsets, ppsappend, pps, prependname external hoc_sf_, nil objref this, all, tobj, tobj1, sh, mview objref mt, ms, subsets, dislist_ objref pmat, psub objref disp, distinctvalues objref pps, pmech, typemap_ strdef tstr, mname, pname proc init() {local i mview = $o1 distinctvalues = mview.distinctvalues analysed = 0 pps = new List() } proc unlink() {local i for i=0, pps.count - 1 { pps.object(i).unlink() } objref all, tobj, tobj1, sh, mview objref mt, ms, subsets, dislist_ objref pmat, psub objref disp, pmech, typemap_ objref pps } proc prependname() { all.object($1).sec sprint($s2, "%s.%s", secname(), $s2) } proc ppsappend() {local i if (hoc_sf_.is_point_process($o1)) { if ($o1.has_loc() == 0) { return } } i = pps.count-1 if (i < 0) { pps.append(new ModelViewPMech($2, this)) i = 0 } if (pps.object(i).type != $2) { pps.append(new ModelViewPMech($2, this)) i += 1 } pps.object(i).pps.append($o1) } func typemap() { if (object_id(typemap_) == 0) { mt = new MechanismType(1) typemap_ = new Vector(mt.count) typemap_.fill(-1) } if (typemap_.x[$1] == -1) { typemap_.x[$1] = pps.count pps.append(new ModelViewPMech($1, this)) } return typemap_.x[$1] } proc merge() {local i, tm for i=0, $o1.count-1 { tm = typemap($o1.object(i).type) tobj = $o1.object(i).pps for j=0, tobj.count-1 { pps.object(tm).pps.append(tobj.object(j)) } } } proc analyse() { analysed = 1 dislist_ = new List() mk_pmech() } proc mkdisplay() {local i, j, k if (!analysed) { analyse() } disp = $o1 mkdisppp() } proc selpp() { mview.gui.selpp($o1, $o2) } func ppparm_assess() {local n n = distinctvalues.ndistinct($o1) if (n == 0) { return n } if (n > 20) { sprint(tstr, "%d values ranging from %g to %g", n, distinctvalues.min, distinctvalues.max) pmech.parms.object($2).parmelms.object($3).append(new ModelViewParmStr(tstr, pmech.subsets.subsets.object(0))) }else{ distinctvalues.dislist(dislist_) for i=0, dislist_.count-1 { tobj1 = dislist_.object(i) val = $o1.x[tobj1.x[0]] addppparm2subset(tobj1, val, $2, $3) } } if (n > 1) { pmech.grph = this pmech.parms.object($2).parmelms.object($3).dmech = pmech } return n } proc addppparm2subset() {local i, val tobj = $o1.c.index(pmech.subsets.subsets.object(0).subset, $o1).sort i = pmech.subsets.isubset(tobj, pmech) tobj = pmech.subsets.subsets.object(i) tobj1=new ModelViewParmVal($2, tobj) pmech.append($3, $4, tobj1) tobj.parmlist.append(tobj1) } proc mk_pmech() {local i, j, icol, itype, ntype mt = new MechanismType(1) for i=0, pps.count-1 { pmech = pps.object(i) pmech.subsets.subsets.append(new ModelViewParmSubset(new Vector(pmech.pps.count), pmech)) pmech.subsets.subsets.object(0).subset.indgen mt.select(pmech.type) mt.selected(pname) ms = new MechanismStandard(pname, 1) icol = 0 for j=0, ms.count-1 { icol += ms.name(tstr, j) } pmech.name = pname if (icol == 0) { continue } pmech.fill(ms) pmat = new Matrix(pmech.pps.count, icol) for j=0, pmech.pps.count-1 { ms.in(pmech.pps.object(j)) icol = 0 for iname=0, ms.count-1 { size = ms.name(tstr, iname) for is=0, size-1 { pmat.x[j][icol] = ms.get(tstr, is) icol += 1 } } } icol = 0 for iname=0, ms.count-1 { size = ms.name(tstr, iname) for is=0, size-1 { ppparm_assess(pmat.getcol(icol), iname, is) icol += 1 } } } } proc grph() { mview.gui.pgrph($o1,$o2) } proc mkdisppp() { if (pps.count == 1) { psub = disp }else{ psub = new TreeViewItem(disp, "") } j = 0 for i=0, pps.count - 1 { pps.object(i).display(psub, tstr) j += pps.object(i).pps.count } if (pps.count != 1) { sprint(tstr, "%d Point Processes", j) psub.str(tstr) } } endtemplate ModelViewPPAnalysis neuron-7.5/share/lib/hoc/mview/rcclasses.hoc000077500000000000000000000016461323325274500211400ustar00rootroot00000000000000begintemplate ModelViewRCClasses public list, tname, mkdisplay, rcell, mklist objref list, disp, rcell, dall, sall, pall, mview strdef tname, tstr proc init() { mview = $o1 tname = $s2 // list = new List(tname) // use mklist since possibility of PythonObject list = new List() rcell = new List() rcell.append($o3) } proc mklist() {local i for i=0, rcell.count-1 { list.append(rcell.o(i).cellobj) } } proc mkdisplay() {local i sprint(tstr, "%d %s", list.count, tname) disp = new TreeViewItem($o1, tstr) rcell.object(0).mkdisplay(disp) sall = new SectionList() for i=0, rcell.count-1 { for rcell.object(i).sections { sall.append() } } dall = new ModelViewSeclistAnalysis(mview, sall) disp = new TreeViewItem(disp, tname) dall.mkdisplay(disp) pall = new ModelViewPPAnalysis(mview) for i=0, rcell.count-1 { pall.merge(rcell.object(i).ppanal.pps) } pall.mkdisplay(disp) } endtemplate ModelViewRCClasses neuron-7.5/share/lib/hoc/mview/realcell.hoc000066400000000000000000000030631323325274500207310ustar00rootroot00000000000000begintemplate ModelViewRealCell public cellobj, analyse, root, name, mkdisplay public disp, sections, ppsappend public secanal, ppanal external hoc_sf_, nil, lambda_f objref this, tobj, tobj1, cellobj, allseclist, mview objref disp, ppanal, secanal strdef root, name, tstr proc init() {local i mview = $o1 analysed = 0 getcell() allseclist = new SectionList() allseclist.wholetree secanal = new ModelViewSeclistAnalysis(mview, allseclist) ppanal = new ModelViewPPAnalysis(mview) } proc getcell() {localobj p, s sprint(root, "%s", secname()) if (nrnpython("import neuron")) { p = new PythonObject() cellobj = p.neuron._neuron_section.cas().cell() if (object_id(cellobj) == 0) { name = root }else{ sprint(name, "%s", cellobj) s = new String() if (hoc_sf_.head(name, "PythonObject", s.s)==12) { // __str__ not always defined //name = cellobj.__str__() name = p.str(cellobj) } } }else{ if (hoc_sf_.head(root, "\\.", name) == -1) { name = root }else{ sprint(tstr, "%s.cellobj = %s", this, name) execute(tstr) } } } iterator sections() { forsec allseclist { iterator_statement } } proc ppsappend() {local i ppanal.ppsappend($o1,$2) } proc analyse() { analysed = 1 secanal.analyse() ppanal.analyse() } proc mkdisplay() {local i, j, k, n if (cellobj == nil) { sprint(tstr, "root %s", root) }else{ sprint(tstr, "%s root %s", cellobj, root) } disp = new TreeViewItem($o1, tstr, secanal, -1) if (!analysed) { analyse() } secanal.mkdisplay(disp) ppanal.mkdisplay(disp) } endtemplate ModelViewRealCell neuron-7.5/share/lib/hoc/mview/secanal.hoc000077500000000000000000000330271323325274500205620ustar00rootroot00000000000000begintemplate ModelViewSeclistAnalysis public all, analyse, mkdisplay, selected, dmlist, parmsubsets, parmsecs, parminhomos, allseclist public selsub, selsec, disp, grph public subsets, prependname, mview, unlink external hoc_sf_, nil, lambda_f objref this, all, tobj, tobj1, allseclist, mview objref mt, ms, subsets, subset, dislist_, distinctvalues objref parmsubsets, parmsecs, parminhomos, dmech, dmlist objref pmat, segmat, sortx, psub, ionstyle objref nsegvec, lvec, lamvec, disp, msubstr, msub, disp1 strdef tstr, mname, pname, pfullname proc init() {local i analysed = 0 mview = $o1 distinctvalues = mview.distinctvalues allseclist = $o2 all = new List() forsec allseclist all.append(new SectionRef()) } proc unlink() {local i if (dmlist != nil) for i=0, dmlist.count - 1 { dmlist.object(i).unlink() } objref all, tobj, tobj1, allseclist, mview objref mt, ms, subsets, subset, dislist_ objref parmsubsets, parmsecs, parminhomos, dmech, dmlist objref pmat, segmat, sortx, psub, ionstyle objref nsegvec, lvec, lamvec, disp, msubstr, msub, disp1 } proc prependname() { all.object($1).sec sprint($s2, "%s.%s", secname(), $s2) } proc analyse() { analysed = 1 if (all.count == 0) { return } parmsubsets = new ModelViewSubsetList() parmsubsets.subsets.append(new ModelViewParmSubset(new Vector(all.count), this)) parmsubsets.subsets.object(0).subset.indgen mk_existence_subsets() parmsecs = new List() parminhomos = new List() dislist_ = new List() mk_parm_subsets() } proc mkdisplay() {local i, j, k disp = $o1 if (!analysed) { analyse() } mk_nseg() msub = new TreeViewItem(disp, "", this, -1) j = 0 for i=0, dmlist.count - 1 { dmech = dmlist.object(i) if (object_id(dmech.location) == 0) { continue } dmech.display(msub, tstr) j += 1 } sprint(tstr, "%d inserted mechanisms", j) msub.str(tstr) if (parmsubsets.subsets.count > 1) { sprint(tstr, "%d subsets with constant parameters", parmsubsets.subsets.count) disp1 = new TreeViewItem(disp, tstr, this, -1) }else{ disp1 = disp } for i=0, parmsubsets.subsets.count-1 { tobj = parmsubsets.subsets.object(i) sprint(tstr, "%s (%d sections)", tobj, tobj.subset.size) msub = new TreeViewItem(disp1, tstr, tobj, -1) prsub(tobj.subset) for j=0, tobj.parmlist.count-1 { tobj1 = tobj.parmlist.object(j) sprint(tstr, "%s = %g", tobj1.parmelm.name, tobj1.value) msub.append(tstr, tobj, j) } } if (parmsecs.count + parminhomos.count > 1) { sprint(tstr, "%d sections with unique parameters", parmsecs.count + parminhomos.count) disp1 = new TreeViewItem(disp, tstr) }else{ disp1 = disp } for i=0, parmsecs.count-1 { tobj = parmsecs.object(i) all.object(tobj.isec).sec sprint(tstr, "%s {", secname()) msub = new TreeViewItem(disp1, tstr, tobj, -1) for j=0, tobj.parmlist.count-1 { tobj1 = tobj.parmlist.object(j) sprint(tstr, " %s = %g", tobj1.parmelm.name, tobj1.value) msub.append(tstr, tobj, j) } msub.append("}", tobj, j) } for i=0, parminhomos.count-1 { tobj = parminhomos.object(i) all.object(tobj.isec).sec sprint(tstr, "%s {", secname()) msub = new TreeViewItem(disp1, tstr, tobj, -1) for j=0, tobj.parmlist.count-1 { tobj1 = tobj.parmlist.object(j) sprint(tstr, " %s =", tobj1.parmelm.name) for k=0, tobj1.vec.size-1 { sprint(tstr, " %s %g", tstr, tobj1.vec.x[k]) } msub.append(tstr, tobj, j) } msub.append("}", tobj, j) } } proc selected() { if ($4 == -2) { mview.gui.selsub() }else if ($4 == -1) { mview.gui.selsub(allseclist) }else if ($4 > -1) { seclist(tobj, subsets.object($4)) mview.gui.selsub(tobj) } } proc selsub() { seclist(tobj, $o1) mview.gui.selsub(tobj) } proc selsec() { mview.gui.selsec(all.object($1)) } proc seclist() {local i $o1 = new SectionList() for i=0, $o2.size-1 { all.object($o2.x[i]).sec $o1.append() } } // subsets of density mechanism existence // subsets is a list of distinct subsets // the objects of subsets are vectors whose elements are the indices of // the all list of SectionRef defining the cell. // typevec,subsetvec are parallel vectors. typevec elements are // the mechanism types of actually existing density mechanisms and // subsetvec elements are the subsets list index of their locations // i.e. multiple mechanisms can share same subset. proc mk_existence_subsets() { local b, it, i dmlist = new List() mt = new MechanismType(0) dmlist.append(new ModelViewDMech("Ra")) // so 0 is Ra and rest are type dmlist.object(0).location = parmsubsets.subsets.object(0) for it = 1, mt.count-1 { // skip morphology mt.select(it) mt.selected(mname) dmlist.append(new ModelViewDMech(mname)) tobj = new Vector() for i=0, all.count-1 all.object(i).sec if (ismembrane(mname)) { tobj.append(i) } if (tobj.size) { i = parmsubsets.isubset(tobj, this) tobj = parmsubsets.subsets.object(i) dmlist.object(dmlist.count-1).location = tobj } } } // If a parameter in an existence subset is not uniform then there // is a problem about how to succinctly express the variation. // Uniform is easy, just rely on the existence subset. // If there are only a few distinct values then perhaps they should define // subsubsets. proc prsub() {local i return for i=0, $o1.size-1 { all.object($o1.x[i]).sec printf(" %s", secname()) } printf("\n") } proc mk_parm_subsets() {local nrow, ncol, irow, icol, itype, iname, isec, is, x, size, b, doit // deal with Ra tobj = new Vector(all.count) for i=0, all.count-1 { tobj.x[i] = all.object(i).sec.Ra } dmech = dmlist.object(0) subset = dmech.location.subset // just remember the following are 0 and 1 dmech.parms.append(new ModelViewDParm(nil, 0, "Ra")) dmech.parms.append(new ModelViewDParm(nil, 0, "rallbranch")) parm_assess(tobj.c, 0, 0) // only deal with rallbranch != 1 tobj = new Vector(all.count) for i=0, all.count-1 { x = all.object(i).sec.rallbranch if (x != 1) { tobj.x[i] = x }else{ tobj.x[i] = -1e50 } } parm_assess(tobj.c, 1, 0) // deal with all density mechanisms for itype=1, dmlist.count-1 { dmech = dmlist.object(itype) if (object_id(dmech.location) == 0) { continue } mt.select(itype) mt.selected(mname) if (hoc_sf_.tail(mname, "_ion", tstr) != -1) { // ions need special handling. i.e. use ena or nai,nao is_ion = 1 ms = new MechanismStandard(mname, 0) }else{ // parameters only is_ion = 0 ms = new MechanismStandard(mname, 1) } dmech.fill(ms) subset = dmech.location.subset // make a matrix of all params(columns) for all sections(rows) // also make a list of inhomogeneous sections // how many params ncol = 0 for iname=0, ms.count-1 { ncol += ms.name(pname, iname) } if (ncol == 0) { continue } // how many sections nrow = subset.size if (is_ion) { ionstyle = new Vector(subset.size) } pmat = new Matrix(nrow, ncol) // fill by rows irow = 0 for isec=0, subset.size-1 all.object(subset.x[isec]).sec { segmat = new Matrix(nseg, ncol) if (is_ion) { x = ion_style(mname) // style=1 means concentrations are parameters // 2 means reversal potential is a parameter // 0 means neither are parameters x = ((x%4) == 1) + 2*((int(x/8)%4) == 1) ionstyle.x[isec] = x } iseg = 0 for (x, 0) { ms.in(x) icol = 0 for iname=0, ms.count-1 { size = ms.name(pname, iname) for is=0, size-1 { segmat.x[iseg][icol] = ms.get(pname, is) icol += 1 } } iseg += 1 } // now look at within section uniformity icol = 0 b = 1 for iname=0, ms.count-1 { size = ms.name(pname, iname) for is=0, size-1 { if(distinctvalues.ndistinct(segmat.getcol(icol)) > 1) { doit = 1 if (is_ion) { doit = 0 if (ionstyle.x[isec] == 2 && icol == 0) { doit = 1} //ena if (ionstyle.x[isec] == 1 && (icol == 1 || icol == 2)) { doit = 1 } // nai and nao } if (doit == 0) { continue } addparm2inhomo(isec, segmat.getcol(icol), iname, is) // sentinal to avoid adding below segmat.x[0][icol] = -1e50 } icol+=1 } } pmat.setrow(isec, segmat.getrow(0)) } // now look at the columns (parameter vs position) icol = 0 if (is_ion) { handle_ion(ms, pmat, ionstyle) }else{ for iname=0, ms.count-1 { size = ms.name(pname, iname) for is=0, size-1 { parm_assess(pmat.getcol(icol), iname, is) icol += 1 } } } } } proc handle_ion() {local i if (distinctvalues.ndistinct($o3) > 1) { printf("ions with multiple styles not handled") }else{ if ($o3.x[0] == 2) { //ena parm_assess($o2.getcol(0), 0, 0) } if ($o3.x[0] == 1) { // nai and nao for i=1,2 { parm_assess($o2.getcol(i), i, 0) } } } } func parm_assess() {local n n = distinctvalues.ndistinct($o1) if (n == 0) { return n } // if (n > 20) { // sprint(tstr, "%d distinct constant values ranging from %g to %g", \ // n, distinctvalues.min, distinctvalues.max) // dmech.parms.object($2).parmelms.object($3).append( \ // new ModelViewParmStr(tstr, dmech.location)) // return n // } distinctvalues.dislist(dislist_) if (n > 1 || $o1.size == 1) { for i=0, dislist_.count-1 { tobj1 = dislist_.object(i) val = $o1.x[tobj1.x[0]] if (val == -1e50) { continue } if (tobj1.size > 1) { addparm2subset(tobj1, val, $2, $3) }else{ addparm2sec(tobj1.x[0], val, $2, $3) } } }else if (n == 1 && $o1.x[0] != -1e50) { addparm2subset(dislist_.object(0), $o1.x[0], $2, $3) } if (n > 1) { dmech.grph = this dmech.parms.object($2).parmelms.object($3).dmech = dmech } return n } // args are subset indices, val, name index, array index proc addparm2subset() {local i, val tobj = $o1.c.index(subset, $o1).sort i = parmsubsets.isubset(tobj, this) tobj = parmsubsets.subsets.object(i) tobj1=new ModelViewParmVal($2, tobj) dmech.append($3, $4, tobj1) tobj.parmlist.append(tobj1) } proc addparm2sec() {local i, isec, val isec = subset.x[$1] for i=0, parmsecs.count-1 { tobj = parmsecs.object(i) if (isec == tobj.isec) { tobj1 = new ModelViewParmVal($2,tobj) dmech.append($3, $4, tobj1) tobj.parmlist.append(tobj1) return } } tobj = new ModelViewParmSec(isec, this) tobj1=new ModelViewParmVal($2, tobj) dmech.append($3, $4, tobj1) tobj.parmlist.append(tobj1) parmsecs.append(tobj) } proc addparm2inhomo() {local i, isec isec = subset.x[$1] for i=0, parminhomos.count-1 { tobj = parminhomos.object(i) if (isec == tobj.isec) { tobj1 = new ModelViewParmVec($o2,tobj) dmech.append($3, $4, tobj1) dmech.grph = this dmech.parms.object($3).parmelms.object($4).dmech = dmech tobj.parmlist.append(tobj1) return } } tobj = new ModelViewParmInhomo(isec, this) tobj1=new ModelViewParmVec($o2, tobj) dmech.append($3, $4, tobj1) dmech.grph = this dmech.parms.object($3).parmelms.object($4).dmech = dmech tobj.parmlist.append(tobj1) parminhomos.append(tobj) } func chk0diam() {local i if (n3d() > 1) { for i=0, n3d()-1 { if (diam3d(i) == 0) { return 0 } } } return 1 } proc mk_nseg() {local i, n_nseg, n_dx, dx, dlam, n0 nseg_strategy = 0 nsegvec = new Vector(all.count) lvec = new Vector(all.count) lamvec = new Vector(all.count) for i=0, all.count-1 all.object(i).sec { nsegvec.x[i] = nseg lvec.x[i] = L } sprint(tstr, "%d sections; %d segments", all.count, nsegvec.sum) disp.append(tstr) n_nseg = distinctvalues.ndistinct(nsegvec) distinctvalues.dislist(dislist_) sprint(tstr, "%d distinct values of nseg", n_nseg) msub = new TreeViewItem(disp, tstr) // for i=0, dislist_.count-1 { printf(" %d of %g\n", dislist_.object(i).size, nsegvec.x[dislist_.object(i).x[0]])} i = lvec.c.div(nsegvec).max_ind all.object(i).sec { dx = L/nseg sprint(tstr, "Longest dx is %g at %s with nseg=%d", dx, secname(), nseg) msub.append(tstr) } dx = int(dx/10+.999)*10 tobj = lvec.c.div(dx).floor.add(1).sub(nsegvec) if (tobj.dot(tobj) == 0) { sprint(tstr, "all nseg consistent under assumption of dx=%g and nseg=L/dx+1", dx) msub.append(tstr) nseg_strategy=1 }else{ tobj = lvec.c.div(2*dx).add(.45).floor.mul(2).add(1).sub(nsegvec) if (tobj.dot(tobj) == 0) { sprint(tstr, "nseg consistent under assumption of dx=%g and nseg=2*int(L/dx/2)+1", dx) msub.append(tstr) nseg_strategy=2 }else{ sprint(tstr, "nseg not consistent under constant dx=%g assumption", dx) msub.append(tstr) } } n0 = 0 for i=0, all.count-1 all.object(i).sec { if (chk0diam()) { lamvec.x[i] = L/lambda_f(100) }else{ n0 += 1 lamvec.x[i] = 1e6 if (n0 == 1){ sprint(tstr, "%s has 1 or more 0 diameter 3-d points",secname()) msub.append(tstr) } } } if (n0 > 1) { sprint(tstr, "...there exist %d sections with 0 diameter points", n0) msub.append(tstr) } i = lamvec.c.div(nsegvec).max_ind all.object(i).sec { dlam = lamvec.x[i]/nseg sprint(tstr, "Greatest dlambda is %g at %s with nseg=%d", dlam, secname(), nseg) msub.append(tstr) } if (dlam > .01) { if (dlam > .1) {rscl = .1} else { rscl = .01 } dlam = int(dlam/rscl+.45)*rscl tobj = lamvec.c.div(2*dlam).add(.45).floor.mul(2).add(1).sub(nsegvec) if (tobj.dot(tobj) == 0) { sprint(tstr, "nseg consistent under assumption of dlambda=%g", dlam) msub.append(tstr) nseg_strategy=3 }else{ sprint(tstr, "nseg not consistent under constant dlambda=%g assumption", dlam) msub.append(tstr) } } if (all.count == 1) { if (nsegvec.x[0] > 1) { // subset = parmsubsets.subsets.object(0).subset // addparm2sec(0,"nseg",nsegvec.x[0], -1) sprint(tstr, "nseg = %d", nsegvec.x[0]) msub.append(tstr) nseg_strategy = 0 } return } // if (nseg_strategy == 0) { // subset = subsets.object(0) // parm_assess(nsegvec, "nseg") // } } proc grph() { mview.gui.grph($o1, $o2) } endtemplate ModelViewSeclistAnalysis neuron-7.5/share/lib/hoc/mview/treeview.hoc000077500000000000000000000101461323325274500210030ustar00rootroot00000000000000// Usage: // tree = new TreeView() // // add top level items with // tree.top.append(new TreeViewItem(nil, "name", [obj])) // the obj is an optional argument and obj.selected(tree, currentindex, this) // will be called when the item is selected // // add branch items with // new TreeViewItem(parentTreeViewItem, "name", [obj]) // or parent.append("name", [obj]) // // map the browser with // tree.browser("title" // // because of mutual internal references, call TreeView.unlink() before // destroying the tree begintemplate TreeViewItem public s, saction, selected, parent, children, showing_children, browser public show, unshow, append, str, retval, unlink objref saction, this, parent, children, tobj strdef s, name proc init() { showing_children = 0 parent = $o1 if (object_id(parent)) { if (!object_id(parent.children)) { parent.children = new List() parent.str() } parent.children.append(this) } str($s2) if (numarg() > 2) { saction = $o3 retval = $4 } } proc unlink() { local i if (object_id(children)) { for i=0, children.count - 1 { children.object(i).unlink() } } objref tobj, parent, saction, children } proc append() { tobj = new TreeViewItem(this, $s1) if (numarg() > 1) { tobj.saction = $o2 tobj.retval = $3 } } proc str() { if (numarg() != 0) { name = $s1 } s = "" str1(s, parent) if (object_id(children) == 0) { sprint(s, "%s%s", s, name) }else{ sprint(s, "%s* %s", s, name) } } proc str1() { if (object_id($o2) != 0) { sprint($s1, " %s", $s1) str1($s1, $o2.parent) } } // TreeViewItem.selected(the tree view list, item number of tree view list) // The action is executed only if showing_children transitions from 0 to 1 // A showing_children transition from 0 to 1 causes the children to be // displayed. A transition from 1 to 0 causes the children to be undisplayed proc selected() {local pos // here is how an action can change the selection string //sprint(s, "%s x", s) //$o1.remove($2) //$o1.insrt($2,this) //$o1.select($2) pos = $o1.scroll_pos if (object_id(children)) { if (showing_children == 0) { showing_children = 1 show($o1, $2, 1) $o1.select(-1) $o1.select($2) if (object_id(saction)) { saction.selected($o1, $2, this, retval) } }else{ unshow($o1, $2, 1) showing_children = 0 $o1.select($2) if (object_id(saction)) { saction.selected($o1, $2, this, retval) } } }else{ if (object_id(saction)) { saction.selected($o1, $2, this, retval) } } $o1.scroll_pos(pos) } // TreeViewItem.show(treeview list, item, is root of show) proc show() {local i if (object_id(children) && showing_children) { for (i = children.count - 1; i >= 0; i -= 1) { children.object(i).show($o1, $2, 0) } } if ($3 == 0) { $o1.insrt($2+1, this) } } // TreeViewItem.unshow(treeview list, item, is root of unshow) proc unshow() {local i if (object_id(children) && showing_children) { for i = 0, children.count - 1 { children.object(i).unshow($o1, $2+1, 0) } } if ($3 == 0) { $o1.remove($2) } } endtemplate TreeViewItem begintemplate TreeView public top, browser, before, after, unlink objref top, before, after proc init() { top = new List() } proc unlink() { local i for i=0, top.count -1 { top.object(i).unlink() } objref top, before, after } proc browser() { top.browser($s1, "s") top.select_action("action(hoc_ac_)", 1) } proc action() { if ($1 > 0) { // avoid bug about always first selecting 0 if (object_id(before)) { before.selected(0, $1) } top.object($1).selected(top, $1) if (object_id(after)) { after.selected(1, $1) } } } endtemplate TreeView /* // test of TreeView objref tree, nil, tobj proc add() {local i for i=0, 5 { sprint(tstr, "item %d level %d", i, $1) tobj = new TreeViewItem($o2, tstr) } if ($1 < 4) { for i=0, $o2.children.count-1 { add($1+1, $o2.children.object(i)) } } } proc test() {local i, level tree = new TreeView() tree.top.append(new TreeViewItem(nil, "")) for i= 1, 5 { sprint(tstr, "item %d top", i) tree.top.append(new TreeViewItem(nil, tstr)) } for i = 1, tree.top.count-1 { add(1, tree.top.object(i)) } tree.browser("test") } test() */ neuron-7.5/share/lib/hoc/netbild.hoc000077500000000000000000000007451323325274500174470ustar00rootroot00000000000000{load_file("celbild.hoc")} {xopen("netbild/grstrlst.hoc")} {xopen("netbild/syntypes.hoc")} {xopen("netbild/netready.hoc")} {xopen("netbild/artcel.hoc")} {xopen("netbild/netdata.hoc")} {xopen("netbild/spkplot.hoc")} {xopen("netbild/edgegui.hoc")} {xopen("netbild/netgui.hoc")} objref tobj proc makenetreadycell() { tobj = new NetReadyCellGUI() objref tobj } proc makeartcelltype() { tobj = new ArtCellGUI() objref tobj } proc makenetbuilder() { tobj = new NetGUI() objref tobj } neuron-7.5/share/lib/hoc/netbild/000077500000000000000000000000001323325274500167435ustar00rootroot00000000000000neuron-7.5/share/lib/hoc/netbild/Makefile.am000077500000000000000000000004701323325274500210030ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocnetbilddir = $(neuronhomehocdir)/netbild neuronhomehocnetbild_DATA = netdata.hoc netready.hoc syntypes.hoc \ grstrlst.hoc artcel.hoc spkplot.hoc netgui.hoc edgegui.hoc EXTRA_DIST = $(neuronhomehocnetbild_DATA) neuron-7.5/share/lib/hoc/netbild/Makefile.in000066400000000000000000000445751323325274500210270ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/hoc/netbild ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomehocnetbilddir)" DATA = $(neuronhomehocnetbild_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomehocdir = $(neuronhomedir)/hoc neuronhomehocnetbilddir = $(neuronhomehocdir)/netbild neuronhomehocnetbild_DATA = netdata.hoc netready.hoc syntypes.hoc \ grstrlst.hoc artcel.hoc spkplot.hoc netgui.hoc edgegui.hoc EXTRA_DIST = $(neuronhomehocnetbild_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/hoc/netbild/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/hoc/netbild/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-neuronhomehocnetbildDATA: $(neuronhomehocnetbild_DATA) @$(NORMAL_INSTALL) @list='$(neuronhomehocnetbild_DATA)'; test -n "$(neuronhomehocnetbilddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomehocnetbilddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomehocnetbilddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(neuronhomehocnetbilddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(neuronhomehocnetbilddir)" || exit $$?; \ done uninstall-neuronhomehocnetbildDATA: @$(NORMAL_UNINSTALL) @list='$(neuronhomehocnetbild_DATA)'; test -n "$(neuronhomehocnetbilddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(neuronhomehocnetbilddir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(neuronhomehocnetbilddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-neuronhomehocnetbildDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-neuronhomehocnetbildDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-neuronhomehocnetbildDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-neuronhomehocnetbildDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/hoc/netbild/artcel.hoc000077500000000000000000000120341323325274500207130ustar00rootroot00000000000000// Artificial cell (PointProcess with NET_RECEIVE that calls net_event) // with specific parameters begintemplate ArtCell public name, ms, is_art, index public classname, save_class public create1, tobj, change strdef name, tstr objref ms, tobj, nil, this, all proc init() { created_ = 0 $o1.name(name) ms = new MechanismStandard(name) if (numarg() == 2) { name = $s2 }else{ ms.name(name) } ms.in($o1) is_art = 1 index = -1 } proc classname() { ms.name($s1) sprint($s1, "%s_%s", name, $s1) } proc save_class() { classname(tstr) $o1.printf("\nbegintemplate %s\n", tstr) $o1.printf("public pp, connect2target, x, y, z, position, is_art\n") $o1.printf("objref pp\n") $o1.printf("proc init() {\n") ms.name(tstr) $o1.printf(" pp = new %s()\n", tstr) synbody($o1) $o1.printf("}\n") $o1.printf("func is_art() { return 1 }\n") $o1.printf("obfunc connect2target() { localobj nc\n nc = new NetCon(pp, $o1)\n if (numarg() == 2) { $o2 = nc }\n return nc\n}\n") $o1.printf("proc position(){x=$1 y=$2 z=$3}") classname(tstr) $o1.printf("\nendtemplate %s\n", tstr) } proc synbody() {local i, j, size tobj = new MechanismStandard(tstr) for i=0,tobj.count-1 { size = tobj.name(tstr, i) for j=0, size-1 { if (tobj.get(tstr, j) != ms.get(tstr, j)) { if (size == 1) { $o1.printf(" pp.%s = %g\n", tstr, ms.get(tstr, j)) }else{ $o1.printf(" pp.%s[%d] = %g\n", tstr, j, ms.get(tstr, j)) } } } } } proc create1() { created_ = 1 classname(tstr) sprint(tstr, "%s.tobj = new %s()", this, tstr) execute(tstr) $o1 = tobj tobj = nil ms.out($o1.pp) } proc change() {local i if (created_) { if (all == nil) { classname(tstr) all = new List(tstr) } for i=0, all.count-1 { ms.out(all.object(i).pp) } } } endtemplate ArtCell // A list of ArtCell's begintemplate ArtCellGUI public name, save, save_data, map, actypelist, hb external ArtCell, valid_name_syntax strdef name, tstr, tstr1 objref this, tobj, tobj1, mslist, actypelist, vb, hb, d proc init() {local i actypelist = new List() possible_targets() // mslist is a list of MechanismStandards build() if (numarg() == 0) { map() } } proc map() { sprint(tstr, "%s", this) if (numarg() > 1) { hb.map(tstr, $2,$3,$4,$5) }else{ hb.map(tstr) } } proc possible_targets() { mslist = new List() //figure out which PointProcesses can be targets of a NetCon tobj = new MechanismType(1) // all point processes for i=0, tobj.count-1 { if (tobj.is_netcon_target(i) && tobj.has_net_event(i) != 0) { tobj.select(i) tobj.selected(tstr) mslist.append(new MechanismStandard(tstr)) } } } proc build() { hb = new HBox(3) hb.priority(999) hb.save("save()") hb.intercept(1) hb.ref(this) vb = new VBox(3) vb.intercept(1) xpanel("") xmenu("New") for i=0, mslist.count-1 { mslist.object(i).name(tstr) sprint(tstr1, "newstype(%d)", i) xbutton(tstr, tstr1) } xmenu() xlabel("Using Current Selection...") xbutton("Rename", "rename()") xbutton("Clone", "clone()") xbutton("Remove", "remove()") xlabel("Artificial Cell types") xpanel() actypelist.browser("", "name") actypelist.select_action("selstype(hoc_ac_)") vb.intercept(0) vb.map() d = new Deck(3) d.intercept(1) xpanel("") xlabel("Variables for selected Cell type appear here") xpanel() d.intercept(0) d.map() d.flip_to(0) hb.intercept(0) } proc append() {local i actypelist.append(new ArtCell($o1, $s2)) dinsert(actypelist.count-1) selstype(actypelist.count-1) } proc newstype() {local i actypelist.append(new ArtCell(mslist.object($1))) dinsert(actypelist.count-1) selstype(actypelist.count-1) } proc dinsert() { d.intercept(1) tobj = actypelist.object($1) sprint(tstr, "%s.change()", tobj) tobj.ms.action(tstr) tobj.ms.name(tstr) sprint(tstr, "%s -- %s", tobj.name, tstr) tobj.ms.panel(tstr) d.intercept(0) d.move_last($1) } proc rename() { local i i = actypelist.selected if (i == -1) return tobj = actypelist.object(i) tstr = tobj.name while (string_dialog("Rename the artificial cell type", tstr)) { if (valid_name_syntax(tstr, 1)) { tobj.name = tstr break } } actypelist.remove(i) actypelist.insrt(i, tobj) d.remove(i) dinsert(i) selstype(i) } proc clone() {local i i = actypelist.selected if (i == -1) return tobj = actypelist.object(i) actypelist.append(new ArtCell(tobj.ms, tobj.name)) dinsert(actypelist.count-1) selstype(actypelist.count-1) } proc remove() {local i i = actypelist.selected if (i == -1) return actypelist.remove(i) d.remove(i) selstype(-1) objref tobj } proc selstype() { if ($1 == -1) { d.flip_to(-1) return } d.flip_to($1) actypelist.select($1) } proc save() { hb.save("load_file(\"netbild.hoc\")\n}") save_data(hb, "ocbox_") hb.save("{") } proc save_data() { sprint(tstr, "%s = new ArtCellGUI(1)", $s2) $o1.save(tstr) sprint(tstr, "{object_push(%s)}", $s2) $o1.save(tstr) for i = 0, actypelist.count -1 { tobj = actypelist.object(i) $o1.save("{") tobj.ms.save("tobj") $o1.save("}") sprint(tstr, "{append(tobj, \"%s\")}", tobj.name) $o1.save(tstr) } $o1.save("{object_pop()}") } endtemplate ArtCellGUI neuron-7.5/share/lib/hoc/netbild/edgegui.hoc000077500000000000000000000052211323325274500210520ustar00rootroot00000000000000begintemplate NetEdgeGUI public remove, insrt public l1, l2 objref net, l1, l2 , dummy, this, b, hb, vfe, old strdef tstr proc init() {local i, x dummy = new String("") val = 0 old = new Vector() net = $o1 type = $2 l1 = new List() l2 = new List() for i=0, net.edges.count-1 { l2.append(dummy) old.append(vecval(i)) } old.sort() if (old.size > 1) { x = old.x[old.size-1] for (i=old.size-2; i >= 0; i -= 1) { if (x == old.x[i]) { old.remove(i+1) } x = old.x[i] } } for i=0, old.size-1 { l1.append(dummy) } build() sprint(tstr, "%s for %s", this, net) b.map(tstr) } proc remove() { l2.remove($1) l1.select(-1) l2.select(-1) } proc insrt() { l2.insrt($1, dummy) l2.select(-1) } proc build() { b = new VBox() b.save("") b.intercept(1) xpanel("",1) xlabel("----->") if (type == 0) { vfe = new ValueFieldEditor("Weight", &val, 1, "valentry()") }else{ vfe = new ValueFieldEditor("Delay", &val, 1, "valentry()") } xlabel("----->") xpanel() hb = new HBox() hb.intercept(1) l1.browser("", tstr, "oldvalname(hoc_ac_)") l2.browser("", tstr, "name(hoc_ac_)") if (type == 0) { l1.select_action("selw1(hoc_ac_)") l2.select_action("selw2(hoc_ac_)") }else{ l1.select_action("seld1(hoc_ac_)") l2.select_action("seld2(hoc_ac_)") } hb.intercept(0) hb.map() b.intercept(0) } proc name() { net.edges.object($1).name(tstr) if (type == 0) { sprint(tstr, "%-12s %g", tstr, net.edges.object($1).w) }else{ sprint(tstr, "%-12s %g", tstr, net.edges.object($1).d) } } func vecval() { if (type == 0) { return net.edges.object($1).w } return net.edges.object($1).d } proc oldvalname() { sprint(tstr, "%g", old.x[$1]) } proc selw1() { if ($1 != -1) { val = old.x[$1] } l2.select(-1) } proc selw2() {local w, j, i if($1 != -1) { w = val val = net.edges.object($1).w net.edges.object($1).w = w vfe.default val = w net.edges.object($1).change() i = l2.scroll_pos() l2.remove($1) l2.insrt($1,dummy) l2.select($1) l2.scroll_pos(i) update_oldval() } } proc seld1() { if ($1 != -1) { val = old.x[$1] } l2.select(-1) } proc seld2() {local w, j, i if($1 != -1) { w = val val = net.edges.object($1).d net.edges.object($1).d = w vfe.default val = w net.edges.object($1).change() i = l2.scroll_pos() l2.remove($1) l2.insrt($1,dummy) l2.select($1) l2.scroll_pos(i) update_oldval() } } proc update_oldval() {local i, x, scr i = old.indwhere(">=", val) if (i == -1) { old.append(val) i = old.size-1 }else if (old.x[i] > val) { old.insrt(i, val) }else{ return } l1.insrt(i, dummy) l1.select(-1) } proc valentry() { l1.select(-1) l2.select(-1) } endtemplate NetEdgeGUI neuron-7.5/share/lib/hoc/netbild/grstrlst.hoc000077500000000000000000000016741323325274500213350ustar00rootroot00000000000000// a list browser implemented in a Graph // the list item strings must be called 'name' begintemplate ListInGraph public pl, select, grsel proc init() { selected_ = -1 } proc select() { selected_ = $1 } proc pl() {local i, j //Graph, color, List, [list](of objects with name as strdef) for i=0, $o3.count-1 { j = $2 if (i == selected_) j = 2 $o1.label(0, 1,$o3.object(i).name,2, 1, 0, i+2, j) } if (numarg() == 4) { k = $o3.count+1 for i=0, $o4.count-1 { j = $2 if (i == selected_) j = 2 $o1.label(0, 1,$o4.object(i).name,2, 1, 0, k+=1, j) } } } func grsel() {local x, y, i, h, n //Graph, iView, x, y, List, [List] n = $o5.count if (numarg() == 6) { n += $o6.count } x = $o1.view_info($2, 13, $3) y = $o1.view_info($2, 14, $4) h = $o1.view_info($2, 15) if (abs(x) < 20) { i = int(y/h + .5) - 2 // since each char has y align i+2 if (i >= 0 && i < n) { return i } } return -1 } endtemplate ListInGraph neuron-7.5/share/lib/hoc/netbild/netdata.hoc000077500000000000000000000147361323325274500210740ustar00rootroot00000000000000begintemplate NetCell public type, x, y // NetReadyCell or ArtCell, location //implementation public create1, real, replace objref real public name, pl, index objref type proc init() { type = $o1 x = $2 y = $3 index = -1 } proc name() {local i sprint($s1, "%s%d", type.name, index) } proc pl() {local i name($s2) $o1.label(x, y, $s2, 1, 1, .5, .5, $3) } proc create1() { type.create1(real) real.position(x, y, 0) } proc replace() { //NetReadyCell or ArtCell type = $o1 if (object_id(real)) { create1() } } endtemplate NetCell begintemplate NetSource public cell // NetCell //implementation public edges // list of NetEdge objref cell, edges proc init() { cell = $o1 edges = new List() } endtemplate NetSource begintemplate NetTarget public cell, syn //NetCell, SynTypeInstance (or nil if NetCell is an ArtCell) // implementation public edges, synindex //list of NetEdge objref cell, syn, edges proc init() { cell = $o1 synindex = $2 if (cell.type.is_art == 0) { syn = cell.type.synlist.object(synindex) } edges = new List() } endtemplate NetTarget begintemplate NetEdge public source, target, w, d //NetCell, NetTarget, weight, delay //implementation public create1, netcon, w, d, name, change, namebar objref netcon objref source, target proc init() { source = $o1 target = $o2 w = $3 d = $4 } proc create1() { if (target.cell.type.is_art) { netcon = source.cell.real.connect2target(target.cell.real.pp) }else{ netcon = source.cell.real.connect2target( \ target.cell.real.synlist.object(target.synindex)) } netcon.weight = w netcon.delay = d } proc change() { if (object_id(netcon) != 0) { netcon.weight = w netcon.delay = d } } proc name() { source.cell.name($s1) if (target.cell.type.is_art) { sprint($s1, "%s->%s%d", $s1, target.cell.type.name, \ target.cell.index) }else{ sprint($s1, "%s->%s%d.%s%d", $s1, target.cell.type.name, \ target.cell.index, target.syn.stype.name,target.syn.index) } } proc namebar() { source.cell.name($s1) if (target.cell.type.is_art) { sprint($s1, "%s__%s%d", $s1, target.cell.type.name, \ target.cell.index) }else{ sprint($s1, "%s__%s%d_%s%d", $s1, target.cell.type.name, \ target.cell.index, target.syn.stype.name,target.syn.index) } } endtemplate NetEdge begintemplate NetData public sources, targets, edges // lists of NetCell, NetTarget, NetEdge public add_edge, remove_edge, edge_index public add_cell, remove_cell, replace_cell public cel2tar //implementation public create1, created_, abstract objref sources, targets, edges, cel2tar_ objref tobj, nil, oldtype proc init() { created_ = 0 sources = new List() targets = new List() edges = new List() cel2tar_ = new Vector(0) } func add_edge() { edges.append($o1) $o1.source.edges.append($o1) $o1.target.edges.append($o1) if (created_) {$o1.create1()} return edges.count-1 } // room for elimination of one of the index searches in the following if // pass index to remove_edge or return object in edge_index func remove_edge() {local i i = edges.index($o1) edges.remove(i) $o1.source.edges.remove($o1.source.edges.index($o1)) $o1.target.edges.remove($o1.target.edges.index($o1)) return i } func edge_index() {local i //NetSource, NetTarget -- return edges index // in case of multiples it is the first one in source list for i=0, $o1.edges.count-1 { if ($o1.edges.object(i).target == $o2) { return edges.index($o1.edges.object(i)) } } return -1 } proc add_cell() {local i // NetCell cel2tar_update_ = 1 sources.append(new NetSource($o1)) if ($o1.type.is_art) { targets.append(new NetTarget($o1, 0)) }else{ for i=0, $o1.type.synlist.count-1 { targets.append(new NetTarget($o1, i)) } } $o1.index = sources.count - 1 if (created_) { $o1.create1() } } proc remove_cell() { local i // NetCell cel2tar_update_ = 1 sources.remove($o1.index) for i=$o1.index, sources.count-1 { sources.object(i).cell.index = i } for (i=targets.count-1; i >= 0; i -= 1) { if (targets.object(i).cell == $o1) { targets.remove(i) } } for (i=edges.count-1; i >= 0; i -= 1) { if (edges.object(i).source.cell == $o1 || edges.object(i).target.cell == $o1) { edges.object(i).netcon = nil edges.remove(i) } } $o1.real = nil } proc replace_cell() { local i, j, r //NetCell, NetReadyCell or ArtCell if ($o1.type == $o2) { return } cel2tar_update_ = 1 // get rid of NetCon first to avoid bug when real cell deleted if (created_) for i=0, edges.count - 1 { tobj = edges.object(i) if (tobj.source.cell == $o1 || tobj.target.cell == $o1) { tobj.netcon = nil } } oldtype = $o1.type $o1.replace($o2) r = 1 if (oldtype.is_art == 0 && $o2.is_art == 0) { if (oldtype.synlist.count != $o1.synlist.count) { // incompatible target replacement r = 0 } } if (r == 0) { // target list is must be made consistent // must remove target edges since no unambiguous map from old to new for (i=targets.count-1; i >= 0; i -= 1) { if (targets.object(i).cell == $o1) { targets.remove(i) } } for (i=edges.count-1; i >= 0; i -= 1) { if (edges.object(i).target.cell == $o1) { edges.object(i).netcon = nil edges.remove(i) } } if ($o1.type.is_art) { targets.append(new NetTarget($o1, 0)) }else{ for i=0, $o1.type.synlist.count-1 { targets.append(new NetTarget($o1, i)) } } }else{ // target list is consistent but synapses and netcon must be updated for i=0, targets.count-1 { tobj = targets.object(i) if (tobj.cell == $o1) { if ($o2.is_art == 0) { tobj.syn = $o1.synlist.object(tobj.synindex) } if (created_) { for j=0, tobj.edges.count-1 { tobj.edges.object(j).create1() } } } } } // in any case we can keep the source edges if (created_) for i=0, edges.count - 1 { if (edges.object(i).source.cell == $o1) { edges.object(i).create1() } } } func cel2tar() { if (cel2tar_update_) { cel2tar_update() } return cel2tar_.x[$1] + $2 } proc cel2tar_update() { local n cel2tar_.resize(sources.count) if (sources.count > 0) { cel2tar_.x[0] = 0 } for i=0, sources.count-2 { if (sources.object(i).cell.type.is_art) { n = 1 }else{ n = sources.object(i).cell.type.synlist.count } cel2tar_.x[i+1] = cel2tar_.x[i] + n } cel2tar_update_ = 0 } proc create1() {local i created_ = 1 for i=0, sources.count-1 { sources.object(i).cell.create1() } for i=0, edges.count-1 { edges.object(i).create1() } } proc abstract() { local i created_ = 0 for i=0, edges.count-1 { edges.object(i).netcon = nil } for i=0, sources.count-1 { sources.object(i).cell.real = nil } } endtemplate NetData neuron-7.5/share/lib/hoc/netbild/netgui.hoc000077500000000000000000000544471323325274500207520ustar00rootroot00000000000000if (!name_declared("EmptyClass")) { // for aliases unpolluted by other names execute1("begintemplate EmptyClass\nendtemplate EmptyClass\n") } begintemplate NetGUI public net, aliases public save_data, map, create1 external graph_menu_remove_most, hoc_sf_, SpikePlot objref actypes, nrctypes, net objref b, g, ct, cell, tobj, this, nil, math, src1_, tar1_, src2_, tar2_ objref tarcel2_, wman, dman, cmap_, aliases objref mapold2new, missing, lig, nrcg, fh, tobj1 strdef tstr, premesg, plnet_mesg, srcname, tarname, ncappend proc init() { aliases = new EmptyClass() use_alias_ = 0 create_ = 0 created_ = 0 show_edges_ = 1 nrcg = new NetReadyCellGlyph() math = new GUIMath() actypes = new List("ArtCell") nrctypes = new List("NetReadyCell") net = new NetData() lig = new ListInGraph() build() if (numarg() == 0) { map() } } proc map() { sprint(tstr, "%s", this) if (numarg() > 1) { b.map(tstr, $2,$3,$4,$5) }else{ b.map(tstr) } g.exec_menu("Locate") if (oldnodecnt > 0) notice() // call here so dialog can come up } proc build() { b = new HBox(3) b.priority(995) b.save("save()") b.intercept(1) g = new Graph(0) graph_menu_remove_most(g) g.size(-200,200,-150,150) g.yaxis(3) xpanel("") g.menu_tool("Locate", "locate", "locmenu()" ) g.menu_tool("Src -> Tar", "src2tar", "src2tarmenu()") g.menu_tool("Source", "src1", "src1menu()") g.menu_tool(" Targets", "tar2", "tar2menu()") g.menu_tool("Target", "tar1", "tar1menu()") g.menu_tool(" Sources", "src2", "src2menu()") xcheckbox("Show all edges", &show_edges_, "pledges(show_edges_)") xbutton("Weights", "wman = new NetEdgeGUI(net, 0)") xbutton("Delays", "dman = new NetEdgeGUI(net, 1)") xbutton("Hoc File", "hocfile()") xcheckbox("Create",&create_,"create1()") xbutton("SpikePlot", "spikeplt()") xmenu("Net Variables") xbutton("Show Map", "cellmap()") sprint(tstr, "Provide %s.aliases", this) xcheckbox(tstr, &use_alias_, "set_alias(use_alias_)") xmenu() xpanel() g.view(2) b.ref(this) b.intercept(0) } proc set_alias() {local i, j localobj tobj, tobj1 hoc_sf_.alias(aliases) if (numarg() == 1) { use_alias_ = $1 } if (create_ == 0) { use_alias_ = 0 } if (use_alias_ == 0) { return } for i=0, net.sources.count-1 { tobj = net.sources.object(i).cell tobj.name(tstr) if (tobj.type.is_art == 0) { hoc_sf_.alias(aliases, tstr, tobj.real) tobj1 = tobj.type.synlist for j=0, tobj1.count-1 { tobj.name(tstr) sprint(tstr, "%s_%s%d", tstr, tobj1.object(j).stype.name, j) hoc_sf_.alias(aliases, tstr, tobj.real.synlist.object(j)) } }else{ hoc_sf_.alias(aliases, tstr, tobj.real.pp) } } for i=0, net.edges.count-1 { tobj = net.edges.object(i) tobj.namebar(tstr) hoc_sf_.alias(aliases, tstr, tobj.netcon) } } proc spikeplt() { tobj = new SpikePlot(net) objref tobj } proc cellmap() {local i, j if (create_) { cmap_ = new List() for i= 0, net.sources.count-1 { tobj = net.sources.object(i).cell tobj.name(tstr) sprint(tstr, "%-12s %s", tstr, tobj.real) cmap_.append(new String(tstr)) if (tobj.type.is_art == 0) { tobj1 = tobj.type.synlist for j=0, tobj1.count-1 { tobj.name(tstr) sprint(tstr, "%s_%s%d", tstr, tobj1.object(j).stype.name, j) sprint(tstr, "%-12s %s", tstr, tobj.real.synlist.object(j)) cmap_.append(new String(tstr)) } } } if (net.edges.count) { cmap_.append(new String("")) } for i=0, net.edges.count-1 { tobj = net.edges.object(i) tobj.namebar(tstr) sprint(tstr, "%-15s %s", tstr, tobj.netcon) cmap_.append(new String(tstr)) } sprint(tstr, "%s name <-> Instance Name", this) cmap_.browser(tstr, "s") objref tobj, tobj1 } } proc locmenu() { pl() g.align(0,0) g.vfixed(1) g.label(.2,1) g.label("Create a new cell by dragging from the list on the left") g.label("Place a new cell over another to replace the old one") g.label("Move a cell to a new location") g.label("Cells dragged off the view are discarded") g.flush } proc src1menu() { clear() plnet_mesg="Select a source cell for connection to targets" plnet() } proc src1() { local i // select source for future targets (tar2) if ($1 == 2) { clear() } i = sel_cell($2,$3) if (i != -1) { src1_ = net.sources.object(i) src1_.cell.name(srcname) sprint(plnet_mesg, "Source %s selected", srcname) }else{ src1_ = nil plnet_mesg = "No source selected" } if ($1 == 3) { if (src1_ == nil) { plnet_mesg="Select a source cell for connection to targets" } } plnet() } proc tar2menu() { if (src1_ == nil) { g.exec_menu("Source") plnet_mesg = "\"Targets\" requires a prior Source selection" plnet() }else{ sprint(plnet_mesg, "Select Targets to (dis)connect to Source %s", srcname) } plnet() } proc tar2() {local i // attach(detach) target for current source if ($1 == 2) { tarcel2_ = nil tar2_ = nil } if (tarcel2_ == nil){ i = sel_cell($2,$3) if (i != -1) { tarcelindex_ = i tarcel2_ = net.sources.object(i).cell tarcel2_.name(tarname) if (tarcel2_.type.is_art == 0) { tar2detail($1,$2,$3) return }else{ tar2_ = net.targets.object(net.cel2tar(tarcelindex_, 0)) acmesg("", src1_, tar2_) tarcel2_ = nil } }else{ tar2_ = nil plnet_mesg = "No Target Cell selected" } }else{ tar2detail($1,$2,$3) if ($1 != 3) { return } } if ($1 == 3) { if (tar2_ == nil) { sprint(plnet_mesg, "Select Targets to (dis)connect to Source %s", srcname) }else if (tar2_.cell.type.is_art) { tarcel2_ = tar2_.cell acmesg("ed", src1_, tar2_) if (detach == -1) { add_edge(new NetEdge(src1_, tar2_, 0, 1)) }else{ remove_edge(net.edges.object(detach)) } print plnet_mesg } } plnet() if ($1 != 3) { plline($2,$3,src1_.cell) } } proc acmesg() { detach = net.edge_index($o2, $o3) if (detach == -1) { sprint(plnet_mesg, "Attach%s Target %s to Source %s", $s1, tarname, srcname) }else{ sprint(plnet_mesg, "Detach%s Target %s from Source %s", $s1, tarname, srcname) } } proc tar2detail() { // attach(detach) target for current source i = sel_tar($2,$3) if (i != -1) { tar2_ = net.targets.object(i) detach = net.edge_index(src1_, tar2_) if (detach == -1) { sprint(plnet_mesg, "Attach Target %s%d on cell %s to Source %s", \ tar2_.syn.stype.name, tar2_.syn.index, tarname, srcname) attach = 1 }else{ sprint(plnet_mesg, "Detach Target %s%d on cell %s from Source %s", \ tar2_.syn.stype.name, tar2_.syn.index, tarname, srcname) attach = 0 } }else{ tar2_ = nil sprint(plnet_mesg, "No Target selected on cell %s from Source %s", \ tarname, srcname) } if ($1 == 3) { if (tar2_ != nil) { if (detach == -1) { sprint(plnet_mesg, "Attached Target %s%d on cell %s to Source %s", \ tar2_.syn.stype.name, tar2_.syn.index, tarname, srcname) add_edge(new NetEdge(src1_, tar2_, 0, 1)) }else{ sprint(plnet_mesg, "Detached Target %s%d on cell %s from Source %s", \ tar2_.syn.stype.name, tar2_.syn.index, tarname, srcname) remove_edge(net.edges.object(detach)) } print plnet_mesg } } if ($1 != 3) { plnetdetail() } } proc tar1menu() { clear() plnet_mesg = "Select a target synapse for connection to sources." plnet() } proc tarselect() {local i if ($1 == 2) { tarcelindex_ = -1 tarcel2_ = nil tar2_ = nil } if (tarcel2_ == nil) { i = sel_cell($2,$3) if (i != -1) { tarcelindex_ = i tarcel2_ = net.sources.object(i).cell tarcel2_.name(tarname) if (tarcel2_.type.is_art == 0) { sprint(plnet_mesg, "Target cell %s selected", tarname) }else{ tar2_ = net.targets.object(net.cel2tar(tarcelindex_, 0)) tarcel2_ = nil sprint(plnet_mesg, "Target %s selected", tarname) } }else{ plnet_mesg = "No target cell or target selected" tarcel2_ = nil tarcelindex_ = -1 } plnet() } if (tarcel2_ != nil) { i = sel_tar($2,$3) if (i != -1) { tar2_ = net.targets.object(i) sprint(plnet_mesg, "Target %s%d on cell %s selected", \ tar2_.syn.stype.name, tar2_.syn.index, tarname) }else{ sprint(plnet_mesg, "No target on cell %s selected", \ tarname) tar2_ = nil } plnetdetail() } } proc clear() { src1_ = nil tar2_ = nil tarcel2_ = nil } proc tar1() { // select target for future sources if ($1 == 2) { clear() } tarselect($1,$2,$3) if ($1 == 3) { if (tar2_ == nil) { plnet_mesg = "Select a target synapse for connection to sources." } plnet() } } proc src2menu() { src1_ = nil if (tar2_ == nil) { g.exec_menu("Target") plnet_mesg = "\"Sources\" requires a prior Target selection" }else{ sprint(plnet_mesg, "Select Sources to (dis)connect to Target %s", tarname) } plnet() } proc src2() {local i // attach(detach) source for current target if ($1 == 2) { tar2_.cell.name(tstr) if (tar2_.cell.type.is_art == 0) { sprint(tarname, "%s%d on Cell %s", tar2_.syn.stype.name, \ tar2_.syn.index, tstr) }else{ tar2_.cell.name(tarname) } } i = sel_cell($2,$3) if (i != -1) { src1_ = net.sources.object(i) src1_.cell.name(srcname) detach = net.edge_index(src1_, tar2_) if (detach == -1) { sprint(plnet_mesg, "Attach Source %s to Target %s", srcname, tarname) }else{ sprint(plnet_mesg, "Detach Source %s to Target %s", srcname, tarname) } }else{ plnet_mesg = "No Source cell selected" src1_ = nil } if ($1 == 3) { if (src1_ != nil) { if (detach == -1) { sprint(plnet_mesg, "Attached Source %s to Target %s", srcname, tarname) add_edge(new NetEdge(src1_, tar2_, 0, 1)) }else{ sprint(plnet_mesg, "Detached Source %s to Target %s", srcname, tarname) remove_edge(net.edges.object(detach)) } print plnet_mesg }else{ sprint(plnet_mesg, "Select Sources to (dis)connect to Target %s", tarname) } } plnet() if ($1 != 3) { plline($2,$3,tar2_.cell) } } proc add_edge() {local i set_alias(0) i = net.add_edge($o1) if (wman != nil) { wman.insrt(i) } if (dman != nil) { dman.insrt(i) } } proc remove_edge() {local i set_alias(0) i = net.remove_edge($o1) if (wman != nil) { wman.remove(i) } if (dman != nil) { dman.remove(i) } } proc plline() { if (src1_ == nil || tar2_ == nil) { g.beginline(1,1) }else{ if (detach == -1) { g.beginline(1,3) }else{ g.beginline(1,7) } } g.line($1,$2) g.line($o3.x, $o3.y) } proc src2tarmenu() { plnet_mesg = "Select Source and drag mouse to Target" clear() plnet() } proc src2tar() {local i if ($1 == 2) { // press must be src src2tar_state = 0 clear() } if (src2tar_state == 0) { // no src selected src1($1,$2,$3) if (src1_ != nil) { src2tar_state = 1 } }else if (src2tar_state == 1) { // src selected i = sel_cell($2,$3) if (i == -1) { src2tar_state = 2 } }else if (src2tar_state == 2) { // not in src region, tarcel not selected tar2($1,$2,$3) } if ($1 == 3) { if (tar2_ == nil) { plnet_mesg = "Select Source and drag mouse to Target" plnet() } }else{ if (src1_ != nil) { plline($2,$3, src1_.cell) } } } proc plnet() {local i, x, y if (numarg() == 1) { for i=0, net.sources.count-1 { net.sources.object(i).cell.pl(g, tstr, 9) } }else{ plnodes() } if (show_edges_) { pledges(1) } if (src1_ != nil) { src1_.cell.pl(g, tstr, 2) if (!show_edges_) for i=0, src1_.edges.count-1 { tobj = src1_.edges.object(i).target.cell g.beginline(2, 2) g.line(src1_.cell.x, src1_.cell.y) g.line(tobj.x, tobj.y) } } if (tar2_ != nil) { tar2_.cell.pl(g, tstr, 3) if(!show_edges_) for i=0, tar2_.edges.count-1 { tobj = tar2_.edges.object(i).source.cell g.beginline(3,1) g.line(tar2_.cell.x, tar2_.cell.y) g.line(tobj.x, tobj.y) } } g.label(.5,.9,plnet_mesg,2,1,.5,.5,1) } proc pledges() {local i, j, x0, y0, x1, y1, x, y for i=0, net.edges.count - 1 { tobj = net.edges.object(i) g.beginline($1,1) x0 = tobj.source.cell.x y0 = tobj.source.cell.y x1 = tobj.target.cell.x y1 = tobj.target.cell.y if (tobj.target.cell.type.is_art) { j = 1 }else{ j = tobj.target.syn.index + 1 } g.line(x0, y0) x = -.05*j*(y1 - y0) y = .05*j*(x1 - x0) if (x == 0 && y == 0) { x = (g.size(2) - g.size(1))/20 g.line(x0+j*x/2, y0-x) g.line(x0, y0-2*x) g.line(x0-j*x/2, y0-x) g.line(x1,y1) }else{ x += (x0+x1)/2 y += (y0 + y1)/2 g.line(x, y) g.line(x1,y1) g.mark((x+2*x1)/3, (y+2*y1)/3, "o",8, $1,1) } } } proc plnetdetail() {local i, j, x, y, n nrcg.pl(g, tarcel2_.type) plnet(1) tarcel2_.pl(g,tstr,3) i = net.cel2tar(tarcel2_.index, 0) for i=i,i+tarcel2_.type.synlist.count-1 { tobj = net.targets.object(i) n = tobj.edges.count if (n > 0) { x = tobj.syn.x0 y = tobj.syn.y0 for j=0, n-1 { g.beginline(3,1) g.line(x, y) tobj1 = tobj.edges.object(j).source.cell g.line(tobj1.x, tobj1.y) } } } } proc plnodes() { local i g.erase_all for i=0, net.sources.count-1 { net.sources.object(i).cell.pl(g, tstr, 1) } } proc pl() {local i plnodes() if (show_edges_) { pledges(1) } lig.pl(g, 1, nrctypes, actypes) } proc pl_ct() { g.label($1, $2, ct.name, 1, 1, .5, .5, 1) sprint(tstr, "%s%s at (%g,%g)", premesg, ct.name, $1, $2) g.label(.5,.9,tstr,2,1,.5,.5,1) } proc locate() {local i, x, y if ($1 == 2) { iview = g.view_info() for i=0, net.sources.count-1 { net.sources.object(i).cell.index = i } i = sel_type($2,$3) if (i != -1) { if (i < nrctypes.count) { ct = nrctypes.object(i) }else{ ct = actypes.object(i-nrctypes.count) } }else{ i = sel_cell($2,$3) if (i > -1) { cell = net.sources.object(i).cell } } replace = -1 // ct or cell or both nil } // if ct then moves around, destroyed if outside view, replaces if over a cell // and becomes a cell otherwise. if cell then moves around, destroyed if outside // view. destroy = 1 if (math.inside(g.view_info(iview, 11, $2), g.view_info(iview, 12, $3), 0,0,1,1)) { destroy = 0 } x = $2 - ($2)%1 y = $3 - ($3)%1 if ($1 != 3) { pl() if (ct != nil) { premesg = "Create " if (destroy) { premesg = "Discard " } replace = sel_cell($2,$3) if (replace > -1) { net.sources.object(replace).cell.name(tstr) sprint(premesg, "%s replaced by ", tstr) } pl_ct(x, y) }else if (cell != nil){ cell.x = x cell.y = y cell.name(tstr) if (destroy) { sprint(tstr, "Destroy %s", tstr) }else{ sprint(tstr, "Move %s to (%g,%g)", tstr, x, y) } g.label(.5,.9,tstr,2,1,.5,.5,1) }else{ g.label(.5, .9, "Nothing selected", 2, 1, .5, .5, 1) } }else{ if (ct != nil) { if (!destroy) { set_alias(0) if (replace > -1) { net.replace_cell(net.sources.object(replace).cell, ct) wman = nil dman = nil }else{ cell = new NetCell(ct, x, y) net.add_cell(cell) } cmap_ = nil } }else if (cell != nil && destroy) { set_alias(0) net.remove_cell(cell) cell = nil cmap_ = nil wman = nil dman = nil } if (cell != nil && create_) { cell.real.position(x, y, 0) } ct = nil cell = nil for i=0, net.sources.count-1 { net.sources.object(i).cell.index = i } pl() } } func sel_type() {local x, y, i, h return lig.grsel(g, iview, $1, $2, nrctypes, actypes) } func sel_tar() {local i i = nrcg.select($1,$2,tarcel2_.type,g,iview) if (i != -1) { // print tarname, " ", tarcel2_.type.synlist.object(i).stype.name, " ", i return net.cel2tar(tarcelindex_,i) } return -1 } func sel_cell() {local x, y, h, i x = g.view_info(iview, 13, $1) y = g.view_info(iview, 14, $2) h = g.view_info(iview, 15)/2 for i=0, net.sources.count - 1 { tobj = net.sources.object(i).cell if (abs(g.view_info(iview, 13, tobj.x) - x) < h) { if (abs(g.view_info(iview, 14, tobj.y) - y) < h) { return i }} } return -1 } /* func nearest_node() {local i, j, d, dmin dmin = 1e9 j = -1 for i=0, nodelist.count - 1 { tobj = nodelist.object(i) d = ($1-tobj.x)^2 + ($2-tobj.y)^2 if (d < dmin) { dmin = d j = i } } nearest_index = j dmin = sqrt(dmin) return dmin } */ proc original_type() {local i, n n = nrctypes.count for i=0, n-1 { if (strcmp(nrctypes.object(i).name, $s1) == 0) { mapold2new.append(i) return } } for i=0, actypes.count-1 { if (strcmp(actypes.object(i).name, $s1) == 0) { mapold2new.append(i+n) return } } mapold2new.append(-1) missing.append(new String($s1)) } proc newnode() {local i oldnodecnt += 1 i = mapold2new.x[$1] if (i > -1) { if (i < nrctypes.count) { tobj = nrctypes.object(i) }else{ tobj = actypes.object(i - nrctypes.count) } net.add_cell(new NetCell(tobj, $2,$3)) } } proc newedge() {local i, j if (oldnodecnt != net.sources.count) { return } i = $1 j = net.cel2tar($2,$3) net.add_edge(new NetEdge(net.sources.object(i), net.targets.object(j), $4,$5)) } proc notice() { if (oldnodecnt != net.sources.count) { sprint(tstr, "%d of %d cells restored. All connections lost. Missing types are:", net.sources.count, oldnodecnt) tobj = new VBox() tobj.intercept(1) missing.browser("","s") tobj.intercept(0) tobj.dialog(tstr) objref tobj } objref mapold2new, missing oldnodecnt = 0 } proc save() { b.save("load_file(\"netbild.hoc\")\n}") save_data(b, "ocbox_") b.save("{") } proc save_data() { local i, j, n sprint(tstr, "{%s = new NetGUI(1)}", $s2) $o1.save(tstr) sprint(tstr, "{object_push(%s)}", $s2) $o1.save(tstr) $o1.save("{mapold2new = new Vector() missing = new List()}") n = nrctypes.count for i=0, n-1 { nrctypes.object(i).index = i sprint(tstr, "original_type(\"%s\")", nrctypes.object(i).name) $o1.save(tstr) } for i=0, actypes.count-1 { actypes.object(i).index = i + n sprint(tstr, "original_type(\"%s\")", actypes.object(i).name) $o1.save(tstr) } for i=0, net.sources.count - 1 { tobj = net.sources.object(i).cell sprint(tstr, "newnode(%d, %g, %g)", tobj.type.index, tobj.x, tobj.y) $o1.save(tstr) } for i=0, net.edges.count - 1 { tobj = net.edges.object(i) if (tobj.target.cell.type.is_art) { sprint(tstr, "newedge(%d, %d, 0, %g, %g)", tobj.source.cell.index, \ tobj.target.cell.index, tobj.w, tobj.d) }else{ sprint(tstr, "newedge(%d, %d, %d, %g, %g)", tobj.source.cell.index, \ tobj.target.cell.index, tobj.target.syn.index, tobj.w, tobj.d) } $o1.save(tstr) } if (create_) { $o1.save("{create_ = 1 create1()}") } sprint(tstr, "{g.size(%g,%g,%g,%g)}",g.size(1), g.size(2), g.size(3), g.size(4)) $o1.save(tstr) sprint(tstr, "{set_alias(%d)}", use_alias_) $o1.save(tstr) $o1.save("{object_pop()}") } func hocfile() { if (fh == nil) { fh = new File() fh.chooser("w", "Save network in file", "*.hoc") } if (fh.chooser()) { fh.wopen() save_hoc_templates(fh) save_hoc_data(fh) fh.close() return 1 } return 0 } proc save_hoc_templates() {local i $o1.printf("// Artificial cells no longer need a default section.\n") $o1.printf("//Network cell templates\n") for i = 0, nrctypes.count-1 { nrctypes.object(i).classname(tstr) $o1.printf("// %s\n", tstr) } if (actypes.count > 0) { $o1.printf("//Artificial cells\n") } for i = 0, actypes.count-1 { actypes.object(i).classname(tstr) $o1.printf("// %s\n", tstr) } $o1.printf("\n") for i = 0, nrctypes.count-1 { nrctypes.object(i).save_class($o1) } if (actypes.count > 0) { } for i = 0, actypes.count-1 { actypes.object(i).save_class($o1) } } proc save_hoc_data() { local i, j, hasneo $o1.printf("\n//Network specification interface\n\n") $o1.printf("objref cells, nclist, netcon\n") $o1.printf("{cells = new List() nclist = new List()}\n\n") $o1.printf("func cell_append() {cells.append($o1) $o1.position($2,$3,$4)\n\treturn cells.count - 1\n}\n\n") $o1.printf("func nc_append() {//srcindex, tarcelindex, synindex\n") $o1.printf(" if ($3 >= 0) {\n") $o1.printf(" netcon = cells.object($1).connect2target(cells.object($2).synlist.object($3))\n") $o1.printf(" netcon.weight = $4 netcon.delay = $5\n") $o1.printf(" }else{\n") $o1.printf(" netcon = cells.object($1).connect2target(cells.object($2).pp)\n") $o1.printf(" netcon.weight = $4 netcon.delay = $5\n") $o1.printf(" }\n") $o1.printf(" nclist.append(netcon)\n return nclist.count - 1\n}\n\n") if (name_declared("NeoSim")) { hasneo = 1 }else{ hasneo = 0 } if (hasneo) { ncappend = "ns.new_connection" $o1.printf("//Network instantiation through the NeoSim Interface\n") $o1.printf("objref ns\n") $o1.printf("{ns = new NeoSim()}\n\n") }else{ ncappend = "nc_append" $o1.printf("//Network instantiation\n\n") } for i=0, net.sources.count-1 { tobj = net.sources.object(i).cell tobj.name(tstr) $o1.printf(" /* %s */", tstr) tobj.type.classname(tstr) if (hasneo) { $o1.printf(" ns.new_cell(\"%s\",\t%g,\t %g, 0)\n",\ tstr, tobj.x, tobj.y) }else{ $o1.printf(" cell_append(new %s(),\t%g,\t %g, 0)\n",\ tstr, tobj.x, tobj.y) } } for i=0, net.targets.count-1 { tobj = net.targets.object(i) if (tobj.cell.type.is_art == 0) { for j=0, tobj.edges.count - 1 { tobj.edges.object(j).source.cell.name(tstr) $o1.printf(" /* %s -> ", tstr) tobj.cell.name(tstr) $o1.printf("%s.%s%d */", tstr, tobj.syn.stype.name, tobj.syn.index) $o1.printf(" %s(%d, %d, %d, %g,%g)\n", ncappend,\ tobj.edges.object(j).source.cell.index, tobj.cell.index, tobj.syn.index, \ tobj.edges.object(j).w, tobj.edges.object(j).d) } }else{ for j=0, tobj.edges.count - 1 { tobj.edges.object(j).source.cell.name(tstr) $o1.printf(" /* %s -> ", tstr) tobj.cell.name(tstr) $o1.printf("%s */", tstr) $o1.printf(" %s(%d, %d, -1, %g,%g)\n", ncappend,\ tobj.edges.object(j).source.cell.index, tobj.cell.index, \ tobj.edges.object(j).w, tobj.edges.object(j).d) } } } } proc create1() {local i if (create_ == 0) { set_alias(0) if (created_) { if (boolean_dialog("\"Create\" cannot be turned back on without exiting NEURON", "Stay on", "Turn off")) { create_ = 1 }else{ net.abstract() // types can be augmented now actypes = new List("ArtCell") nrctypes = new List("NetReadyCell") // and a number of things are no longer valid cmap_ = nil tobj = new List("SpikePlot") for i=0, tobj.count-1 { tobj.object(i).update() tobj.object(i).flush() } tobj = nil } } return } if (created_) { continue_dialog("A NetGUI tool can only instantiate a network once. Save, exit, and reload.") create_ = 0 return } // types can't be augmented anymore tobj = actypes actypes = new List() for i=0, tobj.count-1 { actypes.append(tobj.object(i)) } tobj = nrctypes nrctypes = new List() for i=0, tobj.count-1 { nrctypes.append(tobj.object(i)) } fh = new File() fh.mktemp fh.wopen() save_hoc_templates(fh) fh.close() fh.getname(tstr) sprint(tstr, "xopen(\"%s\")", tstr) execute(tstr) fh.unlink created_ = 1 net.create1() fh = nil } endtemplate NetGUI neuron-7.5/share/lib/hoc/netbild/netready.hoc000077500000000000000000000310231323325274500212530ustar00rootroot00000000000000/* A class is network ready if it has the public list "synlist" and a connection procedure "obfunc connect2target() //$o1 target point process, returns NetCon The synlist contains POINT_PROCESSES which can be a target of a NetCon. The connect2target obfunc knows the presyn info to build the NetCon Classes constructed by the CellBuilder and written to a file are network ready. It may be possible in the future to create network ready cells directly from a CellBuilder instance and have all cells dynamically track user changes to cellbuilder instance parameters. The can of worms there mostly involves the question of matching the overall data dependency to the user desire. */ /* NetReady has enough data to be able to create network connectable cell instances from a network ready class. */ //SynType instances have a location begintemplate SynTypeInstance public stype, cbs, x, index public x0, y0, ax, ay// volatile name coords strdef secstr, tstr objref stype, cbs proc init() { index = -1 stype = $o1 cbs = $o2 x = $3 if (numarg() == 5) { ax=$4 ay=$5 }else{ ax=.5 ay=-1 } x0=0 y0=0 } proc instantiate() {// object is the cell instance cbs.name(secstr) stype.ms.name(tstr) sprint(tstr, "%s synlist.append(new %s(%g))", \ secstr, tstr, x) execute(tstr, $o1) stype.ms.out($o1.synlist.object($o1.synlist.count-1)) } endtemplate SynTypeInstance /* cell builder data + stype list allow a spec of a netready cell */ begintemplate NetReadyCell public name, cb, stype, synlist, consist, index, plcell public classname, save_class, is_art public create1, tobj, changems, changeloc objref cb, stype, synlist objref tobj, nil, this, all strdef name, tstr proc init() {local i created_ = 0 cb = $o1 // cell builder stype = $o2 synlist = new List() name = $o1.manage.classname index = -1 is_art = 0 } proc classname() { sprint($s1, "%s_%s", name, cb.manage.classname) } proc consist() {local i // remove all synlist that are no longer in stype or cell section for i = 0, synlist.count-1 { synlist.object(i).stype.index = -1 synlist.object(i).cbs.index = -1 } cb.topol.setindex() for i = 0, stype.count-1 { stype.object(i).index = i } for (i = synlist.count - 1; i >= 0; i -= 1) { if (synlist.object(i).stype.index == -1 || synlist.object(i).cbs.selected == -1) { synlist.remove(i) } } for i=0, synlist.count - 1 { synlist.object(i).index = i } cb.topol.sel_all(0) } proc save_class() {local i classname(tstr) $o1.printf("\nbegintemplate %s\n", tstr) $o1.printf("public is_art\n") cb.manage.save_classbody($o1) $o1.printf("objref syn_\nproc synapses() {\n") for i=0, synlist.count-1 { if ((i+1)%20 == 0) { $o1.printf(" synapses%d()\n}\nproc synapses%d() {\n",i,i) } synbody($o1, synlist.object(i)) } $o1.printf("}\n") $o1.printf("func is_art() { return 0 }\n") classname(tstr) $o1.printf("\nendtemplate %s\n", tstr) } proc synbody() {local i, j, size $o1.printf(" /* %s%d */ ", $o2.stype.name, $o2.index) $o2.cbs.name(tstr) $o1.printf(" %s ", tstr) tobj = $o2.stype.ms tobj.name(tstr) $o1.printf("syn_ = new %s(%g) synlist.append(syn_)\n", tstr, $o2.x) tobj = new MechanismStandard(tstr) for i=0,tobj.count-1 { size = tobj.name(tstr, i) for j=0, size-1 { if (tobj.get(tstr, j) != $o2.stype.ms.get(tstr, j)) { if (size == 1) { $o1.printf(" syn_.%s = %g\n", tstr, $o2.stype.ms.get(tstr, j)) }else{ $o1.printf(" syn_.%s[%d] = %g\n", tstr, j, $o2.stype.ms.get(tstr, j)) } } } } } proc create1() {local i created_ = 1 classname(tstr) sprint(tstr, "%s.tobj = new %s()", this, tstr) execute(tstr) for i=0, synlist.count-1 { synlist.object(i).stype.created_ = 1 synlist.object(i).stype.ms.out(tobj.synlist.object(i)) } $o1 = tobj tobj = nil } proc changems() {local i if (created_) { if (all == nil) { classname(tstr) all = new List(tstr) } for i=0, synlist.count -1 { if (synlist.object(i).stype == $o1) { for j=0, all.count-1 { $o1.ms.out(all.object(j).synlist.object(i)) } } } } } proc changeloc() {local i loc_changed_ = 1 if (created_) { if (all == nil) { classname(tstr) all = new List(tstr) } tobj = synlist.object($1) for i=0, all.count-1 { tobj.cbs.name(tstr) sprint(tstr, "%s.%s %s.loc(%g)", \ all.object(i), tstr, all.object(i).synlist.object($1), tobj.x) execute(tstr) } } } endtemplate NetReadyCell begintemplate NetReadyCellGlyph public pl, select objref tobj, nil strdef tstr proc pl() { //Graph, NetReadyCell $o2.cb.topol.draw($o1) for i=0, $o2.synlist.count-1 { tobj = $o2.synlist.object(i) $o1.mark(tobj.x0, tobj.y0, "O", 6, 3, 1) sprint(tstr, "%s%d", tobj.stype.name, tobj.index) $o1.label(tobj.x0,tobj.y0,tstr, 1, 1, tobj.ax, tobj.ay, 3) } tobj = nil } func select() {local x, y, x1, y1, i, h // x, y, NetReadyCell, Graph, View x1 = $o4.view_info($5,13,$1) y1 = $o4.view_info($5,14,$2) h = $o4.view_info($5, 15) + 1 for i=0, $o3.synlist.count - 1 { tobj = $o3.synlist.object(i) x = $o4.view_info($5,13,tobj.x0) y = $o4.view_info($5,14,tobj.y0) x = (x1 - x)/h + .5 y = (y1 - y)/h + .5 // now x and y are distance in chars from pointer to mark //print tobj, abs(x - tobj.ax) < .25, abs(y - tobj.ay)<.25 if (abs(x - tobj.ax) < .5 && abs(y - tobj.ay)<.5) { return i } } return -1 } endtemplate NetReadyCellGlyph begintemplate NetReadyCellGUI public nrc, pl, save_data, map, name, stgui, tobj external graph_menu_remove_most, CellBuild, SynTypeGUI, valid_name_syntax objref nrc, b, this, g, tobj, tobj1, st, nil, sec, sti, stgui, lig strdef tstr, selstr, name proc init() { zero=0 name = "............." if (numarg() == 2) { stgui = $o2 nrc = new NetReadyCell($o1, $o2.stypelist) } if (numarg() == 0) { if (dialog() == 0) { return } } lig = new ListInGraph() build() if (numarg() != 1) { map() } } func dialog() { //use whatever objref names at hand sti = new List("SynTypeGUI") sec = new List("CellBuild") tobj = new HBox() tobj.intercept(1) sti.browser("Synapse type sets") sec.browser("CellBuild types") sti.select(-1) sec.select(-1) tobj.intercept(0) if (!tobj.dialog("Select Synapse type set and CellBuild type",\ "Use Selection (or create new)", "Cancel")) { return 0 // sti.select(-1) // sec.select(-1) } if (sti.selected == -1) { stgui = new SynTypeGUI() }else{ stgui = sti.object(sti.selected) } if (sec.selected == -1) { st = new CellBuild() }else{ st = sec.object(sec.selected) } nrc = new NetReadyCell(st, stgui.stypelist) objref tobj, sti, sec, st return 1 } proc map() { nrc.cb.topol.sel_all(0) sprint(tstr, "%s", this) if (numarg() > 1) { b.map(tstr, $2,$3,$4,$5) }else{ b.map(tstr) } nrc.consist() name = nrc.name pl() } proc build() { b = new VBox(3) b.priority(997) b.save("save()") b.intercept(1) g = new Graph(0) graph_menu_remove_most(g) g.size(-200,200,-150,150) g.yaxis(3) xpanel("",1) xmenu("Info") xbutton("Synapse Types", "stgui.map()") xbutton("CellBuilder", "nrc.cb.map()") xmenu() xcheckbox("Refresh ", &zero, "zero=0 pl()") xcheckbox("Cell Name: ", &zero, "zero=0 setname()") xvarlabel(name) g.menu_tool("Locate ", "locate") // xcheckbox("Synapse Types ", &zero, "zero=0 stgui.map()") xpanel() g.view(2) g.exec_menu("Locate") b.ref(this) b.intercept(0) } proc setname() { doNotify() tstr = name while (string_dialog("Change Net Ready Cell Name", tstr)) { if (valid_name_syntax(tstr, 1)) { name = tstr break } } nrc.name = name } proc pl() {local i nrc.cb.topol.draw(g) tobj = nrc.stype lig.pl(g, 3, tobj) tobj = nrc.synlist for i=0, tobj.count-1 { pl_syn(tobj.object(i)) } } proc pl_syn() {local x, y, a a = $o1.x x = (a)*$o1.cbs.x1 + (1-a)*$o1.cbs.x0 y = (a)*$o1.cbs.y1 + (1-a)*$o1.cbs.y0 g.mark(x, y, "O", 6, 3, 1) sprint(tstr, "%s%d", $o1.stype.name, $o1.index) g.label(x,y,tstr, 1, 1, $o1.ax, $o1.ay, 3) $o1.x0 = x $o1.y0 = y } proc locate() { if ($1 == 2) { iview = g.view_info() replace = -1 nrc.consist() if (sel_stype($2, $3) == 0) { sel_synlist($2,$3) } pl() if (st != nil) { pl_st($2, $3) }else{ g.label(.5, .9, "Nothing selected", 2, 1, .5, .5, 1) } }else if ($1 == 1) { pl() if (st != nil) { pl_st($2,$3) }else{ g.label(.5, .9, "Nothing selected", 2, 1, .5, .5, 1) } }else if ($1 == 3) { if (st != nil) { if (attached) { if (replace != -1) { nrc.synlist.object(replace).stype = st }else if (sti != nil) { nrc.synlist.insrt(sti_index, sti) sti.cbs = sec sti.x = a align($2, $3, sti) nrc.changeloc(sti_index) }else{ sti = new SynTypeInstance(st, sec, a) nrc.synlist.append(sti) align($2, $3, sti) } } sti = nil nrc.consist() } st = nil pl() } } proc align() {local x, y, h, a a = $o3.x sec = $o3.cbs x = (a)*sec.x1 + (1-a)*sec.x0 y = (a)*sec.y1 + (1-a)*sec.y0 objref sec h = g.view_info(iview, 15) + 1 x = (g.view_info(iview, 13, $1) - g.view_info(iview,13,x))/h + .5 y = (g.view_info(iview, 14, $2) - g.view_info(iview,14,y))/h +.5 // now x and y are distance in chars from pointer to mark $o3.ax = .5 $o3.ay = int(y) } func sel_stype() {local x, y, i, h i = lig.grsel(g, iview, $1, $2, nrc.stype) if (i != -1) { st = nrc.stype.object(i) return 1 } return 0 } /* func sel_synlist() {local i, j, dmin, d dmin = 1e9 for i=0, nrc.synlist.count - 1 { tobj = nrc.synlist.object(i) d = ($1-tobj.x0)^2 + ($2-tobj.y0)^2 if (d < dmin) { dmin = d j = i } } if (dmin < 10) { sti_index = j sti = nrc.synlist.object(j) st = sti.stype nrc.synlist.remove(j) return 1 } return 0 } */ func sel_synlist() {local x, y, x1, y1, i, h x1 = g.view_info(iview,13,$1) y1 = g.view_info(iview,14,$2) h = g.view_info(iview, 15) + 1 for i=0, nrc.synlist.count - 1 { tobj1 = nrc.synlist.object(i) x = g.view_info(iview,13,tobj1.x0) y = g.view_info(iview,14,tobj1.y0) x = (x1 - x)/h + .5 y = (y1 - y)/h + .5 // now x and y are distance in chars from pointer to mark //print tobj, abs(x - tobj1.ax) < .25, abs(y - tobj1.ay)<.25 if (abs(x - tobj1.ax) < .5 && abs(y - tobj1.ay)<.5) { sti_index = i sti = tobj1 st = sti.stype nrc.synlist.remove(i) return 1 } } return 0 } proc pl_st() {local d, size, x, y, i, h // how close is the nearest CellBuildSection d = nrc.cb.topol.nearest_sec($1,$2,sec) //a.b = |a||b|cos a = ($1-sec.x0)*(sec.x1-sec.x0) + ($2-sec.y0)*(sec.y1 - sec.y0) a /= (sec.x1 - sec.x0)^2 + (sec.y1 - sec.y0)^2 if (a < 0) a = 0 if (a > 1) a = 1 if (d/g.view_info(iview, 9) > 50) { // greater than 50 pixels away sprint(selstr, "Synapse %s (Unattached)", st.name) attached = 0 }else{ a += .05 a -= a%.1 x = (a)*sec.x1 + (1-a)*sec.x0 y = (a)*sec.y1 + (1-a)*sec.y0 g.mark(x, y, "O", 8, 2, 1) attached = 1 sec.name(tstr) replace = -1 h = g.view_info(iview, 15) + 1 x = (g.view_info(iview, 13, $1) - g.view_info(iview,13,x))/h + .5 y = (g.view_info(iview, 14, $2) - g.view_info(iview,14,y))/h +.5 // now x and y are distance in chars from pointer to mark if (sti == nil) for i=0, nrc.synlist.count-1 { tobj1 = nrc.synlist.object(i) if (tobj1.cbs == sec) { if (tobj1.x == a) { //check overlap with name (one char only so far) //print tobj, abs(x - tobj1.ax) < .25, abs(y - tobj1.ay)<.25 if (abs(x - tobj1.ax) < .5 && abs(y - tobj1.ay)<.5) { sprint(selstr, "%s replaces %s%d at %s(%g)", st.name, tobj1.stype.name, i, tstr, a) replace = i break } } } } tobj1 = nil if (replace == -1) { sprint(selstr, "Synapse %s at %s(%g)", st.name, tstr, a) } } g.label(.5, .9, selstr, 2, 1, .5, .5, 1) g.label($1,$2,st.name, 1, 1, .5, 0, 2) } proc save() { b.save("load_file(\"netbild.hoc\")\n}") save_data(b, "ocbox_") b.save("{") } proc save_data() {local i sprint(tstr, "{%s = new NetReadyCellGUI(1)}", $s2) $o1.save(tstr) // cell builder must be saved at top level because of save_window sprint(tstr, "%s.tobj", $s2) nrc.cb.save_data($o1, tstr) sprint(tstr, "{object_push(%s)}", $s2) $o1.save(tstr) stgui.save_data($o1, "stgui") $o1.save("nrc = new NetReadyCell(tobj, stgui.stypelist)") sprint(tstr, "nrc.name = \"%s\"", name) $o1.save(tstr) nrc.consist() for i=0, nrc.synlist.count-1 { tobj = nrc.synlist.object(i) sprint(tstr, "tobj = nrc.cb.topol.slist.object(%d)", tobj.cbs.index) $o1.save(tstr) sprint(tstr, "{nrc.synlist.append(new SynTypeInstance(nrc.stype.object[%d],tobj,%g,%g,%g))}", \ tobj.stype.index, tobj.x, tobj.ax, tobj.ay) $o1.save(tstr) } sprint(tstr, "{g.size(%g,%g,%g,%g)}",g.size(1), g.size(2), g.size(3), g.size(4)) $o1.save(tstr) $o1.save("{object_pop()}") nrc.cb.topol.sel_all(0) } endtemplate NetReadyCellGUI neuron-7.5/share/lib/hoc/netbild/spkplot.hoc000066400000000000000000000270011323325274500211320ustar00rootroot00000000000000// originally created by Michael Hines // Modified June 9, 2006 Added spikeplot styles, subset selection // and new plot styles. Ronald A.J. van Elburg // April, 2009 Made x-axis scaling consistent over different // Marked @PR2 individual ISI distributions. R.A.J. van Elburg begintemplate SpikePlot public net, vecs, g, update public map, save_data, save, b public flush, begin, plot, size, view_count, fastflush, simgraph external addplot, tstop objref net, vecs[1], nc, g, this, y, ps, tobj, b, outlist, nil strdef tstr, modestr proc init() { outlist = new List() fwindow = 100 binwidth = 10 high=1000 modestr = "Spikes " mode=1 spikeplotstyle=0 marksize=4 markcolor=1 useline=1 y = new Vector(1000) net = $o1 subset_start=-1 subset_end=-1 lsubset_start=0 lsubset_end=0 if (numarg() == 1) { build() map() } } proc map() { sprint(tstr, "%s for %s staf/elburg", this, net) if (numarg() > 1) { b.map(tstr, $2,$3,$4,$5) }else{ b.map(tstr) } update() flush() } proc unmap() { b.unmap() g = nil } proc build() { b = new VBox(3) b.priority(600) b.save("save()") b.ref(this) b.dismiss_action("unmap()") b.intercept(1) xpanel("") xmenu("Plot") xbutton("Update", "update() flush()") xmenu("Plot Style") xradiobutton("Spikes", "pmode(1)", mode==1) xradiobutton("Frequency (Gaussian Window)", "pmode(2)", mode==2) xradiobutton("Frequency (Binned)", "pmode(10)", mode==10) xradiobutton("ISI Histogram (Gaussian Window)", "pmode(3)", mode==3) xradiobutton("ISI Histogram (Binned)", "pmode(4)", mode==4) xradiobutton("Cumulative Frequency (Gaussian Window)", "pmode(5)", mode==5) xradiobutton("Cumulative Frequency (Binned)", "pmode(6)", mode==6) xradiobutton("Cumulative ISI Histogram (Gaussian Window)", "pmode(7)", mode==7) xradiobutton("Cumulative ISI Histogram (Binned)", "pmode(8)", mode==8) xradiobutton("Powerspectrum (Gaussian Window)", "pmode(9)", mode==9) xmenu() xmenu("Spike Plot Style") xradiobutton("Pipe", "pspikeplotstyle(0)", spikeplotstyle==0) xradiobutton("Filled Circle", "pspikeplotstyle(1)", spikeplotstyle==1) xradiobutton("Filled Triangle", "pspikeplotstyle(2)", spikeplotstyle==2) xradiobutton("Filled Square", "pspikeplotstyle(3)", spikeplotstyle==3) xradiobutton("Open Circle", "pspikeplotstyle(4)", spikeplotstyle==4) xradiobutton("Open Triangle", "pspikeplotstyle(5)", spikeplotstyle==5) xradiobutton("Open Square", "pspikeplotstyle(6)", spikeplotstyle==6) xbutton("Pick Size and Color","EditMark()") xstatebutton("Use Line",&useline ,"flush()") xmenu() xbutton("Select Subset","selectSubset()") xmenu() xvarlabel(modestr) xpvalue("Gaussian Window Size (ms)", &fwindow, 1, "flush()") xpvalue("Bin Size (ms)", &binwidth, 1, "flush()") xpvalue("Maximum ISI Size (ms)", &high, 1, "flush()") xpanel() g = new Graph() b.intercept(0) addplot(this, 1) begin() pmode(mode) } proc pmode() { mode = $1 if (mode == 1) { modestr = "Spikes " }else if (mode == 2) { modestr = "Frequency (Hz, Gaussian Window)" }else if (mode == 3) { modestr = "ISI Histogram (Gaussian Window)" }else if (mode == 4) { modestr = "ISI Histogram (Binned)" }else if (mode == 5) { modestr = "Cumulative Frequency (Hz, Gaussian Window)" }else if (mode == 6) { modestr = "Cumulative Frequency (Hz, Binned)" }if (mode == 7) { modestr = "Cumulative ISI Histogram (Gaussian Window)" }else if (mode == 8) { modestr = "Cumulative ISI Histogram (Binned)" }else if (mode == 9) { modestr = "Powerspectrum (Gaussian Window)" }else if (mode == 10) { modestr = "Frequency (Hz, Binned)" } flush() } proc pspikeplotstyle(){ spikeplotstyle=$1 flush() } proc EditMark(){ xpanel("Edit Mark Size and Color") xpvalue("Mark size", &marksize , 0, "flush()") xpvalue("Mark color", &markcolor , 0, "flush()") xpanel() } proc selectSubset(){ lsubset_start=subset_start lsubset_end=subset_end xpanel("Select Subset") xpvalue("Subset Start", &lsubset_start , 0, "setSubset()") xpvalue("Subset End", &lsubset_end , 0, "setSubset()") xpanel() } proc setSubset(){ //print "setSubset start: ", lsubset_start, " end: ", lsubset_end , " n: ", n if(0 <= lsubset_start && lsubset_start <= lsubset_end && lsubset_end <= n){ subset_start=lsubset_start subset_end=lsubset_end flush() } lsubset_start=subset_start lsubset_end=subset_end } proc update() {local i localobj vec //print "Update start: ", lsubset_start, " end: ", lsubset_end , " n: ", n if (net.created_) { n = net.sources.count }else{ n = 0 } if(n= 0; i -= 1) { if (outlist.object(i).valid == 0) { outlist.remove(i) } } for i=0, n-1 { vecs[i] = new Vector(0) tobj = net.sources.object(i).cell nc = tobj.real.connect2target(nil) tobj.name(tstr) if (tobj.type.is_art == 0) { if (nc.precelllist.count < 2) { outlist.append(nc) } } vec=nc.get_recordvec() if(vec==nil){ nc.record(vecs[i]) }else{ vecs[i]=vec } vecs[i].label(tstr) } objref nc, tobj } proc simgraph() {} proc begin() {} func view_count() { if (g == nil) { return 0 } return g.view_count() } proc plot() {} func size() { if (numarg() == 4) { g.size($1,$2,0,subset_end+1-subset_start) return 1. }else{ return g.size($1) } } proc fastflush() {} proc flush() {local i g.erase_all g.vfixed(1) g.label(.9,1) if (mode == 1) { //"Spikes " for (i=subset_end-1; i >= subset_start; i -= 1) { y.resize(vecs[i].size).fill(i+1-subset_start) y.label(vecs[i].label) if (spikeplotstyle==0){ y.mark(g, vecs[i], "|", marksize, markcolor, 1) // Pipe" }else if (spikeplotstyle==1){ y.mark(g, vecs[i], "O", marksize, markcolor, 1) // "Filled Circle" }else if (spikeplotstyle==2){ y.mark(g, vecs[i], "T", marksize, markcolor, 1) // "Filled Triangle" }else if (spikeplotstyle==3){ y.mark(g, vecs[i], "S", marksize, markcolor, 1) // "Filled Square" }else if (spikeplotstyle==4){ y.mark(g, vecs[i], "o", marksize, markcolor, 1) // "Open Circle" }else if (spikeplotstyle==5){ y.mark(g, vecs[i], "t", marksize, markcolor, 1) // "Open Triangle" }else if (spikeplotstyle==6){ y.mark(g, vecs[i], "s", marksize, markcolor, 1) // "Open Square" } if(1==useline){ y.line(g, vecs[i], markcolor, 0) } } size(0,tstop,0,0) }else if (mode == 2) { //"Frequency (Gaussian Window)" for (i=subset_end-1; i >= subset_start; i -= 1) { //print "sumgauss" y = vecs[i].sumgauss(0, tstop, binwidth, fwindow*fwindow) //print "label" y.label(vecs[i].label) //print "line" y.mul(1000).line(g, y.c.indgen(0, binwidth), 1,1) //print "resize" g.exec_menu("View = plot") } }else if (mode == 10) { //"Frequency (Binned)" for (i=subset_end-1; i >= subset_start; i -= 1) { y = vecs[i].histogram(0, tstop, binwidth) y.label(vecs[i].label) y.mul(1000/binwidth).line(g, y.c.indgen(0, binwidth), 1,1) g.exec_menu("View = plot") } }else if (mode == 3) {//"ISI Histogram (Gaussian Window)" for (i=subset_end-1; i >= subset_start; i -= 1) if (vecs[i].size > 1){ y = vecs[i].c.deriv(1,1) //print "sumgauss" y = y.sumgauss(0, high, binwidth, fwindow*fwindow) //print "label" y.label(vecs[i].label) //print "line" y.line(g, y.c.indgen(0, binwidth), 1,1) //print "resize" g.exec_menu("View = plot") } }else if (mode == 4) {//"ISI Histogram (Binned)" for (i=subset_end-1; i >= subset_start; i -= 1) if (vecs[i].size > 1){ y = vecs[i].c.deriv(1,1) y = y.histogram(0, high, binwidth) y=y.c(1) y.label(vecs[i].label) y.line(g, y.c.indgen(0, binwidth), 1,1) g.exec_menu("View = plot") } }else if (mode == 5) {//"Cumulative Frequency (Gaussian Window)" y = new Vector () for (i=subset_end-1; i >= subset_start; i -= 1) { y = y.append(vecs[i]) } y = y.sumgauss(0, tstop, binwidth, fwindow*fwindow) y.label(modestr) y.mul(1000).line(g, y.c.indgen(0, binwidth), 1,1) g.exec_menu("View = plot") }else if (mode == 6) {//"Cumulative Frequency (Binned)" y = new Vector () for (i=subset_end-1; i >= subset_start; i -= 1) { y = y.append(vecs[i]) } y = y.histogram(0, tstop, binwidth) y=y.c(1) y.label(modestr) y.line(g, y.c.indgen(0, binwidth), 1,1) g.exec_menu("View = plot") }else if (mode == 7) {//"Cumulative ISI Histogram (Gaussian Window)" y = new Vector () for (i=subset_end-1; i >= subset_start; i -= 1) { y = y.append(vecs[i]) } if (y.size > 1){ y = y.c.deriv(1,1) y = y.sumgauss(0, high, binwidth, fwindow*fwindow) y.label(modestr) y.line(g, y.c.indgen(0, binwidth), 1,1) g.exec_menu("View = plot") } }else if (mode == 8) {//"Cumulative ISI Histogram (Binned)" y = new Vector () for (i=subset_end-1; i >= subset_start; i -= 1) { y = y.append(vecs[i]) } if (y.size > 1){ y = y.c.deriv(1,1) y = y.histogram(0, high, binwidth) y=y.c(1) y.label(modestr) y.line(g, y.c.indgen(0, binwidth), 1,1) g.exec_menu("View = plot") } }else if (mode == 9) {//"Powerspectrum" y = new Vector () ps =new Vector() for (i=subset_end-1; i >= subset_start; i -= 1) { y = y.append(vecs[i]) } if (y.size > 0){ y = y.sumgauss(0, tstop,binwidth, fwindow) ps.spctrm(y) // spectrum ps.label(modestr) if (spikeplotstyle==0){ ps.mark(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "|", marksize, markcolor, 1) // Pipe" }else if (spikeplotstyle==1){ ps.mark(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "O", marksize, markcolor, 1) // "Filled Circle" }else if (spikeplotstyle==2){ ps.mark(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "T", marksize, markcolor, 1) // "Filled Triangle" }else if (spikeplotstyle==3){ ps.mark(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "S", marksize, markcolor, 1) // "Filled Square" }else if (spikeplotstyle==4){ ps.mark(g,ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "o", marksize, markcolor, 1) // "Open Circle" }else if (spikeplotstyle==5){ ps.mark(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "t", marksize, markcolor, 1) // "Open Triangle" }else if (spikeplotstyle==6){ ps.mark(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), "s", marksize, markcolor, 1) // "Open Square" } if(1==useline){ ps.line(g, ps.c.indgen(0, 1000/(2*binwidth),1000/(2*binwidth*ps.size())), markcolor, 1) } g.exec_menu("View = plot") } } g.flush() } proc save() { b.save("load_file(\"netbild.hoc\")\n}") save_data(b, "ocbox_") b.save("{") } proc save_data() { sprint(tstr, "{%s = new SpikePlot(%s,1)}", $s2, net) $o1.save(tstr) sprint(tstr, "{object_push(%s)}", $s2) $o1.save(tstr) sprint(tstr, "mode = %g", mode) $o1.save(tstr) sprint(tstr, "spikeplotstyle= %g", spikeplotstyle) $o1.save(tstr) sprint(tstr, "marksize= %g", marksize ) $o1.save(tstr) sprint(tstr, "markcolor= %g", markcolor) $o1.save(tstr) sprint(tstr, "useline= %g", useline) $o1.save(tstr) sprint(tstr, "fwindow = %g", fwindow) $o1.save(tstr) sprint(tstr, "binwidth = %g", binwidth) $o1.save(tstr) $o1.save("build()") sprint(tstr, "subset_start=%g",subset_start) $o1.save(tstr) sprint(tstr, "subset_end = %g",subset_end) $o1.save(tstr) sprint(tstr, "{g.size(%g,%g,%g,%g)}", \ g.size(1), g.size(2), g.size(3), g.size(4)) $o1.save(tstr) $o1.save("{object_pop()}") } endtemplate SpikePlot neuron-7.5/share/lib/hoc/netbild/syntypes.hoc000077500000000000000000000076731323325274500213540ustar00rootroot00000000000000// A NetCon target type with specific parameters // presumably many instances of this will be located at different positions begintemplate SynType public name, ms, index, change, created_ strdef name objref ms, all, this, nil proc init() { created_ = 0 index = -1 // index used only for session saves so that syntype info can be // remapped to proper this object when index into stypelist is known $o1.name(name) ms = new MechanismStandard(name) if (numarg() == 2) { name = $s2 }else{ ms.name(name) } ms.in($o1) } proc change() {local i if (created_) { if (all == nil) { all = new List("NetReadyCell") } for i=0, all.count-1 { all.object(i).changems(this) } } } endtemplate SynType // A list of SynTypes begintemplate SynTypeGUI public name, save, save_data, map, stypelist, hb external SynType, valid_name_syntax strdef name, tstr, tstr1 objref this, tobj, tobj1, mslist, stypelist, vb, hb, d proc init() {local i stypelist = new List() possible_targets() // mslist is a list of MechanismStandards build() if (numarg() == 0) { map() } } proc map() { sprint(tstr, "%s", this) if (numarg() > 1) { hb.map(tstr, $2,$3,$4,$5) }else{ hb.map(tstr) } } proc possible_targets() { mslist = new List() //figure out which PointProcesses can be targets of a NetCon tobj = new MechanismType(1) // all point processes for i=0, tobj.count-1 { if (tobj.is_netcon_target(i) && tobj.has_net_event(i) == 0) { tobj.select(i) tobj.selected(tstr) mslist.append(new MechanismStandard(tstr)) } } } proc build() { hb = new HBox(3) hb.priority(998) hb.save("save()") hb.intercept(1) hb.ref(this) vb = new VBox(3) vb.intercept(1) xpanel("") xmenu("New") for i=0, mslist.count-1 { mslist.object(i).name(tstr) sprint(tstr1, "newstype(%d)", i) xbutton(tstr, tstr1) } xmenu() xlabel("Using Current Selection...") xbutton("Rename", "rename()") xbutton("Clone", "clone()") xbutton("Remove", "remove()") xlabel("Synapse types") xpanel() stypelist.browser("", "name") stypelist.select_action("selstype(hoc_ac_)") vb.intercept(0) vb.map() d = new Deck(3) d.intercept(1) xpanel("") xlabel("Variables for selected Synapse type appear here") xpanel() d.intercept(0) d.map() d.flip_to(0) hb.intercept(0) } proc append() {local i stypelist.append(new SynType($o1, $s2)) dinsert(stypelist.count-1) selstype(stypelist.count-1) } proc newstype() {local i stypelist.append(new SynType(mslist.object($1))) dinsert(stypelist.count-1) selstype(stypelist.count-1) } proc dinsert() { d.intercept(1) tobj = stypelist.object($1) sprint(tstr, "%s.change()", tobj) tobj.ms.action(tstr) tobj.ms.name(tstr) sprint(tstr, "%s -- %s", tobj.name, tstr) tobj.ms.panel(tstr) d.intercept(0) d.move_last($1) } proc rename() { local i i = stypelist.selected if (i == -1) return tobj = stypelist.object(i) tstr = tobj.name while (string_dialog("Rename the synapse type", tstr)) { if (valid_name_syntax(tstr, 1)) { tobj.name = tstr break } } stypelist.remove(i) stypelist.insrt(i, tobj) d.remove(i) dinsert(i) selstype(i) } proc clone() {local i i = stypelist.selected if (i == -1) return tobj = stypelist.object(i) stypelist.append(new SynType(tobj.ms, tobj.name)) dinsert(stypelist.count-1) selstype(stypelist.count-1) } proc remove() {local i i = stypelist.selected if (i == -1) return stypelist.remove(i) d.remove(i) selstype(-1) } proc selstype() { if ($1 == -1) { d.flip_to(-1) return } d.flip_to($1) stypelist.select($1) } proc save() { hb.save("load_file(\"netbild.hoc\")\n}") save_data(hb, "ocbox_") hb.save("{") } proc save_data() { sprint(tstr, "%s = new SynTypeGUI(1)", $s2) $o1.save(tstr) sprint(tstr, "{object_push(%s)}", $s2) $o1.save(tstr) for i = 0, stypelist.count -1 { tobj = stypelist.object(i) tobj.index = i $o1.save("{") tobj.ms.save("tobj") $o1.save("}") sprint(tstr, "{append(tobj, \"%s\")}", tobj.name) $o1.save(tstr) } $o1.save("{object_pop()}") } endtemplate SynTypeGUI neuron-7.5/share/lib/hoc/netparmpi.hoc000066400000000000000000000261041323325274500200170ustar00rootroot00000000000000{load_file("stdlib.hoc")} begintemplate ParallelNetManager public register_cell, nc_append public splitcell public set_gid2node, gid_exists, create_cell, pc, maxstepsize public spikevec, idvec, gatherspikes, want_all_spikes, spike_record public graphout, wantgraph, set_maxstep, serialize public prun, pcontinue, pinit, psolve, ncell public round_robin //simplistic partitioning public tmpcell // mostly for debugging public cells, nclist, myid, nwork, nhost, prstat external stdinit, continuerun, cvode, tstop, hoc_sf_ external cvode_active, cvode_local objref cells, nclist, tmpcell, nil, pc objref spikevec, idvec objref this objref wmat_ strdef tstr proc init() { pc = new ParallelContext() nhost = pc.nhost if (nhost < 2) { // for no PVM or MPI and for 1 host nhost = 1 myid = 0 }else{ myid = pc.id } nwork = nhost ncell = $1 cells = new List() // the worker cells nclist = new List() // the netcons connecting to cells in this subset maxstepsize_called_ = 0 want_graph_ = 0 edgecount_ = 0 spikevec = new Vector(1000) spikevec.resize(0) idvec = new Vector(1000) idvec.resize(0) } // originally // the gid <-> cell map was constructed in two phases. // first we specify which gids will exist on this machine. // Then, when create_cell is called we can decide if the cell // will actually be created and, if so, pc.presyn actually // creates the PreSyn, sets the gid, and makes the gid2PreSyn map. // that is deprecated. // Now it is best merely to call // register_cell(gid, cellobject) and that will both call gid_exists (if it // does not already exist), and make the mapping. proc set_gid2node() { // allows the myid to be different from the pc.id if ($2 == myid) { pc.set_gid2node($1, pc.id) } } proc round_robin() { local i // simplistic partitioning for i=0, ncell - 1 { set_gid2node(i, i%nwork) } } func gid_exists() { return pc.gid_exists($1) } proc want_all_spikes() {local i for i=0, ncell-1 { spike_record(i) } } proc spike_record() { if (gid_exists($1)) { pc.spike_record($1, spikevec, idvec) } } // arg is gid and string that creates a cell such as "new Cell(x, y, z)" // return the cell object (usually nil) // this is deprecated obfunc create_cell() { localobj cell if (gid_exists($1)) { sprint(tstr, "%s.tmpcell = %s", this, $s2) execute(tstr) register_cell($1, tmpcell) } cell = tmpcell tmpcell = nil return cell } proc register_cell() { localobj nc if (!pc.gid_exists($1)) { pc.set_gid2node($1, pc.id) } // all existing cells must have an associated gid which // is stored in the cell's PreSyn. The nc below will be // unreffed but the PreSyn will continue // in existence and from the gid we will quickly be able // to find the PreSyn and from that the Cell // we force the cell to be an outputcell due to the danger of // user error cells.append($o2) if (hoc_sf_.is_artificial($o2)) { nc = new NetCon($o2, nil) }else{ $o2.connect2target(nil, nc) } pc.cell($1, nc, 1) } func nc_append() {local i, se, lsrc, ltar, w, ww localobj nc i = -1 if (gid_exists($2)) { // target in this subset // source may be on this or another machine nc = cm2t($1, pc.gid2cell($2), $3, $4, $5) i = nclist.count nclist.append(nc) } else if ((se = gid_exists($1)) > 0) { // source exists but not the target if (se != 3){ // output to another machine and it is // not yet an outputcell pc.outputcell($1) } } if (want_graph_) { if (wmat_ == nil) { wmat_ = new Matrix(cells.count, cells.count, 2) } if ($1 != $2) { w = wmat_.x[$1][$2] if (w == 0) { edgecount_ += 1 } ww = 100/$5 if (w < ww) { wmat_.x[$1][$2] = ww wmat_.x[$2][$1] = ww } } } return i } obfunc cm2t() { localobj nc if ($3 < 0) { nc = pc.gid_connect($1, $o2) }else{ nc = pc.gid_connect($1, $o2.synlist.object($3)) } nc.weight = $4 nc.delay = $5 return nc } proc set_maxstep() { // arg is max allowed, return val is just for this subnet localmaxstep_ = pc.set_maxstep(10) // arg is the maximum allowed // printf("%d localmaxstep=%g\n", myid, localmaxstep_) } proc maxstepsize() {local i, m if (!maxstepsize_called_) { maxstepsize_called_ = 1 if (nwork > 1) { pc.context(this, "set_maxstep") } set_maxstep() } } // a safe way to get output sequentially on a per host basis // without using the bulletin board. A file should be opened // with File.aopen for appending at the beginning of the iterator_statement // and closed at the end. iterator serialize() {local rank pc.barrier for rank = 0, pc.nhost { if (rank == pc.id) { iterator_statement } pc.barrier } } proc doinit() { stdinit() } proc pinit() { maxstepsize() if (nwork > 1) { pc.context(this, "doinit") } doinit() // the master does one also } proc psolve() { pc.psolve($1) } proc pcontinue() { if (nwork > 1) { pc.context(this, "psolve", $1) } psolve($1) } proc prun() { pinit() pcontinue(tstop) } proc postwait() {local w, sm, s, r, ru if ($1 == 0) { pc.post("waittime", myid, pc.wait_time()) }else{ w = pc.wait_time() sm = pc.spike_statistics(&s, &r, &ru) pc.post("poststat", myid, w, sm, s, r, ru) } } proc prstat() { local i, id, w, sm, s, r, ru // print the wait time and statis if (nwork > 1) { pc.context(this, "postwait", $1) } postwait($1) if ($1 == 0) { for i = 0, nwork - 1 { pc.take("waittime", &id, &w) printf("%d wait time %g\n", id, w) } }else{ printf("id\t nsmax\t nsend\t nrecv\t nrused\t wait\n") for i = 0, nwork - 1 { pc.take("poststat", &id, &w, &sm, &s, &r, &ru) printf("%d\t %d\t %d\t %d\t %d\t %g\n", id, sm,s,r,ru,w) } printf("end of prstat\n") } } proc postspikes() { pc.post("postspike", spikevec, idvec) } proc gatherspikes() {local i localobj s, id if (nwork > 1) { s = new Vector() id = new Vector() pc.context(this, "postspikes") for i=0, nwork-2 { pc.take("postspike", s, id) spikevec.append(s) idvec.append(id) } } } proc wantgraph() { want_graph_ = 1 } // metis graph partitioning input file has nnode+1 line format // nnode nedge 11 // nodes range from 1-nnode and there are nnode lines of form // computationcost adjacentnode adjacentnodeweight adjacentnode w ... // where computationcost must be an integer > 0 and we use adjacentnodeweight // of 1000/mindelay. // Although the graph is undirected I do not know if weights must be // symetric but we force that. I do not know if // node weight and edge weight is independent and unrelated to partitioning. proc graphout() {local i, j, jx, x localobj f, cw if (!want_graph_) { printf("%s.wantgraph() was not called before building\n", this) return } f = new File($s1) f.wopen() f.printf("%d %d 11\n", cells.count, edgecount_) cellweight(cw) for i=0, cells.count-1 { f.printf("%d", cw.x[i]) for jx=0, wmat_.sprowlen(i)-1 { x = wmat_.spgetrowval(i, jx, &j) f.printf(" %d %d", j+1, x) } f.printf("\n") } f.close() } proc cellweight() {local i, act, loc $o1 = new Vector(cells.count) act = cvode_active() loc = cvode_local() if (!loc) { cvode_local(1) } stdinit() cvode.solve(.01) for i=0, cells.count-1 { $o1.x[i] = cells.object(i).cellweight(cvode) } $o1.mul(100000) $o1.printf if (!act) { cvode_active(0) }else if (!loc) { cvode_active(1) } } // The cell is split at the currently accessed section and its parent into two // subtrees rooted at the old connection end of the cas and the old cas connection // point of the parent (latter must be 0 or 1). The cas subtree // will be preserved on the host id specified by $1 and the other subtree will be // is preserved on the host id specified by $2. $2 must be $1+1 or $1-1. // If $1 or $2 are not this host // then the appropriate subtree is destroyed. (The whole cell is // destroyed if neither subtree is on this host but that is a pointless case) // (The case where $1 == $1 is an error and can not be used for testing.) // Prior to this call the entire cell must exist on the $1 and $2 host. // $1 and $3 specify unique positive integers for these split cell subtrees and // Note that for spike exchange purposes // it is important not to associate the gid with the cell on the host that // gets the output location destroyed. proc splitcell() {local hostcas, hostp localobj cas, p, tree hostcas = $1 hostp = $2 cas = new SectionRef() cas.parent p = new SectionRef() // error if cas is already a root section reroot() p.sec disconnect() if (hostcas != myid) { tree = new SectionList() cas.sec tree.subtree() forsec tree delete_section() } if (hostp != myid) { tree = new SectionList() p.sec tree.subtree() forsec tree delete_section() } if (hostcas == myid) { cas.sec pc.splitcell_connect(hostp) } if (hostp == myid) { p.sec pc.splitcell_connect(hostcas) } } // currently accessed section becomes the root of the cell // it is an error if the sections from here to the root are not connected // to the parent at 0 or 1 proc reroot() {local p, s_pcon, s_orient, sp_pcon, sp_orient localobj s, sp, spp s = new SectionRef() if (s.has_parent()) { s.parent sp = new SectionRef() s.sec s_pcon = parent_connection() s.sec s_orient = section_orientation() if (s_pcon != 0 && s_pcon != 1) { s.sec printf("Warning, inexact re-root: %s(%g) connects to %g of ", secname(), s_orient, s_pcon) if (s_pcon >= .5) { s_pcon = 1 } else { s_pcon = 0 } sp.sec printf("%s parent.\n %s will reroot at orientation %g\n", secname(), secname(), s_pcon) } s.sec disconnect() sp.sec sp_pcon = parent_connection() sp.sec sp_orient = section_orientation() while (sp.has_parent) { // parent gets disconnected from its parent, // and gets connected to s // The old parent (sp) has a new parent connection to // s at s's section orientation and sp's new orientation // is the s's old parent connection (we demand that // all old parent connections be at 0 or 1 and if not // then the re-root will be inexact. Note that the // 3d points get reversed only if the old sp orientation // is opposite the new orientation sp.parent spp = new SectionRef() if (sp_pcon != 0 && sp_pcon != 1) { sp.sec printf("Warning, inexact re-root: %s(%g) connects to %g of ", secname(), sp_orient, sp_pcon) if (sp_pcon >= .5) { sp_pcon = 1 } else { sp_pcon = 0 } spp.sec printf("%s parent.\n %s will reroot at orientation %g\n", secname(), secname(), sp_pcon) } sp.sec disconnect() // s.sec printf("%s connect", secname()) // sp.sec printf(" %s(%g), %g\n", secname(), s_pcon, s_orient) s.sec connect sp.sec(s_pcon), s_orient sp.sec if (section_orientation() != sp_orient) { reverse3d() } s = sp sp = spp s_pcon = sp_pcon s_orient = sp_orient sp.sec sp_orient = section_orientation() sp.sec sp_pcon = parent_connection() } // parent gets connected to s // s.sec printf("%s connect", secname()) // sp.sec printf(" %s(%g), %g\n", secname(), s_pcon, s_orient) s.sec connect sp.sec(s_pcon), s_orient sp.sec if (section_orientation() != sp_orient) { reverse3d() } } } proc reverse3d() {local i, j, x, y, z, d i = 0 j = n3d()-1 while (i < j) { x = x3d(i) y = y3d(i) z = z3d(i) d = diam3d(i) pt3dchange(i, x3d(j), y3d(j), z3d(j), diam3d(j)) pt3dchange(j, x, y, z, d) i += 1 j -= 1 } } endtemplate ParallelNetManager neuron-7.5/share/lib/hoc/noload.hoc000077500000000000000000000000321323325274500172670ustar00rootroot00000000000000{load_file("stdgui.hoc")} neuron-7.5/share/lib/hoc/nrngui.hoc000077500000000000000000000000501323325274500173150ustar00rootroot00000000000000{load_file("stdgui.hoc")} nrnmainmenu() neuron-7.5/share/lib/hoc/nrngui1.hoc000077500000000000000000000003171323325274500174040ustar00rootroot00000000000000load_file("pcchdir.hoc") // except for StartingDirectory, this should be safe no matter what is // subsequently loaded { hoc_obj_ = new StartingDirectory() hoc_obj_.load() objref hoc_obj_[2] nrnmainmenu() }neuron-7.5/share/lib/hoc/parcom.hoc000066400000000000000000000164061323325274500173050ustar00rootroot00000000000000{load_file("loadbal.hoc")} {load_file("binfo.hoc")} begintemplate ParallelComputeToolSplitInfo public sec, psec, x, px, spsec, spx, sid, first objref sec, psec, spsec proc init() { sec = new SectionRef() sec.parent { psec = new SectionRef() } x = section_orientation() px = parent_connection() // after splitting spsec connect sec(x), spx if spsec not nil spx = -1 sid = -1 first = 0 // 1 if supposed to call multisplit on psec } endtemplate ParallelComputeToolSplitInfo begintemplate ParallelComputeTool public nthread, pthread, cache, busywait, multisplit, pinfo public pct, box, map, np, save, nthread_, lb, printpart, move2part public showshape external cvode objref this, pct, box, pc, lb, splitinfo_, shapeplot strdef tstr, nprocstr, cxtotalstr, ldbalstr, npiecestr proc init() { pinfo = 0 np = 0 ispar_ = 1 multisplit_ = 0 ldbal_ = 1.0 cxtotal_ = 0 pc = new ParallelContext() lb = new LoadBalance(pc) nthread_ = pc.nthread() pct = this cacheeffic_ = cvode.cache_efficient() busywait_ = 0 nprocstr = "?? useful processors" totalcx() ldbal() build() } proc build() { box = new VBox() box.intercept(1) box.ref(this) box.save("save()") xpanel("") xvarlabel(nprocstr) xvarlabel(cxtotalstr) xvarlabel(npiecestr) xvarlabel(ldbalstr) xpvalue("# threads", &nthread_, 1, "change_nthread(nthread_, ispar_)") xcheckbox("Thread Parallel", &ispar_, "change_nthread(nthread_, ispar_)") xcheckbox("Cache Efficient", &cacheeffic_, "cacheeffic(cacheeffic_)") xcheckbox("Use busy waiting", &busywait_, "busywait(busywait_)") xcheckbox("Multisplit", &multisplit_, "multisplit(multisplit_)") xbutton("Refresh", "howmany() totalcx() ldbal()") xpanel() box.intercept(0) } proc map() { if (box.ismapped) return sprint(tstr, "%s", this) if (numarg() > 1) { box.map(tstr, $2, $3, $4, $5) }else{ box.map(tstr) } } proc save() { box.save("load_file(\"parcom.hoc\", \"ParallelComputeTool\")\n}") box.save("{ocbox_ = ParallelComputeTool[0]}") box.save("{object_push(ocbox_)}") sprint(tstr, "{change_nthread(%d, %d)}", nthread_, ispar_) box.save(tstr) if (multisplit_) {box.save("{multisplit(1)}")} if (multisplit_ == 0 && cacheeffic_) {box.save("{cacheeffic(1)}")} if (busywait_) {box.save("{busywait(1)}")} box.save("{object_pop()}") box.save("{\n") } proc printpart() {local i for i=0, pc.nthread - 1 { forsec lb.slthread[i] print secname(), " ", pc.sec_in_thread } } proc move2part() {local i i = pc.sec_in_thread lb.slthread[i].remove() lb.slthread[$1].append() for i=0, pc.nthread-1 { pc.partition(i, lb.slthread[i]) } } proc howmany() { np = pc.thread_how_many_proc() if (np == 1) { sprint(nprocstr, "%d useful processor", np) }else{ sprint(nprocstr, "%d useful processors", np) } } proc totalcx() { cxtotal_ = lb.cpu_complexity() sprint(cxtotalstr, "Total model complexity: %g", cxtotal_) } proc ldbal() { lb.thread_partition(pinfo) ldbal_ = lb.thread_cxbal_ sprint(npiecestr, "%d pieces", lb.npiece_) sprint(ldbalstr, "Load imbalance: %.1f%%", (ldbal_ - 1)*100) } proc cacheeffic() { if (!multisplit_) { cvode.cache_efficient($1) } cacheeffic_ = cvode.cache_efficient() } proc busywait() { if (!ispar_) {$1 = 0} if ($1 == 1 && np == 0) { howmany() } if (nthread_ > np) { $1 = 0 } pc.thread_busywait($1) busywait_ = $1 } func nthread() { if (numarg()) { change_nthread($1, ispar_) } return nthread_ } func pthread() { if (numarg()) { change_nthread(nthread_, $1) } return ispar_ } func cache() { if (numarg()) { cache_effic($1) } return cacheeffic_ } proc change_nthread() {local ms ms = multisplit_ if (ms) { unsplit() } nthread_ = $1 ispar_ = $2 pc.nthread(nthread_, ispar_) if (ms) { multisplit(ms) } totalcx() ldbal() busywait(busywait_) } proc multisplit() { multisplit_ = $1 if (multisplit_) { use_thread() }else{ unsplit() lb = new LoadBalance(pc) totalcx() ldbal() } } proc use_thread() {local cx, cellx localobj b, ms, vs, cb, nc, nil, roots pc.partition() lb = new LoadBalance(pc) cxtotal_ = lb.cpu_complexity() cx = cxtotal_*0.3/nthread_ ms = new Vector(100) roots = new SectionList() roots.allroots() splitinfo_ = new List() // list of list of ParallelComputeToolSplitInfo forsec roots { cellx = lb.cell_complexity() lb.multisplit(0, cx, ms) vs = new VectorStream(ms) splitinfo(vs, lb.srlist) split() } cxtotal_ = lb.cpu_complexity() ldbal() pc.multisplit() cacheeffic_ = cvode.cache_efficient() multisplit_ = 1 } proc splitinfo() {local gid, cx, nsid, isid, nsub, isub, n, i, id \ localobj si, si0, sil sil = new List() splitinfo_.append(sil) gid = $o1.scanvar cx = $o1.scanvar nsid = $o1.scanvar // printf("%d %g %d\n", gid, cx, nsid) for isid = 0, nsid - 1 { // printf(" %d\n", isid) nsub = $o1.scanvar for isub = 0, nsub - 1 { cx = $o1.scanvar n = $o1.scanvar // printf(" %g %d\n ", cx, n) for i=0, n - 1 { id = $o1.scanvar // printf(" %d", id) $o2.object(id).sec { si = new ParallelComputeToolSplitInfo() } si.sid = isid + 1 sil.append(si) if (i == 0) { si0 = si if (isub == 0) { si.first = 1 } }else{ si.spsec = si0.sec si.spx = si0.x } } // printf("\n") } } if (0) for i=0, sil.count-1 { si = sil.object(i) si.sec.sec printf("original: connect %s(%g),", secname(), si.x) si.psec.sec printf(" %s(%g)\n", secname(), si.px) if (si.spx < 0) { printf(" new: disconnect()\n") }else{ si.sec.sec printf("new: connect %s(%g),", secname(), si.x) si.spsec.sec printf(" %s(%g)\n", secname(), si.spx) } } } proc split() {local i, j, sidoff, nhost, rank localobj si, sil sidoff = 100*splitinfo_.count-1 nhost = pc.nhost rank = pc.id sil = splitinfo_.o(splitinfo_.count-1) for i=0, sil.count-1 { si = sil.o(i) si.sec.sec { disconnect() // printf("%s disconnect()\n", secname()) } if (si.spx >= 0) { si.spsec.sec connect si.sec.sec(si.x), si.spx // si.sec.sec printf("connect %s(%g),", secname(), si.x) // si.spsec.sec printf(" %s(%g)\n", secname(), si.spx) } } for i=0, sil.count-1 { si = sil.o(i) if (si.first) { si.psec.sec { pc.multisplit(si.px, (si.sid + sidoff)*nhost + rank) // printf("%s pc.multisplit(%g, %d)\n", secname(), si.px, (si.sid + sidoff)*nhost + rank) } } if (si.spx < 0) { si.sec.sec { pc.multisplit(si.x, (si.sid + sidoff)*nhost + rank) // printf("%s pc.multisplit(%g, %d)\n", secname(), si.x, (si.sid + sidoff)*nhost + rank) } } } } proc unsplit() {local i, j localobj si, sil pc.partition() pc.gid_clear(2) for j=0, splitinfo_.count - 1 { sil = splitinfo_.o(j) for i=0, sil.count - 1 { si = sil.o(i) si.sec.sec disconnect() si.psec.sec connect si.sec.sec(si.x), si.px if (0) { si.sec.sec printf("connect %s(%g),", secname(), si.x) si.psec.sec printf(" %s(%g)\n", secname(), si.px) } } } cacheeffic_ = cvode.cache_efficient(0) multisplit_ = 0 } proc showshape() {local i localobj ar, piece shapeplot = new Shape() ar = new SectionList() ar.allroots() i = 0 forsec ar { if ($1 == 0) { i = pc.sec_in_thread + 1 }else{ i = (i%8) + 1 } piece = new SectionList() piece.wholetree shapeplot.color_list(piece, i) } } endtemplate ParallelComputeTool objref tobj tobj = new ParallelComputeTool() objref tobj neuron-7.5/share/lib/hoc/pcchdir.hoc000077500000000000000000000033661323325274500174440ustar00rootroot00000000000000 pwman_place(0,20) load_file("stdgui.hoc") // Selection of a starting directory changes to that working directory and // loads the nrnmech.dll if it exists. // First ask if one of the "Recent directories" should be used from a list browser. // If not, "Select starting directory" from a file chooser. begintemplate StartingDirectory public load objref f, sf, list, box, tobj strdef start, tstr2, recent func load() { recent = "$(NEURONHOME)/rcentdir.txt" f = new File() sf = new StringFunctions() list = new List() if (f.ropen(recent)) { while (!f.eof()) { f.gets(tstr2) sf.left(tstr2, sf.len(tstr2) - 1) tobj = new String(tstr2) list.append(tobj) } box = new VBox() box.intercept(1) list.browser("", "s") box.intercept(0) list.accept_action("box.unmap(1)") if (box.dialog("Previously Used Starting Directories", "Chdir", "Not now")) { if (list.selected() >= 0) { tobj = list.object(list.selected()) list.remove(list.selected()) list.prepend(tobj) start = tobj.s } } } if (sf.len(start) == 0) { f.chooser("d", "Select working directory", \ "nrnmech.dll", "Change Working Dir", "Not now", "C:/") if (f.chooser()) { f.getname(start) for i=0, list.count-1 { if (strcmp(list.object(i).s, start) == 0) { list.remove(i) break } } tobj = new String(start) list.prepend(tobj) } } if (list.count() > 0) { wopen(recent) for i=0, list.count-1 { fprint("%s\n", list.object(i).s) } wopen() } objref f, list, box, tobj if (sf.len(start) > 1) { printf( "chdir(\"%s\")\n", start) chdir(start) if (ropen("nrnmech.dll")) { ropen() nrn_load_dll("nrnmech.dll") } return 1 } return 0 } // end of proc load() endtemplate StartingDirectory neuron-7.5/share/lib/hoc/pointbsr.hoc000077500000000000000000000024641323325274500176660ustar00rootroot00000000000000begintemplate PointBrowser objref plist, box, pp, this strdef tempstr, label proc init() { plist = new List($s1) // the objects are not referenced by plist box = new VBox() box.ref(this) box.intercept(1) plist.browser("", label, "makelabel(hoc_ac_)") plist.accept_action("accept(hoc_ac_)") if (nrnglobalmechmenu($s1, 0)) { xpanel("PointBrowser") sprint(tempstr, "nrnglobalmechmenu(\"%s\")", $s1) xbutton("Globals", tempstr) xpanel() } box.intercept(0) box.map($s1) } proc makelabel() {local x pp = plist.object($1) if (pp.has_loc()) { x = pp.get_loc() sectionname(tempstr) pop_section() sprint(label, "%s(%g)", tempstr, x) }else{ label = "No Location" } objectvar pp //make sure we are not retaining a reference } proc accept() { pp = plist.object($1) if (pp.has_loc()) { nrnpointmenu(pp) }else{ continue_dialog("Point process not located") } objectvar pp } endtemplate PointBrowser objref tempobj strdef tempstr1, tempstr2 proc makePointBrowser() { tempobj = new PointBrowser($s1) objref tempobj } proc pointmenu() { local i tempobj = new MechanismType(1) xmenu("PointProcesses") for i=0, tempobj.count() - 1 { tempobj.select(i) tempobj.selected(tempstr1) sprint(tempstr2, "makePointBrowser(\"%s\")", tempstr1) xbutton(tempstr1, tempstr2) } xmenu() objref tempobj } neuron-7.5/share/lib/hoc/pointgrp.hoc000077500000000000000000000154541323325274500176730ustar00rootroot00000000000000/* ?0 UserClasses PointProcessGroupManager ?0 User HocCode PointProcessGroupManager */ help ?0 begintemplate PointProcessGroupManager begintemplate PPItem public pp, s, move, name, save, type objref pp, sec, tobj strdef s, name, tstr proc init() { if ($1 >= 0) { // the point process case type = $1 pp = $o2 }else{ // the new mechanism type case type = $o2.selected(tstr) $o2.make(pp) pp.loc(.5) } sprint(name, "%s", pp) sloc() if (numarg() > 2) { $o3.out(pp) } } proc sloc() { xloc = pp.get_loc() sec = new SectionRef() pop_section() sec.sec sectionname(tstr) sprint(s, "%s at %s(%g)", pp, tstr, xloc) } proc move() { pp.loc($1) sloc() } proc save() { sec.sec sprint(tstr, "execute(\"%s ocbox_.move(%g)\")", secname(), xloc) $o1.save(tstr) } endtemplate PPItem public v1, move objectvar pp objref mt, sf, v1, h1, this, plist, tobj, tobj1, ms objref shape, d1, tvb strdef mname, tempstr, ppname, sloc, tstr, tstr1 double mstate[1] style_ = 0 // 0 is selection 1 is global set 2 is view one name proc init() { plist = new List() ppindex = -1 build() if (numarg() == 1) if ($1 == 0) return mnew(0) v1.map("PointProcessGroupManager") have_von_in_d1 = 0 } proc build() { local i v1 = new VBox() v1.priority(980) v1.ref(this) v1.save("save()") v1.intercept(1) sf = new StringFunctions() xpanel("PointProcessGroupManager", 1) build_menu() xmenu("PanelStyle") xbutton("View Selection", "force_style(0)") xbutton("Global Spec", "force_style(1)") xbutton("View One Name", "force_style(2)") xmenu() xbutton("Remove", "remove()") xbutton("Copy", "copy()") xpanel() xpanel("PointProcessGroupManager") ppname = "None" xvarlabel(ppname) xpanel() h1 = new HBox() h1.intercept(1) shape = new Shape() shape.action("move(hoc_ac_)") plist.browser("", "name") plist.select_action("select(hoc_ac_)") d1 = new Deck() d1.intercept(1) d1.intercept(0) d1.map() h1.intercept(0) h1.map() v1.intercept(0) } proc force_style() { if (style_ != 0) { style_ = -1 } style($1) } proc style() {local i, cnt if (style_ == $1) return if (have_von_in_d1) { d1.remove_last() have_von_in_d1 = 0 } if (style_ != 0) { d1.remove_last() } style_ = $1 if ($1 == 0) { select(ppindex) } i = ppindex if (i < 0) i = 0 act_type = plist.object(i).type if ($1 == 1) { mt.select(plist.object(i).type) mt.selected(tstr) ms = new MechanismStandard(tstr) ms.in(plist.object(i).pp) d1.intercept(1) tvb = new VBox() tvb.intercept(1) xpanel("") xlabel("All PP's set to these values") xpanel() ms.action("gs_action()") ms.panel() tvb.intercept(0) tvb.map() d1.intercept(0) d1.flip_to(plist.count) } if ($1 == 2) { d1.intercept(1) xpanel("") xlabel("Select a name") mt.select(plist.object(i).type) mt.selected(tstr) ms = new MechanismStandard(tstr) for i=0, ms.count() - 1 { cnt = ms.name(tstr, i) sprint(tstr1, "von_act(\"%s\")", tstr) xbutton(tstr, tstr1) } xpanel() d1.intercept(0) d1.flip_to(plist.count) } } proc gs_action() {local i, indx, x indx = hoc_ac_ ms.name(tstr, indx) x = ms.get(tstr) for i = 0, plist.count-1 if (plist.object(i).type == act_type) { sprint(tstr1, "%s.%s = %g", plist.object(i).pp, tstr, x) execute(tstr1) } } j=0 proc von_act() {local i // can't destroy a button while it is executing the release action // d1.remove_last() d1.intercept(1) xpanel("") mt.selected(tstr) xlabel(tstr) for i=0, plist.count-1 if (plist.object(i).type == act_type) { sprint(tstr, "%s", plist.object(i).pp) sscanf(tstr, "%*[^[][%d]", &j) sprint(tstr, "...[%d].%s", j, $s1) sprint(tstr1, "%s.%s", plist.object(i).pp, $s1) xvalue(tstr, tstr1, 1) } xpanel() d1.intercept(0) have_von_in_d1 = 1 d1.flip_to(plist.count+1) } proc build_menu() { mt = new MechanismType(1) xmenu("New") for i=0,mt.count()-1 { mt.select(i) mt.selected(mname) sprint(tempstr, "mnew(%d)", i) xbutton(mname, tempstr) } xmenu() xmenu("Show All") for i=0,mt.count()-1 { mt.select(i) mt.selected(mname) sprint(tempstr, "mshow(%d)", i) xbutton(mname, tempstr) } xmenu() } proc move() { if (ppindex >= 0) { plist.object(ppindex).move($1) ppname = plist.object(ppindex).s } } proc copy() {local i i = plist.selected() if (i < 0) {return} sprint(tstr, "%s", plist.object(i).pp) sf.head(tstr, "\\[", tstr1) mt.select(tstr1) ms = new MechanismStandard(tstr1) ms.in(plist.object(i).pp) mnew(mt.selected(), ms) } proc remove() { i = plist.selected() select(-1) if (i >= 0) { shape.point_mark_remove(plist.object(i).pp) plist.remove(i) d1.remove(i) } } proc mnew() { local i i = $1 mt.select(i) if (numarg() == 2) { tobj = new PPItem(-1, mt, $o2) }else{ tobj = new PPItem(-1, mt) } additem(tobj) select(plist.count-1) objref tobj } proc mnews() { mt.select($s1) if (numarg() == 2) { tobj = new PPItem(-1, mt, $o2) }else{ tobj = new PPItem(-1, mt) } additem(tobj) select(plist.count-1) objref tobj } proc mshow() { local i i = $1 mt.select(i) mt.selected(tstr) tobj1 = new List(tstr) addpplist(tobj1) objref tobj1 select(plist.count-1) } proc additem() { style(0) plist.append($o1) d1.intercept(1) nrnpointmenu($o1.pp, 0) d1.intercept(0) } proc addpp() { tobj = new PPItem(gettype($o1), $o1) additem(tobj) objref tobj } proc addpplist() { local i for i = 0, $o1.count - 1 { addpp($o1.object(i)) } } func gettype() {// find type of point process sprint(tstr, "%s", $o1) sf.head(tstr, "\\[", tstr1) mt.select(tstr1) return mt.selected() } proc select() {local i i = $1 if (ppindex != -1) { shape.point_mark_remove(plist.object(ppindex).pp) shape.point_mark(plist.object(ppindex).pp, 3) } if (i != -1) { // make a new one and put in the previous params tobj = plist.object(i) pp = tobj.pp sprint(ppname, "%s", tobj.s) if (style_ == 0) { d1.flip_to(i) } shape.point_mark_remove(pp) shape.point_mark(pp, 2) objref tobj, pp }else{ sprint(ppname, "None") if (style_ == 0) { d1.flip_to(i) } } ppindex = i plist.select(i) } proc save() { local i v1.save("load_file(\"pointgrp.hoc\")\n}\n{") sprint(tempstr, "ocbox_ = new PointProcessGroupManager(0)") v1.save(tempstr) v1.save("}\n{object_push(ocbox_)}\n{") for i=0, plist.count - 1 { tobj = plist.object(i) mt.select(tobj.type) mt.selected(tstr) ms = new MechanismStandard(tstr) ms.in(tobj.pp) ms.save("ms") sprint(tstr, "mnews(\"%s\", ms)", tstr) v1.save(tstr) sprint(tstr, "select(%d)", i) v1.save(tstr) plist.object(i).save(v1) if ((i+1)%50 == 0) { v1.save("}\n{") } } objref tobj v1.save("}\n{object_pop() doNotify()}\n{") v1.save("ocbox_ = ocbox_.v1") } endtemplate PointProcessGroupManager objectvar tempobj proc makeppgm() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start a PointProcessGroupManager") return } tempobj = new PointProcessGroupManager() objectvar tempobj } neuron-7.5/share/lib/hoc/pointman.hoc000077500000000000000000000105731323325274500176530ustar00rootroot00000000000000/* ?0 UserClasses PointProcessManager Select location and type of Point Process. Each instance manages a single point process. Default is a current injection electrode inserted in the middle of the current section that supplies a short current pulse of sufficient amplitude to elicit an action potential in a 100 um2 hh patch. usage: section p = new PointProcessManager([xplacement, yplacement]) p.pp is the point process currently installed in the cell. Note that when one point process is replaced by another the parameters are saved in a MechanismStandard. When the point process is re-installed, those parameters are restored. If the panel is saved in a session, the MechanismStandard's are saved as well. ?1 SelectPointProcess ?0 User HocCode PointProcessManager */ help ?0 begintemplate PointProcessManager public dist, v1, pp, move, maction external hoc_sf_ objectvar pp objref mt, sec, ms[1], sf, v1, this objref shape, d1 strdef mname, tempstr, ppname, sloc double mstate[1] proc init() { i = 0 ppindex = -1 sec = new SectionRef() xloc = .5 build() maction(-1) make_sloc() if (numarg() == 1) if ($1 == 0) return v1.map("PointProcessManager") } proc make_sloc() { sec.sec sectionname(tempstr) sprint(sloc, "at: %s(%g)", tempstr, xloc) } func dist() {local x // return arc length between sloc and rootsection(0) sec.root distance(0, 0) sec.sec x = distance(1, xloc) return x } proc build() { local i v1 = new VBox() v1.priority(990) v1.ref(this) v1.full_request(1) v1.save("save()") v1.intercept(1) sf = new StringFunctions() xpanel("PointProcessManager") build_menu() xmenu("Show") xradiobutton("Shape", "d1.flip_to(0)") // xbutton("Section Browser", "show_browser()") xradiobutton("Parameters", "if (object_id(pp)) d1.flip_to(1)") xmenu() xvarlabel(ppname) xvarlabel(sloc) xpanel() d1 = new Deck() d1.intercept(1) show_shape() d1.intercept(0) d1.map() v1.intercept(0) d1.flip_to(0) } proc build_menu() { mt = new MechanismType(1) objectvar ms[mt.count()] xmenu("SelectPointProcess") xradiobutton("none", "maction(-1)") for i=0,mt.count()-1 { mt.select(i) mt.selected(mname) sprint(tempstr, "maction(%d)", i) xradiobutton(mname, tempstr) } xmenu() } proc show_shape() { //print "show_shape\n" // v2.clear() // v2.intercept(1) shape = new Shape() shape.action("move()") if (object_id(pp)) { shape.point_mark(pp, 3) } // v2.intercept(0) hoc_ac_ = xloc sec.sec move() } proc move() {xloc = hoc_ac_ if(object_id(shape)) { shape.select() } sec = new SectionRef() if (object_id(pp)) { if (hoc_sf_.is_artificial(pp) == 0) { pp.loc(xloc) } } make_sloc() // shape.mark(0, xloc, 2) } proc maction() { local i i = $1 if (ppindex != -1) { // save parameters and remove old one ms[ppindex].in(pp) objectvar pp if (object_id(shape)) { shape.point_mark_remove(pp) } d1.remove_last() } if (i != -1) { // make a new one and put in the previous params mt.select(i) mt.selected(mname) if (object_id(ms[i]) == 0) { ms[i] = new MechanismStandard(mname) } sprint(tempstr, "pp = new %s(%g)", mname, xloc) sec.sec execute(tempstr, this) ms[i].out(pp) sprint(ppname, "%s", pp) d1.intercept(1) nrnpointmenu(pp, 0) d1.intercept(0) d1.flip_to(1) if (object_id(shape)) { shape.point_mark(pp, 3) } }else{ sprint(ppname, "None") } ppindex = i doNotify() } proc save() { local i v1.save("load_file(\"pointman.hoc\")\n}\n{") sec.sec sectionname(tempstr) sprint(tempstr, "%s ocbox_ = new PointProcessManager(0)", tempstr) v1.save(tempstr) v1.save("}\n{object_push(ocbox_)}\n{") for i=0, mt.count()-1 { if (object_id(ms[i])) { if (ppindex == i) { ms[i].in(pp) } mt.select(i) mt.selected(tempstr) sprint(tempstr, "mt.select(\"%s\") i = mt.selected()", tempstr) v1.save(tempstr) sprint(tempstr, "ms[i]") ms[i].save(tempstr) } } if (ppindex != -1) { mt.select(ppindex) mt.selected(tempstr) sprint(tempstr, "mt.select(\"%s\") i = mt.selected() maction(i)", tempstr) v1.save(tempstr) } sprint(tempstr, "hoc_ac_ = %g", xloc) v1.save(tempstr) v1.save("sec.sec move() d1.flip_to(0)") v1.save("}\n{object_pop() doNotify()}\n{") v1.save("ocbox_ = ocbox_.v1") } endtemplate PointProcessManager objectvar tempobj proc makeppm() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start a PointProcessManager") return } tempobj = new PointProcessManager() objectvar tempobj } neuron-7.5/share/lib/hoc/prcellstate.hoc000066400000000000000000000064761323325274500203540ustar00rootroot00000000000000// for debugging parallel and multisplit cells. // prcellgid(gid) is very useful when a cell's spike time is // different for different numbers of hosts // section prcelltree(0) is very useful for multisplit debugging, But // easiest if multisplit piece is identical for two runs with different // results. // prcellall(i) is useful when diffent multisplit is different on one machine // prcellobj(i, cell, 0) is useful when a cell differs // rdcellstate(file1, file2) is useful for comparing the output of // two result sets. load_file("stdlib.hoc") strdef mtname_, msname_, varval_ // file will be cs$1.id.nhost // all sections proc prcellall() {localobj pc, sl sl = new SectionList() forall sl.append() prcellseclist($1, sl, 0) } // tree containing currently accessed section proc prcelltree(){ localobj sl sl = new SectionList() sl.wholetree() prcellseclist($1, sl, 0) } // cell specified by $1 as gid (cell must have an 'all' sectionlist) proc prcellgid() {localobj sl, pc pc = new ParallelContext() if (pc.gid_exists($1)){ prcellobj($1, pc.gid2cell($1), $1) } } // cell specified by $o2 cell object (cell must have an 'all' sectionlist proc prcellobj() { prcellseclist($1, $o2.all, $3) } proc prcellseclist() {localobj pc, fname, csf pc = new ParallelContext() fname = new String() sprint(fname.s, "cs%d.%d.%d", $1, pc.id, pc.nhost) csf = new File() csf.wopen(fname.s) prcellseclist_($o2, csf, $3) csf.close } proc prcellseclist_() {local i, j, k, x, size localobj mt, ms, pp i = 0 mt = new MechanismType(0) forsec $o1 { for (x, 0) { $o2.printf("%d %d %.9g %s.v(%g)\n", $3, i, v(x), secname(), x) i += 1 $o2.printf("%d %d %.9g area(%g)\n", $3, i, area(x), x) i += 1 $o2.printf("%d %d %.9g ri(%g)\n", $3, i, ri(x), x) i += 1 } for j=1, mt.count-1 { mt.select(j) mt.selected(mtname_) if (ismembrane(mtname_)) { ms = new MechanismStandard(mtname_,0) for k=0, ms.count-1 { size = ms.name(msname_, k) for (x,0) { sprint(varval_, "hoc_ac_ = %s(%g)", msname_, x) execute(varval_) $o2.printf("%d %d %.9g %s(%g)\n", $3, i, hoc_ac_, msname_, x) i += 1 } } } } } mt = new MechanismType(1) for j=0, mt.count-1 { mt.select(j) mt.selected(mtname_) i = 0 forsec $o1 { for (pp = mt.pp_begin(); object_id(pp) != 0; pp = mt.pp_next()) { x = pp.get_loc() pop_section() ms = new MechanismStandard(mtname_,0) ms.in(pp) for k=0, ms.count-1 { ms.name(msname_, k) $o2.printf("%d %d %.9g %s.%s %s %g\n", $3, i, ms.get(msname_), pp, msname_, secname(), x) i += 1 } } } } } //e.g nrniv prcellstate.hoc -c 'rdcellstate("cs0.0.1", "cs0.0.2")' proc rdcellstate() {local i, g, j, val1, val2, diff, most localobj f1, f2, l1, l2, lmost1, lmost2 most = 0 lmost1 = new String() lmost2 = new String() l1 = new String() l2 = new String() f1 = new File() f1.ropen($s1) f2 = new File() f2.ropen($s2) for (i=0; !f1.eof; i += 1) { f1.gets(l1.s) f2.gets(l2.s) sscanf(l1.s, "%d %d %lf", &g, &j, &val1) sscanf(l2.s, "%d %d %lf", &g, &j, &val2) if (val1 != val2) { diff = abs(val1-val2)/(abs(val1) + abs(val2)) printf("%g\n%s%s\n", diff, l1.s, l2.s) if (most < diff) { most = diff lmost1.s = l1.s lmost2.s = l2.s } } } if (most > 0) { printf("most: %g\n%s%s\n", most, lmost1.s,lmost2.s) } f1.close f2.close } neuron-7.5/share/lib/hoc/rcs.hoc000077500000000000000000000041761323325274500166170ustar00rootroot00000000000000/*------------------------------------------------------------ /local/src/master/nrn/lib/hoc/rcs.hoc,v 1.2 1999/05/24 19:15:37 hines Exp ------------------------------------------------------------*/ /*------------------------------------------------------------ Load templates and procedures ------------------------------------------------------------*/ xopen("$(NEURONHOME)/lib/hoc/rcs.iv") /*------------------------------------------------------------ Create and initialize necessary strings ------------------------------------------------------------*/ strdef identifier, user_name, output_file, version_file, last_neuron_run output_file = "data.tmp" version_file = "version.hoc" last_neuron_run = ".last_neuron_run" setup_id_info(output_file, version_file, last_neuron_run) /*------------------------------------------------------------ Create file list ------------------------------------------------------------*/ objectvar fileList fileList = new List() appendFile("geometry", fileList) appendFile("parameters", fileList) appendFile("run", fileList) /*------------------------------------------------------------ File Manager menu routines ------------------------------------------------------------*/ /* Contains title for "Update " button, and "Save output d" */ strdef version_title, output_title proc updateTitles() { /* Update title for "Update " button, and "Save output d" */ strdef ver rcs_version(version_file, "ver") sprint(version_title, "Update %s (%s):", version_file, ver) sprint(output_title, "Save Output (d%s):", identifier) } proc menu() { /* Display "File Manager" panel for file list $o1*/ strdef fb, svf, oa sprint(fb, "fileBrowser(%s, \"%s\")", $s1, $s1) sprint(svf, "saveVersionFile(%s)", $s1) sprint(oa, "openAll(%s)", $s1) updateTitles() xpanel("File Manager") xbutton("File Browser", fb) xlabel("") xvarlabel(version_title) xbutton("Save", svf) xlabel("") xvarlabel(output_title) xbutton("Save", "save_output_file(identifier, 0)") xlabel("") xlabel("Open All Files:") xbutton("Open", oa) xpanel() } menu("fileList") neuron-7.5/share/lib/hoc/rcs.iv000077500000000000000000000065411323325274500164620ustar00rootroot00000000000000/*------------------------------------------------------------ /local/src/master/nrn/lib/hoc/rcs.iv,v 1.1.1.1 1994/10/12 17:20:44 hines Exp ------------------------------------------------------------*/ /*------------------------------------------------------------ Template for files maintained with RCS menu system ------------------------------------------------------------*/ begintemplate RcsFile public fname, ci, co, file_menu, name, open, view, write strdef filename, fname, ver proc init() { /* Initialize all RcsFile variables */ diff = 0 /* File different from rcs version - (1 needs ci, 0 doesn't) */ exist = 0 /* Flag for valid instance - guard against empty array elements */ filename = "" /* File name */ ver = "" /* File's rcs version number */ fname = "" /* File's name with version number */ } proc ci() { /* Ci NAME */ if (exist) { if (rcs_ci_file(filename, diff)) { diff = 0 } /* Only change diff if rcs_ci_file() worked */ set_version() } } proc co() { /* Co NAME */ if (exist) { if (rcs_co_file(filename)) { diff = 0 } /* Only change diff if rcs_co_file() worked */ set_version() } } proc file_menu() { set_version() xpanel(filename) xvarlabel(fname) xlabel("") xbutton("Get New Version", "co()") xbutton("Save Version", "ci()") xbutton("Xopen File", "open()") xbutton("View File", "view()") xpanel() } proc name() { /* Get file's name, test if exist & reset file's variables */ if (file_exist($s1)) { init() filename = $s1 exist = 1 set_version() /* Also sets "fname" */ } else { printf("name: file does not exist, please enter new file name or co file\n") } } proc open() { /* Xopen() NAME and set DIFF for later reference */ if (exist) { xopen(filename) set_diff() } } proc set_diff() { /* Test if NAME different then original rcs version and set DIFF accordingly */ if (diff == 0) { diff = rcsdiff_file(filename) } } proc set_version() { /* Set VER with file's rcs version number */ rcs_version(filename, "ver") /* Need to redo fname with proper version number */ sprint(fname, "%s (%s)", filename, ver) } proc view() { /* Cat NAME */ if (exist) { rcs_view_file(filename) } } proc write() { /* If DIFF then ask to ci files, write VER into version_file */ if (exist) { if (diff) { ci() } set_version() add_version_entry($s1, filename) } } endtemplate RcsFile /*------------------------------------------------------------ Procedures for handling a file list ------------------------------------------------------------*/ objectvar file proc appendFile() { /* Add file $s1 to file list $o2 */ file = new RcsFile() file.name($s1) $o2.append(file) } proc fileBrowser() { /* Display file manager browser for $o1, and uses $s2 to set $o1.accept_action ($s2 should be the name of $o1 as a string */ strdef ba sprint(ba, "%s.object(hoc_ac_).file_menu()", $s2) $o1.browser("RCS File Manager", "filename") $o1.accept_action(ba) } proc openAll() { /* Xopen() all files in list $o1 */ for i = 0, $o1.count() { $o1.object(i).open() } } proc saveVersionFile() { /* Create new version_file */ for i = 0, $o1.count() { /* Write version numbers for all files in file list $o1 */ $o1.object(i).write(identifier) } update_id_info(identifier) updateTitles() } neuron-7.5/share/lib/hoc/runfit.hoc000077500000000000000000000723251323325274500173400ustar00rootroot00000000000000/* ?0 RunFitter A tool for fitting the output of a simulation to data. Simulation output variable(s), and parameters can be specified by the user. This tool may be saved in a session. This tool uses the @afit_praxis method and the least squares error function calls run(). The minimization function used by the fitter calls the hoc "run" procedure (see @aInitRun ). The output simulation variable data is stored using the Vector.record() function, ie values are copied from the variable to the vector at the end of finitialize() and at the end of fadvance() whenever t passes the x values of the data. Fitting parameters are varied using one element vectors registered with Vector.play(), ie the value is copied from the vector to the parameter at the beginning of finitialize(). The notion of a fitting parameter has been extended so that one can call an arbitrary statement so that the fit value can be used to assign values to a collection of hoc variables. Eg. globally setting a range variable. Any number of data weight regions can be specified in order to ignore artifacts weight critical regions more heavily. Fitting parameters and output parameters are registered with the play/record lists only when the "Running" checkbox shows that the widget is executing. @hbugs Multiple instances of the RunFitter widget can be present. But make sure you are not Running more than one at a time. When saving a session involving it is necessary that on retrieval the necessary variables exist that are used by the fitter. In the case of extra fit variables this means that the master fitter should be selected prior to the slave fitters when using the @aPrintWindowManager. When a parameter is very close to 0, its limited resolution in a field editor may cause problems. In this case define the parameter to be a scaled version of the actual desired value, eg @code g_pas = .0001*$1 @endcode Only change morphology parameters such as diam and L using a statement involving $1. Otherwise the system will not be notified that diameter is changing. @h ?1 ReadData Pops up a filechooser for reading the data file. The first number in the file is the number of points. Subsequent pairs of numbers are x and y values of the data. Alternativly the Graph menu can be used to invoke the "DataFromClipboard" item ( see @aClipboard.Miscellaneous ). When data is read from the clipboard, that data is saved when the tool is saved in a session. However, if the ReadData button is used the filename is saved. ?1 CurrentValuesAsDefault Any checkmarks are removed from the default field editors in the parameter list. ?1 Variabletofit Pops up symbol chooser. The syntax of the variable must be in a form which is a valid argument to a Vector.record(var) function. Practically speaking, this means that if the variable happens to be a density range variable then the entry string must contain an explicit section arc length parameter. eg. soma.v(.5) . Point process variables can use either an objref prefix or the internal object name, eg SEClamp[0].i . Navigating to a variable name with the chooser generally yields a valid name. If more than one variable is to be fit to separate data curves, invoke a slave RunFitter with from the Extras/AnotherVariableToFit menu item. ?1 Parameterstovary Every time this button is pressed it pops up a symbol chooser for appending a variable to the list of parameters to be varied in order to least squares fit the "Variabletofit" to the data. DefaultFieldEditor's for these parameters appear in the top right box of the widget. These parameters must be in a form acceptable to the Vector.play(var) function. ie density range variables must contain an explicit arc length parameter. In the case of a simulation consisting of more than one compartment, it is often necessary to identify a parameter with a set of values. In that case one can enter an arbitrary statement involving the parameter "$1", eg @code forall g_pas = $1 @endcode Each parameter has a checkbox to the left of its name. When checked, the value will be adjusted during a fit to optimize the model to the data. If not checked the parameter will be held constant during the fit. ?1 Extras ? DataWeights Pops up a panel showing the boundaries and weight values for each data region. The boundaries can also be manipulated by selecting the AdjustWeightRegions tool from the Graph menu (right button) and then dragging the boundary lines. Weights are defined so that data points a small region will have a total weight equal to the data points in a large region when the interval weight values are the same. The weight for each curve is always normalized to N (the size of the data vector) so that the displayed error is the mean square error (average square difference between model and data FOR THAT CURVE) The "Total Curve Weight" specifies how this curve in the set of master/slave curves are to be relatively weighted for minimizing the error. ie for each curve the mean sq error between data and model is sum( dweight*(ydatavec - ymodel)^2 )/ydatavec.size where sum(dweight) = ydatavec.size. If we call this value "mserr" then praxis attempts to minimize sum (normweight*mserr) and this value is displayed in the master fitter under "Total Praxis Error" ? ParameterRanges Allows specification of the allowable parameter range for a fitting parameter. If praxis uses a parameter outside this range, the least squares error function will return 1e9 without calling the run procedure. Default parameter ranges for all fitting parameters are initialized to -1e6 to 1e6 ? Changeparmfromlist Pops up a browser with all parameter names. Double clicking on a name will pop up a string chooser from which one can change the parameter name or statement. ? Removeparmfromlist Pops up a browser with all parameter names. Double clicking on a name will remove that parameter from the list. ? SaveRestoreFitParams The SaveFitParms menu item saves the current values of parameters, parameter range limits, and and whether the parameter is to be held constant during a fit. The SaveFitBrowser menu item pops up a list browser. Double clicking on these items will copy the saved parameters etc, back into the current parameter panel. ? NumberOfDataRegions Select the number of data regions to use in weighting the data. ? AnotherVariableToFit Pop up a slave RunFitter to allow simultaneous fitting of several sets of data to several fit variables. A RunFitter Slave does not have a parameter panel but has independent selection of data, variable to fit, and data weight regions. When saving a RunFitter Slave to a session, it must be placed on the paper icon of the PrintWindowManager AFTER its master. ?1 Dofit Calls praxis to do the fit. During a fit, intermediate results are occasionally printed to the xterm window showing the progress of the fit. While the widget is working the Running checkbox is checked. If the StopatnextQuadForm button is pressed while the fit is running, the fit will stop at at the end of its current main loop returning its current best fit along with a print of the principal axes and principal values. Left alone, praxis will return when it is within 1e-5 of the local minimum. If "Dofit" is pressed while the "StopatnextQuadForm" is checked praxis will stop after one main loop (calculate principal axes and values) ?1 SingleRunFit Call the least squares error function once. This results in a single simulation run with the parameter values displayed in the panel. The "Error of fit" field editor shows the square norm of the data - outputvariable. ?1 StopatnextQuadForm Cause praxis to stop after it finishes its current principal axis/value computation. Be patient, it may be necessary to wait for several runs before the computation completes. Only do a ^C if necessity demands and then remove the check by pressing SingleRunFit. ?1 Running Checked when in the process of doing a Dofit or SingleRunFit. When checked one should not try to change the widget by changing parameters or doing a recursive run. The check may not be accurate if the previous run generated a runtime error since the check is removed only if the call to praxis returns normally. In this case one may press the SingleRunFit button and follow the instructions to remove the check. ?1 BeQuiet Turns off printing by the praxis function and does not flush the graphs after "run()" is called. ?0 User HocCode RunFitter */ help ?0 {load_file("stdlib.hoc", "String")} begintemplate RunFitArg public name, val, low, high, doargfit, invalid, copy, set, play_one strdef name, tstr objref val proc init() { val = new Vector(1) set($s1, 1, -1e6, 1e6, 1) } proc set() { name = $s1 val.x[0] = $2 low = $3 high = $4 doargfit = $5 } proc copy() { set($o1.name, $o1.val.x[0], $o1.low, $o1.high, $o1.doargfit) } func invalid() { if (val.x[0] < low || val.x[0] > high) { return 1 } return 0 } proc play_one() { val.play(name, 1e9) val.play(0) val.play_remove() } endtemplate RunFitArg begintemplate RunFitModel public arglist, first, getvals, setvals objref arglist, tobj strdef first proc init() { arglist = new List() for i=0, $o1.count-1 { tobj = new RunFitArg("") tobj.copy($o1.object(i)) arglist.append(tobj) } sprint(first, "%s = %g", arglist.object(0).name, arglist.object(0).val.x[0]) } proc getvals() {local i $o1 = new Vector(arglist.count) for i=0, arglist.count { $o1.x[i] = arglist.object(i).val.x[0] } } proc setvals() {local i for i=0, arglist.count { arglist.object(i).val.x[0] = $o1.x[i] } } endtemplate RunFitModel objref runfit_instance // gets set before call to fit_praxis objref runfit_master // for saving in a session. Sadly, the // master must be first and then the slaves // when selecting the windows for session save. func runfit_efun() {local i for i=0, $1-1 { runfit_instance.set_xarg(i, $&2[i]) } return runfit_instance.efun() } begintemplate RunFitter public sim, vbox, g, efun, arglow, arghigh, tobj, set_xarg, redraw, fit external runfit_efun, run public arglist, errval, fit, single public addarg, removearg, fitness_name public set_datavec, mserr, w_boundary, w_weight, xdatavec, ydatavec public dweight, xdatavec_, ydatavec_, parm_start, tolerance, normweight public restore_model, import public slave_efun, slaves_, slave_dismissed, slave_setup, set_master, quiet_ public map, unmap objref sim, this, dfile, tobj, tobj1, pvbox, lvbox, parm_start, arglist objref savfunlist objref slaves_, master_ objref xdatavec, ydatavec objref dweight, w_boundary, w_weight, xdatavec_, ydatavec_ objref arglow, arghigh, doargfit, argindx objref sf { n=0 np=0 valid_data = 0 valid_output = 0 running = 0 stopstate = 0 err=0 rough_=0 quiet_ = 0 i=0 errmin=0 } strdef tempstr, tstr1, tstr2, output_str, mserrlabel, slaveid strdef fitness_name objref var_choose, parm_choose, tempobj objref vbox,b2,d1,g proc set_xarg() { arglist.object(argindx.x[$1]).val.x[0] = $2 } func efun() { local i, cnt // the least squares error function. for i=0,n-1 { if (arglist.object[i].invalid()) { mserr = 1e9 errval = 1e9 if (errmin > 1e8) { sprint(mserrlabel, "MeanSqErr %g TotalErr %8.3g", mserr, errval) } printf("%s out of range\n", arglist.object[i].name) return errval } } run() // sim is the record vector errval = slave_efun() cnt = slaves_.count() for i=0, cnt - 1 { errval += slaves_.object(i).slave_efun() } if(errval < errmin) { sprint(mserrlabel, "MeanSqErr %g TotalErr %8.3g", mserr, errval) errmin = errval if (!master_.quiet_) { g.flush() for i=0, cnt - 1 { slaves_.object(i).g.flush() } } } doNotify() return errval } func slave_efun() { if (sf.len(fitness_name) > 0) { sprint(tstr1, "%s.mserr = %s(%s,%s,%s,%s,%s)", this, fitness_name, this, xdatavec,sim,ydatavec_,dweight) execute(tstr1) }else{ mserr = sim.meansqerr(ydatavec_, dweight) } if (!is_master) sprint(mserrlabel, "MeanSqErr %g", mserr) return mserr*normweight } proc slave_dismissed() {local i i = slaves_.index($o1) slaves_.remove(i) } proc redraw() {local ymin, ymax g.erase() if (valid_data) { g.label(.8, .95) ydatavec_.plot(g, xdatavec_, 2, 1) ymin = ydatavec_.min() ymax = ydatavec_.max() for j=0, w_boundary.size() - 1 { g.beginline(3, 1) g.line(w_boundary.x[j], ymin) g.line(w_boundary.x[j], ymax) } } g.flush() } func slave_setup() { if (!valid_data) { continue_dialog("Must first read a data file") return 0 } if (!valid_output) { continue_dialog("Must specify a simulation output variable for fitting to data") return 0 } sim = new Vector(xdatavec_.size()) sim.plot(g, xdatavec_) sprint(tempstr, "%s.sim.record(&%s,%s.xdatavec_)", this, output_str, this) execute(tempstr) return 1 } func setup() {local i, j if (n < 2) { continue_dialog("Must specify at least two fitting parameters") return 0 } if (slave_setup() == 0) return 0 for i=0, slaves_.count()-1 { if (slaves_.object(i).slave_setup() == 0) return 0 } sprint(tempstr, "runfit_instance = %s", this) execute(tempstr) j = 0 argindx.resize(n) for i=0,n-1 { tobj = arglist.object(i) if (sf.substr(tobj.name, "$1")!= -1) { tobj.play_one() }else{ sprint(tempstr, "%s.val.x[0] = %s", tobj, tobj.name) execute(tempstr) } if (tobj.doargfit == 1) { parm_start.x[j] =tobj.val.x[0] if (sf.substr(tobj.name, "$1")!= -1) { tobj.val.play(tobj.name, 1e9) }else{ sprint(tempstr, "%s.val.play(&%s, 1e9)", tobj, tobj.name) execute(tempstr) } argindx.x[j] = i j += 1 } } argindx.resize(j) return 1 } proc takedown() { local i execute("objref runfit_instance") for i=0, n-1 { arglist.object(i).val.play_remove() } sim.play_remove() for i=0, slaves_.count() -1 { slaves_.object(i).sim.play_remove() } } proc fit() { if (running) { if (boolean_dialog("Running flag is on, Turn it off?")) { running = 0 } return } running = 1 if (!setup()) { return } attr_praxis(tolerance, .8, quiet_==0) /* for i=0,argindx.size()-1 { printf ("starting with %d %g\n", i, parm_starta.x[i]) } */ errmin = 1e9 errval = fit_praxis(argindx.size(), "runfit_efun", &parm_start.x[0]) for i=0, argindx.size() - 1 { arglist.object(argindx.x[i]).val.x[0] = parm_start.x[i] arglist.object(argindx.x[i]).play_one() } if (!stoprun) { errval = efun() } takedown() running = 0 stopstate = 0 if (master_.quiet_) g.flush } proc single() { if (running) { if (boolean_dialog("Running flag is on, Turn it off?")) { running = 0 } return } running = 1 if (!setup()) { return } errmin = 1e9 errval = efun() if (master_.quiet_) g.flush takedown() running = 0 } proc init() {local i normweight = 1 maxarg = 40 tolerance = 1e-5 sf = new StringFunctions() arglow = new Vector(maxarg, 0) arghigh = new Vector(maxarg, 1e6) doargfit = new Vector(maxarg, 1) argindx = new Vector(maxarg) parm_start = new Vector(maxarg) arglist = new List() dweight = new Vector() sim = new Vector() savfunlist = new List() slaves_ = new List() if (numarg() == 0) { is_master = 1 } master_ = this build() } proc set_master() { master_ = $o1 sprint(slaveid, "This %s is slave to %s", this, master_) } proc read_data1() { if (object_id(dfile) == 0) { dfile = new File() dfile.chooser("r", "Read Data File", "*.dat", "Read") } if (!dfile.ropen($s1)) { sprint(tstr2, "Couldn't open data file: %s", $s1) continue_dialog(tstr2) return } ndat = dfile.scanvar() xdatavec = new Vector(ndat) ydatavec = new Vector(ndat) for i=0, ndat-1 { xdatavec.x[i] = dfile.scanvar() ydatavec.x[i] = dfile.scanvar() } dfile.close() valid_data=1 g.size(xdatavec.min(), xdatavec.max(), ydatavec.min(), ydatavec.max()) weight() } proc read_data() {local ndat if (object_id(dfile) == 0) { dfile = new File() dfile.chooser("r", "Read Data File", "*.dat", "Read") } if (dfile.chooser()) { dfile.getname(tempstr) read_data1(tempstr) } } proc set_datavec() {local i objref dfile, xdatavec, ydatavec valid_data = 0 i = $o1.indwhere(">=", 0) xdatavec = $o1.c(i) ydatavec = $o2.c(i) ydatavec.label($o2.label) valid_data = 1 g.size(xdatavec.min(), xdatavec.max(), ydatavec.min(), ydatavec.max()) weight() } proc clipboard_data() { sprint(tstr1, "%s.set_datavec(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr1) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc import() {local i for i=0, n - 1 { tobj1 = arglist.object(i) sprint(tstr1, "%s.val.x[0] = %s", tobj1, tobj1.name) execute(tstr1) } } func ckvar() {local ret tobj = new Vector(1) sprint(tstr2, "runfit_instance = %s", this) execute(tstr2) if ($2 == 1 && sf.substr($s1, "$1")!= -1) { sprint(tstr2, "runfit_instance.tobj.play(\"%s\", 1e9)", $s1) }else{ sprint(tstr2, "runfit_instance.tobj.play(&%s, 1e9)", $s1) } if (execute1(tstr2)) { ret = 1 }else { sprint(tstr1, "%s is non-existent or has invalid syntax for a record/play variable", $s1) continue_dialog(tstr1) ret = 0 } objref tobj execute("objref runfit_instance") return ret } proc spec_fit_var() { if (ckvar($s1, 0)) { output_str = $s1 valid_output = 1 doNotify() } } proc ask_fit_var() { if (!object_id(var_choose)) { var_choose = new SymChooser(\ "Enter variable to record during simulation and compare with data") } while (var_choose.run()) { var_choose.text(tempstr) if (ckvar(tempstr, 0)) { valid_output = 1 output_str = tempstr break } } } proc build_deck() { d1.remove_last() d1.intercept(1) if (n > 5) { //scrollbox tobj = new VBox(3,1) }else{ tobj = new VBox() } tobj.intercept(1) for i=0, n-1 { tobj1 = arglist.object(i) xpanel("ArgValues", 1) xcheckbox("", &tobj1.doargfit) tempstr = tobj1.name if (sf.substr(tempstr, "$1")!= -1) { sprint(tstr1, "arglist.object(%d).play_one()", i) xpvalue(tobj1.name, &tobj1.val.x[0], 1, tstr1) }else{ sprint(tstr1, "xvalue(\"%s\", \"%s\", 1)", tempstr, tempstr) execute(tstr1) } xpanel() } if (n > 5) {// used scrollbox tobj.intercept(0) tobj1 = tobj tobj = new VBox() tobj.intercept(1) tobj1.map() } mserr = 1e9 xpanel("ArgValues") mserrlabel = "MeanSqErr xxxxxxxxxxx TotalErr xxxxxxxx" xvarlabel(mserrlabel) xpanel() tobj.intercept(0) tobj.map() d1.intercept(0) d1.flip_to(0) } proc spec_parms() { if (! ckvar($s1, 1)) { return } tobj = new RunFitArg("") arglist.append(tobj) tobj.set($s1, $2, $3, $4, $5) tobj.play_one() n = n + 1 } proc addarg() { spec_parms($s1, $2, $3, $4, $5) build_deck() } proc removearg() { for i=0, arglist.count-1 { if (strcmp($s1, arglist.object(i).name) == 0) { arglist.remove(i) n -= 1 objref pvbox break } } build_deck() } proc ask_parms() { objref pvbox // dismisses old panel if any if (!object_id(parm_choose)) { parm_choose = new SymChooser(\ "Enter another variable (or statement involving $1) to vary during fit process.") } while (parm_choose.run()) { parm_choose.text(tempstr) if (ckvar(tempstr, 1)) { tempobj = new RunFitArg(tempstr) arglist.append(tempobj) n = n + 1 break } } build_deck() } proc build() { vbox = new VBox() vbox.priority(100) vbox.ref(this) sprint(tstr1, "execute(\"%s.unmap()\")", this) vbox.dismiss_action(tstr1) vbox.save("save()") vbox.intercept(1) b2 = new HBox() b2.intercept(1) build_panel() if (is_master) { d1 = new Deck() d1.intercept(1) xpanel("RunFitter") // just to get some space for now xlabel("This area will contain parameter field editors") xlabel(" when the parameter names are entered with the") xlabel(" \"Parameters to vary\" button.") xpanel() d1.intercept(0) d1.flip_to(0) d1.map() }else{ xpanel("RunFitter") sprint(slaveid, "This %s is slave to %s", this, master_) xvarlabel(slaveid) mserr = 1e9 mserrlabel="MeanSqErr xxxxxxxxxxx" xvarlabel(mserrlabel) xpanel() } b2.intercept(0) b2.map() g = new Graph() g.menu_tool("Adjust Weight Regions", "adjust_weights") g.menu_action("Data from Clipboard", "clipboard_data()") init_weights(1) vbox.intercept(0) } proc build_panel() { xpanel("RunFitter") xbutton("Read Data", "read_data()") if (is_master) {xmenu("Current Values") xbutton("Current Values as default", "err=errval build_deck() errval=err") xbutton("Import values", "import()") xmenu() } xbutton("Variable to fit", "ask_fit_var()") xvarlabel(output_str) xvarlabel(fitness_name) if (is_master) xbutton("Parameters to vary", "ask_parms()") xmenu("Extras...") xbutton("Data Weights", "weight_panel()") if (is_master){ xbutton("Parameter Ranges", "parm_range()") xbutton("Change parm", "change_parm()") xbutton("Remove parm", "remove_parm()") xmenu("Save/Restore fit parms") xbutton("Save fit parms", "savfun()") xbutton("Save fit browser", "rfunbsr()") xmenu() }else{ xbutton("Copy data weights from Master", "master_weights()") } xmenu("Number of Data Regions") xbutton("1", "init_weights(1)") xbutton("2", "init_weights(2)") xbutton("3", "init_weights(3)") xbutton("4", "init_weights(4)") xbutton("5", "init_weights(5)") xbutton("one more", "init_weights(0)") xbutton("one fewer", "init_weights(-1)") xmenu() if (is_master) xbutton("Another variable to fit", "another()") xmenu() if (is_master){ xbutton("Do fit", "fit()") xbutton("Single Run Fit", "single()") xcheckbox("Stop at next Quad Form", &stopstate, "stopstate=1 stop_praxis()") xcheckbox("Running", &running, "running = (running == 0)") xcheckbox("Rough fit", &rough_, "weight()") xcheckbox("Be quiet", &quiet_) } xpanel() } proc master_weights() { w_weight = master_.w_weight.c w_boundary = master_.w_boundary.c weight() } proc another() { tobj = new RunFitter(1) tobj.set_master(this) slaves_.append(tobj) sprint(tstr1, "%s slave to %s", tobj, this) tobj.vbox.map(tstr1) tobj = xdatavec_ } proc map() { if (is_master) { sprint(tstr1, "%s", this) }else{ sprint(tstr1, "%s slave to %s", master_, this) } if (numarg() > 1) { vbox.map(tstr1, $2, $3, $4, $5) }else{ vbox.map(tstr1) } } proc unmap() {local i if (is_master) { while(slaves_.count) { slaves_.object(0).unmap() } }else{ master_.slave_dismissed(this) } objref master_ execute("objref runfit_master") vbox.unmap() } proc parm_range() {local i pvbox = new VBox() pvbox.save("") pvbox.intercept(1) xpanel("RunFitter") for i=0,n-1 { tobj = arglist.object(i) sprint(tstr1, "%s low", tobj.name) xpvalue(tstr1, &tobj.low, 1) sprint(tstr1, "%s high", tobj.name) xpvalue(tstr1, &tobj.high, 1) } xpanel() sprint(tstr1, "Parameter Ranges for %s", this) pvbox.intercept(0) pvbox.map(tstr1) } proc remove_parm() { arglist.browser("Double click to remove parameters", "name") arglist.accept_action("remove_parm1()") } proc remove_parm1() {local i, sel sel = hoc_ac_ if (sel < 0) { return } objref pvbox n = n-1 arglist.remove(sel) build_deck() } proc change_parm() { arglist.browser("Double click to remove parameters", "name") arglist.accept_action("change_parm1()") } proc change_parm1() {local i, sel sel = hoc_ac_ if (sel < 0) { return } objref pvbox tempobj = arglist.object(sel) tempstr = tempobj.name while (string_dialog("Change parameter", tempstr)) { if (ckvar(tempstr, 1)) { objref pvbox tempobj.name = tempstr build_deck() break } } } proc save() {local i vbox.save("load_file(\"runfit.hoc\")\n}\n{") if (is_master) { vbox.save("ocbox_=new RunFitter()") vbox.save("runfit_master = ocbox_") }else{ vbox.save("ocbox_=new RunFitter(1)") vbox.save("runfit_master.slaves_.append(ocbox_)") vbox.save("ocbox_.set_master(runfit_master)") } vbox.save("}\n{object_push(ocbox_)}\n{") sprint(tstr1, "fitness_name = \"%s\"", fitness_name) vbox.save(tstr1) if (sf.len(output_str) > 0) { sprint(tstr1, "spec_fit_var(\"%s\")", output_str) vbox.save(tstr1) } if (is_master) for i=0, n-1 { tobj = arglist.object(i) sprint(tstr1, "spec_parms(\"%s\", %g, %g, %g, %g)",tobj.name, tobj.val.x[0], tobj.low, tobj.high, tobj.doargfit) vbox.save(tstr1) sprint(tstr1, "tolerance = %g", tolerance) vbox.save(tstr1) } sprint(tstr1, "init_weights(%d)", w_boundary.size()-1) vbox.save(tstr1) sprint(tstr1, "quiet_ = %d", quiet_) if (is_master) vbox.save(tstr1) sprint(tstr1, "normweight = %g", normweight) vbox.save(tstr1) for i=0, w_boundary.size() - 1 { sprint(tstr1, "w_boundary.x[%d] = %g", i, w_boundary.x[i]) vbox.save(tstr1) sprint(tstr1, "w_weight.x[%d] = %g", i, w_weight.x[i]) vbox.save(tstr1) } if (is_master) vbox.save("build_deck()") if (object_id(dfile) != 0) { dfile.getname(tempstr) sprint(tstr1, "read_data1(\"%s\")\n}", tempstr) vbox.save(tstr1) }else if (object_id(xdatavec)) { sprint(tstr1, "xdatavec_ = new Vector(%d)", xdatavec.size) vbox.save(tstr1) sprint(tstr1, "ydatavec_ = new Vector(%d)", ydatavec.size) vbox.save(tstr1) sprint(tstr1, "ydatavec_.label(\"%s\")", ydatavec.label) vbox.save(tstr1) sprint(tstr1, "for i=0,%d { xdatavec_.x[i]=fscan() ydatavec_.x[i]=fscan()}\n}",\ xdatavec.size - 1) vbox.save(tstr1) for i=0,xdatavec.size-1 { sprint(tstr1, "%g %g", xdatavec.x[i], ydatavec.x[i]) vbox.save(tstr1) } vbox.save("set_datavec(xdatavec_, ydatavec_)") }else{ vbox.save("}") } vbox.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) } proc rfunbsr() { savfunlist.browser("", "first") savfunlist.accept_action("restorefun()") } proc savfun() {local i tobj = new RunFitModel(arglist) savfunlist.append(tobj) } proc restorefun() {local i i = hoc_ac_ tobj1 = savfunlist.object(i) for i=0, n-1 { tobj = tobj1.arglist.object(i) arglist.object(i).copy(tobj) } } proc restore_model() { arglist.remove_all() tobj = new RunFitModel($o1.arglist) for i=0, $o1.arglist.count() { arglist.append(tobj.arglist.object(i)) } n = arglist.count() build_deck() } proc init_weights() {local i, n, min, max if (numarg() == 1) { if ($1 == 0) { // one more n = w_boundary.size }else if ($1 == -1) { // one fewer n = w_boundary.size-2 if (n < 1) n = 1 }else{ n = $1 } }else{ n = 1 } w_boundary = new Vector(n+1) w_weight = new Vector(n+1, 1) if (valid_data) { min = xdatavec.x[0] max = xdatavec.x[xdatavec.size-1] w_boundary.indgen(min, (max-min)/n) weight() }else{ w_boundary.indgen(0, 1e9) } } proc weight_panel() {local i xpanel("data weights") xpvalue("Total curve weight", &normweight, 1, "weight()") xpvalue("interval 1 startpoint", &w_boundary.x[0], 1, "weight()") for i=1, w_boundary.size() - 1 { sprint(tstr1, "interval %d endpoint", i) xpvalue(tstr1, &w_boundary.x[i], 1, "weight()") sprint(tstr1, "interval %d weight", i) xpvalue(tstr1, &w_weight.x[i], 1, "weight()") } xpanel() } proc weight() {local i, j, t, w, d, tmin, tmax, n, res // make sure weight regions are within boundaries tmin = xdatavec.x[0] tmax = xdatavec.x[xdatavec.size - 1] n = w_boundary.size() for i=0, n-1 { t = w_boundary.x[i] if (t < tmin) { w_boundary.x[i] = tmin } if (t > tmax) { w_boundary.x[i] = tmax } } if (rough_) { rough() return } xdatavec_ = xdatavec ydatavec_ = ydatavec dweight.resize(xdatavec_.size()) sim.resize(xdatavec.size()) j = 0 tmax = w_boundary.x[0] w = 0 for i=0, dweight.size() - 1 { t = xdatavec.x[i] while (t >= tmax && j < n) { j += 1 if (i > 0 && i < dweight.size()-1) { w_boundary.x[j-1] = (t + xdatavec.x[i-1])/2 }else{ w_boundary.x[j-1] = t } if (j >= n) { tmax = 1e9 w = 0 break } tmax = w_boundary.x[j] d = w_boundary.x[j] - w_boundary.x[j-1] if (d <= 0) { continue } w = w_weight.x[j]/d } dweight.x[i] = w } tobj = new Vector(xdatavec.size()) // errnorm = ydatavec.meansqerr(tobj, dweight) // if (errnorm > 0) { // dweight.div(errnorm) // } w = dweight.sum() if (w > 0) { dweight.mul(dweight.size/w) } // dweight.mul(normweight) // done later redraw() } proc rough() {local i, j, n, x, dx, nb // one data point on each boundary with three points equally spaced // in the interior of each region nb = w_boundary.size() n = (nb-1)*4 + 1 xdatavec_ = new Vector(n) ydatavec_ = new Vector(n) ydatavec_.label(ydatavec.label) dweight.resize(n) sim.resize(n) tobj = new Vector(n) tobj.x[0] = w_boundary.x[0] dweight.x[0] = w_weight.x[0] for i=1, nb - 1 { x = w_boundary.x[i-1] dx = (w_boundary.x[i] - x)/4 for j = 1, 4 { tobj.x[(i-1)*4 + j] = x + j*dx if (dx <= 0) { dweight.x[(i-1)*4 + j] = 0 }else{ dweight.x[(i-1)*4 + j] = w_weight.x[i] } } } j=0 for i=0, xdatavec.size() - 1 { t = xdatavec.x[i] if (t >= tobj.x[j]) { xdatavec_.x[j] = t ydatavec_.x[j] = ydatavec.x[i] j += 1 if (j >= n) { break } } } tobj.fill(0) errnorm = ydatavec_.meansqerr(tobj, dweight) if (errnorm > 0) { dweight.div(errnorm) } redraw() } proc adjust_weights() { //print $1, $2, $3 if ($1 == 2) { // press adjust = pick_weight($2) } if (adjust == -1) { return } if ($1 == 1) { // drag w_boundary.x[adjust] = $2 weight() g.flush() } if ($1 == 3) { // release w_boundary.sort() weight() adjust = -1 } } func pick_weight() {local i, j, x, m m = 1e9 for i=0, w_boundary.size() - 1 { x = abs($1 - w_boundary.x[i]) if (x < m) { m = x j = i } } return j } endtemplate RunFitter objref temp_object_ proc makerunfitter() {local i temp_object_ = new RunFitter() temp_object_.map() objref temp_object_ } neuron-7.5/share/lib/hoc/shapebox.hoc000077500000000000000000000123141323325274500176320ustar00rootroot00000000000000/* ?0 UserClasses MenuExplore ?2 Type x Shape and browser for creating a section panel usage: ob = MenuExplore() Pressing the left mouse button on a section in the Shape scene (make sure the "Section" popup menu item is selected) colors the section red and highlights the corresponding section name in the browser. Pressing the left mouse button once on a name in the browser colors the corresponding section in the Shape Scene (you can drag the mouse as well). Double clicking the left mouse button on a name in the browser pops up a panel showing the parameters associated with that section. This assumes homogeneous sections by default. So Parameters which are not initialized as constants along the section get a label to that effect instead of a field editor. If this is not desired specify a position, 0 0) { sprint(callback, "execute(\"%s\")", $s1) b.accept_action(callback) } sec = new SectionRef() s.select() b.select() } func dialog() { return hbox.dialog("Select a Section") } endtemplate ShapeBrowser /* ?0 User HocCode MenuExplore */ begintemplate MenuExplore public s, unmap, hbox objectvar s, b, hbox, this, vbox strdef str x=0 proc init() { hbox = new HBox() hbox.ref(this) hbox.intercept(1) s = new Shape() vbox = new VBox() vbox.intercept(1) xpanel("MenuExplore",1) x = -1 xmenu("Type") type = 1 xradiobutton("Parameters", "type=1") xradiobutton("Assigned", "type=2") xradiobutton("State", "type=3") xradiobutton("all types", "type=0") xmenu() xlabel ("(-1 means 0-1)") xpanel() xpanel("MenuExplore") xpvalue("x", &x, 0, "changex()") xpanel() b = new SectionBrowser() vbox.intercept(0) vbox.map() hbox.intercept(0) if (numarg() == 2) { hbox.map("Section Parameters (double click)", $1, $2, 1,1) }else{ hbox.map("Section Parameters (double click)") } hbox.save("") s.action("b.select()") b.select_action("s.select()") b.accept_action("make_menu()") } proc changex() { if (x < 0 || x > 1) { x = -1 } } proc make_menu() {local i, arc /* must be executed at the top level since it parses section names */ arc = x if (type > 0) { if (type > 1 && arc < 0) { arc = .5 } sprint(str, "nrnsecmenu(%g,%d)", arc, type) execute(str) }else{ for i=1,3 { arc = x if (i > 1 && arc < 0) { arc = .5} sprint(str, "nrnsecmenu(%g,%d)", arc, i) execute(str) } } } proc unmap() { hbox.unmap() } endtemplate MenuExplore /* ?0 User HocCode PointProcessLocator */ begintemplate PointProcessLocator public st, unmap objectvar s, b, pp, hbox, this strdef st, sec proc init() { pp = $o1 hbox = new VBox() hbox.intercept(1) s = new Shape() s.point_mark($o1, 3) b = new SectionBrowser() xpanel("") st = "mmmmmmmmmmmmmmmmmmm" xvarlabel(st) xpanel() nrnpointmenu(pp, 0) hbox.intercept(0) if (numarg() == 3) { hbox.map("Point Process Mover", $2, $3, 1, 1) }else{ hbox.map("Point Process Mover") } hbox.save("") s.action("move()") b.select_action("move()") b.accept_action("pan()") doEvents() hoc_ac_ = pp.get_loc() move() pop_section() } proc move() {local x s.select() b.select() x =hoc_ac_ pp.loc(x) sectionname(sec) sprint(st, "%s at %s(%g)", pp, sec, x) } proc pan() { /* nrnpointmenu(pp)*/ } proc unmap() { hbox.unmap() } endtemplate PointProcessLocator objectvar tempobj proc makeMenuExplore() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start a MenuExplore") return } tempobj = new MenuExplore() objectvar tempobj } begintemplate ShapeLocation public dialog, move objectvar s, pp, hbox, this strdef st, sec proc init() { pp = $o1 hbox = new VBox() hbox.intercept(1) xpanel("") st = "mmmmmmmmmmmmmmmmmmm" xvarlabel(st) xpanel() s = new Shape() s.point_mark($o1, 3) hbox.intercept(0) hbox.save("") s.action("move(hoc_ac_)") doEvents() hoc_ac_ = pp.get_loc() move(hoc_ac_) pop_section() } proc move() {local x s.select() x = $1 pp.loc(x) sectionname(sec) sprint(st, "%s(%g)",sec, x) } func dialog() { return hbox.dialog("Select a Section") } endtemplate ShapeLocation neuron-7.5/share/lib/hoc/showmech.hoc000077500000000000000000000042371323325274500176430ustar00rootroot00000000000000/* ?0 UserClasses ShowMechanism Show where a membrane mechanism exists on the cell and allow setting of parameters as constants whereever the mechanism exists. The currently displayed mechanism is named in the label at the top of the lower portion of the panel. The top part uses a Shape scene to color red all the sections that have insert'ed the mechanism. Colors black all the sections where the mechanism does not exist. When a valueeditor showing a parmameter is changed in the lower portion the value is used to set the corresponding range variable to a constant forall sections that contain the mechanism. ? MechType Menu for selecting the currently displayed mechanism. ?0 User HocCode ShowMechanism */ help ?0 begintemplate ShowMechanism public v1 objectvar deck, v1, mt, deck, mlist, mm, shape, sl strdef s proc init() { sl = $o1 item=1 build() if (numarg(2)) { if ($2 == 1) { v1.map("ShowMechanism") } } } proc build() { mt = new MechanismType(0) mt.action("change_mech()") deck = new Deck() mlist = new List() build_deck() build_box() mt.select(item) hoc_ac_=item change_mech() } proc build_deck() {local i deck.intercept(1) for i=0, mt.count() - 1 { mt.select(i) mt.selected(s) mm = new MechanismStandard(s) mm.action("change_prop()") mlist.append(mm) forsec sl if (ismembrane(s)) mm.in() // last one is the default mm.panel() } deck.intercept(0) } proc build_box() { v1 = new VBox() v1.save("") v1.intercept(1) shape = new Shape() xpanel("ShowMechanism", 1) mt.menu() // xbutton("Help", "help ShowMechanism UserClasses") xpanel() deck.map("") v1.intercept(0) } proc change_mech() { item = hoc_ac_ mt.select(item) item = mt.selected(s) deck.flip_to(item) shape.color_all(1) forsec sl if (ismembrane(s)) { shape.color(2) } } proc change_prop() { forsec sl if (ismembrane(s)) { mlist.object(item).out() } } endtemplate ShowMechanism objectvar showmech, showmechseclist proc makeshowmechanism() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start a ShowMechanism") return } showmechseclist = new SectionList() forall showmechseclist.append() showmech = new ShowMechanism(showmechseclist, 1) } neuron-7.5/share/lib/hoc/single.hoc000077500000000000000000000022331323325274500173010ustar00rootroot00000000000000{load_file("stdgui.hoc")} begintemplate SingleCompartment public vbox, inserter, vbox objref this, vbox, inserter strdef tstr proc init() { if (!name_declared("soma")) { execute("~create soma") }else{ sprint(tstr, "%s warning: soma already exists at top level.", this) continue_dialog(tstr) } execute("access soma") diam=10 L=10/PI // area 100 um2 means mA/cm2 identical to nA startbox() if (numarg() == 0) { inserter = new Inserter() endbox() vbox.map("SingleCompartment") } } proc startbox() { vbox = new VBox() vbox.priority(1000) vbox.save("save()") vbox.ref(this) vbox.intercept(1) } proc endbox() { vbox.intercept(0) } proc save() { vbox.save("load_file(\"single.hoc\")\n}") vbox.save("ocbox_ = new SingleCompartment(0)") vbox.save("ocbox_.inserter = new Inserter(0)") vbox.save("{object_push(ocbox_.inserter)}\n{") inserter.dsave(vbox) vbox.save("{object_push(ocbox_)}") vbox.save("{inserter.v1.map()}") vbox.save("{endbox()}") vbox.save("{object_pop() doNotify()}\n{") vbox.save("ocbox_ = ocbox_.vbox") } endtemplate SingleCompartment objref tobj proc makesinglecompartment() { tobj = new SingleCompartment() objref tobj } neuron-7.5/share/lib/hoc/single1.hoc000077500000000000000000000003321323325274500173600ustar00rootroot00000000000000load_file("pcchdir.hoc") // except for StartingDirectory, this should be safe no matter what is // subsequently loaded { hoc_obj_ = new StartingDirectory() hoc_obj_.load() objref hoc_obj_[2] load_file("single.hoc") }neuron-7.5/share/lib/hoc/singlech.hoc000077500000000000000000000123301323325274500176130ustar00rootroot00000000000000begintemplate SChanHist public hist, g, vbox, thist, nbin, tmax, meanstr, cond, tobj objref thist, g, vbox, time, this, tobj strdef meanstr proc init() { cond = 0 nbin = 20 tmax = 20 if (numarg() > 1) { cond = $1 nbin = $2 tmax = $3 } build() } proc build() { vbox = new VBox() vbox.save("") vbox.intercept(1) xpanel("") xpvalue("Conductance", &cond, 1, "g.erase") xpvalue("# Bins", &nbin, 1, "hist1()") xpvalue("Tmax", &tmax, 1, "hist1()") meanstr = "Mean = ????????????" xvarlabel(meanstr) xbutton("Erase", "g.erase") xpanel() g = new Graph() vbox.intercept(0) } proc hist() {local m time = $o1.ind($o2.c.indvwhere("==", cond)) hist1() } proc hist1() {local m2 m2 = tmax sprint(meanstr, "Mean = %g", time.mean) thist = time.histogram(0, m2, m2/nbin) thist.remove(0) thist.line(g, thist.c.indgen(m2/2/nbin, m2/nbin)) } proc save() { } endtemplate SChanHist begintemplate SingleChannel public sch, m, g, vbox, map objref sch, m, xpos, ypos, vbox, g, tobj, cvec, svec, tvec, hlist objref tman, sman, gman, this strdef tstr proc init() {local i ntran = 100 vv = -70 radius = 20 sch = $o1 m = new Matrix() sch.set_rates(v) sch.get_rates(m) xpos = new Vector(m.nrow) xpos.indgen(100) ypos = new Vector(m.nrow) cvec = new Vector(m.nrow) for i=0, m.nrow-1 cvec.x[i] = sch.cond(i) svec = new Vector() tvec = new Vector() tman = new Vector() sman = new Vector() gman = new Graph(0) hlist = new List() if (numarg() == 1) { build() draw() center() map() } } proc build() { vbox = new VBox() vbox.save("save()") vbox.ref(this) vbox.intercept(1) xpanel("Control") xpvalue("v (mV)", &vv, 1, "sch.set_rates(vv) sch.get_rates(m) draw()") xbutton("Conductances", "conductance_panel()") xpvalue("# Conductance transitions in run", &ntran, 1) xbutton("Run", "run()") xbutton("Conductance vs time Graph", "gman = new Graph()") xbutton("Conductance Histogram", "maphist(new SChanHist())") xpanel() g = new Graph(0) g.view(2) g.menu_tool("Arrange State Diagram", "arrange") vbox.intercept(0) } proc run() {local i tvec.resize(ntran) sch.cond_transitions(tvec, svec) manhattan(tvec, svec) for i=0, hlist.count-1 { hlist.object(i).hist(tvec, svec) } } proc manhattan() { gman.erase() tman.resample($o1.c.integral(),2) tman.rotate(1,0) sman.resample($o2,2) sman.line(gman, tman) } proc center() { tobj = new Vector(4) g.size(&tobj.x[0]) g.size(tobj.x[0], tobj.x[1], tobj.x[2], tobj.x[3]) draw() } proc maphist() { hlist.append($o1) sprint(tstr, "Histogram for %s", this) hlist.object(hlist.count-1).vbox.map(tstr) } proc draw() {local i, j g.xaxis(3) g.erase_all for i=0, m.nrow()-1 { circle(i) } for i=0, m.nrow()-1 { for j=0, m.ncol()-1 { if (m.x[i][j] > 0) { arrow(i, j) } } } if (numarg() > 0) return for i=0, m.nrow()-1 { sprint(tstr, "%g", i) g.label(xpos.x[i], ypos.x[i], tstr, 1, 1, .5, 0, 1) sprint(tstr, "%g", sch.cond(i)) g.label(xpos.x[i], ypos.x[i], tstr, 1, 1, .5, 1, 1) } g.flush() } proc circle() {local i, x, y g.beginline() for i=0, 20 { x = radius*sin(PI*i/10) y = radius*cos(PI*i/10) g.line(x+xpos.x[$1], y + ypos.x[$1]) } g.flush() } proc arrow() {local x, y, d, x1, y1, r, r2, x2, y2, ax, ay r = 3*radius/2 r2 = radius/4 x = xpos.x[$2] - xpos.x[$1] y = ypos.x[$2] - ypos.x[$1] d = sqrt(x*x + y*y) x /= d y /= d x1 = xpos.x[$1] + x*r - y*r2 y1 = ypos.x[$1] + y*r + x*r2 g.beginline() g.line(x1, y1) x2 = xpos.x[$2] - x*r - y*r2 y2 = ypos.x[$2] - y*r + x*r2 g.line(x2, y2) x2 += -y*r2 - 2*x*r2 y2 += x*r2 - 2*y*r2 g.line(x2, y2) g.flush() sprint(tstr, "1/%g", m.x[$1][$2]) if (x > 0) { if (y > 0) { ax = 1 ay = 0 }else{ ax = 0 ay = 0 } }else{ if (y >= 0) { ax = 1 ay = 1 }else{ ax = 0 ay = 1 } } g.label(x1, y1, tstr, 1, 1, ax, ay, 1) } proc arrange() {local i if ($1 == 2) { imove = -1 for i=0, m.nrow-1 { if ((($2-xpos.x[i])^2 + ($3-ypos.x[i])^2) < radius^2) { imove = i $1 = 1 break } } } if (imove == -1) return xpos.x[imove] = $2 ypos.x[imove] = $3 if ($1 == 1) { draw(0) } if ($1 == 3) { draw() imove = -1 } } proc conductance_panel() {local i xpanel("Conductance (integers)") for i=0, cvec.size-1 { sprint(tstr, "State %d", i) xpvalue(tstr, &cvec.x[i], 1, "set_cond()") } xpanel() } proc set_cond() {local i for i=0, cvec.size-1 { sch.cond(i, cvec.x[i]) } draw() } proc set_rate() { } proc map() { sprint(tstr, "%s", this) if (numarg() > 1) { vbox.map(tstr, $2, $3, $4, $5) }else{ vbox.map(tstr) } } proc save() {local i vbox.save("load_file(\"singlech.hoc\". \"SingleChannel\")}\n{") sprint(tstr, "ocbox_=new SingleChannel(%s, 0)", sch) vbox.save(tstr) vbox.save("}\n{object_push(ocbox_)}\n{") sprint(tstr, "vv=%g ntran=%d build() sch.set_rates(vv) sch.get_rates(m)",\ vv, ntran) vbox.save(tstr) for i=0, m.nrow-1 { sprint(tstr, "xpos.x[%d]=%g ypos.x[%d]=%g cvec.x[%d]=%g",\ i, xpos.x[i], i, ypos.x[i], i, cvec.x[i]) vbox.save(tstr) } for i=0, hlist.count-1 { tobj = hlist.object(i) sprint(tstr, "maphist(new SChanHist(%g, %g, %g))",\ tobj.cond, tobj.nbin, tobj.tmax) vbox.save(tstr) } objref tobj g.erase_all() vbox.save("set_cond()\n}\n{object_pop()}\n{") g.save_name("ocbox_.g", 1) draw() } endtemplate SingleChannel neuron-7.5/share/lib/hoc/stdgui.hoc000077500000000000000000000003361323325274500173210ustar00rootroot00000000000000{ load_file("stdlib.hoc") load_file("family.hoc") load_file("shapebox.hoc") load_file("pointbsr.hoc", "PointBrowser") load_file("wingroup.hoc") load_file("stdrun.hoc") load_file("inserter.hoc") load_file("pointman.hoc") } neuron-7.5/share/lib/hoc/stdlib.hoc000077500000000000000000000117061323325274500173060ustar00rootroot00000000000000strdef tstr //used by cell builder // currently accessed section, $1 == frequency // this is a misnomer since it returns the length in microns of 1 lambda func lambda_f() { local i, x1, x2, d1, d2, lam if (cm == 0) { return 1e10 } if (n3d() < 2) { return 1e5*sqrt(diam/(4*PI*$1*Ra*cm)) } // above was too inaccurate with large variation in 3d diameter // so now we use all 3-d points to calculate the actual length of // the section in units of lambda x1 = arc3d(0) d1 = diam3d(0) lam = 0 for i=1, n3d()-1 { if (d1 == 0) { sprint(tstr, "0 diameter for 3d point %d of %s.", i-1, secname()) execerror("lambda_f error:", tstr) } x2 = arc3d(i) d2 = diam3d(i) lam += (x2 - x1)/sqrt(d1 + d2) x1 = x2 d1 = d2 } // length of the section in units of lambda lam *= sqrt(2) * 1e-5*sqrt(4*PI*$1*Ra*cm) return L/lam } /* ?0 UserClasses String */ help ?0 begintemplate String public s strdef s proc init() { // the first space prevents this proc from being a context // in the help system if (numarg() == 1) { s = $s1 } } endtemplate String iterator case() { local i for i = 2, numarg() { $&1 = $i iterator_statement } } /* ?0 User Functions Clipboard */ proc clipboard_set() { hoc_obj_[1] = $o1.c hoc_obj_[0] = $o2.c } proc clipboard_get() { $o1 = hoc_obj_[1].c $o2 = hoc_obj_[0].c } objref hoc_sf_ hoc_sf_ = new StringFunctions() strdef tstr objref clipboard_file[2] proc clipboard_save() {local i if (!object_id(clipboard_file[0])) { clipboard_file = new File() clipboard_file.chooser("w", "Write clipboard vectors to file", "*.dat", "Save", "Cancel") } if (clipboard_file[0].chooser()) { if (clipboard_file[0].wopen()) { clipboard_file[0].printf("label:%s\n%d\n", hoc_obj_[0].label, hoc_obj_[0].size) for i=0, hoc_obj_[0].size-1 { clipboard_file[0].printf("%g\t%g\n", hoc_obj_[1].x[i], hoc_obj_[0].x[i]) } clipboard_file[0].close() }else{ continue_dialog("Clipboard Save failed") } } } proc clipboard_retrieve() {local i, size, bsize, b bsize = 200 for i=0, 1 { hoc_obj_[i] = new Vector(200) hoc_obj_[i].resize(1) } if (!object_id(clipboard_file[1])) { clipboard_file[1] = new File() clipboard_file[1].chooser("r", "Read clipboard vectors from file", "*.dat", "Read", "Cancel") } if (numarg() > 0) { b = clipboard_file[1].ropen($s1) }else{ if (clipboard_file[1].chooser()) { b = clipboard_file[1].ropen() }else{ return } } if (b) { // first line may be label:str or single number // otherwise start the data immediately clipboard_file[1].gets(tstr) if (hoc_sf_.substr(tstr, "label") != -1) { if (sscanf(tstr, "label:%s\n", tstr) == 1) { hoc_obj_[0].label(tstr) } clipboard_file[1].gets(tstr) } i = sscanf(tstr, "%g %g", &hoc_obj_[1].x[0], &hoc_obj_[0].x[0]) j = 1 if (i == 1) { size = hoc_obj_[1].x[0] for i=0, 1 { hoc_obj_[i].buffer_size(size) hoc_obj_[i].resize(0) } j = 0 }else{ size = 1e20 } while(!clipboard_file[1].eof()) { if (j >= bsize) { bsize *= 2 for i=0, 1 {hoc_obj_[i].buffer_size(bsize)} } for i=0,1 { hoc_obj_[1-i].append(clipboard_file[1].scanvar()) } j += 1 if (j > size) { break } } clipboard_file[1].close() }else{ continue_dialog("Clipboard Retrieve failed") } } func valid_name_syntax() { localobj str str = new String() if (hoc_sf_.len($s1) == 0 || hoc_sf_.head($s1, "[^A-Za-z0-9_]", str.s) > -1) { if ($2 == 1) { continue_dialog("Valid names begin with an alpha character and contain only A-Za-z0-9_") } return 0 } return 1 } begintemplate ExecCommand public b objref b, this strdef cmd, tstr proc init() { cmd = "for case(&) {run()}" if (numarg() > 0) { cmd = $s1 } b = new VBox() b.ref(this) b.save("save()") b.intercept(1) xpanel("", 1) xbutton("Exec", "execute(cmd)") xvarlabel(cmd) xmenu("Modify") xbutton("Modify", "change()") xbutton("Clone", "clone()") xmenu() xpanel() b.intercept(0) sprint(tstr, "%s", this) if (numarg() < 2) { b.map(tstr) } if (numarg() == 0) { change() } } proc change() { string_dialog("New Command ", cmd) } proc clone() { sprint(tstr, "newcommand(\"%s\")", cmd) execute(tstr) } proc save() { sprint(tstr, "ocbox_=new ExecCommand(\"%s\", 1)", cmd) b.save(tstr) b.save("ocbox_=ocbox_.b") } endtemplate ExecCommand proc newcommand() { if (numarg() == 1) { hoc_obj_[1] = new ExecCommand($s1) }else{ hoc_obj_[1] = new ExecCommand() } hoc_obj_[1] = hoc_obj_[0] } {itmp = 0} func object_index() { return object_id($o1, 1) } proc classname() { sprint(tstr, "%s", $o1) sscanf(tstr, "%[^[]", $s2) // printf("classname |%s|%s|\n", tstr, $s2) } proc graph_menu_remove_most() { $o1.menu_remove("Plot what?") $o1.menu_remove("Pick Vector") $o1.menu_remove("Color/Brush") $o1.menu_remove("Keep Lines") $o1.menu_remove("Family Label?") $o1.menu_remove("Erase") $o1.menu_remove("Move Text") $o1.menu_remove("Change Text") $o1.menu_remove("Delete") } neuron-7.5/share/lib/hoc/stdrun.hoc000066400000000000000000000447011323325274500173420ustar00rootroot00000000000000objref cvode cvode = new CVode() {load_file("stdlib.hoc", "String")} begintemplate NEURONMainMenu // avoid some namespace pollution public filemenu, miscellaneous_add, misclist objref rwl_, rwf_, sf_, tobj objref ldfile, misclist strdef tstr, rwdname proc init() { sf_ = new StringFunctions() if (unix_mac_pc() == 1 || unix_mac_pc() == 4) { rwdname = "$(HOME)/.NRNWorkingDirs" }else{ rwdname = "$(NEURONHOME)/RecentWorkingDirs" } misclist = new List() if (ropen("RCS/nrnversion,v")) { ropen() miscellaneous_add("Archive and Hardcopy", "prjnrn()") } } proc miscellaneous_add() { misclist.append(new String($s1)) misclist.append(new String($s2)) } proc filemenu() { xmenu("File") xbutton("load session", "load(\"*.ses\", 1)") xbutton("load hoc", "load(\"*.hoc\", 0)") if (unix_mac_pc() != 1) { xbutton("load dll", "load(\"*.dll\", 2)") } xbutton("save session", "save_ses_nrnmainmenu()") xbutton("working dir", "change_working_dir()") if (unix_mac_pc() != 0) { xmenu("recent dir", "recent_working_dirs()") } xbutton("Print", "print_session(0)") xbutton("Quit", "quit()") xmenu() } proc load() { if (object_id(ldfile) == 0) { ldfile = new File() } ldfile.chooser("r", "Load", $s1, "Load", "Cancel", getcwd()) if (ldfile.chooser()) { if ($2 == 2) { nrn_load_dll(ldfile.getname) }else{ load_file($2, ldfile.getname) } } } proc change_working_dir() { if (object_id(ldfile) == 0) { ldfile = new File() } ldfile.chooser("d", "Directory", "", "Move To", "Cancel", getcwd()) if (ldfile.chooser()) { read_recent_working_dirs() change_working_dir1(ldfile.dir) } } func change_working_dir1() { if(chdir($s1) != 0) { sprint(tstr, "No such directory: %s", $s1) continue_dialog(tstr) return 0 } print "Changed working directory to ", $s1 ldfile = new File() write_recent_working_dirs() if (!default_dll_loaded_) { if (unix_mac_pc() == 2) { if(nrn_load_dll("nrnmac.dll") != 0){ default_dll_loaded_ = 1 } } if (unix_mac_pc() == 3) { if (nrn_load_dll("nrnmech.dll") != 0) { default_dll_loaded_ = 1 } } } return 1 } proc change_working_dir2() { tobj = rwl_.object($1) rwl_.remove($1) if (change_working_dir1(tobj.s) == 0) { while (string_dialog("Working Directory", tobj.s)) { if (change_working_dir1(tobj.s) == 1) { break } } } } proc read_recent_working_dirs() {local i rwf_ = new File() rwl_ = new List() if (rwf_.ropen(rwdname)) { while (!rwf_.eof()) { rwf_.gets(tstr) sf_.left(tstr, sf_.len(tstr) - 1) tobj = new String(tstr) rwl_.append(tobj) } rwf_.close() } } proc write_recent_working_dirs() {local i rwf_ = new File() tstr = getcwd() if (rwf_.wopen(rwdname)) { rwf_.printf("%s\n", tstr) for i=0, rwl_.count-1 { if (strcmp(rwl_.object(i).s, tstr) != 0) { rwf_.printf("%s\n", rwl_.object(i).s) } if (i > 10) break } rwf_.close() } } proc recent_working_dirs() {local i read_recent_working_dirs() for i=0, rwl_.count-1 { sprint(tstr, "change_working_dir2(%d)", i) xbutton(rwl_.object(i).s, tstr) } } proc save_ses_nrnmainmenu() { if (object_id(ldfile) == 0) { ldfile = new File() } ldfile.chooser("w", "Save Session", "*.ses", "Save", "Cancel", ldfile.dir) if (ldfile.chooser()) { ldfile.close() sprint(tstr, "save_session(\"%s\",\"{load_file(\\\"nrngui.hoc\\\")}\")", ldfile.getname) execute(tstr) } } endtemplate NEURONMainMenu using_cvode_ = 0 // now controlled in NumericalMethodPanel {load_file("atoltool.hoc")} {load_file("varmeth1.hoc")} {load_file("movierun.hoc")} objref tobj, tobj1, nrnmainmenu_, numericalmethodpanel, pyobj stdrun_quiet = 0 realtime=0 {units(&realtime, "s")} screen_update_invl = .05 {variable_domain(&screen_update_invl, .01, 1e9) units(&screen_update_invl, "s")} tstop = 5 {variable_domain(&tstop, 0, 1e9) units(&tstop, "ms")} stoprun = 0 steps_per_ms = 1/.025 {variable_domain(&steps_per_ms, 1e-6, 1e6)} nstep_steprun=1 runStopAt = tstop {variable_domain(&runStopAt, 0, 1e9) units(&runStopAt, "ms")} runStopIn = 1 {variable_domain(&runStopIn, 0, 1e6) units(&runStopIn, "ms")} global_ra = 35.4 {variable_domain(&global_ra, 1e-3, 1e6) units(&global_ra, "ohm-cm")} strdef temp_string_, temp_string2_ temp_string_ = "t" proc prjnrn() { // Project management. save_session("start.ses") print_session(1, "prjnrnpr") } /* stylized control processes for nrncontrolmenu() */ {load_file("pointbsr.hoc", "PointBrowser")} strdef tstr {load_file("wingroup.hoc", "WindowMenu")} if (name_declared("mapped_nrnmainmenu_") == 0) { mapped_nrnmainmenu_ = 0 } proc nrnmainmenu() { if (mapped_nrnmainmenu_ == 1) { return } nrnmainmenu_ = new NEURONMainMenu() mapped_nrnmainmenu_ = 1 xpanel("NEURON Main Menu") nrnmainmenu_.filemenu() buildmenu() toolmenu() graphmenu() vectormenu() windowmenu() helpmenu() xpanel(0,25) if (object_id(WindowMenu[0].pwm) == 0) { // some sessions need a PWManager which used not to // exist until the Window menu was used WindowMenu[0].pwm = new PWManager() } // also many idioms assume there is no PWManager window at this point //so close it. if (PWManager[0].manager < PWManager[0].count) { PWManager[0].close(PWManager[0].manager) } } proc helpmenu() { if (nrnpython("import webbrowser")) { xmenu("Help", 1) xbutton("Programmer's Reference", "nrnpython(\"webbrowser.open('https://neuron.yale.edu/neuron/static/new_doc/index.html')\")") xbutton("Tutorials", "nrnpython(\"webbrowser.open('http://neuron.yale.edu/neuron/docs')\")") xbutton("NEURON Forum", "nrnpython(\"webbrowser.open('https://neuron.yale.edu/phpBB/')\")") xbutton("NEURON Models on ModelDB", "nrnpython(\"webbrowser.open('http://senselab.med.yale.edu/ModelDB/ModelList.cshtml?id=1882')\")") xmenu() } } proc buildmenu() {local has_rxd has_rxd = 0 if (nrnpython("import neuron")) { pyobj = new PythonObject() has_rxd = pyobj.neuron._has_scipy() } xmenu("Build", 1) xbutton("single compartment", "load_file(\"single.hoc\") makesinglecompartment()") xbutton("Cell Builder", "load_file(\"celbild.hoc\") makecellbuilder()") xmenu("NetWork Cell") xbutton("From Cell Builder", "load_file(\"netbild.hoc\") makenetreadycell()") xbutton("Artificial Cell", "load_file(\"netbild.hoc\") makeartcelltype()") xmenu() xbutton("NetWork Builder", "load_file(\"netbild.hoc\") makenetbuilder()") xbutton("Linear Circuit", "load_file(\"lincir.hoc\") makeCircuit()") // xbutton("Channels", "channel_builder()") xmenu("Channel Builder") xbutton("Density", "load_file(\"chanbild.hoc\", \"ChannelBuild\") chanbild(1)") xbutton("Point", "load_file(\"chanbild.hoc\", \"ChannelBuild\") chanbild(0)") xmenu("import KSChan", "cbimportmenu()") xmenu() if (has_rxd) { xbutton("RxD Builder", "nrnpython(\"import neuron.rxd.gui\") nrnpython(\"neuron.rxd.gui.RxDBuilder()\")") } xmenu() } proc cbimportmenu() {local i, j load_file("chanbild.hoc") tobj = new List("KSChan") tobj1 = new List("ChannelBuild") for i=0, tobj1.count-1 { j = tobj.index(tobj1.object(i).ks) if (j != -1) { tobj.remove(j) } } for i=0, tobj.count - 1 { sprint(tstr, "chanbild(%s)", tobj.object(i)) xbutton(tobj.object(i).name, tstr) } if (tobj.count == 0) { xbutton("No uncontrolled KSChan", "") } objref tobj, tobj1 } running_ = 0 proc toolmenu() { xmenu("Tools", 1) xbutton("RunControl", "nrncontrolmenu()") // xbutton("RunButton", "xpanel(\"Run\") xbutton(\"Init & Run\", \"run()\") xpanel()") xbutton("RunButton", "xpanel(\"Run\") xcheckbox(\"Init & Run\", &running_,\"runbutton()\") xpanel()") xbutton("VariableStepControl", "numericalmethodpanel.map()") xbutton("Parallel Computing", "load_file(\"parcom.hoc\", \"ParallelComputeTool\") execute(\"ParallelComputeTool[0].map()\")") pointprocessesmenu() distmechmenu() fittingmenu() impedancemenu() xbutton("Model View", "load_file(\"mview.hoc\", \"ModelView\") execute(\"mview()\")") xbutton("Movie Run", "load_file(\"movierun.hoc\") movierunpanel()") xmenu("Miscellaneous", "miscellaneousmenu()", 1) xmenu() } proc vectormenu() { xmenu("Vector", 1) xbutton("Save to File", "load_file(\"stdlib.hoc\",\"clipboard_save\") clipboard_save()") xbutton("Retrieve from File", "load_file(\"stdlib.hoc\",\"clipboard_retrieve\") clipboard_retrieve()") xbutton("Gather Values", "load_file(\"gatherv.hoc\") makeGatherVec()") xbutton("Play", "load_file(\"vplay.hoc\") makeVectorPlay()") xbutton("Display", "load_file(\"vecwrap.hoc\") makeVecWrap()") xbutton("Draw", "load_file(\"mkcurve.hoc\") makeMakeCurve()") xmenu() } proc windowmenu() { tobj = new WindowMenu() sprint(tstr, "%s.make()", tobj) xmenu("Window", tstr, 1) objref tobj } proc graphmenu() { xmenu("Graph", 1) xbutton("Voltage axis", "newPlotV()") xbutton("Current axis", "newPlotI()") xbutton("State axis", "newPlotS()") xbutton("Shape plot", "newshapeplot()") xbutton("Vector movie", "newvectorplot()") xbutton("Phase Plane", "newphaseplane()") xbutton("Grapher", "load_file(\"grapher.hoc\") makegrapher(1)") xmenu() } proc pointprocessesmenu() { xmenu("Point Processes") xmenu("Managers") xbutton("Point Manager", "load_file(\"pointman.hoc\") makeppm()") xbutton("Point Group", "load_file(\"pointgrp.hoc\") makeppgm()") xbutton("Electrode", "load_file(\"electrod.hoc\") makeelectrode()") xmenu() xmenu("Viewers", "pointmenu()") xmenu() } proc distmechmenu() { xmenu("Distributed Mechanisms") xmenu("Managers") xbutton("Inserter", "load_file(\"inserter.hoc\", \"Inserter\") makeinserter()") xbutton("Homogeneous Spec", "load_file(\"showmech.hoc\") makeshowmechanism()") xmenu() xmenu("Viewers", "distmechviewers()") xbutton("celsius", "celsius_panel()") xbutton("globalRa", "globalra_panel()") xmenu() } proc distmechviewers() { xbutton("Shape Name", "load_file(\"shapebox.hoc\", \"MenuExplore\") makeMenuExplore()") xbutton("Name Values", "nrnallsectionmenu()") nrnglobalmechmenu() } proc celsius_panel() { xpanel("Temperature") xpvalue("celsius", &celsius, 1) xpanel() } proc globalra_panel() { xpanel("forall Ra=global_ra") xvalue("global Ra", "global_ra", 1, "set_ra()", 1, 1) xpanel() } proc fittingmenu() { xmenu("Fitting") xbutton("Parameterized Function", "load_file(\"funfit.hoc\") makefitter()") xbutton("Run Fitter", "load_file(\"runfit.hoc\") makerunfitter()") xbutton("Multiple Run Fitter", "load_file(\"mulfit.hoc\") makemulrunfitter()") xmenu() } proc impedancemenu() { xmenu("Impedance") xbutton("Frequency", "load_file(\"impratio.hoc\") makeImpRatio()") xbutton("Path", "load_file(\"impedanx.hoc\") makeImpx()") xbutton("log(A) vs x", "load_file(\"logax.hoc\") makelogax()") xbutton("Shape", "load_file(\"attshape.hoc\") makeImpShape()") xmenu() } proc miscellaneousmenu() {local i xbutton("Import 3D", "load_file(\"import3d.hoc\") makeimport3dtool()") xmenu("Family") xbutton("Family", "load_file(\"family.hoc\",\"Family\") makeFamily()") xbutton("Command", "load_file(\"stdlib.hoc\",\"ExecCommand\") newcommand()") xmenu() xmenu("Builders") xbutton("Kinetic Scheme Builder", "load_file(\"kinbuild.hoc\") makekineticbuilder()") xmenu() for (i=0; i < nrnmainmenu_.misclist.count; i += 2) { xbutton(nrnmainmenu_.misclist.object(i).s, nrnmainmenu_.misclist.object(i+1).s) } } v_init = -65 {units(&v_init, "mV")} numericalmethodpanel = new NumericalMethodPanel() func cvode_active() { if (numarg() == 1) { numericalmethodpanel.varstep($1) } return cvode.active() } func cvode_local() { if (numarg() == 1) { numericalmethodpanel.localstep($1) } return cvode.use_local_dt() } proc nrncontrolmenu() { xpanel("RunControl") xpvalue("Init", &v_init, 1, "stdinit()", 1) xbutton("Init & Run", "run()") xbutton("Stop", "stoprun=1") xvalue("Continue til", "runStopAt", 1, "{continuerun(runStopAt) stoprun=1}", 1, 1) xvalue("Continue for", "runStopIn", 1, "{continuerun(t + runStopIn) stoprun=1}", 1,1) xbutton("Single Step", "steprun()") xvalue("t", "t", 2) xvalue("Tstop", "tstop", 1, "tstop_changed()", 0, 1) xpvalue("dt", &dt, 1, "setdt()") xvalue("Points plotted/ms", "steps_per_ms", 1, "setdt()", 0, 1) xpvalue("Scrn update invl", &screen_update_invl, 1) // xcheckbox("Quiet", &stdrun_quiet) xpvalue("Real Time", &realtime) xpanel() } func set_v_init() {local old old = v_init if (numarg(1)) { v_init = $1 } return old } proc stdinit() { cvode_simgraph() realtime = 0 setdt() init() initPlot() } proc init() { finitialize(v_init) // fcurrent() // no longer necessary. finitialize now // initializes all conductances and currents as well as states. // Extra initialization should normally go here. // If you change any states or parameters after an finitialize // then you should complete the initialization with /* if (cvode.active()) { cvode.re_init() }else{ fcurrent() } frecord_init() */ } n_graph_lists = 4 objectvar graphList[n_graph_lists], graphItem, flush_list, fast_flush_list for i=0,n_graph_lists-1 graphList[i] = new List(1) flush_list = new List(1) fast_flush_list = new List(1) proc set_ra() {/* this alleviates the backward compatibility problems */ if (numarg() == 1) { global_ra = $1 } forall Ra = global_ra } proc runbutton() { if (running_ == 0) { stoprun = 1 return } execute1("run()") running_ = 0 stoprun = 0 } proc run() { running_ = 1 stdinit() continuerun(tstop) } func stoppedrun() { return stoprun } proc setdt() {local Dt, dtnew if (using_cvode_) return Dt = 1/steps_per_ms nstep_steprun = int(Dt/dt) if (nstep_steprun == 0) { nstep_steprun = 1 } dtnew = Dt/nstep_steprun if (abs(dt*nstep_steprun*steps_per_ms - 1) > 1e-6) { print "Changed dt" dt = dtnew } } eventslow=1 eventcount=0 proc continuerun() {local rt, rtstart, ts realtime = 0 rt = screen_update_invl rtstart = startsw() eventcount=0 eventslow=1 stoprun = 0 if (using_cvode_) { cvode.event($1) ts = $1 if (cvode.use_local_dt) { cvode.solve(ts) flushPlot() realtime = startsw() - rtstart return } }else{ ts = $1 - dt/2 } while(t < ts && stoprun == 0) { step() realtime = startsw() - rtstart if (realtime >= rt) { // if (!stdrun_quiet) fastflushPlot() screen_update() //really compute for at least screen_update_invl realtime = startsw() - rtstart rt = realtime + screen_update_invl } } if (using_cvode_ && stoprun == 0) { // handle the "tstop" event step() // so all recordings take place at tstop } flushPlot() realtime = startsw() - rtstart } proc steprun() { step() flushPlot() } proc step() {local i if (using_cvode_) { advance() }else for i=1,nstep_steprun { advance() } Plot() } proc advance() { fadvance() } proc cvode_simgraph() {local i, j cvode.simgraph_remove() if (cvode.active && cvode.use_local_dt) { for j=0,n_graph_lists-1 { for i=0,graphList[j].count-1 graphList[j].object(i).simgraph() } } } proc initPlot(){local i, j, cnt if (cvode.active && cvode.use_local_dt) { flushPlot() return } for j=0,n_graph_lists-1 { cnt = graphList[j].count() - 1 for (i=cnt; i >= 0; i=i-1) if (graphList[j].object(i).view_count() == 0){ graphList[j].remove(i) cnt = cnt - 1 } for i=0,cnt graphList[j].object(i).begin() } cnt = flush_list.count() -1 for (i=cnt; i >= 0; i=i-1) if (flush_list.object(i).view_count() == 0){ flush_list.remove(i) } cnt = fast_flush_list.count() -1 for (i=cnt; i >= 0; i=i-1) if (fast_flush_list.object(i).view_count() == 0){ fast_flush_list.remove(i) } Plot() flushPlot() } proc tstop_changed() {local i, j, cnt for j=0,2 { cnt = graphList[j].count() - 1 for i=0,cnt { graphItem = graphList[j].object(i) graphItem.size(0, tstop, graphItem.size(3), \ graphItem.size(4)) } } } proc Plot() {local i, j, cnt, dt2 if (using_cvode_) { dt2=0 }else{ dt2 = dt/2 } cnt = graphList[0].count() - 1 for i=0,cnt graphList[0].object(i).plot(t) cnt = graphList[1].count() - 1 for i=0,cnt graphList[1].object(i).plot(t - dt2) cnt = graphList[2].count() - 1 for i=0,cnt graphList[2].object(i).plot(t + dt2) cnt = graphList[3].count() - 1 for i=0,cnt graphList[3].object(i).plot(t) } proc screen_update() {local i if (!stdrun_quiet) { cnt = flush_list.count() - 1 for i=0,cnt flush_list.object(i).begin() for i=0,cnt flush_list.object(i).flush() cnt = fast_flush_list.count() - 1 for i=0,cnt fast_flush_list.object(i).fastflush() fastflushPlot() doNotify() } } proc flushPlot() {local i, j, cnt screen_update() for j=0,n_graph_lists-1 { cnt = graphList[j].count() - 1 for i=0,cnt graphList[j].object(i).flush() } cnt = flush_list.count() - 1 if (cnt >= 0) { for i=0,cnt flush_list.object(i).flush() } cnt = fast_flush_list.count() - 1 if (cnt >= 0) { for i=0,cnt fast_flush_list.object(i).flush() } if (!stdrun_quiet) { doEvents() } } proc fastflushPlot() {local i, j, cnt for j=0,n_graph_lists-1 { cnt = graphList[j].count() - 1 for i=0,cnt graphList[j].object(i).fastflush() } // doEvents() } proc newPlotV() { newPlot(0,tstop,-80,40) graphItem.save_name("graphList[0].") graphList[0].append(graphItem) graphItem.addexpr("v(.5)") } proc newPlotI() { newPlot(0,tstop,-1,1) graphItem.save_name("graphList[1].") graphList[1].append(graphItem) } proc newPlotS() { newPlot(0,tstop,0,1) graphItem.save_name("graphList[2].") graphList[2].append(graphItem) } proc newPlot() {local w, h graphItem = new Graph() graphItem.size($1,$2,$3,$4) graphItem.xaxis() // view axis for x and y /* w = $2 - $1 h = $4 - $3 graphItem.size($1- w/10, $2+w/10, $3-h/10, $4+h/10) */ } proc addplot() { $o1.size(0,tstop,-1,1) graphList[$2].append($o1) } proc newshapeplot() { if(!execute1("v", 0)) { continue_dialog("No accessed section: Can't start a PlotShape") return } graphItem = new PlotShape() fast_flush_list.append(graphItem) graphItem.save_name("fast_flush_list.") } proc newvectorplot() { graphItem = new Graph() flush_list.append(graphItem) graphItem.save_name("flush_list.") } proc newphaseplane() { graphItem = new Graph() string_dialog("x axis expression", temp_string_) graphItem.xexpr(temp_string_) sprint(temp_string_, "x-axis: %s", temp_string_) graphItem.label(.5, .9, temp_string_) graphItem.save_name("graphList[3].") graphList[3].append(graphItem) temp_string_ = "t" } proc channel_builder() { if (name_declared("nrnccmb_Channels") == 0) { print "Loading Robert Cannon's Catacomb channel builder. This may take a minute." } if (load_java("nrnccmb.Channels")) { tobj = new List("nrnccmb_Channels") if (tobj.count == 0) { execute("tobj = new nrnccmb_Channels()") }else{ tobj = tobj.object(0) } tobj.map() objref tobj }else{ continue_dialog("The Catacomb simulator (ccmb.jar) is not in the CLASSPATH.") } } neuron-7.5/share/lib/hoc/subiter.hoc000077500000000000000000000067701323325274500175070ustar00rootroot00000000000000begintemplate SubsetDomainIterator public sl, x, p, p0, p1, loop, update objref sl, map, this, tobj proc init() { nsc = 0 sl = $o1 x = 0 p = 0 p0 = p1 = 0 map = new Vector() // distance_from_root, distance_from_origin // radial_from_origin, project_onto_line // position_from_line // only implemented for 0 path_style_ = $2 if (path_style_ == 1 || path_style_ > 3) { printf("path_style_ %d not implemented\n", path_style_) execerror("this path_style not implemented", "") } // no origin translation, 0 at most proximal end, // 0 at proximal disjoint ends // only implemented for 0 and 1 proximal_style_ = $3 if (proximal_style_ == 2) { printf("proximal_style_ %d not implemented\n", proximal_style_) execerror("this path_style not implemented", "") } // no distal end normalization, 1 at most distal end, // 1 at distal ends (longer path has uniform metric across branch point) // only implemented for 0 and 1 distal_style_ = $4 if (distal_style_ == 2) { printf("distal_style_ %d not implemented\n", distal_style_) execerror("this path_style not implemented", "") } if (path_style_ == 2) { xo_ = $5 yo_ = $6 zo_ = $7 } if (path_style_ == 3) { origin_ = $5 theta_ = $6 } } iterator loop() {local i, usearg update() if (numarg() == 2) { usearg = 1 } else { usearg = 0 } i = 0 forsec sl for (x, 0) { p = map.x[i] i += 1 if (usearg) { $&1 = x $&2 = p } iterator_statement } } // everything following is map specific proc update() {local i if (nsc == nrn_shape_changed_) { return } // printf("updating map for %s nsc=%d nrn_shape_changed_=%d\n", this, nsc, nrn_shape_changed_) nsc = nrn_shape_changed_ i = 0 forsec sl for (x, 0) { i += 1 } map.resize(i) if (path_style_ == 0) { // path distance from root ps0() }else if (path_style_ == 2) { ps2() }else if (path_style_ == 3) { ps3() } if (proximal_style_ == 1) { map.sub(p0) p1 -= p0 p0 = 0 } if (distal_style_ == 1) { map.div(p1) p0 /= p1 p1 = 1 } } // path distance from root // assume sectionlist is a subset of a single cell proc ps0() {local i, x, d i = 0 p0 = 1e9 p1 = 1 forsec sl for (x, 1) { if (i == 0) { tobj = new SectionRef() tobj.root { distance() } objref tobj } d = distance(x) if (x > 0 && x < 1) { map.x[i] = d i += 1 } if (d < p0) { p0 = d } if (d > p1) { p1 = d } } } // radial distance from origin proc ps2() {local i, a, x, y, z, d i = 0 p0 = 1e9 p1 = 1 forsec sl { i3 = 1 for (a, 1) { seg_from_3d(a) d = sqrt((x3 - xo_)^2 + (y3 - yo_)^2 + (z3 - zo_)^2) if (a > 0 && a < 1) { map.x[i] = d i += 1 } if (d < p0) { p0 = d } if (d > p1) { p1 = d } } } } // projection onto line at angle theta with 0 defined at origin proc ps3() {local i, a, c, s, d c = cos(theta_/DEG) s = sin(theta_/DEG) i = 0 p0 = 1e9 p1 = 1 forsec sl { i3 = 1 for (a, 1) { seg_from_3d(a) d = x3*c + y3*s if (a > 0 && a < 1) { map.x[i] = d i += 1 } if (d < p0) { p0 = d } if (d > p1) { p1 = d } } } map.sub(origin_) p0 -= origin_ p1 -= origin_ } proc seg_from_3d() {local th, a, i if ($1 == 0) { i = 0 a = arc3d(i) x3 = x3d(i) y3 = y3d(i) z3 = z3d(i) }else if ($1 == 1) { i = n3d()-1 a = arc3d(i) x3 = x3d(i) y3 = y3d(i) z3 = z3d(i) }else{ $1 *= L while($1 > arc3d(i3)) { i3 += 1 } i = i3 - 1 a = arc3d(i) th = ($1 - a)/(arc3d(i3) - a) x3 = (1 - th)*x3d(i) + th*x3d(i3) y3 = (1 - th)*y3d(i) + th*y3d(i3) z3 = (1 - th)*z3d(i) + th*z3d(i3) } } endtemplate SubsetDomainIterator neuron-7.5/share/lib/hoc/thresh.hoc000077500000000000000000000021161323325274500173150ustar00rootroot00000000000000// Determine strength of argument to within epsilon, that excites cell. // This function requires an existing APCount[0] at the user desired location // returns 1 if the voltage passed the APCount[0].thresh func thresh_excited() { run() return APCount[0].n > 0 } // do a binary search for threshold func threshold() { local low, high, epsilon // the "call by reference" arg $&1 is the independent variable // bounding the threshold first can save several iterations low = 0 high = 1e5 if ($&1 == 0) { $&1 = 1 } while (low == 0 || high == 1e5) { if (thresh_excited()) { high = $&1 $&1 = high/2 } else { low = $&1 $&1 = 2*low } if (stoprun) return $&1 if (low > high) return high } // at this point high is not more than twice the theshold and // low is not less than half the threshold epsilon = 1e-7 + 1e-3 * high // three decimal places accuracy /* now narrow the bounds */ $&1 = (high + low)/2 while ( (high - low) > epsilon) { if (thresh_excited()) { high = $&1 } else { low = $&1 } $&1 = (high + low)/2 if (stoprun) break } return $&1 } neuron-7.5/share/lib/hoc/varmeth1.hoc000077500000000000000000000147771323325274500175670ustar00rootroot00000000000000using_cvode_ = 0 begintemplate NumericalMethodPanel public dae, ode, fixed, atoltool_, atoltool, refresh, rescale, restore public details, save, map, b1, varstep, localstep, prdetails public varstep, localstep // for backward compatibility with cvode_active and cvode_local external using_cvode_ objref b, b1, this, cvode, atoltool_ strdef smodel, smeth, smx, tstr proc init() { dtsav = dt if (dtsav < 1e-6) { dtsav = 0.025 } saved = 0 cvode = CVode[0] atol_ = cvode.atol() variable_domain(&atol_, 1e-15, 1000) b1 = this refresh() } proc dae() { isdaspk_ = $1 isdaspk() } proc ode() { varstep(1) } proc fixed() { varstep(0) } proc varstep() { refresh() isvar_ = $1 isvar() } proc localstep() { if ($1 == 1) { islocal_ = 1 islocal() }else{ isvar_=0 isvar() } } proc details() { b = new VBox() b.save("") b.ref(this) b.intercept(1) xpanel("") xbutton("Refresh", "refresh()") xvarlabel(smodel) xlabel("ODE model allows any method") xlabel("DAE model allows implicit fixed step or daspk") xcheckbox("Implicit Fixed Step", &isfixed_, "isfixed()") xcheckbox("C-N Fixed Step", &iscn_, "iscn()") xcheckbox("Cvode", &iscvode_, "iscvode()") xcheckbox("Daspk", &isdaspk_, "isdaspk()") xcheckbox("Local step", &islocal_, "islocal()") xlabel("DAE and daspk require sparse solver, cvode requires tree solver") xcheckbox("Mx=b tree solver", &istree_, "istree()") xcheckbox("Mx=b sparse solver", &issparse_, "issparse()") xlabel("") xcheckbox("2nd order threshold (for variable step)", &isco2_, "isco2()") xpanel() b.intercept(0) b.map("Numerical Method Selection") } proc map() { // unusual logic because we don't want this to be the first window if (b1 == this) { buildsmall() refresh() } b1.unmap() doNotify() if (numarg() == 5) { b1.map("VariableTimeStep", $2, $3, $4, $5) }else{ b1.map("VariableTimeStep") } } proc buildsmall() { b1 = new VBox() b1.save("save()") b1.ref(this) b1.intercept(1) xpanel("") xcheckbox("Use variable dt", &isvar_, "varstep(isvar_)") xpvalue("Absolute Tolerance", &atol_, 1, "CVode[0].atol(atol_)") xpanel() xpanel("",1) xbutton("Atol Scale Tool", "atoltool()") xbutton("Details", "details()") xpanel() b1.intercept(0) } proc atoltool1() { if (object_id(atoltool_) == 0) { atoltool_ = new AtolTool() } if (!CVode[0].active) { varstep(1) } } proc atoltool() { atoltool1() atoltool_.activate(1) execute("init()") atoltool_.analyse() atoltool_.map() } proc rescale() { atoltool1() atoltool_.anrun() atoltool_.rescale() atoltool_.refresh() } func refresh() {local x x = cvode.current_method() refresh1(x) return x } proc prdetails() {local model, gauss, method, lstep model = $1%10 gauss = int($1/10)%10 method = int($1/100)%10 lstep = int($1/1000)%10 if (numarg() == 2) { printf("%s: ", $s2) } if (model == 0) { printf("no model, ") }else if (model == 1) { printf("ODE type, ") }else{ printf("DAE type, ") } if (method == 0) { printf("1st order fixed step, ") }else if (method == 1) { printf("2nd order fixed step (1st order currents), ") }else if (method == 2) { printf("2nd order fixed step and currents, ") }else if (method == 3) { printf("CVODES, ") }else if (method == 4) { printf("IDA, ") } if (lstep == 0) { printf("global step, ") }else{ printf("local step, ") } if (gauss == 0) { printf("tree matrix solver\n") }else{ printf("general sparse matrix solver\n") } } proc refresh1() {local x x = $1 isco2_ = cvode.condition_order() - 1 atol_ = cvode.atol() model = x%10 gauss = int(x/10)%10 method = int(x/100)%10 lstep = int(x/1000)%10 // printf("model=%d gauss=%d method=%d local=%d\n", model, gauss, method, lstep) if (model == 0) { sprint(smodel, "current model type: <*no model*> ") }else if (model == 1) { sprint(smodel, "current model type: <*ODE*> DAE ") }else{ sprint(smodel, "current model type: ODE <*DAE*>") } iscn_ = (method == 2) if (model == 2 && iscn_ == 1) { secondorder = 0 iscn_ = 0 method = 0 } isfixed_ = (method == 0) iscvode_ = (method == 3 && lstep == 0) isdaspk_ = (method == 4) islocal_ = (lstep == 1) istree_ = (gauss == 0) issparse_ = (gauss == 1) isvar_ = (method > 2) using_cvode_ = isvar_ } proc restore() {local i if (dt > .0001) { dtsav = dt }else{ dtsav = .025 } cvode.condition_order($2) refresh1($1) if (isfixed_) {isfixed()} if (iscn_) {iscn()} if (iscvode_) {iscvode()} if (isdaspk_) {isdaspk()} if (islocal_) {islocal()} if (istree_) {istree()} if (issparse_) {issparse()} i = refresh() if (i != $1) { printf("Method details were not completely restored\n") prdetails($1, "saved") prdetails(i, "current") } } proc sdt() { if ($1 == 1 && method < 3 && saved == 0) { dtsav = dt saved = 1 //print "dtsav = dt ", dt } if ($1 == 0 && method > 2) { dt = dtsav saved = 0 //print "dt = dtsav ", dt } } proc isvar() { if (isvar_) { if (!saved) { sdt(1) } if (model == 2) { isdaspk_ = 1 isdaspk() }else{ iscvode_ = 1 iscvode() } }else{ sdt(0) cvode.use_daspk(0) cvode.active(0) cvode.use_mxb(0) refresh() } } proc isfixed() { if (isfixed_ == 1) { secondorder = 0 cvode.use_daspk(0) cvode.active(0) sdt(0) } refresh() } proc iscn() { if (iscn_ == 1 && model != 2) { secondorder = 2 cvode.use_daspk(0) cvode.active(0) sdt(0) } refresh() } proc iscvode() { if (iscvode_ == 1 && model != 2) { sdt(1) cvode.use_local_dt(0) cvode.use_daspk(0) cvode.use_mxb(0) cvode.active(1) dt = dtsav } refresh() } proc isdaspk() { if (isdaspk_ == 1) { sdt(1) cvode.use_daspk(1) cvode.active(1) dt = dtsav } refresh() } proc islocal() { if (islocal_ == 1 && model != 2) { sdt(1) cvode.use_daspk(0) cvode.use_mxb(0) cvode.use_local_dt(1) cvode.active(1) dt = dtsav } refresh() } proc istree() { if (istree_ == 1 && model != 2) { if (method < 3) { cvode.use_daspk(0) cvode.use_mxb(0) } } refresh() } proc issparse() { if (issparse_ == 1) { if (method < 3) { cvode.use_mxb(1) } } refresh() } proc isco2() { cvode.condition_order(isco2_ + 1) } proc ats() { if ($2 > 0) { CVode[0].atolscale($s1, $2) } } proc save() {local i b1.save("ocbox_ = NumericalMethodPanel[0]\n}") b1.save("{object_push(ocbox_)}\n{") sprint(tstr, "atol_ = %g CVode[0].atol(atol_)", atol_) b1.save(tstr) sprint(tstr, "restore(%d, %d)", refresh(), cvode.condition_order()) b1.save(tstr) if (object_id(atoltool_) != 0) { b1.save(" atoltool_ = new AtolTool()") atoltool_.save(b1) b1.save(" atoltool_.scales()") } b1.save("}\n{object_pop()}\n{") } endtemplate NumericalMethodPanel neuron-7.5/share/lib/hoc/vecwrap.hoc000077500000000000000000000046301323325274500174720ustar00rootroot00000000000000begintemplate VecWrap // wrapper for the Vector class to allow simple manipulations public input, list, lines public g, b objref g, this, b, list, vx, vy objref ux[5], uy[5] strdef tstr proc init() { list = new List() build() sprint(tstr, "%s", this) if (numarg() == 0) { b.map(tstr) } } iterator lines() {local i for i=0, list.count-2 { $o2 = list.object(i) $o1 = list.object(i+1) iterator_statement list.remove(i) list.insrt(i, $o2) list.remove(i+1) list.insrt(i+1, $o1) i += 1 } } proc build() { b = new VBox() b.ref(this) b.save("save()") b.intercept(1) xpanel("",1) xmenu("CrossHair Action") xradiobutton("xy-origin", "caction(\"xy_origin\", 0)") xradiobutton("Cut Left", "caction(\"cut_left\", 1)") xradiobutton("Cut Right", "caction(\"cut_right\", 1)") xmenu() xpanel() g = new Graph() g.menu_action("Copy From Clipboard", "input1()") b.intercept(0) } proc input1() { sprint(tstr, "%s.input(hoc_obj_[1], hoc_obj_[0])", this) if (execute1(tstr) == 0) { continue_dialog("No data in the Vector clipboard. Select a Graph line first") } } proc pl() {local i g.erase() g.label(.6,.95) for i=0, list.count() - 2 { list.object(i).line(g, list.object(i+1)) i += 1 } g.flush() } proc input() { local i list.append($o2.cl) list.append($o1.c) pl() } proc caction() { g.crosshair_action($s1, $2) } proc xy_origin() { for lines(vx, vy) { if ($3 == 120) { // x vx.sub($1) }else if ($3 == 121) { // y vy.sub($2) }else{ vx.sub($1) vy.sub($2) } } pl() } proc cut_left() { size = $o3.size for lines(vx, vy) { vx = vx.c($1, size-1) vy = vy.cl($1, size-1) } pl() } proc cut_right() { for lines(vx, vy) { vx = vx.c(0, $1) vy = vy.cl(0, $1) } pl() } proc save() { b.save("load_file(\"vecwrap.hoc\")\n}\n{") b.save("ocbox_=new VecWrap(1)") b.save("}\n{object_push(ocbox_)}") for lines(vx, vy) { sprint(tstr, "vy = new Vector(%d)", vy.size) b.save(tstr) sprint(tstr, "vx = new Vector(%d)", vx.size) b.save(tstr) sprint(tstr, "vy.label(\"%s\")", vy.label) b.save(tstr) sprint(tstr, "for i=0,%d { vx.x[i]=fscan() vy.x[i]=fscan()}",\ vx.size-1) b.save(tstr) for i=0, vx.size-1 { sprint(tstr, "%g %g", vx.x[i], vy.x[i]) b.save(tstr) } b.save("input(vx, vy)") } b.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) b.save("ocbox_ = ocbox_.b") } endtemplate VecWrap objref tobj proc makeVecWrap() { tobj = new VecWrap() objref tobj } neuron-7.5/share/lib/hoc/vplay.hoc000077500000000000000000000055001323325274500171530ustar00rootroot00000000000000begintemplate VectorPlay public b, g, vx, vy, sname, set_vec, oldval, con1, contin, scale objref b, g, this, vx, vy, sc strdef sname, tstr i=0 oldval=0 proc init() { have_name = 0 is_con = 0 state = 0 contin = 0 sc = new SymChooser("Variable Name to Play into") build() if (numarg() == 0) { sprint(tstr, "%s", this) b.map(tstr) } } proc build() { sname = "Choose Variable Name in Graph menu" b = new VBox() b.ref(this) b.save("save()") b.intercept(1) xpanel("", 1) xmenu("Specify") xbutton("Variable Name", "varname()") xbutton("Vector from Clipboard", "clipboard()") xcheckbox("Piecewise continuous", &contin, "con()") xbutton("*10", "scale(10)") xbutton("/10", "scale(.1)") xbutton("*2", "scale(2)") xbutton("/2", "scale(.5)") xmenu() xstatebutton("Connected", &state, "con()") xvarlabel(sname) xpanel() g = new Graph() b.intercept(0) } proc varname() { if (sc.run()) { have_name = 1 sc.text(sname) } con1(is_con) } proc clipboard() { sprint(tstr, "%s.set_vec(hoc_obj_[1], hoc_obj_[0])", this) if(execute1(tstr) == 0) { continue_dialog("No data in the Vector clipboard.") }else{ con1(is_con) } } proc set_vec() { vx = $o1.c vy = $o2.c vy.plot(g, vx) } proc scale() { if (object_id(vy)) { vy.mul($1) g.erase vy.plot(g, vx) } } proc con() { if (!have_name) { continue_dialog("Choose Variable name (see Graph Menu)") state = 0 }else if (!object_id(vy)) { continue_dialog("Choose Vector from Clipboard (see Graph Menu)") state = 0 }else{ con1(state) } } proc con1() { if (object_id(vy)) { if (is_con) { vy.play_remove() sprint(tstr, "%s = %g", sname, oldval) execute(tstr) is_con = 0 state = 0 } if ($1) { if (contin) { sprint(tstr, "{%s.vy.play(&%s, %s.vx, 1)}", this, sname, this) }else{ sprint(tstr, "{%s.vy.play(&%s, %s.vx)}", this, sname, this) } if (execute1(tstr)) { sprint(tstr, "%s.oldval = %s", this, sname) execute(tstr) is_con = 1 state = 1 }else{ continue_dialog("Invalid Variable name") } } } } proc save() {local i b.save("load_file(\"vplay.hoc\")\n}\n{") b.save("ocbox_=new VectorPlay(1)") b.save("}\n{object_push(ocbox_)}") if (object_id(vy)) { sprint(tstr, "vy = new Vector(%d)", vy.size) b.save(tstr) sprint(tstr, "vx = new Vector(%d)", vx.size) b.save(tstr) sprint(tstr, "for i=0,%d { vx.x[i]=fscan() vy.x[i]=fscan()}",\ vx.size-1) b.save(tstr) for i=0, vx.size-1 { sprint(tstr, "%g %g", vx.x[i], vy.x[i]) b.save(tstr) } b.save("{vy.plot(g, vx)}") } sprint(tstr, "{sname = \"%s\" have_name = %d contin = %d con1(%d)}",\ sname, have_name, contin, is_con) b.save(tstr) b.save("{object_pop()}\n{") g.save_name("ocbox_.g", 1) b.save("ocbox_ = ocbox_.b") } endtemplate VectorPlay objref tobj proc makeVectorPlay() { tobj = new VectorPlay() objref tobj } neuron-7.5/share/lib/hoc/wingroup.hoc000077500000000000000000000163161323325274500177010ustar00rootroot00000000000000begintemplate WindowGroup public name, state_, mk, list external object_index objref list, this strdef name proc init() { state_ = 0 list = new List() if (numarg() > 0) { name = $s1 }else{ name = "unnamed Window Group" } } proc mk() { xcheckbox(name, &state_, "action()") } proc action() {local i for i = 0, PWManager[0].count-1 { if (PWManager[0].group(i) == this) { if (state_) { PWManager[0].map(i) }else{ PWManager[0].hide(i) } } } } endtemplate WindowGroup begintemplate WindowGroupItem public s, index strdef s proc init() { index = $1 s = $s2 } endtemplate WindowGroupItem begintemplate WindowGroupManager public box external WindowGroup, WindowGroupItem objref box, vb[3], m, pwm, hbox, glist, deck, toplist, tobj, tobj1, nil objref ldfile strdef gname, tstr proc init() { m = $o1 pwm = m.pwm glist = m.groups mklist() build() glistsel(-1) } proc mklist() {local i, lead, man toplist = new List() for i=0, glist.count-1 { glist.object(i).list.remove_all } lead = pwm.leader() man = pwm.manager() for i=0, pwm.count-1 { if (i == lead || i == man) {continue} tobj = pwm.group(i) if (tobj == nil) { toplist.append(new WindowGroupItem(i, pwm.name(i))) }else{ tobj.list.append(new WindowGroupItem(i, pwm.name(i))) } } objref tobj } proc build() {local i box = new VBox(3) box.intercept(1) hbox = new HBox(3) hbox.intercept(1) vb[0] = new VBox(3) vb[0].intercept(1) xpanel("") xlabel(" Window Groups ") xpanel() glist.browser("", "name") vb[0].intercept(0) vb[0].map vb[1] = new VBox(3) vb[1].intercept(1) xpanel("") gname = " No group selected " xvarlabel(gname) xpanel() deck = new Deck(3) deck.intercept(1) for i=0, glist.count -1 { glist.object(i).list.browser("", "s") glist.object(i).list.select_action("gsel(hoc_ac_)", 1) } deck.intercept(0) deck.map() vb[1].intercept(0) vb[1].map vb[2] = new VBox(3) vb[2].intercept(1) xpanel("") xlabel(" <--- Ungrouped Windows ") xpanel() toplist.browser("", "s") vb[2].intercept(0) vb[2].map hbox.intercept(0) hbox.map() xpanel("", 1) xbutton("New Group", "append()") xbutton("Change Name", "change()") xbutton("Remove Group", "remove()") xbutton("Save Group", "fsave()") xpanel() box.intercept(0) glist.select_action("glistsel(hoc_ac_)", 1) toplist.select_action("topsel(hoc_ac_)", 1) } proc fsave() {local i i = glist.selected() if (i == -1) { return } tobj = glist.object(i) if (tobj.list.count == 0) { continue_dialog("no windows in selected group") return } sprint(tstr, "Save Group %s", tobj.name) if (object_id(ldfile) == 0) { ldfile = new File() } ldfile.chooser("w", tstr, "*.ses", "Save", "Cancel", ldfile.dir) if (ldfile.chooser()) { ldfile.close sprint(tstr, "%s.save(\"%s\", %s)", pwm, ldfile.getname, tobj) execute(tstr) // pwm.save(ldfile.getname, tobj) } } proc append() { tobj = new WindowGroup() glist.append(tobj) deck.intercept(1) tobj.list.browser("", "s") tobj.list.select_action("gsel(hoc_ac_)", 1) deck.intercept(0) glistsel(glist.count-1) objref tobj } proc change() {local i i = glist.selected() if (i == -1) { return } tobj = glist.object(i) tstr = tobj.name if (string_dialog("Change group name", tstr)) { tobj.name = tstr glist.remove(i) glist.insrt(i, tobj) glistsel(i) glist.select(i) } objref tobj } proc remove() {local i i = glist.selected() if (i == -1) { return } while (glist.object(i).list.count) { gsel(0) } glist.remove(i) deck.remove(i) glistsel(-1) } proc glistsel() { deck.flip_to($1) if ($1 == -1) { gname = " No group selected " }else{ sprint(gname, " %30s ---> ", glist.object($1).name) } } proc topsel() {local i if ($1 == -1) { return } i = glist.selected() toplist.select(-1) if (i < 0) {return} tobj = toplist.object($1) toplist.remove($1) glist.object(i).list.append(tobj) glist.object(i).list.select(-1) pwm.group(tobj.index, glist.object(i)) objref tobj } proc gsel() {local i i = glist.selected() if ($1 == -1) { return } tobj = glist.object(i).list tobj1 = tobj.object($1) tobj.remove($1) tobj.select(-1) toplist.append(tobj1) toplist.select(-1) pwm.group(tobj1.index, nil) objref tobj, tobj1 } endtemplate WindowGroupManager /* manage the Window item on the NeuronMainMenu menubar */ begintemplate WindowMenu public make, groups, pwm, ses_gid external WindowGroup, WindowGroupManager objref pwm, this, state, keep, groups, tobj, oldgids, newgids, nil strdef tstr proc init() { keep = this //if this exists now, it would be before the NeuronMainMenu // pwm = new PWManager() groups = new List() state = new Vector(50) oldgids = new Vector(20) newgids = new Vector(20) oldgids.resize(0) newgids.resize(0) } // when a session is saved, after each window is mapped, pwman.cpp // puts the following statement in the session file // {WindowMenu[0].ses_gid(first, oldgid, show, "name")} // It is the responsibility of the following procedure to map the // oldgid's to new ones and put the last window created in the proper group // note that oldgid's are the meaningless object indices when saved // but the newgid vector is the index into the groups list proc ses_gid() {local i if (!object_id(pwm)) { pwm = new PWManager() } if ($1 == 1) { oldgids.resize(0) newgids.resize(0) } if (pwm.group(pwm.count-1) != nil) { printf("error in %s.ses_gid(%d, %d, %d, \"%s\")\n", this, $1, $2, $3, $s4) return } i = oldgids.indwhere("==", $2) if (i == -1) { groups.append(new WindowGroup($s4)) oldgids.append($2) newgids.append(groups.count-1) i = oldgids.size-1 } pwm.group(pwm.count-1, groups.object(newgids.x[i])) if ($3 == 0) { pwm.hide(pwm.count-1) } } // if make starts getting slow then we will have to reimplement with // a notification mechanism. proc make() {local i, lead, man if (!object_id(pwm)) { pwm = new PWManager() } man = pwm.manager lead = pwm.leader state.resize(pwm.count) mk(man) xmenu("Ungrouped") xbutton("Show", "showall()") xbutton("Hide", "hideall()") xmenu() for i=0, groups.count - 1 { groups.object(i).state_ = 1 } for i=0, pwm.count-1 { if (i == lead || i == man) continue tobj = pwm.group(i) if (tobj == nil) { mk(i) }else{ if (pwm.is_mapped(i) == 0) { tobj.state_ = 0 } } } objref tobj xbutton("---------","") for i=0, groups.count - 1 { groups.object(i).mk() } xbutton("Group Manager", "group_manager()") } proc mk() { local i i = $1 sprint(tstr, "action(%d)", i) state.x[i] = pwm.is_mapped(i) xcheckbox(pwm.name(i), &state.x[i], tstr) // printf("%s %g\n", pwm.name(i), state.x[i]) } proc action() { if (state.x[$1] == 1) { pwm.map($1) }else{ pwm.hide($1) } } proc showall() {local i, lead, man lead = pwm.leader man = pwm.manager for i=0, pwm.count-1 { if (i == lead || i == man) continue if (state.x[i] == 0 && pwm.group(i) == nil) { pwm.map(i) } } } proc hideall() {local i, lead, man lead = pwm.leader man = pwm.manager for i=0, pwm.count-1 { if (i == lead || i == man) continue if (state.x[i] == 1 && pwm.group(i) == nil) { pwm.hide(i) } } } proc group_manager() { tobj = new WindowGroupManager(this) tobj.box.dialog("WindowGroupManager", "Close", "Close") objref tobj } endtemplate WindowMenu neuron-7.5/share/lib/hocload.sh000077500000000000000000000015151323325274500165230ustar00rootroot00000000000000#!/bin/sh # used by the libload command in hoc to find an instance of a procedure, # function, or template # uncomment following line for use with DOS #NEURONHOME=`d2uenv NEURONHOME` if [ $TEMP ] ; then tmpdir=$TEMP else tmpdir="/tmp" fi curdir=`pwd` names=$tmpdir/oc"$3".hl if [ ! -f $names ] ; then paths=". $HOC_LIBRARY_PATH $NEURONHOME/lib/hoc" spaths=`echo "$paths" | sed 's/:/ /g'` for p in $spaths do #for DOS comment out the egrep and uncomment the grep line egrep '^func|^proc|^begintemplate' $p/*.oc $p/*.hoc >> $names 2>/dev/null # grep -s '^func|^proc|^begintemplate' $p/\*.oc $p/\*.hoc >> $names done fi if [ "$1" = "begintemplate" ] ; then file=`sed -n "/:$1 $2\$/ { s/:$1 $2.*//p q }" $names` else file=`sed -n "/:$1 $2 *()/ { s/:$1 $2.*//p q }" $names` fi if [ -z "$file" ] ; then exit 1 fi echo $file exit 0 neuron-7.5/share/lib/nrn.defaults.in000077500000000000000000000101441323325274500175070ustar00rootroot00000000000000*double_buffered: on // with above at least there will not be flickering if InterViews // resource file is missing *Scene_background: #ffffff *Scene_foreground: #000000 *FieldEditor*background: #ffffff *background: #cfffff *foreground: #000000 *default_brush: 0 *view_margin: .25 *err_dialog: off *dismiss_button: Close *use_transient_windows: yes *mswin_scale: 1.2 // above only applies to the mswin version. If the width of the screen in pixels // is pw, then the default scale is 1 if pw>1100 otherwise scale is 1200/pw // if above is uncommented then the value will take precedence. // scale can also be set at any time with PWManager[0].scale(factor) *nrn_library: $(NEURONHOME)/lib *view_pick_epsilon: 2 *pwm_dismiss_button: Iconify *pwm_help: on *pwm_canvas_height: 120 *pwm_paper_height: 11 *pwm_paper_width: 8.5 *pwm_paper_resolution: .5 *pwm_screen_outline_color: red *pwm_window_outline_color: blue // windows on screen snap to grid *pwm_pixel_resolution: 0 // nonzero value above will not work unless offsets are set correctly // for your window manager. I know of no portable way of determining // them automatically. *window_manager_offset_x: 5. *window_manager_offset_y: 26. *section_select_color: red *section_adjacent_color: green *show_adjacent_selection: off *disable_color: #808080 // how many items in a panel before switching to scroll style *panel_scroll: 12 // suffix for filenames to appear in browsers *pwm_print_file_filter: *.ps *pwm_idraw_file_filter: *.id *pwm_ascii_file_filter: * *pwm_save_file_filter: *.ses *pwm_idraw_prologue: $(NEURONHOME)/lib/prologue.id //setlinejoin is to prevent noisy looking wide lines when points are //very close together *pwm_postscript_filter: sed '/%%EndProlog/a\\\n2 setlinejoin\ns;/Adobe-;/;\ns;-Oblique;;' //following for mswin @nrndef_mswin@*pwm_postscript_filter: sed -f ${N}/lib/psfilt.sed @nrndef_mswin@*printer_command: Windows *SlowSlider*autorepeatStart: 0. //draw a box around a printed window *scene_print_border: 1 *radioScale: 1.2 *stepper_size: 20. *xvalue_field_size_increase: 10. // following is historical standard for unix. @nrndef_unix@*font: *helvetica-medium-r-normal*--14* @nrndef_unix@*MenuBar*font: *-helvetica-bold-o-normal--14* @nrndef_unix@*MenuItem*font: *-helvetica-bold-o-normal--14* // Mac and mswin internal default is @nrndef_mac@*font: *helvetica-medium-r-normal*--14* @nrndef_mac@*MenuBar*font: *-helvetica-bold-o-normal--14* @nrndef_mac@*MenuItem*font: *-helvetica-bold-o-normal--14* @nrndef_mswin@*font: *Arial*bold*--12* //*MenuBar*font: *Arial*bold*--12* //*MenuItem*font: *Arial*bold*--12* *xvalue_format: %.5g # according to xaxis(mode), 0 means view axis, 3 means nothing *graph_axis_default: 0 //the color map for pseudocolor plotting for 3-D cells *shape_scale_file: $(NEURONHOME)/lib/shape.cm2 // 1 means slower but more pleasing join *shape_beveljoin: 1 // number of colors and brushes selectable in the graph ColorBrushWidget *CBWidget_ncolor: 10 *CBWidget_nbrush: 10 // most people do not like the "first instance" messages when loading // hoc files *first_instance_message: off // Value editor buttons show units if available *units_on_flag: on // Following useful for one button mouse. Mac has this as 10 by default *scene_menu_box_size: 10. // The full pathname for the Java VM dynamically loadable // library is specified here // two examples for mswin on my machines are //*jvmdll: c:\Java\jre1.5.0_01\bin\client\jvm.dll //*jvmdll: c:\jdk1.3.1\jre\bin\classic\jvm.dll // for gnu-linux it should be set as below and the LD_LIBRARY_PATH set // so that libjvm.so can itself find other libraries. For example // export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server @nrndef_unix@*jvmdll: libjvm.so @nrndef_mac@*jvmdll: libjvm.dylib // The default stack size is 1000 and the frame (recursion depth) size is 100 unless explicitly set nonzero below // One may also use the -NSTACK stacksize -NFRAME framesize options at launch. *NSTACK: 0 *NFRAME: 0 // To ensure that all statements in this file take effect, do not remove this line. // It prevents the absence of a trailing newline for the last substantive // property for mswin. neuron-7.5/share/lib/nrnunits.lib000077500000000000000000000241151323325274500171270ustar00rootroot00000000000000/ from gnu units distribution / primitive units m *a* kg *b* sec *c* coul *d* candela *e* dollar *f* bit *h* erlang *i* K *j* / prefixes /yotta- 1e24 /zetta- 1e21 /exa- 1e18 /peta- 1e15 /tera- 1e12 /giga- 1e9 /mega- 1e6 /myria- 1e4 /kilo- 1e3 /hecto- 1e2 /deka- 1e1 /deci- 1e-1 /centi- 1e-2 /milli- 1e-3 /micro- 1e-6 /nano- 1e-9 /pico- 1e-12 /femto- 1e-15 /atto- 1e-18 /zopto- 1e-21 /yocto- 1e-24 / /semi- .5 /demi- .5 / /Y- yotta /Z- zetta /E- exa /P- peta /T- tera /G- giga /M- mega /k- kilo /h- hecto /da- deka /d- deci /c- centi /m- milli /p- pico /f- femto /a- atto /z- zopto /y- yocto / constants fuzz 1 pi 3.14159265358979323846 c 2.99792458+8 m/sec fuzz g 9.80665 m/sec2 au 1.49597871+11 m fuzz mole 6.022169+23 fuzz e 1.6021917-19 coul fuzz energy c2 force g mercury 1.33322+5 kg/m2-sec2 hg mercury / dimensionless radian .5 / pi degree 1|180 pi-radian circle 2 pi-radian turn 2 pi-radian revolution turn rev turn grade .9 degree arcdeg 1 degree arcmin 1|60 arcdeg ccs 1|36 erlang arcsec 1|60 arcmin steradian radian2 sphere 4 pi-steradian sr steradian / Time second sec s sec minute 60 sec min minute hour 60 min hr hour day 24 hr da day week 7 day year 365.24219879 day fuzz yr year month 1|12 year ms millisec us microsec / Mass gram millikg gm gram mg milligram metricton kilokg / Avoirdupois lb .45359237 kg pound lb lbf lb g ounce 1|16 lb oz ounce dram 1|16 oz dr dram grain 1|7000 lb gr grain shortton 2000 lb ton shortton longton 2240 lb / Apothecary scruple 20 grain apdram 60 grain apounce 480 grain appound 5760 grain troypound appound / Length meter m cm centimeter mm millimeter km kilometer nm nanometer micron micrometer angstrom decinanometer inch 2.54 cm in inch foot 12 in feet foot ft foot yard 3 ft yd yard rod 5.5 yd rd rod mile 5280 ft mi mile british 1200|3937 m/ft nmile 1852m acre 4840 yd2 cc cm3 liter kilocc ml milliliter / US Liquid gallon 231 in3 imperial 1.20095 gal gallon quart 1|4 gal qt quart pint 1|2 qt pt pint floz 1|16 pt fldr 1|8 floz / US Dry dry 268.8025 in3/gallon fuzz peck 8 dry-quart pk peck bushel 4 peck bu bushel chaldron 36 bushel / British brgallon 277.420 in3 fuzz brquart 1|4 brgallon brpint 1|2 brquart brfloz 1|20 brpint brpeck 554.84 in3 fuzz brbushel 4 brpeck / Energy Work newton kg-m/sec2 nt newton N newton joule nt-m cal 4.1868 joule / Electrical coulomb coul C coul ampere coul/sec amp ampere watt joule/sec volt watt/amp ohm volt/amp mho /ohm farad coul/volt henry sec2/farad weber volt-sec / Light cd candela lumen cd sr lux cd sr/m2 / Wall Street Journal, July 2, 1993 $ dollar argentinapeso $ australiadollar .66 $ austriaschilling .83 $ bahraindinar 2.6522 $ belgiumfranc .028 $ brazilcruzeiro .000019 $ britainpound 1.49 $ canadadollar .77 $ czechkoruna .034 $ chilepeso .0025 $ chinarenminbi .174856 $ colombiapeso .001495 $ denmarkkrone .15 $ ecuadorsucre .000539 $ finlandmarkka .17 $ francefranc .17 $ germanymark .58 $ greatbritainpound britainpound greecedrachma .0043 $ hongkongdollar .13 $ hungaryforint .011 $ indiarupee .03211 $ indonesiarupiah .0004782 $ irelandpunt 1.43 $ israelshekel .3642 $ italylira .00064 $ japanyen .0093 $ jordandinar 1.4682 $ kuwaitdinar 3.3173 $ lebanonpound .000578 $ malaysiaringgit .338 $ maltalira 2.6042 $ mexicopeso .3205128 $ netherlandsguilder .52 $ newzealanddollar .539 $ norwaykrone .139 $ pakistanrupee .037 $ perunewsol .5065 $ philippinespeso .03738 $ polandzloty .000059 $ portugalescudo .00617 $ saudiarabiariyal .26702 $ singaporedollar .6157 $ slovakkoruna .034 $ southafricarand .21 $ southkoreawon .001 $ spainpeseta .007 $ swedenkrona .13 $ switzerlandfranc .66 $ taiwandollar .038285 $ thailandbaht .03962 $ turkeylira .0000929 $ unitedarabdirham .2723 $ uruguaynewpeso .246852 $ venezuelabolivar .011 $ mark germanymark bolivar venezuelabolivar peseta spainpeseta rand southafricarand escudo portugalescudo sol perunewsol guilder netherlandsguilder hollandguilder netherlandsguilder peso mexicopeso yen japanyen lira italylira rupee indiarupee drachma greecedrachma franc francefranc markka finlandmarkka sucre ecuadorsucre poundsterling britainpound cruzeiro brazilcruzeiro / computer baud bit/sec byte 8 bit block 512 byte kbyte 1024 byte megabyte 1024 kbyte gigabyte 1024 megabyte meg megabyte / Trivia % 1|100 admiraltyknot 6080 ft/hr apostilb cd/pi-m2 are 1+2 m2 arpentcan 27.52 mi arpentlin 191.835 ft astronomicalunit au atmosphere 1.01325+5 nt/m2 atm atmosphere atomicmassunit 1.66044-27 kg fuzz amu atomicmassunit bag 94 lb bakersdozen 13 bar 1+5 nt/m2 barie 1-1 nt/m2 barleycorn 1|3 in barn 1-28 m2 barrel 42 gal barye 1-1 nt/m2 bev 1+9 e-volt biot 10 amp blondel cd/pi-m2 boardfoot 144 in3 bolt 40 yd bottommeasure 1|40 in britishthermalunit 1.05506+3 joule fuzz btu britishthermalunit refrigeration 12000 btu/ton-hour buck dollar cable 720 ft caliber 1-2 in calorie cal carat 205 mg caratgold 1|24 cent centidollar cental 100 lb centesimalminute 1-2 grade centesimalsecond 1-4 grade century 100 year cfs ft3/sec chain 66 ft circularinch 1|4 pi-in2 circularmil 1-6|4 pi-in2 clusec 1-8 mm-hg m3/s coomb 4 bu cord 128 ft3 cordfoot cord crith 9.06-2 gm cubit 18 in cup 1|2 pt curie 3.7+10 /sec dalton amu decade 10 yr dipotre /m displacementton 35 ft3 doppelzentner 100 kg dozen 12 drop .03 cm3 dyne cm-gm/sec2 electronvolt e-volt ell 45 in engineerschain 100 ft engineerslink 100|100 ft equivalentfootcandle lumen/pi-ft2 equivalentlux lumen/pi-m2 equivalentphot cd/pi-cm2 erg cm2-gm/sec2 ev e-volt / faraday 9.652000+04 coul / faraday from host: physics.nist.gov / path: /PhysRefData/fundconst/html/keywords.html faraday 9.6485309+4 coul fathom 6 ft fermi 1-15 m fifth 4|5 qt fin 5 dollar finger 7|8 in firkin 9 gal footcandle lumen/ft2 footlambert cd/pi-ft2 fortnight 14 da franklin 3.33564-10 coul frigorie kilocal furlong 220 yd galileo 1-2 m/sec2 gamma 1-9 weber/m2 gauss 1-4 weber/m2 geodeticfoot british-ft geographicalmile 1852 m gilbert 7.95775-1 amp gill 1|4 pt gross 144 gunterschain 22 yd hand 4 in hectare 1+4 m2 hefnercandle .92 cd hertz /sec Hz hertz hogshead 2 barrel hd hogshead homestead 1|4 mi2 horsepower 550 ft-lb-g/sec hp horsepower hyl gm force sec2/m hz /sec imaginarycubicfoot 1.4 ft3 jeroboam 4|5 gal karat 1|24 kcal kilocal kcalorie kilocal kev 1+3 e-volt key kg khz 1+3 /sec kilderkin 18 gal knot nmile/hr lambert cd/pi-cm2 langley cal/cm2 last 80 bu league 3 mi lightyear c-yr line 1|12 in link 66|100 ft longhundredweight 112 lb longquarter 28 lb lusec 1-6 mm-hg m3/s mach 331.46 m/sec magnum 2 qt marineleague 3 nmile maxwell 1-8 weber metriccarat 200 mg mgd megagal/day mh millihenry mhz 1+6 /sec mil 1-3 in millenium 1000 year minersinch 1.5 ft3/min minim 1|60 fldr mo month mpg mile/gal mph mile/hr nail 1|16 yd nauticalmile nmile nit cd/m2 noggin 1|8 qt nox 1-3 lux ns nanosec oersted 2.5+2 pi-amp/m oe oersted pace 36 in palm 3 in parasang 3.5 mi parsec au-radian/arcsec pascal nt/m2 pc parsec pennyweight 1|20 oz pwt pennyweight percent % perch rd pf picofarad phot lumen/cm2 pica 1|6 in pieze 1+3 nt/m2 pipe 4 barrel point 1|72 in poise gm/cm-sec pole rd poundal ft-lb/sec2 pdl poundal proof 1|200 psi lb-g/in2 quarter 9 in quartersection 1|4 mi2 quintal 100 kg quire 25 rad 100 erg/gm ream 500 registerton 100 ft3 rehoboam 156 floz rhe 10 m2/nt-sec rontgen 2.58-4 curie/kg rood 1.21+3 yd rope 20 ft rutherford 1+6 /sec rydberg 1.36054+1 ev sabin 1 ft2 sack 3 bu seam 8 bu section mi2 shippington 40 ft3 shorthundredweight 100 lb shortquarter 25 lb siemens /ohm sigma microsec skein 120 yd skot 1-3 apostilb slug lb-g-sec2/ft span 9 in spat 4 pi sr spindle 14400 yd square 100 ft2 stere m3 sthene 1+3 nt stilb cd/cm2 stoke 1-4 m2/sec stone 14 lb strike 2 bu surveyfoot british-ft surveyyard 3 surveyfoot surveyorschain 66 ft surveyorslink 66|100 ft tablespoon 4 fldr teaspoon 4|3 fldr tesla weber/m2 therm 1+5 btu thermie 1+6 cal timberfoot ft3 tnt 4.6+6 m2/sec2 tonne 1+6 gm torr mm hg township 36 mi2 tun 8 barrel water gram g / cc wey 40 bu weymass 252 lb Xunit 1.00202-13m degC K k 1.38047-16 erg/degC kelvin K brewster 1-12 m2/newton degF 5|9 degC degreesrankine degF degrankine degreesrankine degreerankine degF degreaumur 10|8 degC drachm 60 grain poncelet 100 kg m g / sec denier .05|450 gram / m tex .001 gram / m englishell 45 inch scottishell 37.2 inch flemishell 27 inch planck 6.626-34 joule-sec hbar 1.055-34 joule-sec electronmass 9.1095-31 kg protonmass 1.6726-27 kg neutronmass 1.6606-27 kg V volt eV e V bohrradius 1|8.988e9 hbar2-C2 / N m2-e2-electronmass becquerel 1|3.7+10 curie fresnel 1+12 hertz statcoul 1|2.99792458+9 coul statamp 1|2.99792458+9 amp statvolt 2.99792458+2 volt statcoulomb statcoul statampere statamp debye 3.336-30 coul-m pulsatance 2 pi/sec rpm rev/minute rps rev/sec kilohm kiloohm megohm megaohm siderealyear 365.256360417 day siderealday 23.934469444 hour siderealhour 1|24 siderealday lunarmonth 29.5305555 day synodicmonth lunarmonth siderealmonth 27.32152777 day tropicalyear year solaryear year lunaryear 12 lunarmonth cran 37.5 brgallon kip 1000 lbf frenchfoot 16|15 ft frenchfeet frenchfoot toise 6 frenchfeet sievert 8.4 rontgen candle 1.02 candela militarypace 2.5 feet metre meter litre liter gramme gram iudiptheria 62.8 microgram iupenicillin .6 microgram iuinsulin 41.67 microgram cottonyarncount 2520 ft/pound linenyarncount 900 ft/pound worstedyarncount 1680 ft/pound metricyarncount meter/gram jewlerspoint 2 milligram neuron-7.5/share/lib/prologue.id000077500000000000000000000240151323325274500167300ustar00rootroot00000000000000%!PS-Adobe-2.0 EPSF-1.2 %%Creator: idraw %%DocumentFonts: Helvetica %%Pages: 1 %%BoundingBox: -6 2 255 163 %%EndComments %%BeginIdrawPrologue /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath arrowHeight neg arrowWidth 2 div moveto 0 0 lineto arrowHeight neg arrowWidth 2 div neg lineto patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath arrowHeight neg arrowWidth 2 div moveto 0 0 lineto arrowHeight neg arrowWidth 2 div neg lineto } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def %%EndIdrawPrologue /arrowHeight 9 def /arrowWidth 5 def /IdrawDict 51 dict def IdrawDict begin /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall /Encoding ISOLatin1Encoding def currentdict end definefont } def /ISOLatin1Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] def /Helvetica reencodeISO def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { dup -1 eq { /patternGrayLevel idef /patternString idef } { /patternGrayLevel idef } ifelse false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l w add b translate w neg h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont printSize scalefont dup setfont def /descender 0 fontDict /FontBBox get 1 get fontDict /FontMatrix get transform exch pop def /vertoffset 1 printSize sub descender sub def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def /SSten { fgred fggreen fgblue setrgbcolor dup true exch 1 0 0 -1 0 6 -1 roll matrix astore } def /FSten { dup 3 -1 roll dup 4 1 roll exch newpath 0 0 moveto dup 0 exch lineto exch dup 3 1 roll exch lineto 0 lineto closepath bgred bggreen bgblue setrgbcolor eofill SSten } def /Rast { exch dup 3 1 roll 1 0 0 -1 0 6 -1 roll matrix astore } def %%EndProlog %I Idraw 10 Grid 8 8 %%Page: 1 1 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.862906 0 0 0.862906 0 0 ] concat /originalCTM matrix currentmatrix def neuron-7.5/share/lib/python/000077500000000000000000000000001323325274500160725ustar00rootroot00000000000000neuron-7.5/share/lib/python/Makefile.am000066400000000000000000000027251323325274500201340ustar00rootroot00000000000000neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomepythondir = $(neuronhomedir)/python NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ PY2TO3 = @PY2TO3@ nobase_neuronhomepython_DATA = \ \ neuron/doc.py \ neuron/gui.py \ neuron/hclass2.py \ neuron/hclass3.py \ neuron/__init__.py \ neuron/sections.py \ \ neuron/nonvint_block_supervisor.py \ \ neuron/neuroml/__init__.py \ neuron/neuroml/rdxml.py \ neuron/neuroml/xml2nrn.py \ neuron/neuroml/neuroml.py \ neuron/neuroml/metadata.py \ neuron/neuroml/morphml.py \ neuron/neuroml/biophysics.py \ \ neuron/tests/__init__.py \ neuron/tests/test_all.py \ neuron/tests/test_vector.py \ neuron/tests/test_neuron.py \ neuron/tests/_subclass.py \ neuron/rxd/region.py \ neuron/rxd/species.py \ neuron/rxd/rxd.py \ neuron/rxd/reaction.py \ neuron/rxd/rxdsection.py \ neuron/rxd/rxdmath.py \ neuron/rxd/section1d.py \ neuron/rxd/geometry.py \ neuron/rxd/rate.py \ neuron/rxd/node.py \ neuron/rxd/rxdException.py \ neuron/rxd/__init__.py \ neuron/rxd/multiCompartmentReaction.py \ neuron/rxd/nodelist.py \ neuron/rxd/generalizedReaction.py \ neuron/rxd/morphology.py \ neuron/rxd/options.py \ neuron/rxd/gui.py \ neuron/rxd/plugins.py \ neuron/rxd/rangevar.py \ neuron/rxd/dimension3.py \ neuron/rxd/initializer.py \ neuron/rxd/geometry3d/*.* \ \ neuron/help_data.dat SUBDIRS = neuron EXTRA_DIST = $(nobase_neuronhomepython_DATA) #install-data-hook: # if test $(NRNPYTHON_PYMAJOR) -gt 2 ; then \ # $(PY2TO3) -w $(DESTDIR)$(neuronhomepythondir) ; \ # fi neuron-7.5/share/lib/python/Makefile.in000066400000000000000000000636701323325274500201530ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/python ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(neuronhomepythondir)" DATA = $(nobase_neuronhomepython_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ neuronhomedir = $(prefix)/share/@PACKAGE@/lib neuronhomepythondir = $(neuronhomedir)/python nobase_neuronhomepython_DATA = \ \ neuron/doc.py \ neuron/gui.py \ neuron/hclass2.py \ neuron/hclass3.py \ neuron/__init__.py \ neuron/sections.py \ \ neuron/nonvint_block_supervisor.py \ \ neuron/neuroml/__init__.py \ neuron/neuroml/rdxml.py \ neuron/neuroml/xml2nrn.py \ neuron/neuroml/neuroml.py \ neuron/neuroml/metadata.py \ neuron/neuroml/morphml.py \ neuron/neuroml/biophysics.py \ \ neuron/tests/__init__.py \ neuron/tests/test_all.py \ neuron/tests/test_vector.py \ neuron/tests/test_neuron.py \ neuron/tests/_subclass.py \ neuron/rxd/region.py \ neuron/rxd/species.py \ neuron/rxd/rxd.py \ neuron/rxd/reaction.py \ neuron/rxd/rxdsection.py \ neuron/rxd/rxdmath.py \ neuron/rxd/section1d.py \ neuron/rxd/geometry.py \ neuron/rxd/rate.py \ neuron/rxd/node.py \ neuron/rxd/rxdException.py \ neuron/rxd/__init__.py \ neuron/rxd/multiCompartmentReaction.py \ neuron/rxd/nodelist.py \ neuron/rxd/generalizedReaction.py \ neuron/rxd/morphology.py \ neuron/rxd/options.py \ neuron/rxd/gui.py \ neuron/rxd/plugins.py \ neuron/rxd/rangevar.py \ neuron/rxd/dimension3.py \ neuron/rxd/initializer.py \ neuron/rxd/geometry3d/*.* \ \ neuron/help_data.dat SUBDIRS = neuron EXTRA_DIST = $(nobase_neuronhomepython_DATA) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/python/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/python/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nobase_neuronhomepythonDATA: $(nobase_neuronhomepython_DATA) @$(NORMAL_INSTALL) @list='$(nobase_neuronhomepython_DATA)'; test -n "$(neuronhomepythondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomepythondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomepythondir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(neuronhomepythondir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(neuronhomepythondir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(neuronhomepythondir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(neuronhomepythondir)/$$dir" || exit $$?; }; \ done uninstall-nobase_neuronhomepythonDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_neuronhomepython_DATA)'; test -n "$(neuronhomepythondir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(neuronhomepythondir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(neuronhomepythondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-nobase_neuronhomepythonDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-nobase_neuronhomepythonDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nobase_neuronhomepythonDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-nobase_neuronhomepythonDATA .PRECIOUS: Makefile #install-data-hook: # if test $(NRNPYTHON_PYMAJOR) -gt 2 ; then \ # $(PY2TO3) -w $(DESTDIR)$(neuronhomepythondir) ; \ # fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/python/neuron/000077500000000000000000000000001323325274500174005ustar00rootroot00000000000000neuron-7.5/share/lib/python/neuron/Makefile.am000066400000000000000000000001021323325274500214250ustar00rootroot00000000000000## Files which get installed in $(prefix)/share: SUBDIRS = rxd neuron-7.5/share/lib/python/neuron/Makefile.in000066400000000000000000000536161323325274500214600ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/python/neuron ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = rxd all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/python/neuron/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/python/neuron/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/python/neuron/__init__.py000066400000000000000000000412541323325274500215170ustar00rootroot00000000000000""" neuron ====== For empirically-based simulations of neurons and networks of neurons in Python. This is the top-level module of the official python interface to the NEURON simulation environment (http://neuron.yale.edu/neuron/). Documentation is available in the docstrings. For a list of available names, try dir(neuron). Example: $ ipython In [1]: import neuron NEURON -- VERSION 6.2 2008-08-22 Duke, Yale, and the BlueBrain Project -- Copyright 1984-2007 See http://neuron.yale.edu/credits.html In [2]: neuron.h ? Important names and sub-packages --------------------- For help on these useful functions, see their docstrings: neuron.init, run, psection, load_mechanisms neuron.h The top-level Hoc interpreter. Execute Hoc commands by calling h with a string argument: >>> h('objref myobj') >>> h('myobj = new Vector(10)') All Hoc defined variables are accessible by attribute access to h. Example: >>> print h.myobj.x[9] Hoc Classes are also defined, for example: >>> v = h.Vector([1,2,3]) >>> soma = h.Section() More help is available for the respective class by looking in the object docstring: >>> help(h.Vector) neuron.gui Import this package if you are using NEURON as an extension to Python, and you would like to use the NEURON GUI. If you are using NEURON with embedded python, "nrniv -python", use rather "nrngui -python" if you would like to use the NEURON GUI. $Id: __init__.py,v 1.1 2008/05/26 11:39:44 hines Exp hines $ """ ## With Python launched under Linux, shared libraries are apparently imported ## using RTLD_LOCAL. For --with-paranrn=dynamic, this caused a failure when ## libnrnmpi.so is dynamically loaded because nrnmpi_myid (and other global ## variables in src/nrnmpi/nrnmpi_def_cinc) were not resolved --- even though ## all those variables are defined in src/oc/nrnmpi_dynam.c and that ## does a dlopen("libnrnmpi.so", RTLD_NOW | RTLD_GLOBAL) . ## In this case setting the dlopenflags below fixes the problem. But it ## seems that DLFCN is often not available. ## This situation is conceptually puzzling because there ## never seems to be a problem dynamically loading libnrnmech.so, though it ## obviously makes use of many names in the rest of NEURON. Anyway, ## we make the following available in case it is ever needed at least to ## verify that some import problem is traceable to this issue. ## The problem can be resolved in two ways. 1) see src/nrnmpi/nrnmpi_dynam.c ## which promotes liboc.so and libnrniv.so to RTLD_GLOBAL (commented out). ## 2) The better way of specifying those libraries to libnrnmpi_la_LIBADD ## in src/nrnmpi/Makefile.am . This latter also explains why libnrnmech.so ## does not have this problem. #try: # import sys # import DLFCN # sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL) #except: # pass import sys embedded = True if 'hoc' in sys.modules else False try: import hoc except: try: #Python3.1 extending needs to look into the module explicitly import neuron.hoc except: # mingw name strategy exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1])) import nrn import _neuron_section h = hoc.HocObject() # As a workaround to importing doc at neuron import time # (which leads to chicken and egg issues on some platforms) # define a dummy help function which imports doc, # calls the real help function, and reassigns neuron.help to doc.help # (thus replacing the dummy) def help(request=None): global help from neuron import doc doc.help(request) help = doc.help try: import pydoc pydoc.help = help except: pass # Global test-suite function def test(): """ Runs a global battery of unit tests on the neuron module.""" import neuron.tests import unittest runner = unittest.TextTestRunner(verbosity=2) runner.run(neuron.tests.suite()) # ------------------------------------------------------------------------------ # class factory for subclassing h.anyclass # h.anyclass methods may be overridden. If so the base method can be called # using the idiom self.basemethod = self.baseattr('methodname') # ------------------------------------------------------------------------------ if sys.version_info[0] == 2: from neuron.hclass2 import hclass else: from neuron.hclass3 import hclass # global list of paths already loaded by load_mechanisms nrn_dll_loaded = [] def load_mechanisms(path): """ load_mechanisms(path) Search for and load NMODL mechanisms from the path given. This function will not load a mechanism path twice. The path should specify the directory in which nrnmodliv was run, and in which the directory 'i686' (or 'x86_64' or 'powerpc' depending on your platform) was created""" import platform global nrn_dll_loaded if path in nrn_dll_loaded: print("Mechanisms already loaded from path: %s. Aborting." % path) return # in case NEURON is assuming a different architecture to Python, # we try multiple possibilities arch_list = [platform.machine(), 'i686', 'x86_64', 'powerpc', 'umac'] for arch in arch_list: lib_path = os.path.join(path, arch, '.libs', 'libnrnmech.so') if os.path.exists(lib_path): h.nrn_load_dll(lib_path) nrn_dll_loaded.append(path) return print("NEURON mechanisms not found in %s." % path) import os,sys if 'NRN_NMODL_PATH' in os.environ: nrn_nmodl_path = os.environ['NRN_NMODL_PATH'].split(':') print('Auto-loading mechanisms:') print('NRN_NMODL_PATH=%s' % os.environ['NRN_NMODL_PATH']) for x in nrn_nmodl_path: #print "from path %s:" % x load_mechanisms(x) #print "\n" print("Done.\n") # ------------------------------------------------------------------------------ # Python classes and functions without a Hoc equivalent, mainly for internal # use within this file. # ------------------------------------------------------------------------------ class HocError(Exception): pass class Wrapper(object): """Base class to provide attribute access for HocObjects.""" def __getattr__(self, name): if name == 'hoc_obj': return self.__dict__['hoc_obj'] else: try: return self.__getattribute__(name) except AttributeError: return self.hoc_obj.__getattribute__(name) def __setattr__(self, name, value): try: self.hoc_obj.__setattr__(name, value) except LookupError: object.__setattr__(self, name, value) def new_point_process(name,doc=None): """ Returns a Python-wrapped hoc class where the object needs to be associated with a section. doc - specify a docstring for the new pointprocess class """ h('obfunc new_%s() { return new %s($1) }' % (name, name)) class someclass(Wrapper): __doc__ = doc def __init__(self, section, position=0.5): assert 0 <= position <= 1 section.push() self.__dict__['hoc_obj'] = getattr(h, 'new_%s' % name)(position) # have to put directly in __dict__ to avoid infinite recursion with __getattr__ h.pop_section() someclass.__name__ = name return someclass def new_hoc_class(name,doc=None): """ Returns a Python-wrapped hoc class where the object does not need to be associated with a section. doc - specify a docstring for the new hoc class """ h('obfunc new_%s() { return new %s() }' % (name, name)) class someclass(Wrapper): __doc__ = doc def __init__(self, **kwargs): self.__dict__['hoc_obj'] = getattr(h, 'new_%s' % name)() for k,v in list(kwargs.items()): setattr(self.hoc_obj, k, v) someclass.__name__ = name return someclass # ------------------------------------------------------------------------------ # Python equivalents to Hoc functions # ------------------------------------------------------------------------------ xopen = h.xopen quit = h.quit def hoc_execute(hoc_commands, comment=None): assert isinstance(hoc_commands,list) if comment: logging.debug(comment) for cmd in hoc_commands: logging.debug(cmd) success = hoc.execute(cmd) if not success: raise HocError('Error produced by hoc command "%s"' % cmd) def hoc_comment(comment): logging.debug(comment) def psection(section): """ function psection(section): Print info about section in a hoc format which is executable. (length, parent, diameter, membrane information) See: http://neuron.yale.edu/neuron/docs/help/neuron/neuron/nrnoc.html#psection """ section.push() h.psection() h.pop_section() def init(): """ function init(): Initialize the simulation kernel. This should be called before a run(tstop) call. Equivalent to hoc finitialize(): http://neuron.yale.edu/neuron/docs/help/neuron/neuron/nrnoc.html#finitialize """ h.finitialize() def run(tstop): """ function run(tstop) Run the simulation (advance the solver) until tstop [ms] """ h('tstop = %g' % tstop) h('while (t < tstop) { fadvance() }') # what about pc.psolve(tstop)? _nrn_dll = None _nrn_hocobj_ptr = None _double_ptr = None _double_size = None def numpy_element_ref(numpy_array, index): """Return a HOC reference into a numpy array. Parameters ---------- numpy_array : :class:`numpy.ndarray` the numpy array index : int the index into the numpy array .. warning:: No bounds checking. .. warning:: Assumes a contiguous array of doubles. In particular, be careful when using slices. If the array is multi-dimensional, the user must figure out the integer index to the desired element. """ global _nrn_dll, _double_ptr, _double_size, _nrn_hocobj_ptr import ctypes if _nrn_hocobj_ptr is None: _nrn_hocobj_ptr = nrn_dll_sym('nrn_hocobj_ptr') _nrn_hocobj_ptr.restype = ctypes.py_object _double_ptr = ctypes.POINTER(ctypes.c_double) _double_size = ctypes.sizeof(ctypes.c_double) void_p = ctypes.cast(numpy_array.ctypes.data_as(_double_ptr), ctypes.c_voidp).value + index * _double_size return _nrn_hocobj_ptr(ctypes.cast(void_p, _double_ptr)) def nrn_dll_sym(name, type=None): """return the specified object from the NEURON dlls. Parameters ---------- name : string the name of the object (function, integer, etc...) type : None or ctypes type (e.g. ctypes.c_int) the type of the object (if None, assumes function pointer) """ # TODO: this won't work under Windows; will need to search through until # can find the right dll (should we cache the results of the search?) import os if os.name == 'nt': return nrn_dll_sym_nt(name, type) dll = nrn_dll() if type is None: return dll.__getattr__(name) else: return type.in_dll(dll, name) nt_dlls = [] def nrn_dll_sym_nt(name, type): """return the specified object from the NEURON dlls. helper for nrn_dll_sym(name, type). Try to find the name in either nrniv.dll or libnrnpython1013.dll """ global nt_dlls import ctypes import os if len(nt_dlls) is 0: b = 'bin' if h.nrnversion(8).find('i686') is 0: b = 'bin' path = os.path.join(h.neuronhome().replace('/','\\'), b) p = sys.version_info[0]*10 + sys.version_info[1] for dllname in ['nrniv.dll', 'libnrnpython%d.dll'%p]: p = os.path.join(path, dllname) nt_dlls.append(ctypes.cdll[p]) for dll in nt_dlls: try: a = dll.__getattr__(name) except: a = None if a: if type is None: return a else: return type.in_dll(dll, name) raise Exception('unable to connect to the NEURON library containing '+name) def nrn_dll(printpath=False): """Return a ctypes object corresponding to the NEURON library. .. warning:: This provides access to the C-language internals of NEURON and should be used with care. """ import ctypes import os import platform import glob try: #extended? if there is a __file__, then use that if printpath: print ("hoc.__file__ %s" % hoc.__file__) the_dll = ctypes.cdll[hoc.__file__] return the_dll except: pass neuron_home = os.path.split(os.path.split(h.neuronhome())[0])[0] success = False if sys.platform == 'msys' or sys.platform == 'win32': p = 'hoc%d%d' % (sys.version_info[0], sys.version_info[1]) else: p = 'hoc' base_path = os.path.join(neuron_home, 'lib' , 'python', 'neuron', p) for extension in ['', '.dll', '.so', '.dylib']: dlls = glob.glob(base_path + '*' + extension) for dll in dlls: try: the_dll = ctypes.cdll[dll] if printpath : print(dll) success = True except: pass if success: break if success: break else: raise Exception('unable to connect to the NEURON library') return the_dll # TODO: put this someplace else # can't be in rxd because that would break things if no scipy _sec_db = {} def _declare_contour(secobj, secname): j = secobj.first center_vec = secobj.contourcenter(secobj.raw.getrow(0), secobj.raw.getrow(1), secobj.raw.getrow(2)) x0, y0, z0 = [center_vec.x[i] for i in range(3)] # (is_stack, x, y, z, xcenter, ycenter, zcenter) _sec_db[secname] = (True if secobj.contour_list else False, secobj.raw.getrow(0).c(j), secobj.raw.getrow(1).c(j), secobj.raw.getrow(2).c(j), x0, y0, z0) def _create_all_list(obj): # used by import3d obj.all = [] def _create_sections_in_obj(obj, name, numsecs): # used by import3d to instantiate inside of a Python object setattr(obj, name, [h.Section(name="%s[%d]" % (name, i), cell=obj) for i in range(int(numsecs))]) def _connect_sections_in_obj(obj, childsecname, childx, parentsecname, parentx): # used by import3d childarray, childi = _parse_import3d_name(childsecname) parentarray, parenti = _parse_import3d_name(parentsecname) getattr(obj, childarray)[childi].connect(getattr(obj, parentarray)[parenti](parentx), childx) def _parse_import3d_name(name): if '[' in name: import re array, i = re.search(r'(.*)\[(\d*)\]', name).groups() i = int(i) else: array = name i = 0 return array, i def _pt3dstyle_in_obj(obj, name, x, y, z): # used by import3d array, i = _parse_import3d_name(name) h.pt3dstyle(1, x, y, z, sec=getattr(obj, array)[i]) def _pt3dadd_in_obj(obj, name, x, y, z, d): array, i = _parse_import3d_name(name) h.pt3dadd(x, y, z, d, sec=getattr(obj, array)[i]) def numpy_from_pointer(cpointer, size): if sys.version_info.major < 3: return numpy.frombuffer(numpy.core.multiarray.int_asbuffer( ctypes.addressof(cpointer.contents), size * numpy.dtype(float).itemsize)) else: buf_from_mem = ctypes.pythonapi.PyMemoryView_FromMemory buf_from_mem.restype = ctypes.py_object buf_from_mem.argtypes = (ctypes.c_void_p, ctypes.c_int, ctypes.c_int) cbuffer = buf_from_mem( cpointer, size * numpy.dtype(float).itemsize, 0x200) return numpy.ndarray((size,), numpy.float, cbuffer, order='C') try: import ctypes import numpy import traceback vec_to_numpy_prototype = ctypes.CFUNCTYPE(ctypes.py_object, ctypes.c_int, ctypes.POINTER(ctypes.c_double)) def vec2numpy(size, data): try: return numpy_from_pointer(data, size) except: traceback.print_exc() return None vec_to_numpy_callback = vec_to_numpy_prototype(vec2numpy) set_vec_as_numpy = nrn_dll_sym('nrnpy_set_vec_as_numpy') set_vec_as_numpy(vec_to_numpy_callback) except: pass def _has_scipy(): """ to check for scipy: has_scipy = 0 objref p if (nrnpython("import neuron")) { p = new PythonObject() has_scipy = p.neuron._has_scipy() } """ try: import scipy except: return 0 return 1 def _pkl(arg): #print 'neuron._pkl arg is ', arg return h.Vector(0) def nrnpy_pr(s): sys.stdout.write(s.decode()) return 0 if not embedded: try: # callback in place of hoc printf # ensures consistent with python stdout even with jupyter notebook. nrnpy_pr_proto = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_char_p) nrnpy_set_pr = nrn_dll_sym('nrnpy_set_pr') nrnpy_set_pr.argtypes = [nrnpy_pr_proto] nrnpy_pr_callback = nrnpy_pr_proto(nrnpy_pr) nrnpy_set_pr(nrnpy_pr_callback) except: print("Failed to setup nrnpy_pr") pass neuron-7.5/share/lib/python/neuron/doc.py000066400000000000000000000133751323325274500205300ustar00rootroot00000000000000""" neuron.doc =================== This module is used behind the scenes to generate docstrings of all HocObjects of various types To get general help on the neuron module try: >>> import neuron >>> help(neuron) or in Jupyter In []: import neuron In []: neuron ? From there, you can get help on the various objects in the hoc world: In []: fom neuron import h In []: v = h.Vector() In []: ? v.to_python a feature whose implementation is based on the neuron.doc module. """ import pydoc,sys,io,inspect from neuron import h header = """ NEURON+Python Online Help System ================================ """ # override basic helper functionality to give proper help on HocObjects class NRNPyHelper(pydoc.Helper): def __call__(self, request=None): if type(request)==type(h): pydoc.pager(header+request.__doc__) else: pydoc.Helper.__call__(self,request) help = NRNPyHelper(sys.stdin, sys.stdout) def doc_asstring(thing, title='Python Library Documentation: %s', forceload=0): """return text documentation as a string, given an object or a path to an object.""" try: object, name = pydoc.resolve(thing, forceload) desc = pydoc.describe(object) module = inspect.getmodule(object) if name and '.' in name: desc += ' in ' + name[:name.rfind('.')] elif module and module is not object: desc += ' in module ' + module.__name__ if not (inspect.ismodule(object) or inspect.isclass(object) or inspect.isroutine(object) or inspect.isgetsetdescriptor(object) or inspect.ismemberdescriptor(object) or isinstance(object, property)): # If the passed object is a piece of data or an instance, # document its available methods instead of its value. object = type(object) desc += ' object' return title % desc + '\n\n' + pydoc.text.document(object, name) except (ImportError, ErrorDuringImport) as value: print(value) # override systemwide behaviour pydoc.help = help doc_h = """ neuron.h ======== neuron.h is the top-level HocObject, allowing interaction between Python and Hoc. It is callable like a function, and takes Hoc code as an argument to be executed. The top-level Hoc namespace is exposed as attributes to the h object. Ex: >>> h = neuron.h >>> h("objref myvec") >>> h("myvec = new Vector(10)") >>> h.myvec.x[0]=1.0 >>> h.myvec.printf() 1 0 0 0 0 0 0 0 0 0 NEURON classes are defined in the h namespace and can be constructed as follows: >>> v = h.Vector(10) >>> soma = h.Section() >>> input = h.IClamp(soma(0.5)) More help on individual classes defined in Hoc and exposed in Python is available using Jupyter's online help feature In []: ? h.Section or in standard Python by python help system >>> help(h.Vector) For a list of symbols defined in neuron.h try: >>> dir(neuron.h) NOTE: Several Hoc symbols are not useful in Python, and thus raise an exception when accessed, for example: In []: h.objref --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/emuller/hg/nrn_neurens_hg/ in () TypeError: Cannot access objref (NEURON type 323) directly. In []: h.objref ? Object `h.objref` not found. """ default_class_doc_template = """ No docstring available for class '%s' Try checking the online documentation at: https://www.neuron.yale.edu/neuron/static/py_doc/index.html """ default_object_doc_template = """ No docstring available for object type '%s' Try checking the online documentation at: https://www.neuron.yale.edu/neuron/static/py_doc/index.html """ default_member_doc_template = """ No docstring available for the class member '%s.%s' Try checking the online documentation at: https://www.neuron.yale.edu/neuron/static/py_doc/index.html ================================================== %s """ def _get_from_help_dict(name): return _help_dict.get(name, '') def _get_class_from_help_dict(name): result = _get_from_help_dict(name) if not result: return '' methods = dir(h.__getattribute__(name)) for m in methods: if name + '.' + m in _help_dict: result += '\n\n\n%s.%s:\n\n%s' % (name, m, _help_dict[name + '.' + m]) return result _help_dict = None def get_docstring(objtype, symbol): """ Get the docstring for object-type and symbol. Ex: get_docstring('Vector','sqrt') returns a string """ global _help_dict if _help_dict is None: import neuron import os import zlib import pickle f = open(os.path.join(os.path.split(neuron.__file__)[0], 'help_data.dat'), 'rb') _help_dict = pickle.loads(zlib.decompress(f.read())) f.close() if (objtype,symbol)==('',''): return doc_h # are we asking for help on a class, e.g. h.Vector if objtype == '': if symbol in _help_dict: return _get_class_from_help_dict(symbol) else: return default_class_doc_template % symbol # are we asking for help on a object, e.g. h.Vector() if symbol == '': if objtype in _help_dict: return _get_class_from_help_dict(objtype) else: return default_object_doc_template % symbol # are we asking for help on a member of an object, e.g. h.Vector.size full_name = '%s.%s' % (objtype, symbol) if full_name in _help_dict: return _get_from_help_dict(full_name) else: return default_member_doc_template % (objtype,symbol, get_docstring(objtype,"") ) neuron-7.5/share/lib/python/neuron/gui.py000066400000000000000000000023611323325274500205400ustar00rootroot00000000000000""" Import this module if you would like to use the NEURON GUI. It loads nrngui.hoc, and starts a thread to periodically process the NEURON GUI event loop. """ from neuron import h import threading import time #recursive, especially in case stop/start pairs called from doNotify code. _lock = threading.RLock() def stop(): _lock.acquire() def start(): _lock.release() def process_events() : _lock.acquire() try: h.doNotify() except: print ("Exception in gui thread") _lock.release() class LoopTimer(threading.Thread) : """ a Timer that calls f every interval """ def __init__(self, interval, fun) : """ @param interval: time in seconds between call to fun() @param fun: the function to call on timer update """ self.started = False self.interval = interval self.fun = fun threading.Thread.__init__(self) self.setDaemon(True) def run(self) : h.nrniv_bind_thread(threading.current_thread().ident); self.started = True; while True: self.fun() time.sleep(self.interval) if h.nrnversion(9) == '2' or h.nrnversion(8).find('mingw') > 0: timer = LoopTimer(0.1, process_events) timer.start() while not timer.started: time.sleep(0.001) h.load_file("nrngui.hoc") neuron-7.5/share/lib/python/neuron/hclass2.py000066400000000000000000000026161323325274500213160ustar00rootroot00000000000000#Python2 only # ------------------------------------------------------------------------------ # class factory for subclassing h.anyclass # h.anyclass methods may be overridden. If so the base method can be called # using the idiom self.basemethod = self.baseattr('methodname') # ------------------------------------------------------------------------------ from neuron import h, hoc class MetaHocObject(type): """Provides Exception for Inheritance of multiple HocObject""" def __new__(cls, name, bases, attrs): #print cls, name, bases m = [] for b in bases: if issubclass(b, hoc.HocObject): m.append(b.__name__) if (len(m) > 1): raise TypeError('Multiple Inheritance of HocObject in %s' % name + ' through %s not allowed' % ','.join(m)) #note that join(b.__name__ for b in m) is not valid for Python 2.3 return type.__new__(cls, name, bases, attrs) def hclass(c): """Class factory for subclassing h.anyclass. E.g. class MyList(hclass(h.List)):...""" if c == h.Section : return nrn.Section #class hc(hoc.HocObject, metaclass=MetaHocObject): class hc(hoc.HocObject): def __new__(cls, *args, **kwds): kwds2 = {'hocbase': cls.htype} if 'sec' in kwds: kwds2['sec'] = kwds['sec'] return hoc.HocObject.__new__(cls, *args, **kwds2) setattr(hc, 'htype', c) return hc neuron-7.5/share/lib/python/neuron/hclass3.py000066400000000000000000000026171323325274500213200ustar00rootroot00000000000000#Python 3 only # ------------------------------------------------------------------------------ # class factory for subclassing h.anyclass # h.anyclass methods may be overridden. If so the base method can be called # using the idiom self.basemethod = self.baseattr('methodname') # ------------------------------------------------------------------------------ from neuron import h, hoc class MetaHocObject(type): """Provides Exception for Inheritance of multiple HocObject""" def __new__(cls, name, bases, attrs): #print cls, name, bases m = [] for b in bases: if issubclass(b, hoc.HocObject): m.append(b.__name__) if (len(m) > 1): raise TypeError('Multiple Inheritance of HocObject in %s' % name + ' through %s not allowed' % ','.join(m)) #note that join(b.__name__ for b in m) is not valid for Python 2.3 return type.__new__(cls, name, bases, attrs) def hclass(c): """Class factory for subclassing h.anyclass. E.g. class MyList(hclass(h.List)):...""" if c == h.Section : return nrn.Section class hc(hoc.HocObject, metaclass=MetaHocObject): #class hc(hoc.HocObject): def __new__(cls, *args, **kwds): kwds2 = {'hocbase': cls.htype} if 'sec' in kwds: kwds2['sec'] = kwds['sec'] return hoc.HocObject.__new__(cls, *args, **kwds2) setattr(hc, 'htype', c) return hc neuron-7.5/share/lib/python/neuron/help_data.dat000066400000000000000000006112471323325274500220260ustar00rootroot00000000000000xœÄ½iwÛV–.ü½Zé\Q. )ËS•ë.'q*îδbWÕ½ËòAÑ&6Jbå¦û»Ÿ=œ%ÇIõ›®NDààÌgŸ=>{0_þåÍáY-—ùò˪lóÛ6muÞ,ªåüð_Öczÿf[¶Ùíóó2¡&“v‘¼HÖ3_lpUÌ&“óÿwG™aÒ.\¹¯òfV붨J­ù§¼ÝÔ%•É÷YR]òƒ¦ÚÔ³<¹Îê"›.ódž·y½*Ê|žL·\Ⲩ›6Éê«DjÓŸ_nÊÙóÉ÷yK£›$³ªlÚz3k«:¹Y³ER4ɦ¡jÚ*Éš¦šY›ó—Ôá䦠dZc·×EfÕÏòår’¤ÉkímNí̹3Tý𯒗mg`R'ÆÁ¡rWÅuŽág­/–&oôj•·‹jžÌ²2©Êå6™æô7-Ù<)¤E© ]¦ÒÕ›|›Í4QIF=Šº»Èªˆš¤^Õ¦¡Š¥Ö4Á ÑêŸþKCÛcYµoÙ:O©K7ôôí‰4¥QæÙ²©žëò=G'ŸO|ɉVrW’×Y“ÓãÇwÕò—:[/¤¨Uó$®f™Mó%=~z5\Ôªy†j¾ü[5ÏSZ÷‹Ë¬i/ŠU¾¢W£“ysÐÙìÓªZæ4í/’ÙõÎ7ƒÎ®¿»°¾½ãü} Poò!mÔÕzC;±¸ O§uVæççÉ%íZ!íÕŠ¶T“Ì7uQ^ÑmŠÕf™¡®Têâ}Cÿ›-«&§•­sz-ûÜ×éÏ€¶G[žû°È¥"u†íB•×´ g‹¬,š¾(Ê&¯[l–oª›ü:¯‡ÎʪÕjxë×Y±DgéåáÑ÷ßœf¦l¨× lùµ¶yÆç~õòál5NEžR¯Ûl)u¹¾Ï6usUmZG&d^¨rê`vM â¤Êwt¬NèHæYRÒÚ4É`YÍxÂ<§Ã1B-Èo¨žyEEi 4ÿµ)j7ª-ž:’6#ÉÕ5:±ÚÐübä5Õ†ç7Uý¡ÑÓ/«·VúË‹¨]bÊãH }¾V"Ф2#Ö1©I{—¼þêe°¦2A´ø€›ê§kòHwK¼rùmÑÐæ¢õÉzv=&?ºG¨ Ðt‹)51EQâ$ä³!ܬx©.“Qн@§m„“øÅo²ëüMK{3-®Êªi…·Nm§KßÖëjúŸ8EuÏ9ªÝyü±*¨Åu]Íò¦¡¹ñ¤EZeõêÚë¿|ÿÃO¯´r™±›'ëC±ÆVZÑH“†ºö(1è<Õ²o˜@ZÎ2[&Kš'Ý{ =æþÍ“u§åÕ†JMåVi²U®5i¼)ÂF˜L˜ô^~­h»â Èn5mˆˆÐ\%¥ŸÏ–tg)™›ØÙê}^:Jæ Ô"u5FLˆýçÕm>£óßp'mX ÝÈkÚ|´8LnÒÄ`ôT—6c‰­\EøG®dìP×ú ¥–“ì’æ0(LÇ2¿é¶È ÌçB¶¬g6¾Ý!Çcúz¹i:$ž^Zº?ho6Ó†N Z@÷Tï¿ëôTöE›Õ-w‘hXÍÄ›Eµ¡ 8—Iœ'ÿ)+Näš–—ë[/[éš"’·©e?Ppn¹Òp6èúÚæóýãºÎp‰i‹r“ë¤wFÌû­áNÒŽ_Q•Ûä’[Ÿ+MÎNä4Ž—1ðU>û^.‹õE[ááãÝ+×^Š;®Ê¯—8§²)ŠC"3³¬&Â{S”óêæ$oæh-¡‰'♕ —R޶8”ò(1bÄÜ…p‰)ñCØgèÞÓ]ö÷[Ž´Ú™/Ûåú áéc²ãŒb¢ò)s¦ÜÉ["ý%ïþ#L>R4>épBô.,½4”M5b*>™HGhnuÿŽ’4F™‡zþ¸ß¸:èžÔ½‡âÊ×òÛ˜«ò ëvD¶^çå<`"GÌrýDd®Z¥ó¢™mÊâ¢ÅÉîäÖ®]Ï7Ä#Ww‰ _r7©ïø‚v"n+j%¸®h7ÊN jë¼Ú}•×tuÕTPª¡¦°—Иëõ˜¯'9)…Æ›™È^w÷{>ºc4‰×ղͮˆïcÒ—ð@'‰ìu¶Üä2³Ä %ÓlöÁv·r)îh~‘·7¸}3¯dv³ µLÁË[¬ÖUÝfT=ö ]Ö;!öržã~qu'º`À3råf5¥YåûAØÐ¡²>Á÷ŽUl¬ez§U1MQæ }…›ÓŒ)© ÏRî=ª›ÎzÃ2„<Ú©y9Û&Æ”ÈÌ-KGÉ­ âzîý~¼÷ûK&œ÷|¿’ÏM̸³x§¬œ^£>ÝÂßqáŒÇm[Ìäd³ N¢…‰6h›öY·"™Û`b­üÝí¿ÚÓ¾V„¯u¿¤%¡a^Ã9íoµé~üzO³»5¥ûi$ØnÛo´{ÛⲘÑnN ‘hIÔ«g§ ÖUC›žháMN´½=ŠO Ë7͆øËÒHQV)bcÑ€øˆl‹ÖÄè–8F‚p‡F»#Á¾O©Ÿn`Jt¥7e~•ÝÑp„rírψŽ/׋̋XËâCîH¨p>6oÉw•§)u>+XäJ¨éHxÅw}Ô¥`E£wåå% ’¸#œíMŽÞXÕÝ)h9Á*sƒ°âDbR”—\Ñ”I±1˜…ºÊf̶òwަövÜÛðC'tÄÆt4ªÇøE^vÖdKPóÄG ¿~è‰V¤ÉË6ÔðÕ|dªhÌ ÝÉŸt|Òóÿ˜‚*Š®º½Yµ²Aks«âO½PTËP»ðw›4×ãuÕÊJ¹zd®äÖ’SCâ‹Òt‘{* nÕù±¿=¸3¢1a¡ÈÏnf]ˆÙ¬ªçø­SîN¿¼w4 \éž5(6¾ÿá-:0’¸Ë¨§T×QJRª;á;g§!ц:×@áÂúÛ‚4‚Jt_²u¨YÝõ#vh'Í73°‘«ì¶XѲìG(0’SÏÓ6¶n›Ç»ÒÜ®Ü^èiš>>…œÈ›JIFLþ´hÛõó‡Ë|SÓ‰ØÒ¥ù|ópq¥ðÑÃËb™?l‹õžZþ<¹0ÉÏq g¡¼T5-v” MãÇ÷ MÁ÷HNaÉÿñ -6Û2[c·ò9Q3¨´wÿÓÂÔy¹WÓ-méÆiêîñ“€áAH±s£^vÎXª;¹!bZëlfEå‚u^ â;Ýê\‹Ý-žËý<Ö§±V÷qT»»èe,„)¡¾AÁJÕr»jnÜåÁ¤g†wMx\_–ÐQãÎQCÒ7¹»r«3Þ•Ï1õAyd:¾%¸ƒÖ?ã0¤0߬‹¼¨M ÀªÚUòçÉÈo¿Õ =9¢5_ åòWbRÍh²LZ;òWƒ\0žg•¯XªÈ›b•-mQYna…ÿÈѬ ëÁñ€ž'Ô‡´­ˆ¦¿dñ¤s/£‹#î"ÿ÷F=oø†Õ:táô™Þ):‡\—;wáµÃeúZÈŒºuy ™ë‘¬T´x®J[ݯD‰â;;~Hôœ1¶.¼lUéç ›=Ÿà‹ûâîÚÙðiüáw$×ÕlCâVj¬5a”ÞPz’žáŒbùéF²w°­gvfWsÁ«°9°V°žƒöØÖòWÞP£ßå†é eôîY@ïÆ0aöh™"z7î¥w+£b'ÒM"øË# 9{?,¦øÌñ–ö …аù±2f!T·;˜»Ý'êu«¹CÐ{™,óìÃÖÑUê{­U2¯Ùb>ÝÒvgaGv3ÒÍ'™ÊSG¤ÀÏÐ6y}ÜämËzBWñÁ´ÈšWÅ/&T-7Mð1ݳ»Só‹ÙïûÞªÙV7P@ŸìT3T§tÛêÏ2Ú«2¥VÜ,«ð«ÕšOÊx׺Úr‡ìr—Æwò ·,¦ø¢9r¼ (ç‚à®A&JŠePe\ïÄhYr%’3­7k%§[»$ÙªÚ ê_ËæŽ"2ÞÃæžŽ¼·@ÝVð78íÑþÞ:‹? uéIç-âiÆîõ„iœ¢t™ØGI^× ÕÕ2¯qß§Â|9„íL‰¸–5±Ù•}Ë&‘Ël³l})÷Gå$œÿ·ìx³„ =kÛ|µnÙrD'z˜¤’aèV§ë­t— ÄNãz˜rPKe«Ê )âkWñ±µ’—¡œŸãE½ú“÷ËQòÿÜ®ð—ÿGÌ/”q¡ø7 †ççÔú·|uRg·ß:c›­úÕÈ‹¢”ð·Ã$W¼gƒ®¬‰¹ýAB:ºœüðS¢?Ñ™®GèôF¿´Áòô­3ñÿÆô»B“äÈmÙÓ@2«sÈáxÚ£ÄU!FÊ DËÜÙºq‘;_®·°-‚šÞYîààÎ×íu>£¹Ó>¶þsçaÂM ;ÕþÖ{–)ñšAZ•% `mž†])~\‹÷–tŠ=qâZ³ÔÒz™áôÅ[îÚù}ÓåÕ*̯«›V ²Ÿ°8géMóÅs3‰¾5hM2°pÚ“¡JÂx¢ÃœfMáŒ3Î"ýf/Z'Žhd•ÀÀ¯]ÎPæ0š“œ¯«Á‚]¡ö’à‰“tWé„tAùìoÁ€£^ÙŸT¾‘𢮮ˆå¸rtô5lÆuxè}cê|U]îN&‰tL>™5ĹeÖÉÊñ÷EبBt¤®¶V»¿ä–YÓvv™êÈÄ,ç?ÄzÐ33Ã3Ý•Öíb~ë§@š-.‹p<¶¿Ú¸ãzçY#•²«1m™²KÌ‘­è¨¦yÐ%¢ˆ´á¥÷¡o‘Ö(ѱÐMŸ¶>ZÕŸJ•[ª%±,xUÌ gŠeï¨çñÍ0£»óxJWËSz0KÆJø¾ A3k/›e`vü£ÓŽ·BjíÜ¥$[]\“ïië€ÂÎ^˜ØN F€@ vîJ¹c [8“<‰Í)–öÌŸ€@¡žÑj.üAwJ¸õk­L×Û ÚnÕR±b¹ÝÐÐvólg˜üpc°9\%](0¬*ÕÊ:?VCÀÂ÷J÷Ä”7ИÑ›bµ^—[^•Éäsj®`ƹՈºU­v\¯3žÁA{ ñÐKE1i|ëzßÕ’°·@Áý,à¾×V=¥X3ox",i³²bîÅéÞ»bþÞyDY—ð7™ TÆ6P>“ Ÿ]ñI0¦ƒ–©îz©'°®››Î­m7™1úAÔol[‚ "5½†Ÿ³\Šàçœv»ÉáˆyGŸMéX9׊Mõ«ÛŒ:7+]Ï£µlRç‘*D)ƒÓ!íEö–1¥å`¶‰,t{þh$1 à­$L¿º9$‹arµ)âbMµÊ˜¼Q*Pf«üÅù!žŸÅSqoœ.»/¿¥zNÓÑÓÓ“gOŸ>¦ÿ>yvò¤Sf^dPëŒNüóBµ_.i(58IÏŽŽÂé|S³6h=¥Ðf<¢+®Ž]³A%W)¸‹ÁÉ09&ÇOé¿N¢×ð¯»]×4¸kîÀùál&ýï$}Š=&c%ŠÔÉ£¸UâW‰$Àap¬ ¯OMûzp ôÍ %vÉ|~•ÈÆpCO¯iŸ_$Ÿ'ƒEJ Vð&œü³H±Ñê (ú(ùŒ¸3vÒ£½‡# ;Ú•0-ì¥ËÒJš¼ÄÉäÓWö™Ê-,Ó˜}¬qw`Ö:“¨2éNo*nô¦h %|ù]njÐñ4í_¤" =£¡’ 3Êu7s9‹.,7=÷–&¼¬‚Ø ì êâMÖÒ &ÿ¯Â4av|p† 5ÛÒûæDÕ)]”u<êtTGt‘Í SÞÖ*òYR1#ž-S^•˦Lžd3M‰AÛb¶üRñæàB;Õ§«`|âZÆ»°ÃõŠ}g Ç)ó\?ýI4[ÜäwF@›)âtÿŠ6X_ëÂ{ô×n]ÍØhöoþBÂÏ;Ù,+Á?"ºCæM;qYûµe‹|‰¥cÛÓi3ƒýÇ›/i­&i"h•Bÿ•?h¯½›sP÷3Ê¢6û@gË ã4š—M›YA|‚ÔJìUÚi58)ØÚq˜I'ʤKQǯÒ}¤ðøÄŽ©Å"úhƒÛ€$y †Ÿ–»ÝÞϩޕ5¤¹®|À«3:!iíÿztFÿŸœõ¤—#’îNIÀÉm¼§àîcta0ê>Y`9úo0:;é wò5FX$bµS9•rчÔÉôHæ¯gÐò‰ì>*~”è5Ñ6ºÄ™èB>:Aà õ®’\¨°Y…;j =óÀñY¡€ÖIú+ƒ*õ›8ïÊJ“ÝgDv·GÃκÚ_vz¿žU ð¬ˆÚmÎ̼íâìø£{‡Ñ@ŸEÄ•êîIŒ0:?ÅŠ8‚çÏéχügóhûU½¦Y+¯|+ω]•ÏIx†¡·g‘]•Äï³&¸=…ØiPKV7¦·î¡æìz¥auéî×R§‹»«Ê}—eW58…­OÃê%fúÊË72KײÊÔþ`·Æ[«ZÎÜM½x(q˜‹ ]ïyªá’îs»Rcà½| +úM](‡­Ó&éÉ÷ù ÊuZ;M_QöÌñ˜M’D7ûm*VÓº¦;òœfÖ3Ç›¯ò2¯åÒòîëy/…m ²–Enß²úÄ3!…rã®g<ˆƒÉË&O׊ñÐæû’æ1¼þ™Ù'×6{ÙÑcfi„§’{Ú3Ct*ÜÝÖÆ&°Æ¼AÍ<Ô°]¼ñŽT2 ¸„¡± V•…ӺʎÜaoÖf¶Ù´Xív(qºáë.½æ_¤º``RŸân»Ä¶Vm7±)¸©™ˆxÒýŒñPånï.‘yÿ@ßîþ™þ•9Ërp°ØRÍ+uâ¥SÑZ-©º’wÚ0Ø5ê+? ¶&5¦Ê  8›Y…0 ¬×yVû~uÅua>±¸&§?bƒ¶‚'\Ìi+TWxY´?é¶_¤q­ƒ>rDhßd³Y¾nAsgðX¼?Ú'üX­ˆ¨Y"ÕØÌ©)XÈ¡C(˜Õ¢G»˜û¨QóÌÎà,_©`=§iOÝæ2‚lx’þO²;teîLÕùáWU²­6¸.s¶Ÿðæ¥c¡ç‹ºI§ðC|~(ÏäoœÍÃ^e1½ü¿¾Jùæ_ÏsÙä÷H ðWºÅ‚ëËß`ñpüE¶{‰a¯±â„?zÜÛAØ™PÑEûs…ï/ûåG•K.\lý•k7sw›%{›°Õ\̸«@O˜„˜€çÝu—Ù×ïó=gŽfíù„¤$wâX3ö6¿m_ÍÄÏ{ôbz!¾ ñ¥ºby÷µüþH×'|a#ò½‘ù¡Šh¾q†2A¬!b÷‡@±)µ(H]ߌ¸à‚„ÈŬN-÷ˆÕr‚8äÀÙœÜ8ƒ¢6›g#Ñú¾%^ºII¾Ê1™g=~dqôy‘|@ð+n³ŠÏ˜ÚM{1¯páyƒÏ"í”ÐVâ óœ×|U¼JTYܱ6_‰ÐÃnJ\ŸÜ4rMÿê¯?ýð½çhi\±¾“Z<—ÀîSPñR¾‚z®D•öS&Wíܦ*ðIü¢¤ag€ù¼<,–+(3¢3„› tÔ‚5jjžÝ©ÞWë¹ÄßÁYÄÇâV¾Ü,Í¢é$¿»Þ0w#ÆŽ-”ŠÊª³b§dÓ#ØÅJ{Ê™íS² êà{´ø7÷s?>åkÑKËÊ5´W+Ñ%±èŸ×Ç4àÒ†‡SGw0[úÁ%Ùj´¬ú–ËOî˜ý]˜LôÄ¿,¡†õÁ—µpuÀ;£÷4ÈÉ›˜þF+8€îù"•7L—$•W…†|‘RA\_Åmj'/ þ^É!ï¹z ‚_ç3”ès<µW¬€"òàãØ,(Õ2ŽžñÍð]FTò6mhýãpÖs-œ tCJ ¾¦cw!Æ¥N÷”&e ð‡rV-ïìm€œêa È'ʈ,i_y/MxÕ|fñ_|ÓlמéFñ‰¨öUĨÖyéâE2nØöÇ .ßL< ŒÂyÅ5.òÞ…|ù…YF¨­P†Æôhl&°N Ré*6Ëv?ˆ íÊ$/؃ÞrTCÕä!Ž„)…k—åÖiòÏ»g¡ÁAcÖ9T…¾4ˆZ†ì_)ŸR‘XSq¢Ý”±`ÌT$å™z©š›µ{zjfïP¼ª¯²ÒºÆƒgrjZbTbÞ,,„82§ºR•é/ÔŸ&oT §“iƒ·mª±}Áð4BèW¸£ÜÏ`wJ°Ù[-4±Z Ë´Æ¶‹ôJ+þH¶vüBÓ厛^aaÁ¦¿fðRwDdX¨Êl0Wà @}`‡ÚÐ¥ ûƒÏGsŸ­UI÷d2tάøí¸f«èŠéè1`÷Ts=­–Å,i¡s”«À×YkÅ7¯dGU^NÄ pº]rþ%AHàUCˆPÿÆ.‹b‰ ¢Ip—V< >? Ž2'‡µJo°&è{Ì,X FžÜk›]çÁ.Å@¡b«Ä¹ØúKÍ‚Ð颥Æ{œzÍêtÄü1³’å)üÃ÷°ê™R‰]k†~’u©xSÆé<ñð{j®ÒÓé†ÒîmøÀz‚ê¨vÓ~™;Ï6FKÀXj :° wwªQñ1t—Ë*kÍ7ZY¤%8&ˆ>d† –€ÐBÂ8¡·aª4™°ö܆±D EmއÃda¨‰Í‘4ðb†Ö$¿²-¤)yh;0ÁÖ:m.Ö›†moÜ=F«ÖæÒª8cˆÉëlè6\6Öʩҩåõ¢"AÚ¼.X”f’K„áq^xÜ É•GƯ<> D¥¼Ü\´Ì<îaZ_Â+] ßw<Þhv,nYeeª£Š3¥ ì`­øÓcPª­Ga½¬6µ¿´Ÿ3á&·Ãd;„§‹i´¬`^$£áxxªc6Ÿ×Tœ5I—p·Ž.i^µ[‰¾å bW¼ÛˆqþC›ƒ×ËRâ¼i«&°ÖtC¦4ŠùfQ\¶òs¬À“4c™<9=âA“dÙ÷¬\æOçÀIZdQ(éé½~6Ýõư°%ÎaÓvc/_ˆC>ŸtU[»I.ïD£ÈÌ|qéJGf‚fl å ¶$*sŽ™ç«Ê È5'âöDÇ¡†ƒt %Õ@ñ5£»êC¢#+;.ZÕ(ð6Å3ö 3„Re§ÂÀsڻĜ‰µ:þÃŽãÚïÌŒ4¸ÄbQÞ¼ïÚ,ûAWW(ýâE2î1Ò)䉽 #7퀳"Òi ±žRY=“rÑÎô”„¹ ÿùErÒÓí’TÐ÷9Ï¥j?W?õÏ›ÁçWGç‡ðõ›Ã´IK‰õo•í©£Cž»ÓÃóC„¡ASº>ŠŠ`_ œ+bž8Ÿ8¾LI¬xØ#•Ùë»œØ U™VŒN^Ù™gžM#2–ÎÝA&‰Èå µP ;ª‰ì*bïMaÁÓØ(8Èò©ÉCõ& Ä—ÈîËÐ?˜W…ð¬™5¢¨4ÍýGOXÀhUöáԸŰûK).tèîš<{Å<îl1/°Ozù)¿Àð®KïK}¥ùÿKà8@£¹™.٧Д¨'ØþÍf h­TÐj- ÞE®A"ŠìX3÷ Ò´Û`XOF8oÛ–x7þLo+o²ÀfC¿3¼@Ü©)Ý;eÞ^°ç.Ê<º ™{ÕÆÜ Š›„Cc˜¹é\bÒ-1ðûWo/~zõå«×{%F›À³j&¥Âõ±»d°>ÍI(@/º/h3¸{Æ{«[¼i%Š‚êªê0Ô”]Ì¢„”ŠæaÒ@öù?-_—¡„Äš'g» °^_”¢ôÒÃ¾Ñ dÚµØÝô$Ô³E‰{m ÜÌ·GЖáˆo ~ Âfz1«—k:į{mg4ì} ˆ~•qÕGnâ¬滃?9Toc>ÂÑ}ÿ×o¿õË({XÀé;yêM‰ÙÎùü÷ãõ̹k ß²‚¦a7tè ]­ò9âx ôù;WÃE+ÎŒ˜N É\ÕZ"¯ˆÍo$¤,k6S¨‡Á¾YCb9“¡jÙÔ>1V)\Á¸sʆ…LjÆ ð^'æ4Ž]OÄ,(eØž·lTÕ“¦ziãé ÙAaÏçfœžÓ®¬-^Úlxí‹s[é) Hð³àíjhJgšç©a[¹˜gµ¦j^Eb]{«[Ó§±ßÅlÀ­9%ýMÆò½ b{6¢‹Èl3w÷•Þž·K#ÉëFµÓÍ•ÓuÒW¼¢t(©­›ÖlG ™4Yhƒ ”ÆüíÕOÿ—î•i‹{á-o ½oúÔ£¼ZÅnôŽÝÊ%¤›’-@üÿ‘c¯dß'€óÙ6y|(«ˆÍn 8ÂMv™»xqÜa¥‚YúH¢e3ŬZo½Iƒu)j»fw‰ë@fœnh2[xzÀ³=e@ŠèJÛ»2¢8ãð†Þ~‘¼o¯²z'\ÑouLò&_êfµÊxo«ZŽOœ±Ô3Föƒ¡‹•® Çeu¢_NL‚o6c¤iÔ!».…veñ¤*Ø!—d*ŠÐh ±«<÷¥QA~KÒþ›…ÈÁg挿Íh"… ÂW@$¯ò’º¢kR"DÀÆð,V3Ð0NWNŽ¿ÔR^ãü$z²œ´EE3Rw0æt›rµ„ä}­wnQAó¡Ýr¼pÏV[¹íÓ‘WïÔU+!LO{ÔŸMPdÇ |w[µdËÿþÿû¶Î¨'[þ÷?èßw¥Jñh Â[\ù€yòÏÛ-ˆq™G}(̦¢šÝ¨ù,Ig’lZmÚ3Mtáª(Íw@—àÔˆ–ˆdéf—1z.ªç']°G—Sè xžQ!ŠÉ/h²ÒÛávøöt€O™?^·§s!¬xÔÓ„éŠ Óÿafõ>]mÿ‡ûËïLZã©O-û±ÛÀø4¦e+åozh¿a/*Zý5 ú1£Å¸ãé”1*Ìn7&^Ìrîz_+g1ì4É .+aéìýX Y}IœÊÏ>§#Ÿì󩕃,ͯ³ˆþ\_üŽ˜íI?uó„yùPƒpG¼Ô·>ýAm.OÁ ÓÝ·œ+'‹á£2¥˜ºðqÉOã@„¸i%ÍùaäÙNo~†wÂ)mnúÏÔ ÕÁ/q)Ñ»!rÀýó™éXOÓ“ž’MOI®:š#†2q›díâ &}Srëø×ÁøC4æ¤d4_nZÓdàQ+4z'¯IzÒY΄gèæÕËäê¢zÒ£O§m˜ÒñY8Ñ)¦÷üðªªæÓm~~ØY™8º*x0m:kT‹~ÓQßv+QºÑ÷M°åšÀ¦nÎXÓŒö|»1""*u'<Þ,“Iº»­-Óƒì\ DŸ{ÓO¿¨mª»Î$cw« ª Fª¸2IØ_¤ ÒÝ€òÍ»“÷ý<ÃÑ‘ÿàŒ÷v 0U &^Ý+àH.<àÌÒ øYú#Ï®‚öÀ‰ Ó!5â+EUJ¼kIÍñ$×ùøí'Îr›çì¨;˜½žg6Añ> ey·3TlâàÙœN®À©« 5d‰ÿÏçÝÑ—:5Äaaèhrr0qiòœÐlRÚgKÛ„¨ÏåÄÛé^“|÷×7oÍ]Ÿ=O¨:D 4ÞÆÓàðÎ1€©­”Ê:~¸¾en2ô&,òO>·¼n¶º»Ñ3mjGTXo»: äþ|<÷DWz÷»ÁÑîw;Ç$HGÆÆ‰!^Þy¬üzÂÀƒ¦J®àϤ”Áè„ƒÌ ˆÆùR£1Ù4?B<×hïoúãQÏõ„Ênß߇££›ÌOµ›¬ÏüSOòÛ_=ÃÁß¾ûß;d(Ñ.u>ÒŽ…ú‰]¼ƒãWéÕ'ï¸ëRДë¸ð¥_#E ¬×̳Ít¸CXª‰½D*#6²÷(Øãü÷êߣ£Ý-â‹bÞb^®“çÁc¿bqÍK®ù[ÆOþ˜,SA€\íÿÑ×Úò£Z n¾ŠvÁ»Ó÷ñÅæª[¤U§B¼âõ¾í¼pm‘ÚÛ*ÞÒ·øoÙ8Þ†@`¡å¿EØI8¦LÎ^­ˆ7½sÙìFüo1 *Êû ) I£ cCæåªMºÅ,^úø2ËÖ™0zŽï8h¸_Po׬à·â“I[v«D´Éd½œ›žtÌÕA#œh†ãÝä:R‡'LÀ•?€cÀ íœS~׊k®Ù—”y•¥@yÛ+rɺ•¾ùŠpÄ·Z»«Ñ™­EgŽ`üOœ¹x¶ ›g·á uóŽBL´]>Ý*©tt”ECX+É=ôI]‚•6µB‰ÒV\Ðé™;˜ŸUaÆÍø«ìu1 Õ¼Á€0‚Ü0Ü%‡½Öº ™Û4nÍ®ßO(K Í}“L+ @5õ×ÌEtÆšžØhfV¾ÚÍÂé‚Yµ.Kº YHAzN  Î@¨Û D>.ˆ•)õJú〪Yµb|¢ã¼‚·JʪÑÜ;-ò:äçD²œnnX"Šúi4èÌãöå*ßS`u¨Ú‘¾ö)'‡±ÍWT²ý[3‚t®’àAÒÐÅ[½=?d1»O~o ùøÈH¥êÒÄì ›qr·iWnwýKµcÍýmh^‚õ•4"WøöÐYt?ŸÃßfü‡ñGWí>}Ì7¶ÏbÏjùuÒ¨‰w €ß¼fÔ#Y³ÿ…5û·qw±nÝbõpØý£<‹xS^4C7û裮%f$¿.Zlø3¥œ ®ßeWSu2CÕHÅye³:3uífê{v¾gÐ…à¶w,Â.üºÞHñô}wNѱëÝéÜS :-Úè_A«ÚMÉžCSHEÄDGѨM¬s…“*é*Z:#jgŸz›¯ÙS@Ökfîô¿au°/GñlÝ0Hw^¶»sâÎê>–£Oƒd‹Yóò íÊQg³þìc>»Ã³ß"¯(%ÄL=TÙ¢W‡÷´r;W³.;¼ @2ʵл .tR*‰C$¨‘ãÎâÈ :‘d+4GÌPÿTÔТ>Ÿ0´äÏõöË$g–<éÂÞ ]}3 [3Nر<ÈáqÄæÚ0ˆóºúM å½Û…û}{Çfñ«L©ôþ¾MóÛvM¼mbyŸ @þ1ŸCé}íºàù½©®$qèN¸6@À+„éò~ÐMÌròP2<¸PP\ÒAü;:#PÑ;:33Æ ×¨Œ½Î³ÓžW]>ªV°sìE¨ëT%‰¥ê­lšo«.£HüÓUqÍŠø¼bO® Ø–H¡0”ôÀ^>@¸=¾áž‹7Ÿ0Lñ©@ 2Š%&è7 ¿BQ€m|­ÛøÝè½ìXÐhêÝÔæ¸Î»k™°}Fï; Qwû°ýÎÂg×)p(Ý|TÃÅG§9ÁÉ£>¸Ιý0^KÆ–´êÈ’]kP‚:ê…[2ÿ}æ;ºÔ~mÊЬ!Šn£šé.†îºØWۺ詎Xy©²Ø_e±ÞWe±Þ×Ãâ‚jÞ­2œýKÍ æV÷v¶ ŒßTίR»‘ößËŠ‚ ¼Õu>cfKÅ©Àxòo£=—~åÕ}½Ç¤g{v÷'ð7FÏ’èÝè„6<·#ߊ8^¸á„ºÈq7›LYhs惮´X vo3¶·©2šÕINAš±«Ü ¼û.iN.ëLR¨3˜"T;¶ªµ@ìŒC_?õL´ÁžëÌúu»‡*…j»˜ÛÕAú =]™-åÀ›/Èæ˜Ž ¾.®ÄŽÁqL—R¨kFÏuUÌ¡2[‹ªY*[VÕ‡ÍZ'´®ÆŽf»šVËÀì¿k÷vÍDÌ{Ѹðo­pϼ´¼ÙBˆõ1«-gsV6’ö•S¹Gz»–¹45lú/Uîk:Û¿ËÉ“¤ªñÑët–’j•Ož~(×%bqS4Í—t$g0ȲÊ*cÝÝϨ³™Må?°¸ùïÛ D‹;*ø™+x>Ò*žµ’ç§¿ÕÌ >Ø'ï««hó• pGë ž0žÀ€ËÎà68¢.?ï¨3ˆ÷ªV>$´(#0K»Ñî ØP§iáF_œ MÄ“¦ŽGú¡=•ÎR²šî¨85”ñmflÌ®³BŽ“ø{#óyCuýfnø©;nFaÂ>-RbäšÜÈÆfÊ¿M…÷‰ JßmõN1=?v¿¬CG][Hæò¦âÐAWS÷²ùÇ?þÁªßbkNTÖ9˜nÚP»dÜ—š1?3¿ö-<èu6°]]r ! W5Ñ{ª9,çD¼CÔGMKžŽO»RÔŒ>¬º£H­;ÝH“ï ³¸(9<¥YkPÇœ7ö“¬¨»v°þ MÇèý—ô­^\ Háâ"@Å}Ý2"«MÀp3xKÕ¹¤2rnÊÆÓ8pÜК`ˆ "ݨ;ÙoÙŒe]šm(µAD³û†y ˜êÓÍÚ yS²Ž|jƒ‡žÆÁ¢ÿ'Çå=‘Ãtî¨÷´„ì&{ å­‰%Î]E./%ÀÕ#ÁqhUd€1–@ÕH8?Ñ?¼þþíÅ?ýðå«7oøÂ|óׯ¿~ý’Áœ¶OÑnœÀ_žZ#ûöÚ%šú ˜ï¦Q’LÂèuèÕ«Ÿ. ìrd&Š]ˆ‰Çm’O« óî‚•‚ºÜÖ\ÇŸO²YËñPÉuƒ$–ÅõÃrUÍ—'ççÉ@‹¶M».ÛQºÞJlfôxŒÇœIûlÕaö6HÙ :" ðœ{!M”‹ÝQ˜Ë—Ò|slÑ•ó)ÌCÕ!§ðÂï„fs µÂeU±º)"µ1¢Jâ Âq“ Ò'Pà…ö·PÈÝ5k™¿Èj¬É^HF=³µ¹ý¤­.¤ë®o Û;Ô/Ü'ÔÓ‚®ùêªÎVxÑ5&b·ë¦žùâƒ%0“ÅÕbHÓ9owùm;‡1ûZ²ÐÖ>ºSº±4W…³t5‚6c4Ý/K†8*õP/`5 'ðѼ¸.€•ö×îÚƒ4I¾ÊÚ Ùh êV[f¸L%^tÓz…¨lAºk‘n4˜CáÓ%iÃÙå5…'ÕÈκ7 Äš† ß »N²ÖwA„°)ПÅ_ù$¸'é­¨úN&—\÷k†+ŠäÏx½À³^ £k®vù.ëÑK¹2´ÉÙ…“ S/Ö³N;¨´[@R}ħ£Î·u>ßÌòy[çù¬î9Oû+ß´äY®b 7Îé˜N¶Vé²I„>êÞÂÑ|Š›l‘b!À¶n­å®MшÇàÚˆ°Ñ6G‰Í‘ÏDíÙÒþyltõÏ¿kÂÂÊîœXv†u7Z·™½"ÀŒ=H9œ “;û©œs]L‹ Ô‰è»ï™6Ï_²4«H“Ì6ÑÃÑÉI/GPj Rô.ÜFXFÿËšôûXNãÚ†aƶ>è_cbŽ0„„“º=‰§q:;nèª,@X³ø Cj:,ŒÌ â1ûà-q´Mìv0 ‡ãV©ó(tyD5™nÂÚs‘zœù0[Þ j–_}ßÂŒXj«ú)¿4‘9H}­/a0…põqVàgY¦_ŽBÙûG$ ‡*ÐbDâá=ñÌõ‹&_^¾ï|[Õño½›Êºìk#ðQº.Wwº¹[©§jkWÕÜg(cLLA…Ù¡Qa0Q›jVd.ñifKäU„Øzk^“~X¸¾úâã6TIvÌÊ çæÜ¦ ÑÝä–k–5“$,ßà5â™%5•š*ƒô™-[6½÷F{tÓf8˜]aþ¼m7+«r‹¼®§: h’›R[càGÂdë@˸@o_w=Ÿ#U†Ó9€8à2 ƒ~ÖÕæjáÝçB¨žpT®ÏΉ;FŸÇ,ˆb2^Ñ.‹Æ œ?„¦sg°T®;,€âJø«Ã:I «T]\nqÉGæ¥Y±fÞÒ·Ñšÿî ØWÅ|Œº'èÒ1²‘_˯â+í¼ g0;@`,ÂÄ”$xç`ÖL‚:þ:NÚIn““Ûqöìñ³§c"Zî«(U8 WÑpz¼ð_Å=KË&¿L:nݶ \ÑNé—Æi ü¢nù×Q§ ºàèÞ,h"@XÜûÆ-ó[\Ç·'çZbÑ$•¢þ…QΔöªäúžï©Fà·ÌجÚ]د܈/l‰ü®zÙ%ÝzRWÙüÙäè! û™»7Oæ/¼¯0«4×´—ލ2ˆ?Cä#±Ë~]ç×há~<§_I‰ñ:ã!Õ,ìç“îûºðü ÎñÁ# ¦_‡'EÃàÈ—èLþ¼FnŠY{<˜H£ðKhÖçf#ÿ (æHÑZ¶\EN®zµI‡»‚áúÁÄ‹x*­i›\²/I­ ðB…q€4+úEgcŒAµy«HÊžu.Dáev€eT>‰ GŠß`½säÂéÓ©×øïÎÑÔ!™¦ú¹3Ê;Œß‡yiê´®ªV·È]𲺠K ]«Oàÿ¤ïÞÚq#J¾Ë<ïòö 1§Ùn9Œ÷û-¾ùLºn Øë¡ìAñ’ãsÔM"ie$àëô4½Y \±Î;dkªY~TÄ*”¨šÏßlQ,½~˜ÙW5yÚ34“ï|ð *ú¬¹y>q®¸ NÚÂ@z@O†Úºc¸P!±÷3¥Çþ ·ðe ßqö>­^€‰¸< nÕZa­x XÖ=uÄu-bÝ8éDþM&RñÝ–çõ,þ±ÓEWƒÂeÒäG툃=WÓ K±ïN’ãdôžC™—§¶aJ7uË"D’«d—AkÀ­&ÏŠ‰ž¡kµÍÁ@ÈHü­vZrºk9J»/L¹2ÍgtXÝ” ]Yé*Ê å³°°ŒË𦖿÷Fë¶M8ÈOórFò“6é‰DüõÒùs˜)¨v˜hŠÁÐIûà­'Þ¹+„\FP‘uzm7Ù}²"a%z,PüRâèß—<ùX*M»cé“ÕqCçšÊjiLèyëa¦øp\ö¤pº•>–Ýî íAj™ úÖsÅûî É*r+¦õ€UH|óé2]Y·&‡%sTá£He¼¦ŽÉ¬£QŸ\Mæ’]m4êӸ΂BDâ~³ü:ÔäPWËjš-/úÌ÷q-ò'cÊý(rÃä××¼»þ²dé2õcäÒ‘rƒ2aBXTª².„òÔZ DîÌýŽ]¡ò´]Ôœ±Ð›«÷“¿²ÁøÛê·¥†©’Ç'#ýiwë -bÚå‘° rØikâ„)Ÿõ(Ù5Äæ–çk˜Ð«õ0ÙêÏ-~vî ýbtü¨ÿßóéòžœRø4ü`˜<à¦ñÇÖ=âæ„l4»d-' -$ ñ‘ûÒ³JöïF’7(vÔ‡„b^Q§œ+Ì«ÎÙqÒ¥àPµt`¨A–Öò€QWB]ØWÊ„#¡Ž€u„¥â)ÀDŸzÖç’ FŠî!LÛjÅ  xÉá>„3&Œ=\µ–®ºèœñ*õ4ênWX¼]e€ã¿·ôw U`ç­2À~á,€mkäãÑ";åM£úÒë,s(Ïtùîäý±Ëñ÷éûŽ€"îTb? ¤©ª¼ÎËBrÈ91eáIὡ°qX¸9|¾²­ðš£îE¾Rî”$[SÛʦ¸@m y€©IjrY6mÌ;wî›F®â:»Ëëƒùt¶ÁÚÓ:µ®ùT9Ë41†×d¢W mL_µ;vTÞ@¼NÞ[vVF¤‹HI‰k-=rÔ‚¹ü@†‡šføÇ=ùÅHÀ·"½Á =Æ~ö£ö$ ß:ºãsðSÖD^cñ>4²x ª¨éé¸+€L²8äV ‘ §aDÇh< ,ïtµ©í}<Þ•x®5)b¡¥d@¯÷³±i?.§¶‚Å>²ÓKÜô§Ü,(¶´˜ÀÉŠ =ì{™°)4gÈO3MÌîOLâô€ç†{ùñè)Ýpp€D–Òù™qWwƧ¡¸ó}ÞªÇHºÍóÞãó°.WRàNÇÝc–nÏ,€š‰ÏyXúÖȦՕÀâqˆø÷™HØ‹±TRç-í¤¸š¦p<wå|à8úi’•œËpcͯ³B"^ø½`ŸõI’°|˜'õhÜÃ{èÊtÍíÎи8ûÂw±*QʉHW áÁ2Œ§(µù¦Ù™ÏóÆÔËÓëa(ƒC2Ü鮀d —»¯4¡È`¨‘ùwq€ ©šF2›²Iz@;Ä£ÖÉ?ºì,ò½n”8±?³ýqikõ­Lܾb®R’D§ÍVžõùä‹` Ê)X{Ú™|ñ1ŽJõ‹4eFEg&E…Љ`Û?óL/É}MnŒöiÏ vå‹ÜÕ©W(ÔÃ7(·`MŸòÍQÖåÅ²Êæsm·G[³HÃRúÿ ˆý÷yb[±´™ÌÙ¶ËÚPôf•¯¦$ [­Q¦ÉÃår,ÒhÍl$bÙ6·ÁöQcç¦Î¥z2@‚"»Bdñeœ6ªiåúÖpO¹ÈîºûÞš‚Ì2Š;§$•5fƒjQHˆ00óÐyr Ó ®„7g ®s8µ§—t©´B6:5/ C˜(Ã&üdYù¨3o›©>Öb4‡)¤6ÓT›ÿ‹¯N»é¼Ÿ™ÚÔ×|“ªš¸ 5½ªþ’¬Ò³Ì_*Æ4uê›K4­ySwJ©nø#ÛÖVµk8Ž^SZ}Ðø7þC›5ÉÐá wVÉFF“î<>ň(o\ˆJC\˜w7ûQHÊÙª¼,®6õn‡ãc<8†¢œÎ¦TÒä¥nB®Õ˜ÁÁùÉÑÝ2-8–5¸ê¡þÊf[õ·æðlðýœû“Éë ¸ WK0³«¼ý(TÀݹÇýŠ·ÐQæJ<’×T#Mä<¸´¨ë"ŸÅa<¾Ð/ŒœwýÙÇ Ù—“ØÞv¯ëØÀÓŽ†$&ÜàRöå&¤Ê–@Òª¦°ToL>àd ˜Š’‘Hšû®ÅÎmâa•|«)Ÿ•¾WÒ’»?O­ ]cšùñÓ]ªŠ%•ÛüEre…ì"Wþí5LŽ[d¯»Ã³‰Ç3•·QCà`Kçç PT*ÁžÈå,0}¸„(2Œë4î^‹Å|1æˆ*Q³}s$U-³)ÜLÅ:+òÐ… ß`W3cZñÇ×èm—’‡¬Ö[8Ôƒ…pïÙNBR˜ƒ“º49Ž+‚–ÏzÍ„D¼­˜eÔžòü EV/ öQr°à ñ|  ¬G©Ú!¯¦6вv–T­Š³¾Xq¯êœss,f^Q#£“cÓ‰†Û9Õ‚t´¦c/ ÓºÇÞÀLŸˆ¹W§‚¼Þ¢¬ÒÝÇOäX¶pW—ÇÄÚYÈÌjà~R[Áªò†vn°UƒÄġϾ.5É• † ‘WZÖö0›¶?8‰×ÇÃð~«Ì3Í‡ÞØ¶RÿW…5zw*šÞONBpË£‘¼{ïŸm{žÝvò]FPïw¼ƒ¦âÄÿ,<$°_þáñå×,ù×´8ÁPÎÛÏ:K£Ì«?|µýE5‚*ëèâ„:UÔd)™¦{,….±¹VðŸqâcrøó/ ÿï07ëÁý‘ E ÄÎ[žyËz‡±¤³A\b–àjfKI­:[r¼=*utÌyÇDwçYïJÑÓñÕ¢a=Kv§À-òè·Ce5öG³[ˆ{"DåþLû¥eó‚Ê€EÌw²ª+ÁWc…v`o"÷¬}˜ÍØ“HwÀ­›eŠçB‚r´=¹I4@±*c]JäZ7°„È{ü;M§éø[eòê™7a —ê(¸b^³sHà*k“(ÄÐüí&<âeäÞ¸a>^FÚñ0gEÆu‘1 "á`àS÷Ô#q°âÐ „KõïóT·.Úª¹€iZÃzCÅS/ ,@ÌïÓ¾å ˜Q&ìËyÌ+®ÜTÜŒ k1lr:Jº$I䘤š=ŠuŠÊIMï*¢b‹2aϼ¬üˆ…ýyÁX™£Gòð:ñ&Ôž}U¨NlÊ{…[o˜5g5+Ã]C,”³FöoY ¶2e‹¿ëQŽÖ×k)p—F#r‡r†2ïé=÷rl»Ðp’ª%šªÞ8Ž··2X²¨íä8Á/˜°<|%÷™yý5ˆ.ÿwÿ£8ÉóÙ€—[¬ì¶\Þ$pŠQ&ÿ¯2ù“&{¼ Ž ØÌ[Vå?òß02YyW°4Ârrðà è³å¬’ÁŽçG=,ù"uE‡P׌ >-ô;sÞ\6þ‰v1ÿòolÝ·´vÖ£Ÿš]…Ÿ/„!¾ci¿.”Aq,k$53».½1o><އóÀt}6ò—M$”PÖ+±ï;g@4ùì^5å^yl,¦—%#'Ã^éd±³ÓüÖLäg=‡J±Ì|Jð»Ëˆg¯ûev]±TlI\ãdÂ+Th2±§É × sŽ›ê)0yË¥Öé5ˆ™·Æ'Û¦_d¦A&^ȼm%òÑ·gM»bc©1WÓ)xßÌ“X8Š p²üjã4´AȧêÅ4ŒL|݆@^³e½®6­È>´TNPÿ9ýÜ¥¢µ<êÆœo;¸Al® 9+el“É'G«w ú:‹ÒîSØý|ö®x¿÷fм 9ªÞ§… õ7'Þ"¾rÝ ¿¥ëêÆ@=zä|¸‹y0¾j^€\h‹Âž8£µXÕµ³1'ä0kV$|¬Êêq޳å<Ú 11whå ÕÖéâ×yn+¾&»þÑËj×Ä‹Äήljác»§ÅË,;]‹Í¦ k0(Óz(÷ȶk„R ‰ÌB³ iþ ZÒ}Ùä ÙeÔi÷¢Œ“`h “xѰá½äPéWø‘#pg±¦­+ÂozlíÂÛi\áØØ}K…y1|#î|®x(€¯à3!]sÙ¡pÚgÞëWõJåŠBU¥¯È9XŽÆÇÿ¾YONÅÅ9£f_šcsz£I?cì=hdÐoþÞé½r‡yfžö£“d°úÛ.¾Òv«ÿøÒÐÁÕ»ÑXJ bÓY}â¡åN„í™A ¼È®1ÐYÆ» ªìMcaÄN¤{Kôp ƒ£:ïÛ A_ÖÄàT0ñ÷\·³%D‹­`­ŠÌåÃÒ|yQÏ0êIÀQô¢|Ñ« Béá»Ö3_fÀL <½šûû9¢WìüËÖ ¸¨{¾GaRùµ€‡£Ü¢AL¾-v“»v‹9Ü3öî]¬$“g©K¿V)mwxö,@e+iÀÌ“<îaK²ÆåŒ)áò½nä›õ‡õ–Ž—ès"ç[Å›l©wöÉý6Û>“í@•¹B×Åì\‹nJûÓtOq’/ÍĸͲ@è¡GUdaJŧS¨¯@üÑö«‹üÚ‡Dø]š} „T^S?.ðÌoÔǧ²oÀs¬?íc%$«Ñ¸Â;P½…äi¸pg÷Ѥ î>zÒCÈøåàÀ%sº¸Vù•:_ ˆR@É5?ûÀZ¼ü‹­»þ•wˆËæ$¸©ÉD-4\2O¡cßVNάµˆí„婺b£«bÛB±ÊÙœDÆGt¸/tá ù†â–ÀP-Ý5óvê¯þÝC×äráÍ.ï{ioÕšX•ÝFÔCÑù ®2_ŠË’—4JâÚÂ$gçÍét¢üË›×ÿÈï?;gS¥ÉËËV‘¸MÑó²½N@â5¹»Ôuæ‘êzI—=d¼ ˆoâˆ=å67šeq$è!GÛ M0 jÃl"µqeºÐ­D®°Éþ­ë¥³ùî¡À&,;´1†“,’Î~ óß³k8¶ÍÂÔ­ÅtS,9Ùgå´L©¾†ÁðÄåÕpûê8R+ãÌ;èŽ:­é(Õ9‚}&¡ÇK¾ùæX‚á¯8"®¬óyaá¼òÝí967í@ZL))-gsd%Ì,§Yv­ºœMð‡iáÝÎK¼ÎïëÎÉÕ†õªÏ€Á6[Nó‚½et§ú”õM±*hûKuT:SVŽna½‰°Lº!Éœ£YBsºÜ*FØ&áÅB%¼¼¸ …k*ÝŽV’m°œ ¾ª?ðù©œùx³žû¨\C<)‰`Vä–aþýø7Û–©TǤyµn†É€¸¾‹ª¾ Aopª4ýûÁQòAt©eåm%Éd™Âù¯èÀÔ›òýû£;›90…;ý=¾7'Ç?±—Qš …8¢Å¦EÍéÈj{뀣}ÓM w¶"šøzð@ú'jl«óõeò êÐ(Gb£“Æ1ô9Pooý ÄOP¯Ýx¾>„žzÐS$2wIhXÌtŸk /5ûÑ9³ÛÖMÔ:ÔI.xõrupÓlLó•<ˆg4œdòÕ;ùBg즘ÃÓã ×ëî]³í’qáÎ[Vq±Áó®/»iU~ÅNÁÆ‹“¬ÄÓÉ3ø!Ï×@iùŒòaÍç*¢ŽNZ—Ïc^}_µÅå¶‹Ÿú3¯V0®sFÖîK8¹ÜA<Áþv°§ªÛW£*`/Þkδ˜s÷™öÓvò…|0ñ¶Ïa=;á†.?Ušil×ÜŸ\ú֜Ži¥#ÁݶñO¦†¸î‚C!/.Ðý‹‹ø{É0öh¼CÚ×]DƒóÃy¾ªÎûèñù¡@=ð/Àó ¬ $<¤§HÇÜSçô)sR8!×™ËÏFëEòC¤‡·l*öîøÍ]oº+éò]I®zõ²¡YÞNª³q€b-›VÈ/_ÿ“‰´ðhôT’ºËø‰7fÇO{„EH§b7”r]EÄÎû“û ĸ÷\Vౘ‡¸ámelyðàîúè`´÷5ÚÞíÔÈÁ<‚‚ÃÌ ß}qø¦pGè—²e2•$¢œ8’»O³ù5hý¤ï ’²¯óÉKîÈšÆ)BÍRY]ÁÃ7´§H&]ћԡXyB“8dpúÐÔÕ²¯›Äd±°úÄ4:Pt4Ä/qÁ$tѲž³3sápþ.i|`.1åtÃB¯mntj¤Ëò¡Å¥GÀêÂN+|j[©ÜUìòjÒ¡ùüÝù(3£Y+N~¦¯wCb¸6Ý쌩ídì¾fšà@±Ó”r8›««¥eY/f²å•»¥eû†Å¥ƒ$?3|¢ŸEËNËñtx­ª—;jëÔf}ayÖß,oø ‹ºçks«éýòŽl®DÄ»Ž=Û*hÕ»íI›ìÝŠa5¹é¸T59¢Wg’°¢ÑIdÔ²!qÎEèR ¶V»oAá/” ¬’¬ŒÑ¯4bH½˜áÈ[=.¬4èQw ¯eZ½½ÅÌ(}þÏ.P7¼9î° Co.´“>¦¡—aè2 ÷0 ; ßú8]eHNjšy[‚d$Oºû.ÚsßÈ–sQÉOÅ…Õä_›R%¥íÄ/{Tê ôÀ:Èñ‹ûàˆœƒ…Ãâ é6NŸgÙ~¯¤^Ó&Óy£Ëã „¸»`µxø¡#¦î¥ 5x'jg)áæ3òx™AÁÊܧ{ ÅÙ÷AŠ °Z4¥X¯ÎËŠrgùa2&å]×ú·Å‡®?j»œ°¹"Æe‰£¢Ð+z·9‡m/„X«©À}òÑ™¸:ø0]-bd)Fé¦h’9Jš£Úç%¨]ôć¥š¡yé2°y·v8ÄÙ%C·9°ÐsýŽ¥ j iƒfñN2"ºÜ¬ÊäÁì§¶.é¿ò¨QQ$îK¥5RÊžžq’UQpÊÇžàpc# f~ëÆËønÌ`Ù‹j˜DçÌéeéÇì#^M!wˆç]­4àÁa×XÕZ‹ß¸‡IŒÊ‘Jºd5zuSj|Iß|‡3íT|=ßnÔ-iŠš6ôöCì¡ÍeqÜW7õ4¶°¿úŸžùÀ l>W°¯§=Æ¿+}?8`}ÐÂrǵƒÉrgé¡àÈ\hHÑ´† ä>¯—óy,¥wRÄÊø8$Æ´JèçF½>1Bx‹ÛÒ$vyhj.3C½-†;ê¢ÄqŸª„ÃI´ËW¸g ìNýÔ½Tµ4pfx4T'»ÎŠ%wŒ!VhLÌË|ó×^‹º{vÇåjüuÉxpÿl®Á?³E37Q—MYÉ$»bk+ŒPKE!ƒ³w½Ñœ?°:ÏéWº¨fº#|R©…Í%£ G}’Š•›Lz.0â&ï/ÕôÐv†ñ-§¸6åÊt«.ä’(È•€ÍXƒ(®¼»ú^G8±øÇíõóÃ/³å¬Ø¬ eè¤êe…ç/$o¹¥CÇ98øaHÇàq‘»Ó™p< ÏXL* Ÿ•Q‚¡:ñÂmI.I¬#Ÿo¦Ëx÷¬G€§5Ü~l^Ý7’Ùùo;4>NŽ+{Òˆ±Àl‡îíA²Œg½®&Ï%zØ´ÐÇÄÊè‰ Ç¯‘b‰õw!šg&~O»2…¿M0)æÝT.ÔwXèŽ1í&Ë–ª1ô(ï.ø]†Ñ(.~üé‡/_½yãúå|Ë @òtëxØQ¾Ä›‚SN&&ÖIoD9°ÛÔ#BÄZU¿´_’èó¥¡^ˆ¼„ºö¬=U?qUwÂ=üdsðˆ ­6kc³„Ôa¯95{‹ƒ.b14ñc-+Ëw!þ¬D§$?—ƒßpó–šñ­WE×°tºlÌä†1íä}ÔÈþ‰R€Û§g[µµÏbÕgjngìÈ´©9¾ /_´z±ŸPk…CÏ.ÉÚéññÄ»ãëlU,·üžùI°VCñ¶PÈM:P»ü–ÄØB'~(~ß´ïªÍ+¤DL¨ü@š,ä—KhËÊcºÖë¹\ "Ö%ÿ‘çëoÙ×û¼Œ°¿ÖÕz³fø54ÍÖ-WËÆ)1›;†V°›ç†ÈZ `·àÇàOƒjCýCàYiXH_jcÂjõ믰‡|S;„2ÉÍ2.ç-Š•\T7*0º¶8U¸ä½ŽŽsöèzÖãá8Wj8oít0WmaX[<õZÔ^¶âŸ(6¨ †’RRo¼5º3>éƒF‘ûnMüÚp{—ßGÝ€€­4»"‚á'qåõÞßë²uÑÍ¡ŒÝ®›Zd–>?Ÿnt6ŽN0•“î„Íc½ÓS"蚌%}™ –â‘Éû/(ˆ³túà‡¡…e~såzê[öï =AížðÞ ¬£ä9ËkC ­‰«ddÓ3&pˆfÂxQ™ˆN9¬#s ÷†ÁÔ}jy%ø\p•Nþ¨ä¿.ˆ]€ÛFôI³Á*˜´¯JÅ9 ¤Ów €¶RÆÆa:éP™ý[¯§NtZ2‘Ý<-‡6o.úvØë|ªÜ(€[½Ò»›Ù<ˆïùˆñ8à¦(»zXlÀ×aê[—ÔÿŸÉxtìcÍ,?ßï2eÕµÞg:ê@}Æü˜)HFDæ˜t9ï 6®ª» 7tn‰bY^_qo„j *4ÖåË„^ÕR ‡5-ß‚çšôœàïd<ìDO†g¡§#Ô?zTàIù™Cü¸%Šö{!îp™w08‰ë1×ËÞÚG\»Ì}ã•ïcß̃Ø6ÏtýØ^Ûé÷ðAûc,Æ'1b-?ÂÍþÒ‘gA†e€!w£â²\ÌçË ³G7‹mLý ‡Ö KVûÆ.xªƒ¯7˜Ì6ÏN„l•ŒãlŸlà@ýÜ’¡þœÿÂËîF9x÷ó-ëD0•¿ “Ÿ·þ×ûŽ ¢5æ)Ý•$=K¯Å)Î¥*²Ýùƒ-5yÔm^7}6¦vÏ’4²pô´YM+œ—.#|1-.¢/–fUp¸·ä` |biææ9üjQƒS})ÒgômpËœHš?嗜σ_ôèršZ Ü •'p¬Z…©ÂÇ4Ï^K~½]Œp~×Ãv\ ^ÙÝ/ëíf¿G¥tÇGpb&}ŸööÃåp!¥¿¨„ˆ ýª½7§æÔdšNÙÑÁnÜ5ýªGŒ:†\Q£@ËóVÀÕµE¡ ÚLbÑCî½þþõÛ×/¿ pÑ£šF½5eÎFxWE"åÀ”w¯hÛ*@µn»0å®õqoë!À»Š/|9uó ¼¨DÕ µ;íŸö¾:+èÅ;m¿TžM`¡¹ÓÅÓŸ/ó¤tp Š€¬|vä ÀXx˜‡9"“–κQ,¸z®ÊÙx/zJàÕbæ]äó.uüØÑ>YäË5Ai¹™Ž+RŽ/¡,å0ŒÂú±:Ðð¼™c»4ÿ•™zBÿ´)¿”,¸8‡“ßéŠÿÌ%ôd'cqa¿«»mZj ëŠó:Wù´û"2˜q¹Y'‘‚”w‡‹E7·2xÚa';_‰Iì^Å'óšo X%ô˜Ä‡ó°·^zýâs¢Céêb± ¿“Ï“=꣣ø;z;èI__GûûJ¯âÞÆ »½“[b_ÏÎâƒÉÅû> 3¸u¿ýKUÍw(›Îª ý&Ì}7•ï¦ÑwS|7íûnªôÍôxÿL»38Q*Mþ}‡¢Þ1Ñ;´ö޲ñÄ*ÍU+ƒuAiðÿsRæÞõ2'Cœ¾£aÜR’ô³ #”}lé1JÞǽzû–n¬ÎÚbÍ/ØÉëâbãawññž§w05ü~}´[ózo•:­ª¹ý¼N׃#Ì(ÊÇ]osŽ—Bߣu2ú9šz¶“,—‚f%_€Ã‹·B à4¢òj›Æ”,ñEƒIâ@HÔ j#µ}óPLw›zjî9¨<5€:Ö 3ß弸¦³bèÓ”h´ ðk r@ êº ¬x<µÃ@ƒT„)ÑÆn=r€ô&>lóç9Õ¬6Mv9­´Z‡„Ë Š?Š[aÛ­¹«ë&ZEtˆ’HwyH^`„<ÅÖ"|Ûtßa½ gùPX›lkî¬t«ˆÛˆ|å·ð@lÔ„W™CúeË*Õ„ÅH'CއÎ` l @[$u“æmËÈÌÅû×P¤·T0²ýÂòa®[PË> R€häõ•å ‚Ó±]«ºaWéåy€†É»m„÷GCuŸá÷…ÿ ¶ŸÃëR„šÁÊsÎtwD.á7ª{1ôód« š‰Æ]ŸÂÖ´ÃQÄ”kKj´çÍj¼áªuÁìQý¯ •Zác2^Â_Íû-a¦sÅó`§s!òE¨Þ7€‚à„Óå1Ó!§©Q· ³DÁ÷#Žó+šbx ·¼z·z;cáÏ“._¤6ÀóݱÆ€Õ·Æ×;k|­ñõklÕÞ½˜×ºº†¢,VÄ¿ËzMh0%­ ¿mÁA/çÏÄ”ƒ˜:Ÿ®ÀoÃ<š•quh,*<Ƹµn)ØöN0[€óbˆ¨hO÷m}b?Åh¯jà!=Ç0ý.Ãï׬á\A¾At!iªN:LE)¾•æ\!±ÃBØ3Ôx}Ý2…ðÛ°}÷õ_¿ý6¼:¶æ@c÷ŽÆ-Ù¥&`ÊzúŒþÍ,»¼¬–Œ+ ¢•ËK2Ê¡ÁöQšóãËŸÞ¼¢Œ¥ýï¾xùýWôóôÈá7ÊáÓ]î}<\ÖÏy¼8«¨8È#[Lk@ ÄžFHJn~™ÎÇ]DÝÜ1»°Û´´àñµÚº¦òåÀ.kæ3ô0œ±óFoç`Åî ‡‹ Ò>gÿBÍ££S¥Ø¸›“„ç®8öu0…@x$•°ºOÙ m[Òa½Zò«¬ž/~; ]€ØõuÓÕväGºÚPC×ã %ÚÏŒ œMÃ\̲®ÎïÃþ6ÊA¹¥œ¹Å$ùõ«ŒÈcò ê´ü&ÒТm×Ï>¼¹¹IWpÓÞÕM–æóÍÃÿž7Rè¡ÕåþHíjùçÉ…´5 ‘v†üb j,ö?M«úêáì!‡]ð—çç¹\MÆ6©'ä}ƒÀwÇ8b©°¨ ÝSuÃdw0~‡]¯«9ιŠ,ÿ¦]XÝSᜩÕ,ŠAÆÁ2° ’ŸHÌ¡UÉéªs‡tE=ÝVÄ3Ø/ý¬9ÀG›„ Aý[ßÚLœgnV—›š&íºš=èõ;Kª™þùn¶àV^Ç”+ÒJ¾Ä†i“Á)É%²Y'ˆÑtŒÿš;â¢c5Ž@·åÖŸøÿUübùÔèV¥æµå’³qšµ³ÅE½‘GC=ù'±¯‹ÔÕ(ê}’`ðÂä%‘¹±óþâô·„mµfyíó×— ]‰3íF…?¾*õ]óÉ|¹$Y¤tFîiGÎwŠåÌ#I€ Ïj \¶­ÀgjÑ‘›^bÇu6|§Ø}HTQªŸ‰Y?ä²då­ê‡T¡¢î 2eR•M× pŽ)ö%lƒû’D3MB‰Kïo81ä@)½g­0~þˆ‚! ÙüpúF)‰ôYqwÂö£5•+TÂEùºø'Uúª?¼éû”¥i0~ÑAÏ jœ¯C1„˜M;HG·öµ¡™åQ»Ht+Æ,þ’©TŸëIªgÕð2ï|Œiâ†éÍ)B} V+wåpCÕG”áq så^ØsÛª—<ßTyÊŠ’FÜVÙ­U”vJ/7íšMýÄè¥û´zo™#·ðF&—²ÐÀâ{Ýò\É‚7É7Õüê ßln—¹:Þ*–t½æ0À¾ƒC,h#× “ÃrÕ»˜ŒYÿ;ã~šQª×Ygêíf›ŽI'ýVÝ1¢‡ÀýéqÓø,™Õz±mŠQ¬x¢ÜuªÚï ò™BqÁ%r³Üâ‰n¿æøtTýFuuK¦óM¼Méx÷MŽ|çxwºóNÚ ª÷̧߽ºÅeÿøþ´H 6€5>éšÄÆë¹N8âßó…Dæµ;±z×;óæý(†BHxÛQ%aÕ·E_›¸ÚƬû¥‹l± ‚—’L†[í»mòÍ7 €á‚áHéáH\D÷¼.4»Z™Y0~FuGžuc 9Ï'®µJQP’àO€ë 䯤.çÉ ÑäŒF³ ¼«Ó‘FPqôd|Üp'Éñãè7•>~ü(}öìÉ(z<ÖÇN£Ç§úxô$zü(9~ô,}üôÉãèñYr|J¥ONžFÓãÓôÑ8.ü$9Ÿ¥g'£¸O“ã'éÉÉÉèYôøY2¦= Ž’Ó§éxU;¢ñ=¢‚ã§¢§ãäôY::yô$zzšœž¥OŸGÑÓGÉ鈞žÄOÏ’ñ“ôôÑãqôôq2§=‹ûð$QÙ³³¨·4²Ñ8=}r=}–ÐpOOÃÆÆx|vú´Ï´`{&ÖŒ‹CÑÄÜE$—³¢MCìfŽv€’å0<X¬ìx$®Qà$<îK¬,Æn-tW¼ìëN.pƒEõ >Ézü9Ù%›[óÊ:ò‡hY>Ñø4 ‚ñüBÂø]-à:,t7ºF0èNÈ/~xû¹r1‡ª »€ÓLÅj¯nŠÅ5»#Œ‡ž­óP‘†å(-åê6–mÅZèÐd½ðUt£’"ÄYŠ¡­\,½éÉ”?´eçòkrmÌ0l‚1)8E¦›ê ¿ÌA|l¢ ÝÄÃÎcŒÕ|$•5‰¦³ºjš‹Û ~ÚcoY¤a©ý«ûÂDY(&«%Å%—õƒRÙ"+êId]¹c|½»±œùsÇBÈæ°½ ™ÛÈ®í‰+¸S¼‹·¯Ø½Iþ®ˆd Þµ®5å«`ŒÆu®3á:5•™2ÂÒ´ã$Ÿ•¡¯¤@9ˆÁßþA~R Ìyy{çpÕr@¶W¡yŒZ Ž•úœBÖoô18›ˆÁ#È\!y”<„úRp`¢`‰±a;u­e.ÒK²FÓpʪ­J=ýìð!þ,äí‰dTC¸ÿ~*6ÒÏ„¹±HpSmË —œIî}Zv“_0…36µ’±(rí‘JeÑ[‹[cYîõÊóOâœáKq‡É%ÿA¬žHÔ€VÖ*@´„Ï’wŽªÆ„IñÝÄk •/NTw‘†æžÔWtwÃûæi¥U™¡5G’–†ŸÕ6†4ìÏÎ7J…K'rðl¨WÃÇ7x80EÃÑÄK¥×Z$œx’냞«D‹ä“æÇ&·ÍLb%ŒXt u¥÷nN û¸#)š·è¹ õ`Èt6—¹ÝmMe/ƒ‘1²ÉשvÂ\çÆL”Œ|ä&$Plp®ù¼ÙpSÆA 4'ÑÌïë‚ZD—åÐ}=€Òùáù9mªÏ'H~~èÕ_í©ÀAå¬`5MJ-›ªó°qÝ^CÒÇ…PG¹’Ch5ûÇàÔ0ÏéŸÿšŸæ÷©|G‚XY_íû@¾ÈÎóóCðT燗ôWXÖz‹&+´(Ûd!S`Ñ0k¼µøo˜n'bÏ©ðBÅý+«Õ'¨ÊR¤º$yá2Ï÷õžnÃR HÜ>¡¦t +©‚J‚’Ä´IÕ¬5LÓøÃÛ{>\ä·™ ÑRÉø¯gÁ×ê ת.)óšYQÈuÖ©¹üvuU†€äæâÝDz¾ ÜawIÃpË[?Ìnô¡7Y_.3XÁoŠy»úõÌì¤5'ˆþR «‘Õ mæð˜vZHfØY±~Þù[´ÕC1ãc®ù”d*!+ å€ûfnwž7`O%eŽÓn×°¿YŸ¢É„›JáI•ûF: ¿"H?³ºRFhéð(ʼS¦Ê´Ù´ó¾Žñö³š¤¥+g97GO³`&—y>jîüŒ¼‚ ½îËÌ -0Ïö«j÷€X96ç€Æ·.^|~<>IG'PÌ—ƒuqôâóKšœƒ!Ð7_ãßxŽ¿ºá#îä/NÓÑ£ÑÙ³ñã³Gþ¹UxE ý“ì~úh¬uþÆY¹?Ú ""^ú‘£Rý-,¨’0Àe²o …Äf×u1ä¯y¸úäèèÿcî]¸Û¶®nÑ¿‚£~=&Š%+iüÅWuœÖ·‰ãa»Í8ÃöGA$(Á& † õH“ûÛïžs­µ HÉiÚqÜÆ–€ý\Ï9ÓÍ&Øþ¼a4"ÌÕ10a V("–e ¿£pCC·*€MH!†XD_D·¹çØÈÎ+Oušqºè/Çýf‹Ä°Á`y·âÆ0’µðYônà·øð‘;f\?¼âùÜ·DÁ¢„<ÝçSK ~€­Fp†d¦(ÛÄ—±j ÆaY'ñ ýè­Ç½¨sùêäUQô ‰£_Tó"&'o×ÿ¿…Óº‘ÚnbKý ÀÕOm_Ú”@›-T›¾ \Ç–‰ðhg¸©†t»²^W—Ꟗ´=ÚŽ/Cp”ëj¦=üß0hXl@R¨ˆü´Æ46œŠ‘O¼£% _?ߨÐã4ÞØwãO톓6ð£Ú ‡ChÃ,ÒF@JŽq ù²;¿É0ž€–fyìVNµPq†ÞŒkY®Ø¸<½œÂÅ à/ŽacX úŠje+D[¬"h0ÕÛU=¹,Ú:OÔð©`=€<üA¬ü"øù@þYSIþF¡[÷P•Ú8ówt6tàäPBfÌSÎ%îÞ#ÛÜ Þä«êR+D¦DÜ6ÉŠPH*ljÄÆnö?ÅRÛÞO“ànX[™ÀÐd`‰Ïz^Šy(Ô‚^ÿeW©dcåÜ÷O`¹ÄfÛñúƒ„D¶uTJ»"V‡€0F¤¦êSHbÜ|‡i‘åR>_‚”Ðb êí• º ‰æF÷Yà7¹*zÍêåþH[Û[xÓËnÊÍUuè ß[¬zƒŒ!“ᙄšðµ‡f1V€ ”‹¼‚¢…„É×mm&k/Ûl¤ >ËÌYLWôÌ9 Ó óFç`ë"ù“¢ˆ?ûxî¼ |·ƒ.ÄT]׌Ë|k—}|I)Ý'½ì` ü”Ýì÷$³^h'ì?LžÓÉ]kDº ÍèDð•Ù>{é0}¼puãÉø«ì‹šb*Û¿5CFÓc8 ËùN"üÙzö‡¹Ñóøö`¡žVËpÅo˜Ü{¿ HÊW¥B¶áÆIÐ](‚b(Q=Ñ‹ÀÞµZU³^¶;%úu’o+FèóÎg»9WIÔ­´.˜Ä‰{Ú$¶ZÂ]óô  9=ÜÎóÑÇÀYŽ£“X™¹\l‘D03˜ô„Bml1áf ÐØl<÷K¬ÆC”@’̨qöç¨Zº}‰—·çR’’­S£Pp´‹ÄB"¨D•‡ûå@KXÈœdû®º}îIû¨sŸ»j)…¿.~Ô?á6N}@Å~^ïF}qpg¼Ð†üMTÆ™mö[gdÑ*Ї8Fÿö/¢‘¸‚w@LKN˜ÁüK)Cùߊ, ;!ÊUxïv}×àå­Q!zq,däj>ÇNˆwBŽÛÏô½û> ]÷õ¼@¡8³Ehn㤨¼ÀíBnE]–9ì?ù²pšI6"%J΃Ÿ›Y Tny˼#Åx+Ã|šQòÁ7>ä#°{úS>ëöKÈW(fÑæD*–£T-:÷üv¥xGÿ™Üm¡¸òÝj•ˆß)hbËñ‘dPcÏŒöÒÛ‡Ôf¯LÑGÈmVÂ($ŒXæØ6Ò­@Ë~òŽl·îô2¬z‰+Ü W‚ž—_uÌW=Ò ¥¯"K¾Q¹4X´Üûeqµd™W¾WÖº&ÅD˜EôbÌŒMñ—£€\©è0?­Ë%õ÷ØLX-[¾ü7Ê.ûqyL;@|°×—°¢×+üü§Ì­ ×IÖ†D=²²˜‚©…ty©­EÊ“‹EîÒè¡è¨]ž9ñ¾éŸ'(Úù9¯µ‚h¯´D犨 9ÿ>p|2:pk^ØzàÖM±È.S MÉ2¶P€†»˜5^tV&§7R©sæ(ö¼~Ïì×·³§—UU˾¦ ´QÈ×#!)3Ķw¿¿ËZBvBµJ¬Ø'¦lC?ù®RÍÙ6C¨¤–8B=ìü®‚¹Ójäh!o1j¿ˆéþ½û@\hc”·$g-¶«ùOÍE¼Èæ9‚AÓÃ!iÙ”2X ‹¾tçcq{WÐGÌGÕ|-ês…·Ïó¸–Þ°\½èó$zÏÃBŸ¯]m+ȶU®‘¥7)§ èÓW”W!ƒ$µ,?[x;!ÜwyN¹Ãø¢o§TÃ2fìL[Ó7Èò¸®UôY¥¤>Í9æc{¦ª›É®Ë5'A7'«ác^üðf?ö'¹³ÒP¤ã}šMVÜÆ¨UÏ%?u•׳}™+3‚[Kmu[×Òv7ÊÚ„œÂý±ôé\Ó}øÆÈl¼ѱ 6¶š©+’¨2®÷>™aƒÓj+·ÚîO°/\ùlqÈë8ÈN=!hÍÜW•Hɨ½C€ÔÑæÖJW !f²o£›Lö¡ðïk³7?E"'­NÇ¡v4æÓ‚ó¸è0¥­Ê>k¸d¸É ¦V!áH=4ï܇k¹Éš…€…ø?}X¢º<&÷bí|;Oå,'É… ™“ò9]«bÑ £ðeÛ(¸_VUN2£6"P÷MV„n¤^v5"Ð:-!»p@˜] T#·ì¾ù|xªÕ\u°/ö¥žÀ…3…Ö½o~‰„(‹ûõz&…•Ž/ҀѮlŸÏ—ÚÒþÍÛï[VñxdukàS¢t. ™¦TÑ9ì}8x´ºæú`O—x‰s•³·6ë6: ÓÉ=”³¯EwgÝÛ/¹%Ðî[ A¾€Çcm” ©/w£ÊÍq²›øPÍ Ùcb…ߨîåÐîçEœÌþq^]“Ç„ ð#"c¡ù×ä:¨@Öeå¸ô¼ƒ ûJ&œLµj^„ùEƒÓ÷kÑð%ã|¹GÄõŸ‚Oì$˜µk.g‡¸µ%^L$XèI]ÁÏTÑ,®peÀî!qNˆ"u!ò‚¼(c`©/N4º?èÜ–`Xæ¿ÂÔËUC‹§¹TTÍý#®×¾j4-Ÿ·«×ç«eA®\´žZ‰{bŸÅ ¿\ž´~ŠðÐún£ ˜%#“c×+"÷‡1j;ûóºÔfʈÊloÕ ¦*Ô\u¢´g'kD"j_¢|íJé³ï{^¨9ÕKæ™ôêÀr{Ü?ê…T>ãäVò#Œ [¹<½g0{a&ÕYè$æ!«øè¶Åã¥&ABœFB/s]øW_ŠB4Ðù¿*WN½ýN"Íñ°JÄâ»|»8ŸÈ©0Èf»ä枎¡’o\ OkV[‚—:tm9ÞJƒݺX“]‘ ^±è ž‘¦R[`ˆRå2 ŽTØ:Xg²1šyù³j,¡¯*ݹÎr…cz)aR¶œ7ߌsf€õ²&+p/Ošk°G¢åKC4æô¬È.&j­ÿÂhá8¡'x…âI÷Yס˜§ž6VB @Äù£/Œr‹8^ɪ±“_rŠTtW.¯Š–+¢i›p”ûþ ®z'àTºä œyNGèµB»›.óhå ]yò–ÖNδsC¿3Y 6E\^C °5¦iÝ2OÝÐü}Îh© oœ,¡¿tÄ^³®™ØÊzίZyÖº%ù [¾Í5¡±}M˜!ÈVÆÝk¢Ÿýµº¦=O(:”‘õ™q²býFqgyéØR92~›9L„³cÌuÌÅÚ ]îZ”k 8Åö["¹éEML9‹Åîû²¶°7÷Ÿ +¥'[k>ú­5?¼«æãè %lOÁ£ÃfpP _*ɳã~v*?ùP³•½öŽÄ‰ŸÃR™›3]àÐ÷?'nY¬ŒhHƒ¨½DD[ˆl£¥§á¢¢ŸªZ O„f0oú­š·ïöF|y…!¹9 Z<‡pCË©Ó~®á&R^iy‡·­µ¨K}G-§ v¦¶ö´øäs«Ø›2øË¼q¸gŸõE¢‚ «_ÖÃÀÍB-œpÁ_2[¥OtÊ;,»¤ÎHôhI™g§¯Þ<ÿöùÓç§ß Ÿ>ûî»HZ‚i?ÄKHÞ•ÄfK<Œ¹¬^«§NR˜«å¥~Û–æfqéᜨ÷Ëx&†HVkiŒä–³ÕÏ8‚CùÏŠ ßØ@ƼWØ)s„ñƾ¡^ìä0¥;zV·üu—y=t¯‘||É;ºÎÓtL Oivªº,UbðbßYuQ µ*7ÀÖ„Û¨%PŒ ‡^R"š¿u£Ô§ÒùXשê[«"¾Ä=ò"ç¾¢ôàm±¶âåIÙ‹ê!Ö®š[ZnÈâåÒ=ëRcL¢{0¸ØÒoçù¢¶78…y¢+Ñ­…ã6ä˾•ØåÔøžž$PÖ>ÇÒ„Ž>/º™@ª!5‘®M †hçv&|¹÷ ¥ô¥J¬[Ūu%¢â"Ót"Y&$ˆÒîOŽ‘¶ßÒóÿnT®;·ë݃ËËwš(Ùž™vŠéð¤L{‚ Õ—ß›æ`ȹr'fœp½‰°@¡K$ܯ[|q˜ÍþI)Z”»Ý•:ëì Kå9{—½9ÙÎàY/ÜPRlŠ_£C–60žAI›·Ì—æ\‘ßøj¬;EÎó)æÔãìQÞó<û,+?º¿.Ð+û«ì@:¨ûnõ.cŠ:õIÖÑ‘ÁÓòãGû‰õdûòËU7{_nXLeµ—“ÞÙ6š;;Ê-ὡ Éé–ü;4…×›` üµÅìjX {Õz…àɽ T¹G¶Œ/Dë¿ ecRàÞÒßÃÆ_jƒ6Œ¢RûŒS1€w£[«×höµ¡ûÜÍ#hžìG u-M;44’$;¤áõ7LŸ=U”EC÷JT±¤wTupAù÷¬O‡ðCLòrº$DÒ¿ç[ñ7m9wo5-4“ b»²uó1 <ÝÐü `û\±½Ø·¥^Tµ$TòV÷þx‘ýñBrqá@p/uwÛ_»d‡êî-•´›ˆ/d±'Y9ÿí££>2Gño÷óûpoÇý/zÙçq÷er{³£î°CëòvfFMû¥'!9?ÑÜŲZ/xãѦ`É›C éZHÑŽÇù[Í@ºmì²H×u5ò„«, ±TT‹pÀ²2#AÚ íHMi«Ö^Á¡úJÛtoêÍi~Gæ‘ Aúþµ“ôbõÇ¡]<Š.ºq¿tUØ9Nj‘‰ûZqMâ(mx>i}b*ΑŒã+MŽz%÷åuŠÂ¸¨Ã:ˆÛÕ 3ÛÖ)™úÅb]_Ò «Ê =æÎ‘A6§”ß‘†„a¥Àv§v°Ÿ³Ùg0Í1‹-nsDš¦àUº‹38ÎvZ¬@ô{ÇéùïYŠ¥RùËW»!E$£Z¢ÈôÖýq“bþ—ñ\õI}>`¡š´(9F]ln”pˆÆ) K9n# ŸkZ²Û•²Y ÔŒ÷H#ÚÈ!ЖëÀ‡³f#¿#Éì8D– 1.à«¢È'”Ø÷ÜÀq\¹n‰Ù“do<ð 5kÁyÁdÉô a¬t‚¤¨Ä‰“"°…ĉ!R£¥‡ÄÎBË›j€{³­Rd$Ÿ^ƒ§ç¼ ¶(Tºc[.ËÖ5`¥‰*IÆicjs›”Ð{ŒT(Ö/b²ˆÔA?)TÈÖÁHÒR|Ë(Mxm†Ç§4p¯ºâÆ=Ò cb؆†Å4.l©ÊjQ¬%v(’ëù­ÏûQ!Og¦Œ÷<0ò¯V^sÝ}©jÞ˜+þx“ƒõÝ¥*§?³‡¶íIîÔÖÛÖò$_øM¹š’B c¸ú÷Ÿh/”rc³‚-®ð^ð¯ùØ<†ó‚B.ÆúìÌz%BY‹¤¦†ð\3õ/Àu€í¦KlîùE-FIL~`Õƒ§dó3~~uÛuÛGÇ/ÕïšTÕÛã÷Ñ£ú·6àêfÈ^#ä¦|rØ;âƒåû'P¶ì Éwj=LÒòÞ‹]UõÓþÒÙïU猨Âå£lj¸¤7uÃBÔËN9O%ÀÅ”H;³†qð8ëÅ&F=STÌÙŽø’ OK-a¬¾.Bô ›Óõ<Ÿ«Y…`^6¾u§J9‚jD07â~‡\Æß:Ó¼ÙU™{3\¸{p ÇçÙY·ýe«u:õ½þcëËêzîã“]t&V銃²’âÆÞØ,eŒøkÿ5Ä\‹è|,È&¿£—(²BOcW4€uÂô}Ùop,5o[[‡ƒ·Jm*ì«·‡ïÃä›sʱÐ7Óú˜R3¼®–Ó1 µè*N¡BW×’`=°3Ã’)™‘.æƒ-J è¬×ç¬Äm½Ï’Ì[µ’µ§žòíʸb8\VÑYJ_šÆ˜òã(âÊq1„¹ž[é8¢BÙ¼vòÍ[6^c©èÉ”&•Ku}Y]d²“g`›UñÍ©M‚éÝ 4 îy0(ð¬›G(¢=¡5‘`Óa=¶ÃÖuŽ©z}õ±¸u=7Êï_Ÿõ³o$¬FAXy¤ZâÏ­Ä}ÞÎΫ)óPêÿG?Å-!¦™úºÊêÚzc™ÂX ¸ñÌ«*‰u¸„“ò†ûûyuÃKŸ7]Ÿj¾´Ú:ÜätŸû —a¬‡Õr8«Æ¤±FÌPSfo{J°5œÌßo•¼§’à ¿K¬€gˆe¯TúuÄK­!Ë ?Hp L™¥)仾—½oxyqlì?ß½[Î\éɯŸ»nž{7Yæ£ýên»Õý³(uÇ÷;°­üóð×ÿùçÏ¿fÅÿüó`õ?G¿f㕯¹ c¡ùö¿H‘…>“;› †³3€ÿNÈ3‡Ÿ8{RßÎÕ^Ç&´n‰8Öx·XÃm€¸Ý¹(‘‹C§cãðo)ÑËïˆXäIê1§äÔbô¡n$:£,œ& ?p‘I¢–-$·ñEìØÈ>ñ–„h¿[OJÌ ×6[¿ÑŠ%Ô’¡ ½UQ+Q,÷oãÂú !ÑŸJÕ‚‹âvK éLS׿˜'\óêܤ3ÿ"×ù9 Ü„PB4ÄßÙ†èŽÏê@OQ·ZX^OB@EQ‚;†¦ÂË[XÝžŒQ¦øèÜ›Ô1€226jb«¨Cw¶µ|3«Zœvži[-Àþõ \†t.=ô‰Ô&[†fKKĽÄ+k Åuk0¿2ëHTÇÎ fVë|7²pÒÃâYÊA”Xϯ—9QYÕBXQª§mb·ÔJñHÚØ‘"x't^Þ÷û^`„{âî–[m+ÙÉ÷˜O Ä̤úŒvˆØ(mf?™O3'±.oÿ;IœeöHáÔ>/‚±[Ð5ìAÝ—\å*ú€ñÀp¥ŠèôÁ„v´ ³ÓVƦ¶Žõ=r£üVÝHä£}>¡7¦mi©›{C ŒžNYô°!iL.-lA!#yM4Šo=áÉ¥›_¼Ûbo‚ vþE@ØËöÜ©[Ü,Ü&%ÇÁÊ”ŠÈò¤LLbËbYk#&+êæ3btwÜÈ{÷û¾‡|ú¡jû ]äm»ýô÷´x&, ·~/Ð@ÊŸé8Þ×ë£P$¹>Óc:±ùÑò6ë‰vúÀõùÛâ=r$Ž6NŽúè-"¹ut)²Ä–^Ý»þTÛLTá¿Í<“Xf¸Cγ«–©UÜCh:ƒ8vw²ó"Ž{]¹1Y%AlY–OÊ7xèZ&rËVF^§maÍ.Æ/áÆvJW—;Ž4tæß4ÿÚÉ'†CXчÆó‹ß:”f?É7Ï?w—¼‘6-óê_mâÞ{sõƼº~ü —¼mcòHü•ÛsÜÍ?³ ½Ådн\Ò“P`’Ù÷¹ù¿æA·ç?aK c$D†"~ç\™× „ÈHõ‚ü\¶ß–3>fpÅîÁæ„R÷!sÊas[ÇœÓ)ŸÓï"_ ¶Ê½{ú'½Œÿ ”®®q•ßÛ"(ǹçï8&%EÓ’GÇC±±I:Jµk÷²clÆËöç:o¥Äû=ÿ—B͵%²«qOöj³«çŽL/Âú—z“zT@?ÈŸðBS’æg{*úã6®’Ùª7 ý·„Tˆ0×Ö\èªJpƒƒh/²ôhË¿)`èÅŽ‰m/®F¶« ¨ªÖH¡€iq^9iP-Táq…ð!$4„„·Ä ÁÒõ¯ßE¢&E;øk3aGÉ{êØ„5à#3ÓS5€ Óz7Ij¬J>ŽÄ8nðQ¤Qdg×;ûÚ¾ý¨oxä?Ÿ-Š1ý„9ŸKÞk1Uø]éR~‡É=d¬åÛèã8~ä•QuÑŒá 60‹æ9A7Œ©¦×Œ:V×áWOn¾z2ÝŽt³&,‹ŸRK[VÌxJ”Švåü’}Ó_U§U˜â½ëz£ñelö/W×òîÃÒ5þH!î ~ÅÕ_|<ÐK'/ççêî¦yË"9hÁ^,çÄ®‰&Ua©° áÌO]G~Õ—‡çWåäÑ }&3òM€ƒ’®‰[3&.5êÈÓ®I™ï‹‹êR¡¨Z{ˆGQs~XC:³x@'»yKû»•dÉѨÚ_ òuš©„ÏÕqŽ´Íhås:n£È`É™ð8Í”ÈifLN³˜ÊIè÷w$öo°9Ù¢¯¼P?Dà Ù»¾¬¦zÏ'‚p AºŒ˜@r†²eôKÄ C-Àe±¯€o£,ºRL!8/íi[0&ü·Ü^'åʧ¼?½…ßKÆ"e;Ò‹%€F TœP/Æ2Xi&eb¨vβÑZµ@Øi“b”%%Íq””À»4ºàÕS:÷ŒÝÇÉÒ“¸tŠ»8ÀC”Ÿ¡EuByôôÀk™å7Ì;âõ¹*Úè*.ÙF”Õ(q˜dƒ]¼SÆBãžpË~&©O/E9Ôú{8%NúšðE"ÔQÔ†;®¥!._|ÿ¨´ïŠOÇù,îIL"5÷\LÉ@~“<é$óPggO´È½M-rOµÈ½.ÈÖˆ:3túÊt~u膙û©–|¥dg©ãð¼Ð˜&ïœYi¨¸…[iãÕýb™Ïh¿XVÓ@åc{"bºôHj8‹W ëLÌùë±Q`Öþ–é×n­/ 3®¢0ÑË86+¤ô»\Cô, ¥0±ŒŠi]®©¦´±°\öµ€›­Ÿ÷w¨ÅŒ kzn塀>K×Eã$Xë/tÒËwåÍ^+E@).úI<Êåeíàl@îUÑ»™—BcÊÿD(;©,ôNÙ7ʨGÓ]d_-¯µÉM¸yÉÚ7àãTš¤yq$¢\+õ7Íù°Ü2NxŒ½ Í.Ò¸\:pÎÎÜšu²ÆÔ Ò}Ÿïƒ¶»¶zŠÓÀFÏÔ 9üè«+7›t¶räWU©¶fzùÔc G@+Ø y£B)ÊŸ¯L€A@¿1ÛíC‘üYGGö!re+¬ˆÓ–<‹¥Æº°ë墒‚àŸÒO²õ˜h4ÿ2„ÂÌÌÇc|P’Û'ÿáî¿ç…H”ø¿€ZôB¸o0ac«á…9Jʉ6}FDsL%ÜY‘”V"»4Ƶ„T€ºWÙWO²£l?S¶õì3W´a@Z)¯èx•^¿5ä9EW]%Uµû¥’Qûù “)b£/#C\£r9’4Pðªr;x³·;s•aon¯”ýp#j ûaRl'9Ò’Ø»ˆ‰5ÒŒ1¬3 X á‚]‘Ÿ»rhHB``X“\ºðêHv@Çè~¼ /òK]j ¡ž¡)ýì3fŸ«2·°1A¹]ô!R¼Keúa®¦ßeöýõ×ÙeçAˆBMƒF¹¾»Ÿ¢š÷£nWç‹„fèàëìÅß¿ûnKÁ–P—‡¥øEØ Ð³ i³Ò‡ýômçn[ž è•«åÿ–vµ¶[L›JÖð…Ä5ÓþPO¢Bù¬»×Í*I–Œ">Ë|a°«ßóóh­É¯úT„5ÕŒ ¯6Fõ–þõÏÕ ÜF‚%¿âv áላ{¾RÍÅ­Ÿ@‰iÙïtJ„»êƒ285tË“UW“8ïîò8©‹/Â:ÀÄ%›¡°kø&¨Ùša䉱ꈻ9ûôÙ¼oèGm…;7Ý–òížEÑ>™7¯•(ˆ ê…᣺‹tJÉKÔ6,IÞjuGiF•IMá-qm¼9ÐuŠpz #J”"·X©¤óKIÉ÷ñºHË<®>Âw:vi€ÝÏ'&½×Óµ‰Ø¿¯Ë# «~(k™¸BM²Š“Ì$¾qì¤ÔQ0FÞzPþÈ$b÷`[²7u,€ÃÍSÎÿè—)(U‹1f–[FÙ›J„LYAl]¸·òpò>âF~¸×%Tõ ÏžI¿$I5å<ß@ìˆ¡Õ mWeÑÉÒ½éiAµ!æÖLPéœ#ÿ¸\q°^¦äz¶Úy¼®‹P¥³ƒV>9Êóm³Äà"òßq7‘™ï!jn@3¶ï%ùÆ…¦Åp9.†@^ 5ËáúÛ?Žß?Èþ˜•ݬv#ÈjÇÝ,BwÆc-¸Î¶k ‘A1ÝMsêZTN+ºMv:ùÖîã!ÔÁ8óz—ŸÐvL!…Œø8¸[3¸¨®\"XÙbˆ/‰ÿ‡ÕâÖ=4U„zò×RwxuUèGÀžYÏÃj>äœå­ÖÔ™¢vÄ]!ð?Ì%ÏÞ¢D{âöʳÉ4¿Ðý ¹©•ë|ßúê[ˆôV{íDCvñÊs'“³‘ö-tuêƒá[L¸KÞí Ý5tÓ.¤7ÙAgÜ£ ‹·ðê&оœö›©q„€Ê•b̈á¼hdJÝ) o&©âpM. xy:qÌ_‡š6(tK¦cš 2Äê#ØIQwićŠaTgè@ÏiòÒýBÃpH÷×8zêíuƒ5,bp}Eo³]ò¶(×¹ˆµ%AxÀqŠÝc™ÿ"¯Æ7‰‹x¶WÍã@&ˆ‰vÜÒરÌLߺžym4¾CÛ¬“qÙR—ÅŸF`šÿ6 ?-±äV$­IüätFQçDMç£N70$-E,ˆ¤"Îz0*}:ŒŒŽ£D¶yn%C,œ†«b½üʇ5vã6qy.¯6š£QJ€yÖ*‚VºÛG›'›(¶T; `n.¯œr£/þž`dKXdGb~”Ô ·¢+ Û¢ÿHFóN\uÂO{çó§ÈWB'÷æ.)¹~‹9é¼ÛÊ[¾ˆ\ #יŰ˜ çBq¥Ûx3g°Ô›Ë ñLç°ZvAãABaëÿ²!zËʲsš8ŸEHq³c!85 )(5L âbƒ;ÌÖ°:ÂëÈ}^™‡”uƒÛZŸ¯'6úþåïÏ{ªŸöìI‚`÷…ˆ]b­b»ò÷À!WQ)Å' :­ôäàÞñ×µ›i«ì™;±æ´èÿ†ú«Bž¾üÊyµžõÇÅ×QM[R5˜ºPÃ7zÖ°Só,mŽî ¤½+ßçj)ý‚KM‚ÏLj!x|¶¸"Ôæuæ wþ #à¯ÝÖi"-þrz=RRåÜ1¹aåÆ—ÈƒÎ¶WO¤Òñ¨v¨‰û·;ü.V—êV -r6P:Ër‹ÀPI êΓcU yü‚›±ùçÙ!u«—­t.i¢?[ØBÅQÖ‡D`¯ìñ@‘²Ú¼Q^ß.Òýz6 ¾ÀÄW7½SëÒ]B5Ø.´µóHO±´>$¨S`Î÷W½AÜ©):uZ÷EØÓ¼°sOƬ=_JÒP ýÖÙh¢¿X-‡²Œ†VË™eŒ•s]ù«ŠN ÕŒUb«‹ Õ¢öãûFoÏÒo%ýöCó7£Ýš!2üt-êLóÆ]P‰úCi!çTX']¯PŇ›¿<¢°\\õ1w:e/;—]ÿFð›­µ®€ŽzÇ@Î}D›ýîVgšÒ—5æÈ£dÑ Y¤ïá IHC׸G¼Þâ°óþ$k%tænïV=þõëJL ©í%ðylÔ±ã”Ù(ëö-ÒN8 tT-†z*â8`Ä8ÔàsÍrBÕ}ugnÞ.Vmúå(Ú!Ø0´ZŸY!ö"»À´ºöPxžäX"]:¦œp쇋åîÊ|*³…Ÿ2§+!qr;CÇ8îNúG‚á&&8qš|rNv6‹T*ù¤¼_¶¥ËP›Qîú<3&F]Þ£sŽÌip ÊOØ[ÝöV/é¸:…írîÛx-¤†òRó@øWg2¦ÅjX€.Šq—õ¥ãOÃÖrÍöÅhM(/ò§·•eçn½t‚˜M ¼qËÚ¡ð—þíõSw h”ãñg4Ö±D‹Îû±µ–o`„ßQøcÍ_´8ßEª©Ímt™j¼’)»“%‡%î vrt!ŒS1èIUåžÊ®o“È;Ÿ„…u&.¥®Â/ åÓõ/1ŽÖÑ»VìןR¸KÒ—@ÉaªœEdà\ù¢“îB¶ˆRÿ…êóo¯ß Ï9dêT×§Œê03Ï'L{°šÎ— \¯äÊzJ¯×~ãyÆ1I; Kä&­xz—›Ñõz“t*ÁšÐf;?Úª°”ðË(‚öÝ܇ Ì*ô¬=ý.ÍȧäªCc%&œ±Z,$D„®w«=o¨²)ië(uVþ3m6zç»ù–·veÑ`Ÿ*¥G1‹2s¬¯LÁArÉRÁØÇjˆL™Ñ¡ˆyüÂÐÑIÇöðÕ5~-ä5Î' Bhï³Ïé õË’it>éÑ«{_¶bW,êj*¡Û_¶ä#-Ð!ýøNo&þ Þs®†-Cz€DJœG¨Û(”D†è·P¿Œ_LôDüyðo blòbˆ_%H¥Tx-ìH:ÆQ±PÄ:´C#«8Qðfo?_VE¼ô•¤QÛD’ÕPÑj²MçÂŽ0Ëoð|%þ¬áXò«ÜŸK9{7¡`¤F–m¡b\5ò ºH\ÈÂÛ¯ÔPçÔz‡Q›ÑQWu¥Ûܵ7ø5ö!#¢Ô#Éë®^è8Ñ,æ1—·=k5"LÖL›ÜÙo4KÎפ¯êIz(Φäê ü|wf A;FÎ*×ß4ª*¸NVF9f–Qÿ0±|Ô4º\Ï?Ö©-ð)ºI¹¤Zb‚1$Te 1eæFu¼^Š4êAI D”Úö«¼œF®™TÌ2õM䬧òwñzÜÆ&™Áá&&(Ì-·›—oÓåÝ¿íËáÖ9ÙVÙýëj»¯8É}ì‘Pɹ^æ/€!s{ÝE5‡µŒÑ×5ö0Z|Ö¯ø–¥±•ó3¿²‡¯(h‘tÛ{ª`É™@nˆ,úÀ躜®˜Ù¢,Ðo{ø„ãÈéz^ºïâ×G‡-¢ÐÒ—è¼èí’QŸšßÉÊ7|{ñÖâ¦öêµè¹õž2%Imû/öÝúwµÔ!øbÁĪ’öQÖŠÆÈDÁG°Ìöûž×}þõa¹e‹¯ž à×/;Nq|á”F€ó-²ýÌ]@ìì üå.~–uÙ~â-úá?Ãe·ÕU ÎÑ!2qcÿ1O’8X8zP£…Yƒ¾ñx3vÿòa´–6îJŒùE|¹éÇsUFßÿnõL”«NðvÃTù¾•¯È`d“i_¤âhbw¦kß&˜–'uÄ/d;oÞ~x¯¡ÄáŽ$Î’òýq…p©Émâˆß"¦·kÎ]¡!\azO×\ÿ)¯¶„!Ïà‘Ý2…”ì”nœ>¸ÿ@b„…™;2š1uw<æD7? 6ߢ´xKÅ¢,F*óŠg±ÏwHbšæÒØŠ{*€÷\éÙkl½>Ww¤ˆÄÕâÉxY6Ú7ª¦®Ý$«N Å ‡—2¬úú@‘ˆ %½M«ß¬­#ŸïvÖÊɵ©:ýÇBf\b2:zŸïXLX7³þÜõ—[5M9Ê~Ø(ëú´¥,ß Uù ÔÝ®3ÜÚh¨ò³ÍícÖðlðSés‡|Ít¦ zGîÇÝßôTúdóL¾óÑ^èÉ?õþÔí&.–64žç!ãJŒX"º:šSkñB?:Tó$1,àͦÕ:y!ˆëÚî•ö‘ð~é0BZhýñv(é–¸¿ÉæõHW4sÕIå-ËW‹i*gù³¬nÚ¼ï+ þWà «L#ên„áÇÀ¨Â¯ý »²g8™p¿@5t'ðüb`$)Û˾ë }x]ðÝþwÔü™Â#ß¶Ó–÷¢‘"g½) ?ù*—ß ›ÅŒùrt°Âš3êíCŸUÊ•âD2àõž…÷áÑ™ÄLñ’^ég›ìëì°û¯Ëbhd‹0&D/âZg~Ɇ$öI[T4ÄÙ’;¡F@–ëDÅ·&T~[j@H¼Ý”ãu×”cï .—šýTJ«ë›êïÍ\©ä*Ñ© î™Û™›ønVÉbj±Q]öC™¦e!¹7Ê PXK‘=-³§­ÞaÆ•|ž\3€2.¡ÀˆŸŠb.£ ™ÂTgñžT£²o=‡Œú@Ýó=VËœ9¬;Ä¥ÿ`¢’NºÎEökË…¾÷¥£ÐQnFZDΕRTàjî„3*ÔÓoÛÙ2g ^z/˜°¼l/ßê“ù\=Ëè«åÍ®¡UÆä(LˆºÒ ùá"/ç±|/fsÁH×ñI%„§«C ¢â¼tRí„Rµò“ŒâsB8;v‚>#ŸD‚·©ß€0ìS#i ³(ØÑCÀ¹@[Q<Áv¬60)l!¥Ä1ù*ŠY‘Zÿ.ЀEÂí]^îIÈ[ÁŠ[ñaäu6`{ì‰ä©7J5âÊì!;¹iî­Ä÷Þ•/à­/º{—Krœ{=ò‰.ÑòÎúËõ<‘íkuÑ7§IŒàT²ò ›;Y|EçÔáðÜì³Ûüa½Íœ@qÍËe€©þ]®tâÕy vÓvi6Å ø’häš´Xí) W„Þë?«ŒÒ$ЏO‹7 «KGd¾Ñ`ïÒsBõÁ¥ä_ÃêÛklXÒ'Þ׆IªË~b/ˆ"õ³r<žš;Ùßø"ÛØd˜|‡O+®Œg":bc!Ÿ‹%§/éÊ—è ã'ØÐ;¶ô¿+[¬zÁ•µÖbFÄJA j·bsʾÚGÅû_‹Ì¤¶`ß1³bvî–Ü + Tá#Ò yˆÇ©‚¬xèjɘˆ°Ù=.6Ÿ¿’GACõs±¬jóÊ™±sŽ8Z.ZU¦àF¯¢l%yÛÈUSS×Ó–³™ð÷À›ŠßHÛó§Ò‘¥Æê:2–ˆ±ð¸Ò›½26ÖîÁJ®㻊@‰mu´ZG¨*yöò‡ç/Þ<{%ä25Ë©<«6z0(ŽÓÍ@›Ë4@yH”tMCF¨”ýgg(Kæ³³ÿΊþEÐßóü<_/ݵ~¨:±Úìø¡ùаÊrñöaÑ !‹|Q,‡4ñp°Z\:‹¸„ öÈÒÖäÎi+' j†F°°]‰—è#×òK¾”AW—4PÅ1£|WVŽ¡íq»‹æï0v«\­I0VHè²¶ŠâSÀëÞt-…êT3,²GŒ‰á¸áeî㇪tÎ/ 8f‘¶¥§®þ Ð[7ÎÎ@CŒõl­NðgBíX6›¥¹ÖR! ¡9 ºòе~6ÚªP§{Ýê¤?t£i™õêvÕQô²›ztÔ¢vDQ£P: Xæ£1ëbÒ/ëá(§Á°¾+Äø×K_ø>c>èJ¿Qg>R·F*w4D´kOõ."@|ÖßáÑ>ÇÙ´iJƸÀ< ÇÏœ»qù6ŸŠÌ|vÖá"cü NJ~f÷Ì£Þ?:NO4ÂêJ/ï¶ÄfÎVZ ³¸eæ N’»òïr:¦ŠùZCüB /ò £ŠÎÎâ`J±’^GÜ Ãî4Úë.ÀÒÿOú¢>:ïÌ+Úô-̓‰î”DM„oi…ÄO-Æ-Ü–ë™uöü¶þÇzω4Z8d€†]‡Õ‚Dtb'FÙQ >à!Ä÷’Çê¸É §u_^³Ù:{F益Û⛘å-ËCAšêõ‚#f‡32©¢¹½xö÷W?¼È¾èŸô9»[ã_•æ’z€èøY©ŽÌ?}!ª] z (o¡ÛÓg1Ò½~ÆoTº]_VJŸ¬Ì¸.Ü>íÔÍZÌœ û¶- Ø-ÁråÝßD™3Ø5ü9#ËBJB©¡4»Ó¼¦>¨Ëk.qq«˜_ÔÏÂWÓ8Å#ÿÜãH°¶ž–öš%ïR¾­ÛteVÚ*U™µüVT Ê Z¡¯È Uˆé¸(—>1y•×}ÞJChˆÿ î-À׿A~¡žžÅ8z2TÄÎÇ"eš4¯õŒÞ2Tèwî…`{«çZ2 "‹áŠÚ1¾¦öߺ%þ_?UÇl4¥uqÂxi  ÷F #G…Ù$ì¹a¾ù(A‹R†¼?m8_¢wyˆWå³™Ã.ާËÔvÄÔ?UŒ_>,-Žçº žå*`q„°‚†ZÅeßán´Ã‰$CYÌ.Ë8ÔÉKãÑfºÑ*¢3 þbŠÇù?®kUÀÂ^„ƒm¢:UÛÜŸ+/Q¡Éé˜Òœh+Á ¢*ï™ÇԸĞ ˆ)fò0È9yrxg&ëŠ “¯µjhÇŽíV’;ñ`(]iT$j9­Å]®¢èIôÀê6ÞÎ×îÍ å •1™~îø…r±Ï쪈Ñ$µÈ­€ùƒ•Å”æ){¨WeÍ/„׿ÙòicJ àåÚŠ*»M5N¹@k›kí¶˜ñjéÚ+ØuO4S»ÌÜè°1y²>ÝÙ(Ê)aíßB$êzÇrî\lq:d’å Sý%1Ð5œô-¹]ohgM·Ÿ½4¬„ðÊúiz2÷™ìÁsq/Ò—¯½ã["¼4a3Ðñ >Jk“ÏÐdµÍ{XP¡ø_°à=gÚ­µè§Àm(f4Ï?b¶¼ÑÎlé÷>od_»Öêl1…{£ß}o7ª’ËÒ,¨lõÏkcü–É’ã—Ð…ÑEž:`áȶFK€I0»$ì›mCÈÔ6ø:ËMm¼jŒ}sû+ÊÜGÓÉ™ 7+è "S˜â±Ý€‚³ „T>ÊŽ÷ÙtN{ 9(8 ™.’Ò†‹ùÂð¢e'…ö}¯£NÈ€B˜ŽÞ χš“°‹û˜ ùì«xö³N:ÜÝœL«ëhÅFñµNM^ ¡üø¨Å5–@°…â3¥þ„=D–ùð¼œYÊs“°D]L'r}Ç¡óµôCÌeÁZàÃâòC„F!i¼W{Êõž7ÚH2âŒ}.tQ6™¹S¸œ+[eqywn’F(ÌàAœPŸÁMQÃÔ£bmâÖêDh˜R WKAÎMµ£üÕ61IDÏXÆh=™ÏÑði“!2¼`útV>ß/– 4f„q!géÃCÊ¥Á×ýÆZ”ºÜô+–0÷Ø,¹•JB C#¹¨`wÊC­~Hì®vðôäÛ;ò…n3@ðF~±6R¾Ì© ¥ù¤ÔÏäîçÆƒ¡~ý•ÇG3å–M¯ݧ'™RQŸ‹i 9+Œé‚o¨ˆ§µZcøõ²^núªí”_µø¹{z’M]c€¤Vøî jï2ðëp($Ž#¬Ã©Ü:À.¯‚éų7ÃWÏž>{þgĦO·â s²Ù^º÷¼o ±ü>\7¶Ö ÓJ¬ 7¦D‘µv¯4ÿ¿vÀ°›/}p|㙳/ä[-KÃá£rï]–÷¿È|Jp©@@0Ó¸“d^þ´ö Ôu>¹X§Çš7fÖ” /§æYÖÁŒü°®±BÐHSS–u³àƒ]µqÐ\BZýv©¡ýÇa mèi¼í±Èôðו­AÝ '=Øì"ëÕ«7Ï¿}þôùéwçϾûŒD¶“ rg•8¸‡<`8ºû –ËÛ²Ë=ZDòM\#ámŸÁÝHÔ™‘{x]ãEÓJh˜›¨mÍoüŠû¢÷n$¡¤eãƒ_ûn/Wt.ÙeŒ )IðE (%¾K´Ï8˜FtFÁùx*Ð@•lw°O™ñN‡ÌAó6#oåŒ!'å£UHÌb.½Psþ1~†KÍ#vï»Õ!È…åÜÍrk2dXrÝn̺2íÃ~bV£~n® yÓŒ©MEícHÅú!ûf„Ùc‡GĶ%Ìצ ,µUí§»ZöÙV$á¡oÒënÙA z ÑNøÞ}ÐÐ Aæ!gy£iÑ—ØIG‹8d ;JQàÈÝ”unºªnFȤ0Œn`à÷e^.!Úh\'³±Õ½’ëc·Ì0Æ ôŸ¬™ûìÌOºï™%.Ü¢òPàˆkFô9ñ9ÙxRdàp%yýŸN…»;gþÑáá¡qle‡=¯ØY­`Éìî¥Õ4KœÜUâèÎ:Žî¬ãøÎ:YÍpÅtƒ#þ¢ïÎŒz[)Æš—1T—ýUˆ·@¶%&_ª€+·Ôþ¸ƒ ·²?fƒCj÷ݬ¥©'Ú‡ZjŸF²ãñÖG·ààú(d€âp—8ð-»å|ÐbiŸÔ#Itmã9&K ÓÎwm¾nñY€žëïfej¸wÑzì–ð<>¶LôýÖÝìcÏ78òœÞ?¯¼íY+à[ä‚…á7™Ãƒ‡•4+”8ÄÄ¥ÞVq$ÄÓ %ïÕžBÙ±– ?§ÔÂÉ\›e\^”N%;qÛ4·s&µ© Å _ߢ"T fhâúºÝšsaC «/ÿ}Î]~3DÄþr®ˆLŒ¨]åçÈÓµŠ`îµïHUúAÞ‚Uyá‰`ŸËÅ¢-¥_#ʨ¦ÃJ0j¯Ã!ÒY‡ù1¡ˆa£ÕùÔËÂÄJ¬ËLb¤Œªyn1èüþG'þ·£_Ó„x¹â`º×¢ºÛÕ­Üorýáþ’‡Ígåª\!ÐaÓuœ¯ö8ig‡eƒãþmÛQô§ñÐàQöù£þà:ʾ¼ã‰‡îß¿1np9Ä^ÐqkqµÉñÀ­¤z°q†×ïíûôÚm˵Fd_Û»X]ŸÐ”cw è¬ínº½O!kyã–ú?5ؘqÚ”%VO²I‰| ²Ød„øF÷øÉq7ê._æs'•£ºe—‡xuvó—ø{BEXÔÁÒm,3ºë-×ó±ÌË ò³¾m ä}Ã-QÍ]F“îÄÁ2-.òÑ­žh#qj J•@Ôôn­>µ6˜jŠœµîgD¶àP€×oèyý9e'œBKMÐ×ý;t%vèP(½ìñ²˜<>ãQóÕÇâÖ »ã!~û÷¢'äx왂ká·õM"îÁ†2””¡ Ù—iÊÇÆHÐ×–ðዘ%{'¹"¯2+ÊDà¶Ë0yª?¾N3s¹£Í Û2/›I 'Bˆå´pñÕŸ´ÒPËýΨÄàõ µ„©.FO4œ|#%TÙ+æùÓËçyi?T{½ìíÍûö Ú˜1v´"M÷³å#EãTÝ¿›ý[4LA÷þå n¦Þã#Ò÷ò鈦¦š)FÕC÷€Ûœ,ßùyßÕòðÕ›o»g]Î}d9jò5q‡ÉgÊC!iâöSio/ã"1!ºY(Ž d=­[–½™™pWš€d¦ì•ê€:&Ø bƬÓ?1«ˆ×åO›/N“™D_G+'Íì Ä­ñ[:N4'[âÏóå²ì“÷е›ÛÜ n£…w ÛßTÌó¥ëêÏR\“'Cv *Uo‡R—IA'Ü=9Ø»´aVš™áDôiÉॲ/ h-t8úâÃÊ9â¯- c‚^ˆ yëÜö²›_÷[¡vβ¯2{ÕWObȳ~vË2T{¤aLÙð5pBõ²@ô*.Gòˆcòõ²üâcÏÝ€‹ÏvFæòlIl A0šªóêA¿B£äæ2îߊMZᨽ¿“Àç(|È׫ëBm8¬‰õÜrËp’qÿß–¹‘–ô¡£ÎaïpÆØÁ wÔ”•D·çËýAqð9ЗjþÅz‡nôY׿TÍATÏfŸ¹›i3£íw¶>sІº™í?Ÿ+uÔ‚+uñ}ÈGÕy)¦ƒ“ÓÁwy[ÉfXPK‰Ãì ;Ú±9ڢн¼Ÿ}'4,t‘-kŠyÓRü%’³>úwÆŒøP¬¿póHn:©—ξè>?QÒäò«BðÚ&ÍpãóÙHîv š5¾9ºÓC$h½Ë›ÿŠ–…ÿàæ+B½2C}KKŠåö«Ü­Ú¶µÓ£w ü­È¾YyUï`d<àÔ S­b bykƒFÖÕöFcÆÇ°ADÎa¡ãÂPµd°¬½"¤Ë8éµ– £¿ÇÕË}Y„ "âUßêzNÀçÈ,ø&Ô^B k ÿ±øQ&¥: hÒ8k]T9,#rHÀAÖ“HLF¼â%™ WtÌl(ºhCí¥PŒ»i_ÀÖ¡D;¡n7 âŸëe§ËU)/'Zy‰Í^ênDel }«¸E‡Ÿävˆ:ÂÒc,(¶½(§F3¦}(ÆLÂjE.mµ\¹![ôç'kõirË®p\­Êó43ãùÉu1C ²+$`ŸØ×‰x&¯5:dh‰c(ÀŽ©×¿{gQ”>¦Îçà”b*R”E'ß±ï=>óB>ž5õŽCD9u-n}÷ÆŽ‡œÔh”n[#Þ¤E<$N¾#Ï,™Á ‚‰\zO¬”Õü`^\äq»ÂFœïœ#kPBŒ/|r5õ1í´Ohv/ÞŸZ[äÃeÜ9X\™µ~çú“ q¶Ñ!>SÉ©“S·W­2›©+û(~t'¸óüy}Ò¶DZ™Ù!нrF¯¡4TXObbõß×òÔLHœLf·½J…6£;:|¤ûºñµÝ0ùÂdzXˆÙбçõ028OîÙ;¾-ýªhvƒðÑêçDL›RŠHø4\Hìr¢THáQøƒ¨u’­¡(0ì+„Ïܱb©Û`Ãú–_©Ü\(4ìH|®ÔíŸøˆüÐUg6®^—õeH \ä·>BäÕáY-sÚxÖ=>oÎ:cèir8ùC*ªâik­z-]Ū ìÒLê&ÄAï>ÅÛ$ÓÍ‘¥dŹ©;Šâ@],¯ J„Åy%à»=`ÓÝ‘wî%0·,5ûÛ~GÔÍ,«·H‚ô¾·P$»ÑÛîÓPÔ‚j+àò@¥B]ªx‘šBuJësŠ™×µÆø)öû—ϾüÇ÷R©jo.7QAò´U áv»¹& vqënžõ³æÃ¾‹Ušl«ÈL²ëÅÇÅ­{ðÓÃlü®¾³Ô’ÝÁœ¼e“Ù]‰|¨o_#õH÷ºfîu1öÊpâFgr”Ñ®ƹN–nžíº r]æÝàFÍýyÑ)ç[6ó¨]rX¤m¯;$âT«¢¦ÍÇAZ`›$˜»^©UÞÒ$Jí1!~eò—ÔÂ⌺u‚vt›S%¼6¾À{[{-p9©tª¾iXGËj½# dšÔïÆâ݃:ªI÷ÔNZ¦—-FþE] Èã0¿ŠÖüqé½å¥/;TByˆTE*ÆA°ÆÞnÆ­Åh \£££8=]¿¡%0çžf­ÔŽ3؈qï5i’övPÛ£G¿ýÑ­áN"þ'¾¶ñ¬}±œiåØ$­]jM@G³õ‘‰oœBîÄ* ‰ùTâ §¹—='zl9ðxÚe‚ÇÀúEB“3¦#ÎÇÐ\îîr,¸s;ö¹N’9ðºÈ—#*²r‚abq¢%ÖH'èJ†záJ@ÃwÁ¢E‚ÇÀµ•þ7§¾×Ñj#ÝPÜÓj%įÆ_ö9¼[÷üPÖ;í>?‰°›ú²Hëâ‚·Z9d†æúi:…ïÎh–þ”À=`ÙIâpamggf⻎ÓKùHÆ~×Ow£-KÃÓ³ãŸîe· ÏeÀËoÌXÍ_׿‰ð™>OøjÄË;8þŒ_¿Ç ŸK¦åŸ« áÊmf? ÉÐ;õŽ<<3ÜÕ-´}çî=ÜýFS[Ycqz[™WBM1àhRW¤ xÐÚÜÝ¢ÝèªÒ9+A?P1¦ˆ¨vo׃5¡üòžÍLáævœø¶žÑ“^éG3¡ï)FŽuT“èjW˜iqrñØ'#–¢†(e¼@h'šªN²è6;c˜c0 =–—zÉ”ð›JV*„ s¡eóÔ([W€Tþ n0¥\q<¿S‹Ã#,OJ³|=åÒ·Ô‡{Y© >Ì£&2¼œ½JÆ(¯HE>üÈùÌW:¥ÿÐmã b§ ¥G5S)oá*ꀄм>·Ö%éÍÅù<™UÆ Î¹œÔé4ñ="øèa»ü‚¦´‹Ëü¥ÕÍïnv®zÙ†ƒýÛ_ªéصçà¯ÕøÂ9ËW?ûtÊŽ ,Ù|€’{ýÚŸ›Ng% ¬2¿I@¼÷kŠPëÇ(³FzÔš/¸|B³nšQ`J=”0ù6½þ4^s¤VÍnÎy¹å$ èªâ×âÍ y[±»ãð^»-at™„0³Qöž5T0u|‹GÝÍή÷k*TŒ)tnú?º Þ31Ü"èu´Ï‘ ­™6œÐ<ýÇß< ù[ÍvéÊ:€½ã©oN_¿ü[xÊÜ—ÒRmcË£~px<’rX,êr*«þO-'äe?)æzP »ÅüÐ~h<[’K"Ûµ¤-#Z-®Óê‚ph’èWÖÆ à-^ÂfLâm/ȳ•ˆíDCôûn‰¸ýY+N*\²³ÅQK.WYãƒÙm1i¸$‰x¨Ÿ-rÎ}2¦‘E½½½È޳¬@ ±ž¯†«j8èt³âc;ˆO<üï¬Ì¾Êøç3`s¸}ô¿ªAH¿épØ)»¿†šö¿Š©HÜ– èYƒÁÿãñEöÇ ‚݃ÝAmØí6*[ ®OÔT­ºQns"¦þÀ0ÈóõEm¹îL¯&“û¿¬óާˆd›rxåÍðѤèéi8ôË[ tü=b†äR¢¼(8vK´¿Í(üÜí·K$0µüª`>ÉEµZué§lh‚‡6[ îLBR‚d¿¨Á#¶^¹÷ЯBƒlí³(F+´7V¸l}©®²(‘¥æ +y¼¥‡pWün>obº›œ¤–؈ ‰OþÓçww´¸LþDÁä²÷—Øç¿ÓˆSÞ£\B(ü<ããN,æ>XGW˜—?}-F~–®2‡Îít3lPãJ½"Åfqõ³*/+ôÌYþQ˜S—ÆX®'¾bUŸÙÔ‹€±ÖYG¢#g†V˜¦ºJ#`Ýj#ój\ŠVHx«¸ÅŽ^É£"í >ÈëÝðÁ;Ñfiïòå4?/|ž½¬½›[:eìˆQ¹¼ÙéË;0¹Ää$¸V6ãîBrJøÕY{v†:hqs3ÞÞת÷5ïwª_l·Ê\ hQHöþ·G’ ™@DË’[ƒ÷ŽvÜ;Žï}Þ¸‰þvBoOúƒŽw«?°)㸓œ ¬“ù‡Ø„Nz²¦<*Ó÷l£Å}Ewšvˆ²e•?[O©Ê=CxRÀ§¤eËÊi˲¦GQÛŸ?ÀÊrsPÿ´&€ù›{Ù ûF«Žâo>lÆÛ¢Ãlº/ ÆÖQ/Y(Ä—7iÈ–=8d'Àp ¨5ŒEUÖr3ÉÕz¦”µ“ý·¦á *•&Váœ:κdug„ã—ƒˆ·Bvy¹E°TËÃ@X!e7ÄåEw-Ee”[ ¼¿zÔjA¡žLëë*r § CëÚó‘Í„j2)ë½Û&¯J·1šPNð Ì„%WJ&»š7º‹=€‹à=øïŒÌ ¤>ˆÎ}ü’)ö˜4=)G‰<,]ɨÒÕ²Ì˺0×ë+' ”³âS-žÎ:¡D ಇzˆ/[Äïþ¯Šñ2¿°á«²¸®-,–ɸÅ<Ú¤¿lÔáÍ÷8¦IÁWÅCúUΟÛx8T ~•ï:¼b xÃk7ÝÔÄW]ÎF3CÁª=JÞÄ nxØJžG,¤†øÂw_€fÑÂÑLw7£‚Ö™­x&]•causiÔé>Æ%×CHM<é?ŠäKÃ,<üüá—'ü¬T©B¯r~óñ£þIß=B#¬k§|£T„Š£ Sf_00Â]>9l9¦•\JKuÊ%zïƒ;;ïÉt“@Jªº\3îóI&¤¢©šªm(€R[#‰žŸÃ$à;,Bz=ñ`T‰ÿè“ÃA"šÔ˯¶ì— ÈN–5¶¦p>¤Ñ¨›½ðœ!͵m x´EÊo:>&É7id’ºˆ2”7ð°J+ñ¼¤Ö8:‚‚©ŠÊh®ò]t,«Ù‰¸ÿÈ—Ø œŠ5%úÉaË®´¼ZH„X§;ÝûÆù€zOVHý$Þ’R• ÑO‘-pK4’ ¥ÅŒ:⊈3Œ?FA†¬ X;²s½Ë"ÈÉaÆ }((ê¼Õb†¿ˆ uö(éßEœùŠ…ñ8 Œ6Þ@/MÇœo߉ã‚×¶dœˆ›â¾NmŠÝ¼¸p À†ó‹y¹Zã·z‡p¸8hóþònçíÍ?¼ïeooõÇ]·(`Ô!ÁÀìs‡Ü‹äŠ–d$Êï^3SõU¡wDeñI‘7½[¯üô³þ‰ëzd‘‰ ”Ù™‡zIª®Õ.¶n–[óÜѯ¥¨²uVÕ"ºûïÓ4ëߊlÇÑ‘Þw"ÊazÝÑéŸôÜÿ³=*’òqè¹¾acU î¬ÊuÃ]õ îh’¨À÷k“»u´«.e:&ȵÓó,½°CºŽ\!BŠiuݵWeö®hȶÁ̰» flÑ A¨ƒ~ˆåÎG»Ä+Yeþ3_i•ÿR¢eNí&ÚPh“í7¾yµk«¶Ð½ç/ž¿y~ú êyA*N ‚kŽ6Í—-¢ð9¦óÀ¤/=5úÀÀ%cºwó"¯ŒÏD¹™}X¡O( ªCø4ʉûWûö&Kžè¯Î¢L‰„„òMœY;â¨\ Mú…-#·BÖÑj?@Up“gß>÷ÿJྈ%)fXñ`/£…}â­ÿµ…ƒŸß&ÈÉj€ScÆâsšøÇÛ¿L:/«ÅåmM³Òvâ&ã0úý)y~(JÝøw«Y£ªÖئe| {üŒd|[ô“Ã{?zŠ©€Dêå…eªóG?câˆÃß0§ñÏþüìÛ^=KW‚v8‰x¶?Ùx$-®¾K‰ºË¯ž¿y†¡Ä~¢ÆXÉ»¶Žy²ú’êTœ5j}õìô›F¥q³%‡Ô7Eú§ÞXUáÆ—•̪ g‚Ây¿^:ý”±÷ê^Žèà7Œè›­ÌÀ6qÊM¦ùE×l‰"®ã½î:ù¹öÝ4¯æ²¢£ AMtº‰R Ó»hÚrûJDOÍ¥à&9lJ·½p]ô…ÞÖÞ2=[>úH³wŽ>¡w¶Ä'h^Ãf=£e=×ø¸! …h„¤7ÔŠõItEš/åü)G9|\ÖêŸçµü²Êtî"ÁCßøŒ \ÐÏ-Èà5`Íp£!Ÿ6Ù·MU+MFÛ]O‚·fÖvâì¸gˆØ¾‘цsšµÁ÷ØqÑ‹beè5;*Ì‚-êÂb>KÊu.Ê]Q?:Ù¤Þ s*õˆ/J"— }¨¼hÙ½z(éÊg’)7ÿ¹XVšM†JÕœ#ú‘±ž&@ûX“)¸ d‘5w•v{­fðeCçóÌ¥'GmºMT¦³G™s¯—ÝÅôt<&…‡é{ÚjÑöÕb½àMò¤ÛÇ";£Èi öÿÝjGÓU\ç·ÃËr¹ÒÅ-¦SLÇÿ‹\îñó‰ê‹ðIß¾vRÁ%ªqý+oë&ŸµM4G%¹Æß-ŸEòùz>˼Øb’»»Ôi ೫Òb˱ËsÛXbIà ÛfEoàâë&PoéaDé9ˆðe!1ì( nYI€2-ís ÓÕ(ToÜŒÂ7=x'G›6 U5cïo±ùBÛ˜‡e[^v³›®åiµç ÝøÖ«¸¨ IËÃCÍ}þ-Â:’]ô‰§ ˆðsó` M]D«¹ ^a“½¥È­7|ý)MVŒaÆ€±MÐ=;þ£•†RjbxÌý—ËóâaD–•a츮ìÞ‹Zm6ö˜?g…î\M¿å¸!T(ZÀ‹fbÕË‘mª•mEfÕzu· jð‰  sbîg¨qŸ·¤Ú}}…tÑêö?å—qÇ’Žê|Ñû"ñ&nÙ/vcåd`9W§ŒO§#'ºïççu§lâ Î@?8ÄÜ\ ¢»3×Í´Èû‰Þν8*Ûç…ÉÎ2®žûëÏÖÓY¥»¾øÖ˜#âa:ªºL&ë©Ë0AD‡ÆÑ¹,¸iͨ{ò\Ý×€—/¹q€¹fpÉJò\Eç_ä)O„4Þ­z·¤9Ñ[¤!D!I‰]›ý ¿s;ý"¯/JÒû¹ÐæG¨H¿c±R¤öÕÙ]Âç†eûe·þZñw1Kpdõéêý¤Õ0«QQçÛda ~ÀHúì­ÆÑ¶odà›ÝR«Ú‚u5wÞà)J0M2ùtßï²~7X#syY„Šà­Câ/QQÜ Î© D›N> *DyÀM&éz¿Y1„zvöߢh¹]–ÁßÃËË$üÐAº§nv¿Óa0÷­}›xÇ=Ha$YHÞæPµK½¿kö½t÷³üHøÞi€ÜÑey.€% ñáç|Ïò…j¼Òj7´÷T¨^ì‹ ¬‚¥«UÜÐTȇÑE8A%a‡½ð#ê[=@P);쬘»M´ˆI׺áÓNÒè09UH‘ÃÛP1Ë šÍGxíàÑ·‘" 4˜n·*ÆðºðX/Zk˜’]ÿ>Ý“@íGŒjiIN¨E(Hì]I€„¿ éü ¸µ¦q3ýW`'¼C½|ïæ–¿Â´¦ãOAŠ 3‡Â!Q‹iÒGsy–/!V0W¨zÌ}Û%ˆŸä¿"@޼›ç«ãÝj²”¤[œšcêÓ0,¡RnØÎw °AnxaÊt9ìGÁµ¬ÃMÇI|ÕÓú÷áIÿÓéUšj}¶ß‡ã+>Ü{7tS&扤=^$o<Ð 9Ýç(O&ª#3Fz§Ÿ# U»þi"Ñ•Éî¹P"D¤¼›ûLv„>¸Þµx­XJžÇÌ}+VrÍh|õp smÙ¹êâÊ5Qf¸#¹[7GJº"Þ”8¿fÒËœ@q[SÕª%•—brhý»¹€{Ûùp=rr ;° É£<ÌÞgûGýpM ;˜/êÅ`ë4ÓÞ”Ö´V¬l~hâ ¬"~õìôoLkpª…Рl‡&O›CÏçñ|ÐŽ u#\,6ó±’m §Ä×’‰(òG<„µàElVÁjîKc"ôCÀ“ÇghT~dL¢õÌxqĆÂã.n¥Õ„g9+Î1Iñ´ä˜!ªtê\hŠRÖaÖŽð^IP‚‘S·¹ ƒQÖ}ïÒ[æá3Òæ^›ƒÝmA uñÌ‹¬¸iRæ7hb½gªòuøU°6–w„ñˆèLOä)å±¢j±Õ¹a¼p*óOa,á»þ}+†â%‹~àëdÆ¢«5íÜ×pƒË?ÖÅlñz~µÈêSK½úÎlΨ5}ׄÅv$t„Ñq79ÒKŽ›Ò\š1ùnõË(;üÅ­Ì16‡_®~qkõ·Côêî/™/s˜ ~1±ï—?þ2qenXÿógöÄDêÚÍeÌ•ð•ä<ÄR{É //£ $„u5.טM¸ŒØáhÍÂW¹W¹Ùlö?Çû—û+·!ó¼ë?köi¢N9™¸;³îÃÙ*_û›—¼y)7/»/å&þççžúFt¶LE¿vm¯²£Iת'¿××p7ý,ùœ®2ÝW¥¤²XˆÂíÏúÂÐHô²nÔ˜`Üä Oô¯6(³ßÝ•#öøû;‹ ÚE«ê`Üi A ɽÁ]È…¤p:$,¼õÕr©µà†âï£ÕB,,.=¤FÏzî%‘tá7Uvqtj§Û9D·V9%| ¸x_õ;³A«zàåȾˆ_ÅY¤þàf“&i¼=m‚²WlT0.œŒ7ÉGž÷PV¥¬ …Û¹-øÿ&{…¶åWH²[|Ëâîâåû?äÞ6Úl˜Ò“‚ðôÕ=Ut‚†o›Ì=#Huþ1ª÷p¨©¿ÎèP½PP$éF ;]uGs·¬2Õ?ÑT¼Ë¡áx›/jÏÓ°†,÷0£|2!ÓµêôÓÔ‰s$ô¨ÁJ«ò‚/Èô£›÷˜n„!Ûö=B²€*RÜŘQ¯^/`ë$¸UŽ/a j¤ÒqxÉÄ$¶ž•ÅnªY'‚Þ$¤Ý{ýR~ÂK-j­ÄŽ"'™Å:b §k(|4NÒ¯WãbICs›°E¹I©m©úz÷S³õ½¹B‰9ìÌv#Òyýìûn”<3ó0q¯4ªÅAü;Þ¼Ghµ t Ôo´X±ÄNzÙoß¾ûZ\a5ÔÿPG~iÙƒ~ k iø¢Úòð$}R¼FÁˆnÉzLÉB¸-üÅ\ó6@j†‚{¡IÓ(í$äªý[Ótìn=iï×0ò_FPD¯ŠIŸ©æ¸ÓFR/­ÄÛòýý¢¨ñí|B¬W¬¡f>ˆ”ý‹¤üú oˉÏ=ÞK$D½³‘ž ÃßãílõøI:ý%†¨'ƒ6¸ÙQjYt¢êÙ Õú==¿Ä¦ë„Ï^æ£ùó:€€†î Mâ•ýÍLji µºë =ޱß/‹ƒàÒ¯×ç‚k± Ù8´æ” …o4À~èOî²iɤǓ6R8ÂpßòúñóŽõ)aÚj]E”î$|™ Æu#׿+ÉÜ`Œš{œšÍܪáeìµ§n1þ7ëÌOýn·a‹òUq»ûÇÓ©ÕÑâAºÒÜ6jÃ2°b}wœ¿=t«¡~¤¿½ßxÈU?„_é¯-Á„ê Q‰OâON¦ØG”;öÏë*Ê¥4ËÜ_›"´ÙÙWó%ÖÔ>᯺º ÕèáÕhêJÏÜÑüÕåjµxüð¡ænÞæÓ¢ï䜇—z O<H÷ÃU¹h«â볡 ÕLâ)Ud"Ô;É GíúGÜ`“¡<@;ªÛ\9n¤dÒ) ›‡’ Œ /»¤«‹Cø™ Ýg2dØ0òõL”cfþA–žM¯˜?ä›J©ÙDê&üá <¸£ÌL’—ºm‘ÞܼIÕ£¼H`§°èb"uI6 É@àüÓ< 8°ø¸W¡ùµå§ÜJ8†TÈTÉÓ=à„øK áÐõcXsØ\jÖsT;¶~¾}LŒœk™X Ó¾(-0òüFÄ¥?XÙŽûlâöûŸüòîÝÐýáRÃ_»ž¥x:ÀÔ88xðîÝóùóËÕþ²ëŸÆß» ¹vàßáÅâ%€FËÚþœ=8{`?¿{·«-øƒ¥9ò\ b"‘Å¦ŠªˆWvLÚ^"#lòœ6Ú½èt´âJÄÖ,/Å-¿ª½°.ïUðï ôž H»yéÑ7Vd«ó¡Úd êÙ^qEÚK‹ ÜÔ]¸ŽÝn‚‡Ù)[î„%À ×¹°Š'§dœÅ8yAŠÐÁ¦U õÔ˜X–õx–1­‡îÕož<è’U{Bžîh•æ°Y à·¹)ÕÊm‘ùø [Ô5Ük¿1–cx¹Çýw eVòCV»Ú|øü¹ë¢’ò³˜¿¨ßM“кDÄóßwÕIøŽ…³j…ðvIgôî5Cmµ:çÛ]šª…ìgMÑ`«P}ª$›+Ó»UQÎUUÞ‰ù¥Ï~â„sŠRÏ#øÒ¤ãfÆÜ ‡=Ã8&?‡ fØ*®´DþK@ä~=9Ü2ý$k[_äíÙršŒ § Myð\V×ò€ùSÜf?ÉGq”‘A/œ®‹PNAby±ÿ·X³Mdv-øX‚ŠE°‰½O-â«Ih™#¿ÅMðk§µ¦ë*BIÓ€ ¥‰GòŠÍé€+ ó‚¥MQ=Í<)_äÕMÆ41p‡ÒW ˆÌˆ!u?4Mã>ø öP@øvE&ªXõáÿd‹Ñ¹¼í“mëô(ÚÁYÂXMisõÆ>xÓÅÞ ù6k­qFŠÛ[1*ºç:±ùòÖ)­w½©î¤MÕGæSN…¿eJî"ç³jÃY±×Ëþ÷U¾y  ¾Íd0,c¶CÂDÙ'¨œ!eê6ÃÔ†—KX+°éTº¡¡3À¦bØénè!9tjdj¢¯<’þF÷uºá£ä¨pC6# V¬€”ãy²°¸¾@–š‘=GÃ1$L•1i¬¦ÓØRÚáŸ‹ÓÆóýtPܱÛ©œ-³bIœ%€ozíG dZ)G«r¬Mþl‰b“¤ÿ;X-³°Q¨Xr¥"’Û­ˆ Ž¥…Ï­š%XN„Ój\á•“[^iE㵻̮H‚"ž’L“dݹ5AdFV8Áº¡¤ ;¥ƒ"R H?•ê «¸zÆ)}f^# Z]èM¸ã×Dßx×·³YQ2fòóSü•»WÌõÜÔ`}¤#·©àž8qmX#q ¹dhÆ7 „ÔÇ KU?¨4¾QÕ²8!ØX½„¶u.įLÌ)E¸}ö²Šù7!i©À»­H¦Óõ,àm…ªÍc[Öw¤6O2ÌzÌÙTD}Dú7Àq=-•ÄDŸôNâxá±|ˆçÖ;ˆ†>´ßk¹•†ÛõŸâF zÉ3#£mþ´ÏœíѼÝþ)z[òÈ–8½â Š{WðÓj¶ÿSúrjN°,Ü>,ÖúïOÝ{g‡Šïªö§ß'x;Œ#õ=TŽ_ÃàVÄ$_§ßâøT¡pдį´¤üË%‡ÜÊuö|NcSBÝU´§õŸôvà¡+2œEˆt÷×– Z iÕ»¡[¸Ö)ÙtÆ:x¨iÏKÍfÌi@s§¥·Ä2.Ô“Ö¯ç:Œ)³‰…åTPx]Ü8+¬µ;€€Ài!ž3òAŠøç¯-üñ7óh¸³ÿ´–<—CséF!©œÉWV8§.rÝæ)[3 ʶcÖ£jQ¤æ¬k·\|Wêõj«p®ôC’לv[°5ÙHÙ×¢¶a>½Îoë³ø]/=²‘ŽiÒ‹ R¯ñ-‚–¤() ’d%YµåÊ,áfˆX¨¡»2“»ïÖvä™Ndôîe‘_Aô3G¢¶R0 ¢5A”XòÆÅ*À;¬<®¤rî¹á6­ÈÕv¡™mQd·JküðõŠ]ƒÓ£ýʪô›Î·x™þ±î;-Ñ­]}ÑÐý¶çÔ×@zߣóæ¯n±õârB4xpynF–¯ˆ6ÍSIäa¸P÷‚ynžJס£ÆÏdVÏOgO„¦:¿åbx¥;KZí½_D>ë?/«kPí du” ˜¦S¯>OËY+Ä.¡×v}¨yLR"†jàÙˆÃS–ú‘ûž] ´)APÔ~ögQƒüv§Ì(†³šb¼a7Z×—8†@Bünµ¨ kaß”pö•ä^ÞãÒ9`‹:a=pÝ—ô§°8+T³ú7 u H!P ˆ¹@}³XOàòƒHÉoˆÔÜ,†ËÍL_f ³ëáïmç‰ ? Š|ÚKoV%½µ£*) U¥Ï×çq›uŽ'ó¾´Äf²ü––Hçºü¶0@çø7Ñß8š4Æ'w9ÂÇc™6 LþEÿ¤[ 0.ýí5PÓÃ9¼¼ä„ÙÆ½¤ÔM ¶5žáPEÑVB(£:ëx±E•R; ƒ‡²»”ÚoKÄ≊N ‡û·7·ÿvA“ ä8þFŒxkhq“|]ÕþЉwÖ`ùýá†â€ Ó”T ’VCR£íîi1ï”݃}¦yÌÒ`$©Ã“w ž¤c±cè|ëHèwí;ê¶ÊÍo*=‹¢àPµY%4!¿·;tòÐÀ†C;Ë…òÀ>ò.÷ÀÆͦ Å0?ë>nD2ÌZÌþÔí¼{0ëÏ]¯»»îൟE©ð|ÏÿÏÜ›p·q$[ƒ¥†~4 $Jz-ÏÈ[·¾ÏÛ±äöyÇò#Š@‘, @¡Q—^¾ß>yoDäR(€´å~gtl‰¬ÊÊ=#c½a%]{YÖh2Tðñ4ËÀ’—tß}ùîðÝaw»0øõ¶ÙB´ºMžÁþˆ£,2ZêÅŸÛ—­‡â×nK§£ŽgÙÇÓ_ ï_üÒË`hÏä»ã“èÙ÷»¾­QC¯ jë9š¹ó­ûxÔÜúvH@ë“þp|Áãæú¯OzXœòÑp${mìª@•N#M´Ø3½¶GÃÓZfKµ³M°–ÿ•ÃQÆUm=9wr|­…½;ü?d]Φyl¤4‹Äi¯#‘3ÈXŠ“\,&³Šè"%ŨqH0s‰œ×ŠL¾"´Ñõ…ä4èÞI6½s|¥\È{à mÖ0ð ÏS/Tñ- æƒ÷Lˆõ9†Y- |˜w {•ø\ZIŽfËx·Pÿsõ$é…«ÛV0õ÷0xðKïUÕ~·XV!ÿ¥Ña=!¿ˆ ¤ÁÀ€0ïî$\@áCÆ(_ÁsT¹kä‡TvcAm”8^Æß(ƒáž‡ÉË^cˆ|xüoU `¢$ãd¯Q„^@!­©m¬&¼§˜EòkD–Wr~}QLÞ|¥¶„_÷ã+}!Ýe+’Â0§°®š5aísLÑbìÊ0’ZБ|mI&”‡µ’³¬¼Ùä½°È:]ÑÐOZS;Z~?Ùׂ VîÎQDÝ9¦‰—e¹]'¹h$—a`‹ã\Žâ½ÓÌ©ì¬Ï³°;I¤ŸÅñËç' €xÖânHvRÊÝÓMëžâe3ÉÜC¸QˆÊé•è UÑa˜ +Á}wàÀ ÝÇÏ^ºoR¨Z¦žvûRa¢QYRxÊÕ Ÿº‰X/!«é¤X ö©t¡~HÍ'5¡¨¿Av†£Šë·óyá/c¯j‡è 7Õûž^ñZ;¬{³Œ ¿Jl‡hÈŽÀu|šrE^ñýÂßÔ“ ·ÛÕÌÂÃô¯XŸ‚ û­aÐôtpõ’¦ dûG±[G.ãÞ\ D9L5Ą󶅕þÄ8ø˜©¹äÑ#ãêXDæ-cì©Ìà¶æcYGK©éÚU—¤Èî§çµf䆖C~ÄŠ¨G•â™2 "ÚEß÷M¼ß¡YÑ·V‡:Ó¶QòD^Þ y(ê=zœÁ¥Ù‹’”î«áT£•Ÿoá¥!7Ïù¯xÿÞK³„æk&1–dµ,‡¢‹ á÷Ïã”3n.¨5bûmÑÒC_¤s=êÞíí‰Õ,;êÏ„›D€Gðyv|r‰ñ€C‘31©–w~îâ UÌÜrfá­iªB‘NèˆÑž¡ðÅøµàFÝzôõ]‰Rµ<ÏZ4š|Ù™#EE/›Kn ÷ÃM9ÐØ\²B89I Ü8Ýý­ooämÓñ™5ŽöŒá›| ,²Rö³£ù‘„—VEî'UµšÒÒ¨^dH ÇüÔn’ï]ë qxìäâIpï Oœ!¤NaMBY-¢"9Ö1ÆA›ó7ö”aS:˜”ª\)ë­–Ž{h,¯ÀAo`®p¢)¹€åtµˆT³õfÔ³(MQþæ@©Î m72»æÒ^Ïþ†‘,3·ì·cù€ºËË•Üú }%¤Æ1\K›>¿OÃ~´jOÚ’ ]ÞŸ½í•Eã ‰[Æ\È ñ¼¹Tž‹D÷Uçµak#,_A8x£‰5ˆoC‚n¤“à[øAo9ÚôЦŽ-;“nÖ–pT×¥+þ*J?—zÌ[Tó³ª^a¥ŽËW Þ¹N< ÈO2fI dªÂC"(†ÿ_§66ÜI¦<P4ß]6ÇïÙ7ådUÕ•Ûg? ^3£WnïXFU}Yü/ ’UN"ú =D.#†c©¬Œí’ì¿(¡Gv ƒÉÉâö²¿W•ˆä•ìTÆÕ]€C1*…å{å}¼™,@‹Ÿ¶en[„<Ž(vÿµ¦$8"7’@‡Àœ¾OÃÈ:½˜•—nòù¼åR[›´–ì[ôSÉ7†¢/{†Ûî?nª úUgßÍ©JÌ1g­†¨£ò(Ñ“09†ÅZ.E¡}i¸óZü<ýb×;ãlUKYiÈöÜ yn—÷sä •k{#äiƒmŒ@Èhh§Ä. @÷¦ ).ÿ³øf7+ìãU즰‡b“‹@'%õy‚7útЮvØœ^æ°-Á$”éØOg؈{UƒP½Èžå–Ès»I®%s‹«ª^Ÿ±ü8{”%ùß¼[j§]WÀR R´×Šö²¨Ú^”N…Ê…ç¯çn¯”H íFÜvQ¸Hõ›³B<–j!çh€£|%¢EÏ[”·s4iKm¢·k° Ë$(®›é¼Ù0Ee¼£–r:¶‹~•/Þ‰1ˆ¥„kH´­~ ¼(gÉ;A)¿Îx8<#HïQÝØ1Ù,J'pÃ<â~ä±Í]И?sÅÇ Ne Ù =uîHfY¬Ææèˆ4µÅ¯æš†ž—ËÖþ{¥qJiǾiyŒ <½`$RF·júÙk[1T«âvíóì*z¥?ƒY.çêJŸïY¸kvv<„iÜïïh®ÀúÔnËÑÙ·1¤Æ—/‘,0‹ÉùÆ•\#à§²`J‰œ,䢸Í¡V,gáüÜó0<'òÎ1¾HÙÈMÝÖŠMÖ‰£oT{ó$ñIÙÝCÄàúÙ+ QœÛ›B'kût¦Ø{4ÃDz¢¶ÃóF\ÖÕÌû84~â°¼ªÎósècRBdÓÓ¿—&Åt ,zA?™ÖivUOeáùóˆ¤ûÉÐN¯Ó mÜ¡S“unñcŠH{Y Sò:½h6C K ÓN}˜ÃÕ|Y>^Þ™•#©÷;°õ ô iµKAÃjñ4°+f…OZü¡/:ð™kxå¸ S‘ˆ@e‡ƒAö‰>u÷–>³GíŽ]YúdÒ_~Lûþqͽüxp2Íôø~LÞ >[®™è7œûí ûx»êÎUÿªšœå“³žDÏ»š{é8økD”õ‰ )z~/“ïàm–6•é׳¢Xv†Ý­™ÄVrÿ¤Sï;êæÙ;r±/²N:ñ$έˆyªTññ jý"é‹«Ò—ÚŠ(ì¼{·#JTU×5jlðÅŒóø&H]¿NzÙéÖ0¸;Ýw ¨t·ª—>YÕYÚ!oW›¢Q«ì/ÙÀŒ#ÍÍIüZK¾<œ´|²š>­k D¦mS»•羦÷^Dj¸—–w®„ì¥ö‰•ÁëËqš.íÔÝøx~4t.?¯® Ò)†vç×¢ö{«Â‹ñº˜/]7ƱÛtë‚¶¼Q¬— Ž¡tv¼på«Ey»g™Õ7fª6à}0…Ìã“(Þ4–¿ô(‚ëtBl·!Çþ#¡§Áî 5¶®Enæaýòix¦AÇÇÙ_¿üáÍk‰Ÿ°ë©3zúôüIîØ¤Ñ`xzs·Çg+  8˜Ê"W3²IŽêáóg]]Që·²Oñú&+ÄØ×é›T ¼ÑMé 6å„vਸÒYŠTO…ÊÄlFËŸOî©æùЪFÕó÷7+> ¢ÇÏGVÑ“PÑ0T4ú ŠN†~†N¢Š†¿q†N =¾w†âõlPâ]­Œ~ër¶ì!­Í¦›OµÝ‘´ûø·QZÍl£Ñ€üöÙÞWчìÇdh²Ó¡ýöý˜^Jq·p'¹µÛY4jE]ÛÛ;a™§º’j>dŒXÑ“ßqE´â¡}Ð>H†öÁû êÖ}û jØïƒm"¥ÜÉV¿eþÞòÑÝÿ¤›¡Õ0`h _AUº’²6‰4dOAM©, ‡c“fýwÛB¬Çl¡Öµ]×bù»Q~¢üzSxúª‰{uŠ*ž(šë`0Ä·‘{šÄÉhé˜MKŽ˜ý[&õ^2޵>‚æ$@&ȪZ…4ÁHyO,Ÿ£yÐÊŠÍ×ó‹Ç]ÕÓnÉþ~ò‚¹+O¶&D¦¢#%ƒüÁZ/CG¢Žb¶‘óÚUÿÙX³@?'ö›Úlk”Í=éò›‹ÎSWÑ…›5¿“P'féƒê¯RÊ:Øà|6ìqƒ‹R¶›ùlEA%…¡HèOdÿ’ÄÒ³»åUxÝx6l1ÍBT¹d‰}VÙÏ ¢€E(ÚXÚ´8ß\ †_µa%(3*èDÍÔŽº]bŸ³Ë÷ª7‹Ð Á‘d÷‹€©Î…-#d³ŸLÜЕ¼bG½¤Z![(,‚8šÆŽ–t¹U-[4='‰Û•æA:lC±bh³æ@¿ÎWgÞå¿ Q¾³`/û¢é/´¯ðz;;rRœ.gº3ÏÄl|œI%ý~/˜Ìµ—8Ay޳”÷G®®£#G¹i¬ÕGWN9{!Lɪk€tT|GgNôÁ¹>Ù©žf_ïÀOnq×Í$í[1!!誨b†ˆÒL¥BÔ`è§ÁtE€Â¬æºö3&óì× 3è?é ~á5×ÿI´-p5I½|×bÚGiI(V°‹·_q®wt xH®k(ÝÞ|$©_ªØš¼cM-êCÍ{TaGiÈ™üt%é7ÜGWaoÒð³«Ùðx*÷t ˜ÂÓ(évtO£iŸU—ßîL`"§;×õªyX´¡H¹})N pוÌWî~œû« çCò2´3èxžíæˆ8ƒD¬r- IüE‰#šß–ôiµøy)€¡dgÑË.6 `½•yûóà—fNíû>•¹¼ÿ+G%H*ô/UÏým“O³ñ•-ծ峼Ö}î [©§pÍê¾7ËŒ`н¿\LÊe>CVHï'N§ÈrQÎË¿ Q ~OP²HGú“¦GYµœ#+Ƭ<_å«ÿx<fz™-²?e£YQF0 †ði‹i¿»F<@G߆¯ª8é3ÒëjuãVýÓèK6ëz㋱ë2d7•…Ûbâ•_»õ!ota±gf ÕtÈK˜¯ó~ÔÆ[©WqA ˆÙ NÅwº…DP¥9ÿÇ©2öÌLDâÐWYoÖðÆŠ¢U<«—Sü ´Ðê ðcü”Ùo’é»=J»“+­ÚÂ`­.BƒdÎŽG #Ù|ÄDu úxv¹Ûg.(>oµAl~·0ž¶\‡LHQ%™oݼ(Áµ5…G¹, ¨Sû.1HTËÿKn(†u›JkÛ2pñ¦³Äøí7ß}ñutRó~°ˆ ©Sá"ŽÄ®5@Œ  ûÙ]K%í#"! 5-ÓÅZ\ú=á%*O5CåɰùœÏ‹)¸f'~t|f”þ•ÕøÍ¬FÈnŒ–§ö>æÈW·¶ Ú9x01\ÍÜMÌF|q.rw{ýè];-nÉ O»>¦ÞÈB0P__»a}m²­ô{á~t-¯D|S›eyaÇ=ï°Àà?3'ö÷,ˆq þ I' ÌÁVt%¨<^Õ£¬:ë;ñØhà†t0FݲvXb+#K¬¾qQúÙ_ªJáÅZõûD…|Éó¨MîÓñ1±<¯R…È/5̶îm»¥ä@ˆ¯†½ûÜÞåõI–Šü!Y4"ª¹yž+›ª\®ŸV.Û-R]J+¢ çBpcè‹ç×®áøûM꫻лpÊXT»vÒÎû-Å» tϯä6Œ¢KB†Ô¨Ì™áÌIuûYŒøÔM%Ìÿ \ð/ÆÛOî²ãìI÷¿GÙ'Ù“£Nçöø@FC<Š˜½(| “ž lÀ®¨sÝÀMÑIë\÷Á×}‚†¿°ãGGÚsyuì_ å]¨åªŸ¯×+c¾†ÅñÇ¿¹ÿM Û-& ic_Å«}ùñev‹¿îÜ_ïÞ->î8ŽCú!ÿ1ëݶÇüË8¹úãþ ?ìٕ׉f‡ÉR—³râÎ)Ò¸Ýâ®é8£d‰{ÒíU÷¨Ó}ùrnÊáIÑì8ö¥…|û‡K·Ií¡ñï£8$«ž_I0ÓÓQ‹Ú$G¤$å‘^¦‰%krn’çÄÝ@írÊC¿î©³ýÙ~û¿B%d¶áoæ—ù¦¦ƒãç†Z5¯*GNÑzué(¡±œ4XÍ®S]$¢NìŽëSÁGX# ÆÞ«E1ë«´ê¨9!á犣½«¦ \C&RÌ™Õ\Éé¹\N6’ç‚7¤ßŸ'\ñg·€}2Ô|Ú¢º*ZqéËÅ#ª:¼|š(7Âu”¤c ~O'³rÙþæ¶‚üp+øŽ¿Ü%ÎúiiÝï·5ínÜ·ø@žÞ…§AAò—¯ÞÑטcÛ2p‹[Ö]êÅÌßaŸ#~§fÔ#Ø×e¥ÜgL7u¡˜ ”„ÁƒîNÒ¼>ÀxŒïÇHTÀ­Ì= h_–³à“%µ oŠu¨‚,õºòš{«>¨°uVç«àð6ìÍÖIÕ3lDX<N×÷î·¯;Fi°óC–7jýqG>åžq7èùvo;?ªK÷U9ƒÏ[~^W3ĦE‘ýnk‡~ËJ&)Ñ鯲*fâ*.§•AËLcŸdiŒõ˜!>Áú@X®r";­Nñw=ˆô£Ѱ êºsUM½ùáóG˜œþd,Ûu<þHœ<³ÿ•×3xþ ?ñûI|y ƒ±H¢@«]q]©#—gÕ‹œ¨röi$tÔ}âÏ:µjå£(ûnZæÛê€5³.¬Þ×êëº]Bª›º‰ÅùñާS×Á9SH! yîTµ¯’«ÏkO{‚G˜çSÎí›uá8“µÍU;›`Ki €›î@£pÍ[Ǭøð™¤en¸~[©µRßá¤È®D#ï_N1u :@­rôV(Ûí¤¥›*¸]ÅzèŒJB{X„-%ZøT£ƒ•2¬oªãiévE-—d#¶ÅÍ|ç¶s´>êºÃÅ»¶ûBö‹šÃz[‚ÅûuÂèH›¼>ÁUœä2‰zëqLkmK%^¢ ¸SÂ¥„§žšSÃ`t3ZhµNÆECÍã[bCwÚõ-m$ýÕ8²œÞ+¨“—3f?sºSR¬'M¬Oº÷|‰—é’æÊKWÎ`JdQñÑUÿºzïiãqØ1{3AøÒ,yX*ZÌæêæ‡˜ÊàÜ D½•@z7ät\ì£ìUÍìA—ÂVÇ1hðržñ°fñg†Ôé= ¤ÕƒB––« x%uòYœ+G6 üV©;ù(žÛ³KJ]l² Ùø‘B¦\ùHzQ‡ “ÚÇeŸœŽ ‘ÿlW‡ÜLÙÉ‘;7uWÔ ±¢â¼œÉÂõŒmÔI#ºÙ;ï­šwM´îdW)ÌfÈ‹s¤ÏÜq]iØòH÷ÝÌŽpÀ;#àïíl[ÿ¤{££u÷`çÃåå¹êe¾XøÌZ·/OŒ“©Üo' Ç&\:šâ~|ÄëGìã1W ¿Œ=—^äŽÁ]¼È&Œ7±§þ²‰ù—eü“3Ý­šl]‘¥¨‡E“{ÎÛˆ}ÌJúÖ“XÛ0-i†>Ù­j0£¦+Ù'öýÆO”sí÷tZ¤§°‚V‰».Ôþ@Ü3…¬Væ6£¤Â­—• 'Å ÇG耻ÊÓ*Í–1Õ÷rñ\yÇ“¬ƒà{"ȉëU€Ëqïù¦!üŽÇ‹â†Ôöe¶¼¶txúlçT|7‹a§a߆µdU(Ø%l’×¢ˆöÌ5*G=¸úåêûø\ï« ®è¨7óù¿eû>;ŽUˆºÐ(¢œt­Y€è2§Aß=ÿ›ÇÙöÝ_,×}Tô­Nˆ¿ÞCÈù%;«âagRC°*ùs‹óÃUUvnÛ¥„>íÜvQôaçk%YܳÐÛ‹Ëêj^w½‰“9ІþR\ª'´‡¦l{iq,'UïR´¿ÍŸEH(NBîj5âH=b–ä¹V4Ypk°žú„ +ò:kt‚¼6D³Kg|Õ»Õ#+N÷rUT_3Á¥ZgûˆÑ+.;íi2Ü›þ-.iWðëu}Ï'…Ÿ±€¡ròÒ<_MÔÈÚK–T%ýLB¡•ئ ŸU´ˆäÞ^«¦ Kݤ9Z¸Ì¦æÞï‘Ϫ[À…ΪK>lqA®ìÜëPFoÊV;Jõ²ƒWLÏ‘ùß?G¿gY£–g8ÍZô^ºëIÍ’!b•Ÿ×’¥F¹ow+4ƒ©=•¸"µ yÐŽSf‹/ÆÒŸqÖQ›Â° ¢†ƒnÓ†.©‰ÙãþºL‹•„Åæsº«ÙvÊ„sç=¯gž/º‘ì /šÌõá‘ð!¢]B’Ib3µÃž‡—‹Ö<¾¼/.xy?nAl‹U쮘é×[°ÿÚDÙ¤T›G– *E`º‚·EF=3²sçºnƒSÅk¾Q™‡e:B;GÈ;~<+ë$ª¹„_–Û®C ƒ-úÚwŸéüþ3X@‘néôŒÈ¯¨Z¹š92ðê¥$—‘$,‡ušD• ø&ºŠÃî‘ìG·¸# òxgNQÔFª;h ‚®V`@¯2w´ããcËìa§^ÜQèQ+…LØKó”m#ÐÉr½™ú-4ˆº5–¹»P˜Z+_¬»÷! wWtU^^ÁM óí£Qw»R©©¸UëÎȰw<<ô(uÔIÈät“¸Å8ÙÝ4„‰ÑÑ÷¯ÊG ÐaŠ@ú+g¿ZDIÅÙx¯ß\AV¾+u_û‹c׃Åñžá£®ÉŽ+Ôú‘<ò, õ¨¿A€üðr³Jz”qÙ]©Gp éÔ0|jÊö`xK©í[˜WŠ"ÉO“ðPÑz —_’­M«Û³³ðê˜2öS åᦳLÏz’Ç[P€õ5qÜC–KŽÏç9jK ¦û’“¤çõÕûDbÄaKTCîP0c| 0>q¯ê4Ò%ŒŽX:âhë°òKT³¡wnÎñyI°J½š3tyš|\ç<Ž`\³Î­Õ/¢¹ ËNñÝî<–Xõd†Ù>䎂¶ñ[¶V7ç…í`¥À«‰^ÒîÖ²p¿¢ë[wï¸]žQ“á÷xÑÞ´<YÙ7wþñuƒƒÏÁ٘˳3ä)»hËm‚ç}¸!w¼Cnø¡ë Σ£Ô®²T=·5˜“ØMÔŽOÁMÐ!ÂÝõÍØê¸PŸ²³¶5£ëñçªËÔ×ÃÃ^¶£Ô •doèºÕvO]áY>?Ÿæ/¤¡egÐ ëoûØm–ևݓUébÛeÎÓ#¥­®Î|/;¼8ì2}J£Z™ÿ“aïš¹Ëaª\l/4zH¡“Jª- Ž/Æ ;{-ªÌA/û œÛgUûžuÿ»{.êç<=Gøƒ³ÔÛÊè+¸Æn>;Û¹Æ@Òês²ÔUÿû×Ù#&à œP÷hw/Ý×TÌ霵t6ÅýÙYáH¸X©³ÎwÙ-²û³¨Mˆ´èɃúqõc$)¼Ùemwõ㤫ï>Š””b‹µ6Ÿ5Ô®8AZÆòkªH ºD×Óá>%bÊÿFÌyF8F×B$Ÿ«„‹Ùý¼V³ý.?§-í!Æ,`¨UËBbš€oþ¿êÊiq„zÿåuŒÇ*^,­÷¹Ï]7wmD÷f®õT>Þ’7±ÛÞ›ºœø°„È¹ŽŠ1ìQîÔqÇîz»¼†Ë¼3ß3ÞN®óáNÖŒvC0ùÌ .) ª0õ^©`lAÌŽ KÐ3üÀòÚ¶;‡êçꆪ—QõÄ%'â*aP¢aϳtèÔäu–DK’ûIí̧lë}HÕ´%mDˆèM!§N}>‹Ò mM¨—Î| ;Öta¦á:7ùtäM`YW4*m€ðhtiº)krätðý—K8Ž—;œ«»­qq9Vy¯¥÷>_ÖÁøÊc¶ˆíFªŒâ&V^BÞ3œiQâÔ¤#M'h&YF¾úêm|@L§Ñd2ÕUͶæzåŽMÄa:1£(+®Y¾¸“v‡æÛXM¦j[¨Ž¸õÉ“F/8ƒº 0®i·9T…ù‰#ýñ¸?¯˜·<Íd\ÿ^.×ÍòÄ]¯Ï¨Z¹¾XAƒ‚ŸJþÔMËKa+³²ÏJüÐMéë6ìøðp©ÝÖA'3+Eïbî{Ⲩ㦌÷è¿m‰ý!)xLС–\$Z!¨9÷•[¯ŽI~Ý»íÞÙz¿}°“Õ ëŠåÑõ3Ù*‰ ,ül‹"C'ÜÖesE¶¢¢A‰?vO\›¿ˆ ›àœk¸Ä@£xH±Ê4óC›(õûa’ÚäQc[Aá“?™t[bĵ¨‹øVôeééÔ©)]?·AåX>zÛTcÙ5¾c›Çû š(´Vd¼Û9·B¸ýE*X¢ñLÛß!V‡ÙjÜŠ|2Ô}ú­Ûzé°¹1·¥kÜо–ûV¿m‰i ÄœóDƒè'>.¦ E3˜Z±œ¹ïN7£·ÿ›1JzðíÉ'Ó+Êà5|…@z­f=Ú«ÂG‰õe©u¶òÊxÒ}•[°UØÐ¼&N•]¥§PC—Í~³ºxÑlf¼ ½Ûæâb–1’]¯óÎ\o­uì£ûüz-Ûë¥M-tñûª-{Ù Wþþjݤ¹]»§U¾no§óxØ€!DÂY•OÍùÙœ¥D~²ôeà¢CŽx-öö©Ì㥭æm©ÒÙ fuñ?¢Ž=ûãu®ÓHn_ïz¿QÄ’—®²ÿ9ë^§ôZ GêX½Éªâ5ÛþzltmUé»Ôö(HÏ¥Ð_öÎßðžéû£U­ÃiZ‡û­ÿ¯Ô]èþâ'¿­øãwdÙtÈÅŸ þÔ¿ŽÃîØæ‰v\nzÐw÷õ×ß§«UžÖ«‹½¾V?ߣfnè‹w´Ÿªsw{ü€nûî=þ ý|w éL=¿ûíŠâÑýŠâªîó(2uéî¸9MàÇBP¨sÏÔç‰Þ-£¶½ßt^õãJ;·Ý{ÜñBP}LÅ\-‘õíÍܲ4…¦€û˜¯AŠö¡nuÐ0N&’úÑr=‹øfMÆÎy*Èy¯"¯H· žM}eÃ÷³¯¼N‹œˆúyL?E9ŠÌÍ¢Î/ L~œ—kÿY¿Eº”¤›%ØÊ©(Ãu•ŒDþP\Œ¦Æœu‹>¼Ù‚cÓã“€Û€†vQäë–(O‘_f‚ÐÖø¨º¹¿ð°ZíCuûI¼“’o| ÉÂVC2Ú WpKkÝ%kÊaLW'a®ÔV˜F³XZäá]?Ò¶ý=I¤"é@{û4I:Ç_æ«ÙÚRÒÜ'aÃnaÉùœ½>&˜**ß½?ˆb÷F0*¤—ºi}1$f.ç¥"IF *!E´[°é”TéÖ’R:Xê¸í]SAß¿$wötC°ún‘/ÍG¤¾:ž?~¸´¬¨ä®§Õ"Ä?½^k|"ãÐmÉ=+:XÄ-0PË÷Ѝ}µ“ Œº²PÝUÈè¾2ëqtRžDYîœâ(oy*ÿ&yRâIñ%T’ža’×ñã«þ²Zz²º“ª¾ º5#š wŽvʳAOì|th_|£M Gnçn7¡°¥†ÔNû ™­/ŠÉ{·sG®ÎÐ*§ -ÃhTfß4|QÌ µXË $cœ22“÷ÑÄ?ñ‘ ^&çó–h›¦J§´Ðëïáán œkkX*ƒ—|±VQ"-¦ =R™ñ2ä!ÎZ°â9•‰’ d[Ž^’¹ùC£]¦á»Þ¥B»ÞR›­?â¼½¥MM]Vôô_pÄ¡¶$8zîµXIé’»s:'Ý´°hÐÞÞ¾;ìe·Í¸R(0',ÞŒg XÝàóîWÓ‡¡ƒ˜pc7ÒÉÇ˲ó"_ !_kƒ…NT.5dÑEJÛ i5®>ró‰Èª_LD+Þ$´ÿ8sO ¶[c*ÄY…åJÇAO›Ùµw(ns@‹f×e)V@:VW€Uqé.ÑY„È6‚5çÓ PF.W±ô¦2<!ö<‡xžOîÌ/ T®ŸSÈ3qØ»LÌ:ƒÜ^œ^Ì~œÂ·…¤BĬùj}L½LFt£èçxëžkô+>¤¶Ï`fu# ïo†9¨˜(®PûÄ'Ù ‘dIGÓÇ#šLDiUn%¸+à1V¯ƒêMôh(æÈ)D±6yk·rLž‰ºöqD/ÒÑj©ºð•Æpà­T§eûXÀÔËÕÏ5Nðéu& š÷("‹Atêr-ˆšÈÐ]‰wÌÇž0MèŽGQ¸yôÄNV aw‡ä3x÷âx®–Í[æ]¶…‰~C¬¯\ ÙÖÁÖwn¦çìÀÔà©Ô6j©o14u&ÕŠài¨QÌùjED/~·楖¸t¤>„6Wu“ÛŠq ¸)z²Œâ [.!9•z¬»‰ÔÛyMpKªRG}¼Û“œ ôþÜÔ ðßm âW }1)^öBï„€k•wë(m¶Ýd'kΉÖunùh,š2C*ÉoP»}¨Šî|K©2Éë$msŽP«#`ûÌo®šuåd«+æ N!qçL!=¨fU?à†û–ykK›¡Åé çÇç»Q¡s“$|¨Akݸũ=x³w‡ ä¼ÌwÖ”vÜKÍ Ša¢ñ%€m2ªHÕ‚G€ŒÇÍeqg¬œnaÈ9SNkõcóÝÊìr°íä¯ EЍ­€üÁDÀ6òùyyI"¯SÔ±«Zo9dv—f¦ôÓ@ë”:ômfÚqwÓ‰ÜÃhF&˜•PrÍ ŠD¨:Š[ÊfH*ùÂêNm¨Du½~¢½vAÕË‘1f¬O†…96rÊtrc,$ zP›W[ëU¹ÆÙ Ê/w9;â(Ѩbýhzûß#ï}5ä'þ"¿®Vd^Tƒ½~ôµ+(Þ’Ó[œü,1M«5nOSàÖêk+©Õ´-&‰äÅo´…lÏŠôÀkSŠË§WJlZ c8t†Ê.×)¶ÝˆÐ¦D€ƒBà’½E½HÛfR‹Ëú¦œ³á­‡fÖ¬VÝ#ZF™QŸ³….9\®¶5.±’3š<´K~—JB¢¿Ê$¸M=câÓDàùÍ\ö‰*dÿIÕIsA8¼˜ÆÄ+7ÌüOruOÈ™–8bY&êoWâ–#l`»ˆ«âÍ1î²'§æ¼òP¶½Ð1ŒLïí¾Š홸H)þœ°÷ÜœJ2…©,­l³UZ¹fÌ%M¢%LÆqH§e~É£åI“¢-¿Å¾a+¨¹Úï,=vaP²`ŠÂøD„9‡¹©`ÅÇ}£Z·(rÈØðºµ˜,7î›r.¶*¸UÆ3ÅJê{uÓóxv7¥Äký‰0í¤$’(•N˜@(5ù}ás–Éé”Ið*ò§1<ºfDH{z»”ì ¶è¢œÅh¨(ÛˆÙý"Xéþ~>rÕÉn>’Ú|æHÞŸPç§ãÅXÜPÑ´ˆª²µxU×ÜÍRUHã¨ÃÁ›©ã|‡‰QØô¤á‰{´Þ,=X¿ôûë—‹G#·P¢Ë º²`¡…/ÔϒЈ‘æR° ãúŸ^&ÖÑõðèÓ?H¥ŸúÞ Ÿ&ÚåÑžw©»[üfØ¿ýù ý­ñÓÓ_w×êžžð=~zŒŸN’šmÃÀKîzÔ¨›ªö‹´ÅQëÓ“ø©nö“È¥Alñ´ÅeÎÄêªÀ_Ó¿q“-¾ àñ;1Κš©'+(ikÎ"ß0U#£­$™càÕà·áÓWÐédhÿ¹z”€Q Ûh¹Rã*•ô¾åלÈ`¯ ·£˜Á?}™ "ŠA£ÚŸ|ý øÏ’<Ÿ·Õ]…\››rÊwn) õ²;ýwV\¸¿«ç¨Z/cºww™TË=DÂ@¹ŒÏáŠ&5¶îHk pR7e]„AˆýaV­ß\åË¢oÔ’ïÚLúV s@´P÷ë.D²èíãÉo纗ÍÏ®®‹¸«L¨Ç,†h@ˆÎ‰Dý¾[ÔèÀ~úûëésIIðtxpºuwEL¤ôZF©]ø*»*fÀï{ôÆìøÿûÍçŽ7ptJ~Ð*MôfÉÈ[¦6—5;-p'‘}ÛÝ)ceî26tV¬V`YàrYx]žåõ¨<\j>„Xþµ¿}¢ËH,ðŸMC³;=IEù"5(÷Œñ‹tŒƒoiò𝯶\§¼T=ƒõFÕL}Þ,°u½þ&ª=Y~v^K…»=¢Ìa U臤C0ô{IznÝÍì|€1E!Ø‘?P§š4ƒ³Q^Ÿ­ï–Xm&æº(S©¹‚wOÓ¹w¶Te„#R«²¸6ß^h5ÍAâƒïîO?ý4»êÊÉ¢!/5¦—¼¯uhC”î_ÓðÄ’ýÄù.)jާ$Ÿ·Õ²eh¡˜W}¾î8žš0[ï{ÙÁŸ¿Á•”"òo¯SøÎvš¢Íâ›æó\ìß(&U+Ã¥>D1xÁM~.VÍATȶ¯€æŽdlVA/åh•Ïp2¥mb.7˜ÌFc§Ïð7¼0÷ZPÙoõ3tÚ¶¬µÔ’âãfmÊgGÇ DƳôÞrØIýÒYXá{ãʸk/R 6¶#Ãs|gîA›…è;ãL³§ÏSa');ož5n¬€n{1þ‡{ý/A¾dÙÎ?Êõ²Üþ«»cý‘°}ò7¬x‹zGèfÎüÜ-²w‚ô—ê3Réiõ%¹>i‘z®úVb¿OR>Sï[Ç6A7MK×µåî$-§Sƒè‹ŒEIJѫ債šŒE#.xQÇråJMÆÙE1[%ʶßž~%™ÝiVYZ}[­Ë‹»±ÚX.Êüã´LâÒ7Ëiž¬ñ3’úo¨;íÓ'øY ‘Ÿ*·ÔjÒŸì›;ŸýXÔ±}~"¬„ýPU °XÙ$N ÿìIPPÛ‡-\«¼%ü÷n0kÉ¿SkE¬¾ ii0yçwÞ{AeöõZ¢iª„e«b‘fáQ=Ö¤u@Æw‹Û ²A¦*.it±º%‰Ö\žHÍÛdǎݺèü4”ÐHµ€ÙvrÅ„=*;óò†yÍ¿[ˆÂã(bàª1 ³/~åߣ9zí3¹Œú§$QúëIô S¬`ÿ@Z@ï¡üPŸyÞæ9ä~»8Š®êpÿºköïUä,™N ›WÙª‰— 8ãZ6‡põr°Ñ“ ©¡¾áƒVfY ¤RÐkIóË)Í™ù&_O® jÉMV¤†¤lÐø_½¯•£7Ð6TSÇõz/qójFRzÖ7f`çc\ðùœÝé EÞ€ûv%”MåîɦñØMïšOCŠÓj³î¿=§Æé€Kœ¦ûNÁÿgù„¯ZÂÌ­ºš¤ó$¡”gBç_f¡¢­Ô‘áMüÍž ýs!öùZùjØ4B¦¬—½´:Sè¹zÏÆÇ>”#á]Ý"àœ/ å_ªÉwB£TuS#ݰ¸HrâÙ3)}£Ñžt/Tꊻ¶Žæ°›}$¦:=Ùõ‰†.ûôp;Ão¼Y¨oxj×éà¤m©—åûâ Ù WSn‰ÇÛ[Âq"q±Î%í\x‚Ól‰{*?îcK¼\ß-ªÅÝ\t~rªV\QŽðüºô)à¡+¥wâ®O+¼…Ê%Y.$à„Óçæ,g*oºÚªß—q?Bëݱææplg©a>Õùš˜e>£Ùü\g R·v˵pX+³€],8”º\kÜi ×ìð¹w«¾“ŽY|wA7XÇ6«ÿv}ûÝ[oÛŽ›nq‡¸,§ÆžÕsŠë¬©©^}ýu&µ£¨ºf”š&KÇš…Ð*¬cá‘Ó¯úåúdšOe¯µ(Ê®úZÕ»^ö÷^¶eTM•8¾¼Û}=Æ}¹¯ø÷”·}›îL«íÕT8ä“(¡)õÍ¥j+EÁß©V†jjQ‘rÏaÇu§PÏãiRè®ùª lŽzÃXOðnH¥è˜'Ùð^CŠã…ë¹®b†Õði¶¡]¤c‹0‰??w†Ã×A;òãaÄGrË|}¤•êC7x÷L\éE6–Íw~1¨±ìÄÓþòåÀ_]œàã)¨è‘¤±JD~ÈAÙ阯f¦yvÝc§ú†}(uïBÅ=ëš(×Îh܈ӟž^?f"ŸþŠ{5é¬ùS#DuMˆâ‹y§•~×_F…Ì{¡IªAÔ#u¨ó–"ñ*ö-3ûÖ¢¸T¶“w-(äÑô¨é›,´–Á‹Tæ!@@}øÅD-³ªZòõ¡/¶ëêË´Ÿh‚ÑÙ¨æ:ΆûoÚj\¥NZXÞ¥ä7¥J>\RüË‚R×](îlÃjŠšú3' Á®옧ýÑ3÷wzŠ‘gGú!Sü¡ªÅýngqæUlÿ{£¸ï§÷ë"옯*žˆ)h Š+°DJЗ‡x|˜Fª?€â«FýµT.§#zÜta„¢ÅOc°¢D}º OœÒ”sÛ¶5ƒ¨‰9évlðó —Š7”%x§@¶ùÖMnJ•2w¦t„–ȘWâF=½žªÆ-äïœs"Ut&ói½nJ» º‰^;þw}´Í}i¶ƒ#ùìHTj@Ñ–À©`@ßCމ Ò{JÞŒ¯•QùtJê§ï¸[¦%¾ÉPOÙ÷eTá|ó4$©“KÍõ ˆÊ¨AŽù…4DC]î8X”.rÓùÎhkýì;OûX¤y1Gˆ0A2Tx•Ôû-„þ-Þ×»­WJêu!fõAš ü{áŠó(>y¦ùôô*Ç^›?õ°ŠÀ’ÁÓ-ò©ˆr¹¦ØOÇËóR¤ë¦NÇït¿$=J·á¶zù« ¼«L©L‰§îeóú†±ÕP Mî.o¿59>,«êÛø¾øÂtÏ6~UÊeÏÍQ7€³¿òá°‘HeÐÂ?²I6ßKm_bEÒ>q6Ù/·7!Ç`Š5úÈIþËwß|ùè¼\ŒU«XæâQ½ÂÍ ©o»ô¬<´X-Ü ;Â4c-Êvܨ:äâ O˜Ú”´Æõ|9­êQßý;¶•ß]©H,wœ³tÙ{K6…6z¾©ï¶Žœïu&4À»4s.¢SÒYaJË™·ŽB‡t×\åu|r¥¦Š€ÓŠ0J™R V‹0Ô²zN«t2ÞkãS~…ÛæÓ­šøUÔH’ir¯sˆQÓòâ.„»èÔÇ‹çUÏ#¯¨ºX»Úà¤p:lÑë¨×“–BÆOqGÚÏ,ß‚Ãpfu\Aà|ÿÝëoßž}ÿÃwŸùæº7ÙRW‹8×”gÓ”15W¨FNÈŽ•j|bûì·Þ¡YÅրݼ0+¯²×BÅzv1Ë/½»c S?×!k&GG¸W×qp‚Çl øª)À¹3Ô¡ œ7ú€ “:›QWRSZ C@³mØ^\úöË·g?|ùù—¯ÿú¥ ÉtÃVÛ´+3âž[ ¤ªW£eEJî3ö½½ÚÆ¥!}0Ž—t™×yý><’ðPyi ?ìÕžŒ)®7b,ºËâ×Y2/ ViÜÝ“Þz=VbSnèÇÂ%Z2:á#*dœ8 0µ[8íBø±.vsyçú7W27Sµc-ìŠÚÕ0Ô×ý'B…hÔ5œ^ê—²©b] Mˆn²£f°5ráx/µÓa„­†‘ãnŸÔ|Óbð¨™Pnß®QΡ]­Y9Xbu/ÚWX- EUÆÆQеŨ¨…Ê/E»G˜:9tìÇOËWŽÐö'WUUfçtØfMÑ÷Mí­~pÓ[õòÞmoªQ õjºÐÜSº—|–;áx…ŸÄÅ?åÌjŠŸÄt‹ŸJ´Ïãæ+Þ\Òšøø]aŽm«’»0O9Ôè½L,YüÑcP J~'âc¸éý —œ©{÷‰9ç0»l®7šQÊûF6ïà¨ïä” zuÔžažÃ³¥+I<_U7‚n½ÆHFCæÈ4‘ß®£Cr·ÌØžèÍ¥íˆ)vY-‘0nA„.ZwV—µÄ™¹›žE¹C–Âj n• A.C à £”v=>„öÍkTkبˆ¨µ~ö%¡ä$FAÉH˜°Ýº&Žù6o•Ù]S_r0=ÐA}•ÔÉ mll‡Žwu`j\yÏ>ù”B?×äkîÑÚ@W¼œóbQäZ>] &P–ؘÖ÷;·÷Æ*.7¾ŽJ½qû~ Û逥LÂ/îV ZÎ⤠9&E!Ô\Æ4ˆîz ®·§×o¶ÂúV$•ÊåœxÙ[”ŸY¶)7tåÀt¸ûÜÑÐÅ:Z©°Jâ?þ*x4 ©p¢)O$õÖE¼ƒG[»åèö(Þ/‹2¸ùôy>@¶p<^C&ˆž ÿ®#0"™â 9ÑëDÈqf¡’& 9%^À“ +Ô鯡õÿ3àKÔ…€^Çz¤Ðéw‡@9zwhG’.]vys$ÿЇ…o1y&ü]¬ñrüjÙ9)´„%S²G•eØ¿®J#¿÷c ©„RÅ=-&®SÓU!o[ÌíõÌéÜo À7âtQ›jFLI¼d¤à·Cÿm”\–q €Þg•¶U¯5-’!úJ ’Ý>âÏ)ªiÈBYÜœ™Gùé¨-˜-y¬\à£ð]½¾ÖqÂìjC3¶ú‹Ú…,kAåÄk˜.‹gÐð¸›Ø[).ál‚Uúù—±ç”wUQ†ì…º…É»üRÜ]®ó•ûNÍ+†é‰æ©kÀ¸û`Ú÷ñ?§#Š7žÝ-¯úNþº.ø°E¦¶Ø¥éÜöîzÙí°w7tÿŒzwû|¿VžñÃHgÆ'Ú\Ÿ]•¡O±ã¼£Ñ×|ØÂ/fÅûã`“yÜ.àžgùÓÙÓ|59¡ýoÔ—T4 uÊ-kŸ>ˆYOhy€ŽLg~§[*)s×5~ &@õSjë—ý¶p?w‘>ãåKrýõx¦ö4rVYç¥{ãöÉè¾û²PgËY~Gn–йÛUVEIÊW-[\?yÅ-–ºòãcî?(¯ BWCÂw"vÅãƒ`Îm]«ª4A<wYTßJÿuº'd¥Ëëj" y|ÖÂO_õC™Î­xÐÀ®Ýi8§na[nd܇Ąѡ&AðÉ7Á0‡¼¶QŸ™q;ÁŽÛ5Cn_}ñë±@À´”tÐ# ‚1}ìD ÆâêýÐfÁqB!Ô àKá'æšu†ít'4D*£NÐL>å¼Ð«J³°‹ò·\\WïÃáþÀ£ú‘c÷±)çŽ*QOÈ»[½¾âH¸¾G?§½vi¸7ŒÏ&sìž®ø‘¤g;º‹µÿ¸z™®ôʽ¨”{€c+¦ñ}ý,n×÷¶†:¨Ãº*f×hâñÜ b3?^ –ØÑññèñQÒFß‹Ígùê«ëµ#)¿­2%%ÞHŸ)òÙ–è¦Q¤Nœ÷;ÿ0k¿v‘fL¯Q'⹤)0k ˜úKÉÒ´ZÓc†§Êë(䊣%¹jx¤0…£¹¤›žÀ¶ùBu¬Äû(Ë5¥€~ bœ«‹r’Š3â¤1)è•ÄšK>ø„éÐ8`3Th ˜ˆÂׯ/Z¿•U‹K¨˜.%3ÂVÔõ=o‚9H$r¹N€à^©jLsåà@ (¡G%PÿÕÎ qb7ÞR£Ô(í½ciûZ à¢ÁWCbñ'EÙ̽æME²“¦P®W?|iJ;¢W¿ Ÿ¦ún~^Æ–8H†Øq£{ѧPŸ•ÊCÇæH¼Sö—ƒ}ä´jÐà™÷o0e9C¦üŒýùÇ×>v×z¿;€ömð›X+ÛßÌqœÇ‹â½5î"ŸÔ¤¤#=%–¥Ë¸±BÄAr<×Ï%ªi‚‹31yàÅãDîû]dyI½Ý’;q3¾_U×å´H Ϊk„_Y_Š}]¾÷¡RŠt£mŒ{âZQK¼§uŠ3Ò´p%׳ÿo“šþ½-Sð_šŒHm¶Ìþ#ç”õåfvB²€ƒ¨ì 4ò!a¨õ³E…8»#²ÛtL}yŽH ÇSà{ä6àÃs÷Ëè¿OFÇ^E_jHÙÜ#kçXÄ[ñKTåt ~E>Wïuûíɷ޳ª&e œ€Ó éh`Ô!µhUõ¨üÞ³G>†n%"TèP“ÿHI¸|âº.éa­3 /ð†/öW†’ä$ƒ×;ª>ø]F9ˆ1¥Uí\p%æTIAØ/’ô-ëgotÎ<&îb1ºƒŽç¥“K3˜|"lã$GM”tVôÒªžŽNÄ+3_H†‡iÂNpv÷Hêú;¸mH’‰~5ÃÛ[÷¿“Í×ÕÌ?ó§ÿ·ÎgïûÅtó©ͽ¢óY- —KVgœÒúYçÊ`Ãý'·ÜÚ&ý‹Dà:5¡™!¾ùÜíen„æÿJ`Ã݆vS9…w¿[`E”gH×€¸<€\`)º&§²îgqÒŸm%òVsµ½L·ŠÄù z´÷BJÏ: ræÝV#pÁ‹á“«Íâ}í½/YˆËúk»œcøw)ïºÉ¹ˆè­‰D5ñïÃb*Ù,€ÁYÓKÍ‘ÖCšpÖŽ*ዬ3|Š$3³Òc9]Ì*™E‘lÓYÂåAܻˆþËß=_³ìûׯ_󸌌¶šTí¬¬+nçÙ‚– •ª”–ö³×‡×…Ä”³X˜¦qIuAräv˜ÎÅ–ûzíx;‰Ô\H×{Ù«™chÜ>{ót0ô²ï«›bõýçÂg}óúû7p&¸*‘hwà R*¸ ~NþÇì(ÛŒº ¯pv³×˜vmQÿè{ï6‡ï£rG+·µˆ•¦¤Ë˜Æ°‹›–¬o´ûmvM4HbDÏ•?´½í›§*$^ïÆ»³ó8úÂy×Í Lò3úDÐÖœf‘¸ñÎh"íƒsòÖ‰†{‚ÛÎH¨ÏΘ:¾é?&;ùåÓxMŒlW*úËaœpW¡ÑC û?ÔªèþnÛU†ÒRôÉ`gáp¾Œ±“2þöI!µŽìªY bÇtQ¦6ãQ‰½sî†ï¶V]ìnË YKlHØ5Ÿ}1|Ëg¸4Klc2[}ôdt»/â’Ûßú~ÁXzûsùË~²¥† ›Ý-&Þ5V £  Ìˆþç_ïÚ3ñÂ&Íý<øeç'ôQð=ÇHm+õwo:”‡¡£+¶gÃÕë¸ä¨—í©Ö-=ý÷öœ+Ý·ÉF;wÙö®NöýïÜâš?õeJyš#ñ5#Q$í}Øl6$ì<|CÂyسÀÔБ–$±è¡ß|×Ë¢§]®ño¨Ð¦'©Ï?ÜQݨ¥¾QT•ÃÿDzåá?Ûu|ó ¦èXz4|/nÊ©cŸ1XÞê£+†¤½ôÏT ¸®–¡©Ñþ¦Èt £¦´AÒ|póÖÚÉZm·&hbní“cü‘¿wþônñO.Â?ý”ÿÓÏÈ?}oÿùàÚtýšKª€‘$€V«¤BþÇoDzrÜÈY8áySªêi;$tø’yœ>ÙšÜÙ±/÷ÛrGEö»+£”WÁò¸÷¶Mò¥ÜúÓ'­±!Œ+D«=ióÀAÚÄy~+qŽÍ¯:gîj;c™^&?¯ŠÉuüó™È~ðÃ&쎦äAKYh)J)áª+=TQŠÜä„ÀOcf‹(p*PM?2q k2NK"*âtšK®dÙåTÇIÓ¦ÇnŠ,ÎŒgu3W%ÜêŒõ¤©ç}P?Ò$ucî©[QÔ¡Œ0¤ÞƒW€aö¢ %}¢ÎîhW—ÿ¡ÍsxÉŒ03©'6å.²FTèo‡øòÐLJ©=jxÂc˜©¸šèjh…Ü »Í'Q#›­W¬ÏÜ>ÀûÚÛÀH® èq&YÌ”b’Ä9n*œþS5ý¢öQ9_Ó\—N¾,ú—}w´ÃÙõL*¼[ü7Ò„Fy(%Rš,W‰â ø qeŽÝ ˆNŸœøØPïé÷¤Í0#žV¬æ¶ï)ïJVö™mè¨N‚X›eOlû‚¾\Ç„J¢­«'z¶5&ƒ;Ø•nðoÙ"BšÄmì'B ûú&_¸ËwåØR¦9}ÒG¶äÛŽð‚»û#r$ÕæÜêX õ•ÁFR~PÑØ&³ªV\´¦$ÜjxmÊ¿÷\h߯g\çGîH-—ÅT 1û°kJ ¸­,ûe}&…Üÿ™$?ÃSSqȤÜó±Ü¿’f]Ðgö{&Ù9á-q³­’¢¸DGPÍ ZÑÉ-òÜØ+÷|æè m ²#ÝJ”t¾´¶`ôÜnÔ^üÙÐ1#(ކ¬Ígl^mÒDn?Ò1/a–PÚ‰Hý¨ ‚ÔqF'õyˆb'€;¶å “vé¬G5y¢ÐVª'Ú>f¨kV“éÚ‹±áƒ}I2{¦v^{•fn‰Œç'BEdpSéóØÒŇßþmSxÌÐàË!t@§úƒèÍhê`¦Þ1·µ BÙ‹F¯FgÈX*Ž'Žoé4J±GÊ>qMÜ~•P? äž­6 £_–ï¯Ùa‹CÖý…¶E¾“æíRo˜Ü-JÛKh\VZOx¥®¥ uZÂ+sUE"[FH0ýšÝ|˜Ã„kÉÅÂ7ÏŠù—Ì8sØÅggÓõ8,À’ô$1:9ðâTÍòu@Í‘%Õ€¨B}¿0îVC¥øƒÏ‘ †Ô¶C.QÁ·!œ^Q3£-¯Ä |zèz°‚ÿk‚/›4îS£æ¾ê<äé0+—$ùܱ@f Gõ!Fn œõöî‡Á¬`†ÉͲZ´²Ýf¨:¤cç”êîÈ“0 oèCèz>¥ÇØ#U1q±ÃÝ볫+s_ É,«Ø¬Æ2i2¬lÈ嘉Wî:ÌXnÜÞ¨ƒ«cHvýFŒw店Q iþµ*ˆõB:ûÖ#i·bÎ)G=1tm yÑ;†˜µ¹d0ìoçéÅÅž 5)Z}€æˆÉÅ¢×\:#X&G6.²™ÛßS÷}”ýÒF¢{jÇl=d.d¢Í·«½~öM‘/Ø.ªaËñ¾pgУ÷ÄæëÐ|¼{ÕU‡/5PðëÜÞË1†ñ=ÝDBz'ÈiÍÕ*©8 ÄFy‘-ýÐf%#‘µ^±¬†$Ò´JáÎ>ö')·ˆ]*íhuç`y­¯ìgç[ hÕý'4A¢XAãúït|·¾‡O… ¨¾*‰Z Ký•ÔsUöW%ýÇ—ï³ñK7®)e<Ñé?}ÒxËèt•ÙöO\}e£LÄtF]ãG%Ck@U*Ÿéš”ß·h«¶R\º£–ßV.t«ð_Y¼ý#Jð §/³ßœçu¡!/”WÝ'ùdgô½ýR&»ã1É#ß¹ÔÜ<äMߪL>Ñ¡~6ÈDóÆkó"Þ;{3¢C™O‹èj(¯Xb=íDã×F/¼šn2©$—¸pšm2-ZaÖˆKÊè`- ý 2*Í\ÐS‚n¶gÃœêµ ÐìxXd3ØQ¡ÚÈFi ê–=xáÇ¢ŽP ôåÔȳֿ€Cµ‚áGí[«>.øÞÞ ãÞ=¬g\•FÇ<]:‰£µ7óúo|Ú¢ÓºÕèUjh§/éSÖrûýÁÙëŠPÿmCÞÜÒˆJ.ê+•NÅß,‘¹jß^A‡åpÈõyÖ‚¿ç¼¹ò·Ê}1&7άˆ²n¿¿[dz_Üݸ|æ~ùtX‚¸3‚WC@¤¯,Ï`Ÿ¹iøº °f½rœ–”éÞxìÆŠÍ"Ñ>ðq|Á„l{{$HÇàD6kwbú)/ȱȖŽìÁ7°=ké¶·µ×·ðª=ˆÃ©%øµ1KIÀõ…Í0¢~Ð/µ¦µ]'üyªrœ¥»jË d>ÝΤ ½£/²ÏõãâXJœ“œ¡úF¡lKIäg©âA›¯Êé4@­ñÈÒV_H·wzÝÿ¿ŠË…oZnþ¯Å•@HA(ÞY´á ЫòS¹õw~ßã]÷³VN@SS2£Ñøä­TMŸ’œÇÂ¥Æ`®;&¤ºª“|Àkq@ëRÛ§ ÈëØTvy›ÁÍÄa¢d˜XÝx¬”0Dk6g &ÊÑù—¾ù±y˜Zƒ»¢<@é¼-ƒé:6n@=Ab q¹ŒBC†¯0:ÆXºPòÿZF…RV¤˜¶Z §7¨8¿tȳ@3*í¨®Œ³ÔÚµ˜WÅåx¯Å­éû·*…ź҆ÚF¨uÚ¢ÁÕ›sŇ‹dy |,–‘·Ý¶]~Í3$w~¾Š#=k¦ D42-ƒÊ·…£o¸‚bÊñ×£ñÀøå}u…×wº½ Hr[¨ý£ƒÈU™“P$±`Ü"Db(fÍ}Ô,'X˜~›Önö apÁžpR¸×·ÓëAKdU$wª›í錯 L¢È'ÿýúô Át¿{õ©†òù©îM8'k'ªôàç_˜ñR@½ÆÊQ{: Zú!GRò¥É•rÕ# Èä½ ,[ݦó+ 'Á|®•‹Ö)D*ÀU~çOÙ¬,äi…Œ° hÂŒHaÑëA/»m"±µÒ·Ûnã®wäÊ]õ¾èŽÊ¥†-­îZßÏ5O/Ë+_K𥿩| ã‚,aü3oœ`ºnhEÀœKæÌ ¹•ä^h@¼£A*¾îœÕˆŸL }+Ç[BáZ‡dTqL)À<à㎖î_dix|>İ¡È)8ÚüÂê2/'nºênð~Ò~{%¯t*´£. žR!DoRÍãûxó µàRV¥'ïÝ„ZÊòWŽë/îÙ•&¥ òzåsZMS|µùI˜ç¦Þ"㌣|U!4ÔÛùað¤DŽ Y;fM•§›Óñ;Ìs˜oêå :Í^Ôaß=oþö‘{ng;ÄÝ G/sùšQYwÛžôÉo6KJR¦-¡ º0¦ ö’1Û«Žßm`"(àS¼'T|Ú—îçÿÂËâ¯ùêûYÐÐOOC|·k}¹œBÄÝéS$éh£OB•÷YuÛ—a‚°ÞL-ÏK_Bt gðÌ¿ï*"“ ›èEÇ‹Nœ3­óJo:îv´– eL=£Hóå›ÉêÕF¬*»2ΫۖTîp®# 9VäA3‹9ýꊜV{nz~ÉnàȪã|x¿¡–+dx‚aœ`.‡H²“%pM²µ¥Üý‡x }i@!Po•_ª &[ÔïytÆÜ4§Rz>F`×ÀFË ½`¿0ãë.©ˆ‚(©OÁ ‘懄‘~æpŒù¦yXŒèx¬ëíaeWElèïæ«AÞê%ßQ"‹{eanð‹Ímá§·(îZ’¯J¢Ó¨˜Ê\”1ЉF/rf¹œ]:Z°¾šÓ¼À³b`HR™º6^XÚÉ(çã›"^Côâ"ûFyxuCk2m9]Žnü‘‚'¥O‰ ™-á¶ŠgÀ” Ôz{ 4ögÈ{RV£mÂO-¡ø%DÑÞVí§g Ÿ=ov¤`ÏÛ>È PŒ‡…oD ")*JG*}éµç]ÙJØHBz騯ÚKòÖÈ-££¨=!äïg´UOptü':¡ò¡™3w3Þʸ±_×FÅxÍ1ÈØ”—ÑÕòÍÇ:øüm1…BossªS¯™˜^®0"$ÒSø>?'ãsË\(\ÜQsq#Ž˜TÕ9ýááNô0¤]QE¨hÑ%× Öu±ÜäúÁž¶Å¸w{š^iÍΪ×ëjF`:<¯€àÒ¼Sãôzyû§—ÃFælïÈÄA€*ÙÇiˆl |R䯱­¨Þ.ø‹Â4ÿ³¸¿¼¯Ý|<*;n(Ìp͟܃[Éc†-zäYÌ.Aœ[\jSZS¢D;ÎQ O¶`·ž?I à|ÖrWFî=ÆïßkúÞeò~Îër‹ ðUË¥yG ¿UœÚ2æ+¹¿S~f™ûH»[Þñ˜ŒÇq¾ÛÀ‘ô3G”^Ý~’5Bï㻞Y¶Uã±j„u£±¾¶ÐQP¥['§ßu›´7â‹K…„éq¯Ëü…õ]'¦..;Ýþ­ÍDz'YÕ)U _úKèùóH"s c¨vølÐr¯Rd*-º•–£µLÏúÍîÉD¼;¤n6¿ >J”¬¼¤pÛ°Œnj³òT+г±±=aœómq >cÙÉÅ*¤ô¥êˆšhïŽ;¾“`»áï“jvl}dëîN0iN®è=¤½žž\wí”b7¥eyƒ”¶¾PB¶iÂ÷¸<,€Qù~öcZ‚f‘[L¬ï!ÍOòùˆ­z®žœ!áT ll›¯Óf·Z‘´z¨=š'¯š‘ËQjÚÑÈÀ r¡ÎÎ.6_9;3¿ÚKÎLjoß‹ê?'é‘óÐyÜ{œ“§`0NÍ9ìN·Û´]¡ì¯[eÝÖi)ËvŠˆ¼—î°üÚˆÙ'Ùppô+ÿ•‘KÉÜ#oÛÛ½ûþÑurwÄÔv`‹}<}‘dg%´Îµ}ASÞ<¢ÝŸçù-TêÇe7{‘Ås”ge÷—î «x6h Ÿ§è3È‚À¬9CKïHb°œ´~òôTTÎú€Y ÷Ö4DŠÈ‘žp_¨'4ú…ìÄ&ìÁù·îˆ—7 åbÉpÑ™QÅÑÏÕ:qAÔˆÌüÃiPœV¢ygò-úUÏ¢lÔò#:œ€D2²XFL0žý/—;6({g’J/[F-…;Š<¸g¶ßÀ Žsøê\sCYÊD!°i?{ÆRü?Bžéh.‚„£°\¨V¼+TæP_ýaä0‡Nh¸ŽF-4<:|9š¢'ѵZ»q3+äE O†½8÷¥¢+õ¡ûÏ¢f;›ZTÇ‹jñ÷bUu›ôWuñÔEU†ƒÅøÊcgšJñGqÏ UY€yÒ<Ô'á2òyÐEÊÆŽm?’½×Ÿêø‹(ûK_çgÎQ×SGÇanÉLæç²Ý€Õ˜#-=l»–Y)Ìö=’æaüôÓO±w_wŽú#¥pøQÊD2þ¼{¡¢£¬N/;me¯>2ý À½ÈƒCd@BÝã(îR,6u@þ¸ò0\¸eÝÏË;q#©ïý‰hŽ?ÌÁV©w=þ5*÷¤?H‹]ÇÊ™Ÿ‡½ì©» Fîÿ§O~én×xÝwB6ÒéF¯9¨ÎÏY6ì÷ܯOù÷?}ÒÿÅ"ŠŸI²xhY­bØ¢6q²„/óð„qŠíÁžôä UÈjÞ±bÑú£˽SŠh ÏhÏbßZ.¢eRJÂË{„•ïÁÀ³§âWoæè¡®u¨¢¥“4ÍÐ4©èÎ/!:‘]©û7† 7†í1ÍJMNºäð^VË³Ú ŒÏÚÒw»…öf|¸ø}š^bhtm>y¯’ lŒ$cæ ¡”¦Ãgw¹©¯˜ëÎW½Ø®ÙÉÎÄKÍüŽÀ&;Sn¬ÕLx’ÿ±ÌVu5—sCè ¾N™=Ê÷»Ý&ÿú¤û‹#6¡°ÔØôŸt»t¯W3>d /"† ÕÀ Läg²Q@Yß 0¸È>¦ÈÿqÝùø² .¸ƒ såNÇö²Ûnƒ!nìÁH7Ð+Œ—ší6¯Êçò%­&Ñ®ÄM2_Öb–U7Üó"•ãÄö¤'“îV[¹ ;ÊíRNˆóÀB²x°âèæàX·]ü˹¨H4w8¨Ýe<“êÅ}©ðKÓ+ÚIkžKæ ®kJ\@ZŽk?ùXµ$ÿ³¶¤õq’LWLRdºqÜl‡5,+(œk¡üyY«3ži´àÏ$~ Yþ áI„WÄb ¹†µŸÇðš5” Áâ—ì1žµeoIƒdP¸ƒÆèZËôÈ%ïK +åê€Ì`Zxø<Þ-rWx¢·í ÷uU[1¶Í~÷1柾ÌÖY?É8 WvÔ•E+Qȇ¨ç¿C)hÀ«³až܃vxÄKDŽO%ý‘z‰E(¿,ñ¢A.#¤MÔw¹º‡÷åaÄd3üJa,cêoˆGîѫ޾þêõç¯_}}öù—_-õsq²Ìçgê•‚§£V%.Î=R‘“Òò™:Hf ?Ë“*ºªÞ špžcŸ‰ØVußirº`Z›þ\`¨áþ!k°ìMt£ùÀ$ÝóðJM’àÕá’ÁÁVTPXxEvíÎ\¤‘•’¶Á˜n<¨†Q u&eáòúÍ"#…Ó^Ò‘=|ù[Óí¶¦ð“P䘸Ô ‘ñ,î˜{¥ŒuåS›h:2æ2©•9ccW ðBþŸ¬#ÝkKŠ)wv.»oî¨ûš©Åh ÇØò#8F²ªÞ›ƒ=°E³Ý-ÏÙfEóF2lx -As·Ê¶Ø5oÿÆT2úX m=ž î²ÞzŒ!¤-5FïŸ:þ.V‹³élvVßÍ;‡R‡=m ?9sóºò•NQ¯ÙH_ö›þù(fƒ–pUxõD^©gE±tÕèC«À?8é=¿wCx<úàžÿ]½f#Ü$»,û•»æI¦a¢ýÖ#Sø·H¢—-·Ó…‹¢ó¬ª št=|öP½"užÛõk6>K›ÊhxÒjêØå—T ³bq]ºæçI iZSÓ]H.ðÕ(Ôª³8ôYJJ¶‡ ,Wƒüv|,Hþê+Ç !Ç£[“/Ù;5ŠZ³±É‡ž? qlêk7ÜgZ]ê}Ô›'d iX–d«½2o¸ð7ÒÁzøÃ–ÚˆIOBQÜrRã¥~t^.…×v•}EdŠIÔÅ‹j6U0CØPõžÐ>åeB–;Ÿ6ÁoÞ€æ·.è‰ôlÔf´_÷a™z#œÉ!DŸ Öç•cv³àÜ¡B…¨–¬.Š÷ãÀÿŒÈÌ/oæù"(AF­\Q¡Î¶òco) u¿_Kò=ˆÄOÔ:¨2®Kf¡æ=î—ñ?;'²q½AÀÏ\J@ÇD.ŠÕ¶f5¼^hŒ@2ÿöïúóM9›z܆ xA;¦£ ÞµîY¬QlYùXüù¼Oo­t¨¹%…EÒ#Z„’È OéRuGs™Ñ/Êá05éŸÔ¥j§dXS”Ñ&VðDžÓ Q¾A<$¹ÇѵUïê•Jc¿á([ýï7FÆ«Õ÷|Ü&\¹Ûé}} ÚÑàÏ[ìKxÑ–û})iÒM¹Ø°|ðåüÚP"µÍî‚1I’IiÈ—W|æîŽÂÉ@ÙyÅ Gfë5Ö<Ânøúõ·_¼êgsX¥:›¸ÖA'AõìÝ9ý¤‡÷6ûÜ-é×oÕfŒð“ÉFBs}ܪw½ç7o6ç?U«ÙTSÔ˜®‚Æ2Çç®Ë3Éݦò&œÖÓqR.ŽŒl’¤wv©¹œUçŽó¯6w¡¬ê¾)‚ÔÒ¡`:Í >Ù——ý,@(1RŽåúN!É*úGx^p2Ÿ{'`Š5GlV³;‚7¯‘˜ãòNµ:DŽŠQ‚E –ʾÿë7„1LÖT·ìÙ7ß¿6Ç\ XÁÃw t›& KŽ6cEòúù¦F‚PŸ* TÎ( íW›²f@²OïmDÖ™,7ïë®Æ½×LuóŠ?‰ƒ†Gk]øÏï‡ØÑY>‚¹³Ä•¶@îÚZ'‰9 ²˜B=ª–`ömÎç@ä!Md't]™½>/YP Cs̯´ã·¬õ‚u¡ÓqU=¤U¹:¢„7ˆê´sóe¾ûÅÆq˜F™ c sj¼ÌáöX .GL ÓF#ÿS@:î$û >rw!܉g¥¶Í2$Òq‚·[ *B CZ]HŸtBãsÓ"U N Lˆ^ªŠpaP ¡½~làÁðjfµø WgsJI„g•cÛDIœkU¶»B×eq#óûûõfóeùxyg*/wa‡÷éS¬¼{!SÉ k -œU¢ªUço±¿ð¢sÛô-;88ˆ-£ŠmGU_U_j4d[”Õw_§ÕéN¸ÍŽ²Û´ý]Œx\¢ï86ð'°DªvþËù¼˜çcæØ,)&|Ñ"íCôç#xîÂöPÈâÚ߯չú‘¦§{[ÍyP¸{Áu‘2A‡~äÃqKÞݵX ;-íWÆ:´fÓÊ>yéÖ)ö)D^ºÍrÛíÚH.•P=¨VI=!B‘Ù“bÕl´Â½†UJÞö<´daŸY’t'¢NDD‹W^aObâkVïˆuàdÔríoò *r’Øß6nh‚RÊ’ùAB”†Â 7–?¡Ü.‰ÆÛ(J½É't‚#Ó;!ròì7r )ùò6aÓ æäˆ$Ç Ÿ{¯oÁ4ýÔH/‹ ÚÒ÷¶—Å&yÀ¶âý¢|¼„†ô<•×q½&[ôêÛÿÊ”VÒó¤OÑ*ÓAx Nè@Ð>´X5Îj— êSæ«UB §Q•k*Q@¹tãÙoÏ€ªšÐ¸ ËW¢çYÅW2@›ËZ. ±·û{ \ìLG%“”haÛï(ä½tëÙ«7 I¤ô+T| jÈÔÆ4Ê7ØàŸ^Ü[âݦ,²%¤Èuãµ°ÌKH=†Êøj5Þ°p+j²:f¢-½tÑS'E3õ›ßW ÍÙ¹½låþOƒû\uu,û¹žsâLaÀÜÒ”*Ài•œ¬’33ñ/·Rt"$¶„¶fæXÉÊ™S¡NqÏÏß%·ñ4üÏÝž @“6©œÆ-"º,p¥ |ÊËùnT‘,šè©"Ø®yà[æ¼ðÞ¦¸C¿»›òü½Å°Škþ¬IQ"Fnšþ¼É '†S“M\ˆ@: + °rÊŒÍWà¿ä -©f7}-Ð9’€9¥ÈKà˜4ë­hÇÚÃǾfÎÛz;¹‹K_Ùë󩼩L•§A>tv¿ækÏvó –|kQ5o/?VÄØ4ÂËöÿ‹ëÁ ¸…%þÿxùx$ÿÒoOè·~ÿ_–vAO<ë=‹`͆a^í³¨'ÃÞ¨y~Ým”œ$§ÇȻͻÍ48 pp-Ãæ±¶”áh`Oü>ˆ)åBP1-Á:}op´ÞÊ¿zÀˆä)1Õ0¤Zªåó_Kè´Œ=•(¾EQ ðoYX@àYK_”iλèÞ=iŸíñß¿óïKpMnù¿§ÿ„4pn†°Q>»ýl7ú:›ç«#|sô0V±{Àí¯g¼O¯Ê•ÌK¾Ô²G»#N°‘“Ðé ‡N‰×f‡i{°ïÖ!W6‘þ)aìi$‚Ó×á´÷¹D‡ÂÀ#ªõ)Ò´îlÞÞ蜫€ƒ‚í–ü蕇ãx‘_‰/b„ö¤œ·.½Leå7ú°C’é?ÑÞ<À6þƒ[HÐtÝAªmu.ä „z·UáùûJ!Ï÷Ú1z§¿®(Ýw»m_ÛWö¦sùHªûñÍå£îQ×Ïú;ó¢óV&v¾ý û+”ÚKÅžk~-²BËb†$sôK¦¹O)ÔSß”ŠºÞL„ŽhøJ‡g÷¶Û~~ü¡©õŸ»vÖС&œ…إʘÉYgûñK9uÖÊr²m{–ín9’ÐîgäºâXlzhÌã ¡(+9=ýõféH·AC½0Ê­a¡¢šã) cœºÈRauS™Õ-X»$¦¢Š_òφ¿Z_þJBÞÅ—½ê¤:º¥30'?¡Ùt┊#œÌ¶ç¨ú?Àî6ÐWpÒóY/¹ _žj}þk5\š÷‚©’M@ xYÒ2^x«Ç¡ù}¾ S}ñsYãÿ’à‘#Éý‰ññyd•)@ýa³5&܃ª0øF¿â£æÂ©CC@ÓÈEXí¿Û¤2¸¬‡—õùehÉž]Ö§tãü<´±ªKÙQÃ×7™ï8‹•ƒ‡6L6p{šep•á N%â× žÍ#œñŠ·—Šßž÷ÅÔ‘´–Ëï¶÷žq–ä Œ˜c=Ï ëvh¶°ž\8j ÈùÞiÌ•÷IfbŠ€‘œÓÿ†!€10jX—vføÁ Ns–ü™á»f²æÏƒÓ|×¼Šé,nŒá€S étlÑ(îE¥f…/vÐÒ 'Ÿ ƒ]¯áÀÝYPÞBîÖ›Dªu± ƒ|ÔY_%ƒ“óÞÊôOŸÑÒõŸ= –ßEÿìWG},ijQÿb.Äw~ݱÝnï´*%ðp4V¡G{ás†ÜíNv׫زö¦^‡¿ áʤm€wÎCߥ²¨›4_Þ¹L§ló“ãeÐ #Šô)~§»· Šk `ž‚2yÒ%ér m&T€óÖº¿{ë Fã ¹ú+àé³Ós\Kð;ý`8Ÿ<{ò4á‹ô;ýDƒ;8;ðVËhØ?žžáý*•œ ûO/†Oq~ÕJT~m¨š1Ç̳óÁïâ˜yvÞŠs˜O¯î0Å%Zì| ³xC+y(íók yàrÌ„á@aȹÉ5’&]È5ãe¬¡œ~¦hà ×&>z…3öû°Âìq”«4oœœ$C×—ç§ \ôJLšç-:«Ç2ÈÄ.Ía{k äbæö¯bà1qöw&eÝ÷ ”ö¥ñW£½w¨á=j–Є5ÙD;Ö/^T]ìî_A3=Tj„#è)¼®ÃYùúû©L¨ó«¡MS‘Àß¹ÚªÖ2åeðïO§~’kÒ&“†÷ge*£Ý¢ŒÜ2ØÔûªr%›:CK ºØšÏy¡þD³Xö¿{•-ôûî´ÑÙ|ã|ä Œøîð|Ðt!JdZäug'‡ª§Ý Êvp©ÚöÌQ‘Á—<í”Í›7B2ø•¡R¬eýQ[Up•tæÃ¶Šô=»û(µ{¶ØT7míÖ»]@;â¾Â¾q¥=?9—ýeðkjRžkTßrí¦¿NWÙ¢säªä©È>O…hÁÔ°Ï¿å™ÔãÊeøìêýÀô§@R@ÓÀ7.òʰ×öq:¤1ÝheåËtN‚5ýú˜þÇUER8áÝ›aBž§‹|NJ¾P«šd÷¤á8› ì!ìj~Ò¢%U®DÓ·—ü¢{ó‹„:¼áÿóeõ{KÆÏalè%×!×®œ¦Ç‰£Ôׄ°(C'OEdƒ¬‹ÄTlúpGòÝä•6LS‰%]¬,)‰aþvÝÈEViÊ)PI^7"„ƒ¦¨tÄ1’ú:°FâEØFºæ!ØþE)Ú×÷Ìÿ¢LÇ Vø}æ¹w/õr{d“5½HSp„=”o1(©ÀIºÐß9ÄØQ ‡w´Gl›qÆ33¹!ªxêô´Ì\¯7°Xêíò^6³æ÷Õyígø ¨Â‰¨‘ßEŒ NFlûE… ¯ÕŒ²Õ÷Vþûc±:[jÃ÷)ÇEUëEºPL¶*åÙGÎäôòi™Þ­Âèw5¬9Dœ;˜a,ùÁMŠæGÆN ‰ ÷A!ONUs|½}œžWbÓâ-*y»‹u¶ôïAÚïõÖÇŰ¹~ØŒ¥s  2Va¼›·kF6 ©ZÌr6rˆÿ¡®Åà ×ãí:øRÖ°ÅÎ|]‹ª­·;49®hù_Ýë¿Û=Ÿh£ûÓf*låóyÍ8*Õ¼=Ñ–ÞÒt0î¯{½("¸+â̈eƱK–‡AíÒ3mN–4 t=j¢û#zrGvŒe$¸¶†G~-èFô4&ùcßh1·É݃DŒ ü_Êv¼ÿ¢ ‚”U±"çl1Â?5WÿÍpù3ôò{ü'Pg¥èè[Õá]Z7VŠVêö$Ø[…F“ö1 Æ#»柧-6=W ÈÄC,ì(Wñnfzé4­SÎ01S}$B>‚¤ŠUF-.¼“ÊÁ‰Þº§#sÅyØùŒ Í f. òÝý7>úH¸øÏqöcÙ#QSçòQ׋,Bé·{-—\ñx²Ûm¾Ù£^ÂÎ’Êöl°0˳Gü0mùŠ`*:Œ 0¬iH§3Íe¢sP€HŽTrÒ.äׯү4@NIøDý!2"JÐYöšý¨ÁT ·< ˜Hz Œ-ìÚÁœñ€›çÑ:‚’¯®>j(*>uØœßE†‰iš÷„ˆf'!d@> ­¯ã·2ÀÍ¿á;T`ÓœvÅŠˆÎÎ}3Tö‚2¤pûXµl×akj‰xA.1 ¦¡ÀŠF– /®rôÑUŽÚªt ð¥¬dzDzØáUó« (ûïÖw­Ïª*OO»ëù¾y¸ü(,?Úóö¾¼£ðãgŸÒÏ• ãÓ ?íÀÖ€½$š¸étêW„ øý:-ÔÝT1\oi§à¢¶¾|UæèTBM]–Ðr_¥‘‹±¦×5­žã¡}Å* ^KgͲÿ¯›°˜ mŸühÏ•M„]Dn®7û%AàÓùå£äÓ¤¥iÞ¥s´cu³å0·¶Ûf«¢Þ£ñîDÍÄøïâG´bZžxâõ}^Ó#¢%½¹Þ7í÷}ƒLž•û¿L}m_rz ]0N´{ow0ð½1ËoÛ:ã|']!x¦Êï[yò±í>Ö TÁC½TÁG×ò¶§F+CŒKË3Ï>¢…º‘îîûwÒÑ?¶“†rœ†­.µ³ù~¹]¥Ë|"*íÄ*À[ tm–Ð £ðoG9ä#Èè@“­!áMýnû2bòѱœ.ÊãG’ ¿#yrËcHÿÊÐ_æâ4Lwêc°‘ªN€ÅôWó’ËùƒNs‚j•ø© nÞeAqpŽõ$Ê…ÇO3[W'ÂÇ—uSªN›Á°†§ºª%ëžò›FFŽ›Ë׃*Ö%Ž&Š•%€»Ët½ ²øñÑ|-)•&wéBðQTÄýÿFÌìä{ÏÃNC"ütʧaÞm¯a»­â%nôW@“îÞÜÍi¶â´HZ*ÃO(ì‰NdMë<Íè^K;µîM­UôÇ’Þ–Y6•ÍàHZÚ,¶ ÒËš¯†årî1b¥gK³c÷Û¬41G”ÁäROÄ•qüÅlra°ïtÖ‚¸Nï›^9µK2?»ŠÔEõÑ;SÒÙœýõ_Þ|«ñtdI[O[ŒØ x¢9¶ô%;÷ŒÚK¶úï=®èoý—ÿêßÇyà 稯f*Ñ[bï’WuîÙ1ê8ØÁ]$G¾òÎ"ñ¡Ôd"?æÛ ލ¼Z¾Û"’†œïµ¼—5ßî´…Å%Äü[f³Lálei¯6˜v°4»p  »Úb שׁ ½[Äî¦(Î!÷g²çÅak¯xÕ9¢LL‰OƒT#>ò dÄtl1“JÀux¤é¹gšÆO“‘íŽÆYãžµ«eŸÓÛõ(òd]a•ofɱûÔcNÞc?ž€ý†ß ÉÊšUÇn”Þbêö ÂYÖÎh JÁÅí£jÁlÃ÷•*4²}!ìÄœU$Õ¹‹ïI• Aú“4\Ú`Ï0p4ŽÂ © 1«¾!} ^ñËàWe‡åÙ϶W¥ä - ОcòÃHjcže›uVV’ÊÛZèé1»cÙñ5‹ ˆÎ’^Tú©"û%©M@ÕMc ãiÍgòsÔÄ”%3y2 Õx¬y‡ta¬>•ñ¸DqAæ ’˜MžØi6›ÓÅogʉÃL³xþ…Á²Û“›§†DãFŒ†ûBEùp%Æ5õVó! (Ú'q<¦RœåùÓ…9gÞ¿ïºü¿§Aþß’†µú¬d‡ä³sù½FÓ¸‚’oÑí…zÉë>W‡=´ïžO,‘EHÜíôRÃ¥Êå!9g‰¨Š"5Šs>L Ë£mÇý$zP.Š7—5^ØgÄÐA§ûžl³l²©(Pý”Œf×êêsç®T¡LòJ^ÊçÝý’ÿzܹ"™ð$¹Ñ¿Ýÿ5Js%>´ùYk²À<Ÿ^QWÔB.4ÚÝs„šS2‚⪜П¤ÐweucÈ?졞ò~þ—ÅE«ÐŒÓSBÙ¥*6%Roíìè\ 6æŽQû13l x¢\¤-¬¸s’‹‡Iór´H Ì}*ψ#†WÊ®n"‘¼õõÿ|óöÝ[IgñƒÖ|×B0:ζ((×>c$;ªaCýác0"™ÁN;tÚÞe‚uÆéË™¤ÓGƒä¸+Má£V{KÈ#5Çu¿w}ì¨â¤)4Ÿ98sR,#– ¨l¹YOXã(W5)`åayg§J© 1:ST° eM\™¸mUL$ªö\ý. lÖz,%[ÃT2Gj}§"§Í1ªL³&öÀwbD Í®ÆÝ¾Û¡ý’ñ—†ÔËJaœ¶¶é)"’zŽäå.ÖDà¥Þ MP46e äù—YêúÙÚqÚ*ê+ Q{ØðNË9и­õ.2Ú_rg²Úx†°œˆ¿xXªˆG_1 —>]yäûGjC¿öÇžq)6õzSKêÊrV&ŸkxpÔ!Öœ9F¼ê(¹Öµ/HÑòñî°éž&TD±ÃˉxÔõZ—ÈòÔ&ÚWáùç°íFj\oJp&+T™ Lþz¶œ4Üo¢˜ÃÂb>íEã¹¯Ëø4 q±4¤[ÏX9^¯ê=œ¤³€‡­°7Š(¦½·^÷µ¬6yì+Ì·Ô=¡#Ï „_)•²€ÁB)¹g]Þ¨£2÷Rß„•-Ò´˜.¬§á‚±Tm埔êÿùçŸ7Ô 8¾xT…~EÊ%¤üÍ+DptªÎ ÞÝ)T tsqyó.^ÐÛ¨çÍ â6Æ‘¢õ¿Â\P|æ~òe^M€ÏU3â< IE±òé´ŽYŒ<$‚ãΤxYlVÓ`NJTÞb»¾éÏñ_ž-6Š9ƒr‘ÿ×ÔÍû^²í%á]g~0ž¤êáä¶§»Æá›-q9S[ÖRæÐšx%DyÖFoê°p b½ ç+7ÅäŠOç«í®^´åÇõÃRû[ò·€@3†Qg»ðÌqL“Tv“æ%´ëU¾Þ,¢ó¨%›£õaû– ŠI®"âJW0_oÅÇ‹Ë9jÿ‡}ɨeé<¶Q°– ´w;Ô–©hrìˆ-à.IŽE˜Ü0Úå»ÿ)ŠäÞ/óUiÌ"``%‰W‰Ù›‚ÀóDªrŸ ¤u<+(‰&lÚíü&>Yƒ„^9,Ç¡ÚS©A1UvÙf %¶d ~m>“À ¦g'4 ™§`htªHȳ¤8ø[jÏøò2‘0wñË|¹›„Z†ˆºb2Ìþ*óýÁM—N¡¸ïÝ@<Ûƒ#@íWnÆ„¦¯^øY´f—Lš¬Ç¿ê eæ²ÛåzìØT “ ¡ÉPìpg1wƬ¨Q2äšÌæLZ§>®™qÇøâ™$»7Ãe¿/j—m€¤>gŽ×Ä1–Ųr KíðÞ¯Kc¦ß8þ ˜çq'SØty_s—ÖÚ,߸̷#2ü*ÞćW…ÚNïk®Å!éc§½ÒqzqµTµÈW‘!!„“/åe¡BuîHßáA 9¯Ì–xÑKîJtŽdÜ"ä"ÖãÛ ‰3÷ÐÁâʺŒÒÊ8&Ù*KîlÒ‹ÁìÎü£¨@y†ÝžgO§Æ\ÜHÅô‚q˜ˆÉR“ôºPÜWéd7!;rªÒˆ LG“ ´×æ ±Ú6`7ñ‘Ây ½G^' “œ"ÍÒýézñ´ÍL,Μð/ZN|H ºžhɇÎý6Ê’Ø$°ˆ„)Ñò.öJçµýØÞÃ3Üí'Šz§¾ÚÕÉ*›§mœ*–Ôp˜€%`Qñé.‹O 2ÝØ¾°ö:I¢5´Ô”hæP4}Á©=fšpt„»ŸÐ Pc„ 2aÛ^¹\lÝ•Ð@J+JHjåòÞÍ § öª™4ø?x]ˆ«qZÍÅ E”  U-L±y0ÃÆ2¢Ô`cYÌ`¯²l³Ø,Ò›¾£ù%ÿõ—ß8í—ߎW%íŸ%ù¯mÙ7Hß1%ÛḆãÑN÷ØÿMoììAá Ī?Åõ¬wºº—Q¯.ûua¿w-ï¡Ûm¢íêLå3’å¾uZV™ƒVå}ÓÑ À—̪B“u84CžtÓåbÀr2bOXüâK­"²+‚ >æ)Òia¿¡„þTO/á1Cª‚Ò ,Ë£=Ä|%B.'ïuñ—é$3¥Z …Ãph5?Áçˆe‡ªr¢ËÅ€E—W?ÓÐ÷%Ñ€¯¶øê'·¾L‡“68êâ£[†õªÃò1>fßæËÛ¾®!¥AÐ=í«G^á)¥tÐh‹(¥hâ­âÜ=IÜt–^fž én­è ýä[0ÙX„íEâØm$͹}ªiˆ†)<¸ ‡·ï©/eKÔ—÷h8£n`¹»Ä½XÍ’VH5î3ÜŽÃI~Í ²`nñ÷†ÑðlÏkyÈv oeiNšêšáà}=çת&Ç{¥|ÆñöÌŽÔO?¬|ƪ¤–ùñãdÃ~‘Æi[e ®Cgš2€è|W ,þ~‚yH Ú¥O Õ—4Ø*1û™@¼z*ôBíR,[†´d–l•1 ù$ê­þËg¬šÂåMWRYL¦¥Ò"Âc±{ºNˆÝᎠÅ;ã—°cFGT§3fzjl;š5[‡³O‘5xžÉÝáG±àôˆf‡ ꘆŒ³a'FY6¾ZžñBXhƒþSv·s±0K§·ïá+-ÂÿMßJÖz¤¡‘ÎÏ=$ª,@DtúÐ t¥çÈz[I-¿#8j‰zì ëÔàE2õ´Ñ$öïE¤Jµ„­,ŸP—aG³X¶¡‚¯€Xvò=­¬‚ö<á2œ?jMõkÓñ< çŒõ’3e¬|LkÙ¯-ˆ³2W(4øâ§×/ÿýÇÞ|ÿ.aa‚%Å% ×ϦõãQRßåæyÒ½ë³þ` õVdÁ©‘Û0U_¨Ÿ˹‘Þ0Û=Oü¾ ¢VPèØRç^X5¬ŒÉf•œ™U±¸Uî®ÛÚìpq ã] ~â‘Læl׺eJ§¿mªÚñË:nû©ãPÒƒIxÎâZ‡ûje‡¢Õ|íˆùjŸ(å¢×é‹Lû6­ŒÑëíßþüÚ'ï…I÷ͱ †ÒÑÚ¹H]9P¨«Ün‹x-±«›hºÒuƒõßQ ó.©OúçS¦ëã¿>Ã_Ý`ò©xS.-ÊcS²ç‡6…¯èpªœê>É×´ìÁ Àèü­CVãšÇ-åžç&þIòvCšNžÄâ´~JtíAñùC( \/_x)‘]”W'ܶèP"ôùr9ù>LÄS¹NßecÕ˜ç¹Iýõ#)9cºšMwe=Ũššw':‘AÁǤ®¡ Âaþ4ÅI2@ü\MÓÈû%üaÓ¦¿€Y—;’I{› ¨˜·™Û‡äg˜•DžÖ*.8jyç- -gª·ô¨oòsÚRóá'ÎÂ'~,3šö’.™Yï?6Ù&‹;{›-f¯¾åÉžâñ+’Ίq4lÂßD'+Ó5úïéžÚ„Ž+aqí`%ÏÂJÚy‰àY.‹JÛ¾ýb÷Iy³‹w4€Æk©f8Ø­F$Cýúƃ<Ó †eâƒ,B`Èœ@,ìÍXÃöM ÑÒƒHyCc°Œø“““×€í¨?…-©‹ù|Á›îŸ‚ºÙaÒ´Opu8CºÜT7bIv¨ b_Åjä ¨ð ŸÅl–H‡ò±Mª”Yó¤vàŠUŒªCBغ¶æÏfm¸Fµ(²¦t8§^ê5+ k³§Ïx네ºHv§yãË=pŠ·k»ÈtÖEJúÉ:y¤i̵fDÇ ÔˆãÛÚÁ‹ žùŒÙÃÊ·ê¯Òj’çcîÙð{¤‘)³¹KKLÛ•öTzCÈm€œÛ~ÓønÿUq»àt¹÷­ÔÕ²ÈÂ.ÌW&Ñbmø£|Èd}9v‘‹a‹¹Gù2ÉG€èIE]+LÊ7}Ϧ.p< Dv5šIuá~àé¢Qñü°ˆ÷Ï™ ù< ¾U?ÁUF_kE¢›å"›íšVN±¤_îòi}CÿÞpœ`tU.žþ«w+¹{àû—éš§5½Ãæ–`‹±ã§OBÓ¨‰‰’…æÀý_ÙVa)ÍôZç÷qá„#a’Ao`ž5ɘž9Œ¢\e„Kª ú+¤:¡ùÏ×ZDd‹_¦"Mlßðç|÷:Z?,œY0yåü0d0Ñ ‚&J4öÅ={âpiÔ"Z^ë}ðñ“«ø€h‘}eï}ºÛîÒÄ{˜îIUe4ö?ªŠ÷(øÛš¸j¦ò³—Ì?kñhX9$ú¨·ÎiÖr°ëîç^â]vé‚™j•5…}/¥àxyòa±À¨/Gë­²eºBT¨}«¢˜cy1ïhE¹—¾f[,íÔ>X(5ÅÓªxfv`t`Ìjž¿†˜Ù~À‡„)$¶Õ…]¾sw„9ÑÝ_^®ø7[êÑ™àÔ‹Ö'%ë‘+uéçíHkþQå»ó$¬–J’>°b¤³Uá4ä…¬y,ÑaPŒl$Sÿ’j—æØì2U+º„;ƒÙ„c*8|U÷ €r—;_)š§J¼qÏóÒV’d3› ͈F–¢ÑiPœ°Âï »¬…aÑà?H`²;Cïcv1Ó[SH½«Rá4£ Ã2CR›ÐÓ_4ŸŠ¬ÌWÜX,¬MµàI·Æ‚öïé`ÐÕÅfUZ\¹„²ãź²jo.T·ÎûRš1±f°-Ç5åòÆ5eŸô†;äˆâ‚Êv€o u[ü¼Ô–ú†SD%ˆåQÅéεðqb'U6§ fækå4L¿IË÷¼€Zå¿BZ •ê°”F×zÉýUîðå{ íÛÅÎÁñáöXûï‰ÞéþÃ+s¦äßñȇ5á }†UDÁ  Ïpím瀢D¦ÕXpDä£YNììCúbÜÐ|¢˜<ÜÓÝFãWÑ•ßl•ÆÓÐBú{Q,…,Q­8<ŽïĘáoÒ’Vœ³ÀŽÇÿÕ;é}Ö+z?ôêÞ»^Õ{;«ÄEÝJ×*ú›¥4!&ÎË ]kH5sü&©Z¶ôëq׊¯ÊÉ`Œü‡&}i?¾`£fêðň¥[9Ê®¦tPs¾¼#à~$ÚYT£s[c*Ô%t÷ þÂöë"aæ]=pûÊüÓp­I½vxiïH=&ÿpÙ¾s[M &.Œ‡CKUÇ0j¤4ß°Z³ DŸuˆ½þÉaü${¶4YÀ)†6 9FíâÈ‹Q›š(´Ë0ÝÅŸÁ*›U:Êq§ ±›÷ÿ°øŠ4†åöŠ>Ïeð^>Š °òÙΠ_>BXµ·ç@¹’JÚƒËG+6œV= Êþ2ç²tàYÑËG¸uG+fKÔÞC޼$”2åk®‹;½º'Vü}5wåšêÍÎ}ãwá /bVμº¨Ü<ì&nè¼A š/ü O§jLCËöiubßæ×ÿ/çÒü„·`ù-È)·áç9Ì©˜xó“yLDaoG¶ËMZ]-»ò¢ÁýZ“b´Ø‡$ĸ^egÖÕ?ýðêõ۷δÙC}=òVû ë,ê ¶s«ðÍÀoÙBÿ–çîW&Üâ#5.õ¢ ÞîCýø˜/À–vlvKGÎæòºXP³|#ÿfÎQ»kçãð¼‹òü¾n‹ôÐlR—ÑVÑsWÓl²@޲»Ù™ÿ”½Ïß­†n»;ºÉ‹B»ŽÂLåŠG#ÌÅáN{Aý„˜€²Ẵì›LT󉻇ÙKÄvÉýÉ‘F˜(Á¯œÝÂE’±¤ÿôǃû‰rÑË÷ÄßôÀ‘PEOZþуϒ”Ã,|ÔåÙ~°K½|õ5_k±Ï•¸ÙÜŠå"˜TöÞhÈßíœPi“ æk’aIm™—UÁ¿v4Ht1/JÖeò]ש—¨øZvƒ_m`|Yr…¯$(¡„tr%u/ù¹Xô“7oÞö'ª˜ËkØð\6\š|•_«t2É“—Ó©Dø¶·©ïW® Oɋَ‚ð¼ÞŸ”ú­PoGÖ*zñÌÊÒ ¬X°oêþŠ„9™¸—òÍ–sü}5i Ârù)>¬Óº.¯Ö%µ¦ÂÅ6¢û›~Pˆ¹ nã“€¾ÖQx®ÃæÒ˜ŒÆÀseD5ae}ÑáCÿ­æVâq†àqqÕR— C³Cœù|ÍŠ2äýg‡‰y†ÁY^kÃ"˜÷ÅI¸²ùša¤ÁàJfû®Yô½7EÓÌ ê€Ê¥ÎöOŒÇ€-ëܟܺɟý›9]ÄÚt{P[@7&!>ÇÁæšCx (’ðcúÈ|_ºE`K»ÂŽpCü"tŸ]Ö«BnI€ùniæ‹c.˜Û”¶~þ…굄µ„vßí‡ø-')òx¬óቫSN*W´´«ð¹ãñ=Æ 0ºq’ÏÊq~…Á¢<u290Ø´< àrö1öwS(r ˆ‘Ù¿Ør[WMº…fÏñÜ_œ ½µŸÆ›/µ r\ëýŽWiY¦Û«ýÐWxŠ´HµC+œžð”դ뱛JQœäp¦’$ôõÍó&‚¶m’úáâbߺ†Ä3dëÔ¤óU°™6ÅEЍä(Åù4íM¶z}þçïáCàB»—wió#HCÝCZâõo$ ¨D߆¼W9îþ~fL×ÿýÚKM›ÎÜaTi0ú}~Þx0 :$l šè¡nòó7,Ÿü‡Ùª_†üßÿ÷ô×ø#=Â]‘ÜÒÜ€õꚣJà?O×!áíõ°Gÿº0Ìd¼Å~‹Š±:ÔÆ‚uSÜ]Ñò»ÂGV;Ý& àê‘—ÙáåÒì§&G5´+yÐò¢»­ÃnÕrâ‰éì@6›·ÓW) î`²ß°HÌnº5óÒC‹Õ†°Ú¨Â$§ùªI›ˆœ¯òÊ¢h„g—@{Ox˜·èRka<½éew8ZÛ Ñ_Š{ê燂Ú(?D(F¯Ý¤¾f˜vOßn§÷Xf—èf„›SÝâ·òGúø<0¿—0hI(ÀY‹˜®–e œÔÒ‡µn.RÅsHo.²†_Ì¢àË_iÊÿÅY‹ø—®‚A‹| 'A£‚ DƒHœËzùóîýUË#ˆµ¢’eµ{S³X f䦩vîb²8x=ŒÐMØ—U9¤bÐCZ²'ŒÔÁò§yiH„+Cù0J®C vy Q ¾BíâTlCjòdíL-‘ ÓÉÏ ¥žÑ,£\q\åÀûµÎïß¼{óò[ %vTX€Š;‰Ê&0RØ×Ì÷éZ “8 ƨkÉç»)µ‹ú Cð1±ÔGÿ¯²R“wžóÌù@à¤KÅ&)Ço$½@}}›­r K§SydFÇKÙüÌñŸW´Q憆ôóÇôËcºPLS³0’}Äþù¦®×Ï?ÖÓp›.²~6Ý<¾™ë%<óžêÇu¾n¯äóñ•[o>†F¨põ¼)FÁ~Nyf>cSúÍ¡,z¿Þ…Ó]Â|Ó‰¤Úµ±¸K01Jt°û4}~íaÛêc@²Š,®½{dŒ§'º çåi^} @=é»öŸ ŒeÍ.4¾‚s©¸® €ü=I Ú4+œ0+°˜Õ8ìÎìgòˆë¿!{Cîð=÷!Æ÷ 2ó¡4ëî€6tÁŠä@Ù£ I|ó£Ä"M™Ýö¸¨rüzQ‡p”/í¸B Ê%+¯]B7¼Y±`Rๅ7™eDØò4Ãñõ×/i¤kØT:¹IœúŸÃ¡ÅdVI§äx¬ßs=®éÐyŸ$|øƒ~²ýH!ÿìÐ.o<«Ú¾Ÿ»›¼õבüÃD‡=»…=ó.xøTþ™lÓŸåµçŸ<óü™ƒ‚Ÿsùþš†‡Ÿå>ñ>Ñ«%@øO\"º?•¬\ŒòÀ8q—øGûý0z(_ CñÀçC1\?‚àV ¼3{¬H\ƒ¿Œ µÈRQ!0Š.=ìËð%ãPþW|­9ØtŸúM—C¯8$ü I|¿Eæ’ ¸Yº3²Ô]@„´fýî茺pï» ý¤sÚò?ü¹Sì—7È:%3 Ï°ê?´&;è=†åsKUت#駤9’žÚ*IÊâÄÝç1ŸAzÄ\Ðø–S³\øвc>²ÁaH3Fl·”Gû4ÿbø35¥óÒ¡ˆ‚Yjú6-º»óÁßæ‚¬I¥µYY'÷¦PãC¨žG°v1¶‘ºlHDy© ³˜3ãH\]hõFItm¥± rÃ0ØÌ7’ÖšÌtª×2C[`ËL€!Ñl½/Aif—‰¨H d­›c{R‘LBßÒšÞ÷prO±?%[ñßC(Þ°CEqŠh<þ%@õ¾8gqòËlò¾/dÓOÚDI˜BŽ8À}€'¸ÕÛkt;°Y|‡#³áYp¢ÈÔ¨äø[ªòXbB¨ÞcÇÌz¨Ë{t¶?™²ùè˜lÛjŽÿЦë;¥ýÇB¿<_qÒE‡÷ë€L×{úùÎÆ¬½¹f)Ñ£•¥õýkâL¦¬tcp£$éZ¶êËúÄ0Š É•ëx7« 2=XŽáz•Àå°ÝÿP;À—-&ž8Qæ‰ù\M»3Ï0¦”¼GB•¿Ë¡e³:öšÀL"lêž(Ts‘ùV‹ÁÚîwÀàÙœàá½€¥ÊtUÍ$÷[^좱¹ÀÛôÓk†`ŸóV“Q¥W˜5R~û)«ŠÞ•¯2çß‘ jŠ=äÙØÃÉɉHûà8}œ‡ˆ__9ÎÒÐÛ|ów[ È”]fËkú¶,L˶O߀ï7P&JØ“fh†ù·ô°&щCƒ=¿¶MË g3¤ó¡ã6”&šØÛ©Cf °s"x¡ÇþÍZ Ré9Ä04÷¼Úó†kß°'‘µX5üxì~:lƒY‰#QlY§ï ºPIÅ‘ÉoÚáú:L öˆ¥ìÔ’\ë~’g}—·”–l½™lÑšŸu¶]оqê\FrËÞ·•¤Q·ÝØ®‹ZÞC]l|Mí†+ýÍ÷¯ß½y@õ~ùú§7?¿|÷æç×!f€Õ’’¼2ÉL¥u| IU×6Þq‹Ä}‹7•}>}y‡wŠÑ%|[$NÀÉö>ãÚ&V©åw:Íët–NB—fL4Ò2ÂáØÚd Àh¬*·K“¸ìÛØWhçƒÑMqι€'Y€+fôÚI.}ZqÚÙ¡´1ßh.8bjodë´H ¤h«¿×Cݨ­C!&çé:ùÍ…DÅ""qÐÿ0;ºï¨üã:Ì&¦C 6kœL„>$Äk‡D8¢&MÌâ™Q+FçÉ9»¡õX÷èäÆ;¢…¢¨ìŽþggæÒ¹b3[&qŸcgsœØÑ÷5RÇã‰èIv¢Iç‹7ççžb_è\¹ËÜ ž–QçºMðög§Ûpàym9ƒ«‚ްt›6²ƒ´k„>T_㚯ÃÁ·Ú°9+paHâ¼¢ûÏ+=.£ÁJY±Bìg(ãÓæQvwˆ8î !õšakèLÒä[±Þ/Š*3Ïq \Ûö©ÚÒvÍÄwÔiÊуè`5t)˜GT?mÚë…&hY#ÜÉ‹þ”Yì›/žx£ó|ÆÒH‹SlŽ› “\dø­)q7o›Ômy’*x™Wkð5ð‚þáR;9ÊD[I^Ô´Eš;£UÖ-ƒd€°ERS%Q Ü8ÌØp¶VZ†ä%êWÜûØþ6÷¯G#©¨¨Óµ~Ñ þêêý¦µ9íq‘oÁÉ&KT¡²Pž;Iªm6—e.ÎMEá4A/c‘hWùZïRP¯TiÔgspªÍÝ€u0 mö=ž-¤¥Jв͇a•R™æÛïV‰†’ØÙ9zÂãLúj0M}DÐï´óÄ{ø¥“„zá˜Z¸¤ÇhÿÉ=zÄ—Õ‰÷‚>œJoQz;<Ù¢4}èÉ6.-£õ‚Æè`¥2”¤QÍ[kó¸«*QÈéýmÕrž.´ˆY{©›âð r^Š©OÚyÔumVPïßZ‚f¥´Õã7¼ÞÐý®:¡³©?ü)«ŠKϓӧOïÏF¶hßÏÚód4:¿=½ÚÁùÂŽ4<=ïyËçþ¾üÏ»ù jõã jÈ=üŸÔã/èM1Ü;éPƒ>;;ëÒ€qã3j$¦*ß<;ûï½Ñ•Ú]ØGlõÌ7ÈóQC°xq¼o2Á“Þd•Âm*¾Dì3mZè ®…˜« œˆÄ:$§ÞrNŽJË€Æd,œ.Ž^§~È+­Éž3q(¹[Ú"|¾'ÂÝóq±'»JqîB­}YåüÛïÀúÚS±À³J^þôîÍWo^½yùíÕ«×ß~Û÷I@Q—F¬ñŖҎǤDi8™`…O,êÎaù"«‡¶»?GW>‹Yû…¿é/Štz…ã¥ó¨ª§åf‚0DH£å¼Å2 mW\êõýšF®S ›ÄŸh(eíÂݽ»ÒUò`º’g¬ê¯h›ÆêÉTÐ#A˜y0s&Ñ“<Üͦo5? ROÆfE2'¡>iá#$m†öI'Ö’‡5 $ñ€‹0þRƒýLÌÀ€&« S-Õ 5wÐÕë†ÁúÀ}Kûé"É™×@#¼z¯‘RV¯@Saî=PgA¬ ¦8~³t)“MºÛSNszÚbÍ5Ÿ>Ù‰µº‘«`ÝÛåola¯¥u:u.¶§A€ÇX\ÁÿÎwö† ør‡†ç/™$¡Ú«k¢ìÄF×…nT Å&â£Åð“›Ú|G Cœ°‚da‚-#œŒÁÇ1ÈAø1f¨F×Fø™ÜJ{+ý²­&ˆÕ.Ç;wf|)»ìH‡¼Âù›t&)CGÐ6‘œ¤Ñhè'‹ßƒþ ›Úa«=õýï¤1Ó4óÓ¦¾¼ÂÔi5oln=OSçBÏ7Aá²j ë9'Ýh|8W-RKg>Á7 û9ªª„g2¯ÇÝ.\ç¨[Q3Ùh%-“5&ˆÌÀñ°ÌSE‘QðgN¤ƒ3C¥çåd³£Må!<¼í"]5ÍŒcÍ´Ür;˜ÍÀ·E>U š‚7šœý;}7}þ¨N·/0X˜ ðU“ CÑ6„dË·50lI_;˜¶åó•3Åƺ “4¶Ò€óH~<­ÿÄÕÞæéïu‘ø/ 7—}òb4 ¦6SÙ磩TÌŸí’b’¿Ô¥n´Ô6³áß]E,'´ÎÀÄKpOCÀ…j³œ§›ŠãiÛˆ¹i `Žkا+ÞY <éGÎêÙ$G}%Ù©lô°bÔ·Þj©TpNÈJøÅy*†P§·§t²:ü8Ô@-‰øfæ´ AYšÀ¥•`ʳ¥‰aq鸣³“óÀÆc1‹²_¥ÐÈÅë¼.S’ͯs˜@©#Ž­"v RK~ ò-çÀ<~ø8çO¼¢›4•Éô+XaÃŒm£òð1uó±þ Ñ˜ÄÆ©}ÔôO š3"‡ÍY1ûÁÕ-?±Ý¶¯Ö`vÇW×lÈzê0ÆFëIÔ®¤c槈*ÌÌ2Ñå"ÖøÁ9™ L^—ïÉ~hS R‡É œøFP ÞÀ$Épe^Üš4cñA¾ùY) bòów‚£'‡}­`òóÜç1„ÛÌ rîOo8ˆ¶{ÜFT!“:eóa¬zX Ù²?^m/éŸ3Ä’/|¾†¤ÑžÕŽ{ë;WCó}s®‚í ÑÎ%oDŸô’ÓøÌÍ3Í{ɽÏJzzÞFI³"ѧ¾º¾–½²%¤ y)e1©„—Æ?ˆ7>³³$N`¦SÂἊ³—UEº¬*7W‹ÖUy×K>RZà4N†âwØÅ@¯| ‰H¥AÜ”š á.h®s\“­õü€ñ…†õ´bÈ @ˆS7[Wû´%( 4\à žCØïÀl0ñpŒÐ¶øçT´§*Óú Iˆ °Gn`ï”Î#Ôú ùáüù>« 0fXÉ|azW”mã_¯–Í¢‡µL¶‹Uyca½YQsÕ¤cnZ3ð6~ÌbÓp!Ÿz#ŒÓÀEX~¥üÁ¹ä26L}©Ýp7§6±ÿ„±[‡}R¬;öY‹’§‰(œ…‚rí0Hq™ƒ_±!òÃÊӮ翆X‡øž?ª½Ÿ¯´•ôˇUk ùª]8×´ªŠó·ºäp¦|"éT7Þ02Gp¦$ýÈ'¹L·lŬÕ:e`‡€hRèýƈcÅ 4¸ÓÝGEpi©..^%§¤`ŸÑÿå>9ß i·YgZtB-«lq›yº¡M%ÑÝw ÿ"±ŽñÊ¢dHG;CÒ¶@‚‘¢…L¸´C†ÓAc’Év"aV7efª ãß|ÑO¾)îØe(ÁÙb&$äà{™7G¨:‰9ò"Ãû kΖd‚®„ –â´ ÓÊ mÿ$ôð­6Ä+pHEü†v~Q%¢^¬ãò ‘•.H€òi#ÿ2HÁ%0ø×Âï&ñ¯|¡ÞM 4QÄd áÍVH/¢Ê´¹$wûî{æÑ¬ž䜿¥“â:OCf‘;1¡|†Ââ:ç|£/œ‰ Ÿ¦K_¨³ëÍ|nŒ’»|ÔC4• ky±Íì´ªŠIžzò­›,V”¼h¦åân—¢×ùq9š¿ï÷*©`Øï÷Ïx’Çïzìj“ÂËgÜ ³ë“ ,FÓgÙ%×éÂØŸòU{¤÷G½)(ü1ïØiàï~g4sxg$m—ЦƒlÔ{Òˆ ¶ÈTÍGŸÊþý_¾~Ùã¾äÿ~!G~ý雷ѹà­~€ð¨æÜ¿IÔ1ÍÛ› ;ëÔF_»]v\™ÝvÖQºÛn3ŸÓ ¸&Ú,ûË‘m²KÞ„ˆ·¶meŽ­ÃÆ¥—äN; ÐÕò¯wûÒ¤6r4^’ˆk»Ü°Q@Y%xßš¤X¨¯†Æè\Lq:n"ÊŒ÷J5Âíˆíæ‹âú0ÏïÎc¼£jäd†4œ,!žÎå+©w/ÚˆÅe.¿äÿÆC‡Îð—* ðžvWœì*<útž| Ò›£^BÒí¶Èßž|«¡X†iÁºkòïUÀy “,µü®y`UH)gyÒâyX“ný«)ôY'ïMëÞ|Ñ˽ɲWßôh'èýRf³_ìo%~#$¼ß¤³ÌæK²â)%ÉŸóãÏ£ µ#Æ1Wœ5Ëŧµ”ç¥uø@¸1_Ð ¼àÏÇÿªrZÈXìf‚§–.|⤃#¢6'ˆõ Š&KyÙ$]§HèCÎ!ÞUßÐuoý»‘³*“¦ÐUß^죵èóÝÙñç=ce¾72Ý”.ÿ.½¦ÿq.û:³%Éy-¶ïû×AÊ&kйQÏÓöÀŽÙ×›…’-j¡1@çžû<½j½)Ù¼O-Û,BÆŒ‹ÌNxi/Úõ˜dqIiÝÔwî·ù Û õ>ˆ -u¶¶íª|§N[À1¥.­Ifûmä48SGÑ#‡ó*HŽäÆ‘¸y4Y+p|¸Gí¬×ø©j»*VÛ%º•¹\XèJ9 çÄu:yσ„”œë|ÁžóÀ£Þò23C³F(dœœ I—£uhœQçR<S?ƒcNÍßkXÚy]Ò¸ùz=Ÿ]«äã_ÛµöXµ†ƒÞù 7j1a¢ͬQÓ¾e` l„ŽÆì"0&ò°zß¶`‹ä­§È¤°Ø™«‰íš}SWuÙÈ/ãØ.v,^g=Äù<žQCŸÐÿ?3åv4è%#jþˆîŒèÎèbp‚ûTâçÙÏiùã¢5Û¢pq“+Õ9b_IñÍdÆF¹õö j'DýCîjh`BϘ¾W@t¸ŠØe#–M·…«:…ÖÂËճ᮰B¸Î8ƒºj­‘¶r¢¿æ±˜¹‚%‘U–Mƒ¨3N¶uôÁT;yB|a˜÷ÓéTá[ËÛµÇbøÂe,öœtîÜzÈÖX%b*ê$008"ÙŽ(ràŒí:U.è¢Ïê± Ð±à`M“oBŸ”ô§S¹5yóJƒ²YªÃZÒ"]bÄ Þ#ú_Ñ_‚PUGÇ·ÇGØZŽ—W77Ç´f5iÙàRôŽTäí=âN¬}ºDa¦Èõð>nM‰*Æ$Î`¨·Ñn6UÎFUÌâr%ɰþµžW«u:¾M:=9¤–ã4A¸$Ë)]&Ì]ë›'exà”¼2˜Á›[¶a7阦4ƒñ›68Zbô{§û\ØK³9Ó¦dú»Cõ%VD˩߃+×Å”ŠYŸABT¡<™fŒóI-ŠäRã¹Òs-°õX*÷Éñq2ŠïµpÐYñaòYë#ê¨Ø~ÀRѯü¿i±@¼ŽnÏÀÅÞù˜Å3úˆÅSïà‘Ù€Ժɗһ4©I*ÐÚýôTßÐèbzû'(An<*¬Pf«•„¥¦ W~Ï%û‡(a½E ´á“`ä6NeLi8ÿMay4œÕ’ÀQgA±NN*)»7H¢ª¿3;AM‚ø<+9m*¼ Ÿuz¨ô”-j¿óåÖïÄ¿ÔG“Çîý’É„‹m_æq#Uò¢']s!³è×½ ªÃ°ÄÅœtû¹¥&ü&»ÛÙñeEØrjR{Qv[_JÛIã‚YÆpIÖGð²ÝQL@À.¨ ã±ïuzøš„x¸¦¢XWFj4\aÏãNf}èûÞI+ùòŠÜ™P¬v¶uï¯⦫Nêb;*·™£¹\ƒ†Ï@ÿ’ )ñíú‹+: Ñ*ðƒ\¡BŒÄЍTùXéÞÝž™#í)üfM+lì#67¬¹Zëb«{ˆy·#/µzôðM¯w4ñPÀ»3%;MàŒõ« È‘ æé’4î|í^È®_ïE;àc‡zߘ‚Æ 3ÿJCºµ\V˜ÍöÄÍë7„žQmÔo»ØAØh=³‚Ã"˜˜oV llˆ’8žµ]ÁöÆê?ãæU„ÌÚ'™w‰ÈåÒþäÊm"èö$ŒòI7ÅÄwŸHUyhÓpoNqº³}ÞËÁ4Ñ4è‚'WÝãU³•å®n³¼Ø7F¦|T“Q«²½M ¾xµ±Ã¯²Æ,en©© »®Ôpƒ=©ÛHôY¿ ~¥·B6“~÷[O3ýÏhå5Mp•¶{¢Ï&=ÑÈøÌfmü•êØ‡LPÛljÆ{§[¦6.®d0k0WiŠak3ÖÆxìů±äüïdPK.œDΠçÀ™Âã…ìB‘dïüb3¯L‚“µÕXJœ¦ÎP~¹†{‹C9Ùï Ó¹‹ÞЦ²u«§‹°6$`Pþ z°Ä‘ìTWðÂ]ÁHêzàv4ò;ƒI,+!#•OÂëy”Üey1bõ“³ò&]³H뮚{§¼óZïl6]ÁSŸ±Ò¾gÀG¦Šäšÿé±ygoW¦ >@wè÷ W,!Óiµå1 L3×8i1Xx3”‡PÈqáɲÀY4+3 ›%Å\€CäÅÓ̽&çm#õÀáK×öºÖˆ½Ry'Â¥8¿‹N\ó›{Ä´àu÷”q¼‹UhCgC?§Ç‹“5س¨èBÂ$y2¶î7k;vߦ¶'XhXCPQ¿e( S*ì Ÿái´+(iV‰IiÅkz¡µ,aä0*t’*5‹£²-‡ò$‡_/—Ù´¨"‡ôyŒ?²Üˆ› ›å;4EöX¹AˆH ±/˜ø,Ž£¬Í‰©¡¼šh¯Ñ¾µuè`²*z;\n s± 5_?ÀkžNÕY|_°X¤Ô«r3ƒ »›º²J?„Ô%Ñ‘ؤ½JWZñ1M¾cOa WIcÔ¦øäúE¶šƒÛ›3Û´QñLóÅF<?Bž>:EBˆÙ=ƒ¶b®Zä©§A¦žäP˜wÔ¯i¶Ú½-±0Òî 6Cvîë‡~P©Äé0‹ÍrUâØ‚ô3•ɸ:A€å`Uˆ†ÀkNvÀqPÓ—Ÿkõ§{Ãþœ”—5ÍúŠI èiÉÂ&¶]q ™17•¸„ï Ž[Ó¦I]l Z¦’ë-PÔâvþy‡4•‹{ãG° íÜ>”ýPä+U1A"Õ o;o殇À 2²T«RnãInŒÇ#ù§'\5Böçæù ‡óæ3vã좗œ_4sÆ|ü÷.•?ÿ€Vb´TŸÕy&Š'~òšÌïåâåÈ9ÌEG‘¤™W5:;wõ.Î! 0犫ë<œKØ F|Шô¯On¶Ä7z±Zh©N[fÊžr(ó }úK[ãmm‹¼÷®˜rÄù÷¼é9‹÷W¯=4D!¿¬Z„~ðŸZaL\•údØ¡l[]•+QeL¿á{ÃVV÷²#ü‡J3hDp/=‚áý¼.Ö,|¬Ip^„т諆î]…Ðñ>нAÒ%Ÿ“è¾~Þþ-ÿimûoiÜd˜·KÍ.•$xï—Ž(¥XãkRùž`†ž®ÛXžåz‹p] Ë½Ê~§â‚·;$⦣ýƒ(¼»XÀY3Tª„Ágì´–?ZÎÖ›þ´>ÀÉb©U¥eïÕx!G¢ËM‰¹䨄l‡ee!êa¥ª´tÚB£_$nÿ C6kda°Ðqn*z:M#%¦9áWdO’ôH bÄ¡ß#Æ’£óMU)fu¶j˜â`Ö/†ý ¶Ü^»]Wêa †­Ê•´dF)SÃN™Ö&Q«4d«‚xˆæ+U.§›R#³g 뻋e1PQÊD-k@¶y‰+1tlZ4­ãÃ@íšé¦.@ 6QŽkOn` ¤?l›Í6‹øßõ¯ˆu™¸§YJ_Ã,YæžZŒçj¯ª )Ê÷»«l»á\?ßç‘’ÛOZÝPŠà»ûPg¥^¨_X²] gÛ¯‡Líêô” ^³šÅ ¦oJ‘‹LuŒ@-3 )7âåÃqQ™‘í_´u‘ »(N(eªÏnË€íV´ÓPÓ3E­r üàÔ)5UÒlIÞÑØÒïb)¦Ú$5G°Ÿ|-I §¶:“˜f¯°±'í®/ª§yt¬rúµ{”zÍ,¨jÇu–Þ’ #vYÑ•­Ç¹Í— ’Îmi@«ìö…ÚV5§ÏÂG(®4³ ù¨0¿™U(HzÀ9:VÀq"ÀŸn%äŠÚšŸ`IT0 ~³ôÂCoÒ®¹ÓœÚàú*ûäw>Æ{<Ô(b&Y«·Ùàì>WPièî@fb/É»Ü\— ïaC+¯ÕÁ­è¾æGyû·#øÆÐj‰s,\Åb¾åÏβi¦ÄŠ–åîWÜæ¸0ü«ÿ,´þÆ)ÒAE—Þ1/ úHê3½ÜÇü“ÆÄ±Œ¼·™‹Mÿœª• “W¸UÒ©‘E%U[ä~›Üq‹¹k½äÔ&×kMµ©Ô£Ó™ÕíXkl×Ò!\û‘‡k?ê&ŸðuÓGðVÞ61r¤jX9pÛ£!<¤ÖED@öÖƒÛú°Ö_³!Æ\ñ=DûL€ ‘F¥©lüŒØð‡ýúˆ+ÕM{p>ôþ „;𼎰ǖWÌé¨3sqH|õÆÅ½}öàq5ÚšÝV#?=§ªcÓX^5·¨>O}L·*Xë¾­’ùÓ¯{ÉQøMGŒ¼†x¤Ø÷t»\ìDûñ#©QµôÙgÖi›õT'°Ãü«¢ñEŸÅ\O=©¶—t¨ D#rd²'‰qƒþ`tæþÑä;òS•§bXÃMŸŸW$l^-uùäÌ—žÖ2þãRnèÛIx|üä¬ñÒ„ûiZx7ƒ1A¦üeØýÌ>]);ó¼Ûãö‚]j÷§Ó£äSÊ}Õu»;¯¼r°Öá­FËßIžr•ä0d©¥ü€…ÉN‚ø7$çç·É‰l9IM˾¿ÞZq5užœ$?¿þéíúõiÿŒÎñÓóÓç³teק׃Ùu7‘hx2xz2Ù³_nÞÓVó·~L3c~A"ñ%äûË‚ýoTõ«b½À‚áų³Ôdu€瑩×Ï?¾»»ëkFÝ–êìgÓÍcùûñ¤„]®j,ØCÒêò½p’˜2HüZKøi+>ú¸â§ýÁÁÂÏúÏž Ÿ>;^<ÍNüGŸ=ðب:¸=9}v1èA·^ö¬4jxþÄ·k¨?ô%ÑC£ßóÐéïyèì÷<´}cÎNG£ó‹Á“³gÏèá äÃo{°Þ“a8ŒF§ƒÑÙ“Sº'Aï>ô¹:«‚¢ͤ èù‡ýüóÏ¿Öbh†=ë$Ï›ünÜй´iÍ’¬,¥áL޹$%šIéTI/D…†n¡‘"€§!aOvÓÃ5¾%Ô3¡ì·µ1xvßs´½Ñ"òtdMaOž‚d.yãAîUõëÉ;]dGRN_sä«‹ÿ8iD.@Wê"¼PôDhöEÓ¥«„i O°éÁè;Ùñ•­[û@B† Ð:™ÃÚ†"³žÁ:ƒð$‹dÊYɽ…d¥"F1o”Mê*óƒu¤ n[2 #÷±dõ5³”؄Dv(ï SÊã°d:¶õ2]çS…ÎkU ÄÂî©ÒŠ\Sí³\ŽËæGBäíìÿþö½!¹Wï+~½Ül±³ë}Z"ï«Iã!¶W¥TÀFçj»¼._ÁÔü=Ó õ‹'’ÁÇãÉ %Ôôo~x’W¬¦‘ÿ·czÔ ™Jß1}*ôëH—j}ƒ¶Â, `þáU,KðXzNH$e Ü2b KcÙï˜ûÞñ©íOdI%¤MÁ‘©çcàívùê¦(ªˆŽ‚ºthŒñòg+f‚pŽGa•Ž&ùû\ŒÈΆ´Èß ¹h9ÂoÊZ®DJ•Aö1MÊ;ÖYRÑ{•– ÂÖlxE(5˜Ø>1ÉÖ–%ÈkÇ/:^ÜBö»\u@°¹"KNµ”U¾‚«·Škâ^òlïñ¾û.ð¹ØÏ'‰ Có”ˆPù`³ òœp¹¨Ç׺âî$äÆÏ'jå¶Z¨Ä„Ç"ª'nú,Y¾g†»Îª™‘rtt´Ly2€Ý‡ Ñ¥¸Lô·Ä?†QÔкiãyO;@ÿãDÅåPLöÞ¦Œ—Ô|LrIºñe§õÜsÈVçÉè¢ùQø1)+9NòÝ»ó>|ñSºKCÝ©IEÅï4öýñ-HyÍ$iÆ´L…¥¹#»ý>[äë+ÛHÿÚíýÒá.Z‚ éA—RËg òÎÈèËty=MŸË\äWÖ”½¨96†oàÏà9à× —dö\"f`P¢ÍLÉ@xucî]ƒhž\H…²_HÒç2f§{ØÖ¶õ¦v3Û¼´ßeYcyº/tã °y‡‘²m)^u7ý{vñu.¡.˜¶u}=#Û¿&ÉB)<Ò¢ÁÐ4§(¯æîó¨–2æbWkÎÙ |+lÕçpÿI$OûÔªŽGŸšËµH%Ôh.ÿéôò)î˜V4¯›S°GMãEcz¸oov/²Ø˜óÍ»Ë`í²ÙÃ^bnÂ;/rûM_çXqÏÏMœ¥qìÙ|?¡¢@ÝibüØJ >SwBž ./\|#hàÁwÜ»¥³v÷â8õÌgŸ¡ÔI‚ý`„@M骘¹Ó“Ýfø7pº=_^þgçôòÒmw——ØíòËËívÏlp‰¥-ÿŒ./×9ýúß㞦¨k-ù‹!JLQñp`°˜+6‚eŽ Äøymñ™[“†ÚÏÿluÄoH,/ó̪ý¡¡Ì2¢‡@ "'*tÆ´XÊ…VW¶ñþ´ dà:}@“Œ"º×ãsê0J_*å%BêÃ-£Íb¡°tÅx\¥”AŽz™_o4sŸw0¢ÞQÎd¨ ÏIÿ2Zvï‚PaÓÙŒ‚*E­áÀ`IPÈRÄvHJ™ÃŸ2›)Eül–MˆùÑ;yÒÏRŸãöÓ÷_kÀÜóÍ‹Ï>Ó›‹üt_ýä%k@wÂëÎû#vã•Û5s…­©(§~ øÜ•);öƒè‚%œWÔ¡gcÎy Fc#òл'598Xõ ÉXõ¿{EuüÄU˜Wæ]Cj}«£&Ê^íb ÓGÕ½|õuëðÓþ)>˜¼âªÆ¡ÚþýîUæÓ—7 GTEôy{>Ì? ÙnO`Å9MNÏ®óZÈR™Á‘ˆO“ÓQ‚ë9P'à'bÇ+ŠìŽ:Þ7Â-â õŠtbn¥`ʬRV‚«Œ–³9PÓ¨¾W_ÃôŠ=ŸÖ|0‚4»³tp:lV9œeÊ*B‹  Ÿ’ƒY¾]¥ëJPUÄ&°V""­o•ÕœC$O4Ëž‡¶[¤U €V[QÎÿVܬ—Ö·×)ÍÉÊ_¨&Ãa= ¹%½Ã9 -ŸÂ1]D‡äN rwàÃŒ;7R~HüÚUè¦Ì‘u“©šæjçåšSÑìAH´…Ñ&AŽMs±ñÞKTí)VšEÈ ª3”Æ;Ÿ¼ûètµWúñ1‡¾o„{I‰;ÿ@1.±—.Ή8*á ºÏƒ»üB†!,û4AnÓ9$‡®Ñ3WAפ!réžêÛk—þëtAU@#/W•Œ͹Rª5*7ŠeCn:•â<ŒqìL^YFŒ\lÅ÷…$d£ŽŽ>`|'!ÌÓ:]VN1‹Â8ÁI ”@®uÃØ¾È臮–$Eë/ŽÈª'Ùó练ö}BÔC—nn.¹ÎËm£Ä$½‚Ó3(Õ¢ñ*µw6ñmÒ=ÄpÚ!n'fÕÒ$føšdÞä›b:Ÿ¯N¾ÙÜ/2‰’{•.&ùf™ˆÐ¡¯‰maöf…½âÁ¡yŸmi“ Ø‹L'½`ˆÅ+²ßÌ¢MJ¢Hf]0 n?AÙöùÅoÓÛŒÝúýŠ~»ªióûÏšÑ]’˜a…:㶉ÛrXäYËXz+F0ˆ•ÙÒ27×Ó¼ä(ðm/›Z"NÞÝ(m9.=®—ëhÞ‘w´Usä¦VmØÖÇUŽÍÚÔrÝÿó<Ÿ~Þÿ3x ?Oèñ•™K‹ðóñS­Iº°Šr޾‘| ƒr±Þœ+n:N? É­ìí^X>Kœê„ã›ÓÀfå»|àŸ0m¸ïsà è:tç¬XLÔ”ûSyÇ9Â¥œdís¹zìÞO=óªÐÛë!ACª”JºŽl—înµÅ‘dòÚÏÒZk*ž¾I§QgÆ]†¶:!=;ÊWýê&‘ùÇê\%:T\1ÞØ:•)X³Üy²Øv£·ìñ§ïzÔéøø¯©³h Þøbå29™¡ýµ }šÎàäsí_—aß QŠôûÇÉŸè.«mÈEòo³ðRþbÌWþmv”üW‚àòQõ¸ŒÚ/û——_'¿_^véÏþñãËËáãËGãÝjó¨ZZN0Åÿý´èßrj¤•° }ת~1O¤6üßrjù%w“äd1Ž‹Ê‹è×ýøµQ/IMŸï): þšºQ‘K4Y~ùùòiW&‰+0Ɇ…: dO•LX¢Übd¥³ðCÞ<ÿÿÖh†›bÒÿ¦˜È›ÆIû¬õ1×)‹×Ù$U:sŽMF¶·æ•s¤¶è³=ÆÛÀ=ç{”ú4ßaE Ø„D€Šz¡Rƒ†lëd‘Ýf —.Äûšª»N¢®2ÒHh)UàÜæv ŽeÛ£Á©ó§äÓ¼XJ ùC]]>r9 ¢`½å¬1e\/6ì|R‰‹O8X5ÈÃ.SSð¼öDÝštÐmzGL*ÅjÔp\}ƒfåÀ¯ULäû-Ú´èyVGH?ÃÓ“‚¬)p…UÄýQB5N™Í’u ·OË Àª\IU£ì– ‹I›ãО3™}‡~íu“Ç}”«¥¦K4åŒî†Þþóøq€·(hÓ>]DNà—GðI,V­ûÙmç„gG]W·‰ÜO÷”'™ôÓ‚fÎg4ƒx.ÉÇé“|_ޝ x¡UTx¿ý;‰„£Þ©ö n3æAØËb1‘@qp*·ÈvZ†§w{ÉÚVùËð×¶§ûW¿Œ~m<ÞáDæW:F0ÀÕ·×0h«aÐV}}Ce æP›^ÇãC5J¬øjg ´ÏFë¸Y£ß#nÀðv¦ãyU‚’`Øú½Bv‰^IôNvÔf{d]nÕ™êWo*ñ"Ú a6ßõ&_Ô'ˆQ/ÒŒ–þ;—2ʽ:¯³åÕU'‚]ö¢ “Áÿ¿>×á²}×Âèm;Šø)QöºAƒlTw¶é}†5Ç¢ç”g9G Ê`O‡HÄ=ÊA.K:ÞN»t2&N›ˆ×ûE°³ýã>Œx_4WXZ¹ÏÁl2¨‹qwÛ©ÿF'اŽäLÕ$ǘ¦AZ1M’þ¼ï®™r1¨/9–þïܱw^®´©ÛÐþóò¤žGχ=¬†;ÚŸøWðÒѧÿU& sMÏ#zÌmÃÁZ%­ß;‡-›;ªn÷eó~ó‡ßŒ:bæ+‡Õ̳P×¨Ï À^ÁhЕ¤ˆ‘v¹Yd:Ü¿kDƒÑI9Ž î»‡wÝÇS£óKG|0í\Gmšñ|¶g–\S±_~=Ú}ͺíÍL§þò3»ôëâJ('äVK(Ì­0t/‘xîJïÞµº%±üaÎnÉŠ9¾”ѲÉT•¯4_B_l'Éû¢KÿÆk|ŸmÚ.|׿õïá®Êâîø·_“p#ò¼PŽjŠ‹­¨¾™%tÉ–P™ÎY/Ê`_öñ¼õì2 GVÙmðžîã¦b#Z@ðƒäZc„*ÅúƒÍ[U­‘0‡WÔ9¸@G²„6!Íyjp¦˜+Œ¥ºÁÆ-X*ô”]ŒeÆ>¹Â>ÆÌñ·ñqðÛL'@@¾M˜Z¢N[­¦a±ýÓòð‹dH:ÜhŠäŒ ÛɆ°ÕÍñ œ÷uçuŸ”h‰,S-‚%9±òI¶=„zñ¥$"f!rºÚø›X3WÓ8qª&ÄÛ«1ør~àQ*5æUa‡:­€¦nÈØiò—0™ž‰Ý¥î¾ÂÍ›ÛÓ^™³i\ßÐ ×°Oks Æ®V¿L×›r-'§Õ;ׯ]*,S0º9';&L皪6ë¬ÔLOCÜ„äÇr–FÏ2D•3¤á.u„`Ó¾¬GÀíPµÊÕNfŽ:ŸÇèØXÿ&‚MTr +£Pµe J´€3¡;2qn™Ã’eí_ á.R^+XÞÄE—.ál?ìœvê µnB5ÙõM˜kܳ €Ý¶y‚ç$ú}ë{©ÇœçjEråé)î<ñæÕì#t)x±Šæ› ÖÛ|îÈ£ÖÒB©ìäÅNм±X¿E½$æk4¦ÁžÈŠIÕ|v:`ûuÅaÉnÕ¡]ànàUù¤ü±«—ë`eÎeÕîuQIª;ÆÎÅâ¶FÖ-µ(Š÷¡âñútWIqMZ“ÀÅžvO}![jºòÃËt¾Êëcd×C•Í[F0.+qFhº6M¹j3ŸÏXmöØBL•ˆiMõF÷O nO1×õùÀÕF{› oad°Ö°lñcú3Ÿ·l·ÉMN:¿Ÿ6ÍɉÒv¡3{½é'_¤•€*ô’yA*<};x¤CAˆ k×%QÄZÜ0ñX:ˆî¬ÔÇÔD¯ ø068~ZŸ»|„æšÆÌÇrH_)3dA2Ï ^D«°å¢’½Øˆ~ÅH«‹$2„õS˜&V h¬!.ø²Ïž*¼hž´GÑGŸz$d]ØoݪXèsÿ×ùû¬²x c’q˜j‘u“]²´:ÿÃià•¨’å ¸€ Ê)òñ—! ýA}¾t‘W ü•—¦Ò8…kÔ8q‡2À¡}kØt ÃÝòÕ¶yP+_9¤dÍp$i×":hØ›~Ø~•#lŒ'ð:ƒ€D­T"4󬛇­—Ê|€›d+¦kÔÒ*Ž=c£þ4ÅʧV†ñ†»ª…: S³›*W•¬Z.Å Ÿ::y7u»ÆY(Ó4éÌói·¹¬\`‘ô¢må+^îX4ijsA=’<}ÅAjð¤ÚJ´M”äÚÝu!¹.o»ÅiU9Ǭ…4±¿BH¡üœÜ€ÌŒSÕÂh<å9³6¼gð*^ôZŠ‘°´Þ¿fŽ×Ξuèuõ%JšZ.b`ï`yX§ID‘6SX’‰æº®]j aWšÁ ¸ üF†½-Œ[…qÆKíHUâõªèª²£®Š“b½3£Öãµð®º!q DïåLÇrµ G¿º™9qr«2è*T›Ä7IÀšçætGžœ±µÓÑqï°v/]‡—a)Î ³8ÌØ|̧´w‡b)òý ²ùmá@jî„i¦š‰F“øÞ™•©žÕ<¼Y~tîJ@*`*m‚¬F¨¬;=Kàí†êž†Õ‰ ‚„@_Ði²bÙDÑ»|ý³a/!µ™'xÍt’›ÚˆãB#ÇžÀV¨Z-$a‰Ê‚Þä°,"N^§|“/˜s:~Ñß°¬ß¬öxKÍ[qÊS£9…tcGÁˆlQÄ©»Õ‡^)³IÆ6|í.Ú}àz¾|k$g´BUÐäÃ0ô =a“3ÿ»bìC×­ÅFÅÍVâPüîdÉÃ1+&âo``™Åêk" l>ƒbS(ÀÖ)³!š#—bûžE”? %õÂ4 T,ËcWùð¹šDoŠìŸøaMs&y|çAõ±Ñž7"ÛëÜqÛ³—zd¹¬u V}Æ+åP–buòÝo‚÷;É­òÝVô´í,ºÓÁRh·AmðѨØí}%[ag¥XøL áù4®›Áȳž”ÖûF6’@{!"«ƒçP¦p¾¡³V"°¡­civJâRqÎ\s™µ|]ÞzmX#‘˜áš‘4@uíÕyGâJ×ë, ZÜWµèûÞ2ϲF)ƒ”õC–#âuåü—Έ–λÌâ•ÖÅ8êKl§ èn飡 g¯f£wlÕÈNX†öjBå û+R òÕøÃ×-•~ðd§¹4‚ü*%Û\(‡2ëX‘¢1¦¾Çé?<’Ü,̉ˆ„WÃlMíZOúùt<ΣM%ÒŸLÂ2ù ò«ûžpñ²ØVÚëéGÇôØXžõ‚¢ßa”Í4üJõi;ƒõ2­•y†ÛŠ@«ªIÖÌÐöÓëÿ÷/o~zý¶Ùm[N¶2™Ëy²µé¶ËI9^w3”° âC,%¦š‚Ѩ.ÆÑ‡é ¦f (?„ÒŽh"Éâel‹hì¨úezŸ/á|‹üˆiƒ>ŸÚù ’¥çÖi8_4Ÿ%O쟤ÙÄC×*•Iå•Îf_õñ˜}E^Ÿ2[A`ÚSûGC&g•ðžŸc7C%ŸÔ4‹Llƒo1ƒ4j4£ˆD«h’3;ÎwY‹Fx“-ÖÁ~Ç¡ö]îv•ÆãzáEʤ_xºœ¼<{‘2e6WL)–ËÍ*7²kM¡i®M¾äÏrPûö ‰n]»0nÈBøÙã„/è M7à ÿ}7)!éRΠù&«Ô2o2¶ |mDg³J¾0ðP¼ÇMa‹ ² ЭÅõm.h¨Í9À›f·¸ÎÄ„'r5O*›æ¡)1§Œ›âýF­²¹gÅKªª\Ø GúrÉÑ^’!óùÍuÁ™Ô6ÏØ ¿À¼ãÔ'%.Ÿ6Æ!VŠEƒ…š¥‰ÌaŸŸv!fÞ™Ö#O7™7°×mÇtC^ š#Ž”ýs…”Þ©+gÒýPí{'§PK Ä:¤®$¤fvÁ~Xj Ôɺ÷fU•—ÙwQ;HJúl:w™­ÍÀz£*ÈÌÂ1Õ{8/þfbV,\¹ûQ³T¢‚ãI%oHõLuwÎÀŒL¼&-¤Fg/Zì¯öÀ›}ߢñ¸™"_«¥½Ïm§åӮ׌$݉fá$ Üe±zy-6s'È¥îH¼ÞÌ…¼-ÓÍ•@› »ob¢ 1™2Ú¾SV“M¥¨êj oÀ`Ú”®'Ü•²B4-Ê|„#~ Ð'³O^VW^kpèõ ??¸ qOô2ÙƒÈvnÿ¢dØñÒÈd$E%0ÿ{JÌ%ñ¸ÿÕ–Çoøí½bq¤_$@óÈBä›ÍÉÕɺXä“­Yðy¦ÆJ‹úpiÇ 8¶äì ^"š—Àᇦj*9ï7$IãqfïJtÔÒ§‹làVÎZ°À š…®žÎ¿àke”çtÀ¢ ël—8U%W E-Õì½—™ƒ˜åÀ×êDi-᫼³¢õÁ°:"œÅ¶³Õ'ÔRL7 ›¡rˆTŒÐQLîì@Ç¢æžuª >Ú#PJ¼áVLôš]ÒÐâR"©É’ìJÿ™à0že6gl‚…J¿:˜%×jÈýS½Eªn§;´ÄJ!‹Œ®ÂM©õºož-¼'x ÇJÈ@«©mH›]£f==nØ–Äö®7—Œ Æ.¶¨³µKǘ´ÙR+<½è¤Îvº°\ÒS5<âêbë öeO´Ï¥É,»ÃÞ#ž²´9¶ìæHY ‘€XD_³Öè#±ï `F½’þ $”‡äÕ䊽gÓ0&}°¨ùÁ½²ƒAÊ|*»^r2ì%Ãþ´äÍ ?O4ÆAQtzߤÎ&'éŒtºQ…ܪ²gž­žÙš†›-uh–È #«¨å9³Ž4ì?ÁúÏw+5’N?ºL¡ëú§K(­,ŽS:©p[±Ñðd(¦šØì¹»Éˆ?SÖ°O&¥§g»ÛÏŽeRTDÄ&ËÊ-Ü»Œ}é2žÙá64½H‰4Gç3¡1ñ’m’™Ë\Øõµ4ù#N )÷hu-7‹µÌ'­GâÒf…ØÇbåée!äÕæId…%‹äÏoņ]wYÇWÑ5SçNÌËBÖ‹g;æÏ‚¿î#ä÷O|{z玼~Ö¶Öð4{Chq¿¥ß;ƒþyw·Øj¤ý¢ƒ¿{f„ zEÓ ãîËàzûpA™;ÀÓioo_´ÄmUð}–@ùvCÍ0¢Wé1PÉ™ô­sÃDß[6;² 87\ؽ®ÒÀC_þ÷ÊÅ=ÇV™/DðæW›t‰´±#ÝEº£Ï¸Q„]á”9§-ý—j.¾…À«FÊ4´l]¶P‡#±jìW;–œ˜ªfݦ:ð¸0¼}"k:r`‡©Oè[¾Ì&9°io$ç—ë ‹½ý¸÷ßÑNsEûò•hi;  îÒ•Â|ÓT:¥xáM'±•[Õ}|~Ù©²+©y ‡0ó2´¶ñòPkåf4¸të2ýÝy9œÛÂê£ 0OTƒkT÷7ÍocÛ²W!´Œ’jÛá û’ãM0/óGLõü3•GÃå[ÕS!‚hšž6+Þ“_ˆƒÿÙ)Ãû[f;ðauœ¸ë¾¡Ïè tгÿ‘†úžAÏ×^¸v›Md/ͧ·PH:—>'ŸÎ‰ÐjkšStUn¨§ÅF%B–mÆVÜãá×¼LV°ÄpÖ[,œû?„ž¼O†«Þp…_F«ÞHˆ†Éçüï¸)¾„[„™“Ùž0[ÐTÃóÄÊ ÌbË.ŠI:cã¢Z0՘̗h[e[³¡ÒÀK•ãà%n-ŽŠg–zØ|»Y5·–^ iR6š±fV”¹F+ؤ,"ýI»¸«ä-D}¢ñMÑ@HJÉ[Ú9w{!ð¯Iâ‹«_%ŒØªT³B«CcB Â=+Ä'OµíÒ$Q¸qhâÔê}@9HÆ“¤ œ:Êà{@TÊŨB¹ÝÌdÓ«G1kcK–¡_º° c¿Oç´¿aüñq3ù9k >ø&MŽŽñÖã£^hô†=Ú0F÷ãX„xJ]º°¡ëÈúfU†~ÍJŽÅ÷ Í`›¤‹8“ê; x«I<}4I <ùÞE}øQéoËŠ«ã/©ÁP²èEã>6³}]/á¬B#{îUMU2¸! EÈ@¨r#Õk×ٺÚȶ~Vë—™Æ%)i ¥Ä#ó>ÄaíÔvÎètOH7õÛ’¾Ì×ÃÙÕÒVDFno0`úø•.dS "»c¿—£Cmœa‹%#6mGŒ¼.}ÎoLë yÕè’ŠV|Zþ @Âã"ùÍÏë<º¹ ãûÐ]WÚµFõèQãèûÄ[f[»wwbÕ6ê’Üäྂ(|büÓÕóä†s9x¡pv (@Ìx/ë§%%ø†°´n>ä`µ:”Ak‘tHæ±G} Djó•õ®gG ,éã@âµ@ß’Ë#øo!ÿä½$“‹S¾y5½ òøp„HÿVfæq)£Ò'³©j3œ–­áó5"Ëh:y¤¦Â…ð°ÆïÓƒ…Ž>ðÙÿá ãVÉ+EFæžæÌ¥9´êa‹²«M‚¨ñƈ'øì" ñ8—Ï[²ß$K<ÛˆÎ7Nå˜ÉûPIÖf1ӇɗysQæÃ³èÀÚµBú$,ÞÆº¡A"Û³¢‘4û÷è»Ï9Wo]ŸNÙx)×Z©\0‡í'š ?ÊXâ¥ìQ!R¬ʃÞG+Zšm¹Kƒ]îxzÌ3òøÛã0ˆ:¦]U‚4Ú‰OxCæ;……[ ár±Ó ïàÃ=ÑJ‡`a_ 2†3®ò9­¬…ß²ý†¼àE¯ãiž.ÃFõËŒNüÌá™S3s1,'ÕÖ¨òï@xs=,±ÂòÁgÉXj$Õ ÞSo¯$ýæ}®Ë¡bGêÿaï]»Û6Ò5ÑïçW`”eR¡h’ºYNœµÛI4ãØY–“Þsâ "A 1I°R—îÕóÛO=ï¥ê-¤”tºÏÙ³F{w,…B¡®ïõyÁ…÷ÅìQéÔ,BÂgÔRCÔã34rt?Åüv&£ˆë¡>ÍæWn|ót^Áa)V´DoÉœèèêÚ·rbÓ”$.¦åˆ®=ÅoÚTèÂæF!Í‘*L=¨&QbýîEþ©T|b®RÈš‰¦Ë×ÝIî•eÜﬖÐh#ŸîÄË–§´ìÑÈùΊÔÓoFíp§f ‚ýTòµ"®ÂÀFÈ ÉÞ×k¯À5ßl\l*Ô1Ófæ{µ©ÝdQc Ó†ÒIXÛ“eÙ°áëUéNöŠKs$óMÖa{2k†a¢êºQÊ ¼bÀ©sŽsTcí& Ÿ@"‡ŒÏô“¡ß²ßE$¾´Š¢ý)äQ³á”§êÐÍ’${NëKâö9ƒ”zš„^ X/VO•ËûÄ£NHƒ¥ C®há-՘υ€r®E^bIncµy¶lc”ª ·Ex÷ Õükíu r#(¤¶™=*©Qùíæ&Tâ×棆È´ÂÂyµÜåÏ@Ø–ë ûr}1†DÝ’ç+¼÷ê¡°õ¦óÔÉj£<À€ÁöK9•ðPšÁd(]>ðý¨ÈµØFúO à ¨OK]u4®ÔÏÒ{cäáýÝgmÖ4#®#¶P¥ÞÐPwͨñc—ÃüÃOçLîøZj€84& (뎥€Ñ”+'˜FGÀ6CŒq\;ál"úX&ÜÛ qôRÝQ+EwiZŽúÙîœ)éĶ´fC³s]S¯ Ó¤~» ­Èƒ6³·@"<@ýåzNØWøÝ@J°Y”œY•&Dæ§1'º1Æ,â ,Ó=†EÍ‘ˆæj÷Š¾áª“Üu’ûɲ;ù÷f•«iÖ®mÚlN!ÙL Ü7ÀùZxˆèžŠjɽ²nw#)¥XÒˆ¹%™/ªìòOã®JËIW»7µCj¯wGy9šfNÑïuúñ‰›š­ýøZÕ"dÏú›µ£§¤ètø~ÏýÜGÄ;þãÙÓƒÝëî«×ßµ£>0ÜOBüDõp“bÎ'ýiâ~jP†Ž:íXñÝ|&…‘YÉÄ·#ƒnõêæs·ÔµD‹æÐ6;‡2ĵґŞÊ$Öx5¸––“r€øY!9𦗙„Jò–˜Ï½IE9S,™Ö„|·VA¿Éac¬’¿ÅL Adî<ê7¡¹ƒ`˜Ï‡DY;æh0匄n=Îòó—kÔu½“¡-IŒUã€ÏÕŽQXHõXS¹¦H÷˜¸­nÅGº†µZQ™ÖÿE8óc\‡Sƨª6lÑô”1 àÏ*<òîN rÍqÕdàêwœHJÕìõ›Ú•s»zÔ“Z¯S«,¥fÑk¨è±îæ ûZ8Þ£Šý·Ž-ólp["(¯sÌá eôJ¶;Æ”²5ˆýA6#1Q±Ö‰51ªºþŒoÊ–otvœØ1[,w:;²WïlÕ±ªÀ–©ÑòŒñpùg¾cWyGŠ9Y(7 õ±±}ñHªÎcȃ­^ Øîoò«tiÒXmå˜a* ¸~$;I‚ùBè">ûP$ %((W¤¾¸ë뻟Î"ƒ†“(P’"¥1æúû¸‰w¦,F†>iµ“¿{Î1dpí €ŸP^ìt’ÿè'ÿØê0E„êœâR`\¯߈“Ö$yQ{S [®AÉ›€›t‘àcÖØ‘‚ 3aO:Q˜—€ÄÒ^xZ½,+Î|q°òh.T7„èø’ ¬oT+WG܆Å=› DÚ'%˜:Á§Æ«š†‡²²å} Ò”­’ª×2[I^hh 3¶f@îlñd©ÛŠº²Ì€“YŸ Ç ÕeY¤ãQ*žöã&0ÜQ(„0ª1¨à`¨™¼£rlJ®•[Ÿ6¯Étz ¥ò*Š!M‚‡JÜIº—**ÝOࣲ|Ã&¿toëÎɺÇ×¼Zs‚M…’lò1ÓLŠô­ãUà0K=:n8²ÙÌ÷†Ã›K·*x"8½#Ü»UWû™Å<ÂPÍÄÝ욀!üéÑ(~µÍñk{ýf“ØŸÀ¯w«¾&Û<Î¥8·ÝÍ臡Õú߯|_Ojý†åÿB†äï¤#¾Û ú,B™ÖŽrñ¹íØ¿Q‹²mqBÂîcÁ±ñ¹J¥:IÃ%]i5Êsª6iá¿/`t´åÐç×xrtoröAÀ|£å‹âqvzLGDðê–.- ŽÿCvØ;š4òÂ([Á^Ý#‰QŸ ¹wdô‰¢/ÏßÓõsÎ2ôNÉꟲtÄh…½Ømü"ó@?õ„Z5ù¼ÕëÌ£J¥³ÂϦgtt^£!‡Bóŵ³R„äën(ÙÚù».¢ì´ki¦Ø6‹¤R[ k¨ ,a©×‡zyžÉÉð„Ÿ‰©o^øzÜ@úŠ4d+ªC©çülú=ÄXŠ8&î¾ UJÚ;ï{ÝäÜ_Z«S¨¹²‰“Ê̤bq¦n¶C¨ÎÝ›Ur[æË,\SrŠ?3#ϙ꽿Ÿ0øAÖ•1$á5aͲ!Æ$$§Ù>°½?Íw¼99º ^Í:>©VO,LR½/•| ã1¿y!êзVOê c^(­gÓÜ»sá3é܈ °ÊŽˆ[4‹\³yòjê”, 0‡“|UfLé[ÅS›†‘€‡ ‰ã÷ï^²òÙ¾F\s /_l£$ÎW#®ùÏVˆ~œà#µ¨=8"ÈÅnr:¯…ïøì)êaÎA_ ˆž×« »Ûa“bRõ¸P£¬Çp‰äl1yÀWùö@búâ}‹·[ÍFS¨i]‹,Hç6?=@fÌÁ1³’j+s•hþÁIJi[y×í²¹ø} ÞvíCN3‚,تÜzl|ˆº Õ…ŠèéH«‘ÂuóqÀr×:†¥gîYÿ¢zOª-Z’v€M˜EË ›)‹7Üêu iOÿQíAÚƒÉúÚÔðÞ^í½Wm|·] œdQÉžÇ×-„¾Lk§Ì®Ñ20“î<ÖT¨]ÔõÕ´ëy$àI9ç×_¦»~¶«Ëç3ÄÝR’ݶSܾ¤«2[(æôßçý½ùàî,ÃŽ+ML ò0æW¤›' ÞhÉ9 „S¾5ïp0NVníÆp š6_8ý{. Ïö¦AøzÒ %§&‰Z]X=:ó+sžœ¡U)g¾Ë²s‡×ô¯ãiûÌCXÃ}W,MÞ¿ÚH¾­'òu‹»_µb€;°ïá°vqõwúøê²t™†›7Ñx"HA‹CzÁZbKÏpÅ]lëŠIäpíe±¸gÔydÞÂ_±¸—áb¦¾yâ³#¸¾?·óõ®\áûë—Ѭ¸:"NÄå.µ¶õ‹ë§yýÚIžŒí`ÜL üе‹{w¿#ïïRÅCÉ­A·R8Úמ^#å«KE Pú£[(¼C²šúþ7¡‰Ð}÷î0ǹ¤ØZF²qÒ²±ÌÉ;Dƒ…qY€"„C6´ð6&»À‡C:ºg»SSaE-Vp’“€q? Èñ¯+¥+'H¶¹ñº˜ŽÅS,QÁFKÁž@%»0‚50VIÔN­N¾ÀßTx¨ àr²œìG‰° Üíz'ÔIƒP9[ÒýmqF‹•a9g§2„ˆ:Í yÅ”pGN)¸›(žå¹2v\¤Ó[`³ºi7%qÙT#¶:qÎW—޹ʧˆ&…ÉÁAT³EQå‰.ñŸlÌ#G&#rЯ½®É“uãë£el°Tº‘iFAŒxeZ¡UÉ™HÁ”ü’žO‰/¶rÊ3l[?¬4_£ŠÒm6ÝïÝqÍå{ˆák‚Wn¶èAÞì÷("” cÅ”*SÊÈ­.k`‡”Œ«@,Œç?ÎM‰üQl§7»¾\òÔ³­<G2_pËN u#•åN#?Ù5Ö7Ñ8NqoÛtêÿ #÷©¥øPþ!w³ÜM¦ï!A?¢~[£ÜvϦLFÁÃ%:d£Û^n}ƒÛ´úØGþ¤þ\ék ¹R˜˜z¾Ý$XÞËì$ŽBX‹ctÊ%Ź—±‡–^©2mʼ³FÙ °‰î÷‘ J¥[4ÕÈ5%5´«ùËOÝ rÅùH»T\R)¢Æ³íÊÌfPxžÊ6p,X2{6?ZÏ©‹}Ž•tb¯dŸœ/Z]ç¢B˜LÈþ$ûõ|;hø-î8”,@¡¥%]϶iÇÉ€Mz¾ë/áåÕwæ<ÝÛ¢çPFm!9»¨Bpÿ<ƒÜ¡çP‚Y­©·e4#‚{Š^«âþ#UÃ=€-¥ü¼?Ô°gIr’`tZŸSD–Ÿ$Éa’%ɱ©”r/RÂ5üwÀÞ¿¹Ìç6ôÆÿÜh/L6ôÄag­‚˜h¯ŽZmí Aûe°øbÉÆr{ƒÇ•ªWÇY¿G¤[aç wrœº—ó¿m±ÇD‘¯?Ku[H|—Râ)Yè´ŒÀNs´8žD!¯º¡Á$Ô-‹E1-®îùRƒ(wÝÕ"ÛÀŸ´4Úz-ˆ©úr ¡™³‡L‘Å»¦Ihyù3FÒ~¯Á7ºY+Ûº·™xáPŠÏ2œ(Šâq JB jÑW¥œRwÜgñËÜÔÈØ«´>ãæûà1ž?|µÁD£ók‡ÓÔPQ^UåÚRL”7¿”|ªêƒ–)l’|Æ)—Ml£íñí6 ü†.÷7ŸÞt SÉÎçæƒ»V¨“Œ7à=4숽n»HÀÏ<¦Ì¦W×K­½·Y½s¢{¤¯W ~¡ÇYâó8r+œ¢éSGYT(ìé\)Îr$4Ñ¡ín¡QQú}ÛßíV°2mJ`‘îÐtàŽ²éª¨hµ¢ ¶ü¦ñ˜±F¹]îŽ]@VºÿÕ¿ö¹ÙEééþ/9Ì8°ù%ÿ¢ÿk²—Я¿¶ŸŽïÖÑ^C0—`Ø;zZr-¨pPÊÔ#Ü3}Iœ/€æ&ñn¾‹˜]JЧÌ0ÄS0U ¿:Æ]n¿B”ñ)P—5ñPøl(DœûÀØaTyW ­À·¬lN–ïœø=^2ßâYŽÈâðy¡ZùÐ ƒ¸Œ—Û¦ØÆ‘ñC³G¿ìõÝÐ Gçƒi·é3›'>ç2ÝDkßRÙá¡hZ'òJÍÍYÇÚ°hiݼp¸·-Ì©—Äe8R³u§ ×"dV¨|Χ1fph§*²û¬ã<äׄã™×Á‰¸AÍ~‹‰G0›:/"wcm=þ ð¨6ŠppÔ®‰IýšÁÐר"“[+£í‘”µu0GÉ[Æ\DñÝ]Ø|í+ô$@^{¯Û·â±$NØU…ü™X&î÷>.îæ[ÜŸGñ¥gîÏ“žyÇ9ï2n;v‡ð‹à¸åüè—lJ8ºf†Ž¦+’=zD"~ýf#¸QºYß›î=zGx•]‡\¥ÉÖîJÛˆÿ"åò¢ ýŽ~Çh¥ÞÆ*ÝM8’Åá<=ë??nâap£‚Sû‡Ú:u:“54ì\¬žo|¨…7üÉgËÂûÃßáfJ¿þ'Ñ…¾û¬Á¡©ŸûØÎ}(ŽDAؖοRjy~Œ÷ |ƒ$IE Ã"þ‡eÏ)ˆ8ÿ?.öúømÿã2ú˜“½*qè>ûhïÄývÝîõÜU;r¢a7÷€¾{} ß iE@DÿäGëw\¶özîœLÈEe¿­u²×—TÐõÀ.¼Hâ™Ûr½pÂ7ž¡ w ½á$ˆâ}öQL‹%A×t‹Ë*+E5êCÏlÈÓe]$**$Ò]€žlé!ïC¤7QK΃ËËñC¬’ê‹rÂ1b—¥Ø[8t¾¥0úƒä´;À«ñ±î²…Âî–€e>²,-®¯Ý š×ïG‘,*W°0dœT`F}•Rå¼EK¬aÑjï z­É $¯ ñŒ­âTD¸£FB;ÉÛQkYÆýþqì¶øùåÔI6|‹4e8è‹Qµ·E’ù 7Åt Éw“Ÿ¡çõuªóB¹>Ε:ÿVH‚¢¦ Œã%‰OT­âê1F½›>ÖµÑw¸z† ;¡;ƒå9ií;Ë)ý;>eƒï>þw…ÝHCöm‹ç:)‡ÅDü,ÆKÅCÇÈpò/ø&ò §<“€Ò$qÙiFD«LÇyÁþ± ÔÄù˺”( Mˆƒ¤OR~*î¼ùŽÉÈåû#1U5ÙÊ%¨ŠQVŒ÷ 5å­#AoG#çe:us»X-:ÀÇqœSaŽzê(º¡÷;ZYõLqæ4ŠÅºŽqûÉxüÍ´¼qŽéK5“‚c\™ƒÔE}ü¸¯Þ•ø–å½àUÉ»{Z-(aa[ñíNm_ºés _b£dyb&Ü„NÞ-*ÝVeJüüMqw‘ø„9q¨îy1åÕ¦ ²Má§iðºv€5r¥)w\€…cöÅFë#B(êŠWT̘CÇÓte>$ùyÂù–Œˆ‚¼_Žõ“îèõ÷@Ô鸒E0m;„<ϤÇ(&Æ­ñ—íùÁÓŒCEv:¾±¦¦3YŠBÔa~RÄÛåÃÄ5Q€^úÊa÷;ÆœßÞhš>%2Þ>™¶jך;£§DO> 0ÓŒÄ}ü—²smm¢Y"à ]ßÃþ°ô›Æ–i.'vƒGÒÄP¹…pè]ew ×}Ìñ€˜ Å(b¨¬–·WsB ÒÚèo»üÎ]=1ó˜Ÿ×GòÇ#nb ¢T:(Õàa øPF„kD 5PdWÝ;¨ZJáõ ²•)ê\ít1§kNmÐÖ`߄޶p²RØÐäÊ)N m–À%ÆjE¦(y¶òuüÉÿªôcf4™q×Ћ MO7fÇýáÔ8ž[®w~É~Ý‘ü¸hwp—z½6ŸIµûqYŠç†)4øVM¹»¸èuÁv#…Zð/ló E±(ñÅ\½lcðï¶Ø€Þ…jðáÜ“0”àœ®Gœñ÷´ ÙRJÔ™*ê·ó-ëR%9ØÐ æ±S×$ƒ˜ËJ€˜ÛŒÖþàX4lЇñ•w_‘ŒÕ^u5m t­Y–ÎÛ|Þy £Ôž+xKœÅíˆ>ºé†P¢wÀO‚Ðêé}[•OözT°ö‘ZÅ DÑwúv™J4nŒ‹ÙÜÉ*Ýøñž‡œDÐ,,=![IWæ´ÑÃÆ-KFzÝ<ß pÅ09áçYÍœyÎònòd?°‹ÔhG-®˜HØë!ãDûŽdKxš{W~u• ×,a`ã,¢Ó°›äÝ,~Õ:9« æá=ܳ±åx£˜¿è‰¨Æ²¬gùóaJÂ%(ÛôM0‘Ô*Ul Mfš¿è›š¯ “Äu! årÅç=+IN@·(j­ì&¯Væ(cèؘ\ "„zë}à*¸OæµZ#¹ù Ó>ÎËVש?`´-IÛ?™hóÏæñ•ާžä毽Êô;GÕjžK[°YI" ®²5ÆF³Œh©!°ë«ü;~éÃ?ÎÕŒ1÷ ¨¶Qèײ¥¾RHÆ¿“'ܵñŠý– @Ùã·´w}ñCꢔ¹ažFKBô´¸[ï7Û͆ ¡7øÊ"ö³è’Çx%ýÞQ©ÕŸò’™f Èc÷¸+ˆú¼àE® t IÔ!%ëOt¨ÙóQ¼ë›;þ<—äÜm†¼O ú#R˜„®Z˜!v_\ÌGœèpφîÚ†F›om'fîɯæ Ê‘Ûa˯Ÿº_žº …ûo¶$ÞH'i'_]/—‹çOŸJ¸ÿ}:ͺN§zz}%—ðÌSd¥>]æ‹æJ¾¾ò›]Þ¦%|,Ú™?–9'Ɉ¬—vÝ>ÑK.as]’ix–Ž ;61cÓ,ÂŒ3‡U‹Æ×I¯íg¼†øødÕDé¹nò=ûcC¹XPÜÎTålSMYyNy² ¸é$îýÉW‚¿Re>iŽ¿€MR/z!†cU5~Ä­d• ¼¡ʹJ®ÃטʨÕ:ó«» §UW°Éö ÖÖŽI&&#FÜåfoõ8ÕÚMZÜàäÚ5lö/ßd¬Úçå ÜøÅÚD(2£þÈ.CÑý+*äæÅR‹!x¾n Û"_"¦C% ë)1ç¸í„ç Á3 YO•ä<œ·™^ìÄgLŒæN“ïêQ¯¨^ô?¯ÂÖˆÌY8ÿÑwÍú”Í+s¬ó•YJ(˜6äD‘çHz~ çt4bk|Á˜²¥GüбžÎï€÷%êH·Yœ×\ÜMÎ ÓG €o!ûÃ;Җ«sÈh&»úE”[2LQŒµb’Ž„´~6[Í)õ½þ)¦#5‹¤nˆ 0gK"êdnJè ¶RØÈc»‡2% V¡ÿe ¶“ ;ŽìaRô($uœ9‘ÀæBaâ0‹ìAòÎЯû|–ìTzòþf2l†/ˆ¸Ò<„4üN²ãβ»E¹Íe¥Hec0â¹ú¶p‰*¥Ü3¿í; )×fSç'éÍZ§œ Ñ•<u4¬8еL ÏÀ -®nÞqÕa°h>J%:sdZÛAä÷e:ËÇ­ö³(aÄüXÑ"Tw¸8®¹¿»ÉÏé4׃kÇuûtÇÞ¯´¤w§±=mU¢id£¾ŸFÒ®+‰”f”@ÚCUݽ_dU´ŽÜÀ|÷Ó™Ó(óé8 HdLðqæº@BºpÀÖ[çuuñ.–O¸°Å¦vŽWÎ R"ìOOC|AVUÊSòŒÉi%éN³†\Ðßgk_ê…»î_‚…ï- *}hµZ@âñfÌ“/-·<ï^èÖGrÆw*¹#X–ÁÚ¸OV:pB§«qÎ&ÆýgÚŠE²›ÉCL—♤TÙó”lð*ò°ß>Îe²GG@x9É·¡C2¹M8Öã ·-¦‡ ü!ªç€N»÷disßüW¾ØpàI×^çW×js.ñ@ÝÉ«,”ܲ#CÏøá¥›®j¤ù.Êá ¬o”4‡Ý1àŽ“ü°A@¬÷‹?\}<=8'èøŽ›é$î|ôɇæÿT­2šÅwõôi…`wì™NšÏºWÝZ¥®¥U… 9ºÉ²£•¹©…@InY%§€\èð ÑÉò6g²—° ðçP[ ‰†w‡ÅÄÏß0â\o°¿eÄ‘ôž•~œ±‡¬ÑþŸýF6ä]*uUÂ%2ÏÛÂæ¼ £æÙ}[Âð딑}õ Y¹Òû:‘OžËޱ‚t.ÀƒñhPWIƒƒ:àßó/ƶ%˜Š„¿´eBt³Ëú«_¿sÝa¯ºÞ;"Ÿ¸åÜ•a­?[§ëoõV?uÞIJY­vÝ5½öÆ o;j|YÕ]ko>^ÍÂŽfªævîÈý¿ÿcÇ·WÚ›ñøŽ:ÉŸóÕÒ‚°YY!7mÙÖÿ›5åI(5 ºk?o׉ðÓKúÝÃþqïäè¨ptßì'½îÁ3wûðøÙÁAÿY|wàîúƒÞþÀ=þl°ßÝww{ûýãgûû½“Þa|÷Éýƒý}÷Þƒ£A­æCרÁ³Þñá wtülß<è‘kÐQïÙþQß5 ¾}ŒVí»ÛÇÇ'ñÍg¸yÒïŽúñÝ“dß}ÐÉþñ wxt\kq¿‡ÎèŽOþ«÷£,çãnï¿Bÿ†õöZûg´VE_2H|p"yÙuZ_k°=,µÄVúµe± ‘@¥IÁY4Ä‚ËAudëz“ÏWw‚Ø(¬¥Ì²H²Ô"&z±e©¦žÖÔÄ 7˜Ã,¥)›øzCHD-U È‚è ›eðPBñK'õ9i ñˆATŠÒHr ©ï¢Ç‚Ñ+-‰…ªâÖÀ J aÀ¦g˜K”3`Í«ÿ¡«–äÖïu¶%¸¹û‡µûƒÚý£:Ž@Ãw’gädCI_Û/@˜îÿjM6íøüV‚Kö}¬Ùß>‹ôK›sö"9л‘÷¡VèP q¼ríîGƒr‰ý~µì$ûƒ¹£ÔýrláÆ Q=ØsíÆÐËwvë:™âÔH¶™Ra¿‘e ›¯„ã8M&ï<{8QÆ?a”j›ŸŽyÍ> a㊶xÞoÏ1G9Ì‹Âóe%¥²–(Æš‹yŒ½wÜo ¦I“y»‹—‡(Â8'ׯ8]¯Ñ*ÄÊãJVÃ¥FÏ»Èl_‡}C`ýÁRÔÙÄjÆ ¦Ì¶ {áA(˜$-¦a©6„h1¥6öíáÜm|­‘Úîwm'×]_eë®m¯ ebØÍMß(ˆ ©wشФ120_ÛcMGÄ8Ä9ÀµïòºRW€ø=DêîÝn×[ÄçžSÆ0ñ"4_&>b%é<ý­<ô%š,1A\M« ò[ ~ø6¯®Åq²à¬#m´D«©©f&=î+È ohóbþ·¬,E&Ûû‰ÂÝc„ÔóÆç¢óyóGÕV“…‰»KÔ8Ëu]#KQÜ÷ðÁ²M‰ Žh9|^½Œnb“Ƙßܬ&¾Ú TLPjŠn[I/Ɇ>Ñ —Âñ¯ä/©ÇBñ¸2ÉOsòQ¤åÕìËJá3/ǶÁ»÷¬Uq.*í ˆ~,ÊÅ5c˴ȦU­.—e–UínäÃÁDzË5õ_öÕê2/×I—zxFMæxšÅý¾õEò 0Ç öx5ýõââKòxª)ˆQü¬‘¢ØÓļšVZ±)“È-"ÈH ì>•&ZÊ4ÊŠ¨j[e¾ôƒ´?º ÐD_^é6÷‡ûÒ?ºÍ5Í«ØT ½%ͪiñÕTEEh÷kd㬼é›ÒMž¬D ƒÞÀѨhßÃ8ñsZBèR‡„UCÂ7ßÀhîñ舨ù”Ã+&Óìñ>vm0.h%HÄÕúZ­ä⣰åB˜½*Ròˆˆ FÂHàaп@2Â!œÕïå{jG…ôˆ-2âôK Š äöJ„Z‰UU%±HJTf Ä—œ{ÐP_Oµ˜æË%%œ-É›L_lQ0‚壜öDT—+嵈¢þ`cÿî›û¥Pò1²l°ƒ«Šœ#Q+»¶çê£B]¸ xŒÌba¸e²UãT‡o勚æYáöç%S8"¯ Óo–ƒÎÒ¼'¸ü0Ù“I™òàT7'Ähè°Û…ò‘“x+åØúøDâãê‚*ù6¥ÜG:p9( ½[®æÄ³‚qšN˜]›yªÐaÚv]>ËŸ_}|ò¹“¼BY$¯F5»/àìfþÖ§ƒöÚ{ѽk/­=×Öî ª V븨@<×îc†‡¢¼×ÄÂbµÜ± ŒÊñ¸ñ|¾ƒPc>Êñ"Ðw»gÜÎê½i¦ƒÃ\´MÜÉb ™¬"³ÓÛø+|J’µ°sk P…”)]iqìW¨ќğÄ6a?MÛ$OpôÅÉég‰MˆC†Aq(B‹åÀ)¹‰Æ8nçÔOÄ¢R2"R%5¿yêKz`„  ÷µ ê©wo¦¶a³XÍÇÅh%Ž?Žp§ïÁᥠiÚÙHÇNd›óv‚º$$gíº)y†]dݪ¯;eröÝÛwï_Ãåg­RÜÔB“#Ò[ôäPž ô ÁÞ$Qí™V\ÁØ»÷«©È'ÖWŠÜi–Jþƒ4³Þ6¿.¾‘X†4œnxX0.Ézö×U¶â-L0¹ õÓ²ôU<+!ukŠÙ ny°¼¨£GàC&{Æ»ñ&ñ›_…TT»pX¹âIö¡µÞcRÔ¡_Ò´\ÄÃ2 +GúqÈÆäS`\*¢'-u~Ø5$9óÂ!.ÚàNDÒVVÀ÷Óz«£©•âECðgŠZ«Û$¢t˜ÎáTæ“÷ËœeÊçz¿ßMvÞû ¢ÊX `P5ƒn=¨‡çK(ź&c÷¾Ÿx—Cv„‚FÊfëš+Á™™:b¥@Sö¾Ö ~÷›iS[ö»ŒóÆa)BýÄÑÊ’:JWŠ%‚ôÇg4;„±‡4DÂ~¡­à;è]Mæá9Œð07!e}¬X¯A.+žå’HŒ•ªÞRs(Ž&ì ³ÊT“PbÅŸÝÀ>!§# ™O7ÇPËïÎÞ~þøþÝË×ççöóŸ¾ýöì?AQãyîÆwÒ٪ɋI”$ßþôö凳wo³}¶ÚJ@λ’óð¾³Î(´†(U%[›:ÌJ¬âFÛs*lj€„êöCŒ!´…Yê :¹îÜ,¢ï`I×m…-ÜIP²C‡0höù9wI–̺ØòXxA}‚úÜÔÕ2/^HÒ1í1¥%¼+©)ëhu´MO¨¹ÒJŽÒ%×¼«ç_Eòž|Ž'H^zêpeÄ‘ÐâØ þbÖQ²hÐRÃ#X Œn&µÏlwkí ŸÎ@ fÜ(F× ºôû¬…ƒÇ\¶£¼ xw‚G¦Ã×€ñGo{ê«À0ŠúE!­yòi ŒÅ“Ždå@hØQ©}´ð¡ˆ¼&éÝÞÏ^—åý~é~Klë䙨.qt½‘·7®º¿×„Q¿Üt·~~ýþ›Óg?ØÂ2»<ÏwñîD=/®2ÄêµÚ_Úò´r^$¶@?.áDóÖ.£fù;|ifî—É?¢šoˆ5ÃÖ<ØRs*ÆCL3èu¿ä?ûôg¿ûå?6>Ü÷äГÖÎçãäóñÇ`9’ê^¼Ð*òÕQ}½vÔâ×o_­wè?x¸Øz@þ¿®$zðž×w¹Ä>¹¥~U¦3N6Õ3@IœG*v¦‚AB‹ ìÚîo¨åˆ^¢Wa°ÕT°rªO̘fM©•˜ßgš˜É22ÖPæ¢Èô?')Ò¨þQcp|\°n¯~†µÚ¬½}ZT©æ`®gEÜ“HµîÚÁóDÆ£ƒØ#Z§ˆ„U:A¤&í%€¯ÖqQcy ,ë&×AŽóz’Þ´»¨_ˆ›ò>›H?xàÍØR¥‹7~Lž%:ô¾å:®¼ê¨Á[ý©Òõ-„ǼØHL~v#„X‰'¸Ì&ü0*ÒêÕ¼TæÖ6×Á£3‰]¼˜²‘©Fu£š‡2Ô±üw›æZ,nHƲ;ŽÁ¦å@X3=xaá«ü¡Ãrd¢‰ 2™©;_Ò)íÓn1ºà¯‹-“ÆO9•×óp{c‹Xy’XÓi}3ÕÙMb4†kêÒ;`iÈ3ð’:BùÔ¤<çt'æùÌ2…P‚˜Í¬ “kùë dzNì#Aê¬JbyÓ(¿UBvÝÇ¢5x©³°°l§:k]nD4æèŒ2Àv¹ v žcèMóEßÌÉï³Ûi¶\&?¦£OÆ7céúà~š5W10U|›_qѤ…_©û®_ò‘ë€QëÄ©ô¬OÒ›Ôéÿ¡ëð#½rþÓ[õx–èKÖG`°s£=,*7¾Äm7%3ô$Wã’'Gs{÷Í‹^ +ׯû– p¹$3ñwˆ6ZR>Ÿõ„ ~|©ÒqmzùîÕûÓ¿x\n¶í{©SÑšæÝ‚„V‰œ¿P¡{ØÕÈ¿¹¥i[Ѭ%`Š²ÆØøí—';Dòi°ö;MPC¯É¾ʾè˜ueÑÜäôAR3U@òÍt ÂΤ҃ãù§Ëñó‹—Œi¶—Iz 1n“Fý[W-¥ŒxŽÈ«C©ÎþâÒô²Ï¿îF¸óÓ[‚9E¿ÀVªä^žIƒ™Ò§óI¼˜LB2¬B}i”˜Döª*[z»Ï" óï0ŽễRQ‡˜Ä4-*½JýR&¤ÎíñÊ"©å†¦›æÍ8›¤€¼’—¹.4C5ÃIZQîö^Y«œmëÉC¥k¬5nÄ–ó\‡¬Ìöøˆ|Ž’Ï/ð.Ý¿Ä\,æEÝ4JúÒpè~CÊW;!)ðzl[F¨Ewp²o1AÜœ±áL®¥¶x •álõ;Á|k¤·Sw\WèòU)À}07_º^`½ÛúEX¡0?!;‰Qñ–Y”y†´A7—È]«Ù7f1ÂL T H—ÉÉQ¯—|súÓ+®ÁŸô~'à|t«ìò‹Þ½zÐZÅC÷óã¾Èã½ZÈœë^Š·¬YÏBýÊYãÁÿ¢Eþt]hDÁ“uP1„_Ês©àqðeQL^ñ"If˵Ƕ‚ŠÑ”ZXìÎa'×Û׆ï_¿|}öóë„v öצ¢ÌÐHû´íT3*Ùm¥1lC¾ðé½hÆ}H?Ð)9E†:Ç*7eÞ4”ÞNR…œýÈœškŒIŒú:%•ϳ'-(TJágÓ ŒBi2ÊW7ªã6¤'3ßv öéônšƒÏ]7º™±Ê‡<;LÕ1iá€å? °¾w·ë9‘ruâ¤uþçÆ~~àºÕIzE¹5 4¹,dÆ™…Eyåæ2Y¸íaª|¡Ä…M²9;ÿyß |ãªåïrOòñ…½h:+×ñ8Ó©àùÙuîA;RÀã\MìºÀüž³Ô¹fïØù &WAV!zä’ÿÝGEŠºC}ƒIîD*e¼KPþ@ `°G@¹²mòk]äÌK=NÓŒ¦‹G’Hþ§"šú¾³.Öö`ׄ<ÄmŠaFä­#Ü€ãª/ç"é%jÅUàÆ²Ö%ÔŠÉ’Dzžäº(ó¿¡[Ý®=ósó3ú¶ø +¦Ñ„$]§@‡¡+lfê ]$þeTèY€n¹)yo³ô¬Žæ´íÆ2V »$NM­mJÔË[%2Ø•Sø<³¹û×Aþú†r"úÝv^b&Y*m¥¬Ìl±¼§¹K—2eÂÇÆ#62²ýQ@µbdóõ{Ÿ/ñHêA‹?`$£Ö@ÉçÕç΢½>ÌÐóB/¹Ic n9ÃÙœCí¾”¾ðM†¸»Lç×|µ@ÓrÅ¡àâ9 ¸§bÛmÅ»vbByY@Õ_B÷as¦º·Ã@"$+þûYC†Àu—î·vœžáVd¨To?`Z«C,B»|eW@¿Ó1k˜§Ö"½„§ØÜhkºÕ±¨mË„Û ½¾!G$|òÖOX{Ö  -æ÷ñSx«FLk4œkêLäMæa¦b÷gÿ‰ á¸,ká~œìPËÆér‡¾öyR{è`ô÷»ÇÉöŸÚCýƒäè Ûÿ À×úÐÏg°#¹ÚbÐ5Ë!úÜuкÎ)3Ø÷`;.8Š_~¯Ý7\«¥#7½‹ª 9U“ʉ­v{½ÐýC…üº‰/‹Ÿ0ìuÍí!·±wX#/…ŽÊœU(ö$•!Ýt¡ìyz5/ÈÌݘ? ˜?=ES–ücÌî8YMýZÞ²;“àL&¯„wgˆ¿¾ u“Q¿€óh£²¿Õ,ªæ¼q×Ì ŠuB©Ù3v[B¾›‹‰Ríg©® R‰|"¦žrÅ —dÊç¨C³5?ëœb±à«[y“c…J‡céÙ¾§quŸ {9_nТnœx)[× šŠ¸.\,ËÇÎô¼l“¤íˆî³`éW*B.Óѧ[Én™_æ zï蔉)Ä“IÅ©uà¦JËu· ™Ü¹XoS{2>³y«Jó¬A8ñì©C7žËë!ÿ_PVdöׇrä>d•z"¨Éu‹O4õÐp$©@¯°In”üùÂËø6»§!K®ÏÇ>I–ÑdZ¤Ëa¶¨ò©SÄ=IÀD4ÔTˆâá%ë5“q¦ jf W¬œ£µäc*Ȳ$w%ÉJß«"ûlC–£ g%•ͧ‹åÇŽ“ÛWÕõ0Z{BŒ,ÐI¨n©ukúvjHçHQ¸¸¸êRewÁªe“±…F–=BÆ+¶û’J0{ÎIç0ç°ïk4Dì_ú,h‘ˆäÖÂð3¿÷’œ»°hÑR•Í’V* !âñ>dú³òæ6³ðNhß›—sú6°oðåÆ [¬E(—?²µêG×EÕÊw¤]°Fo @žÄj!tOb <³i°ywFdEÓ¾Éî±4Ji1Ö¡ÏÖó‘jb2 äFDÈ*Aq UìÁó5ΫY^)^¦ž%I¹Áåo4e|²|8N‹oFtÆTÉ|Å)·¯ëv_J ÜÝ‚ ª¹ŽT¸OvÐçÕŽ¿öpavû—¡}>¨ÇäâñA4œÕ_mBâIQ/6œŒà:ôSða¥´jbÝä9;»[ù¹ÆÀBèç‚sôëâ!¹Ölxrh ÖØxÆ×´R sC‡§ó|´m9|—®ª*~ºå:ø—[/l±5|)C¿f¯ßIº‡uÐ¥ˆBÖÀ­·M¶öö; À'úíËÏ’»½ô.çlSrÈ/'^úêP"4[õpDod¯sYyY¯“öÚµÊy«½"0{/§XJÿ'“µò¯{=«[|\2fžA  ·Köö û ‘ê„‚v؋ɓ/À4j¯L’ß’¯]£Æ|\Ò7ÝýòÛ¯kO\u'Sw^ÖÚxÝð¸Mî#ø,7£òYz•=î~}êþŸþªž2{ÇÏ€îÂÂÁ½¾Õ­b„`ÙF(‘¶ªÝ|×®ÖïÁ߃^äÞ ï#ÏM&*»m#úˆØ ü(>Aò[Úw…KåÃ_bÄV[ÃÑá\¥œnj|­–©‰05C¨\YÇIòù”‰8æÙ$ö–.a÷Y¦¼Çµ&)CLŒŽ…9ÈrGq ÒãBŠ5Ô*o๬¦Å-âÄÝ#tX¸&ä…äbZZšIª(ðUd Ÿ"/çŠåLØ‚Ä}ú«B‡Ó@CæˆÚ‡ÞCœœ`B›#M”Qê EeNÝÍY>½g^ JÞ21KÔ3ù —?¿{õúœø³W§~h‹Ò $ç?½}uvúæÜ£On¡tþX€YÊ™ÿÎ8âRÎ[xuæ¹ä§OOß\eîËG¤æÐ ;GÊ¡Ç8Üðóžùÿ’A—ÈÈÿ{:_a0Ýb8¬?ø#¡}#ÃÚW§)ŽŠ—ÅtšÃ­ò?€@_¨TN§ÐÈXV×µœ#°"y“¹yŸŽWÉyV^â |å;¿^Áïáª|™‚/ð/E1&…´é+^Ò®B3æt±˜B¹=§Ddd¹Æ!”Šøß¼yûÆô¾Í}d/¨[yCò4ÇË#6ܧÕâÓ…Ý¥Ÿ–ÑSá®DZk.ÚÓI:¾¡•ÉId*oñ\Ö™«ÓÉ3ÿÌ£} vˆJ®u'ÄÇ1¼©¬øë›lÃ~ô-ñ€ÐD©Fú†¼¯l4ÒÀY ‹æðaˆ¾zYLº°ÄåºK Ñ@³ô7mÎÊ«{`8—¹dìp±€Õ¬Ó‡ðá\àNI»¾f LJI«‚wàÙŒÓA.ÅW¯ßŸý|ú!8Ö[ü«ëÖ•Ÿæ£|wýÁ¥ÝÀ¥ãg3JÚ²Û½†rª^ýôþµ­>_ŒEO¬M&på·M î-4®!AóËî°…)©òåü'‰Û°fpIMúâV1}S'Y¬¦ì"E:'ŸvºÆjÄÉ)rÆÀwôÄ'æ:ÕESrðª•öÛý™‡qòÕèhsžÑsC-ðõ…ùr~ö5³¢lz’oMŽI»GÐ ¨fB¦´(Ö”¦¤¼K8«Üª¸·ˆösWi.‰9dÕ’ù£+Ibl`¼/ïývuåjïW݉ÙèÜÙçx8_ ôÿ¨˜…h«Qºt¡1(ìjšßŸéÞ Õf­ ïÚ¹ªrÑZûfw—v-TDmïåg:ÅA?Ï*+è3B²×SÅž7~Ÿs*8’£¢­øô|ÌUœêî¶>bGG:WÖÔR‰-ò§]pèÙh”-˜#~–߉kA™èØ^uŠ˜öu«ÃÕ*çPkŠÔ.Òñ;~ëIµ—«9¨Xžx:u½ÎC²%«ÁIºl4^½ˆå5&ÑBêú”PàSC eZ ?Mœ^—Ðt¢ˆ'L×S±þ¹}²Ì•÷ñÞ·´ûñ#zb‡Ͼ÷¥"0è5Þ¥q@tµFoº®œ¾ ¡ªSöˆ±WÓ3DMö­7ä$qeb‡$7ûv2Øàl :÷ g U9ºÊÇ|½ÁÂoä²1ÒœgÆ`5ð}Î `–ÐÄ|e5®ÍÜxŠÑo¯OÑ,µ' „slèk° D†Å1x2eI Ùƒ`.Kn·k*ì7ÁêÈŸo¢ÛhÇŠì¬4µ6e@ID¢ã/L>^”Z‡ìˆ=+ ùF”æ8²ž2Û û“¹À'Aø Lâêð–›|cÛˆj§¦Ô¿^Ñ<Ž`ƒ^ ¯j‘˜Èk¥W¥°kÑÃ: ´N™XŒöO|(߀ˆ¡¾óé¼½ŸG ŽÚµ‹ji>‰çµuoÂ'>áËMNñfR)Êë*.«{…›Êt’ùãŠ\ÉzøÓ¦륛Ö[:ÈÉሀÈǶfqOá·¿7ùA& IU%:‰ÅkCvšðM9Èò±!hw¾+QÆ©yŠpµs–Ðëwß6ºäòw»e+))» n]¤}O´ª \1Aô©„pp:‰_¥E9ÏnÉQ¨À%aƒò»¹Ùk[nÖƒ“˜4â9÷Éœ“¥²Nó»0ù\i†ý—TÞ½üƘàæÊ§³i@`¯R‡Ý¿,îòͺöRJŸ—Èe(À¯/§ê6£ö%œ«GiÀ"ù^•Îk²³lT*JÅ$?¢”ãE–CqÎ rË×ÉaÏýx‡»Ÿ$BawU8 6g)%ù‰¬ó±$ªO±UhÊ ™7ƒ{Ïià¼Ã5€Gd ÚØÄ˜©Â¿¼‹ŒžáKNè¢NBW/(nÔ±¡££:Ï N©¨ClÕ’Ô–u‹ÏÓº]Èî¢N·”ø-5F7²ÅTfì¥1ƒuŒGç²b¹ÚËý1Å|е~Cç'ÂÕæË¶šàD6—î5ãl~ ß¡ÊNò·?ð$QjßÉ¿÷ò¶.t Aå±J‚}P¥ûRteÇ/ŠRc“8R£®Èº`Hù<}™÷Q°<RÝ yl(ú(7üoßm¬Ë,¯–Zèâq½ *…{œ¹I— +ÄS¶„âV)ïÚædØß‡HdÖÒÐäváWTå…¹5#÷ßõS-Ã[ÀbLóµö®È[é#˜Rðeæt«¼(ê9þêÜwþ&+ÜGÇ£O‹*³"ŽZ’î™-ö†1RûøH¼Û2 vl÷wÖ;^Åíæî×dÑMí ƒÁõ³-ƒ¶ÓMõjuœÌuI 1¹G€4L™%B  û9Ø8ku™ÛóB¬cÂÚî§ ä\6Çreô‰Œë†½¸ïº$ë×DÙÝë¨ÛÌæâîö¹ø79òïò¿ùT|@ˆÎÇwi?#Xp‚©Û2Ù”šdã«L^_ÌRñkEYæ“´ ‰”ºíÎRа(üÍiXÇÌȆC¿64 NFQ*6uu’¼ëä/"wçf”ïu7Ô„òÈwø“VsDHè|#D x¨\‹É]–µ_^T3h(³ñ[U&¨o"Á\ÞÄÑx­ø\­úÌoëR—+HAˆšÍny–îûiðs$¬-ýöQ¶¾-xïÝ‚lÛï{_h0;Š §—lI˜N»›ŽØa:É/Ëk×­ ¨"ÍЉ·R½~Ýv´nªý1õn9\]]dÈ~ºWÂhrwTLUìý¢Z2ždž¿–&5ª«Îoì DÙ"ój›UÉW§æ±—’”ç‰Äñ=ù8³Ù¶%´¿£,çÄVF•fés6:“;ÆbUt#³¡Oa¥wy vûDAeÝæðµ&˦g%zìÉSƒ²«>‡Fßíêc•ׇ•ƒø BÚÖ‘±¢ª‘%AA†ˆðö„ÓçÚzPơ߻Ö@$=óƒ:±@´ç¥>®îJoÀ¶côµFX%³'ê¨ÞìC£ ÿÆà]•;üËJ"·¨7bM=›žˆ½?Øûï«éÞ ×;êÔyš1úž°D[èÝœØE¼{ô9;4ýüì a½Ø2ý‘¡½Þï%­ÙÏmšjþOÔJ,‹¤v<\~ ]i‚ ðŽ,-VÔe>j΂ø£sh²ªôШGŸ››ä§phš×®õ”·j­T“¥†fÓÙ¨0¨f™ÃÌÀìka.Â.VÀ4YƒÝ=}ÿáìÛ³—g§o†/_¿ySߣ,„=±ñÿa565«É‹¡²ÎĤ$ƒDXo˜’ÅàynDÀ “ƶB±„ ëwma{h‚r1“Té„îáGÄøZlüáv<¡¶—ÃäÕXÆïòÙ*Ø»|(L7y7O¼¾œ²˜Cþ~Öw ½ãI—ÌͲ:zЉD{ÆŒ‡çUr}{ööìƒr¾ÓÕ/®ÍÉ=Œ_Y©ÐÄÏžØÓÙ©ãÞÛ ó'&ÿ@€òçÅ|ŽâO¥™ÃûÛ[Zv’½½=VM±ù†Z >Z}ƒàF½¼;”®h…Á …ü¨!ÉW,=ô1__Ô! ÅŒH  O ì-áš4^½ •‡KI× Ý„êŸ—j_{IÓ<Þ°Š•Uœm³—™O²4{dxGT:½¥8’9[TºÉ÷®ž:_BÞ—(ìA ÎÓÖ&g¹h‹ñ:8æâ™+`!»µjfWÞ•[> a~PðZV…É•0A5dª¿¸ ·@Üo9m Ý ú,׸3=¤êIÂu]Ö}ªM×êfÈê@táÚ!ƒ©uúÍÂS¸Žâh@ÞíôëÙÊ3>Ëü//ÅTåMíÞœÂe¤!T¦Ýµ8‘^Ø%Oë}yïåºÈpåf‰Tźq%Òú5Ù.”nBO)QÓ¬–,HJsÓi)¢šë³ƒ™.Ò{åmáSÞ÷th­ªu7dÄ`76ìq8êŒó$JÿÜ¸ÑØncÑL“¿œ~xù={ ¼Ê SÓl?f !+äã¸çRJ|'\Ìçk¥?Q—ë¸Y£\ôÔvDÙù2»Äì÷(W‰Dñ$7jLíÿ£!þ©â·6SÛ\8%±® :8a2MÀjæwZ$j<|½;܈˜D#”¢vñ±ŽÍÁ4Ÿ‘zÀ­‘PŸ¦—ø·¨°CŠ q Å[Áz䯼_bNh§ðÉqØÙÇ+Ö<îóÈŒû_QRbãë~Ì&ÄJ¾Ñ¹Îâ-JÆ\ Û^¸“"q‘OÛ™¦«„“=u[n †6¡0îP¬ëì?ŒÏs4"žLÅåœÙÌ[M…ÄH{W¼ûïM{®¥/Ç Ãä÷:‡½N¯ÓïEmI¤vsªªŠy«;¨§IsVr 2—ð”ÒQ¶†Þ‹'œÕêÕP‰<2ÒC#íÇÙËöy?O@‘|êðú-›?·–[š„È€>HÞ¹½Îƒï úGuœÕßI±í«dŽ“Œ6ÒfŸ_;ÁL¼…tXV6à'ù¿wªÍœ<ʓõ»õäI;ú.J!B0<¾ŠXkø«Ÿ¼ºŸ§3b(½‚@Qº»ÅíóÚC¾·èåMo¬âgrˆò©ˆw¸•Œá÷ÃMt'ÕWû6fêyò½; ˆÔn:þoO¢.mL1÷mÜ–^Þx®hÍ”Ã-|S³Ùв F¬ª¦¯¡¾£Äp¨4¦•$øL’!ÉUK={t}¸ÿØò±h0ôâ¾d˜áA¿!²ŒgTÀÅ¥(Ø6¡ºúÄüÒ—³| a ÀB~#½‚â¼§څʉ°”©5x~¯i~½˜Úô¤vÏ–yv£cih„ãóŸìsB°y‘ 3n¿  I^¥$¨™[O»‰"¤(‘ÐÁ‘ï&©Â,;à ÏŒ.B’p“÷ÿOÕÒoy÷aÚ úæüûÙ Á§ZIÜ5/¼z´QtÓ½vˆÄÖ-Cý†jÌÉ«²ÀׇëuîÁKäÌ{C…ÇÕ(e‚ðd/LW™Hyà C†r†µY†föÚLžFðÜÞWGKÿìµOs{Ê28‡—Ú ÌWw®±yí<ôàÖ`Sî ü55°-3³öC ê8͈`t8F~"ßnAñ‚c,kÔ§Û–’H€ü=…;ÉC NjA¦UêêÈ*·ÕOw$#“¡S&6YnIƳuª{uúZrÛÄË–#“÷׉l¿\×,Ë–¢â8‡rN ©æH hÝ|Ò¹ï,Û/zÝÙúûÙÞI2[³(j¹k77‰‘ˆ¾o×,ãí/Ÿ¨7ÍUÏÜ«u…w™)‹€®;¹Ø€çíKËžk¾lÆiã.ZZÙç}ßm‘Ð<ðy±JY´Ý¤å³¡Tv mÑ[Æï§(Üf#4éô¦s£DÚ¡Ú]þ““{ÝÕ4;-¢ ²uw׿ò ù‚æ¯5åß:ŠÒÔT?º—|î©áªÃøþéx7æ0CwÌ.+ycûbOETYCG†jPE‹207—ó|gneä7uåÈŸ&ªôÜè:›é„Ú’ÂkÒÏ&‹+'ñ•>T­ö !¤».Êâ&›€=›j)çš f_[0]ƒË¡¡s¡®zÄ'Í–"/{ðÆ©MrVŒÕ ‘ ¯F©ùxʹ¾ã§°’¾F@poÜŸÂ’g™O)Béò>¢Üá°¯õtmLw‘gL$—ÆÐ9³3è$Ï:'NÙìÊÁȬ²ÒÔôV¯ß#šD÷âv„’šäkßd ¡µ÷üNÇVt&µ®›þ¼K—Ü0åØ.‰pù¬Cä6V6åÇ^VÙ2î¥!âS oF™MÕÏ"r±¥ûöaÇá€é‡·0 P¢dÏõ·0W0s¥:Ï9„0´ Á‰æ‰Z ]¿è«ÂB”·øPÕ$x«ÐK“î9rGȦ íª•Ù@<àŸKˆe_¶w[ýdVÓÖž«è¸µt-{í¶¤Ð6o¦²RL÷L|lĆ‚# Ó—FÒt&dRO¸XC­ëŸDz"x›t5£¤ót‘ºã=Ï2fh€µ<[J~í’N9“ûUi“¬K¿Ä˜CÅOQÞı¢#D“E‚bó9(só+øÂŽÁ$›2Ř镻9Ü —Ey$4Ù‰ÎW£z ˜Ó‰¿Œ9 ·RønCb(…lB^e·©}ç‹,n¦rû¾ÒðÚkäXÎ/¼åζôÓ´¼‚ÒÁW4Òœ°v^$R®•»_ûè í$ìãåU·Q)éÑJt²Ž[6; [ƒƒtÍ)(c\Ûç°C÷íÆ@3 moåUHË&ÓñC0×>r*„ÒººÝÕ ” FåkŠH'ÑXt¿}¨” bµfîÀ”¯'ÀïÓk“›z³•Ý8ƒfpöû1y•ýœ–Ï.saóÝM³¼YH‘Ç“ó¾’È3j+=›´¼Ï£ç?ƒs 1­ê̼ëR/GV&¬ZåŒ!SÄWœ2Tù•o†Ê›´d²ÊœÑb%WÏÚ8ò¦Fâ«¢ˆÎ±Š-»–énïK$÷%aÂÚžßo2Ûäãáå%+aû J˜{ß'6×pÁì52ÁªÕ%Yƪ‹ o‹qD«‰Òæ´|B¯“.™l2Šäc“,²×÷ž`ÁE~{ÓaâêÍæ[ïÑÒH:̸¥üKEy)æÀ+8l/Fd\çîp§%{Aö£ÍñYf©þkõ·ž1Œ­Ÿ–%Yf6 ©fxI9Èúë &÷eƵ“EäCñLŒ#ñ¥M"|ÝÉÛ<Ú‰D–¹ÁEþ°GSà’¼)d5í‰Å-  4¢©©ÿD<&ÏË6‰V»ÚiB2;èòÞj!êsqq}Í0iÍq¯³QÀ´œ€ñâ]¬‹ ãQ%Ñû¹Åˆ«a;µ8r]¶3j0¬vÉ k$y£bv öIt#yñùØýõy’¯?Œ–ýZän×Ï´Ý´Úí¦6⢠+Æd.ä·†Vù–¹þø|ïpœ|¾7èU´[isZˆ×ø¥÷k'ùÔnX:VoÞïèìAcG/ãŽþ@š_Ãg4õÏòÁþ™)K]kS×ÌN¨-}(£k˜úÍu£_v ÛP—™¿îùZŸKoÜá7­púÒ ©\€'iˆ– ÀŒßqš{x^®RùSIjg‰P¾Áa~Ö‚L˜•{8/Óñ_m[|‹Sw¯NIŸ°9Àr[i,iJ)Ôw,w…³±EÂÑzýjÃb1NÝ+^Hú@³>;n†ÅÕ‹Ð> <¥DƒyûûWo/†:ó†>qÛ+å‰ †ëï`üØ"ŠÜóþ'C™§Jq¥Ä?ir•ß!oÐpn˜:5UE+gÄ)ÉEgY.+%Å( ª ´¾WÔç[ 4mÓ›wXy ãd®ÚR|hñ/Þ@àöû¶XÝZ¹=M[ˆ}¥rº…UmKŠIÊ>P[ö´I¯u HYíF¥Fá?¨¿d{“s”øn¯‘àD^¾ß`‰«¦¡P#ZJC$}: ª­‰E²­)t–B–²ôΤ|>š®Æê³0aš+¨` ŸæëÐÎuZó5ÏΔõ<€8Ü'&[ÛÆêLR‡¦Y:a®5œ4hªÅ4§pT*sÐá1 …+±u]TË!Öâ–áЭyô/ÐÐŒ‡;™,›h°Z˸ [zyO ˜¾2Ý/븋ËZMºU[0D­]qà kÁÁ×@ÌG )ÆÐ•~¸ÎL,™ì]Õ„‹ Ã61ß²tLÒMÙÃK®¦‘Úé”lùBaµúÓçÄ 3ÊÜaú;aôÏ=O rÒ%É'8Ð2¤žx©; ØðôEß's%¦ÏÍÞ„Dùëó(»FŒi²4ßg“®›ÆCÆÈ¸°$nöä÷¸Ëê‰òIub)“‘ /DÔË·%¶'_@ ƒ:¹ßfËÒ¹ÓBJ¡©¡ ¯ s<0Žy¤Ê=ÛÒc¨µeA‡‡ß1’ÈuYCãÖ7ÑåõåHÔ† &»¯k\ÃB³™ÀÅrSصyUÏØZ÷@ŸEôÔ±%Jº›¼dÀl‰ð¦é@;F¡V™†*à f°øHoˆ§ÃïòTNÓ˜Ûˆöãiþ¼=Ù2÷±7ä­ã[ ¦ý\bºQ”J¶ŠÇluXvªÅî4•èN@í;óöÐqߪð®¦WýSOÕ¹@ÐØÚúžoÞ¾í1N‰¡ê û5gˆ/ˆ#ás]¼Pœ’*1•YF”µ­=¢(À>…ªèØpLöùMb/R¼¸ gÌ­T#%T°&Ó9 84Q¾”e¯i­ë—$†5 O ­7Ñ1  ,£¡C°YsSªì¹kõ΋;dÝùoþ·¯õ—¯üï+üfß6ø]¯ûåW­è—¶þÖò×Zí¨ò—Ä‘W*„Ô1º‰>UÓ}ãO2ÿÝTõ¸Åø®ò¨õ:I÷„xÔ’è6‰¬“º NB«°)¸Î¯˸ÐBˆòÒ“ ›8;xôî—ý_Ý!ÝÝO^ìÔ.l}Ñ o ‹Ó²ëŽZíhw Úæþw}ݸöu¡|R•Aî>°™7\_obï•è\}a3 ²Üe=u(l¸/Ú˜’ÓüØV¤è¸P'ù=íi|摹B?Ò`SDr„z¥ ¹s޹OÑGG%ä6òý|KôÔŠ­jÇ´Ü0ÞèäàvzF²{Ž–í’¸·ëš·ëÚHÇ6üÊÆg%î‚‚CD¼W´±øQŠH3è{ qM°]rÁ¢ _óq\‚»€$hó²ÉFŽ9ݪlZ™‚›bÛº¸ø|ÂÛÒçW,B¸_3ü*R bArÂ$Ë\C:æ­9Ú&å’8Z—Õ‚Ε0§?k {$Ã7õjX˜™;Ÿ?ëL>~œïØCŒæd0$â^— £²¦×=ÁŸ9„ûQ=÷&7}^c˜äóS‡øPV äRË” nœûÌÝ.Kjó,Ec7É€BC@Æ n>öYQŒüu7ðò6¦DâI"º!9äÆt¦IŽ0 ±O`"Š7˜ùXîpä%%ÆúP¶+|¹Ä çE$Àó®w˜Ÿ¯¦÷ ŽM:hˆMºâû-úo!侌§ 4?Ð<Ó¿„íuš“ÁHf8­Îóª¾ðàm¼QpðGj•ÚQAP)ŒlW¸Ruñ¡²(#ÊÕq×¹o‹'„¦¬(œZOY ã\ ÞÂûéû0·ÆÙ•ÛÅ*bL)ƒ{U&™¥Bã<å+CÓ²ßéwz:‚Ù·ÜÚ@³Ð.åN4ÞJÑ=ÔôYq#ÖSQPþV3*Q·~ˆÓóÉom@±Ýøè)ª“ö¤¹lâüèÜÇÉò[í¼"ëÖ,…`– axãË F­ëÖw%1­‰ÜíÚJZ×d÷Û2¥¬à£™&5pšk²ÍdCÒ²Ty ’̬úõȉÜi .zÄøÜPÁV.0ÀîÎÆ}8MKcµ¥¡.)tÔÎ_½pºÈWx 3ÝúÆ’Êxîæ1›w«TÊ›dpw[ ’[½«Ù‘ÀGLF1{pˇ]›Öͯ&iŠö¹aï¹€K6HS×ݨ\ËíS¼A:Ér§yìz Õ]ÝD<ý “R>;ßcæœX£e%ºL^é¶Ì’L-@!4õÅ‹¾­rL¾Æ>÷L ¯&òwE‚KrM%PdìÄ]^³êv¤õÓÛ³ÿlwë-P6aŠ ‰Ú‚YâG—¾9²YrkÖ§KáÒæXob3ÿ+L5À·à=”ó2øøÓãp°ÂO#„„»}>vûŸÐQú|<$>‘#ôi£l³àK4½öS;™1ÍB}«ÁD|:á¥L GÙGéÎQ÷Gè­æù]ˇ!óŒ$‘!C¿pÌãaƒLÀ¹aQÙ C–ý7¬8ýÊosù<¢T>Ö‹j¸U±r!o#Ëô-s>®ån T'Œ…+ðY ÕBú6N»áû›³uÓÑ'¾Ý”¬;¢û­n·û ÆŒb¼¯àðLÀÌßL™u8+=¨)j+}šf4£”ÜJ) %þ(¹,ƪ÷H¨^ðabí?HޱÖî¡ >6º^nÓ|9„ã–Ê5¸^X¢¦øX_xÛ–Œs3QP—ÒJ·8éÆÓÂTÙ¸þ¾5}¸öˆÇ£˜.Só…¿=…´çf¨½W@F]R”kB±¢7G>:ÜãgQñìÎç1?¶Âã¥Æ N‡›Ù9òq^ÌlÂÞïÒÇеþ·6›‘²] CÊÞi~r¯û‰qԻnj2e|}P‡xpG³+àSK¥pݺÒX·LšïI‘U¶ô8ž !1š‘«`A =²d…„Ó”9¿ììUjwZfÒMNk1QŽ¥âûº§!šÕsi ˜(ž÷°mjá’ÝtÒ‹œ7̼ìÉX¿üŽŽc­™5Î|2kù5„Mp´/éãbÖ½vjFy•¨ÉÀ-ðÎr$"_®®}ƒ¯2»‚€¦ sžf±Çmmj‰¨>±T”ÔzÄÛÉœ”gyó±`Æ)Ö359’%áÇ1 ¬Á±9^˜Ñ*Ý1Ó¥©ÜOFq _1`)A?¤Ôè_®s†–ÎmêY¼N_¤€ßTmÇ7=. ÄéýZwøäø&ú£t +ß²‰ÅKµCH󾢯Iƒ”<¡JQ†„¤“KØÂ=ÏYÊ\Ò¾Ïÿpæ-uà‡r•Õ¢^Ö&zíö„J¼HzÏ“K×›ŸâÛŸ ¢†ïøbÒ4Sèh‹ŸdS~>î {ÿã’þÏDèëÜÇBHﺹ?¦ÎåÀ“€ôFNñ<2¾¨ˆd&OÙ.ˆÈ^â—ÑÕ’XŒ·Æ€‘ˆRa V$üÌn 0q\º´üw‚ ÂÇ{è鎌 ‹±„Á½ÙQJX®GZH“2˜X9o¨Dö¦£a”²*Éb|ñÄšAºÄ¦¥sw¸‘<ûw¨ª«•[îïÌJýR€ÚkF1ez* ¬#££O\¾¤™òöÁNrþÓ7Þ¼N^¿ÿîýyò—³7o’ïOüñõ[NÒUGÿ¤d™Ó»ÙÙ^©1F$É,¥±>ŒòË;0(MêÁ±]œ¯DÒ–rcø§?k¾¼ŠŠGÏû¥ÒróB|û3žOWkÐÝs~Μ&ô¤ÍµŠª, #Tk˜¶Î¸2Ón½¥~«ÀòÏ„Ð\v`Ú¦J¸ÅU«ékæ‚™µÖ1²æ(7 7·˜~hÔÚ·ø6žÎÇ’CÆvê+ùàÞ3#³£®ÓEU¯DŸPÞ¶_-´.Èaåú<ܫբ#A¥ù„679 iº-±‹½:ûöÛ×ï_¿ý ý]«‹Oôj½{¢-ˆ ¬ŸÐ•°åC9OɯšhJPý(ŸOniÀuê6àŠÿáóEWEü-t¸\£a:Ö'ô?·Z <¶r¦šèÈ#ðLûw-¯hN×ï`uoZ›Ã|.ˆRð*ø†øÊ17÷¢³µ;4]ßìŸú}>þ¨„ÎÞ‹MZÂyM†!XÖF +#XêVÊÎÔµ¨[´ÅÕdÍ.'‚^¹uª,ÔLq BU'RÊ]80èå ÉÉ~°¨lñÊˤ·§ÞaFâ}à^˼Rï…h”Ì r–[ɽJ~+.+ÁNÅJ\Œ¨&i>¥I-ïC|F’?{RxQ2†Û7©N6ùÉ-7)*-rš@å£ ½wjûT2ÑZ„ðjž»C•o6X£ /WS)µ]‡0`VÂÈ—f:µOíÛ“3 gójUf••5@Œ®`áäj«X C¡ ùcU• ù·yÚ£,/Y¶.©­c«)žfyÁ£E´1ÝfÝl¼zz}%—ðÀS„<]拆¾¾†f3ãùb5­‚ý{„þ¨#œ(­3l†Š»T³˜WE ÜD ã äòeþ7Á6b2„\PØèq¥øü!Ã'uê¹úh‚;£ „ýðHPð…ûå ×ÿ®]9©Åå=™Ç"p§<S¯+OŠH5½èuàü{ÑÏNØÑë®±'ÐÐJcŧq¿þ—»»XsŸÇà‚]’J3 –}6O¾÷²£SÍöpjò±H-î2¢P=Yx:Î}­JÙo&bnx‚kÏ ò´0œûq£¿ÝuÎj1¤X4§pÁfÏ{\r»39¤gišØ}Ø>ª«[$*O±'di7HÞ †¹É”á¦(ÎÃqOì§®àž,‹À-%=@U¡Ì70§]ÍHÅý{‚@oòìvC ÝyÖ M!Qæ*”«ëP"g äRÍ[®ÃIVCŠò|@—f“$C£°PR>—«}ø™÷vÞšP²ñfEá ˜ó:¸#_¾l, ¥äpª–Õ†´Ièù dN~Ûál rXØtdîr˜Â§“¿‰Âøíc¬V!ó³”C»0<Š)éxÀ¹òœ\–©ân¹  Â*–êé}ÈÎWfÔro,’5ª¤¢ÞÜÉò±4ôqIÆœþóäéS -57ÓÜÐÍkËNeîîÓ]>G6Tp`ŠlªæÊL³Iý#ºW6?xL7Ý^³õ»Ïèî²X¬ß:¡[´’;r§Š’OV+jîzOõÌc÷?ö!‚ªà‘nõ$Ú?h+µ ð[j5üøì(È  ­^§G¤’ˆ©(¹ç0!ZýNŸ®¯ˆë£^ë6|¹¯ý.Ôß"éÿN¾‘w‡† q÷õ îªÀÌñ;ÓG<òõkOc”|õÇå[Âl¦-€7‘*.¹*:´½ø+<±š:ðÐ. @˜LÀ+Mò›þ32Îü.ËüŽ"øjC(ñÍÙ” Ôº¹¬ïäõûˆ,&ü,ÂLîãíb= ïù6DÓ€x;¥´Zaí£êwéE7—¡Þü”LRˆ8‚½Ú¥þp—M+©þº"FDúJš‡îq*Ä “ðûÈUú„yYܲ™ÆÍæ[/ìyœhgë›Ú$Œg/j3•ð“Ô®Üâ¡{sÞRÿP}Ì5 in’ŕіªÓ%yôéüá¨SÜ{ £ëî‰ç|íMæËØœïvvŠp£|1­‹Ÿá®)n.Ú€oÎúXʼnTúµ|N]Sç8®•¿ù‰Û(U¼OÍEâl ô& V 4<Ýo,-¦âÙœÛðG/ÝažþK (l‰K›¥Z^jíáúŒXhÒ¶œê=To"°šp P)MÀ*Ýù¨˜n‚ULíº¢Øo$ßý ð FÑ—äÐËû!³VlfŠÍ|±¤Vní±0zn¤w±æíûjÏÌxÓ¹lÛúÿÐHF½ÞïõšFÿ´“Ï>CXY ²qôúl9ÎÓ+d²Å sþÀÌöúÍ÷ÖnE³ï'ÌÝ/‡=¢Uê›Ë´ÿj?lîÞ;›T·?Ùé$LJäp°–•kÞÓ‹¯œœÔß¾a@Ü”Þð¾}ÿ¾Ç‚9¬¦œ7%c@Ûù(Raž‘}¨úkÉ^ gÿ×ùŽlþ§Âï«Z…hÍxâÂ#YÕµgús‹òüRCVvžÝ' ²È§tè^\œßr¡æø®·j=3ÙwéxœÝ-Xá}«QÃû Jbz€wåw~)i\êOgSêá-9ùEíÚk9}òÖÖN\¾ž‰³¹ Û¬‹iQ)—¶“\–«êšÿØ\9@Ü“¾.÷»fv¥#&2nCÒÊ®º«oݵќŠþ þ]»­gˆ©qª+%fcþ…í¾ÎS„"Öâ4éÛYùLJ{j9ÙBÒŸcÓCñ»Ë–ýAÁ`‚ _ô•w—p $ÕI¢xRMr›E ÐÆš>"†a'/¸  ×>\>í# h cž<º¬Dž]1ƒ¸¦ÂÂ&¢ŠÄþ¦ßüµÁóÈß%I­Qº¦¡¬ZgG^Êç%1¢FxøN£É#*Ìqeˆa]©GÈÂÑ[\Ûb.Óò‚]¨øy¤³""•4—•SÒBB¹íGwýbây¿Ó|“Æ›DÁwmƒ>cÙ”ÚjÉÊ¢†~r+Иÿ[;8‚zõš®˜ßªCQg¥ì÷úua事 ód Ûñ-™¬®ÄÚÛlÇ÷Ý·»Mm(¦¹FF5S®÷˜_þ}åéËcàЮáágýÛ*Dhhoa\]ù¦SúúË@Ù×_þ}å›Û-+︓ÿS¿­ k…‡öÿ5ü¾_þw«aë 9€Ž÷OÍîbï÷kCM*Љ6rw¯ÒΛ:ipâÜôµH °Vüq••wZt³»-Y>+ "-—Þ< g8\®èùjõî~-ª$Í*d¹sM_íÊ£»_ ¹âªŒ(µ>µ…î}µëè*u'ûÕµOª¼›æ ‚2ÒÔ‚›Ò8-H²,‘u™„–{F98ùŦwO¯gä·y6¿çègñà"M¶ÓI¦e „¡S5'U­äœ{ÝY^×’Æ,XÜe6*f¢DDNʺâ‹3È ÂÈéÅ6Íb2±_L*õÊÉ€œ~²`ñ»Žì‚Àž&†C™ªmò§%-—ÒmSpÇÉž Œð‹Sù. þ; ÒÝÇnâ²NïEíbÞ–N“.•1僦nâG¹.ÑO€J• TÕv"PDqÈŸ ‡ðyÅä'ª&$—¾é¸·¤³Nò>í…ÃËÔ>2ìåsMÍ—‡(`l´:ÍÖC=š¦©ƒ= ãÐ)„îÀ¡ÉîÞ/HÖäBw½}÷! C+•ôHã´ìP†á™*ª*×fÒDÄÏëžë/¹¤Êj%•UA@’s¶èÄsB)žgÓº2Î5ê˜IRJ˜Ì<2?Rô'O¤^› gjLŒ\%•Ü¥‚Ãb>œLӫ稇L7<Âåüé4¿DTK×ã÷pÇ®i¼œ„+a¶ VØÑ4s BL£ÈóƦЩl¸.FA!cÖdHq»Cv,üÝõx¨ùhÁ§4ÊËÑj&ŽÃÌ,pSî;„¯R•ASƒ%dæ¡B¶K!ù2›»é!Éõé’Wçq ÄUá¿ÅÔm 4õ:wà¿]µt‚šŠ}ó!ÃWv m¢¿¨;Iýªè=ñàÈLoöé“ÁÐi×”êj;l×)üñÉxùñ‰OÂü,™U›‹^ÍÓ!Á”sÑó§£Ù`sé÷iTqq=ÛÍ6cJ#ÓfKÑ×w wtt¯è Wô¼IäñA˜ˆ–Ýg v¿Ž‘4‚,ÀÞe‚¢ue±Ñ0¬­Ÿ2²\q"¢ Àêçã·Ý´¹Õˆ/Ú[¹Âp2P­Üä+Çç¡ÇFŒI~Ò 8Ïn*àzGk ñk÷Ý?”æöØr„ôm‡p”0šÔ{ C¼›§‹{HP^xäuÇ‚;Ž£Õ|"üyÌ[ÝG6o ”ÑîmáêÍøÉÛ»Å@çÉÅÍJîxÌçÕú™v[K’¨t¶‰Þ4ÐäÜ çç'!ÅÏÊÙ'Çf`«ÅhYÎøzƒÈ¢sÑ:ëá¡àPÓ[F6qÏQ"ó¨ùžø0ÆÚ4í$bŵý¤ÿ—Ä8Æ@ŸxUQ R„P„§…B‘P‘ó(}+­—1Ž3•óÕU3Ë5ÄZ+aõ}ˆ„S5+VÉîÍ.ß ‡§œê®q2’~ô~$swšŸ/ÜÖ|êZ—¤ñë®-ÖrÛ>AãŠ߯*#ž§ì™žW«Åó‹ÁE—¸B刽,3ð$ MÄgvs8Ç’|RµÂ4v7ú™HÞ&/wÏ¡ˆÕÅAš#1'ô»ÈœŒÈ6ÄK3Ò5Änk± ÛÑ‘úÙ{ö¶­,[ð¯à*©P4II~¥œùÇ©x*~Œí¤æÞ(EB$$!& @JbW×ýí³×~œR²Ë•éù¾¨»b 8888Ïý\‹ÖWɾùrº;ŠzCÔê“”ŸJÇ|z¯ä«_&Á˜|vÄ’™›u ‘KŠÃ¦’{‹L"–MYrâp¦‰±ïz¼hÿ¤Ë|ó-f×QK /8Úð­A´ê!Xt›‹ë‘]jsqKV×é>ÿ{ZKF£^XÑ=üÝÚðïv’~“‡7Þ9˜‘ c‡“äò†$9~駦žoÜíøõÛ& û?îÓ.鸱º?†š×Ùüˆç1¡Ð,—ÔöQïaà=öÄG½G›‚X/r9ÄŠ^toOý¹CI€¨Çíì,KgGY\o<¹ á_im¿2éMð-UE‡/^8¦/×uÇKÊÊíÞ=¡¦h¡XxY6â&@E„››ƒDÜLÙ'1b““"=ð•¼Üx-¢mÁÁ˜ñ¹:¿ [¿Ç™‡ëٳˢ ²‹Ø¹ÓßD6¬Æ¤òq‘–€xîêVçsEãM8ò{|YäcÖ0¤Ž•¬Ì¸‘z¼ÑÈ~xýìs‘±: k_;\!uܶ‰}bPËek_ɬÁï¸Ò%E=+—­ýËËýÚçŽY×çá‚—.Wa%_°²¡†9€ù[ò÷›eéH ÷÷7ªäAs%ëѬ’(lGúãd?ùÊWS…nÛ~ªõl¬shçæ³Ç“k€iËœ;jÈ']Ïù»ÂÂÛ3J©tÂá29lÈÅÝeºÚzüÊ|s5»,6og§K~òçÍ[¹Üúô$Tªã_ËA• ¾ U *f"Ä©~Ãè׬¯Þ sl3iÉcw¨.û!F%Hç*æ“ÕX,Ýæ6qÑð‡Óì’ƒ¤u•&™ÚYóÖ<´V«6­º24Uûë†$umó:‡œõÄžü)‘Éàcø7Šò˜SChÆHáö=L‘±<ô—é_ºÎ7ÛMué¿ÑÒ¾„æ•V&«Ö¨!éõŒjêììÜ 4¸SWWIV–ÁE’u¿B{­üØCÔ®ªlȸÐÉîæ'›+ë¬(¦YêahÇêÇòβzóÎеU+¸ÕÎ>æQe5•*‡OPk©‡,7X¾5eF‰QG:ša³è•çÌÛ¤ŽI˜(cÑäÚå“Y#RÊŠr22?ˆÄ#»Ø±tÇ{z¡ú‚dØ›rQÜkM±âíP¹×ÒÖevQzþt9ðqÛI-t†XzÛ)ó±9T kŽ™Ù‡$×}dHó«Á ªeœ§“+î?îÝnÃmkN¨ µ¬Z*óq6üœQ'cRMÒjñA2ŽÃ9†Žd4/ä S‡öƒ>§ ‚¿q¤IŦ©ŠNä†FaGýû>F]IÚ'å΃&Ä+ÒÚÃcZ‡]¢¥­,kÖ‡=§’ö?Ó±¦)ôüH”ÃÀìƒÓ,lóÃÆÌr—Ì-…änÁ¶R-!÷èhRµÿZ¤ûéw«ªç.`ÛÒ³…xÃ/mE“‰+æK ؾl¤$T…ƒè¤õ©Iè=™ŸOóñÒOûI«ÂRs}“‹|"nWµ èBÏ$ŠD‚‘gΔR/!~ óÂÜ¥"‡0—²Y3ÇJ7]ûf5ÀrGmG™bH€l«¢B¸ N^ERöƒ¦¾sàƒƒZë^‘ØC»¿û“^A".*ˆ™\%ë^2ÅRAb[é›Q‰Qã5z‘.’ߌm¼Ýݶû8Tp³ÿÈn±ôéqT€c„‘¡SÂwë&N ȘyBX–yj¯¢Vš-2YÉaýÞ£ûŽ'éø¸×pBo§½îCÒ”¼¤yÐ뻥2`õF…©ËbÜÕ•›ýHýòDÝY¯…ôzÁf{óñéþŽõò<Ïõgår© +GäñÕë³J¢;ÜY²ìLÍY<á–•¤œ[8«K;-¨Ö×’< ñ#\ƒÚ.× uëëqcæ°’!§þ¾*–þDs$òL„‹ûHiõ_åÖÕÓätŸTàÓý€é%cFŽÁM¾ýÉ Ÿñ€€ßw(;4 ƤºaÀöÚðÌ»©]GzÃ,—êG~ú°šòæ¯F=‡nª)2’åÊÆñó±[›TÖjÑg ‹r8+&+Ž-µpìv'ùÅ1¬ÿJó!?ƒßI]â_ä„þÚnªWÉ?¦’-–C®/ˆZ[.Iñ´AÈRÙe[ ,2ò¨?*¦¶ÔøN—Kz`-:£â0&öuyÙ³Ç\x=:8ß-3@ÞTÂD jÁÔ±ò»Ï¼#¬¯ß3í—ë³…ñ6s ô†n¯_+…^zÒGpW&„ð%{ríã¼qÏQßÒTða=M•C­,‘SMNÕšX{{e¶ÈœÁíC¶Þs¶MÚžf↎±rûÑ”®´#Úb*ÛZEªR€¨àØ_•ì‡wP¨É·ÒKø>n/7*ûÔ}îØz ñùB×"K @Ó°}0äûóº°Ö!û›¿3?&‹úp­9Œ=†ÇÎk)»Âd é–6åçl¾)³iÆ€MAÌчÍõãcIá“#o˜yFÉåáp–æóá0~^dˆãAt\ÚN²8Ý׵˟ýØŠ%‘Gy§´á ü¹âøž^ü…¡,ê¯úò‚ÍW04Ê%§,˜ÔÝÞ4p›ÚÒÊw¶–õG‡^‹7ìÓV)ˆ"· 'vÍñyïÜ^œŠãj¦kIíÏÎÏóq®t™+ö r€ ’‡®77ÇBtýLgnÇã„€IpMHÄù{ˬÿ­§Ýv‰ø_˜y,"ÿK3MdÖÎ~þ¶¸q:ýQ“½ʰzÔdÓðV‡1Ô:dÆp|…(»Å†Gˆ°mëvxFJ~¤ø(9 j4»c-èU3瓺”X›(!`]ä7ŦTâb² ·ú0€Ü†vâ)ØmèÀ¸äŠô…æªqÄÙFSCÕ®¹m¹üj¨“/°1Ïð˜*L!•6ä¿[Ó³"Š7DãÜÄPC¾€êë 6)ÓëÊ}GDƒl2"Û‹õž“b6 kÀïC0÷¯Ùö‹”$ä*¢íæäK¹Õ`Å¿:Ïä«jÜBÓúž¥'ÚÆÆØ½b¨PÒnjú: qÜ?Pá¥XÁG¤^‘J!Pˆ7HèsÎ3ÌÀ.ªÙÖ/ Ö“ÐÙbÚÏàŒ4ãD)Kdq‘"óf׳ǽ€cÄ[aŽÒ*(´ËrõNµAU¿¬îK<çu¯cÖ½¾‡ßž?½Ø¤vñíºâ«WoUÄ^/²€ÛZx ÓIsÊ3<ÌXÇu·‚gÛ^X RÊbÔqàkN—ÅT.6ØoœÇÅêßY»›ž±°‹v3dZ1ÝDÉö°ú¨¾¬vVÓ1Ï;Ží„a«À=<Hº[Kq„lv8Ì‘šÁsšâ>VûOÝŽX ­¨]û¾ar¤9uÂåŠUKëF:lD¡õžÝTS¨„¤9b·ªœ$w¡ó.¼ørJ³§œôM{1k Ð>Øgp™†»"í߀«ÇUá§uzŠ[åì%}ä?Ûɹ \å?ÿ+ù*(”r¡øoî™ÓSÄôÑå©vü:øð73)GeÞ)ÇÍŸÂÏv’ì—œ´o‹5*sܸDžè—äO šœ¼~›èŸhÌkÚ#­‰;]Ñuì½÷ƒšpÎ/ÑÍyUf“Õ8s ª62ΖâbEƃÙë„_)~´eQÐ2./¢ôÝÖ;Î6)ƒ¯àÙi<®¾qÁüÖƒÞZ+™W>^@¾·¢î=|TîE Šáß`- ý|¼˜‡¿›´«²±kTs¤ƒdÅyÖ „öËBtqºn‡[‹|¼äoÈ{ß̲…`ð,g˜óä5ˆgrö÷yò'Å}Òߌjî¯p³ÒºBâvë2j´!M;@aÁ]¾äˆ™|ÂN4Ef~ሻžHp6ÀÏŽ£XWÙÒ\YÂ&ôÜRrÃS0-注àŽHµ¥ a¹á/}G4Ðݼd dr ?=~S^ø0lD²øÔ‰/<æâš/æÀdš§Koü’Ûû•¯Z%Îú <;ôÑIωÿìcΗkÁà,(ÔÒ˜…]ôšn9ÿ|0×$•ùÕÒ ³`¦¾nX˜Z¼dÉN_˜0]פö¬ P»Gs/ DéõL)T¹GMPO-á[\ÆA&õ¼¸Âì±)æ:|üV@q ë÷³l:ýv•O'¦× ¸#Mô“\CùÔHµŠ7p°½Ô*TÎ]@´œ„Â8ª `‰‰Oýxš¼\Mß®æßçL'‰÷ÃüVï*—‚mˆ=R6ŸÔhW#BA³&~FÊrÜé~H ¨½þãËŒóðAϼ*ÁàB[j,·µ äÌ·Ì"[-5°3§ÝL6­èsdG(>¼/lÛk—³í‘U-»½^PôDzb¦ÄQveö‰á¤Bò¬˜¥%Ô¾¼Ó ø©T»Ñ4_= K ¬ —Ml4•®w¸Ô,]HèÀÆm•“‚³û¥´ªÜ(ÏÁ£MàEí`¤C—Cë` Ùj²YqR_@»CR‚©ÐRK°® _BñÆ©öcH¿& ò+Ý›TˆPc÷ !îuâ§ø—¬52ÛŽ›‘˜'·ôÆÅ˜ïïÔÄy81–ÿ÷O/Þ'38L.2¥ÐSA„¹”™b rò«ç?½}ýÊvõL»[%þðÚ¿÷ò¸Ð©D> «ÓT œ*gèª0B/J‚×Jðú@;aô„Ä÷x2ÇçQu¦EÏ…7ŒY~6 ÙjíeË:ÕØµ–°pdÈD©ialŒtÝ„ôÀs–#ÇUj (÷t!VŒ§ÏO³ôJcèðâzk4܃Œªwé|‹•C¯\³1+8Û^u¸jµX JZ5ú.äàûRöήÈ6µI™U³’næb¦Js£Ø“häàTï–û^À÷iØnTé;—5JøÚxNÓ#ŠàÚ9 œkíÃd¶=ôñ]¤i"ÎIƒÝñBîïZ’ÏKvÏÕÀˆÝ‘Kq¸3´ P=¹è ÏÉå:ºKh™×“m>ãÐVuÍÛÅh3¸Ê'a³¶Fü5‚Ã7Øöf`K‘« ñ€Õj̲ã“ä\‹îÞÌ–Voãx¤(á¶Psðï-A——¬×¬Ù âºZdI8ãp€©n£Y]+òÚ,“RüNÛfk¿n‘gÕ@Oê-ùds=[­Ñu¡s†(ß?Éÿx’ôkž¨2…ûù  òµÿÓ\òE ZóB¯ÒVD¿ÁÊtÄùM]Îý®< qð(ÂðÐQA1 Çó"Ô«åêü¼cÉZCwËì‚c½5Üœ¼xm>ÆjòjQx“ø[‚Îë®æ´x>´|dæ}>UŸß,4ód6¤–>§åvgÎ-ÓU_“ã’’h3l,6°b¤“¥ë-å2æpü9ADY;ÐÂÐè„Ãq#Íl‡CãºÐôí*xD,©t]üÈ™èmîs5ÕÿÏü…/i@PiGÇîœ~à 7—âfêªúÎWóò§wï9Dž'Ÿh¸ÔõÃZë?I›zŠÿ~Cÿù³ýr–F¬`ôÓ¿Çã«¿ ‚7Ñ&ƒ£C\¼[²Çy†ÀÄ+¬z^ß‚JŠ›|ÆXd‰£‰Ò?á“‘AøçOÌ ü3={-R&.SMœñ·äÖ·Q©û³ßn×MŸÎCØ=¹«6‚Lj}<úß)åGŠtÊq&5H‰QÄo/ñÄAÖY¡¾>3ÃÉø‚b™ˆyðMBý¸”DýÚ¦¤Dh¢æpV« f’ã#»h^­ØúI=KãÉ;AÕ ¬.ã±&­RYPä‹„‹K*Ût9™@š9k>ªLlòµE#T‹ Ï©U5FQ ²n)Ôþ[·CãÈ®¼^ªsð/çö•(Ŭl÷¬Mоó¡‹¶!\vrãÁ¦8â‹´ò]Q .N’õ½J Í$ÅÚ4ÄKšÈaàrf±t¥‹ë}3ÏD,Ml0/»|—˜ä(iÔA,0]˜_x™M™ü9_Še Z›€ÂrÀ#­ºp(Äc[ñgŠk޶»Ò}ªðÉÇöh‚«nQBXÓ¶´r}&9µö¤ä_oÒñHe)ÉyRKf #-˜Ž¹I:pÈбËÙž´G‚YïkÖ_[â"fX l.¼AýOÖsyŠϵÈ$?.Jh<wˆ‘HÃ?gLÒÁîuƒ ò¸FÙw\ÃâÃbMGôï­q÷õ­ª¡>uvÝç^un«‡>jg=Ò\¿U±Jʰ‘geq]ixüƒ¦h-°ob×÷–ùr \å=ú˜8úd[ÉÅzˆ}#| qðô/ú8bßÝ«ÀZ¶m#bx@M‹C¬B†Pl=²‘Ú!4Hp¤9Œ)â}Ô\Œ@{Õð5ó:µ\PdG«Ö³³bª‡¡Ðùt¼ût¿:åЋ©Y¼ \jËηÇ8Ÿ: лv~ðöo¥¤àÌJ—(n&Míï-¢ýd² !ÉryϾF‡ivYŒ‡éxHÕw¿a9Dµ]qYNK(É/-¬3aÌîbhtzg±ûM‚£BA}âWvŠAõaþ>Ie³5§²Âý#'4ÕªAþt!"Õ/§û²#Pðt”Sü‹H(úûË×ßýxºÿkÍ$¢¯éJ’Pë²ûŽgQ U×AŬ¬MÓ}ž;R%×_$V…/fB"™€“MâR&lh.ŽÀ—¢žmŒâF;µý]±Ü›¶(º:ÿ?Å-#–ÁpX?Ãâæïb ÅÛUmDlcÑ ó ·Z—èf¦é«‹–>ÑîVqA‚=Ýÿ²JZ_NÚÐÝ’½‚ÞοÝ>ÍþJŸRýôÂfãïòN–Áí“×I¾ÆÎmÛ—H=ŽœÔ—Ì>( KÅÅÖ­¨£ÂâµÞ éútOÖQ“gÙ$g‹F]ÿi³rÛ\ Éƒ©ZA=Ó‚ml¯ÝÖm"'4:çæð\Éý£"LФÔp¡KóƶýöÞRwÙW?"“¾|ó‚MÜo~~Ù6û,ÀJÒ Žn ÀeûÎ+Tû"§É0èqÔ«ç°y>€€¤ ß܈xiÖÍ À»’™w˜ç3¯Ö2ønòÑuŽ»Õêl–/AŠ&D­ù°“µÚCç¥Ð!˜{ÛZHEàË'­v,Ö´YØ)×í]ç‘0NWÁ^R÷‹t9}íì +CfUìvW•©À:ßãí÷¬ÌÚûM³zQ2æ‘sµ>hÈùÀW!ÖJ˵.ò ÄáÕùy~³+û™&¸pì?Ñ“ß åÁORgFŸ¥Äݘz$µ( 8«`bsº§éÉP?É!Á†» @ÑÛºfÃ)=Øe2C„b¨PÏ}Áè ¦k+~”T5ÍÏØ¡9‹Ô;Ç2»€"M#ãZ‚DŽ|Z•ðm8C°Ä‰¦óÂaœ M”iÖŽ¶ª”½…ÓЙWÞ°á¬qè©lµ¡ƒ1¬,¹°’ÿz.9\p@šTB0]Ü+˜À–f2Œ¡ú¢ý Ê•#¶é­ÐŸœœWî"¡lš´©Õ\z‰€uðuî EÞ)J¾ì‹ý¨0ê¸*TºxFhÜE€;›TÂóyf°}ÎÉÖ3ü0;¨¹²-¯TpŸ §hxv'ß§¹¨zî6öƒNP\bоÐÅÌ"V)˜n ïupoÆ£sKC\’~Pfå7¯_¼z?|óöõ³çïÞYbÏ«çï‡oŸ?{þâççbUëÄ›fØå{ó2'}mž-±· bY4&ùjXü†ÍO >*Þ1šÞpÙÆóöâŸ{åÎeØL-·.ê6t®<¶¢þyL΂µXœ¿S£5Ëh±¯#‰Ës7ˆqÇoéCf’Õ™\l°#+- ½Z˜IVg-1½Ôl åè•ý]^úÕм–I&í©Z5e›àN1DàØ@û§=[³h¹ Ç…fÑ£hÈ7ù†÷F#k²G¢¯IÒ TÀ&­K‡È€Þ—¸8׫CÔØs]ÆÃ7nJ·)(‡=qú?çSŒck ÍS±)à7g<ø [uÒˆ'ôË¡vF‡ÁÁakªA Hê™6ÄâxFìE¹$¶§žZ H-³òpC9žÄl:íN² ÛÇ+åÕÖ,¶%ˆP(ÝÂ1„XÚŵ\lˆ11fðäP¹À³³å>m­ÅjWVê[޶H(ì”S!ætØ/e] jߘÐù)íj‰9Òg\^ÿ·üßh‰©éS!/òýNr?LüœusøC•ž¹ƒ‘Üë$'1þŽ»u"IÇaM5 ü~»&¡›L_»:ÓrðçÞÐü ô¨ß®ÄÓ5ßÇ|gƒ'P2hNÏ«,HDãhSÞ²xöˆqòLŠâÚœÑô, pÂÙ÷ð؃ɃLÊ&0¹zöÙŒö¢]B³‰LŽ×!~ ‡Ý§ùøGîºí!t“óm8Ç3‡Œ±X1àú€¤jË¥[ÌKÁlØ…Õ—<”Ë ÞL±s[±Öÿak`w¾‰E¯N°¤"Ž¿úªF·Á³ ‰Ý= éY½ùÀ­:þà|Y…x­¬ìt¶‰lšVW†l„vÂ}DâöÓ©4‚8è>„ßR{‹˜Baz Çpi%Z}ìVë}§>©†ÞÑډ̈ ü™€£iPíÝn—Nмã m³ a7š¨ì½²cë~­Ÿñ¹Tôûq”w£7áßK2kY¬æ“aYœåZ°É®7Ÿ…åv),ïŜƒ›‚0ºœ‡zØ÷çh\/æ²É8ôh£aòäÅ/Å&%Ç™ì¢(&fûr›×lZì}Õßën :oÚmÐÚÏóžæÓô,Bnx$ñþ?½x ‹ðd§È°Ê.äfƒˆíy³¸xë†D'Yë¿7¸C2òZÿå¿ûú÷.Z)A±¹¦a*´lØ kï’Ì/qðqXè%3XÎ#æ >8ø¾"¹ú¾8îõ<ŠÅ,½AÒ‡\o8·/ÁÊ`hZ¸.v5–ÁÅ;3#ØÁŠ,ÃvC<¦#Â6àl%»©p LWgo£¨3KKý ù¹j*ΫPºöD¦ *Ýi¼"Ìš&r‘bŭÈüÎLîǽÜý3§€KjÃt½}¿Ì¦ V ŒøÕ‚iEâ¦Õ&¿0=(}4RïÌámxéð½Xîh”>íìî{¤òî™-¢ëqÒ}üžÄ4±¾—H…¡½À0…"TÛŽ]'§Ž{l’hÏÞ­¤ŠH:™ //%ªÓpïC%÷üøñ‰ÃРš,—ΛËnX¬‰á–rdï’d–¬Ü¥0¾ã¸u ´PŸø.Ó9F`¢MÙª¯óÍG¸m‰ ¯«OBÐÞI‡xãÓétdX„*΃¢‹ëÙ¨é'ò!^Bcf‹ÜË圓Årj¢åwvE¡9hrtE0n÷]¸m.ND·Íw…¯ dÞWÝÌ>‘-‡tè  K±-üA9q­å»¨»µ;ó‰YÊž@ª'ŸX3MÊÁ»LÊ=󆸠¼¥zŸY`‰ 0é!¼ ˜-y¶ºñK6«r|š5${=mªº){Æ‚… ëÑSø~³(\ÿ| ìï+ohû扂£xz–RXW6Å’i.¼6†õNf/(ÀV$žr—Ó.t0¡®ý¬˜ÍÐ3vbCÒ>ÉÔ•Ž-Ü. µ^ò¦v„áé®Û³R µè 'Œ£ÕÁ Ǽ ^á=õÔãÒ„oç\}}Ŧv¾iо6°®÷rú8û¦tðô­¹VSÿNxX“Vֽ肭|R‡üOÎy ⬭Ú8šO¶{Šœç–žõ©™k({ŠÜhÄ-1Æ&ð‚‡(®X'ù…µ:Æ$æSð×;„r@Añᓠˉ[Œ('or|*Fa}ŒQ—Ì"äѲšã xr­OOîu{]/”8uÔ³LGäü?³²èØ[iàŠu¢ë–;W7mIKž^"ã0Ÿ½óÉ/ƒ“_]„½{™š³6A¼Ó€>š]g21¾:,^½#1^Á¦$CcÛ’wx«! g¥×"² Aþ¸ÈTášÖ4{éÂAð™±Êd{RðàMÑÞײ_;à¡á•ònÓ¢&„®ŸÁƒÀ‡ì’•äFƒ~¯þ¹ll%[œDL—I½ÒõD-üÒìØ»ÃƒÀûxGð:ÉY¹ªv)Ùïè°…·fáh„ú¡­àô•l¼­Réñ,-ã‡ô¯îÆ~@g”Rã¶è ÜÀðìOÖwœ²zñQNb ^+N9+Ü{D|-ià—Ñ!qÀ½í%ø$ÖɺIÒ{’Ï5ŠÛ6ùþ“i Pm5u𤯺^¶&ÑoœáÞ 8]tO«×a,Ù^gpÒ o9Ša6¹ƒ£'ovÜ£~l¸¶O«ŽŽsz÷ ‡ÿÕ+÷÷Ѷ~oó]’!×-”m¸—ž µWý½\îÕ>ÉOé¿©£ÏQ·^t––|¹½×tbœ„³-Q¦ä¡¾én±›NOS 1cCั˜(šR$ì\–Ìf   tÞyÆû½@æ[7>7hznУéùt)â€È Ü l™l^j – Cœ—QAj¸Å©¦Ù‚:þd^s‚rS… jµ©·~µó9GX3¸‹l)û&¨Ø `]·JcCëLÍúÒÏŒÆØ’åy’gœ—c˜îN¬Ûu´ªF:­Ôf;üq°ÃO‹ ¹Ø /ê.Ë¡T®…†Ý(uKꜞîLLåÙ*„eÀK[Éø2ãlª°ñ÷ƒÆÓN'T§= ¨Ìm1#jßbÇ {‹t=ÁsCÊõR:²q·6)Œz1w€Üiаh×ÎJL×á²\-/‡"ÐHº§[|õö&“6Á.c4sù¾>¨Å9'¸Â–ë–€_APØ<@ù‡eÜ]­¥pûÁ,>WŽþf‹*ŸóQpªu¿\?yÖèÞ²¯i­ø+ç4‡iZs· BH‘·Ù¹\l!ùI˜˜]ÙÖÝhýɇŒšíÝ÷¢'ϪüÈ &ˆ\ PyµÄ#Ò‰í;Âi/ãvi¹&¢‰M æz ÜTÆBg0½A4Q]ÔËuÆéR@—±-5äeïy8"4A‰¹II¶—« Bۅܯ›Fí2ük[nÝTKÒFFòð]ʰA¸ê$¤RÒù4'QB Šõ]„˜êS¿JÂ3r´‘p¦6^êù„ª p¼ùž U€U¥£ÖhòH ².7ð–ÚàüªÁºÞ5ÉPãÔW¹Úlxó¥v}©¾Rí¹Œ Ç@U’|–9¢Y4u31þIˆBgVb„¬…„wœ“ZŽ?\#J8[MqLü Â]·IM™ñÌ£Uâ0nð΄Ï!$‰ÅöjŽ-8˜,Ÿô³~6ÊWV™œ‰a¦B÷¥ªm´–tÇ™,#h¶'ýà±q™Î?ΩOŠ)ü3ÏÀ•‚Ð'¶’'-ˆê’H‘û;ßÔ‚¼©D.WgKHÐóÝÄÍßh´¯’Õ†Éòox“ž95+Ö|p»&m³èG‹¹‡ð¨÷ŒdKVµ¦ÖR­—T-8Ti’¦JJñ ¯4'—G…±è„Øt4Z~5YÞpN¢ëåÁŽ^f0‘¾dgΑ¢#±6/lÐ:ÈçéA'9È?t‚ºHWhë7ÝÐûW‹'c½Ùþ¨Õòµÿ0h¿¬½û>Ê!e3£ßVcO€«åÍ8ÂÒÇ »ŽLñxÐpšwïÈ£Xóz—F- ’_tÔˆl»lèg[=ÚP¸˜Uc 9çÜ?þâÂν7a±5”ˆ\x¹Íª+>‘Y¿]Ó¥6Æãs`,ìÄ™ÅIìa} VJ½R÷˜6$VXht¨¨8c×ÃÝE>j|½@ÀUœÖºYÏRÀg 5>W Úo¬YšŒÝ:ê”ýÊ9yWTc6L‹¬Šµ 4ðúÅooèv„T´1„Š‹(<å>¬ÖÅ­>{)¾=ò:#¤_ôjÆì´œÐ™êG§všN`âV+›Èβ¥F^ð7óGFP~Ë~Èó P¿/ß¼>N¾Ú¯˜NÜã?T@݃Ñ}¡35ò¯g¡?¶Y}œ•y®]§(ZFÈò2Û»Éyî0fžg•÷8È#—‚fÈóÛžrÞ8 ðЖK¸@¤XòôüøîNåtÝ׉ÞfØUØwA~H%ÆHÏ^¿}ûüÙ{7í\Ž;;%¦Ô ¡ÆtV&^Ùg¢šK_¦…Õü㻰гTzy9££O*©e}£Ò¸g„ŽI¾:2…ßwÒ‰xiæO¡TU74ÍŽÚ§Ë/’3h]ØÝäØt,è:3ƒfÆAÊó(Hùtɶ¦›_Ž8Ê0?ìö·ÜþªÏ¶Ýðݯøñ°—.-ZÛϰխYân³Ð%} ÀŽMe¨ž Zf¥ o¬çÿ”ÇVþ§“^”+IßAËn‰P×ÑëO—.-ó&ºü›æ Þ´7.üöU܉ùê½èÂyò¼zÜzéŒÇ(ˆ(nÒ$Zû\y+&ÚÁéRÞ<Œhä°ßºùå·_­~¯5êBð‰kŸ{Ù¯?¡u;Ÿ„ˆºÉ|›¥Oöᓞ®I.‚¡Ivµ“â‚‹lè’þÞoãÜþ^0à M³Ã&.k¤ÆåLk¯Ç='Ή›•‡’ €.WífJ²ë] làn}\"xÅUµö™¨h+(ëáVU$†&Ùhš˜òC(ù0²‡½`žâK ntPp.î2Hí&õ¸Pï:áÈ„B͘ $³T˜¼Y%ž;N=jüÊ0{lš4Fí6 ÏVÕðÌÒéMÌâií©à ncp˜«{®ßqä“´`¼¹rA;lgA°‡„ Ë›X{ÊC6_zœ*hßWE®¡ —6†x¦¢¢KðhÑ—æóµ]>Ò ~šz]#|£h¸àÔ1¯žY¯ Xí_O\„´!/ÿ’´É4Ýý^ïËd¼X‰!€x¨õƒ‚U![o–¥yõ–åpµ -7ö±”«™àW4øÔ›WMO´d}ØŸm·þw?µ‡€`ÇÁ²:¶›Gû½- ÉÙ+“ø½Íy)qÞ6[ðØªŸ"Ï¥²‰®‰1c#GÎxêãK98^³G»Ue5(.6t)¹£¶PM[ƪ6Ž…Ü'ªƒ¸!ø¬‘‰t â¥D~T㊫ †šÔ¢d^¼¿¬'ðÃ/úr«å$»’Ë FA>öQ¢¾•ûbØË滢m×ÒÔ©­WyDÜc)oæ'*Ÿ< ¾xI,FL°–m`7«ØEeê-.Êøoþæå¼†iËUÐ帒ÝxÕN¶ÝÖ›üé™Ý{ª·ÔýÍH¢*\Aù¿ÝGkélô“Ä_ûj€ùU_ÔÚßß.›Ú àÀ´#G¿’r{=èK9ý-ª¯îG)4ã°ÐV±wž¦— 7û“å8ÌÌBУGU—ùИ¥Å…èuš¯?תÊñPž%ËfË$w¯E#0]=úwv| ¶Cø•‹Ä UOãxÅ` éÒ²<þ†(Í|jÈÂPd·¢öe7‹’=S f­¹)æc„–ÀÑ€k" P†ƒ€%ö]6ô¬çU•ê¶ãHèÅ(°lm`ËÿT­ G9Ml4:ÇÚuDÖÖCf{4oTQ¼'D©£d×cG»\np0ÕܗꕇQ‰ÝQ²“¨Ëc÷ÖøT Xº² œ=è³xgt†Á8Ù îž Â}m u'k4x¤wüR @ÀÓÇ ÆX‘ššÅyZõ1•˰1,§!–_Òí 0"º(SºD£Ï¤ó‡¡ù|5ÒGᮄ›¹Kn›G!!½0¹Ã+æóUõ‡–pøXºÆyÆ,r§1|’éZ¼~„!+sKÉÈ=×ÈR ‡-SAq°?ËP©œûu“à<è$Gä8HÖSæùð»×}õ×§o¿ëà÷¯_=úöù»÷únü¯ço_óŸ?½ÁŸ«_Cv‚ØIgȤKPÍ[(#MØðá³v_ '‘ò¦ö»ž½GxÔòµZð9(I;a|ܲQn æJN'ñÿ täÒ$5ªÏ›×ŒÃˆº{å¶8ŽÆ[1ßC™Ñž‰‚<"‡°!°[©î#NÏÏÙC@«o¬u³)'²_²ãSO t-mí·®¢:ëçí©ú’«¯Ó;LÊ—C|ßÜŠÑ K¾œ‘îbæ'x\-ó@: &u Ðjû›¹K§œõ4‹×E\æ&¶/ñ›µíFÌmýŽ0©õú›xZ¨à+ä`öã;úáüZûÚäæÉ—ƒ“nÿÁôœ¡øp¹“Ü´ëŸäšKío@ž¬5í¤Þ¨ Ëòàñ×ÌyTÛ­'~6‘tTÆr ¾»OŸ$ðÓåÿÞïõôžôzG'[Ÿà)éõ®ôýÑÑàáÃÁý'GÇ[Ÿ:ú¤w×ßu|48~Ø?¾rôè¾8O‹—ÄTÉþ½Õæ%…ZB¤¶‹kò©ÆhqÔÅßã19dÓI¾ª’²ë\ÿy€(Á\%R çK yož]ÅPƨñKÄS¯JýcºaLã"]5¿§œ ]|`œ¨{@ªÈ5ÈαûATη¦øø¤«¾: ãr¾mÆ,n.¤¹ºËYÀ12Å€ë©Ã6™BÓºß,¤VcÁƒ7ÖÂ%CEÙ zÕ*Îi„ªÔ &??t²°+[hØ“}\¹tªiX¨Ž‹ZM ¿2¼Ø8DÕÔã6Ú•©ƒ¸+ÿ.o[nŠ mð¿«ê4i¬_WËI¹š+xòG~™z̉ b =ÐÉq!V­ÜOžȤéØâ±æ.<Ñ:3 ¦FZ›$‘×0™ó Ã@ñh"™áÏžNZy&? Úä¹=题×ѤÅM'Ó`Û8ÓÉ‹Z‡‰jú°æ¶[êÌ<ªŽ!IFùȵÀ`=¶4,l2M˜œ`"®ÏË@Úì,äb¤7„LíâòIZlüôøõ¾æ¾WÁÝV®æßÖ½|ÿØ€T÷EšïÜú˜ÀµÓ~¾ÏÆ`è1a%x½P)û…Ý·Cµ77<°³|W¦×ÌíK·pyljCÊâN¥ Ü)[?0¨þ)Pzµv葜ÙíØÎÄ/%¶whPå+õ¡ÿðKµËP¤ž£ËJ¥“åÅ<’Û•¼ÓR´]îîÙÚœ ¬ëXÀ‡t *§2wÒU>Y¹À.nL8µŽì¯ á:¹Ž7'Wï%v\(_Wù¼6]¶—­aã58œœ³ £YLW3glµêæ—yÑ|ì=þRCóUá6©Òë1ê8˜ÃµpFg@Ðñ>Á9ïô¥Ú$Ë&T¯íwÖòãqÂq˜Ër,\Ç÷ï7‡ƒ_v¥M¬þž[–ƒ]'‚j‰°ÆVNWĺ2è:ÛªqÄrªð<¹Ô• ï¨xÂAš˜f7ù¸`›˜YZŸ~‘ Š“tÌqÍ¿$í÷CꨕÜyØÈ ieZ{lš‹S¾À(ïšÖŒK½Ã¢ÇåÒ°:¨x$µpû¼ÖO¹’ñf,‘’«­’¯[ ¢£g®GF3¶>~ 6ÅÅ…¡ŒÊ{9Âbï/Y¶H~„…qOc²¢pY]ËÙ¹5`Yñ)¼Ðö(,nÐQÞ¬eCÌ=„Â-á{‡=Ÿ§+ž Õ"g–i‰(xæ]¶Ãó#•¹T=“d€(è—Z©ŒZã]6õù„ÜËj„±ö)ÆaIbX(ÙºÕ¦Ež]w@õRÉóÔĽŸé|±Ób¹'®j@&˜w©Ø,“±£2ûz{„»Aê‹{ô©¨ˆ3(\ÅIôŒx)ßi{WyÊ·ö^e×hמïV 7¬ŽG‹K]›¶q<¤‚ßëuó&Ú9ÒàSô„ÄZËlujfú·çºë4˜Ëí`á? @Ìh…æbf|ÐÛ•Z¬Xe\ü.N.Ÿ;¬°¥Á’ñÀ1nç4ý<«•†³iÎ«Š¾zâ^+Ò§Ê¿Ü Àj¬æâµÞ‰Ãáù„ëbçqØ[õ,ú–J”N,"IùžŽÖÓýÉ^¸ÈÄú&øäFƒ¸ß D¢ü5N+üq*'žØR:£•ͪç•ήrÉoÖ-2ÀÝ9l¡èa¿Íy ¤‚ßçûPq³‡•á–wc èl$ÃÁûç dmY¦ùtÁ4G¼mYÐå$(æoÑRç«­|ò¤/Â+ï»—™gŒƒU,¿Ž áJm ŒÂX‘ÞyžqÝ‹P}Ï'“©†jC’QøM½õ|fM ƒðɸÑÎò}É,ÌÒjMãþV7¹Éª$x3NÈ•ͰUWsÄS—Å´ûŽêÙ¦à¯'þé…É ôM¡œgŽ€ØM|®¶ÒŠëyÖ4¦Ù I0™²råQ즌›'·´,+z’,´à.æ¯ê–‰)å)çUñÍ8 ¼“råxK(=È¡Š‘÷¬½ãžxÖpyW1&¸˜­ñÏkë$ñ3[Üžd4 !:éV ¸†½¸\JåÅcÌ,»ß2ÿg; í" ¶°ŒF$t´*é¯î¥b2É¿+doiq…˜øÛü¬¶Q^)2£¸BæÛf‹)äôÃM”Ù¢t•Ѫ=cˆ2ŸÔ‰—|ߨnt.1‘[ídªÿ½§éºY —¦Â/MƒüË—“_þAgM=šã¨ýk|¶lª–ñéábdýLJãó²,Y¡°@5‘wæŒE¹'À@ûÞqúÖùª`š“ÁSA‡<ê7e2`$Z)Ó {.ƾP=-º‡ð‹r)D°0­VK©|B*Tæ)¨.¨”Å„º ¹(‡â±SW*Z-Ü™í*rpR &…H´ œ ‘Æâñº`ÎfË1S>°ÄqQfà¬ÐÝÀˆ¯în˜GY¶Qš)á£+$Ó,3¯2R:EëZÍ!§ ù“ê*‚vá@‘Šs¾¡†Ro@™l†è Ý9gê:–P£Ýª^”51.?ÚÖŒ£OnîKuÄfý©¼Ñ& dÈ`lø³ãÞ¨žžÌÏæÞNú£pÃÊd¿zÔà.ªïWÎ}fRb³’ª^4Њ.[óýGVjN%ò¦þ®oyè„Ë¥†Ýžf¨`%Ò]}ÖoÓyŽß±óXÞ)71u%oØ€Ýk±v¶7ªJ­’ûê t¹”s¤YdÐ÷1|òÞWm÷n§½5uü­a|Áò²^4EÆ“%# Q—œMX]r–ëJXÝÕêâ"«””|hh÷h³WSsÌ̧º,Wc3<žçSX+Æ—À ÜLù‘¦ð`hÀµKBܸÊ׎á-¼AêO8ãùˆ®Xn“ §óeW ´¨¡$bw’=Y<ˆñ(/váÆ½Qm©`ØŸÞ¾~•´ònÆ xš7ÑV»{Wd Mg«ÜÈѼ4 ÁIbM4¨v=åCXº¦µuºjê寷žî¿gǬº_N’/«îé>gìœîéDp†O‘8¹ìÛàm"¥´a®%é]yhø³-ÿPÖVŽwa4úæ‚…’Óÿ·‚òƒîý¯ÚIê>ÓŸþ§û•xTgàwHuO«ú«Ø~=›­8ƒ­´Y,Ê וÒÆ$C›Aø²`KzÀÙ̳ Ú»pý¤× S•Z€lî_ã,ùô­*sV…6ßÙ_Öè{ÚZme‘0’Iä¢È+ ­ý¾h8a±"N È»nÞ¨#È Û"4…c²WÜöÎúÛËá°¤I«ÜVÂUðk`çNwÃ8ïª4pšî†þV̪¸×‰!©íC›œ {o3¹]÷¯JèYp¿£õÜêK½÷EFì6ÐYýà?"…\n³ç˜Ëµ€'B˼~P7—ê$u'äö‚Ÿ.·óXO' ™‹_püÌ‚z20)Z•×%ROçühoÂ_Y×#¿8Oæ5îç– ¼ÊJ`ЦóIâK= ˜¤>bH–wFüáBžja×âÜŒC[ÎÖÀ‘úȯzž ¸>(ßÓ¸‹•êZþéÚs¾÷ÅON%-S¢û<–ä¹µ¢ÛЕրÄ$˜m÷4×8H剀>5¸A=Àna!Ö¤·µ”Ì>ã¹J ˜áA·½qÒ;òÁ_¹\iŒ±Ò¿[ð×I/‹…t°˜*ÇÖI¯A@Á~m‚}ðHëW€©»€{½ë‰×¹ã»h˜–Ȭõ„8¯ŸWõ`^håüRÛ¢^ƃx⤗— 0/~²OÒ5™×f µgisJ_Z¬–ÌïÍâ—@Óä‘ê8XsécpG#Ô.!9ìÇà?ñÞ¦û¿nFö|Ò z’‚³ÔÏ‘/ºÝ=÷¦Š»ˆY 2rxu'èéLPti4â»BR€5’Èû„ªü"9›ÇUsrFܰ›É.„›‰µå° Òíþ¤ë OXnX<ùЖ¸¤oä„EXmäŠmÛnºqXNH:¼«ETËÑgiÎ@›g©@SnoŽ,ß ¸ür±A}††¦Ä!wƒsÖÓ ¶†\([ËÝ™ôä%Ð R&P±À;›R†Xkv:±*š¼¨%TG`¨\ÎÙRÖi/gfWAÖSùRxoWS™ŽqF_u’‚>†ÎÞNòº“¼ë$ï;Éu’Cd±jD;`gÙA´+ã ñ¡#)·ô )/<—‰r;Hþ"_r8íÄ IsÁíüNs ùKpþ VJÔbépÜþŽX4…Lã {‡AŠ4%A•y1ýpêªù·øE„J‡'‡„±+;À8¾Óï5`þJM­x‹¶ý ž¿¬¶xVG˜¸ÛS$+7Aîd-ÕÔHJ~™¦ë |&¿Þ­®ÅLQ]½´£î¶}W¼ß‘¦ Fº¥%|±s¨Ì|Z’æ½)º­/ìâ(`/`ÙÒUÃàåÌzÍà4÷2A„sþë[+ÏÊ­¯óbVL†¶õYô®Ð­f–Í,ùÈÉJ¨±à(˜-…A‹Á-¢Z'@¼c<#XWÙ‘ª;L§½"‹/Þ ±)¬SãäôôœÖë?&ëþc²ügò”>3Iš;D!t=î^¼`@Í._{Ý39Û,MÖe"N\¸œ]ÑåH\`z¹)ßâ5=Ój#òÔ˜Ršsmp9h7„BŒu› "®nIòRÁŸ9«q{Çë{“¥k©À)ÇQyÞ”&µÏ‘;¢.tœåØ-Ͱy1?ƒZjÊäm×IÖ+Ö—¶ëj0voÒĨfÕá©.¬Ój¤&~˜kF|:¹Âµ>}ÊOü9¨É]#5’\…7N3!2¯E*¾]*žbוM ËÔ”SHñô5¹JW*K›k§Ä8¬SˤBͺâ´">‘I…׎Ì\àô.gÏP‘8‰Â^k>.[d1[ÈF+7[JYª•Ú6÷¦{s_p;ºqñ§ Û©ëžü,öpF¯6‚•ß9# ¸ÉÁ*h/QS9µ ^&²Ô“Ј*iõ°ƒƒ|[GÓì‹RcŠlŽ£F78˜âÚðF}l&ðYq…ÄÙîÞY›^àûZê[û UgÔ"÷[Oãn\Òm8v2ÆS!REBsböXð§$-Ø/Ðc/ÉÐ\¹´ØØ AïóÄãiK÷æå¼ß“ÆTÝË‘É˽*òZúHý–ã}mî‚ÆOÓ›%§SÎ뜅;$Jó,·Å9 Îzú eŠÑìCçå>eWÕÍR„ Öù䃹7.FóÚv¼\*šYKΕE3ÀÏ.^=ŸnàáÔADOuÉ„gŸ åvs³ö èƒló7;—°¿²([vë κ Ûuédâ!æ­a]¬LŽ÷cår[®t7žÕmÏið+K´ZǶ%èhßt@TR³íH„0e~Å;‡|MsJÚöõLÏAqÔÌ^ò§ä†þ×7ó˜ÒnT3Ròt¶¸7ž ¸Ó]ªÒeõ«%ør43Íä’¹íÇwº³‰†vö³–¬¿š9ãz=§NOño9ûý²úÇ?¿§†ümðÏQÒªàÆrcÑíõúA¯Èmýä–ªhQù Í©?þNì¨ ?«çQTƒöì3µJƒŽFÝrþÖÇRêö#j‹.4i‚‡j3¾™£¬]Ú\¯¶LN*„w´5Ö‡×Éîñ÷è¶Î !íá¿ËogóïUFû˜q|÷Ïц&_6P ó眳Ëçx]²¬èÙ†o¼HWU•@ÌcóPXaýÆex+凉¿5ÅÊ Öt©ä/Ù|žt¶›ü…ƒEX2ð4bËÒU±\.ß»w}}Ý¥g¦ùY·(/îÉ ïIxÐår6U sŠ@ÿ‹ËŽ‚^›Wš~7[4¥GkûàæÉ#_ªˆo{à¶‘ŸeƒþUi(Êü™ÆM¾´ã³Õè­Èá$™8èÚ‰)Š£t÷úBeÜ:“·K.ñ?_Äý" Ñ5£%`覻­$gô:4ÙÎBãQ·Ä‚†Á¹­Ãû'AÄ4ã²»¤ƒ‡¿)Œ¼µ¿|òåáCÚŸäŸ5} ÿÆX…ôp'qºÝ«ßo×L©ªé5',Yƒ¿Û¤Æbzöóëïž;º:`YY\MTÎŽ“Fëƒî4/¾{ºÙ ®@áÆ¥$·xýYÓЦá_Ñ€0,ÄUÖê;h¡(™Á ‘EáØÀ…ŽÌi[¬âû¯é6÷ÈÛìúA,‚üÓ‰9¯Á»Úc®W®•Oh6æ“þs´Ãèe.+÷¤ed HÃ+¯ š/ÅÍñÍÑÀ —k’VŒQE¦óbµ¶ýV`Ÿœ) Jh·qWJ$EþéI‚&:G4#;2F9a@"ÏB`ýz ¥$)Á‡òc VÓ’Äoy^ŸBNo>>DÏU‰_;±<4¼µÊþ>jz™ð»pƒE—: ­09å ‰cP)h³¨þ^7>šÝ„4j«*Uhf Âb¦ù€ "8ˆL%ñ4­#RÖåé [? ܰÂTpt|–/}‡%4R¸Œ¦H|©Ý‰FΣ°Å¬BäY¾tD3d‹1öFŒòcªHw8õäºÂ4®8„Ì5µ© »Wóüï+6¦ð\’]„TÈõ<]T"v äBc8­ÿ²%o3¼W¯úq(z Ú¾pR!~üV\Î5’‚¦ã½Eº >ñªq¿ß]Lνݾ樽Íλ÷&÷œÒ ·Õ2»±ÞB)/Aç\AÅxÔ»¶ä9eíl¬{§—‹;G´í5K¯¸Çéø<Ú+†ÚüM’@EÒ.„OE€Úò„— âqR×å‚ϳ½IOvÿÑöÉ(è0Ÿ†a™ZÚ!œdÀ9Qãjàp韄s†ó—ëMa¬ž@JZD<ñ Øì5œKn48K+qçгÿvbÁ ÷1Guùå”iÁí?ÑìÏÏIˆ–Ê:"!û8Š´F´ð~åY\ÁïMy¦“ñN±o}Ÿ€#8`|uД#÷[ùŽÅúC~q9e ;V"%9&µXûƒü €=l¦¤å–(ȰßZ,GÞI`Þ`ÐȉÕ Z(÷.åj³3w7å à‹rAøw©O*ÅN0³7ü¹6‘˜ÝbÀŸÍ(!I5¶s(Ìj¦ºôˆàðíýÊN#×áPbA€çüh2"E=ÃFÆÇƒÊ™Kʪ×Áoæq›®ë.@>I ;@n~—ˆf—¦'¥„/ =+”‰=‘ú†¯ÕÿLº`ÿXHU%4_Ö$Ë|¹în#òkþ@ýã?Ã?Òrþ9ÉÓýíÔ‘ÁQœ¦Ç1"2¥šD_&˜<;&ï&]àu!ˆXÓBƒ'tÚHB‹t^Nš?‚+ÉAxí€óAâ®ØPec=vŽ}ŲÁ½Ëœµêþ,/Þ"’ý Ò Ã)ƒ­yÙaÀ²4Ì!|)r­An¸ìº2­=ü7†áÜU¨“ìÝV¸W”}äFlÔÛ¤9gŒ«A㈵rüYiÜ*K×EM: \ˆͶKG±×MÞ…J*bl›tü­¢’b²ˆ°‘ŽamæSAêÃÈ¡¤™ÀÈ—Õ¬'5r¦£ Q%åœ1®¦º¥š2ƒ|V:-™Ìž3æÅZà_×˦vnt['º„]qg#vÈ…wð«Ïâ‰ÂŒ”Qz4“@&Óu׃ ãýG“¼d eÝIþã‡×φ?¾øöíÓ·ÿsøæéû’VÊsž>~Ô)b~›¶ hÇjÛ§a¼Õ'ø²ëþðúåó{ÓüìÞ%æGð V©t%G·ÄVoS²¸&ëyžßX|+1Ô“ÂöfT… çššúÁWç|wÁŽïHcÔŒíKCã¶ŒM«¿ò˜®8«—® Í•t½"tæÆŠ–ošƒ¼@¶ÐW c*©üt¿Æjc¾†YfÞPóÖrº—3@=}õ¯Í¦q8}ÃsÊ&°ç™Xy`0r9»UBêD…â%Ëú’Ô¤nq×hƒÛ¹ÐA+a’×ËtjÐGR²1¤–uÌÑMLééÜÝÖ]úYÌv-†·²sM†Û\ÄŽ7`Íl1UáêØ+êåǶg,“ÃÈåbÃ…„îš/ߨÏ陘©~ƒƒHÖ[¶âú°Dâ­•†v„-Ml0l ’4,¿ÂÞg–¤­å7Éq¯ßsP’…Ç ;’MzsQ ô¡ÔÛ †Lñ\{~µÏº€4ëe-ÏÝ¡–Õì‚Opš(¤ånƒ'9k§“KÔÒX%“¬ìâÖûùÏO;ÉsüçþÃ|FY9^YEŒ5c‡ÏTìÿ×~®`R¡±K¥°ŸéŒ2^à'?¼ypüàDи—¹·:ñƒ/!lœ‚„ ;ȳ×/ûís^KD0Š,!È@öcHû7|ÑÞUÉŽ~ §½Å„Ö1ˆëx·:«2’.!¯`*B®C¬ <á°~Û[Žâ·¶Å'q]¯±sþðÆõ)M™7Ͼv“iiÀÒôë„·Y@OñE\o8‚¯ï¹µõ<ÍZ^M[Ýozêe!›¼¨7¶ÍÙ¤ÚRÓ ©&¦_󘼫ô‘Ôôäí»¿/ò+ñ ¶n:ëvèfk`C9YÿtË$¥|êÅïTæ0-Ò5åxþ?ý¾[ŠÛÆô¸é«ž ûßílxa{XH¯ë'yAÚ¶-î×N"AñwœMßyT¨ë¾]{F9T‡ï¨6ÅYYl@èh È Œ^SNàV–’‚MæèN8Ü ¹´ypõ» 1p·r}"( F·h @pû`3 ¥CÁèÝà³¼#½ÄÞãOçTÄàJC­U:C¸Øþ®Gzjåö4F¸¥ŒmñpøóEvcYЬ#±Û6(÷ãA z~£Û¥³9°È×õWÛ§ÍÙäs43 c™Ú"ûˆÒ'aGþÜcâoÆã™jþ½&P+¢—‘Q÷Ѻ±=RgõªvÉNlÙ}m¹u,œñ¡gSErV©{Tg+l€QÚ­í;|—ÓŽ¾HÖ‡€bÜ(eum«ã¾»ûEr#u´^½~ÿüq}ºIlä9[‘ÔÂvÃ[Üò8EÖpaKjFß~!Ÿ<—'_A<Ì“ƒä„›LÓ[èOfɤִöÇ¥òä>¾ÛÞôªëêÄ@ÇÈÖv³…QÍ‹,¢åóÁ.ÃbØê[Ì8ÌdëM7Š£©*ãµÿÝ&W€²É†Q“ßõÓ´JÒIºÀÙÃîBZ4ˆ-‚TÆZþ3Å,.uI$ 6P‰›×npnë÷gÏ¸å ˆËÊiÅêšXÅÔª2¯R¤P9æ0wrÀÙ©“£«¬Y•ð¤n¡0žÐ ¤¦ZETÅP¼·[°Ú¦›sM ¥á%¯wþñóTH|¿ËIßXÊ9…ÏdRµs®0rkÏT..×F´µ–Ÿ¹¥Þj’êÓR\ÇM-6rÐïGlcžÁ±:¤GŽÏNî4á-é‘?d¤'Áý¼ìÖžnÙÍzº^nzd7ˆdê”v¯ÖŽÐõâkyx7ä£õOªÉì¯÷ª¸LÐ2Ÿt‹OXZ-Cÿ’V[!´ªÄ%H²±?€ˆaiTãbiÅÐÂîâçÈY{³ø×Lc¬ÃM—¸CåˆC^ýímýË}×ß%Ü"a\±Z¼#C!299Ú@t…èáÊô¬ÌÎ7ÔízDn}ωzh|–§[v¢À…í€ÔÂ5ƒÚZY» ôŠ ?NÕ®ü¿âµNCn^©/¶nŠ­& ®—`äJ[Œ ¨0À ‚wFÞÀØ ¼Ø6‘'sKØühEé—Ã$Õu½'uök¨B櫟~üñ5_ùÝBS£k ˜/;Ño–ä?%ÑqáJÛ>ÔPú+7|_û±@WSáUa"¶¥ªž¦‹¥Éká/½_w=}<Ý×§Ï‚§û;Ÿ7¼{,OKOðÛÕ%ttÄ­ °¬Ç&ÌÆ°Ô]ø„¢ßaÛü­¯‹2˜‡1¼µ…l¸©làĸéщÃôĺYfNuËËþ ¿±uðͲ46ÒFäF-nƒ.9xŸ$‹+õuoë„·M¨ŠAÔ8ßñïôaéç=éâ˜;nÈú…v(±\®%«†= wà6M wÉmåêMAÔ<™r\ Õ25ñº®l#UËÊ´C_†´ÍåhÂF¥9,–Øuñ4áop‘m°°[V¦,óUedgG*e¾„)ø%¨Á¿IÞì—{IÞ½]ͲÄÄmöiÌ˹ù2îÍP Xçpll£Y`¿¬}"Kú„*˯’CéyÑðÙ^Ï~š~ ²­w»¾w_…M´êwÔB·•K(Ÿ2p“tžü ajÕã{÷&ŸêJ¥¤6À÷”i¹¾çžáPùoFCõpŒ$\&˜ÿï3q7ƒøÅ«ÛÓÈξöoß° u^[p¯÷ !¦Ø©Ïyz¼]»ë&fóæaúþ…ÂÔñ]æEÆ@`ð%·=÷QeQ’Øq#Ø/´kk|S,Ä é@ONî0ÐñŠüj­è@O±éX¸G-†üÙüIn–û>ü¶Y…šZaŒÈÆÍ ÀÆ}–}gó®Ë·3wÅV(|Í«„×RÔ&—(g¹»>wÏ*“n¼/"6|UdÈ’¤E«‹{k þ„*c" ¹tñ, ohÀJ¸õ"”É\õ­›¶‡TÂOË«†7O$}©¯Ù§s@唲mNsVìŸí}%åí=ÕVû’h7:+‚<òĵlvT•ÙúÆqSn6€G›£CyµŠ2Äwˆº±^2éyõ» ¢Õ&nú)㮟FTí–ssºyßi! ãò²{1OÏRlw½îI}•JâL}جŒÆø°{R×ðòr©&GR0•½ˆË¶7—/Oï ©·ùQ=Që”æ‚vc¨Ã÷Ãëg )(ŸƒÓÐr˜äîBF&Ö]Bü åDÅÁEBÓí,V“8iyH¹îÖ&åjÁ,i‡¼ßpë sJ²Õ¥èƒî‰—ߎOÄÕ\,oäoÈчôãÞhb×ãÇlt\ËmEÊŒ nñ ˆ¥|×6¤]ïñ5®oFX>åŸ0Ð YÞ-š)}]î¸ ›'Nƒ¢ÁC.wó¹ð*=I´<^a±Í!ªÖ»ËëH;jšf/7?pRŽÀbÑEüMÝ$²I–Ã:Io2MÐtïZÍsäd“¾ªù‡‚>MNnŽº'HW¹dïYDеáQÞøÚ&1ÉŽ+fP½Ì¦ ‰+ªêmÖUyï²t {fÎ{º½²þfeìA5ž'†„X°f×^£$xð‘înñ¦ Ò¦¬ðæLvSª§µ½ ½tc&Ùn­Ž:Ö ³ ih+(”r&^nÁt 0 LÚöÖ¦FQµ—ýŽSgö_J¬Ï™¦ìA”¹Û¸à—nžbøÙI\ÑtšáçN/ülu|áç ™,âE ”JŸŽÕï1Ͷ‡Á·ŸË.>Žãåá*BF&'f"‰ôÞb³KÜÛxV'aíú†3iׄŸÎ8 ó°¿yÓO=çVº=%øÒ8:¨á›Ú£³Õ{“ðÓàQŠD–š;‰ñs«Ño´±yo;*ì!ÿBŒ6£vˆØc·R¡ìÖ3ÃyQù¿°,l?¶>Û U¥MØ e¢†Lһù×D'vã7<5S°NkÎüDòÙ4µþÜ‘_H0M0ÀñѶ8÷n:@• «Ý‰"3’‡cµ'±Ô›9j4qYp!“:£‡}Ø ö#…âçûv‹öÊÛ~®/óeV{~ ÿ\p‡Üò³†ö]«àHþ¯Ó[Ÿgw{üô±¿qëÏEmÐðs"ÿ`ÙÒÔÝý<÷Qüø}½S5ë–Ÿ«‹­VÁùG2Khz¬wŒ!wQüxŒAŠŸ¾|‘ Õ-?nÐ÷ x®+èÖmÁlñÓ~§ !ùýjÜ.Þî’no îD±Èl‚Ÿ­Ažõ›µ@OÜÞ½S}|À'~>&è“§Ág üÄÏ'âç³€âç³Ê„¹c ( 7‹î;Bñsç Ðz]ƒÍº>cphýmG›oûè Ñz'›uþÁ¢µf4ŒÊÈ4Öžn ÅÏ݃Gk56âç3‘âçî¤<µþÅ`ÒúØ7”ºYõ‰A¥øÙXz‡ø9Lñóo 2ÅÏ¿%ÐTzîó›Zü+§õÁº¿9XxŠŸÏ|jm{*Oåÿ^ºù¿!0UªÝœêKÜ ºYW=H5ªë3ªFoo Võj«<<·­úç?_àjЦíÁ«øùˆVüÜĪUî²<|–`V}OÍŸÏÔŠŸÏØŠŸ[‚[˜{`-?ÜáøÃö¿Yí¶ÿ?lÿØþÿ›ÈØþ›¾éÛÿ¶ÿ?lÿîçÛò‡íÿÛÿ¶ÿ?lÿØþÿ°ý×jüÃöÿ‡íÿÛÃ`ýaûÿÃöÿ‡ísTÿ°ýÿÿÖöÏ© 0.²åö¾z²‘àùQI)°fUFô. µ=N«V ÐR,†–l´5 ±«*‹œ:!àD KñÍë¯Þß¼}ýìù»w.[¾ƒæÄd1WÛ¬ƒíXÂàК1„g.¶íÈ   yéƒ,Gúq£‘ÒÅÉ[âl|•ZX¬hj`œlÛ‘ÔÜô0¯5n°G¼_p6«×BDáyÁL ¯Ë²‰§ºÜãÇe¤˜Š«€Ð®‘«¤‰€eå¬ßt<å =gñ™G9ú’N Õ~?˪¥ÔÆèýâÄ€¤©©1˜›_óqÑи(»š3(O8ƒRÓœÏQä¤!ƒ’‰hÂNÒe:ð:nÑÿð{gï|<ßë0ÿm( ´³þ¢¿~en`÷÷+O2Ü̘ÂtbßÐöpAçÅòr†Î#!tâ,Ur°è8ŒËƒÅ«ƒ¤Z/=ëÚŒVÀ d‘’æ¡™i'Bu€œßëLgÇ>nÏŽt­}¿}·ÊrìÁX,Êâ&ŸÉ *”†—¡1(‘©4…IJw@}t°§õ¥zUgƒË<çDFףȻÀH²30uYˆuIúÊ·RéäÊç!«‡Ç&•šÄ*- IÉ<ŠTb¹šó“A—ËM©Ê¼IPBf .$lÜA®>úNL˜Àký¡kUjS6^Xš°¿ÌÓiq=Ã\Fa}ô8@t²éyWö©ÂŠ$#ÑaÓ£î)îÂTÚ-IJ•úûì̘Ñžæoð4Õÿ4˲e$xRCSÿ·•¹W@e®\¼ß=\f3Ý´¥ßï‘òôž‹V¤T¢Ǿ;k"4ˆCêp É÷°¾ˆâ ¤îú缩$ö`ˆ`¢²{úJùËx6eÚzã%Ø¢}½bëÍY6NW´æÚ)i庾 ˆÅ\a"ô=®q|M5mÙoR|ióâüv“Ó©©£‘–ÛƒTÇØ1ÒÏžÄ@ðØ"Ò*^}ªµù¥oœBªšØb6Èt×DYê—ܲÝh³uM:¸Ý]ðÖƒ†ƒ6zhdqù“Ï~5ŒÙ1›/uC2ôuQ'ÅHÃÛ7 ½%`% ‚OõEÈøÃÖÙpî=c–%]ÀVÄdÓ ÁŽ ƒDCXÏwðÊÈ<¥8†+™¶TÏ´=Lr˜¶tì#ñœW ›WZWãiqÁQ ꯟÝìíÉò(x ËŠþ,s‡OÏ$•Ü7pQÔrî8£´‰L¨ßêw‘ —ÅØ˜z@ëØõ,çÔìɪÌÌÖ££•²É¬¢Ý±ë <ÐcaU8G˜¡“ËB2‡jaûN2\ |w•,áXSÈ\D„½9ð_Î2ïãQØ™Íg«|º ýȶrãlÚâÔ[ßÂgu'“«÷OXÛ<øŠßÛ[ uMûfÇG£´sÖÁQØíF;àGÉá{ÔœþÞc¦.LI‹£?[‡7÷ΠzÇ¥¥¾¢>å¿\˜„ºè)ã%D×àÁVÿÐ=kûk“ˆ®fþ…àÙ*Þ§ýcÞÿÛ%n¸Þ&qS·šÜˆ…b[Ëvêv÷à0ñ @ªØÖ©¹ÛŒ[gRGQ^ûŸj-úž0:p«raü|ŽÖx9\”¬|‚Œ$K?ÅXö0޲n­éN–gFå̇â/òó0Gf4wh)é@*³Q–²+γ\èÓü¾äýpv=¥pÊpE³â@oœÀ®¦2Þr¬ýÖÃÜvÚ$.9.°!$ s«²ô—”ôö+;þï½ó’6Îl:Mçä(\ycßÌ'Ø÷Ú+àZœª t±Öá7E|–õDÄR¢÷ÐsÔú»Çì…¿L>†9(Ý–%ûÂ(¿_¬eOQAÚºYÊΆ%l˜Ô©ˆü«™` €s¹!—ê º¤RŸ†-ekœ:l·.ß>§’opÝÄ@÷örCmÒ8(R„º'íOݽîHv;ñÕó^m°€1àÏjX4¶Ò׬eÌÐñäIÒk°¢]t±}‰q¿é®ÒFmÞ’H9}c|[$ðAÂpp`Çk­éOРò…ÚÔxË"^ÙóÛn’5ÆñJù®gp³Kb"i|­zW ›o™Ó#þê™»Ú†‰±¹ÃëN×vz6+Õ4D~y‡1õÂ'´7é‘–}Æÿ•:vZ#œiÖYt<ák „¬b Ì2ûûŠ„ FŸkPT É4PÞcY/vˆ?‡êàn'By¤”Ï„o³K¢èø¯)ÔÀ~>¶Å8(¹ Õé©óЉ‹FU­o©Á&­=0žœæZÊCf¹Ñ¸‡6`„´\«Ã_Öo³ã·«[±ù./€z´m…{9l0G,ÓŠ)s:ÓÕÄL8Ì¢!^/ӧíÛ@,!ÙFA°‘r5¸Õ G¿ýöÝ}jÅ.˜AéÜÒÎ-o¼Âÿ–Ö Q9áÓµ8×쾘ZEÙB Š %”/˜£‚¦dÏV«³€vg/Ÿïu={ýyo9[ì%jŽ©cvQ ã…jýŽLÉh›Ø¿‹N›-ººÈ'߈Áêr*Fk ‹@T$l{ÄŠŒ c’°–À°d¢Wžõ§ŒZEÚjyßž|‰ÉÜüV:¹Ce:ÿPuØÜΓ\a—–®6Òz5êY¢[ÚÄ,88ùR®(x¶ÿÔsòÝM†’äzƒÕ°8ùàÕ„ªÑ¢­ªwä×ÚzѲt?,^+º¹b¾Ë/Hrœ&R0šäg,š„›ÏÖB#yÎ:©Õø±Á@,æWÊJŸkð­àþ)LøEJÉ%“ŠJë…¥d²rÁ&8.m/È®äyÉq!ãµ– ÖÙ}‘cÞõ.m%W6À™t×̺ …[bMÚÑY/eº¬ÕLˆ× —RµC¡…ÂÑ…¦—~/Ò¢‰×ËA‚ÅVD¬[ˆý^Oå¹E N[ð,LëÓóÀÇbU×Hd¹ÀÀÏDŒ yþ3!‡ÍB²ûãÎqx°ÎºLxÖŠ¯qgö{ñU>„Ï›9ØQâE05ÝADº˜2%“dZiÏŒ³Ð3uÿ$žWrµáDºò“‚ ¶h.×VYS‘NrU¬–·O›Ü‹Òiò2˜=² WùÁUî¤eœ•q4«)hÎfðb<Ñœy ã‡nÑ‚–JML‡/ÏPHÑoØ—[¡§…L–ní¡\½¼×ß6.¦].‚ÞçúÕ"㌂Waej#±™[©aos~ôü»¹îª £Ñ½ê›(ÚïDÂe4«IðžªùÈê"?îÿ¶ã¾Lø*[Ò öÉßH0=èÃyþÛ'k9"Ãî]õ÷:øàèmimˆ¼{3*=Û² ëE¨îú:¦Ðo×–.n>µiºêgÔÝv .Gd|ìðZ,‡$h|n%!×ð_”™œ‹¬œ­Ô˜±uV )!Ãs}Ð=",ï®~´¡nëØÏ¸'>„Eµ¼”« TÞW°ÂãÈu‚Š· g€í¸3Yv–°ýVhÉ·°R˜^³á–…•øšO»¼š ØoGÁ½a13Ó,oĽZöV7]žåsXùEµ<¤ƒŽzp%â9“2e: © 9Ñmµ” ñYR¢€…Ί™÷+¦eàU;ŠJ!8™Ï‡¸ñKþ«œØq¬CÎ$ZÇššÊ`öÃí¼ãM»ÎsÆ/ô‘sÉL`Œ™Yh¡D¹¨ƒJ`~“­Öâ?ÐãA<Á5Nh´ˆ÷qx sµÈ?°ûc’…~:}‚áã+öuy¬çqcI>Ã**¾«ðDõÅž$¯ðϽ¤5K&¤+ð´jG€´Âãø‰{I7 Nù&ĉ_y˜´~øÏZ|é+iܲ€œà_…hçÚ›û<ýȨˆmŒ‡:*6k¨›J}†š'à{§Ë4ÄB¨bóUg¤¤äŠ*=l®¾U …Ú%\EA» $5Åqf2†0½Ïuñ"’÷&Ü1ÁPjÑ*=üéÃì ¾w–e*II´Ø®eB ÒNiîÏ`;Ÿ7òl±Zf!~Â#ÁÖ@P­:¾"g€ozP^ªÕóºK'¼\W‹`el,DšXÛ£) ÓvhZÂ\72ïNO«Õløßžôÿù·yòÓS¨»ÿhª]f€uPòÛ?ÿYçÖÇ×ßCJm~­Ãëópÿ¾c÷ªT×–7Ã7öv–I.¾4ê ˆ€Ìy û/s$ã¸p4¼Ë >ÎHÑýÈ…0þ0/®§Ù„coì åLæb¼òÎö6ª©‚÷){ˆ¥UïéŸgttfWš0»Íí“m,Eß½î“Íy{Áä Z,[ßgѨîh°³èÏß7‘dwÖåÀ¸¡köÒþ6 wßL܈íubÍìb°í±Á®ÇÂfÔnÌÒEkÇ ƒçθ½º ôóógï^ü¯çôzÄ”úë/_¼z÷ÓKº|^ýî=]AÖÎéò IcW·s·Ÿ8‰%lÊû·/žþø%õÕ •ÚŽzó±_è€6,Ù, ²4x#â URSdóB‡¶ì®æ9Œe’<Ünoì œÂ{±!4^ ÂG2ð@E¶~‡ú¨£ÝÑ^¬—äÚ5-$¸õ1·¢Þ¢î]œq^æ|Èœ ¾ú ö,4{¡ ]i^^f9ˆ>Š ÞI£¤+báDzÅ[ÌÓÒ{f1'i_p‘oë%I ë·ï» dϘÁX¢OPº¼cÇ©š ^àô=‚ç¯$ˆæ@¾Í¥P%Ø]+6ÑT>àÛ®Êïð"d•¼_`(Ôo-¢q ý?è‡nƒWÙòe:§!%M€'%šHÑæ3.°ÓU0±ž„HYXÃLr08Ǧú dzX65ñ/ÖLܾ½(Ì¿ù|•øð-’%(XÂoe“ o^]ŽÏ–« &A¹Ýj¢t ou’=þ ºÌÞn>·(ÝD3¶ÙQÁЇSs’Û1›”\ÐIµt™yõ8¹Ãi²™$ÝÛH[îo$Bj™ÅGõ\ßãäᓤ9æ/Ý×<`åÁfÒïÃÍ,èG’ø{×þž|PfèºÚe*0?ã?Þhÿi¤’[kÜ;¨öPÒ/ÕyGw¡3ó”í"e!há{‹ÔAÈóÛY0•dÂß;+% œvš%;îÂ$/$ÌÛ#ÉÁØÏ‚ Ñ–”fædSÎfÞB ªHÝ®F“Ä98’”GGŸ'¹¯Ò†pI°Aô/ïÞÓVÝs0MÈõ-Nº+°’-q ˆUùÀ¯²*Ÿq³äFƒIáÂÙ¹•L¦û‰nò¶¯Òr$™ÅBB7e±Œ÷î6ËÀxö3-“QÔ½)¦_¥yà ÝËÖÎåR>¤<–ÉÓµö4?e¸.²ÊeÜk.9sv–™‹ê¨–edbÉ€mÂ!á³ôg] I¦ÜÇ|óaKÖt£hK³¶êl”[ v’^Qî"ôœZ–û׊èµò%‡mÌ'ˆÌåhyËl3µðØèòb› ùÏq¥.ÓѲˆÍ€N3þÍùpém°ý‰ó­²›¾ªZvæ%6é¢r&;¿¤t•–Ô–oc6!Y ›˜}!æÉÒ' >ÆiOF1¦ŽhÅš<ùû(³õ;ÙSÆ÷ Ṙܱ´T°a>ßAªéÚ×ãNH´Âß œYZ À:AŽ éÍX3Þ{fê¬ÃYžÍ9²vóØ9˯óå…¼¦mç3;\fýÐwr¿“Üßá;dԫ͈¸|[Dܬ M¯ øH±91I²i•ÝúÔaìêf<ƒ#ˆ7^°Ø±ÕßáD%Vr/ùòa÷ä|¯±òƒÚS}ǃvÓãëéipï<< ”ž’DÚË4/#‘¢AÔÛ(ÙZ¬‡849õ¦®í(ÛQÏïù4½xÒ»õɽ]ZÔ_]b‘{+ 1D6F—ŠOq–€³I›ƒ*¤8¦…Om¾]–SK}6EìƆ,i&à#ì™"ë14bÿÍÂÙIÆŽO<l±4õ`¼ÆWËkk³}aÉ|›>­Æy.Y ¶à³ôÓÙí ‹ ðcSçJ†HÓIØæNÓÒ3`A@¯6úÀõÜzÙ…·37Ã|¯I'ϰ‘¤¥—Ëå|iî—hYJ…¨ý&m‡/–×Ã$Šš[½Ôèäò¿Šš—3ÏL::Hö°c´‘sÔtdÅ#úHì,ãNräkú¯WFe°I[’d©ðÃ`îZްžÐ±d‹<žë¼º JÈC¡Í B ž(ˆY-|Ÿ$bØ1Ò¯¤Ù˜5^Ž*—!¼äô§`þzRFig0ÔÕk^:<<ÊÚ¶k×ËÆ ‡ŽH+·p”µ˜f“†óeY°>R]n²š-ZH)÷¨S‡ÒnáB÷'møtOƒýa•ŒÛ„€!ªŽ’É¡â8 ô¯ŠQGSr¹¶8\|ñ¾².ÁWœîPfúœü¾¦ý(}S˜çùDMt»Nt$žîãÿàW¾ØÜmíѶ” Ÿ“óªµwóäË‹dÿŒŸ|9Þƒ.ïzÜ®ËÂaƒ†WØXú›Kåã¨U!>b³©¹šËóvÓäOH—€÷Œ?Dÿuß’KÃØ½&­Ó_›?ïŽMŒžQ@MÎ}ƒéïÜDVz N9±ø“ÜK7Ý1•¢‰LEÂ[’6@“öfãÍs+Y½¸Í ê.oxšÁË…ÑvÆã´âaª‡lÞÿîYîFP.Ïiý¯ã‡éÒÐyŸ$÷âûQ†…k}·­LÜ]H^ *y'ëC´×çÿ:I¶oµ±B‰ZàÀ\ÛþT‰Óé†aôýÈ¥Õ¯µÚ¿<†×‡ÿP,Özµr$zKßÖ ÂOVËU¹ßιÐ5ÇÝ!èœk· ¥­®µV´ú}³uúð•G ^ÛË®–hÉþQSüüí=³¸ïm-"5t’½j9S«+\- -’üGû£¾öC@tvÿØ“÷/}ß|óM²à®·]Ê~ºl× u¯Ò©¿DÇJý¾÷ÿoqßÂܶ‘fûWp•qÔP")9Nê*¶’¸Ö±]¶â­½Q®‘ˆ5 pPwjö·ßïÙ¤Ofn¦F–€F£»ÑïyNxä¦Â êåæQµë6½#†;ëñ±öEñs¾@GŒM^` @G/bs K§°¹aflQíyæÄÿ20¼%I–Jä pC†­º·Í¨¯Žá_CÅÐß#b®YFîJ}3êÔu23m(»µäös.-*¦'Vÿ§‘ÀQÀäŒøø%ewçHÛùÁæwƒdts_¤z ·™Þù~øcºØ•Žd9B3—úì¦n‚Oïª PeÀxôrÔÁXl²Ç„LЧÁí€ä@Åúõ°{Ÿ¹2½™è1)ƒt-ÐÑÒml- )ú›ŒåefI-¤UiÆ H4@g±;•Ùÿ¨PEté᳨LþëÊ…Ø(›Æ§y¼J"q3&ù\½Ì`çÂñYZ|¿Â…|zÇï½ÌgÁËyU­^òÚŠ6˜kžÌÖ‡ó[¹„âþ~X¥«Ö:¾¿º´óýÄ;iéÚ·uvOñ™2]¬gpÊ8 S ùßòE…Â9–cŽ,ìžþæýMRdÙ”<«Oç§çg¥9~ÝIî ¾ë2±ük¡Še‚34-—¥¨Er ‚%†P@ëÌÎö’PàÌ&=€J>œ~<ýåìüì#”8ýôéÍOïÎ^[œ|üowà>Þ”¶ß™ ЪÎ/¯Ó[Z4Æÿ†FÜû‰Ù‚‚§qÚ ¾ä]”“,ÐdÃGèÛÄÀc\ÅIÐø‰«ó"“ˆ|)ö«PF i¢Ž fé"±%ÉqŒ"ÕOnMŠóH7ù •ü±c>X$%r–a£›ƒŒ´6qðîìüòãÙ«³7ŸÏXLîšv5ÇšótNà¢e„{V‚\§Æ[j6¥sÕVKöZBD ù-ì‰2\ŽFÆSþ–]ó¥Èd…,o¼ÉqâU'-“θ(\—Ӈʪ ôxÔq>Tãc Û,%„oF«§!öQüÂäåV©ÆÙLAÛ)`wÃi»ÂVhµ0ƒtµÐãÄO¥›C<øËJ­(©’¦,lÖ*ðÔš/-F§VRë`”3ÊÙMÜIr‘Ñ4)A3IV0èøÉ£CDqQ‰’Ь»a 3™z›©S1Éò±Š ؊ôú@Ó¾»2®ªÅi!߀¸ ª¹!¨° ì¤©°^jž¡sßøZ C‚§(ø‰8(IU§ñN1ô‹;`¯ÙßÙžùL%§i£€êi üiY³IÅË•©ò£+)gx¯*RJ=]ÿµF”GÒJc ª@²Ž¢ÎFøƒ°hȰ3˜» ¤:)xž±xˆby®rõ´`\z‚¸¸ÎIâoL†«ðO ÜÉ_çTønìlu¾´œW]±P;/´gó §±¼ñf;ßl›õÉZ:°› ,š:gòª©ÍwHñZÒ¹IX Œ?½C§ì&wIH"@D¤B·@µ–šÄ2%TgŽØJö4Æ7øÖ ìVЃÉñìŽdB—]ùF.B#˜^Ã] «ËîUP­½ULwƺË`#4âÒW žl ãéoù/4ÍñA›'µy&qÕ’ñ•RI‰€²Wæ8¯'ŒÐŸÎöR×a"F!!I %³o`—®®È*‡/iòy¤ì¡¡”ÛÞbêŸGxÍ{0õ¿+½\x£­ƒ ?M%&žXL¼6’³Òð¸É¢ðê÷ìž}³!Oå;}çÎwAÏùl£š·o¯øF‹&—ˆO­Û|‘ØíwºðÚ ®óªÊ—åÒ æ$ììÊéŒW¯Š:ûý,ãù Fu“±ëdsÙFÓ®ù­’r+µPíΔk ÂVq£ §ÆÐºÅÆ:˜8Ù±ŒÉ×Û)|ÏGˆ‚óŸÓ|ÑÅ…º€¤Ô=7¨–ûÍâc 'ÒÚp=RG£×õ³}ˆHÈz/´RÛÏ“6[2¨†-¨›‡+˜)ODyWo6‰†ÒExø9méè6K{¸ ô¦ä—A[4·l ø[0¤ð+‰‘ºÜÙZ’ùð†Åe‚‰R >È)áNĉ¡(ÌþW;ä )åpÛiÖuÛêBчnb6YZêŽoµeg#È‘f_›âOØÐœLi\ÏÔav5ÒúŸpè—ðñ_»£)Ì£ºçǬEX G¦Û`¬M ñŠ[ÄÇ?Z\2äŸòuŸþGðd›YÆã¡ ¬}CUóõ–ó¢G{BPúÄÄÚÑV¤ìɦrÉÆózÜ÷Ó‚+°m>¥ ø¤RKð[7Š¢]4›Ÿˆ ©4§4¶ì’¢ß ñ"z/ Í¡¦üçèò$ÈŠ‚XÄu±Ì'>xñœf¥¤%êwŸ+œ&ìÖ„$àB | ~g·—vð+ÆÈ»xêÙÁñ­Ùî…±Á::l¹½ ØS|+2øfb Ví9ÝQíž"6fÀÖ(Ü¸á‹æ¥ún Bœ¼å£¹×µZæ]¤bÔ½M§”Õ7ÖÇÇ£¬­-ƒwIB1ï%"H’͇÷¹±‡&ŽÌ5ü€Ó¶Dè G“ùå,ÙµHØ“2l9è)<w%¯x¸ç§'<¡,zãÿPñÁãÛyÏ#¹³Š‘£$ŸC Ø)7Ëë BEæÅ’ «QµYAŽ˜×4¤|ÅT‰-uˆûÍ©ÄR@&µ‚U¬o'{–÷´y%Wã¾—1kuÈöHP?êñ¼ט§]®¯qlÑæÅ•Xû“pÀÂi¸KÌò5]‡ºp¤è[ÿ¥BYh”¯>A¶Á—ŠÐ;2õ'Gvn¤Ø~7H@JGšƒòÿ÷?«Þ~³Þ-æŸÜ’ÐÇÊ]gзºo»@# Y73§ûbãLQMúåÕBç¾”Z3š9ÎÑ_©­`ve:]<Çée§í\¢€±xá м¼Ñž…!§‹üšª°ÌiÁ©cÇøh`8½ãòˆÀM`†bI¤nÂ0€DQl®®¯®’x†š9öŠPjâ N“wPtí´‚©Gž%_9PðÒÚ Àqã•°‚oo‰»7`»‚Ð4£[kCkÒzxñ°ÞIÚb.ÜÔ²Wùò:¾„T-´hVDhqb’Î8œœ¦‡]^§¡ßІ×UÙÂÀ^gi|CÊDZ B¥_HAÌLM8fÖÌ2kê·{»©.Ñ¢#ËÇŽá’À'¦µü¢¾d¶h †Ù:{°œÎâeyðC\ÎA ªæÆç”ºÀ㣑¸lú=þ{¼ÕiÓïIý­ž›~ï_â»×´xoŽHÛ.öùMQG¨gçèÆO*Ÿ¨sµ¨œ`Ê£“ZÔ#ktoÔ²Úhf äÒïž*j4i“Po³¯1ý†u<8œÙß9#4+›?J}Í]J•IC.h6¡éú¨o±7ȘÍW[¶Î[¾ßHp‘Ëý±åÖFÈ[7äú|Bø¶ XàU:…ŸË4Ü¡H9±„­;N ¤0eq™´Œ¸/Ñÿ4·ø|°ÃŒ`à™’èuÜ¥D—Øa¦çÆÏÊ£ô3êkºÎ™7³ úù½Ø¸b8¡%K¿M-„oŒâÕCb§ÔäÖh‡Ëðv“>`¤ =W²‰@ohõ@Yƒ–­hò˜"^ž Ó‡yÊ(‘í5Ô—ÑÄyó >×ùCâjAk¿kU ]-®ˆµÓ¶Ü©[`ñBs]l”@©±÷8yØ|‚º¨Eš žIðC”N)/–„‰2—(¬i_c VÓŒªèu¶Ö -¸L‡Ñÿ‹`5ʦ·H¿$Þ¼Ái¸ÿ³yßÎ@ŒM±ä*Þáß´´kôG¨sÀŸ*P|<®§þÃ×..‚ïúwPâ-ñ€à¾É½°Ð}^ƒû†¡š+°µb`–°#ì=î,YjSÏšeMŒ3þÞ³¼ìé±>?ÆWä!?®ƒý·ŽFC¢ˆ$)A9å B(Q?ÿm¬Õ¼|dÂ0GUî’)ÚSØ{òû?Þ¿™ÏYÓúMwö¾i·ÇŸÿ}r/·¼øÑ~2Äàî~þ‡â»Ü4tÚi.¤ u¨w +n/ÔÏÑæ°Wžñ±Å¹Àýn¿‹?Ð̈l"aÓ±z›ó¾|ÐwhþXÏàpéDoS´Z]’µ ´èå‚Ú_™’a[(^ŠBŠJ34·ªP„‰…i|Ak±£Vˆéë¤HgZ0¬8©¦ªp7·‹¥j?mÂÄW:Ï"‚†$SÕ6íE^XãöGŒ3…G!›ÂÒšßÈv€þšRUOü¿W¡62ô@•:O&6™U¼ŒÄL¬ &ìÐotÎÎUoéTåÐ1u6¾Ë37¼½+Èãð14Ò‰«G ºG‘÷Öâ²Ãn "!Æ8qKXè2¢› ލ®Mê:ÆJ®Gú-Š8ú‹™ù%4µ£ÙV¹ŸJý»=0È<7¯«ŠºyÊÌ™Ò1ê­,Á’\ß(&Å”’%´d¤ã*ýñæ)촥ʹ*C VI°v+u…~ËmÕqú¤Á‚—‘j¾«O' ÖÎKñŸÎ5%wLîâ9ݸp!äè û½¿ F³#m4\ûm½yµ€‡T4LQ§Óä|ÿÝoÂ’ùw¼eåóo.•&Üãøl«Úžæ´ùžXæ‘xÉÒY¸Zu‚ÿÕdÐà^­VB'I¼pX÷ÿ±«cïY)fÖ³2|vÛ!€ìÕ c›o1’€!ø¯ÛV̯ ­~4règªü’?'ßj ãÛB^„HÜæ‘º•iGI{«ö A+3¡wý{kÇyñ ï)‚–áî *µ1Y#Ÿ—Ü$TL§•fÍôf}YpN29­?zRBX(FŒÀvŒ/[vR<¤e—±ïvÏS—Ø«ùzKÀ‘Ðl–Å”˜6ߺ6†í…0/Âã{ß] {_õH¾j>ׯK$©l.Aq¬F‚ÜØ÷ÂÀ:œá ^<Át¯5¾ÞJå ò•p´ú~í[uÐoeø¼Ý×vïæYJÀ¯S'9klej&чöµvݾ3b¦c PS z°ÿɼÇx-yæ(ì›4½ÑÌ}äý.þ’¯ÏØVí¶Ê@Ò±ÁH=\yÚPž>þrTeçÐé<™"Y¥Ù{Óql‹pxÒ)G™‡( É Rvª1 Ê1Ýtaãû=¶÷…ëwe|6Þ–µù†zž™·¹!Þ }t2jvgô¤,ì-ín xzÈ@ë©Xív5nmሚˆío4±ßû3ÚxÂm„ŸC¯‘Éà >|½‘Ã~k+O¨•''-­övøH<bÿ[عÈp«Ž„\CY‘‰ÜFÇ­ø×¶P}õî¥OðiÞI-øWeGKÄØ÷8Öa¡¾"´«D‰xÿ3/¤j¼½7ŠÆÊM¥«}ŒhswJ z½£Ã^ÿp0~Aíp8îìYƘ{s¢¡ÒÉİvº9Ó¤¡ŒkH–òl)¥ioÒÛu¡ðÒÍ~Q`§0³9õH¸ ¤°Ý[ g,pšQ¡ ¢É° £å*ž&& hVƒÞ°ÐÏ$se³5YÄH§CA¨-OX"Í ®¿0CÒ»àd€8Ë@=˜ÏÝ)uñ¼qm‚m%·p|>ûøé !ï0Z|5ËäiÒ’¢7Fãƒþ¸7^ûG½q'ôú½ƒþà wâTØÒ&·Eµ¿'î~ù— hùcoäYŽ)«oعAµ<ƒ|tëÃ÷øàw,ÌÃñør|t°Î(¼é`‘f뇃ÛlÝÖܯ¹{ý=ÍêƸ¡ÖD¬àÀqÏ5í Ì‹ôšbw¨TÏX§×ø1\|{=[˜ª¥ ªGÎq ¹¥&ÿÆçÄŸþWÔÏ{~0xy8Kî³õÂ@Û#Øü.£÷›"·.ž°UþѾs]}%8Ÿ¿u?² úA88¿¸¹9:™Œ{ƒ~'¸zz'½ÁÁ`R3ÿÕÔÆqç…S=]T¼ÓîÞ‹`¯Ô ¿®^ð"@. {¥WÚ9 ÂþÑñàÅèæz¦××³ë ­ññA¿0pª`3ŒÇ\àÅsÊ"ï’­—J7«ÂÐÀÕ®ª¸€Tå?ÿtÒü—_‚_Ð(!öØ‚DÀö¿ûN¢ çÛ²‡>œWi»s§%+ÔøíÎ]Nün) Ù¯f;lväøë ¹À-ägOg†òÎqµê[¶cÂ’Æí_S|xÿæÝùå‡ï_}údZ¤æ<‚z1Fiö5úä<Yÿ)Ç-¢´ŸÙíÊgþ»|ø¬'ÃL:8ö[q&ñk½©»ž–gQpоCCæÔ_®/ÝZÜuN-.QM.ä#¥³Ò&a;® IÚ ÌòÜ6°O!d“c}“õóGëgú™R @©\,l~ì¸Åz“ÎM¡]q„8±T±›š¯²Þ,…ÆœiQß–i‰‰3Þû7M2\Ñu`²H0áMjÞ{Eà"î Lš.==‡¸ÀqólMÙ l¨çãĬ]é·îõÙV%ÐØ0ÑG”Ø`è´%Œ—pz›Y’}å”ý°µ®­Ÿ¢?¢ÿSÖx¬ûšè“–C)$M‘V" @’y½ž?ÇH oMó$N<­Jþˆ¢“šëý~uõ-!š“=”O m±€ÙŒÀ¥¢dXŸ¦Ó›s›ñ0ì.}ÂðšÝ.ãúÆ“ #Y|)§Z²n%i°\kß!FÀ`#¾Ú«ÊäX&Üã&ƒtÍœƒ NâyÛÅࣼx ¢ìS'-Þ6¦õxÊv‚K´±ûðÉ$ÅÂ:rLý6&]í,±+A|ǥæüxi?)‘3«µãŠ4ñæ’ÊÀé+!†™Ê>C©Ü=²Ït0âZ‹Õ*CCÑLZ·yäÛõÕÝ l²c;$\‘Knƒ”F°°yDZç@R±EÔÛž&›¤SIø™aEìILULÔ¼íaŠʽgW‚ymŠôG`æ9°ÛB¡˜üKÍ®ÀÝNwzb~)pˆ÷føŠOµó(ÎP~p±Î$´ô?³iMÚö‰õ n¹@Ëy÷xs9ä®|Š£’ÐY•äSÝB‡sIëÓBè$|‹G‚Pv´÷ïHÓ Æa¨ŠLíØ=08íÛ?*`Y$Šuížvt³þi÷-oG –È5؃"®Ë['§&{öLšÔ°±1™†úx'*6'A`aûõŽm^ÙE:?nË,ãûíì—z6ôÚýÀ ,©ˆæ @îeʹ"¥c»È±íYò㇚¶`¯JØ9ÅKÙ§™ò^ÌÚ¥9)¬c·:ãÁÄhj›z @}#2Zjo0Æ—IA nרµ¦wƒýl_¤0¸`œŠjKÿE„¨)¬QJÕÆÙì?` øo¿“à :°&±ÀkcÙ–’’¸¤±®}ž6=89—ËñüÙÌÙ&¢}f +Œ3ãJ67Ø&“™‹é"!7Øë%`Ò.•êtyÜËð*bëÑ D³”]×L…ÈÆ]¿?Å.òå „#Ÿ;]úÜ»$ zÔßü[}î”2”µlD·žIFP?@.°ñö7ñTÃñœSòxd”®‹uÉ,<ÇãêKº]]oÞêÂŒ¨yCÀç!åiÔëp5ßSS4¨`„‰Š‚vÝÏòQ˜ÖnÐ?8¢£ÇÖ%§_2 [¥ ¨T?Ã× Ä‚ÂÊÓÍtAR„f ” ×ÛRKS륦iϽUðèè8/xƒ‹ƒñ¥>ùº?Ðà#V• =Ð=ÚXG I”ÖvNqò³j.é¨Ôoî+ƒð%¹‰;¼uI£øÀöa{¬Ì5[!:©ŸsGïyi¡O4ÂSƒYì ÄE,LÞÜ7ÕÇ„·«xv"¿3W¢àTóµ8ó©f ¢­´È"™!¥AÞ€aß—‹—4–/0ÑïÊE"9WyO/”×’f³¨Cš Ws¥Áÿ©“ÛÑ’¥ÒU“¬J¾ÂÖu½!ÐaBu³EÒf¶§ྪ¸ #<ËèHfÖnL@,«îNmAI‹ ýØg¨¢Kø´¸)_ë‰ù%BøÇÀLùÂv„Î'¼æ©1ÅÔk'†We8¦‰1(̃\RÇâK2Ðá¦ògRM –á)ŒU¼N5À y†’…„Šz|²ÒäRÄ>ìáøÂèp“~ÅH(u×¼ìFsëбx]å@~ŒiŒ°…jtD®Ò¡!5ŠLþ"+“—€yD„©® ¾–’N³)§À_» ýŒîT€KÑTâ$ÝÓ±I°ÑE¼‹Ç„z©°=hðF~¶ç±=ž‹5A4Õ-´³™®F9À¯¤]¦7¨k7¹C:6„»îÂ^]§&qC§*P ïFž2R8Œ""Â2Oèà¯ÁÑ>-ø-8ÞOÌåá`?‘ëã£}]9Šh èwƒA7º{÷+ ºDaîÌq¥eðë»_?½vó ο…ù' ~âðtÉך  ;ù*Îà| ,MªlÓáï…9†jæršæö)ÙݧÍÕ¶­_ö!íáÓúåµ?À ‡AÒœ²pŒ±èزþ vêwx„UÌpW¦Ùñ\‡Iצn³’`%¹C&SãëÛ™¬¾¶Æ>­í’h£ªy]ÄÜÞ¸éã#›7;vpÉ”-µ»ÂTÞÒõípU¦q*g§pSޤÛaŠ‹ÓÞ%ŸFÇÈâÜçB¹-TßÌÖ+;‰MdF|˜×…ÐÜ]þfŠ%¤w˵Ž#•5hïõýX°M“™ÆÆÊžüñ Lóïƒg§¯áŸu¦ð.ø¬7dßÄ·˜t›w溫Z\€ðß-=œÆgµ}žß‡åàú’?57¡¢ä#§‰ž›Ã¦@ À  ãT!g1|’>ÍŠ©Ì’8p‚íΈ‡ 1¡l:ÃYoTh„ƒyCp'qÇ?A¬èá¬â† 5VK.ß™ÿ¼¿¶ýnÔ;øÿ’/Aÿ‘qVþcUþOx]cc_ÒëÊÿà÷¾óûP~w ðIÛ$¸ç<9à¿èIü½ßx’;ÀO¼'{Γõwþánê'Á‰¢òn#Òi–g®¬ Ø™¡´\t6CƒõÜZ†hiÌŒ¯—2Þ3{È.,­mY”ÐF SVäƤŒªL,Ó¶¢{’Û$áZñ1=Š=DÖaÇVýÝRQƒoFëªá"n©Œ,B ôT1HqûO 5…©¬ÿÔÊü³J&èg¾Fôœ–êê£víØ§1Œ#eì…ŽnrŽXs´S_ïrêS<Ì5W$‰01ÍnÍhvà¼1.´¸FóVÆ=Ø ‘Žkr9ñ9ï,­àI‹_ošQ¸—z Ž5-î‘?`OJ~¡´Âm@ÿš;錵°ô›|‹|cð4¦EkS>quÀW·fºbð< Ión"go)%Î.›jžúÌÃ%\üC…¿ö=&lÿ+ÙòΖ€ Ä[ЖÌ1Ü’AÑÒÁ‘h¥f<Âe¨†º‰ÓêÃR)ìþonC-Ôh·l¾Ñi&X±j¡³Eœj©ÛÁ½y8ÀDp¨äággG¸×€pûºÁ>}¤ý®ÂC&YÆ¥Ù¨1Ó{Ñt­­íÚ˜C¤í¢ùÝ~®’‹8?°1Ï2Ä׬©n >cz`"s;ÔWWЃ«+cÇÍŽÑ_åLÑo!˜#BÁ†*"K&å¸ðÁ@ÈÛIÎ «¤Kã¶Š W2“3Z@Eÿ4í’JƒÔ`šUkˆìº –ï±ë›†|Ä´9/‡®¤Övqc>G@Ñü(Œp«Ä¨!›'†°P÷ÝA~O¬‘N:>IcœºK‰kY‚f[t=¡Ë•ýº•xÚ˜„aø%nˆp±áÔÙÀW,hªVÕ(IUd‹"@ÙÔ!•‰™öô*¬ ^ŸÎØÖ Ñ2®KËà ó¼yr¥žýd¹ªè­{ÑÌ2ÍAQZÖ¼Cï”Aý©>že9~œ(’^%ÃË/Njx·ÉmTxî…PJ¶ùH&J „‰åzÉÙ@Óˆ3BAJ UÎʪuæ n¦ÖÎñMÿì%k¦³^ãÏNšé¿"(W.cÓýg=Œ$G¨7„ôýƒP8÷ji}[rúèÑ ª?‰é`‹M¸âõ^ýŸNõ‡0|k–_ùW-`·Î*¤ÃxØÖËé Šõå°ßiÞv8àë·æÑ,u޶»8¦Q¹H’UØ‹zýZÀñŽ^IKA¦µex@ÙÁ¿Æ&o ,[¢c)2֋އAÌ Ö°kÞXeLN0øÝç ˆêItPAü‚‘U GF’ñ”œÊÁþõ½F ‰È…— C$Û—bŽd¾qÀ!dwÊ;Ú†ÏN¬V”†G~a*„oCu“·ÉýNZ£b­³”¹fLÛXðq^‚ÞaPÈ”“pnèKŒŸ¸–¶…|ÔtAb×´ZÇ ý€˜:ȸ¸‚O,Ëx–8g‰GÌ ß‘¢üÙØoUQÁÇHä@¶†/ ·ÑNWpuÈñ†'-þ´y$%Âô©.-CùFU¡­$ù åÇDdLªU T÷¤Ëm"ë‘U!È­¡:›ôjŠä YV/®þ÷ÿŽÚäÿ–þ½³¥©NûF|b ²µU‚L“ûƒm޶sÒ#Ý®$Ò¾°•鯓Š9Q¥{†e# wf‘;ʠ w–æ×èÙ±¸FìÄä›”UVy>£ æˆçÏ~C~"ø°g‹øÿaî|ég9üÿ¡ë†€s¥ g©“mßb@GÁÙƒKÜUi¦ÄdÐãmk´­§ m&È#™ œÞ Ç^2@?N T<D³! ó~—„oÅ}y†»ùHnÔ·¬D+1Qm&®OW²‰üc%ìÜËèÕPm\)…°)³²=ÆìÞ ãL³P¯(ž[†žÝ8ÓEÒ©€Æ¤EÎbh ÀÐÖ0úØÅVý§ÉTö°ëuÜ[fòÅó^4¼xÞ .ž?»Áê´b!F'9¢Ó[½@ò¬hØ£ÿúý“A_§þ?ïGïÚxÁ‹ç²Ïƒ÷p?ÂÖ ‡ˆ=Zvã ‰ûr2üx ]sDb‚ôGî+XóÏJ h F"v¬úºŠû¿ðÛïT{°³zçѯzÑ~)Øþš¯íÃొ«:€Ó+î÷¯ùk½?||@¾¶ê?c¨{77A¯ß #ª4ÅÿaVT?ûôsð{ó%XÂ’_¿Ó›¿ÚFQ/8Ž°Þ¨÷X#F½h¯ŸEÏfÞÛ[w ÷µø¶¢™Ožð¢a/:9žŒGGÃAŸÞw³Ç„þ;6:~Z~8†¸òÅkÇ«ü”jœî®pŒƒž~zõæ íŒ&G‡BèŠà´ñ(ìÎÓ‹çÁ³ÀÔC>Öœ~0†ÁQ0 ÆÁ$8N‚~´í-ó©ëk‘¿ éÆýÑÏ1ýœÐÏcúyÂUHM\UМ#Ï?q”ŸHg0¬b]c«¤ThóÄÛ÷ë;}¸ÜåÙ,xvKcˆÒðÃo)ÍÊÚðMÍOÌñDЖt¦R“ØëŠ8%:œ¨(Ý 3Ϥ¹§U›“VÚù°ÅJ\Z½'ø<þüþ?ZÁTÿG§~cùFÄ8É­I³r}ƒÉ±–è ]­¯Œä53ÓNBma9g ¨lNÁY’%çþgEtò™¼Y®’*¥hf|§Åo·Ã]Qö1²B¬1˜™3ªõŒñ¾1lþ'#Ay;µÌ[)‚}3©kÆ‚ÁÞÑIÓÊIÃd|ñ©”Æé» VëkP{_¬¨=Ú~NÙ„3:Ñ`&ö ô‹õÚ U&¦h“w Hš¡d ·¸¨*D¤lJc™1ZðôŸÅÆÚûÅÒ€±Âe°7ŸÓÚGgÉM*)çï~yÿú-V¿F²oÉk`Ó•&èû¾Ä`2õ<)’&Ö5â°‡¿—æLHâݲ1i6Ä#ü¤LÒZ"£?&òy†`VCÊDdyå¸QÄÅ ‡Ôþ¡q#ˆáTRd\Õ/ŽvðÊQ%aìˆ/àki…Û®#e&*×ä©hâÁÖTúFåÎC3Z]×fp €Ç,YÈMZz°Kf·ë%~d_ÊN›®ä©Ù†2¤ ÂÝâx.±'a°dOœŒv6ߎ32°Å ê‘â:j¼ÛØ#Å §®!ôpÀ¦½Â:0g™ñRÞ“þnæm׸-ÑXñïI©ŠØ¤M¹iJá*h­ã‡i––˜T—fk’ )XË^è`ðMN”•>%e9ü$Ø! NX°R,äLÃÿ(O2±Ð:IæÓ#4-…%¬QÒô"DBMµRù6äÙÚ$xúKj ª ¼Ét á%m`]^ 0‘ò[ õ/š.K ïfÚ=éÊ®™ôFV2¹hí’Üq®Meðç=¢’´4Û†:oü-¿ž›íE>Â|èúœðòýý%SCÆÇrØ ^‚ ø’è=÷ß»7çoNß¾àb8Þ‚ã¸*_ñÉAx;m±Š[÷ÏNÿΠàoŸÞ¿ý|†'f{ýÏï_óVwI`wßÎ×q68 øQ|¶Y\`rc|{ËøÔ:yhØj¡AÎ]ýúvzš‰)#z i™5‚k©ã¨TÆnmSm2Ó˸ꮬùØ6O„ê³ §ä]:[+p ñ«Ùçp¨pˆÂ@ðºã—8î…8ÛÐäÔ‡1G5¡ðOÞ¨‡@ÌZ°‚°F jÜžë$„Qm‘v´Ÿ%.ÝGŠŒhþ³ D£Ž/z‹´eøË,ѤM¤jåÁAŽÇÅ!ÿ½JëÉañ|>¿¨c t¶AÎÆÂ^4r£±Lû §GýÚuxˆ®뺘°äx‰ãÄAuÔ2Z ;þrPuƒ ~‰šþP‘I>ûï5w½½$ø[³þ÷Õ¿´ùiÿ¾£^w—ØV5œ ágØò¨ú­¥i„4ä‘K°ÎÚ‡ŠG¶á)®é/ ù<°Â‡O?ß:}–µ»óˆ|å~õª±¾„âÐ3QÛͼ‚·?DŸ;V÷ê?šñxÂòÕ–ÌzbH×R˜W‡jÌÓ×¹'8iLuì—ˆëâ(®&2L-Qþzó‚óë¡Êz¢|Z=/mV–²¹ðÚh7´ wÖõ ä¤dfI%ˆ«ä£.×Úá Êöh@É¡'@F“~†×‡á!¨iôã²’’¹Þ{<-¡Yëæè£L2N$ΊaÔ?’ù3D;¢÷À¹}0T;c ŽÁ%o¦W3µ±áœ¼º‚ºàËÚq²Iš× òtp U¹À„G lªmšÙT‰:XžÁœ%`n塺9ƒšþ¿Öu‚ãP‰f™Z‘¡ùÊ}‡2žÍØ!Æ_¼•Ò” I†ƒ9ˆ‘ žÇöbOŽä< 8´Fp~ÄZ>džx^9UtzÁÐ@  2â¼@B4WÖŒÓoÅõ¡©}‰¢j1:U ¤.µÃ–ÞMžÈ%l‰‰6 ‚7ŽŽo_­Qg¢™%¢Ê4’ô GhÅx2£¢ÂŤxºtœ¾‘‰ Õ/W…’}Nú­ö)§TÎÚ½¹ Ïäãàfߪ’ÂÙÁWJ0;kŠK%©yãXÆ¡·R²tÒÑ(a=uè$^Eµ[§F|SËý´QˆšÍ^£(TÒÙ+t^P»gd»d´N®‡ÕÙÑ5$£'u"&&ý‰%'Ž«|a &}/¸C¿Åþ¾ÃîC"¹t€$H8~ö÷Ý5ÒbS}¸ªŠK:áJ‚àßÉ/[ ‡BíËï¬À+»¿Ï¹H,7xb·yG|J»ö0¡ ÏÛ½à·ÖÆí‚‡ûäašk¯©E0'–¦2K´™O¯Î# m‚ÏL 0˜C$YΣ(F ÆsÚ ‰ÜAyŸ‰ÉŽLá­„Sì_ÁÍdQB‡Š1q8ב[ð1±¹S,“~lMÀ:/–Ѱ:¼ÇbE]+ÛɳD$L˜¹ÈG=()ÒFcwÈF#¸À &%GFDLjáÀ„ˆ¹¥aÈ äÆ[tÒD9'‰UîYY_ ‚ÿ£ Å \ƒÈ{ðK3ß;š²HgEv8K–ùa‘ Mr8¯Wëå*‚¦óŒÉŒÒI£Í]âyÃA|b¶³Ö0>Iân~‰2Ó„Ôüi ꥗wjBêf¶A í Zg=éÄ+ ÚNÌ‚´=‹C†ãè F Ój³ˆl\Ò 6žÇc{ ?Ïó…€w¸•˜iæÅ$ÂÑ³Øøaô–M­PQðÚ±¬%Y7’;Ä_À˜ù‡ £Š/Ù4ÌvÞe»åå|Ž·i;¶}`§ ¹¸1TØX›¯®ÎV°ùF·WWîn}bwë |>ôÜÒA[šÔ[,ܸi6íœ6¥38Ö`FÄ=jGGÖPwߤ†–OÂò‡×Œ%‰…A¿4Ž=AO ƒÔ„Ö;áåt‘§x ø1Ì'³qS1¥«‰QH&™Ð-<ƒ'™qMEBhwWš)|/Çnä ÄÓSx¬œ0Ä6Ù§sÉJÛÍml3ö1úr⻨~[ðÒ6œ½Ò@­(ÍE:Ï™%Ø×uZ}€(ÄUˆÜfòŽY\aZc(Kfš³LÛ<V›N—õ»ä) íúÅ<¢OvìD6‘õØ›07ô,·{tšóåB2¾ŠJ†w&Û òkÈ]žîýö\±ö'þ£òï`7×ò´×ÖŸyì…Íe[ÖÀ6Yd>åK…¹ý4†ÓÒ/¨…{mŒÍ´êl\¥Ê4ãéåÉ5qkñïô0‡ýj´#$’^ºÜN“áÑã`XÞSV‰’ªq2’œ¯·x§ÉÀtA•û@]°ÚZNo<ê@d'=èC ÑßpТʧa5›‰78_ž××õZ€ t½°qÚt,ô{°Ñ¹™Þ$¡ó›ðÛD£Q[£H(˜¶0Qç¶av4'-cÏ\’uœï¶È¬Â»ä–m…Òo+÷¥¤®¦É°–ûïºGŽjçæsÒ¿•ËbºË?rÞ‚ÊõY0 4ÞˆéŠV)-ì0QŠ`UUÎ>ªR<#NUj°7â‹GnQÓAÓñ#:Ÿ@à~—ÉQË©4¸€ 5â+¼»Ý ¿Ó„,…;„ H¥qA¬r‰vUcƒ`< $È=Á 9YÅ Ê\Æ×$ øˆì³+m—Xu¨ìbƉ-,¤hyÁ*=D%þL)Zl¡à¹ÒAƒÊØŸÌpBÂùÓ ¥Sì’VœÁ<Ç]¥îšûœ#¯ jž(< ÄßÏÓ*ád!‹ ƒÈõìo8m ±SAjŠÞuÌýÇœ¸NôY¾yúÞCb·Tú˜*­(ÉŠDfqµGùEP{hž@—‚Çþ«=ƒ»˜í*ßòÐÓûô2 ŠÅ%N×&]UÏ óTí`Ô¢ge~ìíÕn˜XL.R{Ž ~÷¯Õ˜ ÛÚÃmҵ˾yÿ!b>.ÎoïOí²È¤µù`‚ÔÅãD—àŽÙ‚Tì»À¡oÆî¹ÃZ·ª§"»†Lœ,&ö¼€ŽYcú…(¼·p‰0Sòh)g¯ÓR¬/µO°ƒþ?"Å:sm슮˹DX ·È­©ˆ«R®áÚ«Ý&›~Q ž8´îœlAíàv9ÜÓè+7Ýä|§E„EÝJ—Ç­-_'s+‹Ì¶ÛNg\ÌxÁH'êæËˆ}‰šm½˜Þ!i…HbaõZЉ™—üç ’÷¬^r¶TG¹Øò;×ø`r¯ôÊÆ¹ÂõâÌ÷˜Þÿ.¶Œø‚ÀÌÁÍ ²Ác~ùXY´I=ècY“ƒ„oúlhM„¿"™5¥Z—6j>Ðj‰¢pK¯Â¯g€99ýRmp‹”À+ÃäÁ³£Õ¢‹Ò|»Ý”‹÷Ã/ɦ6Ó;]DÚÅv„i? XS–¸5XóT©¬JC⌯í"¬}»ß3®óÙ¦–“‚6Uë4Ø—·"{ì” vÛZDékb§ÄæéÕgÁ¹ñÛcخҩš -FÑŸë³–ÍŸ²ƒ÷–ÂaÖ¶ÅäÓØÑ¡®©——ÊS‡?‡CÓb§Ã$54œµf s·†<´ŽŠ''­X¼)NZNßå& ÄÀì1ý=çœf «ˆãž%ÆnñPO†¥Â¬„f5#1õØ0¼„of‰tÉÌ™)A|‡ >[ ÜÜ~ùðF„yDÖ<´M™¹,”»|•/——x#âg?|þ¥íQ¡ ÒΟÏÞ¾}oW€ù€0gPO¸C;2÷°×²%ˆUÜ@†¤vr^qвp“Ö¥ÐjKˆ,« -¾ÉÜôØ+°ˆ™A(¾CùZk)üåˆdìn^1ŸPL€¼¢—ÛçÙ[xÈÆ –^Ì©W±daÕ©šˆEÃ\ G'ÕÍÖ쬚Åñ+|qµåSö=˜ s¼‚”&-¦Lâb:O >¯ìÕìﶤÒ<‰puÈÈq »]C¬g>l”¾ÇÇ)ØqÎŽÃàR‡sQ|0Ô½yÌþ‡æ›ˆ¡`Ò5Ar‚ULm¶–ÿX°.0×ß9K Úa'çÈžÓv{ÅZ Àa’Ý¥ Ó‘ga?¿uùöÍO?þÇå‡ÓóŸA?¡ ŽÚ±4öö ò þ¶âŸßÿrv¸H¯ñ‹h_>&h-×åH£ƒ!·E"Ÿ Õ3ɃŠÔ%›¢™/6zZG’¡‘ EÒ¹ o°)©]Q›úø¾ÉâÙò³R€9Œ&º4ù»â²\¯Ì¬££¸ya´hÖ öñ†]Áxša[º¦ ›“>iN’¤.ÝIPGÁ,^z‘­ìšDßwÆ85Nb4V¯¶{ÄvFÄT»¦š›,…çkle•ÂûýÓͤâÜ¢se-p´iq5vëJ„d±¡¶øQ<Å:ƒå{M2†áy~áG"þ‘<ãŽÌøKh'[GgÛa–cKp+ØsÐm&C'2ø—·¯~â«-ºEA·ë*…\…ƒ|VOøuo¡ ™íÊêý•`Á§dÊfØ·0%ã"€Cþ¶X ˆ Z/Þ;tÔšÞ*ðêþ˜L ag§¯~Šˆ4p]&’w «²J\ïü„¶8Ð’l^©ä©LZ4[„c`bGǘøÃ™ûHljr’‰n‘åX&ñª”Œš®J7Ž4Ó6“´üãl9ª¯¶ØfäþNÈ¡L´ç$Å*í§ûHø­ÁZŒ% g©0@ÉË`G½ÆpKrP,Ä¥µŽ0W•¡¹ÍƒŸÞ¾ÿáô­¸ÜÒ-wJçĬbz––h’ÔI.Db A”o¤²2®FÚ:on$,ŽEâ£9ךߟŸ½:7ãSæ®È½¬OØYÎIÊB´àÖvb}õõ…:šd\UXPX®"YtžÖMÌÜ¢³v±±ª¼„–S1‚·ï_ápX¢4¶¨#.}ª(îˆ\m|¥emŸF,A_ÀWI”7—µ ÊP~ýëdzî®Ie,µmS æeŽ cSêŒ Ò˜Ò½ÒLÅ–rH¤zþ¬c`¿Û€VŸºøÌ®D2åMðã¯ï^¿yÿŽ7}T¹×"ЉYŠ$¼n{•[„7›énô$Õ¼K*ب£¾Ô"ÎW‹>Mƒý:fŠ y‚¤éd¦L.Ü,S—ß@·œzKÔ=ãìëö…¸¦I»­ºy9ÁŽÉÎw:éû:„…i9i‘Ù¤á.)¥»Q^áP¤³›\>J¶i|'4{BñN‚´?p!ÙØŸcÞ¦Âkoí¢'5(©`C»¤äb.ÒFå—Û‰:Ã9Ëø1ät*ËëÈ àzÎgëE >¤zj3}×s—avüþq(f¤)Tá‹!sŠÉ¸‚#5?ÇbfÝ_Ânʯäçl@‰Ñ”á ¯±.4Ãb¥&®…8+ÓvñúÀŠÑtyp«F^1IÄfæ¥-/é¹3käcdÌârõ…ï´ÓmèôD .Æ–‚#bü„s2,“ÊÎBô|cvÇ÷¦:± —!<~:%:6ǯ oo^ŸšðY¥`’lQÕÐ6ݪܹ,CFxËêíŨ() •‘8]ä5/K †tæµ"$ Ärº¸M@Š*>ac G(#›ÓíߊÍ"¿3PЏˆ>ýúîõ›Ó·Ÿô…¡‹&…{*,câÒÁf‡oD¯4ùƒø!ÝÆØÆ`–í"YÂ!Ú§®™<Å,<«^a\zŠ„Ç“•›3Ü„ üŠÌfÁ·H®¾NÚ#¼jÎ.\­¥µ×§Ùê ô+šì¸:xIã¾ÿÄa1¸„SŸãpŽëdÙ— KÒOüÆ'/@™² W×;w¯®ˆ}þÊè+Ö‡^¨‡=sa^/öU,œ=²lœCâ/M—Ñ¢—E¾-ÕûóûW~K¥RÚJµœó|×k0nkZH¶^#…™sç˜ÉÁ_'Ó/ë^ ½#ßh;4M‘°Ëµ÷(fO-ü¡Ïžô¸urÖ›š?—³î-lù(È´ K:æ mNÈÔ&K ãyˆØÌÎÆc¦\S2$-ãâ ßj;hmÄ÷¢¼eSRÛÙwîrÉ×<Óeœ·í£Žr;bߤUµà~¦iZL-aq©YjáhïÊ„Ùɲ5NeÑ©ØwÁ¸+Ð6Vº(DwX A!НM¾v¼;`Ç…\ÿ÷"ÊÜ+a«Ù>À<å‚·/öcÍ)òÏg Ê!ª+ $B4~$Zpö|Ü”s#„ª7Ñ¥€`zH-ˆQØ và@)|ï•:"1Ht÷Jv‰-°¥YÒ0u5åPô¶Mð o¯3´#†.ýqŸüïu9’ÙZXIx6ެÉArˆþïÃ*]µÖñýÕ¥Š¿Ë¥!4ÄÜ Iiö¸}^}~¼Wø[ÃX Eó Zÿ{œ€ ©zÉœfý¿âGÅC²šnï?ÙbLpb§Ö½„Ÿàvpª L„.þÐÏ¡Aj×#¸^e7€¯¿…z](KDú1uC~ Re–HËL©;ªk)‘6û±Ü õÝôë©fÿEÓzãÎç æä'þ9–î»A Þ°á€+¤Íô$ö¨RŽK}Qé‡ÐŸãŽ$nÂÒEëÉ:­¬·G?Kò0M "A&0"Šª„úДRæâ#˜”jÉÓäÖ¬âÇfJê|àÁ¾«¸uÿ–.[÷¼ñùû£JQ'Mgþ]»H€'ðDÓiW“ñ2òî¯H`åÖF*§IÚÓïpŠy®Üët[—5¾‹}w. FвYMB“}¸°ðñ ïÚsƒi«î®9Ó,²P¨Œèê÷âE²¯Ql,í@w ¤£(­ Ý|qXoÓ/N–mi*ø–°&\ Š,øI\-â͈Î*¤ lêXn¼®®¨´ð›3O"“Ö†V·Q94Àôê,`Øg.çEz›fÌÅFÑß,ÖĦVruDªxî–øvÌj½2A6^ü¥-ÖÎrÐ÷8mE^‘a[‘a*Éú­Ä0p83ÊáïÛ—žÏçÏ;Í»DÀÿ ÿzó\Hm”I½AÉ0ø‚РQ€{óYî÷ûm4ìpÕ!a·/cyê» ï],J*Ùs¯±(\¨°ÿ1Ñ5H[Dc¦ÙRñj‹Å)^Eü¼ŽCÝyØÇ7BÓŽÀËã‘s-ió¨ ^ý$•îuئo0TQåef (¥*\¶jtㆡP¿rLÀ!«h Bù7 –ÃÌ©ÖÖtÕÙŽµÈb¿Ïm€^C¦ Úð+o ðKÀ;;!|–hæÑ¬ò M¥ÔД"”µZ¹¶qtGÅË^t´s4Ý;¬—>ÖïßÛ~ |áèWýâO˜˜ FBïðç0J;N“Þdã ¿[w"ü¯ö3@†ìãè¤?êÛ ãÿsœOÌuXÁÁq4š Ž’ƒÞ8G½ã““þÞ¬µ?Œ£ÁÀ¾á¸Ï¿ŸÀï“‘W+ý3899åÚàøø¨YiÐD½áñÀ¾`$¿EƒÉ¶JONÌ£f¥Ãqt<éMì ¸Ò ßzƒÑq½Òæ &--Ž°Ò¡yÁx2qnŒ’½Ö–G­•ž ŽÆÍÀïã“c§d/F£a¯7†3¢:{ýþødrÒ¬›wrtÔö‚“A߯´&ôõ¡Ê^ot2˜ô--…y“£ùøµ7<©U “ã„+DGÇãN¯–îÁ¾}47^¿j•Ž{“Ñ*=DýA¿²¥Ö~4ŒNo€ß{““Q­ÖþhDA­cœGý-µ¢Q8j¾¡kµN¢þðèÛ:ÁZOãÑxK­Ã¨ßï›oDG“_ë. ޹Vœ Ç“m#0Œ†Çãæ†°ÀGC¯VèôÉÖüqpp-€•ºµÖ£Þɰí ÃI¿ïÕz#49Œ¹±0u{“£íÕFÃ~ãüÇį^ut<”j0 'Çíßëd,³½ö Ø~µGÑñàxr¤ÕNúÇG®Ví;u’lãiñ“òªq^ôWÝ]ÚVd—êÕç÷¯ÏŒš&¹^ÜgA€é+lê0VµÔÆ‹¡ ¢2Z Uu·OTÔu®X5ª9A±œˆs‚Ôq9°-²³O’¥¦&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/python/neuron/rxd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = geometry3d all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/python/neuron/rxd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/python/neuron/rxd/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/python/neuron/rxd/__init__.py000066400000000000000000000030621323325274500223070ustar00rootroot00000000000000from .rxdException import RxDException try: import scipy except: raise RxDException('NEURON RxD module requires SciPy') from . import rxd from .species import Species from .region import Region from .rate import Rate from .reaction import Reaction from . import geometry from .multiCompartmentReaction import MultiCompartmentReaction from .rxd import re_init, set_solve_type try: from . import dimension3 except: pass from .rangevar import RangeVar from .geometry import membrane, inside, Shell, FractionalVolume, FixedCrossSection, FixedPerimeter, ScalableBorder, DistributedBoundary from .plugins import set_solver # deprecated: # from geometry import ConstantArea, ConstantVolume # TODO: if we ever separate Parameter and State from species, then we need to # rembember to call rxd._do_nbs_register() Parameter = Species State = Species def _model_view(tree): from . import species from neuron import h species_dict = species._get_all_species() if 'TreeViewItem' not in dir(h): return if species_dict: rxd_head = h.TreeViewItem(None, 'Reaction Diffusion Items') # TODO: do the species disappear if they go out of scope? or does this overcount? rxd_species = h.TreeViewItem(rxd_head, '%d Species/State/Parameter' % len(species_dict)) species_children = [h.TreeViewItem(rxd_species, str(name)) for name in species_dict] rxd_reactions = h.TreeViewItem(rxd_head, '%d Reaction/Rate/MultiCompartmentReaction' % len([r for r in rxd._all_reactions if r() is not None])) tree.append(rxd_head) neuron-7.5/share/lib/python/neuron/rxd/dimension3.py000066400000000000000000000103171323325274500226210ustar00rootroot00000000000000import bisect import numpy from .geometry3d.graphicsPrimitives import Cylinder, Cone from neuron import h # TODO: remove indirection (e.g. use _h_x3d instead of h.x3d) def centroids_by_segment(sec): """ given a section, returns a dictionary whose entries are lists of cylinders of radius 0 that should be used for distance calculations, keyed by section .. warning:: Does not currently support non-frustum based sections (i.e. no support for new 3d styles, like soma outlines) .. warning:: This assumes a 3d style exists. The safest way to call this is to call h.define_shape() first """ # TODO: fix the issue described in the warning # (when this was written, these objects were only under development) n3d = int(h.n3d(sec=sec)) length = sec.L arc3d = [h.arc3d(i, sec=sec) for i in range(n3d)] x3d = numpy.array([h.x3d(i, sec=sec) for i in range(n3d)]) y3d = numpy.array([h.y3d(i, sec=sec) for i in range(n3d)]) z3d = numpy.array([h.z3d(i, sec=sec) for i in range(n3d)]) diam3d = numpy.array([h.diam3d(i, sec=sec) for i in range(n3d)]) dx = length / sec.nseg objs = {} for i in range(sec.nseg): x_lo = i * dx x_hi = (i + 1) * dx pts = [x_lo] + _values_strictly_between(x_lo, x_hi, arc3d) + [x_hi] local_x3d = numpy.interp(pts, arc3d, x3d) local_y3d = numpy.interp(pts, arc3d, y3d) local_z3d = numpy.interp(pts, arc3d, z3d) local_diam3d = numpy.interp(pts, arc3d, diam3d) local_objs = [] for j in range(len(pts) - 1): x0, y0, z0, r0 = local_x3d[j], local_y3d[j], local_z3d[j], local_diam3d[j] / 2. x1, y1, z1, r1 = local_x3d[j + 1], local_y3d[j + 1], local_z3d[j + 1], local_diam3d[j + 1] / 2. if x0 != x1 or y0 != y1 or z0 != z1: local_objs.append(Cylinder(x0, y0, z0, x1, y1, z1, 0)) objs[sec((i + 0.5) / sec.nseg)] = local_objs return objs def objects_by_segment(sec): """ given a section, returns a dictionary whose entries are lists of objects that should be used for distance calculations, keyed by section .. warning:: Does not currently support non-frustum based sections (i.e. no support for new 3d styles, like soma outlines) .. warning:: This assumes a 3d style exists. The safest way to call this is to call h.define_shape() first """ # TODO: fix the issue described in the warning # (when this was written, these objects were only under development) n3d = int(h.n3d(sec=sec)) length = sec.L arc3d = [h.arc3d(i, sec=sec) for i in range(n3d)] x3d = numpy.array([h.x3d(i, sec=sec) for i in range(n3d)]) y3d = numpy.array([h.y3d(i, sec=sec) for i in range(n3d)]) z3d = numpy.array([h.z3d(i, sec=sec) for i in range(n3d)]) diam3d = numpy.array([h.diam3d(i, sec=sec) for i in range(n3d)]) dx = length / sec.nseg objs = {} for i in range(sec.nseg): x_lo = i * dx x_hi = (i + 1) * dx pts = [x_lo] + _values_strictly_between(x_lo, x_hi, arc3d) + [x_hi] local_x3d = numpy.interp(pts, arc3d, x3d) local_y3d = numpy.interp(pts, arc3d, y3d) local_z3d = numpy.interp(pts, arc3d, z3d) local_diam3d = numpy.interp(pts, arc3d, diam3d) local_objs = [] for j in range(len(pts) - 1): x0, y0, z0, r0 = local_x3d[j], local_y3d[j], local_z3d[j], local_diam3d[j] / 2. x1, y1, z1, r1 = local_x3d[j + 1], local_y3d[j + 1], local_z3d[j + 1], local_diam3d[j + 1] / 2. if r0 == r1: local_objs.append(Cylinder(x0, y0, z0, x1, y1, z1, r0)) else: local_objs.append(Cone(x0, y0, z0, r0, x1, y1, z1, r1)) objs[sec((i + 0.5) / sec.nseg)] = local_objs return objs def _values_between(lo, hi, data): i_lo = bisect.bisect_left(data, lo) i_hi = bisect.bisect_right(data, hi) return data[i_lo : i_hi] def _values_strictly_between(lo, hi, data): temp = _values_between(lo, hi, data) if temp and temp[0] == lo: temp = temp[1 :] if temp and temp[-1] == hi: temp = temp[: -1] return temp neuron-7.5/share/lib/python/neuron/rxd/generalizedReaction.py000066400000000000000000000212531323325274500245300ustar00rootroot00000000000000from . import rxd, node, rxdmath import numpy import weakref import itertools import scipy.sparse import itertools _weakref_ref = weakref.ref # aliases to avoid repeatedly doing multiple hash-table lookups _itertools_chain = itertools.chain _numpy_array = numpy.array _scipy_sparse_coo_matrix = scipy.sparse.coo_matrix # converting from mM um^3 to molecules # = 6.02214129e23 * 1000. / 1.e18 / 1000 # = avogadro * (L / m^3) * (m^3 / um^3) * (mM / M) # value for avogardro's constant from NIST webpage, accessed 25 April 2012: # http://physics.nist.gov/cgi-bin/cuu/Value?na molecules_per_mM_um3 = 602214.129 def ref_list_with_mult(obj): result = [] for i, p in zip(list(obj.keys()), list(obj.values())): w = _weakref_ref(i) result += [w] * p return result def get_scheme_rate1_rate2_regions_custom_dynamics_mass_action(args, kwargs): """Parse the arguments to a rxd.Reaction or rxd.MultiCompartmentReaction. There are four valid options, two for historical compatibility, two for future support (these two are the ones described in the help) """ if len(args) == 4: # bidirectional reaction # writing != instead of <> because Python 3 does not support <> scheme = (args[0] != args[1]) rate1 = args[2] rate2 = args[3] elif len(args) == 3: # two possibilities which we can distinguish based on if the # first argument is an rxdmath._Reaction: # 1. with the new way, this would be reactants, products, and a # forward rate # 2. with the old way, this is a bidirectional scheme if isinstance(args[0], rxdmath._Reaction): scheme = args[0] rate1 = args[1] rate2 = args[2] else: scheme = (args[0] > args[1]) rate1 = args[2] rate2 = None elif len(args) == 2: # first argument must be a unidirectional rxdmath._Reaction # this is the old way and not included in the help because it # does not generalize to bidirectional reactions in Python 3 # because of the missing <> scheme = args[0] if not isinstance(scheme, rxdmath._Reaction): raise RxDException('%r not a recognized reaction scheme' % self._scheme) rate1 = args[1] rate2 = None else: raise RxDException('Invalid number of arguments to rxd.Reaction') # keyword arguments # custom_dynamics is discouraged in favor of its antonym mass_action # (but internally we use custom_dynamics because of how originally # designed) regions = kwargs.get('regions') custom_dynamics = kwargs.get('custom_dynamics') mass_action = kwargs.get('mass_action') return scheme, rate1, rate2, regions, custom_dynamics, mass_action class GeneralizedReaction(object): """an abstract class, parent of Rate, Reaction, MultiCompartmentReaction""" def __del__(self): rxd._unregister_reaction(self) def _setup_membrane_fluxes(self, node_indices, cur_map): # TODO: make sure this is redone whenever nseg changes if not self._membrane_flux: return # locate the regions containing all species (including the one that changes) if all(sptr() for sptr in self._sources) and all(dptr() for dptr in self._dests): active_regions = [r for r in self._regions if all(sptr().indices(r) for sptr in self._sources + self._dests)] else: active_regions = [] node_indices_append = node_indices.append for r in active_regions: for sec in r._secs: for seg in sec: node_indices_append(seg.node_index()) self._do_memb_scales(cur_map) def _get_args(self, states): args = [] args_append = args.append self_indices_dict = self._indices_dict for sptr in self._involved_species: s = sptr() if not s: return None args_append(states[self_indices_dict[s]]) return args def _update_indices(self): # this is called anytime the geometry changes as well as at init self._indices_dict = {} # locate the regions containing all species (including the one that changes) if all(sptr() for sptr in self._sources) and all(dptr() for dptr in self._dests): active_regions = [r for r in self._regions if all(sptr().indices(r) for sptr in self._sources + self._dests)] else: active_regions = [] for sptr in self._involved_species: s = sptr() if s: for r in self._regions: if r in active_regions and not s.indices(r): del active_regions[active_regions.index(r)] else: active_regions = [] # store the indices for sptr in self._involved_species: s = sptr() self._indices_dict[s] = list(_itertools_chain.from_iterable(s.indices(r) for r in active_regions)) sources_indices = [list(_itertools_chain.from_iterable(sptr().indices(r) for r in active_regions)) for sptr in self._sources] dests_indices = [list(_itertools_chain.from_iterable(dptr().indices(r) for r in active_regions)) for dptr in self._dests] self._indices = sources_indices + dests_indices volumes, surface_area, diffs = node._get_data() #self._mult = [list(-1. / volumes[sources_indices]) + list(1. / volumes[dests_indices])] if self._trans_membrane and active_regions: # note that this assumes (as is currently enforced) that if trans-membrane then only one region # TODO: verify the areas and volumes are in the same order! areas = _numpy_array(list(_itertools_chain.from_iterable([list(self._regions[0]._geometry.volumes1d(sec)) for sec in self._regions[0].secs]))) if not self._scale_by_area: areas = numpy.ones(len(areas)) self._mult = [-areas / volumes[si] / molecules_per_mM_um3 for si in sources_indices] + [areas / volumes[di] / molecules_per_mM_um3 for di in dests_indices] else: self._mult = list(-1 for v in sources_indices) + list(1 for v in dests_indices) self._mult = _numpy_array(self._mult) self._update_jac_cache() def _evaluate(self, states): """returns: (list of lists (lol) of increase indices, lol of decr indices, list of changes)""" args = self._get_args(states) if args is None: return ([], [], []) return self._evaluate_args(args) def _evaluate_args(self, args): return (self._indices, self._mult, self._rate(*args)) def _get_memb_flux(self, states): if self._membrane_flux: # TODO: refactor the inside of _evaluate so can construct args in a separate function and just get self._rate() result rates = self._evaluate(states)[2] return self._memb_scales * rates else: return [] def _update_jac_cache(self): num_involved = len(self._involved_species) self._jac_rows = list(_itertools_chain(*[ind * num_involved for ind in self._indices])) num_ind = len(self._indices) self._jac_cols = list(_itertools_chain(*[self._indices_dict[s()] for s in self._involved_species])) * num_ind if self._trans_membrane: self._mult_extended = [sum([list(mul) * num_involved], []) for mul in self._mult] #self._mult_extended = [list(_itertools_chain.from_iterable(list(mul) * num_involved)) for mul in self._mult] else: self._mult_extended = self._mult def _jacobian_entries(self, states, multiply=1, dx=1.e-10): args = self._get_args(states) indices, mult, base_value = self._evaluate_args(args) mult = self._mult_extended derivs = [] derivs_append = derivs.append for i, arg in enumerate(args): args[i] = arg + dx new_value = self._evaluate_args(args)[2] args[i] = arg derivs_append((new_value - base_value) / dx) derivs = _numpy_array(list(_itertools_chain(*derivs))) if self._trans_membrane: data = list(_itertools_chain(*[derivs * mul * multiply for mul in mult])) #data = derivs * mult * multiply else: data = list(_itertools_chain(*[derivs * mul * multiply for mul in mult])) return self._jac_rows, self._jac_cols, data def _jacobian(self, states, multiply=1, dx=1.e-10): rows, cols, data = self._jacobian_entries(states, multiply=multiply, dx=dx) n = len(states) jac = _scipy_sparse_coo_matrix((data, (rows, cols)), shape=(n, n)) return jac neuron-7.5/share/lib/python/neuron/rxd/geometry.py000066400000000000000000000352711323325274500224120ustar00rootroot00000000000000import warnings import numpy from neuron import h, nrn from .rxdException import RxDException try: from neuron.rxd import geometry3d has_geometry3d = True except ImportError: has_geometry3d = False class RxDGeometry: def volumes1d(self, sec): raise RxDException('volume1d unimplemented') def surface_areas1d(self, sec): raise RxDException('surface_areas1d unimplemented') def neighbor_areas1d(self, sec): raise RxDException('neighbor_areas1d unimplemented') def is_volume(self): raise RxDException('is_volume unimplemented') def is_area(self): raise RxDException('is_area unimplemented') def __call__(self): """calling returns self to allow for rxd.inside or rxd.inside()""" return self def _volumes1d(sec): if not isinstance(sec, nrn.Section): sec = sec._sec arc3d = [h.arc3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] diam3d = [h.diam3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] vols = numpy.zeros(sec.nseg) dx = sec.L / sec.nseg for iseg in range(sec.nseg): # get a list of all pts in the segment, including end points lo = iseg * dx hi = (iseg + 1) * dx pts = [lo] + [x for x in arc3d if lo < x < hi] + [hi] diams = numpy.interp(pts, arc3d, diam3d) # sum the volume of the constituent frusta volume = 0 for i in range(len(pts) - 1): diam0, diam1 = diams[i : i + 2] pt0, pt1 = pts[i : i + 2] volume += numpy.pi * (pt1 - pt0) / 12. * (diam0 ** 2 + diam0 * diam1 + diam1 ** 2) vols[iseg] = volume return vols def _make_surfacearea1d_function(scale): def result(sec): if not isinstance(sec, nrn.Section): sec = sec._sec arc3d = [h.arc3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] diam3d = [h.diam3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] sas = numpy.zeros(sec.nseg) dx = sec.L / sec.nseg for iseg in range(sec.nseg): # get a list of all pts in the segment, including end points lo = iseg * dx hi = (iseg + 1) * dx pts = [lo] + [x for x in arc3d if lo < x < hi] + [hi] diams = numpy.interp(pts, arc3d, diam3d) # sum the surface areas of the constituent frusta sa = 0 for i in range(len(pts) - 1): diam0, diam1 = diams[i : i + 2] pt0, pt1 = pts[i : i + 2] sa += scale * 0.5 * (diam0 + diam1) * numpy.sqrt(0.25 * (diam0 - diam1) ** 2 + (pt1 - pt0) ** 2) sas[iseg] = sa return sas return result def _make_perimeter_function(scale): def result(sec): if not isinstance(sec, nrn.Section): sec = sec._sec arc3d = [h.arc3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] diam3d = [h.diam3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] area_pos = numpy.linspace(0, sec.L, sec.nseg + 1) diams = numpy.interp(area_pos, arc3d, diam3d) return scale * diams return result _surface_areas1d = _make_surfacearea1d_function(numpy.pi) _perimeter1d = _make_perimeter_function(numpy.pi) def _neighbor_areas1d(sec): if not isinstance(sec, nrn.Section): sec = sec._sec arc3d = [h.arc3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] diam3d = [h.diam3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] area_pos = numpy.linspace(0, sec.L, sec.nseg + 1) diams = numpy.interp(area_pos, arc3d, diam3d) return numpy.pi * 0.25 * diams ** 2 def constant_function_per_length(value): return lambda sec: [value * sec.L / sec.nseg for i in range(sec.nseg)] def constant_everywhere_1d(value): return lambda sec: value * numpy.ones(sec.nseg) def constant_everywhere_plus_one_1d(value): return lambda sec: value * numpy.ones(sec.nseg + 1) def constant_function(value): return lambda *args, **kwargs: value def scale_by_constant(scale, f): return lambda *args, **kwargs: scale * f(*args, **kwargs) _always_true = constant_function(True) _always_false = constant_function(False) _always_0 = constant_function(0) inside = RxDGeometry() if has_geometry3d: inside.volumes3d = geometry3d.voxelize2 # neighbor_area_fraction can be a constant or a function inside.neighbor_area_fraction = 1 inside.volumes1d = _volumes1d inside.surface_areas1d = _surface_areas1d inside.neighbor_areas1d = _neighbor_areas1d inside.is_volume = _always_true inside.is_area = _always_false inside.__repr__ = constant_function('inside') # TODO: make a version that allows arbitrary shells? membrane = RxDGeometry() membrane.volumes1d = _surface_areas1d membrane.surface_areas1d = _always_0 membrane.neighbor_areas1d = _perimeter1d membrane.is_volume = _always_false membrane.is_area = _always_true membrane.__repr__ = constant_function('membrane') class Enum: """a silly way of creating unique identifiers without using/allowing/requiring magic constants""" pass _lo_hi_shell = Enum() class DistributedBoundary(RxDGeometry): """Boundary that scales with area. DistributedBoundary(area_per_vol, perim_per_area=0) area_per_vol is the area of the boundary as a function of the volume containing it. e.g. g = DistributedBoundary(2) defines a geometry with 2 um^2 of area per every um^3 of volume. perim_per_area is the perimeter (in um) per 1 um^2 cross section of the volume. For use in reaction-diffusion problems, it may be safely omitted if and only if no species in the corresponding region diffuses. This is often useful for separating FractionalVolume objects. It is assumed that the area is always strictly on the interior. """ def __init__(self, area_per_vol, perim_per_area=0): self._area_per_vol = area_per_vol self._perim_per_area = 0 self.surface_areas1d = _always_0 self.neighbor_areas1d = scale_by_constant(perim_per_area, _neighbor_areas1d) self.volumes1d = scale_by_constant(area_per_vol, _volumes1d) self.is_volume = _always_false self.is_area = _always_true @property def neighbor_area_fraction(self): # TODO: validate that this gives consistent results between 1D and 3D return self._perim_per_area def volumes3d(self, source, dx=0.25, xlo=None, xhi=None, ylo=None, yhi=None, zlo=None, zhi=None, n_soma_step=100): mesh, surface_areas, volumes, triangles = geometry3d.voxelize2(source, dx=dx, xlo=xlo, xhi=xhi, ylo=ylo, yhi=yhi, zlo=zlo, zhi=zhi, n_soma_step=n_soma_step) volumes._values *= self._area_per_vol # volume on 2D boundaries is actually the area; the amount of space for holding things surface_areas._values *= 0 return mesh, surface_areas, volumes, triangles def __repr__(self): if self._perim_per_area == 0: return 'DistributedBoundary(%g)' % (self._area_per_vol) else: return 'DistributedBoundary(%g, perim_per_area=%g)' % (self._area_per_vol, self._perim_per_area) class FractionalVolume(RxDGeometry): def __init__(self, volume_fraction=1, surface_fraction=0, neighbor_areas_fraction=None): if neighbor_areas_fraction is None: neighbor_areas_fraction = volume_fraction if surface_fraction == 0: self.surface_areas1d = _always_0 elif surface_fraction == 1: self.surface_areas1d = _surface_areas1d else: self.surface_areas1d = scale_by_constant(surface_fraction, _surface_areas1d) # TODO: add the if statement so not scaling if 0 or 1 self.neighbor_areas1d = scale_by_constant(neighbor_areas_fraction, _neighbor_areas1d) self.volumes1d = scale_by_constant(volume_fraction, _volumes1d) self.is_volume = _always_true self.is_area = _always_false self._volume_fraction = volume_fraction self._surface_fraction = surface_fraction self._neighbor_areas_fraction = neighbor_areas_fraction # TODO: does the else case ever make sense? self.neighbor_area_fraction = volume_fraction if neighbor_areas_fraction is None else neighbor_areas_fraction def volumes3d(self, source, dx=0.25, xlo=None, xhi=None, ylo=None, yhi=None, zlo=None, zhi=None, n_soma_step=100): mesh, surface_areas, volumes, triangles = geometry3d.voxelize2(source, dx=dx, xlo=xlo, xhi=xhi, ylo=ylo, yhi=yhi, zlo=zlo, zhi=zhi, n_soma_step=n_soma_step) surface_areas._values *= self._surface_fraction volumes._values *= self._volume_fraction return mesh, surface_areas, volumes, triangles def __repr__(self): return 'FractionalVolume(volume_fraction=%r, surface_fraction=%r, neighbor_areas_fraction=%r)' % (self._volume_fraction, self._surface_fraction, self._neighbor_areas_fraction) # TODO: eliminate this class and replace with FixedCrossSection? class ConstantVolume(RxDGeometry): # TODO: do we want different default neighbor_area? def __init__(self, volume=1, surface_area=0, neighbor_area=1): """volume, surface_area per unit length""" self.volumes1d = constant_function_per_length(volume) self.surface_areas1d = constant_function_per_length(surface_area) self.is_volume = _always_true self.is_area = _always_false self.neighbor_areas1d = constant_everywhere_plus_one_1d(neighbor_area) class FixedCrossSection(RxDGeometry): def __init__(self, cross_area, surface_area=0): self.volumes1d = constant_function_per_length(cross_area) self.surface_areas1d = constant_function_per_length(surface_area) self.is_volume = _always_true self.is_area = _always_false self.neighbor_areas1d = constant_everywhere_plus_one_1d(cross_area) self._cross_area = cross_area self._surface_area = surface_area def __repr__(self): return 'FixedCrossSection(%r, surface_area=%r)' % (self._cross_area, self._surface_area) class FixedPerimeter(RxDGeometry): def __init__(self, perimeter, on_cell_surface=False): self.volumes1d = constant_function_per_length(perimeter) self.surface_areas1d = _always_0 if not on_cell_surface else self.volumes1d self._perim = perimeter self.is_volume = _always_false self.is_area = _always_true self._on_surface = on_cell_surface def neighbor_areas1d(self, sec): return [self._perim] * (sec.nseg + 1) def __repr__(self): return 'FixedPerimeter(%r, on_cell_surface=%r)' % (self._perim, self._on_surface) class ScalableBorder(RxDGeometry): """a membrane that scales proportionally with the diameter Example use: - the boundary between radial shells Sometimes useful for the boundary between FractionalVolume objects, but see also DistributedBoundary which scales with area. """ def __init__(self, scale, on_cell_surface=False): self.volumes1d = _make_surfacearea1d_function(scale) self.surface_areas1d = _always_0 if not on_cell_surface else self.volumes1d self._scale = scale self.is_volume = _always_false self.is_area = _always_true self.neighbor_areas1d = _make_perimeter_function(scale) self._on_surface = on_cell_surface def __repr__(self): return 'ScalableBorder(%r, on_cell_surface=%r)' % (self._scale, self._on_surface) # TODO: remove this, use FixedPerimeter instead? class ConstantArea(RxDGeometry): def __init__(self, area=1, perim=1, on_cell_surface=False): # TODO: fix this warnings.warn('ConstantArea probably not right') self.volumes1d = constant_function(area) self.surface_areas1d = _always_0 if not on_cell_surface else constant_function(area) self._perim = perim self.is_volume = _always_false self.is_area = _always_true def neighbor_areas1d(self, sec): return [self._perim] * (sec.nseg + 1) # TODO: is there a better name than Shell? class Shell(RxDGeometry): def __init__(self, lo=None, hi=None): if lo is None or hi is None: raise RxDException('only Shells with a lo and hi are supported for now') if lo > hi: lo, hi = hi, lo if lo == hi: raise RxDException('Shell objects must have thickness') self._type = _lo_hi_shell self._lo = lo self._hi = hi if lo == 1 or hi == 1: self.surface_areas1d = _surface_areas1d elif lo < 1 < hi: raise RxDException('shells may not cross the membrane; i.e. 1 cannot lie strictly between lo and hi') else: # TODO: is this what we want; e.g. what if lo < 1 < hi? self.surface_areas1d = _always_0 def __repr__(self): return 'Shell(lo=%r, hi=%r)' % (self._lo, self._hi) def neighbor_areas1d(self, sec): if not isinstance(sec, nrn.Section): sec = sec._sec arc3d = [h.arc3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] diam3d = [h.diam3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] area_pos = numpy.linspace(0, sec.L, sec.nseg + 1) diams = numpy.interp(area_pos, arc3d, diam3d) if self._type == _lo_hi_shell: return numpy.pi * .25 * ((diams * self._hi) ** 2 - (diams * self._lo) ** 2) def is_volume(self): return True def is_area(self): return False def volumes1d(self, sec): if not isinstance(sec, nrn.Section): sec = sec._sec arc3d = [h.arc3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] diam3d = [h.diam3d(i, sec=sec) for i in range(int(h.n3d(sec=sec)))] vols = numpy.zeros(sec.nseg) dx = sec.L / sec.nseg for iseg in range(sec.nseg): # get a list of all pts in the segment, including end points lo = iseg * dx hi = (iseg + 1) * dx pts = [lo] + [x for x in arc3d if lo < x < hi] + [hi] diams = numpy.interp(pts, arc3d, diam3d) # sum the volume of the constituent frusta, hollowing out by the inside volume = 0 for i in range(len(pts) - 1): diam0h, diam1h = self._hi * diams[i : i + 2] diam0l, diam1l = self._lo * diams[i : i + 2] pt0, pt1 = pts[i : i + 2] volume += numpy.pi * (pt1 - pt0) / 12. * ((diam0h ** 2 + diam0h * diam1h + diam1h ** 2) - (diam0l ** 2 + diam0l * diam1l + diam1l ** 2)) vols[iseg] = volume return vols neuron-7.5/share/lib/python/neuron/rxd/geometry3d/000077500000000000000000000000001323325274500222575ustar00rootroot00000000000000neuron-7.5/share/lib/python/neuron/rxd/geometry3d/Makefile.am000066400000000000000000000046231323325274500243200ustar00rootroot00000000000000geosrc = $(top_srcdir)/share/lib/python/neuron/rxd/geometry3d if BUILD_RX3D all: graphicsPrimitives.cpp surfaces.cpp ctng.cpp else all: endif ctng.cpp: ctng.pyx $(CYTHON) $(geosrc)/ctng.pyx -o ctng.cpp surfaces.cpp: surfaces.pyx marching_cubes2.c llgramarea.c $(CYTHON) $(geosrc)/surfaces.pyx -o surfaces.cpp graphicsPrimitives.cpp: graphicsPrimitives.pyx $(CYTHON) $(geosrc)/graphicsPrimitives.pyx -o graphicsPrimitives.cpp pkginclude_HEADERS = EXTRA_DIST = ctng.cpp ctng.pyx surfaces.cpp surfaces.pyx \ graphicsPrimitives.cpp graphicsPrimitives.pyx \ marching_cubes2.c llgramarea.c if BUILD_RX3D if BUILD_MINGW BUILT_SOURCES = force setup.py ctng.cpp surfaces.cpp graphicsPrimitives.cpp #"-c mingw32" only for python2 (do not use visual c 10) mingwargs = @rxd_mingw_args@ force: ctng.cpp surfaces.cpp graphicsPrimitives.cpp else mingwargs = install-exec-am: ctng.cpp surfaces.cpp graphicsPrimitives.cpp marching_cubes2.c llgramarea.c endif if test ! -f graphicsPrimitives.cpp ; then \ cp $(geosrc)/graphicsPrimitives.cpp . ; \ fi if test ! -f ctng.cpp ; then \ cp $(geosrc)/ctng.cpp . ; \ fi if test ! -f surfaces.cpp ; then \ cp $(geosrc)/surfaces.cpp . ; \ fi if test ! -f marching_cubes2.c ; then \ cp $(geosrc)/marching_cubes2.c . ; \ fi if test ! -f llgramarea.c ; then \ cp $(geosrc)/llgramarea.c . ; \ fi #if BUILD_MINGW if ! grep -q '_hypot' ctng.cpp ; then \ echo '#define _hypot hypot' > temp ; \ cat ctng.cpp >> temp ; \ mv temp ctng.cpp ; \ fi if ! grep -q '_hypot' surfaces.cpp ; then \ echo '#define _hypot hypot' > temp ; \ cat surfaces.cpp >> temp ; \ sed 's/EXTERN_C DL_IMPORT(\([^)]*\))/EXTERN_C \1/' temp > surfaces.cpp ; \ fi if ! grep -q '_hypot' graphicsPrimitives.cpp ; then \ echo '#define _hypot hypot' > temp ; \ cat graphicsPrimitives.cpp >> temp ; \ mv temp graphicsPrimitives.cpp ; \ fi #endif if test ! graphicsPrimitives.cpp -ef $(geosrc)/graphicsPrimitives.cpp ; then \ cp $(geosrc)/*.py . ; \ fi if test "$(PYTHON)" != "" ; then \ $(PYTHON) setup.py build_ext $(mingwargs) --inplace > temp ; \ if grep '\-shared.*\-lmsvcr90' temp ; then \ grep '\-shared' temp | sed 's,\\,/,g' | sed 's,\-lmsvcr90,,' > temp1 ; \ sh temp1 ; \ fi ; \ fi endif # above grep avoids: # A dynamic link library (DLL) initialization routine failed. # for python2 clean-generic: rm -r -f build rm -f ctng.cpp graphicsPrimitives.cpp surfaces.cpp rm -fr *.so neuron-7.5/share/lib/python/neuron/rxd/geometry3d/Makefile.in000066400000000000000000000531121323325274500243260ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = share/lib/python/neuron/rxd/geometry3d ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = setup.py CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/setup.py.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ geosrc = $(top_srcdir)/share/lib/python/neuron/rxd/geometry3d pkginclude_HEADERS = EXTRA_DIST = ctng.cpp ctng.pyx surfaces.cpp surfaces.pyx \ graphicsPrimitives.cpp graphicsPrimitives.pyx \ marching_cubes2.c llgramarea.c @BUILD_MINGW_TRUE@@BUILD_RX3D_TRUE@BUILT_SOURCES = force setup.py ctng.cpp surfaces.cpp graphicsPrimitives.cpp @BUILD_MINGW_FALSE@@BUILD_RX3D_TRUE@mingwargs = #"-c mingw32" only for python2 (do not use visual c 10) @BUILD_MINGW_TRUE@@BUILD_RX3D_TRUE@mingwargs = @rxd_mingw_args@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign share/lib/python/neuron/rxd/geometry3d/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign share/lib/python/neuron/rxd/geometry3d/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: @BUILD_MINGW_TRUE@install-exec-am: @BUILD_RX3D_FALSE@install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgincludeHEADERS .MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgincludeHEADERS \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-pkgincludeHEADERS .PRECIOUS: Makefile @BUILD_RX3D_TRUE@all: graphicsPrimitives.cpp surfaces.cpp ctng.cpp @BUILD_RX3D_FALSE@all: ctng.cpp: ctng.pyx $(CYTHON) $(geosrc)/ctng.pyx -o ctng.cpp surfaces.cpp: surfaces.pyx marching_cubes2.c llgramarea.c $(CYTHON) $(geosrc)/surfaces.pyx -o surfaces.cpp graphicsPrimitives.cpp: graphicsPrimitives.pyx $(CYTHON) $(geosrc)/graphicsPrimitives.pyx -o graphicsPrimitives.cpp @BUILD_MINGW_TRUE@@BUILD_RX3D_TRUE@force: ctng.cpp surfaces.cpp graphicsPrimitives.cpp @BUILD_MINGW_FALSE@@BUILD_RX3D_TRUE@install-exec-am: ctng.cpp surfaces.cpp graphicsPrimitives.cpp marching_cubes2.c llgramarea.c @BUILD_RX3D_TRUE@ if test ! -f graphicsPrimitives.cpp ; then \ @BUILD_RX3D_TRUE@ cp $(geosrc)/graphicsPrimitives.cpp . ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if test ! -f ctng.cpp ; then \ @BUILD_RX3D_TRUE@ cp $(geosrc)/ctng.cpp . ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if test ! -f surfaces.cpp ; then \ @BUILD_RX3D_TRUE@ cp $(geosrc)/surfaces.cpp . ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if test ! -f marching_cubes2.c ; then \ @BUILD_RX3D_TRUE@ cp $(geosrc)/marching_cubes2.c . ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if test ! -f llgramarea.c ; then \ @BUILD_RX3D_TRUE@ cp $(geosrc)/llgramarea.c . ; \ @BUILD_RX3D_TRUE@ fi #if BUILD_MINGW @BUILD_RX3D_TRUE@ if ! grep -q '_hypot' ctng.cpp ; then \ @BUILD_RX3D_TRUE@ echo '#define _hypot hypot' > temp ; \ @BUILD_RX3D_TRUE@ cat ctng.cpp >> temp ; \ @BUILD_RX3D_TRUE@ mv temp ctng.cpp ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if ! grep -q '_hypot' surfaces.cpp ; then \ @BUILD_RX3D_TRUE@ echo '#define _hypot hypot' > temp ; \ @BUILD_RX3D_TRUE@ cat surfaces.cpp >> temp ; \ @BUILD_RX3D_TRUE@ sed 's/EXTERN_C DL_IMPORT(\([^)]*\))/EXTERN_C \1/' temp > surfaces.cpp ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if ! grep -q '_hypot' graphicsPrimitives.cpp ; then \ @BUILD_RX3D_TRUE@ echo '#define _hypot hypot' > temp ; \ @BUILD_RX3D_TRUE@ cat graphicsPrimitives.cpp >> temp ; \ @BUILD_RX3D_TRUE@ mv temp graphicsPrimitives.cpp ; \ @BUILD_RX3D_TRUE@ fi #endif @BUILD_RX3D_TRUE@ if test ! graphicsPrimitives.cpp -ef $(geosrc)/graphicsPrimitives.cpp ; then \ @BUILD_RX3D_TRUE@ cp $(geosrc)/*.py . ; \ @BUILD_RX3D_TRUE@ fi @BUILD_RX3D_TRUE@ if test "$(PYTHON)" != "" ; then \ @BUILD_RX3D_TRUE@ $(PYTHON) setup.py build_ext $(mingwargs) --inplace > temp ; \ @BUILD_RX3D_TRUE@ if grep '\-shared.*\-lmsvcr90' temp ; then \ @BUILD_RX3D_TRUE@ grep '\-shared' temp | sed 's,\\,/,g' | sed 's,\-lmsvcr90,,' > temp1 ; \ @BUILD_RX3D_TRUE@ sh temp1 ; \ @BUILD_RX3D_TRUE@ fi ; \ @BUILD_RX3D_TRUE@ fi # above grep avoids: # A dynamic link library (DLL) initialization routine failed. # for python2 clean-generic: rm -r -f build rm -f ctng.cpp graphicsPrimitives.cpp surfaces.cpp rm -fr *.so # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/share/lib/python/neuron/rxd/geometry3d/__init__.py000066400000000000000000000002551323325274500243720ustar00rootroot00000000000000from .surface import surface from .triangularMesh import TriangularMesh from .voxelize import voxelize from .voxelize2 import voxelize2 from .scalarField import ScalarField neuron-7.5/share/lib/python/neuron/rxd/geometry3d/ctng.cpp000066400000000000000000047157621323325274500237440ustar00rootroot00000000000000#define _hypot hypot /* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__neuron__rxd__geometry3d__ctng #define __PYX_HAVE_API__neuron__rxd__geometry3d__ctng #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "math.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include #else #include #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "neuron/rxd/geometry3d/ctng.pyx", "__init__.pxd", "type.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":725 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":726 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":727 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":728 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":732 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":733 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":734 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":735 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":739 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":740 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":749 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":750 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":751 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":753 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":754 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":755 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":757 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":758 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":760 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":761 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":762 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif /*--- Type declarations ---*/ struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":764 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":765 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":766 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":768 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* "neuron/rxd/geometry3d/ctng.pyx":280 * @cython.wraparound(False) * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): # <<<<<<<<<<<<<< * cdef list objects = [] * cdef int i, j, k */ struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry { PyObject_HEAD PyObject *__pyx_v_all_cones; PyObject *__pyx_v_cell; }; /* "neuron/rxd/geometry3d/ctng.pyx":299 * cell = source * # probably an Import3D type * num_contours = sum(sec.iscontour_ for sec in cell.sections) # <<<<<<<<<<<<<< * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') */ struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr { PyObject_HEAD struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *__pyx_outer_scope; PyObject *__pyx_v_sec; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "neuron/rxd/geometry3d/ctng.pyx":424 * * * cdef dict cone_clip_db = dict((cone, []) for cone in all_cones) # <<<<<<<<<<<<<< * cdef bint sharp_turn * # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} */ struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr { PyObject_HEAD struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *__pyx_outer_scope; PyObject *__pyx_v_cone; }; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static double __Pyx__PyObject_AsDouble(PyObject* obj); #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj)\ (likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\ likely(PyInt_CheckExact(obj)) ?\ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) #else #define __Pyx_PyObject_AsDouble(obj)\ ((likely(PyFloat_CheckExact(obj))) ?\ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) PyErr_SetObject(PyExc_KeyError, args); Py_XDECREF(args); } return NULL; } Py_INCREF(value); return value; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static void __Pyx_RaiseBufferFallbackError(void); #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace); #else #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\ ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) #endif static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ PyObject_RichCompare(op1, op2, Py_EQ) #endif #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname); static int __Pyx_Coroutine_clear(PyObject *self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); static int __Pyx_patch_abc(void); #define __Pyx_Generator_USED static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_New(body, closure, name, qualname)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); static int __Pyx_check_binary_version(void); #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif static PyObject *__Pyx_ImportModule(const char *name); static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ /* Module declarations from 'cython' */ /* Module declarations from 'neuron.rxd.geometry3d.ctng' */ static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr = 0; static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_seg_line_intersection(double, double, double, double, double, double, double, double, int); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_closest_pt3(PyObject *, PyObject *); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_4ctng_project(double, double, double, double, double, double); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_extreme_pts(PyObject *); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_register(PyObject *, PyObject *, PyObject *); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(PyObject *, PyObject *, double); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_tangent_sphere(PyObject *, int); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outside(double, double, double, double, double, double, double, double, double, double, double, double, double); /*proto*/ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "float_t", NULL, sizeof(__pyx_t_5numpy_float_t), { 0 }, 0, 'R', 0, 0 }; #define __Pyx_MODULE_NAME "neuron.rxd.geometry3d.ctng" int __pyx_module_is_main_neuron__rxd__geometry3d__ctng = 0; /* Implementation of 'neuron.rxd.geometry3d.ctng' */ static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_zip; static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_builtin_sum; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_max; static PyObject *__pyx_builtin_min; static PyObject *__pyx_builtin_all; static PyObject *__pyx_builtin_any; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_m[] = "m"; static char __pyx_k_p[] = "p"; static char __pyx_k_q[] = "q"; static char __pyx_k_v[] = "v"; static char __pyx_k_x[] = "x"; static char __pyx_k_y[] = "y"; static char __pyx_k_z[] = "z"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_cp[] = "cp"; static char __pyx_k_cx[] = "cx"; static char __pyx_k_cy[] = "cy"; static char __pyx_k_d0[] = "d0"; static char __pyx_k_d1[] = "d1"; static char __pyx_k_dx[] = "dx"; static char __pyx_k_p1[] = "p1"; static char __pyx_k_p2[] = "p2"; static char __pyx_k_pt[] = "pt"; static char __pyx_k_r0[] = "_r0"; static char __pyx_k_r1[] = "_r1"; static char __pyx_k_r2[] = "r2"; static char __pyx_k_r3[] = "r3"; static char __pyx_k_sp[] = "sp"; static char __pyx_k_x0[] = "_x0"; static char __pyx_k_x1[] = "_x1"; static char __pyx_k_x2[] = "x2"; static char __pyx_k_x3[] = "x3"; static char __pyx_k_x4[] = "x4"; static char __pyx_k_xx[] = "xx"; static char __pyx_k_y0[] = "_y0"; static char __pyx_k_y1[] = "_y1"; static char __pyx_k_y2[] = "y2"; static char __pyx_k_y3[] = "y3"; static char __pyx_k_y4[] = "y4"; static char __pyx_k_yy[] = "yy"; static char __pyx_k_z0[] = "_z0"; static char __pyx_k_z1[] = "_z1"; static char __pyx_k_z2[] = "z2"; static char __pyx_k_z3[] = "z3"; static char __pyx_k_all[] = "all"; static char __pyx_k_any[] = "any"; static char __pyx_k_div[] = "div"; static char __pyx_k_dot[] = "dot"; static char __pyx_k_inf[] = "inf"; static char __pyx_k_mag[] = "mag"; static char __pyx_k_max[] = "max"; static char __pyx_k_min[] = "min"; static char __pyx_k_n3d[] = "n3d"; static char __pyx_k_pt0[] = "pt0"; static char __pyx_k_pt1[] = "pt1"; static char __pyx_k_pt2[] = "pt2"; static char __pyx_k_pt3[] = "pt3"; static char __pyx_k_pts[] = "pts"; static char __pyx_k_raw[] = "raw"; static char __pyx_k_rxd[] = "rxd"; static char __pyx_k_sec[] = "sec"; static char __pyx_k_sum[] = "sum"; static char __pyx_k_x3d[] = "x3d"; static char __pyx_k_y3d[] = "y3d"; static char __pyx_k_z3d[] = "z3d"; static char __pyx_k_zip[] = "zip"; static char __pyx_k_Cone[] = "Cone"; static char __pyx_k_args[] = "args"; static char __pyx_k_axis[] = "axis"; static char __pyx_k_cell[] = "cell"; static char __pyx_k_clip[] = "clip"; static char __pyx_k_cone[] = "cone"; static char __pyx_k_left[] = "left"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_norm[] = "norm"; static char __pyx_k_psec[] = "psec"; static char __pyx_k_pt1x[] = "pt1x"; static char __pyx_k_pt1y[] = "pt1y"; static char __pyx_k_pt1z[] = "pt1z"; static char __pyx_k_pt2x[] = "pt2x"; static char __pyx_k_pt2y[] = "pt2y"; static char __pyx_k_pt2z[] = "pt2z"; static char __pyx_k_r0_2[] = "r0"; static char __pyx_k_r1_2[] = "r1"; static char __pyx_k_send[] = "send"; static char __pyx_k_soma[] = "soma"; static char __pyx_k_sqrt[] = "sqrt"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_tobj[] = "tobj"; static char __pyx_k_vals[] = "vals"; static char __pyx_k_warn[] = "warn"; static char __pyx_k_x0_2[] = "x0"; static char __pyx_k_x1_2[] = "x1"; static char __pyx_k_y0_2[] = "y0"; static char __pyx_k_y1_2[] = "y1"; static char __pyx_k_z0_2[] = "z0"; static char __pyx_k_z1_2[] = "z1"; static char __pyx_k_Plane[] = "Plane"; static char __pyx_k_Union[] = "Union"; static char __pyx_k_array[] = "array"; static char __pyx_k_axisx[] = "axisx"; static char __pyx_k_axisy[] = "axisy"; static char __pyx_k_axisz[] = "axisz"; static char __pyx_k_clips[] = "clips"; static char __pyx_k_close[] = "close"; static char __pyx_k_cross[] = "cross"; static char __pyx_k_diam1[] = "diam1"; static char __pyx_k_diam2[] = "diam2"; static char __pyx_k_f_pts[] = "f_pts"; static char __pyx_k_hname[] = "hname"; static char __pyx_k_major[] = "major"; static char __pyx_k_minor[] = "minor"; static char __pyx_k_naxis[] = "naxis"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_range[] = "range"; static char __pyx_k_right[] = "right"; static char __pyx_k_somax[] = "somax"; static char __pyx_k_somay[] = "somay"; static char __pyx_k_somaz[] = "somaz"; static char __pyx_k_throw[] = "throw"; static char __pyx_k_Matrix[] = "Matrix"; static char __pyx_k_Sphere[] = "Sphere"; static char __pyx_k_append[] = "append"; static char __pyx_k_bisect[] = "bisect"; static char __pyx_k_branch[] = "branch"; static char __pyx_k_deltad[] = "deltad"; static char __pyx_k_diam3d[] = "diam3d"; static char __pyx_k_getcol[] = "getcol"; static char __pyx_k_getrow[] = "getrow"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_linalg[] = "linalg"; static char __pyx_k_neuron[] = "neuron"; static char __pyx_k_parent[] = "parent"; static char __pyx_k_remove[] = "remove"; static char __pyx_k_sec_db[] = "_sec_db"; static char __pyx_k_setval[] = "setval"; static char __pyx_k_soma_0[] = "soma[0]"; static char __pyx_k_source[] = "source"; static char __pyx_k_xrange[] = "xrange"; static char __pyx_k_delta_x[] = "delta_x"; static char __pyx_k_delta_y[] = "delta_y"; static char __pyx_k_diam_db[] = "diam_db"; static char __pyx_k_f_diams[] = "f_diams"; static char __pyx_k_genexpr[] = "genexpr"; static char __pyx_k_max_ind[] = "max_ind"; static char __pyx_k_min_ind[] = "min_ind"; static char __pyx_k_objects[] = "objects"; static char __pyx_k_product[] = "product"; static char __pyx_k_symmeig[] = "symmeig"; static char __pyx_k_xs_loop[] = "xs_loop"; static char __pyx_k_ys_loop[] = "ys_loop"; static char __pyx_k_Cylinder[] = "Cylinder"; static char __pyx_k_SkewCone[] = "SkewCone"; static char __pyx_k_branches[] = "branches"; static char __pyx_k_distance[] = "distance"; static char __pyx_k_extreme1[] = "extreme1"; static char __pyx_k_extreme2[] = "extreme2"; static char __pyx_k_get_clip[] = "get_clip"; static char __pyx_k_int_clip[] = "int_clip"; static char __pyx_k_is_stack[] = "is_stack"; static char __pyx_k_major_p1[] = "major_p1"; static char __pyx_k_major_p2[] = "major_p2"; static char __pyx_k_sections[] = "sections"; static char __pyx_k_set_clip[] = "set_clip"; static char __pyx_k_soma_sec[] = "soma_sec"; static char __pyx_k_warnings[] = "warnings"; static char __pyx_k_xshifted[] = "xshifted"; static char __pyx_k_yshifted[] = "yshifted"; static char __pyx_k_zshifted[] = "zshifted"; static char __pyx_k_all_cones[] = "all_cones"; static char __pyx_k_enumerate[] = "enumerate"; static char __pyx_k_iscontour[] = "iscontour_"; static char __pyx_k_itertools[] = "itertools"; static char __pyx_k_join_item[] = "join_item"; static char __pyx_k_parentsec[] = "parentsec"; static char __pyx_k_to_python[] = "to_python"; static char __pyx_k_SphereCone[] = "SphereCone"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_axislength[] = "axislength"; static char __pyx_k_center_vec[] = "center_vec"; static char __pyx_k_morphology[] = "morphology"; static char __pyx_k_radial_vec[] = "radial_vec"; static char __pyx_k_sharp_turn[] = "sharp_turn"; static char __pyx_k_sphere_cap[] = "sphere_cap"; static char __pyx_k_n_soma_step[] = "n_soma_step"; static char __pyx_k_new_objects[] = "new_objects"; static char __pyx_k_nradial_vec[] = "nradial_vec"; static char __pyx_k_pts_sources[] = "pts_sources"; static char __pyx_k_Intersection[] = "Intersection"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_RxDException[] = "RxDException"; static char __pyx_k_clip_copying[] = "clip_copying"; static char __pyx_k_combinations[] = "combinations"; static char __pyx_k_cone_clip_db[] = "cone_clip_db"; static char __pyx_k_corner_count[] = "corner_count"; static char __pyx_k_define_shape[] = "define_shape"; static char __pyx_k_major_length[] = "major_length"; static char __pyx_k_num_contours[] = "num_contours"; static char __pyx_k_plane_normal[] = "plane_normal"; static char __pyx_k_pts_cones_db[] = "pts_cones_db"; static char __pyx_k_soma_objects[] = "soma_objects"; static char __pyx_k_contourcenter[] = "contourcenter"; static char __pyx_k_neighbor_copy[] = "neighbor_copy"; static char __pyx_k_neighbor_left[] = "neighbor_left"; static char __pyx_k_left_neighbors[] = "left_neighbors"; static char __pyx_k_neighbor_right[] = "neighbor_right"; static char __pyx_k_my_corner_count[] = "my_corner_count"; static char __pyx_k_parent_sec_name[] = "parent_sec_name"; static char __pyx_k_radial_vec_norm[] = "radial_vec_norm"; static char __pyx_k_right_neighbors[] = "right_neighbors"; static char __pyx_k_diam_corrections[] = "diam_corrections"; static char __pyx_k_graphicsPrimitives[] = "graphicsPrimitives"; static char __pyx_k_source_is_import3d[] = "source_is_import3d"; static char __pyx_k_neuron_rxd_morphology[] = "neuron.rxd.morphology"; static char __pyx_k_neuron_rxd_rxdException[] = "neuron.rxd.rxdException"; static char __pyx_k_unexpected_corner_counts[] = "unexpected corner_counts?"; static char __pyx_k_join_items_needing_clipped[] = "join_items_needing_clipped"; static char __pyx_k_neuron_rxd_geometry3d_ctng[] = "neuron.rxd.geometry3d.ctng"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_multiple_most_extreme_points[] = "multiple most extreme points"; static char __pyx_k_constructive_neuronal_geometry[] = "constructive_neuronal_geometry"; static char __pyx_k_home_hines_neuron_nrn_share_lib[] = "/home/hines/neuron/nrn/share/lib/python/neuron/rxd/geometry3d/ctng.pyx"; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_constructive_neuronal_geometry_l[] = "constructive_neuronal_geometry..genexpr"; static char __pyx_k_extreme_points_computation_faile[] = "extreme points computation failed"; static char __pyx_k_more_than_one_contour_is_not_cur[] = "more than one contour is not currently supported"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_soma_stack_ignored_using_centroi[] = "soma stack ignored; using centroid instead"; static char __pyx_k_whichend_for_tangent_sphere_must[] = "whichend for tangent_sphere must be 0 or 1"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_n_s_Cone; static PyObject *__pyx_n_s_Cylinder; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_n_s_Intersection; static PyObject *__pyx_n_s_Matrix; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_Plane; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_RxDException; static PyObject *__pyx_n_s_SkewCone; static PyObject *__pyx_n_s_Sphere; static PyObject *__pyx_n_s_SphereCone; static PyObject *__pyx_n_s_Union; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_all; static PyObject *__pyx_n_s_all_cones; static PyObject *__pyx_n_s_any; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_array; static PyObject *__pyx_n_s_axis; static PyObject *__pyx_n_s_axislength; static PyObject *__pyx_n_s_axisx; static PyObject *__pyx_n_s_axisy; static PyObject *__pyx_n_s_axisz; static PyObject *__pyx_n_s_bisect; static PyObject *__pyx_n_s_branch; static PyObject *__pyx_n_s_branches; static PyObject *__pyx_n_s_cell; static PyObject *__pyx_n_s_center_vec; static PyObject *__pyx_n_s_clip; static PyObject *__pyx_n_s_clip_copying; static PyObject *__pyx_n_s_clips; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_combinations; static PyObject *__pyx_n_s_cone; static PyObject *__pyx_n_s_cone_clip_db; static PyObject *__pyx_n_s_constructive_neuronal_geometry; static PyObject *__pyx_n_s_constructive_neuronal_geometry_l; static PyObject *__pyx_n_s_contourcenter; static PyObject *__pyx_n_s_corner_count; static PyObject *__pyx_n_s_cp; static PyObject *__pyx_n_s_cross; static PyObject *__pyx_n_s_cx; static PyObject *__pyx_n_s_cy; static PyObject *__pyx_n_s_d; static PyObject *__pyx_n_s_d0; static PyObject *__pyx_n_s_d1; static PyObject *__pyx_n_s_define_shape; static PyObject *__pyx_n_s_delta_x; static PyObject *__pyx_n_s_delta_y; static PyObject *__pyx_n_s_deltad; static PyObject *__pyx_n_s_diam1; static PyObject *__pyx_n_s_diam2; static PyObject *__pyx_n_s_diam3d; static PyObject *__pyx_n_s_diam_corrections; static PyObject *__pyx_n_s_diam_db; static PyObject *__pyx_n_s_distance; static PyObject *__pyx_n_s_div; static PyObject *__pyx_n_s_dot; static PyObject *__pyx_n_s_dx; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_extreme1; static PyObject *__pyx_n_s_extreme2; static PyObject *__pyx_kp_s_extreme_points_computation_faile; static PyObject *__pyx_n_s_f_diams; static PyObject *__pyx_n_s_f_pts; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_get_clip; static PyObject *__pyx_n_s_getcol; static PyObject *__pyx_n_s_getrow; static PyObject *__pyx_n_s_graphicsPrimitives; static PyObject *__pyx_n_s_h; static PyObject *__pyx_n_s_hname; static PyObject *__pyx_kp_s_home_hines_neuron_nrn_share_lib; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_int_clip; static PyObject *__pyx_n_s_is_stack; static PyObject *__pyx_n_s_iscontour; static PyObject *__pyx_n_s_itertools; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_join_item; static PyObject *__pyx_n_s_join_items_needing_clipped; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_left; static PyObject *__pyx_n_s_left_neighbors; static PyObject *__pyx_n_s_linalg; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_mag; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_major; static PyObject *__pyx_n_s_major_length; static PyObject *__pyx_n_s_major_p1; static PyObject *__pyx_n_s_major_p2; static PyObject *__pyx_n_s_max; static PyObject *__pyx_n_s_max_ind; static PyObject *__pyx_n_s_min; static PyObject *__pyx_n_s_min_ind; static PyObject *__pyx_n_s_minor; static PyObject *__pyx_kp_s_more_than_one_contour_is_not_cur; static PyObject *__pyx_n_s_morphology; static PyObject *__pyx_kp_s_multiple_most_extreme_points; static PyObject *__pyx_n_s_my_corner_count; static PyObject *__pyx_n_s_n3d; static PyObject *__pyx_n_s_n_soma_step; static PyObject *__pyx_n_s_naxis; static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; static PyObject *__pyx_n_s_neighbor_copy; static PyObject *__pyx_n_s_neighbor_left; static PyObject *__pyx_n_s_neighbor_right; static PyObject *__pyx_n_s_neuron; static PyObject *__pyx_n_s_neuron_rxd_geometry3d_ctng; static PyObject *__pyx_n_s_neuron_rxd_morphology; static PyObject *__pyx_n_s_neuron_rxd_rxdException; static PyObject *__pyx_n_s_new_objects; static PyObject *__pyx_n_s_norm; static PyObject *__pyx_n_s_nradial_vec; static PyObject *__pyx_n_s_num_contours; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_objects; static PyObject *__pyx_n_s_p; static PyObject *__pyx_n_s_p1; static PyObject *__pyx_n_s_p2; static PyObject *__pyx_n_s_parent; static PyObject *__pyx_n_s_parent_sec_name; static PyObject *__pyx_n_s_parentsec; static PyObject *__pyx_n_s_plane_normal; static PyObject *__pyx_n_s_product; static PyObject *__pyx_n_s_psec; static PyObject *__pyx_n_s_pt; static PyObject *__pyx_n_s_pt0; static PyObject *__pyx_n_s_pt1; static PyObject *__pyx_n_s_pt1x; static PyObject *__pyx_n_s_pt1y; static PyObject *__pyx_n_s_pt1z; static PyObject *__pyx_n_s_pt2; static PyObject *__pyx_n_s_pt2x; static PyObject *__pyx_n_s_pt2y; static PyObject *__pyx_n_s_pt2z; static PyObject *__pyx_n_s_pt3; static PyObject *__pyx_n_s_pts; static PyObject *__pyx_n_s_pts_cones_db; static PyObject *__pyx_n_s_pts_sources; static PyObject *__pyx_n_s_q; static PyObject *__pyx_n_s_r0; static PyObject *__pyx_n_s_r0_2; static PyObject *__pyx_n_s_r1; static PyObject *__pyx_n_s_r1_2; static PyObject *__pyx_n_s_r2; static PyObject *__pyx_n_s_r3; static PyObject *__pyx_n_s_radial_vec; static PyObject *__pyx_n_s_radial_vec_norm; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_raw; static PyObject *__pyx_n_s_remove; static PyObject *__pyx_n_s_right; static PyObject *__pyx_n_s_right_neighbors; static PyObject *__pyx_n_s_rxd; static PyObject *__pyx_n_s_sec; static PyObject *__pyx_n_s_sec_db; static PyObject *__pyx_n_s_sections; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_set_clip; static PyObject *__pyx_n_s_setval; static PyObject *__pyx_n_s_sharp_turn; static PyObject *__pyx_n_s_soma; static PyObject *__pyx_kp_s_soma_0; static PyObject *__pyx_n_s_soma_objects; static PyObject *__pyx_n_s_soma_sec; static PyObject *__pyx_kp_s_soma_stack_ignored_using_centroi; static PyObject *__pyx_n_s_somax; static PyObject *__pyx_n_s_somay; static PyObject *__pyx_n_s_somaz; static PyObject *__pyx_n_s_source; static PyObject *__pyx_n_s_source_is_import3d; static PyObject *__pyx_n_s_sp; static PyObject *__pyx_n_s_sphere_cap; static PyObject *__pyx_n_s_sqrt; static PyObject *__pyx_n_s_sum; static PyObject *__pyx_n_s_symmeig; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_to_python; static PyObject *__pyx_n_s_tobj; static PyObject *__pyx_kp_s_unexpected_corner_counts; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_vals; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_n_s_warnings; static PyObject *__pyx_kp_s_whichend_for_tangent_sphere_must; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_x0; static PyObject *__pyx_n_s_x0_2; static PyObject *__pyx_n_s_x1; static PyObject *__pyx_n_s_x1_2; static PyObject *__pyx_n_s_x2; static PyObject *__pyx_n_s_x3; static PyObject *__pyx_n_s_x3d; static PyObject *__pyx_n_s_x4; static PyObject *__pyx_n_s_xrange; static PyObject *__pyx_n_s_xs_loop; static PyObject *__pyx_n_s_xshifted; static PyObject *__pyx_n_s_xx; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_y0; static PyObject *__pyx_n_s_y0_2; static PyObject *__pyx_n_s_y1; static PyObject *__pyx_n_s_y1_2; static PyObject *__pyx_n_s_y2; static PyObject *__pyx_n_s_y3; static PyObject *__pyx_n_s_y3d; static PyObject *__pyx_n_s_y4; static PyObject *__pyx_n_s_ys_loop; static PyObject *__pyx_n_s_yshifted; static PyObject *__pyx_n_s_yy; static PyObject *__pyx_n_s_z; static PyObject *__pyx_n_s_z0; static PyObject *__pyx_n_s_z0_2; static PyObject *__pyx_n_s_z1; static PyObject *__pyx_n_s_z1_2; static PyObject *__pyx_n_s_z2; static PyObject *__pyx_n_s_z3; static PyObject *__pyx_n_s_z3d; static PyObject *__pyx_n_s_zip; static PyObject *__pyx_n_s_zshifted; static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_soma_objects(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, CYTHON_UNUSED PyObject *__pyx_v_z, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, int __pyx_v_n_soma_step); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_3genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_2constructive_neuronal_geometry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, int __pyx_v_n_soma_step, double __pyx_v_dx); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_float_2_; static PyObject *__pyx_float_0_5; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__19; static PyObject *__pyx_codeobj__18; static PyObject *__pyx_codeobj__20; /* "neuron/rxd/geometry3d/ctng.pyx":18 * from graphicsPrimitives import Sphere, Cone, Cylinder, SkewCone, Plane, Union, Intersection, SphereCone * * cdef tuple seg_line_intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bint clip): # <<<<<<<<<<<<<< * # returns None if parallel (so None if 0 or infinitely many intersections) * # if clip is True, requires intersection on segment; else returns line-line intersection */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_seg_line_intersection(double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_x2, double __pyx_v_y2, double __pyx_v_x3, double __pyx_v_y3, double __pyx_v_x4, double __pyx_v_y4, int __pyx_v_clip) { double __pyx_v_denom; double __pyx_v_u; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; double __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("seg_line_intersection", 0); /* "neuron/rxd/geometry3d/ctng.pyx":21 * # returns None if parallel (so None if 0 or infinitely many intersections) * # if clip is True, requires intersection on segment; else returns line-line intersection * cdef double denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1) # <<<<<<<<<<<<<< * if denom == 0: return None * cdef double u = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom */ __pyx_v_denom = (((__pyx_v_y4 - __pyx_v_y3) * (__pyx_v_x2 - __pyx_v_x1)) - ((__pyx_v_x4 - __pyx_v_x3) * (__pyx_v_y2 - __pyx_v_y1))); /* "neuron/rxd/geometry3d/ctng.pyx":22 * # if clip is True, requires intersection on segment; else returns line-line intersection * cdef double denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1) * if denom == 0: return None # <<<<<<<<<<<<<< * cdef double u = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom * if clip and not (0 <= u <= 1): return None */ __pyx_t_1 = ((__pyx_v_denom == 0.0) != 0); if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = ((PyObject*)Py_None); goto __pyx_L0; } /* "neuron/rxd/geometry3d/ctng.pyx":23 * cdef double denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1) * if denom == 0: return None * cdef double u = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom # <<<<<<<<<<<<<< * if clip and not (0 <= u <= 1): return None * return (x1 + u * (x2 - x1), y1 + u * (y2 - y1)) */ __pyx_t_2 = (((__pyx_v_x4 - __pyx_v_x3) * (__pyx_v_y1 - __pyx_v_y3)) - ((__pyx_v_y4 - __pyx_v_y3) * (__pyx_v_x1 - __pyx_v_x3))); if (unlikely(__pyx_v_denom == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_u = (__pyx_t_2 / __pyx_v_denom); /* "neuron/rxd/geometry3d/ctng.pyx":24 * if denom == 0: return None * cdef double u = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom * if clip and not (0 <= u <= 1): return None # <<<<<<<<<<<<<< * return (x1 + u * (x2 - x1), y1 + u * (y2 - y1)) * */ __pyx_t_3 = (__pyx_v_clip != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = (0.0 <= __pyx_v_u); if (__pyx_t_3) { __pyx_t_3 = (__pyx_v_u <= 1.0); } __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = ((PyObject*)Py_None); goto __pyx_L0; } /* "neuron/rxd/geometry3d/ctng.pyx":25 * cdef double u = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom * if clip and not (0 <= u <= 1): return None * return (x1 + u * (x2 - x1), y1 + u * (y2 - y1)) # <<<<<<<<<<<<<< * * cdef tuple convert3dto2d(double x, double y, double z, double px, double py, double pz, double xx, double xy, double xz, double yx, double yy, double yz): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyFloat_FromDouble((__pyx_v_x1 + (__pyx_v_u * (__pyx_v_x2 - __pyx_v_x1)))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble((__pyx_v_y1 + (__pyx_v_u * (__pyx_v_y2 - __pyx_v_y1)))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_r = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":18 * from graphicsPrimitives import Sphere, Cone, Cylinder, SkewCone, Plane, Union, Intersection, SphereCone * * cdef tuple seg_line_intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bint clip): # <<<<<<<<<<<<<< * # returns None if parallel (so None if 0 or infinitely many intersections) * # if clip is True, requires intersection on segment; else returns line-line intersection */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.seg_line_intersection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":27 * return (x1 + u * (x2 - x1), y1 + u * (y2 - y1)) * * cdef tuple convert3dto2d(double x, double y, double z, double px, double py, double pz, double xx, double xy, double xz, double yx, double yy, double yz): # <<<<<<<<<<<<<< * x -= px; y -= py; z -= pz * return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_convert3dto2d(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, double __pyx_v_xx, double __pyx_v_xy, double __pyx_v_xz, double __pyx_v_yx, double __pyx_v_yy, double __pyx_v_yz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert3dto2d", 0); /* "neuron/rxd/geometry3d/ctng.pyx":28 * * cdef tuple convert3dto2d(double x, double y, double z, double px, double py, double pz, double xx, double xy, double xz, double yx, double yy, double yz): * x -= px; y -= py; z -= pz # <<<<<<<<<<<<<< * return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) * */ __pyx_v_x = (__pyx_v_x - __pyx_v_px); __pyx_v_y = (__pyx_v_y - __pyx_v_py); __pyx_v_z = (__pyx_v_z - __pyx_v_pz); /* "neuron/rxd/geometry3d/ctng.pyx":29 * cdef tuple convert3dto2d(double x, double y, double z, double px, double py, double pz, double xx, double xy, double xz, double yx, double yy, double yz): * x -= px; y -= py; z -= pz * return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) # <<<<<<<<<<<<<< * * cdef tuple closest_pt(tuple pt, list pts, z2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_4ctng_project(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_xx, __pyx_v_xy, __pyx_v_xz)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_4ctng_project(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_yx, __pyx_v_yy, __pyx_v_yz)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":27 * return (x1 + u * (x2 - x1), y1 + u * (y2 - y1)) * * cdef tuple convert3dto2d(double x, double y, double z, double px, double py, double pz, double xx, double xy, double xz, double yx, double yy, double yz): # <<<<<<<<<<<<<< * x -= px; y -= py; z -= pz * return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.convert3dto2d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":31 * return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) * * cdef tuple closest_pt(tuple pt, list pts, z2): # <<<<<<<<<<<<<< * dist = float('inf') * closest = None */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_closest_pt(PyObject *__pyx_v_pt, PyObject *__pyx_v_pts, PyObject *__pyx_v_z2) { PyObject *__pyx_v_dist = NULL; PyObject *__pyx_v_closest = NULL; PyObject *__pyx_v_p = NULL; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations double __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("closest_pt", 0); /* "neuron/rxd/geometry3d/ctng.pyx":32 * * cdef tuple closest_pt(tuple pt, list pts, z2): * dist = float('inf') # <<<<<<<<<<<<<< * closest = None * for p in pts: */ __pyx_t_1 = __Pyx_PyObject_AsDouble(__pyx_n_s_inf); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_dist = __pyx_t_2; __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":33 * cdef tuple closest_pt(tuple pt, list pts, z2): * dist = float('inf') * closest = None # <<<<<<<<<<<<<< * for p in pts: * x, y = p */ __Pyx_INCREF(Py_None); __pyx_v_closest = Py_None; /* "neuron/rxd/geometry3d/ctng.pyx":34 * dist = float('inf') * closest = None * for p in pts: # <<<<<<<<<<<<<< * x, y = p * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) */ if (unlikely(__pyx_v_pts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_pts; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":35 * closest = None * for p in pts: * x, y = p # <<<<<<<<<<<<<< * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) * if d < dist: */ if ((likely(PyTuple_CheckExact(__pyx_v_p))) || (PyList_CheckExact(__pyx_v_p))) { PyObject* sequence = __pyx_v_p; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_p); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":36 * for p in pts: * x, y = p * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) # <<<<<<<<<<<<<< * if d < dist: * dist = d */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_norm); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } if (!__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_pt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_pt); __Pyx_GIVEREF(__pyx_v_pt); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_pt); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_x); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_y); __Pyx_INCREF(__pyx_v_z2); __Pyx_GIVEREF(__pyx_v_z2); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_z2); __pyx_t_11 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_11) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_9) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":37 * x, y = p * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) * if d < dist: # <<<<<<<<<<<<<< * dist = d * closest = p */ __pyx_t_5 = PyObject_RichCompare(__pyx_v_d, __pyx_v_dist, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/ctng.pyx":38 * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) * if d < dist: * dist = d # <<<<<<<<<<<<<< * closest = p * return closest */ __Pyx_INCREF(__pyx_v_d); __Pyx_DECREF_SET(__pyx_v_dist, __pyx_v_d); /* "neuron/rxd/geometry3d/ctng.pyx":39 * if d < dist: * dist = d * closest = p # <<<<<<<<<<<<<< * return closest * */ __Pyx_INCREF(__pyx_v_p); __Pyx_DECREF_SET(__pyx_v_closest, __pyx_v_p); /* "neuron/rxd/geometry3d/ctng.pyx":37 * x, y = p * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) * if d < dist: # <<<<<<<<<<<<<< * dist = d * closest = p */ } /* "neuron/rxd/geometry3d/ctng.pyx":34 * dist = float('inf') * closest = None * for p in pts: # <<<<<<<<<<<<<< * x, y = p * d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":40 * dist = d * closest = p * return closest # <<<<<<<<<<<<<< * * cdef tuple closest_pt3(tuple pt, list pts): */ __Pyx_XDECREF(__pyx_r); if (!(likely(PyTuple_CheckExact(__pyx_v_closest))||((__pyx_v_closest) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_closest)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_closest); __pyx_r = ((PyObject*)__pyx_v_closest); goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":31 * return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) * * cdef tuple closest_pt(tuple pt, list pts, z2): # <<<<<<<<<<<<<< * dist = float('inf') * closest = None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.closest_pt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dist); __Pyx_XDECREF(__pyx_v_closest); __Pyx_XDECREF(__pyx_v_p); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":42 * return closest * * cdef tuple closest_pt3(tuple pt, list pts): # <<<<<<<<<<<<<< * dist = float('inf') * closest = None */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_closest_pt3(PyObject *__pyx_v_pt, PyObject *__pyx_v_pts) { PyObject *__pyx_v_dist = NULL; PyObject *__pyx_v_closest = NULL; PyObject *__pyx_v_p = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations double __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("closest_pt3", 0); /* "neuron/rxd/geometry3d/ctng.pyx":43 * * cdef tuple closest_pt3(tuple pt, list pts): * dist = float('inf') # <<<<<<<<<<<<<< * closest = None * for p in pts: */ __pyx_t_1 = __Pyx_PyObject_AsDouble(__pyx_n_s_inf); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_dist = __pyx_t_2; __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":44 * cdef tuple closest_pt3(tuple pt, list pts): * dist = float('inf') * closest = None # <<<<<<<<<<<<<< * for p in pts: * d = linalg.norm(numpy.array(pt) - numpy.array(p)) */ __Pyx_INCREF(Py_None); __pyx_v_closest = Py_None; /* "neuron/rxd/geometry3d/ctng.pyx":45 * dist = float('inf') * closest = None * for p in pts: # <<<<<<<<<<<<<< * d = linalg.norm(numpy.array(pt) - numpy.array(p)) * if d < dist: */ if (unlikely(__pyx_v_pts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_pts; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":46 * closest = None * for p in pts: * d = linalg.norm(numpy.array(pt) - numpy.array(p)) # <<<<<<<<<<<<<< * if d < dist: * dist = d */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_norm); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_pt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_pt); __Pyx_GIVEREF(__pyx_v_pt); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_pt); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_9) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_p); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_p); __Pyx_GIVEREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_p); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Subtract(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":47 * for p in pts: * d = linalg.norm(numpy.array(pt) - numpy.array(p)) * if d < dist: # <<<<<<<<<<<<<< * dist = d * closest = p */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_d, __pyx_v_dist, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_11) { /* "neuron/rxd/geometry3d/ctng.pyx":48 * d = linalg.norm(numpy.array(pt) - numpy.array(p)) * if d < dist: * dist = d # <<<<<<<<<<<<<< * closest = p * return closest */ __Pyx_INCREF(__pyx_v_d); __Pyx_DECREF_SET(__pyx_v_dist, __pyx_v_d); /* "neuron/rxd/geometry3d/ctng.pyx":49 * if d < dist: * dist = d * closest = p # <<<<<<<<<<<<<< * return closest * */ __Pyx_INCREF(__pyx_v_p); __Pyx_DECREF_SET(__pyx_v_closest, __pyx_v_p); /* "neuron/rxd/geometry3d/ctng.pyx":47 * for p in pts: * d = linalg.norm(numpy.array(pt) - numpy.array(p)) * if d < dist: # <<<<<<<<<<<<<< * dist = d * closest = p */ } /* "neuron/rxd/geometry3d/ctng.pyx":45 * dist = float('inf') * closest = None * for p in pts: # <<<<<<<<<<<<<< * d = linalg.norm(numpy.array(pt) - numpy.array(p)) * if d < dist: */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":50 * dist = d * closest = p * return closest # <<<<<<<<<<<<<< * * cdef double project(double fromx, double fromy, double fromz, double tox, double toy, double toz): */ __Pyx_XDECREF(__pyx_r); if (!(likely(PyTuple_CheckExact(__pyx_v_closest))||((__pyx_v_closest) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_closest)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_closest); __pyx_r = ((PyObject*)__pyx_v_closest); goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":42 * return closest * * cdef tuple closest_pt3(tuple pt, list pts): # <<<<<<<<<<<<<< * dist = float('inf') * closest = None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.closest_pt3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dist); __Pyx_XDECREF(__pyx_v_closest); __Pyx_XDECREF(__pyx_v_p); __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":52 * return closest * * cdef double project(double fromx, double fromy, double fromz, double tox, double toy, double toz): # <<<<<<<<<<<<<< * """scalar projection""" * return (fromx * tox + fromy * toy + fromz * toz) / (tox ** 2 + toy ** 2 + toz ** 2) ** 0.5 */ static double __pyx_f_6neuron_3rxd_10geometry3d_4ctng_project(double __pyx_v_fromx, double __pyx_v_fromy, double __pyx_v_fromz, double __pyx_v_tox, double __pyx_v_toy, double __pyx_v_toz) { double __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; double __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("project", 0); /* "neuron/rxd/geometry3d/ctng.pyx":54 * cdef double project(double fromx, double fromy, double fromz, double tox, double toy, double toz): * """scalar projection""" * return (fromx * tox + fromy * toy + fromz * toz) / (tox ** 2 + toy ** 2 + toz ** 2) ** 0.5 # <<<<<<<<<<<<<< * * cdef tuple extreme_pts(list pts): */ __pyx_t_1 = (((__pyx_v_fromx * __pyx_v_tox) + (__pyx_v_fromy * __pyx_v_toy)) + (__pyx_v_fromz * __pyx_v_toz)); __pyx_t_2 = pow(((pow(__pyx_v_tox, 2.0) + pow(__pyx_v_toy, 2.0)) + pow(__pyx_v_toz, 2.0)), 0.5); if (unlikely(__pyx_t_2 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__pyx_t_1 / __pyx_t_2); goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":52 * return closest * * cdef double project(double fromx, double fromy, double fromz, double tox, double toy, double toz): # <<<<<<<<<<<<<< * """scalar projection""" * return (fromx * tox + fromy * toy + fromz * toz) / (tox ** 2 + toy ** 2 + toz ** 2) ** 0.5 */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("neuron.rxd.geometry3d.ctng.project", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":56 * return (fromx * tox + fromy * toy + fromz * toz) / (tox ** 2 + toy ** 2 + toz ** 2) ** 0.5 * * cdef tuple extreme_pts(list pts): # <<<<<<<<<<<<<< * if len(pts) < 2: raise RxDException('extreme points computation failed') * cdef double max_dist, d */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_extreme_pts(PyObject *__pyx_v_pts) { double __pyx_v_max_dist; double __pyx_v_d; PyObject *__pyx_v_pt1 = 0; PyObject *__pyx_v_pt2 = 0; PyObject *__pyx_v_best_p1 = 0; PyObject *__pyx_v_best_p2 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; double __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extreme_pts", 0); /* "neuron/rxd/geometry3d/ctng.pyx":57 * * cdef tuple extreme_pts(list pts): * if len(pts) < 2: raise RxDException('extreme points computation failed') # <<<<<<<<<<<<<< * cdef double max_dist, d * cdef tuple pt1, pt2, best_p1, best_p2 */ if (unlikely(__pyx_v_pts == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_pts); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((__pyx_t_1 < 2) != 0); if (__pyx_t_2) { __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RxDException); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "neuron/rxd/geometry3d/ctng.pyx":60 * cdef double max_dist, d * cdef tuple pt1, pt2, best_p1, best_p2 * max_dist = -1 # <<<<<<<<<<<<<< * * for pt1, pt2 in itertools.combinations(pts, 2): */ __pyx_v_max_dist = -1.0; /* "neuron/rxd/geometry3d/ctng.pyx":62 * max_dist = -1 * * for pt1, pt2 in itertools.combinations(pts, 2): # <<<<<<<<<<<<<< * d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) * if d > max_dist: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_combinations); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_1 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_1 = 1; } } __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_pts); __Pyx_GIVEREF(__pyx_v_pts); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_v_pts); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_int_2); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_7 = NULL; } else { __pyx_t_1 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } if (!(likely(PyTuple_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_pt1, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_pt2, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":63 * * for pt1, pt2 in itertools.combinations(pts, 2): * d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) # <<<<<<<<<<<<<< * if d > max_dist: * best_p1 = pt1 */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_norm); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_8) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_pt1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_pt1); __Pyx_GIVEREF(__pyx_v_pt1); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_pt1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_11) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_pt2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); } else { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_pt2); __Pyx_GIVEREF(__pyx_v_pt2); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_pt2); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_10) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_d = __pyx_t_13; /* "neuron/rxd/geometry3d/ctng.pyx":64 * for pt1, pt2 in itertools.combinations(pts, 2): * d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) * if d > max_dist: # <<<<<<<<<<<<<< * best_p1 = pt1 * best_p2 = pt2 */ __pyx_t_2 = ((__pyx_v_d > __pyx_v_max_dist) != 0); if (__pyx_t_2) { /* "neuron/rxd/geometry3d/ctng.pyx":65 * d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) * if d > max_dist: * best_p1 = pt1 # <<<<<<<<<<<<<< * best_p2 = pt2 * max_dist = d */ __Pyx_INCREF(__pyx_v_pt1); __Pyx_XDECREF_SET(__pyx_v_best_p1, __pyx_v_pt1); /* "neuron/rxd/geometry3d/ctng.pyx":66 * if d > max_dist: * best_p1 = pt1 * best_p2 = pt2 # <<<<<<<<<<<<<< * max_dist = d * return best_p1, best_p2 */ __Pyx_INCREF(__pyx_v_pt2); __Pyx_XDECREF_SET(__pyx_v_best_p2, __pyx_v_pt2); /* "neuron/rxd/geometry3d/ctng.pyx":67 * best_p1 = pt1 * best_p2 = pt2 * max_dist = d # <<<<<<<<<<<<<< * return best_p1, best_p2 * */ __pyx_v_max_dist = __pyx_v_d; /* "neuron/rxd/geometry3d/ctng.pyx":64 * for pt1, pt2 in itertools.combinations(pts, 2): * d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) * if d > max_dist: # <<<<<<<<<<<<<< * best_p1 = pt1 * best_p2 = pt2 */ } /* "neuron/rxd/geometry3d/ctng.pyx":62 * max_dist = -1 * * for pt1, pt2 in itertools.combinations(pts, 2): # <<<<<<<<<<<<<< * d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) * if d > max_dist: */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":68 * best_p2 = pt2 * max_dist = d * return best_p1, best_p2 # <<<<<<<<<<<<<< * * # helper function for maintaing the points-cones database */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_best_p1)) { __Pyx_RaiseUnboundLocalError("best_p1"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(!__pyx_v_best_p2)) { __Pyx_RaiseUnboundLocalError("best_p2"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_best_p1); __Pyx_GIVEREF(__pyx_v_best_p1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_best_p1); __Pyx_INCREF(__pyx_v_best_p2); __Pyx_GIVEREF(__pyx_v_best_p2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_best_p2); __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":56 * return (fromx * tox + fromy * toy + fromz * toz) / (tox ** 2 + toy ** 2 + toz ** 2) ** 0.5 * * cdef tuple extreme_pts(list pts): # <<<<<<<<<<<<<< * if len(pts) < 2: raise RxDException('extreme points computation failed') * cdef double max_dist, d */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.extreme_pts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pt1); __Pyx_XDECREF(__pyx_v_pt2); __Pyx_XDECREF(__pyx_v_best_p1); __Pyx_XDECREF(__pyx_v_best_p2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":71 * * # helper function for maintaing the points-cones database * cdef register(dict pts_cones_db, tuple pt, cone): # <<<<<<<<<<<<<< * if pt not in pts_cones_db: * pts_cones_db[pt] = [] */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_register(PyObject *__pyx_v_pts_cones_db, PyObject *__pyx_v_pt, PyObject *__pyx_v_cone) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("register", 0); /* "neuron/rxd/geometry3d/ctng.pyx":72 * # helper function for maintaing the points-cones database * cdef register(dict pts_cones_db, tuple pt, cone): * if pt not in pts_cones_db: # <<<<<<<<<<<<<< * pts_cones_db[pt] = [] * pts_cones_db[pt].append(cone) */ if (unlikely(__pyx_v_pts_cones_db == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_pt, __pyx_v_pts_cones_db, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "neuron/rxd/geometry3d/ctng.pyx":73 * cdef register(dict pts_cones_db, tuple pt, cone): * if pt not in pts_cones_db: * pts_cones_db[pt] = [] # <<<<<<<<<<<<<< * pts_cones_db[pt].append(cone) * */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_pts_cones_db == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(PyDict_SetItem(__pyx_v_pts_cones_db, __pyx_v_pt, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":72 * # helper function for maintaing the points-cones database * cdef register(dict pts_cones_db, tuple pt, cone): * if pt not in pts_cones_db: # <<<<<<<<<<<<<< * pts_cones_db[pt] = [] * pts_cones_db[pt].append(cone) */ } /* "neuron/rxd/geometry3d/ctng.pyx":74 * if pt not in pts_cones_db: * pts_cones_db[pt] = [] * pts_cones_db[pt].append(cone) # <<<<<<<<<<<<<< * * # helper function that counts the number of points inside a region */ if (unlikely(__pyx_v_pts_cones_db == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_pts_cones_db, __pyx_v_pt); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_cone); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":71 * * # helper function for maintaing the points-cones database * cdef register(dict pts_cones_db, tuple pt, cone): # <<<<<<<<<<<<<< * if pt not in pts_cones_db: * pts_cones_db[pt] = [] */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.register", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":79 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int count_outside(region, list pts, double err): # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.float_t, ndim=1] pt * cdef int result = 0 */ static int __pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(PyObject *__pyx_v_region, PyObject *__pyx_v_pts, double __pyx_v_err) { PyArrayObject *__pyx_v_pt = 0; int __pyx_v_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_pt; __Pyx_Buffer __pyx_pybuffer_pt; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyArrayObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; Py_ssize_t __pyx_t_17; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("count_outside", 0); __pyx_pybuffer_pt.pybuffer.buf = NULL; __pyx_pybuffer_pt.refcount = 0; __pyx_pybuffernd_pt.data = NULL; __pyx_pybuffernd_pt.rcbuffer = &__pyx_pybuffer_pt; /* "neuron/rxd/geometry3d/ctng.pyx":81 * cdef int count_outside(region, list pts, double err): * cdef numpy.ndarray[numpy.float_t, ndim=1] pt * cdef int result = 0 # <<<<<<<<<<<<<< * for pt in pts: * if region.distance(pt[0], pt[1], pt[2]) > err: */ __pyx_v_result = 0; /* "neuron/rxd/geometry3d/ctng.pyx":82 * cdef numpy.ndarray[numpy.float_t, ndim=1] pt * cdef int result = 0 * for pt in pts: # <<<<<<<<<<<<<< * if region.distance(pt[0], pt[1], pt[2]) > err: * result += 1 */ if (unlikely(__pyx_v_pts == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_pts; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pt.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pt.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_5 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pt.rcbuffer->pybuffer, (PyObject*)__pyx_v_pt, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); } } __pyx_pybuffernd_pt.diminfo[0].strides = __pyx_pybuffernd_pt.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pt.diminfo[0].shape = __pyx_pybuffernd_pt.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_pt, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":83 * cdef int result = 0 * for pt in pts: * if region.distance(pt[0], pt[1], pt[2]) > err: # <<<<<<<<<<<<<< * result += 1 * return result */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_region, __pyx_n_s_distance); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = 0; __pyx_t_11 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_pt.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_pt.diminfo[0].strides))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = 1; __pyx_t_13 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_pt.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_pt.diminfo[0].strides))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = 2; __pyx_t_15 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_pt.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_pt.diminfo[0].strides))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = NULL; __pyx_t_17 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_16)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_17 = 1; } } __pyx_t_18 = PyTuple_New(3+__pyx_t_17); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_16) { __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL; } __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_17, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_17, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_17, __pyx_t_15); __pyx_t_11 = 0; __pyx_t_13 = 0; __pyx_t_15 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_err); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_18 = PyObject_RichCompare(__pyx_t_3, __pyx_t_9, Py_GT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_19) { /* "neuron/rxd/geometry3d/ctng.pyx":84 * for pt in pts: * if region.distance(pt[0], pt[1], pt[2]) > err: * result += 1 # <<<<<<<<<<<<<< * return result * */ __pyx_v_result = (__pyx_v_result + 1); /* "neuron/rxd/geometry3d/ctng.pyx":83 * cdef int result = 0 * for pt in pts: * if region.distance(pt[0], pt[1], pt[2]) > err: # <<<<<<<<<<<<<< * result += 1 * return result */ } /* "neuron/rxd/geometry3d/ctng.pyx":82 * cdef numpy.ndarray[numpy.float_t, ndim=1] pt * cdef int result = 0 * for pt in pts: # <<<<<<<<<<<<<< * if region.distance(pt[0], pt[1], pt[2]) > err: * result += 1 */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":85 * if region.distance(pt[0], pt[1], pt[2]) > err: * result += 1 * return result # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_r = __pyx_v_result; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":79 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef int count_outside(region, list pts, double err): # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.float_t, ndim=1] pt * cdef int result = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_18); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pt.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("neuron.rxd.geometry3d.ctng.count_outside", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pt.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_pt); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":89 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef list convert2dto3d(double ptx, double pty, double x1, double y1, double z1, numpy.ndarray[numpy.float_t, ndim=1] axis, numpy.ndarray[numpy.float_t, ndim=1] radial_vec): # <<<<<<<<<<<<<< * return [x1 + ptx * axis[0] + pty * radial_vec[0], y1 + ptx * axis[1] + pty * radial_vec[1], z1 + ptx * axis[2] + pty * radial_vec[2]] * */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_convert2dto3d(double __pyx_v_ptx, double __pyx_v_pty, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, PyArrayObject *__pyx_v_axis, PyArrayObject *__pyx_v_radial_vec) { __Pyx_LocalBuf_ND __pyx_pybuffernd_axis; __Pyx_Buffer __pyx_pybuffer_axis; __Pyx_LocalBuf_ND __pyx_pybuffernd_radial_vec; __Pyx_Buffer __pyx_pybuffer_radial_vec; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert2dto3d", 0); __pyx_pybuffer_axis.pybuffer.buf = NULL; __pyx_pybuffer_axis.refcount = 0; __pyx_pybuffernd_axis.data = NULL; __pyx_pybuffernd_axis.rcbuffer = &__pyx_pybuffer_axis; __pyx_pybuffer_radial_vec.pybuffer.buf = NULL; __pyx_pybuffer_radial_vec.refcount = 0; __pyx_pybuffernd_radial_vec.data = NULL; __pyx_pybuffernd_radial_vec.rcbuffer = &__pyx_pybuffer_radial_vec; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_axis.rcbuffer->pybuffer, (PyObject*)__pyx_v_axis, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_axis.diminfo[0].strides = __pyx_pybuffernd_axis.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_axis.diminfo[0].shape = __pyx_pybuffernd_axis.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_radial_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_radial_vec.diminfo[0].strides = __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_radial_vec.diminfo[0].shape = __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.shape[0]; /* "neuron/rxd/geometry3d/ctng.pyx":90 * @cython.wraparound(False) * cdef list convert2dto3d(double ptx, double pty, double x1, double y1, double z1, numpy.ndarray[numpy.float_t, ndim=1] axis, numpy.ndarray[numpy.float_t, ndim=1] radial_vec): * return [x1 + ptx * axis[0] + pty * radial_vec[0], y1 + ptx * axis[1] + pty * radial_vec[1], z1 + ptx * axis[2] + pty * radial_vec[2]] # <<<<<<<<<<<<<< * * cdef double qsolve(double a, double b, double c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_x1 + (__pyx_v_ptx * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_axis.diminfo[0].strides)))) + (__pyx_v_pty * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_radial_vec.diminfo[0].strides))))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; __pyx_t_5 = 1; __pyx_t_6 = PyFloat_FromDouble(((__pyx_v_y1 + (__pyx_v_ptx * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_axis.diminfo[0].strides)))) + (__pyx_v_pty * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_radial_vec.diminfo[0].strides))))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 2; __pyx_t_8 = 2; __pyx_t_9 = PyFloat_FromDouble(((__pyx_v_z1 + (__pyx_v_ptx * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_axis.diminfo[0].strides)))) + (__pyx_v_pty * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_radial_vec.diminfo[0].strides))))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyList_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_9); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":89 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef list convert2dto3d(double ptx, double pty, double x1, double y1, double z1, numpy.ndarray[numpy.float_t, ndim=1] axis, numpy.ndarray[numpy.float_t, ndim=1] radial_vec): # <<<<<<<<<<<<<< * return [x1 + ptx * axis[0] + pty * radial_vec[0], y1 + ptx * axis[1] + pty * radial_vec[1], z1 + ptx * axis[2] + pty * radial_vec[2]] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_axis.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.convert2dto3d", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_axis.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":92 * return [x1 + ptx * axis[0] + pty * radial_vec[0], y1 + ptx * axis[1] + pty * radial_vec[1], z1 + ptx * axis[2] + pty * radial_vec[2]] * * cdef double qsolve(double a, double b, double c): # <<<<<<<<<<<<<< * """solve a quadratic equation""" * cdef double discrim = b ** 2 - 4 * a * c */ static double __pyx_f_6neuron_3rxd_10geometry3d_4ctng_qsolve(double __pyx_v_a, double __pyx_v_b, double __pyx_v_c) { double __pyx_v_discrim; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; double __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("qsolve", 0); /* "neuron/rxd/geometry3d/ctng.pyx":94 * cdef double qsolve(double a, double b, double c): * """solve a quadratic equation""" * cdef double discrim = b ** 2 - 4 * a * c # <<<<<<<<<<<<<< * assert(discrim >= 0) * return (-b - numpy.sqrt(discrim)) / (2 * a), (-b + numpy.sqrt(discrim)) / (2 * a) */ __pyx_v_discrim = (pow(__pyx_v_b, 2.0) - ((4.0 * __pyx_v_a) * __pyx_v_c)); /* "neuron/rxd/geometry3d/ctng.pyx":95 * """solve a quadratic equation""" * cdef double discrim = b ** 2 - 4 * a * c * assert(discrim >= 0) # <<<<<<<<<<<<<< * return (-b - numpy.sqrt(discrim)) / (2 * a), (-b + numpy.sqrt(discrim)) / (2 * a) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_discrim >= 0.0) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "neuron/rxd/geometry3d/ctng.pyx":96 * cdef double discrim = b ** 2 - 4 * a * c * assert(discrim >= 0) * return (-b - numpy.sqrt(discrim)) / (2 * a), (-b + numpy.sqrt(discrim)) / (2 * a) # <<<<<<<<<<<<<< * * cdef tangent_sphere(cone, int whichend): */ __pyx_t_1 = PyFloat_FromDouble((-__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_v_discrim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble((2.0 * __pyx_v_a)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble((-__pyx_v_b)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyFloat_FromDouble(__pyx_v_discrim); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble((2.0 * __pyx_v_a)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_8; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":92 * return [x1 + ptx * axis[0] + pty * radial_vec[0], y1 + ptx * axis[1] + pty * radial_vec[1], z1 + ptx * axis[2] + pty * radial_vec[2]] * * cdef double qsolve(double a, double b, double c): # <<<<<<<<<<<<<< * """solve a quadratic equation""" * cdef double discrim = b ** 2 - 4 * a * c */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.ctng.qsolve", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":98 * return (-b - numpy.sqrt(discrim)) / (2 * a), (-b + numpy.sqrt(discrim)) / (2 * a) * * cdef tangent_sphere(cone, int whichend): # <<<<<<<<<<<<<< * pt0 = numpy.array([cone._x0, cone._y0, cone._z0]) * pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_tangent_sphere(PyObject *__pyx_v_cone, int __pyx_v_whichend) { PyObject *__pyx_v_pt0 = NULL; PyObject *__pyx_v_pt1 = NULL; double __pyx_v_rnear; double __pyx_v_rfar; double __pyx_v_shift; PyObject *__pyx_v_pt = NULL; PyObject *__pyx_v_shift_sign = NULL; PyObject *__pyx_v_axis = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; double __pyx_t_7; double __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tangent_sphere", 0); /* "neuron/rxd/geometry3d/ctng.pyx":99 * * cdef tangent_sphere(cone, int whichend): * pt0 = numpy.array([cone._x0, cone._y0, cone._z0]) # <<<<<<<<<<<<<< * pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) * cdef double rnear, rfar, shift */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_x0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_y0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_z0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pt0 = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":100 * cdef tangent_sphere(cone, int whichend): * pt0 = numpy.array([cone._x0, cone._y0, cone._z0]) * pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) # <<<<<<<<<<<<<< * cdef double rnear, rfar, shift * if whichend == 0: */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_x1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_y1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_z1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pt1 = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":102 * pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) * cdef double rnear, rfar, shift * if whichend == 0: # <<<<<<<<<<<<<< * pt = pt0 * rnear = cone._r0 */ switch (__pyx_v_whichend) { case 0: /* "neuron/rxd/geometry3d/ctng.pyx":103 * cdef double rnear, rfar, shift * if whichend == 0: * pt = pt0 # <<<<<<<<<<<<<< * rnear = cone._r0 * rfar = cone._r1 */ __Pyx_INCREF(__pyx_v_pt0); __pyx_v_pt = __pyx_v_pt0; /* "neuron/rxd/geometry3d/ctng.pyx":104 * if whichend == 0: * pt = pt0 * rnear = cone._r0 # <<<<<<<<<<<<<< * rfar = cone._r1 * shift_sign = 1 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_r0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rnear = __pyx_t_7; /* "neuron/rxd/geometry3d/ctng.pyx":105 * pt = pt0 * rnear = cone._r0 * rfar = cone._r1 # <<<<<<<<<<<<<< * shift_sign = 1 * elif whichend == 1: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_r1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rfar = __pyx_t_7; /* "neuron/rxd/geometry3d/ctng.pyx":106 * rnear = cone._r0 * rfar = cone._r1 * shift_sign = 1 # <<<<<<<<<<<<<< * elif whichend == 1: * pt = pt1 */ __Pyx_INCREF(__pyx_int_1); __pyx_v_shift_sign = __pyx_int_1; /* "neuron/rxd/geometry3d/ctng.pyx":102 * pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) * cdef double rnear, rfar, shift * if whichend == 0: # <<<<<<<<<<<<<< * pt = pt0 * rnear = cone._r0 */ break; /* "neuron/rxd/geometry3d/ctng.pyx":107 * rfar = cone._r1 * shift_sign = 1 * elif whichend == 1: # <<<<<<<<<<<<<< * pt = pt1 * rnear, rfar = cone._r1, cone._r0 */ case 1: /* "neuron/rxd/geometry3d/ctng.pyx":108 * shift_sign = 1 * elif whichend == 1: * pt = pt1 # <<<<<<<<<<<<<< * rnear, rfar = cone._r1, cone._r0 * shift_sign = -1 */ __Pyx_INCREF(__pyx_v_pt1); __pyx_v_pt = __pyx_v_pt1; /* "neuron/rxd/geometry3d/ctng.pyx":109 * elif whichend == 1: * pt = pt1 * rnear, rfar = cone._r1, cone._r0 # <<<<<<<<<<<<<< * shift_sign = -1 * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_r1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_r0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rnear = __pyx_t_7; __pyx_v_rfar = __pyx_t_8; /* "neuron/rxd/geometry3d/ctng.pyx":110 * pt = pt1 * rnear, rfar = cone._r1, cone._r0 * shift_sign = -1 # <<<<<<<<<<<<<< * else: * raise RxDException('whichend for tangent_sphere must be 0 or 1') */ __Pyx_INCREF(__pyx_int_neg_1); __pyx_v_shift_sign = __pyx_int_neg_1; /* "neuron/rxd/geometry3d/ctng.pyx":107 * rfar = cone._r1 * shift_sign = 1 * elif whichend == 1: # <<<<<<<<<<<<<< * pt = pt1 * rnear, rfar = cone._r1, cone._r0 */ break; default: /* "neuron/rxd/geometry3d/ctng.pyx":112 * shift_sign = -1 * else: * raise RxDException('whichend for tangent_sphere must be 0 or 1') # <<<<<<<<<<<<<< * shift = (rnear * rfar - rnear ** 2) / cone.axislength * axis = (pt1 - pt0) / cone.axislength */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RxDException); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "neuron/rxd/geometry3d/ctng.pyx":113 * else: * raise RxDException('whichend for tangent_sphere must be 0 or 1') * shift = (rnear * rfar - rnear ** 2) / cone.axislength # <<<<<<<<<<<<<< * axis = (pt1 - pt0) / cone.axislength * result = Sphere(*(list(pt + shift_sign * shift * axis) + [numpy.sqrt(shift ** 2 + rnear ** 2)])) */ __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_rnear * __pyx_v_rfar) - pow(__pyx_v_rnear, 2.0))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_axislength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_shift = __pyx_t_8; /* "neuron/rxd/geometry3d/ctng.pyx":114 * raise RxDException('whichend for tangent_sphere must be 0 or 1') * shift = (rnear * rfar - rnear ** 2) / cone.axislength * axis = (pt1 - pt0) / cone.axislength # <<<<<<<<<<<<<< * result = Sphere(*(list(pt + shift_sign * shift * axis) + [numpy.sqrt(shift ** 2 + rnear ** 2)])) * return result */ __pyx_t_6 = PyNumber_Subtract(__pyx_v_pt1, __pyx_v_pt0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_axislength); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_axis = __pyx_t_4; __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":115 * shift = (rnear * rfar - rnear ** 2) / cone.axislength * axis = (pt1 - pt0) / cone.axislength * result = Sphere(*(list(pt + shift_sign * shift * axis) + [numpy.sqrt(shift ** 2 + rnear ** 2)])) # <<<<<<<<<<<<<< * return result * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sphere); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_shift); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyNumber_Multiply(__pyx_v_shift_sign, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Multiply(__pyx_t_6, __pyx_v_axis); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(__pyx_v_pt, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble((pow(__pyx_v_shift, 2.0) + pow(__pyx_v_rnear, 2.0))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_3) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":116 * axis = (pt1 - pt0) / cone.axislength * result = Sphere(*(list(pt + shift_sign * shift * axis) + [numpy.sqrt(shift ** 2 + rnear ** 2)])) * return result # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":98 * return (-b - numpy.sqrt(discrim)) / (2 * a), (-b + numpy.sqrt(discrim)) / (2 * a) * * cdef tangent_sphere(cone, int whichend): # <<<<<<<<<<<<<< * pt0 = numpy.array([cone._x0, cone._y0, cone._z0]) * pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.tangent_sphere", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pt0); __Pyx_XDECREF(__pyx_v_pt1); __Pyx_XDECREF(__pyx_v_pt); __Pyx_XDECREF(__pyx_v_shift_sign); __Pyx_XDECREF(__pyx_v_axis); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":120 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef list join_outside(double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1, double x2, double y2, double z2, double r2, double dx): # <<<<<<<<<<<<<< * cdef double deltar, deltanr * cdef numpy.ndarray[numpy.float_t, ndim=1] pt1, radial_vec, nradial_vec, axis, naxis */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outside(double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1, double __pyx_v_x2, double __pyx_v_y2, double __pyx_v_z2, double __pyx_v_r2, double __pyx_v_dx) { double __pyx_v_deltar; double __pyx_v_deltanr; PyArrayObject *__pyx_v_pt1 = 0; PyArrayObject *__pyx_v_radial_vec = 0; PyArrayObject *__pyx_v_nradial_vec = 0; PyArrayObject *__pyx_v_axis = 0; PyArrayObject *__pyx_v_naxis = 0; PyObject *__pyx_v_sp = NULL; PyObject *__pyx_v_c0 = NULL; PyObject *__pyx_v_c1 = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_v_plane_normal = NULL; int __pyx_v_left_corner_count; int __pyx_v_corner_count; __Pyx_LocalBuf_ND __pyx_pybuffernd_axis; __Pyx_Buffer __pyx_pybuffer_axis; __Pyx_LocalBuf_ND __pyx_pybuffernd_naxis; __Pyx_Buffer __pyx_pybuffer_naxis; __Pyx_LocalBuf_ND __pyx_pybuffernd_nradial_vec; __Pyx_Buffer __pyx_pybuffer_nradial_vec; __Pyx_LocalBuf_ND __pyx_pybuffernd_pt1; __Pyx_Buffer __pyx_pybuffer_pt1; __Pyx_LocalBuf_ND __pyx_pybuffernd_radial_vec; __Pyx_Buffer __pyx_pybuffer_radial_vec; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; double __pyx_t_12; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; int __pyx_t_32; int __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; PyObject *__pyx_t_37 = NULL; PyObject *__pyx_t_38 = NULL; Py_ssize_t __pyx_t_39; Py_ssize_t __pyx_t_40; Py_ssize_t __pyx_t_41; PyObject *__pyx_t_42 = NULL; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; Py_ssize_t __pyx_t_46; Py_ssize_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; Py_ssize_t __pyx_t_51; Py_ssize_t __pyx_t_52; Py_ssize_t __pyx_t_53; Py_ssize_t __pyx_t_54; Py_ssize_t __pyx_t_55; Py_ssize_t __pyx_t_56; Py_ssize_t __pyx_t_57; Py_ssize_t __pyx_t_58; Py_ssize_t __pyx_t_59; Py_ssize_t __pyx_t_60; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("join_outside", 0); __pyx_pybuffer_pt1.pybuffer.buf = NULL; __pyx_pybuffer_pt1.refcount = 0; __pyx_pybuffernd_pt1.data = NULL; __pyx_pybuffernd_pt1.rcbuffer = &__pyx_pybuffer_pt1; __pyx_pybuffer_radial_vec.pybuffer.buf = NULL; __pyx_pybuffer_radial_vec.refcount = 0; __pyx_pybuffernd_radial_vec.data = NULL; __pyx_pybuffernd_radial_vec.rcbuffer = &__pyx_pybuffer_radial_vec; __pyx_pybuffer_nradial_vec.pybuffer.buf = NULL; __pyx_pybuffer_nradial_vec.refcount = 0; __pyx_pybuffernd_nradial_vec.data = NULL; __pyx_pybuffernd_nradial_vec.rcbuffer = &__pyx_pybuffer_nradial_vec; __pyx_pybuffer_axis.pybuffer.buf = NULL; __pyx_pybuffer_axis.refcount = 0; __pyx_pybuffernd_axis.data = NULL; __pyx_pybuffernd_axis.rcbuffer = &__pyx_pybuffer_axis; __pyx_pybuffer_naxis.pybuffer.buf = NULL; __pyx_pybuffer_naxis.refcount = 0; __pyx_pybuffernd_naxis.data = NULL; __pyx_pybuffernd_naxis.rcbuffer = &__pyx_pybuffer_naxis; /* "neuron/rxd/geometry3d/ctng.pyx":124 * cdef numpy.ndarray[numpy.float_t, ndim=1] pt1, radial_vec, nradial_vec, axis, naxis * * axis = numpy.array([x2 - x1, y2 - y1, z2 - z1]) # <<<<<<<<<<<<<< * naxis = numpy.array([x1 - x0, y1 - y0, z1 - z0]) * deltar = r2 - r1; deltanr = r1 - r0 */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble((__pyx_v_x2 - __pyx_v_x1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyFloat_FromDouble((__pyx_v_y2 - __pyx_v_y1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble((__pyx_v_z2 - __pyx_v_z1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_axis.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_axis.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_axis.rcbuffer->pybuffer, (PyObject*)__pyx_v_axis, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } } __pyx_pybuffernd_axis.diminfo[0].strides = __pyx_pybuffernd_axis.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_axis.diminfo[0].shape = __pyx_pybuffernd_axis.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_axis = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":125 * * axis = numpy.array([x2 - x1, y2 - y1, z2 - z1]) * naxis = numpy.array([x1 - x0, y1 - y0, z1 - z0]) # <<<<<<<<<<<<<< * deltar = r2 - r1; deltanr = r1 - r0 * deltar /= linalg.norm(axis); deltanr /= linalg.norm(naxis) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble((__pyx_v_x1 - __pyx_v_x0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyFloat_FromDouble((__pyx_v_y1 - __pyx_v_y0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyFloat_FromDouble((__pyx_v_z1 - __pyx_v_z0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer, (PyObject*)__pyx_v_naxis, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } } __pyx_pybuffernd_naxis.diminfo[0].strides = __pyx_pybuffernd_naxis.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_naxis.diminfo[0].shape = __pyx_pybuffernd_naxis.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_naxis = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":126 * axis = numpy.array([x2 - x1, y2 - y1, z2 - z1]) * naxis = numpy.array([x1 - x0, y1 - y0, z1 - z0]) * deltar = r2 - r1; deltanr = r1 - r0 # <<<<<<<<<<<<<< * deltar /= linalg.norm(axis); deltanr /= linalg.norm(naxis) * axis /= linalg.norm(axis); naxis /= linalg.norm(naxis) */ __pyx_v_deltar = (__pyx_v_r2 - __pyx_v_r1); __pyx_v_deltanr = (__pyx_v_r1 - __pyx_v_r0); /* "neuron/rxd/geometry3d/ctng.pyx":127 * naxis = numpy.array([x1 - x0, y1 - y0, z1 - z0]) * deltar = r2 - r1; deltanr = r1 - r0 * deltar /= linalg.norm(axis); deltanr /= linalg.norm(naxis) # <<<<<<<<<<<<<< * axis /= linalg.norm(axis); naxis /= linalg.norm(naxis) * # */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_deltar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_norm); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_axis)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_axis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_axis)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_axis)); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyNumber_InPlaceDivide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_deltar = __pyx_t_12; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_deltanr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_norm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_1) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_naxis)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_naxis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_naxis)); PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_naxis)); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyNumber_InPlaceDivide(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_deltanr = __pyx_t_12; /* "neuron/rxd/geometry3d/ctng.pyx":128 * deltar = r2 - r1; deltanr = r1 - r0 * deltar /= linalg.norm(axis); deltanr /= linalg.norm(naxis) * axis /= linalg.norm(axis); naxis /= linalg.norm(naxis) # <<<<<<<<<<<<<< * # * # sphere, clipped to extended cones */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_norm); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_axis)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_axis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_axis)); PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_axis)); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_axis), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_axis.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_axis.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_axis.rcbuffer->pybuffer, (PyObject*)__pyx_v_axis, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } } __pyx_pybuffernd_axis.diminfo[0].strides = __pyx_pybuffernd_axis.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_axis.diminfo[0].shape = __pyx_pybuffernd_axis.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_axis, ((PyArrayObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_norm); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_naxis)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_naxis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_naxis)); PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_naxis)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_naxis), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer, (PyObject*)__pyx_v_naxis, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } } __pyx_pybuffernd_naxis.diminfo[0].strides = __pyx_pybuffernd_naxis.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_naxis.diminfo[0].shape = __pyx_pybuffernd_naxis.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_naxis, ((PyArrayObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":133 * # CTNG:trimsphere * # * sp = Sphere(x1, y1, z1, r1) # <<<<<<<<<<<<<< * c0 = Cone(x0 - naxis[0] * r0, y0 - naxis[1] * r0, z0 - naxis[2] * r0, r0 - deltanr * r0, x1 + naxis[0] * r1, y1 + naxis[1] * r1, z1 + naxis[2] * r1, r1 + deltanr * r1) * c1 = Cone(x1 - axis[0] * r1, y1 - axis[1] * r1, z1 - axis[2] * r1, r1 - deltar * r1, x2 + axis[0] * r2, y2 + axis[1] * r2, z2 + axis[2] * r2, r2 + deltar * r2) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sphere); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_14 = 1; } } __pyx_t_15 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_14, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_14, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sp = __pyx_t_6; __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":134 * # * sp = Sphere(x1, y1, z1, r1) * c0 = Cone(x0 - naxis[0] * r0, y0 - naxis[1] * r0, z0 - naxis[2] * r0, r0 - deltanr * r0, x1 + naxis[0] * r1, y1 + naxis[1] * r1, z1 + naxis[2] * r1, r1 + deltanr * r1) # <<<<<<<<<<<<<< * c1 = Cone(x1 - axis[0] * r1, y1 - axis[1] * r1, z1 - axis[2] * r1, r1 - deltar * r1, x2 + axis[0] * r2, y2 + axis[1] * r2, z2 + axis[2] * r2, r2 + deltar * r2) * sp.set_clip([Intersection([c0, c1])]) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_16 = 0; __pyx_t_15 = PyFloat_FromDouble((__pyx_v_x0 - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_naxis.diminfo[0].strides)) * __pyx_v_r0))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_17 = 1; __pyx_t_3 = PyFloat_FromDouble((__pyx_v_y0 - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_naxis.diminfo[0].strides)) * __pyx_v_r0))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_18 = 2; __pyx_t_1 = PyFloat_FromDouble((__pyx_v_z0 - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_naxis.diminfo[0].strides)) * __pyx_v_r0))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyFloat_FromDouble((__pyx_v_r0 - (__pyx_v_deltanr * __pyx_v_r0))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = 0; __pyx_t_4 = PyFloat_FromDouble((__pyx_v_x1 + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_naxis.diminfo[0].strides)) * __pyx_v_r1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = 1; __pyx_t_13 = PyFloat_FromDouble((__pyx_v_y1 + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_naxis.diminfo[0].strides)) * __pyx_v_r1))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_21 = 2; __pyx_t_22 = PyFloat_FromDouble((__pyx_v_z1 + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_naxis.diminfo[0].strides)) * __pyx_v_r1))); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_23 = PyFloat_FromDouble((__pyx_v_r1 + (__pyx_v_deltanr * __pyx_v_r1))); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_24 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_14 = 1; } } __pyx_t_25 = PyTuple_New(8+__pyx_t_14); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); if (__pyx_t_24) { __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_24); __pyx_t_24 = NULL; } __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_14, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_14, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_25, 2+__pyx_t_14, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_25, 3+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_25, 4+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_25, 5+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_25, 6+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_25, 7+__pyx_t_14, __pyx_t_23); __pyx_t_15 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_25, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c0 = __pyx_t_6; __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":135 * sp = Sphere(x1, y1, z1, r1) * c0 = Cone(x0 - naxis[0] * r0, y0 - naxis[1] * r0, z0 - naxis[2] * r0, r0 - deltanr * r0, x1 + naxis[0] * r1, y1 + naxis[1] * r1, z1 + naxis[2] * r1, r1 + deltanr * r1) * c1 = Cone(x1 - axis[0] * r1, y1 - axis[1] * r1, z1 - axis[2] * r1, r1 - deltar * r1, x2 + axis[0] * r2, y2 + axis[1] * r2, z2 + axis[2] * r2, r2 + deltar * r2) # <<<<<<<<<<<<<< * sp.set_clip([Intersection([c0, c1])]) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_26 = 0; __pyx_t_25 = PyFloat_FromDouble((__pyx_v_x1 - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_axis.diminfo[0].strides)) * __pyx_v_r1))); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_27 = 1; __pyx_t_23 = PyFloat_FromDouble((__pyx_v_y1 - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_axis.diminfo[0].strides)) * __pyx_v_r1))); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_28 = 2; __pyx_t_22 = PyFloat_FromDouble((__pyx_v_z1 - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_axis.diminfo[0].strides)) * __pyx_v_r1))); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_13 = PyFloat_FromDouble((__pyx_v_r1 - (__pyx_v_deltar * __pyx_v_r1))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = 0; __pyx_t_4 = PyFloat_FromDouble((__pyx_v_x2 + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_axis.diminfo[0].strides)) * __pyx_v_r2))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_30 = 1; __pyx_t_5 = PyFloat_FromDouble((__pyx_v_y2 + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_axis.diminfo[0].strides)) * __pyx_v_r2))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_31 = 2; __pyx_t_1 = PyFloat_FromDouble((__pyx_v_z2 + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_axis.diminfo[0].strides)) * __pyx_v_r2))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyFloat_FromDouble((__pyx_v_r2 + (__pyx_v_deltar * __pyx_v_r2))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_14 = 1; } } __pyx_t_24 = PyTuple_New(8+__pyx_t_14); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_15); __pyx_t_15 = NULL; } __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_14, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_24, 2+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_24, 3+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_24, 4+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_24, 5+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_24, 6+__pyx_t_14, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_24, 7+__pyx_t_14, __pyx_t_3); __pyx_t_25 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_13 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_24, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_c1 = __pyx_t_6; __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":136 * c0 = Cone(x0 - naxis[0] * r0, y0 - naxis[1] * r0, z0 - naxis[2] * r0, r0 - deltanr * r0, x1 + naxis[0] * r1, y1 + naxis[1] * r1, z1 + naxis[2] * r1, r1 + deltanr * r1) * c1 = Cone(x1 - axis[0] * r1, y1 - axis[1] * r1, z1 - axis[2] * r1, r1 - deltar * r1, x2 + axis[0] * r2, y2 + axis[1] * r2, z2 + axis[2] * r2, r2 + deltar * r2) * sp.set_clip([Intersection([c0, c1])]) # <<<<<<<<<<<<<< * * result = [sp] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Intersection); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_c0); __Pyx_GIVEREF(__pyx_v_c0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_c0); __Pyx_INCREF(__pyx_v_c1); __Pyx_GIVEREF(__pyx_v_c1); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_c1); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_24); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_24) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_24); __pyx_t_24 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":138 * sp.set_clip([Intersection([c0, c1])]) * * result = [sp] # <<<<<<<<<<<<<< * # check to see if the clipped sphere covers the ends of the cones * # if not, do something else :) */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_sp); __Pyx_GIVEREF(__pyx_v_sp); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_sp); __pyx_v_result = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":143 * * # locate key vectors * plane_normal = numpy.cross(axis, naxis) # <<<<<<<<<<<<<< * radial_vec = numpy.cross(plane_normal, axis) * nradial_vec = numpy.cross(plane_normal, naxis) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cross); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_14 = 1; } } __pyx_t_3 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_axis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_axis)); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_14, ((PyObject *)__pyx_v_axis)); __Pyx_INCREF(((PyObject *)__pyx_v_naxis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_naxis)); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_14, ((PyObject *)__pyx_v_naxis)); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_plane_normal = __pyx_t_6; __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":144 * # locate key vectors * plane_normal = numpy.cross(axis, naxis) * radial_vec = numpy.cross(plane_normal, axis) # <<<<<<<<<<<<<< * nradial_vec = numpy.cross(plane_normal, naxis) * # normalize all of these */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cross); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_14 = 1; } } __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_plane_normal); __Pyx_GIVEREF(__pyx_v_plane_normal); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_v_plane_normal); __Pyx_INCREF(((PyObject *)__pyx_v_axis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_axis)); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, ((PyObject *)__pyx_v_axis)); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_radial_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } } __pyx_pybuffernd_radial_vec.diminfo[0].strides = __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_radial_vec.diminfo[0].shape = __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_radial_vec = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":145 * plane_normal = numpy.cross(axis, naxis) * radial_vec = numpy.cross(plane_normal, axis) * nradial_vec = numpy.cross(plane_normal, naxis) # <<<<<<<<<<<<<< * # normalize all of these * radial_vec /= linalg.norm(radial_vec) */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cross); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_14 = 1; } } __pyx_t_4 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_plane_normal); __Pyx_GIVEREF(__pyx_v_plane_normal); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_14, __pyx_v_plane_normal); __Pyx_INCREF(((PyObject *)__pyx_v_naxis)); __Pyx_GIVEREF(((PyObject *)__pyx_v_naxis)); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_14, ((PyObject *)__pyx_v_naxis)); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_nradial_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } } __pyx_pybuffernd_nradial_vec.diminfo[0].strides = __pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nradial_vec.diminfo[0].shape = __pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_nradial_vec = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":147 * nradial_vec = numpy.cross(plane_normal, naxis) * # normalize all of these * radial_vec /= linalg.norm(radial_vec) # <<<<<<<<<<<<<< * nradial_vec /= linalg.norm(nradial_vec) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_2) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_radial_vec)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_radial_vec)); __Pyx_GIVEREF(((PyObject *)__pyx_v_radial_vec)); PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)__pyx_v_radial_vec)); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_radial_vec), __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_radial_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } } __pyx_pybuffernd_radial_vec.diminfo[0].strides = __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_radial_vec.diminfo[0].shape = __pyx_pybuffernd_radial_vec.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_radial_vec, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":148 * # normalize all of these * radial_vec /= linalg.norm(radial_vec) * nradial_vec /= linalg.norm(nradial_vec) # <<<<<<<<<<<<<< * * # count the corners that are inside a sphere clipped to the cones */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_norm); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_nradial_vec)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_nradial_vec)); __Pyx_GIVEREF(((PyObject *)__pyx_v_nradial_vec)); PyTuple_SET_ITEM(__pyx_t_2, 0+1, ((PyObject *)__pyx_v_nradial_vec)); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_nradial_vec), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_nradial_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } } __pyx_pybuffernd_nradial_vec.diminfo[0].strides = __pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nradial_vec.diminfo[0].shape = __pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_nradial_vec, ((PyArrayObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":151 * * # count the corners that are inside a sphere clipped to the cones * pt1 = numpy.array([x1, y1, z1]) # <<<<<<<<<<<<<< * cdef int left_corner_count = 2 - count_outside(sp, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], dx * 0.5) * cdef int corner_count = 2 - count_outside(sp, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], dx * 0.5) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_24); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_24 = 0; __pyx_t_24 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_24) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_24); __pyx_t_24 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pt1.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pt1.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pt1.rcbuffer->pybuffer, (PyObject*)__pyx_v_pt1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } } __pyx_pybuffernd_pt1.diminfo[0].strides = __pyx_pybuffernd_pt1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pt1.diminfo[0].shape = __pyx_pybuffernd_pt1.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = 0; __pyx_v_pt1 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":152 * # count the corners that are inside a sphere clipped to the cones * pt1 = numpy.array([x1, y1, z1]) * cdef int left_corner_count = 2 - count_outside(sp, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], dx * 0.5) # <<<<<<<<<<<<<< * cdef int corner_count = 2 - count_outside(sp, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], dx * 0.5) * #print 'for join (%g, %g, %g; %g) - (%g, %g, %g; %g) - (%g, %g, %g; %g):' % (x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2) */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, ((PyObject *)__pyx_v_nradial_vec)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_pt1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, ((PyObject *)__pyx_v_nradial_vec)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(((PyObject *)__pyx_v_pt1), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_v_left_corner_count = (2 - __pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(__pyx_v_sp, ((PyObject*)__pyx_t_6), (__pyx_v_dx * 0.5))); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":153 * pt1 = numpy.array([x1, y1, z1]) * cdef int left_corner_count = 2 - count_outside(sp, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], dx * 0.5) * cdef int corner_count = 2 - count_outside(sp, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], dx * 0.5) # <<<<<<<<<<<<<< * #print 'for join (%g, %g, %g; %g) - (%g, %g, %g; %g) - (%g, %g, %g; %g):' % (x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2) * #print ' left_corner_count = %g; corner_count = %g' % (left_corner_count, corner_count) */ __pyx_t_6 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, ((PyObject *)__pyx_v_radial_vec)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_v_pt1), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, ((PyObject *)__pyx_v_radial_vec)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Subtract(((PyObject *)__pyx_v_pt1), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_v_corner_count = (2 - __pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(__pyx_v_sp, ((PyObject*)__pyx_t_3), (__pyx_v_dx * 0.5))); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":156 * #print 'for join (%g, %g, %g; %g) - (%g, %g, %g; %g) - (%g, %g, %g; %g):' % (x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2) * #print ' left_corner_count = %g; corner_count = %g' % (left_corner_count, corner_count) * if left_corner_count == corner_count == 2: # <<<<<<<<<<<<<< * sp.set_clip([Intersection([c0, c1, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), */ __pyx_t_32 = (__pyx_v_left_corner_count == __pyx_v_corner_count); if (__pyx_t_32) { __pyx_t_32 = (__pyx_v_corner_count == 2); } __pyx_t_33 = (__pyx_t_32 != 0); if (__pyx_t_33) { /* "neuron/rxd/geometry3d/ctng.pyx":157 * #print ' left_corner_count = %g; corner_count = %g' % (left_corner_count, corner_count) * if left_corner_count == corner_count == 2: * sp.set_clip([Intersection([c0, c1, # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Intersection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "neuron/rxd/geometry3d/ctng.pyx":158 * if left_corner_count == corner_count == 2: * sp.set_clip([Intersection([c0, c1, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count < 2 and corner_count == 2: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_34 = 0; __pyx_t_23 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_35 = 1; __pyx_t_25 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_36 = 2; __pyx_t_15 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_37 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_14 = 1; } } __pyx_t_38 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_38, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_38, 0+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_38, 1+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_38, 2+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_38, 3+__pyx_t_14, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_38, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_38, 5+__pyx_t_14, __pyx_t_15); __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_25 = 0; __pyx_t_15 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_38, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":159 * sp.set_clip([Intersection([c0, c1, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) # <<<<<<<<<<<<<< * elif left_corner_count < 2 and corner_count == 2: * # clipping to c1 is too harsh, but c0 clip is fine */ __pyx_t_38 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __pyx_t_15 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_23 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_39 = 0; __pyx_t_22 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_40 = 1; __pyx_t_13 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_41 = 2; __pyx_t_5 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_37 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_38))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_38); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_38); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_38, function); __pyx_t_14 = 1; } } __pyx_t_42 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_42, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_42, 0+__pyx_t_14, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_42, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_42, 2+__pyx_t_14, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_42, 3+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_42, 4+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_42, 5+__pyx_t_14, __pyx_t_5); __pyx_t_15 = 0; __pyx_t_25 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_13 = 0; __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_38, __pyx_t_42, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0; __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":157 * #print ' left_corner_count = %g; corner_count = %g' % (left_corner_count, corner_count) * if left_corner_count == corner_count == 2: * sp.set_clip([Intersection([c0, c1, # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_38 = PyList_New(4); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __Pyx_INCREF(__pyx_v_c0); __Pyx_GIVEREF(__pyx_v_c0); PyList_SET_ITEM(__pyx_t_38, 0, __pyx_v_c0); __Pyx_INCREF(__pyx_v_c1); __Pyx_GIVEREF(__pyx_v_c1); PyList_SET_ITEM(__pyx_t_38, 1, __pyx_v_c1); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_38, 2, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_38, 3, __pyx_t_4); __pyx_t_24 = 0; __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_4) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_38); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_24 = PyTuple_New(1+1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_24, 0+1, __pyx_t_38); __pyx_t_38 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_24, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_24 = PyTuple_New(1+1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_24, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_24, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":156 * #print 'for join (%g, %g, %g; %g) - (%g, %g, %g; %g) - (%g, %g, %g; %g):' % (x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2) * #print ' left_corner_count = %g; corner_count = %g' % (left_corner_count, corner_count) * if left_corner_count == corner_count == 2: # <<<<<<<<<<<<<< * sp.set_clip([Intersection([c0, c1, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/ctng.pyx":160 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count < 2 and corner_count == 2: # <<<<<<<<<<<<<< * # clipping to c1 is too harsh, but c0 clip is fine * sp.set_clip([Intersection([c0, */ __pyx_t_32 = ((__pyx_v_left_corner_count < 2) != 0); if (__pyx_t_32) { } else { __pyx_t_33 = __pyx_t_32; goto __pyx_L4_bool_binop_done; } __pyx_t_32 = ((__pyx_v_corner_count == 2) != 0); __pyx_t_33 = __pyx_t_32; __pyx_L4_bool_binop_done:; if (__pyx_t_33) { /* "neuron/rxd/geometry3d/ctng.pyx":162 * elif left_corner_count < 2 and corner_count == 2: * # clipping to c1 is too harsh, but c0 clip is fine * sp.set_clip([Intersection([c0, # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Intersection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "neuron/rxd/geometry3d/ctng.pyx":163 * # clipping to c1 is too harsh, but c0 clip is fine * sp.set_clip([Intersection([c0, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count == 2 and corner_count < 2: */ __pyx_t_38 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_42 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_43 = 0; __pyx_t_13 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_44 = 1; __pyx_t_22 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_45 = 2; __pyx_t_23 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_25 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_38))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_38); if (likely(__pyx_t_25)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_38); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_38, function); __pyx_t_14 = 1; } } __pyx_t_15 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_25) { __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_25); __pyx_t_25 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_t_42); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_15, 4+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_15, 5+__pyx_t_14, __pyx_t_23); __pyx_t_4 = 0; __pyx_t_42 = 0; __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_38, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":164 * sp.set_clip([Intersection([c0, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) # <<<<<<<<<<<<<< * elif left_corner_count == 2 and corner_count < 2: * # clipping to c0 is too harsh, but c1 clip is fine */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_23 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_22 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_46 = 0; __pyx_t_5 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_47 = 1; __pyx_t_42 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_48 = 2; __pyx_t_4 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_25 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_15); if (likely(__pyx_t_25)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_15, function); __pyx_t_14 = 1; } } __pyx_t_37 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_25) { __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_25); __pyx_t_25 = NULL; } __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_14, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_37, 2+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_37, 3+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_37, 4+__pyx_t_14, __pyx_t_42); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_37, 5+__pyx_t_14, __pyx_t_4); __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_13 = 0; __pyx_t_5 = 0; __pyx_t_42 = 0; __pyx_t_4 = 0; __pyx_t_38 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_37, NULL); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":162 * elif left_corner_count < 2 and corner_count == 2: * # clipping to c1 is too harsh, but c0 clip is fine * sp.set_clip([Intersection([c0, # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_15 = PyList_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v_c0); __Pyx_GIVEREF(__pyx_v_c0); PyList_SET_ITEM(__pyx_t_15, 0, __pyx_v_c0); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_15, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_38); PyList_SET_ITEM(__pyx_t_15, 2, __pyx_t_38); __pyx_t_6 = 0; __pyx_t_38 = 0; __pyx_t_38 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_38 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_38)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_38); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_38) { __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_15); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_24); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_38); __pyx_t_38 = NULL; __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_15); __pyx_t_15 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_24) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_24); __pyx_t_24 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":160 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count < 2 and corner_count == 2: # <<<<<<<<<<<<<< * # clipping to c1 is too harsh, but c0 clip is fine * sp.set_clip([Intersection([c0, */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/ctng.pyx":165 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count == 2 and corner_count < 2: # <<<<<<<<<<<<<< * # clipping to c0 is too harsh, but c1 clip is fine * sp.set_clip([Intersection([c1, */ __pyx_t_32 = ((__pyx_v_left_corner_count == 2) != 0); if (__pyx_t_32) { } else { __pyx_t_33 = __pyx_t_32; goto __pyx_L6_bool_binop_done; } __pyx_t_32 = ((__pyx_v_corner_count < 2) != 0); __pyx_t_33 = __pyx_t_32; __pyx_L6_bool_binop_done:; if (__pyx_t_33) { /* "neuron/rxd/geometry3d/ctng.pyx":167 * elif left_corner_count == 2 and corner_count < 2: * # clipping to c0 is too harsh, but c1 clip is fine * sp.set_clip([Intersection([c1, # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Intersection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "neuron/rxd/geometry3d/ctng.pyx":168 * # clipping to c0 is too harsh, but c1 clip is fine * sp.set_clip([Intersection([c1, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count < 2 and corner_count < 2: */ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_38 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __pyx_t_37 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_37); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_49 = 0; __pyx_t_42 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_50 = 1; __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_51 = 2; __pyx_t_13 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_15); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_15, function); __pyx_t_14 = 1; } } __pyx_t_23 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_14, __pyx_t_38); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_14, __pyx_t_37); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_23, 2+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_23, 3+__pyx_t_14, __pyx_t_42); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_23, 4+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_23, 5+__pyx_t_14, __pyx_t_13); __pyx_t_38 = 0; __pyx_t_37 = 0; __pyx_t_4 = 0; __pyx_t_42 = 0; __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_23, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":169 * sp.set_clip([Intersection([c1, * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) # <<<<<<<<<<<<<< * elif left_corner_count < 2 and corner_count < 2: * # both clips are too harsh; fall back to just using a sphere */ __pyx_t_23 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_42 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_52 = 0; __pyx_t_4 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_53 = 1; __pyx_t_37 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_37); __pyx_t_54 = 2; __pyx_t_38 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __pyx_t_22 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_23))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_23); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_23, function); __pyx_t_14 = 1; } } __pyx_t_25 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_25, 2+__pyx_t_14, __pyx_t_42); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_25, 3+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_25, 4+__pyx_t_14, __pyx_t_37); __Pyx_GIVEREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_25, 5+__pyx_t_14, __pyx_t_38); __pyx_t_13 = 0; __pyx_t_5 = 0; __pyx_t_42 = 0; __pyx_t_4 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_25, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":167 * elif left_corner_count == 2 and corner_count < 2: * # clipping to c0 is too harsh, but c1 clip is fine * sp.set_clip([Intersection([c1, # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_23 = PyList_New(3); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __Pyx_INCREF(__pyx_v_c1); __Pyx_GIVEREF(__pyx_v_c1); PyList_SET_ITEM(__pyx_t_23, 0, __pyx_v_c1); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_23, 1, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_15); PyList_SET_ITEM(__pyx_t_23, 2, __pyx_t_15); __pyx_t_24 = 0; __pyx_t_15 = 0; __pyx_t_15 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_15) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_23); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_24 = PyTuple_New(1+1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_15); __pyx_t_15 = NULL; __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_24, 0+1, __pyx_t_23); __pyx_t_23 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_24, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_24 = PyTuple_New(1+1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_24, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_24, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":165 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count == 2 and corner_count < 2: # <<<<<<<<<<<<<< * # clipping to c0 is too harsh, but c1 clip is fine * sp.set_clip([Intersection([c1, */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/ctng.pyx":170 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count < 2 and corner_count < 2: # <<<<<<<<<<<<<< * # both clips are too harsh; fall back to just using a sphere * sp.set_clip([Intersection([ */ __pyx_t_32 = ((__pyx_v_left_corner_count < 2) != 0); if (__pyx_t_32) { } else { __pyx_t_33 = __pyx_t_32; goto __pyx_L8_bool_binop_done; } __pyx_t_32 = ((__pyx_v_corner_count < 2) != 0); __pyx_t_33 = __pyx_t_32; __pyx_L8_bool_binop_done:; if (__pyx_t_33) { /* "neuron/rxd/geometry3d/ctng.pyx":172 * elif left_corner_count < 2 and corner_count < 2: * # both clips are too harsh; fall back to just using a sphere * sp.set_clip([Intersection([ # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Intersection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "neuron/rxd/geometry3d/ctng.pyx":173 * # both clips are too harsh; fall back to just using a sphere * sp.set_clip([Intersection([ * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * else: */ __pyx_t_23 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __pyx_t_15 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_38 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __pyx_t_55 = 0; __pyx_t_37 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_37); __pyx_t_56 = 1; __pyx_t_4 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_57 = 2; __pyx_t_42 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_axis.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_axis.diminfo[0].strides))); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_5 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_23))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_23); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_23, function); __pyx_t_14 = 1; } } __pyx_t_13 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_14, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_14, __pyx_t_38); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_14, __pyx_t_37); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 4+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_13, 5+__pyx_t_14, __pyx_t_42); __pyx_t_15 = 0; __pyx_t_25 = 0; __pyx_t_38 = 0; __pyx_t_37 = 0; __pyx_t_4 = 0; __pyx_t_42 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":174 * sp.set_clip([Intersection([ * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) # <<<<<<<<<<<<<< * else: * raise RxDException('unexpected corner_counts?') */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_42 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_37 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_37); __pyx_t_58 = 0; __pyx_t_38 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); __pyx_t_59 = 1; __pyx_t_25 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_60 = 2; __pyx_t_15 = PyFloat_FromDouble((-(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_naxis.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_naxis.diminfo[0].strides)))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_5 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_14 = 1; } } __pyx_t_22 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_14, __pyx_t_42); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_22, 2+__pyx_t_14, __pyx_t_37); __Pyx_GIVEREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_22, 3+__pyx_t_14, __pyx_t_38); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_22, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_22, 5+__pyx_t_14, __pyx_t_15); __pyx_t_42 = 0; __pyx_t_4 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_25 = 0; __pyx_t_15 = 0; __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_22, NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":172 * elif left_corner_count < 2 and corner_count < 2: * # both clips are too harsh; fall back to just using a sphere * sp.set_clip([Intersection([ # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_23); PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_23); __pyx_t_6 = 0; __pyx_t_23 = 0; __pyx_t_23 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_23)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_23); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_23) { __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_24); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_23); __pyx_t_23 = NULL; __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_24) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_24); __pyx_t_24 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":170 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * elif left_corner_count < 2 and corner_count < 2: # <<<<<<<<<<<<<< * # both clips are too harsh; fall back to just using a sphere * sp.set_clip([Intersection([ */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/ctng.pyx":176 * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * else: * raise RxDException('unexpected corner_counts?') # <<<<<<<<<<<<<< * * return result */ /*else*/ { __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RxDException); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; /* "neuron/rxd/geometry3d/ctng.pyx":178 * raise RxDException('unexpected corner_counts?') * * return result # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":120 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef list join_outside(double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1, double x2, double y2, double z2, double r2, double dx): # <<<<<<<<<<<<<< * cdef double deltar, deltanr * cdef numpy.ndarray[numpy.float_t, ndim=1] pt1, radial_vec, nradial_vec, axis, naxis */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_24); __Pyx_XDECREF(__pyx_t_25); __Pyx_XDECREF(__pyx_t_37); __Pyx_XDECREF(__pyx_t_38); __Pyx_XDECREF(__pyx_t_42); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_axis.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pt1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.join_outside", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_axis.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_naxis.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nradial_vec.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pt1.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_radial_vec.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_pt1); __Pyx_XDECREF((PyObject *)__pyx_v_radial_vec); __Pyx_XDECREF((PyObject *)__pyx_v_nradial_vec); __Pyx_XDECREF((PyObject *)__pyx_v_axis); __Pyx_XDECREF((PyObject *)__pyx_v_naxis); __Pyx_XDECREF(__pyx_v_sp); __Pyx_XDECREF(__pyx_v_c0); __Pyx_XDECREF(__pyx_v_c1); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_plane_normal); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":183 * @cython.wraparound(False) * @cython.boundscheck(False) * def soma_objects(x, y, z, double x0, double y0, double z0, int n_soma_step): # <<<<<<<<<<<<<< * cdef double diam1, diam2, somax, somay, somaz * cdef list objects = [] */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_1soma_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_1soma_objects = {"soma_objects", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_1soma_objects, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_1soma_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_x = 0; PyObject *__pyx_v_y = 0; CYTHON_UNUSED PyObject *__pyx_v_z = 0; double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; int __pyx_v_n_soma_step; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("soma_objects (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_x0_2,&__pyx_n_s_y0_2,&__pyx_n_s_z0_2,&__pyx_n_s_n_soma_step,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x0_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y0_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z0_2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_soma_step)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "soma_objects") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 7) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); } __pyx_v_x = values[0]; __pyx_v_y = values[1]; __pyx_v_z = values[2]; __pyx_v_x0 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_x0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y0 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_y0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z0 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_z0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_n_soma_step = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_n_soma_step == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("soma_objects", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.soma_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_4ctng_soma_objects(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_n_soma_step); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_soma_objects(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, CYTHON_UNUSED PyObject *__pyx_v_z, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, int __pyx_v_n_soma_step) { double __pyx_v_diam1; double __pyx_v_diam2; CYTHON_UNUSED double __pyx_v_somax; CYTHON_UNUSED double __pyx_v_somay; double __pyx_v_somaz; PyObject *__pyx_v_objects = 0; PyObject *__pyx_v_f_pts = 0; PyObject *__pyx_v_xshifted = NULL; PyObject *__pyx_v_yshifted = NULL; PyObject *__pyx_v_zshifted = NULL; PyObject *__pyx_v_m = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_p = NULL; PyObject *__pyx_v_j = NULL; PyObject *__pyx_v_q = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_v_tobj = NULL; PyObject *__pyx_v_major = NULL; PyObject *__pyx_v_minor = NULL; PyObject *__pyx_v_x1 = NULL; PyObject *__pyx_v_y1 = NULL; PyObject *__pyx_v_x2 = NULL; PyObject *__pyx_v_y2 = NULL; PyObject *__pyx_v_xs_loop = NULL; PyObject *__pyx_v_ys_loop = NULL; PyObject *__pyx_v_pts = NULL; PyObject *__pyx_v_pts_sources = NULL; PyObject *__pyx_v_x3 = NULL; PyObject *__pyx_v_y3 = NULL; PyObject *__pyx_v_x4 = NULL; PyObject *__pyx_v_y4 = NULL; PyObject *__pyx_v_pt = NULL; PyObject *__pyx_v_major_p1 = NULL; PyObject *__pyx_v_major_p2 = NULL; PyObject *__pyx_v_extreme1 = NULL; PyObject *__pyx_v_extreme2 = NULL; CYTHON_UNUSED PyObject *__pyx_v_major_length = NULL; PyObject *__pyx_v_delta_x = NULL; PyObject *__pyx_v_delta_y = NULL; PyObject *__pyx_v_f_diams = NULL; PyObject *__pyx_v_p1 = NULL; PyObject *__pyx_v_p2 = NULL; PyObject *__pyx_v_cx = NULL; PyObject *__pyx_v_cy = NULL; PyObject *__pyx_v_pt1x = NULL; PyObject *__pyx_v_pt1y = NULL; PyObject *__pyx_v_pt1z = NULL; PyObject *__pyx_v_pt2x = NULL; PyObject *__pyx_v_pt2y = NULL; PyObject *__pyx_v_pt2z = NULL; PyObject *__pyx_v_xx = NULL; PyObject *__pyx_v_yy = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; double __pyx_t_2; double __pyx_t_3; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *(*__pyx_t_17)(PyObject *); double __pyx_t_18; double __pyx_t_19; double __pyx_t_20; double __pyx_t_21; double __pyx_t_22; int __pyx_t_23; int __pyx_t_24; PyObject *(*__pyx_t_25)(PyObject *); PyObject *__pyx_t_26 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("soma_objects", 0); /* "neuron/rxd/geometry3d/ctng.pyx":185 * def soma_objects(x, y, z, double x0, double y0, double z0, int n_soma_step): * cdef double diam1, diam2, somax, somay, somaz * cdef list objects = [] # <<<<<<<<<<<<<< * cdef list f_pts * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_objects = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":188 * cdef list f_pts * * somax, somay, somaz = x0, y0, z0 # <<<<<<<<<<<<<< * * xshifted = [xx - x0 for xx in x] */ __pyx_t_2 = __pyx_v_x0; __pyx_t_3 = __pyx_v_y0; __pyx_t_4 = __pyx_v_z0; __pyx_v_somax = __pyx_t_2; __pyx_v_somay = __pyx_t_3; __pyx_v_somaz = __pyx_t_4; /* "neuron/rxd/geometry3d/ctng.pyx":190 * somax, somay, somaz = x0, y0, z0 * * xshifted = [xx - x0 for xx in x] # <<<<<<<<<<<<<< * yshifted = [yy - y0 for yy in y] * # this is a hack to pretend everything is on the same z level */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) { __pyx_t_5 = __pyx_v_x; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_xx, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyNumber_Subtract(__pyx_v_xx, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_xshifted = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":191 * * xshifted = [xx - x0 for xx in x] * yshifted = [yy - y0 for yy in y] # <<<<<<<<<<<<<< * # this is a hack to pretend everything is on the same z level * zshifted = [0] * len(x) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_y)) || PyTuple_CheckExact(__pyx_v_y)) { __pyx_t_5 = __pyx_v_y; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_y); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif } } else { __pyx_t_9 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_9); } __Pyx_XDECREF_SET(__pyx_v_yy, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyNumber_Subtract(__pyx_v_yy, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_yshifted = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":193 * yshifted = [yy - y0 for yy in y] * # this is a hack to pretend everything is on the same z level * zshifted = [0] * len(x) # <<<<<<<<<<<<<< * * # locate the major and minor axis, adapted from import3d_gui.hoc */ __pyx_t_6 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyList_New(1 * ((__pyx_t_6<0) ? 0:__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_t_6; __pyx_temp++) { __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_0); } } __pyx_v_zshifted = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":196 * * # locate the major and minor axis, adapted from import3d_gui.hoc * m = h.Matrix(3, 3) # <<<<<<<<<<<<<< * for i, p in enumerate([xshifted, yshifted, zshifted]): * for j, q in enumerate([xshifted, yshifted, zshifted]): */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Matrix); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_m = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":197 * # locate the major and minor axis, adapted from import3d_gui.hoc * m = h.Matrix(3, 3) * for i, p in enumerate([xshifted, yshifted, zshifted]): # <<<<<<<<<<<<<< * for j, q in enumerate([xshifted, yshifted, zshifted]): * if j < i: continue */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_xshifted); __Pyx_GIVEREF(__pyx_v_xshifted); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_xshifted); __Pyx_INCREF(__pyx_v_yshifted); __Pyx_GIVEREF(__pyx_v_yshifted); PyList_SET_ITEM(__pyx_t_5, 1, __pyx_v_yshifted); __Pyx_INCREF(__pyx_v_zshifted); __Pyx_GIVEREF(__pyx_v_zshifted); PyList_SET_ITEM(__pyx_t_5, 2, __pyx_v_zshifted); __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (__pyx_t_6 >= 3) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":198 * m = h.Matrix(3, 3) * for i, p in enumerate([xshifted, yshifted, zshifted]): * for j, q in enumerate([xshifted, yshifted, zshifted]): # <<<<<<<<<<<<<< * if j < i: continue * v = numpy.dot(p, q) */ __Pyx_INCREF(__pyx_int_0); __pyx_t_5 = __pyx_int_0; __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_xshifted); __Pyx_GIVEREF(__pyx_v_xshifted); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_xshifted); __Pyx_INCREF(__pyx_v_yshifted); __Pyx_GIVEREF(__pyx_v_yshifted); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_v_yshifted); __Pyx_INCREF(__pyx_v_zshifted); __Pyx_GIVEREF(__pyx_v_zshifted); PyList_SET_ITEM(__pyx_t_9, 2, __pyx_v_zshifted); __pyx_t_10 = __pyx_t_9; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { if (__pyx_t_11 >= 3) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_9); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_XDECREF_SET(__pyx_v_q, __pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5); __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_9; __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":199 * for i, p in enumerate([xshifted, yshifted, zshifted]): * for j, q in enumerate([xshifted, yshifted, zshifted]): * if j < i: continue # <<<<<<<<<<<<<< * v = numpy.dot(p, q) * m.setval(i, j, v) */ __pyx_t_9 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { goto __pyx_L9_continue; } /* "neuron/rxd/geometry3d/ctng.pyx":200 * for j, q in enumerate([xshifted, yshifted, zshifted]): * if j < i: continue * v = numpy.dot(p, q) # <<<<<<<<<<<<<< * m.setval(i, j, v) * m.setval(j, i, v) */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_dot); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_15 = 1; } } __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_v_p); __Pyx_GIVEREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_p); __Pyx_INCREF(__pyx_v_q); __Pyx_GIVEREF(__pyx_v_q); PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_q); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":201 * if j < i: continue * v = numpy.dot(p, q) * m.setval(i, j, v) # <<<<<<<<<<<<<< * m.setval(j, i, v) * # CTNG:majoraxis */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_setval); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_16)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_15 = 1; } } __pyx_t_13 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_16) { __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_16); __pyx_t_16 = NULL; } __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_15, __pyx_v_i); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_15, __pyx_v_j); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_15, __pyx_v_v); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":202 * v = numpy.dot(p, q) * m.setval(i, j, v) * m.setval(j, i, v) # <<<<<<<<<<<<<< * # CTNG:majoraxis * tobj = m.symmeig(m) */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_setval); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_15 = 1; } } __pyx_t_16 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_j); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_i); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_v_v); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":198 * m = h.Matrix(3, 3) * for i, p in enumerate([xshifted, yshifted, zshifted]): * for j, q in enumerate([xshifted, yshifted, zshifted]): # <<<<<<<<<<<<<< * if j < i: continue * v = numpy.dot(p, q) */ __pyx_L9_continue:; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":197 * # locate the major and minor axis, adapted from import3d_gui.hoc * m = h.Matrix(3, 3) * for i, p in enumerate([xshifted, yshifted, zshifted]): # <<<<<<<<<<<<<< * for j, q in enumerate([xshifted, yshifted, zshifted]): * if j < i: continue */ } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":204 * m.setval(j, i, v) * # CTNG:majoraxis * tobj = m.symmeig(m) # <<<<<<<<<<<<<< * # major axis is the one with largest eigenvalue * major = m.getcol(tobj.max_ind()) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_symmeig); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_m); __Pyx_GIVEREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_m); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_tobj = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":206 * tobj = m.symmeig(m) * # major axis is the one with largest eigenvalue * major = m.getcol(tobj.max_ind()) # <<<<<<<<<<<<<< * # minor is normal and in xy plane * minor = m.getcol(3 - tobj.min_ind() - tobj.max_ind()) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getcol); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tobj, __pyx_n_s_max_ind); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_9) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_major = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":208 * major = m.getcol(tobj.max_ind()) * # minor is normal and in xy plane * minor = m.getcol(3 - tobj.min_ind() - tobj.max_ind()) # <<<<<<<<<<<<<< * #minor.x[2] = 0 * minor.div(minor.mag()) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getcol); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_tobj, __pyx_n_s_min_ind); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_5) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyInt_SubtractCObj(__pyx_int_3, __pyx_t_9, 3, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tobj, __pyx_n_s_max_ind); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_14) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_14); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Subtract(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_minor = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":210 * minor = m.getcol(3 - tobj.min_ind() - tobj.max_ind()) * #minor.x[2] = 0 * minor.div(minor.mag()) # <<<<<<<<<<<<<< * * x1 = x0; y1 = y0 */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_minor, __pyx_n_s_div); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_minor, __pyx_n_s_mag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_9) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":212 * minor.div(minor.mag()) * * x1 = x0; y1 = y0 # <<<<<<<<<<<<<< * x2 = x1 + major.x[0]; y2 = y1 + major.x[1] * */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_x1 = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_y1 = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":213 * * x1 = x0; y1 = y0 * x2 = x1 + major.x[0]; y2 = y1 + major.x[1] # <<<<<<<<<<<<<< * * xs_loop = x + [x[0]] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_major, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_x1, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_x2 = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_major, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_y1, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_y2 = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":215 * x2 = x1 + major.x[0]; y2 = y1 + major.x[1] * * xs_loop = x + [x[0]] # <<<<<<<<<<<<<< * ys_loop = y + [y[0]] * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_x, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_xs_loop = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":216 * * xs_loop = x + [x[0]] * ys_loop = y + [y[0]] # <<<<<<<<<<<<<< * * # locate the extrema of the major axis CTNG:somaextrema */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_y, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_v_y, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ys_loop = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":220 * # locate the extrema of the major axis CTNG:somaextrema * # this is defined by the furthest points on it that lie on the minor axis * pts = [] # <<<<<<<<<<<<<< * pts_sources = {} * for x3, y3 in zip(x, y): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_pts = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":221 * # this is defined by the furthest points on it that lie on the minor axis * pts = [] * pts_sources = {} # <<<<<<<<<<<<<< * for x3, y3 in zip(x, y): * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_pts_sources = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":222 * pts = [] * pts_sources = {} * for x3, y3 in zip(x, y): # <<<<<<<<<<<<<< * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_y); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { PyObject* sequence = __pyx_t_8; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_17(__pyx_t_5); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_17(__pyx_t_5); if (unlikely(!__pyx_t_10)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L15_unpacking_done; __pyx_L14_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_x3, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_y3, __pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":223 * pts_sources = {} * for x3, y3 in zip(x, y): * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] # <<<<<<<<<<<<<< * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) * if pt is not None: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_minor, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_v_x3, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_minor, __pyx_n_s_x); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_10, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Add(__pyx_v_y3, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_x4, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_y4, __pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":224 * for x3, y3 in zip(x, y): * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) # <<<<<<<<<<<<<< * if pt is not None: * pts.append(pt) */ __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_x1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_y1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_x2); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_y2); if (unlikely((__pyx_t_18 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_v_x3); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_v_y3); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_v_x4); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_y4); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_seg_line_intersection(__pyx_t_4, __pyx_t_3, __pyx_t_2, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_pt, ((PyObject*)__pyx_t_10)); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":225 * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) * if pt is not None: # <<<<<<<<<<<<<< * pts.append(pt) * if pt not in pts_sources: */ __pyx_t_12 = (__pyx_v_pt != ((PyObject*)Py_None)); __pyx_t_23 = (__pyx_t_12 != 0); if (__pyx_t_23) { /* "neuron/rxd/geometry3d/ctng.pyx":226 * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) * if pt is not None: * pts.append(pt) # <<<<<<<<<<<<<< * if pt not in pts_sources: * pts_sources[pt] = [] */ __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_pts, __pyx_v_pt); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":227 * if pt is not None: * pts.append(pt) * if pt not in pts_sources: # <<<<<<<<<<<<<< * pts_sources[pt] = [] * pts_sources[pt].append((x3, y3)) */ __pyx_t_23 = (__Pyx_PyDict_ContainsTF(__pyx_v_pt, __pyx_v_pts_sources, Py_NE)); if (unlikely(__pyx_t_23 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_23 != 0); if (__pyx_t_12) { /* "neuron/rxd/geometry3d/ctng.pyx":228 * pts.append(pt) * if pt not in pts_sources: * pts_sources[pt] = [] # <<<<<<<<<<<<<< * pts_sources[pt].append((x3, y3)) * */ __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (unlikely(PyDict_SetItem(__pyx_v_pts_sources, __pyx_v_pt, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":227 * if pt is not None: * pts.append(pt) * if pt not in pts_sources: # <<<<<<<<<<<<<< * pts_sources[pt] = [] * pts_sources[pt].append((x3, y3)) */ } /* "neuron/rxd/geometry3d/ctng.pyx":229 * if pt not in pts_sources: * pts_sources[pt] = [] * pts_sources[pt].append((x3, y3)) # <<<<<<<<<<<<<< * * major_p1, major_p2 = extreme_pts(pts) */ __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_pts_sources, __pyx_v_pt); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_x3); __Pyx_GIVEREF(__pyx_v_x3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_x3); __Pyx_INCREF(__pyx_v_y3); __Pyx_GIVEREF(__pyx_v_y3); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_y3); __pyx_t_24 = __Pyx_PyObject_Append(__pyx_t_10, __pyx_t_8); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":225 * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) * if pt is not None: # <<<<<<<<<<<<<< * pts.append(pt) * if pt not in pts_sources: */ } /* "neuron/rxd/geometry3d/ctng.pyx":222 * pts = [] * pts_sources = {} * for x3, y3 in zip(x, y): # <<<<<<<<<<<<<< * x4, y4 = x3 + minor.x[0], y3 + minor.x[1] * pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":231 * pts_sources[pt].append((x3, y3)) * * major_p1, major_p2 = extreme_pts(pts) # <<<<<<<<<<<<<< * * extreme1 = pts_sources[major_p1] */ __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_extreme_pts(__pyx_v_pts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_major_p1 = __pyx_t_8; __pyx_t_8 = 0; __pyx_v_major_p2 = __pyx_t_10; __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":233 * major_p1, major_p2 = extreme_pts(pts) * * extreme1 = pts_sources[major_p1] # <<<<<<<<<<<<<< * extreme2 = pts_sources[major_p2] * */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_pts_sources, __pyx_v_major_p1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_v_extreme1 = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":234 * * extreme1 = pts_sources[major_p1] * extreme2 = pts_sources[major_p2] # <<<<<<<<<<<<<< * * major_p1, major_p2 = numpy.array(major_p1), numpy.array(major_p2) */ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_pts_sources, __pyx_v_major_p2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_v_extreme2 = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":236 * extreme2 = pts_sources[major_p2] * * major_p1, major_p2 = numpy.array(major_p1), numpy.array(major_p2) # <<<<<<<<<<<<<< * del pts_sources * */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_10) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_major_p1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_major_p1); __Pyx_GIVEREF(__pyx_v_major_p1); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_major_p1); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_9) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_major_p2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_major_p2); __Pyx_GIVEREF(__pyx_v_major_p2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_major_p2); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_major_p1, __pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_major_p2, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":237 * * major_p1, major_p2 = numpy.array(major_p1), numpy.array(major_p2) * del pts_sources # <<<<<<<<<<<<<< * * if len(extreme1) != 1 or len(extreme2) != 1: */ __Pyx_DECREF(__pyx_v_pts_sources); __pyx_v_pts_sources = NULL; /* "neuron/rxd/geometry3d/ctng.pyx":239 * del pts_sources * * if len(extreme1) != 1 or len(extreme2) != 1: # <<<<<<<<<<<<<< * raise RxDException('multiple most extreme points') * extreme1 = extreme1[0] */ __pyx_t_6 = PyObject_Length(__pyx_v_extreme1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = ((__pyx_t_6 != 1) != 0); if (!__pyx_t_23) { } else { __pyx_t_12 = __pyx_t_23; goto __pyx_L19_bool_binop_done; } __pyx_t_6 = PyObject_Length(__pyx_v_extreme2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_23 = ((__pyx_t_6 != 1) != 0); __pyx_t_12 = __pyx_t_23; __pyx_L19_bool_binop_done:; if (__pyx_t_12) { /* "neuron/rxd/geometry3d/ctng.pyx":240 * * if len(extreme1) != 1 or len(extreme2) != 1: * raise RxDException('multiple most extreme points') # <<<<<<<<<<<<<< * extreme1 = extreme1[0] * extreme2 = extreme2[0] */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_RxDException); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":239 * del pts_sources * * if len(extreme1) != 1 or len(extreme2) != 1: # <<<<<<<<<<<<<< * raise RxDException('multiple most extreme points') * extreme1 = extreme1[0] */ } /* "neuron/rxd/geometry3d/ctng.pyx":241 * if len(extreme1) != 1 or len(extreme2) != 1: * raise RxDException('multiple most extreme points') * extreme1 = extreme1[0] # <<<<<<<<<<<<<< * extreme2 = extreme2[0] * major_length = linalg.norm(major_p1 - major_p2) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_extreme1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_extreme1, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":242 * raise RxDException('multiple most extreme points') * extreme1 = extreme1[0] * extreme2 = extreme2[0] # <<<<<<<<<<<<<< * major_length = linalg.norm(major_p1 - major_p2) * delta_x, delta_y = major_p2 - major_p1 */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_extreme2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_extreme2, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":243 * extreme1 = extreme1[0] * extreme2 = extreme2[0] * major_length = linalg.norm(major_p1 - major_p2) # <<<<<<<<<<<<<< * delta_x, delta_y = major_p2 - major_p1 * delta_x /= n_soma_step */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_norm); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_v_major_p1, __pyx_v_major_p2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_major_length = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":244 * extreme2 = extreme2[0] * major_length = linalg.norm(major_p1 - major_p2) * delta_x, delta_y = major_p2 - major_p1 # <<<<<<<<<<<<<< * delta_x /= n_soma_step * delta_y /= n_soma_step */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_major_p2, __pyx_v_major_p1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_10 = PyList_GET_ITEM(sequence, 0); __pyx_t_9 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); #else __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_10 = __pyx_t_17(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_9 = __pyx_t_17(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L22_unpacking_done; __pyx_L21_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L22_unpacking_done:; } __pyx_v_delta_x = __pyx_t_10; __pyx_t_10 = 0; __pyx_v_delta_y = __pyx_t_9; __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":245 * major_length = linalg.norm(major_p1 - major_p2) * delta_x, delta_y = major_p2 - major_p1 * delta_x /= n_soma_step # <<<<<<<<<<<<<< * delta_y /= n_soma_step * */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_n_soma_step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_delta_x, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_delta_x, __pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":246 * delta_x, delta_y = major_p2 - major_p1 * delta_x /= n_soma_step * delta_y /= n_soma_step # <<<<<<<<<<<<<< * * f_pts = [extreme1] */ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_n_soma_step); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_delta_y, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_delta_y, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":248 * delta_y /= n_soma_step * * f_pts = [extreme1] # <<<<<<<<<<<<<< * f_diams = [0] * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_extreme1); __Pyx_GIVEREF(__pyx_v_extreme1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_extreme1); __pyx_v_f_pts = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":249 * * f_pts = [extreme1] * f_diams = [0] # <<<<<<<<<<<<<< * * # CTNG:slicesoma */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); __pyx_v_f_diams = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":252 * * # CTNG:slicesoma * for i in xrange(1, n_soma_step): # <<<<<<<<<<<<<< * x0, y0 = major_p1[0] + i * delta_x, major_p1[1] + i * delta_y * # slice in dir of minor axis */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_n_soma_step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_9))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_7(__pyx_t_9); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":253 * # CTNG:slicesoma * for i in xrange(1, n_soma_step): * x0, y0 = major_p1[0] + i * delta_x, major_p1[1] + i * delta_y # <<<<<<<<<<<<<< * # slice in dir of minor axis * x1, y1 = x0 + minor.x[0], y0 + minor.x[1] */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_major_p1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyNumber_Multiply(__pyx_v_i, __pyx_v_delta_x); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyNumber_Add(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_major_p1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyNumber_Multiply(__pyx_v_i, __pyx_v_delta_y); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x0 = __pyx_t_22; __pyx_v_y0 = __pyx_t_21; /* "neuron/rxd/geometry3d/ctng.pyx":255 * x0, y0 = major_p1[0] + i * delta_x, major_p1[1] + i * delta_y * # slice in dir of minor axis * x1, y1 = x0 + minor.x[0], y0 + minor.x[1] # <<<<<<<<<<<<<< * pts = [] * for i in xrange(len(x)): */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_minor, __pyx_n_s_x); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_minor, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_x1, __pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_y1, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":256 * # slice in dir of minor axis * x1, y1 = x0 + minor.x[0], y0 + minor.x[1] * pts = [] # <<<<<<<<<<<<<< * for i in xrange(len(x)): * pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_pts, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":257 * x1, y1 = x0 + minor.x[0], y0 + minor.x[1] * pts = [] * for i in xrange(len(x)): # <<<<<<<<<<<<<< * pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) * if pt is not None: pts.append(pt) */ __pyx_t_11 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; __pyx_t_25 = NULL; } else { __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_25 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_25)) { if (likely(PyList_CheckExact(__pyx_t_10))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_25(__pyx_t_10); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":258 * pts = [] * for i in xrange(len(x)): * pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) # <<<<<<<<<<<<<< * if pt is not None: pts.append(pt) * p1, p2 = extreme_pts(pts) */ __pyx_t_1 = PyObject_GetItem(__pyx_v_xs_loop, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetItem(__pyx_v_ys_loop, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_GetItem(__pyx_v_xs_loop, __pyx_t_1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetItem(__pyx_v_ys_loop, __pyx_t_5); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_v_x1); if (unlikely((__pyx_t_18 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_y1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_seg_line_intersection(__pyx_t_21, __pyx_t_22, __pyx_t_20, __pyx_t_19, __pyx_v_x0, __pyx_v_y0, __pyx_t_18, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_pt, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":259 * for i in xrange(len(x)): * pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) * if pt is not None: pts.append(pt) # <<<<<<<<<<<<<< * p1, p2 = extreme_pts(pts) * p1, p2 = numpy.array(p1), numpy.array(p2) */ __pyx_t_12 = (__pyx_v_pt != ((PyObject*)Py_None)); __pyx_t_23 = (__pyx_t_12 != 0); if (__pyx_t_23) { __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_pts, __pyx_v_pt); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "neuron/rxd/geometry3d/ctng.pyx":257 * x1, y1 = x0 + minor.x[0], y0 + minor.x[1] * pts = [] * for i in xrange(len(x)): # <<<<<<<<<<<<<< * pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) * if pt is not None: pts.append(pt) */ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":260 * pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) * if pt is not None: pts.append(pt) * p1, p2 = extreme_pts(pts) # <<<<<<<<<<<<<< * p1, p2 = numpy.array(p1), numpy.array(p2) * cx, cy = (p1 + p2) / 2. */ __pyx_t_10 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_extreme_pts(__pyx_v_pts); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (likely(__pyx_t_10 != Py_None)) { PyObject* sequence = __pyx_t_10; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_XDECREF_SET(__pyx_v_p1, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_p2, __pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":261 * if pt is not None: pts.append(pt) * p1, p2 = extreme_pts(pts) * p1, p2 = numpy.array(p1), numpy.array(p2) # <<<<<<<<<<<<<< * cx, cy = (p1 + p2) / 2. * f_pts.append((cx, cy, somaz)) */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_5) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_p1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_p1); __Pyx_GIVEREF(__pyx_v_p1); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_p1); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_p2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_p2); __Pyx_GIVEREF(__pyx_v_p2); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_p2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_p1, __pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_p2, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":262 * p1, p2 = extreme_pts(pts) * p1, p2 = numpy.array(p1), numpy.array(p2) * cx, cy = (p1 + p2) / 2. # <<<<<<<<<<<<<< * f_pts.append((cx, cy, somaz)) * f_diams.append(linalg.norm(p1 - p2)) */ __pyx_t_1 = PyNumber_Add(__pyx_v_p1, __pyx_v_p2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_, 2., 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) { PyObject* sequence = __pyx_t_10; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { Py_ssize_t index = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L28_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_5 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L28_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_14), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L29_unpacking_done; __pyx_L28_unpacking_failed:; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L29_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_cx, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_cy, __pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":263 * p1, p2 = numpy.array(p1), numpy.array(p2) * cx, cy = (p1 + p2) / 2. * f_pts.append((cx, cy, somaz)) # <<<<<<<<<<<<<< * f_diams.append(linalg.norm(p1 - p2)) * */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_somaz); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cx); __Pyx_GIVEREF(__pyx_v_cx); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cx); __Pyx_INCREF(__pyx_v_cy); __Pyx_GIVEREF(__pyx_v_cy); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_cy); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_f_pts, __pyx_t_5); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":264 * cx, cy = (p1 + p2) / 2. * f_pts.append((cx, cy, somaz)) * f_diams.append(linalg.norm(p1 - p2)) # <<<<<<<<<<<<<< * * f_pts.append(extreme2) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_norm); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Subtract(__pyx_v_p1, __pyx_v_p2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_14) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_f_diams, __pyx_t_5); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":252 * * # CTNG:slicesoma * for i in xrange(1, n_soma_step): # <<<<<<<<<<<<<< * x0, y0 = major_p1[0] + i * delta_x, major_p1[1] + i * delta_y * # slice in dir of minor axis */ } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":266 * f_diams.append(linalg.norm(p1 - p2)) * * f_pts.append(extreme2) # <<<<<<<<<<<<<< * f_diams.append(0) * */ __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_f_pts, __pyx_v_extreme2); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":267 * * f_pts.append(extreme2) * f_diams.append(0) # <<<<<<<<<<<<<< * * for i in xrange(len(f_pts) - 1): */ __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_f_diams, __pyx_int_0); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":269 * f_diams.append(0) * * for i in xrange(len(f_pts) - 1): # <<<<<<<<<<<<<< * pt1x, pt1y, pt1z = f_pts[i] * pt2x, pt2y, pt2z = f_pts[i + 1] */ __pyx_t_6 = PyList_GET_SIZE(__pyx_v_f_pts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PyInt_FromSsize_t((__pyx_t_6 - 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif } } else { __pyx_t_9 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_9); } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":270 * * for i in xrange(len(f_pts) - 1): * pt1x, pt1y, pt1z = f_pts[i] # <<<<<<<<<<<<<< * pt2x, pt2y, pt2z = f_pts[i + 1] * diam1 = f_diams[i] */ __pyx_t_9 = PyObject_GetItem(__pyx_v_f_pts, __pyx_v_i); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_9); if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); __pyx_t_10 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L32_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_8 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_8)) goto __pyx_L32_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 2; __pyx_t_10 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_10)) goto __pyx_L32_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_14), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L33_unpacking_done; __pyx_L32_unpacking_failed:; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L33_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_pt1x, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_pt1y, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_pt1z, __pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":271 * for i in xrange(len(f_pts) - 1): * pt1x, pt1y, pt1z = f_pts[i] * pt2x, pt2y, pt2z = f_pts[i + 1] # <<<<<<<<<<<<<< * diam1 = f_diams[i] * diam2 = f_diams[i + 1] */ __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyObject_GetItem(__pyx_v_f_pts, __pyx_t_9); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) { PyObject* sequence = __pyx_t_10; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); __pyx_t_1 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { Py_ssize_t index = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_9)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_8 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_8)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 2; __pyx_t_1 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_14), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L35_unpacking_done; __pyx_L34_unpacking_failed:; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L35_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_pt2x, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_pt2y, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_pt2z, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":272 * pt1x, pt1y, pt1z = f_pts[i] * pt2x, pt2y, pt2z = f_pts[i + 1] * diam1 = f_diams[i] # <<<<<<<<<<<<<< * diam2 = f_diams[i + 1] * objects.append(SkewCone(pt1x, pt1y, pt1z, diam1 * 0.5, pt1x + delta_x, pt1y + delta_y, pt1z, diam2 * 0.5, pt2x, pt2y, pt2z)) */ __pyx_t_10 = PyObject_GetItem(__pyx_v_f_diams, __pyx_v_i); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_diam1 = __pyx_t_2; /* "neuron/rxd/geometry3d/ctng.pyx":273 * pt2x, pt2y, pt2z = f_pts[i + 1] * diam1 = f_diams[i] * diam2 = f_diams[i + 1] # <<<<<<<<<<<<<< * objects.append(SkewCone(pt1x, pt1y, pt1z, diam1 * 0.5, pt1x + delta_x, pt1y + delta_y, pt1z, diam2 * 0.5, pt2x, pt2y, pt2z)) * */ __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_GetItem(__pyx_v_f_diams, __pyx_t_10); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_diam2 = __pyx_t_2; /* "neuron/rxd/geometry3d/ctng.pyx":274 * diam1 = f_diams[i] * diam2 = f_diams[i + 1] * objects.append(SkewCone(pt1x, pt1y, pt1z, diam1 * 0.5, pt1x + delta_x, pt1y + delta_y, pt1z, diam2 * 0.5, pt2x, pt2y, pt2z)) # <<<<<<<<<<<<<< * * return objects, f_pts */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_SkewCone); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyFloat_FromDouble((__pyx_v_diam1 * 0.5)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyNumber_Add(__pyx_v_pt1x, __pyx_v_delta_x); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = PyNumber_Add(__pyx_v_pt1y, __pyx_v_delta_y); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = PyFloat_FromDouble((__pyx_v_diam2 * 0.5)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_13 = NULL; __pyx_t_11 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_11 = 1; } } __pyx_t_26 = PyTuple_New(11+__pyx_t_11); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_v_pt1x); __Pyx_GIVEREF(__pyx_v_pt1x); PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_11, __pyx_v_pt1x); __Pyx_INCREF(__pyx_v_pt1y); __Pyx_GIVEREF(__pyx_v_pt1y); PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_11, __pyx_v_pt1y); __Pyx_INCREF(__pyx_v_pt1z); __Pyx_GIVEREF(__pyx_v_pt1z); PyTuple_SET_ITEM(__pyx_t_26, 2+__pyx_t_11, __pyx_v_pt1z); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_26, 3+__pyx_t_11, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_26, 4+__pyx_t_11, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_26, 5+__pyx_t_11, __pyx_t_14); __Pyx_INCREF(__pyx_v_pt1z); __Pyx_GIVEREF(__pyx_v_pt1z); PyTuple_SET_ITEM(__pyx_t_26, 6+__pyx_t_11, __pyx_v_pt1z); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_26, 7+__pyx_t_11, __pyx_t_16); __Pyx_INCREF(__pyx_v_pt2x); __Pyx_GIVEREF(__pyx_v_pt2x); PyTuple_SET_ITEM(__pyx_t_26, 8+__pyx_t_11, __pyx_v_pt2x); __Pyx_INCREF(__pyx_v_pt2y); __Pyx_GIVEREF(__pyx_v_pt2y); PyTuple_SET_ITEM(__pyx_t_26, 9+__pyx_t_11, __pyx_v_pt2y); __Pyx_INCREF(__pyx_v_pt2z); __Pyx_GIVEREF(__pyx_v_pt2z); PyTuple_SET_ITEM(__pyx_t_26, 10+__pyx_t_11, __pyx_v_pt2z); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_14 = 0; __pyx_t_16 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_26, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_1); if (unlikely(__pyx_t_24 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":269 * f_diams.append(0) * * for i in xrange(len(f_pts) - 1): # <<<<<<<<<<<<<< * pt1x, pt1y, pt1z = f_pts[i] * pt2x, pt2y, pt2z = f_pts[i + 1] */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":276 * objects.append(SkewCone(pt1x, pt1y, pt1z, diam1 * 0.5, pt1x + delta_x, pt1y + delta_y, pt1z, diam2 * 0.5, pt2x, pt2y, pt2z)) * * return objects, f_pts # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_objects); __Pyx_GIVEREF(__pyx_v_objects); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_objects); __Pyx_INCREF(__pyx_v_f_pts); __Pyx_GIVEREF(__pyx_v_f_pts); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_f_pts); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":183 * @cython.wraparound(False) * @cython.boundscheck(False) * def soma_objects(x, y, z, double x0, double y0, double z0, int n_soma_step): # <<<<<<<<<<<<<< * cdef double diam1, diam2, somax, somay, somaz * cdef list objects = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_26); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.soma_objects", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_objects); __Pyx_XDECREF(__pyx_v_f_pts); __Pyx_XDECREF(__pyx_v_xshifted); __Pyx_XDECREF(__pyx_v_yshifted); __Pyx_XDECREF(__pyx_v_zshifted); __Pyx_XDECREF(__pyx_v_m); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_p); __Pyx_XDECREF(__pyx_v_j); __Pyx_XDECREF(__pyx_v_q); __Pyx_XDECREF(__pyx_v_v); __Pyx_XDECREF(__pyx_v_tobj); __Pyx_XDECREF(__pyx_v_major); __Pyx_XDECREF(__pyx_v_minor); __Pyx_XDECREF(__pyx_v_x1); __Pyx_XDECREF(__pyx_v_y1); __Pyx_XDECREF(__pyx_v_x2); __Pyx_XDECREF(__pyx_v_y2); __Pyx_XDECREF(__pyx_v_xs_loop); __Pyx_XDECREF(__pyx_v_ys_loop); __Pyx_XDECREF(__pyx_v_pts); __Pyx_XDECREF(__pyx_v_pts_sources); __Pyx_XDECREF(__pyx_v_x3); __Pyx_XDECREF(__pyx_v_y3); __Pyx_XDECREF(__pyx_v_x4); __Pyx_XDECREF(__pyx_v_y4); __Pyx_XDECREF(__pyx_v_pt); __Pyx_XDECREF(__pyx_v_major_p1); __Pyx_XDECREF(__pyx_v_major_p2); __Pyx_XDECREF(__pyx_v_extreme1); __Pyx_XDECREF(__pyx_v_extreme2); __Pyx_XDECREF(__pyx_v_major_length); __Pyx_XDECREF(__pyx_v_delta_x); __Pyx_XDECREF(__pyx_v_delta_y); __Pyx_XDECREF(__pyx_v_f_diams); __Pyx_XDECREF(__pyx_v_p1); __Pyx_XDECREF(__pyx_v_p2); __Pyx_XDECREF(__pyx_v_cx); __Pyx_XDECREF(__pyx_v_cy); __Pyx_XDECREF(__pyx_v_pt1x); __Pyx_XDECREF(__pyx_v_pt1y); __Pyx_XDECREF(__pyx_v_pt1z); __Pyx_XDECREF(__pyx_v_pt2x); __Pyx_XDECREF(__pyx_v_pt2y); __Pyx_XDECREF(__pyx_v_pt2z); __Pyx_XDECREF(__pyx_v_xx); __Pyx_XDECREF(__pyx_v_yy); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":280 * @cython.wraparound(False) * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): # <<<<<<<<<<<<<< * cdef list objects = [] * cdef int i, j, k */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry = {"constructive_neuronal_geometry", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; int __pyx_v_n_soma_step; double __pyx_v_dx; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("constructive_neuronal_geometry (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_n_soma_step,&__pyx_n_s_dx,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_soma_step)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("constructive_neuronal_geometry", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("constructive_neuronal_geometry", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "constructive_neuronal_geometry") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_source = values[0]; __pyx_v_n_soma_step = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_n_soma_step == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_dx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_dx == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("constructive_neuronal_geometry", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.constructive_neuronal_geometry", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_4ctng_2constructive_neuronal_geometry(__pyx_self, __pyx_v_source, __pyx_v_n_soma_step, __pyx_v_dx); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_2generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "neuron/rxd/geometry3d/ctng.pyx":299 * cell = source * # probably an Import3D type * num_contours = sum(sec.iscontour_ for sec in cell.sections) # <<<<<<<<<<<<<< * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_genexpr(PyObject *__pyx_self) { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr(__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_constructive_neuronal_geometry_l); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.constructive_neuronal_geometry.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_2generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_cell)) { __Pyx_RaiseClosureNameError("cell"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_cell, __pyx_n_s_sections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sec); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sec, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sec, __pyx_n_s_iscontour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_5generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "neuron/rxd/geometry3d/ctng.pyx":424 * * * cdef dict cone_clip_db = dict((cone, []) for cone in all_cones) # <<<<<<<<<<<<<< * cdef bint sharp_turn * # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_3genexpr(PyObject *__pyx_self) { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *)__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr(__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_5generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_constructive_neuronal_geometry_l); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.constructive_neuronal_geometry.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_5generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_all_cones)) { __Pyx_RaiseClosureNameError("all_cones"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_all_cones == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_all_cones; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_cone); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_cone, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_cone, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/ctng.pyx":280 * @cython.wraparound(False) * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): # <<<<<<<<<<<<<< * cdef list objects = [] * cdef int i, j, k */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_2constructive_neuronal_geometry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source, int __pyx_v_n_soma_step, double __pyx_v_dx) { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *__pyx_cur_scope; PyObject *__pyx_v_objects = 0; int __pyx_v_i; double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; double __pyx_v_x2; double __pyx_v_y2; double __pyx_v_z2; double __pyx_v_x3; double __pyx_v_y3; double __pyx_v_r0; double __pyx_v_r1; double __pyx_v_r2; PyObject *__pyx_v_f_pts = 0; PyObject *__pyx_v_branches = 0; PyObject *__pyx_v_parent_sec_name = 0; PyObject *__pyx_v_pt = 0; int __pyx_v_source_is_import3d; PyObject *__pyx_v_num_contours = NULL; PyObject *__pyx_v_sec = NULL; PyObject *__pyx_v_soma_sec = NULL; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; PyObject *__pyx_v_z = NULL; PyObject *__pyx_v_center_vec = NULL; double __pyx_v_somaz; PyObject *__pyx_v_new_objects = NULL; PyObject *__pyx_v_is_stack = NULL; PyObject *__pyx_v_warnings = NULL; PyObject *__pyx_v_diam_corrections = 0; CYTHON_UNUSED PyObject *__pyx_v_clip_copying = 0; PyObject *__pyx_v_pts_cones_db = NULL; PyObject *__pyx_v_diam_db = NULL; PyObject *__pyx_v_branch = NULL; PyObject *__pyx_v_psec = NULL; PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_cp = NULL; PyObject *__pyx_v_sphere_cap = NULL; PyObject *__pyx_v_d0 = NULL; PyObject *__pyx_v_d1 = NULL; PyObject *__pyx_v_axisx = NULL; PyObject *__pyx_v_axisy = NULL; PyObject *__pyx_v_axisz = NULL; PyObject *__pyx_v_deltad = NULL; PyObject *__pyx_v_axislength = NULL; PyObject *__pyx_v_vals = NULL; PyObject *__pyx_v_cone_clip_db = 0; int __pyx_v_sharp_turn; PyObject *__pyx_v_join_items_needing_clipped = NULL; PyObject *__pyx_v_cone = NULL; PyObject *__pyx_v_pt1 = NULL; PyObject *__pyx_v_pt2 = NULL; PyObject *__pyx_v_axis = NULL; PyObject *__pyx_v_left_neighbors = NULL; PyObject *__pyx_v_right_neighbors = NULL; PyObject *__pyx_v_neighbor_left = NULL; PyObject *__pyx_v_neighbor_right = NULL; PyObject *__pyx_v_clips = NULL; PyObject *__pyx_v_join_item = NULL; PyObject *__pyx_v_pt0 = NULL; PyObject *__pyx_v_naxis = NULL; PyObject *__pyx_v_sp = NULL; PyObject *__pyx_v_plane_normal = NULL; PyObject *__pyx_v_radial_vec = NULL; PyObject *__pyx_v_nradial_vec = NULL; PyObject *__pyx_v_my_corner_count = NULL; PyObject *__pyx_v_corner_count = NULL; PyObject *__pyx_v_neighbor_copy = NULL; PyObject *__pyx_v_z3 = NULL; PyObject *__pyx_v_r3 = NULL; PyObject *__pyx_v_pt3 = NULL; PyObject *__pyx_v_radial_vec_norm = NULL; PyObject *__pyx_v_int_clip = NULL; PyObject *__pyx_v_clip = NULL; PyObject *__pyx_v_left = NULL; PyObject *__pyx_v_right = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; double __pyx_t_15; double __pyx_t_16; double __pyx_t_17; PyObject *__pyx_t_18 = NULL; PyObject *(*__pyx_t_19)(PyObject *); int __pyx_t_20; int __pyx_t_21; PyObject *__pyx_t_22 = NULL; long __pyx_t_23; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; Py_ssize_t __pyx_t_27; int __pyx_t_28; double __pyx_t_29; PyObject *__pyx_t_30 = NULL; PyObject *__pyx_t_31 = NULL; PyObject *__pyx_t_32 = NULL; PyObject *__pyx_t_33 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("constructive_neuronal_geometry", 0); __pyx_cur_scope = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry(__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); /* "neuron/rxd/geometry3d/ctng.pyx":281 * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): * cdef list objects = [] # <<<<<<<<<<<<<< * cdef int i, j, k * cdef double x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, x4, y4, r0, r1, r2 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_objects = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":290 * #cdef numpy.ndarray[numpy.float_t, ndim=1] x, y, z, xs_loop, ys_loop * * source_is_import3d = False # <<<<<<<<<<<<<< * branches = [] * f_pts = [] */ __pyx_v_source_is_import3d = 0; /* "neuron/rxd/geometry3d/ctng.pyx":291 * * source_is_import3d = False * branches = [] # <<<<<<<<<<<<<< * f_pts = [] * parent_sec_name = [] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_branches = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":292 * source_is_import3d = False * branches = [] * f_pts = [] # <<<<<<<<<<<<<< * parent_sec_name = [] * # TODO: come up with a better way of checking type */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_f_pts = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":293 * branches = [] * f_pts = [] * parent_sec_name = [] # <<<<<<<<<<<<<< * # TODO: come up with a better way of checking type * if hasattr(source, 'sections'): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_parent_sec_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":295 * parent_sec_name = [] * # TODO: come up with a better way of checking type * if hasattr(source, 'sections'): # <<<<<<<<<<<<<< * source_is_import3d = True * cell = source */ __pyx_t_2 = PyObject_HasAttr(__pyx_v_source, __pyx_n_s_sections); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":296 * # TODO: come up with a better way of checking type * if hasattr(source, 'sections'): * source_is_import3d = True # <<<<<<<<<<<<<< * cell = source * # probably an Import3D type */ __pyx_v_source_is_import3d = 1; /* "neuron/rxd/geometry3d/ctng.pyx":297 * if hasattr(source, 'sections'): * source_is_import3d = True * cell = source # <<<<<<<<<<<<<< * # probably an Import3D type * num_contours = sum(sec.iscontour_ for sec in cell.sections) */ __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); __pyx_cur_scope->__pyx_v_cell = __pyx_v_source; /* "neuron/rxd/geometry3d/ctng.pyx":299 * cell = source * # probably an Import3D type * num_contours = sum(sec.iscontour_ for sec in cell.sections) # <<<<<<<<<<<<<< * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') */ __pyx_t_1 = __pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_num_contours = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":300 * # probably an Import3D type * num_contours = sum(sec.iscontour_ for sec in cell.sections) * if num_contours > 1: # <<<<<<<<<<<<<< * raise RxDException('more than one contour is not currently supported') * if num_contours == 1: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_num_contours, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":301 * num_contours = sum(sec.iscontour_ for sec in cell.sections) * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') # <<<<<<<<<<<<<< * if num_contours == 1: * # CTNG:soma */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RxDException); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":300 * # probably an Import3D type * num_contours = sum(sec.iscontour_ for sec in cell.sections) * if num_contours > 1: # <<<<<<<<<<<<<< * raise RxDException('more than one contour is not currently supported') * if num_contours == 1: */ } /* "neuron/rxd/geometry3d/ctng.pyx":302 * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') * if num_contours == 1: # <<<<<<<<<<<<<< * # CTNG:soma * for sec in cell.sections: */ __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_num_contours, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":304 * if num_contours == 1: * # CTNG:soma * for sec in cell.sections: # <<<<<<<<<<<<<< * if sec.iscontour_: * soma_sec = sec.hname() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_cell, __pyx_n_s_sections); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_sec, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":305 * # CTNG:soma * for sec in cell.sections: * if sec.iscontour_: # <<<<<<<<<<<<<< * soma_sec = sec.hname() * x, y, z = [sec.raw.getrow(i).to_python() for i in xrange(3)] */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_iscontour); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":306 * for sec in cell.sections: * if sec.iscontour_: * soma_sec = sec.hname() # <<<<<<<<<<<<<< * x, y, z = [sec.raw.getrow(i).to_python() for i in xrange(3)] * */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_hname); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_soma_sec, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":307 * if sec.iscontour_: * soma_sec = sec.hname() * x, y, z = [sec.raw.getrow(i).to_python() for i in xrange(3)] # <<<<<<<<<<<<<< * * # compute the center of the contour based on uniformly spaced points around the perimeter */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); for (__pyx_t_9 = 0; __pyx_t_9 < 3; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_raw); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getrow); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_12) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_to_python); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (__pyx_t_8) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } if (1) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); __pyx_t_8 = PyList_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":310 * * # compute the center of the contour based on uniformly spaced points around the perimeter * center_vec = sec.contourcenter(sec.raw.getrow(0), sec.raw.getrow(1), sec.raw.getrow(2)) # <<<<<<<<<<<<<< * x0, y0, z0 = [center_vec.x[i] for i in xrange(3)] * somaz = z0 */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_contourcenter); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_raw); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getrow); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_raw); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getrow); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_raw); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_getrow); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_12 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_14, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_center_vec, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":311 * # compute the center of the contour based on uniformly spaced points around the perimeter * center_vec = sec.contourcenter(sec.raw.getrow(0), sec.raw.getrow(1), sec.raw.getrow(2)) * x0, y0, z0 = [center_vec.x[i] for i in xrange(3)] # <<<<<<<<<<<<<< * somaz = z0 * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); for (__pyx_t_9 = 0; __pyx_t_9 < 3; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_center_vec, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } if (1) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); __pyx_t_13 = PyList_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_13); #else __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_13 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_13); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_x0 = __pyx_t_15; __pyx_v_y0 = __pyx_t_16; __pyx_v_z0 = __pyx_t_17; /* "neuron/rxd/geometry3d/ctng.pyx":312 * center_vec = sec.contourcenter(sec.raw.getrow(0), sec.raw.getrow(1), sec.raw.getrow(2)) * x0, y0, z0 = [center_vec.x[i] for i in xrange(3)] * somaz = z0 # <<<<<<<<<<<<<< * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) * objects += new_objects */ __pyx_v_somaz = __pyx_v_z0; /* "neuron/rxd/geometry3d/ctng.pyx":313 * x0, y0, z0 = [center_vec.x[i] for i in xrange(3)] * somaz = z0 * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) # <<<<<<<<<<<<<< * objects += new_objects * # TODO: support multiple somas by appending to f_pts */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_soma_objects); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_n_soma_step); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(7+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_v_x); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_v_y); __Pyx_INCREF(__pyx_v_z); __Pyx_GIVEREF(__pyx_v_z); PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_14, __pyx_v_z); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_14, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_18, 4+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 5+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 6+__pyx_t_14, __pyx_t_11); __pyx_t_8 = 0; __pyx_t_12 = 0; __pyx_t_7 = 0; __pyx_t_11 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_13 = PyList_GET_ITEM(sequence, 0); __pyx_t_18 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_18); #else __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_13 = __pyx_t_19(__pyx_t_11); if (unlikely(!__pyx_t_13)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); index = 1; __pyx_t_18 = __pyx_t_19(__pyx_t_11); if (unlikely(!__pyx_t_18)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_18); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L14_unpacking_done:; } if (!(likely(PyList_CheckExact(__pyx_t_18))||((__pyx_t_18) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_18)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_new_objects, __pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF_SET(__pyx_v_f_pts, ((PyObject*)__pyx_t_18)); __pyx_t_18 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":314 * somaz = z0 * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) * objects += new_objects # <<<<<<<<<<<<<< * # TODO: support multiple somas by appending to f_pts * else: */ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_objects, __pyx_v_new_objects); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_objects, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":305 * # CTNG:soma * for sec in cell.sections: * if sec.iscontour_: # <<<<<<<<<<<<<< * soma_sec = sec.hname() * x, y, z = [sec.raw.getrow(i).to_python() for i in xrange(3)] */ goto __pyx_L8; } /* "neuron/rxd/geometry3d/ctng.pyx":317 * # TODO: support multiple somas by appending to f_pts * else: * parent_sec_name.append(sec.parentsec.hname()) # <<<<<<<<<<<<<< * branches.append(sec) * else: */ /*else*/ { __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_parentsec); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_hname); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_18) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_18); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_parent_sec_name, __pyx_t_4); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":318 * else: * parent_sec_name.append(sec.parentsec.hname()) * branches.append(sec) # <<<<<<<<<<<<<< * else: * h.define_shape() */ __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_branches, __pyx_v_sec); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L8:; /* "neuron/rxd/geometry3d/ctng.pyx":304 * if num_contours == 1: * # CTNG:soma * for sec in cell.sections: # <<<<<<<<<<<<<< * if sec.iscontour_: * soma_sec = sec.hname() */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":302 * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') * if num_contours == 1: # <<<<<<<<<<<<<< * # CTNG:soma * for sec in cell.sections: */ } /* "neuron/rxd/geometry3d/ctng.pyx":295 * parent_sec_name = [] * # TODO: come up with a better way of checking type * if hasattr(source, 'sections'): # <<<<<<<<<<<<<< * source_is_import3d = True * cell = source */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/ctng.pyx":320 * branches.append(sec) * else: * h.define_shape() # <<<<<<<<<<<<<< * soma_sec = None * for sec in source: */ /*else*/ { __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_define_shape); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":321 * else: * h.define_shape() * soma_sec = None # <<<<<<<<<<<<<< * for sec in source: * # TODO: make this more general (support for 3D contour outline) */ __Pyx_INCREF(Py_None); __pyx_v_soma_sec = Py_None; /* "neuron/rxd/geometry3d/ctng.pyx":322 * h.define_shape() * soma_sec = None * for sec in source: # <<<<<<<<<<<<<< * # TODO: make this more general (support for 3D contour outline) * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: */ if (likely(PyList_CheckExact(__pyx_v_source)) || PyTuple_CheckExact(__pyx_v_source)) { __pyx_t_1 = __pyx_v_source; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_13); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_13); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF_SET(__pyx_v_sec, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":324 * for sec in source: * # TODO: make this more general (support for 3D contour outline) * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: # <<<<<<<<<<<<<< * is_stack, x, y, z, x0, y0, z0 = neuron._sec_db['soma'] * if not is_stack: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sec, __pyx_n_s_hname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_18 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_18) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_18); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else { __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_13, __pyx_kp_s_soma_0, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L18_bool_binop_done; } __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_neuron); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_sec_db); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_soma, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_21; __pyx_L18_bool_binop_done:; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":325 * # TODO: make this more general (support for 3D contour outline) * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: * is_stack, x, y, z, x0, y0, z0 = neuron._sec_db['soma'] # <<<<<<<<<<<<<< * if not is_stack: * # yes, this should be sec while the other should be sec.hname() */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_neuron); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sec_db); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetItem(__pyx_t_13, __pyx_n_s_soma); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 7)) { if (size > 7) __Pyx_RaiseTooManyValuesError(7); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 6); } else { __pyx_t_13 = PyList_GET_ITEM(sequence, 0); __pyx_t_18 = PyList_GET_ITEM(sequence, 1); __pyx_t_11 = PyList_GET_ITEM(sequence, 2); __pyx_t_7 = PyList_GET_ITEM(sequence, 3); __pyx_t_12 = PyList_GET_ITEM(sequence, 4); __pyx_t_8 = PyList_GET_ITEM(sequence, 5); __pyx_t_10 = PyList_GET_ITEM(sequence, 6); } __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); #else { Py_ssize_t i; PyObject** temps[7] = {&__pyx_t_13,&__pyx_t_18,&__pyx_t_11,&__pyx_t_7,&__pyx_t_12,&__pyx_t_8,&__pyx_t_10}; for (i=0; i < 7; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; PyObject** temps[7] = {&__pyx_t_13,&__pyx_t_18,&__pyx_t_11,&__pyx_t_7,&__pyx_t_12,&__pyx_t_8,&__pyx_t_10}; __pyx_t_22 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_22)->tp_iternext; for (index=0; index < 7; index++) { PyObject* item = __pyx_t_19(__pyx_t_22); if (unlikely(!item)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_22), 7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; goto __pyx_L21_unpacking_done; __pyx_L20_unpacking_failed:; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L21_unpacking_done:; } __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_is_stack, __pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_7); __pyx_t_7 = 0; __pyx_v_x0 = __pyx_t_17; __pyx_v_y0 = __pyx_t_16; __pyx_v_z0 = __pyx_t_15; /* "neuron/rxd/geometry3d/ctng.pyx":326 * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: * is_stack, x, y, z, x0, y0, z0 = neuron._sec_db['soma'] * if not is_stack: # <<<<<<<<<<<<<< * # yes, this should be sec while the other should be sec.hname() * # the difference is because of how we're keeping track of the parent */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_is_stack); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = ((!__pyx_t_3) != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":329 * # yes, this should be sec while the other should be sec.hname() * # the difference is because of how we're keeping track of the parent * soma_sec = sec # <<<<<<<<<<<<<< * x = x.to_python(); y = y.to_python(); z = z.to_python() * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) */ __Pyx_INCREF(__pyx_v_sec); __Pyx_DECREF_SET(__pyx_v_soma_sec, __pyx_v_sec); /* "neuron/rxd/geometry3d/ctng.pyx":330 * # the difference is because of how we're keeping track of the parent * soma_sec = sec * x = x.to_python(); y = y.to_python(); z = z.to_python() # <<<<<<<<<<<<<< * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) * objects += new_objects */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_to_python); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_to_python); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_y, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_z, __pyx_n_s_to_python); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_z, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":331 * soma_sec = sec * x = x.to_python(); y = y.to_python(); z = z.to_python() * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) # <<<<<<<<<<<<<< * objects += new_objects * somaz = z0 */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_soma_objects); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_n_soma_step); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_14 = 1; } } __pyx_t_13 = PyTuple_New(7+__pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_14, __pyx_v_x); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_14, __pyx_v_y); __Pyx_INCREF(__pyx_v_z); __Pyx_GIVEREF(__pyx_v_z); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_14, __pyx_v_z); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_14, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 4+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 5+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 6+__pyx_t_14, __pyx_t_11); __pyx_t_8 = 0; __pyx_t_12 = 0; __pyx_t_7 = 0; __pyx_t_11 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_10 = PyList_GET_ITEM(sequence, 0); __pyx_t_13 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_13); #else __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_10 = __pyx_t_19(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L23_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_13 = __pyx_t_19(__pyx_t_11); if (unlikely(!__pyx_t_13)) goto __pyx_L23_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L24_unpacking_done; __pyx_L23_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L24_unpacking_done:; } if (!(likely(PyList_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_13)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_new_objects, __pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_f_pts, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":332 * x = x.to_python(); y = y.to_python(); z = z.to_python() * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) * objects += new_objects # <<<<<<<<<<<<<< * somaz = z0 * else: */ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_objects, __pyx_v_new_objects); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_objects, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":333 * new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) * objects += new_objects * somaz = z0 # <<<<<<<<<<<<<< * else: * import warnings */ __pyx_v_somaz = __pyx_v_z0; /* "neuron/rxd/geometry3d/ctng.pyx":326 * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: * is_stack, x, y, z, x0, y0, z0 = neuron._sec_db['soma'] * if not is_stack: # <<<<<<<<<<<<<< * # yes, this should be sec while the other should be sec.hname() * # the difference is because of how we're keeping track of the parent */ goto __pyx_L22; } /* "neuron/rxd/geometry3d/ctng.pyx":335 * somaz = z0 * else: * import warnings # <<<<<<<<<<<<<< * warnings.warn('soma stack ignored; using centroid instead') * branches.append(sec) */ /*else*/ { __pyx_t_4 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_warnings, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":336 * else: * import warnings * warnings.warn('soma stack ignored; using centroid instead') # <<<<<<<<<<<<<< * branches.append(sec) * parent_sec_name.append(None) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":337 * import warnings * warnings.warn('soma stack ignored; using centroid instead') * branches.append(sec) # <<<<<<<<<<<<<< * parent_sec_name.append(None) * else: */ __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_branches, __pyx_v_sec); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":338 * warnings.warn('soma stack ignored; using centroid instead') * branches.append(sec) * parent_sec_name.append(None) # <<<<<<<<<<<<<< * else: * branches.append(sec) */ __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_parent_sec_name, Py_None); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L22:; /* "neuron/rxd/geometry3d/ctng.pyx":324 * for sec in source: * # TODO: make this more general (support for 3D contour outline) * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: # <<<<<<<<<<<<<< * is_stack, x, y, z, x0, y0, z0 = neuron._sec_db['soma'] * if not is_stack: */ goto __pyx_L17; } /* "neuron/rxd/geometry3d/ctng.pyx":340 * parent_sec_name.append(None) * else: * branches.append(sec) # <<<<<<<<<<<<<< * parent_sec_name.append(neuron.rxd.morphology.parent(sec)) * */ /*else*/ { __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_branches, __pyx_v_sec); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":341 * else: * branches.append(sec) * parent_sec_name.append(neuron.rxd.morphology.parent(sec)) # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_neuron); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rxd); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_morphology); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_parent); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_4) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_sec); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_sec); __Pyx_GIVEREF(__pyx_v_sec); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_sec); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_parent_sec_name, __pyx_t_13); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __pyx_L17:; /* "neuron/rxd/geometry3d/ctng.pyx":322 * h.define_shape() * soma_sec = None * for sec in source: # <<<<<<<<<<<<<< * # TODO: make this more general (support for 3D contour outline) * if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "neuron/rxd/geometry3d/ctng.pyx":350 * # * ##################################################################### * cdef dict diam_corrections = {None: None} # <<<<<<<<<<<<<< * cdef dict clip_copying = {} * while diam_corrections: */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, Py_None, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_diam_corrections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":351 * ##################################################################### * cdef dict diam_corrections = {None: None} * cdef dict clip_copying = {} # <<<<<<<<<<<<<< * while diam_corrections: * all_cones = [] */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_clip_copying = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":352 * cdef dict diam_corrections = {None: None} * cdef dict clip_copying = {} * while diam_corrections: # <<<<<<<<<<<<<< * all_cones = [] * pts_cones_db = {} */ while (1) { __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_diam_corrections); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_21) break; /* "neuron/rxd/geometry3d/ctng.pyx":353 * cdef dict clip_copying = {} * while diam_corrections: * all_cones = [] # <<<<<<<<<<<<<< * pts_cones_db = {} * diam_db = {} */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_all_cones); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_all_cones, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":354 * while diam_corrections: * all_cones = [] * pts_cones_db = {} # <<<<<<<<<<<<<< * diam_db = {} * # TODO: don't use name; use hash! */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_pts_cones_db, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":355 * all_cones = [] * pts_cones_db = {} * diam_db = {} # <<<<<<<<<<<<<< * # TODO: don't use name; use hash! * for branch, psec in zip(branches, parent_sec_name): */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_diam_db, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":357 * diam_db = {} * # TODO: don't use name; use hash! * for branch, psec in zip(branches, parent_sec_name): # <<<<<<<<<<<<<< * if source_is_import3d: * x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_branches); __Pyx_GIVEREF(__pyx_v_branches); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_branches); __Pyx_INCREF(__pyx_v_parent_sec_name); __Pyx_GIVEREF(__pyx_v_parent_sec_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_parent_sec_name); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_1 = __pyx_t_13; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_13); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_13); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_13); } if ((likely(PyTuple_CheckExact(__pyx_t_13))) || (PyList_CheckExact(__pyx_t_13))) { PyObject* sequence = __pyx_t_13; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_10 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_10 = __pyx_t_19(__pyx_t_4); if (unlikely(!__pyx_t_10)) goto __pyx_L29_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_11 = __pyx_t_19(__pyx_t_4); if (unlikely(!__pyx_t_11)) goto __pyx_L29_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L30_unpacking_done; __pyx_L29_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L30_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_branch, __pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_psec, __pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":358 * # TODO: don't use name; use hash! * for branch, psec in zip(branches, parent_sec_name): * if source_is_import3d: # <<<<<<<<<<<<<< * x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] * d = branch.d.to_python() */ __pyx_t_21 = (__pyx_v_source_is_import3d != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":359 * for branch, psec in zip(branches, parent_sec_name): * if source_is_import3d: * x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] # <<<<<<<<<<<<<< * d = branch.d.to_python() * else: */ __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); for (__pyx_t_9 = 0; __pyx_t_9 < 3; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_branch, __pyx_n_s_raw); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_getrow); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_18) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_18); __pyx_t_18 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_22, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_to_python); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_7) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_8) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_11); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_13, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } if (1) { PyObject* sequence = __pyx_t_13; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_11 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); __pyx_t_7 = PyList_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":360 * if source_is_import3d: * x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] * d = branch.d.to_python() # <<<<<<<<<<<<<< * else: * x = numpy.array([h.x3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_branch, __pyx_n_s_d); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_to_python); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_7) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":358 * # TODO: don't use name; use hash! * for branch, psec in zip(branches, parent_sec_name): * if source_is_import3d: # <<<<<<<<<<<<<< * x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] * d = branch.d.to_python() */ goto __pyx_L31; } /* "neuron/rxd/geometry3d/ctng.pyx":362 * d = branch.d.to_python() * else: * x = numpy.array([h.x3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) # <<<<<<<<<<<<<< * y = numpy.array([h.y3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * z = numpy.array([h.z3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) */ /*else*/ { __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_n3d); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_11); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_23; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_x3d); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_22))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __pyx_t_22 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_22) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_13); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_22); __pyx_t_22 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":363 * else: * x = numpy.array([h.x3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * y = numpy.array([h.y3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) # <<<<<<<<<<<<<< * z = numpy.array([h.z3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * d = numpy.array([h.diam3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_n3d); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Int(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_23; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_y3d); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_22, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_8) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_13); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":364 * x = numpy.array([h.x3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * y = numpy.array([h.y3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * z = numpy.array([h.z3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) # <<<<<<<<<<<<<< * d = numpy.array([h.diam3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_n3d); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Int(__pyx_t_22); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_23; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_z3d); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_10) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_13); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":365 * y = numpy.array([h.y3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * z = numpy.array([h.z3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) * d = numpy.array([h.diam3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) # <<<<<<<<<<<<<< * * # make sure that all the ones that connect to the soma do in fact connect */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_n3d); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_11); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_23; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_h); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_diam3d); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_sec, __pyx_v_branch) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_22))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __pyx_t_22 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_22) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_13); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_22); __pyx_t_22 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_13); __pyx_t_13 = 0; } __pyx_L31:; /* "neuron/rxd/geometry3d/ctng.pyx":371 * # CTNG:connectdends * #print 'psec, soma_sec = %r, %r' % (psec, soma_sec) * if psec == soma_sec and f_pts: # <<<<<<<<<<<<<< * pt = (x[1], y[1], z[1]) * cp = closest_pt3(pt, f_pts) */ if (unlikely(!__pyx_v_soma_sec)) { __Pyx_RaiseUnboundLocalError("soma_sec"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = PyObject_RichCompare(__pyx_v_psec, __pyx_v_soma_sec, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_3) { } else { __pyx_t_21 = __pyx_t_3; goto __pyx_L43_bool_binop_done; } __pyx_t_3 = (__pyx_v_f_pts != Py_None) && (PyList_GET_SIZE(__pyx_v_f_pts) != 0); __pyx_t_21 = __pyx_t_3; __pyx_L43_bool_binop_done:; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":372 * #print 'psec, soma_sec = %r, %r' % (psec, soma_sec) * if psec == soma_sec and f_pts: * pt = (x[1], y[1], z[1]) # <<<<<<<<<<<<<< * cp = closest_pt3(pt, f_pts) * # NEURON includes the wire point at the center; we want to connect */ __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_y, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_z, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_11); __pyx_t_13 = 0; __pyx_t_7 = 0; __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_pt, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":373 * if psec == soma_sec and f_pts: * pt = (x[1], y[1], z[1]) * cp = closest_pt3(pt, f_pts) # <<<<<<<<<<<<<< * # NEURON includes the wire point at the center; we want to connect * # to the closest place on the soma's axis instead with full diameter */ __pyx_t_4 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_closest_pt3(__pyx_v_pt, __pyx_v_f_pts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_cp, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":378 * # x, y, z, d = [cp[0]] + [X for X in x[1 :]], [cp[1]] + [Y for Y in y[1:]], [somaz] + [Z for Z in z[1:]], [d[1]] + [D for D in d[1 :]] * #print 'psec == soma_sec, cp = %r' % cp * x[0], y[0] = cp # <<<<<<<<<<<<<< * z[0] = somaz * d[0] = d[1] */ if (likely(__pyx_v_cp != Py_None)) { PyObject* sequence = __pyx_v_cp; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__Pyx_SetItemInt(__pyx_v_x, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_y, 0, __pyx_t_11, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":379 * #print 'psec == soma_sec, cp = %r' % cp * x[0], y[0] = cp * z[0] = somaz # <<<<<<<<<<<<<< * d[0] = d[1] * # cap this with a sphere for smooth joins */ __pyx_t_11 = PyFloat_FromDouble(__pyx_v_somaz); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (unlikely(__Pyx_SetItemInt(__pyx_v_z, 0, __pyx_t_11, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":380 * x[0], y[0] = cp * z[0] = somaz * d[0] = d[1] # <<<<<<<<<<<<<< * # cap this with a sphere for smooth joins * sphere_cap = Sphere(x[0], y[0], z[0], d[0] * 0.5) */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_d, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); if (unlikely(__Pyx_SetItemInt(__pyx_v_d, 0, __pyx_t_11, long, 1, __Pyx_PyInt_From_long, 0, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":382 * d[0] = d[1] * # cap this with a sphere for smooth joins * sphere_cap = Sphere(x[0], y[0], z[0], d[0] * 0.5) # <<<<<<<<<<<<<< * # make sure sphere doesn't stick out of wrong side of cylinder * sphere_cap.set_clip([Plane(x[1], y[1], z[1], x[1] - x[0], y[1] - y[0], z[1] - z[0])]) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sphere); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_y, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_z, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyNumber_Multiply(__pyx_t_10, __pyx_float_0_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_14 = 1; } } __pyx_t_12 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_14, __pyx_t_8); __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_22 = 0; __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_sphere_cap, __pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":384 * sphere_cap = Sphere(x[0], y[0], z[0], d[0] * 0.5) * # make sure sphere doesn't stick out of wrong side of cylinder * sphere_cap.set_clip([Plane(x[1], y[1], z[1], x[1] - x[0], y[1] - y[0], z[1] - z[0])]) # <<<<<<<<<<<<<< * objects.append(sphere_cap) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sphere_cap, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_y, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_z, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_24 = PyNumber_Subtract(__pyx_t_10, __pyx_t_18); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_y, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_y, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_25 = PyNumber_Subtract(__pyx_t_18, __pyx_t_10); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_z, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_z, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_26 = PyNumber_Subtract(__pyx_t_10, __pyx_t_18); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_10 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_14, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_14, __pyx_t_26); __pyx_t_22 = 0; __pyx_t_13 = 0; __pyx_t_7 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_12) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":385 * # make sure sphere doesn't stick out of wrong side of cylinder * sphere_cap.set_clip([Plane(x[1], y[1], z[1], x[1] - x[0], y[1] - y[0], z[1] - z[0])]) * objects.append(sphere_cap) # <<<<<<<<<<<<<< * * for i in range(len(x) - 1): */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_sphere_cap); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":371 * # CTNG:connectdends * #print 'psec, soma_sec = %r, %r' % (psec, soma_sec) * if psec == soma_sec and f_pts: # <<<<<<<<<<<<<< * pt = (x[1], y[1], z[1]) * cp = closest_pt3(pt, f_pts) */ } /* "neuron/rxd/geometry3d/ctng.pyx":387 * objects.append(sphere_cap) * * for i in range(len(x) - 1): # <<<<<<<<<<<<<< * d0, d1 = d[i : i + 2] * if (x[i] != x[i + 1] or y[i] != y[i + 1] or z[i] != z[i + 1]): */ __pyx_t_14 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_27 = (__pyx_t_14 - 1); for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_27; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "neuron/rxd/geometry3d/ctng.pyx":388 * * for i in range(len(x) - 1): * d0, d1 = d[i : i + 2] # <<<<<<<<<<<<<< * if (x[i] != x[i + 1] or y[i] != y[i + 1] or z[i] != z[i + 1]): * # short section check */ __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_d, __pyx_v_i, (__pyx_v_i + 2), NULL, NULL, NULL, 1, 1, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_19(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L47_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_10 = __pyx_t_19(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L47_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L48_unpacking_done; __pyx_L47_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L48_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_d0, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_d1, __pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":389 * for i in range(len(x) - 1): * d0, d1 = d[i : i + 2] * if (x[i] != x[i + 1] or y[i] != y[i + 1] or z[i] != z[i + 1]): # <<<<<<<<<<<<<< * # short section check * #if linalg.norm((x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i])) < (d1 + d0) * 0.5: */ __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_x, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_x, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { __pyx_t_21 = __pyx_t_3; goto __pyx_L50_bool_binop_done; } __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_y, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_y, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!__pyx_t_3) { } else { __pyx_t_21 = __pyx_t_3; goto __pyx_L50_bool_binop_done; } __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_z, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_z, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __pyx_t_3; __pyx_L50_bool_binop_done:; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":393 * #if linalg.norm((x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i])) < (d1 + d0) * 0.5: * # short_segs += 1 * axisx, axisy, axisz, deltad = x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i], d1 - d0 # <<<<<<<<<<<<<< * axislength = (axisx ** 2 + axisy ** 2 + axisz ** 2) ** 0.5 * axisx /= axislength; axisy /= axislength; axisz /= axislength; deltad /= axislength */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_x, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_x, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyNumber_Subtract(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_y, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_y, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Subtract(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_z, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_z, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyNumber_Subtract(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Subtract(__pyx_v_d1, __pyx_v_d0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_axisx, __pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_axisy, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_axisz, __pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_deltad, __pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":394 * # short_segs += 1 * axisx, axisy, axisz, deltad = x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i], d1 - d0 * axislength = (axisx ** 2 + axisy ** 2 + axisz ** 2) ** 0.5 # <<<<<<<<<<<<<< * axisx /= axislength; axisy /= axislength; axisz /= axislength; deltad /= axislength * x0, y0, z0 = x[i], y[i], z[i] */ __pyx_t_10 = PyNumber_Power(__pyx_v_axisx, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyNumber_Power(__pyx_v_axisy, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = PyNumber_Add(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyNumber_Power(__pyx_v_axisz, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyNumber_Power(__pyx_t_10, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_axislength, __pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":395 * axisx, axisy, axisz, deltad = x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i], d1 - d0 * axislength = (axisx ** 2 + axisy ** 2 + axisz ** 2) ** 0.5 * axisx /= axislength; axisy /= axislength; axisz /= axislength; deltad /= axislength # <<<<<<<<<<<<<< * x0, y0, z0 = x[i], y[i], z[i] * x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] */ __pyx_t_12 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_axisx, __pyx_v_axislength); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF_SET(__pyx_v_axisx, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_axisy, __pyx_v_axislength); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF_SET(__pyx_v_axisy, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_axisz, __pyx_v_axislength); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF_SET(__pyx_v_axisz, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_deltad, __pyx_v_axislength); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF_SET(__pyx_v_deltad, __pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":396 * axislength = (axisx ** 2 + axisy ** 2 + axisz ** 2) ** 0.5 * axisx /= axislength; axisy /= axislength; axisz /= axislength; deltad /= axislength * x0, y0, z0 = x[i], y[i], z[i] # <<<<<<<<<<<<<< * x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] * if (x0, y0, z0) in diam_corrections: */ __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_x, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_y, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_z, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_x0 = __pyx_t_15; __pyx_v_y0 = __pyx_t_16; __pyx_v_z0 = __pyx_t_17; /* "neuron/rxd/geometry3d/ctng.pyx":397 * axisx /= axislength; axisy /= axislength; axisz /= axislength; deltad /= axislength * x0, y0, z0 = x[i], y[i], z[i] * x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] # <<<<<<<<<<<<<< * if (x0, y0, z0) in diam_corrections: * d0 = diam_corrections[(x0, y0, z0)] */ __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_x, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_y, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_23 = (__pyx_v_i + 1); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_z, __pyx_t_23, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_x1 = __pyx_t_17; __pyx_v_y1 = __pyx_t_16; __pyx_v_z1 = __pyx_t_15; /* "neuron/rxd/geometry3d/ctng.pyx":398 * x0, y0, z0 = x[i], y[i], z[i] * x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] * if (x0, y0, z0) in diam_corrections: # <<<<<<<<<<<<<< * d0 = diam_corrections[(x0, y0, z0)] * if (x1, y1, z1) in diam_corrections: */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_8); __pyx_t_12 = 0; __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_21 = (__Pyx_PyDict_ContainsTF(__pyx_t_11, __pyx_v_diam_corrections, Py_EQ)); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_3 = (__pyx_t_21 != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":399 * x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] * if (x0, y0, z0) in diam_corrections: * d0 = diam_corrections[(x0, y0, z0)] # <<<<<<<<<<<<<< * if (x1, y1, z1) in diam_corrections: * d1 = diam_corrections[(x1, y1, z1)] */ __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_10); __pyx_t_11 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_diam_corrections, __pyx_t_12); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF_SET(__pyx_v_d0, __pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":398 * x0, y0, z0 = x[i], y[i], z[i] * x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] * if (x0, y0, z0) in diam_corrections: # <<<<<<<<<<<<<< * d0 = diam_corrections[(x0, y0, z0)] * if (x1, y1, z1) in diam_corrections: */ } /* "neuron/rxd/geometry3d/ctng.pyx":400 * if (x0, y0, z0) in diam_corrections: * d0 = diam_corrections[(x0, y0, z0)] * if (x1, y1, z1) in diam_corrections: # <<<<<<<<<<<<<< * d1 = diam_corrections[(x1, y1, z1)] * */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_8); __pyx_t_10 = 0; __pyx_t_12 = 0; __pyx_t_8 = 0; __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_t_11, __pyx_v_diam_corrections, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_21 = (__pyx_t_3 != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":401 * d0 = diam_corrections[(x0, y0, z0)] * if (x1, y1, z1) in diam_corrections: * d1 = diam_corrections[(x1, y1, z1)] # <<<<<<<<<<<<<< * * if d0 != d1: */ __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_12); __pyx_t_11 = 0; __pyx_t_8 = 0; __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_diam_corrections, __pyx_t_10); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_d1, __pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":400 * if (x0, y0, z0) in diam_corrections: * d0 = diam_corrections[(x0, y0, z0)] * if (x1, y1, z1) in diam_corrections: # <<<<<<<<<<<<<< * d1 = diam_corrections[(x1, y1, z1)] * */ } /* "neuron/rxd/geometry3d/ctng.pyx":403 * d1 = diam_corrections[(x1, y1, z1)] * * if d0 != d1: # <<<<<<<<<<<<<< * all_cones.append(Cone(x0, y0, z0, d0 * 0.5, x1, y1, z1, d1 * 0.5)) * else: */ __pyx_t_12 = PyObject_RichCompare(__pyx_v_d0, __pyx_v_d1, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":404 * * if d0 != d1: * all_cones.append(Cone(x0, y0, z0, d0 * 0.5, x1, y1, z1, d1 * 0.5)) # <<<<<<<<<<<<<< * else: * all_cones.append(Cylinder(x0, y0, z0, x1, y1, z1, d1 * 0.5)) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cone); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_26 = PyNumber_Multiply(__pyx_v_d0, __pyx_float_0_5); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyNumber_Multiply(__pyx_v_d1, __pyx_float_0_5); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(8+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_18, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_18, 5+__pyx_t_14, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 6+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_18, 7+__pyx_t_14, __pyx_t_13); __pyx_t_8 = 0; __pyx_t_11 = 0; __pyx_t_4 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_18, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_all_cones, __pyx_t_12); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":403 * d1 = diam_corrections[(x1, y1, z1)] * * if d0 != d1: # <<<<<<<<<<<<<< * all_cones.append(Cone(x0, y0, z0, d0 * 0.5, x1, y1, z1, d1 * 0.5)) * else: */ goto __pyx_L55; } /* "neuron/rxd/geometry3d/ctng.pyx":406 * all_cones.append(Cone(x0, y0, z0, d0 * 0.5, x1, y1, z1, d1 * 0.5)) * else: * all_cones.append(Cylinder(x0, y0, z0, x1, y1, z1, d1 * 0.5)) # <<<<<<<<<<<<<< * with cython.wraparound(True): * register(pts_cones_db, (x0, y0, z0), all_cones[-1]) */ /*else*/ { __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cylinder); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_4 = PyNumber_Multiply(__pyx_v_d1, __pyx_float_0_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_14 = 1; } } __pyx_t_8 = PyTuple_New(7+__pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_14, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 6+__pyx_t_14, __pyx_t_4); __pyx_t_18 = 0; __pyx_t_13 = 0; __pyx_t_7 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_all_cones, __pyx_t_12); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __pyx_L55:; /* "neuron/rxd/geometry3d/ctng.pyx":408 * all_cones.append(Cylinder(x0, y0, z0, x1, y1, z1, d1 * 0.5)) * with cython.wraparound(True): * register(pts_cones_db, (x0, y0, z0), all_cones[-1]) # <<<<<<<<<<<<<< * register(pts_cones_db, (x1, y1, z1), all_cones[-1]) * register(diam_db, (x0, y0, z0), d0) */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_8); __pyx_t_12 = 0; __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_all_cones, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_register(__pyx_v_pts_cones_db, ((PyObject*)__pyx_t_4), __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":409 * with cython.wraparound(True): * register(pts_cones_db, (x0, y0, z0), all_cones[-1]) * register(pts_cones_db, (x1, y1, z1), all_cones[-1]) # <<<<<<<<<<<<<< * register(diam_db, (x0, y0, z0), d0) * register(diam_db, (x1, y1, z1), d1) */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_4); __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_all_cones, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_register(__pyx_v_pts_cones_db, ((PyObject*)__pyx_t_12), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":410 * register(pts_cones_db, (x0, y0, z0), all_cones[-1]) * register(pts_cones_db, (x1, y1, z1), all_cones[-1]) * register(diam_db, (x0, y0, z0), d0) # <<<<<<<<<<<<<< * register(diam_db, (x1, y1, z1), d1) * */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_12); __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_12 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_register(__pyx_v_diam_db, ((PyObject*)__pyx_t_10), __pyx_v_d0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":411 * register(pts_cones_db, (x1, y1, z1), all_cones[-1]) * register(diam_db, (x0, y0, z0), d0) * register(diam_db, (x1, y1, z1), d1) # <<<<<<<<<<<<<< * * # at join, should always be the size of the biggest branch */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_4); __pyx_t_12 = 0; __pyx_t_10 = 0; __pyx_t_4 = 0; __pyx_t_4 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_register(__pyx_v_diam_db, ((PyObject*)__pyx_t_8), __pyx_v_d1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":389 * for i in range(len(x) - 1): * d0, d1 = d[i : i + 2] * if (x[i] != x[i + 1] or y[i] != y[i + 1] or z[i] != z[i + 1]): # <<<<<<<<<<<<<< * # short section check * #if linalg.norm((x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i])) < (d1 + d0) * 0.5: */ } } /* "neuron/rxd/geometry3d/ctng.pyx":357 * diam_db = {} * # TODO: don't use name; use hash! * for branch, psec in zip(branches, parent_sec_name): # <<<<<<<<<<<<<< * if source_is_import3d: * x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":416 * # this is different behavior than NEURON, which continues the size of the * # first point away from the join to the join * diam_corrections = {} # <<<<<<<<<<<<<< * for pt in diam_db: * vals = diam_db[pt] */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_diam_corrections, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":417 * # first point away from the join to the join * diam_corrections = {} * for pt in diam_db: # <<<<<<<<<<<<<< * vals = diam_db[pt] * if max(vals) != min(vals): */ __pyx_t_5 = 0; __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_diam_db, 1, ((PyObject *)NULL), (&__pyx_t_27), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; while (1) { __pyx_t_28 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_27, &__pyx_t_5, &__pyx_t_4, NULL, NULL, __pyx_t_9); if (unlikely(__pyx_t_28 == 0)) break; if (unlikely(__pyx_t_28 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_pt, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":418 * diam_corrections = {} * for pt in diam_db: * vals = diam_db[pt] # <<<<<<<<<<<<<< * if max(vals) != min(vals): * diam_corrections[pt] = max(vals) */ __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_diam_db, __pyx_v_pt); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_vals, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":419 * for pt in diam_db: * vals = diam_db[pt] * if max(vals) != min(vals): # <<<<<<<<<<<<<< * diam_corrections[pt] = max(vals) * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_vals); __Pyx_GIVEREF(__pyx_v_vals); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_vals); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_vals); __Pyx_GIVEREF(__pyx_v_vals); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_vals); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":420 * vals = diam_db[pt] * if max(vals) != min(vals): * diam_corrections[pt] = max(vals) # <<<<<<<<<<<<<< * * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_vals); __Pyx_GIVEREF(__pyx_v_vals); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_vals); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(PyDict_SetItem(__pyx_v_diam_corrections, __pyx_v_pt, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":419 * for pt in diam_db: * vals = diam_db[pt] * if max(vals) != min(vals): # <<<<<<<<<<<<<< * diam_corrections[pt] = max(vals) * */ } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/ctng.pyx":424 * * * cdef dict cone_clip_db = dict((cone, []) for cone in all_cones) # <<<<<<<<<<<<<< * cdef bint sharp_turn * # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} */ __pyx_t_1 = __pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cone_clip_db = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":427 * cdef bint sharp_turn * # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} * join_items_needing_clipped = [] # <<<<<<<<<<<<<< * for cone in all_cones: * x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 */ __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_v_join_items_needing_clipped = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":428 * # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} * join_items_needing_clipped = [] * for cone in all_cones: # <<<<<<<<<<<<<< * x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 * x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 */ if (unlikely(!__pyx_cur_scope->__pyx_v_all_cones)) { __Pyx_RaiseUnboundLocalError("all_cones"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __pyx_cur_scope->__pyx_v_all_cones; __Pyx_INCREF(__pyx_t_10); __pyx_t_27 = 0; for (;;) { if (__pyx_t_27 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_27); __Pyx_INCREF(__pyx_t_1); __pyx_t_27++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_27); __pyx_t_27++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_cone, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":429 * join_items_needing_clipped = [] * for cone in all_cones: * x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 # <<<<<<<<<<<<<< * x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 * pt1 = numpy.array([x1, y1, z1]) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_x0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_y0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_z0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_r0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_29 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_29 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x1 = __pyx_t_15; __pyx_v_y1 = __pyx_t_16; __pyx_v_z1 = __pyx_t_17; __pyx_v_r1 = __pyx_t_29; /* "neuron/rxd/geometry3d/ctng.pyx":430 * for cone in all_cones: * x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 * x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 # <<<<<<<<<<<<<< * pt1 = numpy.array([x1, y1, z1]) * pt2 = numpy.array([x2, y2, z2]) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_x1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_29 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_29 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_y1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_z1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_r1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x2 = __pyx_t_29; __pyx_v_y2 = __pyx_t_17; __pyx_v_z2 = __pyx_t_16; __pyx_v_r2 = __pyx_t_15; /* "neuron/rxd/geometry3d/ctng.pyx":431 * x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 * x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 * pt1 = numpy.array([x1, y1, z1]) # <<<<<<<<<<<<<< * pt2 = numpy.array([x2, y2, z2]) * axis = (pt2 - pt1) / linalg.norm(pt2 - pt1) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_25 = PyList_New(3); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_25, 1, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_26); PyList_SET_ITEM(__pyx_t_25, 2, __pyx_t_26); __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_26 = 0; __pyx_t_26 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_26) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_25); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_26); __pyx_t_26 = NULL; __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_25); __pyx_t_25 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_pt1, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":432 * x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 * pt1 = numpy.array([x1, y1, z1]) * pt2 = numpy.array([x2, y2, z2]) # <<<<<<<<<<<<<< * axis = (pt2 - pt1) / linalg.norm(pt2 - pt1) * left_neighbors = list(pts_cones_db[(x1, y1, z1)]) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_25); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_26); __pyx_t_8 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_26 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_26) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_25 = PyTuple_New(1+1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_26); __pyx_t_26 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_25, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_25, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_pt2, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":433 * pt1 = numpy.array([x1, y1, z1]) * pt2 = numpy.array([x2, y2, z2]) * axis = (pt2 - pt1) / linalg.norm(pt2 - pt1) # <<<<<<<<<<<<<< * left_neighbors = list(pts_cones_db[(x1, y1, z1)]) * right_neighbors = list(pts_cones_db[(x2, y2, z2)]) */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_pt2, __pyx_v_pt1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_25 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_norm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = PyNumber_Subtract(__pyx_v_pt2, __pyx_v_pt1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_26) { __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_25); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_GOTREF(__pyx_t_12); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_26); __pyx_t_26 = NULL; __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_25); __pyx_t_25 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_axis, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":434 * pt2 = numpy.array([x2, y2, z2]) * axis = (pt2 - pt1) / linalg.norm(pt2 - pt1) * left_neighbors = list(pts_cones_db[(x1, y1, z1)]) # <<<<<<<<<<<<<< * right_neighbors = list(pts_cones_db[(x2, y2, z2)]) * left_neighbors.remove(cone) */ if (unlikely(!__pyx_v_pts_cones_db)) { __Pyx_RaiseUnboundLocalError("pts_cones_db"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_pts_cones_db, __pyx_t_8); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_left_neighbors, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":435 * axis = (pt2 - pt1) / linalg.norm(pt2 - pt1) * left_neighbors = list(pts_cones_db[(x1, y1, z1)]) * right_neighbors = list(pts_cones_db[(x2, y2, z2)]) # <<<<<<<<<<<<<< * left_neighbors.remove(cone) * right_neighbors.remove(cone) */ if (unlikely(!__pyx_v_pts_cones_db)) { __Pyx_RaiseUnboundLocalError("pts_cones_db"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_12); __pyx_t_8 = 0; __pyx_t_1 = 0; __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_pts_cones_db, __pyx_t_4); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PySequence_List(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_right_neighbors, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":436 * left_neighbors = list(pts_cones_db[(x1, y1, z1)]) * right_neighbors = list(pts_cones_db[(x2, y2, z2)]) * left_neighbors.remove(cone) # <<<<<<<<<<<<<< * right_neighbors.remove(cone) * if not left_neighbors: left_neighbors = [None] */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_neighbors, __pyx_n_s_remove); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_1) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_cone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_cone); __Pyx_GIVEREF(__pyx_v_cone); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_cone); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":437 * right_neighbors = list(pts_cones_db[(x2, y2, z2)]) * left_neighbors.remove(cone) * right_neighbors.remove(cone) # <<<<<<<<<<<<<< * if not left_neighbors: left_neighbors = [None] * if not right_neighbors: right_neighbors = [None] */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_neighbors, __pyx_n_s_remove); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_cone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_cone); __Pyx_GIVEREF(__pyx_v_cone); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_cone); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":438 * left_neighbors.remove(cone) * right_neighbors.remove(cone) * if not left_neighbors: left_neighbors = [None] # <<<<<<<<<<<<<< * if not right_neighbors: right_neighbors = [None] * for neighbor_left, neighbor_right in itertools.product(left_neighbors, right_neighbors): */ __pyx_t_21 = (__pyx_v_left_neighbors != Py_None) && (PyList_GET_SIZE(__pyx_v_left_neighbors) != 0); __pyx_t_3 = ((!__pyx_t_21) != 0); if (__pyx_t_3) { __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_4, 0, Py_None); __Pyx_DECREF_SET(__pyx_v_left_neighbors, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; } /* "neuron/rxd/geometry3d/ctng.pyx":439 * right_neighbors.remove(cone) * if not left_neighbors: left_neighbors = [None] * if not right_neighbors: right_neighbors = [None] # <<<<<<<<<<<<<< * for neighbor_left, neighbor_right in itertools.product(left_neighbors, right_neighbors): * clips = [] */ __pyx_t_3 = (__pyx_v_right_neighbors != Py_None) && (PyList_GET_SIZE(__pyx_v_right_neighbors) != 0); __pyx_t_21 = ((!__pyx_t_3) != 0); if (__pyx_t_21) { __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_4, 0, Py_None); __Pyx_DECREF_SET(__pyx_v_right_neighbors, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; } /* "neuron/rxd/geometry3d/ctng.pyx":440 * if not left_neighbors: left_neighbors = [None] * if not right_neighbors: right_neighbors = [None] * for neighbor_left, neighbor_right in itertools.product(left_neighbors, right_neighbors): # <<<<<<<<<<<<<< * clips = [] * # if any join needs to be subject to clips, it goes here */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_product); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_v_left_neighbors); __Pyx_GIVEREF(__pyx_v_left_neighbors); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_v_left_neighbors); __Pyx_INCREF(__pyx_v_right_neighbors); __Pyx_GIVEREF(__pyx_v_right_neighbors); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_v_right_neighbors); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_12 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_12); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_25 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_25)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_19(__pyx_t_25); if (unlikely(!__pyx_t_8)) goto __pyx_L65_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_12 = __pyx_t_19(__pyx_t_25); if (unlikely(!__pyx_t_12)) goto __pyx_L65_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_25), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; goto __pyx_L66_unpacking_done; __pyx_L65_unpacking_failed:; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L66_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_neighbor_left, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_neighbor_right, __pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":441 * if not right_neighbors: right_neighbors = [None] * for neighbor_left, neighbor_right in itertools.product(left_neighbors, right_neighbors): * clips = [] # <<<<<<<<<<<<<< * # if any join needs to be subject to clips, it goes here * join_item = None */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_clips, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":443 * clips = [] * # if any join needs to be subject to clips, it goes here * join_item = None # <<<<<<<<<<<<<< * # process the join on the "left" (end 1) * if neighbor_left is not None: */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_join_item, Py_None); /* "neuron/rxd/geometry3d/ctng.pyx":445 * join_item = None * # process the join on the "left" (end 1) * if neighbor_left is not None: # <<<<<<<<<<<<<< * # any joins are created on the left pass; the right pass will only do clippings * x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 */ __pyx_t_21 = (__pyx_v_neighbor_left != Py_None); __pyx_t_3 = (__pyx_t_21 != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":447 * if neighbor_left is not None: * # any joins are created on the left pass; the right pass will only do clippings * x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 # <<<<<<<<<<<<<< * if x0 == x1 and y0 == y1 and z0 == z1: * x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_x0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_y0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_z0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_r0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_29 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_29 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_x0 = __pyx_t_15; __pyx_v_y0 = __pyx_t_16; __pyx_v_z0 = __pyx_t_17; __pyx_v_r0 = __pyx_t_29; /* "neuron/rxd/geometry3d/ctng.pyx":448 * # any joins are created on the left pass; the right pass will only do clippings * x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 * if x0 == x1 and y0 == y1 and z0 == z1: # <<<<<<<<<<<<<< * x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 * pt0 = numpy.array([x0, y0, z0]) */ __pyx_t_21 = ((__pyx_v_x0 == __pyx_v_x1) != 0); if (__pyx_t_21) { } else { __pyx_t_3 = __pyx_t_21; goto __pyx_L69_bool_binop_done; } __pyx_t_21 = ((__pyx_v_y0 == __pyx_v_y1) != 0); if (__pyx_t_21) { } else { __pyx_t_3 = __pyx_t_21; goto __pyx_L69_bool_binop_done; } __pyx_t_21 = ((__pyx_v_z0 == __pyx_v_z1) != 0); __pyx_t_3 = __pyx_t_21; __pyx_L69_bool_binop_done:; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":449 * x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 * if x0 == x1 and y0 == y1 and z0 == z1: * x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 # <<<<<<<<<<<<<< * pt0 = numpy.array([x0, y0, z0]) * naxis = (pt1 - pt0) / linalg.norm(pt1 - pt0) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_x1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_29 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_29 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_y1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_left, __pyx_n_s_r1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_x0 = __pyx_t_29; __pyx_v_y0 = __pyx_t_17; __pyx_v_z0 = __pyx_t_16; __pyx_v_r0 = __pyx_t_15; /* "neuron/rxd/geometry3d/ctng.pyx":448 * # any joins are created on the left pass; the right pass will only do clippings * x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 * if x0 == x1 and y0 == y1 and z0 == z1: # <<<<<<<<<<<<<< * x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 * pt0 = numpy.array([x0, y0, z0]) */ } /* "neuron/rxd/geometry3d/ctng.pyx":450 * if x0 == x1 and y0 == y1 and z0 == z1: * x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 * pt0 = numpy.array([x0, y0, z0]) # <<<<<<<<<<<<<< * naxis = (pt1 - pt0) / linalg.norm(pt1 - pt0) * # no need to clip if the cones are perfectly aligned */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_24 = PyList_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_25); PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyList_SET_ITEM(__pyx_t_24, 2, __pyx_t_26); __pyx_t_12 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_26 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_26) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_24); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_25 = PyTuple_New(1+1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_26); __pyx_t_26 = NULL; __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_25, 0+1, __pyx_t_24); __pyx_t_24 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_pt0, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":451 * x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 * pt0 = numpy.array([x0, y0, z0]) * naxis = (pt1 - pt0) / linalg.norm(pt1 - pt0) # <<<<<<<<<<<<<< * # no need to clip if the cones are perfectly aligned * if all(axis == naxis): */ __pyx_t_4 = PyNumber_Subtract(__pyx_v_pt1, __pyx_v_pt0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_25 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_norm); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = PyNumber_Subtract(__pyx_v_pt1, __pyx_v_pt0); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_24))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_24); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_24, function); } } if (!__pyx_t_26) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_24, __pyx_t_25); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_26); __pyx_t_26 = NULL; __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_25); __pyx_t_25 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_naxis, __pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":453 * naxis = (pt1 - pt0) / linalg.norm(pt1 - pt0) * # no need to clip if the cones are perfectly aligned * if all(axis == naxis): # <<<<<<<<<<<<<< * if r0 == r1 == r2: * # two parallel cylinders with equal radii: join by combining */ __pyx_t_24 = PyObject_RichCompare(__pyx_v_axis, __pyx_v_naxis, Py_EQ); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_builtin_all, __pyx_t_8, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":454 * # no need to clip if the cones are perfectly aligned * if all(axis == naxis): * if r0 == r1 == r2: # <<<<<<<<<<<<<< * # two parallel cylinders with equal radii: join by combining * # TODO: we can remove the original two if we can find them */ __pyx_t_3 = (__pyx_v_r0 == __pyx_v_r1); if (__pyx_t_3) { __pyx_t_3 = (__pyx_v_r1 == __pyx_v_r2); } __pyx_t_21 = (__pyx_t_3 != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":457 * # two parallel cylinders with equal radii: join by combining * # TODO: we can remove the original two if we can find them * join_item = Cylinder(x0, y0, z0, x2, y2, z2, r2) # <<<<<<<<<<<<<< * join_items_needing_clipped.append((join_item, neighbor_left, neighbor_right)) * objects.append(join_item) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cylinder); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_11 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_22 = PyTuple_New(7+__pyx_t_14); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_22, 2+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_22, 3+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_22, 4+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_22, 5+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_22, 6+__pyx_t_14, __pyx_t_18); __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_18 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_22, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_join_item, __pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":458 * # TODO: we can remove the original two if we can find them * join_item = Cylinder(x0, y0, z0, x2, y2, z2, r2) * join_items_needing_clipped.append((join_item, neighbor_left, neighbor_right)) # <<<<<<<<<<<<<< * objects.append(join_item) * else: */ __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_INCREF(__pyx_v_join_item); __Pyx_GIVEREF(__pyx_v_join_item); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_join_item); __Pyx_INCREF(__pyx_v_neighbor_left); __Pyx_GIVEREF(__pyx_v_neighbor_left); PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_v_neighbor_left); __Pyx_INCREF(__pyx_v_neighbor_right); __Pyx_GIVEREF(__pyx_v_neighbor_right); PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_v_neighbor_right); __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_join_items_needing_clipped, __pyx_t_24); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":459 * join_item = Cylinder(x0, y0, z0, x2, y2, z2, r2) * join_items_needing_clipped.append((join_item, neighbor_left, neighbor_right)) * objects.append(join_item) # <<<<<<<<<<<<<< * else: * if r0 == r1 == r2: */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_join_item); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":454 * # no need to clip if the cones are perfectly aligned * if all(axis == naxis): * if r0 == r1 == r2: # <<<<<<<<<<<<<< * # two parallel cylinders with equal radii: join by combining * # TODO: we can remove the original two if we can find them */ } /* "neuron/rxd/geometry3d/ctng.pyx":453 * naxis = (pt1 - pt0) / linalg.norm(pt1 - pt0) * # no need to clip if the cones are perfectly aligned * if all(axis == naxis): # <<<<<<<<<<<<<< * if r0 == r1 == r2: * # two parallel cylinders with equal radii: join by combining */ goto __pyx_L72; } /* "neuron/rxd/geometry3d/ctng.pyx":461 * objects.append(join_item) * else: * if r0 == r1 == r2: # <<<<<<<<<<<<<< * # simplest join: two cylinders (no need for all that nastiness below) * sp = Sphere(x1, y1, z1, r1) */ /*else*/ { __pyx_t_21 = (__pyx_v_r0 == __pyx_v_r1); if (__pyx_t_21) { __pyx_t_21 = (__pyx_v_r1 == __pyx_v_r2); } __pyx_t_3 = (__pyx_t_21 != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":463 * if r0 == r1 == r2: * # simplest join: two cylinders (no need for all that nastiness below) * sp = Sphere(x1, y1, z1, r1) # <<<<<<<<<<<<<< * sp.set_clip([Plane(x0, y0, z0, -naxis[0], -naxis[1], -naxis[2]), Plane(x2, y2, z2, axis[0], axis[1], axis[2])]) * objects.append(sp) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sphere); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_22 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_26 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_25 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_25, 2+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_25, 3+__pyx_t_14, __pyx_t_7); __pyx_t_22 = 0; __pyx_t_18 = 0; __pyx_t_13 = 0; __pyx_t_7 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_sp, __pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":464 * # simplest join: two cylinders (no need for all that nastiness below) * sp = Sphere(x1, y1, z1, r1) * sp.set_clip([Plane(x0, y0, z0, -naxis[0], -naxis[1], -naxis[2]), Plane(x2, y2, z2, axis[0], axis[1], axis[2])]) # <<<<<<<<<<<<<< * objects.append(sp) * else: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_22 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_naxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_12 = PyNumber_Negative(__pyx_t_26); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_naxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_4 = PyNumber_Negative(__pyx_t_26); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_naxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_11 = PyNumber_Negative(__pyx_t_26); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_14 = 1; } } __pyx_t_30 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_30, 0+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_30, 1+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_30, 2+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_30, 3+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_30, 4+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_30, 5+__pyx_t_14, __pyx_t_11); __pyx_t_13 = 0; __pyx_t_18 = 0; __pyx_t_22 = 0; __pyx_t_12 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_30, NULL); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_30 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_axis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_axis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_axis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_26 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_30))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_30); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_30, function); __pyx_t_14 = 1; } } __pyx_t_31 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_31, 0+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_31, 2+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_31, 3+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_31, 4+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_31, 5+__pyx_t_14, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_22 = 0; __pyx_t_18 = 0; __pyx_t_13 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_31, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = PyList_New(2); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_GIVEREF(__pyx_t_25); PyList_SET_ITEM(__pyx_t_30, 0, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_30, 1, __pyx_t_7); __pyx_t_25 = 0; __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_7) { __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_30); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_GOTREF(__pyx_t_24); } else { __pyx_t_25 = PyTuple_New(1+1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_25, 0+1, __pyx_t_30); __pyx_t_30 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":465 * sp = Sphere(x1, y1, z1, r1) * sp.set_clip([Plane(x0, y0, z0, -naxis[0], -naxis[1], -naxis[2]), Plane(x2, y2, z2, axis[0], axis[1], axis[2])]) * objects.append(sp) # <<<<<<<<<<<<<< * else: * # is the turn sharp or not */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_sp); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":461 * objects.append(join_item) * else: * if r0 == r1 == r2: # <<<<<<<<<<<<<< * # simplest join: two cylinders (no need for all that nastiness below) * sp = Sphere(x1, y1, z1, r1) */ goto __pyx_L74; } /* "neuron/rxd/geometry3d/ctng.pyx":469 * # is the turn sharp or not * # CTNG:joinangle * sharp_turn = numpy.dot(axis, naxis) < 0 # <<<<<<<<<<<<<< * # locate key vectors * plane_normal = numpy.cross(axis, naxis) */ /*else*/ { __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dot); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_25); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_25, function); __pyx_t_14 = 1; } } __pyx_t_30 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_axis); __Pyx_GIVEREF(__pyx_v_axis); PyTuple_SET_ITEM(__pyx_t_30, 0+__pyx_t_14, __pyx_v_axis); __Pyx_INCREF(__pyx_v_naxis); __Pyx_GIVEREF(__pyx_v_naxis); PyTuple_SET_ITEM(__pyx_t_30, 1+__pyx_t_14, __pyx_v_naxis); __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_t_30, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = PyObject_RichCompare(__pyx_t_24, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_25); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_25); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_v_sharp_turn = __pyx_t_3; /* "neuron/rxd/geometry3d/ctng.pyx":471 * sharp_turn = numpy.dot(axis, naxis) < 0 * # locate key vectors * plane_normal = numpy.cross(axis, naxis) # <<<<<<<<<<<<<< * radial_vec = numpy.cross(plane_normal, axis) * nradial_vec = numpy.cross(plane_normal, naxis) */ __pyx_t_24 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_cross); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_30))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_30); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_30, function); __pyx_t_14 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_24) { __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_24); __pyx_t_24 = NULL; } __Pyx_INCREF(__pyx_v_axis); __Pyx_GIVEREF(__pyx_v_axis); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_v_axis); __Pyx_INCREF(__pyx_v_naxis); __Pyx_GIVEREF(__pyx_v_naxis); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_v_naxis); __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_8, NULL); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_XDECREF_SET(__pyx_v_plane_normal, __pyx_t_25); __pyx_t_25 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":472 * # locate key vectors * plane_normal = numpy.cross(axis, naxis) * radial_vec = numpy.cross(plane_normal, axis) # <<<<<<<<<<<<<< * nradial_vec = numpy.cross(plane_normal, naxis) * # normalize all of these */ __pyx_t_30 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_cross); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_30)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_24 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (__pyx_t_30) { __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_30); __pyx_t_30 = NULL; } __Pyx_INCREF(__pyx_v_plane_normal); __Pyx_GIVEREF(__pyx_v_plane_normal); PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_14, __pyx_v_plane_normal); __Pyx_INCREF(__pyx_v_axis); __Pyx_GIVEREF(__pyx_v_axis); PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_14, __pyx_v_axis); __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_24, NULL); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_radial_vec, __pyx_t_25); __pyx_t_25 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":473 * plane_normal = numpy.cross(axis, naxis) * radial_vec = numpy.cross(plane_normal, axis) * nradial_vec = numpy.cross(plane_normal, naxis) # <<<<<<<<<<<<<< * # normalize all of these * radial_vec /= linalg.norm(radial_vec) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_cross); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_24))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_24); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_24, function); __pyx_t_14 = 1; } } __pyx_t_30 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_plane_normal); __Pyx_GIVEREF(__pyx_v_plane_normal); PyTuple_SET_ITEM(__pyx_t_30, 0+__pyx_t_14, __pyx_v_plane_normal); __Pyx_INCREF(__pyx_v_naxis); __Pyx_GIVEREF(__pyx_v_naxis); PyTuple_SET_ITEM(__pyx_t_30, 1+__pyx_t_14, __pyx_v_naxis); __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_30, NULL); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF_SET(__pyx_v_nradial_vec, __pyx_t_25); __pyx_t_25 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":475 * nradial_vec = numpy.cross(plane_normal, naxis) * # normalize all of these * radial_vec /= linalg.norm(radial_vec) # <<<<<<<<<<<<<< * nradial_vec /= linalg.norm(nradial_vec) * */ __pyx_t_24 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_norm); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_30))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_30); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_30, function); } } if (!__pyx_t_24) { __pyx_t_25 = __Pyx_PyObject_CallOneArg(__pyx_t_30, __pyx_v_radial_vec); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_24); __pyx_t_24 = NULL; __Pyx_INCREF(__pyx_v_radial_vec); __Pyx_GIVEREF(__pyx_v_radial_vec); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_radial_vec); __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_8, NULL); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_radial_vec, __pyx_t_25); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF_SET(__pyx_v_radial_vec, __pyx_t_30); __pyx_t_30 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":476 * # normalize all of these * radial_vec /= linalg.norm(radial_vec) * nradial_vec /= linalg.norm(nradial_vec) # <<<<<<<<<<<<<< * * # count the corners that are inside the other cone (for both ways) */ __pyx_t_25 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_norm); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_25)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_25) { __pyx_t_30 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_nradial_vec); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); } else { __pyx_t_24 = PyTuple_New(1+1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_25); __pyx_t_25 = NULL; __Pyx_INCREF(__pyx_v_nradial_vec); __Pyx_GIVEREF(__pyx_v_nradial_vec); PyTuple_SET_ITEM(__pyx_t_24, 0+1, __pyx_v_nradial_vec); __pyx_t_30 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_24, NULL); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_nradial_vec, __pyx_t_30); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF_SET(__pyx_v_nradial_vec, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":480 * # count the corners that are inside the other cone (for both ways) * # CTNG:outsidecorners * my_corner_count = count_outside(neighbor_left, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], 0) # <<<<<<<<<<<<<< * corner_count = my_corner_count + count_outside(cone, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], 0) * */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_30 = PyNumber_Multiply(__pyx_t_8, __pyx_v_radial_vec); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_v_pt1, __pyx_t_30); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_24 = PyNumber_Multiply(__pyx_t_30, __pyx_v_radial_vec); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = PyNumber_Subtract(__pyx_v_pt1, __pyx_t_24); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = PyList_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_30); PyList_SET_ITEM(__pyx_t_24, 1, __pyx_t_30); __pyx_t_8 = 0; __pyx_t_30 = 0; __pyx_t_30 = __Pyx_PyInt_From_int(__pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(__pyx_v_neighbor_left, ((PyObject*)__pyx_t_24), 0.0)); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF_SET(__pyx_v_my_corner_count, __pyx_t_30); __pyx_t_30 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":481 * # CTNG:outsidecorners * my_corner_count = count_outside(neighbor_left, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], 0) * corner_count = my_corner_count + count_outside(cone, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], 0) # <<<<<<<<<<<<<< * * # if corner_count == 0, then probably all nan's from size 0 meeting size 0; ignore */ __pyx_t_30 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_24 = PyNumber_Multiply(__pyx_t_30, __pyx_v_nradial_vec); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = PyNumber_Add(__pyx_v_pt1, __pyx_t_24); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_8 = PyNumber_Multiply(__pyx_t_24, __pyx_v_nradial_vec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = PyNumber_Subtract(__pyx_v_pt1, __pyx_t_8); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_30); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_24); __pyx_t_30 = 0; __pyx_t_24 = 0; __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(__pyx_v_cone, ((PyObject*)__pyx_t_8), 0.0)); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_v_my_corner_count, __pyx_t_24); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF_SET(__pyx_v_corner_count, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":487 * # if corner_count not in (1, 2, 3, 4): * # print 'corner_count: ', corner_count, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec] + [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec] * if corner_count == 2: # <<<<<<<<<<<<<< * # CTNG:2outside * # add clipped sphere; same rule if sharp or mild turn */ __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_corner_count, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":490 * # CTNG:2outside * # add clipped sphere; same rule if sharp or mild turn * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) # <<<<<<<<<<<<<< * elif corner_count == 3: * sp = Sphere(x1, y1, z1, r1) */ __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outside(__pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_r0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r1, __pyx_v_x2, __pyx_v_y2, __pyx_v_z2, __pyx_v_r2, __pyx_v_dx); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_24 = PyNumber_InPlaceAdd(__pyx_v_objects, __pyx_t_8); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_objects, ((PyObject*)__pyx_t_24)); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":487 * # if corner_count not in (1, 2, 3, 4): * # print 'corner_count: ', corner_count, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec] + [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec] * if corner_count == 2: # <<<<<<<<<<<<<< * # CTNG:2outside * # add clipped sphere; same rule if sharp or mild turn */ goto __pyx_L75; } /* "neuron/rxd/geometry3d/ctng.pyx":491 * # add clipped sphere; same rule if sharp or mild turn * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * elif corner_count == 3: # <<<<<<<<<<<<<< * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: */ __pyx_t_24 = __Pyx_PyInt_EqObjC(__pyx_v_corner_count, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":492 * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * elif corner_count == 3: * sp = Sphere(x1, y1, z1, r1) # <<<<<<<<<<<<<< * if sharp_turn: * # CTNG:3outobtuse */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sphere); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_13 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_14, __pyx_t_31); __pyx_t_30 = 0; __pyx_t_25 = 0; __pyx_t_7 = 0; __pyx_t_31 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_sp, __pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":493 * elif corner_count == 3: * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: # <<<<<<<<<<<<<< * # CTNG:3outobtuse * if my_corner_count == 1: */ __pyx_t_3 = (__pyx_v_sharp_turn != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":495 * if sharp_turn: * # CTNG:3outobtuse * if my_corner_count == 1: # <<<<<<<<<<<<<< * sp.set_clip([Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])]) * else: */ __pyx_t_24 = __Pyx_PyInt_EqObjC(__pyx_v_my_corner_count, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":496 * # CTNG:3outobtuse * if my_corner_count == 1: * sp.set_clip([Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])]) # <<<<<<<<<<<<<< * else: * sp.set_clip([Plane(x1, y1, z1, axis[0], axis[1], axis[2])]) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_31 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_naxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = PyNumber_Negative(__pyx_t_13); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_naxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyNumber_Negative(__pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_naxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = PyNumber_Negative(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_14 = 1; } } __pyx_t_11 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_14, __pyx_t_4); __pyx_t_7 = 0; __pyx_t_25 = 0; __pyx_t_30 = 0; __pyx_t_22 = 0; __pyx_t_12 = 0; __pyx_t_4 = 0; __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = PyList_New(1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_31, 0, __pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_18) { __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_31); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_GOTREF(__pyx_t_24); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_18); __pyx_t_18 = NULL; __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_31); __pyx_t_31 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":495 * if sharp_turn: * # CTNG:3outobtuse * if my_corner_count == 1: # <<<<<<<<<<<<<< * sp.set_clip([Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])]) * else: */ goto __pyx_L77; } /* "neuron/rxd/geometry3d/ctng.pyx":498 * sp.set_clip([Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])]) * else: * sp.set_clip([Plane(x1, y1, z1, axis[0], axis[1], axis[2])]) # <<<<<<<<<<<<<< * objects.append(sp) * else: */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_31 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_axis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_30 = __Pyx_GetItemInt(__pyx_v_axis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_30 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_30); __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_axis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_25 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_25); __pyx_t_7 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_14 = 1; } } __pyx_t_13 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_13, 4+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_13, 5+__pyx_t_14, __pyx_t_25); __pyx_t_18 = 0; __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_22 = 0; __pyx_t_30 = 0; __pyx_t_25 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = PyList_New(1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_31, 0, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_11) { __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_31); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_GOTREF(__pyx_t_24); } else { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_31); __pyx_t_31 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; } __pyx_L77:; /* "neuron/rxd/geometry3d/ctng.pyx":499 * else: * sp.set_clip([Plane(x1, y1, z1, axis[0], axis[1], axis[2])]) * objects.append(sp) # <<<<<<<<<<<<<< * else: * # CTNG:3outacute */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_sp); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":493 * elif corner_count == 3: * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: # <<<<<<<<<<<<<< * # CTNG:3outobtuse * if my_corner_count == 1: */ goto __pyx_L76; } /* "neuron/rxd/geometry3d/ctng.pyx":502 * else: * # CTNG:3outacute * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) # <<<<<<<<<<<<<< * with cython.wraparound(True): * if my_corner_count == 1: */ /*else*/ { __pyx_t_24 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outside(__pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_r0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r1, __pyx_v_x2, __pyx_v_y2, __pyx_v_z2, __pyx_v_r2, __pyx_v_dx); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_objects, __pyx_t_24); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF_SET(__pyx_v_objects, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":504 * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * with cython.wraparound(True): * if my_corner_count == 1: # <<<<<<<<<<<<<< * objects.append(tangent_sphere(neighbor_left, 1)) * objects[-1].set_clip([Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2])]) */ __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_my_corner_count, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":505 * with cython.wraparound(True): * if my_corner_count == 1: * objects.append(tangent_sphere(neighbor_left, 1)) # <<<<<<<<<<<<<< * objects[-1].set_clip([Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2])]) * else: */ __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_tangent_sphere(__pyx_v_neighbor_left, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_8); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":506 * if my_corner_count == 1: * objects.append(tangent_sphere(neighbor_left, 1)) * objects[-1].set_clip([Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2])]) # <<<<<<<<<<<<<< * else: * objects.append(tangent_sphere(cone, 0)) */ __pyx_t_24 = __Pyx_GetItemInt_List(__pyx_v_objects, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(__pyx_t_24 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_24); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_31 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_naxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_naxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_naxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_14 = 1; } } __pyx_t_7 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_14, __pyx_t_4); __pyx_t_11 = 0; __pyx_t_25 = 0; __pyx_t_30 = 0; __pyx_t_22 = 0; __pyx_t_12 = 0; __pyx_t_4 = 0; __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_7, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = PyList_New(1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_31, 0, __pyx_t_24); __pyx_t_24 = 0; __pyx_t_24 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_24)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (!__pyx_t_24) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_31); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_24); __pyx_t_24 = NULL; __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_31); __pyx_t_31 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":504 * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * with cython.wraparound(True): * if my_corner_count == 1: # <<<<<<<<<<<<<< * objects.append(tangent_sphere(neighbor_left, 1)) * objects[-1].set_clip([Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2])]) */ goto __pyx_L78; } /* "neuron/rxd/geometry3d/ctng.pyx":508 * objects[-1].set_clip([Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2])]) * else: * objects.append(tangent_sphere(cone, 0)) # <<<<<<<<<<<<<< * objects[-1].set_clip([Plane(x0, y0, z0, -axis[0], -axis[1], -axis[2])]) * */ /*else*/ { __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_tangent_sphere(__pyx_v_cone, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_t_8); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":509 * else: * objects.append(tangent_sphere(cone, 0)) * objects[-1].set_clip([Plane(x0, y0, z0, -axis[0], -axis[1], -axis[2])]) # <<<<<<<<<<<<<< * * */ __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_objects, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_31 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_axis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_30 = PyNumber_Negative(__pyx_t_22); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_axis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_25 = PyNumber_Negative(__pyx_t_22); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_axis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_11 = PyNumber_Negative(__pyx_t_22); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_18, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 5+__pyx_t_14, __pyx_t_11); __pyx_t_24 = 0; __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_30 = 0; __pyx_t_25 = 0; __pyx_t_11 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_18, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = PyList_New(1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_31, 0, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_13) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_31); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_31); __pyx_t_31 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L78:; } __pyx_L76:; /* "neuron/rxd/geometry3d/ctng.pyx":491 * # add clipped sphere; same rule if sharp or mild turn * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * elif corner_count == 3: # <<<<<<<<<<<<<< * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: */ goto __pyx_L75; } /* "neuron/rxd/geometry3d/ctng.pyx":513 * * * elif corner_count == 4: # <<<<<<<<<<<<<< * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: */ __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_corner_count, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":514 * * elif corner_count == 4: * sp = Sphere(x1, y1, z1, r1) # <<<<<<<<<<<<<< * if sharp_turn: * # CTNG:4outobtuse */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sphere); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_25 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_25)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_14 = 1; } } __pyx_t_30 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); if (__pyx_t_25) { __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_25); __pyx_t_25 = NULL; } __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_30, 0+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_30, 1+__pyx_t_14, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_30, 2+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_30, 3+__pyx_t_14, __pyx_t_11); __pyx_t_18 = 0; __pyx_t_31 = 0; __pyx_t_13 = 0; __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_30, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_sp, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":515 * elif corner_count == 4: * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: # <<<<<<<<<<<<<< * # CTNG:4outobtuse * # join with the portions of a sphere that are outside at least one of the planes */ __pyx_t_3 = (__pyx_v_sharp_turn != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":518 * # CTNG:4outobtuse * # join with the portions of a sphere that are outside at least one of the planes * sp.set_clip([Union([ # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sp, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_Union); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); /* "neuron/rxd/geometry3d/ctng.pyx":519 * # join with the portions of a sphere that are outside at least one of the planes * sp.set_clip([Union([ * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * objects.append(sp) */ __pyx_t_31 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_axis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_24 = __Pyx_GetItemInt(__pyx_v_axis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_24 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_24); __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_axis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_22); __pyx_t_26 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_14 = 1; } } __pyx_t_32 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_32, 0+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_32, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_32, 2+__pyx_t_14, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_32, 3+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_32, 4+__pyx_t_14, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_32, 5+__pyx_t_14, __pyx_t_22); __pyx_t_18 = 0; __pyx_t_25 = 0; __pyx_t_12 = 0; __pyx_t_4 = 0; __pyx_t_24 = 0; __pyx_t_22 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_32, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":520 * sp.set_clip([Union([ * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) # <<<<<<<<<<<<<< * objects.append(sp) * else: */ __pyx_t_32 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __pyx_t_22 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_naxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_25 = PyNumber_Negative(__pyx_t_12); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_naxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_18 = PyNumber_Negative(__pyx_t_12); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_naxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); __pyx_t_26 = PyNumber_Negative(__pyx_t_12); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_32))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_32); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_32); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_32, function); __pyx_t_14 = 1; } } __pyx_t_33 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_33, 0+__pyx_t_14, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_33, 1+__pyx_t_14, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_33, 2+__pyx_t_14, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_33, 3+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_33, 4+__pyx_t_14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_33, 5+__pyx_t_14, __pyx_t_26); __pyx_t_22 = 0; __pyx_t_24 = 0; __pyx_t_4 = 0; __pyx_t_25 = 0; __pyx_t_18 = 0; __pyx_t_26 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_32, __pyx_t_33, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":518 * # CTNG:4outobtuse * # join with the portions of a sphere that are outside at least one of the planes * sp.set_clip([Union([ # <<<<<<<<<<<<<< * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) */ __pyx_t_32 = PyList_New(2); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_32, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_31); PyList_SET_ITEM(__pyx_t_32, 1, __pyx_t_31); __pyx_t_13 = 0; __pyx_t_31 = 0; __pyx_t_31 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_31)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_31); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_31) { __pyx_t_30 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_32); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; __Pyx_GOTREF(__pyx_t_30); } else { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_31); __pyx_t_31 = NULL; __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_32); __pyx_t_32 = 0; __pyx_t_30 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_30); PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_30); __pyx_t_30 = 0; __pyx_t_30 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_30)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_30) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_30); __pyx_t_30 = NULL; __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":521 * Plane(x1, y1, z1, axis[0], axis[1], axis[2]), * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * objects.append(sp) # <<<<<<<<<<<<<< * else: * # CTNG:4outacute (+ 1 more) */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objects, __pyx_v_sp); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":515 * elif corner_count == 4: * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: # <<<<<<<<<<<<<< * # CTNG:4outobtuse * # join with the portions of a sphere that are outside at least one of the planes */ goto __pyx_L79; } /* "neuron/rxd/geometry3d/ctng.pyx":525 * # CTNG:4outacute (+ 1 more) * # join with the portions of a sphere that are outside both planes * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) # <<<<<<<<<<<<<< * # AND clip the cone to not extend pass the union of the neighbor's plane and the neighbor * if r0 == r1: */ /*else*/ { __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outside(__pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_r0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r1, __pyx_v_x2, __pyx_v_y2, __pyx_v_z2, __pyx_v_r2, __pyx_v_dx); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_objects, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_objects, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":527 * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * # AND clip the cone to not extend pass the union of the neighbor's plane and the neighbor * if r0 == r1: # <<<<<<<<<<<<<< * neighbor_copy = Cylinder(x0, y0, z0, x1, y1, z1, r0) * else: */ __pyx_t_3 = ((__pyx_v_r0 == __pyx_v_r1) != 0); if (__pyx_t_3) { /* "neuron/rxd/geometry3d/ctng.pyx":528 * # AND clip the cone to not extend pass the union of the neighbor's plane and the neighbor * if r0 == r1: * neighbor_copy = Cylinder(x0, y0, z0, x1, y1, z1, r0) # <<<<<<<<<<<<<< * else: * neighbor_copy = Cone(x0, y0, z0, r0, x1, y1, z1, r1) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cylinder); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_32 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_33 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_r0); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_25 = PyTuple_New(7+__pyx_t_14); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_25, 2+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_25, 3+__pyx_t_14, __pyx_t_32); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_25, 4+__pyx_t_14, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_25, 5+__pyx_t_14, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_25, 6+__pyx_t_14, __pyx_t_26); __pyx_t_13 = 0; __pyx_t_11 = 0; __pyx_t_30 = 0; __pyx_t_32 = 0; __pyx_t_31 = 0; __pyx_t_33 = 0; __pyx_t_26 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_neighbor_copy, __pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":527 * objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) * # AND clip the cone to not extend pass the union of the neighbor's plane and the neighbor * if r0 == r1: # <<<<<<<<<<<<<< * neighbor_copy = Cylinder(x0, y0, z0, x1, y1, z1, r0) * else: */ goto __pyx_L80; } /* "neuron/rxd/geometry3d/ctng.pyx":530 * neighbor_copy = Cylinder(x0, y0, z0, x1, y1, z1, r0) * else: * neighbor_copy = Cone(x0, y0, z0, r0, x1, y1, z1, r1) # <<<<<<<<<<<<<< * clips.append(Union([ * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2]), */ /*else*/ { __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cone); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_33 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_r0); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_32 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_r1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_4 = PyTuple_New(8+__pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_14, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_14, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_4, 4+__pyx_t_14, __pyx_t_32); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_4, 5+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 6+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_4, 7+__pyx_t_14, __pyx_t_13); __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_33 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_30 = 0; __pyx_t_11 = 0; __pyx_t_13 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_neighbor_copy, __pyx_t_7); __pyx_t_7 = 0; } __pyx_L80:; /* "neuron/rxd/geometry3d/ctng.pyx":531 * else: * neighbor_copy = Cone(x0, y0, z0, r0, x1, y1, z1, r1) * clips.append(Union([ # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2]), * neighbor_copy])) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Union); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "neuron/rxd/geometry3d/ctng.pyx":532 * neighbor_copy = Cone(x0, y0, z0, r0, x1, y1, z1, r1) * clips.append(Union([ * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2]), # <<<<<<<<<<<<<< * neighbor_copy])) * */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_32 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __pyx_t_31 = __Pyx_GetItemInt(__pyx_v_naxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_31 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_31); __pyx_t_33 = PyNumber_Negative(__pyx_t_31); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = __Pyx_GetItemInt(__pyx_v_naxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_31 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_31); __pyx_t_26 = PyNumber_Negative(__pyx_t_31); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = __Pyx_GetItemInt(__pyx_v_naxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_31 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_31); __pyx_t_25 = PyNumber_Negative(__pyx_t_31); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_31 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_31)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_31); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_31) { __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_31); __pyx_t_31 = NULL; } __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_14, __pyx_t_32); __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_14, __pyx_t_33); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_18, 4+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_18, 5+__pyx_t_14, __pyx_t_25); __pyx_t_11 = 0; __pyx_t_30 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":531 * else: * neighbor_copy = Cone(x0, y0, z0, r0, x1, y1, z1, r1) * clips.append(Union([ # <<<<<<<<<<<<<< * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2]), * neighbor_copy])) */ __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __Pyx_INCREF(__pyx_v_neighbor_copy); __Pyx_GIVEREF(__pyx_v_neighbor_copy); PyList_SET_ITEM(__pyx_t_13, 1, __pyx_v_neighbor_copy); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_clips, __pyx_t_7); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L79:; /* "neuron/rxd/geometry3d/ctng.pyx":513 * * * elif corner_count == 4: # <<<<<<<<<<<<<< * sp = Sphere(x1, y1, z1, r1) * if sharp_turn: */ } __pyx_L75:; } __pyx_L74:; } __pyx_L72:; /* "neuron/rxd/geometry3d/ctng.pyx":445 * join_item = None * # process the join on the "left" (end 1) * if neighbor_left is not None: # <<<<<<<<<<<<<< * # any joins are created on the left pass; the right pass will only do clippings * x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 */ } /* "neuron/rxd/geometry3d/ctng.pyx":542 * * * if neighbor_right is not None: # <<<<<<<<<<<<<< * # any joins are created on the left pass; the right pass will only do clippings * x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 */ __pyx_t_3 = (__pyx_v_neighbor_right != Py_None); __pyx_t_21 = (__pyx_t_3 != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":544 * if neighbor_right is not None: * # any joins are created on the left pass; the right pass will only do clippings * x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 # <<<<<<<<<<<<<< * if x2 == x3 and y2 == y3 and z2 == z3: * x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_x0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_y0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_z0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_r0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_v_x3 = __pyx_t_15; __pyx_v_y3 = __pyx_t_16; __Pyx_XDECREF_SET(__pyx_v_z3, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_r3, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":545 * # any joins are created on the left pass; the right pass will only do clippings * x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 * if x2 == x3 and y2 == y3 and z2 == z3: # <<<<<<<<<<<<<< * x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 * pt3 = numpy.array([x3, y3, z3]) */ __pyx_t_3 = ((__pyx_v_x2 == __pyx_v_x3) != 0); if (__pyx_t_3) { } else { __pyx_t_21 = __pyx_t_3; goto __pyx_L83_bool_binop_done; } __pyx_t_3 = ((__pyx_v_y2 == __pyx_v_y3) != 0); if (__pyx_t_3) { } else { __pyx_t_21 = __pyx_t_3; goto __pyx_L83_bool_binop_done; } __pyx_t_8 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_z3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_21 = __pyx_t_3; __pyx_L83_bool_binop_done:; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":546 * x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 * if x2 == x3 and y2 == y3 and z2 == z3: * x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 # <<<<<<<<<<<<<< * pt3 = numpy.array([x3, y3, z3]) * naxis = (pt3 - pt2) / linalg.norm(pt3 - pt2) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_x1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_y1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_z1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_neighbor_right, __pyx_n_s_r1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_v_x3 = __pyx_t_16; __pyx_v_y3 = __pyx_t_15; __Pyx_DECREF_SET(__pyx_v_z3, __pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_r3, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":545 * # any joins are created on the left pass; the right pass will only do clippings * x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 * if x2 == x3 and y2 == y3 and z2 == z3: # <<<<<<<<<<<<<< * x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 * pt3 = numpy.array([x3, y3, z3]) */ } /* "neuron/rxd/geometry3d/ctng.pyx":547 * if x2 == x3 and y2 == y3 and z2 == z3: * x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 * pt3 = numpy.array([x3, y3, z3]) # <<<<<<<<<<<<<< * naxis = (pt3 - pt2) / linalg.norm(pt3 - pt2) * */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble(__pyx_v_x3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_y3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_13); __Pyx_INCREF(__pyx_v_z3); __Pyx_GIVEREF(__pyx_v_z3); PyList_SET_ITEM(__pyx_t_4, 2, __pyx_v_z3); __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); } } if (!__pyx_t_13) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_pt3, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":548 * x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 * pt3 = numpy.array([x3, y3, z3]) * naxis = (pt3 - pt2) / linalg.norm(pt3 - pt2) # <<<<<<<<<<<<<< * * # no need to clip if the cones are perfectly aligned */ __pyx_t_8 = PyNumber_Subtract(__pyx_v_pt3, __pyx_v_pt2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_norm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyNumber_Subtract(__pyx_v_pt3, __pyx_v_pt2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_13) { __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_18); } else { __pyx_t_25 = PyTuple_New(1+1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_25, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_25, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_18); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_naxis, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":551 * * # no need to clip if the cones are perfectly aligned * if any(axis != naxis): # <<<<<<<<<<<<<< * # locate key vectors * plane_normal = numpy.cross(axis, naxis) */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_axis, __pyx_v_naxis, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_any, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":553 * if any(axis != naxis): * # locate key vectors * plane_normal = numpy.cross(axis, naxis) # <<<<<<<<<<<<<< * radial_vec = numpy.cross(plane_normal, axis) * radial_vec_norm = linalg.norm(radial_vec) */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_cross); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_25 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_INCREF(__pyx_v_axis); __Pyx_GIVEREF(__pyx_v_axis); PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_14, __pyx_v_axis); __Pyx_INCREF(__pyx_v_naxis); __Pyx_GIVEREF(__pyx_v_naxis); PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_14, __pyx_v_naxis); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_plane_normal, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":554 * # locate key vectors * plane_normal = numpy.cross(axis, naxis) * radial_vec = numpy.cross(plane_normal, axis) # <<<<<<<<<<<<<< * radial_vec_norm = linalg.norm(radial_vec) * */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_cross); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_25); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_25, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_plane_normal); __Pyx_GIVEREF(__pyx_v_plane_normal); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_v_plane_normal); __Pyx_INCREF(__pyx_v_axis); __Pyx_GIVEREF(__pyx_v_axis); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_v_axis); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_XDECREF_SET(__pyx_v_radial_vec, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":555 * plane_normal = numpy.cross(axis, naxis) * radial_vec = numpy.cross(plane_normal, axis) * radial_vec_norm = linalg.norm(radial_vec) # <<<<<<<<<<<<<< * * # we check again because sometimes there are roundoff errors that this catches */ __pyx_t_25 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_norm); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_25)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); } } if (!__pyx_t_25) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_radial_vec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_25); __pyx_t_25 = NULL; __Pyx_INCREF(__pyx_v_radial_vec); __Pyx_GIVEREF(__pyx_v_radial_vec); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_radial_vec); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_radial_vec_norm, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":558 * * # we check again because sometimes there are roundoff errors that this catches * if radial_vec_norm: # <<<<<<<<<<<<<< * * # is the turn sharp or not */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_radial_vec_norm); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":561 * * # is the turn sharp or not * sharp_turn = numpy.dot(axis, naxis) < 0 # <<<<<<<<<<<<<< * * nradial_vec = numpy.cross(plane_normal, naxis) */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_dot); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_25 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_INCREF(__pyx_v_axis); __Pyx_GIVEREF(__pyx_v_axis); PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_14, __pyx_v_axis); __Pyx_INCREF(__pyx_v_naxis); __Pyx_GIVEREF(__pyx_v_naxis); PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_14, __pyx_v_naxis); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_sharp_turn = __pyx_t_21; /* "neuron/rxd/geometry3d/ctng.pyx":563 * sharp_turn = numpy.dot(axis, naxis) < 0 * * nradial_vec = numpy.cross(plane_normal, naxis) # <<<<<<<<<<<<<< * # normalize all of these * radial_vec /= radial_vec_norm */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cross); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_25); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_25, function); __pyx_t_14 = 1; } } __pyx_t_18 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_plane_normal); __Pyx_GIVEREF(__pyx_v_plane_normal); PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_14, __pyx_v_plane_normal); __Pyx_INCREF(__pyx_v_naxis); __Pyx_GIVEREF(__pyx_v_naxis); PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_14, __pyx_v_naxis); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_XDECREF_SET(__pyx_v_nradial_vec, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":565 * nradial_vec = numpy.cross(plane_normal, naxis) * # normalize all of these * radial_vec /= radial_vec_norm # <<<<<<<<<<<<<< * nradial_vec /= linalg.norm(nradial_vec) * # count the corners that are inside the other cone (for both ways) */ __pyx_t_8 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_radial_vec, __pyx_v_radial_vec_norm); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_radial_vec, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":566 * # normalize all of these * radial_vec /= radial_vec_norm * nradial_vec /= linalg.norm(nradial_vec) # <<<<<<<<<<<<<< * # count the corners that are inside the other cone (for both ways) * my_corner_count = count_outside(neighbor_right, [pt2 + r2 * radial_vec, pt2 - r2 * radial_vec], 0) */ __pyx_t_25 = __Pyx_GetModuleGlobalName(__pyx_n_s_linalg); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_norm); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __pyx_t_25 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_25)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); } } if (!__pyx_t_25) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_nradial_vec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_25); __pyx_t_25 = NULL; __Pyx_INCREF(__pyx_v_nradial_vec); __Pyx_GIVEREF(__pyx_v_nradial_vec); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_nradial_vec); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = __Pyx_PyNumber_InPlaceDivide(__pyx_v_nradial_vec, __pyx_t_8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_nradial_vec, __pyx_t_18); __pyx_t_18 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":568 * nradial_vec /= linalg.norm(nradial_vec) * # count the corners that are inside the other cone (for both ways) * my_corner_count = count_outside(neighbor_right, [pt2 + r2 * radial_vec, pt2 - r2 * radial_vec], 0) # <<<<<<<<<<<<<< * corner_count = my_corner_count + count_outside(cone, [pt2 + r2 * nradial_vec, pt2 - r2 * nradial_vec], 0) * if corner_count == 2: */ __pyx_t_18 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = PyNumber_Multiply(__pyx_t_18, __pyx_v_radial_vec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Add(__pyx_v_pt2, __pyx_t_8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyNumber_Multiply(__pyx_t_8, __pyx_v_radial_vec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Subtract(__pyx_v_pt2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); __pyx_t_18 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(__pyx_v_neighbor_right, ((PyObject*)__pyx_t_4), 0.0)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_my_corner_count, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":569 * # count the corners that are inside the other cone (for both ways) * my_corner_count = count_outside(neighbor_right, [pt2 + r2 * radial_vec, pt2 - r2 * radial_vec], 0) * corner_count = my_corner_count + count_outside(cone, [pt2 + r2 * nradial_vec, pt2 - r2 * nradial_vec], 0) # <<<<<<<<<<<<<< * if corner_count == 2: * # no clipping; already joined */ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = PyNumber_Multiply(__pyx_t_8, __pyx_v_nradial_vec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_Add(__pyx_v_pt2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_18 = PyNumber_Multiply(__pyx_t_4, __pyx_v_nradial_vec); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Subtract(__pyx_v_pt2, __pyx_t_18); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyList_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_18, 1, __pyx_t_4); __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outside(__pyx_v_cone, ((PyObject*)__pyx_t_18), 0.0)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Add(__pyx_v_my_corner_count, __pyx_t_4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_corner_count, __pyx_t_18); __pyx_t_18 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":570 * my_corner_count = count_outside(neighbor_right, [pt2 + r2 * radial_vec, pt2 - r2 * radial_vec], 0) * corner_count = my_corner_count + count_outside(cone, [pt2 + r2 * nradial_vec, pt2 - r2 * nradial_vec], 0) * if corner_count == 2: # <<<<<<<<<<<<<< * # no clipping; already joined * pass */ __pyx_t_18 = __Pyx_PyInt_EqObjC(__pyx_v_corner_count, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_21) { goto __pyx_L88; } /* "neuron/rxd/geometry3d/ctng.pyx":573 * # no clipping; already joined * pass * elif corner_count == 3: # <<<<<<<<<<<<<< * pass * */ __pyx_t_18 = __Pyx_PyInt_EqObjC(__pyx_v_corner_count, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_21) { goto __pyx_L88; } /* "neuron/rxd/geometry3d/ctng.pyx":576 * pass * * elif corner_count == 4: # <<<<<<<<<<<<<< * # CTNG:4outacute (+ 1 more) * # already joined; just clip (only in mild turn case) */ __pyx_t_18 = __Pyx_PyInt_EqObjC(__pyx_v_corner_count, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":579 * # CTNG:4outacute (+ 1 more) * # already joined; just clip (only in mild turn case) * if not sharp_turn: # <<<<<<<<<<<<<< * if r2 == r3: * neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) */ __pyx_t_21 = ((!(__pyx_v_sharp_turn != 0)) != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":580 * # already joined; just clip (only in mild turn case) * if not sharp_turn: * if r2 == r3: # <<<<<<<<<<<<<< * neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) * else: */ __pyx_t_18 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_4 = PyObject_RichCompare(__pyx_t_18, __pyx_v_r3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":581 * if not sharp_turn: * if r2 == r3: * neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) # <<<<<<<<<<<<<< * else: * neighbor_copy = Cone(x2, y2, z2, r2, x3, y3, z3, r3) */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cylinder); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_x3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_y3); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_33 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_33 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_33)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_33); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); __pyx_t_14 = 1; } } __pyx_t_32 = PyTuple_New(7+__pyx_t_14); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); if (__pyx_t_33) { __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_33); __pyx_t_33 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_32, 0+__pyx_t_14, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_32, 1+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_32, 2+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_32, 3+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_32, 4+__pyx_t_14, __pyx_t_26); __Pyx_INCREF(__pyx_v_z3); __Pyx_GIVEREF(__pyx_v_z3); PyTuple_SET_ITEM(__pyx_t_32, 5+__pyx_t_14, __pyx_v_z3); __Pyx_INCREF(__pyx_v_r3); __Pyx_GIVEREF(__pyx_v_r3); PyTuple_SET_ITEM(__pyx_t_32, 6+__pyx_t_14, __pyx_v_r3); __pyx_t_8 = 0; __pyx_t_25 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_26 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_32, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_neighbor_copy, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":580 * # already joined; just clip (only in mild turn case) * if not sharp_turn: * if r2 == r3: # <<<<<<<<<<<<<< * neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) * else: */ goto __pyx_L90; } /* "neuron/rxd/geometry3d/ctng.pyx":583 * neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) * else: * neighbor_copy = Cone(x2, y2, z2, r2, x3, y3, z3, r3) # <<<<<<<<<<<<<< * #print 'cc=4: (%g, %g, %g; %g) (%g, %g, %g; %g) (%g, %g, %g; %g) ' % (x1, y1, z1, r1, x2, y2, z2, r2, x3, y3, z3, r3) * clips.append(Union([ */ /*else*/ { __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cone); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_32 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_r2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_x3); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_y3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_33 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_33 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_33)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_33); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); __pyx_t_14 = 1; } } __pyx_t_30 = PyTuple_New(8+__pyx_t_14); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); if (__pyx_t_33) { __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_33); __pyx_t_33 = NULL; } __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_30, 0+__pyx_t_14, __pyx_t_32); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_30, 1+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_30, 2+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_30, 3+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_30, 4+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_30, 5+__pyx_t_14, __pyx_t_8); __Pyx_INCREF(__pyx_v_z3); __Pyx_GIVEREF(__pyx_v_z3); PyTuple_SET_ITEM(__pyx_t_30, 6+__pyx_t_14, __pyx_v_z3); __Pyx_INCREF(__pyx_v_r3); __Pyx_GIVEREF(__pyx_v_r3); PyTuple_SET_ITEM(__pyx_t_30, 7+__pyx_t_14, __pyx_v_r3); __pyx_t_32 = 0; __pyx_t_26 = 0; __pyx_t_13 = 0; __pyx_t_7 = 0; __pyx_t_25 = 0; __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_30, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_neighbor_copy, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L90:; /* "neuron/rxd/geometry3d/ctng.pyx":585 * neighbor_copy = Cone(x2, y2, z2, r2, x3, y3, z3, r3) * #print 'cc=4: (%g, %g, %g; %g) (%g, %g, %g; %g) (%g, %g, %g; %g) ' % (x1, y1, z1, r1, x2, y2, z2, r2, x3, y3, z3, r3) * clips.append(Union([ # <<<<<<<<<<<<<< * Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2]), * neighbor_copy])) */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_Union); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); /* "neuron/rxd/geometry3d/ctng.pyx":586 * #print 'cc=4: (%g, %g, %g; %g) (%g, %g, %g; %g) (%g, %g, %g; %g) ' % (x1, y1, z1, r1, x2, y2, z2, r2, x3, y3, z3, r3) * clips.append(Union([ * Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2]), # <<<<<<<<<<<<<< * neighbor_copy])) * */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Plane); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_25 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_naxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_32 = __Pyx_GetItemInt(__pyx_v_naxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_32 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_32); __pyx_t_33 = __Pyx_GetItemInt(__pyx_v_naxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_33 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_33); __pyx_t_11 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_14 = 1; } } __pyx_t_31 = PyTuple_New(6+__pyx_t_14); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_31, 0+__pyx_t_14, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_14, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_31, 2+__pyx_t_14, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_31, 3+__pyx_t_14, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_31, 4+__pyx_t_14, __pyx_t_32); __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_31, 5+__pyx_t_14, __pyx_t_33); __pyx_t_25 = 0; __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_26 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0; __pyx_t_30 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_31, NULL); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":585 * neighbor_copy = Cone(x2, y2, z2, r2, x3, y3, z3, r3) * #print 'cc=4: (%g, %g, %g; %g) (%g, %g, %g; %g) (%g, %g, %g; %g) ' % (x1, y1, z1, r1, x2, y2, z2, r2, x3, y3, z3, r3) * clips.append(Union([ # <<<<<<<<<<<<<< * Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2]), * neighbor_copy])) */ __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_30); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_30); __Pyx_INCREF(__pyx_v_neighbor_copy); __Pyx_GIVEREF(__pyx_v_neighbor_copy); PyList_SET_ITEM(__pyx_t_8, 1, __pyx_v_neighbor_copy); __pyx_t_30 = 0; __pyx_t_30 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_30)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); } } if (!__pyx_t_30) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_31 = PyTuple_New(1+1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_30); __pyx_t_30 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_31, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_31, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_clips, __pyx_t_4); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":579 * # CTNG:4outacute (+ 1 more) * # already joined; just clip (only in mild turn case) * if not sharp_turn: # <<<<<<<<<<<<<< * if r2 == r3: * neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) */ } /* "neuron/rxd/geometry3d/ctng.pyx":576 * pass * * elif corner_count == 4: # <<<<<<<<<<<<<< * # CTNG:4outacute (+ 1 more) * # already joined; just clip (only in mild turn case) */ } __pyx_L88:; /* "neuron/rxd/geometry3d/ctng.pyx":558 * * # we check again because sometimes there are roundoff errors that this catches * if radial_vec_norm: # <<<<<<<<<<<<<< * * # is the turn sharp or not */ } /* "neuron/rxd/geometry3d/ctng.pyx":551 * * # no need to clip if the cones are perfectly aligned * if any(axis != naxis): # <<<<<<<<<<<<<< * # locate key vectors * plane_normal = numpy.cross(axis, naxis) */ } /* "neuron/rxd/geometry3d/ctng.pyx":542 * * * if neighbor_right is not None: # <<<<<<<<<<<<<< * # any joins are created on the left pass; the right pass will only do clippings * x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 */ } /* "neuron/rxd/geometry3d/ctng.pyx":594 * * * if clips: # <<<<<<<<<<<<<< * int_clip = Intersection(clips) * cone_clip_db[cone].append(int_clip) */ __pyx_t_21 = (__pyx_v_clips != Py_None) && (PyList_GET_SIZE(__pyx_v_clips) != 0); if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":595 * * if clips: * int_clip = Intersection(clips) # <<<<<<<<<<<<<< * cone_clip_db[cone].append(int_clip) * */ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_Intersection); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_31 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_18); if (likely(__pyx_t_31)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_31); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_18, function); } } if (!__pyx_t_31) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_clips); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_31); __pyx_t_31 = NULL; __Pyx_INCREF(__pyx_v_clips); __Pyx_GIVEREF(__pyx_v_clips); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_clips); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF_SET(__pyx_v_int_clip, __pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":596 * if clips: * int_clip = Intersection(clips) * cone_clip_db[cone].append(int_clip) # <<<<<<<<<<<<<< * * for cone in all_cones: */ if (unlikely(__pyx_v_cone_clip_db == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_cone_clip_db, __pyx_v_cone); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_int_clip); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":594 * * * if clips: # <<<<<<<<<<<<<< * int_clip = Intersection(clips) * cone_clip_db[cone].append(int_clip) */ } /* "neuron/rxd/geometry3d/ctng.pyx":440 * if not left_neighbors: left_neighbors = [None] * if not right_neighbors: right_neighbors = [None] * for neighbor_left, neighbor_right in itertools.product(left_neighbors, right_neighbors): # <<<<<<<<<<<<<< * clips = [] * # if any join needs to be subject to clips, it goes here */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":428 * # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} * join_items_needing_clipped = [] * for cone in all_cones: # <<<<<<<<<<<<<< * x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 * x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 */ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":598 * cone_clip_db[cone].append(int_clip) * * for cone in all_cones: # <<<<<<<<<<<<<< * clip = cone_clip_db[cone] * if clip: */ if (unlikely(!__pyx_cur_scope->__pyx_v_all_cones)) { __Pyx_RaiseUnboundLocalError("all_cones"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __pyx_cur_scope->__pyx_v_all_cones; __Pyx_INCREF(__pyx_t_10); __pyx_t_27 = 0; for (;;) { if (__pyx_t_27 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_27); __Pyx_INCREF(__pyx_t_1); __pyx_t_27++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_27); __pyx_t_27++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_cone, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":599 * * for cone in all_cones: * clip = cone_clip_db[cone] # <<<<<<<<<<<<<< * if clip: * cone.set_clip([Union(clip)]) */ if (unlikely(__pyx_v_cone_clip_db == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_cone_clip_db, __pyx_v_cone); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":600 * for cone in all_cones: * clip = cone_clip_db[cone] * if clip: # <<<<<<<<<<<<<< * cone.set_clip([Union(clip)]) * */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_clip); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_21) { /* "neuron/rxd/geometry3d/ctng.pyx":601 * clip = cone_clip_db[cone] * if clip: * cone.set_clip([Union(clip)]) # <<<<<<<<<<<<<< * * # clip long joins against the extreme edges */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cone, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Union); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_31 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_31)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_31); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_31) { __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_clip); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); } else { __pyx_t_30 = PyTuple_New(1+1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_31); __pyx_t_31 = NULL; __Pyx_INCREF(__pyx_v_clip); __Pyx_GIVEREF(__pyx_v_clip); PyTuple_SET_ITEM(__pyx_t_30, 0+1, __pyx_v_clip); __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_30, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_18) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_30 = PyTuple_New(1+1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_18); __pyx_t_18 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_30, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_30, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":600 * for cone in all_cones: * clip = cone_clip_db[cone] * if clip: # <<<<<<<<<<<<<< * cone.set_clip([Union(clip)]) * */ } /* "neuron/rxd/geometry3d/ctng.pyx":598 * cone_clip_db[cone].append(int_clip) * * for cone in all_cones: # <<<<<<<<<<<<<< * clip = cone_clip_db[cone] * if clip: */ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":604 * * # clip long joins against the extreme edges * for join_item, left, right in join_items_needing_clipped: # <<<<<<<<<<<<<< * if left: clip = left.get_clip() * if right: clip += right.get_clip() */ __pyx_t_10 = __pyx_v_join_items_needing_clipped; __Pyx_INCREF(__pyx_t_10); __pyx_t_27 = 0; for (;;) { if (__pyx_t_27 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_27); __Pyx_INCREF(__pyx_t_1); __pyx_t_27++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_27); __pyx_t_27++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_30 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_30 = PyList_GET_ITEM(sequence, 1); __pyx_t_8 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_30 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_18)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_4)) goto __pyx_L97_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_30 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_30)) goto __pyx_L97_unpacking_failed; __Pyx_GOTREF(__pyx_t_30); index = 2; __pyx_t_8 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_8)) goto __pyx_L97_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L98_unpacking_done; __pyx_L97_unpacking_failed:; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L98_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_join_item, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_left, __pyx_t_30); __pyx_t_30 = 0; __Pyx_XDECREF_SET(__pyx_v_right, __pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":605 * # clip long joins against the extreme edges * for join_item, left, right in join_items_needing_clipped: * if left: clip = left.get_clip() # <<<<<<<<<<<<<< * if right: clip += right.get_clip() * join_item.set_clip(clip) */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_left); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_21) { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_get_clip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_30 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_30)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_30) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_30); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/ctng.pyx":606 * for join_item, left, right in join_items_needing_clipped: * if left: clip = left.get_clip() * if right: clip += right.get_clip() # <<<<<<<<<<<<<< * join_item.set_clip(clip) * */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_right); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_21) { if (unlikely(!__pyx_v_clip)) { __Pyx_RaiseUnboundLocalError("clip"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_get_clip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_30 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_30)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_30) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_30); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_clip, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_8); __pyx_t_8 = 0; } /* "neuron/rxd/geometry3d/ctng.pyx":607 * if left: clip = left.get_clip() * if right: clip += right.get_clip() * join_item.set_clip(clip) # <<<<<<<<<<<<<< * * ##################################################################### */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_join_item, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(!__pyx_v_clip)) { __Pyx_RaiseUnboundLocalError("clip"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_30 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_30)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_30); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_30) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_clip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_30); __pyx_t_30 = NULL; __Pyx_INCREF(__pyx_v_clip); __Pyx_GIVEREF(__pyx_v_clip); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_clip); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":604 * * # clip long joins against the extreme edges * for join_item, left, right in join_items_needing_clipped: # <<<<<<<<<<<<<< * if left: clip = left.get_clip() * if right: clip += right.get_clip() */ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":615 * ##################################################################### * * objects += all_cones # <<<<<<<<<<<<<< * * return objects */ if (unlikely(!__pyx_cur_scope->__pyx_v_all_cones)) { __Pyx_RaiseUnboundLocalError("all_cones"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_v_objects, __pyx_cur_scope->__pyx_v_all_cones); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF_SET(__pyx_v_objects, ((PyObject*)__pyx_t_10)); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":617 * objects += all_cones * * return objects # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objects); __pyx_r = __pyx_v_objects; goto __pyx_L0; /* "neuron/rxd/geometry3d/ctng.pyx":280 * @cython.wraparound(False) * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): # <<<<<<<<<<<<<< * cdef list objects = [] * cdef int i, j, k */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_24); __Pyx_XDECREF(__pyx_t_25); __Pyx_XDECREF(__pyx_t_26); __Pyx_XDECREF(__pyx_t_30); __Pyx_XDECREF(__pyx_t_31); __Pyx_XDECREF(__pyx_t_32); __Pyx_XDECREF(__pyx_t_33); __Pyx_AddTraceback("neuron.rxd.geometry3d.ctng.constructive_neuronal_geometry", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_objects); __Pyx_XDECREF(__pyx_v_f_pts); __Pyx_XDECREF(__pyx_v_branches); __Pyx_XDECREF(__pyx_v_parent_sec_name); __Pyx_XDECREF(__pyx_v_pt); __Pyx_XDECREF(__pyx_v_num_contours); __Pyx_XDECREF(__pyx_v_sec); __Pyx_XDECREF(__pyx_v_soma_sec); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_y); __Pyx_XDECREF(__pyx_v_z); __Pyx_XDECREF(__pyx_v_center_vec); __Pyx_XDECREF(__pyx_v_new_objects); __Pyx_XDECREF(__pyx_v_is_stack); __Pyx_XDECREF(__pyx_v_warnings); __Pyx_XDECREF(__pyx_v_diam_corrections); __Pyx_XDECREF(__pyx_v_clip_copying); __Pyx_XDECREF(__pyx_v_pts_cones_db); __Pyx_XDECREF(__pyx_v_diam_db); __Pyx_XDECREF(__pyx_v_branch); __Pyx_XDECREF(__pyx_v_psec); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_cp); __Pyx_XDECREF(__pyx_v_sphere_cap); __Pyx_XDECREF(__pyx_v_d0); __Pyx_XDECREF(__pyx_v_d1); __Pyx_XDECREF(__pyx_v_axisx); __Pyx_XDECREF(__pyx_v_axisy); __Pyx_XDECREF(__pyx_v_axisz); __Pyx_XDECREF(__pyx_v_deltad); __Pyx_XDECREF(__pyx_v_axislength); __Pyx_XDECREF(__pyx_v_vals); __Pyx_XDECREF(__pyx_v_cone_clip_db); __Pyx_XDECREF(__pyx_v_join_items_needing_clipped); __Pyx_XDECREF(__pyx_v_cone); __Pyx_XDECREF(__pyx_v_pt1); __Pyx_XDECREF(__pyx_v_pt2); __Pyx_XDECREF(__pyx_v_axis); __Pyx_XDECREF(__pyx_v_left_neighbors); __Pyx_XDECREF(__pyx_v_right_neighbors); __Pyx_XDECREF(__pyx_v_neighbor_left); __Pyx_XDECREF(__pyx_v_neighbor_right); __Pyx_XDECREF(__pyx_v_clips); __Pyx_XDECREF(__pyx_v_join_item); __Pyx_XDECREF(__pyx_v_pt0); __Pyx_XDECREF(__pyx_v_naxis); __Pyx_XDECREF(__pyx_v_sp); __Pyx_XDECREF(__pyx_v_plane_normal); __Pyx_XDECREF(__pyx_v_radial_vec); __Pyx_XDECREF(__pyx_v_nradial_vec); __Pyx_XDECREF(__pyx_v_my_corner_count); __Pyx_XDECREF(__pyx_v_corner_count); __Pyx_XDECREF(__pyx_v_neighbor_copy); __Pyx_XDECREF(__pyx_v_z3); __Pyx_XDECREF(__pyx_v_r3); __Pyx_XDECREF(__pyx_v_pt3); __Pyx_XDECREF(__pyx_v_radial_vec_norm); __Pyx_XDECREF(__pyx_v_int_clip); __Pyx_XDECREF(__pyx_v_clip); __Pyx_XDECREF(__pyx_v_left); __Pyx_XDECREF(__pyx_v_right); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; int __pyx_v_i; int __pyx_v_ndim; int __pyx_v_endian_detector; int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; int __pyx_v_offset; int __pyx_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":203 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":206 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":207 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * * ndim = PyArray_NDIM(self) */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":209 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":212 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ goto __pyx_L4; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":214 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ /*else*/ { __pyx_v_copy_shape = 0; } __pyx_L4:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":217 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L9_bool_binop_done; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":221 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L9_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":224 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":225 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_1 = (__pyx_v_copy_shape != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":229 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":230 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":231 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ __pyx_t_4 = __pyx_v_ndim; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":232 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":233 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ goto __pyx_L11; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":235 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":236 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } __pyx_L11:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":237 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) */ __pyx_v_info->suboffsets = NULL; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":238 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":239 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":242 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef int offset */ __pyx_v_f = NULL; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":243 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef int offset * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L15_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L15_bool_binop_done:; if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ goto __pyx_L14; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); } __pyx_L14:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): */ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); if (!__pyx_t_2) { goto __pyx_L20_next_or; } else { } __pyx_t_2 = (__pyx_v_little_endian != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_L20_next_or:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":258 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L19_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":260 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ switch (__pyx_v_t) { case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":261 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ case NPY_UBYTE: __pyx_v_f = __pyx_k_B; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":262 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ case NPY_SHORT: __pyx_v_f = __pyx_k_h; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":263 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ case NPY_USHORT: __pyx_v_f = __pyx_k_H; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":264 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ case NPY_INT: __pyx_v_f = __pyx_k_i; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":265 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ case NPY_UINT: __pyx_v_f = __pyx_k_I; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":266 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ case NPY_LONG: __pyx_v_f = __pyx_k_l; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":267 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ case NPY_ULONG: __pyx_v_f = __pyx_k_L; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":268 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ case NPY_LONGLONG: __pyx_v_f = __pyx_k_q; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":269 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ case NPY_ULONGLONG: __pyx_v_f = __pyx_k_Q; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":270 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ case NPY_FLOAT: __pyx_v_f = __pyx_k_f; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":271 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ case NPY_DOUBLE: __pyx_v_f = __pyx_k_d; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":272 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ case NPY_LONGDOUBLE: __pyx_v_f = __pyx_k_g; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":273 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ case NPY_CFLOAT: __pyx_v_f = __pyx_k_Zf; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ case NPY_CDOUBLE: __pyx_v_f = __pyx_k_Zd; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":275 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ case NPY_CLONGDOUBLE: __pyx_v_f = __pyx_k_Zg; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":276 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ case NPY_OBJECT: __pyx_v_f = __pyx_k_O; break; default: /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 */ /*else*/ { __pyx_v_info->format = ((char *)malloc(0xFF)); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":285 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_7; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = '\x00'; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* Python wrapper */ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":771 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":774 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":777 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":780 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":783 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child = 0; int __pyx_v_endian_detector; int __pyx_v_little_endian; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_childname = NULL; PyObject *__pyx_v_new_offset = NULL; PyObject *__pyx_v_t = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":790 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":791 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * cdef tuple fields * */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":795 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":796 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(__pyx_v_fields != Py_None)) { PyObject* sequence = __pyx_v_fields; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); if (!__pyx_t_7) { goto __pyx_L8_next_or; } else { } __pyx_t_7 = (__pyx_v_little_endian != 0); if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_or:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":802 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":813 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":814 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 0x78; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":815 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":816 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":818 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":821 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":826 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":827 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":828 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":829 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":830 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":831 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x66; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x64; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":841 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x67; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":842 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ /*else*/ { __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L15:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":845 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ goto __pyx_L13; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":849 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ /*else*/ { __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; } __pyx_L13:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":850 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_child); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_childname); __Pyx_XDECREF(__pyx_v_new_offset); __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ __pyx_t_1 = (__pyx_v_base == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":969 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ goto __pyx_L3; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":971 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ /*else*/ { Py_INCREF(__pyx_v_base); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":972 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< * Py_XDECREF(arr.base) * arr.base = baseptr */ __pyx_v_baseptr = ((PyObject *)__pyx_v_base); } __pyx_L3:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":973 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< * arr.base = baseptr * */ Py_XDECREF(__pyx_v_arr->base); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":974 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":978 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":980 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry[8]; static int __pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry = 0; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry)))) { o = (PyObject*)__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry[--__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry]; memset(o, 0, sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_all_cones); Py_CLEAR(p->__pyx_v_cell); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry)))) { __pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry[__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry++] = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)o; if (p->__pyx_v_all_cones) { e = (*v)(p->__pyx_v_all_cones, a); if (e) return e; } if (p->__pyx_v_cell) { e = (*v)(p->__pyx_v_cell, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)o; tmp = ((PyObject*)p->__pyx_v_all_cones); p->__pyx_v_all_cones = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_cell); p->__pyx_v_cell = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.ctng.__pyx_scope_struct__constructive_neuronal_geometry", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr[8]; static int __pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr = 0; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr)))) { o = (PyObject*)__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr[--__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_sec); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr)))) { __pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr[__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_sec) { e = (*v)(p->__pyx_v_sec, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sec); p->__pyx_v_sec = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.ctng.__pyx_scope_struct_1_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr[8]; static int __pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr = 0; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr)))) { o = (PyObject*)__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr[--__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_cone); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr)))) { __pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr[__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_cone) { e = (*v)(p->__pyx_v_cone, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_cone); p->__pyx_v_cone = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.ctng.__pyx_scope_struct_2_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "ctng", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_Cone, __pyx_k_Cone, sizeof(__pyx_k_Cone), 0, 0, 1, 1}, {&__pyx_n_s_Cylinder, __pyx_k_Cylinder, sizeof(__pyx_k_Cylinder), 0, 0, 1, 1}, {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, {&__pyx_n_s_Intersection, __pyx_k_Intersection, sizeof(__pyx_k_Intersection), 0, 0, 1, 1}, {&__pyx_n_s_Matrix, __pyx_k_Matrix, sizeof(__pyx_k_Matrix), 0, 0, 1, 1}, {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, {&__pyx_n_s_Plane, __pyx_k_Plane, sizeof(__pyx_k_Plane), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_RxDException, __pyx_k_RxDException, sizeof(__pyx_k_RxDException), 0, 0, 1, 1}, {&__pyx_n_s_SkewCone, __pyx_k_SkewCone, sizeof(__pyx_k_SkewCone), 0, 0, 1, 1}, {&__pyx_n_s_Sphere, __pyx_k_Sphere, sizeof(__pyx_k_Sphere), 0, 0, 1, 1}, {&__pyx_n_s_SphereCone, __pyx_k_SphereCone, sizeof(__pyx_k_SphereCone), 0, 0, 1, 1}, {&__pyx_n_s_Union, __pyx_k_Union, sizeof(__pyx_k_Union), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, {&__pyx_n_s_all_cones, __pyx_k_all_cones, sizeof(__pyx_k_all_cones), 0, 0, 1, 1}, {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1}, {&__pyx_n_s_axislength, __pyx_k_axislength, sizeof(__pyx_k_axislength), 0, 0, 1, 1}, {&__pyx_n_s_axisx, __pyx_k_axisx, sizeof(__pyx_k_axisx), 0, 0, 1, 1}, {&__pyx_n_s_axisy, __pyx_k_axisy, sizeof(__pyx_k_axisy), 0, 0, 1, 1}, {&__pyx_n_s_axisz, __pyx_k_axisz, sizeof(__pyx_k_axisz), 0, 0, 1, 1}, {&__pyx_n_s_bisect, __pyx_k_bisect, sizeof(__pyx_k_bisect), 0, 0, 1, 1}, {&__pyx_n_s_branch, __pyx_k_branch, sizeof(__pyx_k_branch), 0, 0, 1, 1}, {&__pyx_n_s_branches, __pyx_k_branches, sizeof(__pyx_k_branches), 0, 0, 1, 1}, {&__pyx_n_s_cell, __pyx_k_cell, sizeof(__pyx_k_cell), 0, 0, 1, 1}, {&__pyx_n_s_center_vec, __pyx_k_center_vec, sizeof(__pyx_k_center_vec), 0, 0, 1, 1}, {&__pyx_n_s_clip, __pyx_k_clip, sizeof(__pyx_k_clip), 0, 0, 1, 1}, {&__pyx_n_s_clip_copying, __pyx_k_clip_copying, sizeof(__pyx_k_clip_copying), 0, 0, 1, 1}, {&__pyx_n_s_clips, __pyx_k_clips, sizeof(__pyx_k_clips), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_combinations, __pyx_k_combinations, sizeof(__pyx_k_combinations), 0, 0, 1, 1}, {&__pyx_n_s_cone, __pyx_k_cone, sizeof(__pyx_k_cone), 0, 0, 1, 1}, {&__pyx_n_s_cone_clip_db, __pyx_k_cone_clip_db, sizeof(__pyx_k_cone_clip_db), 0, 0, 1, 1}, {&__pyx_n_s_constructive_neuronal_geometry, __pyx_k_constructive_neuronal_geometry, sizeof(__pyx_k_constructive_neuronal_geometry), 0, 0, 1, 1}, {&__pyx_n_s_constructive_neuronal_geometry_l, __pyx_k_constructive_neuronal_geometry_l, sizeof(__pyx_k_constructive_neuronal_geometry_l), 0, 0, 1, 1}, {&__pyx_n_s_contourcenter, __pyx_k_contourcenter, sizeof(__pyx_k_contourcenter), 0, 0, 1, 1}, {&__pyx_n_s_corner_count, __pyx_k_corner_count, sizeof(__pyx_k_corner_count), 0, 0, 1, 1}, {&__pyx_n_s_cp, __pyx_k_cp, sizeof(__pyx_k_cp), 0, 0, 1, 1}, {&__pyx_n_s_cross, __pyx_k_cross, sizeof(__pyx_k_cross), 0, 0, 1, 1}, {&__pyx_n_s_cx, __pyx_k_cx, sizeof(__pyx_k_cx), 0, 0, 1, 1}, {&__pyx_n_s_cy, __pyx_k_cy, sizeof(__pyx_k_cy), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_n_s_d0, __pyx_k_d0, sizeof(__pyx_k_d0), 0, 0, 1, 1}, {&__pyx_n_s_d1, __pyx_k_d1, sizeof(__pyx_k_d1), 0, 0, 1, 1}, {&__pyx_n_s_define_shape, __pyx_k_define_shape, sizeof(__pyx_k_define_shape), 0, 0, 1, 1}, {&__pyx_n_s_delta_x, __pyx_k_delta_x, sizeof(__pyx_k_delta_x), 0, 0, 1, 1}, {&__pyx_n_s_delta_y, __pyx_k_delta_y, sizeof(__pyx_k_delta_y), 0, 0, 1, 1}, {&__pyx_n_s_deltad, __pyx_k_deltad, sizeof(__pyx_k_deltad), 0, 0, 1, 1}, {&__pyx_n_s_diam1, __pyx_k_diam1, sizeof(__pyx_k_diam1), 0, 0, 1, 1}, {&__pyx_n_s_diam2, __pyx_k_diam2, sizeof(__pyx_k_diam2), 0, 0, 1, 1}, {&__pyx_n_s_diam3d, __pyx_k_diam3d, sizeof(__pyx_k_diam3d), 0, 0, 1, 1}, {&__pyx_n_s_diam_corrections, __pyx_k_diam_corrections, sizeof(__pyx_k_diam_corrections), 0, 0, 1, 1}, {&__pyx_n_s_diam_db, __pyx_k_diam_db, sizeof(__pyx_k_diam_db), 0, 0, 1, 1}, {&__pyx_n_s_distance, __pyx_k_distance, sizeof(__pyx_k_distance), 0, 0, 1, 1}, {&__pyx_n_s_div, __pyx_k_div, sizeof(__pyx_k_div), 0, 0, 1, 1}, {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1}, {&__pyx_n_s_dx, __pyx_k_dx, sizeof(__pyx_k_dx), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_extreme1, __pyx_k_extreme1, sizeof(__pyx_k_extreme1), 0, 0, 1, 1}, {&__pyx_n_s_extreme2, __pyx_k_extreme2, sizeof(__pyx_k_extreme2), 0, 0, 1, 1}, {&__pyx_kp_s_extreme_points_computation_faile, __pyx_k_extreme_points_computation_faile, sizeof(__pyx_k_extreme_points_computation_faile), 0, 0, 1, 0}, {&__pyx_n_s_f_diams, __pyx_k_f_diams, sizeof(__pyx_k_f_diams), 0, 0, 1, 1}, {&__pyx_n_s_f_pts, __pyx_k_f_pts, sizeof(__pyx_k_f_pts), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_get_clip, __pyx_k_get_clip, sizeof(__pyx_k_get_clip), 0, 0, 1, 1}, {&__pyx_n_s_getcol, __pyx_k_getcol, sizeof(__pyx_k_getcol), 0, 0, 1, 1}, {&__pyx_n_s_getrow, __pyx_k_getrow, sizeof(__pyx_k_getrow), 0, 0, 1, 1}, {&__pyx_n_s_graphicsPrimitives, __pyx_k_graphicsPrimitives, sizeof(__pyx_k_graphicsPrimitives), 0, 0, 1, 1}, {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, {&__pyx_n_s_hname, __pyx_k_hname, sizeof(__pyx_k_hname), 0, 0, 1, 1}, {&__pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_k_home_hines_neuron_nrn_share_lib, sizeof(__pyx_k_home_hines_neuron_nrn_share_lib), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_int_clip, __pyx_k_int_clip, sizeof(__pyx_k_int_clip), 0, 0, 1, 1}, {&__pyx_n_s_is_stack, __pyx_k_is_stack, sizeof(__pyx_k_is_stack), 0, 0, 1, 1}, {&__pyx_n_s_iscontour, __pyx_k_iscontour, sizeof(__pyx_k_iscontour), 0, 0, 1, 1}, {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_join_item, __pyx_k_join_item, sizeof(__pyx_k_join_item), 0, 0, 1, 1}, {&__pyx_n_s_join_items_needing_clipped, __pyx_k_join_items_needing_clipped, sizeof(__pyx_k_join_items_needing_clipped), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1}, {&__pyx_n_s_left_neighbors, __pyx_k_left_neighbors, sizeof(__pyx_k_left_neighbors), 0, 0, 1, 1}, {&__pyx_n_s_linalg, __pyx_k_linalg, sizeof(__pyx_k_linalg), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_mag, __pyx_k_mag, sizeof(__pyx_k_mag), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1}, {&__pyx_n_s_major_length, __pyx_k_major_length, sizeof(__pyx_k_major_length), 0, 0, 1, 1}, {&__pyx_n_s_major_p1, __pyx_k_major_p1, sizeof(__pyx_k_major_p1), 0, 0, 1, 1}, {&__pyx_n_s_major_p2, __pyx_k_major_p2, sizeof(__pyx_k_major_p2), 0, 0, 1, 1}, {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, {&__pyx_n_s_max_ind, __pyx_k_max_ind, sizeof(__pyx_k_max_ind), 0, 0, 1, 1}, {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_n_s_min_ind, __pyx_k_min_ind, sizeof(__pyx_k_min_ind), 0, 0, 1, 1}, {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1}, {&__pyx_kp_s_more_than_one_contour_is_not_cur, __pyx_k_more_than_one_contour_is_not_cur, sizeof(__pyx_k_more_than_one_contour_is_not_cur), 0, 0, 1, 0}, {&__pyx_n_s_morphology, __pyx_k_morphology, sizeof(__pyx_k_morphology), 0, 0, 1, 1}, {&__pyx_kp_s_multiple_most_extreme_points, __pyx_k_multiple_most_extreme_points, sizeof(__pyx_k_multiple_most_extreme_points), 0, 0, 1, 0}, {&__pyx_n_s_my_corner_count, __pyx_k_my_corner_count, sizeof(__pyx_k_my_corner_count), 0, 0, 1, 1}, {&__pyx_n_s_n3d, __pyx_k_n3d, sizeof(__pyx_k_n3d), 0, 0, 1, 1}, {&__pyx_n_s_n_soma_step, __pyx_k_n_soma_step, sizeof(__pyx_k_n_soma_step), 0, 0, 1, 1}, {&__pyx_n_s_naxis, __pyx_k_naxis, sizeof(__pyx_k_naxis), 0, 0, 1, 1}, {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, {&__pyx_n_s_neighbor_copy, __pyx_k_neighbor_copy, sizeof(__pyx_k_neighbor_copy), 0, 0, 1, 1}, {&__pyx_n_s_neighbor_left, __pyx_k_neighbor_left, sizeof(__pyx_k_neighbor_left), 0, 0, 1, 1}, {&__pyx_n_s_neighbor_right, __pyx_k_neighbor_right, sizeof(__pyx_k_neighbor_right), 0, 0, 1, 1}, {&__pyx_n_s_neuron, __pyx_k_neuron, sizeof(__pyx_k_neuron), 0, 0, 1, 1}, {&__pyx_n_s_neuron_rxd_geometry3d_ctng, __pyx_k_neuron_rxd_geometry3d_ctng, sizeof(__pyx_k_neuron_rxd_geometry3d_ctng), 0, 0, 1, 1}, {&__pyx_n_s_neuron_rxd_morphology, __pyx_k_neuron_rxd_morphology, sizeof(__pyx_k_neuron_rxd_morphology), 0, 0, 1, 1}, {&__pyx_n_s_neuron_rxd_rxdException, __pyx_k_neuron_rxd_rxdException, sizeof(__pyx_k_neuron_rxd_rxdException), 0, 0, 1, 1}, {&__pyx_n_s_new_objects, __pyx_k_new_objects, sizeof(__pyx_k_new_objects), 0, 0, 1, 1}, {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1}, {&__pyx_n_s_nradial_vec, __pyx_k_nradial_vec, sizeof(__pyx_k_nradial_vec), 0, 0, 1, 1}, {&__pyx_n_s_num_contours, __pyx_k_num_contours, sizeof(__pyx_k_num_contours), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_objects, __pyx_k_objects, sizeof(__pyx_k_objects), 0, 0, 1, 1}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_n_s_p1, __pyx_k_p1, sizeof(__pyx_k_p1), 0, 0, 1, 1}, {&__pyx_n_s_p2, __pyx_k_p2, sizeof(__pyx_k_p2), 0, 0, 1, 1}, {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1}, {&__pyx_n_s_parent_sec_name, __pyx_k_parent_sec_name, sizeof(__pyx_k_parent_sec_name), 0, 0, 1, 1}, {&__pyx_n_s_parentsec, __pyx_k_parentsec, sizeof(__pyx_k_parentsec), 0, 0, 1, 1}, {&__pyx_n_s_plane_normal, __pyx_k_plane_normal, sizeof(__pyx_k_plane_normal), 0, 0, 1, 1}, {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1}, {&__pyx_n_s_psec, __pyx_k_psec, sizeof(__pyx_k_psec), 0, 0, 1, 1}, {&__pyx_n_s_pt, __pyx_k_pt, sizeof(__pyx_k_pt), 0, 0, 1, 1}, {&__pyx_n_s_pt0, __pyx_k_pt0, sizeof(__pyx_k_pt0), 0, 0, 1, 1}, {&__pyx_n_s_pt1, __pyx_k_pt1, sizeof(__pyx_k_pt1), 0, 0, 1, 1}, {&__pyx_n_s_pt1x, __pyx_k_pt1x, sizeof(__pyx_k_pt1x), 0, 0, 1, 1}, {&__pyx_n_s_pt1y, __pyx_k_pt1y, sizeof(__pyx_k_pt1y), 0, 0, 1, 1}, {&__pyx_n_s_pt1z, __pyx_k_pt1z, sizeof(__pyx_k_pt1z), 0, 0, 1, 1}, {&__pyx_n_s_pt2, __pyx_k_pt2, sizeof(__pyx_k_pt2), 0, 0, 1, 1}, {&__pyx_n_s_pt2x, __pyx_k_pt2x, sizeof(__pyx_k_pt2x), 0, 0, 1, 1}, {&__pyx_n_s_pt2y, __pyx_k_pt2y, sizeof(__pyx_k_pt2y), 0, 0, 1, 1}, {&__pyx_n_s_pt2z, __pyx_k_pt2z, sizeof(__pyx_k_pt2z), 0, 0, 1, 1}, {&__pyx_n_s_pt3, __pyx_k_pt3, sizeof(__pyx_k_pt3), 0, 0, 1, 1}, {&__pyx_n_s_pts, __pyx_k_pts, sizeof(__pyx_k_pts), 0, 0, 1, 1}, {&__pyx_n_s_pts_cones_db, __pyx_k_pts_cones_db, sizeof(__pyx_k_pts_cones_db), 0, 0, 1, 1}, {&__pyx_n_s_pts_sources, __pyx_k_pts_sources, sizeof(__pyx_k_pts_sources), 0, 0, 1, 1}, {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1}, {&__pyx_n_s_r0, __pyx_k_r0, sizeof(__pyx_k_r0), 0, 0, 1, 1}, {&__pyx_n_s_r0_2, __pyx_k_r0_2, sizeof(__pyx_k_r0_2), 0, 0, 1, 1}, {&__pyx_n_s_r1, __pyx_k_r1, sizeof(__pyx_k_r1), 0, 0, 1, 1}, {&__pyx_n_s_r1_2, __pyx_k_r1_2, sizeof(__pyx_k_r1_2), 0, 0, 1, 1}, {&__pyx_n_s_r2, __pyx_k_r2, sizeof(__pyx_k_r2), 0, 0, 1, 1}, {&__pyx_n_s_r3, __pyx_k_r3, sizeof(__pyx_k_r3), 0, 0, 1, 1}, {&__pyx_n_s_radial_vec, __pyx_k_radial_vec, sizeof(__pyx_k_radial_vec), 0, 0, 1, 1}, {&__pyx_n_s_radial_vec_norm, __pyx_k_radial_vec_norm, sizeof(__pyx_k_radial_vec_norm), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_raw, __pyx_k_raw, sizeof(__pyx_k_raw), 0, 0, 1, 1}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1}, {&__pyx_n_s_right_neighbors, __pyx_k_right_neighbors, sizeof(__pyx_k_right_neighbors), 0, 0, 1, 1}, {&__pyx_n_s_rxd, __pyx_k_rxd, sizeof(__pyx_k_rxd), 0, 0, 1, 1}, {&__pyx_n_s_sec, __pyx_k_sec, sizeof(__pyx_k_sec), 0, 0, 1, 1}, {&__pyx_n_s_sec_db, __pyx_k_sec_db, sizeof(__pyx_k_sec_db), 0, 0, 1, 1}, {&__pyx_n_s_sections, __pyx_k_sections, sizeof(__pyx_k_sections), 0, 0, 1, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_set_clip, __pyx_k_set_clip, sizeof(__pyx_k_set_clip), 0, 0, 1, 1}, {&__pyx_n_s_setval, __pyx_k_setval, sizeof(__pyx_k_setval), 0, 0, 1, 1}, {&__pyx_n_s_sharp_turn, __pyx_k_sharp_turn, sizeof(__pyx_k_sharp_turn), 0, 0, 1, 1}, {&__pyx_n_s_soma, __pyx_k_soma, sizeof(__pyx_k_soma), 0, 0, 1, 1}, {&__pyx_kp_s_soma_0, __pyx_k_soma_0, sizeof(__pyx_k_soma_0), 0, 0, 1, 0}, {&__pyx_n_s_soma_objects, __pyx_k_soma_objects, sizeof(__pyx_k_soma_objects), 0, 0, 1, 1}, {&__pyx_n_s_soma_sec, __pyx_k_soma_sec, sizeof(__pyx_k_soma_sec), 0, 0, 1, 1}, {&__pyx_kp_s_soma_stack_ignored_using_centroi, __pyx_k_soma_stack_ignored_using_centroi, sizeof(__pyx_k_soma_stack_ignored_using_centroi), 0, 0, 1, 0}, {&__pyx_n_s_somax, __pyx_k_somax, sizeof(__pyx_k_somax), 0, 0, 1, 1}, {&__pyx_n_s_somay, __pyx_k_somay, sizeof(__pyx_k_somay), 0, 0, 1, 1}, {&__pyx_n_s_somaz, __pyx_k_somaz, sizeof(__pyx_k_somaz), 0, 0, 1, 1}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_n_s_source_is_import3d, __pyx_k_source_is_import3d, sizeof(__pyx_k_source_is_import3d), 0, 0, 1, 1}, {&__pyx_n_s_sp, __pyx_k_sp, sizeof(__pyx_k_sp), 0, 0, 1, 1}, {&__pyx_n_s_sphere_cap, __pyx_k_sphere_cap, sizeof(__pyx_k_sphere_cap), 0, 0, 1, 1}, {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, {&__pyx_n_s_symmeig, __pyx_k_symmeig, sizeof(__pyx_k_symmeig), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_to_python, __pyx_k_to_python, sizeof(__pyx_k_to_python), 0, 0, 1, 1}, {&__pyx_n_s_tobj, __pyx_k_tobj, sizeof(__pyx_k_tobj), 0, 0, 1, 1}, {&__pyx_kp_s_unexpected_corner_counts, __pyx_k_unexpected_corner_counts, sizeof(__pyx_k_unexpected_corner_counts), 0, 0, 1, 0}, {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_vals, __pyx_k_vals, sizeof(__pyx_k_vals), 0, 0, 1, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1}, {&__pyx_kp_s_whichend_for_tangent_sphere_must, __pyx_k_whichend_for_tangent_sphere_must, sizeof(__pyx_k_whichend_for_tangent_sphere_must), 0, 0, 1, 0}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_x0, __pyx_k_x0, sizeof(__pyx_k_x0), 0, 0, 1, 1}, {&__pyx_n_s_x0_2, __pyx_k_x0_2, sizeof(__pyx_k_x0_2), 0, 0, 1, 1}, {&__pyx_n_s_x1, __pyx_k_x1, sizeof(__pyx_k_x1), 0, 0, 1, 1}, {&__pyx_n_s_x1_2, __pyx_k_x1_2, sizeof(__pyx_k_x1_2), 0, 0, 1, 1}, {&__pyx_n_s_x2, __pyx_k_x2, sizeof(__pyx_k_x2), 0, 0, 1, 1}, {&__pyx_n_s_x3, __pyx_k_x3, sizeof(__pyx_k_x3), 0, 0, 1, 1}, {&__pyx_n_s_x3d, __pyx_k_x3d, sizeof(__pyx_k_x3d), 0, 0, 1, 1}, {&__pyx_n_s_x4, __pyx_k_x4, sizeof(__pyx_k_x4), 0, 0, 1, 1}, {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, {&__pyx_n_s_xs_loop, __pyx_k_xs_loop, sizeof(__pyx_k_xs_loop), 0, 0, 1, 1}, {&__pyx_n_s_xshifted, __pyx_k_xshifted, sizeof(__pyx_k_xshifted), 0, 0, 1, 1}, {&__pyx_n_s_xx, __pyx_k_xx, sizeof(__pyx_k_xx), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_y0, __pyx_k_y0, sizeof(__pyx_k_y0), 0, 0, 1, 1}, {&__pyx_n_s_y0_2, __pyx_k_y0_2, sizeof(__pyx_k_y0_2), 0, 0, 1, 1}, {&__pyx_n_s_y1, __pyx_k_y1, sizeof(__pyx_k_y1), 0, 0, 1, 1}, {&__pyx_n_s_y1_2, __pyx_k_y1_2, sizeof(__pyx_k_y1_2), 0, 0, 1, 1}, {&__pyx_n_s_y2, __pyx_k_y2, sizeof(__pyx_k_y2), 0, 0, 1, 1}, {&__pyx_n_s_y3, __pyx_k_y3, sizeof(__pyx_k_y3), 0, 0, 1, 1}, {&__pyx_n_s_y3d, __pyx_k_y3d, sizeof(__pyx_k_y3d), 0, 0, 1, 1}, {&__pyx_n_s_y4, __pyx_k_y4, sizeof(__pyx_k_y4), 0, 0, 1, 1}, {&__pyx_n_s_ys_loop, __pyx_k_ys_loop, sizeof(__pyx_k_ys_loop), 0, 0, 1, 1}, {&__pyx_n_s_yshifted, __pyx_k_yshifted, sizeof(__pyx_k_yshifted), 0, 0, 1, 1}, {&__pyx_n_s_yy, __pyx_k_yy, sizeof(__pyx_k_yy), 0, 0, 1, 1}, {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1}, {&__pyx_n_s_z0, __pyx_k_z0, sizeof(__pyx_k_z0), 0, 0, 1, 1}, {&__pyx_n_s_z0_2, __pyx_k_z0_2, sizeof(__pyx_k_z0_2), 0, 0, 1, 1}, {&__pyx_n_s_z1, __pyx_k_z1, sizeof(__pyx_k_z1), 0, 0, 1, 1}, {&__pyx_n_s_z1_2, __pyx_k_z1_2, sizeof(__pyx_k_z1_2), 0, 0, 1, 1}, {&__pyx_n_s_z2, __pyx_k_z2, sizeof(__pyx_k_z2), 0, 0, 1, 1}, {&__pyx_n_s_z3, __pyx_k_z3, sizeof(__pyx_k_z3), 0, 0, 1, 1}, {&__pyx_n_s_z3d, __pyx_k_z3d, sizeof(__pyx_k_z3d), 0, 0, 1, 1}, {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, {&__pyx_n_s_zshifted, __pyx_k_zshifted, sizeof(__pyx_k_zshifted), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "neuron/rxd/geometry3d/ctng.pyx":57 * * cdef tuple extreme_pts(list pts): * if len(pts) < 2: raise RxDException('extreme points computation failed') # <<<<<<<<<<<<<< * cdef double max_dist, d * cdef tuple pt1, pt2, best_p1, best_p2 */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_extreme_points_computation_faile); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "neuron/rxd/geometry3d/ctng.pyx":112 * shift_sign = -1 * else: * raise RxDException('whichend for tangent_sphere must be 0 or 1') # <<<<<<<<<<<<<< * shift = (rnear * rfar - rnear ** 2) / cone.axislength * axis = (pt1 - pt0) / cone.axislength */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_whichend_for_tangent_sphere_must); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "neuron/rxd/geometry3d/ctng.pyx":176 * Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) * else: * raise RxDException('unexpected corner_counts?') # <<<<<<<<<<<<<< * * return result */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_unexpected_corner_counts); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "neuron/rxd/geometry3d/ctng.pyx":196 * * # locate the major and minor axis, adapted from import3d_gui.hoc * m = h.Matrix(3, 3) # <<<<<<<<<<<<<< * for i, p in enumerate([xshifted, yshifted, zshifted]): * for j, q in enumerate([xshifted, yshifted, zshifted]): */ __pyx_tuple__4 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "neuron/rxd/geometry3d/ctng.pyx":240 * * if len(extreme1) != 1 or len(extreme2) != 1: * raise RxDException('multiple most extreme points') # <<<<<<<<<<<<<< * extreme1 = extreme1[0] * extreme2 = extreme2[0] */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_multiple_most_extreme_points); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "neuron/rxd/geometry3d/ctng.pyx":301 * num_contours = sum(sec.iscontour_ for sec in cell.sections) * if num_contours > 1: * raise RxDException('more than one contour is not currently supported') # <<<<<<<<<<<<<< * if num_contours == 1: * # CTNG:soma */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_more_than_one_contour_is_not_cur); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "neuron/rxd/geometry3d/ctng.pyx":310 * * # compute the center of the contour based on uniformly spaced points around the perimeter * center_vec = sec.contourcenter(sec.raw.getrow(0), sec.raw.getrow(1), sec.raw.getrow(2)) # <<<<<<<<<<<<<< * x0, y0, z0 = [center_vec.x[i] for i in xrange(3)] * somaz = z0 */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); __pyx_tuple__8 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); __pyx_tuple__9 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "neuron/rxd/geometry3d/ctng.pyx":336 * else: * import warnings * warnings.warn('soma stack ignored; using centroid instead') # <<<<<<<<<<<<<< * branches.append(sec) * parent_sec_name.append(None) */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_soma_stack_ignored_using_centroi); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "neuron/rxd/geometry3d/ctng.pyx":183 * @cython.wraparound(False) * @cython.boundscheck(False) * def soma_objects(x, y, z, double x0, double y0, double z0, int n_soma_step): # <<<<<<<<<<<<<< * cdef double diam1, diam2, somax, somay, somaz * cdef list objects = [] */ __pyx_tuple__17 = PyTuple_Pack(59, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_x0_2, __pyx_n_s_y0_2, __pyx_n_s_z0_2, __pyx_n_s_n_soma_step, __pyx_n_s_diam1, __pyx_n_s_diam2, __pyx_n_s_somax, __pyx_n_s_somay, __pyx_n_s_somaz, __pyx_n_s_objects, __pyx_n_s_f_pts, __pyx_n_s_xshifted, __pyx_n_s_yshifted, __pyx_n_s_zshifted, __pyx_n_s_m, __pyx_n_s_i, __pyx_n_s_p, __pyx_n_s_j, __pyx_n_s_q, __pyx_n_s_v, __pyx_n_s_tobj, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_x1_2, __pyx_n_s_y1_2, __pyx_n_s_x2, __pyx_n_s_y2, __pyx_n_s_xs_loop, __pyx_n_s_ys_loop, __pyx_n_s_pts, __pyx_n_s_pts_sources, __pyx_n_s_x3, __pyx_n_s_y3, __pyx_n_s_x4, __pyx_n_s_y4, __pyx_n_s_pt, __pyx_n_s_major_p1, __pyx_n_s_major_p2, __pyx_n_s_extreme1, __pyx_n_s_extreme2, __pyx_n_s_major_length, __pyx_n_s_delta_x, __pyx_n_s_delta_y, __pyx_n_s_f_diams, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_cx, __pyx_n_s_cy, __pyx_n_s_pt1x, __pyx_n_s_pt1y, __pyx_n_s_pt1z, __pyx_n_s_pt2x, __pyx_n_s_pt2y, __pyx_n_s_pt2z, __pyx_n_s_xx, __pyx_n_s_yy); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(7, 0, 59, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_n_s_soma_objects, 183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/ctng.pyx":280 * @cython.wraparound(False) * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): # <<<<<<<<<<<<<< * cdef list objects = [] * cdef int i, j, k */ __pyx_tuple__19 = PyTuple_Pack(99, __pyx_n_s_source, __pyx_n_s_n_soma_step, __pyx_n_s_dx, __pyx_n_s_objects, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_x0_2, __pyx_n_s_y0_2, __pyx_n_s_z0_2, __pyx_n_s_x1_2, __pyx_n_s_y1_2, __pyx_n_s_z1_2, __pyx_n_s_x2, __pyx_n_s_y2, __pyx_n_s_z2, __pyx_n_s_x3, __pyx_n_s_y3, __pyx_n_s_x4, __pyx_n_s_y4, __pyx_n_s_r0_2, __pyx_n_s_r1_2, __pyx_n_s_r2, __pyx_n_s_delta_x, __pyx_n_s_delta_y, __pyx_n_s_major_length, __pyx_n_s_diam1, __pyx_n_s_diam2, __pyx_n_s_pts, __pyx_n_s_f_pts, __pyx_n_s_f_diams, __pyx_n_s_branches, __pyx_n_s_parent_sec_name, __pyx_n_s_pts_sources, __pyx_n_s_pt, __pyx_n_s_source_is_import3d, __pyx_n_s_cell, __pyx_n_s_num_contours, __pyx_n_s_sec, __pyx_n_s_soma_sec, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_center_vec, __pyx_n_s_somaz, __pyx_n_s_new_objects, __pyx_n_s_is_stack, __pyx_n_s_warnings, __pyx_n_s_diam_corrections, __pyx_n_s_clip_copying, __pyx_n_s_all_cones, __pyx_n_s_pts_cones_db, __pyx_n_s_diam_db, __pyx_n_s_branch, __pyx_n_s_psec, __pyx_n_s_d, __pyx_n_s_cp, __pyx_n_s_sphere_cap, __pyx_n_s_d0, __pyx_n_s_d1, __pyx_n_s_axisx, __pyx_n_s_axisy, __pyx_n_s_axisz, __pyx_n_s_deltad, __pyx_n_s_axislength, __pyx_n_s_vals, __pyx_n_s_cone_clip_db, __pyx_n_s_sharp_turn, __pyx_n_s_join_items_needing_clipped, __pyx_n_s_cone, __pyx_n_s_pt1, __pyx_n_s_pt2, __pyx_n_s_axis, __pyx_n_s_left_neighbors, __pyx_n_s_right_neighbors, __pyx_n_s_neighbor_left, __pyx_n_s_neighbor_right, __pyx_n_s_clips, __pyx_n_s_join_item, __pyx_n_s_pt0, __pyx_n_s_naxis, __pyx_n_s_sp, __pyx_n_s_plane_normal, __pyx_n_s_radial_vec, __pyx_n_s_nradial_vec, __pyx_n_s_my_corner_count, __pyx_n_s_corner_count, __pyx_n_s_neighbor_copy, __pyx_n_s_z3, __pyx_n_s_r3, __pyx_n_s_pt3, __pyx_n_s_radial_vec_norm, __pyx_n_s_int_clip, __pyx_n_s_clip, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 99, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_n_s_constructive_neuronal_geometry, 280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_float_2_ = PyFloat_FromDouble(2.); if (unlikely(!__pyx_float_2_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initctng(void); /*proto*/ PyMODINIT_FUNC initctng(void) #else PyMODINIT_FUNC PyInit_ctng(void); /*proto*/ PyMODINIT_FUNC PyInit_ctng(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_ctng(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("ctng", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_neuron__rxd__geometry3d__ctng) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "neuron.rxd.geometry3d.ctng")) { if (unlikely(PyDict_SetItemString(modules, "neuron.rxd.geometry3d.ctng", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry.tp_print = 0; __pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry = &__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr.tp_print = 0; __pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr = &__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr.tp_print = 0; __pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr = &__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "neuron/rxd/geometry3d/ctng.pyx":1 * from neuron import h # <<<<<<<<<<<<<< * import numpy * import itertools */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_h); __Pyx_GIVEREF(__pyx_n_s_h); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_h); __pyx_t_2 = __Pyx_Import(__pyx_n_s_neuron, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_h); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_h, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":2 * from neuron import h * import numpy # <<<<<<<<<<<<<< * import itertools * import bisect */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":3 * from neuron import h * import numpy * import itertools # <<<<<<<<<<<<<< * import bisect * cimport numpy */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":4 * import numpy * import itertools * import bisect # <<<<<<<<<<<<<< * cimport numpy * from numpy import linalg */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_bisect, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":6 * import bisect * cimport numpy * from numpy import linalg # <<<<<<<<<<<<<< * cimport cython * from neuron.rxd.rxdException import RxDException */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_linalg); __Pyx_GIVEREF(__pyx_n_s_linalg); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_linalg); __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_linalg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_linalg, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":8 * from numpy import linalg * cimport cython * from neuron.rxd.rxdException import RxDException # <<<<<<<<<<<<<< * import neuron * import neuron.rxd.morphology */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_RxDException); __Pyx_GIVEREF(__pyx_n_s_RxDException); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RxDException); __pyx_t_2 = __Pyx_Import(__pyx_n_s_neuron_rxd_rxdException, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RxDException); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_RxDException, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":9 * cimport cython * from neuron.rxd.rxdException import RxDException * import neuron # <<<<<<<<<<<<<< * import neuron.rxd.morphology * */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_neuron, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_neuron, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":10 * from neuron.rxd.rxdException import RxDException * import neuron * import neuron.rxd.morphology # <<<<<<<<<<<<<< * * cdef extern from "math.h": */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_neuron_rxd_morphology, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_neuron, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":16 * double fabs(double) * * from graphicsPrimitives import Sphere, Cone, Cylinder, SkewCone, Plane, Union, Intersection, SphereCone # <<<<<<<<<<<<<< * * cdef tuple seg_line_intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bint clip): */ __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Sphere); __Pyx_GIVEREF(__pyx_n_s_Sphere); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Sphere); __Pyx_INCREF(__pyx_n_s_Cone); __Pyx_GIVEREF(__pyx_n_s_Cone); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Cone); __Pyx_INCREF(__pyx_n_s_Cylinder); __Pyx_GIVEREF(__pyx_n_s_Cylinder); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_Cylinder); __Pyx_INCREF(__pyx_n_s_SkewCone); __Pyx_GIVEREF(__pyx_n_s_SkewCone); PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_SkewCone); __Pyx_INCREF(__pyx_n_s_Plane); __Pyx_GIVEREF(__pyx_n_s_Plane); PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_Plane); __Pyx_INCREF(__pyx_n_s_Union); __Pyx_GIVEREF(__pyx_n_s_Union); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_Union); __Pyx_INCREF(__pyx_n_s_Intersection); __Pyx_GIVEREF(__pyx_n_s_Intersection); PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_Intersection); __Pyx_INCREF(__pyx_n_s_SphereCone); __Pyx_GIVEREF(__pyx_n_s_SphereCone); PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_SphereCone); __pyx_t_1 = __Pyx_Import(__pyx_n_s_graphicsPrimitives, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Sphere); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sphere, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Cone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cone, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Cylinder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cylinder, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SkewCone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SkewCone, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Plane); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Plane, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Union); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Union, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Intersection); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Intersection, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SphereCone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SphereCone, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":183 * @cython.wraparound(False) * @cython.boundscheck(False) * def soma_objects(x, y, z, double x0, double y0, double z0, int n_soma_step): # <<<<<<<<<<<<<< * cdef double diam1, diam2, somax, somay, somaz * cdef list objects = [] */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_1soma_objects, NULL, __pyx_n_s_neuron_rxd_geometry3d_ctng); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_soma_objects, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":280 * @cython.wraparound(False) * @cython.boundscheck(False) * def constructive_neuronal_geometry(source, int n_soma_step, double dx): # <<<<<<<<<<<<<< * cdef list objects = [] * cdef int i, j, k */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry, NULL, __pyx_n_s_neuron_rxd_geometry3d_ctng); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_constructive_neuronal_geometry, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/ctng.pyx":1 * from neuron import h # <<<<<<<<<<<<<< * import numpy * import itertools */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init neuron.rxd.geometry3d.ctng", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init neuron.rxd.geometry3d.ctng"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY float_value = PyNumber_Float(obj); if (0) goto bad; #else PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; if (likely(nb) && likely(nb->nb_float)) { float_value = nb->nb_float(obj); if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { PyErr_Format(PyExc_TypeError, "__float__ returned non-float (type %.200s)", Py_TYPE(float_value)->tp_name); Py_DECREF(float_value); goto bad; } } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { #if PY_MAJOR_VERSION >= 3 float_value = PyFloat_FromString(obj); #else float_value = PyFloat_FromString(obj, 0); #endif } else { PyObject* args = PyTuple_New(1); if (unlikely(!args)) goto bad; PyTuple_SET_ITEM(args, 0, obj); float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); PyTuple_SET_ITEM(args, 0, 0); Py_DECREF(args); } #endif if (likely(float_value)) { double value = PyFloat_AS_DOUBLE(float_value); Py_DECREF(float_value); return value; } bad: return (double)-1; } static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #endif __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *args; PyObject *function = PyMethod_GET_FUNCTION(method); args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); Py_INCREF(function); Py_DECREF(method); method = NULL; result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); return result; } } #endif result = __Pyx_PyObject_CallOneArg(method, arg); bad: Py_XDECREF(method); return result; } static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t < '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparseable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static CYTHON_INLINE PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number; int ndim = ctx->head->field->type->ndim; ; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) return PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); if (*ts != ',' && *ts != ')') return PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); if (*ts == ',') ts++; i++; } if (i != ndim) return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return NULL; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return Py_None; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; buf->shape = __Pyx_zeros; buf->suboffsets = __Pyx_minusones; } static CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (buf->ndim != nd) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", nd, buf->ndim); goto fail; } if (!cast) { __Pyx_BufFmt_Context ctx; __Pyx_BufFmt_Init(&ctx, stack, dtype); if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; } if ((unsigned)buf->itemsize != dtype->size) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; fail:; __Pyx_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); long_long: llx = lla + llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op2))) { const long a = intval; long x; long b = PyInt_AS_LONG(op2); x = (long)((unsigned long)a - b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op2))) { const long a = intval; long b, x; const PY_LONG_LONG lla = intval; PY_LONG_LONG llb, llx; const digit* digits = ((PyLongObject*)op2)->ob_digit; const Py_ssize_t size = Py_SIZE(op2); if (likely(__Pyx_sst_abs(size) <= 1)) { b = likely(size) ? digits[0] : 0; if (size == -1) b = -b; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); long_long: llx = lla - llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op2)) { const long a = intval; double b = PyFloat_AS_DOUBLE(op2); double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) { const double b = floatval; double a, result; if (likely(PyFloat_CheckExact(op1))) { a = PyFloat_AS_DOUBLE(op1); } else #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { a = (double) PyInt_AS_LONG(op1); } else #endif if (likely(PyLong_CheckExact(op1))) { #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); switch (size) { case 0: a = 0.0; break; case -1: a = -(double) digits[0]; break; case 1: a = (double) digits[0]; break; case -2: case 2: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) { if (size == -2) a = -a; break; } } case -3: case 3: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) { if (size == -3) a = -a; break; } } case -4: case 4: if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) { if (size == -4) a = -a; break; } } default: #else { #endif a = PyLong_AsDouble(op1); if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL; } } else { return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)); } PyFPE_START_PROTECT("divide", return NULL) result = a / b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } #endif static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { if (op1 == op2) { Py_RETURN_TRUE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); #else default: Py_RETURN_FALSE; #endif } } if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a == (double)b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } return PyObject_RichCompare(op1, op2, Py_EQ); } #endif static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *function = PyMethod_GET_FUNCTION(method); result = __Pyx_PyObject_CallOneArg(function, self); Py_DECREF(method); return result; } } #endif result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } Py_DECREF(obj); view->obj = NULL; } #endif #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(enum NPY_TYPES) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), little, !is_unsigned); } } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #include #include static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { #if PY_VERSION_HEX >= 0x030300A0 if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } #endif if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); ev = Py_None; } else if (PyTuple_Check(ev)) { if (PyTuple_GET_SIZE(ev) >= 1) { PyObject *value; #if CYTHON_COMPILING_IN_CPYTHON value = PySequence_ITEM(ev, 0); #else value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #endif Py_DECREF(ev); ev = value; } else { Py_INCREF(Py_None); Py_DECREF(ev); ev = Py_None; } } Py_XDECREF(tb); Py_DECREF(et); *pvalue = ev; return 0; } } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) { PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } if (value) { #if CYTHON_COMPILING_IN_PYPY #else if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Coroutine_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) { if (unlikely(!retval && !PyErr_Occurred())) { PyErr_SetNone(PyExc_StopIteration); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Coroutine_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif { if (value == Py_None) ret = Py_TYPE(yf)->tp_iternext(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value); } return __Pyx_Coroutine_MethodReturn(retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); goto throw_here; } gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif { PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); } static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label > 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif { return; } PyObject_GC_UnTrack(self); } __Pyx_Coroutine_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; if (gen->resume_label <= 0) return ; #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt == 0); self->ob_refcnt = 1; #endif __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Coroutine_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) { return; } { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) { Py_INCREF(self->gi_name); return self->gi_name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = self->gi_name; Py_INCREF(value); self->gi_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) { Py_INCREF(self->gi_qualname); return self->gi_qualname; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = self->gi_qualname; Py_INCREF(value); self->gi_qualname = value; Py_XDECREF(tmp); return 0; } static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; PyObject_GC_Track(gen); return gen; } static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; globals = PyDict_New(); if (unlikely(!globals)) goto ignore; result = PyDict_SetItemString(globals, "_cython_coroutine_type", #ifdef __Pyx_Coroutine_USED (PyObject*)__pyx_CoroutineType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; result = PyDict_SetItemString(globals, "_cython_generator_type", #ifdef __Pyx_Generator_USED (PyObject*)__pyx_GeneratorType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; result_obj = PyRun_String(py_code, Py_file_input, globals, globals); if (unlikely(!result_obj)) goto ignore; Py_DECREF(result_obj); Py_DECREF(globals); return module; ignore: Py_XDECREF(globals); PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else py_code++; #endif return module; } #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (!abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections"); if (!module) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_VERSION_HEX >= 0x03030000) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if (0) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #else __Pyx_Coroutine_del, #endif 0, #if PY_VERSION_HEX >= 0x030400a1 __Pyx_Coroutine_del, #endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ neuron-7.5/share/lib/python/neuron/rxd/geometry3d/ctng.pyx000066400000000000000000000703071323325274500237630ustar00rootroot00000000000000from neuron import h import numpy import itertools import bisect cimport numpy from numpy import linalg cimport cython from neuron.rxd.rxdException import RxDException import neuron import neuron.rxd.morphology cdef extern from "math.h": double sqrt(double) double fabs(double) from graphicsPrimitives import Sphere, Cone, Cylinder, SkewCone, Plane, Union, Intersection, SphereCone cdef tuple seg_line_intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bint clip): # returns None if parallel (so None if 0 or infinitely many intersections) # if clip is True, requires intersection on segment; else returns line-line intersection cdef double denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1) if denom == 0: return None cdef double u = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom if clip and not (0 <= u <= 1): return None return (x1 + u * (x2 - x1), y1 + u * (y2 - y1)) cdef tuple convert3dto2d(double x, double y, double z, double px, double py, double pz, double xx, double xy, double xz, double yx, double yy, double yz): x -= px; y -= py; z -= pz return project(x, y, z, xx, xy, xz), project(x, y, z, yx, yy, yz) cdef tuple closest_pt(tuple pt, list pts, z2): dist = float('inf') closest = None for p in pts: x, y = p d = linalg.norm(numpy.array(pt) - numpy.array((x, y, z2))) if d < dist: dist = d closest = p return closest cdef tuple closest_pt3(tuple pt, list pts): dist = float('inf') closest = None for p in pts: d = linalg.norm(numpy.array(pt) - numpy.array(p)) if d < dist: dist = d closest = p return closest cdef double project(double fromx, double fromy, double fromz, double tox, double toy, double toz): """scalar projection""" return (fromx * tox + fromy * toy + fromz * toz) / (tox ** 2 + toy ** 2 + toz ** 2) ** 0.5 cdef tuple extreme_pts(list pts): if len(pts) < 2: raise RxDException('extreme points computation failed') cdef double max_dist, d cdef tuple pt1, pt2, best_p1, best_p2 max_dist = -1 for pt1, pt2 in itertools.combinations(pts, 2): d = linalg.norm(numpy.array(pt1) - numpy.array(pt2)) if d > max_dist: best_p1 = pt1 best_p2 = pt2 max_dist = d return best_p1, best_p2 # helper function for maintaing the points-cones database cdef register(dict pts_cones_db, tuple pt, cone): if pt not in pts_cones_db: pts_cones_db[pt] = [] pts_cones_db[pt].append(cone) # helper function that counts the number of points inside a region @cython.boundscheck(False) @cython.wraparound(False) cdef int count_outside(region, list pts, double err): cdef numpy.ndarray[numpy.float_t, ndim=1] pt cdef int result = 0 for pt in pts: if region.distance(pt[0], pt[1], pt[2]) > err: result += 1 return result @cython.boundscheck(False) @cython.wraparound(False) cdef list convert2dto3d(double ptx, double pty, double x1, double y1, double z1, numpy.ndarray[numpy.float_t, ndim=1] axis, numpy.ndarray[numpy.float_t, ndim=1] radial_vec): return [x1 + ptx * axis[0] + pty * radial_vec[0], y1 + ptx * axis[1] + pty * radial_vec[1], z1 + ptx * axis[2] + pty * radial_vec[2]] cdef double qsolve(double a, double b, double c): """solve a quadratic equation""" cdef double discrim = b ** 2 - 4 * a * c assert(discrim >= 0) return (-b - numpy.sqrt(discrim)) / (2 * a), (-b + numpy.sqrt(discrim)) / (2 * a) cdef tangent_sphere(cone, int whichend): pt0 = numpy.array([cone._x0, cone._y0, cone._z0]) pt1 = numpy.array([cone._x1, cone._y1, cone._z1]) cdef double rnear, rfar, shift if whichend == 0: pt = pt0 rnear = cone._r0 rfar = cone._r1 shift_sign = 1 elif whichend == 1: pt = pt1 rnear, rfar = cone._r1, cone._r0 shift_sign = -1 else: raise RxDException('whichend for tangent_sphere must be 0 or 1') shift = (rnear * rfar - rnear ** 2) / cone.axislength axis = (pt1 - pt0) / cone.axislength result = Sphere(*(list(pt + shift_sign * shift * axis) + [numpy.sqrt(shift ** 2 + rnear ** 2)])) return result @cython.boundscheck(False) @cython.wraparound(False) cdef list join_outside(double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1, double x2, double y2, double z2, double r2, double dx): cdef double deltar, deltanr cdef numpy.ndarray[numpy.float_t, ndim=1] pt1, radial_vec, nradial_vec, axis, naxis axis = numpy.array([x2 - x1, y2 - y1, z2 - z1]) naxis = numpy.array([x1 - x0, y1 - y0, z1 - z0]) deltar = r2 - r1; deltanr = r1 - r0 deltar /= linalg.norm(axis); deltanr /= linalg.norm(naxis) axis /= linalg.norm(axis); naxis /= linalg.norm(naxis) # # sphere, clipped to extended cones # CTNG:trimsphere # sp = Sphere(x1, y1, z1, r1) c0 = Cone(x0 - naxis[0] * r0, y0 - naxis[1] * r0, z0 - naxis[2] * r0, r0 - deltanr * r0, x1 + naxis[0] * r1, y1 + naxis[1] * r1, z1 + naxis[2] * r1, r1 + deltanr * r1) c1 = Cone(x1 - axis[0] * r1, y1 - axis[1] * r1, z1 - axis[2] * r1, r1 - deltar * r1, x2 + axis[0] * r2, y2 + axis[1] * r2, z2 + axis[2] * r2, r2 + deltar * r2) sp.set_clip([Intersection([c0, c1])]) result = [sp] # check to see if the clipped sphere covers the ends of the cones # if not, do something else :) # locate key vectors plane_normal = numpy.cross(axis, naxis) radial_vec = numpy.cross(plane_normal, axis) nradial_vec = numpy.cross(plane_normal, naxis) # normalize all of these radial_vec /= linalg.norm(radial_vec) nradial_vec /= linalg.norm(nradial_vec) # count the corners that are inside a sphere clipped to the cones pt1 = numpy.array([x1, y1, z1]) cdef int left_corner_count = 2 - count_outside(sp, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], dx * 0.5) cdef int corner_count = 2 - count_outside(sp, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], dx * 0.5) #print 'for join (%g, %g, %g; %g) - (%g, %g, %g; %g) - (%g, %g, %g; %g):' % (x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2) #print ' left_corner_count = %g; corner_count = %g' % (left_corner_count, corner_count) if left_corner_count == corner_count == 2: sp.set_clip([Intersection([c0, c1, Plane(x1, y1, z1, axis[0], axis[1], axis[2]), Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) elif left_corner_count < 2 and corner_count == 2: # clipping to c1 is too harsh, but c0 clip is fine sp.set_clip([Intersection([c0, Plane(x1, y1, z1, axis[0], axis[1], axis[2]), Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) elif left_corner_count == 2 and corner_count < 2: # clipping to c0 is too harsh, but c1 clip is fine sp.set_clip([Intersection([c1, Plane(x1, y1, z1, axis[0], axis[1], axis[2]), Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) elif left_corner_count < 2 and corner_count < 2: # both clips are too harsh; fall back to just using a sphere sp.set_clip([Intersection([ Plane(x1, y1, z1, axis[0], axis[1], axis[2]), Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) else: raise RxDException('unexpected corner_counts?') return result @cython.wraparound(False) @cython.boundscheck(False) def soma_objects(x, y, z, double x0, double y0, double z0, int n_soma_step): cdef double diam1, diam2, somax, somay, somaz cdef list objects = [] cdef list f_pts somax, somay, somaz = x0, y0, z0 xshifted = [xx - x0 for xx in x] yshifted = [yy - y0 for yy in y] # this is a hack to pretend everything is on the same z level zshifted = [0] * len(x) # locate the major and minor axis, adapted from import3d_gui.hoc m = h.Matrix(3, 3) for i, p in enumerate([xshifted, yshifted, zshifted]): for j, q in enumerate([xshifted, yshifted, zshifted]): if j < i: continue v = numpy.dot(p, q) m.setval(i, j, v) m.setval(j, i, v) # CTNG:majoraxis tobj = m.symmeig(m) # major axis is the one with largest eigenvalue major = m.getcol(tobj.max_ind()) # minor is normal and in xy plane minor = m.getcol(3 - tobj.min_ind() - tobj.max_ind()) #minor.x[2] = 0 minor.div(minor.mag()) x1 = x0; y1 = y0 x2 = x1 + major.x[0]; y2 = y1 + major.x[1] xs_loop = x + [x[0]] ys_loop = y + [y[0]] # locate the extrema of the major axis CTNG:somaextrema # this is defined by the furthest points on it that lie on the minor axis pts = [] pts_sources = {} for x3, y3 in zip(x, y): x4, y4 = x3 + minor.x[0], y3 + minor.x[1] pt = seg_line_intersection(x1, y1, x2, y2, x3, y3, x4, y4, False) if pt is not None: pts.append(pt) if pt not in pts_sources: pts_sources[pt] = [] pts_sources[pt].append((x3, y3)) major_p1, major_p2 = extreme_pts(pts) extreme1 = pts_sources[major_p1] extreme2 = pts_sources[major_p2] major_p1, major_p2 = numpy.array(major_p1), numpy.array(major_p2) del pts_sources if len(extreme1) != 1 or len(extreme2) != 1: raise RxDException('multiple most extreme points') extreme1 = extreme1[0] extreme2 = extreme2[0] major_length = linalg.norm(major_p1 - major_p2) delta_x, delta_y = major_p2 - major_p1 delta_x /= n_soma_step delta_y /= n_soma_step f_pts = [extreme1] f_diams = [0] # CTNG:slicesoma for i in xrange(1, n_soma_step): x0, y0 = major_p1[0] + i * delta_x, major_p1[1] + i * delta_y # slice in dir of minor axis x1, y1 = x0 + minor.x[0], y0 + minor.x[1] pts = [] for i in xrange(len(x)): pt = seg_line_intersection(xs_loop[i], ys_loop[i], xs_loop[i + 1], ys_loop[i + 1], x0, y0, x1, y1, True) if pt is not None: pts.append(pt) p1, p2 = extreme_pts(pts) p1, p2 = numpy.array(p1), numpy.array(p2) cx, cy = (p1 + p2) / 2. f_pts.append((cx, cy, somaz)) f_diams.append(linalg.norm(p1 - p2)) f_pts.append(extreme2) f_diams.append(0) for i in xrange(len(f_pts) - 1): pt1x, pt1y, pt1z = f_pts[i] pt2x, pt2y, pt2z = f_pts[i + 1] diam1 = f_diams[i] diam2 = f_diams[i + 1] objects.append(SkewCone(pt1x, pt1y, pt1z, diam1 * 0.5, pt1x + delta_x, pt1y + delta_y, pt1z, diam2 * 0.5, pt2x, pt2y, pt2z)) return objects, f_pts @cython.wraparound(False) @cython.boundscheck(False) def constructive_neuronal_geometry(source, int n_soma_step, double dx): cdef list objects = [] cdef int i, j, k cdef double x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, x4, y4, r0, r1, r2 cdef double delta_x, delta_y, major_length, diam1, diam2 cdef list pts, f_pts, f_diams, branches, parent_sec_name cdef dict pts_sources cdef tuple pt #cdef numpy.ndarray[numpy.float_t, ndim=1] x, y, z, xs_loop, ys_loop source_is_import3d = False branches = [] f_pts = [] parent_sec_name = [] # TODO: come up with a better way of checking type if hasattr(source, 'sections'): source_is_import3d = True cell = source # probably an Import3D type num_contours = sum(sec.iscontour_ for sec in cell.sections) if num_contours > 1: raise RxDException('more than one contour is not currently supported') if num_contours == 1: # CTNG:soma for sec in cell.sections: if sec.iscontour_: soma_sec = sec.hname() x, y, z = [sec.raw.getrow(i).to_python() for i in xrange(3)] # compute the center of the contour based on uniformly spaced points around the perimeter center_vec = sec.contourcenter(sec.raw.getrow(0), sec.raw.getrow(1), sec.raw.getrow(2)) x0, y0, z0 = [center_vec.x[i] for i in xrange(3)] somaz = z0 new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) objects += new_objects # TODO: support multiple somas by appending to f_pts else: parent_sec_name.append(sec.parentsec.hname()) branches.append(sec) else: h.define_shape() soma_sec = None for sec in source: # TODO: make this more general (support for 3D contour outline) if sec.hname() == 'soma[0]' and 'soma' in neuron._sec_db: is_stack, x, y, z, x0, y0, z0 = neuron._sec_db['soma'] if not is_stack: # yes, this should be sec while the other should be sec.hname() # the difference is because of how we're keeping track of the parent soma_sec = sec x = x.to_python(); y = y.to_python(); z = z.to_python() new_objects, f_pts = soma_objects(x, y, z, x0, y0, z0, n_soma_step) objects += new_objects somaz = z0 else: import warnings warnings.warn('soma stack ignored; using centroid instead') branches.append(sec) parent_sec_name.append(None) else: branches.append(sec) parent_sec_name.append(neuron.rxd.morphology.parent(sec)) ##################################################################### # # add the branches # ##################################################################### cdef dict diam_corrections = {None: None} cdef dict clip_copying = {} while diam_corrections: all_cones = [] pts_cones_db = {} diam_db = {} # TODO: don't use name; use hash! for branch, psec in zip(branches, parent_sec_name): if source_is_import3d: x, y, z = [numpy.array(branch.raw.getrow(i).to_python()) for i in range(3)] d = branch.d.to_python() else: x = numpy.array([h.x3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) y = numpy.array([h.y3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) z = numpy.array([h.z3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) d = numpy.array([h.diam3d(i, sec=branch) for i in xrange(int(h.n3d(sec=branch)))]) # make sure that all the ones that connect to the soma do in fact connect # do this by connecting to local center axis # CTNG:connectdends #print 'psec, soma_sec = %r, %r' % (psec, soma_sec) if psec == soma_sec and f_pts: pt = (x[1], y[1], z[1]) cp = closest_pt3(pt, f_pts) # NEURON includes the wire point at the center; we want to connect # to the closest place on the soma's axis instead with full diameter # x, y, z, d = [cp[0]] + [X for X in x[1 :]], [cp[1]] + [Y for Y in y[1:]], [somaz] + [Z for Z in z[1:]], [d[1]] + [D for D in d[1 :]] #print 'psec == soma_sec, cp = %r' % cp x[0], y[0] = cp z[0] = somaz d[0] = d[1] # cap this with a sphere for smooth joins sphere_cap = Sphere(x[0], y[0], z[0], d[0] * 0.5) # make sure sphere doesn't stick out of wrong side of cylinder sphere_cap.set_clip([Plane(x[1], y[1], z[1], x[1] - x[0], y[1] - y[0], z[1] - z[0])]) objects.append(sphere_cap) for i in range(len(x) - 1): d0, d1 = d[i : i + 2] if (x[i] != x[i + 1] or y[i] != y[i + 1] or z[i] != z[i + 1]): # short section check #if linalg.norm((x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i])) < (d1 + d0) * 0.5: # short_segs += 1 axisx, axisy, axisz, deltad = x[i + 1] - x[i], y[i + 1] - y[i], z[i + 1] - z[i], d1 - d0 axislength = (axisx ** 2 + axisy ** 2 + axisz ** 2) ** 0.5 axisx /= axislength; axisy /= axislength; axisz /= axislength; deltad /= axislength x0, y0, z0 = x[i], y[i], z[i] x1, y1, z1 = x[i + 1], y[i + 1], z[i + 1] if (x0, y0, z0) in diam_corrections: d0 = diam_corrections[(x0, y0, z0)] if (x1, y1, z1) in diam_corrections: d1 = diam_corrections[(x1, y1, z1)] if d0 != d1: all_cones.append(Cone(x0, y0, z0, d0 * 0.5, x1, y1, z1, d1 * 0.5)) else: all_cones.append(Cylinder(x0, y0, z0, x1, y1, z1, d1 * 0.5)) with cython.wraparound(True): register(pts_cones_db, (x0, y0, z0), all_cones[-1]) register(pts_cones_db, (x1, y1, z1), all_cones[-1]) register(diam_db, (x0, y0, z0), d0) register(diam_db, (x1, y1, z1), d1) # at join, should always be the size of the biggest branch # this is different behavior than NEURON, which continues the size of the # first point away from the join to the join diam_corrections = {} for pt in diam_db: vals = diam_db[pt] if max(vals) != min(vals): diam_corrections[pt] = max(vals) cdef dict cone_clip_db = dict((cone, []) for cone in all_cones) cdef bint sharp_turn # cdef dict join_counts = {'2m': 0, '2s': 0, '3m': 0, '3s': 0, '4m': 0, '4s': 0, '0m': 0, '0s': 0, '1m': 0, '1s': 0} join_items_needing_clipped = [] for cone in all_cones: x1, y1, z1, r1 = cone._x0, cone._y0, cone._z0, cone._r0 x2, y2, z2, r2 = cone._x1, cone._y1, cone._z1, cone._r1 pt1 = numpy.array([x1, y1, z1]) pt2 = numpy.array([x2, y2, z2]) axis = (pt2 - pt1) / linalg.norm(pt2 - pt1) left_neighbors = list(pts_cones_db[(x1, y1, z1)]) right_neighbors = list(pts_cones_db[(x2, y2, z2)]) left_neighbors.remove(cone) right_neighbors.remove(cone) if not left_neighbors: left_neighbors = [None] if not right_neighbors: right_neighbors = [None] for neighbor_left, neighbor_right in itertools.product(left_neighbors, right_neighbors): clips = [] # if any join needs to be subject to clips, it goes here join_item = None # process the join on the "left" (end 1) if neighbor_left is not None: # any joins are created on the left pass; the right pass will only do clippings x0, y0, z0, r0 = neighbor_left._x0, neighbor_left._y0, neighbor_left._z0, neighbor_left._r0 if x0 == x1 and y0 == y1 and z0 == z1: x0, y0, z0, r0 = neighbor_left._x1, neighbor_left._y1, neighbor_left._z1, neighbor_left._r1 pt0 = numpy.array([x0, y0, z0]) naxis = (pt1 - pt0) / linalg.norm(pt1 - pt0) # no need to clip if the cones are perfectly aligned if all(axis == naxis): if r0 == r1 == r2: # two parallel cylinders with equal radii: join by combining # TODO: we can remove the original two if we can find them join_item = Cylinder(x0, y0, z0, x2, y2, z2, r2) join_items_needing_clipped.append((join_item, neighbor_left, neighbor_right)) objects.append(join_item) else: if r0 == r1 == r2: # simplest join: two cylinders (no need for all that nastiness below) sp = Sphere(x1, y1, z1, r1) sp.set_clip([Plane(x0, y0, z0, -naxis[0], -naxis[1], -naxis[2]), Plane(x2, y2, z2, axis[0], axis[1], axis[2])]) objects.append(sp) else: # is the turn sharp or not # CTNG:joinangle sharp_turn = numpy.dot(axis, naxis) < 0 # locate key vectors plane_normal = numpy.cross(axis, naxis) radial_vec = numpy.cross(plane_normal, axis) nradial_vec = numpy.cross(plane_normal, naxis) # normalize all of these radial_vec /= linalg.norm(radial_vec) nradial_vec /= linalg.norm(nradial_vec) # count the corners that are inside the other cone (for both ways) # CTNG:outsidecorners my_corner_count = count_outside(neighbor_left, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec], 0) corner_count = my_corner_count + count_outside(cone, [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec], 0) # if corner_count == 0, then probably all nan's from size 0 meeting size 0; ignore # if is 1, probably parallel; no joins # if corner_count not in (1, 2, 3, 4): # print 'corner_count: ', corner_count, [pt1 + r1 * radial_vec, pt1 - r1 * radial_vec] + [pt1 + r1 * nradial_vec, pt1 - r1 * nradial_vec] if corner_count == 2: # CTNG:2outside # add clipped sphere; same rule if sharp or mild turn objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) elif corner_count == 3: sp = Sphere(x1, y1, z1, r1) if sharp_turn: # CTNG:3outobtuse if my_corner_count == 1: sp.set_clip([Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])]) else: sp.set_clip([Plane(x1, y1, z1, axis[0], axis[1], axis[2])]) objects.append(sp) else: # CTNG:3outacute objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) with cython.wraparound(True): if my_corner_count == 1: objects.append(tangent_sphere(neighbor_left, 1)) objects[-1].set_clip([Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2])]) else: objects.append(tangent_sphere(cone, 0)) objects[-1].set_clip([Plane(x0, y0, z0, -axis[0], -axis[1], -axis[2])]) elif corner_count == 4: sp = Sphere(x1, y1, z1, r1) if sharp_turn: # CTNG:4outobtuse # join with the portions of a sphere that are outside at least one of the planes sp.set_clip([Union([ Plane(x1, y1, z1, axis[0], axis[1], axis[2]), Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2])])]) objects.append(sp) else: # CTNG:4outacute (+ 1 more) # join with the portions of a sphere that are outside both planes objects += join_outside(x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2, r2, dx) # AND clip the cone to not extend pass the union of the neighbor's plane and the neighbor if r0 == r1: neighbor_copy = Cylinder(x0, y0, z0, x1, y1, z1, r0) else: neighbor_copy = Cone(x0, y0, z0, r0, x1, y1, z1, r1) clips.append(Union([ Plane(x1, y1, z1, -naxis[0], -naxis[1], -naxis[2]), neighbor_copy])) # join_type = '%d%s' % (corner_count, 's' if sharp_turn else 'm') # join_counts[join_type] += 1 if neighbor_right is not None: # any joins are created on the left pass; the right pass will only do clippings x3, y3, z3, r3 = neighbor_right._x0, neighbor_right._y0, neighbor_right._z0, neighbor_right._r0 if x2 == x3 and y2 == y3 and z2 == z3: x3, y3, z3, r3 = neighbor_right._x1, neighbor_right._y1, neighbor_right._z1, neighbor_right._r1 pt3 = numpy.array([x3, y3, z3]) naxis = (pt3 - pt2) / linalg.norm(pt3 - pt2) # no need to clip if the cones are perfectly aligned if any(axis != naxis): # locate key vectors plane_normal = numpy.cross(axis, naxis) radial_vec = numpy.cross(plane_normal, axis) radial_vec_norm = linalg.norm(radial_vec) # we check again because sometimes there are roundoff errors that this catches if radial_vec_norm: # is the turn sharp or not sharp_turn = numpy.dot(axis, naxis) < 0 nradial_vec = numpy.cross(plane_normal, naxis) # normalize all of these radial_vec /= radial_vec_norm nradial_vec /= linalg.norm(nradial_vec) # count the corners that are inside the other cone (for both ways) my_corner_count = count_outside(neighbor_right, [pt2 + r2 * radial_vec, pt2 - r2 * radial_vec], 0) corner_count = my_corner_count + count_outside(cone, [pt2 + r2 * nradial_vec, pt2 - r2 * nradial_vec], 0) if corner_count == 2: # no clipping; already joined pass elif corner_count == 3: pass elif corner_count == 4: # CTNG:4outacute (+ 1 more) # already joined; just clip (only in mild turn case) if not sharp_turn: if r2 == r3: neighbor_copy = Cylinder(x2, y2, z2, x3, y3, z3, r3) else: neighbor_copy = Cone(x2, y2, z2, r2, x3, y3, z3, r3) #print 'cc=4: (%g, %g, %g; %g) (%g, %g, %g; %g) (%g, %g, %g; %g) ' % (x1, y1, z1, r1, x2, y2, z2, r2, x3, y3, z3, r3) clips.append(Union([ Plane(x2, y2, z2, naxis[0], naxis[1], naxis[2]), neighbor_copy])) if clips: int_clip = Intersection(clips) cone_clip_db[cone].append(int_clip) for cone in all_cones: clip = cone_clip_db[cone] if clip: cone.set_clip([Union(clip)]) # clip long joins against the extreme edges for join_item, left, right in join_items_needing_clipped: if left: clip = left.get_clip() if right: clip += right.get_clip() join_item.set_clip(clip) ##################################################################### # # add the clipped objects to the list # ##################################################################### objects += all_cones return objects neuron-7.5/share/lib/python/neuron/rxd/geometry3d/ctng.so000077500000000000000000071140301323325274500235660ustar00rootroot00000000000000ELF>P_@@8@$!ÔÝ ÔÝ àì àì)àì)è>xI øì øì)øì)ÐÐÈÈÈ$$PåtdÐÄ ÐÄ ÐÄ ””QåtdRåtdàì àì)àì)  GNU ?É ap• VDâGŸÂ'2ûG ‹¨À `-‹Ž‘BEÕì»ã’|¹ñëÓïµ^ÓÙqXE¿’s àXÒ ÷J8L†¿ ÝÜS=ÔP ¾*ËÃ%}´‚TFé„Yêa ~£¨xkݹùûé›tÝ£$Ï5„³tÏà„§·dÝwQñí —S”⊎†b ô¤=x@us_Îk£?-ûá´?G0a +U’¦ÿÉ–Ìiÿ»;¬ód,K8 ¯Z2R"lC ä*À·¶Ðd‚ È+*• X6* àX ”§  ,*‰ È+*!  Š ò__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasses_Py_NoneStruct_PyThreadState_CurrentPyExc_ValueErrorPyErr_FormatPyErr_SetStringPyExc_StopIterationPyErr_GivenExceptionMatches_PyObject_GC_NewPyObject_GC_TrackPyList_AppendPyBuffer_ReleasePyType_IsSubtypefree_Py_CheckRecursionLimitPyObject_Call_Py_CheckRecursiveCallPyErr_OccurredPyExc_SystemErrorPyObject_GetAttrPyObject_GC_UnTrackPyFrame_NewPyTraceBack_HerePyString_FromStringPyString_FromFormatPyCode_NewPyMem_ReallocPyMem_MallocPyDict_NewPyList_NewPyDict_SetItemPyExc_NameErrorPyExc_TypeErrorPyFloat_FromDoublePyTuple_New__stack_chk_failPyInt_Type_Py_ZeroStruct_Py_TrueStructPyFloat_TypePyObject_RichComparePyExc_AttributeErrorPyErr_ExceptionMatchesPyExc_ImportErrorPyObject_ClearWeakRefsPyObject_GC_DelPyImport_ImportPyOS_snprintfPyErr_WarnExPyDict_SetItemStringPyRun_StringFlagsPyErr_WriteUnraisablePyExc_RuntimeWarningPyDict_NextPyString_Type_PyString_EqPyString_AsStringPyUnicodeUCS4_ComparePyInt_FromLongPyLong_TypePyFPE_counterPyFPE_jbuf_setjmpPyNumber_SubtractPyFPE_dummyPyExc_FloatingPointErrorPyLong_AsDoublePyNumber_DividePyNumber_AddPyList_TypePyTuple_TypePyInt_FromSsize_tPyObject_GetItemPyObject_SetItemPyDict_GetItemPyModule_GetDictPyObject_CallFunctionObjArgsPyCFunction_TypePyNumber_IntPyNumber_LongPyLong_AsLongPyExc_OverflowErrorPyExc_RuntimeErrorPyExc_GeneratorExitPyErr_SetNonePyErr_Clear_PyObject_CallFunction_SizeTPyObject_GetIterPyMethod_TypePyDict_ContainsPyTraceBack_TypePyErr_NormalizeExceptionPyExc_BaseExceptionPyFloat_AsDoublePyNumber_MultiplyPySequence_ListPySequence_TuplePyExc_UnboundLocalErrorPySequence_GetItemPyArg_UnpackTuplePyObject_CallObjectPyObject_IsTruePyUnicodeUCS4_FormatPyObject_GetBuffermallocPyErr_FetchPyErr_RestorePyNumber_InPlaceDividePyObject_SizePyDict_SizePyObject_HasAttrPySequence_ContainsmemcmpPyNumber_InPlaceAddPyNumber_NegativePyNumber_PowerPySlice_NewPyUnicode_TypePyFloat_FromStringinitctngPy_GetVersionPyString_FromStringAndSizePyObject_GenericGetAttrPyObject_SelfIterPyImport_AddModulePyObject_GetAttrStringPyType_ReadyPyObject_SetAttrStringPy_InitModule4_64PyString_InternFromStringPyUnicodeUCS4_DecodeUTF8__pyx_module_is_main_neuron__rxd__geometry3d__ctngPyTuple_PackPyCFunction_NewExPyImport_ImportModulelibc.so.6_edata__bss_start_end/usr/lib/openmpi/libGLIBC_2.4GLIBC_2.2.5x ii ¯ ui ¹ àì)P5èì)5@ó)@ó) þ)0/*¨þ)È.*°þ)h.*¸þ) /*Àþ)¸.*Èþ)X.*Ðþ)ð1*àþ)À/*èþ)ð1*ðþ)`3*ÿ)-« 0ÿ)`W¸ÿ)pMàÿ)p€èÿ) *ðÿ) *øÿ) *x*m *ת ¨*`;°*pN¸*!« È*7« Ð*p;Ø*Nà*x *D« H*O« h*˜Â  *\« ¨*‚¸*È À*ÿ© È*†Ø*(à à*a« è*`hø*˜Ã *H5*(*Oý)H*@5*P*0û)p*85*x*`õ)˜*05* *`ó)À*(5*È*àø)è* 5*ð*+ü)*5** õ)8*5*@*¶ü)`*5*h*Ðø)ˆ*5**Àø)°*ø4*¸* û)Ø*ð4*à*$ü)*è4** ù)(*à4*0*°ü)P*Ø4*X*ù)x*Ð4*€*¨ý) *È4*¨*ú)È*À4*Ð*¤ý)ð*¸4*ø*ü)*°4* *Jý)@*¨4*H*ªü)h* 4*p*Eý)*˜4*˜*€ù)¸*4*À*¤ü)à*ˆ4*è*žü)*€4**˜ü)0*x4*8*ü)X*p4*`*ü)€*h4*ˆ*û)¨*`4*°*@ý)Ð*X4*Ø*pù)ø*P4**;ý) *H4*(*°ø)H*@4*P*’ü)p*84*x*Œü)˜*04* * ø)À*(4*È*6ý)è* 4*ð*ø)*4**0ö)8*4*@*àô)`*4*h*ø)ˆ*4**€ø)°*ø3*¸* þ)Ø*ð3*à*†ü) *è3* *þ)( *à3*0 *þ)P *Ø3*X *3þ)x *Ð3*€ *þ)  *È3*¨ *ÿý)È *À3*Ð *pø)ð *¸3*ø *˜û) *°3* *û)@ *¨3*H *ü)h * 3*p *€ü) *˜3*˜ *zü)¸ *3*À *ü)à *ˆ3*è *p÷) *€3* *ˆû)0 *x3*8 *û)X *p3*` * ý)€ *h3*ˆ *œý)¨ *`3*° *üý)Ð *X3*Ø *ú)ø *P3* *ðú) *H3*( *àú)H *@3*P * ô)p *83*x *€û)˜ *03*  *tü)À *(3*È *xû)è * 3*ð *Ðú) *3* *úû)8 *3*@ *óû)` *3*h *P÷)ˆ *3* *-þ)° *ø2*¸ *nü)Ø *ð2*à *àõ)*è2**+þ)(*à2*0*èû)P*Ø2*X*˜ý)x*Ð2*€*Àú) *È2*¨*°ú)È*À2*Ð*ðù)ð*¸2*ø*àù)*°2* *)þ)@*¨2*H*Ðù)h* 2*p*°ö)*˜2*˜*'þ)¸*2*À*1ý)à*ˆ2*è*à÷)*€2**Ýû)0*x2*8*#þ)X*p2*`*”ý)€*h2*ˆ*(ý)¨*`2*°*hü)Ð*X2*Ø*`ø)ø*P2** ú) *H2*(*ú)H*@2*P*ý)p*82*x*pû)˜*02* *Œý)À*(2*È*hû)è* 2*ð*bü)*2**`ô)8*2*@*`ù)`*2*h*Pö)ˆ*2**À÷)°*ø1*¸*ˆý)Ø*ð1*à* ù)*è1**\ü)(*à1*0*pö)P*Ø1*X* ô)x*Ð1*€*ø) *È1*¨*ð÷)È*À1*Ð*Ð÷)ð*¸1*ø*Öû)*°1* *ö)@*¨1*H*÷)h* 1*p*ðö)*˜1*˜*ù)¸*1*À*!ý)à*ˆ1*è*ù)*€1**Pø)0*x1*8*Vü)X*p1*`*`û)€*h1*ˆ*!þ)¨*`1*°*ùý)Ð*X1*Ø*öý)ø*P1**Ïû) *H1*(*°÷)H*@1*P*Àù)p*81*x*@ø)˜*01* *Xû)À*(1*È*ý)è* 1*ð*óý)*1**„ý)8*1*@*€ý)`*1*h*ý)ˆ*1**ý)°*ø0*¸* ý)Ø*ð0*à*|ý)*è0**ý)(*à0*0*ý)P*Ø0*X*þü)x*Ð0*€*xý) *È0*¨*tý)È*À0*Ð*0ø)ð*¸0*ø*ðø)*°0* *þ)@*¨0*H*ïý)h* 0*p*ûü)*˜0*˜*ëý)¸*0*À*øü)à*ˆ0*è*èý)*€0**åý)0*x0*8*Pù)X*p0*`* ÷)€*h0*ˆ*Pü)¨*`0*°*pý)Ð*X0*Ø*Èû)ø*P0**Jü) *H0*(*÷)H*@0*P*lý)p*80*x*hý)˜*00* *Àû)À*(0*È*€ú)è* 0*ð*óü)*0**pú)8*0*@*¸û)`*0*h*@ù)ˆ*0**îü)°*ø/*¸*°û)Ø*ð/*à* ø)*è/**`ú)(*à/*0*àó)P*Ø/*X*Dü)x*Ð/*€*>ü) *È/*¨*8ü)È*À/*Ð*§û)ð*¸/*ø*0÷)*°/* *âý)@*¨/*H*0ù)h* /*p*éü)*˜/*˜*dý)¸*/*À*Pû)à*ˆ/*è*àü)*€/**2ü)0*x/*8*°ù)X*p/*`*Øü)€*h/*ˆ*Ðö)¨*`/*°* õ)Ð*X/*Ø*þ)ø*P/* *Óü) *H/*( *Îü)H *@/*P *Pú)p *8/*x * ó)˜ *0/*  *þ)À *(/*È *Þý)è * /*ð *Ëü)!*/*!*Úý)8!*/*@!*Èü)`!*/*h!*×ý)ˆ!*/*!*Ôý)°!*ø.*¸!*`ý)Ø!*ð.*à!*Ñý)"*è.*"* û)("*à.*0"*Hû)P"*Ø.*X"*@ú)x"*Ð.*€"*Îý) "*È.*¨"*þ)È"*À.*Ð"*Êý)ð"*¸.*ø"*Åü)#*°.* #*Æý)@#*¨.*H#*Âü)h#* .*p#*Ãý)#*˜.*˜#*Àý)¸#*.*À#*\ý)à#*ˆ.*è#*½ý)$*€.*$*@û)0$*x.*8$*0ú)X$*p.*`$*ºý)€$*h.*ˆ$*þ)¨$*`.*°$*¶ý)Ð$*X.*Ø$*¿ü)ø$*P.*%*²ý) %*H.*(%*¼ü)H%*@.*P%*¯ý)p%*8.*x%*¬ý)˜%*0.* %*Xý)À%*(.*È%*Tý)è%* .*ð%* ú)X&*Ðà p&* Eø&*à6'*07x'*pVø'*Ä (*ÀE˜(*M (*@6)* U˜)*@Ä °)*€F8**€5@**Ð5¸**V +*à¿ (+*À@@+*[ª H+*±`+*g« Èî)Ðî) Øî) àî) èî)ðî)øî)!ï)ï)(ï)*ï)0 ï)1(ï)70ï)88ï)E@ï)GHï)HPï)JXï)K`ï)Mhï)Wpï)Zxï)[€ï)cˆï)dï)h˜ï)i ï)m¨ï)n°ï)p¸ï)rÀï)sÈï)wÐï)yØï)zàï)|èï)~ðï)†øï)ˆð) ð)(ð)0ð)8ð)@ð)Hð) Pð) Xð)`ð)hð)pð)xð)€ð)ˆð)ð)˜ð) ð)¨ð)°ð)¸ð)Àð)Èð)Ðð)Øð) àð)"èð)#ðð)$øð)%ñ)&ñ)'ñ))ñ)+ ñ),(ñ)-0ñ).8ñ)/@ñ)2Hñ)3Pñ)4Xñ)5`ñ)6hñ)9pñ):xñ);€ñ)<ˆñ)=ñ)>˜ñ)? ñ)@¨ñ)A°ñ)B¸ñ)CÀñ)DÈñ)FÐñ)IØñ)Làñ)Nèñ)Oðñ)Pøñ)Qò)Rò)Sò)Tò)U ò)V(ò)X0ò)Y8ò)\@ò)]Hò)^Pò)_Xò)``ò)ahò)bpò)exò)f€ò)gˆò)jò)k˜ò)l ò)o¨ò)q°ò)t¸ò)uÀò)vÈò)xÐò){Øò)}àò)èò)€ðò)øò)‚ó)ƒó)„ó)…ó)‡ ó)‰(ó)ŠHƒìH‹]–)H…ÀtèKHƒÄÃÿ5—)ÿ%—)@ÿ%—)héàÿÿÿÿ%ú–)héÐÿÿÿÿ%ò–)héÀÿÿÿÿ%ê–)hé°ÿÿÿÿ%â–)hé ÿÿÿÿ%Ú–)héÿÿÿÿ%Ò–)hé€ÿÿÿÿ%Ê–)hépÿÿÿÿ%–)hé`ÿÿÿÿ%º–)h éPÿÿÿÿ%²–)h é@ÿÿÿÿ%ª–)h é0ÿÿÿÿ%¢–)h é ÿÿÿÿ%š–)h éÿÿÿÿ%’–)héÿÿÿÿ%Š–)héðþÿÿÿ%‚–)héàþÿÿÿ%z–)héÐþÿÿÿ%r–)héÀþÿÿÿ%j–)hé°þÿÿÿ%b–)hé þÿÿÿ%Z–)héþÿÿÿ%R–)hé€þÿÿÿ%J–)hépþÿÿÿ%B–)hé`þÿÿÿ%:–)héPþÿÿÿ%2–)hé@þÿÿÿ%*–)hé0þÿÿÿ%"–)hé þÿÿÿ%–)héþÿÿÿ%–)héþÿÿÿ% –)héðýÿÿÿ%–)h éàýÿÿÿ%ú•)h!éÐýÿÿÿ%ò•)h"éÀýÿÿÿ%ê•)h#é°ýÿÿÿ%â•)h$é ýÿÿÿ%Ú•)h%éýÿÿÿ%Ò•)h&é€ýÿÿÿ%Ê•)h'épýÿÿÿ%•)h(é`ýÿÿÿ%º•)h)éPýÿÿÿ%²•)h*é@ýÿÿÿ%ª•)h+é0ýÿÿÿ%¢•)h,é ýÿÿÿ%š•)h-éýÿÿÿ%’•)h.éýÿÿÿ%Š•)h/éðüÿÿÿ%‚•)h0éàüÿÿÿ%z•)h1éÐüÿÿÿ%r•)h2éÀüÿÿÿ%j•)h3é°üÿÿÿ%b•)h4é üÿÿÿ%Z•)h5éüÿÿÿ%R•)h6é€üÿÿÿ%J•)h7épüÿÿÿ%B•)h8é`üÿÿÿ%:•)h9éPüÿÿÿ%2•)h:é@üÿÿÿ%*•)h;é0üÿÿÿ%"•)h<é üÿÿÿ%•)h=éüÿÿÿ%•)h>éüÿÿÿ% •)h?éðûÿÿÿ%•)h@éàûÿÿÿ%ú”)hAéÐûÿÿÿ%ò”)hBéÀûÿÿÿ%ê”)hCé°ûÿÿÿ%â”)hDé ûÿÿÿ%Ú”)hEéûÿÿÿ%Ò”)hFé€ûÿÿÿ%Ê”)hGépûÿÿÿ%”)hHé`ûÿÿÿ%º”)hIéPûÿÿÿ%²”)hJé@ûÿÿÿ%ª”)hKé0ûÿÿÿ%¢”)hLé ûÿÿÿ%š”)hMéûÿÿÿ%’”)hNéûÿÿÿ%Š”)hOéðúÿÿÿ%‚”)hPéàúÿÿÿ%z”)hQéÐúÿÿÿ%r”)hRéÀúÿÿÿ%j”)hSé°úÿÿÿ%b”)hTé úÿÿÿ%Z”)hUéúÿÿÿ%R”)hVé€úÿÿÿ%J”)hWépúÿÿÿ%B”)hXé`úÿÿÿ%:”)hYéPúÿÿÿ%2”)hZé@úÿÿÿ%*”)h[é0úÿÿÿ%"”)h\é úÿÿÿ%”)h]éúÿÿÿ%”)h^éúÿÿÿ% ”)h_éðùÿÿÿ%”)h`éàùÿÿÿ%ú“)haéÐùÿÿÿ%ò“)hbéÀùÿÿÿ%)fÿ%š)fUSVH‹_H…ÛtqH‹CH‹ H…Òtö€ª tHƒz tY[]é\úÿÿH‹5%Ö)H‰ýH9ðt H‰Çè¥þÿÿ…ÀtH‹C8Hƒx8t#H‹}(Z[]éºùÿÿHÿ u H‹CH‰ßÿP0HÇEX[]Ãò\ýATUò\ôSò\Ðò\ÙHƒì fD(ÏfD(ÆòDYÊòDYÃòE\ÈEWÀfE.ÈzuH‹R)HÿéfD(Ñ…ÿòD\Õf(èò\ìòAYòòYýf(æò\çòA^áf(ôt*fA.àsWä1Àf.ô“Àëò%%d 1Àf.æ“ÀÿÈu—òYÖò\$òL$òt$òXÂèYûÿÿH…ÀH‰Åt@òt$ò\$òD$òYóòXÆè2ûÿÿH…ÀH‰Ãt>¿è°ûÿÿH…Àt7H‰hH‰X ëYA¼ÌH DU H=]U ºD‰æè æ1Àë4A¼ÎëA¼ÐHÿMu H‹EH‰ïÿP0H…Ût¾Hÿ u¹H‹CH‰ßÿP0ë­HƒÄ []A\ÃSHÿH‰óuH‹GÿP0H‹À)H5W H‰ÚH‹81ÀèäüÿÿƒÈÿ[ÃUSH‰óQètãH…ÀH‰Åu/H‹Ž)H‹8è úÿÿ…ÀtH‹ú)HS$H5VG H‹81ÀèüÿÿH‰èZ[]ÃHƒì(dH‹%(H‰D$1ÀH‹FH;§)u-H‹V¸H)ÐyH1Ây H‰ÇèêûÿÿëUH‹‰)H‹@`ÿPëEH;ÙŒ)u7H‹¸)òNHÇ$òL$‹H…À‰ u,H‹=»Œ)èîùÿÿ…ÀuRëèSüÿÿH‹L$dH3 %(tbèŽøÿÿòH*$ò\D$H|$òD$èbøÿÿò,ÀH‹G)òD$)èZùÿÿëµH‹ÁŒ)H5¶F H‹8èrøÿÿH‹)Ç1ÀëŽHƒÄ(ÃHƒì(dH‹%(H‰D$1ÀH‹GH;Œ)u òOòL$ëOH;‡Œ)uòH*WòT$ë8H;xŒ)u(èIúÿÿf.ya òD$zuèrùÿÿH‰Â1ÀH…Òt ë_èqøÿÿëXH‹ˆŒ)‹H…À‰ uH‹=ž‹)èÑøÿÿ…ÀuKòD$H|$òY*a òD$è_÷ÿÿò,ÀH‹DŒ)òD$)èWøÿÿH‹L$dH3 %(t,èB÷ÿÿH‹«‹)H5©E H‹8è\÷ÿÿH‹Œ)Ç1ÀëÄHƒÄ(ÃUSAPH‹GH;Œ)u H‹GH‹ðHÿëlH;ñŠ)u H‹\÷HÿëYH‹@hH…ÀtH‹@H…ÀtY[]ÿàH‰ýH‰÷è#÷ÿÿH…ÀH‰Ãt/H‰ïH‰Æè÷ÿÿH‰ÅH‹HPÿH…ÒH‰uH‹CH‰ßH‰ëÿP0ëH‰ëH‰ØZ[]ÃAUATI‰õUSI‰üAPH‹GH;t‹)u.H‹G½H‹8HÿI‹D$H‰0H‹HÿÈH…ÀH‰udH‹GÿP0ë[H‹@hH…ÀtH‹@(H…ÀtY[]A\A]H‰ò1öÿà1ÿƒÍÿèröÿÿH…ÀH‰Ãt)L‰êH‰ÆL‰çè,ôÿÿH‹ ‰ÅHQÿH…ÒH‰u H‹CH‰ßÿP0Z‰è[]A\A]ÃSH‹׊)H9Gu è¤ÞÁø‰Ãë2H‰òH‹5{Ï)ƒËÿèû H…ÀtH‹1ÛHQÿH…ÒH‰u H‹PH‰ÇÿR0‰Ø[ÃAVAUATUH‹-ñ‰)SH9ïu&H‹œ‰)H5}P A¼§ ½HH‹8è‚õÿÿé‘I‰üI‰õI‰Öèoôÿÿ…Àxtu41ÿè‚óÿÿH…ÀH‰Ã„¯H‰ÂL‰îL‰çèøÿÿ…ÀxtHÿ u H‹CH‰ßÿP0L‰îL‰çèJõÿÿH…ÀH‰Ã„„L‰öH‰Çè ÿÿÿÿÀtLHÿ u H‹CH‰ßÿP0HÿEH‰èëjA¼© ½HH õO H=®U ‰êD‰æèÔà1ÀëCA¼º ½Ië A¼Ó ½JHÿ uÇH‹CH‰ßÿP0ë»A¼´ ½Ië®A¼Ñ ½Jë¡[]A\A]A^ÃAWAVAUATI‰üUSA‰õHƒìHH‹=ÁÊ)èTùH…ÀI‰Á„H‹5ÙÍ)H‰ÇH‰$èÞH…ÀI‰ÂL‹ $„÷ Iÿ uH‰$I‹AL‰ÏÿP0L‹$H‹5È)L‰çL‰$èÛÝH…ÀI‰ÁL‹$„Ð H‹5”Ç)L‰çH‰D$è·ÝH…ÀH‰ÅL‹$L‹L$„º H‹5 Ç)L‰çè“ÝH…ÀI‰ÇL‹$L‹L$„Ê ¿èÄñÿÿH…ÀH‰ÃL‹$L‹L$„¹ H‹@L‰H‹CH‰hH‹CL‰xH‹)‡)I9Bu$M‹zM…ÿtM‹rIÿIÿIÿ uFI‹BL‰×ÿP0ë:L‰×H‰ÞL‰$èXûH…ÀH‰D$L‹$„ Hÿ urH‹CL‰$H‰ßÿP0L‹$ë^¿ècôÿÿH…ÀH‰Å„1ÒL‰}H‰] H‰îL‰÷èÒÛH…ÀH‰D$„- H‹EM‰òHÿÈH…ÀH‰EuH‹EL‰4$H‰ïÿP0L‹$Iÿ u I‹BL‰×ÿP0H‹=ñÈ)è„÷H…ÀI‰Â„ H‹5 Ì)H‰ÇH‰$èEÜH…ÀH‰ÅL‹$„ Iÿ u I‹BL‰×ÿP0H‹5GÆ)L‰çèÜH…ÀI‰Â„ H‹5ÄÅ)L‰çH‰$èøÛH…ÀH‰ÃL‹$„ô H‹5AÅ)L‰çèÙÛH…ÀI‰ÇL‹$„ä ¿èðÿÿH…ÀI‰ÁL‹$„ó H‹@L‰I‹AH‰XI‹AL‰xH‹y…)H9Eu-L‹}M…ÿt$L‹uIÿIÿHÿMuFH‹EL‰ $H‰ïÿP0L‹ $ë2L‰ÎH‰ïL‰ $èŸùH…ÀH‰D$L‹ $„®Iÿ uhI‹AL‰ÏÿP0ë\¿L‰ $è®òÿÿH…ÀH‰ÃL‹ $„¡1ÒL‰{L‰K H‰ÞL‰÷èÚH…ÀH‰D$„U H‹L‰õHÿÈH…ÀH‰u H‹CH‰ßÿP0HÿMu H‹EH‰ïÿP0E…ítAÿÍ„†éH‹D$L‰çHÿH‹5SÆ)è–ÚH…ÀI‰Æ„ H‹{„)H9Xu òPòT$ëH‰Çè¨òÿÿòD$òZ ò\$ò$f.ØŠ…þèêñÿÿH…À„ðéî H‹D$L‰çHÿH‹5ÂÅ)èÚH…ÀI‰Æ„Æ H‹úƒ)H9Xu òxò|$ëH‰Çè'òÿÿòD$òY òT$ò$f.Њ… èiñÿÿH…À„üé— H‹=´É)è¿ôH…ÀI‰Æ„z H‹5lÂ)1ÒH‰Çè¢ØH…ÀI‰Ä„$Iÿu I‹FL‰÷ÿP01Ò1öL‰çè‹ Iÿ $…b I‹D$L‰çÿP0éR Iÿu I‹FL‰÷ÿP0H‹5ÓÄ)L‰çè#ÙH…ÀI‰Æ„¿ H9Xu ò`òd$ ëH‰Çè<ñÿÿòD$ òl$ f.,$zuè’ðÿÿH…À…° Iÿu I‹FL‰÷ÿP0L‹-ÓÁ)H‹D$IÿEH‰$ësIÿu I‹FL‰÷ÿP0H‹5VÄ)L‰çè–ØH…ÀI‰Æ„\ H9X…ïòXò\$ òd$ f.$$‹æIÿu I‹FL‰÷ÿP0L‹->Á)H‹D$IÿEH‰$òD$òL$òYD$ òYÉòL$(ò\ÁèïÿÿH…ÀH‰Å„K H‹5±Ç)L‰çèØH…ÀI‰Æ„M H‰ÆH‰ïèªîÿÿH…ÀH‰Ã„¶HÿMu H‹EH‰ïÿP0Iÿu I‹FL‰÷ÿP0H‹°)H9Cu òSòT$ëH‰ßèÝïÿÿòD$ò\$f.1W z!uè0ïÿÿH…Àt¾$E1äºqE1Ûé˜Hÿ u H‹CH‰ßÿP0H‹t$H‹|$èøðÿÿH…ÀH‰Ã„± H‹5ÝÆ)L‰çè-×H…ÀI‰Æ„ H‰ÆH‰ßèÖíÿÿH…ÀI‰Ä„Hÿ u H‹CH‰ßÿP0Iÿu I‹FL‰÷ÿP0H‹=åÆ)èòH…ÀH‰Å„m òD$èÉíÿÿH…ÀI‰Æ„] H‰ÆL‰ïèRìÿÿH…ÀH‰Ã„¹Iÿu I‹FL‰÷ÿP0L‰æH‰ßè,ìÿÿH…ÀI‰Æ„: Hÿ u H‹CH‰ßÿP0H‹<$L‰öèuëÿÿH…ÀH‰Ã„sIÿu I‹FL‰÷ÿP0H‰ßèrïÿÿH…ÀI‰Æ„ Hÿ u H‹CH‰ßÿP0H‹=¨Â)è;ñH…ÀI‰Á„DH‹5¸À)H‰ÇH‰D$ èûÕH…ÀI‰ÇL‹L$ „9Iÿ u I‹AL‰ÏÿP0òD$òYÀòXD$(èÆìÿÿH…ÀI‰Á„ H‹›)I9G…DM‹WM…Ò„7I‹GIÿHÿIÿH‰D$uI‹GL‰L$(L‰ÿL‰T$ ÿP0L‹T$ L‹L$(¿L‰L$(L‰T$ èæìÿÿH…ÀI‰ÃL‹T$ L‹L$(… L‹|$¾gºs1ÛIÿu8I‹FL‰L$8L‰÷L‰T$0L‰\$(‰T$ ‰t$ÿP0L‹L$8L‹T$0L‹\$(‹T$ ‹t$M…É…ÄM…Ò…÷H…í… M…ÿ…JH…Ût)Hÿ u$H‹CL‰\$(H‰ß‰T$ ‰t$ÿP0L‹\$(‹T$ ‹t$M…ÛtIÿ uI‹C‰T$ L‰ß‰t$ÿP0‹T$ ‹t$H µE H=>L 1Ûè—ÖHƒ|$t'H‹D$H‹L$H‹H‰D$HÿÈH…ÀH‰u H‹AH‰ÏÿP0Hƒ|$t'H‹D$H‹L$H‹H‰D$HÿÈH…ÀH‰u H‹AH‰ÏÿP0Hƒ<$t%H‹$H‹ $H‹H‰D$HÿÈH…ÀH‰u H‹AH‰ÏÿP0M…ítIÿMu I‹EL‰ïÿP0M…ätIÿ $u I‹D$L‰çÿP0H…Û„ØHÿ …ÏH‹CH‰ßÿP0éÀH‰ÇèÉëÿÿòD$ é ûÿÿ…ûÿÿè#ëÿÿH…À„ûÿÿéfL‰ÎL‰ÿL‰L$è¥ñH…ÀH‰ÃL‹L$„ Iÿ uVI‹AL‰ÏÿP0ëJH‹|$M‰S1ÒM‰K L‰ÞL‰\$ è7ÒH…ÀH‰ÃL‹\$ „ƒI‹L‹|$HÿÈH…ÀI‰u I‹CL‰ßÿP0Iÿu I‹GL‰ÿÿP0¿è çÿÿH…ÀI‰Ç„[H‹@L‰þL‰÷H‰èÂçÿÿH…ÀH‰Ã„UIÿu I‹FL‰÷ÿP0Iÿu I‹GL‰ÿÿP0H‰ßè ëÿÿH…ÀI‰Ç„^Hÿ u H‹CH‰ßÿP01ÒL‰þH‰ïèxÑH…ÀH‰Ã„KHÿMu H‹EH‰ïÿP0Iÿu I‹GL‰ÿÿP0HÿéÆýÿÿIÿ …3ýÿÿI‹AL‰T$0L‰ÏL‰\$(‰T$ ‰t$ÿP0L‹T$0L‹\$(‹T$ ‹t$éýÿÿIÿ …ýÿÿI‹BL‰\$(L‰×‰T$ ‰t$ÿP0L‹\$(‹T$ ‹t$é×üÿÿHÿM…ÖüÿÿH‹EL‰\$(H‰ï‰T$ ‰t$ÿP0L‹\$(‹T$ ‹t$é­üÿÿIÿ…­üÿÿI‹GL‰\$(L‰ÿ‰T$ ‰t$ÿP0L‹\$(‹T$ ‹t$é„üÿÿ1í¾ ºpE1Û1ÛE1ÿE1ÒE1ÉE1íHÇ$éùûÿÿ¾ ºqE1ÛE1ÿE1ÒE1ÉE1äéÛûÿÿ1í¾3ºrE1ÛE1ÿE1ÒE1Éé¾ûÿÿ¾Eë¾KºsE1ÛE1ÿE1ÒE1Ééœûÿÿ¾QºsE1Û1ÛE1ÿE1Òé‚ûÿÿ¾SºsE1Û1ÛE1Òékûÿÿ¾VºsE1Û1ÛE1ÒéTûÿÿL‹|$¾mºsE1ÒE1Éé:ûÿÿ¾rºsE1ÛE1ÒE1Éé"ûÿÿ¾wºsE1ÛE1ÒE1Éé ûÿÿ¾cºsE1ÛE1Òéõúÿÿ¾ºc1ÛE1ÿ1íE1Òër¾ºc1ÛE1ÿ1íë_¾!ºc1ÛE1ÿ1íëLE1ä¾#ºc1ÛE1ÿE1íHÇ$HÇD$HÇD$én¾%ºc1Ûë ¾'ºcE1äE1íHÇ$HÇD$HÇD$é1M‰òHÇ$HÇD$¾Gºc1ÛE1ÿE1ÉE1äE1íé¾Vºd1ÛE1ÿ1íëXE1ä¾Xºd1ÛE1ÿE1ÉE1íHÇ$HÇD$鿾[ºd1ÛE1ÿë¾]ºdE1ÿë ¾_ºdE1ÉE1äE1íHÇ$HÇD$év¾aºdE1äE1íHÇ$HÇD$éPL‰õHÇ$¾ºdE1ÿE1ÒE1ÉE1äE1íé'H‹D$¾¤ºhH‰$ëQH‹D$¾±ºiH‰$ëé.I‹FH;xs)t H;gr)…´I‹VHƒútlL‰|$L‹,$M‰÷~"H‹jr)H5Ã; ºH‹81ÀèŒáÿÿé H…Òˆ HÊ+ H ¿- HƒúH5-@ HDÈH‹"r)H‹81ÀèPáÿÿéà H;äq)u M‹fI‹n ë I‹FL‹ H‹hIÿ$HÿEIÿ…I‹FL‰÷ÿP0éöL‰÷è…àÿÿH…ÀI‰Å„¯ Iÿu I‹FL‰÷ÿP0I‹EL‰ïL‹°àAÿÖH…ÀI‰ÄtGL‰ïAÿÖH…ÀH‰ÅtIL‰ïAÿÖH…Àt¾H‰ÇèœãÿÿëètÄ…ÀˆD IÿMuI‹EL‰ïÿP0ësM‰îL‰|$L‹,$1íëM‰îL‹,$L‰|$½Iÿu I‹FL‰÷ÿP0è%Ä…À…0 H™* H Ž, HƒýH5ü> H‰êHDÈH‹îp)H‹81Àèàÿÿéú I‹D$H‹«p)H9Є¸L;%q)„«H‹HH‹ºp)H5g+ HZ+ L‰|$L‹,$H‹81ÀèÉßÿÿ¾« éW L‹,$L‰|$IÿMu I‹EL‰ïÿP0Hƒ|$uFH‹7q)H/+ H5y> I‰ÜE1ö1ÛE1íE1ÿH‹81ÀèqßÿÿH‹l$¾^ ¸DE1É1Òé9Hƒ|$uFH‹ép)Hé* H5+> I‰ÜE1ö1ÛE1íE1ÿH‹81Àè#ßÿÿH‹l$¾_ ¸DE1É1Òéë¿è0ÝÿÿH…ÀI‰Ç„{ H‹D$HÿI‰GH‹D$HÿI‰G éTE1äH…í„. HÇD$¾B ¸>E1ÛE1É1ÒE1öHÇD$HÇD$H‹MHyÿH…ÿH‰}…L‹EL‰\$8H‰ïH‰T$0L‰L$(‰D$ ‰4$AÿP0‹4$‹D$ L‹L$(H‹T$0L‹\$8éEH‹EH9Ð…oH…ÛtHÿ u H‹CH‰ßÿP0M…ÿ…•H‹=I²)èÔßH…ÀI‰Ç„ H‹5A±)H‰Çè™ÄH…ÀH‰Ã„ÇIÿu I‹GL‰ÿÿP0H‹=ÿ°)è’ßH…ÀI‰Å„ñ H‹5´)H‰ÇèWÄH…ÀI‰Æ„ô IÿMu I‹EL‰ïÿP0H‹n)I9F…îM‹nM…í„áI‹NIÿEHÿIÿuI‹FH‰L$ L‰÷ÿP0H‹L$ ¿H‰L$ èzÛÿÿH…ÀI‰ÆH‹L$ …ÆM‰îL‹,$I‰ÁH‰Ê¾Ñ ¸?E1ÿH‰ßH‰l$L‰ãI‰üE1ÛM…ÿ…í M…ítHI‹MHyÿH…ÿI‰}u7M‹EL‰\$8L‰ïH‰T$0L‰L$(‰D$ ‰4$AÿP0L‹\$8H‹T$0L‹L$(‹D$ ‹4$M…ätII‹ $HyÿH…ÿI‰<$u8M‹D$L‰\$8L‰çH‰T$0L‰L$(‰D$ ‰4$AÿP0L‹\$8H‹T$0L‹L$(‹D$ ‹4$M…ötFI‹HyÿH…ÿI‰>u7M‹FL‰\$8L‰÷H‰T$0L‰L$(‰D$ ‰4$AÿP0L‹\$8H‹T$0L‹L$(‹D$ ‹4$H…Òt1Hÿ u,H‹JL‰\$0H‰×L‰L$(‰D$ ‰4$ÿQ0L‹\$0L‹L$(‹D$ ‹4$M…Ét'Iÿ u"I‹QL‰\$(L‰Ï‰D$ ‰4$ÿR0L‹\$(‹D$ ‹4$M…ÛtIÿ uI‹S‰D$ L‰ß‰4$ÿR0‹D$ ‹4$H t3 H=µ: ‰ÂE1ÿèSÄH…ÛtHÿ u H‹CH‰ßÿP0Hƒ|$t&H‹D$H‹t$H‹H‰$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Hƒ|$t&H‹D$H‹t$H‹H‰$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Hƒ|$„´H‹D$H‹t$H‹H‰$HÿÈH…ÀH‰…”H‹FH‰÷ÿP0é…èÃØÿÿéûÿÿH;-ßk)„„üÿÿH‹HH‹†k)H53& H&& L‰|$L‹,$H‹81Àè•Úÿÿ¾¬ é#Iÿ…büÿÿI‹GL‰ÿÿP0éSüÿÿM‰nIÿ$1ÒH‰ÏM‰f L‰öH‰L$ èÀH…ÀI‰ÇH‹L$ „¬IÿuI‹FL‰÷ÿP0H‹L$ Hÿ u H‹AH‰ÏÿP0H‹=B­)èÕÛH…ÀI‰Æ„ôH‹5Z°)H‰ÇèšÀH…ÀI‰Å„úIÿu I‹FL‰÷ÿP0H‹`j)I9EuUM‹uM…ötLI‹MIÿHÿIÿM…ÝI‹EH‰L$ L‰ïÿP0H‹L$ éÄL‰æL‰÷èÞH…ÀI‰Ç„0L‰ñéMÿÿÿH‰îL‰ïèbÞH…ÀI‰Æ„òL‰éHÿ u H‹AH‰ÏÿP0L‰öL‰ÿè™ÙÿÿH…ÀI‰Å„‰Iÿu I‹GL‰ÿÿP0Iÿu I‹FL‰÷ÿP0H‹ i)H9C…L‹sM…ö„tH‹KIÿHÿHÿ …ƒH‹CH‰L$ H‰ßÿP0H‹L$ ëm¿H‰L$ èùÖÿÿH…ÀI‰ÅH‹L$ „cM‰uHÿE1ÒH‰ÏI‰m L‰îH‰L$ èZ¾H…ÀI‰ÆH‹L$ „¶IÿM…ÿÿÿI‹EL‰ïÿP0H‹L$ éÿÿÿ¿H‰L$ èŒÖÿÿH…ÀI‰ÇH‹L$ „ŸM‰w1ÒH‰ÏM‰o L‰þH‰L$ èñ½H…ÀI‰ÆH‹L$ „‹I‹H‰ËHÿÈH…ÀI‰u I‹GL‰ÿÿP0Hÿ u H‹CH‰ßÿP0H‹‡h)I9FuòAfòd$ ëL‰÷è³ÖÿÿòD$ òl$ f.-> z`u^èÖÿÿH…ÀtTéæL‰òH‰ËM‰î¾ L‹,$¸?E1ÉénúÿÿL‰îH‰ßèrÜH…ÀI‰Æ„@IÿM…gÿÿÿI‹EL‰ïÿP0éXÿÿÿIÿu I‹FL‰÷ÿP0ò|$ f.|$0wòT$0òT$ ë"Iÿ$Hƒ|$u-HÿEHƒ|$uJH‰l$L‰d$ò\$ I‰ïL‰ãò\$0é`ôÿÿH‹D$H‹L$H‹H‰D$0HÿÈH…ÀH‰u¶H‹AH‰ÏÿP0ëªH‹D$H‹L$H‹H‰D$HÿÈH…ÀH‰u™H‹AH‰ÏÿP0H‰l$L‰d$ëI‰ê¾ ¸9ë I‰ê¾3 ¸>E1ÛE1É1ÒE1ö1ÛHÇD$HÇD$1íE1äéL‰àM‰îI‰êI‰ÜL‰|$H‰ÃL‹,$L‰ý¾  ¸>E1ÛE1É1ÒéíM‰úL‹,$¾» éI‰ÁM‰úL‹,$¾Ü ¸?E1Û1ÒE1öé»M‰ñM‰úI‰ÆL‹,$¾Þ ¸?E1Û1ÒéšH‰ÂM‰ëM‰úL‹,$I‰Î¾õ ¸?E1Éë{L‰òM‰úI‰ÆL‹,$¾ú ¸?E1ÛE1Éë\L‹,$M‰úH‰Ë¾ ¸?E1ÛE1É1ÒE1öë;H‰ÂM‰îM‰úL‹,$¾ì ¸?E1ÛE1ÉëL‹,$M‰ñI‰ÃM‰úI‰Î¾ï ¸?1ÒH‰ßH‰l$L‰ãL‰ÕI‰üéˆöÿÿ¾ é±ðÿÿHÇD$¾ ¸9ëHÇD$¾1 ¸>E1É1ÒE1ö1ÛE1íE1ÿHÇD$E1äé±÷ÿÿ¾M ¸>E1É1ÒE1öHÇD$HÇD$1íE1äéƒ÷ÿÿ¾U ë¾W ¸>E1É1ÒE1ö1ÛHÇD$HÇD$1íE1äéL÷ÿÿI‰ÜH‹l$¾ƒ ¸>E1É1ÒE1ö1Ûé+÷ÿÿL‰|$I‰ÜM‰÷L‹,$I‰ÆH‹l$¾˜ ¸>E1É1Ò1ÛéþöÿÿL‰àH‹l$I‰Ü¾¨ H‰ÃE1ɸ>1ÒE1öE1ÿéÖöÿÿL‹,$¾¹ ¸?E1É1ÒE1ö1ÛE1ÿé¶öÿÿI‰ÆL‹,$¾¾ ¸?E1É1ÒE1ÿé˜öÿÿH‰ÂM‰î¾À L‹,$¸?E1ÉE1ÿéyöÿÿM‰ñL‹,$H‰Ê¾× ¸?E1öE1ÿéZöÿÿI‰ÜE1íH‹l$¾` ¸DE1É1ÒE1ö1Ûé6öÿÿL‰òL‹,$¾Î ¸?E1ÉE1öE1ÿéöÿÿI‰ÇM‰î¾ L‹,$¸?E1É1ÒéùõÿÿI‹E1ÛHyÿH…ÿI‰?…ýõÿÿM‹WL‰\$8L‰ÿH‰T$0L‰L$(‰D$ ‰4$AÿR0L‹\$8H‹T$0L‹L$(‹D$ ‹4$éÁõÿÿL‹,$M‰÷H‰l$L‰ã¾ ¸?E1É1ÒE1öE1äéŒõÿÿHÇD$HÇD$¾B HÇD$¸>E1ÛE1É1ÒE1öécõÿÿ¸>E1ÛE1É1ÒE1öé¸óÿÿHƒÄHL‰ø[]A\A]A^A_ÃAVAUATUSH‰ûHƒìPdH‹%(H‰D$H1ÀH…ötL‹5.c)H‰õL9öu0H—©)HÇHÇCH‰C8H‰C0Hùq)H‰C@1ÀéHÇH‹~I‰ÕH‹‡ H…Àt%ö‡ª tHƒx tºH‰ÞH‰ïèÔÐÿÿéH‹5ø¨)H9÷t è~Ñÿÿ…À„_L‰s‹EH‹UIÿ‰C$H‰H‹E(H‰C8H‹E HÇC@H‰C0H‹E8Hc@ H‰C1ÀöEA”À‰C L‹e8Iÿ$Iƒ|$8…lH‹SIÿHÿ u H‹{H‹GÿP0L‰sA€|$>…§H‹5( )H‹=¨)1Òè²¶H…ÀH‰Å„è1Ò1öH‰ÇèªèHÿM…áH‹EH‰ïÿP0¾ãDºH j H=ˆ èy¹H‹SƒÍÿH…Ò…×Iÿ $u I‹D$L‰çÿP0‰èÿÀ„w‹K$ƒùt"H‹7a)H50 ºH‹81ÀèYÐÿÿéMH])H‰çI‰eIÇEHÇD$H‰$H  L‰l$HÇD$ ÆD$E@H‰D$H)ÆD$F@HÇD$(HÇD$0ÆD$DÇD$@ÆD$GHÇD$8€x\Su,H‹T$HJH‰L$H‹HH‰JH‹T$HÇBH‹@H‹ëÎH‹s(è®ÀH…À„ŽH‹SL‹ ªœ)‰ÐL9ÈtFH Ï HÄ IƒùL‹zœ)H‰ÎHGðHƒúHOÈPH‹`)VH5;/ H‹81ÀèAÏÿÿZYë61ÀHƒ{@uYH =o)H‰K@ëLH‹EH5\/ H‹PH‹á_)H‹81ÀèÏÿÿH¦)HÇHÇCH‰C8H‰C0Hòn)H‰C@ƒÈÿH‹L$HdH3 %(„èbËÿÿHÿEH‹SHÿ u H‹{H‹GÿP0¿ÿH‰kèlÍÿÿÇ$H‰C(HˆÿÆ^I‹t$8HPI|$0I‰àèQýH…À„[Æé¾Ic|$Gÿƒø‡Æ‰ÂHÞ" HcHÐÿàH'n)éiHn)é]Hùm)éQHÿm)éEHÛm)é9Håm)é-H½m)é!HÉm)éH·m)é H­m)éýHm)éñHsm)éåHjm)éÙHXm)éÍHwm)éÁèÍÿÿH…ÀH‰Å„˜H‹=ž)H‰Æè ÎÿÿH…ÀI‰Æ„åHÿMu H‹EH‰ïÿP0¿èsËÿÿH…ÀH‰Å„ýH‹=8¤)L‰p1ÒH‰Æèâ²H…ÀI‰Æ„¦HÿMu H‹EH‰ïÿP01Ò1öL‰÷èÊäIÿ… I‹FL‰÷ÿP0¾ÁEºéüÿÿH¶l)ëH¥l)H‰C(ë Hÿ u H‹{H‹GÿP0HÇCƒÍÿé üÿÿ1íL9s…ýûÿÿIÿu I‹FL‰÷ÿP0HÇC1íéßûÿÿA¾´EëA¾¼EHÿMu H‹EH‰ïÿP0H  H=& ºD‰öèµé‘ûÿÿIÿuI‹FL‰÷ÿP0º¾·Eé`ûÿÿº¾·EéQûÿÿ¾FºéBûÿÿ¾ßDºé3ûÿÿ¾ãDºé$ûÿÿ¾²Eºéûÿÿ¾ÁEºéûÿÿHƒÄP[]A\A]A^ÃAWAVAUATUSHìødH‹%(H‰„$è1ÀH;5¢\)H‰|$(òD$0HÇD$XHÇD$`HÇD$hHÇ„$ˆHÇ„$€u H‹\)H5ô" E1ö1íH‹8èÿÇÿÿéQH„$ˆHÿHÇD$ÇD$1íI‰÷H‰D$HD$pH‰D$ HD$hH‰D$8H‹D$I;G}EI‹GH‹T$H‹ÐHÿH;æ[)tyH‹5%¢)H{è<Ã…ÀueM‰üE1öE1í1É1öE1ÉE1ÿéÏIÿu I‹GL‰ÿÿP0Hƒ¼$ˆ„µH‹j)H9„$Èu HÇ„$ÈH¼$ˆèXËÿÿé†Hƒ¼$ˆt'HQj)H9„$Èu HÇ„$ÈH‹|$è!ËÿÿH‹T$ H‹|$H‰ÞèÎ÷ÿÿ…ÀA‰ÆˆlH‹„$ÀE…öL‹(‰M‰üI‰ØE1öH‰ëE1í1É1öE1ÉE1ÿH‰ÝL‰ÃIÿ $u'I‹D$H‰t$L‰çH‰L$L‰ $ÿP0H‹t$H‹L$L‹ $H…Ût+Hÿ u&H‹CH‰t$H‰ßH‰L$L‰ $ÿP0H‹t$H‹L$L‹ $M…ÿt+Iÿu&I‹GH‰t$L‰ÿH‰L$L‰ $ÿP0H‹t$H‹L$L‹ $M…Ét!Iÿ uI‹AH‰t$L‰ÏH‰ $ÿP0H‹t$H‹ $H…ötHÿuH‹FH‰ $H‰÷ÿP0H‹ $H…ÉtHÿ u H‹AH‰ÏÿP0M…ítIÿMu I‹EL‰ïÿP0M…ötIÿu I‹FL‰÷ÿP0H‹žY)Hƒ¼$ˆH‹L‹`HL‹hPL‹pXHÇ@HHÇ@PHÇ@Xt*H•h)H9„$Èu HÇ„$ÈH¼$ˆèbÉÿÿL‰òL‰îL‰ç褡H‹H=) L‹`HL‹hPL‹pXHÇ@HHÇ@PHÇ@XèAÆÿÿL‰òH‰ÃL‰îL‰çè`¡H…ÛuH‹=Y)è¿ÈÿÿÇD$ë(H‰ßè­ÈÿÿH‹ÇD$HÿÈH…ÀH‰u H‹CH‰ßÿP0H…ítHÿMu H‹EH‰ïÿP0H‹”$èdH3%(‹D$„¦è8ÄÿÿH‹T$8Ht$`H|$XèôÆÿÿH‹|$H‹T$ H‰îè1õÿÿÿÀH‹|$XugH…ÿtHÿu H‹|$XH‹GÿP0H‹T$`H…ÒtHÿ u H‹|$`H‹GÿP0H‹T$hH…ÒtHÿ u H‹|$hH‹GÿP0H‹ÞW)H5' H‹8è×ÃÿÿéþüÿÿH‹T$hH‹t$`è3ÂÿÿéêüÿÿH…ítHÿMu H‹EH‰ïÿP0H‹5ú›)H‹|$(èh­H…ÀI‰Æ„åH‹„$ˆòèKÄÿÿH…ÀH‰Å„ãH‹„$ˆòB(è,ÄÿÿH…ÀH‰$„ÞH‹„$ˆòBhè ÄÿÿH…ÀI‰Ä„ÜH‹áV)I9Fu;I‹vE1ÀH…öt?M‹nHÿIÿEIÿu&I‹FH‰t$@L‰÷M‰îÿP0A¸H‹t$@ëE1À1öë M‰îA¸IxH‰t$HL‰D$@è%ÄÿÿH…ÀI‰ÅH‹t$H„~H…öL‹D$@tH‰pH‹$KDÅL‰îL‰÷H‰hL‰`(H‰P 1Òèt«H…ÀH‰Å„{IÿMu I‹EL‰ïÿP0Iÿu I‹FL‰÷ÿP0òD$0èÃÿÿH…ÀI‰Æ„*ºH‰ÆH‰ïè²ÁÿÿH…ÀI‰Å„)HÿMu H‹EH‰ïÿP0Iÿu I‹FL‰÷ÿP0L;-XV)@”ÅL;-¥U)”À@èu L;-.V)u@¶íëL‰ïèöÃÿÿ…À‰ÅˆêIÿMu I‹EL‰ïÿP0ƒýH‰Ýƒ\$ÿHÿD$éçùÿÿM‰üE1öI‰ÇE1í1É1öE1ÉE1ÀéåúÿÿM‰üI‰ÁM‰÷E1íE1ö1É1öE1ÀéÊúÿÿM‰üI‰éM‰÷H‹4$E1öE1í1ÉE1Àé­úÿÿM‰üI‰éM‰÷H‰ÁH‹4$E1öE1íE1ÀéúÿÿL‰áI‰õM‰üI‰éM‰÷H‹4$I‰ÆE1ÀéqúÿÿM‰üI‰èI‰ÇE1öE1í1É1öE1ÉéVúÿÿM‰üI‰èM‰÷1ÉM‰î1öE1íE1Éé;úÿÿM‰îM‰üE1í1É1öE1ÉE1ÿE1Àé úÿÿHÄø[]A\A]A^A_ÃAWAVAUATUSHì(H‹=õ–)dH‹%(H‰„$1ÀòD$PHÇ„$ÈHÇ„$ÐòL$XHÇ„$ØHÇ„$HòT$`HÇ„$@ò\$HÇ„$¸ò¤$€HÇ„$°ò¬$ˆHÇ„$Øò´$HÇ„$Ðò|$HÇ„$øHÇ„$ðHÇ„$hHÇ„$`è ÄH…À„H‹5(™)H‰ÇI‰Çèe©H…ÀI‰Ä„dIÿu I‹GL‰ÿÿP0ò„$`ò\„$€è3ÀÿÿH…ÀI‰Ç„ ò„$hò\„$ˆèÀÿÿH…ÀH‰Å„ëò„$pò\„$èí¿ÿÿH…ÀH‰D$„2¿è%½ÿÿH…ÀH‰Ã„´H‹@H‹t$L‹-¡R)L‰8H‹CH‰hH‹CH‰pM9l$…¬I‹D$H…ÀH‰D$„™M‹t$HÿIÿIÿ $…’I‹D$L‰çÿP0é‚1Û1íHÇD$HHÇD$PHÇD$XA¹/HÇD$`HÇD$h¸|HÇD$pHÇD$xHÇD$@HÇD$8HÇD$(é¹1Û1íHÇD$HHÇD$PHÇD$XA¹1HÇD$`HÇD$h¸|HÇD$pHÇD$xHÇD$@HÇD$8HÇD$(él1Û1íHÇD$HHÇD$PHÇD$XA¹4HÇD$`HÇD$h¸|HÇD$pHÇD$xHÇD$@HÇD$8HÇD$(é×1ÛHÇD$HHÇD$PHÇD$XHÇD$`A¹6HÇD$hHÇD$p¸|HÇD$xHÇD$@HÇD$8HÇD$(é’A¹8¸|1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛHÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇD$@HÇD$8HÇD$(éHÇD$HHÇD$PA¹:HÇD$XHÇD$`¸|HÇD$hHÇD$pHÇD$xHÇD$@HÇD$8HÇD$(ééH‹D$8H‹t$8H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹=}•)è˜ÀH…ÀI‰Ç„3@ò„$€è^¼ÿÿH…ÀH‰Å„u@ò„$ˆèD¼ÿÿH…ÀH‰D$„Ž/ò„$è(¼ÿÿH…ÀH‰D$0…1ÛE1äHÇD$HHÇD$PHÇD$XA¹£HÇD$`HÇD$h¸…HÇD$@HÇD$8HÇD$(1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ é ò„$xò\D$è}»ÿÿH…ÀH‰D$0„I$H‹=ø‘)胿H…ÀH‰Ã„â"H‹5ð)H‰ÇèH¤H…ÀI‰Ç„p#Hÿ u H‹CH‰ßÿP0M9o…m$I‹_H…Û„`$M‹oHÿIÿEIÿu I‹GL‰ÿÿP0¿è‚»ÿÿH…ÀH‰D$„Ü*H‹D$H‹t$(1ÒL‰ïH‰XH‹D$(HÿH‹D$H‰p H‰ÆèØ¢H…ÀH‰D$@„ *H‹D$H‹t$H‹H‰D$ HÿÈH…ÀH‰u H‹FH‰÷ÿP0IÿMu I‹EL‰ïÿP0H‹t$@H‹|$0è4¹ÿÿH…ÀI‰Ç„$H‹D$0H‹t$0H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹D$@H‹t$@H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹-ûL)I9o…f#òAWòT$Hò" ò\$HòD$hf.Ø‹O#Iÿu I‹GL‰ÿÿP0òD$ò\D$诹ÿÿH…ÀI‰Ç„;*H‹=,)è·½H…ÀH‰D$0…ì#H‹D$81Û1íE1äHÇD$HHÇD$PHÇD$XHÇD$`A¹üH‰D$pH‹D$(HÇD$hHÇD$@HÇD$8HÇD$(H‰D$x¸1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$é[¿èg¹ÿÿH…ÀH‰Å„”H‹D$1ÒH‰] H‰îL‰÷H‰EèÑ H…ÀH‰D$(…Þ1ÛM‰ôHÇD$HHÇD$PHÇD$XA¹ZHÇD$`HÇD$h¸|HÇD$pHÇD$xHÇD$@HÇD$81ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$éîH‹=‰)è¼H…ÀI‰Ä„àH‹5¡)L‰çèá H…ÀH‰Å„ëIÿ $u I‹D$L‰çÿP0ò„$€ò\D$Pè°·ÿÿH…ÀI‰Ä…H‹D$(1ÛHÇD$HHÇD$PHÇD$XA¹HÇD$`HÇD$hH‰D$xHÇD$p¸}HÇD$@HÇD$8HÇD$(1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$éaòD$1Ûèõ¶ÿÿH…ÀI‰Ä„i;H‹ÊI)I9GHÇD$ „õ3H{èV·ÿÿH…ÀI‰Æ„¾;Hƒ|$ t H‹D$ I‰FH‹t$IÞ1ÒL‰ÿH‰hL‰`0H‰p H‹t$0H‰p(L‰öèžžH…ÀH‰D$h„î;Iÿu I‹FL‰÷ÿP0Iÿu I‹GL‰ÿÿP0H‹=£)èfºH…ÀI‰Ç„<H‹„$hòD$òL$PòYò\Èf(Áè¶ÿÿH…ÀI‰Æ…w3A¹Õ¸†1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1äHÇD$HHÇD$PHÇD$XHÇD$`HÇD$@HÇD$8HÇD$(M…ÿtgIÿubI‹WD‰Œ$ L‰ÿ‰„$˜H‰Œ$L‰”$ˆL‰„$€L‰\$0ÿR0D‹Œ$ ‹„$˜H‹Œ$L‹”$ˆL‹„$€L‹\$0M…ättI‹4$HVÿH…ÒI‰$ucI‹T$D‰Œ$ L‰ç‰„$˜H‰Œ$L‰”$ˆL‰„$€L‰\$0ÿR0D‹Œ$ ‹„$˜H‹Œ$L‹”$ˆL‹„$€L‹\$0H…íthHÿMubH‹UD‰Œ$ H‰ï‰„$˜H‰Œ$L‰”$ˆL‰„$€L‰\$0ÿR0D‹Œ$ ‹„$˜H‹Œ$L‹”$ˆL‹„$€L‹\$0Hƒ|$„‚H‹T$H‹2H‰òH‰t$0H‹t$HÿÊH…ÒH‰ubH‹VD‰Œ$ H‰÷‰„$˜H‰Œ$L‰”$ˆL‰„$€L‰\$0ÿR0D‹Œ$ ‹„$˜H‹Œ$L‹”$ˆL‹„$€L‹\$0H…ÛtaHÿ u\H‹SD‰Œ$˜H‰ß‰„$H‰Œ$ˆL‰”$€L‰D$0L‰\$ÿR0D‹Œ$˜‹„$H‹Œ$ˆL‹”$€L‹D$0L‹\$Hƒ|$ t|H‹T$ H‹2H‰òH‰t$H‹t$ HÿÊH…ÒH‰u\H‹VD‰Œ$˜H‰÷‰„$H‰Œ$ˆL‰”$€L‰D$0L‰\$ÿR0D‹Œ$˜‹„$H‹Œ$ˆL‹”$€L‹D$0L‹\$M…öt[IÿuVI‹VD‰Œ$L‰÷‰„$ˆH‰Œ$€L‰T$0L‰D$ L‰\$ÿR0D‹Œ$‹„$ˆH‹Œ$€L‹T$0L‹D$ L‹\$M…ÛtUI‹3HVÿH…ÒI‰uFI‹SD‰Œ$ˆL‰ß‰„$€H‰L$0L‰T$ L‰D$ÿR0D‹Œ$ˆ‹„$€H‹L$0L‹T$ L‹D$Hƒ|$tdH‹t$H‹H‹t$H‰T$HRÿH…ÒH‰uFH‹VD‰Œ$ˆH‰÷‰„$€H‰L$0L‰T$ L‰D$ÿR0D‹Œ$ˆ‹„$€H‹L$0L‹T$ L‹D$M…ítFIÿMu@I‹UD‰Œ$€L‰ï‰D$0H‰L$ L‰T$L‰D$ÿR0D‹Œ$€‹D$0H‹L$ L‹T$L‹D$M…Àt5Iÿu0I‹PD‰L$0L‰Ç‰D$ H‰L$L‰T$ÿR0D‹L$0‹D$ H‹L$L‹T$M…Òt5I‹2HVÿH…ÒI‰u&I‹RD‰L$ L‰×‰D$H‰L$ÿR0D‹L$ ‹D$H‹L$Hƒ|$tDH‹t$H‹H‹t$H‰T$HRÿH…ÒH‰u&H‹VD‰L$ H‰÷‰D$H‰L$ÿR0D‹L$ ‹D$H‹L$H…Ét!Hÿ uH‹QD‰L$H‰Ï‰D$ÿR0D‹L$‹D$H‹žC)Hƒ¼$øH‹H‹ZHH‹jPL‹bXHÇBHHÇBPHÇBXtgò„$H‰D$è\©ÿÿH…ÀH‰D$L‹D$„RgH‹„$hòW è1©ÿÿH…ÀI‰ÃL‹D$„ZgH‰D$H‹”$ H‹„$hL‰„$€òWÇ èò¨ÿÿH…ÀH‰D$ L‹\$L‹„$€„?gH‹„$hH‹´$¨L‰„$ˆL‰œ$€ò0W{ 覨ÿÿH…ÀH‰D$L‹œ$€L‹„$ˆ„gH‹D$E1Ò1ÛH‹_;)H9P„ÊOH{L‰”$L‰„$ˆL‰œ$€èܨÿÿH…ÀH‰ÁL‹œ$€L‹„$ˆL‹”$„ÑfM…ÒtL‰PH‹T$HÙH‹t$ H‹|$L‰pL‰@ H‰P(H‹T$H‰p8L‰X0H‰ÎH‰L$H‰P@1ÒèH…ÀH‰ÅH‹L$„fHÿ u H‹AH‰ÏÿP0H‹D$H‹t$H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0¿èߤÿÿH…ÀH‰D$„}fH‹D$`H‹T$`H‹t$XHÿH‹D$H‹@H‰H‹D$XH‹?:)HÿH‹D$H‹@H‰pH‹D$H‹@L‰hH‹D$H‹@H‰hH‹D$0H9P„OH‹t$H‹|$0è_®H…ÀI‰Ä„ìrH‹D$H‹T$H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0H‹D$0H‹t$0H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0¿èû£ÿÿH…ÀH‰D$0„nrH‹@L‰ H‹w9)I9G„'rH‹t$0L‰ÿèÈ­H…ÀI‰Ä„-uH‹D$0H‹T$0H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0Iÿu I‹GL‰ÿÿP0Iÿ $u I‹D$L‰çÿP0H‹D$PHÿHƒ¼$ø…ƒsHƒ¼$h…tHƒ¼$Ø…$tHƒ¼$H…DtHƒ¼$¸…dtH‹D$PH‹|$(H‰D$(HÿuH‹GÿP0Hƒ|$8t'H‹D$8H‹T$8H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0Hƒ|$@t'H‹D$@H‹t$@H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Hƒ|$xt'H‹D$xH‹T$xH‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0Hƒ|$pt'H‹D$pH‹t$pH‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Hƒ|$ht'H‹D$hH‹T$hH‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0Hƒ|$`t'H‹D$`H‹t$`H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Hƒ|$Xt'H‹D$XH‹T$XH‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0Hƒ|$Pt'H‹D$PH‹t$PH‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Hƒ|$Ht'H‹D$HH‹T$HH‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0H‹´$dH34%(H‹D$(„j|èï¢ÿÿH‰ÞL‰çè4«H…ÀH‰D$(„Hÿ u)H‹CH‰ßÿP0ëH‹EM‰ôHÿÈH…ÀH‰Eu H‹EH‰ïÿP0Iÿ $u I‹D$L‰çÿP0H‹D$(H;7)„.H‹5>})HxèUž…À…H‹D$(A¹_1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛH‰D$0E1ö¸|HÇD$ 1ÛHÇD$1íE1äE1ÿHÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇD$@HÇD$8HÇD$(éã1íHÇD$HHÇD$PHÇD$XHÇD$`A¹PHÇD$hHÇD$p¸|HÇD$xHÇD$@HÇD$8éêÿÿHƒ¼$øHœ$ðt&H­D)H9„$8u HÇ„$8H{è~¥ÿÿL´$àH‹t$(H{L‰òè$Òÿÿ…À‰õéÿÿH”$ØH´$ÐH¼$ÈE1íE1ö1Û訣ÿÿHÁ{)H‹”$ØH‹´$ÐH‹¼$ÈHÇ„$ø1íH‰„$0H‰„$(HD)HÇ„$E1äE1ÿH‰„$8èŸÿÿH‹D$(A¹o1ÉHÇD$E1ÒE1ÀHÇD$E1ÛHÇD$ H‰D$0HÇD$¸|HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇD$@HÇD$8HÇD$(Hƒ|$0„EëÿÿH‹T$0H‹2H‰òH‰´$€H‹t$0HÿÊH…ÒH‰…ëÿÿH‹VD‰Œ$¨H‰÷‰„$ H‰Œ$˜L‰”$L‰„$ˆL‰œ$€ÿR0D‹Œ$¨‹„$ H‹Œ$˜L‹”$L‹„$ˆL‹œ$€é±êÿÿM‰ôHÇD$HHÇD$PHÇD$XHÇD$`A¹THÇD$hHÇD$p¸|HÇD$xHÇD$@HÇD$8HÇD$(1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ é„êÿÿò„$ˆò\D$X芟ÿÿH…ÀH‰Ã„ò„$ò\D$`èjŸÿÿH…ÀH‰D$„J¿袜ÿÿH…ÀI‰Ç„ËH‹@H‹t$L‰ I‹GH‰XI‹GH‰pL9m…H‹EH…ÀH‰D$„mL‹eHÿIÿ$HÿM…‚H‹EH‰ïÿP0ésH‹D$(1ÛHÇD$HHÇD$PHÇD$XA¹~HÇD$`HÇD$hH‰D$xHÇD$p¸}HÇD$@HÇD$8HÇD$(é;æÿÿH‹D$(HÇD$HA¹ƒHÇD$PHÇD$XHÇD$`HÇD$hH‰D$xHÇD$p¸}HÇD$@HÇD$8HÇD$(éÐåÿÿH‹D$(A¹…1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛH‰D$xE1ö¸}HÇD$ HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$@HÇD$8HÇD$(éaèÿÿH‹D$(HÇD$HA¹‡HÇD$PHÇD$XHÇD$`HÇD$hH‰D$xHÇD$p¸}HÇD$@HÇD$8HÇD$(éAýÿÿH‹D$(1Û1íHÇD$HHÇD$PA¹|HÇD$XHÇD$`H‰D$xHÇD$h¸}HÇD$pHÇD$@HÇD$8HÇD$(éeåÿÿL‰þH‰ïèæ£H…ÀH‰D$8„XIÿueI‹GL‰ÿÿP0ëY¿èýœÿÿH…ÀH‰Ã„ýH‹D$1ÒL‰{ H‰ÞL‰çH‰Cèg„H…ÀH‰D$8„pH‹L‰åHÿÈH…ÀH‰u H‹CH‰ßÿP0HÿMu H‹EH‰ïÿP0H‹D$8H;z/)„ H‹5µu)HxèÌ–…À…ñH‹D$8A¹¬1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛH‰D$0H‹D$(E1öHÇD$ 1ÛHÇD$1íE1äE1ÿH‰D$xHÇD$H¸}HÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$@HÇD$8HÇD$(éYúÿÿH‹D$(1ÛE1äHÇD$HHÇD$PA¹HÇD$XHÇD$`H‰D$xHÇD$h¸}HÇD$pHÇD$@HÇD$(é®áÿÿH‹D$(L‰åHÇD$HHÇD$PHÇD$XA¹§HÇD$`HÇD$hH‰D$xHÇD$p¸}HÇD$@HÇD$(é(ãÿÿH‹D$(L‰åHÇD$HE1äHÇD$PHÇD$XHÇD$`HÇD$hA¹¡H‰D$xHÇD$p¸}HÇD$@HÇD$8HÇD$(é1ÞÿÿHƒ¼$hHœ$`t&HI<)H9„$¨u HÇ„$¨H{èÿÿH‹t$8H{L‰òèÈÉÿÿ…À‰ÞÿÿH”$ÈH´$ÐH¼$ØE1íE1ö1ÛèL›ÿÿHes)H‹”$ÈH‹´$ÐH‹¼$ØHÇ„$h1íH‰„$ H‰„$˜H¨;)HÇ„$pE1äE1ÿH‰„$¨è¹–ÿÿH‹D$8A¹¼1ÉHÇD$E1ÒE1ÀHÇD$E1ÛHÇD$ H‰D$0H‹D$(HÇD$HÇD$HHÇD$PHÇD$XH‰D$xHÇD$`¸}HÇD$hHÇD$pHÇD$@HÇD$8HÇD$(éž÷ÿÿH‹D$81íE1äE1ÿHÇD$HHÇD$PHÇD$XHÇD$`A¹ÕH‰D$pH‹D$(1ÉHÇD$hHÇD$@E1ÒHÇD$8HÇD$(E1ÀH‰D$xHÇD$¸E1íHÇD$E1ÛE1öHÇD$ HÇD$éõöÿÿH‹D$81íE1äHÇD$HHÇD$PA¹×HÇD$XHÇD$`1ÉH‰D$pH‹D$(E1ÒHÇD$hHÇD$@E1ÀHÇD$8HÇD$(E1íH‰D$xHÇD$¸HÇD$E1ÛE1öHÇD$ HÇD$éOöÿÿH‹D$81Û1íHÇD$HHÇD$PA¹ÓHÇD$XHÇD$`H‰D$pH‹D$(HÇD$hHÇD$@HÇD$8HÇD$(H‰D$x¸ézßÿÿH‹t$(L‰ÿM‰ýèöH…ÀH‰D$@…Üÿÿé³L‰ÿèË—ÿÿòD$Hé“Üÿÿ…«Üÿÿè%—ÿÿH…À„ÜÿÿH‹D$8A¹÷H‰D$pH‹D$(H‰D$x¸é,H‹D$8H‹l$@1ÛE1äHÇD$HHÇD$PHÇD$XHÇD$`A¹óH‰D$pH‹D$(1ÉHÇD$hHÇD$@E1ÒHÇD$8HÇD$(E1ÀH‰D$xHÇD$¸E1íHÇD$E1ÛE1öHÇD$ HÇD$éÆôÿÿH‹56k)H‰ÇèŽ~H…ÀH‰D$„ˆH‹D$0H‹t$0H‹H‰D$ HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹D$L‹%5()L9`…{ H‹@H…ÀH‰D$0„i H‹D$H‹t$L‹hH‹D$0HÿH‹D$IÿEH‹H‰D$ HÿÈH…ÀH‰u H‹FH‰÷ÿP0¿è{•ÿÿH…ÀH‰Ã„uH‹D$01ÒH‰ÞL‰ïH‰CH‹D$8HÿH‰C èÝ|H…ÀH‰D$@„£Hÿ u H‹CH‰ßÿP0IÿMu I‹EL‰ïÿP0H‹t$@L‰ÿèS“ÿÿH…ÀH‰D$„ÑIÿu I‹GL‰ÿÿP0H‹D$@H‹t$@H‹H‰D$ HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹D$H9h…×òhòl$@òt$@f.t$h‹ÏH‹D$H‹t$H‹H‰D$ HÿÈH…ÀH‰uH‹D$H‹|$H‹@ÿP0H‹=nj)èù—H…ÀH‰Å„’H‹5fi)H‰Çè¾|H…ÀI‰Ç„åHÿMu H‹EH‰ïÿP0M9g…9 I‹oH…í„, M‹oHÿEIÿEIÿu I‹GL‰ÿÿP0¿èö“ÿÿH…ÀH‰Ã„Ç H‹D$(H‰k1ÒH‰ÞL‰ïHÿH‰C è]{H…ÀH‰D$„îHÿ u H‹CH‰ßÿP0IÿMu I‹EL‰ïÿP0H‹t$H‹|$(èÑ‘ÿÿH…ÀH‰D$x„øH‹D$H‹t$H‹H‰D$ HÿÈH…ÀH‰u H‹FH‰÷ÿP0L‹5=&)L9t$x…~Hƒ¼$øHœ$ðt&H5)H9„$8u HÇ„$8H{èá•ÿÿL¬$àH‹t$xHƒÃH‰ßL‰êè„Âÿÿ…À‰Åˆ: H‹„$0…íH‹H‰„$˜‰ÅH‹D$8L‹|$xA¹ZH‰D$pH‹D$(H‰D$x¸€1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛHÇD$éíH‹D$81Û1íE1äHÇD$HHÇD$PHÇD$XHÇD$`A¹åH‰D$pH‹D$(1ÉHÇD$hHÇD$8E1ÒHÇD$(HÇD$E1ÀH‰D$xE1í¸HÇD$E1ÛE1öHÇD$ HÇD$éjðÿÿH‹D$8M‰ïA¹B1ÉHÇD$E1ÒE1ÀE1íHÇD$H‰D$pH‹D$(E1ÛE1öHÇD$ H‰D$x¸€1íE1äHÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$@HÇD$8HÇD$(éÛÿÿH‹D$8M‰ï1Û1íE1äHÇD$HHÇD$PHÇD$XA¹îH‰D$pH‹D$(1ÉHÇD$`HÇD$hE1ÒHÇD$8HÇD$(E1ÀH‰D$xHÇD$¸E1íHÇD$E1ÛE1öHÇD$ é1ïÿÿH‹D$8M‰ïA¹è1ÉHÇD$E1ÒE1ÀE1íHÇD$H‰D$pH‹D$(E1ÛE1öHÇD$ 1íE1äHÇD$HHÇD$PH‰D$xHÇD$X¸HÇD$`HÇD$hHÇD$@HÇD$8HÇD$(é‘îÿÿH‹D$81Û1íHÇD$HHÇD$PA¹úHÇD$XHÇD$`H‰D$pH‹D$(HÇD$hHÇD$@HÇD$8HÇD$(H‰D$x¸é¼×ÿÿH‹D$8A¹þ1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛH‰D$pH‹D$(E1öHÇD$ 1Û1íE1äHÇD$HHÇD$PH‰D$xHÇD$X¸HÇD$`HÇD$hHÇD$@HÇD$8HÇD$(é‚íÿÿH‹|$èÿÿòD$@éúÿÿ…+úÿÿèéŽÿÿH…À„úÿÿH‹D$8A¹H‰D$pH‹D$(H‰D$x¸éçH‹D$8L‰l$1íE1äHÇD$HHÇD$PHÇD$XHÇD$`A¹H‰D$pH‹D$(HÇD$hHÇD$8HÇD$(H‰D$xéUH‹D$8H‹l$@A¹H‰D$pH‹D$(H‰D$x¸éÞH‹D$(H‹t$(H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹=Ýc)èh‘H…ÀH‰D$…üH‹D$8A¹_H‰D$p¸€1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1Û1íHÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$@HÇD$8HÇD$(éØÿÿA¹¡¸…1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛéyûÿÿH‹D$8L‰l$1íE1äHÇD$HHÇD$PHÇD$XHÇD$`A¹H‰D$pH‹D$(1ÉHÇD$hHÇD$@E1ÒHÇD$8HÇD$(E1ÀH‰D$xHÇD$¸E1íHÇD$E1ÛE1öHÇD$ éñêÿÿH‹t$8H‹|$è “H…ÀH‰D$@ujH‹D$81Û1íE1äHÇD$HHÇD$PHÇD$XHÇD$`A¹ H‰D$pH‹D$(HÇD$hHÇD$8HÇD$(H‰D$x¸éƒÏÿÿL‹l$é›öÿÿH‹D$81ÛHÇD$HHÇD$PHÇD$XA¹)HÇD$`HÇD$hH‰D$pH‹D$(HÇD$@HÇD$8HÇD$(H‰D$x¸€é‘ÓÿÿH‹D$81ÛHÇD$HHÇD$PHÇD$XA¹+HÇD$`HÇD$hH‰D$pH‹D$(HÇD$@HÇD$8HÇD$(H‰D$x¸€é#ÓÿÿH‹t$(L‰ÿM‰ý蟑H…ÀH‰D$…!÷ÿÿé¬H‹D$xH‹5ðc)Hxè……À…e÷ÿÿH‹D$8L‹|$xA¹JH‰D$pH‹D$(H‰D$xéÚ÷ÿÿH‹D$81Û1íHÇD$HHÇD$PA¹GHÇD$XHÇD$`H‰D$pH‹D$(HÇD$hHÇD$@HÇD$8HÇD$(H‰D$xéÇH‹D$8A¹91ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛH‰D$pH‹D$(E1öHÇD$ 1ÛH‰D$x¸€éKøÿÿH‹5×^)H‰Çè/rH…ÀH‰Ã…ËH‹D$81íHÇD$HHÇD$PHÇD$XA¹aHÇD$`HÇD$hH‰D$pHÇD$@HÇD$8HÇD$(¸€1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ éòÓÿÿH‹D$8E1äM‰ïHÇD$HHÇD$PA¹<HÇD$XHÇD$`H‰D$pH‹D$(HÇD$hHÇD$@HÇD$8HÇD$(H‰D$x¸€éÏÿÿH”$ØH´$ÐH¼$ÈèÔ‰ÿÿH‹t$(H‰ßL‰êè¸ÿÿÿÀH‹¼$ÈuvH…ÿtHÿuH‹¼$ÈH‹GÿP0H‹”$ÐH…ÒtHÿ uH‹¼$ÐH‹GÿP0H‹”$ØH…ÒtHÿ uH‹¼$ØH‹GÿP0H‹®)H5OêH‹8视ÿÿéõÿÿH‹”$ØH‹´$Ðèý„ÿÿéýôÿÿH‹D$H‹t$H‹H‰D$ HÿÈH…ÀH‰u H‹FH‰÷ÿP0L9cu1H‹CH…ÀH‰D$t#L‹cHÿIÿ$Hÿ …OH‹CH‰ßÿP0é@H‹t$8H‰ßI‰Üè:ŽH…ÀH‰D$(„ÇIÿ $u I‹D$L‰çÿP0H‹t$(H‹|$8茅ÿÿH…ÀH‰D$ptiH‹D$(H‹t$(H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0L9t$p„¥H‹D$pH‹54`)HxèK…À…ˆH‹D$8H‹\$pA¹€H‰D$péõH‹D$8L‹|$(1Û1íE1äHÇD$HHÇD$PHÇD$XA¹}H‰D$pHÇD$`¸€HÇD$hHÇD$@HÇD$(HÇD$8éÀÌÿÿHƒ¼$hHœ$`t&H1()H9„$¨u HÇ„$¨H{è‰ÿÿH‹t$pHƒÃL‰êH‰ßè­µÿÿ…À‰ÅˆáH‹„$ …íH‹H‰„$ ‰¾ÈÿÿH‹D$8H‹\$pA¹H‰D$p¸€1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$éøÿÿH‹D$81íHÇD$HHÇD$PHÇD$XA¹oHÇD$`HÇD$hH‰D$pHÇD$@¸€HÇD$8é~Íÿÿ¿è@…ÿÿH…ÀH‰Å„¡H‹D$1ÒH‰îL‰çH‰EH‹D$8HÿH‰E è¢lH…ÀH‰D$(tHÿM…’ýÿÿH‹EH‰ïÿP0éƒýÿÿH‹D$8L‰ãHÇD$HHÇD$PHÇD$XA¹xHÇD$`HÇD$hH‰D$pHÇD$@¸€HÇD$8éÇÌÿÿH‹D$8L‰ãHÇD$HHÇD$PHÇD$XA¹rHÇD$`HÇD$hH‰D$pHÇD$@HÇD$8HÇD$(éÚúÿÿH”$ÈH´$ÐH¼$ØèV…ÿÿH‹t$8H‰ßL‰ê蕳ÿÿÿÀH‹¼$ØuvH…ÿtHÿuH‹¼$ØH‹GÿP0H‹”$ÐH…ÒtHÿ uH‹¼$ÐH‹GÿP0H‹”$ÈH…ÒtHÿ uH‹¼$ÈH‹GÿP0H‹0)H5ÑåH‹8è)‚ÿÿépýÿÿH‹”$ÈH‹´$Ðè€ÿÿéVýÿÿI‹GH…ÀH‰D$ H‰Ã„öËÿÿI‹_HÿHÿIÿuI‹GL‰ÿI‰ß»ÿP0éÐËÿÿI‰ß»éÃËÿÿH‹„$hH‹´$ òD$òT$XòY0ò\Ðf(Âèd‚ÿÿH…ÀI‰Ä„H‹„$ òD$ò\$`HÀH‰„$¨H‹„$hH‹´$¨òY0ò\Øf(Ãè‚ÿÿH…ÀH‰D$0„{òD$@òd$òYD$ò\àf(ÄèêÿÿH…ÀH‰D$„ÓH‹„$hòD$òYòX„$€è¼ÿÿH…ÀH‰Å„# H‹„$hH‹´$ òD$òY0òX„$ˆè‡ÿÿH…ÀH‰D$ „f H‹„$hH‹´$¨òD$òY0òX„$èPÿÿH…ÀI‰Ã„¢ òD$@H‰D$(òYD$òXD$è(ÿÿH…ÀH‰D$L‹\$(„á E1í1ÛH‹ñ)I9Gu:M‹oM…ít1I‹_IÿEHÿIÿuI‹GL‰ÿI‰ß»ÿP0L‹\$(ëI‰ß»H{L‰\$(èKÿÿH…ÀI‰ÀL‹\$(„Û M…ítL‰hH‹t$0IØ1ÒL‰ÿL‰pL‰` H‰p(H‹t$H‰h8L‰XHL‰D$H‰p0H‹t$ H‰p@H‹t$H‰pPL‰ÆèwhH…ÀH‰D$`L‹D$„Ô Iÿu I‹@L‰ÇÿP0Iÿu I‹GL‰ÿÿP0H‹=wY)è:„H…ÀI‰Ç„ü H‹„$øòD$ò¬$€òYò\èf(ÅèæÿÿH…ÀI‰À„ H‰D$H‹´$˜H‹„$øòD$ò´$ˆòY0ò\ðf(Æè¤ÿÿH…ÀH‰D$L‹D$„ó H‹„$˜òD$ò¼$HÀH‰„$°H‹„$øH‹´$°òY0ò\øf(ÇèMÿÿH…ÀI‰ÃL‹D$„¿ òD$HL‰D$(òL$H‰D$òYD$ò\Èf(ÁèÿÿH…ÀH‰D$ L‹\$L‹D$(„¸ H‹„$øò„$xòYòX„$`èØ~ÿÿH…ÀH‰ÅL‹\$L‹D$(„° H‹„$øH‹´$˜ò„$xL‰D$0L‰\$(òY0òX„$hèŒ~ÿÿH…ÀH‰D$L‹\$(L‹D$0„Ê H‹„$øH‹´$°ò„$xL‰D$8òY0òX„$pèC~ÿÿH…ÀH‰D$0L‹\$(L‹D$8„à òD$HòY„$xòX„$xè~ÿÿH…ÀI‰ÄL‹\$(L‹D$8„ E1ö1ÛH‹Ô)I9Gu>M‹wM…öt5I‹_IÿHÿIÿuI‹GL‰ÿI‰ß»ÿP0L‹\$(L‹D$8ëI‰ß»H{L‰D$8L‰\$(è%~ÿÿH…ÀI‰ÅL‹\$(L‹D$8„ï M…ötL‰pH‹t$IDÝ1ÒL‰ÿL‰@L‰X(H‰p H‹t$ H‰h8L‰`PH‰p0H‹t$H‰p@H‹t$0H‰pHL‰îèPeH…ÀH‰D$X„è IÿMu I‹EL‰ïÿP0Iÿu I‹GL‰ÿÿP0H‹5$Q)H‹|$hèòeH…ÀI‰Ç„ð H‹=V)èú€H…ÀI‰Ä„ ¿èzÿÿH…ÀH‰D$0„B H‹D$`H‹t$`HÿH‹D$0H‹@H‰0H‹D$XH‹t$XHÿH‹D$0H‹@H‰pH‹d)I9D$…nI‹D$H…ÀH‰D$„[M‹t$HÿIÿIÿ $…ˆI‹D$L‰çÿP0éx1Û1íHÇD$HHÇD$PHÇD$XA¹HÇD$`HÇD$h¸…HÇD$@HÇD$8HÇD$(é¡Äÿÿ1ÛE1äHÇD$HHÇD$PHÇD$XA¹ŸHÇD$`HÇD$h¸…HÇD$@HÇD$8HÇD$(éeÂÿÿHÇD$HHÇD$PA¹¥HÇD$XHÇD$`¸…HÇD$hHÇD$@1ÉHÇD$8HÇD$(E1ÒHÇD$E1ÀE1íHÇD$E1ÛE1öHÇD$ é%ÚÿÿA¹³¸…1ÉHÇD$E1ÒE1ÀE1íHÇD$E1Û1ÛHÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$@HÇD$8HÇD$(é«Ùÿÿ1Û1íE1äHÇD$HHÇD$PA¹ÄHÇD$XHÇD$`¸…HÇD$@HÇD$8HÇD$(éì1Û1íHÇD$HHÇD$PHÇD$XA¹ÒHÇD$`HÇD$@¸†HÇD$8HÇD$(éÂÿÿ1Û1íHÇD$HHÇD$PHÇD$XA¹ØHÇD$`HÇD$@HÇD$8HÇD$(ëI1Û1íHÇD$HHÇD$PHÇD$XA¹ÛHÇD$`HÇD$@HÇD$8HÇD$(¸†1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛHÇD$ HÇD$éƒÃÿÿA¹Ý¸†1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛHÇD$ 1Û1íHÇD$HHÇD$PHÇD$XHÇD$`HÇD$@HÇD$8HÇD$(é¶×ÿÿ1ÛHÇD$HHÇD$PHÇD$XHÇD$`A¹àHÇD$@HÇD$8¸†HÇD$(1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛHÇD$ é<×ÿÿA¹ã¸†1ÉHÇD$E1ÒE1ÀE1íHÇD$E1Û1ÛHÇD$HHÇD$PHÇD$XHÇD$`HÇD$@HÇD$8HÇD$(éËÖÿÿA¹æ¸†1ÉHÇD$E1ÒE1ÀE1íHÇD$1ÛHÇD$HHÇD$PHÇD$XHÇD$`HÇD$@HÇD$8HÇD$(é]ÖÿÿA¹è¸†1ÉHÇD$E1ÒE1ÀE1í1ÛHÇD$HHÇD$PHÇD$XHÇD$`HÇD$@HÇD$8HÇD$(éøÕÿÿA¹ö¸†1ÉHÇD$E1Ò1ÛHÇD$HHÇD$PHÇD$XHÇD$`HÇD$@HÇD$8HÇD$(é™Õÿÿ1Û1íE1äHÇD$HHÇD$PA¹HÇD$XHÇD$@¸†HÇD$8HÇD$(1ÉHÇD$E1ÒE1íé ½ÿÿ1Û1íHÇD$HHÇD$PHÇD$XA¹!HÇD$@HÇD$8¸‡HÇD$(錾ÿÿA¹$¸‡1ÉHÇD$E1ÒE1íHÇD$E1Ûë=A¹'¸‡1ÉHÇD$E1ÒE1íE1ÛëA¹*¸‡1ÉHÇD$E1ÒE1íE1öHÇD$ 1ÛHÇD$1íéºA¹,¸‡1ÉHÇD$E1ÒE1íE1ö1ÛHÇD$1íé‰1ÛE1äHÇD$HHÇD$PHÇD$XA¹/HÇD$@HÇD$8¸‡HÇD$(1ÉHÇD$E1ÒE1íE1öHÇD$é$¿ÿÿA¹2¸‡1ÉHÇD$E1ÒE1íE1ö1ÛE1äHÇD$HHÇD$PHÇD$XHÇD$@HÇD$8HÇD$(éžÿÿ1ÛE1äHÇD$HHÇD$PHÇD$XA¹5HÇD$@HÇD$8¸‡HÇD$(1ÉHÇD$E1ÒE1íE1öéf¾ÿÿ1ÛHÇD$HHÇD$PHÇD$XHÇD$@A¹7HÇD$8HÇD$(¸‡1ÉHÇD$E1ÒE1íE1öé¹ÒÿÿA¹E¸‡1ÉHÇD$E1Ò1ÛHÇD$HHÇD$PHÇD$XHÇD$@HÇD$8HÇD$(écÒÿÿ1Û1íE1äHÇD$HHÇD$PA¹bHÇD$@HÇD$8¸‡HÇD$(éÝ1Û1íHÇD$HHÇD$PHÇD$@A¹pHÇD$8HÇD$(¸ˆéy»ÿÿ1Û1íHÇD$HHÇD$PHÇD$@A¹rHÇD$8HÇD$(¸ˆéY¹ÿÿ1Û1íHÇD$HHÇD$PHÇD$@A¹tHÇD$8HÇD$(¸ˆé¹ÿÿH‹=¼H)èGvH…ÀI‰Ç„ïH‹5´G)L‰ÿè [H…ÀH‰Å„‚Iÿu I‹GL‰ÿÿP0H‹Ò)H9E…àL‹}M…ÿ„ÓL‹mIÿIÿEHÿMu H‹EH‰ïÿP0¿è>rÿÿH…ÀI‰Ä„IM‰|$Hÿ1ÒI‰\$ L‰æL‰ïè¨YH…ÀH‰D$0„(Iÿ $u I‹D$L‰çÿP0IÿMu I‹EL‰ïÿP0H‹t$0H‰ßèpÿÿH…ÀH‰D$8„“H‹D$0H‹t$0H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹D$8H;ƒ)…#Hƒ¼$¸t*Hc)H9„$øu HÇ„$øH¼$¸è0tÿÿL¤$àH¬$¸H‹t$8L‰âH‰ïèÏ ÿÿ…ÀˆƒHÿ u H‹CH‰ßÿP0H‹="G)è­tH…ÀH‰Ã„H‹5F)H‰ÇèrYH…ÀI‰Ä„‰Hÿ u H‹CH‰ßÿP0H‹8)I9D$…I‹\$H…Û„M‹l$HÿIÿEIÿ $u I‹D$L‰çÿP0¿è pÿÿH…ÀI‰Ç„çH‹D$(I‰_1ÒL‰þL‰ïHÿI‰G èXH…ÀH‰D$0„äIÿu I‹GL‰ÿÿP0IÿMu I‹EL‰ïÿP0H‹t$0H‹|$(è{nÿÿH…ÀH‰D$@„7H‹D$0H‹T$0H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0H‹D$@H;â)…ÌHƒ¼$Øt*HÂ)H9„$u HÇ„$H¼$ØèrÿÿH¬$àHœ$ØH‹t$@H‰êH‰ßè.Ÿÿÿ…Àˆ<H‹D$(H‹T$(H‹H‰D$HÿÈH…ÀH‰uH‹D$(H‹|$(H‹@ÿP0H‹=ZD)èírH…ÀH‰Å„zH‹5rG)H‰Çè²WH…ÀI‰Ç„zHÿMu H‹EH‰ïÿP0ò„$€èˆnÿÿH…ÀH‰Å„kò„$ˆènnÿÿH…ÀH‰Ã„oò„$èTnÿÿH…ÀI‰Å„q¿èŽkÿÿH…ÀH‰D$0…‡E1äHÇD$(A¹ø¸—1ÉHÇD$E1ÒE1Àéü´ÿÿH‹t$0L‰çèFuH…ÀI‰Å„.H‹D$0H‹t$0H‹H‰D$HÿÈH…ÀH‰ujH‹FH‰÷ÿP0ë^¿èGnÿÿH…ÀH‰Å„.H‹D$1ÒH‰îL‰÷H‰EH‹D$0H‰E è¬UH…ÀI‰Å„H‹EM‰ôHÿÈH…ÀH‰Eu H‹EH‰ïÿP0Iÿ $u I‹D$L‰çÿP0¿è˜jÿÿH…ÀI‰ÄtHH‹@H‹)L‰(I9_…M‹oM…í„ M‹wIÿEIÿIÿ…¾I‹GL‰ÿÿP0é¯1Û1íHÇD$HHÇD$PHÇD$@A¹–HÇD$8HÇD$(éÁA¹‡¸ˆ1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ 1ÛHÇD$1íHÇD$HHÇD$PHÇD$@HÇD$8HÇD$(érËÿÿ¿èÏlÿÿH…ÀH‰Å…P1ÛM‰÷HÇD$HHÇD$PHÇD$@A¹ªHÇD$8HÇD$(¸ˆéØýÿÿM‰ôA¹‘¸ˆ1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ 1ÛHÇD$HÇD$HHÇD$PHÇD$@HÇD$8HÇD$(é÷µÿÿM‰ô1ÛHÇD$HHÇD$PHÇD$@A¹‹HÇD$8HÇD$(¸ˆ1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ é8ÊÿÿL‰æL‰ÿèTrH…ÀH‰D$(„åIÿ $uMI‹D$L‰çÿP0ë@1ÒL‰mL‰e H‰îL‰÷èîRH…ÀH‰D$(„çH‹EM‰÷HÿÈH…ÀH‰Eu H‹EH‰ïÿP0Iÿu I‹GL‰ÿÿP0H‹D$(H‹T$(H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0¿è³gÿÿH…ÀH‰D$P„UH‹D$hH‹t$hHÿH‹D$PH‹@H‰0H‹=½?)èPnH…ÀI‰Ç„\H‹5B)H‰ÇèSH…ÀH‰Å„yIÿu I‹GL‰ÿÿP0E1íE1ÿH9]u:L‹}M…ÿM‰ýt.H‹]IÿHÿHÿMuH‹EH‰ïA½H‰ÝÿP0ë H‰ÝA½I}è;jÿÿH…ÀI‰Ä„HM…ÿtL‰xH‹D$xH‹t$pH‰ïH‹T$xHÿKìH‰PHÿ1ÒH‰p L‰æèˆQH…ÀH‰D$H„9Iÿ $u I‹D$L‰çÿP0HÿMu H‹EH‰ïÿP0H‹=º>)èMmH…ÀH‰Å„-H‹5A)H‰ÇèRH…ÀI‰Ä„?HÿMu H‹EH‰ïÿP01Û1íH‹Óû(I9D$uH‹BL‰„$°H‰×L‰œ$˜ÿP0H‰\$L‹œ$˜»L‹„$°H‹Œ$¸ë H‰\$»H{H‰Œ$¸L‰„$°L‰œ$˜è\VÿÿH…ÀI‰ÆL‹œ$˜L‹„$°H‹Œ$¸„~M…ÀtL‰@H‹t$IÞH‹T$ H‹|$H‰hH‰H H‰p(H‹t$H‰P0L‰X81ÒH‰p@L‰öè…=H…ÀH‰Ã„JIÿu I‹FL‰÷ÿP0H‹D$H‹T$H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0H‹=<.)è7YH…ÀI‰Æ„:ò„$€èýTÿÿH…ÀH‰D$„eò„$ˆèáTÿÿH…ÀI‰Ã„‰ò„$H‰D$èÂTÿÿH…ÀH‰D$ L‹\$„žH‹„$hL‰\$òWg½è’TÿÿH…ÀH‰D$L‹\$„ H‹„$hH‹´$ ò0W3½è^TÿÿH…ÀH‰ÁL‹\$„—H‰„$€H‹”$¨H‹„$hòWù¼è$TÿÿH…ÀH‰ÅL‹\$H‹Œ$€„|E1ÀE1äH‹ææ(I9Fu_M‹FM…ÀM‰ÄtSM‹fIÿIÿ$Iÿu:I‹FH‰Œ$ˆL‰÷L‰„$€M‰æA¼ÿP0L‹\$L‹„$€H‹Œ$ˆë M‰æA¼I|$H‰Œ$ˆL‰„$€L‰\$è TÿÿH…ÀI‰ÂL‹\$L‹„$€H‹Œ$ˆ„ïM…ÀtL‰@H‹t$KâH‹T$ L‰÷L‰X H‰H8H‰pH‹t$H‰P(H‰h@1ÒL‰T$H‰p0L‰Öè3;H…ÀH‰D$L‹T$„µIÿ u I‹BL‰×ÿP0Iÿu I‹FL‰÷ÿP0¿è(PÿÿH…ÀI‰Æ„¼H‹D$`H‹T$`H‹t$HÿI‹FH‰I‹FH‹å(H‰XI‹FH‰pH‹D$0H9P…—!H‹@H…ÀH‰D$„…!H‹D$0H‹t$0H‹HH‹D$HÿH‹D$0HÿH‹H‰D$HÿÈH…ÀH‰…z!H‹FH‰L$H‰÷ÿP0H‹L$éa!1Òƒý”Âu1ÒƒûžÂ…Ò„ÀH‹54&)H‹|$hè;H…ÀI‰Ç„$H‹='+)è VH…ÀH‰D$0„H‹=õ*)èðUH…ÀI‰Æ„ò„$€è¶QÿÿH…ÀH‰D$„Jò„$ˆèšQÿÿH…ÀI‰Â„pò„$H‰D$è{QÿÿH…ÀH‰ÅL‹T$„‰H‹„$øòèYQÿÿH…ÀH‰ÁL‹T$„¢H‰D$ H‹”$˜H‹„$øL‰T$òè$QÿÿH…ÀH‰D$L‹T$H‹L$ „ŸH‹„$øH‹´$°H‰Œ$˜ò0èêPÿÿH…ÀH‰D$ L‹T$H‹Œ$˜„’E1Û1ÛH‹«ã(I9FuaM‹^M…ÛL‰ÛtUI‹^IÿHÿIÿu>I‹FH‰Œ$°L‰÷L‰”$˜L‰\$I‰Þ»ÿP0L‹\$L‹”$˜H‹Œ$°ëI‰Þ»H{H‰Œ$¸L‰”$°L‰œ$˜èËPÿÿH…ÀH‰D$L‹œ$˜L‹”$°H‹Œ$¸„ÿM…ÛtL‰XH‹D$H‹T$L‰÷H‹t$HØH‰PH‹T$ H‰p8H‹t$L‰P H‰h(H‰P@H‰H01Òèí7H…ÀI‰Å„ÆH‹D$H‹t$H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0Iÿu I‹FL‰÷ÿP0H‹=¤()èŸSH…ÀH‰D$„³ò„$€ècOÿÿH…ÀH‰D$ „×ò„$ˆèGOÿÿH…ÀH‰D$„òò„$è+OÿÿH…ÀH‰Á„H‰D$H‹„$hòW×·èOÿÿH…ÀH‰ÅH‹L$„H‹„$hH‹”$ òW¥·èÐNÿÿH…ÀI‰ÂH‹L$„üH‰„$€H‹´$¨H‹„$hH‰Œ$ˆò0Wc·èŽNÿÿH…ÀH‰D$L‹”$€H‹Œ$ˆ„ÔH‹D$E1Û1ÛH‹Gá(H9P…L‹XM…ÛL‰ÛtuH‹XIÿH‹t$HÿH‹H‰„$€HÿÈH…ÀH‰uFH‹FH‰Œ$H‰÷L‰”$ˆL‰œ$€ÿP0H‰\$L‹œ$€»L‹”$ˆH‹Œ$ë H‰\$»H{H‰Œ$L‰”$ˆL‰œ$€èCNÿÿH…ÀI‰ÀL‹œ$€L‹”$ˆH‹Œ$„M…ÛtL‰XH‹T$ IØH‹t$H‹|$L‰D$H‰H(H‰h0H‰PH‹T$H‰p L‰P8L‰ÆH‰P@1Òèg5H…ÀI‰ÆL‹D$„ÐIÿu I‹@L‰ÇÿP0H‹D$H‹t$H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0¿èFJÿÿH…ÀH‰D$„¼H‹D$XH‹T$XH‹5¿ß(HÿH‹D$H‹@H‰H‹D$H‹@L‰hH‹D$H‹@L‰pH‹D$0H9p…Ž L‹pM…ö„ H‹HIÿH‹T$0HÿH‹H‰D$HÿÈH…ÀH‰…ÁH‹BH‰L$H‰×ÿP0H‹L$é¨ÿÍ1ÀÿËžÀ…À„H‹5a )H‹|$hè/5H…ÀI‰Ç„4H‹=T%)è7PH…ÀH‰D$0„.H‹="%)èPH…ÀH‰D$„+ò„$€èáKÿÿH…ÀI‰Æ„Tò„$ˆèÇKÿÿH…ÀI‰À„zò„$H‰D$è¨KÿÿH…ÀH‰D$L‹D$„‘H‹„$øòè„KÿÿH…ÀI‰ÂL‹D$„£H‰D$ H‹”$˜H‹„$øòèTKÿÿH…ÀH‰ÅL‹D$L‹T$ „ŸH‹„$øH‹´$°ò0è$KÿÿH…ÀH‰ÁL‹D$L‹T$ „žH‹D$1ÛH‹èÝ(HÇD$H9P…ŒH‹@H…ÀH‰D$H‰Ãt{H‹D$H‹t$H‹XH‹D$HÿH‹D$HÿH‹H‰D$ HÿÈH…ÀH‰u@H‹FH‰Œ$°H‰÷L‰”$˜L‰D$ ÿP0H‰\$L‹D$ »L‹”$˜H‹Œ$°ë H‰\$»H{H‰Œ$¸L‰”$°L‰„$˜èÐJÿÿH…ÀH‰D$ L‹„$˜L‹”$°H‹Œ$¸„×Hƒ|$t H‹T$H‰PH‹D$ H‹t$1ÒH‹|$HØH‰p(H‹t$ L‰pL‰@ L‰P0H‰h8H‰H@èò1H…ÀH‰Ã„žH‹D$ H‹T$ H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0H‹D$H‹t$H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0H‹=‘")èŒMH…ÀH‰D$ „nò„$€èPIÿÿH…ÀH‰Á„•ò„$ˆH‰D$è1IÿÿH…ÀH‰ÅH‹L$„°ò„$èIÿÿH…ÀI‰ÂH‹L$„ÎH‰D$H‹„$hH‰L$òW´±èßHÿÿH…ÀH‰D$L‹T$H‹L$„ÎH‹„$hH‹”$ òW{±è¦HÿÿH…ÀI‰ÀL‹T$H‹L$„ÈH‰D$H‹´$¨H‹„$hH‰Œ$€L‰T$ò0W2±è]HÿÿH…ÀI‰ÆL‹D$L‹T$H‹Œ$€„¥H‹D$ E1äH‹Û(HÇD$H9P…H‹@H…ÀH‰D$I‰Ät~H‹D$ H‹t$ L‹`H‹D$HÿH‹D$ Iÿ$H‹H‰D$HÿÈH…ÀH‰uAH‹FH‰Œ$ˆH‰÷L‰”$€L‰D$ÿP0L‰d$ L‹D$A¼L‹”$€H‹Œ$ˆë L‰d$ A¼I|$H‰Œ$ˆL‰”$€L‰D$èÿGÿÿH…ÀI‰ÃL‹D$L‹”$€H‹Œ$ˆ„ßHƒ|$t H‹D$I‰CH‹T$KãH‹|$ L‰ÞL‰\$H‰HH‰h H‰P0L‰P(1ÒL‰@8L‰p@è(/H…ÀH‰D$L‹\$„¥Iÿ u I‹CL‰ßÿP0H‹D$ H‹t$ H‹H‰D$HÿÈH…ÀH‰u H‹FH‰÷ÿP0¿èDÿÿH…ÀH‰D$ „ŒH‹@H‹T$H‹5Ù(H‰H‹D$ H‹@H‰PH‹D$0H9p…nH‹@H…ÀH‰D$„\H‹D$0H‹T$0L‹pH‹D$HÿH‹D$0IÿH‹H‰D$HÿÈH…ÀH‰…¢H‹BH‰×ÿP0é“H‹=+)è6JH…ÀI‰Ä„'H‹5Û)1ÒH‰Çè.H…ÀH‰D$0„Iÿ $u I‹D$L‰çÿP0H‹|$01Ò1öèü_H‹D$0H‹T$0H‹H‰D$HÿÈH…ÀH‰…ðH‹BH‰×ÿP0éá1Û1íA¹<¸˜éFÿÿ1Û1íA¹?¸˜éYŒÿÿ1Û1íA¹B¸˜éÿÿ1íA¹D¸˜é3Œÿÿ1íA¹G¸˜éúŒÿÿ1Û1íA¹J¸˜é Œÿÿ1íA¹\¸™éÚÿÿ1íA¹^¸™éÈÿÿ1íE1äA¹a¸™éÔ‹ÿÿ1íA¹d¸™é¡ÿÿ1íA¹f¸™é°‹ÿÿ1íA¹i¸™éwŒÿÿ1íE1äA¹l¸™é‰‹ÿÿ1Û1íA¹Œ¸éTÿÿ1Û1íE1äA¹Ž¸é^‹ÿÿ1ÛE1äA¹˜¸ž1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$éX£ÿÿA¹š¸ž1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛE1äé£ÿÿA¹œ¸ž1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1ö1ÛE1äéߢÿÿA¹ž¸ž1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ö1ÛE1ä骢ÿÿA¹¡¸ž1ÉHÇD$E1ÒE1ÀE1íE1ö1ÛE1äé~¢ÿÿA¹¤¸ž1ÉHÇD$E1ÒE1íE1ö1ÛE1äéU¢ÿÿA¹§¸ž1ÉHÇD$E1ÒE1í1ÛE1äé/¢ÿÿA¹µ¸ž1ÉE1í1ÛE1äé¢ÿÿA¹Ì¸ž1ÉE1ÒE1ÀHÇD$E1ÛE1öHÇD$ 1ÛHÇD$E1äéסÿÿA¹Ø¸Ÿ1ÉE1ÒE1ÀHÇD$E1ÛE1öHÇD$ 1ÛHÇD$1íE1äé—¡ÿÿA¹Ú¸Ÿ1ÉE1ÒE1ÀHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1äéZ¡ÿÿA¹Ü¸Ÿ1ÉE1ÒHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1äé ¡ÿÿA¹Þ¸Ÿ1ÉE1ÒE1ÛHÇD$ 1ÛHÇD$1íE1äéï ÿÿA¹á¸Ÿ1ÉE1ÒHÇD$ 1ÛHÇD$1íE1äéÁ ÿÿA¹ä¸Ÿ1ÉE1Ò1ÛHÇD$1íE1ä霠ÿÿA¹ç¸Ÿ1ÉE1Ò1Û1íE1ä造ÿÿA¹õ¸Ÿ1Û1íE1äéi ÿÿ1ÛE1äA¹ ¸ŸE1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$é- ÿÿA¹¸1ÉE1ÒE1ÀHÇD$E1ÛE1öHÇD$ 1ÛHÇD$E1äéïŸÿÿ1Û1íA¹„¸¢év‰ÿÿ1Û1íE1äA¹†¸¢é€‡ÿÿA¹¸£1ÉE1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛHÇD$1íE1äéŸÿÿ1ÛE1äA¹’¸£1ÉE1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$é@ŸÿÿA¹”¸£E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛHÇD$E1äéŸÿÿA¹–¸£E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛE1äéËžÿÿA¹™¸£E1ÒE1ÀE1íHÇD$E1ÛE1ö1ÛE1äéžžÿÿA¹œ¸£E1ÒE1ÀE1íHÇD$E1ö1ÛE1äétžÿÿA¹Ÿ¸£E1ÒE1ÀE1íE1ö1ÛE1äéSžÿÿA¹­¸£E1ÒE1í1ÛE1äé8žÿÿ1íE1äA¹Ä¸£1ÉE1ÒE1ÀE1íHÇD$E1ÛHÇD$ HÇD$éúÿÿA¹Ð¸¤1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛHÇD$ HÇD$1íE1äé³ÿÿA¹Ò¸¤1ÉHÇD$E1ÒE1ÀE1íE1ÛHÇD$ HÇD$1íE1äéuÿÿA¹Ô¸¤1ÉHÇD$E1ÒE1ÀE1íHÇD$ HÇD$1íE1äé:ÿÿA¹Ö¸¤1ÉHÇD$E1ÒE1ÀE1íHÇD$1íE1äéÿÿA¹Ù¸¤1ÉHÇD$E1ÒE1ÀE1í1íE1äéßœÿÿA¹Ü¸¤HÇD$E1ÒE1ÀE1í1íE1ä鸜ÿÿE1äA¹ß¸¤HÇD$E1ÒE1ÀE1í铜ÿÿA¹í¸¤HÇD$E1íE1äétœÿÿA¹¸¤1ÉE1ÀE1íHÇD$E1ÛHÇD$ HÇD$1íE1äé9œÿÿA¹¸¢1ÉE1ÒE1ÀE1íHÇD$E1ÛHÇD$ HÇD$1íE1äéû›ÿÿ1Û1íA¹y¸§é‚…ÿÿ1Û1íE1äA¹{¸§éŒƒÿÿA¹…¸¨1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1ä釛ÿÿA¹‡¸¨1ÉE1ÒE1ÀE1íHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1äéG›ÿÿA¹‰¸¨1ÉE1ÀE1íHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1äé ›ÿÿ1ÛE1äA¹‹¸¨1ÉE1ÀE1íHÇD$E1ÛHÇD$ HÇD$éÏšÿÿA¹Ž¸¨E1ÀE1íHÇD$E1ÛHÇD$ 1ÛHÇD$E1äé–šÿÿA¹‘¸¨E1ÀE1íHÇD$E1ÛHÇD$ 1ÛE1äéfšÿÿA¹”¸¨E1ÀE1íHÇD$E1Û1ÛE1äé?šÿÿA¹¢¸¨E1ÀE1í1ÛE1äé$šÿÿA¹¹¸¨1ÉHÇD$E1ÒE1ÀE1ÛHÇD$ 1ÛHÇD$1íE1äéç™ÿÿA¹Å¸©1ÉHÇD$E1ÒE1ÀE1ÛE1öHÇD$ 1ÛHÇD$1íE1äé§™ÿÿA¹Ç¸©1ÉHÇD$E1ÒE1ÀE1ÛE1ö1ÛHÇD$1íE1äép™ÿÿA¹É¸©1ÉHÇD$E1ÒE1ÀE1ÛE1ö1Û1íE1äéB™ÿÿA¹Ë¸©HÇD$E1ÒE1ÀE1ÛE1ö1Û1íE1äé™ÿÿ1ÛE1äA¹Î¸©HÇD$E1ÒE1ÀE1ÛE1öéì˜ÿÿA¹Ñ¸©HÇD$E1ÀE1ÛE1ö1ÛE1äéŘÿÿA¹Ô¸©E1ÀE1ÛE1ö1ÛE1ä駘ÿÿA¹â¸©E1ö1ÛE1äé˜ÿÿA¹ù¸©1ÉHÇD$E1ÒE1ÛHÇD$ 1ÛHÇD$1íE1äéU˜ÿÿA¹¸§1ÉHÇD$E1ÒE1ÀE1ÛHÇD$ 1ÛHÇD$1íE1äé˜ÿÿ1Û1íA¹n¸¬éŸÿÿ1Û1íE1äA¹p¸¬é©ÿÿA¹z¸­1ÉHÇD$E1ÒE1ÀE1íE1ÛE1öHÇD$ 1ÛHÇD$1íE1ä骗ÿÿA¹|¸­1ÉHÇD$E1ÒE1ÀE1íE1ÛHÇD$ 1ÛHÇD$1íE1äéj—ÿÿA¹~¸­1ÉHÇD$E1ÒE1íE1ÛHÇD$ 1ÛHÇD$1íE1äé-—ÿÿA¹€¸­1ÉE1ÒE1íE1ÛHÇD$ 1ÛHÇD$1íE1äéù–ÿÿA¹ƒ¸­1ÉE1íE1ÛHÇD$ 1ÛHÇD$1íE1äéÈ–ÿÿ1ÛE1äA¹†¸­1ÉE1íE1ÛHÇD$ HÇD$é™–ÿÿA¹‰¸­E1íE1ÛHÇD$ 1ÛHÇD$E1äél–ÿÿA¹—¸­E1íE1Û1ÛE1äéQ–ÿÿ1íE1äA¹®¸­1ÉHÇD$E1ÒE1ÀE1íE1ÛE1öHÇD$é–ÿÿA¹º¸®1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$1íE1ä騕ÿÿA¹¼¸®HÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$1íE1ä陕ÿÿE1äA¹¾¸®HÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$é\•ÿÿA¹À¸®HÇD$E1ÀE1íHÇD$E1ÛE1öHÇD$E1äé"•ÿÿA¹Ã¸®E1ÀE1íHÇD$E1ÛE1öHÇD$E1äéñ”ÿÿA¹Æ¸®E1íHÇD$E1ÛE1öHÇD$E1äéÔÿÿA¹É¸®E1íHÇD$E1ÛHÇD$E1ä阔ÿÿA¹×¸®E1íHÇD$E1äéy”ÿÿA¹î¸®1ÉHÇD$E1ÒE1ÀE1íE1öHÇD$1íE1äéD”ÿÿA¹ú¸¬1ÉHÇD$E1ÒE1ÀE1íE1ÛE1öHÇD$1íE1äé ”ÿÿ1Û1íA¹O¸°é“}ÿÿ1Û1íA¹Q¸°éy|ÿÿA¹V¸°1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ 1ÛHÇD$1íéÑÿÿ1Û1íA¹:¸˜é"}ÿÿI‹_H…Û„ÌÿÿM‹wHÿIÿIÿ…UI‹GL‰ÿÿP0éFL‰ã1íE1äA¹@¸éüzÿÿ1Û1íA¹1¸1ÉE1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$é“ÿÿ¿è]4ÿÿH…ÀI‰Å„•H‹D$1ÒI‰mL‰îL‰÷I‰E èÇH…ÀI‰Ät(I‹EL‰t$0HÿÈH…ÀI‰E…ªŒÿÿI‹EL‰ïÿP0雌ÿÿL‰t$01Û1íA¹;¸1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$éU’ÿÿL‰t$0A¹5¸1ÉE1ÒE1ÀHÇD$E1ÛE1öHÇD$ 1ÛHÇD$E1äé’ÿÿ¿èo3ÿÿH…ÀI‰Å„ŽH‹D$01ÒI‰]L‰îL‰÷I‰E èÙH…ÀI‰ÄtUI‹EM‰÷HÿÈH…ÀI‰E…UŒÿÿI‹EL‰ïÿP0éFŒÿÿHôÔ(H9„$8u HÇ„$8H¼$øèÁ5ÿÿéNŒÿÿ1Û1íM‰÷A¹Z¸é,ÄÿÿM‰÷A¹T¸1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$1íE1äé$‘ÿÿHdÔ(H9„$¨u HÇ„$¨H¼$hè15ÿÿéÍ‹ÿÿH5Ô(H9„$u HÇ„$H¼$Øè5ÿÿé­‹ÿÿHÔ(H9„$ˆu HÇ„$ˆH¼$HèÓ4ÿÿé‹ÿÿH×Ó(H9„$øu HÇ„$øH¼$¸è¤4ÿÿém‹ÿÿ1Û1íA¹P¸1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$éÿÿH‹|$0L‰öè98H…ÀI‰Å„IÿuyI‹FL‰÷ÿP0ëm¿H‰L$èM1ÿÿH…ÀH‰ÃH‹L$„yH‹D$1ÒH‰ÏL‰s H‰ÞH‰L$H‰Cè­H…ÀI‰ÅH‹L$„ýH‹H‰L$0HÿÈH…ÀH‰u H‹CH‰ßÿP0H‹D$0H‹T$0H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0¿è~-ÿÿH…ÀH‰D$0tHH‹@L‰(H‹þÂ(I9G…M‹oM…í„M‹wIÿEIÿIÿ…‰I‹GL‰ÿÿP0éz1Û1íE1äA¹5¸¢é¬ÁÿÿA¹&¸¢1ÉHÇD$E1ÒE1ÀHÇD$E1ÛHÇD$ 1ÛHÇD$1íE1ä騎ÿÿH‰L$0A¹0¸¢1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$1íE1äé\ŽÿÿH‰L$01íE1äA¹*¸¢1ÉE1ÒE1ÀE1íHÇD$E1ÛHÇD$ HÇD$éŽÿÿH‹t$0L‰ÿè36H…ÀI‰Ät0H‹D$0H‹t$0H‹H‰D$HÿÈH…ÀH‰…uˆÿÿH‹FH‰÷ÿP0éfˆÿÿ1Û1íA¹E¸¢1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$é‹ÿÿ¿èè.ÿÿH…ÀH‰Ãt[H‹D$01ÒL‰kH‰ÞL‰÷H‰C èVH…ÀI‰Ät$H‹M‰÷HÿÈH…ÀH‰…Ô‡ÿÿH‹CH‰ßÿP0éŇÿÿ1íM‰÷A¹O¸¢éÚtÿÿM‰÷1íE1äA¹I¸¢1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$éÔŒÿÿ¿H‰L$è,.ÿÿH…ÀI‰ÅH‹L$„8H‹D$1ÒH‰ÏM‰uL‰îH‰L$I‰E èŒH…ÀI‰ÄH‹L$„¥I‹EH‰L$0HÿÈH…ÀI‰Eu I‹EL‰ïÿP0H‹D$0H‹T$0H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0¿è[*ÿÿH…ÀH‰D$0„’H‹@L‰ H‹׿(I9G…[I‹_H…Û„NM‹wHÿIÿIÿ…I‹GL‰ÿÿP0éŽH‰L$01Û1íA¹%¸§1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$锋ÿÿL‰ã1íE1äA¹*¸§é8sÿÿH‰L$0A¹¸§1ÉHÇD$E1ÒE1ÀE1ÛHÇD$ 1ÛHÇD$1íE1äé:‹ÿÿH‹t$H‹|$0èR3H…ÀI‰Ät0H‹D$H‹t$H‹H‰D$HÿÈH…ÀH‰…þÿÿH‹FH‰÷ÿP0éŽþÿÿ1Û1íA¹¸§1ÉHÇD$E1ÒE1ÀE1íE1ÛE1öHÇD$ HÇD$鳊ÿÿH‹t$0L‰ÿèÍ2H…ÀI‰Ä…–üÿÿ1Û1íA¹:¸§1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$éQŠÿÿ¿è®+ÿÿH…ÀI‰Åt=H‹D$01ÒI‰]L‰îL‰÷I‰E èH…ÀI‰Ä…?øÿÿ1Û1íM‰÷A¹D¸§éÀ¼ÿÿM‰÷A¹>¸§1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$1íE1ä鸉ÿÿ¿è+ÿÿH…ÀH‰Ã„2H‹D$1ÒH‰ÞL‰÷H‰CH‹D$ H‰C èzH…ÀI‰Å„¤H‹L‰t$0HÿÈH…ÀH‰u H‹CH‰ßÿP0H‹D$0H‹T$0H‹H‰D$HÿÈH…ÀH‰u H‹BH‰×ÿP0¿èP'ÿÿH…ÀH‰D$0„”H‹@L‰(H‹̼(I9G…îM‹oM…í„áM‹wIÿEIÿIÿ…6I‹GL‰ÿÿP0é'L‰t$0A¹¸¬1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$1íE1ä釈ÿÿ1Û1íE1äA¹¸¬é.»ÿÿL‰t$01íE1äA¹¸¬1ÉHÇD$E1ÒE1ÀE1íE1ÛE1öHÇD$é3ˆÿÿH‹t$ H‹|$0èK0H…ÀI‰Åt0H‹D$ H‹t$ H‹H‰D$HÿÈH…ÀH‰…¡þÿÿH‹FH‰÷ÿP0é’þÿÿA¹ ¸¬1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1ö1ÛHÇD$1íE1ä鬇ÿÿ¿è )ÿÿH…ÀH‰Ãt;H‹D$01ÒL‰kH‰ÞL‰÷H‰C èwH…ÀI‰Ä…úÿÿ1íM‰÷A¹6¸¬éoÿÿM‰÷1íE1äA¹0¸¬1ÉHÇD$E1ÒE1ÀHÇD$E1ÛE1öHÇD$ HÇD$é‡ÿÿH‹t$0L‰ÿè//H…ÀI‰Ä…øøÿÿ1Û1íA¹,¸¬1ÉHÇD$E1ÒE1ÀE1íHÇD$E1ÛE1öHÇD$ HÇD$鳆ÿÿHÄ([]A\A]A^A_ÄH=A÷(HA÷(UH)øH‰åHƒøvH‹>º(H…Àt ]ÿàfD]Ã@f.„H=÷(H5úö(UH)þH‰åHÁþH‰ðHÁè?HÆHÑþtH‹éº(H…Àt ]ÿàf„]Ã@f.„€=Éö(u'Hƒ=Ǻ(UH‰åt H‹=¾(è*ÿÿèHÿÿÿ]Æ ö(óÃ@f.„H=™·(Hƒ?u é^ÿÿÿfDH‹!º(H…ÀtéUH‰åÿÐ]é@ÿÿÿATUI‰ÔSH‰ûH‹H‰õH…ÿt H‰ÖÿÕ…Àu!H‹{1ÀH…ÿt[L‰æH‰è]A\ÿàf.„[]A\Ãf.„USH‰ýHƒìH‹ˆ¹(H‹H‹H‰]HƒÀH…ÿH‰t Hƒ/t3H‹H‹}HƒÀH‰]H‰H…ÿt Hƒ/uH‹GÿP0HƒÄ1À[]ÃfDH‹GÿP0ëÄ€USH‰ýHƒìH‹¹(H‹H‹H‰]HƒÀH…ÿH‰t Hƒ/tcH‹H‹}HƒÀH‰]H‰H…ÿt Hƒ/t6H‹H‹} HƒÀH‰] H‰H…ÿt Hƒ/uH‹GÿP0HƒÄ1À[]Ãf„H‹GÿP0ëÁ€H‹GÿP0딀ATUI‰ÔSH‰ûH‹H‰õH…ÿt H‰ÖÿÕ…Àu!H‹{1ÀH…ÿt[L‰æH‰è]A\ÿàf.„[]A\Ãf.„USH‰ýHƒìH‹(¸(H‹H‹H‰]HƒÀH…ÿH‰t Hƒ/t3H‹H‹}HƒÀH‰]H‰H…ÿt Hƒ/uH‹GÿP0HƒÄ1À[]ÃfDH‹GÿP0ëÄ€USHƒìH‹ƒ·(H‹H‹HHH‹hPH‹XXH‰xHH‰pPH‰PXH…ÉtHƒ)tMH…ítHƒmt1H…ÛtHƒ+tHƒÄ[]ÀH‹CH‰ßH‹@0HƒÄ[]ÿàDH‹EH‰ïÿP0ëÃ@H‹AH‰ÏÿP0ë§@@€ÿs‡VH/s@¶×HcHÐÿàfHIoÄHÌoH6p…öHDÂÃH¬oH/p…öHDÂÃH¥oHðo…öHDÂÃHoÃH'oÄH,oÄH”oÄH#oÄH‚qÄH®nÄH¶nÄH½nÄHÃnÄH oÄH oÄH¯nÄHÓnÄH nÄHÝnÄA‰ðAƒèxWIcȉðHÁá9|C1öE…Àu ë@~8pD9Æ}&D‰À)ð‰ÁÁéÈÑøðHcÈHÁá‹ 9Ê}ØA‰ÀD9Æ|Ú1ö9Ê@ŸÆðóÃ@‹1À1ö9Ê@ŸÆðëêSH‰ûH‹H…ÿtHÇCHƒ/„!H‹{@H…ÿtHÇC@Hƒ/„öH‹{HH…ÿtHÇCHHƒ/„ËH‹{ H…ÿtHÇC Hƒ/„ H‹{(H…ÿtHÇC(Hƒ/tyH‹{0H…ÿtHÇC0Hƒ/tRH‹{PH…ÿtHÇCPHƒ/t+H‹{XH…ÿtHÇCXHƒ/uH‹GÿP01À[Ãf„H‹GÿP0ëÌ€H‹GÿP0륀H‹GÿP0é{ÿÿÿ@H‹GÿP0éTÿÿÿ@H‹GÿP0é)ÿÿÿ@H‹GÿP0éþþÿÿ@H‹GÿP0éÓþÿÿ@H‹GPHƒH‹GPÃH‹GXHƒH‹GXÃHƒìL‹GM…Àt{M‹I9ùtC‹w@¾DèüÿÿI‹PðH5lxH‹ I‹M‹IH‹L‹H‰ÁH‹R³(H‹81ÀHƒÄé|"ÿÿ@H‹LÀlH‹‹w@¾Dè?üÿÿH5èwI‰ÁM‰ÐL‰Òë¼DL”lH cnëÍ„GÁHƒì<4weH q¶ÀHcHÁÿáf¸HƒÄÃfD¸HƒÄÃfD¸HƒÄÃfD¸HƒÄÃfD¸HƒÄÃfDH‹²(@¾×H5¶wH‹81Àè¤!ÿÿ1ÀHƒÄÃf.„¶wD1À@„ö„ßAWAVAUATUSH‰ýHƒì(H‹GH‹H‹:Hƒ„ó@€þs„±@€þp„§D¶EGE1ÉE„À„Þ‹OX…ɎȃéHWA½HLÏ f„L¯*HƒÂH9ÑuóÆEGHÇE0V¾‹}@€ú1‡ŽH ¥p¶ÒHc‘HÑÿáDHƒ}0HÇE…&ÆEDÇE@1ÀHƒÄ([]A\A]A^A_óÃXH‹M0A¹A”ÀDˆEGH‹H‹:H‹WH9Ñ„8ÿÿÿH5¨véíA½éfÿÿÿA‰ôH‹¶EFIMÿL=¨qL5ÍpH‰L$H‹ <@„i<^„`FÁ<4‡]¶ÀIc†LðÿàA¹f.„H‹Q¶A\L9Ê„¿H‹SHcƒæ(Hƒz 8uƒøP‰næ(H‡æ(H‰Â[ÃH‰ßH‹‚@[ÿàH‹GÿP0ë¹€H‹GÿP0ë’€H‹GÿP0éhÿÿÿ@SH‰ûèwÿÿH‹{H…ÿtHÇCHƒ/thH‹{H…ÿtHÇCHƒ/tAH‹SHc>æ(Hƒz uƒøP‰)æ(HBæ(H‰Â[Ã@H‰ßH‹‚@[ÿàH‹GÿP0ë¶€H‹GÿP0ëDf.„AWAVAUATI‰üUS‰Õ‰óHƒì…öH‰L$u…Ò„*A‰×ëDA‰÷L‹5Îî(M…ö„ÕD‹-¶î(D‰úL‰÷D‰îè(òÿÿA9ÅŽ·H˜HÁàLðD98…¥L‹`Iƒ$H‹§(H‹žî(1ÉL‰æH‹8èùÿÿH…ÀH‰ÃtQ‰h|H‰ÇèÿÿIƒ,$„ÛHƒ+tHƒÄ[]A\A]A^A_ÃfDH‹CH‰ßH‹@0HƒÄ[]A\A]A^A_ÿàDIƒ,$uÄI‹D$L‰çH‹@0HƒÄ[]A\A]A^A_ÿàDH‹|$è.ÿÿH…ÀI‰Åt‘…Ût8Hp`H=r`‰ÙL‰æ1Àè8ÿÿI‰Æë$H‹|$èöÿÿH…ÀI‰Å„UÿÿÿL‰çèâÿÿI‰ÆM…ö„6L‹ —í(L‹ˆí(1É1Ò1ö1ÿAPUAVAUAQAQAQAQèìÿÿI‰ÄI‹EHƒÄ@HƒèH…ÀI‰E„ Iƒ.„¦M…ä„èþÿÿ…ÛL‹=,í(…¾…í„’þÿÿA‰îM…ÿ„Š‹í(D‰òL‰ÿ‰Æ‰Ã‰D$èqðÿÿLcèD9ë޵IcõHÁæLþD96„‹D$;Ìì(„ž‹T$fDHcƒêHÁàA9ÕI‹LðI‹\øI‰ I‰\|ÞD‹T$D‰6L‰fAƒÂD‰ì(Iƒ$éñýÿÿDI‹D$L‰çÿP0éþÿÿA‰ÞéEÿÿÿ„Iƒm…þÿÿI‹EL‰ïH‹@0éþÿÿD‹D$;*ì(uT‹\$L‰ÿƒÃ@HcóHÁæènÿÿH…ÀI‰Ç„~ýÿÿH‰ì(‹õë(IcõHÁæ‰ìë(LþA9ʼnD$Œÿÿÿé=ÿÿÿIÁåK4/é-ÿÿÿH‹~L‰fHƒ/…-ýÿÿH‹GÿP0é!ýÿÿDI‹EL‰ïÿP0éQþÿÿI‹FL‰÷ÿP0éKþÿÿ¿èæÿÿH…À„éüÿÿH‰në(Ç`ë(@ÇRë(D‰0L‰`Iƒ$é½üÿÿ‹G`…À…uAWAVI‰þAUATUSHƒìH…ö„cL‹oèbÿÿH…ÀI‰Ä„vI‹EL‹xM…ÿ„uL;=6¤(„¨Iƒ1íI;o0I‹GH‹èHƒÅHƒI‹}I‰EH…ÿtH‹HPÿH…ÒH‰t<1ÿèÅ ÿÿH…ÀH‰ÃtCI‹uH‰ÂL‰çè^ÿÿ…À…–Hƒ+užH‹CH‰ßÿP0ë’@H‹GÿP01ÿè‚ ÿÿH…ÀH‰Ãu½½Ù$Iƒ,$„'Iƒ/tdH…ÛtHƒ+tiH BjH=î\º¨‰îE1äèûÿÿAÇF`ÿÿÿÿL‰÷èüíÿÿHƒÄL‰à[]A\A]A^A_Ãf.„½Û$ë”f„I‹GL‰ÿÿP0ë@H‹CH‰ßÿP0ë‹@1ÀÃD½Ä$éuÿÿÿfDIƒ/u†I‹GL‰ÿÿP0éwÿÿÿ½Å$éMÿÿÿfDH‹!£(H+\H5 i½Ç$H‹81ÀèŒÿÿIƒ,$…ÿÿÿI‹D$L‰çÿP0éÿÿÿH‹9¢(H5i½Ê$H‹8è%ÿÿëÇI‹D$L‰çÿP0éÉþÿÿATUI‰ÔSH‰ûH‹H‰õH…ÿt H‰ÖÿÕ…Àu1H‹{H…ÿt L‰æÿÕ…ÀuH‹{ 1ÀH…ÿt[L‰æH‰è]A\ÿà„[]A\Ãf.„ATI‰üUSH‹H‰óH‰ÕH…ÿt H‰ÖÿÓ…ÀuiI‹|$@H…ÿt H‰îÿÓ…ÀuVI‹|$HH…ÿt H‰îÿÓ…ÀuCI‹|$ H…ÿt H‰îÿÓ…Àu0I‹|$(H…ÿt H‰îÿÓ…ÀuI‹|$01ÀH…ÿtH‰îH‰Ø[]A\ÿàD[]A\ÃHƒìH…ötGH‹Fö€«t:H‹GXHƒH‰wXH…ÀtH‹HQÿH…ÒH‰t 1ÀHƒÄÃH‹PH‰ÇÿR0ëê@H‹É (H5*hH‹8èº ÿÿ¸ÿÿÿÿHƒÄÃHƒìH…ötGH‹Fö€«t:H‹GPHƒH‰wPH…ÀtH‹HQÿH…ÒH‰t 1ÀHƒÄÃH‹PH‰ÇÿR0ëê@H‹Y (H5êgH‹8èJ ÿÿ¸ÿÿÿÿHƒÄÃHƒìH‹¾HЀù wIHJ¾Rƒè0rÐ@€þw!f.„€HƒÁDBоrÐ@€þvéƒøÿH‰t HƒÄÃ@¶¾ÐH‹ÓŸ(H5”gH‹81Àèúÿÿ¸ÿÿÿÿHƒÄÃAWAVI‰ÿAUATH‰ðUSHaH½>Hƒì8dH‹<%(H‰|$(1ÿH|$Ld$ H‰t$H‰|$¶€ù}wG¶ÑHc“HÚÿâD9t$…U„É„'AÆGGIÇG(HƒÀH‰D$¶€ù}vÀ€H‹|$èÞþÿÿƒøÿ„\H˜I‰G(H‹D$ë‘„E1öL‰ÿè•ìÿÿƒøÿ„3I‹G(I‰G0A¶GEAˆGFH‹D$¶HƒÀE‰w@H‰D$IÇG(AˆWDé>ÿÿÿDE1öA8ODuªE;w@u¤A¶EA8Fu™HƒÀI‹W(IÇG(IW0H‰D$éÿÿÿ„A€Dt Iƒ„L‰ÿèöëÿÿƒøÿ„”Iƒ…úH‹D$é„L‰ÿèÈëÿÿƒøÿ„fI‹G(IG A¶GEIÇG(IÇG0AÆGDAˆGFH‹D$HƒÀH‰D$éoþÿÿfDHƒÀL‰ÿI‹_8H‰D$èkëÿÿƒøÿ„ H…ÛAÆGD„rÿÿÿI‹O 1ÒH‰ÈH÷óH…Ò„]ÿÿÿHÙH)ÑI‰O éNÿÿÿHƒÀAÆGE=H‰D$éþÿÿDHPH‰T$¶HAš<v €ùd…ÕH‰ÐA¾é þÿÿDHPM‹w(IÇG(I‹8H‰T$€x{H‰|$…ÝL‰ÿè¸êÿÿƒøÿtZH‹D$AÆGDIÇG0IÇG8HƒÀM…öH‰D$„¯E1íH‰Æë€IƒÅM9î„“H‹t$L‰ÿèþüÿÿH…Àuá1Àé fHPH‰T$¶AˆGEH‰Ðé!ýÿÿ„I‹WH‰D$ HƒÀIƒ(H‹H‹H‰D$ ‹rX‰t$…¦L‰ÿèþéÿÿƒøÿt H‹D$ E1öA½¶L‰êHÓâH!ê€ù)„Öüÿÿ„ÉuéÍüÿÿDH…Òt€ù vöL‰çèÖûÿÿƒøÿ„TÿÿÿD9t$~I‹WIcÎH‹H‹H‹TÊHcÈH9Ñ…†H‹D$ ¶€ù,t €ù)…/€ù,„±AƒÆéxÿÿÿH‹±›(H5²cH‹8èªÿÿ1ÀH‹\$(dH3%(…‹HƒÄ8[]A\A]A^A_ÃDHPH‰T$€x:tHƒÀDH‰D$H‰ÂHƒÀ€xÿ:uîHBH‰D$éÑûÿÿL‰ÿè çÿÿ1Àë”@H‹t$H‰D$H…ö„®ûÿÿI‰w8é¥ûÿÿ@HPH‰T$ ¶HH‰Ðé:ÿÿÿI‹GH5õcD‰ñH‹H‹‹PXH‹Úš(H‹81Àè ÿÿH…À…Àûÿÿ1Àé ÿÿÿ„H‹±š(H5"cH‹8èªÿÿ1ÀéûþÿÿH‹”š(H5ec¾ÑH‹81Àè¸ ÿÿë®H‹wš(H5°_ºZH‹81Àè™ ÿÿ1Àéºþÿÿ‰ÁH‹Qš(H5òbH‹81Àèx ÿÿékÿÿÿH‹4š(H5ubH‹8è-ÿÿ1Àé~þÿÿH‹š(H5@cH‹8èÿÿ1ÀéaþÿÿèÔÿÿ@H9÷t5H‹GH;Pš(u>H9Wt"H‹‘™(HƒÃ@fïÀòH*Âf.GzàuÞH‹š(HƒÃf.„H;q™(tϺéÿÿf.„H‹‡01öÿàDHƒ 8‹õÖ(u[…À~WƒèH ×(S‰ÞÖ(H˜H‰úH‹Á1ÀH{H‰ÙHÇC0HƒçøH)ùƒÁ8ÁéóH«H‰SHÇH‰ßèÑÿÿH‰Ø[Ã@ë†fDHƒ ‹åÖ(uC…À~?ƒèHõÖ(S‰ÎÖ(H˜H‹ÂH‰{HÇCH‰ßHÇCHÇèuÿÿH‰Ø[Ãé+ÿÿÿf.„Hƒ ‹ÅÕ(uC…À~?ƒèHÕÕ(S‰®Õ(H˜H‹ÂH‰{HÇCH‰ßHÇCHÇèÿÿH‰Ø[ÃéËþÿÿf.„H…öATUStH‰ýH‹?H‰óH9þu9A¼D‰à[]A\ÃH‹É—(H5åQE1äH‹8èÿÿD‰à[]A\Àèÿÿ…ÀA‰Äu»H‹EH‹KH5maH‹PH‹Ú—(H‹81ÀèÿÿD‰à[]A\ÄSH‰ûè—ÿÿHƒ{8tH‰ßè(ÿÿ‹C`…À~)H‰ßèIÿÿH‹CH‰ßÿxHƒ;~[Ã@H‰ßèXÿÿH‰ßè`âÿÿH‰ß[é§ÿÿ€AWAVI‰ÖAUATI‰õUSI‰üHìØdH‹%(H‰„$È1Àè~ÿÿH…À„µH‰ÅH‰ÇèÿÿHƒmH‰Ã„äH…Û„“L‰ïèKÿÿH…ÀI‰Ç„¯H‰ÆH‰ßèDÿÿIƒ/H‰Å„×Hƒ+„½H…ítXH‹Eö€«€„ÇL9u ‡åH‰èt:H‹™–(H5¢`L‰éL‰âH‹81ÀèºÿÿHƒmuH‹EH‰ïÿP0f„1ÀH‹Œ$ÈdH3 %(…ÇHÄØ[]A\A]A^A_ÃDHƒ+uÊH‹CH‰ßÿP0ë¾fDH‹EH‰ïÿP0é ÿÿÿf„H‹CH‰ßÿP0é4ÿÿÿI‹GL‰ÿÿP0éÿÿÿH‹é•(H5Š_L‰éL‰âH‹81ÀèÿÿéCÿÿÿDH‘_M‰èL‰á¾ÈH‰ç1ÀèLÿÿ1Ò1ÿH‰æèÐÿÿ…ÀˆÿÿÿH‰èé"ÿÿÿè[ÿÿf.„USH‰ýHƒìèÂÿÿH…À„¹H‹ª•(H5TOH‰ÇH‰Ãèÿþÿ…ÀˆˆH‹áÛ(H5JOH‰ßèrÿþÿ…ÀxnH5NOH‰êH‰ßè\ÿþÿ…ÀxXH‹1Ü(H59OH‰ßèBÿþÿ…Àx>H=7_E1ÀH‰ÙH‰Ú¾è´ÿÿH…ÀtH‹HQÿH…ÒH‰tpHƒ+tRHƒÄH‰è[]ÃHƒ+u H‹CH‰ßÿP0H‰ïè˜ÿÿH‹1•(H5"`ºH‹8è½ÿþÿ…Ày¿HƒmtB1íë´fDH‹CH‰ßÿP0HƒÄH‰è[]Ã@H‹PH‰ÇÿR0Hƒ+…‚ÿÿÿëÒf.„H‹EH‰ï1íÿP0éeÿÿÿDf.„AWAVI‰×AUATI‰þUSHÎH‰õHƒìHdH‹%(H‰D$81ÀHD$0Ll$(Ld$ L‰D$HÇD$ HÇD$(HÇD$0H‰D$H‹t$L‰éL‰âL‰÷è=ÿÿ…À„(H‹ H…É„ÁH‹t$ H‹9H‰ØH9þI‰ðu ët@H92tkHƒÀH‹H…ÒuïH‹FH;„“(…_H‰Úëf„HƒÂH‹H…À„H‹8H‹FH9GuãH‰T$è™ÿÿ…ÀH‹T$u!H‹t$ I‰ðëÆfDH‹T$(H)èI‰é?ÿÿÿH‹L$(H‰ÐH)èI‰ Hƒ:…&ÿÿÿH‹t$ I‰ðë@H‹t$ H‹FH;è’(I‰ð…ÀH9Ý„›H‹EH‹8H9÷uyL‰ÇèRÿÿH‹T$H5Ž^H‰ÁH‹Œ’(H‹81Àè²ÿÿ¸ÿÿÿÿH‹\$8dH3%(…qHƒÄH[]A\A]A^A_ÃèÅÿÿ…ÀutHƒÅH‹t$ H9ët%H‹EI‰ðH‹8H9÷t‡H‹FH9GtÍHƒÅH9ëuÞI‰ðL‰ÇèÃÿþÿH‹T$H‰ÁH5Ä]élÿÿÿH‹€¨©tH…ÉI‰ð„&ÿÿÿH‹9éþÿÿL‹D$ é)ÿÿÿ©„©H…ÉtiH‰ÚëtDHƒÂH‹ H‹t$ H…ÉtQH‹9H9÷t+H‰T$è)ÿÿ…ÀH‹T$yÒè ÿþÿH…ÀH‹T$tÅë}€H‹L$(H‰ÐH)èI‰ Hƒ:…ŸýÿÿH‹t$ H9Ýu"é2ÿÿÿèÛÿÿ…Àx^„dÿÿÿHƒÅH9ëtEH‹t$ H‹EI‰ðH‹8H9÷uÔéuþÿÿH‹‘(H‹T$H5<]H‹81Àè2ÿÿ¸ÿÿÿÿé{þÿÿèÃüþÿL‹D$ éÎþÿÿèdþþÿH…ÀtžëÛf.„Hƒì(H‹WH‰ødH‹ %(H‰L$1ÉH;‘(u,H‹WHzH1úx/èZÿþÿH‹L$dH3 %(…×HƒÄ(ÃH;A(t'èRûþÿëÖH…ÿyÌH‹Ì(H‰ÇH‹R`ÿë¿f„H‹ù(òOòL$‹H…À‰ uzH‹=(è7ýþÿ…Àu@fïÀòH*žeòXD$H|$òD$èÀûþÿò,ÀH‹¥(òD$)è¸üþÿéIÿÿÿH‹(H5!JH‹8èÍûþÿH‹v(Ç1Àéÿÿÿò!eë™èzûþÿf.„USH‰ýHƒìH‹=°Ö(H‹WH‹‚H…Àt H‰îÿÐH‰ÃH…Ût+HƒÄH‰Ø[]Ãf„H‹B@H…Àt5Hu$ÿÐH‰ÃëÔ@H‹é(HU$H5†IH‹81Àè\þþÿHƒÄH‰Ø[]ÃH‰îèzþþÿH‰ÃëDSH‰þH‰ûH‹=*Ö(èýûþÿH…ÀtHƒ[ÃfH‰ß[éGÿÿÿ€AWAVAUATI‰õUSHƒìH‹5ˆÒ(H‰|$H‹=ÜÕ(H‹WH‹‚H…À„HÿÐH‰ÅH…í„jE1äM…í„H‹=·Õ(èÒýþÿH…ÀI‰Æ„.èÁüþÿH…ÀH‰Ã„HÇÇÿÿÿÿèýþÿH…ÀI‰Ç„HƒìI‰ÁM‰èjH‹t$H‰ÙL‰ò1ÀH‰ïè üþÿI‰ÅI‹HƒèH…ÀI‰ZY„„H‹EHPÿH…ÒH‰UtcM…ätIƒ,$t7H…ÛtH‹HPÿH…ÒH‰u H‹CH‰ßÿP0HƒÄL‰è[]A\A]A^A_ÀI‹D$L‰çÿP0ë¼Hƒmu|I‰Ä1ÛE1í@H‹EH‰ïÿP0ë‘@I‹GL‰ÿÿP0émÿÿÿ1ÿè™÷þÿH…ÀI‰Åt¾I‰ÄéÛþÿÿf„H‹B@H…Àt/HƒÆ$é¦þÿÿfD1ÛE1íé*ÿÿÿfDE1íéÿÿÿE1íéOÿÿÿèƒüþÿH‰Åéxþÿÿf.„AUATI‰üUS¿H‰õHƒìèVúþÿH…À„HƒEH‰ÃH‰hI‹D$H‹¨€H…í„„L‹-ÕŒ(I‹U‹BƒÀ‰BH‹ÉŒ(;}1ÒH‰ÞL‰çÿÕH‰ÅI‹EƒhH…í„I‰ìH‹HPÿH…ÒH‰u H‹CH‰ßÿP0HƒÄL‰à[]A\A]ÃDHƒÄE1ä[L‰à]A\A]ÀL‰ç1ÒH‰ÞèKûþÿI‰ÄëªfDH=yRèdùþÿ…À„oÿÿÿE1äë‹€è‹ùþÿH…ÀI‰Ä…pÿÿÿH‹ ‹(H5aRH‹8èé÷þÿéXÿÿÿ@H‹™Œ(H9Gu[H‹Gö@tQATUSHƒìH‹Ê‹(H‹hL‹gH‹‹BƒÀ‰BH‹·‹(;+L‰çÿÕH‰ÅH‹ƒhH…ít7H‰èHƒÄ[]A\ÃécþÿÿH=¹QH‰t$èŸøþÿ…ÀH‹t$t»1ÀëÎfèËøþÿH…Àu¿H‹çŠ(H5¨QH‰D$H‹:è+÷þÿH‹D$HƒÄ[]A\Ãf.„USHƒìH‹GH÷€¨€…¥H‹@`H…À„àHƒ¸tnè ùþÿH?EH‰ÅH…턾H‹EH‰ëH÷€¨€trH‹€¨©€„ÐH‹CH‹3HVÿH…ÒH‰uH‹SH‰D$H‰ßÿR0H‹D$HƒÄ[]ÃfHƒ¸˜t^èAöþÿHËDH‰Åë†DHƒH‰ûë•€L‹@H‹5Š(H5†VH‰ÑH‹81ÀèQùþÿHƒmt:HƒÄHÇÀÿÿÿÿ[]Ã@èƒ÷þÿH…ÀuäH‹÷‰(H5fDH‹8èèõþÿëÌfDH‹EH‰ïÿP0ëº@©t~H‹CHHHƒùwcHMHc ŠHÊÿâ‹C÷ØH˜éÿÿÿ@‹C‹SHÁàH ÐH÷Øéçþÿÿ‹CéÜþÿÿ„‹C‹SHÁàH ÐéÂþÿÿfDH‰ßèàöþÿé¯þÿÿH‰ßè3þÿÿé¢þÿÿ@f.„USHƒìH‹GH÷€¨€…¥H‹@`H…À„Hƒ¸tnè)÷þÿH_CH‰ÅH…í„ÞH‹EH‰ëH÷€¨€„ŽH‹€¨©€„ìH‹SHcʉÐH9Ê…*H‹3HVÿH…ÒH‰t;HƒÄ[]Ã@Hƒ¸˜t~èaôþÿHëBH‰Åë†DHƒH‰û뙀H‹S‰D$ H‰ßÿR0‹D$ HƒÄ[]ÀL‹@H‹5ˆ(H5†TH‰ÑH‹81ÀèQ÷þÿHƒmt:HƒÄ¸ÿÿÿÿ[]ÃfDèƒõþÿH…ÀuäH‹÷‡(H5fBH‹8èèóþÿëÌfDH‹EH‰ïÿP0ëº@©„õH‹CHƒÀHƒø‡£HKHc‚HÂÿâ‹S‹CHÁâH ÂH÷ÚHcʉÐH9Ê„ØþÿÿfH‹±‡(H5úSH‹8èjóþÿ¸ÿÿÿÿé¶þÿÿ1Àé¯þÿÿf„‹Céžþÿÿ„‹C÷ØéŒþÿÿfD‹S‹CHÁâH ÂHcʉÐH9Ê„kþÿÿë“H‰ßè˜ôþÿHcÐH‰ÅH9ЄOþÿÿHƒøÿ…oÿÿÿèjôþÿH…À„aÿÿÿ‰èé0þÿÿf.„H‰ßè˜ýÿÿéþÿÿATUSHƒì€dH‹oH…*H…íH‰û„ŽHƒEH{dH‰îè-H‹{HA‰ÄH…ÿtHÇCHH‹HPÿH…ÒH‰„ÖH‹EHPÿH…ÒH‰U„E…ä„8ƒ{`ÿ„æH‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿt Hƒ/„+M…ät Iƒ,$„H…ít Hƒm„Ã1öÆCdH‰ßÿSH…ÀÆCd„âH‹Û…(L‹C H‹H‹z`L‰B`L‹C(H‹JpH‹rhL‰BhL‹C0H…ÉL‰BpH‰{ H‰s(H‰K0t(H‹QH‹zH…ÿtHÇBH‹HQÿH…ÒH‰„«H‹HQÿH…ÒH‰t$H‹=…(H5þQH‹8èFñþÿ1ÀHƒÄ[]A\ÃH‹PH‰ÇÿR0ëÐ@H‹EH‰ïÿP0é.ÿÿÿf„H‹©…(H‹8èqñþÿé´þÿÿ@I‹D$L‰çÿP0éíþÿÿ„H‹GÿP0éÉþÿÿ@H‹EH‰ïÿP0épþÿÿH‹WH‰D$ÿR0H‹D$H‹HQÿH…ÒH‰…@ÿÿÿé_ÿÿÿ€H‹GÿP0éþÿÿ@H‹q„(H5ÿ>H‹8èjðþÿHƒÄ1À[]A\ÀH‹Ù„(H‹8è¹ðþÿèÄñþÿH…ÀH‰Ãt1H‹-½„(H;]tH‹È„(H‹0H9ótH‰ßèðþÿ…À„è+ñþÿH‹L„(HƒHƒÄ[]A\ÀH‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿt Hƒ/uH‹GÿP0M…ätIƒ,$u I‹D$L‰çÿP0H…í„QÿÿÿHƒm…FÿÿÿH‹EH‰ïÿP0é7ÿÿÿH‹uH‰ßèdïþÿ…À…\ÿÿÿ1Àé!þÿÿDATUH‰õSHƒìH‹îÉ(H9F„¤ÆH‹UI‰üH‹5KÈ(H‹‚H…À„›H‰ïÿÐH‰ÃH…Û„¢1ö1ÀH‰ßèfîþÿH‹ HQÿH…ÒH‰t?1ÛH…ÀAÆ$”Ã÷ÛH…ÀtH‹HQÿH…ÒH‰u H‹PH‰ÇÿR0HƒÄ‰Ø[]A\ÀH‹SH‰D$H‰ßÿR0H‹D$ë«fH‰÷èØûÿÿH…Àte1Û묀H‹B@H…ÀtAHƒÆ$éSÿÿÿfDH‹é‚(H‹8èáîþÿ…Àtèxïþÿ1ÛAÆ$ë…€H‰ïè0òþÿëáH‰ïè–ñþÿH‰Ãéÿÿÿ»ÿÿÿÿéZÿÿÿ@‹G`…ÀޱAWAVAUATUSH‰ûHƒìL‹5 ‚(HÇI‹L‹hHL‹`PH‹hXHÇ@HHÇ@PHÇ@Xè ûÿÿH…À„¡H‹HQÿH…ÒH‰tbI‹H‹xHL‹xPL‹pXL‰hHL‰`PH‰hXH…ÿtHƒ/tLM…ÿtIƒ/tQM…ötIƒ.tHƒ+HƒÄ[]A\A]A^A_óÃfI‹FL‰÷ÿP0ëÞ@H‹PH‰ÇÿR0ë’@H‹GÿP0ë«€I‹GL‰ÿÿP0ë£@H‰ßèñþÿéaÿÿÿATUSH‰ûHƒìH‹WH;º(uXH‹Gö@tNH‹-÷€(L‹`H‹_H‹U‹BƒÀ‰BH‹ã€(;g1öH‰ßAÿÔH‰ÃH‹EƒhH…ÛtgH‰ØHƒÄ[]A\ÃL‹¢€H‹5ªÇ(M…ät}H‹-–€(H‹U‹BƒÀ‰BH‹Š€(;v1ÒH‰ßAÿÔë¥@H=©Fè”íþÿ…Àt‰1Àë @èÃíþÿH…ÀuH‹ß(H5 FH‰D$H‹:è#ìþÿH‹D$HƒÄ[]A\ÃDHƒÄH‰ß1Ò[]A\éïþÿfDH=AFH‰t$è'íþÿ…ÀH‹t$„lÿÿÿ1Àé'ÿÿÿAWAVAUATI‰üUSHƒì‹G`H‹_…À„èƒø…ÇH…öH‹k L‹k(HÇC L‹s0„ºM…ö…¡H‹EH‹N€(H9Ð…L;m3H‹EE1öJ‹èIƒÅHƒH‹{H‰CH…ÿ„OHƒ/„5H‹{H‹WH‹5ÆÂ(H‹‚H…À„¦ÿÐH…À„ëH‰k L‰k(L‰s0AÇD$`HƒÄ[]A\A]A^A_ÀHƒÄ1À[]A\A]A^A_ÀH…ö„ßH‹CH‹xH…ÿ„îH‹WH‹5«¿(H‹‚H…À„ÿÐH‰ÅH…í„ H‹EH‹R(H9ÐtUH;>~(tLH‰ïèíþÿH…ÀI‰Ç„H‹@L‹°àM…ö„.HƒmuUH‹EIÇÅÿÿÿÿfH‰ïL‰ýÿP0é˜þÿÿfE1íE1öHƒ}I‰ï…–þÿÿëÚf.„H‹GÿP0é¿þÿÿ@H‰Çé·þÿÿL‰ýIƒÍÿH‰ïAÿÖH…À…þÿÿèLëþÿH…ÀH‹J~(tH‹3H9ð…²èÏêþÿ€Hƒm„5H‹;èêþÿAÇD$`ÿÿÿÿL‰çètÈÿÿHƒÄ1À[]A\A]A^A_ÃH‹B@H…À„ HƒÆ$éDþÿÿf.„L;m}J‹DíE1öIƒÅHƒéåýÿÿDH‹±}(é|ÿÿÿ@»`$H…ítHƒmtH DH=Ä6º+‰ÞèõÔÿÿé[ÿÿÿH‹EH‰ïÿP0ëÕ@»0$ëÊf„»s$ë®f„H‹a}(H[7H5KC»1$H‹81ÀèÌëþÿë‹f.„H‹B@H…Àt8HƒÆ$éëýÿÿfD»2$é_ÿÿÿfDH‹EH‰ïÿP0é¼þÿÿè´ëþÿé;ýÿÿèªëþÿH‰Åé´ýÿÿH‹E»8$HƒèH…ÀH‰E…ÿÿÿH‹EH‰ïL‰ýÿP0éûþÿÿHƒmt'L‰ý»:$éìþÿÿH‰Çèêçþÿ…À…>þÿÿ»V$éÍþÿÿ»:$ë¹AVI‰ÖAUATUSH‹WH‹‚H…À„ÁÿÐH‰ÃH…Û„¿H‹CH;`{(… L‹kM…í„ý¿L‹cèçèþÿH…ÀH‰Å„³IƒEL‰hIƒL‰p Iƒ$Hƒ+„›I‹D$H‹˜€H…Û„†L‹-O{(I‹U‹BƒÀ‰BH‹C{(;{1ÒH‰îL‰çÿÓI‰ÆI‹EƒhM…ö„}L‰óHƒmtKIƒ,$tH‰Ø[]A\A]A^ÄI‹D$L‰çÿP0H‰Ø[]A\A]A^Ãf„H‹CH‰ßÿP0éVÿÿÿH‹EH‰ïÿP0Iƒ,$u«ë½DH;Q{(…3H‹Cö@„%L‹-†z(H‹hL‹cI‹U‹BƒÀ‰BH‹rz(;vL‰öL‰çÿÕH‰ÅI‹EƒhH…í„úHƒ+tH‰ëH‰Ø[]A\A]A^ÃDH‹CH‰ßH‰ëÿP0H‰Ø[]A\A]A^ÀH‹B@H…À„ÜHƒÆ$é)þÿÿf.„H=)@èçþÿ…À„vÿÿÿ@1íëŠ@1ÒH‰îL‰çèÃèþÿH‰Ãé©þÿÿH=ñ?èÜæþÿ…À„qþÿÿ1Ûé‹þÿÿDèçþÿH…ÀH‰Ã…rþÿÿH‹y(H5Ù?H‹8èaåþÿéZþÿÿ@L‰öH‰ßè=ìÿÿH‰Åé ÿÿÿDè»æþÿH…À…øþÿÿH‹Óx(H5”?H‹8èåþÿéÝþÿÿèrèþÿH‰ÃéNýÿÿf.„USHƒì(H…ÿH‰|$H‰t$H‰T$tHƒH‹D$H…À„H;y(„HƒH‹D$H…À„µH;öx(„¨HƒH‹ ¥x(H‹D$H9H„—H‹‡x(H5xEH‹8èxäþÿH‹T$H…ÒtHƒ*tXH‹T$H…ÒtHƒ*t0H‹T$H…ÒtHƒ*tHƒÄ([]ÃH‹|$H‹GÿP0HƒÄ([]ÃDH‹|$H‹GÿP0ëÂf.„H‹|$H‹GÿP0ëšfHÇD$H‹T$H‹Bö€«€uEHƒ|$„ÁH‹Òw(H5óDH‹8èÃãþÿéFÿÿÿfDHÇD$éçþÿÿf.„HT$Ht$H|$èÜâþÿH‹•w(H‹T$H‹H‹xHH‰PHH‹T$H‹hPH‹XXH…ÿH‰PPH‹T$H‰PXt Hƒ/„ŒH…ítHƒmtpH…Û„ïþÿÿHƒ+…åþÿÿH‹CH‰ßÿP0éÖþÿÿfDH‰D$H‰T$HƒH‹Sw(H‹|$H‹0èæþÿ…À…bÿÿÿH‹çv(H5@DH‹8èØâþÿé[þÿÿH‹EH‰ïÿP0ë„@H‹GÿP0éhÿÿÿ@AVAUATUSH‰ûHƒì0H‹HdH‹%(H‰D$(1ÀH…ÿtHÇCHHƒ/„îL‹%v(I‹$H‹PHH‹HPH‹xXHÇ@HHÇ@PHÇ@XH…ÒH‰T$H‰L$H‰|$ „L‹-°v(I‹uH9ò…›H…É„zH‹yH9ú„•H‰Öèåþÿ…À……H‹|$H…ÿ„FH‹Gö€«…^H‹|$ H…ÿt Hƒ/„âH‹T$Hƒ*u H‹|$H‹GÿP0‹C`H‹l$…À„Óƒøÿ„šH…í…ØéÅ@H‰×èháþÿ…À„/Ht$H|$HT$ è¬àþÿH‹D$I‹uH‹xH9÷…ÎH‹T$ H…Òt Hƒ*„¢H‹T$Hƒ*„kH‹|$H‹5§º(H‹WH‹‚H…À„SÿÐI‰ÅH‹T$Hƒ*„M…í„Æ1öL‰ïèŒáþÿIƒmH‰Å„.H…í„¥‹C`…À„™ƒøÿ„‘H‹S0I‹$H…ÒtH‹JH‹PH…Òt HƒH‹PI‹$H‰QH‹{ H‹p`H‹HhH‹PpH‰x`H‹{(H‰xhH‹{0H‰xpH‰s H‰K(H‰S0ÆCdH‰îH‰ßÿSH…ÀÆCd„-I‹$L‹C H‹z`L‰B`L‹C(H‹JpH‹rhL‰BhL‹C0H…ÉL‰BpH‰{ H‰s(H‰K0„ØH‹QH‹zH…ÿ„ÇHÇBH‹H‰ÃHQÿH…ÒH‰„™H…ítH‹EHPÿH…ÒH‰Uu H‹UH‰ïÿR0H‹t$(dH34%(H‰Ø…ÙHƒÄ0[]A\A]A^ÃDH‹GÿP0éýÿÿ@HƒŽ%H‹@h1öÿPH‹L$H‹1HVÿH…ÒH‰„ÔH‰D$H‹|$ élýÿÿDH‹WÿR0é[ÿÿÿ@H‰ÃéOÿÿÿH…ÿtHƒ/„H‹L$H…ÉtHƒ)u H‹|$H‹GÿP0H‹-6s(‹C`HƒE…À…$þÿÿé(þÿÿf„H‹|$H‹GÿP0éÐýÿÿ€H‹|$H‹GÿP0é„ýÿÿ€I‹EL‰ïÿP0éÃýÿÿH‹|$ H‹GÿP0éMýÿÿ€è“áþÿ…À…%ýÿÿI‹$H‹T$H‹xHH‰PHH‹T$L‹pPH‹hXH…ÿH‰PPH‹T$ H‰PXt Hƒ/„dM…öt Iƒ.„FH…ítHƒmu H‹EH‰ïÿP0‹C`…ÀtFƒøÿuA1ífDI‹}1Ûè]Þþÿéþÿÿ„H‹|$ H‹GÿP0é üÿÿ€H…í…žH‹{ H‹k(L‹k0HÇC HÇC(HÇC0H…ÿt Hƒ/„,H…ít Hƒm„ M…턃I‹E1íHƒèH…ÀI‰E…ýÿÿI‹EL‰ïÿP0éöüÿÿDH‹-‰q(HƒEHƒ/„ÚH‰l$éRûÿÿ„L‹-¡q(éÿÿÿ@H‹{ L‹k(L‹c0HÇC HÇC(HÇC0H…ÿtHƒ/taM…ít Iƒm„M…ä„ÑI‹$1ÛHPÿH…ÒI‰$…àüÿÿI‹T$L‰çÿR0éÐüÿÿH‹|$ @H‹Ùp(HƒH‰D$é²úÿÿH‹GÿP0ë–€H‹EH‰ïÿP0éåþÿÿH‹GÿP0éÈþÿÿ@I‹EL‰ïÿP0épÿÿÿH‹T$ H‹t$H‹|$è­¸ÿÿéþÿÿ„I‹$H‹xHL‹hPH‹hXHÇ@HHÇ@PHÇ@XH…ÿt Hƒ/„©M…ít Iƒm„©H…í„ÛüÿÿHƒm…ÐüÿÿH‹EH‰ïÿP0éÁüÿÿfDH‹B@H…À„ºHƒÆ$é—úÿÿf.„H‹|$ H‹GÿP0énüÿÿ€H‹|$H‰D$H‹WÿR0H‹D$éüÿÿDH‹|$H‹GÿP0éþÿÿ€H‹GÿP0éKÿÿÿ@I‹EL‰ïÿP0éHÿÿÿH;-bo(„cúÿÿH‹ o(H5†=1ÛH‹8èüÚþÿé+ûÿÿ1Ûéûÿÿ1íé’úÿÿèDÞþÿI‰ÅéÞùÿÿI‹FL‰÷ÿP0é«üÿÿH‹GÿP0éüÿÿèŒÚþÿff.„ATUSH‰ûHƒì€{dH‹H…7H…ÿt*ÆCdH‹GÿàH…ÀÆCd„?HƒÄ[]A\ÃfDƒ{`ÿ„>H‹S0H‹-cn(H…ÒH‹EtH‹JH‹PH…Òt HƒH‹PH‹EH‰QH‹{ H‹p`H‹HhH‹PpH‰x`H‹{(H‰xhH‹{0H‰xpH‰s H‰ßH‰K(H‰S0ÆCdH‹57n(ÿSH…ÀÆCd„ÕH‹UL‹C H‹z`L‰B`L‹C(H‹JpH‹rhL‰BhL‹C0H…ÉL‰BpH‰{ H‰s(H‰K0„+ÿÿÿH‹QH‹zH…ÿ„ÿÿÿHÇBH‹7HVÿH…ÒH‰…ÿþÿÿH‹WH‰D$ÿR0H‹D$ééþÿÿH‹Qm(H5ß'H‹8èJÙþÿHƒÄ1À[]A\ÀHƒÄH‰ß[]A\éxöÿÿ„H‹¡m(H‹8èÙþÿ1Àé“þÿÿH‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿtHƒ/t0M…ätIƒ,$t-H…ítHƒmt1ÀéEþÿÿH‹EH‰ïÿP01Àé4þÿÿH‹GÿP0ëÇI‹D$L‰çÿP0ëÆDATUSH‰ûHƒì€{dH‹Hu[H…ÿ„’ÆCdH‹GH;³(„H;5žl(t$H‰òH‹5J­(èeðÿÿH…ÀÆCdtDHƒÄ[]A\Ãÿàëã„H‹l(H5Ÿ&H‹8è ØþÿHƒÄ1À[]A\ÀH‰ßè@õÿÿH…Àu¯éNfD‹C`…À„xƒøÿ„%H…ö„¸H‹S0H…Ò„H‹ ¿k(H‹zH‹H‹PH…Òt HƒH‹PH‹H‰WL‹C H‹x`H‹HhH‹PpL‰@`L‹C(L‰@hL‹C0L‰@pH‰{ H‰K(H‰S0ÆCdH‰ßÿSH…ÀÆCd„àH‹Rk(L‹C H‹H‹z`L‰B`L‹C(H‹JpH‹rhL‰BhL‹C0H…ÉL‰BpH‰{ H‰s(H‰K0„ÊþÿÿH‹QH‹zH…ÿ„¹þÿÿHÇBH‹HQÿH…ÒH‰…žþÿÿH‹WH‰D$ÿR0H‹D$éˆþÿÿ@è+þÿÿéqþÿÿH‹¿j(H‹éÿÿÿH‹(k(H‹8è×þÿèØþÿH…Àt1ÀéKþÿÿH‹k(H‰D$H‹:èãÖþÿH‹D$é-þÿÿH‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿt Hƒ/„ªM…ät Iƒ,$„¦H…ít‰Hƒmu‚H‹EH‰ïÿP0ésÿÿÿH‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿtHƒ/tlM…ätIƒ,$t-H…í„gþÿÿHƒm…\þÿÿH‹EH‰t$H‰ïÿP0H‹t$éCþÿÿI‹D$H‰t$L‰çÿP0H‹t$ë¼H‹GÿP0éJÿÿÿI‹D$L‰çÿP0éJÿÿÿH‹GH‰t$ÿP0H‹t$ëH;5ži(„„ýÿÿH…ö„{ýÿÿH‹@i(H5¹7H‹8è1Õþÿé”þÿÿff.„AUATI‰õUSH5ï#¹ºH‰ûHƒì@H‹oHL‰ïdH‹%(H‰D$01ÀHD$ HÇD$ HÇD$(P1ÀLL$0LD$ è/Öþÿ…ÀZY„å€{d… H…í„H‹;i(HƒEH‹|$H‹0èyÔþÿ…À…áÆCdH‹EH;¯(„ìH‹H‹5¾¨(H…Ò„UH‰ïÿÒI‰ÄM…ätXL‰îL‰çèýÕþÿIƒ,$I‰Å„ÆCdHƒm„`M…í„×M‰ìH‹L$(dH3 %(L‰à…ÇHƒÄ8[]A\A]ÃfHƒm„eH‹^h(H‹8èVÔþÿ…À„]èéÔþÿH‹{HH…ÿtHÇCHHƒ/„FÆCdf.„H‹T$H‹t$ H‹|$èŒîÿÿƒ{`ÿ„’H‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿt Hƒ/„/M…ät Iƒ,$„H…ít Hƒm„ï1öÆCdH‰ßÿSH…ÀÆCd„6H‹g(L‹C H‹H‹z`L‰B`L‹C(H‹JpH‹rhL‰BhL‹C0H…ÉL‰BpH‰{ H‰s(H‰K0t(H‹QH‹zH…ÿtHÇBH‹HQÿH…ÒH‰„ŸI‰Äé“þÿÿ€H{dH‰îè4ãÿÿA‰ÄH‹EHPÿH…ÒH‰U„H‹{HH…ÿtHÇCHH‹HPÿH…ÒH‰„E…䉯þÿÿé¾þÿÿf.„H‹EH‰ïÿP0éÿÿÿI‹D$L‰çÿP0éáþÿÿH‹GÿP0éÅþÿÿ@H‰D$H‹WÿR0H‹D$éKÿÿÿf.„H‹qf(H‹8èQÒþÿè\ÓþÿH…ÀI‰Ä„µE1äé´ýÿÿ„H‹EH‰ïÿP0é‘ýÿÿI‹D$L‰çÿP0éqýÿÿH‹‘e(H5 E1äH‹8è‡ÑþÿénýÿÿfL‰îH‰ïèUüÿÿI‰Åé>ýÿÿDH‹EH‰ïÿP0éÝþÿÿf„H‹GÿP0éìþÿÿ@H‰ßèˆîÿÿH…ÀI‰Å…ýÿÿè§ÒþÿH…ÀI‰Ä…ýÿÿH‹œe(H‹8è|Ñþÿéóüÿÿ€H‹@@H…À„­HƒÆ$H‰ïÿÐI‰Äé•üÿÿfH‹{ L‹c(H‹k0HÇC HÇC(HÇC0H…ÿtHƒ/tbM…ätIƒ,$tIH…í„»þÿÿHƒm…°þÿÿH‹EH‰ïÿP0é¡þÿÿfH‹EH‰ïÿP0éŒüÿÿÆCdéTüÿÿH‹GÿP0é®üÿÿI‹D$L‰çÿP0ëªH‹GÿP0ë•H‰ïèžÓþÿI‰ÄééûÿÿèÐþÿH‹OH‹¨©€tH‹GÃf„©tnH‹GHHHƒùw[Hl'Hc ŠHÊÿâ‹G‹WHÁàH ÐóÃf„‹G÷ØH˜Ã„‹G‹WHÁàH ÐH÷ØÃ€‹GÃ@é+ÑþÿUSHƒì©€…‡H‹A`H…À„ÔHƒ¸„¨èšÑþÿHÐH‰ÅH…í„®H‹MH‰ëH÷¨€tIH‹¨©€„±H‹CH‹3HVÿH…ÒH‰uH‹SH‰D$H‰ßÿR0H‹D$HƒÄ[]ÃHƒH‰ûë·H‹ób(L‹AH5@/H‰ÑH‹81Àè ÒþÿHƒm„¶HÇÀÿÿÿÿë½Hƒ¸˜tè˜ÎþÿH"H‰ÅéIÿÿÿè$ÐþÿH…ÀuÏH‹˜b(H5H‹8è‰Îþÿë·€©t{H‹CHHHƒùw`Hð%Hc ŠHÊÿâ‹C÷ØH˜é"ÿÿÿ‹CHÁàH‰Â‹CH ÐH÷Øé ÿÿÿ‹Céÿÿÿ‹CHÁàH‰Â‹CH ÐéíþÿÿH‹EH‰ïÿP0é;ÿÿÿH‰ßè“ÏþÿéÑþÿÿH‰ßèæÖÿÿéÄþÿÿAWAVAUATUSHƒìHH;5#b(H‰|$H‰L$0L‰D$„ÆHƒI‰×E1Û1ÒH‰õHÇD$HÇ$E1ÒE1ÀH‰×M‰ÜH‹D$H9EŽ{ L‹lÅIƒEH…ÿt Hƒ/„âH‹D$H‹8H;=«a(„L‰îL‰T$(L‰D$ èkÍþÿH…ÀH‰ÃL‹D$ L‹T$(„ÍH‹@H;ú`(thH;ia(t_H‹HH‹a(H»H5ºL‰d$L‰D$L‰T$A¿ÝGH‹81ÀèÐþÿL‹T$L‹\$I‰ÙL‹D$º1ÉM‰ÔL‰ÛM‰ÆéhM…ät Iƒ,$„@H;ñ`(„cH‹SHƒú…L‹sL‹c IƒIƒ$L;5Å`(…ïM…Àt Iƒ(„8M…Òt Iƒ*„H‹D$Hc8è ÏþÿH…ÀH‰Á„`H‰ÆL‰çH‰D$ è°ÏþÿH…ÀI‰ÁH‹L$ „Hƒ)„ÕI‹IH‹¨©€„ßI‹QHc‰ÑH9Â…-ƒùÿ„œHcÉI‹HPÿH…ÒI‰„®H‹D$0L)øH)ÈHƒøŽÈA€~>„VH‹D$L‰l$ H‰l$8H‰\$(‹8I‰ÅHcÿèMÎþÿH…ÀH‰Å„Ž1ÒL‰æH‰ÇèôÊþÿH…ÀH‰Ã„Hƒm„½H;®_(”ÀH;ü^(”ÂÂu H;†_(…¨¶èH‹HPÿH…ÒH‰„‚…턪AÆxA‹EIƒÇxA‰}Hcÿè¿ÍþÿH…ÀH‰Å…rÿÿÿH‹l$81ÉL‹l$ I‰ÁH‹\$(A¿{Hº-Hƒmu|DH‹E‰T$H‰ïH‰L$L‰L$ÿP0‹T$H‹L$L‹L$ëOH‹EH‰ïÿP0é4ÿÿÿH‰ßè¨Ìþÿ…À‰Å‰IÿÿÿH‰ÙL‹l$ H‹\$(H‹l$8A¿Hº-E1ÉfDHƒmt‰M…Ét Iƒ)„²H…Ét Hƒ)„ƒH H=D‰þE1ÿè¶ÿÿM…öt Iƒ.„H…Ût Hƒ+„M…ít Iƒm„M…ät Iƒ,$„H‹4$H…ötH‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0HƒÄHL‰ø[]A\A]A^A_ÃH‹SH‰ßÿR0éoþÿÿH‹GL‰T$(L‰D$ ÿP0L‹T$(L‹D$ éþûÿÿI‹D$L‰T$(L‰çL‰D$ ÿP0L‹T$(L‹D$ éœüÿÿ@I‹BL‰×ÿP0éàüÿÿf„I‹@L‰T$ L‰ÇÿP0L‹T$ M…Ò…°üÿÿéµüÿÿfDA¿Hºé þÿÿ„I‹FL‰÷ÿP0éÖþÿÿH‹CH‰ßÿP0éÕþÿÿI‹EL‰ïÿP0éÕþÿÿI‹D$L‰çÿP0éÔþÿÿH‹A‰T$H‰ÏÿP0‹T$éfþÿÿf„I‹A‰T$L‰ÏH‰L$ÿP0‹T$H‹L$é-þÿÿ€I‰éL‹l$ H‰ÁH‹\$(H‹l$8A¿}Hº-éëýÿÿH‰D$ H‹AH‰ÏÿP0L‹L$ éüÿÿ€I‹AH‰L$ L‰ÏÿP0H‹L$ é9üÿÿ€H‹ù[(H5Ú"E1äE1í1ÛE1öA¿ÂGH‹8èÙÇþÿHÇ$ºé”ýÿÿ€H‹¹[(H5j*L‰d$L‰D$L‰T$A¿ÙGH‹8è•ÇþÿL‹T$L‹\$ºL‹D$1ÉE1ÉM‰ÔL‰ÛM‰ÆéýÿÿfDM‰ãE1ÉM‰ÔL‰ÛM‰ÆA¿ÛGº1Ééïüÿÿ€H‹9[(H5"L‰D$L‰T$A¿HH‹8èÇþÿL‹T$L‹D$º1ÉE1ÉM‰ÔM‰Æé£üÿÿ*H…ÒM‰ÔxEHbH _HƒúH5É(L‰T$L‰D$HEÈH‹´Z(H‹81ÀèâÉþÿL‹T$L‹D$M‰ÔM‰ÆA¿òGº1ÉE1Éé5üÿÿDH‹¡(H…Ò„øI‹~H9ú„ôùÿÿH‰ÖL‰T$8L‰D$(H‰T$ ètÉþÿ…ÀH‹T$ L‹D$(L‹T$8…ÆùÿÿI‹FH‹JH5¶#L‰T$L‰D$H‹PH‹Z(H‹81Àè?ÉþÿL‹D$L‹T$L‰áM‰ñM‰ÔM‰ÆA¿Hºé‘ûÿÿf„A¿HºE1ÉéuûÿÿDH‹¹Y(H5#ºL‰T$L‰D$H‹81ÀèÑÈþÿéêþÿÿH‹•Y(L‹AH5â%H‰ÑL‰L$(L‰T$ H‹81Àè£ÈþÿL‹T$ L‹L$(Iƒ*uI‹BL‰L$ L‰×ÿP0L‹L$ €L‰L$ è¾ÆþÿH…ÀL‹L$ …ÔHÇÁÿÿÿÿéCùÿÿ@©„I‹IHAHƒø‡>H5œHc†HðÿàA‹I÷ÙéûøÿÿA‹AHÁàH‰ÂA‹AH ÐH÷ØHcЉÁH9Ð„ØøÿÿDH‹ñX(L‰L$ H55%H‹8è¥ÄþÿL‹L$ éSÿÿÿA‹AHÁàH‰ÂA‹AH ÐHcЉÁH9Ð„Žøÿÿë¹A‹IéƒøÿÿH‹t$A‹F L‹l$ H‹\$(H‹l$8I‹v8H…ö„ÿL‹D$H‹L$0I~0L‰úèCöÿÿH…ÀI‰Ç„M‰âHƒD$L‰ïI‰ÜM‰ðévöÿÿHƒmM‰ã„±M‰ÔI‰ýL‰ÛM‰Æé×ùÿÿL‹ž(H‹53–(I‹@L‹ˆ€M…É„'L‹=ØW(I‹‹BƒÀ‰BH‹ÍW(;d1ÒL‰ÇAÿÑI‹ƒjH…À„ÆI‰Ç1Ò1öL‰ÿè†ÞÿÿI‹HPÿH…ÒI‰„A¿$Hº1ÉE1ÉéùÿÿfDL‹‰(H‹5’•(I‹@L‹ˆ€M…É„cL‹=?W(I‹‹BƒÀ‰BH‹4W(;—1ÒL‰ÇAÿÑI‹ƒjH…À„VI‰Ç1Ò1öL‰ÿèíÝÿÿI‹HPÿH…ÒI‰„˜A¿hHº#1ÉE1ÉémøÿÿL‰ÏL‰L$ èHÄþÿHcЉÁL‹L$ H9Є¸öÿÿHƒÀ…ÛýÿÿèÄþÿH…ÀL‹L$ „Èýÿÿé;ýÿÿH‹!V(H5=L‰D$L‰T$H‹8è`ÂþÿL‹T$L‹D$éLüÿÿH‹EL‰T$ L‰D$L‰d$H‰|$H‰ïÿP0L‹T$ H‹T$L‹\$L‹D$M‰ÔI‰ÕL‰ÛM‰Æéô÷ÿÿ©€…õH‹A`H…À„ØHƒ¸„æL‰ÏL‰L$ è ÄþÿL‹L$ H<I‰ÂM…Ò„¥I‹JM‰ÐH÷¨€„üÿÿH‹¨©€„{I‹@HcЉÁH9Ð…-Iƒ(…õÿÿI‹@L‰L$(L‰Ç‰L$ ÿP0L‹L$(‹L$ éoõÿÿA¿Hº1ÉéòöÿÿIc~èÄþÿH…ÀH‰D$ „BH‹4$H…ötH‹H‰D$(HƒèH…ÀH‰„åH‹D$0L)øHƒøŽÝ¿è¶ÃþÿH…ÀH‰Á„'H‹|$ ºH‰ÆH‰$èTÀþÿH…ÀI‰ÁH‹ $„èHƒ)„ÔL; U(”ÀL; YT(”ÂÂu L; ãT(…5¶ÀI‹1HVÿH…ÒI‰„ …À„bAÆbH‹D$ IƒÇH‰$é:üÿÿI‹WL‰ÿA¿$HÿR0º1ÉE1ÉéêõÿÿI‹WL‰ÿA¿hHÿR0º#1ÉE1ÉéËõÿÿA¿KJºQ1ÉE1Éé¶õÿÿIƒM‰ÈéWþÿÿHƒ¸˜„ÖL‰ÏL‰L$ èÇ¿þÿHQI‰ÂL‹L$ éþÿÿ1ÒL‰ÇèÙÂþÿH…ÀI‰Ç…ÄüÿÿA¿dHº#1ÉE1ÉéPõÿÿ1ÒL‰Çè®ÂþÿH…ÀI‰Ç…üÿÿA¿ Hº1ÉE1Éé%õÿÿH=ÆL‰L$L‰D$H‰t$è¢Àþÿ…ÀH‹t$L‹D$L‹L$„7üÿÿëŒH=’L‰L$L‰D$H‰t$ènÀþÿ…ÀH‹t$L‹D$L‹L$„jûÿÿ냿èËÁþÿH…ÀI‰Á„XH‹|$ ºH‰ÆH‰$èi¾þÿH…ÀH‰ÁL‹ $„1Iƒ)„H; S(”ÂH; nR(¶Â@”Æ@Öu H; óR(…H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…À„&AÆBéþÿÿI‹Q‰$L‰ÏÿR0‹$éáýÿÿL‰ÏL‰ $ètÀþÿ…ÀL‹ $‰¶ýÿÿH‹D$ A¿ëHº:1ÉH‰$éÕóÿÿH‹FH‰÷ÿP0é ýÿÿL‰L$ 蔿þÿH…ÀL‹L$ …¾øÿÿH‹ÿQ(H5n H‹8èð½þÿL‹L$ éžøÿÿH‰$H‹AH‰ÏÿP0L‹ $éýÿÿèJ¿þÿH…À…/þÿÿH‹bQ(H5#H‹8諽þÿéþÿÿè!¿þÿH…À…ÛýÿÿH‹9Q(H5úH‹8肽þÿéÀýÿÿA‹@HÁàH‰ÂA‹@H ÐH÷ØHcЉÁH9ЄÓûÿÿH‹‹Q(H5ÔL‰L$(L‰D$ H‹8è:½þÿL‹D$ L‹L$(Iƒ(…Þ÷ÿÿƒÉÿé¡ûÿÿ©„I‹HHAHƒø‡¢H5®Hc†Hðÿà1ÉA¿»Hº5E1Éé„òÿÿH‹D$ A¿éHº:H‰$ékòÿÿH‹D$ A¿çHº:E1ÉH‰$éOòÿÿH‹D$ A¿ùHº;1ÉH‰$é4òÿÿH‰ÏH‰ $è ¾þÿ…ÀH‹ $‰ÏýÿÿH‹D$ A¿ýHº;E1ÉH‰$éòÿÿ¿è¿þÿH…ÀH‰Á„ÐH‹|$ ºH‰ÆH‰$謻þÿH…ÀI‰ÁH‹ $„‘Hƒ)ttL; gP(”ÂL; µO(¶Â”ÁÑu L; 1ÉH‰$éŠíÿÿ¿蘺þÿH…ÀI‰Á„] H‹|$ ºH‰ÆH‰$è6·þÿH…ÀH‰ÁL‹ $„ Iƒ)uH‰$I‹AL‰ÏÿP0H‹ $H; ßK(”ÂH; -K(¶Â@”Æ@Öu H; ²K(u,H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…Àt9AÆIéÉöÿÿH‰ÏH‰ $èP¹þÿ…ÀH‹ $yÀH‹D$ A¿EIº?E1ÉH‰$é´ìÿÿ¿è¹þÿH…ÀH‰Á„R H‹|$ ºH‰ÆH‰$è`¶þÿH…ÀI‰ÁH‹ $„ Hƒ)uH‰$H‹AH‰ÏÿP0L‹ $L; K(”ÂL; WJ(¶Â”ÁÑu L; ÞJ(u,I‹1HVÿH…ÒI‰uI‹Q‰$L‰ÏÿR0‹$…Àt8AÆléõõÿÿL‰ÏL‰ $è|¸þÿ…ÀL‹ $yÀH‹D$ A¿WIº@1ÉH‰$éáëÿÿ¿èï¸þÿH…ÀI‰Á„K H‹|$ ºH‰ÆH‰$èµþÿH…ÀH‰ÁL‹ $„ Iƒ)uH‰$I‹AL‰ÏÿP0H‹ $H; 6J(”ÂH; „I(¶Â@”Æ@Öu H; J(u,H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…Àt9AÆLé õÿÿH‰ÏH‰ $è§·þÿ…ÀH‹ $yÀH‹D$ A¿iIºAE1ÉH‰$é ëÿÿ¿ è¸þÿH…ÀH‰Á„@ H‹|$ ºH‰ÆH‰$è·´þÿH…ÀI‰ÁH‹ $„ Hƒ)uH‰$H‹AH‰ÏÿP0L‹ $L; `I(”ÂL; ®H(¶Â”ÁÑu L; 5I(u,I‹1HVÿH…ÒI‰uI‹Q‰$L‰ÏÿR0‹$…Àt8AÆqéLôÿÿL‰ÏL‰ $èÓ¶þÿ…ÀL‹ $yÀH‹D$ A¿{IºB1ÉH‰$é8êÿÿ¿ èF·þÿH…ÀI‰Á„9 H‹|$ ºH‰ÆH‰$èä³þÿH…ÀH‰ÁL‹ $„úIƒ)uH‰$I‹AL‰ÏÿP0H‹ $H; H(”ÂH; ÛG(¶Â@”Æ@Öu H; `H(u,H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…Àt9AÆQéwóÿÿH‰ÏH‰ $èþµþÿ…ÀH‹ $yÀH‹D$ A¿IºCE1ÉH‰$ébéÿÿ¿ èp¶þÿH…ÀH‰Á„.H‹|$ ºH‰ÆH‰$è³þÿH…ÀI‰ÁH‹ $„ïHƒ)uH‰$H‹AH‰ÏÿP0L‹ $L; ·G(”ÂL; G(¶Â”ÁÑu L; ŒG(u,I‹1HVÿH…ÒI‰uI‹Q‰$L‰ÏÿR0‹$…Àt8AÆfé£òÿÿL‰ÏL‰ $è*µþÿ…ÀL‹ $yÀH‹D$ A¿ŸIºD1ÉH‰$éèÿÿ¿ èµþÿH…ÀI‰Á„'H‹|$ ºH‰ÆH‰$è;²þÿH…ÀH‰ÁL‹ $„èIƒ)uH‰$I‹AL‰ÏÿP0H‹ $H; äF(”ÂH; 2F(¶Â@”Æ@Öu H; ·F(u,H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…Àt9AÆdéÎñÿÿH‰ÏH‰ $èU´þÿ…ÀH‹ $yÀH‹D$ A¿±IºEE1ÉH‰$é¹çÿÿ¿ èÇ´þÿH…ÀH‰Á„H‹|$ ºH‰ÆH‰$èe±þÿH…ÀI‰ÁH‹ $„ÝHƒ)uH‰$H‹AH‰ÏÿP0L‹ $L; F(”ÂL; \E(¶Â”ÁÑu L; ãE(u,I‹1HVÿH…ÒI‰uI‹Q‰$L‰ÏÿR0‹$…Àt8AÆgéúðÿÿL‰ÏL‰ $è³þÿ…ÀL‹ $yÀH‹D$ A¿ÃIºF1ÉH‰$éææÿÿ¿èô³þÿH…ÀI‰Á„H‹|$ ºH‰ÆH‰$è’°þÿH…ÀH‰ÁL‹ $„ÖIƒ)uH‰$I‹AL‰ÏÿP0H‹ $H; ;E(”ÂH; ‰D(¶Â@”Æ@Öu H; E(u5H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…ÀtBAÆZAÆGfIƒÇéðÿÿH‰ÏH‰ $裲þÿ…ÀH‹ $y·H‹D$ A¿ÕIºGE1ÉH‰$éæÿÿ¿è³þÿH…ÀH‰Á„H‹|$ ºH‰ÆH‰$賯þÿH…ÀI‰ÁH‹ $„ÂHƒ)uH‰$H‹AH‰ÏÿP0L‹ $L; \D(”ÂL; ªC(¶Â”ÁÑu L; 1D(u5I‹1HVÿH…ÒI‰uI‹Q‰$L‰ÏÿR0‹$…ÀtAAÆZAÆGdIƒÇé?ïÿÿL‰ÏL‰ $èÆ±þÿ…ÀL‹ $y·H‹D$ A¿éIºH1ÉH‰$é+åÿÿ¿è9²þÿH…ÀI‰Á„ñH‹|$ ºH‰ÆH‰$è×®þÿH…ÀH‰ÁL‹ $„²Iƒ)uH‰$I‹AL‰ÏÿP0H‹ $H; €C(”ÂH; ÎB(¶Â@”Æ@Öu H; SC(u5H‹1HVÿH…ÒH‰uH‹Q‰$H‰ÏÿR0‹$…ÀtBAÆZAÆGgIƒÇéaîÿÿH‰ÏH‰ $èè°þÿ…ÀH‹ $y·H‹D$ A¿ýIºIE1ÉH‰$éLäÿÿ¿èZ±þÿH…ÀH‰Á„ÝH‹|$ ºH‰ÆH‰$èø­þÿH…ÀI‰ÁH‹ $„žHƒ)uH‰$H‹AH‰ÏÿP0L‹ $L; ¡B(”ÂL; ïA(¶Â”ÁÑu L; vB(u,I‹1HVÿH…ÒI‰uI‹Q‰$L‰ÏÿR0‹$…Àt8AÆOéíÿÿL‰ÏL‰ $è°þÿ…ÀL‹ $yÀH‹D$ A¿JºJ1ÉH‰$éyãÿÿH‹t$ H‹=‚(è±þÿH…ÀI‰Á„Ï¿H‰$è¯þÿH…ÀH‰ÁL‹ $„˜H‹=LJ(L‰H1ÒH‰ÆH‰$èm–ÿÿH…ÀI‰ÁH‹ $tZHƒ)uH‰$H‹AH‰ÏÿP0L‹ $1Ò1öL‰ÏL‰ $èIÈÿÿL‹ $Iƒ)u I‹AL‰ÏÿP0H‹D$ A¿,JºL1ÉE1ÉH‰$é¿âÿÿH‹D$ A¿'JºLH‰$é¦âÿÿH‹D$ A¿"JºLH‰$éâÿÿH‹D$ A¿ JºL1ÉH‰$érâÿÿH‹D$ A¿JºJH‰$éYâÿÿH‹D$ A¿ JºJE1ÉH‰$é=âÿÿH‹D$ A¿ûIºIH‰$é$âÿÿH‹D$ A¿ùIºI1ÉH‰$é âÿÿH‹D$ A¿çIºHH‰$éðáÿÿH‹D$ A¿åIºHE1ÉH‰$éÔáÿÿH‹D$ A¿ÓIºGH‰$é»áÿÿH‹D$ A¿ÑIºG1ÉH‰$é áÿÿH‹D$ A¿ÁIºFH‰$é‡áÿÿH‹D$ A¿¿IºFE1ÉH‰$ékáÿÿH‹D$ A¿¯IºEH‰$éRáÿÿH‹D$ A¿­IºE1ÉH‰$é7áÿÿH‹D$ A¿IºDH‰$éáÿÿH‹D$ A¿›IºDE1ÉH‰$éáÿÿH‹D$ A¿‹IºCH‰$ééàÿÿH‹D$ A¿‰IºC1ÉH‰$éÎàÿÿH‹D$ A¿yIºBH‰$éµàÿÿH‹D$ A¿wIºBE1ÉH‰$é™àÿÿH‹D$ A¿gIºAH‰$é€àÿÿH‹D$ A¿eIºA1ÉH‰$éeàÿÿH‹D$ A¿UIº@H‰$éLàÿÿH‹D$ A¿SIº@E1ÉH‰$é0àÿÿH‹D$ A¿CIº?H‰$éàÿÿH‹D$ A¿AIº?1ÉH‰$éüßÿÿH‹D$ A¿1Iº>H‰$éãßÿÿH‹D$ A¿/Iº>E1ÉH‰$éÇßÿÿDf.„AWAV¹AUATUSH‰óHìøH¬$°dH‹%(H‰„$è1ÀH‰ïH…ÒóH«…=(H‹NHƒù…ÿH‹N(H‹FH‹V H‹~0H‰Œ$ÀH‹N8H‰„$°H‰”$¸H‰¼$ÈH‰T$@H‰Œ$ÐH‹N@H‰D$ H‰Œ$ØH‹NHH‰Œ$àH‹"=(H9G„@è[«þÿòD$òL$f. ¯z„O2H‹¼$ÐH‹è<(H9G„Þè!«þÿòD$òT$f.uz„52H‹¼$ØH‹®<(H9G„¼èçªþÿòD$(ò\$(f.;z„2H‹œ$àH‹KH‹¨©€„Í4H‹CHcЉD$8H9Ð…)5ƒ|$8ÿ„Ž41ÿè—¦þÿH…ÀH‰„$„V51ÿè¦þÿH…ÀI‰Å„s7H‹D$ H‹@H;<(„eH;=(„XH‹|$ èÖªþÿH…ÀH‰Å„Ø1H‹@IÇÆÿÿÿÿL‹¸àM…ÿ…9ÇD$X’ÇD$`¾E1ÒHÇD$(HÇD$01ÉHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$E1ÀHÇ„$€HÇD$xE1ÿHÇD$pHÇD$hE1äHÇ„$HÇ„$˜E1öHÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$pHÇ„$XHÇ„$xHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$Péç€H‹D$ E1ÿE1öHƒH‰ÅE1ÉL‰|$Hƒ|$L‰Ë…®H‹€:(H9E…¾%L9uŽä6H‹EN‹$ðIƒÆIƒ$H…Ût Hƒ+„<òD$è9¦þÿH…ÀI‰Ç„MH‰ÆL‰çèÒ¨þÿH…ÀH‰Ã„*Iƒ/„I‹EI;E ,HƒI‹UH‰ÂHƒÀI‰EHƒ+„Hƒ|$L‰ã„RÿÿÿH‰ïH‹D$ÿÐH…ÀI‰Ä…hÿÿÿH‰\$èa¦þÿH…ÀL‹L$t"H‹X9(H‹2H9ð…¢AL‰L$èÚ¥þÿL‹L$Hƒm„O81ÿL‰L$è¾¢þÿH…ÀH‰„$L‹L$„ý>H‹D$@H‹@H;H8(„€5H;C9(„s5H‹|$@L‰L$è§þÿH…ÀH‰ÅL‹L$„“OH‹@IÇÄÿÿÿÿL‹°àM…ö„PMf.„E1ÿL‰t$Hƒ|$L‰l$0L‰L$HL‰úL‹´$…¯H‹È8(H9E…¤7L9eŽƒ@H‹EJ‹àIƒÄHƒH…Òt Hƒ*„å4òD$肤þÿH…ÀI‰Ç„5H‰ÆH‰ßè§þÿH…ÀI‰Å„i7Iƒ/„Å4I‹FI;F ¿9IƒEI‹VL‰,ÂHƒÀI‰FIƒm„·4Hƒ|$H‰Ú„QÿÿÿH‰T$PH‰ïH‹D$ÿÐH…ÀH‰ÃH‹T$P…\ÿÿÿL‹L$HL‹l$0I‰×H‰D$L‰L$0茤þÿH…ÀL‹L$0t'H‹ƒ7(L‹\$H‹2H9ð…F[L‰L$è¤þÿL‹L$Hƒm„ BH‹|$ L‰L$豤þÿHƒøÿH‰ÃL‹L$„ÇIH…À¿HIøè¾ þÿH…ÀH‰„$€L‹L$„ÍG1ÀH…ÛH‹du(H‹´$€~fHƒH‹NH‰ÁHƒÀH9ÃuëH‹4z(H‹=u}(L‰L$H‰Þè@£þÿH…ÀH‰ÁL‹L$„×OHƒH‹AH‹5 |(H‹H…Ò„†OL‰L$0H‰ÏH‰L$ÿÒH‹L$L‹L$0H‰ÅH…í„QHƒ)„7BH‹EL‹5vt(L‹ €M…䄇UH‹Ï5(H‹‹BƒÀ‰BH‹Ä5(;BSL‰L$1ÒL‰öH‰ïAÿÔH‰ÆH‰„$hH‹L‹L$ƒhH…ö„I\Hƒm„¦AH‹Jt(¿L‰L$HƒH‰„$ègŸþÿH…ÀI‰ÀL‹L$„!`IƒEH‹´$H‹@L‰(HƒI‹@H‰pH‹´$€HƒI‹@H‰pIƒ8„áCL‰l$L‹¬$1ÛHÇ„$€HÇ„$`E1ö1ÿL‰L$XL‰D$0H‰ÝL‰|$`H‹D$0H‹´$€H‹@H‹0HƒH…ÿH‰„$xt Hƒ/„ AIƒEH…ít Hƒm„«EH‹5Ns(L‰ïè–£ÿÿH…ÀH‰D$P„[]Iƒm„tEL‹%.s(¿Iƒ$èWžþÿH…ÀI‰Ç„=[H‹t$HƒI‹GH‰0H‹´$HƒI‹GH‰pH‹´$€HƒI‹GH‰pIƒ?u I‹GL‰ÿÿP0HÇD$xL‰÷L‰|$pL‰l$HH‹D$pH‹t$xH‹@H‹0HƒH…ÿH‰„$pt Hƒ/„¬DIƒ$H…Ût Hƒ+„¤DH‹5er(L‰çè­¢ÿÿH…ÀH‰D$h„Z`Iƒ,$„Ó?H‹t$H1ÒL‰çèÕžþÿH…ÀH‰Ã„+UH;š3(A”ÆH;ç2(”ÀDðu H;p3(….BE¶öHƒ+u H‹CH‰ßÿP0E…ö„?HƒD$xH‹¼$pL‰ãH‹D$xHƒø…?L‹|$pL‹l$HIƒ/„WH‹t$hH‹H‰D$HHƒèH…ÀH‰„òVHƒ„$€H‹¼$xL‰íH‹„$€Hƒø…'…L‹D$0L‰¬$L‹L$XL‹l$L‰¤$XL‹|$`Iƒ(„…VH‹t$PH‹H‰D$HƒèH…ÀH‰„OVH‹5¬r(H‹¼$hL‰L$èú‡ÿÿH…ÀI‰ÀL‹L$„H‹Ê1(I9@H‰„$˜…ÏUI‹hH…í„ÂUM‹`HƒEIƒ$Iƒ(uI‹@L‰ÇÿP0L‹L$¿L‰L$è!ŸþÿH…ÀI‰ÃL‹L$„‚H‹„$hI‰k1ÒL‰ÞL‰çL‰L$0L‰\$HƒI‰C èu†ÿÿH…ÀH‰„$PL‹\$L‹L$0„}XIƒ+uI‹CL‰L$L‰ßÿP0L‹L$Iƒ,$uI‹D$L‰L$L‰çÿP0L‹L$H‹5%u(H‹¼$hL‰L$èë†ÿÿH…ÀH‰D$0L‹L$„mVH‹5t(H‹¼$PèĆÿÿH…ÀH‰ÅL‹L$L‹D$0„(SH‹„$˜H9E…æRH‹]H…Û„ÙRL‹eHƒIƒ$HƒmuH‹EH‰ïÿP0L‹L$L‹D$0H‰ÞL‰çL‰D$0L‰L$袤ÿÿH…ÀI‰ÃL‹L$L‹D$0„yOHƒ+u(H‹CL‰\$HH‰ßL‰D$0L‰L$ÿP0L‹\$HL‹D$0L‹L$Iƒ,$u)I‹D$L‰\$HL‰çL‰D$0L‰L$ÿP0L‹\$HL‹D$0L‹L$H‹„$˜I9@…¢NI‹hH…í„•NM‹`HƒEIƒ$Iƒ(„ZN¿L‰\$0L‰L$è#þÿH…ÀH‰ÃL‹L$L‹\$0„„L1ÒH‰kL‰[ H‰ÞL‰çL‰L$胄ÿÿH…ÀH‰„$HL‹L$„±JH‹M‰àHƒèH…ÀH‰„}JIƒ(„ZJH‹5Ns(H‹¼$hL‰L$è…ÿÿH…ÀH‰D$0L‹L$„ŒHH‹52r(H‹¼$Pèí„ÿÿH…ÀI‰ÃL‹L$L‹D$0„dEH‹„$˜I9C…EI‹kH…í„ EM‹cHƒEIƒ$Iƒ+„ÚDH‰îL‰çL‰D$0L‰L$èÛ¢ÿÿH…ÀH‰ÃL‹L$L‹D$0„.CHƒm„CIƒ,$„ÑBH‹=Xm(H‰ÞL‰D$0L‰L$è¡þÿH…ÀI‰ÃL‹L$L‹D$0„$AHƒ+„÷@H‹5gq(H‹¼$PL‰\$HL‰D$0L‰L$è„ÿÿH…ÀH‰ÅL‹L$L‹D$0L‹\$H„»=H‹„$˜H9E…o=H‹EH…ÀH‰D$0„]=L‹eHƒIƒ$Hƒm„=H‹t$0L‰çL‰\$PL‰D$HL‰L$èà¡ÿÿH…ÀH‰ÃL‹L$L‹D$HL‹\$P„O;H‹t$0H‹H‰D$HƒèH…ÀH‰„;Iƒ,$„Ì:L‰ßH‰ÞL‰D$HL‰L$0L‰\$èãœþÿH…ÀH‰ÅL‹\$L‹L$0L‹D$H„ú8Iƒ+„Í8Hƒ+„)7H‹„$˜I9@…½6I‹XH…Û„°6M‹`HƒIƒ$Iƒ(„€6¿L‰L$èOšþÿH…ÀI‰ÃL‹L$„À4I‰[I‰k 1ÒL‰ÞL‰çL‰L$0L‰\$è¯ÿÿH…ÀH‰„$@L‹\$L‹L$0„XiI‹M‰àHƒèH…ÀI‰„iIƒ(„ühH‹œ$@H‹5Åp(L‰L$H‰ßè8‚ÿÿH…ÀH‰D$0L‹L$„7gH‹5žo(H‰ßè‚ÿÿH…ÀH‰ÅL‹L$L‹D$0„'dH‹„$˜H9E…åcH‹]H…Û„ØcL‹eHƒIƒ$HƒmuH‹EH‰ïÿP0L‹L$L‹D$0H‰ÞL‰çL‰D$0L‰L$èôŸÿÿH…ÀI‰ÃL‹L$L‹D$0„œ`Hƒ+u(H‹CL‰\$HH‰ßL‰D$0L‰L$ÿP0L‹\$HL‹D$0L‹L$Iƒ,$u)I‹D$L‰\$HL‰çL‰D$0L‰L$ÿP0L‹\$HL‹D$0L‹L$H‹„$˜I9@…Ê_I‹hH…턽_M‹`HƒEIƒ$Iƒ(uI‹@L‰\$0L‰ÇL‰L$ÿP0L‹L$L‹\$0¿L‰\$0L‰L$è[˜þÿH…ÀH‰ÃL‹L$L‹\$0„Í]H‰k1ÒL‰[ H‰ÞL‰çL‰L$è»ÿÿH…ÀH‰ÅL‹L$„ \H‹M‰àHƒèH…ÀH‰uH‹CL‰d$0H‰ßÿP0L‹D$0L‹L$Iƒ(uI‹@L‰L$L‰ÇÿP0L‹L$HƒmuH‹EL‰L$H‰ïÿP0L‹L$òD$L‰L$è—þÿH…ÀH‰„$ØL‹L$„ZòD$L‰L$èô–þÿH…ÀH‰„$°L‹L$„vXH‹5j(H‹¼$HèÊÿÿH…ÀH‰ÅL‹L$„òV1öH‰Ç虞þÿH…ÀI‰ÀL‹L$„TUHƒmuH‰D$H‹EH‰ïÿP0L‹D$L‹L$H‹¼$ØL‰ÆL‰L$L‰D$èt”þÿH…ÀH‰„$8L‹D$L‹L$„SIƒ(uI‹@L‰L$L‰ÇÿP0L‹L$H‹5hi(H‹¼$HL‰L$èÿÿH…ÀH‰ÅL‹L$„×Q¾H‰ÇèâþÿH…ÀI‰ÀL‹L$„»pHƒmuH‰D$H‹EH‰ïÿP0L‹D$L‹L$H‹¼$°L‰ÆL‰L$L‰D$轓þÿH…ÀH‰„$0L‹D$L‹L$„oIƒ(uI‹@L‰L$L‰ÇÿP0L‹L$H‹\$ 1öL‰L$H‰ßèNþÿH…ÀH‰ÅL‹L$„zm¿è™’þÿH…ÀI‰ÀL‹L$„ôkH‹@L‰ÆH‰ßL‰L$L‰D$H‰(è,“þÿH…ÀH‰„$(L‹D$L‹L$„cjIƒ(uI‹@L‰L$L‰ÇÿP0L‹L$H‹\$@1öL‰L$H‰ß轜þÿH…ÀH‰ÅL‹L$„Êh¿è’þÿH…ÀI‰ÀL‹L$„PgH‹@L‰ÆH‰ßL‰L$L‰D$H‰(è›’þÿH…ÀH‰„$ L‹D$L‹L$„ËeIƒ(uI‹@L‰L$L‰ÇÿP0L‹L$1ÿL‰L$èš‘þÿH…ÀH‰„$¨L‹L$„/t试þÿH…ÀH‰D$L‹L$„Þr¿袔þÿH…ÀH‰ÅL‹L$„ŠqH‹D$ H‹=•m(1ÒH‰îHƒH‰EH‹D$@HƒH‰E èö{ÿÿH…ÀI‰ÀL‹L$„pHƒmuH‰D$H‹EH‰ïÿP0L‹D$L‹L$I‹@H;¢'(„vH;&(„ôuL‰ÇL‰L$L‰D$èU•þÿH…ÀH‰D$PL‹D$L‹L$„štH‹@H‹€àH…ÀH‰D$H„ó+IƒÌÿIƒ(uI‹@L‰L$L‰ÇÿP0L‹L$HÇ„$èHÇ„$1ÛHÇ„$øHÇ„$ðL‰l$L‰L$L‰d$@L‰|$0Hƒ|$H…+H‹L$PH‹5Ð&(H9q…I)H‹t$@H9qŽC–H‹AL‹,ðH‰ðHƒÀH‰D$@IƒEI‹EH;‹%(„Ô•H;†&(„Ç•L‰ïèP”þÿH…ÀH‰Å„—”Iƒmu I‹EL‰ïÿP0H‹EH‰ïL‹¨àAÿÕH…ÀI‰Æ„C“H‰ïAÿÕH…ÀI‰Ç„¥‘H‰ïAÿÕH…À…„‘è@xÿÿ…ÀˆZHƒmu H‹EH‰ïÿP0H‹´$ðH…ötH‹H‰D$XHƒèH…ÀH‰u H‹FH‰÷ÿP0H…ÛtHƒ+u H‹CH‰ßÿP0H‹5ðd(H‹¼$@è£zÿÿH…ÀI‰Å„ÀŽ1öH‰Çèw™þÿH…ÀI‰Ä„Iƒmu I‹EL‰ïÿP0L‰æL‰÷èuþÿH…ÀI‰Å„0ŒIƒ,$u I‹D$L‰çÿP0H‹5€d(H‹¼$@è3zÿÿH…ÀI‰Ä„ÕŠ¾H‰Çè™þÿH…ÀH‰Ã„•‰Iƒ,$u I‹D$L‰çÿP0H‰ÞL‰ÿèþÿH…ÀH‰Å„GˆHƒ+u H‹CH‰ßÿP0H‹´$øH…ötH‹H‰D$XHƒèH…ÀH‰u H‹FH‰÷ÿP0H‹´$H…ötH‹H‰D$XHƒèH…ÀH‰u H‹FH‰÷ÿP0H‹„$ØH‹5h#(H9p„n†H‹¼$Øè™‘þÿòD$Xò|$Xf.=íøz„U†H‹„$°H‹5&#(H9p„Ê„H‹¼$°èW‘þÿòD$`ò|$`f.=«øz„¹„H‹„$8H‹5ä"(H9p„&ƒH‹¼$8è‘þÿòD$hò|$hf.=iøz„ƒH‹„$0H‹5¢"(H9p„‚H‹¼$0èÓþÿòD$pò|$pf.='øz„qH‹h"(I9F„íL‰÷èžþÿòD$xò|$xf.=ò÷z„ÚH‹3"(I9G„Z~L‰ÿèiþÿò„$€ò¼$€f.=·÷z„D~H‹ø!(I9E„Á|L‰ïè.þÿò„$ˆò¼$ˆf.=|÷z„«|H‹½!(H9E„ {H‰ïèóþÿf(øf.=O÷z„{ò´$ˆ1ÿò¬$€òd$xò\$pòT$hòL$`òD$XèI’þÿH…ÀH‰Ã„dPH‹´$èH…ötH‹H‰D$XHƒèH…ÀH‰u H‹FH‰÷ÿP0H;¢!(„ñH‹¼$¨H‰ÞèôuÿÿƒÀ„nmH‹|$H‰Þè.Œþÿ…Àˆlu=1ÿè=‹þÿH…ÀI‰Ä„ŒgH‹|$H‰ÂH‰ÞèÑþÿ…Àˆ¸hIƒ,$u I‹D$L‰çÿP0H‹|$H‰ÞèúŒþÿH…ÀI‰Ä„f¿è$ŽþÿH…ÀH‰Â„­xIƒL‰pH‰ÆIƒL‰çL‰x H‰D$Xè‘–þÿƒÀH‹T$X„;wIƒ,$uI‹D$L‰çÿP0H‹T$XHƒ*u H‹BH‰×ÿP0H‰œ$èH‰¬$L‰ûL‰¬$øL‰´$ðé+úÿÿH‹CH‰ßÿP0鵿ÿÿf„I‹GL‰ÿÿP0éÕæÿÿògòd$é»âÿÿH‹CH‰ßÿP0éáæÿÿH‹5ù_(L‰ïIƒîèÝŒþÿH…ÀH‰„$°…ä H‹K„H‹¹(HƒìHéÚQH5þïL ÛH ËÚA¸H‹81À踎þÿXZ¾H ŠæH= ðº·èiwÿÿ1ÀH‹”$èdH3%(…~+HÄø[]A\A]A^A_ÃfDòoòl$éâÿÿ„òwòt$(é?âÿÿHÇD$HHÇD$@I‰ÀHÇD$8HÇD$ E1ÛHÇD$HÇD$1ÛHÇ„$€HÇD$xE1ÿHÇD$pHÇD$hE1öHÇ„$HÇ„$˜E1ÒHÇ„$ HÇ„$ˆ1ÉHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$XµÇD$`¾HÇD$(HÇD$0HÇ„$pHÇ„$xM…ít Iƒm„( H…ít Hƒm„h M…Àt Iƒ(„ù H…Ût Hƒ+„* M…Ût Iƒ+„[ H…Ét Hƒ)„| H‹t$0H…ötH‹H‰„$ˆHƒèH…ÀH‰„w M…Òt Iƒ*„ˆ H‹t$(H…ötH‹H‰D$0HƒèH…ÀH‰„v ‹T$`‹t$XH GãH=Èì1íè)tÿÿH‹´$H…ötH‹H‰D$(HƒèH…ÀH‰„D H‹T$PH…ÒtH‹H‰D$(HƒèH…ÀH‰„2 M…öt Iƒ.„3 H‹´$H…ötH‹H‰D$(HƒèH…ÀH‰„ H‹”$€H…ÒtH‹H‰D$(HƒèH…ÀH‰„ H‹´$hH…ötH‹H‰D$(HƒèH…ÀH‰„ô H‹”$H…ÒtH‹H‰D$(HƒèH…ÀH‰„ß H‹´$xH…ötH‹H‰D$(HƒèH…ÀH‰„Ê H‹”$XH…ÒtH‹H‰D$(HƒèH…ÀH‰„µ H‹´$pH…ötH‹H‰D$(HƒèH…ÀH‰„  H‹Œ$`H…ÉtH‹H‰D$(HƒèH…ÀH‰„‹ H‹”$PH…ÒtH‹H‰D$(HƒèH…ÀH‰„v H‹´$HH…ötH‹H‰D$(HƒèH…ÀH‰„a H‹Œ$@H…ÉtH‹H‰D$(HƒèH…ÀH‰„L H‹”$ØH…ÒtH‹H‰D$(HƒèH…ÀH‰„7 H‹´$°H…ötH‹H‰D$(HƒèH…ÀH‰„" H‹Œ$8H…ÉtH‹H‰D$(HƒèH…ÀH‰„ H‹”$0H…ÒtH‹H‰D$(HƒèH…ÀH‰„øH‹´$(H…ötH‹H‰D$(HƒèH…ÀH‰„ãH‹Œ$ H…ÉtH‹H‰D$(HƒèH…ÀH‰„ÎH‹”$¨H…ÒtH‹H‰D$(HƒèH…ÀH‰„¹H‹|$H…ÿtH‹H‰D$(HƒèH…ÀH‰„§H‹´$ðH…ötH‹H‰D$HƒèH…ÀH‰„’H‹œ$àH…ÛtH‹H‰D$HƒèH…ÀH‰„}H‹Œ$øH…ÉtH‹H‰D$HƒèH…ÀH‰„hH‹”$H…ÒtH‹H‰D$HƒèH…ÀH‰„SH‹¼$èH…ÿtH‹H‰D$HƒèH…ÀH‰„>H‹´$¸H…ötH‹H‰D$HƒèH…ÀH‰„)H‹œ$ÐH…ÛtH‹H‰D$HƒèH…ÀH‰„H‹Œ$ÈH…ÉtH‹H‰D$HƒèH…ÀH‰„ÿH‹”$ÀH…ÒtH‹H‰D$HƒèH…ÀH‰„êH‹¼$ˆH…ÿtH‹H‰D$HƒèH…ÀH‰„ÕH‹´$ H…ötH‹H‰D$HƒèH…ÀH‰„ÀH‹œ$˜H…ÛtH‹H‰D$HƒèH…ÀH‰„«H‹Œ$H…ÉtH‹H‰D$HƒèH…ÀH‰„–H‹T$hH…ÒtH‹H‰D$HƒèH…ÀH‰„„H‹|$pH…ÿtH‹H‰D$HƒèH…ÀH‰„rH‹t$xH…ötH‹H‰D$HƒèH…ÀH‰„`H‹œ$€H…ÛtH‹H‰D$HƒèH…ÀH‰„KH‹L$H…ÉtH‹H‰D$HƒèH…ÀH‰„9H‹T$H…ÒtH‹H‰D$HƒèH…ÀH‰„'H‹|$ H…ÿtH‹H‰D$HƒèH…ÀH‰„%H‹t$8H…ötH‹H‰D$HƒèH…ÀH‰„H‹\$@H…ÛtH‹H‰D$HƒèH…ÀH‰„H‹L$HH…ÉtH‹H‰D$HƒèH…ÀH‰„ïM…ät Iƒ,$„ïM…ÿ„ÖI‹HPÿH‰èH…ÒI‰…IöÿÿI‹WH‰l$L‰ÿÿR0H‹D$é0öÿÿ€L‹fIƒü‡”EH‡ÙI‰ÕJc HÐÿà€H‹FHH‰„$àH‹C@H‰„$ØH‹C8H‰„$ÐH‹C0H‰„$ÈH‹C(H‰„$ÀH‹C H‰„$¸H‹CH‰„$°L‰ïèlþÿIƒüI‰Æ‡ïH$ÙJc HÐÿà€H‹5‰T(L‰ïèÙþÿH…ÀH‰„$¸„IƒîH‹5T(L‰ïèµþÿH…ÀH‰„$À„ÓIƒîH‹5™T(L‰ïè‘þÿH…ÀH‰„$È„iIƒîH‹5 T(L‰ïèmþÿH…ÀH‰„$ЄþIƒîH‹5‰S(L‰ïèIþÿH…ÀH‰„$Ø„° IƒîH‹5ýV(L‰ïè%þÿH…ÀH‰„$à„ÏIƒîM…ö”H‹„$¸H‹¼$ÈH‰D$@H‹„$°H‰D$ éÖÿÿL;u&N‹dõIƒÆIƒ$é@ÚÿÿI‹EH‰Œ$ L‰ïL‰œ$˜L‰”$L‰„$ˆÿP0H‹Œ$ L‹œ$˜L‹”$L‹„$ˆé‰öÿÿH‹EH‰Œ$ H‰ïL‰œ$˜L‰”$L‰„$ˆÿP0H‹Œ$ L‹œ$˜L‹”$L‹„$ˆéIöÿÿH‹GÿP0éÏüÿÿ@H‹FH‰÷ÿP0éÞüÿÿH‹CH‰ßÿP0éðüÿÿH‹AH‰ÏÿP0éýÿÿI‹D$L‰çÿP0éýÿÿI‹@H‰Œ$˜L‰ÇL‰œ$L‰”$ˆÿP0H‹Œ$˜L‹œ$L‹”$ˆéÈõÿÿH‹CH‰Œ$˜H‰ßL‰œ$L‰”$ˆÿP0H‹Œ$˜L‹œ$L‹”$ˆé—õÿÿI‹CH‰Œ$L‰ßL‰”$ˆÿP0H‹Œ$L‹”$ˆévõÿÿH‹AL‰”$ˆH‰ÏÿP0L‹”$ˆéeõÿÿH‹FL‰”$ˆH‰÷ÿP0L‹”$ˆéjõÿÿI‹BL‰×ÿP0éiõÿÿH‹FH‰÷ÿP0é{õÿÿH‹FH‰÷ÿP0é­õÿÿH‹BH‰×ÿP0é¿õÿÿI‹FL‰÷ÿP0é¾õÿÿH‹FH‰÷ÿP0éÓõÿÿH‹BH‰×ÿP0éèõÿÿH‹FH‰÷ÿP0éýõÿÿH‹BH‰×ÿP0éöÿÿH‹FH‰÷ÿP0é'öÿÿH‹BH‰×ÿP0é<öÿÿH‹FH‰÷ÿP0éQöÿÿH‹AH‰ÏÿP0éföÿÿH‹BH‰×ÿP0é{öÿÿH‹FH‰÷ÿP0éöÿÿH‹AH‰ÏÿP0é¥öÿÿH‹BH‰×ÿP0éºöÿÿH‹FH‰÷ÿP0éÏöÿÿH‹AH‰ÏÿP0éäöÿÿH‹BH‰×ÿP0éùöÿÿH‹FH‰÷ÿP0é÷ÿÿH‹AH‰ÏÿP0é#÷ÿÿH‹BH‰×ÿP0é8÷ÿÿH‹GÿP0éM÷ÿÿ@H‹FH‰÷ÿP0é_÷ÿÿH‹CH‰ßÿP0ét÷ÿÿH‹AH‰ÏÿP0é‰÷ÿÿH‹BH‰×ÿP0éž÷ÿÿH‹GÿP0é¶÷ÿÿ@H‹FH‰÷ÿP0éÈ÷ÿÿH‹CH‰ßÿP0éÝ÷ÿÿH‹AH‰ÏÿP0éò÷ÿÿH‹BH‰×ÿP0éøÿÿH‹GÿP0éøÿÿ@H‹FH‰÷ÿP0é1øÿÿH‹CH‰ßÿP0éFøÿÿH‹AH‰ÏÿP0é[øÿÿH‹BH‰×ÿP0émøÿÿH‹GÿP0邸ÿÿ@H‹FH‰÷ÿP0鑸ÿÿH‹CH‰ßÿP0馸ÿÿH‹AH‰ÏÿP0鏸ÿÿH‹BH‰×ÿP0éÊøÿÿM‰øHÇD$HHÇD$@HÇD$8HÇD$ E1ÛHÇD$HÇD$E1ÿHÇ„$€HÇD$xE1öHÇD$pHÇD$hE1ÒHÇ„$HÇ„$˜1ÉHÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$X·ÇD$`¾HÇD$(HÇD$0HÇ„$pHÇ„$xéðÿÿDH‰ÞL‰ïè5zþÿ…À„ãÓÿÿÇD$XºÇD$`¾E1ÒHÇD$(HÇD$01ÉHÇD$HHÇD$@E1ÛHÇD$8HÇD$ E1ÀHÇD$HÇD$E1ÿHÇ„$€HÇD$xE1öHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$pHÇ„$XHÇ„$xHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$Péêíÿÿfè[xþÿH…À„£Íÿÿ¾ÿéGëÿÿ„è;xþÿH…À„½Íÿÿ¾é'ëÿÿ„èxþÿH…À„×Íÿÿ¾éëÿÿH‹ (HƒìH5ÎÚjL ìÅH ™ÅHšÅA¸H‹81Àèyþÿ_¾æAXéÁêÿÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$E1ÀHÇ„$€HÇD$xE1ÿHÇD$pHÇD$hE1äHÇ„$HÇ„$˜E1öHÇ„$ HÇ„$ˆE1ÒHÇ„$ÀHÇ„$È1ÉHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$XÇD$`¾HÇD$(HÇD$0HÇ„$pHÇ„$xé*ëÿÿH‹(L‹AH5hÔH‰ÑH‹81Àè3wþÿHƒmu H‹EH‰ïÿP0fèkuþÿH…À…z ÇD$8ÿÿÿÿéWËÿÿD©„Å H‹CHƒÀHƒø‡Ã HôËHc‚HÂÿâÇD$8éËÿÿ‹C÷؉D$8éÿÊÿÿ‹CHÁàH‰Â‹CH ÐH÷ØHcЉD$8H9ЄÜÊÿÿDH‹‘(H5ÚÓH‹8èJsþÿéUÿÿÿ‹C‰D$8é°Êÿÿ‹CHÁàH‰Â‹CH ÐHcЉD$8H9ЄÊÿÿë·€HÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$E1ÿHÇ„$€HÇD$xE1äHÇD$pHÇD$hE1öHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$XpÇD$`¹HÇD$(E1ÒHÇD$01ÉHÇ„$pHÇ„$xé*èÿÿH‰èéåÿÿ„HÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$E1ÿHÇ„$€HÇD$xE1äHÇD$pHÇD$hE1öHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$XŠÇD$`¾éËýÿÿH‹D$@E1öE1äHƒH‰Åé»ÊÿÿH‹BH‰×ÿP0é Ëÿÿf„I‹GL‰ÿÿP0é,ËÿÿI‰ÙéóÉÿÿ„I‹EL‰ïÿP0é:ËÿÿL‹l$0L‹L$HI‰ÛM‰ßHÇD$HHÇD$@HÇD$8HÇD$ H‰ÃHÇD$HÇD$M‰îHÇ„$€HÇD$xE1ÀHÇD$pHÇD$hE1ÛHÇ„$HÇ„$˜M‰ÌHÇ„$ HÇ„$ˆE1ÒHÇ„$ÀHÇ„$È1ÉHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØL‹¬$HÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$XóÇD$`¿HÇD$(HÇD$0HÇ„$pHÇ„$xécãÿÿH‹EL‰L$H‰ïÿP0L‹L$é˜ÇÿÿL;eßJ‹\åIƒÄHƒéZÈÿÿL‹L$HL‹l$0I‰ÛHÇD$HL‰ûHÇD$@M‰ßHÇD$8HÇD$ HÇD$HÇD$M‰îHÇ„$€HÇD$xI‰ÀHÇD$pHÇD$hE1ÛHÇ„$HÇ„$˜M‰ÌHÇ„$ HÇ„$ˆE1ÒHÇ„$ÀHÇ„$È1ÉHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØL‹¬$HÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$XHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$PÇD$XõÇD$`¿HÇD$(HÇD$0HÇ„$pHÇ„$xéøàÿÿH‰ßèxkþÿHcЉD$8H9ЄOÁÿÿHƒÀ…nöÿÿèIkþÿH…À„`öÿÿéËõÿÿL‰îL‰÷èÝjþÿ…À„CÆÿÿL‹L$HM‰èL‹l$0I‰ßÇD$XøÇD$`¿HÇD$(HÇD$0E1ÒM‰îHÇD$HL‹¬$HÇD$@HÇD$8M‰ÌHÇD$ HÇD$1ÉHÇD$HÇ„$€E1ÛHÇD$xHÇD$p1ÛHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇ„$PHÇ„$`HÇ„$pHÇ„$XHÇ„$xHÇ„$HÇ„$hHÇ„$€HÇ„$HÇD$Pé{ÞÿÿL§¶H5å (L‰áH‰êL‰ïè7gÿÿ…À‰Hçÿÿ¾ïéÄÛÿÿH‹>û'HƒìH f¶jH5‚ËL ¢¶HW¶A¸H‹81ÀèH‹AH‹ðH‰„$HƒH‰ðHƒÀH‰D$XHƒ+u H‹CH‰ßÿP0H‹¼$¸1öè‡úýÿH…ÀI‰Ç„X<H‹´$ H‹¼$èñýÿH…ÀI‰Ä„”;H‰ÆL‰ÿèuðýÿH…ÀI‰Å„™<Iƒ/u I‹GL‰ÿÿP0Iƒ,$u I‹D$L‰çÿP0H‹(…'I9E„9;L‰ïè^óýÿòD$`ò|$`f.=²Zz„å<Iƒmu I‹EL‰ïÿP0H‹¼$¸¾èÉùýÿH…ÀI‰Å„N:H‹´$˜H‹¼$è^ðýÿH…ÀI‰Ä„±9H‰ÆL‰ïè·ïýÿH…ÀI‰Ç„ÿ8Iƒmu I‹EL‰ïÿP0Iƒ,$u I‹D$L‰çÿP0H‹i„'I9G„8L‰ÿèŸòýÿò„$¨ò¼$¨f.=íYz„ð7Iƒ/u I‹GL‰ÿÿP0òD$`è"ñýÿH…ÀI‰Ç„<7H‹5OÄ'H‹¼$@èÚþÿH…ÀI‰Ä„y61öH‰ÇèÖøýÿH…ÀI‰Å„À5Iƒ,$u I‹D$L‰çÿP0L‰îL‰ÿèÓîýÿH…ÀH‰D$„û4Iƒ/u I‹GL‰ÿÿP0Iƒmu I‹EL‰ïÿP0ò„$¨è†ðýÿH…ÀI‰Å„&4H‹5³Ã'H‹¼$@èfÙþÿH…ÀH‰ÃH‰D$„m3¾H‰Çè2øýÿH…ÀI‰Ç„¯2H‹H‰D$HƒèH…ÀH‰u H‹|$H‹GÿP0L‰þL‰ïè!îýÿH…ÀH‰D$„ß1Iƒmu I‹EL‰ïÿP0Iƒ/u I‹GL‰ÿÿP0H‹´$ØH‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0Hƒmu H‹EH‰ïÿP01ÿèôìýÿH…ÀH‰D$„Ñ0Iƒ.u I‹FL‰÷ÿP0H‹|$ èœðýÿHƒøÿ„=0H‰ÇèÊîýÿH…ÀI‰Ç„™/¿èäïýÿH…ÀI‰Ä„É.H‹=ÙÈ'L‰x1ÒH‰ÆèS×þÿH…ÀI‰Ç„.Iƒ,$u I‹D$L‰çÿP0I‹GH; ‚'„ä-H;ƒ'„×-L‰ÿèÏðýÿH…ÀI‰Ä„ -H‹@H‹¨àH…í„;,IƒÎÿIƒ/„K+L‹¼$H‹œ$èH‰¬$ Hƒ¼$ …Ô*H‹›‚'I9D$…¤*M9t$ޤ I‹D$N‹,ðIƒÆIƒEIƒ/u I‹GL‰ÿÿP0H‹¼$(L‰îè›íýÿH…ÀI‰Ç„è H‹0'I9G„è L‰ÿèfïýÿò„$°ò¼$°f.=´Vz„P Iƒ/u I‹GL‰ÿÿP0H‹¼$ L‰îè4íýÿH…ÀI‰Ç„ï H‹É€'I9G„Ê L‰ÿèÿîýÿò„$Øò¼$Øf.=MVz„k Iƒ/u I‹GL‰ÿÿP0H‹5–¿'L‰ïèÞïþÿH…ÀH‰Å„ÖH‹¼$(H‰Æè²ìýÿH…ÀI‰Ç„ìHƒmu H‹EH‰ïÿP0H‹6€'I9G„àL‰ÿèlîýÿò„$èò¼$èf.=ºUz„ÊIƒ/u I‹GL‰ÿÿP0H‹5¿'L‰ïèKïþÿH…ÀI‰Ç„èH‹¼$ H‰ÆèìýÿH…ÀH‰Å„Iƒ/u I‹GL‰ÿÿP0H‹¤'H9E„üH‰ïèÚíýÿò„$ò¼$f.=(Uz„åHƒmu H‹EH‰ïÿP0H‹D$H‹5S'H9p„&H‹|$è‡íýÿò„$ò¼$f.=ÕTz„ H‹D$H‹5'H9p„2H‹|$èEíýÿf(øf.=¡Tz„#ò´$¿ò¬$¨òd$`òœ$ò”$èòŒ$Øò„$°èŒïýÿH…ÀI‰Çt?H…ÛtHƒ+u H‹CH‰ßÿP0L;=ÿ~'tH‹|$L‰þèXÓþÿƒÀ„ÍL‰ûM‰ïé»üÿÿH‹D$L‹L$@M‰èL‹l$0M‰ãH‰œ$èL‹|$HH‹\$8H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$HÇD$HÇD$HÇD$L‰„$H‰„$ØÇD$XÒ ÇD$`HÇD$(E1ÒHÇD$01Éé aÿÿH‹D$M‰èL‹L$@L‹l$0L‰ýH‹\$8L‹|$HM‰ãH‰¬$èH‰„$¨H‹D$M‰ÌL‰„$M‰îÇD$Xá ÇD$`HÇD$(E1ÒH‰„$°H‹D$1ÉHÇD$0H‰„$ØHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇD$éD`ÿÿH‹D$òxéÍýÿÿò¼$¨èpêýÿH…Àò¼$¨„½ýÿÿH‹D$M‰èL‹L$@L‹l$0H‰œ$èM‰ãH‹\$8L‹|$HH‰„$¨H‹D$M‰ÌL‰„$M‰îÇD$XÑ H‰„$°H‹D$H‰„$ØÇD$`HÇD$(E1ÒHÇD$01Éé ÿÿÿòxò¼$éÚüÿÿèÃéýÿH…À„åüÿÿH‹D$M‰èL‹L$@L‹l$0M‰ãH‰œ$èL‹|$HH‹\$8H‰„$¨H‹D$M‰ÌL‰„$M‰îÇD$XÐ H‰„$°H‹D$H‰„$ØéWÿÿÿò}ò¼$éüÿÿè>éýÿH…À„ üÿÿH‹D$M‰èL‹L$@L‹l$0M‰ãH‰œ$èL‹|$HH‹\$8E1ÒH‰„$¨H‹D$M‰ÌL‰„$M‰îÇD$XÎ I‰íÇD$`HÇD$(H‰„$°H‹D$1ÉHÇD$0E1À1íHÇD$HHÇD$@H‰„$ØHÇD$8HÇD$ HÇD$HÇD$HÇD$éó]ÿÿH‰D$ H‹D$M‰èL‹L$@L‹l$0M‰ãH‰œ$èL‰ýH‹\$8H‰„$¨H‹D$E1ÒL‹|$HL‰„$M‰ÌHÇD$HHÇD$@E1ÀH‰„$°H‹D$M‰îHÇD$8HÇD$1ÉHÇD$HÇD$H‰„$ØÇD$XË ÇD$`HÇD$(HÇD$0é?]ÿÿH‹D$L‹L$@M‰èL‹l$0M‰ãH‰œ$èL‹|$HH‹\$8H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$HÇD$HÇD$HÇD$L‰„$H‰„$ØÇD$XÉ éŽûÿÿòAò¼$èéùÿÿèëæýÿH…À„(ùÿÿH‹D$M‰èL‹L$@L‹l$0L‰ýH‰œ$èL‹|$HH‹\$8M‰ãH‰„$¨H‹D$M‰ÌL‰„$M‰îÇD$XÇ ÇD$`HÇD$(E1ÒH‰„$°H‹D$1ÉHÇD$0E1ÀH‰„$ØHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇD$é²[ÿÿH‰îH‰ÅH‹D$M‰èL‹L$@L‹l$0M‰ãH‰œ$èL‹|$HH‰„$¨H‹D$E1ÒH‹\$8L‰„$M‰îM‰ÌHÇD$HHÇD$@H‰„$°H‹D$E1ÀHÇD$8HÇD$I‰õHÇD$HÇD$1ÉH‰„$ØHÇD$ ÇD$XÄ ÇD$`HÇD$(HÇD$0éÔZÿÿH‰D$ H‹D$M‰èL‹L$@L‹l$0M‰ãH‰œ$èL‹|$HH‰„$¨H‹D$H‹\$8M‰ÌHÇD$HHÇD$@HÇD$8M‰îH‰„$°H‹D$HÇD$HÇD$HÇD$L‰„$H‰„$ØÇD$X é7ùÿÿòAò¼$Øé3öÿÿH‹D$L‹L$@M‰èL‹l$0M‰ãH‰œ$èL‹|$HH‹\$8H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$HÇD$HÇD$HÇD$L‰„$H‰„$ØÇD$X¾ 逸ÿÿòAò¼$°éõÿÿèÝãýÿH…À„‡õÿÿH‹D$M‰èL‹L$@L‹l$0L‰ýM‰ãH‰œ$èL‹|$HE1ÒH‰„$¨H‹D$M‰ÌH‹\$8L‰„$M‰îÇD$XÀ I‰íÇD$`H‰„$°H‹D$1ÉHÇD$(HÇD$0E1À1íHÇD$HHÇD$@H‰„$ØHÇD$8HÇD$ HÇD$HÇD$HÇD$éXÿÿH‹D$L‹L$@M‰èL‹l$0M‰ãH‰œ$èL‹|$HH‹\$8H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$HÇD$HÇD$HÇD$L‰„$H‰„$ØÇD$Xº éîöÿÿè_âýÿH…À„¢óÿÿH‹D$M‰èL‹L$@L‹l$0L‰ýM‰ãH‰œ$èL‹|$HE1ÒH‰„$¨H‹D$M‰ÌH‹\$8L‰„$M‰îÇD$X¼ I‰íÇD$`H‰„$°H‹D$1ÉHÇD$(HÇD$0E1À1íHÇD$HHÇD$@H‰„$ØHÇD$8HÇD$ HÇD$HÇD$HÇD$éWÿÿL‰¼$H‰œ$èIƒ,$u I‹D$L‰çÿP0H‹|$èîýýÿH…ÀI‰Ä„H;t'„H‹PHƒú…PL‹pH‹h IƒHƒEHƒ(u H‹@L‰çÿP0Hƒ|$ht#H‹t$hH‹H‰D$`HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹t$pH…ötH‹H‰D$`HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹=“µ'è&äþÿH…ÀI‰Ç„ÒH‹5«¸'H‰ÇèëÈþÿH…ÀI‰Å„Iƒ/u I‹GL‰ÿÿP0H‹„$˜I9E„øL‰öL‰ïèçþÿH…ÀH‰D$h„L‰ëHƒ+u H‹CH‰ßÿP0H‹=µ'è¥ãþÿH…ÀI‰Å„óH‹5*¸'H‰ÇèjÈþÿH…ÀI‰Ç„Iƒmu I‹EL‰ïÿP0H‹„$˜I9G„*H‰îL‰ÿè€æþÿH…ÀH‰D$p„MM‰üIƒ,$u I‹D$L‰çÿP0Iƒ.u I‹FL‰÷ÿP0Hƒmu H‹EH‰ïÿP0H‹t$pH‹|$hèíÜýÿH…ÀI‰Ç„6H‹5ò°'H‰Çè–åýÿH…ÀI‰Ä„a Iƒ/u I‹GL‰ÿÿP0I‹D$H;šq'„õ H;•r'„è L‰çè_àýÿH…ÀH‰Ã„h Iƒ,$u I‹D$L‰çÿP0H‹CH‰ßL‹¨àAÿÕH…ÀH‰Å„o H‰ßAÿÕH…ÀI‰Æ„ H‰ßAÿÕH…À…ú èNÄþÿ…Àˆ6 Hƒ+u H‹CH‰ßÿP0H‹t$xH…ötH‹H‰D$`HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹´$€H…ötH‹H‰D$`HƒèH…ÀH‰u H‹FH‰÷ÿP0òD$(è¨ÝýÿH…ÀI‰Ä„¿è"ÞýÿH…ÀI‰Ç„MHƒEH‰hH‰ÆIƒH‹|$PL‰p L‰`(èDÅþÿƒÀ„¹Iƒ/u I‹GL‰ÿÿP0H‹=Ô³'è_áþÿH…ÀI‰Ä„ôH‹5̲'H‰Çè$ÆþÿH…ÀI‰Ç„Iƒ,$u I‹D$L‰çÿP0H‹t$pH‹|$hè§ßýÿH…ÀI‰Ä„™H‹„$˜I9G„âL‰æL‰ÿèäþÿH…ÀH‰Ã„þIƒ,$u I‹D$L‰çÿP0Iƒ/u I‹GL‰ÿÿP0H‹¼$H‰ÞèpÄþÿƒÀtAHƒ+u H‹CH‰ßÿP0H‹D$L‰´$€H‰l$xL‹t$H‹l$H‹œ$H‰„$Øé:éÿÿH‰èL‹l$0L‹L$@H‰D$xH‹D$H‰ÝL‹|$HH‹\$8L‰´$€M‰ÌM‰îH‰„$¨H‹D$ÇD$Xá!ÇD$`H‰„$°H‹D$H‰„$ØHÇD$(E1ÒHÇD$01ÉE1ÛE1ÀéöÿÿH‰l$(H‰D$ L‰ýH‹D$(L‹l$0M‰ãL‹L$@H‹\$8E1ÀL‹|$HL‰´$€E1ÒH‰D$xH‹D$M‰îM‰ÌI‰íHÇD$HHÇD$@HÇD$81íH‰„$¨H‹D$1ÉHÇD$HÇD$ÇD$XÒ!ÇD$`H‰„$°H‹D$HÇD$(HÇD$HÇD$0H‰„$Øé/QÿÿI‹_H…Û„þÿÿI‹OHƒHƒIƒ/uI‹GH‰L$`L‰ÿÿP0H‹L$`¿H‰L$`èEÛýÿH…ÀI‰ÅH‹L$`„›I‰]1ÒH‰ÏM‰e L‰îH‰L$`èªÂþÿH…ÀH‰ÃH‹L$`„­I‹EI‰ÏHƒèH…ÀI‰E…±ýÿÿI‹EL‰ïÿP0é¢ýÿÿI‰ÃH‰èL‹l$0H‰D$xH‹D$L‰ýL‹L$@H‹\$8E1ÀL‹|$HL‰´$€E1ÒH‰„$¨H‹D$M‰îM‰ÌI‰íHÇD$HHÇD$@HÇD$81íH‰„$°H‹D$1ÉHÇD$ HÇD$HÇD$HÇD$H‰„$ØÇD$XÅ!ÇD$`HÇD$(HÇD$0éÀOÿÿH‹D$L‹L$@M‰ãL‹l$0H‹\$8L‹|$HL‰´$€H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$H‰l$xHÇD$HÇD$HÇD$H‰„$ØÇD$XÂ!ÇD$`HÇD$(E1ÒHÇD$01Éé3OÿÿH‰èL‹L$@M‰èH‰D$xH‹D$E1ÛL‹l$0H‰\$ 1íH‹\$8L‹|$HM‰ÌH‰„$¨H‹D$E1ÒL‰´$€HÇD$HM‰îHÇD$@I‰ÍHÇD$8H‰„$°H‹D$1ÉHÇD$HÇD$HÇD$ÇD$XÜ!H‰„$ØÇD$`HÇD$(HÇD$0éANÿÿH‰l$(I‰ÀH‹D$(L‹l$0L‹L$@M‰ãH‰\$0L‹|$H1íH‰D$xH‹D$E1ÒH‹\$8L‰´$€M‰ÌM‰îHÇD$HI‰ÍH‰„$¨H‹D$1ÉHÇD$@HÇD$8HÇD$ HÇD$H‰„$°H‹D$HÇD$HÇD$ÇD$XÖ!ÇD$`H‰„$ØHÇD$(éwMÿÿI‰ÃH‹D$L‹L$@L‹l$0H‹\$8L‹|$HL‰´$€H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$H‰l$xHÇD$HÇD$HÇD$H‰„$ØÇD$XÀ!é²ýÿÿH‰èL‹l$0L‹L$@H‰D$xH‹D$L‰ýL‰´$€H‹\$8L‹|$HM‰ÌM‰îH‰„$¨H‹D$ÇD$X¶!ÇD$`H‰„$°H‹D$H‰„$ØéSúÿÿH‹D$L‹L$@M‰ãL‹l$0H‹\$8L‹|$HL‰´$€H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$H‰l$xHÇD$HÇD$HÇD$H‰„$ØÇD$X«!ÇD$`HÇD$(E1ÒHÇD$01ÉéäKÿÿI‰ÃH‹D$L‹L$@L‹l$0H‹\$8L‹|$HL‰´$€H‰„$¨H‹D$M‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$°H‹D$H‰l$xHÇD$HÇD$HÇD$H‰„$ØÇD$X©!é?ÿÿÿH‹D$L‹l$0H‰îL‹L$@H‰\$0L‰õH‹\$8L‹|$HE1ÒH‰„$¨H‹D$M‰îM‰ÌI‰õÇD$X’!ÇD$`HÇD$(1ÉH‰„$°H‹D$E1ÛE1ÀHÇD$HHÇD$@HÇD$8HÇD$ H‰„$ØHÇD$HÇD$HÇD$éaJÿÿ¾H‰ÇèmÙýÿéùõÿÿL‹l$0L‹L$@H‰\$0L‹|$HH‹\$8H‰l$(½H‹t$0H‹H‰D$ HƒèH…ÀH‰uH‹FL‰L$ H‰÷ÿP0L‹L$ L‰L$ èí¹þÿ…ÀL‹L$ …HX"H U HƒýH5¿4H‰êM‰îHEÈH‹®f'1íH‹81ÀèÚÕýÿH‹D$L‹L$ E1ÒL‹l$(ÇD$Xš!1ÉÇD$`HÇD$(E1ÛH‰„$¨H‹D$M‰ÌHÇD$0E1ÀHÇD$HHÇD$@HÇD$8H‰„$°H‹D$HÇD$ HÇD$HÇD$HÇD$H‰„$Øé IÿÿL‹l$0L‹L$@1íH‰\$0H‰D$(H‹\$8L‹|$Hé¼þÿÿH‹D$M‰îM‰ÌL‹l$(ÇD$Xš!E1ÒÇD$`HÇD$(1ÉH‰„$¨H‹D$E1ÛHÇD$0E1À1íHÇD$HHÇD$@H‰„$°H‹D$HÇD$8HÇD$ HÇD$HÇD$H‰„$ØHÇD$éCHÿÿL‹l$0H‰D$0M‰ãH‹D$L‹L$@E1ÒH‹\$8L‹|$H1ÉM‰îÇD$XŠ!ÇD$`H‰„$¨H‹D$M‰ÌHÇD$(H‰„$°H‹D$H‰„$Øé~çÿÿI‹T$Hƒú…µH;‰d'…—I‹l$M‹t$ HƒEIƒIƒ,$…_óÿÿI‹D$L‰çÿP0éOóÿÿI‰ÃH‹D$L‹l$0L‹L$@L‰ýH‹\$8L‹|$HE1ÀHÇD$HH‰„$¨H‹D$M‰îM‰ÌI‰íHÇD$@HÇD$8HÇD$ 1íH‰„$°H‹D$E1ÒHÇD$HÇD$1ÉHÇD$ÇD$Xh!H‰„$ØÇD$`HÇD$(HÇD$0éÓFÿÿH‹D$L‹l$0E1ÛL‹L$@H‹\$8E1ÒL‹|$HHÇD$@1ÉH‰„$¨H‹D$M‰îM‰ÌHÇD$HHÇD$8HÇD$ HÇD$H‰„$°H‹D$HÇD$HÇD$ÇD$Xf!ÇD$`H‰„$ØHÇD$(HÇD$0éSFÿÿI‹D$H‹(L‹pébþÿÿL‹l$0L‹L$@M‰ãH‹\$8L‹|$HÊH…ÒˆhH]H ZHƒúH5Ä0L‰¤$ˆL‰L$ HEÈH‹¬b'H‹81ÀèÚÑýÿH‹D$L‹L$ M‰îÇD$Xu!ÇD$`H‰„$¨H‹D$M‰ÌH‰„$°H‹D$H‰„$ØHÇD$(E1ÒHÇD$01ÉHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇD$L‹œ$ˆé!ÇD$`HÇD$(HÇD$0éÞAÿÿH‹D$L‹L$@L‹l$0H‹\$8L‹|$HL‹\$hH‰„$¨H‹D$M‰ÌL‰t$hHÇD$HM‰îHÇD$@HÇD$8H‰„$°H‹D$HÇD$ H‰l$pHÇD$HÇD$H‰„$ØHÇD$ÇD$XHxÿè0³ýÿH…ÀH‰ÃL‹L$„¿èE´ýÿH…ÀH‰ÅL‹L$„EH‹=5'H‰X1ÒH‰Æè¯›þÿH…ÀH‰ÃL‹L$„ºHƒmuH‹EH‰ïÿP0L‹L$H‹CH;eG'„rH;PF'„eH‰ßL‰L$èµýÿH…ÀH‰ÅL‹L$„ÆH‹@H‹€àH…ÀH‰„$ „‚HÇD$0ÿÿÿÿHƒ+uH‹CL‰L$H‰ßÿP0L‹L$H‰l$H‹l$(E1öHÇD$HHÇD$@HÇD$8HÇ„$HÇ„$ˆL‰l$ L‰L$XL‰|$`Hƒ¼$ …™H‹\$H‹5‹F'H9s…UH‹t$0H9sŽ•H‹CH‹ðH‰„$HƒH‰ðHƒÀH‰D$0Hƒmu H‹EH‰ïÿP0H‹´$H‹|$Pèw±ýÿH…ÀI‰Ä„ÏH‹@H;E'„WH; F'„JL‰çèÕ³ýÿH…ÀI‰Å„ÃIƒ,$u I‹D$L‰çÿP0I‹EL‰ïL‹¸àAÿ×H…ÀH‰D$„iL‰ïAÿ×H…ÀH‰D$„2L‰ïAÿ×H…ÀH‰Å„lL‰ïAÿ×H…À…Kè®—þÿ…ÀˆÅIƒmu I‹EL‰ïÿP0H‹´$ˆH…ötH‹H‰D$(HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹´$H…ötH‹H‰D$(HƒèH…ÀH‰u H‹FH‰÷ÿP0M…ötIƒ.u I‹FL‰÷ÿP0H‹5ƒ'H‹¼$èF³þÿH…ÀI‰Ä„ëH‹|$PH‰Æè°ýÿH…ÀH‰Ã„¢ Iƒ,$u I‹D$L‰çÿP0H‹CH;¬D'„ H;—C'„ H‰ßèi²ýÿH…ÀI‰Å„š Hƒ+u H‹CH‰ßÿP0I‹EL‰ïL‹¸àAÿ×H…ÀI‰Ä„A L‰ïAÿ×H…ÀI‰Æ„ L‰ïAÿ×H…ÀH‰„$ˆ„ L‰ïAÿ×H…À…ê èC–þÿ…Àˆ| I‹EL‰¤$HƒèH…ÀI‰Eu I‹EL‰ïÿP0H‹t$8H…ötH‹H‰D$(HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹t$@H…ötH‹H‰D$(HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹t$HH…ötH‹H‰D$(HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹´$H‹¼$è«®ýÿH…ÀH‰Ã„¼H‹@B'H9C„›H‰ßèv°ýÿòD$(ò|$(f.=Êz„ Hƒ+u H‹CH‰ßÿP0H‹5'H‹¼$èV±þÿH…ÀH‰Ã„ëH‹¼$H‰Æè*®ýÿH…ÀI‰Ç„Hƒ+u H‹CH‰ßÿP0H‹¯A'I9G„ëL‰ÿèå¯ýÿòD$8ò|$8f.=9z„SIƒ/u I‹GL‰ÿÿP0H‹=z‡'è²þÿH…ÀH‰Ã„$ò òYD$(èN®ýÿH…ÀI‰Ç„øH‹´$ H‹|$è@¬ýÿH…ÀI‰Ä„}H‹´$˜H‹|$è"¬ýÿH…ÀI‰Å„ò®òYD$8èó­ýÿH…ÀH‰D$(„.H‹„$˜H9C„¤¿ èY®ýÿH…ÀI‰Á„1ÀH‹t$IÁ1ÒH‰ßHƒH‰pH‹t$HƒH‰p H‹t$(HƒEL‰x0H‰h(L‰`8L‰h@HƒEH‰pPH‹´$H‰hHL‰L$(HƒH‰pXH‹´$ˆIƒL‰p`HƒH‰phL‰Îè\•þÿH…ÀI‰ÇL‹L$(„Iƒ)u I‹AL‰ÏÿP0Hƒ+u H‹CH‰ßÿP0H‹¼$L‰þèÛ”þÿƒÀtYIƒ/u I‹GL‰ÿÿP0H‹„$ˆL‰t$@I‰îH‹¬$H‰D$HH‹„$H‰D$8H‹D$H‰„$H‹D$H‰„$ˆéÿùÿÿH‹„$ˆL‹l$ M‰øL‹L$XH‰l$ E1ÒH‹l$L‹|$`1ÉH‰D$HH‹„$E1ÛL‰t$@M‰ÌM‰îÇD$X6#M‰ÅÇD$`H‰D$8HÇD$(1ÛHÇD$0E1ÀHÇD$éT"ÿÿI‰ÀH‹„$ˆL‹l$ L‰L$(L‹L$XI‰ÛH‰l$ L‹|$`1ÛH‰D$HH‹„$E1ÒH‹l$L‰t$@M‰ÌHÇD$M‰îÇD$X2#H‰D$8ÇD$`1ÉHÇD$0éí!ÿÿH‹„$ˆL‹T$(M‰øL‰l$0L‰L$(I‰ÛL‹l$ L‹L$XL‰ãH‰D$HH‹„$1ÉH‰l$ L‹|$`H‹l$L‰t$@M‰ÌH‰D$8M‰îÇD$X #ÇD$`HÇD$éw!ÿÿL‹SM…Ò„OýÿÿH‹SIƒHƒHƒ+uH‹CH‰T$@H‰ßL‰T$8ÿP0L‹T$8H‹T$@¿ H‰T$@L‰T$8èn«ýÿH…ÀI‰ÁL‹T$8H‹T$@„RM‰QH‰Ó¸éüüÿÿH‹„$ˆL‹L$XM‰øL‰l$0L‹l$ I‰ÛL‹T$(L‰ãH‰l$ H‰D$HH‹„$M‰ÌH‹l$L‹|$`1ÉL‰t$@ÇD$Xþ"M‰îH‰D$8ÇD$`HÇD$(HÇD$é… ÿÿI‰ÃH‹„$ˆL‹l$ L‹L$XL‹|$`1ÛH‰l$ L‰t$@E1ÀH‰D$HH‹„$M‰îH‹l$M‰ÌHÇD$ÇD$Xö"H‰D$8ÇD$`HÇD$(E1ÒHÇD$01Éé ÿÿòAò|$8éûÿÿI‰ÀH‹„$ˆL‹l$ L‹L$XL‹|$`I‰ÛH‰l$ L‰t$@1ÛH‰D$HH‹„$M‰îH‹l$M‰ÌHÇD$ÇD$Xè"H‰D$8ÇD$`HÇD$(E1ÒHÇD$01Éé~ÿÿèá©ýÿH…À„ŸúÿÿH‹„$ˆL‹l$ M‰øL‹L$XH‰l$ E1ÒH‹l$L‹|$`1ÉH‰D$HH‹„$E1ÛL‰t$@M‰ÌM‰îÇD$Xë"M‰ÅÇD$`H‰D$8HÇD$(1ÛHÇD$0E1ÀHÇD$éßÿÿI‰ÛH‰ÃH‹„$ˆL‹l$ L‹L$XM‰øH‰l$ L‰t$@H‰D$HH‹„$H‹l$L‹|$`M‰ÌHÇD$M‰îÇD$Xú"H‰D$8édþÿÿI‰ÀH‹„$ˆL‹l$ L‹L$XI‰ÛH‰l$ L‰t$@H‹l$1ÛH‰D$HH‹„$M‰îL‹|$`M‰ÌHÇD$ÇD$Xø"H‰D$8éþÿÿH‰D$0H‹„$ˆM‰øL‹L$XL‹l$ I‰ÛH‰l$ L‰ãH‹l$H‰D$HH‹„$E1ÒL‹|$`L‰t$@M‰ÌM‰îÇD$Xü"ÇD$`H‰D$8HÇD$(1ÉHÇD$é¾ÿÿL‰ÑL‹T$(H‰D$(H‹„$ˆL‹L$XM‰øL‰l$0L‹l$ L‰ãH‰l$ L‹|$`I‰ÓH‰D$HH‹„$M‰ÌH‹l$L‰t$@M‰îÇD$X #ÇD$`H‰D$8HÇD$éGÿÿI‰ÃH‹„$ˆL‹l$ L‹L$XH‰l$ 1ÛH‹l$L‰t$@E1ÀH‰D$HH‹„$M‰îL‹|$`M‰ÌHÇD$ÇD$Xæ"H‰D$8éIýÿÿò{ò|$(éc÷ÿÿI‰ÃH‹„$ˆL‹l$ L‹L$XH‰l$ 1ÛH‹l$L‹|$`E1ÀH‰D$HH‹„$E1ÒL‰t$@M‰ÌHÇD$M‰îÇD$XÙ"ÇD$`H‰D$8HÇD$(1ÉHÇD$0é`ÿÿèæýÿH…À„ðöÿÿH‹„$ˆL‹l$ I‰ÛL‹L$XH‰l$ H‹l$L‹|$`H‰D$HH‹„$L‰t$@M‰ÌM‰îÇD$XÛ"ÇD$`H‰D$8HÇD$(E1ÒHÇD$01É1ÛE1ÀHÇD$é×ÿÿL‹L$XL‰l$0L‰ãL‹l$ L‹|$`M‰ðH‰l$ ÇD$XÀ"E1ÒH‹l$M‰ÌÇD$`M‰îHÇD$(L‹¬$ˆ1ÉE1ÛHÇD$éfÿÿ¾H‰Çèrªýÿé õÿÿL‰l$0L‹L$XL‰ãL‹l$ L‹|$`A¼H‰l$ H‹l$H‹t$0H‹H‰D$HƒèH…ÀH‰uH‹FL‰L$H‰÷ÿP0L‹L$L‰L$èîŠþÿ…ÀM‰ðL‹L$u9HZóH WñIƒüH5ÁL‰âHEÈH‹³7'H‹81Àèá¦ýÿL‹L$M‰ðM‰ÌM‰îÇD$XÈ"ÇD$`HÇD$(E1ÒHÇD$01ÉE1ÛHÇD$éƒÿÿL‰ãL‰l$0L‹L$XL‹l$ L‹|$`A¼H‰l$ H‹l$éÿÿÿL‰l$0L‹L$XH‰ÃL‹l$ L‹|$`E1öH‰l$ E1äH‹l$éîþÿÿL‹L$XL‹l$ I‰ÛH‰l$ L‹|$`E1ÒH‹l$H‰D$01ÉM‰ÌM‰îÇD$X¶"ÇD$`HÇD$(1ÛE1ÀHÇD$éÓÿÿH‹SHƒú…ÛH;v6'H‹C…ªH‰„$H‹C(L‹s H‰„$ˆH‹„$HƒH‹„$ˆIƒHƒHƒ+…FóÿÿH‹CH‰ßÿP0é7óÿÿL‹l$ L‹L$XL‰ãL‹|$`H‰l$ I‰ÃH‹l$E1ÀHÇD$M‰ÌM‰îÇD$X"ÇD$`HÇD$(E1ÒHÇD$01Éé ÿÿH‹0L‹pH‹@H‰´$H‰„$ˆéNÿÿÿL‹l$ L‹L$XI‰ÛH‰l$ L‹|$`H‹l$vH…ÒˆRHñH ïHƒúH5†H‰œ$ˆL‰L$HEÈH‹n5'H‹81À蜤ýÿL‹L$M‰îÇD$Xœ"ÇD$`HÇD$(E1ÒHÇD$01É1ÛM‰ÌE1ÀHÇD$L‹œ$ˆé7ÿÿL‹l$ L‹L$XH‰ÃH‰l$ L‹|$`E1ÛH‹l$E1ÀHÇD$M‰ÌM‰îÇD$X"éËþÿÿH‹„$L‹L$XI‰ëL‰l$0L‹D$E1ÒL‹l$ H‹l$1ÉH‰D$H‹„$ˆM‰ÌL‹|$`L‰t$ 1ÛM‰îÇD$Xt"L‹l$ÇD$`H‰D$HÇD$(HÇD$épÿÿ¾H‰Çè|¦ýÿé¨ïÿÿL‰l$0L‹L$X»L‹l$ H‹l$L‹|$`H‹t$0H‹H‰D$HƒèH…ÀH‰uH‹FL‰L$H‰÷ÿP0L‹L$L‰L$è‡þÿ…ÀL‹L$…éHlïH iíHƒûH5ÓH‰ÚHEÈH‹Å3'1ÛH‹81Àèñ¢ýÿH‹„$L‹L$E1ÒL‹D$L‰t$ 1ÉM‰îÇD$X|"L‹l$H‰D$H‹„$ˆM‰ÌÇD$`HÇD$(E1ÛHÇD$0HÇD$H‰D$é]ÿÿM‰ÌM‰îÇD$Xœ"ÇD$`éQúÿÿH‹+3'H5„üºH‰œ$ˆL‰L$H‹81Àè@¢ýÿéŸýÿÿH‹„$L‹D$M‰ÌL‰t$ ÇD$X|"M‰îÇD$`L‹l$E1ÒH‰D$H‹„$ˆ1ÉHÇD$(HÇD$0E1Û1ÛHÇD$H‰D$éªÿÿL‰l$0L‹L$X»L‹l$ H‹l$L‹|$`éGþÿÿL‰l$0L‹L$X1ÛL‹l$ H‹l$L‹|$`HÇD$éþÿÿH‰D$0H‹„$L‰ãL‹L$XL‹l$ E1ÒH‹l$L‹|$`1ÉH‰D$H‹„$ˆE1ÛL‰t$ M‰ÌM‰îÇD$Xj"ÇD$`E1ÀH‰D$HÇD$(HÇD$éûÿÿI‹T$Hƒú…ÍH;1'I‹D$…¡H‰D$I‹D$ I‹l$(H‰D$H‹D$HƒH‹D$HƒHƒEIƒ,$…÷ìÿÿI‹D$L‰çÿP0éçìÿÿH‰ÃH‹„$L‹l$ L‹L$XH‹l$E1ÛL‹|$`L‰t$ E1ÀH‰D$H‹„$ˆM‰îM‰ÌHÇD$ÇD$XD"ÇD$`HÇD$(E1ÒH‰D$HÇD$01ÉéÿÿH‰l$(L‹l$ L‹L$XH‹l$L‹|$`HƒmuH‹EL‰L$H‰ïÿP0L‹L$¿L‰L$è"žýÿH…ÀH‰ÅL‹L$„H‹„$L‰t$ M‰ÌM‰îHÇD$HƒH‰EH‹D$PHƒH‰E H‹„$H‰D$H‹„$ˆH‰D$H‹D$(H‰„$é+ÿÿH‹t$H‹D$0H;F;ÿÿÿH‹tÆHƒÀH‰D$0H‰´$Hƒé§êÿÿH‹0H‹hH‰t$H‹pH‰t$éYþÿÿL‹l$ L‹L$XL‰ãH‹l$L‹|$`H…Òx8H]ëH ZéHƒúH5ÄýL‰L$HEÈH‹´/'H‹81ÀèâžýÿL‹L$H‹„$L‰t$ M‰ÌM‰îÇD$XP"ÇD$`HÇD$(E1ÒHÇD$0H‰D$H‹„$ˆ1ÉE1ÛE1ÀHÇD$H‰D$éeÿÿH‹>/'H5—øºL‰L$H‹81Àè[žýÿétÿÿÿH‹|$H‹„$ ÿÐH…ÀH‰„$…ŒéÿÿL‹L$XH‰l$(L‹l$ H‹l$L‹|$`L‰L$ècœýÿH…ÀL‹L$„éýÿÿH‹V/'H‹2H9ð…€L‰L$èØ›ýÿL‹L$éÂýÿÿH‹„$L‰t$ E1Û1ÛM‰ÌHÇD$M‰îÇD$XK#ÇD$`H‰D$H‹„$ˆE1ÒHÇD$01ÉH‰D$H‹D$(HÇD$(H‰„$éyÿÿH‰Çè*šýÿ…ÀL‹L$…kÿÿÿH‹„$L‰t$ E1Û1ÛE1ÀM‰ÌHÇD$M‰îÇD$X4"H‰D$H‹„$ˆH‰D$H‹D$(H‰„$ÇD$` HÇD$(E1ÒHÇD$01ÉéÖÿÿH‹D$(M‰ÌM‰îÇD$X"ÇD$` H‰„$逾ÿÿH‹D$(E1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇD$H‰„$ÇD$X"ÇD$` HÇD$(E1ÒHÇD$01ÉéLÿÿHƒH‰ÝHÇ„$ HÇD$0齿ÿÿH‹D$(E1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îHÇD$HÇD$HÇD$H‰„$ÇD$X"é­þÿÿH‹D$(E1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇD$H‰„$ÇD$X "éôþÿÿH‹D$(E1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇD$H‰„$ÇD$X"é’þÿÿH‹D$(M‰ÌM‰îÇD$X"ÇD$` H‰„$HÇD$(E1ÒHÇD$01ÉE1Û1Ûé6®ÿÿH‹D$(M‰ÌM‰îÇD$Xþ!ÇD$` H‰„$ëºH‹D$(M‰ÌM‰îÇD$Xõ!ÇD$` H‰„$ë•H‹t$8H‹D$XH;F…ãÿÿH‹tÆHƒÀH‰D$XH‰´$Hƒé¥ÿÿH‹|$8H‹„$ˆÿÐH…ÀH‰„$…þ¤ÿÿL‹L$@H‰\$(L‹l$0H‹\$8H‰¬$°L‰´$¨L‰L$L‹|$Hè7˜ýÿH…ÀL‹L$„.ãÿÿH‹*+'H‹2H9ð…·L‰L$謗ýÿL‹L$éãÿÿM‰îM‰ÌI‰íÇD$X ÇD$`üE1ÒHÇD$(HÇD$01ÉE1ÛE1À1íHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇD$éç ÿÿH‰ÇèÇ•ýÿ…ÀL‹L$…4ÿÿÿH‹D$(E1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇD$H‰„$ÇD$X! ÇD$`üHÇD$(E1ÒHÇD$01Éé€ ÿÿM‰îE1ÛI‰íE1ÀM‰ÌHÇD$HHÇD$@HÇD$81íHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇD$ÇD$X ÇD$`üHÇD$(HÇD$0é® ÿÿHƒEH‰ëHÇ„$ˆHÇD$XéÓ¡ÿÿE1ÛM‰ÌHÇD$HHÇD$@HÇD$8M‰îHÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇD$ÇD$Xüé›þÿÿM‰îE1ÛI‰íE1ÀM‰ÌHÇD$HHÇD$@HÇD$81íHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇD$ÇD$XôÇD$`üHÇD$(HÇD$0ém ÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇD$ÇD$XòézýÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇD$ÇD$XãÇD$`ùHÇD$(HÇD$0é ÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇD$ÇD$XÔÇD$`øHÇD$(HÇD$0éØÿÿH‹D$0E1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇD$HÇD$PH‰„$˜ÇD$XÇÇD$`öHÇD$(E1ÒHÇD$01ÉéÿÿH‹D$0E1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$H‰„$˜HÇD$HÇD$PÇD$XÅé>ÿÿÿH‹D$0M‰îL‰œ$ I‰í1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ 1íHÇD$HÇD$E1ÛHÇ„$€HÇD$xE1ÒHÇD$pHÇD$h1ÉHÇ„$H‰„$˜HÇD$HÇD$PÇD$X¸ÇD$`õHÇD$(HÇD$0éÿÿH‹D$0L‰œ$ 1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ E1ÛHÇD$HÇD$M‰îHÇ„$€HÇD$xE1ÒHÇD$pHÇD$h1ÉHÇ„$H‰„$˜HÇD$HÇD$PÇD$X¶ÇD$`õHÇD$(HÇD$0éçÿÿH‹\$0M‰ÌM‰îÇD$XŸÇD$`ôE1ÒHÇD$(HÇD$01ÉHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$Péÿÿ¾H‰ÇL‰D$L‰L$èð“ýÿL‹L$L‹D$L‹\$év˜ÿÿ»Iƒ(uI‹@L‰\$L‰ÇL‰L$ÿP0L‹\$L‹L$L‰\$L‰L$èƒtþÿ…ÀL‹L$L‹\$…ãHéÜH æÚHƒûH5PïH‰ÚL‰œ$ˆHEÈH‹:!'M‰î1ÛH‹81ÀècýÿL‹L$ÇD$X§E1ÒÇD$`ôHÇD$(1ÉHÇD$0HÇD$HM‰ÌHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PL‹œ$ˆé›ÿÿ1Ûé§þÿÿM‰îE1ÛI‰í1ÛM‰ÌHÇD$HHÇD$@HÇD$81íHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PÇD$X—ÇD$`ôHÇD$(HÇD$0é–ÿÿM‰ÌM‰îÇD$X§ÇD$`ôHÇD$(E1ÒHÇD$01É1ÛHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PéþÿÿH‹UHƒú…4H;‚'…H‹E L‹]H‰D$0H‹D$0IƒHƒHƒm…n•ÿÿH‹EL‰\$H‰ïL‰L$ÿP0L‹L$L‹\$éK•ÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PÇD$XvÇD$`ôHÇD$(HÇD$0éÑÿÿH‹EL‹H‹@H‰D$0éæþÿÿtH…Òˆ™HîØH ëÖHƒúH5UëL‰L$M‰îHEÈH‹B'I‰í1Û1íH‹81ÀèiŒýÿL‹L$ÇD$X‚E1ÒÇD$`ôHÇD$(1ÉHÇD$0E1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$Pétÿþÿ1ÛM‰ÌHÇD$HHÇD$@HÇD$8M‰îHÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PÇD$X]ÇD$`óHÇD$(E1ÒHÇD$01ÉéÍþþÿI‹kH…턽ÿÿM‹cHƒEIƒ$Iƒ+uI‹CL‰D$L‰ßÿP0L‹L$L‹D$¿L‰D$L‰L$è·ˆýÿH…ÀH‰ÃL‹L$L‹D$„÷1ÒH‰kL‰C H‰ÞL‰çL‰L$èpþÿH…ÀH‰„$ˆL‹L$„ÿH‹M‰ãHƒèH…ÀH‰…~ÿÿH‹CL‰d$H‰ßÿP0L‹\$L‹L$é`ÿÿM‰îM‰ÌI‰íÇD$X‚ÇD$`ôE1ÒHÇD$(HÇD$01ÉE1Û1ÛE1À1íHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PéýþÿH‹ü'H5UãºL‰L$M‰î1ÛI‰í1íH‹81Àè‰ýÿL‹L$ÇD$X‚E1ÒÇD$`ôHÇD$(1ÉHÇD$0E1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PéüþÿM‰ãHÇD$HM‰ÌHÇD$@HÇD$8M‰îHÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PÇD$XgÇD$`óHÇD$(E1ÒHÇD$01ÉéûþÿM‰ãHÇD$HM‰ÌHÇD$@HÇD$8M‰îHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$HÇD$PÇD$XaÇD$`óHÇD$(HÇD$0éŽúþÿ1ÛM‰ÌHÇD$HHÇD$@HÇD$8M‰îHÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$HÇD$PÇD$XPéTþÿÿ1ÛM‰ÌHÇD$HHÇD$@HÇD$8M‰îHÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$HÇD$PÇD$XMéEúÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$HÇD$PÇD$XKééüÿÿH‹„$ˆE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îHÇD$HÇD$E1ÒHÇ„$€HÇD$x1ÉHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇD$HÇD$PH‰„$ÀHÇ„$ˆÇD$X?ÇD$`òHÇD$(HÇD$0é¨÷þÿH‹„$ˆE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÀH‹D$PE1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$HÇD$PH‰„$ÈÇD$X3ÇD$`ñHÇD$(HÇD$0éµöþÿH‹=WY'èb„þÿH…ÀL‹L$„]H‹5õQ'1ÒH‰ÇL‰L$H‰D$è9hþÿH…ÀH‰ÅL‹D$L‹L$„9Iƒ(uI‹@L‰L$L‰ÇÿP0L‹L$1Ò1öH‰ïL‰L$èšþÿHƒmL‹L$uH‹EH‰ïÿP0L‹L$H‹„$ˆM‰ÌM‰îÇD$X!ÇD$`ðH‰„$ÀH‹D$PH‰„$ÈHÇD$(E1ÒHÇD$01ÉE1Û1ÛHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$HÇD$Pé1õþÿH‹„$ˆE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÀH‹D$PE1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆH‰„$ÈHÇD$HÇD$PÇD$XÇD$`ðHÇD$(HÇD$0é/ôþÿH‹„$ˆE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÀH‹D$PE1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆH‰„$ÈHÇD$HÇD$PÇD$XÇD$`ðHÇD$(HÇD$0éKóþÿH‹¼$ˆè÷}ýÿHƒøÿL‹L$tF1ÒHƒè•Â餃ÿÿH‹„$ˆM‰ÌM‰îÇD$XH‰„$ÀH‹D$PH‰„$ÈÇD$`ïéüüÿÿH‹„$ˆM‰ÌM‰îÇD$X H‰„$ÀH‹D$PH‰„$ÈëÆH‹„$ˆM‰îL‹¬$¸1ÛE1À1íM‰ÌHÇD$HHÇD$@H‰„$ÀH‹D$PE1ÒHÇD$8HÇD$ 1ÉHÇD$HÇD$H‰„$ÈH‹D$0HÇ„$€HÇD$xHÇD$pHÇD$hH‰„$¸H‹D$XHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$PH‰„$ÐÇD$XâÇD$`ìHÇD$(HÇD$0éƒñþÿI‹[H…Û„ÿÿM‹cHƒIƒ$Iƒ+uI‹CL‰L$L‰ßÿP0L‹L$¿L‰L$è˜{ýÿH…ÀH‰ÅL‹L$„‚H‹D$XH‰]1ÒH‰îL‰çL‰L$HƒH‰E èôbþÿH…ÀH‰„$ÐL‹L$„:Hƒm…É€ÿÿH‹EH‰ïÿP0L‹L$éµ€ÿÿH‹„$ˆM‰îE1ÀL‹¬$¸1íM‰ÌHÇD$HHÇD$@E1ÒH‰„$ÀH‹D$P1ÉHÇD$8HÇD$ HÇD$HÇD$H‰„$ÈH‹D$XHÇ„$€HÇD$xHÇD$pHÇD$hH‰„$ÐH‹D$0HÇ„$HÇ„$˜HÇ„$ HÇ„$ˆH‰„$¸HÇD$PÇD$XÔÇD$`ìHÇD$(HÇD$0éËïþÿH‹„$ˆM‰îE1ÛL‹¬$¸E1À1íM‰ÌHÇD$HHÇD$@H‰„$ÀH‹D$PE1ÒHÇD$8HÇD$ 1ÉHÇD$HÇD$H‰„$ÈH‹D$XHÇ„$€HÇD$xHÇD$pHÇD$hH‰„$ÐH‹D$0HÇ„$HÇ„$˜HÇ„$ HÇ„$ˆH‰„$¸HÇD$PÇD$XÒÇD$`ìHÇD$(HÇD$0é¼îþÿH‹„$ˆM‰îL‹¬$¸M‰ã1ÛE1ÀM‰ÌHÇD$HHÇD$@H‰„$ÀH‹D$PE1ÒHÇD$8HÇD$ 1ÉHÇD$HÇD$H‰„$ÈH‹D$0HÇ„$€HÇD$xHÇD$pHÇD$hH‰„$¸H‹D$XHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇD$PH‰„$ÐÇD$XëÇD$`ìHÇD$(HÇD$0é­íþÿH‹„$ˆM‰ãM‰îE1ÀL‹¬$¸M‰ÌHÇD$HHÇD$@E1ÒH‰„$ÀH‹D$P1ÉHÇD$8HÇD$ HÇD$HÇD$H‰„$ÈH‹D$XHÇ„$€HÇD$xHÇD$pHÇD$hH‰„$ÐH‹D$0HÇ„$HÇ„$˜HÇ„$ HÇ„$ˆH‰„$¸HÇD$PÇD$XåÇD$`ìHÇD$(HÇD$0é ìþÿH‹„$ˆE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÀH‹D$PHÇD$HÇD$HÇ„$€HÇD$xH‰„$ÈH‹D$XHÇD$pHÇD$hHÇ„$HÇ„$˜H‰„$ÐH‹D$0HÇ„$ HÇ„$ˆHÇD$PÇD$XÄH‰„$¸ÇD$`ìHÇD$(E1ÒHÇD$01Éé¼ëþÿM‹XM…Û„uzÿÿI‹hIƒHƒEIƒ(uI‹@L‰\$L‰ÇL‰L$ÿP0L‹L$L‹\$¿L‰\$L‰L$è¢uýÿH…ÀH‰ÃL‹L$L‹\$„ H‹D$0L‰[1ÒH‰ÞH‰ïL‰L$HƒH‰C èù\þÿH…ÀH‰„$¸L‹L$„Hƒ+… zÿÿH‹CH‰ßÿP0L‹L$éøyÿÿH‹„$ˆ1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$ÀH‹D$PHÇD$HÇD$HÇ„$€HÇD$xH‰„$ÈH‹D$XHÇD$pHÇD$hHÇ„$HÇ„$˜H‰„$ÐH‹D$0HÇ„$ HÇ„$ˆHÇD$PÇD$X¶H‰„$¸ÇD$`ìHÇD$(E1ÒHÇD$01Éé êþÿH‹„$ˆ1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$ÀH‹D$PHÇD$HÇD$HÇ„$€HÇD$xH‰„$ÈH‹D$XHÇD$pHÇD$hHÇ„$HÇ„$˜H‰„$ÐH‹D$0HÇ„$ HÇ„$ˆHÇD$PÇD$X´H‰„$¸éúþÿÿH‹„$ˆE1ÛI‰èM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÀH‹D$PHÇD$HÇD$HÇ„$€HÇD$xH‰„$ÈH‹D$XHÇD$pHÇD$hHÇ„$HÇ„$˜H‰„$ÐH‹D$0HÇ„$ HÇ„$ˆHÇD$PÇD$XÍH‰„$¸éTüÿÿH‹„$ˆI‰èM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ H‰„$ÀH‹D$PHÇD$HÇD$HÇ„$€HÇD$xH‰„$ÈH‹D$XHÇD$pHÇD$hHÇ„$HÇ„$˜H‰„$ÐH‹D$0HÇ„$ HÇ„$ˆHÇD$PÇD$XÇH‰„$¸éqûÿÿH‹D$PE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÈH‹D$XE1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xH‰„$ÐH‹D$0HÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ÀH‰„$¸HÇD$PÇD$X¨ÇD$`êHÇD$(HÇD$0élæþÿH‹D$XE1Û1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ M‰îH‰„$ÐH‹D$0E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈH‰„$¸ÇD$XœÇD$`éHÇD$(HÇD$0évåþÿpH…ÒˆbH¨½H ¥»HƒúH5ÐL‰L$M‰îHEÈH‹ü'I‰í1Û1íH‹81Àè#qýÿL‹L$ÇD$XE1ÒÇD$`çHÇD$(1ÉHÇD$0E1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PéûãþÿH‹ì'H5ÍÇL‰L$M‰î1ÛI‰í1íH‹8èÎlýÿL‹L$ÇD$XŽE1ÒÇD$`çHÇD$(1ÉHÇD$0E1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PéÖâþÿM‰îM‰ÌI‰ÅÇD$XÇD$`çE1ÒHÇD$(HÇD$01ÉE1Û1ÛE1À1íHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PéÑáþÿH‹ºþ&H5ȺM‰î1ÛI‰í1íH‹81ÀèÒmýÿL‹L$ÇD$XE1ÒÇD$`çHÇD$(1ÉHÇD$0E1ÛE1ÀM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PéªàþÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PÇD$XsÇD$`çHÇD$(HÇD$0éÜßþÿH‹t$PH‹D$@H;FõlÿÿL‹lÆHƒÀH‰D$@IƒEé³ÖþÿI‹EL‹0L‹xé«lÿÿM‰èL‹L$L‹l$H‰œ$àL‹|$0¤LH…Òˆ—KH¸·H µµHƒúH5ÊL‰„$ˆL‰L$HEÈH‹ü&M‰î1Û1íH‹81Àè.kýÿL‹L$L‹l$PE1ÒÇD$X³ÇD$`Þ1ÉHÇD$(HÇD$0E1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PL‹„$ˆéüÝþÿH‹|$PH‹D$HÿÐH…ÀI‰Å…ÕþÿL‹L$L‹l$H‰D$H‰œ$àL‹|$0L‰L$@è6hýÿH…ÀL‹L$@„#kÿÿH‹)û&H‹2H9ð…TL‰L$è«gýÿL‹L$éüjÿÿM‰îM‰ÌL‹l$PÇD$X‡ÇD$`ÞE1ÒHÇD$(HÇD$01ÉE1Û1Û1íHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$PéIÜþÿH‰ÇL‰L$è$eýÿ…ÀL‹L$L‹D$…þÿÿM‰îE1ÛL‹l$P1Û1íM‰ÌHÇD$HHÇD$@E1ÒHÇD$8HÇD$ 1ÉHÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PÇD$X£ÇD$`ÞHÇD$(HÇD$0é&ÛþÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X¼ÇD$`ÐHÇD$(E1ÒHÇD$01Éé–ÙþÿI‹@L‰L$L‰ÇÿP0L‹L$égÉþÿL‰ÇH‰îL‰L$0L‰D$èpjþÿH…ÀH‰„$@L‹D$L‹L$0tQHƒm… ÉþÿH‹EL‰D$0H‰ïL‰L$ÿP0L‹L$L‹D$0é}ÉþÿH‹CL‰D$0H‰ßL‰L$ÿP0L‹D$0L‹L$é´ÈþÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$X¸éÏýÿÿI‹CL‰D$0L‰ßL‰L$ÿP0L‹D$0L‹L$éÇþÿHÇD$HHÇD$@M‰ÌHÇD$8HÇD$ M‰îHÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X©ÇD$`ÐHÇD$(E1ÒHÇD$01ÉéÙÕþÿI‹D$L‰\$HL‰çL‰D$0L‰L$ÿP0L‹\$HL‹D$0L‹L$éÅþÿH‹FL‰\$PH‰÷L‰D$HL‰L$ÿP0L‹\$PL‹D$HL‹L$éÎÄþÿL‰åHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xE1ÒHÇD$pHÇD$h1ÉHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X¢ÇD$`ÐHÇD$(é×ÓþÿH‹EL‰\$PH‰ïL‰D$HÿP0L‹L$L‹D$HL‹\$Pé»ÂþÿH‰ïL‰\$HL‰D$0L‰L$èpoþÿH…ÀH‰ÃL‹L$L‹D$0L‹\$H„ˆI‰ìéÕÂþÿHÇD$HHÇD$@1ÛHÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X•éüÿÿHÇD$HHÇD$@M‰ÌHÇD$8HÇD$ M‰îHÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X¥é½öÿÿH‰D$HH‹CH‰ßÿP0L‹\$HL‹D$0L‹L$éæ¾þÿHÇD$HHÇD$@M‰ÌHÇD$8HÇD$ M‰îHÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X’ééøÿÿI‹D$L‰D$0L‰çL‰L$ÿP0L‹D$0L‹L$é ½þÿH‹EL‰D$0H‰ïL‰L$ÿP0L‹D$0L‹L$éݼþÿM‰ãHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X‹éTóÿÿI‹CL‰ßÿP0L‹L$L‹D$0é »þÿL‰ßL‰D$HL‰L$0L‰\$è¶hþÿH…ÀH‰ÃL‹\$L‹L$0L‹D$H„ˆM‰Üé »þÿHÇD$HHÇD$@1ÛHÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X~éNõÿÿHÇD$HHÇD$@M‰ÌHÇD$8HÇD$ M‰îHÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$XŽéÐóÿÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hE1ÒHÇ„$HÇ„$˜1ÉHÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$X|ÇD$`ÐHÇD$(HÇD$0é:ÈþÿI‹@L‰L$L‰ÇÿP0L‹L$éµþÿH‹CL‰d$0H‰ßÿP0L‹D$0L‹L$éeµþÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ E1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$XmÇD$`ÎHÇD$(E1ÒHÇD$01ÉéQÆþÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇD$PÇD$XgÇD$`ÎHÇD$(E1ÒHÇD$01Éé•ÄþÿI‹@L‰\$0L‰ÇL‰L$ÿP0L‹L$L‹\$0郱þÿL‰ÞL‰ÇL‰L$HL‰\$0L‰D$è`UþÿH…ÀH‰„$HL‹D$L‹\$0L‹L$H„ºIƒ+…¯±þÿI‹CL‰D$0L‰ßL‰L$ÿP0L‹L$L‹D$0錱þÿL‰åHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇD$PÇD$XQéÅýÿÿHÇD$HHÇD$@1ÛHÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇD$PÇD$Xcé™úÿÿH‰ïL‰D$0L‰L$èÄ\þÿH…ÀI‰ÃL‹L$L‹D$0„—I‰ìéx­þÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇD$PÇD$XDéÚøÿÿHÇD$HHÇD$@1ÛHÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇD$PÇD$XTéúøÿÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hE1ÒHÇ„$HÇ„$˜1ÉHÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇD$PÇD$XBÇD$`ÎHÇD$(HÇD$0é$¼þÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇ„$@HÇ„$HHÇD$PÇD$X3é(ÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇD$PÇD$X$ÇD$`ÕHÇD$(E1ÒHÇD$01Éé#¹þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇD$PÇD$XÇD$`ÕHÇD$(E1ÒHÇD$01É颷þÿHÇD$HHÇD$@M‰îHÇD$8HÇD$ I‰íHÇD$HÇD$E1ÛHÇ„$€HÇD$x1ÛHÇD$pHÇD$hM‰ÌHÇ„$HÇ„$˜1íHÇ„$ HÇ„$ˆE1ÒHÇ„$ÀHÇ„$È1ÉHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇD$PÇD$XÇD$`ÕHÇD$(HÇD$0éÿµþÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇD$PÇD$XéˆûÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇD$PÇD$XÇD$`ÔHÇD$(E1ÒHÇD$01ÉéQ³þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇD$PÇD$X éqþÿÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ E1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XüÇD$`ÒHÇD$(E1ÒHÇD$01Éé@°þÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XöÇD$`ÒHÇD$(E1ÒHÇD$01É霮þÿL‰ÞL‰ÇL‰L$HL‰\$0L‰D$èŠ?þÿH…ÀH‰ÅL‹D$L‹\$0L‹L$H„¢Iƒ+…¶ þÿI‹CL‰D$0L‰ßL‰L$ÿP0L‹L$L‹D$0é“ þÿL‰åHÇD$HHÇD$@HÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XàéþÿÿHÇD$HHÇD$@1ÛHÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XòéýúÿÿH‰ïL‰D$0L‰L$èGþÿH…ÀI‰ÃL‹L$L‹D$0„I‰ìéyœþÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XÓéVùÿÿHÇD$HHÇD$@1ÛHÇD$8HÇD$ M‰ÌHÇD$HÇD$M‰îHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XãévùÿÿHÇD$HHÇD$@E1ÛHÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hE1ÒHÇ„$HÇ„$˜1ÉHÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XÑÇD$`ÒHÇD$(HÇD$0鿦þÿI‹@L‰L$L‰ÇÿP0L‹L$éë–þÿI‹CL‰L$L‰ßL‰d$0ÿP0L‹D$0L‹L$é¾–þÿM‰àHÇD$HHÇD$@HÇD$8HÇD$ 1ÛHÇD$HÇD$M‰ÌHÇ„$€HÇD$xM‰îHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇ„$8HÇ„$°HÇ„$ØHÇD$PÇD$XÂéÏÿÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇD$PÇD$XQÇD$`ØHÇD$(HÇD$0鯣þÿM‰îE1ÛI‰í1ÛM‰ÌHÇD$HHÇD$@HÇD$81íHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇD$PÇD$XLÇD$`ØHÇD$(HÇD$0é0¢þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇD$PÇD$XJÇD$`ØHÇD$(HÇD$0é¡þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇD$PÇD$X=ÇD$`×HÇD$(HÇD$0霟þÿM‰îE1ÛI‰í1ÛM‰ÌHÇD$HHÇD$@HÇD$81íHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇD$PÇD$X8ÇD$`×HÇD$(HÇD$0éžþÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇD$PÇD$X6ÇD$`×HÇD$(HÇD$0éÚœþÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇD$PÇD$X)é¾ãÿÿHÇD$HHÇD$@M‰îHÇD$8HÇD$ I‰íHÇD$HÇD$E1ÛHÇ„$€HÇD$x1ÛHÇD$pHÇD$hM‰ÌHÇ„$HÇ„$˜1íHÇ„$ HÇ„$ˆE1ÒHÇ„$ÀHÇ„$È1ÉHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇ„$¨HÇ„$ HÇ„$(HÇ„$0HÇD$PÇD$X&ÇD$`ÕHÇD$(HÇD$0éí™þÿM‰îE1ÛI‰í1ÛM‰ÌHÇD$HHÇD$@HÇD$81íHÇD$ HÇD$E1ÒHÇD$HÇ„$€1ÉHÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$PÇD$X~ÇD$`ÞHÇD$(HÇD$0鯘þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$PÇD$XvÇD$`ÞHÇD$(HÇD$0饗þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$PÇD$XjÇD$`ÝHÇD$(HÇD$0él–þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðHÇD$HÇD$PÇD$X^ÇD$`ÜHÇD$(HÇD$0é*•þÿE1Û1ÛM‰ÌHÇD$HHÇD$@M‰îHÇD$8HÇD$ E1ÒHÇD$HÇD$1ÉHÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇ„$èHÇ„$HÇ„$øHÇ„$àHÇ„$ðÇD$X…ÇD$`ÞHÇD$(HÇD$0éë“þÿIƒL‰D$PE1äHÇD$Hé9ŠþÿM‰îM‰ÌL‹l$PÇD$X³ÇD$`ÞE1ÒHÇD$(HÇD$01ÉE1Û1Û1íHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$Pé­’þÿH‹–¯&H5ïxºL‰„$ˆL‰L$M‰î1Û1íH‹81Àè¤ýÿL‹L$L‹l$PE1ÒÇD$X³ÇD$`Þ1ÉHÇD$(HÇD$0E1ÛM‰ÌHÇD$HHÇD$@HÇD$8HÇD$ HÇD$HÇD$HÇ„$€HÇD$xHÇD$pHÇD$hHÇ„$HÇ„$˜HÇ„$ HÇ„$ˆHÇ„$ÀHÇ„$ÈHÇ„$ÐHÇ„$¸HÇD$PL‹„$ˆér‘þÿf.„AWAVAUATUSH‰óHìXdH‹%(H‰„$H1ÀH…ÒHÇ„$HÇ„$HÇ„$ …lHƒ~…QH‹FH‰„$H‹F H‰„$H‹F(H‰„$ H‹œ$H‹„$H‹SH‰$H‹‚¨©€„sH‹CHcÐA‰ÇH9Ð…ÀAƒÿÿ„6H‹„$ H‹ O­&H9H„]H‰Çè…ýÿò„$òŒ$f. Ó‚z„“H‹5dô&H‹=Íó&1ÒHÇ„$ÈHÇ„$ÐHÇ„$ØHÇ„$àHÇ„$èHÇ„$ðHÇ„$øèÚþÿH…ÀH‰D$ „‡1ÿèõýÿH…ÀH‰D$x„'1ÿèàýÿH…ÀH‰D$X„‚>1ÿèËýÿH…ÀH‰„$@„B@1ÿè³ýÿH…ÀH‰„$8„òAH‹5ƒí&H‹<$èRýÿƒøÿ„¹C…À„YH‹$H‹$1ÒH‹5hó&H‹=Éò&HƒH‹D$ H‰Xè·þÿH…ÀH‰Ã„ÛFH‹D$ H‹=¿ò&H5H,þÿH‰ÚH‰CHƒL‹öð&H‹ ð&èÊÿýÿH…ÀH‰$„mFHƒ+„#C¿è9ýÿH…ÀI‰Å„¥^H‹$H‹"ò&I‰EH‹CH‹¨€H…í„jfL‹%³«&I‹$‹BƒÀ‰BH‹§«&;×n1ÒL‰îH‰ßÿÕH‰„$HI‹$ƒhHƒ¼$H„.Iƒm„“EH‹5,ê&H‹¼$HºèºýÿH…ÀH‰$„µnH‹~«&H9$H‹˪&H‰„$(”ÀH9$H‰œ$0”ÂÂuH‹$H;:«&…\0¶ØH‹$H‹ $H‹H‰D$HƒèH…ÀH‰„yU…Û…¡,H‹5šé&H‹¼$Hºè¨þÿH…ÀI‰Å„H;„$(”ÀL;¬$0”ÂÂu L;-ê&…åj¶ØIƒm„Ï}…Û…²oHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hÇD$è9ýÿH…ÀH‰$„“¿H‹ª&H‹<$H‰ÂH‰ÆH‰„$ èŽýÿ…ÀˆbèýÿH…ÀH‰„$À„5ýH‹$HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨H‰„$ˆH‹©©&HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€H‰„$(H‹¨&HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØH‰„$0H„$HÇ„$ÀHÇ„$ÈHÇ„$pH‰„$˜H„$H‰„$ H„$ÀH‰„$¨H‹„$(H9$H‹„$0”ÂH9$”ÀÐuH‹„$ H9$…Ä¥¶Â…À„þä1ÿè`ýÿH…ÀH‰$„Z H‹D$ H‹$H‹PH‰XH…Òt Hƒ*„«Úè^ýÿH…ÀH‰D$„ß Hƒ¼$Èt'H‹„$ÈH‹œ$ÈH‹H‰$HƒèH…ÀH‰„âèýÿH…ÀH‰D$@„Ð Hƒ¼$Àt'H‹„$ÀH‹œ$ÀH‹H‰$HƒèH…ÀH‰„™ç¿èßýÿH…ÀI‰Æ„þH‹D$XH‹×í&HƒI‰FH‹„$8HƒI‰F H‹CH‹¨€H…í„?)L‹%D§&I‹$‹BƒÀ‰BH‹8§&;‚C1ÒL‰öH‰ßÿÕH‰$I‹$ƒhHƒ<$„åZH‹$H‰„$ðIƒ.„ÑéH‹$H‹®§&H‹@H‰œ$@H9Ø„š†H;Ц&„†H‹<$HÇ„$ÀÿÿÿÿèOýÿH…ÀH‰$„n÷H‹@H‹€àH…ÀH‰„$ˆ„®õH‹”$ðHƒ*„céH‹„$hL‹¤$ÈH‹¬$ØHÇ„$ðH‰D$8Hƒ¼$ˆ…¸IH‹$H‹œ$@H9XH‹„$ÀH‹$…XaH9CŽÐIH‹SH‹ÂH‰„$ðHƒHƒ„$ÀH‹œ$ðH‹ ¤¥&H‹CH‰L$(H9ȄυH;„$@„Á…H‰ßè\ýÿH…ÀI‰Å„V-Hƒ+„€)I‹EHÇ„$ðL‰ïH‹˜àÿÓH…ÀH‰„$Ø„Ê'L‰ïÿÓH…ÀH‰„$à„©éL‰ïÿÓH…À…‰éè@øýÿ…ÀˆM+Iƒmu I‹EL‰ïÿP0H‹„$ØH‰D$0H‹D$0H…íH‰„$Øt Hƒm„iöH‹„$àM…äHÇ„$ØH‰„$Èt Iƒ,$„CøD‹D$HÇ„$àE…À„vÅ1ÿèÐýÿH…ÀH‰„$ð„‹·E1ÿH‹-íæ&H‹=¶ë&H‰îè†ýÿH…ÀH‰Ã„*¬HƒH‰„$ØH‹CH‹ ëé&H‹H…Ò„â«H‰ÎH‰ßÿÒI‰ÅM…í„-ªHƒ+„;H‹D$0HÇ„$ØH‹ ]å&H‹@H‹H…Ò„ŸH‰ÎH‹|$0ÿÒH‰ÃH…ÛH‰œ$è„6µH‹CH‹ Ðç&H‹H…Ò„`¸H‰ÎH‰ßÿÒH‰ÅH…íH‰¬$Є5ÅHƒ+„ëOL‰ÿèbýÿH…ÀH‰ÃH‰„$è„IÛH‹?£&H9EHÇ„$øH‰„$…ÐL‹eM…äL‰¤$ø„»L‹uIƒ$IƒHƒmL‰´$ЄؿèŠýÿH…ÀH‰Å„¶ÔL‰eH‰] I‹FHÇ„$øHÇ„$èH‹˜€H…Û„¿L‹%ó¢&I‹$‹BƒÀ‰BH‹ç¢&;Ý1ÒH‰îL‰÷ÿÓH‰ÂI‹$ƒhH…Ò„¶:H‰”$ÈHƒm„XH‹”$ÐHƒ*„nH‹¬$ÈHÇ„$ÐH‹Áâ&H‹EH‹ˆH…É„ÌÓH‰ÖH‰ïÿÑH‰ÃH…ÛH‰œ$ЄOÝHƒm„áŽH‹„$H9CHÇ„$È…lÛL‹sM…öL‰´$È„WÛH‹kIƒHƒEHƒ+H‰¬$ЄúœH‹•¢&H9E…lÑH‹Eö@„^ÑL‹%Æ¡&H‹XH‹mI‹$‹BƒÀ‰BH‹²¡&;*'L‰öH‰ïÿÓH‰ÂI‹$ƒhH…Ò„Ï(H‰”$ØIƒ.„¦“HÇ„$ÈH‹”$ÐHƒ*„a‚H‹„$I9EHÇ„$ЄGH‹œ$ØL‰ïH‰Þè5þÿH…ÀH‰„$à„F*Hƒ+„'HÇ„$ØL‰íHƒm„g›H‹œ$àH‹¬$ðH‰ÞH‰ïèEõýÿ…À……íHÇ„$ð…´.H‹D$XH‹P H‹HH‰ÐHÑøH9ÁŽô|H9Ñë|H‹D$hH‹\$hHƒH‹D$XH‹@H‰ÈH‹\$XHAH‰CH‹(Ö&H‹=±Ú&H‰ÞèýÿH…ÀI‰Å„3HƒI‹UH‹ †Ô&H‹‚H…À„æ”H‰ÎL‰ïÿÐH‰ÃH…ÛH‰œ$Ø„S’Iƒm„ÄfH‹SH‹ Ö&H‹‚H…À„ÅšH‰ÎH‰ßÿÐI‰ÅM…í„ášHƒ+„6gI‹UHÇ„$ØH‹ Õ&H‹‚H…À„åªH‰ÎL‰ïÿÐH‰ÃH…ÛH‰œ$Ø„ó¥Iƒm„8mH‹CH;„$…*sL‹kM…í„sH‹kIƒEHƒEHƒ+H‰¬$Ø„3r¿è¿ÿüÿH…ÀH‰ÃH‰„$à„ÊH‹D$hL‰kHƒH‰C H‹EL‹¨€M…í„{ÌL‹%/’&I‹$‹BƒÀ‰BH‹#’&;Õ1ÒH‰ÞH‰ïAÿÕH‰ÂI‹$ƒhH…Ò„ÍÝH‰”$ðHƒ+„WrHÇ„$àH‹”$ØHƒ*„oqH‹„$8HÇ„$ØH‹œ$ðH‹H H‹PH‰ÈHÑøH9Â޽ÆH9Ê´ÆH‹„$8HƒH‹Œ$8H‹@H‰ÐHBH‰AHƒ+„ÀqHÇ„$ðHƒ|$H‹\$h„_ûÿÿH‹<$H‹D$ÿÐH…ÀH‰„$ð…‹ûÿÿèŒþüÿH…ÀH‰ÂtH‹…‘&H‹H9Â…-!è þüÿH‹$H‹4$H‹H‰D$HƒèH…ÀH‰„DH‰\$hHÇ„$øHÇ„$HÇD$é´æÿÿfL‹fH‰ÕIƒüt.ŽÍ÷ÿÿIƒütIƒü…Í÷ÿÿH‹F(H‰„$ H‹C H‰„$H‹CH‰„$H‰ïè±úüÿIƒüI‰Åt/IƒütMM…äulH‹5ÖÐ&H‰ïIƒíè*ýüÿH…ÀH‰„$„i÷ÿÿH‹5âÒ&H‰ïè ýüÿH…ÀH‰„$„,„IƒíH‹5.Ô&H‰ïèæüüÿH…ÀH‰„$ „ôIƒíM…íŽëáÿÿH„$Ly`H5rŸ&L‰áH‰ïH‰Âè„ûýÿ…À‰¿áÿÿ¸Ô#é#÷ÿÿL‹@H‹‡&H5Ø[H‰ÑH‹81Àè£þüÿHƒmu H‹EH‰ïÿP0fèÛüüÿH…ÀA¿ÿÿÿÿ„¶áÿÿ¸Þ#éÓöÿÿf©„6fH‹CHƒÀHƒøwHSHc‚HÐÿà€H‰ßè˜üüÿHcÐA‰ÇH9ЄYáÿÿHƒøÿuènüüÿH…Àu‰f„H‹&H5Z[H‹8èÊúüÿéeÿÿÿDè;üüÿH…À„_áÿÿ¸ß#é9öÿÿ„HÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pHÇ„$8HÇD$XHÇ„$@Ç„$}%Ç„$HÇD$8HÇD$0E1ÿE1ä1í1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`HÇ„$H‹”$ÈH…Òt Hƒ*„ H‹”$ÐH…Òt Hƒ*„BH‹”$ØH…Òt Hƒ*„;H‹”$àH…Òt Hƒ*„4H‹”$èH…Òt Hƒ*„-H‹”$ðH…Òt Hƒ*„&H‹”$øH…Òt Hƒ*„H…ít Hƒm„M…öt Iƒ.„ Hƒ|$t!H‹D$H‹L$H‹H‰$HƒèH…ÀH‰„M…ät Iƒ,$„Hƒ|$t!H‹D$H‹t$H‹H‰$HƒèH…ÀH‰„îM…ÿt Iƒ/„ïHƒ|$0t!H‹D$0H‹L$0H‹H‰$HƒèH…ÀH‰„ÖHƒ|$8t!H‹D$8H‹t$8H‹H‰$HƒèH…ÀH‰„½‹”$‹´$H (QH=Ù[è âýÿHÇ$Hƒ|$xt"H‹D$xH‹L$xH‹H‰D$HƒèH…ÀH‰„zHƒ¼$@t(H‹„$@H‹´$@H‹H‰D$HƒèH…ÀH‰„WHƒ|$Xt"H‹D$XH‹L$XH‹H‰D$HƒèH…ÀH‰„=Hƒ¼$8t(H‹„$8H‹´$8H‹H‰D$HƒèH…ÀH‰„Hƒ¼$pt(H‹„$pH‹Œ$pH‹H‰D$HƒèH…ÀH‰„÷Hƒ¼$Ht(H‹„$HH‹´$HH‹H‰D$HƒèH…ÀH‰„ÔHƒ|$ht"H‹D$hH‹L$hH‹H‰D$HƒèH…ÀH‰„ºHƒ¼$ðt(H‹„$ðH‹´$ðH‹H‰D$HƒèH…ÀH‰„—Hƒ¼$ht(H‹„$hH‹Œ$hH‹H‰D$HƒèH…ÀH‰„äHƒ¼$Pt(H‹„$PH‹´$PH‹H‰D$HƒèH…ÀH‰„ÁHƒ¼$Xt(H‹„$XH‹Œ$XH‹H‰D$HƒèH…ÀH‰„žHƒ¼$øt(H‹„$øH‹´$øH‹H‰D$HƒèH…ÀH‰„{Hƒ¼$t(H‹„$H‹Œ$H‹H‰D$HƒèH…ÀH‰„XHƒ¼$`t(H‹„$`H‹´$`H‹H‰D$HƒèH…ÀH‰„5Hƒ¼$t(H‹„$H‹Œ$H‹H‰D$HƒèH…ÀH‰„Hƒ¼$ˆt(H‹„$ˆH‹´$ˆH‹H‰D$HƒèH…ÀH‰„ïHƒ¼$Àt(H‹„$ÀH‹Œ$ÀH‹H‰D$HƒèH…ÀH‰„ÌHƒ¼$Èt(H‹„$ÈH‹´$ÈH‹H‰D$HƒèH…ÀH‰„©Hƒ¼$Àt(H‹„$ÀH‹Œ$ÀH‹H‰D$HƒèH…ÀH‰„†Hƒ¼$Øt(H‹„$ØH‹´$ØH‹H‰D$HƒèH…ÀH‰„cHƒ¼$Èt(H‹„$ÈH‹Œ$ÈH‹H‰D$HƒèH…ÀH‰„@Hƒ¼$t(H‹„$H‹´$H‹H‰D$HƒèH…ÀH‰„Hƒ¼$xt(H‹„$xH‹Œ$xH‹H‰D$HƒèH…ÀH‰„úHƒ¼$€t(H‹„$€H‹´$€H‹H‰D$HƒèH…ÀH‰„×Hƒ¼$°t(H‹„$°H‹Œ$°H‹H‰D$HƒèH…ÀH‰„´Hƒ¼$Ðt(H‹„$ÐH‹´$ÐH‹H‰D$HƒèH…ÀH‰„‘Hƒ¼$¸t(H‹„$¸H‹¼$¸H‹H‰D$HƒèH…ÀH‰„nHƒ¼$¨t(H‹„$¨H‹Œ$¨H‹H‰D$HƒèH…ÀH‰„KHƒ¼$ t(H‹„$ H‹´$ H‹H‰D$HƒèH…ÀH‰„(Hƒ¼$˜t(H‹„$˜H‹¼$˜H‹H‰D$HƒèH…ÀH‰„Hƒ¼$èt(H‹„$èH‹Œ$èH‹H‰D$HƒèH…ÀH‰„âHƒ¼$àt(H‹„$àH‹´$àH‹H‰D$HƒèH…ÀH‰„¿Hƒ¼$ t(H‹„$ H‹¼$ H‹H‰D$HƒèH…ÀH‰„œHƒ¼$(t(H‹„$(H‹Œ$(H‹H‰D$HƒèH…ÀH‰„yHƒ¼$°t(H‹„$°H‹´$°H‹H‰D$HƒèH…ÀH‰„VHƒ|$@t"H‹D$@H‹|$@H‹H‰D$HƒèH…ÀH‰„<Hƒ|$pt"H‹D$pH‹L$pH‹H‰D$HƒèH…ÀH‰„"Hƒ|$`t"H‹D$`H‹t$`H‹H‰D$HƒèH…ÀH‰„Hƒ¼$Øt(H‹„$ØH‹¼$ØH‹H‰D$HƒèH…ÀH‰„åHƒ¼$øt(H‹„$øH‹Œ$øH‹H‰D$HƒèH…ÀH‰„ÂHƒ¼$0t(H‹„$0H‹´$0H‹H‰D$HƒèH…ÀH‰„ŸHƒ¼$t(H‹„$H‹¼$H‹H‰D$HƒèH…ÀH‰„|Hƒ¼$t(H‹„$H‹Œ$H‹H‰D$HƒèH…ÀH‰„YHƒ|$Ht"H‹D$HH‹t$HH‹H‰D$HƒèH…ÀH‰„?Hƒ¼$t(H‹„$H‹¼$H‹H‰D$HƒèH…ÀH‰„Hƒ¼$ t(H‹„$ H‹Œ$ H‹H‰D$HƒèH…ÀH‰„ùHƒ|$Pt"H‹D$PH‹t$PH‹H‰D$HƒèH…ÀH‰„ßHƒ¼$àt(H‹„$àH‹¼$àH‹H‰D$HƒèH…ÀH‰„¼Hƒ¼$¨t(H‹„$¨H‹Œ$¨H‹H‰D$HƒèH…ÀH‰„™Hƒ¼$¸t(H‹„$¸H‹´$¸H‹H‰D$HƒèH…ÀH‰„vHƒ¼$t(H‹„$H‹¼$H‹H‰D$HƒèH…ÀH‰„SHƒ¼$˜t(H‹„$˜H‹Œ$˜H‹H‰D$HƒèH…ÀH‰„0Hƒ¼$Ðt(H‹„$ÐH‹´$ÐH‹H‰D$HƒèH…ÀH‰„ Hƒ¼$èt(H‹„$èH‹¼$èH‹H‰D$HƒèH…ÀH‰„ê Hƒ¼$ðt(H‹„$ðH‹Œ$ðH‹H‰D$HƒèH…ÀH‰„Ç Hƒ¼$€t(H‹„$€H‹´$€H‹H‰D$HƒèH…ÀH‰„¤ Hƒ¼$ˆt(H‹„$ˆH‹¼$ˆH‹H‰D$HƒèH…ÀH‰„! Hƒ¼$t(H‹„$H‹Œ$H‹H‰D$HƒèH…ÀH‰„þ Hƒ|$t"H‹D$H‹t$H‹H‰D$HƒèH…ÀH‰„ä Hƒ|$(t"H‹D$(H‹T$(H‹H‰D$HƒèH…ÀH‰„Ê H…Ût Hƒ+„{ H‹D$ H‹L$ H‹$H‹H‰D$HƒèH…ÀH‰…âåÿÿH‹AH‰ÏÿP0éÓåÿÿfDH‹ùÃ&H‹=:Å&H‰Þè ëüÿH…ÀH‰$„)aHƒH‹$H‹-~¼&H‹@H‹˜€H…Û„#lL‹%ã}&I‹$‹BƒÀ‰BH‹×}&;Ïu1ÒH‰îH‹<$ÿÓI‹$ƒjH…À„ðšH‰ÃH‹$H‹<$H‹H‰D$HƒèH…ÀH‰„¿B1Ò1öH‰ßèlþÿHƒ+„šBÇ„$ü%Ç„$-E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$péêîÿÿf.„H‹<$è§èüÿ…À‰Ã‰”ÏÿÿÇ„$ê%Ç„$,E1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$p€Hƒ<$t#H‹$H‹4$H‹H‰„$ HƒèH…ÀH‰„M…í„ÍëÿÿIƒm…ÂëÿÿI‹EL‰ïÿP0é³ëÿÿE1ÿéÂÉÿÿ„D‹{é§Éÿÿ€‹CHÁàH‰Â‹CH ÐHcÐA‰ÇH9ЄÉÿÿé<èÿÿ@‹C÷ØA‰ÇékÉÿÿ‹CHÁàH‰Â‹CH ÐH÷ØHcÐA‰ÇH9ЄFÉÿÿéèÿÿH‹Úv&HƒìL N2jH ù1HGH5GA¸H‹81ÀèØåüÿAY¸Ð#AZé+Þÿÿf.„H‹˜€L‹-š½&H…Û„-zL‹%‚v&I‹$‹xW‰PH‹vv&;ñy1ÒL‰îH‰ïÿÓéßÿÿ€H‹BH‰×ÿP0é¯êÿÿH‹BH‰×ÿP0é¶êÿÿH‹BH‰×ÿP0é½êÿÿH‹BH‰×ÿP0éÄêÿÿH‹BH‰×ÿP0éËêÿÿH‹BH‰×ÿP0éÒêÿÿH‹EH‰ïÿP0éÒêÿÿI‹FL‰÷ÿP0éÑêÿÿH‹AH‰ÏÿP0éêêÿÿI‹D$L‰çÿP0ééêÿÿH‹FH‰÷ÿP0éëÿÿI‹GL‰ÿÿP0éëÿÿH‹AH‰ÏÿP0éëÿÿH‹FH‰÷ÿP0é4ëÿÿH‹AH‰ÏÿP0éwëÿÿH‹FH‰÷ÿP0éšëÿÿH‹AH‰ÏÿP0é´ëÿÿH‹FH‰÷ÿP0é×ëÿÿH‹AH‰ÏÿP0éúëÿÿH‹FH‰÷ÿP0éìÿÿH‹AH‰ÏÿP0é7ìÿÿH‹FH‰÷ÿP0éZìÿÿH‹CH‰ßÿP0évöÿÿH‹GÿP0éÓõÿÿ@H‹AH‰ÏÿP0éóõÿÿH‹FH‰÷ÿP0é öÿÿH‹BH‰×ÿP0é'öÿÿH‹BH‰×ÿP0éèèÿÿH‹FH‰÷ÿP0éëüÿÿH‹AH‰ÏÿP0é ìÿÿH‹FH‰÷ÿP0é0ìÿÿH‹AH‰ÏÿP0éSìÿÿH‹FH‰÷ÿP0évìÿÿH‹AH‰ÏÿP0é™ìÿÿH‹FH‰÷ÿP0é¼ìÿÿH‹AH‰ÏÿP0éßìÿÿH‹FH‰÷ÿP0éíÿÿH‹AH‰ÏÿP0é%íÿÿH‹FH‰÷ÿP0éHíÿÿH‹AH‰ÏÿP0ékíÿÿH‹FH‰÷ÿP0éŽíÿÿH‹AH‰ÏÿP0é±íÿÿH‹FH‰÷ÿP0éÔíÿÿH‹AH‰ÏÿP0é÷íÿÿH‹FH‰÷ÿP0éîÿÿH‹AH‰ÏÿP0é=îÿÿH‹FH‰÷ÿP0é`îÿÿH‹GÿP0é†îÿÿ@H‹AH‰ÏÿP0é¦îÿÿH‹FH‰÷ÿP0éÉîÿÿH‹GÿP0éïîÿÿ@H‹AH‰ÏÿP0éïÿÿH‹FH‰÷ÿP0é2ïÿÿH‹GÿP0éXïÿÿ@H‹AH‰ÏÿP0éxïÿÿH‹FH‰÷ÿP0é›ïÿÿH‹GÿP0é¸ïÿÿ@H‹AH‰ÏÿP0éÏïÿÿH‹FH‰÷ÿP0ééïÿÿH‹GÿP0éðÿÿ@H‹AH‰ÏÿP0é/ðÿÿH‹FH‰÷ÿP0éRðÿÿH‹GÿP0éxðÿÿ@H‹AH‰ÏÿP0é˜ðÿÿH‹FH‰÷ÿP0é²ðÿÿH‹GÿP0éØðÿÿ@H‹AH‰ÏÿP0éøðÿÿH‹FH‰÷ÿP0éñÿÿH‹GÿP0é8ñÿÿ@H‹AH‰ÏÿP0éXñÿÿH‹FH‰÷ÿP0é{ñÿÿH‹GÿP0é¡ñÿÿ@H‹AH‰ÏÿP0éÁñÿÿH‹FH‰÷ÿP0éäñÿÿH‹GÿP0é òÿÿ@H‹AH‰ÏÿP0é*òÿÿH‹FH‰÷ÿP0éMòÿÿH‹$HÇD$HƒHÇ„$ÀéæÚÿÿfDH;œ$ u 1í„À…2ÝÿÿH;Œ$ u 1í„Ò…ÝÿÿºH‰ÎH‰ßèÜüÿH…ÀI‰Ä„çíH;Uq&”ÂH;£p&”ÀÐuL;¤$ …6{I‹$‰ÕƒåHƒèH…ÀI‰$…ÂÜÿÿI‹D$L‰çÿP0…퉯ÜÿÿÇ„$«(Ç„$DE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé‡öÿÿ€HÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pHÇ„$8HÇ„$@Ç„$’%Ç„$#é”ßÿÿ@HÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pHÇ„$8Ç„$ž%Ç„$$éÈÝÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pÇ„$ª%Ç„$%é Üÿÿ@I‹EL‰ïÿP0é!ÑÿÿH‹CH‰ßÿP0éμÿÿÇ„$¶%Ç„$'HÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pé,Úÿÿ@H‹CH‰ßÿP0é_Ðÿÿf„I‹EL‰ïÿP0é^ºÿÿI‹FL‰÷ÿP0éºÎÿÿH‹PH‰ÇÿR0é”ÎÿÿH‹CH‰ßÿP0é2ÑÿÿH ‰,H=R6º+¾ $èc½ýÿHƒ+u H‹CH‰ßÿP0Ç„$Õ%Ç„$+é›üÿÿDH‹-Á§&H‹=J¬&H‰îèÒüÿH…ÀH‰Ã„ÍHƒH‰„$ðH‹SH‹ ¦&H‹‚H…À„ÔŽH‰ÎH‰ßÿÐI‰ÅM…í„áŽHƒ+„ÁAH‹5¢¥&L‰ïHÇ„$ðèþÐüÿ…À‰ÃˆZ—Iƒm„—Dƒû…¬ÐÿÿH‹!§&H‹=ª«&H‰ÞèzÑüÿH…ÀI‰Å„KHƒI‹UH‹ o¥&H‹‚H…À„UH‰ÎL‰ïÿÐH‰ÃH…ÛH‰œ$ð„ïUIƒm„Ÿ7H‹5¥&H‰ßè9ÐüÿH…ÀI‰Å„_Hƒ+„‰7I‹EH;D$(HÇ„$ð„x H;¹d&„k H‹D$L‰ïH‰„$H‹D$@H‰„$H‹D$HH‰„$ H‹D$PH‰„$(H„$èH‰„$0H„$ÐH‰„$8H„$ØH‰„$@èÒüÿH…ÀH‰Å„…Iƒm„ŠH‹E1ÛL‹ àH‰ïAÿÔH…À„|ÙH‹”ÜHƒÃHƒûH‰uÜH‰ïAÿÔH…À…¥ßè¶ýÿ…Àˆz§H‹EH‹œ$èHƒèH…ÀH‰E„‡ZfDH‹©b&H9C„÷6H‰ßèßÐüÿòD$`ò\$`f.38z„êzHƒ+„F:H‹œ$ÐH‹bb&HÇ„$èH9C„´6H‰ßèŒÐüÿòD$pòd$pf.%à7z„‡Hƒ+„:H‹œ$ØH‹b&HÇ„$ÐH9C„9H‰ßè9Ðüÿò„$ˆò¬$ˆf.-‡7z„N‰Hƒ+„~<Hƒ¼$`H‹„$ðHÇ„$ØH‰D$0t(H‹„$`H‹œ$`H‹H‰D$8HƒèH…ÀH‰„š>Hƒ¼$hH‹„$øHÇ„$ðH‰D$8t+H‹„$hH‹œ$hH‹H‰„$€HƒèH…ÀH‰„>Hƒ¼$PH‹„$àHÇ„$øH‰„$€t+H‹„$PH‹œ$PH‹H‰„$HƒèH…ÀH‰„Û=Hƒ¼$XH‹„$ÈHÇ„$àH‰„$˜t+H‹„$XH‹œ$XH‹H‰„$HƒèH…ÀH‰„˜=H‹D$0H; a&HÇ„$È”ÂH;L`&”ÀÐuH‹„$ H9D$0…=8¶Â…À…;H‹D$hH‹œ$ðHƒH‹„$ðH‹H‰„$HƒèH…ÀH‰„FAH‹D$8H‹  &H‹PH‹‚H…À„±¨H‰ÎH‹|$8ÿÐH‰ÅH…íH‰¬$؄ҥH‹EH;„$…÷oL‹mM…íL‰¬$ЄâoH‹]IƒEHƒHƒmH‰œ$Ø„È^H‹D$H9C…4ŒH‹Cö@„&ŒL‹%ª_&H‹hH‹[I‹$‹BƒÀ‰BH‹–_&;y¿L‰îH‰ßÿÕH‰„$hI‹$ƒhHƒ¼$h„\ÉIƒm„õ`HÇ„$ÐH‹”$ØHƒ*„®SH‹D$8H‹\$8HÇ„$ØH‹H‰„$HƒèH…ÀH‰„nSH‹„$€H‹ >Ÿ&H‹PH‹‚H…À„º³H‰ÎH‹¼$€ÿÐH‰ÅH…íH‰¬$Ø„i­H‹EH;„$HÇ„$Ð…ûL‹mM…íL‰¬$ЄæH‹]IƒEHƒHƒmH‰œ$Ø„SnH‹D$H9C…nžH‹Cö@„`žL‹%J^&H‹hH‹[I‹$‹BƒÀ‰BH‹6^&;·ÎL‰îH‰ßÿÕH‰„$PI‹$ƒhHƒ¼$P„ïIƒm„”‚HÇ„$ÐH‹”$ØHƒ*„GhH‹„$€H‹œ$€HÇ„$ØH‹H‰D$8HƒèH…ÀH‰„deH‹„$˜H‹ Û&H‹PH‹‚H…À„n³H‰ÎH‹¼$˜ÿÐH‰ÅH…íH‰¬$Ø„Á¸H‹EH;„$HÇ„$Ð… šL‹mM…íL‰¬$Є šH‹]IƒEHƒHƒmH‰œ$Ø„¢H‹D$H9C…¬¥H‹Cö@„ž¥L‹%ç\&H‹hH‹[I‹$‹BƒÀ‰BH‹Ó\&;éL‰îH‰ßÿÕH‰„$XI‹$ƒhHƒ¼$X„ÝIƒm„®‘HÇ„$ÐH‹”$ØHƒ*„A†H‹„$˜H‹œ$˜HÇ„$ØH‹H‰D$8HƒèH…ÀH‰„þ…H‹øœ&H‹=I£&H‰ÞèÉüÿH…ÀH‰Å„ÂHƒH‰„$ØòD$`èÆÈüÿH…ÀH‰D$8H‰„$Є×ÈòD$pè¥ÈüÿH…ÀI‰ÅH‰„$è„1Ûò„$ˆèƒÈüÿH…ÀI‰ÆH‰„$È„eüIcÇH‰ÇèTÊüÿH…ÀH‰D$`H‰„$à„°ùH‹„$H9EHÇ„$ø„Ž.E1äID$H‰Çè°ÈüÿH…ÀH‰ÃH‰„$ð„Ö+H‹„$øH…ÀtH‰CHÇ„$øH‹„$hH‹´$hH‹L$8H‹¬$ØHÇ„$ÐHÇ„$èHƒJãHÇ„$ÈHÇ„$àH‰pH‹´$PHƒH‰p H‹´$XHƒH‰p(H‹t$`L‰h8H‰H0L‰p@H‰pHH‹EL‹¨€M…í„HL‹%†Z&I‹$‹BƒÀ‰BH‹zZ&;Í81ÒH‰ÞH‰ïAÿÕI‰ÅI‹$ƒhM…í„ÃIHƒ+„!°HƒmHÇ„$ð„Ò¯I‹EH;D$(HÇ„$Ø„PKH;ÐZ&„CKL‰ïèšÈüÿH…ÀH‰ÅH‰„$à„!æIƒmu I‹EL‰ïÿP0H‹EH‰ïH‹˜àÿÓH…ÀH‰„$Ø„ûâH‰ïÿÓH…ÀH‰„$ð„¡H‰ïÿÓH…À…ò è{¬ýÿ…ÀˆC7Hƒmu H‹EH‰ïÿP0H‹œ$ðHÇ„$àH;œ$ H‹C„ÓMH; Z&„ÆMH‹@HlH5ÑE1íE1ÿE1äE1ö1í1ÛH‰ÁH‹Y&H‹81Àè)ÈüÿH‹D$0Ç„$ó)Ç„$KHÇD$8HÇD$0HÇD$H‰„$`H‹D$hHÇD$HÇD$(HÇD$HÇ„$H‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÅÞÿÿDI‹UHƒú…û`H;D$(I‹E…œvH‰„$ðI‹E H‰„$øI‹E(H‰„$àI‹E0H‰„$ÈI‹E8H‰„$èI‹E@H‰„$ÐI‹EHH‰„$ØH‹„$ðH‹œ$èHƒH‹„$øHƒH‹„$àHƒH‹„$ÈHƒH‹„$ÐHƒHƒH‹„$ØHƒIƒm…¼òÿÿI‹EL‰ïÿP0H‹œ$èé¥òÿÿDH‹CH‰ßÿP0éÁÿÿf„I‹EL‰ïÿP0é„ÀÿÿH‹EH‰ïÿP0éìÀÿÿH‹AH‰ÏÿP0éxªÿÿH;D$…õVI‹UöB„çVL‹%0U&H‹ZI‹mI‹$‹BƒÀ‰BH‹U&;”£1öH‰ïÿÓH‰ÂI‹$ƒhH…Ò„™­H‰”$ðL‰ëéxÀÿÿH‰îH‰ßèµÇýÿH…ÀH‰„$ð…DÀÿÿI‰ÝÇ„$¤(Ç„$DHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péŠÚÿÿf.„¶q$@8s$… ¾ÿÿHƒø„HHq$HK$H‰Â1íH‰Ïèó¾üÿ…À@”Åéö½ÿÿ„H‰ßèHÂýÿH…ÀI‰Æ…ÃHÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pÇ„$<(Ç„$@é[ÃÿÿH‹Q@H…Ò„•£HƒÀ$éC¸ÿÿf.„Ç„$>(Ç„$@HÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pé¦Õÿÿ@HÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pÇ„$×%Ç„$+HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`HÇ„$é¤Òÿÿ@HÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pÇ„$—(Ç„$DHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé)Ðÿÿf„H‹R@H…Ò„ ›HA$H‹|$hH‰ÆÿÒI‰Åé|²ÿÿDÇ„$¡*Ç„$^E1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$pé–ÍÿÿfD1ÒL‰îH‰ßèC´üÿH…ÀH‰„$H…Ä™ÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pÇ„$Ü%Ç„$+HÇD$8HÇD$0E1ÿE1ä1í1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`HÇ„$éÔÊÿÿf.„L‹mM…í„¿ªÿÿH‹]IƒEHƒHƒmH‰œ$ð„•LH‹ÜB&H9CH‰D$uqH‹Cö@tgL‹%B&H‹hH‹[I‹$‹pV‰PH‹üA&;ÕL‰îH‰ßÿÕI‰ÆI‹$ƒhM…ö„SIƒm…ªÿÿI‹EL‰ïÿP0鎪ÿÿfDL‰îH‰ßè…´ýÿH…ÀI‰ÆuÍHÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pÇ„$L(Ç„$@é]üÿÿ@½éÄ«ÿÿfDH9GŽÊ®ÿÿH‹DÇH‰„$ðHƒHƒ„$Àéªÿÿ€L‰ï設üÿ…À‰Ã‰ •ÿÿÇ„$&Ç„$.E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pé0ÅÿÿfDH=ùèä©üÿ…À„‘ÿÿ@Ç„$Ü%Ç„$+é“ìÿÿDHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pÇ„$é%Ç„$,é®ÿÿH‹CH‰ßÿP0éW½ÿÿH‹GÿP0é5½ÿÿH‹D$ H‹©{&H‹@H‹pH‹ŽH…É„šH‰ÖH‰ÇÿÑI‰ÅM…í„›˜H‹>:&I‹EH9ØH‰\$(„H;-;&„ó L‰ïHÇ„$Àÿÿÿÿèë¨üÿH…ÀH‰$„h¼H‹@H‹€àH…ÀH‰D$„‡¹Iƒm„«ZIcÇHÇ„$HÇ„$øHÇ„$XHÇ„$P1ÛHÇ„$hHÇD$0H‰D$Hƒ|$…ÌŽH‹$H‹5|:&H9pH‹„$À…yœH‹ $H9AŽßŽH‹QH‹ÂH‰D$hHƒHƒ„$ÀH…Ût Hƒ+„AIH‹D$hH‹ ï|&H‹PH‹‚H…À„‹”H‰ÎH‹|$hÿÐI‰ÅM…í„YL;¬$(”ÂL;¬$0”ÀÐu L;-L9&…NF¶ÚIƒm„ Y…Û„úH‹D$hH‹ ´|&H‹PH‹‚H…À„&H‰ÎH‹|$hÿÐH‰ÂH…ÒH‰”$È„rüH‹[8&H9BHÇ„$ÐH‰„$…U¡H‹jH…íH‰¬$Є@¡H‹ZHƒEHƒHƒ*H‰œ$È„'˜H‹ 9&H9C…¼H‹Cö@„¼L‹%;8&L‹hH‹[I‹$‹BƒÀ‰BH‹'8&;wAH‰îH‰ßAÿÕH‰„$ðI‹$ƒhHƒ¼$ð„bHƒm„¸HÇ„$ÐH‹”$ÈHƒ*„Í•Hƒ|$0HÇ„$Èt"H‹D$0H‹\$0H‹H‰D$HƒèH…ÀH‰„‚1ÿ虡üÿH…ÀI‰Å„]!E1ÿH‹D$hH‹ žx&H‹PH‹‚H…À„¤ÚH‰ÎH‹|$hÿÐH‰ÃH…ÛH‰œ$Ø„ÑH‹SH‹ {&H‹‚H…À„×ÿH‰ÎH‰ßÿÐH‰ÅH…íH‰¬$à„DýHƒ+„ù‹L‰ÿ裥üÿH…ÀI‰ÄH‰„$Ø„¶ÿH‹„$H9EHÇ„$è… H‹]H…ÛH‰œ$è„j L‹uHƒIƒHƒmL‰´$à„q–¿èÓ£üÿH…ÀH‰ÅH‰„$ð„© H‰]L‰e I‹FHÇ„$èHÇ„$ØH‹˜€H…Û„|(L‹%46&I‹$‹BƒÀ‰BH‹(6&;Ë-1ÒH‰îL‰÷ÿÓH‰ÂI‹$ƒhH…Ò„ßbH‰”$ÐHƒm„ÈžHÇ„$ðH‹”$àHƒ*„ž•H‹¬$ÐHÇ„$àH‹ öu&H‹UH‹‚H…À„DH‰ÎH‰ïÿÐH‰ÃH…ÛH‰œ$à„ŒAHƒm„3šH‹„$H9CHÇ„$Ð…ÜL‹sM…öL‰´$ЄûÛH‹kIƒHƒEHƒ+H‰¬$à„߸H‹Ê5&H9E…H‹Eö@„‚L‹%û4&H‹XH‹mI‹$‹BƒÀ‰BH‹ç4&;]L‰öH‰ïÿÓH‰ÂI‹$ƒhH…Ò„ÍWH‰”$ÈIƒ.„»HÇ„$ÐH‹”$àHƒ*„ä§I‹EI;E HÇ„$àH‹œ$ÈW!HƒI‹UH‰ÂHƒÀI‰EHƒ+„ʺIƒÇHÇ„$ÈIƒÿ…·üÿÿI‹uHƒþ…†I‹EH‹L‹xH‰\$0H‰œ$ÈH‹XH‹D$0L‰¼$ÐHƒH‰\$8HƒH‰œ$àIƒIƒm„Hƒ¼$ht(H‹„$hH‹œ$hH‹H‰D$HƒèH…ÀH‰„BˆHƒ¼$PHÇ„$Èt(H‹„$PH‹œ$PH‹H‰D$HƒèH…ÀH‰„,Hƒ¼$XHÇ„$àt(H‹„$XH‹œ$XH‹H‰D$HƒèH…ÀH‰„aÔH‹5öw&H‹|$hèÔˆýÿH…ÀI‰ÄH‰„$Є ÑH‹5)t&H‹|$h诈ýÿH…ÀH‰ÃH‰„$à„ßÎH‹5´v&H‰Ç茈ýÿH…ÀH‰ÅH‰„$È„ ÌHƒ+„ÌH‹5q&1ÒH‰ïè}‡ýÿH…ÀH‰D$H‰„$à„DÉHƒm„*ÉH‹5¥s&H‹|$hè+ˆýÿH…ÀH‰ÃH‰„$È„iÆH‹50v&H‰ÇèˆýÿH…ÀH‰ÅH‰„$ð„FHƒ+„þEH‹5“p&1ÒH‰ïèù†ýÿH…ÀI‰ÆH‰„$È„=CHƒm„#CH‹5#s&H‹|$h詇ýÿH…ÀH‰ÃH‰„$ð„b@H‹5®u&H‰Ç膇ýÿH…ÀH‰ÅH‰„$Ø„£=Hƒ+u H‹CH‰ßÿP0H‹5p&1ÒH‰ïèq†ýÿH…ÀI‰ÅH‰„$ð„Ò:Hƒmu H‹EH‰ïÿP0H‹„$I9D$HÇ„$Ø…›:I‹D$H…ÀH‰„$Ø„…:I‹T$Hƒ½HƒI‹$H‰”$ÐHƒèH…ÀI‰$u I‹D$L‰çÿP0HEH‰ÇèEžüÿH…ÀH‰ÃH‰„$脵¤H‹„$ØH…ÀtH‰CHÇ„$ØHëH‹t$H‹¬$Ð1ÒHÇ„$àHÇ„$ÈL‰p L‰h(H‰pH‰ïH‰ÞHÇ„$ðèV…ýÿH…ÀI‰Æ„¥¡Hƒ+u H‹CH‰ßÿP0HƒmHÇ„$èu H‹EH‰ïÿP0Hƒ¼$øHÇ„$Ðt.H‹„$øH‹œ$øH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP01ÿèšüÿH…ÀI‰Å„ÊLE1äëmL‰æH‰Çè¤üÿH…ÀH‰ÅH‰„$è„JHƒ+„ìIH‰îL‰ïHÇ„$Ðè„ýÿ…À…-OHƒm„OIƒÄHÇ„$èIƒü„ÇH‹5lo&L‰÷è$…ýÿH…ÀH‰ÃH‰„$Ð…pÿÿÿH‹D$8L‰´$øE1äL‰¼$XÇ„$('E1ÿÇ„$7HÇD$8E1öH‰„$PH‹D$01íHÇD$0HÇD$1ÛHÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péï´ÿÿ€I‹EL‰ïÿP0é"‚ÿÿI‹EL‰ïÿP0éRÈÿÿH‹CH‰ßÿP0éhÈÿÿI‹EL‰ïÿP0é-™ÿÿIƒEL‰,$HÇ„$ÀHÇD$é$òÿÿf„è«™üÿH…À…çÿÿH‹Ã+&H5„òH‹8è ˜üÿéoïÿÿH=Pòè;™üÿ…À„êÿÿÇ„$L(éëÛÿÿòsòt$`éÉÿÿò{ò|$péJÉÿÿH‹CH‰ßÿP0默ÿÿH=úñèå˜üÿ…À„—ÿÿDHÇ„$ðI‰ÝÇ„$¤(Ç„$DHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péb±ÿÿòsò´$ˆé߯ÿÿ©€…„3H‹B`H…À„®~Hƒ¸„nH‰ßè—üÿH7ãH‰ÅH…í„…~H‹EH‰ëH÷€¨€„™ÿÿH‹CH‹¨÷€„‘H‹CHcÐA‰ÇH9Ð…Ø‘Hƒ+…ÒzÿÿH‹CH‰ßÿP0éÃzÿÿH‹CH‰ßÿP0é«ÅÿÿH‹CH‰ßÿP0éïÅÿÿH‹|$0è[–üÿ…À‰´ÇÿÿH‹D$0Ç„$.)E1íÇ„$FHÇD$0E1ÿHÇD$HÇD$E1äH‰„$`H‹„$˜E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$XH‹„$€HÇ„$ðHÇ„$€HÇ„$èHÇ„$ÐH‰„$PH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$¸H‰„$hHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÏ­ÿÿH‹CH‰ßÿP0ésÃÿÿI‹EL‰ïÿP0é¹’ÿÿH‹=ze&1öès–ýÿH…ÀI‰Æ„¢Hƒ¼$t(H‹„$H‹œ$H‹H‰D$`HƒèH…ÀH‰„ÅmI‹VH‹ 1e&H‹‚H…À„˾H‰ÎL‰÷ÿÐI‰ÅM…í„þ»I‹EH‹-Jc&H‹˜€H…Û„AàL‹%Ó$&I‹$‹BƒÀ‰BH‹Ç$&;Ý1ÒH‰îL‰ïÿÓH‰ÂI‹$ƒhH…Ò„ H‰”$ðH‰ÓIƒm„pHƒ+„pH‹D$XHÇ„$ðH‹H H‹PH‰ÈHÑøH9ÂŽ[ÓH9ÊRÓH‹D$hH‹\$hHƒH‹D$XH‹@H‰ÐH‹\$XHBH‰CH‹„$8H‹P H‹HH‰ÐHÑøH9ÁŽ€H9ÑwH‹„$ H‹œ$ HƒH‹„$8H‹@H‰ÈH‹œ$8HAH‰CH‹D$0L‰´$H‰„$`H‹„$˜H‰„$XH‹„$€H‰„$PH‹D$8H‰„$hé/’ÿÿèèüÿH…À…ÒáÿÿH‹#&H5ÁéH‹8èIüÿéT÷ÿÿH‹CH‰ßÿP0éÓÁÿÿH‹CH‰ßÿP0éÂÿÿH‹CH‰ßÿP0éYÂÿÿH‹CH‰ßÿP0éWÁÿÿH‹CH‰ßÿP0é0¾ÿÿètüÿH…À„‹HÇ„$ðI‰ÝÇ„$¤(Ç„$DHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$p鵨ÿÿDH‹ &H5ÂæH‹8èJŒüÿé­ôÿÿH‹BH‰×ÿP0邎ÿÿH‹CH‰ßÿP0é¾ÿÿH‹$HÇ„$ˆHƒHÇ„$ÀéŒyÿÿI‹EL‰ïÿP0éZ»ÿÿH‹SHƒú…ïÑH;D$(H‹C…ÄÑH‰„$ØH‹C H‰„$àH‹„$ØHƒH‰D$0H‹„$àHƒHƒ+„kHÇ„$ðépzÿÿH‹CH‰ßÿP0é1ŽÿÿH‹CH‰ßÿP0éšÿÿH;D$…ˆ™H‹Cö@„z™L‹%\&H‹hH‹[I‹$‹BƒÀ‰BH‹H&;ŠH‹t$hH‰ßÿÕH‰ÂI‹$ƒhH…Ò„ù8H‰”$ðé7ÿÿH‹CH‰ßÿP0髾ÿÿH‹D$hH‹ a&H‹PH‹‚H…À„sâH‰ÎH‹|$hÿÐH‰ÅH…íH‰¬$ø„ÎßH‹EH‹ }b&H‹H…Ò„ÝùH‰ÎH‰ïÿÒH‰ÃH…ÛH‰œ$ð„:÷Hƒm„“tH‹&H9CHÇ„$ø…Z­L‹kM…íL‰¬$ø„E­H‹kIƒEHƒEHƒ+H‰¬$ð„݆H‹Õ&H9E…‰²H‹Eö@„{²L‹%&H‹XH‹mI‹$‹BƒÀ‰BH‹ò&;™L‰îH‰ïÿÓI‰ÆI‹$ƒhM…ö„íPIƒm„×HÇ„$øH‹”$ðHƒ*„e€H‹„$8HÇ„$ðH‹H H‹PH‰ÈHÑøH9ÂŽHH9Ê?H‹„$8IƒH‹œ$8H‹@L‰4ÐHBH‰CIƒ.„ƒH‹D$XH‹P H‹HH‰ÐHÑøH9ÁŽ H9ÑH‹D$hH‹\$hHƒH‹D$XH‹@H‰ÈH‹\$XHAH‰CH‹\$héãÿÿH‰ßè,ýÿH…ÀH‰$…ÆžÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pÇ„$õ%Ç„$-éGŽÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pÇ„$&Ç„$.é—ŒÿÿH‰ßè·‰ýÿH…ÀI‰ÆI‰Å…Þ´ÿÿHÇD$HÇD$E1ÿHÇD$(HÇD$E1äHÇ„$HÇ„$ˆ1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pÇ„$Å(Ç„$EHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé$ŸÿÿH‹t$hH‹|$Xèõƒüÿƒøÿ…%ƒÿÿÇ„$Z*Ç„$TE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé’œÿÿH‰ßèš„ýÿH…ÀI‰ÆI‰Å…º€ÿÿHÇD$HÇD$E1ÿHÇD$(HÇD$E1äHÇ„$HÇ„$ˆ1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pÇ„$c*Ç„$UHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéšÿÿH‹<$1ÒH‰îè¹€üÿH…ÀH‰Ã…”ÿÿÇ„$÷%Ç„$-E1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pé"—ÿÿfH‹R@H…Ò„,êHA$L‰ïH‰ÆÿÒH‰ÃékªÿÿI‹UHƒú… óH;D$(I‹E…= H‰„$ØI‹E H‰„$ðH‹„$ØH‹œ$ðHƒHƒIƒm… µÿÿI‹EL‰ïÿP0H‹œ$ðéö´ÿÿÇ„$Ç(Ç„$EE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé”ÿÿH‹Æ &HƒìL :ÇjH åÆHkÜH5üÛA¸H‹81ÀèÄzüÿA[¸Ë#[ésÿÿH‹CH‰ßÿP0郬ÿÿH‹BH‰×ÿP0éC¬ÿÿHƒ¼$H‹¬$Øt(H‹„$H‹Œ$H‹H‰D$8HƒèH…ÀH‰„qH‹„$@H‹¼$@HÇ„$ØH‹H‰D$8HƒèH…ÀH‰„¨oH‹|$xH‰îHÇ„$ðè‘uüÿH…ÀI‰Å„$òL;¬$ H‹@„ H;” &„ÿH‹@HóÅH5XÅE1ÿE1äE1öH‰ÁH‹‘ &H‹81Àè·yüÿH‹D$0H‰¬$1íH‰œ$@Ç„$*1ÛÇ„$LHÇD$8H‰„$`H‹D$hHÇD$0HÇD$HÇD$HÇD$(H‰„$ðHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé?ÿÿ€H=1Îèuüÿ…À„Šÿÿ@Ç„$÷%Ç„$-E1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$péUÿÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pÇ„$Ê(Ç„$EHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéÞŠÿÿH‹<$è¥püÿ…À‰.ZÿÿÇ„$¹*Ç„$`HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éFuÿÿH‹EH‰ïÿP0é)¡ÿÿÇ„$e*Ç„$UE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÀ†ÿÿH‹R@H…Ò„n HA$L‰ïH‰ÆÿÒH‰ÃékÿÿI‹EL‰ïÿP0éüžÿÿH‹˜€H‹-JE&H…Û„ß L‹%2þ%I‹$‹BƒÀ‰BH‹&þ%;˜ù1ÒH‰îL‰ïÿÓH‰ÂI‹$ƒhH…Ò…©ÿÿècküÿH…À„ŠHÇ„$ðÇ„$§(E1ÿÇ„$DHÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$p駃ÿÿ€H‹ñú%H5²ÁH‹8è:güÿHÇ„$ðÇ„$§(E1ÿÇ„$DHÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÿÿH‹D$xH‹L$xH‹H‰D$8HƒèH…ÀH‰„O]H‹D$0ò¼$ˆH‰¬$H‰œ$@ò¼$°L‰l$xH‰„$`H‹D$hH‰„$ðégÿÿH‹R@H…Ò„ÈïHA$H‰ßH‰ÆÿÒI‰Åé%eÿÿH‹CH‰ßÿP0éšÿÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pÇ„$h*Ç„$UHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øéø}ÿÿL‰çèÀcüÿIƒ,$‰Å…Ú„ÿÿéÊ„ÿÿH‹EH‰ïÿP0é\³ÿÿH‹BH‰×ÿP0骗ÿÿHƒéÁÌÿÿ iH…Òˆ{ÃH Ô®HɰHƒúH57ÃHDÁE1ÿE1äH‰ÁH‹#õ%E1ö1í1ÛH‹81ÀèJdüÿÇ„$×(Ç„$EHÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé{ÿÿL‰ïèÈ`üÿ…À‰Ã‰£¹ÿÿH‹D$0Ç„$Q&E1ÿÇ„$1HÇD$8E1äHÇD$0HÇD$E1öH‰„$ðHÇD$1íHÇD$(HÇD$1ÛHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péjxÿÿH‹CH‰ßÿP0é°¶ÿÿH‹EH‰ïÿP0éž‘ÿÿH;D$…ÑH‹UöB„ ÑL‹%ìï%H‹ZH‹mI‹$‹BƒÀ‰BH‹Øï%;!1öH‰ïÿÓH‰„$hI‹$ƒhHƒ¼$h…Zÿÿè ]üÿH…À„ߘH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹„$˜E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$S)Ç„$JH‰„$PH‹D$hHÇD$0HÇ„$€HÇ„$ðHÇ„$èH‰„$ðH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$0H‰„$hHÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéuÿÿÇ„$k*Ç„$UE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé™rÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$pÇ„$Ÿ*Ç„$^HÇD$8HÇD$0E1ÿE1ä1í1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé:\ÿÿH‹R@H…Ò„ßHA$L‰ïH‰ÆÿÒH‰ÃéUÿÿèDUüÿH…À„…ÿÿÇ„$)Ç„$EE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé‘mÿÿH‰ïè™UýÿH…ÀH‰ÃH‰„$ð…#€ÿÿÇ„$²(Ç„$DE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péûjÿÿè&PüÿH…À„ËÇ„$÷%Ç„$-E1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pé"hÿÿH‹sß%H54¦H‹8è¼Küÿéç×ÿÿH‹H‰”$ðH‹PH‰”$øH‹PH‰”$àH‹PH‰”$ÈH‹P H‰”$èH‹P(H‹@0H‰”$ÐH‰„$Øé\‰ÿÿI‹EL‰ïÿP0éF¥ÿÿI‹EL‰ïÿP0éQ¦ÿÿH‹’!&H‹=[&&H‰Þè+LüÿH…ÀI‰Å„ñâHƒI‹EH‹ ˜$&H‹H…Ò„ÑøH‰ÎL‰ïÿÒH…ÀH‰„$È„÷Iƒm„Y‚1ÿèõHüÿH…ÀI‰Å„gûH‹-¢"&H‹=ã%&H‰îè³KüÿH…ÀH‰Ã„õHƒH‰„$àH‹CH‹h!&H‹ˆH…É„ÒôH‰ÖH‰ßÿÑI‰ÆM…öL‰´$Ø„£üHƒ+„IËè¥LüÿH…ÀH‰ÃH‰„$à„!þH‹T$0H‹5M&H‰ÇèýLüÿ…Àˆ¥TI‹FL‹=2%&H‹¨€H…í„®jL‹%Þ%I‹$‹BƒÀ‰BH‹Þ%;ÊhH‰ÚL‰þL‰÷ÿÕH‰ÂI‹$ƒhH…Ò„_yH‰”$ÐH‰ÕIƒ.„“ÊHƒ+HÇ„$Ø„nÊH‰ïèÅKüÿH…ÀH‰ÃH‰„$à„bwHƒm„ýâH‹SHÇ„$ÐH‹‚¨©€„MH‹CH‰D$Hƒ|$ÿ„õâH‹”$àHƒ*„ ãHƒ|$HÇ„$àŽ)bÇD$HE1äH‹-ã &H‹=$$&H‰îèôIüÿH…ÀH‰Ã„MHƒH‰„$àH‹CH‹©&H‹ˆH…É„[H‰ÖH‰ßÿÑI‰ÆM…öL‰´$ЄžHƒ+„°L‰çèSKüÿH…ÀH‰ÃH‰„$à„0ñ¿èÕIüÿH…ÀI‰ÇH‰„$Ø„oJH‰Xè¨JüÿH…ÀH‰ÃH‰„$à„±HH‹T$0H‹5P&H‰ÇèKüÿ…Àˆ_I‹FH‹¨€H…í„ÈFL‹%Ü%I‹$‹BƒÀ‰BH‹Ü%;ŒFH‰ÚL‰þL‰÷ÿÕH‰ÅI‹$ƒhH…í„ CIƒ.„1ÖIƒ/HÇ„$Є ÖHƒ+HÇ„$Ø„ÖH‰îL‰ïHÇ„$àè0ýÿ…À…v_Hƒmu H‹EH‰ïÿP0ƒD$HLcd$HL;d$ŒMþÿÿéf`fI‹EL‰ïÿP0é]}ÿÿè¼HüÿH…À„ÓxÿÿÇ„$)Ç„$EE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé aÿÿè4FüÿH…À„¤vÿÿÇ„$)Ç„$EE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé^ÿÿH‹CH‰ßÿP0éóyÿÿH‹BH‰×ÿP0é°yÿÿH‹R@H…Ò„èHA$H‰ßH‰ÆÿÒI‰ÅéqÿÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pÇ„$´(Ç„$DHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéË[ÿÿL‰îH‰ßè`FýÿH…ÀH‰„$h…tÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹„$˜E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$P)Ç„$JH‰„$PH‹D$hHÇD$0HÇ„$€HÇ„$ðHÇ„$èH‰„$ðH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$0H‰„$hHÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéîXÿÿfDH;D$…#ËH‹UöB„ËL‹%ˆÐ%H‹ZH‹mI‹$‹BƒÀ‰BH‹tÐ%;w`1öH‰ïÿÓH‰„$PI‹$ƒhHƒ¼$P…Vrÿÿè©=üÿH…À„p|H‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹„$˜E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹D$hHÇ„$HHÇ„$pÇ„$i)Ç„$JH‰„$ðH‹„$€HÇD$8HÇD$0HÇ„$€HÇ„$ðH‰„$PHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé¼Uÿÿ@H‹BH‰×ÿP0éF%ÿÿH‹EH‰ïÿP0éOpÿÿÇ„$·(Ç„$DE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé#SÿÿI‹EL‰ïÿP0éCnÿÿH‹¼$8H‰Þèä7üÿƒøÿ…W9ÿÿÇ„$‡*Ç„$UE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péPÿÿÇ„$|*Ç„$UE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé NÿÿH‹CH‰ßÿP0éÝÿÿ1ÒH‰ÞH‰ïè®4üÿH…ÀH‰„$ð…±3ÿÿÇ„$‚*Ç„$UE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pécKÿÿH;D$…2¾H‹UöB„$¾L‹%Ã%H‹ZH‹mI‹$‹BƒÀ‰BH‹ìÂ%;ê)1öH‰ïÿÓH‰„$XI‹$ƒhHƒ¼$X…1fÿÿè!0üÿH…À„(–H‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹D$hE1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$ðH‹„$˜HÇ„$HHÇ„$pÇ„$)Ç„$JH‰„$XHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéDHÿÿ@H‹CH‰ßÿP0éXÿÿL‰îH‰ßèÆ2ýÿH…ÀH‰„$P…ÖaÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹„$˜E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹D$hHÇ„$HHÇ„$pÇ„$f)Ç„$JH‰„$ðH‹„$€HÇD$8HÇD$0HÇ„$€HÇ„$ðH‰„$PHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéaEÿÿI‹FL‰÷ÿP0é ÿÿH‹BH‰×ÿP0éŽÿÿH=;ƒè&*üÿ…À„Û*ÿÿHÇ„$ðÇ„$‚*E1íÇ„$UHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé¨BÿÿHƒ¸˜„H‰ßè"&üÿH¬tH‰Åél‘ÿÿH‹D$0Ç„$C)E1íÇ„$JHÇD$0E1ÿHÇD$HÇD$E1äH‰„$`H‹„$˜E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$XH‹„$€HÇ„$ðHÇ„$€HÇ„$èHÇ„$ÐH‰„$PH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$¸H‰„$hH‹D$hHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$ðHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÂ?ÿÿH‹R@H…Ò„IíHA$H‹|$8H‰ÆÿÒH‰Åé9WÿÿH‹CH‰ßÿP0é,’ÿÿL‰îH‰ßè%*ýÿH…ÀH‰„$X…˜ZÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹D$hE1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$ðH‹„$˜HÇ„$HHÇ„$pÇ„$|)Ç„$JH‰„$XHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéÐ<ÿÿH‹CH‰ßÿP0H‹„$ØH‰D$0éÉ”ÿÿH‹CH‰ßÿP0éìÿÿI‹EL‰ïÿP0éÓÿÿH=zèz!üÿ…À„üÿÿÇ„$O(Ç„$@é}Kÿÿè’!üÿH…À„†HÇ„$ðÇ„$‚*E1íÇ„$UHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÓ9ÿÿH‹$±%H5åwH‹8èmüÿéŠôÿÿH=±wèœüÿ…À„X\ÿÿé¶ÿÿ€H‹D$0Ç„$Y)E1íÇ„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹„$€HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$PH‹D$hHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$ðHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péä6ÿÿH‹EH‰ïÿP0éˆ ÿÿèüÿH…À„¹HÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$HHÇ„$pÇ„$O(Ç„$@éöÿÿH‹_¬%H5 sH‹8è¨üÿéqøÿÿH‹|$hH‰ÎèöüÿI‰Åé]ÿÿI‹D$L‰çÿP0é­ÿÿH‰ÆL‰ïèÓüÿH‰Åé¯ÿÿH‹$HÇD$E1öHÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈH‰„$ˆHÇ„$pÇ„$¬*Ç„$_é)ÂÿÿH‹R@H…Ò„ìHA$H‹¼$€H‰ÆÿÒH‰Åé0LÿÿH‹CH‰ßÿP0éøsÿÿH‹<$H‹D$ÿÐH…ÀH‰D$h…`qÿÿèEüÿH…ÀH‰ÂtH‹>«%H‹H9Â…<èÅüÿH‹$H‹ $H‹H‰D$HƒèH…ÀH‰u H‹AH‰ÏÿP0H‹D$0H‰\$hHÇ„$HÇ„$`ÇD$H‰„$ðéZÿÿH‹EH‰ïÿP0éPÿÿè´üÿH…À…ËÿÿH‹$ª%H5“dH‹8èüÿé°ÿÿH‹CH‰ßÿP0éÐOÿÿH‹R@H…Ò„[8HA$H‹¼$˜H‰ÆÿÒH‰Åé|LÿÿH‹EH‰ïÿP0é^‹ÿÿH‹D$0HÇD$E1öHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$ðHÇ„$pÇ„$O&Ç„$1HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`é˜/ÿÿèÃüÿH…À„ê«ÿÿHÇ„$ðÇ„$§(E1ÿÇ„$DHÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé-ÿÿ€H‹R@H…Ò„$HA$H‹|$hH‰ÆÿÒI‰Åé_kÿÿH‹D$0Ç„$o)E1íÇ„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹D$hHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ðHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé9*ÿÿH‹BH‰×ÿP0é$jÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pÇ„$&Ç„$0ébÿÿH‹BH‰×ÿP0éÊgÿÿH‹BH‰×ÿP0éSjÿÿH‹EH‰ïÿP0é€iÿÿH=Ffè1 üÿ…À„s@ÿÿH‹D$0Ç„$P)E1íÇ„$JHÇD$0E1ÿHÇD$HÇD$E1äH‰„$`H‹„$˜E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$XH‹„$€HÇ„$ðHÇ„$€HÇ„$èHÇ„$ÐH‰„$PH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$¸H‰„$hH‹D$hHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$ðHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péx%ÿÿH‹BH‰×ÿP0éŒÿÿH‹<$H9GŽfòÿÿH‹DÇH‰D$hHƒHƒ„$Àé…cÿÿH‹N@H…É„î HƒÂ$éPbÿÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@Ç„$Ã*Ç„$aHÇD$8HÇD$0E1ÿE1ä1í1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é¢ÿÿH‹GÿP0éLÿÿH‹D$xH‹|$xH‹@ÿP0離ÿÿH‹EH‰ïÿP0é¾eÿÿHÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@Ç„$Ñ*Ç„$béLþÿÿH‹AH‰ÏÿP0éîŽÿÿH‹EH‰ïÿP0é9bÿÿI‹FL‰÷ÿP0éÓ|ÿÿH‹CH‰ßÿP0éobÿÿH‰ßèG ýÿH…ÀH‰ÅH‰„$Ø…Ò=ÿÿH‹D$0Ç„$)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÿÿH‹CH‰ßÿP0éyÿÿH‰×èýÿH…ÀI‰Æ„%H‰„$ðéG_ÿÿH‹EH‰ïÿP0é)aÿÿ÷„ÇH‹sHNHƒù‡H_[Hc ŠHÊÿâD‹{A÷ßéJnÿÿ‹CHÁàH‰Â‹CH ÐH÷ØHcÐA‰ÇH9Є(nÿÿH‹Õ–%H5cH‹8èŽüÿHƒ+…$ÿÿAƒÏÿH‹Cé nÿÿ‹CHÁàH‰Â‹CH ÐHcÐA‰ÇH9ЄÜmÿÿë²H‹3E1ÿHVÿH…ÒH‰…ªèþÿéÍmÿÿD‹{é¶mÿÿL‰æH‰ïèG ýÿH…ÀH‰„$Є¨ Iƒ,$u I‹D$L‰çÿP0HÇ„$Øé(`ÿÿènüÿH…À„ÁH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹„$˜E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$P)Ç„$JH‰„$PH‹D$hHÇD$0HÇ„$€HÇ„$ðHÇ„$èH‰„$ðH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$0H‰„$hHÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØétÿÿH‹Å’%H5†YH‹8èÿûÿé óÿÿH‹D$0Ç„$)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÅÿÿH‹D$@HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$é*Ç„$eé€óÿÿH=¨Uè“üûÿ…À„51ÿÿH‹D$0Ç„$f)E1íÇ„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹„$€HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$PH‹D$hHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$ðHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péçÿÿH‹BH‰×ÿP0é XÿÿH‹FH‰÷ÿP0H‰\$hHÇ„$øHÇ„$HÇD$éfâþÿH‹EŒ%H5žUºE1ÿE1äE1ö1í1ÛH‹81ÀèZûûÿÇ„$×(Ç„$EHÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÿÿHƒm„_íè°Üüÿ…À…âpH$CHEHƒûH5‡WHDÂH‰ÚE1íH‰ÁH‹s‰%1íH‹81ÀèŸøûÿÇ„$)Ç„$EHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péJÿÿH‹CH‰ßÿP0é¶âþÿH‹D$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pH‰„$ÈHÇD$Ç„$Ý*Ç„$cé êÿÿI‹EL‰ïÿP0é.hÿÿH‹t$hH‰ßè¼øüÿH…ÀH‰„$ð…õóþÿÇ„$y*Ç„$UE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé‘ ÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$!*Ç„$OH‰„$PH‹D$8HÇD$0HÇD$8HÇ„$€HÇ„$ðH‰„$hHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéàÿÿH‹D$0Ç„$‘)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péLÿÿ1ÒL‰öH‰ßèÿìûÿH…ÀH‰$H‰„$ð…ïÖþÿH‹D$@L‰4$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$ÀH‹D$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$ñ*Ç„$eHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é‚ÿÿH‹CH‰ßÿP0éGÿÿH‰îH‰ßèïüÿH…ÀH‰„$ð…(DÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿHÇ„$ˆHÇ„$ÐE1äHÇ„$HÇ„$¸1íHÇ„$¨HÇ„$à1ÛHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$pH‰„$ðÇ„$i&Ç„$2HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`éÐÿÿI‹FL‰÷ÿP0éØDÿÿH‹CH‰ßÿP0é'EÿÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hH‹„$ HÇD$hHÇ„$HHÇ„$pÇ„$j(Ç„$BHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`HÇ„$H‰„$ðéÚêþÿÇ„$l(Ç„$BE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(H‹„$ HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hH‰„$ðHÇD$hHÇ„$HHÇ„$péÿûþÿH=ø9èãàûÿ…À„èÿÿH‹D$0Ç„$|)E1íÇ„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹D$hHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ðHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péGùþÿH‰ßèßïüÿH…ÀI‰Æ…DSÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$ðHÇ„$pÇ„$(Ç„$=HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`é¯öþÿèÚÛûÿH…À„´H‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹„$˜E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹D$hHÇ„$HHÇ„$pÇ„$f)Ç„$JH‰„$ðH‹„$€HÇD$8HÇD$0HÇ„$€HÇ„$ðH‰„$PHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéíóþÿH‹>k%H5ÿ1H‹8è‡×ûÿé7ÜÿÿL‰îH‰ïègÞüÿH…ÀI‰Æ…µMÿÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$ðHÇ„$pÇ„$(Ç„$=HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`é7ñþÿH‹D$0L‰´$E1ÿHÇD$HÇD$E1öHÇD$(HÇD$E1äHÇ„$HÇ„$ˆ1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆH‰„$`HÇ„$øH‹„$˜HÇ„$HHÇ„$pÇ„$-*Ç„$PHÇD$0H‰„$XH‹„$€HÇ„$ðHÇ„$€HÇ„$èHÇ„$˜H‰„$PH‹D$8HÇ„$HÇD$8HÇ„$0HÇ„$°H‰„$hHÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé~îþÿH‹R@H…Ò„PïHA$L‰÷H‰ÆÿÒI‰ÅéAÿÿÇ„$~&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péæëþÿH=ß)èÊÐûÿ…À„j¼þÿH‹D$@L‰4$E1íHÇ„$ðÇ„$ñ*E1ÿÇ„$eHÇD$8E1äH‰„$ÀH‹D$E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$ÈHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éêþÿH‹D$0Ç„$•)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péŠçþÿH‹D$0Ç„$“)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péöäþÿH‹R@H…Ò„øHA$H‹|$hH‰ÆÿÒH‰ÃéF%ÿÿI‹EL‰ïÿP0é˜}ÿÿH‹<$H‹„$ˆÿÐH…ÀH‰„$ð…r¶þÿèÐÉûÿH…ÀH‰ÂtH‹É\%H‹H9Â…žèPÉûÿH‹$H‹$H‹H‰D$HƒèH…ÀH‰„Ñ9è[ÊûÿH…ÀH‰$„¦8H‹„$ˆH‹œ$ˆH‹H‰D$HƒèH…ÀH‰„o8H‹|$@HÇ„$Àè ÆûÿI‰ÄH‹D$@H‹¬$àH‹œ$pHƒH‹|$@èúÅûÿI9Ä…X6H‹Œ$˜H‹”$ H‹´$¨H‹|$@èÿÉûÿ…À„¬5H‹„$HƒH‹„$H‰„$pH‹@H;[%„X½H‹¼$ H9¼$p„B½H‹@HÇH5ÆE1ÿE1äE1ö1íH‰ÁH‹ýZ%H‹81Àè#ÊûÿH‹D$@L‹¬$pÇ„$‰1H‰œ$p1ÛÇ„$¡HÇD$8H‰„$ÀH‹D$HÇD$0HÇD$HÇD$HÇD$(H‰„$ÈH‹$HÇD$HÇ„$HÇ„$ˆHÇ„$€H‰„$ˆH‹„$ÀHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜H‰$HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é…áþÿH‰ßèØüÿH…ÀH‰„$È…$ÿÿÇ„$°&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péõÞþÿH‹FV%H5H‹8èÂûÿH‹D$0Ç„$S)E1íÇ„$JHÇD$0E1ÿHÇD$HÇD$E1äH‰„$`H‹„$˜E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$XH‹„$€HÇ„$ðHÇ„$€HÇ„$èHÇ„$ÐH‰„$PH‹D$8HÇ„$˜HÇD$8HÇ„$HÇ„$¸H‰„$hH‹D$hHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$ðHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÜþÿI‹EL‰ïÿP0égðþÿH‹CH‰ßÿP0é°þÿH‹QS%H5H‹8èš¿ûÿH‹D$0Ç„$i)E1íÇ„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹„$€HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$PH‹D$hHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$ðHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé6ÙþÿH‹t$hH‹|$Xè¾ûÿƒÀ…¾,ÿÿH‹D$0L‰´$E1íÇ„$;*Ç„$QE1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹„$€HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$PH‹D$8HÇ„$ÐHÇD$8HÇ„$˜HÇ„$H‰„$hHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pébÖþÿH‹H‹@H‰”$ØH‰„$àé4.ÿÿ©±H…Òˆa³H cHX HƒúH5ÆHDÁE1íE1ÿH‰ÁH‹²M%E1äE1ö1í1ÛH‹81ÀèÖ¼ûÿH‹D$@Ç„$&+Ç„$eHÇD$8HÇD$0HÇD$H‰„$ÀH‹D$HÇD$(HÇD$HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ébÔþÿè¹ûÿH…À„´H‹D$@L‰4$E1íHÇ„$ðHÇD$E1öHÇD$(HÇD$E1ÿH‰„$ÀH‹D$E1äHÇ„$HÇ„$ˆ1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$ñ*Ç„$eHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é ÒþÿH‹ñI%H5²H‹8è:¶ûÿ鳿ÿÿ1ÒH‰ÞH‰ïè8¹ûÿH…ÀI‰Å…áïþÿH‹D$0HÇD$E1öHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹D$h1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$ðHÇ„$HHÇ„$pÇ„$½)Ç„$KHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéÛÏþÿH=Ô è¿´ûÿ…À„Ð"ÿÿH‹D$0L‰´$E1ÿHÇ„$ðÇ„$/*E1äÇ„$PHÇD$0E1öH‰„$`H‹„$˜1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$XH‹„$€HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðH‰„$PH‹D$8HÇ„$èHÇD$8HÇ„$ÐHÇ„$˜H‰„$hHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÍþÿH9CŽxèÿÿH‹DÃH‰„$ðHƒHƒ„$À馞þÿ1ÒH‰îL‰ï茳ûÿH…ÀH‰ÃH‰„$ð…êÿÿH‹D$0L‰´$E1ÿÇ„$/*Ç„$PE1äHÇD$0HÇD$E1öH‰„$`H‹„$˜1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$XH‹„$€HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$PH‹D$8HÇ„$ÐHÇD$8HÇ„$˜HÇ„$H‰„$hHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÿÉþÿè*¯ûÿH…À„¤H‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$`H‹D$hE1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$ðH‹„$˜HÇ„$HHÇ„$pÇ„$|)Ç„$JH‰„$XHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéMÇþÿH‹ž>%H5_H‹8èçªûÿéGËÿÿH‹D$0Ç„$ò'E1íÇ„$=HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé«ÄþÿH‹R@H…Ò„|­HA$H‹|$hH‰ÆÿÒH‰ÅéwÿÿH‹D$0Ç„$\&E1íÇ„$2HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÂþÿÇ„$€&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$p銿þÿH‹R@H…Ò„&§HA$H‰ßH‰ÆÿÒH‰ÅéÿÿÇ„$ƒ&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péò¼þÿH‹R@H…Ò„¸ƒHA$H‹|$hH‰ÆÿÒH‰ÂéÄûþÿH‹BH‰×ÿP0éì‘þÿL‰öH‰ïèU§üÿH…ÀH‰„$È…±ÿþÿÇ„$­&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé-ºþÿÇ„$×(Ç„$EE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé¶·þÿH‹D$0Ç„$£)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé"µþÿH‹EH…ÀH‰„$ø„]ÑþÿH‹UHƒA¼HƒH‹EH‰”$ØHƒèH…ÀH‰E…1ÑþÿH‹EH‰ïÿP0é"ÑþÿH‹CH‰ßÿP0éÕOÿÿH‹,%H5ÒòH‹8èZ˜ûÿH‹D$0Ç„$)E1íÇ„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹D$hHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ðHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé²þÿÇ„$”&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé¯þÿH‹D$0Ç„$ô'E1íÇ„$=HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé­þÿH‹P@H…Ò„º¸HA$H‰ïH‰ÆÿÒH‰Ãé ÿÿH‰ÎL‰ïèì“ûÿH‰Ãé@ÀþÿèOûÿèú‘ûÿH…À„ÉH‹D$0L‰´$E1ÿHÇ„$ðÇ„$/*E1äÇ„$PHÇD$0E1öH‰„$`H‹„$˜1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$XH‹„$€HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðH‰„$PH‹D$8HÇ„$èHÇD$8HÇ„$ÐHÇ„$˜H‰„$hHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péü©þÿ@H‹I!%H5 èH‹8è’ûÿéÚÿÿH=ÖçèÁŽûÿ…À„ÇþÿH‹D$0Ç„$½)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé5§þÿH‹BH‰×ÿP0é}þÿH‹˜€L‹-àe%H…Û„ZcL‹%È%I‹$‹BƒÀ‰BH‹¼%;c1ÒL‰îH‰ïÿÓI‰ÆI‹$ƒhM…ö„?^L‰´$hé9¿þÿH‹´$ H‹¼$8茋ûÿƒÀ…ŸúþÿH‹D$0L‰´$E1íÇ„$D*Ç„$RE1ÿHÇD$0HÇD$E1äH‰„$`H‹„$˜E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$XH‹„$€HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$PH‹D$8HÇ„$ÐHÇD$8HÇ„$˜HÇ„$H‰„$hHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péç£þÿð°H…ÒˆV®H ÕHùÖHƒúH5géHDÁE1ÿE1äH‰ÁH‹S%E1ö1í1ÛH‹81ÀèzŠûÿH‹D$0Ç„$Ë)Ç„$KHÇD$8HÇD$0HÇD$H‰„$`H‹D$hHÇD$HÇD$(HÇD$HÇ„$H‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé¡þÿE1íÇ„$)1íéMÿÿH‹D$0H‰¬$E1öHÇD$HÇD$E1ÿHÇD$(HÇD$E1äHÇ„$HÇ„$ˆ1íHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆH‰„$`HÇ„$øH‹D$hH‰œ$@1ÛHÇ„$HHÇ„$pÇ„$*Ç„$LH‰„$ðHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé`žþÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$pÇ„$z&Ç„$3HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`éé›þÿH‰ÞH‰ï讇üÿH…ÀH‰„$È„Ý`Hƒ+u H‹CH‰ßÿP0HÇ„$èéÆpþÿH‹EH‰ïÿP0épþÿH‹EH‰ïÿP0éqþÿH‹EH‰ïÿP0é™pþÿH‹CH‰ßÿP0éƒ5ÿÿI‹FL‰÷ÿP0é^5ÿÿH‹CH‰ßÿP0é¨4ÿÿH‰ÞL‰ïè'€ûÿ…À„ªÞþÿÇ„$´&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péȘþÿèó}ûÿH…À„‘H‹D$0HÇD$E1öHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹D$h1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$ðHÇ„$HHÇ„$pÇ„$½)Ç„$KHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé)–þÿH‹z %H5;ÔH‹8èÃyûÿéEìÿÿI‹FL‰÷ÿP0éKlþÿ1ÒH‰îL‰÷è²|ûÿH…ÀH‰„$Ð…¯×þÿÇ„$š&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péj“þÿH‹¼$8L‰öè:xûÿƒÀ…ÌíþÿH‹D$0M‰õÇ„$ (Ç„$=HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÊþÿH‰ÎH‰ßèÏwûÿI‰Åé^uþÿH‹EH‰ïÿP0H‹œ$èéh¥þÿH‰ÎL‰ïè¥wûÿH‰ÃéyuþÿH=†Îèquûÿ…À„!ÒþÿHÇ„$ÐÇ„$š&E1ÿÇ„$3HÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péöþÿI‹GL‰ÿÿP0éå)ÿÿI‹FL‰÷ÿP0éÀ)ÿÿH‹CH‰ßÿP0éÝ)ÿÿH‹EH‰ïÿP0éŠdþÿH‹˜€L‹-tL%H…Û„L€L‹%\%I‹$‹BƒÀ‰BH‹P%;€1ÒL‰îH‰ïÿÓI‰ÆI‹$ƒhM…ö„3}L‰´$Pé-§þÿH‹P@H…Ò„—ßHA$H‹|$0H‰ÆÿÒH‰Ãéæ`þÿH‹CH‰ßÿP0é÷bþÿH‹˜€L‹-ÝK%H…Û„˜‚L‹%Å%I‹$‹BƒÀ‰BH‹¹%;\‚1ÒL‰îH‰ïÿÓI‰ÆI‹$ƒhM…ö„…L‰´$Xéù§þÿH=·Êè¢qûÿ…À„Tÿÿé ÿÿH‹H‹@H‰”$ØH‰„$ðé»õþÿH=‚Êèmqûÿ…À„SæþÿH‹D$0Ç„$(E1íÇ„$=HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péî‰þÿH=çÇèÒnûÿ…À„bâþÿHÇ„$ðÇ„$y*E1íÇ„$UHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péT‡þÿH‹t$hH‹|$Xè%lûÿƒÀ…âþÿH‹D$0Ç„$(E1íÇ„$>HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$p鵄þÿH=®Âè™iûÿ…À„û…þÿéHÿÿ1ÒL‰îH‰ïèOkûÿH…ÀI‰Æ…eþÿé·MÿÿH‰ßè†lüÿH…ÀI‰Å…ÿÿÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$,Ç„$jHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éÉ‚þÿH‹EH‰ïÿP0éôÿÿèågûÿH…ÀuH‹Yú$H5È´H‹8èJfûÿèÅgûÿH…À…(üH‹”$àHƒ*…2HÇD$ÿÿÿÿH‹BH‰×ÿP0éåÿÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$j+Ç„$gHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éÁ€þÿH‹P@H…Ò„œHA$H‰ßH‰ÆÿÒI‰ÅéTþÿH‰ïè¨hüÿH…ÀH‰ÃH‰„$Ø…ÆSþÿH‹D$@Ç„$h+E1íÇ„$gHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éà~þÿH=Ù¼èÄcûÿ…À„u¾þÿH‹D$0Ç„$i&E1íÇ„$2HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ðHÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péE|þÿH‰ÎL‰ïèJcûÿH‰Ãé—`þÿÇ„$Ÿ&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé»yþÿH‹R@H…Ò„£tHA$H‰ïH‰ÆÿÒH‰ÃéË»þÿ1ÒH‰îL‰ïèM`ûÿH…ÀH‰„$ð…SœþÿÇ„$§(Ç„$DE1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péwþÿH‹D$@Ç„$m+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éduþÿH‹D$@Ç„$d+E1íÇ„$gHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÀsþÿH‹P@H…Ò„xôHA$H‰ßH‰ÆÿÒH‰ÅéŠGþÿH‹D$@Ç„$6,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éþqþÿH‹H@H…É„ìòHB$H‰ßH‰ÆÿÑI‰Æé ÿÿH‰ïèåYüÿH…ÀH‰ÃH‰„$à…Ö ÿÿH‹D$@Ç„$,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é pþÿH‹D$@Ç„$,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ énþÿH‹P@H…Ò„JïHA$L‰ïH‰ÆÿÒéÿÿèŒSûÿH…À„†HÇ„$ðÇ„$y*E1íÇ„$UHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péÍkþÿH‹ã$H5ß©H‹8ègOûÿéØáÿÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$,Ç„$jHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éjþÿH‹D$@Ç„$ ,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éphþÿH‹D$@Ç„$#,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÏfþÿH‹D$@Ç„$o+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é.eþÿèYJûÿH…À„ƒHÇ„$ÈÇ„$­&E1ÿÇ„$3HÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pébþÿH‹îÙ$H5¯ H‹8è7FûÿHÇ„$ÈÇ„$­&E1ÿÇ„$3HÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé`þÿH=ýèèDûÿ…À„Ù¢þÿédýÿÿH‰ïèóGüÿH…ÀH‰ÃH‰„$à…£úþÿH‹D$@Ç„$1,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é.^þÿÇ„$)éjLÿÿèICûÿH…À„‡H‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿHÇ„$ˆHÇ„$ÐE1äHÇ„$HÇ„$¸1íHÇ„$¨HÇ„$à1ÛHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$pH‰„$ðÇ„$i&Ç„$2HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`é‰[þÿH‹ÚÒ$H5›™H‹8è#?ûÿé¢ÜÿÿH‰ÎH‰ßèsBûÿI‰Åé/nþÿè†@ûÿH…À„ƒHÇ„$ÐÇ„$š&E1ÿÇ„$3HÇD$8E1äHÇD$0HÇD$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÊXþÿH‹Ð$H5Ü–H‹8èd<ûÿé6ÈÿÿL‰öH‰ïèDCüÿH…ÀH‰„$Ø…Õ.þÿH‹D$@Ç„$œ+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éòVþÿH=ë”èÖ;ûÿ…À„ÖÞþÿéúwÿÿH‹H@H…É„0©HB$H‰ïH‰ÆÿÑH‰Ãé,þÿH‹D$@Ç„$ƒ+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éUþÿèD:ûÿH…À„„H‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$ðHÇ„$pÇ„$(Ç„$=HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`é‡RþÿH‹ØÉ$H5™H‹8è!6ûÿé÷ÅÿÿH‹|$8H‰Îèo9ûÿH‰ÅéñiþÿH‹D$@Ç„$3,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¶PþÿH‹H@H…É„ZHB$H‰ßH‰ÆÿÑI‰ÆéëþÿH‹D$@Ç„$r+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éôNþÿH‰ßèŒEüÿH…ÀH‰„$Ø…3%þÿH‹D$@Ç„$Ÿ+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é:MþÿH‹D$@Ç„$Ž+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é™KþÿH‹5Z %H‹=³ %1Òè„*üÿH…ÀH‰Ã„H‹D$ H‹=¼ %H5ÕüÿH‰ÚH‰CHƒL‹ó%H‹ %èÇüÿH…ÀH‰$„¬Hƒ+„ÕBH‹<$è'TüÿH…ÀH‰„$ H‰„$Ø„5AH‹$H‹$H‹H‰D$HƒèH…ÀH‰„A1ÿè·,ûÿH…ÀH‰„$(HÇ„$Ø„Ç@H‹D$ H‹@H…À„>HƒH‰„$Ø1ÛHÇ„$¸HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$0HÇD$8HÇ„$8H‹”$ØH‹„$¸H9BŽ%H‹BH‹Œ$¸H‹ÈHƒH…ÛH‰„$°t Hƒ+„H‹5%H‹¼$°è½üÿH…ÀH‰$„Ø#H‹¡À$H9X„$#H‹<$èÖ.ûÿò„$Pò¬$Pf.-$–z„ÿ#H‹$H‹$H‹H‰D$HƒèH…ÀH‰„Å"H‹5%H‹¼$°è@üÿH…ÀH‰$„A"H‹$À$H9X„!H‹<$èY.ûÿò„$Xò¼$Xf.=§•z„"H‹$H‹$H‹H‰D$HƒèH…ÀH‰„.!H‹5@ÿ$H‹¼$°èÃüÿH…ÀH‰$„ª H‹§¿$H9X„öH‹<$èÜ-ûÿò„$hò¤$hf.%*•z„ø H‹$H‹$H‹H‰D$HƒèH…ÀH‰„—H‹5 %H‹¼$°èFüÿH…ÀH‰$„H‹*¿$H9X„_H‹<$è_-ûÿò„$Hò´$Hf.5­”z„aH‹$H‹$H‹H‰D$HƒèH…ÀH‰„H‹5þþ$H‹¼$°èÉüÿH…ÀH‰$„|H‹­¾$H9X„ÈH‹<$èâ,ûÿò„$pòœ$pf.0”z„ÊH‹$H‹$H‹H‰D$HƒèH…ÀH‰„iH‹5þ$H‹¼$°èLüÿH…ÀH‰$„åH‹0¾$H9X„1H‹<$èe,ûÿò„$xò¬$xf.-³“z„3H‹$H‹$H‹H‰D$HƒèH…ÀH‰„ÒH‹5<ý$H‹¼$°èÏüÿH…ÀH‰$„2H‹³½$H9X„³XH‹<$èè+ûÿò„$ò¼$f.=6“z„œH‹$H‹$H‹H‰D$HƒèH…ÀH‰„TXH‹5ÿ$H‹¼$°èRüÿH…ÀH‰$„ÐWH‹6½$H9X„¬WH‹<$èk+ûÿò„$€ò¤$€f.%¹’z„XH‹$H‹$H‹H‰D$HƒèH…ÀH‰„MWH‹=jÿ$èý-üÿH…ÀI‰Å„ÒVH‹5‚%H‰ÇèÂüÿH…ÀH‰ÃH‰„$ЄsVIƒmu I‹EL‰ïÿP0ò„$Pè)ûÿH…ÀI‰Å„åUò„$Xèu)ûÿH…ÀH‰ÅH‰„$脇Uò„$hèS)ûÿH…ÀI‰Ä„U¿è&ûÿH…ÀH‰D$„¡TH‹@HÇ„$èL‰(H‹D$H‹@H‰hH‹D$H‹@L‰`H‹ã»$H9CH‰„$„SH‹t$H‰ßè,0üÿH…ÀH‰D$@„©RH‹D$H‹\$H‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹”$ÐHƒ*u H‹BH‰×ÿP0Hƒ¼$8HÇ„$Ðt-H‹„$8H‹œ$8H‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=Ìý$è_,üÿH…ÀH‰ÃH‰„$Є×QH‹5Ü%H‰ÇèüÿH…ÀH‰ÅH‰„$è„…QHƒ+u H‹CH‰ßÿP0ò„$pèê'ûÿH…ÀH‰ÃH‰„$ЄqPò„$xèÈ'ûÿH…ÀH‰D$„Pò„$è¬'ûÿH…ÀI‰Ä„¡O¿èæ$ûÿH…ÀI‰Å„%OH‹@HÇ„$ÐH‰H‹\$I‹EH‰XI‹EL‰`H‹„$H9E„HNL‰îH‰ïè•.üÿH…ÀH‰D$p„ÙMIƒmu I‹EL‰ïÿP0H‹”$èHƒ*u H‹BH‰×ÿP0Hƒ|$8HÇ„$èt'H‹D$8H‹\$8H‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹t$@H‹|$pèt)ûÿH…ÀH‰$„ MH‹=@ý$èË*üÿH…ÀH‰D$„‘LH‹56ü$H‰ÇèŽüÿH…ÀI‰Å„LH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹t$@H‹|$pèû(ûÿH…ÀH‰D$„sKH‹„$I9E„JH‹t$L‰ïèn-üÿH…ÀH‰„$è„…IH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Iƒmu I‹EL‰ïÿP0H‹œ$èH‹<$H‰Þè€%ûÿH…ÀH‰D$`„¿HH‹$H‹4$H‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0Hƒ+u H‹CH‰ßÿP0Hƒ|$0HÇ„$èt'H‹D$0H‹\$0H‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$È„ÞGò„$Pè$%ûÿH…ÀI‰Å„‚Gò„$Xè %ûÿH…ÀH‰ÅH‰„$è„EGò„$hèè$ûÿH…ÀH‰$„èF¿èa%ûÿH…ÀH‰ÃH‰„$ЄlFL‰hH‰h H‰ÞH‹$H‹¼$ÈHÇ„$èH‰C(èá#ûÿH…ÀH‰$„ñEHƒ+u H‹CH‰ßÿP0H‹<$è›&ûÿH…ÀI‰ÆH‰„$ЄfEH‹$H‹$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$Øt-H‹„$ØH‹œ$ØH‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0ò„$pèë#ûÿH…ÀH‰ÅH‰„$ЄÃDò„$xèÉ#ûÿH…ÀH‰$„^Dò„$è®#ûÿH…ÀH‰ÃH‰„$è„ÓC¿è $ûÿH…ÀI‰Å„WCH‰hH‹$L‰îH‹¼$ÈI‰](HÇ„$ÐI‰E è¨"ûÿH…ÀH‰ÃH‰„$脱BIƒmu I‹EL‰ïÿP0H‰ßè[%ûÿH…ÀH‰D$„IBHƒ+u H‹CH‰ßÿP0Hƒ¼$øHÇ„$èt-H‹„$øH‹œ$øH‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5*÷$L‰÷èº üÿH…ÀH‰ÂH‰„$è„¢AH‹„$H9B…AH‹BH…ÀH‰$„ AH‹jHƒHƒEHƒ*H‰¬$èu H‹BH‰×ÿP0¿èä"ûÿH…ÀH‰ÃH‰„$ЄR@H‹$1ÒH‰ÞH‰ïH‰CH‹„$°HƒH‰C è; üÿH…ÀH‰$„É?Hƒ+u H‹CH‰ßÿP0HÇ„$ÐH‹”$èHƒ*u H‹BH‰×ÿP0H‹$H‹$HÇ„$èH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5 ö$H‹|$è— üÿH…ÀH‰ÂH‰„$è„Â>H‹„$H9BHÇ„$Ð…>H‹ZH…ÛH‰œ$Єl>H‹jHƒHƒEHƒ*H‰¬$èu H‹BH‰×ÿP0¿è±!ûÿH…ÀH‰$„Ù=H‹$1ÒH‰ïHÇ„$ÐH‰XH‹„$°H‹œ$°HƒH‹$H‰X H‰Æè÷üÿH…ÀH‰D$„!=H‹$H‹$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹”$èHƒ*u H‹BH‰×ÿP0H‹D$H‹\$HÇ„$èH‹H‰$HƒèH…ÀH‰u H‹CH‰ßÿP0L;´$ „¥;Iƒ~„š;L‰´$ØH‹„$ H9D$„;H‹D$Hƒx„;H‹D$H‰„$øH‹=Èö$è$üÿH…ÀH‰ÃH‰„$脹:H‹5 õ$H‰ÇèØüÿH…ÀH‰$„[:Hƒ+u H‹CH‰ßÿP0H‹$H‹œ$HÇ„$èHÇ„$ÀH9X„À9H‹„$ÀHƒÀH‰Çè ûÿH…ÀH‰ÃH‰„$Є79H‹„$èH…ÀtH‰CHÇ„$èH‹„$ØH‹Œ$Ø1ÒH‹´$øH‹<$HƒH‹„$ÀH‰LÃH‹„$øHƒH‹„$ÀH‰tà H‰ÞèüÿH…ÀI‰Å„­7Hƒ+u H‹CH‰ßÿP0H‹$H‹$HÇ„$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹«²$I‹EH9ØH‰œ$@„)7H;‡±$„7L‰ïHÇ„$ÀÿÿÿÿèM ûÿH…ÀH‰$„7H‹@H‹€àH…ÀH‰„$°„6Iƒmu I‹EL‰ïÿP0H‹„$˜H‹¬$L‹¼$L‹¤$0H‰„$¨H‹„$H‰„$ H‹„$àH‰D$8H‹„$ H‰D$0H‹„$H‰„$˜Hƒ¼$°…5H‹$H‹œ$@H9XH‹„$ÀH‹$…À4H9CŽœ3H‹SL‹,ÂIƒEHƒ„$ÀH‹y°$I‹EH9ØH‰\$(„Í2H;„$@„¿2L‰ïè1ûÿH…ÀH‰D$„LWIƒmu I‹EL‰ïÿP0H‹D$H‹|$H‹@H‹˜àÿÓH…ÀH‰„$Є WH‹|$ÿÓH…ÀH‰„$è„(VH‹|$ÿÓH…À…Vè üÿ…Àˆ¡UH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰uH‹D$H‹|$H‹@ÿP0H‹„$ÐH‰„$`H‹„$`M…äH‰„$0tIƒ,$u I‹D$L‰çÿP0H‹„$èM…ÿHÇ„$ÐH‰„$tIƒ/u I‹GL‰ÿÿP01ÿHÇ„$èè{ûÿH…ÀH‰„$„}TH…ítHƒmu H‹EH‰ïÿP0H‹„$ HƒHƒ|$Ht(H‹D$HH‹\$HH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹„$ H9„$`„ŠSH‹5ãî$H‹¼$`èžüÿH…ÀI‰Å„ÿRH‹ƒ®$I9E„ÝRL‰ïè¹ûÿòD$Hòt$Hf.5 „z„GSIƒmu I‹EL‰ïÿP0H‹5î$H‹¼$`è8üÿH…ÀI‰Å„¤QH‹®$I9E„QL‰ïèSûÿò„$8òœ$8f.¡ƒz„ÔQIƒmu I‹EL‰ïÿP0H‹5Ií$H‹¼$`èÌüÿH…ÀI‰Å„@PH‹±­$I9E„PL‰ïèçûÿò„$ˆò¬$ˆf.-5ƒz„„PIƒmu I‹EL‰ïÿP0H‹5%ï$H‹¼$`è`üÿH…ÀI‰Å„]MH‹E­$I9E„›NL‰ïè{ûÿòD$(ò|$(f.=Ï‚z„“MIƒmu I‹EL‰ïÿP0òœ$P1Àºf.\$H›ÀEÂz:u8ò´$X1Àf.´$8›ÀEÂzuò¤$h1Àf.¤$ˆ›ÀEÂ…À„¤H‹5Ïì$H‹¼$`èšüÿH…ÀI‰Å„{MH‹¬$I9E„_NL‰ïèµûÿòD$Hò|$Hf.= ‚z„ÂMIƒmu I‹EL‰ïÿP0H‹5ì$H‹¼$`è4üÿH…ÀI‰Å„ÆKH‹¬$I9E„¡KL‰ïèOûÿò„$8ò¤$8f.%z„àMIƒmu I‹EL‰ïÿP0H‹55ë$H‹¼$`èÈüÿH…ÀI‰Å„bJH‹­«$I9E„ÄIL‰ïèãûÿò„$ˆò´$ˆf.51z„’JIƒmu I‹EL‰ïÿP0H‹5í$H‹¼$`è\üÿH…ÀI‰Å„þHH‹A«$I9E„ÜHL‰ïèwûÿòD$(ò\$(f.Ë€z„HIIƒmu I‹EL‰ïÿP0H‹=‹í$èüÿH…ÀH‰ÃH‰„$è„ÌZH‹5›ð$H‰ÇèÛüÿH…ÀH‰ÅH‰„$Є;ZHƒ+u H‹CH‰ßÿP0òD$Hè¬ûÿH…ÀH‰ÃH‰„$脞Yò„$8èŠûÿH…ÀH‰D$„Yò„$ˆènûÿH…ÀI‰Ä„ÍW¿è¨ûÿH…ÀI‰Æ„XWH‹@HÇ„$èH‰H‹\$I‹FH‰XI‹FL‰`H‹„$H9E„wVL‰öH‰ïèWüÿH…ÀH‰„$„àUIƒ.u I‹FL‰÷ÿP0H‹”$ÐHƒ*u H‹BH‰×ÿP0Hƒ¼$˜HÇ„$Ðt.H‹„$˜H‹œ$˜H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$H‹|$@è'ûÿH…ÀI‰Å„êTH‹=ôì$èüÿH…ÀH‰D$„nTH‹5êë$H‰ÇèBÿûÿH…ÀI‰Æ„ôSH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$H‹|$@è¬ûÿH…ÀH‰D$„MSH‹„$I9F„ÝQH‹t$L‰÷èüÿH…ÀH‰„$Є`QH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Iƒ.u I‹FL‰÷ÿP0H‹œ$ÐL‰ïH‰Þè3ûÿH…ÀH‰„$ „ŒPIƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0Hƒ|$0HÇ„$Ðt(H‹D$0H‹\$0H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$ H‹|$`ºèžûÿH…ÀI‰Æ„¡O¿èhûÿH…ÀH‰ÃH‰„$ЄoH‹=5î$L‰p1ÒH‰ÆèÏüûÿH…ÀI‰Æ„ãHƒ+u H‹CH‰ßÿP0L;´$(HÇ„$ДÂL;´$0¶Ê”ÀÐuL;´$ …‰ËIƒ.u I‹FL‰÷ÿP0…Ûò¤$H„ a1Àºf.d$(›ÀEÂzu1Àf.¤$€›ÀEÂ…À…ÏWH‹„$ H‰D$0H‹„$ H‰D$HH‹„$ H9„$„ŠWH‹5 ç$H‹¼$èÅüûÿH…ÀH‰ÃH‰„$È„WH‹¢¦$H9C„*H‰ßèØûÿòD$(òt$(f.5,|z„ô_Hƒ+u H‹CH‰ßÿP0H‹55æ$H‹¼$èXüûÿH…ÀH‰ÃH‰„$È„mH‹5¦$H9C„IH‰ßèkûÿò„$ˆòœ$ˆf.¹{z„£Hƒ+u H‹CH‰ßÿP0H‹5bå$H‹¼$èåûûÿH…ÀI‰ÄH‰„$È„;H‹5‚ç$H‹¼$è½ûûÿH…ÀI‰ÅH‰„$Є²Hƒ¼$èt.H‹„$èH‹œ$èH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$ðHÇ„$Èt.H‹„$ðH‹œ$ðH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ò¤$p1ÀºHÇ„$Ðf.d$(›ÀE‰Ãz&u$ò¼$x1À‰Óf.¼$ˆ›ÀDØz„¤…Û„[×H‹5òä$H‹¼$è½úûÿH…ÀH‰ÃH‰„$È„ÂÖH‹š¤$H9C„7×H‰ßèÐûÿòD$(òt$(f.5$zz„_Hƒ+u H‹CH‰ßÿP0H‹5ä$H‹¼$èPúûÿH…ÀH‰ÃH‰„$È„äÕH‹-¤$H9C„ÀÕH‰ßècûÿò„$ˆòœ$ˆf.±yz„°ÖHƒ+u H‹CH‰ßÿP0H‹5Jã$H‹¼$èÝùûÿH…ÀH‰„$èH‰„$È„èÔH‹5eå$H‹¼$è°ùûÿH…ÀH‰„$ðH‰„$ЄJÔIƒ,$u I‹D$L‰çÿP0IƒmHÇ„$Èu I‹EL‰ïÿP0HÇ„$ÐH‹=Ýå$èpüÿH…ÀH‰ÃH‰„$È„ŽÓH‹5íè$H‰Çè-ùûÿH…ÀI‰ÄH‰„$ø„ ÓHƒ+u H‹CH‰ßÿP0òD$(èþûÿH…ÀH‰ÅH‰„$È„zÒò„$ˆèÜûÿH…ÀH‰ÃH‰„$ð„÷Ñ¿è ûÿH…ÀI‰Å„ƒÑH‹@HÇ„$ÈHÇ„$ðH‰(I‹EH‰XH‹„$èH‹œ$èHƒI‹EH‰XH‹„$I9D$„ÃÏL‰îL‰çè¡üÿH…ÀH‰„$ЄIÏIƒmu I‹EL‰ïÿP0H‹”$øHƒ*u H‹BH‰×ÿP0Hƒ¼$€H‹„$ÐHÇ„$øH‰„$8t.H‹„$€H‹œ$€H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹t$pH‹¼$8è`ûÿH…ÀH‰„$Є7ÎH‹=(å$è³üÿH…ÀH‰ÃH‰„$È„¦ÍH‹5ä$H‰Çèp÷ûÿH…ÀI‰Å„ÍHƒ+u H‹CH‰ßÿP0H‹t$pH‹¼$8èòûÿH…ÀH‰ÅH‰„$È„©ËH‹„$I9EHÇ„$ð„ÌÊH‰îL‰ïèUüÿH…ÀH‰„$ø„BÊHƒmu H‹EH‰ïÿP0HÇ„$ÈL‰ëHƒ+u H‹CH‰ßÿP0H‹¬$øH‹œ$ÐH‰îH‰ßèi ûÿH…ÀH‰„$ „hÉHƒ+u H‹CH‰ßÿP0HƒmHÇ„$Ðu H‹EH‰ïÿP0Hƒ|$0HÇ„$øt(H‹D$0H‹\$0H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$ H‹|$`ºèÈ ûÿH…ÀI‰Å„nÈ¿è’ ûÿH…ÀH‰ÃH‰„$ø„âÇH‹=Wæ$L‰h1ÒH‰ÆèùôûÿH…ÀI‰Å„BÀHƒ+u H‹CH‰ßÿP0L;¬$(HÇ„$ø”ÂL;¬$0¶Ê”ÀÐuL;¬$ …iÀ‰ËIƒmu I‹EL‰ïÿP0…Û…ö@H‹„$ H9„$„,H‹„$Hƒx„H‹=så$èVüÿH…ÀH‰ÂH‰„$ø„¥ÆH‹„$H9B„ÅH‹´$H‰×èPüÿH…ÀI‰Æ„“ÄH‹”$øHƒ*u H‹BH‰×ÿP0Hƒ¼$HÇ„$øt.H‹„$H‹œ$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹„$ H9„$ „‘ÃH‹´$°H‹¼$ è¼ ûÿH…ÀI‰Å„_¾L‰öH‰Çè~ûÿƒÀ„Õ½I‹EL‰´$HƒèH…ÀI‰Eu I‹EL‰ïÿP0H‹„$8H‹¬$L‹¼$L‹¤$`H‰„$€H‹„$˜H‰„$¨H‹„$H‰„$ H‹„$àH‰D$8H‹„$ H‰D$0H‹„$H‰„$˜éáìÿÿH…Ût Hƒ+„¿H‹´$pH‹|$@èá ûÿH…ÀH‰„$à„¿H…ít Hƒm„⾿èö ûÿH…ÀI‰Å„*»H‹„$àH‹=Óã$1ÒL‰îHƒI‰EèYòûÿH…ÀH‰ÅH‰„$Є<¹Iƒm„"¹¿è  ûÿH…ÀI‰Å„S·H‹„$àH‹=uã$1ÒL‰îHƒI‰EèòûÿH…ÀH‰ÃH‰„$Ø„eµIƒm„KµºH‰ÞH‰ïèdûÿH…ÀI‰Å„v³Hƒm„\³Hƒ+HÇ„$Є L;¬$(HÇ„$Ø”ÂL;¬$0¶Ê”ÀÐuL;¬$ …•¿‰ËIƒm„Äé…Û…ùãH‹¬$àH‹œ$pé²@ÿÿH‹EH‰ïÿP0é’ÿÿH‹8œ$H5‘eºE1íE1ÿE1äE1ö1í1ÛH‹81ÀèJ ûÿH‹D$@Ç„$&+Ç„$eHÇD$8HÇD$0HÇD$H‰„$ÀH‹D$HÇD$(HÇD$HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÖ"þÿH‹D$@Ç„$&+E1íÇ„$eHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é2!þÿH=+_èûÿ…À„ÖþÿéolÿÿèDûÿH…À„ŸH‹D$@Ç„$@,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ élþÿH‹½–$H5~]H‹8èûÿH‹D$@Ç„$@,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éµþÿH=®[è™ûÿ…À„`¹þÿéFþÿÿH‰ÚL‰þL‰÷èNûÿH…ÀH‰Å…`¹þÿH‹D$@Ç„$@,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éãþÿH‹D$@Ç„$=,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éBþÿH‹D$@Ç„$8,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¡þÿ©„fêH‹CH‰D$HƒÀHƒø‡=êH=ÀTHc‡HøÿàH‹¼$€H‰ÎèoÿúÿH‰ÅéE1þÿH‰ÎH‰ßè\ÿúÿH‰ÅéîXþÿH‰ÖH‰ÇèIÿúÿI‰ÅécUþÿM‹eM…äL‰¤$Є¤îýÿI‹mIƒ$HƒEIƒm„Ô¿è ýúÿH…ÀH‰ÃH‰„$È„H‹„$Ø1ÒL‰cH‰ÞH‰ïHÇ„$ÐHÇ„$ØH‰C èPäûÿH…ÀH‰„$àt!Hƒ+u H‹CH‰ßÿP0HÇ„$ÈéGîýÿH‹D$@I‰íÇ„$¸+Ç„$gHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÞþÿH‹D$@I‰íÇ„$²+Ç„$gHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é:þÿH=3Rèùúÿ…À„éýÿH‹D$@HÇ„$ÈE1ÿÇ„$‰+Ç„$gE1äHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é{þÿ1ÒH‰îL‰÷è.ùúÿH…ÀH‰„$È…lçýÿH‹D$@Ç„$‰+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¾þÿÇ„$&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péGþÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$ðHÇ„$pÇ„$l&Ç„$2HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`éà þÿ¾H‰Çè‡õúÿéN þÿH‰ßèéðúÿHcÐA‰ÇH9ЄÎZþÿHƒÀ…œìþÿè»ðúÿH…À„ŽìþÿéŸìþÿH‰ßèõùûÿA‰Çé¡ZþÿÇ„$«(Ç„$DE1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péóþÿH‹|$hH‰ÎèöïúÿI‰Åé`GþÿÇ„$#&Ç„$0E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$péþÿHÇD$HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$øHÇ„$XHÇ„$PHÇ„$hHÇ„$ðHÇD$hHÇ„$pÇ„$!&Ç„$0éŸ8þÿH‹CH‰ßÿP0éqÖýÿH‹D$@Ç„$E,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¸þÿH=±@èœçúÿ…À„ÂØýÿH‹D$@HÇ„$ØE1ÿÇ„$œ+Ç„$gE1äHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é÷þÿè"æúÿH…À„­H‹D$@HÇ„$ØE1ÿÇ„$œ+Ç„$gE1äHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é<ÿýÿH‹v$H5N=H‹8èÖâúÿé}üÿÿH‰ÎL‰÷è&æúÿI‰ÅéÐQþÿH‹D$@Ç„$®+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ émýýÿH=f;èQâúÿ…À„"—þÿH‹D$@HÇ„$ÐE1ÿÇ„$&,Ç„$jE1äHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¬ûýÿH‰ÚL‰þL‰÷è^âúÿH…ÀH‰ÅH‰„$Ð…}•þÿH‹D$@Ç„$&,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ééùýÿH‹¼$˜H‰ÎèéàúÿH‰Åé"þÿH‹D$@Ç„$½+E1íÇ„$gHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é-øýÿH=&6èÝúÿ…À„uŸþÿé*ÿÿH‰ÆH‰×è©Ûúÿ…À…ÀÞýÿH‰\$hÇ„$‡(E1íÇ„$BHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$HÇD$(E1öHÇD$HÇ„$1íHÇ„$ˆHÇ„$€1ÛHÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pé‚õýÿH‹D$0Ç„$Ë)E1ÿÇ„$KHÇD$8E1äHÇD$0HÇD$E1öH‰„$`H‹D$h1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péñòýÿH‹’j$H5ë3ºE1ÿE1äE1ö1í1ÛH‹81Àè§ÙúÿH‹D$0Ç„$Ë)Ç„$KHÇD$8HÇD$0HÇD$H‰„$`H‹D$hHÇD$HÇD$(HÇD$HÇ„$H‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péCðýÿènÕúÿH…À„«H‹D$@HÇ„$ÈE1ÿÇ„$‰+Ç„$gE1äHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éŠîýÿH‹Ûe$H5œ,H‹8è$ÒúÿéIÚÿÿH‹D$@Ç„$*,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÎìýÿH‹|$hH‰ÎèÑÓúÿH‰Ãé,-þÿèäÑúÿH…À„­H‹D$@HÇ„$ÐE1ÿÇ„$&,Ç„$jE1äHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éþêýÿH‹Ob$H5)H‹8è˜ÎúÿéŠíÿÿòA}ò|$(é!·ÿÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$4E1äÇ„$ÁHÇD$81íHÇD$01ÛH‰D$HégêýÿòAmò¬$ˆé9¶ÿÿè~ÏúÿH…À„ª¶ÿÿH‹„$ Ç„$ƒ4E1ÿÇ„$ÁHÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéÚéýÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$}4E1äÇ„$ÁHÇD$81íHÇD$01ÛH‰D$HéoéýÿèšÎúÿH…À„`µÿÿH‹„$ Ç„$4E1ÿÇ„$ÁHÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéöèýÿòA]òœ$8é\´ÿÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$y4E1äÇ„$ÁHÇD$81íHÇD$01ÛH‰D$HéwèýÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$M4E1äÇ„$¿HÇD$81íHÇD$01ÛH‰D$Hé èýÿè7ÍúÿH…À„_²ÿÿH‹„$ Ç„$O4E1ÿÇ„$¿HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé“çýÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$u4E1äÇ„$ÁHÇD$81íHÇD$01ÛH‰D$Hé(çýÿòAuòt$(éb±ÿÿèBÌúÿH…À„0²ÿÿH‹„$ Ç„$w4E1ÿÇ„$ÁHÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéžæýÿòAuòt$Héž±ÿÿè¸ËúÿH…À„²ÿÿH‹„$ Ç„${4E1ÿÇ„$ÁHÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéæýÿòAeò¤$ˆéâ¯ÿÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$I4E1äÇ„$¿HÇD$81íHÇD$01ÛH‰D$Hé•åýÿòA}ò¼$8é÷®ÿÿè¬ÊúÿH…À„n¯ÿÿH‹„$ Ç„$K4E1ÿÇ„$¿HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéåýÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$E4E1äÇ„$¿HÇD$81íHÇD$01ÛH‰D$HéäýÿèÈÉúÿH…À„®ÿÿH‹„$ Ç„$G4E1ÿÇ„$¿HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé$äýÿòAmòl$Hé ­ÿÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$A4E1äÇ„$¿HÇD$81íHÇD$01ÛH‰D$Hé¨ãýÿH‹„$`H‰D$Hé'´ÿÿèÁÈúÿH…À„«¬ÿÿH‹„$ Ç„$C4E1ÿÇ„$¿HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéãýÿH‰¬$E1íHÇD$HÇD$E1öHÇD$(HÇD$Ç„$ 4E1ÿÇ„$¹HÇD$8E1äHÇD$01í1Ûé´âýÿE1íÇ„$ 4Ç„$¸HÇD$8HÇD$0E1ÿHÇD$E1äE1ö1í1ÛHÇD$(HÇD$é\âýÿ¾H‰Çè Ìúÿéí©ÿÿ»H‹D$H‹|$H‹H‰D$HƒèH…ÀH‰uH‹GÿP0èˬûÿ…À…ñH?H4HƒûH5¢'HDÂH‰ÚE1íH‰ÁH‹ŽY$E1ÿE1äE1ö1í1ÛH‹81Àè¯ÈúÿÇ„$4Ç„$¸HÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$é~áýÿ1Ûé2ÿÿÿHÇD$E1öHÇD$(HÇD$Ç„$4E1ÿÇ„$¸HÇD$8E1äHÇD$01í1Ûé"áýÿE1íÇ„$4Ç„$¸HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éÁàýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$5E1äÇ„$ÅHÇD$81íHÇD$01ÛH‰D$HéVàýÿH‹D$0HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$÷4E1äH‰„$ H‹„$ 1íÇ„$ÃHÇD$81ÛHÇD$0H‰D$HéÞßýÿH‹„$ Ç„$è4E1ÿÇ„$ÃHÇD$8E1äHÇD$0HÇD$1í1ÛHÇD$(HÇD$H‰D$HéßýÿM‹fM…ä„®ÿÿI‹nIƒ$HƒEIƒ.u I‹FL‰÷ÿP0¿èZÄúÿH…ÀH‰ÃH‰„$è„¶H‹D$1ÒL‰cH‰ÞH‰ïH‰C 輫ûÿH…ÀH‰„$Ðt$Hƒ+u H‹CH‰ßÿP0HÇ„$èI‰îéÕ­ÿÿH‹„$ I‰îÇ„$ò4Ç„$ÃHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé€ÞýÿH‹„$ I‰îÇ„$ì4Ç„$ÃHÇD$8E1ÿHÇD$0HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé!ÞýÿH‹„$ HÇD$E1ÿHÇD$(HÇD$E1äÇ„$Û4Ç„$Ã1íHÇD$8HÇD$01ÛH‰D$HéÂÝýÿH‹„$ HÇD$E1ÿHÇD$(HÇD$E1äÇ„$Ø4Ç„$Ã1íHÇD$8HÇD$01ÛH‰D$HécÝýÿH‹„$ HÇD$E1öHÇD$(HÇD$E1ÿÇ„$Ö4Ç„$ÃE1äHÇD$8HÇD$01í1ÛH‰D$HéÝýÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$Ô4E1äÇ„$ÃHÇD$81íHÇD$01ÛH‰D$Hé–ÜýÿH‹„$˜E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$»4E1äH‰„$H‹„$ 1íÇ„$ÂHÇD$81ÛHÇD$0H‰D$HéÜýÿL‹eM…ä„|©ÿÿH‹]Iƒ$HƒHƒmH‰œ$Ðu H‹EH‰ïÿP0¿èîÀúÿH…ÀH‰D$„’H‹D$1ÒH‰ßL‰`L‰p H‰ÆèV¨ûÿH…ÀH‰„$„òH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰…©ÿÿH‹CH‰ßÿP0é©ÿÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$¥4Ç„$Â1íHÇD$8HÇD$01ÛH‰D$HéÛýÿH‹„$ E1íÇ„$£4Ç„$ÂHÇD$8E1ÿHÇD$0HÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé³ÚýÿH‹„$˜E1íHÇD$E1öHÇD$(HÇD$Ç„$Å4Ç„$ÂE1ÿH‰„$H‹„$ E1äHÇD$8HÇD$01í1ÛH‰D$Hé>ÚýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$¿4Ç„$Â1íHÇD$8HÇD$01ÛH‰D$HéßÙýÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$¡4Ç„$ÂE1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$HézÙýÿH‹„$ E1íÇ„$Ÿ4Ç„$ÂHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé ÙýÿH‹„$ E1íÇ„$œ4Ç„$ÂHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HéžØýÿH‹„$ E1íÇ„$š4Ç„$ÂHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé0ØýÿE1íÇ„$ÿ<Ç„$ HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éÏ×ýÿH‹„$€H‰„$8éϯÿÿH‹=ƒ•$èNÀûÿH…ÀH‰ÃH‰„$Є$òD$Hè¼úÿH…ÀI‰Å„¢ò„$8èõ»úÿH…ÀH‰D$H‰„$è„ò„$ˆèÑ»úÿH…ÀH‰D$„•ò„$pèµ»úÿH…ÀI‰Ä„ò„$xè›»úÿH…ÀH‰D$H‰„$È„™ò„$èw»úÿH…ÀH‰D$(H‰„$ð„ò„$€èS»úÿH…ÀI‰ÇH‰„$ø„•H‹„$H9CHÇ„$à„&E1öIFH‰Ç袻úÿH…ÀH‰Å„®H‹„$àH…ÀtH‰EHÇ„$àH‹\$JDõ1ÒH‰îHÇ„$èHÇ„$ÈL‰hL‰`0H‰X H‹\$L‰xHHÇ„$ðHÇ„$øH‰X(H‹\$H‰X8H‹\$(H‰X@H‹œ$ÐH‰ßè¢ûÿH…ÀH‰D$H„Hƒmu H‹EH‰ïÿP0Hƒ+u H‹CH‰ßÿP0H‹„$ H‹œ$ HÇ„$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0¿茺úÿH…ÀI‰Æ„íH‹D$HH‹¼$(L‰öHƒI‰FH‹„$`HƒI‰F H‹„$HƒI‰F(è“¡ûÿƒÀtMIƒ.u I‹FL‰÷ÿP0H‹„$ H9D$x„GH‹t$HH‹|$xè\¡ûÿƒÀ„ÎH‹„$ H‰D$0ér¥ÿÿE1íÇ„$v5Ç„$ÊHÇD$8HÇD$0E1ÿHÇD$E1äHÇD$1í1ÛHÇD$(HÇD$éƒÔýÿE1íHÇD$HÇD$HÇD$(HÇD$E1ÿÇ„$k5Ç„$ÊE1äHÇD$8HÇD$01í1Ûé%ÔýÿE1íÇ„$„5Ç„$ËHÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éÄÓýÿH‹íK$H¼H5¯E1íE1ÿE1äE1ö1í1ÛH‹81ÀèuºúÿÇ„$‚5Ç„$ËHÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$éDÓýÿH‹„$ E1íHÇD$HÇD$E1öHÇD$(HÇD$Ç„$]5E1ÿÇ„$ÉHÇD$8E1äHÇD$01ÛH‰D$HéØÒýÿH‹„$ Ç„$C5E1ÿÇ„$ÉHÇD$8E1öHÇD$0HÇD$1ÛHÇD$(HÇD$H‰D$Hé{ÒýÿH‹CH…ÀH‰„$à„ÅûÿÿH‹SHƒA¾HƒH‹H‰”$ÐHƒèH…ÀH‰…›ûÿÿH‹CH‰ßÿP0éŒûÿÿH‹„$ Ç„$55E1ÿÇ„$ÉHÇD$8E1öHÇD$0HÇD$1í1ÛHÇD$(HÇD$H‰D$HéËÑýÿH‹„$ Ç„$35E1ÿÇ„$ÉHÇD$8E1öHÇD$0HÇD$1í1ÛHÇD$(HÇD$H‰D$HélÑýÿH‹„$ Ç„$15E1ÿÇ„$ÉHÇD$8E1öHÇD$0HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé ÑýÿH‹„$ Ç„$/5E1ÿÇ„$ÉHÇD$8E1öHÇD$0HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé®ÐýÿH‹„$ HÇD$E1öHÇD$(HÇD$E1ÿÇ„$-5Ç„$ÉE1äHÇD$8HÇD$01í1ÛH‰D$HéLÐýÿH‹„$ Ç„$+5E1ÿÇ„$ÉHÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéáÏýÿH‹„$ HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$)5E1äÇ„$ÉHÇD$81íHÇD$01ÛH‰D$HévÏýÿH‹„$ E1íÇ„$'5Ç„$ÉHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HéÏýÿè3´úÿH…À„þŸÿÿE1íÇ„$=Ç„$ HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$é™Îýÿ1Àf.d$(›ÀEÃzu1Àf.¤$€›ÀEÃ…À„¶H‹=ç‹$è·ûÿH…ÀH‰ÃH‰„$Є(ò„$PèÀ²úÿH…ÀH‰Å„¢ò„$X覲úÿH…ÀH‰D$H‰„$ø„ò„$h育úÿH…ÀI‰ÇH‰„$ð„„ò„$Hè`²úÿH…ÀI‰ÅH‰„$È„H‹„$H9C„'¿èÀ²úÿH…ÀH‰D$„¬1ÀH‹\$H‹t$1ÒHÇ„$øHÇ„$ðHÇ„$ÈHÃH‹\$H‰hL‰x(H‰X H‹œ$ÐL‰h0H‰ßèç™ûÿH…ÀH‰D$„çH‹D$H‹L$H‹H‰D$HƒèH…ÀH‰u H‹AH‰ÏÿP0Hƒ+u H‹CH‰ßÿP0Hƒ|$PHÇ„$Ðt(H‹D$PH‹\$PH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5f…$H‹|$è4šûÿH…ÀH‰D$(H‰„$ЄÔH‹=7Š$è2µûÿH…ÀH‰ÃH‰„$È„<òD$Hèó°úÿH…ÀH‰D$H‰„$ð„£ò„$8èϰúÿH…ÀH‰D$0H‰„$ø„ò„$ˆè«°úÿH…ÀH‰Å„wH‹¼$ 1öèz¸úÿH…ÀI‰Ä„éH‰Ç蜭úÿH…ÀH‰D$HH‰„$è„XIƒ,$u I‹D$L‰çÿP0H‹¼$ ¾è,¸úÿH…ÀI‰Ä„µH‰ÇèN­úÿH…ÀI‰Å„1Iƒ,$u I‹D$L‰çÿP0H‹¼$ ¾èè·úÿH…ÀI‰Ä„‘ H‰Çè ­úÿH…ÀI‰ÇH‰„$à„˜ Iƒ,$u I‹D$L‰çÿP0H‹„$H9C„ ¿è8°úÿH…ÀH‰D$„— 1ÀH‹\$H‹t$1ÒHÇ„$ðHÇ„$øHÇ„$èHÇ„$àHÃH‹\$H‰h(L‰h8H‰XH‹\$0L‰x@H‰X H‹\$HH‰X0H‹œ$ÈH‰ßèA—ûÿH…ÀH‰D$„ª H‹D$H‹t$H‹H‰D$0HƒèH…ÀH‰u H‹FH‰÷ÿP0Hƒ+u H‹CH‰ßÿP0H‹=ô‡$HÇ„$Èèã²ûÿH…ÀH‰D$„æ ò„$pè§®úÿH…ÀH‰D$0H‰„$à„\ ò„$x胮úÿH…ÀI‰Å„ßò„$èi®úÿH…ÀH‰D$HH‰„$è„XH‹|$`1öè1¶úÿH…ÀH‰Å„ßH‹|$`¾è¶úÿH…ÀH‰D$PH‰„$ø„YH‹|$`¾èñµúÿH…ÀI‰ÆH‰„$ð„uH‹D$H‹œ$H9X„ü¿èb®úÿH…ÀI‰Ç„ˆ1ÀH‹\$0IÇH‹|$1ÒL‰þHÇ„$àL‰h H‰h0H‰XH‹\$HL‰p@HÇ„$èHÇ„$øHÇ„$ðH‰X(H‹\$PH‰X8èz•ûÿH…ÀH‰ÃH‰„$È„¥Iƒ/u I‹GL‰ÿÿP0H‹D$H‹L$H‹H‰D$0HƒèH…ÀH‰u H‹AH‰ÏÿP0¿èTªúÿH…ÀH‰D$„ƒH‹@H‹t$HÇ„$ÈH‰0H‹D$H‹@H‰XH‹D$(H‹œ$H9X…’H‹XH…ÛH‰œ$È„}H‹hHƒH‹|$(HƒEH‹H‰¬$ÐH‰D$HƒèH…ÀH‰uH‹GÿP0¿èö¬úÿH…ÀH‰D$„H‹D$1ÒH‰ïHÇ„$ÈH‰XH‹\$H‰ÆH‰X èM”ûÿH…ÀI‰Æ„ÜH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰„H‹”$ÐHƒ*u H‹BH‰×ÿP0Iƒ.HÇ„$Ðu I‹FL‰÷ÿP0H‹„$ H9D$x„ßH‹t$H‹|$x艓ûÿƒÀH‹D$H‰D$P…—ÿÿH‹„$ E1íÇ„$ˆ6Ç„$ÑHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$H鍯ýÿH‹t$H‹¼$Ðèf²ûÿH…ÀI‰Æ„ýH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰…éþÿÿH‹CH‰ßÿP0éÚþÿÿH‹‚>$HQùH5DE1íE1ÿE1äE1ö1í1ÛH‹81Àè ­úÿH‹D$Ç„$†6Ç„$ÑHÇD$8HÇD$0HÇD$H‰D$PH‹D$xHÇD$HÇD$(HÇD$H‰D$HéÅÅýÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿÇ„$v6Ç„$ÐE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$HéYÅýÿH‹D$E1íE1öHÇD$(HÇD$E1ÿÇ„$p6Ç„$ÐE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$HéóÄýÿH‹D$E1íE1öHÇD$(HÇD$E1ÿÇ„$Y6Ç„$ÐE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$HéÄýÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿÇ„$l6Ç„$ÐE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$Hé!ÄýÿH‹D$E1íÇ„$U6Ç„$ÐHÇD$8E1äHÇD$0E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$Hé¾ÃýÿH‹D$Ç„$>6E1äÇ„$ÐHÇD$8E1öHÇD$01ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Hé`ÃýÿL‹`M…ä„÷ùÿÿH‹XIƒ$H‹|$HƒH‹H‰„$8HƒèH…ÀH‰uH‹GÿP0¿è)¨úÿH…ÀI‰ÇttM‰gH‰\$¸éºùÿÿH‹D$Ç„$06E1ÿÇ„$ÐHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$HéÂýÿH‹D$H‰\$E1öÇ„$>6Ç„$Ð1ÛHÇD$8HÇD$0H‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé=ÂýÿH‹D$Ç„$.6E1ÿÇ„$ÐHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$HéÜÁýÿH‹D$Ç„$,6E1ÿÇ„$ÐHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé{ÁýÿH‹D$Ç„$*6E1ÿÇ„$ÐHÇD$8E1äHÇD$0E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$HéÁýÿH‹D$E1öHÇD$(HÇD$Ç„$(6E1ÿÇ„$ÐHÇD$8E1äH‰D$PH‹„$ 1íHÇD$01ÛH‰D$HéµÀýÿH‹D$E1íÇ„$&6Ç„$ÐHÇD$8E1ÿHÇD$0E1äE1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$HéOÀýÿH‹D$E1íE1öHÇD$(HÇD$E1ÿÇ„$$6Ç„$ÐE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$Héé¿ýÿH‹D$E1íE1öHÇD$(HÇD$E1ÿÇ„$ 6Ç„$ÐE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$H郿ýÿH‹D$HÇD$E1öHÇD$(HÇD$E1ÿÇ„$ 6Ç„$ÐE1äH‰D$PH‹„$ 1ÛHÇD$8HÇD$0H‰D$Hé¿ýÿL‹cM…ä„ÚóÿÿH‹CIƒ$HƒHƒ+H‰„$Èu H‹CH‰ßÿP0¿èí£úÿH…ÀI‰Æ„ƒM‰fL‰t$¸é¦óÿÿH‹D$Ç„$ú5E1ÿÇ„$ÐHÇD$8E1öHÇD$0HÇD$1ÛH‰D$PH‹„$ HÇD$HÇD$(HÇD$H‰D$HéN¾ýÿH‹D$HÇD$E1ÿHÇD$HÇD$(1ÛHÇD$Ç„$ 6H‰D$PH‹„$ Ç„$ÐHÇD$8HÇD$0H‰D$Héá½ýÿH‹D$Ç„$ø5E1ÿÇ„$ÐHÇD$8E1öHÇD$0HÇD$1ÛH‰D$PH‹„$ HÇD$HÇD$(HÇD$H‰D$Héq½ýÿH‹D$HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$õ51ÛH‰D$PH‹„$ Ç„$ÐHÇD$8HÇD$0H‰D$Hé½ýÿH‹D$E1íÇ„$ó5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1öH‰D$PH‹„$ 1ÛHÇD$HÇD$(HÇD$H‰D$H鎼ýÿH‹D$E1íÇ„$ð5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1öH‰D$PH‹„$ 1ÛHÇD$HÇD$(HÇD$H‰D$Hé¼ýÿH‹D$E1íÇ„$î5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1öH‰D$PH‹„$ 1ÛHÇD$HÇD$(HÇD$H‰D$H騻ýÿH‹D$E1íÇ„$ì5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1ÛHÇD$(HÇD$H‰D$Hé2»ýÿH‹D$E1íÇ„$ê5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$H麺ýÿH‹D$E1íÇ„$è5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéBºýÿH‹D$E1íÇ„$æ5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéʹýÿH‹D$E1íÇ„$ä5Ç„$ÐHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéR¹ýÿH‹„$ E1íHÇD$E1öHÇD$(Ç„$Ö5Ç„$ÏHÇD$8E1ÿHÇD$0E1ä1í1ÛH‰D$Héö¸ýÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$Å5Ç„$ÏE1ÿHÇD$8HÇD$0E1ä1ÛH‰D$H铸ýÿL‹cM…ä„ÌêÿÿH‹CIƒ$HƒHƒ+H‰„$Ðu H‹CH‰ßÿP0¿ègúÿH…ÀI‰ÆtM‰fL‰t$¸éœêÿÿH‹„$ E1íÇ„$·5Ç„$ÏHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1ÛHÇD$(HÇD$H‰D$HéзýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$Å51ÛÇ„$ÏHÇD$8HÇD$0H‰D$Héj·ýÿH‹„$ E1íÇ„$µ5Ç„$ÏHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1ÛHÇD$(HÇD$H‰D$Héþ¶ýÿH‹„$ E1íÇ„$³5Ç„$ÏHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1ÛHÇD$(HÇD$H‰D$Hé’¶ýÿH‹„$ E1íÇ„$±5Ç„$ÏHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1ÛHÇD$(HÇD$H‰D$Hé&¶ýÿH‹„$ E1íÇ„$¯5Ç„$ÏHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$H鸵ýÿH‹=¹o$èLžûÿH…ÀH‰ÃH‰„$Єm˜H‹5‰q$H‰Çè ƒûÿH…ÀH‰D$„Ò—Hƒ+u H‹CH‰ßÿP0H‹D$1ÛH‹Œ$HÇ„$ÐH9H„J—HCH‰ÇèJšúÿH…ÀH‰D$„Ô–H‹„$ÐH…ÀtH‹|$HÇ„$ÐH‰GH‹D$`H‹t$1ÒH‹|$HƒH‹D$HØH‹\$`H‰XH‹œ$ HƒH‰X ènûÿH…ÀI‰Æ„–H‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5k$1ÒL‰÷è‘—úÿH…ÀH‰D$„ä“Iƒ.u I‹FL‰÷ÿP0H‹„$(H9D$H‹„$0”ÂH9D$¶Ê”ÀÐuH‹„$ H9D$…ü“‰L$0H‹D$H‹\$H‹H‰D$HƒèH…ÀH‰uH‹D$H‹|$H‹@ÿP0H‹=×m$èjœûÿH…ÀI‰Æ„;”H‹57p$H‰Çè/ûÿH…ÀH‰D$„Ð’Iƒ.u I‹FL‰÷ÿP0H‹D$H‹œ$H9X„;’¿耘úÿH…ÀH‰ÃH‰„$Є¸‘1ÀH‹L$`H‹¼$ HÃ1ÒH‰ÞHƒH‰HHƒH‰x H‹|$èÊûÿH…ÀH‰„$à„‘Hƒ+u H‹CH‰ßÿP0H‹D$H‹\$HÇ„$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ|$8t(H‹D$8H‹\$8H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=¦l$è9›ûÿH…ÀH‰D$„H‹5o$H‰ÇèüûÿH…ÀH‰ÃH‰„$Є&H‹D$H‹t$H‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹„$H9C„ŒŽ¿è4—úÿH…ÀI‰Æ„ Ž1ÀH‹œ$àIÆ1ÒL‰öHƒH‰XH‹\$`HƒH‰X H‹œ$ÐH‰ßè€~ûÿH…ÀH‰D$„cIƒ.u I‹FL‰÷ÿP0Hƒ+u H‹CH‰ßÿP0Hƒ¼$¨HÇ„$Ðt.H‹„$¨H‹œ$¨H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=nk$èšûÿH…ÀH‰ÃH‰„$ЄLŒH‹5Æm$H‰Çè¾~ûÿH…ÀI‰Æ„¹‹Hƒ+u H‹CH‰ßÿP01ÛH‹„$I9FHÇ„$ЄQ‹HCH‰Çè–úÿH…ÀH‰D$„ÈŠH‹„$ÐH…ÀtH‹L$HÇ„$ÐH‰AH‹„$àH‹t$1ÒL‰÷HƒH‹D$HØH‹œ$àH‰XH‹œ$ HƒH‰X è&}ûÿH…ÀH‰D$„ˆH‹D$H‹\$H‹H‰D$8HƒèH…ÀH‰u H‹CH‰ßÿP0Iƒ.u I‹FL‰÷ÿP0Hƒ¼$¸t.H‹„$¸H‹œ$¸H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=k$蛘ûÿH…ÀI‰Æ„‡H‹5j$H‰Çè`}ûÿH…ÀH‰D$„m†Iƒ.u I‹FL‰÷ÿP0H‹D$H‹œ$H9X„„H‹t$H‹|$èl›ûÿH…ÀI‰Æ„ˆH‹D$H‹\$H‹H‰D$8HƒèH…ÀH‰u H‹CH‰ßÿP0H‹|$L‰öè«’úÿH…ÀH‰„$¨„L‡Iƒ.u I‹FL‰÷ÿP0H‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=j$覗ûÿH…ÀH‰D$„xƒH‹5i$H‰Çèi|ûÿH…ÀH‰ÃH‰„$Єã‚H‹D$H‹t$H‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹„$H9C„‚H‹t$H‰ßè^šûÿH…ÀH‰D$„…H‹”$ÐHƒ*u H‹BH‰×ÿP0H‹t$H‹|$è©‘úÿH…ÀH‰„$¸H‰„$ЄɀH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ò„$Hèb’úÿH…ÀH‰ÃH‰„$ЄéH‹´$¨H‰ÇèÞúÿH…ÀH‰D$„fHƒ+u H‹CH‰ßÿP0H‹t$H‹|$@è!úÿH…ÀH‰ÃH‰„$ЄÎ~H‹D$H‹|$H‹H‰D$HƒèH…ÀH‰uH‹GÿP0ò„$HèÊ‘úÿH…ÀH‰D$„(~H‹´$¨H‰ÇèLúÿH…ÀI‰Æ„ª}H‹D$H‹L$H‹H‰D$HƒèH…ÀH‰u H‹AH‰ÏÿP0H‹|$@L‰öè”úÿH…ÀH‰D$„}Iƒ.u I‹FL‰÷ÿP0¿蓎úÿH…ÀI‰Æ„}|H‹@fïÀH‹¼$`L‰öHÇ„$ÐH‰H‹\$I‹FH‰Xè®ÇúÿH˜H‰Çèé’úÿH…ÀH‰„$„³{Iƒ.u I‹FL‰÷ÿP0Hƒ¼$ t.H‹„$ H‹œ$ H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ò„$Hè‘úÿH…ÀH‰D$„ézH‹´$¸H‰ÇèúÿH…ÀI‰Æ„kzH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹|$@L‰öèBŽúÿH…ÀH‰D$„ÆyIƒ.u I‹FL‰÷ÿP0ò„$HèúÿH…ÀI‰Æ„:yH‹´$¸H‰Ç芎úÿH…ÀH‰ÃH‰„$Є´xIƒ.u I‹FL‰÷ÿP0H‹|$@H‰Þèi’úÿH…ÀI‰Æ„)xHƒ+u H‹CH‰ßÿP0¿èãŒúÿH…ÀH‰ÃH‰„$Є™wH‹@H‹t$fïÀH‹¼$°H‰0H‹CH‰ÞL‰pèÆúÿH˜H‰Çè=‘úÿH…ÀI‰Æ„ðvHƒ+u H‹CH‰ßÿP0H‹¼$L‰öè1úÿH…ÀH‰„$˜H‰„$ЄID$H‰Ç蹈úÿH…ÀH‰ÃH‰„$à„¿H‹„$ðH…ÀtH‰CHÇ„$ðH‹t$(JãH‹|$H‹L$1ÒHÇ„$ÈH‰h0L‰h@H‰pH‹t$0H‰x H‰H(L‰ÿHÇ„$èH‰p8H‰ÞèÃoûÿH…ÀH‰ÅH‰„$ø„ÐHƒ+u H‹CH‰ßÿP0Iƒ/HÇ„$àu I‹GL‰ÿÿP0¿è©„úÿH…ÀI‰Ç„‚H‹@HÇ„$øH‰(H‹„$I9F…-I‹nH…íH‰¬$ø„M‹fHƒEIƒ$Iƒ.L‰¤$Ðu I‹FL‰÷ÿP0¿ès‡úÿH…ÀH‰ÃH‰„$à„_1ÒH‰kL‰{ H‰ÞL‰çHÇ„$øèÎnûÿH…ÀI‰Æ„±Hƒ+u H‹CH‰ßÿP0HÇ„$àH‹”$ÐHƒ*u H‹BH‰×ÿP0HÇ„$ÐIƒ.u I‹FL‰÷ÿP0H‹„$ H9D$x„;H‹t$H‹|$xènûÿƒÀ„«H‹„$àH‰D$8H‹D$H‰D$PH‹„$ H‰D$0H‹„$ H‰D$HérÿÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$Ã8E1äH‰D$PH‹„$ 1íÇ„$ðHÇD$81ÛHÇD$0H‰D$Héü ýÿH‹D$E1íÇ„$A9Ç„$óHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé„ ýÿH‹­$H|ÓH5oéE1íE1ÿE1äE1ö1í1ÛH‹81Àè5‡úÿH‹D$Ç„$?9Ç„$óHÇD$8HÇD$0HÇD$H‰D$PH‹D$xHÇD$HÇD$(HÇD$H‰D$HéðŸýÿH‹D$E1íÇ„$½8Ç„$ðHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé{ŸýÿL‰÷L‰þè@‹ûÿH…ÀI‰Æ„šIƒ/…TýÿÿI‹GL‰ÿÿP0éEýÿÿH‹D$E1íÇ„$©8Ç„$ðHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$HéÖžýÿH‹D$Ç„$Ž8E1äÇ„$ðHÇD$8E1öHÇD$01ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$HéxžýÿI‹GH…ÀH‰„$ð„­úÿÿI‹_HƒHƒIƒ/„õI‰ßA¼é‰úÿÿH‹D$E1íÇ„$¥8Ç„$ðHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$HéÊýÿH‹D$E1íHÇD$HÇD$HÇD$(E1äHÇD$Ç„$¹81íH‰D$PH‹„$ 1ÛÇ„$ðHÇD$8HÇD$0H‰D$HéXýÿI‹GL‰ÿA¼I‰ßÿP0éŠùÿÿH‹D$E1öHÇD$(HÇD$Ç„$8E1äÇ„$ðHÇD$81ÛH‰D$PH‹„$ HÇD$0H‰D$HéâœýÿH‹D$E1íÇ„$}8Ç„$ðHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$HéœýÿH‹D$E1íÇ„$z8Ç„$ðHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé œýÿH‹D$E1íÇ„$x8Ç„$ðHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé¿›ýÿH‹D$E1íÇ„$u8Ç„$ðHÇD$8E1äHÇD$0E1ö1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé^›ýÿH‹D$E1íÇ„$s8Ç„$ðHÇD$8E1äHÇD$0E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$HéûšýÿH‹D$E1íE1öHÇD$(HÇD$E1äÇ„$q8Ç„$ð1íH‰D$PH‹„$ 1ÛHÇD$8HÇD$0H‰D$H阚ýÿH‹D$E1íHÇD$E1öHÇD$(HÇD$Ç„$o8Ç„$ðE1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$Hé,šýÿH‹D$E1íÇ„$m8Ç„$ðHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé·™ýÿH‹D$E1íÇ„$k8Ç„$ðHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$HéB™ýÿH‹D$E1íÇ„$i8Ç„$ðHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéʘýÿèEfûÿH…ÀI‰ÆH‰„$Є©H‹=JV$èEûÿH…ÀI‰Ç„ò„$Pè }úÿH…ÀH‰D$(H‰„$ø„ƒò„$Xèç|úÿH…ÀI‰Å„÷ò„$hèÍ|úÿH…ÀH‰D$0H‰„$è„AH‹|$`1öè•„úÿH…ÀH‰Å„¹H‹|$`¾èz„úÿH…ÀH‰D$„5H‹|$`¾è]„úÿH…ÀH‰D$„ºE1äH‹„$I9G„lID$H‰ÇèÓ|úÿH…ÀH‰ÃH‰„$ð„íH‹„$ÈH…ÀtH‰CHÇ„$ÈH‹|$(JãH‹t$H‹L$01ÒHÇ„$øH‰h0L‰h H‰xH‹|$H‰p8H‰H(H‰ÞHÇ„$èH‰x@L‰ÿèÝcûÿH…ÀH‰ÅH‰„$à„òHƒ+u H‹CH‰ßÿP0Iƒ/HÇ„$ðu I‹GL‰ÿÿP0¿èÃxúÿH…ÀI‰Ç„;H‹@HÇ„$àH‰(H‹„$I9F…I‹nH…íH‰¬$à„xM‹fHƒEIƒ$Iƒ.L‰¤$Ðu I‹FL‰÷ÿP0¿è{úÿH…ÀH‰ÃH‰„$ð„¿1ÒH‰kL‰{ H‰ÞL‰çHÇ„$àèèbûÿH…ÀI‰Æt!Hƒ+u H‹CH‰ßÿP0HÇ„$ðéôÿÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$-9E1äH‰D$PH‹„$ 1íÇ„$òHÇD$81ÛHÇD$0H‰D$H骕ýÿH‹D$E1íÇ„$'9Ç„$òHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé5•ýÿL‰÷L‰þèú€ûÿH…ÀI‰Æ…ºõÿÿH‹D$E1íHÇD$HÇD$HÇD$(E1äHÇD$Ç„$#91íH‰D$PH‹„$ 1ÛÇ„$òHÇD$8HÇD$0H‰D$H鬔ýÿH‹D$E1íÇ„$9Ç„$òHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé7”ýÿH‹D$E1íÇ„$9Ç„$òHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé“ýÿH‹D$Ç„$ø8E1äÇ„$òHÇD$8E1öHÇD$01ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Héd“ýÿI‹GH…ÀH‰„$È„ãI‹_HƒHƒIƒ/„µI‰ßA¼é[ûÿÿH‹D$E1öHÇD$(HÇD$Ç„$ê8E1äÇ„$òHÇD$81ÛH‰D$PH‹„$ HÇD$0H‰D$HéÍ’ýÿH‹D$HÇD$E1öHÇD$(HÇD$E1äÇ„$è8Ç„$ò1ÛH‰D$PH‹„$ HÇD$8HÇD$0H‰D$Héf’ýÿH‹D$Ç„$æ8E1äÇ„$òHÇD$8E1öHÇD$0HÇD$1ÛH‰D$PH‹„$ HÇD$HÇD$(HÇD$H‰D$Héö‘ýÿH‹D$Ç„$ä8E1äÇ„$òHÇD$8E1öHÇD$0HÇD$1íH‰D$PH‹„$ 1ÛHÇD$HÇD$(HÇD$H‰D$Hé„‘ýÿI‹GL‰ÿA¼I‰ßÿP0éœùÿÿE1äé”ùÿÿH‹D$HÇD$E1öHÇD$HÇD$(E1äHÇD$Ç„$â81íH‰D$PH‹„$ 1ÛÇ„$òHÇD$8HÇD$0H‰D$HéòýÿH‹D$E1íÇ„$à8Ç„$òHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé}ýÿH‹D$E1íÇ„$Þ8Ç„$òHÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$HéýÿH‹D$E1íÇ„$Ü8Ç„$òHÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéýÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$\8E1äH‰D$PH‹„$ 1íÇ„$ïHÇD$81ÛHÇD$0H‰D$HéýÿVÿ´$ÿ´$ÿ´$¨ÿ´$˜ÿ´$˜ò¼$xò´$˜ò¬$ˆò¤$€ò\$Xò”$¸òŒ$hòD$x諱úÿHƒÄ0H…ÀI‰Æ„´H‹|$xH‰ÆèópúÿH…ÀH‰D$(H‰„$Є%Iƒ.u I‹FL‰÷ÿP0H‹D$xH‹\$xH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5ÎD$H‹¼$ºèÜkûÿH…ÀH‰ÃH‰„$ЄªH;„$(”ÂH;„$0¶Ê”ÀÐuH;œ$ …‰ÍHƒ+u H‹CH‰ßÿP0…íHÇ„$Єµ H‹¼$`¾èá|úÿH…ÀH‰ÃH‰„$Є H‹|$(H‰ÆèôYûÿƒÀ„u Hƒ+u H‹CH‰ßÿP0H‹D$(HÇ„$ÐH‹PH‹@L‹tÐøIƒL‰÷H‹5÷E$èÊZûÿH…ÀH‰D$0H‰„$ð„Ÿ Iƒ.u I‹FL‰÷ÿP0H‹=½J$è¸uûÿH…ÀI‰Ç„øò„$pè~qúÿH…ÀH‰D$8H‰„$à„Uò„$xèZqúÿH…ÀH‰D$„Ãò„$è>qúÿH…ÀH‰D$„:H‹¼$ 1öè yúÿH…ÀH‰Å„´H‹¼$ ¾èíxúÿH…ÀI‰ÆH‰„$è„#H‹¼$ ¾èÇxúÿH…ÀI‰Å„…E1äH‹„$I9G„;ID$H‰Çè?qúÿH…ÀH‰ÃH‰„$È„²H‹„$øH…ÀtH‰CHÇ„$øH‹t$H‹|$JãH‹L$81ÒHÇ„$àL‰p8H‰h0H‰p H‰x(H‰ÞH‰HL‰h@L‰ÿHÇ„$èèNXûÿH…ÀI‰Æ„½Hƒ+u H‹CH‰ßÿP0Iƒ/HÇ„$Èu I‹GL‰ÿÿP0¿èÿÿH‹„$ E1íÇ„$o:Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HénýÿH‰ßèÌSúÿ…À‰Å‰JÿÿÿH‹„$ E1íÇ„$q:Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé„mýÿH‹=ý*$èVûÿH…ÀH‰ÃH‰„$È„Ô6ò„$PèÖQúÿH…ÀI‰ÅH‰„$ø„D6ò„$Xè´QúÿH…ÀI‰Ç„¿5ò„$hèšQúÿH…ÀI‰ÄH‰„$ð„25ò„$HèxQúÿH…ÀH‰ÅH‰„$à„F4H‹„$H9C„Ô3¿èØQúÿH…ÀI‰Æ„V31ÀH‹œ$ÈIÆ1ÒL‰öHÇ„$øHÇ„$ðL‰hL‰x L‰`(H‰h0H‰ßHÇ„$àè 9ûÿH…ÀH‰D$H‰„$Є2Iƒ.u I‹FL‰÷ÿP0Hƒ+u H‹CH‰ßÿP0Hƒ|$PHÇ„$Èt(H‹D$PH‹\$PH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ƒ|$0HÇ„$ЄH‹5…$$H‹|$èS9ûÿH…ÀH‰„$È„}H‹=+)$èVTûÿH…ÀH‰D$H‰„$à„ãH‹=9)$è4TûÿH…ÀI‰Ç„Vò„$PèúOúÿH…ÀH‰D$(H‰„$ø„½ò„$XèÖOúÿH…ÀH‰D$„5ò„$hèºOúÿH…ÀH‰D$8H‰„$è„¥H‹|$`1öè‚WúÿH…ÀI‰Å„$H‹|$`¾ègWúÿH…ÀI‰Æ„HH‹|$`¾èLWúÿH…ÀH‰Å„ÉH‹„$I9G„_¿èÊOúÿH…ÀH‰D$0„ì1ÀH‹\$0H‹t$01ÒL‰ÿHÇ„$øHÇ„$èHÃH‹\$(L‰h0L‰p8H‰XH‹\$H‰h@H‰X H‹\$8H‰X(èó6ûÿH…ÀH‰D$(H‰„$ð„H‹D$0H‹\$0H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Iƒ/u I‹GL‰ÿÿP0H‹=ž'$è™RûÿH…ÀH‰D$0„Pò„$Pè]NúÿH…ÀH‰Å„É ò„$XèCNúÿH…ÀI‰Æ„E ò„$hè)NúÿH…ÀI‰Å„Ä H‹¼$ 1öèøUúÿH…ÀH‰ÃH‰„$è„: H‰ÇèKúÿH…ÀH‰D$„Æ Hƒ+u H‹CH‰ßÿP0H‹¼$ ¾è¬UúÿH…ÀH‰ÃH‰„$è„2 H‰ÇèÆJúÿH…ÀI‰ÇH‰„$ø„¸ Hƒ+u H‹CH‰ßÿP0H‹¼$ ¾èZUúÿH…ÀH‰ÃH‰„$è„$ H‰ÇètJúÿH…ÀI‰Ä„œ Hƒ+u H‹CH‰ßÿP0H‹D$01ÛH‹¼$HÇ„$èH9x„ HCH‰Çè—MúÿH…ÀH‰D$8„¨H‹„$èH…ÀtH‹t$8HÇ„$èH‰FH‹D$8H‹t$81ÒH‹|$0HÇ„$øHØH‹\$L‰x8H‰hL‰p L‰h(H‰X0L‰`@è´4ûÿH…ÀI‰Ç„ÔH‹D$8H‹\$8H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹D$0H‹\$0H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0¿è~IúÿH…ÀH‰D$0„H‹@H‹\$(HÇ„$ðH‰H‹D$0H‹œ$H‹@L‰xH‹D$H9X„=H‹t$0H‹¼$àè"SûÿH…ÀI‰Æ„³H‹D$0H‹\$0H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹”$àHƒ*u H‹BH‰×ÿP0¿èÌHúÿH…ÀH‰ÅH‰„$à„áH‹@H‹”$ÈL‰0H‹„$H9B…H‹BH…ÀH‰D$„üL‹bHƒIƒ$Hƒ*L‰¤$Èu H‹BH‰×ÿP0¿è–KúÿH…ÀH‰ÃH‰„$ð„JH‹D$1ÒH‰k H‰ÞL‰çHÇ„$àH‰Cèì2ûÿH…ÀH‰„$ЄHƒ+u H‹CH‰ßÿP0HÇ„$ðH‹”$ÈHƒ*u H‹BH‰×ÿP0H‹”$ÐHÇ„$ÈHƒ*u H‹BH‰×ÿP0H‹„$ H9D$xHÇ„$ЄH‹t$H‹|$xè2ûÿƒÀ…ÄÿÿH‹D$E1íÇ„$˜;Ç„$ HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé4eýÿH‹D$E1íÇ„$†;Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé¼dýÿH‹åÜ#H´—H5§­E1íE1ÿE1äE1ö1í1ÛH‹81ÀèmKúÿH‹D$Ç„$–;Ç„$ HÇD$8HÇD$0HÇD$H‰D$PH‹D$xHÇD$HÇD$(HÇD$H‰D$Hé(dýÿH‹D$E1íÇ„$€;Ç„$HÇD$8E1ÿHÇD$0E1äHÇD$H‰D$PH‹„$ E1ö1í1ÛHÇD$(HÇD$H‰D$Hé¹cýÿH‰îH‰×è~OûÿH…ÀH‰„$Ðt"Hƒmu H‹EH‰ïÿP0HÇ„$àé`ýÿÿH‹D$E1íÇ„$|;Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HécýÿH‹D$L‰t$E1íÇ„$l;Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé“býÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$];E1äH‰D$PH‹„$ 1íÇ„$HÇD$81ÛH‰D$Hé'býÿL‹xM…ÿ„¶úÿÿH‹hIƒH‹\$HƒEH‹H‰¬$àH‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0¿èèFúÿH…ÀH‰ÃH‰„$ð„¸H‹D$01ÒL‰{H‰ÞH‰ïH‰C èJ.ûÿH…ÀI‰Æt!Hƒ+u H‹CH‰ßÿP0HÇ„$ðécúÿÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$g;E1äH‰D$PH‹„$ 1íÇ„$HÇD$81ÛHÇD$0H‰D$Hé aýÿH‹D$E1íÇ„$a;Ç„$HÇD$8E1äHÇD$HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$Hé `ýÿH‹D$E1íÇ„$J;Ç„$HÇD$8E1äHÇD$HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$Hé4`ýÿH‹D$E1íÇ„$>;Ç„$HÇD$E1äHÇD$E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$HéÑ_ýÿH‹D$Ç„$';E1ÿÇ„$HÇD$1ÛHÇD$(HÇD$H‰D$PH‹„$ H‰D$Hé_ýÿH‹@H…ÀH‰„$è„×öÿÿH‹\$0H‹L$0H‹[HƒH‹D$0HƒH‹H‰D$8HƒèH…ÀH‰tjH‰\$0»é™öÿÿH‹D$Ç„$;E1ÿÇ„$HÇD$81ÛHÇD$HÇD$(H‰D$PH‹„$ HÇD$H‰D$HéÑ^ýÿH‹AH‰ÏÿP0H‰\$0»é%öÿÿH‹D$Ç„$;E1ÿÇ„$HÇD$8E1äHÇD$1ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$HéZ^ýÿH‹D$Ç„$;E1ÿÇ„$HÇD$8E1äHÇD$1ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Héü]ýÿH‹D$Ç„$;E1ÿÇ„$HÇD$8E1äHÇD$1ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Héž]ýÿH‹D$HÇD$E1ÿHÇD$(HÇD$E1äÇ„$;Ç„$1ÛH‰D$PH‹„$ HÇD$8H‰D$Hé@]ýÿH‹D$Ç„$ ;E1ÿÇ„$HÇD$8E1äHÇD$HÇD$1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$HéÙ\ýÿH‹D$HÇD$E1ÿHÇD$HÇD$(E1äHÇD$Ç„$ ;1ÛH‰D$PH‹„$ Ç„$HÇD$8H‰D$Hér\ýÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$;E1äH‰D$PH‹„$ 1ÛÇ„$HÇD$8H‰D$Hé\ýÿH‹D$E1íÇ„$;Ç„$HÇD$8E1ÿHÇD$E1äHÇD$H‰D$PH‹„$ E1ö1ÛHÇD$(HÇD$H‰D$Hé›[ýÿH‹D$E1íÇ„$;Ç„$HÇD$8E1ÿHÇD$E1äHÇD$H‰D$PH‹„$ E1ö1í1ÛHÇD$(HÇD$H‰D$Hé,[ýÿH‹D$E1íÇ„$ø:Ç„$HÇD$8E1äHÇD$HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$HéÀZýÿH‹D$Ç„$á:E1äÇ„$HÇD$81ÛHÇD$HÇD$(H‰D$PH‹„$ HÇD$H‰D$HéeZýÿM‹gM…ä„”ïÿÿI‹_Iƒ$HƒIƒ/u I‹GL‰ÿÿP0¿èA?úÿH…ÀH‰D$0„àH‹D$0I‰ßL‰`¸écïÿÿH‹D$Ç„$Ó:E1äÇ„$HÇD$81ÛHÇD$0HÇD$H‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé©YýÿH‹D$HÇD$E1äHÇD$(HÇD$1íÇ„$Ñ:Ç„$1ÛH‰D$PH‹„$ HÇD$8HÇD$0H‰D$HéCYýÿH‹D$I‰ßÇ„$á:Ç„$HÇD$81ÛHÇD$HÇD$(H‰D$PH‹„$ HÇD$H‰D$HéèXýÿH‹D$HÇD$E1öHÇD$(HÇD$E1äÇ„$Ï:Ç„$1íH‰D$PH‹„$ 1ÛHÇD$8HÇD$0H‰D$HéXýÿH‹D$E1íÇ„$Í:Ç„$HÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$HéXýÿH‹D$E1íHÇD$E1öHÇD$(HÇD$Ç„$Ë:Ç„$E1äH‰D$PH‹„$ 1íHÇD$8HÇD$01ÛH‰D$Hé§WýÿH‹D$E1íÇ„$É:Ç„$HÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé2WýÿH‹D$E1íÇ„$Ç:Ç„$HÇD$8E1äHÇD$0HÇD$E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé½VýÿH‹D$E1íÇ„$½:Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéEVýÿH‹D$E1íÇ„$»:Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéÍUýÿQÿ´$ÿ´$ÿ´$¨ÿ´$˜ÿ´$˜ò¼$xò´$˜ò¬$ˆò¤$€ò\$Xò”$¸òŒ$hòD$xè]xúÿH‰„$HƒÄ0H…ÀH‰Ã„ H‹|$xH‰Æè7úÿH…ÀI‰ÆH‰„$È„uHƒ+u H‹CH‰ßÿP0H‹D$xH‹\$xHÇ„$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ò¤$HHÇ„$Èf.d$(Š"…H‹=‡$èR=ûÿH…ÀH‰ÃH‰„$ЄòD$Hè9úÿH…ÀH‰D$HH‰„$ð„áò„$8èï8úÿH…ÀI‰ÅH‰„$à„Bò„$ˆèÍ8úÿH…ÀH‰D$„²ò„$Pè±8úÿH…ÀH‰D$0„+ò„$Xè•8úÿH…ÀI‰Ç„©ò„$hè{8úÿH…ÀH‰D$8„.òD$(èb8úÿH…ÀI‰Ä„»H‹„$H9C„Y1íHEH‰ÇèÆ8úÿH…ÀH‰D$„ê H‹„$øH…ÀtH‹\$HÇ„$øH‰CH‹D$H‹\$H1ÒH‹t$HÇ„$ðHÇ„$àHèH‰XH‹\$L‰h L‰x8L‰`HH‰X(H‹\$0H‰X0H‹\$8H‰X@H‹œ$ÐH‰ßè¾ûÿH…ÀH‰D$H‰„$È„ß H‹D$H‹|$H‹H‰D$(HƒèH…ÀH‰uH‹GÿP0Hƒ+u H‹CH‰ßÿP0Hƒ¼$ÐHÇ„$Ðt.H‹„$ÐH‹œ$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹D$HÇ„$ÈH‰„$ÐH‹=Þ$è ;ûÿH…ÀH‰D$(H‰„$Є­ H‹=ì$èç:ûÿH…ÀH‰ÃH‰„$ð„ ò„$Pè¥6úÿH…ÀH‰ÅH‰„$à„q ò„$Xèƒ6úÿH…ÀH‰D$„á ò„$hèg6úÿH…ÀH‰D$0„Z H‹¼$ 1öè4>úÿH…ÀI‰Ç„×H‰ÇèV3úÿH…ÀH‰D$8„bIƒ/u I‹GL‰ÿÿP0H‹¼$ ¾èð=úÿH…ÀI‰Ç„ÕH‰Çè3úÿH…ÀI‰Ä„eIƒ/u I‹GL‰ÿÿP0H‹¼$ ¾è®=úÿH…ÀI‰Ç„ÛH‰ÇèÐ2úÿH…ÀH‰D$„Iƒ/u I‹GL‰ÿÿP0H‹„$H9C„¤¿è6úÿH…ÀH‰ÃH‰„$ø„01ÀH‹L$HÃH‹t$0H‹|$81ÒHÇ„$àH‰hH‹¬$ðH‰H H‹L$H‰p(H‰x0H‰ÞL‰`8H‰ïH‰H@è/ûÿH…ÀI‰Å„WHƒ+u H‹CH‰ßÿP0HƒmHÇ„$øu H‹EH‰ïÿP0¿è2úÿH…ÀH‰ÅH‰„$ð„’H‹@H‹œ$ÐL‰(H‹„$ÐHƒH‹EH‰XH‹D$(H‹œ$H9X„®H‹|$(H‰îèÁ;ûÿH…ÀH‰„$È„Hƒmu H‹EH‰ïÿP0HÇ„$ðH‹”$ÐHƒ*u H‹BH‰×ÿP0H‹œ$ÈH‹¼$HÇ„$ÐH‰ÞèçûÿƒÀt8Hƒ+u H‹CH‰ßÿP0H‹„$àHÇ„$ÈH‰D$8H‹D$H‰D$Pér¦ÿÿH‹D$L‰t$xE1íÇ„$Ñ<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$HéÍNýÿH‹D$L‰t$xE1íÇ„$Â<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$HéPNýÿL‹hM…í„EþÿÿL‹`IƒEH‹\$(Iƒ$H‹L‰¤$ÐH‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0¿è3úÿH…ÀH‰ÃH‰„$ø„Ì1ÒL‰kH‰k H‰ÞL‰çHÇ„$ðèkûÿH…ÀH‰„$Èt!Hƒ+u H‹CH‰ßÿP0HÇ„$øéÚýÿÿH‹D$L‰t$xE1íÇ„$Ì<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé MýÿH‹D$L‰t$xE1ÿÇ„$Æ<Ç„$E1äHÇD$8HÇD$0E1öH‰D$PH‹„$ 1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰D$Hé¦LýÿH‹D$L‰t$xE1ÿÇ„$¯<Ç„$E1äHÇD$8HÇD$0E1öH‰D$PH‹„$ 1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰D$Hé,LýÿH‹D$L‰t$xE1ÿHÇD$HÇD$E1öHÇD$(HÇD$E1äH‰D$PH‹„$ 1íÇ„$£<Ç„$1ÛHÇD$8HÇD$0H‰D$Hé²KýÿH‹D$L‰t$xE1íÇ„$Œ<Ç„$E1ÿE1ö1í1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé\KýÿL‹{M…ÿ„OúÿÿH‹CIƒHƒHƒ+H‰„$ðu H‹CH‰ßÿP0¿è10úÿH…ÀH‰ÃH‰„$øtaL‰{¸é#úÿÿH‹D$L‰t$xE1íHÇD$(HÇD$E1öÇ„$}<Ç„$1íH‰D$PH‹„$ 1ÛH‰D$Hé°JýÿH‹D$L‰t$xE1íÇ„$Œ<Ç„$E1ö1í1ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Hé]JýÿH‹D$L‰t$xE1íÇ„${<Ç„$E1öHÇD$1í1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$HéJýÿH‹D$L‰t$xE1íÇ„$x<Ç„$E1öHÇD$1í1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé¥IýÿH‹D$L‰t$xE1íÇ„$v<Ç„$E1äHÇD$E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$HéFIýÿH‹D$L‰t$xE1íÇ„$s<Ç„$E1äHÇD$E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$HéçHýÿH‹D$L‰t$xE1íÇ„$q<Ç„$E1äHÇD$8HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$HéHýÿH‹D$L‰t$xE1íÇ„$o<Ç„$E1ÿHÇD$8E1äHÇD$H‰D$PH‹„$ E1ö1í1ÛHÇD$(HÇD$H‰D$HéHýÿH‹D$L‰t$xE1íHÇD$HÇD$(E1öHÇD$Ç„$m<E1ÿH‰D$PH‹„$ E1äÇ„$HÇD$81íHÇD$01ÛH‰D$Hé GýÿH‹D$L‰t$xE1íÇ„$k<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé#GýÿH‹D$L‰t$xE1íÇ„$i<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé¦FýÿH‹D$L‰t$xE1íÇ„$_<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé)FýÿH‹D$L‰t$xE1íHÇD$(HÇD$E1öÇ„$û;Ç„$E1ÿH‰D$PH‹„$ E1äHÇD$8HÇD$01í1ÛH‰D$Hé¾EýÿH‹D$L‰t$xE1íHÇD$(HÇD$E1öÇ„$á;Ç„$1íH‰D$PH‹„$ 1ÛH‰D$HékEýÿH‹CH…ÀH‰„$ø„’ñÿÿH‹SHƒ½HƒH‹H‰”$ÐHƒèH…ÀH‰…hñÿÿH‹CH‰ßÿP0éYñÿÿH‹D$L‰t$xE1íÇ„$Ó;Ç„$E1öHÇD$1í1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Hé¿DýÿH‹D$L‰t$xE1íÇ„$Ñ;Ç„$E1äHÇD$E1ö1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$Hé`DýÿH‹D$L‰t$xE1íÇ„$Ï;Ç„$E1äHÇD$8HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$HéøCýÿH‹D$L‰t$xE1íÇ„$Í;Ç„$E1ÿHÇD$8E1äHÇD$H‰D$PH‹„$ E1ö1í1ÛHÇD$(HÇD$H‰D$HéCýÿH‹D$L‰t$xE1íHÇD$HÇD$(E1öHÇD$Ç„$Ë;E1ÿH‰D$PH‹„$ E1äÇ„$HÇD$81íHÇD$01ÛH‰D$HéCýÿH‹D$L‰t$xE1íÇ„$É;Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$HéœBýÿH‹D$L‰t$xE1íÇ„$Ç;Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$HéBýÿH‹D$L‰t$xE1íÇ„$Å;Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé¢AýÿH‹=sÿ#è6*ûÿH…ÀH‰ÃH‰„$ЄQòD$Hè÷%úÿH…ÀH‰D$„Äò„$8èÛ%úÿH…ÀI‰Ä„9ò„$ˆèÁ%úÿH…ÀH‰D$8„µòD$(è¨%úÿH…ÀI‰Ç„9ò„$PèŽ%úÿH…ÀH‰D$0„Áò„$Xèr%úÿH…ÀH‰D$„Rò„$hèV%úÿH…ÀH‰D$(H‰„$à„Ûò„$Hè2%úÿH…ÀH‰D$HH‰„$ð„dH‹„$H9C„1íHEH‰ÇèŒ%úÿH…ÀI‰Å„˜H‹„$øH…ÀtI‰EHÇ„$øH‹\$IDí1ÒL‰îHÇ„$àHÇ„$ðL‰` L‰x0H‰XH‹\$8H‰X(H‹\$0H‰X8H‹\$H‰X@H‹\$(H‰XHH‹\$HH‰XPH‹œ$ÐH‰ßèƒ ûÿH…ÀH‰D$H‰„$È„„Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0Hƒ¼$ÐHÇ„$Ðt.H‹„$ÐH‹œ$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹D$HÇ„$ÈH‰„$ÐéÔìÿÿH‹D$L‰t$xE1ÿHÇD$HÇD$(E1öHÇD$Ç„$O<E1äH‰D$PH‹„$ 1íÇ„$HÇD$81ÛHÇD$0H‰D$HéØ>ýÿH‹D$L‰t$x1íHÇD$(HÇD$E1öÇ„$2<Ç„$1ÛH‰D$PH‹„$ H‰D$Héˆ>ýÿH‹CH…ÀH‰„$ø„éýÿÿH‹SHƒ½HƒH‹H‰”$ÐHƒèH…ÀH‰…¿ýÿÿH‹CH‰ßÿP0é°ýÿÿH‹D$L‰t$xE1íÇ„$$<Ç„$E1ö1í1ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Héå=ýÿH‹D$L‰t$xE1íÇ„$"<Ç„$E1ö1í1ÛHÇD$(H‰D$PH‹„$ HÇD$H‰D$Hé’=ýÿH‹D$L‰t$xE1íHÇD$(HÇD$E1öÇ„$ <Ç„$1íH‰D$PH‹„$ 1ÛH‰D$Hé?=ýÿH‹D$L‰t$xE1íÇ„$<Ç„$E1öHÇD$1í1ÛH‰D$PH‹„$ HÇD$(HÇD$H‰D$Héã<ýÿH‹D$L‰t$xE1íÇ„$<Ç„$E1öHÇD$0HÇD$1íH‰D$PH‹„$ 1ÛHÇD$(HÇD$H‰D$Hé~<ýÿH‹D$L‰t$xE1íÇ„$<Ç„$E1ÿHÇD$0HÇD$E1öH‰D$PH‹„$ 1í1ÛHÇD$(HÇD$H‰D$Hé<ýÿH‹D$L‰t$xE1íÇ„$<Ç„$E1ÿHÇD$8HÇD$0E1öH‰D$PH‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$Hé¥;ýÿH‹D$L‰t$xE1íHÇD$HÇD$(E1öHÇD$Ç„$<E1ÿH‰D$PH‹„$ E1äÇ„$HÇD$81íHÇD$01ÛH‰D$Hé1;ýÿH‹D$L‰t$xE1íÇ„$<Ç„$E1ÿHÇD$8HÇD$0E1äH‰D$PH‹„$ E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰D$Hé´:ýÿH‹D$E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$®;E1äH‰D$PH‹„$ 1íÇ„$ HÇD$81ÛHÇD$0H‰D$Hé?:ýÿH‹D$E1íÇ„$¬;Ç„$ HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$PH‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$HéÇ9ýÿH‹„$ L‰t$E1íHÇD$E1öHÇD$(Ç„$£:Ç„$E1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$Héf9ýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1äHÇD$Ç„$’:1íÇ„$HÇD$81ÛHÇD$0H‰D$Héþ8ýÿH‹CH…ÀH‰D$„ÌÿÿH‹t$H‹CHƒH‰„$ÈHƒHƒ+u H‹CH‰ßÿP0¿èÉúÿH…ÀI‰Æt~H‹D$I‰F¸éäËÿÿH‹„$ E1íÇ„$„:Ç„$HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé38ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1äÇ„$’:Ç„$1íHÇD$8HÇD$01ÛH‰D$HéÔ7ýÿH‹„$ E1íÇ„$‚:Ç„$HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Héi7ýÿH‹„$ E1íÇ„$€:Ç„$HÇD$8E1äHÇD$0HÇD$E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Héþ6ýÿH‹„$ E1íÇ„$~:Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé6ýÿH‹„$ E1íÇ„$|:Ç„$HÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé"6ýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$8E1äÇ„$ëHÇD$81íHÇD$01ÛH‰D$Hé·5ýÿL‰÷èúÿ…À‰Ã‰ŽÿÿH‹„$ E1íÇ„$8Ç„$ëHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé:5ýÿH‹„$ E1íÇ„$ê7Ç„$çHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HéÌ4ýÿH‰ßè”úÿ…À‰Å‰ÕŠÿÿH‹„$ E1íÇ„$ì7Ç„$çHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HéL4ýÿH‹„$¨E1íÇ„$Ý7Ç„$áHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$˜H‹„$ 1íHÇD$1ÛHÇD$(HÇD$H‰D$HéÑ3ýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$Ú7E1äÇ„$áHÇD$81íHÇD$01ÛH‰D$Héf3ýÿH‹„$ E1íÇ„$Ò7Ç„$áHÇD$8E1ÿHÇD$0E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé3ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$Ï7Ç„$áE1äHÇD$8HÇD$01í1ÛH‰D$Hé¢2ýÿH‹„$ E1íÇ„$Ì7Ç„$áHÇD$8E1ÿHÇD$0E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé@2ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$Ê7Ç„$áE1äHÇD$8HÇD$01í1ÛH‰D$HéÞ1ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$Ç7Ç„$áE1äHÇD$8HÇD$01í1ÛH‰D$Hé|1ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$Ä7Ç„$áE1äHÇD$8HÇD$01í1ÛH‰D$Hé1ýÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$Â7Ç„$áE1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$Héµ0ýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$µ7E1äH‰„$H‹„$ 1íÇ„$àHÇD$81ÛHÇD$0H‰D$Hé:0ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$­7Ç„$àE1äHÇD$8HÇD$01í1ÛH‰D$HéØ/ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$ª7Ç„$àE1äHÇD$8HÇD$01í1ÛH‰D$Hév/ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$§7Ç„$àE1äHÇD$8HÇD$01í1ÛH‰D$Hé/ýÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$¥7Ç„$àE1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$Hé¯.ýÿH‹„$ E1íÇ„$¢7Ç„$àHÇD$8E1ÿHÇD$0E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HéJ.ýÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$Ÿ7Ç„$àE1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$Héå-ýÿH‹„$ E1íÇ„$7Ç„$àHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Héw-ýÿH‹D$E1íHÇD$E1öHÇD$(Ç„$7Ç„$ÜHÇD$8E1ÿH‰D$H‹D$E1äHÇD$HÇD$01í1ÛH‰„$¸H‹„$ H‰D$Héû,ýÿH‹D$E1íHÇD$E1öHÇD$(HÇD$Ç„$‚7Ç„$ÜE1ÿH‰„$¸H‹„$ E1äHÇD$8HÇD$01í1ÛH‰D$Hé‰,ýÿH‹CH…ÀH‰D$„Ü}ÿÿH‹kHƒHƒEHƒ+H‰¬$Ðu H‹CH‰ßÿP0¿èXúÿH…ÀI‰Æ„­H‹D$1ÒL‰öH‰ïI‰FH‹D$HƒI‰F è¹øúÿH…ÀH‰D$„ Iƒ.…}ÿÿI‹FL‰÷ÿP0ér}ÿÿH‹D$E1íÇ„$t7Ç„$ÜHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$¸H‹„$ E1ö1í1ÛHÇD$(HÇD$H‰D$Hé€+ýÿH‹D$E1íHÇD$E1öHÇD$(HÇD$Ç„$r7Ç„$ÜE1ÿH‰„$¸H‹„$ E1äHÇD$8HÇD$01í1ÛH‰D$Hé+ýÿL‹pM…ö„V{ÿÿH‹hIƒH‹\$HƒEH‹H‰D$8HƒèH…ÀH‰u H‹CH‰ßÿP0¿è×úÿH…ÀH‰ÃH‰„$ЄÍH‹D$L‰s1ÒH‰ÞH‰ïHƒH‰C è5÷úÿH…ÀI‰Æt&Hƒ+u H‹CH‰ßÿP0HÇ„$ÐH‰l$é×zÿÿH‹D$H‰l$E1íHÇD$(HÇD$E1ÿÇ„$`7Ç„$ÛE1äH‰„$¸H‹D$1íHÇD$HÇD$81ÛHÇD$0H‰„$¨H‹„$ H‰D$Héæ)ýÿH‹D$H‰l$E1íÇ„$Z7Ç„$ÛE1ÿHÇD$8HÇD$0E1äH‰„$¸H‹D$1íHÇD$1ÛHÇD$(HÇD$H‰„$¨H‹„$ H‰D$Hée)ýÿH‹D$E1íHÇD$(HÇD$Ç„$I7E1ÿÇ„$ÛHÇD$8E1äH‰„$¸H‹D$1íHÇD$HÇD$01ÛH‰„$¨H‹„$ H‰D$Héé(ýÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿÇ„$G7Ç„$ÛE1äH‰„$¸H‹D$1íHÇD$HÇD$81ÛHÇD$0H‰„$¨H‹„$ H‰D$Héd(ýÿH‹D$E1íHÇD$(HÇD$Ç„$97E1ÿÇ„$ÙHÇD$8E1äH‰„$¨H‹„$ 1íHÇD$01ÛH‰D$Héþ'ýÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿÇ„$e7Ç„$ÛE1äH‰„$¸H‹D$1íL‰t$HÇD$8E1öHÇD$01ÛH‰„$¨H‹„$ H‰D$Héz'ýÿH‹D$E1íHÇD$(HÇD$Ç„$W7E1ÿÇ„$ÛHÇD$8E1äH‰„$¸H‹D$1íHÇD$HÇD$01ÛH‰„$¨H‹„$ H‰D$Héþ&ýÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿÇ„$‹7Ç„$ÜE1äH‰„$¸H‹„$ 1íHÇD$8HÇD$01ÛH‰D$Hé&ýÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿÇ„$…7Ç„$ÜE1äH‰„$¸H‹„$ 1íHÇD$8HÇD$01ÛH‰D$Hé &ýÿH‹D$E1íHÇD$(HÇD$HÇD$E1ÿÇ„$.7Ç„$ÙE1äH‰„$¨H‹„$ 1íHÇD$8HÇD$01ÛH‰D$Hé±%ýÿI‹FH…ÀH‰„$ЄštÿÿI‹^HƒHƒIƒ.„I‰Þ»éwtÿÿH‹D$E1íHÇD$HÇD$(HÇD$E1ÿHÇD$Ç„$7E1äH‰„$¨H‹„$ 1íÇ„$ÙHÇD$81ÛHÇD$0H‰D$Hé%ýÿH‹D$E1íÇ„$7Ç„$ÙHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$¨H‹„$ E1öHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé†$ýÿI‹FL‰÷I‰Þ»ÿP0émsÿÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$7Ç„$ØE1äHÇD$8HÇD$01í1ÛH‰D$Hé $ýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$7E1äÇ„$ØHÇD$81íHÇD$01ÛH‰D$Hé¢#ýÿH‹CH…ÀH‰D$„bqÿÿH‹|$H‹CHƒH‰„$ÐHƒHƒ+u H‹CH‰ßÿP0¿èmúÿH…ÀI‰ÆtxH‹D$I‰F¸é,qÿÿH‹„$ E1íÇ„$õ6Ç„$ØHÇD$8E1ÿHÇD$0E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$HéÝ"ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$7Ç„$ØE1äHÇD$8HÇD$01í1ÛH‰D$Hé{"ýÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$ó6Ç„$ØE1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$Hé"ýÿH‹D$8E1íHÇD$E1öHÇD$(HÇD$Ç„$å6Ç„$×E1ÿH‰„$àH‹„$ E1äHÇD$8HÇD$01í1ÛH‰D$Hé¤!ýÿH‹„$ E1íÇ„$Ú6Ç„$×HÇD$8E1ÿHÇD$0E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé?!ýÿL‹pM…ö„¸mÿÿH‹hIƒH‹\$HƒEH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0¿èúÿH…ÀH‰ÃH‰„$ЄÌL‰sH‰l$¸éwmÿÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$Ë6Ç„$×E1äHÇD$8HÇD$01í1ÛH‰D$Héo ýÿH‹„$ E1íHÇD$HÇD$(HÇD$E1ÿÇ„$¼6Ç„$ÕE1äHÇD$8HÇD$01í1ÛH‰D$Hé ýÿH‹|$èÓúÿ‰D$0ƒÀ…ñkÿÿè!úÿH…À„ãkÿÿH‹„$ E1íÇ„$¾6Ç„$ÕHÇD$8E1ÿHÇD$0HÇD$E1äE1ö1í1ÛHÇD$(HÇD$H‰D$HéƒýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$É6E1äÇ„$×HÇD$81íHÇD$01ÛH‰D$HéýÿH‹„$ H‰l$E1íÇ„$Ú6Ç„$×E1ÿHÇD$8HÇD$0E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé±ýÿH‹„$ E1íHÇD$(HÇD$Ç„$¸6E1ÿÇ„$ÕHÇD$8E1äHÇD$01í1ÛH‰D$HéXýÿH‹„$ E1íE1öHÇD$(HÇD$E1ÿÇ„$­6Ç„$ÕE1äHÇD$8HÇD$01í1ÛH‰D$HéüýÿH‹@H…ÀH‰„$Є¡hÿÿH‹\$H‹t$H‹[HƒH‹D$HƒH‹H‰D$HƒèH…ÀH‰ttH‰\$»échÿÿH‹„$ E1íHÇD$E1öHÇD$(HÇD$Ç„$ž6Ç„$ÕE1ÿHÇD$8HÇD$0E1ä1í1ÛH‰D$HéDýÿH‹FH‰÷ÿP0H‰\$»éågÿÿH‹„$ E1íÇ„$œ6Ç„$ÕHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$H‰D$Hé½ýÿL‰÷è…úÿ…À‰Ã‰ÑìþÿH‹„$ E1íÇ„$5Ç„$ÅHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Hé@ýÿH‹„$ E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$ 5E1äÇ„$ÅHÇD$81íHÇD$01ÛH‰D$HéÕýÿH‹„$ E1íÇ„$5Ç„$ÅHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$1í1ÛHÇD$(HÇD$H‰D$Héjýÿò{ò¼$ˆéµìþÿE1íÇ„$=Ç„$ HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éöýÿòkòl$(éÔëþÿèúÿH…À„OìþÿE1íÇ„$=Ç„$ HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éwýÿE1íÇ„$ =Ç„$ HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éýÿE1íÇ„$=Ç„$ HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éµýÿò„$è'þùÿH…ÀH‰ÃH‰„$ЄºL‰æH‰Çè³üùÿH…ÀH‰ÅH‰„$È„YHƒ+u H‹CH‰ßÿP0H;¬$(HÇ„$ДÂH;¬$0¶Ú”ÀÐuH;¬$ …ƒHƒmu H‹EH‰ïÿP0HÇ„$Èé­ëþÿL‰¬$ðL‰¤$èE1íÇ„$%=Ç„$!E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é•ýÿèÀýùÿH…À„“ëþÿL‰¬$ðL‰¤$èE1íÇ„$8=Ç„$"E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$éýÿL‰¬$ðL‰¤$èE1íÇ„$'=Ç„$!E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é¥ýÿH‰ïèmýùÿ…À‰Ã‰kþÿÿL‰¬$ðL‰¤$èE1íÇ„$)=Ç„$!E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é"ýÿH‹|$hH‰Îè%þùÿH‰ÅéüoýÿI‰ÅéÓöüÿH‹D$8L‰¼$XE1íHÇD$HÇD$E1ÿHÇD$(HÇD$E1äHÇ„$HÇ„$ˆ1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$PH‹D$0HÇ„$pÇ„$'Ç„$6HÇD$8HÇD$0H‰„$hHÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`élýÿH‹D$8L‰¼$XE1íÇ„$'Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÐýÿH‹D$@Ç„$%,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é/ýÿèZõùÿH…À„!4þÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$i)Ç„$JH‰„$PH‹D$hHÇD$8HÇD$0HÇ„$€HÇ„$ðH‰„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øép ýÿH=iKèTòùÿ…À„Üþÿém1þÿ1ÒL‰îH‰ïè ôùÿH…ÀI‰Æ…ÜþÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$i)Ç„$JH‰„$PH‹D$hHÇD$8HÇD$0HÇ„$€HÇ„$ðH‰„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé ýÿH=†Hèqïùÿ…À„}þÿéÊUþÿ1ÒL‰îH‰ïè'ñùÿH…ÀI‰Æ…}þÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹D$hHÇ„$HHÇ„$pÇ„$)Ç„$JH‰„$ðHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéºýÿèåìùÿH…À„ìRþÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹D$hHÇ„$HHÇ„$pÇ„$)Ç„$JH‰„$ðHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$Øé ýÿH‰ÎH‰ïèìùÿH‰Ãé)GýÿH‹CH‰ßÿP0éâßþÿH‹D$@Ç„$?,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éHýÿHÇ„$àH‹”$ÈH‹•z#H9BH‰„$„àxL‰îH‰×èàîúÿH…ÀH‰„$ð„#wIƒmu I‹EL‰ïÿP0H‹”$ÈHƒ*u H‹BH‰×ÿP0Hƒ|$8H‹„$ðHÇ„$ÈH‰„$ht(H‹D$8H‹\$8H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=‹¼#HÇ„$ðèëúÿH…ÀH‰ÃH‰„$È„ÞtH‹5¿#H‰ÇèÏÏúÿH…ÀI‰ÆH‰„$à„sHƒ+u H‹CH‰ßÿP01ÿèôãùÿH…ÀI‰ÇH‰„$È„HqH‹=™½#è¤êúÿH…ÀI‰Å„oH‹5y¼#H‰ÇèiÏúÿH…ÀH‰Å„ÕmIƒmu I‹EL‰ïÿP0èÇçùÿH…ÀI‰Å„lH‹T$0H‹5wº#H‰Çè'èùÿ…ÀˆYjH‹5`À#L‰êH‰ïè-ÎúÿH…ÀH‰ÃH‰„$Ø„”hHƒmu H‹EH‰ïÿP0Iƒmu I‹EL‰ïÿP0H‰ßè/çùÿH…ÀI‰Å„{cHƒ+u H‹CH‰ßÿP0L‰ïHÇ„$ØèŸûÿH‰D$HƒÀ„™aIƒmu I‹EL‰ïÿP0ÇD$8Hc\$8H9\$ŽAH‹=p¼#è{éúÿH…ÀI‰Å„ˆ H‹5è·#H‰Çè@ÎúÿH…ÀI‰ÄH‰„$Ø„Ä Iƒmu I‹EL‰ïÿP0H‰ßèçùÿH…ÀI‰Å„þ¿èåùÿH…ÀH‰Å„IL‰hèhæùÿH…ÀI‰Å„•H‹T$0H‹5¹#H‰ÇèÈæùÿ…ÀˆÚL‰êH‰îL‰çèÒÌúÿH…ÀH‰ÃH‰„$ЄIƒ,$u I‹D$L‰çÿP0HƒmHÇ„$Øu H‹EH‰ïÿP0Iƒmu I‹EL‰ïÿP0H‰ÞL‰ÿèÌúÿ…Àu&Hƒ+u H‹CH‰ßÿP0HÇ„$ЃD$8é²þÿÿH‹D$@Ç„$š,E1íÇ„$kHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éþüÿH‹D$@Ç„$•,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éfüüÿH‹D$@Ç„$”,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÇúüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1ÛHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$’,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é(ùüÿH‹D$@Ç„$,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é‰÷üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$‹,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éèõüÿH‹D$@Ç„$ˆ,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éGôüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$†,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é¦òüÿH‹„$I9FHÇ„$ЄiRL‰þL‰÷èMÞúÿH…ÀH‰„$ð„©PIƒ/u I‹GL‰ÿÿP0HÇ„$ÈH‹”$àHƒ*u H‹BH‰×ÿP0Hƒ¼$PHÇ„$àL‹¼$ðt.H‹„$PH‹œ$PH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=ì«#HÇ„$ðèsÚúÿH…ÀH‰ÃH‰„$à„PNH‹5ð®#H‰Çè0¿úÿH…ÀI‰Å„ŒLHƒ+u H‹CH‰ßÿP01ÿè]ÓùÿH…ÀH‰D$H‰„$à„¶JH‹=­#è ÚúÿH…ÀH‰ÃH‰„$È„íHH‹5Ø«#H‰ÇèȾúÿH…ÀI‰ÄH‰„$Є!GHƒ+u H‹CH‰ßÿP0è×ùÿH…ÀH‰ÃH‰„$È„OEH‹T$0H‹5Ç©#H‰Çèw×ùÿ…ÀˆŠCH‹5°¯#H‰ÚL‰çè}½úÿH…ÀH‰Å„ÅAIƒ,$u I‹D$L‰çÿP0Hƒ+HÇ„$Ðu H‹CH‰ßÿP0H‰ïè{ÖùÿH…ÀH‰ÃH‰„$È„Ô?Hƒmu H‹EH‰ïÿP0H‰ßèîûÿH‰D$8HƒÀ„õ=Hƒ+u H‹CH‰ßÿP0HÇ„$ÈÇD$HLcd$HL9d$8ŽžH‹=´«#è¿ØúÿH…ÀH‰ÃH‰„$È„Õ H‹5Ħ#H‰Çè|½úÿH…ÀH‰Å„ Hƒ+u H‹CH‰ßÿP0L‰çèHÖùÿH…ÀH‰ÃH‰„$È„@ ¿èÊÔùÿH…ÀI‰ÄH‰„$Є{H‰XèÕùÿH…ÀH‰ÃH‰„$È„·H‹T$0H‹5E¨#H‰ÇèõÕùÿ…ÀˆôH‰ÚL‰æH‰ïèÿ»úÿH…ÀI‰ÆH‰„$Ø„+Hƒmu H‹EH‰ïÿP0Iƒ,$u I‹D$L‰çÿP0Hƒ+HÇ„$Ðu H‹CH‰ßÿP0H‹|$L‰öHÇ„$Èè#»úÿ…Àu&Iƒ.u I‹FL‰÷ÿP0HÇ„$؃D$HéŽþÿÿH‹D$@L‰¼$PE1äÇ„$ï,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é íüÿH‹D$@L‰¼$PE1äÇ„$ê,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éyëüÿH‹D$@L‰¼$PE1äÇ„$é,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÒéüÿH‹D$@L‰¼$PE1äÇ„$ç,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é+èüÿH‹D$@L‰¼$PE1äÇ„$â,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ 鄿üÿH‹D$@L‰¼$PE1äÇ„$à,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÝäüÿH‹D$@L‰¼$PE1äÇ„$Ý,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é6ãüÿH‹D$@L‰¼$PE1äÇ„$Û,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éáüÿH‹„$I9EHÇ„$Ø„ø*H‹t$L‰ïè2ÍúÿH…ÀH‰„$ð„1)H‹D$H‹\$H‹H‰D$8HƒèH…ÀH‰u H‹CH‰ßÿP0HÇ„$àIƒmu I‹EL‰ïÿP0Hƒ¼$XH‹„$ðH‰D$8t.H‹„$XH‹œ$XH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=Çš#HÇ„$ðèNÉúÿH…ÀI‰Å„Ì&H‹5Ó#H‰Çè®úÿH…ÀH‰D$H‰„$È„ñ$Iƒmu I‹EL‰ïÿP01ÿè5ÂùÿH…ÀI‰Å„#H‹=â›#èíÈúÿH…ÀH‰ÃH‰„$à„A!H‹5ºš#H‰Ç読úÿH…ÀI‰ÄH‰„$Ø„hHƒ+u H‹CH‰ßÿP0èÆùÿH…ÀH‰ÃH‰„$à„‰H‹T$0H‹5©˜#H‰ÇèYÆùÿ…Àˆ·H‹5’ž#H‰ÚL‰çè_¬úÿH…ÀH‰ÅH‰„$ЄÛIƒ,$u I‹D$L‰çÿP0Hƒ+HÇ„$Øu H‹CH‰ßÿP0H‰ïèUÅùÿH…ÀH‰ÃH‰„$à„ÛHƒmu H‹EH‰ïÿP0H‰ßHÇ„$Ðè¼òúÿH‰D$HHƒÀ„ãHƒ+u H‹CH‰ßÿP0HÇ„$àÇD$PHcl$PH9l$HŽ H‹=‚š#èÇúÿH…ÀH‰ÃH‰„$à„6 H‹5òš#H‰ÇèJ¬úÿH…ÀI‰ÆH‰„$Є] Hƒ+u H‹CH‰ßÿP0H‰ïèÅùÿH…ÀH‰ÃH‰„$à„{ ¿èÃùÿH…ÀI‰ÄH‰„$Ø„§H‰XècÄùÿH…ÀH‰ÃH‰„$à„ÔH‹T$0H‹5 —#H‰Çè»Äùÿ…ÀˆH‰ÚL‰æL‰÷èŪúÿH…ÀH‰Å„4Iƒ.u I‹FL‰÷ÿP0Iƒ,$HÇ„$Ðu I‹D$L‰çÿP0Hƒ+HÇ„$Øu H‹CH‰ßÿP0H‰îL‰ïHÇ„$àèè©úÿ…ÀuHƒmu H‹EH‰ïÿP0ƒD$PéþÿÿH‹D$@L‰¼$PE1äÇ„$D-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éåÛüÿH‹D$@L‰¼$PE1äÇ„$?-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é1ÚüÿH‹D$@L‰¼$PE1äÇ„$>-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é{ØüÿH‹D$@L‰¼$PE1äÇ„$<-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÅÖüÿH‹D$@L‰¼$PE1äÇ„$7-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÕüÿH‹D$@L‰¼$PE1äÇ„$5-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éYÓüÿH‹D$@L‰¼$PE1äÇ„$2-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é£ÑüÿH‹D$@L‰¼$PE1äÇ„$0-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éíÏüÿH‹D$H‹œ$H9X„xH‹|$L‰îè™»úÿH…ÀH‰„$ð„¤Iƒmu I‹EL‰ïÿP0H‹”$ÈHƒ*u H‹BH‰×ÿP0Hƒ¼$HÇ„$ÈH‹œ$ðt.H‹„$H‹Œ$H‹H‰D$HƒèH…ÀH‰u H‹AH‰ÏÿP0H‹D$8HÇ„$ðH‰œ$L‰¼$PH‰„$Xéx¨üÿH‹D$@L‰¼$PE1äÇ„$R-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é^ÍüÿH‹hH…í„{ýÿÿL‹`HƒEH‹\$Iƒ$H‹L‰¤$ÈH‰D$HHƒèH…ÀH‰u H‹CH‰ßÿP0¿è²ùÿH…ÀH‰ÃH‰„$à„ü1ÒH‰kL‰k H‰ÞL‰çè…™úÿH…ÀH‰„$ðt!Hƒ+u H‹CH‰ßÿP0HÇ„$àéýÿÿH‹D$@L‰¼$PE1íÇ„$\-Ç„$mE1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éþÊüÿH‹D$@L‰¼$PE1äÇ„$V-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éJÉüÿèu®ùÿH…À„êÿÿH‹D$@L‰¼$PE1äÇ„$,-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é†ÇüÿH‹D$@L‰¼$PE1äÇ„$)-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÐÅüÿH‹D$@L‰¼$PE1äÇ„$%-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÄüÿH‹D$@L‰¼$PE1äÇ„$$-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ édÂüÿH‹D$@L‰¼$PE1äÇ„$"-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é®ÀüÿH‹D$@L‰¼$PE1äÇ„$-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éø¾üÿH‹D$@L‰¼$PE1äÇ„$-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éB½üÿH‹D$@L‰¼$PE1öHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$ÀH‹D$1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸H‰„$ÈH‹D$8HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇD$H‰„$XÇ„$-Ç„$mHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ 錻üÿH‹D$@L‰¼$PE1äÇ„$-Ç„$mE1ÿHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹D$8HÇ„$ˆHÇD$8HÇ„$€HÇ„$ðH‰„$XHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÖ¹üÿH‹D$@L‰¼$PE1öHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$ÀH‹D$1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸H‰„$ÈH‹D$8HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇD$H‰„$XÇ„$-Ç„$mHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é ¸üÿH‹D$@L‰¼$PE1äÇ„$ý,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éw¶üÿI‹mH…íH‰¬$Ø„óÔÿÿM‹eHƒEIƒ$Iƒmu I‹EL‰ïÿP0¿èI›ùÿH…ÀH‰ÃH‰„$È„H‹D$1ÒH‰kH‰ÞL‰çHÇ„$ØHÇ„$àH‰C è“‚úÿH…ÀH‰„$ðt$Hƒ+u H‹CH‰ßÿP0HÇ„$ÈM‰åé¥ÔÿÿH‹D$@L‰¼$PM‰åÇ„$-Ç„$lE1ÿHÇD$8HÇD$0E1äH‰„$ÀH‹D$E1öHÇD$HÇD$1íHÇD$(HÇD$1ÛH‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é´üÿH‹D$@L‰¼$PM‰åÇ„$-Ç„$lE1ÿHÇD$8HÇD$0E1äH‰„$ÀH‹D$E1öHÇD$HÇD$1íHÇD$(HÇD$1ÛH‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éj²üÿè•—ùÿH…À„ýÁÿÿH‹D$@L‰¼$PE1äÇ„$×,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é³°üÿH‹D$@L‰¼$PE1äÇ„$Ô,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é ¯üÿH‹D$@L‰¼$PE1äÇ„$Ð,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ée­üÿH‹D$@L‰¼$PE1äÇ„$Ï,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ 鼫üÿH‹D$@L‰¼$PE1äÇ„$Í,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éªüÿH‹D$@L‰¼$PE1äÇ„$Ê,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éj¨üÿH‹D$@L‰¼$PE1äÇ„$È,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÁ¦üÿH‹D$@L‰¼$PE1äÇ„$Æ,Ç„$lE1ÿHÇD$8HÇD$0E1öH‰„$ÀH‹D$1íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¥üÿH‹D$@L‰¼$PE1öHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$ÀH‹D$1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$Ã,Ç„$lHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éo£üÿH‹D$@L‰¼$PE1íÇ„$Á,Ç„$lE1ÿHÇD$8HÇD$0E1äH‰„$ÀH‹D$E1öHÇD$HÇD$1íHÇD$(HÇD$1ÛH‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éáüÿH‹D$@Ç„$¨,E1íÇ„$kHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é üÿI‹^H…ÛH‰œ$Є‚­ÿÿI‹nHƒHƒEIƒ.H‰¬$àu I‹FL‰÷ÿP0¿èë„ùÿH…ÀI‰Å„I1ÒI‰]M‰} L‰îH‰ïHÇ„$ÐHÇ„$ÈèBlúÿH…ÀH‰„$ð„jIƒm…6­ÿÿI‹EL‰ïÿP0é'­ÿÿ袄ùÿH…À„YžÿÿH‹D$@Ç„$‚,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÈüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é'œüÿH‹D$@Ç„$²,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ 醚üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$¬,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éå˜üÿH‹D$@Ç„${,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éF—üÿH‹D$@Ç„$z,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é§•üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1ÛHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$x,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é”üÿH‹D$@Ç„$u,E1ÿÇ„$kHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éi’üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$s,Ç„$kHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éÈüÿH‹D$@Ç„$q,E1íÇ„$kHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é$üÿH‹D$@Ç„$n,E1íÇ„$kHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é€üÿH‹D$@Ç„$l,E1íÇ„$kHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÜ‹üÿH‹D$@Ç„$S,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é;ŠüÿH‹jH…턇ÿÿL‹bHƒEIƒ$Hƒ*L‰¤$Èu H‹BH‰×ÿP0¿èoùÿH…ÀH‰ÃH‰„$à„ç1ÒH‰kL‰k H‰ÞL‰çèuVúÿH…ÀH‰„$ðt!Hƒ+u H‹CH‰ßÿP0HÇ„$à鹆ÿÿH‹D$@Ç„$],E1íÇ„$jHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éˆüÿH‹D$@Ç„$W,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éd†üÿH‹D$@Ç„$-,E1ÿÇ„$jHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÄüÿH‹CH‰ßÿP0éT\üÿH‹EH‰ïÿP0é\üÿ£H…öˆöHµH··HƒþHDÂH‰òH5ÊH‰ÁH‹ü"E1íE1ÿE1äE1ö1í1ÛH‹81Àè2kùÿH‹D$@Ç„$Ê+Ç„$gHÇD$8HÇD$0HÇD$H‰„$ÀH‹D$HÇD$(HÇD$HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ 龂üÿH‹CH‰ßÿP0éŽZüÿH‹CH‰ßÿP0é²ZüÿH‹D$@Ç„$Ê+E1íÇ„$gHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éü€üÿH‹ø"H5öÁºE1íE1ÿE1äE1ö1í1ÛH‹81Àè¯gùÿH‹D$@Ç„$Ê+Ç„$gHÇD$8HÇD$0HÇD$H‰„$ÀH‹D$HÇD$(HÇD$HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é;üÿH‰ÎH‰ßè@fùÿH‰ÅéSüÿH‰ÎL‰ïè-fùÿéÐýÿH‰ÎH‰ßèfùÿI‰ÅémRüÿH‰ÖH‰ßè fùÿI‰Æé-ýÿ1íéªÅüÿH‹D$8L‰¼$XE1íÇ„$ù&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péO|üÿH‹D$8L‰¼$XE1íÇ„$ö&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé³yüÿH‹D$8L‰¼$XE1íÇ„$ô&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péwüÿH‹EH‰ïÿP0éμüÿH‹D$8L‰¼$XE1íÇ„$ñ&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péltüÿH‹CH‰ßÿP0éó¹üÿH‹D$8L‰¼$XE1íÇ„$î&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÁqüÿH‹EH‰ïÿP0é•LþÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨H‰„$ÈH‹$HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ˆH‹„$ÀHÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$H‰$HÇD$@Ç„$°1Ç„$£HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éùoüÿI‹EL‰ïÿP0é¦JþÿH‹D$@Ç„$­1E1ÿÇ„$£HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ˆH‹„$ÀHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰$HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é1nüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨H‰„$ÈH‹$HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ˆH‹„$ÀHÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$H‰$HÇD$@Ç„$¨1Ç„$£HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éxlüÿI‹EL‰ïÿP0éÏFþÿH‹D$@Ç„$¥1E1ÿÇ„$£HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ˆH‹„$ÀHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰$HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é°jüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨H‰„$ÈH‹$HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ˆH‹„$ÀHÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$H‰$HÇD$@Ç„$ 1Ç„$£HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é÷hüÿH‹„$8L‰´$E1ÿÇ„$ã@Ç„$TE1äHÇD$8HÇD$0E1öH‰„$€HÇD$1íHÇD$1ÛHÇD$(HÇD$éhüÿH‹„$8L‰´$E1ÿHÇD$HÇD$E1öHÇD$(HÇD$E1äH‰„$€Ç„$á@1íÇ„$THÇD$81ÛHÇD$0é hüÿH‹„$8HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$È=E1äH‰„$€Ç„$'1íHÇD$8HÇD$01ÛégüÿL‰ïèeMùÿ…À‰Ã‰‡?þÿH‹„$8Ç„$Ë=E1ÿÇ„$'HÇD$8E1äHÇD$0HÇD$E1öH‰„$€HÇD$1í1ÛHÇD$(HÇD$égüÿH‹CH‰ßÿP0éë@þÿH‹EH‰ïÿP0éAþÿH‹D$@H‰¬$àE1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿH‰„$ÀH‹D$E1äHÇ„$ˆHÇ„$Ð1íHÇ„$HÇ„$¸1ÛH‰„$ÈH‹$HÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$ˆH‹„$ÀHÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$H‰$HÇD$@Ç„$”1Ç„$¢HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é;eüÿL‰ïèKùÿ…À‰Ã‰[@þÿH‹D$@Ç„$³1E1ÿÇ„$£HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ˆH‹„$ÀHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰$HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ épcüÿH‹Û"H5Ê©E1íE1ÿE1ä1í1ÛH‹8èýFùÿH‹„$8L‰´$E1öÇ„$ß@Ç„$THÇD$8HÇD$0H‰„$€HÇD$HÇD$HÇD$(HÇD$éábüÿH‹„$8E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$Å@E1äH‰„$€Ç„$S1íHÇD$8HÇD$01ÛésbüÿL‹zM…ÿ„Ö:þÿH‹jIƒHƒEHƒ*H‰¬$øu H‹BH‰×ÿP0¿èGGùÿH…ÀH‰ÃH‰„$Є¸H‹„$L‰{1ÒH‰ÞH‰ïHƒH‰C è¢.úÿH…ÀI‰Æt!Hƒ+u H‹CH‰ßÿP0HÇ„$Ðée:þÿH‹„$8E1íHÇD$HÇD$HÇD$(E1ÿHÇD$Ç„$Î@E1äH‰„$€Ç„$S1íHÇD$8HÇD$01ÛékaüÿH‹„$8E1íÇ„$È@Ç„$SHÇD$8E1äHÇD$0HÇD$E1öH‰„$€HÇD$1í1ÛHÇD$(HÇD$éý`üÿH‹„$8E1íÇ„$¸@Ç„$SHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$éŒ`üÿH‹„$8Ç„$Ã=E1ÿÇ„$'HÇD$8E1äHÇD$0HÇD$E1öH‰„$€HÇD$1í1ÛHÇD$(HÇD$é`üÿH‹„$8HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$Â=E1äH‰„$€Ç„$'1íHÇD$8HÇD$01Ûé°_üÿH‹„$8E1íHÇD$HÇD$E1öHÇD$(HÇD$Ç„$´=E1ÿH‰„$€H‹D$0E1äÇ„$$HÇD$81íHÇD$01ÛH‰„$ é2_üÿH‹„$8Ç„$¥=E1ÿÇ„$$HÇD$8E1äHÇD$0HÇD$E1öH‰„$€HÇD$1í1ÛHÇD$(HÇD$éÄ^üÿM‹eM…äL‰¤$ð„5þÿI‹]Iƒ$HƒIƒmu I‹EL‰ïÿP0¿è—CùÿH…ÀH‰D$„JH‹D$1ÒH‰ßHÇ„$ðHÇ„$ÈL‰`H‰h H‰Æèç*úÿH…ÀH‰„$ø„ŸH‹D$H‹T$H‹H‰D$HƒèH…ÀH‰…À4þÿH‹BH‰×ÿP0é±4þÿH‹„$8Ç„$˜=E1ÿÇ„$$HÇD$8E1äHÇD$0HÇD$E1öH‰„$€HÇD$1í1ÛHÇD$(HÇD$é—]üÿH‹„$8I‰ÝÇ„$¯=Ç„$$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€E1ö1í1ÛHÇD$(HÇD$é/]üÿH‹„$8I‰ÝHÇD$E1öHÇD$(HÇD$Ç„$©=Ç„$$E1ÿH‰„$€HÇD$8E1äHÇD$01í1ÛéÇ\üÿH‹„$8HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$•=E1äH‰„$€Ç„$$1íHÇD$8HÇD$01ÛéY\üÿH‹„$8E1íÇ„$“=Ç„$$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$éè[üÿH‹„$8E1íÇ„$‘=Ç„$$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$éw[üÿÇ„$x=Ç„$#E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é[üÿI‹l$H…íH‰¬$ð„'0þÿM‹t$HƒEIƒIƒ,$L‰´$øu I‹D$L‰çÿP0¿èá?ùÿH…ÀH‰ÃH‰„$È„°1ÒH‰kL‰k H‰ÞL‰÷HÇ„$ðè<'úÿH…ÀH‰„$Ðt!Hƒ+u H‹CH‰ßÿP0HÇ„$Èé¿/þÿE1íÇ„$‚=Ç„$#HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$é ZüÿÇ„$|=Ç„$#E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é¯YüÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿÇ„$b=Ç„$#E1äHÇD$8HÇD$01í1ÛéQYüÿE1íÇ„$`=Ç„$#HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éðXüÿE1íÇ„$^=Ç„$#HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éXüÿE1íÇ„$[=Ç„$#HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$é.XüÿE1íÇ„$Y=Ç„$#HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éÍWüÿL‰¬$ðL‰¤$èE1íÇ„$@=Ç„$"E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é\WüÿL‰¬$ðL‰¤$èE1íÇ„$>=Ç„$"E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$éëVüÿò{ò¼$ˆé>*þÿL‰¬$ðL‰¤$èE1íÇ„$:=Ç„$"E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$égVüÿL‰¬$ðL‰¤$èE1íÇ„$6=Ç„$"E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$éöUüÿL‰¬$ðL‰¤$èé*þÿòkòl$(éÇ(þÿèü:ùÿH…À„B)þÿL‰¬$ðL‰¤$èE1íÇ„$<=Ç„$"E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$éRUüÿL‹`M…ä„Ã2üÿH‹XIƒ$H‹t$HƒH‹H‰D$PHƒèH…ÀH‰u H‹FH‰÷ÿP0¿è:ùÿH…ÀI‰Ç„æ M‰g1ÒM‰o L‰þH‰ßèŠ!úÿH…ÀI‰Ä„ž I‹H‰\$HƒèH…ÀI‰…n2üÿI‹GL‰ÿÿP0é_2üÿÇD$H4 ÇD$P.E1ö1í1ÛH‹„$@H‹Œ$@H‹H‰„$¸HƒèH…ÀH‰uH‹„$@H‹¼$@H‹@ÿP0H…ÛtHƒ+u H‹CH‰ßÿP0M…ÿtIƒ/u I‹GL‰ÿÿP0Hƒ|$L‹¼$t+H‹D$H‹\$H‹H‰„$HƒèH…ÀH‰u H‹CH‰ßÿP0M…ítIƒmu I‹EL‰ïÿP0M…ätIƒ,$u I‹D$L‰çÿP0H…ítHƒmu H‹EH‰ïÿP0M…ötIƒ.u I‹FL‰÷ÿP0‹T$P‹t$HH V’H=gœè:#úÿHƒ|$`t+H‹D$`H‹\$`H‹H‰D$HƒèH…ÀH‰„'AHÇD$`Hƒ|$8t(H‹D$8H‹\$8H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0M…ÿtIƒ/u I‹GL‰ÿÿP0Hƒ¼$€t.H‹„$€H‹œ$€H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ|$`„ì>Hƒ¼$xt.H‹„$xH‹œ$xH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹„$ H9D$`„39H‹D$`H‹pHƒþ…7H‹D$`H‹¼$hL‹hH‹X IƒEL‰îH‰œ$àHƒè;?ùÿ…Àˆ.5Iƒmu I‹EL‰ïÿP0H‹¼$PH‰Þè?ùÿ…ÀˆG3Hƒ+u H‹CH‰ßÿP0ò„$°èq6ùÿH…ÀH‰ÃH‰„$à„W1H‹¼$XH‰ÆèÈ>ùÿ…Àˆ/Hƒ+u H‹CH‰ßÿP0H‹¼$¾è >ùÿH…ÀH‰ÃH‰„$à„DH‹¼$H‰Æèz>ùÿ…ÀˆÇBHƒ+u H‹CH‰ßÿP0H‹=à#HÇ„$àèï9úÿH…ÀI‰Å„Ø@H‹¼$h1öèž=ùÿH…ÀH‰D$H‰„$È„ø>H‹¼$P1öèy=ùÿH…ÀI‰ÇH‰„$ð„€GH‹¼$X1öèV=ùÿH…ÀH‰Å„¬EH‹¼$1öè;=ùÿH…ÀH‰ÃH‰„$Ø„ýHH‹5V#H‰ÇèÎ3ùÿH…ÀI‰ÆH‰„$Є,Hƒ+u H‹CH‰ßÿP0E1äH‹„$I9EHÇ„$Ø„2,ID$H‰Çèl5ùÿH…ÀH‰ÃH‰„$è„X*H‹„$ØH…ÀtH‰CHÇ„$ØH‹|$Jã1ÒH‰ÞHÇ„$ÈHÇ„$ðL‰x H‰h(H‰xL‰p0L‰ïHÇ„$ÐèúÿH…ÀH‰D$8H‰„$à„ (Hƒ+u H‹CH‰ßÿP0IƒmHÇ„$èu I‹EL‰ïÿP0Hƒ¼$€t.H‹„$€H‹œ$€H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5#H‹|$8HÇ„$àèÈúÿH…ÀI‰Å„É%H‹=Õ #èÐ7úÿH…ÀH‰D$HH‰„$Єß#H‹¼$h¾èr;ùÿH…ÀH‰Å„û!H‹¼$P¾èT;ùÿH…ÀH‰D$PH‰„$ð„ H‹¼$X¾è,;ùÿH…ÀH‰„$€H‰„$È„H‹¼$h¾è;ùÿH…ÀH‰ÃH‰„$Ø„0H‹¼$h1öèÞ:ùÿH…ÀI‰ÄH‰„$ø„GH‰ÆH‰ßè…5ùÿH…ÀI‰Æ„mHƒ+u H‹CH‰ßÿP0Iƒ,$HÇ„$Øu I‹D$L‰çÿP0H‹¼$P¾ès:ùÿH…ÀH‰ÃH‰„$ø„VH‹¼$P1öèP:ùÿH…ÀI‰ÄH‰„$Ø„pH‰ÆH‰ßè÷4ùÿH…ÀH‰D$„Hƒ+u H‹CH‰ßÿP0Iƒ,$HÇ„$øu I‹D$L‰çÿP0H‹¼$X¾èã9ùÿH…ÀH‰ÃH‰„$Ø„H‹¼$X1öèÀ9ùÿH…ÀI‰ÇH‰„$ø„²H‰ÆH‰ßèg4ùÿH…ÀI‰Ä„4Hƒ+u H‹CH‰ßÿP0Iƒ/HÇ„$Øu I‹GL‰ÿÿP0H‹D$HH‹œ$HÇ„$øH9X„‚ÿE1ÿIGH‰ÇèÝ1ùÿH…ÀH‰ÃH‰„$Ø„¨ýH‹„$øH…ÀtH‰CHÇ„$øJûH‹´$€H‹|$H‹L$P1ÒHÇ„$ðH‰hH‹¬$ÐH‰p(H‰x8H‰ÞL‰`@H‰H L‰p0H‰ïHÇ„$ÈèáúÿH…ÀI‰ÄH‰„$è„TûHƒ+u H‹CH‰ßÿP0HƒmHÇ„$Øu H‹EH‰ïÿP0¿èÆ-ùÿH…ÀH‰ÅH‰„$ЄAùH‹@HÇ„$èL‰ H‹„$I9E…÷M‹eM…äL‰¤$è„÷M‹uIƒ$IƒIƒmu I‹EL‰ïÿP0¿è0ùÿH…ÀH‰ÃH‰„$Ø„þô1ÒL‰cH‰k H‰ÞL‰÷HÇ„$èHÇ„$ÐèßúÿH…ÀH‰„$à„õòHƒ+u H‹CH‰ßÿP0HÇ„$ØM‰õIƒmu I‹EL‰ïÿP0H‹”$àHƒ*u H‹BH‰×ÿP0H‹„$ H9D$xHÇ„$à„¤äH‹t$8H‹|$xèúÿƒÀH‹D$8H‰„$€H‹D$`H‰„$x„ØH‹D$pH‰„$pH‹¼$hè0ùÿHƒøÿ„IÖHƒèL‹¼$ÐL‹´$°H‰„$ØH‹„$èÇ„$¸HÇD$8H‰D$HH‹D$8H9„$ØH‰D$`ŽÕÕ‹„$¸ƒÀHcèH‹„$H‹PH‹BhH…À„ÓH‹@ H…À„ ÓH‰êH‹t$8H‹¼$ÿÐH‰ÃH…ÛH‰œ$à„RÛH‹CH;D$(„áØH;„$@„ÓØH‰ßèþ/ùÿH…ÀH‰ÅH‰„$Є"àHƒ+u H‹CH‰ßÿP0H‹EHÇ„$àH‰ïH‹˜àÿÓH…ÀI‰Å„lÒH‰ïÿÓH…ÀH‰„$Ø„RÐH‰ïÿÓH…À…2ÐèÙúÿ…Àˆ„ÎHƒmu H‹EH‰ïÿP0HÇ„$ÐL‰¬$°M…ötIƒ.u I‹FL‰÷ÿP0H‹„$ØM…ÿH‰„$ÐtIƒ/u I‹GL‰ÿÿP0H‹t$8H‹¼$hHÇ„$Øè5ùÿH…ÀH‰ÃH‰„$à„Õ„$¸H‹¼$hHc„$¸H‰ÆH‰D$8èÕ4ùÿH…ÀH‰ÅH‰„$Ø„rʺH‰ÆH‰ßèw+ùÿH…ÀI‰Å„µÈHƒ+u H‹CH‰ßÿP0HƒmHÇ„$àu H‹EH‰ïÿP0L;¬$(HÇ„$Ø”ÂL;¬$0¶Ú”ÀÐuL;¬$ …žÆIƒmu I‹EL‰ïÿP0…Û„‰·H‹t$8H‹¼$hè4ùÿH…ÀI‰Å„ʵH‹t$`H‹¼$hèø3ùÿH…ÀH‰ÃH‰„$Ø„´H‰ÆL‰ïèŸ.ùÿH…ÀH‰D$H‰„$à„A²Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0H‹t$8H‹¼$Pè3ùÿH…ÀH‰ÃH‰„$Ø„V°H‹t$`H‹¼$Pèj3ùÿH…ÀI‰Å„—®H‰ÆH‰ßè.ùÿH…ÀI‰ÇH‰„$Є׬Hƒ+u H‹CH‰ßÿP0IƒmHÇ„$Øu I‹EL‰ïÿP0H‹t$8H‹¼$Xè3ùÿH…ÀI‰Å„ëªH‹t$`H‹¼$Xèâ2ùÿH…ÀH‰ÃH‰„$Ø„$©H‰ÆL‰ïè‰-ùÿH…ÀI‰ÆH‰„$è„d§Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0H‹´$°H‹¼$Ðè?-ùÿH…ÀI‰ÅH‰„$Ø„v¥Hƒ¼$¸t.H‹„$¸H‹œ$¸H‹H‰D$PHƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$¨HÇ„$àt.H‹„$¨H‹œ$¨H‹H‰D$PHƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$ HÇ„$Ðt.H‹„$ H‹œ$ H‹H‰D$PHƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$˜HÇ„$èt.H‹„$˜H‹œ$˜H‹H‰D$PHƒèH…ÀH‰u H‹CH‰ßÿP0H‹”$ H‹5lû"H‹|$è:,ùÿH…ÀH‰ÃH‰„$Ø„x¢H‹”$ H‹5?û"L‰ÿè,ùÿH…ÀH‰ÅH‰„$è„„ H‰ÆH‰ßè 'ùÿH…ÀI‰ÄH‰„$ЄœžHƒ+u H‹CH‰ßÿP0HƒmHÇ„$Øu H‹EH‰ïÿP0H‹”$ H‹5Èú"L‰÷è˜+ùÿH…ÀH‰ÃH‰„$è„{œH‰ÆL‰çè©&ùÿH…ÀH‰ÅH‰„$Ø„“šIƒ,$u I‹D$L‰çÿP0Hƒ+HÇ„$Ðu H‹CH‰ßÿP0H‹”$ H‹5hú"H‰ïè +ùÿH…ÀH‰„$èH‰„$è„_˜Hƒmu H‹EH‰ïÿP0Hƒ|$HHÇ„$Øt(H‹D$HH‹\$HH‹H‰D$PHƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$èH‹|$è˜&ùÿH…ÀH‰„$¸H‰„$è„‘H‹D$H‹\$H‹H‰D$HHƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$èL‰ÿèG&ùÿH…ÀH‰„$¨H‰„$è„ùŽIƒ/u I‹GL‰ÿÿP0H‹´$èL‰÷è&ùÿH…ÀH‰„$ H‰„$è„ Iƒ.u I‹FL‰÷ÿP0H‹´$èL‰ïèÕ%ùÿH…ÀH‰„$˜H‰„$è„'‹Iƒmu I‹EL‰ïÿP0H‹t$`H‹¼$hè³.ùÿH…ÀH‰ÃH‰„$è„Õ‘H‹¦¹"H9C„•H‰ßèÜ'ùÿòD$Hò|$Hf.=0z„D“Hƒ+u H‹CH‰ßÿP0H‹t$`H‹¼$PèH.ùÿH…ÀH‰ÃH‰„$è„áˆH‹;¹"H9C„ÀˆH‰ßèq'ùÿòD$Pòt$Pf.5ÅŽz„›”Hƒ+u H‹CH‰ßÿP0H‹t$`H‹¼$XèÝ-ùÿH…ÀH‰ÃH‰„$è„…H‹и"H9C„=ƒH‰ßè'ùÿòD$`ò|$`f.=ZŽz„†Hƒ+u H‹CH‰ßÿP0H‹t$8H‹¼$hèr-ùÿH…ÀH‰ÃH‰„$è„?H‹e¸"H9C„H‰ßè›&ùÿòD$pòt$pf.5ïz„¾‚Hƒ+u H‹CH‰ßÿP0H‹t$8H‹¼$Pè-ùÿH…ÀH‰ÃH‰„$è„©{H‹ú·"H9C„î~H‰ßè0&ùÿò„$€ò¼$€f.=~z„}Hƒ+u H‹CH‰ßÿP0H‹t$8H‹¼$Xè–,ùÿH…ÀH‰ÃH‰„$è„”yH‹‰·"H9C„pyH‰ßè¿%ùÿò„$ò¼$f.= z„f~Hƒ+u H‹CH‰ßÿP0òD$HèB$ùÿH…ÀI‰ÅH‰„$è„swòD$Pè#$ùÿH…ÀI‰ÄH‰„$Ø„°uòD$`è$ùÿH…ÀH‰ÅH‰„$Є]m¿èv$ùÿH…ÀH‰ÃH‰„$à„›kH‹¼$ˆH‰h(H‰ÆL‰hL‰` HÇ„$èHÇ„$ØHÇ„$ÐèÂ!ùÿ…À‰Åˆ­iHƒ+u H‹CH‰ßÿP0ƒíHÇ„$à…òD$HèX#ùÿH…ÀI‰ÅH‰„$à„AsòD$Pè9#ùÿH…ÀI‰ÄH‰„$Є~qòD$`è#ùÿH…ÀH‰ÅH‰„$Ø„»o¿èŒ#ùÿH…ÀH‰ÃH‰„$è„ùmH‹¼$ˆL‰hH‰ÆL‰` H‰h(HÇ„$àHÇ„$Ðè"ùÿH…ÀI‰ÆH‰„$Ø„$gHƒ+u H‹CH‰ßÿP0H‹„$°H‹œ$°HÇ„$èH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0L‰´$°òD$pèC"ùÿH…ÀI‰ÅH‰„$Ø„eò„$€è!"ùÿH…ÀI‰ÄH‰„$è„Icò„$èÿ!ùÿH…ÀH‰ÅH‰„$Єƒa¿èq"ùÿH…ÀH‰ÃH‰„$à„Á_H‹¼$ˆH‰h(H‰ÆL‰hL‰` HÇ„$ØHÇ„$èHÇ„$Ðè½ùÿ…À‰ÅˆÓ]Hƒ+u H‹CH‰ßÿP0ƒíHÇ„$à…òD$pèS!ùÿH…ÀI‰ÅH‰„$à„ÿVò„$€è1!ùÿH…ÀI‰ÄH‰„$Є9Uò„$è!ùÿH…ÀH‰ÅH‰„$è„Z¿è!ùÿH…ÀH‰ÃH‰„$Ø„AXH‹¼$ˆH‰h(H‰ÆL‰hL‰` HÇ„$àHÇ„$ÐèùùÿH…ÀH‰ÅH‰„$è„A[Hƒ+u H‹CH‰ßÿP0H‹„$ÐH‹œ$ÐHÇ„$ØH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‰¬$ÐH‹´$ÐH‹¼$°ºèÙùÿH…ÀH‰ÃH‰„$è„×PH;„$(”ÂH;„$0¶Ê”ÀÐuH;œ$ …PR‰ÍHƒ+u H‹CH‰ßÿP0…íHÇ„$è„E<H‹=ù"èØ#úÿH…ÀH‰ÃH‰„$Ø„:òD$Hè™ùÿH…ÀH‰„$ÀH‰„$Є¹8òD$PèuùÿH…ÀH‰„$ÈH‰„$à„ñ6òD$`èQùÿH…ÀI‰Å„95H‹5^ñ"H‹¼$°èÑùÿH…ÀI‰Ä„{3òD$pèùÿH…ÀH‰D$„Í1ò„$€èþùÿH…ÀI‰Æ„!0ò„$èäùÿH…ÀH‰„$ÐH‰„$È„Ø,H‹5äð"H‹¼$ÐèWùÿH…ÀI‰ÇH‰„$ð„+H‹„$H9C„®*¿èùÿH…ÀH‰ÃH‰„$ø„þ(1ÀH‹´$ÀHÃH‹¼$ÈH‹L$1ÒHÇ„$ÐL‰`0L‹¤$ØH‰pH‹´$ÐH‰x L‰h(H‰H8L‰p@L‰çH‰pHL‰xPH‰ÞHÇ„$àHÇ„$ÈHÇ„$ðè úÿH…ÀH‰ÅH‰„$脾&Hƒ+u H‹CH‰ßÿP0Iƒ,$HÇ„$øu I‹D$L‰çÿP0H‹D$ H‰îHÇ„$ØH‹xèlúÿƒÀ„Æ$Hƒmu H‹EH‰ïÿP0òD$HègùÿH…ÀI‰ÄH‰„$è„ò"òD$PèHùÿH…ÀH‰ÅH‰„$Ø„/!òD$`è)ùÿH…ÀH‰ÃH‰„$Єl¿è›ùÿH…ÀI‰Å„µL‰`H‰h L‰îH‰X(H‹D$ H‹|$HÇ„$èH‹@H‹PH‹@H‹\ÐøHƒH‰ÚH‰œ$Ðè.&ùÿH…ÀH‰ÅH‰„$Ø„¶Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0HƒmHÇ„$Ðu H‹EH‰ïÿP0òD$pèXùÿH…ÀI‰ÄH‰„$Ø„µò„$€è6ùÿH…ÀH‰ÅH‰„$Єïò„$èùÿH…ÀI‰Å„4¿èŽùÿH…ÀH‰ÃH‰„$è„uL‰`H‰h H‰ÞL‰h(H‹D$ H‹|$HÇ„$ØH‹@H‹PH‹@L‹lÐøIƒEL‰êè %ùÿH…ÀH‰ÅH‰„$Є}Hƒ+u H‹CH‰ßÿP0IƒmHÇ„$èu I‹EL‰ïÿP0Hƒmu H‹EH‰ïÿP0òD$HèJùÿH…ÀI‰ÄH‰„$Є|òD$Pè+ùÿH…ÀI‰Å„ÄòD$`èùÿH…ÀH‰ÅH‰„$è„ ¿è†ùÿH…ÀH‰ÃH‰„$Ø„E H‹”$°H‹|$@H‰ÆH‰h(L‰`L‰h HÇ„$Ðè.$ùÿH…ÀH‰ÅH‰„$è„` Hƒ+u H‹CH‰ßÿP0HƒmHÇ„$Øu H‹EH‰ïÿP0òD$pèiùÿH…ÀI‰ÄH‰„$è„pò„$€èGùÿH…ÀH‰ÅH‰„$Ø„ªò„$è%ùÿH…ÀI‰Å„ï¿èŸùÿH…ÀH‰ÃH‰„$Є0H‹”$ÐH‹|$@H‰ÆL‰`H‰h L‰h(HÇ„$èHÇ„$Øè;#ùÿH…ÀI‰ÆtNHƒ+u H‹CH‰ßÿP0Iƒ.HÇ„$Ðu I‹FL‰÷ÿP0H‹„$èL‹¼$ÐL‹´$°H‰D$Hé¸êÿÿH‹D$@HÇD$E1íHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$R1Ç„$›HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éK3üÿH‹D$@Ç„$G1E1ÿÇ„$›HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éª1üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$E1Ç„$›HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é 0üÿH‹D$@Ç„$C1E1íÇ„$›HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ée.üÿH‹D$@Ç„$A1E1íÇ„$›HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÁ,üÿH‹D$@Ç„$51E1íÇ„$šHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é+üÿH‹D$@Ç„$*1E1ÿÇ„$šHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é|)üÿH‹D$@Ç„$(1E1ÿÇ„$šHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÛ'üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$&1Ç„$šHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é:&üÿH‹D$@Ç„$$1E1íÇ„$šHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é–$üÿH‹D$@Ç„$1E1ÿÇ„$™HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éõ"üÿH‹D$@Ç„$ 1E1ÿÇ„$™HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éT!üÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$1Ç„$™HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é³üÿH‹D$@Ç„$1E1íÇ„$™HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éüÿH‹D$@Ç„$1E1íÇ„$™HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éküÿH‹D$@Ç„$÷0E1ÿÇ„$˜HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÊüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$ê0Ç„$˜HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é)üÿH‹D$@Ç„$è0E1íÇ„$˜HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é…üÿH‹D$@Ç„$æ0E1íÇ„$˜HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éáüÿH‹D$@Ç„$ä0E1íÇ„$˜HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é=üÿH‹D$@Ç„$‰0E1íÇ„$”HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é™üÿH‹D$@Ç„$…0E1íÇ„$”HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éõüÿH‹D$@Ç„$h0E1ÿÇ„$”HÇD$81íHÇD$0HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ écüÿH‹kH…í„EÕÿÿH‹CHƒEHƒHƒ+H‰„$Øu H‹CH‰ßÿP0¿ è7ôøÿH…ÀH‰ÃH‰„$ø„2H‰k¸éÕÿÿH‹D$@Ç„$Z0E1ÿÇ„$”HÇD$81íHÇD$0HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ és üÿH‹D$@Ç„$X0E1ÿÇ„$”HÇD$81íHÇD$0HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éá üÿH‹D$@Ç„$h0E1ÿÇ„$”HÇD$81ÛHÇD$0HÇD$(H‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éQ üÿH‹D$@HÇD$(E1ÿHÇD$HÇ„$1íHÇ„$ˆHÇ„$Ð1ÛH‰„$ÀH‹D$HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$V0Ç„$”HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é¿üÿH‹D$@HÇD$(E1öHÇD$HÇ„$E1ÿHÇ„$ˆHÇ„$Ð1íH‰„$ÀH‹D$1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$T0Ç„$”HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é*üÿH‹D$@Ç„$R0E1ÿÇ„$”HÇD$8E1öHÇD$0HÇD$1íH‰„$ÀH‹D$1ÛHÇD$HÇD$(HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éŒüÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$P0Ç„$”HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éëüÿH‹D$@Ç„$N0E1íÇ„$”HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éGüÿH‹D$@Ç„$L0E1íÇ„$”HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é£üÿH‹D$@Ç„$J0E1íÇ„$”HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÿþûÿH‹=ȼ"è“çùÿH…ÀH‰ÃH‰„$Ø„}òD$HèTãøÿH…ÀH‰„$ÀH‰„$ø„µòD$Pè0ãøÿH…ÀH‰„$ÈH‰„$ð„íòD$`è ãøÿH…ÀI‰ÇH‰„$È„* òD$pèíâøÿH…ÀI‰Æ„r ò„$€èÓâøÿH…ÀH‰D$„¾ ò„$è·âøÿH…ÀI‰Ä„H‹5Ä´"H‹¼$Ðè7áøÿH…ÀI‰Å„]H‹„$H9CHÇ„$à„ï1íHEH‰ÇèïâøÿH…ÀH‰ÃH‰„$Є;H‹„$àH…ÀtH‰CHÇ„$àHëH‹¼$ÀH‹t$H‹Œ$È1ÒHÇ„$øL‰`@L‹¤$ØH‰xH‰p8H‰ÞH‰H L‰x(L‰p0L‰hHL‰çHÇ„$ðHÇ„$ÈèàÉùÿH…ÀH‰ÅH‰„$è„øHƒ+u H‹CH‰ßÿP0Iƒ,$HÇ„$Ðu I‹D$L‰çÿP0H‹D$ H‰îHÇ„$ØH‹xèAÉùÿƒÀ…ÕÃÿÿH‹D$@Ç„$Ø0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é4ûûÿH‹D$@Ç„$Ô0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éùûÿH‹D$@Ç„$º0E1ÿÇ„$–HÇD$81íHÇD$0HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éþ÷ûÿH‹CH…ÀH‰„$à„üùÿÿH‹SHƒ½HƒH‹H‰”$ØHƒèH…ÀH‰…ÒùÿÿH‹CH‰ßÿP0éÃùÿÿH‹D$@HÇD$(E1ÿHÇD$HÇ„$1íHÇ„$ˆHÇ„$Ð1ÛH‰„$ÀH‹D$HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$¬0Ç„$–HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éöûÿH‹D$@Ç„$ª0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$(1íH‰„$ÀH‹D$1ÛHÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é‡ôûÿH‹D$@HÇD$(E1íHÇD$HÇ„$E1ÿHÇ„$ˆHÇ„$ÐE1äH‰„$ÀH‹D$1íHÇ„$HÇ„$¸1ÛHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$¨0Ç„$–HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éïòûÿH‹D$@HÇD$E1íHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$¦0Ç„$–HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éNñûÿH‹D$@Ç„$¤0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éªïûÿH‹D$@Ç„$¢0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éîûÿH‹D$@Ç„$ 0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ébìûÿH‹D$@Ç„$ž0E1íÇ„$–HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¾êûÿH‹D$@Ç„$>0E1íÇ„$“HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ééûÿH‰ßèâÎøÿ…À‰Å‰ ­ÿÿH‹D$@Ç„$?0E1íÇ„$“HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ édçûÿH‹D$@Ç„$0E1íÇ„$‘HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÀåûÿH‹D$@Ç„$0E1íÇ„$‘HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éäûÿH‹D$@Ç„$0E1íÇ„$‘HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éxâûÿH‹D$@Ç„$0E1íÇ„$‘HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÔàûÿH‹D$@Ç„$(0E1íÇ„$‘HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é0ßûÿH‹D$@Ç„$ 0E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éŒÝûÿH‹D$@Ç„$0E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éèÛûÿH‹D$@Ç„$þ/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éDÚûÿH‹D$@Ç„$ü/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é ØûÿH‹D$@Ç„$ú/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éüÖûÿH‹D$@HÇD$E1íHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$ä/Ç„$HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é[ÕûÿH‹D$@Ç„$Ç/E1íÇ„$ŽHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é·ÓûÿH‹D$@Ç„$¼/E1íÇ„$ŽHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÒûÿH‹D$@Ç„$º/E1íÇ„$ŽHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éoÐûÿH‹D$@Ç„$Ù/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éËÎûÿH‹D$@Ç„$×/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é'ÍûÿH‹D$@Ç„$Õ/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éƒËûÿH‹D$@Ç„$Ó/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éßÉûÿH‹D$@Ç„$¸/E1íÇ„$ŽHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é;ÈûÿH‹D$@Ç„$¶/E1íÇ„$ŽHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é—Æûÿòsò´$鎆ÿÿH‹D$@Ç„$§/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éàÄûÿH‹D$@Ç„$¢/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é<Ãûÿèg¨øÿH…À„à‚ÿÿH‹D$@Ç„$¤/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éŠÁûÿòsò´$€éÿÿ袦øÿH…À„ŒÿÿH‹D$@Ç„$©/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÅ¿ûÿò{ò|$péà~ÿÿH‹D$@Ç„$/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¾ûÿòsòt$`éÁ|ÿÿè,£øÿH…À„4}ÿÿH‹D$@Ç„$Ÿ/E1íÇ„$HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éO¼ûÿH‹D$@Ç„$/E1íÇ„$ŒHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ 髺ûÿèÖŸøÿH…À„syÿÿH‹D$@Ç„$/E1íÇ„$ŒHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éù¸ûÿò{ò|$Pé>wÿÿH‹D$@Ç„$‰/E1íÇ„$ŒHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éE·ûÿH‹D$@L‰¬$˜E1ÿÇ„$y/Ç„$‹E1íHÇD$8HÇD$0E1äH‰„$ÀH‹D$E1öHÇD$HÇD$1íHÇD$(HÇD$1ÛH‰„$ÈHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ 陵ûÿH‹D$@L‰¬$˜E1ÿL‰´$ Ç„$u/E1íÇ„$‹HÇD$8E1äH‰„$ÀH‹D$E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$ÈHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éå³ûÿH‹D$@L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$q/Ç„$‹E1ÿH‰„$ÀH‹D$E1öHÇD$8HÇD$01íHÇD$HÇD$1ÛH‰„$ÈHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é)²ûÿH‹D$L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$m/Ç„$‹E1ÿH‰„$¸H‹D$@E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é`°ûÿH‹D$@Ç„$…/E1íÇ„$ŒHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¼®ûÿèç“øÿH…À„®lÿÿH‹D$@Ç„$‡/E1íÇ„$ŒHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é ­ûÿòsòt$Héäjÿÿè%’øÿH…À„WkÿÿH‹D$@Ç„$‹/E1íÇ„$ŒHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éH«ûÿH‹D$HL‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$`/Ç„$ŠE1ÿH‰„$èH‹D$E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$¸H‹D$@HÇD$HÇ„$HÇ„$ˆHÇ„$€H‰„$ÀH‹D$HÇ„$ðHÇD$HÇ„$èHÇ„$ÐH‰„$ÈHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ér©ûÿH‹D$L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$\/Ç„$ŠE1ÿH‰„$¸H‹D$@E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é©§ûÿH‹D$L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$Z/Ç„$ŠE1ÿH‰„$¸H‹D$@E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éà¥ûÿH‹D$L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$V/Ç„$ŠE1ÿH‰„$¸H‹D$@E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¤ûÿH‹D$L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$T/Ç„$ŠE1ÿH‰„$¸H‹D$@E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éN¢ûÿH‹D$L‰¬$˜E1äL‰´$ L‰¼$¨E1íÇ„$R/Ç„$ŠE1ÿH‰„$¸H‹D$@E1öHÇD$8HÇD$01íHÇD$HÇD$(1ÛH‰„$ÀH‹D$HÇD$HÇD$HÇ„$HÇ„$ˆH‰„$ÈHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é… ûÿH‹D$@Ç„$@/E1íÇ„$‰HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éážûÿH‹D$@Ç„$ûÿH‹D$8Ç„$;.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$(1ÛH‰„$€H‹D$`HÇD$HÇ„$HÇ„$ˆHÇ„$€H‰„$xH‹D$@HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜H‰„$ÀH‹D$HÇ„$HÇD$HÇ„$¸HÇ„$¨H‰„$ÈH‹D$pHÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$pHÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÖ<ûÿH‹D$8Ç„$9.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$(1ÛH‰„$€H‹D$`HÇD$HÇ„$HÇ„$ˆHÇ„$€H‰„$xH‹D$@HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜H‰„$ÀH‹D$HÇ„$HÇD$HÇ„$¸HÇ„$¨H‰„$ÈH‹D$pHÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$pHÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é;ûÿH‹D$8HÇD$(E1ÿHÇD$HÇ„$E1äHÇ„$ˆHÇ„$Ð1ÛH‰„$€H‹D$`HÇ„$HÇ„$¸HÇ„$¨HÇ„$àH‰„$xH‹D$@HÇD$PHÇ„$ HÇ„$HÇD$HH‰„$ÀH‹D$HÇ„$HÇ„$øHÇ„$ØHÇD$`H‰„$ÈH‹D$pHÇD$@HÇD$HÇD$pÇ„$5.H‰„$pÇ„$€HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éb9ûÿH‹D$8Ç„$3.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$1ÛH‰„$€H‹D$`HÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éŸ7ûÿH‹D$8Ç„$1.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$1ÛH‰„$€H‹D$`HÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÜ5ûÿH‹D$8HÇD$E1ÿHÇD$(HÇD$E1äHÇ„$HÇ„$ˆ1ÛH‰„$€H‹D$`HÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨H‰„$xH‹D$@HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ÀH‹D$HÇD$HHÇ„$HÇ„$øHÇ„$ØH‰„$ÈH‹D$pHÇD$`HÇD$@HÇD$HÇD$pH‰„$pÇ„$-.Ç„$€HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é4ûÿH‹D$8Ç„$+.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$E1öH‰„$€H‹D$`1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éS2ûÿH‹D$8Ç„$).E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$E1öH‰„$€H‹D$`1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é0ûÿH‹D$8Ç„$'.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$E1öH‰„$€H‹D$`1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÇ.ûÿH‹D$8Ç„$%.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$E1öH‰„$€H‹D$`1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é-ûÿH‹D$8Ç„$#.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$E1öH‰„$€H‹D$`1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é;+ûÿH‹D$8Ç„$!.E1ÿÇ„$€HÇD$8E1äHÇD$0HÇD$E1öH‰„$€H‹D$`1íHÇD$(HÇD$1ÛHÇ„$HÇ„$ˆH‰„$xH‹D$@HÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐH‰„$ÀH‹D$HÇ„$˜HÇD$HÇ„$HÇ„$¸H‰„$ÈH‹D$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ H‰„$pHÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ és)ûÿH‹D$8HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$€H‹D$`1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨H‰„$xH‹D$@HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ÀH‹D$HÇD$HHÇ„$HÇ„$øHÇ„$ØH‰„$ÈH‹D$pHÇD$`HÇD$@HÇD$HÇD$pH‰„$pÇ„$.Ç„$€HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é«'ûÿH‹D$`Ç„$.E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1íHÇD$(HÇD$1ÛHÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éð%ûÿH‹D$`Ç„$.E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é7$ûÿI‹EH…ÀH‰„$Ø„¹ÓþÿI‹]HƒHƒIƒm„I‰ÝA¼é”ÓþÿH‹D$`Ç„$ñ-E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éD"ûÿH‹D$`Ç„$Ñ-E1íÇ„${HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$xH‹D$@E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é† ûÿH‹D$`Ç„$Ï-E1íÇ„${HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$xH‹D$@E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÈûÿH‹D$`Ç„$Å-E1íÇ„$zHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$xH‹D$@E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é ûÿH‹D$`Ç„$Ã-E1ÿÇ„$zHÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1íHÇD$(HÇD$1ÛHÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éOûÿH…öˆÆHlLHaNHƒþHDÂH‰òH5È`H‰ÁH‹¾’!E1íE1ÿE1äE1ö1í1ÛH‹81ÀèÜøÿH‹D$`Ç„$³-Ç„$zHÇD$8HÇD$0HÇD$H‰„$xH‹D$@HÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éNûÿH‹÷!H5ØWE1íE1ÿE1äE1ö1í1ÛH‹8èØü÷ÿH‹D$`Ç„$Á-Ç„$zHÇD$8HÇD$0HÇD$H‰„$xH‹D$@HÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ézûÿH‹D$`Ç„$³-E1íÇ„$zHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$xH‹D$@E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¼ûÿH‹]!H5¶VºE1íE1ÿE1äE1ö1í1ÛH‹81Àèoü÷ÿH‹D$`Ç„$³-Ç„$zHÇD$8HÇD$0HÇD$H‰„$xH‹D$@HÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éáûÿH‹D$@HÇD$E1íHÇD$(HÇD$E1öHÇ„$HÇ„$ˆE1ÿH‰„$ÀH‹D$E1äHÇ„$ÐHÇ„$1íHÇ„$¸HÇ„$¨1ÛH‰„$ÈH‹D$pHÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$@HÇD$H‰„$pHÇD$pÇ„$-Ç„$uHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é9ûÿH‹\$8HÇD$8é?ÌÿÿH‹D$`Ç„$é-E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1íHÇD$(HÇD$1ÛHÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ékûÿH‹D$`HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$xH‹D$@1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨H‰„$ÀH‹D$HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ÈH‹D$pHÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$@HÇD$H‰„$pHÇD$pÇ„$ç-Ç„$~HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ é°ûÿH‹D$`Ç„$Ý-E1íÇ„$|HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$xH‹D$@E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éò ûÿH‹D$`Ç„$Û-E1íÇ„$|HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$xH‹D$@E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é4 ûÿH‹D$`Ç„$í-E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é{ ûÿH‹D$`Ç„$ë-E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1íHÇD$(HÇD$1ÛHÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éÀûÿH‹D$`Ç„$ï-E1ÿÇ„$~HÇD$8E1äHÇD$0HÇD$E1öH‰„$xH‹D$@1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$€HÇD$HÇ„$ðHÇ„$èH‰„$ÈH‹D$pHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰„$pHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éûÿI‹EL‰ïA¼I‰ÝÿP0醵þÿ1ÛIƒm„‰èÐøÿ…À…ØH7Hö8HƒûH5dKHDÂH‰ÚE1íH‰ÁH‹P}!E1ÿE1äE1ö1í1ÛH‹81Àèqì÷ÿH‹D$@Ç„$K+Ç„$eHÇD$8HÇD$0HÇD$H‰„$ÀH‹D$HÇD$(HÇD$HÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éýûÿH‹D$@Ç„$K+E1íÇ„$eHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éYûÿI‹EL‰ïÿP0éhüÿÿH‹CH‰ßÿP0éñØúÿH‹D$@Ç„$C+E1ÿÇ„$eHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éšûÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$;+Ç„$eHÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éùþúÿ1ÛHƒmu H‹EH‰ïÿP0HÇ„$àè…Éøÿ…À…YHõ1Hò/HƒûH5\DHEÂH‰ÚE1íH‰ÁH‹Hv!E1ÿE1äE1ö1í1ÛH‹81Àèiå÷ÿH‹D$0Ç„$ð)Ç„$KHÇD$8HÇD$0HÇD$H‰„$`H‹D$hHÇD$HÇD$(HÇD$HÇ„$H‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péüúÿH‹D$0Ç„$à)E1ÿÇ„$KHÇD$8E1äHÇD$0HÇD$E1öH‰„$`H‹D$h1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$pétùúÿH‹D$0Ç„$ð)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péàöúÿH‰ÆH‰×èuÚ÷ÿ…À…ÓÃûÿH‹D$0HÇD$E1íHÇD$HÇD$(E1öHÇD$HÇ„$E1ÿHÇ„$ˆHÇ„$ÐE1äHÇ„$HÇ„$¸1íHÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$ðHÇ„$pH‰\$hÇ„$?&1ÛÇ„$0HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`éAôúÿH‰ÎH‰ïèFÛ÷ÿH‰ÃéTMûÿH‹D$8L‰¼$XE1íÇ„$ì&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé’ñúÿH‹EH‰ïÿP0éÇ6ûÿH‹D$8L‰¼$XE1íÇ„$é&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péçîúÿH‹CH‰ßÿP0éê3ûÿH‹D$8L‰¼$XE1íÇ„$æ&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé<ìúÿH‹D$8L‰¼$XE1íÇ„$ä&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé éúÿH‹D$8L‰¼$XE1íÇ„$â&Ç„$6E1ÿHÇD$8HÇD$E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$(HÇD$1ÛH‰„$hHÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péçúÿH‹CH‰ßÿP0é+ûÿH‹=ö !è‰ÏøÿH…ÀH‰ÃH‰„$ø„Y8H‹5N£!H‰ÇèF´øÿH…ÀH‰ÅH‰„$ЄÅ7Hƒ+u H‹CH‰ßÿP0H‹„$H9EHÇ„$ø„E71ÛHCH‰Çè†Ë÷ÿH…ÀH‰D$„Á6H‹„$øH…ÀtH‹t$HÇ„$øH‰FH‹D$`H‹t$1ÒHƒH‹D$HØH‹\$`H‰XH‹œ$ HƒH‰X H‹œ$ÐH‰ß褲øÿH…ÀH‰„$à„×5H‹D$H‹|$H‹H‰D$HƒèH…ÀH‰uH‹GÿP0Hƒ+u H‹CH‰ßÿP0Hƒ|$8HÇ„$Ðt(H‹D$8H‹\$8H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=ƒŸ!èÎøÿH…ÀH‰ÃH‰„$Є¼4H‹5Û¡!H‰ÇèÓ²øÿH…ÀH‰D$„74Hƒ+u H‹CH‰ßÿP0H‹D$1íH‹œ$HÇ„$ÐH9X„«3HEH‰ÇèÊ÷ÿH…ÀH‰ÃH‰„$ø„#3H‹„$ÐH…ÀtH‰CHÇ„$ÐH‹„$àH‹t$`H‹”$àH‹|$HƒHëH‰PHƒ1ÒH‰p H‰Þè;±øÿH…ÀI‰Æ„]2Hƒ+u H‹CH‰ßÿP0H‹D$H‹\$HÇ„$øH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$¨t.H‹„$¨H‹œ$¨H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=Ÿ!è¦ÌøÿH…ÀH‰D$„V1H‹5ž!H‰Çèi±øÿH…ÀH‰ÃH‰„$ø„Ã0H‹D$H‹L$H‹H‰D$HƒèH…ÀH‰u H‹AH‰ÏÿP0H‹„$H9C„/L‰öH‰ßè`ÏøÿH…ÀH‰D$„ÃH‹”$øH‰„$€Hƒ*u H‹BH‰×ÿP0Hƒ¼$ˆHÇ„$øt.H‹„$ˆH‹œ$ˆH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹„$(H9D$H‹„$0”ÂH9D$¶Ê”ÀÐuH‹„$ H9D$…”‰È…À…"H‹D$L‰´$¨H‰„$ˆéÔºüÿH‹„$8L‰´$¨E1íHÇD$HÇD$(E1öHÇD$Ç„$:>E1ÿH‰„$€Ç„$+E1äHÇD$8HÇD$01í1ÛéOâúÿH‹|$èÈ÷ÿ…À‰\ÿÿÿH‹D$L‰´$¨E1íÇ„$R>Ç„$.E1ÿHÇD$8HÇD$0E1äH‰„$ˆH‹„$8E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰„$€é·áúÿH‹=¸›!èKÊøÿH…ÀH‰ÃH‰„$ø„|,H‹5ˆ!H‰Çè¯øÿH…ÀH‰ÅH‰„$ЄÓ+Hƒ+u H‹CH‰ßÿP0H‹„$H9EHÇ„$ø„S+1ÛHCH‰ÇèHÆ÷ÿH…ÀH‰D$„·*H‹„$øH…ÀtH‹T$HÇ„$øH‰BH‹D$`H‹t$1ÒHƒH‹D$HØH‹\$`H‰XH‹œ$ HƒH‰X H‹œ$ÐH‰ßèf­øÿH…ÀI‰Å„'H‹D$H‹t$H‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0Hƒ+u H‹CH‰ßÿP0H‹5—!1ÒL‰ïè¡Ã÷ÿH…ÀH‰ÃH‰„$ЄDŽIƒmu I‹EL‰ïÿP0H;œ$(”ÂH;œ$0¶Ê”ÀÐuH;œ$ …]A‰ÏHƒ+u H‹CH‰ßÿP0H‹=š!HÇ„$Ðè–ÈøÿH…ÀI‰Å„ ŒH‹5cœ!H‰Çè[­øÿH…ÀH‰D$„„‹Iƒmu I‹EL‰ïÿP0H‹D$H‹œ$H9X„튿è«Ä÷ÿH…ÀH‰ÃH‰„$ø„OŠ1ÀH‹¼$àH‹”$ HÃH‰ÞHƒH‰xHƒH‹|$H‰P 1Òèò«øÿH…ÀH‰D$H‰„$Є‰Hƒ+u H‹CH‰ßÿP0H‹D$H‹\$HÇ„$øH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒ¼$¸t.H‹„$¸H‹œ$¸H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹´$€L‰÷èÿÁ÷ÿH…ÀH‰„$¨H‰„$ЄQˆIƒ.u I‹FL‰÷ÿP0H‹=™!HÇ„$ÐèÇøÿH…ÀH‰D$„–‡H‹5y˜!H‰ÇèÑ«øÿH…ÀH‰ÃH‰„$ø„á…H‹D$H‹|$H‹H‰D$HƒèH…ÀH‰uH‹GÿP0H‹„$H9C„…H‹t$H‰ßèÉÉøÿH…ÀH‰„$Єc„H‹”$øHƒ*u H‹BH‰×ÿP0H‹œ$ÐH‹|$H‰Þè Á÷ÿH…ÀH‰„$¸H‰„$ø„ƒHƒ+u H‹CH‰ßÿP0H‹D$H‹\$HÇ„$ÐH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ò„$€èÐÁ÷ÿH…ÀH‰ÃH‰„$ø„¨‚H‹´$¨H‰ÇèLÀ÷ÿH…ÀH‰ÅH‰„$Є‚Hƒ+u H‹CH‰ßÿP0H‹|$pH‰îè‹¿÷ÿH…ÀI‰ÄH‰„$ø„ZHƒmu H‹EH‰ïÿP0ò„$€èHÁ÷ÿH…ÀH‰ÃH‰„$Є¦ŽH‹´$¨H‰ÇèÄ¿÷ÿH…ÀI‰Å„ ŽHƒ+u H‹CH‰ßÿP0H‹|$pL‰îè«Ã÷ÿH…ÀH‰ÃH‰„$Є]Iƒmu I‹EL‰ïÿP0¿è¾÷ÿH…ÀI‰Å„¸ŒH‹@fïÀH‹¼$L‰îHÇ„$øL‰ I‹EH‰Xè<÷÷ÿH˜H‰ÇèwÂ÷ÿH…ÀH‰D$H‰„$Єô‹Iƒmu I‹EL‰ïÿP0Hƒ¼$t.H‹„$H‹œ$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0ò„$€èÀ÷ÿH…ÀH‰ÃH‰„$ЄúŠH‹´$¸H‰Ç蕾÷ÿH…ÀI‰Å„SŠHƒ+u H‹CH‰ßÿP0H‹|$pL‰îèܽ÷ÿH…ÀH‰ÅH‰„$ЄÍIƒmu I‹EL‰ïÿP0ò„$€虿÷ÿH…ÀI‰Å„H‹´$¸H‰Çè¾÷ÿH…ÀH‰ÃH‰„$ø„hŽIƒmu I‹EL‰ïÿP0H‹|$pH‰ÞèûÁ÷ÿH…ÀI‰Å„³Hƒ+u H‹CH‰ßÿP0¿èu¼÷ÿH…ÀH‰ÃH‰„$ø„<H‹@fïÀH‹¼$°H‰ÞHÇ„$ÐH‰(H‹CL‰hèõ÷ÿH˜H‰ÇèÈÀ÷ÿH…ÀI‰Å„lHƒ+u H‹CH‰ßÿP0H‹|$L‰î迼÷ÿH…ÀH‰„$H‰„$ø„LIƒmu I‹EL‰ïÿP0Hƒ¼$˜t.H‹„$˜H‹œ$˜H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹5M!H‹¼$ºèc·øÿH…ÀH‰ÃH‰„$ø„ƒH;„$(”ÂH;„$0¶Ê”ÀÐuH;œ$ …5‰ÍHƒ+u H‹CH‰ßÿP0…íHÇ„$ø„ÐH‹„$€H‰„$ˆH‹„$H‰„$˜H‹D$H‰„$é1±üÿH‹„$€E1íÇ„$7?Ç„$:HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é~ØúÿH‹5÷Ž!H‹¼$ºè¶øÿH…ÀH‰ÃH‰„$ø„üH;„$(”ÂH;„$0¶Ê”ÀÐuH;œ$ …o‰ÍHƒ+u H‹CH‰ßÿP0…íHÇ„$ø…²þÿÿH‹5qŽ!H‹¼$ºè—µøÿH…ÀH‰ÃH‰„$ø„0H;„$(”ÂH;„$0¶Ê”ÀÐuH;œ$ …£‰ÍHƒ+u H‹CH‰ßÿP0…íHÇ„$ø„4þÿÿE…ÿ…+þÿÿò„$€èë»÷ÿH…ÀH‰ÃH‰„$ø„H‹´$ðºH‰Çèrº÷ÿH…ÀI‰Å„ZHƒ+u H‹CH‰ßÿP0L;¬$(HÇ„$ø”ÂL;¬$0¶Ê”ÀÐuL;¬$ …f‰ËIƒmu I‹EL‰ïÿP0…Û„C H‹=”!èh¿øÿH…ÀH‰ÃH‰„$ø„… ò„$pè&»÷ÿH…ÀI‰ÆH‰„$ЄÅò„$xè»÷ÿH…ÀH‰D$„ò„$èèº÷ÿH…ÀI‰ÅH‰„$È„]òD$(èɺ÷ÿH…ÀH‰ÅH‰„$ð„)ò„$ˆ觺÷ÿH…ÀI‰Ä„}H‹„$H9C„¿è»÷ÿH…ÀH‰D$0„_1ÀH‹\$0H‹t$01ÒHÇ„$ÐHÇ„$ÈHÇ„$ðHÃH‹\$L‰pL‰h(H‰X H‹œ$èH‰h0L‰`8HƒH‰X@H‹œ$ðHƒH‰XHH‹œ$øH‰ßè¢øÿH…ÀI‰Æ„ìH‹D$0H‹T$0H‹H‰D$HƒèH…ÀH‰u H‹BH‰×ÿP0Hƒ+u H‹CH‰ßÿP0Hƒ¼$ÐHÇ„$øt(H‹„$ÐH‹œ$ÐH‹H‰D$HƒèH…ÀH‰„L‰´$ÐH‹=P’!è{½øÿH…ÀI‰ÅH‰„$ø„¯H‹=`’!è[½øÿH…ÀH‰ÃH‰„$Єñò„$pè¹÷ÿH…ÀH‰D$„@ò„$xèý¸÷ÿH…ÀH‰D$H‰„$È„‡ò„$èÙ¸÷ÿH…ÀI‰ÆH‰„$ð„ÐH‹¼$ 1öè À÷ÿH…ÀI‰Ä„#H‹¼$ ¾è‚À÷ÿH…ÀH‰D$0„†H‹¼$ ¾èbÀ÷ÿH…ÀH‰D$8„æH‹„$H9CHÇ„$à„x1íHEH‰Çèθ÷ÿH…ÀI‰Ç„áH‹„$àH…ÀtI‰GHÇ„$àH‹\$Iï1ÒL‰þHÇ„$ÈHÇ„$ðL‰p(L‰`0H‰XH‹\$H‰X H‹\$0H‰X8H‹\$8H‰X@H‹œ$ÐH‰ßèØŸøÿH…ÀH‰D$„ÄIƒ/u I‹GL‰ÿÿP0Hƒ+u H‹CH‰ßÿP0¿èд÷ÿH…ÀH‰ÃH‰„$ЄñH‹@H‹|$H‹Œ$ÐH‰8H‹„$ÐHƒH‹CH‰HH‹„$I9E„ÞH‰ÞL‰ïèw¾øÿH…ÀI‰ÆtrHƒ+u H‹CH‰ßÿP0HÇ„$ÐH‹”$øHƒ*u H‹BH‰×ÿP0H‹¼$L‰öHÇ„$ø诞øÿƒÀ„ Iƒ.…îøÿÿI‹FL‰÷ÿP0éßøÿÿH‹„$€E1íHÇD$HÇD$HÇD$(E1ÿÇ„$g@Ç„$IE1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é’ÑúÿH‹„$€E1íÇ„$“?Ç„$EHÇD$8E1ÿHÇD$E1ö1íH‰„$ˆH‹„$81ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é ÑúÿH‹CH…ÀH‰D$8„îúÿÿH‹L$8H‹CHƒH‰„$øHƒHƒ+u H‹CH‰ßÿP0¿èÔµ÷ÿH…ÀH‰D$0„?H‹D$0H‹\$8H‰X¸é¯úÿÿH‹„$€E1íÇ„$…?Ç„$EHÇD$8E1ÿHÇD$0HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é ÐúÿH‹„$€E1íÇ„$ƒ?Ç„$EHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1ö1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éwÏúÿH‹„$€E1íÇ„$“?Ç„$EE1ÿHÇD$E1ö1í1ÛH‰„$ˆH‹„$8HÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é÷ÎúÿH‹„$€E1íÇ„$?Ç„$EHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1ö1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$ébÎúÿH‹„$€E1íHÇD$E1öHÇD$(Ç„$?Ç„$EHÇD$8E1ÿH‰„$ˆH‹„$8E1äHÇD$01í1ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éÍÍúÿH‹„$€E1íÇ„$}?Ç„$EHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é/ÍúÿH‹„$€E1íÇ„${?Ç„$EHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é‘ÌúÿH‹=bŠ!è%µøÿH…ÀH‰ÃH‰„$ø„Jò„$pèã°÷ÿH…ÀH‰D$0„™ò„$xèǰ÷ÿH…ÀI‰Ä„íò„$è­°÷ÿH…ÀI‰ÇH‰„$ð„9ò„$€è‹°÷ÿH…ÀI‰ÅH‰„$È„…òD$(èl°÷ÿH…ÀH‰D$„fò„$ˆèP°÷ÿH…ÀH‰ÅH‰„$Є»H‹„$H9C„E¿è°°÷ÿH…ÀI‰Æ„©1ÀH‹\$0IÆ1ÒL‰öHÇ„$ðHÇ„$ÈL‰` L‰x(H‰XH‹\$L‰h0H‰h@HÇ„$ÐH‰X8H‹œ$èHƒH‰XHH‹œ$ðHƒH‰XPH‹œ$øH‰ßè³—øÿH…ÀH‰D$tqIƒ.u I‹FL‰÷ÿP0Hƒ+u H‹CH‰ßÿP0Hƒ¼$ÐHÇ„$øt(H‹„$ÐH‹œ$ÐH‹H‰D$HƒèH…ÀH‰„£H‹D$H‰„$Ðé±õÿÿH‹„$€L‰t$E1íE1öHÇD$(Ç„$ý?Ç„$GHÇD$8E1ÿH‰„$ˆH‹„$8E1äHÇD$01í1ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éÊúÿH‹CH‰ßÿP0H‹D$H‰„$ÐéõÿÿH‹„$€E1íHÇD$HÇD$(Ç„$à?E1ÿÇ„$GHÇD$81íH‰„$ˆH‹„$81ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éeÉúÿH‹CH…ÀH‰D$8„©ýÿÿH‹t$8H‹CHƒH‰„$øHƒHƒ+u H‹CH‰ßÿP0¿ è0®÷ÿH…ÀI‰Æ„%H‹D$8I‰F¸éoýÿÿH‹„$€E1íÇ„$Ò?Ç„$GHÇD$8E1ÿHÇD$E1ö1íH‰„$ˆH‹„$81ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éxÈúÿH‹„$€E1íHÇD$E1öHÇD$(Ç„$Ð?Ç„$GHÇD$8E1ÿH‰„$ˆH‹„$81í1ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éïÇúÿH‹„$€E1íHÇD$HÇD$(Ç„$à?E1ÿÇ„$G1í1ÛH‰„$ˆH‹„$8H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$érÇúÿH‹„$€E1íÇ„$Î?Ç„$GHÇD$8E1ÿHÇD$HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éàÆúÿH‹„$€E1íÇ„$Ì?Ç„$GHÇD$8E1ÿHÇD$HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éNÆúÿH‹„$€E1íÇ„$Ê?Ç„$GHÇD$8E1ÿHÇD$HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é¼ÅúÿH‹„$€E1íÇ„$È?Ç„$GHÇD$8E1ÿHÇD$E1äHÇD$H‰„$ˆH‹„$8E1ö1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é'ÅúÿH‹„$€E1íÇ„$Æ?Ç„$GHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é‰ÄúÿL‰ïèQª÷ÿ…À‰Ã‰ŠíÿÿH‹„$€Ç„$p?E1ÿÇ„$DHÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81íHÇD$1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éÜÃúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿÇ„$n?Ç„$DE1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éAÃúÿH‹„$€E1íÇ„$l?Ç„$DHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é£ÂúÿH‹„$€E1íÇ„$U?Ç„$@HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éÂúÿH‰ßèͧ÷ÿ…À‰Å‰MêÿÿH‹„$€E1íÇ„$W?Ç„$@HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éUÁúÿH‹„$€E1íÇ„$F?Ç„$=HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é·ÀúÿH‰ßè¦÷ÿ…À‰Å‰èÿÿH‹„$€E1íÇ„$H?Ç„$=HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éÀúÿH‹„$€E1íÇ„$@Ç„$JHÇD$8E1ÿHÇD$0HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éu¿úÿH‹„$€E1íÇ„$@Ç„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1ö1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éà¾úÿH‹„$€E1íÇ„$@Ç„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1ö1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éK¾úÿH‹„$€E1íHÇD$E1öHÇD$(Ç„$@Ç„$JHÇD$8E1ÿH‰„$ˆH‹„$8E1äHÇD$01í1ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é¶½úÿH‹„$€E1íÇ„$@Ç„$JHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é½úÿH‹„$€E1íÇ„$ @Ç„$IHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éz¼úÿH‹„$€E1íHÇD$HÇD$HÇD$(E1ÿÇ„$­?Ç„$EE1äH‰„$ˆH‹„$81íHÇD$81ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éè»úÿH‹CH‰ßÿP0L‰´$ÐéêæÿÿH‹„$€E1íÇ„$1@Ç„$JHÇD$E1ö1í1ÛHÇD$(H‰„$ˆH‹„$8H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éT»úÿH‹CH…ÀH‰„$à„sçÿÿH‹SHƒ½HƒH‹H‰”$ÐHƒèH…ÀH‰…IçÿÿH‹CH‰ßÿP0é:çÿÿH‹„$€E1íÇ„$#@Ç„$JE1ÿHÇD$E1ö1í1ÛH‰„$ˆH‹„$8HÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$鄺úÿH‹„$€E1íÇ„$!@Ç„$JHÇD$8E1ÿHÇD$E1ö1íH‰„$ˆH‹„$81ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éû¹úÿH‹„$€E1íÇ„$T@Ç„$IHÇD$8E1ÿHÇD$0E1äHÇD$H‰„$ˆH‹„$8E1ö1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éf¹úÿH‹„$€E1íHÇD$E1öHÇD$(Ç„$H@Ç„$JHÇD$8E1äH‰„$ˆH‹„$81íHÇD$01ÛH‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éÔ¸úÿI‹EH…ÀH‰D$„æÿÿI‹mHƒHƒEIƒmH‰¬$øu I‹EL‰ïÿP0¿è¢÷ÿH…ÀI‰Ç„H‹D$1ÒI‰_ L‰þH‰ïHÇ„$ÐI‰Gè…øÿH…ÀI‰Æ„·Iƒ/…ÇåÿÿI‹GL‰ÿÿP0é¸åÿÿH‹„$€M‰õÇ„$v@Ç„$IHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é·úÿH‹„$€E1íHÇD$HÇD$HÇD$(E1äÇ„$q@Ç„$I1íH‰„$ˆH‹„$81ÛHÇD$8HÇD$0H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$é·úÿH‹„$€E1íÇ„$k@Ç„$IHÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$és¶úÿH‹„$€L‰´$¨E1íHÇD$HÇD$(E1öHÇD$Ç„$m>E1ÿH‰„$ˆH‹„$8E1äÇ„$1HÇD$81íHÇD$01ÛH‰„$€éóµúÿH‹EH…ÀH‰„$ø„˜ÔÿÿH‹UHƒ»HƒH‹EH‰”$ÐHƒèH…ÀH‰E…lÔÿÿH‹EH‰ïÿP0é]ÔÿÿH‹D$L‰´$¨E1íÇ„$^>Ç„$1E1ÿHÇD$8HÇD$0E1äH‰„$ˆH‹„$8E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰„$€éµúÿH‹D$L‰´$¨E1íÇ„$\>Ç„$1E1ÿHÇD$8HÇD$0E1äH‰„$ˆH‹„$8E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰„$€é•´úÿH‹CH…ÀH‰D$„èÐÿÿH‹kHƒHƒEHƒ+H‰¬$øu H‹CH‰ßÿP0¿èd™÷ÿH…ÀH‰ÃH‰„$Є¾H‹D$1ÒH‰ÞH‰ïH‰CIƒL‰s è€øÿH…ÀH‰D$t&Hƒ+u H‹CH‰ßÿP0HÇ„$ÐH‹D$épÐÿÿH‹„$8L‰´$¨E1íHÇD$HÇD$(E1öHÇD$Ç„$C>E1ÿH‰„$€Ç„$+E1äHÇD$8HÇD$01í1Û邳úÿH‹„$8L‰´$¨E1íÇ„$=>Ç„$+E1ÿHÇD$8HÇD$0E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$é³úÿH‹„$8L‰´$¨E1íÇ„$,>Ç„$+E1ÿHÇD$8HÇD$0E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$颲úÿH‹„$8L‰´$¨E1íHÇD$HÇD$(E1öHÇD$Ç„$*>E1ÿH‰„$€Ç„$+E1äHÇD$8HÇD$01í1Ûé2²úÿH‹„$8E1íHÇD$HÇD$(HÇD$E1ÿÇ„$>Ç„$*E1äH‰„$€HÇD$81íHÇD$01ÛéͱúÿH‹„$8E1íÇ„$>Ç„$*HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€E1ö1í1ÛHÇD$(HÇD$ée±úÿH‹@H…ÀH‰„$Є@ÌÿÿH‹\$H‹L$H‹[HƒH‹D$HƒH‹H‰D$HƒèH…ÀH‰„èH‰\$½éþËÿÿH‹„$8E1íHÇD$E1öHÇD$(HÇD$Ç„$>Ç„$*E1ÿH‰„$€HÇD$8E1äHÇD$01í1Û馰úÿH‹„$8E1íÇ„$>Ç„$*HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$é5°úÿH‹AH‰Ï½ÿP0H‰\$é ËÿÿH‹„$8E1íHÇD$E1öHÇD$(HÇD$Ç„$ò=Ç„$)E1ÿH‰„$€H‹D$8E1äHÇD$8HÇD$01í1ÛH‰„$à駯úÿH‹„$8E1íHÇD$E1öHÇD$(HÇD$Ç„$ç=Ç„$)E1ÿH‰„$€HÇD$8E1äHÇD$01í1Ûé?¯úÿH‹EH…ÀH‰„$ø„¦ÈÿÿH‹UHƒ»HƒH‹EH‰”$ÐHƒèH…ÀH‰E…zÈÿÿH‹EH‰ïÿP0ékÈÿÿH‹„$8E1íÇ„$Ø=Ç„$)HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$é|®úÿH‹„$8E1íÇ„$Ö=Ç„$)HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$€HÇD$E1ö1í1ÛHÇD$(HÇD$é ®úÿH‹D$@H‹\$@H‹H‰D$HƒèH…ÀH‰uH‹D$@H‹|$@H‹@ÿP0H‹D$@H‰„$ÀH‹D$H‰„$ÈH‹$H‰„$ˆéÛ|úÿH‹|$0H‰Îè´”÷ÿH‰ÃéPúÿH‰ÖH‰ïè¡”÷ÿH‰Ãéï‚úÿH‹%!H5ÃöE1íE1ÿE1äE1ö1í1ÛH‹8è‘÷ÿH‹D$@Ç„$‡1Ç„$¡HÇD$8HÇD$0HÇD$H‰„$ÀH‹D$HÇD$(HÇD$HÇD$HÇ„$H‰„$ÈH‹$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ˆH‹„$ÀHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰$HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é·«úÿH‹CH‰ßÿP0é‚ÇûÿH‹D$@HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$r1Ç„$ é`†ûÿH‹CH‰ßÿP0é ÆûÿH‹D$0Ç„$è)E1íÇ„$KHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$`H‹D$hE1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ðHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øHÇ„$HHÇ„$péì§úÿI‹uHƒþ…ÔAI‹EH‹H‹hL‹`HƒH‰œ$èHƒEH‰¬$ÐIƒ$L‰¤$ðIƒmu I‹EL‰ïÿP0H‹ !H9C„ø3H‰ßè?÷ÿòD$ò|$f.=“ôz„=DHƒ+u H‹CH‰ßÿP0H‹Ä!H9EHÇ„$è„i6H‰ïèîŒ÷ÿòD$@ò|$@f.=Bôz„“3Hƒmu H‹EH‰ïÿP0H‹r!I9D$HÇ„$Є?3L‰ç蛌÷ÿò„$°ò´$°f.5éóz„ü5Iƒ,$u I‹D$L‰çÿP0H‹= _!è;øÿH…ÀH‰ÃH‰„$ð„?0òD$èüŠ÷ÿH…ÀH‰D$H‰„$Єz-òD$@èÛŠ÷ÿH…ÀH‰D$@H‰„$脵*ò„$°è·Š÷ÿH…ÀI‰ÅH‰„$È„"H‹|$艌÷ÿH…ÀI‰ÄH‰„$à„ÎH‹„$H9CHÇ„$Ø„`1íHEH‰ÇèéŠ÷ÿH…ÀH‰ÃH‰„$ø„šH‹„$ØH…ÀtH‰CHÇ„$ØH‹D$0H‹L$81ÒH‹|$0H‰ÞHÇ„$ÐHÇ„$èHÇ„$ÈHƒHëH‹¬$ðHÇ„$àH‰xHƒH‹|$H‰H H‹L$@IƒH‰x0L‰h@H‰ïL‰x(H‰H8L‰`Hè¾qøÿH…ÀI‰Å„ Hƒ+u H‹CH‰ßÿP0HƒmHÇ„$øu H‹EH‰ïÿP0I‹EH;D$(HÇ„$ð„pH‹K!H9ØH‰œ$@„XL‰ïè ‹÷ÿH…ÀH‰ÃH‰„$à„›Iƒmu I‹EL‰ïÿP0H‹CH‰ßH‹¨àÿÕH…ÀH‰„$ð„bH‰ßÿÕH…ÀH‰„$ø„q H‰ßÿÕH…À…Q èënøÿ…Àˆ Hƒ+u H‹CH‰ßÿP0H‹œ$øHÇ„$àH‹CH;„$@„{H;î!„nH‹@HÝÖH5BÖE1íE1ä1í1ÛH‰ÁH‹z!H‹81Àè Š÷ÿH‹D$8L‰´$øE1öL‰¼$XÇ„$Í'E1ÿÇ„$9HÇD$8H‰„$PH‹D$0HÇD$HÇD$0HÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé&¡úÿH‹D$8L‰´$øE1íL‰¼$XÇ„$Â'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$p邞úÿHƒ¼$H‹¬$ðt.H‹„$H‹´$H‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹„$@H‹¼$@HÇ„$ðH‹H‰D$HƒèH…ÀH‰uH‹GÿP0H‹|$xH‰îHÇ„$øèQ€÷ÿH…ÀI‰Å„ŽH‹@H;„$@„üL;-Ä!„ïH‹@H³ÐH5ÐE1äH‰ÁH‹W!H‹81Àè}„÷ÿH‹D$8H‰¬$1íL‰´$øL‰¼$XE1öH‰œ$@Ç„$Ü'E1ÿH‰„$PH‹D$01ÛÇ„$:HÇD$8HÇD$0HÇD$H‰„$hHÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péïšúÿ¾H‰Ç賄÷ÿé¢öÿÿ½Hƒ+u H‹CH‰ßÿP0HÇ„$àègeøÿ…À… HÛËHÐÍHƒýH5>àHDÂH‰êE1íH‰ÁH‹*!E1ä1í1ÛH‹81ÀèQ÷ÿH‹D$8L‰´$øE1öL‰¼$XÇ„$Ê'E1ÿÇ„$9HÇD$8H‰„$PH‹D$0HÇD$HÇD$0HÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé×—úÿH‹D$xH‹|$xH‹H‰D$HƒèH…ÀH‰uH‹D$xH‹|$xH‹@ÿP0H‹D$8H‰¬$L‰´$øL‰¼$XH‰œ$@L‰l$xH‰„$PH‹D$0H‰„$hH‹„$ðH‰D$0é)òúÿH‰¬$L‰´$øE1äL‰¼$XHÇD$E1öHÇD$HÇD$(E1ÿHÇD$HÇ„$1íHÇ„$ˆHÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‹D$8H‰œ$@1ÛHÇ„$pÇ„$Ú'Ç„$:HÇD$8H‰„$PH‹D$0HÇ„$€HÇD$0HÇ„$ðHÇ„$èH‰„$hHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`馔úÿH‹D$8L‰´$øE1íL‰¼$XÇ„$Ê'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé’úÿ1íé#÷ÿÿH‹D$8L‰´$øE1äL‰¼$XÇ„$º'E1ÿÇ„$9HÇD$8E1öH‰„$PH‹D$01íHÇD$0HÇD$1ÛHÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péZúÿI‹uHƒþ…=H;D$(I‹E…H‰„$ðI‹E H‰„$øH‹„$ðH‹œ$øHƒHƒIƒm„µH‹‡!H‰„$@éãêÿÿH‹D$8L‰´$øE1äL‰¼$XHÇD$E1öHÇD$HÇD$(E1ÿHÇD$HÇ„$1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$PH‹D$0HÇ„$pÇ„$—'Ç„$9HÇD$8H‰„$hHÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`éQŒúÿI‹EL‰ïÿP0H‹È!H‹œ$øH‰„$@éèÿÿH‹H‹@H‰”$ðH‰„$øéæüÿÿ» H…öˆ H,½H!¿HƒþHDÂH‰òH5ˆÑH‰ÁH‹~!E1ä1í1ÛH‹81Àè¥r÷ÿH‹D$8L‰´$øE1öL‰¼$XÇ„$¥'E1ÿÇ„$9HÇD$8H‰„$PH‹D$0HÇD$HÇD$0HÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé+‰úÿH‹D$8L‰´$øE1íL‰¼$XÇ„$}'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$p釆úÿH‹CH…ÀH‰„$Ø„‹àÿÿH‹SHƒ½HƒH‹H‰”$ðHƒèH…ÀH‰…aàÿÿH‹CH‰ßÿP0éRàÿÿH‹D$8L‰´$øE1íL‰¼$XÇ„$o'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$p铃úÿH‹D$8L‰´$øE1íL‰¼$XÇ„$m'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péï€úÿH‹D$8L‰´$øE1äL‰¼$XÇ„$¥'E1ÿÇ„$9HÇD$8E1öH‰„$PH‹D$01íHÇD$0HÇD$1ÛHÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péN~úÿH‹ïõ H5H¿ºE1ä1í1ÛH‹81Àè e÷ÿH‹D$8L‰´$øE1öL‰¼$XÇ„$¥'E1ÿÇ„$9HÇD$8H‰„$PH‹D$0HÇD$HÇD$0HÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé{úÿH‹D$8L‰´$øE1íL‰¼$XÇ„$k'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péìxúÿH‹D$8L‰´$øE1íL‰¼$XÇ„$i'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péHvúÿH‹D$8L‰´$øE1íL‰¼$XÇ„$g'E1ÿÇ„$9HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé¤súÿòA|$ò¼$°é½Ìÿÿò{ò|$éÌÿÿèªX÷ÿH…À„_ÌÿÿH‹D$8L‰´$øE1íL‰¼$XÇ„$O'E1ÿÇ„$7HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÍpúÿò}ò|$@é•ÉÿÿèèU÷ÿH…À„öÉÿÿH‹D$8L‰´$øE1íL‰¼$XÇ„$Q'E1ÿÇ„$7HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé núÿH‹CH‰ßÿP0é¶úÿH‹D$8L‰´$øE1äL‰¼$XÇ„$*'E1ÿÇ„$7HÇD$8E1öH‰„$PH‹D$01íHÇD$0HÇD$1ÛHÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé[kúÿH‹D$8L‰´$øE1äL‰¼$XHÇD$E1öHÇD$HÇD$(E1ÿHÇD$HÇ„$1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$H‰„$PH‹D$0HÇ„$pÇ„$$'Ç„$7HÇD$8H‰„$hHÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØHÇ„$`éºhúÿH‹EH‰ïÿP0éÞ°úÿH‹D$8L‰´$øE1äL‰¼$XÇ„$-'E1ÿÇ„$7HÇD$8E1öH‰„$PH‹D$01íHÇD$0HÇD$1ÛHÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé fúÿ1H…öˆ‡H'—H™HƒþHDÂH‰òH5ƒ«H‰ÁH‹yÝ E1ä1í1ÛH‹81Àè L÷ÿH‹D$8L‰´$øE1öL‰¼$XÇ„$:'E1ÿÇ„$7HÇD$8H‰„$PH‹D$0HÇD$HÇD$0HÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé&cúÿèQH÷ÿH…À„µ»ÿÿH‹D$8L‰´$øE1íL‰¼$XÇ„$M'E1ÿÇ„$7HÇD$8E1äH‰„$PH‹D$0E1öHÇD$0HÇD$1íHÇD$HÇD$(1ÛH‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pét`úÿH‹D$8L‰´$øE1äL‰¼$XÇ„$:'E1ÿÇ„$7HÇD$8E1öH‰„$PH‹D$01íHÇD$0HÇD$1ÛHÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$péÓ]úÿH‹tÕ H5ÍžºE1ä1í1ÛH‹81ÀèD÷ÿH‹D$8L‰´$øE1öL‰¼$XÇ„$:'E1ÿÇ„$7HÇD$8H‰„$PH‹D$0HÇD$HÇD$0HÇD$HÇD$(H‰„$hHÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé[úÿH‹„$€E1íÇ„$ì>Ç„$8HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(HÇD$H‰„$€é”ZúÿH‹„$€E1íÇ„$ê>Ç„$8HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(HÇD$H‰„$€éZúÿH‹„$€E1íHÇD$E1öHÇD$(HÇD$Ç„$Ý>Ç„$6E1ÿH‰„$ˆH‹„$8E1äHÇD$8HÇD$01í1ÛH‰„$€H‹D$HÇD$H‰„$¸é…YúÿH‹„$€E1íÇ„$Ï>Ç„$6HÇD$8E1ÿHÇD$0E1äHÇD$H‰„$ˆH‹„$8E1ö1í1ÛHÇD$(HÇD$H‰„$€H‹D$HÇD$H‰„$¸é÷XúÿH‹CH…ÀH‰D$„ßzÿÿH‹kHƒHƒEHƒ+H‰¬$øu H‹CH‰ßÿP0¿èÆ=÷ÿH…ÀI‰Å„^H‹D$1ÒL‰îH‰ïI‰EH‹D$HƒI‰E è'%øÿH…ÀH‰„$ЄŸIƒm…ƒzÿÿI‹EL‰ïÿP0étzÿÿH‹„$€E1íÇ„$Á>Ç„$6HÇD$8E1ÿHÇD$0E1äE1öH‰„$ˆH‹„$81í1ÛHÇD$(HÇD$H‰„$€H‹D$HÇD$H‰„$¸é×WúÿH‹„$€Ç„$Ø>E1ÿÇ„$6HÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81í1ÛHÇD$(HÇD$H‰„$€H‹D$HÇD$H‰„$¸éLWúÿH‹„$€E1öHÇD$(HÇD$Ç„$Ò>E1ÿÇ„$6HÇD$8E1äH‰„$ˆH‹„$81íHÇD$01ÛH‰„$€H‹D$HÇD$H‰„$¸éÊVúÿH‹„$€E1íE1öHÇD$(HÇD$E1ÿÇ„$¿>Ç„$6E1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹D$HÇD$H‰„$¸éEVúÿH‹„$€L‰´$¨E1íHÇD$HÇD$(E1öHÇD$Ç„$³>E1ÿH‰„$ˆH‹„$8E1äÇ„$5HÇD$81íHÇD$01ÛH‰„$€H‹D$HÇD$H‰„$¸é¯UúÿH‹„$€L‰´$¨E1íHÇD$(HÇD$E1öÇ„$¥>Ç„$3E1ÿH‰„$ˆH‹„$8E1äHÇD$8HÇD$01í1ÛH‰„$€é8UúÿH‹„$€L‰´$¨E1íÇ„$š>Ç„$3E1ÿHÇD$8HÇD$0E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(HÇD$H‰„$€é¸TúÿL‹hM…í„uÿÿH‹hIƒEH‹\$HƒEH‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0¿è€9÷ÿH…ÀH‰ÃH‰„$ø„L‰kH‰l$¸éÄtÿÿH‹„$€L‰´$¨E1ÿHÇD$HÇD$(E1öHÇD$Ç„$‹>E1äH‰„$ˆH‹„$81íÇ„$3HÇD$81ÛHÇD$0H‰„$€éÌSúÿH‹„$€H‰l$E1ÿL‰´$¨Ç„$š>E1äÇ„$3HÇD$8E1öH‰„$ˆH‹„$81íHÇD$0HÇD$1ÛHÇD$(HÇD$H‰„$€éJSúÿH‹„$€L‰´$¨E1ÿHÇD$HÇD$E1öHÇD$(HÇD$E1äH‰„$ˆH‹„$81íÇ„$‰>Ç„$31ÛHÇD$8HÇD$0H‰„$€éÄRúÿH‰ßèŒ8÷ÿƒøÿA‰Ç…’rÿÿèÛ7÷ÿH…À„„rÿÿH‹„$€L‰´$¨E1íÇ„$~>Ç„$1E1ÿHÇD$8HÇD$0E1äH‰„$ˆH‹„$8E1öHÇD$HÇD$1í1ÛHÇD$(HÇD$H‰„$€éRúÿH‹„$€L‰´$¨E1ÿÇ„$|>Ç„$1E1äHÇD$8HÇD$0E1öH‰„$ˆH‹„$81íHÇD$HÇD$1ÛHÇD$(HÇD$H‰„$€é“QúÿH‹„$€L‰´$¨E1ÿHÇD$HÇD$(E1öHÇD$Ç„$x>E1äH‰„$ˆH‹„$81íÇ„$1HÇD$81ÛHÇD$0H‰„$€éQúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿÇ„$?Ç„$9E1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹D$HÇD$H‰„$é‹PúÿH‹„$€E1íÇ„$?Ç„$9HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹D$HÇD$H‰„$éýOúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿÇ„$?Ç„$8E1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€éˆOúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$ú>E1äH‰„$ˆH‹„$81íÇ„$8HÇD$81ÛHÇD$0H‰„$€é OúÿH‹„$€Ç„$÷>E1ÿÇ„$8HÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81íHÇD$1ÛHÇD$(HÇD$H‰„$€éŒNúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$ô>E1äH‰„$ˆH‹„$81íÇ„$8HÇD$81ÛHÇD$0H‰„$€éNúÿH‹„$€E1íÇ„$ò>Ç„$8HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(HÇD$H‰„$€éMúÿH‹„$€E1íÇ„$ï>Ç„$8HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(HÇD$H‰„$€é MúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿÇ„$?Ç„$9E1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹D$HÇD$H‰„$éLúÿH‹„$€Ç„$?E1ÿÇ„$9HÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81íHÇD$1ÛHÇD$(H‰„$€H‹D$HÇD$H‰„$éöKúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿÇ„$?Ç„$9E1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹D$HÇD$H‰„$ékKúÿH‹„$€Ç„$?E1ÿÇ„$9HÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81íHÇD$1ÛHÇD$(H‰„$€H‹D$HÇD$H‰„$éàJúÿH‹„$€HÇD$E1öHÇD$HÇD$(E1ÿÇ„$'?Ç„$9E1äH‰„$ˆH‹„$81íHÇD$8HÇD$01ÛH‰„$€H‹D$HÇD$H‰„$éUJúÿH‹„$€Ç„$?E1ÿÇ„$9HÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81íHÇD$1ÛHÇD$(H‰„$€H‹D$HÇD$H‰„$éÊIúÿH‹„$€Ç„$*?E1ÿÇ„$9HÇD$8E1äHÇD$0HÇD$E1öH‰„$ˆH‹„$81íHÇD$1ÛHÇD$(H‰„$€H‹D$HÇD$H‰„$é?IúÿH‰ßè/÷ÿ…À‰Å‰»oÿÿH‹„$€E1íÇ„$9?Ç„$:HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ˆH‹„$8E1öHÇD$1í1ÛHÇD$(H‰„$€H‹„$H‰„$˜H‹D$HÇD$H‰„$éHúÿèº-÷ÿH…À„ŒiûÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$S)Ç„$JH‰„$PH‹D$8HÇD$0HÇD$8HÇ„$€HÇ„$ðH‰„$hH‹D$hHÇ„$èHÇ„$˜HÇ„$HÇ„$0H‰„$ðHÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéÃEúÿH‰ÆH‰×èX)÷ÿ…À…+aûÿH‹D$@Ç„$+E1íÇ„$eHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é Dúÿ¾H‰ÇèÐ-÷ÿéjúÿ»é>ÿÿI‹EL‰ïÿP0éÞ+üÿE1íÇ„$ )é2ûÿH=Çè²(÷ÿ…À„ΜûÿéÖdûÿ1ÒL‰îH‰ïèh*÷ÿH…ÀI‰Æ…ΜûÿH‹D$0HÇD$E1íHÇD$HÇD$(E1ÿHÇD$HÇ„$E1äH‰„$`H‹„$˜1íHÇ„$ˆHÇ„$Ð1ÛHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$àHÇ„$°HÇ„$xHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$øH‰„$XH‹„$€HÇ„$HHÇ„$pÇ„$S)Ç„$JH‰„$PH‹D$8HÇD$0HÇD$8HÇ„$€HÇ„$ðH‰„$hH‹D$hHÇ„$èHÇ„$˜HÇ„$HÇ„$0H‰„$ðHÇ„$°HÇ„$(HÇ„$ HÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$€HÇ„$HÇ„$ÈHÇ„$ØéÞ@úÿ¾H‰Çè¢*÷ÿé_úÿ»éËAÿÿ¿èÈ%÷ÿH…ÀI‰Å„ôH‹„$àH‹=¥þ 1ÒL‰îHƒI‰Eè+ øÿH…ÀH‰ÃH‰„$Ø„Iƒmu I‹EL‰ïÿP0H‹´$pH‹<$H‰ÚèÒ&÷ÿ…Àx!Hƒ+u H‹CH‰ßÿP0HÇ„$ØérüÿH‹D$@Ç„$Æ1E1íÇ„$¤HÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈH‹$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ˆH‹„$ÀHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰$HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éq>úÿH‹D$@Ç„$Ã1E1ÿÇ„$¤HÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈH‹$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èH‰„$ˆH‹„$ÀHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸H‰$HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ é¸<úÿH‹D$@HÇD$E1öHÇD$(HÇD$E1ÿHÇ„$HÇ„$ˆE1äH‰„$ÀH‹D$1íHÇ„$ÐHÇ„$1ÛHÇ„$¸HÇ„$¨H‰„$ÈH‹$HÇ„$àHÇD$PHÇ„$ HÇ„$H‰„$ˆH‹„$ÀHÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$H‰$HÇD$@Ç„$¾1Ç„$¤HÇD$8HÇD$0HÇ„$€HÇ„$ðHÇ„$èHÇ„$˜HÇ„$HÇ„$0HÇ„$°HÇ„$(HÇ„$ éÿ:úÿI‹EL‰ïÿP0é-üÿH‹D$@Ç„$+E1ÿÇ„$gHÇD$8E1äHÇD$0HÇD$E1öH‰„$ÀH‹D$1íHÇD$HÇD$(1ÛHÇD$HÇ„$H‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ éO9úÿH‰ÖH‰ßèT ÷ÿI‰Æé6ÔúÿH‹CH‰ßÿP0éÜïûÿH‹|$hH‰Îè0 ÷ÿH‰Âé xúÿH‹D$@Ç„$ú*E1íÇ„$eHÇD$8E1ÿHÇD$0HÇD$E1äH‰„$ÀH‹D$E1öHÇD$HÇD$(1íHÇD$HÇ„$1ÛH‰„$ÈHÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ ét7úÿH‹D$@HÇD$E1öHÇD$(HÇD$HÇ„$HÇ„$ˆH‰„$ÀH‹D$HÇ„$ÐHÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@H‰„$ÈHÇD$Ç„$ø*Ç„$eé,ûÿ:H…öˆºHxgHmiHƒþHDÂH‰òH5Ô{H‰ÁH‹Ê­ E1ÿE1äE1ö1í1ÛH‹81Àèë÷ÿÇ„$Á&Ç„$3HÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé¡3úÿH‹CH‰ßÿP0é¯wúÿÇ„$Á&Ç„$3E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1öHÇD$(HÇD$1íHÇ„$HÇ„$ˆ1ÛHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé1úÿH‹¼¨ H5rºE1ÿE1äE1ö1í1ÛH‹81ÀèÑ÷ÿÇ„$Á&Ç„$3HÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(HÇ„$ HÇ„$àHÇ„$èHÇ„$˜HÇ„$ HÇ„$¨HÇ„$¸HÇ„$ÐHÇ„$°HÇ„$€HÇ„$xHÇ„$HÇ„$ÈHÇ„$ØHÇ„$ÀHÇ„$ÈHÇ„$ÀHÇ„$ˆHÇ„$HÇ„$`HÇ„$pé‡.úÿI‹EL‰ïÿP0ébrúÿH‹CH‰ßÿP0éÅrúÿ‹CH‰D$éÍÈúÿ‹CHÁàH‰Â‹CH ÂH‰T$é³ÈúÿH‰ßèz÷ÿH‰D$é•Èúÿ©€…gH‹B`H…À„^«ûÿHƒ¸„UH‰ßèâ÷ÿH`H‰ÅH…í„5«ûÿH‹EH‰ëH÷€¨€„àH‹KH‹¨©€„˜H‹CH‰D$Hƒ+…ÈúÿH‹KH‰ßÿQ0éÈúÿ‹C÷ØH˜H‰D$éóÇúÿH GlH=vº¨¾¡$è!ý÷ÿHƒ+u H‹CH‰ßÿP0Ç„$Ü1Ç„$¨é¢úÿ‹CHÁàH‰Â‹CH ÐH÷ØH‰D$éŽÇúÿ©„üH‹CH‰D$HƒÀHƒø‡ÓH5\iHc†HðÿàL‹@H‹œ¤ H5ípH‰ÑH‹81Àè¸÷ÿHƒm…3ªûÿH‹EH‰ïÿP0é$ªûÿHƒéÞþÿÿHƒ¸˜„í©ûÿH‰ßè/÷ÿH¹^H‰Åé˜þÿÿ‹C÷ØH˜H‰D$éÇþÿÿ‹CHÁàH‰Â‹CH ÐH÷ØH‰D$éªþÿÿ‹CH‰D$Hƒ+…ÁÆúÿé¡þÿÿ‹CHÁàH‰Â‹CH ÂH‰T$ëÚH‰ßèl÷ÿH‰D$éjþÿÿH‰ßèºøÿH‰D$éXþÿÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$/2H‰D$`H‹D$8Ç„$®H‰D$pH‹„$8H‰D$@HÇD$8HÇD$0E1ÿE1ä1í1Ûé‘úÿH‹$H‹<$H‹@ÿP0éåûÿò`ò¤$xéÎäûÿè•÷ÿH…À„VåûÿH‹D$0E1íÇ„$12Ç„$®HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@éÚ*úÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$+2H‰D$`H‹D$8Ç„$®H‰D$pH‹„$8H‰D$@éÅþÿÿH‹$H‹<$H‹@ÿP0éƒãûÿòxò¼$pé7ãûÿè{÷ÿH…À„¿ãûÿH‹D$0E1íÇ„$-2Ç„$®HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@éÀ)úÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$'2H‰D$`H‹D$8Ç„$®H‰D$pH‹„$8H‰D$@é«ýÿÿH‹$H‹<$H‹@ÿP0éìáûÿòhò¬$Hé áûÿèa÷ÿH…À„(âûÿH‹D$0E1íÇ„$)2Ç„$®HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@é¦(úÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$2H‰D$`H‹D$8Ç„$­H‰D$pH‹„$8H‰D$@é‘üÿÿH‹$H‹<$H‹@ÿP0éUàûÿòXòœ$hé àûÿèG ÷ÿH…À„‘àûÿH‹D$0E1íÇ„$2Ç„$­HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@éŒ'úÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$2H‰D$`H‹D$8Ç„$­H‰D$pH‹„$8H‰D$@éwûÿÿH‹$H‹<$H‹@ÿP0é¾Þûÿòpò´$XérÞûÿè- ÷ÿH…À„úÞûÿH‹D$0E1íÇ„$2Ç„$­HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@ér&úÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$2H‰D$`H‹D$8Ç„$­H‰D$pH‹„$8H‰D$@é]úÿÿH‹$H‹<$H‹@ÿP0é'Ýûÿò`ò¤$PéÛÜûÿè ÷ÿH…À„cÝûÿH‹D$0E1íÇ„$2Ç„$­HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@éX%úÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$ 2H‰D$`H‹D$8Ç„$­H‰D$pH‹„$8H‰D$@éCùÿÿè ÷ÿH…À„óÛûÿH‹D$0E1íÇ„$ 2Ç„$­HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@ée$úÿHƒ*u H‹BH‰×ÿP0H‹D$ HÇ„$ØH‹@H…À„÷HƒH‰œ$°E1öH‰„$Ø1ÛH‹”$ØL9rŽ£H‹BJ‹ðIƒÆHƒHƒ¼$°H‰„$t-H‹„$°H‹”$°H‹H‰$HƒèH…ÀH‰u H‹BH‰×ÿP0H‹„$ H9„$ „ÖH‹´$H‹¼$ èa÷ÿH…ÀH‰D$tsH…ÛtHƒ+u H‹CH‰ßÿP0H‹„$(H9D$H‹„$0”ÂH9D$¶Ê”ÀÐuH‹„$ H9D$…“‰È…À…!H‹„$H‹\$H‰„$°éöþÿÿH‹D$0HÇD$E1öHÇD$HÇD$(H‰\$Ç„$WH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$"AH‰„$°éóöÿÿH‹|$èk÷ÿ…À‰]ÿÿÿH‹D$0Ç„$XH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$.AH‰„$°HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(é úÿH‹5®Ú H‹¼$èyï÷ÿH…ÀI‰Å„ØH‹=Vß è øÿH…ÀH‰ÂH‰„$ЄwH‹.™ H9BH‰„$„§H‹t$H‰×èw øÿH…ÀH‰„$ø„HH‹”$ÐHƒ*u H‹BH‰×ÿP0¿èD÷ÿH…ÀH‰ÃH‰„$ЄŒH‹@H‹”$øHÇ„$øH‰H‹„$I9E…ÈM‹eM…äL‰¤$ø„³I‹mIƒ$HƒEIƒmu I‹EL‰ïÿP0¿è÷ÿH…ÀH‰D$„#H‹D$1ÒH‰ïHÇ„$øHÇ„$ÐL‰`H‰X H‰ÆèUí÷ÿH…ÀH‰$thH‹D$H‹\$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0Hƒmu H‹EH‰ïÿP0H‹$H‹$H‹H‰D$HƒèH…ÀH‰…%ýÿÿH‹CH‰ßÿP0éýÿÿH‹D$0I‰íHÇD$E1öHÇD$(H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$oAH‰„$°Ç„$YHÇD$8HÇD$0E1ÿE1ä1í1ÛéîúÿH‹D$0I‰íHÇD$E1öHÇD$(H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$iAH‰„$°é{ÿÿÿH‰ÞL‰ïè0 øÿH…ÀH‰$t$Hƒ+u H‹CH‰ßÿP0HÇ„$ÐL‰íé¯þÿÿH‹D$0HÇD$E1öHÇD$HÇD$(H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$eAH‰„$°éäþÿÿH‹D$0H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$UAH‰„$°Ç„$YHÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(éxúÿH‹D$0H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$GAH‰„$°éuÿÿÿL‹zM…ÿ„LüÿÿH‹ZIƒHƒHƒ*H‰œ$Ðu H‹BH‰×ÿP0¿èâ÷ÿH…ÀH‰D$„zH‹D$H‹t$1ÒH‰ßL‰xH‹D$HƒH‹D$H‰p H‰Æè7ê÷ÿH…ÀH‰„$ø„ÛH‹D$H‹\$H‹H‰$HƒèH…ÀH‰…ÏûÿÿH‹CH‰ßÿP0éÀûÿÿH‹D$0H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$:AH‰„$°é}þÿÿH‹D$0HÇD$E1öHÇD$HÇD$(Ç„$YH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$8AH‰„$°éùðÿÿH‹D$0Ç„$YE1ÿHÇD$0H‰D$`H‹D$8HÇD$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$PAH‰„$°éÛýÿÿH‹D$0HÇD$E1öHÇD$(Ç„$YE1äHÇD$01í1ÛH‰D$`H‹D$8HÇD$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$JAH‰„$°éúúÿH‹y“ H5*bH‹8èjÿöÿH‹D$0H‰\$Ç„$WH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@H‹„$Ç„$ AH‰„$°éùÿÿHƒ*u H‹BH‰×ÿP0H‹„$(L‹t$HE1ÿH‰\$HÇD$@E1äHƒH‰„$ØH‹”$ØH‹D$@H9BŽ H‹\$@H‹BHƒD$@H‹ØH‹{’ HƒH‰$H‹@H‰\$(H9Ø„· H;b“ „ª H‹<$è+÷ÿH…ÀH‰ÃH‰„$ø„MH‹$H‹<$H‹H‰D$HƒèH…ÀH‰uH‹GÿP0H‹CH‰ßH‹¨àÿÕH…ÀI‰Å„þH‰ßÿÕH…ÀH‰D$„áH‰ßÿÕH…ÀH‰„$ЄH‰ßÿÕH…À…†èìä÷ÿ…Àˆ@Hƒ+u H‹CH‰ßÿP0H‹D$HÇ„$øL‰l$HH‰D$(M…ötIƒ.u I‹FL‰÷ÿP0M…ätIƒ,$u I‹D$L‰çÿP0M…ÿH‹œ$ÐtIƒ/u I‹GL‰ÿÿP0H‹„$(H9D$(H‹„$0HÇ„$ДÂH9D$(¶Ê”ÀÐuH‹„$ H9D$(…щȅÀ…–H;œ$(”ÂH;œ$0¶Ê”ÀÐuH;œ$ …ê‰È…À„Hƒ|$„®H‹5ØÔ H‰ßè æ÷ÿH…ÀH‰ÂH‰„$Є H‹m H9BH‰„$…¯H‹BH…ÀH‰D$„H‹jHƒHƒEHƒ*H‰¬$Ðu H‹BH‰×ÿP0H‹t$H‰ïèøÿH…ÀH‰$„H‹D$H‹t$H‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹”$ÐHƒ*u H‹BH‰×ÿP0H‹4$H‹|$è´úöÿH…ÀH‰D$H‰„$ЄMH‹$H‹<$H‹H‰D$HƒèH…ÀH‰uH‹GÿP0H‹D$H‹L$H‹H‰$HƒèH…ÀH‰u H‹AH‰ÏÿP0H‹5•Ð H‹|$HHÇ„$ÐèWå÷ÿH…ÀI‰Æ„hH‹D$H‰D$H‹„$I9F…¼I‹FH…ÀH‰D$„ªI‹FH‰$H‹D$HƒH‹$HƒIƒ.u I‹FL‰÷ÿP0¿èzüöÿH…ÀI‰Å„ H‹D$H‹<$1ÒL‰îI‰EH‹D$HƒI‰E èÚã÷ÿH…ÀH‰„$ÐtmIƒmu I‹EL‰ïÿP0H‹$H‹$H‹H‰D$HƒèH…ÀH‰u H‹BH‰×ÿP0H‹”$ÐHƒ*u H‹BH‰×ÿP0HÇ„$ÐI‰ßL‹d$(L‹t$Hé”ûÿÿH‹D$0Ç„$=BE1ÿÇ„$_HÇD$0E1äHÇD$HÇD$E1öH‰D$`H‹D$81íHÇD$8H‰D$pH‹„$8H‰D$@éUúÿH‹D$0HÇD$E1öÇ„$7BÇ„$_E1ÿHÇD$0E1ä1íH‰D$`H‹D$8HÇD$8H‰D$pH‹„$8H‰D$@éóúÿH‹t$L‰÷è¶øÿH…ÀH‰„$ÐL‰4$…µþÿÿH‹D$0E1íÇ„$4BÇ„$_HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81íH‰D$pH‹„$8H‰D$@écúÿH‹D$HÇD$HÇD$H‰D$H‹D$0Ç„$&BÇ„$_H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@HÇD$8HÇD$0E1ÿE1ä1íéñúÿH‹D$0E1íHÇD$E1öÇ„$BÇ„$^HÇD$0E1ÿE1äH‰D$`H‹D$81íHÇD$8H‰D$pH‹„$8H‰D$@éŒúÿH‹D$0HÇD$E1öÇ„$BH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@Ç„$^é4ÿÿÿH‰×èÜ øÿH…ÀH‰$…µûÿÿH‹D$0HÇD$E1öHÇD$Ç„$BH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@ë˜H‹D$0Ç„$BH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@Ç„$^HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1íéÿùÿH‹ú‹ HFH5H5ûRH‹81ÀèôöÿH‹D$0H‰œ$°Ç„$ AÇ„$VH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éšøùÿH‹… Hõ=H5URH‹81Àè[óöÿÇ„$÷1Ç„$¬HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$HÇ„$HÇ„$ˆHÇ„$€HÇ„$ðHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°é ÷ùÿH‹D$0L‰ûL‰d$(E1íÇ„$£AÇ„$\HÇD$0E1ÿHÇD$H‰D$`H‹D$8E1äHÇD$8HÇD$E1ö1íH‰D$pH‹„$8H‰D$@é– úÿH‹7‚ H5KºL‰ûE1íE1ÿE1ö1íH‹81ÀèKñöÿH‹D$0L‰d$(E1äÇ„$£AÇ„$\HÇD$0HÇD$H‰D$`H‹D$8HÇD$HÇD$8H‰D$pH‹„$8H‰D$@é úÿÇ„$ë1Ç„$«éƒýÿÿH‹CH‰ßÿP0éë¾ûÿÇ„$Þ1Ç„$¨E1íHÇD$8HÇD$0E1ÿHÇD$HÇD$E1äHÇD$(HÇD$E1öHÇ„$HÇ„$ˆ1íHÇ„$€HÇ„$ð1ÛHÇ„$èHÇ„$ÐHÇ„$˜HÇ„$HÇ„$¸HÇ„$¨HÇ„$àHÇD$PHÇ„$ HÇ„$HÇD$HHÇ„$HÇ„$HÇ„$0HÇ„$øHÇ„$ØHÇD$`HÇD$pHÇD$@HÇ„$°HÇ„$(é[úÿH‹CH‰ßÿP0é½ûÿ½Hƒ+u H‹CH‰ßÿP0HÇ„$øèÖÒ÷ÿ…Àu4HN9HC;HƒýH5±MHDÂH‰êH‰ÁH‹  H‹81ÀèÎîöÿH‹D$0L‰ûL‰d$(Ç„$ÏAH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@Ç„$\HÇD$8E1ÿHÇD$0E1äHÇD$E1ö1íé®úÿ½é3ÿÿÿHÇD$1íé#ÿÿÿH‹D$0L‰ûL‰d$(E1íÇ„$½AÇ„$\HÇD$0E1ÿHÇD$H‰D$`H‹D$8E1äHÇD$8HÇD$E1ö1íH‰D$pH‹„$8H‰D$@éôúÿH‹D$0L‰ûL‰d$(Ç„$ÇAH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@éÿÿÿ¾H‰ÇèðöÿémìÿÿH‹|$(èoìöÿ…À‰íÿÿH‹D$0Ç„$àAÇ„$]H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@é¦òÿÿH‰ßè#ìöÿ…À‰íÿÿH‹D$0Ç„$BH‰D$`H‹D$8H‰D$pH‹„$8H‰D$@éZòÿÿI‹uHƒþ… H;D$(I‹E…àH‰„$ÐI‹E H‰„$èH‹„$ÐHƒH‰„$`H‹„$èHƒIƒm…¨ÍûÿI‹EL‰ïÿP0H‹„$ÐH‰„$`é‰ÍûÿèÊêöÿH…ÀH‰ÂtH‹Ã} H‹H9Â…`èJêöÿH‹$H‹$H‹H‰D$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹D$`Hƒ„$¸H‹œ$°H‰D$0H‹D$pH‰D$8H‹D$@H‰„$8釻ûÿH‹H‹@H‰”$ÐH‰„$èéÿÿÿ=H…öˆÖH6H8HƒþHDÂH‰òH5zJH‰ÁH‹p| E1ÿE1äE1ö1í1ÛH‹81Àè‘ëöÿÇ„$ì3Ç„$¸HÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$é`úÿH9CŽÜþÿÿL‹lÃIƒEHƒ„$Àé>ËûÿH‹<$H‹„$°ÿÐH…ÀI‰Æ„…þÿÿI‰ÅéËûÿÇ„$ì3Ç„$¸E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$é¾úÿH‹_{ H5¸DºE1ÿE1äE1ö1í1ÛH‹81ÀètêöÿÇ„$ì3Ç„$¸HÇD$8HÇD$0HÇD$HÇD$HÇD$(HÇD$éCúÿÇ„$À3Ç„$¸E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$éåúÿIƒEL‰,$HÇ„$ÀHÇ„$°éûÈûÿHÇD$HÇD$E1öHÇD$(HÇD$E1ÿÇ„$¶3Ç„$¸E1äHÇD$8HÇD$01í1ÛéaúÿHÇD$HÇD$E1öHÇD$(HÇD$Ç„$¾3Ç„$¸é:âÿÿH‰ÆH‰×è´åöÿ…À…üÿÿE1íHÇD$HÇD$HÇD$(HÇD$E1ÿÇ„$Ü3Ç„$¸E1äHÇD$8HÇD$01í1Ûé®úÿE1íÇ„$«3Ç„$¸HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éMúÿH‹@H…ÀH‰„$è„+ÆûÿH‹$H‹<$H‹[HƒH‹$HƒH‹H‰D$HƒèH…ÀH‰uH‹GÿP0HÇ„$ÀH‰$éãÅûÿHÇD$HÇD$E1öHÇD$(HÇD$Ç„$œ3Ç„$¸éüÔÿÿÇ„$š3Ç„$¸é±óÿÿ¿èYâöÿH…ÀH‰„$ø„ªH‹„$ H‹œ$ HƒH‹„$øH‹@H‰H‹D$H‹\$H‹H‰$HƒèH…ÀH‰…­ÄûÿH‹CH‰ßÿP0éžÄûÿ¿èëáöÿH…ÀH‰„$Ø„‹H‹„$ H‹œ$ HƒH‹„$ØH‹@H‰Iƒ.…&ÄûÿI‹FL‰÷ÿP0éÄûÿH‹D$HÇD$E1öHÇD$(HÇD$HÇD$Ç„$Š3H‰„$øÇ„$·éÍÓÿÿH‹D$L‰´$ØE1öHÇD$HÇD$(HÇD$HÇD$H‰„$øÇ„$w3Ç„$¶évÓÿÿH‹D$L‰´$ØE1íHÇD$(HÇD$E1öHÇD$Ç„$f3E1ÿH‰„$øÇ„$µE1äHÇD$8HÇD$01í1Ûé»þùÿH‹D$L‰´$ØE1öHÇD$HÇD$(HÇD$HÇD$H‰„$øÇ„$`3Ç„$µé²ÒÿÿH‹´$°H‰×è$ê÷ÿH…ÀH‰$t:H‰D$éÂûÿH‹D$L‰´$ØÇ„$P3Ç„$µH‰„$øé/ñÿÿH‹D$L‰´$ØE1öHÇD$HÇD$(HÇD$HÇD$H‰„$øÇ„$]3éQÿÿÿH‹D$L‰´$ØE1öHÇD$HÇD$(HÇD$HÇD$H‰„$øÇ„$B3Ç„$´é¼ÑÿÿH‹D$L‰´$ØE1íÇ„$<3Ç„$´E1ÿHÇD$8HÇD$0E1äH‰„$øHÇD$E1öHÇD$1í1ÛHÇD$(HÇD$éøüùÿH‹´$°H‰×è¸è÷ÿH…ÀH‰$…i¿ûÿH‹D$L‰´$ØE1öHÇD$HÇD$(HÇD$HÇD$H‰„$øÇ„$93Ç„$´éÒÐÿÿH‹D$L‰´$ØÇ„$,3Ç„$´H‰„$øérïÿÿL‰´$ØHÇD$E1öHÇD$(HÇD$Ç„$3Ç„$³éaÐÿÿL‰´$ØÇ„$3Ç„$³HÇD$8HÇD$0E1ÿHÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$é×ûùÿL‰´$ØHÇD$E1öHÇD$HÇD$(E1ÿHÇD$Ç„$3E1äÇ„$³HÇD$81íHÇD$01ÛéGûùÿL‰´$ØE1íÇ„$3Ç„$³HÇD$8E1ÿHÇD$0HÇD$E1äHÇD$E1ö1í1ÛHÇD$(HÇD$éÞúùÿL‰´$ØHÇD$E1öHÇD$HÇD$(HÇD$Ç„$ 3Ç„$³éâÎÿÿL‰´$ØÇ„$ 3Ç„$³éíÿÿE1íHÇD$HÇD$HÇD$(HÇD$E1ÿÇ„$ý2Ç„$²E1äHÇD$8HÇD$01í1ÛéúùÿHÇD$HÇD$E1öHÇD$(HÇD$Ç„$ú2Ç„$²éÎÿÿÇ„$ï2Ç„$²E1ÿHÇD$8HÇD$0E1äHÇD$HÇD$E1ö1í1ÛHÇD$(HÇD$ésùùÿHÇD$HÇD$E1öHÇD$(HÇD$Ç„$í2Ç„$²éLÙÿÿÇ„$ë2Ç„$²é!ýÿÿHÇD$HÇD$E1öHÇD$(HÇD$Ç„$é2Ç„$²é"ÍÿÿH‹Mq HÓ+H5>E1öH‹81Àè’ßöÿHÇD$HÇD$HÇD$(HÇD$Ç„$è2Ç„$²éÁÌÿÿH‹D$0E1íHÇD$HÇD$E1öHÇD$(HÇD$Ç„$Ú2E1ÿH‰D$`Ç„$±E1äHÇD$8HÇD$01í1ÛéøùÿH‹D$0Ç„$Ë2E1ÿÇ„$±HÇD$8E1äHÇD$0HÇD$E1öH‰D$`1í1ÛHÇD$(HÇD$é©÷ùÿM‹eM…ä„ñµûÿI‹mIƒ$HƒEIƒmu I‹EL‰ïÿP0¿èƒÜöÿH…ÀH‰ÃH‰„$Є¶H‹D$1ÒL‰cH‰ÞH‰ïH‰C èåÃ÷ÿH…ÀH‰„$èt$Hƒ+u H‹CH‰ßÿP0HÇ„$ÐI‰í鯵ûÿH‹D$0I‰íÇ„$Õ2Ç„$±HÇD$8E1ÿHÇD$0HÇD$E1äH‰D$`HÇD$E1ö1í1ÛHÇD$(HÇD$é©öùÿH‹D$0I‰íÇ„$Ï2Ç„$±HÇD$8E1ÿHÇD$0HÇD$E1öH‰D$`1í1ÛHÇD$(HÇD$éJöùÿH‹D$0HÇD$E1öHÇD$(HÇD$E1ÿÇ„$¾2Ç„$±E1äH‰D$`HÇD$81íHÇD$01ÛéëõùÿH‹D$0HÇD$E1öHÇD$(HÇD$E1ÿÇ„$»2Ç„$±E1äH‰D$`HÇD$81íHÇD$01ÛéŒõùÿH‹D$0E1íHÇD$E1öHÇD$(HÇD$Ç„$¹2Ç„$±E1ÿH‰D$`HÇD$8E1äHÇD$01í1Ûé*õùÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$·2H‰D$`Ç„$±é,ÉÿÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$ž2H‰D$`H‹D$8Ç„$°H‰D$pé£ÔÿÿL‹eM…ä„«±ûÿH‹]Iƒ$HƒHƒmH‰œ$èu H‹EH‰ïÿP0¿è[ÙöÿH…ÀH‰D$„ÔH‹D$1ÒH‰ßL‰`L‰h H‰ÆèÃÀ÷ÿH…ÀH‰D$p„_H‹D$H‹\$H‹H‰$HƒèH…ÀH‰…N±ûÿH‹CH‰ßÿP0é?±ûÿH‹D$0HÇD$E1öHÇD$(HÇD$E1ÿÇ„$ˆ2Ç„$°1íH‰D$`H‹D$81ÛHÇD$8HÇD$0H‰D$péßùÿH‹D$0Ç„$†2Ç„$°H‰D$`H‹D$8H‰D$pHÇD$8HÇD$0E1ÿHÇD$ézæÿÿH‹D$0HÇD$E1öHÇD$(HÇD$Ç„$„2Ç„$°H‰D$`H‹D$8H‰D$pé3ÇÿÿH‹D$0Ç„$‚2Ç„$°H‰D$`H‹D$8H‰D$péÔåÿÿH‹D$0HÇD$E1öHÇD$(HÇD$Ç„$¨2Ç„$°H‰D$`H‹D$8H‰D$pé·ÆÿÿH‹D$0HÇD$E1öHÇD$(HÇD$Ç„$¢2Ç„$°H‰D$`H‹D$8H‰D$pHÇD$8HÇD$0E1ÿ1í1Ûé-òùÿH‹D$0Ç„$2Ç„$°H‰D$`H‹D$8H‰D$péòäÿÿH‹D$0Ç„$}2Ç„$°H‰D$`H‹D$8H‰D$péÃäÿÿH‹D$0HÇD$E1öHÇD$(HÇD$Ç„$d2Ç„$¯H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@é™ÅÿÿL‹cM…ä„Õ¬ûÿH‹kIƒ$HƒEHƒ+H‰¬$Ðu H‹CH‰ßÿP0¿èÖöÿH…ÀH‰ÃH‰„$è„°H‹D$1ÒL‰cH‰ÞH‰ïH‰C 耽÷ÿH…ÀH‰$t*Hƒ+u H‹CH‰ßÿP0H‹$HÇ„$èH‰D$@醬ûÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$n2H‰D$`H‹D$8Ç„$¯H‰D$pH‹„$8H‰D$@é˜ÄÿÿH‹D$0Ç„$h2Ç„$¯H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@é¹üÿÿH‹D$0HÇD$E1öHÇD$(HÇD$Ç„$N2Ç„$¯H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@é“ýÿÿH‹D$0Ç„$L2E1ÿÇ„$¯HÇD$0HÇD$H‰D$`H‹D$8HÇD$8H‰D$pH‹„$8H‰D$@é†óÿÿH‹D$0Ç„$J2Ç„$¯H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@é)óÿÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$H2H‰D$`H‹D$8Ç„$¯H‰D$pH‹„$8H‰D$@é ÃÿÿH‹D$0Ç„$E2Ç„$¯H‰D$`H‹D$8H‰D$pH‹„$8H‰D$@éŠòÿÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$C2H‰D$`H‹D$8Ç„$¯H‰D$pH‹„$8H‰D$@éjÂÿÿH‹$H‹<$H‹@ÿP0韨ûÿòXòœ$€éS¨ûÿH‹D$0HÇD$E1öHÇD$HÇD$(HÇD$Ç„$32H‰D$`H‹D$8Ç„$®H‰D$pH‹„$8H‰D$@éàÁÿÿH‹$H‹<$H‹@ÿP0阧ûÿòpò´$éL§ûÿè–ÒöÿH…À„Ô§ûÿH‹D$0E1íÇ„$52Ç„$®HÇD$0E1ÿHÇD$E1äHÇD$H‰D$`H‹D$8E1öHÇD$81í1ÛHÇD$(HÇD$H‰D$pH‹„$8H‰D$@éÛìùÿf.„AUATHíUSA¸¹¾HìødH‹%(H‰„$è1ÀH‰çHl$H‰ãèÙÐöÿèôÓöÿH«H‰Á¾1ÀH‰ïè»Ðöÿ¶D$8$„ÅLd$ L‚H26I‰éH‰Ù¾ÈL‰ç1Àè…Ðöÿ1ÿºL‰æèÏöÿ…À‰žH ×*½vNA¼H‹=åª H…ÿ„|Hƒ=̪ tH=Ó6D‰â‰îè‘»÷ÿH‹=ºª Hƒ/uH‹GÿP0HÇ¢ª H‹„$èdH3%(…§HÄø[]A\A]ÃD¶D$8D$…,ÿÿÿf„1ÿè‰ÐöÿH…ÀH‰7ª „YH=•1öè;ÍöÿH…ÀH‰ª „#H‹$c H=‰H‰Vs H‹Ïb H‰s èãÍöÿH…ÀH‰Ã„gHƒH‰ÇH‹5±r è¤ÍöÿH…ÀH‰Å„ˆH‹@ö€«€„H‹r H9E „¾H‹b H‹pr H5)5H‹81Àè—ÑöÿHƒm„\Hƒ+u H‹CH‰ßÿP0H‹=u© HÇÚ¨ ½ƒNA¼H 8)énþÿÿH‹™b H‹8è‘Îöÿ…Àt±è(ÏöÿH=áq èÜÎöÿ…ÀxœH‹5éq HÊq H‰ßèÍöÿ…Àˆ~ÿÿÿHƒ²q H-«q Hƒ+„NH=NH5°ž 1É1ÒA¸õH‰-?¨ èjÌöÿH…ÀH‰ÇH‰½¨ „çHƒèÎÐöÿH…ÀH‰œ¨ „öHƒH=ènÌöÿH…ÀH‰t¨ „H‹=w¨ H5oH‰ÂèXÌöÿ…ÀˆàH‹-)t H…í„ÈHt ë1€H‹{èGÍöÿH‰EH‹Hƒ8„6HƒÃ(H‹+H…턎€{ u@€{"uÊH‹CH‹{HpÿèùÊöÿH‰EëÀ½wNH Ä'A¼éíüÿÿf„H‹CH‹{1ÒHpÿèÊöÿH‰Eë„€H‹y` H‹jp H5ó2H‹81Àè‘Ïöÿéõýÿÿ@òà5èÍöÿH…ÀH‰9Ÿ „Kò³5èþÌöÿH…ÀH‰Ÿ „.1ÿè×ÎöÿH…ÀH‰õž „¿è½ÎöÿH…ÀH‰Óž „ý¿è£ÎöÿH…ÀH‰±ž „ã¿è‰ÎöÿH…ÀH‰ž „É¿èoÎöÿH…ÀH‰mž „¯HÇÇÿÿÿÿèSÎöÿH…ÀH‰Iž „“H‹\_ ‹…Òt"H‹·¢ H‹=˜¦ H5è|Êöÿ…ÀˆDH‹=…£ è¨Ï÷ÿH…À„H‹=@ž è“Ï÷ÿH…ÀH‰™¥ „H‹=äž èwÏ÷ÿH…ÀH‰u¥ „æH‹=xŸ è[Ï÷ÿH…ÀH‰Q¥ „ÊH‹=,  è?Ï÷ÿH…À„µH‹=ï¡ è*Ï÷ÿH…ÀH‰¥ „™H‹=á èÏ÷ÿH…ÀH‰ô¤ „}H‹=G¤ èòÎ÷ÿH…ÀH‰Ф „aH‹=¤ èÖÎ÷ÿH…ÀH‰¬¤ „EH‹=¤ èºÎ÷ÿH…ÀH‰ˆ¤ „)H‹=+¤ èžÎ÷ÿH…ÀH‰d¤ „ H‹5G¢ 1À¿è»ÍöÿH…ÀH‰Éœ „{H‹5ž 1À¿è˜ÍöÿH…ÀH‰žœ „XH‹5)ž 1À¿èuÍöÿH…ÀH‰sœ „5H‹5Žœ 1À¿H‰òèOÍöÿH…ÀH‰Eœ „H‹5€  1À¿è,ÍöÿH…ÀH‰œ „ìH‹5m  1À¿è ÍöÿH…ÀH‰ï› „ÉH‹5:œ 1À¿èæÌöÿH…ÀH‰Ä› „¦H‹5œ 1À¿èÃÌöÿH…ÀH‰™› „ƒH‹5ä› 1À¿è ÌöÿH…ÀH‰n› „`H‹5© 1À¿è}ÌöÿH…ÀH‰C› „=H‹5†Ÿ 1À¿èZÌöÿH…ÀH‰› „H‹5[Ÿ 1À¿è7ÌöÿH…ÀH‰íš „÷H‹5x¢ 1À¿èÌöÿH…ÀH‰š „ÔH‹5u¢ 1À¿èñËöÿH…ÀH‰—š „±H‹52¢ 1À¿èÎËöÿH…ÀH‰lš „ŽH‹5'¢ 1À¿è«ËöÿH…ÀH‰Aš „kÿ5E› ÿ5Ÿ› 1Àÿ5Ÿ ÿ5¡ ¿;ÿ5ž ÿ5¨ ÿ5ª ÿ5¬ ÿ5~  ÿ5€  ÿ5ê ÿ5ì ÿ5¾Ÿ ÿ50  ÿ52  ÿ5Ìž ÿ5¶Ÿ ÿ5¸Ÿ ÿ5ªž ÿ5¬ž ÿ5v ÿ5Øš ÿ5:› ÿ5Üš ÿ5>› ÿ5ðœ ÿ5úœ ÿ5¬š ÿ5› ÿ5Àš ÿ5"› ÿ5¼š ÿ5› ÿ5(ž ÿ5bž ÿ5l› ÿ5N› ÿ5 œ ÿ5šž ÿ5L ÿ5Æž ÿ5Pž ÿ5ò™ ÿ5Dš ÿ5žš ÿ5ðž ÿ5* ÿ5|› ÿ5~› L‹ _š L‹Àš H‹ š H‹Zš H‹5»š ÿ5]› ÿ5Ÿ ÿ5Ÿ ÿ5c ÿ5Å™ è(ÊöÿHİH…À„è L‹ ‰¡ L‹z¡ 1É1Ò¾;¿APh·ÿ5› ÿ5ž AQAQPAQèÍÅöÿHƒÄ@H…À„  H‹1ž ¿cPPPÿ5K› 1Àÿ5ƒ ÿ5=Ÿ ÿ5· ÿ5Q› ÿ5«› ÿ5U› ÿ5™ ÿ5™œ ÿ5Þ ÿ5½œ ÿ5?œ ÿ5)› ÿ5ã› ÿ5Uš ÿ5‡œ ÿ5±› ÿ5; ÿ5Íž ÿ5Gœ ÿ5Iœ ÿ5Ú ÿ5ýœ ÿ5Ÿ ÿ5Y› ÿ5s› ÿ5…ž ÿ5÷œ ÿ5Yš ÿ5kž ÿ5•™ ÿ5מ ÿ5á ÿ5³ž ÿ5µž ÿ5·ž ÿ5é ÿ5ë ÿ5½™ ÿ5ž ÿ5á ÿ5+› ÿ5mž ÿ5w ÿ5±š ÿ5³ž ÿ5-ž ÿ5g ÿ5™ ÿ5›œ ÿ5e› ÿ5™ ÿ5ž ÿ5#˜ ÿ5}˜ ÿ5ߘ ÿ5‘™ ÿ5Û™ ÿ5› ÿ5÷ ÿ5I™ ÿ5«š ÿ5=š ÿ5Çš ÿ5á ÿ5«œ ÿ5œ ÿ5/š ÿ5ùœ ÿ5ûœ ÿ5­› ÿ5ÿœ ÿ5 ÿ5Ë™ ÿ5Í™ ÿ5×™ ÿ5¹— ÿ5˜ ÿ5½— L‹ œ L‹‡š H‹ pœ H‹ùš H‹5˜ ÿ5ü— ÿ56— ÿ5— ÿ5ò— ÿ5,— ÿ5†— ÿ5è— ÿ5*— ÿ5„— ÿ5æ— ÿ5X› ÿ5j› èuÇöÿHÄðH…À„5 L‹ Öž L‹Çž 1É1Ò¾c¿APhÿ5”œ ÿ5f› AQAQPAQèÃöÿHƒÄ@H…À„í H=Ö‘ èQÄöÿ…Àˆp H‘ H= HÇè‘ H‰Ñ è$Äöÿ…ÀˆZ Hõ H=NŽ HÇ H‰œ è÷Ãöÿ…ÀˆD H(Ž H5 H=¥ºhHÇBŽ H‰[ è~¿÷ÿH…À„¼ H5ûH=‡º`è]¿÷ÿH…ÀH‰K „ H5lH=_ºH è5¿÷ÿH…À„\ H5TH=>º0è¿÷ÿH…À„i H5=H=ºPèó¾÷ÿH…ÀH‰Ùœ „o H5H=õºÀè˾÷ÿH…À„ª ‹“ …À„e ¿è*ÀöÿH…ÀI‰Å„C H‹×™ L‰îHƒI‹EH‹Å™ H‰H‹=s˜ èöÆ÷ÿH…ÀH‰Ã„à Iƒm„Æ H‹5˜™ H‰ßèÈöÿH…ÀI‰Å„ž H‹5}™ H‹=¾œ H‰Âè^Äöÿ…Àˆb Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0H‹=¶— 1öèwÆ÷ÿH…ÀH‰Ã„ H‹5œ— H‹=eœ H‰ÂèÄöÿ…ÀˆÌ Hƒ+u H‹CH‰ßÿP0H‹=®˜ 1öè/Æ÷ÿH…ÀH‰Ã„¢ H‹5”˜ H‹=œ H‰Âè½Ãöÿ…ÀˆA Hƒ+„6 H‹=,š 1öèíÅ÷ÿH…ÀH‰Ã„; H‹5š H‹=Û› H‰Âè{Ãöÿ…Àˆ Hƒ+„` ¿课öÿH…ÀH‰Ã„3 H‹Ü— H‰ÞHƒH‹CH‹Ê— H‰H‹=¸– è{Å÷ÿH…ÀI‰Å„ï Hƒ+„Ö H‹5ž— L‰ïè‡ÆöÿH…ÀH‰Ã„~ H‹5ƒ— H‹=D› H‰ÂèäÂöÿ…ÀˆP Hƒ+u H‹CH‰ßÿP0Iƒmu I‹EL‰ïÿP0¿è¾öÿH…ÀI‰Å„ H‹®™ L‰îHƒI‹EH‹œ™ H‰H‹=2– èÍÄ÷ÿH…ÀH‰Ã„¾ Iƒmu I‹EL‰ïÿP0H‹5i™ H‰ßèÒÅöÿH…ÀI‰Å„‚ H‹5N™ H‹=š H‰Âè/Âöÿ…ÀˆT Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0H‹=Ç• 1öèHÄ÷ÿH…ÀH‰Ã„ H‹5­• H‹=6š H‰ÂèÖÁöÿ…ÀˆÔ Hƒ+u H‹CH‰ßÿP0H‹=o• 1öèÄ÷ÿH…ÀH‰Ã„/ H‹5e• H‹=î™ H‰ÂèŽÁöÿ…Àˆ Hƒ+u H‹CH‰ßÿP0¿è¼¼öÿH…ÀH‰Ã„Ä H‹Y˜ H‰ÞHƒH‹CH‹G˜ H‰H‹•˜ HƒH‹CH‹†˜ H‰PH‹s˜ HƒH‹CH‹d˜ H‰PH‹˜ HƒH‹CH‹˜ H‰PH‹˜ HƒH‹CH‹˜ H‰P H‹Å— HƒH‹CH‹¶— H‰P(H‹ó— HƒH‹CH‹ä— H‰P0H‹™— HƒH‹CH‹Š— H‹=£• H‰P8èÒÂ÷ÿH…ÀI‰Å„Ê Hƒ+u H‹CH‰ßÿP0H‹5_— L‰ïèØÃöÿH…ÀH‰Ã„ H‹5D— H‹=•˜ H‰Âè5Àöÿ…Àˆa Hƒ+u H‹CH‰ßÿP0H‹5n— L‰ïèÃöÿH…ÀH‰Ã„& H‹5S— H‹=L˜ H‰Âèì¿öÿ…ÀˆøHƒ+u H‹CH‰ßÿP0H‹5— L‰ïèFÃöÿH…ÀH‰Ã„½H‹5— H‹=˜ H‰Â裿öÿ…ÀˆHƒ+u H‹CH‰ßÿP0H‹5Œ– L‰ïèýÂöÿH…ÀH‰Ã„TH‹5q– H‹=º— H‰ÂèZ¿öÿ…Àˆ&Hƒ+u H‹CH‰ßÿP0H‹5[– L‰ïè´ÂöÿH…ÀH‰Ã„ëH‹5@– H‹=q— H‰Âè¿öÿ…Àˆ½Hƒ+u H‹CH‰ßÿP0H‹5â• L‰ïèkÂöÿH…ÀH‰Ã„‚H‹5Ç• H‹=(— H‰ÂèȾöÿ…ÀˆTHƒ+u H‹CH‰ßÿP0H‹5á• L‰ïè"ÂöÿH…ÀH‰Ã„ùH‹5Æ• H‹=ß– H‰Âè¾öÿ…ÀˆËHƒ+u H‹CH‰ßÿP0H‹5X• L‰ïèÙÁöÿH…ÀH‰Ã„H‹5=• H‹=–– H‰Âè6¾öÿ…ÀˆbHƒ+u H‹CH‰ßÿP0Iƒmu I‹EL‰ïÿP0H‹Æ‘ H=O‹ 1öèȹöÿH…ÀI‰Å„ H‹5å H‹=6– H‰ÂèÖ½öÿ…ÀˆÛIƒmu I‹EL‰ïÿP0H‹v‘ H=ߊ 1öèx¹öÿH…ÀI‰Å„’H‹5½“ H‹=æ• H‰Â膽öÿ…ÀˆdIƒmu I‹EL‰ïÿP0èè¼öÿH…ÀI‰Å„H‹5íŽ H‹=¦• H‰ÂèF½öÿ…ÀˆÚIƒm…ñêÿÿI‹EL‰ïÿP0éâêÿÿ@½œNH TA¼é}êÿÿf„è«»öÿH…À…°êÿÿH‹“N H5L!H‹8è ºöÿé•êÿÿ€H‹EH‰ïÿP0é•ëÿÿH‹=• ½žNéªëÿÿ€½xNH ÜA¼éêÿÿ½žNH ÄA¼éíéÿÿf„½•NéaëÿÿfDH‹=¹” ½°NéJëÿÿ€½–NH |A¼é¥éÿÿHÇõ“ ½ƒNH YA¼é‚éÿÿfD½˜NH <A¼éeéÿÿH‹=J” ½®NéÛêÿÿ½£NH A¼é=éÿÿ½µNH ýA¼é&éÿÿ½¸NH æA¼+ééÿÿ½»NH ÏA¼¨éøèÿÿè¸öÿH=èCºöÿH…À„çH‰Çè·÷ÿH…ÀÇi‰ „öHƒ(u H‹PH‰ÇÿR0H=[èºöÿH…À„H‰ÇèÒ¶÷ÿH…À„ŒHƒ(…+öÿÿH‹PH‰ÇÿR0éöÿÿ½ÇNH A¼¨é]èÿÿ½ÅNH |A¼ éFèÿÿ½ÈNH ÛA¼¬é/èÿÿ½ÆNH ÄA¼›éèÿÿ½ÉNH ­A¼µéèÿÿèØ¸öÿéŸõÿÿ1ÿ蜻öÿH‹5L H5–ºH‹8èÁ¶öÿ…À‰ÿÿÿH‹=²’ ½ÏNéCéÿÿ½ÊNH QA¼]é¥çÿÿ½íNA¼fDHƒ+tH‹=s’ H Lé‚çÿÿ€H‹CH‰ßÿP0ëÚ½áNA¼IƒmuÂI‹EL‰ïÿP0ë¶½ßNA¼ë©I‹EL‰ïÿP0é+õÿÿ½ÜNA¼IƒmuŽI‹EL‰ïÿP0H‹=÷‘ H Ðéçÿÿ½×NH ¿A¼éèæÿÿ½ùNA¼éDÿÿÿ½¯OA¼먽­OH ‹A¼é´æÿÿH‹CH‰ßÿP0é£èÿÿ½÷NH eA¼éŽæÿÿ½¥OA¼é[ÿÿÿ½£OH >A¼égæÿÿ½™OA¼·é4ÿÿÿ½—OH A¼·é@æÿÿ½ŒOA¼éÓþÿÿ½ŠOA¼éýþÿÿ½ˆOA¼é³þÿÿ½†OA¼éÝþÿÿ½ëNH ÀA¼ééåÿÿH‹CH‰ßÿP0é»ôÿÿ½OA¼é6þÿÿ½OH ŠA¼é³åÿÿH‹CH‰ßÿP0éõÿÿ½OA¼éþÿÿ½OH TA¼é}åÿÿH‹CH‰ßÿP0é‘ôÿÿ½;OA¼ éÊýÿÿ½9OH A¼ éGåÿÿ½.OA¼éÚýÿÿ½,OA¼é“ýÿÿ½)OA¼éôýÿÿ½$OH ×A¼éåÿÿ½OA¼é“ýÿÿ½OA¼é½ýÿÿ½„OA¼ésýÿÿ½‚OA¼éýÿÿ½€OA¼éSýÿÿ½~OA¼é}ýÿÿ½|OA¼é3ýÿÿ½zOA¼é]ýÿÿ½xOA¼éýÿÿ½vOA¼é=ýÿÿ½tOA¼éóüÿÿ½rOA¼éýÿÿ½pOA¼éÓüÿÿ½nOA¼éýüÿÿ½kOA¼é|üÿÿ½QOH ÐA¼éùãÿÿ½GOA¼ éUüÿÿ½EOH ©A¼ éÒãÿÿHƒìHƒÄÃ'char''signed char''unsigned char''short''unsigned short''int''unsigned int''long''unsigned long''long long''unsigned long long''float''double''long double'a structPython objecta pointera stringunparseable format string'complex long double''complex double''complex float'ctng.cpp%s (%s:%d)all_conesgenexprMissing type objectcannot import name %.230s_cython_coroutine_type_cython_generator_type_module__builtins__subtractdivideaddname '%.200s' is not definedintlongan integer is requiredgenerator already executingcelltupleExpected %.16s, got %.200sbest_p1best_p2throw__init__.pxdnumpy._util_dtypestringnumpy.ndarray.__getbuffer__buffer dtypeexactlysoma_objectslistsoma_secappendpts_cones_dbcliptype.pxd%d.%d%sneuron.rxd.geometry3d.ctng_cython_0_23_4__builtin____name__numpyflatiterbroadcastndarrayufunccollectionsbackports_abcname of the generator__qualname__gi_runninggi_yieldfromsendclosefloat_t€÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ ÷ÿ°÷ÿ Ž÷ÿ Ž÷ÿÀ÷ÿ Ž÷ÿ Ž÷ÿÐ÷ÿà÷ÿð÷ÿ Ž÷ÿ Ž÷ÿŽ÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿŽ÷ÿàŒ÷ÿðŒ÷ÿ Ž÷ÿ÷ÿ ÷ÿ8÷ÿ@÷ÿ Ž÷ÿ Ž÷ÿP÷ÿ Ž÷ÿ Ž÷ÿ Ž÷ÿ`÷ÿp÷ÿ Ž÷ÿ`÷ÿ ÷ÿP÷ÿP÷ÿ ÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿ0÷ÿ÷ÿP÷ÿP÷ÿ÷ÿP÷ÿP÷ÿ÷ÿ÷ÿ÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿP÷ÿ ÷ÿ ÷ÿ÷ÿP÷ÿ÷ÿ@÷ÿ0÷ÿ÷ÿP÷ÿP÷ÿ÷ÿP÷ÿP÷ÿP÷ÿ ÷ÿ÷ÿP÷ÿ ÷ÿ×’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿ×’÷ÿ×’÷ÿâ’÷ÿâ’÷ÿ×’÷ÿâ’÷ÿâ’÷ÿß÷ÿß÷ÿ×’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿ¹’÷ÿ®’÷ÿÄ’÷ÿâ’÷ÿÄ’÷ÿÄ’÷ÿ¹’÷ÿ¹’÷ÿâ’÷ÿâ’÷ÿ¹’÷ÿâ’÷ÿâ’÷ÿâ’÷ÿ¹’÷ÿ¹’÷ÿâ’÷ÿ¹’÷ÿÏ÷ÿ´‘÷ÿ´‘÷ÿÏ÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ&÷ÿÄ÷ÿ´‘÷ÿ´‘÷ÿÄ÷ÿ´‘÷ÿ´‘÷ÿd÷ÿd÷ÿd÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿÏ÷ÿÏ÷ÿí÷ÿ´‘÷ÿÚ÷ÿ‘÷ÿ&÷ÿÄ÷ÿ´‘÷ÿ´‘÷ÿÄ÷ÿ´‘÷ÿ´‘÷ÿ´‘÷ÿÏ÷ÿd÷ÿ´‘÷ÿÏ÷ÿŽ‘÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿƒ‘÷ÿ¬‘÷ÿà÷ÿà÷ÿx‘÷ÿà÷ÿà÷ÿx‘÷ÿx‘÷ÿx‘÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿà÷ÿŽ‘÷ÿŽ‘÷ÿ·‘÷ÿà÷ÿÊ‘÷ÿ™‘÷ÿƒ‘÷ÿ¬‘÷ÿà÷ÿà÷ÿx‘÷ÿà÷ÿà÷ÿà÷ÿŽ‘÷ÿx‘÷ÿà÷ÿŽ‘÷ÿ8 ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿhŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿhŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿhŸ÷ÿè¢÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ¢÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ(£÷ÿ€Ÿ÷ÿ¡÷ÿø¡÷ÿè¢÷ÿ€Ÿ÷ÿø¡÷ÿ€Ÿ÷ÿøŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿøŸ÷ÿøŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿøŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿøŸ÷ÿ€Ÿ÷ÿøŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ`¡÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ0¡÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿø¡÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿøŸ÷ÿøŸ÷ÿøŸ÷ÿ€Ÿ÷ÿøŸ÷ÿøŸ÷ÿøŸ÷ÿøŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿøŸ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿøŸ÷ÿøŸ÷ÿ€Ÿ÷ÿ¨Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿx ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿ€Ÿ÷ÿÈ ÷ÿ³÷ÿ³÷ÿ²÷ÿ0³÷ÿ@³÷ÿü´÷ÿ\µ÷ÿ<µ÷ÿLµ÷ÿlµ÷ÿÈØ÷ÿ¸Ø÷ÿ­Ø÷ÿàØ÷ÿ Ø÷ÿ%Ú÷ÿÚ÷ÿGÙ÷ÿ=Ú÷ÿEÚ÷ÿxã÷ÿmã÷ÿÜ÷ÿçã÷ÿÅã÷ÿÏê÷ÿ½í÷ÿ™ì÷ÿkî÷ÿÈí÷ÿÞöÿ+Ýöÿ™Þöÿ7ÝöÿCÝöÿOÝöÿ[ÝöÿgÝöÿsÝöÿÝöÿ‹Ýöÿ—Ýöÿ£Ýöÿ¯Ýöÿ»ÝöÿÇÝöÿÓÝöÿà&øÿÔ&øÿÈ&øÿ¼&øÿ°&øÿ¤&øÿ˜&øÿŒ&øÿäøÿì&øÿ'øÿ4'øÿX'øÿ|'øÿ 'øÿ04øÿ"4øÿ4øÿs4øÿ4øÿ4Gøÿ&Gøÿ¦GøÿÆGøÿ„GøÿˆÄùÿxÄùÿ0Äùÿ@ÄùÿPÄùÿ¶¤úÿª¤úÿ&¥úÿA¥úÿ¥úÿr–ÿÿ–ÿÿ)^úÿO•ÿÿ\•ÿÿ%—ÿÿ—ÿÿJ—ÿÿB—ÿÿY—ÿÿBuffer dtype mismatch, expected %s%s%s but got %sBuffer dtype mismatch, expected '%s' but got %s in '%s.%s'Unexpected format string character: '%c'Expected a dimension of size %zu, got %zuExpected %d dimensions, got %dPython does not define a standard format string size for long double ('g')..Buffer dtype mismatch; next field is at offset %zd but %zd expected while calling a Python objectNULL result without error in PyObject_Callfree variable '%s' referenced before assignment in enclosing scope'NoneType' object is not iterableneuron/rxd/geometry3d/ctng.pyxneuron.rxd.geometry3d.ctng.seg_line_intersection__qualname__ must be set to a string object__name__ must be set to a string objectDoes not understand character buffer dtype format string ('%c')Big-endian buffer not supported on little-endian compilerBuffer acquisition: Expected '{' after 'T'Cannot handle repeated arrays in format stringExpected a dimension of size %zu, got %dExpected a comma in format string, got '%c'Expected %d dimension(s), got %dUnexpected end of format string, expected ')'too many values to unpack (expected %zd)Cannot convert %.200s to %.200s%.200s.%.200s is not a type object%s.%s size changed, may indicate binary incompatibility%.200s.%.200s has the wrong size, try recompilingif _cython_generator_type is not None: try: Generator = _module.Generator except AttributeError: pass else: Generator.register(_cython_generator_type) if _cython_coroutine_type is not None: try: Coroutine = _module.Coroutine except AttributeError: pass else: Coroutine.register(_cython_coroutine_type) Cython module failed to patch module with custom type%.200s() got an unexpected keyword argument '%.200s'%s() got multiple values for keyword argument '%s'%.200s() keywords must be strings__%.4s__ returned non-%.4s (type %.200s)value too large to convert to intgenerator ignored GeneratorExitneuron.rxd.geometry3d.ctng.registerraise: arg 3 must be a traceback or Noneinstance exception may not have a separate valueraise: exception class must be a subclass of BaseExceptionneuron.rxd.geometry3d.ctng.tangent_sphereobject of type 'NoneType' has no len()need more than %zd value%.1s to unpacklocal variable '%s' referenced before assignmentneuron.rxd.geometry3d.ctng.extreme_ptscan't send non-None value to a just-started generator'NoneType' object is not subscriptableBuffer has wrong number of dimensions (expected %d, got %d)Item size of buffer (%zd byte%s) does not match size of '%s' (%zd byte%s)'%.200s' does not have the buffer interfaceBuffer acquisition failed on assignment; and then reacquiring the old buffer failed too!neuron.rxd.geometry3d.ctng.count_outsideneuron.rxd.geometry3d.ctng.join_outside%.200s() takes %.8s %zd positional argument%.1s (%zd given)neuron.rxd.geometry3d.ctng.soma_objectsconstructive_neuronal_geometryneuron.rxd.geometry3d.ctng.constructive_neuronal_geometry.genexprneuron.rxd.geometry3d.ctng.closest_pt3'NoneType' object has no attribute '%s''%.200s' object is unsliceabledictionary changed size during iterationneuron.rxd.geometry3d.ctng.constructive_neuronal_geometry__float__ returned non-float (type %.200s)compiletime version %s of module '%.100s' does not match runtime version %sShared Cython type %.200s is not a type objectShared Cython type %.200s has the wrong size, try recompilingCython module failed to register with collections moduleinit neuron.rxd.geometry3d.ctngqualified name of the generatorobject being iterated by 'yield from', or Nonesend(arg) -> send 'arg' into generator, return next yielded value or raise StopIteration.throw(typ[,val[,tb]]) -> raise exception in generator, return next yielded value or raise StopIteration.close() -> raise GeneratorExit inside generator.neuron.rxd.geometry3d.ctng.__pyx_scope_struct_2_genexprneuron.rxd.geometry3d.ctng.__pyx_scope_struct_1_genexprneuron.rxd.geometry3d.ctng.__pyx_scope_struct__constructive_neuronal_geometryð?ð¿à?@€;”Q0”öÿ°€šöÿø›öÿ(qœöÿ˜ ¡œöÿx êœöÿ˜ ôöÿ¸ Ÿöÿø ›Ÿöÿ0 I öÿ™ öÿ°Ì¡öÿ(a´öÿx?ÇöÿxËÍöÿЛÕöÿ °p÷ÿØq÷ÿpq÷ÿ@r÷ÿp`r÷ÿ¨Ðr÷ÿØ`s÷ÿÐt÷ÿ(@u÷ÿ@v÷ÿ` v÷ÿx°v÷ÿPw÷ÿ°ðw÷ÿèP}÷ÿH ~÷ÿˆÐ~÷ÿÈ÷ÿà@÷ÿ8 €÷ÿˆP€÷ÿ ð€÷ÿȰ÷ÿðP‚÷ÿ†÷ÿ¸@ˆ÷ÿ` ˆ÷ÿ˜0‰÷ÿР‰÷ÿðŠ÷ÿ Š÷ÿ0 P÷ÿ€ À÷ÿ¸ Ð÷ÿÐ @‘÷ÿð  ‘÷ÿ ’÷ÿ0 ’÷ÿ  ð’÷ÿÀ Д÷ÿ 0–÷ÿH €™÷ÿØ °š÷ÿ€ @›÷ÿ¸ p›÷ÿØ @÷ÿ0 pž÷ÿ€ @Ÿ÷ÿÐ ¡÷ÿ£÷ÿPð¦÷ÿ¨0¨÷ÿà@©÷ÿ@€ª÷ÿ˜p®÷ÿP±÷ÿð ³÷ÿÈ »÷ÿÀ½÷ÿh0Á÷ÿ° Æ÷ÿø`È÷ÿ(@ì÷ÿpð{ùÿ8ÐÅÿÿ zRx $x‘öÿ@FJ w€?;*3$"4DÐm÷ÿEBŒA†D ƒd GBL AAB,|èm÷ÿiA†AƒG L CAG ,¬(n÷ÿ™A†AƒG i CAJ 4ܘn÷ÿEBŒA†D ƒd GBL AAB,°n÷ÿiA†AƒG L CAG 4Dðn÷ÿŒA†AƒD H AAH O AAG |Ho÷ÿh” p÷ÿp¬øp÷ÿLAƒÕ J Ì(r÷ÿ ä r÷ÿ ür÷ÿ˜DK I 4˜r÷ÿ“Gb G I G I G I G I G b\Ts÷ÿ`QBŽB B(ŒA0†A8ƒG`Ä8AÃ0AÆ(BÌ BÍBÎBÏB`ƒ†ŒŽ<´x÷ÿÂBBŒA †A(ƒD0Y (A ABBG <ôx÷ÿ¬BŽBE ŒA(†D0ƒŒ (A BBBG 4y÷ÿ-Ly÷ÿ5<d€”öÿA†AƒA j AAE k AAE XAAL¤y÷ÿÑBŒA†A ƒD0N  AABF D  AABH \ AABôy÷ÿ,$ ¨y÷ÿ‘Aƒb E K E $4 z÷ÿ¼Aƒ} B K E $\¸z÷ÿ‘Aƒb E K E œ„0{÷ÿ¿BBŽB B(ŒD0†A8ƒHPª 8A0A(B BBBG O 8A0A(B BBBG W 8A0A(B BBBG zXA`BhBpBxB€BˆBPPl$P~÷ÿ-MBŽE B(ŒA0†A8ƒD@ 8DÃ0AÆ(BÌ BÍBÎBÏK pÃÆÌÍÎÏH@ƒ†ŒŽ4”Ñ’öÿpFŒA†E ƒL@S AAB4ÌØ÷ÿUBŒA†D ƒv GBJ AAB4€÷ÿBŒD†A ƒw ABG AAB<X€÷ÿpDx D o\¨€÷ÿpDx D o|ø€÷ÿ€DO E gLœX÷ÿ¼BBŽE B(ŒD0†A8ƒUp  8A0A(B BBBF ìȆ÷ÿcÑ’öÿ0Aƒn$‡÷ÿ <ø†÷ÿj\ƒGÃ\H‡÷ÿU\ƒsÃ|ˆ‡÷ÿU\ƒsÃDœȇ÷ÿˆEŒA†A ƒZ ABD ] ABH tAB$ä!’öÿIA†AƒD @AA è‡÷ÿYAƒz E TL,(ˆ÷ÿÕBBŽE B(ŒD0†A8ƒJö 8A0A(B BBBF 4|¸‰÷ÿQA†AƒG ± DAA V DAE L´àŠ÷ÿCBBŽE B(ŒD0†A8ƒK€  8A0A(B BBBA  J‘öÿ D0$ 4’öÿD0D  ÷ÿ&D0J B 4d “öÿ‘A†AƒB @ AAB FAALœ c“öÿ®BBŒD †A(ƒE0N (A ABBG |(C ABB4ì (Ž÷ÿ‹A†AƒG h DAJ x DAA $ €Ž÷ÿ)Aƒ\ C DTD Ž÷ÿÅBBŽB B(ŒD0†A8ƒDP†XH`fXAPE 8D0A(B BBBH Lœ ÷ÿ,BBŒD †A(ƒL0Œ (D ABBF D (D DBBH Lì è÷ÿÃYŒA†A ƒD0A AÃAÆBÌL0ƒ†ŒN AÃAÆBÌ4< h‘÷ÿÒA†AƒD0• AAC Z HAE Dt “÷ÿmA†AƒD0“ AAE F AAH j FAG T¼ 8•÷ÿ[BŒA†A ƒD0x  AABD Ò  CABH \  AABH 4 @˜÷ÿ<BŒA†D ƒD0  CABH \L H™÷ÿ MBŽB B(ŒA0†A8ƒG@–8AÃ0AÆ(BÌ BÍBÎBÏD@ƒ†ŒŽT¬ ø™÷ÿ=BŒA†A ƒG0]  AABD †  AABF D  FABK | àš÷ÿïBBŽB B(ŒD0†A8ƒD@Í 8A0A(B BBBH D 8C0A(B BBBH H 8C0A(B BBBD t„ Pž÷ÿÖBŽEB ŒA(†A0ƒå (A BBBI O (A BBBJ “ (A BBBF Q (A BBBH ü ±öÿPAƒN<áöÿ3BŽBB ŒA(†H0ƒ(A BBB4\X ÷ÿLA†AƒD@¶ AAB P AAF L”œöÿ•BBŽB B(ŒD0†A8ƒG€s8D0A(B BBBLäá¢öÿÞBBŽB B(ŒA0†A8ƒD€Â8D0A(B BBBD4С÷ÿôBŽBB ŒA(†A0ƒG`  0A(A BBBF T|ˆ©÷ÿBŒA†A ƒG0r  AABG "  CABH D  DABM DÔP«÷ÿdBŒA†A ƒG0M  AABD j  CABH Dx®÷ÿïBBŒD †A(ƒXhopThA` (A ABBC ,d ³÷ÿ?–†AƒD0 AÃAÆA L”0µ÷ÿÑ#BBŽB B(ŒA0†A8ƒD€1 8D0A(B BBBD T俳öÿŒBŽBB ŒA(†A0ƒG€ØˆHRˆA€0A(A BBBL<ó¹öÿÐBBŽB B(ŒA0†A8ƒG°´8A0A(B BBBLŒsÁöÿ šBBŽB B(ŒA0†A8ƒGàñ™8A0A(B BBBÄÜÈ×÷ÿ¦BBŽG B(ŒA0†A8ƒJ°B¸HÀf¸A°} 8A0A(B BBBG »¸IÀf¸G° ¸IÀf¸A°·¸IÀg¸G°P¸IÀg¸F°P¸IÀf¸G°ò¸IÀg¸G°ä¤°fùÿÕIBBŽB B(ŒA0†A8ƒJ§˜C m˜AB 8A0A(B BBBH J!˜I g˜GÝj˜I g˜Fê˜G G¨G°G¸GÀS0˜G G¨G°G¸GÀKà8˜G G¨G°G¸GÀSÜŒ¨¯ÿÿòBBŒH †A(ƒW  (A ABBF S¨F°H¸FÀKÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆFF˜F F¨i°F¸FÀFÈFÐL g¨E°F¸FÀBÈBÐAØBàI V¨A°A¸FÀHÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆFF˜F F¨F°i¸FÀFÈFÐFØFàFèFðFøF€FˆFL g¨E°F¸FÀBÈBÐAØBàI P55x š àX ”§ àì)èì)õþÿoðøH Å ð)H ˜O€4 þÿÿoèÿÿÿoðÿÿo¾ùÿÿo øì)Y&Y6YFYVYfYvY†Y–Y¦Y¶YÆYÖYæYöYZZ&Z6ZFZVZfZvZ†Z–Z¦Z¶ZÆZÖZæZöZ[[&[6[F[V[f[v[†[–[¦[¶[Æ[Ö[æ[ö[\\&\6\F\V\f\v\†\–\¦\¶\Æ\Ö\æ\ö\]]&]6]F]V]f]v]†]–]¦]¶]Æ]Ö]æ]ö]^^&^6^F^V^f^v^†^–^¦^¶^Æ^Ö^æ^ö^__&_6_@ó)Format string allocated too short.whichend for tangent_sphere must be 0 or 1soma stack ignored; using centroid insteadndarray is not Fortran contiguousmore than one contour is not currently supportedextreme points computation failedconstructive_neuronal_geometry..genexprNon-native byte order not supportedFormat string allocated too short, see comment in numpy.pxdunknown dtype code in numpy.pxd (%d)/home/hines/neuron/nrn/share/lib/python/neuron/rxd/geometry3d/ctng.pyxconstructive_neuronal_geometrymultiple most extreme pointsndarray is not C contiguousneuron.rxd.geometry3d.ctngjoin_items_needing_clippedunexpected corner_counts?neuron.rxd.rxdExceptionneuron.rxd.morphologysource_is_import3dgraphicsPrimitivesdiam_correctionsright_neighborsradial_vec_normparent_sec_namemy_corner_countneighbor_rightleft_neighborsneighbor_leftneighbor_copycontourcentersoma_objectspts_cones_dbplane_normalnum_contoursmajor_lengthdefine_shapecorner_countcone_clip_dbcombinationsclip_copyingRxDExceptionRuntimeErrorIntersectionpts_sourcesnradial_vecnew_objectsn_soma_stepsphere_capsharp_turnradial_vecmorphologycenter_vecaxislengthValueErrorSphereConeto_pythonparentsecjoin_itemitertoolsiscontour_enumerateall_coneszshiftedyshiftedxshiftedwarningssoma_secset_clipsectionsmajor_p2major_p1is_stackint_clipget_clipextreme2extreme1distancebranchesSkewConeCylinderys_loopxs_loopsymmeigproductobjectsmin_indmax_indgenexprf_diamsdiam_dbdelta_ydelta_xxrangesourcesoma[0]setval_sec_dbremoveparentneuronlinalg__import__getrowgetcoldiam3ddeltadbranchbisectappendSphereMatrixthrowsomazsomaysomaxrightrangenumpynaxisminormajorhnamef_ptsdiam2diam1crosscloseclipsaxiszaxisyaxisxarrayUnionPlanez1z0y1y0x1x0warnvalstobj__test__sqrtsomasendr1r0pt2zpt2ypt2xpt1zpt1ypt1xpsecnorm__main__leftconeclipcellaxisargsConezipz3dy3dx3dsumsecrxdrawptspt3pt2pt1pt0n3dminmaxmaginfdotdivanyallz3z2_z1_z0yyy4y3y2_y1_y0xxx4x3x2_x1_x0spr3r2_r1_r0ptp2p1dxd1d0cycxcpZgZfZdzyxvqpmlkjihgfdbQOLIHBÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0/*È.*h.* /*¸.*X.*ð1*À/*ð1*`3*-« h`WëApM8p€ * * *mת `;pN!« 7« p;Nx D« dO« H˜Â \« ‚È ÿ© †(à a« `h˜Ã H5*Oý)@5*0û) 85*`õ)<05*`ó)#(5*àø)  5*+ü)5* õ)$5*¶ü)5*Ðø) 5*Àø) ø4* û) ð4*$ü)è4* ù) à4*°ü)Ø4*ù) Ð4*¨ý)È4*ú) À4*¤ý)¸4*ü)°4*Jý)¨4*ªü) 4*Eý)˜4*€ù) 4*¤ü)ˆ4*žü)€4*˜ü)x4*ü)p4*ü)h4*û) `4*@ý)X4*pù) P4*;ý)H4*°ø) @4*’ü)84*Œü)04* ø) (4*6ý) 4*ø) 4*0ö)4*àô)04*ø)4*€ø) ø3* þ)ð3*†ü)è3*þ)à3*þ)Ø3*3þ)Ð3*þ)È3*ÿý)À3*pø) ¸3*˜û)°3*û)¨3*ü) 3*€ü)˜3*zü)3*ü)ˆ3*p÷)€3*ˆû)x3*û) p3* ý)h3*œý)`3*üý)X3*ú) P3*ðú) H3*àú) @3* ô)"83*€û)03*tü)(3*xû) 3*Ðú) 3*úû)3*óû)3*P÷)3*-þ)ø2*nü)ð2*àõ)Gè2*+þ)à2*èû) Ø2*˜ý)Ð2*Àú) È2*°ú) À2*ðù) ¸2*àù) °2*)þ)¨2*Ðù)  2*°ö)˜2*'þ)2*1ý)ˆ2*à÷)€2*Ýû)x2*#þ)p2*”ý)h2*(ý) `2*hü)X2*`ø) P2* ú) H2*ú) @2*ý)82*pû)02*Œý)(2*hû) 2*bü)2*`ô)12*`ù) 2*Pö)2*À÷)ø1*ˆý)ð1* ù) è1*\ü)à1*pö)Ø1* ô)"Ð1*ø)È1*ð÷)À1*Ð÷)¸1*Öû)°1*ö)¨1*÷) 1*ðö)˜1*ù) 1*!ý)ˆ1*ù) €1*Pø) x1*Vü)p1*`û)h1*!þ)`1*ùý)X1*öý)P1*Ïû)H1*°÷)@1*Àù) 81*@ø) 01*Xû)(1*ý) 1*óý)1*„ý)1*€ý)1*ý)1*ý)ø0* ý)ð0*|ý)è0*ý)à0*ý)Ø0*þü)Ð0*xý)È0*tý)À0*0ø) ¸0*ðø) °0*þ)¨0*ïý) 0*ûü)˜0*ëý)0*øü)ˆ0*èý)€0*åý)x0*Pù) p0* ÷)h0*Pü)`0*pý)X0*Èû)P0*Jü)H0*÷)@0*lý)80*hý)00*Àû)(0*€ú)  0*óü)0*pú) 0*¸û)0*@ù) 0*îü)ø/*°û)ð/* ø) è/*`ú) à/*àó)+Ø/*Dü)Ð/*>ü)È/*8ü)À/*§û)¸/*0÷)°/*âý)¨/*0ù)  /*éü)˜/*dý)/*Pû)ˆ/*àü) €/*2ü)x/*°ù) p/*Øü)h/*Ðö)`/* õ)%X/*þ)P/*Óü)H/*Îü)@/*Pú) 8/* ó)+0/*þ)(/*Þý) /*Ëü)/*Úý)/*Èü)/*×ý)/*Ôý)ø.*`ý)ð.*Ñý)è.* û)à.*Hû)Ø.*@ú) Ð.*Îý)È.*þ)À.*Êý)¸.*Åü)°.*Æý)¨.*Âü) .*Ãý)˜.*Àý).*\ý)ˆ.*½ý)€.*@û)x.*0ú) p.*ºý)h.*þ)`.*¶ý)X.*¿ü)P.*²ý)H.*¼ü)@.*¯ý)8.*¬ý)0.*Xý)(.*Tý) .* ú) Ðà EûA&à607pVÄ 8ÀEûA&M@6 U@Ä €FûA&€5Ð5Và¿ À@[ª ±g« RGCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609<€5rP_(Õ0à%½E0T)U?;Ø;€gç:d5…gé:aP|U(pint%+?ƒwb„wèYªT¬w®ð:°lºw‡v0˃vØñHèCòp»+÷¨(!ø¨Ó6ù¨+Xú¨ "-û¨(±#ü¨0m%ý¨8"5þ¨@ Ú!¨H ú¨P H¨X R'` øq-h 7Rpp 0, pt F~x }]I€ MW‚ 93ƒ ¿3Cˆ F!‰ §)›˜ ®*›  µ+›¨ ¼,›° Ã.0¸ /pÀ !1IÄä8@Ë Sª— V~ þ7XP &\—ß:Tp39]_ ®§”¬^Sÿqï7wP/BP:s›Ls›y+–d)œ'ÎI'‰9ž-<¢pöË ®C”ï ®Y”_®ps›¬Tfp ~U Äp €  9®ão ® ;¾”9 •{g ®à”/ ®ð”öpðð›²l µç 3P¿  2` ·s³J*^7i/q9pg>:pDitm8…M.‡pmˆp;‰pîFŠp y‹p=`Œp2bp 3Žp4Np n’w(“Y0ãBj)²7k2ékÆÖRˆDÆ ²7E2 éEÆ þhE2 ;VFY „G2 IG2( uKA0 Â5L^8 IM@ ÍNÁH (zOøP {cPX 1Té` Ÿ!Uïh EVõp ã4Zx ÷b[^€ Ex\ˆ ±k]µ ]^ì˜ faû  dw¨ _VfY° ‰]j´ ¸ ŒhmˆÀ Ä6q1È BEt2Ð E7x\Ø \Eyhà ïn|>è ¨}ð €Q~ÜøTÆMf€3Íjt‡4‚€vrƒ2 Ú„Œ(9…Ã0ë †˜8ü‡$@AˆˆHš9‰3PêPŠ3Xîm‹3`ì@ÏíH`îˆP9ïXyð9`-lñ9h„ò9pØMó9xÖlô9€B(õȈ¾1ö" ÷˜Ý'ø Iù¨ÿbú°ccü9¸‚?ý9À²gþ9ÈX7ÿ9Ð 9Ø ò0^à ç59è æ'9ð ¡l9ø¶ 9Øe9ša 9µ6 9  9 ö2 9(N0?Þ Pmo ¤(¨ ÌW9 ³.ó ljó Ñ |,B ( ·;l 0 Áj 8 ˜.9@ óHmß !ä°  H"¨ …#9 ÷Z$› æ%{0'â` Æ"(× [)  Ë5*  V{+7  »:, ad-I (ä`.¼C106A›'2MS^3–)3jpp‰3‰pÀA.4›¡3µ3¨P+5Dx 6ÍÓpì3¨3ÿW7¦ 0m8u ö/9,/:"w13,m;=C3\33pún<Ç=#%>ir!?¦ Æg@¦ TA¤ª3ÃÆ33ïBÏÕ3éÆ2Ó o°òV %>&YE'ØæC(p|o*Y‰w($t&¨ì'p F(2éC)pdoc*¨ DåQ( Üt ¨get set8doc¨•w› “â›)P??zeP®j§ =²72éÆDw -  S7I Z²7[2é[Æþh[2¹e\§4 ¦Á²72éÆƒ2)¨ (#•7!²7$2é$Æþh$2O%wJu&p Ž^'3$—71Ì |Oi²72éÆþh2T=i 3y”~O , (ÑͲ72éÆþh2T=í'd&2 Ó'„WrDòV,ã (Q¶]=²7R2éRÆ÷Sîð T3ÿSU3 ¸]Vô 0 k²7 2é Æ#r!3ï "3"#3 .$3(¢k%HFb( ý²7 2é ÆÌIýWØ)p ¼ p$¨!W€²72éÆþh2™l?œ2 r>3(È:30‘a38ã\í@±víH@J3P‡{%3X`G%3`Ab%3hÁ'˜p(pxLx.p|/p€fV0ó4„&$1ix/¨[$383›Y9 CIpb33›åQ“â_isPøÏIø-û\3,c3t>3 ìh3(’030.S383@ê2pHs_ts¨8ÏI;œK<_"W>À0?pL CpH Dp ñYF0(ä1G00ßH38.I3@]K3Hº L3P|kM3X‰{O3`bGP3hCbQ3pº\S3xÍ?[p€Zl]p„d_3ˆW`w<]bp˜/Ec3 þ•%sŽq-;Ap_3p3%rgþPˆ4c xL ¹6c‰pe € fƒ²7 2é Æ‚^ p¶X pÖ4pmCpï?3 ²C3(y630F38›q3@ 83H 3P]i3X:@p`2)3hªR›pWe3xhžâb ™ w©” È!"ÚAm!(Žº!)p@Å1!*¾Häb!0å ©õ”ÃI"¶'× "1BTV"O)Ø@"Ww!ìP#7ä B Ü^ £K 5 U ài ”G Ì2 N" tt ¡h 7l ­u ² f ¦7 z; f ¯  = YC ßv }l Új ') K{ ·"¸u 6PP#Ì# 4 8 mQ##Ðä#$#}B #*S ÿ#+‹ ñ#,‘ À4#.—nD#'_jjý1#(|j‹jSp ›§”¹J#a³3Ç››Ž'#bÓpì3››;3#dø!›õ›õõp›„#g-G››p›.(#hSg››DF#p÷#qp›õ›õ%#s¯Ø›õ›õ›õ›öc#vä››õ››æ]#}p-‰›¨-3#`#2 ²7#32 é#3Æ i#:m G*#<® ì#>® Í #C® éC#E® ~4#Gp !H#Ip ´?#Kp$ \#QŒ!( i#W30 |6#\38$f#a’!@ }u#c3H {u#ijP æ4#mXµ#(pF¨›Ñ -c#‚Rpk›õ›rv#„R@#…ƒp¡›õ›i#­pË›õ››ÁX#dC#‘ã›õ›››ZZ#“-››õ›õl #•9pk››õõõõ%x#Ÿ= ° rB#¦° ˆ,#®Æ ¨ Ð)#¯Ì ° â#µÒ ¸ Ti#¶Ø À +z#¼Þ È P#Âä Ð Q#Èê Ø ã@#Ïð à É#Õö è c#Üü ð ŠQ#â!øg#è!¢:#î!Ÿ:#ï$! )`#÷38A*#þ:!@#ÿ@!HT4#Ë PëB#F!X™e#L!`Y_#R!h$X# ä p À À ”اÇì!gs£GF¡ !!”k 4!4!”wËË ×-? # k#Y#pŒ! Ü6#q¤! ’.#r3d!X!#n3˜!#iP#€9" ²7#2 é#Æ u#ƒ¨$nd#…p ´3#‡ u#Œ( Ü6#Ÿ30 ^#¡¤!8 éC#£p@ E6#¥3H i#¦ª!SK#²9"E"(Cgº"$pí$s¨$nº" ¤?Y ìb_ z_! •K_"2EgW"&stdö$'Ø %Ú(%ÚÖ")$@)$‹õ)$‚&)$Ž˜&)$´&)$á&)$‘ü&)$’"')$“=')$”Y')$•u')$–‹')$——')$˜½')$™â')$š()$›.()$œI()$ž_()$ €()$¡œ()$¢·()$¤Ý()$§ý()$ª"))$¬B))$®]))$°x))$±˜))$²²))$³Ì))$´æ))$µ*)$¶*)$·J*)$¸`*)$¹€*)$ºŸ*)$»¾*)$¼é*)$½+)$¿%+)$Á@+)$Â`+)$À+)$Ä +)$Å¿+)$ÆÕ+)$Çõ+)$È,)$É3,)$ÊR,)$Ëi,)$Ì€,)$Íž,)$ν,)$ÏÛ,)$Ðú,*$-*$ 9-*$ Y-'Q &0;%Ä;)'5“-)'6À.)'7Ú.ìv%Åw)(R/)(S /)(Tõ)(\+/)(eE/)(h_/)(it/+CV%Ý‚&'Ø %Þ(%Þ%)$ø-*$9-*$Y-'ñ)$)*,™$)*-¹$-+7}%,Þ+:~,Úx+;~,@C+?ë.,^+@~-Ùp:+7¿%,Þ+:/,Úx+;/,@C+?ë.,^+@~-Ù;¶+7&,Þ+:_,Úx+;_,@C+?ë.,^+@~-Ù®¿#+7C&,Þ+:‰/,Úx+;‰/,@C+?ë.,^+@~-Ù^.d$+7,Þ+:Ž/,Úx+;Ž/,@C+?ë.,^+@~-Ùw/SS‡õ˜&p/A ìõ®&®&H/¨ ,€Ô&Ô&Ô&p®&Ú&ŠL/fyúõü&Ú&®&/ªyp''®&'Ú&/“Np='®&p/ëx,YpY'®&'0/|M~pu'®&'0/B íõ‹'®&1(óõ/ (’0·'Y0·'/Uqp0â'Ô&Y0·'/’<lpø'ø'þ'/XF,Ú0((Ô&((0·'Y/gyûõI(Ú&®&/7Kõ_(Ú&/`@,p€(Ô&0'0/#?ˆpœ(''0/5õ·(õ®&/êx,lp×(®&'×(²/{M´pý(®&'×(/_@,;p")Ô&0'×(/"?ÀpB)''×(/Ð(,fp])'×(/‚n¼px)'×(/—$,¸0˜)¨Ú&·'2r+,öÔ&²)Ô&'2j6¦pÌ)''2 <Ãpæ)''2,9,˜Ô&*Ô&'2q6ÿ0*''/Ò=Z0?*Ô&0'?*E*t/v'"0`*'/…T,Ô&€*Ô&'028C©pŸ*''02uF,¿Ô&¾*Ô&'0/6,ü0ã*¨ã*0·''/—D0+''/ PÅ)+'+Ô&/+bÌ=@+'+//PÔ&`+Ô&'+/:b×w€+'+p/}>Ü; +'+p2§4Ç0¿+Ô&'0/¾9pÕ+õ/eHpõ+''02Ýg,'Ô&,Ô&'02†U,DÔ&3,Ô&'02”=,Ô&R,Ô&Ú&0/ìx,Spi,'0/}M…p€,'03œ1ãœ1'ž,'Ú&47; 7;'½,''3¸0í¸0'Û,'Ú&4!!'ú,''4b_?b_'-'Ú&0/5Îî9-'+/º5æƒY-'+p/NíÉy-'+p+>G&7Œ-(&8’$Û ¬`-5À.€q-9¨g#-:¨é^-@¨‚<-F¨t-G¨ |q-H¨(c#-I¨0å^-J¨8W-K¨@‘E-L¨Hq-M®P#q-N®QUv-P®RÈ;-R®SES-T®TÐ-V®UÖ-]®VjA-^®WQv-a®XÄ;-c®YAS-e®ZÌ-g®[Ò-n®\fA-o®]2>-|¨Ú.pY5¡Q-å.“-Œ- ®/”Y; D.4;Fz.º /&/e28m.¯pE/õ /2€.Ýõ_/õ/2‚.Ú/t/Y2:m.« /‰/Y^w«JE) H?hâs&#0 tãY iäX0 iå0 Ñæ^0 ÿ!çpX #lè®\ 2Gé®] éCêp`#®(ìX0 ìíz0 tîY Fï0#0 0n0”u&ë­/n0,ð#0ñB´0 tò´0 vó0€0BôŒ0Hõmyc1 lGö€0 -÷c1 ª)ø0 Mrù0( 4ù00 ­?ú08 wûp@ ]+ü®D °Eý®E .þ®F Ïÿ®Gº0oyÆ0QR¬ #N Ã1 ²72 éÆ >3 Üu3#8,2 ²72 éÆ ,2 }R3 ·s3 Ás2( Ës01#AH #t2 ²7$2 é$Æ %,2 ­5&3`1œ2 Z)ap ßBbœ2ƒ1ct2#Þdã2 á:ep !fp Qbgã2¢2qms3 ’.r2 ur2 Àr2ossé2ht„MR3 w5u0 ,v †Mw*3ÐxQ“3 ÷,y“3 uz¨ >{™3R3 3©3”Q|^3 KúDhûÞ<…4 ²7ü2 éüÆ +ýµ3 •wþ3 ‰{ÿ3 bG3( Cb30 B638 ÷ 3@ k3H ÅK3P 3X Pjp` ¸U®dà< Á3¼e-Z(.Š ‘4·4”  Bkè4ê pw pmp pDk·4 è45”Û2‰w+D6®D²Kp]57o²K37v²K 7a²K›8e³Kp8p´K]5Ã16Ale]p 69ò e]39 e] 7arge]›8genf] 6:¶5;òg]p:È5;òh]p:Ú5;òi]p:ì5;òj]p:þ5;òk]p<;òl]p…46a\p167gena\ 66ÊÖ]pg69ò Ö] 6959Ö]38tmpØ]36Á½]p69ò ½] 6959½]38tmp¿]3=.5úQ¶67chúQ®6ÇräQpé67tsäQ((;á:åQp8tæQY6^*óQp77tsóQ((; 1ôQp6$DÅQp.78nÆQP>Ò7 U=ÍhPQ79QP2=Pk79Q)P26ZsYp97xY3?KÁY?¢6ÅY;>qY~;Y~;2GY~:Ú7;59Yw<;Yw:ì8;^[Y9:ý7;59^Yœ4:8;59_Y‘4:/8;59cYw<;cYw:O8;59lY;<;lY;:o8;59uYw<;uYw:8;59~Y;<;~Y;:¯8;59‡Yw<;‡Yw:Ï8;59Y;<;Y;<;59™Yw<;™Yw<8valºYp8tmp»Y3 9‘46=vÿYw>:7xÿY3?K­Z?¢6±Z;>qZŽ/;ZŽ/;2GZ~:s98valZw:#:;^GZ9:–9;59JZœ4:¨9;59KZ‘4:º9;59OZw:Ì9;59XZ;:Þ9;59aZw:ð9;59jZ;::;59sZw::;59|Z;<;59…Zw<8val¦Zw8tmp§Z36g;ìU3°:7op1ìU37op2ìU39rdìUw9Ñ ìUp:™:8bòUŽ/8aóUw<8b3VŽ/8a4V)6õTCPpÚ:9™CP39Q)CP2@•=N› ;AMVN›AR NpAá6N06ƒo(K3F;7t(Km7a(K37k(K38o)K36Ñd—K3€;7t—Km7a—K37k—K38o˜K36¶ L3º;7t Lm7a L37k L38oL3= *ç[<9ìç[í959ç[í7tbç[í;äIè[3;è[3;Ê^è[3;Ãê[˜6vIj\3<9ò j\ 6959j\3;™k\3:w<;Ã}\˜8tb~\<8f\£<<8tb“\<8f”\£<<;é•\356œcž\3Ç<9™ž\3=KëP =9ìëP3959ëP37tbëP39TBìP3?ƒcQ6õ¹Qp6=7obj¹Q39ì¹Qm6ÉvtU3Ð=7otU37itU29ïCtUp9ŽWuUp9QvUp:›=8nyU2<8r{U3:·=8nU2<8rƒU3<8mˆUï<8l‹U26Ä!WpZ>7oW37iW27vW39ïCWp9ŽWWp9QWp:A>8n W2<8old W3<8mWï<8lW26êt¥_2¦>7b¥_3;D¦_28x§_3<;^²_9;i³_º"=ÆEDFØ>9Ú5DFQ"9DFC ;ÁsFFp=Ú[;Fþ>9Ú5;F39;FC =Rd¸P;?9ì¸Pí959¸Pí7tb¸Pí;úP˜=%3ÆPÍ?9tÆPY9„ÆPp9¿ ÇPp9 ÇPY9L8ÈPp9wBÈPp;XÉP3;†!ÉP3;‹2ÉP38ctxÊP3;NuÌP6Øms_põ?7xs_3;, t_p6LàT3@9&ràT36÷ö\3V@9ò ö\38gen÷\ 68yfø\3<8retü\36Ðk­QpŠ@7L­Q37x­Q3<;™±Q36XQâO3´@9tâO3;ýzãO36å=X3ê@9&<=X39t=X3;59>X36 Ñ\p9A7genÑ\ 67yfÑ\3;™Ò\38errÓ\p<; Eã\3=€J]A9ò ]38res‘]3;Ç7’]3;¦%’]3;©’]38gen“] 6<;µ7§]2=…C{]ÃA9ò {]38gen|] 66<)^3áA9&<)^3=÷çUûA9§`çUY6}§pqæY~;æY~;2GçY~6Õ§[3ÀB959§[$;>q¨[ÀB;¨[ÀB;2G©[~$6:>G¨›D9¾WG¤!9gG¨9l G¨9ªVGË ? mJ?,sJ?µNJ?Ë.J?„&RH?Ò\AH;˜%G¤!;±‘Gp;ØêS6q =pÖE9W==37seq=37eq=p;ýz>p=¤ŠQðE9§`ŠQY6“MVU3:F7oVU37iVU29ŽWWUp9QXUp<8r\U36“ ÷$3a9]÷$39ÅB÷$39ñQ÷$p9C÷$)?µ)ì)?ÃU@?XUË'?ek4? nB? )Š@?´TV4?’F 4?T\:?Ã'x-?gfÐA?T49?v)?Wþ$);ØXÿ$);®Z%);IW%);ãX%);¹Z%);TW%);îX%);¾P%);ÉP%);ÔP%);2a %3;æ %3;õ: %3;M7 %3;Ô{ %p;kJ%3;}R%3;¦m%3;Ô%3;Þ%3;è%3;o%3;=p%);Ê<%3;×a%3;°%3;›n%3;€%3;kP%3;b%3; %3;Kp%3;]%3;ý@ %3;§!%3;A"%3;A#%3;ŒB$%3;šB%%3;¨B&%3;.v'%3;µN(%3;ð1)%3;Fo*%3;?;+%p;R,%3;­5-%3;‘.%3;/%3;oo0%3;M$1%3;À>2%3;C3%3;ñP4%3;K5%3;õu6%3;…7%3;8%3;¹R9%3;?=:%3;XJ;%3;=<%3;O=%3;3?>%3;®!?%3;ÄZ@%3;ßPA%3;+tB%3;üGC%3;:D%3;Ê]E%3;ê,F%3;YG%3;wH%3;ÁsJ%3;ËsK%p;ÕsL%p;ßsM%3;ésN%2;ósO%;ýsP%3;tQ%3;tR%p;¾TS%3;ÉTT%3;ÔTU%3;ßTV%3;êTW%2;‹>X%);UY%);UZ%);(U[%3;£>\%;ÍU]%p;ØU^%p;ãU_%3;îU`%w;ùUa%3;Vb%3;Vc%3;Vd%2;%Ve%p;0Vf%);ÆVg%3;ÑVh%3;ÜVi%3;çVj%3;#k%p;zl%Y;~m%p:1M;‰{<&3:CM8tmpE&3:cM;Ÿ$b&3<8tmpe&3:uM8tmpp&3:•M;Ÿ$‰&3<8tmpŒ&3:µM;Ÿ$¦&3<8tmp©&3:ÓM;¥!¸&3;iº&2:åM8tmpÔ&3:÷M8tmpÖ&3: N8tmpØ&3:)N;Ÿ$'3<8tmp'3:;N8tmp'3:YN;¥!1'3;i3'2:yN;Ÿ$v'3<8tmpy'3:—N;¥!œ'3;iž'2:©N;Q¹'2:»N8tmpÎ'3:ÍN8tmpÐ'3:ßN8tmpÝ'3:ÿN;Ÿ$û'3<8tmpþ'3:O;Ÿ$E(3<8tmpH(3:1O;‰{„(3:CO8tmp(3:cO;Ÿ$(3<8tmp (3:O;¥!Î(3;iÐ(2:­O;Qÿ(2;L)a<;W=)3:¿O8tmp)3:ÑO8tmp)3:ãO8tmp)3:õO8tmp!)3:P8tmp:)3:'P;Ÿ$I)3<8tmpL)3:9P8tmpW)3:YP;Ÿ$_)3<8tmpb)3:kP8tmpm)3:‹P;Ÿ$u)3<8tmpx)3:P8tmpƒ)3:½P;Ÿ$œ)3<8tmpŸ)3:ÛP;¥!Â)3;iÄ)2:íP;Qß)2:ÿP8tmpô)3:Q8tmpö)3:#Q8tmp*3:5Q8tmp#*3:UQ;Ÿ$r*3<8tmpu*3:gQ8tmpÆ*3:yQ8tmpÓ*3:‹Q8tmpß*3:Q;‰{+3:»Q;¥!+3;i+2:ÍQ;Q:+2:ßQ8tmpN+3:ñQ8tmpP+3:R;Ÿ$x+3<8tmp{+3:1R;Ÿ$•+3<8tmp˜+3:QR;Ÿ$§+3<8tmpª+3:oR;¥!Á+3;iÃ+2:R8tmpÝ+3:“R8tmpß+3:¥R8tmpá+3:ÅR;Ÿ$ô+3<8tmp÷+3:×R8tmp,3:÷R;Ÿ$L,3<8tmpO,3: S8tmpb,3:)S;Ÿ$¡,3<8tmp¤,3:;S8tmp·,3:[S;Ÿ$ö,3<8tmpù,3:mS8tmp -3:S;Ÿ$K-3<8tmpN-3:ŸS8tmpa-3:±S8tmp“-3:ÃS8tmpŸ-3:áS;¥!ª-3;i¬-2:T;Ÿ$ù-3<8tmpü-3:T8tmp.3:3T;Ÿ$F.3<8tmpI.3:ST;Ÿ$q.3<8tmpt.3:qT;¥!µ.3;i·.2:ƒT;QÒ.2:•T8tmpæ.3:§T8tmpè.3:¹T8tmpB/3:ËT8tmpD/3:ÝT8tmpF/3:ïT8tmpH/3:U8tmpc/3:U8tmpo/3:%U8tmps/3:7U8tmpw/3:IU8tmp{/3:[U8tmpç/3:mU8tmp+03:U;Ÿ$a03<8tmpd03:­U;Ÿ$³03<8tmp¶03:¿U8tmpt13:ÑU8tmpŠ13:ãU8tmp–13:õU8tmp23:V;Ÿ$]23<8tmp`23:'V8tmps23:GV;Ÿ$—23<8tmpš23:YV8tmp­23:yV;Ÿ$Ä23<8tmpÇ23:‹V8tmpÞ23:V8tmp33:¯V8tmp"33:ÏV;Ÿ$233<8tmp533:ïV;Ÿ$V33<8tmpY33:W8tmp|33:W8tmp33:3W;Ÿ$¤33<8tmp§33:EW;‰{Ù33:cW;¥!ã33;iå32:uW;Q42:‡W8tmp43:™W8tmp43:«W8tmp"43:½W8tmp-43:ÝW;Ÿ$´43<8tmp·43:ïW8tmpÊ43:X;Ÿ$á43<8tmpä43:!X8tmpû43:AX;Ÿ$<53<8tmp?53:SX8tmpa53:sX;Ÿ$¾53<8tmpÁ53:…X8tmpÚ53:¥X;Ÿ$63<8tmp63:ÅX;Ÿ$763<8tmp:63:åX;Ÿ$e63<8tmph63:Y;Ÿ$¦63<8tmp©63:%Y;Ÿ$Ó63<8tmpÖ63:7Y8tmpé63:WY;Ÿ$ý63<8tmp73:iY8tmp73:‰Y;Ÿ$'73<8tmp*73:›Y8tmp=73:»Y;Ÿ$P73<8tmpS73:ÍY8tmph73:íY;Ÿ${73<8tmp~73:ÿY8tmp“73:Z8tmp¸73:#Z8tmpà73:5Z8tmpü73:UZ;Ÿ$,83<8tmp/83:gZ8tmpH83:‡Z;Ÿ$‡83<8tmpŠ83:§Z;Ÿ$²83<8tmpµ83:ÇZ;Ÿ$ñ83<8tmpô83:çZ;Ÿ$93<8tmp93:ùZ8tmpZ93:[;Ÿ$•93<8tmp˜93:9[;Ÿ$À93<8tmpÃ93:Y[;Ÿ$:3<8tmp:3:y[;Ÿ$B:3<8tmpE:3:™[;Ÿ$‹:3<8tmpŽ:3:«[8tmp§:3:Ë[;Ÿ$Ú:3<8tmpÝ:3:ë[;Ÿ$ ;3<8tmp#;3: \;Ÿ$V;3<8tmpY;3:+\;Ÿ$u;3<8tmpx;3:=\8tmp±;3:]\;Ÿ$Ú;3<8tmpÝ;3:o\8tmpÿ;3:\;Ÿ$+<3<8tmp.<3:¡\8tmpS<3:Á\;Ÿ$…<3<8tmpˆ<3:á\;Ÿ$»<3<8tmp¾<3:ó\8tmp =3:]8tmp=3:]8tmpD=3:)]8tmpF=3:I];Ÿ$q=3<8tmpt=3:[]8tmp‡=3:{];Ÿ$ž=3<8tmp¡=3:]8tmp¸=3:­];Ÿ$à=3<8tmpã=3:¿]8tmpö=3:ß];Ÿ$ >3<8tmp >3:ñ]8tmp >3:^;Ÿ$3>3<8tmp6>3:#^8tmpH>3:C^;Ÿ$f>3<8tmpi>3:c^;Ÿ$“>3<8tmp–>3:u^8tmp©>3:‡^8tmpµ>3:§^;Ÿ$È>3<8tmpË>3:¹^8tmpà>3:Ë^8tmp?3:Ý^8tmp-?3:ý^;Ÿ$Œ?3<8tmp?3:_8tmp±?3:/_;Ÿ$Ù?3<8tmpÜ?3:A_8tmp@3:a_;Ÿ$*@3<8tmp-@3:_;Ÿ$`@3<8tmpc@3:¡_;Ÿ$¾@3<8tmpÁ@3:³_8tmpÓ@3:Å_8tmpA3:×_8tmp$A3:÷_;Ÿ$@A3<8tmpCA3:`;Ÿ$^A3<8tmpaA3:5`;¥!šA3;iœA2:G`;Q¼A2:Y`8tmpÒA3:k`8tmpÔA3:}`8tmpÖA3:`;Ÿ$èA3<8tmpëA3:¯`8tmpöA3:Ï`;Ÿ$ B3<8tmp B3:á`8tmpB3:a;Ÿ$-B3<8tmp0B3<8tmpXB3 í a”=Ð ïS‚a9¬]ðSY9¨$ñSp9¢TòS29aKóS29GLôS2;M)öS2;Vt÷SY6üI3¼l9]39Ô39Þ39è393W)9j7)9£Z)9ñQp?}mx"?ÿYÉ"?bÄ"?­w?XÙ?¯&Ô?qX}"?6¨? `#?Úz£?‘y›!?‚–!?'.?,l#;¹c);Çc);!p);/p);=p);w3;2a3;™3;(3;ä3;’3;q3;œ 3;{!3;¸"3;Ê#3;LC$3;å.%3;Ù(&3;>W'3;ØX(3;IW)3;ãX*3;Ú,+3;",3;Q-3;².3;TW/3;îX03;_W13;ùX23;M733;443;(453; 63; 73;hR83;ÇO93;×O:3;\?;3;ªN<3;O5=3;'A>3;2A?3;é@3;öA3;B3;q4C3;(D3;5E3;YF3;ÏZG3;wH3;ÁsJ3;ËsK);ÕsL);ßsM);ésN3;ósO2;ýsP;tQ3;tR3;¾TS3;ÉTT2;ÔTUp;ßTV3;êTW3;‹>X2;UY3;UZ;(U[);£>\);ÍU]);ØU^);ãU_);îU`p;ùUap;Vb;Vc3;#dp;zeY;~fp:Mf;‰{ª3:_f8tmp³3:qf;‰{è3:ƒf8tmpñ3:•f;9 2:§f8tmpC3:¹f8tmpF3:Ëf8tmpk3:Ýf8tmpn3:ýf;Ÿ$”3<8tmp—3:g8tmpª3:/g;Ÿ$»3<8tmp¾3:Og;Ÿ$ä3<8tmpç3:og;Ÿ$#3<8tmp&3:g;Ÿ$J3<8tmpM3:¯g;Ÿ$\3<8tmp_3:Ïg;Ÿ$„3<8tmp‡3:ïg;Ÿ$›3<8tmpž3:h;Ÿ$±3<8tmp´3:/h;Ÿ$Ù3<8tmpÜ3:Oh;Ÿ$ë3<8tmpî3:ah;‰{ 3:h;¥!ª3;i¬2:‘h;QÇ2:£h8tmpÛ3:µh8tmpÝ3:Çh8tmp÷3:Ùh8tmpù3:ëh8tmp 3: i;¥!v3;ix2:)i;Ÿ$½3<8tmpÀ3:Ii;Ÿ$Û3<8tmpÞ3:[i8tmpð3:mi8tmpò3:i8tmp53:‘i8tmpA3:±i;Ÿ$V3<8tmpY3:Ïi;¥!y3;i{2:ái;Q–2:ói8tmp»3:j8tmpÊ3:j;‰{ 3:)j8tmp' 3:;j8tmpe 3:Mj8tmpg 3:_j8tmps 3:qj;‰{§ 3:ƒj8tmp° 3:•j8tmpÔ 3:³j;¥!ø 3;iú 2:Åj8tmp!3:×j8tmp!3:÷j;Ÿ$'!3<8tmp*!3:k;Ÿ$E!3<8tmpH!3:)k8tmpZ!3:;k8tmp\!3:Yk;¥!l!3;in!2:kk;Q‰!2:}k8tmp!3:k8tmpŸ!3:¯k;Ÿ$Ë!3<8tmpÎ!3:Ák;‰{1"3:Ók8tmp:"3:ñk;¥!G"3;iI"2:l;Qi"2:l8tmp"3:'l8tmp"3:9l8tmpƒ"3:Wl;¥!“"3;i•"2:il;Qµ"2:{l8tmpË"3:l8tmpÍ"3:Ÿl8tmpÏ"3<;Ÿ$#3<8tmp#3B jª^p=®>ÉQûl7ctxÉQûl9º`ÊQc19ìËQz0i16ó.ÛBp‹n9Ú5ÛBQ"9ÛBC 9›ÛBp?'.ÍD?•¼D?’L”D?e lD?‘"D?ºi˜C? F?òA`C?«,GC?,&F?™,+F;^4ÜBp;qÝBp;÷!ÞBp;±ßBp;úW29Š;úW1 9ÈjûWí9TûWí9ºSûWí9È ûWp;jüW3:*p8keyÿW3;59ÿW3<;iYX3:ÀÄRÖ~L!}4L}nZ.}>ÆRYLJ}¨L?}÷]6@%$R=^ª6Y±@fHT X´ Y÷?rHT Ø´ _Ÿ_ ÷X#ƒLñ>‰Lå>Â[¦>Ÿ_ >FL³>ÂL¿>å\ MË>W¶_°d„_½<ƒHUóUV›_ÊNÅ_HUs6f`P3§ƒ9&r`P37arg`P37kw`P3;ýzaP3;úbbP^cZƒDÑœX„LkƒLLwƒêLƒƒ‰MŽƒ(MšƒqbOD„HUsW}D×a•Dä/„HU pµ VµDðYÔDrHT µ 6 j3„7objj39nLj38tpkmcX„ðD,œ…Li„ÏLu„ZM„úeEß„HUóUHTóTeEö„HTóT#$WEüf–L E‘œœ…EoL3C FpLCxá SÐX…RéL3!Sr…RéL3µ!a)E Š…HUsg•EHUóUf M¥KÀE¼œN†Eo¥K3ë!Fp¦K]5‰"S0ð…Ré¨K3'#S` †Ré©K3]#S$†RéªK3“#aÉE <†HUsgMFHUóUfæ&6K€F‘œæ†Eo6K3É#Fp7K,2g$SÀ¢†Ré9K3%Sð¼†Ré:K3;%a‰F Ô†HUsgõFHUóU6ÔB_Xœ2‡9Z)_Xp;ßB`Xœ28posaXp6š<œXœ2Ї9<XY9µjXp9ÉdžXp9 žXYCbadËX;±@ŸXœ2;,R X3;9¡X3=Q6mXò‡9Z)mXp9ßBmXœ28posnXp8inXp;QboXã2:ã‡8tmpXœ2<;ʇXph,=ÐX G¿œ"‹Q<ÐXYq%QµjÐXp5&QÉdÑXpæ&Q ÑXY½'CbadäXR±@ÒXœ2´(R¡NÓX£<7)Zæ†>G ÔXÒˆL÷†Ï)\ M‡*M‡(*YxG¢yHU~HT}HQZ‡8HP×XŠLQ‡K*LE‡š*L9‡Ñ*L-‡+\Pi]‡Me‡+Mq‡,M}‡«,aBHM‰HU‘¸ahH"…‰HU Ψ HT|HQ Ũ HRsazHŸ‰HU‘¸aŽH·‰HU|aÄH.݉HU0HT0HQ0HR0bŠJñ‰HU}NšJHU~ZЇõHÙXÜŠL£‡C-L—‡Ÿ-\M¯‡.M»‡W.MŇ·._]J#lŠMÖ‡L/Sð¡ŠMä‡o/YJ:HUHT s $ &4$a/I¢yÅŠHUHTsHQ~YªJFHU a·GRùŠHT|HR0aÊG^‹HUsN»IHU|JO±$3àJ-œ®Qu±$ 6’/QT±$30j,ç$L? â$jñÃ$ëJRôB³$Cxy0Rw´$3±0RÁsµ$3ä1RËs¶$2|2RÕs·$3Ù2R#¸$pæ3Rz¹$YÈ4R~º$pÈ5S &ŒFtmpÖ$3´6ZáA LPÇ$pŒLîAê6YÄLfHT Àµ HQ Ù¨ VKja{Kv”ŒHU0a’K‚²ŒHU|HQsbªKÆŒHUsa¾KvÝŒHU0aLò‡HU 㨠HTvHQ ¨HR 0¶ aL!z.HU~bJLBHUbZLVHUsbˆLjHUbÚL~HU|aûLrHT ¶ NMHU|D|Sr3Ñ_pœQ>Wr)7QØXr)Q7QIWr) 7QãXr)Û7QTWr)8QîXr)|8Q_Wr)â8QùXr)9QÊ]rpX9j#e¼t`? åj,ëå`R s)‘9RÀt)2:Rwu3¢:RÁswp(;RËsx)­;RÕsyp=Rßszpd>Rés{3‹>Rós|3?Rýs}3“?R#~p@RzYQ@R~€p¥@a—`Ž…Haóõ)óõ)‘Pö)óõ)"a¾`ެHa‘Pö)‘Xö)‘Hö)"aÐ`šÃHU2aaò‡úHU P¶ HT|HQIHR 0¶ b"aHUvN6aHUsc5MUœÙL*5ð@L45eAL>5íAMH5uBMR5«BS€±L>5 CL45lCL*5¸C\€kH5kR5IXMóTHTóQG+MvÈHT|N=MHT|cc5pMœV’Lt5ñCL€5fDLŒ5îDM˜5vE_†M J‘M©5ëEl‹MsHTv_™M y‘M»5FNžMHTv_¬M ¨‘MÍ51FN±MHTv\ÀLŒ5TFL€5 FLt5ìF\Àk˜5_¿M ’Mß5%GlÄMsHTv_ÒM 3’Mñ5HGN×MHTv\ðkÿ5IóMóTHTóQm16Npœã’LB6kGLN6öGMZ6HTPNLB6·HLN6ðHTPNkZ6YfNrHT ˆ¶ mg6pNpœp“Lx6)IL„6´IM6?JTÀNLx6uJL„6®JTÀNk6YÖNrHT ¸¶ cé6àN€œ!”Lú6çJk7Z¶6äN ôQÓ“LÇ6 K\ MÒ6CKMÞ6KT;O Lú6ÆKT;O k7YVOfHT à¶ 6CI S3x”7ctx Sûl7tsp S((8ts SY8iSp; 1Sp;ÿ!SpDsN6SY`O¼œ¼—Ectx6SûlÿKEts6SY^LR…>7SpLSPù”R 1´SpkMYPé6HU‘˜Z!”šO°S–L>”ŽML2”N\MJ”žNMU”ÁNM_”kOMk”´OaÂRW}d•HUa Sé6|•HU|aHTf¡•HT  ¸ HR~avTrÀ•HT · a˜Tfß•HT ð· aØTfþ•HT À· YUrHT H¸ _@QPU–R´?{S0hPYUQW}HUS è–RjbSY‹PFicS0ÔPR´qcS0 QR­?dS0TQaRW}´–HUabRx”Ì–HUYóTrHT `· ]6šT‘S/—Lª6ÉQY·TfHT X´ HQZa+PW}G—HUaÊPW}_—HUaøPW}w—HUavSr–—HT  · aàSž{®—HUVU¦c>: Ucœb˜LO:îQL[:'RLg:`Rns:ús:Ÿ_2U&˜M„:™RMŽ:¼R_HUN˜Mš:àRM¤:SoƒU°HQ2c°:Aa0œè˜LÁ:'SLÍ:`S]Q7QaFPÖ˜L^7¬SYlafHT x¸ HQsNQaHUóUc€;U œ@™L‘;ÏSk¯;n¥;ú¥;Ÿn›;ú›;Ÿg›UHUóUHT0cF; Ujœì™LW;TLa;}TLk;ßTMu;AU]Ú:ËU!›K·™L;wULõ:œULê:ÀUaÿU—Ï™HUsg Vpa;óTpk;óQc ;VUœ”šL;ãUL';YVL1;»VM;;WZÚ:Å^3Â9tÅ^YCbadÎ^;˜jÆ^3;ýDÇ^3cŸuÀWÕœòŸL°uÐ\L¼u/]LÈuŽ]iàuMèuí]Môu`^Mv_q v‘ð}MvÜ_rÔuZ„íWðá^¯žL•<`\ði¡M©…`Mµâ`aòW…žHU|aXãžHUvNYHUva%XÇžHU}ar >rÿ=rë=_†d.©M(>nsT†d.M3>’sS° ?©MB>µsgÔdHT0HQóTTÔd;Lë=tLÿ=tL >tL>tLõ=AtLá=wtZ]¨Ödà -Wý©L‚¨­tLx¨ÐtLn¨u\à MŒ¨)uaôdÍë©HU|HTsHQ}NeHUsYÞdÁHU0cŠ@€_‹œ«L›@_uk§@ZX„_ ãO±ªLu„çuLi„0v\ M„yvb¥_‡ªHTvbÏ_›ªHTv$Y`üHTvTØ_L›@ÂvTØ_k§@Yô_fHT p© HQv$6®MNP3/«9tNP3;ýzOP3c«`)œŠ«L«ûvM"«ƒwa#`Út«HTso9`Š@HUóUmŸq@`Åœ­L°q¦wL¼qÞwiÔqMÜqxMèqOyMôqÔyMr€zM r,{krvÈqZX„d`` ¿V;¬Lu„u{Li„ô{\` M„=|VýaüS  ®¬M%r†|aÇ`]e¬HU ÿaô`æ¬HUvHT‘¸HQ~HRsHX}HYNšaHUVž`óV¯`jbGaܬHUsbkað¬HU|bŠa­HUvY§avHU|D¬r†P3b,œt®Q&r†P3õ|Earg†P3å};ýz‡P3RÌbˆP3˜~ZZƒ?bÐ ŒPL®Lƒƒô~Lwƒ,Lkƒu\Ð MŽƒ)€Mšƒr€b}bà­HU|HTsHQ0aåb×®HU|HTsHQ0aübä"®HU pµ VcðY7crHT µ a*bšc®HU1N­bHUs6gP3ž®9&rP37argP36”PsP3ì®9&rsP37argsP3;ò tP3;ýztP3;óuPØct®@cÜίL…®¨€L‘®3Zž®_c —PÀ¯L»®ÒL¯®H‚\ MÇ®ª‚MÓ®à‚Mß®)ƒbŠcw¯HU|aÁcä–¯HU pµ VÕcðYõcrHT µ W­c­6bFx_3 °7xx_38my_é;tz_Y8res{_3c9dÒœp²L#9_ƒi-9i59k=9kI9kU9\0 k$:k0:Zίd€ §Z±L߯êƒ\€ M鯋„Mó¯Á„Mÿ¯k…aGdÿ²°HUóUV¿d aÿdfÞ°HT x» Veða8er ±HT –© NJeHUsZ9ndÀ ©Z^²L#9†\À i-9i59M=9L†MI9††MU9††_€d‚±kf9_We~H²Mx9¾†_xe¿±M‰9ã†_ˆeÞ±M­9‡_ eý±M›9W‡_°e²M¿9{‡TÈe k:YÐeHUsYÝe °HUsN¢dHUsck7ðemœ#µL|7µ‡i†7iŽ7k–7k¢7k®7\ð kí8kù8ZίöeP »Y€³L߯@ˆ\P Mé¯áˆMó¯‰Mÿ¯Á‰a'fÿ³HUóUVŸf aÿffB³HT x» Vgða8grn³HT –© NJgHUsZk7Rf  ½YµL|7lŠ\  s†7 giŽ7M–7¢ŠM¢7ñŠM®7ñŠ_dfò³M¿7=‹SÐ Ü´Mß7`‹_€g #´M8š‹_ÐgB´M8½‹_àga´Mð7á‹_ðg €´M48ŒTh@MÐ8?Œ_'h)Æ´MÝ8uŒV6hðYhHUsa¶grû´HT ¨» YXhp²HUsNÎfHUs=³=U\aµ9ò U\ 6;‰{V\3;bGW\3;CbX\3J«p]3`h[œÁ¸Qò ]3™ŒFgen] 6s;™ ]3Rò^ ]3MŽFyf ]3–ŽFerr ]pZ6hh ]2¶L$6‰T j^$6Y¶jrHT ­© S@L¶Ré]3cZ<Øhp]¸L8<™L,<!‘\pMD<£‘Z#µâhàˆ\ë¶L0µ’\àM<µI’MHµ’MTµÈ’bjÙ¶HUvN3jHU|Zº;Ni \I·Lß;“LÓ;6“LÇ;[“\ Mê;€“Mö;£“M<Æ“M<é“SPt·Mx< ”Mƒ</”\€MŽ<R”]#µ0kp™\ë·L0µˆ”T0kpM<µ«”MHµÎ”MTµñ”b}kÙ·HU|N›kHUvbAi¸HUsHT0V×j%a“hÁ¸:¸HUsäHTvpû@saÚirY¸HT л Vj%bZjz¸HUvVÜjðak~Ÿ¸HUsVk1Y¬k~HUsmê@Àk<œè¹LA•nû@úû@ŸMA™•MAX–S°Ó¹k+AZX„ßkå\s¹Lu„£–Li„"—\M„k—bl]¹HUvYêlüHUval=¹HUsHT0bwl¤¹HUsV¿l½VÈl1Yàl HUvYˆlaµHUvm9Am œY»LFA´—kRAk^AkjAkvAM‚A˜\PLFAr˜\PMRAјM^A™MjAP™MvA†™k‚AZþ>m€š]¨ºL#?¼™L?ä™L ? š\€M.?4šZ˜xnm° ]*»L½xWšL±x šL¥xéš\°MÈx2›MÔxh›Màx±›Mìxú›bÊm»HU~NúmHUaVmaµB»HUsYn HUscõ?n=œÑ¼L@0œZž®2nðçTû»L»®ôœL¯®,\ðMÇ®ŽqÓ®SMß®ÄbanÞ»HUsHT0YÌnäHU pµ \0L@ú[ZƒanêTLƒƒlžLwƒ¤žLkƒŸ\MŽƒsŸMšƒ¼Ÿbºnh¼HUsHQ0VÝnðaýnr”¼HT µ d"oײ¼HUóUHQ0Y9oäHU pµ J-<$3PoïœÈ¿Qu$ 6 QT$3Þ j z$rj`um$yojñ/$Xpj,~$‹qRôB$]5i¡Rw$3™¢RÁs$3Ñ¢RËs $3¤RÕs!$2„¥Rßs"$¦R##$p,§Rz$$Y6¨R~%$p^©S$¾R‰{S$3~ªVTqðVqq1V&s~S0>¾Ftmp]$3´ªZX„ïo``$…¾Lu„ýªLi„|«\`M„È«VÌrüZX„rp°2$̾Lu„¬Li„¬\°M„Ù¬VÖrüZáA`r1$¿LîA"­Y„rfHT Àµ HQ É© a¼pJ.¿HUvGFq~E¿HUvV‹q%aœq!zj¿HU|a+rò‡£¿HU 㨠HTsHQ +HR 0¶ b:r·¿HUvNÂrHUvJw_ŽQ3@sÖœÜÂEobjŽQ3N­Qû4ŽQ3Ù­EargŽQ3y®Cbad¨QR: Q3|¯RýzQ3ܯZX„Ks0Q‰ÀLu„ˆ°Li„±\0M„‡±VvüSpíÁRò ”Q3б\ÀRÌb–Q3²RŸ$—Q3›²ZZƒÅs QœÁLƒƒ÷²Lwƒ/³Lkƒe³\MŽƒ›³Mšƒä³bt0ÁHU|HTvHQ0amu×SÁHU|HTvHQ0a„uärÁHU pµ VuðY¿urHT µ a™sš³ÁHU2bKtÇÁHU|bjtÛÁHUsNztHUv[t®ˆt@§QL‘®@´L…®‰´Zž®£t€—PÀÂL»®Ò´L¯®µ\€MÇ®dµMÓ®­µMß®öµbÒtwÂHU|HT~aLuä–ÂHU pµ VåuðYvrHT µ YÓu­HUsHT~mV@ePœyÃLg@,¶Lq@޶_3e2\ÃLq@·Lg@O·\ÀM|@ˆ·YEeÈ¿HUóUHQóTY,eìHUóUHTóTDx*’ 3ie3œ×ÅQkP’ 3«·QM7’ 3ĸQ­5’ 3b¹j,å 4fj á 4fRw“ 3º;Ás• p;Ës– pRÕs— 3_ºRßs˜ p1»R#™ pT»Rzš Yñ»R~› p¥¼]ûA¬e © ÐÄL$BD½LB|½L BȽT¬e M/Bþ½Y±eWHU|HT}ažerïÄHT ¶ a¾evÅHU0aØe‚*ÅHU|HT}HQsbëe>ÅHUsaöe´\ÅHU|HT}a fV@zÅHUsHT~b fŽÅHUsaLfò‡ÆÅHU ð» HT|HQvHR 0¶ NwfHUsmÇ< vLœ3ÇLÔ<4¾Là<è¾Lì<œ¿n÷<ú÷<Ÿs=¨vZ˜x”wðQ¨ÆL½x'ÀL±xqÀL¥x•À\ðMÈx¹ÀMÔxïÀMàx%ÁMìx[Ábýw–ÆHUsNZxHUva¨vrÇÆHT ¼ a]wræÆHT H¼ a”wc ÇHU‘XHT‘PHQ‘HV*xÊYHxrHT €¼ JÙ û3œf•œÛÒQ­5û3‘ÁQƒ=ûpÅ? šj,¤‰pR…ü3lÇR‘ý3÷ÇRnOþ)‚ÈR¨ÿ)%ÉRoY)‰ÉRM73íÉRòE3 ÌRoo3.ÍRõz3;ÎRw3­ÎRÁs3ÏRËs3ôÔRÕs 3XØRßs 3¢ÛRés 3ÖßRós 3ÇãRýs )†èRt)}éRt33êR#pFëRzYìR~pí_¾gFÉRŸ$63õíTÈgFtmp93wîN×gHUw_ni$žÉRŸ$p3êîTxiFtmps3YïNŒiHUv_To2êÉRŸ$\3µï\ Ftmp_3ðN|oHUV¼f«aÛfX„ÊHUwagX„(ÊHU|a9gX„@ÊHU|a]gX„XÊHU|a|gvoÊHU3aègt®ŽÊHUwHTsb h¢ÊHUsahš¹ÊHU2a>hZƒÜÊHU~HTvHQ0bmhðÊHUvVŒh«a«hX„ËHUwbÊh+ËHUwaÙhX„CËHU|aøhX„[ËHU|aiX„sËHU|a1ivŠËHU3a¡it®©ËHUvHTwbÂi¾ËHUwaÒišÕËHU2a÷iZƒøËHU~HTsHQ0b j ÌHUsb0j ÌHUvaZjX„8ÌHU|aˆjoPÌHU~V¶jðaÛjX„uÌHU|a koÌHU~V7kðVQk«ankZƒÄÌHU~HQ0b‰kØÌHU~a•k×ÅÍHU|HT0HQ0p÷<0bªkÍHU|b¾k)ÍHU~aÍkX„AÍHU|aôkoYÍHU~Vlðb&lzÍHU~bKlŽÍHU~aZlX„¦ÍHU|b›lºÍHU~aÔlŽäÍHa‘˜ö)‘ ö)‘¨ö)aïlX„üÍHU|amšÎHUvHT~b"m.ÎHUvb1mBÎHU~aSmoZÎHUsVpmðb™m{ÎHUsa¨mÎHU‘ˆHT‘aÃmX„µÎHU|aÚmšÓÎHUsHT~bõmçÎHUsbnûÎHU~Vn«a'nŽ$ÏHa‘˜ö)a>n{BÏHU}HT~bYnVÏHU~adn{tÏHUsHT|bnˆÏHUsa‹n§§ÏHUwHT~b¦n»ÏHU~a®nˆÓÏHUsbÉnçÏHUsVÕn«aõnX„ÐHU‘ bo$ÐHU‘ a*oŽNÐHa‘˜ö)‘˜ö)‘¨ö)"ašošeÐHU2bçoyÐHU~bCpÐHUsa‰pò‡¹ÐHU À¼ HR 0¶ b¸pÏÐHU‘bçpåÐHU‘ˆbqúÐHUwb(qÑHU}b>q"ÑHU|bZq6ÑHUsagqoNÑHU~V}qða›qt®{ÑHUHT‘˜b»q‘ÑHU‘˜aÙqZƒ¸ÑHU‘˜HT‘ HQ0brÎÑHU‘ brâÑHUa rvùÑHU1a>r§ÒHU~HTbYr+ÒHU~bhr?ÒHUapr•WÒHUsb‹rkÒHUsa˜rZƒŽÒHUvHTHQ0b´r¢ÒHUvbÃr¶ÒHUbZsÊÒHUvNŒsHUJ {î 31yÞœ"ßQQî 3`ðj)© 9~j³ ¤ ç}j,€ Í‚j u yRÑbï )ññR]ð )'óR‘ñ 3œóRò 3ëõR§só 3øR)ô 3%úRwõ 3»ûRÁs÷ 2SüRËsø p²þRÕsù 3«ÿRßsú 3¸Résû 3áRósü 3ù Rýsý Ô Rtþ 33Rtÿ §R¾T 3?RÉT 3ªRÔT 3íRßT )R# pˆRz Y>R~ pâ_zz/ùÔRŸ$; 3®\PFtmp> 3ÑS€%ÕFtmp8 3 N§‡HU‘˜SÀQÕFtmp. 3T N~‡HU‘Sð’ÕR‰{p 3Ž V:|ðV^|~V}ƒ1S SÖR¥!z 3± Ri| 2ú ]Q7§|" ÖL^7W!YÄ|fHT x¸ HQ2]77Ò|3‚ BÖLD7{!Y}fHT ½ N>}HU~SPÌ×RQ— 2ž!]°:“}  ¿ÖLÍ:b"LÁ:†"a¥}b˜±ÖHT2V¬}ò]77~6§ %×LD7¼"Y4~fHT ½ HQvHR£¨ Ÿª v1)(aK}J=×HU~bf}Q×HU~Gw}~h×HU}G…}~×HU}G“}~–×HU}bÄ}ª×HU}bö}¾×HU~Vû}ò_€ØFtmp­ 3ß"N'€HUsS,ØFtmp¯ 3(#N؃HUSÀxØRŸ$Ç 3^#TÞ€FtmpÊ 3–#Nò€HU~SÄØRŸ$å 3¹#T‘„#Ftmpè 3ñ#Nª„HU}S@ÙRŸ$ 3'$TY…Ftmp 3_$Nq…HUsZÖE²~€^ ZÙLãE»$Yß~fHT @½ HQ ï© ZÖE°_ ¤ÙLãEç$Y-fHT @½ HQ ÷© a^yrÃÙHT ð¼ VŽy«a«yZƒíÙHUvHQ0bÇyÚHUvaÓy×Å*ÚHU}HT0HQ0p÷<0bãy>ÚHU}V%z«a@zX„cÚHUvb\zwÚHUva²zšÚHU~aîzZƒ²ÚHU}HTsHQ0b {ÆÚHUsb{ÚÚHU}aQ{JòÚHUbŽ{ÛHUG!|‘¨ ÛHUwa‡~fLÛHT Ô© HQ Ω bª~`ÛHU}aPšwÛHU2bë‹ÛHUvV<€«aW€X„°ÛHUbr€ÄÛHUV~€«a™€X„éÛHU}bµ€ýÛHU}ašÜHU2b‚(ÜHU}bÐ<ÜHU|b‚PÜHU~aÍ‚ò‡|ÜHU x½ HR 0¶ bá‚ÜHUsbƒ¦ÜHU‘ˆb=ƒ¼ÜHU‘bsƒÒÜHU‘˜a»ƒfþÜHT Ô© HQ Ω aûƒZƒ#ÝHU‘ HT~HQ0b„7ÝHU~V;„«aV„X„\ÝHU~bq„pÝHU~a¿„t®ŽÝHU~HT|aÞ„t®¬ÝHU}HTva…ÊÝHUHT~b"…ÞÝHUb1…òÝHU~a‡…š ÞHU2a¶…Zƒ.ÞHU‘ HT}HQ0bÛ…BÞHU}aô…šYÞHU2a†Zƒ~ÞHU‘ HTHQ0bK†’ÞHUbZ†¦ÞHUsa}†o¾ÞHU~Vš†ðaΆt®éÞHUsHT}bî†ýÞHU}b‡ßHU~No‹HU6ªH\pß9T\í8et\38ev\38tb\3;59\3:~ß;59\3<;ÌbC\3J÷i¥\3pxôœMåEgen¥\ 6%8ret¦\3Fval§\3~&SàõßRé¨\3¢'Z"ߪx©\†âL3ߨ'\q?ß‘°qJß‘¸qUß‘@M`ߨ(Zþ>ªxà\àL#?$*L?I*L ?o*\àM.?•*S£àMq߸*N¼{HT0S@¨ákßZX„ zÐC\øàLu„+Li„‚+\ÐM„Ë+V<€üZ˜xJ\záL½x,L±x,L¥x,\MÈxL,MÔx‚,Màx¸,Mìxî,beháHUvNúHU}aDz¢—áHU}HT0NŠ|HU}Z˜xµ|@8\*âL½x$-L±xn-L¥x“-\@MÈx¸-MÔxî-Màx$.MìxZ.b}âHUvNN€HU~V#yÊV¨y~aÄycjâHU‘°HT‘¸HQ‘@V­|ÊVó~˜xZ<uypª\+åL8<.L,</\pMD<{0S0ãâMU<ý0Ma< 1Ml<W1]º;™z0†\QãLß;z1LÓ;Ÿ1LÇ;Ä1T™z0Mê;é1Mö; 2M</2M<R2Z#µa}`ˆ\¸ãL0µv2\ M<µ¿2MHµõ2MTµ>3bÎ}¦ãHU}Nº~HUvZº;ãzà\äLß;‡3LÓ;¬3LÇ;Ñ3\àMê;ö3Mö;4M<<4M<_4SAäMx<‚4Mƒ<¥4\@MŽ<È4Z#µ~p™\¨äL0µþ4\ÀM<µ†5MHµ¼5MTµ6bz~–äHU|NÚ~HU}_ €åL,<t6L8<­6T €kD<Y$€rHT  ½ bÖzåHUsHTvV3}%bo{?åHUvVd€¦m@p€œèL$@Ð6M0@”7M<@X8Z6{€ù\×åL$6Þ8TÀ^$6YÖrHT ­© SPÿåMH@9oøßHUóU\L$@Å9\k0@k<@[<¸€]^8<L,<Å9\MD<û9SÀqæMU<X:Ma<{:Ml<²:Zº;ó€†\ÏæLß;Õ:LÓ;;LÇ;I;\Mê;ƒ;Mö;º;M<Ý;M<<Zº;A0\-çLß;$<LÓ;I<LÇ;n<\0Mê;“<Mö;¶<M<Ù<M<ü<_~BpçMx<=Mƒ<B=T1MŽ<e=]#µ‚u™\áçn0µST‚uM<µˆ=qHµ\qTµVbn‚ÏçHUvN‰‚HU|b4õçHUsV‚%J}F®\3‚dœ;ìQò ®\3¾=Q59®\3F>R™¯\3Ø?Fgen°\ 6@Fyf±\3—@Z6›‚`²\ÌèL$6¨ATƒ^$6YƒrHT ­© S $éFretµ\3BaÛ‚È¿þèHQóTa0ƒßéHUsVe„èZ<@ƒðÍ\ãëL8<yBL,<jC\ðMD<³C_jƒ&éMU<DMa<3DMl<jD]º;ƒ0†\÷éLß;DLÓ;²DLÇ;×DTƒ0Mê;üDMö;EM<BEk<Z#µ…0ˆ\^êL0µeE\`M<µ›EMHµÑEMTµFbs…LêHUvN…HU|Zº;׃\¼êLß;=FLÓ;bFLÇ;‡F\Mê;¬FMö;ÏFM<òFM<G_„FÿêMx<8GMƒ<[GT+„5MŽ<~GZ#µ·„À™\fëL0µ¡G\ðM<µ×GMHµ HMTµCHb…TëHUvN«…HU|_Ù…ÀëL,<yHL8<œHTÙ…kD<Yï…rHT  ½ bʃÔëHUsVˆ„%[©<0ƒ Ï\Lº<Ø?_™„,ìLº<ÕHV­„%V„ðJ«*]3†ïœ”ñQò *]3ùHQÌb*]3XIj‘Va]€‡8gen+] 6wtyp,]3‘°wtb-]3‘¸wval.]3‘@Fyf/]3HJZ6k†P 2]íL$6ðJ\ ^$6Y™‰rHT ­© SÀ 'ïFret5]39KSP!¢íFerr8]páKS€!jíRé:]3*LaŒˆÁ¸‘íHUsäHTvpû@sN‰HUvS°!¤î; EK]3ZX„´† "K]-îLu„`LLi„ÄL\ "M„ MbІîHUvb6ŠîHUvYâŠüHUvSp"GîRéS]3kMaㆯeîHU|HT}VJ‡½VW‡1b{‰“îHU|NªŠHUvZ©<艠"_]ÓîLº<¡MVù‰ðV—†~bj‰ôîHUva«‰;ìïHUvHT}Yè‰ßHUsZ<”‡Ð"c]ÞðL8<×ML,<7N\Ð"MD<“NZ#µž‡ #ˆ\ÆïL0µO\ #M<µ:OMHµpOMTµ¦ObꈴïHUvNûˆHU|Zº; ˆP#\$ðLß;ÜOLÓ;PLÇ;&P\P#Mê;KPMö;nPM<‘PM<´PS€#OðMx<×PMƒ<úP\°#MŽ<QZ#µ@Šà#™\¶ðL0µSQ\$M<µ‰QMHµ¿QMTµõQb™Š¤ðHUvNÏŠHU|bý‡ÏðHUsHT0V?‰%Z©<qˆ@$c]1ñ^º<_Š#ñ^º<VŠ%VD‰ðaa†¼mñHU}HT ÿ© HQ1HR3HX‘°HY‘@a”‡×ņñp÷<0Vc9ðŠ?œëôL#9+Ri-9i59x=9yI9yU9_‹ïñkf9S€$¢òMx9ßR_8‹ òM¿9S_P‹?òM‰9VS_`‹^òM­9‘S_x‹}òM›9ÊST€‹k:W…‹\°$L#9îS\°$i-9i59k=9kI9kU9\°$k$:k0:Zί‹‹à$§Z¡óL߯yT\à$Mé¯UMó¯PUMÿ¯úUa¶‹ÿ7óHUóUaEŒfVóHT x» VhŒ V|Œða—ŒróHT –© NHUsZ9Ý‹0%©Z×ôL#9¥V\0%i-9i59M=9îVMI9=WMU9=W_ï‹ôkf9Sp%ÁôMx9‰W_ÅŒ 8ôM‰9ÃW_ÑŒWôM­9þW_éŒvôM›97X_ñŒ•ôM¿9[XT k:YHUsY* °HUsNŒHUsmÅB0Ñ#œÏLâB•XLîB«^LúB _nÖBúÖBŸnÖBúÖBŸiCsC‘iCsC­šs&Crs.CrM6CœbMBCõcyNCMZC-dMfCgMrCJiM~C¶jMŠC\lM–C¥lM¢CbmM®C­oMºC$~kÆCMÒC‹MÞCóMêCw‘MöC;’MDq’MD”MDÖ•S %7öM+De—ZÍ?PŽÐ%J}öLÞ?›—\Ð%Mè?å—Y,­ÈHUwZ£P-AIJúLBS \P-M›Bw M§Bœ M³Bœ YH£]HU6ZÍ?’£€-EIúLÞ?À \€-Mè? ¡Yð£ÈHUwZ~B¤°-SIæúLB@¡\°-M›Bd¡M§B‰¡M³B‰¡Y¤]HU7ZÍ?h¤à-WI,ûLÞ?­¡\à-Mè?÷¡YĤÈHUwZ~Bç¤.eI‚ûLB-¢\.M›BQ¢M§Bv¢M³Bv¢Yñ¤]HU8ZÍ?;¥@.iIÈûLÞ?š¢\@.Mè?ä¢Y™¥ÈHUwZ~B½¥p.wIüLB£\p.M›B>£M§Bc£M³Bc£YÇ¥]HU9ZÍ?¦ .{IdüLÞ?‡£\ .Mè?Ñ£Ym¦ÈHUwZ~B¦Ð.‰IºüLB¤\Ð.M›B+¤M§BP¤M³BP¤Yš¦]HU:ZÍ?ä¦/IýLÞ?t¤\/Mè?¾¤YB§ÈHUwZ~Bf§0/›IVýLBô¤\0/M›B¥M§B=¥M³B=¥Yp§]HU;ZÍ?º§`/ŸIœýLÞ?a¥\`/Mè?«¥Y¨ÈHUwZ~B9¨/­IòýLBá¥\/M›B¦M§B*¦M³B*¦YC¨]HU<ZÍ?¨À/±I8þLÞ?N¦\À/Mè?˜¦Yë¨ÈHUwZ~B©ð/¿IŽþLBΦ\ð/M›Bò¦M§B§M³B§Y©]HU=ZÍ?c© 0ÃIÔþLÞ?;§\ 0Mè?…§Y¿©ÈHUwZ~Bâ©P0ÑI*ÿLB»§\P0M›Bß§M§B¨M³B¨Yì©]HU>ZÍ?6ª€0ÕIpÿLÞ?(¨\€0Mè?r¨YªÈHUwZ~BÁª°0åIÆÿLB¨¨\°0M›B̨M§Bñ¨M³Bñ¨Y˪]HU?ZÍ?«à0éI LÞ?©\à0Mè?_©Yz«ÈHUwZ~B«1ùIbLB•©\1M›B¹©M§BÞ©M³BÞ©Y§«]HU@ZÍ?ñ«@1ýI¨LÞ?ª\@1Mè?LªYX¬ÈHUwZ~B|¬p1 JþLB‚ª\p1M›B¦ªM§B˪M³B˪Y†¬]HUAS 1!M=DïªNÅ‘HU|SÐ1¼MOD^«M[Dú¬Z776”2ñGyLD7j­Yn”fHT ½ XQ7X•,ðGL^7­Y•fHT x¸ HQ2Z.7à“@2HðY”rHT ¶ S2MmD±­SÀ2MDç­Z 0 HUwat¡°V HU‘ HTwHQ2a—¢°| HU‘ HTwHQ2aj£°¢ HU‘ HTwHQ2a@¤°È HU‘ HTwHQ2a¥°î HU‘ HTwHQ2a饰 HU‘ HTwHQ2a¼¦°: HU‘ HTwHQ2a’§°` HU‘ HTwHQ2ae¨°† HU‘ HTwHQ2a;©°¬ HU‘ HTwHQ2aª°Ò HU‘ HTwHQ2aíª°ø HU‘ HTwHQ2aÉ«°HU‘ HTwHQ2a¨¬°DHU‘ HTwHQ2a`­Õ^HT‘ az­šuHU1a£­Zƒ“HTwHQ0a×­׎HUwHT0HQ0p÷<0Në­HUwm÷DŒŒœLE’¿LEÞ¿LOEÁs[EIrCEr8Er,En E `+*Ÿ]ÝDBŒ)ÇSZLêD¸ÁZ‹nyŒ@7ËSÈL´nÛÁL¨n'ÂLœnpÂZ›DÊŒ€7ìX|LÄD™ÃL¸DÑÃL¬DÄ\€7qÐDV[mÊŒ€7ÔBL*m™ÃLmÑÃLmäÄ\€7s6mõs>mðiFmsNmsVmöŒs^mØŒifmsnmØŒsvmØŒs~m®‘s†m·MŽmÁÅkšmM¦mùÅM²m0ÆM¾mhÆMÊm ÆMÖmìÆMâm5Éqîm‘€MúmÉMnÅÉMncÊMnËM*nÎËM6n ÆkBnMNnOÍMZn„ÎMfnºÎMrnFÏM~nÞÏZ 3ùáRU 3àâRU 2ßãR(U 3@äR£> pråR# p»åRz YæR~ p„æSà7Tz946 @‘À~ZrE&“@87 –LEææY/”w‚HU‘è}]ŒE3—= ÎYI—rHT À¾ aA”ÏöHU‘è}HTsHQ‘ð}aÌ–üHU‘¨~HT‘°~HQ‘ˆ~aÞ–ÏFHU‘è}HTvHQ‘ð}V]—_b—ŠFtmpF 3 çNw—HUvS€8ºRŸ$` 3Aç\°8Ftmpc 3wçZÍ?™à8~ ÿLÞ?Àç\à8Mè?ãçYJ™ÈHU}]rE¿“> ;LE èYø“w‚HU‘è}_‹•qR¼7º 30èR1º 3SèR¯Uº 3vèZþ>‹•9» ÃL#?™èL?ÁèL ?éè\9M.?éZrE’•@9¼ úLE4éYî•w‚HU‘Ø~Yü•˜xHU|HT}HQ~Z;?ü•p9¾ HLH?ƒéLx?¯éL„?¯é^T?^`?^l?\p9M?ÓéMœ?öéM¨?êM´?<êkÀ?Zþ>ü•°9ÐPÎL#?rêL?šêL ?Âê\°9M.?êêa/–íHU  ¿ a@–˜xHU|HT}HQ~VQ– ac– 6HUsNƒ–HUsa!“rgHT ¶ a”“@›‡HUsp=sb¿“›HUbž”¯HU|bΔÃHUsbþ”×HUbw•ëHU}b‹•ÿHU~b˜–HUvV¸–¦aˆ—X„:HU‘ø}V¥—ŽVÄ—ŽVä—Ža[˜š}HU‘~#aœ˜Zƒ HU~HT}HQ0b¸˜´HU}bǘÈHU~aÒ˜ŽäHa‘€~ö)aHUvHT~HQ4b ™HUvb™/HU~Nd™HU} º0P”J[8¸3kš šœ¿`Q3W¸) ëQj7¸)mùQ£Z¸)ÞQ¾P¸)Q>W¸)^QØX¸)÷Q®Z¸)êQÉP¸)ÝPIW¸)‘PãX¸)‘P¹Z¸)‘PÔP¸)‘PC¸)‘ jkz)j¢,X˵j™,T­jòAoÕ j o»jd¨j,ŠÓµRcv¹)Õ,R"aº)2R‘»Q"~:RXJ¼Q"ý;R=½Q"\?Roo¾Q"ðAR¿Q"FR¹RÀ3iIRI@Á3ìJRT@Â3ELRõzÃ3³MR?=Ä3^OR %Åp QR3?Æp¨RR¼CÇ©3Uz^!ÈR3‘{R‘ É©3Â\z ÊR3‘€|R8Ë©3 bz9BÌR3‘ð|RÚ?Í©3 dz÷ ÎR3‘à}R`,Ï©3Ídzí ÐR3‘Ð~RwÑ3ëfRÁsÓ3ÅgRËsÔ3\uRÕsÕ3ŠRßsÖ3w™Rés×3'«RósØ3²·RýsÙQ"˜ËRtÚpÎztÛ3‘èzz¾TÜ3‘ðzzÉTÝ3‘øzRÔTÞ)CÐRßTß3Æ×RêTà2¼ÞR‹>á3ýçRUâ2aïRUã2ÕïR(Uä25ðR£>å2•ðRÍUæ2áðRØUç2-ñRãUè3yñRîUé3Â÷RùUê3 ÿRVë3}RVì2RVí2NR%Vî2ÂR0Vï26RÆVð2–RÑVñ2öRÜVòpBRçVóp#RçAô2ßRþVõ2gR Wö2ïRW÷3wR Bø3©R(Wù2×R:Xú2_REXû2çRPXü3o R[Xý2Š%RfXþ2þ%R­2ÿ2r&RŠX2æ&R•X2Z'R X2Î'R«X2B(RZ2Ž(R#Z2Ú(R.Z2&)R9Z2r)RDZ2¾)ROZ 2 *Rþ$ 2V*RrZ 2¢*R}Z 2î*RˆZ 2:+R[2†+R#pÒ+RzYß-R~p0_hœ%…$RŸ$I32TsœFtmpL3ˆ2NˆœHU|_EŸ'½$Ftmp“3ä2NlŸHU‘Øy_Ú %RŸ$Þ3Â4Tå Ftmpá315Nô HU_+Ù3Q%RŸ$¬3z5\à9Ftmp¯3Ö5_‹«¨'R¼736R13B6R¯U3e6Zþ>‹«:€Ù%L#?ˆ6L?°6L ?Ø6\:M.?7ZrE’«@:&LE#7Y÷«w‚HU‘˜{]rE¬G‚K&LEr7Y>¬w‚HU‘ˆ|]rEG¬Gƒ†&LEÁ7Y…¬w‚HU‘ø|]rEެG„Á&LE8Y̬w‚HU‘è}]rEÕ¬G…ü&LE_8Y­w‚HU‘Ø~Y3­˜xHUsHTvHQ|_üQY'RŸ$®3®8\p:Ftmp±3 9_]u§'RŸ$î3S9\ :Ftmpñ3³9NœHU‘°y_ß6õ'RŸ$*3þ9\à:Ftmp-3q:NHU‘Ðy_Ÿ'"M(RŸ$I3è:T©'FtmpL3D;N¼'HU_{›(RŸ$3 ;\;Ftmp“3ë;NdHU‘¸y_ä~é(RŸ$Ð3I<\`;FtmpÓ3”<N5HU‘Ày_ŠD7)RŸ$3ò<\°;Ftmp 3x=NÉHU‘Ðy_#2#)RŸ$%3>T.2Ftmp(3K>NA2HUZrEÓµð;‹Æ)LE”>Y)w‚HU‘˜{ZrEâµ <Œý)LEù>Y*w‚HU‘ˆ|ZrEñµP<4*LE^?YN*w‚HU‘ø|ZrE¶€<Žk*LEÃ?Y}*w‚HU‘è}ZrE¶°<¢*LE(@Y¬*w‚HU‘Ø~Sà<Ñ+z94b@‘€{]rE™¹9cõ*LE@YÒ¹w‚HUsZ÷Dº0=gv+L E³@L,Eß@L8EALCE'ALOEKALE'ALEqA\0=i[E[ÝDº0=ÇSLêDqAaë¹Ïœ+HUsHT‘ÈyHQ~aºüÃ+HU‘èzHT‘ðzHQ‘øzV{º_â¼$),RŸ$–3—ATí¼Ftmp™3BN½HUvS€=X-z94¯@‘€{]rEýÁ9°|,LEbBY6Âw‚HUsZ÷DtÂ>´ý,L EˆBL,E´BL8EØBLCEüBLOE CLEüBLEFC\>i[E[ÝDtÂ>ÇSLêDFCaGÂÏ#-HUsHT‘ØyHQ~atÂüJ-HU‘øzHT‘ðzHQ‘èzV×Â_¿Æ<¦-RŸ$3lC\P>Ftmp3ÊCNûÆHU‘¨y_eÈþ-RŸ$23?DTqÈFtmp53›DN€ÈHUS> /z94M@‘€{]rE6É9NR.LEäDYoÉw‚HU‘˜{]ŒEcÔTŠ.YyÔrHT À¾ a‹Éϰ.HUsHT‘˜zHQ}aìÓü×.HU‘èzHT‘ðzHQ‘øzaüÓÏý.HUsHT‘ÈyHQ}V“Ô_uÎ'C/Ftmp]3 ENœÎHU‘Èy_ÓÔ#›/RŸ$h3ƒETÞÔFtmpk3¹ENñÔHUsSÀ>¨0z94ƒ@‘€{]rEÖ9„ï/LEFYNÖw‚HU‘ˆ|]ŒEáØŠ'0Y÷ØrHT À¾ abÖÏM0HUsHT‘zHQ}ajØüt0HU‘øzHT‘ðzHQ‘èzazØÏš0HUsHT‘ØyHQ}VÙ_öÚ1ä0RŸ$ï3(F\ð>Ftmpò3qF_Þ5 1RŸ$>3ºF\ ?FtmpA3G_’ß%x1RŸ$€3LGTßFtmpƒ3áGN²ßHU|_êÐ1RŸ$z3=HT(êFtmp}3†HN8êHUvSP?Û2z94•@‘€{]rEëê5–$2LEÏHY ëw‚HU‘Ø~]ŒE]üœ\2YsürHT À¾ a@ëÏ‚2HUvHT‘ØyHQ|aèûü©2HU‘èzHT‘ðzHQ‘øzaöûÏÍ2HUvHTsHQ|VŠü_Hë3Ftmp¥3INWëHUs_¹ëi3RŸ$¸3AITÅëFtmp»3ŠINÖëHU|S°?v4z94Ó@‘€{]rEŒì5Ô½3LEÓIYÁìw‚HU‘ø|]ŒE¹þÚõ3YÏþrHT À¾ aáìÏ4HUsHT‘àyHQvaBþüB4HU‘øzHT‘ðzHQ‘èzaRþÏh4HUsHT‘ÈyHQvVæþ_éì.®4Ftmpã3"JNíHU‘Èy_Õî#5RŸ$Ÿ3ïJTàîFtmp¢3KKNóîHU_ò.B5RŸ$×3§K\@FtmpÚ3ÊK_ó/~5RŸ$3L\@@Ftmp3\L_°õÓ¸6z94@‘€{]rE°õ9Ý5LE¥LYéõw‚HUvZ÷D"öp@^6L EËLL,E÷LL8EMLCE?MLOEcMLE?MLE‰M\p@i[E[ÝD"öp@ÇSLêD‰Maýõσ6HUvHTsHQ‘€{a"öüª6HU‘èzHT‘ðzHQ‘øzV}ö_¶÷/ô6RŸ$>3¯M\ @FtmpA3ÒM_ùß08z94W@‘€{]rEù9XS7LENYNùw‚HUvZ÷D‰ùÐ@\Ô7L EANL,EmNL8E‘NLCEµNLOEÙNLEµNLEÿN\Ð@i[E[ÝD‰ùÐ@ÇSLêDÿNadùÏû7HUvHT‘ÈyHQ‘€{a‰ùü"8HU‘øzHT‘ðzHQ‘èzVäù_†ÿ#ˆ8RŸ$3%OT‘ÿFtmp 3ON¤ÿHU_äÆ9z94 @‘€{]rE5!è8LEÝOY=w‚HU‘è}Z÷D|A%i9L E,PL,EXPL8E|PLCE PLOEÄPLE PLEêP\Ai[E[ÝD|AÇSLêDêPaWÏ‘9HU‘è}HT‘ÈyHQ‘€{a|ü¸9HU‘èzHT‘ðzHQ‘øzV×_–m:RŸ$¦3Q\0AFtmp©3[QNÕHU‘°y_SP:RŸ$æ3¹Q\pAFtmpé3R_u Nž:RŸ$3KR\ AFtmp"3ƒRN¹ HU‘Ðy_ñ+#ö:RŸ$>3 STü+FtmpA3iSN,HU_? U2;RŸ$›3ÅS\àAFtmpž3T_§ u€;RŸ$Û3WT\BFtmpÞ3¢TNî HU‘¸y_^?Î;RŸ$3U\PBFtmp38UN“HU‘Ðy_/"&<RŸ$33ÂUT"/Ftmp63 VN5/HUVp›«a‹›X„K<HUb¦›_<HUa½›Ž<Ha ‘ö)‘ zö)aà›Ž£<Ha ‘ö)‘¨zö)aœŽÅ<Ha ‘ö)‘°zö)aœvÜ<HU3VxŸ«a’ŸŽ=Ha‘ zö)a¬ŸŽ!=Ha‘¨zö)aÈŸŽ==Ha‘°zö)as Ž_=Ha ‘ö)‘°yö)V «a¨ X„„=HUsbà˜=HUsaþ š¯=HU2a8¡ZƒÔ=HU}HT‘¨yHQ0bm¡ê=HU‘¨yb}¡þ=HU}aŒ¡ >HU‘ÐyHT‘àyb¿¡6>HU‘Ðybæ¡L>HU‘àyb0¢`>HUaA¢Žƒ>Ha ‘°yö)‘¸yö)VY¢«a£š§>HU2a?£ZƒÊ>HU~HTvHQ0Vô£«a¤X„ï>HU|b,¤?HU|a@¤Ž&?Ha ‘ zö)‘ðyö)aû¤ŽB?Ha‘°yö)a*¥šZ?HUsar¥Zƒ}?HUHT~HQ0b¥‘?HU~bž¥¥?HUVª¥«VÛ¥Žbª¦Ó?HUb#§ç?HU|b§û?HUvb¨@HU‘¨yb‡¨%@HUsb ©;@HU‘Àybn©O@HU~b<ªe@HU‘¸ybŠªy@HU}bW«@HU‘°yaT­ò‡Í@HU P¿ HT‘°y”HQ‘¨y”HR 0¶ a~­Žé@Ha‘°yö)a—­{ AHU|HT‘àyb´­AHU|aÁ­§=AHU‘ÈyHTbÜ­QAHUaç­ŽmAHa‘°yö)a®{AHUHT‘àyb®¡AHUa(®ÁAHU‘ÈyHTsbC®ÕAHUsaM®vìAHU2aš®BHU‘ˆzHT‘ÐyHa‘¨yö)bî.BHU‘ÐyaήŽJBHa‘°yö)aç®{jBHUsHT‘Øyb¯~BHUsa¯§žBHU‘ÈyHTb*¯²BHUa5¯ŽÎBHa‘°yö)aN¯{îBHUHT‘Øybi¯CHUav¯"CHU‘ÈyHT|b“¯6CHU|a¯vMCHU2aÙ¯yCHU‘ˆzHT‘ÐyHa‘¨yö)b°CHU‘Ðya,°X„©CHU‘ˆzVD°«V^°«ax°ŽßCHa‘ zö)a”°ŽûCHa‘¨zö)a°°ŽDHa‘°zö)VÒ°ŽVÿ°ŽV2±Ža‚±šVDHUsað±Zƒ{DHUvHT‘°yHQ0b#²‘DHU‘°yb3²¥DHUvV?²«a[²ŽÎDHa‘ zö)au²ŽêDHa‘¨zö)a”²ŽEHa‘°zö)V¿²ŽVþ²ŽVJ³Ža¤³šEEHUsa´ZƒlEHU‘°yHT‘¨yHQ0b0´‚EHU‘¨ybW´˜EHU‘°yaa´v¯EHU4aá´t®ÑEHU‘ÐyHT‘°ybµçEHU‘°yb;µýEHU‘ÐyaEµvFHU1axµt®4FHUHT‘Ðyb«µJFHU‘Ðybºµ^FHUb˵rFHU|bh¶ˆFHU‘Øyb—¶žFHU‘àybƶ´FHU‘˜zbõ¶ÊFHU‘zb$·àFHU‘ˆzbS·öFHU‘€zb‚· GHU‘øyb±·"GHU‘ðybà·8GHU‘èyV¸¦a ¸t®cGHU|HTsb)¸wGHUsbH¸‹GHUvbY¸ŸGHU|a{¸@›ÅGHU‘Èy#p=‘Èyb…»ÛGHU‘Ðyaf¼ŽþGHa ‘¨zö)‘øyö)a†¼Ž!HHa ‘°zö)‘€zö)až¼v8HHU3aZ¿t®VHHUvHTbw¿jHHUaƒ¿šHHU2a©¿Zƒ¤HHU|HTsHQ0bÒ¿¸HHUsbâ¿ÌHHUvaÀ@›òHHU‘Øy#p=‘ØyaJÅt®IHUHT‘ÈyaeÅo*IHUV{ÅðabÆX„QIHU‘Ðyb—ÆgIHU‘ÐyaÇš~IHU2a3ÇZƒ¡IHU}HTsHQ0bPǵIHUsb`ÇÉIHU}amÇéIHUHT‘àybŠÇýIHUb±ÇJHU‘àyb È)JHU‘¨yVÈ«a2ÈX„NJHUvbNÈbJHUvaŠÈšyJHU2a³ÈZƒœJHU}HTsHQ0bÐȰJHUsbàÈÄJHU}aïÈæJHU‘ÈyHT‘¨yb$ÉüJHU‘¨ya¡ÍoKHU‘¨yV·ÍðV¨Î«a7Ðt®RKHU‘¨yHT‘Øya¡Ñt®rKHUHT‘ÈyaÉÑ@›˜KHU‘˜z#p=‘˜zaÁÒX„²KHU‘¨yb¿ÔÈKHU‘¨yaÕt®èKHUsHT‘Øyb%ÕüKHU|a4ÕLHU‘ØyHT‘ÈybeÕ4LHU‘Èya…Õ@›ZLHU‘z#p=‘za@ךqLHU2an×Zƒ”LHU|HTvHQ0bŒ×¨LHUvVŒÙŽVÙÙŽaÚŽìLHa‘¸yö)‘àyö)‘¸yö)V4ÚŽViÚŽV ÚŽaÈÚŽ=MHa‘àyö)‘°yö)‘°yö)"a5ÛšUMHUsa™ÛZƒzMHUHT‘¨yHQ0b»ÛMHU‘¨ybÊÛ¤MHUVÖÛ«V ÜŽVLÜŽV£ÜŽaÝÜŽNHa‘°yö)‘èyö)‘°yö)VÝŽVdÝŽV­ÝŽaâÝŽQNHa‘èyö)‘ö)‘ö)"a[ÞšiNHUsaÀÞZƒŒNHUHT}HQ0bÞÞ NHU}bíÞ´NHUaþÞX„ÎNHU‘ˆzVß«a,ßvòNHU2VÉé«aäéX„OHUbÿé+OHUaBêšBOHU2ahêZƒeOHU}HT|HQ0b‡êyOHU|b—êOHU}a¤ê­OHUsHT‘ÐybÙêÃOHU‘ÐyVcë«a~ëX„èOHUsb™ëüOHUsaàëšPHU2a ìZƒ6PHU}HTHQ0b&ìJPHUb6ì^PHU}aEì€PHU‘ÈyHT‘Ðybzì–PHU‘ÐyV#í«a>íX„»PHUvbZíÏPHUvahíŽëPHa‘ zö)a‚íŽQHa‘¨zö)aœíŽ#QHa‘°zö)a²ív:QHU3aúít®ZQHU|HT‘Ðyb-îpQHU‘Ðya9QHU2adîZƒªQHU~HTvHQ0bî¾QHUvbžîÒQHU|a¨îvéQHU1a±ïšRHU2aìðt®RHUHT|b ñ2RHU|a"ñZƒURHU~HTvHQ0bMñiRHUvb\ñ}RHUbƒñ“RHU‘ÈyañvªRHU1VÀñ«aÛñX„ÏRHUböñãRHUaEòšûRHU}aˆòZƒSHUvHT|HQ0b§ò2SHU|b·òFSHUvVÃò«aÞòX„kSHUvbúòSHUvaQóš—SHUsa”óZƒºSHU|HTHQ0b¯óÎSHUbÀóâSHU|aÝó@›THUsp=sV_÷«az÷X„'THU|b—÷;THU|aî÷šSTHU}a2øZƒvTHUHTvHQ0bPøŠTHUvb_øžTHUaø@›ÄTHU‘Èy#p=‘Èyaþút®âTHUvHTsaû@›UHU‘Øy#p=‘ØyaHýt®(UHU|HT‘Èyahý@›NUHU‘ày#p=‘àyaqšeUHU2a—ZƒˆUHU~HTsHQ0b¼œUHUsb˰UHUaí@›ÖUHU‘Èy#p=‘Èya‚t®öUHUHT‘Ðyb· VHU‘ÐyaBX„&VHU‘ˆzVZ«Vt«aŽ\VHa‘ zö)aªŽxVHa‘¨zö)aÉŽ”VHa‘°zö)VíŽVŽVUŽa$šÓVHUsa‹ZƒøVHU‘°yHT~HQ0b¦ WHU~bÍ"WHU‘°yVÙ«aóŽKWHa‘ zö)aŽgWHa‘¨zö)a.ŽƒWHa‘°zö)V^ŽV’ŽVÌŽavšÂWHU|aÝZƒçWHU~HT‘¨yHQ0bÿýWHU‘¨yb XHU~a v(XHU3aî X„BXHU‘ˆzV «V «a: ŽxXHa‘ zö)aV Ž”XHa‘¨zö)au ްXHa‘°zö)V— ŽVÌ ŽV Žaµ šïXHUsa# ZƒYHU~HT‘¸yHQ0bV *YHU‘¸ybe >YHU~Vq «a ŽgYHa‘ zö)a© ŽƒYHa‘¨zö)aÅ ŽŸYHa‘°zö)Vî ŽV ŽVb Ža=šÞYHUsa©ZƒZHU‘¸yHT‘¨yHQ0bÉZHU‘¨ybð1ZHU‘¸yaúvHZHU3aÁX„bZHU‘ˆzVÙ«Vó«aŽ˜ZHa‘ zö)a)Ž´ZHa‘¨zö)aHŽÐZHa‘°zö)VlŽVœŽVÌŽa°š[HUsaZƒ6[HU‘¸yHT‘ÀyHQ0bQL[HU‘Àybxb[HU‘¸yV„«a Ž‹[Ha‘ zö)a¿Ž§[Ha‘¨zö)aÞŽÃ[Ha‘°zö)VŽVJŽV“Žaš\HU|aèZƒ)\HU‘ÀyHT‘¨yHQ0b ?\HU‘¨yb1U\HU‘Àya;vl\HU2VÚ«a÷Zƒ–\HU|HQ0bª\HU|a$×ÅÕ\HU‘ÐyHT0HQ0p÷<0bOë\HU‘Ðya#(š]HU2aI(Zƒ%]HU~HT}HQ0bt(9]HU}a)šP]HU2a7)Zƒs]HU~HT}HQ0b`)‡]HU}a+t®§]HU‘ÐyHT~b"+»]HU~a3+šÒ]HU2ac+Zƒ÷]HU‘¨yHTsHQ0b‘+ ^HUsb¸+!^HU‘ÐyaÂ+v8^HU1a -t®X^HUHT‘Ðya˜-šo^HU2aº-Zƒ’^HU~HTsHQ0bá-¦^HUsaT.š½^HU2a„.Zƒâ^HU‘¨yHT}HQ0b´.ö^HU}bÛ. _HU‘Ðyaå.v#_HU1aî/t®E_HU‘ÐyHT‘¸yb!0[_HU‘¸yas0t®{_HUHT‘ÐyaÒ0š’_HU2aô0Zƒµ_HU~HT}HQ0ak1šÌ_HU2a–1Zƒï_HU~HTsHQ0b¿1`HUsbæ1`HU‘Ðyað1v0`HU1aõ2t®R`HU‘ÐyHT‘Àyb(3h`HU‘Àyaw3š`HU2a™3Zƒ¢`HU~HTsHQ0Y4t®HUHT‘ÐyJÁq«3±¦œp²Q]«3TVQ)o«3VQGd«3sXj÷`Ïj‰R ¢²j°tŸÏRÔ¬3ÞYRÞ­3¶ZRè®3[R3W¯)j\Rj7°)È]R£Z±)&_;ñQ²pR#³po`Rz´YïaR~µp§c{w¶3S€BlzÌfºp²  þ)z+G»€²‘€SC{gRTE½2BeRÑJ¾º"ìe] a˜ä9æ÷bL]afLQa¥fLEa¥fL9aÉfL-aífT˜ä9MiagMua=gYÑäfHT x¿ HQ [ª HR Sª HX7HY Ÿª ] aÛó9ë¬cL]aigLQagLEagL9a±gL-aÕgTÛó9MiahMua%hYôfHT x¿ HQ [ª HR Sª HX7HY Ÿª ] aÂô9áadL]aQhLQauhLEauhL9a™hL-a½hTÂô9MiaéhMua iYûôfHT x¿ HQ [ª HR Sª HX7HY Ÿª ] a õ9ÜeL]a9iLQa]iLEa]iL9aiL-a¥iT õ9MiaÑiMuaõiYBõfHT x¿ HQ [ª HR Sª HX7HY Ÿª ] aOõ9×ËeL]a!jLQaEjLEaEjL9aijL-ajTOõ9Mia¹jMuaÝjYˆõfHT x¿ HQ [ª HR Sª HX7HY Ÿª ] aw÷9Ò€fL]a kLQa-kLEa-kL9a kL-aQkTw÷9Mia}kMua¡kY°÷fHT x¿ HQ [ª HR Sª HX7HY Ÿª aCÏÚ˜fHU}aÚ!°fHU}aGÚÚÈfHU}akÚÚàfHU}aÚÚøfHU}a³ÚÚgHU}a×ÚÚ(gHU}aûÚÚ@gHU}YÉóÀ¡HU}HT  þ)HQvHR|HX [ª Zk7m²D¥kL|7Ík\Ds†7ÀçiŽ7M–7ulM¢7WmM®7Wm_ƒ²ígM¿7/nSÀD×hMß7Rn_ŠçhMð7¡n_˜ç(=hM8Ún_Ûç \hM8ýn_çç){hM48!oT0ñ8MÐ8Do_Hñ ÁhMÝ8goVWñðY8ñHUsSEˆkL|7‹o\Ei†7iŽ7k–7k¢7k®7\Ekí8kù8Zίþæ€E»YäiL߯‹o\€EMé¯çoMó¯pMÿ¯ÇpaçfviHT x» b.çŠiHUsaNôÿ¢iHUsaï÷ ºiHUsV8úðYWúrHT –© Zk7yôÐE½YukL|7_q\ÐEs†7ÓúiŽ7M–7áqM¢7ErM®7Er_‹ôVjM¿7¥rSPF@kMß7Èr_¢ú‡jMð7s_°ú#¦jM8Rs_û"ÅjM48us_Bû äjM8˜sTÀ:MÐ8¼s_Ø"*kMÝ8ßsVçðYÈHUsaéúr_kHT ¨» YBp²HUsN³ôHUsYÖçrHT ¨» VÕ±oV²oVI²oVEäðVeäðV…äðV5çðZ‚a¢²°F {±L“at^·a^çaLÛaGuLÏaÀuLÃažw^«a^Ÿa\°Fsóaèºsûa¬sbû¶i bsbùÉsb[s#b‹ªs+bfs3b(Òs;bjÍsCbê}sKbü‡sSbÖbs[b÷ÒMcbRyMobàyM{b˜zM‡büzM“b`{MŸbÄ{M«bÊ|M·bë~MÃbâ€MÏbCƒMÛb¤…Mçb®‡Mób[ŽMÿbý‘M co™Mc…M#c¢M/c̤M;c’§MGcäªMScy®M_cijMkcǶMwc¶¹Mƒc¥¼Mck¿M›cqÇM§cHÊM³cfÐM¿c_ÙMËc½ßM×cëäMãcÐìMïcÖïMûcóMdŸöMd6úMd€üM+dÞþM7dSMCd‡MOd‡M[d" MgdÔMsdÖMd÷M‹dBM—d5M£dk M¯dº$M»dð&MÇdÎ(MÓdœ+Mßd™-MëdÍWM÷dñZMe¸\Me^MezuM'euM3ejŠM?ec¥MKe§¼MWe‰ßMceÝáMoe0ãM{eØçM‡e„óM“eÀôMŸeòùM«e¼üM·elþMÃeMÏeöMÛe±MçeƒMóeßMÿe‡ M f MfÊ M#f¿M/fÏS°G pM@fÅV?¶ðVf¶1Vø~SHCpMRfûNòÎHUsZ[äµ@Hº pLxDLlz\@HM‚°MŒùYâ¤HU}HTsSpHÚpMdfDV¸ðV@¸1VŽ~SðHípMvfzZ[›· IøJqLx°Llæ\ IM‚MŒeYsñ¤HU~HT}_˜¸-iqMˆf°Z«Ì¸PIÆqL«ç\PIM"«aà¸Ú°qHTsYÕŠ@HUsZX„õ¸€IBrLu„SLi„·\€IM„?b¹rHU‘à{b¶*rHU‘à{YÛAüHU‘à{ZZƒ?¹ÐIsLƒƒLwƒýLkƒY\ÐIMŽƒµMšƒbŒ¹«rHUvHT~HQ0aÏ äÊrHU pµ aó×írHUvHT~HQ0VÿðY(rHT µ S@J*sMšfoS€JMsM¬f¥N`HUvS°J`sM¾fSðJƒsMÐf7NBHUsZÍ?×» K}ÈsLÞ?“\ KMè?ÜY4þÈHUsS`KtMâfT 4MïfgN04HUSK+tMgN×!HU‘°~SÀK]tMg’\LM!gÝN .HUS0LtM4g&\pLMAg„Ná%HU_-½#ÉtMTgÍT;½Mag<_a¾(uMtg_Tn¾Mg¨N¾HUvS L5uM”gÞ\ÐLM¡gsSMWuM´g©\0MMÁg S`M‰uMÔg; \MMág— NuþHUvSÀM«uMôgà \ðMMhu!_Ã(õuMh«!TÃM!hô!N-ÃHUv_ßÃ2/vM4h*"TíÃ$MAh¿"S NivMThâ"VjôðV•ô1Vìõ~SNªwM„h#Z°:ÒÉpOÐÆvLÍ:Û#LÁ:$VàÉòYl[b˜HT2Z77¿[ O×wLD7I$Yø[fHT ½ a€ÉJwHU}bÉ/wHU}G®É}FwHUvGÀÉ}]wHUvGÒÉ}twHUvbùɈwHUvb£[œwHUvV²[òSðORxMfh$Mrh%Z77àòpP²xLD7b%Y"ófHT ½ ZQ7{?°P±Axr^7Y¬?fHT x¸ HQ2N_HU}_ùÉ+ƒxM–h…%N$ÊHU‘À}_$ʲxM¨hx'N9ÊHUs_Ë+ãxMºhç'NFËHU‘È}_FË+yMÌh\)NqËHU‘Ð}_”Í+EyMÞhÑ*N¿ÍHU‘¸}ZûAåÍðP+¤yL$B‰+LBÁ+L Bû+\ðPM/BF,YòÍWHU‘è{HTsS@QOzMðh|,Mühp-Z77ðìÀQ~üyLD7á-Y-ífHT ½ ZQ7WðR}>zL^7.Y~ðfHT x¸ HQ2N6`HUvZ.7-î@RŽƒzYRîrHT ¶ _™æ1½zMi(.T¦æ$Mi^._²à'÷zM.i.T¿àM;ið._"b-({MNi/NJbHU‘€|_Ob-Y{M`iˆ0NwbHU‘¨|_c*Š{Mrib3N-cHU‘ |__c-»{M„i)5N‡cHU‘Ø|_ˆÓ-õ{M–i6T–ÓM£i©6S€R}MÔiÌ6Z°: epSŸR|LÍ:7LÁ:Ç7VÌeòYQÍb˜HT2Z77¯Í S¦|LD7ý7YíÍfHT ½ aeJ§|HUvb:e»|HUvG^esÔ|HU‘Ø{G~esí|HU‘Ø{G es}HU‘Ø{VÍòSðS¿}M¶i 8MÂiµ8Z77ªÑ Tl}LD7&9YçÑfHT ½ ZQ7ÕðT€®}L^7I9YAÕfHT x¸ HQ2N­ÐHUvZVX˜ðVu˜1V©˜~_…mi€Mvjc>N•mHU_Mp˜€Mˆj ?NbpHUsSVGMšjA?M¦jÏ@Z77ÁŒ€X!ð€LD7,AY–fHT ½ ]Q76—*ÿ 6L^7OAYX—fHT x¸ HQ2N‹{HU|Z.7j–ÐX!{Yœ–rHT ¶ _‹{+¬M¸jsAN¶{HU‘¸|_¶{(ÝMÊjìANÞ{HU‘À|SY‚MÜjÎBTDMéjcCNUHU}SPYY‚Müj†CTúM kõCN ŽHU_ã|ˆ‚Mk>DNó|HU~_ó|·‚M.k EN}HUvSYúƒM^kŽEZ°:Ä}€Z’!ƒLÍ:QFLÁ:‰FVÒ}òYÔ‡b˜HT2Z77@ˆ°Z™!QƒLD7¿FYvˆfHT ½ aq}JiƒHU|b}}ƒHU|G }}”ƒHUsG²}}«ƒHUsGÄ}}ƒHUsbê}ÖƒHUsb$ˆìƒHU‘€|V3ˆòS [©„M@kõFMLkŒGZ77;Œ [t!R„LD7éGYvŒfHT ½ ]Q7ü“:s!˜„L^7 HY&”fHT x¸ HQ2N–ŠHU|_ê}(Ú„Mpk0HN~HU‘È|_~+ …M‚k'IN=~HU‘Ð|Sà[I…M”kJTM¡kVJN'HUS \ƒ…M´kŸJV=ÀðVhÀ1VæÀ~_¦©²…MÆkÕJN·©HUvSp\ ‡Mök}KZ°:dªà\t"†LÍ:hLLÁ: LVrªòYźb˜HT3Z77,»]{"L†LD7ÖLY_»fHT ½ aû©Jd†HU|bªx†HU|G*ª†HU}G>ª¦†HU}GRª½†HU}GdªÔ†HU}b‹ªè†HU}b»þ†HU‘€|V»òSp]»‡MØk MMäkUMZ77;¿°]O"d‡LD7²MYn¿fHT ½ ]Q7Ó¿'N"ª‡L^7ÕMYõ¿fHT x¸ HQ3NŸ½HU|_‹ª+ì‡MlùMN¶ªHU‘Ø~_¶ª+ˆMl‡NNáªHU‘à~_áªLˆM,lONöªHU~Sð]ωM\lÎOZ°:Ï«P^À"©ˆLÍ:“PLÁ:ËPVÝ«òY϶b˜HT3]77>·9Ç"‰LD7QYo·fHT ½ HQ|HRŸª £¨ |1.(ag«J'‰HUsbƒ«;‰HUsG”«R‰HU}G¦«i‰HU}G¸«€‰HU}GÏ«—‰HU}b¬«‰HU}b#·Á‰HU‘€|V2·òS€^~ŠM>l$QMJl‚QZ77y¹à^›"'ŠLD7ßQY´¹fHT ½ ]Q7æ»/š"mŠL^7RY¼fHT x¸ HQ3N̸HUs_¬(¯ŠMnl&RN0¬HU‘ˆ|_0¬(àŠM€l´RNX¬HU‘|_X¬(‹M’lÕSN€¬HU‘˜|S _O‹M l UTÚ°$M­lXUNô°HUsa©²vf‹HU0aÁ²v}‹HU0aú²J—‹HU‘ð{a·µŽ³‹Ha‘Ø{ö)aεÑ‹HU|HTG)¶‘à{ê‹HUva‚¶vŒHU0aʶJŒHU‘|an·Ž7ŒHa‘è{ö)a…·UŒHUsHTGç·‘à{nŒHUva_¸-ˆŒHU‘ð{a‚¸vªŒHU s0s0*(aÙ¹vÁŒHU3aºº™¥ÙŒHU}aéºvðŒHU3b=»HUa£»™¥HU|aË»°AHU|HT‘˜|HQ0b¼UHUsaö¼X„oHU‘¸~a_½š†HU2a›½Zƒ«HU|HT‘à{HQ0b罿HU|a¾X„ÙHU‘¸~a,¾X„óHU‘ ~až¾t®ŽHU|HTsbÓ¾%ŽHUsb¿9ŽHU|a]¿šPŽHU2a¿ZƒsŽHU|HTsHQ0aÜ¿X„ŽHU‘¸~aÀX„§ŽHU‘ ~aeÀt®ÅŽHU|HTvaªÀ´£ÝŽHTsaíÀX„÷ŽHU‘ ~a`Át®HU|HT‘€|a½Á7HU‘à{HTsa1šNHU2aaÂZƒsHU|HT‘à{HQ0a¸ÂX„‹HUsaÚÂX„£HUsaLÃt®ÁHU|HTsbÃÕHUsb±ÃéHU|a%ÄšHU2aUÄZƒ#HU|HTsHQ0b‡Ä7HUsbÁÄKHUvaÖÄŽgHa‘Ø{ö)aüÄŽƒHa‘è{ö)a&ÅX„HU‘˜~aAÅݦºHUvHT0bhÅÎHUvaŒÅ§ðHU‘¨}HT‘Ø{aÚÅX„ ‘HU‘˜~aøÅݦ'‘HUvHT1bÆ;‘HUvaCƧ]‘HU‘€}HT‘Ø{aŒÆݦz‘HUsHT0a§Æv‘‘HU1aÔÆ§±‘HUsHT‘Ø{aÇݦΑHUsHT0a8Çvå‘HU1aeǧ’HUsHT‘Ø{a¦Çv’HU0VÁÇjaÞÇš@’HU2aÈZƒ]’HTvHQ0bAÈq’HUva{ÈJ‹’HU‘Ø{aMÊX„¥’HU‘~acÊݦ’HU}HT0b€ÊÖ’HU}a‹Ê§ô’HU~HT|b©Ê“HU|a½ÊX„"“HU‘~aÖÊݦ?“HU|HT1bôÊS“HU|aÿʧq“HUHTsbË…“HUsa—ËoŸ“HU‘¨}aÙËo¹“HU‘€}aÌoÓ“HU‘ˆ~a]Ìoí“HU‘€~a’Ìo”HU~aÇÌo”HUaÍo5”HU}a=ÍoM”HUvaˆÍ®ª”Ha‘¨|ö)Hb‘°|ö)Hc‘¸|ö)Hd‘À|ö)He‘È|ö)Hf‘Ð|ö)Hg‘Ø|ö)HU0aÜÍìÊ”HU‘ø|HTsaÎvá”HU0a΂•HU‘è{HTsHQ|b9ΕHU|aFδ;•HU‘è{HTsa\ΚR•HU2aˆÎV@r•HU|HT‘¨|b¨Î†•HU|b Ïš•HUb*Ï®•HUsa÷Òò‡ì•HU ¸¿ HT‘¨|”HQ‘°|”HR 0¶ bÙ–HUbŠÛ–HU}bÚÛ(–HUvbÜ>–HU‘ð{bÜT–HU‘ˆ|b*Üh–HUsb:Ü~–HU‘˜|bKÜ’–HU|b²Ü¦–HUsb2ݼ–HU‘€|bZÝÒ–HU‘ø{bjÝè–HU‘Ø}bzÝþ–HU‘ |bŠÝ—HU~bšÝ(—HU‘è}bªÝ>—HU‘Ð~bºÝT—HU‘¸~bÊÝj—HU‘à}bÚÝ€—HU‘È~bêÝ–—HU‘¨~búݬ—HU‘À~b Þ—HU‘°~bÞØ—HU‘ ~b*Þî—HU‘˜~b:Þ˜HU‘~bJÞ˜HU‘¨}bZÞ0˜HU‘€}bjÞF˜HU‘ˆ~bzÞ\˜HU‘€~bŠÞr˜HU‘ø}bšÞˆ˜HU‘ð}bªÞž˜HU‘ø|b·Þ´˜HU‘è{bÊÞʘHU‘À}bÚÞÞ˜HUsbêÞô˜HU‘È}búÞ ™HU‘Ð}bß ™HU‘¸}bß6™HU‘ˆ}b*ßJ™HUsb:ß`™HU‘˜}bJßv™HU‘}bWߌ™HU‘Ø|bjߢ™HU‘ð|bzß¶™HUsbŠßÌ™HU‘à|bšßâ™HU‘¸|b§ßø™HU‘À|bºßšHU‘È|bÊß"šHUsbÚß8šHU‘Ø{bêßNšHU‘à{bjìbšHUbŠìvšHU}bÔHUvbkúžšHUvblû²šHUvbšûÆšHU|V·û«aÒûX„ëšHU}bïûÿšHU}aüš›HU2bþ,›HU‘à{bQ@›HU}a t®b›HU‘à{HT‘¸~b;x›HU‘ |bTŽ›HU‘€|bh¤›HU‘¸|bw¸›HUaZƒÛ›HUHTvHQ0bœï›HUvb¬œHUaèX„œHU‘¸~a< š4œHU4aŒ ZƒWœHUHT}HQ0aç X„qœHU‘¸~a3!šˆœHU4a{!Zƒ«œHUHTvHQ0bÈ!¿œHU~bæ!ÓœHUbò!çœHUvað%šþœHU3bó)HU~b*&HUb*:HU}a#.šQHU3a:4šhHU3VmHðVÔIðV2KðVLðVïMðVQOðV³PðV RðbÃ_æHU‘ |aÚ_ÛÒžHU‘ø|aO`´"žHU‘è{HT‘€|av`´DžHU‘è{HT‘¨|V˜`«aÂ`X„kžHU‘Ø{a%at®žHU‘Ø{HT‘€|bYa¡žHUvVoa«aaX„ÆžHUsbµaÚžHUsaèat®üžHU‘Ø{HT‘¨|bbŸHU|b¤b&ŸHU‘è{a¸b-@ŸHU‘ |aòbݦ]ŸHUsHT0aIcݦzŸHUsHT0Vc«aÄcX„¡ŸHU‘Ø{adßHU‘ˆ}HT‘ }a_dt®åŸHU‘Ø{HT‘à{a×d HU‘ }HT‘ˆ}aIf' HU‘Ø{HTvbf; HUvaÎf[ HU‘€|HTsbôfo HUsa5gv† HU1aegv HU1a³gš´ HU2aègZƒÑ HTsHQ0b hå HUsa9hJý HUvb…h¡HUvaSiݦ0¡HU‘ˆ}HT0ati{R¡HU‘à}HT‘ð|a‹i§p¡HUHT|b§i„¡HUb¹i˜¡HU|aÒio°¡HU}bÿiÄ¡HU}ajݦã¡HU‘ˆ}HT1a2j{¢HU‘à}HT‘è|aIj§#¢HU}HT|bfj7¢HU}bxjK¢HU|a‘joc¢HUbÃjw¢HUaÎjŽ“¢Ha‘°|ö)aîjX„­¢HU‘~akݦʢHU|HT0b"kÞ¢HU|a-k§ü¢HUHT}bKk£HUb\k$£HU}ajkŽ@£Ha‘ø|ö)aŠkX„Z£HU‘~a¨kݦw£HUsHT1bÔk£HU‘Ø{aßk§«£HU}HTbþk¿£HU}blÓ£HUaLlvê£HU0atl-¤HU‘ð{V†lÁaœlš(¤HU1a½lZƒE¤HT|HQ0bÛlY¤HU|amJq¤HUa¥m´‘¤HU‘ø}HT}aÊmo©¤HUbüm½¤HUa n´ݤHU‘ð}HT}a1noõ¤HUbcn ¥HUarn™¥!¥HU}aŽn´A¥HU‘ø}HTvb«nU¥HUvaÄnom¥HUbön¥HUao™¥™¥HU}a!o´¹¥HU‘ð}HTb=oÍ¥HUaVooå¥HUvb‰où¥HUva©oo¦HU‘è{aëoo-¦HU‘Ø{aEp®Š¦Ha‘€}ö)Hb‘¨}ö)Hc‘¸}ö)Hd‘à}ö)He‘°|ö)Hf‘ø|ö)Hg‘à~ö)HU1axp쪦HU‘à{HTV0rðVÝrðVbsðVµuðVÃxðVAzðb9{ §HU|aC{ÛÒ&§HU‘à{Vê{«a|X„K§HUb!|_§HUa>|t®}§HU}HT~b_|‘§HUsVk|«a†|X„¶§HU}b£|ʧHU}aÀ|t®è§HUHTvbã|ü§HU|a}§¨HU‘¸|HT‘À|a.}·¤6¨HUbJ}J¨HUaH~Žf¨Ha‘ø{ö)a^~š}¨HU3aŒ~ì¨HU‘ |HTb¥~±¨HUV±~«aÌ~X„Ö¨HU|bê~ê¨HU|aù~ ©HU‘¸|HT‘À|a"t®*©HUHT|b@>©HU|bPR©HUa`ìr©HU‘à|HTsbu†©HUsa;š©HU2afZƒÂ©HU‘°|HT}HQ0b™Ö©HU}aŽší©HU2a:ŽZƒªHU|HTsHQ0b\Ž$ªHUsa_š;ªHU2a„Zƒ^ªHUsHT}HQ0b§rªHU}G7˜‘ð~‹ªHU|b„˜ŸªHUV¨¢ðVئðbº§ͪHUsaÙ§ìíªHUsHT‘}aû§ì«HU‘à|V ¨Áa;¨š+«HU1aa¨ZƒH«HTvHQ0bƒ¨\«HUva³¨Jt«HUsbþ¨ˆ«HUsaÉ©´ª«HU‘ |HT‘à}a «™¥Ä«HU‘à}a#«´ä«HU‘ |HT|bA«ø«HU|a•¬´¬HU‘à|HT‘à}aº¬o2¬HUsbæ¬F¬HUsaú¬™¥`¬HU‘à}a­´€¬HU‘à|HTsb2­”¬HUsaK­o¬¬HUbw­À¬HUVƒ­«a¢­Žõ¬Ha‘ø{ö)ô)à?aÀ­§­HU‘Ø{HT‘ð|aÞ­§9­HU‘à{HT‘è|aý­Ža­Ha‘ˆ|ö)ô)à?a'®šx­HU;a´®Zƒ­HUsHT‘ø{HQ0bÕ®³­HU‘ø{bå®Ç­HUsaõ®ìç­HU‘Ø}HTb ¯û­HUa±š®HU<V¿²ðVݵðbJ¾@®HUva^¾šW®HU2G À‘ð~r®HU‘è{G%Ä‘Ø~®HU‘ˆ|aÉÓš¤®HU2aùÓZƒÇ®HU|HTsHQ0b4ÔÛ®HUsV®Û«a×ÛZƒ¯HU‘Ø{HQ0aÜ×Å0¯HUvHT0HQ0p÷<0b.ÜD¯HUvaß-^¯HU‘Ø|aèàšu¯HU2aáZƒ˜¯HU|HTvHQ0bGᬯHUvaÞæšïHU2açZƒæ¯HUvHTsHQ0bAçú¯HUsG8ô‘˜|°HU‘ |aÐøt®5°HU‘à{HTvbùI°HUvb)ù]°HUsb‰üq°HU|b¶ü‡°HU‘€|a þõ?Ÿ°HUvbг°HUsbwǰHU|bšÛ°HUvaZõ?õ°HU‘à{bE  ±HUsaà t®+±HU‘à{HT‘€|aLõ?C±HUva¶#t®e±HU‘à{HT‘€|Yù&õ?HUv] a`Ï80²L]aŽULQa²ULEa²UL9aÖUL-aúUT`Ï8Mia&VMuaJVY˜ÏfHT x¿ HQ [ª HR Sª HX7HY Ÿª a·Ïò‡b²HU ¸¿ HQ·HR 0¶ VSû¦ 퀲” 3²”62ù#3³9]ù#3? $;ôBú#]5;wû#3;#ý#p;zþ#Y;~ÿ#p<8gen $ 66p(§ 3´9M7§ 39Q§ 3?,© ? ž ;§q¨ 3;J© 3;œª 3;]« 3;w¬ 3;Ás® );Ës¯ 3;Õs° 2;ßs± 3;és² 3;ós³ 3;ýs´ 3;tµ 3;t¶ 3;¾T· 3;ÉT¸ p;#¹ p;zº Y;~» p:/´8tmpé 3:O´;Ÿ$ 3<8tmp 3:o´;Ÿ$ 3<8tmp" 3:´;Ÿ$< 3<8tmp? 3:¡´8tmpR 3:³´8tmpi 3<8tmps 36E`ïO)µ7objïO3CbadP;ŒOðO38nbôOé:µ;ÌbP3<;59P)6Ä9$3µ9]$3? ¨$;ôB$Cx;w‘$3;#“$p;z”$Y;~•$p<8gen¡$ 6J!¬#3À@ÕIœéËQ]¬#3vVQ)o¬#3WQGd¬#3ñWj‰Rè#ÍAj°tä#±Vj÷â#pVRÅB­#3áX;ñQ®#pRC¯#) [R#°#pµ^Rz±#Y•_R~²#p`{w³#3SP_*½zÌf·#éË àþ)z+G¸#ùË‘€S `ظRTEº#2€aRÑJ»#º"ña] a?x9Ð#‡·L]aMbLQaqbLEaqbL9a•bL-a¹bT?x9MiaåbMua cYxxfHT x¿ HQ à¿ HR Sª HX3HY Ÿª ] aSã9Ë#<¸L]a5cLQaYcLEaYcL9a5cL-a}cTSã9Mia©cMuaÍcYŒãfHT x¿ HQ à¿ HR Sª HX3HY Ÿª aÏ^!T¸HUvaö^Úl¸HUva_Ú„¸HUva:_Úœ¸HUvY|_À¡HUvHT àþ)HQ‘€HR|HX à¿ Zk7SAp`Þ#½L|7ùc\p`s†7@`iŽ7M–7ŽdM¢7eM®7e_mAJ¹M¿7¤eS0a4ºMß7Çe_Ðw{¹M8f_àw(š¹M48%f_x¹¹Mð7Hf_x'عM8fT`0MÐ8¤f_'`ºMÝ8ÇfV2`ðY`HUsS`aå¼L|7ëf\`ai†7iŽ7k–7k¢7k®7\`akí8kù8ZίŽ_àa»YA»L߯ëf\àaMé¯GgMó¯}gMÿ¯'ha­_fÓºHT x» b¾_çºHUsaOÆÿÿºHUsaÞ4 »HUsVìDðY ErHT –© Zk7zÆ@b½YÒ¼L|7¿h\@bs†7|XiŽ7M–7.iM¢7}iM®7}i_‘Ƴ»M¿7ÉiS°b¼Mß7ìi_NX ä»Mð7;j_ZX"¼M8vj_©X!"¼M48™j_åX A¼M8¼jT¿k4MÐ8àj_Ök‡¼MÝ8kVåkðYÇkHUsa’Xr¼¼HT ¨» Yûkp²HUsN¸ÆHUsYV`rHT ¨» V«AoVÅ_ðVe`ðZ:FÍAcé#óÊLKF'kLoF?l^cFLWFÁo\cs{FyxsƒF‰¢s‹FaÓs“F:Bs›Fpws£F…Os«Fû$s³FZ?s»F+•sÃFHsËF‰QsÓFg] sÛFžÕsãFÃæsëF`esóF)o sûFHsGÔPs G‡ŠsGeiGs#G2Es+GJi3Gs;G~>sCG˜ÜsKGJsSGƒqs[GHscGHskGHisGs{GùèsƒGHs‹Gt.s“G‹þs›GÒ•M£GýpM¯GsM»Gr‚MÇG"ŒMÓGè¨MßGÙµMëGðÃM÷GYÈMHÂÌMH+ÑMHzÑM'HÉÑM3HÒM?HëÛMKH¸ÜMWH”éMcH"êMoHqêM{H´îM‡H‰ñM“H^ôMŸH%M«H M·HaMÃH9MÏH)MÛH”<MçHêSMóH³iMÿHsuM IùwMIÚ|M#I¾ŠM/I·’M;IšMGIŠ›MSIã¢M_I<ªMkI ´MwI¾MƒIjÆMImÎM›ISØM§I½àM³IœæM¿IÃïMËIkùM×I;MãI3 MïIuMûI‰MJäMJ-MJè/M+Jm4M7JÃ7MCJ=MOJòBM[J HMgJ LMsJLOMJµRM‹JœVM—J…ZM£J˜^M¯JÕbM»JXuMÇJ€yMÓJ¯MßJ‡MëJüM÷J«—MK#œMKô MKÅ¥M'KC©M3KجM?KP°MKKw³MWKG¶McK¹MoK´ºM{KïÓM‡K´ÔM“K@äqŸK‘°~M«K‘7q·K‘¸~qÃK‘À~MÏK9qÛK‘È~qçK‘Ð~qóK‘Ø~qÿK‘à~M LfFMLwTM#LðdM/Luq;L‘è~MGLJ‚MSL$†M_L+‡MkL\ŸMwL¯MƒL3ºMLvÏM›L;ìM§L.ùk³LM¿LýþMËL< M×L  MãLê& MïL\. MûL_3 MMµ7 MMy< Z²ÇBàcÕ%TÄL¡²Î@ \àcs­² ‰Mµ²0A MÁ²ŒA MͲLF MÙ²K Må²bK S0dñÃMò²$P a&C«€àÃHT PoHQsNj†HUsaéBF;ÄHQ0a½‰ò‡BÄHU À HT $HQ +HR 0¶ N͉HUsZZƒbCpdÜ%)ÅLƒƒ•P LwƒõP LkƒQQ \pdMŽƒ­Q MšƒúQ b£C½ÄHUsHT}HQ0aí©×àÄHUsHT}HQ0a|²äÿÄHU pµ VõÂðYÃrHT µ ZÍ?óCÐdê%oÅLÞ?VR \ÐdMè? R Y™tÈHUwZÍ?„De&´ÅLÞ?ýR \eMè?FS Y˜¯ÈHU}ZX„ƒ´Pe&ûÅLu„£S Li„"T \PeM„kT V7_üZ üHU‘ØyS€fÇMHM„V \°fkUMZt®Ï¶àfi&ÈL‘®ÍV L…®ÎLD7è| Y° fHT ½ ZQ7 w8'€ÎL^7} YÁ fHT x¸ HQ3NØÏHU}_þð;ÛÎM^NB} Tñ*MkNe} N4ñHUsS@wÐMœNˆ} Z°:'Ó`xÂ'8ÏLÍ:_~ LÁ:—~ V5ÓòYŽÜb˜HT2Z77ÁÜxÉ'uÏLD7Í~ YÿÜfHT ½ aÆÒJÏHU}bëÒ¡ÏHU}GûÒv¸ÏHUsGÓvÏÏHUsG'ÓvæÏHUsbMÓúÏHUsb¨ÜÐHUsV¹ÜòSyÇÐM~N MŠNL Z77pëÀy¤'tÐLD7Ð Y«ëfHT ½ ZQ7"ùðy£'¶ÐL^7€ YFùfHT x¸ HQ2N)ëHU}S zìÐM®N*€ N/ÙHU‘ø|SpzÑMÀNy€ NfÙHU‘°{S zKÑM$Mî€ V[DðV{D1V›€~S{nÑM6M7 NÿHUsZX„ŵ0{O&êÑLu„¹ Li„‚ \0{M„d‚ bïµ¼ÑHU‘Øyb‹JÒÑHU‘ØyYŠnüHU‘ØyZÍ?ûµ€{Q&+Ò^Þ?\€{Mè?Ê‚ YxüÈHU}ZX„2ÐÀ{ò'§ÒLu„'ƒ Li„pƒ \À{M„Òƒ b\ÐyÒHU‘Øybà²ÒHU‘ØyY[`üHU‘ØyZX„pÐ|ô'ÓLu„8„ Li„„ \|M„Ê„ b“ÐóÒHUvbÊÓHUvY:ƒüHUvS`|KÓMäN'… \|kñNNëWHUsZt®ÑÀ|(=ÔL‘®p… L…®ß… Zž®#ÑP}—P"ÔL»®† L¯®q† \P}MÇ®”† MÓ®ð† Mß®9‡ bVÑÙÓHUvHT}aóêäøÓHU pµ V\"ðYÿ$rHT µ Y©ƒ­HUvHT}Zì“ÑÀ} (œÔL ‚•‡ Lýˇ \À}M‚ˆ M‚ˆ Yä¤HU‘¨{HT~ZìõÑ~(ýÔL ‚ň Lýÿˆ \~M‚9‰ M‚s‰ Y+ð¤HU‘ÈyHT‘ØyZ«q0~õ%ZÕL«©‰ \0~M"«ß‰ aqÚDÕHTsYTÒŠ@HUsZZƒ'qp~÷%1ÖLƒƒ)Š Lwƒ‰Š LkƒøŠ \p~MŽƒk‹ Mšƒ¡‹ btqÄÕHUwHTvHQ0awÝ×èÕHUwHTvHQ0aDçäÖHU pµ Vz ðYdrHT µ ZoFF…1×LÎoŒ LÚoŒ LæoHŒ LÂo€Œ L¶oÀŒ LªoüŒ Lžo2 \kòo\qp‘ð~qp‘ø~a†“!ÃÖHU‘°ya±“QõÖHU‘°yHT‘˜zHQ‘zHR‘ˆzY ÊrHT ¸À S6×MÄUl N]HUsSÀY×MÖUÛ NlHUvZÍ?iRð³1ž×LÞ?$Ž \ðMè?ZŽ Y=ÈHU}ZÍ?šF@€¹*ä×LÞ?­Ž \@€Mè?åŽ Y›ìÈHUwSp€÷×MZQC S €ØMlQy Np)HUsSЀ=ØM~Q˜ N:/HUsZZƒÑGñ*ÙLƒƒ‘ Lwƒ’ Lkƒp’ \MŽƒß’ Mšƒ>“ bH¦ØHUsHT~HQ0a1q×ÉØHUsHT~HQ0a–‹äèØHU pµ V£ðYæ¤rHT µ SpLÙMQ­“ VÐ’ðVð’1V¸1 ~Sà‰ÚMÀQö“ Z°:ÒIPƒC+©ÙLÍ:õ” LÁ:-• VàIòYq3 b˜HT2Z77›q€ƒJ+æÙLD7c• YßqfHT ½ atIJþÙHUsG¦IsÚHU}G¼Is,ÚHU}GÒIsCÚHU}bùIWÚHU}bskÚHUsV“qòN!uHU}Sðƒ4ÛM¢Q™• M®QG– Z779¡…%+áÚLD7 — Yz¡fHT ½ ZQ7ÙRP…$+#ÛL^7-— YSfHT x¸ HQ2Nª:HUsS …WÛMÒQQ— N–@HUvSà…zÛMäQ¼š NBHU|Z«‹J0†h+×ÛL«%ž \0†M"«[ž ašJÚÁÛHTvYØöŠ@HUvZX„²Jp†j+MÜLu„¤ž Li„íž \p†M„6Ÿ bÕJ#ÜHUsbÈö7ÜHUsYcøüHUsZX„ëJÀ†m+ÉÜLu„“Ÿ Li„ÜŸ \À†M„+  b!K›ÜHU‘ yb6ê±ÜHU‘ yYÌÉüHU‘ yZX„5K‡o+?ÝLu„Œ  Li„Õ  \‡M„¡ bXKÝHUsbÉ)ÝHUsY@øüHUsZ üHUsZW§>(ILu„§ Li„& \§M„o baW3HU}Y­BüHU}SP§wMO¸ \€§kONœùHUvZõ?œW°§O(õL@ Zž®¿W0¨çTL»®J L¯®‚ \0¨MÇ®¥ kÓ®Mß®Û bñW÷HUvHT0Yæ:äHU pµ \`¨L@ [ZƒñWШêTLƒƒG Lwƒ Lkƒµ \ШMŽƒë MšƒG bÔx‡HUvHT}HQ0V @ðaxBr³HT µ aÇòäÒHU pµ Yáò×HUvHT}HQ0SP©MÄO} NæËHUsS€«uM†O0 q’O‘€S@¬VMŸOñ NÛ‹HUvZ°:ÿ‹p¬ )¡LÍ:: LÁ:r V ŒòYºkb˜HT7Z77xe ¬)LD7¨ Y±efHT ½ HQsHRŸª £¨ s1.(a±‹JHU}bÿ‹/HUvVpeòb\›PHU}bÃædHUvNÔRHUvSଠMhOË MtO: Z77Èù ­Ö(ÍLD7å YúfHT ½ ZQ7Ìbð­Õ(L^7! YöbfHT x¸ HQ7N†™HU}Z«—Š0®Å(}L«,! \0®M"«b! a¦ŠÚgHTsYÉÕŠ@HUsZX„¶Šp®Ç(óLu„«! Li„ô! \p®M„P" bÙŠÉHU}biàÝHU}Y”ÊüHU}SÀ®M²O®" NÌHUsS`´9MÖOß) NõËHUsS·\MèO_- NÌHUsZÍ?bŽ€º.)£LÞ?2 \€ºMè?g2 YåÆÈHU‘ ySÀºÆMúO§2 N-ÐHUsZX„ÝŽ»C)BLu„99 Li„‚9 \»M„ä9 bHU‘¨ybÉ7*HU‘¨yY%üHU‘¨ySP»pM PJ: \€»kPN4îHUvZt®b°»P)bL‘®“: L…®; Zž®@¼—PGL»®8; L¯®”; \@¼MÇ®·; MÓ®< Mß®< b²þHUsHT}a/OäHU pµ V2YðY\rHT µ Y°­HUsHT}S°¼…M,Pù< N£ãHUsZX„+ð¼Y) Lu„Ç> Li„? \ð¼M„r? b[ÓHU‘ðyb&DéHU‘ðyY_üHU‘ðyS@½/ M>PØ? \p½kKPNÿHUvZt®Â ½f)! L‘®!@ L…®@ Zž®ß0¾—P L»®Æ@ L¯®"A \0¾MÇ®EA MÓ®¡A Mß®B b‘½ HUsHT}aÍ_äÜ HU pµ VÆ€ðY™ƒrHT µ YJ/­HUsHT}S ¾D M^P_B NüöHUsZX„Ž‘à¾o)À Lu„ŽF Li„×F \à¾M„9G b¾‘’ HU‘ˆzb=E¨ HU‘ˆzY—}üHU‘ˆzS0¿î MpPŸG \`¿k}PNÑ!HUvZt®%’¿|)à L‘®èG L…®WH Zž®B’ À—PÅ L»®H L¯®éH \ ÀMÇ® I MÓ®hI Mß®ÊI bu’| HUsHT}a}{ä› HU pµ Vv­ðY9°rHT µ Yë7­HUsHT}SÀ MP&J NùHUsZ«ø’ÐÀ)` L«ÐL \ÐÀM"«M a“ÚJ HTsY9UŠ@HUsZÿ M¢P£P TuÂ,k¯PNœÂHUvZZƒ”@Á½)Ô LƒƒÆP Lwƒ&Q Lkƒ•Q \@ÁMŽƒR MšƒMR bÑ”h HUvHTsHQ0aø¤×‹ HUvHTsHQ0aŸÍäª HU pµ V­ÞðY]árHT µ SÀÁMàP–R Z°:—•ÐÂè)1LÍ:mS LÁ:¥S V¥•òYŸ6 b˜HT2Z77£xÃï)nLD7ÛS YçxfHT ½ a6•J†HU}b[•šHU}Gk•s±HUvG•sÈHUvG—•sßHUvb¾•óHUvbŠxHUvV›xòSpÃÀMÂPT MÎPmT Z77˜Ó`ÄÊ)mLD7U YÖÓfHT ½ ZQ7„°ÄÉ)¯L^7(U Y©„fHT x¸ HQ2NÏàHU}SðÄåMòPLU NÿTHU‘ø|SPÅ MQØU NÕSHU‘°{SÅ/MQuV NëSHU‘èyZõ?$ÿðÅS)¾L@ÂV Zž®=ÿ°ÆçTÝL»®HW L¯®€W \°ÆMÇ®ÍW MÓ®X Mß®cX boÿ³HUvHT0V“ÿðYŠ äHU pµ \ÇL@™X [Zƒ{˜€ÇêTLƒƒâX Lwƒ.Y LkƒwY \€ÇMŽƒÀY Mšƒ Z a‘˜rPHT µ bŽÐoHUvHT}HQ0Væ. ða®3 ä›HU pµ YÈ3 ×HUvHT}HQ0Zõ?ˆÈi)ML@RZ Zž®¡ÐÈçTlL»®ØZ L¯®[ \ÐÈMÇ®][ MÓ®“[ Mß®Ë[ bÓBHUvHT0V÷ðYOäHU pµ \ ÉL@\ [Zƒp› ÉêTLƒƒJ\ Lwƒ‚\ LkƒË\ \ ÉMŽƒ] Mšƒ]] a†›rßHT µ búéþHUvHT}HQ0VFgða jä*HU pµ Y&j×HUvHT}HQ0Zõ?,0Ê)àL@¦] Zž®),ðÊçTûL»®,^ L¯®d^ \ðÊMÇ®±^ MÓ®ç^ Mß®_ b[,ÑHUvHT0V,ðYJVäHU pµ \@ËL@U_ [Zƒ°ÂÀËêTLƒƒž_ LwƒÖ_ Lkƒ` \ÀËMŽƒh` Mšƒ±` aÆÂrnHT µ b‘êHUvHT}HQ0aïlä¬HU pµ a m×ÏHUvHT}HQ0V»oðSPÌM(Qú` NÛ7HUsZX„ Ê€Ì-*yLu„b Li„Mb \€ÌM„–b b/ÊOHU~b ‰cHU~YZxüHU~ZZƒ;ÊÐÌ/*NLƒƒôb Lwƒhc Lkƒ×c \ÐÌMŽƒFd Mšƒd bƒÊâHU}HTvHQ0a¡§äHU pµ a¤ª×$HU}HTvHQ0V¦ÊðYŽÍrHT µ Zì·ÊPÍ;*¯L ‚þd Lý8e \PÍM‚…e M‚çe YIž¤HU‘ÈyHT‘ØyZìËÍD* ^ ‚Lýf \ÍM‚Wf M‚‘f YÄФHU‘¨{HT‘}SÀÍFM$OÇf V^ðV4^1Vg~SÎiM6Og NR‰HUsZX„¶YpÒ—(åLu„¥g Li„îg \pÒM„Ph bìY·HU‘Øybk§ÍHU‘ØyYŠBüHU‘ØySÀÒMHO¶h \ÓMUOqi Nº™HU}Zt®CZ@Ó¤( L‘®ºi L…®)j Zž®`Z Ó—PîL»®˜j L¯®ôj \ ÓMÇ®vk MÓ®Òk Mß®l b”Z¥HU~HTva{ÃäÄHU pµ V,ÌðYÖÎrHT µ Y[š­HUsHTvZ3ràZðÓ«(LZrwl LOrÿl LDrvm S`ÔMkrøm MwrEn Mƒr}n T(Mr³n YRHUs$\°ÔMŸrÖn M«ro ZÍ?~ðÔ]VìLÞ?mo \ðÔMè?¶o Y€ùÈHU|a~° HUsHQ2Ng~HU|Zì<[@ÕZ*|L ‚öo Lý0p \@ÕM‚jp M‚Hr Y[ؤHU‘ÈyHT‘ØyZ«[pÕc*ÙL«~r \pÕM"«´r aŸ[ÚÃHTsYæÚŠ@HUsZX„¯[°Õe*OLu„ýr Li„Fs \°ÕM„¢s bÒ[%HU}bÉð9HU}Y6ûüHU}ZX„ñ[Öh*ÅLu„t Li„It \ÖM„’t b\›HUsbêö¯HUsY±æüHUsZX„*\PÖk*;Lu„ðt Li„9u \PÖM„‚u bY\HU}bO%HU}YÛæüHU}S ÖiM:Qàu \ÐÖkGQNôÎHUsZZƒæ\ׂ*>Lƒƒˆv Lwƒüv Lkƒkw \×MŽƒÚw Mšƒ#x b(]ÒHUvHTsHQ0a‚)×õHUvHTsHQ0a:2äHU pµ V;ðY³=rHT µ Zìl]`ׇ*L ‚’x LýÈx \`×M‚y M‚wy Yl$¤HU‘¨{HTsZt®´Ï ×y*“L‘®­y L…®&z Zž®ÍÏØ—PvL»®\z L¯®«z \ØMÇ®Îz MÓ®*{ Mß®s{ bÐ-HUsHT‘ØyaŽíäLHU pµ V ðY¹ rHT µ YTi­HUsHT‘ØyZ«÷‰Pز(ðL«Ï{ \PØM"«| aŠÚÚHTvYç Š@HUvZX„ŠØ´(fLu„N| Li„—| \ØM„à| bAŠ<HUsb&PHUsY üHUsZ•EWŠàØ·(½L¾E>} L²Ev} L¦E¿} \àØMÉEâ} YrŠ^HU}Zõ?à™ Ù§(P!L@~ Zž®ù™ ÙçTo L»®­~ L¯®ù~ \ ÙMÇ®B MÓ®‹ Mß®Ô b+šA HUvHT0aÄ=ä` HU pµ VÝGð\àÙL@€ [Zƒàð0ÚêTLƒƒf€ Lwƒ²€ Lkƒû€ \0ÚMŽƒD Mšƒz b$ñâ HU}HTvHQ0V=ñðaæór!HT µ a¾êä-!HU pµ Yãý×HU}HTvHQ0Zt®ý¬ÚL(B"L‘®Ã L…®‚ Zž®­ðÚ—P'"L»®U‚ L¯®ž‚ \ðÚMÇ®Á‚ MÓ® ƒ Mß®Sƒ bL­Þ!HUsHT}a%Ãäý!HU pµ V¸ËðY×ËrHT µ Y‹­­HUsHT}Zµ×+0ÛÜ1M#L0µœƒ \0Ûs<µâI MDµëƒ MPµG„ M\µ … MhµÑ… Mtµ%† SpÛê"Mµë† a),«€Ù"HT àJHQsNo HUsaì+€;#HQ0aÿI ò‡;#HU À HT ¡$HQ ¨HR 0¶ NJ HUsS°Ûp#MèU\‡ N>> HUs_2† &º#MúU¥‡ T@† MVȇ NX† HUsSðÛß#MVë‡ N¥3HU‘¨}_õ‚ &)$M,Vyˆ Tƒ M9V¯ˆ Nƒ HUvS ÜN$MLVåˆ N5HU‘¨ySPÜŒ$M^V™Š Tâ MkVõŠ Nó HU}Sܱ$M~V>‹ N¯6HU‘ y_¿78â$MV_Œ N÷7HU‘ÈzSÀÜ%M¢V¿ N'9HU‘èz_m9%A%M´VËŽ Tz9MÁV _ :%{%MÔV$ T­:MáVm _8v Hº%MW \ðÜM%W³ Nkv HUw_ %ô%M†_ý TM“_3 S0Ý&M¦_V NYPHU‘ˆ{S`ÝS&M8Wº VÖq ðVöq 1V\u ~S°Ýœ'MhW‘ Z°:?0Þ 4°&LÍ:Æ‘ LÁ:þ‘ V?òY!•b˜HT2Z77]•`Þ4í&LD74’ Y¡•fHT ½ aŸ>J'HU}b¾>'HU}GÕ>s2'HU‘ˆyGí>sK'HU‘ˆyG?sd'HU‘ˆybJ?x'HUsbP•Ž'HU‘ˆyVU•òS°ÞG(MJWj’ MVW³’ Z77~r ßë3ô'LD7$“ Y¿r fHT ½ ZQ7²s `ßê36(L^7Z“ YÜs fHT x¸ HQ2N¼q HU}S ßj(MzW~“ N?HU|SÐß(MŒWu” N²?HU_Ö?¼(MžW”• Nì?HUvSàá(M°Wú– N(@HU‘¸y_b›&+)MÂW^— To›MÏW§— Nˆ›HUvS`ÿP)MâWð— NgEHU‘ˆ~SÿŽ)MôWÒ˜ T ˜MX.™ N˜HU~SÐÿ³)MXw™ NëFHU‘ yZÍ?]G5ø)LÞ?ºœ \Mè?ðœ Y»ZÈHU~_ ¥<B*M&XC T¥*M3Xf NA¥HUsSPa*kFXNê¡HUsS€Ÿ*M°[‰ T%M½[Ò N5HUS°Ó*MÐ[ž \àMÝ[hž N©HU‘ y_V8+Mð[Æž \0Mý[üž NŽHUs_»%K+M\IŸ TÈM\’Ÿ _„>)‰+M~[µŸ \`M‹[íŸ N­>HUsS®+Mž[#  Nu HU‘ÀySÀÑ+M0\„¦ N‹"HUs_2;,MB\ª T+2*MO\8ª NP2HUsSð@,Mb\[ª Nâ$HU‘Àz_!,$Š,M¦\€ª T-,M³\¸ª NE,HUs_-)9È,MÆ\Ûª \ MÓ\« Nf)HUs_ý8;-Mt\^« T9*M\« N39HUsSP7-M”\¤« N 8HU‘ÀzS€k-MêXÉ« \°M÷X)¬ N6ZHU‘ˆyZÍ?-þ6²-LÞ?‡¬ \Mè?Á¬ YmWÈHU‘ˆyS0ä-M Y­ \`MYa­ NnVHUs_›Ä0.M*Y®­ NËÄHU‘¨y_àS)S.M[ÔÆ TjüMK[Ç NzüHU_fø9Î4M^[SÇ \ Mk[œÇ NŸøHUsZÍ?›0 q:5LÞ?È \0 Mè?ZÈ Yt ÈHUs_ê¾%]5MXX­È T÷¾MeXåÈ N¿HUsSp ‚5MxXÉ N«ªHU‘Ày_d¸%Ì5MŠXÏÊ Tq¸M—XË N‰¸HUsS  6MªX=Ë \Ð M·XˆË NM´HU‘øx_K¯5@6MÊXÕË \ M×XÌ N€¯HU‘˜y_GI9q6Mæ\“Ì N€IHU‘ØzS0 –6Mø\`Í NÅIHU‘àz_YKÅ6M ]BÎ NkKHU|S` è6M]eÎ NˆKHU}_m(27M.]ˆÎ T{M;]¾Î N•HU|S W7MN]ôÎ N.MHU‘ðyS •7M`];Ñ TÎMm]ªÑ NßHU}Sàº7M€]óÑ NÁNHU‘ yZÍ?3OË=ÿ7LÞ?Ø \Mè?KØ YÛÈHU}_FÈ=I8M’]žØ TWÈ,MŸ]ÁØ N~ÈHUvS`n8M²]äØ Nî‘HU‘¨yS¢8MÄ]ñÞ \ÀMÑ]'ß NJÇHU‘ˆy_%“9Ó8Mä]…ß N^“HU‘˜z_íÂ%9Mö]$á TúÂM^Zá NÃHUsS B9M^}á NS”HU‘øyZÍ?S”PR>‰9LÞ?2è \PMè?lè Y+•ÈHU‘ˆy_’Á=Ó9M(^Áè T£Á,M5^äè NÊÁHUvZÍ?$—€~>:LÞ?é \€Mè?=é Y´$ ÈHUsSÀJ:MH^é \ðMU^Ûé Nö" HUs_x˜9{:Mh^(ê N±˜HU‘¨z_Ú˜ª:Mz^Ëê Nê˜HU~_‹ %ô:MŒ^î T˜ M™^hî N° HUsS ;M¬^±î NšHUsZ>LÞ?âø \ "Mè?+ù YÁ¶ÈHUsZÍ?Ÿà"W?ƒ>LÞ?~ù \à"Mè?Çù YsµÈHUsZÍ?^ #)=È>LÞ?ú \ #Mè?Pú YÓ_ÈHUv_w 0ù>MW†ú NFw HU‘ˆy_‰w (?MôV«ú Nw HU~]ÖEœ~ 4è2v?LãEÎú Y¾~ fHT @½ HQ }ª Sp#›?M¸_úú N´S HU‘ z_éS Ê?MÊ_ü NþS HUsZÍ?þS  #.A@LÞ?Šü \ #Mè?Äü YÕT ÈHU‘€y_pY $K@MÜ_ý T|Y Mé_Oý SÐ#‰@Mü_rý T`V M `»ý NqV HU}S$ BM:`þ Z°:&] @$ÇAæ@LÍ:Ýþ LÁ:ÿ V4] òYÂp b˜HT3]77No 4ÎALALD7Kÿ Y‚o fHT ½ HQvHRŸª £¨ v1.(a¥\ JeAHUwbÜ\ zAHUwGì\ v‘AHUsGý\ v¨AHUsG] v¿AHUsG&] vÖAHUsbL] êAHUsb9o þAHUsVJo òSp$·BM`nÿ M(`. Z77†i °$¢AdBLD7¹ YÈi fHT ½ ZQ7Úl à$¡A¦BL^7ï Ym fHT x¸ HQ3NÕg HUs_g] æBML` N|] HU~_|] CM^` N“] HU|S%8CMp`Õ N°] HUZÍ?°] @%àACLÞ?£ \@%Mè?Ý YÑp ÈHU‘˜y_Þd %¹CM‚`2 Tëd M`h S€%ÞCM¢`‹ Nïe HU‘€yZÍ?^ À%B#DLÞ?Ø \À%Mè? Yq ÈHUs_^ %]DM´`a Tœ^ MÁ`— _U_ 'ŽDMÔ`º N|_ HU‘€yZÖEïc ð%BØDLãEô Yd fHT @½ HQ Šª _Ó_ )"EMæ`  Tì_ Mó`k Nü_ HU~ZÖEŸf &(BlELãE´ YÌf fHT @½ HQ Šª _&h (EMaà NNh HU‘èyZÖEòh `&UBçELãE Yi fHT @½ HQ Ù¨ ZÖE0j & A1FLãE1 YOj fHT @½ HQ Ù¨ ZÖEÖj À&÷1{FLãE] Yõj fHT @½ HQ Ù¨ a6B ;’FHQ0aKBv©FHU0a`BvÀFHU0auBv×FHU0aBvîFHU0a®BkGHUwaGCšGHU1aæC°=GHU‘¸{HQ4axD¼—cGHU‘¸{HQ1ps:0V7EjabE‚™GHUwHT‘}HQ‘}VoEjaàFv½GHU0VGjVWGja¡GšîGHU2aHJHHUwapJvHHU0aöKš5HHU2a Nt®SHHU}HTsa[N[qHHUvHTsbsN…HHUsa“OX„ŸHHU‘ ya¶OX„·HHUsbÒOËHHUsa.Pt®éHHUvHTsbOPýHHUsboPIHU}aýP°8IHU‘¸|HT‘à|HQ2bLQLIHUsa›QݦkIHU‘Ø{HT1aÁQݦŠIHU‘À{HT1açQݦ©IHU‘È{HT1aRšÀIHU3a‹XJÙIHUwaÁ\šðIHU2Gþ]‘€y JHUwaeò‡HJHU èÀ HT‘€}”HQ‘ˆ}”HR 0¶ bõp^JHU‘ya´q×ŇJHUsHT0HQ0p÷<0b¸w›JHU}bJy¯JHUvbZyÃJHU~bjyÙJHU‘ˆyb{yíJHU|bŠyKHU‘øxbšyKHUbªy-KHU‘ ybºyCKHU‘¨ybÊyYKHU‘èybÚyoKHU‘°{bêy…KHU‘Èybúy›KHU‘¨{b z±KHU‘à{bzÇKHU‘¸{b*zÝKHU‘Øyb:zóKHU‘à|bJzLHUsbWzLHU‘øybjz3LHU‘ˆ{bzzILHU‘€ybŠz_LHU‘˜ybªztLHUwbºzŠLHU‘Ø{bÊz LHU‘À{bÚz¶LHU‘È{bêzÌLHU‘è|búzâLHU‘ø|b {øLHU‘Ð{b{MHU‘ð|b*{$MHU‘ø{b:{:MHU‘°|bJ{PMHU‘¸zbZ{fMHU‘°zbj{|MHU‘È|bz{’MHU‘¸|bŠ{¨MHU‘€|bš{¾MHU‘è{bª{ÔMHU‘ð{bº{êMHU‘ |bÊ{NHU‘À|b×{NHU‘¨|bê{,NHU‘˜|bú{BNHU‘|b|XNHU‘ˆ|b|nNHU‘Ø|b*|„NHU‘Ð|b7|šNHU‘{bJ|°NHU‘˜{bZ|ÆNHU‘ zbg|ÜNHU‘°ybz|òNHU‘àybŠ|OHU‘Ðyb—|OHU‘Èzbª|4OHU‘èzbº|JOHU‘ {bÇ|`OHU‘ðzbÚ|vOHU‘øzbê|ŒOHU‘¸yb÷|¢OHU‘€{b }¸OHU‘zb}ÎOHU‘Àyb'}äOHU‘Ðzb:}úOHU‘˜zbJ}PHU‘¨zbW}&PHU‘€zbj}~HU‘zHT0aßÒ…V~HUsbûÒj~HUsa Óݦ‰~HU‘zHT1a)Ó…¡~HUsbOÓµ~HUsaaÓݦÔ~HU‘zHT2a}Ó…ì~HUsb™ÓHUsaÇÓšHU|aMÔZƒ;HUHTsHQ0bqÔOHUsbÔcHUa—ÔvzHU1a Õš‘HU2aBÕZƒ´HU|HTsHQ0b^ÕÈHUsbžÕÜHU~aÀÕìþHU‘èyHT‘€ya×f*€HT pÀ HQ vª aØt®H€HU~HTb Ø\€HUV«ÞX„VËÞ«aåÞŽ’€Ha‘À}ö)a ߎ®€Ha‘È}ö)a#ߎʀHa‘Ø}ö)aEßݦé€HU‘ÐyHT0a`ßݦHU‘ÐyHT1a}ßݦ'HU‘ÐyHT2a­ßš?HU|a3àZƒbHUHTsHQ0bWàvHUsbsàŠHUa}àv¡HU1aóàš¸HU2a(áZƒÛHU|HTsHQ0b@áïHUsaFât® ‚HU~HTaÀèPo‚Ha‘¸yö)Hb‘¨}ö)Hc‘ø}ö)Hd‘˜yö)He‘À}ö)Hf‘È}ö)Hg‘Ø}ö)Hh‘¸}ö)aÝèx‚HU‘èyHT~b飂HU~aDé¼—É‚HU‘€zHQ1ps:0b•éÝ‚HUsa»é3Çü‚HU‘Ð}HT1aÜéìƒHU‘˜yHTsbõé0ƒHUsa&êX„HƒHU~bLê\ƒHU~VXê«arꎅƒHa‘à}ö)a–ꎡƒHa‘è}ö)a²ê޽ƒHa‘€~ö)aÏêݦ܃HU‘zHT0aíêݦûƒHU‘zHT1aëݦ„HU‘zHT2aAëš2„HU|aÂëZƒU„HUHTsHQ0bÞëi„HUsbúë}„HUaìv”„HU1a}ìš«„HU2a¦ìZƒÎ„HUvHTsHQ0bÇìâ„HUsafît®…HU‘ yHTb‹î…HUamõ3Ç5…HU‘ zHT0aŽõìU…HU‘˜yHTsb§õi…HUsaàõX„…HUsbö•…HUsVö«a5ö޾…Ha‘¸yö)aOöŽÚ…Ha‘¨}ö)aiöŽö…Ha‘ø}ö)a‹öݦ†HU‘ÐyHT0aŸö…-†HUvb¾öA†HUvaÍöݦ`†HU‘ÐyHT1aáö…x†HUvb÷Œ†HUva÷ݦ«†HU‘ÐyHT2a#÷…ÆHUvbJ÷׆HUvaf÷šî†HU6aÑ÷Zƒ‡HUHTsHQ0bõ÷%‡HUsbø9‡HUaøvP‡HU1a©øšg‡HU2aÞøZƒŠ‡HU|HTsHQ0bûøž‡HUsaAút®¶‡HTbfúʇHUa„üšá‡HU7a‹¼—ˆHU‘ˆzHQ4ps:0b؈HUsVø «a ŽDˆHa‘À}ö)a< Ž`ˆHa‘È}ö)aV Ž|ˆHa‘Ø}ö)ax Ž˜ˆHa‘¸}ö)a¨ š¯ˆHU4a ZƒÒˆHUsHT~HQ0b) æˆHU~b9 úˆHUsa X„‰HU‘€yVº «VÜ «aö ŽJ‰Ha‘À}ö)a Žf‰Ha‘È}ö)a6 Ž‚‰Ha‘Ø}ö)aX ݦ¡‰HU‘ÐyHT0as ݦÀ‰HU‘ÐyHT1aŽ ݦ߉HU‘ÐyHT2a¶ šö‰HU6a ZƒŠHUHT‘ yHQ0b[ /ŠHUsbk CŠHUVw «a“ ŽlŠHa‘À}ö)a­ ŽˆŠHa‘È}ö)aÇ Ž¤ŠHa‘Ø}ö)aâ ݦÊHU‘zHT0aþ …ÛŠHUsbïŠHUsa.ݦ‹HU‘zHT1aJ…&‹HUsbn:‹HUsa€ݦY‹HU‘zHT2aœ…q‹HUsb¸…‹HUsaéš‹HUsa\ZƒÄ‹HU‘ yHT‘¨yHQ0bØ‹HUsb¸ì‹HUsaÂvŒHU2at®ŒHT‘ ybR1ŒHUsatvHŒHU1aêš_ŒHU2a$Zƒ‚ŒHU|HTsHQ0bE–ŒHUsa»츌HU‘èyHT‘€yaãfäŒHT pÀ HQ vª aÂt®üŒHTvbàHUva˜š'HU2aÆZƒJHUvHTsHQ0bÞ^HUsa?šuHU7a"P×Ha‘¸yö)Hb‘¨}ö)Hc‘ø}ö)Hd‘˜yö)He‘À}ö)Hf‘È}ö)Hg‘Ø}ö)Hh‘¸}ö)a3"x÷HU‘èyHTsbW" ŽHUsV¾"«aÝ"Ž4ŽHa‘¸yö)a#ŽPŽHa‘¨}ö)a##ŽlŽHa‘ø}ö)a?#ŽˆŽHa‘À}ö)a[#ޤŽHa‘È}ö)au#ŽÀŽHa‘Ø}ö)aŽ#ŽÜŽHa‘˜yö)aº#šôŽHUvaR$ZƒHUsHT‘ˆyHQ0b$/HU‘ˆyb$CHUsV%«V)%«aK%ŽyHa‘À}ö)am%Ž•Ha‘È}ö)a‰%ޱHa‘Ø}ö)a¦%ݦÐHU‘zHT0aº%…èHUbØ%üHUaê%ݦHU‘zHT1aþ%…3HUb&GHUa,&ݦfHU‘zHT2a@&…~HUb^&’HUaz&š©HU6aá&ZƒÌHUvHTsHQ0bý&àHUsb'ôHUva$'v ‘HU2a't®+‘HU‘˜yHTvb¡'?‘HUvaé'ì_‘HU‘øzHTsbþ's‘HUsap)šŠ‘HU2a¥)Zƒ­‘HU|HTsHQ0bÂ)Á‘HUsaO,šØ‘HU7VÚ5«aù5Ž’Ha‘¸yö)a6Ž’Ha‘¨}ö)a/6Ž9’Ha‘ø}ö)aH6ŽU’Ha‘˜yö)ab6Žq’Ha‘À}ö)a~6Ž’Ha‘È}ö)aš6Ž©’Ha‘Ø}ö)a¾6ŽÅ’Ha‘¸}ö)aô6šÝ’HUva7Zƒ“HUsHT}HQ0b´7“HU}bÄ7(“HUsa·>š?“HU5a(KšV“HU2aWKZƒy“HUvHT~HQ0byK“HU~a©Lš¤“HU2aÛLZƒÇ“HUvHTsHQ0bóLÛ“HUsaTšò“HU3axVš ”HU3VWðV\ðaÉ]Ž?”Ha‘€~ö)aí]°b”HUsHT|HQ2b^v”HUsbY^Š”HUvVà^ðb‚r«”HUsa`tt®Ã”HT}b‚t×”HU}Vþt«a!uX„ü”HUsbEu•HUsaLuv'•HU0Vlu«a‡uX„L•HU}b¤u`•HU}V©ujaÉu‚•HU}HQ‘ yaãuZƒ«•HUvHQ}bv¿•HUvbvÓ•HU}a!vÿë•HUsb=vÿ•HUsaQv9–HU}bqv+–HU}V•v«a°vX„P–HU}bÕvd–HU}aóvš{–HU1Vwja(w‚¨–HU}HQ‘ ya>wZƒÌ–HU|HTvHQ}bdwà–HU|bwô–HUvb’w—HU}aw[&—HUHTsb±w:—HUsaó„t®X—HU~HTb…l—HUV…«aÀ…X„‘—HUsbÜ…¥—HUsaã…v¼—HU0V†«a(†X„á—HUsbL†õ—HUsVQ†jay†‚"˜HUsHQ‘ ya“†Zƒ@˜HU|HQsb±†T˜HU|b͆h˜HUsaÕ†ÿ€˜HUvbú†”˜HUva‡9¬˜HUsb!‡À˜HUsVQ‡«at‡X„å˜HUsb‡ù˜HUsa¶‡š™HU1VÓ‡jaû‡‚=™HUsHQ‘ yaˆZƒa™HUvHT|HQsb6ˆu™HUvbHˆ‰™HU|bdˆ™HUsa}ˆ[½™HU‘ˆyHT~b‘ˆÑ™HU~a–t®ñ™HU}HT‘ˆybG–šHUsbd–šHU}V–«aÝ–X„>šHU}b—RšHU}a —višHU0V#—«aF—X„ŽšHUsbj—¢šHUsVo—ja——‚ÏšHUsHQ‘ ya±—ZƒíšHU|HQsb×—›HU|bó—›HUsaû—ÿ-›HUvb ˜A›HUva4˜9Y›HUsbS˜m›HUsVƒ˜«a¦˜X„’›HUsbʘ¦›HUsa𘚽›HU1V ™ja5™‚ê›HUsHQ‘ yaK™ZƒœHU~HT|HQsbg™"œHU~b…™6œHU|b¡™JœHUsa¸™[hœHU}HTvbÍ™|œHUva§§t®œœHU‘ˆyHT}bɧ°œHU}abªšÇœHU2a‹ªZƒêœHU|HTsHQ0b¨ªþœHUsV+®ða7Áš"HU2a}ÁZƒEHU|HTsHQ0bšÁYHUsV Åða•ך}HU2aÎ×Zƒ HUvHT}HQ0bô×´HU}Vþ×ðaríšØHU2a›íZƒûHU|HTsHQ0b¸ížHUsbc#žHUvb7žHUsb¹KžHUvb_žHU}b sžHU}a#r’žHT ؽ a9š©žHU2anZƒÌžHUvHTsHQ0b†àžHUsaéš÷žHU2a)ZƒŸHUsHT‘ˆyHQ0bf2ŸHU‘ˆyaŸšIŸHU2aÔZƒlŸHU~HTsHQ0bñ€ŸHUsV¤!ða0%—¨­ŸHU‘Ø{HT}bI%ÁŸHU}aY%—¨áŸHU‘À{HTsbq%õŸHUsa%Ž Ha‘ zö)a£%—¨1 HU‘È{HTsb»%E HUsaÍ%ݦd HU‘€|HT1añ%—¨„ HU‘€|HTsb &˜ HUsV!&«a<&ݦĠHU‘Ø{HT0aa&ݦã HU‘À{HT0a„&ݦ¡HU‘È{HT0aŸ&ݦ!¡HU‘€|HT0aÂ&{9¡HUsbæ&M¡HUsa'še¡HU|a'Zƒˆ¡HU}HTsHQ0bµ'œ¡HUsbÒ'°¡HU}a((X„Ê¡HU‘¨yV@(«ah(ݦö¡HU‘Ø{HT1a†(ݦ¢HU‘À{HT1a®(ݦ4¢HU‘È{HT1aÙ(ݦS¢HU‘Ø{HT1aü(ݦr¢HU‘Ø{HT0a)¢HUsHT|b7)¤¢HUsbU)¸¢HU|ag)ݦעHU‘À{HT1aŠ)ݦö¢HU‘À{HT0a©)£HUsHT|bÇ)(£HUsbå)<£HU|a÷)ݦ[£HU‘È{HT1a*ݦz£HU‘È{HT0a9*˜£HUsHTbU*¬£HUsbq*À£HUa£*šØ£HUa/+Zƒû£HUvHTsHQ0bS+¤HUsbp+#¤HUvaz+v:¤HU1að+šQ¤HU2a1,Zƒt¤HU~HTsHQ0bR,ˆ¤HUsbr,œ¤HU}a¸,쾤HU‘èyHT‘¨yaõ,-ؤHU‘Ø{aÌ.ݦú¤HU‘Ø{HT‘¨ya/ݦ¥HU‘Ø{HT‘¨ya)/°?¥HUsHTvHQ3bE/S¥HUsbb/g¥HUvbª/{¥HU}aÄ/ݦ¥HU‘Ø{HT‘¨yaâ/ݦ¿¥HU‘Ø{HT‘Ðya0Ý¥HU}HTsb(0ñ¥HU}b80¦HUsaJ0ݦ'¦HU‘À{HT‘¨yap0ݦI¦HU‘À{HT‘Ðya‡0g¦HUsHT}b«0{¦HUsbÈ0¦HU}aÚ0ݦ±¦HU‘È{HT‘¨yaø0ݦӦHU‘È{HT‘Ðya1ñ¦HU}HTsb<1§HU}bL1§HUsaa1;§HU‘À|HT‘ |a–2’]§HU‘ˆyHQ‘}aÁ2’}§HUHQ‘}aà2§›§HUsHTvb3¯§HUsb!3çHUva83’ã§HU~HQ‘}aW3§¨HU|HTsb}3¨HU|b™3)¨HUsa°3’I¨HUvHQ‘}bÚ3]¨HUva(4¨HU‘ˆyHT‘Ø|ay4Ÿ¨HUHT‘Ø|a²4¿¨HU~HT‘Ø|aë4ߨHU}HT‘Ø|a'5ݦ©HU‘Ø{HT‘ÐyaT5o©HUsb€5-©HUsa’5ݦO©HU‘À{HT‘Ðya¿5og©HUsbë5{©HUsaý5ݦ©HU‘È{HT‘Ðya*6oµ©HUsbV6É©HUsah6ݦë©HU‘Ø{HT‘¨ya•6oªHUsbÁ6ªHUsaÓ6ݦ9ªHU‘À{HT‘¨ya7oQªHUsb27eªHUsaD7ݦ‡ªHU‘È{HT‘¨yaq7oŸªHUsb£7³ªHUsa®7ŽϪHa‘¸yö)aÍ7ŽëªHa‘Àyö)aì7Ž«Ha‘Ðyö)a 8š«HU3bx82«HUsa˜8ŽN«Ha‘¸yö)a·8Žj«Ha‘Àyö)aÖ8ކ«Ha‘Ðyö)aô8š«HU3a<9´½«HU‘ø{HTsb`9Ñ«HUsa­9Ží«Ha‘àyö)aÏ9Ž ¬Ha‘ðyö)añ9Ž%¬Ha‘€zö)a:š<¬HU3b}:P¬HUsa:Žl¬Ha‘àyö)a¿:Žˆ¬Ha‘ðyö)aá:ޤ¬Ha‘€zö)aÿ:š»¬HU3aG;´Û¬HU‘ø{HTsbk;ï¬HUsaÇ;°­HU‘ |HT‘À|HQ3b<*­HUsV8<«aW<ŽS­Ha‘¸yö)a{<Žo­Ha‘Àyö)aŸ<Ž‹­Ha‘Ðyö)a¿<{¥­HU‘ |aÖ<ŽÁ­Ha‘àyö)aò<ŽÝ­Ha‘ðyö)a =Žù­Ha‘€zö)a9={®HU‘À|ai=š*®HU8a>ZƒM®HU|HTsHQ0b)>a®HUsbG>u®HU|ad>ì®HTvb~>¡®HUva‰>޽®Ha‘¸yö)a¨>ŽÙ®Ha‘Àyö)aÇ>Žõ®Ha‘Ðyö)aå>š ¯HU3a;?yÃ2¯HU‘øxHT}HQsb`?F¯HU}bp?Z¯HUsb?n¯HUva˜?ŽНHa‘àyö)aº?ަ¯Ha‘ðyö)aÜ?ޝHa‘€zö)aò?šÙ¯HU3aI@yÃÿ¯HU‘øxHTsHQ}bm@°HUsbŠ@'°HU}b›@;°HUva¦@ŽW°Ha‘¸yö)aÅ@Žs°Ha‘Àyö)aÜ@ްHa‘Ðyö)aú@š¦°HU3a;AyÃΰHU‘°yHTsHQ‘ |b_Aâ°HUsb|Aö°HUva‡AޱHa‘àyö)a©AŽ.±Ha‘ðyö)aËAŽJ±Ha‘€zö)aáAša±HU3a.ByɱHU‘°yHTsHQ‘À|bFB±HUsbbB±±HU~aIhšȱHU9V}x«aœxŽñ±Ha‘¸yö)aÀxŽ ²Ha‘Àyö)aäxŽ)²Ha‘Ðyö)ayŽE²Ha‘àyö)ayŽa²Ha‘ðyö)a9yŽ}²Ha‘€zö)aYy{—²HU‘À|a‘yš¯²HUva0zZƒÒ²HU|HTsHQ0bTzæ²HUsbrzú²HU|azì³HTvV9´ðVþµðVt¹ðVʼðV¹ÈðV{ÊðaMçݦ‚³HU‘À{HT‘Ðyakçݦ¤³HU‘À{HT‘¨yaç°dzHU}HTsHQ3b´çÛ³HU}bÄçï³HUsb è´HUva2èݦ%´HU‘È{HT‘ÐyaXèݦG´HU‘È{HT‘¨ya|è°j´HUsHTvHQ3b˜è~´HUsbµè’´HUvbù覴HU}a|fÒ´HT pÀ HQ vª aõ?ê´HU}aØ"t®µHU}HTvbö"µHUvb0u0µHUsbè…DµHUvb“ˆXµHUsV‡«aªX„}µHUsbΑµHUsaúš©µHUsal‘ZƒÎµHUsHT‘ˆyHQ0b¢‘äµHU‘ˆyb²‘øµHUsVú‘«a’X„¶HUsb;’1¶HUsal’šI¶HUvaÕ’Zƒn¶HU‘ˆyHTsHQ0bñ’‚¶HUsb%“–¶HUsVj“«a‡“X„½¶HU‘ˆybÓÓ¶HU‘ˆyaà“t®ñ¶HUsHT~VÅ•«aè•X„·HUsb –*·HUsa8–šB·HUsaª–Zƒg·HUsHT‘ˆyHQ0bÞ–}·HU‘ˆybî–‘·HUsaÿ–°®·HU}HQ0b$—·HU}bb—Ö·HUsVz—«a•—X„û·HU}b´—¸HU}aÕ—š&¸HU2a˜ZƒK¸HU‘ˆyHTsHQ0bD˜_¸HUsbx˜s¸HUsaÁ˜“¸HU~HT‘ðyV™«a™X„º¸HU‘ˆybX™иHU‘ˆyaw™t®ð¸HUsHT‘øxaµ™¹HU‘øxHTsbÞ™$¹HUsa šŽ@¹Ha‘ð}ö)aDš{`¹HUsHT‘˜zbhšt¹HUsauš§”¹HU‘àyHTvbšš¨¹HUva¨šŽĹHa‘ð}ö)aÌš{ä¹HUsHT‘˜zbèšø¹HUsaõšºHU‘àyHT}b›,ºHU}a$›vCºHU2a_›rºHU‘ðzHT}Ha ô)b›†ºHU}aכޢºHa‘ð}ö)aû›{ºHUsHT‘¨zbœÖºHUsa$œ§öºHU‘àyHT}bIœ »HU}aWœŽ&»Ha‘ð}ö)asœ{F»HU}HT‘¨zb˜œZ»HU}a¥œz»HU‘àyHTsbÁœŽ»HUsaËœv¥»HU2aÔ»HU‘ zHTsHa ô)b4è»HUsaA§¼HU‘€yHT}bk¼HU}a½¼—B¼HU‘€zHQ2ps:0bžV¼HUsa Ÿ¼—|¼HU‘€zHQ3ps:0b\Ÿ¼HUsa‰Ÿ¼—¶¼HU‘€zHQ4ps:0bÚŸʼHUsa Žæ¼Ha‘ð}ö)a. ° ½HUsHT‘àzHQ2bJ ½HUsb” 3½HU}V¨ «aÊ Ž\½Ha‘à}ö)aì Žx½Ha‘è}ö)a¡Ž”½Ha‘€~ö)a'¡Ž°½Ha‘˜yö)aI¡Ž̽Ha‘ø}ö)aq¡šã½HU7aþ¡Zƒ¾HUsHT‘ yHQ0b2¢¾HU‘ ybB¢2¾HUsV•¢«Vµ¢«a×¢Žh¾Ha‘à}ö)a󢎄¾Ha‘è}ö)a£Ž ¾Ha‘€~ö)a:£ݦ¿¾HU‘zHT0aX£ݦ޾HU‘zHT1ax£ݦý¾HU‘zHT2a²£š¿HUva8¤Zƒ8¿HUsHTHQ0bV¤L¿HUbf¤`¿HUsap¤vw¿HU2aɤt®•¿HU}HTsbᤩ¿HUsa!¥ìÉ¿HU‘øzHT~b>¥Ý¿HU~a¬¦šô¿HU8V몫a «ŽÀHa‘à}ö)a)«Ž9ÀHa‘è}ö)aC«ŽUÀHa‘€~ö)ae«ŽqÀHa‘ð}ö)a„«ŽÀHa‘˜yö)a «Ž©ÀHa‘ø}ö)aЫšÀÀHU8a]¬ZƒãÀHUsHT~HQ0bw¬÷ÀHU~b‡¬ ÁHUsaP®š"ÁHU9aÞ¾š9ÁHU2a¿Zƒ\ÁHUvHTHQ0b0¿pÁHUaÚ‡ÁHU2aNÃZƒªÁHUvHTsHQ0bhþÁHUsb”ÉÒÁHUsbëÌæÁHUsañÏoþÁHUsbÐÂHUsaBÐo*ÂHUvboÐ>ÂHUva•ÐoVÂHU|bÉÐjÂHU|VÕЫaôÐŽ“ÂHa‘ˆyö)aÑŽ¯ÂHa‘°yö)a9ÑŽËÂHa‘ zö)a—ÑšãÂHUvaRÒZƒÃHUvHTsHQ0bnÒÃHUsb‹Ò.ÃHUva°ÓfZÃHT Ô© HQ hª aÙxzÃHU‘èyHTvaÓÙf¦ÃHT Ô© HQ hª Vö ðV¸ ðbo ÔÃHUsbÀ èÃHUvVO ðaº š ÄHU2aé Zƒ/ÄHUvHT}HQ0b CÄHU}a# šZÄHU3VÅ$ ða¸6 š~ÄHU1aå6 Zƒ›ÄHT}HQ0b 7 ¯ÄHU}a7 ‚ÖÄHUwHT‘à{HQsb27 êÄHUsb{< þÄHU}bîK ÅHUwV L ðbM 5ÅHUwV%M ðb"N WÅHUwV?N ðbÉHUsbr RÉHUsG@s ‘ ~lÉHUwaçv vƒÉHU1aUw všÉHU1ay t®´ÉHT‘ zaˆz t®ÎÉHT‘ zaý šåÉHU2a+€ ZƒÊHUvHTsHQ0bH€ ÊHUsa%ƒ š3ÊHU2aMƒ ZƒXÊHUsHT‘ˆyHQ0b†ƒ lÊHUsab† šƒÊHU2a† Zƒ¦ÊHUvHTsHQ0b©† ºÊHUsbc‰ ÏÊHUwbí‰ äÊHUwV Š ð] apV:ã#¨ËL]a‰ LQaÁ LEaÁ L9aå L-a  TpV:Mia5 MuaY YªVfHT x¿ HQ à¿ HR Sª HX3HY Ÿª aËVò‡ÛËHU èÀ HQ HR 0¶ V¡Ê¦ íùË” 3 Ì”6ð´^pAÌ;‘µ^—;[µ^—<;°0¹^%v6qGONp[Ì? ZN6çxMpuÌ? ‰M6ò`MpÌ? JN6“Z8^p»Ì;Y:^p<;&<<^3|v `N Š òœƒÞj,ÈOþ  j ½OëŒ RÁsfN3… RËsgN3Ï R#hNpR RziNYw R~jNp¾ Z Ì¤Š ð&vNbÎ\ð&qÌ‘à}q&Ì‘ð}_‹ 7ùÍq3Ì‘€~a;‹ ïÚÍHU|HTÈHQ XÁ HRsHX ¡ª HYvYJ‹ üHU0HT|HQ1açŠ ï-ÎHUsHT4HQ ˜ª HR2HX7VìŠ ŸY‹ ïHUvHT4HQ žª Z¼l%Œ @'ƒNÆÏ[5v,Œ À'­^LFvä \À'iRviZvMbv€ Mnv aMŒ «×ÎHU ¼ª alŒ ·ïÎHUsa¹Œ fÏHT ØÁ bÔŒ "ÏHUsV ½V 1a$ Ä[ÏHU ÿ)a> Ñ€ÏHUsHQ ÿ)a¿Ž fŸÏHT ¨Á b*¡ ³ÏHUvNº¤ HUsZAÌð 0(žNÑ\0(iRÌZ'uð p(PN7ÐL8uN VŽ ÞVWŽ êY“Ž öHQ0aÕŽ ŽXÐHa ô)@aòŽ ŽyÐHa ô)à?a ]ÐHU0a# ]§ÐHU1a= ]¾ÐHU2aW ]ÕÐHU3aq ]ìÐHU4Y ]HU ÿ][ÌÌ &®NÅÑTÌ &ilÌVØ Š@Ví Š@V Š@V% Š@VA Š@VV Š@Vr Š@VŽ Š@Vª Š@VÆ Š@Vâ Š@]uÌò ±°NãÓTò ±i†Ìa‘ ÒHU1a(‘ %ÒHU1aK‘ <ÒHU1aq‘ SÒHU2a”‘ jÒHU1a·‘ ÒHU1aÚ‘ ˜ÒHU1aý‘ ¯ÒHU1a ’ ÆÒHU1aC’ ÝÒHU1af’ ôÒHU1a‰’  ÓHU1a¬’ "ÓHU1aÏ’ 9ÓHU1aò’ PÓHU1a“ gÓHU1a˜” ÓHU;aã” .¦ÓHU7HT;HQ0HR0aK— ¾ÓHUcY–— .HU3HTcHQ0HR0ZÌþ˜  (ÏNÕ\ (q Ì ,*\à(M­Ì³ ]ÃA†¢ G^PÔLÔA6 VŽ¢ òŸ]ÃAÆ¢ O^ƒÔLÔAY V΢ òŸa}¢ ¢ÔHU « a½¢ ÁÔHU « Vh£ 1at£ åÔHU0Y£ üHT  HQ1a‹ ò‡3ÕHU X HTvHQ|a÷‹ šJÕHU0aŒ ênÕHU £¨ HT0a† «ÕHU ·ª HT  ,*HQ0HR0HX õV¢ óa «×ÕHU ˪ aè ÑöÕHT O© aÄ ÑÖHT ת a¯— Ä4ÖHU €)*aÜ— ÄSÖHU à'*a ˜ ÄrÖHU @&*aB˜ Â¥ÖHU ˪ HT +© HQ hac˜ Â×ÖHU ઠHT Mª HQ`a‹˜  ×HU ઠHT æª HQ H a¬˜ Â=×HU ઠHT ïª HQ 0a͘ Âo×HU ઠHT ùª HQPaõ˜ ¡×HU ઠHT « HQÀa™ v¸×HU1aJ™ Š«Ð×HT}ap™ ´@è×HUsa’™ ‚ØHQ}b«™ ØHU}b»™ (ØHUsaÉ™ Š«?ØHT0aë™ ‚WØHQsbš kØHUsaš Š«‚ØHT0a3š ‚šØHQsaSš Š«±ØHT0auš ‚ÉØHQsa‘š vàØHU1aÅš Š«øØHTsaêš ´@ÙHU}a › ‚(ÙHQsb$› <ÙHUsb5› PÙHU}a?› vgÙHU1as› Š«ÙHT}b› “ÙHU}aŸ› ´@«ÙHUsaÁ› ‚ÃÙHQ}bÚ› ×ÙHU}bê› ëÙHUsaø› Š«ÚHT0aœ ‚ÚHQsb2œ .ÚHUsa@œ Š«EÚHT0abœ ‚]ÚHQsbzœ qÚHUsa„œ vˆÚHU8an Š« ÚHTsbŠ ´ÚHUsa™ ´@ÌÚHU}a» ‚äÚHQsbÓ øÚHUsaâ ´@ÛHU}až ‚(ÛHQsbž <ÛHUsa+ž ´@TÛHU}aMž ‚lÛHQsbež €ÛHUsatž ´@˜ÛHU}a–ž ‚°ÛHQsb®ž ÄÛHUsa½ž ´@ÜÛHU}aßž ‚ôÛHQsb÷ž ÜHUsaŸ ´@ ÜHU}a(Ÿ ‚8ÜHQsb@Ÿ LÜHUsaOŸ ´@dÜHU}aqŸ ‚|ÜHQsb‰Ÿ ÜHUsa˜Ÿ ´@¨ÜHU}aºŸ ‚ÀÜHQsbÒŸ ÔÜHUsb㟠èÜHU}aøŸ ' ÝHU @+*HT0a  ‚$ÝHQ}b3  8ÝHU}aH  '\ÝHU  +*HT0aj  ‚tÝHQ}bƒ  ˆÝHU}Vˆ  jaª  ‚­ÝHQ}bÇ  ÁÝHU}Võ  ða¡ ríÝHT X Vq¢ ¦bú£ ÞHUsb¤ "ÞHU}b1¤ 6ÞHU}bR¤ JÞHU}b…¥ ^ÞHUsb»¥ rÞHUsNñ¥ HUs}j`¨-}ÄR©-~àiÌ}\/ p~,_0©â}³Wâ}ÈN1=}in1=}W â}Ùâ}Á8â}Z2â ®ß}3$24 ß}nM"â}c1)â}[>3[â}ñ â}='â}Â4+â}u7â}Ry5w3}e5y3}P\5z3}¿w53}tj5€3}yd5‚3},5†3}¡g5‡3}Ë5‹3}qT5Œ3} 53}Ò15“3}ga5•3}Û*5–3}à5›3}–^5œ3}9"5¯3}µ[˜}ã#66p}­7„Ú}}/7…p{^`8tÅ €Ûy9gÅ zeº3 P6*zþ»3 H6*zö¼3 @6*z>+½3 86*zF¾3 06*;#¿p;~ÀpzB\Á/ Ũ Ÿ;zÂY Y&á”;_xÚ2ááz#i®2  6* 2]á”z ‡Má à5*zÒˆMá `þ)z÷ym À5*;B9mzÝ/Fm ¸5*;üNGm;ZBHmzIm °5*;š\JmzˆAPm ¨5*z}"Qm  5*z}YRm ˜5*z?R[n0 `+*ãj]p ,*;× `3zÀSa3 5*z¯bb3 ˆ5*zc3 €5*;d3z;_e3 x5*zZgf3 p5*zL!g3 h5*z$h3 `5*zÒSi3 X5*z½.j3 P5* ®Xã”zðkHã Aþ)zlHã ?þ)zmHã =þ)z'nHã ;þ)z1oHã 9þ)z;pHã 7þ)zqHã 5þ)z rHã 3þ)zsHã 1þ)zUxtHã /þ)zuHã -þ)zgxvHã +þ)zxnwHã )þ)z1xHã 'þ)z;yHã %þ)zEzHã #þ)zg{Hã !þ)zq|Hã þ)z{}Hã þ)zàx~Hã þ)zHã þ)z™€Hã þ) ®Lå”z-<å þ)z8‚<å þ)zbCƒ<å þ)zßM„<å  þ)zN…<å þ)z N†<å þ)zêM‡<å þ)zõMˆ<å ÿý)z¨O‰<å üý)z,\Š<å ùý)z7\‹<å öý)zð\Œ<å óý)z÷]— ïý)z-CŽ— ëý)z ^<å èý)z^<å åý)zöF‘<å âý)z’d’— Þý)zd“— Úý)z¨d”<å ×ý)z³d•<å Ôý)z¾d–<å Ñý)züe—<å Îý)zÂe˜— Êý)zÍe™— Æý)zËRš<å Ãý)zæe›<å Àý)zñeœ<å ½ý)zg<å ºý)zÝfž— ¶ý)zèfŸ— ²ý)zóf <å ¯ý)zqU¡<å ¬ý)zŠ¢— ¨ý)zC£— ¤ý)zêc¤—  ý)z.j¥— œý)zb¦— ˜ý)zf+§— ”ý)zQ¨— ý)zëZ©— Œý)z•hª— ˆý)zç6«— „ý)zó6¬— €ý)zÿ6­— |ý)z 7®— xý)zò7¯— tý)z-1°— pý)zv±— lý)z3z²— hý)z³— dý)zÊ&´— `ý)zakµ— \ý)z²1¶— Xý)z¼j·— Tý) ®ê”z¸ê Oý)zÄb¹ê Jý)z8ºê Eý)z–>»ê @ý)z)¼ê ;ý)zù½ê 6ý)z‡t¾ê 1ý) ®Àê”zÒ:¿°ê (ý)z¼vÀê !ý)zL9Áê ý)zGÂê ý)zªGÃê ý)z·GÄê  ý)z\IÅê ý)ziIÆê ý)zØ.Çê þü)z›È<å ûü)z•TÉ<å øü)zDÊê óü)zfËê îü)z×NÌê éü)zcͰê àü)z?Îê Øü)zPzÏê Óü)z4*Ðê Îü)z•6Ñ<å Ëü)zÓiÒ<å Èü)z-Ó<å Åü)zYÔ<å Âü)z nÕ<å ¿ü)zÉ4Ö<å ¼ü) ®àì”zÏg×Ðì ¶ü)z™`ØÐì °ü)zxÙÐì ªü)z ;ÚÐì ¤ü)z;ÛÐì žü)z);ÜÐì ˜ü)zÝÐì ’ü)z’{ÞÐì Œü)zRßÐì †ü)z[àÐì €ü)z([áÐì zü)zvâÐì tü)zŸuãÐì nü)zL(äÐì hü)zìåÐì bü)zh æÐì \ü)zö<çÐì Vü)zrèÐì Pü)z³éÐì Jü)zeiêÐì Dü)zsiëÐì >ü)ziìÐì 8ü)z,fíÐì 2ü) ®êî”z‰jîÚî +ü)z½%ïÚî $ü)z€5ðÚî ü)z]ñÚî ü)z„òÚî ü)zàróÚî ü)zQ3ôÚî ü)z£1õÚî úû)z$LöÚî óû) ®Àï” zg{÷°ï èû)z_øÚî Ýû)z+@ùÚî Öû)zEúÚî Ïû)z36ûÚî Èû)zPüà Àû)zíIýÚî ¸û)zE4þà °û)z÷?ÿÚî §û)zžÚî  û)zþà ˜û)zà û)zÈMà ˆû)zÀ à €û)zYà xû)zd2à pû)züà hû)zo9à `û)zÕ à Xû)z  à Pû)z÷m à Hû)z· à @û)zï °ê 0û)zup°ê  û)zÇm°ê û)zŸE°ê û)z+r°ê ðú)z°ê pú)z X°ê `ú)z °ê Pú)zv{°ê @ú)zú°ê 0ú)z @°ê  ú) ®@ó” zkm0ó ú)z3 0ó ú)z{e!°ï ðù)z "0ó àù)zQ#0ó Ðù)zÚ+$0ó Àù)zÛL%0ó °ù)z:f&°ï  ù)zk'°ï ù)z´n(°ï €ù)zE)°ï pù)zÅ@*°ï `ù)z½k+°ï Pù)z¿\,°ï @ù)zÆ-°ï 0ù) ®šô” z88.Šô  ù)z£/Šô ù)z€P0Šô ù)zv1Šô ðø) ®õ” z6i2òô àø)zP 3òô Ðø)z4òô Àø)zfe5òô °ø)zÔ6òô  ø)zŒN7òô ø)zž 8òô €ø)zƒ.9òô pø)zÕ2:òô `ø)z+;òô Pø)z6{<òô @ø)zÐ0=òô 0ø)z±y>òô  ø) ®0ö” z÷? ö ø)z–x@ ö ø)z‹lA ö ð÷) ®‚ö”z•]Brö à÷)z€Crö Ð÷)z¶xDð. À÷)zaEð. °÷)zFð.  ÷)z²Gð. ÷) ®÷”zT H÷ p÷) ®<÷”z I,÷ P÷)zèKJ,÷ 0÷) ®x÷”zKKh÷ ÷) ®ž÷”z91LŽ÷ ðö) ®Ä÷”zÿLM´÷ Ðö) ®ê÷”zŽ#NÚ÷ °ö)zYbOÚ÷ ö) ®&ø”zjWPø pö) ®Lø”zqxQ<ø Pö) ®rø”z®$Rbø 0ö) ®˜ø”FzAwSˆø àõ) ®¾ø”$z¶T®ø  õ) ®äø”;zUÔø `õ) ® ù”#zÛVúø  õ)zÜlWÐ àô) ®Fù”!zÕ$X6ù  ô) ®lù”0z©-Y\ù `ô)z¸Z6ù  ô) ®¨ù”*zÖW[˜ù àó)zp`\˜ù  ó) ®äù”"zA ]Ôù `ó)zo1^3 H5*zÈL_3 @5*z[-`3 85*zò)a3 05*z b3 (5*z@c3  5*zS[d3 5*z‡$e3 5*z”pf3 5*zYSg3 5*zE/h3 ø4*zPPi3 ð4*zNj3 è4*zok3 à4*z/Fl3 Ø4*zJGm3 Ð4*zžn3 È4*z2Jo3 À4*z p3 ¸4*zFqq3 °4*zë4r3 ¨4*zmks3  4*zÕct3 ˜4*zxu3 4*z%xv3 ˆ4*z5xw3 €4*z4x3 x4*zæky3 p4*z'z3 h4*zþp{3 `4*zÆy|3 X4*zÆY}3 P4*zù5~3 H4*zuK3 @4*z7t€3 84*z(Q3 04*zÙK‚3 (4*z"ƒ3  4*zhE„3 4*z0-…3 4*zë8†3 4*zÚp‡3 4*z­Fˆ3 ø3*zt‰3 ð3*zÔFŠ3 è3*záF‹3 à3*zKŒ3 Ø3*zºF3 Ð3*zÇFŽ3 È3*zª3 À3*zïr3 ¸3*zs‘3 °3*zŽ!’3 ¨3*z1“3  3*zA”3 ˜3*z •3 3*z5–3 ˆ3*zË/—3 €3*zÔ˜3 x3*zd™3 p3*z(Yš3 h3*zÄG›3 `3*z¸2œ3 X3*z/03 P3*zB0ž3 H3*zŸ3 @3*zOk 3 83*zÔI¡3 03*z u¢3 (3*zÒ-£3  3*zÇ ¤3 3*z}'¥3 3*zl¦3 3*zÿ/§3 3*z3¨3 ø2*zÚJ©3 ð2*z 0ª3 è2*zƒG«3 à2*zâ¬3 Ø2*z£9­3 Ð2*zOY®3 È2*z- ¯3 À2*zT.°3 ¸2*z0±3 °2*zÔw²3 ¨2*z|b³3  2*z#0´3 ˜2*z¶Bµ3 2*zG,¶3 ˆ2*z¯h·3 €2*zGK¸3 x2*zD ¹3 p2*z?Qº3 h2*z·m»3 `2*z;¼3 X2*zt\½3 P2*z‡\¾3 H2*zc ¿3 @2*zìÀ3 82*záÁ3 02*z!Â3 (2*zd\Ã3  2*z0%Ä3 2*z.Å3 2*zx@Æ3 2*zŽÇ3 2*zeÈ3 ø1*z#É3 ð1*zžDÊ3 è1*z\=Ë3 à1*zQ]Ì3 Ø1*zNAÍ3 Ð1*ziÎ3 È1*z6YÏ3 À1*zöÐ3 ¸1*zX"Ñ3 °1*zŒÒ3 ¨1*zÀ`Ó3  1*z1dÔ3 ˜1*z‘HÕ3 1*z—5Ö3 ˆ1*zœ=×3 €1*zçyØ3 x1*z Ù3 p1*zU0Ú3 h1*zà Û3 `1*zÇnÜ3 X1*zctÝ3 P1*z™WÞ3 H1*z³Oß3 @1*zRnà3 81*z qá3 01*z÷kâ3 (1*zñpã3  1*z”tä3 1*z¢tå3 1*zï{æ3 1*zç3 1*z]jè3 ø0*z¿té3 ð0*zÁê3 è0*zÐë3 à0*zGtì3 Ø0*z»lí3 Ð0*z˜mî3 È0*zBï3 À0*z\ð3 ¸0*ziKñ3 °0*z¹Vò3 ¨0*z¾?ó3  0*zsô3 ˜0*z„ õ3 0*z sö3 ˆ0*z-s÷3 €0*zšUø3 x0*z_ù3 p0*z3Uú3 h0*z5gû3 `0*z\ü3 X0*zHJý3 P0*zSþ3 H0*zËÿ3 @0*z.3 80*zá)3 00*zcr3 (0*zÅ33  0*zô-3 0*ze3 0*z‚D3 0*z×]3 0*zº83 ø/*z”J 3 ð/*z 3 è/*z=N 3 à/*zÖ& 3 Ø/*z˜O 3 Ð/*zJ'3 È/*z€3 À/*zG3 ¸/*z*w3 °/*za'3 ¨/*z53  /*z3 ˜/*z~13 /*z3 ˆ/*zÁ3 €/*zs3 x/*zs?3 p/*z¶z3 h/*zi3 `/*z†03 X/*zå-3 P/*zt23 H/*zÕY3 @/*zÜ  3 8/*z­K!3 0/*zA^"3 (/*zèi#3  /*zN^$3 /*z¹a%3 /*z[^&3 /*zh^'3 /*zÌ[(3 ø.*zu^)3 ð.*zsV*3 è.*zíL+3 à.*z9,3 Ø.*z¹_-3 Ð.*z¹K.3 È.*zj_/3 À.*zC03 ¸.*zY13 °.*zœ 23 ¨.*z’_33  .*zŸ_43 ˜.*z+"53 .*z¬_63 ˆ.*zvA73 €.*z)]83 x.*zwa93 p.*z¤0:3 h.*z@a;3 `.*zè!<3 X.*zMa=3 P.*z’g>3 H.*zZa?3 @.*z@3 8.*zågA3 0.*z!B3 (.*z‹C3  .*z`9M3 .*zScN3 .*zÄuO3 .*zÐuP3 .*zkQ3 ø-*zéuR3 ð-*z6kS3 è-*zqT3 à-*zÀhU3 Ø-*zªaV3 Ð-*z’2W3 È-*zÈaX3 À-*za(Y3 ¸-*zèaZ3 °-*z÷a[3 ¨-*zb\3  -*zÁ(]3 ˜-*z5/^3 -*ziw_3 ˆ-*zyw`3 €-*zm/a3 x-*zwb3 p-*z‹/c3 h-*z›/d3 `-*;«/e3;»/f3;•sg3;¯h3z¬Qªã @+*zó*«#ã  +* ,2:”zE%K*  -*zÆ_&Kp -*zqZKâ €)* ]5Œ”z@h”K| À,*zg3•Kp  ,*zôxÐKâ à'* CxÞ”z€f LÎ `,*zóg Lp @,*zÎH?Lâ @&* ã0”z¡byL   ,* ¿"V”æz CLF  * ã|”zn0\^l  * 5¢”zh.e^’  * bÈ”zÌ8k^¸  *zövr^â ÿ)‚G%Ô3€€€€xƒR%Úÿÿÿ„ª%9D@„Ö%âR‚ &×;€€~…&„ÿ‚K&{€€€€€€€€€†V&©*ÿÿÿÿÿÿÿ‡å0å05ć™-™-5N‡5[ˆÚZÚZ:3ˆ÷C÷C:5‡°L°L4ˆÿÿ;ãˆ88n>n?‡ÍÍB‡22G‡ñ"ñ"=5‡((=4‡ÎxÎx=‡-n-n‡ÉÉ3m‡**/‡i@i@3p‡…%…%3‡éoéo(‰ŒvŒvˆÕ‡5!5!5\ˆ³'³':7ˆì+ì+ë‡  >ˆ5A‡ÉlÉl? ‡R;R;3—‡îî@:‡ - -5ä‡JJJˆää0‡‡-‡-E‡M_M_3s‡Û=Û=&‡XGXG!?‡ 7†ˆEE<‡ÊÊ-ˆJmJm<°ˆ„y„y<”ˆ­P­P<¼‡00(ˆ3 3 <ŇvCvC3nˆ½,½,ˆ[o[o<:‡L*L*BˆÞmÞmåˆ07070!ˆ¢'¢';Òˆqq<‡W W 5Q‡†p†p5Rˆ<ª‡pSpS3zˆ z z<¥‡‚6‚60‡eeC ‡eeDAˆ§:§:<«ˆÜˆ÷÷<ˆðð<눆7†7<á‡*8*8@m‡mm>ˆo)o)׈èwèwÁˆ²²Ø‡==T‡ÔnÔn>ˆ†u†u0<½<.‡„r„r>‡4o4oBu‡È+È+1% U$ > : ; I$ >   I : ;  : ; I8 : ;I8  : ; n  : ;  : ; I I!I/ : ; &III&: ;I7I : ;  : ; : ;I8 : ; I8  : ; n : ;n : ;  : ; I8 I: ; n ( ! I: ; "(# : ;$ : ;I8 % : ;n&9: ; '9: ; (:: ; ): ; *: ;+9: ; , : ; I?<-/I. : ; /.?: ;I<01.?: ;I<2.?: ; I<3.?: ; nI<4.?: ;nI<5.?: ; I<6.: ;I 7: ;I84: ;I9: ;I: ;4: ;I< =.: ; >.: ; ? : ;@.?: ; I 4A: ; IB.: ;I C : ;D.: ;I@—BE: ;IF4: ;IG‰‚“BHŠ‚‘BI‰‚•B“BJ.: ;I@–BK.1@L1M41N‰‚O: ;IP: ;IQ: ;IR4: ;IS UT U.: ;@—BV‰‚1W‰‚•B1X1X YY‰‚1Z1RUX Y[1RUX Y\ U]1X Y^1_ `‰‚a‰‚1b‰‚c.1@—Bd‰‚•B1e‰‚•Bf.: ;@–Bg‰‚•Bh.: ;@i 1j : ;k41l‰‚“Bm.1@–Bn1o‰‚•B1pŠ‚1‘Bq41r1 s 1t41 u1 v1 w4: ;Ix41 y41 z4: ;I{4: ;I |.?: ;@–B}4: ; I?<~4: ;I?<!€4: ; I 4: ;I?‚4Gn ƒ4Gn„4Gn …4Gn†4Gn‡.?<n: ; ˆ.?<n: ;‰.?<nÕâ'û /usr/include/x86_64-linux-gnu/bits/usr/lib/gcc/x86_64-linux-gnu/5/include/usr/include/usr/include/x86_64-linux-gnu/sys/usr/include/python2.7/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/usr/include/c++/5/usr/include/x86_64-linux-gnu/c++/5/bits/usr/include/c++/5/debug/usr/include/c++/5/bits/usr/include/c++/5/extctng.cppstring3.hstddef.htypes.hstdio.hlibio.hwchar.htypes.hsigset.hunistd.hstdint.hpyport.htime.htime.hobject.hmethodobject.hstructmember.hdescrobject.hintobject.hlongobject.hlongintrepr.hfloatobject.hstringobject.htupleobject.hlistobject.hclassobject.htraceback.hframeobject.hpystate.hcode.hsetjmp.hsetjmp.hnpy_common.hndarraytypes.hcwcharc++config.hdebug.h clocalecwctypepredefined_ops.h new_allocator.h numeric_traits.h wchar2.hlocale.hwctype.hpydebug.hunicodeobject.hboolobject.hbytearrayobject.hdictobject.hcobject.hpyerrors.hceval.hpyfpe.h__multiarray_api.h__ufunc_api.hobjimpl.hstdlib.habstract.hpymem.himport.hwarnings.hpythonrun.hmoduleobject.hmodsupport.hsliceobject.hstring.h €5Á–t?G?Y’M+\i9½ô”sK­;=.‘K­Xfvßîò”sK­;=.‘K­X‘K­Xfvïáòt?G?Y’M+\i9½ô”sK­;=.‘K­XfvßïòiŸKKKKKKXgXuXjÒ°bsñÍòåtwsvvt„ô òxò òpòôôôùózòösòò· ò=-“”/7YóÕ; X n‚.“ º >!!!!×××ÖvÅññññññÇòƒKJƒK¸iJK‚½©i„Hs=s?½q?xÈsT;K ‚]x¬`q¬Xr¬Xz¬^†¬ø¬0. áL <• =[K»‚Ç<¹<öòWƒfKu/¢òLIe„1vä_¬<<>&JÀ~JntÒtYX=Ô~ t°ò‰Jž–ƒIK–=YÉž ±~ÖÀ<˜­‘»KZ.Ç~J¹žò‘‚­ƒIKKƒi‚Y>I=æ~‚qtª°/0$¨‚ƒZ:>gggXŸ­Y¬~t)%Õȯ°,ý~¬Œ ô~<8ºw¬« ¬y.²-ÉX½ƒK»\Xƒ¥uTž©Éêzž ŸK X.eæKKƒƒƒuXuXtóxº º·tÖgY”dKK. XxY××g@d Tñ‡t >Y!××g@: TññŽò >Y××g@d Tñ˜tM+[Ž.‚½K¡KöXŸ;=/=„­gI­Ô’Ô¾t¢8@/Ly"¢8@ f±‘Ö׃ž‘–.êt—f‚? ­²iò"ž;=I=-3V=K­ÏäŠòÝòºä»L:>»;=iwÆ’q"KKÅžó«òŸ‘uŸŸ=K·˜¬ u¬oJÌh øÈçægfzòwä X­gXgG?[ƒ…I=nJ òó\ò,.Wfòfg £âòßJ¡âXûžf¬×Wƒ.ÏÍ.t?G?Y’‘’M+\i9¡¦#òvHhX‘ž‘ž‘//Y-®Hvé‚OXÎKKKXå/€zò¦WXOXÎKKKXå/€zò¦¥hXsJ=¯KI=Z€ º7A2¸æ½XõýJþòé~XXþX…Xpf¯‡Yƒ–û䟑ƒJè<ƒ‘„IKYOžß<ff±GKMYÈt°ì"†UƒƒYK×p¬K:KYØ;YfKPäIYY>ž‘dXòGLLYG[jÌUYƒƒL:ZJ!ƒLXó°òH\KUhVwk'÷ƒ‘%[‘.Yä.q(‘ä!‘ŽXƒ9‚WY°Èyÿ=…<Uä+Xft×}º–ºtÆÖYEtXût²\Ëi>ò¹ ÄX Òkf‚ò›#Àé~ä–ò­ˆ…›#¼­ê~JÔ•‚¬ê~<Ó•‚u^ÙJ›#¼Èè~J¹—‚Çè~<¸—‚u^  J;K\­jx¬Šß¼Kæ¸ò >Yuƒu†É fb„ƒ=Ⱥr.Y¼ƒW=f’ƒ;=h­I=h Z¤[Α/.¾ttð ò(­ ¬ï}ò”Û„…\KY‘‘Yå fvžóƒ×uyž žrÖŸ^u-÷kf òuJt$!ç 6yÖzJæx- éwt ‚‘Uº‡æäYA#“zƒ‡zJ8‚…¹<×È­¥2uJÉ@åôéç£YKgxJŸ¢ž ºŸ`ä'‚LH0“KKYÕXv «tZΞr®(gWgóe/›4†v䑈ç~tK»÷˜‚ X‚ç~.‘ù˜äpN…ç~žÜ™ #9?»Y JG?Ý ºxt`¬Ù~tKöЦXx <˜»;=hY;=f»;=i$ J»ÊÆBž,ÀtwòVòu;=¨Ù~.‘˦ä,¹Ù~È”št’VvY‘ƒWJ»’ØÉƒŽ&<ä zfBUu=½$ÖÊzžh‚rKKhƒuV!<¹^‚‘i¡ääXþ fOL0Wu <’ït<$£J #Ó  WuwžòךvtsJ tê t zÈôtò9tô÷p ò-tŽ}(ê fOL0Wu <’ƒst"¥  ä¿ ¬ Wuwž½tò  Ñ Ö×®ttsJ XÖ  zȈsò9¬%àäY™žôñò-äîPÛ~‚¨JØ~J¬f»‘ƒI=XŸLá~ažKKKƒƒƒåó-ò-Kh;KÝ~fxF=MKHIMK¢JÞ~>¨”yò=B!_t8Xg‘Y=s/ t¯Š‘…I/ë½ÖÉØÁ.h*XXuÕ´òÃòõâòÉœJ·ãXÉœž¾¾º‘ÂÁäÃòý½ä‰Âf½JÃX ¿žžódžÔÚ‚Ýã~¬Kö¡œX’K“WKY;=gYKKKYÃ}ž»’#ɃŽºXŠ”¹ ö=\=ë¨Î~ºKöÔ±X呟W=h$´—KI[KLì~JGKKKKƒ‡KK“JK’;KÝ~fNGMKHIMK¢JÞ~¢XtJ .ï?Gó~Èå_tKKKƒƒƒ­»$‘Ñ ´¬ÏJ±JÒ.’L “ç;K6sº¡òìXcJ.µT‚Nò´”“ÉvH?>ì~JGKKKKƒ‡KK“JKh;KÝ~fxF=MKHIMK¢JÞ~˜/žèP.× òËN¤KKK XÉæí#ä\Èã#<\ <ãtóóóyòãŽ|=–t ¬äTÖ;;+2!K;YgKKY°7¿­5Ÿ !K‘KKY¦æLL2Z ž/%!K‘KKY¢+.0!K‘KYY$*N,Lô+‘ ž& &% å5“*Êå5 %¡Lð>æ %¡Lð>æ  " t ^zºLK’KZåÌ*€NŒF»Yæ‚È>K;uæ"ôäf•‡›X„ + JæZh!æ„!hó+ +BBBB5;;-C + ȆK‚É„5‚ .0u „ZLN9M;Kug®~ò®z+zÆ~ò¼ò’~ò¸ô0Œ8vv5o/uÄò¹n<õŠ.¹ v<_ <¹º`<¹ºa.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹¹¸›®òtK¸Áºóóåååå%å"Y-[%"å%%%%%%%%%%%%%%%%%%"%%%%%%%%%%%%%"""%""""""óõlò‹<£l,K$»»»»»»¾ƒI=¿äOäOäOäOäOäO‘°' ÀXP4PóóóóIò@@0ååóöóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó°m.n<—x<¹]"<b<¹ºc.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹¹¸¬òtK¸ÐSXÊ-¬Ÿt <to.p<÷ˆ<—x<¹]"<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸eòÖ!Ö!Ö„ôžá‹9ßÈp<o.n<¹ v< u<¹aº<¹!º^<¹ º_.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹¹¸öSòtK¸úŠ×çô~.¡þä9¬"ÉÛà(œž ºÙ)p<o.—x<¹˜w<_ <¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹¹¸Ösòv:L.¸p<5òp<o.—x<¹˜w<_ <¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹¹¸ðÁJY;& zæz¬Ò~<¹³Ì~<¹µÊ~<h<¹¹ºÆ~<¹!º^<¹ º_.¹¹¹¹¹¹¹¹¹¹¹¹¹Ìº³~‚¹¹¹¸¸¹¹¹¸Ùð~òtK¸ ‚ æ~Ö¹±Î~<µÊ~<¹¹h<¹»ºÄ~<¹!º^<¹ º_.¹¹¹¹¹¹¹¹¹¹¹¹¹Îº±~‚¹¹¹¸¸¹¹¹¸Ûî~òtK¸ùþ×Ô~8ˆ.¬ë~(t’Ÿ<Í~<³Ì~‚µÊ~<j.ºk<ºÅ~.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸UÖ–ô.æ‹9’‹º±Lhu <’ƒst"¥<Ä€‚ƒôžÜ‹9¤ôÖ׋9©ôÈÒ‹9îÈp<†ù~.—x<¹Šõ~<Œó~<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹·®½òJÍ‹9¯‹Ö¥Øu¢ö~‚™Jp<ê•.è—<¹ v<_ <¹òº<¹!º^<¹ º_.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¹¹¸“¶òtK¸ÿŠØÚö~ž¨ü‚9¬"Ûà#S¤¨ÈÒ"Ÿ<á‚¡J²ºÓX½žÓ‚RòǺv  ‚c9ä¬.ÔXÈ}òb¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹vº Ö¼ˆ#‡ø~‚ù‡.‡ø~<JA6Xæ}.šÈ}¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹vºÑÖ½[äáÿ}äp<ź~.Ǹ~<¹É¶~<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¶íIÝ~.t¯¿~<j<k.l<¹È·~.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹·¶Ö“ží‡<nk<l.m<‘ºî~.“ì~< ºs<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸+ÖŠõ~<n<Žñ~.¹ï~< t<¹”ºë~<¹!º^<¹ º_.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹©ºÖ~‚¹¸¸¹¹¹¸´•òtK¸ÏR!ê™äÀ•È«~Öp<ا~.Ú¥~<¹Ü£~<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¶€«~Jا~<Ú¥~<l<¹Þ¡~.àŸ~<¹âº~<¹!º^<¹ º_.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸¹¶‚Ç~òtK¸Å캕ÈÞòæv<t¦ Èv<j<k.l<¹j.h<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶ÊìÖ»• Åê<»•‚¦~¬p<Ý¢~.ß ~<¹áž~<ãœ~<¹º`<¹ºa.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸µ…Ä~òtK¸ÜžÉ}1·È}<¹¹¹¹¹¹¹¹¹¹¹¹¹¹™æ}X¹¹¹¹¹¹¹¹¹vºâç}ò™®Öj=v‚ãâ}äÛ~$¦Ù~<¨×~<ªÕ~<¹d<e.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹Åºº~‚¹¸¸¹¹¹¸Ñø~òtK¸ùþÐm:1Ù“J“ì}.•ê}<—ºè}<™æ}.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¬ºÓ}¬žºá}X¹¹¹¹²ºÄ}‚¼~òóï}0‚ý}<„û}.†ù}.ˆº÷}<Šõ}<Œºó}.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ºâ}¬¹Ÿºà}<¹¹¹£ºœ~täþ}Öê•~<n<î‘~.¹ð~.ò~<¹º`<¹ºa.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹‰ºö}‚¹¸¸µ”µ~òtK¸Ï(Ö}"«Ô}<­Ò}.¹¹¹¹¹¹¹¹¹¹¹¹¹¹šºå}X¹¹¹¹¹¹¹¹vºÕô}òŒ…ÈxÈ‚ºxXǸx.¶Éx<Ë´x<¹Í²x.¹¹¹¹¹¹¹×ºx‚ñØxò¨³wÖÝ‚3ÎzXLK¼K>ó (è!K‘KYK¢&¼ žwXLQz]rLZ!Ì>:N"å!®  ò®;ó®;ó ®;ó ®ó;B4N J‘«Xe¬p/ñXór<Ž ñr<Ÿ u‚ësX½ Õ„‚ü‚‘sòï Ÿ.á"Ÿ‚p‚€X‚sÈþ €<u‚‹Xõ~¬ïs‚½ ÔÖ /p/ðXXu‚ûÈ’s‚î -¡òp/ïX‘Xu‚ø £òÝ'£<p‚íXU?•s‚þ u‚øX•¬ê<ør.’ ís‚½ ô.p-êXúr.Ÿ :u‚õXør<ŽŠ õr.½ Ùõ‚˜sòè ¦Öp/èXür<… úr<Ÿ u‚ësX½ Ì‚ó‚Æª"p2æXœsÈä š<u‚ñXœ¬s<ïs‚½ ô<p*ãXsX u‚ Xàs<Ž þr<½ Ç’.ìs‚‚ Ÿsòá ­.p*ឃs<ÿ Ÿ<u‚ësX½ Å”‚ì‚Æ±<p/ÝX‡s<ú …s<Ÿ u‚ësX½ Á˜‚è‚Æ@±ÖÏ%±<p‚ßXœ>¡‚u‚êX£s.Ý £Ý<…s.’ ís‚½ ôÖp/ÙX‹s<ö ‰s<Ÿ u‚ësX½ ½œ‚ä‚ʵÖË%µ<p‚ÛXœ>¥‚u‚æX§s.Ù §Ù<‰s.’ ís‚½ ïÈ  ZËN¤KKK_ö+ (v ô   ¬óv    ¬!ô   óÖ>!K;uæ"²Ýf•É¢X„ ò( +hZZQz}Xð }Öp‚€X€}òu‚tÈþq&Ÿ}/áXpfƒq<Ÿ}.p‚ñXïp.’}òu‚tXš Õ„}óÈK‘KKK˜æNVLÊg2¬}XÔ ¬}.p‚äXcƒq<ôª}.u‚ïXýp.½ Ùqòâ¬}ÖѬ¯}‚p‚áXƒq<þq<Ÿ u‚ìXÿpX½ Ùì‚¡qòßÈ•}XêXÉ•}äp‚ûXép¬—èp<‡øp<ž u‚†Xåp.½ ßú|‚†‚‡q‚õVa¬.›}XåXïpX†¦}<p‚õXîp.  u‚êsX½ Ù€}òt‚Ž Ï‚±}‚p‚ßX…q<üƒq<Ÿ u‚êXqX½ Ùê‚v»}XÅ‚»}tp‚ÕX«}òu‚ º¬Æ}‚p‚ÊXšq<ç˜q<Ÿ u‚ÕX–qX½ ÙÕ‚¸qòÈÆ}X¸‚È}‚p‚ÈXœq<åšq<Ÿ u‚ÓX˜qX½ ÙÓ‚È}ÈŸfÊß}<p‚±Xb@Ñqò¯Ï}.u‚¶XB³q<” ës‚½ “>_2ƒÝ "ÆLü¢%„Ý‚ü¢.Éq‚©’Ý<ù¢ò‡Ý§”<Û뤔Ƚ ¡âð¢f žó=Éq‚¶sä <’¬qXÕªqÈÙäz‚ôž™žç}"p‚©XÙq<þ u‚˜ \¤ÉY]YQê}È÷¬Ýq<¬ p‚‡XdÞq<—ˆ~.u‚’XÙq<¨•{.ëî}‚’‚ûq‚…‰~Öêž ÈÞq‚¢‹~.p‚…XßqfŽ  u‚êsX½ éð}òt‚ƒÖƒväg¨Ý":LÓ ­ßX×¢‚ü}òp‚½ßXà<u‚tȻ맔ֽ ôXÛ¥~Èp‚ëX¸<ÁrX‡øq<ž u‚ìsX½ Ù¯‚ÇX—ròé w.K‘KYYùZK[-K„®$ì~X½ Ã~Èp‚ÍX—rfÛ ¤r<  :u‚ØX”r.½ Ù®‚*XµròË wÖK‘KKKZKM-K„¸~Íf³~äp‚ÝXF<ÁrXù †r<ž u‚ìsXà ¼rX– §}‚Á¥ròÛ ³~ÖË‚µ~Xp‚ÛXH<ÁrX÷ ˆr<ž u‚ìsXà ¼rX– §}‚¿§ròÙ IÈì~X v‚XÑ~<p‚äsXÜ £r<Ÿ u‚ësX½ £¶~‚Èžv í~Xp‚½X§r<Ú ¥r<Ÿ u‚¯X¼rX½ ÙÈ‚Ó~ÈÔf È ~<p‚ôX¯¬ÁrX‘Œ~<u‚ÿXîq.– §}‚ˆÐXŽrò¢ ‚ì~XÔX ‚µÈËX¢~<p‚îX’~Öu‚tXó ȃXgñïq<‘ý}¬p‚uÈÂß í¡:ì~XÆ M‚/X¾~.p‚ÖXŽrfâ r<ô ª~<u‚áX‹r.½ ÙႬròÔ N‚ì~X“J-žÀ~<p‚ÆXg<#<”r<î °~<u‚ÛX‘r.½ ÙÛ‚²ròÎ N%gœÞ"¸LÓ ­ßXã¡‚ð~‚p‚½ßXà<u‚«È éJЕ2°êXï–Xá~‚p‚ÀêXÀ•<u‚äXgñãr< ñ~¬p‚uÈÂßÙ *„<Ïr‚± ü~.p‚”XÐrfŽ  u‚êsX½ øá~òt‚’ §Ö®5É;=YY‘g‚'HºÓs¬­ p‚ÈXœs<Žæ ™s<  u‚êsX½ ­¬‚(‚ås‚› s.Öc¬p‚-Xwf <Õs‚« S¬u‚ X=ás.” ës‚½ ôr¬âs<¬ p‚+Xyf¿s<¢ +u‚6Xµs<Ì ñ|.J‚6‚×s‚© Óu-h‚Ós¬­ p‚$XÀs<Ž ½s<  u‚êsX½ ˆQ‚òr¬âs<¬ p‚XdÆs<¢ +u‚*XÁs<À ý|.ƒV‚*‚ãs‚ qÖužÞs ­ p‚XÇs<Ž» Äs<  u‚êsX½ X‚È ži¬ <p‚XæsÖš du‚  £ Èp u‚XÔsfŽ– §}‚ôòsòŽ p(u. Xäs<ž ás<  œ}.ä‚tòþ (x.`désX™ æs.¼ Ãvž …tòû (z‚^ésÈ™ æs<¼ ߇tòù z*Ìës<— ès<½ ݉tò÷ =yös<’ ís.” ës<– t ó ;bös< ðs.‘ îs<“ ª}.Ötòð n8‚t.½ Â8†t<ý ‚t<½ ¤tòÜ =ˆt<û „t<½ Àa½Št<ù †t<½ ¾¨tòØ ,z;Ž”t<ï t.ñ Žt<ó Ê}.¶°tòÐ r”täï t<½ ´:b”t<ñ Žt.ó Œt<õ È}.¸®tòÒ ÚªtPÕ =Œt½ ï7  ( "×’£rL YÌʪ”$EåYæä Ê$È>!K;u>"ÐÛf•«¤X„ ++ Jæ„!$È>óK;uæ"h„Ûf•÷¤X„ #(( (ô5 òæ®ó5 òvØÊÊö  y!_XLK’JsX\HNLK\KJsXLNLKLO„óóKß}ò I‹Íã=*@Æ‹/ŽÏw<µ$1ǃËw‚µŽ\Öñwh†ÖK‘KKK$*oÿwlùVf*tXX(<‡xtùÌq$9d$.•xtë1D=+?aX.c¯x<ý<ƒx9ýrT$,.…xtûjxežy'Cñw2éffthX<—xtéu ,sf¼ <¤xtÜ1@_vfq.ûx<¿%†'„x.Åx<Á7ù2ÕÚ"œL©¥‚gñ¸’q.Åx<¿%F,8‚$[.q.ûx<˜ÖN¤uIg„IKˆ¼K JO8ûx<’2=KH„t)gÛ":Lþ¤‚‚Ûòó¤fÛ.ä¤<ûx<‡-€ûx<g.F\x)6z¬^‰yXõ*C2¡Û "œLΤt²Û.Þ¤)¢Û‚Þ¤J¢Û‚Û¤º„y¡âý¤žgüÚJã¤/K=â’q<‘y.þu<#$“y`ÌÖ\¤uWgYYW_‘‘ X]ȹy:ÇýJ žæ‡«w¬ÐLK’Ô}0>0Ö>HYu%gÍÛX"¸L²¤)ÎÛòß*¡âzž—¤'å;ƒ$Yט'²wJÎè}N%2Êyf¶=\ÖÔp‚¬ .(¯p¬Ò­p<½ ™Ípt³+u¹Ò¶pÖͲp<½ ’E»p¬Æ¹p<½ H½p¬Ä»p<½ ‹IÜp#¤etw%ž|%>Ýå;ƒ4Y×e'Þt¬¢ ¦¬Ú<ÀtX¹Á £Ö¥täÜ £t<½ £ƒQ‚ñt‚ .¨<Ø<ÂtÀ ¿t. ½t<Ä º»t.Á †àtò  Óƒ¹«ÖÑ<Ét<¹ Æt<¹Á ÿxÈ·<É<Ñt± Ît.³ Ìt<µ ºÊt.Á ÷ïtò‘ ·Ö<).Ót<® Ñt<¹Á õ¹È<.ât<Ÿ àt<¡ Þt<£ Üt.¹Á æ€uò€ HÖ< .ñt< ït<’ ít<” ët.¹ º×uòñ sÖdX<þt<ƒ üt<¹ ºv­ œutä ,fX<€u< þt<¹Š º¸~‚v« sÈužö ‰u.ë ”u<¹ú …u<ü ƒu.ý ºÅ~‚vž «uòÕ ÔwÈ .u<é –u<ö ‰u<¹ø ‡u<ú …u.û ºÇ~‚vœ ­uòÓ iÖÄuȼ ¦u¬¹¹¹Ä ºvƒ 9_.öàf"L‰Ÿž÷à‚‰Ÿ<¼u‚»ë§”¬Ù릔<¹¹¹Ä ºv XpT<,<®u‚Ô «u.Ö ©u<Ø º§u.¹¹Ä ºvý Ìuò´ Ög¼uòà Ÿuò¹¹¹Ä ºvá ÖN¤ÊIK^WKQW. <ÏuX² Íu<´ Ëu<¶ Éu.¹¹¹Ä ºvÜ íuò“ ÖuvÖg›á"âL䞺œá‚äž<áu‚»ëÍž¬³á<§”f¹¹¹Ä ºvà ÖèuXš åu<¹¹¹Ä ºvà †vòú w.K‘KYYÞ**LL&4‘ñâu<ž j¬<Äut¹¹¹Ä ºvþëÖêž1–á‚êž<áu‚µëÓž¬­á<­”f¹¹¹Ä ºvÍ ÖÞu<¢ Ýu<¤ Ûu<¹¹¹Ä ºvÍ i‚“v‚í .äu<œ ãu<ž áu<  ßu<¢ ºÝu.¹¹¹Å ºvÇ ‚vòþ oÖõuX òu<¹¹¹¹Å ºv¶ ÅøuXŠ õu<¹¹¹¹Å ºv³ ¢ÈÜ<úuX‡ øu<¹¹¹¹Å ºv± tȰ‚Ð<†vXý ‚v<ÿ €v<¹ þu.¹¹Ä ºv¥ ùu‚‡ º¤vòÜ tÖ¼‚Ä<’vXñ Žv.ó Œv.¹¹¹¹Å ºv™ °vtÐ gÖ’1‘)ñÃvJ£ iÖ<¿v.¹¹¹¹Å ºv‚ ÖS‚-<©vXÚ ¥v.Ü £v.¹¹¹¹ä ºa‚v‚ Çvò¹ ÔU‚+<«vXØ §v.Ú ¥v.¹¹¹¹â ºc‚v€ Évò· sÖuxÖ8U-ãvºž ávò  ßv.¢ Ývȹ¦ Ùvȹ¹¹bºÈ wtÿwÖK‘KKY—çWNÅLK gÖ©?ñvÈ ïv ” ëvȹ˜ çvȹ¹¹œ ºÆv‚º wòñÔW=óvXŽ ñvò ïv.’ ívȹ– évȹ¹¹š ºÈv‚¸ ‘wòïÖT2Úvf§ Øvò© Öv.« Ôvȹ¯ Ðvȹ¹¹bºÑ øvtˆ zÖlÖ<àv¬¡ Þv ¥ Úvȹ© Övȹ¹¹­ ºµv‚Ë þvò‚ _Öwò‚ ývò¹† ùvȹŠ ºõvȹbºª õœw‚ät.K‘KKY$*WNÅLK gÈwÈòw<ô‹wȹø‡wȹüºƒwȹbºœ ­wtÓ,‘wÈðw<òwȹö‰wȹúº…wȹbºš J~@øvf‹ ôvò¹ ðvȹ“ ºìvȹbº³ zJþvÖƒ üv<… úvȹ‰ övȹ ºòvȹbº­ aJkX<wXæ™w.è—w.¹ê•wȹ¹¸ñºòv‚Ž »wòÅtÖwX <©wXÚ¥w.Ü£w.¹¹¹¹¹¹æºÇwt¹aÖgžã"âL᜺Ÿã‚áœ<äw‚»ë§”<¹¹¹¹¹¹¹¹fº‡÷Öí‘*“î‚í‘<Õw‚¾ö¤‰<¹¹¹¹¹¹¹¹fºäÖ‘ñåw<›ÇwJ¹¹¹¹¹¹¹¹fºþëÖçœ,™ã‚çœ<äw‚µë­”<¹¹¹¹¹¹¹¹fºÙÖÒw‚¯Ðw<±Îw<³Ìw.¹¹¹¹¹¹¹¹fºÙðwò¢~Ö>#tuv#gêä":L•›%ëäòÅ”.»ë§”ä¹¹¹¹¹¹¹¹fº„X»;='Y×e'ÜyȤ¾y ¹¹¹¹¹¹¹¹¹¹¹¹¹kºˆÖ£y1Þ¡y<àŸy.¹¹¹¹¹¹¹¹fº‰Àyò¿š~Ö‰{<ú…{<üƒ{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tº¢~«{‚Õ*†,s.™{#ç˜{<ö‰{.ø‡{<¹ú…{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºžsÈš{#åš{<ç˜{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºe‚Õ{‚«.. -£{<àŸ{<â{<¹ä›{<æ™{.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºˆÁ{ò»Ö( {:Я{.Ó¬{<Õª{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºû°{Èáž{<ãœ{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tº‹o ±{Èα{<Я{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºøÇ$ #º{<ɶ{<Ë´{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºñĉ·{:ºÅ{.¼Ã{<¾Á{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºäÇ{Èʵ{<̳{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºô·{ȸÇ{<ºÅ{.¼Ã{<¹¾Á{<À¿{<¹Âº½{.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºâç{ò™uÖ€ÆØ{<ªÕ{<­Ò{<¹¯Ð{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºÓv‚€|‚€2Þ{<¥Ú{<§Ø{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÍü{ò„x.#:m-ô{<ð{<‘î{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº·ô{ÈŸà{.¡Þ{<£Ü{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹tºÉqÈñ{0€ÿ{<‚ý{.„û{<¹†ù{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºª|Èï{.’í{<”ë{<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uººñ{Èþ|<€ÿ{.‚ý{<¹„û{<†ù{<¹ˆº÷{.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¨¡|òßqÖ’|<ñŽ|.óŒ|<¹õŠ|<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº™ñÈ¡z‚àŸz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹pºŠ¿zòÁ)¦z‚Û¤z<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹pº… ‚ºz‚Æœz.اz<Ú¥z<Ü£z<¹Þ¡z.àŸz<¹âºz.¹äº›z<¹æº™z.¹¹¹¹¹¹¹¹¹¹¹qº‚Çzò¹Ô«z‚Ö©z<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹qº€tÈ·z‚ʵz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹qºôÕzò«*»z‚ƹz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹rºðrÈÉz<¹Æz<¼Ãz<¹¾Áz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºâv‚ñz‚2Ïz<´Ëz<¶Éz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºÜízò“*5m-åz<žáz< ßz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºÆåzÈ®Ñz.°Ïz<²Íz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºØqÈâz0ðz<‘îz.“ìz<¹•êz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sº¹òzÈŸàz.¡Þz<£Üz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºÉâzÈòz<ðz.‘îz<¹“ìz<•êz<¹—ºèz.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sº·’{òîuÖ€#ƒ{<üƒ{.‚ýz<¹„ûz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sº¨Èôy‚òy<ðy<‘îy.¹¹¹¹¹¹¹¹¹¹¹¹¹¹mº·’zòîÑùyÖ‰öy.‹ôy<ºòy.¹¹¹¹¹¹¹¹¹¹¹¹¹¹nº²—zòéÔûy‚†ùy<ˆ÷y<Šõy.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹nº°™zòçsÖˆz‚ù†z<û„z<ý‚z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹nº£¦zòÚÑzÖõŠz.÷ˆz<ùº†z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹oºž«zòÕÔz‚òz<ô‹z<ö‰z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹oºœ­zòÓsÖœz‚åšz<¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹oºœzÈâz<ä›z<æ™z<¹è—z.ê•z<¹ìº“z.¹îº‘z<¹ðºz.¹¹¹¹¹¹¹¹¹¹pºŒ½zòÃØÖÇyÖ»Äy.½Ây<¿ºÀy.¹¹¹¹¹¹¹¹¹¹¹¹kºäåyò›xÖÏy‚²Íy<´Ëy<¶Éy.¹¹¹¹¹¹¹¹¹¹¹¹¹kºÜíyò“tÖÛy‚¦Ùy<¨×y<ªÕy.¹¹¹¹¹¹¹¹¹¹¹¹¹kºÐùyò‡tÖçy‚šåy<œãy<žáy.¹¹¹¹¹¹¹¹¹¹¹¹¹¹lÄ…zòû'ÖÀy‚Á¾y<üy<źy.¹¹¹¹¹¹¹¹¹¹¹¹¹ÖºÞyò¢Ó»/Ö­ñ±y<Ï“y ¹¹¹¹¹¹¹¹fºþëÖ››>åäòË”.µë­”ä¹¹¹¹¹¹¹¹fº’ä< .;$f¯»»½ºê‚Æ•JºêJ"Å•.Ÿ‚‚aò»¼»»»¿ºY;Y fJ J t t„‚Lµ|JÉòLµ|Y;=k\üKMåËž[LrˆÕJ­’#!ƒõªä ¬‹ó&­s­$÷Œ<å"‚æò%­«<­†~‚¹¹¸¹¹¹¹¹²Þ ‚" &ØÚܨ¥‚ØÚ$ð(»=¹Æ–< ‚? ä0 20 2Z^ztLK¼òÊJ­’#׃ˆµ¬¼Ÿ-"®;åó¹g º/>ŸI¼;u0ZÊX•úµX„ ȼ«» JvX º ¢éÉtå;=g•¶Jƒ°‚ÿÏJ‚°tóýϬ’ÿ¯žÐX»þ¯tKó€ÐÈþ¯„ÐJý¯tó‚ЬÝž€£‚€Ý<€£<Ù«»×K;ƒgKYK6ZLÛÉJ£¶J½Úɺu’#Ƀ ¶„®!»ݯtKó¡Ð¬®¸¼gK;ƒgKKYüÉ bÖrKK®­ƒ ¶ƒ]"¸¼ f$ ‚­#¨äÝžN¤uKKG†F‡U ‚®d¼$»* 3% ô¸¼gK;ƒgKKY­ÛA¹ƒêòå†ä.­=û›Jó-»k )&&& txLLK»»»²¸09 ‚‚J='ºJsºÈh%7‡  v¼óv  . ¬óv    Öóhó" fƒ ( 9˜ªž­=éÕ~fó JWY #ƒWKÉ2MÉàòÞŸ:v’5q3Ýt•Ðtå;=g˜æ~JÓÉJ®¶töÎɬ®¢Ù¬L’wÖrKK®mt=ƒé¯ºŸI» f tvt º#"±äÒ~ž®fc8‚ctï~,gå¹g ºÞµ¬£ÊX ºÔµtKóªÊÈ“¹»gK;ƒgKYKôϬæbÖrKK®»ƒ¨°ƒkŸ˜Ûä’%L-䤞Ÿ-»‚¶fYIKuYWKɰÍÈîËtå;=g˜æ~JúÍJ‡²tóøÍ¬„²¬ýÍJ„²tóûͬ’²žÿÍJ»²tóþͬ®!K‘KYY'ËWKLáËJ­’#׃™´„Z©² ×Í‚»©²‚IKvLƒÕÍ‚ç{X®fÒ~Xf­;ƒgY;=/Žt€u%zºûº²|äu­»»¾ƒI=Ê$äOäO‘Æ÷6×È.<Åêº9¬=%*0œ”äÖˆ ‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸¹¹ôºmX78h.)¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº¹Û:ºgggggggóå)ó)å))ó„*3*333*3333333333333333333333333333***33333*33*33333333333**å¡GµF-ÜÔtå;KgJ•«JëÔt­’#­ƒ«º廟ì~X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹êôžôŒŒó.ôŒ.t¬Œ<;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹ã:.*í-&ô òr(÷¢u'ËŸ9’Ùtˆ tùvt’#‹dXóóóóóóóóóóóóóöóóóóóóó5òîóóó³òðòóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóóó­KòKíÛžuž .„sž .†ó;=™fŸém¬—JémXͤ¬ÇÀy<;‹‘c<c<¹èº—y.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Ût‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸¹¸‰ºUÖ‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸¹“ºIž‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸žº–ÖÌwòªò´X;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¸JÑztõòñØòévò¼À.ÝäŸÏtå;=gß°J¹µ‚ÉÊJ¸µtóÇʬ’ˆ·žøÈžˆ·ºY-/ùÈf° ŒÏtå;=g˜æ~JÜÊJ¥µtóÚʬ­ Ÿ»3.Y;_­K-væ…93ºÎf•Á±X„ #5Ÿã».Ÿã»4Ÿÿ»/ÿ»2ÿ»5ÿ»Óì5®“ºÒìº=ñ¼“< ‚YK±´#ØËX¨´tKóÖËÈ!K;ƒgKYKÈÎ.æbÖrKK®óƒÕ±äk!»”´žîË‚’´tKóìËò¹»gK;ƒgKYK²Î.æbÖrKK®óƒë±äk!ñ»þ³t„Ì‚ü³tKó‚Ìò¹»gK;ƒgKYKœÎ.æbÖrKK®óƒ²äk!ñ» tÄÍtå;=gº²J„ôØßà"£Ÿ¬Ýà<£ŸXÚ¸¼e <ôÉô„Š X~»nº‚»nºK¼K¼RTHNLªÍJ­’#׃Ö²ŸW»g».®K;u0ZÜÌX•Ÿ³X„ %õv47:’ <Ôv.¬ .¨~<ØX÷vXŽ´ò~‚ÕyXdɺ¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÄXN¤YIgƒ»»»»» º†~K»»¼KK º¯'tt÷ÆzòùÝò®’wÖrKK®Ÿƒ«°óÏа¬yCÆyX;‹‘c<c<¹áºžy.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÀâžØ¡­-ƒˆt.⯂žÐ<â¯<«zf‹d¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸°º³¶ÈÉÎÉ.¬žz¬;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¸ÛJ‹e<#\<¹ º\<¸"º].¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸Ëº“XY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº¹ÑJ‹e<#\<¹ º\<¸Úº¥y.¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹µzº¸‹ºÓyXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹Ò¼É±ÎžÉu‚;‹‘c<c<¹Þ º¡u.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹sºØÖføªÈˆÕ<øª‚‹f‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹ÐºŽX78h.)¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº¹­žK‘KYKÌÐ."bžrKK®­ƒѯÍÐ䲯¬ÎÐ<²¯<›z.‹d¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸ÀºøÛÖµ¤ò ûí&š‚æò.š.Ø~¬>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹ÙÖf÷ªt‹ä‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹Ýºžâ"ºкòKö«Å¬’&ô„Íç¬ë›<•äGµ˜X»ågئºääÅXœºtKóâÅÈ¥ò­«Þ<­˜º‚ñÅXºtKóïÅÈ«»×K;ƒgKYK¯Ô bÖrKK®ƒî«äk!e» $ñ¹X“ÆXí¹tKó‘ÆÈí¹•ÆJì¹tó“Ƭðæž‘™‚ïæ<‘™<Ù¹»gK;ƒgKKK6ÊLÊÓJ´¬J½ÉÓºu’#Ƀ±¬„h!»̹tK󲯬®¸¼gK;ƒgKKYëÓ bÖrKK®­ƒ±¬ƒ]¶º KÉÅJ»¶º‚gKƒÈÅ‚G>žN¤vHÉLWƒH[G† J®3»*» *%%#Ÿ'­%#Ÿ%­%#ó%ŽgY;ƒgYMVK$æÉ?`›»¶LFRe»óW»»» 0zØŸe»Éxž #ÑXÍ|‚ã<â‚À|¬À<Â|¬wä<›}X .Ž`.dþ}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº…t¸äç›ä·wäKÊÔfÙ žÔ¯fÉòôÓòŽÌ䬰‚Æy%Ž=ŽŒ;dd<ຟy.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸äì.±Lhu <’ƒsth¥.Øž‚æÞì专žm‚X»x‚;‹‘¸<ˆÀx‚e<é–x.¹¾Ú.€¢x‚»¸¹àº€¡xX,ºS¹áºžx‚¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ŽÓä´ä’Ȳ3ÂÍJ¿²tóÀͬµÌͳJ³Ìtu’#ɃƳ®­ý²žƒÍXþ²ºIKuYWKÉăIKuƒKóèÊò©X×}‚ˆððßÎ Ùž±žææzä›äÆÏ䨰ÖyºCÆyXŽ=ŽŒ;dd<ຟy.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸óÖX‡´žoä€äK¹Ã{JçäN¤YIgƒ¿ÁÐ~žàÌä®bÖrKK®Éƒý³Á}ȱ´ä‡ÉXù¶tKó…ÉÈù¶‰ÉJø¶tó‡É¬®ª¼gK;ƒgKYY–Ñ bÖrKK®­ƒ‡¯k§· ÙÈ‚¨·ºIKvLƒ×È‚¥·žYIKuYWKɪÈÈýО›«‚åÔ<›«Jò~f‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹éºò~ž‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹‚ºÌÔžë°‚•Ï<ë°<¢y‹–^<a<¹‚ºúx.¸ ºu.¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µzº¸¹º¥yXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹™½¤Íäv";‹‘c<c<¹— ºèu.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÎÖ‰´‚÷Ë<‰´<„v‹–^<a<¹  ºÜu.¸ ºu.¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µzº¸× º‡vXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÇÖ“«ÖíÔ<“«<ó~Ö;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹ã¼.ÉÔÌz@‹e<‚ýx.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ùÝÆŸ9Œ Èãžä;ñ» tw‚ ºæv17:¡ <™~<ÙX‚q.‚Åv¬» .èv¬±ò~‚ÜyXŽ‹dǸy‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÙÖt’«t•~XÞ<;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹Û‹e<#\<¹ º\<¸ºòx.¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹µzº¸¾º yXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÙôÖ±uÈ;`-¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¢™äƒvX>z@‹e<  ßu.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ã¼ÉáË<‘Îäˆ tùvt’#Ƀ¾°fÁyf¿<Ãy¬yBŽz=dážy.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸àÖt»°XÁyf¿<Ãy¬yBŽz=dážy.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸÷ ˜~"òXg‚ ‚v˜~Xè‚ì² ÉýË<úwä‹e<#\<¹ º\<¸« ºÔu.¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹µzº¸Ü º‚vXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹Ùôèm‚˜Xèm.꣬¤ä•ìäÔ’gÆÎ"r̪J7»Õ<êž½Õ<©ª.×Õ.¹±ž“yXŽ‹d¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸êôÛ‚¥ò.Û.—~Xé<™~¬yBŽzð<‘~‚g.’+¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¹ä‚×ä®’wÖrKK®åƒŸ±ºÌxX•Öæ©<dd<$º³<ˆÂx‚`<¶½ÖºÁ©.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µº€ïw‚¸ÇºLXî~‚ÜyXY¹¹Íº‚¡xX,ºJ¹êºx‚¹¸¸¹¹¹¹¹¸¸¹¹Î <ýuX>z@‹e<¦ Ùu.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Û‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹sº“ ºËuX7É <›u.)¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹Ò¼É¥Ë<Õx';‹‘c<c<¹Òº­x.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÎÖذ‚¨Ï<ذ<x$Ày<;‹‘c<c<¹ïºy.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÝÖŽ«ÖòÔXª<;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹àÖ÷°ž­»»»»KIƒ¼zÈ-äÅ äºÈtå;=g˜æ~J®ÑJÓ®tó¬Ñ‚­0³Ètå;=gË·JÍ®‚µÑJÌ®tó³Ñ¬Ÿ„½È¬Ä·J¼Ètu’#׃½·®ŸI»g®×Û¬©¤J×Ûº$¦¤»!e» Ètå;=gÞ·Jº®‚ÈÑJ¹®tóÆÑ¬½ÛžĤ‚¼Û<Ĥ<ØËL„£È¬­’#׃Ù·ŸI»gI»ge»Éi¸z¬°äÓx';‹‘c<c<¹Ôº«x.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Ñx';‹‘c<c<¹Öº©x.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸÷ãí³äÉ÷Ã<‹e<#\<¹ º\<¸÷ºˆy.¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹µzº¸¨º¶yXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ýÖ¶±¬ÊÎ<¶±‚KfÌxXé’x<dd<$º³<ˆÂx‚`<¶‘ºíw.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µº€ïw‚¸ÄºOXî~‚ÜyXY¹¹Íº‚¡xX,ºJ¹êºx‚¹¸¸¹¹¹¹¹¸¸¹¹Çßf®’wÖrKK®åƒŸ±ºÌxX•Öæ©<dd<$º³<ˆÂx‚`<¶½ÖºÁ©.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µºì~‚yX¸Ýº¤~X’‚Ëx‚Y¹Þº¡x‚¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹© J²}ä¿~ä±yX>z@‹e<ú½…Â.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ñ¹´äÑÍòãu";‹‘c<c<¹Ä º»u.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ð ìuX>z@‹e<· Èu.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Ç ‘Ëäž´È'ìu<;‹‘c<c<¹¿ ºÀu.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Øß<®’wÖrKK®åƒŸ±ºÌxX•Öæ©<dd<$º³<ò~‚ÖyX`<¶½ÖºÁ©.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µùº”‚íw‚¸óº¢XÉx‚Y¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ J»Ëä̱¬´Î<̱‚µfÌxXÿüw<dd<$º³<ˆÂx‚`<¶§º×w.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µºì~‚yX¸Úº§~X’‚Ëx‚Y¹Þº¡x‚¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹Ö   äéÊä´<b@èu¬Ž=ŽŒ;dd<¾ ºÁu.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸üôØu‘“‚(X¦x‚;‹‘¸<ˆÀx‚e<þx.¹¾Ú.€¢x‚»¸¹àº€¡xX,ºS¹áºð~‚®yX¹¹Õºªy‚¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ã¼É³ÍX÷ÌäⱬžÎ<ⱂŸfÌxX•æw<dd<$º³<ò~‚ÖyX`<¶½ºÁw.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µùº”‚íw‚¸ðº¥XÉx‚Y¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹› ú}¬ãÇÌäׯ<šÐž™´Öb@èu¬Ž=ŽŒ;dd<¾ ºÁu.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸àÖ ž£±ä>X«=‘x¬Ž=ŽŒ¸<ˆÀx‚=d“ìw.½Ú.€¤x‚¹¹¹ßºî~‚²yX¹¹¹Ñº®y‚¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ ›Êäþ©Ö‹d¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹¸ÃºÐž†æ~žÞÏJ¢°òºÎ.»uJz=d¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹‘ ºàt‚  ºñžÉ’Æ‚¸ä­;YgY;=/átùy0¹ªºÞ‚¡ÈßëäØž”ž°³äɆɂÙ|ä˜~Xz=d"]<º`<¶ º^.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹¹·º½}‚ú›~XY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zºåÖ«°ÖÁyf¿<Ãy¬yBŽz=dážy.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ã¼tÉ«ËXÔX«=ûw¬Ž=ŽŒ¸<ˆÀx‚=d©Öw.½Ú.ì~‚¶yX¹¹¹Íº²y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ãø}ä‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹ºÊž9änäìÓ䔩<ÄX¼w¬Ä<™x¬;‹‘©<Õòe<c.¹¾E.5ò»¸¹Mº2È,ºS¹Pº/ȹ¹Tº+‚¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ü©|䨼º¬É÷ÃÜ ƒuº¹¶¸¹¹¹¹¹¹·¹¹• §uXŠ<ÕgX)¹¹¸vº¹zº¹¸Ì  ºžyX°äõtº¹¶¸¹¹¹¹¹¹·¹¹£ £~žöxä äæ|äêÓä³²‚ÍÍ<³²<ŽÖòXw¬ <Ýw¬Ž=ŽŒ¸<ò~‚ÔyX=dǸw.½Æ.¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸òî|ä0ò‡åä9º"¿à"S¤¨ÈÒòŸ<á<¡J±š­ëÓ#Ÿ±ÖÌxX•Öæ©<dd<$º³<ˆÂx‚`<¶½ÖºÁ©.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µº€ïw‚¸ÄºOXî~‚ÜyXY¹¹Íº‚¡xX,ºJ¹êºx‚¹¸¸¹¹¹¹¹¸¸¹¹âÖœ±žôXu¬ <Ûw¬Ž=ŽŒ¸<ò~‚ÔyX=dɶw.½Æ.¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Ñ  XÝt¹š ºt‚îtX¸¹¹¹¹¹¹·¹¹£ –u‚‚ Ëž”©<ÚX¦w¬Ú<„x¬Ž=ŽŒ©<Õò=dd.½E.7ò¹¹¹Lº3ȹ¹¹Pº/‚¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸§áä€uäzºûºÕÈЪ.7:·Õ<¯ª.ÑÕ.¿±ž“yXŽ‹d¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ƒ®‹ÎÈ"rLå±<›Î<ñ±žÎ.ô±žo¬éx¬Ž=ŽŒ;dd<½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸à å~ä Xétº¹¶¸¹¹¹¹¹¹·¹¹¢ –u‚ö ¦zž—Ñäß³Èñu*;‹‘c<c<¹¶ ºÉu.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÌxXº Áv<d"]<º¸<ˆ€‚¢v.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µº€ïw‚¸• ºþ}X€ÌxX‘X¹Üº£x‚¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹þöXs¬ <Ùw¬Ž=ŽŒ¸<ò~‚ÔyX=dË´w.½Æ.¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ØÖµÈóÊ<µJlÖ XRÕtº« Ôt<$ºõ <t‚ XÒt<¶² ºÌt.¹ ºt.¹¹¹¹·¹¹£ –u‚Š ùtXY¹¹¸vº¹zº¹¸ÿñÓäÏ«¬±Ô<Ï«‚þ}¬‚ù}<dd<$º[<¶$ºZ<¹#º\.¹ ºr.¹¹·¹¹‹yº¸¶¹¹¹¹tºÝº~ÈY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº—ë²}ä‹e<#\<¹ º\<¸"º].¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹Ìº²y‚¸Þº€zXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº¹ÇºÈþy‚;‹‘c<c<¹ºc.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹±ºÍy‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹Ìº²y‚¸ìÖ”©<ðXw¬ð<îw¬Ž=ŽŒ©<Õò=dd.½E.7ȹ¹¹Lº3‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ùâz‚žÝz<d"]<º`<¶ º^.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹¹íº‡z‚ùºåzXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zºåÖŸ±ÖÌxX•Öæ©<dd<$º³<ˆÂx‚`<¶½ÖºÁ©.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µºì~‚yX¸Úº§~X’‚Ëx‚Y¹Þº¡x‚¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹â֞讬˜Ñ<è®<åz¬›àz<d"]<º`<¶ º^.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹¹êºŠz‚öºèzXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº„†XÇv‚;‹e<a<¹ê º’v.¸ ºu.¹¹¹¹¹·¹¹‹yº¸¶¹¹¹‚ºùw‚ºíw‚¸¡ º¼vX¸€¢x‚»¸¸áº€—xX6ºIzºðºx‚¸¸¹¹¹¹¹¸¸¹¹Ò¼ÉŽÆ<ê}X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÙÖŒµ<÷t#‰ <ùt¬‡ øt.ŽŠ Õt¬‘ª .Ôt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ñúXo¬<Õw¬Ž=ŽŒ¸<ò~‚ÔyX=dϰw.½Æ.¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸øXq¬<×w¬Ž=ŽŒ¸<ò~‚ÔyX=dͲw.½Æ.¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ã¼É«ÑXö}ä×;ƒgY;=/Ô t ä"ðÌ(š³XæÌºƒ‚2*»õ²òßg9¡<Ôr¬·ÚXõ²‚¾g.Â.ág¬ó t‚˜uXŽ¢½g‹ ¡ ‚ÓgJ¹¹°ºër‚ät‚¹¹¹Ÿ ºàtJ¹¹¹¹¹¹¹¹¹¹¹¹¸†¸}/>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºàÖ ©XÇX¹w¬Ç<–x¬;‹‘©<Õòe<c.¹¾E.5ò»¸¹Mº2È,ºS¹Pº/ȹ¹Tº+‚¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸÷îäûÉä ©XÝX£w¬Ý<x¬Ž=ŽŒ©<Õò=dd.½E.7ò¹¹¹Lº3ȹ¹¹Pº/‚¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ª½…Íäà}†X‚ <­vX=ŽŒ¸<ˆÀx‚=dõ Šv.½Ú.€¤x‚¹¹¹ßº€¢xX+ºT¹àºŸx‚¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸¡ =IƒvÈg÷É"rLʪ<¶Õ<©ª ×Õ.¿µžÉXÄtXµÕ¿µt‚õtX!^ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¿Öô´Ö XRÕtž#õ <t‚ XÓt<¹® ºÎt.¸ ºu.¹¹¹¹¹·¹¹£ –u‚Š ùtXY¹¹¸vº¹zº¹¸ÂÖxžÙ²È§Í<Ù²<Þ~fÌxXz=d"]<º¸<ò~‚°X†w.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µùºy‚¸± º­wXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÈÖʳ<¹vÈÇ <´vfÌ <ºv¬xÎ <¸v ‹e-ê •vò¹¹¹î º‘vÈ*ºU¹ñ ºŽv‚¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ü  ÚÊÖ˳ȵÌ<˳<ì}Ö†XÇv‚Ç <´vXBŽzº<ˆŽ‚³v.d‘,ݺ€¤x‚¹¹¹ßº€¢xX+ºT¹àºŸx‚¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ðÖŸ±ÖÌxX•Öæ©<dd<$º³<ò~‚ÖyX`<¶½ÖºÁ©.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹µùº”‚íw‚¸ðº¥XÉx‚Y¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹âÖó®žà|ò <øz¬Ž=ŽŒ<ðz‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºã¼ÉìÅXvò <Ž~¬Ž=ŽŒù<†~‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºôè}X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºã¼É“Æ<å}X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºã¼ÉÐXÊ䓬¬»}'>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºË‘yX>z@‹e<‘îx.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ˆXa¬<Çw¬Ž=ŽŒ¸<ò~‚ÔyX=dÝ¢w.½Æ.¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Ž K;ƒgKMdK–,·Èä ©XóXw¬ó<ëw¬Ž=ŽŒ©<Õò=dd.½E.7ȹ¹¹Lº3‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ˆÔ}X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºèÞ|ò¢<öz¬Ž=ŽŒ‘<îz‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºã¼É>üÀ.ûØX²±Ö†XÇv‚Ç <´vfÌ <ºv¬xº<ˆŽ‚¸v.‹e-Ü€¥x‚¹¹¹Þº€£xX*ºU¹ßº x‚¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸àÖJyž§©<± XÏv¬± <­w¬Ž=ŽŒ©<ÕÈ=dd.½E.7‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸– ÀÉäˆ tùvt’#ɃÍæ~XŽÍJ×}†X‚<¤vX=ŽŒ¸<ˆÀx‚=dþ v.½Ú.€¤x‚¹¹¹ßº€¢xX+ºT¹àºŸx‚¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸½ gÒÌ"r̪J7»Õ<êž½Õ<©ª.×Õ.ý±ž°XŸwXŽ´ò~‚ÕyXdɺ¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸÷<© tÙXív‚B‹–^<a<¹½ º¿v.¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹‚ºùw‚ùºæXÔv‚G.¸ô º}XÝy‚Y¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹Ê‹e<#\<¹ º\<¸"º].¹ ºs.¹¹¹·¹¹‹yº¸¶¹¹¹¹tºîºð}XY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zºè ­íäßžäãzäίäÄŬ´}È>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÝÖ²±ÖÌxXz=d"]<º¸<ò~‚ÜÏXÚ©.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µùºy‚¸± º­wXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÏÖ±¶žÇÉ䶬ÈÎ}'>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºª½ÓÈòáz'Ž=ŽŒ¦<Ùz‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºæ¼šË.æ´fó™.µ¬<Î}f²<Ð}¬yBŽz=df.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº·ãæø~ä¦Éäˆ tùvt’#Ƀ†æ~XɨÐXÊÉäˆ tùvt’#ɃTí²‚=Iƒ¥ÍÈ”©<öXŠz¬ö<èz¬Ž=ŽŒ©<Ö‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºìÖ´<ñu%Ž=ŽŒ;dd<µ ºÊu.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ª½ÝÈäw‚ <×z¬Ž=ŽŒ°<Ïz‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÙÖë¯È•Ð<ë¯<‹Ð¬½·‚ÃÈ<½·<Æ}fºX¯rº#\<¹Ô ºÆ}<t‚ÆX¨r.¸ ºu.¹¹¹¹¹·¹¹£ –u‚° ÓrXY¹¹¸vº¹zº¹¸‚óæä Œ™Xׯ}*XÜsº#\<¹§ ºó~<t‚™XÕs.¸ ºu.¹¹¹¹¹·¹¹£ –u‚ƒ €tXY¹¹¸vº¹zº¹¸żÉê™<޶‚òÉ<޶<õ~Ö‹X‚t‚Ž=ÿ õ~ºt‚—Xÿs<_¢ Ýs.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÎÖ”©<ÝX£}¬Ý<~¬Ž=ŽŒ©<Ö‚e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºæ¼­Æ.É}X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºã¼Éô™<ðÈÁy'>z@‹e<ây.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸Ñ Xûs¬… <ýs¬ƒ üs<„ ð~ºt‚œXús._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ‡X†t‚Ž=û ù~ºt‚“Xƒt<_ž ás.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸żÉíÎ<ÙX²r¬Î <´r¬Ì ³r<Í §}ºt‚åX±r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸żÉê™<Ä·‚¼È<Ä·<¿}ÖÁXÊr¬¶ <Ìr¬´ Ër<µ ¿}ºt‚ÍXÉr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ¼XÏr¬± <Ñr¬¯ Ðr<° Ä}ºt‚ÈXÎr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸żÉŒšý³Öñu%Ž=ŽŒ;dd<µ ºÊu.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸óÖÞ´ž¿Xªrº#\<¹Ù ºÁ}<t‚ËX£r.¸ ºu.¹¹¹¹¹·¹¹£ –u‚µ ÎrXY¹¹¸vº¹zº¹¸³ ÃXÈr¬¸ <Êr¬¶ Ér<· ½}ºt‚ÏXÇr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÆXÅr¬» <Çr¬¹ Ær<º º}ºt‚ÒXÄr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ’Xùs¬‡ <ûs¬… ús<† î~ºt‚žXøs._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÒÖ±¬Ö»}fÅ<½}¬yBŽz=df.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºóÖ®¬X»}fÅ<½}¬yBŽz=df.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºìÖb‚×·‚©È<×·<¬}ÖÔX·r¬É <¹r¬Ç ¸r<È ¬}ºt‚àX¶r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸×ûÎòë©.•Öæ©<dd<$º[<¶$ºZ<¹#º\.¹ ºr.¹¹·¹¹‹yº¸¶¹¹¹¹tºðÖºí«‚~XY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zºèÖóå~ž÷™.±¬ÖÎ}f²<Ð}¬yBŽz=df.½*¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºàÖ.ž‚¶¬Á~¿XÌs¬´ <Îs¬² Ís<³ Á~ºt‚ËXËs._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÎÖ÷å~‚ÉíÎ<¦Xås¬› <çs¬™ æs<š Ú~ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÒÖë©.•Öæ©<d"]<º`<¶ º^.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹¹äÖº©‚öºèzXY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zºèÖóå~žëÎJÖXµr¬Ë <·r¬É ¶r<Ê ª}ºt‚âX´r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸żÉíÎ<•Xös¬Š <øs¬ˆ ÷s<‰ ë~ºt‚¡Xõs._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸õ ¾~‚ÂXÉs¬· <Ës¬µ Ês<¶ ¾~ºt‚ÎXÈs._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ±XÚs¬¦ <Üs¬¤ Ûs<¥ Ï~ºt‚½XÙs._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸í~K;=k\üKM弞" ä $!µfºË.Ìfº¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹Ìº’A7‡ ºô<åô<åô<åô< äô<åô<åô<åô< äv#’"’wPzº>ÊÍ ‚Ÿ 'u» /æ#ó"®’[Oµ>ʇ  ƒ ue» )®’ (½  É ("&óe» )å’" ËLP8N€¸N"ó¼& 8" "[LP¨K·P„Zó» /#!K;KgKKY{ÊN~K¼K"®u» È%¹»gK;ƒgKKY{hNTó„€LƒZ&u» ºò0æ®õ·¼» ž(Éô„†-ƒzJLɼÉ>ó»É)ô®¢àebåó¹g X'ZYW­0v»8t•ÀGX„ ?'«» w. ºZ X» 0 Xæ5æ;æ;æ5 ­O‘O“ ‚æ5æ;æ;æ5æ#óØ®’[Oµ>ʇ  ­ òu» 0Ê’ (ç  É (ó$óe» *#ÍrLZçÔò™«‚çÔº==š«fó .w f/KÕ ‚ºsÈÉÈ X(5ó(;ó((9» 0wò º×O­ ‚ ‚(5ó(;ó--"W»»ºæ#óØ"[P»yº>ƒ„€L† .­ uÿ» 8#æ ó&¹» f­ äó,óW»»e» *#ÍrLZªÃòÖ¼‚ªÃº==×¼fá‚ )ç   ¬u» 0\ô=²f3€Ð‚¦aW ä# òZ…·LK„­Z…·LK„­­­I»ÂÛf¾¤‚ÂÛº==¿¤f­°Ì‚ª¢J‰ÎäЪX°Õ<¯ª‚ÑÕ.ŵžÉXÄtX¯Õŵt‚õtX!^ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÉX«=Ät¬Ž=¼ ¸ºt‚ÔXÂt<_ß  t.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÎÖq‚ô´ÖãX¨r¬Ø <ªr¬ÿÕ€ª<€Öô´ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÂÖ¾©X–X¨r¬Ø <ªr¬>ŽCº=È_¬‘,fº‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸»ÖÜ·Ö¤È<Ü·<}fãX¨r¬Ø <ªr¬Ö ©r<× }ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ àX«r¬Õ <­r¬Ó ¬r<Ô  }ºt‚ìXªr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÛX°r¬Ð <²r¬Î ±r<Ï ¥}ºt‚çX¯r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸åé9¬ªÒ~'³Ð>K;ƒgKYY´Ì„*Nb½¹L"£~òÊX<²sXŽ=Ï ¥~ºt‚çX¯s<_ò s.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÊX <¸sXŽ=É «~ºt‚áXµs<_ì “s.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸»Ö¤¶<ßs¡ <ás‚  ¾sò .¢ ½sÄ »s‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ºÖ¥¶ÈÔ~¬Xßs¬¡ <ás¬Ÿ às<  Ô~ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸æØ}X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºàû}X…ö}<d"]<º`<¶ º^.¹ ºt.¹¹¹¹·¹¹‹yº¸¶¹¹¹¹Ôº }‚àºþ}XY¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº‚é#’žDWÀy<;‹‘c<c<¹˜âºç.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸æ¼±ÅJÅ~X>z@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹Û‹e<¹¶¸¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹¶¹¹¹¹¹•ºœ ž äèX£r¬Ý <¥r¬Û ¤r<Ü ˜}ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÎÖ¤¶<Ìs´ <Îs‚³ Ës µ «s-× ¨s‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÒÖá´Ö¿XÌsº´ <Îs‚³ Á~<t‚ËXËs.µ «s-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÕÖóå~žëÎ.ÑXºs¬Æ <¼s¬Ä »s<Å ¯~ºt‚ÝX¹s._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸»ÖÁ·<Âr¾ <Är‚½ Ár ¿ ¡r-á žr‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ºÖ·Ö¾È<·<·}ÖÉXÂr¬¾ <Är¬¼ Ãr<½ ·}ºt‚ÕXÁr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ȼëÎtàX«=­s¬Ž=Ô  ~ºt‚ìXªs<_÷ ˆs.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÎÖް‚u«=ãy¬Ž=ŽŒ;dd<º½y.¹¿z.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸°Xw¬ã<Ÿw¬yBŽzº<ò~‚½X˜w.d‘,ɺ¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ŒÖЪ.7:·Õ<¯ª.ÑÕ.ƒ²ž°XŸwXŽ´ò~‚ÕyXdɺ¶y‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹µzº¸ÝÖô´Ö¬Xßsº¡ <ás‚  Ô~<t‚ötX .¢ ½sŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÂÖñ´žÍX¾r¬ <Àr¬À ¿r<Á ³}ºt‚ÙX½r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ȼ÷™Jô´ÖÉXÂrº¾ <Är‚½ ·}<t‚ÕXÁr.¿ ¡r-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÂÖ—HžªÔ‚ÅaJ»Äa<¼Æa-æ.Òž@ªÖÖ‚ÄaE-èÐ ÉaJ·Èa<¸Êa-æ.Òž®ÖÒ‚ÈaE-èΞ²<Ì‚ÍaJ³Ìa<´Îa-æ.  ùaJ‡øa<ˆúa-æ."ž^Ö"‚øaE-èÈ ÑaJ¯Ða<°Òa-æ."ž(¶ÖÊ‚ÐaE-èÊž²Ö΂ÌaE-èžb<‚ýaJƒüa<„þa-æ.ž@bÖ‚üaE-è bJÿ€b<€‚b-æ.žfÖ‚€bE-èžj‚…bJû„b<ü†b-æ.¬jÖ‚„bE-èsž¦bäÛ§b0¼tB¾b<-Âä_%Œ8È"rLåG<›8<©ªJ×Õ.óGž8XðGž¸bÀÖpÅbº¼Æb0¼t<Wð’·bX-èÖÌ‚ <Á` ¿À`<ÀÂ`-æ.ÊžÏ`±Î`<²¶~XÊ‚Ð`X°.¶~» ß`9-貞K‘KYYúÌZ*NdL"¹~$´‚<4?‘Õ`.-è´  <Û`6-è® ë`º–ì`-æ.« î`º“ï`-æ.© ð`º‘ñ`0æ.§ ò`JŽñ`<ó`-æ.Žžs<˜aõŠa<öò~XŽ‚ŒaXô.ò~…žK‘KYKŠv\TLL„æ~1ø‚¡aºà¢a-æ.ö ¤a<-蘞;‚a<€è~ò”‚@‚a<æ.’ ‡aºúˆa-æ.ô ¥aäܦa0æ.ò ¨aH-èï «aH-èí ­aH-èÒžÈPH-±/Ö±pJæh$®’$$"¸¼e <vÉ÷žzX½oºPFL`P»qºN’ Êóñ» ÈZ Xw¬LK¼K¼KŸ ò2R* <c4;—è_.-‘ Ö<mî_¦ n‚<t è_. t.<U4;h<è_.-¼ ÖUJ+<X<<h<è_.º .ŸWWžî_èÖ©‚C‹•é_<˜ ü@ê_æ.– L"4<„` -èžK;ƒgKMdKî}*ˆ‚Z"&<’`<-è† \"$<”`<-è„ ^""<–`<-è‚ `" <˜`<-è€ b·`<èš`0æ.þ d7<œ`¬-èü f<`ãœ`<äž`-æ.Ì .<h@< `.-èÔžÆPV-Ü Ö×K ‚æ’$""  Öq»»xòVNH J}OZ(óe» *'æô$’ Ê!Ê>!Ê®#  Özt»¼¼pò\NxJL`xJN Ê(ós»0$’$v%# fzzžwºNzJN^M¼»tºN „ó(w”¶>ÌgK;ƒgKLWY#v\TôZ:L"uI» º2Î~ ²ž¥{f£‚8<OÖ1<sÈW<õ].-è¿žÉ " äKJC.<v<W<õ].¾".Ñ~ž°XWÑ~ž×|XØXÁ]詞úX%<Ñ]’"<à~‚×|X¥‚$.Ñ] æ.©žúX‹<ë^<’"<æ~‚×|X¥‚.×] æ.©žúX‹<ë^<’">ý~‚×|X¥‚5î] æ.©žúX<ç]’"<ê~‚×|X¥‚.Û] æ.©žúXA†+÷<„.×|Xšb‚-詞èX"ã<‰^-!×|X˜b‚舞K‘KZWKÌ#•.ÚX«.ì^<!.×|X™b‚詞áX¤Xã<‰^X÷!.˜ ×|X™b‚詞ØX­.ì^<!.×|X™b‚詞ÖX¯.ì^<!.×|X™b‚詞ÔX±.Á<º.×|Xšb‚-詞]ë^<ã!®%×|Xï‚ .Ÿ^æ.©žÈXDµ.7×|Xï‚«^.-詞ÈX½<ë^<ß!²¬×|Xï‚6£^ æ.©žÈX½<ë^<Û!¶¬×|Xï‚2§^ æ.©žZ“ë^<Ä!M¬×|Xšb‚Â!.¤| ÓžK‘KYKx[J.$Xa"<Í^ !.×|X«‚î^詞3XOºî^‘,Ä!M¬×|XÜ‚¤|º©ž"Xc"<Ï^ !.×|X«‚î^詞Xf9î^¯!Ð^<°!Ò^¬!.×|XÈ‚¸|º©ž£~Xú<h47×|Xšb‚‘!.î^詞£~X÷<k47×|Xšb‚‘!.î^詞£~Xõ<m47×|Xšb‚‘!.î^詞£~Xó<j7×|X®‚9ï^-詞£~Xñ<l7×|X®‚9zõ^.-詞£~Xï<n7×|X®‚9zõ^.-詞£~Xí<p7×|X®‚9zõ^.-詞£~Xë<r7×|X®‚9zõ^.-èÌ Ý<ð^º!.õ^.æ.Ì Ì<Ê~·`<€!‚_.æ.žK‘KYKx#å|.Ì‚¾<Ø~@¸`<-èÌ Ì<_ ÿ €_<€!‚_¬þ .è|ºÌ ¼<Ú~@¸`<-èÌ º<Ü~@¸`<-èÌ ¸<Þ~@¸`<-èÌ ¶<à~@ <˜_.-èïžæ¼õW/½ ž’ÉL^zºÊ‘¼K((×·ÑòÉ=W=Ê®È /v¼õ fé[½zXLKLK ó»É 0’#(  yÀzXLK’KÊóó» 0æ ô/·½ f’ÉLˆzžÊ»¼K0(ó 9v¼ô f ž(Êó (’#(   žu(( ("Êó#%®®( ó[Oâ·>˽ÄXûž½Ä<û‚hó 9®®( ó’$ó„óË•µ>M9M˜ÄX軞˜Ä<è»ó&Êó&>ô=·½ fôÉõ’Z Xz.µNvJRzXL J:yº J®óI»»[K¹?!K;ƒgKYY|Î*LLb¾ì¬$ ò2×t•q$— àX9¦Yü&ƒY<þ&ÖéwXõ‚!.„Y<ü&.êv—žýXƒ~:éwX” ‚†XÖ-è‘ ž‰X#÷'.†~žûXW†~žéwX‘ XˆXè—žàX<d+¾e<éwXõ‚,§Y-èŒ žëf ~‚àXAx+¾e<éwXõ‚,§Y-è—žÊXQ"/<¹Y-þ%éwX˜b‚èØžK;ƒgKKKɹ¬àX=+¾e<éwXõ‚,§Y-è—žàX9¦Yó&ŒY<ô&i¬¢.éwXšb‚ò&.ôvºÝžueº¬XçY<º&ÈY"ý%.éwXÒ‚®w—žµyX„<b+èY<ý%.éwX™b‚è—žµyX<e+èY<ý%.éwX™b‚è—žµyXÿ<g+èY<ý%.éwX™b‚è—žµyXü<j+èY<ý%.éwX™b‚è—žµyXú<l+<Q.éwXšb‚-è—žµyXæ<çY<¬&SžéwXšb‚ª&.¼w —žµyXÇ<çY<ª&U‚éwX‚ØY<æ.—žµyXô<S+e<éwXÀ‚T.†Z-è—žµyXò<U+e<éwX¾‚V.†Z-è—žµyXð<ZÖ&<W)[<éwX²‚b<(ÞY.-è¯ ž„v$’$v¼½=  ôÉõ˜T Xz.µFH JVF J8·Q®óI»»[K¹?!K;ƒgKYY|Î*LLb¾Ê•~òÆX?‘¸Xæ'™X<è'—~ÖéwXß ‚!.šX<æ'.€v—žÆX<f+Ò~e<éwXß ‚0¹X-èö ž¡~fÆX?‘¸XÝ'¢X<Þ'i¬¸~.éwXšb‚Ü'.Švº—žÆX <z+Ò~e<éwXß ‚0¹X-è—žÆXA+Ò~e<éwXß ‚0¹X-è—ž´Xç~"™<ÏX-þ%éwX˜b‚è žK;ƒgKKKÉÏ~¬XçY<¥'ÝX"ý%.éwX½ ‚Ãv—žUçY<£'ßX‚ý%.éwX» ‚Åv —ž¢Xù~"‡<Ú~‡Zý%.éwX”‚…Zè—ž Xû~"…<Ü~¤à~.éwXšb‚ú%.…ZèÇ žuey¬×~‚Tb<…Zœ'ãX<'â~ÈéwXšb‚›'.Ëvº—žµyXç<à~+e<éwX³ ‚á~.†Z-è—žµyXå<â~+e<éwX± ‚ã~.†Z-è—žµyXã<ç~Ö™<ä~œè~<éwX²‚b<›ëX.-è—žµyXÇ<‘…Zý%‚Z<—&hÖéwX¯‚ëYX•&.Ñw¨ ž{#ó (Ì-­=ò³fó-» f&Yè7ò˜HXè7ºÉ¢HJ%óv$®® &Ë=  ôÉ÷ZŒXz.·HFL Jo< JQ:¼óI»»[M?åK‘KLWY&Î*LL®®ƒ$ÕsR— îX<Õ=^"ó|<“XöXa<’—W.-’(ÖuX— îX<d+‘”}.“XðWXç(.˜W’(ÖuXš  Éü|‚îXAx+‘”}.“XðWXç(.˜W’(ÖuX— îX<h+ý|<“XÙX,™W-’(ÖuX— îX9—Wî(”}.“XðWX-í(¤ ÖuX— ØXe"<«W,ÿ%“XïWX‘(ÖuXæ  K;ƒgKKK‘«}¬½XÄW<É(¹W+ý%.“XïWX‘(ÖuXë  ue¬}¬µyX“ <u+ÆW<ý%.“XîWX‘‘(ÖuX— µyX‘ <w+ÆW<ý%.“XîWX‘‘(ÖuX— µyXˆ <ÄW<Ã(¼}$“XðWX-Â(OÖuX— µyXÇ<ÁÄW<Á(¾}"“X/XÀW.À(ÁW(.ÖuX— µyX‹ <¼}+ÁÃ}<“X-X½}.†Z-’(ÖuX— µyX‰ <¾}+ÁÃ}<“X+X¿}.†Z-’(ÖuX— µyX† <Ä}Ö¼<Á}¿Å}<“X(XÂ}.†Z-’(ÖuX— µyXú<Ð}Ö°<Í}³Ñ}<“XZè}<²ÔW.-’(ÖuX— µyXø<Ò}Ö®<Ï}±Ó}<“XZè}<°ÖW.-’(ÖuX½  #Yï6ò‘IXï6ºÉ›IJ:„"ós»h’$vZ Z Ê   ä’Z X*sºLLPTL JezºQ„óI»»[M€¹?åK;ƒgKZWY&Î*LLb¾"®í{)ìX#<Õ=_!ñ{<“XØX@ ôU.-’(ÖuX— ìX<e+•|<“XöXf.”V-’(ÖuXœ  óú{‚ìX <y+•|<“XâXz.”V-’(ÖuX— ìX<i+•|<“XòXj.”V-’(ÖuX— ìXA+•|<“XÞX,”V-’(ÖuX— ÚX©V-,ÿ%“XïWX‘(ÖuXè  K‘KYYö“£|ËX¸V"È).¶Vÿ%“XïWX‘(ÖuX— ÓXC©V+,ÿ%“XïWX‘(ÖuX— ÉXºV"Æ).¸Vÿ%“XïWX‘(ÖuX— ÆX»VÖÅ)½V¬Ã).º| “XïWX‘(ÖuX— ÄX¿V"Á).¹|““XîWX‘‘(ÖuX— UÄÀV<À)ÂV¬¾).¿|<“X®XÁV‘(ÖuX— ¿XÄV"¼).½|”“Xê}X…Z’(ÖuX— ½X¿|-‡Zý%.“Xê}X…Z’(ÖuX— T¿Â|<„Zº)ÈVtý%.“X¨XÇV¹)Ø~ÖuX— µyXÇ<‘„Z¸)Ç|ž“XðWX-·)Ú~ ÖuX— µyX‚ <Å|+™ë}<“X¤XÆ|.†Z-’(ÖuX— µyXÿ <Ë|Öµ<È|¸Ì|<“XZè}<·ÏV.-’(ÖuX— µyXó <×|Ö©<Ô|¬Ø|<“XZè}<«ÛV.-’(ÖuX— µyXñ <Ù|Ö§<Ö|ªÚ|<“XZè}<©ÝV.-’(ÖuX— µyXë<ß}Ö¡<Ü}¤à}<“XZè}<£ãW.-’(ÖuXÉÖ ð³‚Ì.ð³.Þ}fµyXí<Ý}Ö£<Ú}¦Þ}<“XZè}<¥áW.-’(ÖuX— µyXÇ<‘„Zþ%”<í}‚éwXª ‚ðW<æ.—žµyXÇ<‘…Zý%‚Z<(ï}ÖéwX¨ ‚òWXŽ(.ØuÌ Ç<‘“‚Z<þ%W=ƒZfæ.É֞豂˜Î.è±.ffµyXå<eÖ<bf<éwX±‚c.†Z-èÌ º<`+ <”Z.-èýžK;ƒgKMVKþw*Ì‚¬<n+<¢Z.-èÌ ª<p.<¤Z.-èÌ š<³Z<Ü%¦Z0æ.Ì ¦<t³Z<Ú%¨Z0æ.Ì ¤<»+Åvº <ªZ.-è ž…Ê)­=ýµfó-»ºstÌ‚ö <éz+—¤{ºÜ<ØU.-èÉÖžûµ‚…Ê.ûµ.¼sfÌ‚ø <çz+™¢{ºÞ<ÖU.-èÏ žæ"’""  tü¼wºLLLO;» óóe» *vX º f" "v$®$v ¢  Özž¼sò^LxJL`xJL  ( ò’’’’#Zó&®ó&>õW/½ ž’ɸwòZxJLLLNQ( (w“·>\~† äÉ (uËM?!K;YgKKY|Ê\,Le·NZ®u» òwÈ ºj‹~t—XÞ<¨XØ¥Jæ~<ŠsXŒ‚>T.-èö ž—XÌ<ºXƶ»æ~<ŠsXŒ‚>T.-è螥JÛ<¨<8;T.Î,.Ž~žóXªXÕŽ~ ŠsXŽX‹Tèö ž—XÆ<@XÀ½º:è~ŠsXŒ‚;T.-èÏžu¦~"—XÂ<DX<AJæ~<ŠsXŒ‚>T.-èö žÉXNX2<T‚,Qæ~<ŠsXŒ‚>T.-èö ž—X#<^‹T—,èS<˜,`¬æ~<ŠsX‹‚%.c¬‡Tæ.§žK‘KLWY&ÌZ*NdLʺ~ò—X-<T‹T,âS<¢,V¬æ~<ŠsX‹‚/.Y¬‡TŸ,.Çqö ž—X'<_Xè~<–Žê~<ŠsX‹‚T.-èö ž—X<vXè~<–Žê~<ŠsX‹‚T.-èö ž—X@ç~X˜:Ž;ë~.ŠsXšb‚-èö ž„XT¬,<þ~¬¢U-Þ*ŠsXñ  K;ƒg[UKLWKƒÿ~žõXc¬<¯T<Þ*.¡UÝ*ŠsX˜b‚èö žåÿ~žóXe¬<f¢U-Ý*ŠsX˜b‚èö žðXh¬<’f¢U-Ý*ŠsX˜b‚èö žîXj¬<”f¢U-Ý*ŠsX˜b‚èö žZÖËT<É+¹T‚Ü*.ŠsXá ‚Ÿrö žéXo¬<™fÎÔTÜ*.ŠsX™b‚èö žZÖx<ÓTÄ+»T<Å+½T¬Ü*.ŠsXÝ ‚£r<ö žÒX°<ÎÓTµ+ÊT<Ã+›ÖŠsXšb‚Á+.¥r<ö žÒX<uÖª<ám<°ŠsXÉ ‚ÑT<-èö žÒX<wÖª<ßo<°ŠsXÉ ‚=ÐT.-èö žÒX?­"Γ­<ŠsXÊ ‚ÐT.-èö ž>XæT"Þ*.¡UÝ*ŠsX˜b‚è« žK‘KYKöw¿X0XôT"Œ+.RŽŠsX™b‚èö žZ,õT<Œ+öTtÜ*.ŠsX¤ ‚Ür ö ž7XCæTÖÞ*.¡UÝ*ŠsX˜b‚èö žZîz³Z<Š+TžŠsXšb‚ˆ+.Þr ö žÖtXÔ <X+îz<ŠsX  ‚úT.-èö žÖtX¬ <îz³Z<†+X‚ŠsXž ‚üT<æ.ö žÖtXÐ <\+îz<ŠsXœ ‚þT¬-èö žÖtXÎ <^+îz<ŠsXš ‚€U¬-èö žÖtXÄ <cÖ<hf<ŠsX悪<ŠU¬-èö žÖtX <eÖ<jh<ŠsX您<ŒU¬-èÿžƒôó» Èv º  æô"®®’®j .’É“Xyt»ròNVPNxJL” &%ó»0ß‚ "æ"®® ZóÊ>óÊZõ  ì’Z Xz.uºJq‚RzXL Jw< JyúQÍ%²Z<Š.y¬Û|<ŠsX¢‚zÈþQ„..âoö ž‹X„X”R.Î%Ÿ<•RXÜ*.ŠsXü K;ƒgKMVKõ|*‹XËrX«<ïwX‘<£R.-Ý*ŠsX˜b‚èö ž‹XËrX©<ñwX<¥R.-Ý*ŠsX˜b‚èö ž‹XËrXÍ`<Î%<ƒ}tŠsXšb‚æ.ö ž‹XËrX¥<õwX’<ù©R.Ü*.ŠsX™b‚èö ž‹XËrX£<÷wX‰<‰}÷‡}.ŠsXšb‚-èö ž‹XËrX¡<†}Xú<‹}îz<ŠsXí‚­R.-èö ž‹XËrXŸ<ˆ}Xø<ûw <ŠsXë‚}.¢U-èö ž‹XËrX¬ <¡UÍ%²Z<Ñ-Š}¬?ŠsX邱R"æ.ö ž‹XËrX›<Œ}Xô<}JŠsXæ‚’<ï³R¬-èö žÖtX¬ <‰˜SÚ*¥U<é,õ}ÖŠsX‚™SXç,.ÿpö žÖtX³ <ô}ÖŒ<ù}‡÷}<ŠsXæ‚™<›S¬-èö  ÖtXª <ðz³Z<Ý*U?¤Ufæ.Ì ™ <´U Ì*³U<Í*µUòË*.›sÜ žK;YhWKLKö#˜s.Ì‚‹ <Ôz+;ñ<ÃU¬-èÌ ™ <´UÍ*µU-æ.Ì ‰ <Öz+;ï<ÅU¬-èÌ ‡ <Øz+;í<ÇU¬-èÌ … <Úz+¦•{ºë<ÉU.-èÌ ƒ <Üz+¤—{ºé<ËU.-èÌ ß<8¶ZÊ%µZ<Ë%·Z-æ.ÉÖžœ±‚äÎ.œ±.›xfÌ‚™<F+:µZÖ-èÌ ñ<n+uº <ÝZ.-èÉÖžö°‚ŠÏ.ö°.ÁxfÌ‚ó<l+sº <ÛZ.-è°žœz‚ä<+ •Ðx¬°‚êZ¬-èÌ ß<’ìZ”%ëZ<•%íZ-æ.Ì Ù<õZ9-èÌ Ö<÷ZŠ%øZ0æ.Ì Ó<ûZ9-èÌ Ñ<üZ…%ýZ0æ.Ì Î<ÿZ‚%€[0æ.Ì Ë<‚[ÿ$ƒ[0æ.Ì É<u[<ý$…[0æ.ˆžÄz‚¼<‘[ ï$[<ð$øxXˆ‚’[Xî$.øxÌ ´<™[è$š[0æ.Ì ±<œ[å$[0æ.Ì ®<Ÿ[â$ [0æ.Ì ¬<¡[ºà$¢[0æ.Ì ©<¥[<-èÌ ¦<§[ºÚ$¨[0æ.Ì ¤<u+ ª[-èãžézX—<¶[ºÊ$©'×Xµ[<Ë$·[¬ò#.ôy‚Œ À{X‰<Ä[º½$·‚ôy‚Õ‚Å[fæ.ÌžK;YgKKY{Z\~K’K0¬‚À{Xû<u+ E<ôy‚Ç‚Ó[X-茞À{Xð< Ô[<­$G‚ôy‚Å‚Õ[fæ.¡žK‘KLWYÏËWNLKÊW&X©{XÍ`<›$Y¬V‚ÑXç[<™$.¯žz‚Œ X©{Xá<_.V‚ËXd.‰\-Ê#žz‚Œ À{XÍ`<„$p%V‚:Xu. þ[È#.žz‚Œ À{XÂ<‹\‚$r¬V‚8Xw. €\€$.Hžz‚â ê{XÍ`<ó#V.žz‚Œ‚Ž\¬æ.ŒžÀ{Xì<á[ $T¬V‚ÖXâ[¬È#.žz‚Œ À{XÍ`<’$b%V‚ÈXð[<È#.žz‚Œ À{X’<»[Æ$®¬ôy‚Þ‚¼[<æ.ŒžÀ{Xð<Ý[À$´¬ôy‚Ø‚Â[<æ.âžê{XÍ`<Ï#a¬žz‚‚™\<æ.øžK;ƒgKKKÉdžê{X¦<§\Ú#u< pÖžz‚ò‚¨\XØ#.Žzâžê{X¤<r7žz‚ä‚? ª\.-èýžŸWƒz‚Ì‚–<·\Ê#¸\0æ.Ì ‹<fÜ\¾#Á\<¿#Ã\-æ.ΞK;YhWKLKö#¦z.Ì‚ü<u. Ò\X-èÌ ñ<Ü\¿#Ã\0æ.Ì ñ< Ó\<®#Ô\0æ.¸ž”|Xì<á\º #Èzò¸‚â\fæ.Ì á<e.í\X-褞K‘KLWYÌËÐz.Ì‚Æ<‡]†#ü\0æ.Ì Á<Œ]÷"‹]0æ.É֞ȮÖïzfÌ‚Å<+”;=‰].-èÌ Á<•‡]ƒ#ü\<„#þ\-æ.¦ ¦|Xá<e.í\.-èÌ Í`<ó"]0æ.Ì <·`<è"š]0æ.÷žK;ƒg[UKLWKƒƒ{žÌ‚¥<ñ|·`<Ù"©]0æ.üžåƒ{žÌ‚£<ó|@<«].-èÉÖž˜«‚èÔ.˜«.Ÿ~fÌ‚<¹`B-èÌ <»` ź`<Ƽ`-æ.Ì  <Á`B-èØž,ÄPH-¼/ÖöÂPV-Ä/Ö¾PH-Â/ÖÀPH-à/Ö"$ÌÄò´»‚Ìĺ==µ»J_"€‚¢PH-ó/ÖQÖ€1‚PH-Ä/Ö€ ‚ PH-±ôÖ³»‚ÍÄ.³».`f€"‚žPH-­¼ÖÊÉJ‰}‚YЂÑ|<‹–^<a<¹º`.¸ ºu.¹¹¹¹¹·¹¹‹yº¸¶¹¹¹¹­ºÈ|XŠºÔ|XÛþ|‚¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹zº®Y ‚6<à|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÑ ÈXÃr¬½ <År¬» Är<¼ ¸}ºt‚ÔXÂr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¿Ö²±ÖÌxX‚Öù©<d"]<º¸<ˆÈ΂Ú©.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µº€ïw‚¸Ýº¶Xî~‚ÝyXY¹Ìº³y‚¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÈÖ…²ÈûÍ<…²<²fÌxX‚ùw<d"]<º¸<ˆÈ‚Úw.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µº€ïw‚¸Ýº¶Xî~‚ÝyXY¹Ìº³y‚¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÈÖ›²ÈåÍ<›²<œfÌxX˜ãw<d"]<º¸<ˆÞ‚Äw.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µºì~‚yX¸óºŽ~XÝy‚Y¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹ÌÖ²±ÖÌxX‚Öù©<d"]<º¸<ˆÈ΂Ú©.¶Âv.¹¹¹¹¹¹·¹¹‹yº¸¶¹¹¹µºì~‚yX¸óºŽ~XÝy‚Y¹¹¸vº¹zº¹¸¸¹¹¹¹¹¸¸¹¹Õ¼ÀÜ.«räâX©r¬× <«r¬Õ ªr<Ö ž}ºt‚îX¨r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸„º ò­ uÕ» 2wt º„#ó v ­&>ó;»=¬Õ‚ôv#èÚ™¥‚çÚ<™¥†î{<t‚›Xûp.ˆØp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX3‚þp‚>ó{<t‚ötX .ƒÜpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX2‚ÿp‚>€ô{<t‚ötX .‚ÝpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX0‚q‚>þö{<t‚ötX .€ßpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX+‚†q‚>ùû{<t‚ötX .ûäpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX)‚ˆq‚>÷ý{<t‚ötX .ùæpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX&‚‹q‚>ô€|<t‚ötX .öépŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX$‚q‚>ò‚|<t‚ŠXŒq.ôìp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸É¹» fÉ 4 Fwt º%0æ#ó„­&!I»»®;»=­væ#¾Ùò悽Ù<æ<ØËL„­’óW»ÉI»»e»‘i¯{žÚX‚¤p‚=Û™{ºt‚ötX ._ º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXˆ‚©p‚=Öž{ºt‚ötX ._ º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‡‚ªp‚=ÕŸ{ºt‚íX©p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX…‚¬p‚=Ó¡{ºt‚ëX«p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX€‚±p‚=Φ{ºt‚æX°p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXþ‚³p‚=̨{ºt‚äX²p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXû‚¶p‚=É«{ºt‚áXµp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXù‚¸p‚=Ç­{ºt‚ßX·p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ž fÉ u»«8ÖX¹Ö~‚Õ‚Ñ{ÈÚX›‚–p‚=é‹{ºt‚X•p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ŸK‘KZWY&Î*LLvÿzòÚX¤‚=ŒpX=ó{ºt‚‹X‹p<_’ío.½Š .»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXŸ‚’p‚=í‡{ºt‚ötX ._ º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸‚±{ÖÚXõ‚¼p‚=ñ{ºt‚ÛX»p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXò‚¿p‚=À´{ºt‚ØX¾p._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXî‚Ãp‚=¼¸{ºt‚ÔXÂp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXí‚Äp‚=»¹{ºt‚ÓXÃp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXë‚Æp‚=¹»{ºt‚ÑXÅp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXè‚Ép‚=¶¾{ºt‚ÎXÈp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXæ‚Ëp‚=´À{ºt‚ÌXÊp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXä‚«pº"]<׺Â{<t‚ÊX¨p.¶Âv.¹• º»‚¯pX¹¹¹¹·¹¹9¥‚ÏpXY¹¹¸vº¹zº¹¸³ ÚXá‚Ðp‚=¯Å{ºt‚ÇXÏp._‘, º»‚·pX'ºX¹Ëº´p‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚXß‚°pº"]<ÒºÇ{<t‚ÅX­p.¶Âv.¹• º»‚¯pX¹¹¹¹·¹¹9¥ ‚ÔpXY¹¹¸vº¹zº¹¸³ ÚXÆ‚ëp‚>”à{<t‚¬Xêp.–Êp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ÊK;ƒgKYYÌZ*Nb½¹L"Ô{$ÚX?‚<ápX>žÖ{<t‚¶Xàp< ¿p¬’Š .ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX?‚ <çpX>˜Ü{<t‚°Xæp<šÅp¬’Š .ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸­†|ÖÚX ‚‘q‚>î†|<t‚…X‘q.ððp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚”q‚>ë‰|<t‚ötX .íòpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚˜q‚>ç|<t‚ötX .éöpŒ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚™q‚>æŽ|<t‚þX˜q.èøp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚›q‚>ä|<t‚üXšq.æúp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚žq‚>á“|<t‚ùXq.ãýp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚ q‚>ß•|<t‚÷XŸq.áÿp-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX‚¢q‚>Ý—|<t‚õX¡q.ßq-Œ ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÚX ‚ƒqº"]<ÿºš|<t‚òX€q.¶Âv.¹¹¹¹¹¹·¹¹£ –u‚ܧqXY¹¹¸vº¹zº¹¸³ ÚX ‚§q‚>Øœ|<t‚ðX¦q<Ú…q¬’Š .ót‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ËXÂq‚Ž=¿µ|ºt‚×X¿q<_âq.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸õK;ƒgKKY|^*LLb½»ZNÛ|Ö¥Xæq¬š<èq¬˜çq<™Û|ºt‚¬Xêq._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ¢XÇqº#\<¹¼ºÞ|<t‚¬XÂq.¸ ºu.¹¹¹¹¹·¹¹£ –u‚˜ëqXY¹¹¸vº¹zº¹¸³ ÕX¶q¬Ê<¸q¬È·q<É«|ºt‚áXµq._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÏXšqº#\<¹éº±|<t‚ÛX“q.¸ ºu.¹¹¹¹¹·¹¹£ –u‚žqXY¹¹¸vº¹zº¹¸³ žXíq¬“<ïq¬‘îq<’â|ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ Xîq¬’<ðq¬ïq<‘ã|ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ›XÎqº#\<¹µºå|<t‚ötXx.¸¹¹¹¹¹¹·¹¹£ –u‚‘òqXY¹¹¸vº¹zº¹¸³ ˜Xóq¬<õq¬‹ôq<Œè|ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ –XÓqº#\<¹°ºê|<t‚¢XÌq.¸ ºu.¹¹¹¹¹·¹¹£ –u‚Œ÷qXY¹¹¸vº¹zº¹¸³ ”Xùq‚Ž=ˆì|ºt‚ Xöq<_«Ôq.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ‘Xüq‚Ž=…ï|ºt‚Xùq<_¨×q.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ Xþq‚Ž=ƒñ|ºt‚›Xûq<_¦Ùq.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ öX•r¬ë <—r¬é –r<ê Š}ºt‚‚X”r._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ K‘KYY|Î*LLvþ|ò€X«=r¬Ž=ô €}ºt‚ŒXŠr<_“ìq.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ úX‘r¬ï <“r¬í ’r<î †}ºt‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÐX»r¬Å <½r¬à ¼r<Ä °}ºt‚ÜXºr._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ âmägÓÈZʪf¶Õ<©ª‚×Õ.¿µžíX sXµÕ¿µt‚õtX!^ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸µ æü}äíX«= s¬Ž=à ”~ºt‚øXžs<_ƒ ür.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸îÕЪX°Õ<¯ª‚ÑÕ.ŵžíX sX¯Õŵt‚õtX!^ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ȼ‹ÇIHtY ‚'<ï|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¹Y ‚$<ò|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¹Y ‚"<ô|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºçRäY ‚<÷|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºäUäY ‚<ú|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¥¬räÓ X–gº#\<¹íº­r<t‚ß Xg.¸ ºu.¹– º¡ ‚ÈgJ¹¹»ºër‚Ùt‚·¹¹8ö ÑtJ‚ºgXY¹¹¸vº¹zº¹¸…®räÐ X»g¬Å<½g¬Ã¼g<İrºt‚Ü Xºg._‘, º¡ ‚ÑgJ¹¹¹²ºër‚ât‚¹¹¹¡ ºÞtJ¹¹¹¹¹¹¹¹¹¹¸³ Ë Xžgº#\<¹åºµr<t‚× X—g.¸ ºu.¹– º¡ ‚ÈgJ¹¹»ºër‚Ùt‚·¹¹8ö ÑtJúÂgXY¹¹¸vº¹zº¹¸ý¶räÈ XÃg¬½<Åg¬»Äg<¼¸rºt‚Ô XÂg._‘, º¡ ‚ÑgJ¹¹¹²ºër‚ât‚¹¹¹¡ ºÞtJ¹¹¹¹¹¹¹¹¹¹¸³ à X¦gº#\<¹Ýº½r<t‚Ï XŸg.¸ ºu.¹– º¡ ‚ÈgJ¹¹»ºër‚Ùt‚·¹¹8ö ÑtJòÊgXY¹¹¸vº¹zº¹¸¹7äH]-œ7ÖåH(œ7æH,š7.¦yÖÁ‚þNJ‚1ýN<ƒ1¿ÖÁ‚ÿNÖ¯ôtÕ¼‚«Ã.Õ¼.¼fÄ‚¼:Ä‚üN¬-ÅÖ äÇrä· X²g<αg<$ºõ <t‚à X¯g<¶Õº©g.¹ ºŠ .¡ ‚ÉgJ¹¹ººër‚Út‚¹·¹¹8ö ÑtJæÖgXY¹¹¸vº¹zº¹¸Ìô½¤‚ÃÛ.½¤.ªrfÖ Xµg¬Ë<·g¬É¶g<ʪrºt‚â X´g._‘, º¡ ‚ÑgJ¹¹¹²ºër‚ât‚¹¹¹¡ ºÞtJ¹¹¹¹¹¹¹¹¹¹¸´7vÖ <éH‚—7.ŸWèH,€7ÖIºÿ6€I<€7‚I5õ6tK‘KKY{ËNLKÊðøHº„7ûH<‰7ùH57tÿHU-ó6ÖIX-Â0Ö<‚D:<‚„O¬-Â0Ö;‚„OJü0ƒO<ý0EÖ;‚…OÖÀ0t-‚’Otï0SÖ-‚“O'í0.SÈ‚b:‚¢O¬-×0ÖK;ƒgKYKv\T½·LL„V1‚o:‚¯O¬-Â0Ö‚<X7(‚˜OX-Â0Ö‚ <Oºä0^‚"‚žOfÀ0t‚±OJÏ0°O<Ð0rÖ‚²OÖÀ0t ‚t: ‚´OÖ-Â0Ö ‚v: ‚¶OÖ-³0ÖÏOE-ª0ÖY;ƒgYYK˜Î*LLb¾"ï=ÅOE-·0ÖËOE-0ÖäOJ0åO0™0tçOH-™0ÖéOH-–0ÖìOH-”0ÖîOH-Ä/Ö€9‚‡PH-Ä/Ö€7‚‰PH-÷/ÖM.€3‚PH-Ä/Ö€/‚‘PH-è/Ö JöMÖ€5‚‹PH-õIÖK‘KZWKÐZN,Lhe'¶Jµ.>KKeƒ-YgYK¡*“0KðÅ9¼ 91”¤ Xs‚KK Xt<„ JÉu ò"u ò&u òwt º%# ##ô=·½ fôÉõ T»zºLFPO;» óW»» 9wº º"Ê(+&#hóW»É&#„óW»É&#hóI»½Å½ <æÉC†zXX)tºJs‚N Jy<xJN J8¾„óW»»ËK¹?!K;ƒgKYKÎ*LLb½»ZØ twÈ ºjý~ ƒÈäg$;Y t…ÑÈó!XÙ®Jº®óI¼;uØZéÂX•’½X„ %L %wÈ º„ƒƒ;Y„­óW»û຅Ÿ‚ûàº==†ŸJ*‚Ê&ôô&ÊØóW»¼Ê&Øó)9»0»0» 0-+ØóW»»+Ø!I»»0e» *+()ô)ô) &5ó&5ó&5 ò&5ô&;ô&; òØØØì§È›Ø‚å§J—صh¬Ž=̨sºt‚ä X²h<_ïh.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ Í X¾h¬Â<Àh¬À¿h<Á³sºt‚Ù X½h._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ Ë XÀh¬À<Âh¬¾Áh<¿µsºt‚× X¿h._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ É X hº#\<¹ãº·s<t‚Õ X™h.¸ ºu.¹¹¹¹¹·¹¹£ –u‚¿ÄhXY¹¹¸vº¹zº¹¸³ Ç Xv¬ <Æh¬Ž=»¹sºt‚Ó XÃh<_Þ¡h.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ º XÑh¬¯<Óh¬­Òh<®Æsºt‚Æ XÐh._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ­ XÞh¬¢<àh¬ ßh<¡Ósºt‚¹ XÝh._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ « X¾hº#\<¹ÅºÕs<t‚· X·h.¸ ºu.¹¹¹¹¹·¹¹£ –u‚¡âhXY¹¹¸vº¹zº¹¸³ © Xs¬ <äh¬Ž=×sºt‚µ Xáh<_À¿h.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ § Xu¬ <æh¬Ž=›Ùsºt‚³ Xãh<_¾Áh.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ š Xñh¬<óh¬òh<Žæsºt‚¦ Xðh._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³  XÜhº#\<¹§ºós<t‚™ XÕh.¸ ºu.¹¹¹¹¹·¹¹£ –u‚ƒ€iXY¹¹¸vº¹zº¹¸³ ‹ X‚i‚Ž=ÿõsºt‚— Xÿh<_¢Ýh.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ‰ X„i‚Ž=ý÷sºt‚• Xi<_ ßh.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ‡ X†i‚Ž=ûùsºt‚“ Xƒi<_žáh.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ¬ Xv¬ <ái¬Ž=˜Ýt<t‚± Xåi<_üi.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ¨ Xz¬Båi¬Ž=˜Ýt<t‚± Xåi<_¿Ài.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ‹ X€j¬€<‚j¬þj.]‘– .t‚ôtX"]¹Ž ºñt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸µK‘KYKxËòtÖý XŽj¬ò<j¬ðj.]‘– .t‚ôtX"]¹Ž ºñt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ û Xj¬ð<’j¬î‘j.]‘– .t‚ôtX"]¹Ž ºñt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ‹ X€j¬€<‚j¬]".]— t‚ôtX"]¹Ž ºñt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ étX"]<’ºíi.¶Â– .t‚ìtX¹¹¹¹¹¹·¹¹£ –u‚ï”jXY¹¹¸vº¹zº¹¸³ étXŽñi<$º[<¶•º‰u.t‚ötXv.¹¹¹¹¹¹·¹¹£ –u‚í–jXY¹¹¸vº¹zº¹¸³ õ X–j¬ê<˜j¬è—j<é‹u¬t‚ötX ._ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ó Xöiº#\<¹ºu<t‚ÿ Xïi.¸ ºu.¹¹¹¹¹·¹¹£ –u‚éšjXY¹¹¸vº¹zº¹¸³ ñ Xð}¬<œj¬Ž=åuºt‚ý X™j<_ˆ÷i.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ï Xò}¬Ž<žj¬Ž=ã‘uºt‚û X›j<_†ùi.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ í Xô}¬Œ< j¬Ž=á“uºt‚ù Xj<_„ûi.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸ôæ$$Øh®’踼e .æÉ?ŠzX‚y.· Jl‚R Jnªl¬Ž=×wºt‚ïX§l<_ú…l.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ßX¬l¬Ô<®l¬Ò­l<Ó¡wºt‚ëX«l._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÝX®l¬Ò<°l¬Ð¯l<Ñ£wºt‚éX­l._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÛXŽlº#\<¹õº¥w<t‚çX‡l.¸ ºu.¹¹¹¹¹·¹¹£ –u‚ѲlXY¹¹¸vº¹zº¹¸³ ÖXµl¬Ë<·l¬É¶l<ʪwºt‚âX´l._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÔX•lº#\<¹îº¬w<t‚àXŽl.¸ ºu.¹¹¹¹¹·¹¹£ –u‚ʹlXY¹¹¸vº¹zº¹¸³ ÒX©?»l¬Ž=Æ®wºt‚ÞX¸l<_é–l.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÍX¾l¬Â<Àl¬À¿l<Á³wºt‚ÙX½l._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ËXÀl¬À<Âl¬¾Ál<¿µwºt‚×X¿l._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÉX lº#\<¹ãº·w<t‚ÕX™l.¸ ºu.¹¹¹¹¹·¹¹£ –u‚¿ÄlXY¹¹¸vº¹zº¹¸×Ë&$ìàò”Ÿ‚ìàº==•ŸJ-»k&&­óW»ÝຣŸ‚Ýàº==¤ŸÚàÈ¢Ÿ‚Þà.¢Ÿ.Åw.»XÐl¬°<Òl¬®Ñl<¯Åwºt‚ÇXÏl._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ¸X±lº#\<¹ÒºÈw<t‚ÄXªl.¸ ºu.¹¹¹¹¹·¹¹£ –u‚®ÕlXY¹¹¸vº¹zº¹¸³ ¶Xt¬ <×l¬Ž=ªÊwºt‚ÂXÔl<_Ͳl.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ³Xw¬ <Úl¬Ž=§Íwºt‚¿X×l<_ʵl.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸Ìô“Ÿ‚íà.“Ÿ.Ôwf¬Xª>ál¬Ž= Ôwºt‚¸XÞl<_ül.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ©Xâl¬ž<äl¬œãl<×wºt‚µXál._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ §Xäl¬œ<æl¬šål<›Ùwºt‚³Xãl._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ¤XÅlº#\<¹¾ºÜw<t‚°X¾l.¸ ºu.¹¹¹¹¹·¹¹£ –u‚šélXY¹¹¸vº¹zº¹¸Ìô„Ÿ‚üà.„Ÿ.ãwfXîl¬’<ðl¬ïl<‘ãwºt‚©Xíl._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ šXÏlº#\<¹´ºæw<t‚¦XÈl.¸ ºu.¹¹¹¹¹·¹¹£ –u‚ólXY¹¹¸vº¹zº¹¸³ ˜Xr¬<õl¬Ž=Œèwºt‚¤Xòl<_¯Ðl.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ •Xu¬ <øl¬Ž=‰ëwºt‚¡Xõl<_¬Ól.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ þXm¬ó<m¬ñŽm<ò‚xºt‚ŠXŒm._‘, ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¯#_¼ºÂÈ"rLʪ<¶Õ<©ª ×Õ.Žä‡mXµÕ¨ªX!^ÚÕº¥ª‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸­…ÑtK<Ÿ;=nƒ;=5/I=»[%L:oò¼®ò¶m*>ɵm.Ë”m¬’ë.’m‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸â䜮$¨y‚€ÚXµxžÉXÄm‚Ž=½·xºt‚ÕXÁm<_àŸm.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ·Xr¬<Öm¬Ž=ù‘úx<t‚X†n<_˜çm.½Š .·‚»oX¹¹¹Èº·o‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸NlYI/ƒ¿»Áuò=IƒvžgßÂZʪf¶Õ<©ª‚×Õ.¿µžáX¬mXµÕ¿µt‚õtX!^ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ ÕX¸m‚Ž=É«xºt‚áXµm<_ì“m.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ áX«=¬m¬Ž=Ô xºt‚ìXªm<_÷ˆm.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸îÕЪX°Õ<¯ª‚ÑÕ.ŵžáX¬mX¯Õŵt‚õtX!^ ºòt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ öX—m‚Ž=êŠxºt‚‚X”m<_òl.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¸Y…m¬û<‡m¬ø‡m<ù…mž_‘,žºál‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸çuJâm<û<:9ém.Ê.€žXØmXù¯€‚µmX¹ÎºÌx‚åtX¹¹¹ž ºt‚ítX)ºV¹• º·‚³oX¹¹Ðº¯o‚¹¹¹¹¹¹¹¸³ ‘Xüo‚Ž=…ïzºt‚Xùo<_¨×o.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸áØݧž£Ø<¼§XÄØ.Ò²ž®ÍX»§¹š ºt‚îtX¸¹¹¹¹¹¹·¹¹£ –u‚†ýoXY¹¹¸vº¹zº¹¸Ìôù›‚‡ä.ù›.îzf’Xûo‚Ž=†îzºt‚žXøo<_©Öo.½Š .òt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ òX%‚Z<-‚ír¬“ <ïr¬‘ â}<t‚ªXîr<Ž” Ër¬‘Š .ôt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸Ô ß}‚òX/‚P<0‚êr¬– <ìr¬” ß}<t‚­Xër.Ž`· .Èr‹ ôt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸³ òX‚a<‚ûr^<¨ ð}<t‚œX×r.¹¾x.¸¹¹¹¹¹¹·¹¹£ –u‚† ýrXY¹¹¸vº¹zº¹¸³ òX‚n<‚ýr¬ƒ <ÿr¬ ò}<t‚šXþr<Ž„ Ûr¬‘Š .ôt‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸çàX<èmXŽ=ù‘®<ñ‚_Xåm<™æm.¹¾».Ûx‚åtX¹¹¹ž ºt‚ítX)ºV¹• º·‚³oX¹¹Ðº¯o‚¹¹¹¹¹¹¹¸çàX <îmXŽ=ù‘®<ë‚eXåm<™æm.¹¾µ.áx‚åtX¹¹¹ž ºt‚ítX)ºV¹• º·‚³oX¹¹Ðº¯o‚¹¹¹¹¹¹¹¸Îu˜"çXðm¬<òm¬ù†n<ù°<ç‚fXèm.’+¹µºåx‚åtX¹¹¹ž ºt‚ítX)ºV¹• º·‚³oX¹¹Ðº¯o‚¹¹¹¹¹¹¹¸ç×X€n¬€<‚n¬ù†n<ù°<ׂvXèm.’+¹¥ºõx‚åtX¹¹¹ž ºt‚ítX)ºV¹• º·‚³oX¹¹Ðº¯o‚¹¹¹¹¹¹¹¸çÓX„n¬ü<†n¬ù†n<ù°<Ó‚zXèm.’+¹¡ºùx‚åtX¹¹¹ž ºt‚ítX)ºV¹• º·‚³oX¹¹Ðº¯o‚¹¹¹¹¹¹¹¸çŒâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºßZäY ‚<ÿ|X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÜ]äY ‚<‚}X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¹Y ‚<„}X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uº¹Y ‚<†}X>Œâ<}XDyg.’ý.€}‚¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÌþ-äæ#õ·½e .’ÉL^ztÊ‘¼Kô%óe» *æ¼õW/½ žæÉô…W†zX„KM-K>ó»É 9’#(   ‚€„ó»¬Â0É=W=Þ½¬´~"•‚‚ŒNºô1‹N<õ1Í~Ö³‚N"¯ôtܽžJÈ-‚ <µ~6Ë‚õMf-Â0ÕÈæ#õ·½e .’ÉL^ztÊ‘¼K®(ó%÷Á­=оt òvt º¼ fé…½z…ð5XJžð5<JXØ 9"®óô’$„óËOâ·>…Ë5XµJžË5<µJz@‹e<e.¹¾)¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºŒÖЪ.7::h.ÑÕ.©­ž©}XŽ‹d¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹uºÆèõæä È-ø  ±Lhu <’ïtt\£ ‚ß”¼±òóО@º9¬Ò '×f—ØuÀu‚¶ß‚®ä-fª¯$—fê±2çcçt;2–fe-ìzf›fæ7;2šfe-èzfŸfâs7;.žfe-änf¯fÒ7;2®fe-Ôzf³fÎ7;2²fe-Ðzf·fÊ7;2¶fe-Ìzf»fÆ7ºfe-Èôf òwX ºÉºHfÈ7."÷‹‡ /\ØÐ<JÉ=W=ºC¬È~‚«¤HÜ7m,‚m¬ç<ȸCža4‚a¬‚™H/-ò7Öæç ‚ ÈuË»¹?!K;ƒgKYYv\T½·LL(/ oX<×Gº©8 ¬à‚ ¬Ú‚ÞG%¢8tuX <ÝGº£8¦¬Ú‚¦¬ÖÈ=$áGŸ8ª¬Ö‚ª¬ÆÈºòÆ‚º¬8‚€H:-8ÖHò8‚H¬/ÈK‘KKK{v[YTK’‘„h0Uò+‚U¬)ÈŽHò7W')‚W¬ÁÈî@¿.Á‚¿¬;ÈüG„8ýG‚ƒ8.E%;‚E¬Èå«p¬‚o¬øÈ ò·GÈÉ8<¶GÖÊ8<¼h3o‡$Ö¼#K;uØ0ZýX•þbX„ +Lhž;ºÉâD‚;º=W=ìD¬“;‚­=Efƒ»#ƒK;YgKKYx‘(u$# 'vº º¢!K;Ygƒ‘ƒùZ\ŒK’K"&”$ì<ß*”z8bŸ'á<dfXr Xn7Ú»XÅ<y]8ph‡kø`9ˆ¬›aòʺ$%K;YgKKYx‘(ue»y.Hppf©<È`J¸<a,ãX›a3ö~†¤YgYÉø XuJK‘ º’+ òwX ºÉÊ (xJÂu;µYÊa,¶X `òƒKIYtÈgú":L…c6ûXíEÿ^,!XD¬Î}*ßeX-ÆØÖì@ÖófX;¤Ø¼§-¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹õ8óWöP‹c8õXÓCEužâŒg‚;÷èfº™æf<¹›ºäf.¹Ày.¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ö~£:ä_®Î"rL°cfÉ«­«u+œî v¯;KêDž–;D‹E‚äc9N¤YIgƒ¿=Á[*Y;=/œt…b&÷7=IƒvÈg±8Z©ªÖ×Õ.ÎGž²8X¨ª$‰Ö {×;=ÖWÜb/-ÓÕÖ¯ªÈÑÕ.ÔGž¬8X®ª$ûÖ‡cE-öÖKzcJñ‘c0÷tˆcJùž*@ëb –=WìbfätœcH-ÝÖK;ƒgMGKLIKŸtJªcJלpž „€Låh0 „€L壂ëX¼cºÅ•<ë‚•ò^Xú‚Ïcº²¨Ø‚¨ž^Xé‚àc<¡¹Ç‚ác"Øt^Xã‚æcº›¿Á‚›B#^XÓ‚OX^ à‚écº˜B>‚Bò^XÅ‚„dºý]#‚]ž^X&‚<c.‚‹df-ôÖfº^X<‚dºôf‚fž^X/‚sX^È"‚§dºÚ^ž‚«dE-¸Ö‚µdJË´d<̶d-¶tz‚<¸dE-¸Ö‚¹dJÈpž‚lžBÉd ¸Êd0³tÌdJµužØdE-¨ÖÙdJ¨œœÝdJ¤¢=ž»§4£ržìdº•íd5„tüdF-ýÖK‘KYYÌZ*NdL"$oX<4@W‘òdX-ŠÖuX <ød>-ùÖˆeù‰e5ôt‹eöŒe5òte<ôŽe5ðteògäsµeÙw*K‘KYKŠv\TLLZ^0¾eÿe%Á.ªb*#Âe¿*&/žeãz*¤eÝ¥e<¸t/g/âeŸw7K‘KYY|ÌZ*NdLØ*ÿÙe©z7f<øe‰7Z<þeƒ7<ƒfþs7;,“fî7;2’fe-ð°8"Ñ J¯_tÑ .¯_òtÑ .=WƒÉÛ(¸_äÊò‘Ÿvft ¬é*¿_tg³ È™ztçtu˜zÖY;=gKå;=gÖ©ÎfÖ_¬Ó/Yóʃ¡²ežœ tä_ttOKK°ù ÈéÈÊhJ¼hiÛ^¡!ä´yä…e(»»g‘‘‘‘ʬÉÖ}"K°®­K­­­­­¬ # # # & # ### # # # # # # # #ƒ HëîH>ur­uÊur­uÊv+­v^‘(óó(ñòœaÖZw9L×v­ ÉtŸf¦’Éf ž’É ž’É žZw9L×vŸ ÉfŸt žZw9L×vtŸ ÉtŸf ž’Éf ž’Éf žZthS4žñXgY;=.1rL§ytJôËKYŸŸÊò”rWƒh¿YE»Wgóe/q'ÙXJõÉË‘Ù*YgMv"gW×óe/YF'XN˃\“Y\KÖw<`´‚Ì<´,[Ûõ~Jtmt Y׫ƒnÖY‚J .4!XžhåX žuI.:¬u2R.ȬXRºÈÈ’!<v#×#)$Ùv„‡ÉKYK==X¾óX?^*LL„."X žv#XŸ #Ø“v„‡ÉKYK==f@óX½Î*LL„ f ž . Xv< <vÈÈÖ#4. Xv< <vÈÈÖ#$.v¼XŸ»ž—òX ž fÈÖä×X ž tvX JfXŸ ž¬X ž tvX JJ1 hfŸXŸÈÈÖ žKX ž  hXŸX žvhhXŸhXŸvXŸ>XŸv%XŸõK‘K==9[.Ði9Ë.X8‘‘‘‘XX$XX‘â|Öž.[‚ºŸ‚ºŸtžŸXfŸXf­¡½~X.fù.óX ºTN,LÊ. XŸ[Ld>XŸXŸ>XŸ„fŸX ž‚3)ž)í~+ƒ~žÚ‚™f;ŸÈï}žÚfšf°žÜ}žÚfܬzÄ}žÚf謾}žÁ<™~Xꂼ}žÁ<™~.킹}žÁ<™~.„Èš?ˆylt¬}ž ¬pž-;-Xnž-;Jkž-;yJ <iž-w<;~)ÖgžJ\ž;;~~Ê+l<T<;Ô‚­.Õ<WäS<;~ÞÖæPžT<;;~äÖ¢ž;;~€‚šl<<ƒ<;¢È J3JN™~ò‰‚û~äd.šf;‚ãÙ~.šf;;Ê™<Í~䵬Ë~äšf¬‚vqÈÇ~.šf¾‚vrž´~X߬¡~È嬛~È’¬Mƒ}J~ÀsÈ-T<;ƒ><nžS<;~±ö‚sžWš<;ù‚nžš<;;~©X J3JNÄ)Àt "Ö‘Y ‘v¼fŸ»fŸcž;,:-"<W<-À‚v fŸ/=ÉK9?/KK=fue­iLYO©PbK>K0XŸfŸY=¹‘0>€”X3ƒæP0ë­;=×Y‘.óê“N!—‰.êö~"š‰"rLèö~X‘KhuLKQç>XŸK;u®Ø¤‰fA×ö~X„fztô_X õˆÈ"œL÷~X"©?f ž­Š‚Óõ~Jv‚ <­Š<Óõ~žƒ¬Š‚Ôõ~Ju‚ <¬Š<Ôõ~žƒZ„K„M ‚ý|ϲJŽ„J¶~<ÉXX  v XŸv f K‘KK=XCv* <¡~È…‘X7X8Xä7XX,XX"XXuó;[XXŸ‚¬Ÿ‚¬Ÿºä¡ë}X:žÈ6$äKMWKÊXæXŸv X ÉKYK==žf‚Ö XŸhXŸX K‘K==jXæKMWKÊž<æNVLÊ XŸÈÖÖ j  fTgžäX ž ¬K ‚Kv)º ººá}‚äOž;;,:x.-­Öª¢È!<ÇiÅ <<š  Š<î1Z yÖ <lž¹~t`ž#]º=Pž;,:-;y<ŽÜ‚´ž;,v<-ä‚vªž;,Ñ<¥.-’ò0òu<ºu ¼ë<šXî~ä;ÈîtX¡KÚ}žôϰX–3ºŽ äöx„‡­Y;YgY==žŒò,n.í’fïXÖ,n.ïfñŽXÖ,n.òfô‹XÖl.õŠf÷ˆXýÖD¬*t<;;y<:yl. Ö÷ˆfù†XØÖº žv’®q¬û}.µ~<áž|fãš|XÁ*t<;;y<:ôÖ"v X ŸK‘K=KX¥v[YTK„‘Zº fŸ ºŸºŸºÉX ¼zò™.µ~<»Ä}òÁÖ€~X*ã“cMuº žh„XŸ„XŸh„XŸ„f­wOí>[U…uº žu/… ‚¼ v®®Ù$33=/ GY“Xq<ŽPTJsXNHNQ0ºŸf ž’’’&.DOV=/ EYQ” XoXLLPVH Jy‚QvXŸº žvZ[S>» Xvt>ÊÊÌ äŸº žºŸww ƒºéžXŸf'¬ƒõ‚£‹K äXu‚ºŸ‚ºŸ‚ºŸ‚ºŸ‚ºŸ‚ºŸ‚ºŸ‚ºŸ‚º¢²oòƒX º. f­ ºf*t<;;y‚þ<€XÿXd<‚<ˆÖ.ð~f‘î~X©†Ö/»ýú~ƒƒ„tw<Ž<w.Ø„X­û~tÑ„t³û~ºÏ„.ƒƒq¡û~ºd<þ„<«û~‚\¬*t<:w<Õ~.µº'Ônp“ì~f•ê~XÁ*t<;;y<:¤Öæ"[NT>„‡ŸK;YgK=Kž«~X¼Ã~fÕ¿¿~X .¿À~fÕĺ~XÊ.÷~f*t<;;y‚¤<Ú~XeŽ .ü~fÕȶ~X f¹Æ~fÕ¼Ã~XŽâÖƒX½Z\,LbN0 fŸ ºÐ~f*t<;;yÈ:Ì<d.µ~¬è—~XŽÕ.-µ~<Ú¥~fÕÝ¢~XŽŽ Xåš~fÕè–~XŽ XË´~<áž~¬âœ~Xª†Ö/»Êû~ƒ·~tw<Û<w.‹„Xúû~t„„tïû~º“„.ƒƒqÒû~º-<„„<øû~‚\À~¬*t<:w<݈~.ú…~Xû„~XŽð.d.µ~f”§~òD.:E<0 ‚Ý•~X;y<:̬d.µ~<”ë}f;µI<.Q</‚ß’~Xy<:ÌÈ™~.ï}f-˜Öž#.f.˜+µ~<²‰~òD.:E<0 ‚û÷}X;y<:Ÿf¼º YK;Yg[UK„WK.¥Z\~K„K0X fŸ XŸºŸä¬!º v f ŸK‘KKKX¥[WN>K0X fŸ¼ºŸ›ƒ /»èü~­-/ fƒ-­fpÖ²}X*t<;;y<:ê¬Æ~fµ~<¤—~òD.Œ;D<=sû<„~Xy<:ãÖº}f*t<;;-y<:ãÖÍ~tµ~<¯X¥Jµ~<¬Ž~òE.7E<0 ‚öü}X;y<:‰X”~f*t<;;-y<:Ìd.µ~<Õ¦Ù}X»JÎ}.·È}f-¿Öèþ}f*t<;;yÈ:—¬™.µ~<Õ¼Ã}XãÖJf.ñ~+µ~<Ô«}òŒßºÃÖº }/*t<;;y<:¾¬§}.æÖÛ|¬*t<;;y<:µâ~™.µ~<Îí}òD.:E<0 ‚—Û}X;y<:­Öƒ"µ~<Ë´}òŒÑÖ¸}žç˜}f+îÖ›}é–}f+ðÖž("ú|#„û|f-þtÃ}f*t<;;yÈ:Úò(žã|"Ÿà|fÓ·Š}X*t<;;y<:°.µ~fù†}f-Öž»­XXäÈXäÈX™ƒäêü~ž º gK;Y/K=Kè Èf­„ºŸò"~ȵ~<»Ä|¬¼Ã|XŽ‘©†Ö/»žý~=-/ fƒ-­fpJü|X*t<;;y<:eÈ­Ò|fÓ²Í|X¶ÖZ\~K„KæžÊ|f¶É|fÓ»Ä|X`°Ï|fÓÌÖ»­XXäÈXäÈXã‚ä ý~žK;V?gK==XŸW­(ž:O-,75/=/ÉKYKK=XŸWÉ[ØYQiXLLLZN JoXN”  XŸX žw9DUA9NI3=/ÉKYK==XŸW![)YOžiXNHNZPxJN’ ZfŸX ž¼vvZV>»ZV>Ê!Y;YgY==ž‘~ò°|JÛ¤|fÝ |XÙÖû}.µ~<Ý¢|fßž|X Öâ|fä›|X?@.<=s;;y<:ÔÖÉ|¬*t<;;¬<°|.…ò1|<þ{fƒù{XŽÖw.„|.ï{fŒ•ê{XŽÖw.„|.–é{fŒŽ¬w.„|.™æ{fŒ ¡|X*t<;;ÙºÖŸ|¬*t<;;áºw.„|.ŒŽÖû{.ŸÝ{f¤Û{XÁ*t<;;û™|¬*t<;;á<û{.Œ«Ö–|¬*t<;;àû{.Œ­Ö”|¬*t<;ß<û{.Œ»Ö†|¬*Ò<û{.ŒÔò+¸{<Я{f‹Ö©{XÁ*¡¬w.µ{.ßœ{fåš{XéÖØ{¬*›fXÕ{¬*šfXÒ{¬*”fA˜v.‘tÐ{¬*”f <v.‘ tt.¸{<íŽ{fóŒ{XÁ*”f?$ÖÊ{¬*”f <t.¸{<‹ÝÖt.¸{<óˆ{fù†{XÁ*”f ‚¬{.‹ú…{füÅ{X*”f:‚·{¬*¡<¬{.‹£ò1ãz<ŸÛzf¦ÙzX¬Öw.æz.z³Ìzfµwžw.æz.zµÊzf·užw.æz.z·Èzf¹ýžv X K‘K=Kf¥ZY?-Y„f®fŸ ºŸÓþ ­»°Èå ‚X žv X !Y‘Y=Kf³[WN>K0X fŸ¼ºŸ•þ ­»îÈå ‚º v fŸ’’’lt×w<½„x¬*ã<-‚ƒº½Z\~L’. f­#Mq?ŸK‘KK=EäÝzJzÙ¦zfÌÖõz¬*ã<=‘g w¬æz.zïÖ½XÝzXzí’zfïgÈëz¬*ã<=‘g &.·zz¬Ýz.zαzfÐñzX*ã< <w<‘gÉÖƒf È*LL„. XŸº žvZV> ºv X ;>gK9?/K==fue­iLYL[[8VvK?-KZf­f žv f -0×Y9?/YK=f­Wƒ[LYL[[8VvK?;K0XŸf­Èt­yäy‚ýyfƒ¤€zJy‘îyf’wž€zXy“ìyf”už€z.y£ßy ®÷Ïy.¼wòÏy.¾uòÏy.͵y ØÒÿò/»µ€=ƒ ÿºå€t™ÿt¼ƒƒq½ã€‚\pfåyX*ãÉK9?/KKKXue­iLYL[[8V„K?-KZfŸXŸ ºéxfîy.û‡yJîy.Šøxt“¬•ÿò/»ò€Yƒãþº¢tÜþt¼ƒƒq½ ‚\pò¨yX*ãW=X'Ö6žK‘KLW=fÅä…,3… ‚¼ ’’’&$3@V=/ÉK9?/K>W=X'¬[EYQ’ XoXLLPTL Jy.Q>XŸº žv®’&0::==ÉK9?/K=KX‘e»i@YM” XqvPztL†åK;Yg[UK„W=fÅ‚ƒ3… ‚¼ v®’$'7==/ÉK9?/K==X×W»[GY“Xw<x JV JqXLPF J0ºŸX ž’®®Ù):GV=/K9?/K>W=X/¬[EYM’XsžLzJ JxXP Jy¼ÊÌåK‘K>W=fÆ‚Ow ‚¼ ’’’&'00W/r’ŸK;V?/[UK„W=.)¬[GƒÝ Xs¬ JoXLNLLQºŸº ž’’$$5<LW=r’ŸK;V?/[UK„WK.)ºi@ƒ  oÈLNH Jw.LQvXŸº žwL\zt>ÌåK;Yg[UK„W=fÆävØf­×ò«w<.D ?.A Â.¾òÄ.¼òÇ.¹ Ê.¶òÜ.¤òÞ.¢òÐ.<Ÿòä.œòæ.šòé.—òìXøŽ.Œ.fòŽ.õ.<dò1#<äv¬*ãg¶Œy.…‚n¬1>j9¶Œy.Ž.Ï.£xòŽ.Ñ.÷¦o¬*ã'<]9)<S Œy.ôžŒy.§<MJŒy.œ<W¬1>j9 gòã[¬1>¾9<i¬Œy.»‚$Z*NdL³ÍX³.Œy.»<¸¬1>¾9?½žÃ.¼¬1>è9±__pyx_n_s_pt1yPyObject_HasAttrlong long int__pyx_n_s_secp_orig_length_PyString_Eqpositive_signPyExc_StopIterationnb_lshift__pyx_v_new_offset__pyx_L48_unpacking_done__pyx_codeobj__20__pyx_n_s_pt2x__pyx_n_s_pt2y__pyx_k_int_clip__pyx_k_B__Pyx_SetItemInt_Generic__pyx_k_H__pyx_k_I__pyx_k_L__pyx_k_O__pyx_k_Q__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry__pad1__pad2__pad3__pad4__pad5__Pyx_Coroutine_set_qualname__Pyx_InitCachedBuiltins__pyx_k_b__pyx_k_d__pyx_k_f__pyx_k_hgetwchar__pyx_k_k__pyx_k_l__pyx_k_m__pyx_v_my_corner_count__pyx_k_p__pyx_k_q__pyx_k_vnb_divide__pyx_k_y__pyx_k_z__pyx_k_new_objectsNPY_CHARsuboffsets__pyx_n_s_rxd_Value_Py_NoneStructallocfunc__pyx_k_cone__pyx_k_Cone_PyArray_Descrim_classbody__pyx_L83_bool_binop_done__pyx_v_closestPyByteArray_Type__pyx_L4_bool_binop_donenb_and__pyx_n_s_zshifted__pyx_k_xrangePyFPE_jbuf__pyx_v_qPyCObject_Typearraysize11PyVarObject__pyx_v_pt1x__pyx_v_pt1y__pyx_v_pt1zPyObject_RichComparePyArray_DotFunc__pyx_n_s_sqrt__pyx_k_sendboundscheck__pyx_v_d__pyx_v_f__pyx_v_i__pyx_v_jmp_subscript__pyx_v_m__pyx_v_p13PyFloatObject__pyx_v_t__pyx_v_u__pyx_v_v__pyx_v_x__pyx_v_y__pyx_v_zvret__Pyx_Generator_Next__pyx_k_warningsNpyAuxData__pyx_v_pt2y__pyx_v_pt2z__pyx_n_s_pts_cones_db__pyx_n_s_y1NPY_OBJECT__pyx_int_neg_1__pyx_k_RxDException__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr16PyMappingMethods__pyx_k_contourcentervisitml_name__Pyx_Coroutine_CheckRunning__Pyx_BufFmt_TypeCharToNativeSizefake_module12PyCodeObject_py_stop__pyx_clineno__pyx_n_s_neuron_rxd_morphologylconv__pyx_v_pts_sources__pyx_k_sphere_capPyFloat_Type__pyx_v_branches__pyx_L5_argtuple_error__pyx_n_s_z3sq_inplace_repeatenc_packmode__pyx_n_s_major_length__pyx_v_join_items_needing_clippedtp_dealloc__pyx_v_clip_copyingPyInterpreterState__pyx_v_region__pyx_k_ys_loopiternextfunc__pyx_n_s_distanceuint32_t__Pyx_check_binary_version__pyx_v_denomtm_zone__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometryts_after_subb_handlerPyErr_GivenExceptionMatches__pyx_L8_bool_binop_done__pyx_k_unknown_dtype_code_in_numpy_pxd__Pyx_CodeObjectCachePySequence_ListPyImport_Importco_filename__pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr__pyx_v_endsetattrfunc__pyx_n_s_r1_2__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_2constructive_neuronal_geometry__pyx_kp_s_whichend_for_tangent_sphere_must__Pyx_Coroutine_CloseIternb_longfloatvalPyObject_SetItem__pyx_n_s_mag__chPyErr_Fetch__pyx_n_s_max__Pyx_PySequence_ContainsTF__pyx_k_itertools_PyObject_CallFunction_SizeTtb_linenop_source_is_dictnpy_bool__Pyx_ImportTypePyCFunction_Type__pyx_v_extreme1__pyx_v_extreme2internal__pyx_n_s_iscontourfgetwcuse_tracing__pyx_k_diam_corrections__Pyx_BufFmt_TypeCharToStandardSize__pyx_pybuffernd_naxisfgetwsNPY_STRINGcurexc_value__pyx_n_s_getcol__cxx11__pyx_n_s_p1__pyx_pybuffer_radial_vec__pyx_pybuffernd_pt__pyx_k_graphicsPrimitivesreadbufferproctp_weaklist__debugcharbufferproc__pyx_k_naxisinitctng__pyx_n_s_Intersection__Pyx_PyFloat_DivideObjCPyObject_GetIter__pyx_k_f_diams__Pyx_RaiseArgtupleInvalidtp_newviewclassobj__Pyx_zeros__pyx_n_s_diam3d__pyx_k_symmeigPyLongObjectmethod__pyx_k_Format_string_allocated_too_shor_2PyArray_FastTakeFunc__pyx_L1_errorPyFPE_dummy__pyx_n_s_y1_2smalltablenb_inplace_xor__pyx_v_errinplace__pyx_f_6neuron_3rxd_10geometry3d_4ctng_tangent_sphere__pyx_k_sumcancastscalarkindtoPyInt_FromSsize_t__pyx_ptype_7cpython_4type_type__pyx_v_diam_dbPyThreadState__pyx_k_neighbor_right__pyx_L97_unpacking_failed__pyx_k_right_neighborsPyLong_AsDouble_ZN9__gnu_cxx24__numeric_traits_integerIiE5__maxE__pyx_pybuffer_naxis__pyx_n_s_min_ind__pyx_k_enumeratecomplex doubletp_base__pyx_n_s_removetm_mincurrency_symbol__pyx_k_branchfwidef_back__pyx_n_s_append__pyx_v_endian_detectorPyDict_New__pyx_k_combinations_py_tmpclone__Pyx_RaiseClosureNameError11PyIntObject_unused2PyList_NewNPY_SHORT__pyx_k_tobj__Pyx_PyObject_CallNoArg__pyx_n_s_setval__pyx_k_f_ptstp_basicsizectversion__pyx_k_r0_2tp_members__pyx_k_right__pyx_n_s_throwsq_slice__Pyx_unpack_tuple2PyRun_StringFlags__pyx_v_info__pyx_v_branchempty_list__pyx_n_s_branchesbufferinfo__pyx_k_center_vecold_excnb_nonzeroyieldfrom__pyx_generator__pyx_v_pt0__pyx_v_pt1__pyx_v_pt2error_tracebackPyGILState_UNLOCKEDPyString_FromFormat__pyx_n_s_min__pyx_k_Cylinder__pyx_k_clipstmp_value_modetp_flagsdestructorPyCode_New__pyx_v_nradial_vec__pyx_v_ptstp_setattroPyArray_FillWithScalarFuncPyArray_CopySwapFunc__pyx_v_xshifted__pyx_n_s_define_shapePyString_Typeis_valid_array__min__pyx_v_zshifted__Pyx_TypeTest__pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry__Pyx_PyObject_Callis_str__pyx_v_naxiscodec_error_registry__Pyx_RaiseUnboundLocalErrorf_tstatenew_maxint_p_sign_posncopyswapn__pyx_n_s_max_ind__pyx_k_delta_x__pyx_k_delta_yf_lasti__wchb__pyx_k_y0_2__pyx_v_int_clip__Pyx_Raisethread_id__pyx_k_parent_sec_nametm_montowctrans__pyx_k_allargname__pyx_n_s_all_conesPyObject_SetAttrStringreadonly__Pyx_minusones__pyx_n_s_infPyNumber_Negativef_iblock__Pyx_PyObject_GetAttrStrwarning__pyx_k_Zd__pyx_k_Zf__pyx_v_neighbor_left__pyx_k_genexpr__Pyx_ListComp_Append__pyx_n_s_test__pyx_n_s_my_corner_count__pyx_v_rfarPyArray_FromStrFuncfromstr12PyListObjectPyExc_ValueError__opsPyNumber_InPlaceAddPyExc_RuntimeError__pyx_n_s_soma_secPy_buffertm_hour__pyx_k_anyob_shash__pyx_L15_unpacking_donePyObject_GetBuffer_ZN9__gnu_cxx24__numeric_traits_integerIsE5__maxE__numeric_traits_integer__pyx_k_product__Pyx_ImportFrom__pyx_b__pyx_d__pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr_vtable_offsetsubarray__pyx_mhas_cstop__pyx_rPyNumber_InPlaceDivide__pyx_L50_bool_binop_done__pyx_v_warnings__Pyx_Coroutine_set_nametp_initPyTypeObjectnb_remaindertp_free__pyx_k_radial_vec_normnb_inplace_remainder__pyx_n_s_diam1__pyx_n_s_diam2dotfunc__pyx_v_rightfillwithscalar__pyx_k_rxd__pyx_L28_unpacking_failed__pyx_L30_unpacking_done__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr__pyx_ptype_5numpy_ndarray__pyx_builtin_sum__numeric_traits_integer__pyx_v_clips_arr_descr__pyx_n_s_div__pyx_k_range__pyx_n_s_source__pyx_L11__pyx_v_flagsternaryfunc__pyx_L13Py_intptr_t__pyx_L15__Pyx_PyInt_From_enum__NPY_TYPES__pyx_n_s_neurongi_qualnameconst_zeroPyArray_ArgFuncim_weakreflist__pyx_k_get_clipnb_indexPyLong_Type__pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outsideretval__pyx_n_s_objectsNPY_LONGDOUBLEsq_containstp_setattr__Pyx_RaiseBufferFallbackErrorm_ml__pyx_k_min_ind__pyx_outer_scope__pyx_kp_s_extreme_points_computation_faile__Pyx_SafeReleaseBuffer__pyx_L34_unpacking_failed__Pyx_PyDict_ContainsTF__pyx_L20_next_or__pyx_v_sphere_cap__mask_was_savedPyExc_NameError__pyx_k_Non_native_byte_order_not_suppor__pyx_builtin_range__Pyx_RaiseTooManyValuesErrornb_subtractNPY_BOOL__pyx_k_neuron_rxd_morphologytypeobj__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometrynb_absolutePyFrameObjectob_type__pyx_L3_first_run__pyx_k_Format_string_allocated_too_shorinquiryungetwcNPY_UNICODEtp_getattrpvaluertversion__pyx_L69_bool_binop_done__pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometryPyUnicodeUCS4_Compare_IO_backup_base__jmp_buf_tagPyType_IsSubtype__pyx_v_best_p2py_funcname__pyx_k_parent__pyx_sent_value__pyx_n_s_n3d__pyx_k_major_p1__pyx_k_major_p2__Pyx_PyInt_From_int11__mbstate_t__pyx_k_ndarray_is_not_Fortran_contiguouclass_name__Pyx_GetBufferAndValidatePyOS_snprintf__pyx_n_s_sum__pyx_n_s_n_soma_stepnb_invert__pyx_v_dx__pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry__Pyx_Coroutine_Throwempty_dictint_n_sep_by_spacec_profileobj__pyx_k_minor__pyx_k_yshiftednb_inplace_floor_dividecoercionis_trueNPY_CLIP16PyArray_ArrFuncs__pyx_k_RuntimeError__pyx_L15_bool_binop_done__Pyx_RaiseDoubleKeywordsError__pyx_k_corner_count__pyx_L6_unpacking_failedbyteorder__pyx_builtin_enumerateim_self__pyx_pybuffer_pt1kwds2__pyx_n_s_zipmax_count_IO_read_endPyErr_ExceptionMatches__pyx_builtin_all__pyx_pybuffer_axisdescrsetfuncwcsstrold_val__pyx_n_s_deltadtp_as_sequence__pyx_v_neighbor_copy__Pyx_SetItemInt_Fast_IO_save_base__pyx_n_s_z0_2__pyx_v_ndim__pyx_v_ys_loop__pyx_n_s_cone_clip_db__pyx_n_s_y3dPyExc_RuntimeWarningNPY_ULONG__pyx_n_s_neuron_rxd_geometry3d_ctng__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprbf_getreadbuffer__pyx_bisect_code_objectsPyMem_ReallocPyFloat_AsDouble__pyx_lineno__pyx_code_cache_Py_CheckRecursiveCall__Pyx_BufFmt_ProcessTypeChunkmon_thousands_sepnb_divmod12NPY_CLIPMODE__pyx_k_join_items_needing_clipped_IO_write_end__numeric_traits_integer_Py_CheckRecursionLimit__Pyx_PyInt_SubtractCObj__pyx_builtin_anyf_localsplus_PyByteArray_empty_string__pyx_v_left_neighbors__numeric_traits_integer__pyx_n_s_Planewcrtombfunctionexact__pyx_k_constructive_neuronal_geometry__pyx_k_extreme_points_computation_faile__pyx_t_56__pyx_v_left_corner_countdescrgetfunc__pyx_kp_s_more_than_one_contour_is_not_curstrict_py_slice_IO_buf_baseowned_stopPyFloat_FromDouble__pyx_v_childerror_valuehas_cstart__pyx_k_SpherePyObject_GC_UnTrackGNU C++ 5.4.0 20160609 -mtune=generic -march=x86-64 -g -g -O2 -fwrapv -fno-strict-aliasing -fstack-protector-strong -fPIC -fstack-protector-strong14__Pyx_TypeInfo__pyx_L7_bool_binop_done__pyx_v_hasfields__pyx_L14_unpacking_failed__pyx_k_x3d__pyx_n_s_somax__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry__pyx_n_s_somazequals__pyx_n_s_sphere_capwcslen__pyx_n_s_getrowPyArray_SetItemFuncmalloc__pyx_L75PyObject_GC_Del__pyx_L43_bool_binop_donenb_floatnb_inplace_rshift__Pyx_ErrRestorembrlenPyMem_Malloc__pyx_v_yshiftedPyArray_NonzeroFuncnb_coerce__pyx_k_majorsdigit__pyx_tuple__5__pyx_f_6neuron_3rxd_10geometry3d_4ctng_closest_pt3sq_length__Pyx_StructField___pyx_tuple__9vwprintf__pyx_v_minor__Pyx_BufFmt_RaiseExpected__pyx_L7_unpacking_done__pyx_k_clipNPY_NTYPESco_lnotabarg_passed_twicenum_expectedcode_line_IO_markerPyObject_GetAttrStringPyDict_Containsprintfunc__pyx_L88fmt_offset__pyx_L23_unpacking_failedsetitemtb_lasti__pyx_n_s_sec_db__pyx_kp_u_Format_string_allocated_too_shor_2__Pyx_ExceptionSwap__pyx_k_warnscalarkindPyArg_UnpackTuple__Pyx_BufFmt_ExpectNumber__pyx_f_6neuron_3rxd_10geometry3d_4ctng_register_ZN9__gnu_cxx24__numeric_traits_integerIlE5__maxEPyExc_UnboundLocalError__pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry__pyx_empty_tuplegetattrofuncenc_type__pyx_k_magwcscat_IO_lock_tresult_obj__pyx_k_num_contours__Pyx_UnpackTupleError_IO_read_ptrPyCFunction_NewEx__pyx_k_parentsecPyObject_ClearWeakRefsPyExc_ImportErrorpybuffer__Pyx_StructField_flags2tp_version_tag__pyx_n_s_left_neighbors__pyx_pybuffernd_radial_vecsq_ass_itemgetitem__pyx_L0__pyx_L2__pyx_L3__pyx_L4__pyx_L8PyObject_CallFunctionObjArgs__pyx_v_xs_loop__pyx_v_leftrcbuffertstate_headPyErr_WriteUnraisable_IO_write_ptr__pyx_n_s_constructive_neuronal_geometry_l__pyx_kp_u_Format_string_allocated_too_shorPyString_AsStringPyErr_SetString__pyx_k_more_than_one_contour_is_not_cur__pyx_n_s_get_clip__pyx_n_s_vals__pyx_n_s_set_clip__pyx_n_s_morphologyc_traceobj__pyx_L19_bool_binop_donegetattrfunctm_sec__pyx_n_s_itertools__pyx_Generator_memberlist__pyx_k_define_shapesq_inplace_concatiterablesq_repeat__pyx_builtin_RuntimeError__pyx_k_pt2z__pyx_v_major__pyx_pf_5numpy_7ndarray___getbuffer__PyTracebackObjecthashfunc__pyx_tuple__10__pyx_n_s_SkewCone__Pyx_dict_iter_next__pyx_tuple__13PyFPE_counter__pyx_tuple__15__pyx_tuple__16__pyx_tuple__17__pyx_tuple__19__pyx_n_s_diam_db__pyx_ptype_5numpy_dtypereprfunc__pyx_n_s_h__pyx_n_s_i__pyx_n_s_j__pyx_n_s_k__pyx_n_s_extreme1__pyx_n_s_extreme2__pyx_n_s_psegcountproc__pyx_Generator_methods__pyx_n_s_vcodec_search_path__pyx_n_s_zmessagewcsrchrrecursion_depth__pyx_k_pts_cones_dbPyErr_Formatnb_inplace_powertp_as_number26__Pyx_CodeObjectCacheEntry__pyx_k_raw__pyx_k_neuron_rxd_rxdExceptionpy_importPyList_Type__pyx_n_s_Cone__pyx_n_s_symmeig__pyx_valuewcschr__pyx_k_getcol__pyx_k_z3dnb_int__saved_maskPyExc_SystemErrorc_tracefunc__pyx_v_valsNpyAuxData_CloneFunc__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_genexpr__pyx_k_max_ind__pyx_n_s_warnob_fvalold_tb__pyx_tuple__3PyErr_Clear__pyx_t_45__pyx_n_s_enumerateNPY_LONG__pyx_k_major_lengthdlopenflagsnb_inplace_true_dividetm_yday__pyx_n_s_hname__Pyx_WriteUnraisablePyArray_CopySwapNFunc__pyx_k_diam3dexc_tb__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprdimensions_lock__pyx_n_s_send_ZN9__gnu_cxx24__numeric_traits_integerIiE5__minE__pyx_n_s_bisect__pyx_v_major_p1__pyx_v_major_p2__pyx_stack__pyx_k_soma_0cancastto__pyx_v_copy_shape__pyx_v_pt2xtype_numtp_descr_setnb_powerenc_countwcsxfrm__pyx_k_sectionsreserved__pyx_k_z1_2co_stacksizetp_hash__pyx_n_s_arraymethod_name__pyx_n_s_diam_corrections_IO_buf_end__Pyx_BufFmt_RaiseUnexpectedChar__pyx_v_p2visitprocshort unsigned intrefcount__pyx_k_appendwcstold__pyx_n_s_nradial_vec__pyx_v_conewcstolltp_printbf_getsegcount__pyx_v_selfnb_inplace_lshift__pyx_n_s_clip_copyingwcsrtombs__pyx_L22_unpacking_done__pyx_k_removegi_weakreflist__pyx_insert_code_objectwcscmpwcscspnco_namesPyFloat_FromString__pyx_k_x0_2raise_neg_overflownb_true_dividetp_richcompare_IO_read_base__len__pyx_k_pt0__pyx_k_pt1__pyx_k_pt2__pyx_k_pt3__pyx_L24_unpacking_donePyUnicodeUCS4_Formattp_iter__pyx_v_ptnb_inplace_divide__pyx_v_y0PyTraceBack_TypePyNumber_Power14PyStringObjectNPY_CDOUBLEob_refcnt__pyx_typeerror_type__Pyx_RaiseNoneNotIterableError__pyx_k_pts__wchNPY_WRAPco_cellvarsPyBuffer_ReleasePy_GetVersion__pyx_k_n_soma_stepfull_traceback__pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outside__pyx_k_axis__pyx_pybuffernd_nradial_vec__pyx_kp_s_soma_0__pyx_Generator_getsets__FILE__pyx_n_s_contourcentertp_alloc10__sigset_t__pyx_n_s_xshiftedwcscpy__valuePyObject_GetAttr__pyx_k_psecsetter__pyx_float_2___pyx_k_objects_shortbuf_sbuf__pyx_temptp_bases__pyx_n_s_int_cliplenfuncwctob__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_3genexpr__numeric_traits_integer__pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprinvalid_keywordargsortPySequence_Containsbf_getbufferf_globals__pyx_k_main__countunsigned char__pyx_v_parent_sec_name__pyx_k_axisx__pyx_k_axisy__pyx_k_axiszwcspbrk__pyx_v_sharp_turnPyDict_SetItemString__Pyx_PyInt_EqObjCNPY_CLONGDOUBLEppos__pyx_pw_5numpy_7ndarray_1__getbuffer__sq_ass_sliceint_p_sep_by_space_ZN9__gnu_cxx24__numeric_traits_integerIsE5__minEwcscoll_pos__Pyx_patch_abc_module__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_2generatorint_curr_symbolmbsinit__Pyx_CreateCodeObjectForTracebackPyTuple_Pack__pyx_v_new_objects21__pyx_CoroutineObject__pyx_k_numpyPyString_InternFromStringPyMethod_Type__Pyx_AddTraceback__pyx_v_plane_normalob_item__pyx_kp_u_ndarray_is_not_C_contiguous__pyx_v_whichendwmemset__pyx_n_s_num_contours__Pyx_Coroutine_ExceptionClearwcsftimePyInt_FromLong__pyx_L47_unpacking_failed__pyx_v_all_conesdiminfosetlocale__pyx_k_set_clip__pyx_f_5numpy__util_dtypestringPyDict_Typetz_dsttimef_builtinswcstoulgot_Z__pyx_t_15__pyx_k_cell__pyx_t_19__Pyx_BufFmt_Init__pyx_v_right_neighbors__pyx_L66_unpacking_donenb_positive__Pyx_ImportModule15PyNumberMethodsvswscanf__off_t__pyx_v_corner_countcomplex long double__pyx_v_f_diamsf_code__pyx_n_s_tobjnb_inplace_subtractfunction_nameencodingstruct_alignment__pyx_n_s_r0_2tick_counter__pyx_pybuffernd_pt1co_code__pyx_k_source__pyx_n_s_MatrixPyArray_ArgSortFunc__pyx_k_neuronco_firstlineno__pyx_v_c0__pyx_v_c1vswprintfPyDict_SetItem__pyx_kp_s_multiple_most_extreme_points__pyx_k_zshiftedpy_codenb_multiply__pyx_k_morphologynpy_hash_tscanfuncPySequence_Tuple__pyx_v_cp__pyx_v_d0__pyx_v_d1tp_is_gc__pyx_v_cx__pyx_v_cyPyModule_GetDict__pyx_n_s_neighbor_copyint_n_sign_posn__pyx_n_s_ys_loop__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry__pyx_t_34__pyx_L6_bool_binop_done__pyx_t_3822__Pyx_BufFmt_StackElemfp_offset__pyx_pybuffer_nradial_veccause__pyx_ptype_5numpy_broadcastnogilNpyAuxData_tag__pyx_v_axisx__pyx_v_axisy__pyx_v_axisz__pyx_n_s_left__pyx_v_source__pyx_find_code_objectfastclip__pyx_cur_scopefreefunc__pyx_string_tab__pyx_n_s_y0_2__pyx_k_r1wcsncmp__is_signed__pyx_v_tobjNPY_VOID__pyx_k_Zgco_flagsPyDict_GetItem__Pyx_Coroutine_deallocPyArray_FastClipFuncco_consts__pyx_pybuffernd_axis__Pyx_ReleaseBufferml_flagsis_listPyObject_GC_Trackwctype_tpy_resultob_ival__Pyx_IsLittleEndian_ZN9__gnu_cxx24__numeric_traits_integerImE8__digitsENpyAuxData_FreeFunc__pyx_n_s_sharp_turnwcsspn__pyx_n_s_naxis__pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprpy_moduleml_methtp_as_mappingPyNumber_Subtracttrash_delete_latertp_weaklistoffsetkw_argstp_iternext__pyx_n_s_constructive_neuronal_geometrynegative_sign__pyx_k_distancenew_packmodectng.cpp__pyx_pf_5numpy_7ndarray_2__releasebuffer____pyx_v_shift_sign_old_offsetco_varnames__pyx_empty_bytes__pyx_n_s_ValueErrorPyArray_CompareFuncmbsrtowcs__Pyx_PyNumber_Intwcsncpy__Pyx_Coroutine_Send__pyx_L65_unpacking_failed__pyx_n_s_cp__pyx_n_s_d0__pyx_n_s_d1__pyx_n_s_cx__pyx_n_s_cytm_mday__pyx_k_sp__pyx_n_s_source_is_import3dfirst_kw_argvaluesis_unsigned__gnu_debug__pyx_n_s_all_setjmpf_exc_valueroot__Pyx_InitGlobals__pyx_n_s_importNPY_UINT__pyx_k_pt1x__pyx_k_pt1y__pyx_k_pt1z__pyx_n_s_dx__pyx_L13_unpacking_failedwritebufferproc__pyx_v_radial_vec_norm_IO_save_endelsize__Pyx_GetItemInt_Generic__pyx_obj_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprPyObject__pyx_n_s_normmp_length__Pyx_PyGen_FetchStopIterationValue__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprnb_oct__pyx_L18_bool_binop_done_longobject__pyx_buffmt_parse_array__pyx_k_pt2x__pyx_k_pt2y__Pyx_Coroutine_SendExtp_itemsizeobjobjprocinvalid_keyword_type_py_startnpy_intptb_next__pyx_n_s_f_ptstmp_type__pyx_k_setval__pyx_pf_6neuron_3rxd_10geometry3d_4ctng_soma_objects__pyx_n_s_anyf_trace__pyx_n_s_right__pyx_v_radial_vec__pyx_v_num_contours__Pyx_Coroutine_del__pyx_n_s_soma_objectscomplex floatPyArray_GetItemFuncnum_pos_args__pyx_kp_s_home_hines_neuron_nrn_share_libraise_overflow__pyx_n_s_d__pyx_coroutine_body_tputwchartp_del__pyx_n_s_mPyArrayObjectnum_max__pyx_n_s_q__pyx_n_s_clips__Pyx_GetBufferinterninterpNPY_UBYTE__pyx_n_s_x__pyx_n_s_ygi_namecached_type__pyx_n_s_cone__pyx_k_source_is_import3dtemps__pyx_L29_unpacking_failed__pyx_k_getrowPyErr_SetNonequotenum_found__Pyx_Coroutine_get_qualnameattr_namePyGILState_LOCKEDwchar_t__pyx_L14getbufferproc__Pyx_PyList_Append__pyx_L17__pyx_n_s_Cylinder__pyx_k_to_python__pyx_n_s_xs_loop__pyx_k_unexpected_corner_counts__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprPyTuple_Typevfwscanf12__Pyx_Buffer__Pyx_GetItemInt_List_Fast__Pyx_GetModuleGlobalName__pyx_k_diam_dbnb_xor__pyx_k_cp__pyx_k_d0__pyx_k_d1__pyx_k_cx__pyx_k_cywcstoull__pyx_n_s_SphereConetm_isdst__pyx_kp_s_soma_stack_ignored_using_centroi__pyx_L22__Pyx_BufFmt_CheckString__pyx_k_cone_clip_dbpy_frame__pyx_v_p1__pyx_v_axislength_Py_ZeroStruct__pyx_k_sqrt__Pyx_PyObject_GetSlice__pyx_ptype_5numpy_flatiter__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_5generator1__pyx_v_rnear13PyTupleObjectfloat_value__pyx_n_s_somay__pyx_k_dx__pyx_n_s_parentsec__pyx_v_delta_x__pyx_v_delta_y__Pyx_InitStrings__pyx_L31argmaxformat__pyx_k_sec_dbwcstodkw_namewcstokNPY_NTYPES_ABI_COMPATIBLE__pyx_n_s_Sphereshort int__pyx_v_pts_cones_db__pyx_k_nradial_vec__Pyx_PyObject_CallMethOPyObject_GetItem__pyx_v_r0__pyx_v_r1__pyx_v_r2__pyx_v_r3tp_mro__pyx_v_neighbor_right__pyx_k_max17__Pyx_LocalBuf_ND__pyx_n_s_combinations__pyx_n_s_main__pyx_L55__Pyx_GetBuiltinNameNPY_RAISEpy_leveltp_getsetfill__pyx_k_join_itemlocaleconv__pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_1soma_objectsPyGetSetDef__pyx_v_n_soma_steppvalue1pvalue2_markers__pyx_k_crosspy_srcfile_fileno__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t__pyx_v_major_length__pyx_v_sec__pyx_L4_argument_unpacking_doneco_zombieframe__pyx_v_spstdout__pyx_k_y2_typeobject_ZN9__gnu_cxx24__numeric_traits_integerIcE5__maxE__pyx_n_s_right_neighborscodec_search_cacheint_n_cs_precedesbtowc__pyx_n_s_RxDExceptionPyDict_Size__pyx_f_6neuron_3rxd_10geometry3d_4ctng_seg_line_intersectionpitem__pyx_builtin_zip__pyx_builtin_ValueError__pyx_L72__pyx_L74m_module__pyx_L76__pyx_L77__pyx_L78__pyx_L79/home/hines/neuron/nrnmpi/share/lib/python/neuron/rxd/geometry3dPyExc_OverflowErrorwcsncatnewfunc__pyx_k_r1_2num_min__ssize_t__pyx_L80__pyx_t_10__pyx_t_11__pyx_t_12__pyx_t_13__pyx_t_14__Pyx_IternextUnpackEndCheck__pyx_t_16__pyx_t_17__pyx_t_18__pyx_n_s_range__Pyx__Coroutine_New__pyx_L14_unpacking_done__pyx_k_z3__int32_twmemmoveNPY_USHORT__pyx_n_s_radial_vec__pyx_tbis_running__pyx_L90__pyx_t_20__pyx_t_21__pyx_t_22__pyx_t_23__pyx_t_24__pyx_t_25__pyx_t_26__pyx_t_27__pyx_t_28__pyx_t_29tp_name__gnu_cxx__destnpy_doubletp_docf_blockstack__pyx_n_s_xrange__Pyx_Importthrow_hereobjobjargproc__pyx_v_offset__pyx_n_s_r0__pyx_t_30__pyx_t_31__pyx_t_32__pyx_t_33PyMethodDef__pyx_t_35__pyx_t_36__pyx_t_37tb_frame__pyx_t_39__pyx_v_x0__pyx_v_x1__pyx_v_x2__pyx_v_x3__pyx_v_x4__pyx_k_ndarray_is_not_C_contiguouswraparound__pyx_n_s_parent_sec_namePyInt_Type__pyx_v_descrsq_concat__pyx_k_soma_stack_ignored_using_centroisetattrofunc__pyx_k_soma_secignoreargmin_IO_write_base__pyx_t_40__pyx_t_41__pyx_t_42__pyx_t_43__pyx_t_44__pyx_L33_unpacking_done__pyx_t_46__pyx_t_47__pyx_t_48__pyx_t_49co_nlocalsPyArray_ScalarKindFunc__pyx_v_y1__pyx_v_y2__pyx_v_y3__pyx_v_y4__pyx_v_xxabc_patched__pyx_k_y1_2__pyx_n_s_dot__pyx_n_s_neighbor_right__pyx_n_s_is_stackdecref_tuple__pyx_v_shift__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr__pyx_n_s_clip__pyx_n_s_warningssizetypec_profilefunc__pyx_L35_unpacking_done__pyx_t_50__pyx_t_51__pyx_t_52__pyx_t_53__pyx_t_54__pyx_t_55PyArray_FastPutmaskFunc__pyx_t_57__pyx_t_58__pyx_t_59__Pyx_patch_abc__pyx_v_z0__pyx_v_z1__pyx_v_z2__pyx_v_z3__pyx_v_yy_PyObject_GC_New__pyx_k_minmp_ass_subscriptbf_getwritebuffer__pyx_k_diam1__pyx_k_diam2__Pyx_BufFmt_TypeCharToGroup__pyx_kp_u_Non_native_byte_order_not_suppor__pyx_t_60PySequence_GetItemgetteralign_mod_offset_PyThreadState_Current__pyx_n_s_x3d__pyx_pw_5numpy_7ndarray_3__releasebuffer____pyx_n_s_pts_sourcesPy_OptimizeFlag__pyx_k_p1__pyx_k_p2__pyx_cfilenmPyExc_GeneratorExit__pyx_n_s_minor__pyx_n_s_major_p1__pyx_n_s_major_p2__pyx_ptype_5numpy_ufuncglobal_dict__pyx_k_sharp_turn__pyx_L8_next_orf_valuestack__pyx_k_ptmodulescurexc_type__pyx_k_bisect__pyx_self__pyx_n_s_yshiftedtrash_delete_nesting__pyx_kp_u_ndarray_is_not_Fortran_contiguou_cur_columntp_traverse__pyx_k_left_neighborsfunc_name17PyCFunctionObject__pyx_v_clip__pyx_n_s_somaPyArray_ScanFunc__pyx_k_r0__digits__pyx_k_r2__pyx_k_r3is_tupletimezonePyLong_AsLong__pyx_n_s_x0__pyx_n_s_x1__pyx_n_s_x2__pyx_n_s_x3__pyx_n_s_x4co_argcountob_svalPyExc_ZeroDivisionError__Pyx_ParseOptionalKeywordstmp_tbbinaryfuncNPY_BYTEmon_groupingraised_exception__pyx_k_linalg__pyx_n_s_radial_vec_normPyUnicode_Type__pyx_builtin_maxPyDict_Nextfasttakewmemchr__pyx_n_s_y0__Pyx_PyObject_CallMethod1__pyx_n_s_y2__pyx_n_s_y3__pyx_n_s_y4__pyx_n_s_xx__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometrycastdictPy_ssize_ttm_year__Pyx__PyObject_AsDoublePyArray_APIstdin__pyx_k_whichend_for_tangent_sphere_must__pyx_k_Unionvarname__pyx_k_is_stack__pyx_n_s_neuron_rxd_rxdException13PyBufferProcs__Pyx_InitCachedConstants__Pyx_Coroutine_clear__pyx_v_deltanr__pyx_v_f_pts__pyx_n_s_z0__pyx_n_s_z1__pyx_n_s_z2PyExc_TypeError__pyx_n_s_yytraverseprocf_localsnb_floor_divide__pyx_tuple__2__pyx_n_s_x1_2__pyx_tuple__4__pyx_v_is_stack__pyx_tuple__6__pyx_tuple__7__pyx_tuple__8__off64_t__pyx_k_infwcstoftm_wdaywcstolf_exc_tracebackentries__pyx_k_neuron_rxd_geometry3d_ctng__pyx_n_s_join_items_needing_clipped__pyx_methods__pyx_builtin_xrange__pyx_k_args__pyx_v_max_dist__jmp_bufis_unicodetp_callnb_hex__Pyx_PyBytes_EqualsPyArray_FillFuncsysdict16PyGILState_STATEowned_start__pyx_float_0_5nb_inplace_additer_objtp_reprraise_error__pyx_k_test__Pyx_Coroutine_MethodReturn__pyx_v_diam1__pyx_v_diam2__pyx_n_s_axislength__pyx_k_divPyArray_VectorUnaryFunc__pyx_v_fieldsasync_excallocated__pyx_n_s_new_objects__pyx_kwds__Pyx_ErrFetchbf_releasebufferintvalPyExc_FloatingPointError__pyx_k_x0__pyx_k_x1__pyx_k_x2__pyx_k_x3__pyx_k_x4py_line__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprwmemcmp__pyx_L5_bool_binop_done__pyx_L20_unpacking_failedco_weakreflist__pyx_k_clip_copying__pyx_k_iscontourPySlice_Newfastputmask__Pyx_dict_iteratorob_digit__pyx_k_y0__pyx_k_y1nb_inplace_or__pyx_k_y3__pyx_k_y4__pyx_k_xxtp_as_bufferNPY_CFLOAT__pyx_k_soma__pyx_k_throw__pyx_k_SphereConetp_dict__pyx_pybuffer_pt__pyx_L98_unpacking_done__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr__pyx_pyargnames__pyx_k_z0__pyx_k_z1__pyx_k_z2releasebufferproc__pyx_k_yy__Pyx_PyObject_CallOneArg__pyx_n_s_raw20__Pyx_StringTabEntry__pyx_builtin_minPyErr_Occurredlong long unsigned int__pyx_n_s_z1_2PyExc_IndexErrornb_inplace_multiplyinitproc__pyx_k_Planewmemcpy__pyx_n_s_z3d__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprtp_clear__pyx_k_n3dNPY_ULONGLONG__pyx_n_s_linalg__pyx_tuple___Pyx_RaiseNeedMoreValuesErrormodules_reloadingob_sizetagPyArrayObject_fields__pyx_n_s_neighbor_left__pyx_k_Intersectionalign_atcopyswapco_name__pyx_k_somax__pyx_k_somay__pyx_k_somaz__pyx_kp_u_unknown_dtype_code_in_numpy_pxd__pyx_L9_bool_binop_done__pyx_k_x1_2NPY_INT__pyx_n_s_x0_2__Pyx_Coroutine_FinishDelegationnext_itemnb_negative__pyx_k_dot__Pyx_FetchCommonTyperesume_label__pyx_n_s_pt1zsq_itemPyExc_AttributeError__pyx_k_Matrixpy_name__pyx_Generator_initc_line__pyx_k_zippkeytp_descr_getNPY_HALF__pyx_module_is_main_neuron__rxd__geometry3d__ctng__pyx_int_2__Pyx_PyInt_AddObjC__pyx_int_410PyTryBlock__pyx_n_s_f_diams__pyx_k_y3d__pyx_n_s_axiscurexc_traceback__pyx_k_ValueError14PyMethodObjecttp_getattro__pyx_k_radial_vec__Pyx_PyObject_Append__pyx_n_s_branch__pyx_n_s_psec__pyx_n_s_graphicsPrimitivestypegroupnb_rshiftNPY_FLOAT__Pyx_Coroutine_traversegilstate_counterPyNumber_MultiplyNPY_TIMEDELTA__pyx_k_neighbor_leftnb_inplace_and__intptr_t__pyx_n_s_pt3PyErr_WarnExnb_or__pyx_k_constructive_neuronal_geometry_lPyImport_AddModule17PySequenceMethodsrichcmpfunciswctype__jmpbufPyNumber_Divide__Pyx_ZeroBuffer__pyx_k_all_cones__pyx_L32_unpacking_failed__pyx_n_s_pts__pyx_v_soma_sec__pyx_n_s_major__pyx_k_branches__Pyx_PyObject_IsTruetp_cache__pyx_k_xs_looptm_gmtoffhas_known_size__pyx_k_z0_2PyTraceBack_HerePyString_FromString__pyx_n_s_plane_normal_Py_TrueStruct__pyx_k_jvwscanf__Pyx_IterFinish__pyx_v_diam_corrections__pyx_k_axislength__pyx_n_s_p2PyString_FromStringAndSizetp_methodsgetiterfunc__pyx_n_s_Union__pyx_v_center_vec__pyx_argsPy_InitModule4_64__pyx_v_cone_clip_dbPyObject_CallObject__pyx_v_axisml_doc__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry__valPyTuple_New__Pyx_BufFmt_DescribeTypeCharPyNumber_Long__pyx_v_somax__pyx_v_somay__pyx_v_somaz__pyx_v_psecssizessizeobjargprocb_level__pyx_k_SkewConePyErr_Restore__pyx_n_s_RuntimeError__Pyx_Coroutine_Close__Pyx_Coroutine_get_name__pyx_n_s_corner_count__pyx_n_s_pt__pyx_n_s_cell__pyx_n_s_productint_frac_digitstz_minuteswestneg_one__pyx_n_s_argsmbrtowc__Pyx_BufFmt_TypeCharToPaddingmon_decimal_pointPy_tracefuncco_freevars__pyx_v_diststruct_count__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_1soma_objects_chaintypedef __va_list_tag __va_list_tagim_func__pyx_k_extreme1__pyx_k_extreme2new_countPyCFunction__pyx_n_s_sectionstp_dictoffsetPyImport_ImportModulessizessizeargfunc__Pyx__PyObject_CallOneArg__Pyx_BufFmt_ParseNumber__pyx_k_deltad__pyx_n_s_delta_x__pyx_n_s_delta_y__pyx_n_s_r1__pyx_n_s_r2__pyx_n_s_r3overflow_arg_areareg_save_area__Pyx_PyInt_As_int17__Pyx_Buf_DimInfo__pyx_n_s_to_python__pyx_codeobj__18__pyx_v_best_p1__pyx_t_0__pyx_t_1__pyx_t_2__pyx_t_3__pyx_t_4__pyx_t_5__pyx_t_6__pyx_t_7__pyx_t_8__pyx_t_9__pyx_n_s_cross__pyx_v_pt3__pyx_n_s_close__pyx_n_s_pt2zmore_or_less__pyx_n_s_parentNPY_LONGLONGfield__pyx_k_left__pyx_n_s_pt0__pyx_n_s_pt1__pyx_L3_error__pyx_n_s_pt2__Pyx_Coroutine_patch_module__Pyx_PyIndex_AsSsize_tstrides__pyx_n_s_genexprnb_addPyErr_NormalizeExceptiontp_subclassesob_sstatemodule_name__pyx_L6_resume_from_yieldc_metadataPyUnicodeUCS4_DecodeUTF8__pyx_k_hnameNPY_DOUBLENPY_USERDEF__pyx_int_0__pyx_int_1__pyx_v_cell__pyx_int_3__pyx_v_join_item__pyx_L21_unpacking_doneparent_offset__pyx_v_deltad__Pyx_PyInt_As_longint_p_cs_precedes__pyx_v_deltarPyArray_SortFunc_IO_FILE__stack_chk_fail__pyx_k_pts_sourcesf_stacktop__pyx_k_norm__Pyx_GetItemInt_FastNPY_DATETIMEptrdiff_t__pyx_GeneratorType_typeis_complex__pyx_v_objects__pyx_n_s_spgp_offset__pyx_k_home_hines_neuron_nrn_share_lib__pyx_tuple__11__pyx_tuple__12PyMemberDefclosure__pyx_tuple__14__pyx_L9_continuePyExc_AssertionError__pyx_n_s_join_itemPyType_Ready__pyx_v_childname__pyx_k_array__pyx_n_s_axisx__pyx_n_s_axisy__pyx_n_s_axisztp_strf_lineno__pyx_k_g__pyx_f__pyx_k_i__pyx_k_multiple_most_extreme_points__pyx_k_neighbor_copyunaryfunc__pyx_k_my_corner_countPyFrame_New__max__pyx_k_xvfwprintf__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr__pyx_v_little_endianPyExc_BaseExceptionfputwc20__Pyx_BufFmt_ContextPyNumber_Add__pyx_L29_unpacking_donefputws__pyx_k_soma_objects__pyx_n_s_center_vecPyUFunc_API__pyx_n_s_numpy__pyx_GeneratorTypePyObject_Size__pyx_filenametp_compare__pyx_k_secwint_twctrans_t__pyx_k_vals__pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprfrom_list__pyx_kp_s_unexpected_corner_counts__pyx_L21_unpacking_failed__pyx_v_result_ZN9__gnu_cxx24__numeric_traits_integerIlE5__minE__pyx_k_plane_normalNPY_NOTYPEbf_getcharbuffer__pyx_k_import__pyx_k_xshiftedf_exc_type__pyx_k_close__pyx_f_6neuron_3rxd_10geometry3d_4ctng_extreme_pts__pyx_v_source_is_import3d__pyx_n_s_pt1x€5Ž5UŽ5«5S«5¶5óUŸ¶5Á5SÁ5Å5óUŸ€5™5T™5²5V²5µ5Pµ5¶5óTŸ¶5Â5VÂ5Å5óTŸ€5š5Qš5´5\´5µ5Tµ5¶5óQŸ¶5Ä5\Ä5Å5óQŸ›5Ÿ5P€5Ž5UŽ5«5S«5¶5óUŸ¶5Á5SÁ5Å5óUŸÐ5ä5Uä5)6V)6*6óUŸ*696Vä5ý5U6 6U*666UÐ5ä5Uä5)6V)6*6óUŸ*696V@6T6UT6¶6V¶6·6óUŸ·6Ù6VT6m6Ut6Š6U‘6­6U·6Æ6UÉ6Ö6U@6T6UT6¶6V¶6·6óUŸ·6Ù6Và6î6Uî6 7S 77óUŸ7!7S!7%7óUŸà6ù6Tù67V77P77óTŸ7"7V"7%7óTŸà6ú6Qú67\77T77óQŸ7$7\$7%7óQŸû6ÿ6Pà6î6Uî6 7S 77óUŸ7!7S!7%7óUŸ07D7UD7‰7V‰7Š7óUŸŠ7™7VD7]7Ud7€7UŠ7–7U07D7UD7‰7V‰7Š7óUŸŠ7™7V 7Ó7UÓ78óUŸ8'8U'8,8óUŸ 7Ó7TÓ78óTŸ8)8T)8,8óTŸ 7Ó7QÓ78óQŸ8)8Q)8,8óQŸ´7Ó7R8)8R¸7ð7Vñ7 8V 8,8V¼7ï7Sñ78S8 8U 8,8S°7Ó7P8$8P 9¹9T¹9À9PÀ9:óTŸ 9À90ŸÀ9ð9Tü9:0Ÿ 9À90ŸÀ9Ê9PÊ9Ú90ŸÚ9ð9Pü9:0Ÿ 9§9tŸ§9ë9Xë9ð9Pü9:X::U:æ:Sæ:ç:óUŸç:\;S::U:æ:Sæ:ç:óUŸç:\;S:/:UL;V;U8:J:U<;F;US:e:U,;6;Un:€:U;&;U‰:—:U ;;U :®:Uù:;U·:Å:Uç:ö:UÎ:â:U€;œ;Uœ;Ô;óUŸÔ;ì;Uì;<óUŸ<<U•; ;Y•; ;xpå;ð;Rå;ð;Z <¥<U¥<³<óUŸ <¢<T¢<³<óTŸ<¥<U¥<«<Q«<¬<óUŸÀ<ê<Uê<¦=V¦=°=óUŸ°= BV@%@Y%@s@‘°>œ>Rœ>®>sp"ŸËAÒARÀ<7=1Ÿ7=M=]Y= =]°=ó=1Ÿó=ÒA]íA B1Ÿ=7=0ŸíAøA0Ÿõ<=0Ÿ=Y=Y°=Æ=0ŸÆ=å=1ŸíABY_={=Uó=ö=UÂ@AUAAvÀ_={=Tó=ö=TÂ@ATAAQö@ATAAQ{=“=Sù=µ>Sµ>Ó>QÓ>ä>Sä>ø>Qø>?sŸ??Q?`?Sy?Â@S%AASA˜AQ˜A°AP°A´Au¹AÒAS>F>R??R€?ö?Rö?@‘°‹@°@R°@Â@‘°%AARÂ>Ð> v#s("ŸA¤A v#s("Ÿˆ? ?vÀ%AAvÀˆ? ?vÄ%AAvÄ(>F>vÀ??vÀ ?ö?vÀ(>F>vÄ??vÄ ?ö?vÄL?`?P,@E@PE@f@UH@w@Q4BDBSJBâBS8BEBVJBâBVcBÌB]gBÌB\ðBCUCœCóUŸðBCTC‘C^‘C’CóTŸ’CœC^ðBCQCC]C’CóQŸ’CœC]ðBCRC‹CV‹C’CóRŸ’CœCVðBCXCC\C’CóXŸ’CœC\ C…CP…C‰CS’CšCP CÌCUÌCÍCóUŸ CÌCTÌCÍCóTŸ CÌCUÌCÍCóUŸ¤CºCPºCÀCpŸÀCÁCu1ŸÁCÌCPÐCDUDDóUŸÐCDTDDóTŸÐCDUDDóUŸØCøCPøCþCpŸþCÿCu1ŸÿCDPP_ƒ_Uƒ_„_óUŸ„_–_U–_±_V±_¶_óUŸ¶_Í_VÍ_Ñ_óUŸW_~_S~_ƒ_u„_°_S¶_Ï_SŸ_±_V±_¶_óUŸŸ_°_SŸ_±_V±_¶_óUŸŸ_°_ s8#80.ÿŸDJDUJDRDSRDkDóUŸkD|DU|D}DóUŸ}D¦DS¦DáDóUŸDJDTJDkDóTŸkD|DT|D}DóTŸ}D”DT”D¦Dw¦DáDóTŸDJDQJDkDóQŸkD|DQ|D}DóQŸ}D”DQ”D¦D‘X¦DáDóQŸRDVDPVDbDS¦DÝDS#DhDVkDvDVvD|Dp€}DÞDVðDEUEEóUŸEEUEEóUŸEEUEEóUŸðDETEEóTŸEETEEt\ŸEEóTŸEETEEóTŸôDEQEEQEEQ E(EU(EƒESƒE„Ep3$q"„E“ES“E”EU”E•EóUŸ•E±ES$E(EU(EƒESƒE„Ep3$q"„E“ES“E”EU”E•EóUŸ•E±ES2E@EU¡E®EUIEWEU•EžEUÀEÈEUÈE>FS>F?Fp3$q"?FKFSKFLFULFMFóUŸMF|FSÄEÈEUÈE>FS>F?Fp3$q"?FKFSKFLFULFMFóUŸMF|FSÒEäEUiFvFUíEûEUYFfFUFFUMFVFU€FˆFUˆFãFSãFäFp3$q"äFóFSóFôFUôFõFóUŸõFGS„FˆFUˆFãFSãFäFp3$q"äFóFSóFôFUôFõFóUŸõFGS’F FUGGU©F·FUõFþFU GpGUpG—G\—G3HóUŸ3HmH\mHuHUuHÇH\ÇHÈIóUŸÈIëI\ëIßJóUŸ GSGTSGœGSœG3HóTŸ3H&IS&IÀIóTŸÀIëISëI{JóTŸ{JßJS GmGQmGáGVáGêGóQŸêGHVH HóQŸ H)HV)H3HóQŸ3HmHVmHyHQyHßJV GwGRwGœG‘¸œG3HóRŸ3HmH‘¸mHyHRyH*I‘¸*IÀIóRŸÀIëI‘¸ëI{JóRŸ{JÚJ‘¸ÚJßJóRŸ GœG0ŸœGÛG\êGûG\ H+H\+H2HU«IÀI\ G½G0Ÿ½GÉGPÉGÛGSêGûGS H«I0Ÿ«IÀISÀIßJ0Ÿ>GKGQSGœG_—GœG\xG‡GP3HêH‘¸ÈIëI‘¸{JŸJ‘¸3HmHVmH†H0Ÿ3HmHSmH†H0Ÿ3HmH\mHuHUuHÇH\ÇHêHóUŸÈIëI\{JŸJóUŸ3HÇH0ŸÇHËHPËHêH\ÈIëI0Ÿ{JŸJ\3HHH0ŸHHcHPcHmH]mH€H0Ÿ€HHPHêH]ÈIëI]{JŸJ]3HkH0ŸkHmHPmH‘H0Ÿ‘HÃHPÃHêH^ÈIëI0Ÿ{JŸJ^I«I\ÀIÈI\ëI{J\ŸJßJ\I IV I«I^ÀIÈISëI{J^ŸJßJ^2IŠI]ëITJ]]J{J]^IbI‘¸bIŠIQBJMJPMJ]J‘¸I«I_ÀIÈI_ëIJ_J+JP+J{J_ŸJªJ_ªJßJPaJuJUJMJSàJ KU K#L^#L&LóUŸ&L\L^\LrLUrL M^àJ KT K\LóTŸ\LrLTrL MóTŸàJíJu\LcLuàJK0ŸKKPKÖK\ÖKçK0ŸLL\L&LP&L7L\7LrL0ŸrLL\L•LP•LšL0ŸšLÚL\ÚLßL0ŸßLM\M M0ŸàJ8K0Ÿ8KçK_&L\L_\LrL0ŸrLL_LýL0ŸýL M_K0Ÿ>KËKV&L5LVrLLVàJ>K0ŸPKhKPhKrK}tKK0ŸK‘KP‘K¬KS·KÄK0ŸÄKËKPËKçKS&L\LS\LrL0ŸLýL0ŸýL MSàJËK0ŸËKçK ¨Ÿ&L7L0Ÿ7L\L ¨Ÿ\L•L0Ÿ•LšL ¨ŸšLÄL0ŸÄLßL ¨ŸßLûL0ŸûL M ¨ŸàJËK0ŸËKçK 0¶ Ÿ&L7L0Ÿ7L\L 0¶ Ÿ\L•L0Ÿ•LšL 0¶ ŸšLÄL0ŸÄLßL 0¶ ŸßLûL0ŸûL M 0¶ ŸàJËK0ŸËKçKV&L7L0Ÿ7L\LV\L•L0Ÿ•LšL Å$ŸšLÄL0ŸÄLßLVßLûL0ŸûLýL Ê$ŸýL MV\KvKU¬K¶KUšLÄL Ù¨ ŸÑ_’`a’`Aaóõ)ŸÑ_–`b–`8a‘H8aAaóõ)ŸÑ_á_cá_Aaóõ)ŸÑ_å_då_Aaóõ)ŸÑ_`e``óõ)Ÿ`?`e?`Aaóõ)ŸÑ_`f``óõ)Ÿ`.`f.`Aaóõ)ŸÑ_Ü_gÜ_Aaóõ)ŸÑ_Õ_hÕ_Aaóõ)ŸÑ_–`U–`AaóUŸ`–`j–`8a*óõ)óõ)óõ)óõ)óõ)óõ)‘Xö)Ÿ8aAa0óõ)óõ)óõ)óõ)óõ)óõ)óõ)óõ)ŸL`X`eX`c`gc`k`ek`–`g–`8a‘PÑ_`0Ÿ`Ý`0ŸÝ`ß`Pß`a0ŸaaPa8a0Ÿ``õ)ô))ÿŸ`t`õ)ô))ÿŸt`v`p1'Ÿˆ`8a0Ÿ`.`õ)õ)õ)õ)õ)õ)Ÿ.`7`õ)óõ)õ)õ)õ)õ)Ÿ7`;` õ)óõ)óõ)õ)õ)õ)õ)Ÿ;`?`(õ)óõ)óõ)õ)õ)õ)óõ)óõ)Ÿ?`C`,õ)óõ)óõ)óõ)õ)óõ)óõ)óõ)ŸC`H`eH`’`,õ)óõ)óõ)óõ)õ)óõ)óõ)óõ)Ÿ’`–`.õ)óõ)óõ)óõ)óõ)óõ)óõ)óõ)Ÿ–`8a0‘Hö)óõ)óõ)óõ)óõ)óõ)óõ)óõ)ŸL`N` u $0.ÿŸN`X`õ)ô)*ÿŸX`c`õ)ô)*ÿŸc`k`õ)ô)*ÿŸk`t`õ)ô)*ÿŸt`v`Pt`v`p1'ŸÑ_`0Ÿ`½`P½`Ý`VÝ`ß`0Ÿß`å`På`8aVÑ_Ä`0ŸÄ`Ï`PÏ`Ý`SÝ`å`0Ÿa aP a8aSÑ_Ð`0ŸÐ`Ý`PÝ` a0Ÿ aaPaAa0ŸÑ_å`0Ÿaa0Ÿa8aIŸÑ_å`0Ÿaa0Ÿa8a 0¶ ŸÑ_å`0Ÿaa0Ÿa8a\MMUMMMSMMXMóUŸXMaMSaMeMóUŸM)MT)MTMVTMWMPWMXMóTŸXMbMVbMeMóTŸM*MQ*MVM\VMWMTWMXMóQŸXMdM\dMeMóQŸ+M/MP=MAMPMMUMMMSMMXMóUŸXMaMSaMeMóUŸAMVM\VMWMTWMXMóQŸAMTMVTMWMPWMXMóTŸAMMMSMMXMóUŸpM{MU{MñM\ñMóMóUŸóMüM\üMýMóUŸpM‰MT‰MîMSîMòMPòMóMóTŸóMùMSùMýMóTŸpMŠMQŠMïMVïMòMTòMóMóQŸóMúMVúMýMóQŸpM{MU{MñM\ñMóMóUŸóMüM\üMýMóUŸ‹MMPžM¢MP±MµMPµMïMVïMòMTòMóMóQŸµMîMSîMòMPòMóMóTŸµMñM\ñMóMóUŸÄMÈMP×MÛMPN6NU6N=NóUŸ=NGNUGNLNóUŸLNaNUaNpNóUŸN6NT6N=NóTŸ=NINTINLNóTŸLN^NT^NpNóTŸN6NP=NINPLNaNUaNfNóUŸLN^NT^NfNóTŸpN¦NU¦N­NóUŸ­N·NU·N¼NóUŸ¼NÑNUÑNàNóUŸpN¦NT¦N­NóTŸ­N¹NT¹N¼NóTŸ¼NÎNTÎNàNóTŸŠN¦NP­N¹NP¼NÑNUÑNÖNóUŸ¼NÎNTÎNÖNóTŸàNOOUOO`OóUŸàN-OUýNOPOOp:ŸO-OPçNöNQöN-OR;OOOUOO`OóUŸ`O•OU•OšS_šS›SóUŸ›SU_`O©OT•O#P0Ÿ#PbP^bPsP0ŸsPšP^šP£Q0Ÿ£QÓQ1ŸÓQgR0ŸnRxS0Ÿ›SšT0ŸšT¾T1Ÿ¾TU0ŸPPP½OàO‘˜R`S‘˜THT‘˜XTšT‘˜¾TÝT‘˜úTU‘˜½OàO_R`S_THT_XTšT_¾TÝT_úTU_äOéOP½OàO^™RØR0ŸáR`S^THT^XT}T0Ÿ}TšT^¾TÝT^úTU^ S=SP¾TÇTPÇT×TR½OàO‘ ´RÁRTÁR`S‘ THT‘ XTnTTnTšT‘ ¾TÝT‘ úTU‘ KQQS3RaRPbRgRPäSTP3RAR0ŸARgR]àQgR^äST^ÝTúT^úQRURgR‘ äST‘ ÝTîTUîTúT‘ šT·TZŸ U‚UU‚UƒUóUŸ U‚UT‚UƒUóTŸ U~UQ~UƒUóQŸ2U8UQ2U8UuHUZUQHUZUuAaPaUPaqaóUŸAaPaTPapaSpaqaóTŸQalaSUšUUšU›UóUŸ UÑUUÑUþUQþUVóUŸV VU V VóUŸ UþUTþUVóTŸV VT V VóTŸ UÇUQÇUVóQŸV VQ V VóQŸËUVSVVPËUìU8ŸËUìU0ŸËUìUSVGVUGVZVsZV`VóUŸ`VdVUdVeVóUŸVZVTZV`VóTŸ`VdVTdVeVóTŸV+VQ+V`VóQŸ`VdVQdVeVóQŸ8V_VS_V`VP8VOV Ÿ8VOV0Ÿ8VOVSpV§VU§VºVsºVÀVóUŸÀVÄVUÄVÅVóUŸpVºVTºVÀVóTŸÀVÄVTÄVÅVóTŸpV‹VQ‹VÀVóQŸÀVÄVQÄVÅVóQŸ˜V¿VS¿VÀVP˜V¯V Ÿ˜V¯V0Ÿ˜V¯VSÐVçVTçVñVSñVõVóTŸõVWTWWóTŸWTWSTWXWóTŸõVW0Ÿqa{aU{aºaóUŸqa{aT{a¸aS¸aºaóTŸ‚a‹aP‹a¹aV¹aºaP—a³aóUŸ—a³aS`WhWUhW›WS›WœWóUŸœW´WS´W¸WU¸W¹WóUŸdWhWUhW›WS›WœWóUŸœW´WS´W¸WU¸W¹WóUŸ¨W´WS´W¸WU¸W¹WóUŸÀWñWUñWÔX\ÔXÛXóUŸÛX•Y\ÀWñWTñWÖX]ÖXÛXóTŸÛX•Y]ÀWñWQñWØX^ØXÛXóQŸÛX•Y^íWX0ŸSX§X0ŸÛXòXSòXY0Ÿ/YY0ŸíWCX0ŸCXIXPIXxXVxXXPX§XVÛXY0ŸYYVY$YP$YYVíW+X0Ÿ+X;XP;XIX_IX§X0ŸÛXêXPêXòX_òXY0ŸY/Y_/YY0ŸiXxXv xXXp X•Xv SYsYv íWñWUñWX\òXY\íWòW0ŸòWXPXXVòXYVíWX0ŸXXPòXüXPüXYS Y­YU­YVZVVZ`ZóUŸ`Z ZV Z¢ZóUŸ¢Z»ZV»Z¼ZP¼ZéZVéZëZUëZñZóUŸÐYíYPîYZP®YÏYPÏYVZS`ZpZS¢ZºZS¼ZÖZScU>cÚcóUŸÄbcTc:cóTŸ:c>cT>cÚcóTŸðbòbbc cc%c-ca-c:c‘XAc™c‘X®cÕc‘XP^|^U|^…^P…^Ÿ^óUŸŸ^­^P­^°^óUŸ°^Ä^PÄ^Ç^óUŸÇ^ä^Pä^ô^Uô^g_óUŸg_q_Uq_v_óUŸP^…^T…^Ÿ^óTŸŸ^­^T­^°^óTŸ°^Ä^TÄ^Ç^óTŸÇ^ø^Tø^g_óTŸg_q_Tq_v_óTŸt^†^1Ÿ°^Ç^1Ÿ|^…^U°^¿^U¿^Ä^p#Ÿx^^Q^…^p°^Ä^pÇ^q_1Ÿâ^ø^bø^g_‘Xg_q_bÚc!dU!d"dóUŸ"d(dU(dCdVCdkdóUŸÚc!dT!d"dóTŸ"d,dT,dkdóTŸëcøcTócøcSd dTd dSddPd!du#h"d(du#h(d,dv#h%ddd0Ÿ%d,dT,dddóTŸ%dCdVCdddóUŸ3d?dP?d\dS\d^dUadddS3dCdVCdddóUŸCdFdPFdddVkd’dU’d´d\´dÓdUÓdÔdóUŸÔdÖdUÖde\eeóUŸkd±dT±d´d]´dÒdTÒdÓdQÓdÔdóTŸÔdÝdTÝde]eeóTŸ†d´d0Ÿ’d±dU¸dÁdPÁdÓdu#hÔdÖdu#hÖdÝd|#hÔde0ŸÔdÝdTÝde]ÔdÖdUÖde\äde]ädódPódeSäde\ôd eP eeV€__U_¶_V¶_·_óUŸ·_ý_Vý_þ_óUŸþ_ `V_¨_V·_Ô_Vþ_ `V_¤_U·_Î_Uþ_`U”_¤_Q·_Î_Qþ_`QÔ_ý_Vý_þ_óUŸ``U`-`S-`.`óUŸ.`4`S4`8`U8`9`óUŸ#`8`P@`d`Ud`b‘¸@`X`TX`’`]’`ŸaóTŸŸa­a]­a·aóTŸ·aÒa]ÒaøaóTŸøab]@`’`0Ÿ’`a\ma|a0ŸŒaŸa\Ÿa­a0Ÿ­a·aP·aÒa0ŸÒaða\ðab0Ÿ@`÷`0Ÿ÷`ú`Pú`a]ma|a0ŸŒaŸa]Ÿab0Ÿ@`¤`0Ÿ¤`®`P®`a^ma|a0ŸŒaŸa^ŸaÒa0ŸÒaða^ðab0Ÿ@`µ`0Ÿµ`Æ`PÆ`aSma|a0ŸŒaŸaSŸaÒa0ŸâaðaSðab0Ÿ’`÷`]ÒaÝa]âaëa]d`x`Tx`y` à2*·aÍaTÍaÒa à2*øaüaTd`y`U·aÒaUøaüaUh`y`Q·aÒaQøaüaQÍ`ì`Pì`ó`Yó` a_ŒaŸa_âaðaPbbUb‘b\‘b»bóUŸ»bÇb\ÇbÑbóUŸÑbèb\èbêbóUŸêbc\c cóUŸ cc\cfP>fRfVŒf©f0Ÿ©f«fP«f¹f0ŸÙfgS:gLgSRfvfSLg]hSRfŒf ÿŸ¹fÙf ÿŸLg]h ÿŸRfŒf0Ÿ¹fÙf0ŸLg]h0ŸhfvfQ[gžgsŸÀgFhsŸgžgQÐgØgsØgågs”ŸågêgPýg hQh5hP5hFhV'hFh0Ÿ`h‹hU‹hÜiSÜiåióUŸåiœjSœj±jU±jÁjóUŸÁjâjSâj)kóUŸ)k kS k»kóUŸ`h‹hU‹hÜiSÜiåióUŸåiœjSœj±jU±jÁjóUŸÁjâjSâj)kóUŸ)k kS k»kóUŸâjøjPøj%kS k»kSphîhVj$jVLj_jV‰j¾jVÁj×jVphšh0ŸšhªhPªhØh\Lj_j\‰jœj\œjÁj0Ÿph‹hU‹hÜiSÜiåióUŸåiœjSœj±jU±jÁjóUŸÁjâjSâj)kóUŸ)k kS k»kóUŸŸhºhU‰j–jUØhµi0Ÿôij0Ÿ$jLj0Ÿ_jqj0ŸÁj×j0Ÿ)k k0ŸØhµiSôijS$jLjS_jqjSÁj×jS)k kSAiµiP_jkjPkjqj‘X)kckPâh5iSôijS$jLjSæhiU8jFjUêh5i\ôij\$jLj\îh5iVôijV$jLjVNi‹is0ŸNi‹is(ŸNi‹is Ÿ`i‹iUpi‹iTpi‹iR\i‹iQi¥iR‘i©iQšiµiU_jkjU)k kS4kekU8k k\Š\>ŠNŠPNŠ[ŠS[Š{Š0Ÿ{Š×ŠS׊ûŠ0ŸûŠ8‹SŠ‹è‹0Ÿè‹ý‹\2{I{0Ÿp{{P{·{‘¨µ‰º‰P1yQ}0ŸQ}`}P`}Ò}]Ò}Ö}^Ö}Ý}]Ý}ö}^ö}µ0Ÿµ€^€„€0Ÿ„€˜€P˜€µ€]µ€Ê€0ŸÊ€]?^xƒÝƒ0ŸÝƒáƒ]áƒ\„0Ÿ\„k„Pk„‘„]‘„©„R©„´„‘ ´„Ó„0ŸÓ„í„]ü„ …0Ÿ ……P…x…]‚…†…R†…±…‘ å…†]†¤†0Ÿ¤†¶†]¶†Ã†^Æó†]ó†ø‡0Ÿø‡ˆ]ˆ*ˆ^*ˆ\ˆ0Ÿ\ˆsˆPsˆ}ˆ^œˆ³ˆP³ˆ»ˆ^»ˆÜˆ0ŸÜˆéˆ]éˆûˆ^ûˆ‰‘ ‰-‰^-‰Š0ŸŠ'ŠP'Š3Š^3Š{Š0Ÿ{ŠŒŠPŒŠ™Š^™Š¨Š]¨Š¸Š^¸Š‹0Ÿ‹)‹])‹8‹^Š‹ý‹0Ÿt}´}^´}Æ}0ŸÆ}É}^Ö}Ù}^ö}9~0Ÿø‡þ‡^3Š[Š0Ÿ1yµ0ŸµêQꀑ°€Ÿ€0ŸŸ€¯€P¯€Þ€^Þ€ñ€Rñ€÷€‘ R1‘ 1?QxƒÝƒ0ŸÝƒöƒ‘ /„´„0Ÿ´„Ó„^Ó„ä„0Ÿä„í„Pí„1…^1…F…0ŸF…x…^x…¼…0Ÿ¼…Õ…PÕ… †^ †¤†0Ÿ¤†­†^­†Ã†QÆ}ˆ0Ÿ}ˆ—ˆP—ˆœˆQœˆ¥ˆ^¥ˆ»ˆQ»ˆÜˆ0ŸÜˆóˆPóˆûˆQûˆ‰0Ÿ‰-‰Q-‰™Š0Ÿ™Š­ŠP­Š¸ŠQ׊ûŠ0ŸûŠ‹^‹‹Q‹8‹0ŸŠ‹ý‹0Ÿ1yµ0ŸµêYꀑ¨€ 0Ÿ .P.?YxƒÝƒ0ŸÝƒúƒPúƒ „^A„U„PU„q„^q„‚„0Ÿ‚„´„^´„x…0Ÿx…œ…^œ…;ˆ0Ÿ;ˆOˆPOˆWˆ^Wˆ\ˆY\ˆeˆ^eˆ}ˆY}ˆûˆ0Ÿûˆ ‰^ ‰-‰Y-‰¸Š0Ÿ¸ŠÏŠ^ϊ׊Y׊8‹0ŸŠ‹ý‹0Ÿ1yµ0Ÿµê[ꀑ¸€K0Ÿxƒ…0Ÿ…µ…Pµ…å…]å…}ˆ0Ÿ}ˆŠˆ]Šˆœˆ[œˆûˆ0Ÿûˆ‰P‰-‰[-‰ý‹0Ÿƒ†¤†‘ ó†‡‘ ‡@‡‘ W‡³‡‘ Š‹£‹‘ 1y^y0Ÿ^yhy9Ÿhyèy0Ÿzß~0Ÿß~ø~DŸø~-0Ÿ-FDŸFy0Ÿyµ>ŸµêPꀑ €10Ÿ1KPxƒ‰0Ÿ‰-‰P-‰8‹0Ÿ8‹n‹Pn‹Š‹‘ Š‹£‹0Ÿ£‹³‹P³‹ý‹>Ÿ1y^y0Ÿ^yhy 0¶ Ÿhyèy0Ÿzß~0Ÿß~ø~ 0¶ Ÿø~-0Ÿ-F 0¶ ŸFy0Ÿy€ 0¶ Ÿ€10Ÿ1Í‚ 0¶ Ÿxƒ‰0Ÿ‰-‰ 0¶ Ÿ-‰8‹0Ÿ8‹Š‹ 0¶ ŸŠ‹£‹0Ÿ£‹ý‹ 0¶ Ÿ1y^y0Ÿ^yhy  Ÿhyèy0Ÿzß~0Ÿß~ø~ ^ Ÿø~-0Ÿ-F _ ŸFy0Ÿyµ B ŸµêTê€w€10Ÿ1KTxƒ‰0Ÿ‰-‰T-‰8‹0Ÿ8‹n‹Tn‹Š‹wŠ‹£‹0Ÿ£‹³‹T³‹è‹ B Ÿè‹ý‹T~z©zS…z›z]›zzU z£z].‡;‡‘˜€‡¬‡‘˜"‡6‡‘W‡’‡‘:|]|P|C}^å‰ÿ‰^ÿ‰Š_“|º|Qº|Ã|~É|ÿ|Q}=}Q§|É|2ŸÒ|ÿ|QC}t} ÿŸt}}0Ÿ}Æ}1ŸÆ}Ö}0ŸÖ}ç}1Ÿç}9~Vø‡*ˆ1ŸŠ3Š ÿŸ3Š;ŠV“}¬}2Ÿ“}¤}P§}«}P~9~V€]€SŃ݃S[ŠsŠS'€B€_Ń݃_×€ñ€Rñ€÷€‘ Þ€ ^‹„©„R©„´„‘ ‘„´„]x……]S…p…Rp…x…‘ Y…x…Så…6†S¤†ª†S»ˆÅˆS²~ß~ ï© Ÿ- ÷© ŸpxƒxUƒx?{S?{“{óUŸ“{ã{Sã{ô{óUŸô{û{Sû{|óUŸ|.}S.}8}óUŸ8}^~S^~~óUŸ~€S€)€óUŸ)€+€S+€0€óUŸ0€_€S_€d€óUŸ“x}y0Ÿ}yœyVœy[z0Ÿ[zfzV“{ã{0Ÿ|:|0ŸG|"}0Ÿ8}Q}0ŸQ}a}VÓ}ø}0Ÿ~~0Ÿß~ÿ0Ÿÿ)€V7€_€0Ÿ˜xªxU“{ž{Uªx}yòËßœy[zòËߤ{ã{òËß|:|òËßG|}òËß8}Q}òËßÓ}ø}òËß~~òËßß~ÿòËß7€_€òËߪx}y0ŸœyLz0ŸLzRzPRz[zV¤{ã{0Ÿ|+|0ŸG|y|0Ÿy|„|P„||V|}0Ÿ8}Q}0ŸÓ}ø}0Ÿ~~0Ÿß~ø~0ŸjÙ0Ÿ7€_€0ŸªxÙx‘@ŸªxÙx‘¸ŸªxÙx‘°ŸµxÙxP¼{Ô{P¡¸P¸Ã‘¨ zzTzz °4*jT† °4*7€;€TzzUj†U7€;€U zzQj†Q7€;€Qø~j0ŸÙÿ0Ÿ7UÙæU j]Ùÿ]jVÙÿV7PÙäPµ|é|‘@é|ï|QS€Y€Qµ|é|‘¸µ|é|‘°Â|ï|US€Y€UÏ|}^D€_€^Ó|}VD€_€V¹|ï|PS€W€P}yœyV[zfzV}"}0ŸQ}a}Vÿ$€V}yœyS[z?{S?{O{óUŸã{ô{óUŸô{û{Sû{|óUŸ:|G|S}.}S.}8}óUŸQ}Ó}Sø}^~S^~~óUŸ~ß~Sÿ€S€$€óUŸ)€+€S+€0€óUŸ0€7€SÖzO{Pã{î{Pî{ô{Sô{|P ~?~P~¤~P|z•zP|z„zQ„zzs0€z™zR™zÉzs0Ÿ™zÉzs(Ÿ™zÉzs Ÿ¡zÉzT¥zÉzR©zÉzQ™zÉz|a}Ó}S©~Ì~S0€7€Se}”}U¿~Æ~Ui}³}V©~Ì~V0€2€Vm}Ó}]©~Ì~]0€7€]ãz{s0Ÿãz{s(Ÿãz{s Ÿïz{Uÿz{Tÿz{Rçz{Q {<{R${C{Q1{O{Uã{î{U ~^~S^~~óUŸ~©~SÌ~ß~S)€+€S+€0€óUŸ~?~U~¦~U~~]~©~]Ì~ß~])€0€]~~\~©~\Ì~ß~\)€0€\ €€S€$€óUŸ €$€Vp€ƒ€Uƒ€®€S®€²€óUŸ²€ÝSÝáóUŸáðSð÷U÷øóUŸø‹‚Sp€ƒ€Uƒ€®€S®€²€óUŸ²€ÝSÝáóUŸáðSð÷U÷øóUŸø‹‚Sƒ€›€U²€÷€UÀÑUÑÕsÈø ‚U ‚‚sȃ€®€S®€²€óUŸ²€ÝSÝáóUŸáðSð÷U÷øóUŸø‹‚Sœ€©€Pá÷P²€ÀSø‹‚S4µPµÀ‘X‚E‚Pu‚y‚PÖ€ï€PÖ€Þ€QÞ€ç€s0Ú€ó€Ró€Às0Ÿ‚‹‚s0Ÿó€Às(Ÿ‚‹‚s(Ÿó€Às Ÿ‚‹‚s Ÿû€1T13s ÿ€3R3Qó€3vAxs0ŸAxs(ŸAxs ŸMxU]xT]xRExQ~µR‚žQµU‚E‚Uu‚{‚U‚£‚U£‚é‚Sé‚í‚óUŸí‚ƒSƒ!ƒóUŸ!ƒô…S‚Ö‚TÖ‚Ú‚QÚ‚í‚óTŸí‚õ‚Tõ‚ø‚óTŸø‚ƒTƒ:ƒóTŸ:ƒÀƒTÀƒ\„óTŸ\„d„Td„j„óTŸj„‡„T‡„…óTŸ…D…TD…°…óTŸ°…»…T»…Ã…‘XÃ…ç…Tç…ô…óTŸ0ƒ:ƒPˆ„·„0Ÿ—‚£‚U£‚é‚Sé‚í‚óUŸí‚ƒSƒ!ƒóUŸ!ƒô…S£‚Ú‚Uí‚õ‚Uø‚ƒUƒƒsÈ:ƒuƒUuƒ…ƒsÈ\„d„Uj„ƒ„Uƒ„‡„sÈ……U…B…sÈÃ…ê…Uê…î…sÈ£‚é‚Sé‚í‚óUŸí‚ƒSƒ!ƒóUŸ!ƒô…SÛ‚ä‚Pö‚ø‚P!ƒ/ƒPe„j„P:ƒÀƒTÀƒ\„óTŸj„‡„T‡„ˆ„óTŸ·„…óTŸ…D…TD…°…óTŸ°…»…T»…Ã…‘XÃ…ç…Tç…ô…óTŸ:ƒ\„Sj„ˆ„S·„ô…SʃQ„PQ„\„‘X·„ê„P”…˜…PxƒŒƒPxƒ|ƒQ|ƒ…ƒs0xƒƒUƒÀƒs0ŸƒÀƒs(ŸƒÀƒs Ÿ˜ƒÀƒUœƒÀƒR ƒÀƒQ…”…S°…Ã…S…D…U°…»…U…”…\°…Ã…\!…”…V°…Ã…V׃„s0Ÿ×ƒ„s(Ÿ×ƒ„s Ÿéƒ„Uùƒ„Tùƒ„R僄Q„6„R„:„Q+„Q„U·„…S”…°…S»„ê„U”…š…U¿„…\”…°…\Ä…V”…°…VÙ…ï…SÙ…ç…Tç…ï…óTŸ¥„·„0Ÿ†(†U(†(‡S(‡.‡óUŸ.‡ïŠS††T†ë†]ë†.‡óTŸ.‡X‰]X‰€‰óTŸ€‰®‰]®‰³‰óTŸ³‰܉]܉ŠóTŸŠêŠ]êŠïŠóTŸ8† ‡V.‡ª‡VyˆÖˆV&‰?‰VX‰ŠVŠ>ŠVžŠÄŠVÚŠêŠVk† ‡S.‡P‰SX‰êŠSë†ñ†Pñ† ‡]X‰o‰]o‰u‰Pu‰€‰]܉î‰]î‰ø‰Pø‰Š]ˆ“ˆP“ˆÖˆ\³‰܉\­ˆȈUljÖ‰U†φTŠ1ŠT1Š5Š €/*ÚŠáŠT†Ó†VŠ>ŠVÚŠêŠV†φPŠ$ŠP$Š5ŠvÚŠáŠv`‡r‡U¸Š¾ŠUî‰ø‰Pø‰Š]”‡qˆ0ŸÖˆ?‰0Ÿ>ŠžŠ0ŸÄŠÚŠ0Ÿ”‡qˆSÖˆ?‰S>ŠžŠSÄŠÚŠSý‡qˆP ‰‰P‰&‰‘¨>ŠoŠPÑŠÕŠPž‡ñ‡SÖˆ ‰S¢‡чU‰‰U¦‡ñ‡\Öˆ ‰\ª‡ñ‡VÖˆ ‰V ˆGˆs0Ÿ ˆGˆs(Ÿ ˆGˆs ŸˆGˆU,ˆGˆT,ˆGˆRˆGˆQIˆaˆRMˆeˆQVˆqˆU ‰‰U>ŠžŠSÄŠÚŠSDŠoŠUÑŠ׊UHŠžŠ\ÄŠÚŠ\LŠžŠVÄŠÚŠVðŠ„‹U„‹…‹óUŸ…‹µ‹Uµ‹ŒóUŸŒ&ŒU&ŒYŒóUŸYŒgŒUgŒ/óUŸ‹„‹uŸ„‹…‹óU#Ÿ8‹E‹u” ÿÿÿÿN$u” ÿÿÿÿ!ŸP‹U‹u”ŸU‹X‹Pm‹p‹pŸp‹q‹Pq‹|‹u…‹µ‹Uµ‹ŒóUŸŒ&ŒU&ŒYŒóUŸYŒgŒUgŒ/óUŸ…‹µ‹Uµ‹Ý‹óUŸŒ&ŒU&ŒPŒóUŸYŒgŒUgŒ™ŒóUŸóUŸš‹µ‹PYŒgŒP…‹±‹0Ÿ±‹À‹ © ŸÀ‹Ý‹QŒ&Œ0Ÿ&ŒDŒQYŒcŒ0ŸcŒwŒ ‘© Ÿ…‹À‹0ŸÀ‹Ý‹PŒ&Œ0Ÿ&Œ-ŒP-ŒPŒSYŒrŒ0ŸrŒwŒPSÝ‹ó‹S™ŒS/SÝ‹Œ ÿŸ™Œ ÿŸ/ ÿŸÝ‹Œ0Ÿ™Œ0Ÿ/0Ÿ§ŒsŸ"sŸÅŒÊŒs”ŸÊŒÑŒPáŒäŒpŸäŒéŒPéŒñŒsñŒs” ÿÿÿÿN$s” ÿÿÿÿ!Ÿ0fQf/Ž_`ŽG_€º_}‘’_±’Ó’_Ý’“_“F“QF“Y“óQŸY“ƒ“_²“Í“_Ù“þ“_%”„”_“”-•_7•F•_S•ó–_—X—_—ñ—_[˜Ê™_Ö™¿š_›]›_x›ˆ›_ œãœ_óœQ_£7ž_DžOž_]žhž_yž„ž_”ž·ž_Èž Ÿ_®Ÿ¹Ÿ_ÊŸíŸ_ýŸI _\ g _x ƒ _‘ ý¡_ ¢¢_&¢E¢_V¢.£_>£¤_¤פ_礬¥_½¥€¦_¦U§_f§)¨_9¨þ¨_©Ò©_â©°ª_Áª«_«k¬_|¬?­_O­ö­_ ®®_"®-®_;®F®_V®a®_o®z®_‹®–®_¤®¯®_¿®Ê®_Ø®ã®_ô®ÿ®_ ¯¯_(¯3¯_A¯L¯_]¯h¯_v¯¯_‘¯œ¯_ª¯µ¯_Ưѯ_߯ê¯_ú¯°_°°_/°:°_H°S°_c°n°_|°‡°_˜°£°_±°¼°_̰×°_å°ð°_0†R†“‘°“F“RF“±‘°0€X€)Ž‘ˆ)Ž`ŽóXŸ`ŽS‘ˆS€óXŸ€Â‘ˆÂ}‘óXŸ}‘(’‘ˆ(’±’óXŸ±’“‘ˆ“F“XF“}“‘ˆ}“²“óXŸ²“ø“‘ˆø“%”óXŸ%”Y”‘ˆY”“”óXŸ“”ü”‘ˆü”7•óXŸ7•u•‘ˆu•„•óXŸ„•s—‘ˆs——óXŸÂ— ˜‘ˆ ˜[˜óXŸ[˜¸˜‘ˆ¸˜ϘóXŸÏ˜ç˜‘ˆç˜™óXŸ™¿š‘ˆ¿šýšóXŸýšc›‘ˆc›x›óXŸx›Ž›‘ˆŽ›£›óXŸ£›¹›‘ˆ¹›×›óXŸ×›í›‘ˆí› œóXŸ œQ‘ˆQ£óXŸ£±‘ˆ0†0Ÿ†®X[Ž`ŽX©Ží^‘z‘^}‘‘^‘ ‘X ‘°‘‘ Ô‘“^“Y“0Ÿ7•S•^„•—^—/—X/—˜^Ϙì˜X옙‘˜™±^0k‘1Ÿ}‘±1Ÿ0†0Ÿ†UŽ\UŽXŽ‘˜XŽŸSŸL‘¨L€S€Â‘¨ÂíS‘s‘S}‘‘‘¨‘°‘\°‘±’S±’Ý’‘¨Ý’“S“Y“0ŸY“§“\§“²“‘˜²“Á“\Á“Ù“[Ù“°–S°–ù–‘¨——\—/—[/—ϘSϘì˜[옙\™™‘™Ö™SÖ™þ™‘¨¿šýšSýš ›‘¨ › œS:SQ/žS/žDž‘¨mŸ~ŸS‘ H¡S0†0Ÿ†ŸUŸ‹]‹L‘ L€]€Â‘ Âí]‘x‘]}‘‘‘ ‘±’]±’Ý’‘ Ý’“]“Y“0ŸY“°–]°–ù–‘ —/—U/—Ϙ]Ϙê˜Uꘙ‘ˆ™Ö™]֙癑 ¿šýš]ýš ›‘  › œ]:]Q/ž]mŸ~Ÿ]‘ H¡]0†0Ÿ†®ZUŽ`ŽZ¸Ží\‘v‘\}‘‘\‘ ‘Z ‘°‘‘¨Ô‘ç‘\’“\“Y“0Ÿ7•S•\„•—\—/—Z/—˜\Ϙì˜Z옙‘ ™±\0†0Ÿ†íw‘o‘wo‘}‘‘€}‘“w“Y“0ŸY“ù–w—í™wí™ù™Pù™¿š‘ ¿š œw œ‘ :w:Q‘ QDžwDžmŸ‘ mŸ~Ÿw~Ÿ‘ ‘ ‘ H¡wH¡±‘ ‘|‘_|‘}‘P(’p’_0a0Ÿa†TPŽ`ŽVL€VÂíVp’±’V“Y“0ŸÏ™Ö™V ››Va†0Ÿ†Ÿ‘˜ŸŽ‘˜#Ÿ`ŽS‘˜#Ÿ€Â‘˜#Ÿ}‘‘‘˜#Ÿ‘”‘pŸ”‘(’‘˜#Ÿ±’“‘˜#ŸY“s“‘˜#Ÿ²“—‘˜#Ÿ—/—P/—s—‘˜#ŸÂ— ˜‘˜#Ÿ[˜Ϙ‘˜#ŸÏ˜Ó˜PÓ˜ݘ‘˜™¿š‘˜#Ÿýšc›‘˜#Ÿx›Ž›‘˜#Ÿ£›¯›‘˜#Ÿ×›ã›‘˜#Ÿ œQ‘˜#Ÿ£±‘˜#Ÿ0š0Ÿš®]®Û0ŸÛïPïXŽSXŽ`ŽY`ŽpŽSpŽŽ0ŸŽ¸Ž^¸ŽöŽ0ŸöŽ PR™0Ÿ™«P«ÃVÃ'0Ÿ'LPLoYo€‘ˆ€VÂ0ŸÂÏY}‘‘0Ÿ‘°‘]°‘Ô‘SÔ‘ç‘0Ÿç‘’^’’0Ÿ’(’P±’Í’VÍ’Ý’YÝ’é’Pé’î’Yî’ù’‘ “²“0Ÿ²“Ù“PÙ““”0Ÿ“”'•^'•7•Y7•„•0Ÿ°–Ž—0ŸÂ—'˜0Ÿ˜Ϙ^Ϙ™0ŸÏ™Ö™YÖ™Rš0ŸRšfšP¡š¿š0Ÿýš›0ŸM›]›0Ÿx›ˆ›0Ÿ£›œ0Ÿœ6œP6œQœwQœ«œ0Ÿóœ0Ÿ:BPBGYGQwQ£0Ÿ/žDž0ŸDžIžPIž]žY]žyž0Ÿyž~žP~ž”žY”žúž0Ÿúž ŸPEŸVŸ0ŸVŸZŸw~Ÿ†ŸP†Ÿ‹ŸY‹Ÿ•Ÿw•ŸšŸPšŸ®ŸY®ŸÊŸ0ŸýŸx 0Ÿx Œ wH¡X¡0ŸX¡s¡Ps¡Ž¡wœ¡ò¡0Ÿò¡÷¡P÷¡ ¢Y ¢!¢w&¢V¢0Ÿk¢¢0Ÿ¢µ¢Pµ¢º¢Yº¢¿¢w££0Ÿ>£N£0ŸN£i£Pi£„£w’£F¤0ŸF¤^¤P^¤c¤Yc¤h¤w«¤¸¤0Ÿç¤÷¤0Ÿ÷¤¥P¥-¥w;¥ï¥0Ÿï¥¦P¦ ¦Y ¦¦wT¦a¦0Ÿ¦ ¦0Ÿ ¦»¦P»¦Ö¦w䦘§0Ÿ˜§°§P°§µ§Yµ§º§wý§ ¨0Ÿ9¨I¨0ŸI¨d¨Pd¨¨w¨A©0ŸA©Y©PY©^©Y^©c©w¦©³©0Ÿâ©ò©0Ÿò© ªP ª(ªw6ªóª0Ÿóª «P ««Y««wX«n«0Ÿ«­«0Ÿ­«È«PÈ«ã«wñ«®¬0Ÿ®¬ƬPƬˬYˬЬw­ ­0ŸO­f­0Ÿf­y­Py­•­w•­©­0Ÿ©­½­P½­­Y­Ç­w ®®P®"®Y"®6®w;®@®P@®V®YV®[®P[®o®Yo®‹®0Ÿ‹®Ÿ®w¤®©®P©®¿®Y¿®Ä®PĮخYØ®ô®0Ÿô®¯w ¯¯P¯(¯Y(¯-¯P-¯A¯YA¯]¯0Ÿ]¯q¯wv¯{¯P{¯‘¯Y‘¯–¯P–¯ª¯Yª¯Ư0ŸÆ¯Ú¯w߯ä¯Pä¯ú¯Yú¯ÿ¯Pÿ¯°Y°/°0Ÿ/°C°wH°M°PM°c°Yc°h°Ph°|°Y|°˜°0Ÿ˜°¬°w±°¶°P¶°̰Y̰ѰPѰå°Yå°±0Ÿ0“Ž0Ÿ“ŽÇŽ\ÇŽÚŽ0ŸÚŽïŽPïŽ ‘  ²0Ÿ²ÃPÃþSþL0ŸLoRo€‘€„P„¯S¯ÏR}‘‘S‘Ô‘0ŸÔ‘’\’(’‘ ±’Ý’PÝ’å’‘ ù’“”0Ÿ“”$•\$•7•R7•S•PS•˜0Ÿ˜Ϙ\Ϙç™0Ÿç™ù™Pù™š‘ š0š0Ÿ0šKšPKšfšwfš=œ0Ÿ=œQœPšœóœ0Ÿóœ‘ :0Ÿ:>wQ/ž0Ÿ/žDžPDžXžw]žbžPbžyžRyž”ž0ŸÈžØž0ŸØžóžPóž Ÿw ŸVŸ0ŸVŸ^ŸP^ŸcŸRcŸmŸwmŸ~Ÿ0Ÿ~Ÿ‚Ÿw•Ÿ©Ÿw®Ÿ³ŸP³ŸÊŸRÊŸ 0Ÿ ) P) W w\ a Pa x Rx } P} ‘ R‘ z¡0Ÿz¡’¡P’¡—¡R—¡œ¡wá¡ ¢0Ÿ ¢¢P¢&¢RV¢{¢0Ÿ{¢–¢P–¢±¢w¿¢p£0Ÿp£ˆ£Pˆ££R£’£w×£ä£0Ÿ¤$¤0Ÿ$¤?¤P?¤Z¤wh¤¥0Ÿ¥1¥P1¥6¥R6¥;¥w€¥¥0Ÿ½¥Í¥0ŸÍ¥è¥P襦w¦¦0ŸÂ¦Ú¦PÚ¦ߦRߦä¦w)§6§0Ÿf§v§0Ÿv§‘§P‘§¬§wº§k¨0Ÿk¨ƒ¨Pƒ¨ˆ¨Rˆ¨¨wÒ¨ߨ0Ÿ©©0Ÿ©:©P:©U©wc©ª0Ÿª,ªP,ª1ªR1ª6ªw{ª‘ª0ŸÁªѪ0ŸÑªìªP쪫w«Ï«0ŸÏ«ç«Pç«ì«Rì«ñ«w6¬L¬0Ÿ|¬Œ¬0ŸŒ¬§¬P§¬¬wЬ€­0Ÿ€­¢­P¢­¹­wÇ­ ®0Ÿ ®®w"®'®P'®;®R;®V®0ŸV®j®wo®t®Pt®‹®R‹®®P®¤®R¤®¿®0Ÿ¿®Ó®wخݮPÝ®ô®Rô®ù®Pù® ¯R ¯(¯0Ÿ(¯<¯wA¯F¯PF¯]¯R]¯b¯Pb¯v¯Rv¯‘¯0Ÿ‘¯¥¯wª¯¯¯P¯¯ƯRƯ˯P˯߯R߯ú¯0Ÿú¯°w°°P°/°R/°4°P4°H°RH°c°0Ÿc°w°w|°°P°˜°R˜°°P°±°R±°̰0ŸÌ°à°wå°ê°Pê°±RRr‘°r>,ÿŸr’ ~”<)ÿŸë'VœÂP}‘‘V°–È–VΖì–t0)ÿŸ/—X—‘°r>,ÿŸÖ™Þ™t0)ÿŸšŽš ‘°4,ÿŸŽš¡šPx››‘°r>,ÿŸ{œ–œP–œšœw«œ·œP·œÀœwÀœÌœ ‘°4,ÿŸÌœÝœP:Q ‘°4,ÿŸDžOž ‘°4,ÿŸ]žhž ‘°4,ÿŸ ž±žP2ŸEŸPÖŸçŸPýŸI  ‘°4,ÿŸ\ g  ‘°4,ÿŸÂ¡Ý¡PÝ¡á¡w2¢?¢PV¢b¢Pb¢k¢wã¢þ¢Pþ¢£w£(£P¸£Ó£PÓ£×£wð£ý£PŒ¤§¤P§¤«¤wĤѤPa¥|¥P|¥€¥w™¥¦¥P5¦P¦PP¦T¦wm¦z¦P §%§P%§)§wB§O§PÞ§ù§Pù§ý§w¨#¨P³¨ΨPΨÒ¨wë¨ø¨P‡©¢©P¢©¦©w¿©Ì©P\ªwªPwª{ªwªªªP9«T«PT«X«wz«‡«P¬2¬P2¬6¬wX¬e¬Pô¬­P­­w,­9­Pgr ~”>)ÿŸr’ ~”<)ÿŸÂ—ý— ~”>)ÿŸM›V› ~”>)ÿŸ-0ŸÈ–—0ŸÖ™¿š0Ÿýš›0Ÿ œ0Ÿ:Q0Ÿ/žmŸ0Ÿ~Ÿ‘ 0ŸH¡±0Ÿó–ù–Pýš›P0PŽ0ŸPŽ`ŽQ`ŽL0ŸLoQo€‘˜€Â0ŸÂÏQ}‘(’0Ÿ±’G“0ŸG“Y“ ŸY“‹“0Ÿ‹“²“ Ÿ²“”0Ÿ”%” Ÿ%”Ï™0ŸÏ™Ö™QÖ™ ›0Ÿ ›› QŸ›±0Ÿ0PŽ0ŸPŽ`Ž ª Ÿ`ŽG0ŸG€ ª Ÿ€Â0ŸÂ‘ ª Ÿ}‘(’0Ÿp’±’ ª Ÿ±’G“0ŸG“Y“ ª ŸY“‹“0Ÿ‹“²“ ª Ÿ²“”0Ÿ”%” ª Ÿ%”Ï™0ŸÏ™Ö™ ª ŸÖ™ ›0Ÿ ›› ª Ÿ›±0Ÿ0PŽ0ŸPŽ`Ž_`ŽG0ŸG€_€Â0ŸÂí_}‘(’0Ÿp’±’_±’G“0ŸG“Y“ ÂGŸY“‹“0Ÿ‹“²“ ÙGŸ²“”0Ÿ”%” HŸ%”Ï™0ŸÏ™Ö™_Ö™ ›0Ÿ ›› KJŸ›±0ŸŸ®U‘ ‘UЬô¬Y ­+­Y+­,­wä¬ô¬P ­+­PÖ™Þ™~Ö™¿š ÿŸ œ ÿŸ:Q ÿŸ/žmŸ ÿŸ~Ÿ‘  ÿŸH¡± ÿŸÖ™¿š0Ÿ œ0Ÿ:Q0Ÿ/žmŸ0Ÿ~Ÿ‘ 0ŸH¡±0Ÿí™GšwóœüœTüœw]žtžwýŸ% w\ s w š0š1Ÿ š¿š ÿŸ œóœ ÿŸ:Q ÿŸDžmŸ ÿŸ~ŸýŸ ÿŸx ‘  ÿŸH¡± ÿŸ š¿š0Ÿ œóœ0Ÿ:Q0ŸDžmŸ0Ÿ~ŸýŸ0Ÿx ‘ 0ŸH¡±0ŸfšŽšYÀœËœY˜̜wpšŽšpÿŸÀœËœpÿŸ œœ2Ÿ œ«œ ÿŸyžmŸ ÿŸ~ŸýŸ ÿŸx ‘  ÿŸH¡± ÿŸ œ«œ0ŸyžmŸ0Ÿ~ŸýŸ0Ÿx ‘ 0ŸH¡±0ŸQœ{œR”žŸžRŸž žweœ{œP”žŸžPȞ؞3ŸÈžVŸ ÿŸ~ŸýŸ ÿŸH¡± ÿŸÈžVŸ0Ÿ~ŸýŸ0ŸH¡±0Ÿ Ÿ2ŸYÊŸÕŸYÕŸÖŸwŸ2ŸPÊŸÕŸPH¡X¡4ŸH¡V¢ ÿŸk¢± ÿŸH¡V¢0Ÿk¢±0Ÿœ¡¡R&¢1¢R1¢2¢w°¡¡P&¢1¢Pk¢{¢5Ÿ¿¢ã¢Y££Y££wÓ¢ã¢P££P>£N£6Ÿ>£̰ ÿŸ>£̰0Ÿ’£¸£Rä£ï£Rï£ð£w¦£¸£Pä£ï£P¤$¤7Ÿ¤˜° ÿŸ¤˜°0Ÿh¤Œ¤Y¸¤äYäĤw|¤Œ¤P¸¤äPç¤÷¤8Ÿç¤c° ÿŸç¤c°0Ÿ;¥a¥R¥˜¥R˜¥™¥wO¥a¥P¥˜¥P½¥Í¥9Ÿ½¥/° ÿŸ½¥/°0Ÿ¦5¦Ya¦l¦Yl¦m¦w%¦5¦Pa¦l¦P¦ ¦:Ÿ¦ú¯ ÿŸ¦ú¯0Ÿä¦ §R6§A§RA§B§wø¦ §P6§A§Pf§v§;Ÿf§Ư ÿŸf§Ư0Ÿº§Þ§Y ¨¨Y¨¨wΧÞ§P ¨¨P9¨I¨<Ÿ9¨‘¯ ÿŸ9¨‘¯0Ÿ¨³¨Rߨê¨Rê¨ë¨w¡¨³¨Pߨê¨P©©=Ÿ©]¯ ÿŸ©]¯0Ÿc©‡©Y³©¾©Y¾©¿©ww©‡©P³©¾©Pâ©ò©>Ÿâ©(¯ ÿŸâ©(¯0Ÿ6ª\ªR‘ªœªRœªªwJª\ªP‘ªœªPÁªѪ?ŸÁªô® ÿŸÁªô®0Ÿ«9«Yn«y«Yy«z«w)«9«Pn«y«P«­«@Ÿ«¿® ÿŸ«¿®0Ÿñ«¬RL¬W¬RW¬X¬w¬¬PL¬W¬P|¬Œ¬AŸ|¬‹® ÿŸ|¬‹®0Ÿ`Ž“Ž\°‘Ô‘\Ù“”\%”4”\S•„•\}ŽŸSŸS‘¨€Â‘¨}‘‘‘¨Ô‘(’S±’Ý’‘¨Ý’“S%”°–S°–ù–‘¨/—ϘS™Ö™SÖ™þ™‘¨¿šýšSý𛑍› œS:SQ/žS/žDž‘¨mŸ~ŸS‘ H¡SŽ©ŽQ%”m”Q“”Ÿ”QS•k•Qk•~•sY”m”Qu•„•2Ÿ©Ž½ŽXç‘þ‘X¸ŽÇŽZÔ‘á‘Z’’ZÇŽÓŽ‘ˆÇŽS ÿŸ€Â ÿŸ}‘‘ ÿŸ’(’ ÿŸ±’“ ÿŸ7•S• ÿŸ„•— ÿŸ/—˜ ÿŸ™± ÿŸÇŽS0Ÿ€Â0Ÿ}‘‘0Ÿ’(’0Ÿ±’“0Ÿ7•S•0Ÿ„•—0Ÿ/—˜0Ÿ™±0Ÿ 3Y„•£•‘ ü•[–Y…–°–Y[˜g˜Yg˜˜‘ ™D™YD™u™‘ ›8›Y8›M›‘  S ÿŸ€Â ÿŸ}‘‘ ÿŸ±’Ý’ ÿŸù’“ ÿŸ„•— ÿŸ/—˜ ÿŸ™± ÿŸ S0Ÿ€Â0Ÿ}‘‘0Ÿ±’Ý’0Ÿù’“0Ÿ„•—0Ÿ/—˜0Ÿ™±0Ÿ%3Q –[–yŸ…–°–yŸ[˜g˜yŸg˜˜‘ #Ÿ-–3–y”Ÿ3–8–RM–[–P—–§–P§–°–yh˜˜P{˜˜0Ÿ„•£•‘ ™D™YD™u™‘ ›8›Y8›M›‘ !™D™P›8›P„•¬•Q™8™0Ÿ8™T™ © ŸT™u™Q›,›0Ÿ,›M› ‘© Ÿ„•‹•P‹••X•¬•Z¬•Æ•‘ ™T™0ŸT™u™P›C›0ŸC›M›Pu™™™X£ÆXž/žX‘ Ò XÒ  ¡‘ ¡-¡X-¡?¡‘ ?¡H¡Xu™Ä™ ÿŸ£/ž ÿŸmŸ~Ÿ ÿŸ‘ H¡ ÿŸu™Ä™0Ÿ£/ž0ŸmŸ~Ÿ0Ÿ‘ H¡0Ÿ‹™™™P£ÆxŸ ž/žxŸmŸ~ŸxŸ‘ Ò xŸÒ ¡‘ #Ÿ?¡H¡xŸ¸ÆP‘ — x”Ÿ— œ R® Á P?¡H¡xÓ ï Pë ¡0Ÿ‹ŽUŽ’pU }‹S ÿŸ€Â ÿŸ}‘‘ ÿŸ±’Ý’ ÿŸ°–— ÿŸÖ™¿š ÿŸýš› ÿŸ œ ÿŸ:Q ÿŸ/žmŸ ÿŸ~Ÿ‘  ÿŸH¡± ÿŸ‹S0Ÿ€Â0Ÿ}‘‘0Ÿ±’Ý’0Ÿ°–—0ŸÖ™¿š0Ÿýš›0Ÿ œ0Ÿ:Q0Ÿ/žmŸ0Ÿ~Ÿ‘ 0ŸH¡±0ŸÃëSœSÍëpÿŸ—pÿŸŸ”'•^'•7•Y˜Ϙ^Ÿ”Ë”QË”•‘ ˜¿˜Q¸˜À˜0Ÿ=—Ž—0Ÿx›ˆ›0Ÿ×› œ0ŸQz0Ÿ=—s—Tx››T×›ñ›Tñ› œ‘ˆ6—s—Xx››X×›ñ›Xñ› œ‘{—Ž—PQUPH—s—Yx››Y×›ñ›Yñ› œ‘˜Ö—'˜0ŸM›]›0Ÿ£›×›0Ÿz£0ŸÖ— ˜TM›V›T£›½›T½›×›‘ˆÏ— ˜XM›V›X£›½›X½›×›‘˜'˜Pz~Pá— ˜YM›V›Y£›½›Y½›×›‘˜ŒrŒUrŒ“’S“’›’óUŸŒ¤ŒT¤Œ±ŒV±Œ¸ŒT¸ŒdVd)óTŸ)IVIŽóTŸŽÒVÒx‘óTŸx‘Ž‘VŽ‘®‘óTŸ®‘°‘V°‘C’óTŸC’R’VR’›’óTŸŒ¡ŒQ¡Œ±Œ]±ŒÁŒQÁŒu]uŽóQŸŽŽ’]Ž’›’óQŸBŒkŒUyŒÊLŸ)ILŸŽŽ’LŸyŒÊS)ISŽŽ’SyŒ¤ŒT¤Œ±ŒV±Œ¸ŒT¸ŒdVdÊóTŸ)IVŽÒVÒx‘óTŸx‘Ž‘VŽ‘®‘óTŸ®‘°‘V°‘C’óTŸC’R’VR’Ž’óTŸÊŒÈLŸŽŽ’LŸÊŒÈSŽŽ’SÊŒdVdÈóTŸŽÒVÒx‘óTŸx‘Ž‘VŽ‘®‘óTŸ®‘°‘V°‘C’óTŸC’R’VR’Ž’óTŸÊŒdVdÈóTŸŽÒVÒx‘óTŸx‘Ž‘VŽ‘®‘óTŸ®‘°‘V°‘C’óTŸC’R’VR’Ž’óTŸØŒÊ0ŸŽŽ’0ŸØŒâŒPâŒs$ØŒÈ1ŸŽŽ’1ŸØŒÊ1ŸŽŽ’1Ÿ=]|ðË|x‘Œ‘|·0ŸŽè0ŸèðPð0Ÿ+ ?þ)Ÿ+7 +þ)Ÿ7C =þ)ŸCO %þ)ŸO[ ;þ)Ÿ[g þ)Ÿgs 7þ)Ÿs 1þ)Ÿ‹ 3þ)Ÿ‹— /þ)Ÿ—£ þ)Ÿ£¯ þ)Ÿ¯» þ)Ÿ»Ç 9þ)ŸÇˆ‘0Ÿˆ‘Ž‘PŽ‘®‘0Ÿ®‘ÑPØ‘Ž’0ŸÊŒ0ŸÈ\ŽŽ’\, |80.ÿŸŽ’ |80.ÿŸ§· ÿŸ·ÈVëð0ŸŒ‘Ž‘0ŸŽ‘®‘ ÿŸ®‘Ø‘0Ÿ’’ ÿŸØŒ0Ÿ" |80)ÿŸ=I1ŸŽ’ |80)ÿŸ¯³ |80)ÿŸðõ1ŸØŒ0Ÿ, |80)ÿŸ=] |”>)ÿŸŽ’ |80)ÿŸðõ |”>)ÿŸõË |”<)ÿŸx‘Œ‘ |”<)ÿŸÊŒ0Ÿ\d0ŸduPu”VŽÒ0ŸÒæPæ‘V‘‘0Ÿ‘-‘P-‘J‘VJ‘Ž‘0Ÿ®‘Ø‘0ŸØ‘’V’R’0ŸR’a’Pa’p’Vp’’P’Ž’0ŸÊŒ”0ŸŽí0ŸíýPý$‘^$‘4‘0Ÿ4‘D‘PD‘x‘^x‘Ž‘0Ÿ®‘Ø‘0ŸØ‘æ‘Pæ‘’0Ÿ’C’^C’’0Ÿ’‰’^‰’Ž’0ŸßðPC’R’PÊŒ”0ŸŽŽ‘0Ÿ®‘æ‘0Ÿæ‘C’ ŸC’‰’0Ÿ‰’Ž’ ŸÊŒ”0ŸŽŽ‘0Ÿ®‘æ‘0Ÿæ‘C’ ª ŸC’‰’0Ÿ‰’Ž’ ª ŸÊŒ”0ŸŽŽ‘0Ÿ®‘æ‘0Ÿæ‘’^’C’ ·EŸC’‰’0Ÿ‰’Ž’ ÁEŸÇË|Çx‘ ÿŸØ‘C’ ÿŸp’Ž’ ÿŸÇx‘0ŸØ‘C’0Ÿp’Ž’0ŸüwŽ `+*ŸwޤŽP§Ž©ŽPü©Ž]ü©ŽWIróTŸIr `+*ŸIrLŸIr1ŸIr0ŸIr]IrS›’“U“&“‘ø}&“`“U`“kš‘ø}›’“T“&“óTŸ&“`“T`“«“_«“°“\°“y”_y”w•\w•¸–óTŸ¸–‚™_‚™”™\”™™_™¯™\¯™¸™_¸™Ì™\̙ՙ_Õ™ê™\ê™ù™_ù™š\šš_š#š\#š,š_,š>š\>šQš_QšYš\YškšóTŸ›’ “a “&“‘€~&“`“a`“kš‘€~¿’`“0Ÿ`“y”Vy””S”w•Vƒ–b—Vb—YšSYšbšV“`“0Ÿ`“—”‘Ø}¸–o™‘Ø}y™Yš‘Ø}“Z” ‘Ð~Ÿ“0Ÿ““ÀZ”o”‘Ð~Ÿ“0Ÿ“‘ˆ“]““°o”y”‘Ð~Ÿ“0Ÿ“‘ˆ“p““°y”b— ‘Ð~Ÿ“0Ÿ““Àb—k—‘Ð~Ÿ“0Ÿ“‘ˆ“]““°k— ˜‘Ð~Ÿ“0Ÿ““]““° ˜8˜ ‘Ð~Ÿ“0Ÿ““À8˜?˜‘Ð~Ÿ“0Ÿ““]““°?˜y™ ‘Ð~Ÿ“0Ÿ““Ày™…™‘Ð~Ÿ“0Ÿ““]““°…™”™ ‘Ð~Ÿ“0Ÿ““À”™ ™‘Ð~Ÿ“0Ÿ““]““° ™¯™ ‘Ð~Ÿ“0Ÿ““À¯™Â™‘Ð~Ÿ“0Ÿ““]““°™̙ ‘Ð~Ÿ“0Ÿ““À̙♑Ð~Ÿ“0Ÿ““]““°â™kš ‘Ð~Ÿ“0Ÿ““À¿“ý“‘Ø}ƒ–¸–‘Ø}Yškš‘Ø}¿’&“0Ÿ&“`“T`“«“_«“°“\°“¿“_¿“ý“0Ÿý“y”_y”w•\¸–‚™_‚™”™\”™™_™¯™\¯™¸™_¸™Ì™\̙ՙ_Õ™ê™\ê™ù™_ù™š\šš_š#š\#š,š_,š>š\>šQš_QšYš\1“`“0Ÿ`“{“‘à}{“°“‘à}#Ÿ°“¹“P¹“ý“‘à}ý“”‘à}#Ÿ¸–t™‘à}#Ÿy™Yš‘à}#Ÿ¿’x“0Ÿx“°“S°“ý“0Ÿý“l”Sl””X”w•S¸–w—Sw—¢˜0Ÿ¢˜²˜P²˜ ™V ™š0Ÿš>šV>šYš0Ÿ¿’ý“0Ÿý“l”Sl”y”X¸–b—Sb—Yš0ŸF”L”PL”i”^¸–Ë–PË–Ž—^ì’y”0Ÿy”w•_¸–Ž—0ŸŽ—œ—Pœ—˜^˜8˜]8˜?˜^?˜H˜]H˜Ç˜^ǘؘ0ŸØ˜í˜P혙^™y™0Ÿy™”™P”™£™^£™¯™_¯™¿™^¿™Ì™_̙ߙ^ß™ê™_Ꙛ^šš_š#šP#š1š^1š>š_>šYš0Ÿ”—y™0Ÿ”™Yš0Ÿì’y”0Ÿy””Y”¬”w¸–«—0Ÿ«—¹—P¹—‘˜V‘˜”™0Ÿ”™¯™P¯™šVšYš0Ÿ±—y™1Ÿ¯™Yš1Ÿì’y”0Ÿy””T”¬”‘à}¸–Ë—0ŸË—Ù—PÙ—‘˜w‘˜¯™0Ÿ¯™Ì™PÌ™šwšYš0ŸÑ—y™2ŸÌ™Yš2Ÿì’y”0Ÿy””R”¬”‘Ø}¸–ê—0Ÿê—÷—P÷—‘˜\‘˜Ì™0ŸÌ™ê™Pê™ó™\ó™šRšYš0Ÿì’y”0Ÿy”w•]¸–˜0Ÿ˜*˜T*˜8˜‘~8˜?˜0Ÿ?˜H˜TQ˜Z˜TZ˜z˜‘˜~z˜ê™0Ÿê™š‘˜~šYš0Ÿð—Q˜0ŸQ˜Z˜XZ˜y™‘~ê™Yš‘~ì’y”0Ÿy”w•^¸–a˜0Ÿa˜ƒ˜Pƒ˜¸˜]¸˜ô˜0Ÿô˜™P™d™]d™ê™0Ÿê™šPš#š0Ÿ#š6š]6š>š^>šGš]GšYš^N™T™PT™j™V>šYšPì’!“0Ÿ&“c”0Ÿc”y”RŸ¸–Yš0Ÿì’!“0Ÿ&“c”0Ÿc”y” 0¶ Ÿ¸–Yš0Ÿì’!“0Ÿ&“c”0Ÿc”y” C Ÿ¸–Yš0Ÿý“/”‘è}b—«—Vy™”™V ˜8˜]?˜H˜]˜(˜^(˜*˜U?˜B˜^™N™]$™N™vÿŸ¿“ý“‘è}¢•ü•\¦•ü•]ª•ü•^‹••òp‹••ò`‹••òPž••P•é•‘Ø~Ÿé•í•Uí•î•‘Ø~Ÿü•ƒ–  ¿ Ÿü•ƒ–0Ÿ –ƒ–\–ƒ–]–ƒ–^5–?–P?–ƒ–Sü•*–òtü•*–òkü•*–òbÿ•*–Pkšo›ao›£œ‘ðy£œûœóõ)Ÿûœ‘ðyióõ)Ÿi‘ðy×óõ)Ÿ×ë‘ðyëCžóõ)ŸCžŽž‘ðyŽžÛžóõ)ŸÛžíž‘ðyížEŸóõ)ŸEŸíŸ‘ðyíŸ_ óõ)Ÿ_ …¢‘ðy…¢£óõ)Ÿ£d£‘ðyd£è£óõ)Ÿè£e¤‘ðye¤î¤óõ)Ÿî¤=¦‘ðy=¦¸óõ)Ÿ¸é¸‘ðyé¸6¹óõ)Ÿ6¹J¹‘ðyJ¹™¹óõ)Ÿ™¹Ñº‘ðyѺ¹»óõ)Ÿ¹»Î»‘ðyλR¼óõ)ŸR¼½‘ðy½s½óõ)Ÿs½½‘ðy½Þ½óõ)ŸÞ½1¾‘ðy1¾u¾óõ)Ÿu¾’¾‘ðy’¾à¾óõ)Ÿà¾û¾‘ðyû¾O¿óõ)ŸO¿|À‘ðy|ÀÀÀóõ)ŸÀÀÜÀ‘ðyÜÀ'Áóõ)Ÿ'ÁAÁ‘ðyAÁŒÁóõ)ŸŒÁ©Á‘ðy©ÁýÁóõ)ŸýÁ-Ñðy-Ã{Ãóõ)Ÿ{ÚÑðyšÃ$Äóõ)Ÿ$Ä@Ä‘ðy@ÄÊÄóõ)ŸÊÄåÄ‘ðyåÄ:Åóõ)Ÿ:ÅÉÅ‘ðyÉÅSÆóõ)ŸSÆ.Ê‘ðy.ʯÊóõ)Ÿ¯ÊË‘ðyËOËóõ)ŸOËpË‘ðypËèËóõ)ŸèËCÌ‘ðyC̈Ìóõ)ŸˆÌ£Ì‘ðy£ÌøÌóõ)ŸøÌRÍ‘ðyRÍ—Íóõ)Ÿ—ÍΑðyÎLÎóõ)ŸLÎ Ï‘ðy ÏHÏóõ)ŸHϧÏ‘ðy§Ï(Ðóõ)Ÿ(Ð_Бðy_ЫÐóõ)Ÿ«ÐÎБðyÎÐ#Ñóõ)Ÿ#Ñ<Ñ‘ðy<Ñ‘Ñóõ)Ÿ‘ÑÒ‘ðyÒ`Òóõ)Ÿ`ÒæÒ‘ðyæÒ]Óóõ)Ÿ]ÓzÓ‘ðyzÓÏÓóõ)ŸÏÓÊÕ‘ðyÊÕÖóõ)ŸÖôÖ‘ðyôÖ6×óõ)Ÿ6׫בðy«×í×óõ)Ÿíר‘ðyØMØóõ)ŸMØÍß‘ðyÍßàóõ)Ÿà*à‘ðy*àpàóõ)Ÿpà‚à‘ðy‚àôàóõ)Ÿôà3á‘ðy3ánáóõ)Ÿná‡á‘ðy‡áÄáóõ)ŸÄáÚá‘ðyÚáâóõ)Ÿâ-â‘ðy-âbâóõ)Ÿbâxâ‘ðyxâçâóõ)Ÿçâ1ã‘ðy1ãcãóõ)Ÿcãwã‘ðywãÝãóõ)ŸÝãä‘ðyäNäóõ)ŸNäŠä‘ðyŠä¼äóõ)Ÿ¼äïä‘ðyïä!åóõ)Ÿ!åNå‘ðyNå€åóõ)Ÿ€å™å‘ðy™åÞåóõ)ŸÞåôå‘ðyôå(æóõ)Ÿ(æõæ‘ðyõæFçóõ)ŸFç|ç‘ðy|ç¥çóõ)Ÿ¥ç¼ç‘ðy¼çèóõ)Ÿèè‘ðyè`èóõ)Ÿ`èè‘ðyè¶èóõ)Ÿ¶èÏè‘ðyÏèúèóõ)Ÿúèé‘ðyé;éóõ)Ÿ;éQé‘ðyQé|éóõ)Ÿ|é’é‘ðy’éííóõ)Ÿííï‘ðyï4ïóõ)Ÿ4ï‡ï‘ðy‡ï§ïóõ)Ÿ§ïÔï‘ðyÔïÿïóõ)ŸÿïSð‘ðySðsðóõ)ŸsðŠð‘ðyŠðáðóõ)Ÿáð•ñ‘ðy•ñßöóõ)Ÿßöõö‘ðyõö÷óõ)Ÿ÷1÷‘ðy1÷x4óõ)Ÿkšo›bo›¬œ‘øy¬œûœóõ)Ÿûœ‘øyióõ)Ÿiˆ‘øyˆ×óõ)Ÿ×ô‘øyôCžóõ)ŸCž—ž‘øy—žÛžóõ)ŸÛžüž‘øyüžEŸóõ)ŸEŸöŸ‘øyöŸ_ óõ)Ÿ_ Ž¢‘øyŽ¢£óõ)Ÿ£m£‘øym£è£óõ)Ÿè£n¤‘øyn¤î¤óõ)Ÿî¤F¦‘øyF¦¸óõ)Ÿ¸ò¸‘øyò¸6¹óõ)Ÿ6¹S¹‘øyS¹™¹óõ)Ÿ™¹Úº‘øyÚº¹»óõ)Ÿ¹»×»‘øy×»R¼óõ)ŸR¼(½‘øy(½s½óõ)Ÿs½™½‘øy™½Þ½óõ)ŸÞ½:¾‘øy:¾u¾óõ)Ÿu¾›¾‘øy›¾à¾óõ)Ÿà¾ ¿‘øy ¿O¿óõ)ŸO¿…À‘øy…ÀÀÀóõ)ŸÀÀëÀ‘øyëÀ'Áóõ)Ÿ'ÁJÁ‘øyJÁŒÁóõ)ŸŒÁ²Á‘øy²ÁýÁóõ)ŸýÁ6Ñøy6Ã{Ãóõ)Ÿ{ãÑøy£Ã$Äóõ)Ÿ$ÄOÄ‘øyOÄÊÄóõ)ŸÊÄôÄ‘øyôÄ:Åóõ)Ÿ:ÅÒÅ‘øyÒÅSÆóõ)ŸSÆ7Ê‘øy7ʯÊóõ)Ÿ¯ÊË‘øyËOËóõ)ŸOËyË‘øyyËèËóõ)ŸèËQÌ‘øyQ̈Ìóõ)ŸˆÌ²Ì‘øy²ÌøÌóõ)ŸøÌ`Í‘øy`Í—Íóõ)Ÿ—ÍΑøyÎLÎóõ)ŸLÎÏ‘øyÏHÏóõ)ŸHϰÏ‘øy°Ï(Ðóõ)Ÿ(ÐhБøyhЫÐóõ)Ÿ«Ð×Бøy×Ð#Ñóõ)Ÿ#ÑEÑ‘øyEÑ‘Ñóõ)Ÿ‘ÑÒ‘øyÒ`Òóõ)Ÿ`ÒïÒ‘øyïÒ]Óóõ)Ÿ]Ó‰Ó‘øy‰ÓÏÓóõ)ŸÏÓÓÕ‘øyÓÕÖóõ)ŸÖýÖ‘øyýÖ6×óõ)Ÿ6״בøy´×í×óõ)Ÿíר‘øyØMØóõ)ŸMØÈÞ‘øyÈÞ·ßóõ)Ÿ·ßÖß‘øyÖßàóõ)Ÿà3à‘øy3àpàóõ)Ÿpà‘à‘øy‘àôàóõ)Ÿôà<á‘øy<ánáóõ)Ÿná–á‘øy–áÄáóõ)ŸÄáãá‘øyãáâóõ)Ÿâ6â‘øy6âbâóõ)Ÿbââ‘øyâçâóõ)Ÿçâ:ã‘øy:ãcãóõ)Ÿcã€ã‘øy€ãÝãóõ)ŸÝã%䑸y%äNäóõ)ŸNä“䑸y“ä¼äóõ)Ÿ¼äøä‘øyøä!åóõ)Ÿ!åW呸yWå€åóõ)Ÿ€å¨å‘øy¨åÞåóõ)ŸÞåý呸yýå(æóõ)Ÿ(æþæ‘øyþæFçóõ)ŸFç…ç‘øy…ç¥çóõ)Ÿ¥çÅç‘øyÅçèóõ)Ÿè!è‘øy!è`èóõ)Ÿ`è–è‘øy–èx4óõ)Ÿkšo›co›»œ‘€z»œûœóõ)Ÿûœ)‘€z)ióõ)Ÿi—‘€z—×óõ)Ÿ×ý‘€zýCžóõ)ŸCž ž‘€z žÛžóõ)ŸÛžŸ‘€zŸEŸóõ)ŸEŸ ‘€z _ óõ)Ÿ_ —¢‘€z—¢£óõ)Ÿ£|£‘€z|£è£óõ)Ÿè£}¤‘€z}¤î¤óõ)Ÿî¤O¦‘€zO¦¸óõ)Ÿ¸û¸‘€zû¸6¹óõ)Ÿ6¹\¹‘€z\¹™¹óõ)Ÿ™¹ãº‘€z㺹»óõ)Ÿ¹»à»‘€zà»R¼óõ)ŸR¼7½‘€z7½s½óõ)Ÿs½¢½‘€z¢½Þ½óõ)ŸÞ½C¾‘€zC¾u¾óõ)Ÿu¾¤¾‘€z¤¾à¾óõ)Ÿà¾¿‘€z¿O¿óõ)ŸO¿ŽÀ‘€zŽÀÀÀóõ)ŸÀÀôÀ‘€zôÀ'Áóõ)Ÿ'ÁYÁ‘€zYÁŒÁóõ)ŸŒÁ»Á‘€z»ÁýÁóõ)ŸýÁDÑ€zDÃ{Ãóõ)Ÿ{ìÑ€z¬Ã$Äóõ)Ÿ$ÄXÄ‘€zXÄÊÄóõ)ŸÊÄýÄ‘€zýÄ:Åóõ)Ÿ:ÅÛÅ‘€zÛÅSÆóõ)ŸSÆ@Ê‘€z@ʯÊóõ)Ÿ¯Ê&Ë‘€z&ËOËóõ)ŸO˔ˑ€z”ËèËóõ)ŸèË_Ì‘€z_̈Ìóõ)ŸˆÌ»Ì‘€z»ÌøÌóõ)ŸøÌnÍ‘€znÍ—Íóõ)Ÿ—ÍΑ€zÎLÎóõ)ŸLÎÏ‘€zÏHÏóõ)ŸHϹÏ‘€z¹Ï(Ðóõ)Ÿ(ÐqБ€zqЫÐóõ)Ÿ«ÐæÐ‘€zæÐ#Ñóõ)Ÿ#ÑTÑ‘€zTÑ‘Ñóõ)Ÿ‘Ñ(Ò‘€z(Ò`Òóõ)Ÿ`ÒþÒ‘€zþÒ]Óóõ)Ÿ]Ó’Ó‘€z’ÓÏÓóõ)ŸÏÓçÕ‘€zçÕÖóõ)ŸÖ ב€z ×6×óõ)Ÿ6×Ãב€zÃ×í×óõ)Ÿíר‘€zØMØóõ)ŸMءۑ€z¡Û·ßóõ)Ÿ·ßåß‘€zåßàóõ)ŸàBà‘€zBàpàóõ)Ÿpàšà‘€zšàôàóõ)ŸôàEá‘€zEánáóõ)ŸnáŸá‘€zŸáÄáóõ)ŸÄáòá‘€zòáâóõ)ŸâEâ‘€zEâbâóõ)Ÿbââ‘€zâçâóõ)ŸçâCã‘€zCãcãóõ)Ÿcã‰ã‘€z‰ãÝãóõ)ŸÝã.ä‘€z.äNäóõ)ŸNäœä‘€zœä¼äóõ)Ÿ¼äå‘€zå!åóõ)Ÿ!å`å‘€z`åx4óõ)Ÿkšo›do›kž‘¸ykžÛžóõ)ŸÛžK ‘¸yK _ óõ)Ÿ_ Õ¢‘¸yÕ¢£óõ)Ÿ£®£‘¸y®£è£óõ)Ÿè£´¤‘¸y´¤î¤óõ)Ÿî¤¦‘¸y¦¸óõ)Ÿ¸«¸‘¸y«¸6¹óõ)Ÿ6¹ º‘¸y º¹»óõ)Ÿ¹»>¼‘¸y>¼R¼óõ)ŸR¼¾‘¸y¾u¾óõ)Ÿu¾4À‘¸y4ÀÀÀóõ)ŸÀÀü‘¸yüÂ{Ãóõ)Ÿ{ÃÄ‘¸yÄ$Äóõ)Ÿ$Ä­Ä‘¸y­ÄÊÄóõ)ŸÊÄ6Æ‘¸y6ÆSÆóõ)ŸSÆñÉ‘¸yñÉÊóõ)ŸÊ’Ê‘¸y’ʯÊóõ)Ÿ¯ÊÚÊ‘¸yÚÊOËóõ)ŸOËÔË‘¸yÔËèËóõ)ŸèËÌ‘¸ÿÌóõ)ŸˆÌ Í‘¸y Í—Íóõ)Ÿ—ÍèΑ¸yèÎHÏóõ)ŸHÏpÏ‘¸ypφÏóõ)Ÿ†ÏБ¸yÐ(Ðóõ)Ÿ(ЈÒ‘¸yˆÒ²Òóõ)Ÿ²ÒIÓ‘¸yIÓ]Óóõ)Ÿ]Ó¾Ö‘¸y¾ÖÛÖóõ)ŸÛÖÐÚ‘¸yÐÚ·ßóõ)Ÿ·ßàà‘¸yààôàóõ)Ÿôàᑸyánáóõ)ŸnáÍ⑸yÍâçâóõ)Ÿçâ㑸yãcãóõ)ŸcãÌ㑸yÌãÝãóõ)ŸÝã䑸yäNäóõ)ŸNäv䑸yväx4óõ)Ÿkšo›eo›Õ¢‘ zÕ¢£óõ)Ÿ£j¦‘ zj¦s­óõ)Ÿs­í²‘ zí²¸óõ)Ÿ¸»‘ z»¹»óõ)Ÿ¹»×í‘ z×íííóõ)ŸííM‘ zMóõ)Ÿ«‘ z«à óõ)ŸÃ 9 ‘ z9 óõ)Ÿ}‘ z}Îóõ)ŸÎX‘ zX*óõ)Ÿ*a‘ zaóõ)ŸT"‘ zT"#óõ)Ÿ#V&‘ zV& 'óõ)Ÿ '’'‘ z’'x4óõ)Ÿkšo›fo›Õ¢‘¨zÕ¢£óõ)Ÿ£j¦‘¨zj¦s­óõ)Ÿs­1³‘¨z1³¸óõ)Ÿ¸»‘¨z»¹»óõ)Ÿ¹»×푨z×íííóõ)ŸííM‘¨zMóõ)Ÿ ‘¨z Nóõ)ŸNW‘¨zWà óõ)ŸÃ Q ‘¨zQ óõ)Ÿ"‘¨z"Wóõ)ŸWb‘¨zbÎóõ)ŸÎ}‘¨z}*óõ)Ÿ*†‘¨z†óõ)ŸT"‘¨zT"#óõ)Ÿ#&‘¨z& 'óõ)Ÿ '’'‘¨z’'x4óõ)Ÿkšo›go›Õ¢‘°zÕ¢£óõ)Ÿ£j¦‘°zj¦s­óõ)Ÿs­ƒ³‘°zƒ³¸óõ)Ÿ¸»‘°z»¹»óõ)Ÿ¹»×í‘°z×íííóõ)Ÿí펑°zŽÃóõ)ŸÃÒ‘°zÒóõ)ŸØ ‘°zØ óõ)Ÿ‘°zóõ)Ÿ™‘°z™*óõ)Ÿ*r"‘°zr"#óõ)Ÿ#’'‘°z’'ú*óõ)Ÿú*-‘°z-E-óõ)ŸE-Ñ-‘°zÑ-æ-óõ)Ÿæ-E.‘°zE.a1óõ)Ÿa1f4‘°zf4x4óõ)Ÿkšo›ho›Yž‘°yYžÛžóõ)ŸÛž9 ‘°y9 _ óõ)Ÿ_ Õ¢‘°yÕ¢£óõ)Ÿ£¹£‘°y¹£è£óõ)Ÿè£¿¤‘°y¿¤î¤óõ)Ÿî¤ý¥‘°yý¥s­óõ)Ÿs­Á°‘°yÁ°¸óõ)Ÿ¸™¸‘°y™¸6¹óõ)Ÿ6¹‘º‘°y‘º¹»óõ)Ÿ¹»,¼‘°y,¼R¼óõ)ŸR¼ô½‘°yô½u¾óõ)Ÿu¾"À‘°y"ÀÀÀóõ)ŸÀÀí‘°yíÂ{Ãóõ)Ÿ{ÃöѰyöÃ$Äóõ)Ÿ$ÄŸÄ‘°yŸÄÊÄóõ)ŸÊÄ%Æ‘°y%ÆSÆóõ)ŸSÆßÉ‘°yßÉÊóõ)ŸÊyÊ‘°yyʯÊóõ)Ÿ¯ÊÈÊ‘°yÈÊOËóõ)ŸOËÃË‘°yÃËèËóõ)ŸèËÌ‘°ÿÌóõ)ŸˆÌÍ‘°yÍ—Íóõ)Ÿ—ÍÖΑ°yÖÎHÏóõ)ŸHÏ^Ï‘°y^φÏóõ)Ÿ†ÏБ°yÐ(Ðóõ)Ÿ(ÐvÒ‘°yvÒ²Òóõ)Ÿ²Ò7Ó‘°y7Ó]Óóõ)Ÿ]Ó¬Ö‘°y¬ÖÛÖóõ)ŸÛÖÑà‘°yÑàôàóõ)Ÿôà á‘°y ánáóõ)Ÿná»â‘°y»âçâóõ)Ÿçâýâ‘°yýâcãóõ)Ÿcãºã‘°yºãÝãóõ)ŸÝãóã‘°yóãNäóõ)ŸNädä‘°ydä¼äóõ)Ÿ¼äÒä‘°yÒä!åóõ)Ÿ!å7å‘°y7å€åóõ)Ÿ€åÓå‘°yÓåÞåóõ)ŸÞå>æ‘°y>æRæóõ)ŸRæhæ‘°yhæsæóõ)Ÿsæ‰æ‘°y‰æ­æóõ)Ÿ­æÃæ‘°yÃæÞæóõ)ŸÞæ/ç‘°y/çFçóõ)ŸFç\ç‘°y\ç¥çóõ)Ÿ¥çöç‘°yöçèóõ)ŸèRè‘°yRè`èóõ)Ÿ`èvè‘°yvè¶èóõ)Ÿ¶è×í‘°y×íííóõ)ŸííJï‘°yJï§ïóõ)Ÿ§ïð‘°yðsðóõ)Ÿsð»ð‘°y»ðáðóõ)Ÿáð“ö‘°y“ößöóõ)Ÿßöú‘°yúGúóõ)ŸGú´ü‘°y´üîüóõ)Ÿîü ÿ‘°y ÿGÿóõ)ŸGÿ/‘°y/góõ)ŸgI‘°yIuóõ)ŸuÙ‘°yÙóõ)Ÿì‘°yìóõ)Ÿ|‘°y|à óõ)ŸÃ B ‘°yB óõ)ŸP‘°yPÎóõ)ŸÎ’‘°y’Áóõ)ŸÁב°y×óõ)Ÿ‘°y:óõ)Ÿ:P‘°yP*óõ)Ÿ*U‘°yUóõ)Ÿ_‘°y_#óõ)Ÿ#B#‘°yB#o#óõ)Ÿo#…#‘°y…#¯#óõ)Ÿ¯#Å#‘°yÅ# 'óõ)Ÿ 'K'‘°yK'~'óõ)Ÿ~'’'‘°y’'x4óõ)ŸEŸäŸ‘èy_ n  ‘ö)‘°yö)Ÿn r ar 0¢ ‘ö)‘°yö)Ÿ0¢|¢‘èyî¤4¦‘èy{Ãöà ‘ö)‘°yö)Ÿ$ÄŸÄ ‘ö)‘°yö)ŸÊÄ%Æ ‘ö)‘°yö)ŸSÆÔÉ‘èyÊyÊ ‘ö)‘°yö)Ÿ¯ÊýÊ‘èyOËÃË ‘ö)‘°yö)ŸèËÌ ‘ö)‘°yö)ŸˆÌšÌ‘èyøÌIÍ‘èy—ÍüÍ‘èyLÎÏ‘èyHϞϑèy(ÐVБèy«ÐÅБèy#Ñ3Ñ‘èy‘ÑÒ‘èy`ÒÝÒ‘èy]ÓqÓ‘èyÏÓÁÕ‘èyÖëÖ‘èy6עבèyí×þבèyMØÄß‘èyà!à‘èypàyà‘èyôà*á‘èyná~á‘èyÄáÑá‘èyâ$â‘èybâoâ‘èyçâ(ã‘èycãnã‘èyÝãä‘èyNää‘èy¼äæä‘èy!åEå‘èy€åå‘èyÞåëå‘èy(æìæ‘èyFçsç‘èy¥ç³ç‘èyèè‘èy`è„è‘èy¶èÆè‘èyúèé‘èy;éHé‘èy|é‰é‘èyííï‘èy4ï~ï‘èy§ïËï‘èyÿïJð‘èysðð‘èyáðò‘èyðóýó‘èy(ô5ô‘èy`ônô‘èy™ô¤ô‘èyßöìö‘èy÷(÷‘èyEŸ ‘ày_ Õ¢‘°yö)‘¸yö)Ÿî¤X¦‘ày{ÃöѰyö)‘¸yö)Ÿ$ÄŸÄ‘°yö)‘¸yö)ŸÊÄ%Æ‘°yö)‘¸yö)ŸSÆ È‘°yö)‘¸yö)Ÿ ÈÔÉ‘àyÊyÊ‘°yö)‘¸yö)Ÿ¯ÊýÊ‘àyOËÃË‘°yö)‘¸yö)ŸèËÌ‘°yö)‘¸yö)ŸˆÌÍ‘°yö)‘¸yö)Ÿ—ÍuΑ°yö)‘¸yö)ŸuÎËΑàyHÏSÏ‘ày†ÏБ°yö)‘¸yö)Ÿ(еБ°yö)‘¸yö)ŸµÐÑ‘ày#ÑpÑ‘ày‘ÑDÒ‘ày`ÒÓ‘ày]Ó®Ó‘àyÏÓþÕ‘àyÖ#בày6×Úבàyí×6Ø‘àyMØüß‘àyàYà‘àypà±à‘àyôàWá‘àyná­á‘àyÄáûá‘àyâNâ‘àybâ™â‘àyçâLã‘àycã˜ã‘àyÝã7ä‘àyNä¥ä‘ày¼ä å‘ày!åiå‘ày€å±å‘àyÞå æ‘ày(æ ç‘àyFçŽç‘ày¥çÔç‘àyè*è‘ày`èŸè‘ày¶èÞè‘àyúèé‘ày;éZé‘ày|é›é‘ày½éMì‘àyííï‘ày4ïï‘ày§ïÝï‘àyÿï\ð‘àysð“ð‘àyáðô‘ày(ô>ô‘ày`ôwô‘ày™ô­ô‘àyÏôÚô‘àyüôõ‘ày)õ4õ‘àyVõaõ‘àyƒõŽõ‘ày°õÈö‘àyßöþö‘ày÷@÷‘àyS÷®ø‘àyÉø×ø‘àyòøù‘àyù9ú‘àyGúWú‘àyrú•ú‘ày—úºú‘àyÄúæú‘àyðú@û‘àyEûjû‘àytû”û‘àyžûÁû‘àyËû¤ü‘àyîü ý‘àyý.ý‘ày8ýXý‘ày´ýÑý‘àyÓýñý‘àyûýþ‘ày–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­n­‘Èyn­s­Us­«µ‘Èy¶-¶‘Èy-¶8¶U¸»0Ÿ»¹»‘Èy¹»×í0Ÿííì0ŸìP)‘Èy”)õ)‘Èy±*0-‘ÈyE-Ñ-‘Èyæ-f4‘Èy–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­«µ‘Øy¶¸‘Øy¸»0Ÿ»¹»‘Øy¹»½é0Ÿ½éHëSHë×í‘ØyííS÷0ŸS÷™øS™øžø‘Øyžø°øS°øÉø‘ØyÉøÙøSÙøòø‘ØyòøùSùù‘ØyùîùSîùGú‘ØyGúYúSYúrú‘ØyrúúSú—ú‘Øy—ú¦úS¦úÄú‘ØyÄúÒúSÒúðú‘Øyðú_ûS_ûtû‘Øytû†ûS†ûžû‘Øyžû­ûS­ûËû‘ØyËû×üS×üP)‘Øy”)õ)‘Øy±*0-‘ØyE-Ñ-‘Øyæ-x4‘Øy–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­«µ‘ày¶¸‘ày¸»0Ÿ»¹»‘ày¹»½é0Ÿ½ééì‘Èyéì×í‘àyíírú0ŸrúŠú‘Èy—ú¯ú‘ÈyÄúÛú‘ÈyðúZû‘Èytûû‘Èyžû¶û‘ÈyËûéü‘Èyîüþü‘Èyý#ý‘Èy8ýŸý‘Èy´ýÆý‘ÈyÓýæý‘Èyûýþ‘Èy%þÿ‘ÈyGÿP)‘ày”)õ)‘ày±*0-‘àyE-Ñ-‘àyæ-x4‘ày–šEŸ0ŸEŸ. ‘˜z_ Ë¢‘Èy£®£0Ÿè£´¤‘Èyî¤j¦‘˜zT­«µ‘˜z¶¸‘˜z¸»0Ÿ»¹»‘˜z¹»!¼0ŸR¼n½‘Èys½Ù½‘ÈyÞ½p¾‘Èyu¾Û¾‘Èyà¾J¿‘ÈyO¿»À‘ÈyÀÀ"Á‘Èy'Á‡Á‘ÈyŒÁøÁ‘ÈyýÁvÑÈy{ÃåÑÈy$ÄŽÄ‘ÈyÊÄ+Å‘Èy:ÅÆ‘ÈySÆpÊ‘Èy¯ÊÿÊ‘ÈyO˲Ë‘Èyè˃Ì‘ÈyˆÌéÌ‘ÈyøÌ’Í‘Èy—ÍBΑÈyLÎuΑÈyuÎËΑ˜zHÏSÏ‘˜z†ÏòÏ‘Èy(МБÈy«ÐÑ‘Èy#тёÈy‘ÑVÒ‘Èy`Ò²Ò‘Èy²Ò'Ó‘˜z]ÓÀÓ‘ÈyÏÓ˜Ô‘Èy˜ÔP)‘˜z”)õ)‘˜z±*0-‘˜zE-Ñ-‘˜zæ-x4‘˜z–šEŸ0ŸEŸ. ‘z_ Â¢‘Øy£®£0Ÿè£´¤0Ÿî¤j¦‘zT­«µ‘z¶¸‘z¸»0Ÿ»¹»‘z¹»{Ã0Ÿ{ÃÜÑØy$Ä…Ä‘ØyÊÄ"Å‘Øy:Å Æ‘ØySÆdÊ‘Øy¯ÊÿÊ‘ØyO˩ˑØyèËzÌ‘ØyˆÌàÌ‘ØyøÌ‰Í‘Øy—Í9ΑØyLÎ:Ï‘ØyHÏSÏ‘z†ÏéÏ‘Øy(ГБØy«Ð Ñ‘Øy#ÑyÑ‘Øy‘ÑMÒ‘Øy`ÒÓ‘Øy]Ó·Ó‘ØyÏÓÖ‘ØyÖ1בØy6×èבØyí×?Ø‘ØyMØÙ‘ØyÙP)‘z”)õ)‘z±*0-‘zE-Ñ-‘zæ-x4‘z–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤ž¥0Ÿž¥j¦‘ˆzT­«µ‘ˆz¶¸‘ˆz¸»0Ÿ»¹»‘ˆz¹»^Ù0Ÿ^Ù·ß‘ˆz·ßÄá0ŸÄá°â‘ˆzçâP)‘ˆz”)õ)‘ˆz±*0-‘ˆzE-Ñ-‘ˆzæ-x4‘ˆz–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­«µ‘€z¶¸‘€z¸»0Ÿ»¹»‘€z¹»ÊÛ0ŸÊÛ·ß‘€z·ßÞå0ŸÞåP)‘€z”)õ)‘€z±*0-‘€zE-Ñ-‘€zæ-x4‘€z–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­«µ‘øy¶¸‘øy¸»0Ÿ»¹»‘øy¹»íÞ0ŸíÞ·ß‘øy·ßúè0Ÿúè×í‘øyííP)‘øy”)õ)‘øy±*0-‘øyE-Ñ-‘øyæ-x4‘øy–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­«µ‘ðy¶¸‘ðy¸»0Ÿ»¹»‘ðy¹»½é0Ÿ½é×í‘ðyíí´ñ0Ÿ´ñðó‘ðyðó(ô0Ÿ(ôßö‘ðyßöS÷0ŸS÷P)‘ðy”)õ)‘ðy±*0-‘ðyE-Ñ-‘ðyæ-x4‘ðy–šÕ¢0Ÿ£®£0Ÿè£´¤0Ÿî¤j¦0ŸT­«µ‘èy¶¸‘èy¸»0Ÿ»¹»‘èy¹»½é0Ÿ½é×í‘èyíí·ò0Ÿ·òðó‘èyðóüô0Ÿüôßö‘èyßöS÷0ŸS÷P)‘èy”)õ)‘èy±*0-‘èyE-Ñ-‘èyæ-x4‘èyœ®d°V–Và { VŸVÈÊVÚÜVìîVVV%'V79VLPV`dV*.V>BVUV"V26VIŠV’ÊVÒ VÛ¯P±S}Sà & S¥SLNS`bSwySÁúS2S:gSo“S›¼SÄâS*,S>@SU…S˜šSÙSFSNsS{S¥¾S S24SIS’¿SÒüS  SJ r Sƒ « S³ Ò SS›EŸ ‘{Ÿ“0Ÿ““ÀEŸ. ‘{Ÿ“0Ÿ““‘¸z““°. è£ ‘{Ÿ“0Ÿ““Àè£ó£S“0Ÿ“‘È{“‘Ð{““°ó£S¤ S“0Ÿ““ÀS¤î¤ ‘{Ÿ“0Ÿ““Àî¤j¦‘{Ÿ“0Ÿ““‘¸z““°j¦s­ ‘{Ÿ“0Ÿ““Às­±‘{Ÿ“0Ÿ““‘¸z““°±ª¹ ‘{Ÿ“0Ÿ““Àª¹º S“0Ÿ““Àº{º ‘{Ÿ“0Ÿ““À{º‘º‘{Ÿ“0Ÿ“‘È{“‘Ð{““°‘ºR¼ ‘{Ÿ“0Ÿ““ÀR¼l¼ S“0Ÿ““Àl¼½ ‘{Ÿ“0Ÿ““À½ ½ S“0Ÿ““À ½à¾ ‘{Ÿ“0Ÿ““Àà¾ç¾ S“0Ÿ““Àç¾oÉ ‘{Ÿ“0Ÿ““ÀoÉ€É S“0Ÿ““À€ÉªÉ sxŸ“0Ÿ““ÀªÉµÉsxŸ“0Ÿ“‘È{“P““°µÉÅÉsxŸ“0Ÿ“‘È{“‘¸z““°ÅÉÏÉsxŸ“0Ÿ““‘¸z““°ÏÉuÎ ‘{Ÿ“0Ÿ““ÀuÎzÎsxŸ“0Ÿ“‘È{“P““°z·ÎsxŸ“0Ÿ“‘È{“‘¸z““°‡ÎËÎsxŸ“0Ÿ““‘¸z““°ËÎHÏ ‘{Ÿ“0Ÿ““ÀHÏSÏ‘{Ÿ“0Ÿ““‘¸z““°SÏ²Ò ‘{Ÿ“0Ÿ““À²ÒÇÒsxŸ“0Ÿ““‘¸z““°ÇÒ'Ó‘{Ÿ“0Ÿ““‘¸z““°'ÓÏÓ ‘{Ÿ“0Ÿ““ÀÏÓ˜Ô sxŸ“0Ÿ““À˜Ô×í‘{Ÿ“0Ÿ““‘¸z““°×ííí ‘{Ÿ“0Ÿ““Àííì‘{Ÿ“0Ÿ““‘¸z““°ì ‘{Ÿ“0Ÿ““À3‘{Ÿ“0Ÿ““‘¸z““°3à  ‘{Ÿ“0Ÿ““Àà ü ‘{Ÿ“0Ÿ““‘¸z““°ü  ‘{Ÿ“0Ÿ““À\‘{Ÿ“0Ÿ““‘¸z““°\… ‘{Ÿ“0Ÿ““À…‘{Ÿ“0Ÿ““‘¸z““°Î ‘{Ÿ“0Ÿ““ÀÎÄ‘{Ÿ“0Ÿ““‘¸z““°Ä* ‘{Ÿ“0Ÿ““À*¥‘{Ÿ“0Ÿ““‘¸z““°¥ ‘{Ÿ“0Ÿ““À³ ‘{Ÿ“0Ÿ““‘¸z““°³ # ‘{Ÿ“0Ÿ““À#­$‘{Ÿ“0Ÿ““‘¸z““°­$ ' ‘{Ÿ“0Ÿ““À '’'‘{Ÿ“0Ÿ““‘¸z““°’'x4 ‘{Ÿ“0Ÿ““Àk›EŸ ‘€|Ÿ“0Ÿ““ÀEŸJŸsxŸ“0Ÿ“‘¸|“P““°JŸWŸsxŸ“0Ÿ“‘¸|“‘Àz““°WŸØŸsxŸ“0Ÿ““‘Àz““°ØŸ. ‘€|Ÿ“0Ÿ““‘Àz““°. _  ‘€|Ÿ“0Ÿ““À_ r S“0Ÿ“‘¸|“‘À|““°r “  S“0Ÿ““À“ î¤ ‘€|Ÿ“0Ÿ““Àî¤ö¤sxŸ“0Ÿ““‘Àz““°ö¤j¦‘€|Ÿ“0Ÿ““‘Àz““°j¦s­ ‘€|Ÿ“0Ÿ““Às­«µ‘€|Ÿ“0Ÿ““‘Àz““°«µ ‘€|Ÿ“0Ÿ““ÀÂo S“0Ÿ““ÀoÂ× ‘€|Ÿ“0Ÿ““À×Âí‘€|Ÿ“0Ÿ“‘¸|“‘À|““°íÂÊÄ ‘€|Ÿ“0Ÿ““ÀÊÄÑÄ S“0Ÿ““ÀÑÄHÏ ‘€|Ÿ“0Ÿ““ÀHÏSÏsxŸ“0Ÿ““‘Àz““°SÏNÖ ‘€|Ÿ“0Ÿ““ÀNÖWÖ S“0Ÿ““ÀWÖÖ sxŸ“0Ÿ““ÀÖŒÖsxŸ“0Ÿ“‘¸|“P““°ŒÖ‘ÖsxŸ“0Ÿ“‘¸|“‘Àz““°‘֑֜€|Ÿ“0Ÿ“‘¸|“‘Àz““°œÖMØ ‘€|Ÿ“0Ÿ““ÀMØÙ sxŸ“0Ÿ““ÀÙP)‘€|Ÿ“0Ÿ““‘Àz““°P)”) ‘€|Ÿ“0Ÿ““À”)õ)‘€|Ÿ“0Ÿ““‘Àz““°õ)±* ‘€|Ÿ“0Ÿ““À±*0-‘€|Ÿ“0Ÿ““‘Àz““°0-E- ‘€|Ÿ“0Ÿ““ÀE-Ñ-‘€|Ÿ“0Ÿ““‘Àz““°Ñ-æ- ‘€|Ÿ“0Ÿ““Àæ-f4‘€|Ÿ“0Ÿ““‘Àz““°f4x4 ‘€|Ÿ“0Ÿ““À5›s­ ‘ð|Ÿ“0Ÿ““Às­½é ‘ð|Ÿ“0Ÿ““À½éÈéV“0Ÿ“‘¨}“‘°}““°Èéêé V“0Ÿ““Àêééì ‘ð|Ÿ“0Ÿ““Àéìûì‘ð|Ÿ“0Ÿ“‘¨}“‘°}““°ûì&ù ‘ð|Ÿ“0Ÿ““À&ùäù V“0Ÿ““ÀäùéùV“0Ÿ“‘¨}“‘°}““°éùôù V“0Ÿ““ÀôùÄú ‘ð|Ÿ“0Ÿ““ÀÄúÐú V“0Ÿ““ÀÐúæþ ‘ð|Ÿ“0Ÿ““Àæþûþ‘ð|Ÿ“0Ÿ“‘¨}“‘°}““°ûþx4 ‘ð|Ÿ“0Ÿ““Àäšs­ ‘à}Ÿ“0Ÿ““Às­}­‘à}Ÿ“0Ÿ“‘˜~“‘ ~““°}­× ‘à}Ÿ“0Ÿ““À×ì‘à}Ÿ“0Ÿ“‘˜~“‘ ~““°ìx4 ‘à}Ÿ“0Ÿ““À ›s­ ‘Ð~Ÿ“0Ÿ““Às­Hë ‘Ð~Ÿ“0Ÿ““ÀHëKë‘Ð~Ÿ“0Ÿ“‘ˆ“‘““°KëÁõ ‘Ð~Ÿ“0Ÿ““ÀÁõ}ö V“0Ÿ““À}öƒöV“0Ÿ“‘ˆ“‘““°ƒöS÷ ‘Ð~Ÿ“0Ÿ““ÀS÷^÷V“0Ÿ“‘ˆ“‘““°^÷º÷ V“0Ÿ““Àº÷žø ‘Ð~Ÿ“0Ÿ““Àžø¥ø V“0Ÿ““À¥øGú ‘Ð~Ÿ“0Ÿ““ÀGúNú V“0Ÿ““ÀNúŠü ‘Ð~Ÿ“0Ÿ““ÀŠüŸü‘Ð~Ÿ“0Ÿ“‘ˆ“‘““°Ÿüx4 ‘Ð~Ÿ“0Ÿ““À–šÓµ0ŸÓµâµPâµ-¶‘ðy-¶9¶‘Èy¸e)0Ÿe)l)Pl)”)‘ðy”)õ)0Ÿõ)±*‘ðy±*f40Ÿ–šÐŸ0ŸÐŸ P . ‘Ðy_ { 0Ÿ{ Œ PŒ ¿¡‘Ðy¿¡a¢0Ÿa¢l¢Pl¢Õ¢‘Ðy£G£0ŸG£Š£PŠ£®£‘Èy裴¤0Ÿî¤ú¤Pú¤]¥‘Ðy]¥j¦0Ÿs­L°0ŸL°]°P]°;µ‘Ðy;µMµ0ŸMµWµPWµ«µ‘Ðy¸¸0Ÿ¸#¸P#¸+¸‘Èy+¸/¸P/¸1¹‘Èy6¹y¹Py¹»‘Èy»¹»‘Ðy¹»b¿0Ÿb¿q¿Pq¿y¿‘Øyy¿±¿0Ÿ±¿º¿Pº¿²À‘ØyÀÀÅÀPÅÀ'Á‘Øy'Á,ÁP,ÁŒÁ‘ØyŒÁýÁ0ŸýÁmÑØy{ÃÊÄ‘ÐyÊÄÏÄPÏÄ]Å‘Ðy]ŨÅ0Ÿ¨ÅSÆ‘ÐySÆaÆPaÆ—Æ‘Ðy—ƹÆ0Ÿ¹ÆÄÆPÄÆ"Ç‘Ðy"ÇÊ0ŸʯÊ‘Ðy¯ÊOË0ŸOˈÌ‘ÐyˆÌøÌ0ŸøÌ—Í‘Ðy—͆Ï0Ÿ†Ï(БÐy(ÐÙ0ŸÙ^Ù‘Ðy^ÙáÙ0ŸáÙÚPÚ‘Û‘Ðy‘ÛµÝ0ŸµÝáÝPáÝ¢Þ‘Ðy¢Þ4ß0Ÿ4ß?ßP?ß·ß‘Ðy·ßpà0Ÿpàná‘Ðynábâ0Ÿbâ«âPçâ€å‘Ðy€å¥ç0Ÿ¥çâçPâç¶è‘Ðy¶è|é0Ÿ|é¸éP¸é½é‘Ðy½éºí0Ÿºí×íPíí_î‘Ðy_î4ï0Ÿ4ï§ï‘Ðy§ïsð0Ÿsðáð‘ÐyáðGÿ0ŸGÿKÿPKÿ©ÿ‘Ðy©ÿg0Ÿg’‘Ðy’"0Ÿ"‘Ðyì0Ÿìï‘Ðyï^b0ŸbsPs“ ‘Ðy“ ¸ R¸ à ‘¨yà  0Ÿ  P m‘Ðym’R’‘¨yá0ŸáòPò¨‘Ðy¨Î^Î`0Ÿ`rPr*‘Ðy*>0Ÿ>PPP‘Ðy20Ÿ2DPD#‘Ðy##0Ÿ#'#P'# '‘Ðy '’'0Ÿ’'Á'‘ÐyÁ'Ô'PÔ'(‘Ðy(­(^­(Ä(‘ÐyÄ(ë(^ë(2)‘Ðy2)e)0Ÿ”)«)0Ÿ«)õ)‘Ðy±*$+‘Ðy.+2+R2+Z+‘¨y¸+Ê+0ŸÊ+Ð+PÐ+,‘Ðy,&,P&,q,‘Ðy½,û,‘¨y-µ-‘Ðyµ-û-0Ÿû-E.‘ÐyO.S.RS.{.‘¨yÛ.í.0Ÿí.÷.P÷.:/‘Ðy…/˜/P˜//‘Ðy/Õ/‘¨yß/ï0‘Ðyï010Ÿ1a1‘Ðya1¿1^¿1æ1‘Ðyæ1ø10Ÿø12P2F2‘ÐyF2v2^v2’2‘Ðy’2¤2P¤2©2‘Ðy©2Ø2^Ø2”3‘Ðy”3º30Ÿº3f4‘Ðy–šp›0Ÿp›Š›PŠ›¦›_¦›Ã›0ŸÃ›ß›Pß›Jœ_Jœœ0ŸœÉœPûœi_i¥P¥EŸ_EŸ~Ÿ0Ÿ~Ÿ‘ŸP‘Ÿ_ __ ® 0Ÿ® ½ P½ å _å }¡]}¡’¡0Ÿ’¡¡P¡0¢_0¢G¢0ŸG¢X¢PX¢Õ¢_£®£0Ÿè£´¤0Ÿî¤ž¥_ž¥°¥0Ÿ°¥¾¥P¾¥j¦_s­­0Ÿ­®­P®­Ü­_Ü­í­0Ÿí­ÿ­Pÿ­®_®.®0Ÿ.®=®P=®•®_•®í®0Ÿí®ü®Pü®*¯_*¯;¯0Ÿ;¯M¯PM¯i¯_i¯|¯0Ÿ|¯¯P¯Ô¯_Ô¯2°0Ÿ2°C°PC°ºµ_ºµ-¶0Ÿ¸»0Ÿ»¹»_¹»!¼0ŸR¼¤¼0Ÿ¤¼®¼P®¼½_½u¾0Ÿu¾z¾Pz¾à¾_à¾O¿0ŸO¿¤¿_¤¿ÀÀ0ŸÀÀ'Á_'ÁŒÁ0ŸŒÁýÁ_ýÁ$Ä0Ÿ$Ä)ÄP)ÄÊÄ_ÊÄ:Å0Ÿ:ÅXÅ_XÅ]Å]]ŨÅ_¨Å­ÅP­ÅŠÇ_ŠÇ8È0Ÿ8ÈHÈPHÈqÈ_qÈàÈ]àÈ÷È0Ÿ÷ÈÉPÉÏÉ‘˜zÊ„Ê]„ʯÊ_¯ÊÑÊ]ÑÊýÊ_OËËË]ËËèË_èË Ì] ̈Ì_ˆÌÌPÌ—Í_—ÍäÍ0ŸäÍuÎ_uΜΑ˜zœÎHÏ0ŸHϵÐ_µÐ#Ñ0Ÿ#Ñ(ÑP(ѯÑ_¯Ñ´Ñ]´ÑðÑ‘˜zõÑúÑPúÑ[Ò‘˜z`ÒÒ]Ò²Ò_²Ò'Ó0Ÿ]ÓÏÓ]ÏÓ˜Ô‘˜z˜ÔÕ0ŸÕÕPÕeÕ‘ÈyeÕ§Õ0Ÿ§ÕÖ‘ÈyÖÛÖ0ŸÛÖàÖPàÖ6בÈy6×v×0Ÿv׆×P†×‘בÈy‘×–×P–×íבÈyí×Ù0ŸÙ5Ù_5ÙIÙSIÙQÙ_QÙYÙSYÙÛ_ÛÛSÛÛ_Û'ÛS'ÛÊÛ_ÊÛÜÛ0ŸÜÛêÛPêÛÞ_Þ1ÞS1Þ@Þ_@ÞHÞSHÞíÞ_íÞß0ŸßßPß·ß_·ßóßPóßÄá_ÄáâPâÞå_ÞåæPæúè_úè6éP6é½é_½éÏé0ŸÏéãéPãéÿé_ÿéê0ŸêSê_Sêæë0ŸæëñëPñë&ì_&ìDí0ŸDíTíPTíàî_àîøî^øî§ï_§ïõï^õï ñ_ ñMñ^Mñ\ñ_\ñÆñ0ŸÆñÚñPÚñöñ_öñò0Ÿò3ò_3ò<ò]<òZò_ZòWó0ŸWókóPkó¯ó_¯ó(ô0Ÿ(ô[ôP[ôÏô_ÏôVõ0ŸVõ~õP~õ°õ_°õßö0Ÿßö÷_÷S÷^S÷€÷0Ÿ€÷‘÷P‘÷Â÷_Â÷å÷Vå÷_ø__øžø0ŸžøÄøPÄøù_ùrú0ŸrúÄú_ÄúÉúPÉúðú_ðúÓý0ŸÓýØýPØýñý_ûý%þ_%þGÿ0ŸGÿ‘ÿ_‘ÿ©ÿ^©ÿÄÿ0ŸÄÿÚÿPÚÿg_g¼^¼Ë_Ë 0Ÿ ^^^_ì0Ÿì_H0ŸHYPYà _à ô 0Ÿô  P _Ç0ŸÇØPØÎ_Îÿ0ŸÿPT‘ÐyTcPc|_|‹P‹¢_¢¯P¯È_ÈÚ0ŸÚçPç_P%_%2P2L_L[P[*_*9P9_-P-#_##P# '_ '!'0Ÿ!'0'P0'~'‘Ðy~'’'0Ÿ’'©'_©'Á'^Á')_)e)^e)”)0Ÿ”)Ù)^Ù)õ)_õ)±*0Ÿ±*ü+_ü+,^,Ž-_Ž-..^.."/_"/:/^:/È0_È0E1^E1.2_.2F2^F2m3_m3í3^í3f4_–š‘›0Ÿ‘› ›P ›sœ\sœœ^œûœ0Ÿûœ7P7EŸ\EŸ. 0Ÿ_ Õ¢0Ÿ£®£^®£è£\è£ú£0Ÿú£¤P¤,¤\,¤F¤0ŸF¤Q¤PQ¤´¤\0Ÿ¥¥P¥]¥\]¥j¦0Ÿs­„­0Ÿ„­–­P–­´­\´­Ç­0ŸÇ­Ö­PÖ­•®\•®T¯0ŸT¯c¯Pc¯“¯\“¯¥¯0Ÿ¥¯¯¯P¯¯°‘Ðy°~µ0Ÿ~µ‰µP‰µ-¶\¸+¸\+¸>¸^>¸Y¸\Y¸6¹0Ÿ6¹™¹\™¹»0Ÿ»¹»\¹»!¼^!¼R¼\R¼e¼Pe¼Æ¼\Ƽ½0Ÿ½à¾\à¾å¾På¾O¿\O¿Ù0ŸÙ^Ù\^Ù’Ù0Ÿ’Ù ÙP Ù‘Û\‘ÛèÝ0ŸèÝÞPÞ¢Þ\¢Þß0Ÿß+ßP+ßß\ß·ß^·ßpà0ŸpàŸàPŸàná\náâ0ŸâbâPbâ°â\çâ€å\€åè0ŸèGèPGè¶è\¶è;é0Ÿ;éwéPwé½é\½éHê0ŸHêgêPgê‡ê\‡ê„ë0Ÿ„ë“ëP“ëÅë\Åë6ì]6ìMì0ŸMìXìPXìí‘àyí×í0Ÿíí/î\/îƒî^ƒîžî\žî®î0Ÿ®î´îP´îøî\øî4ïP4ïÿï\ÿï-ð^-ðsð\sðÓð^Óðñ\ñKò0ŸKò_òP_ò§ò\§òäò0ŸäòôòPôò%ó\%ó;óS;ó@ó\@óHóSHóÀó\Àó™ô0Ÿ™ôÊôPÊôüô\üô)õ0Ÿ)õQõPQõ°õ\°õßö0Ÿßö÷\÷e÷0Ÿe÷y÷Py÷—÷\—÷®÷0Ÿ®÷ø\øžø0Ÿžøòø\òøGú0ŸGúmúPmúrú\rú—ú0Ÿ—úœúPœúºú\Äúžû0ŸžûËû\Ëûý0ŸýýPýXý\Xý…ý‘àyŠýýPýªý‘ày´ýÓý\Óýñý]ñýûý\ûý%þ]%þûþ‘àyGÿŸ0ŸŸ¤P¤ ‘Èy P"‘Èy"Š0ŸŠ‘P‘¼‘Èy¼ÎPÎì‘Èyìà0ŸàöPö\T0ŸTh\hwPwÈ\È0Ÿ P 7\7GPGL‘ÐyL '0Ÿ ''P'5'\5'~'0Ÿ~''P'’'\’'=)0Ÿ=)C)PC)”)\”)¦)P¦)«)\«)õ)0Ÿõ)±*\±*À*PÀ*ú*\ú*-0Ÿ--P-E-\E-T-PT-Ž-\Ž-À-0ŸÀ-Å-PÅ-æ-\æ-ö-Pö-û-\û-y00Ÿy0Ž0PŽ0È0\È0ú00Ÿú01P11\1Ÿ30ŸŸ3µ3Pµ3º3\º340Ÿ4,4P,4f4\–šæ›0Ÿæ›œPœJœVJœ×0Ÿ×žPžEŸVEŸ˜Ÿ0Ÿ˜Ÿ«ŸP«Ÿ. V_ @¡0Ÿ@¡K¡PK¡æ¡‘àyæ¡Õ¢0Ÿ££0Ÿ£*£P*£®£V裤0Ÿ¤&¤P&¤´¤Vî¤]¥V]¥j¦0Ÿs­d°0Ÿd°w°Pw°3²V3²´0Ÿ´*´P*´Ã´Vô-¶0Ÿ¸+¸0Ÿ+¸H¸VH¸»0Ÿ»¹»V¹»ý»Pý»í¼Ví¼½\½ ½P ½à¾Và¾O¿0ŸO¿y¿Vy¿È¿\È¿â¿Vâ¿ÀÀ0ŸÀÀ'ÁV'Á Á\ ÁýÁVýÁRÅ0ŸRÅ]ÅP]ŨÅ0Ÿ¨ÅÿÅ‘àySÆ;Ç0Ÿ;ÇJÇPJDZÇ‘ày±ÇÈ0ŸÈ1ÈP1ÈNÈVNÈ\È0Ÿ\ÈŸÈVŸÈÊ0ŸÊÊPʯÊ‘ày¯ÊÿÊ0ŸOËTËPTËèË‘àyèËäÍ0ŸäÍéÍPéÍuΑàyuÎHÏ0ŸHÏSÏV†Ï?Ð0Ÿ?ÐFÐPFЫБày«ÐºÐPºÐ‘ÑV‘Ñ'Ó0Ÿ]ÓÏÓVÏÓF×0ŸF×Q×PQ×í×Ví×ò×Pò×MØVMØÙ0ŸÙ^ÙV^Ù:Ú0Ÿ:ÚHÚPHÚ‘ÛV‘ÛÝ0ŸÝ6ÝP6Ý¢ÞV¢Þà0ŸàPàPPànáVnácã0Ÿcã¦ãP¦ã€åV€åÞæ0ŸÞæçPçgçV¥ç¶èV¶èêé0ŸêéùéPùé(êV(ê—ê]—ê¬ê0Ÿ¬ê·êP·êWë‘ØyWëì0Ÿì ìP ìzì‘Ðyzì)í0Ÿ)í=íP=íZíVZíní0ŸnííPí×íVíí?î0Ÿ?îJîPJîîVî·ï0Ÿ·ïõïPÿïsðVsð°ðP°ðáðVáð ñ0Ÿ ñ!ñP!ñMñVMñáñ0ŸáñðñPðñòVò<òS<ò·òV·òÉò0ŸÉòÝòPÝòúòVúòó0ŸófóVfó`ô0Ÿ`ô”ôP”ôüôVüô$õP$õƒõVƒõ÷0Ÿ÷S÷VS÷ô÷0Ÿô÷øPøPøVPøÉø0ŸÉøíøPíøùVùrú0ŸrúwúPwú—úV—úºú]ºúÄúVÄúðú0ŸðúûVû;û‘ØyEûJûPJûOû‘ØytûžûVžûËû]ËûŸü‘ØyîüPý0ŸPýXýPXýŠý0ŸŠý´ý‘Ðy´ý¹ýP¹ýÓý‘ÐyÓýñý0ŸûýþPþ%þ‘Ðy%þGÿ0ŸGÿhÿVhÿ©ÿ0Ÿ©ÿ¿ÿP¿ÿßÿVßÿøÿPøÿgVgì0ŸìV#S#@V@HSHMVMÖ0ŸÖV–0Ÿ–©P©ƒVƒÒ0ŸÒòPòÊVÊ{ 0Ÿ{ Ž PŽ  V ô 0Ÿô  P ¢V¢¢0Ÿ¢ºPºVÅ0ŸÅÝPÝãVãw0Ÿw‡P‡BVB°0Ÿ°ÀPÀ*V*˜0Ÿ˜¨P¨áVáa0ŸaoPo¥V¥ 0Ÿ  P õ Võ "0Ÿ""P"Š"VŠ"Q$0ŸQ$a$Pa$È$VÈ$€%0Ÿ€%Ž%PŽ% &V &(0Ÿ(:(V:(Ä(0ŸÄ()V)f40Ÿ–š œ0Ÿ œœPœJœ‘¨yJœbœ0Ÿbœ‚œP‚œœ‘¨yœCž0ŸCžNžPNžEŸ‘¨yEŸ´Ÿ0Ÿ´ŸÇŸPÇŸ_ ‘¨y_ ¡0Ÿ¡$¡P$¡m¡‘¨ym¡£0Ÿ£:£‘¨y:£î¤0Ÿî¤]¥‘¨y]¥j¦0Ÿs­€°0Ÿ€°“°P“°é±‘¨yé±R³0ŸR³m³Pm³´‘¨y ´-¶0Ÿ¸»0Ÿ»R¼‘¨yR¼Ž¼0ŸŽ¼¼P¼Æ¼‘¨yƼܼ0ŸÜ¼û¼Pû¼½‘¨y½Þ½0ŸÞ½ã½Pã½à¾‘¨yà¾y¿0Ÿy¿¤¿‘¨y¤¿ŒÁ0ŸŒÁýÁ‘¨yýÁjÆ0ŸjÆuÆPuÆÞÆ‘¨yÞÆPÇ]`ÇuÇ0ŸuÇ„ÇP„Ç È‘¨y È»È0Ÿ»ÈÊÈPÊÈ$É‘¨y$ɯÊ0Ÿ¯Ê´ÊP´ÊýÊ‘¨yOËèË‘¨yèËíËPíˈÌ‘¨yˆÌøÌ0ŸøÌýÌPýÌäÍ‘¨yäÍLÎ]LÎQÎPQÎuΑ¨yuΰÎ0Ÿ°Î»ÎP»ÎùΑ¨yHÏSÏPSφÏ‘¨y†Ï Ð] еБ¨yµÐ©Ñ0Ÿ©Ñ´ÑP´ÑõÑ0ŸõÑ`Ò‘¨y`ÒeÒPeÒ²Ò‘¨y²ÒÀÒPÀÒ]Ó‘¨y]Ó˜Ô0Ÿ˜Ô¿Ô‘¨y¿ÔÑÔ0ŸÑÔëÔPëÔöÔ‘¨yöÔ6×0Ÿ6×]ב¨y]×í×0Ÿí×MØ‘¨yMØÙ0ŸÙ^Ù‘¨y^ÙÚ0ŸÚÚPÚ{Û‘¨y‘ÛlÝ0ŸlÝ„ÝP„Ý¢Þ‘¨y¢ÞŒß0ŸŒß¬ßP¬ß·ß‘¨y·ßpà0Ÿpànᑨynáçâ0ŸçâòâPòâ€å‘¨y€åFç0ŸFçQçPQçg瑨y¥ç¶è‘¨y¶è/î0Ÿ/îVyVîsð0Ÿsðáð‘¨yáðì0ŸìÒ‘¨yÒÑ0ŸÑäP䃑¨yƒf0ŸfyPyÊ‘¨yÊÔ 0ŸÔ ì Pì  ‘¨y ± 0Ÿ± Ä PÄ ‚‘¨y¢0ŸP"S"‘¨y«ç‘¨yçß0ŸßéPéò\òb‘¨y|³‘¨y³Á0ŸÁÌPÌ‘¨y}0Ÿ}ˆPˆ°‘¨y°0Ÿ#P#ᑨyá0ŸP¥‘¨y¥ƒ 0Ÿƒ Ž PŽ õ ‘¨yõ ©!0Ÿ©!´!P´!Š"‘¨yŠ"­$0Ÿ­$È$‘¨yÈ$&0Ÿ& &‘¨y &f40Ÿ–š!œ0Ÿ!œ+œP+œœSœÛž0ŸÛž ŸP ŸEŸSEŸlŸ‘zlŸ. 0Ÿ_ “ 0Ÿ“ § P§ Ã SàѠ0ŸÑ ¡S¡Õ¢0Ÿ£:£S:£®£0Ÿè£´¤0Ÿî¤z¥0Ÿz¥‰¥P‰¥ž¥‘ˆzž¥j¦0Ÿs­®0Ÿ®®P®C®SC®U®0ŸU®_®P_®Ã®‘ÐyîԮ0ŸÔ®æ®P殯S¯¯0Ÿ¯$¯P$¯Ì¯SÔ¯ç´0Ÿç´ò´Pò´Zµ\Zµ«µ0Ÿ¸+¸S+¸6¹0Ÿ6¹™¹S™¹»0Ÿ»R¼SR¼l¼0Ÿl¼…¼P…¼Æ¼SƼs½0Ÿs½x½Px½à¾Sྉ¿0Ÿ‰¿”¿P”¿Ò¿SÒ¿'Á0Ÿ'ÁŒÁSŒÁ‘ÁP‘ÁýÁSýÁ{Ã0Ÿ{ÀÃP€ÃÊÄSÊÄ Ç0Ÿ ÇÇPÇPÇSPÇÈ0ŸÈ›ÈP›ÈÐÈSÐȯÊ0Ÿ¯ÊýÊSOËèË0ŸèˈÌSˆÌäÍ0ŸäÍLÎSLÎùÎ0ŸHφÏ0Ÿ†Ï‹ÏP‹Ï(ÐS(СÐ0Ÿ«ÐÇÒ0ŸÇÒÒÒPÒÒ'ÓS]ÓbÓPbÓÏÓSÏÓ˜Ô0Ÿ˜ÔÔPÔÞÔSÞÔöÔ\öÔÕSÕ%Õ\%Õ<Õ0Ÿ<ÕCÕPCÕ¢Õ‘z§Õ¬ÕP¬ÕÞÕ‘z֑֜zÛÖ6×S6×MØ\MØÙ‘zÙ¡Û0Ÿ¡ÛµÛPµÛÊÛ‘€zÊÛÈÞ0ŸÈÞØÞPØÞíÞ‘øyíÞná0Ÿná¤áP¤áÄᑈzÄá°â0Ÿçâ€å0Ÿ€å¶åP¶åÞå‘€zÞå¶è0Ÿ¶èìèPìèúè‘øyúèpê0ŸpêêPêÙê‘ÐyÙêië0Ÿië}ëP}ë™ëS™ë°ë0Ÿ°ëõëSõëˆí0Ÿˆí›íP›í×íSííôð0ŸôðñPñ ñ‘Èy ñ*ñ0Ÿ*ñ4ñP4ñƒñ‘Èyƒñ•ñ0Ÿ•ñ ñP ñ´ñ‘ðy´ñò0Ÿò¡òP¡ò·ò‘èy·òšó0Ÿšó©óP©óðóSðó#ôP#ô(ô‘ðy(ôÏô0ŸÏô÷ôP÷ôüô‘èyüôƒõ0Ÿƒõ«õP«õßöSßö÷P÷÷‘Èy÷N÷PN÷S÷‘ÈyS÷:ø0Ÿ:øJøPJøžø‘Èyžøòø0ŸòøùPùBú‘ÈyGúû0ŸûûPûEû0ŸEûtû‘ÐytûyûPyûžû‘Ðyžû£ûP£ûËû‘ÐyËûîü0ŸîüóüPóü8ýS8ýÓý0ŸÓýñýSûýGÿ0ŸGÿhÿShÿýÿ0ŸýÿPgSgw0Ÿw‚P‚¼S¼ 0Ÿ "S">P>uSu‘0Ÿ‘ P T ST $0Ÿ$/P/iSi0ŸP´S´ÃPÃÈ‘ÐyÈÕPÕìSìüPüLSLá0ŸáñPñSÈ$0ŸÈ$Ø$PØ$ 'S '–'0Ÿ–'Á'SÁ'É'\É'Ù'SÙ'è'Pè'(\(O(0ŸO(U(PU(y(\y((P(Ä(\Ä()0Ÿ)()S()e)0Ÿ”)«)0Ÿ«)õ)S±*9+0Ÿ9+I+PI+‘+S‘+q,0Ÿq,½,S½,Ò,PÒ,-S-ž-0Ÿž-¥-P¥-û-Sû-.P.E.SE.Š.0ŸŠ.™.P™.ú.\ú./0Ÿ/:/S:/N/PN//\//S/ô/0Ÿô/û/Pû/&0\&050P50f0\f0È00ŸÈ0å0Så010Ÿ1a1Sa1q10Ÿq1|1P|1¿1S¿1F20ŸF2’2S’2©20Ÿ©2¾2P¾2æ2Sæ2}30Ÿ}3„3P„3º3Sº3Í3PÍ34S4f40Ÿ–šj¦0Ÿs­-¶0Ÿ¸™¹0Ÿ™¹»‘Èy¹»ýÁ0ŸýÁmÑØy{Ã6É0Ÿ6ÉÏÉ‘˜zÊýÊ0ŸOËùÎ0ŸHÏÏÓ0ŸÏÓ˜Ô‘˜z˜ÔÖ0ŸÖœÖ‘zÛÖMØ0ŸMØÙ‘zÙëê0ŸëêHë‘ØyHëŒì0ŸŒìéì‘àyéì°õ0Ÿ°õƒöSßöù0Ÿùôù‘ÈyGúËû0ŸËûŸü‘Øyîü%þ0Ÿ%þûþ‘àyGÿ0Ÿì‘Èyìf40ŸEŸ˜ŸV_ r Pè£ó£Ps­}­P빺PGÂsÂPÉ•ÉP•ÉÏÉVuÎËÎV²ÒÔÒVÏÓëÓPëÓÕVfÖlÖPlÖœÖVÛÖâÖV6×F×VMØiØPiØÙV·ß»ßV½éÈéP@ëQëPáìîìPýõ!öPS÷^÷PdùˆùPËûçûP%þAþPW{PEŸ ‘ày¢|¢‘èyî¤X¦‘àypÅzÅdzŨÅ‘èySÆËÇ‘èyËÇÔÉ‘ày¯ÊýÊ‘àyˆÌšÌ‘èyøÌIÍ‘èy—ͬÍ‘èy¬Í¶Íg¶ÍäÍ‘àyäÍüÍ‘èyLÎuΑèyuÎ1Ï‘àyHÏSÏ‘ày†ÏžÏ‘èy(ÐVБèy«ÐµÐ‘èyµÐÑ‘ày#ÑpÑ‘ày‘ÑDÒ‘ày`ÒÓ‘ày]Ó®Ó‘àyÏÓþÕ‘àyÖ#בày6×Úבàyí×6Ø‘àyMØüß‘àyàYà‘àypà±à‘àyôàWá‘àyná­á‘àyÄáûá‘àyâNâ‘àybâ™â‘àyçâLã‘àycã˜ã‘àyÝã7ä‘àyNä¥ä‘ày¼ä å‘ày!åiå‘ày€å±å‘àyÞå æ‘ày(æ ç‘àyFçŽç‘ày¥çÔç‘àyè*è‘ày`èŸè‘ày¶èÞè‘àyúèé‘ày;éZé‘ày|é›é‘ày½éMì‘àyííï‘ày4ïï‘ày§ïÝï‘àyÿï\ð‘àysð“ð‘àyáðô‘ày(ô>ô‘ày`ôwô‘ày™ô­ô‘àyÏôÚô‘àyüôõ‘ày)õ4õ‘àyVõaõ‘àyƒõŽõ‘ày°õÈö‘àyßöþö‘ày÷@÷‘àyS÷®ø‘àyÉø×ø‘àyòøù‘àyù9ú‘àyGúWú‘àyrú•ú‘ày—úºú‘àyÄúæú‘àyðú@û‘àyEûjû‘àytû”û‘àyžûÁû‘àyËû¤ü‘àyîü ý‘àyý.ý‘ày8ýXý‘ày´ýÑý‘àyÓýñý‘àyûýþ‘àyÆš!¥0Ÿ!¥G¥‘ÀyG¥j¦0Ÿs­œ°0Ÿœ°¯°P¯°é±‘Àyé±³0Ÿ³!³P!³ ´‘Ày ´-¶0Ÿ¸»0Ÿ»¹»‘Ày¹»"Ù0Ÿ"Ù>ÙP>ÙQÙ‘ÀyQÙ^ÙP^ÙqÚ0ŸqÚÚPÚ‘Û‘Ày‘ÛåÜ0ŸåÜýÜPýÜ¢Þ‘Ày¢Þôà0Ÿôàná‘ÀynáÝã0ŸÝãèãPèã€å‘Ày€å­æ0Ÿ­æ¸æP¸ægç‘Ày¥ç¶è‘Ày¶èì0ŸìÒ‘ÀyÒõ0ŸõPƒ‘Àyƒ60Ÿ6IPIÊ‘ÀyÊ 0Ÿ - P-  ‘Ày • 0Ÿ• ¨ P¨ ¢‘Ày¢¸0Ÿ¸ìPìQ‘ÀyQŒ0ŸŒŸPŸ‘ÀyE\EW‘ÀyWb\b1‘Ày1C0ŸCMPMΑÀyÎ0Ÿ P ‘ÀyX0ŸXcPc°‘Ày°N0ŸNYPYá‘Àyáß0ŸßêPꥑÀy¥³ 0Ÿ³ ¾ P¾ õ ‘Àyõ r!0Ÿr!}!P}!Š"‘ÀyŠ"­$0Ÿ­$¸$P¸$%‘Ày% %P %Õ&‘ÀyÕ&à&Pà& '‘Ày 'a10Ÿa1‘1‘Ày‘1©20Ÿ©2m3‘Àym3f40Ÿ¥!¥0Ÿ!¥¦SK±}±0Ÿ}±h³Sh³Ÿ³0ŸŸ³kµSÙ^Ù0Ÿ^ÙÛÚSÛÚ0Û0Ÿ0ÛøÝSøÝVÞ0ŸVÞ·ßSôà!áSnápáSÄáÆáSââSbâdâSçâãScãeãSÝã äSNäxäS¼äÝäS!å<åS€å‚åSÞåàåS(ææS­æÎæSÞæàæSFçgçS¥ç§çSèèS`è{èS¶è¸èSúèüèS;é=éS|é~éS½é!ê]íí»îSøîúîS4ïjïSÿï8ðSsðxðSöñ<ò0Ÿ<òúò]úòHó0ŸHóšóS™ôVõ]VõXõS—÷å÷0Ÿå÷žø]Éø ú]rú—ú]Äúùú]ìÒ0ŸÒSs0Ÿ‘Såq0Ÿqà \! ° 0Ÿ° € S€ 80Ÿ8Sâ«0Ÿ«$S±|0Ÿ|Î\êüS1SBoS‚¬S¿æSùS*ESXjS}S™¦S°²SìSÆÙS† \¥Û\à\Ú í Sõ !S2!_!Sr!–!S©!Í!S×!ù!S""S-"L"ST"j"Sr"‚"SŠ"±"SÄ"î"S­$À$S&›&\ &Ð&\Õ&'\’'–'SÁ'Ä'SÙ'Û'S(€(SÄ(ö(Sú*,\+,l,\q,¸,\½,Ç,\--\Ž-À-\û-.\E./S:/A/S…/ˆ/S/Ì/Sß/(0Sa12\’2™2\©2³2\æ2h3\m3Ÿ3\º3Â3\44\Æš0¥0Ÿ0¥C¥PC¥¥^¥á¥0Ÿá¥ò¥Pò¥j¦^s­8±0Ÿ8±W±PW±é±^é±a²0Ÿa²t²Pt² ´^ ´-¶0Ÿ¸»0Ÿ»¹»^¹»^Ù0Ÿ^ÙfÙPfÙ‘Û^‘ÛÞ0ŸÞHÞ^VÞzÞ^zÞôà0ŸôàÿàPÿàÄá^Äáâ0Ÿâ€å^€å`è0Ÿ`è¶è^¶èì0ŸìÒ^Ò*0Ÿ*ZPZ¦^¦ß0ŸßòPò^4\4N^NW\W ^  0Ÿ ) P) à ^à & 0Ÿ& 9 P9 I ^I r Sr Œ ^Œ ” S” e ^e ¯0Ÿ¯ÃPÃB^BU0ŸU^0Ÿ(P(^™0Ÿ™¶P¶ã^ãÄ0ŸÄÏPÏ^‚0Ÿ‚P°^°Æ0ŸÆÑPÑ^*P*à^àëPë^I0ŸITPT2!^2!Š"0ŸŠ"•"P•"#^#o#0Ÿo#z#Pz#È$^È$V&0ŸV&a&Pa& &^ &ú*0Ÿú*^+^^++,0Ÿ+,q,^q,½,0Ÿ½,-^-E.0ŸE.s.^s./0Ÿ/ß/^ß/f40Ÿ¶¥j¦0Ÿs­-¶0Ÿ^Ù·ß0Ÿâ°â0Ÿçâf40Ÿs­-¶1Ÿ^Ù·ß1Ÿâ°â1Ÿçâf41Ÿs­-¶2Ÿ˜Ù·ß2Ÿbâ«â2Ÿçâf42Ÿs­-¶0ŸÚ·ß0Ÿcãf40Ÿs­-¶1Ÿ@Ú·ß1ŸÝãf41Ÿs­-¶2ŸwÚ·ß2ŸNäf42ŸÆšj¦0Ÿs­¶°0Ÿ¶°É°PɰѰ[Ñ°Š±‘°yé±Å²0ŸÅ²å²På²ý²[ý²R³‘¨y ´-¶0Ÿ¸»0Ÿ»„»[„»¹»‘ z¹»¦Ú0Ÿ¦ÚÇÚPÇÚ0Û‘Èy‘Û©Ü0Ÿ©ÜÜÜPÜÜlÝ‘¨y¢ÞNä0ŸNäYäPYä¼ä[¼äå‘Èy€åsæ0Ÿsæ~æP~ææ[­æ×摨yÞæA瑨y¶èì0ŸìM‘°yÒ 0Ÿ CPCT[T°‘¸zƒ0Ÿ-P-f‘¨yÊ7 0Ÿ7 t [t Œ ‘¸yŒ ” [° ´ [´ ä ‘¸zä Ÿ 0ŸŸ í [í ‘ z[8<[<j‘ zj‡0Ÿ‡¯P¯ç[ç ‘¨y :0Ÿ:EPEo[o…‘°y›±‘°yÄÚ‘°y*0Ÿ*5P5X[Xs‘¨y°{0Ÿ{†P†¥[¥Æ‘¸zá¤0Ÿ¤¯P¯ß[ß‘¨y¥Ú 0ŸÚ õ ‘¸zõ r"0Ÿr"Š"‘ zŠ"&0Ÿ&Œ&PŒ& &[ &Ë&‘¨yÕ&f40ŸÆšj¦0Ÿs­Ú°0ŸÚ°í°Pí°é±‘¸y鱜²0Ÿœ²¯²P¯² ´‘¸y ´-¶0Ÿ¸»0Ÿ»¹»‘¸y¹»ÐÚ0ŸÐÚçÚPçÚ‘Û‘¸y‘ÛTÜ0ŸTÜgÜPgÜ¢Þ‘¸y¢Þ¼ä0Ÿ¼äÇäPÇä€å‘¸y€åRæ0ŸRæ]æP]ææ‘¸y­æg瑸y¥ç¶è‘¸y¶èì0ŸìÒ‘¸yÒ]0Ÿ]xPxƒ‘¸yƒû0ŸûPÊ‘¸yʽ 0Ÿ½ é Pé V ‘¸yV y 0Ÿy Œ PŒ ¶ ‘¸y¶ S‘¸ySð‘¸yð0Ÿ P ‘¸yû0ŸûP2‘¸y2sSs…‘¸y…Sx‘¸yxð0ŸðPi‘¸yi„0Ÿ„PΑ¸yÎo0ŸozPz‘¸yù0ŸùP°‘¸y°¥0Ÿ¥°P°á‘¸yáf0ŸfqPq¥‘¸y¥Ú 0ŸÚ å På 2!‘¸y2!=!P=!Ä"‘¸yÄ"Ï"PÏ"#‘¸y#,#0Ÿ,#7#P7#%‘¸y% &0Ÿ &«&P«& '‘¸y 'E.0ŸE..‘¸y./0Ÿ/f0‘¸yf0a10Ÿa1ˆ1‘¸yˆ1©20Ÿ©2æ2‘¸yæ2f40ŸÆšé¢0Ÿ£j¦0Ÿs­ö±0Ÿö±²P²Ã´]ô«µ0Ÿ¸»0Ÿ»¹»]¹»ñÚ0ŸñÚ'Û]0ÛOÛ]OÛaÞ0ŸaÞ„ÞP„ÞÞÞ]ÞÞ!å0Ÿ!å€å]€å`è0Ÿ`èkèPkèúè]úè¢í0Ÿ¢í±íP±ííí]ííî0Ÿî îP î/î]/îjî0ŸjîtîPtî¾î]¾îÌî0ŸÌî4ï]4ï?ïP?ïÿï]ÿï ðP ðsð]sð ñ0Ÿ ññ]ñGÿ0ŸGÿhÿ]hÿ}ÿ0Ÿ}ÿ©ÿ]©ÿ0Ÿ$P$ˆ]ˆ"0Ÿ"u]uM0ŸMÒ]Ò) 0Ÿ) 4 P4 B]B0ŸP*]*õ 0Ÿõ !P!#]#)(0Ÿ)(4(P4(Ä(]Ä(Ô(PÔ()]))0Ÿ)")P")e)]”)«)]«)¹)P¹)õ)]±* +0Ÿ ++P+$+]$+i+0Ÿi+w+Pw+Ó+]Ó+è+0Ÿè++,]+,6,P6,q,]q,,P,½,]½,Ž-0ŸŽ-«-]«-û-0Ÿû-E.]E.Z.0ŸZ.j.Pj.´.]´.:/0Ÿ:/…/]…//0Ÿ/­/P­/ß/]ß/Ø00ŸØ0ß0Pß01]1%1P%1a1]a1œ10Ÿœ1¥1P¥12]220Ÿ2F2]F2V2PV2©2]©2û20Ÿû23P3-3]-383P83Š3]Š3º30Ÿº34]4f40ŸÆšé¢0Ÿ£j¦0Ÿs­±0Ÿ±(±P(±1±X1±}±‘¸zé±{²0Ÿ{²“²P“²Õ²‘¨y ´-¶0Ÿ¸»0Ÿ»„»X„»¹»‘¨z¹»;Û0Ÿ;ÛXÛPXÛ˜ÛX˜Û»Û‘¨y»ÛÜ0ŸÜ+ÜP+ÜKÜXKÜÊÜ‘¨y¢Þ!å0Ÿ!å,åP,å€åX€åÞ周yÞå(æ0Ÿ(æ3æP3æRæXRææ‘¨y¶èì0ŸìM‘¸zÒŽ0ŸŽÔXÔù‘ÐzùX#X#Q‘ÐzQü0Ÿü6X6N‘ zNWXquXu ‘ z C0ŸCsPs¨X¨É‘¨yÉ/0Ÿ/GPGù‘¨yP0ŸPuPu’X’É‘¨yã›0Ÿ›¦P¦ÄXÄꑸz¿0Ÿ¿ÊPÊùXù ‘¨y*N‘¨y°Æ0ŸÆá‘Ðzá†0Ÿ†¥‘ z¥r"0Ÿr"}"P}"Š"XŠ"º"‘¨yÄ"¯#0Ÿ¯#º#Pº#ì#Xì#$‘¨y $G$‘¨yQ${$‘¨y€$¥$‘¨yÈ$(&0Ÿ(&3&P3&V&XV&y&‘¨y &f40Ÿs­-¶0ŸâÛ·ß0Ÿ(æf40Ÿs­-¶1ŸÜ·ß1ŸRææ1Ÿ­ægç1Ÿ¥çf41Ÿs­-¶2Ÿ_Ü·ß2Ÿsææ2Ÿ­ægç2Ÿ¥çf42Ÿs­-¶0ŸõÜ·ß0ŸÞægç0Ÿ¥çf40Ÿs­-¶1ŸQÝ·ß1ŸFçgç1Ÿ¥çf41Ÿs­-¶2ŸšÝ·ß2Ÿ¥çf42Ÿ ° °P°+°PP)P)AQà Å QË Ï QÕ í Q£P¨ÀPÎÙP°+° p $0.ÿŸ p $0.ÿŸ)AQà Å QÕ í Q¨Q¨ÀPÎÙPÁ°«µ0Ÿì0Ÿo*0Ÿ’'?)0Ÿ”)õ)0Ÿ±*ú*0Ÿå°«µ1Ÿì1Ÿ›*1Ÿ’'?)1Ÿ”)õ)1Ÿ±*ú*1Ÿ±«µ2Ÿì2ŸÄ*2Ÿ’'?)2Ÿ”)õ)2Ÿ±*ú*2ŸÆšj¦0Ÿs­a±0Ÿ}±±Z±±±‘Øz±±ƒ³0ŸŸ³£³Z£³Ñ³‘°zѳ-¶0Ÿ¸»0Ÿ»„»Z„»¹»‘°z¹»ð0Ÿð%Z%@‘Ðz@MZMQ0ŸQ›Z›Ã‘°zÃÒZÒ|0Ÿ|©P©ÜZÜÿ‘¨yÿ\ 0Ÿ\ t Pt Ô ‘¨y & 0Ÿ& I PI a Za Á ‘ z¢r0Ÿr’P’›Z›:‘Àyä0ŸäüPüZe‘¨yãê0Ÿê‘Øz™0Ÿ™°‘°z°†0Ÿ†‘P‘¥Z¥Ö‘¨yàÒ0ŸÒÝPÝ Z E ‘¨yJ { ‘¨yõ -"0Ÿ-"8"P8"T"ZT"r"‘ zŠ" $0Ÿ $+$P+$Q$ZQ$r$‘Ày€$š$‘ÀyÈ$½%0Ÿ½%È%PÈ%÷%Z÷% &‘¨y(&N&‘¨y &f40ŸÆšj¦0Ÿs­Š±0ŸŠ±¶±P¶±#²‘°y#²G²0ŸG²Z²PZ²W´‘°yW´i´0Ÿi´t´Pt´µ‘°yµ-¶0Ÿ¸»0Ÿ»¹»‘°y¹»M0ŸMl‘°yl®S®Ã‘°yÃÍSÍ‘°y|0Ÿ|P¥‘°y¥çSçù‘°yùSÍ‘°yÍå0ŸåùPùT ‘°yT o 0Ÿo z Pz à ‘°yà B 0ŸB U PU  ‘°y j 0Ÿj … P… ¢‘°y¢P0ŸPcPc‘°y0Ÿ1P1ã‘°yãê0ŸêõPõB‘°yBMPMì‘°yì÷P÷*‘°y*U0ŸU`P`‘°y¥0Ÿ¥°P°‘°y’0Ÿ’Põ ‘°yõ T"0ŸT"_"P_"Š"‘°yŠ"ì#0Ÿì#÷#P÷#È$‘°yÈ$÷%0Ÿ÷%&P& &‘°y &Ù'0ŸÙ'D(‘°yD(Ä(0ŸÄ()‘°y)$+0Ÿ$+^+‘°y^+½,0Ÿ½,-‘°y-f40Ÿ§²«µ0ŸM0Ÿ**0Ÿ’'?)0Ÿ”)õ)0Ÿ±*ú*0ŸÕ²«µ1ŸM1ŸX*1Ÿ’'?)1Ÿ”)õ)1Ÿ±*ú*1Ÿ9³«µ2ŸM2Ÿ}*2Ÿ’'?)2Ÿ”)õ)2Ÿ±*ú*2ŸÆšj¦0Ÿs­ª³0Ÿª³Ú³PÚ³´R´0´‘¨y0´-¶0Ÿ¸»0Ÿ»„»R„»¹»‘¸z¹»°0Ÿ°ÈPÈ]‘¸yƒ˜0Ÿ˜»P»ËRË+‘ zNW‘ zÊ 0Ÿ ½ P½ Ë RË  ‘Ày Ë 0ŸË Þ PÞ í Rí j ‘°y¢Ò0ŸÒçPçcRc…‘Ðz…R¦0Ÿ¦¾P¾ô‘¨yã™0Ÿ™¤P¤°R°ç‘¨yìÙ0ŸÙäPäR5‘¸yNk‘¸y{˜‘¸yá:0Ÿ:EPEaRa†‘ z¥J 0ŸJ U PU ƒ Rƒ © ‘Àyõ ×!0Ÿ×!â!Pâ!"R""‘°y-"A"‘°yŠ"€$0Ÿ€$‹$P‹$­$RÈ$A%0ŸA%L%PL%€%R€%¸%‘¨y½%ï%‘¨y &f40ŸÜà 0ŸN0Ÿú*-0ŸE-Â-0Ÿæ-E.0Ÿà 1Ÿ{1Ÿú*-1ŸE-Â-1Ÿæ-E.1Ÿ3à 2Ÿ¥2Ÿú*-2ŸE-Â-2Ÿæ-E.2ŸNà 0Ÿ0Ÿú*-0ŸE-Â-0Ÿæ-E.0Ÿqà 1Ÿ:1Ÿú*-1ŸE-Â-1Ÿæ-E.1Ÿ«à 2Ÿa2Ÿú*-2ŸE-Â-2Ÿæ-E.2Ÿ† 0ŸJ #0ŸE.a10ŸÂ 1Ÿƒ #1ŸE.a11Ÿü 2Ÿ³ #2ŸE.a12ŸÖ 0Ÿ"#0ŸE.a10Ÿÿ 1Ÿ-"#1ŸE.a11Ÿ9 2ŸT"#2ŸE.a12Ÿ[Î0Ÿ $ '0Ÿa1f40Ÿ‚Î1ŸQ$ '1Ÿa1f41Ÿ²Î2Ÿ€$ '2Ÿa1f42ŸôÎ0Ÿ÷% '0Ÿa1f40Ÿ)Î1Ÿ(& '1Ÿa1f41ŸeÎ2ŸV& '2Ÿa1f42ŸÆšj¦0Ÿs­-¶0Ÿ¸{º0Ÿ{º»|Ÿ»„»P„»¹»‘Àz¹»×Â0Ÿ×Â{Ã}Ÿ{ðÉ0Ÿ°ÉÏÉ€ŸÊýÊ0ŸOËùÎ0ŸHχÖ0Ÿ‡ÖœÖ€ŸÛÖ}ö0Ÿ}öƒöŸßöäù0Ÿäùôù‘ŸGúŠü0ŸŠü¤ü“Ÿîüæþ0Ÿæþûþ”ŸGÿ×0Ÿ×ì—Ÿìf40ŸÆšj¦0Ÿs­-¶0Ÿ¸{º0Ÿ{º¹» 0¶ Ÿ¹»×Â0Ÿ×Â{à 0¶ Ÿ{ðÉ0Ÿ°ÉÏÉ 0¶ ŸÊýÊ0ŸOËùÎ0ŸHχÖ0Ÿ‡ÖœÖ 0¶ ŸÛÖ}ö0Ÿ}öƒö 0¶ Ÿßöäù0Ÿäùôù 0¶ ŸGúŠü0ŸŠü¤ü 0¶ Ÿîüæþ0Ÿæþûþ 0¶ ŸGÿ×0Ÿ×ì 0¶ Ÿìf40ŸÆšj¦0Ÿs­-¶0Ÿ¸{º0Ÿ{º» oŸ»„»Y„»¹»‘Èz¹»×Â0Ÿ×Â{à ¼Ÿ{ðÉ0Ÿ°ÉÏÉ ZŸÊýÊ0ŸOËùÎ0ŸHχÖ0Ÿ‡ÖœÖ ŸÛÖ}ö0Ÿ}öƒö 'Ÿßöäù0Ÿäùôù dŸGúŠü0ŸŠü¤ü ¢Ÿîüæþ0Ÿæþûþ àŸGÿ×0Ÿ×ì -Ÿìf40Ÿmœœ^£®£^+¸>¸^>¸H¸\¹»!¼^sœœ\£R£\+¸2¸\¹»¼»\EŸ% ‘Øyî¤a¦‘ØyHÏSÏ‘ØyٚݑØy·ßà‘Øyàbà‘Øypà¼à‘Øyôà`á‘Øyná¶á‘ØyÄá â‘ØyâWâ‘Øybâ¢â‘ØyçâUã‘Øycã¡ã‘ØyÝã@䑨yNä®ä‘Øy¼ä周y!år周y€å¿å‘ØyÞåæ‘Øy(æç‘ØyFç—ç‘ØyÞ m¡]OËËË]ËËèË_èË Ì] ̈Ì_å m¡_OËWË_èËðË_/ÙIÙSIÙQÙ_QÙYÙSYÙ^Ù_5ÙDÙ_DÙKÙUQÙTÙ_¢«3­S¦«3­Vª«3­\‹«Â«ò†%‹«Â«òv%‹«Â«òf%ž«Â«Q«é«‘˜{Ÿé«ö«Uö«¬‘˜{Ÿ¬0¬‘ˆ|Ÿ0¬=¬U=¬G¬‘ˆ|ŸG¬w¬‘ø|Ÿw¬„¬U„¬Ž¬‘ø|ŸŽ¬¾¬‘è}Ÿ¾¬Ë¬Uˬլ‘è}ŸÕ¬­‘Ø~Ÿ­­U­.­‘Ø~Ÿ#S#@V@HSHMVV%U@CVa®S®Ã‘°yÃÍSÍÒ‘°yl›T›¡‘°yÃÒTã^(­(^­(Ä(‘ÐyÄ(ë(^ë()‘ÐyïT‘Ðy(Z(‘Ðyy(~(‘ÐyÄ(É(‘Ðy£'Á'^)?)^”)Ù)^Ù)õ)_©'Á'_)?)_”)›)_«)®)_"sSs…‘¸y…S25P5cTci‘¸y…TòE\EW‘ÀyWb\P4T4:‘ÀyWbT˜Î^a1¿1^F2v2^v2’2‘Ðy©2Ø2^Ø2æ2‘Ðy¨«P«ÈQÈΑÐya1ª1‘ÐyF2K2‘Ðy©2®2‘Ðy'2F2^m3í3^í34_.2F2_m3ª3_º3½3_ӵⵑ˜{Ÿe)Š)‘˜{ŸŠ)Ž)UŽ)”)‘˜{Ÿâµñµ‘ˆ|Ÿõ)*‘ˆ|Ÿ**U*$*‘ˆ|Ÿñµ¶‘ø|Ÿ$*I*‘ø|ŸI*M*UM*S*‘ø|Ÿ¶¶‘è}ŸS*x*‘è}Ÿx*|*U|*‚*‘è}Ÿ¶-¶‘Ø~Ÿ‚*§*‘Ø~Ÿ§*«*U«*±*‘Ø~Ÿ™¹Ò¹‘˜{Ÿºvº `+*ŸºvºLŸºvº1Ÿºvº0Ÿºvº‘€{Ÿºvº‘˜{Ÿæ¼½\y¿È¿\ȿҿV'Á Á\ ÁýÁVí¼½Vy¿½¿V'Á/ÁVŒÁ”ÁVýÁ6‘ˆ|ŸtÂÒ `+*ŸtÂÒÂLŸtÂÒÂ1ŸtÂÒÂ0ŸtÂÒ‘€{ŸtÂÒ‘ˆ|ŸÍÆPÇ]äÍLÎ]†Ï Ð] Ð(Б¨yÞÆáÆPáÆúÆTúÆPÇ‘¨yäÍîÍ‘¨y†ÏÏ‘¨yiÈÐÈ]¯ÊÑÊ]ÑÊýÊ_]ÓÏÓ]qÈÐÈ_¯Ê·Ê_]ÓhÓ_6ÉoÉ‘˜{ŸuÎËΑÈy²Ò'Ó‘Èy˜ÔÕ‘Èy6×vבÈyí×HØ‘Èy×ÔöÔ\6×MØ\ÞÔöÔS6×™×Sí×õ×SÖNÖ‘ˆ|ŸúÚÛSÛÛ_Û'ÛSÛÛ_ÛÛUÛ"Û_Þ1ÞS1Þ@Þ_@ÞHÞSÞ,Þ_,Þ3ÞU@ÞCÞ_—ß·ß^/îƒî^ƒîî\ÿï-ð^-ðsð\sðÓð^Óðáð\ß·ß\/îwî\ÿïð\sðvð\!ê‡ê]—úºú]žûËû](ê‡êV—ú¤úVžû«ûVëêë‘Ø~ŸëëUë ë‘Ø~ŸHëiëS¾ë&ì]Óýñý]ûý%þ]Åë&ì\ÓýÝý\ûýþ\Œì¼ì‘ø|Ÿ¼ìÀìUÀìÁì‘ø|ŸéìÌí‘ÈyGÿ´ÿ‘ÈyÄÿÏÿ‘Èyßÿíÿ‘Èyýÿ ‘Èyb‘ÈygŸ‘Èy"3‘ÈyuŠ‘ÈyÙîøî^§ïõï^ ñMñ^÷S÷^àîøî_§ïÂï_ ñ7ñ_÷÷_ò<òSò.òV.ò0òU3ò6òVó;óS;ó@ó\@óHóS%ó6ó\6ó=óU@óCó\°õéõ‘Ø~Ÿ"öxö `+*Ÿ"öxöLŸ"öxö1Ÿ"öxö0Ÿ"öxö‘€{Ÿ"öxö‘Ø~Ÿº÷å÷VÂ÷×÷_×÷Ù÷UÜ÷ß÷_ùNù‘ø|Ÿ‰ùßù `+*Ÿ‰ùßùLŸ‰ùßù1Ÿ‰ùßù0Ÿ‰ùßù‘€{Ÿ‰ùßù‘ø|ŸŠÿ©ÿ^g¼^ ^^^u_‘ÿ©ÿ_g§_ _"%_8‘è}Ÿ8<U<=‘è}Ÿ|Ò `+*Ÿ|ÒLŸ|Ò1Ÿ|Ò0Ÿ|Ò‘€{Ÿ|Ò‘è}ŸšçSçù‘°yùS¥¨P¨ÔQÔÚ‘°yùQ4\4N^NW\.^.6UNQ^ƒ ¸ R¸ à ‘¨y“ – P– ¸ T¸ à ‘Ðy$+|+‘Ðyq,v,‘Ðy½,Â,‘Ðyõ+,^Ž-Â-^æ-..^..E._ü+,_Ž-Â-_æ-ë-_û-þ-_C r Sr Œ ^Œ ” SI m ^m t UŒ  ^« S‘¸yS¶ ¹ P¹ í Tí ó ‘¸yTb’R’‘¨ympPp’Q’‘ÐyE.ž.‘Ðy:/?/‘Ðy/¢/‘Ðy/:/^È0E1^E1a1_"/:/_È01_11_±G±UG±¶@óUŸ±¿±T¿±m²Sm²ÏóTŸÏ ÏS Ï/ÏóTŸ/ÏŸÏSŸÏâÏóTŸâÏÐSЉÙóTŸ‰Ù@ÛS@Û>äóTŸ>äÞäSÞä­óóTŸ­ó ôS ôÂôóTŸÂôJõSJõOõóTŸOõ•õS•õw÷óTŸw÷¾÷S¾÷2óTŸ2:S:¶@óTŸ±m±Qm±/ÏóQŸ/ÏXÏ]XωÙóQŸ‰Ù¬ÙQ¬Ù@Û]@Û˜äóQŸ˜äÞä]Þä­óóQŸ­ó ô] ôÂôóQŸÂô•õ]•õw÷óQŸw÷²÷]²÷2óQŸ2:Q:¶@óQŸD±¿±0Ÿ¿±Ô±vÏ Ïv/ÏŸÏ0Ÿ‰Ù@Û0Ÿ˜äÞä0Ÿ­ó ô0ŸÂô•õ0Ÿw÷¾÷0Ÿ2:0ŸD±¿±0Ÿ¿±Ô±‘ˆÏ Ï‘ˆ/ÏŸÏ0Ÿ‰Ù@Û0Ÿ˜äÞä0Ÿ­ó ô0ŸÂô•õ0Ÿw÷¾÷0Ÿ2:0ŸD±¿±0Ÿ¿±Ô±‘Ï Ï‘/ÏŸÏ0Ÿ‰Ù@Û0Ÿ˜äÞä0Ÿ­ó ô0ŸÂô•õ0Ÿw÷¾÷0Ÿ2:0ŸÛ±ƒ³‘Ø{Aµqµ‘Ø{âÏБØ{>äDäbDä˜ä‘Ø{Þä周{þæKè‘Ø{8ê{ê‘Ø{0ñeñ‘Ø{ ôÂô‘Ø{¾÷Ç÷‘Ø{Ù÷þ÷‘Ø{3ú\ú‘Ø{uúNû‘Ø{Àõ‘Ø{:K‘Ø{²[´‘è{Aµqµ‘è{øÏБè{Xädäcdä˜ä‘è{Þäöå‘è{þæ é‘è{8êPë‘è{0ñeñ‘è{ ôÂô‘è{¾÷Ç÷‘è{Ù÷þ÷‘è{3ú\ú‘è{uúNû‘è{Àõ‘è{:K‘è{O²=³‘ø{Aµqµ‘ø{xä„äd„ä˜ä‘ø{Þ䨿‘ø{þæù鑸{8ê.ì‘ø{0ñeñ‘ø{ ôÂô‘ø{¾÷Ç÷‘ø{Ù÷þ÷‘ø{3ú\ú‘ø{uúNû‘ø{Àõ‘ø{:K‘ø{D±˜Ï0Ÿ˜Ï¹Ï·ŸâÏÑä0ŸÑäÞä·ŸÞäô0Ÿô ô·Ÿ ô½ô0Ÿ½ôÂô·ŸÂôûô0Ÿûô õ·Ÿ õBõ0ŸBõOõ·ŸOõˆõ0Ÿˆõ•õ·Ÿ•õ°÷0Ÿ°÷¾÷·Ÿ¾÷Nû0ŸSû¶@0ŸD±˜Ï0Ÿ˜Ï¹Ï 0¶ ŸâÏÑä0ŸÑäÞä 0¶ ŸÞäô0Ÿô ô 0¶ Ÿ ô½ô0Ÿ½ôÂô 0¶ ŸÂôûô0Ÿûô õ 0¶ Ÿ õBõ0ŸBõOõ 0¶ ŸOõˆõ0Ÿˆõ•õ 0¶ Ÿ•õ°÷0Ÿ°÷¾÷ 0¶ Ÿ¾÷Nû0ŸSû¶@0ŸD±˜Ï0Ÿ˜ÏŸÏ ŸŸÏ¶ÏTâÏÑä0ŸÑäÞä æŸÞäô0Ÿô ô ëŸ ô½ô0Ÿ½ôÂô ŸÂôûô0Ÿûô õ ០õBõ0ŸBõOõ ÜŸOõˆõ0Ÿˆõ•õ ן•õ°÷0Ÿ°÷¾÷ ÒŸ¾÷Nû0ŸSû¶@0Ÿ/Ï>Ï^>ÏXÏ~ŸÚ(ÚP(Ú@Û^˜äÞä^­ó ô^Âô•õ^w÷¹÷^/ÏXÏ\”Ù@Û\˜äÞä\­ó ô\Âôõ\w÷¾÷\2:\˜äÑä5Ÿ˜äÑä7Ÿ˜äÑä1Ÿ˜äÑä [ª Ÿ˜äÞä7Ÿ˜äÑä Sª ŸÛóô6ŸÛóô7ŸÛóô1ŸÛóô [ª ŸÛó ô7ŸÛóô Sª ŸÂôûô4ŸÂôûô7ŸÂôûô1ŸÂôûô [ª ŸÂô õ7ŸÂôûô Sª Ÿ õBõ3Ÿ õBõ7Ÿ õBõ1Ÿ õBõ [ª Ÿ õOõ7Ÿ õBõ Sª ŸOõˆõ2ŸOõˆõ7ŸOõˆõ1ŸOõˆõ [ª ŸOõ•õ7ŸOõˆõ Sª Ÿw÷°÷1Ÿw÷°÷7Ÿw÷°÷ [ª Ÿw÷¾÷7Ÿw÷°÷ Sª Ÿm²—²SKçÖçSÛç èS0ñeñS ôhôS¾÷Ç÷SÙ÷þ÷S3ú\úSm²Ï ÿŸ Ï/Ï ÿŸÐ‰Ù ÿŸ@Û>ä ÿŸÞä­ó ÿŸ ôÂô ÿŸ•õw÷ ÿŸ¾÷Nû ÿŸSû2 ÿŸ:¶@ ÿŸm²Ï0Ÿ Ï/Ï0ŸÐ‰Ù0Ÿ@Û>ä0ŸÞä­ó0Ÿ ôÂô0Ÿ•õw÷0Ÿ¾÷Nû0ŸSû20Ÿ:¶@0Ÿ‡²—²P[ç»çsŸÛç èsŸ0ñeñsŸççpŸç˜çP«ç»çPÛçççs÷ç èP8ñLñPHñeñ0Ÿ ôhôS¾÷Ç÷SÙ÷þ÷S3ú\úS/ôMôPÙ÷î÷PþæçQ ôFô0ŸFôXô © ŸXôyôQ¾÷Ç÷0ŸÙ÷ç÷0Ÿç÷þ÷ ‘© ŸþæçPç.çS ôXô0ŸXôyôP¾÷Ç÷0ŸÙ÷ù÷0Ÿù÷þ÷PyôŸôSuúéúSû"ûSBûNûSÀõS:KSyô¸ô ÿŸuúNû ÿŸÀõ ÿŸ:K ÿŸyô¸ô0ŸuúNû0ŸÀõ0Ÿ:K0ŸôŸôP€úÓúsŸûNûsŸÀõsŸ¢ú§ús”Ÿ§ú°úPÃúÓúPû"ûPBûNûsÈÜPØõ0Ÿ¢²ÏóUŸ Ï/ÏóUŸÐ‰ÙóUŸ@Û>äóUŸÞäþæóUŸ è0ñóUŸeñ­óóUŸ•õw÷óUŸÇ÷Ù÷óUŸþ÷3úóUŸ\úuúóUŸSûÀóUŸõ2óUŸK¶@óUŸ¢²=³‘ø{Aµqµ‘ø{Þ䨿‘ø{ èù鑸{8ê.ì‘ø{¢²[´‘è{Aµqµ‘è{Þäöå‘è{ è é‘è{8êPë‘è{ÃjGm‘ø|z˜¡˜‘ø|\™Ž™‘ø|šIš‘ø|К›‘ø|q›¤›‘ø|+œXœ‘ø|»œìœ‘ø|+M‘ø|Ìô‘ø|cžˆž‘ø|Ÿ"Ÿ‘ø|œŸ³Ÿ‘ø|6 [ ‘ø|Рõ ‘ø|s¡˜¡‘ø|¢0¢‘ø|¢²ƒ³‘Ø{Aµqµ‘Ø{Þä周{ èKè‘Ø{8ê{ê‘Ø{ÃjGm‘°|z˜¡˜‘°|\™¤™‘°|š¹š‘°|Кœ‘°|+œÿœ‘°|+µ‘°|ÌLž‘°|cžñž‘°|Ÿ…Ÿ‘°|œŸ ‘°|6 ¹ ‘°|Р\¡‘°|s¡ÿ¡‘°|¢¢‘°|欮‘ø{³±²‘ø{.²§²‘ø{º²-³‘ø{I³j´‘ø{ñ´Mµ‘ø{w­5®‘ˆ|K° °‘ˆ|Á°ñ°‘ˆ|9±”±‘ˆ|³± ²‘ˆ|I³¡³‘ˆ|¦³ý³‘ˆ|´a´‘ˆ|º²ƒ³‘Ø{Aµqµ‘Ø{Þä周{8ê{ê‘Ø{º²[´‘è{Aµqµ‘è{Þäöå‘è{8êPë‘è{º²=³‘ø{Aµqµ‘ø{Þ䨿‘ø{8ê.ì‘ø{¢²º²0Ÿº²À²PÀ²qµ‘Ø}(Ò8Ò‘Ø}÷Ò‰Ù‘Ø}]Û¯Û‘Ø}ÿÛPÜ‘Ø}_ÝiÝTiÝïß‘Ø}Þäþæ‘Ø} èùé0Ÿ-ê.ì‘Ø}¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ |÷Ò‰Ù‘ |@Û]Û0Ÿ]Û¯Û‘ |ÿÛPÜ‘ |_Ýïß‘ |ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ |8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK`g0Ÿ`gàh‘ |žÄAÅ‘ |×ÅÖÈ‘ |Öȶ@0Ÿ¢²}¶0Ÿ}¶)·]åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò^÷Ò‰Ù^@Û]Û0Ÿ]Û¯Û^ÿÛPÜ^_Ýïß^ïß>ä0ŸÞäþæ0Ÿ èùé0Ÿ-ê8ê^8ê.ì0Ÿ.ìEì]oìxì0ŸÅîÞî0Ÿ•õw÷]þ÷3ú0ŸFY]Yn^nú]ú–^¢²Z¸0ŸZ¸åΑè}åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘è}÷Ò‰Ù‘è}@Û]Û0Ÿ]Û¯Û‘è}ÿÛPÜ‘è}_Ýïß‘è}ïß>ä0ŸÞäþæ0Ÿ èùé0Ÿ-ê8ê‘è}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûF‘è}F–0Ÿ–|‘è}|À0Ÿõ2‘è}Kàh‘è}žÄAÅ‘è}×Ŷ@‘è}¢²ظ0ŸØ¸åΑÐ~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘Ð~÷Ò‰Ù‘Ð~@Û]Û0Ÿ]Û¯Û‘Ð~ÿÛPÜ‘Ð~_Ýïß‘Ð~ïß>ä0ŸÞäþæ0Ÿ èùé0Ÿ-ê8ê‘Ð~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûe‘Ð~e–0Ÿ–|‘Ð~|À0Ÿõ2‘Ð~Kàh‘Ð~žÄAÅ‘Ð~×Ŷ@‘Ð~¢²ȹ0ŸåÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘¸~÷Ò‰Ù‘¸~@Û]Û0Ÿ]Û¯Û‘¸~ÿÛPÜ‘¸~_Ýïß‘¸~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑸ~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0Ÿ]ûû0Ÿe0Ÿ|À0Ÿõ20ŸÎAõA0Ÿ¢²fº0Ÿfº›ºVåÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ@Û]Û0Ÿïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0Ÿ]ûû0ŸŸû«ûV þ,þ0Ÿe0Ÿ|À0Ÿõ20Ÿ  0ŸÄAÎA‘ |ÎAõA0Ÿii ‘¨|3$p"i+iP+i4i‘à}…mžp]žpNqXNq`q]`qÏqXrTr]TrÅrXÅrør]ørJsXJs}s]}sçsXçs5t‘à}5tLt]Lt”tX”tùt‘à}ùt u] uœuXœuÐu]Ðu:vX:vBv‘à}†vžv]žvóvXóvTw‘à}Twkw]kwówXówx]xªxXªxÞx]ÞxKyXKy™y‘à}™y«y]«yÁ‘ø{jÁŠÁP×Á ÂP|‘ÂPÞÂóÂP@ÃUÃP]ÙÃP¡Ã¾ÃPÆÃãÃP÷Ãüà p3$t"#üÃÄ p3$‘ˆ|"#ÄÄ‘¨|#3$‘ˆ|"#ÄÄ p3$‘ˆ|"#%ÄhÄPhĞđà}AÅvÅ‘à}vųÅP¢²fº0ŸfºŠºUŠº–ºP–ºåΑÈ~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘È~÷Ò‰Ù‘È~@Û]Û0Ÿ]Û¯Û‘È~ÿÛPÜ‘È~_Ýïß‘È~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘È~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSû]û‘È~]ûû0ŸûŸû‘È~Ÿû£ûP£û þ‘È~ þ,þ0Ÿ,þe‘È~e0ŸE‘È~EQUQ|‘È~|À0Ÿõ20Ÿ2 ‘È~  0Ÿ 2‘È~K¹A‘È~¹AÎAUÎAõA0ŸõAàh‘È~žÄAÅ‘È~×Ŷ@‘È~¢²fº0Ÿfº…»S…»;¼\;¼X¾SX¾åΑ¨~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘¨~÷Ò‰Ù‘¨~@Û]Û0Ÿ]Û¯Û‘¨~ÿÛPÜ‘¨~_Ýïß‘¨~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑨ~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSû]ûS]ûû0ŸûŸû\Ÿû«ûS«ûcü\cü þ‘¨~ þ,þ0Ÿ,þ‚þ\‚þ,‘¨~,8S8G\GeSe0ŸI\I~ï|S|À0Ÿõ20Ÿ2tSt#P#eSe T  0Ÿ Y\YøVø2‘¨~KH"\H"ã#‘¨~ã#$\$×%‘¨~×%F&\F&ö'‘¨~ö'9(\9(é)‘¨~é)J*\J*,‘¨~,M,\M,ú-‘¨~ú-c.\c.#0‘¨~#0f0\f02‘¨~2`2\`24‘¨~4W4\W4#8‘¨~#8R8\R8—<‘¨~—<À<SÀ<Õ<\Õ<Q>‘¨~Q>z>Sz>>\>ÿ?‘¨~ÿ?(@S(@¹A‘¨~¹AÄASÄAÎA\ÎAõA0ŸõA+B\+BáC‘¨~áC'D\'Dàh‘¨~žÄAÅ‘¨~×Åj‘¨~j“S“…‘¨~…®S®3‘¨~3\S\¶@‘¨~¢²fº0ŸfºS»^S»t»Ut»€»P€»åΑÀ~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘À~÷Ò‰Ù‘À~@Û]Û0Ÿ]Û¯Û‘À~ÿÛPÜ‘À~_Ýïß‘À~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘À~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSû]ûU]ûû0ŸûŸû‘À~Ÿû«û^«û þ‘À~ þ,þ0Ÿ,þ,‘À~,0P0G‘À~Ge^e0Ÿm‘À~mtUt|‘À~|À0Ÿõ20Ÿ2ž^ž#‘À~#‘^‘ ‘À~  0Ÿ 2‘À~KÎA‘À~ÎAõA0ŸõAàh‘À~žÄAÅ‘À~×Ŷ@‘À~¢²fº0ŸfºåΑ°~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘°~÷Ò‰Ù‘°~@Û]Û0Ÿ]Û¯Û‘°~ÿÛPÜ‘°~_Ýïß‘°~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘°~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSû]û‘°~]ûû0Ÿû þ‘°~ þ,þ0Ÿ,þe‘°~e0Ÿ|‘°~|À0Ÿõ20Ÿ2 ‘°~  0Ÿ 2‘°~K¬‘°~¬6#S6#ã#‘°~ã#1$S1$×%‘°~×%U&SU&ö'‘°~ö'H(SH(é)‘°~é)Y+SY+,‘°~,Y,SY,ú-‘°~ú-‚.S‚.#0‘°~#0u0Su02‘°~22S2ÎA‘°~ÎAõA0ŸõAàh‘°~žÄAÅ‘°~×Ŷ@‘°~¢²¾0Ÿ¾åΑ ~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ ~÷Ò‰Ù‘ ~@Û]Û0Ÿ]Û¯Û‘ ~ÿÛPÜ‘ ~_Ýïß‘ ~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ ~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘ ~KW40ŸW4#8‘ ~#8:0Ÿ:—<‘ ~—<ÑE0ŸÑEàh‘ ~žÄAÅ‘ ~×Å3‘ ~3Â0ŸÂ¶@‘ ~¢²׿0Ÿ×¿åΑ˜~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘˜~÷Ò‰Ù‘˜~@Û]Û0Ÿ]Û¯Û‘˜~ÿÛPÜ‘˜~_Ýïß‘˜~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑘ~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘˜~KW40ŸW4#8‘˜~#8:0Ÿ:—<‘˜~—<ÑE0ŸÑEàh‘˜~žÄAÅ‘˜~×Å ‘˜~ Â0ŸÂ¶@‘˜~¢²°Â0Ÿ°ÂÃSÃåΑ~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘~÷Ò‰Ù‘~@Û]Û0Ÿ]Û¯Û‘~ÿÛPÜ‘~_Ýïß‘~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘~KW40ŸW4#8‘~#8:0Ÿ:—<‘~—<ÑE0ŸÑEàh‘~žÄAÅ‘~×Å÷‘~÷Â0ŸÂ'‘~'@'S@'*‘~*+*S+*˜+‘~˜+K-0ŸK-¶@‘~¢²÷Ä0Ÿ÷ÄûÄPûÄåΑ¨}åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘¨}÷Ò‰Ù‘¨}@Û]Û0Ÿ]Û¯Û‘¨}ÿÛPÜ‘¨}_Ýïß‘¨}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑨ}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘¨}KW40ŸW4#8‘¨}#8:0Ÿ:—<‘¨}—<ÑE0ŸÑEl‘¨}lGm‘è{z˜¡˜‘è{\™š‘è{š¡š‘è{К\›‘è{q›ü›‘è{+œ¦œ‘è{»œ¥‘è{Ì÷‘¨}÷Â0ŸÂ⑨}K-0ŸK-¶@‘¨}¢²Å0ŸÅ%ÅP%ÅåΑ€}åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘€}÷Ò‰Ù‘€}@Û]Û0Ÿ]Û¯Û‘€}ÿÛPÜ‘€}_Ýïß‘€}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘€}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘€}KW40ŸW4#8‘€}#8:0Ÿ:—<‘€}—<ÑE0ŸÑEàh‘€}àh4lV4lGm‘Ø{z˜¡˜‘Ø{\™š‘Ø{š–š‘Ø{КS›‘Ø{q›ñ›‘Ø{+œœ‘Ø{»œ”‘Ø{ÌìVìcž‘€}cžžVžŸ‘€}ŸN VN Р‘€}Рè Vè s¡‘€}s¡‹¡V‹¡¢‘€}¢É¢VÉ¢T£‘€}T£,¥V,¥·¥‘€}·¥H¦VH¦Ó¦‘€}Ó¦A¨VA¨ó‘€}óžÄVžÄAÅ‘€}AųÅV³Å÷‘€}÷Â0ŸÂˆ‘€}ˆK-0ŸK-¶@‘€}¢²ÕÅ0ŸÕÅåΑˆ~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ˆ~÷Ò‰Ù‘ˆ~@Û]Û0Ÿ]Û¯Û‘ˆ~ÿÛPÜ‘ˆ~_Ýïß‘ˆ~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑈ~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘ˆ~KW40ŸW4#8‘ˆ~#8:0Ÿ:—<‘ˆ~—<ÑE0ŸÑEàh‘ˆ~žÄAÅ‘ˆ~×Å÷‘ˆ~÷Â0ŸÂ‘ˆ~4‚0Ÿ¦K-0ŸK-¶@‘ˆ~¢²„Æ0Ÿ„ÆåΑ€~åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘€~÷Ò‰Ù‘€~@Û]Û0Ÿ]Û¯Û‘€~ÿÛPÜ‘€~_Ýïß‘€~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘€~8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘€~KW40ŸW4#8‘€~#8:0Ÿ:—<‘€~—<ÑE0ŸÑEàh‘€~žÄAÅ‘€~×Å÷‘€~÷K-0ŸK-}5‘€~}5;80Ÿ;8¶@‘€~¢²Ç0ŸÇåΑø}åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ø}÷Ò‰Ù‘ø}@Û]Û0Ÿ]Û¯Û‘ø}ÿÛPÜ‘ø}_Ýïß‘ø}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ø}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘ø}KW40ŸW4#8‘ø}#8:0Ÿ:—<‘ø}—<ÑE0ŸÑEàh‘ø}žÄAÅ‘ø}×Å÷‘ø}÷K-0ŸK-R1‘ø}R1;80Ÿ;8¶@‘ø}¢²¡Ç0Ÿ¡ÇåΑð}åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ð}÷Ò‰Ù‘ð}@Û]Û0Ÿ]Û¯Û‘ð}ÿÛPÜ‘ð}_Ýïß‘ð}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ð}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘ð}KW40ŸW4#8‘ð}#8:0Ÿ:—<‘ð}—<ÑE0ŸÑEàh‘ð}žÄAÅ‘ð}×Å÷‘ð}÷;80Ÿ;8¶@‘ð}¢²¼Ç0Ÿ¼ÇÀÇPÀÇåΑø|åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ø|÷Ò‰Ù‘ø|@Û]Û0Ÿ]Û¯Û‘ø|ÿÛPÜ‘ø|_Ýïß‘ø|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ø|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘ø|KW40ŸW4#8‘ø|#8:0Ÿ:—<‘ø|—<ÑE0ŸÑEàh‘ø|àhZl^ZldlPdlGm‘à{z˜¡˜‘à{\™ÿ™‘à{šš‘à{К=›‘à{q›è›‘à{+œ‡œ‘à{»œ+‘à{+d^dÌ‘ø|Ìž^žcž‘ø|cž˜ž^˜žŸ‘ø|ŸZŸ^ZŸœŸ‘ø|œŸæŸ^æŸ6 ‘ø|6 f ^f Р‘ø|Р¡^¡s¡‘ø|s¡£¡^£¡¢‘ø|¢g¢^g¢¢‘ø|¢à¢^à¢T£‘ø|T£¨£^¨£ï£‘ø|ï£C¤^C¤k¤‘ø|k¤¼¤^¼¤¥‘ø|¥D¥^D¥·¥‘ø|·¥¦^¦0¦‘ø|0¦`¦^`¦Ó¦‘ø|Ó¦§^§|§‘ø||§©^©bÁ‘ø|bÁmÁ^mÁŠÁ‘ø|ŠÁªÁ^ªÁ ‘ø| ÂaÂ^a‘‘ø|‘±Â^±Âó‘ø|óÂÃ^ÃUÑø|UÃ`Ã^`ÙÑø|™Ã¤Ã^¤Ã¾Ã‘ø|¾ÃÉÃ^ÉÃãÑø|ãÞÄ^žÄAÅ‘ø|AÅvÅ^vÅ÷‘ø|÷;80Ÿ;8ë;‘ø|ë;-=0Ÿ-=¶@‘ø|¢²ÔÇ0ŸÔÇÝÇPÝÇåΑè{åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘è{÷ÒÖ‘è{@Û]Û0Ÿ]Û¯Û‘è{_ݼޑè{ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘è{KW40ŸW4#8‘è{#8:0Ÿ:—<‘è{—<ÑE0ŸÑE³b‘è{³b—ß0Ÿ—ß÷‘è{÷;80Ÿ;8²:‘è{²:-=0Ÿ-=¶@‘è{¢²É0ŸÉùÉ‘À}ùÉåÎ^åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘À}÷Ò‰Ù‘À}@Û]Û0Ÿ]Û¯Û‘À}ÿÛPÜ‘À}_Ýïß‘À}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘À}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø+^+2‘À}KW40ŸW4—4^—4›5‘À}›5Û5^Û5ß6‘À}ß6 7^ 7#8‘À}#8:0Ÿ:M:^M:S;‘À}S;‘;^‘;—<‘À}—<ÑE0ŸÑEF^FG‘À}GUG^UGUH‘À}UH²H^²H»I‘À}»IJ^JK‘À}KnK^nKwL‘À}wLÉL^ÉLÒM‘À}ÒM+N^+N4O‘À}4OO^O–P‘À}–PïP^ïPøQ‘À}øQIR^IRRS‘À}RS‡S^‡SwT‘À}wT¥T^¥TžU‘À}žUÅU^ÅUÇV‘À}ÇVîV^îVðW‘À}ðWX^XY‘À}Y@Y^@Yàh‘À}žÄAÅ‘À}×ÅŸô‘À}Ÿôßõ0Ÿßõ÷‘À}÷w>0Ÿw>¶@‘À}¢²É0ŸÉ$ÊS$ÊåÎ_åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘°}÷Ò‰Ù‘°}@Û]Û0Ÿ]Û¯Û‘°}ÿÛPÜ‘°}_Ýïß‘°}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘°}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø_2PKW40ŸW4w4_w4›5P›5»5_»5ß6Pß6÷6_÷6#8P#8:0Ÿ:,:_,:S;PS;p;_p;—<P—<ÑE0ŸÑEéE_éEGPG-G_-GUHPUHœH_œH»IP»IúI_úIKPKXK_XKwLPwL³L_³LÒMPÒMN_N4OP4OwO_wO–PP–PÙP_ÙPøQPøQ3R_3RRSPRSoS_oSwTPwTT_TžUPžU¾U_¾UÇVPÇVßV_ßVðWPðWX_XYPY6Y_6YBZPBZ_ZS_Z_[‘°}_[[S[ý\‘°}ý\ ]S ]#^‘°}#^B^SB^?_‘°}?_CaSCaàh‘°}žÄAÅ‘°}×ň呰}ˆå•åS•åŒæ‘°}ŒæäæSäæKç‘°}KçUçSUçLè‘°}LèVèSVè÷ê‘°}÷êëSëëë‘°}ëëõëSõëáì‘°}áì!íS!í-î‘°}-îEîSEîRï‘°}Rï‡ïS‡ïWð‘°}WðoðSoð~ñ‘°}~ñƒñSƒñ{ò‘°}{òóSó,ô‘°},ôŸôSŸôßõ0Ÿßõ öS ö÷‘°}÷w>0Ÿw>®>S®>{?‘°}{? ?S ?¶@‘°}¢²É0ŸÉË‘È}ËåÎ]åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘È}÷Ò‰Ù‘È}@Û]Û0Ÿ]Û¯Û‘È}ÿÛPÜ‘È}_Ýïß‘È}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘È}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø]\X\2‘È}KW40ŸW4d4]d4Î4XÎ4›5‘È}›5¨5]¨56X6ß6‘È}ß6ì6]ì6V7XV7#8‘È}#8:0Ÿ::]:†:X†:S;‘È}S;`;]`;Ê;XÊ;—<‘È}—<ÑE0ŸÑEÞE]ÞEFXFG‘È}G"G]"G‹GX‹GUH‘È}UHŒH]ŒHîHXîH»I‘È}»IêI]êILJXLJK‘È}KHK]HKªKXªKwL‘È}wL£L]£LMXMÒM‘È}ÒMN]NgNXgN4O‘È}4OgO]gOÉOXÉO–P‘È}–PÉP]ÉP+QX+QøQ‘È}øQ#R]#R…RX…Ràh‘È}žÄAÅ‘È}×ÅŸô‘È}Ÿôßõ0Ÿßõ÷‘È}÷w>0Ÿw>¶@‘È}¢²É0ŸÉFË‘Ð}FËåÎVåÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘Ð}÷Ò‰Ù‘Ð}@Û]Û0Ÿ]Û¯Û‘Ð}ÿÛPÜ‘Ð}_Ýïß‘Ð}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘Ð}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0ŸøGVG2‘Ð}KW40ŸW4¹4V¹4›5‘Ð}›5ý5Vý5ß6‘Ð}ß6X7VX7#8‘Ð}#8:0Ÿ:ˆ:Vˆ:S;‘Ð}S;Ì;VÌ;—<‘Ð}—<ÑE0ŸÑEJFVJFG‘Ð}GvGVvGUH‘Ð}UHðHVðH»I‘Ð}»INJVNJK‘Ð}K¬KV¬KwL‘Ð}wLMVMÒM‘Ð}ÒMiNViN4O‘Ð}4OËOVËO–P‘Ð}–P-QV-QøQ‘Ð}øQ‡RV‡Ràh‘Ð}žÄAÅ‘Ð}×ÅŸô‘Ð}Ÿôßõ0Ÿßõ÷‘Ð}÷w>0Ÿw>¶@‘Ð}¢²É0ŸÉ”Í‘¸}”ͤÍP¤ÍÐÎSÐÎåΑ¸}åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘¸}÷Ò‰Ù‘¸}@Û]Û0Ÿ]Û¯Û‘¸}ÿÛPÜ‘¸}_Ýïß‘¸}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑸ}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõø0Ÿø2‘¸}KW40ŸW44S4›5‘¸}›5Å5SÅ5ß6‘¸}ß6S7SS7#8‘¸}#8:0Ÿ:ƒ:Sƒ:S;‘¸}S;Ç;SÇ;—<‘¸}—<ÑE0ŸÑE?FS?FG‘¸}G?GS?GGm‘¸}GmMpSMp\pP\p‡p_‡p³pS³pNq‘¸}Nqmq_mqÏqVÏqr‘¸}rdrSdrÅr‘¸}År sS sJs‘¸}Js’sS’s5t‘¸}5t_tS_tùt‘¸}ùt uS uœu‘¸}œuåuSåu†v‘¸}†vÃvSÃvTw‘¸}TwwSwów‘¸}ów.xS.xªx‘¸}ªx yS y™y‘¸}™yÀySÀy0Ÿw>¶@‘¸}¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ˆ}÷Ò‰Ù‘ˆ}@Û]Û0Ÿ]Û¯Û‘ˆ}ÿÛPÜ‘ˆ}_Ýïß‘ˆ}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑈ}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKJ`0ŸJ`N`TN`"b‘€|"bàh‘ˆ}žÄAÅ‘ˆ}×Å—ß‘ˆ}—ß à‘€|¥àXâ‘€|]âgã‘€|lãvä‘€|{äƒå‘€|ˆå…æ‘€|ŒæEè‘€|Lèæë‘€|ëëÜì‘€|áì¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ }÷Ò‰Ù‘ }@Û]Û0Ÿ]Û¯Û‘ }ÿÛPÜ‘ }_Ýïß‘ }ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ }8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKJ`0ŸJ`Ob‘¨|Obàh‘ }žÄAÅ‘ }×Å—ß‘ }—ß†à‘¨|¥à>⑨|]âM㑨|lã\䑨|{äi周|ˆå`摨|Œæ 葨|Lè!鑨|.éꑨ|êêꑨ|÷êÌ둨|ëëÂ쑨|áì¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘˜}÷Ò‰Ù‘˜}@Û]Û0Ÿ]Û¯Û‘˜}ÿÛPÜ‘˜}_Ýïß‘˜}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑘ}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKq`0Ÿq`u`Pu`c‘ |c cP càh‘˜}žÄAÅ‘˜}×ůڑ˜}¯ÚsÛ‘ |¢Û!Ý‘ |&ÝòÝ‘ |ÞåÞ‘ | ßvà‘ |¥à6â‘ |]âEã‘ |lãLä‘ |{äaå‘ |ˆåXæ‘ |Œæè‘ |Lèé‘ |.éÿé‘ |êâê‘ |÷êÄë‘ |ëë¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘}÷Ò‰Ù‘}@Û]Û0Ÿ]Û¯Û‘}ÿÛPÜ‘}_Ýïß‘}ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘}8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKŒ`0ŸŒ`—`P—`_c‘Ø|_cbcPbcàh‘}žÄAÅ‘}×ÅÉÙ‘}ÉÙˆÚ‘Ø|¯ÚaÛ‘Ø|¢ÛÝ‘Ø|&ÝØÝ‘Ø|ÞËÞ‘Ø| ßmà‘Ø|¥à%â‘Ø|]â4ã‘Ø|lãC䑨|{äP周|ˆåOæ‘Ø|Œæè‘Ø|Lè鑨|.éö鑨|êÙê‘Ø|÷ê¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘Ø|÷Ò‰Ù‘Ø|@Û]Û0Ÿ]Û¯Û‘Ø|ÿÛPÜ‘Ø|_Ýïß‘Ø|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘Ø|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKÒd0ŸÒdàh‘Ø|žÄAÅ‘Ø|×Å´Ò‘Ø|´ÒCÔ0ŸCÔÖ‘Ø|Ö¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ð|÷Ò‰Ù‘ð|@Û]Û0Ÿ]Û¯Û‘ð|ÿÛPÜ‘ð|_Ýïß‘ð|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ð|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKf0Ÿff[f?f‘à{‰fàh‘ð|žÄAÅ‘ð|×ÅÚÊ‘ð|©ËëË‘à{p̶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘è|÷Ò‰Ù‘è|@Û]Û0Ÿ]Û¯Û‘è|ÿÛPÜ‘è|_Ýïß‘è|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘è|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKf0Ÿfùf‘€|ùfàh‘è|žÄAÅ‘è|×ÅÉ‘è|É5Ê‘€|<ʤˑ€|©ËkÌ‘€|p̶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘à|÷Ò‰Ù‘à|@Û]Û0Ÿ]Û¯Û‘à|ÿÛPÜ‘à|_Ýïß‘à|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘à|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK“g0Ÿ“g—gT—gàh‘à|žÄAÅ‘à|×Å9È‘à|9ȶ@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘¸|÷Ò‰Ù‘¸|@Û]Û0Ÿ]Û¯Û‘¸|ÿÛPÜ‘¸|_Ýïß‘¸|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑸ|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKàh0ŸàhGm‘¸|‹{ã|^ã|¸Œ‘¸|c^cß‘¸|ߣŽ^£Ž+T+ó^ój‘¸|j©^©%‘‘¸|%‘y‘^y‘È‘‘¸|È‘’^’b’‘¸|b’»’^»’"“‘¸|"“p“^p“+”‘¸|+”o”^o”ò”‘¸|ò”$•^$•º•‘¸|z˜¡˜‘¸|\™žÄ‘¸|žÄAÅ0ŸAųő¸|×Ŷ@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘À|÷Ò‰Ù‘À|@Û]Û0Ÿ]Û¯Û‘À|ÿÛPÜ‘À|_Ýïß‘À|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘À|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKàh0ŸàhGm‘À|¶{ó|Vó|¸Œ‘À|5V5»T»ß‘À|ߎVŽ+‘À|+=‘V=‘È‘‘À|È‘|’V|’"“T"“:“V:“+”‘À|+”\”V\”ò”‘À|ò”•V•º•‘À|z˜¡˜‘À|\™žÄ‘À|žÄAÅ0ŸAųőÀ|×Ŷ@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘È|÷Ò‰Ù‘È|@Û]Û0Ÿ]Û¯Û‘È|ÿÛPÜ‘È|_Ýïß‘È|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘È|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKàh0ŸàhGm‘È|ê}‘V‘¦‘È|¦ÀVÀ,€‘È|,€9€V9€Ú€‘ø{Ú€ù€‘È|ù€¶V¶h‚‘È|h‚HƒVHƒçƒ‘È|çƒ „V „„P„¬„‘ø{¬„±„‘È|±„h…Vh…·…‘È|·…‡Vz˜¡˜‘È|\™žÄ‘È|žÄAÅ0ŸAųőÈ|×Ŷ@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘Ð|÷Ò‰Ù‘Ð|@Û]Û0Ÿ]Û¯Û‘Ð|ÿÛPÜ‘Ð|_Ýïß‘Ð|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘Ð|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKàh0ŸàhGm‘Ð|~Œ^Œ¦‘Ð|¦Ø^Ø,€‘Ð|,€p€^p€ù€‘Ð|ù€ã^ãh‚‘Ð|h‚±‚^±‚$ƒ‘Ð|$ƒyƒ^yƒçƒ‘Ð|çƒ-„^-„±„‘Ð|±„ú„^ú„N…‘Ð|N…€…^€…·…‘Ð|·…†^†s†‘Ð|s†¼†^¼†‡‘Ð|z˜¡˜‘Ð|\™žÄ‘Ð|žÄAÅ0ŸAųőÐ|×Ŷ@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘Ø{÷Ò©Ø‘Ø{@Û]Û0Ÿ]Û¯Û‘Ø{_Ýßß‘Ø{ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKR©0ŸR©‹ª‘Ø~‹ª?º‘Ø{?ºË»‘Ø~Ë»¼‘Ø{¼>Á‘Ø~bÁ¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘à{÷Ò‰Ù‘à{@Û]Û0Ÿ]Û¯Û‘à{ÿÛPÜ‘à{_Ýïß‘à{ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘à{8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKR©0ŸR©¶ª‘à~¶ª?º‘à{?ºË»‘à~Ë»¼‘à{¼>Á‘à~bÁ¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ð{÷Ò‰Ù‘ð{@Û]Û0Ÿ]Û¯Û‘ð{ÿÛPÜ‘ð{_Ýïß‘ð{ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘ð{8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKR©0ŸR©áª^áª"¯V"¯S¯^S¯u¯Vu¯Ô¯‘ð{Ô¯°V°K°‘ð{K°“°V“°Á°‘ð{Á°x±Vx±³±‘ð{³±ñ±Vñ±.²‘ð{.²}²V}²º²‘ð{º²ê²Vê²I³‘ð{I³€³V€³¦³‘ð{¦³ͳVͳ´‘ð{´,´V,´z´‘ð{z´Æ´VÆ´ñ´‘ð{ñ´µVµMµ‘ð{Mµ~µV~µص‘ð{ص¶V¶a¶‘ð{a¶¶V¶¶‘ð{¶û¶Vû¶µ·‘ð{µ·Ü·VÜ·á·‘ð{á·¸V¸ ¸‘ð{ ¸,¸V,¸e¸‘ð{e¸ð¸Vð¸.¹‘ð{.¹j¹Vj¹º‘ð{º ºV º?º‘ð{?º‡º^‡º¸º‘ð{¸º~»^~»¼‘ð{¼5¼^5¼~¼‘ð{~¼½^½=½‘ð{=½Þ½^Þ½¾‘ð{¾‚¾^‚¾̾‘ð{̾†¿^†¿Ó¿‘ð{Ó¿“À^“ÀÞÀ‘ð{ÞÀÁ^Á>Á‘ð{bÁ¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘ˆ|÷Ò‰Ù‘ˆ|@Û]Û0Ÿ]Û¯Û‘ˆ|ÿÛPÜ‘ˆ|_Ýïß‘ˆ|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑈ|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKR©0ŸR©¬‘ˆ|¬A¯‘à~S¯7¶‘à~a¶>Á‘ˆ|bÁ¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘|÷Ò‰Ù‘|@Û]Û0Ÿ]Û¯Û‘|ÿÛPÜ‘|_Ýïß‘|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ê‘|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKR©0ŸR©0¬‘|0¬¯^¯S¯‘|S¯—¯^—¯Ô¯‘|Ô¯&°^&°K°‘|K°£°^£°Á°‘|Á°±^±³±‘|³±ì±^ì±.²‘|.²x²^x²º²‘|º² ³^ ³I³‘|I³”³^”³¦³‘|¦³ß³^ß³´‘|´L´^L´z´‘|z´δ^δñ´‘|ñ´*µ^*µMµ‘|Mµªµ^ªµص‘|ص"¶^"¶>Á‘|bÁ¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘˜|÷Ò‰Ù‘˜|@Û]Û0Ÿ]Û¯Û‘˜|ÿÛPÜ‘˜|_Ýïß‘˜|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8ꑘ|8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸKR©0ŸR©X¬‘˜|X¬N¯‘Ø~S¯7¶‘Ø~a¶>Á‘˜|bÁ¶@0Ÿ¢²kµ0ŸkµµSµ¶\¶)·SåÎÏ\ Ï/Ï\Ð8Ò\÷Ò‰Ù\@Û]ÛS]Û¯Û\ÿÛPÜ\_Ý>ä\Þäþæ0Ÿ èùé0Ÿ-ê8ê\8ê.ì0Ÿ.ìEìSoìxìSÅîÞîS•õ¾õSþ÷<øS<øEø‘à{FÂSn¬S¢²·0Ÿ·T·QT·Ò·SÒ·Ý·QÝ·E¸‘ |åÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò_÷Ò‰Ù_@Û]Û0Ÿ]Û¯Û_ÿÛPÜ__Ýïß_ïß>ä0ŸÞäþæ0Ÿ èùé0Ÿ-ê8ê_8êEì0ŸEìoìSoìxì0ŸxìÆìSÆìí[íÅî_ÅîÞî0ŸÞîúîQúîïSïsï[sï0ñ_eñòSò­ó_•õw÷0ŸÇ÷Ù÷Qþ÷3ú0ŸF–0Ÿ|‘ |¢²Ï0Ÿ Ï/Ï0ŸÐ÷Ò0Ÿ÷ÒpÙVpÙ~ÙP~Ù‰ÙV@ÛÿÛ0ŸÿÛPÜVPÜ_Ý0Ÿ_ÝïßVïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ-ê8êV8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK ¾0Ÿ ¾̾V̾¶@0Ÿ¢²´²0Ÿ´²º²Pº²Dz0ŸÇ²Ò²PÒ²}¶]}¶¶0Ÿ¶¶P¶)·‘è}Z¸¸0Ÿ¸š¸Pš¸Ÿ‘Ð~ŸظTظõ¸0Ÿ?¹¬¹0ŸÈ¹̹0ŸÌ¹عPعfº‘à}Óºñ¼‘ |ñ¼¦½0Ÿ¦½À½PÀ½¾‘ ~¾˜¿0Ÿ˜¿¦¿P¦¿׿‘˜~׿lÂ0ŸlÂÂP°‘~°Â[Ä0Ÿ[ÄiÄPiÄÑÄVÑÄáÄ0ŸáÄ÷ÄP÷ÄÅ0ŸÅÅPÅ,Å0Ÿ,Å@ÅP@Å‚ÅV‚Å—Å0Ÿ—űÅP±ÅÕÅ‘ˆ~ÕÅàÅ0ŸàÅ÷ÅP÷Å9ÆV9ÆNÆ0ŸNÆhÆPhƄƑ€~„Æ’Æ0Ÿ’ƦÆP¦ÆÏÆVÏÆ߯0ŸßÆùÆPùÆÇ‘ø}Ç#Ç0Ÿ#Ç7ÇP7Ç`ÇV`ÇpÇ0ŸpÇŠÇPŠÇ¡Ç‘ð}¡Ç±Ç0Ÿ±Ç¼ÇP¼ÇÉÇ0ŸÉÇÔÇPÔÇäÇ0ŸäÇôÇPôÇKÈVKȃÈ0ŸƒÈ—ÈP—ÈåΑ |åÎÏ] Ï/Ï]Ð8Ò]@Û¯Û]ïß>ä]Þäþæ] èùéP8ê.ìP.ìEì‘è}oìxì]ÅîÞî]•õw÷Pþ÷3ú]Sû]û‘ |ûŸû‘ |«ûþ‘ | þ,þ‘à},þ'‘ |,G‘ |e8P8F0ŸF`‘è}nN‘è}ÈÕ0Ÿ¾ Ü 0Ÿáþ0ŸÈ‘ |ï0Ÿ,P,|‘ |õ20Ÿ2ü‘ | “‘à}“ 0Ÿ Ñ‘ |ø ‘ |KÅ#‘ |ã#Ò%‘ |×%ñ'‘ |ö'ä)‘ |é)è+‘ |,õ-‘ |ú-0‘ |#02‘ |2è3‘ |4t5‘ |›5¸6‘ |ß68‘ |#8 :‘ |:N;‘ |S;’<‘ |—<Q>0ŸQ>ÿ?Pÿ?¹A0Ÿ¹AÎA‘ |õAÜC‘ |áCÌE‘ |ÑEG‘ |G.H‘ |UH¶I‘ |»IK‘ |KrL‘ |wLÍM‘ |ÒM/O‘ |4O‘P‘ |–PóQ‘ |øQMS‘ |RSPT‘ |wTwU‘ |žU V‘ |ÇVÉW‘ |ðWòX‘ |YZ‘ |BZZ[‘ |_[ø\‘ |ý\^‘ |#^_‘ |?_Õ_‘ |Õ_à_0Ÿà_ `P `J`VJ`W`0ŸW`q`Pq``0Ÿ`Œ`PŒ`0a0Ÿ0aCaPCaOb‘ˆ}Obýb0Ÿýb cP cAc‘˜}AcTc0ŸTcbcPbc˜c‘}˜cjd0Ÿjd‰dP‰dÒd‘Ø|ÒdÝd0ŸÝdìdPìdMeVMef0Ÿ$fHfPHf‰fV‰fÙf0ŸÙfîfPîf0g‘è|0g=g0Ÿ=g]gP]g`g‘ |`gsg0Ÿsg…gP…g“gT“gžg0Ÿžg²gP²gßgVßgîg0ŸîghPhšhVàh$i0Ÿ$i+iP+i4i‘à}DiYi0ŸYisiPsi§i_§iOj0ŸOj`jP`jÃj_ÃjÔj0ŸÔjíjPíjKk_Kk•k0Ÿ•k§kP§kÔkSÔkçk0ŸçkøkPøkEl‘Ø{ElTl0ŸTldlPdljl‘à{jlŒl0ŸŒl›lP›l³l_³lÃl0ŸÃlÕlPÕl7m_Gm|m0Ÿ|m•m]•m«m0Ÿ«m¸mP¸müm_ümn0ŸnnPncn_cnxn0ŸxnnPn«nV«n'o0Ÿ'o7oP7o‰oV‰oKp0ŸKp\pP\pbp_bpŒp0ŸŒp‘pP‘p®p_NqJs0ŸJsésVés5t]5t?tP?tZtVZtùt‘ð{ùt†v0Ÿ†vŒvVŒvTwTTw^wP^wówVówx_x xP x)x_ªxñx_ñxMyVMy™y]™yžyPžy»y_¥_>¥^¥V^¥·¥]·¥0¦P0¦Z¦_Z¦z¦Vz¦Ó¦]Ó¦2ª0Ÿ2ª=ªP=ª¶ª‘Ø{¶ªë0ŸÃ«ΫPΫ€¬‘Ø~€¬­0Ÿ­,­P,­w­_w­º®0Ÿº®Ï®PÏ®z¯_z¯ƯXƯÔ¯]Ô¯߯P߯û¯_û¯K°XK°.²0Ÿ.²?²_?²J²PJ²Y²_Y²–²Xº²ï²_ï²;³X;³I³]I³a¶0Ÿa¶Ô¶‘Ø~Ô¶û¶Pû¶œ¸0Ÿœ¸Ѹ‘Ø~ѸI¹0ŸI¹N¹PN¹?º0Ÿ?º¡º‘Ø{¸ºÆ»‘Ø{Ë»¼0Ÿ¼y¼‘Ø{~¼¡¼‘Ø{¡¼ʼPʼc½0Ÿc½h½Ph½¤½‘Ø{¤½ ¿0Ÿ ¿¿T¿¿‘Ø{¿ Ä0Ÿ ÄÄ p3$‘ˆ|"#Ä0Ä0Ÿ0ÄhÄPhĞđà}žÄÖÄVÖÄAÅ]AÅvÅ‘à}vųÅP×ÅÆVÆzÆ]zÆœÆVœÆÇPÇDÇVDÇ»Ç]»Ç„ÉP„ÉÊ‘è|<ÊÚÊ0ŸÚÊËVË©Ë]©Ë®ËP®ËpÌVpÌÃÎ0ŸÃÎîÎVîÎ’Ï]’ÏYÐ0ŸYмÐV¼Ð†ÑP†ÑÝÑVÝÑ´Ò]´ÒWÓP{ÓÔ0ŸÔÔPÔCÔ‘Ø|CÔ}ÔV}ÔÕ]Õ7ÕV7ÕÖ]Ö²ÖPÖÖÉÙ0ŸÉÙÑÙPÑÙ|Ú‘}¯Ú·ÚP·Ú{Û‘˜}¢ÛÝÛ0ŸÝÛ÷ÛP÷ÛfÜV&Ý.ÝP.ÝÞVÞ—ß0Ÿ—ß8à‘ˆ}¥à-⑈}]â<㑈}lã䑈}{äX呈}ˆååPåh摈}Œæ"ç0Ÿ"ç;çP;çK瑈}Kç.é0Ÿ.é6éP6éꑈ}ê÷ê0Ÿ÷êüêPüêëë‘Ø|ëëðëPðëáì‘ |áì÷ìP÷ì#íV#í-î]-î4îP4îJîVJîRï]Rï^ðP^ðtðVtð~ñ]~ñ{òP{òô‘ |,ôÚõ‘ |ßõÛö‘ |÷~ø0Ÿ¢øÛø0ŸÛøöøPöøù‘~ù8ù0Ÿ8ù¯úP¯úKü0Ÿoü 0Ÿ T ‘˜~T Ó P÷ ë 0Ÿë P-‘˜~-º0Ÿº:P:30Ÿ3¦P¦+V+)])ä!P"¼#0Ÿ¼#ß#Pß#þ#Vþ#s%0Ÿs%ç&Pç&˜+0Ÿ˜+Ô+‘~Ô+™.P™.Ä.VÄ.ø/]ø/¬2P¬2×2V×24]4Ä6PÄ6I7VI7;8];8f8Vf8y9]y9]>P]>w>Xw>v?‘ |{?©@‘ |º²ƒ³‘Ø{Aµqµ‘Ø{!ÌåΑ¸|Þä周{8ê{ê‘Ø{øš‘¸|W45‘¸|›5G6‘¸|ß6µ7‘¸|:å:‘¸|S;)<‘¸|ÑE§F‘¸|GÉG‘¸|UHMI‘¸|»I«J‘¸|K L‘¸|wLdM‘¸|ÒMÆN‘¸|LOPOhPO(P‘¸|ïoÿoh"r/rh/r¡r‘ø~À¬Q­‘ø{Q­5®‘ˆ|K° °‘ˆ|Á°ñ°‘ˆ|9±”±‘ˆ|³± ²‘ˆ|.²§²‘ø{º²¾²h¾²$³‘ˆ|I³¡³‘ˆ|¦³ý³‘ˆ|´a´‘ˆ|ñ´Mµ‘ø{صܵhܵ7¶‘ø{º²[´‘è{Aµqµ‘è{ßËåΑ°|Þäöå‘è{8êPë‘è{ø‘°|W4„5‘°|›5È6‘°|ß6=7‘°|:l:‘°|S;°;‘°|ÑE4F‘°|G>H‘°|UHÔH‘°|»I2J‘°|KK‘°|wLëL‘°|ÒMMN‘°|4O¯O‘°|®P²Ph²PQ‘°|º²=³‘ø{Aµqµ‘ø{˩͑¨|Þ䨿‘ø{8ê.ì‘ø{ø‘¨|UHÊH‘¨|»I(J‘¨|K†K‘¨|wLáL‘¨|ÒMCN‘¨|4O¥O‘¨|–PQ‘¨|R Rh RaR‘¨|¢²³0Ÿ³ ³P ³AµVkµ}¶V}¶ж0ŸÐ¶ß¶Pß¶ö¶V·Z¸VZ¸,¹0ŸÈ¹ß¹0Ÿß¹û¹Pû¹(ºX(ºŠº0ŸŠº–ºP–ºº0ŸÂºÓºPÓºäº0Ÿäº¼»\¼»l¼‘¸|l¼$½0Ÿ$½|½V|½2¾0Ÿ2¾J¾PJ¾n¾Vn¾™¾\™¾¾U¾¿\¿(¿0Ÿ(¿y¿Vy¿/À0Ÿ/À`ÀV`ÀdÀTdÀ†ÀV†ÀóÀ0ŸóÀÁPÁ9ÁV9Á[Á\[Á_ÁU_Á³Á\³ÁÃÁ0ŸÃÁâÁPâÁJÂVJÂàÂ0ŸàÂøÂPøÂÃVÃGÃ\GÃKÃUKÃÀÃ\ÀÃÖÃ0ŸÖÃ?ÄV?ĆÉ0Ÿ†É—ÉP—ÉùÉVùÉåÎ0ŸåÎÏV Ï/ÏVÐ8ÒV@Û¯ÛVïß>äVÞäþæP è-ê0Ÿ8ê.ì0ŸEì0ñVeñ­óV•õw÷0ŸÇ÷Ù÷Vþ÷3úV\úuúVSû]û‘¸|ûŸû\Ÿû£ûP£û«û‘È~«ûÞü‘¸| þþXþ,þ‘à{,þÿ‘¸|,G\GKPKV‘ |VF0ŸFnVn–P–¶ 0Ÿ‘¸|ÿ^0Ÿ^|‘¸||ÀV2‰\‰#V#+P+ ‘ |  P Y\YøVø20ŸKœ"‘¸|ã#¬$‘¸|×%Ë&‘¸|ö'¾(‘¸|é)¿*‘¸|,Ï,‘¸|ú-ø.‘¸|#0ë0‘¸|2½2‘¸|4W4‘¸|W4#80Ÿ#8ä8‘¸|:ÿ?0Ÿÿ?¹AV¹AõA0ŸõA¶B‘¸|áC¦D‘¸|ÑEBZ0ŸBZ­[V­[ý\0Ÿý\]V]#^0Ÿ#^?_P?_Ed0ŸPd®k0Ÿ®k·kP·kl_l”n0Ÿ”n¥nP¥nön_ön o0Ÿ o oP o=o_=o*q0ŸNq5t0Ÿ5ttt_ttùtVùtþtPþtu_œuàu_àu†vV†v‘vP‘v®v_®vTwVTwr{0Ÿr{Þ{VÞ{ð{0Ÿð{|P|!|_!|Œ|0ŸŒ||P|Ñ|_Ñ|ã|\ã|¸}0Ÿ¸}Ã}PÃ}=~^=~d~0Ÿd~‹~P‹~¥~_¥~(0Ÿ(:P:™S¦ÊSÊ,€V,€>€P>€P€SP€ù€‘ð{ù€l0Ÿl{P{žSž$ƒ0Ÿ$ƒ'ƒP'ƒMƒSMƒçƒ‘ð{çƒN…0ŸN…z…_z…·…V·…¼…P¼…Ó…_s†‡0Ÿ‡G‡^G‡LJVLJÙ‡^Ù‡ü‡Pü‡wŠ0ŸwŠ›Š^›ŠŒ0ŸŒŒ^Œ0Ÿ?_?ßVßú_úaŽ\aŽ/0Ÿ/o_o¬0Ÿ¬±P±Ë_j‘0Ÿ%‘O‘_O‘È‘Vȑ͑PÍ‘ä‘_b’¡’\¡’"“V"“T“\T“£“V£“ò”0Ÿò”!•_!•º•Vº•Ì0ŸÌù_ùcžVcžŸPŸA¨0ŸA¨`¨P`¨ˆ¨Vˆ¨¹¨0Ÿ¹¨ȨPȨ ©V ©ϯ‘è{Ô¯#°‘è{K°¼°‘è{Á°®±‘è{³±ý±‘è{.²‰²‘è{º²D³‘è{I³‘³‘è{¦³ð³‘è{´u´‘è{z´ì´‘è{ñ´;µ‘è{Mµ§µ‘è{ص\¶‘è{a¶½¶‘è{¶·‘è{µ·`¸‘è{e¸ü¸‘è{.¹Ÿ¹‘è{º,º‘è{?º³º‘è{¸ºõº‘è{Ë»¼‘è{~¼8½‘è{=½ê½‘è{¾Y¾‘è{Y¾d¾0Ÿd¾w¾Pw¾ ¾V ¾̾0ŸÌ¾É¿‘è{Ó¿rÀ‘è{rÀzÀPzÀÞÀVÞÀÁ‘è{bÁŠÁVŠÁÁPÁçÁV Â,ÂS,‘ÂV‘–ÂP–ÂóÂVóÂÓ0ŸÓåÓVåÓÖÖ0ŸÖÖª×Vª×îà0ŸîàþàPþàQáVQálã0Ÿlã{äV{äƒäPƒäˆåVˆå÷0Ÿ÷¯úV¯ú³úP³úÒúVÒúKüPoüôü\ôüaþVaþ‰þ\‰þ›þV›þŸþUŸþÃþVÃþCPCÁVÁ†0Ÿ†CVPÓ 0Ÿ÷ Æ VÑ -0Ÿ-W\WºVº:0Ÿ:GVGKUKjVjùPù…V…ä!0Ÿ"œ#V§#þ#0Ÿþ#($\($s%Vs%ç&0Ÿç&ô&Vô&ø&Uø&'V'Ž(PŽ(*V*¶@0Ÿð²Aµ ÿŸWµZµ0ŸkµŶ^Ŷö¶ ÿŸ·f¸\f¸¸P¸̸Sºfº0ŸqÈ°È ÿŸ°ÈÉ\ÉUÉ‘|UÉZÉPZÉåΑ|åÎÏ^ Ï/Ï^Ð{Ð^@Û]Û^ïßGà^ â¡â^Þäþæ ÿŸ.ì6ì^=ìEì0ŸEìoì\oìxì^xì#í\ÅîÞî^ÞîŽï\eñÙñ\•õö^Ç÷Ù÷\þ÷~ø^\úuú\ þ,þ0ŸeŽS8FPF– ÿŸ|ß\øE‘|W4®4‘|›5ò5‘|ß6j7‘|:š:‘|S;Þ;‘|ÑE\F‘|GtG‘|UHI‘|»I`J‘|K¾K‘|wLM‘|ÒM{N‘|4OÝO‘|–P?Q‘|øQ™R‘|RS„S‘|wT¶T‘|žUßU‘|ÇVW‘|ðW1X‘|YZY‘|BZ¦Z‘|_[D\‘|ý\j]‘|#^T^‘|?_›_‘|¸bÍbP4hoh ÿŸohGm‘¨|z˜¡˜‘¨|\™ƒ™‘¨|š©š‘¨|Кd›‘¨|q›œ‘¨|+œ®œ‘¨|»œáœ‘¨|+­‘¨|ÌDž‘¨|cžéž‘¨|Ÿ}Ÿ‘¨|œŸ ‘¨|6 ± ‘¨|РT¡‘¨|s¡÷¡‘¨|¢Š¢‘¨|¢î¢‘¨|T£Ë£‘¨|ï£f¤‘¨|k¤ߤ‘¨|¥˜¥‘¨|·¥+¦‘¨|0¦´¦‘¨|Ó¦§‘¨||§ ¨‘¨| ¨¨P®¨é¨ ÿŸé¨ï‘€|Ô¯F°‘€|K°`°‘€|Á°N±‘€|³±'²‘€|.²³²‘€|º²8³‘€|I³´‘€|z´œ´‘€|ñ´Óµ‘€|صL¶‘€|a¶k¶‘€|¶Ù¶‘€|µ·½·‘€|á·æ·‘€| ¸1¸‘€|e¸'¹‘€|.¹á¹‘€|ºTº‘€|¸ºϺ‘€|Ë»¼‘€|~¼ƒ¼‘€|¡¼¦¼‘€|ʼϼ‘€|=½¾‘€|¾î¾‘€|ö¾ÿ¾Pÿ¾«¿‘€|Ó¿¼À‘€|ÞÀ>Á‘€|bÁçÁ ÿŸÂ,Â0ŸUÃZÃPZÃxÃs™Ã¬Ã‘¨|¾ÃÑѨ|ãÃÄ‘¨| ÄÄPĞđ¨|žÄAÅ ÿŸAųő¨|×ÅzÆ ÿŸÆœÆ0Ÿß*ßP2ß:ßPjßrßP{òò‘|ò§òP§òkó‘|,ôeô‘|Ÿôßõ ÿŸ-=]> ÿŸa>w>0Ÿw>Â>‘|{?õ?‘|³ž³_ž³AµpàWµZµ0Ÿkµqµ_qµµ0Ÿ¶:¶‘à{í¶ö¶^·#·^#·)·‘à{)·T·0ŸÒ· ¸‘à{¦È°ÈP°ÈåΑ˜|@Û]Û0Ÿ=ìEì0Ÿoìxì0ŸÞîúî0ŸÇ÷Ù÷0ŸFI^Inpàø<‘˜|W4 4‘˜|›5ä5‘˜|ß6a7‘˜|:‘:‘˜|S;Õ;‘˜|ÑESF‘˜|GkG‘˜|UHùH‘˜|»IWJ‘˜|KµK‘˜|wLM‘˜|ÒMrN‘˜|4OÔO‘˜|–P6Q‘˜|øQR‘˜|RS{S‘˜|wT¢T‘˜|žUÖU‘˜|ÇVÿV‘˜|ðW(X‘˜|YQY‘˜|BZZ‘˜|_[;\‘˜|ý\a]‘˜|#^K^‘˜|?_`h‘˜|`hohPohàh‘Ø~Ú¨é¨Pé¨>Á‘ð~bÁgÁPgÁŠÁ‘ð~Â,Â0ŸžÄAÅP×ÅïÅ‘˜|zÆÆ‘˜|ÆœÆ0ŸœÆ«Æ‘˜|Ç0Ç‘˜|»ÇÌÇ‘˜|9ÈJÈ‘˜|ÖÈçÈ‘˜|ɓɑ˜|<ÊPÊ‘˜|ÚÊþÊ‘˜|©ËÄË‘˜|p̫̑˜|:Í"Α˜|¼ÎÚΑ˜|’ÏÊÏ‘˜|YÐÍБ˜|†Ñ%Ò‘˜|´ÒÂÒ‘˜|{Ó†Ô‘˜|ÕÕ‘˜|ÖÖ‘˜|ÖÖâÖ‘˜|ª×¸×‘˜|^ØlØ‘˜|Ù#Ù‘˜|ÉÙâÙ‘˜|¯ÚÈÚ‘˜|¢Û‹Ü‘˜|&Ý?Ý‘˜|Þ2Þ‘˜| ߽ߑ˜|¥àuᑘ|]â„⑘|lã“㑘|{ä ä‘˜|ˆå¡å‘˜|Œæa瑘|Lèb葘|.éH鑘|ê+ꑘ|÷ê 둘|ëë쑘|áìk푘|-î|Rï•|Wð¼ð‘˜|~ññ‘˜|{òbó‘˜|,ôŸô‘˜|ŸôßõPßõö‘˜|a>w>0Ÿw>¹>‘˜|{?ì?‘˜|¢²”µ0Ÿ”µ¬µ\¬µ½µ0Ÿ½µ͵P͵äµ_äµ/¶0Ÿ/¶>¶P>¶k¶\k¶‹·0Ÿ‹·›·P›·Ò·]Ò·º0Ÿº(ºXÀ¼ü¼0Ÿü¼½P½;½X;½н\¾¾0Ÿ¾+¾P+¾”¾‘€|?¿¹¿\׿Ü¿0ŸÜ¿ÀPÀ[À‘€|Â’Â\°Â¸Â0Ÿ¸ÂÙÂPÙÂBÑ€|íÃxÄ\xĆÄX†Ä‘Ä‘€|«ÄGÅ0ŸGÅbÅPbÅgÅXgÅrÅ‘à{ÕÅþÅ0ŸþÅÆPÆÆXÆ)Æ‘à{„Æ­Æ0Ÿ­Æ¼ÆP¼ÆÓÆXÓÆþÆ‘Ø{Ç>Ç0Ÿ>ÇMÇPMÇdÇXdÇÇ‘Ø{¡Ç È0Ÿ È;ÈP;È@ÈX@ÈKÈ‘à{ÉIÉ0ŸIÉÉ]ÉùÉ0ŸSÊbÊPbÊ€Ê]€Ê‘Ê0Ÿ‘Ê£ÊP£ÊFË]FËbÎ0Ÿb·ÎP‡Î½Î‘¨|åÎ÷Î\÷ÎÏ_ Ï/Ï0ŸÐ(ÒP(Ò8ÒX@ÛOÛ0ŸOÛ]Û\]Û‰ÛX‰Û¯Û‘Ø~ïß/à_/à âX â>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8êWì0ŸWìdìPdìoì]oìxì0Ÿxìì]ìúî0Ÿúî0ñPeñˆñ]ˆñ­óX•õw÷0ŸÇ÷Ù÷0Ÿþ÷™ø\\úuú0Ÿ]ûû0Ÿ þþXþ,þ‘à{e0ŸïÿXÿU,‘à{,E0Ÿ|À0Ÿõ20Ÿ  0Ÿø20ŸW4#80Ÿ:—<0Ÿ—<Q>PQ>ƒ>‘à{ÿ?=@\=@¹AXÎAõA0ŸÑE*F‘¨|G%GP%GUHQUHRS0ŸRS_S]_SwTXwT„T]„TžUXžU«U]«UÇVXÇV×VP×VðWXðWýW]ýWYXY)YP)YBZXBZ#^0Ÿ#^0^]0^?_X?_„_]„_`0Ÿ`+`P+`J`‘€|J`È`0ŸÈ`ç`Pç`ñ`Xñ`ü`‘à{a$aU$aCa‘Ø{jaóa0ŸóabPb|b‘ }|bc0ŸcÃcPÃcñc‘Ø{d#d0Ÿ#d;dP;d^dX^dŽd‘à{£de0Ÿe4eP4e9eX9eDe‘à{f‘i0Ÿ‘i¡iP¡iÿi]ÿij0Ÿj1jP1jfj]fj k0Ÿ kkPk\k]\kpk0Ÿpk‰kP‰kþk]þkBv0Ÿ†vO|0Ÿq|…|P…|£|]£|A0ŸAePež]ž$ƒ0Ÿ$ƒAƒ]AƒçƒXçƒôƒPôƒùƒ]ùƒ±„X±„ã0Ÿã$Ž]$Že0ŸeƒPƒ¾]¾jXjoPoy]%‘"“0Ÿ"“?“]?“£“X£“+”0Ÿ+”H”]H”ò”Xò”ø”Pø”ý”]ý”º•Xº•Ì0ŸÌÙ]ÙcžXcžpž]pžŸXŸŸ]ŸœŸXœŸ P6 C ]C РXРs¡Ps¡T£0ŸT£a£]a£ï£Xï£ü£]ü£k¤Xk¤ߤP¥¥]¥0¦0Ÿ0¦Ó¦PÓ¦î¦]î¦|§X|§Fª0ŸFªQªPQªáª‘à{᪬«0Ÿ¬«·«P·«X¬^X¬¨­0Ÿ¨­¿­P¿­¬®_¬®K°0ŸK°ް_ްÁ°XÁ°}±_}±³±X³± ²0Ÿ.²I³0ŸI³…³_…³¦³X¦³±³P±³ä³_ä³´X´A´_A´z´Xz´®´_®´ñ´Xñ´a¶0Ÿa¶ž¶^ž¶¶X¶>·^>·n·Xn·w·^w·µ·Xµ·á·Pá·”¸0Ÿ”¸Ѹ^ѸA¹0ŸA¹N¹^N¹?º0Ÿ?ºmº‘à{¸º»‘à{Ë»¼0Ÿ¼J¼‘à{~¼¡¼P¡¼r½0Ÿr½¤½‘à{¤½¿0Ÿ¿¿T¿pÌ0Ÿ˜Í¼Î0ŸÃÎ’ÏP’Ï´Ò0Ÿ´ÒéÒ‘à{{ÓªÓXªÓµÓ‘à{éÓ²Ö0Ÿª×^ØP^؜ؑØ{ÙÉÙPÉÙ®Û0Ÿ®ÛÖÛPÖÛüÛ‘Ø{Ü&Ý0Ÿ&ÝÝ‘Ø{Þ!ÞP ß—ß0Ÿ—ߟßPŸß~à‘ }¥à'á0Ÿ'áAáPAáQá‘ }Qálã0ŸlãtãPtãTä‘ }{äˆå0ŸˆåÞ周{¦æKçVKçSçPSç(èXLè.é0Ÿ.é÷êV÷ê”ò0Ÿ”òÄò]Äò!óX!ó,ô‘Ø~,ô>ô0Ÿ>ôiôPiôŸô‘à{ßõBö‘à{÷,÷\,÷~øX¢ø»ø\ÆøÏøUÏøù‘à{8ùjù‘à{*P‘€|}ý‘€|{ P6 D XD “ \“ Ó X÷ ! \!  X£ Æ \Ñ ß Uß ‘à{ºì‘à{:B‘€|jù‘€|…3P3q\qÂXÂ40Ÿ¦)P)q 0Ÿq ° \° ä!X"2"\2"x#X§#µ#Uµ#ì#‘à{s%¥%‘à{ç&ï&‘€|'Ž(‘€|*˜+P±+Ä+XÄ+,\,K-XK--‘Ø{™.ø/Pø/R10ŸR1–1‘Ø{¬24P4}50ŸÄ6y9Py9-=0Ÿw>«?X«?¶@‘Ø~¢²Ôµ0ŸÔµäµPäµ¶S¶L·0ŸL·c·Sc·t·0Ÿt·„·P„·›·_›·í·0Ÿí·¸P¸E¸SE¸ïº0Ÿïº»P»=»_=»t»0Ÿt»€»P€»«»0Ÿ«»¼»P¼»Ñ»0ŸÑ»ì»P컼S¼X¾0ŸX¾™¾S™¾¾T¾â¾Sâ¾c¿0Ÿc¿Œ¿PŒ¿¹¿S¹¿kÀ0ŸkÀ†ÀP†ÀèÀSèÀfÁ0ŸfÁƒÁPƒÁìÁSìÁÂ0ŸÂFÂSFÂÃ0ŸÃGÃSGÃKÃTKÃÃSÃ+Ä0Ÿ+ÄTÄPTÄ‘ÄS‘Ä´É0Ÿ´É¿ÉP¿É$Ê^$ÊÜÊ0ŸÜÊîÊPîÊËSË÷Î0Ÿ÷ÎÏPÏÏS Ï/ÏSÐ(Ò0Ÿ(Ò8ÒS@Û]Û0Ÿ]Û¯ÛSïß âP â>äSÞäþæ0Ÿ è-ê0Ÿ8êEì0ŸEìWìSWìoì_oìì0ŸìÅîPÅîíî0ŸíîúîSúîï_ï0ñSeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûû0Ÿû”ûP”ûŸû‘¸|Ÿû,þ0Ÿ,þ,S,0P08‘À~80Ÿ P ïSï|0Ÿ|ÀSõ20Ÿ2BPBW_W#[# 0Ÿ P¦‘¸|ø20ŸK…0Ÿ…–P–ÔSÔ’ 0Ÿ’ œ Pœ Ó ^Ó !0Ÿ!‡!P‡!Í!^Í!Ü!SÜ!ô!^ô!þ!Pþ!7"^7"ã#‘ ~ã#é)0Ÿé)*^**P*]*^]*,‘ ~,20Ÿ2'2P'24S4RS0ŸRSwTSwT‡TP‡TžUSžUBZ0ŸBZuZ^uZ_[S_[ì[^ì[ý\Sý\]P]$]^$]#^S#^^_0Ÿ^_„_^„_Ca0ŸuaŽaPŽa¿aS¿aÑa0ŸÞa†e0Ÿ†eŸePŸef‘€|fTf0ŸTfofPof«f‘ð|«f¶f0Ÿ¶fÍfPÍfùfSùf¹g0Ÿ¹gËgPËghSh?h0Ÿ?hNhPNhÑhSÑhàh‘ˆ|ѧ&¨0Ÿ&¨:¨P:¨W¨SW¨g¨0Ÿg¨}¨P}¨R©SR©–©0Ÿ–©©P©¦©‘à}·©Ï©0ŸÏ©Ù©PÙ©ª\ª‹ª0Ÿ«"«P"«A«\A«š«0Ÿš«¥«P¥«¬\¬0¬‘à~0¬Æ­0ŸÆ­Ý­PÝ­¬®\¬®K°0ŸK°›°\›°Á°SÁ°s±\s±³±S³± ²0Ÿ.²I³0ŸI³W³PW³ˆ³\ˆ³¦³S¦³´0Ÿ´I´\I´z´Sz´Á´\Á´ñ´Sñ´a¶0Ÿa¶“¶\“¶¶S¶ñ¶\ñ¶µ·Sµ·Ò·\Ò·á·Sá· ¸P ¸Œ¸0ŸŒ¸¸P¸Ѹ‘à~Ѹÿ¸\ÿ¸.¹S.¹A¹0ŸA¹N¹TN¹º0Ÿº?ºP?ºʼ0ŸÊ¼ ½\ ½=½S=½¤½\¤½¯½P¯½á½\á½¾S¾ö¾0Ÿö¾ú¾ p3$‘è{"#ÿ¾6¿\6¿ú¿Sú¿À0ŸÀ<ÀP<ÀrÀ‘à}rÀÞÀ0ŸÞÀÁ‘à}Á>Á‘ø{bÁ,ÂS,Â1ÂP1ÂóÂSóÂøÂPøÂUÃSUÃãÃ0ŸžÄAÅS×ÅzÆPzÆœÆVœÆÇSÇ»ÇP»ÇÉ0ŸÉ<ÊS<ÊAÊPAÊÚÊSÚÊßÊPßÊêÊ‘ð|©ËpÌ0ŸpÌ Ì‘€|:ÍeÍ‘€|eÍjÍPjÍÐ0ŸÐ¼Ð‘€|¼Ð–Ñ0Ÿ–Ñ›ÑP›ÑÏÓ0ŸÏÓøÓPøÓCÔSCÔÖ0ŸÖ²ÖSÖÖª×Pª×©à0Ÿ©àáSáQá0ŸQá]âS]âeâPeâlãSlã{ä0Ÿ{äˆåSˆåhæ0ŸŒæäæ0ŸäæùæPùæKçSKç.é0Ÿ.éêSêêPê÷êS÷ê®ò0Ÿ®ò·ò^·ò÷0Ÿ÷~øS¢ø»øSÆøù0Ÿù8ùS8ù¯ú0Ÿ¯úKüSoüÊüSÊüaþPaþ¦þ0Ÿ¦þÃþPÃþC0ŸCÁPÁ†S†ŠPŠ©S©*P*`0Ÿ`}P}ý0Ÿý{P{6 0Ÿ6 Ó S÷  P£ -0Ÿ-ºSº:0ŸGq 0Ÿq ä!S"x#Pœ#þ#0Ÿþ#s%Ss%ç&0Ÿô&¶@0Ÿ¢²-»0Ÿ-»S»_S»O¼‘À|O¼e½0Ÿe½x½Px½š½[š½Ž‘à{н¤¾0Ÿ¤¾¾¾P¾¾Ò¾[Ҿ⾑˜|⾿[¿¿‘˜|}¿ À0Ÿ À!ÀP!ÀFÀ[FÀ`À\`ÀdÀUdÀ†À\¥À°À0Ÿ°ÀÊÀPâÁ7Â0Ÿ7Â`ÂP`’‘à{’ÂRÃ0ŸRÃlÃPlÀÃ[€Ãј|ðÃ[°ÃÀј|EÄÆÉ0ŸÆÉÑÉPÑÉ9Ê_9ÊiÊ0ŸiÊzÊPzÊ©Ê\©ÊÃÊ0ŸÃÊÕÊPÕÊôÊ\ôÊË0ŸËËPËqËVqËŽÍ0ŸŽÍ¤ÍP¤Í¿ÍS¿Í Î0Ÿ ÎÎPÎ9Î\LÎ[ÎP[έÎ\­ÎÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò[@Û]Û0Ÿ]Û‰Û[‰Û¯Û‘è~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSû]û‘À|]ûû0ŸûŸû‘À|Ÿû«û0Ÿ«ûÕü‘À| þ,þ0Ÿ,þøþ‘À|,G‘À|G0Ÿ”‘À|ïm0Ÿm|‘À||À0Ÿõ 0Ÿ ‘À|øP2SK“"‘À|ã#£$‘À|×%Â&‘À|ö'µ(‘À|é)¶*‘À|,Æ,‘À|ú-ï.‘À|#0â0‘À|2´2‘À|4W4‘À|W4j4Pj4”4\”4›5[›5®5P®5Ø5\Ø5ß6[ß67\7#8[#8Û8‘À|:Û?0Ÿÿ?¹AP¹AõA0ŸõA­B‘À|áCD‘À|ÑEF\FG[GRG\RGUH[UHRS0ŸRSbSPbSwTVwT¨T\¨TžU[žU±UP±UÈU\ÈUÇV[ÇVñV\ñVðW[ðWXPXX\XY[YBZ0ŸBZ\Z_\Z_[[_[q[_q[[P[b_0Ÿb_„__„_ `0Ÿ `5`T5`J`‘¨|J`ž`0Ÿž`Á`PÁ`ï`‘Ø{ü`a0Ÿa•a0Ÿ•a¯aP¯a´a[´a¿a‘à{ÞaçaUçab‘Ø{"bÊc0ŸÊcécPécóc[ócþc‘à{Pd^dU^d–d‘Ø{Òdde0Ÿde}eP}e½e‘è{fzi0ŸziŠiPŠi¹i\¹i8j0Ÿ8jHjPHjxj\xjôj0ŸôjkPk"k\"k5k0Ÿ5kEkPEk4l‘è{4l¢l0Ÿ¢l¼lP¼lÛl\Ûlm0ŸmmPmÃp\ÃpNq[Nqˆq\ˆqÏq[ryr\yrÅr[Års\sJs[Js¥s\¥s5t[5tt\tùt[ùt0u\0uœu[œuøu\øuBv[†vÑv\ÑvTw[Tww\wów[ów>x\>xªx[ªxy\y™y[™yÐy\Ðyä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSû½û0Ÿ½ûÑûPÑûïû]ïûÀ0Ÿõ20ŸKB 0ŸB \ P\ ­ ]­  !0Ÿ !C!]C!ã#0Ÿã#ø#]ø#×%R×%æ%]æ%*0Ÿ*(*](*,R,,P,ú-Rú-).0Ÿ).9.P9.A.]A.#0R#020Ÿ22P22]2 40Ÿ 4J4]J4#80Ÿ#888]88:R:õA0ŸõA B] BáCRáCóCPóCÑERÑEŰ0ŸÅ°ó°Zó°þ°‘ˆ| ±±Z±,±‘ˆ|,±z´0Ÿz´ã´‘ˆ|ñ´¶@0Ÿ¢²&Á0Ÿ&ÁDÁPDÁ[Á‘€|[Á_ÁT_Á˜Á‘€|˜ÁÏ0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘€|@Û]Û0Ÿ]Û¯Û‘€|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûØû0ŸØûéûPéûXü_Xü þ‘€| þÀ0Ÿõ20ŸK¬_¬î0ŸîüPü _ * Q7 ; Q; \ ‘à|À í 0Ÿí û Pû !_!K!^K!£!_£!Ü!0ŸÜ!<"_<"ã#‘€|ã#$^$×%‘€|×%æ%^æ%&_&!&P!&;&_;&ö'‘€|ö'.(_.(é)‘€|é)ø)0Ÿ,Û,‘à|ú- .Q ..‘à|.h._h.#0‘€|#0A0PA0[0_[02‘€|2]2_]24‘€|4 4_ 4W4SW4#80Ÿ#8n8Sn8:‘€|:õA0ŸõABPB0B_0BáC‘€|áCÏq0ŸrBv0Ÿ†vw}0Ÿw}‰}P‰}ê}Sê}ý€0Ÿý€PSPçƒ0Ÿçƒ„S„±„‘€|±„‡0Ÿ‡/‡S/‡LJ‘€|LJò‡Sò‡.ˆ‘€|.ˆ‰0Ÿ‰6‰S6‰@‰‘€|@‰å‰0Ÿå‰÷‰P÷‰ŠSŠQŠ‘€|QŠŽ0ŸŽ9ŽP9ŽaŽSaŽb’0Ÿb’’S’"“‘€|"“%“P%“h“Sh“£“‘€|£“ª0ŸªªPª‹ª]‹ªm«0Ÿm«}«P}«¬]¬ä­0Ÿä­ü­Pü­¬®]¬®K°0ŸK°m°]m°Á°‘€|Á°S±]S±³±‘€|³±´0Ÿ´´P´´]´z´‘€|z´¡´]¡´ñ´‘€|ñ´a¶0Ÿa¶s¶]s¶¶‘€|¶æ¶]æ¶-·‘€|-·µ·0Ÿµ·Ç·]Ç·á·‘€|á·ó·]ó· ¸‘€| ¸e¸Pe¸?º0Ÿ?ºaº]aº¸º‘€|¸ºÞº]Þº»‘€|»~¼0Ÿ~¼’¼]’¼¡¼‘€|¡¼²¼]²¼ʼ‘€|ʼ×¼P×¼ä¼]ä¼=½‘€|=½ü0Ÿüaþ‘€|aþeþPeþ‰þ‘€|›þ¶@0Ÿïû þ0ŸKM0Ÿô7 0Ÿ7 \ 1Ÿó )!0Ÿ)!K!1Ÿã#×%1Ÿ×%&0Ÿö'é)0Ÿ,ú-1Ÿú-#00Ÿ220Ÿ4040Ÿ04W41Ÿ#8:1Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8ÒZ@Û]Û0Ÿ]Û‰ÛZ‰Û¯Û‘à~ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûü0Ÿü0üP0üHüVHü þZ þÀ0Ÿõ20ŸKMPMœVœ 0Ÿ T VT 9!0Ÿ9!K!PK!”!V”!è!0Ÿè!"V"ã#Zã#ó#Pó#$V$×%Z×%ö%0Ÿö%þ%Pþ%&V&ö'0Ÿö'(P((V(é)Zé),0Ÿ,*,V*,ú-Zú-.V.20Ÿ2E2VE24Z4@40Ÿ@4R4PR4W4VW4#80Ÿ#838P38G8VG8:Z:®0Ÿ®®P®Œ®‘ø{¬®K°0ŸK°e°‘ø{Á°9±‘ø{9±A±PA±¥±‘ø{³±z´0Ÿz´‡´‘ø{ñ´¶@0Ÿ«ÉèÉ]èÉùÉ0ŸBZGZ]_[v[]­[ý\0Ÿý\ ]]]#^0Ÿ\eãeSãef0Ÿ}Ú}]Ú}ê}0Ÿ‡‡]LJÞ‡].ˆ‰0Ÿ‰ ‰]@‰å‰0Ÿ'ªzª_zª‹ª0Ÿ‘«å«_嫬0Ÿa¶x¶_¶ë¶_-·µ·0Ÿµ·Ì·_á·ø·_?º}º_¸ºèº_»Ë»0Ÿ¼~¼0Ÿ~¼œ¼_¡¼¼¼_pÌuÌS:ÍjÍS˜Í¼Î0Ÿ¼Î¾ÎS’ÏYÐ0ŸcÌåΑÀ|ø‘‘À|W4ø4‘À|›5<6‘À|ß6¬7‘À|:Ü:‘À|S; <‘À|ÑEžF‘À|GÀG‘À|UHDI‘À|»I¢J‘À|KL‘À|wL[M‘À|êMîMhîM½N‘À|²o*q‘à~NqÏq‘à~rÅr‘à~ØrÜrhÜrJs‘à~˜ÌåΑÈ|ø†‘È|W4ï4‘È|›536‘È|ß6£7‘È|:Ó:‘È|S;<‘È|ÑE•F‘È|GµG‘È|UH;I‘È|»I™J‘È|K÷K‘È|ˆLŒLhŒLRM‘È|_oq‘à}Nqq‘à}rr‘à}År%s‘à}]sashas­s‘à}ÐÌåΑÐ|ø}‘Ð|W4ã4‘Ð|›5'6‘Ð|ß6š7‘Ð|:Ê:‘Ð|S;<‘Ð|ÑEŒF‘Ð|G¬G‘Ð|UH2I‘Ð|»IJ‘Ð|-K1Kh1KîK‘Ð|Ín©p‘¸}Nqxq‘¸}r\r‘¸}Års‘¸}Jsˆs‘¸}5tWt‘¸}ùtu‘¸}°u´uh´uÛu‘¸} ÍåΑØ|øÊ‘Ø|W435‘Ø|›5w6‘Ø|ß6å7‘Ø|:;‘Ø|S;Y<‘Ø|ÑE×F‘Ø|GùG‘Ø|UH}I‘Ø|ÏIÓIhÓIÛJ‘Ø|šjGm‘ø|Ómòp‘€}Nq·q‘€}r”r‘€}År8s‘€}JsÔs‘€}5tœt‘€}ùt_u‘€}œu'v‘€}†vëv‘€}Tw¶w‘€}ówmx‘€}¾x/y‘€}ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK-®0Ÿ-®5®P5®³®Y³®Õ®‘ø{Õ®Ô¯0ŸÔ¯é¯‘ø{K°S°PS°r°Yr°Á°‘ø{Á°±0Ÿ±4±P4±9±Y9±z´0Ÿz´´P´”´Y”´ñ´‘ø{ñ´¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘°|@Û]Û0Ÿ]Û¯Û‘°|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK¸Œ0ŸU–0Ÿb–œ–0Ÿœ–Õ– ŸÕ–Rî0ŸRîRïçŸRï¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò 0¶ Ÿ@Û]Û0Ÿ]Û¯Û 0¶ Ÿïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK¸Œ0ŸU–0Ÿb–œ–0Ÿœ–Õ– 0¶ ŸÕ–Rî0ŸRîRï 0¶ ŸRï¶@0Ÿ¢²Ï0Ÿ Ï/Ï0ŸÐ(Ò0Ÿ(Ò8Ò‘¨|@Û]Û0Ÿ]Û¯Û‘¨|ïß>ä0ŸÞäþæ0Ÿ è-ê0Ÿ8ê0ñ0Ÿeñ­ó0Ÿ•õw÷0ŸÇ÷Ù÷0Ÿþ÷3ú0Ÿ\úuú0ŸSûÀ0Ÿõ20ŸK¸Œ0ŸU–0Ÿb–œ–0Ÿœ–Õ– !ŸÕ–Rî0ŸRîRï ŽŸRï¶@0Ÿ?¶\¶Pþ÷øPµÔµSåÎ÷ÎSÐNÐSäµ¶S ââSäµ¶] ââ]äµ¶] Ï/Ï] â>ä]èµ¶P¶¶pŸ ââP¸6¸P|PT·c·QEìQìQ›·¾·]eñsñ]›·¾·^eñsñ^›·Ø·^xìì^eñ³ñ^Ÿ·º·Pº·¾·pŸeñrñP˜¸®¸0Ÿ®¸ŸPظõ¸SÈÕSæ¸õ¸PÈÔP¹¹T–´T´µ  5*ÎAÚAT¹¹R¹,¹‘à{–µRµÈ‘à{ÎAÚARÚAíA‘à{¹¹P–šPšµrÎAÚArJ¹¬¹0Ÿ¾ Ü 0Ÿáþ0Ÿõ20ŸJ¹¬¹^¾ Ü ^áþ^õ2^J¹¬¹V¾ Ü VáþVõ2V—¹š¹P𹬹TõþTþ2‘¸~Q¹¬¹\¾ Ü \áþ\õ2\Šº–ºUŸû¥ûU›ºS»VGeV2RV#yVt»€»U,2U…»Ñ»SûŸûS8GS $S×»ì»P컼S,þ9þS⻼~ÿŸ,þ9þ~ÿŸ4W4S#8n8Sn8:‘€| 4M4_#8W8_¬®!‘°~Í!Ö!TÖ!4#‘°~ã#'$‘°~×%C&‘°~ö'6(‘°~é)W+‘°~,B,‘°~ú-p.‘°~#0c0‘°~22‘°~ * Qú- .Q ..‘à| W _,7,_ú-._!K!^ã#$^$×%‘€|×%æ%^!F!_ã#$_×%æ%_1½н\ÿ?=@\=@¹AX3q\qÂX;½J½Xe¾â¾\-W\WºVn¾â¾V-0V5¿¹¿\6 D XD “ \“ Ó X÷ ! \!  X£ Æ \?¿I¿X£ ¶ X<À†À\†Ó\Ó*[*C\FÀPÀ[*3[0Á˜Á\üôü\ôüaþVaþ‰þ\9Á˜ÁVüÍüVaþ‰þVÂ’Â\÷,÷\,÷~øX¢ø»ø\±+Ä+XÄ+,\,K-XÂ"ÂX¢ø°øXÃÃ\þ#($\($s%VÃÃVþ#$VãÃxÄ\xĆÄX†Ä‘Ä\q ° \° ä!X"2"\2"x#XíÃÄXjô‹ôPßõëõPxÉ«É ÿŸ«ÉºÉ0ŸºÉùÉ1ŸBZ[1Ÿ[Þ[SÞ[÷[Qý\]0Ÿ]]S#^?_ ÿŸÒÉàÉ2Ÿ_[q[2ŸÒÉßÉP_[k[P¿[Þ[SÞ[÷[Q?_„_]§òÄò]Äò!óX!ó,ô‘Ø~w>«?X«?¶@‘Ø~C_~_Q§ò!óQw>Ž?QŽ?«?xó!óQùÉàΑÀ}ø%‘À}W4‘4‘À}›5Õ5‘À}ß67‘À}:G:‘À}S;‹;‘À}ÑE F‘À}GOG‘À}UH¬H‘À}»I J‘À}KhK‘À}wLÃL‘À}ÒM%N‘À}4O‡O‘À}–PéP‘À}øQCR‘À}RSjS‘À}wT—T‘À}žU¹U‘À}ÇVçV‘À}ðW X‘À}Y1Y‘À}$ÊÜÊSžUÀUSÇVéVSðWXSY;YSËØÎ‘È}ø‘È}W4‰4‘È}›5Í5‘È}ß67‘È}:<:‘È}S;€;‘È}ÑEF‘È}GGG‘È}UH¤H‘È}»IJ‘È}K`K‘È}wL»L‘È}ÒMN‘È}4OO‘È}–PáP‘È}øQ;R‘È}FËÍΑÐ}ø‘Ð}W44‘Ð}›5Ã5‘Ð}ß67‘Ð}:4:‘Ð}S;x;‘Ð}ÑEùE‘Ð}G=G‘Ð}UH—H‘Ð}»IõI‘Ð}KSK‘Ð}wL®L‘Ð}ÒMN‘Ð}4OrO‘Ð}–PÔP‘Ð}øQ.R‘Ð}”ÍÅΑ¸}W4r4‘¸}›5¶5‘¸}ß6ÿ6‘¸}:':‘¸}S;k;‘¸}ÑEñE‘¸}G5G‘¸}åÍúÍ3Ÿ:S;3ŸåÍúÍ‘è{:S;‘è{åÍúÍS:ƒ:Sƒ:S;‘¸}òÍúÍP::Pø_ `P `CaVˆåhæVŒææVKç.éV÷êáìVáì÷ìP÷ì#íV#í-î]Rï^ðP^ðtðVtð~ñ]ü_5`Qáì,íQRïjðQjðtðvtð}ð}í,íQWð~ñ2ŸæKçV.é÷êV¦æ¿æX¶àQá\lãŠã\Šã{ä[{ä—ä\—äˆå[¿àÓà["b†e‘€|¼ÎÏ‘€|YÐБ€|¼ÐÑ‘€|†Ñ–Ñ‘€|›ÑÒ‘€|´ÒtÓ‘€|{ÓqÔ‘€|ÕmÕ‘€|ÖÏÖ‘€|Ö֥ב€|ª×ªÚ‘€|¯ÚÛ‘€|¢Û{Ü‘€|&ÝÞ‘€|Þß‘€| ß—ß‘€|Oboh‘¨|žÄ¯Ä‘¨|×Å[Æ‘¨|zÆ—Æ‘¨|œÆÇ‘¨|ǜǑ¨|»Ç4È‘¨|9È·È‘¨|ÖÈ`É‘¨|ÉÊ‘¨|<ÊÕÊ‘¨|ÚÊŠË‘¨|©ËQÌ‘¨|p̃̑¨|:ÍúÍ‘¨|¼ÎsÏ‘¨|’Ï Ï‘¨|YÐgÑ‘¨|†ÑôÑ‘¨|´ÒWÓ‘¨|{ÓTÔ‘¨|ÕNÕ‘¨|Ö²Ö‘¨|Ö֋ב¨|ª×YØ‘¨|^Ø Ù‘¨|ÙÄÙ‘¨|ÉÙÚ‘¨|¯ÚƒÛ‘¨|¢ÛIÜ‘¨|&ÝúÝ‘¨|ÞíÞ‘¨| ßHß‘¨|j߀ߑ¨|c:cS:c=g‘ |ÉÊ‘ |<ÊÍÊ‘ |Úʂˑ |©ËIÌ‘ |pÌ5Í‘ |:ͯΑ |¼ÎkÏ‘ |’ÏTБ |YÐ_Ñ‘ |†Ñ¯Ò‘ |´ÒOÓ‘ |{ÓÕ‘ |Õ Ö‘ |ÖªÖ‘ |Öփב |ª×QØ‘ |^ØÙ‘ |ټّ |ÉÙtÚ‘ |_c£dS´Ò¶ÒS{ÓÏÓSÏÓÔ‘Ø|ÖÖqבØ|ª×¬×S¬×?Ø‘Ø|^Ø`ØS`ØóØ‘Ø|ÙÙS٪ّØ|ŒÓ%Ô\%Ô3Ô[3ÔCÔ\ÖÖ\Ö²Ö[ÖÖåÖ\åÖª×[–ÓªÓ[e\e ÿŸ\e|e0Ÿ|ef1ŸpÌjÍ1ŸjÍãÍSãÍìÍQ¼ÎÃÎ0ŸÃÎ’Ï ÿŸ’ÏÁÏS eÛe2Ÿ:ÍeÍ2Ÿ eËeP:ÍPÍPÓÍìÍQYмÐV†ÑÝÑVÝÑ´Ò]CÔ}ÔV}ÔÕ]Õ7ÕV7ÕÖ]]ЬÐQ†ÑæÑQCÔ(ÕQ(Õ7Õv7Õ@Õ}ÈÑæÑQ-ÕÖ2ŸfpÌ ÿŸfpÌ0Ÿ‰ff[«fÚÊ ÿŸ«fÚÊ0ŸùfÖh‘€|žÄÌÄ‘€|×ÅuÆ‘€|zƶǑ€|»ÇÑÈ‘€|ÖÈzÉ‘€|“g9È ÿŸ“g9È0ŸiÄŠÄPAÅHÅP4ikSœŸ«ŸS6 S SРí Ss¡¡S¢(¢S¢΢ST£f£SSk¤}¤S¥1¥S·¥É¥S0¦M¦SÓ¦ó¦SlGm‘¨}z˜¡˜‘¨}\™ö™‘¨}š±š‘¨}Кl›‘¨}q› œ‘¨}+œ¶œ‘¨}»œ&‘¨}+œ‘¨}4lmVš+šVКÙšVᚆ›V+œÌVZl%m^\™–™^šQš^КÜš^áš+›^q›¬›^+œuœ^»œôœ^X˜p˜P¡˜¨˜P„pŒp]qNqX¡rÅrXEsJsXuœuXÖwówXxªxXz·w·\e¸ѸS.¹å¹S幺‘Ø~Ë»¼Si¸˸Q.¹³¹QË»ù»Qù»¼sŸ¹³¹Q¼¼3Ÿ¬Q­‘ˆ|.²:²‘ˆ|?²–²‘ˆ|ñ´Hµ‘ˆ|Mµ¿µ‘ˆ|ص7¶‘ˆ|0¬5®‘|K°˜°‘|Á°é°‘|9±„±‘|³±Ù±‘|.²f²‘|º²³‘|I³n³‘|¦³ȳ‘|´F´‘|ñ´µ‘|Mµ›µ‘|ص¶‘|X¬'¯‘˜|S¯¯‘˜|Ô¯°‘˜|K°z°‘˜|Á°h±‘˜|³±á±‘˜|.²m²‘˜|º²ö²‘˜|I³s³‘˜|¦³Ô³‘˜|´1´‘˜|z´¶´‘˜|ñ´µ‘˜|Mµ‹µ‘˜|ص¶‘˜|Ò°ó°Qó°þ°‘|Ú°/±Sz´¤´SXÏsÏsXϘÏ7ŸXϘÏ1ŸXÏ˜Ï [ª ŸXÏŸÏ7ŸXÏ˜Ï Sª ŸÀ@CAUCAWVóUŸWViVUiV~^óUŸ~^Ê^UÊ^•Š óUŸÀ@CATCAKASKAWVóTŸWV±VS±V~^óTŸ~^Ž_SŽ_?xóTŸ?x†xS†xSãóTŸSã”ãS”㕊 óTŸÀ@CAQCAWVóQŸWViVQiV~^óQŸ~^Î^QÎ^Ž_VŽ_?xóQŸ?x†xV†xSãóQŸSã™ãV™ã•Š óQŸç@[A0Ÿ[AbAPbA-CwWV±V0ŸùVüWw~^Ž_0ŸŽ_Xbw½w?xw?x†x0Ÿ†xÙxwé€_†wo†††w(6ŸwƬL¯wÃ@Ãw!ƽÆw³ËÜËwSã™ã0Ÿ’ù¡ùw°ù¹ùwÈ4í4wÚ:î:w¢BµBwçDEw XîXw»òòòw¿klwc`k`w´A2E‘€}WüW‘€}[`d`bd`Mb‘€}úpÉq‘€}†t®t‘€}†xÙx‘€}逴‚‘€}Ä‚€„‘€}„<†‘€}L†{†‘€}W‰o‰‘€}Ÿ‰Û‰‘€}ϙߙ‘€}(íž‘€}ýž+Ÿ‘€}ô¡®£‘€}Ú©ž«‘€}Ƭ<¯‘€}‰¯­¯‘€}j²“²‘€}£²H´‘€}X´eµ‘€}—‘€}ÄÂ;Ñ€}³ËÜË‘€}LÒÔ‘€}Ô±Õ‘€}iÝŽÝ‘€}1ç[ç‘€}’ù¡ù‘€}u Ž ‘€}Ni‘€}ÁБ€}Ú:î:‘€}¢BµB‘€}FMæN‘€}1RGR‘€}»òòò‘€},_?_‘€}’nn‘€}Zqúr‘€}c`k`‘€}ç@ªV0ŸªVËV ŸùVs`0Ÿs`x` Ÿx`xx0Ÿxx†x Ÿ†xŒã0ŸŒã™ã Ÿ™ãœÊ0Ÿ¡Ê•Š 0Ÿç@ªV0ŸªVËV 0¶ ŸùVs`0Ÿs`x` 0¶ Ÿx`xx0Ÿxx†x 0¶ Ÿ†xŒã0ŸŒã™ã 0¶ Ÿ™ãœÊ0Ÿ¡Ê•Š 0Ÿç@ªV0ŸªV±V ã#Ÿ±VÊVPùVs`0Ÿs`x` ß#Ÿx`xx0Ÿxx†x Ð#Ÿ†xŒã0ŸŒã™ã Ë#Ÿ™ãœÊ0Ÿ¡Ê•Š 0ŸÖ^õ^Põ^_}Ÿ_Ž_]?x†x]Sã™ã]WViV\„^Ž_\?x†x\Sã™ã\?xxx2Ÿ?xxx3Ÿ?xxx1Ÿ?xxx à¿ Ÿ?x†x3Ÿ?xxx Sª ŸSãŒã1ŸSãŒã3ŸSãŒã à¿ ŸSã™ã3ŸSãŒã Sª Ÿ[A€ASÞ_V`S½w?xS!ÆiÆS°ù¹ùSÈ4í4SçDES[AWV ÿŸùV~^ ÿŸŽ_?x ÿŸ†xSã ÿŸ™ãœÊ ÿŸ¡Ê•Š  ÿŸ[AWV0ŸùV~^0ŸŽ_?x0Ÿ†xSã0Ÿ™ãœÊ0Ÿ¡Ê•Š 0ŸqA€APë_7`sŸ½w?xsŸÐwÙwsðwxP x xpŸ xxP+x?xP`1`P'`7`0Ÿ!ÆiÆS°ù¹ùSÈ4í4SçDES0ÆNÆPÈ4Ý4PŽ_¬_Q!ÆGÆ0ŸGÆYÆ © ŸYÆzÆQ°ù¹ù0ŸÈ4Ö40ŸÖ4í4 ‘© ŸŽ_¾_S!ÆYÆ0ŸYÆfÆPfÆzÆV°ù¹ù0ŸÈ4è40Ÿè4í4PzƤÆS X’XS©XÊXSåXîXS¿klSzÆ½Æ ÿŸ XîX ÿŸ¿kl ÿŸzƽÆ0Ÿ XîX0Ÿ¿kl0Ÿ•ƤÆP,X|XsŸ©XîXsŸ¿kóksŸNXUXs”ŸUXZX_mX|XP¹XÊXPåXîXsÇkÚkPÖkók0ŸÍAWVóUŸW~^óUŸx`½wóUŸ†x!ÆóUŸ½ÆSãóUŸ™ã°ùóUŸ¹ùÈ4óUŸí4çDóUŸE XóUŸîXœÊóUŸ¡Ê¿kóUŸl•Š óUŸÍA2E‘€}WüW‘€}x`Mb‘€}úpÉq‘€}†t®t‘€}†xÙx‘€}逴‚‘€}Ä‚€„‘€}„<†‘€}L†{†‘€}W‰o‰‘€}Ÿ‰Û‰‘€}ϙߙ‘€}(íž‘€}ýž+Ÿ‘€}ô¡®£‘€}Ú©ž«‘€}Ƭ<¯‘€}‰¯­¯‘€}j²“²‘€}£²H´‘€}X´eµ‘€}—‘€}ÄÂ;Ñ€}³ËÜË‘€}LÒÔ‘€}Ô±Õ‘€}iÝŽÝ‘€}1ç[ç‘€}’ù¡ù‘€}u Ž ‘€}Ni‘€}ÁБ€}Ú:î:‘€}¢BµB‘€}FMæN‘€}1RGR‘€}»òòò‘€},_?_‘€}’nn‘€}Zqúr‘€}c`k`‘€}ÍA-CwWüWwx`Xbw†xÙxwé€_†wo†††w(6ŸwƬL¯wÃ@Ãw³ËÜËw’ù¡ùwÚ:î:w¢BµBw»òòòwc`k`w>BJBPJB2E‘yWüW‘yx`Xb‘yúpiw‘y†xÙx‘y逆†‘yW‰o‰‘yŸ‰ë‰‘yϙߙ‘y(̤‘yÚ©L¯‘y‰¯eµ‘y—‘yÄÂ@Ñy³ËÜË‘yLÒÁÕ‘yiÝNà‘y1çê‘y’ù¡ù‘yu i‘yÁБyÚ:î:‘y¢BµB‘yFMöN‘y1RGR‘y»òòò‘y,_?_‘y’n s‘yc`k`‘yÍAYB0ŸYB_BP_BšF‘èyWüW‘èyLY‘Y‘èyí]~^‘èyx`Xb0Ÿe½w‘èy†xÙx‘èy¿yÉyRÉyz‘èyŸz¯}‘èy逆†‘èyW‰o‰‘èyŸ‰ë‰‘èyϙߙ‘èy(̤‘èys§L¯‘èyZ¯{¯‘èy‰¯­µ‘èy—‘èyÄÂ@Ñèy³ËÜË‘èyLÒÁÕ‘èyiÝNà‘èy1çê‘èyiöÑö]’ù¡ù‘èy×6‘èyu i‘èyÁБèyÚ:î:‘èy¢BD‘èy=DØD‘èyFMöN‘èyR#R‘èy1RGR‘èyÚSðS]˜bÌb‘èy»òòò‘èyÚ-g>‘èyH>Q‘èy,_?_‘èy’n s‘èy\î‘èy@Ÿ¶Ÿ‘èyh¨ר‘èymμÎ^é푘y[í½í‘˜yÝí9yYîìy ïky‹ïÞyðXð‘˜yoðõð‘˜y ñxñ‘˜yñãñ‘˜yúñGò‘˜ygò»ò‘˜yÝò<ó‘˜y\ó»ó‘˜yÛó:ô‘˜yZô¼ô‘˜yÜô>õ‘˜y^õ’ù‘˜y²ùú‘˜y1úÊú‘˜yêúIû‘˜yiûÈû‘˜yèû8ü‘˜yOüóü‘˜y ý[ý‘˜yrýÀý‘˜y×ý%þ‘˜y<þ“þ‘˜yªþÿ‘˜yÿoÿ‘˜yÿèÿ‘˜ya‘˜yÔ‘˜yý\‘˜y|Þ‘˜yþ`‘˜y€â‘˜yd‘˜y„ø‘˜ym"q(^q(£(‘èy£(î(^î( )‘èy )*^*P*‘èyP*‹*^‹*Ê*‘èyÊ*+^+D+‘èyD+f+^f+¾+‘èy¾+ç+^ç+,‘èy,,^,À,‘èyÀ,æ,^æ,-‘èy-9-^9-o-‘èyo-•-^•-Ë-‘èyË-ý-^ý-*.‘èy*.\.^\.‰.‘èy‰.Ä.^Ä.ñ.‘èyñ. C> ‘èy`K &h ‘èy&h +h P+h ™h w™h Öj ‘èydl mm ‘èy$o Vq ‘èyÑq Sr ‘èys $s ‘èy2s Ts ‘èy-t •Š ‘èy„JwN_¶·éº_P¿§¿\½¿ð¿\¹‘¸y.D=D_O#O_ðSÿS_X X_îX-Y_‰b˜b_&h5h_îrýr_ u¾u_‰,‰_z’’_ë•–_a›p›_oµˆµ_æ· ¸_¡ºåº_¡Â°Â‘¸yjŃÅ_;ÐJÐ_‡ÛñÛ_ÜJÜ_bá¨á_ãæç_zé§é‘¸y§é¶é_êMê_õ4õ_¯ö÷_>ûWû_µýÖý_k~_°Ñ_Ñò‘¸y¡´_Bj_Ó_l…_…‘¸y=_¦ð_— Ë _%:&‘¸yº&Û&‘¸yÛ&î&_|(¨(_6*I*_WV„W‘¸yX;Y‘¸y»Y [‘¸y[®\‘¸y.]O^‘¸y_,__?_`_’a¼a_6c^c_õd&e_²fËf_s8t‘¸y¸tàt_yv›v_4xOx_bxux_Ÿ}É}_-‡O‡_戉_¢Š·Š_erxr_‡r¨s‘¸y‰vÂw‘¨yÇwîw‘¨yky’y‘¨y {1{‘¨y1{X{S©|Î}‘¨yH~o~‘¨yo~–~S瑨yˆ¯‘¨y¯êS)ƒP„‘¨yE‡¢ˆ‘¸y§ˆЉ‘¸yPŠw‹‘¸y÷‹‘¸yžÅŽ‘¸yEl‘¸yì’‘¸y“’º“‘¸y:”c•‘¸yw˜Ò™‘ÀyיꚑÀy‹›žœ‘Ày?Tž‘Àyõž  ‘Ày« À¡‘Àya¢v£‘Ày¤,¥‘Àyͥ⦑Ày5øHø_Xøkø_T-è.‘¨z/ûü‘¨zÓü²ý‘¨ztþÈÿ‘¨zŠC‘¨z)‘¨z=‘¨zÿá ‘¨z£ … ‘¨zG F ‘¨zꑨz¬‹‘¨z&u5u_¿ÉçÉ_e „ \¶ Õ \€3 3 _€< “< _!> 4> ‘¸yzŽ”“‘ÐyÛÆvÈ‘Ðy¿ÉüÉ‘Ðy#Ð2БÐy™ã·ã‘Ðy*î9î‘ÐyÑðàð‘Ðyòö÷‘Ðy¡ù°ù‘Ðyÿ‘ÐyÎß‘Ðyï ‘Ðy¥µ‘Ðy‚ô‘ÐyÇ!Ö!‘ÐyM$\$‘Ðy ,y-‘Ðy?/O0‘Ðyí4ƒ6‘Ðy®7Ñ7‘Ðyà7í8‘ÐyÑ=a?‘ÐyD.D‘ÐyEEE‘Ðy“J L‘Ðy#OÍP‘Ðy1U¶V‘Ðy-Y/Z‘Ðyü[€]‘ÐyÁ_^a‘ÐyßkÐl‘Ðynùo‘Ðyq{þ|‘ÐyÁ€Ã‘Ðyƒƒžƒ‘ÐyæO‘‘Ðy{˜'š‘Ðyp›‘Ðyq­p®‘Ðy#°>°‘Ðy°Â?Ä‘ÐyJЯБÐy¶éê‘ÐyMê²ê‘Ðy~ — ‘Ðy%%‘ÐyâAB‘¸yæCçG‘¸y>VWV‘Ðy__‘Ðy‡}Ÿ}‘ÐyC\‘ÐyÝC‘¸yÒÞ‘¸y¯–—‘¸y——‘¸y’—ì—‘¸yñ—똑¸yð˜J™‘¸yO™©™‘¸y®™š‘¸y šjš‘¸yošÕš‘¸yÚšP›‘¸yU›Vœ‘¸y[œ¸œ‘¸y½œ-‘¸y2Œ‘¸y‘ñ‘¸yö_ž‘¸ydžÍž‘¸yÒž;Ÿ‘¸y¶Ÿ‰¡‘¸y˜¤ð¤‘¸yõ¤ ¥‘¸y¥¥ÿ¥‘¸y¦^¦‘¸yc¦½¦‘¸y¦§‘¸y$§Ч‘¸y§õ§‘¸yú§c¨‘¸yר|«‘¸yU»û‘¸yÈ»9¼‘¸y>¼±¼‘¸y¶¼)½‘¸y.½¡½‘¸y¦½¾‘¸y¾u¾‘¸yz¾ؾ‘¸yݾ›¿‘¸y ¿À‘¸yÀmÀ‘¸yrÀÙÀ‘¸yÞÀEÁ‘¸yJÁ³Á‘¸y¸Á˜Î‘¸y¼Î"Ï‘¸y'ÏÏ‘¸y•ÏjÕ‘¸yÿÕoÖ‘¸y€×ðב¸yõר‘¸y%ؕؑ¸yšØóØ‘¸yøØ¡Ù‘¸y¦ÙÚ‘¸yÚ‰Ú‘¸yŽÚêÚ‘¸yïÚKÛ‘¸yPÛ¬Û‘¸y±Û Ü‘¸yÜpÜ‘¸yuÜÓÜ‘¸yØÜ?Ý‘¸yDÝ´Ý‘¸y¹Ý)Þ‘¸y.Þ¡Þ‘¸y¦ÞÁᑸyÆá6⑸y;â¿â‘¸yÄâ4㑸y9ã©ã‘¸y®ã䑸y äžä‘¸y£ä呸y åu呸yzåç呸yìåy摸y~æî摸yóæc瑸yhçÛ瑸yàçP葸yUè÷쑸y[íØí‘¸yÝíTyYîy ï†ï‘¸y‹ïð‘¸yðjð‘¸yoðñ‘¸y ñŠñ‘¸yñõñ‘¸yúñbò‘¸ygòØò‘¸yÝòWó‘¸y\óÖó‘¸yÛóUô‘¸yZô×ô‘¸yÜôYõ‘¸y^õ+÷‘¸yrýÒý‘¸y×ý7þ‘¸y<þ¥þ‘¸yªþÿ‘¸yÿŠÿ‘¸yÿ‘¸y|‘¸yø‘¸yýw‘¸y|ù‘¸yþ{‘¸y€ý‘¸y‘¸y„‘¸y‘¸y„ô‘¸yùY‘¸y^à‘¸yå9‘¸y>⑸yç>‘¸yCš‘¸yŸÿ‘¸ym‘¸yrg ‘¸yl ç ‘¸yì 7‘¸y<¯‘¸y´C‘¸yH²‘¸y·d‘¸yiØ‘¸yÝD‘¸yI_‘¸ydË‘¸yÐ7‘¸y<š‘¸yŸì‘¸yñš‘¸yŸ‘¸yo‘¸ytÍ‘¸yÒ+‘¸y0’‘¸y—ù‘¸yþc‘¸yhБ¸yÕ?‘¸yD«‘¸y°‘¸y ‘¸yÇ(‘¸y-ƒ‘¸yˆì‘¸yñX‘¸y]Ä‘¸yÉ9 ‘¸y> ® ‘¸y³ &!‘¸y+!ž!‘¸y£!å"‘¸yQ5É5‘¸yÎ5Æ6‘¸y‹9Ù9‘¸yÞ9,:‘¸y1:ˆ:‘¸y:í:‘¸yò:U;‘¸yZ;Æ;‘¸yË;:<‘¸y?<·<‘¸y¼<,=‘¸y1=¤=‘¸y©=>‘¸y >m>‘¸yr>8?‘¸y=?—?‘¸yœ?@‘¸y@m@‘¸yr@Û@‘¸yà@IA‘¸yNA´A‘¸y¹A1B‘¸y6BŸB‘¸y¤BC‘¸y$CšC‘¸yŸCD‘¸y DgD‘¸ylDÉD‘¸yÎD+E‘¸y0EE‘¸y’EïE‘¸yôEQF‘¸yVF¶F‘¸y»F1G‘¸y6G“G‘¸y˜GõG‘¸yúGWH‘¸y\H¼H‘¸yÁH!I‘¸y&I†I‘¸y‹IôI‘¸yùIpJ‘¸yuJâJ‘¸yçJëK‘¸yðK]L‘¸ybL…M‘¸yŠMN‘¸y N‚N‘¸y‡NO‘¸y OmO‘¸yrOñO‘¸yöOmP‘¸yrPÜP‘¸yáPKQ‘¸yPQºQ‘¸y¿QjR‘¸yoRåR‘¸yêR^S‘¸ycSÉS‘¸yÎSŽT‘¸y“TðT‘¸yõTUU‘¸yZUÇU‘¸yÌU,V‘¸y1VüV‘¸yW^W‘¸ycWèW‘¸yíWSX‘¸yXXºX‘¸y¿XY‘¸yYoY‘¸ytY'Z‘¸y,Z®Z‘¸y³Z+[‘¸y0[–[‘¸y›[\‘¸yAg@h‘Ðyj#k‘Ðyãln‘Ðy¶oµp‘ÐyV6r>‘¸y3cWd‘¸y×dûe‘¸y{fg‘¸y h}i‘¸yýik‘¸ykŸl‘¸ymÈm‘¸y±n]o‘¸yFpdq‘¸yäqœr‘¸y…s©t‘¸y)uMv‘¸yÍvñw‘¸yqx¼{‘¸y<|`}‘¸yà}ò~‘¸yrk€‘¸yTi‚‘¸y邘ƒ‘¸y„9…‘¸y"†F‡‘¸yƇꈑ¸yj‰ŽŠ‘¸y‹2Œ‘¸y²ŒÖ‘¸yVŽŒ‘¸y 0‘‘¸y°‘Ô’‘¸yT“x”‘¸yø”–‘¸yœ–À—‘¸y@˜d™‘¸yä™›‘¸yˆ›¬œ‘¸y,Pž‘¸yОôŸ‘¸yt ,¡‘¸y¢9£‘¸y¹£ݤ‘¸y]¥¦‘¸y§%¨‘¸y¥¨É©‘¸yIªm«‘¸yí«­‘¸y‘­µ®‘¸y5¯Y°‘¸yÙ°²‘¸y²´³‘¸y4´fµ‘¸yæµ+·‘¸y«·߸‘¸yo¹¡º‘¸yÉÐüБˆy( ’ ‘ˆyá. à/ ‘Ðy¢3 Å4 ‘Ðyzމ—‘àyÛÆÈ‘ày¿É³Ë‘ày#Ð2БàyqàÜà‘ày™ãæ‘ày*î9î‘àyÑðàð‘àyiöÑö‘àyòö÷‘ày¡ù°ù‘àyÿ™‘àyÎß‘àyï ‘ày¥¾‘ày‚ý‘àyÇ!Ö!‘àyM$\$‘ày ,‚-‘ày?/X0‘àyí4Œ6‘ày®7ö8‘ày¼:Ú:‘àyÑ=j?‘àyD.D‘àyØDçD‘àyEEE‘ày“JL‘ày#OÖP‘àyÎSðS‘àyõTU‘ày1U¿V‘ày-Y8Z‘àyü[‰]‘àyÁ_ga‘àyßkÙl‘àynp‘àyq{}‘àyÁ€Ì‘àyƒƒžƒ‘ày9†+‡‘àyòˆ‰‘àyRÄŽ‘àyæX‘‘ày{˜0š‘àyp›‘ày:žìŸ‘àyë¤û¥‘ày•§L©‘ày—ªO¬‘àyq­y®‘ày#°>°‘àyº¿,Á‘àyN¡‘ày°ÂHÄ‘ày¡ÊRÌ‘àytÍÏ‘àyJÐgÒ‘ày‰Ó8Õ‘àyoÖ_בày¨Þ­ß‘àyGábá‘ày¶éê‘àyMê²ê‘àyËêçê‘ày~ — ‘ày%%‘àyâAêB‘¨}æCçG‘¨}>VWV‘ày__‘àyOxbx‘ày‡}Ÿ}‘àyC\‘àyî]ƒ‘ày„ †‘àyzމޑ¨}ŽŽùŽ‘¨}ÝH‘¨}Y㑨}¯–@Ÿ‘¨}¶Ÿh¨‘¨}ר,®‘¨}²³:´‘¨}r´Ó´‘¨}3µjÕ‘¨}ÿÕtÖ‘¨}€×Ø‘¨}%Øí‘¨}[í\‘¨}AgIh‘àyj,k‘àyãln‘ày¶o¾p‘àyV6r>‘Ày3c6d‘Ày×dÚe‘Ày{flg‘Ày h\i‘Àyýiîj‘Àyk~l‘Àym§m‘Ày±n‘øyD.D‘øyØDçD‘øyEEE‘øy“J)K‘øy#OµO‘øyÎSðS‘øyõTU‘øy1UÛU‘øy-Y˜Y‘øyü[¥\‘øyÁ_n`‘øyßk;l‘øyno‘øyq{|‘øyÁ€,‘øyƒƒžƒ‘øy9†‹†‘øyòˆ‰‘øyRà‘øyæt‘øy{˜™‘øyp›œ‘øy:žêž‘øyë¤]¥‘øy•§J¨‘øy—ªM«‘øyq­Ù­‘øy#°>°‘øyº¿HÀ‘øyN¡‘øy°Â\Ñøy¡ÊPË‘øytÍ5ΑøyJÐeÑ‘øy‰ÓTÔ‘øyoÖÁÖ‘øy¨Þß‘øyGábá‘øy¶éê‘øyMê²ê‘øyËêçê‘øy~ — ‘øy%%‘øyâAVC‘ø}æCçG‘ø}>VWV‘øy__‘øyOxbx‘øy‡}Ÿ}‘øyC\‘øyîy‚‘øy„'…‘øy ‘ø}–Ž‘ø}zŽùŽ‘ø}ÝH‘ø}Y\‘‘ø}¯–@Ÿ‘ø}¶Ÿh¨‘ø}ר믑ø}Ȱ±‘ø}«±jÕ‘ø}ÿÕtÖ‘ø}€×Ø‘ø}%Øí‘ø}[í\‘ø}Ag«g‘øyjŽj‘øyãlqm‘øy¶o p‘øyV6r>‘Ðy3cœd‘Ðy×d@f‘Ðy{fÒg‘Ðy hÂi‘ÐyýiTk‘Ðykäl‘Ðymõm‘Ðy±nŠo‘ÐyFp©q‘ÐyäqÉr‘Ðy…sît‘Ðy)u’v‘ÐyÍv6x‘Ðyqx|‘Ðy<|¥}‘Ðyà}7‘Ðyr˜€‘ÐyT®‚‘Ðyé‚Ń‘Ðy„f…‘Ðy"†‹‡‘ÐyƇ/‰‘Ðyj‰ÓŠ‘Ðy‹wŒ‘Ðy²ŒŽ‘ÐyVŽÑ‘Ðy u‘‘Ðy°‘“‘ÐyT“½”‘Ðyø”a–‘Ðyœ–˜‘Ðy@˜©™‘Ðyä™M›‘Ðyˆ›ñœ‘Ðy,•ž‘ÐyО9 ‘Ðyt Y¡‘Ðy¢~£‘Ðy¹£"¥‘Ðy]¥Ʀ‘Ðy§j¨‘Ðy¥¨ª‘ÐyIª²«‘Ðyí«V­‘Ðy‘­ú®‘Ðy5¯ž°‘ÐyÙ°U²‘Ðy²ù³‘Ðy4´«µ‘Ðyæµp·‘Ðy«·$¹‘Ðyo¹æº‘Ðywxey‘øyk{ö{‘øyü}Š~‘øyðÌ~Í‘øyÉÐ=Õ‘ zJÖáב zîØtÛ‘ z܌ޑ z™ß)â‘ zÊâaä‘ znå ç‘ zè~ê‘ zë8í‘ zEîÜï‘ zéðÐò‘ zÝótõ‘ zöø‘ z"ùÓú‘ zàûwý‘ z„þ ‘ z( ¿ ‘ zá. K/ ‘øy¢3 04 ‘øy’6 ®6 ‘øy0>‘À}£7r>‘ày3c¥d‘ày×dIf‘ày{fÛg‘ày hËi‘àyýi]k‘àykíl‘àymþm‘ày±n“o‘àyFp²q‘àyäqÒr‘ày…s÷t‘ày)u›v‘àyÍv?x‘àyqx |‘ày<|®}‘àyà}@‘àyr¡€‘àyT·‚‘àyé‚΃‘ày„o…‘ày"†”‡‘àyƇ8‰‘àyj‰ÜŠ‘ày‹€Œ‘ày²Œ$Ž‘àyVŽÚ‘ày ~‘‘ày°‘"“‘àyT“Æ”‘àyø”j–‘àyœ–˜‘ày@˜²™‘àyä™V›‘àyˆ›úœ‘ày,žž‘àyОB ‘àyt b¡‘ày¢‡£‘ày¹£+¥‘ày]¥Ϧ‘ày§s¨‘ày¥¨ª‘àyIª»«‘àyí«_­‘ày‘­¯‘ày5¯§°‘ày`K ¾K ‘À}ßK N ‘À}:N ÊN ‘À}-t Qu ‘À}Âu •Š ‘À}0>‘È}£7r>‘ðy3cÍc‘ðy×dqe‘ðy{fg‘ðy hóh‘ðyýi…j‘ðykl‘ðymLn‘ðy±náo‘ðyFpÚp‘ðyäq s‘ðy…st‘ðy)uÃu‘ðyÍvgw‘ðyqx2{‘ðy<|Ö|‘ðyà}h~‘ðyrðyTß‘ðyé‚„‘ðy„½…‘ðy"†¼†‘ðyƇ`ˆ‘ðyj‰Š‘ðy‹¨‹‘ðy²ŒL‘ðyVŽ‘ðy ¦‘ðy°‘J’‘ðyT“î“‘ðyø”’•‘ðyœ–6—‘ðy@˜Ú˜‘ðyä™~š‘ðyˆ›"œ‘ðy,Æ‘ðyОjŸ‘ðyt °¡‘ðy¢¯¢‘ðy¹£S¤‘ðy]¥÷¥‘ðy§›§‘ðy¥¨?©‘ðyIªãª‘ðyí«‡¬‘ðy‘­+®‘ðy5¯ϯ‘ðy`K ¾K ‘È}ßK N ‘È}:N ÊN ‘È}-t Qu ‘È}Âu •Š ‘È}0>‘Ø}£7r>‘€z3c d‘€z×d­e‘€z{f?g‘€z h/i‘€zýiÁj‘€zkQl‘€zmzm‘€z±no‘€zFpq‘€zäqLr‘€z…s[t‘€z)uÿu‘€zÍv£w‘€zqxn{‘€z<|}‘€zà}¤~‘€zr€‘€zT‚‘€zé‚Hƒ‘€z„é„‘€z"†ø†‘€zƇœˆ‘€zj‰@Š‘€z‹ä‹‘€z²Œˆ‘€zVŽ>‘€z â‘€z°‘†’‘€zT“*”‘€zø”Ε‘€zœ–r—‘€z@˜™‘€z䙺š‘€zˆ›^œ‘€z,ž‘€zО¦Ÿ‘€zt Ü ‘€z¢ë¢‘€z¹£¤‘€z]¥3¦‘€z§×§‘€z¥¨{©‘€zIª«‘€zí«ì‘€z‘­g®‘€z5¯ °‘€z`K ¾K ‘Ø}ßK N ‘Ø}:N ÊN ‘Ø}-t Qu ‘Ø}Âu •Š ‘Ø}2>‘à}-t Qu ‘à}Âu T‰ ‘à}2>‘è}-t Qu ‘è}Âu T‰ ‘è}2>‘€~-t Qu ‘€~Âu T‰ ‘€~GIfJ‘˜yYK…O‘˜y»]Í^‘˜yZ_½_‘˜yË_@`‘˜ye‹‘˜yÓE‘˜yäD‘˜yRx‘˜yÀ鑘y>ž‘˜y¬Ë‘˜yÙ3‘˜yAa‘˜y©Ï‘˜yz‘˜yˆë‘˜yùI‘˜yWU‘˜yc³‘˜yÁß‘˜yr‘˜y€Ó‘˜yá4‘˜yB•‘˜y !l!‘˜yz!š!‘˜y{Ö”‘˜y!•£•‘˜y¹•¿ž‘˜yòži¥‘˜yÞ¥4¦‘˜yg¦1§‘˜yd§Ƨ‘˜yù§F¨‘˜yy¨Û¨‘˜y©.©‘˜y£©ª‘˜yAª¬ª‘˜yߪô¬‘˜yi­¢­‘˜y ®Å®‘˜yø®¯‘˜y¯ž¯‘˜yþ¯]°‘˜y°ï°‘˜y"±±‘˜y´±²‘˜yI²´²‘˜yç²a³‘˜y”³º³‘˜y/´š´‘˜yÍ´8µ‘˜ykµèµ‘˜y¶†¶‘˜y¹¶6·‘˜yi·È·‘˜yû·]¸‘˜y¸ò¸‘˜y%¹E¹‘˜yº¹%º‘˜yXºú‘˜yöº»‘˜yˆ»Ù»‘˜y¼¹¼‘˜yì¼B½‘˜yu½×½‘˜y ¾*¾‘˜yœ¾ ¿‘˜yÓ¿ù¿‘˜ykÀÊÀ‘˜yýÀ"Á‘˜y}Á?‘˜yUÂÅ‘˜yۣјyîÃPÄ‘˜y^ÄÀÄ‘˜yÎÄóÄ‘˜y>Å[Å‘˜y£ÅýÅ‘˜y ƂƑ˜yÊÆ-Ç‘˜y;ÇtÇ‘˜yÉÇéÇ‘˜y1ÈæÈ‘˜yôÈWÉ‘˜y[ Æ ‘˜yÜ G ‘˜y] } ‘˜yë M ‘˜yy m ‘˜y™ ø ‘˜y$ 8 ‘˜y¦ ½ ‘˜y+! P! ‘˜yÁ! Ý! ‘˜y8" ¢" ‘˜y¸" L# ‘˜y¤# $ ‘˜y&$ W$ ‘˜y¬$ A% ‘˜yW% Ç% ‘˜yÝ% & ‘˜yZ& €& ‘˜yå& P' ‘˜ys' ™' ‘˜yè' ( ‘˜yf( Î( ‘˜yä( ) ‘˜yb) Í) ‘˜yã) N* ‘˜yd* Š* ‘˜yï* W+ ‘˜yz+  + ‘˜y, m, ‘˜y, ¶, ‘˜y- ƒ- ‘˜y¦- . ‘˜y1. ®. ‘˜yGIÖJ‘ø}YK…O‘ø}»]N`‘ø}eS‘ø}䣑ø}… “ ‘ø}˜ Ÿ!‘ø}{eÉ‘ø}[ á. ‘ø}âA¿C‘˜yæCçG‘˜yŒ™Œ‘˜yžŒÄŒ‘˜y ‘˜y–¼‘˜yŽgŽ‘˜yzŽ´Ž‘˜yÝ‘˜yY¿‘˜yÒI‘‘˜y¯–Õ–‘˜y—=—‘˜y’—Þ—‘˜yñ—ݘ‘˜yð˜<™‘˜yO™l™‘˜y®™Ë™‘˜y š*š‘˜yoš•š‘˜yÚš›‘˜yU›œ‘˜y[œªœ‘˜y½œÝœ‘˜y2O‘˜y‘±‘˜yöQž‘˜ydž¿ž‘˜yÒž-Ÿ‘˜y¶Ÿ ‘˜y¦P¦‘˜yc¦¯¦‘˜y¦ߦ‘˜y$§|§‘˜y§µ§‘˜yú§U¨‘˜yרĪ‘˜y¾>¾‘˜yz¾š¾‘˜yݾ¿‘˜y ¿Æ¿‘˜yÀ_À‘˜yrÀËÀ‘˜yÞÀ7Á‘˜yJÁ¥Á‘˜y¸Á˜Î‘˜y¼ÎâΑ˜y'ςϑ˜y•ÏnÒ‘˜y¹ÝÞ‘˜y.Þ“Þ‘˜y¦ÞíÞ‘˜yóæU瑘yhçÍ瑘yàç葘yUèå葘y„§‘˜yù"‘˜y^Ò‘˜yå+‘˜y>Ô‘˜yç0‘˜yCZ‘˜yŸ¿‘˜y_‘˜yrY ‘˜yl Ù ‘˜yì þ ‘˜y>   ‘˜y³ !‘˜y+!!‘˜y£!z$‘˜yG1]1‘˜y²1È1‘˜y2ž2‘˜y±2ý2‘˜y3e3‘˜yx3Ð3‘˜yã34‘˜yW4Á4‘˜yÔ4>5‘˜yQ5»5‘˜yÎ5¢6‘˜yÞ9ô9‘˜y1:z:‘˜y:ß:‘˜yò:G;‘˜yZ;¸;‘˜yË;ê;‘˜y?<©<‘˜y¼<ß<‘˜y1=–=‘˜y©=Î=‘˜y >0>‘˜yr>*?‘˜y=?Z?‘˜yœ?ô?‘˜y@_@‘˜yr@Í@‘˜yà@;A‘˜yNAtA‘˜y¹A#B‘˜y6B‘B‘˜y¤BC‘˜y$CŒC‘˜yŸCÅC‘˜y DYD‘˜ylD‰D‘˜yÎDE‘˜y0EME‘˜y’E¯E‘˜yôEF‘˜yVFvF‘˜y»FáF‘˜y6GSG‘˜y˜GµG‘˜yúGH‘˜y\H|H‘˜yÁHI‘˜y&IFI‘˜y‹IæI‘˜yùIJ‘˜yuJ’J‘˜yçJÝK‘˜yðK L‘˜ybLM‘˜yŠMèM‘˜y NN‘˜y‡N¡N‘˜y OO‘˜yrOŒO‘˜yöOP‘˜yrPŒP‘˜yáPûP‘˜yPQaQ‘˜y¿QR‘˜yoR×R‘˜yêRS‘˜ycS‰S‘˜yÎS€T‘˜y“T°T‘˜yõTU‘˜yZUwU‘˜yÌUV‘˜y1V¼V‘˜yWW‘˜ycWÚW‘˜yíWX‘˜yXX¬X‘˜y¿XÓX‘˜yY/Y‘˜ytYçY‘˜y,Z Z‘˜y³Z[‘˜y0[V[‘˜y›[ó[‘˜y0>‘¸}`K ¾K ‘¸}ßK N ‘¸}:N ÊN ‘¸}-t Qu ‘¸}Âu •Š ‘¸}2>‘ð}-t Qu ‘ð}Âu T‰ ‘ð}ÍA†B0Ÿ†BŒBPŒBšF‘°{WüW‘°{LY‘Y‘°{í]~^‘°{x`Xb0Ÿešw‘°{†xÙx‘°{¿yz‘°{Ÿz¯}‘°{逄0Ÿ„††‘°{W‰o‰‘°{Ÿ‰ë‰‘°{ϙߙ‘°{(̤‘°{s§L¯‘°{Z¯{¯‘°{‰¯­µ‘°{—‘°{ÄÂ@Ѱ{³ËÜË‘°{LÒÁÕ‘°{iÝNà‘°{ä½äS½äê‘°{iöÑöS’ù¡ù‘°{×6‘°{u i‘°{ÁБ°{Ú:î:‘°{¢BD‘°{=DØD‘°{FMöN‘°{R#R‘°{1RGR‘°{ÎSðSS˜bÌb‘°{oÖß×Sß×Ù‘°{»òòò‘°{,_?_‘°{’n s‘°{\î‘°{c`k`‘°{€/ƒ‘°{KÙÚSÚÜ‘°{™ßŒáSŒáÊâ‘°{ÍAnB0ŸnBtBPtB2E‘ÈyWüW‘Èyx`Xb0Ÿešw‘Èy†xÙx‘Èy¿yz‘ÈyŸz¯}‘Èyé€Ä‚0ŸÄ‚††‘ÈyW‰o‰‘ÈyŸ‰ë‰‘Èyϙߙ‘Èy(̤‘ÈyÚ©L¯‘Èy‰¯eµ‘Èy—‘ÈyÄÂ@ÑÈy³ËÜË‘ÈyLÒÁÕ‘ÈyiÝNà‘Èy1çê‘Èy’ù¡ù‘Èyu i‘ÈyÁБÈyÚ:î:‘Èy¢BµB‘ÈyFMöN‘Èy1RGR‘Èy»òòò‘Èy,_?_‘Èy’n s‘Èyc`k`‘ÈyÍAžB0ŸžB­BP­B2E‘¨{WüW‘¨{x`Xb0Ÿešw‘¨{†xÙx‘¨{¿yz‘¨{Ÿz¯}‘¨{é€L†0ŸL†††‘¨{W‰o‰‘¨{Ÿ‰ë‰‘¨{ϙߙ‘¨{(̤‘¨{Ú©L¯‘¨{‰¯eµ‘¨{—‘¨{ÄÂ@Ѩ{³ËÜË‘¨{LÒÁÕ‘¨{iÝNà‘¨{1çꑨ{’ù¡ù‘¨{u i‘¨{ÁБ¨{Ú:î:‘¨{¢BµB‘¨{FMöN‘¨{1RGR‘¨{»òòò‘¨{,_?_‘¨{’n s‘¨{c`k`‘¨{ÍAšF0ŸšF4I‘à{LRVRPVRWV‘àyW~^0Ÿx`pc0Ÿeúp‘à{úpiw0Ÿiwšw‘à{†xÙx0Ÿ¿yz‘à{Ÿz¯}‘à{¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘à{Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘à{*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘à{Ç!f)0Ÿf)u)‘à{u),/0Ÿ,/?/‘à{?/20Ÿ2.2‘à{.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘à{ÎSÿS0ŸÿSõT‘à{õT X0ŸîX«^0Ÿ«^Á_‘à{Á_&h0Ÿ5h8i‘à{8i$q0Ÿ$qîr‘à{îrŠ‹0ŸŠ‹R‘à{R’0Ÿ¬’Õ“‘à{ë•a›0Ÿp›¡0Ÿ£ë¤‘à{ë¤nª0Ÿnª‰ª‘à{—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘à{>QÊR‘à{ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘à{~ø¯0Ÿ¯y‘à{S‘à{"è,‘àyè,<-‘à{Hì‘à{ìk‘àyM‘ày7Ð ‘ày!›"‘àyÍ"$‘àyÏ$e&‘ày—&-(‘ày_(ä)‘ày*þ+‘ày0,Y2‘àyà8h:‘àyš:"<‘àyT<m=‘ày>Ÿ?‘àyÑ?bA‘ày”A¶B‘àyWCëD‘àyE±F‘àyãFwH‘ày©H=J‘àyoJL‘ày5LËM‘àyýM$O‘àyÅONQ‘ày€QS‘ày9SúT‘ày,U¸V‘àyêVvX‘ày¨X4Z‘àyfZï[‘ày!\ð]‘ày"^Ä_‘àyö_‚a‘ày´a]c‘àycžd‘ày7eÓf‘àyg'h‘àyÀhLj‘ày~j l‘ày X> 0ŸX> A ‘à{A I 0ŸâI *J ‘à{Öj dl ‘à{mm $o ‘à{YB¿B0Ÿ¿B2E1Ÿ2EšF‘€yW~^0Ÿúpiw1Ÿ†xÙx0Ÿ¯}_†0Ÿ_†o†1Ÿo†††0ŸD‰W‰0ŸW‰o‰1Ÿo‰Ÿ‰0ŸŸ‰ë‰1Ÿë‰Ï™0ŸÏ™ß™1Ÿß™6Ÿ0Ÿô¡̤1ŸÌ¤s§0Ÿs§ͧ‘€yÚ©©«1ŸÆ¬‰¯0Ÿ‰¯—Â1Ÿ—ÂÄÂ0ŸÄÂÃ1ŸÃ!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–Ï2Ð0Ÿ2ÐÁÕ1ŸÁÕiÝ0ŸiÝNà1ŸNàSã0Ÿ™ã1ç0Ÿ1çê1Ÿê’ì0Ÿ*î°ù0Ÿ¹ùpü0Ÿpüÿ1Ÿÿ×0Ÿ×þ‘€y6u 0Ÿu i1ŸiÁ0ŸÁß1ŸÎ´!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BµB0ŸµBàB‘€yD.D0Ÿ.DØD1ŸØDçD0ŸEEE0ŸEEØG1ŸØGiJ0ŸiJ“J1Ÿ“J7M0Ÿ7M#O1Ÿ#OøQ0ŸøQGR1ŸÎSðS0ŸðSÿS1ŸõTU0ŸU1U1Ÿ1UáW0ŸáW X1ŸîX-Y1Ÿ-Y«^0ŸÁ_‰b0Ÿ‰b˜b1Ÿ˜b&h0Ÿ8iGi1ŸGi$q0Ÿîr¾u1Ÿ¾u)~0Ÿ)~Á€1ŸÁ€žƒ0Ÿžƒ9†1Ÿ9†‰0Ÿ‰Š‹1ŸRz’0Ÿz’’1Ÿë•{˜1Ÿ{˜a›0Ÿp›¡0Ÿë¤nª0Ÿ—ª>°0Ÿ>°¡º1Ÿ°ºC½1ŸC½¡Â0Ÿ°ÂjÅ0ŸjʼnÊ1Ÿ‰ÊœÊ0Ÿ¡Ê;Ð0ŸJÐÙ0ŸÙ‡Û1ŸÜ¨Þ1Ÿ¨Þbá0Ÿqá¦æ1Ÿ¦æãæ0Ÿãæzé1Ÿ¶éê0ŸMêçê0Ÿçê‚í1Ÿ‚íð0Ÿð»ò1Ÿ»òòò0Ÿø+û1Ÿ+û>û0Ÿ>ûÖý1ŸÖýk0Ÿ ¾ 0ŸB…1ŸBR0ŸR1Ÿ0ŸÁ1Ÿ~ — 0ŸW"%1Ÿ%%0ŸÊRÙR0Ÿ>VWV0Ÿ__0Ÿ_?_1Ÿ²f­k1Ÿ­k¿k0Ÿl}n0Ÿ}n s1ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š1ŸN`c`1Ÿc`k`0Ÿk` e1ŸAger0Ÿerxr1Ÿ~ø¯1Ÿwx€0Ÿ€{1ŸðÌ„Ï0Ÿ„Ï[ 1Ÿá. ­1 0Ÿ3 ®6 0ŸC> X> 1ŸA I 1ŸÍAÍC0Ÿ2EšF‘¸{W~^0Ÿx`Xb0Ÿeúp‘¸{iwšw‘¸{†xÙx0Ÿ¿yz‘¸{Ÿz¯}‘¸{¯}Ï™0Ÿß™s§0Ÿs§Ú©‘¸{Ú©©«0ŸÆ¬‰¯0Ÿj²£²0Ÿ—ÂÄÂ0ŸçÂ!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–Ï2Ð0ŸÁÕiÝ0ŸNàSã0Ÿ™ã1ç0Ÿê’ì0Ÿ*î°ù0Ÿ¹ùpü0Ÿÿ×0Ÿ×6‘¸{6u 0ŸiÁ0ŸÎ´!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BµB0ŸµBD‘¸{D.D0ŸØDçD0ŸEEE0ŸØGiJ0Ÿ“J7M0Ÿ#OøQ0ŸÎSðS0ŸõTU0Ÿ1UáW0Ÿ-Y«^0ŸÁ_‰b0Ÿ˜b&h0ŸGi$q0Ÿ¾u)~0ŸÁ€žƒ0Ÿ9†‰0ŸRz’0Ÿ{˜a›0Ÿp›¡0Ÿë¤nª0Ÿ—ª>°0ŸC½¡Â0Ÿ°ÂjÅ0Ÿ‰ÊœÊ0Ÿ¡Ê;Ð0ŸJÐÙ0Ÿ¨Þbá0Ÿ¦æãæ0Ÿ¶éê0ŸMêçê0Ÿ‚íð0Ÿ»òòò0Ÿ+û>û0ŸÖýk0Ÿ ¾ 0ŸBR0Ÿ0Ÿ~ — 0Ÿ%%0ŸÊRÙR0Ÿ>VWV0Ÿ__0Ÿ­k¿k0Ÿl}n0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿc`k`0ŸAger0Ÿwx€0ŸðÌ„Ï0Ÿá. ­1 0Ÿ3 ®6 0ŸÍA2E0Ÿ2EšF‘ØyWLY0ŸLYªYSªY¶YP¶Yí]‘Øyí]~^Sx`pc0Ÿeúp‘Øyúpiw0Ÿiwšw‘Øy†xÙx0Ÿ¿yz‘ØyŸz¯}‘Øy¯}Ò}0ŸÒ}逑Øyé€D‰0ŸD‰L‰PL‰Q‰‘à~Q‰W‰‘ØyW‰‰0Ÿ‰Ÿ‰‘ØyŸ‰ë‰0Ÿë‰Ï™‘Øyϙߙ0Ÿß™(‘Øy(̤0ŸÌ¤Ú©‘ØyÚ©L¯0ŸL¯Z¯‘ØyZ¯‰¯S‰¯eµ0Ÿeµ¶µS¶µÂ‘Øy—Â0Ÿ—ÂÄ‘ØyÄÂ@Ã0Ÿ@Ã!Æ‘Øy½Æ³Ë‘Øy³ËÜË0ŸÜËùΑØyÏ-Ï‘Øy–ÏLÒ‘ØyLÒÁÕ0ŸÁÕiÝ‘ØyiÝNà0ŸNàSã‘Øy™ã1ç‘Øy1çê0Ÿê’ì‘Øy*î’ù‘Øy’ù¡ù0Ÿ¡ù°ù‘Øy¹ùu ‘Øyu i0ŸiÁ‘ØyÁÐ0ŸÐß‘Øyδ!‘ØyÇ!f)‘Øyu),/‘Øy?/2‘Øy.2È4‘Øyí4 :‘Øy¼:Ú:‘ØyÚ: ;0Ÿ ;Œ@‘Øy›@}B0Ÿ}B’B‘Øy¢BµB0ŸµB=D‘Øy=DØDSØDçD‘ØyEFM‘ØyFMöN0ŸöNR‘ØyR1RS1RGR0ŸÎSÿS‘ØyõT X‘ØyîX«^‘ØyÁ_˜b‘Øy˜bÌbSÌb&h‘Øy8i$q‘Øyîr¾u‘Øy¾uq{0Ÿq{Š‹‘ØyR’‘Øyë•a›‘Øyp›¡‘Øyë¤nª‘Øy—ª¡º‘Øy°º¡Â‘Øy°ÂœÊ‘Øy¡Ê;БØyJЇۑØyÜbá‘Øyqáz鑨y¶éê‘ØyMê»ò‘Øy»òòò0Ÿøk‘Øy ¾ ‘ØyB…‘ØyBÁ‘Øy~ — ‘ØyW"%‘ØyÊRÙR‘Øy>VWV‘Øy_,_‘Øy,_?_0Ÿ²f¿k‘Øyl’n‘Øy’n s0ŸOxbx‘Øy‡}Ÿ}‘ØyC\‘Øy\ôSô-‡‘Øy¢Š·Š‘ØyN`c`‘Øyc`k`0Ÿk` e‘ØyAgxr‘Øy~ø¯‘Øywx€‘Øy€‚S‚{‘ØyðÌ[ ‘Øyá. ­1 ‘Øy3 ®6 ‘ØyC> X> ‘ØyA I ‘ØyÍA2E0Ÿ2EšF‘à|WKX0ŸLY‘Y‘à|í]~^‘à|x`pc0Ÿeúp‘à|úpiw0Ÿiwšw‘à|†xÙx0Ÿ¿yz‘à|Ÿz¯}‘à|é€D‰0ŸW‰‰0ŸŸ‰ë‰0ŸºŽÂŽPÂŽ«˜‘Øyϙߙ0Ÿ(̤0Ÿs§Ú©‘à|Ú©L¯0ŸZ¯{¯‘à|‰¯eµ0Ÿeµ­µ‘ y|·Â‘à|—Â0ŸÄÂ@Ã0Ÿ³ËÜË0Ÿ#Ð2БØyLÒÁÕ0ŸiÝNà0ŸqàÜà‘Øy™ã1ç‘Øy1çê0Ÿ*î9î‘ØyÑðàð‘ØyiöÑö‘Øyòö÷‘Øy’ù¡ù0Ÿ¡ù°ù‘Øyÿ]‘Øy×6‘à|u i0ŸÁÐ0ŸÎß‘Øyï ‘Øy¥´!‘ØyÇ!Ö!‘ØyM$\$‘Øy ,,/‘Øy?/2‘Øyí4Ñ7‘Øyà7 :‘ØyÚ: ;0ŸÑ=Œ@‘Øy›@}B0Ÿ¢BµB0ŸµBD‘à|D.D‘Øy.D=D‘à|=DØD‘ yØDçD‘ØyEEE‘Øy“J7M‘ØyFMöN0ŸO#O‘à|#OøQ‘ØyR#R‘ y1RGR0ŸÎSðS‘ØyðSÿS‘à|õTU‘Øy"U1U‘à|1UáW‘ØyX X‘à|îX-Y‘à|-Y«^‘ØyÁ_‰b‘Øy‰bÌb‘à|n$q‘Øyîrýr‘à| u¾u‘à|q{)~‘ØyÁ€žƒ‘Øy‰Š‹‘à|Rz’‘Øyz’’‘à|ë•{˜‘à|{˜R›‘Øyp›:ž‘Øy뤕§‘Øyq­>°‘Øyoµ~º‘à|°ºC½‘à|º¿¡Â‘Øy°ÂjÅ‘ØyjÅáÇ‘à|“Í;БØyJЯБØy‰ÓZÖ‘ØyoÖÙ‘ØyÙ‡Û‘à|ܨޑà|¨Þbá‘Øyqáä‘à|ãæzé‘à|¶éê‘ØyMê²ê‘ØyËêçê‘Øy»òòò0Ÿ>ûÖý‘à|B…‘à|Á‘à|~ — ‘Øy%%‘Øy>VWV‘Øy__‘Øy_,_‘à|,_?_0Ÿ²f)i‘à|’n s0Ÿ‡}Ÿ}‘ØyC\‘Øy\î‘à|î-‡‘Øy¢Š·Š‘à|c`k`0Ÿk` e‘à|Ager‘Øyerxr‘à|~ø¯‘à|wx€‘Øy€:‚‘ yBƒ{‘à|ð̄ϑØy„Ï[ ‘à|á. ­1 ‘Øy¢3 ®6 ‘ØyA I ‘à|ÍA2E0ŸŸN®Np®NøNSøNWV‘Ø{WRY0Ÿx`pc0Ÿúpiw0Ÿ†xÙx0Ÿ¯}Ò}0Ÿé€D‰0ŸW‰‰0ŸŸ‰ë‰0Ÿ‘›P›¾‘è~¾‘¨y«˜‘Ø{ϙߙ0Ÿ(̤0ŸÚ©L¯0Ÿ‰¯eµ0ŸZ»5À‘ y—Â0ŸÄÂ@Ã0ŸÛÆÏÇ‘¨y¿É³Ë‘¨y³ËÜË0ŸÜËåË‘è~åË Ì‘¨y#Ð2Б¨yLÒÁÕ0ŸiÝNà0ŸqàÜà‘Ø{™ã¨ã‘Ø{¨ã·ã‘¨y·ã1ç‘Ø{1çê0Ÿ*î9yÑðàð‘¨yiöÑö‘Ø{òö÷‘Ø{’ù¡ù0Ÿ¡ù°ù‘Ø{ÿ$ÿ‘Ø{$ÿœ‘¨yu i0ŸÁÐ0ŸÎß‘Ø{ï ‘Ø{¥Á‘¨y‚´!‘Ø{Ç!Ö!‘Ø{M$\$‘Ø{ ,,/‘Ø{?/2‘Ø{í4Ï5‘¨y®7à7‘¨yà7 :‘Ø{¼:Ú:‘¨yÚ: ;0ŸÑ=Œ@‘Ø{›@}B0Ÿ¢BµB0ŸD.D‘Ø{ØDçD‘Ø{EEE‘Ø{“J7M‘Ø{FMöN0Ÿ#OP‘¨y1RGR0ŸÎSðS‘Ø{õTU‘Ø{1UáW‘Ø{-Y;[‘¨yü[\‘¨y\«^‘Ø{Á_‰b‘Ø{ßkŸm‘¨yn$q‘Ø{¾uq{0Ÿq{)~‘Ø{Á€žƒ‘Ø{9†=ˆ‘¨yòˆ‰‘¨yRz’‘Ø{•ë•‘Ø{{˜s™‘¨yp›:ž‘Ø{:ž0Ÿ‘¨yì¡£‘Ø{뤕§‘Ø{•§„¨‘¨y—ª“«‘¨yq­>°‘Ø{º¿¡Â‘Ø{°ÂjÅ‘Ø{¡ÊŠË‘¨yt͓͑¨y“Í;БØ{JЫё¨y‰ÓZÖ‘Ø{oÖÙ‘Ø{¨Þbá‘Ø{¶éê‘Ø{Mê²ê‘Ø{Ëêçê‘Ø{»òòò0Ÿô§ô‘Ø{ö¯ö‘Ø{n÷ø‘Ø{ê ‘Ø{ް‘Ø{Pr‘Ø{.P‘Ø{Ïñ‘Ø{Æ _ ‘Ø{Þ ‘Ø{¡‘Ø{ B‘Ø{ B‘Ø{\~ ‘Ø{~ — ‘¨y5!W"‘Ø{%%‘¨y˜%º&‘Ø{Z'|(‘Ø{)6*‘Ø{µ*×+‘Ø{xSšT‘Ø{UWV‘Ø{âVX‘Ø{™X»Y‘Ø{kZ[‘Ø{ \.]‘Ø{­]Ï^‘Ø{__‘Ø{,_?_0Ÿp`’a‘Ø{b6c‘Ø{Çcõd‘Ø{e²f‘Ø{’n s0Ÿ–s¸t‘Ø{Kuyv‘Ø{w4x‘Ø{Oxbx‘¨yáxz‘Ø{–zÄ{‘Ø{e|Ÿ}‘Ø{!~\‘Ø{î-‡‘Ø{¸‡æˆ‘Ø{€‰¢Š‘Ø{D‹rŒ‘Ø{c`k`0Ÿk`b‘ yc[c‘ yfer‘Ø{s(t‘Ø{´tÃtPÃtåt‘à~åt”ë‘Ø{ì5í‘Ø{Kîmï‘Ø{êï ñ‘Ø{‹ñ¼ò‘Ø{¼òËòSóÐô‘Ø{Rõtö‘Ø{÷5ø‘Ø{~øÜø‘ y!ûxû‘ y½ýþ‘ yY¿‘ yj‘ yÞw‘Ø{}? ‘Ø{_ ø ‘Ø{þ À ‘Ø{à y‘Ø{†5‘Ø{>‘Ø{"q‘Ø{Qrss‘Ø{õsu‘Ø{´uÖv‘Ø{Þw€‘Ø{Bƒ™ƒ‘ yÞ…D†‘ y‰ˆïˆ‘ y4‹‹‹‘ yÐ'Ž‘ yl{‘ yºÉ¿É‘Ø{÷ʹˑØ{ÆÌáÌ‘Ø{ð̄ϑØ{„Ï Ô‘ yJÖ Ö‘ yîØ7Ú‘ yÜXÝ‘ y™ßà‘ yàÙá‘ yÊâ ã‘ ynåÊå‘ yè*ê‘ yëì‘ yEî›î‘ yéðñ‘ yÝó3ô‘ yöÖö‘ y"ùŸù‘ yàû6ü‘ y„þÚþ‘ y( ~ ‘ yÌ U ‘ y£  ‘ ye É ‘ y Á ‘ y¶  ‘ yf  ‘ yJ ® ‘ yü Q ‘ y  ‘ yá. ¯0 ‘¨yB2 d3 ‘Ø{¢3 ”5 ‘¨y’6 ®6 ‘Ø{=8 ÿ8 ‘Ø{ö9 ¸: ‘Ø{Ø; q< ‘Ø{ÿ< !> ‘Ø{ÏC ÞC ‘ yøH I ‘ yÍA2E0Ÿ2E4I‘À{%OÔP_ÔPWV‘À{WLY0ŸLYRYSRY‘Y‘À{í]~^‘À{x`pc0Ÿeúp‘À{úpiw0Ÿiwšw‘À{†xÙx0Ÿ¿yz‘À{Ÿz¯}‘À{¯}Ò}0Ÿé€D‰0ŸW‰‰0ŸŸ‰ë‰0ŸãíP펑Ð~Žv‘‘ðyv‘«˜‘À{ϙߙ0Ÿ(̤0Ÿs§Ú©‘À{Ú©L¯0ŸZ¯{¯‘À{‰¯eµ0Ÿeµ­µ‘À{¢»À‘¨y—Â0ŸÄÂ@Ã0ŸÛƕǑðy¿É³Ë‘ðy³ËÜË0ŸëËôË‘Ð~ôË Ì‘ðyùÎÏ‘À{#Ð2БðyLÒÁÕ0ŸiÝNà0ŸqàÜà‘À{™ã·ã‘ðy·ã1ç‘À{1çê0Ÿ’ì*î‘À{*î9î‘ðyÑðàð‘ðyiöÑö‘À{òö÷‘À{’ù¡ù0Ÿ¡ù°ù‘ðyÿb‘ðy×6‘À{u i0ŸÁÐ0ŸÎß‘ðyï ‘À{¥‡‘ðy‚Ï ‘ðy´!Ö!‘À{M$\$‘À{f)u)‘À{ ,?/‘À{?/*1‘ðy2.2‘À{í4•5‘ðy®7à7‘ðyà7 :‘À{¼:Ú:‘ðyÚ: ;0ŸÑ=}>‘ðy›@}B0Ÿ¢BµB0ŸµBD‘À{D.D‘ðy=DçD‘À{EEE‘À{“J7M‘À{FMöN0Ÿ#OßO‘ðyR#R‘À{1RGR0ŸGRðS‘À{ÿSU‘À{1UáW‘À{-Y[‘ðyü[\‘ðy\Á_‘À{Á_z`‘ðy˜bÌb‘À{5h8i‘À{ßk«m‘ðynîr‘À{¾uq{0Ÿq{)~‘À{Á€ž‚‘ðyƒƒžƒ‘ðy9†ˆ‘ðyòˆ‰‘ðyŠ‹z’‘À{¬’ë•‘À{{˜9™‘ðyp›+œ‘ðy:žöž‘ðy£•§‘À{•§V¨‘ðynª‰ª‘À{—ªY«‘ðyq­>°‘À{º¿¡Â‘À{°ÂjÅ‘À{¡Ê\Ë‘ðyt͓͑ðy“Í;БÀ{JÐqÑ‘ðy‰ÓZÖ‘À{oÖÙ‘À{¨Þbá‘À{¶éê‘ðyMê²ê‘À{Ëêçê‘À{»òòò0Ÿ~ — ‘ðy%%‘ðy×+Ú-‘À{>QÊR‘À{>VWV‘À{__‘ðy,_?_0Ÿ’n s0ŸOxbx‘ðy‡}Ÿ}‘À{C\‘ðy\-‡‘À{c`k`0Ÿk`þa‘¨yc6c‘¨yAgi‘ðyjþk‘ðyãler‘À{xr‡r‘À{U…Ј_ЈPŠ‘À{PŠyŠ_yŠ÷‹‘À{÷‹ Œ_ Œž‘À{žÇ_ÇE‘À{En_nì‘À{ì‘_‘“’‘À{“’¼’_¼’:”‘À{:”c”_c”ã•‘À{㕚_š‹›‘À{‹›´›_´›?‘À{?h_hõž‘À{õžŸ_Ÿ« ‘À{« Ô _Ô a¢‘À{a¢Š¢_Š¢¤‘À{¤@¤_@¤Í¥‘À{Í¥ö¥_ö¥ƒ§‘À{ƒ§…¨_…¨ª‘À{ªâª_âªr¬‘À{r¬›¬_›¬&®‘À{&®]®_]®ê¯‘À{꯰_° ±‘À{ ±ɱ_ɱV³‘À{V³³_³ µ‘À{ µ5µ_5µ¶‘À{¶ë¶_ë¶x¸‘À{x¸¡¸_¡¸.º‘À{.ºSº_Sºä»‘À{ä» ¼_ ¼š½‘À{š½¿½_¿½P¿‘À{P¿y¿_y¿ùÀ‘À{ùÀ×Á_×ÁZÑÀ{ZÃÃ_ƒÃÅ‘À{Å=Å_=ŽƑÀ{½ÆæÆ_æÆdÈ‘À{dÈÈ_È Ê‘À{ Ê4Ê_4Ê´Ë‘À{´ËÝË_ÝË]Í‘À{]͆Í_†ÍÏ‘À{Ï/Ï_/ϯБÀ{¯ÐØÐ_ØÐXÒ‘À{XÒ}Ò_}ÒÔ‘À{Ô*Ô_*Ô­Õ‘À{²ôÐô_~ø·ø‘¨y!ûSû‘¨y½ýïý‘¨yYš‘¨yE‘¨y¯y‘À{S‘À{"<-‘À{H‘À{MT‘À{Tz_z‘À{G_GÒ‘À{Òö_öƒ‘À{ƒ©_©q‘À{wx/ƒ‘À{Bƒtƒ‘¨yÞ…†‘¨y‰ˆʈ‘¨y4‹f‹‘¨yÐŽ‘¨yl{‘¨yeɿɑÀ{çɄϑÀ{„ÏêÓ‘¨yJÖ„Ö‘¨yîØ.Ú‘¨yÜ9Ý‘¨y™ß·á‘¨yÊâ㑨ynå¯å‘¨yèꑨyëå둨yEîyéðsñ‘¨yÝóô‘¨yö»ö‘¨y"ù€ù‘¨yàûü‘¨y„þ¾þ‘¨y( b ‘¨yÌ 9 ‘¨y£ û ‘¨ye ® ‘¨y ° ‘¨y¶ ÿ ‘¨yf ê ‘¨yJ ’ ‘¨yü 6 ‘¨y û ‘¨yá. »0 ‘ðy­1 d3 ‘À{¢3  5 ‘ðy’6 €< ‘À{X> A ‘À{øH I ‘¨yâI *J ‘À{Öj dl ‘À{mm $o ‘À{ÍA2E0Ÿ2E4I‘È{OOÔP\ÔPWV‘È{WLY0ŸLYRYSRY‘Y‘È{í]~^‘È{x`pc0Ÿeúp‘È{úpiw0Ÿiwšw‘È{†xÙx0Ÿ¿yz‘È{Ÿz¯}‘È{¯}Ò}0Ÿé€D‰0ŸW‰‰0ŸŸ‰ë‰0Ÿ5Ž?ŽP?ŽbŽ‘¸~bŽÙ’‘ˆzÙ’«˜‘È{ϙߙ0Ÿ(̤0Ÿs§Ú©‘È{Ú©L¯0ŸZ¯{¯‘È{‰¯eµ0Ÿeµ­µ‘È{á»À_À‘È{—Â0ŸÄÂ@Ã0ŸÛÆÆÇ‘ˆz¿É³Ë‘ˆz³ËÜË0ŸúËÌ‘¸~Ì Ì‘ˆzùÎÏ‘È{#Ð2БˆzLÒÁÕ0ŸiÝNà0ŸqàÜà‘È{™ã·ã‘ˆz·ã1ç‘È{1çê0Ÿ’ì*î‘È{*î9zÑðàð‘ˆziöÑö‘È{òö÷‘ˆz’ù¡ù0Ÿ¡ù°ù‘ˆzÿ“‘ˆz×6‘È{u i0ŸÁÐ0ŸÎß‘ˆzïþ‘È{þ ‘ˆz¥¸‘ˆz‚û ‘ˆz´!Ç!‘È{Ç!Ö!‘ˆzM$\$‘ˆzf)u)‘È{ ,s.‘ˆz,/?/‘È{?/V1‘ˆz2.2‘È{í4Æ5‘ˆz®7ç9‘ˆz¼:Ú:‘ˆzÚ: ;0ŸÑ=º>‘ˆz›@}B0Ÿ¢BµB0ŸµBD‘È{D.D‘ˆz=DçD‘È{EE‘È{EEE‘ˆz“JmK‘ˆzFMöN0Ÿ#OP‘ˆzR#R‘È{1RGR0ŸGRðS‘È{ÿSU‘È{1UáW‘È{-Y2[‘ˆzü[\‘ˆz\Á_‘È{Á_·`‘ˆz˜bÌb‘È{5h8i‘È{ßk×m‘ˆznîr‘È{¾uq{0Ÿq{_|‘ˆzÁ€Ê‚‘ˆzƒƒžƒ‘ˆz9†ˆ‘ˆzòˆ‰‘ˆzŠ‹z’‘È{¬’ë•‘È{{˜j™‘ˆzp›hœ‘ˆz:ž<Ÿ‘ˆz£•§‘È{•§œ¨‘ˆznª‰ª‘È{—ªŸ«‘ˆzq­j¯‘ˆz#°>°‘ˆzº¿¡Â‘È{°Â Ã‘ˆz¡Ê¢Ë‘ˆzt͓͑ˆz“Í;БÈ{Jзёˆz‰ÓZÖ‘È{oÖÙ‘È{¨Þbá‘È{¶éꑈzMê²ê‘ˆzËêçê‘È{»òòò0Ÿ~ — ‘ˆz%%‘ˆz×+Ú-‘È{>QÊR‘È{>VWV‘ˆz__‘ˆz,_?_0Ÿ’n s0ŸOxbx‘ˆz‡}Ÿ}‘ˆzC\‘ˆz\-‡‘È{c`k`0Ÿk``_`c‘È{c-c_-c e‘È{AgGi‘ˆzj*l‘ˆzãlýn‘ˆz¶o¬q‘ˆzxr‡r‘È{z–„–P„–©–‘à~©–mš‘¨y‹›!œ‘¨y?ב¨yõžŸ‘¨y« C¡‘¨ya¢ù¢‘¨y¤¯¤‘¨yÍ¥e¦‘¨yƒ§ô¨‘¨yªT«‘¨yr¬­‘¨y&®Ì®‘¨yꯂ°‘¨y ±8²‘¨yV³î³‘¨y µ¤µ‘¨y¶Z·‘¨yx¸¹‘¨y.ºj»‘¨yä»|¼‘¨yš½Ö¾‘¨yÁôÐô\~ø®ø_®ø!û‘È{!ûJû_Jû½ý‘È{½ýæý_æýY‘È{Y‘_‘‘È{<_<y‘È{S‘È{"<-‘È{H‘È{MT‘È{T‘\‘‘È{^\^Ò‘È{Ò \ ƒ‘È{ƒÀ\Àq‘È{wx/ƒ‘È{Bƒkƒ_kƒÞ…‘È{Þ…†_†‰ˆ‘È{‰ˆÁˆ_Áˆ4‹‘È{4‹]‹_]‹Ð‘È{Ðù_ùl‘È{l{_eɿɑÈ{çɄϑÈ{„ÏÖÓ_ÖÓJÖ‘È{JÖpÖ_pÖîØ‘È{îØ Ú_ ÚÜ‘È{Ü%Ý_%ݙߑÈ{™ßUà_UàÊâ‘È{Êâðâ_ðânå‘È{nå›å_›åè‘È{è·è_·èë‘È{ëÑë_ÑëEî‘È{Eîkî_kîéð‘È{éð_ñ__ñÝó‘È{Ýóô_ôö‘È{ö§ö_§ö"ù‘È{"ùlù_lùàû‘È{àûü_ü„þ‘È{„þªþ_ªþ( ‘È{( N _N Ì ‘È{Ì % _% £ ‘È{£ ç _ç e ‘È{e š _š  ‘È{ N _N ¶ ‘È{¶ ë _ë f ‘È{f Ö _Ö J ‘È{J ~ _~ ü ‘È{ü " _"  ‘È{ ç _ç [ ‘È{á. ì0 ‘ˆz­1 d3 ‘È{¢3 Ñ5 ‘ˆz’6 €< ‘È{X> A ‘È{âI *J ‘È{Öj dl ‘È{mm $o ‘È{ÍA2E0Ÿ2EšF‘è|W~^0Ÿx`pc0Ÿeúp‘è|úpiw0Ÿiwšw‘è|†xÙx0Ÿ¿yz‘è|Ÿz¯}‘è|¯}s§0Ÿs§Ú©‘è|Ú©eµ0Ÿeµ­µ‘è|¿À^À‘è|Â!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–Ï2Ð0ŸLÒSã0Ÿ™ã’ì0Ÿ*î°ù0Ÿ¹ùpü0Ÿÿ×0Ÿ×6‘è|6Ð0ŸÎ´!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BµB0ŸµBD‘è|D.D0Ÿ=DØD‘è|ØDçD0ŸEEE0ŸØGiJ0Ÿ“J7M0ŸFMöN0Ÿ#OøQ0ŸR#R‘è|1RGR0ŸÎSðS0ŸõTU0Ÿ1UáW0Ÿ-Y«^0ŸÁ_‰b0Ÿ˜b&h0ŸGi$q0Ÿ¾u)~0ŸÁ€žƒ0Ÿ9†‰0ŸRz’0Ÿ{˜a›0Ÿp›¡0Ÿë¤nª0Ÿ—ª>°0ŸC½¡Â0Ÿ°ÂjÅ0Ÿ‰ÊœÊ0Ÿ¡Ê;Ð0ŸJÐÙ0Ÿ¨Þbá0Ÿ¦æãæ0Ÿ¶éê0ŸMêçê0Ÿ‚íð0Ÿ»òòò0Ÿ+û>û0ŸÖýk0Ÿ ¾ 0ŸBR0Ÿ0Ÿ~ — 0Ÿ%%0ŸÊRÙR0Ÿ>VWV0Ÿ__0Ÿ,_?_0Ÿ­k¿k0Ÿl}n0Ÿ’n s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿc`k`0ŸAger0Ÿwx€0Ÿ€/ƒ‘è|ðÌ„Ï0Ÿ„ÏÀÓ^ÀÓJÖ‘è|JÖ—Ö^—ÖîØ‘è|îØõÙ^õÙÜ‘è|ÜÝ^ݙߑè|™ß@à^@àÊâ‘è|Êâã^ãnå‘è|nå²å^²åè‘è|è¢è^¢èë‘è|ë»ë^»ëEî‘è|Eî’î^’îéð‘è|éð†ñ^†ñÝó‘è|Ýó*ô^*ôö‘è|ö¾ö^¾ö"ù‘è|"ùVù^Vùàû‘è|àû-ü^-ü„þ‘è|„þÑþ^Ñþ( ‘è|( u ^u Ì ‘è|Ì L ^L £ ‘è|£  ^ e ‘è|e ± ^±  ‘è| 9 ^9 ¶ ‘è|¶  ^ f ‘è|f À ^À J ‘è|J ¥ ^¥ ü ‘è|ü 9 ^9  ‘è| Ñ ^Ñ [ ‘è|á. ­1 0Ÿ3 ®6 0Ÿ2EšF‘ zLY‘Y‘ zí]~^‘ zs§å¨‘ zZ¯{¯‘ zeµ­µ‘ zס‘ zµBD‘ z=DØD‘ zR#R‘ z˜bÌb‘ z\ထ z€Ž‚‘ zÉÐ=Õ‘ zJÖáב zîØtÛ‘ z܌ޑ z™ß)â‘ zÊâaä‘ znå ç‘ zè~ê‘ zë8í‘ zEîÜï‘ zéðÐò‘ zÝótõ‘ zöø‘ z"ùÓú‘ zàûwý‘ z„þ ‘ z( ¿ ‘ zÍA2E0Ÿ2EšF‘ø|WLY0ŸLYRYSRY‘Y‘ø|í]~^‘ø|x`pc0Ÿeúp‘ø|úpiw0Ÿiwšw‘ø|†xÙx0Ÿ¿yz‘ø|Ÿz¯}‘ø|¯}Ò}0Ÿé€D‰0ŸW‰‰0ŸŸ‰ë‰0ŸÏ™ß™0Ÿ(̤0Ÿs§Ú©‘ø|Ú©L¯0ŸZ¯{¯‘ø|‰¯eµ0Ÿeµ­µ‘ø|—Â0ŸÄÂ@Ã0Ÿ³ËÜË0ŸLÒÁÕ0ŸiÝNà0ŸÈã¨äV¨ä1ç‘ø|1çê0ŸiöÑöV’ù¡ù0Ÿ×6‘ø|u i0ŸÁÐ0ŸÚ: ;0Ÿ›@}B0Ÿ¢BµB0ŸµBD‘ø|=DØD‘ø|FMöN0ŸR#R‘ø|1RGR0ŸÎSðSVõTUV˜bÌb‘ø|¾uq{0ŸoÖÃÖVÃÖÙ‘ø|»òòò0Ÿ,_?_0Ÿ’n s0Ÿ\î‘ø|c`k`0Ÿ€/ƒ‘ø|ÿØâÙVâÙÜ‘ø|™ßlàVlàÊâ‘ø|ÍA2E0Ÿ2EšF‘Ð{WLY0ŸLYRYSRY‘Y‘Ð{í]~^‘Ð{x`pc0Ÿeúp‘Ð{úpiw0Ÿiwšw‘Ð{†xÙx0Ÿ¿yz‘Ð{Ÿz¯}‘Ð{¯}Ò}0Ÿé€D‰0ŸW‰‰0ŸŸ‰ë‰0ŸEOPOo‘à~oT–‘ yϙߙ0Ÿ(̤0Ÿs§Ú©‘Ð{Ú©L¯0ŸZ¯{¯‘Ð{‰¯—Â0ŸÄÂ@Ã0ŸÛÆÇ‘ y¿É³Ë‘ y³ËÜË0ŸÜË Ì‘ y ÌÌ‘à~ÌÌ‘ y#Ð2Б y2ÐÁÕ0ŸiÝNà0ŸqàÜà‘ y™ãçä‘ y1çê0Ÿ*î9î‘ yÑðàð‘ yiöÑö‘ yòö÷‘ y’ù¡ù0Ÿ¡ù°ù‘ ypüÿ0ŸÿV‘ y×6‘Ð{u i0ŸÁß0ŸÎß‘ yï ‘ y¥{‘ y‚à ‘ yÇ!Ö!‘ yM$\$‘ y ,C.‘ y?/1‘ yí45‘ y®7·9‘ y¼:Ú:‘ yÚ: ;0ŸÑ= >‘ y›@}B0Ÿ¢BµB0ŸµBD‘Ð{D.D‘ y.DØD0ŸØDçD‘ yEEE‘ yEEØG0ŸiJ“J0Ÿ“JÆJ‘ y7M#O0Ÿ#O^O‘ yøQGR0ŸÎSðS‘ yðSÿS0ŸõTU‘ yU1U0Ÿ1U€U‘ yáW X0ŸîX-Y0Ÿ-YõZ‘ yü[J\‘ yÁ_`‘ y‰b˜b0Ÿ˜bÌb‘Ð{8iGi0Ÿßk–m‘ ynÃn‘ yîrq{0Ÿq{¸{‘ y)~Á€0ŸÁ€’‚‘ yƒƒžƒ‘ yžƒ9†0Ÿ9†Û‡‘ yòˆ‰‘ y‰Š‹0ŸR…‘ yæ‘ yz’’0Ÿë•{˜0Ÿ{˜¸˜‘ yp›¹›‘ y:ž„ž‘ y뤬¦‘ y•§ç§‘ y—ªêª‘ yq­:¯‘ y#°>°‘ y>°¡º0Ÿ°ºC½0Ÿº¿í¿‘ yN¡‘ y°Âù‘ yjʼnÊ0Ÿ¡ÊíÊ‘ ytÍÚÍ‘ yJÐÿБ y‰ÓÔ‘ yoÖ'Ø‘ yÙ‡Û0ŸÜ¨Þ0Ÿ¨Þ^à‘ yGábá‘ yqá¦æ0Ÿãæzé0Ÿ¶éê‘ yMê²ê‘ yËêçê‘ yçê‚í0Ÿðòò0Ÿø+û0Ÿ>ûÖý0ŸB…0ŸR0ŸÁ0Ÿ~ — ‘ yW"%0Ÿ%%‘ y>VWV‘ y__‘ y_?_0Ÿ²f­k0Ÿ}n s0ŸOxbx‘ y‡}Ÿ}‘ yC\‘ y\î‘Ð{î!‚‘ y„Ö„‘ y¢Š·Š0ŸN` e0ŸAgi‘ yjòk‘ yãlÍn‘ y¶o|q‘ yerxr0Ÿ~ø¯0Ÿwxy‘ yk{ž{‘ yü}/~‘ y€{0ŸðÌ#Í‘ y„Ï[ 0Ÿá. ¦0 ‘ y¢3 ‹5 ‘ y’6 ®6 ‘ yC> X> 0ŸA I 0ŸÍA2E0Ÿ2EšF‘ð|WLY0ŸLYRYSRY‘Y‘ð|í]~^‘ð|x`pc0Ÿeúp‘ð|úpiw0Ÿiwšw‘ð|†xÙx0Ÿ¿yz‘ð|Ÿz¯}‘ð|¯}Ò}0Ÿé€D‰0ŸW‰‰0ŸŸ‰ë‰0ŸÏ™ß™0Ÿ(̤0Ÿs§Ú©‘ð|Ú©L¯0ŸZ¯{¯‘ð|‰¯—Â0ŸÄÂ@Ã0ŸÙÉìÉPìɳË^³ËÜË0Ÿ2ÐÁÕ0ŸiÝNà0Ÿ1çê0Ÿ’ù¡ù0Ÿpüÿ0Ÿ×6‘ð|u i0ŸÁß0ŸÑ7à7^¼:Ú:^Ú: ;0Ÿ›@}B0Ÿ¢BµB0ŸµBD‘ð|.DØD0ŸEEØG0ŸiJ“J0Ÿ7M#O0ŸøQGR0ŸðSÿS0ŸU1U0ŸáW X0ŸîX-Y0Ÿ‰b˜b0Ÿ˜bÌb‘ð|8iGi0Ÿîrq{0Ÿ)~Á€0Ÿžƒ9†0Ÿ9†^†^^†òˆ‘ð|òˆ‰^‰Š‹0Ÿz’’0Ÿë•{˜0Ÿ:ž£ž^£ž¡‘ð|•§ê§^ê§nª‘ð|—ªöª^öªq­‘ð|>°¡º0Ÿ°ºC½0ŸjʼnÊ0Ÿ¡ÊðÊ^ðÊtÍ‘ð|tÍ“Í^¯ÐÑ^щӑð|Ù‡Û0ŸÜ¨Þ0Ÿqá¦æ0Ÿãæzé0Ÿçê‚í0Ÿðòò0Ÿø+û0Ÿ>ûÖý0ŸB…0ŸR0ŸÁ0ŸW"%0Ÿ_?_0Ÿ²f­k0Ÿ}n s0ŸOxbx^\î‘ð|¢Š·Š0ŸN` e0Ÿerxr0Ÿ~ø¯0Ÿ€{0Ÿ„Ï[ 0ŸC> X> 0ŸA I 0ŸÍAjE0ŸjEçFwW~^0Ÿx`pc0Ÿeúp‘ø{úpiw0Ÿiwšw‘ø{†xÙx0Ÿ¿yz‘ø{Ÿz¯}‘ø{¯}!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì¹ìw*î°ù0Ÿ¹ù10Ÿ6ß0ŸÎ´!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BµB0ŸµBDwDçD0ŸEGR0ŸÎSÿS0ŸõT X0ŸîX«^0ŸÁ_&h0Ÿ8i$q0ŸîrŠ‹0ŸR’0Ÿ"“*“P*“•wë•a›0Ÿp›¡0Ÿë¤nª0Ÿ—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+0,w>QÊRwÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡rw~ø¯0Ÿ¯Õww}w? V wø þ wÀ × wS“w5>wwx{0ŸeÉ¿ÉwçÉ÷Êw¹ËÈËwðÌ[ 0Ÿá. ­1 0Ÿ3 ®6 0Ÿ®6 =8 wÿ8 ö9 w¸: Ï; wq< €< wC> X> 0ŸA I 0ŸÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘°|úpiw0Ÿiwšw‘°|†xÙx0Ÿ¿yz‘°|Ÿz¯}‘°|¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0Ÿl•Š 0ŸÍAšF0ŸšF G‘¸z G3GP3GåH‘øxW~^0Ÿx`pc0Ÿeúp‘¸zúpiw0Ÿiwšw‘¸z†xÙx0Ÿ¿yz‘¸zŸz¯}‘¸z¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘øxÏ-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*z*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘¸zÇ!f)0Ÿf)u)‘øxu),/0Ÿ,/?/‘øx?/20Ÿ2.2‘øx.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRAS‘¸zÎSÿS0ŸÿSõT‘¸zõT X0ŸîX«^0Ÿ«^¦_‘øxÁ_&h0Ÿ5hi‘øx8i$q0Ÿ$qUr‘øxîrŠ‹0ŸŠ‹ý‹‘øxR’0Ÿë•a›0Ÿp›¡0Ÿ£7¤‘øxФ뤑øxë¤nª0Ÿ—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘¸zÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿ~ø¯0Ÿwx{0ŸðÌ[ 0Ÿá. ­1 0Ÿ3 ®6 0ŸC> X> 0ŸX> °> ‘øxü? ú@ ‘øxA I 0ŸâI *J ‘¸zÖj dl ‘¸zmm $o ‘¸zÍAšF0ŸšFeG‘°zeGxGPxGåH‘°yW~^0Ÿx`pc0Ÿeúp‘°zúpiw0Ÿiwšw‘°z†xÙx0Ÿ¿yz‘°zŸz¯}‘°z¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘°yÏ-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘°z*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘°zÇ!f)0Ÿf)u)‘°zu),/0Ÿ,/?/‘°y?/20Ÿ2.2‘°y.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRAS‘°zÎSÿS0ŸÿSõT‘°zõT X0ŸîX«^0Ÿ«^•_‘°yÁ_&h0Ÿ5h8i‘°z8i$q0Ÿ$qDr‘°yîrŠ‹0ŸŠ‹)‘°yR’0Ÿë•a›0Ÿp›¡0Ÿ£&¤‘°yФ뤑°yë¤nª0Ÿ—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘°zÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿ~ø¯0Ÿwx{0ŸðÌ[ 0Ÿá. ­1 0Ÿ3 ®6 0ŸC> X> 0ŸX> Ó? ‘°yü? é@ ‘°yA I 0ŸâI *J ‘°zÖj dl ‘°zmm $o ‘°zÍAšF0ŸJ#J‘ y#JWV‘È|W~^0Ÿx`pc0Ÿúpiw0Ÿ†xÙx0Ÿ¯}!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ*î°ù0Ÿ¹ùß0ŸßΑÈ|δ!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0ŸŒ@@P@›@‘È|›@’B0Ÿ’B¢B‘È|¢BçD0ŸEGR0ŸÎSÿS0ŸõT X0ŸîX«^0ŸÁ_&h0Ÿ&h5h‘È|8i$q0ŸîrŠ‹0ŸR’0Ÿ’¬’‘È|:”ë•‘È|ë•a›0Ÿa›p›‘È|p›¡0Ÿz¡£‘È|ë¤nª0Ÿ—ª¡º0Ÿ¡º°º‘È|°º¡Â0Ÿ¡Â°Â‘È|°ÂœÊ0Ÿ¡Ê;Ð0Ÿ;ÐJБÈ|JЇÛ0Ÿ‡ÛÜ‘È|Übá0Ÿbáqá‘È|qázé0Ÿzé¶é‘È|¶éê0ŸêMê‘È|Mêòò0Ÿòòø‘È|øk0Ÿk ‘È| ¾ 0Ÿ¾ B‘È|B…0Ÿ…B‘È|BÁ0ŸÁ~ ‘È|~ — 0Ÿ— W"‘È|W"%0Ÿ%×+‘È|ÊRÙR0ŸS>V‘È|>VWV0ŸWV_‘È|_?_0Ÿ?_²f‘È|²f¿k0Ÿl s0ŸsOx‘È|Oxbx0Ÿbx‡}‘È|‡}Ÿ}0ŸŸ}C‘È|C-‡0Ÿ-‡¢Š‘È|¢Š·Š0Ÿ·ŠŒ‘È|N` e0Ÿ eAg‘È|Agxr0Ÿ‡r~ø‘È|~ø¯0ŸÈw‘È|†? ‘È|I ø ‘È| À ‘È|Ê y‘È|†5‘È|G‘È|"<-‘È|H‘È|Mq‘È|ßqu‘È|&uÖv‘È|Äwwx‘È|wx{0Ÿ”ÉçÉ‘È| ʹˑÈ|¬ÌáÌ‘È|ðÌ[ 0Ÿá. ­1 0ŸÀ1 d3 ‘È|€3 3 ‘È|3 ®6 0ŸC7 ¸: ‘È|Â; q< ‘È|€< 4> ‘È|C> X> 0ŸA I 0ŸI âI ‘È|*J `K ‘È|ÍAšF0Ÿ:JOJPOJWV‘¸|W~^0Ÿx`pc0Ÿúpiw0Ÿ†xÙx0Ÿ¯}!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ*î°ù0Ÿ¹ùß0ŸßΑ¸|δ!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ’B—BP—BœB‘Ð~œB¢B‘¸|¢BçD0ŸEGR0ŸÎSÿS0ŸõT X0ŸîX«^0ŸÁ_&h0Ÿ&h5h‘¸|8i$q0ŸîrŠ‹0ŸR’0Ÿ’¬’‘¸|:”ë•‘¸|ë•a›0Ÿa›p›‘¸|p›¡0Ÿz¡£‘¸|ë¤nª0Ÿ—ª¡º0Ÿ¡º°º‘¸|°º¡Â0Ÿ¡Â°Â‘¸|°ÂœÊ0Ÿ¡Ê;Ð0Ÿ;ÐJБ¸|JЇÛ0Ÿ‡ÛÜ‘¸|Übá0Ÿbáqᑸ|qázé0Ÿzé¶é‘¸|¶éê0ŸêMꑸ|Mêòò0Ÿòòø‘¸|øk0Ÿk ‘¸| ¾ 0Ÿ¾ B‘¸|B…0Ÿ…B‘¸|BÁ0ŸÁ~ ‘¸|~ — 0Ÿ— W"‘¸|W"%0Ÿ%×+‘¸|ÊRÙR0ŸS>V‘¸|>VWV0ŸWV_‘¸|_?_0Ÿ?_²f‘¸|²f¿k0Ÿl s0ŸsOx‘¸|Oxbx0Ÿbx‡}‘¸|‡}Ÿ}0ŸŸ}C‘¸|C-‡0Ÿ-‡¢Š‘¸|¢Š·Š0Ÿ·ŠŒ‘¸|N` e0Ÿ eAg‘¸|Agxr0Ÿ‡r~ø‘¸|~ø¯0ŸÈw‘¸|†? ‘¸|I ø ‘¸| À ‘¸|Ê y‘¸|†5‘¸|G‘¸|"<-‘¸|H‘¸|Mq‘¸|ßqu‘¸|&uÖv‘¸|Äwwx‘¸|wx{0Ÿ”ÉçÉ‘¸| ʹˑ¸|¬ÌáÌ‘¸|ðÌ[ 0Ÿá. ­1 0ŸÀ1 d3 ‘¸|€3 3 ‘¸|3 ®6 0ŸC7 ¸: ‘¸|Â; q< ‘¸|€< 4> ‘¸|C> X> 0ŸA I 0ŸI âI ‘¸|*J `K ‘¸|ÍAšF0ŸšF4I‘€|€PÔPSÔPWV‘€|W~^0Ÿx`pc0Ÿeúp‘€|úpiw0Ÿiwšw‘€|†xÙx0Ÿ¿yz‘€|Ÿz¯}‘€|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘€|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘€|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘€|Ç!f)0Ÿf)u)‘€|u),/0Ÿ,/?/‘€|?/20Ÿ2.2‘€|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘€|ÎSÿS0ŸÿSõT‘€|õT X0ŸîX«^0Ÿ«^Á_‘€|Á_&h0Ÿ5h8i‘€|8i$q0Ÿ$qîr‘€|îrŠ‹0ŸŠ‹R‘€|R’0Ÿ¬’ë•‘€|ë•a›0Ÿp›¡0Ÿ£ë¤‘€|ë¤nª0Ÿnª‰ª‘€|—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘€|>QÊR‘€|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘€|þ§\¨S~ø¯0Ÿ¯y‘€|S‘€|"<-‘€|H‘€|MT‘€|7q‘€|wx{0Ÿeɿɑ€|çÉðÌ‘€|ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘€|3 ®6 0Ÿ®6 €< ‘€|C> X> 0ŸX> A ‘€|A I 0ŸâI *J ‘€|Öj dl ‘€|mm $o ‘€|ÍAšF0ŸšF4I‘è{W~^0Ÿx`pc0Ÿeúp‘è{úpiw0Ÿiwšw‘è{†xÙx0Ÿ¿yz‘è{Ÿz¯}‘è{¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘è{Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘è{*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘è{Ç!f)0Ÿf)u)‘è{u),/0Ÿ,/?/‘è{?/20Ÿ2.2‘è{.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘è{ÎSÿS0ŸÿSõT‘è{õT X0ŸîX«^0Ÿ«^Á_‘è{Á_&h0Ÿ5h8i‘è{8i$q0Ÿ$qîr‘è{îrŠ‹0ŸŠ‹R‘è{R’0Ÿ¬’ë•‘è{ë•a›0Ÿp›¡0Ÿ£ë¤‘è{ë¤nª0Ÿnª‰ª‘è{—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘è{>QÊR‘è{ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘è{~ø¯0Ÿ¯y‘è{S‘è{è,<-‘è{Hì‘è{wx{0Ÿeɿɑè{çÉðÌ‘è{ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘è{3 ®6 0Ÿ®6 €< ‘è{C> X> 0ŸX> A ‘è{A I 0ŸâI *J ‘è{Öj dl ‘è{mm $o ‘è{ÍAšF0ŸšF4I‘ð{W~^0Ÿx`pc0Ÿeúp‘ð{úpiw0Ÿiwšw‘ð{†xÙx0Ÿ¿yz‘ð{Ÿz¯}‘ð{¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘ð{Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘ð{*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘ð{Ç!f)0Ÿf)u)‘ð{u),/0Ÿ,/?/‘ð{?/20Ÿ2.2‘ð{.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘ð{ÎSÿS0ŸÿSõT‘ð{õT X0ŸîX«^0Ÿ«^Á_‘ð{Á_&h0Ÿ5h8i‘ð{8i$q0Ÿ$qîr‘ð{îrŠ‹0ŸŠ‹R‘ð{R’0Ÿ¬’ë•‘ð{ë•a›0Ÿp›¡0Ÿ£ë¤‘ð{ë¤nª0Ÿnª‰ª‘ð{—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘ð{>QÊR‘ð{ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘ð{~ø¯0Ÿ¯y‘ð{S‘ð{Ò'è,‘¨yè,<-‘ð{Hì‘ð{쑨yM ‘¨y7^‘¨y!)!‘¨yÍ".#‘¨yÏ$ö$‘¨y—&¾&‘¨y_(†(‘¨y* *‘¨yà89‘¨yš:Á:‘¨yT<”=‘¨y>5>‘¨yÑ?ø?‘¨y”AÝB‘¨yWC~C‘¨yEDE‘¨yãF G‘¨y©HÐH‘¨yoJ–J‘¨y5L\L‘¨yýMKO‘¨ywx{0Ÿeɿɑð{çÉðÌ‘ð{ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘ð{3 ®6 0Ÿ®6 €< ‘ð{C> X> 0ŸX> A ‘ð{A I 0ŸâI *J ‘ð{Öj dl ‘ð{mm $o ‘ð{ÍAšF0ŸšF4I‘ |W~^0Ÿx`pc0Ÿeúp‘ |úpiw0Ÿiwšw‘ |†xÙx0Ÿ¿yz‘ |Ÿz¯}‘ |¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘ |Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘ |*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘ |Ç!f)0Ÿf)u)‘ |u),/0Ÿ,/?/‘ |?/20Ÿ2.2‘ |.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘ |ÎSÿS0ŸÿSõT‘ |õT X0ŸîX«^0Ÿ«^Á_‘ |Á_&h0Ÿ5h8i‘ |8i$q0Ÿ$qîr‘ |îrŠ‹0ŸŠ‹R‘ |R’0Ÿ¬’ë•‘ |ë•a›0Ÿp›¡0Ÿ£ë¤‘ |ë¤nª0Ÿnª‰ª‘ |—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘ |>QÊR‘ |ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘ |~ø¯0Ÿ¯y‘ |S‘ |<-|9‘ ||9¢9^¢9r>‘ |3cH‘ |º‘ |ÿ‘ |M‘ |wx{0Ÿeɿɑ |çÉðÌ‘ |ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘ |3 ®6 0Ÿ®6 €< ‘ |C> X> 0ŸX> A ‘ |A I 0ŸâI *J ‘ |Öj dl ‘ |mm $o ‘ |ÍAšF0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿ†xÙx0Ÿ¯}!Æ0Ÿ½ÆùÎ0ŸÏ-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ*î°ù0Ÿ¹ùß0ŸÎ´!0ŸÇ!f)0Ÿu),/0Ÿ?/20Ÿ.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸÎSÿS0ŸõT X0ŸîX«^0ŸÁ_&h0Ÿ8i$q0ŸîrŠ‹0ŸR’0Ÿë•a›0Ÿp›¡0Ÿë¤nª0Ÿ—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0ŸÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿ~ø¯0Ÿ‰.­.‘È~­.‡;‘À|‡;­;V­;tþ‘À|öþŠ‘À|f‘À|)H‘À|kG ‘À|t M‘À|wx{0ŸðÌ[ 0Ÿá. ­1 0Ÿ3 ®6 0ŸC> X> 0ŸA I 0ŸÍAšF0ŸšF4I‘¨|W~^0Ÿx`pc0Ÿeúp‘¨|úpiw0Ÿiwšw‘¨|†xÙx0Ÿ¿yz‘¨|Ÿz¯}‘¨|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘¨|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘¨|Ç!f)0Ÿf)u)‘¨|u),/0Ÿ,/?/‘¨|?/20Ÿ2.2‘¨|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘¨|ÎSÿS0ŸÿSõT‘¨|õT X0ŸîX«^0Ÿ«^Á_‘¨|Á_&h0Ÿ5h8i‘¨|8i$q0Ÿ$qîr‘¨|îrŠ‹0ŸŠ‹R‘¨|R’0Ÿ¬’ë•‘¨|ë•a›0Ÿp›¡0Ÿ£ë¤‘¨|ë¤nª0Ÿnª‰ª‘¨|—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘¨|>QÊR‘¨|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘¨|~ø¯0Ÿ¯y‘¨|S‘¨|<-u1‘¨|u1A4‘ˆyA4F4PF4h4‘Ø~h4r>‘¨|3cGÅ‘¨|GŰőˆyÇ(Ì‘¨|(̑̑ˆyþÍgΑˆyÇÏ0БˆyÑùÑ‘ˆyYÓÂÓ‘ˆy"Õ‹Õ‘ˆyëÖH‘¨|M‘¨|wx{0Ÿeɿɑ¨|çÉðÌ‘¨|ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘¨|3 ®6 0Ÿ®6 €< ‘¨|C> X> 0ŸX> A ‘¨|A I 0ŸâI *J ‘¨|Öj dl ‘¨|mm $o ‘¨|ÍAšF0ŸšF4I‘˜|W~^0Ÿx`pc0Ÿeúp‘˜|úpiw0Ÿiwšw‘˜|†xÙx0Ÿ¿yz‘˜|Ÿz¯}‘˜|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘˜|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘˜|Ç!f)0Ÿf)u)‘˜|u),/0Ÿ,/?/‘˜|?/20Ÿ2.2‘˜|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘˜|ÎSÿS0ŸÿSõT‘˜|õT X0ŸîX«^0Ÿ«^Á_‘˜|Á_&h0Ÿ5h8i‘˜|8i$q0Ÿ$qîr‘˜|îrŠ‹0ŸŠ‹R‘˜|R’0Ÿ¬’ë•‘˜|ë•a›0Ÿp›¡0Ÿ£ë¤‘˜|ë¤nª0Ÿnª‰ª‘˜|—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘˜|>QÊR‘˜|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘˜|~ø¯0Ÿ¯y‘˜|S‘˜|<-Ã1‘˜|Ã1’4_’4œ4Pœ4¡4‘Ø~¡4r>‘˜|3c‹Ã‘˜|‹ÃÇÃ_ÇÃGÅ‘˜|GŃÅ_ƒÅ(Ì‘˜|(ÌdÌ_dÌþÍ‘˜|þÍ:Î_:ÎÇÏ‘˜|ÇÏÐ_ÐÑ‘˜|ÑÌÑ_ÌÑYÓ‘˜|YÓ•Ó_•Ó"Õ‘˜|"Õ^Õ_^ÕH‘˜|M‘˜|wx{0Ÿeɿɑ˜|çÉðÌ‘˜|ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘˜|3 ®6 0Ÿ®6 €< ‘˜|C> X> 0ŸX> A ‘˜|A I 0ŸâI *J ‘˜|Öj dl ‘˜|mm $o ‘˜|ÍAšF0ŸšF4I‘|W~^0Ÿx`pc0Ÿeúp‘|úpiw0Ÿiwšw‘|†xÙx0Ÿ¿yz‘|Ÿz¯}‘|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘|Ç!f)0Ÿf)u)‘|u),/0Ÿ,/?/‘|?/20Ÿ2.2‘|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘|ÎSÿS0ŸÿSõT‘|õT X0ŸîX«^0Ÿ«^Á_‘|Á_&h0Ÿ5h8i‘|8i$q0Ÿ$qîr‘|îrŠ‹0ŸŠ‹R‘|R’0Ÿ¬’ë•‘|ë•a›0Ÿp›¡0Ÿ£ë¤‘|ë¤nª0Ÿnª‰ª‘|—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘|>QÊR‘|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘|~ø¯0Ÿ¯y‘|S‘|<-2‘|2Ë4^Ë4Õ4PÕ4Ú4‘Ø~Ú4r>‘|3c×Á‘|×Á$Â^$‹Ñ|‹Ã×Ã^×ÃGÅ‘|GÅ“Å^“Å(Ì‘|(ÌtÌ^tÌþÍ‘|þÍJÎ^JÎÇÏ‘|ÇÏÐ^ÐÑ‘|ÑÜÑ^ÜÑYÓ‘|YÓ¥Ó^¥Ó"Õ‘|"ÕnÕ^nÕH‘|M‘|wx{0Ÿeɿɑ|çÉðÌ‘|ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘|3 ®6 0Ÿ®6 €< ‘|C> X> 0ŸX> A ‘|A I 0ŸâI *J ‘|Öj dl ‘|mm $o ‘|ÍAšF0ŸšF4I‘ˆ|W~^0Ÿx`pc0Ÿeúp‘ˆ|úpiw0Ÿiwšw‘ˆ|†xÙx0Ÿ¿yz‘ˆ|Ÿz¯}‘ˆ|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘ˆ|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘ˆ|Ç!f)0Ÿf)u)‘ˆ|u),/0Ÿ,/?/‘ˆ|?/20Ÿ2.2‘ˆ|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘ˆ|ÎSÿS0ŸÿSõT‘ˆ|õT X0ŸîX«^0Ÿ«^Á_‘ˆ|Á_&h0Ÿ5h8i‘ˆ|8i$q0Ÿ$qîr‘ˆ|îrŠ‹0ŸŠ‹R‘ˆ|R’0Ÿ¬’ë•‘ˆ|ë•a›0Ÿp›¡0Ÿ£ë¤‘ˆ|ë¤nª0Ÿnª‰ª‘ˆ|—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘ˆ|>QÊR‘ˆ|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘ˆ|~ø¯0Ÿ¯y‘ˆ|S‘ˆ|<-M2‘ˆ|M25]55P55‘Ø~5r>‘ˆ|3c+À‘ˆ|+ÀTÀ]TÀ×Á‘ˆ|×ÁýÁ]ýÁ‹Ã‘ˆ|‹Ã®Ã]®ÃGÅ‘ˆ|GÅjÅ]jÅ(Ì‘ˆ|(ÌKÌ]KÌþÍ‘ˆ|þÍ!Î]!ÎÇÏ‘ˆ|ÇÏêÏ]êÏÑ‘ˆ|ѳÑ]³ÑYÓ‘ˆ|YÓ|Ó]|Ó"Õ‘ˆ|"ÕEÕ]EÕH‘ˆ|M‘ˆ|wx{0Ÿeɿɑˆ|çÉðÌ‘ˆ|ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘ˆ|3 ®6 0Ÿ®6 €< ‘ˆ|C> X> 0ŸX> A ‘ˆ|A I 0ŸâI *J ‘ˆ|Öj dl ‘ˆ|mm $o ‘ˆ|ÍAšF0ŸšF4I‘Ø|W~^0Ÿx`pc0Ÿeúp‘Ø|úpiw0Ÿiwšw‘Ø|†xÙx0Ÿ¿yz‘Ø|Ÿz¯}‘Ø|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘Ø|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘Ø|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘Ø|Ç!f)0Ÿf)u)‘Ø|u),/0Ÿ,/?/‘Ø|?/20Ÿ2.2‘Ø|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRÎS‘Ø|ÎSÿS0ŸÿSõT‘Ø|õT X0ŸîX«^0Ÿ«^Á_‘Ø|Á_&h0Ÿ5h8i‘Ø|8i$q0Ÿ$qîr‘Ø|îrŠ‹0ŸŠ‹R‘Ø|R’0Ÿ¬’ë•‘Ø|ë•a›0Ÿp›¡0Ÿ£ë¤‘Ø|ë¤nª0Ÿnª‰ª‘Ø|—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘Ø|>QÊR‘Ø|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘Ø|~ø¯0Ÿ¯y‘Ø|S‘Ø|<-»3‘Ø|ì3r>‘Ø|3c(Ì‘Ø|þÍH‘Ø|M‘Ø|wx{0ŸeɿɑØ|çÉðÌ‘Ø|ðÌ[ 0Ÿá. ­1 0Ÿ­1 d3 ‘Ø|3 ®6 0Ÿ®6 €< ‘Ø|C> X> 0ŸX> A ‘Ø|A I 0ŸâI *J ‘Ø|Öj dl ‘Ø|mm $o ‘Ø|ÍAšF0ŸšFåH‘Ð|W~^0Ÿx`pc0Ÿeúp‘Ð|úpiw0Ÿiwšw‘Ð|†xÙx0Ÿ¿yz‘Ð|Ÿz¯}‘Ð|¯}!Æ0Ÿ½ÆùÎ0ŸùÎÏ‘Ð|Ï-Ï0Ÿ–ÏSã0Ÿ™ã’ì0Ÿ’ì*î‘Ð|*î°ù0Ÿ¹ùß0ŸÎ´!0Ÿ´!Ç!‘Ð|Ç!f)0Ÿf)u)‘Ð|u),/0Ÿ,/?/‘Ð|?/20Ÿ2.2‘Ð|.2È40Ÿí4 :0Ÿ¼:Œ@0Ÿ›@’B0Ÿ¢BçD0ŸEGR0ŸGRAS‘Ð|ÎSÿS0ŸÿSõT‘Ð|õT X0ŸîX«^0Ÿ«^Á_‘Ð|Á_&h0Ÿ5h8i‘Ð|8i$q0Ÿ$qîr‘Ð|îrŠ‹0ŸŠ‹R‘Ð|R’0Ÿ|“ë•‘Ð|ë•a›0Ÿp›¡0Ÿ£ë¤‘Ð|ë¤nª0Ÿ—ª¡º0Ÿ°º¡Â0Ÿ°ÂœÊ0Ÿ¡Ê;Ð0ŸJЇÛ0ŸÜbá0Ÿqázé0Ÿ¶éê0ŸMêòò0Ÿøk0Ÿ ¾ 0ŸB…0ŸBÁ0Ÿ~ — 0ŸW"%0Ÿ×+Ú-‘Ð|>QjQ‘Ð|pQ€QP€QÊR‘Ð|ÊRÙR0Ÿ>VWV0Ÿ_?_0Ÿ²f¿k0Ÿl s0ŸOxbx0Ÿ‡}Ÿ}0ŸC-‡0Ÿ¢Š·Š0ŸN` e0ŸAgxr0Ÿxr‡r‘Ð|~ø¯0Ÿ¯y‘Ð|Sb‘Ð|bfPfq‘Ð|5‘Ð|wx{0ŸeɿɑÐ|çɹˑÐ|ðÌ[ 0Ÿá. ­1 0Ÿ3 ®6 0Ÿ®6 €< ‘Ð|C> X> 0ŸX> A ‘Ð|A I 0ŸâI *J ‘Ð|Öj dl ‘Ð|mm $o ‘Ð|ÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘{úpiw0Ÿiwšw‘{†xÙx0Ÿ¿yz‘{Ÿz¯}‘{¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê‚,0Ÿ‚,Ú-‘{>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0ŸC> `K 0ŸÖj dl ‘{mm ˆm ‘{ˆm $o 0ŸšÃ˜Î‘ y¼ÎÏ‘ y'Ï]Ï‘ y•Ï1Ó‘ yPÛƒÛ‘ y±ÛäÛ‘ yÜEÜ‘ yuÜÎÜ‘ yØÜ8Ý‘ yDÝwÝ‘ y¹ÝìÝ‘ y.ÞaÞ‘ y¦Þ+ß‘ y ætæ‘ y~æ±æ‘ yóæ&ç‘ yhç›ç‘ yàçKè‘ yUè.ê‘ yZôô‘ yÜôõ‘ y^õèõ‘ yþ1‘ y€³‘ y5‘ y„É‘ yx‘ y„ï‘ yùM‘ y^£‘ yå‘ y>Ä‘ yç‘ yC‘‘ yŸó‘ y:‘ yr4 ‘ yl ´ ‘ yì ¾ ‘ y G‘ yc•‘ yÇ#‘ yˆç‘ yñ$‘ y]½‘ yÉü‘ y> q ‘ y³ æ ‘ y+!^!‘ y£!G#‘ yã3K4‘ yW44‘ yÔ4 5‘ yQ5‰5‘ yÎ5j6‘ y:¼:‘ yò:!;‘ yZ;’;‘ yË;3<‘ y?<w<‘ y¼<'=‘ y1=d=‘ y©=ù=‘ y >h>‘ yr>?‘ y=??‘ yœ?Ò?‘ y@=@‘ yr@¨@‘ yà@A‘ yNA­A‘ y¹AB‘ y6BlB‘ y¤BìB‘ y$CZC‘ yŸCþC‘ y D@D‘ ylDÀD‘ yÎDE‘ y0E„E‘ y’EæE‘ yôEHF‘ yVFªF‘ y»F,G‘ y6GŠG‘ y˜GìG‘ yúGNH‘ y\H°H‘ yÁH÷H‘ y&IzI‘ y‹IÁI‘ yùIWJ‘ yuJÙJ‘ yçJ±K‘ yðKTL‘ ybLpM‘ yŠMÂM‘ y NkN‘ y‡NòN‘ y OfO‘ yrOÚO‘ yöOVP‘ yrPÕP‘ yáPDQ‘ yPQ³Q‘ y¿QeR‘ yoR¢R‘ yêRUS‘ ycSÂS‘ yÎSdT‘ y“TçT‘ yõTIU‘ yZU¾U‘ yÌUV‘ y1VóV‘ yíWLX‘ yXX“X‘ yu—"ž_Tžž_òž‰¢_Þ¥ ¦_g¦ÿ¦_d§‘§_ù§¨_y¨¦¨_©P©_£©Щ_Aªnª_ߪI«_"±O±_´±á±_I²v²_ç²³_”³½³_/´\´_Í´ú´_kµªµ_¶H¶_¹¶ø¶_öº»_ˆ»Ÿ»_[ ˆ _Ü  _] Ÿ _ë  _y A _™ ¯ _$ O _¦ É _+! j! _Á! " _8" d" _¸" :# _¤# ´# _&$ 9$ _Z& ƒ& _å& ' _s' œ' _è' ( _f( |( _ä( ) _b) ) _ã) * _d* * _ï* + _z+ £+ _, , _, ¹, _- 1- _¦- ¼- _1. p. _ÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘˜{úpiw0Ÿiwšw‘˜{†xÙx0Ÿ¿yz‘˜{Ÿz¯}‘˜{¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¦,0Ÿ¦,«,P«,Ú-‘˜{>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0ŸC> `K 0ŸÖj k ‘˜{mm $o 0ŸÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘ zúpiw0Ÿiwšw‘ z†xÙx0Ÿ¿yz‘ zŸz¯}‘ z¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-.S..P.>‘ z>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> 8> P8> C> ‘ zC> `K 0Ÿ`K ¾K ‘ zßK S ‘ z S RS SRS …S ‘ z…S S PS ¾T ‘€}ËT U ‘€}cU xW ‘€}¬W øW ‘€}X X ‘€}œX ÐX ‘€}"Y VY ‘€}cY NZ ‘€}[Z ¸Z ‘€}ÅZ [ ‘€}&[ “[ ‘€} [ ú[ ‘€}\ 0j ‘ z0j Žj SŽj Öj ‘ zÖj dl 0Ÿdl mm ‘ zmm $o 0Ÿ$o Vq ‘ z-t Qu ‘ zÂu •Š ‘ zÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘°yúpiw0Ÿiwšw‘°y†xÙx0Ÿ¿yz‘°yŸz¯}‘°y¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-v3‘¨}v3>‘°y>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘¨}C> `K 0Ÿ`K ¾K ‘¨}ßK ‹W ‘¨}¬W Žj ‘¨}Öj dl 0Ÿdl mm ‘¨}mm $o 0Ÿ$o Vq ‘¨}-t Qu ‘°yÂu {{ ‘°yÃ{ „ ‘°y>„ O… ‘°ym… Ë… ‘°yË… •Š ‘¨}ÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘àyúpiw0Ÿiwšw‘ày†xÙx0Ÿ¿yz‘àyŸz¯}‘ày¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-ô4‘¨yô4>‘ày>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘¨yC> `K 0Ÿ`K ¾K ‘¨yßK iL ‘¨y–L ƒM ‘¨y°M N ‘¨yÊN ·O ‘¨yäO ÑP ‘¨yþP ëQ ‘¨yR ÞR ‘¨y S -U ‘¨ycU ‹W ‘¨y¬W ìX ‘¨y"Y ôZ ‘¨y&[ n[ ‘¨y [ a ‘¨ya fa ‘¨y}a ôa ‘¨y b ib ‘¨yb Íb ‘¨yäb Äc ‘¨yïc g ‘¨y,g j ‘¨y0j Žj ‘¨yÖj dl 0Ÿdl µl ‘¨yÚl Vm ‘¨ymm $o 0Ÿ$o Êo ‘¨yìo Wp ‘¨y|p Vq ‘¨y-t Qu ‘àyÂu {{ ‘àyÃ{ ’‚ ‘ày’‚ Þƒ ‘¨yñƒ $„ ‘¨y>„ X… ‘¨ym… ÿ‡ ‘¨yˆ hŠ ‘¨yÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘Ðyúpiw0Ÿiwšw‘Ðy†xÙx0Ÿ¿yz‘ÐyŸz¯}‘Ðy¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-†6‘ y†6>‘Ðy>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘ yC> `K 0Ÿ`K ¾K ‘ yßK ;L ‘ y–L UM ‘ y°M oN ‘ yÊN ‰O ‘ yäO £P ‘ yþP ½Q ‘ yR °R ‘ y S 6U ‘ ycU ‹W ‘ y¬W øX ‘ y"Y áZ ‘ y&[ W[ ‘ y [ ×` ‘ ya Na ‘ y}a Æa ‘ y b rb ‘ yb ²b ‘ yäb Íc ‘ yïc g ‘ y,g ôi ‘ y0j Žj ‘ yÖj dl 0Ÿdl “l ‘ yÚl 1m ‘ ymm $o 0Ÿ$o Öo ‘ yìo 5p ‘ y|p Vq ‘ y-t Qu ‘ÐyÂu {{ ‘ÐyÃ{ ý~ ‘Ðyý~ _ ‘ yh › ‘ yÇ € ‘ yÇ€ ú€ ‘ y& ~ ‘ y… Ý ‘ yä =‚ ‘ yF‚ çƒ ‘ yñƒ -„ ‘ y>„ a… ‘ ym… ㇠‘ yˆ :Š ‘ yÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘Èzúpiw0Ÿiwšw‘Èz†xÙx0Ÿ¿yz‘ÈzŸz¯}‘Èz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-¿7‘Èz¿7¹;^¹;>‘Èz>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘ÈzC> `K 0Ÿ`K Öj ‘ÈzÖj dl 0Ÿdl mm ‘Èzmm $o 0Ÿ$o Vq ‘Èz-t Qu ‘ÈzÂu Kw ‘ÈzKw ‰w ^‰w ñw ‘Èzñw x ^x Hx ‘ÈzHx mx ^mx µx ‘Èzµx Åx ^Åx y ‘Èz y oy ^oy «y ‘Èz«y »y ^»y z ‘Èzz Tz ^Tz xz ‘Èzxz ¥z ^¥z ìz ‘Èzìz 0{ ^0{ ]{ ‘Èz]{ {{ ^{{ Ã{ ‘ÈzÃ{ ×{ ^×{ )| ‘Èz)| w| ^w| ’| ‘Èz’| ¦| ^¦| Ü| ‘ÈzÜ| ÿ| ^ÿ| •Š ‘ÈzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘èzúpiw0Ÿiwšw‘èz†xÙx0Ÿ¿yz‘èzŸz¯}‘èz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-ø8‘èzø8é;‘ˆyé;>‘èz>Q¿k0ŸlŒ0ŸN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘èzC> `K 0Ÿ`K ¾K ‘èzßK Žj ‘èzÖj dl 0Ÿdl mm ‘èzmm $o 0Ÿ$o Vq ‘èz-t Qu ‘èzÂu Ýv ‘èzÝv w ‘ˆyw Kw ‘èzKw Îw ‘ˆyñw %x ‘ˆyHx vx ‘ˆyµx éx ‘ˆy y “y ‘ˆy«y ßy ‘ˆyz ]z ‘ˆyxz Éz ‘ˆyìz { ‘ˆy{ •Š ‘èzÍAWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿ†xÙx0Ÿ¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸZ?çG‘Ð}>Q¿k0ŸlŒ0ŸŒ•‘ {¡•ò•‘ {–@Ÿ‘ {¶Ÿh¨‘ {ר믑 {Ȱ±‘ {«±jÕ‘ {ÿÕtÖ‘ {€×Ø‘ {%Øí‘ {[í\‘ {N`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0ŸC> `K 0ŸÖj dl 0Ÿmm $o 0Ÿ*r Sr ‘ {¿r s ‘ {Ts ²s ‘ {Üs -t ‘ {‹u Âu ‘ {ÍAWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿ†xÙx0Ÿ¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0Ÿ˜?¬?P¬?±?‘Ø~±?çG‘ðz>Q¿k0ŸlŒ0ŸŒ•‘ðz¡•ò•‘ðz–@Ÿ‘ðz¶Ÿh¨‘ðzר믑ðzȰ±‘ðz«±jÕ‘ðzÿÕtÖ‘ðz€×Ø‘ðz%Øí‘ðz[í\‘ðzN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0ŸC> `K 0ŸÖj dl 0Ÿmm $o 0Ÿ*r Sr ‘ðz¿r s ‘ðzTs ²s ‘ðzÜs -t ‘ðz‹u Âu ‘ðzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘øzúpiw0Ÿiwšw‘øz†xÙx0Ÿ¿yz‘øzŸz¯}‘øz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘øzÖ?æ?Pæ?çG‘øz>Q¿k0ŸlŒ0ŸŒS”‘øz¯–@Ÿ‘øz¶Ÿh¨‘øzר믑øzȰ±‘øz«±jÕ‘øzÿÕtÖ‘øz€×Ø‘øz%Øí‘øz[í\‘øzN`y0ŸS0Ÿ"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘øzC> `K 0Ÿ`K Öj ‘øzÖj dl 0Ÿdl mm ‘øzmm $o 0Ÿ$o Vq ‘øzÑq Sr ‘øzs $s ‘øz2s Ts ‘øz-t •Š ‘øzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘¸yúpiw0Ÿiwšw‘¸y†xÙx0Ÿ¿yz‘¸yŸz¯}‘¸y¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘¸yH>Q‘¸y>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘¸yÌ¡,¤‘¸yh¨ר‘¸y\N`‘¸yN`y0ŸyS‘¸yS0Ÿ"‘¸y"{0Ÿ{eÉ‘¸yeÉ[ 0Ÿ[ á. ‘¸yá. 4> 0Ÿ4> C> ‘¸yC> `K 0Ÿ`K b] ‘¸yg] pg ‘¸yÚg ]i ‘¸ywi Öj ‘¸yÖj dl 0Ÿdl mm ‘¸ymm $o 0Ÿ$o Vq ‘¸yÑq Sr ‘¸ys $s ‘¸y2s Ts ‘¸y-t •Š ‘¸yÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘€{úpiw0Ÿiwšw‘€{†xÙx0Ÿ¿yz‘€{Ÿz¯}‘€{¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘€{7EçG‘€{H>Q‘€{>Q¿k0ŸlŒ0Ÿ¯–Úš‘€{@Ÿë¯‘€{Ȱ±‘€{«±jÕ‘€{ÿÕtÖ‘€{€×Ø‘€{%Øí‘€{[íN`‘€{N`y0ŸyS‘€{S0Ÿ"‘€{"{0Ÿ{eÉ‘€{eÉ[ 0Ÿ[ á. ‘€{á. 4> 0Ÿ4> C> ‘€{C> `K 0Ÿ`K Öj ‘€{Öj dl 0Ÿdl mm ‘€{mm $o 0Ÿ$o Vq ‘€{Ñq Sr ‘€{s $s ‘€{2s Ts ‘€{-t •Š ‘€{ÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘zúpiw0Ÿiwšw‘z†xÙx0Ÿ¿yz‘zŸz¯}‘z¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘zÁFçG‘zHRN‘z—N>Q‘z>Q¿k0ŸlŒ0Ÿ¯–—‘z@Ÿë¯‘zȰ±‘z«±jÕ‘zÿÕtÖ‘z€×Ø‘z%Øí‘z[íN`‘zN`y0ŸyS‘zS0ŸÀ‘z>"‘z"{0Ÿ{eÉ‘zeÉ[ 0Ÿ[ á. ‘zá. 4> 0Ÿ4> C> ‘zC> `K 0Ÿ`K Öj ‘zÖj dl 0Ÿdl mm ‘zmm $o 0Ÿ$o Vq ‘zÑq Sr ‘zs $s ‘z2s Ts ‘z-t •Š ‘zÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘Àyúpiw0Ÿiwšw‘Ày†xÙx0Ÿ¿yz‘ÀyŸz¯}‘Ày¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ÀyH>Q‘Ày>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘Àyh¨ר‘Àyªë¯‘€yȰ±‘€y«±α‘€y²4²‘€y}²š²‘€yã²³‘€yO³¨³‘€y²³´‘€y´É´‘€yÓ´)µ‘€y3µе‘€y”µëµ‘€yõµN¶‘€yX¶r¶‘€y»¶·‘€y!·>·‘€y‡·¤·‘€yí·¸‘€yW¸¹‘€y"¹P¹‘€y¹õ¹‘€yÿ¹.º‘€yoºغ‘€yâºK»‘€yU»¾»‘€yÈ»4¼‘€y>¼¬¼‘€y¶¼$½‘€y.½œ½‘€y¦½¾‘€y|ÑjÕ‘€yÿÕ.Ö‘€y€×ëב€yõר‘€y%ØØ‘€yšØîØ‘€yøØœÙ‘€y¦ÙÕÙ‘€yÚJÚ‘€yŽÚåÚ‘€yïÚFÛ‘€yPÛ§Û‘€y±ÛÜ‘€yÜkÜ‘€yuÜ’Ü‘€yØÜþÜ‘€yDݯݑ€y¹Ý$Þ‘€y.ޜޑ€y¦Þ€á‘€yÆá1â‘€y;ââ‘€yÄâ/ã‘€y9ã¤ã‘€y®ãä‘€y ä_ä‘€y£äÆä‘€y åpå‘€yzåâå‘€yìå;æ‘€y~æéæ‘€yóæ^ç‘€yhçÖç‘€yàçè‘€yUèí‘€y[íÆí‘€yÝíBî‘€yYîõî‘€y ïtï‘€y‹ï®ï‘€yðEð‘€yoðµð‘€y ñoñ‘€yñÚñ‘€yúñò‘€ygò„ò‘€yÝòEó‘€y\óÄó‘€yÛóCô‘€yZôÅô‘€yÜôGõ‘€y^õ›ù‘€y²ùú‘€y1úÓú‘€yêúRû‘€yiûÑû‘€yèû%ü‘€yOüàü‘€y ýHý‘€yrý­ý‘€y×ýóý‘€y<þŠþ‘€yªþÄþ‘€yÿxÿ‘€yÿñÿ‘€y+‘€y¤‘€yýe‘€y|ç‘€yþi‘€y€ë‘€ym‘€y„‘€y;‘€y„³‘€y^Û‘€yK 2‘€y<ª‘€y´>‘€yH­‘€y·_‘€yiÓ‘€yÝ ‘€yI‘€ydÆ‘€yÐ2‘€y<•‘€yŸÚ‘€yñ•‘€yŸ ‘€yj‘€ytÈ‘€yÒõ‘€y0‘€y—Æ‘€yþ-‘€yhË‘€yÕ:‘€yD¦‘€y°‘€y ½‘€yÇê‘€y-~‘€yˆ«‘€yñS‘€y]ƒ‘€yÉ4 ‘€y> © ‘€y³ !!‘€y+!™!‘€y£!™(‘€y£()‘€y )F*‘€yP*À*‘€yÊ*:+‘€yD+x+‘€y¾+ ,‘€y,Œ,‘€yÀ, -‘€y-e-‘€yo-Á-‘€yË- .‘€y*..‘€y‰.ç.‘€yñ.R/‘€y\/‡/‘€yÐ/C0‘€yM0À0‘€yÊ0=1‘€yG1f1‘€y²1Ñ1‘€y2§2‘€y±23‘€y3n3‘€yx3Ù3‘€yã34‘€yW4Ê4‘€yÔ4G5‘€yQ5Ä5‘€yÎ5R8‘€y˜8¶8‘€yè89‘€y‹9Ô9‘€yÞ9ý9‘€y1:ƒ:‘€y:è:‘€yò:P;‘€yZ;Á;‘€yË;ö;‘€y?<²<‘€y¼<ë<‘€y1=Ÿ=‘€y\N`‘ÀyN`y0ŸyS‘ÀyS0Ÿ"‘Ày"{0Ÿ{eÉ‘ÀyeÉ[ 0Ÿ[ á. ‘Àyá. 4> 0Ÿ4> C> ‘ÀyC> `K 0Ÿ`K Öj ‘ÀyÖj dl 0Ÿdl mm ‘Àymm $o 0Ÿ$o Vq ‘ÀyÑq Sr ‘Àys $s ‘Ày2s Ts ‘Ày-t •Š ‘ÀyÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘Ðzúpiw0Ÿiwšw‘Ðz†xÙx0Ÿ¿yz‘ÐzŸz¯}‘Ðz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ÐzH>Q‘Ðz>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘Ðzh¨ר‘Ðz›ÄjÕ‘ÐzÿÕtÖ‘Ðz€×Ø‘Ðz%Øí‘Ðz[íZU‘Ðz\N`‘ÐzN`y0ŸyS‘ÐzS0Ÿ"‘Ðz"{0Ÿ{w‘‘ÐzÄ‘TÇ‘ÐzÉÇeÉ‘ÐzeÉ[ 0Ÿ[ á. ‘Ðzá. 4> 0Ÿ4> C> ‘ÐzC> `K 0Ÿ`K Öj ‘ÐzÖj dl 0Ÿdl mm ‘Ðzmm $o 0Ÿ$o Vq ‘ÐzÑq Sr ‘Ðzs $s ‘Ðz2s Ts ‘Ðz-t •Š ‘ÐzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘˜zúpiw0Ÿiwšw‘˜z†xÙx0Ÿ¿yz‘˜zŸz¯}‘˜z¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘˜zH>Q‘˜z>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘˜zh¨ר‘˜zÓÅ6È‘ˆy6ÈjÕ‘˜zÿÕtÖ‘˜z€×Ø‘˜z%Øí‘˜z[íbL‘˜zbL\M‘ˆyŠMÝM‘ˆy NbN‘ˆy‡NÞN‘ˆy O&O‘ˆyrOÅO‘ˆyöOMP‘ˆyrPPQ‘˜zPQsQ‘ˆy¿Q&R‘ˆyoRÊR‘ˆyêRS‘ˆy\N`‘˜zN`y0ŸyS‘˜zS0Ÿ"‘˜z"{0Ÿ{%“‘˜z%“Ù”^Ù”!•‘˜z!•„•^„•¹•‘˜z¹•Ú˜^Ú˜ä˜Pä˜é˜‘À~é˜ýÀ‘˜zýÀ%Á^%Á}Á‘˜z}Á Â^ ÂU‘˜zU¦Â^¦ÂÛ‘˜zÛ¦Ã^¦ÃîјzîÃCÄ^CÄ^Ä‘˜z^ijÄ^³ÄÎÄ‘˜zÎÄöÄ^öÄeÉ‘˜zeÉ[ 0Ÿ[ +! ‘˜z+! S! ^S! Á! ‘˜zÁ! é! ^é! 8" ‘˜z8" Œ" ^Œ" ¸" ‘˜z¸" O# ^O# ¤# ‘˜z¤# á# ^á# &$ ‘˜z&$ N$ ^N$ ¬$ ‘˜z¬$ "% ^"% W% ‘˜zW% ˜% ^˜% Ý% ‘˜zÝ% & ^& á. ‘˜zá. 4> 0Ÿ4> C> ‘˜zC> `K 0Ÿ`K Öj ‘˜zÖj dl 0Ÿdl mm ‘˜zmm $o 0Ÿ$o Vq ‘˜zÑq Sr ‘˜zs $s ‘˜z2s Ts ‘˜z-t •Š ‘˜zÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘¨zúpiw0Ÿiwšw‘¨z†xÙx0Ÿ¿yz‘¨zŸz¯}‘¨z¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘¨zH>Q‘¨z>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘¨zh¨ר‘¨z0ÇXÉ‘€yXÉjÕ‘¨zÿÕtÖ‘¨z€×Ø‘¨z%Øí‘¨z[íùI‘¨zùINJ‘€yuJ›J‘€yçJæK‘€yðKL‘€ybL(M‘€yŠMñM‘€y N%N‘€y‡NªN‘€yrO•O‘€yöOP‘€yrP•P‘€yáPQ‘€y\N`‘¨zN`y0ŸyS‘¨zS0Ÿ"‘¨z"{0Ÿ{x˜‘¨zx˜ô™‘øxô™eÉ‘¨zeÉ[ 0Ÿ[ ] ‘¨z] Þ ‘øxë l ‘øxy Œ ‘øx™  ‘øx$ ™ ‘øx¦ ! ‘øx+! ´! ‘øxÁ! á. ‘¨zá. 4> 0Ÿ4> C> ‘¨zC> `K 0Ÿ`K Öj ‘¨zÖj dl 0Ÿdl mm ‘¨zmm $o 0Ÿ$o Vq ‘¨zÑq Sr ‘¨zs $s ‘¨z2s Ts ‘¨z-t •Š ‘¨zÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘€zúpiw0Ÿiwšw‘€z†xÙx0Ÿ¿yz‘€zŸz¯}‘€z¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘€zH>Q‘€z>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘€zh¨ר‘€zËjÕ‘€zÿÕtÖ‘€z€×Ø‘€z%Øí‘€z[í»F‘€z\N`‘€zN`y0ŸyS‘€zS0Ÿ"‘€z"{0Ÿ{›‘€z›åž‘€yòžÑ¥‘€yÞ¥Z¦‘€yg¦W§‘€yd§ì§‘€yù§l¨‘€yy¨©‘€y©–©‘€y£©4ª‘€yAªÒª‘€yߪ\­‘€yi­þ­‘€y ®ë®‘€yø®t¯‘€y¯ñ¯‘€yþ¯ƒ°‘€y°±‘€y"±§±‘€y´±<²‘€yI²Ú²‘€y粇³‘€y”³"´‘€y/´À´‘€yÍ´^µ‘€ykµ¶‘€y¶¬¶‘€y¹¶\·‘€yi·î·‘€yû·ƒ¸‘€y¸¹‘€y%¹­¹‘€yº¹Kº‘€yXºéº‘€yöº{»‘€yˆ»¼‘€y¼ß¼‘€yì¼h½‘€yu½ý½‘€y ¾¾‘€yœ¾Æ¿‘€yÓ¿^À‘€ykÀðÀ‘€yýÀeÉ‘€zeÉ[ 0Ÿ[ Z& ‘€zZ& Ø& ‘€yå& f' ‘€ys' d* ‘€zd* â* ‘€yï* m+ ‘€yz+ ø+ ‘€y, ƒ, ‘€y, - ‘€y- ™- ‘€y¦- $. ‘€y1. Ô. ‘€yá. 4> 0Ÿ4> C> ‘€zC> `K 0Ÿ`K Öj ‘€zÖj dl 0Ÿdl mm ‘€zmm $o 0Ÿ$o Vq ‘€zÑq Sr ‘€zs $s ‘€z2s Ts ‘€z-t •Š ‘€zÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘ˆzúpiw0Ÿiwšw‘ˆz†xÙx0Ÿ¿yz‘ˆzŸz¯}‘ˆz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ˆzH>Q‘ˆz>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘ˆzh¨ר‘ˆzøÌjÕ‘ˆzÿÕtÖ‘ˆz€×Ø‘ˆz%Øí‘ˆz[í$C‘ˆz\N`‘ˆzN`y0ŸyS‘ˆzS0Ÿ"‘ˆz"{0Ÿ{k‘ˆzkOž‘€zTžíž‘€zòžÙ¥‘€zÞ¥b¦‘€zg¦_§‘€zd§ô§‘€zù§t¨‘€zy¨ ©‘€z©ž©‘€z£©<ª‘€zAªÚª‘€zߪd­‘€zi­®‘€z ®ó®‘€zø®|¯‘€z¯ù¯‘€zþ¯‹°‘€z°±‘€z"±¯±‘€z´±D²‘€zI²â²‘€zç²³‘€z”³*´‘€z/´È´‘€zÍ´fµ‘€zkµ¶‘€z¶´¶‘€z¹¶d·‘€zi·ö·‘€zû·‹¸‘€z¸ ¹‘€z%¹µ¹‘€zº¹Sº‘€zXºñº‘€zöºƒ»‘€zˆ»¼‘€z¼ç¼‘€zì¼p½‘€zu½¾‘€z ¾—¾‘€zœ¾ο‘€zÓ¿fÀ‘€zkÀøÀ‘€zýÀeÉ‘ˆzeÉ[ 0Ÿ[ 1. ‘ˆz1. Ü. ‘€zá. 4> 0Ÿ4> C> ‘ˆzC> `K 0Ÿ`K Öj ‘ˆzÖj dl 0Ÿdl mm ‘ˆzmm $o 0Ÿ$o Vq ‘ˆzÑq Sr ‘ˆzs $s ‘ˆz2s Ts ‘ˆz-t •Š ‘ˆzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘Àzúpiw0Ÿiwšw‘Àz†xÙx0Ÿ¿yz‘ÀzŸz¯}‘Àz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ÀzH>Q‘Àz>Q¿k0ŸlŒ0Ÿ@Ÿ¶Ÿ‘Àzh¨ר‘Àz²$û$‘øxû$G1‘ÀzÙ7'8‘ˆy\N`‘ÀzN`y0ŸyS‘ÀzS0Ÿ"‘Àz"{0Ÿ{W¢‘ÀzW¢‰¢^‰¢œ¬‘Àzœ¬ج‘ˆyجi­‘Àzi­…­‘ˆy…­ˆ»‘Àzˆ»Ÿ»^Ÿ»eÉ‘ÀzeÉ[ 0Ÿ[ á. ‘Àzá. 4> 0Ÿ4> C> ‘ÀzC> `K 0Ÿ`K Öj ‘ÀzÖj dl 0Ÿdl mm ‘Àzmm $o 0Ÿ$o Vq ‘ÀzÑq Sr ‘Àzs $s ‘Àz2s Ts ‘Àz-t •Š ‘ÀzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘Øzúpiw0Ÿiwšw‘Øz†xÙx0Ÿ¿yz‘ØzŸz¯}‘Øz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ØzGIYK\YK>Q‘Øz>Q¿k0ŸlŒ0Ÿ»]«^\«^Û^‘ØzÛ^*_\*_Z_‘ØzZ_›_\›_Ë_‘ØzË_`\`N`‘ØzN`y0ŸyS‘ØzS0Ÿ£‘Øz£ä\ä ‘Øz U \U … ‘Øz… Ù \Ù  !‘Øz !J!\J!z!‘Øzz!î!\î!"‘Øz"{0Ÿ{eÉ‘ØzeÉ[ 0Ÿ[ á. ‘Øzá. 4> 0Ÿ4> C> ‘ØzC> `K 0Ÿ`K Öj ‘ØzÖj dl 0Ÿdl mm ‘Øzmm $o 0Ÿ$o Vq ‘ØzÑq Sr ‘Øzs $s ‘Øz2s Ts ‘Øz-t •Š ‘ØzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘àzúpiw0Ÿiwšw‘àz†xÙx0Ÿ¿yz‘àzŸz¯}‘àz¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘àz•I|K]|K>Q‘àz>Q¿k0ŸlŒ0Ÿ»]}^]}^Û^‘àzÛ^ü^]ü^Z_‘àzZ_m_]m_Ë_‘àzË_ð_]ð_N`‘àzN`y0ŸyS‘àzS0Ÿ£‘àz£¶]¶ ‘àz ' ]' … ‘àz… « ]«  !‘àz !!]!z!‘àzz!À!]À!"‘àz"{0Ÿ{eÉ‘àzeÉ[ 0Ÿ[ á. ‘àzá. 4> 0Ÿ4> C> ‘àzC> `K 0Ÿ`K Öj ‘àzÖj dl 0Ÿdl mm ‘àzmm $o 0Ÿ$o Vq ‘àzÑq Sr ‘àzs $s ‘àz2s Ts ‘àz-t •Š ‘àzÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘ðyúpiw0Ÿiwšw‘ðy†xÙx0Ÿ¿yz‘ðyŸz¯}‘ðy¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ðyþLMPM-M‘À~-M>Q‘¨}>Q¿k0ŸlŒ0ŸN`y0ŸyS‘¨}S0Ÿù‘¨}"{0Ÿ{eÉ‘¨}eÉ[ 0Ÿ[ á. ‘¨}á. 4> 0Ÿ4> C> ‘ðyC> `K 0Ÿ`K Öj ‘ðyÖj dl 0Ÿdl mm ‘ðymm $o 0Ÿ$o Vq ‘ðyÑq Sr ‘ðys $s ‘ðy2s Ts ‘ðy-t •Š ‘ðyÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘øyúpiw0Ÿiwšw‘øy†xÙx0Ÿ¿yz‘øyŸz¯}‘øy¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘øy…O>Q‘øy>Q¿k0ŸlŒ0ŸN`y0Ÿye‘øyS0Ÿä‘øy"{0Ÿ#”±”‘ˆy!•–•‘ˆy¹•@–‘ˆy}Á2‘ˆyU¸‘ˆyeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘øyC> `K 0Ÿ`K Öj ‘øyÖj dl 0Ÿdl mm ‘øymm $o 0Ÿ$o Vq ‘øyÑq Sr ‘øys $s ‘øy2s Ts ‘øy-t •Š ‘øyÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘ˆ{úpiw0Ÿiwšw‘ˆ{†xÙx0Ÿ¿yz‘ˆ{Ÿz¯}‘ˆ{¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊÚ-0ŸÚ-g>‘ˆ{)PÇP^>Q¿k0ŸlŒ0ŸN`y0Ÿyº^ºï‘ˆ{ï^e‘ˆ{S0Ÿ6^6‘ˆ{"{0ŸeÉ[ 0Ÿá. 4> 0Ÿ4> C> ‘ˆ{C> `K 0Ÿ`K Öj ‘ˆ{Öj dl 0Ÿdl mm ‘ˆ{mm $o 0Ÿ$o Vq ‘ˆ{Ñq Sr ‘ˆ{s $s ‘ˆ{2s Ts ‘ˆ{-t •Š ‘ˆ{ÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘€yúpiw0Ÿiwšw‘€y†xÙx0Ÿ¿yz‘€yŸz¯}‘€y¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0Ÿl¾K 0ŸßK RS 0ŸRS éS SéS øS PøS \T ‘€y\T ËT SËT ‹W ‘€y¬W  [ ‘€y [ D\ SD\ U_ ‘€yU_ ¯_ ‘ˆy b $b ‘ˆyb oe ‘€yoe e we åe ‘€yåe ýe wýe 0j ‘€y0j dl 0Ÿdl mm ‘€ymm $o 0Ÿ$o Vq ‘€yVq •Š 0ŸÍAWV0ŸW~^0Ÿx`pc0Ÿeúp‘˜yúpiw0Ÿiwšw‘˜y†xÙx0Ÿ¿yz‘˜yŸz¯}‘˜y¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0ŸlD\ 0ŸD\ |] \|] Fg ‘˜yFg Õi \Õi 0j ‘˜y0j dl 0Ÿdl ¬l \¬l Úl ‘˜yÚl m \m mm ‘˜ymm $o 0Ÿ$o Ùo \Ùo ìo ‘˜yìo Np \Np |p ‘˜y|p Çp \Çp Vq ‘˜yVq •Š 0ŸÍAWV0ŸW~^0Ÿx`pc0ŸeÓpSúpiw0ŸiwšwS†xÙx0Ÿ¿yzSŸz¯}S¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0ŸlD\ 0ŸD\ ž] _ž] Fg SFg ¹i _¹i 0j S0j dl 0Ÿdl –l _–l Úl SÚl öl _öl mm Smm $o 0Ÿ$o ¶o _¶o ìo Sìo 8p _8p |p S|p Çp _Çp Vq SVq •Š 0ŸÍAWV0ŸW~^0Ÿx`e0Ÿeúpwúp½w0Ÿ†x¿y0Ÿ¿yzwz¯z0Ÿ¯z¯}w¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0Ÿljh 0Ÿjh oh Poh ™h w™h •Š 0ŸÍASB0ŸSBYBPYBhB0ŸhBnBPnB€B0Ÿ€B†BP†B˜B0Ÿ˜BžBPžB=C0ŸbCÂC0ŸÍCíC0ŸíCúCPúCWDwWD2E0Ÿ>EKEPKEjEwjEzE0ŸzE„EP„EšF‘°|šFçF0ŸçFòFPòF Gw GG0ŸG3GP3GRG‘øxRG_G0Ÿ_GxGPxG—G‘°y—G§G0Ÿ§G²GP²G?H^?HˆH0ŸˆH’HP’HåHwWX0ŸX9X^9X’X0Ÿ’XœXPœX‘Yw‘YšYUí]~^wx`XbPúp'q0Ÿ¨q†t0Ÿ†ttStšww†xÙx0ŸŸz©zT©z¯zw¯}Ò}wé€L†PL†††0Ÿo‰‰^Ÿ‰͉0ŸÏ™ß™w(+Ÿ0Ÿs§Ú©wÚ©ø©0ŸÆ¬`­0Ÿz­‘­0ŸZ¯‰¯U‰¯ˆ²0Ÿ£²X´PX´g´0Ÿs´ì´0Ÿì´ö´Pö´eµw—Â0ŸçÂ0Ã0Ÿ³ËÜË0ŸLÒ[Ò0ŸÔÁÕ0Ÿ’ì¹ì0Ÿ’ù¡ù0Ÿ×1PÁÐw´!Ç!Sf)u)‘øx,/?/‘°y22^2.2wÚ:î:0Ÿ›@©@0ŸbB}B0Ÿ¢BµB0ŸµB¹BP¹BD‘°|FMöN0Ÿ1RGR0ŸGRASPÿSõTP«^°^P°^Á_^˜bÌbw5h:hP:h8i‘°y$qgq^gqîrw¾uDwPDwq{wŠ‹ë‹^ë‹Rw““0Ÿ“*“P*“J“wJ“ë•0Ÿ£@£^@£ФwФë¤^»òçò0Ÿ×+@,0Ÿ‚,.0Ÿ..P.:.0Ÿ:.Y.PY.œ.wœ.·.0Ÿ·.Ö.PÖ./w/4/0Ÿ4/S/PS/–/w–/±/0Ÿ±/Ð/PÐ/0w0.00Ÿ.0M0PM00w0«00Ÿ«0Ê0PÊ0 1w 1(10Ÿ(1G1PG1Š1wŠ1¥10Ÿ¥1Ä1PÄ12w230Ÿ3'3P'3¥3‘°y¥3³40Ÿ³4Ä4PÄ45‘ày5350Ÿ35D5PD5d6wd670Ÿ77P7Z7wZ7f70Ÿf7v7Pv7¿7w¿7.80Ÿ.8A8PA88w8g90Ÿg9Œ9PŒ9À9wÀ9Ö:0ŸÖ:ý:Pý:M;wM;<0Ÿ</<P/<F=wF=Š=0ŸŠ=”=P”=>w>QÊR0Ÿ,_?_0Ÿ’nZqwZq sP\îwc`k`0Ÿxr‡r0Ÿ¯y0ŸS0ŸeÉ¿É0ŸçɹË0Ÿ¹ËÈËwÈËÍËPÍËáÌw®6 €< 0Ÿ4> 8> P8> C> ‘ zX> ü? wü? @ P@ A wâI J 0Ÿ`K eK PeK ¾K wßK óK wóK L PL –L w–L ›L P›L M w M M P M °M w°M µM PµM 'N w'N :N P:N ÊN wÊN ÏN PÏN AO wAO TO PTO äO wäO éO PéO [P w[P nP PnP þP wþP Q PQ uQ wuQ ˆQ PˆQ R wR R PR S w S …S 0Ÿ…S S PS ´S ‘€}´S çS 0ŸçS øS PøS þS ‘€yþS BT 0Ÿ\T aT PaT „T ‘€yËT ÂV 0ŸÂV ÉV PÉV ,W w,W 1W P1W €W w¬W X 0ŸX #X P#X =X w=X BX PBX œX wœX }\ 0Ÿ}\ \ P\ Ü\ wÜ\ È^ 0ŸÈ^ Ó^ PÓ^ U_ wU_ Ÿ_ 0ŸŸ_ ª_ Pª_ ì_ ^ì_ z` wz` °` 0Ÿ°` }a w}a ëa ^ëa b w b b Pb )b ^b äb wäb éb Péb c w,c ;c 0Ÿ;c Fc PFc „c w„c ld 0Ÿld …d P…d –d w–d e 0Ÿe "e P"e e we ¢e P¢e ýe wýe f 0Ÿ f f Pf cf wcf Ÿf 0ŸŸf ¦f P¦f ,g w,g Fg PFg Úg wÚg Ui 0ŸUi 0j w0j dl 0Ÿdl mm wmm ˆm 0Ÿo p 0Ÿp |p w|p Vq 0Ÿ-t ‹t w‹t ±t ]±t u wu Qu PÂu Pv wPv €v S€v Âv PÂv Hx 0ŸHx µx wµx ºx Pºx üx w y z 0Ÿz xz wxz Ã{ 0ŸÃ{ ’| w’| Ü| PÜ| ÿ| 0Ÿÿ| ]} w]} Ÿ} PŸ} ý} wý} ?~ P?~ ý~ 0Ÿý~ F‚ wF‚ K‚ PK‚ ’‚ w’‚ —‚ P—‚ ã‚ ‘àyè‚ Uƒ 0ŸUƒ `ƒ P`ƒ ‹ƒ ‘ày‹ƒ º„ 0Ÿº„ ¿„ P¿„ … ‘ày… Ë… 0ŸË… Ð… PÐ… † ‘°y%† —† 0Ÿ—† £† P£† Æ wÆ Ȇ PȆ &‡ w&‡ T‰ 0ŸT‰ h‰ wh‰ €‰ P€‰ ò‰ wò‰ Š PŠ •Š w®BÃBPW-WPo†††P|ЇРp $@L$)ÿŸ‡Š—Š s $@L$)ÿŸÏ"Ï p $@L$)ÿŸ"Ï-Ï s $@L$)ÿŸ·BÃB p $0.ÿŸ7D2ES°¿°SŲi³S~º¡ºShÊ„ÊS:BUBP–GÊGSÊGÐGPßGçGPïIþIPþIJSJJS,_?_S)i›iS¶ŸÁŸPרú¨Sú¨ © p $0.ÿŸ¸ÁÃÁ p $0.ÿŸ‹Í˜ÎV¼ÎÏV'ÏwÏV•ÏçÏVçÏÐS¦ÑÒ ‘ y”0.ÿŸÒÉÒSuܼÜSØÜ:ÝSDÝÝS¹ÝÞS.ÞŠÞS¦Þ ßS ä%äSEäƒäS£äáäS åHåSzåÇåSæWæS~æ׿SóæLçShçÄçSàçKè ‘ y”0.ÿŸUè…é ‘ y”0.ÿŸ…éÕêVúñ2òVgò²òVÝò(óV\ó§óVÛó&ôVZô±ôVÜô3õV^õ‘öVÿ¸ÿV-V¿VýHV|ÓVþUV€×V5 ‘ y”0.ÿŸ„ ‘ y”0.ÿŸ›P›íVx ‘ y”0.ÿŸ„ï ‘ y”0.ÿŸ^j ‘ y”0.ÿŸjuPuÉSr‘SÈþVx † P† Î Vì ~ V† ¾  ‘ y”0.ÿŸ G ‘ y”0.ÿŸc• ‘ y”0.ÿŸÇ# ‘ y”0.ÿŸˆç ‘ y”0.ÿŸñ$ ‘ y”0.ÿŸ]½ ‘ y”0.ÿŸÉü ‘ y”0.ÿŸ> q  ‘ y”0.ÿŸ³ æ  ‘ y”0.ÿŸ+!^! ‘ y”0.ÿŸ£! " ‘ y”0.ÿŸ "½"‘˜yö)õ))ÿŸ½"z$‘˜yö)‘¸}ö))ÿŸG1]1‘˜yö)‘¸}ö))ÿŸ²1È1‘˜yö)‘¸}ö))ÿŸ2ž2‘˜yö)‘¸}ö))ÿŸ±2ý2‘˜yö)‘¸}ö))ÿŸ3e3‘˜yö)‘¸}ö))ÿŸx3Ð3‘˜yö)‘¸}ö))ÿŸã34‘˜yö)‘¸}ö))ÿŸW4Á4‘˜yö)‘¸}ö))ÿŸÔ4>5‘˜yö)‘¸}ö))ÿŸQ5»5‘˜yö)‘¸}ö))ÿŸÎ5Ù5‘˜yö)õ))ÿŸÙ5¢6‘˜yö)‘¸}ö))ÿŸÞ9ô9‘˜yö)‘¸}ö))ÿŸ1:z:‘˜yö)‘¸}ö))ÿŸ:ß:‘˜yö)‘¸}ö))ÿŸò:G;‘˜yö)‘¸}ö))ÿŸZ;¸;‘˜yö)‘¸}ö))ÿŸË;ê;‘˜yö)‘¸}ö))ÿŸ?<©<‘˜yö)‘¸}ö))ÿŸ¼<'= ‘ y”0.ÿŸ1=d= ‘ y”0.ÿŸœ?é?V@T@Vr@Â@Và@0AVNA¤AV¹AÅAVÅAÓAPÓABS°B¾BP¾BCVqWtWPtW¾W‘ y¿ZÍZPÍZ[S»]Ï]SH^j^S×_N`PN`c`S"è,1Ÿ™/è/Sm:w: p $@L$)ÿŸw:€: v $@L$)ÿŸšåæS;çqçSûç8èSèèéSééPévéSªïµïPµï*ðS–ôõSCöNöPNö«öSì1ŸM71ŸªµPµV7q1Ÿ/ƒ=ƒSC> X> SÝv Kw 0ŸKw ¢w ÿŸ¢w ñw 0Ÿñw Hx ÿŸÍAMC0ŸMCWCPWCÍC]ÍC~D0Ÿ~DDPD¹D]¹DzI0ŸzIŠIPŠIJ]JØJ0ŸØJ5N]5N@NV@N¦N0Ÿ¦NOO_OO¼O0Ÿ¼OÌOPÌOP]P^PV^PoP]oP R0Ÿ RVRPVR|R‘ày|RWV0ŸW>W0Ÿ>WIWPIW€W]€WïY0ŸïY8Z]8ZÑZSÑZ¯[0Ÿ¯[Á[PÁ[ñ[]ñ[\0Ÿ\x\]x\Ž\0ŸŽ\Þ\]Þ\â]0Ÿí]~^0Ÿx`Xb0Ÿúpˆq0Ÿˆq/rS†tiw0Ÿiw½w]†xÙx0ŸŸz¯z]¯}L†0ŸL†_†]_†W‰0ŸW‰o‰]o‰‰0Ÿ‰Ÿ‰SŸ‰DŠ0ŸDЇŠ]‡Š¶Š0Ÿ¶ŠÈŠPÈŠøŠ]øŠ ‹0Ÿ ‹‹P‹È‹]È‹Ñ0ŸÑ+‘Ø{+1‘0Ÿ1‘Ž‘‘À{Ž‘”’0Ÿ”’ñ’‘È{ñ’å”0Ÿå”[•][•«˜0Ÿ«˜“™]“™§™0Ÿ§™Ï™Sϙߙ0Ÿß™Oš]OšøšSøšæœ]æœ>0Ÿ>ýžPýžô¡]ô¡̤P̤G§]G§Ú©0ŸÚ©Ƭ]ƬÔ¬0ŸÔ¬L¯]L¯‰¯0Ÿ‰¯£²]£²X´0ŸX´s´Ss´¢´0Ÿ¢´eµ]eµ©µ0Ÿ©µ¶µP¶µŵ‘Øyŵòµ0Ÿòµ0¶]0¶A·0ŸA· ·‘à| ·­·0Ÿ­·¶·P¶·Z»]Z»À¾0ŸÀ¾оPо8¿^8¿E¿0ŸE¿P¿PP¿¦Â]¦ÂªÂPªÂ@Ã]@Ã`Ã0Ÿ`ÃoÃ]oÃÄSÄÆ]Æ!Æ0Ÿ½Æ°É0Ÿ°É¿É]¿ÉÓÉ0ŸÓÉìÉPìÉ Ê^ Ê2Ê0Ÿ2Ê­Ê]­Ê³Ë0Ÿ³ËÜË]ÜËÌ0ŸÌ'Ì]'ÌÁÌSÁÌ»Î]»ÎÛÎSÛÎêÎ0ŸêÎùÎ]ùÎÏ0ŸÏ-Ï]-ÏjÑ0ŸjÑõÑ^õÑBÒ0ŸLÒÔ0ŸÔÁÕPÁÕÏÕ0ŸÏÕLØPLØìÚ0ŸìÚiÝPiÝ}Ý0Ÿ}ÝNàPNàSã]™ã·ã‘Ø{·ãEä0ŸEäWäPWä1ç]1çê0Ÿê’ìP’ì9î0Ÿ9îÑð]Ñðàð‘Ø{àðÑö]Ñöòö0Ÿòö÷‘À{÷xù]xù’ù0Ÿ’ù¡ù]¡ù°ù‘À{¹ùÿ]ÿÿ‘Øyÿ]0Ÿ]×]×60Ÿ6W]Wi0Ÿiß]ß0Ÿ P D]DQ0ŸQlPlÎ]Îß‘À{ßï0Ÿï ‘È{ .0Ÿ.¥]¥»0Ÿ»ÆPÆO‘Ø{OÁ‘¨yÁ‚P‚Ö!0ŸÖ!M$]M$\$‘È{\$ï&0Ÿï&f)]f)U/0ŸU/`/P`/>1‘À{2È40Ÿí4Ñ70ŸÑ7à7^à7ö70Ÿö78P8¥9‘È{ :Ë:0ŸË:Ú:]Ú:¸=0Ÿ¸=Ñ=]Ñ=¢B0Ÿ¢BµB]µB.D0Ÿ.D=D]=DPD0ŸPDZDPZD{D‘Øy{DØD0ŸØDçD]EE]ETE0ŸTEiJ]iJ7M0Ÿ7MFM‘à|FMöN]öNO0ŸO#O]#OøQ0ŸøQR^RR0ŸR1RP1RÚS0ŸÚSÿS]ÿSU0ŸUU‘à|U"U^"U1U‘à|1UþW0ŸþWXPX X]îX-Y]-Y‰b0Ÿ‰b˜b]˜bÌb0ŸÌb`e]`e¼e0Ÿ¼e5h]5h8i0Ÿ8iGi^Gißk0ŸßkäkPäkn^nîr0Ÿîrýr]ýrs0ŸssPsƒt‘à| u¾u]¾u7~0Ÿ7~B~PB~Á€^Á€¯ƒ0Ÿ¯ƒºƒPºƒ9†^9†òˆ]òˆ‰0Ÿ‰Š‹]Š‹z’0Ÿz’¬’]¬’Õ“0ŸÕ“Ù“PÙ“M”‘à{ë•{˜]{˜R›0ŸR›p›]p›þ¤0Ÿþ¤ ¥P ¥nª]nª—ª0Ÿ—ªq­]q­oµ0Ÿoµ~º]~º¡º0Ÿ¡ºº¿]º¿¡Â0Ÿ¡Â°Â]°ÂjÅ0ŸjÅáÇ]áljÊ0Ÿ‰ÊœÊ]¡Ê“Í]“Í;Ð0Ÿ;ÐJÐ]JТÐ0Ÿ¯Ð‰Ó0Ÿ‰ÓZÖ]ZÖoÖ0ŸoÖtÖPtÖÙ]Ù‡ÛP‡Û¨Þ]¨Þbá0Ÿbáä]ärä^r䦿]¦æÐæ0ŸÐæ§é]§é¶éV¶éê0ŸêMê]Mê¥ê0Ÿ²êçê]çêó0Ÿó óP ó¯ö]¯ö+û0Ÿ+û ] °0Ÿ° ] ¾ 0Ÿ¾ à Pà R]R0Ÿ~ ]~ — 0Ÿ— W"]W"%0Ÿ%×+]×+20Ÿ2-2P-2S2]S2g20Ÿg2z2Pz2î2]î2`40Ÿ`4j4Pj4Ê4]Ê4h50Ÿh5s5Ps56]6860Ÿ86B6PB6¯6‘Ðy¯6Ò60ŸÒ6å6På6Z7]Z7f80Ÿf8t8Pt8½8]½8Í80ŸÍ8Ý8PÝ8'9‘ˆy'9Ü90ŸÜ9ì9Pì9H:wH:!;0Ÿ!;+;P+;˜;‘øx˜;þ<0Ÿþ<=P=>]>b>0Ÿb>¾>]¾>Z?0ŸÐ?æ?Pæ?ì?‘øzì?X@0ŸX@e@Pe@¤@]¤@¾@0Ÿ¾@Ë@PË@A]A*A0Ÿ*A7AP7A|A]|A–A0Ÿ–A£AP£AâA]âA\B0Ÿ\BiBPiB¨B]¨BÂB0ŸÂBÏBPÏBC]C.C0Ÿ.C;CP;C€C]€CšC0ŸšC§CP§CæC]æCôD0ŸôDEPEgE‘€{gEE0ŸEEPEŸF]ŸF8L0Ÿ8LBLPBLÁL]ÁL†M0Ÿ†M–MP–MN]N,NS,NRN0ŸRNbNPbNÁN‘zÁNÞN0ŸÞNíNPíN O] OO0ŸO-OP-O}O]}OöO0ŸöOüOPüOYP^YPŠP0ŸŠPšPPšPÇP]>QMQ‘à{MQjQ0ŸjQ€QP€QQ0ŸQžQPžQÖQ]ÖQæQ0ŸæQôQPôQ,R],RBR0ŸBRSRPSR­R]­RWV0ŸWV_]__0Ÿ_,_],_?_0Ÿ?_b_]b_Q`VQ`’a]’aõaVõa)i])i.iP.i­k^­k¿k0Ÿl’n0Ÿ’n s] ssPsOx]Oxbx0Ÿbx‡}]‡}î0ŸîžŒ]žŒ¦ŒP¦Œ–]–žPžŽŽ]ŽŽ–ŽP–ŽùŽ]ùŽPÝ]ÝåPåp‘]p‘x‘Px‘h’]h’p’Pp’]“]]“e“Pe“È“]ȓړ0ŸÚ“S”]S”¼”P¼”ù•0Ÿù•N–]N–—0Ÿ—oš]ošwšPwšÚš]ÚšâšPâš"›‘€{U›Å›0ŸÅ›ЛPЛü›‘€{ü›½œ0Ÿ½œÅœPÅœ‘€{2çŸ0ŸçŸúŸPúŸC¡]C¡˜¤0Ÿ˜¤§]§—§P—§ú§]ú§È«0ŸÈ«Ú«PÚ«ˆ¬]ˆ¬s­0Ÿs­†­P†­K®]K®²³0Ÿ²³X¶]X¶]¶P]¶»¶]»¶í·0Ÿí·ÿ¹]ÿ¹ºPºoº]oºƒÓ0ŸƒÓ“ÓP“ÓAÔ]AÔšØ0ŸšØ1Ù]1ÙÚ0ŸÚ0Ú]0Ú5ÚP5ÚŽÚ]ŽÚß0Ÿß"ßP"ßÿß]ÿß®ã0Ÿ®ã æ] ææPæ~æ]~æë0Ÿë*ëP*ë½ë]½ëð0Ÿð¤ð]¤ð©ðP©ð$ñ]$ñUö0ŸUöhöPhöÌ÷]Ì÷èû0Ÿèû] P ]^ 0Ÿ^ r Pr í ]í Í 0ŸÍ á Pá W]WŸ0ŸŸ—]—œPœþ]þ°0Ÿ°ˆ]ˆPñ]ñç&0Ÿç&÷&P÷&[']['$)0Ÿ$)Š)]Š)P*0ŸP*D+]D+I+PI+¾+]¾+ú60Ÿú67P7´7]´7'80Ÿ'8˜8]˜88P8è8]è8c`0Ÿc`p`Pp`c^c e0Ÿ eAg]Ag,j0Ÿ,j7jP7jãl^ãlm0ŸmmPm¶o^¶oer0Ÿer‚t]‚tru0Ÿru†uP†u¤u]¤u¯u0Ÿ¯uÈuPÈuv]v'v0Ÿ'v7vP7vyv]yv›v0Ÿ›v¯vP¯vÕv]Õvãv0ŸãvòvPòvw]ww0Ÿw'wP'w’w]’wky0Ÿky©|]©|®|P®|ç]çìPì)ƒ])ƒ.ƒP.ƒÊ„]ʄƅ0ŸÆ…Ö…PÖ…d–]d–È–0ŸÈ–Ü–PÜ–—]——0Ÿ—"—P"—ɧ]ɧ\¨0Ÿ\¨€ª]€ªr¬0Ÿr¬.º].º3ºP3ºš½]š½Ÿ½PŸ½Á]ÁìÁ\ìÁZÃ]ZØÃ\˜ÃXÒ]XÒ]ÒP]ÒÔ]Ô›×0Ÿ›×Í×PÍרÙ]¨Ù­ÙP­ÙêÜ]êÜïÜPïÜÉá]ÉáÎáPÎáå]å åP 卿]¨æ”ë0Ÿ”ëí]ímï0Ÿmï­ò]­òËò_Ëò²ô0Ÿ²ôÁô_Áô5ø0Ÿ5øXø]Xøkø0Ÿkø~ø]~ø¯0Ÿ¯³P³¾]¾ÃPÃ? ]? D PD À ]À Å PÅ ï]ï÷P÷e]emPmS]Sb‘à{bfPfq‘Ð|qvPv~‘Ð|5]0Ÿ—P—ý^ýt0Ÿt€P€—^—ŸPŸ^ä0ŸäR]RZPZÀ]ÀÈPÈ9‘z>Î]ÎkSkÙ]Ù*S*A]A¤S¤©]©±P±]ù0Ÿù½]½c0ŸcÁ]ÁP—$0Ÿ—$Ü$‘ÐyÜ$%0Ÿ%I%]I%'&0Ÿ'&;&P;&Ò']Ò'.(0Ÿ.(?(P?(Õ+]Õ+a,^a,r,]r,.0Ÿ.".P".t.]t.‰.‘ |‰.//0Ÿ//?/P?/ª/]ª/Ê/0ŸÊ/á/Pá/(0](0v00Ÿv0†0P†0È0]È0à00Ÿà0÷0P÷0<1]<1¥<0Ÿ¥<¾<P¾<è=]è=ë>0Ÿë>?P?:?T:?`?]`?â?0Ÿâ?ñ?Pñ?+@]+@A@0ŸA@Š@]Š@Ë@0ŸË@Û@PÛ@6A]6AÑA0ŸÑAàAPàA)B])B4B0Ÿ4B@BP@BbB^„B‰BP‰B%D^%DÆE]ÆEËEPËEgG]gGSL0ŸSL•O]•OšOPšO6Q]6QÚR0ŸÚRV]V!VP!V½W]½W[0Ÿ[¦\]¦\«\P«\G^]G^{f0Ÿ{fäq]äqéqPéq…s]…s_y0Ÿ_ymyPmy+z]+zà}0Ÿà}Â]ÂÇPÇT]TØ0ŸØÑÛ]ÑÛÖÛPÖÛß]ßßPß´à]´àXâ0ŸXâšå]šåŸåPŸå;ç];çSç0ŸSçjçPjç´ç]´ç‚è0Ÿ‚è’èP’èùè]ùèé0Ÿéµê]µêºêPºêVì]VìTñ0ŸTñ–ô]–ô›ôP›ôê÷]ê÷ï÷Pï÷‹ù]‹ùÓü0ŸÓüŠ]Š‘P‘º0Ÿº¾P¾ÿ‘ |ÿ0ŸR¬0Ÿ¬M]MT0ŸTµVµÒ]Ò×P׃]ƒ70Ÿ7†^†!]!Q!^Q!0,]0,Y20ŸY2^2P^2ô3‘àyô3à80Ÿà8ýM]ýMNPNZS]ZSsSSsS,U],UfZ0ŸfZ!\]!\c0Ÿc7e‘Ðy7eJe0ŸJeg]g gP gÀh]ÀhÅ0Ÿ>ÅFÅPFÅ£Å^£ÅTÇ0ŸTÇ\ÇP\ÇÄÇ‘ÐzÉÇ¿É0Ÿ¿ÉçÉ]çÉ„Ï0Ÿ„ÏØÏ]ØÏXÒ0ŸXÒhÒPhÒëÒ]ëÒ…Ù0Ÿ…ÙÙPÙÜ]Ü™ß0Ÿ™ßà]à‚áP‚áÊâ]Êâuå0Ÿuå~è]~èƒèPƒèEî]Eîö0Ÿöàû]àûe 0Ÿe  ]  P J ]J ü 0Ÿü [ ][ À 0ŸÀ Ë PË  ] ™ 0Ÿ™ $ ]$ , P, ¦ ]¦ ¼" 0Ÿ¼" # ]# '# 0Ÿ'# &$ ]&$ .$ P.$ ¬$ ]¬$ W% 0ŸW% Ý% ]Ý% å% På% Z& ]Z& b& Pb& å& ]å& s' 0Ÿs' è' ]è' ð' Pð' ä( ]ä( ì( Pì( b) ]b) d* 0Ÿd* l* Pl* z+ ]z+ ‚+ P‚+ , ], ˜, P˜, 1. ]1. d3 0Ÿd3 €3 ]€3 3 V3 Î3 0ŸÎ3 Ù3 PÙ3 ’6 ^’6 ¾6 0Ÿ¾6 Ì6 PÌ6 7 ] 7 ÿ8 0Ÿÿ8 ¸: ]¸: ½: P½: 4> ]4> A 0ŸA ÏC ]ÏC ÞC 0ŸÞC øH ]øH I 0ŸI âI ]âI *J 0Ÿ*J `K ]`K ¾K 0ŸßK }U 0Ÿ}U ŽU PŽU `V ]`V ýV VýV ,W 0Ÿ,W €W V€W ¬W ]¬W X VX [Z ][Z `Z P`Z  [ ] [ ò\ 0Ÿò\ ü\ Pü\ g] ]g] |] ‘¸y|] ` 0Ÿ ` ` P` T` ]T` °` 0Ÿ°` a ]a a P a }a ]}a pg 0Ÿpg tg Ptg Úg ‘¸yÚg ]i 0Ÿ]i ai Sai wi ‘¸ywi $o 0Ÿ$o öo ]öo p Pp |p 0Ÿ|p Çp ]Çp Vq 0ŸVq Ñq ]Ñq Õq PÕq öq ^öq Sr 0ŸSr s ]s s 0Ÿs 2s ]2s Fs 0ŸFs Ts PTs ±t ]±t u Pu Qu ]Qu Âu ^Âu òv 0Ÿòv w Pw Kw ‘èzKw `w 0Ÿ`w nw Pnw ¢w ‘Èz¢w §w P§w áw ‘èzñw öw Pöw þw ‘ÈzHx Mx PMx µx ‘øxµx üx 0Ÿ y #y 0Ÿ#y /y P/y _y 0Ÿ_y dy Pdy «y w«y °y P°y z wz z 0Ÿz šz Pšz ìz wìz { 0Ÿ{ ]{ P]{ Ã{ ]Ã{ )| P)| Ÿ} 0ŸŸ} Z~ ]Z~ œ~ Pœ~ ý~ 0Ÿý~  P ? ‘Ðyh â ]â ®€ V®€ Ç€ ]Ç€ V … ]… Š PŠ ä ]ä ’‚ 0Ÿ’‚ Eƒ ]Eƒ ‹ƒ 0Ÿ‹ƒ ƒ Pƒ ñƒ ]ñƒ … 0Ÿ… m… ]m… b‡ 0Ÿb‡ Rˆ ]Rˆ Wˆ PWˆ ñˆ ]ñˆ öˆ Pöˆ T‰ ]T‰ •Š 0Ÿ¤HªHPªHåH‘øy«X±XPLYRY‘€yRYšY0Ÿí]4^‘€yÍ}Ò}0ŸZ¯‰¯0Ÿµ µP µeµ‘øxÙÂçÂ0ŸÏÏ0ŸÁБøx2.2‘øy–xzPzq{ w##à¦=¬=P¬=>‘ ~’nZqP\Ì‘€yX> ]> P]> ü? w##à-t ‹t P t ±t 0Ÿ„JwN_¶·éº_P¿§¿\½¿ð¿\0ŸÎ‘¸y.D=D_O#O_ðSÿS_X X_îX-Y_‰b˜b_&h5h_îrýr_ u¾u_‰,‰_z’’_[“ë•1Ÿë•–_a›p›_oµˆµ_æ· ¸_¡ºåº_¡Â°Â‘¸yjŃÅ_;ÐJÐ_‡ÛñÛ_ÜJÜ_bá¨á_ãæç_zé§é‘¸y§é¶é_êMê_õ4õ_¯ö÷_>ûWû_µýÖý_k~_°Ñ_Ñò‘¸y¡´_Bj_Ó_l…_…‘¸y=_¦ð_— Ë _%:&‘¸yº&Û&‘¸yÛ&î&_|(¨(_6*I*_>QÊR1ŸWV„W‘¸yX;Y‘¸y»Y [‘¸y[®\‘¸y.]O^‘¸y_,__?_`_’a¼a_6c^c_õd&e_²fËf_s8t‘¸y¸tàt_yv›v_4xOx_bxux_Ÿ}É}_-‡O‡_戉_¢Š·Š_erxr_xr‡r1Ÿ‡r¨s‘¸yyvîw‘¨yky’y‘¨y {1{‘¨y1{X{S©|Î}‘¨yH~o~‘¨yo~–~S瑨yˆ¯‘¨y¯êS)ƒP„‘¨yÊ„‡‘¨y-‡5‡0Ÿ5‡Љ‘¸yPŠw‹‘¸y÷‹‘¸yžÅŽ‘¸yEl‘¸yì’‘¸y“’º“‘¸y:”c•‘¸yã•9˜‘¸y_˜g˜0Ÿg˜êš‘Ày‹›žœ‘Ày?Tž‘Àyõž  ‘Ày« À¡‘Àya¢v£‘Ày¤,¥‘Àyͥ⦑Àyƒ§q©‘ÀyªÑ«‘Àyr¬…­‘Àyê¯ ±‘¸y ±Ö²‘¸yV³Œ´‘¸y µB¶‘¸y¶ø·‘¸yx¸®¹‘¸y.ºûº‘¸y份‘¸yš½g¾‘¸yP¿yÀ‘¸yùÀÚ‘¸yZÆđ¸y½ÆïÆ‘¨ydÈ–È‘¨y Ê=Ê‘¨y´ËæË‘¨y]ÍÍ‘¨yÏ8Ï‘¨y¯ÐáБ¨yXÒ‡Ó‘¨yÔ3Ô‘¨y­ÕÔÕ‘¨yQ×ùב¨yIÛpÛ‘¨yêÜÞ‘¨y5øHø_Xøkø_¯y1ŸS1Ÿ-<-0Ÿ<-è.‘¨z/ûü‘¨zÓü²ý‘¨ztþÈÿ‘¨zŠC‘¨zH‘¨z=‘¨zÿá ‘¨z£ … ‘¨zG F ‘¨zꑨz¬‹‘¨z&u5u_eÉ¿É1Ÿ¿ÉçÉ_çɹË1Ÿe „ \¶ Õ \€3 3 _®6 €< 1Ÿ€< “< _!> 4> ‘¸yº“Ó0ŸÃ“ª”\ݽ/¾0Ÿ/¾}¾Vë¤B¥\º¿ù¿\N¡Â0ŸÉ Ò 0ŸÒ ú¡^,¤L¤^˜¤Ť^õ¤F¥0Ÿ¤©Щ0Ÿ,¬X¬0Ÿý­,®0Ÿ²³M´0ŸM´r´1ŸÓ´3µ1Ÿí·‰¸0Ÿ‰¸²¸1Ÿ"¹¹1Ÿz¾¿0Ÿ¿4¿1Ÿ ¿À1Ÿ Â*Â0Ÿ*‰ÂSßÃÄ0Ÿ0ÅZÅ0ŸhÆnÆ0ŸnÆÑÆS«Ð³Ð0Ÿ³ÐÑV´ÓºÓ0ŸºÓáÔ\õ×OØ\𨭨\øØ1Ù0Ÿ1Ù[Ù\¦ÙÌÙ\Ú0Ú0Ÿ‹ß ß0Ÿ ßÇà\;âxâ\Äâîâ\9ãcã\®ãÁã\ äEä0Ÿìå æ0Ÿë4ë0Ÿ4ë÷ì\[íší\Ýíî\Yîºî\ ï6ï\‹ï±ï\ðð\oð¤ð0Ÿ ñ$ñ0ŸJ÷|÷0Ÿèûzü0Ÿzü¥ü1Ÿ ýrý1Ÿå V>Ž0ŸŒ ¶ 0Ÿš Æ 0ŸÓÝ0ŸÝ?SŸÈSñD0ŸŸ¸0Ÿ°50Ÿ5c1Ÿ-ˆ1Ÿš#®#0Ÿ®#Q%V^&&0Ÿ¾+E,0ŸE,m,1ŸÀ,-1ŸM0¬0VÊ0)1VG1¦1V²1ì1V2U20ŸÔ6è60Ÿè6o8V˜8¤8Vè8890Ÿ >­>0Ÿ­>Ò>1Ÿ=?œ?1ŸPQµQS¿Q÷Q0ŸêRS0ŸcS T0Ÿ T.T1Ÿ“TõT1ŸÌUnV0ŸnVŸV1ŸXX¿X1ŸYjYStYÇY0Ÿ,ZEZ0ŸcfcV~ø…ø0Ÿ''0Ÿ')\Š*—*0Ÿ—*è,_õ,-P-#-pŸ#-<-‘Èz#ŸM==0Ÿ{f?h0Ÿ?hkh1Ÿkm1Ÿ}y…y0Ÿ…y6zVà} ~VrÂ0ŸHMPì_Mh_7a_!,!_Í"#_Ï$â$_—&ª&__(r(_*y*0ŸEGE\ãF G\©HÓH\oJ™J\5L_L\ýM>N\ÅOïO\€QªQ\9SsS0Ÿiqq0Ÿæî0ŸîH‘SV’`’0Ÿ`’î“V±”•V$–,–0Ÿ,–†–S´—ë—0ŸU¡¡0Ÿž£¦£0Ÿ¦£í¤VC¥—¥VÞ¥¢¦0Ÿ¢¦Ò¦1Ÿù§y¨1Ÿ´«Þ«0Ÿ…­F®0ŸF®o®1Ÿ¯þ¯1ŸŸ»λV¼l¼0Ÿu½̽V ¾^¾Vœ¾²¾VýÀpÁS}ÁÏÁ0ŸÛÂñÂV^ĵÄVÎÄ7ÅV>Å“ÅV£ÅòÅV ÆbÆ0Ÿ;ÇTÇ0ŸÉÇ,ÈS1ȃÈ0ŸƒÑ‹Ñ0Ÿ‹ÑÒVEî¦îVéð9ñ0Ÿ8" ö" 0Ÿö" '# 1Ÿ¤# &$ 1Ÿ¥–‘øyÛÆkÇ‘øy¡É°É‘øy¿É³Ë‘øyÜËÌ‘øy#Ð2БøyqàÜà‘øy™ã+呸y*î9î‘øyÑðàð‘øyiöÑö‘øyòö÷‘øy¡ù°ù‘øyÿùÿ‘øyÎß‘øygkfk呸yï ‘øy¥‘øy‚]‘øyÇ!Ö!‘øyM$\$‘øy ,â,‘øy?/¸/‘øyí4k5‘øy®7V8‘øy¼:Ú:‘øyÑ=q>‘øyD.D‘øyØDçD‘øyEEE‘øy“J)K‘øy#OµO‘øyÎSðS‘øyõTU‘øy1UÛU‘øy-Y˜Y‘øyü[¥\‘øyÁ_n`‘øyßk;l‘øyno‘øyq{|‘øyÁ€,‘øyƒƒžƒ‘øy9†‹†‘øyòˆ‰‘øyRà‘øyæt‘øy{˜™‘øyp›œ‘øy:žêž‘øyë¤]¥‘øy•§J¨‘øy—ªM«‘øyq­Ù­‘øy#°>°‘øyº¿HÀ‘øyN¡‘øy°Â\Ñøy¡ÊPË‘øytÍ5ΑøyJÐeÑ‘øy‰ÓTÔ‘øyoÖÁÖ‘øy¨Þß‘øyGábá‘øy¶éê‘øyMê²ê‘øyËêçê‘øy~ — ‘øy%%‘øyc.Î1‘À}Î1>‘ð}}@B‘¸y¿CæC‘˜y^HfJ‘˜yÖJ”K‘ø}>VWV‘øy__‘øyOxbx‘øy‡}Ÿ}‘øyC\‘øyîy‚‘øy„'…‘øy!d!ƒ‘˜yùŽ_‘¸ydØ‘¸yÝC‘¸yHY‘¸yÒÞ‘¸y\‘Ö‘‘¸yÛ‘c’‘¸yh’Î’‘¸yÓ’G“‘¸yÚ“Þ“gÞ“N”‘¸yh¨l¨gl¨ɨ‘˜y\l\‘˜yŠ\ë\‘˜yù\L]‘˜yZ]­]‘˜y»]Í^‘˜yZ_½_‘˜yË_@`‘˜yAg«g‘øyjŽj‘øyãlqm‘øy¶o p‘øy£… ‘ø} !l!‘˜yz!š!‘˜yŸ!£!d£!"‘ø}Z5z7‘¸yz7r>‘€z3c d‘€z×d­e‘€z{f?g‘€z h/i‘€zýiÁj‘€zkQl‘€zmzm‘€z±no‘€zFpq‘€zäqLr‘€z…s[t‘€z)uÿu‘€zÍv£w‘€zqxn{‘€z<|}‘€zà}¤~‘€zr€‘€zT‚‘€zé‚Hƒ‘€z„é„‘€z"†ø†‘€zƇœˆ‘€zj‰@Š‘€z‹ä‹‘€z²Œˆ‘€zVŽ>‘€z â‘€z°‘†’‘€zT“*”‘€zø”Ε‘€zœ–r—‘€z@˜™‘€z䙺š‘€zˆ›^œ‘€z,ž‘€zО¦Ÿ‘€zt Ü ‘€z¢ë¢‘€z¹£¤‘€z]¥3¦‘€z§×§‘€z¥¨{©‘€zIª«‘€zí«ì‘€z‘­g®‘€z5¯ °‘€zÙ°²‘¸y²´³‘¸y4´fµ‘¸yæµùµ‘¸yùµýµhýµݶ‘€z«·߸‘¸y_¹¡º‘¸y!»E¼‘¸yż÷½‘¸yw¾«¿‘¸y´È¸Èh¸ÈæÉ‘¸yvʨˑ¸ywxey‘øyk{ö{‘øyü}Š~‘øyðÌ~Í‘øy÷ÏüБˆy( ’ ‘ˆyÌ á ‘ˆyñ i ‘ˆy£ + ‘ˆyJ N hN  ‘ˆyá. K/ ‘øy¢3 04 ‘øy’6 ®6 ‘øy`K ¾K ‘À}ßK uQ ‘À}ˆQ R ‘À}{R R fR S ‘À}-t Qu ‘ð}Âu h‰ ‘ð}h‰ Š ‘À}Š Š e Š •Š ‘ð}ªŒ‰—‘àyÆ!Æ‘àyÌÆÈ‘ày¡É°É‘ày¿É³Ë‘àyÜËÌ‘ày#Ð2БàyqàÜà‘ày™ãæ‘ày*î9î‘àyÑðàð‘àyiöÑö‘àyòö÷‘ày¡ù°ù‘àyÿ™‘àyÎß‘àyßãeãE‘àygÍ‘àyï ‘ày¥¾‘ày‚ý‘àyÇ!Ö!‘àyM$\$‘ày ,‚-‘ày?/X0‘àyí4Œ6‘ày®7ö8‘ày¼:Ú:‘àyÑ=j?‘àyD.D‘àyØDçD‘àyEEE‘ày“JL‘ày#OÖP‘àyÎSðS‘àyõTU‘ày1U¿V‘ày-Y8Z‘àyü[‰]‘àyÁ_ga‘àyßkÙl‘àynp‘àyq{}‘àyÁ€Ì‘àyƒƒžƒ‘ày9†+‡‘àyòˆ‰‘àyRÄŽ‘àyæX‘‘ày{˜0š‘àyp›‘ày:žìŸ‘àyë¤û¥‘ày•§L©‘ày—ªO¬‘àyq­y®‘ày#°>°‘àyº¿,Á‘àyN¡‘ày°ÂHÄ‘ày¡ÊRÌ‘àytÍÏ‘àyJÐgÒ‘ày‰Ó8Õ‘àyoÖ_בày¨Þ­ß‘àyGábá‘ày¶éê‘àyMê²ê‘àyËêçê‘ày~ — ‘ày%%‘àyà.Q1‘È}Q1>‘€~æ@êB‘¨}VCæC‘ø}ÎHfJ‘ø}fJ”K‘˜y>VWV‘ày__‘àyOxbx‘ày‡}Ÿ}‘àyC\‘àyî]ƒ‘ày„ †‘àyŒ ‘ø}–‘ø}ŽŽgŽzŽ‘ø}zމޑ¨}ŽŽã‘¨}\‘Û‘‘¨}ï‘h’‘¨}Ó’×’d×’L“‘¨}Š\Ž\dŽ\Û^‘ø}Û^ß^gß^L_‘˜yZ_N`‘ø}AgIh‘àyj,k‘àyãln‘ày¶o¾p‘ày£ ‘˜y w ‘˜y… û ‘˜y !Ÿ!‘ø}Ÿ!"‘˜yÅ5 7‘Ày 7r>‘ðy3cÍc‘ðy×dqe‘ðy{fg‘ðy hóh‘ðyýi…j‘ðykl‘ðymLn‘ðy±náo‘ðyFpÚp‘ðyäq s‘ðy…st‘ðy)uÃu‘ðyÍvgw‘ðyqx2{‘ðy<|Ö|‘ðyà}h~‘ðyrðyTß‘ðyé‚„‘ðy„½…‘ðy"†¼†‘ðyƇ`ˆ‘ðyj‰Š‘ðy‹¨‹‘ðy²ŒL‘ðyVŽ‘ðy ¦‘ðy°‘J’‘ðyT“î“‘ðyø”’•‘ðyœ–6—‘ðy@˜Ú˜‘ðyä™~š‘ðyˆ›"œ‘ðy,Æ‘ðyОjŸ‘ðyt °¡‘ðy¢¯¢‘ðy¹£S¤‘ðy]¥÷¥‘ðy§›§‘ðy¥¨?©‘ðyIªãª‘ðyí«‡¬‘ðy‘­+®‘ðy5¯ϯ‘ðyÙ°†±‘ðy²“³‘Ày4´8´h8´Ü´‘ðyæµùµ‘Àyùµ¡¶‘ðy«·¾¸‘Ày_¹€º‘Ày!»$¼‘ÀyżÖ½‘ÀyvÊzÊgzʇˑÀywxIz‘àyk{Ú|‘àyü}n‘àyðÌbΑàyHÐÑ‘°y„þ ‘°y( ³ ‘°yÌ á ‘°yñ õ hõ Š ‘°y³ L ‘°yá. é/ ‘ày¢3 Î4 ‘ày’6 ®6 ‘ày`K ¾K ‘È}ßK L ‘È}L L h L –L ‘€~–L [P ‘È}nP þP ‘È}ˆQ ŒQ hŒQ R ‘È}-t Qu ‘€~Âu ò‰ ‘€~ò‰ Š ‘È}Š •Š ‘€~WŒ”“‘ÐyPÃ`ÑÐyÆ!Æ‘Ðy½ÆvÈ‘Ðy¡É°É‘Ðy¿ÉüÉ‘ÐyÜËÌ‘Ðy#Ð2БÐy™ã·ã‘Ðy*î9î‘ÐyÑðàð‘Ðyòö÷‘Ðy¡ù°ù‘Ðyÿ‘ÐyW[d[´‘ÐyÎ<‘ÐygÄ‘Ðyï ‘Ðy¥µ‘Ðy‚ô‘ÐyÇ!Ö!‘ÐyM$\$‘Ðy ,y-‘Ðy?/O0‘Ðyí4ƒ6‘Ðy®7Ñ7‘Ðyà7í8‘ÐyÑ=a?‘ÐyD.D‘ÐyEEE‘Ðy“J L‘Ðy#OÍP‘Ðy1U¶V‘Ðy-Y/Z‘Ðyü[€]‘ÐyÁ_^a‘ÐyßkÐl‘Ðynùo‘Ðyq{þ|‘ÐyÁ€Ã‘Ðyƒƒžƒ‘ÐyæO‘‘Ðy{˜'š‘Ðyp›‘Ðyq­p®‘Ðy#°>°‘Ðy°Â?Ä‘ÐyJЯБÐy¶éê‘ÐyMê²ê‘Ðy~ — ‘Ðy%%‘Ðy]/Ô0‘Ø}Ô0>‘è}RAêB‘ø}êBæC‘¨}>VWV‘Ðy__‘Ðy‡}Ÿ}‘ÐyC\‘ÐyŒzŽ‘¨}zŽã‘ø}ãçeç\‘‘¨}ï‘ó‘fó‘h’‘ø}Ag@h‘Ðyj#k‘Ðyãln‘Ðy¶oµp‘Ðy06›6‘Ðy›6r>‘ày3c¥d‘ày×dIf‘ày{fÛg‘ày hËi‘àyýi]k‘àykíl‘àymþm‘ày±n“o‘àyFp²q‘àyäqÒr‘ày…s÷t‘ày)u›v‘àyÍv?x‘àyqx |‘ày<|®}‘àyà}@‘àyr¡€‘àyT·‚‘àyé‚΃‘ày„o…‘ày"†”‡‘àyƇ8‰‘àyj‰ÜŠ‘ày‹€Œ‘ày²Œ$Ž‘àyVŽÚ‘ày ~‘‘ày°‘"“‘àyT“Æ”‘àyø”j–‘àyœ–˜‘ày@˜²™‘àyä™V›‘àyˆ›úœ‘ày,žž‘àyОB ‘àyt b¡‘ày¢‡£‘ày¹£+¥‘ày]¥Ϧ‘ày§s¨‘ày¥¨ª‘àyIª»«‘àyí«_­‘ày‘­¯‘ày5¯§°‘àyÙ°^²‘ày²´‘ày4´´µ‘àyæµy·‘ày«·$¹‘Ðyo¹s¹gs¹ïº‘àyżɼhɼ<¾‘ÐyžÐ=Õ‘ zJÖáב zîØtÛ‘ z܌ޑ z™ß)â‘ zÊâaä‘ znå ç‘ zè~ê‘ zë8í‘ zEîÜï‘ zéðÐò‘ zÝótõ‘ zöø‘ z"ùÓú‘ zàûwý‘ z„þ ‘ z( ¿ ‘ z³ · g· X ‘ zá. à/ ‘Ðy¢3 Å4 ‘Ðy`K ¾K ‘è}ßK óK ‘è}óK L ‘Ø}L –L ‘è}–L M ‘Ø} M $M f$M °M ‘è}°M AO ‘Ø}TO äO ‘Ø}nP rP erP þP ‘Ø}-t Qu ‘è}Âu •Š ‘è}¤IèISèIJ0ŸÕ‹Œ\Œ2Œ0Ÿi•­•S­•Ò•0Ÿ`eke\ke¼e0ŸZÖoÖ0Ÿ¹æÐæ0ŸÓ>?S?Z?0ŸÊRÙR\­k¿k\¼”ý”S•+•SP•ò•0Ÿò•ô•SN–¯–0Ÿ.O.SO.t.0ŸÓü5ýStþ‹þS¨þŠ0ŸŠŒS¬M0ŸqƒqSŽqu0Ÿ5u—uSwxyxS–xk{0Ÿü}€0ŸðÌjÍSùÒ=ÓV=ÓaÓ0ŸJÖ«ÖVܘÜV´Ü™ß0ŸÊânå0ŸnåpåVd3 {3 S3 ¢3 \’6 ©6 Sê\ <] V<] g] 0Ÿ$o )o VEo ¶o 0Ÿìo ño Vöo p V|p Çp V›PžPP=¢@¢Pt¢w¢PG°J°PÀÕÃÕPÜéßéPŽõ‘õP»¾Pé'ì'P¸,»,Pd>g>Pz’zP!¥$¥PÑFßFP`JoJ x $0.ÿŸoJ‰Q ‘€y”0.ÿŸ‰QWV1Ÿ‡Š—Š s $@L$)ÿŸ¡Ž®Ž p $0)ÿŸ¿ÉÌÉ p $0)ÿŸ›ì¹ìPßô x $0.ÿŸôÎ ‘€y”0.ÿŸ&h5h ‘€y”0.ÿŸ’¬’ ‘€y”0.ÿŸa›p› ‘€y”0.ÿŸ¡º°º ‘€y”0.ÿŸ¡Â°Â ‘€y”0.ÿŸ;ÐJÐ ‘€y”0.ÿŸ‡ÛÜ ‘€y”0.ÿŸbáqá ‘€y”0.ÿŸzé¶é ‘€y”0.ÿŸêMê ‘€y”0.ÿŸòò)ó ‘€y”0.ÿŸ§ô1õ ‘€y”0.ÿŸ¯öX÷ ‘€y”0.ÿŸkÖ ‘€y”0.ÿŸ x ‘€y”0.ÿŸ°< ‘€y”0.ÿŸr ‘€y”0.ÿŸP» ‘€y”0.ÿŸñ  ‘€y”0.ÿŸ¾ á  ‘€y”0.ÿŸ_ Ê  ‘€y”0.ÿŸk ‘€y”0.ÿŸ¡  ‘€y”0.ÿŸ…  ‘€y”0.ÿŸÁH ‘€y”0.ÿŸ— !! ‘€y”0.ÿŸ%„% ‘€y”0.ÿŸº&F' ‘€y”0.ÿŸ|() ‘€y”0.ÿŸ6*¡* ‘€y”0.ÿŸ×+ë+PþA BPB+BP:BUBPßGçG p $0.ÿŸJ9JSlO…OS®OÇP1Ÿ¢RµRSWVÎV ‘€y”0.ÿŸX…X ‘€y”0.ÿŸ»YWZ ‘€y”0.ÿŸ[ø[ ‘€y”0.ÿŸ.]™] ‘€y”0.ÿŸÏ^_ ‘€y”0.ÿŸ?_Z` ‘€y”0.ÿŸ’aþa ‘€y”0.ÿŸ6c¿c ‘€y”0.ÿŸõd|e ‘€y”0.ÿŸs‚s ‘€y”0.ÿŸ¸tCu ‘€y”0.ÿŸyvþv ‘€y”0.ÿŸ4xOx ‘€y”0.ÿŸbxÍx ‘€y”0.ÿŸzŽz ‘€y”0.ÿŸÄ{Q| ‘€y”0.ÿŸŸ} ~ ‘€y”0.ÿŸ-‡°‡ ‘€y”0.ÿŸæˆl‰ ‘€y”0.ÿŸ·Š<‹ ‘€y”0.ÿŸrŒŒ ‘€y”0.ÿŸ¶ŸÁŸ p $0.ÿŸå¨ë¨Pú¨ ©P¸ÁÃÁPe^j^S e f ‘€y”0.ÿŸ‡ròr ‘€y”0.ÿŸ(t3x ‘€y”0.ÿŸkyÔy ‘€y”0.ÿŸ {s{ ‘€y”0.ÿŸ©|Ì| ‘€y”0.ÿŸH~±~ ‘€y”0.ÿŸç € ‘€y”0.ÿŸˆó ‘€y”0.ÿŸ)ƒLƒ ‘€y”0.ÿŸÊ„‰ ‘€y”0.ÿŸPŠÁŠ ‘€y”0.ÿŸ÷‹hŒ ‘€y”0.ÿŸžŽ ‘€y”0.ÿŸE¶ ‘€y”0.ÿŸì]‘ ‘€y”0.ÿŸ“’“ ‘€y”0.ÿŸ:”­” ‘€y”0.ÿŸã•?š ‘€y”0.ÿŸ‹›ó› ‘€y”0.ÿŸ?© ‘€y”0.ÿŸõž_Ÿ ‘€y”0.ÿŸ« ¡ ‘€y”0.ÿŸa¢Ë¢ ‘€y”0.ÿŸ¤¤ ‘€y”0.ÿŸÍ¥7¦ ‘€y”0.ÿŸƒ§ƨ ‘€y”0.ÿŸª$« ‘€y”0.ÿŸr¬Ú¬ ‘€y”0.ÿŸ&®ž® ‘€y”0.ÿŸê¯T° ‘€y”0.ÿŸ ± ² ‘€y”0.ÿŸV³À³ ‘€y”0.ÿŸ µvµ ‘€y”0.ÿŸÂ¶,· ‘€y”0.ÿŸx¸â¸ ‘€y”0.ÿŸ.º\º ‘€y”0.ÿŸä»N¼ ‘€y”0.ÿŸš½Ƚ ‘€y”0.ÿŸP¿ÿ ‘€y”0.ÿŸùÀ" ‘€y”0.ÿŸZÃÎà ‘€y”0.ÿŸÅ‡Å ‘€y”0.ÿŸ½Æ.Ç ‘€y”0.ÿŸdÈÕÈ ‘€y”0.ÿŸ Ê~Ê ‘€y”0.ÿŸ´Ë'Ì ‘€y”0.ÿŸ]ÍÐÍ ‘€y”0.ÿŸÏyÏ ‘€y”0.ÿŸ¯Ð"Ñ ‘€y”0.ÿŸXÒ†Ò ‘€y”0.ÿŸÔuÔ ‘€y”0.ÿŸ­ÕÖ ‘€y”0.ÿŸQ×rØ ‘€y”0.ÿŸ¨ÙËÙ ‘€y”0.ÿŸIÛ´Û ‘€y”0.ÿŸêÜ Ý ‘€y”0.ÿŸ‹ÞôÞ ‘€y”0.ÿŸ*à“à ‘€y”0.ÿŸÉáìá ‘€y”0.ÿŸhãÑã ‘€y”0.ÿŸå*å ‘€y”0.ÿŸ¨æç ‘€y”0.ÿŸLè¸è ‘€y”0.ÿŸðé\ê ‘€y”0.ÿŸ”ëÿë ‘€y”0.ÿŸ5í5î ‘€y”0.ÿŸmïÖï ‘€y”0.ÿŸ ñwñ ‘€y”0.ÿŸ­ò|ó ‘€y”0.ÿŸ²ô<õ ‘€y”0.ÿŸtöÿö ‘€y”0.ÿŸ5ø~ø ‘€y”0.ÿŸye1ŸßíPí<SALPL©Sä1Ÿz!!S"è,1Ÿh8r8 p $@L$)ÿŸr8{8 v $@L$)ÿŸ<_=V hhVkh”hVýi&jVmGmV±nônVFp„pVäq4rV…sèsV)uŒuVÍv0wVqx…yVr”VÂêVT’Vé‚<ƒV„Ñ„V"†…†VƇ)ˆVj‰͉V‹q‹VbŽmŽPmŽËŽVùèéSì1ŸM71Ÿ7£ ‘€y”0.ÿŸÛ* ‘€y”0.ÿŸž ‘€y”0.ÿŸTÚ ‘€y”0.ÿŸ¤ ‘€y”0.ÿŸÒ ‘€y”0.ÿŸƒ  ‘€y”0.ÿŸ7q1Ÿ&u5u ‘€y”0.ÿŸ{S”œ”P+•8•P¹•Ä•Pþ"žVòžèŸV蟃   $0)ÿŸƒ ® SߪñªSç²ó²  $0)ÿŸó²³P³X³S”³½³  $0)ÿŸ/´\´  $0)ÿŸÍ´-µVkµwµVwµ…µP…µݵV¶{¶V¹¶ŶVŶÓ¶PÓ¶+·V¿ÉçÉ ‘€y”0.ÿŸº$ Ä$ PÄ$ ú$ _=. K. PK. £. V€3 3 ‘€y”0.ÿŸ®6 ë6 S¸: "; Sq< €< S€< ë< ‘€y”0.ÿŸ!> 4> ‘€y”0.ÿŸI âI ‘€y”0.ÿŸ*J `K ‘€y”0.ÿŸ:T BT PÕT âT PcU vU Pø] ^ P-^ O^ Pïc öc PTd dd P–d ¦d PÑp Þp Pq *q PÝv Kw ÿŸKw ¢w 0Ÿ¢w ñw ÿŸñw Hx 0Ÿ1BüK0ŸüKLPLŠLVŠLWV0ŸW~^0Ÿx`pc0Ÿúpiw0ŸiwšwV†xÙx0ŸŸz¯zV¯}·‹0Ÿ·‹È‹PÈ‹2ŒV2Œ!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùN0Ÿ´È40Ÿí4çD0ŸE X0ŸîX`e0Ÿ`ekeVke¼e0Ÿ¼e&hV&hR›0ŸR›V›PV›a›Va›œÊ0Ÿ¡ÊâÛ0ŸâÛñÛVñÛ¹æ0Ÿ¹æÃæVÃæzé0Ÿ§éB0ŸBRPR¸ 0Ÿ¸ ½ P½ W"VW"ÊR0ŸÊRÙRVÙRX0Ÿ»YèY0Ÿ[6c0Ÿ6c²fV²f­k0Ÿ­k¿kVls0Ÿ¸t-‡0Ÿ-‡‰V‰ä 0Ÿä ò Pò  ¡V ¡,¤0Ÿ,¤˜¤V˜¤ ¤P ¤õ¤Võ¤6©0Ÿ6©I©PI©!ªV!ªK«0ŸK«_«P_«|¬V|¬¯­0Ÿ¯­íPíl®Vl®²³0Ÿ²³”µV”µ™µP™µõµVõµí·0Ÿí·È»VȻͻPÍ»>¼V>¼z¾0Ÿz¾ÞÀVÞÀæÀPæÀJÁVJÁåÒ0ŸåÒõÒPõÒÔVÔšØ0ŸšØ1ÙV1ÙÚ0ŸÚ±ÛV±Û¶ÛP¶ÛÜVÜKß0ŸKß_ßP_ß'àV'à®ã0Ÿ®ã åV ååPåzåVzåìå0Ÿìå æV æÕê0ŸÕêìêPìê“ëV“ëð0ŸðñVñ”ñP”ñúñVúñ‘ö0Ÿ‘öžöPžö¾öV¾öÓö0ŸÓöàöPàö÷V÷÷0Ÿ÷"÷P"÷J÷VJ÷Sü0ŸSü˜üV˜ü¥ü0Ÿ¥ürýVrýwýPwý<þV<þAþPAþÿVÿÿPÿÿVÿ” 0Ÿ” ¢ P¢ í Ví ™ 0Ÿ™ ¬ P¬ WVWŸ0ŸŸhVhmPmÕVÕ°0Ÿ°cVchPhÇVÇ-0Ÿ-ˆVˆu0ŸužuPžuvVvùv0ŸùvwPwwVwky0ŸkyH~VH~M~PM~çV癆0Ÿ™†«†P«†ú†Vú†z‡0Ÿz‡ЇPЇ6ˆV6ˆPŠ0ŸPŠ“’V“’˜’P˜’:”V:”Q™0ŸQ™a™Pa™Í™VÍ™×™0Ÿ×™‹›V‹››P›?V?ª0Ÿª|ªV|ªr¬0Ÿr¬&®V&®½Æ0Ÿ½ÆdÈVdÈiÈPiÈ ÊV Ê‹Þ0Ÿ‹ÞhãVhãmãPmãåVå9í0Ÿ9íŒíVŒímï0Ÿmï ñV ñŠ&0ŸŠ&ž&Pž&k'Vk'n(0Ÿn(…(P…(+V++p+h0ŸhahVahk0ŸkmVm_(0Ÿ_(0,V0,à80Ÿà8oJVoJtJPtJ5LV5L€Q0Ÿ€Q,UV,U‘¨y3cZc‘¨y×dþd‘¨y{f¢f‘¨y h’h‘¨yýi$j‘¨yk¶k‘¨ym7n‘¨y±nÌo‘¨yFpmp‘¨yäq s‘¨y…s¬s‘¨y)uPu‘¨yÍvôv‘¨yqx¿z‘¨y<|c|‘¨yà}~‘¨yrÚ€‘¨yT{‘¨yé‚„‘¨y„¨…‘¨y"†I†‘¨yƇ퇑¨yj‰‘‰‘¨y‹5‹‘¨y²ŒÙŒ‘¨yVŽŽ‘¨y 3‘¨y°‘ב‘¨yT“{“‘¨yø”•‘¨yœ–Ö‘¨y@˜g˜‘¨yä™ š‘¨yˆ›¯›‘¨y,S‘¨yО÷ž‘¨yt ›¡‘¨y¢<¢‘¨y¹£à£‘¨y]¥„¥‘¨y§(§‘¨y¥¨̨‘¨yIªpª‘¨yí«¬‘¨y‘­¸­‘¨y5¯\¯‘¨yÙ°±‘¨y²·²‘¨y4´i´‘¨yæµ.¶‘¨y«·â·‘¨y_¹¤¹‘¨y!»H»‘¨yżú¼‘¨yw¾®¾‘¨y+À]À‘¨y×Á‘¨y‹ÃàѨyGŜő¨yÇ7Ç‘¨y´ÈéÈ‘¨yfʫʑ¨y(Ì}Ì‘¨yþÍSΑ¨yÇÏБ¨yÑåÑ‘¨yYÓ®Ó‘¨y"ÕwÕ‘¨yëÖב¨yضؑ¨y0ÚWÚ‘¨yÑÛøÜ‘¨yrݙݑ¨yß:à‘¨y´àÛà‘¨yXâ⑨yùã 䑨yšåÁ摨y;ç;鑨yµêÜ둨yVì}쑨yúí!yžï×yTñ{ñ‘¨yõòó‘¨y–ô½õ‘¨y7öpö‘¨ypö(÷ ‘¨z” $ &Ÿê÷ù‘¨y‹ù²ù‘¨y²ùmú ‘¨z” $ &Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw^†xÙx0ŸŸz¯z^¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡ÊžD0ŸžD¨DP¨D E^ E´E0Ÿ´E¿EP¿EjF^jFˆF0ŸˆF™FP™FëF‘zëFG0ŸGGPG7G^7GGG0ŸGGWGPWG¦G^¦G¿k0Ÿl¯–0Ÿ¯–·–P·–—^——P—_—‘z’— ˜^ ˜Ò˜VÒ˜ð˜^ð˜1™V1™®™^®™¶™P¶™ š^ šÚš0ŸÚš²›^²›ü›0Ÿü›œPœ[œ^[œ20Ÿ2‘^‘‰¡0Ÿ‰¡š¡Pš¡ê¡‘¸yê¡ú¡0Ÿú¡¢P¢R¢^R¢¢0Ÿ¢í¢^í¢K£PK£,¤0Ÿ,¤4¤P4¤“¤‘¸y˜¤1ª0Ÿ1ª<ªP<ª«ª‘€y«ªɯ0ŸÉ¯Ô¯PÔ¯%°^%°à°0Ÿà°ë°Pë°±^±«±0Ÿ«±°±P°±²^²ã²0Ÿã²è²Pè²O³^O³¾0Ÿ¾&¾P&¾z¾‘€yz¾¨Â0Ÿ¨Â³ÂP³Â-Ã^-ìÃ0Ÿ¬ÃÀÃPÀÃßÃ^ßÃRÅ0ŸRÅZÅPZÅ®Å^®Å8Æ0Ÿ8ÆHÆPHÆ0Ç^0Ç{Ç0Ÿ{ÇÇPÇ®Ç^®ÇJÊ0ŸJÊUÊPUÊ£Ê^£Ê³Ê0Ÿ³Ê½ÊP½ÊË^˃Ë0ŸƒËŽËPŽËÜË^ÜËðË0ŸðËÌPÌ*Ì^*Ì=Ì0Ÿ=ÌMÌPMÌ”Ì^”Ì©Ì0Ÿ©Ì¹ÌP¹ÌøÌ^øÌEÎ0ŸEÎQÎPQΘÎ^¼ÎÄÎPÄÎ'Ï^'Ï´Ï0Ÿ´ÏÓÏPÓÏ÷Ï^÷Ï7Ñ0Ÿ7ÑGÑPGѦё€y¦ÑÐÑ0ŸÐÑïÑPïÑÒ^ÒHÕ0ŸHÕXÕPXÕžÕ^žÕÿÕ0ŸÿÕÖPÖtÖ^tÖØ0ŸØØPØ%Ø^%ئÙ0Ÿ¦Ù«ÙP«ÙÚ^Ú.á0Ÿ.á:áP:áQá^QáVáPVáÆá^ÆáLâ0ŸLâWâPWâÄâ^Äâàç0ŸàçåçPåçUè^UèÊè0ŸÊèÜèPÜèé^éê0ŸêLê^LêÈë0ŸÈëØëPØëì^ì2ì0Ÿ2ì—ì^—ìÝí0ŸÝíYî^Yîî0Ÿî ï^ ï‹ï0Ÿ‹ïïPïð^ðÛó0ŸÛóZô^Zô;ö0Ÿ;öNöPNöÌ÷^Ì÷èû0Ÿèû^†P†ý^ý0Ÿ„^„‰P‰ù^ùP^‘€y^å^åy 0Ÿy  P í ^í ³ 0Ÿ³ Æ PÆ W^WŸ0ŸŸþ^þPh^h°0Ÿ°Ç^ÇÌP̈^ˆNA0ŸNAVAPVA6B^6B$C0Ÿ$CŸC^ŸC§CP§ClD^lDtDPtD0E^0E8EP8EôE^ôEüEPüEVF^VF»F0Ÿ»F6G^6G>GP>GúG^úGHPH\H^\H.K0Ÿ.K9KP9K~K^~KfL0ŸfLÆL^ÆLŠM0ŸŠM‡N^‡NŒNPŒNrO^rOrP0ŸrPáP^áPæPPæPàQ^àQòQSòQ÷Q^÷QüQPüQoR^oRêR0ŸêRùRSùRcS^cSkSPkSÎS^ÎST0ŸT TP T.T^.T“T0Ÿ“T›TP›TõT^õT5V0Ÿ5VV^VŸV0ŸŸVcW^cWíW0ŸíWõWPõW¿X^¿XÇXPÇXY^Y³Z0Ÿ³Z0[^0[8[P8[\^\!)0Ÿ!)1)P1)*+^*+ø<0Ÿø< =P =è=^è={f0Ÿ{fm^m$mP$m±n^±n y0Ÿ yyPy+z^+zà}0Ÿà}„^„†„P†„"†^"†_(0Ÿ_(0,^0,à80Ÿà8”A^”A™AP™AWC^WC•Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw‘ˆy†xÙx0ŸŸz¯z‘ˆy¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê»20Ÿ»2Å2PÅ2I3‘ˆyI3040Ÿ04C4PC4v4‘ˆyv4M50ŸM5a5Pa5–5‘ˆy–5­50Ÿ­5»5P»5 6‘ˆy 6§>0Ÿ§>¸>P¸>Z?‘ˆyZ?nD0ŸnDDPD´D‘ˆy´D™E0Ÿ™E­EP­EâE‘ˆyâEüE0ŸüE FP FZF‘ˆyZF¿k0Ÿl¼”0Ÿ¼”P•‘ˆyP•ò•0Ÿò•ù•‘ˆyù•N–PN–’—0Ÿ’—O˜‘ˆyO˜ð˜0Ÿð˜O™‘ˆyO™W™PW™ š‘ˆy ššPšoš‘ˆyošš›0Ÿš›¹›P¹›2‘ˆy2:P:‘‘ˆy‘™P™ö‘ˆyö' 0Ÿ' : P: C¡‘ˆyC¡˜¤0Ÿ˜¤¦‘ˆy¦ʦPʦ$§‘ˆy$§È©0ŸÈ©ЩPЩ_ª‘ˆy_ª׬0Ÿ×¬â¬P⬯‘ˆy¯’¯0Ÿ’¯¯P¯ë¯‘ˆyñ¯±0Ÿ±«±0Ÿ«±²‘ˆy²²P²ã²‘ˆyã²O³0ŸO³‡·‘ˆy‡·Œ·PŒ·í·‘ˆyí·¾0Ÿ¾z¾‘ˆyz¾‚¾P‚¾ݾ‘ˆyݾ¿0Ÿ¿/¿P/¿4¿^4¿ ¿0Ÿ ¿¨¿P¨¿À^ÀïÁ0ŸïÁÿÁPÿÁþ‘ˆyþÂÃ0ŸÃ'ÃP'ÚшyšÃQÄ0ŸQÄaÄPaÄËÄ‘ÐzËĘÅ0Ÿ˜Å¨ÅP¨ÅÆ‘ˆyÆòÆ0ŸòÆýÆPýÆiÇ‘€yiÇÚÇ0ŸÚÇàÇPàÇ6È^6ÈrÈ0ŸrȆÈP†ÈÃÈ‘ˆyÃÈQÐ0ŸQÐdÐPdÐÑ‘ˆyÑ’Ò0Ÿ’Ò¥ÒP¥ÒÔ‘ˆyÔšØ0ŸšØ1Ù‘ˆy1ÙÚ0ŸÚØÜ‘ˆyØÜÝÜPÝÜDÝ‘ˆyDÝ…ß0Ÿ…ß–ßP–ß'à‘ˆy'à®ã0Ÿ®ãE䑈yEäJäPJä£ä‘ˆy£äìå0Ÿìå æ‘ˆy æžê0Ÿžê±êP±ê“둈y“ëð0Ÿðgò‘ˆygòlòPlòÝò‘ˆyÝòéö0ŸéöúöPúöÌ÷‘ˆyÌ÷èû0Ÿèû×ý‘ˆy×ýÜýPÜý<þ‘ˆy<þå0ŸåC‘ˆyCKPKŸ‘ˆyŸ" 0Ÿ" 5 P5 á ‘ˆyá 0ŸPW‘ˆyWŸ0ŸŸÒ‘ˆyÒ×P×0‘ˆy0°0Ÿ°]‘ˆy]bPbÉ‘ˆyÉÂ#0ŸÂ#Ð#PÐ#$‘ˆy$H&0ŸH&X&PX&±&‘ˆy±&¾+0Ÿ¾+m,‘ˆym,r,Pr,-‘ˆy-G10ŸG1²1‘ˆy²1·1P·12‘ˆy260Ÿ66P6}7‘ˆy}7˜80Ÿ˜8Ë;‘ˆyË;Ð;PÐ;?<‘ˆy?<~>0Ÿ~>>P>¬>T¬>È>‘ˆyÈ>=?0Ÿ=?œ?‘ˆyœ?óJ0ŸóJKPKEK‘ˆyEK~K0Ÿ~KðK‘ˆyðKõKPõKbL‘ˆybLáL0ŸáLíLPíL M^ MMPMŠM^ŠM O0Ÿ OOPOrO‘€yrOÑO^ÑOöO‘ˆyöOûOPûOrP^rPáP0ŸáPPQ‘ˆyPQS0ŸS SP ScS‘ˆycSZU0ŸZU_UP_U¡U‘ÐzÌUW0ŸW WP WíW‘ˆyíW¿X0Ÿ¿X¤Y‘ˆy¤YÂYSÂYÇY‘ˆyÇYÏYPÏY,Z‘ˆy,Z@ZS@ZEZ‘ˆyEZñ0Ÿñ(P(k‘ˆykÙ0ŸÙA‘ˆyAIPI©‘ˆy©±)0Ÿ±)Á)PÁ)*+‘ˆy*+Þ<0ŸÞ<ñ<Pñ<è=‘ˆyè={f0Ÿ{f±n‘ˆy±n¶nP¶nFp‘ˆyFp%y0Ÿ%y8yP8y+z‘ˆy+zà}0Ÿà}é‚‘ˆyé‚î‚Pî‚„‘ˆy„_(0Ÿ_(0,‘ˆy0,à80Ÿà8T<‘ˆyT<Y<PY<>‘ˆy>‘0Ÿ‘‘P‘¢‘‘ˆy¢‘%’0Ÿ%’5’P5’%“‘ˆy%“r“0Ÿr“†“P†“Ó‘ˆyÓ@–0Ÿ@–N–PN–Þ–‘ˆyÞ–—0Ÿ—®—P®—x˜‘ˆyx˜ ™0Ÿ ™™P™X™‘ˆyX™ô 0Ÿô ¡P¡™¡‘ˆy™¡ߢ0Ÿß¢ò¢Pò¢(¤‘ˆy(¤Þ¥0ŸÞ¥©‘ˆy©©P©£©‘ˆy£©Œ«0ŸŒ«Ÿ«PŸ«M¬‘ˆyM¬…­0Ÿ…­ø®‘ˆyø®¯P¯þ¯‘ˆyþ¯i·0Ÿi·%¹‘ˆy%¹-¹P-¹º¹‘ˆyº¹Ÿ»0ŸŸ»u½‘ˆyu½ýÀ0ŸýÀÁPÁ}Á‘ˆy}ÁçÂ0Ÿç ÃP ÃAшyAÃîÃ0ŸîÃÎÄ‘ˆyÎÄÖÄPÖÄ;Æ‘ˆy;ÆbÆSbÆjÆPjÆÊÆ‘ˆyÊÆ;Ç0Ÿ;ÇTÇSTÇÉÇ‘ˆyÉÇÑÇPÑÇ1È‘ˆy1È… 0Ÿ… ª Pª × ‘ˆy×  0Ÿ ™ ‘ˆy™ $ 0Ÿ$ ¦ ‘ˆy¦ ® P® +! ‘ˆy+! Á! 0ŸÁ! Ø" ‘ˆyØ" '# V'# /# P/# ¤# ‘ˆy¤# ó# Vó# &$ ‘ˆy&$ Ý% 0ŸÝ% Z& ‘ˆyZ& ¾K 0ŸßK ¸j 0ŸÖj h 0Ÿh &€ ‘ˆy&€ Ç€ 0ŸÇ€ & ‘ˆy& + P+ ä ‘ˆyä é Pé F‚ ‘ˆyF‚ -ƒ 0Ÿ-ƒ Lƒ PLƒ >„ ‘ˆy>„ C„ PC„ ‹„ ‘ˆy‹„ º„ 0Ÿº„ … ‘ˆy… … P … m… ‘ˆym… Ë… 0ŸË… ‹† ‘ˆy‹† &‡ 0Ÿ&‡ b‡ ‘ˆyb‡ g‡ Pg‡ ¼‡ ‘ˆy¼‡ •Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw\†xÙx0ŸŸz¯z\¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê£20Ÿ£2²2P²2î2\î2J40ŸJ4Y4PY4v4\v4ˆD0ŸˆD—DP—D´D\´D¿k0Ÿlõ—0Ÿõ—E˜\E˜ð˜0Ÿð˜O™\O™Y›0ŸY›®›\®›ü›0Ÿü›[œ\[œcœPcœ½œ\½œ20Ÿ2‘\‘A 0ŸA T PT C¡\C¡˜¤0Ÿ˜¤c¦\c¦k¦Pk¦¦\¦f«0Ÿf«s«Ps«œ«\œ«´«0Ÿ´«Á«PÁ«à«\à«ø«0Ÿø«¬P¬,¬\,¬´0Ÿ´c´\c´Ó´0ŸÓ´3µ\3µ[¸0Ÿ[¸£¸\£¸²¸0Ÿ²¸¹\¹”¹P”¹oº\oºtºPtºU»\U»Z»PZ»È»\È»á¾0Ÿá¾%¿\%¿ ¿0Ÿ ¿À\À¢0Ÿ¢²P²W\WŸ0ŸŸD\DIPI¸\¸0ŸY\Y-0Ÿ-ˆ\ˆ”#0Ÿ”#¢#P¢#$\$&0Ÿ&&P&±&\±&¾+0Ÿ¾+o-\o-t-Pt-Ë-\Ë-²10Ÿ²1U2\U2Z2PZ2±2\±260Ÿ6.6P.6}7\}7˜80Ÿ˜8Z;\Z;_;P_;Ë;\Ë;?*0Ÿ?*O*PO**+\*+Å<0ŸÅ<Õ<PÕ<²=\²=è=p0è={f0Ÿ{fFp\FpKpPKpäq\äq?y0Ÿ?yXyPXyõy\õy+zpÀ+zà}0Ÿà}T\TYPYé‚\é‚_(0Ÿ_(y*\y*~*P~*0,\0,O¡0ŸO¡]¡P]¡±¡\±¡@£0Ÿ@£W£PW£(¤\(¤Þ¥0ŸÞ¥Ò¦\Ò¦Ú¦PÚ¦d§\d§ù§0Ÿù§y¨\y¨/«0Ÿ/«B«PB«M¬\M¬…­0Ÿ…­"±\"±*±P*±´±\´±i·0Ÿi·q·Pq·û·\û·Ÿ»0ŸŸ»u½\u½¸j 0ŸÖj œ{ 0ŸÃ{ Ë 0ŸË € \€ Ç€ 0ŸÇ€ & \& ì‚ 0Ÿì‚ Aƒ \Aƒ ‹ƒ 0Ÿ‹ƒ ñƒ \ñƒ öƒ Pöƒ >„ \>„ … 0Ÿ… m… \m… )† 0Ÿ)† † \† &‡ 0Ÿ&‡ ¼‡ \¼‡ Á‡ PÁ‡ ˆ \ˆ •Š 0Ÿc“h“Ph“”\¼,Ú-0ŸÚ-.‘¨~.>‘¨~#Ÿ>QÊR\xr‡r\¯ÿ\w°\? € \ø 1 \À  \S¾\5q\-#-P#-<-‘ÈzeÉ¿É\çÉþÉ\®6 ‚7 \ÿ8 )9 \¸: ù: \q< €< \4> => rŸ=> C> ‘¨~#Ÿ`K ¾K ‘¨~#ŸßK S ‘¨~#Ÿ S S PS =S ‘¨~=S RS 0ŸRS pS ^pS …S ~Ÿ…S mT ^ËT QU ^cU @W ^¬W ÀW ^X NX ^œX Y ^"Y lZ ^ÅZ 7[ ^ [ $\ ^<\ D\ 0ŸD\ j\ ‘°yj\ u\ S}\ a ‘°ya xa ‘°y}a b ‘°y b `b ‘°yb ßb ‘°yäb c ‘°y,c ‚c ‘°y„c °c ‘°yïc Od ‘°yTd àe ‘°yåe ^f ‘°ycf šf ‘°yŸf 'g ‘°y,g Úg ‘°yÚg äg Päg ‹h ‘°y™h íh ‘°yòh Pi ‘°yUi +j ‘°y0j Žj ‘¨~dl Õl ‘°yÚl hm ‘°y$o ¶o ‘°yìo wp ‘°y|p °p ‘°yµp q ‘°yq Qq ‘°y-t Qu ‘¨~#ŸÂu •Š ‘¨~#ŸÚ/W0‘¸}W0>‘à}»AB‘˜yBæC‘¸yŒ‘¸y ‘‘¸y–ü‘¸yŽuŽ‘¸yzŽôŽ‘¸ydhhhÊ‘˜yÝ‘˜yY]h]Í‘¸yÒ㑘yãW‘‘¸y`K ¾K ‘à}ßK M ‘à} M M ‘¸} M °M ‘à}°M 'N ‘¸}:N >N d>N ÊN ‘à}TO XO gXO äO ‘¸}-t Qu ‘à}Âu •Š ‘à}1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw‘øx†xÙx0ŸŸz¯z‘øx¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0ŸlP¬0ŸP¬X¬PX¬­‘øx­5­0Ÿ5­H­PH­â®‘øxâ®ô®0Ÿô®þ®Pþ®¾¯‘øx¾¯Ȱ0ŸÈ°±‘øx±²0Ÿ²}²‘øx}²‚²P‚²/´‘øx/´r´Sr´Ó´‘øxÓ´ø´Sø´!·‘øx!·&·P&·í·‘øxí·ò·Pò·W¸‘øxW¸™¸0Ÿ™¸­¸P­¸²¸^²¸"¹0Ÿ"¹'¹P'¹¹^¹>Â0Ÿ>ÂLÂPLÂÖ‘øxÖÂÉÃ0ŸÉÃÙÃPÙÛđøx›ÄßÄ0ŸßÄóÄPóÄ0Å‘øx0Å‚Æ0Ÿ‚ÆÆPÆ Ç‘øx ǘÇ0Ÿ˜Ç¨ÇP¨ÇÈ‘øxÈ È0Ÿ È0ÈP0È^È‘˜z^ÈêÈ0ŸêÈðÈPðÈXÉ‘ˆyXɺÉ0ŸºÉÊÉPÊÉÊ‘øxÊ.Ê0Ÿ.ÊCÊPCÊxÊ‘øxxÊÊ0ŸÊÊPÊØÊ‘øxØÊË0ŸËËPËQË‘€zQËgË0ŸgË|ËP|˱ˑøx±ËÆË0ŸÆËÖËPÖ˔̑øx”Ì5Ð0Ÿ5ÐHÐPHÐÑ‘øxÑ®Ò0Ÿ®ÒÂÒPÂÒÔ‘øxÔšØ0ŸšØ1Ù‘øx1ÙÚ0ŸÚuÜ‘øxuÜzÜPzÜØÜ‘øxØÜhß0Ÿhß|ßP|ß'à‘øx'à®ã0Ÿ®ã£ä‘øx£ä¨äP¨ä 呸x åìå0Ÿìå æ‘øx æºê0ŸºêÎêPÎê“ë‘øx“ëð0Ÿðúñ‘øxúñÿñPÿñgò‘øxgò§ö0Ÿ§ö¸öP¸öÌ÷‘øxÌ÷èû0Ÿèûªþ‘øxªþ¯þP¯þÿ‘øxÿå0ŸåŸ‘øxŸ§P§‘øx® 0Ÿ® ¶ P¶ ) ^) $0Ÿ$/P/—^—µ0ŸµÚPÚ‘øxH0ŸH·‘øx·i0Ÿi´^´Ý‘øxÝâPâI^IÌ0ŸÌØPØï^ïôPôd^d+#0Ÿ+#>#P>#$‘øx$u%0Ÿu%ˆ%Pˆ%±&‘øx±&¾+0Ÿ¾+\/‘øx\/a/Pa/Ð/‘øxÐ/²10Ÿ²1ã3‘øxã3è3Pè3W4‘øxW4†60Ÿ†6™6P™6}7‘øx}7˜80Ÿ˜8Þ9‘øxÞ9ã9Pã91:‘øx1:©=0Ÿ©=Å=^Å= >‘øx >>P>r>^r>½>0Ÿ½>Ä>PÄ>Ò>^Ò>=?0Ÿ=?E?PE?œ?^œ? D0Ÿ D’E‘øx’EšEPšEVF‘øxVF^FP^F»F‘øx»FÃFPÃFG‘€z6G˜G‘øx˜G GP G\H‘øx\HdHPdH&I‘øx&I.IP.I‹I‘øx‹IùI0ŸùI J‘ˆyuJzJPzJçJ‘ˆyçJ_K0Ÿ_KsKPsK~K‘ˆy~KbL0ŸbLL‘øxLSMVSMŠM‘øxŠMÔMVÔM N‘øx NNPN‡N‘øx‡N O0Ÿ OrO‘øxrOwOPwOäO‘˜zöOrP‘øxrPwPPwPáP‘ˆyáPPQ0ŸPQUQPUQ¿Q‘øx¿QÚS0ŸÚSéSPéSTUT$T‘øx$T.T0Ÿ.TõT‘øxõTýTPýTPV‘øxPVŸVVŸV§VP§VW‘øxWXX0ŸXX¡XV¡XY‘øxY YP YtY‘øxtY@¤0Ÿ@¤P¤PP¤¬¤‘øx¬¤Ö«0ŸÖ«Þ«PÞ«w¬^w¬ج0ŸØ¬ë¬^ë¬i­‘øxi­…­0Ÿ…­­P­ ®^ ®V®0ŸV®a®Pa®o®^o®¯0Ÿ¯‰¯P‰¯þ¯^þ¯u½0Ÿu½ ¾‘øx ¾¾P¾œ¾‘øxœ¾¨¾0Ÿ¨¾ξPξ ¿‘øx ¿kÀ0ŸkÀýÀ‘øxýÀƒV 0ŸƒV ºV PºV ìV ‘øxìV ,W 0Ÿ,W €W ‘øx¬W ±W P±W X ‘øxX Y 0Ÿ"Y ¦Y 0Ÿ¦Y ÄY PÄY Z ‘øxZ ÅZ 0ŸÅZ &[ ‘øx&[ +[ P+[  [ ‘øx [ ] 0Ÿ] ] P] g] ‘øxg] “] ‘˜y“] ‰^ 0Ÿ‰^ ®^ P®^ ö^ ‘øxö^ Í_ 0ŸÍ_ ×_ P×_ $` ‘øx$` a 0Ÿa }a ‘øx}a `b 0Ÿb äb 0Ÿäb c ‘øx,c Ød 0ŸØd ýd Pýd Ee ‘øxEe e 0Ÿe åe ‘øxåe }g 0Ÿ}g g Pg Úg ‘˜yÚg ji 0Ÿji wi Swi $o 0Ÿ$o ìo ‘øxìo öo Pöo |p 0Ÿ|p Çp ‘øxÇp •Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw_†xÙx0ŸŸz¯z_¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0Ÿl$®0Ÿ$®,®P,®º®_º®O³0ŸO³²³_²³·³P·³´_´]´0Ÿ]´m´Pm´r´_r´Ó´0ŸÓ´Ø´PØ´3µ_3µÐ0ŸÐ›ÐP›Ð*Ñ_*ÑRÒ0ŸRÒeÒPeÒÔ_ÔÔ0ŸÔ§ÔP§Ô+Õ_+Õ€×0Ÿ€×%Ø_%Ø*ØP*ØÙ_Ù1ÙS1ÙÚ_Ú0ÚS0Ú¹Ý_¹Ý¾ÝP¾Ý.Þ_.ÞÑÞ0ŸÑÞäÞPäÞsà_sàƒà0ŸƒààPàá_áÆá0ŸÆáÄâ_ÄâÉâPÉâ-ä_-äEäSEäìå_ìåæSæóæ_óæøæPøæhç_hç^ê0Ÿ^êqêPqêúë_úë ì0Ÿ ììPì›ì_›ìÝí0ŸÝíî_î•îP•îð_ð¤ðS¤ð ñ_ ñ$ñS$ñ\ó_\óaóPaóÛó_Ûó$ö0Ÿ$ö4öP4öø_ø!ø0Ÿ!ø+øP+øÇø_Çø²ù0Ÿ²ùkú_kúpúPpújü_jü¥ü\¥ü ý_ ý4ý\4ýý_ýP|_|å0ŸåŽ_Ž–P–ç_çB 0ŸB U PU Ó _Ó â 0Ÿâ õ Põ k _k b0ŸbmPmå_åM0ŸM·_·d0Ÿd<_<APAŸ_ŸD0ŸD%_%cSc-_-VSV> _> C PC ³ _³ a#0Ÿa#t#Pt#$_$¬%0Ÿ¬%¹%P¹%Ø%_Ø%ð%0Ÿð%ý%Pý%&_&2&0Ÿ2&?&P?&^&_^&,0Ÿ,c,_c,m,0Ÿm,-_--P-Ë-_Ë-Ð-PÐ-‰._‰.Ž.PŽ.ñ._ñ.²10Ÿ²13_33P3x3_x3N60ŸN6a6Pa6}7_}7˜80Ÿ˜8:_:’:P’:ò:_ò: >0Ÿ >@_@@P@r@_r@0ŸY_Y0Ÿs_s¸£0Ÿ¸£Æ£PÆ£V¤_V¤Ÿ»0ŸŸ»§»P§»¼_¼ ¾0Ÿ ¾œ¾_œ¾ä¾0Ÿä¾ï¾Pï¾5¿_5¿Ó¿0ŸÓ¿kÀ_kÀsÀPsÀýÀ_ýÀgY 0ŸgY ¿Y _¿Y &[ 0Ÿ&[  [ _ [ •Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw‘ y†xÙx0ŸŸz¯z‘ y¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0Ÿl¾ 0Ÿ¾ Æ PÆ [ ‘ y[  0Ÿ ’ P’ ¸‘ y¸Ê0ŸÊÔPÔR‘ yRÝ0ŸÝÁ‘ yÁd0ŸdБ yÐÕPÕ!‘ y!?S?Ÿ‘ yŸ³S³Õ‘ yÕÚPÚ°‘ y°µPµ ‘ y G0ŸG^P^c‘ yc-0Ÿ-2P2ˆ‘ yˆG#0ŸG#Z#PZ#$‘ y$‘%0Ÿ‘%¥%P¥%±&‘ y±&¾+0Ÿ¾+ñ.‘ yñ.ö.Pö.\/‘ y\/²10Ÿ²1x3‘ yx3}3P}3ã3‘ yã3j60Ÿj6}6P}6}7‘ y}7˜80Ÿ˜81:‘ y1:6:P6::‘ y:y¡0Ÿy¡¡P¡2¢‘ y2¢`£0Ÿ`£w£Pw£(¤‘ y(¤Þ¥0ŸÞ¥æ¥Pæ¥g¦‘ yg¦´¦0Ÿ´¦ͦPͦÒ¦‘ yÒ¦ù§0Ÿù§¨P¨y¨‘ yy¨«0Ÿ«(«P(«M¬‘ yM¬…­0Ÿ…­´±‘ y´±¼±P¼±I²‘ yI²öº0Ÿöºˆ»‘ yˆ»Ÿ»0ŸŸ»ì¼‘ yì¼ô¼Pô¼u½‘ yu½•Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw‘¨y†xÙx0ŸŸz¯z‘¨y¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîXœÊ0Ÿ¡Ê¿k0Ÿlñ0ŸñÿPÿ‘¨y<0Ÿ<Ÿ‘¨yŸ¤P¤ñ‘¨yñ}#0Ÿ}##P#$‘¨y$Â%0ŸÂ%Ò%PÒ%±&‘¨y±&¾+0Ÿ¾+*.‘¨y*./.P/.‰.‘¨y‰.²10Ÿ²1±2‘¨y±2¶2P¶23‘¨y3760Ÿ76G6PG6}7‘¨y}7˜80Ÿ˜8ò:‘¨yò:÷:P÷:Z;‘¨yZ;€£0Ÿ€£Ž£PŽ£(¤‘¨y(¤s¦0Ÿs¦‚¦P‚¦¡¦R¡¦Ȧ‘¨yȦù§0Ÿù§y¨‘¨yy¨®0Ÿ®&®P&®E®TE®e®‘¨ye®¯0Ÿ¯þ¯‘¨yþ¯Ÿ»0ŸŸ»l¼‘¨yl¼t¼Pt¼ì¼‘¨yì¼•Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw‘ˆ}†xÙx0ŸŸz¯z‘ˆ}¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîX¼e0Ÿ¼e&h EŸ&hœÊ0Ÿ¡Ê¿k0ŸlÛ£0ŸÛ£,¤ ËŸ,¤F±0ŸF±«± ÑŸ«±×0Ÿ×€× óŸ€×ã0ŸãH ŸH#0Ÿ# TŸ|0Ÿ|7 Ÿ7 0Ÿ ž sŸžH^0ŸH^ö_ zŸö_¾K 0ŸßK $U 0ŸcU ¶[ 0Ÿ¶[ \  WŸ\ `b 0Ÿb c 0Ÿ,c »c 0Ÿïc d 0Ÿd Td  ^ŸTd Ìf 0ŸÌf ,g  _Ÿ,g i 0Ÿi Ui  gŸUi Oj 0ŸOj Žj  VŸÖj õj 0Ÿõj k  ¬Ÿdl ¾~ 0Ÿ¾~ ý~  ²Ÿý~ •Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw 0¶ Ÿ†xÙx0ŸŸz¯z 0¶ Ÿ¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîX¼e0Ÿ¼e&h 0¶ Ÿ&hœÊ0Ÿ¡Ê¿k0ŸlÛ£0ŸÛ£,¤ 0¶ Ÿ,¤F±0ŸF±«± 0¶ Ÿ«±×0Ÿ×€× 0¶ Ÿ€×ã0ŸãH 0¶ ŸH#0Ÿ# 0¶ Ÿ|0Ÿ|7 0¶ Ÿ7 0Ÿ ž 0¶ ŸžH^0ŸH^ö_ 0¶ Ÿö_¾K 0ŸßK $U 0ŸcU ¶[ 0Ÿ¶[ \ 0¶ Ÿ\ `b 0Ÿb c 0Ÿ,c »c 0Ÿïc d 0Ÿd Td 0¶ ŸTd Ìf 0ŸÌf ,g 0¶ Ÿ,g i 0Ÿi Ui 0¶ ŸUi Oj 0ŸOj Žj 0¶ ŸÖj õj 0Ÿõj k 0¶ Ÿdl ¾~ 0Ÿ¾~ ý~ 0¶ Ÿý~ •Š 0Ÿ1BWV0ŸW~^0Ÿx`pc0Ÿúpiw0Ÿiwšw‘€}†xÙx0ŸŸz¯z‘€}¯}!Æ0Ÿ½ÆSã0Ÿ™ã°ù0Ÿ¹ùÈ40Ÿí4çD0ŸE X0ŸîX¼e0Ÿ¼e&h‘€}&hœÊ0Ÿ¡Ê¿k0ŸlÛ£0ŸÛ£,¤ ‚5Ÿ,¤F±0ŸF±«± †6Ÿ«±×0Ÿ×€× ?9Ÿ€×ã0ŸãH –;ŸH#0Ÿ# ß@Ÿ|0Ÿ|7 ’.Ÿ7 0Ÿ ž m-ŸžH^0ŸH^ö_ Á-Ÿö_¾K 0ŸßK $U 0ŸcU ¶[ 0Ÿ¶[ \  AŸ\ `b 0Ÿb c 0Ÿ,c »c 0Ÿïc d 0Ÿd Td  BŸTd Ìf 0ŸÌf ,g  (BŸ,g i 0Ÿi Ui  UBŸUi Oj 0ŸOj Žj  AŸÖj õj 0Ÿõj k  ÷1Ÿdl ¾~ 0Ÿ¾~ ý~  è2Ÿý~ •Š 0ŸäBèBPèB=C‘y_†o†‘yŸ‰͉‘yïBúBPúB=CS_†o†SŸ‰͉SäB2E0Ÿúpiw0Ÿ_†o†0ŸW‰o‰0ŸŸ‰ë‰0ŸÏ™ß™0Ÿô¡̤0ŸÚ©©«0Ÿ‰¯—Â0ŸÄÂÃ0Ÿ2ÐÁÕ0ŸiÝNà0Ÿ1çê0Ÿpüÿ0Ÿu i0ŸÁß0Ÿ.DØD0ŸEEØG0ŸiJ“J0Ÿ7M#O0ŸøQGR0ŸðSÿS0ŸU1U0ŸáW X0ŸîX-Y0Ÿ‰b˜b0Ÿ8iGi0Ÿîr¾u0Ÿ)~Á€0Ÿžƒ9†0Ÿ‰Š‹0Ÿz’’0Ÿë•{˜0Ÿ>°¡º0Ÿ°ºC½0ŸjʼnÊ0ŸÙ‡Û0ŸÜ¨Þ0Ÿqá¦æ0Ÿãæzé0Ÿçê‚í0Ÿð»ò0Ÿø+û0Ÿ>ûÖý0ŸB…0ŸR0ŸÁ0ŸW"%0Ÿ_?_0Ÿ²f­k0Ÿ}n s0Ÿ¢Š·Š0ŸN`c`0Ÿk` e0Ÿerxr0Ÿ~ø¯0Ÿ€{0Ÿ„Ï[ 0ŸC> X> 0ŸA I 0ŸäB2E0Ÿúpiw0Ÿ_†o†0ŸW‰o‰0ŸŸ‰͉ +ŸÏ™ß™0Ÿô¡̤0ŸÚ©©«0Ÿ‰¯—Â0ŸÄÂÃ0Ÿ2ÐÁÕ0ŸiÝNà0Ÿ1çê0Ÿpüÿ0Ÿu i0ŸÁß0Ÿ.DØD0ŸEEØG0ŸiJ“J0Ÿ7M#O0ŸøQGR0ŸðSÿS0ŸU1U0ŸáW X0ŸîX-Y0Ÿ‰b˜b0Ÿ8iGi0Ÿîr¾u0Ÿ)~Á€0Ÿžƒ9†0Ÿ‰Š‹0Ÿz’’0Ÿë•{˜0Ÿ>°¡º0Ÿ°ºC½0ŸjʼnÊ0ŸÙ‡Û0ŸÜ¨Þ0Ÿqá¦æ0Ÿãæzé0Ÿçê‚í0Ÿð»ò0Ÿø+û0Ÿ>ûÖý0ŸB…0ŸR0ŸÁ0ŸW"%0Ÿ_?_0Ÿ²f­k0Ÿ}n s0Ÿ¢Š·Š0ŸN`c`0Ÿk` e0Ÿerxr0Ÿ~ø¯0Ÿ€{0Ÿ„Ï[ 0ŸC> X> 0ŸA I 0ŸäB=C0Ÿ_†o†0ŸŸ‰͉ 0¶ ŸäB2E0Ÿúpiw0Ÿ_†o†0ŸW‰o‰0ŸŸ‰͉ $ŸÏ™ß™0Ÿô¡̤0ŸÚ©©«0Ÿ‰¯—Â0ŸÄÂÃ0Ÿ2ÐÁÕ0ŸiÝNà0Ÿ1çê0Ÿpüÿ0Ÿu i0ŸÁß0Ÿ.DØD0ŸEEØG0ŸiJ“J0Ÿ7M#O0ŸøQGR0ŸðSÿS0ŸU1U0ŸáW X0ŸîX-Y0Ÿ‰b˜b0Ÿ8iGi0Ÿîr¾u0Ÿ)~Á€0Ÿžƒ9†0Ÿ‰Š‹0Ÿz’’0Ÿë•{˜0Ÿ>°¡º0Ÿ°ºC½0ŸjʼnÊ0ŸÙ‡Û0ŸÜ¨Þ0Ÿqá¦æ0Ÿãæzé0Ÿçê‚í0Ÿð»ò0Ÿø+û0Ÿ>ûÖý0ŸB…0ŸR0ŸÁ0ŸW"%0Ÿ_?_0Ÿ²f­k0Ÿ}n s0Ÿ¢Š·Š0ŸN`c`0Ÿk` e0Ÿerxr0Ÿ~ø¯0Ÿ€{0Ÿ„Ï[ 0ŸC> X> 0ŸA I 0Ÿ-C=CP_†d†Pd†o†wŸ‰¼‰P¼‰͉wbCÂC0ŸÚ©ø©0Ÿj²ˆ²0ŸçÂÃ0ŸbCÂC]Ú©ø©]j²ˆ²]çÂÃ]bCÂCSÚ©ø©Sj²ˆ²SçÂÃS«C¯CP¯CÂC‘¸{çÂѸ{mCÂCVÚ©ø©Vj²ˆ²VçÂÃVóCúCPúC7Dw†ttSD7DpÿŸ†t˜tpÿŸ˜tt s‘˜})ÿŸ„DDPD®D]‰¯œ¯]D®DpÿŸ‰¯—¯pÿŸ—¯œ¯ }‘˜})ÿŸƒ´—´Q—´ž´ (0*1RBRQBRGR (0*,_6_Qƒ´ž´P1RGRP,_6_P‡´š´Tš´ž´p1RGRT,_/_T/_6_pMÑÝó ÿŸöàû ÿŸMÑÝó0Ÿöàû0Ÿ™ßòß‘èyD¶a¶R~º˜ºRC> O> RD¶O¶PO¶e¶‘Øy~º¡º‘ØyC> X> ‘ØyH¶a¶Q~º‚ºQ‚º˜º‘Øy#C> O> ‘Øy#´¶ý¶SöNOSýr¦sS϶A·VýrsVø¤øVRÓVçV϶ý¶SýrsSî¶A·Vø ùVRÓVçVî¶ý¶Sý¶A·Sø%ùSRíSçS*·.·P.·A·‘à|RÊ‘à|ç‘à|ù¶A·]ø·ø]Rq]ç]|·»‘ y.D=D‘ yO#O‘ yðSÿS‘ y"U1USX X‘ yîX-Y‘ y‰b˜b‘ yîrýr‘ y u¾u‘ y‰>‰‘ yz’’‘ yë•/–‘ yoµšµ‘ yæ·2¸‘ y°º÷º‘ yjŕő yÙ’Ú‘ yÜ\Ü‘ yqáºá‘ yãæ1ç‘ y>ûiû‘ yµýÖý‘ yBŠ‘ yÓ#‘ yl…‘ y]‘ y¦Á‘ y_,_‘ y²fÝf‘ y¢Š·Š‘ yerxr‘ yA A ‘ yÞC D ‘ yUF §F ‘ y·ß·Rz’”’R¢Š®ŠR·Í·PÍ·ã·‘Øyz’’‘Øy¢Š·Š‘ØyÆ·ß·Qz’~’Q~’”’‘Øy#¢Š®Š‘Øy#ÿ·¸Ræ·þ·R_#_Rÿ·¸Sæ·¸S_,_Sÿ·¸Qæ·ê·Qê·þ·s_#_s5¸C¸_5¸Â ÿŸO#O ÿŸðSÿS ÿŸX X ÿŸîX-Y ÿŸ‰b˜b ÿŸîrýr ÿŸ u¾u ÿŸë•{˜ ÿŸ¸~º ÿŸ°ºC½ ÿŸjÅáÇ ÿŸÜ¨Þ ÿŸqáä ÿŸãæzé ÿŸ>ûÖý ÿŸB… ÿŸÁ ÿŸ²f)i ÿŸk` e ÿŸerxr ÿŸ~ø¯ ÿŸBƒ{ ÿŸ„Ï[  ÿŸA I  ÿŸ5¸Â0ŸO#O0ŸðSÿS0ŸX X0ŸîX-Y0Ÿ‰b˜b0Ÿîrýr0Ÿ u¾u0Ÿë•{˜0Ÿ¸~º0Ÿ°ºC½0ŸjÅáÇ0ŸÜ¨Þ0Ÿqáä0Ÿãæzé0Ÿ>ûÖý0ŸB…0ŸÁ0Ÿ²f)i0Ÿk` e0Ÿerxr0Ÿ~ø¯0ŸBƒ{0Ÿ„Ï[ 0ŸA I 0Ÿˆ¸U¹^O#O^X X^jÅ­Å^qáÒá^ãæ=ç^i^¦Á^å¸6¹0Ÿqá~á0Ÿãæ÷æ0Ÿ#0Ÿ¦Á0Ÿå¸6¹Vqá~áVãæ÷æV#V¦ÁVå¸6¹^qá~á^ãæ÷æ^#^¦Á^%¹)¹P)¹6¹QQì¸6¹Sqá~áSãæ÷æS#S¦ÁS‚¹¹RµýÍýRerorRo¹¡¹VµýÖýVerxrV†¹¹Qµý¹ýQ¹ýÍýverorvô¹=ºVîrýrV°º#»Vºuº^°º»º^BP^Óé^l…^º=ºV°º»ºV.º}º^B–^Ó/^l…^.º=ºV=º}ºVBªVÓCVl…VdºhºPhº}ºQBFQ9º}ºSBÁSÓZSl…SÁºÛºSÜ)ÜSÁºÛº]Ü)Ü]Áº¥½]¯u¾u]ܨÞ]!û1û]½ýÍý]Yx]#]BƒRƒ]Þ…ý…]‰ˆ¨ˆ]4‹D‹]Ðà]l{]A I ]Áº׺P׺ÛºpŸÜ(ÜPÿº¥½]!û1û]½ýÍý]Yx]#]BƒRƒ]Þ…ý…]‰ˆ¨ˆ]4‹D‹]Ðà]l{]A I ]»Z»TA DA TDA dA }ÞC cF TcF ~F }éH òH T$A DA TDA dA QUF éH 3Ÿ%À5À‘ y5ÀÂPÎab‘ ybcPJc[c‘ y[c ePËøÜø‘ yÜø!ûPgûxû‘ yxû½ýPþþ‘ yþYP®¿‘ y¿PYj‘ yj¯Pˆƒ™ƒ‘ y™ƒÞ…P3†D†‘ yD†‰ˆPވ yïˆ4‹Pz‹‹‹‘ y‹‹ÐPŽ'Ž‘ y'ŽlPòÓ Ô‘ y ÔJÖPÖ Ö‘ y ÖîØPÚ7Ú‘ y7ÚÜPAÝXÝ‘ yXÝ™ßPúßà‘ yàà‘Ø{¿áÙá‘ yÙáÊâPã ã‘ y ãnåPºåÊå‘ yÊåèPéé*ê‘ y*êëPíëì‘ yìEîPŠî›î‘ y›îéðP~ññ‘ yñÝóP"ô3ô‘ y3ôöPÆöÖö‘ yÖö"ùPˆùŸù‘ yŸùàûP%ü6ü‘ y6ü„þPÉþÚþ‘ yÚþ( Pm ~ ‘ y~ Ì PD U ‘ yU £ P  ‘ y e P¹ É ‘ yÉ  P€ Á ‘ yÁ ¶ P   ‘ y f Pò  ‘ y  J P ® ‘ y® ü PA Q ‘ yQ  P  ‘ y [ P¢»%À‘À{k`Îa‘À{cJc‘À{~øËø‘À{!ûgû‘À{½ýþ‘À{Y®‘À{Y‘À{Bƒˆƒ‘À{Þ…3†‘À{‰ˆÞˆ‘À{4‹z‹‘À{ÐŽ‘À{l{‘À{„ÏòÓ‘À{JÖÖ‘À{îØÚ‘À{ÜAÝ‘À{™ßúß‘À{à¿á‘À{Êâã‘À{nåºå‘À{èéé‘À{ëíë‘À{EîŠî‘À{éð~ñ‘À{Ýó"ô‘À{öÆö‘À{"ùˆù‘À{àû%ü‘À{„þÉþ‘À{( m ‘À{Ì D ‘À{£  ‘À{e ¹ ‘À{ € ‘À{¶  ‘À{f ò ‘À{J  ‘À{ü A ‘À{  ‘À{øH I Sá»ø¿‘È{k`x`‘È{cc‘È{~ø’ø‘È{!û.û‘È{½ýÊý‘È{Yu‘È{ ‘È{BƒOƒ‘È{Þ…ú…‘È{‰ˆ¥ˆ‘È{4‹A‹‘È{ÐÝ‘È{l{S„ÏÈÓ‘È{JÖbÖ‘È{îØòÙ‘È{ÜÝ‘È{™ßåß‘È{à4à‘È{Êâââ‘È{nåå‘È{è–è‘È{ëÃë‘È{Eî]î‘È{éðQñ‘È{Ýóõó‘È{ö™ö‘È{"ù^ù‘È{àûøû‘È{„þœþ‘È{( @ ‘È{Ì  ‘È{£ Ù ‘È{e Œ ‘È{ - ‘È{¶ Ý ‘È{f È ‘È{J p ‘È{ü  ‘È{ Ù ‘È{þ½.¾Q ¾/¾\¿í¿‘è|„Ͻӑè|JÖWÖ‘è|îØêÙ‘è|Ü Ý‘è|™ßÝß‘è|à)à‘è|Êâ×â‘è|nå‚å‘è|è‹è‘è|ë¸ë‘è|EîRî‘è|éðFñ‘è|Ýóêó‘è|öŽö‘è|"ùSù‘è|àûíû‘è|„þ‘þ‘è|( 5 ‘è|Ì  ‘è|£ Î ‘è|e ‘è| " ‘è|¶ Ò ‘è|f ½ ‘è|J e ‘è|ü  ‘è| Î ‘è|„Ï?Ñ]àûðû]„þ”þ]( 8 ]Ì  ]£ Ñ ]f h ]ü [ ]ˆÏ×ÏTf • T• ¯ }ü « T« À }u • T• ¯ Q [ 3Ÿñ3ñQñ9ñS¾ÒùÒ ÿŸùÒ Ó0Ÿ ÓaÓ1ŸJÖîØ1ŸÜ˜Ü1Ÿ˜ÜóÜVóÜþÜQÊâ+ãVnåuå0Ÿuåè ÿŸ'Ó5Ó2ŸÜ“Ü2Ÿ'Ó4ÓPÜÜPÁÜóÜVóÜþÜQè~è]ëEî]öàû]è~èTë(ëTEëëTëªë}ö0ùT0ùEù}pëëTëªëQ"ùàû2ŸîØàÙ‘ø|™ßÕß‘ø|à!à‘ø|KÙNÙPNÙeÙUeÙýÙ‘°{™ßíß‘°{àŠá‘°{aDjDPjDvDQ€š€Q¶µ%¶Spü|üSÿÿSTEÆESiJ“JS}n’nSѵîµRiJŠJR}n‰nRѵܵPܵòµ‘ØyiJ“J‘Øy}n’n‘ØyÕµîµQiJtJQtJŠJ‘Øy#}n‰n‘Øy#¶%¶qÿŸpüwüqÿŸwü|ü }‘˜})ÿŸ>Ð[ÐRŲß²RN`Z`R>ÐIÐPIÐ_БØyŲ貑ØyN`c`‘ØyBÐ[ÐQŲɲQɲß²‘Øy#N`Z`‘Øy#{Ð’ÐRhÊ€ÊR/ƒ9ƒR{ЖÐVhʉÊV/ƒBƒV{Ð’ÐPhÊyÊPyÊ€Êv/ƒ9ƒPèÐ2ÑVáWðWVžƒ „VÑjÑ]žƒ¯ƒ]çêûê]W"v"]é$%]Ñ2ÑVžƒ¯ƒV#ÑjÑ]çêë]W"v"]é$%]#Ñ2ÑV2ÑjÑVçêbëVW"½"Vé$%VYÑ]ÑP]ÑjÑ^W"%^.ÑjÑSçê|ëSW"×"Sé$%S§ÑëÑ^ää^§Ñ²ÑP²ÑëÑ‘¨{ä䑨{§Ñ²ÑP²ÑBÒ‘¨{U"U‘¨{䦿‘¨{ð»ò‘¨{¯ÑëÑQääQõÑBÒ‘Øyð+ð‘ØyõÑBÒ‘Èyð+ð‘ÈyõÑBÒ‘Èyð»ò‘ÈyÒBÒRð*ðRq'qSLÒ[ÒSq'qPLÒSÒPSÒ[Òw2qˆq0ŸiÝ}Ý0Ÿ1çPç0Ÿu i0Ÿ2qˆqViÝ}ÝV1çPçVu õ VNiV2q6qP6qˆqwiÝ}Ýw1çPçwu iwtqˆqPu y P=qˆqSiÝ}ÝS1çPçSu  SNiS|“Õ“0ŸçÉ Ê0Ÿ|“Õ“1ŸçÉ Ê1Ÿ|“Õ“ò$ÂçÉ Êò$Â|“Õ“‘°~ŸçÉ Ê‘°~Ÿ|“Õ“\çÉþÉ\|“Õ“‘°yçÉ Ê‘°y>QRS? © Sø i SÀ * SSòSpQ½QVÀ  VbqV}R¢R]5A]‹R¢RR5<R<A }‘˜})ÿŸšFÑFw’ì›ìw±FÑFqÿŸ’ìšìqÿŸšì›ì w‘˜})ÿŸúF GQ´!Á!Q GåH‘¸zùÎÏ‘¸zf)u)S,/?/‘¸z2.2‘¸z«^_‘¸z5hi‘¸z$qLr‘¸zŠ‹Œ‘¸z£.¤‘¸zФ뤑¸zX> Ú> ‘¸zü? ñ@ ‘¸zeGåH‘°zùÎÏ‘°z,/?/S2.2‘°z«^ë^‘°z$q‡q‘°zŠ‹ã‹‘°z£]£‘°zФ뤑°zX> Ÿ> ‘°zü? ?@ ‘°z¹G)H0Ÿ$q8q0ŸŠ‹ž‹0Ÿ££0ŸÐ¤ë¤0Ÿ¹G)H^$q8q^Š‹ž‹^££^Фë¤^¹G)HS$q8qSŠ‹ž‹S££SФë¤SHHPH)Hw££wФë¤wÜG)HV$q8qVŠ‹ž‹V££VФë¤VÖ’ß’Pß’ë’Q­1 ·1 QlI¤I ÿŸ¤I·I0Ÿ·IJ1Ÿ ss ÿŸqƒq0ŸƒqÕqSÕqÞqQssísSu&uS5uÖv1ŸÖvwx ÿŸd3 €3 1ŸÒIàI2Ÿd3 v3 2ŸÒIßIPd3 p3 P›qÕqSÕqÞqQ-Ï–ÏS :¼:S¡p¡Sp¡y¡‘à~ÙRüRSüRS‘à~šTUSU>V‘à~1Ï^ÏQ^ÏjÏs¡¡Q¡*¡s*¡y¡QÙRìRQìRüRsüRS‘à~#šT>VQ9¡y¡QÙRšT2ŸJ#J‘ y#JWV‘È|ßΑÈ|Œ@@P@›@‘È|’B¢B‘È|&h5h‘È|’¬’‘È|a›p›‘È|¡º°º‘È|¡Â°Â‘È|;ÐJБÈ|‡ÛÜ‘È|báqá‘È|zé¶é‘È|êMê‘È|òòø‘È|k ‘È|¾ B‘È|…B‘È|Á~ ‘È|— W"‘È|%×+‘È|WV_‘È|?_²f‘È|sOx‘È|bx‡}‘È|Ÿ}C‘È|-‡¢Š‘È|·ŠŒ‘È| eAg‘È|‡r~ø‘È|"<-‘È|H‘È|Mq‘È|&u5u‘È|¿ÉçÉ‘È|€3 3 ‘È|€< 4> ‘È|I âI ‘È|*J `K ‘È|:JOJPOJWV‘¸|ßΑ¸|’B—BP—BœB‘Ð~œB¢B‘¸|&h5h‘¸|’¬’‘¸|a›p›‘¸|¡º°º‘¸|¡Â°Â‘¸|;ÐJБ¸|‡ÛÜ‘¸|báqᑸ|zé¶é‘¸|êMꑸ|òòø‘¸|k ‘¸|¾ B‘¸|…B‘¸|Á~ ‘¸|— W"‘¸|%×+‘¸|WV_‘¸|?_²f‘¸|sOx‘¸|bx‡}‘¸|Ÿ}C‘¸|-‡¢Š‘¸|·ŠŒ‘¸| eAg‘¸|‡r~ø‘¸|"<-‘¸|H‘¸|Mq‘¸|&u5u‘¸|¿ÉçÉ‘¸|€3 3 ‘¸|€< 4> ‘¸|I âI ‘¸|*J `K ‘¸|‹JªJVÐöÞöV JªJPÐö×öP×öÞöS½JÔJR¯öÇöRXøbøR½JØJS¯öÐöSXøkøS½JÔJP¯öÀöPÀöÇösXøbøPK KRê5êR¿ÉËÉRK$K‘È|ê>ê‘È|¿ÉÔÉ‘È|K KPê,êP,ê5ê‘ y#¿ÉËÉP@KWKR°ÈR5ø?øR@K[KS°ÑS5øHøS@KWKP°ÁPÁÈs5ø?øPvK„K_vKÔP ÿŸ¡º°º ÿŸ;ÐJÐ ÿŸ‡ÛñÛ ÿŸbáqá ÿŸ§é¶é ÿŸ>êMê ÿŸÁ~  ÿŸ— W" ÿŸÛ&×+ ÿŸ?_²f ÿŸ¸tOx ÿŸbxz ÿŸŸ}C ÿŸ-‡‰ ÿŸ­ò5ø ÿŸT7 ÿŸ&u5u ÿŸÔÉçÉ ÿŸ€3 3  ÿŸ€< !>  ÿŸvKÔP0Ÿ¡º°º0Ÿ;ÐJÐ0Ÿ‡ÛñÛ0Ÿbáqá0Ÿ§é¶é0Ÿ>êMê0ŸÁ~ 0Ÿ— W"0ŸÛ&×+0Ÿ?_²f0Ÿ¸tOx0Ÿbxz0ŸŸ}C0Ÿ-‡‰0Ÿ­ò5ø0ŸT70Ÿ&u5u0ŸÔÉçÉ0Ÿ€3 3 0Ÿ€< !> 0ŸÐKŠL^ÄÛÓÛ^âÛñÛ^¸ ÷ ^6cŒc^õdRe^-‡}‡^戉^&LwL0Ÿ6cJc0Ÿõde0Ÿ-‡;‡0Ÿæˆ‰0Ÿ&LwLV6cJcVõdeV-‡;‡V戉V&LwL^6cJc^õde^-‡;‡^戉^fLjLPjLwLQ-‡1‡Q-LwLS6cJcSõdeS-‡;‡S戉S·LÒLQ— ¯ QÔÉÞÉQ¤LÖLV— ¸ VÔÉçÉV»LÒLP— ¨ P¨ ¯ vÔÉÞÉP)MrMV>êMêVÁ+VDMªM^ÁÌ^¸tÌt^yv‡v^4xOx^DMrMVÁÌVcM²M^¸tu^yvÉv^4xOx^cMrMVrM²MV¸tuVyvØvV4xOxV™MMPM²MQyv}vQnM²MS¸t1uSyvìvS4xOxSX_Q`VQ`’a]’aõaVõa6c]€3 3 Vb_ö_]’aša]€3 3 ]N PV­òóV²ô3õVtö•öVmVÒVƒäV‘NÚNT¼òÅòTËòúòTúòóvóóQÐô‚öT‚ö•övÚòúòTúòóQtö5ø3ŸìNÔP‘¨y­ò¼òS²ôÐô‘¨yTŽ‘¨y[‘¨yÒ ‘¨yƒ½‘¨y%OÔP‘À{²ôÁôSÁôÐô‘À{Tl‘À{9‘À{Òê‘À{ƒ›‘À{OOÌP‘È{ÁôÐôSTa‘È{.‘È{Òß‘È{ƒ‘È{ P^PVTµVµ]P^P]Td]oPÄP‘€|Q*QP*Q/‘¸y>/\/sŸa/l/‘¸y/Œ/‘¸y¡/±/S±/$0‘¸yŠ0Ä0‘¸y„1‰1‘¸y|R?S0ŸQSU0ŸUUPUyU\yUŽU0ŸŽU­UP­UÑUSÑUWV0Ÿ"Œ"0ŸŒ"•"P•"¹"\¹"Ð"0ŸÐ"8#S0,W,PW,-0Ÿ-=-P=-ƒ-Sƒ-•-P•-‰10Ÿ®1Y20Ÿ|RcS0ŸcSwSPwS–S_–ST0ŸT TP TÅT_ÅTWV0Ÿ"k"0Ÿk"…"P…"8#_0,W,_W,x,Px,-_-¶-0Ÿ¶-,._,.K.PK.³.0Ÿ³.È.PÈ.Ó._Ó./0Ÿ/6/_6//P/‰10Ÿ®1Y20Ÿ|R€S0Ÿ€SSPS@U‘ˆy@UWV0Ÿ"="‘ˆy="¹"S¹"8#‘ˆy0,?,S?,W,‘ˆyW,s,Ss,=-‘ˆy=-¶-0Ÿ¶-/‘ˆy/6/P6/a/0Ÿa/¡/‘ˆy¡/‰10Ÿ®1Y20Ÿ|R¨S0Ÿ¨S¼SP¼SÚS]ÚSFT0ŸFTWTPWTŽT]ŽTžTSžT¯T0Ÿ¯T¿TP¿TU]UWV0Ÿ"{"]{"¹"0Ÿ¹"Ð"PÐ"8#]0,W,0ŸW,®,]®,-S-=-]=-¶-0Ÿ¶-Í-SÍ-Ò-]Ò-ê-Sê-ï-]ï- .P .P.0ŸP.˜.]˜.Ó.0ŸÓ.ò.]ò./P//0Ÿ/¡/]¡/‰10Ÿ®1Y20Ÿ|RÃS0ŸÃSÔSPÔS T\ TTST…T0Ÿ…TŽTPŽT×T\×TWV0Ÿ"""0Ÿ""u"\u"¹"0Ÿ¹"8#\0,W,0ŸW,x,\x,”,P”,ü,0Ÿü,-P--\-¶-0Ÿ¶-Ò-PÒ-,.0Ÿ,.g.\g.Ó.SÓ.ò.Pò.a/0Ÿa/|/S|//\/œ/Sœ/¡/\¡/‰10Ÿ®1Y20Ÿ|R T0Ÿ+T?TP?T]TV]TWV0Ÿ"Ð"0ŸÐ"8#V0,˜,0Ÿ˜,á,Vá,Ò-0ŸÒ- .V .,.P,.‰.0Ÿ‰.”.P”.Ó.VÓ.a/0Ÿa//V/¡/P¡/‰10Ÿ®1Y20Ÿ|RWV0Ÿ"Ð"0ŸÐ"8#^0,Ï,0ŸÏ,Ý,PÝ,-^-¶-0Ÿ¶-Ò-^Ò-ï-Pï-‰10Ÿ®1Y20ŸÁUWVVI-_-P•-¶-V|RWV0Ÿ"Ð"0ŸÐ"8#‘Ày0,,00Ÿ,060‘Àya0‰10Ÿ®1Y20Ÿ|RWV0Ÿ"Ð"0ŸÐ"8# 0¶ Ÿ0,,00Ÿ,060 0¶ Ÿa0‰10Ÿ®1Y20Ÿ|RWV0Ÿ"Ð"0ŸÐ"8#‘¸y0,,00Ÿ,060‘¸ya0‰10Ÿ®1Y20Ÿ?ScS_^.Ó.Sa/|/S|//\/œ/Sœ/¡/\g.Ó.\a/d/\/„/\¥,-S¶-Í-SÍ-Ò-]Ò-ê-Sê-ï-]®,-]¶-¹-]Ò-Õ-]/"¹"S0,?,S?,W,‘ˆyW,s,Ss,x,‘ˆy="Z"TZ"š"‘ˆy0,5,‘ˆyW,\,‘ˆy@UJV‘ðy=-W-‘ðyƒ-‹-‘ðy•-¶-‘ðy”U­UP­UÁUS=-I-SªUÁUR=-D-RD-I- s‘˜})ÿŸßUçUPçUVSV=V‘Ðy•-¬-‘ÐyVBVS•-¶-SÄ0ì0Vä1(2VJ2W2Vì0ò0Pò0g1V(262P62J2VW2Y2PÈ0Ø0PØ0å0qàä1ÿ1qàJ2S2qà2 2P 2<2S 11h1 1‘ˆy£$Õ,‘è{Mñ‘è{7¼‘è{!‡!‘è{Í"‰#‘è{Ï$Q%‘è{—&'‘è{_(Ü(‘è{*ö*‘è{à8`9‘è{š:;‘è{T<Ü<‘è{>‹>‘è{Ñ?N@‘è{”AB‘è{WC×C‘è{EE‘è{ãFcG‘è{©H)I‘è{oJïJ‘è{5L·L‘è{ýM‡N‘è{ÅO P‘è{€QÇQ‘è{9SºS‘è{,UsU‘è{êV1W‘è{¨XïX‘è{fZ­Z‘è{!\²\‘è{"^†^‘è{ö_=`‘è{´ab‘è{Je‘e‘è{gNg‘è{Àhi‘è{~jÅj‘è{T>‘ð{Ñ?@‘ð{”AÜA‘ð{WCžC‘ð{EdE‘ð{ãF*G‘ð{©HðH‘ð{oJ¶J‘ð{5L|L‘ð{ýMFN‘ð{?*s*QG*y*SÌ+a,^7†^†!]!Q!^Q!Í"]Õ+a,]7?]! !]æSòòóSûPòòùòPùòó]'Rñ RHøRøR(]ñ ]HøXø]'Pñ P  }HøRøP^}V“¡Vs}P“šPš¡S§QrŠQkøuøQ«Sr“Skø~øS§PrƒPƒŠskøuøPXSzzSÄ{Ø{S·ŠÅŠSrŒŒSX_zz_Ä{Ø{_·ŠÅŠ_rŒŒ_X^zz^Ä{Ø{^·ŠÅŠ^rŒŒ^GKPKXQ·Š»ŠQ XVzzVÄ{Ø{V·ŠÅŠVrŒŒVºÕS¶ôÖôSÏ^_SI ˆI SÑI âI S*J GJ S²J àJ SºÎ ÿŸ¡Â°Â ÿŸzé§é ÿŸ¶ôõ ÿŸÑr ÿŸ…B ÿŸ%Û& ÿŸWV_ ÿŸs¸t ÿŸ‡r­ò ÿŸ!> 4>  ÿŸI âI  ÿŸ*J `K  ÿŸºÎ0Ÿ¡Â°Â0Ÿzé§é0Ÿ¶ôõ0ŸÑr0Ÿ…B0Ÿ%Û&0ŸWV_0Ÿs¸t0Ÿ‡r­ò0Ÿ!> 4> 0ŸI âI 0Ÿ*J `K 0ŸÚ^_sŸI @I sŸÑI âI sŸ*J GJ sŸI I sI .I s” ÿÿÿÿN$s” ÿÿÿÿ!ŸÑI ÖI s”ŸÖI âI P:J =J pŸ=J GJ P¶ôÖôS@I ˆI S²J àJ SOI mI P»J ÐJ P@I fI 0ŸfI xI © ŸxI ™I QyJ —J Q²J ÉJ 0ŸÉJ àJ ‘© Ÿ@I xI 0ŸxI …I P…I ™I VyJ ²J S²J ÛJ 0ŸÛJ àJ P™I ¸I SGJ yJ SàJ K S%K `K S™I ÑI  ÿŸGJ yJ  ÿŸàJ `K  ÿŸ™I ÑI 0ŸGJ yJ 0ŸàJ `K 0ŸRJ yJ sŸàJ NK sŸàJ åJ s”ŸåJ ñJ PK K pŸK K PK K s%K +> QOjSº&Û&S!> 4> SOfPº&Ë&PË&Ò&s!> +> P…“‘¸y…Î ÿŸzé§é ÿŸÑr ÿŸWVÏ^ ÿŸs¸t ÿŸ‡r(t ÿŸ…Î0Ÿzé§é0ŸÑr0ŸWVÏ^0Ÿs¸t0Ÿ‡r(t0ŸøNSWV³VSXXS»YèYSøN_WVxV_XX_»YèY_øN^WV¤V^XX^»YèY^=APANVWVXV=V»YèYVFíî\mï—ï\PígíQ´tÃtPÃtåt‘à~åt”ë‘Ø{Õvãv‘¨yÕvˆ ÿŸÕvˆ0Ÿj×ù×VIÛ—ÛVêÜ:ÝVs×ù×^IÛˆÛ^êÜûÜ^M…´ˆ‘À{PŠ]Š‘À{÷‹Œ‘À{ž«‘À{ER‘À{ìù‘À{“’ ’‘À{:”G”‘À{ã•䙑À{‹›˜›‘À{?L‘À{õžŸ‘À{« ¸ ‘À{a¢n¢‘À{¤$¤‘À{Í¥Ú¥‘À{ƒ§O¨‘À{\¨i¨‘À{ªƪ‘À{r¬¬‘À{&®A®‘À{ê¯÷¯‘À{ ±­±‘À{V³c³‘À{ µµ‘À{¶϶‘À{x¸…¸‘À{.º;º‘À{ä»ñ»‘À{š½§½‘À{P¿]¿‘À{ùÀ»Á‘À{ZÃgÑÀ{Å!Å‘À{½ÆÊÆ‘À{dÈqÈ‘À{ ÊÊ‘À{´ËÁË‘À{]ÍjÍ‘À{ÏÏ‘À{¯Ð¼Ð‘À{XÒeÒ‘À{ÔÔ‘À{‡ž‡‘¸y‡“’ ÿŸ‡“’0ŸÁìÁ\ìÁZÃ]ZØÃ\˜ÃÅ]Á©Á]®Á¾Á]ZÃjÃ]d–š‘È{‹›Aœ‘È{?÷‘È{õž­Ÿ‘È{« c¡‘È{a¢£‘È{¤Ϥ‘È{Í¥…¦‘È{ƒ§W¨‘È{\¨©‘È{ªt«‘È{r¬(­‘È{&®ì®‘È{ꯢ°‘È{ ±X²‘È{V³´‘È{ µĵ‘È{¶z·‘È{x¸0¹‘È{.ºK»‘È{仜¼‘È{š½·¾‘È{ʘؘ‘Àyʘ¤ ÿŸÊ˜¤0Ÿ#ª÷ª\r¬‚¬\2ªhªShªôª‘ˆyr¬­¬‘ˆyö§G¨‘€|a-œ-0Ÿ‘U0Ÿ)0Ÿa-œ-1Ÿ‘U1Ÿ)1Ÿa-œ-V‘ÍVÍU‘¨z”# $ &Ÿ)Va-œ-‘¨y‘U‘¨y)‘¨ya-œ-‘€|‘U‘€|)‘€|•U])]q-~-P~-Š-qèŠ-˜- ‘€|##h‘²qèqè# ‘€|##h!P!?Q?ESéïPïE\¹ÆPÆ$SEUSÍáPáEVEOPOUV©¹0Ÿ¹ÆPÆ$SEUS©Í0ŸÍáPáEVEOPOUVÊ-. ÿŸ..0Ÿ.t.1ŸÓü‹þ1Ÿ‹þìþSìþõþQŠ‘0Ÿ¬ ÿŸ¬S9.G.2Ÿtþ†þ2Ÿ9.F.Ptþ€þPµþìþSìþõþQ¡íTÿGTGasaj‘Ð~#£ U TU j sj s ‘Ð~#'GTGjQG 2Ÿt.1^0ÚoÚ^ÑÛâÛ^rݱÝ^ß$ß^´àá^Xâ—â^ùã8ä^šå«å^;çSé^µêÆê^Vì¥ì^úíIî^žïÿï^Tñ“ñ^õò4ó^–ô§ô^7öˆö^ê÷û÷^‹ùÚù^/û~û^‰.­.‘È~­.¥;‘À|¥;­;V­;Óü‘À|v/™/]7öCö]„/™/S7öCöSu134‘¨|(̤̑¨|þÍBΑ¨|ÇÏ Ð‘¨|ÑÔÑ‘¨|YÓÓ‘¨|"ÕfÕ‘¨|Ã1„4‘˜|GÅgÅ‘˜|(ÌHÌ‘˜|þÍΑ˜|ÇÏçÏ‘˜|Ѱё˜|YÓyÓ‘˜|"ÕBÕ‘˜|2½4‘|‹Ã£Ã‘|GÅ_Å‘|(Ì@Ì‘|þÍΑ|ÇÏßÏ‘|Ѩё|YÓqÓ‘|"Õ:Õ‘|M2ö4‘ˆ|×ÁäÁ‘ˆ|‹Ã˜Ã‘ˆ|GÅTÅ‘ˆ|(Ì5Ì‘ˆ|þÍ Î‘ˆ|ÇÏÔÏ‘ˆ|ÑÑ‘ˆ|YÓfÓ‘ˆ|"Õ/Õ‘ˆ|ì3S4‘¸yGÅÆ‘¸yA4„9‘ˆyt ‚ ‘ˆy¢Q¢‘ˆy¹£õ£‘ˆy]¥™¥‘ˆy§=§‘ˆy¥¨á¨‘ˆyIª…ª‘ˆyí«)¬‘ˆy‘­Í­‘ˆy5¯q¯‘ˆyÙ°(±‘ˆy²̲‘ˆy4´~´‘ˆyæµC¶‘ˆy«·÷·‘ˆy_¹¹¹‘ˆy!»]»‘ˆyż½‘ˆyw¾þ‘ˆy+À¡ÀS×ÁLÂS‹ÃÿÃSÇLÇ‘ˆy´ÈþÈ‘ˆyfÊÀÊ‘ˆy’4?=_ýij_m0m_±nÚn_FpYp_äq r_…s¯s_)uSu_Ív÷v_qxêx_Ƈð‡_j‰”‰_‹8‹_²ŒÜŒ_VŽ’Ž_ 6_°‘Ú‘_T“~“_ø”"•_œ–Æ–_@˜j˜_䙚_ˆ›²›_,V_Оúž_t š _¢?¢_¹£ã£_]¥‡¥_§+§_¥¨Ϩ_Iªsª_í«¬_‘­»­_5¯_¯_Ù°±_²º²_4´l´_æµ1¶_«·å·__¹§¹_!»K»_żý¼_w¾±¾_+À;À_×ÁçÁ_Ç:Ç_´ÈìÈ_fÊ®Ê_Ë4B9^¢d¢^¹£¤^]¥¬¥^§P§^¥¨ô¨^Iª˜ª^í«<¬^‘­à­^5¯„¯^Ù°;±^²ß²^4´‘´^æµV¶^«· ¸^_¹̹^!»p»^ż"½^w¾Ö¾^+ÀyÀ^Ç_Ç^´ÈÉ^fÊÓÊ^5´7]Ù°ÿ°]²£²]4´U´]æµ¶]«·η]_¹¹]!»4»]żæ¼]w¾š¾]Ç#Ç]´ÈÕÈ]fÊ—Ê]Y8h82Ÿ¢¹£2ŸY8]8U]8h8‘ø{¢¹£‘ø{Y8]8P]8h8S¢¢Sb8h8P¢¢P¢x¢V|99P9¢9S^:m:2Ÿ@˜ä™2Ÿ^:b:Ub:m:‘ø{@˜ä™‘ø{^:b:Pb:m:S@˜º˜Sg:m:P@˜E˜PE˜£˜V‡;¥;‘À|¥;­;VÛ;ô;Pô;<SVŽbŽSñ;<RVŽ]ŽR]ŽbŽ s‘˜})ÿŸh9hP9h>h‘È~'hOhS‹¼Q˜ÂS?+?0Ÿ?+?1Ÿ?"?p1Ÿ"?+?qŸ?"?P"?+?‘y#'?+?S/@A@0Ÿ/@A@1Ÿ/@7@p1Ÿ7@A@qŸ/@7@P7@A@‘y#<@A@]ØçûçVžïªïVæçûçSžïªïSÉèèè]éé]×èèèSééSÛ  mª Ÿ"“Õ”‘ø{>QÊR‘ø{xr‡r‘ø{¯‘ø{wA‘ø{?  ‘ø{ø  ‘ø{À ƒ ‘ø{S3‘ø{5‘ø{eɺɑø{çɻʑø{¹ËÈËS®6 8 ‘ø{ÿ8 º9 ‘ø{¸: {; ‘ø{q< €< ‘ø{[“|“1Ÿ[“|“0Ÿ[“|“òQÂ[“|“òóÂ[“_“U_“|“‘°yW>WS(>S4W>WP(7P7>]IWYWPYW`W À3*ýžŸPŸŸ À3*¢B¬BPIWdW]ýžŸ]¢BµB]IW`WRýžŸR¢B¬BRá¬(­Sz­“­S’ù¡ùSœWÎWV†xÙxV»òçòV¿WñW0ŸÚ:î:0Ÿ¿WÎWVÎWñWVÚ:î:VÊWñWSÚ:î:S†xÙxV»òòòVžxÙx0Ÿ»òòò0ŸžxÙx]»òòò]žxÙxV»òòòVôWøWPøWX^›@©@^bB}B^žxÙxS»òòòS²¾P¾«˜‘Ø{µÇÏÇ‘¨yÏÇ¡ÉP¡Ë³Ë‘¨yqàÜà‘Ø{™ã1ç‘Ø{Ñðàð‘Ø{iöÑö‘Ø{òö÷‘Ø{¡ù°ù‘Ø{ÿ$ÿ‘Ø{oÿ{ÿP{ÿ*‘Ø{*œ‘¨yœ]PÎß‘Ø{ï ‘Ø{°ÆPÆO‘Ø{OÁ‘¨yÁ‚P‚´!‘Ø{Ç!Ö!‘Ø{M$\$‘Ø{ ,,/‘Ø{?/2‘Ø{µ5Ï5‘¨yÏ5ô5Pô5®7‘Ø{à7 :‘Ø{Ñ=Œ@‘Ø{D.D‘Ø{ØDçD‘Ø{EEE‘Ø{“J7M‘Ø{ÿOP‘¨yP>PP>PøQ‘Ø{ÎSðS‘Ø{õTU‘Ø{1UáW‘Ø{-YÉZ‘Ø{ÉZ;[‘¨y;[ü[Pü[«^‘Ø{Á_‰b‘Ø{ˆmŸm‘¨yŸmnPn$q‘Ø{q{)~‘Ø{Á€žƒ‘Ø{#ˆ=ˆ‘¨y=ˆòˆPRz’‘Ø{Y™s™‘¨ys™˜™P˜™R›‘Ø{p›:ž‘Ø{Ÿ0Ÿ‘¨y0Ÿ¡P뤕§‘Ø{j¨„¨‘¨y„¨nªPy«“«‘¨y“«q­Pq­>°‘Ø{º¿¡Â‘Ø{°ÂjÅ‘Ø{pËŠË‘¨yŠËtÍP“Í;БØ{¢Ð¯Ð^‘ѫё¨y«Ñ‰ÓP‰ÓZÖ‘Ø{oÖÙ‘Ø{¨Þbá‘Ø{¶éê‘Ø{Mê²ê‘Ø{Ëêçê‘Ø{>VWV‘Ø{__‘Ø{‡}Ÿ}‘Ø{C\‘Ø{î-‡‘Ø{Ager‘Ø{wx€‘Ø{ð̄ϑØ{˜0 ¯0 ‘¨y¯0 Ô0 PÔ0 ­1 ‘Ø{}5 ”5 ‘¨y”5 ¹5 P¹5 ®6 ‘Ø{E‹Õ‹ ÿŸÕ‹!ŒS`e¼eSR›a› ÿŸZÖoÖSBR ÿŸÊRÙRS­k¿kS3 ¢3 SÛ‹þ‹P`ekePÊRÎRPÿ‹ Œ7Ÿ­k¿k7Ÿÿ‹ ŒP­k¹kPxe¼eS«˜“™]¹ùpü]iÁ]Ìb`e]C½º¿]´˜™Q™1™}¹ùúQilQlÁ}ÌbßbQßbõb}C½º¿QÈùúQÌb`e7Ÿ—жŠSÁÕÏÕS¬Š¶ŠPÁÕÈÕPÈÕÏÕ]ÁŠØŠRNàhàR‰Ê“ÊRÁŠÈŠPÈŠÜŠ]Nàqà]‰ÊœÊ]ÁŠØŠQNàTàQTàhà}‰Ê“Ê}@e–‘Ð{ÛÆ4Ç‘Ð{¿ÉË‘Ð{ÜË Ì‘Ð{ ÌÌS#Ð2БÐ{qàÜà‘Ð{™ãÙä‘Ð{*î9î‘Ð{Ñðàð‘Ð{iö¿ö‘Ð{òö÷‘Ð{¡ù°ù‘Ð{ÿâÿ‘Ð{Îß‘Ð{ï ‘Ð{¥‘Ð{‚F‘Ð{Ç!Ö!‘Ð{M$\$‘Ð{ ,Î,‘Ð{?/¡/‘Ð{í445‘Ð{®7B8‘Ð{¼:Ú:‘Ð{Ñ=>‘Ð{D.D‘Ð{ØDçD‘Ð{EEE‘Ð{“JÚJ‘Ð{#O~O‘Ð{ÎSðS‘Ð{õTU‘Ð{1U”U‘Ð{-YY‘Ð{ü[^\‘Ð{Á_`‘Ð{ßk%l‘Ð{n×n‘Ð{q{Ì{‘Ð{Á€‘Ð{ƒƒžƒ‘Ð{9†‡‘Ð{òˆ‰‘Ð{R™‘Ð{æ-‘Ð{{˜ؘ‘Ð{p›Í›‘Ð{:ž˜ž‘Ð{ë¤J¥‘Ð{•§ò§‘Ð{—ªþª‘Ð{q­Å­‘Ð{#°>°‘Ð{º¿À‘Ð{N¡‘Ð{°Â ÑÐ{¡ÊøÊ‘Ð{tÍîÍ‘Ð{JÐÑ‘Ð{‰ÓÔ‘Ð{oÖÄבÐ{¨ÞüÞ‘Ð{Gábá‘Ð{¶éê‘Ð{Mê²ê‘Ð{Ëêçê‘Ð{~ — ‘Ð{%%‘Ð{>VWV‘Ð{__‘Ð{Oxbx‘Ð{‡}Ÿ}‘Ð{C\‘Ð{î5‚‘Ð{„ç„‘Ð{Ag•g‘Ð{jxj‘Ð{ãl[m‘Ð{¶o p‘Ð{wx%y‘Ð{k{²{‘Ð{ü}C~‘Ð{ðÌ7Í‘Ð{á. 5/ ‘Ð{¢3 4 ‘Ð{’6 ®6 ‘Ð{Û‘‘À{ÛÆµÇ‘À{¿É¡Ë‘À{ëËúËSúË Ì‘À{#Ð2БÀ{™ã·ã‘À{*î9î‘À{Ñðàð‘À{ÿH‘À{¥m‘À{‚Û‘À{?/U/‘À{í4µ5‘À{®7à7‘À{¼:Ú:‘À{Ñ=>‘À{D.D‘À{#OÿO‘À{-YçZ‘À{ü[\‘À{Á_Õ_‘À{ßkˆm‘À{9†#ˆ‘À{òˆ‰‘À{{˜Y™‘À{:žŸ‘À{•§j¨‘À{—ªy«‘À{¡ÊpË‘À{t͓͑À{JБёÀ{¶éê‘À{~ — ‘À{%%‘À{__‘À{Oxbx‘À{C\‘À{Agøh‘À{jÛk‘À{á. ˜0 ‘À{¢3 }5 ‘À{-Ž}’‘È{ÛÆuÇ‘È{¿É‘Ë‘È{úË ÌS#Ð2БÈ{™ã·ã‘È{*î9î‘È{Ñðàð‘È{òö÷‘È{¡ù°ù‘È{ÿ ‘È{Îß‘È{¥/‘È{‚n ‘È{Ç!Ö!‘È{ ,c,‘È{?/É0‘È{í4u5‘È{®7ö7‘È{¼:Ú:‘È{Ñ=]>‘È{D.D‘È{EEE‘È{“JK‘È{#O¿O‘È{-Y©Z‘È{ü[\‘È{Á_Z`‘È{ßkJm‘È{q{…{‘È{Á€=‚‘È{ƒƒžƒ‘È{9†ã‡‘È{òˆ‰‘È{{˜™‘È{p› œ‘È{:žÖž‘È{•§*¨‘È{—ª9«‘È{¡Ê0Ë‘È{t͓͑È{JÐQÑ‘È{¶éê‘È{Mê­ê‘È{~ — ‘È{%%‘È{>VWV‘È{__‘È{Oxbx‘È{‡}Ÿ}‘È{C\‘È{Agºh‘È{jk‘È{ãl€n‘È{¶o/q‘È{á. Z0 ‘È{¢3 ?5 ‘È{zއŽP‡Ž¡Ž‘ yÛÆåÆ‘ y}Ž¡ŽqÿŸÛÆäÆqÿŸºŽFSF™–‘à|#Ð2ÐSqàÜà‘à|™ã å‘à|*î9î‘à|Ñðàð‘à|iöÌö‘à|òö÷‘à|¡ù°ù‘à|ÿ$ÿ‘à|$ÿHÿSHÿ‚‘à|Îß‘à|ï ‘à|¥§‘à|‚© ‘à|Ç!Ö!‘à|M$\$‘à| ,ó-‘à|?/1‘à|í4m5Sm5)6‘à|®7Ñ7Sà7g9‘à|Ñ=Ú>‘à|D.D‘à|ØDçD‘à|EEE‘à|“JUK‘à|#OsP‘à|ÎSðS‘à|õTU‘à|1UÏU‘à|-Y![‘à|ü[™\‘à|Á_×`‘à|no‘à|q{G|‘à|Á€x‚‘à|ƒƒžƒ‘à|RÔ‘à|æh‘à|{˜Í™‘à|p›ˆœ‘à|ë¤l¦‘à|q­ê®‘à|#°>°‘à|º¿<À‘à|N¡‘à|°ÂˆÃ‘à|“Í)Αà|JÐQÐSQЯБà|‰ÓHÔ‘à|oÖØ‘à|¨Þà‘à|Gábá‘à|¶éê‘à|Mê²ê‘à|Ëêçê‘à|~ — ‘à|%%S>VWV‘à|__‘à|‡}Ÿ}‘à|C\‘à|îm‚‘à|„…‘à|Ag/i‘à|jl‘à|ãl»n‘à|¶ojq‘à|wxYy‘à|k{ê{‘à|ü}~~‘à|ðÌrÍ‘à|á. 1 ‘à|¢3 ñ5 ‘à|’6 ®6 ‘à|éŽR®7È7R%%RéŽôŽPôŽ ‘¨y®7Ñ7‘¨y%%‘¨yíŽQ®7²7Q²7È7‘¨y#%%‘¨y#FŽS*î9îS¥FSbÑ]¥»]#O7O]-YLY]ü[\]bŽS¥»SÑ]#OJO]-YLY]ü[\]ŽSŽÑS#O·OS-YÀYSü[\Sº¾P¾Ñ‘Ø{-YÉZ‘Ø{ÉZ;[‘¨y;[ü[Pü[\‘Ø{ŠÑV#OOV-Y¦YVü[\VP¦S¦~‘‘¨y™ã¨ãS¡ù°ù‘¨yÿ$ÿ‘¨yÎß‘¨y‚¬S¬º ‘¨y?/1‘¨yÑ=U>SD.DSÁ_ü_‘¨yÁ€‰‚‘¨yƒƒžƒ‘¨yp›­›‘¨y¶é½éS½éꑨy__SC\‘¨yAgi‘¨yjék‘¨y:ZRD%DR__R:EPE^‘ðyD.D‘ðy__‘ðy>ZQD DQ D%D‘ðy#__‘ðy#¦îSÿ$ÿS?/à/SÂ1‘]?/U/]Á_Õ_]Á€à€]ƒƒžƒ]ÂîS?/U/Sß1‘]Á_è_]Á€à€]ƒƒžƒ]ßîSî1‘SÁ_R`SÁ€TSƒƒžƒS‘‘P‘1‘‘À{Á€²‚‘À{ƒƒžƒ‘À{ê1‘VÁ_;`VÁ€:VƒƒžƒVv‘y‘Py‘ ’S ’±–‘ðyqàÜà‘ðy·ã7å‘ðyiöÑö‘ðyòö÷Sï ‘ðyÇ!Ö!‘ðyM$\$‘ðy ,4,S4,O.‘ðyà7Ã9‘ðyØDçD‘ðyEE‘ðyEEES“JKSK5K‘ðyÎSðS‘ðyõTU‘ðy1UçU‘ðy\±\‘ðyn*o‘ðyq{'|‘ðyRì‘ðy怑ðy뤸¦‘ðyq­F¯‘ðy#°>°‘ðyº¿TÀ‘ðyN¡‘ðy°ÂhÑðy“ÍAΑðy‰Ó`Ô‘ðyoÖ3Ø‘ðy¨Þjà‘ðyGábá‘ðyMêTêSTê²ê‘ðyËêçê‘ðy>VWV‘ðy‡}Ÿ}Sî…‚‘ðy„3…‘ðyãlÙn‘ðy¶oˆq‘ðywxqy‘ðyk{|‘ðyü}–~‘ðyðÌŠÍ‘ðy’6 ®6 ‘ðy‘½‘RE°]%’Q’Sà7ö7SB’”’]q{˜{]q­­]#°>°]B’Q’SQ’”’Sq{|Sq­®S#°>°S}’’P’”’‘È{q­(¯‘È{#°>°‘È{M’”’Vq{ë{Vq­ç­V#°>°VÙ’Ü’PÜ’ø’Sø’á–‘ˆzqàÜà‘ˆz·ãg呈ziöÑö‘ˆzïþSØDçD‘ˆzEE‘ˆzÎSðS‘ˆzõTU‘ˆz1UV‘ˆz\á\‘ˆznZo‘ˆzRŽ‘ˆzæ°‘ˆzë¤ܦ‘ˆzº¿„À‘ˆzN¡‘ˆz“ÍqΑˆz‰ÓÔ‘ˆzoÖWØ‘ˆz¨ÞŽà‘ˆzGábᑈzËêçꑈz‘ˆz„c…‘ˆzwx¡y‘ˆzk{2|‘ˆzü}Æ~‘ˆzð̺͑ˆz’6 ®6 ‘ˆzø’“S1U?US ““P1U8UP8U?UV“«˜ ÿŸqàÜà ÿŸ·ã1ç ÿŸiöÑö ÿŸØDçD ÿŸEE ÿŸÎSðS ÿŸõTU ÿŸRæ ÿŸë¤•§ ÿŸº¿¡Â ÿŸ“Í;Ð ÿŸ‰ÓZÖ ÿŸoÖÙ ÿŸ¨Þbá ÿŸËêçê ÿŸî-‡ ÿŸwx€ ÿŸðÌ„Ï ÿŸ’6 ®6  ÿŸ“«˜0ŸqàÜà0Ÿ·ã1ç0ŸiöÑö0ŸØDçD0ŸEE0ŸÎSðS0ŸõTU0ŸRæ0Ÿë¤•§0Ÿº¿¡Â0Ÿ“Í;Ð0Ÿ‰ÓZÖ0ŸoÖÙ0Ÿ¨Þbá0ŸËêçê0Ÿî-‡0Ÿwx€0ŸðÌ„Ï0Ÿ’6 ®6 0Ÿg›ÂQ”å”0Ÿë¤þ¤0Ÿ“ͧÍ0Ÿ¨Þbá0Ÿ”å”Së¤þ¤S“ͧÍS¨ÞßSGábáS”å”Vë¤þ¤V“ͧÍV¨ÞßVGábáVԔؔPØ”å”]¨Þbá]š”Ô”]ë¤þ¤]“ͧÍ].•i• ÿŸi•|•0Ÿ|•Ò•1Ÿwxyx0ŸyxÝxSÝxæxQk{ü} ÿŸü}v~SðÌ„Ï1Ÿ’6 ®6 1Ÿ—•¥•2Ÿ’6 ¤6 2Ÿ—•¤•P’6 ž6 P£xÝxSÝxæxQqàÜà]‰ÓZÖ]Ëêçê]î-‡]uà¢àQ¢à¶à}‰ÓÕÓQËêÎêQÎêçê}î’„Q’„¨„}˜ÓÕÓQ„-‡2Ÿ·ã¦ä‘ø|iö¡ö‘ø|ÎSðS‘ø|õTþTRþTU‘ø|oÖ|Ö‘ø|ääPä&äU&ä°ä‘°{iö©ö‘°{ÎSÔSUÔSðS‘°{oÖÝב°{iö·ö‘èyÚSêSRêSðS‘èy$ÿLÿVLÿhÿ‘È~JТÐV~ ‰ ‘È~á. ?/ V¢3 Î3 V=ÿ]0Ÿ~ — 0Ÿ=ÿLÿVLÿhÿ‘È~~ ‰ ‘È~LÿV~ — Vwÿ{ÿP{ÿ*‘Ø{*œ‘¨yœ]PHÿ!S~ — SJЯÐVá. ?/ V¢3 $4 VXЯÐ0Ÿá. ­1 0Ÿ¢3 ’6 0ŸXЯÐ]á. / ]¢3 å3 ]XЯÐVá. ?/ V¢3 $4 V‘ЕÐP•ТÐ^á. ­1 ^XЯÐSá. Y/ S¢3 >4 S‚°V°Ì‘È~¶éêVCN‘È~AgŸgVj,jV¡´!0ŸC\0Ÿ¡°V°Ì‘È~CN‘È~°kVC\VÛßPßã ‘À{¬…SC\S¶éêVAgŸgVj‚jVÄéê0ŸAgãl0ŸÄéê]Ag`g]jCj]ÄéêVAgŸgVj‚jVýéêPêê^Agj^ÄéêSAg¹gSjœjS ,8,V8,T,‘È~Mê¥êV>VIV‘È~ãlmV¶opV),,/0Ÿ>VWV0Ÿ),8,V8,T,‘È~>VIV‘È~8,ð,V>VWVVc,g,Pg,1.‘È{4, -S>VWVSMê²êVãlemV¶opV[ê²ê0Ÿãler0Ÿ[ê²ê]ãl&m]¶oÕo][ê²êVãlemV¶opV”ê˜êP˜ê¥ê^¶oer^[ê²êSãlmS¶o.pSÙÉyË‘ð|Ñ7à7S¼:Ú:‘ð|9†F†‘ð|òˆ‰‘ð|:ž_ž‘ð|•§¶§‘ð|—ªŪ‘ð|¡Ê¼Ê‘ð|t͓͑ð|¯ÐÚБð|Oxbx‘ð|Ê.ÊRòˆ ‰ROxYxRÊ2Ê^òˆ‰^Oxbx^Ê.ÊQòˆöˆQöˆ ‰~OxYx~FÊ—Ê0Ÿ•§©§0Ÿ—ªªª0Ÿ¡Ê¯Ê0ŸtÍ“Í0ŸFÊ—ÊV•§©§V—ªªªV¡Ê¯ÊVtÍ“ÍVFÊ—Ê]•§©§]—ªªª]¡Ê¯Ê]tÍ“Í]†ÊŠÊPŠÊ—ÊQ¡Ê¥ÊQMÊ—ÊS•§©§S—ªªªS¡Ê¯ÊStÍ“ÍSÈÊË‘Øy:žIž‘ØyÈÊÓÊPÓÊË‘Èy:žIž‘ÈyÈÊÓÊPÓʳˑÈy:ž¡‘Èy¯Ð‰Ó‘ÈyÐÊËQ:žHžQËlË‘¨{¯ÐÄБ¨{˳ˑ¨{¯Ð‰Ó‘¨{ ËlËR¯ÐÃÐR^#^P#^/^Q\fQšY/ZSD‰W‰Sß™šS̤I¥SG§s§SàðçðS}B’BSÎYëYRG§j§R}B‰BRÎYÙYPÙYïY‘ØyG§s§‘Øy}B’B‘ØyÒYëYQG§T§QT§j§‘Øy#}B‰B‘Øy#/ZÇZS§™Ï™SOšøšSøšæœ]oÃÄSÄÆ]'ÌÁÌSÁÌ»Î]»ÎÛÎS8ZkZ]§™¿™]Ošoš]CZ¨ZVOš[šVoÈÃV'Ì5ÌV»ÎÛÎVCZ¨ZSOš[šSoÈÃS'Ì5ÌS»ÎÛÎS`Z°ZVoÃúÃV'̧ÌV»ÎÛÎV`Z°ZSoÃÄSÄÆ]'ÌÁÌSÁÌ»Î]»ÎÛÎSoZ°Z^oÃãÃ^'ÌÌ^»ÎÛÎ^—Z›ZP›Z°ZQ'Ì+ÌQkZ°Z]o×Ã]'ÌDÌ]»ÎÛÎ]àZ[2ŸÒ}g~2Ÿæœ(2ŸL¯Z¯2Ÿxù’ù2Ÿl}n2ŸàZ[RÒ}~RæœR ø/*L¯Z¯RàZ[SÒ}g~Sæœ(SL¯Z¯Sxù’ùSllSæœs$ŸR(s$Ÿæœ r$Ÿ T[[PæœP(PB~\~qÿŸ‡ù’ùP~0~P0~g~\xù’ù\l}nP~0~P0~B~\xù‡ù\&~B~qÿŸxùùqÿŸ<[‰[‘ØyLØ[Ø‘Øy<[‰[‘ÈyLØ[Ø‘Èy<[â]‘ÈyµÂÄ‘Èy`ÃoÑÈy°É¿É‘ÈyÛÎùΑÈy–Ï#БÈyLØiÝ‘Èy9îÑð‘ÈyÑöòö‘Èy÷xù‘Èy]בÈy6W‘Èy\$f)‘Èyu) ,‘Èy.2È4‘Èy ;¸=‘ÈyGißk‘Èy¦æ¹æ‘ÈyÐæãæ‘Èy‚íð‘Èy+û>û‘Èy ¾ ‘ÈyI[‰[RLØZØR[¯[SÞÚìÚS¥[¯[PÞÚåÚPåÚìÚ]º[Ñ[R°ðÈðR+û5ûRº[Á[PÁ[Õ[]°ðÑð]+û>û]º[Ñ[Q°ð´ðQ´ðÈð}+û5û}ü[\RÑöéöR¦æ°æRü[\SÑöòöS¦æ¹æSü[\QÑöÕöQÕöéös¦æ°æsA\X\R6NRÐæÚæRA\\\]6W]Ðæãæ]A\X\Q6:Q:N}ÐæÚæ}›\Z]VêÎùÎV¥Ï´ÏVï&F'Vu)*V.2´2V ;‰;V=¸=Væ\<]0Ÿu)‚)0Ÿ.2B20Ÿ ;;0Ÿ=¸=0Ÿæ\<]Su)‚)S.2B2S ;;S=¸=Sæ\<]Vu)‚)V.2B2V ;;V=¸=V+]/]P/]<]Q ; ;Qñ\<]]u)‚)].2B2] ;;]=¸=]ˆ]Ì]S\$l$Sˆ]“]P“]Ì]‘¨{\$l$‘¨{ˆ]“]P“]â]‘¨{–ϥϑ¨{\$ï&‘¨{]Ì]Q\$k$Q´ÏБØyGiTi‘Øy‚í–í‘Øy  ‘Øy£ ¾ ‘Øy´ÏÜÏSGiTiSÍÏ#БØy‚íð‘Øy ¾ ‘ØyÍÏÜÏSÜÏ#ÐS‚í"îS © S£ ¾ SÐ ÐP Ð#ÐQ  QØÏ#ÐV‚íîV  V£ ¾ V÷‰ŠVß í V ŠŠPß æ Pæ í S)Š@ŠR %R R)ŠDŠS .SS)Š@ŠQ Q%s smŠ|Š2ŸÖ!M$2ŸmŠqŠUqŠ|Š]Ö!M$]mŠqŠTvŠ|ŠPÖ!M$Pß™?š]àðFñ]Éóæó]¸=Ñ=]ØGæG]²êËê]Öýãý]ù™?š0Ÿ¸=Ñ=0ŸØGiJ0Ÿù™?š]¸=Ñ=]ØGiJ]š?šV¸=Ñ=VØG@HV.š2šP2š?šQØGÜGQš?šS¸=Ñ=SØGWHSàðÉó]²êËê]Öýk]îðÉó0Ÿ²êËê0ŸÖýk0Ÿîð ñV²êËêVÖýKþVîðÉó]²êËê]Öýk]'ñ+ñP+ñ<ñQîð·ñS²êËêSÖýeþSý¬`­]z­‘­]Ã0Ã]³ËÜË]ý¬(­Sz­‘­S­`­]Ã@Ã]³ËÜË]­(­S(­`­SÃ@ÃS³ËÜËSO­S­PS­`­^³ËÜË^$­`­VÃ@ÃV³ËÜËV×+@,‘yâI J ‘yo $o ‘yò+ý+Pý+@,SâI J So $o S×+>Q0ŸŒN`0ŸyS0Ÿ"0Ÿ{eÉ0Ÿ[ á. 0Ÿ4> C> 0ŸâI *J 0Ÿ`K •Š 0Ÿ×+>Q0ŸŒN`0ŸyS0Ÿ"0Ÿ{eÉ0Ÿ[ á. 0Ÿ4> C> 0ŸâI J  ¨Ÿ`K •Š 0Ÿ×+@,0ŸâI J 0¶ Ÿo $o 0Ÿ×+>Q0ŸŒN`0ŸyS0Ÿ"0Ÿ{eÉ0Ÿ[ á. 0Ÿ4> C> 0ŸâI J  ¡$Ÿ`K •Š 0Ÿ0,@,PâI þI PþI J wo o Po $o w.G.S4> C> SR {R S6† b‡ V@† h† Sv3>‘¨}-t Qu ‘¨}Âu {{ ‘¨}Ã{ „ ‘¨}>„ O… ‘¨}m… Ë… ‘¨}ù‚ eƒ Sº„ O… Sƒ ‹ƒ Vº„ O… Vô4>‘¨y-t Ot ‘¨y‹t ýt ‘¨yu Qu ‘¨yÂu äu ‘¨y#v £x ‘¨yµx 4z ‘¨yxz {{ ‘¨yÃ{ | ‘¨y)| S| ‘¨y’| K} ‘¨y]} Á} ‘¨yý} V ‘¨yh  ‘¨yÇ ƒ€ ‘¨yÇ€ î€ ‘¨y& s ‘¨y… Ò ‘¨yä 1‚ ‘¨yF‚ ’‚ ‘¨yØ ®€ V®€ Ç€ ]Ç€ V & ]â W€ ]\€ d€ ]Ç€ Ï€ ]†6>‘ y-t Xt ‘ y‹t u ‘ yu Qu ‘ yÂu íu ‘ y#v ¬x ‘ yµx =z ‘ yxz {{ ‘ yÃ{ "| ‘ y)| _| ‘ y’| T} ‘ y]} Ê} ‘ yý} ý~ ‘ y¿7¹;‘ÈzKw `w ‘ÈzHx Ux ‘Èzµx Âx ‘Èz y Ó> ÿŸÓ>æ>0Ÿæ>Z?1Ÿ¼”+•1Ÿ+•—•S—• •Qò•ù•0Ÿù•N– ÿŸN–˜–S??2Ÿ•&•2Ÿ??P• •P]•—•S—• •QVq Ñq ]Sr s ]Ts -t ]Zq »q TSr žr Tžr ¾r }Ts Às TÀs Ûs }~r žr Tžr ¾r Q²s -t 2ŸZ?çG‘Ð}Œ¼”‘ {¯–@Ÿ‘ {¶Ÿh¨‘ {ר믑 {Ȱ±‘ {«±jÕ‘ {ÿÕtÖ‘ {€×Ø‘ {%Øí‘ {[í\‘ {˜?¬?P¬?±?‘Ø~±?çG‘ðzŒ¼”‘ðz¯–@Ÿ‘ðz¶Ÿh¨‘ðzר믑ðzȰ±‘ðz«±jÕ‘ðzÿÕtÖ‘ðz€×Ø‘ðz%Øí‘ðz[í\‘ðzÖ?DVŒôŒV xV–ìVŽ\ŽVzŽäŽVùŽOVd¿VÝ3VH´VÒ>‘V\‘Æ‘VÛ‘J’Vh’¾’VÓ’.“VL“³“VÈ“5”VÒž"ŸVø?}@‘¸yL“X“‘¸y]“Ó‘¸yȓՓ‘¸yf›Õ›S½œ(S2‡So›ü›V½œ&V2sV7EçG‘ˆ~¯–Úš‘ˆ~¶Ÿh¨‘ˆ~ר믑ˆ~Ȱ±‘ˆ~«±jÕ‘ˆ~ÿÕtÖ‘ˆ~€×Ø‘ˆ~%Øí‘ˆ~[í\‘ˆ~˜Ò˜VÒ˜ð˜^ð˜1™V1™O™^ ˜€˜^…˜˜^ð˜û˜^ÁFçG‘ y¯–—‘ y¶ŸŠ¢‘ y¢º¢‘ yí¢B£‘ yK£v£‘ y¬£¤‘ y,¤Œ¤‘ y˜¤Τ‘ yõ¤|¥‘ y¥¥Û¥‘ y¦:¦‘ yc¦™¦‘ y¦§‘ y$§Z§‘ y§î§‘ yú§0¨‘ yר)«‘ y¶¼é¼‘ y.½a½‘ y¦½Ù½‘ y¾i¾‘ yz¾ξ‘ yݾj¿‘ y ¿ü¿‘ yÀ<À‘ yrÀ¨À‘ yÞÀÁ‘ yJÁ€Á‘ y¸ÁkÑ yWUW‘ ycWqW‘ y¿X Y‘ yYfY‘ ytYZ‘ y,Z{Z‘ y³ZûZ‘ y0[[‘ y›[Ñ[‘ yqG–G^³Z¿Z^G–GR³ZºZRºZ¿Z ~‘˜})ÿŸ¥@¥Q¥F¥ScS-VSVˆ_%U_-5_?S?D‘ yŸ³S³¸‘ y!$P$DRŸ¨R¨®‘ yZ;Vd²VhžSž‘øxd—‘øx¿Q\<{\H~\ÈßQ>§>P§>¬>‘¸~>Ò>S=?’?SK ‘Ày<€‘Ày´‘ÀyHŒ‘Ày·5‘Àyi©‘ÀyÝ‘ÀyI1‘Àyd¨‘ÀyБÀy<y‘ÀyŸß‘Àyñ„‘ÀyŸû‘ÀyY‘Àyt·‘ÀyÒ‘Ày0s‘Ày—Ø‘Àyþ@‘Àyh¬‘ÀyÕ‘ÀyDˆ‘Ày°ð‘Ày £‘ÀyÇ ‘Ày-m‘ÀyˆË‘Àyñ5‘Ày]¡‘ÀyÉ ‘Ày> ‚ ‘Ày³ ÷ ‘Ày+!o!‘Ày£!!(‘Ày&(f(‘Ày£(ã(‘Ày )*‘ÀyP**‘ÀyÊ* +‘ÀyD+€+‘Ày¾+ð+‘Ày,¬,‘ÀyÀ,ø,‘Ày-K-‘Àyo-§-‘ÀyË-.‘Ày*.c.‘Ày‰.É.‘Àyñ.1/‘Ày\/š/‘ÀyÐ/0‘ÀyM00‘ÀyÊ0 1‘ÀyG1‡1‘Ày²1ñ1‘Ày22‘Ày±2ê2‘Ày3P3‘Àyx3¸3‘Àyã3!4‘ÀyW4—4‘ÀyÔ45‘ÀyQ5‘5‘ÀyÎ5e8‘Ày˜8Ö8‘Àyè8p9‘Ày‹9Ã9‘ÀyÞ9:‘Ày1:i:‘Ày:Ì:‘Àyò:2;‘ÀyZ;š;‘ÀyË; <‘Ày?<<‘Ày¼<þ<‘Ày1=u=‘Àym"p"Pp"Ä"SÄ"0(‘èy£(­(‘èy )Ý)‘èyP*Z*‘èyÊ*Ô*‘èyD+N+‘èy¾+È+‘èy,w,‘èyÀ,Ê,‘èy--‘èyo-y-‘èyË-Õ-‘èy*.4.‘èy‰.“.‘èyñ.û.‘èy\/f/‘èyÐ/Ú/‘èyM0W0‘èyÊ0Ô0‘èyG1Q1‘èy²1¼1‘èy2_2‘èy±2»2‘èy33‘èyx3‚3‘èyã3í3‘èyW4a4‘èyÔ4Þ4‘èyQ5[5‘èyÎ5à5Sà518‘èy˜8¢8‘èyè8B9‘èy‹9•9‘èyÞ9è9‘èy1:;:‘èy:—:‘èyò:ü:‘èyZ;d;‘èyË;Õ;‘èy?<I<‘èy2O2Q+2U2S²$û$‘Àz%,?,P?,D,‘à~-,U,S1)*\P*v*\@)v)Sv)=*‘˜yP*·*‘˜y929Q989SÙ7"8‘Àz—YÂYSÂYÇY‘ˆy,Z@ZS@ZEZ‘ˆy¤Y§YP§YÇYT,Z5ZT5Z;Z‘ˆy-ÃkшycWqW‘ˆyMÃkÃRcWlWRlWqW ‘ˆy‘˜})ÿŸBVŸVVXX¡XV¡X¿X‘øxPV~VS~V•V‘øxXXeX‘øx›Ä Ç‘¨y OHO‘¨yPQªQ‘¨y¿QZR‘¨yoR–R‘¨yêRLS‘¨ycS·S‘¨yÎSXT‘¨y“TÞT‘¨yõT@U‘¨yéSTPTT‘À~ùS.TS“TëTSÓÅ È‘˜zbLxM‘˜zŠMùM‘˜z NuN‘˜z‡NúN‘˜z OSO‘˜zöO`P‘˜zPQ—Q‘˜z¿Q¼‚¼‘Ày¶¼ú¼‘Ày.½r½‘Ày¦½ê½‘Àyh¸ƒ¸Pƒ¸ˆ¸‘¸~q¸²¸S"¹G¹S!´r´SÓ´ø´Sø´3µ‘øx/´L´UL´h´‘øxÓ´Ý´‘øxO¯ñ¯V«±ù±V²_²V]¯`¯P`¯¯U¯ë¯‘˜y«±ű‘˜y²+²‘˜yGIK‘Øz»]z^‘ØzÛ^ù^‘ØzZ_j_‘ØzË_í_‘Øz… ¨ ‘Øz !!‘Øzz!Š!‘Øz!½!‘Øz•IKK‘àz»]r^‘àzÛ^ñ^‘àzZ_b_‘àzË_å_‘àz  ‘àz…   ‘àz !!‘àzz!‚!‘àz!µ!‘àzYK”K\|K”K]rH^c¦^{<\c‘\öL…O‘ðye­‘ðyÓ/‘ðyä.‘ðyRš‘ðyÀ‘ðy>ˆ‘ðy¬µ‘ðyÙ#‘ðyA‹‘ðy©ñ‘ðya‘ðyˆÒ‘ðy{þ“‘ðy±”ø”‘ðyÛÂÅÑðyîÃ7Ä‘ðy^ħđðyÎÄÅ‘ðy>ňőðy£ÅíÅ‘ðy ƬƑðyÊÆÇ‘ðy;ǞǑðyÉÇÈ‘ðy1ÈÍÈ‘ðyôÈ>É‘ðyÅkSÙ*S*A]A¤S¤©]Îk]Ùä]AL]—N…O‘ yeÌ‘ yÓ‘ yä‘ yR¹‘ y{•‘ y!•n•‘ y¹•"ž‘ yTžŠž‘ yòžy¡‘ yg¦´¦‘ yÒ¦§‘ yd§š§‘ yy¨¯¨‘ y©l©‘ y£©Ù©‘ yAªwª‘ yߪ«‘ yI²²‘ yç²/³‘ y”³ú³‘ y/´e´‘ yÍ´µ‘ ykµ³µ‘ y¶Q¶‘ y¹¶·‘ yýÀnÁ‘ y}Á ‘ yU‘ yÛÂåÑ yîÃ,Ä‘ y^Ĝđ yÎÄ5Å‘ y>Ŝő y£ÅÙÅ‘ y ÆÁÆ‘ yÊÆÇ‘ y;ǸǑ yÉÇ(È‘ y1ȹȑ yôÈ*É‘ y[ ‘ ‘ yÜ  ‘ y] Ä ‘ yë ! ‘ yy J ‘ y™ Ï ‘ y$ ‘ y¦ ! ‘ y+! œ! ‘ yÁ! '" ‘ y8" v" ‘ y¸" —# ‘ y¤# ü# ‘ y&$ Ÿ$ ‘ y¬$ % ‘ yW% •% ‘ yÝ% M& ‘ yZ& À& ‘ yå& ' ‘ ys' Ù' ‘ yè' Y( ‘ yf( œ( ‘ yä( U) ‘ yb) ˜) ‘ yã) * ‘ yd* Ê* ‘ yï* %+ ‘ yz+ à+ ‘ y, ;, ‘ y, ö, ‘ y- Q- ‘ y¦- Ü- ‘ y1. y. ‘ yGOlO]Óß]UOlORÓÚRÚß }‘˜})ÿŸJÈ}ÈQWȃÈVÄ‘•‘¨y!•e•‘¨y¹•"ž‘¨yTž~ž‘¨yòžg¡‘¨yg¦s¦‘¨yÒ¦ü¦‘¨yd§ާ‘¨yy¨£¨‘¨y©M©‘¨y£©Í©‘¨yAªkª‘¨yߪÆ«‘¨y ®®‘¨yo®™®‘¨yø®7¯‘¨yþ¯(°‘¨y°º°‘¨y"±L±‘¨y´±Þ±‘¨yI²s²‘¨yç²#³‘¨y”³ñ³‘¨y/´Y´‘¨yÍ´÷´‘¨ykµ§µ‘¨y¶E¶‘¨y¹¶õ¶‘¨yýÀcÁ‘¨y}Á‘¨yU‡‘¨yÛÂÜѨyîÃ#Ä‘¨y^ēđ¨yÎÄ,Å‘¨y>őő¨y£ÅÍÅ‘¨y ƵƑ¨yÊÆôÆ‘¨y;ÇTÇ‘¨y[ … ‘¨yÜ  ‘¨y] » ‘¨yë  ‘¨yy > ‘¨y™ à ‘¨y$ c ‘¨y¦ ý ‘¨y+! ‘! ‘¨yÁ! " ‘¨y8" m" ‘¨y¸" Œ# ‘¨y¤# Þ# ‘¨y&$ –$ ‘¨y¬$ % ‘¨yW% Œ% ‘¨yÝ% B& ‘¨yZ& ·& ‘¨yå& ' ‘¨ys' Ð' ‘¨yè' N( ‘¨yf( ( ‘¨yä( J) ‘¨yb) Œ) ‘¨yã) * ‘¨yd* Á* ‘¨yï* + ‘¨yz+ ×+ ‘¨y, /, ‘¨y, í, ‘¨y- E- ‘¨y¦- Ð- ‘¨y1. m. ‘¨y.ÆbÆS;ÇTÇS;Æ>ÆP>ÆbÆR;ÇIÇRIÇOÇ‘ˆy%“¤”‘˜z±”Á”‘˜z!•@•‘˜z¹•̘‘˜zýÀ Á‘˜z}ÁÜÁ‘˜zUÂb‘˜zێјzîÃþјz^ÄnÄ‘˜zÎÄÞÄ‘˜zÁ! Ñ! ‘˜z8" H" ‘˜z¸" 7# ‘˜z¤# ¼# ‘˜z&$ 6$ ‘˜z¬$ Þ$ ‘˜zW% g% ‘˜zÝ% í% ‘˜zñÂçÃVîÃEÄVúÂ"ÃS#”¬”‘øy!•y•‘øy¹•2ž‘øyTžžž‘øyòž¥‘øyÞ¥!¦‘øyg¦§‘øyd§®§‘øyù§5¨‘øyy¨è‘øy©X©‘øy£©í©‘øyAª‹ª‘øyߪ­‘øyi­έ‘øy ®²®‘øyø®B¯‘øy¯ï‘øyþ¯H°‘øy°Ú°‘øy"±l±‘øy´±þ±‘øyI²“²‘øyç²C³‘øy”³Þ³‘øy/´y´‘øyÍ´µ‘øykµǵ‘øy¶e¶‘øy¹¶·‘øyi·³·‘øyû·E¸‘øy¸Ú¸‘øy%¹o¹‘øyº¹º‘øyXº¢º‘øyöº@»‘øyˆ»á»‘øy¼¨¼‘øyì¼/½‘øyu½¿½‘øy ¾T¾‘øyœ¾¿‘øyÓ¿À‘øykÀµÀ‘øyýÀDÁ‘øy}Á‘øyU›‘øy[ ¥ ‘øyÜ & ‘øy] § ‘øyë 5 ‘øyy X ‘øy™ ã ‘øy$ n ‘øy¦ ê ‘øy+! r! ‘øyÁ! " ‘øy8" " ‘øy¸" n# ‘øy¤# é# ‘øy&$ k$ ‘øy¬$ % ‘øyW%  % ‘øyÝ% $& ‘øyZ& ¤& ‘øyå& /' ‘øys' ½' ‘øyè' 0( ‘øyf( °( ‘øyä( ,) ‘øyb) ¬) ‘øyã) -* ‘øyd* ®* ‘øyï* 9+ ‘øyz+ Ä+ ‘øy, O, ‘øy, Ú, ‘øy- e- ‘øy¦- ð- ‘øy1. . ‘øyS””‘ˆy!•+•‘ˆys””R!•*•R*•+• ‘ˆy‘˜})ÿŸ–ÁÉÁQ£ÁÏÁV$—R—S¬$ º$ S:—R—R¬$ ³$ R³$ º$ s‘˜})ÿŸÉ" '# V¤# ó# Vó# &$ ‘ˆyØ" # S# # ‘ˆy¤# ±# ‘ˆyx˜À™‘¨zë t ‘¨zy ” ‘¨z™  ‘¨z$ ¡ ‘¨z¦ &! ‘¨z+! ¼! ‘¨zÚ˜"ž^Tž©ž^òžР^Aª–ª^ߪÖ«^ ®V®^o®¨®^ø®¯^þ¯@°^°Ò°^"±d±^´± ²^I²ž²^ç²;³^”³¨³^/´„´^Í´"µ^kµÒµ^¶p¶^¹¶ ·^[ ° ^Ü 1 ^] t ^ë @ ^y P ^™ Û ^$ / ^¦ ´ ^Z& n& ^å& :' ^s' ‡' ^è' ü' ^f( ¨( ^ä( ø( ^b) ·) ^ã) 8* ^d* x* ^ï* 1+ ^z+ Ž+ ^, G, ^, ¤, ^- ]- ^¦- è- ^1. ˜. ^  V™ í V$ x V˜  S™ ï S$ ƒ Sô™÷™P÷™&šS&𳛑øx[ š ‘øxÜ  ‘øxs' „' ‘øxè' ù' ‘øxf( ¥( ‘øxä( õ( ‘øxb) ¡) ‘øxã) "* ‘øx_›h›P_›ýÀ ÿŸZ& è'  ÿŸd* á.  ÿŸ_›ýÀ0ŸZ& è' 0Ÿd* á. 0Ÿ›L‘€zZ& à& ‘€zå& n' ‘€zd* ê* ‘€zï* u+ ‘€zz+ , ‘€z, ‹, ‘€z, - ‘€z- ¡- ‘€zPýÀ ÿŸ, -  ÿŸ¦- á.  ÿŸýÀ0Ÿ, - 0Ÿ¦- á. 0ŸkBž‘ˆzTžמ‘ˆzòžÃ¥‘ˆzÞ¥L¦‘ˆzg¦I§‘ˆzd§Þ§‘ˆzù§^¨‘ˆzy¨ó¨‘ˆz©ˆ©‘ˆz£©&ª‘ˆzAªĪ‘ˆzߪN­‘ˆzi­ð­‘ˆz ®Ý®‘ˆzø®f¯‘ˆz¯ã¯‘ˆzþ¯u°‘ˆz°±‘ˆz"±™±‘ˆz´±.²‘ˆzI²̲‘ˆzç²y³‘ˆz”³´‘ˆz/´²´‘ˆzÍ´Pµ‘ˆzkµ¶‘ˆz¶ž¶‘ˆz¹¶N·‘ˆzi·à·‘ˆzû·u¸‘ˆz¸ ¹‘ˆz%¹Ÿ¹‘ˆzº¹=º‘ˆzXºÛº‘ˆzöºm»‘ˆzˆ»¼‘ˆz¼Ѽ‘ˆzì¼Z½‘ˆzu½ï½‘ˆz ¾¾‘ˆzœ¾¸¿‘ˆzÓ¿PÀ‘ˆzkÀâÀ‘ˆz1. Æ. ‘ˆzÑêPêþS1. =. SçþR1. 8. R8. =. s‘˜})ÿŸ^ ƒ ]ç²ó²]l ƒ Rç²î²Rî²ó² }‘˜})ÿŸ‚¦œ¦Pœ¦¡¦‘è~’¦ĦSù§-¨SW¢‰¢‘Àzˆ»Ÿ»S5¼f¼QB¼l¼S²¾5¿VÓ¿ÀVkÀ¿ÀV»¾5¿]Ó¿Þ¿]kÀvÀ]&®@®P@®E®‘è~6®o®S¯»¯Sœ¬Ó¬‘Àzi­…­SŸ8ŸP8ŸLŸS¹¶ŶS5ŸLŸR¹¶À¶RÀ¶Ŷ s‘˜})ÿŸŸ¶ŸP¶ŸÊŸSkµwµS³ŸÊŸRkµrµRrµwµ s‘˜})ÿŸ%^H^VË_×_V3^H^SË_×_Sw Kw ‘ˆy‰w ¢w ^œ~ ¾~ }ª Ÿ…S WT ‘ z\T ÆT ‘ zËT $U ‘ zcU €W ‘ z¬W X ‘ zX —X ‘ zœX ØX ‘ z"Y ^Y ‘ zcY VZ ‘ z[Z ÀZ ‘ zÅZ ![ ‘ z&[ ›[ ‘ z [ \ ‘ zéS BT SËT $U ScU ÚU S"Y tY SZ ÅZ SþS :T ‘€yËT ÕT ‘€yT :T RËT ÔT RÔT ÕT ‘€y‘˜})ÿŸtY ôY SÅZ [[ S|Y “Y QVV ìV V,W €W V¬W X V`V ìV ],W 4W ]¬W ´W ]œ\ ê\  ÿŸê\ ø\ 0Ÿø\ ] 1Ÿ ] g] 2Ÿ$o )o 2Ÿ)o ¶o Vìo öo 1Ÿöo p 0Ÿp |p  ÿŸ|p Çp 2Ÿ&] 4] 3Ÿµp Çp 3Ÿ&] 3] Pµp Áp PNo ‚o VFg Úg wUi Xi SXi wi wwi ›i S›i 0j wdl ll Sll Úl wÚl ðl Sðl mm wNg Ôg TUi ©i T©i Çi w#dl èl Tèl ðl sðl m w#†i ©i T©i Çi QÚl mm 3Ÿg] Ÿ_ ^b “b ^äb õb ^,c Rc ^„c »c ^ïc d ^Td ‰d ^–d ®e ^åe #f ^cf ºf ^,g Ag ^Çp Vq ^|] ¦` \°` Ú` \a Qa \}a Õa \ b `b \b ¸b \äb »c \ïc Àf \,g Fg \Çp Vq \“] ¡` _°` Ã` _a Ea _}a Éa _ b `b _b µb _äb »c _ïc ½f _,g Fg _Çp Vq _Ñ] ø] ‘˜yÇp Ñp ‘˜yÜ] ø] RÇp Ðp RÐp Ñp ‘˜y‘˜})ÿŸâd Ee Ve åe Vëd e Qoe ˜e ‘€yåe îe Qîe øe ‘€y^ -^ Sq q S^ -^ Rq q Rq q s‘˜})ÿŸ“^ ö^ Väb c Vœ^ ³^ QU_ ¯_ ‘€y b )b ‘€yïc d Šª ŸÛ_ à_ Pà_ T` w°` }a wì_ T` ^°` ï` ^a ,a ^Ÿf Ìf Šª Ÿ&h ”h ‘èyòh i Ù¨ Ÿ0j Oj Ù¨ ŸÖj õj Ù¨ ŸiV~Vs~V©VwiVªV3ŸiVªV1ŸiVªV à¿ ŸiV±V3ŸiVªV Sª Ÿ×Š k‹ 0ŸÓ‹ ™ 0Ÿ™ )™ P)™ a™ ]a™ v™ 0Ÿv™ ‘™ P‘™ «™ ]«™ Ëš 0ŸËš Ûš PÛš 5› ]5› E› 0ŸE› R› PR› › ]› ¥› 0Ÿ¥› À› PÀ› Ú› ]Ú› t 0Ÿt „ P„ 㟠]㟠þŸ 0ŸþŸ   P  3  ]3  N  0ŸN  i  Pi  ƒ  ]ƒ  Ž  0ŸŽ  ©  P©  Ì  ]Ì  ç  0Ÿ¡ l¢ 0Ÿq¢ Ê£ 0Ÿü£ ¤ ]¤ '¤ P'¤ e¤ ]e¤ |¤ P|¤ Œ¤ 0ŸŒ¤ ™¤ ]™¤ °¤ P°¤ Ö¤ 0ŸÖ¤ æ¤ ]æ¤ ý¤ Pý¤ ¥ ] ¥ $¥ P$¥ d¥ ]d¥ ±¥ 0Ÿ±¥ µ¥ Pµ¥ À¥ ]À¥ Ð¥ PÐ¥ ¦ 0Ÿ¦ -¦ ]-¦ =¦ P=¦ M¦ ]M¦ d¦ Pd¦ D§ ]D§ O§ PO§ ’§ 0Ÿ×Š k‹ 0ŸÓ‹ P™ 0ŸP™ a™ Pa™ »™ S»™ Ï™ 0ŸÏ™ ê™ Pê™ š Sš š 0Ÿš 2š P2š Eš SEš Yš 0ŸYš tš Ptš ‡š S‡š —š 0Ÿ—š ¤š P¤š Ûš SÛš ðš 0Ÿðš › P › $› S$› y› 0Ÿy› Š› PŠ› ê› Sê› þ› 0Ÿþ› œ Pœ 2œ S2œ Fœ 0ŸFœ aœ Paœ zœ Szœ Šœ 0ŸŠœ —œ P—œ Š SŠ Ÿ 0ŸŸ º Pº Ó SÓ è 0Ÿè ž Pž ž Sž 1ž 0Ÿ1ž Lž PLž ež Sež zž 0Ÿzž •ž P•ž ®ž S®ž Þ 0ŸÃž Þž PÞž ÷ž S÷ž Ÿ 0Ÿ Ÿ 'Ÿ P'Ÿ @Ÿ S@Ÿ UŸ 0ŸUŸ pŸ PpŸ ‰Ÿ S‰Ÿ žŸ 0ŸžŸ ¹Ÿ P¹Ÿ ÒŸ SÒŸ ç  0Ÿ¡ l¢ 0Ÿq¢ ¿£ 0Ÿ¿£ Ö£ Sé£ '¤ S'¤ +¤ P+¤ 6¤ S6¤ A¤ PA¤ |¤ 0Ÿ|¤ Œ¤ SŒ¤ ¿¤ 0Ÿ¿¤ Ö¤ PÖ¤ $¥ 0Ÿ$¥ 4¥ S4¥ D¥ PD¥ T¥ ST¥ {¥ P{¥ š¥ S𥠱¥ P±¥ Ð¥ SÐ¥ ç¥ Pç¥ ¦ S¦ ¦ P¦ =¦ S=¦ M¦ PM¦ d¦ 0Ÿd¦ t¦ St¦ „¦ P„¦ ”¦ S”¦ ¤¦ P¤¦ ´¦ S´¦ Ħ PĦ Ô¦ SÔ¦ ä¦ Pä¦ ô¦ Sô¦ § P§ § S§ $§ P$§ 4§ S4§ D§ PD§ T§ ST§ k§ Pk§ {§ S{§ ’§ P׊ d‹ 0Ÿd‹ k‹ \Ó‹ ëŒ 0ŸëŒ ýŒ 1ŸýŒ ç  0Ÿ¡ l¢ 0Ÿq¢ Ê£ 0Ÿü£ ¤ 0Ÿ¤ ¤ \¤ A¤ 0ŸA¤ e¤ \e¤ O§ 0ŸO§ T§ @ŸT§ ’§ 0Ÿ×Š d‹ 0Ÿd‹ k‹ RÓ‹ ëŒ 0ŸëŒ ýŒ 0¶ ŸýŒ ç  0Ÿ¡ l¢ 0Ÿq¢ Ê£ 0Ÿü£ ¤ 0Ÿ¤ ¤ 0¶ Ÿ¤ A¤ 0ŸA¤ e¤ 0¶ Ÿe¤ O§ 0ŸO§ T§ 0¶ ŸT§ ’§ 0Ÿ×Š d‹ 0Ÿd‹ k‹ VÓ‹ ëŒ 0ŸëŒ ýŒ VýŒ ç  0Ÿ¡ l¢ 0Ÿq¢ Ê£ 0Ÿü£ ¤ 0Ÿ¤ ¤ V¤ A¤ 0ŸA¤ e¤ Ve¤ O§ 0ŸO§ T§  kOŸT§ ’§ 0ŸHŒ ÔŒ ÿ)ŸýŒ b ÿ)Ÿ™Ž ÄŽ ÿ)Ÿ¡ /¡ ÿ)Ÿ°¤ ¿¤ ÿ)ŸSŒ kŒ PkŒ ÔŒ SýŒ b S™Ž ÄŽ S¡ /¡ S°¤ ¿¤ SHŒ rŒ 0ŸrŒ |Œ P|Œ ÄŒ VÄŒ ëŒ 0ŸýŒ  P N VN U ÿ)ŸU ÷ V™Ž ÄŽ VÌ  Õ  V¡ /¡ Vw¡ …¡ V¡¡ ­¡ V¿¡ â¡ 0Ÿâ¡ í¡ V°¤ ¿¤ Vð Ž  *Ÿ Ž ]Ž SwŽ ™Ž S_¡ w¡ S}¢ ¢ PŽ¢ °¢ P½¢ Í¢ P΢ ê¢ Pc£ m£ 0Ÿm£ s£ P†¢ ¢ PÆ¢ Í¢ P:/:P;\;8:J:@;P;S:e:0;@;n:€: ;0;‰:—:; ; :®:;;·:Å:ð:;•;Ë;Ï;Ø;õ<Y=°=è=íA BY=\=_=€=ó=ö=Â@(Aö@A A(A€=“=ö=`?v?Â@(AíAÂ>Ð>A¹A>>Ð>Ó>ˆ? ?(AA>>(>P>?? ?@@Â@=B?B_BÌBŸ_®_±_¶_2E@E¨E±EIEWE˜E¨EÒEäEpF|FíEûE`FpFFFPF`F’F FGG©F·FøFG>GPGSGœG8HêHÐIðI€J JõHüHI°IÀIÐIðI€J JßJüI%J2J;JXKtK°K·K LµLºLÄLAMLMMMSMVM`MµMíMñMøMçMíMñMøMäN'O*O-O•OšO¤O©OøO PšOŸOÀOéOR`STHT`TvT}TšT¾TÝTúTUØQgRèSTÝTúT C S a o } ˆ ‘ ò¡÷¡¢¢¢&¢:¢?¢M¢V¢#£(£5£>£ø£ý£ ¤¤̤Ѥޤ礡¥¦¥´¥½¥u¦z¦‡¦¦J§O§]§f§¨#¨0¨9¨ó¨ø¨©©Ç©Ì©Ù©â©¥ªªª¸ªÁª‚«‡«”««`¬e¬s¬|¬4­9­F­O­ë­ð­®®®'®2®@®M®[®f®t®‚®®›®©®¶®Ä®Ï®Ý®ë®ù®¯¯¯-¯8¯F¯T¯b¯m¯{¯ˆ¯–¯¡¯¯¯½¯˯Ö¯ä¯ñ¯ÿ¯ °°&°4°?°M°Z°h°s°°°°¨°¶°ðѰܰê°ø°±í™šóœ š*š-š0šfšŽšÀœÌœ œœœœQœ{œ”ž žÈžÒžÕžØž Ÿ2ŸÊŸÖŸH¡R¡U¡X¡œ¡¡&¢2¢k¢u¢x¢{¢¿¢ã¢££>£H£K£N£’£¸£ä£ð£¤¤!¤$¤h¤Œ¤¸¤Ĥç¤ñ¤ô¤÷¤;¥a¥¥™¥½¥Ç¥Ê¥Í¥¦5¦a¦m¦¦š¦¦ ¦ä¦ §6§B§f§p§s§v§º§Þ§ ¨¨9¨C¨F¨I¨¨³¨ߨ먩©©©c©‡©³©¿©â©ì©ï©ò©6ª\ª‘ªªÁª˪ΪѪ«9«n«z««§«ª«­«ñ«¬L¬X¬|¬†¬‰¬Œ¬`Žpް‘Ø‘}ŽœŽ(”‹”X•„•6”~”‰”‹”à“ø“þ“””””(”©Ž¸Žð‘’¸ŽÇŽØ‘ð‘’’ÇŽÔŽ׎ÚŽ 3„•Ý•–°–[˜ ˜™Ä™›M›>£/žmŸ‚Ÿ‘ H¡ –`–…–°–[˜ ˜„•Ý•™Ä™›M›>£/žmŸ‚Ÿ‘ H¡„•Ý•™u™›M›>u™™™£æú/žwŸ‚Ÿ‘  ¡¡H¡£Æ ž/žwŸ‚Ÿ‘  ¡?¡H¡‹“–™!$'Ã똚œŸ”• ˜Ϙ=—Ž—x›‚›…›ˆ›×› œQzÖ—'˜M›W›Z›]›£›×›z£yŒÊ)IŽŽ’ÊŒÈŽŽ’ÇÌÏÒ&“.“D“`“ý“c”f”y”¸–b—&“.“G“L“ý“/” ˜8˜?˜H˜˜+˜?˜B˜™J™L™N™‹•’•›••’•›••î•ü•Q–[–f–n–ƒ–ü•ÿ•–*–5ÙDÙIÙTÙ‹«’«›«Â«’«›«Â«¬#Cdil©ÃÈçìï*/2n…Šéîúÿ?W\” ¥¨ÎÓµâµe)”)âµñµõ)$*ñµ¶$*S*¶¶S*‚*¶¶‚*±*™¹ ººhºnº†º¬º¿ººº7ºCºEºhºnºvºýÁgÂmŸ¡ÂÄÂÇÂâÂÃÃ6Ã;ÃDÃIÃtÂ{“Ÿ¡ÂÄÂÊÂÒÂÄÆÉÆÕÆÚÆÞÆûÆ6ÉÏÉÏÓ˜ÔÖœÖMØÙÛÛÛ"ÛÞ,Þ1ÞCÞëêHëËû©üºü½üÉüÌü×üàüŒìéì%þÿÿÿ ÿ#ÿ,ÿ7ÿò%ò+ò6ò%ó6ó;óCó"ö)öAöxöÂ÷Î÷Ô÷ß÷‰ùù¨ùßù|ƒ›Ò¢¥âùþ.4Qz  ‹  “ à I m r  ® ³ ¶ û ejm±±)±1±D±¢²Ï Ï0Ï`ÏèÏÐÙ@Û@äÞäþæè0ñhñ­ó•õw÷þ÷3ú\úuúNûÀú2K0Ï`ÏÙ@Û˜äÞä­ó ôÂô•õw÷¾÷2:m²—²þæ0çPçè0ñhñ ô¸ô¾÷þ÷3ú\úuúNûÀú:K[çÀçÛçè0ñhñþæ0ç ô¸ô¾÷þ÷3ú\úuúNûÀú:Kþæ0ç ôyô¾÷þ÷3ú\úyôŸôuúéúóú"û%û-ûBûNûÀú:K€úÓúû"û%û-ûBûNûÀú¢²Ï Ï0ÏÐaÙdÙÙ@Û@äÞäþæè0ê@ê0ñhñ­ó•õw÷þ÷3ú\úuúSûÀú2K¶@:¶k¶þ÷ø:ø<ø–ø™øôùúµ¬µèÎÏäµ¶ââ¸E¸| ²µÇÊÜß$‘T·c·Hì`ì›·¾·hñsñ̸õ¸ÈÕõ¸ù¸¹,¹–ÈÎAíA?¹C¹J¹¬¹¾ Ü áóöþúWº‚ºŠº–ºŸû«û›º«ºVei»l»t»€»,8…»”»8G×»¼,þ4þ6þ9þ404W8\8¬ÔÍ!Ü! * M,R,ú-. * ú-.!)!$$×%æ%!)!×%æ%1¿I¿£ Æ ?¿I¿£ Æ 8ÀPÀ*CFÀPÀ*C,ÁDÁaþ‰þ9ÁDÁaþ‰þ Â"¢ø»øÂ"¢ø»øeôŸôßõö"ö%ö7ö9öÛöëöôö÷xÉùÉ\Z}Z†Z”Z_[\ \2\ ]<]E]X]=^B^T^_^q^t^†^ˆ^_(_1_?_ÒÉàÉ_[ˆ[¿[ì[î[\\\ \/\?_›_§òAóJóYów>•>ž>°>{?Ë?Ô?ã?àò/ó?óAóJóYó{?¹?É?Ë?Ô?ã?åÍúÍ<:\:x::†:ˆ:ø_;`áìEíNíbíRïnïwïŒïWð–ðŸð³ððì2í:í=íNíbíWðƒð‹ðŽðŸð³ð-îWî_îbîsî‡îefpÌŽÌ—Ì¢Ì:ÍÎÎÎ"Î%Î¼ÎÆÎÉÎÑÎìÎîÎÏÏÏÏkÏ{τϨϱÏÁÏ eÛe:ÍeͯÍòÍúÍýÍÎÎ"Î%ÎYмІÑÿÑÒÒÒÒCÔ_ÔhÔsÔvÔ}ÔÕYÕbÕmÕpÕvÕªÑìÑôÑ÷ÑÒÒÒÒÕFÕNÕQÕbÕmÕpÕvÕff!f$f£f°f³f¶f…gˆg“g˜g›gžgdÄžÄAÅaÅsÅvţųÅS˜z˜¡˜­˜ߘâ˜ô˜÷˜(™0™\{‹{ÁŒÏŒRW®³lŽqŽÿŽâç ˜ÑÖ0‘5‘G‘T‘Ò‘é‘-’2’¡’¦’ÿ’“-“2“L“Q“6”;”U”Z”ý”••!•4•7•Ñ•– –0–=–@–U–j–Ú–ó–ü–—6—`—ÁŒÏŒè•– –(–=–@–j–œ–¡–¦–»–¾–8Ux”{”1•4•ì Žy’†’7“?“i}ê}'‡7‡D‡]‡f‡h‡u‡{‡LJšˆ£ˆˆ݈ꈉc‰l‰Œ‰ž‰«‰ω׉ü‰Š+Š.ŠÄ}Ò}LJ÷‡@ˆˆˆˆ’ˆ¦ˆ¶ˆ¿ˆˆ݈ꈉ%‰QŠžŠŒvŒ{Œ“Œ Œ£Œ¨“Á“ʓՓü“6”;ŒvŒ{ŒƒŒ Œ£Œ,‚ƒ…ƒ6„9„8ÀrÀÞÀÁÁ ÁÁ>Á󩋪?ºªº¸º¸»Á»Ë»¼k¼t¼/½dªrª¸ºÔº,»S»U»~»†»›»£»¯»Á»Ë»=½§½ÿ¾À¿É¿ú¿;¿†¿–¿À¿É¿Ó¿_«¬x¶´¶¶§·Ì·ø·¸R¸Ï«Ý«¶ë¶7¶N¶e¸ð¸.¹ã¹å¹è¹Ë»¼y¹¼¹̹ã¹å¹è¹ΰþ°®´±´ç@ÍA`VpVWW€^€`Àwx!ƽÆSã™ã°ù¹ùÈ4í4çDE XîX¿kl`VpV€^Ž_?xxSã™ãSAWA[A€AŽ_À_à_``Àw?x!ƽưù¹ùÈ4í4çDE XîX¿klë_@`Àw?xŽ_À_!ƽưù¹ùÈ4í4çDE XîX¿klŽ_À_!Æzưù¹ùÈ4í4çDEzÆ¤Æ X’XœXÊXÍXÐXåXîX¿kl,X|X©XÊXÍXÐXåXîX¿kókÍA`VW€^€`Àwx!ƽÆSã™ã°ù¹ùÈ4í4çDE XîXœÊ¡Ê¿kl•Š ÇB×BäB=C`†p† ‰ЉúB CC=C`†p†bCÂCà©í©ð©ø©p²ˆ²ðÂÃóC7Dt™t›tt„D®D¯˜¯š¯œ¯ƒ´¢´1RGR,_?_µµ`µeµMÑWÑZÑ]ѵ`µBÒLÒ™ßÍßÕßà8¶=¶D¶e¶~º¡ºC> X> °¶϶öNO½¶϶öNO϶A·ýrs ssø¤øRenqÂÊçî¶A·ø¤øRenqÂÊçj·p·|· ·"U1U¶·»··ã·z’’¢Š·Šô·ø·ÿ·¸æ·¸_,_5¸=¸@¸C¸„¸£¸O#O¸£¸O#Oɸ͸å¸6¹qá~áãæ÷æ#¦Á‚¹¡¹µýÖýerxrð¹ºîrýrý¹ºîrýrºuº°º»ºBPÓél….ºuºBPÓél…¥º­ºÁºÛºÜ)ÜÿºZ»à¿å¿ð¿ø¿À*ÀRÀZÀk`x`ÆaÓabbccBcOczc‚c…ø•øÃøÐøûøù!û1û_ûlû—ûŸû½ýÍýûýþ3þ;þhx¦³Þæ#Q^‰‘BƒRƒ€ƒƒ¸ƒÀƒí…ý…+†8†c†k†˜ˆ¨ˆÖˆãˆ‰‰4‹D‹r‹‹ª‹²‹ÐàŽŽFŽNްӵÓÀÓÈÓêÓ÷ÓÔ#ÔJÖOÖZÖbÖ‡Ö”Ö¿ÖÇÖÓÙØÙêÙòÙ ÚÚ@ÚHÚ,à4à}á‚á·áÄáñáùáuåzå…åå²å¿åçåïå~èƒèŽè–èáéîéê!ê«ë°ë»ëÃëåëòëììEîJîUî]î‚îîºîÂî9ñ>ñIñQñvñƒñ®ñ¶ñÝóâóíóõóô'ôRôZôö†ö‘ö™ö¾öËöóöûöFùKùVù^ù€ùù±ù¹ùàûåûðûøûü*üUü]ü„þ‰þ”þœþÁþÎþùþÿ( - 8 @ e r  ¥ ÿ    < I t | Á Æ Ñ Ù þ  6 > t y „ Œ ± ¾ æ î   % - x … ° ¸ Å Ê Õ Ý   7 ? ° µ À È ê ÷  # X ] h p • ¢ Í Õ ü    9 F n v Á Æ Ñ Ù û  , 4 A NA [A {A ÞC ôC UF hF uF •F éH øH $A NA [A eA UF hF uF F Z»»ÏC ÞC »–»¢»Ì»øH I ̻ջỠ¼l{ó¾ü¾¿8¿„ÏØÏRîUîFñIñêóíóíûðû‘þ”þ5 8   Î Ñ f Ÿ ¦ ° È Ó Ö á e h   " -  ° · Á Ù ä ç ò u Ÿ ¦ °  ° · Á ¾ÒaÓWÖZÖbÖmÖpÖ{ÖÜîÜõÜ ÝÝ"Ý%Ý0Ý9ÝFÝjÝrÝÊâíâðâûâãã?ãGãnåuåå˜å›å¦å'Ó5ÓÜ“ÜÁÜáÜäÜîÜõÜ ÝÝÝ9ÝFÝjÝrÝè~èëšë¡ë«ëÃëÎëÑëÜë™ö¤ö§ö²ö"ù5ù<ùFù^ùiùlùwùpëšë¡ë«ë"ù5ù<ùFùîØ/ÙØÙàÙÍßÕßà!à/Ù?ÙKÙfÙVD{D€¨€÷ÿ ‚‚‚(‚¶µŵÿÿŵʵѵòµpJ“J}n’nûµ%¶püxüzü|ü2Ð7Ð>Ð_ÐŲè²N`c`pÐtÐ{ЖÐhʉÊ/ƒBƒäÐÑáWðWòÐÑáWðWÑjÑžƒ©ƒ¬ƒ¯ƒçêûêW"j"s"v"¸#À#é$%#ÑjÑçêûêW"j"s"v"¸#À#é$%“ћѧÑëÑääõÑBÒð+ðq'qLÒTÒWÒ[Ò'q+q2qˆqiÝwÝzÝ}Ý8çPçu ƒ ™ œ NiFFNFrFšF|“Õ“2”:”çÉøÉûÉÊÊ Ê:ÊCÊ>QMQSbpQ€QbqiRqR}R¢R5=?AšFÑF’ì›ìíF G¸!Ç! GRGf)u)eG—G0/?/ÑG)H$q1q4q8qŠ‹ž‹££Фë¤Ë’ð’­1 À1 Å1 Þ1 ó1 ÿ1 2 2 !2 #2 lIJ ssqÈqËqÓqÕqúq r"rIrQrss‘s¦sÂsÔsÖsísõsu&u:uEuHuSu\u_uhutuuƒuÛvçvww$w&wÞwôwd3 €3 ÒIàId3 v3 ›q»q¾qÈqËqÓqÕqäq r"rIrQr-Ï–Ï :¼:¡Y¡\¡n¡p¡z¡¡•¡§¡°¡ÙRïRòRúRüRS S!S3S#J.J:JOJ’B¢B19‹JªJÐöØöÛöÞö²J¶J½JØJ¯öÐöXøkøëJðJK$Kê>ê¿ÉÔÉ5K9K@K[K°Ñ5øHøvK~KK„KÌKìKÄÛÓÛÙKìKÄÛÓÛ LL&LwL6cJcõde-‡;‡æˆ‰·LÖL— ¸ ÔÉçÉ%MDM>êMê2MDM>êMêDMªMÁ̸tÌtyv‡v4xOxcMªM¸tÌtyv‡v4xOxT_m_ó_ö_—aša€3 3 b_m_€3 3 NÚNàNìN¼òó óóóó#ó9óKóTóÕôîôõõõõ1õ3õtöŠöö•ö—ö¡ö¦ö¼öÎö×öYadl&.19×ßâꈓ›Úòó óóóóKóTótöŠöö•ö—ö¡öÎö×öÚNàNìNO­ò¼òOO%OOO²ôÁôOO‚OÁôÐôP#PadoP°P¼PÄPQ^@^M^u^†^NSsSiqqZShSiqpqvqqÈ+æ+<?! !æòòúòýòó (ñ HøXø^}“›ž¡…‰«r“kø~øûÿXzzÄ{Ò{Õ{Ø{·ŠÅŠrŒŒª®ºÕ¶ôÖôÏ^_I âI *J `K Ú^_I @I ÑI âI *J GJ ¶ôÖô@I ÑI GJ `K ¶ôÖô@I ™I yJ àJ ™I ¸I GJ yJ àJ K %K `K RJ yJ àJ K %K NK <…“DHOjº&Û&!> 4> …“øNWVeVŒVV˜V¤VXX»YâYåYèYšt¨t´tætÕvÝvàvãv8…A…M………¬ˆ´ˆUŠ]Šü‹Œ£«JRñù˜’ ’?”G”ܙ䙛˜›DLúžŸ° ¸ f¢n¢¤$¤Ò¥Ú¥G¨O¨a¨i¨¾ªƪw¬¬9®A®ï¯÷¯¥±­±[³c³µµǶ϶}¸…¸3º;ºé»ñ»Ÿ½§½U¿]¿³Á»Á_ÃgÃÅ!ÅÂÆÊÆiÈqÈÊʹËÁËbÍjÍ ÏϴмÐ]ÒeÒÔÔ‡˜‡›‡ž‡Á-Á»Á¾ÁgÃjÃd–ª–SšXš…ššœ œ9œAœ½Âï÷sŸxŸ¥Ÿ­Ÿ)¡.¡[¡c¡ߢ䢣£•¤š¤ǤϤK¦P¦}¦…¦.¨3¨O¨\¨Ú¨ߨ ©©:«?«l«t«î¬ó¬ ­(­²®·®ä®ì®h°m°š°¢°²#²P²X²Ô³Ù³´´еµ¼µĵ@·E·r·z·ö¸û¸(¹0¹´º¹ºC»K»b¼g¼”¼œ¼ ¾%¾¯¾·¾ʘÒ˜Õ˜ؘ(ª-ª2ªXªá§ê§ö§.¨?¨G¨a-œ-‘U)© EUÊ-t.š9¢9¥;­;Øüãüæüñüúüýüýýý!ýtþÕþØþêþìþÿ#ÿ9ÿ`ÿhÿŠ‘ &;GTWik¬¼¿ÊÓÖßú#+9.G.tþ†þµþÕþØþêþìþûþ#ÿ9ÿ`ÿhÿTW_akp†˜¡¨ Á Ö â ï ò   G ] ` h j t y  ¡ ª 'TW_ak˜¡G ] ` h j t ¡ ª b/j/v/™/7ö?öAöCö®1·1Ã1ó1ó1ü128282A2M2}2Ú3à3ì348&8*8-8Y8h8H¢T¢a¢d¢v¢x¢`9p9|9š9#:+:/:2:^:m:s˜˜Œ˜˜¡˜£˜k;{;‡;¥;Û;<VŽ^Ž`ŽbŽÄçÌçØçûçžï¦ï¨ïªïµè½èÉèèèééééÛöùþ "“J“¹ËÈËJ“O“[“|“µRÊRW>W08;>>WBWIWdWŸ Ÿ¢BµBݬý¬’ù¡ùê¬ý¬’ù¡ùœWXxàxÚ:î:›@©@bB}B»òáòäòçò¿WñWÚ:î:ñWXxàx›@©@bB}B»òáòäòçòñWXx—xžxàx›@©@bB}B»òáòäòçò¸XÂXÈXYY Yè]í]o€Œ¾µÇºÇçÇïǡ˳ËÜËëË‚‡´¼§¬Ùáµ5º5ç5ï5![&[S[[[ˆmm·m¿m#ˆ(ˆUˆ]ˆŸŸHŸPŸy«~«««³«pËuˢ˪ˑіÑÃÑËј0 0 Ç0 Ï0 }5 ‚5 ¬5 ´5 YY YLYE‹8Œ`eÇeR›a›ZÖoÖ¹æÐæBRÊRÙR­k¿k3 ¢3 Õ‹ì‹ô‹÷‹ÿ‹ Œ­k¿kxe˜e›e¥e§e±e°˜˜™¹ùåùëùõùøùúùüùúiÁÌbßbèbêbìb cC½Y½˜½š½ÈùåùëùõùøùúùüùúÌbßbèbêbìböb—жŠÁÕÉÕÌÕÏÕ¶ŠºŠÁŠÜŠPàqà‰ÊœÊ#4@o'–,–]–e–íÆòÆ,Ç4ÇlËqËyËË ÌÌ™äžäÑäÙä‹öö·ö¿öœÿ¡ÿÚÿâÿÁÆÿ>Fˆ,,Æ,Î,[/`/™/¡/í4ò4,545ü78:8B8Ø=Ý=>>“J˜JÒJÚJMURUŒU”U;Y@YyYY\\V\^\ßkäkl%ln•nÏn×nÏ€Ô€ 9†>†ˆ‡‡RW‘™æë%-RžWžž˜ž¥ ¥B¥J¥¸ª½ªöªþª­„­½­Å­º¿¿¿ù¿À¯Ê´ÊðÊøÊÍÐÒÐ ÑÑÖÓÛÓ ÔÔoÖtÖ¼×Ä×¶Þ»ÞôÞüÞîó-‚5‚©„®„ß„ç„OgTgg•g2j7jpjxjmmSm[mÄoÉop pk{p{ª{²{ðÌõÌ/Í7Íï. ô. -/ 5/ Ô3 Ù3 4 4 ¾ÏÛŽuÇ}ǭǵǑˡËëËúË @H/7em© ± Û ã 1 161>1u5}5­5µ5]>e>•>>©Z±ZßZçZJmRm€mˆmx‚€‚ª‚²‚ã‡ë‡ˆ#ˆÖžÞžŸŸ9«A«q«y«0Ë8ËhËpËQÑYщёѺhÂhðhøhk¥kÓkÛkZ0 b0 0 ˜0 ?5 G5 u5 }5 Ž!Ž-ŽbŽ4Ç<ÇmÇuÇË‘ËúË Ìâÿêÿ '/FNf n ó-û-).1.¡/©/Á0É045<5m5u5g9o99¥9>'>U>]>ÚJâJKKY‰Y¡Z©Z%l-lBmJm5‚=‚œ‡¤‡Û‡ã‡˜ž žΞÖžþª«1«9«ê®ò® ¯(¯øÊË(Ë0ËÑÑIÑQÑ•gg²hºhxj€j•kk[mcmxn€n pp'q/q5/ =/ R0 Z0 4 "4 75 ?5 bŽnŽzŽ¡ŽÛÆåÆ®Ž¶ŽºŽÝŽ#Ð2ÐÝŽâŽéŽ ®7Ñ7%%Bb*î9îOb*î9îbÑ¥°³»#O7O-Y;YIYLY¤Y¦Yü[\Ñ#O7O-Y;YIYLY¤Y¦Yü[\ú+™ã¨ã+3:^D.D__¢Âÿ$ÿ¯Âÿ$ÿÂ1‘?/J/M/U/Á_Õ_Á€Ï€Ý€à€8:ƒƒžƒß1‘Á_Õ_Á€Ï€Ý€à€8:ƒƒžƒZ‘j‘v‘Ž‘òö÷Ž‘–‘‘Á‘EEE‡}Ÿ}’%’Ç!Ö!’%’Ç!Ö!%’”’à7ë7î7ö7q{…{q­­­­å­ç­#°>°B’”’q{…{q­­­­å­ç­#°>°½’Í’Ù’ñ’ïþø’“1U9UVWVãl m mm¶oÄoÒoÕopp),ˆ,–,™,î,ð,>VWV°ÂÆÂMê²êãl m mm¶oÄoÒoÕopp°ÂÆÂMêTê[ê²êãl m mm¶oÄoÒoÕoppÙÉ ÊÑ7à7 ÊÊÊ2Êòˆ‰Oxbx;Ê?ÊFÊ—Ê•§©§—ª¤ª§ªªª¡Ê¯Êx͓ͷʼÊÈÊË:žIžËl˯ÐÄÐ^4^\ØÚšY¶YH‰`‰e–j–‘–™–ÙäÞäå åHMz‚mrŸ§n s ¡ © Î,Ó,ë-ó-É0Î0ü01ï5ô5!6)6B8G8_9g9>¢>Ò>Ú>KKMKUK”U™UÇUÏUçZìZ[![^\c\‘\™\×nÜn oo=‚B‚p‚x‚™žÌÔ-2`hJ¥O¥d¦l¦Å­Ê­â®ê®ÀÀ4À<ÀÔÔ@ÔHÔÐ×Õ× ØØüÞßàà5‚:‚e‚m‚ç„ì„……øhýh'i/iÛkàk ll€n…n³n»n/q4qbqjq²{·{â{ê{7Í<ÍjÍrÍÏ0 Ô0 1 1 ´5 ¹5 é5 ñ5 ¶Y»YÎYïYP§x§}B’B+ZCZ°™À™lšošAÌDÌ8ZCZ°™À™CZ¨ZPš[šoÈÃ'Ì5ÌÀÎÛÎ`Z¨ZoÈÃ'Ì5ÌÀÎÛÎàZ[Ø}g~ðœ0P¯`¯xù’ùslul[[â}ä}ö}ø}ðœ0~g~xù’ùslul~B~F~K~xù€ù…ù‡ù<[‰[LØ[Ø[¯[ÞÚæÚéÚìÚ¯[³[º[Õ[°ðÑð+û>ûñ[õ[ü[\Ñöòö¦æ¹æ*\.\A\\\6WÐæãæ—\·\êÎùÎ¥\·\êÎùÎæ\<]u)‚).2B2 ;;=¸=l]t]ˆ]Ì]\$l$´ÏÐGiTi‚í–í  £ ¾ ÍÏЂí–í  £ ¾ ÷‰Šß ç ê í Š"Š)ŠDŠ .WŠaŠmŠ|Š+"-"à™?šàðFñÐóæó¸=Ø=ØGæG²êËêÖýãýù™?š¸=Ø=ØGæGàðFñÐóæó²êËêÖýãýàðçðîðFñÐóæó²êËêÖýãýý¬`­€­‹­Ž­‘­Ã0óËÜË­`­Ã0óËÜË×+@,âI J o $o ý+,,@,o $o . ...4> C> a3j3v3¥3â4è4ô45Ô ó a€ d€ Ì€ Ï€ t6z6†6¯6ã8ì8ø8'9Z?¼”û”•••—•Û•ò•––G–N–––??•&•]•}•€•••—•¡•·•Ò•Vq Ñq Sr ³r µr ùr Ts ™s ²s Ðs Òs t ~r ³r µr ¿r Õr ùr ²s Ðs Òs Üs òs t Z??ßPçP?Œ?˜?²?×PßPø?(@ôGHžŒ¦ŒÿŒ +3Œž÷ŽŽŽpŽzŽŽŽ–ŽïŽZdrzÓå>HgoÈÒñùR‘\‘p‘x‘ёۑý‘’^’p’É’Ó’á’é’B“L“]“e“¾“Ú“è“ð“I”S”¯–·–——_—g—ˆ—š—ç—ñ—…˜˜æ˜ø˜E™W™¤™¶™ššešwšКÚš"›*›K›U›ü›œQœcœ³œ½œ(:‡™ìþZžlžÈžÚž6Ÿ@Ÿ,¤4¤ޤ ¤ë¤õ¤F¥N¥›¥­¥ú¥ ¦Y¦k¦¸¦ʦ§,§…§—§ð§¨^¨h¨Z°b°¾°Ȱ±†±¡±«±ï±÷± ²²U²]²s²}²»²òÙ²ã²'³/³E³O³Œ³”³¨³²³õ³ý³´´¯´·´É´Ó´µµ)µ3µpµxµе”µѵÙµëµõµ2¶:¶N¶X¶œ¶¤¶±¶»¶ù¶··!·_·g·}·‡·Å·Í·ã·í·1¸9¸M¸W¸õ¸ý¸¹"¹`¹h¹…¹¹Ò¹Ú¹õ¹ÿ¹@ºHºeºoº³º»ºغâº&».»K»U»™»¡»¾»È» ¼¼4¼>¼‚¼м¬¼¶¼ú¼½$½.½r½z½œ½¦½ê½ò½¾&¾p¾‚¾Ó¾ݾ4¿<¿–¿¨¿ü¿ÀhÀzÀÔÀæÀ@ÁRÁ®Á¸ÁªÎÄÎÏ/ϋϕÏíÕÿÕAÖIÖjÖtÖ¸ÖÀÖâÖìÖV×[×v×€×Ä×Ì×ë×õ×iØqØØšØÝØåØîØøØuÙ}ٜ٦ÙçÙïÙÚÚsÚ{Ú„ÚŽÚËÚÓÚåÚïÚ,Û4ÛFÛPÛÛ•Û§Û±ÛîÛöÛÜÜOÜWÜkÜuܲܺÜÎÜØÜÝ$Ý:ÝD݈ÝݯݹÝýÝÞ$Þ.ÞrÞzޜަޓá›á¼áÆá ââ1â;â“â›âºâÄâãã/ã9ã}ã…ã¤ã®ãñãùãä äˆää™ä£äæäîäå åMåUåpåzå½åÅåâåìåMæUætæ~æÂæÊæéæóæ7ç?ç^çhç¬ç´çÖçàç"è*èKèUèIí[íËíÝíGîYîúî ïyï‹ïõïð]ðoðúð ñ}ññèñúñUògòËòÝòJó\óÉóÛóHôZôÊôÜôLõ^õ ù²ùú1úØúêúWûiûÖûèû=üOüøü ý`ýrýÅý×ý*þ<þ˜þªþÿÿ}ÿÿöÿoëýj|ìþn€ðr„\dz„ÆÎïT^´¼Ûí4>Ž–Ýï9K•§ú hrþ b l ~ † â ì 2<€ˆª´#>HŒ”­·5=_i©±ÓÝ'?I19Zd¨°ÆÐ2<y•Ÿßñ„Œ•Ÿû Yajt·¿ÈÒ&0s{—Øàôþ@H^h¬´ËÕ!:Dˆ¦°ðø £«½Ç #-mu~ˆËÓçñ5=S]¡©¿É  4 > ‚ Š © ³ ÷ ÿ !!+!o!w!™!£!f(n(™(£(ã(ë() )**F*P**˜*À*Ê* ++:+D+€+ˆ+´+¾+ð+ø+ ,,¬,´,¶,À,ø,- --K-S-e-o-§-¯-Á-Ë-. . .*.c.k..‰.É.Ñ.ç.ñ.1/9/R/\/š/¢/Æ/Ð/00C0M00•0À0Ê0 11=1G1‡11¨1²1ñ1ù1û122•2§2±2ê2ò233P3X3n3x3¸3À3Ù3ã3!4)4M4W4—4Ÿ4Ê4Ô455G5Q5‘5™5Ä5Î5e8m8Ž8˜8Ö8è8p9x99‹9Ã9Ë9Ô9Þ9:%:':1:i:q:ƒ::Ì:Ô:è:ò:2;:;P;Z;š;¢;Á;Ë; <<5<?<<‡<²<¼<þ<='=1=u=}=Ÿ=±=>>h>r>Ò>Ú>3?E?’?¤?ý?@h@z@Ö@è@DAVA¯A¹AËAÓA,B>BšB¤B¶B¾BC$CnCvC•C§CDDbDtDÄDÖD&E8EˆEšEêEüELF^F±F»FG G,G>GŽG GðGHRHdH·HÉHI.II“IïIùIcJuJ¼JÄJÝJçJÅKÍKæKðK7L?LXLbLxMŠMùM NuN‡NúN OSO[OhOrOäOöO`PrP¹PÁP×PáP(Q0QFQPQ—QŸQµQ¿Q™>>­>9 ? K u W"a"m"‹"$¦$²$â$6);)@)f)Ä7Í7Ù7 8‰YÇY,ZEZŽY“Y›Y Y¤Y½Y,Z;Z-ÃkÃcWqW>VnV`XeXFVKVPVnVíSõSùS T¾ÅÇÅÓÅÆÔQ÷QêRSàQíQêRôRùRSoLŸLMMM”MwL|LLŸLíÊ÷ÊúÊ˙̣̦̩Ì^͋ͤB¬B®B°BWÎaÎmΪκÏçϹAÁAÃAÅAjÑpÑ|ѦÑÖÑÒ^fhj Ù1ÙÚ0ÚÙ&ÙÚÚ%Ú0Ú!äEäìåæ-ä:äìåóåùåæXé…鄌Žõéúéêêõéúéêê„ð¤ð ñ$ñð™ð ñññ$ñCìHìMìsì§õ¬õ¸õÉõ§õ¬õ¸õÉõ\üzüýýoøtøyøŸø›Èl t v x oªuªª«ª´M´Ø´Ý´&´+´/´M´S¯X¯]¯€¯€I‰I•IÅIkKpK|KˆKÙLêLöL.Mem¥­åí'/äì&.RZ’šÀÈ>F€ˆks­µÙá#AIƒ‹©±éñYaˆÊÒ±”¹”ð”ø”y••¬•¹•žž¦ž¿žÇž¥•¥«¥³¥!¦)¦4¦<¦§$§1§9§®§¶§ƧΧ5¨=¨F¨N¨è˨Û¨ã¨X©`©p©x©í©õ©ªª‹ª“ª¬ª´ª­&­6­>­έÖ­Ø­à­²®º®Å®Í®B¯J¯N¯V¯ïÓ¯H°P°]°e°Ú°â°ï°÷°l±t±±‰±þ±²²²“²›²´²¼²C³K³a³i³Þ³æ³ü³´y´´š´¢´µµ8µ@µǵϵèµðµe¶m¶†¶޶··6·>·³·»·È·зE¸M¸]¸e¸Ú¸â¸ò¸ú¸o¹w¹‡¹¹º º%º-º¢ºªºú˺@»H»U»]»á»ñ»¨¼°¼¹¼Á¼/½7½B½J½¿½ǽ׽߽T¾\¾i¾q¾¿‡¿ ¿¨¿À$À8À@ÀµÀ½ÀÊÀÒÀDÁLÁpÁ}ÁÂÂHÂUݣÂÎÂÛÂ~ÆýÃÅÃîÃöÃ/Ä7Ä^ÄfğħÄÎÄÖÄ ÅÅ>ÅFŀňţūÅåÅíÅbÆjƤƬÆÊÆÒÆ ÇÇTÇ\Ç–ÇžÇÉÇÑÇ ÈȃȋÈÅÈÍÈôÈüÈ6É>É¥ ­ Ï Ü & . P ] § ¯ È Ð 5 = V ^ X ` v ~ ã ë  n v ƒ ‹ ê ò ! ! r! z! ž! ¦! " " +" 8" " ‰" «" ¸" n# v# —# ¤# é# ñ# $ &$ k$ s$ Ÿ$ ¬$ % % J% W%  % ¨% Ð% Ý% $& ,& M& Z& ¤& ¬& Â& Ê& /' 7' P' X' ½' Å' Û' è' 0( 8( Y( f( °( ¸( ×( ä( ,) 4) U) b) ¬) ´) Ö) ã) -* 5* W* d* ®* ¶* Ì* Ô* 9+ A+ W+ _+ Ä+ Ì+ â+ ê+ O, W, m, u, Ú, â, ø, - e- m- ƒ- ‹- ð- ø- . . . •. ®. ¶. ÁßáäIL…N‹N—NÁN3O;OGOlOÓÛÝß²‘¸‘Ä‘î‘ ÆbÆ;ÇTÇ%Æ*Æ2Æ7Æ;ÆXÆ;ÇBÇGÇTÇ””#”S”S””!•+•$—R—¬$ ´$ ·$ º$ Å" ö" ¬# ±# Î" Ó" Ø" ö" Þ™è™ô™š_›i›l›q›מÜžåžòžÃ¥È¥Ñ¥Þ¥L¦Q¦Z¦g¦I§N§W§d§Þ§ã§ì§ù§^¨c¨l¨y¨ó¨ø¨©©ˆ©©–©£©&ª+ª4ªAªĪɪÒªߪN­S­\­i­ð­õ­þ­ ®Ý®â®ë®ø®f¯k¯t¯¯ã¯è¯ñ¯þ¯u°z°ƒ°°± ±±"±™±ž±§±´±.²3²<²I²̲ѲÚ²ç²y³~³‡³”³´´"´/´²´·´À´Í´PµUµ^µkµ¶¶¶¶ž¶£¶¬¶¹¶N·S·\·i·à·å·î·û·u¸z¸ƒ¸¸ ¹¹¹%¹Ÿ¹¤¹­¹º¹=ºBºKºXºÛºàºéºöºm»r»{»ˆ»¼¼¼¼Ѽּ߼ì¼Z½_½h½u½ï½ô½ý½ ¾¾†¾¾œ¾¸¿½¿Æ¿Ó¿PÀUÀ^ÀkÀâÀçÀðÀýÀÊ& Ï& Ø& å& X' ]' f' s' Ô* Ù* â* ï* _+ d+ m+ z+ ê+ ï+ ø+ , u, z, ƒ, , - - - - ‹- - ™- ¦- . . $. 1. Æ. Ë. Ô. á. Ñþ1. 9. ;. =. J R ^ ƒ ç²ï²ñ²ó²†¦ަ’¦¢¦B¢K¢W¢‰¢ˆ»Ÿ»*®2®6®F®‡¬¬œ¬جi­…­ŸLŸ¹¶Á¶öŶŸÊŸkµsµuµwµ^^%^H^Ë_Ó_Õ_×_tS }S …S ´S þS :T ËT ÕT RV qV 1W 4W ±W ´W œ\ g] $o Çp &] 4] µp Çp Fg Úg Ui 0j dl mm †i Õi ëi 0j Úl m (m mm “] °] ž` ¡` °] Å] Ñ] ø] Çp Ñp ]e ce oe e åe ýe ^ -^ q q ïc (d 3d Td Ÿf ´f ·f ãf ùf ,g òh i 4i Ui 0j \j rj Žj Öj õj )k :k ¤Š «Š ­Š ½Š ׊ J‹ Ø‹ ð‹ %Œ æŒ b z  Ž ÈŽ ¡ 7¡ À¡ Ë¡ °¤ ¿¤ ,Œ 3Œ HŒ ÛŒ b  Ž ÈŽ ¡ 7¡ °¤ ¿¤ ð `Ž €Ž  Ž ÈŽ ð `Ž €Ž  Ž þ˜ ™ q¢ ð¢ c£ ž£ q¢ ð¢ c£ ž£ €5’§ P_x4ÈðHø¾è˜O àX Y @_ P_ ”§  § ÐÄ hÇ àì)èì)ðì)øì)Èî)ð)@ó)à+* ñÿ ðì) €4 À4. 5Dà+*Sèì)z P5†àì)¥ñÿ® €5E. Ð5iž @6™ø à6Ea 07i»  7Œà 08h  9pC :Lg `;  p; × €;˜ <“4 <“\ À<`– B­ ðB¬ð  C- ÐC5< P_b°5*‚ DѪ ðD,Õ E‘1@,*ƒ`,*@Ô ÀE¼0 ,*‚À,*@Ó €F‘E-*­ -*@  G¿4  6*J H6*V 86*m 06*„  àJ-  Ñ_pL  MUµ  pMè  Np+  pNpj  àN€  `O¼Å  Ucò  Aa0&  U —  U   U   Ujø  VUw pVUà ÐVˆ qaI5 `WY[ ÀWÕ†  YQÁÀ5*Ú@6*æ [C, ºa e Äbž P^&Ò Úc‘ kd®? €_‹b `)Š @`Ŷà2*ÌP6*Ø b, @cÃ/ dÒX ðem€ `h[¤ Àk<ì84* m # n=J PoïÅÀ2*Þ(0*ö @sÖ% ePL¸4*b ie3§ vLÒ œf•x1*-¨4*B(/*TÀ.*f`.*x/*а.*œP.*®¨0*À˜0*Ò5*îÐ-*.*à-*(˜4*Bð4*X /*l 1yÞ®Ø-*À¸2*Ù04*õø-*€2*1*0 pxôn°4*‚ p€¥ ‚dË 0*ß †ï€/* ðŠ?= 0Ñ#ƒ¸5*¡P5*Áp-*ÖX5*ôh-* `-*`/*N ŒŒ¾à5*@Ï`þ)@äx-*ù`+*h'Aþ)5?þ)C+þ)Q=þ)_%þ)m;þ){þ)‰7þ)—1þ)¥3þ)³/þ)Áþ)Ñþ)áþ)ñ9þ)ÿ5þ) -þ) ›’Ðcx3*{ kš šÂH5*Ö0*î(5* 5*ð3*4È-*H ±¦“.*¤3*µ 5*ËÀ-*ß/*ö3* 82*#(2*:ð-*Kp3*^p2*q0/*‚5*™È.*ªh.*» /*ϸ.*ãX.*÷ð1* þ)@qh3*„0*šˆ5*´.*Èø4*à¸-*ô À@ÕIQ¨5*µ 5* 4*3 (3*J €5*a `0*t 3*Š x/*£ Ø3*´ Ø2*Ç À3*ã ø2*ø ø/*!¸1*%!@0*8!2*R!P1*h!À/*~!`3*!àþ) "°-*"00*+"0*?"ð/*["4*x"¨-*Œ" -* "˜-*´"@/*Ì"H/*à"-*õ"@1*#ø1*!#80*4#ø.*G#˜5*•#X0*«#01*Â#h5*Ù#`5*ð#x5*$p5*$@5*6$è-*G$à4*\$.*o$0.*‚$3*˜$.*­$ 3*Å$ÿ)ˆã$ ,* ö$ *$ %h2* %X3*9%(.*L%è.*b%˜/*u%h0*Š%@2*%02*°%Ð4*Ã%À4*Ö%Ø4*ð%5* &@3*=&8/*n&h/*—&2*Ä&2*õ&à/*&'à1*R'ˆ-*g'Ø1*˜'€-*­'5*Þ'85*(05*B(p.*T(Ð.*f(Ø0*z(à0*Ž(è0*¢(ø0*¶(1*Ê(1*Þ(à3*ð(è3*)X1*)`1*&)83*=)°3*T)¸3*k)X2*‡)H3*Ÿ)P3*·)H2*Ï)P2*ç) 1*ù)ˆ.* *ð.**˜.*/*/*A*¸0*\*È0*o*€.*†*à.** .*¯*/*Á*¨.*Õ*/*é* 2*þ*`2*+p/*'+X/*8+°0*I+°2*Z+h1*k+è2*|+x2*+ .*¥+x.*½+Ø.*Õ+03*ê+p1*,È/*,Ð/*+,Ø/*@,˜3*U, 3*j,ð2*š,P0*¯,2*Ã,P4*×,Ð2*ï,p0*-Ð0*!-€0*3-8.*E-Ð1*b-4*~-2*-ˆ1*¸-x0*Ò-81*î-°/*.è1*.1*(.¨2*A.@4*V.À1*t.È1*‘.H0*°.ˆ2*Î. 4*â.ð0*õ.1*/(4*/ 2*F/0*`/ 4*|/P/*/¨3*¦/€4*»/ˆ4*Ð/4*å/È3*÷/Ð3* 0¨/*#0ø3*50(1*I0p4*_0€3*v0À0*’0È4*«0H4*Ç0ˆ3*ç0È2*ÿ0˜1*1X4*41è/*L1€1*h1`4*|1¸/*ž1H1*½1h4*Õ1ˆ0*ç10*û1 0*2@.*!2H.*52˜2*F24*t2€)*ˆ×2à'*ˆ$3@&*ˆq3,*–3x4*¬3 1*Ó3¨1*ø3è4*43*44°1*^4@+* œ4 +* ì4ˆ/*5 *€5 *x=5 *xZ5Oý)l50û) ‚5`õ)<°5`ó)#à5àø) ú5+ü)6 õ)$<6¶ü)O6Ðø) i6Àø) ƒ6 û) ™6$ü)­6 ù) Å6°ü)Ø6ù) ð6¨ý)7ú) 7¤ý))7ü)=7Jý)O7ªü)b7Eý)t7€ù) Œ7¤ü)Ÿ7žü)²7˜ü)Å7ü)Ù7ü)í7û) 8@ý)8pù) -8;ý)?8°ø) Y8’ü)l8Œü)8 ø) ™86ý)«8ø) Å80ö)ñ8àô)09ø):9€ø) T9 þ)d9†ü)w9þ)‡9þ)—9þ)§9ÿý)·9pø) Ñ9˜û)æ9û)û9ü):€ü)":zü)5:ü)I:p÷)g:ˆû)|:û) ’: ý)£:œý)´:üý)Ä:ú) Û:ðú) ñ:àú) ; ô)"5;€û)J;tü)];xû)r;Ðú) ˆ;úû)œ;óû)°;P÷)Ð;nü)ã;àõ)G<èû) $<˜ý)5<Àú) K<°ú) a<ðù) x<àù) <)þ)<Ðù) ´<°ö)Ü<'þ)ê<1ý)ü<à÷)=Ýû),=#þ):=”ý)K=(ý) ]=hü)p=`ø) Š= ú)  =ú) ¶=ý)Ç=pû)Ü=Œý)í=hû)>bü)>`ô)1C>`ù) [>Pö)…>À÷)¢>ˆý)³> ù) Ì>\ü)ß>pö)? ô)"6?ø)Q?ð÷)l?Ð÷)ˆ?Öû)œ?ö)Ä?÷)ç?ðö) @ù) %@!ý)7@ù) P@Pø) j@Vü)}@`û)’@!þ) @ùý)°@öý)À@Ïû)Ô@°÷)ñ@Àù) A@ø) "AXû)7Aý)IAóý)YA„ý)jA€ý){Aý)Aý)ŸA ý)±A|ý)ÂAý)ÔAý)æAþü)øAxý) Btý)B0ø) 4Bðø) MBïý)]Bûü)oBëý)Bøü)‘Bèý)¡Båý)±BPù) ÉB ÷)æBPü)ùBpý) CÈû)CJü)1C÷)NClý)_Chý)pCÀû)„C€ú) šCóü)¬Cpú) ÂC¸û)ÖC@ù) îCîü)D°û)D ø) .D`ú) DDàó)+rDDü)…D>ü)˜D8ü)«D§û)¿D0÷)ßDâý)ïD0ù) Eéü)Edý)*EPû)?Eàü) QE2ü)dE°ù) {EØü)EÐö)³E õ)%àEþ)îEÓü)FÎü)FPú) (F ó)+VFþ)dFÞý)tFËü)†FÚý)–FÈü)¨F×ý)¸FÔý)ÈF`ý)ÙFÑý)éF û)ýFHû)G@ú) (GÎý)8Gþ)FGÊý)VGÅü)hGÆý)xGÂü)ŠGÃý)šGÀý)ªG\ý)»G½ý)ËG@û)àG0ú) öGºý)Hþ)H¶ý)$H¿ü)6H²ý)FH¼ü)XH¯ý)hH¬ý)xHXý)‰HTý)šH ú) ñÿ°HÐÝ ¾Hðì)ñÿÊH@ó)×Høì)àHÐÄ óHÈ+*ÿHð)I'I8IQI\IwI‰IžI°I¼IËIÙI õIJJJ4J@JRJfJwJ‰J–J­J½JÐJçJôJÈ+*ûJ K$KAKSK^KsK~K ”§ „K›K­K¹KÕK,*LL  Š ò$L2LDL`LpLL’L¤LµLÅLßLóLMM&M7MNM^MlMMM£M°MÄMÓMèMôMNN1NENSN bNnN†NšN¬NÅNÔNâNøN OO0OMO[OoO~OOX6*”O¤O¸OÇOÔOÈ+*àOðOûOPP/P;PFPRP^PoP~P ’P¤P³PÄPÕPêPþPQ#Q1Q@QTQeQrQ~QŽQŸQ­Q ÇQØQéQöQ"R àXR*R@RMR\RjRR“R«RÁRÍRÝRcrtstuff.c__JCR_LIST__deregister_tm_clones__do_global_dtors_auxcompleted.7585__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryctng.cpp_ZL100__pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometryP7_objectPFiS0_PvES1__ZL97__pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometryP7_object_ZL75__pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprP7_object_ZL78__pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprP7_objectPFiS0_PvES1__ZL75__pyx_tp_clear_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprP7_object_ZL16__Pyx_ErrRestoreP7_objectS0_S0__ZL29__Pyx_BufFmt_DescribeTypeCharci_ZL25__pyx_bisect_code_objectsP26__Pyx_CodeObjectCacheEntryii_ZL21__Pyx_Coroutine_clearP7_object_ZL24__Pyx_Coroutine_get_nameP21__pyx_CoroutineObject_ZL28__Pyx_Coroutine_get_qualnameP21__pyx_CoroutineObject_ZL26__Pyx_BufFmt_RaiseExpectedP20__Pyx_BufFmt_Context_ZL30__Pyx_BufFmt_TypeCharToPaddingci_ZL32__Pyx_BufFmt_TypeCharToAlignmentci_ZL29__Pyx_BufFmt_ProcessTypeChunkP20__Pyx_BufFmt_Context_ZL16__Pyx_IterFinishv_ZL20__Pyx__Coroutine_NewP11_typeobjectPFP7_objectS2_S2_ES2_S2_S2__ZL21__Pyx_ListComp_AppendP7_objectS0__ZL19__Pyx_PyList_AppendP7_objectS0__ZL19__Pyx_ReleaseBufferP10bufferinfo_ZL26__pyx_ptype_5numpy_ndarray_ZL19__Pyx_PyObject_CallP7_objectS0_S0__ZL25__Pyx_PyObject_GetAttrStrP7_objectS0__ZL77__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprP7_object_ZL76__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr_ZL75__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr_ZL77__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprP7_object_ZL76__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr_ZL75__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr_ZL99__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometryP7_object_ZL98__pyx_freecount_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry_ZL97__pyx_freelist_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry_ZL18__Pyx_AddTracebackPKciiS0__ZL16__pyx_code_cache_ZL7__pyx_d_ZL17__pyx_empty_tuple_ZL17__pyx_empty_bytes_ZL85__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_5generator1P21__pyx_CoroutineObjectP7_object_ZL61__pyx_f_6neuron_3rxd_10geometry3d_4ctng_seg_line_intersectionddddddddi_ZL78__pyx_tp_traverse_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprP7_objectPFiS0_PvES1__ZL24__Pyx_Coroutine_traverseP7_objectPFiS0_PvES1__ZL28__Pyx_Coroutine_set_qualnameP21__pyx_CoroutineObjectP7_object_ZL24__Pyx_Coroutine_set_nameP21__pyx_CoroutineObjectP7_object_ZL25__Pyx_BufFmt_ExpectNumberPPKc_ZL24__Pyx_BufFmt_CheckStringP20__Pyx_BufFmt_ContextPKc_ZL18__Pyx_PyInt_EqObjCP7_objectS0_li.isra.9_ZL28__Pyx_IternextUnpackEndCheckP7_objectl.part.11_ZL73__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprP11_typeobjectP7_objectS2_.part.14_ZL95__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometryP11_typeobjectP7_objectS2_.part.12_ZL73__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprP11_typeobjectP7_objectS2_.part.13_ZL73__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexprP11_typeobjectP7_objectS2__ZL95__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometryP11_typeobjectP7_objectS2__ZL73__pyx_tp_new_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexprP11_typeobjectP7_objectS2__ZL14__Pyx_TypeTestP7_objectP11_typeobject.isra.18_ZL16__Pyx_ImportFromP7_objectS0__ZL23__Pyx_Coroutine_deallocP7_object_ZL16__Pyx_ImportTypePKcS0_mi.constprop.38_ZL28__Pyx_Coroutine_patch_moduleP7_objectPKc.constprop.39_ZL19__pyx_GeneratorType_ZL7__pyx_b_ZL27__Pyx_ParseOptionalKeywordsP7_objectPPS0_S0_S1_lPKc.constprop.41_ZL24__Pyx_PyInt_SubtractCObjP7_objectS0_li.constprop.42_ZL24__Pyx_PyFloat_DivideObjCP7_objectS0_di.constprop.43_ZL19__Pyx_PyInt_AddObjCP7_objectS0_li.constprop.44_ZL21__Pyx_GetItemInt_FastP7_objectliii.constprop.59_ZL21__Pyx_SetItemInt_FastP7_objectlS0_iii.constprop.47_ZL20__Pyx_GetBuiltinNameP7_object_ZL25__Pyx_GetModuleGlobalNameP7_object_ZL12__Pyx_ImportP7_objectS0_i.constprop.46_ZL16__pyx_n_s_import_ZL7__pyx_m_ZL26__Pyx__PyObject_CallOneArgP7_objectS0__ZL25__Pyx_PyObject_CallOneArgP7_objectS0__ZL19__Pyx_PyInt_As_longP7_object.part.8_ZL18__Pyx_PyInt_As_intP7_object.part.7_ZL21__Pyx_Coroutine_CloseP7_object_ZL25__Pyx_Coroutine_CloseIterP21__pyx_CoroutineObjectP7_object.isra.30_ZL15__pyx_n_s_close_ZL19__Pyx_Coroutine_delP7_object_ZL24__Pyx_PyObject_CallNoArgP7_object_ZL84__pyx_gb_6neuron_3rxd_10geometry3d_4ctng_30constructive_neuronal_geometry_2generatorP21__pyx_CoroutineObjectP7_object_ZL19__pyx_n_s_iscontour_ZL18__pyx_n_s_sections_ZL26__Pyx_PyObject_CallMethod1P7_objectS0_S0__ZL21__Pyx_PyObject_AppendP7_objectS0__ZL16__pyx_n_s_append_ZL48__pyx_f_6neuron_3rxd_10geometry3d_4ctng_registerP7_objectS0_S0__ZL11__Pyx_RaiseP7_objectS0_S0_S0_.isra.17_ZL54__pyx_f_6neuron_3rxd_10geometry3d_4ctng_tangent_sphereP7_objecti_ZL15__pyx_n_s_numpy_ZL15__pyx_n_s_array_ZL12__pyx_n_s_x0_ZL12__pyx_n_s_y0_ZL12__pyx_n_s_z0_ZL12__pyx_n_s_x1_ZL12__pyx_n_s_y1_ZL12__pyx_n_s_z1_ZL12__pyx_n_s_r0_ZL12__pyx_n_s_r1_ZL22__pyx_n_s_RxDException_ZL14__pyx_tuple__2_ZL11__pyx_int_1_ZL15__pyx_int_neg_1_ZL20__pyx_n_s_axislength_ZL16__pyx_n_s_Sphere_ZL14__pyx_n_s_sqrt_ZL51__pyx_f_6neuron_3rxd_10geometry3d_4ctng_extreme_ptsP7_object_ZL12__pyx_tuple__ZL19__pyx_n_s_itertools_ZL22__pyx_n_s_combinations_ZL11__pyx_int_2_ZL16__pyx_n_s_linalg_ZL14__pyx_n_s_norm_ZL32__Pyx_Coroutine_FinishDelegationP21__pyx_CoroutineObject_ZL14__pyx_n_s_args_ZL20__Pyx_Generator_NextP7_object_ZL20__Pyx_Coroutine_SendP7_objectS0__ZL14__pyx_n_s_send_ZL21__Pyx_Coroutine_ThrowP7_objectS0__ZL15__pyx_n_s_throw_ZL19__Pyx_PyInt_As_longP7_object_ZL32__pyx_f_5numpy__util_dtypestringP14_PyArray_DescrPcS1_Pi.isra.33_ZL24__pyx_ptype_5numpy_dtype_ZL26__pyx_builtin_RuntimeError_ZL15__pyx_tuple__14_ZL24__pyx_builtin_ValueError_ZL15__pyx_tuple__15_ZL15__pyx_tuple__16_ZL42__pyx_kp_u_unknown_dtype_code_in_numpy_pxd_ZL26__Pyx_GetBufferAndValidateP10bufferinfoP7_objectP14__Pyx_TypeInfoiiiP22__Pyx_BufFmt_StackElem.constprop.54_ZL11__Pyx_zeros_ZL15__Pyx_minusones_ZL15__pyx_tuple__13_ZL40__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t_ZL9__pyx_k_B_ZL9__pyx_k_H_ZL9__pyx_k_i_ZL9__pyx_k_I_ZL9__pyx_k_l_ZL9__pyx_k_L_ZL9__pyx_k_q_ZL9__pyx_k_Q_ZL9__pyx_k_f_ZL9__pyx_k_d_ZL9__pyx_k_g_ZL10__pyx_k_Zf_ZL10__pyx_k_Zd_ZL10__pyx_k_Zg_ZL9__pyx_k_O_ZL9__pyx_k_b_ZL9__pyx_k_h_ZL53__pyx_f_6neuron_3rxd_10geometry3d_4ctng_count_outsideP7_objectS0_d_ZL18__pyx_n_s_distance_ZL52__pyx_f_6neuron_3rxd_10geometry3d_4ctng_join_outsideddddddddddddd_ZL14__pyx_n_s_Cone_ZL18__pyx_n_s_set_clip_ZL22__pyx_n_s_Intersection_ZL15__pyx_n_s_Plane_ZL15__pyx_n_s_cross_ZL14__pyx_tuple__3_ZL54__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_1soma_objectsP7_objectS0_S0__ZL11__pyx_int_0_ZL11__pyx_n_s_h_ZL16__pyx_n_s_Matrix_ZL14__pyx_tuple__4_ZL17__pyx_n_s_symmeig_ZL16__pyx_n_s_getcol_ZL17__pyx_n_s_max_ind_ZL17__pyx_n_s_min_ind_ZL11__pyx_int_3_ZL13__pyx_n_s_div_ZL13__pyx_n_s_mag_ZL11__pyx_n_s_x_ZL17__pyx_builtin_zip_ZL11__pyx_n_s_y_ZL11__pyx_n_s_z_ZL14__pyx_n_s_x0_2_ZL14__pyx_n_s_y0_2_ZL14__pyx_n_s_z0_2_ZL21__pyx_n_s_n_soma_step_ZZL54__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_1soma_objectsP7_objectS0_S0_E16__pyx_pyargnames_ZL13__pyx_n_s_dot_ZL16__pyx_n_s_setval_ZL20__pyx_builtin_xrange_ZL14__pyx_float_2__ZL18__pyx_n_s_SkewCone_ZL14__pyx_tuple__5_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometryP7_objectS0_S0__ZL94__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry_ZL72__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr_ZL42__pyx_n_s_constructive_neuronal_geometry_l_ZL17__pyx_n_s_genexpr_ZL17__pyx_builtin_sum_ZL13__pyx_n_s_raw_ZL16__pyx_n_s_getrow_ZL19__pyx_n_s_to_python_ZL11__pyx_n_s_d_ZL13__pyx_n_s_inf_ZL22__pyx_n_s_define_shape_ZL15__pyx_n_s_hname_ZL17__pyx_kp_s_soma_0_ZL16__pyx_n_s_neuron_ZL13__pyx_n_s_rxd_ZL20__pyx_n_s_morphology_ZL16__pyx_n_s_parent_ZL16__pyx_n_s_source_ZL12__pyx_n_s_dx_ZZL72__pyx_pw_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometryP7_objectS0_S0_E16__pyx_pyargnames_ZL14__pyx_tuple__6_ZL16__pyx_n_s_sec_db_ZL14__pyx_n_s_soma_ZL22__pyx_n_s_soma_objects_ZL23__pyx_n_s_contourcenter_ZL14__pyx_tuple__7_ZL14__pyx_tuple__8_ZL14__pyx_tuple__9_ZL18__pyx_n_s_warnings_ZL14__pyx_n_s_warn_ZL15__pyx_tuple__10_ZL19__pyx_n_s_parentsec_ZL13__pyx_n_s_n3d_ZL13__pyx_n_s_sec_ZL13__pyx_n_s_x3d_ZL72__pyx_ptype_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr_ZL16__pyx_n_s_remove_ZL17__pyx_n_s_product_ZL17__pyx_builtin_all_ZL17__pyx_builtin_any_ZL17__pyx_builtin_max_ZL17__pyx_builtin_min_ZL18__pyx_n_s_Cylinder_ZL11__pyx_int_4_ZL15__pyx_n_s_Union_ZL13__pyx_n_s_y3d_ZL13__pyx_n_s_z3d_ZL16__pyx_n_s_diam3d_ZL15__pyx_float_0_5_ZL18__pyx_n_s_get_clip_ZL24__pyx_GeneratorType_type_ZL13__pyx_methods_ZL16__pyx_string_tab_ZL14__pyx_n_s_main_ZL19__pyx_n_s_enumerate_ZL13__pyx_n_s_zip_ZL16__pyx_n_s_xrange_ZL13__pyx_n_s_sum_ZL15__pyx_n_s_range_ZL13__pyx_n_s_max_ZL13__pyx_n_s_min_ZL13__pyx_n_s_all_ZL13__pyx_n_s_any_ZL20__pyx_n_s_ValueError_ZL22__pyx_n_s_RuntimeError_ZL43__pyx_kp_s_extreme_points_computation_faile_ZL43__pyx_kp_s_whichend_for_tangent_sphere_must_ZL35__pyx_kp_s_unexpected_corner_counts_ZL39__pyx_kp_s_multiple_most_extreme_points_ZL43__pyx_kp_s_more_than_one_contour_is_not_cur_ZL43__pyx_kp_s_soma_stack_ignored_using_centroi_ZL38__pyx_kp_u_ndarray_is_not_C_contiguous_ZL15__pyx_tuple__11_ZL43__pyx_kp_u_ndarray_is_not_Fortran_contiguou_ZL15__pyx_tuple__12_ZL43__pyx_kp_u_Non_native_byte_order_not_suppor_ZL43__pyx_kp_u_Format_string_allocated_too_shor_ZL45__pyx_kp_u_Format_string_allocated_too_shor_2_ZL12__pyx_n_s_yy_ZL12__pyx_n_s_xx_ZL14__pyx_n_s_pt2z_ZL14__pyx_n_s_pt2y_ZL14__pyx_n_s_pt2x_ZL14__pyx_n_s_pt1z_ZL14__pyx_n_s_pt1y_ZL14__pyx_n_s_pt1x_ZL12__pyx_n_s_cy_ZL12__pyx_n_s_cx_ZL12__pyx_n_s_p2_ZL12__pyx_n_s_p1_ZL17__pyx_n_s_f_diams_ZL17__pyx_n_s_delta_y_ZL17__pyx_n_s_delta_x_ZL22__pyx_n_s_major_length_ZL18__pyx_n_s_extreme2_ZL18__pyx_n_s_extreme1_ZL18__pyx_n_s_major_p2_ZL18__pyx_n_s_major_p1_ZL12__pyx_n_s_pt_ZL12__pyx_n_s_y4_ZL12__pyx_n_s_x4_ZL12__pyx_n_s_y3_ZL12__pyx_n_s_x3_ZL21__pyx_n_s_pts_sources_ZL13__pyx_n_s_pts_ZL17__pyx_n_s_ys_loop_ZL17__pyx_n_s_xs_loop_ZL12__pyx_n_s_y2_ZL12__pyx_n_s_x2_ZL14__pyx_n_s_y1_2_ZL14__pyx_n_s_x1_2_ZL15__pyx_n_s_minor_ZL15__pyx_n_s_major_ZL14__pyx_n_s_tobj_ZL11__pyx_n_s_v_ZL11__pyx_n_s_q_ZL11__pyx_n_s_j_ZL11__pyx_n_s_p_ZL11__pyx_n_s_i_ZL11__pyx_n_s_m_ZL18__pyx_n_s_zshifted_ZL18__pyx_n_s_yshifted_ZL18__pyx_n_s_xshifted_ZL15__pyx_n_s_f_pts_ZL17__pyx_n_s_objects_ZL15__pyx_n_s_somaz_ZL15__pyx_n_s_somay_ZL15__pyx_n_s_somax_ZL15__pyx_n_s_diam2_ZL15__pyx_n_s_diam1_ZL42__pyx_kp_s_home_hines_neuron_nrn_share_lib_ZL15__pyx_n_s_right_ZL14__pyx_n_s_left_ZL14__pyx_n_s_clip_ZL18__pyx_n_s_int_clip_ZL25__pyx_n_s_radial_vec_norm_ZL13__pyx_n_s_pt3_ZL12__pyx_n_s_r3_ZL12__pyx_n_s_z3_ZL23__pyx_n_s_neighbor_copy_ZL22__pyx_n_s_corner_count_ZL25__pyx_n_s_my_corner_count_ZL21__pyx_n_s_nradial_vec_ZL20__pyx_n_s_radial_vec_ZL22__pyx_n_s_plane_normal_ZL12__pyx_n_s_sp_ZL15__pyx_n_s_naxis_ZL13__pyx_n_s_pt0_ZL19__pyx_n_s_join_item_ZL15__pyx_n_s_clips_ZL24__pyx_n_s_neighbor_right_ZL23__pyx_n_s_neighbor_left_ZL25__pyx_n_s_right_neighbors_ZL24__pyx_n_s_left_neighbors_ZL14__pyx_n_s_axis_ZL13__pyx_n_s_pt2_ZL13__pyx_n_s_pt1_ZL14__pyx_n_s_cone_ZL36__pyx_n_s_join_items_needing_clipped_ZL20__pyx_n_s_sharp_turn_ZL22__pyx_n_s_cone_clip_db_ZL14__pyx_n_s_vals_ZL16__pyx_n_s_deltad_ZL15__pyx_n_s_axisz_ZL15__pyx_n_s_axisy_ZL15__pyx_n_s_axisx_ZL12__pyx_n_s_d1_ZL12__pyx_n_s_d0_ZL20__pyx_n_s_sphere_cap_ZL12__pyx_n_s_cp_ZL14__pyx_n_s_psec_ZL16__pyx_n_s_branch_ZL17__pyx_n_s_diam_db_ZL22__pyx_n_s_pts_cones_db_ZL19__pyx_n_s_all_cones_ZL22__pyx_n_s_clip_copying_ZL26__pyx_n_s_diam_corrections_ZL18__pyx_n_s_is_stack_ZL21__pyx_n_s_new_objects_ZL20__pyx_n_s_center_vec_ZL18__pyx_n_s_soma_sec_ZL22__pyx_n_s_num_contours_ZL14__pyx_n_s_cell_ZL28__pyx_n_s_source_is_import3d_ZL25__pyx_n_s_parent_sec_name_ZL18__pyx_n_s_branches_ZL12__pyx_n_s_r2_ZL14__pyx_n_s_r1_2_ZL14__pyx_n_s_r0_2_ZL12__pyx_n_s_z2_ZL14__pyx_n_s_z1_2_ZL11__pyx_n_s_k_ZL40__pyx_n_s_constructive_neuronal_geometry_ZL93__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct__constructive_neuronal_geometry_ZL71__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_1_genexpr_ZL71__pyx_type_6neuron_3rxd_10geometry3d_4ctng___pyx_scope_struct_2_genexpr_ZZL15__Pyx_patch_abcvE11abc_patched_ZL16__pyx_n_s_bisect_ZL33__pyx_n_s_neuron_rxd_rxdException_ZL31__pyx_n_s_neuron_rxd_morphology_ZL20__pyx_n_s_SphereCone_ZL28__pyx_n_s_graphicsPrimitives_ZL36__pyx_n_s_neuron_rxd_geometry3d_ctng_ZL56__pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_1soma_objects_ZL74__pyx_mdef_6neuron_3rxd_10geometry3d_4ctng_3constructive_neuronal_geometry_ZL14__pyx_n_s_test_ZL23__pyx_Generator_methods_ZL26__pyx_Generator_memberlist_ZL23__pyx_Generator_getsets_ZL12__pyx_k_Cone_ZL16__pyx_k_Cylinder_ZL40__pyx_k_Format_string_allocated_too_shor_ZL42__pyx_k_Format_string_allocated_too_shor_2_ZL20__pyx_k_Intersection_ZL14__pyx_k_Matrix_ZL40__pyx_k_Non_native_byte_order_not_suppor_ZL13__pyx_k_Plane_ZL20__pyx_k_RuntimeError_ZL20__pyx_k_RxDException_ZL16__pyx_k_SkewCone_ZL14__pyx_k_Sphere_ZL18__pyx_k_SphereCone_ZL13__pyx_k_Union_ZL18__pyx_k_ValueError_ZL11__pyx_k_all_ZL17__pyx_k_all_cones_ZL11__pyx_k_any_ZL14__pyx_k_append_ZL12__pyx_k_args_ZL13__pyx_k_array_ZL12__pyx_k_axis_ZL18__pyx_k_axislength_ZL13__pyx_k_axisx_ZL13__pyx_k_axisy_ZL13__pyx_k_axisz_ZL14__pyx_k_bisect_ZL14__pyx_k_branch_ZL16__pyx_k_branches_ZL12__pyx_k_cell_ZL18__pyx_k_center_vec_ZL12__pyx_k_clip_ZL20__pyx_k_clip_copying_ZL13__pyx_k_clips_ZL13__pyx_k_close_ZL20__pyx_k_combinations_ZL12__pyx_k_cone_ZL20__pyx_k_cone_clip_db_ZL38__pyx_k_constructive_neuronal_geometry_ZL40__pyx_k_constructive_neuronal_geometry_l_ZL21__pyx_k_contourcenter_ZL20__pyx_k_corner_count_ZL10__pyx_k_cp_ZL13__pyx_k_cross_ZL10__pyx_k_cx_ZL10__pyx_k_cy_ZL10__pyx_k_d0_ZL10__pyx_k_d1_ZL20__pyx_k_define_shape_ZL15__pyx_k_delta_x_ZL15__pyx_k_delta_y_ZL14__pyx_k_deltad_ZL13__pyx_k_diam1_ZL13__pyx_k_diam2_ZL14__pyx_k_diam3d_ZL24__pyx_k_diam_corrections_ZL15__pyx_k_diam_db_ZL16__pyx_k_distance_ZL11__pyx_k_div_ZL11__pyx_k_dot_ZL10__pyx_k_dx_ZL17__pyx_k_enumerate_ZL16__pyx_k_extreme1_ZL16__pyx_k_extreme2_ZL40__pyx_k_extreme_points_computation_faile_ZL15__pyx_k_f_diams_ZL13__pyx_k_f_pts_ZL15__pyx_k_genexpr_ZL16__pyx_k_get_clip_ZL14__pyx_k_getcol_ZL14__pyx_k_getrow_ZL26__pyx_k_graphicsPrimitives_ZL13__pyx_k_hname_ZL39__pyx_k_home_hines_neuron_nrn_share_lib_ZL14__pyx_k_import_ZL11__pyx_k_inf_ZL16__pyx_k_int_clip_ZL16__pyx_k_is_stack_ZL17__pyx_k_iscontour_ZL17__pyx_k_itertools_ZL9__pyx_k_j_ZL17__pyx_k_join_item_ZL34__pyx_k_join_items_needing_clipped_ZL9__pyx_k_k_ZL12__pyx_k_left_ZL22__pyx_k_left_neighbors_ZL14__pyx_k_linalg_ZL9__pyx_k_m_ZL11__pyx_k_mag_ZL12__pyx_k_main_ZL13__pyx_k_major_ZL20__pyx_k_major_length_ZL16__pyx_k_major_p1_ZL16__pyx_k_major_p2_ZL11__pyx_k_max_ZL15__pyx_k_max_ind_ZL11__pyx_k_min_ZL15__pyx_k_min_ind_ZL13__pyx_k_minor_ZL40__pyx_k_more_than_one_contour_is_not_cur_ZL18__pyx_k_morphology_ZL36__pyx_k_multiple_most_extreme_points_ZL23__pyx_k_my_corner_count_ZL11__pyx_k_n3d_ZL19__pyx_k_n_soma_step_ZL13__pyx_k_naxis_ZL35__pyx_k_ndarray_is_not_C_contiguous_ZL40__pyx_k_ndarray_is_not_Fortran_contiguou_ZL21__pyx_k_neighbor_copy_ZL21__pyx_k_neighbor_left_ZL22__pyx_k_neighbor_right_ZL14__pyx_k_neuron_ZL34__pyx_k_neuron_rxd_geometry3d_ctng_ZL29__pyx_k_neuron_rxd_morphology_ZL31__pyx_k_neuron_rxd_rxdException_ZL19__pyx_k_new_objects_ZL12__pyx_k_norm_ZL19__pyx_k_nradial_vec_ZL20__pyx_k_num_contours_ZL13__pyx_k_numpy_ZL15__pyx_k_objects_ZL9__pyx_k_p_ZL10__pyx_k_p1_ZL10__pyx_k_p2_ZL14__pyx_k_parent_ZL23__pyx_k_parent_sec_name_ZL17__pyx_k_parentsec_ZL20__pyx_k_plane_normal_ZL15__pyx_k_product_ZL12__pyx_k_psec_ZL10__pyx_k_pt_ZL11__pyx_k_pt0_ZL11__pyx_k_pt1_ZL12__pyx_k_pt1x_ZL12__pyx_k_pt1y_ZL12__pyx_k_pt1z_ZL11__pyx_k_pt2_ZL12__pyx_k_pt2x_ZL12__pyx_k_pt2y_ZL12__pyx_k_pt2z_ZL11__pyx_k_pt3_ZL11__pyx_k_pts_ZL20__pyx_k_pts_cones_db_ZL19__pyx_k_pts_sources_ZL10__pyx_k_r0_ZL12__pyx_k_r0_2_ZL10__pyx_k_r1_ZL12__pyx_k_r1_2_ZL10__pyx_k_r2_ZL10__pyx_k_r3_ZL18__pyx_k_radial_vec_ZL23__pyx_k_radial_vec_norm_ZL13__pyx_k_range_ZL11__pyx_k_raw_ZL14__pyx_k_remove_ZL13__pyx_k_right_ZL23__pyx_k_right_neighbors_ZL11__pyx_k_rxd_ZL11__pyx_k_sec_ZL14__pyx_k_sec_db_ZL16__pyx_k_sections_ZL12__pyx_k_send_ZL16__pyx_k_set_clip_ZL14__pyx_k_setval_ZL18__pyx_k_sharp_turn_ZL12__pyx_k_soma_ZL14__pyx_k_soma_0_ZL20__pyx_k_soma_objects_ZL16__pyx_k_soma_sec_ZL40__pyx_k_soma_stack_ignored_using_centroi_ZL13__pyx_k_somax_ZL13__pyx_k_somay_ZL13__pyx_k_somaz_ZL14__pyx_k_source_ZL26__pyx_k_source_is_import3d_ZL10__pyx_k_sp_ZL18__pyx_k_sphere_cap_ZL12__pyx_k_sqrt_ZL11__pyx_k_sum_ZL15__pyx_k_symmeig_ZL12__pyx_k_test_ZL13__pyx_k_throw_ZL17__pyx_k_to_python_ZL12__pyx_k_tobj_ZL32__pyx_k_unexpected_corner_counts_ZL39__pyx_k_unknown_dtype_code_in_numpy_pxd_ZL9__pyx_k_v_ZL12__pyx_k_vals_ZL12__pyx_k_warn_ZL16__pyx_k_warnings_ZL40__pyx_k_whichend_for_tangent_sphere_must_ZL9__pyx_k_x_ZL10__pyx_k_x0_ZL12__pyx_k_x0_2_ZL10__pyx_k_x1_ZL12__pyx_k_x1_2_ZL10__pyx_k_x2_ZL10__pyx_k_x3_ZL11__pyx_k_x3d_ZL10__pyx_k_x4_ZL14__pyx_k_xrange_ZL15__pyx_k_xs_loop_ZL16__pyx_k_xshifted_ZL10__pyx_k_xx_ZL9__pyx_k_y_ZL10__pyx_k_y0_ZL12__pyx_k_y0_2_ZL10__pyx_k_y1_ZL12__pyx_k_y1_2_ZL10__pyx_k_y2_ZL10__pyx_k_y3_ZL11__pyx_k_y3d_ZL10__pyx_k_y4_ZL15__pyx_k_ys_loop_ZL16__pyx_k_yshifted_ZL10__pyx_k_yy_ZL9__pyx_k_z_ZL10__pyx_k_z0_ZL12__pyx_k_z0_2_ZL10__pyx_k_z1_ZL12__pyx_k_z1_2_ZL10__pyx_k_z2_ZL10__pyx_k_z3_ZL11__pyx_k_z3d_ZL11__pyx_k_zip_ZL16__pyx_k_zshifted__FRAME_END____JCR_END____dso_handle_DYNAMIC__GNU_EH_FRAME_HDR__TMC_END___GLOBAL_OFFSET_TABLE_PyNumber_NegativePyObject_SetItemPyUnicodeUCS4_DecodeUTF8PyList_NewPyString_FromStringAndSizePyExc_SystemErrorPyDict_SetItemStringfree@@GLIBC_2.2.5PyDict_Size_Py_ZeroStructPyMethod_Type_ITM_deregisterTMCloneTablePyFloat_TypePyTuple_TypePyErr_RestorePyObject_ClearWeakRefsPyFrame_NewPyCFunction_NewExPyNumber_InPlaceAddPyBuffer_ReleasePy_InitModule4_64PyNumber_AddPyObject_GetAttrStringPyDict_ContainsPyImport_AddModulePyObject_SetAttrStringPyErr_WarnEx_edataPyObject_GC_DelPyErr_NormalizeException_PyObject_CallFunction_SizeTPyNumber_MultiplyPyFPE_jbufPyObject_RichComparePyCode_New_finiPyNumber_InPlaceDividePyObject_GC_TrackPyFPE_dummy__stack_chk_fail@@GLIBC_2.4__pyx_module_is_main_neuron__rxd__geometry3d__ctngPyExc_RuntimeErrorinitctngPyNumber_LongPyObject_SelfIterPyErr_GivenExceptionMatchesPyErr_SetString_PyObject_GC_NewPyObject_GetItemPyInt_FromSsize_tPyExc_ValueErrorPyExc_TypeErrorPyString_InternFromStringPySequence_ContainsPyMem_ReallocPyErr_SetNonePyErr_ExceptionMatchesPyTraceBack_Type_PyThreadState_CurrentPyNumber_DividePyOS_snprintfPySequence_GetItemPyTraceBack_HerePyFloat_FromDoublePyType_Readymemcmp@@GLIBC_2.2.5PyDict_GetItem_setjmp@@GLIBC_2.2.5PyErr_ClearPyList_Append_Py_CheckRecursiveCall_Py_CheckRecursionLimitPyString_FromStringPyString_Type__gmon_start__PyTuple_NewPyObject_GenericGetAttrPyExc_OverflowErrorPyArg_UnpackTuplePyExc_FloatingPointErrorPyErr_OccurredPyLong_AsLongPyImport_ImportModulePyString_AsStringPyObject_CallObjectPyRun_StringFlagsPyObject_CallFunctionObjArgsPyObject_Sizemalloc@@GLIBC_2.2.5_Py_NoneStructPyFloat_AsDouble_endPyObject_IsTruePyExc_BaseException_Py_TrueStructPyNumber_Int__bss_startPyLong_AsDoublePyDict_NewPyObject_GetBuffer_PyString_EqPyString_FromFormatPyDict_NextPyInt_TypePyLong_TypePyErr_FetchPyObject_GetIterPyInt_FromLong_Jv_RegisterClassesPyExc_ImportErrorPyDict_SetItemPyObject_HasAttrPySequence_TuplePyExc_AttributeErrorPyExc_StopIterationPySequence_ListPyExc_RuntimeWarningPyObject_CallPyUnicode_TypePyExc_GeneratorExitPyType_IsSubtypePyErr_FormatPySlice_NewPyExc_NameErrorPyModule_GetDictPyFPE_counter_ITM_registerTMCloneTablePyObject_GetAttrPyCFunction_TypePyMem_Malloc__cxa_finalize@@GLIBC_2.2.5_initPyNumber_SubtractPyUnicodeUCS4_ComparePyTuple_PackPyNumber_PowerPy_GetVersionPyUnicodeUCS4_FormatPyObject_GC_UnTrackPyExc_UnboundLocalErrorPyErr_WriteUnraisablePyList_TypePyImport_ImportPyFloat_FromString.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.got.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_rangesÈÈ$.öÿÿoððX8 HH° @øøÅ Hÿÿÿo¾¾$Uþÿÿoèè0d€4nB˜O˜OH xàXàXsYY@~@_@_‡P_P_BH ”§ ”§ “ §  § 0›ÐÄ ÐÄ ”©hÇ hÇ l³àì)àì ¿èì)èì Ëðì)ðì Ðøì)øì ЂÈî)Èî 8Ùð)ð 0â@ó)@ó ˆ8 èà+*È+ x í0È+ 4öü+ @<, 4pC zJ Ùâ+0S-þ{6Q©| AÍÄ@)ÈOîÈL#£ Ø:ðRneuron-7.5/share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.cpp000066400000000000000000040703411323325274500266500ustar00rootroot00000000000000#define _hypot hypot /* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__neuron__rxd__geometry3d__graphicsPrimitives #define __PYX_HAVE_API__neuron__rxd__geometry3d__graphicsPrimitives #include "math.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "neuron/rxd/geometry3d/graphicsPrimitives.pyx", }; /*--- Type declarations ---*/ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":25 * # return a if a < b else b * * cdef class Complement: # <<<<<<<<<<<<<< * def __init__(self, obj): * self.obj = obj */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement { PyObject_HEAD }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":38 * * * cdef class Union: # <<<<<<<<<<<<<< * cdef list objects * def __init__(self, list objects): */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_vtab; PyObject *objects; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":60 * * * cdef class Intersection: # <<<<<<<<<<<<<< * cdef list objects * def __init__(self, list objects): */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_vtab; PyObject *objects; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":83 * * * cdef class Plane: # <<<<<<<<<<<<<< * cdef double d, mul, nx, ny, nz, px, py, pz * def __init__(self, double px, double py, double pz, double nx, double ny, double nz): */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_vtab; double d; double mul; double nx; double ny; double nz; double px; double py; double pz; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":105 * * * cdef class Sphere: # <<<<<<<<<<<<<< * cdef double x, y, z, r, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi * cdef list clips */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_vtab; double x; double y; double z; double r; double _xlo; double _xhi; double _ylo; double _yhi; double _zlo; double _zhi; PyObject *clips; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":157 * * * cdef class Cylinder: # <<<<<<<<<<<<<< * cdef double cx, cy, cz, r, rr, axisx, axisy, axisz, x0, y0, z0, x1, y1, z1, h * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_vtab; double cx; double cy; double cz; double r; double rr; double axisx; double axisy; double axisz; double x0; double y0; double z0; double x1; double y1; double z1; double h; double length; double _xlo; double _xhi; double _ylo; double _yhi; double _zlo; double _zhi; PyObject *neighbors; PyObject *clips; PyObject *neighbor_regions; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":326 * * * cdef class SphereCone: # <<<<<<<<<<<<<< * cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, ha, hb, hra, hrb */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_vtab; double x0; double y0; double z0; double r0; double x1; double y1; double z1; double r1; double rra; double rrb; double axisx; double axisy; double axisz; double conelength; double side1; double side2; double length; double _xlo; double _xhi; double _ylo; double _yhi; double _zlo; double _zhi; double ha; double hb; double hra; double hrb; PyObject *clips; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":431 * * * cdef class Cone: # <<<<<<<<<<<<<< * cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, cx, cy, cz, h */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_vtab; double x0; double y0; double z0; double r0; double x1; double y1; double z1; double r1; double rra; double rrb; double axisx; double axisy; double axisz; double conelength; double side1; double side2; double length; double _xlo; double _xhi; double _ylo; double _yhi; double _zlo; double _zhi; double cx; double cy; double cz; double h; PyObject *neighbors; PyObject *clips; PyObject *neighbor_regions; int reversed; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":656 * * * cdef class SkewCone: # <<<<<<<<<<<<<< * cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, sx, sy, sz, planed */ struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone { PyObject_HEAD struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_vtab; double x0; double y0; double z0; double r0; double x1; double y1; double z1; double r1; double rra; double rrb; double axisx; double axisy; double axisz; double conelength; double side1; double side2; double length; double _xlo; double _xhi; double _ylo; double _yhi; double _zlo; double _zhi; double sx; double sy; double sz; double planed; }; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":38 * * * cdef class Union: # <<<<<<<<<<<<<< * cdef list objects * def __init__(self, list objects): */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union { double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*starting_points)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":60 * * * cdef class Intersection: # <<<<<<<<<<<<<< * cdef list objects * def __init__(self, list objects): */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection { double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*starting_points)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":83 * * * cdef class Plane: # <<<<<<<<<<<<<< * cdef double d, mul, nx, ny, nz, px, py, pz * def __init__(self, double px, double py, double pz, double nx, double ny, double nz): */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane { double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *, double, double, double, int __pyx_skip_dispatch); PyObject *(*starting_points)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":105 * * * cdef class Sphere: # <<<<<<<<<<<<<< * cdef double x, y, z, r, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi * cdef list clips */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere { double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, double, int __pyx_skip_dispatch); int (*overlaps_x)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, int __pyx_skip_dispatch); int (*overlaps_y)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, int __pyx_skip_dispatch); int (*overlaps_z)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":157 * * * cdef class Cylinder: # <<<<<<<<<<<<<< * cdef double cx, cy, cz, r, rr, axisx, axisy, axisz, x0, y0, z0, x1, y1, z1, h * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder { PyObject *(*within_core)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, double, int __pyx_skip_dispatch); double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, double, int __pyx_skip_dispatch); double (*_distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, double, int __pyx_skip_dispatch); int (*overlaps_x)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, int __pyx_skip_dispatch); int (*overlaps_y)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, int __pyx_skip_dispatch); int (*overlaps_z)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":326 * * * cdef class SphereCone: # <<<<<<<<<<<<<< * cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, ha, hb, hra, hrb */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone { double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, double, int __pyx_skip_dispatch); int (*overlaps_x)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, int __pyx_skip_dispatch); int (*overlaps_y)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, int __pyx_skip_dispatch); int (*overlaps_z)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":431 * * * cdef class Cone: # <<<<<<<<<<<<<< * cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, cx, cy, cz, h */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone { PyObject *(*within_core)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, double, int __pyx_skip_dispatch); double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, double, int __pyx_skip_dispatch); double (*_distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, double, int __pyx_skip_dispatch); int (*overlaps_x)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, int __pyx_skip_dispatch); int (*overlaps_y)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, int __pyx_skip_dispatch); int (*overlaps_z)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":656 * * * cdef class SkewCone: # <<<<<<<<<<<<<< * cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, sx, sy, sz, planed */ struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone { double (*distance)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, double, int __pyx_skip_dispatch); int (*overlaps_x)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, int __pyx_skip_dispatch); int (*overlaps_y)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, int __pyx_skip_dispatch); int (*overlaps_z)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); static int __Pyx_SetVtable(PyObject *dict, void *vtable); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch); /* proto*/ /* Module declarations from 'cython' */ /* Module declarations from 'neuron.rxd.geometry3d.graphicsPrimitives' */ static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone = 0; static PyTypeObject *__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone = 0; #define __Pyx_MODULE_NAME "neuron.rxd.geometry3d.graphicsPrimitives" int __pyx_module_is_main_neuron__rxd__geometry3d__graphicsPrimitives = 0; /* Implementation of 'neuron.rxd.geometry3d.graphicsPrimitives' */ static PyObject *__pyx_builtin_sum; static char __pyx_k_r[] = "r"; static char __pyx_k_x[] = "x"; static char __pyx_k_y[] = "y"; static char __pyx_k_z[] = "z"; static char __pyx_k_hi[] = "hi"; static char __pyx_k_lo[] = "lo"; static char __pyx_k_nx[] = "nx"; static char __pyx_k_ny[] = "ny"; static char __pyx_k_nz[] = "nz"; static char __pyx_k_px[] = "px"; static char __pyx_k_py[] = "py"; static char __pyx_k_pz[] = "pz"; static char __pyx_k_r0[] = "r0"; static char __pyx_k_r1[] = "r1"; static char __pyx_k_x0[] = "x0"; static char __pyx_k_x1[] = "x1"; static char __pyx_k_x2[] = "x2"; static char __pyx_k_xs[] = "xs"; static char __pyx_k_y0[] = "y0"; static char __pyx_k_y1[] = "y1"; static char __pyx_k_y2[] = "y2"; static char __pyx_k_ys[] = "ys"; static char __pyx_k_z0[] = "z0"; static char __pyx_k_z1[] = "z1"; static char __pyx_k_z2[] = "z2"; static char __pyx_k_zs[] = "zs"; static char __pyx_k_obj[] = "obj"; static char __pyx_k_sum[] = "sum"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_bisect[] = "bisect"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_Union_r[] = "Union(%r)"; static char __pyx_k_objects[] = "objects"; static char __pyx_k_distance[] = "distance"; static char __pyx_k_neighbors[] = "neighbors"; static char __pyx_k_distance_2[] = "_distance"; static char __pyx_k_overlaps_x[] = "overlaps_x"; static char __pyx_k_overlaps_y[] = "overlaps_y"; static char __pyx_k_overlaps_z[] = "overlaps_z"; static char __pyx_k_primitives[] = "primitives"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static char __pyx_k_bisect_left[] = "bisect_left"; static char __pyx_k_within_core[] = "within_core"; static char __pyx_k_Complement_r[] = "Complement(%r)"; static char __pyx_k_RxDException[] = "RxDException"; static char __pyx_k_Intersection_r[] = "Intersection(%r)"; static char __pyx_k_Sphere_g_g_g_g[] = "Sphere(%g, %g, %g, %g)"; static char __pyx_k_starting_points[] = "starting_points"; static char __pyx_k_neighbor_regions[] = "neighbor_regions"; static char __pyx_k_Plane_g_g_g_g_g_g[] = "Plane(%g, %g, %g, %g, %g, %g)"; static char __pyx_k_Cone_g_g_g_g_g_g_g_g[] = "Cone(%g, %g, %g, %g, %g, %g, %g, %g)"; static char __pyx_k_Cylinder_g_g_g_g_g_g_g[] = "Cylinder(%g, %g, %g, %g, %g, %g, %g)"; static char __pyx_k_Sphere_g_g_g_g_clips_r[] = "Sphere(%g, %g, %g, %g; clips=%r)"; static char __pyx_k_neuron_rxd_rxdException[] = "neuron.rxd.rxdException"; static char __pyx_k_SphereCone_g_g_g_g_g_g_g_g[] = "SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)"; static char __pyx_k_Cone_g_g_g_g_g_g_g_g_clips_r[] = "Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)"; static char __pyx_k_Cylinder_g_g_g_g_g_g_g_clips_r[] = "Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)"; static char __pyx_k_At_least_one_Cone_radius_must_be[] = "At least one Cone radius must be positive"; static PyObject *__pyx_kp_s_At_least_one_Cone_radius_must_be; static PyObject *__pyx_kp_s_Complement_r; static PyObject *__pyx_kp_s_Cone_g_g_g_g_g_g_g_g; static PyObject *__pyx_kp_s_Cone_g_g_g_g_g_g_g_g_clips_r; static PyObject *__pyx_kp_s_Cylinder_g_g_g_g_g_g_g; static PyObject *__pyx_kp_s_Cylinder_g_g_g_g_g_g_g_clips_r; static PyObject *__pyx_kp_s_Intersection_r; static PyObject *__pyx_kp_s_Plane_g_g_g_g_g_g; static PyObject *__pyx_n_s_RxDException; static PyObject *__pyx_kp_s_SphereCone_g_g_g_g_g_g_g_g; static PyObject *__pyx_kp_s_Sphere_g_g_g_g; static PyObject *__pyx_kp_s_Sphere_g_g_g_g_clips_r; static PyObject *__pyx_kp_s_Union_r; static PyObject *__pyx_n_s_bisect; static PyObject *__pyx_n_s_bisect_left; static PyObject *__pyx_n_s_distance; static PyObject *__pyx_n_s_distance_2; static PyObject *__pyx_n_s_hi; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_lo; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_neighbor_regions; static PyObject *__pyx_n_s_neighbors; static PyObject *__pyx_n_s_neuron_rxd_rxdException; static PyObject *__pyx_n_s_nx; static PyObject *__pyx_n_s_ny; static PyObject *__pyx_n_s_nz; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_objects; static PyObject *__pyx_n_s_overlaps_x; static PyObject *__pyx_n_s_overlaps_y; static PyObject *__pyx_n_s_overlaps_z; static PyObject *__pyx_n_s_primitives; static PyObject *__pyx_n_s_px; static PyObject *__pyx_n_s_py; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_pz; static PyObject *__pyx_n_s_r; static PyObject *__pyx_n_s_r0; static PyObject *__pyx_n_s_r1; static PyObject *__pyx_n_s_starting_points; static PyObject *__pyx_n_s_sum; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_within_core; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_x0; static PyObject *__pyx_n_s_x1; static PyObject *__pyx_n_s_x2; static PyObject *__pyx_n_s_xs; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_y0; static PyObject *__pyx_n_s_y1; static PyObject *__pyx_n_s_y2; static PyObject *__pyx_n_s_ys; static PyObject *__pyx_n_s_z; static PyObject *__pyx_n_s_z0; static PyObject *__pyx_n_s_z1; static PyObject *__pyx_n_s_z2; static PyObject *__pyx_n_s_zs; static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_objects); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_objects); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, double __pyx_v_nx, double __pyx_v_ny, double __pyx_v_nz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives___get__(CYTHON_UNUSED struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_r); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_8overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_12overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_14set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, PyObject *__pyx_v_clips); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_16get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder___repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_2__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_4get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_6set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, PyObject *__pyx_v_clips); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_8axis(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10set_neighbors(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, PyObject *__pyx_v_neighbors, PyObject *__pyx_v_neighbor_regions); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_12within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_14starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_16distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_20overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_22overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_24overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone___repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_2set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, PyObject *__pyx_v_clips); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_4get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_6__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_8starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_12overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_14overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_16overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone___repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_2__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_4set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, PyObject *__pyx_v_clips); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_6get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_8within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axis(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_12starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_14distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_18overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_20overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_22overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_get_clip(CYTHON_UNUSED struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self); /* proto */ static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1, double __pyx_v_x2, double __pyx_v_y2, double __pyx_v_z2); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_4starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_6distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_8overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_12overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi); /* proto */ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tuple_; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":26 * * cdef class Complement: * def __init__(self, obj): # <<<<<<<<<<<<<< * self.obj = obj * def __repr__(self): */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_obj = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement___init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *)__pyx_v_self), __pyx_v_obj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self, PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":27 * cdef class Complement: * def __init__(self, obj): * self.obj = obj # <<<<<<<<<<<<<< * def __repr__(self): * return 'Complement(%r)' % self.obj */ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_obj, __pyx_v_obj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":26 * * cdef class Complement: * def __init__(self, obj): # <<<<<<<<<<<<<< * self.obj = obj * def __repr__(self): */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":28 * def __init__(self, obj): * self.obj = obj * def __repr__(self): # <<<<<<<<<<<<<< * return 'Complement(%r)' % self.obj * def distance(self, px, py, pz): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_2__repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":29 * self.obj = obj * def __repr__(self): * return 'Complement(%r)' % self.obj # <<<<<<<<<<<<<< * def distance(self, px, py, pz): * return -self.obj.distance(px, py, pz) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Complement_r, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":28 * def __init__(self, obj): * self.obj = obj * def __repr__(self): # <<<<<<<<<<<<<< * return 'Complement(%r)' % self.obj * def distance(self, px, py, pz): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":30 * def __repr__(self): * return 'Complement(%r)' % self.obj * def distance(self, px, py, pz): # <<<<<<<<<<<<<< * return -self.obj.distance(px, py, pz) * def starting_points(self, xs, ys, zs): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_px = 0; PyObject *__pyx_v_py = 0; PyObject *__pyx_v_pz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = values[0]; __pyx_v_py = values[1]; __pyx_v_pz = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_4distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":31 * return 'Complement(%r)' % self.obj * def distance(self, px, py, pz): * return -self.obj.distance(px, py, pz) # <<<<<<<<<<<<<< * def starting_points(self, xs, ys, zs): * return self.obj.starting_points(xs, ys, zs) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_distance); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_4 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_px); __Pyx_GIVEREF(__pyx_v_px); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_px); __Pyx_INCREF(__pyx_v_py); __Pyx_GIVEREF(__pyx_v_py); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_py); __Pyx_INCREF(__pyx_v_pz); __Pyx_GIVEREF(__pyx_v_pz); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_pz); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":30 * def __repr__(self): * return 'Complement(%r)' % self.obj * def distance(self, px, py, pz): # <<<<<<<<<<<<<< * return -self.obj.distance(px, py, pz) * def starting_points(self, xs, ys, zs): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":32 * def distance(self, px, py, pz): * return -self.obj.distance(px, py, pz) * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return self.obj.starting_points(xs, ys, zs) * property primitives: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_6starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":33 * return -self.obj.distance(px, py, pz) * def starting_points(self, xs, ys, zs): * return self.obj.starting_points(xs, ys, zs) # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return [self.obj] */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_4 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_4 = 1; } } __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_zs); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":32 * def distance(self, px, py, pz): * return -self.obj.distance(px, py, pz) * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return self.obj.starting_points(xs, ys, zs) * property primitives: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":35 * return self.obj.starting_points(xs, ys, zs) * property primitives: * def __get__(self): return [self.obj] # <<<<<<<<<<<<<< * * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Complement.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":40 * cdef class Union: * cdef list objects * def __init__(self, list objects): # <<<<<<<<<<<<<< * self.objects = objects * def __repr__(self): */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_objects = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objects,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_objects = ((PyObject*)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), (&PyList_Type), 1, "objects", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union___init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)__pyx_v_self), __pyx_v_objects); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_objects) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":41 * cdef list objects * def __init__(self, list objects): * self.objects = objects # <<<<<<<<<<<<<< * def __repr__(self): * return 'Union(%r)' % self.objects */ __Pyx_INCREF(__pyx_v_objects); __Pyx_GIVEREF(__pyx_v_objects); __Pyx_GOTREF(__pyx_v_self->objects); __Pyx_DECREF(__pyx_v_self->objects); __pyx_v_self->objects = __pyx_v_objects; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":40 * cdef class Union: * cdef list objects * def __init__(self, list objects): # <<<<<<<<<<<<<< * self.objects = objects * def __repr__(self): */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":42 * def __init__(self, list objects): * self.objects = objects * def __repr__(self): # <<<<<<<<<<<<<< * return 'Union(%r)' % self.objects * @cython.boundscheck(False) */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_2__repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":43 * self.objects = objects * def __repr__(self): * return 'Union(%r)' % self.objects # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Union_r, __pyx_v_self->objects); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":42 * def __init__(self, list objects): * self.objects = objects * def __repr__(self): # <<<<<<<<<<<<<< * return 'Union(%r)' % self.objects * @cython.boundscheck(False) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":46 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double distance(self, px, py, pz): # <<<<<<<<<<<<<< * # CTNG:uniondist * dists = [obj.distance(px, py, pz) for obj in self.objects] */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz, int __pyx_skip_dispatch) { PyObject *__pyx_v_dists = NULL; double __pyx_v_d; double __pyx_v_d2; PyObject *__pyx_v_obj = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; double __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distance)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_px); __Pyx_GIVEREF(__pyx_v_px); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_px); __Pyx_INCREF(__pyx_v_py); __Pyx_GIVEREF(__pyx_v_py); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_py); __Pyx_INCREF(__pyx_v_pz); __Pyx_GIVEREF(__pyx_v_pz); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_pz); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_7; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":48 * cpdef double distance(self, px, py, pz): * # CTNG:uniondist * dists = [obj.distance(px, py, pz) for obj in self.objects] # <<<<<<<<<<<<<< * cdef double d, d2 * d = dists[0] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->objects; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_px); __Pyx_GIVEREF(__pyx_v_px); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_px); __Pyx_INCREF(__pyx_v_py); __Pyx_GIVEREF(__pyx_v_py); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_py); __Pyx_INCREF(__pyx_v_pz); __Pyx_GIVEREF(__pyx_v_pz); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_v_pz); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dists = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":50 * dists = [obj.distance(px, py, pz) for obj in self.objects] * cdef double d, d2 * d = dists[0] # <<<<<<<<<<<<<< * for d2 in dists: * if d2 < d: d = d2 */ __pyx_t_7 = __pyx_PyFloat_AsDouble(PyList_GET_ITEM(__pyx_v_dists, 0)); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_d = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":51 * cdef double d, d2 * d = dists[0] * for d2 in dists: # <<<<<<<<<<<<<< * if d2 < d: d = d2 * return d */ __pyx_t_1 = __pyx_v_dists; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d2 = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":52 * d = dists[0] * for d2 in dists: * if d2 < d: d = d2 # <<<<<<<<<<<<<< * return d * cpdef list starting_points(self, xs, ys, zs): */ __pyx_t_10 = ((__pyx_v_d2 < __pyx_v_d) != 0); if (__pyx_t_10) { __pyx_v_d = __pyx_v_d2; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":51 * cdef double d, d2 * d = dists[0] * for d2 in dists: # <<<<<<<<<<<<<< * if d2 < d: d = d2 * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":53 * for d2 in dists: * if d2 < d: d = d2 * return d # <<<<<<<<<<<<<< * cpdef list starting_points(self, xs, ys, zs): * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":46 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double distance(self, px, py, pz): # <<<<<<<<<<<<<< * # CTNG:uniondist * dists = [obj.distance(px, py, pz) for obj in self.objects] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Union.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dists); __Pyx_XDECREF(__pyx_v_obj); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_px = 0; PyObject *__pyx_v_py = 0; PyObject *__pyx_v_pz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = values[0]; __pyx_v_py = values[1]; __pyx_v_pz = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_4distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":54 * if d2 < d: d = d2 * return d * cpdef list starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) * property primitives: */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_skip_dispatch) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_starting_points); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_points)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_zs); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":55 * return d * cpdef list starting_points(self, xs, ys, zs): * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return sum([obj.primitives for obj in self.objects], []) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->objects; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_zs); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":54 * if d2 < d: d = d2 * return d * cpdef list starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) * property primitives: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_6starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_starting_points(__pyx_v_self, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":57 * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) * property primitives: * def __get__(self): return sum([obj.primitives for obj in self.objects], []) # <<<<<<<<<<<<<< * * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *__pyx_v_self) { PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->objects; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_primitives); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Union.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":62 * cdef class Intersection: * cdef list objects * def __init__(self, list objects): # <<<<<<<<<<<<<< * self.objects = objects * def __repr__(self): */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_objects = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objects,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_objects = ((PyObject*)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), (&PyList_Type), 1, "objects", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection___init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)__pyx_v_self), __pyx_v_objects); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_objects) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":63 * cdef list objects * def __init__(self, list objects): * self.objects = objects # <<<<<<<<<<<<<< * def __repr__(self): * return 'Intersection(%r)' % self.objects */ __Pyx_INCREF(__pyx_v_objects); __Pyx_GIVEREF(__pyx_v_objects); __Pyx_GOTREF(__pyx_v_self->objects); __Pyx_DECREF(__pyx_v_self->objects); __pyx_v_self->objects = __pyx_v_objects; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":62 * cdef class Intersection: * cdef list objects * def __init__(self, list objects): # <<<<<<<<<<<<<< * self.objects = objects * def __repr__(self): */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":64 * def __init__(self, list objects): * self.objects = objects * def __repr__(self): # <<<<<<<<<<<<<< * return 'Intersection(%r)' % self.objects * @cython.boundscheck(False) */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_2__repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":65 * self.objects = objects * def __repr__(self): * return 'Intersection(%r)' % self.objects # <<<<<<<<<<<<<< * @cython.boundscheck(False) * @cython.wraparound(False) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Intersection_r, __pyx_v_self->objects); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":64 * def __init__(self, list objects): * self.objects = objects * def __repr__(self): # <<<<<<<<<<<<<< * return 'Intersection(%r)' % self.objects * @cython.boundscheck(False) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":68 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double distance(self, px, py, pz): # <<<<<<<<<<<<<< * # CTNG: intdist * dists = [obj.distance(px, py, pz) for obj in self.objects] */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz, int __pyx_skip_dispatch) { PyObject *__pyx_v_dists = NULL; double __pyx_v_d; double __pyx_v_d2; PyObject *__pyx_v_obj = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; double __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distance)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_px); __Pyx_GIVEREF(__pyx_v_px); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_px); __Pyx_INCREF(__pyx_v_py); __Pyx_GIVEREF(__pyx_v_py); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_py); __Pyx_INCREF(__pyx_v_pz); __Pyx_GIVEREF(__pyx_v_pz); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_pz); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_7; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":70 * cpdef double distance(self, px, py, pz): * # CTNG: intdist * dists = [obj.distance(px, py, pz) for obj in self.objects] # <<<<<<<<<<<<<< * cdef double d, d2 * d = dists[0] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->objects; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_px); __Pyx_GIVEREF(__pyx_v_px); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_px); __Pyx_INCREF(__pyx_v_py); __Pyx_GIVEREF(__pyx_v_py); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_py); __Pyx_INCREF(__pyx_v_pz); __Pyx_GIVEREF(__pyx_v_pz); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_v_pz); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dists = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":72 * dists = [obj.distance(px, py, pz) for obj in self.objects] * cdef double d, d2 * d = dists[0] # <<<<<<<<<<<<<< * for d2 in dists: * if d2 > d: d = d2 */ __pyx_t_7 = __pyx_PyFloat_AsDouble(PyList_GET_ITEM(__pyx_v_dists, 0)); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_d = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":73 * cdef double d, d2 * d = dists[0] * for d2 in dists: # <<<<<<<<<<<<<< * if d2 > d: d = d2 * return d */ __pyx_t_1 = __pyx_v_dists; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d2 = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":74 * d = dists[0] * for d2 in dists: * if d2 > d: d = d2 # <<<<<<<<<<<<<< * return d * cpdef list starting_points(self, xs, ys, zs): */ __pyx_t_10 = ((__pyx_v_d2 > __pyx_v_d) != 0); if (__pyx_t_10) { __pyx_v_d = __pyx_v_d2; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":73 * cdef double d, d2 * d = dists[0] * for d2 in dists: # <<<<<<<<<<<<<< * if d2 > d: d = d2 * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":75 * for d2 in dists: * if d2 > d: d = d2 * return d # <<<<<<<<<<<<<< * cpdef list starting_points(self, xs, ys, zs): * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":68 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double distance(self, px, py, pz): # <<<<<<<<<<<<<< * # CTNG: intdist * dists = [obj.distance(px, py, pz) for obj in self.objects] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dists); __Pyx_XDECREF(__pyx_v_obj); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_px = 0; PyObject *__pyx_v_py = 0; PyObject *__pyx_v_pz = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = values[0]; __pyx_v_py = values[1]; __pyx_v_pz = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_4distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_px, PyObject *__pyx_v_py, PyObject *__pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":76 * if d2 > d: d = d2 * return d * cpdef list starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) * property primitives: */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_skip_dispatch) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_starting_points); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_points)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_zs); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":77 * return d * cpdef list starting_points(self, xs, ys, zs): * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return sum([obj.primitives for obj in self.objects], []) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->objects; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_zs); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":76 * if d2 > d: d = d2 * return d * cpdef list starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) * property primitives: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_6starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_starting_points(__pyx_v_self, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":79 * return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) * property primitives: * def __get__(self): return sum([obj.primitives for obj in self.objects], []) # <<<<<<<<<<<<<< * * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *__pyx_v_self) { PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->objects; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_primitives); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Intersection.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":85 * cdef class Plane: * cdef double d, mul, nx, ny, nz, px, py, pz * def __init__(self, double px, double py, double pz, double nx, double ny, double nz): # <<<<<<<<<<<<<< * """(px, py, pz) -- a point; (nx, ny, nz) -- the normal vector""" * self.d = - (nx * px + ny * py + nz * pz) */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__[] = "(px, py, pz) -- a point; (nx, ny, nz) -- the normal vector"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__; #endif static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nx = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_nx == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_ny = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_ny == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nz = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_nz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, double __pyx_v_nx, double __pyx_v_ny, double __pyx_v_nz) { int __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":87 * def __init__(self, double px, double py, double pz, double nx, double ny, double nz): * """(px, py, pz) -- a point; (nx, ny, nz) -- the normal vector""" * self.d = - (nx * px + ny * py + nz * pz) # <<<<<<<<<<<<<< * self.mul = 1. / sqrt(nx ** 2 + ny ** 2 + nz ** 2) * self.nx = nx */ __pyx_v_self->d = (-(((__pyx_v_nx * __pyx_v_px) + (__pyx_v_ny * __pyx_v_py)) + (__pyx_v_nz * __pyx_v_pz))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":88 * """(px, py, pz) -- a point; (nx, ny, nz) -- the normal vector""" * self.d = - (nx * px + ny * py + nz * pz) * self.mul = 1. / sqrt(nx ** 2 + ny ** 2 + nz ** 2) # <<<<<<<<<<<<<< * self.nx = nx * self.ny = ny */ __pyx_t_1 = sqrt(((pow(__pyx_v_nx, 2.0) + pow(__pyx_v_ny, 2.0)) + pow(__pyx_v_nz, 2.0))); if (unlikely(__pyx_t_1 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->mul = (1. / __pyx_t_1); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":89 * self.d = - (nx * px + ny * py + nz * pz) * self.mul = 1. / sqrt(nx ** 2 + ny ** 2 + nz ** 2) * self.nx = nx # <<<<<<<<<<<<<< * self.ny = ny * self.nz = nz */ __pyx_v_self->nx = __pyx_v_nx; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":90 * self.mul = 1. / sqrt(nx ** 2 + ny ** 2 + nz ** 2) * self.nx = nx * self.ny = ny # <<<<<<<<<<<<<< * self.nz = nz * self.px = px */ __pyx_v_self->ny = __pyx_v_ny; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":91 * self.nx = nx * self.ny = ny * self.nz = nz # <<<<<<<<<<<<<< * self.px = px * self.py = py */ __pyx_v_self->nz = __pyx_v_nz; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":92 * self.ny = ny * self.nz = nz * self.px = px # <<<<<<<<<<<<<< * self.py = py * self.pz = pz */ __pyx_v_self->px = __pyx_v_px; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":93 * self.nz = nz * self.px = px * self.py = py # <<<<<<<<<<<<<< * self.pz = pz * property primitives: */ __pyx_v_self->py = __pyx_v_py; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":94 * self.px = px * self.py = py * self.pz = pz # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return [] */ __pyx_v_self->pz = __pyx_v_pz; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":85 * cdef class Plane: * cdef double d, mul, nx, ny, nz, px, py, pz * def __init__(self, double px, double py, double pz, double nx, double ny, double nz): # <<<<<<<<<<<<<< * """(px, py, pz) -- a point; (nx, ny, nz) -- the normal vector""" * self.d = - (nx * px + ny * py + nz * pz) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":96 * self.pz = pz * property primitives: * def __get__(self): return [] # <<<<<<<<<<<<<< * def __repr__(self): * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives___get__(CYTHON_UNUSED struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":97 * property primitives: * def __get__(self): return [] * def __repr__(self): # <<<<<<<<<<<<<< * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) * cpdef double distance(self, double x, double y, double z): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_2__repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":98 * def __get__(self): return [] * def __repr__(self): * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) # <<<<<<<<<<<<<< * cpdef double distance(self, double x, double y, double z): * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->px); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->py); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->pz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->nx); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->ny); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->nz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Plane_g_g_g_g_g_g, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":97 * property primitives: * def __get__(self): return [] * def __repr__(self): # <<<<<<<<<<<<<< * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) * cpdef double distance(self, double x, double y, double z): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":99 * def __repr__(self): * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) * cpdef double distance(self, double x, double y, double z): # <<<<<<<<<<<<<< * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul * cpdef list starting_points(self, xs, ys, zs): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, int __pyx_skip_dispatch) { double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":100 * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) * cpdef double distance(self, double x, double y, double z): * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul # <<<<<<<<<<<<<< * cpdef list starting_points(self, xs, ys, zs): * return [(bisect.bisect_left(xs, self.px), bisect.bisect_left(ys, self.py), bisect.bisect_left(zs, self.pz))] */ __pyx_r = (((((__pyx_v_self->nx * __pyx_v_x) + (__pyx_v_self->ny * __pyx_v_y)) + (__pyx_v_self->nz * __pyx_v_z)) + __pyx_v_self->d) * __pyx_v_self->mul); goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":99 * def __repr__(self): * return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) * cpdef double distance(self, double x, double y, double z): # <<<<<<<<<<<<<< * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul * cpdef list starting_points(self, xs, ys, zs): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Plane.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x; double __pyx_v_y; double __pyx_v_z; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_4distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_distance(__pyx_v_self, __pyx_v_x, __pyx_v_y, __pyx_v_z, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":101 * cpdef double distance(self, double x, double y, double z): * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul * cpdef list starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return [(bisect.bisect_left(xs, self.px), bisect.bisect_left(ys, self.py), bisect.bisect_left(zs, self.pz))] * */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_starting_points); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_points)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_zs); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":102 * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul * cpdef list starting_points(self, xs, ys, zs): * return [(bisect.bisect_left(xs, self.px), bisect.bisect_left(ys, self.py), bisect.bisect_left(zs, self.pz))] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->px); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->pz); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_5 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":101 * cpdef double distance(self, double x, double y, double z): * return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul * cpdef list starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * return [(bisect.bisect_left(xs, self.px), bisect.bisect_left(ys, self.py), bisect.bisect_left(zs, self.pz))] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_6starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_starting_points(__pyx_v_self, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Plane.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":109 * cdef list clips * property primitives: * def __get__(self): return [self] # <<<<<<<<<<<<<< * * def __init__(self, double x, double y, double z, double r): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":111 * def __get__(self): return [self] * * def __init__(self, double x, double y, double z, double r): # <<<<<<<<<<<<<< * self.x, self.y, self.z, self.r = x, y, z, r * self._xlo, self._xhi = x - r, x + r */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x; double __pyx_v_y; double __pyx_v_z; double __pyx_v_r; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_r,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere___init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_r); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere___init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_r) { int __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; double __pyx_t_2; double __pyx_t_3; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":112 * * def __init__(self, double x, double y, double z, double r): * self.x, self.y, self.z, self.r = x, y, z, r # <<<<<<<<<<<<<< * self._xlo, self._xhi = x - r, x + r * self._ylo, self._yhi = y - r, y + r */ __pyx_t_1 = __pyx_v_x; __pyx_t_2 = __pyx_v_y; __pyx_t_3 = __pyx_v_z; __pyx_t_4 = __pyx_v_r; __pyx_v_self->x = __pyx_t_1; __pyx_v_self->y = __pyx_t_2; __pyx_v_self->z = __pyx_t_3; __pyx_v_self->r = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":113 * def __init__(self, double x, double y, double z, double r): * self.x, self.y, self.z, self.r = x, y, z, r * self._xlo, self._xhi = x - r, x + r # <<<<<<<<<<<<<< * self._ylo, self._yhi = y - r, y + r * self._zlo, self._zhi = z - r, z + r */ __pyx_t_4 = (__pyx_v_x - __pyx_v_r); __pyx_t_3 = (__pyx_v_x + __pyx_v_r); __pyx_v_self->_xlo = __pyx_t_4; __pyx_v_self->_xhi = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":114 * self.x, self.y, self.z, self.r = x, y, z, r * self._xlo, self._xhi = x - r, x + r * self._ylo, self._yhi = y - r, y + r # <<<<<<<<<<<<<< * self._zlo, self._zhi = z - r, z + r * self.clips = [] */ __pyx_t_3 = (__pyx_v_y - __pyx_v_r); __pyx_t_4 = (__pyx_v_y + __pyx_v_r); __pyx_v_self->_ylo = __pyx_t_3; __pyx_v_self->_yhi = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":115 * self._xlo, self._xhi = x - r, x + r * self._ylo, self._yhi = y - r, y + r * self._zlo, self._zhi = z - r, z + r # <<<<<<<<<<<<<< * self.clips = [] * def __repr__(self): */ __pyx_t_4 = (__pyx_v_z - __pyx_v_r); __pyx_t_3 = (__pyx_v_z + __pyx_v_r); __pyx_v_self->_zlo = __pyx_t_4; __pyx_v_self->_zhi = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":116 * self._ylo, self._yhi = y - r, y + r * self._zlo, self._zhi = z - r, z + r * self.clips = [] # <<<<<<<<<<<<<< * def __repr__(self): * if self.clips: */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":111 * def __get__(self): return [self] * * def __init__(self, double x, double y, double z, double r): # <<<<<<<<<<<<<< * self.x, self.y, self.z, self.r = x, y, z, r * self._xlo, self._xhi = x - r, x + r */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":117 * self._zlo, self._zhi = z - r, z + r * self.clips = [] * def __repr__(self): # <<<<<<<<<<<<<< * if self.clips: * return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_2__repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_2__repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":118 * self.clips = [] * def __repr__(self): * if self.clips: # <<<<<<<<<<<<<< * return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) * else: */ __pyx_t_1 = (__pyx_v_self->clips != Py_None) && (PyList_GET_SIZE(__pyx_v_self->clips) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":119 * def __repr__(self): * if self.clips: * return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) # <<<<<<<<<<<<<< * else: * return 'Sphere(%g, %g, %g, %g)' % (self.x, self.y, self.z, self.r) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->z); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->r); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); __Pyx_INCREF(__pyx_v_self->clips); __Pyx_GIVEREF(__pyx_v_self->clips); PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_self->clips); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Sphere_g_g_g_g_clips_r, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":118 * self.clips = [] * def __repr__(self): * if self.clips: # <<<<<<<<<<<<<< * return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":121 * return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) * else: * return 'Sphere(%g, %g, %g, %g)' % (self.x, self.y, self.z, self.r) # <<<<<<<<<<<<<< * property xlo: * def __get__(self): return self._xlo */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->x); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->z); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Sphere_g_g_g_g, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":117 * self._zlo, self._zhi = z - r, z + r * self.clips = [] * def __repr__(self): # <<<<<<<<<<<<<< * if self.clips: * return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":123 * return 'Sphere(%g, %g, %g, %g)' % (self.x, self.y, self.z, self.r) * property xlo: * def __get__(self): return self._xlo # <<<<<<<<<<<<<< * property xhi: * def __get__(self): return self._xhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.xlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":125 * def __get__(self): return self._xlo * property xhi: * def __get__(self): return self._xhi # <<<<<<<<<<<<<< * property ylo: * def __get__(self): return self._ylo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.xhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":127 * def __get__(self): return self._xhi * property ylo: * def __get__(self): return self._ylo # <<<<<<<<<<<<<< * property yhi: * def __get__(self): return self._yhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ylo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.ylo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":129 * def __get__(self): return self._ylo * property yhi: * def __get__(self): return self._yhi # <<<<<<<<<<<<<< * property zlo: * def __get__(self): return self._zlo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_yhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.yhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":131 * def __get__(self): return self._yhi * property zlo: * def __get__(self): return self._zlo # <<<<<<<<<<<<<< * property zhi: * def __get__(self): return self._zhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.zlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":133 * def __get__(self): return self._zlo * property zhi: * def __get__(self): return self._zhi # <<<<<<<<<<<<<< * cpdef double distance(self, double x, double y, double z): * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.zhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":134 * property zhi: * def __get__(self): return self._zhi * cpdef double distance(self, double x, double y, double z): # <<<<<<<<<<<<<< * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r * old_d = d */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, int __pyx_skip_dispatch) { PyObject *__pyx_v_d = NULL; CYTHON_UNUSED double __pyx_v_old_d; PyObject *__pyx_v_clip = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":135 * def __get__(self): return self._zhi * cpdef double distance(self, double x, double y, double z): * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r # <<<<<<<<<<<<<< * old_d = d * for clip in self.clips: */ __pyx_t_1 = PyFloat_FromDouble((sqrt(((pow((__pyx_v_x - __pyx_v_self->x), 2.0) + pow((__pyx_v_y - __pyx_v_self->y), 2.0)) + pow((__pyx_v_z - __pyx_v_self->z), 2.0))) - __pyx_v_self->r)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_d = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":136 * cpdef double distance(self, double x, double y, double z): * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r * old_d = d # <<<<<<<<<<<<<< * for clip in self.clips: * d = max(d, clip.distance(x, y, z)) */ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_d); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_old_d = __pyx_t_10; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":137 * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r * old_d = d * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(x, y, z)) * return d */ if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":138 * old_d = d * for clip in self.clips: * d = max(d, clip.distance(x, y, z)) # <<<<<<<<<<<<<< * return d * def starting_points(self, xs, ys, zs): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clip, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_11 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_11 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_11, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_v_d); __pyx_t_6 = __pyx_v_d; __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = __pyx_t_2; } else { __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_d, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":137 * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r * old_d = d * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(x, y, z)) * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":139 * for clip in self.clips: * d = max(d, clip.distance(x, y, z)) * return d # <<<<<<<<<<<<<< * def starting_points(self, xs, ys, zs): * #for theta in numpy.arange(0, 2 * numpy.pi, 10): */ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_d); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_10; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":134 * property zhi: * def __get__(self): return self._zhi * cpdef double distance(self, double x, double y, double z): # <<<<<<<<<<<<<< * d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r * old_d = d */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_clip); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x; double __pyx_v_y; double __pyx_v_z; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_4distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_4distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_distance(__pyx_v_self, __pyx_v_x, __pyx_v_y, __pyx_v_z, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":140 * d = max(d, clip.distance(x, y, z)) * return d * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * #for theta in numpy.arange(0, 2 * numpy.pi, 10): * # TODO: this only works right if the entire object is inside the domain */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_7starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_6starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_6starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":143 * #for theta in numpy.arange(0, 2 * numpy.pi, 10): * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x - self.r), bisect.bisect_left(ys, self.y), bisect.bisect_left(zs, self.z))]) # <<<<<<<<<<<<<< * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_zs); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->x - __pyx_v_self->r)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_3, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_3, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_3 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->z); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_3 = 1; } } __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":140 * d = max(d, clip.distance(x, y, z)) * return d * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * #for theta in numpy.arange(0, 2 * numpy.pi, 10): * # TODO: this only works right if the entire object is inside the domain */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":144 * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x - self.r), bisect.bisect_left(ys, self.y), bisect.bisect_left(zs, self.z))]) * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_x)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":145 * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x - self.r), bisect.bisect_left(ys, self.y), bisect.bisect_left(zs, self.z))]) * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo # <<<<<<<<<<<<<< * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_xhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_xlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":144 * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x - self.r), bisect.bisect_left(ys, self.y), bisect.bisect_left(zs, self.z))]) * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_x (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_x") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_8overlaps_x(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_8overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_x(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":146 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_y)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":147 * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo # <<<<<<<<<<<<<< * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_yhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_ylo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":146 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_y (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_y") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10overlaps_y(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_y(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":148 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * def set_clip(self, clips): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_z); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_z)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":149 * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo # <<<<<<<<<<<<<< * def set_clip(self, clips): * self.clips = clips */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_zhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_zlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":148 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * def set_clip(self, clips): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_z (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_z") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_12overlaps_z(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_12overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_z(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":150 * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * def get_clip(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_15set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_15set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_14set_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self), ((PyObject *)__pyx_v_clips)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_14set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":151 * return lo <= self._zhi and hi >= self._zlo * def set_clip(self, clips): * self.clips = clips # <<<<<<<<<<<<<< * def get_clip(self): * return self.clips */ if (!(likely(PyList_CheckExact(__pyx_v_clips))||((__pyx_v_clips) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_clips)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_clips; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":150 * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * def get_clip(self): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Sphere.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":152 * def set_clip(self, clips): * self.clips = clips * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_17get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_17get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_16get_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_16get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":153 * self.clips = clips * def get_clip(self): * return self.clips # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->clips); __pyx_r = __pyx_v_self->clips; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":152 * def set_clip(self, clips): * self.clips = clips * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":161 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi * cdef list neighbors, clips, neighbor_regions * def __repr__(self): # <<<<<<<<<<<<<< * if self.clips: * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_1__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_1__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder___repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder___repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":162 * cdef list neighbors, clips, neighbor_regions * def __repr__(self): * if self.clips: # <<<<<<<<<<<<<< * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) * else: */ __pyx_t_1 = (__pyx_v_self->clips != Py_None) && (PyList_GET_SIZE(__pyx_v_self->clips) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":163 * def __repr__(self): * if self.clips: * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) # <<<<<<<<<<<<<< * else: * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->r); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8); __Pyx_INCREF(__pyx_v_self->clips); __Pyx_GIVEREF(__pyx_v_self->clips); PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_self->clips); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Cylinder_g_g_g_g_g_g_g_clips_r, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":162 * cdef list neighbors, clips, neighbor_regions * def __repr__(self): * if self.clips: # <<<<<<<<<<<<<< * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":165 * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) * else: * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r) # <<<<<<<<<<<<<< * property xlo: * def __get__(self): return self._xlo */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Cylinder_g_g_g_g_g_g_g, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":161 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi * cdef list neighbors, clips, neighbor_regions * def __repr__(self): # <<<<<<<<<<<<<< * if self.clips: * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":167 * return 'Cylinder(%g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r) * property xlo: * def __get__(self): return self._xlo # <<<<<<<<<<<<<< * property xhi: * def __get__(self): return self._xhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.xlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":169 * def __get__(self): return self._xlo * property xhi: * def __get__(self): return self._xhi # <<<<<<<<<<<<<< * property ylo: * def __get__(self): return self._ylo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.xhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":171 * def __get__(self): return self._xhi * property ylo: * def __get__(self): return self._ylo # <<<<<<<<<<<<<< * property yhi: * def __get__(self): return self._yhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ylo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.ylo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":173 * def __get__(self): return self._ylo * property yhi: * def __get__(self): return self._yhi # <<<<<<<<<<<<<< * property zlo: * def __get__(self): return self._zlo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_yhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.yhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":175 * def __get__(self): return self._yhi * property zlo: * def __get__(self): return self._zlo # <<<<<<<<<<<<<< * property zhi: * def __get__(self): return self._zhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.zlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":177 * def __get__(self): return self._zlo * property zhi: * def __get__(self): return self._zhi # <<<<<<<<<<<<<< * * def __init__(self, double x0, double y0, double z0, double x1, double y1, double z1, double r): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.zhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":179 * def __get__(self): return self._zhi * * def __init__(self, double x0, double y0, double z0, double x1, double y1, double z1, double r): # <<<<<<<<<<<<<< * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; double __pyx_v_r; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x0,&__pyx_n_s_y0,&__pyx_n_s_z0,&__pyx_n_s_x1,&__pyx_n_s_y1,&__pyx_n_s_z1,&__pyx_n_s_r,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x0)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 7) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); } __pyx_v_x0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y0 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z0 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_x1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_x1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y1 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_y1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z1 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_z1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_2__init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_2__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r) { int __pyx_r; __Pyx_RefNannyDeclarations double __pyx_t_1; double __pyx_t_2; double __pyx_t_3; double __pyx_t_4; double __pyx_t_5; double __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":180 * * def __init__(self, double x0, double y0, double z0, double x1, double y1, double z1, double r): * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 # <<<<<<<<<<<<<< * self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 * self.rr = r * r */ __pyx_t_1 = ((__pyx_v_x0 + __pyx_v_x1) * 0.5); __pyx_t_2 = ((__pyx_v_y0 + __pyx_v_y1) * 0.5); __pyx_t_3 = ((__pyx_v_z0 + __pyx_v_z1) * 0.5); __pyx_v_self->cx = __pyx_t_1; __pyx_v_self->cy = __pyx_t_2; __pyx_v_self->cz = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":181 * def __init__(self, double x0, double y0, double z0, double x1, double y1, double z1, double r): * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 # <<<<<<<<<<<<<< * self.rr = r * r * self.r = r */ __pyx_t_3 = __pyx_v_x0; __pyx_t_2 = __pyx_v_y0; __pyx_t_1 = __pyx_v_z0; __pyx_t_4 = __pyx_v_x1; __pyx_t_5 = __pyx_v_y1; __pyx_t_6 = __pyx_v_z1; __pyx_v_self->x0 = __pyx_t_3; __pyx_v_self->y0 = __pyx_t_2; __pyx_v_self->z0 = __pyx_t_1; __pyx_v_self->x1 = __pyx_t_4; __pyx_v_self->y1 = __pyx_t_5; __pyx_v_self->z1 = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":182 * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 * self.rr = r * r # <<<<<<<<<<<<<< * self.r = r * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) */ __pyx_v_self->rr = (__pyx_v_r * __pyx_v_r); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":183 * self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 * self.rr = r * r * self.r = r # <<<<<<<<<<<<<< * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) */ __pyx_v_self->r = __pyx_v_r; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":184 * self.rr = r * r * self.r = r * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) # <<<<<<<<<<<<<< * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) * # normalize the axis */ __pyx_t_6 = (__pyx_v_x1 - __pyx_v_x0); __pyx_t_5 = (__pyx_v_y1 - __pyx_v_y0); __pyx_t_4 = (__pyx_v_z1 - __pyx_v_z0); __pyx_v_self->axisx = __pyx_t_6; __pyx_v_self->axisy = __pyx_t_5; __pyx_v_self->axisz = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":185 * self.r = r * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) # <<<<<<<<<<<<<< * # normalize the axis * self.axisx /= self.length */ __pyx_v_self->length = sqrt(((pow(__pyx_v_self->axisx, 2.0) + pow(__pyx_v_self->axisy, 2.0)) + pow(__pyx_v_self->axisz, 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":187 * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) * # normalize the axis * self.axisx /= self.length # <<<<<<<<<<<<<< * self.axisy /= self.length * self.axisz /= self.length */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisx = (__pyx_v_self->axisx / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":188 * # normalize the axis * self.axisx /= self.length * self.axisy /= self.length # <<<<<<<<<<<<<< * self.axisz /= self.length * */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisy = (__pyx_v_self->axisy / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":189 * self.axisx /= self.length * self.axisy /= self.length * self.axisz /= self.length # <<<<<<<<<<<<<< * * */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisz = (__pyx_v_self->axisz / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":192 * * * self.h = self.length * 0.5 # <<<<<<<<<<<<<< * * self._xlo = min(x0 - r, x1 - r) */ __pyx_v_self->h = (__pyx_v_self->length * 0.5); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":194 * self.h = self.length * 0.5 * * self._xlo = min(x0 - r, x1 - r) # <<<<<<<<<<<<<< * self._xhi = max(x0 + r, x1 + r) * self._ylo = min(y0 - r, y1 - r) */ __pyx_t_4 = (__pyx_v_x1 - __pyx_v_r); __pyx_t_5 = (__pyx_v_x0 - __pyx_v_r); if (((__pyx_t_4 < __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_4; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_self->_xlo = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":195 * * self._xlo = min(x0 - r, x1 - r) * self._xhi = max(x0 + r, x1 + r) # <<<<<<<<<<<<<< * self._ylo = min(y0 - r, y1 - r) * self._yhi = max(y0 + r, y1 + r) */ __pyx_t_6 = (__pyx_v_x1 + __pyx_v_r); __pyx_t_4 = (__pyx_v_x0 + __pyx_v_r); if (((__pyx_t_6 > __pyx_t_4) != 0)) { __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_self->_xhi = __pyx_t_5; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":196 * self._xlo = min(x0 - r, x1 - r) * self._xhi = max(x0 + r, x1 + r) * self._ylo = min(y0 - r, y1 - r) # <<<<<<<<<<<<<< * self._yhi = max(y0 + r, y1 + r) * self._zlo = min(z0 - r, z1 - r) */ __pyx_t_5 = (__pyx_v_y1 - __pyx_v_r); __pyx_t_6 = (__pyx_v_y0 - __pyx_v_r); if (((__pyx_t_5 < __pyx_t_6) != 0)) { __pyx_t_4 = __pyx_t_5; } else { __pyx_t_4 = __pyx_t_6; } __pyx_v_self->_ylo = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":197 * self._xhi = max(x0 + r, x1 + r) * self._ylo = min(y0 - r, y1 - r) * self._yhi = max(y0 + r, y1 + r) # <<<<<<<<<<<<<< * self._zlo = min(z0 - r, z1 - r) * self._zhi = max(z0 + r, z1 + r) */ __pyx_t_4 = (__pyx_v_y1 + __pyx_v_r); __pyx_t_5 = (__pyx_v_y0 + __pyx_v_r); if (((__pyx_t_4 > __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_4; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_self->_yhi = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":198 * self._ylo = min(y0 - r, y1 - r) * self._yhi = max(y0 + r, y1 + r) * self._zlo = min(z0 - r, z1 - r) # <<<<<<<<<<<<<< * self._zhi = max(z0 + r, z1 + r) * self.neighbors = [] */ __pyx_t_6 = (__pyx_v_z1 - __pyx_v_r); __pyx_t_4 = (__pyx_v_z0 - __pyx_v_r); if (((__pyx_t_6 < __pyx_t_4) != 0)) { __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_self->_zlo = __pyx_t_5; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":199 * self._yhi = max(y0 + r, y1 + r) * self._zlo = min(z0 - r, z1 - r) * self._zhi = max(z0 + r, z1 + r) # <<<<<<<<<<<<<< * self.neighbors = [] * self.clips = [] */ __pyx_t_5 = (__pyx_v_z1 + __pyx_v_r); __pyx_t_6 = (__pyx_v_z0 + __pyx_v_r); if (((__pyx_t_5 > __pyx_t_6) != 0)) { __pyx_t_4 = __pyx_t_5; } else { __pyx_t_4 = __pyx_t_6; } __pyx_v_self->_zhi = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":200 * self._zlo = min(z0 - r, z1 - r) * self._zhi = max(z0 + r, z1 + r) * self.neighbors = [] # <<<<<<<<<<<<<< * self.clips = [] * self.neighbor_regions = [] */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->neighbors); __Pyx_DECREF(__pyx_v_self->neighbors); __pyx_v_self->neighbors = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":201 * self._zhi = max(z0 + r, z1 + r) * self.neighbors = [] * self.clips = [] # <<<<<<<<<<<<<< * self.neighbor_regions = [] * */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":202 * self.neighbors = [] * self.clips = [] * self.neighbor_regions = [] # <<<<<<<<<<<<<< * * property axislength: */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->neighbor_regions); __Pyx_DECREF(__pyx_v_self->neighbor_regions); __pyx_v_self->neighbor_regions = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":179 * def __get__(self): return self._zhi * * def __init__(self, double x0, double y0, double z0, double x1, double y1, double z1, double r): # <<<<<<<<<<<<<< * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":205 * * property axislength: * def __get__(self): # <<<<<<<<<<<<<< * return self.length * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":206 * property axislength: * def __get__(self): * return self.length # <<<<<<<<<<<<<< * * property _x0: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":205 * * property axislength: * def __get__(self): # <<<<<<<<<<<<<< * return self.length * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.axislength.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":209 * * property _x0: * def __get__(self): # <<<<<<<<<<<<<< * return self.x0 * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":210 * property _x0: * def __get__(self): * return self.x0 # <<<<<<<<<<<<<< * * property _y0: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":209 * * property _x0: * def __get__(self): # <<<<<<<<<<<<<< * return self.x0 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._x0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":213 * * property _y0: * def __get__(self): # <<<<<<<<<<<<<< * return self.y0 * property _z0: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":214 * property _y0: * def __get__(self): * return self.y0 # <<<<<<<<<<<<<< * property _z0: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":213 * * property _y0: * def __get__(self): # <<<<<<<<<<<<<< * return self.y0 * property _z0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._y0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":216 * return self.y0 * property _z0: * def __get__(self): # <<<<<<<<<<<<<< * return self.z0 * property _r0: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":217 * property _z0: * def __get__(self): * return self.z0 # <<<<<<<<<<<<<< * property _r0: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":216 * return self.y0 * property _z0: * def __get__(self): # <<<<<<<<<<<<<< * return self.z0 * property _r0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._z0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":219 * return self.z0 * property _r0: * def __get__(self): # <<<<<<<<<<<<<< * return self.r * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":220 * property _r0: * def __get__(self): * return self.r # <<<<<<<<<<<<<< * * property _x1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->r); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":219 * return self.z0 * property _r0: * def __get__(self): # <<<<<<<<<<<<<< * return self.r * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._r0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":223 * * property _x1: * def __get__(self): # <<<<<<<<<<<<<< * return self.x1 * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":224 * property _x1: * def __get__(self): * return self.x1 # <<<<<<<<<<<<<< * * property _y1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":223 * * property _x1: * def __get__(self): # <<<<<<<<<<<<<< * return self.x1 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._x1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":227 * * property _y1: * def __get__(self): # <<<<<<<<<<<<<< * return self.y1 * property _z1: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":228 * property _y1: * def __get__(self): * return self.y1 # <<<<<<<<<<<<<< * property _z1: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":227 * * property _y1: * def __get__(self): # <<<<<<<<<<<<<< * return self.y1 * property _z1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._y1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":230 * return self.y1 * property _z1: * def __get__(self): # <<<<<<<<<<<<<< * return self.z1 * property _r1: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":231 * property _z1: * def __get__(self): * return self.z1 # <<<<<<<<<<<<<< * property _r1: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":230 * return self.y1 * property _z1: * def __get__(self): # <<<<<<<<<<<<<< * return self.z1 * property _r1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._z1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":233 * return self.z1 * property _r1: * def __get__(self): # <<<<<<<<<<<<<< * return self.r * property primitives: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":234 * property _r1: * def __get__(self): * return self.r # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return [self] */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->r); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":233 * return self.z1 * property _r1: * def __get__(self): # <<<<<<<<<<<<<< * return self.r * property primitives: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._r1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":236 * return self.r * property primitives: * def __get__(self): return [self] # <<<<<<<<<<<<<< * * def get_clip(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":238 * def __get__(self): return [self] * * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_5get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_5get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_4get_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_4get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":239 * * def get_clip(self): * return self.clips # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->clips); __pyx_r = __pyx_v_self->clips; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":238 * def __get__(self): return [self] * * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":242 * * * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_7set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_7set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_6set_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), ((PyObject *)__pyx_v_clips)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_6set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":243 * * def set_clip(self, clips): * self.clips = clips # <<<<<<<<<<<<<< * * def axis(self): */ if (!(likely(PyList_CheckExact(__pyx_v_clips))||((__pyx_v_clips) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_clips)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_clips; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":242 * * * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":245 * self.clips = clips * * def axis(self): # <<<<<<<<<<<<<< * return (self.axisx, self.axisy, self.axisz) * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_9axis(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_9axis(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("axis (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_8axis(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_8axis(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("axis", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":246 * * def axis(self): * return (self.axisx, self.axisy, self.axisz) # <<<<<<<<<<<<<< * * def set_neighbors(self, neighbors, neighbor_regions): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->axisx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->axisy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->axisz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":245 * self.clips = clips * * def axis(self): # <<<<<<<<<<<<<< * return (self.axisx, self.axisy, self.axisz) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.axis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":248 * return (self.axisx, self.axisy, self.axisz) * * def set_neighbors(self, neighbors, neighbor_regions): # <<<<<<<<<<<<<< * self.neighbors = neighbors * self.neighbor_regions = neighbor_regions */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_11set_neighbors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_11set_neighbors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_neighbors = 0; PyObject *__pyx_v_neighbor_regions = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_neighbors (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_neighbors,&__pyx_n_s_neighbor_regions,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_neighbors)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_neighbor_regions)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_neighbors", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_neighbors") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_neighbors = values[0]; __pyx_v_neighbor_regions = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_neighbors", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.set_neighbors", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10set_neighbors(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_neighbors, __pyx_v_neighbor_regions); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10set_neighbors(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, PyObject *__pyx_v_neighbors, PyObject *__pyx_v_neighbor_regions) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_neighbors", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":249 * * def set_neighbors(self, neighbors, neighbor_regions): * self.neighbors = neighbors # <<<<<<<<<<<<<< * self.neighbor_regions = neighbor_regions * */ if (!(likely(PyList_CheckExact(__pyx_v_neighbors))||((__pyx_v_neighbors) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_neighbors)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_neighbors; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->neighbors); __Pyx_DECREF(__pyx_v_self->neighbors); __pyx_v_self->neighbors = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":250 * def set_neighbors(self, neighbors, neighbor_regions): * self.neighbors = neighbors * self.neighbor_regions = neighbor_regions # <<<<<<<<<<<<<< * * cpdef within_core(self, double px, double py, double pz): */ if (!(likely(PyList_CheckExact(__pyx_v_neighbor_regions))||((__pyx_v_neighbor_regions) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_neighbor_regions)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_neighbor_regions; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->neighbor_regions); __Pyx_DECREF(__pyx_v_self->neighbor_regions); __pyx_v_self->neighbor_regions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":248 * return (self.axisx, self.axisy, self.axisz) * * def set_neighbors(self, neighbors, neighbor_regions): # <<<<<<<<<<<<<< * self.neighbors = neighbors * self.neighbor_regions = neighbor_regions */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.set_neighbors", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":252 * self.neighbor_regions = neighbor_regions * * cpdef within_core(self, double px, double py, double pz): # <<<<<<<<<<<<<< * cdef double nx, ny, nz, y, yy, xx * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_core(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("within_core", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_within_core); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_core)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":254 * cpdef within_core(self, double px, double py, double pz): * cdef double nx, ny, nz, y, yy, xx * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz # <<<<<<<<<<<<<< * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * return y < self.h */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->cx); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->cy); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->cz); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":255 * cdef double nx, ny, nz, y, yy, xx * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) # <<<<<<<<<<<<<< * return y < self.h * */ __pyx_v_y = fabs((((__pyx_v_self->axisx * __pyx_v_nx) + (__pyx_v_self->axisy * __pyx_v_ny)) + (__pyx_v_self->axisz * __pyx_v_nz))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":256 * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * return y < self.h # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_y < __pyx_v_self->h)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":252 * self.neighbor_regions = neighbor_regions * * cpdef within_core(self, double px, double py, double pz): # <<<<<<<<<<<<<< * cdef double nx, ny, nz, y, yy, xx * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.within_core", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_core(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_core(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("within_core (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("within_core", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("within_core", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "within_core") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("within_core", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.within_core", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_12within_core(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_12within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("within_core", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_within_core(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.within_core", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":259 * * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_15starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_15starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_14starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_14starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":261 * def starting_points(self, xs, ys, zs): * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], # <<<<<<<<<<<<<< * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_zs); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":262 * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), # <<<<<<<<<<<<<< * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_3, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_3, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_3 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_3 = 1; } } __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":263 * return sum([c.starting_points(xs, ys, zs) for c in self.clips], * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_3 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_3, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_3, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_3 = 1; } } __pyx_t_11 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_3, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_3, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":262 * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), # <<<<<<<<<<<<<< * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) * */ __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_9); __pyx_t_6 = 0; __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":261 * def starting_points(self, xs, ys, zs): * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], # <<<<<<<<<<<<<< * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) */ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":259 * * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":266 * * * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * # CTNG:cyldist * cdef double nx, ny, nz, y, yy, xx, d */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; double __pyx_v_yy; double __pyx_v_xx; double __pyx_v_d; double __pyx_v_x; PyObject *__pyx_v_clip = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":269 * # CTNG:cyldist * cdef double nx, ny, nz, y, yy, xx, d * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz # <<<<<<<<<<<<<< * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * yy = y * y */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->cx); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->cy); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->cz); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":270 * cdef double nx, ny, nz, y, yy, xx, d * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) # <<<<<<<<<<<<<< * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy */ __pyx_v_y = fabs((((__pyx_v_self->axisx * __pyx_v_nx) + (__pyx_v_self->axisy * __pyx_v_ny)) + (__pyx_v_self->axisz * __pyx_v_nz))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":271 * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * yy = y * y # <<<<<<<<<<<<<< * xx = nx * nx + ny * ny + nz * nz - yy * if y < self.h: */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":272 * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy # <<<<<<<<<<<<<< * if y < self.h: * # this was wrong in my version from 2012-06-28, since did not */ __pyx_v_xx = ((((__pyx_v_nx * __pyx_v_nx) + (__pyx_v_ny * __pyx_v_ny)) + (__pyx_v_nz * __pyx_v_nz)) - __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":273 * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy * if y < self.h: # <<<<<<<<<<<<<< * # this was wrong in my version from 2012-06-28, since did not * # handle end-caps being closest */ __pyx_t_13 = ((__pyx_v_y < __pyx_v_self->h) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":276 * # this was wrong in my version from 2012-06-28, since did not * # handle end-caps being closest * d = max(y - self.h, sqrt(xx) - self.r) # <<<<<<<<<<<<<< * else: * y -= self.h */ __pyx_t_12 = (sqrt(__pyx_v_xx) - __pyx_v_self->r); __pyx_t_11 = (__pyx_v_y - __pyx_v_self->h); if (((__pyx_t_12 > __pyx_t_11) != 0)) { __pyx_t_10 = __pyx_t_12; } else { __pyx_t_10 = __pyx_t_11; } __pyx_v_d = __pyx_t_10; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":273 * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy * if y < self.h: # <<<<<<<<<<<<<< * # this was wrong in my version from 2012-06-28, since did not * # handle end-caps being closest */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":278 * d = max(y - self.h, sqrt(xx) - self.r) * else: * y -= self.h # <<<<<<<<<<<<<< * if xx < self.rr: * d = y */ /*else*/ { __pyx_v_y = (__pyx_v_y - __pyx_v_self->h); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":279 * else: * y -= self.h * if xx < self.rr: # <<<<<<<<<<<<<< * d = y * else: */ __pyx_t_13 = ((__pyx_v_xx < __pyx_v_self->rr) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":280 * y -= self.h * if xx < self.rr: * d = y # <<<<<<<<<<<<<< * else: * yy = y * y */ __pyx_v_d = __pyx_v_y; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":279 * else: * y -= self.h * if xx < self.rr: # <<<<<<<<<<<<<< * d = y * else: */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":282 * d = y * else: * yy = y * y # <<<<<<<<<<<<<< * x = sqrt(xx) - self.r * d = sqrt(yy + x * x) */ /*else*/ { __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":283 * else: * yy = y * y * x = sqrt(xx) - self.r # <<<<<<<<<<<<<< * d = sqrt(yy + x * x) * */ __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":284 * yy = y * y * x = sqrt(xx) - self.r * d = sqrt(yy + x * x) # <<<<<<<<<<<<<< * * for clip in self.clips: */ __pyx_v_d = sqrt((__pyx_v_yy + (__pyx_v_x * __pyx_v_x))); } __pyx_L4:; } __pyx_L3:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":286 * d = sqrt(yy + x * x) * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":287 * * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) # <<<<<<<<<<<<<< * return d * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clip, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_14 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_14, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_v_d; __pyx_t_7 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_13) { __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_d = __pyx_t_10; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":286 * d = sqrt(yy + x * x) * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":288 * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) * return d # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":266 * * * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * # CTNG:cyldist * cdef double nx, ny, nz, y, yy, xx, d */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clip); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_16distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_16distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":291 * * * cpdef double _distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * """returns the distance to the cylinder, but not including the end plate * if inside (and including the end plate if outside)""" */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; double __pyx_v_yy; double __pyx_v_xx; double __pyx_v_d; double __pyx_v_x; PyObject *__pyx_v_clip = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":295 * if inside (and including the end plate if outside)""" * cdef double nx, ny, nz, y, yy, xx, d * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz # <<<<<<<<<<<<<< * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * yy = y * y */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->cx); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->cy); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->cz); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":296 * cdef double nx, ny, nz, y, yy, xx, d * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) # <<<<<<<<<<<<<< * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy */ __pyx_v_y = fabs((((__pyx_v_self->axisx * __pyx_v_nx) + (__pyx_v_self->axisy * __pyx_v_ny)) + (__pyx_v_self->axisz * __pyx_v_nz))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":297 * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * yy = y * y # <<<<<<<<<<<<<< * xx = nx * nx + ny * ny + nz * nz - yy * if y < self.h: */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":298 * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy # <<<<<<<<<<<<<< * if y < self.h: * # this is the part where we ignore the end plate if inside */ __pyx_v_xx = ((((__pyx_v_nx * __pyx_v_nx) + (__pyx_v_ny * __pyx_v_ny)) + (__pyx_v_nz * __pyx_v_nz)) - __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":299 * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy * if y < self.h: # <<<<<<<<<<<<<< * # this is the part where we ignore the end plate if inside * d = sqrt(xx) - self.r */ __pyx_t_13 = ((__pyx_v_y < __pyx_v_self->h) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":301 * if y < self.h: * # this is the part where we ignore the end plate if inside * d = sqrt(xx) - self.r # <<<<<<<<<<<<<< * else: * y -= self.h */ __pyx_v_d = (sqrt(__pyx_v_xx) - __pyx_v_self->r); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":299 * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy * if y < self.h: # <<<<<<<<<<<<<< * # this is the part where we ignore the end plate if inside * d = sqrt(xx) - self.r */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":303 * d = sqrt(xx) - self.r * else: * y -= self.h # <<<<<<<<<<<<<< * if xx < self.rr: * d = y */ /*else*/ { __pyx_v_y = (__pyx_v_y - __pyx_v_self->h); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":304 * else: * y -= self.h * if xx < self.rr: # <<<<<<<<<<<<<< * d = y * else: */ __pyx_t_13 = ((__pyx_v_xx < __pyx_v_self->rr) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":305 * y -= self.h * if xx < self.rr: * d = y # <<<<<<<<<<<<<< * else: * yy = y * y */ __pyx_v_d = __pyx_v_y; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":304 * else: * y -= self.h * if xx < self.rr: # <<<<<<<<<<<<<< * d = y * else: */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":307 * d = y * else: * yy = y * y # <<<<<<<<<<<<<< * x = sqrt(xx) - self.r * d = sqrt(yy + x * x) */ /*else*/ { __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":308 * else: * yy = y * y * x = sqrt(xx) - self.r # <<<<<<<<<<<<<< * d = sqrt(yy + x * x) * */ __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":309 * yy = y * y * x = sqrt(xx) - self.r * d = sqrt(yy + x * x) # <<<<<<<<<<<<<< * * for clip in self.clips: */ __pyx_v_d = sqrt((__pyx_v_yy + (__pyx_v_x * __pyx_v_x))); } __pyx_L4:; } __pyx_L3:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":311 * d = sqrt(yy + x * x) * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":312 * * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) # <<<<<<<<<<<<<< * return d * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clip, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_14 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_14, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __pyx_v_d; __pyx_t_7 = PyFloat_FromDouble(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_13) { __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_d = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":311 * d = sqrt(yy + x * x) * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":313 * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) * return d # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":291 * * * cpdef double _distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * """returns the distance to the cylinder, but not including the end plate * if inside (and including the end plate if outside)""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clip); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance[] = "returns the distance to the cylinder, but not including the end plate\n if inside (and including the end plate if outside)"; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder._distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":317 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_x)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":318 * * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo # <<<<<<<<<<<<<< * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_xhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_xlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":317 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_x (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_x") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_20overlaps_x(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_20overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_x(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":319 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_y)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":320 * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo # <<<<<<<<<<<<<< * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_yhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_ylo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":319 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_y (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_y") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_22overlaps_y(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_22overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_y(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":321 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_z); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_z)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":322 * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo # <<<<<<<<<<<<<< * * */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_zhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_zlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":321 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_z (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_z") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_24overlaps_z(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_24overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_z(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cylinder.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":331 * cdef list clips * property primitives: * def __get__(self): return [self] # <<<<<<<<<<<<<< * * def __repr__(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":333 * def __get__(self): return [self] * * def __repr__(self): # <<<<<<<<<<<<<< * return 'SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1) * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_1__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_1__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone___repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone___repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":334 * * def __repr__(self): * return 'SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1) # <<<<<<<<<<<<<< * * def set_clip(self, clips): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->r0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->r1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_8); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_SphereCone_g_g_g_g_g_g_g_g, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":333 * def __get__(self): return [self] * * def __repr__(self): # <<<<<<<<<<<<<< * return 'SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":336 * return 'SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1) * * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * def get_clip(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_3set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_3set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_2set_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), ((PyObject *)__pyx_v_clips)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_2set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":337 * * def set_clip(self, clips): * self.clips = clips # <<<<<<<<<<<<<< * def get_clip(self): * return self.clips */ if (!(likely(PyList_CheckExact(__pyx_v_clips))||((__pyx_v_clips) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_clips)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_clips; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":336 * return 'SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1) * * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * def get_clip(self): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":338 * def set_clip(self, clips): * self.clips = clips * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_5get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_5get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_4get_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_4get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":339 * self.clips = clips * def get_clip(self): * return self.clips # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->clips); __pyx_r = __pyx_v_self->clips; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":338 * def set_clip(self, clips): * self.clips = clips * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":342 * * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): # <<<<<<<<<<<<<< * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; double __pyx_v_r0; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; double __pyx_v_r1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x0,&__pyx_n_s_y0,&__pyx_n_s_z0,&__pyx_n_s_r0,&__pyx_n_s_x1,&__pyx_n_s_y1,&__pyx_n_s_z1,&__pyx_n_s_r1,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x0)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 8) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); } __pyx_v_x0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y0 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z0 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r0 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_r0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_x1 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_x1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y1 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_y1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z1 = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_z1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r1 = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_r1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_6__init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), __pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_r0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r1); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_6__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1) { double __pyx_v_r0b; double __pyx_v_s; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; double __pyx_t_2; double __pyx_t_3; double __pyx_t_4; double __pyx_t_5; double __pyx_t_6; double __pyx_t_7; double __pyx_t_8; double __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":343 * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): * if r1 > r0: # <<<<<<<<<<<<<< * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 * */ __pyx_t_1 = ((__pyx_v_r1 > __pyx_v_r0) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":344 * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 # <<<<<<<<<<<<<< * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 */ __pyx_t_2 = __pyx_v_x1; __pyx_t_3 = __pyx_v_y1; __pyx_t_4 = __pyx_v_z1; __pyx_t_5 = __pyx_v_r1; __pyx_t_6 = __pyx_v_x0; __pyx_t_7 = __pyx_v_y0; __pyx_t_8 = __pyx_v_z0; __pyx_t_9 = __pyx_v_r0; __pyx_v_x0 = __pyx_t_2; __pyx_v_y0 = __pyx_t_3; __pyx_v_z0 = __pyx_t_4; __pyx_v_r0 = __pyx_t_5; __pyx_v_x1 = __pyx_t_6; __pyx_v_y1 = __pyx_t_7; __pyx_v_z1 = __pyx_t_8; __pyx_v_r1 = __pyx_t_9; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":343 * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): * if r1 > r0: # <<<<<<<<<<<<<< * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 * */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":346 * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 # <<<<<<<<<<<<<< * * self.rra, self.rrb = r0 * r0, r1 * r1 */ __pyx_t_9 = __pyx_v_x0; __pyx_t_8 = __pyx_v_y0; __pyx_t_7 = __pyx_v_z0; __pyx_t_6 = __pyx_v_r0; __pyx_t_5 = __pyx_v_x1; __pyx_t_4 = __pyx_v_y1; __pyx_t_3 = __pyx_v_z1; __pyx_t_2 = __pyx_v_r1; __pyx_v_self->x0 = __pyx_t_9; __pyx_v_self->y0 = __pyx_t_8; __pyx_v_self->z0 = __pyx_t_7; __pyx_v_self->r0 = __pyx_t_6; __pyx_v_self->x1 = __pyx_t_5; __pyx_v_self->y1 = __pyx_t_4; __pyx_v_self->z1 = __pyx_t_3; __pyx_v_self->r1 = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":348 * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 * * self.rra, self.rrb = r0 * r0, r1 * r1 # <<<<<<<<<<<<<< * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) */ __pyx_t_2 = (__pyx_v_r0 * __pyx_v_r0); __pyx_t_3 = (__pyx_v_r1 * __pyx_v_r1); __pyx_v_self->rra = __pyx_t_2; __pyx_v_self->rrb = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":349 * * self.rra, self.rrb = r0 * r0, r1 * r1 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) # <<<<<<<<<<<<<< * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) * # normalize the axis */ __pyx_t_3 = (__pyx_v_x1 - __pyx_v_x0); __pyx_t_2 = (__pyx_v_y1 - __pyx_v_y0); __pyx_t_4 = (__pyx_v_z1 - __pyx_v_z0); __pyx_v_self->axisx = __pyx_t_3; __pyx_v_self->axisy = __pyx_t_2; __pyx_v_self->axisz = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":350 * self.rra, self.rrb = r0 * r0, r1 * r1 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) # <<<<<<<<<<<<<< * # normalize the axis * self.axisx /= self.length */ __pyx_v_self->length = sqrt(((pow(__pyx_v_self->axisx, 2.0) + pow(__pyx_v_self->axisy, 2.0)) + pow(__pyx_v_self->axisz, 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":352 * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) * # normalize the axis * self.axisx /= self.length # <<<<<<<<<<<<<< * self.axisy /= self.length * self.axisz /= self.length */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisx = (__pyx_v_self->axisx / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":353 * # normalize the axis * self.axisx /= self.length * self.axisy /= self.length # <<<<<<<<<<<<<< * self.axisz /= self.length * """ */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisy = (__pyx_v_self->axisy / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":354 * self.axisx /= self.length * self.axisy /= self.length * self.axisz /= self.length # <<<<<<<<<<<<<< * """ * rab = r0 - r1 */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisz = (__pyx_v_self->axisz / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":366 * self.conelength = self.length * self.hra / self.r0 * """ * self.r0 = r0 # <<<<<<<<<<<<<< * self.r1 = r1 * self.rrb = r1 * r1 */ __pyx_v_self->r0 = __pyx_v_r0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":367 * """ * self.r0 = r0 * self.r1 = r1 # <<<<<<<<<<<<<< * self.rrb = r1 * r1 * self.rra = r0 * r0 */ __pyx_v_self->r1 = __pyx_v_r1; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":368 * self.r0 = r0 * self.r1 = r1 * self.rrb = r1 * r1 # <<<<<<<<<<<<<< * self.rra = r0 * r0 * r0b = r0 - r1 */ __pyx_v_self->rrb = (__pyx_v_r1 * __pyx_v_r1); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":369 * self.r1 = r1 * self.rrb = r1 * r1 * self.rra = r0 * r0 # <<<<<<<<<<<<<< * r0b = r0 - r1 * s = sqrt(self.length * self.length - r0b * r0b) */ __pyx_v_self->rra = (__pyx_v_r0 * __pyx_v_r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":370 * self.rrb = r1 * r1 * self.rra = r0 * r0 * r0b = r0 - r1 # <<<<<<<<<<<<<< * s = sqrt(self.length * self.length - r0b * r0b) * self.ha = self.r0 * r0b / self.length */ __pyx_v_r0b = (__pyx_v_r0 - __pyx_v_r1); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":371 * self.rra = r0 * r0 * r0b = r0 - r1 * s = sqrt(self.length * self.length - r0b * r0b) # <<<<<<<<<<<<<< * self.ha = self.r0 * r0b / self.length * self.hb = self.r1 * r0b / self.length */ __pyx_v_s = sqrt(((__pyx_v_self->length * __pyx_v_self->length) - (__pyx_v_r0b * __pyx_v_r0b))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":372 * r0b = r0 - r1 * s = sqrt(self.length * self.length - r0b * r0b) * self.ha = self.r0 * r0b / self.length # <<<<<<<<<<<<<< * self.hb = self.r1 * r0b / self.length * self.hra = self.r0 * s / self.length */ __pyx_t_4 = (__pyx_v_self->r0 * __pyx_v_r0b); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->ha = (__pyx_t_4 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":373 * s = sqrt(self.length * self.length - r0b * r0b) * self.ha = self.r0 * r0b / self.length * self.hb = self.r1 * r0b / self.length # <<<<<<<<<<<<<< * self.hra = self.r0 * s / self.length * self.hrb = self.r1 * s / self.length */ __pyx_t_4 = (__pyx_v_self->r1 * __pyx_v_r0b); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->hb = (__pyx_t_4 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":374 * self.ha = self.r0 * r0b / self.length * self.hb = self.r1 * r0b / self.length * self.hra = self.r0 * s / self.length # <<<<<<<<<<<<<< * self.hrb = self.r1 * s / self.length * self.side1 = -self.ha / self.r0 */ __pyx_t_4 = (__pyx_v_self->r0 * __pyx_v_s); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->hra = (__pyx_t_4 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":375 * self.hb = self.r1 * r0b / self.length * self.hra = self.r0 * s / self.length * self.hrb = self.r1 * s / self.length # <<<<<<<<<<<<<< * self.side1 = -self.ha / self.r0 * self.side2 = self.hra / self.r0 */ __pyx_t_4 = (__pyx_v_self->r1 * __pyx_v_s); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->hrb = (__pyx_t_4 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":376 * self.hra = self.r0 * s / self.length * self.hrb = self.r1 * s / self.length * self.side1 = -self.ha / self.r0 # <<<<<<<<<<<<<< * self.side2 = self.hra / self.r0 * self.conelength = self.length * self.hra / self.r0 */ __pyx_t_4 = (-__pyx_v_self->ha); if (unlikely(__pyx_v_self->r0 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->side1 = (__pyx_t_4 / __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":377 * self.hrb = self.r1 * s / self.length * self.side1 = -self.ha / self.r0 * self.side2 = self.hra / self.r0 # <<<<<<<<<<<<<< * self.conelength = self.length * self.hra / self.r0 * */ if (unlikely(__pyx_v_self->r0 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->side2 = (__pyx_v_self->hra / __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":378 * self.side1 = -self.ha / self.r0 * self.side2 = self.hra / self.r0 * self.conelength = self.length * self.hra / self.r0 # <<<<<<<<<<<<<< * * self._xlo = min(x0 - r0, x1 - r1) */ __pyx_t_4 = (__pyx_v_self->length * __pyx_v_self->hra); if (unlikely(__pyx_v_self->r0 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->conelength = (__pyx_t_4 / __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":380 * self.conelength = self.length * self.hra / self.r0 * * self._xlo = min(x0 - r0, x1 - r1) # <<<<<<<<<<<<<< * self._xhi = max(x0 + r0, x1 + r1) * self._ylo = min(y0 - r0, y1 - r1) */ __pyx_t_4 = (__pyx_v_x1 - __pyx_v_r1); __pyx_t_2 = (__pyx_v_x0 - __pyx_v_r0); if (((__pyx_t_4 < __pyx_t_2) != 0)) { __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = __pyx_t_2; } __pyx_v_self->_xlo = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":381 * * self._xlo = min(x0 - r0, x1 - r1) * self._xhi = max(x0 + r0, x1 + r1) # <<<<<<<<<<<<<< * self._ylo = min(y0 - r0, y1 - r1) * self._yhi = max(y0 + r0, y1 + r1) */ __pyx_t_3 = (__pyx_v_x1 + __pyx_v_r1); __pyx_t_4 = (__pyx_v_x0 + __pyx_v_r0); if (((__pyx_t_3 > __pyx_t_4) != 0)) { __pyx_t_2 = __pyx_t_3; } else { __pyx_t_2 = __pyx_t_4; } __pyx_v_self->_xhi = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":382 * self._xlo = min(x0 - r0, x1 - r1) * self._xhi = max(x0 + r0, x1 + r1) * self._ylo = min(y0 - r0, y1 - r1) # <<<<<<<<<<<<<< * self._yhi = max(y0 + r0, y1 + r1) * self._zlo = min(z0 - r0, z1 - r1) */ __pyx_t_2 = (__pyx_v_y1 - __pyx_v_r1); __pyx_t_3 = (__pyx_v_y0 - __pyx_v_r0); if (((__pyx_t_2 < __pyx_t_3) != 0)) { __pyx_t_4 = __pyx_t_2; } else { __pyx_t_4 = __pyx_t_3; } __pyx_v_self->_ylo = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":383 * self._xhi = max(x0 + r0, x1 + r1) * self._ylo = min(y0 - r0, y1 - r1) * self._yhi = max(y0 + r0, y1 + r1) # <<<<<<<<<<<<<< * self._zlo = min(z0 - r0, z1 - r1) * self._zhi = max(z0 + r0, z1 + r1) */ __pyx_t_4 = (__pyx_v_y1 + __pyx_v_r1); __pyx_t_2 = (__pyx_v_y0 + __pyx_v_r0); if (((__pyx_t_4 > __pyx_t_2) != 0)) { __pyx_t_3 = __pyx_t_4; } else { __pyx_t_3 = __pyx_t_2; } __pyx_v_self->_yhi = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":384 * self._ylo = min(y0 - r0, y1 - r1) * self._yhi = max(y0 + r0, y1 + r1) * self._zlo = min(z0 - r0, z1 - r1) # <<<<<<<<<<<<<< * self._zhi = max(z0 + r0, z1 + r1) * self.clips = [] */ __pyx_t_3 = (__pyx_v_z1 - __pyx_v_r1); __pyx_t_4 = (__pyx_v_z0 - __pyx_v_r0); if (((__pyx_t_3 < __pyx_t_4) != 0)) { __pyx_t_2 = __pyx_t_3; } else { __pyx_t_2 = __pyx_t_4; } __pyx_v_self->_zlo = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":385 * self._yhi = max(y0 + r0, y1 + r1) * self._zlo = min(z0 - r0, z1 - r1) * self._zhi = max(z0 + r0, z1 + r1) # <<<<<<<<<<<<<< * self.clips = [] * */ __pyx_t_2 = (__pyx_v_z1 + __pyx_v_r1); __pyx_t_3 = (__pyx_v_z0 + __pyx_v_r0); if (((__pyx_t_2 > __pyx_t_3) != 0)) { __pyx_t_4 = __pyx_t_2; } else { __pyx_t_4 = __pyx_t_3; } __pyx_v_self->_zhi = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":386 * self._zlo = min(z0 - r0, z1 - r1) * self._zhi = max(z0 + r0, z1 + r1) * self.clips = [] # <<<<<<<<<<<<<< * * def starting_points(self, xs, ys, zs): */ __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":342 * * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): # <<<<<<<<<<<<<< * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":388 * self.clips = [] * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0 - self.axisx * self.r0), bisect.bisect_left(ys, self.y0 - self.axisy * self.r0), bisect.bisect_left(zs, self.z0 - self.axisz * self.r0))]) */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_9starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_9starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_8starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_8starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":390 * def starting_points(self, xs, ys, zs): * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0 - self.axisx * self.r0), bisect.bisect_left(ys, self.y0 - self.axisy * self.r0), bisect.bisect_left(zs, self.z0 - self.axisz * self.r0))]) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_zs); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->x0 - (__pyx_v_self->axisx * __pyx_v_self->r0))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_3, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_3, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyFloat_FromDouble((__pyx_v_self->y0 - (__pyx_v_self->axisy * __pyx_v_self->r0))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_3 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble((__pyx_v_self->z0 - (__pyx_v_self->axisz * __pyx_v_self->r0))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_3 = 1; } } __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":388 * self.clips = [] * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0 - self.axisx * self.r0), bisect.bisect_left(ys, self.y0 - self.axisy * self.r0), bisect.bisect_left(zs, self.z0 - self.axisz * self.r0))]) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":393 * * * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * cdef double nx, ny, nz, y, yy, xx, ry, rx, nn, x, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; double __pyx_v_yy; double __pyx_v_xx; double __pyx_v_ry; double __pyx_v_rx; double __pyx_v_nn; double __pyx_v_x; double __pyx_v_d; PyObject *__pyx_v_clip = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":395 * cpdef double distance(self, double px, double py, double pz): * cdef double nx, ny, nz, y, yy, xx, ry, rx, nn, x, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 # <<<<<<<<<<<<<< * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * nn = nx * nx + ny * ny + nz * nz */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->x0); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->y0); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->z0); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":396 * cdef double nx, ny, nz, y, yy, xx, ry, rx, nn, x, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz # <<<<<<<<<<<<<< * nn = nx * nx + ny * ny + nz * nz * */ __pyx_v_y = (((__pyx_v_nx * __pyx_v_self->axisx) + (__pyx_v_ny * __pyx_v_self->axisy)) + (__pyx_v_nz * __pyx_v_self->axisz)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":397 * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * nn = nx * nx + ny * ny + nz * nz # <<<<<<<<<<<<<< * * yy = y * y */ __pyx_v_nn = (((__pyx_v_nx * __pyx_v_nx) + (__pyx_v_ny * __pyx_v_ny)) + (__pyx_v_nz * __pyx_v_nz)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":399 * nn = nx * nx + ny * ny + nz * nz * * yy = y * y # <<<<<<<<<<<<<< * xx = nn - yy * # in principle, xx >= 0, however roundoff errors may cause trouble */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":400 * * yy = y * y * xx = nn - yy # <<<<<<<<<<<<<< * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 */ __pyx_v_xx = (__pyx_v_nn - __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":402 * xx = nn - yy * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 # <<<<<<<<<<<<<< * x = sqrt(xx) * ry = x * self.side1 + y * self.side2 */ __pyx_t_13 = ((__pyx_v_xx < 0.0) != 0); if (__pyx_t_13) { __pyx_v_xx = 0.0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":403 * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 * x = sqrt(xx) # <<<<<<<<<<<<<< * ry = x * self.side1 + y * self.side2 * if ry < 0: */ __pyx_v_x = sqrt(__pyx_v_xx); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":404 * if xx < 0: xx = 0 * x = sqrt(xx) * ry = x * self.side1 + y * self.side2 # <<<<<<<<<<<<<< * if ry < 0: * d = sqrt(nn) - self.r0 */ __pyx_v_ry = ((__pyx_v_x * __pyx_v_self->side1) + (__pyx_v_y * __pyx_v_self->side2)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":405 * x = sqrt(xx) * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * d = sqrt(nn) - self.r0 * elif ry > self.conelength: */ __pyx_t_13 = ((__pyx_v_ry < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":406 * ry = x * self.side1 + y * self.side2 * if ry < 0: * d = sqrt(nn) - self.r0 # <<<<<<<<<<<<<< * elif ry > self.conelength: * y = y - self.length */ __pyx_v_d = (sqrt(__pyx_v_nn) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":405 * x = sqrt(xx) * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * d = sqrt(nn) - self.r0 * elif ry > self.conelength: */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":407 * if ry < 0: * d = sqrt(nn) - self.r0 * elif ry > self.conelength: # <<<<<<<<<<<<<< * y = y - self.length * yy = y * y */ __pyx_t_13 = ((__pyx_v_ry > __pyx_v_self->conelength) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":408 * d = sqrt(nn) - self.r0 * elif ry > self.conelength: * y = y - self.length # <<<<<<<<<<<<<< * yy = y * y * nn = xx + yy */ __pyx_v_y = (__pyx_v_y - __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":409 * elif ry > self.conelength: * y = y - self.length * yy = y * y # <<<<<<<<<<<<<< * nn = xx + yy * d = sqrt(nn) - self.r1 */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":410 * y = y - self.length * yy = y * y * nn = xx + yy # <<<<<<<<<<<<<< * d = sqrt(nn) - self.r1 * else: */ __pyx_v_nn = (__pyx_v_xx + __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":411 * yy = y * y * nn = xx + yy * d = sqrt(nn) - self.r1 # <<<<<<<<<<<<<< * else: * rx = x * self.side2 - y * self.side1 */ __pyx_v_d = (sqrt(__pyx_v_nn) - __pyx_v_self->r1); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":407 * if ry < 0: * d = sqrt(nn) - self.r0 * elif ry > self.conelength: # <<<<<<<<<<<<<< * y = y - self.length * yy = y * y */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":413 * d = sqrt(nn) - self.r1 * else: * rx = x * self.side2 - y * self.side1 # <<<<<<<<<<<<<< * d = rx - self.r0 * */ /*else*/ { __pyx_v_rx = ((__pyx_v_x * __pyx_v_self->side2) - (__pyx_v_y * __pyx_v_self->side1)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":414 * else: * rx = x * self.side2 - y * self.side1 * d = rx - self.r0 # <<<<<<<<<<<<<< * * for clip in self.clips: */ __pyx_v_d = (__pyx_v_rx - __pyx_v_self->r0); } __pyx_L4:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":416 * d = rx - self.r0 * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":417 * * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) # <<<<<<<<<<<<<< * return d * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clip, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_14 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_14, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __pyx_v_d; __pyx_t_7 = PyFloat_FromDouble(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_13) { __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_d = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":416 * d = rx - self.r0 * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":418 * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) * return d # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":393 * * * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * cdef double nx, ny, nz, y, yy, xx, ry, rx, nn, x, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clip); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":422 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_x)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":423 * * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo # <<<<<<<<<<<<<< * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_xhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_xlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":422 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_x (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_x") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_12overlaps_x(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_12overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_x(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":424 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_y)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":425 * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo # <<<<<<<<<<<<<< * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_yhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_ylo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":424 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_y (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_y") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_14overlaps_y(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_14overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_y(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":426 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_z); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_z)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":427 * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo # <<<<<<<<<<<<<< * * */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_zhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_zlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":426 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_z (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_z") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_16overlaps_z(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_16overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_z(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SphereCone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":437 * cdef bint reversed * property xlo: * def __get__(self): return self._xlo # <<<<<<<<<<<<<< * property xhi: * def __get__(self): return self._xhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.xlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":439 * def __get__(self): return self._xlo * property xhi: * def __get__(self): return self._xhi # <<<<<<<<<<<<<< * property ylo: * def __get__(self): return self._ylo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.xhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":441 * def __get__(self): return self._xhi * property ylo: * def __get__(self): return self._ylo # <<<<<<<<<<<<<< * property yhi: * def __get__(self): return self._yhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ylo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.ylo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":443 * def __get__(self): return self._ylo * property yhi: * def __get__(self): return self._yhi # <<<<<<<<<<<<<< * property zlo: * def __get__(self): return self._zlo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_yhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.yhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":445 * def __get__(self): return self._yhi * property zlo: * def __get__(self): return self._zlo # <<<<<<<<<<<<<< * property zhi: * def __get__(self): return self._zhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.zlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":447 * def __get__(self): return self._zlo * property zhi: * def __get__(self): return self._zhi # <<<<<<<<<<<<<< * * def __repr__(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.zhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":449 * def __get__(self): return self._zhi * * def __repr__(self): # <<<<<<<<<<<<<< * cdef list order * if self.reversed: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_1__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_1__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone___repr__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone___repr__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_v_order = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":451 * def __repr__(self): * cdef list order * if self.reversed: # <<<<<<<<<<<<<< * order = [self.x1, self.y1, self.z1, self.r1, self.x0, self.y0, self.z0, self.r0] * else: */ __pyx_t_1 = (__pyx_v_self->reversed != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":452 * cdef list order * if self.reversed: * order = [self.x1, self.y1, self.z1, self.r1, self.x0, self.y0, self.z0, self.r0] # <<<<<<<<<<<<<< * else: * order = [self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1] */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->r1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->r0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyList_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_10, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_10, 5, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_10, 6, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_10, 7, __pyx_t_9); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_v_order = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":451 * def __repr__(self): * cdef list order * if self.reversed: # <<<<<<<<<<<<<< * order = [self.x1, self.y1, self.z1, self.r1, self.x0, self.y0, self.z0, self.r0] * else: */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":454 * order = [self.x1, self.y1, self.z1, self.r1, self.x0, self.y0, self.z0, self.r0] * else: * order = [self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1] # <<<<<<<<<<<<<< * if self.clips: * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)' % tuple(order + [self.clips]) */ /*else*/ { __pyx_t_10 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->r0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->r1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_2, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_2, 4, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_2, 6, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_2, 7, __pyx_t_3); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_v_order = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":455 * else: * order = [self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1] * if self.clips: # <<<<<<<<<<<<<< * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)' % tuple(order + [self.clips]) * else: */ __pyx_t_1 = (__pyx_v_self->clips != Py_None) && (PyList_GET_SIZE(__pyx_v_self->clips) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":456 * order = [self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1] * if self.clips: * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)' % tuple(order + [self.clips]) # <<<<<<<<<<<<<< * else: * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g)' % tuple(order) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->clips); __Pyx_GIVEREF(__pyx_v_self->clips); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->clips); __pyx_t_3 = PyNumber_Add(__pyx_v_order, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Cone_g_g_g_g_g_g_g_g_clips_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":455 * else: * order = [self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1] * if self.clips: # <<<<<<<<<<<<<< * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)' % tuple(order + [self.clips]) * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":458 * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)' % tuple(order + [self.clips]) * else: * return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g)' % tuple(order) # <<<<<<<<<<<<<< * * property _x0: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_AsTuple(__pyx_v_order); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Cone_g_g_g_g_g_g_g_g, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":449 * def __get__(self): return self._zhi * * def __repr__(self): # <<<<<<<<<<<<<< * cdef list order * if self.reversed: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_order); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":461 * * property _x0: * def __get__(self): # <<<<<<<<<<<<<< * return self.x1 if self.reversed else self.x0 * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":462 * property _x0: * def __get__(self): * return self.x1 if self.reversed else self.x0 # <<<<<<<<<<<<<< * * property _y0: */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":461 * * property _x0: * def __get__(self): # <<<<<<<<<<<<<< * return self.x1 if self.reversed else self.x0 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._x0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":465 * * property _y0: * def __get__(self): # <<<<<<<<<<<<<< * return self.y1 if self.reversed else self.y0 * property _z0: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":466 * property _y0: * def __get__(self): * return self.y1 if self.reversed else self.y0 # <<<<<<<<<<<<<< * property _z0: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":465 * * property _y0: * def __get__(self): # <<<<<<<<<<<<<< * return self.y1 if self.reversed else self.y0 * property _z0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._y0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":468 * return self.y1 if self.reversed else self.y0 * property _z0: * def __get__(self): # <<<<<<<<<<<<<< * return self.z1 if self.reversed else self.z0 * property _r0: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":469 * property _z0: * def __get__(self): * return self.z1 if self.reversed else self.z0 # <<<<<<<<<<<<<< * property _r0: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":468 * return self.y1 if self.reversed else self.y0 * property _z0: * def __get__(self): # <<<<<<<<<<<<<< * return self.z1 if self.reversed else self.z0 * property _r0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._z0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":471 * return self.z1 if self.reversed else self.z0 * property _r0: * def __get__(self): # <<<<<<<<<<<<<< * return self.r1 if self.reversed else self.r0 * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":472 * property _r0: * def __get__(self): * return self.r1 if self.reversed else self.r0 # <<<<<<<<<<<<<< * * property _x1: */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->r1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->r0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":471 * return self.z1 if self.reversed else self.z0 * property _r0: * def __get__(self): # <<<<<<<<<<<<<< * return self.r1 if self.reversed else self.r0 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._r0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":475 * * property _x1: * def __get__(self): # <<<<<<<<<<<<<< * return self.x0 if self.reversed else self.x1 * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":476 * property _x1: * def __get__(self): * return self.x0 if self.reversed else self.x1 # <<<<<<<<<<<<<< * * property _y1: */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":475 * * property _x1: * def __get__(self): # <<<<<<<<<<<<<< * return self.x0 if self.reversed else self.x1 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._x1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":479 * * property _y1: * def __get__(self): # <<<<<<<<<<<<<< * return self.y0 if self.reversed else self.y1 * property _z1: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":480 * property _y1: * def __get__(self): * return self.y0 if self.reversed else self.y1 # <<<<<<<<<<<<<< * property _z1: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":479 * * property _y1: * def __get__(self): # <<<<<<<<<<<<<< * return self.y0 if self.reversed else self.y1 * property _z1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._y1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":482 * return self.y0 if self.reversed else self.y1 * property _z1: * def __get__(self): # <<<<<<<<<<<<<< * return self.z0 if self.reversed else self.z1 * property _r1: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":483 * property _z1: * def __get__(self): * return self.z0 if self.reversed else self.z1 # <<<<<<<<<<<<<< * property _r1: * def __get__(self): */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":482 * return self.y0 if self.reversed else self.y1 * property _z1: * def __get__(self): # <<<<<<<<<<<<<< * return self.z0 if self.reversed else self.z1 * property _r1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._z1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":485 * return self.z0 if self.reversed else self.z1 * property _r1: * def __get__(self): # <<<<<<<<<<<<<< * return self.r0 if self.reversed else self.r1 * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":486 * property _r1: * def __get__(self): * return self.r0 if self.reversed else self.r1 # <<<<<<<<<<<<<< * * property axislength: */ __Pyx_XDECREF(__pyx_r); if ((__pyx_v_self->reversed != 0)) { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->r0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->r1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":485 * return self.z0 if self.reversed else self.z1 * property _r1: * def __get__(self): # <<<<<<<<<<<<<< * return self.r0 if self.reversed else self.r1 * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._r1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":489 * * property axislength: * def __get__(self): # <<<<<<<<<<<<<< * return self.length * property primitives: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":490 * property axislength: * def __get__(self): * return self.length # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return [self] */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":489 * * property axislength: * def __get__(self): # <<<<<<<<<<<<<< * return self.length * property primitives: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.axislength.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":492 * return self.length * property primitives: * def __get__(self): return [self] # <<<<<<<<<<<<<< * * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":495 * * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): # <<<<<<<<<<<<<< * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; double __pyx_v_r0; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; double __pyx_v_r1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x0,&__pyx_n_s_y0,&__pyx_n_s_z0,&__pyx_n_s_r0,&__pyx_n_s_x1,&__pyx_n_s_y1,&__pyx_n_s_z1,&__pyx_n_s_r1,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x0)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 8) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); } __pyx_v_x0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y0 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z0 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r0 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_r0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_x1 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_x1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y1 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_y1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z1 = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_z1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r1 = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_r1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_2__init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_r0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r1); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_2__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1) { double __pyx_v_axisx; double __pyx_v_axisy; double __pyx_v_axisz; double __pyx_v_length; double __pyx_v_f; double __pyx_v_rmax; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; double __pyx_t_2; double __pyx_t_3; double __pyx_t_4; double __pyx_t_5; double __pyx_t_6; double __pyx_t_7; double __pyx_t_8; double __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":496 * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): * if r1 > r0: # <<<<<<<<<<<<<< * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 * self.reversed = True */ __pyx_t_1 = ((__pyx_v_r1 > __pyx_v_r0) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":497 * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 # <<<<<<<<<<<<<< * self.reversed = True * else: */ __pyx_t_2 = __pyx_v_x1; __pyx_t_3 = __pyx_v_y1; __pyx_t_4 = __pyx_v_z1; __pyx_t_5 = __pyx_v_r1; __pyx_t_6 = __pyx_v_x0; __pyx_t_7 = __pyx_v_y0; __pyx_t_8 = __pyx_v_z0; __pyx_t_9 = __pyx_v_r0; __pyx_v_x0 = __pyx_t_2; __pyx_v_y0 = __pyx_t_3; __pyx_v_z0 = __pyx_t_4; __pyx_v_r0 = __pyx_t_5; __pyx_v_x1 = __pyx_t_6; __pyx_v_y1 = __pyx_t_7; __pyx_v_z1 = __pyx_t_8; __pyx_v_r1 = __pyx_t_9; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":498 * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 * self.reversed = True # <<<<<<<<<<<<<< * else: * self.reversed = False */ __pyx_v_self->reversed = 1; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":496 * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): * if r1 > r0: # <<<<<<<<<<<<<< * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 * self.reversed = True */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":500 * self.reversed = True * else: * self.reversed = False # <<<<<<<<<<<<<< * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 */ /*else*/ { __pyx_v_self->reversed = 0; } __pyx_L3:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":502 * self.reversed = False * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 # <<<<<<<<<<<<<< * * if r0 < 0: */ __pyx_t_9 = __pyx_v_x0; __pyx_t_8 = __pyx_v_y0; __pyx_t_7 = __pyx_v_z0; __pyx_t_6 = __pyx_v_r0; __pyx_t_5 = __pyx_v_x1; __pyx_t_4 = __pyx_v_y1; __pyx_t_3 = __pyx_v_z1; __pyx_t_2 = __pyx_v_r1; __pyx_v_self->x0 = __pyx_t_9; __pyx_v_self->y0 = __pyx_t_8; __pyx_v_self->z0 = __pyx_t_7; __pyx_v_self->r0 = __pyx_t_6; __pyx_v_self->x1 = __pyx_t_5; __pyx_v_self->y1 = __pyx_t_4; __pyx_v_self->z1 = __pyx_t_3; __pyx_v_self->r1 = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":504 * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 * * if r0 < 0: # <<<<<<<<<<<<<< * raise RxDException('At least one Cone radius must be positive') * if r1 < 0: */ __pyx_t_1 = ((__pyx_v_r0 < 0.0) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":505 * * if r0 < 0: * raise RxDException('At least one Cone radius must be positive') # <<<<<<<<<<<<<< * if r1 < 0: * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_RxDException); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":504 * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 * * if r0 < 0: # <<<<<<<<<<<<<< * raise RxDException('At least one Cone radius must be positive') * if r1 < 0: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":506 * if r0 < 0: * raise RxDException('At least one Cone radius must be positive') * if r1 < 0: # <<<<<<<<<<<<<< * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) * length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) */ __pyx_t_1 = ((__pyx_v_r1 < 0.0) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":507 * raise RxDException('At least one Cone radius must be positive') * if r1 < 0: * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) # <<<<<<<<<<<<<< * length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) * axisx /= length; axisy /= length; axisz /= length */ __pyx_t_2 = (__pyx_v_x1 - __pyx_v_x0); __pyx_t_3 = (__pyx_v_y1 - __pyx_v_y0); __pyx_t_4 = (__pyx_v_z1 - __pyx_v_z0); __pyx_v_axisx = __pyx_t_2; __pyx_v_axisy = __pyx_t_3; __pyx_v_axisz = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":508 * if r1 < 0: * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) * length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) # <<<<<<<<<<<<<< * axisx /= length; axisy /= length; axisz /= length * f = r1 / (r1 - r0) */ __pyx_v_length = sqrt(((pow(__pyx_v_axisx, 2.0) + pow(__pyx_v_axisy, 2.0)) + pow(__pyx_v_axisz, 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":509 * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) * length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) * axisx /= length; axisy /= length; axisz /= length # <<<<<<<<<<<<<< * f = r1 / (r1 - r0) * x1 -= f * axisx; y1 -= f * axisy; z1 -= f * axisz; r1 = 0 */ if (unlikely(__pyx_v_length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_axisx = (__pyx_v_axisx / __pyx_v_length); if (unlikely(__pyx_v_length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_axisy = (__pyx_v_axisy / __pyx_v_length); if (unlikely(__pyx_v_length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_axisz = (__pyx_v_axisz / __pyx_v_length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":510 * length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) * axisx /= length; axisy /= length; axisz /= length * f = r1 / (r1 - r0) # <<<<<<<<<<<<<< * x1 -= f * axisx; y1 -= f * axisy; z1 -= f * axisz; r1 = 0 * */ __pyx_t_4 = (__pyx_v_r1 - __pyx_v_r0); if (unlikely(__pyx_t_4 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_f = (__pyx_v_r1 / __pyx_t_4); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":511 * axisx /= length; axisy /= length; axisz /= length * f = r1 / (r1 - r0) * x1 -= f * axisx; y1 -= f * axisy; z1 -= f * axisz; r1 = 0 # <<<<<<<<<<<<<< * * self.rra, self.rrb = r0 * r0, r1 * r1 */ __pyx_v_x1 = (__pyx_v_x1 - (__pyx_v_f * __pyx_v_axisx)); __pyx_v_y1 = (__pyx_v_y1 - (__pyx_v_f * __pyx_v_axisy)); __pyx_v_z1 = (__pyx_v_z1 - (__pyx_v_f * __pyx_v_axisz)); __pyx_v_r1 = 0.0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":506 * if r0 < 0: * raise RxDException('At least one Cone radius must be positive') * if r1 < 0: # <<<<<<<<<<<<<< * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) * length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":513 * x1 -= f * axisx; y1 -= f * axisy; z1 -= f * axisz; r1 = 0 * * self.rra, self.rrb = r0 * r0, r1 * r1 # <<<<<<<<<<<<<< * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) */ __pyx_t_4 = (__pyx_v_r0 * __pyx_v_r0); __pyx_t_3 = (__pyx_v_r1 * __pyx_v_r1); __pyx_v_self->rra = __pyx_t_4; __pyx_v_self->rrb = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":514 * * self.rra, self.rrb = r0 * r0, r1 * r1 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) # <<<<<<<<<<<<<< * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) * # normalize the axis */ __pyx_t_3 = (__pyx_v_x1 - __pyx_v_x0); __pyx_t_4 = (__pyx_v_y1 - __pyx_v_y0); __pyx_t_2 = (__pyx_v_z1 - __pyx_v_z0); __pyx_v_self->axisx = __pyx_t_3; __pyx_v_self->axisy = __pyx_t_4; __pyx_v_self->axisz = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":515 * self.rra, self.rrb = r0 * r0, r1 * r1 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) # <<<<<<<<<<<<<< * # normalize the axis * self.axisx /= self.length */ __pyx_v_self->length = sqrt(((pow(__pyx_v_self->axisx, 2.0) + pow(__pyx_v_self->axisy, 2.0)) + pow(__pyx_v_self->axisz, 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":517 * self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) * # normalize the axis * self.axisx /= self.length # <<<<<<<<<<<<<< * self.axisy /= self.length * self.axisz /= self.length */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisx = (__pyx_v_self->axisx / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":518 * # normalize the axis * self.axisx /= self.length * self.axisy /= self.length # <<<<<<<<<<<<<< * self.axisz /= self.length * */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisy = (__pyx_v_self->axisy / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":519 * self.axisx /= self.length * self.axisy /= self.length * self.axisz /= self.length # <<<<<<<<<<<<<< * * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisz = (__pyx_v_self->axisz / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":521 * self.axisz /= self.length * * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) # <<<<<<<<<<<<<< * self.side1 = (r1 - r0) / self.conelength * self.side2 = self.length / self.conelength */ __pyx_v_self->conelength = sqrt((pow((__pyx_v_r1 - __pyx_v_r0), 2.0) + pow(__pyx_v_self->length, 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":522 * * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) * self.side1 = (r1 - r0) / self.conelength # <<<<<<<<<<<<<< * self.side2 = self.length / self.conelength * */ __pyx_t_2 = (__pyx_v_r1 - __pyx_v_r0); if (unlikely(__pyx_v_self->conelength == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->side1 = (__pyx_t_2 / __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":523 * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) * self.side1 = (r1 - r0) / self.conelength * self.side2 = self.length / self.conelength # <<<<<<<<<<<<<< * * cdef double rmax = max(r0, r1) */ if (unlikely(__pyx_v_self->conelength == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->side2 = (__pyx_v_self->length / __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":525 * self.side2 = self.length / self.conelength * * cdef double rmax = max(r0, r1) # <<<<<<<<<<<<<< * * self._xlo = min(x0 - rmax, x1 - rmax) */ __pyx_t_2 = __pyx_v_r1; __pyx_t_4 = __pyx_v_r0; if (((__pyx_t_2 > __pyx_t_4) != 0)) { __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } __pyx_v_rmax = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":527 * cdef double rmax = max(r0, r1) * * self._xlo = min(x0 - rmax, x1 - rmax) # <<<<<<<<<<<<<< * self._xhi = max(x0 + rmax, x1 + rmax) * self._ylo = min(y0 - rmax, y1 - rmax) */ __pyx_t_3 = (__pyx_v_x1 - __pyx_v_rmax); __pyx_t_2 = (__pyx_v_x0 - __pyx_v_rmax); if (((__pyx_t_3 < __pyx_t_2) != 0)) { __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_v_self->_xlo = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":528 * * self._xlo = min(x0 - rmax, x1 - rmax) * self._xhi = max(x0 + rmax, x1 + rmax) # <<<<<<<<<<<<<< * self._ylo = min(y0 - rmax, y1 - rmax) * self._yhi = max(y0 + rmax, y1 + rmax) */ __pyx_t_4 = (__pyx_v_x1 + __pyx_v_rmax); __pyx_t_3 = (__pyx_v_x0 + __pyx_v_rmax); if (((__pyx_t_4 > __pyx_t_3) != 0)) { __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } __pyx_v_self->_xhi = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":529 * self._xlo = min(x0 - rmax, x1 - rmax) * self._xhi = max(x0 + rmax, x1 + rmax) * self._ylo = min(y0 - rmax, y1 - rmax) # <<<<<<<<<<<<<< * self._yhi = max(y0 + rmax, y1 + rmax) * self._zlo = min(z0 - rmax, z1 - rmax) */ __pyx_t_2 = (__pyx_v_y1 - __pyx_v_rmax); __pyx_t_4 = (__pyx_v_y0 - __pyx_v_rmax); if (((__pyx_t_2 < __pyx_t_4) != 0)) { __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } __pyx_v_self->_ylo = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":530 * self._xhi = max(x0 + rmax, x1 + rmax) * self._ylo = min(y0 - rmax, y1 - rmax) * self._yhi = max(y0 + rmax, y1 + rmax) # <<<<<<<<<<<<<< * self._zlo = min(z0 - rmax, z1 - rmax) * self._zhi = max(z0 + rmax, z1 + rmax) */ __pyx_t_3 = (__pyx_v_y1 + __pyx_v_rmax); __pyx_t_2 = (__pyx_v_y0 + __pyx_v_rmax); if (((__pyx_t_3 > __pyx_t_2) != 0)) { __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } __pyx_v_self->_yhi = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":531 * self._ylo = min(y0 - rmax, y1 - rmax) * self._yhi = max(y0 + rmax, y1 + rmax) * self._zlo = min(z0 - rmax, z1 - rmax) # <<<<<<<<<<<<<< * self._zhi = max(z0 + rmax, z1 + rmax) * self.neighbors = [] */ __pyx_t_4 = (__pyx_v_z1 - __pyx_v_rmax); __pyx_t_3 = (__pyx_v_z0 - __pyx_v_rmax); if (((__pyx_t_4 < __pyx_t_3) != 0)) { __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_3; } __pyx_v_self->_zlo = __pyx_t_2; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":532 * self._yhi = max(y0 + rmax, y1 + rmax) * self._zlo = min(z0 - rmax, z1 - rmax) * self._zhi = max(z0 + rmax, z1 + rmax) # <<<<<<<<<<<<<< * self.neighbors = [] * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 */ __pyx_t_2 = (__pyx_v_z1 + __pyx_v_rmax); __pyx_t_4 = (__pyx_v_z0 + __pyx_v_rmax); if (((__pyx_t_2 > __pyx_t_4) != 0)) { __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } __pyx_v_self->_zhi = __pyx_t_3; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":533 * self._zlo = min(z0 - rmax, z1 - rmax) * self._zhi = max(z0 + rmax, z1 + rmax) * self.neighbors = [] # <<<<<<<<<<<<<< * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.h = self.length * .5 */ __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_GOTREF(__pyx_v_self->neighbors); __Pyx_DECREF(__pyx_v_self->neighbors); __pyx_v_self->neighbors = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":534 * self._zhi = max(z0 + rmax, z1 + rmax) * self.neighbors = [] * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 # <<<<<<<<<<<<<< * self.h = self.length * .5 * self.clips = [] */ __pyx_t_3 = ((__pyx_v_x0 + __pyx_v_x1) * 0.5); __pyx_t_2 = ((__pyx_v_y0 + __pyx_v_y1) * 0.5); __pyx_t_4 = ((__pyx_v_z0 + __pyx_v_z1) * 0.5); __pyx_v_self->cx = __pyx_t_3; __pyx_v_self->cy = __pyx_t_2; __pyx_v_self->cz = __pyx_t_4; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":535 * self.neighbors = [] * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.h = self.length * .5 # <<<<<<<<<<<<<< * self.clips = [] * self.neighbor_regions = [] */ __pyx_v_self->h = (__pyx_v_self->length * .5); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":536 * self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 * self.h = self.length * .5 * self.clips = [] # <<<<<<<<<<<<<< * self.neighbor_regions = [] * */ __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":537 * self.h = self.length * .5 * self.clips = [] * self.neighbor_regions = [] # <<<<<<<<<<<<<< * * def set_clip(self, clips): */ __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_GOTREF(__pyx_v_self->neighbor_regions); __Pyx_DECREF(__pyx_v_self->neighbor_regions); __pyx_v_self->neighbor_regions = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":495 * * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): # <<<<<<<<<<<<<< * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":539 * self.neighbor_regions = [] * * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * def get_clip(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_5set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_5set_clip(PyObject *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_4set_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), ((PyObject *)__pyx_v_clips)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_4set_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, PyObject *__pyx_v_clips) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":540 * * def set_clip(self, clips): * self.clips = clips # <<<<<<<<<<<<<< * def get_clip(self): * return self.clips */ if (!(likely(PyList_CheckExact(__pyx_v_clips))||((__pyx_v_clips) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_clips)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_clips; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->clips); __Pyx_DECREF(__pyx_v_self->clips); __pyx_v_self->clips = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":539 * self.neighbor_regions = [] * * def set_clip(self, clips): # <<<<<<<<<<<<<< * self.clips = clips * def get_clip(self): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":541 * def set_clip(self, clips): * self.clips = clips * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_7get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_7get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_6get_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_6get_clip(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":542 * self.clips = clips * def get_clip(self): * return self.clips # <<<<<<<<<<<<<< * * cpdef within_core(self, double px, double py, double pz): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->clips); __pyx_r = __pyx_v_self->clips; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":541 * def set_clip(self, clips): * self.clips = clips * def get_clip(self): # <<<<<<<<<<<<<< * return self.clips * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":544 * return self.clips * * cpdef within_core(self, double px, double py, double pz): # <<<<<<<<<<<<<< * cdef double nx, ny, nz, y * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_core(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("within_core", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_within_core); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_core)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":546 * cpdef within_core(self, double px, double py, double pz): * cdef double nx, ny, nz, y * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz # <<<<<<<<<<<<<< * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * return y < self.h */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->cx); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->cy); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->cz); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":547 * cdef double nx, ny, nz, y * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) # <<<<<<<<<<<<<< * return y < self.h * */ __pyx_v_y = fabs((((__pyx_v_self->axisx * __pyx_v_nx) + (__pyx_v_self->axisy * __pyx_v_ny)) + (__pyx_v_self->axisz * __pyx_v_nz))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":548 * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz * y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) * return y < self.h # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_y < __pyx_v_self->h)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":544 * return self.clips * * cpdef within_core(self, double px, double py, double pz): # <<<<<<<<<<<<<< * cdef double nx, ny, nz, y * nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.within_core", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_core(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_core(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("within_core (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("within_core", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("within_core", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "within_core") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("within_core", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.within_core", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_8within_core(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_8within_core(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("within_core", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_within_core(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.within_core", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":551 * * * def axis(self): # <<<<<<<<<<<<<< * if self.reversed: * return -self.axisx, -self.axisy, -self.axisz */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_11axis(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_11axis(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("axis (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axis(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axis(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("axis", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":552 * * def axis(self): * if self.reversed: # <<<<<<<<<<<<<< * return -self.axisx, -self.axisy, -self.axisz * else: */ __pyx_t_1 = (__pyx_v_self->reversed != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":553 * def axis(self): * if self.reversed: * return -self.axisx, -self.axisy, -self.axisz # <<<<<<<<<<<<<< * else: * return (self.axisx, self.axisy, self.axisz) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyFloat_FromDouble((-__pyx_v_self->axisx)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyFloat_FromDouble((-__pyx_v_self->axisy)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble((-__pyx_v_self->axisz)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":552 * * def axis(self): * if self.reversed: # <<<<<<<<<<<<<< * return -self.axisx, -self.axisy, -self.axisz * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":555 * return -self.axisx, -self.axisy, -self.axisz * else: * return (self.axisx, self.axisy, self.axisz) # <<<<<<<<<<<<<< * * def starting_points(self, xs, ys, zs): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->axisx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->axisy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->axisz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":551 * * * def axis(self): # <<<<<<<<<<<<<< * if self.reversed: * return -self.axisx, -self.axisy, -self.axisz */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.axis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":557 * return (self.axisx, self.axisy, self.axisz) * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_13starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_13starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_12starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_12starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":559 * def starting_points(self, xs, ys, zs): * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], # <<<<<<<<<<<<<< * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_zs); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":560 * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), # <<<<<<<<<<<<<< * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_3, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_3, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_3 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_3 = 1; } } __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":561 * return sum([c.starting_points(xs, ys, zs) for c in self.clips], * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) # <<<<<<<<<<<<<< * * cpdef double distance(self, double px, double py, double pz): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->x1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_3 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->y1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_3, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_3, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->z1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __pyx_t_3 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_3 = 1; } } __pyx_t_11 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_3, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_3, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":560 * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), # <<<<<<<<<<<<<< * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) * */ __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_9); __pyx_t_6 = 0; __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":559 * def starting_points(self, xs, ys, zs): * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], # <<<<<<<<<<<<<< * [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) */ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":557 * return (self.axisx, self.axisy, self.axisz) * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return sum([c.starting_points(xs, ys, zs) for c in self.clips], */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":563 * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) * * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * # CTNG:frustumdist * cdef double nx, ny, nz, y, yy, xx, ry, rx, d */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; double __pyx_v_yy; double __pyx_v_xx; double __pyx_v_ry; double __pyx_v_rx; double __pyx_v_d; double __pyx_v_x; PyObject *__pyx_v_clip = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":566 * # CTNG:frustumdist * cdef double nx, ny, nz, y, yy, xx, ry, rx, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 # <<<<<<<<<<<<<< * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->x0); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->y0); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->z0); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":567 * cdef double nx, ny, nz, y, yy, xx, ry, rx, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz # <<<<<<<<<<<<<< * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy */ __pyx_v_y = (((__pyx_v_nx * __pyx_v_self->axisx) + (__pyx_v_ny * __pyx_v_self->axisy)) + (__pyx_v_nz * __pyx_v_self->axisz)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":568 * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y # <<<<<<<<<<<<<< * xx = nx * nx + ny * ny + nz * nz - yy * # in principle, xx >= 0, however roundoff errors may cause trouble */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":569 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy # <<<<<<<<<<<<<< * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 */ __pyx_v_xx = ((((__pyx_v_nx * __pyx_v_nx) + (__pyx_v_ny * __pyx_v_ny)) + (__pyx_v_nz * __pyx_v_nz)) - __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":571 * xx = nx * nx + ny * ny + nz * nz - yy * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 # <<<<<<<<<<<<<< * * if y < 0: */ __pyx_t_13 = ((__pyx_v_xx < 0.0) != 0); if (__pyx_t_13) { __pyx_v_xx = 0.0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":573 * if xx < 0: xx = 0 * * if y < 0: # <<<<<<<<<<<<<< * # always nonnegative distance in this case * if xx < self.rra: */ __pyx_t_13 = ((__pyx_v_y < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":575 * if y < 0: * # always nonnegative distance in this case * if xx < self.rra: # <<<<<<<<<<<<<< * d = -y * else: */ __pyx_t_13 = ((__pyx_v_xx < __pyx_v_self->rra) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":576 * # always nonnegative distance in this case * if xx < self.rra: * d = -y # <<<<<<<<<<<<<< * else: * x = sqrt(xx) - self.r0 */ __pyx_v_d = (-__pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":575 * if y < 0: * # always nonnegative distance in this case * if xx < self.rra: # <<<<<<<<<<<<<< * d = -y * else: */ goto __pyx_L5; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":578 * d = -y * else: * x = sqrt(xx) - self.r0 # <<<<<<<<<<<<<< * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: */ /*else*/ { __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":579 * else: * x = sqrt(xx) - self.r0 * d = sqrt(x * x + yy) # <<<<<<<<<<<<<< * elif xx < self.rrb and y > self.length: * d = y - self.length */ __pyx_v_d = sqrt(((__pyx_v_x * __pyx_v_x) + __pyx_v_yy)); } __pyx_L5:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":573 * if xx < 0: xx = 0 * * if y < 0: # <<<<<<<<<<<<<< * # always nonnegative distance in this case * if xx < self.rra: */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":580 * x = sqrt(xx) - self.r0 * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: # <<<<<<<<<<<<<< * d = y - self.length * else: */ __pyx_t_14 = ((__pyx_v_xx < __pyx_v_self->rrb) != 0); if (__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L6_bool_binop_done; } __pyx_t_14 = ((__pyx_v_y > __pyx_v_self->length) != 0); __pyx_t_13 = __pyx_t_14; __pyx_L6_bool_binop_done:; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":581 * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: * d = y - self.length # <<<<<<<<<<<<<< * else: * x = sqrt(xx) - self.r0 */ __pyx_v_d = (__pyx_v_y - __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":580 * x = sqrt(xx) - self.r0 * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: # <<<<<<<<<<<<<< * d = y - self.length * else: */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":583 * d = y - self.length * else: * x = sqrt(xx) - self.r0 # <<<<<<<<<<<<<< * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 */ /*else*/ { __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":585 * x = sqrt(xx) - self.r0 * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 # <<<<<<<<<<<<<< * if ry < 0: * # if ry < 0 (and y > 0 from above), then outside the cone */ __pyx_v_ry = ((__pyx_v_x * __pyx_v_self->side1) + (__pyx_v_y * __pyx_v_self->side2)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":586 * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * # if ry < 0 (and y > 0 from above), then outside the cone * d = sqrt(x * x + yy) */ __pyx_t_13 = ((__pyx_v_ry < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":588 * if ry < 0: * # if ry < 0 (and y > 0 from above), then outside the cone * d = sqrt(x * x + yy) # <<<<<<<<<<<<<< * else: * rx = x * self.side2 - y * self.side1 */ __pyx_v_d = sqrt(((__pyx_v_x * __pyx_v_x) + __pyx_v_yy)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":586 * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * # if ry < 0 (and y > 0 from above), then outside the cone * d = sqrt(x * x + yy) */ goto __pyx_L8; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":590 * d = sqrt(x * x + yy) * else: * rx = x * self.side2 - y * self.side1 # <<<<<<<<<<<<<< * if ry > self.conelength and y > self.length: * ry -= self.conelength */ /*else*/ { __pyx_v_rx = ((__pyx_v_x * __pyx_v_self->side2) - (__pyx_v_y * __pyx_v_self->side1)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":591 * else: * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: # <<<<<<<<<<<<<< * ry -= self.conelength * d = sqrt(rx * rx + ry * ry) */ __pyx_t_14 = ((__pyx_v_ry > __pyx_v_self->conelength) != 0); if (__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L10_bool_binop_done; } __pyx_t_14 = ((__pyx_v_y > __pyx_v_self->length) != 0); __pyx_t_13 = __pyx_t_14; __pyx_L10_bool_binop_done:; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":592 * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: * ry -= self.conelength # <<<<<<<<<<<<<< * d = sqrt(rx * rx + ry * ry) * else: */ __pyx_v_ry = (__pyx_v_ry - __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":593 * if ry > self.conelength and y > self.length: * ry -= self.conelength * d = sqrt(rx * rx + ry * ry) # <<<<<<<<<<<<<< * else: * d = rx */ __pyx_v_d = sqrt(((__pyx_v_rx * __pyx_v_rx) + (__pyx_v_ry * __pyx_v_ry))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":591 * else: * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: # <<<<<<<<<<<<<< * ry -= self.conelength * d = sqrt(rx * rx + ry * ry) */ goto __pyx_L9; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":595 * d = sqrt(rx * rx + ry * ry) * else: * d = rx # <<<<<<<<<<<<<< * if d < 0: * # end faces could be closer than the cone itself */ /*else*/ { __pyx_v_d = __pyx_v_rx; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":596 * else: * d = rx * if d < 0: # <<<<<<<<<<<<<< * # end faces could be closer than the cone itself * d = max(rx, y - self.length) */ __pyx_t_13 = ((__pyx_v_d < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":598 * if d < 0: * # end faces could be closer than the cone itself * d = max(rx, y - self.length) # <<<<<<<<<<<<<< * * for clip in self.clips: */ __pyx_t_12 = (__pyx_v_y - __pyx_v_self->length); __pyx_t_11 = __pyx_v_rx; if (((__pyx_t_12 > __pyx_t_11) != 0)) { __pyx_t_10 = __pyx_t_12; } else { __pyx_t_10 = __pyx_t_11; } __pyx_v_d = __pyx_t_10; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":596 * else: * d = rx * if d < 0: # <<<<<<<<<<<<<< * # end faces could be closer than the cone itself * d = max(rx, y - self.length) */ } } __pyx_L9:; } __pyx_L8:; } __pyx_L4:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":600 * d = max(rx, y - self.length) * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":601 * * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) # <<<<<<<<<<<<<< * return d * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clip, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_15 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_15, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_15, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_15, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_v_d; __pyx_t_7 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_13) { __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_d = __pyx_t_10; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":600 * d = max(rx, y - self.length) * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":602 * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) * return d # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":563 * (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) * * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * # CTNG:frustumdist * cdef double nx, ny, nz, y, yy, xx, ry, rx, d */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clip); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_14distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_14distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":605 * * * cpdef double _distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * """returns the distance to the frustum, but not including the end plate * if inside (and including the end plate if outside)""" */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; double __pyx_v_yy; double __pyx_v_xx; double __pyx_v_ry; double __pyx_v_rx; double __pyx_v_d; double __pyx_v_x; PyObject *__pyx_v_clip = NULL; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":609 * if inside (and including the end plate if outside)""" * cdef double nx, ny, nz, y, yy, xx, ry, rx, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 # <<<<<<<<<<<<<< * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->x0); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->y0); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->z0); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":610 * cdef double nx, ny, nz, y, yy, xx, ry, rx, d * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz # <<<<<<<<<<<<<< * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy */ __pyx_v_y = (((__pyx_v_nx * __pyx_v_self->axisx) + (__pyx_v_ny * __pyx_v_self->axisy)) + (__pyx_v_nz * __pyx_v_self->axisz)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":611 * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y # <<<<<<<<<<<<<< * xx = nx * nx + ny * ny + nz * nz - yy * # in principle, xx >= 0, however roundoff errors may cause trouble */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":612 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy # <<<<<<<<<<<<<< * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 */ __pyx_v_xx = ((((__pyx_v_nx * __pyx_v_nx) + (__pyx_v_ny * __pyx_v_ny)) + (__pyx_v_nz * __pyx_v_nz)) - __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":614 * xx = nx * nx + ny * ny + nz * nz - yy * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 # <<<<<<<<<<<<<< * * if y < 0: */ __pyx_t_13 = ((__pyx_v_xx < 0.0) != 0); if (__pyx_t_13) { __pyx_v_xx = 0.0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":616 * if xx < 0: xx = 0 * * if y < 0: # <<<<<<<<<<<<<< * # always nonnegative distance in this case (i.e. outside) * if xx < self.rra: */ __pyx_t_13 = ((__pyx_v_y < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":618 * if y < 0: * # always nonnegative distance in this case (i.e. outside) * if xx < self.rra: # <<<<<<<<<<<<<< * d = -y * else: */ __pyx_t_13 = ((__pyx_v_xx < __pyx_v_self->rra) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":619 * # always nonnegative distance in this case (i.e. outside) * if xx < self.rra: * d = -y # <<<<<<<<<<<<<< * else: * x = sqrt(xx) - self.r0 */ __pyx_v_d = (-__pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":618 * if y < 0: * # always nonnegative distance in this case (i.e. outside) * if xx < self.rra: # <<<<<<<<<<<<<< * d = -y * else: */ goto __pyx_L5; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":621 * d = -y * else: * x = sqrt(xx) - self.r0 # <<<<<<<<<<<<<< * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: */ /*else*/ { __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":622 * else: * x = sqrt(xx) - self.r0 * d = sqrt(x * x + yy) # <<<<<<<<<<<<<< * elif xx < self.rrb and y > self.length: * # outside */ __pyx_v_d = sqrt(((__pyx_v_x * __pyx_v_x) + __pyx_v_yy)); } __pyx_L5:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":616 * if xx < 0: xx = 0 * * if y < 0: # <<<<<<<<<<<<<< * # always nonnegative distance in this case (i.e. outside) * if xx < self.rra: */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":623 * x = sqrt(xx) - self.r0 * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: # <<<<<<<<<<<<<< * # outside * d = y - self.length */ __pyx_t_14 = ((__pyx_v_xx < __pyx_v_self->rrb) != 0); if (__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L6_bool_binop_done; } __pyx_t_14 = ((__pyx_v_y > __pyx_v_self->length) != 0); __pyx_t_13 = __pyx_t_14; __pyx_L6_bool_binop_done:; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":625 * elif xx < self.rrb and y > self.length: * # outside * d = y - self.length # <<<<<<<<<<<<<< * else: * x = sqrt(xx) - self.r0 */ __pyx_v_d = (__pyx_v_y - __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":623 * x = sqrt(xx) - self.r0 * d = sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: # <<<<<<<<<<<<<< * # outside * d = y - self.length */ goto __pyx_L4; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":627 * d = y - self.length * else: * x = sqrt(xx) - self.r0 # <<<<<<<<<<<<<< * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 */ /*else*/ { __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":629 * x = sqrt(xx) - self.r0 * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 # <<<<<<<<<<<<<< * if ry < 0: * # if ry < 0 (and y > 0 from above), then outside the cone */ __pyx_v_ry = ((__pyx_v_x * __pyx_v_self->side1) + (__pyx_v_y * __pyx_v_self->side2)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":630 * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * # if ry < 0 (and y > 0 from above), then outside the cone * d = sqrt(x * x + yy) */ __pyx_t_13 = ((__pyx_v_ry < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":632 * if ry < 0: * # if ry < 0 (and y > 0 from above), then outside the cone * d = sqrt(x * x + yy) # <<<<<<<<<<<<<< * else: * rx = x * self.side2 - y * self.side1 */ __pyx_v_d = sqrt(((__pyx_v_x * __pyx_v_x) + __pyx_v_yy)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":630 * # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * # if ry < 0 (and y > 0 from above), then outside the cone * d = sqrt(x * x + yy) */ goto __pyx_L8; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":634 * d = sqrt(x * x + yy) * else: * rx = x * self.side2 - y * self.side1 # <<<<<<<<<<<<<< * if ry > self.conelength and y > self.length: * ry -= self.conelength */ /*else*/ { __pyx_v_rx = ((__pyx_v_x * __pyx_v_self->side2) - (__pyx_v_y * __pyx_v_self->side1)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":635 * else: * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: # <<<<<<<<<<<<<< * ry -= self.conelength * d = sqrt(rx * rx + ry * ry) */ __pyx_t_14 = ((__pyx_v_ry > __pyx_v_self->conelength) != 0); if (__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L10_bool_binop_done; } __pyx_t_14 = ((__pyx_v_y > __pyx_v_self->length) != 0); __pyx_t_13 = __pyx_t_14; __pyx_L10_bool_binop_done:; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":636 * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: * ry -= self.conelength # <<<<<<<<<<<<<< * d = sqrt(rx * rx + ry * ry) * else: */ __pyx_v_ry = (__pyx_v_ry - __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":637 * if ry > self.conelength and y > self.length: * ry -= self.conelength * d = sqrt(rx * rx + ry * ry) # <<<<<<<<<<<<<< * else: * d = rx */ __pyx_v_d = sqrt(((__pyx_v_rx * __pyx_v_rx) + (__pyx_v_ry * __pyx_v_ry))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":635 * else: * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: # <<<<<<<<<<<<<< * ry -= self.conelength * d = sqrt(rx * rx + ry * ry) */ goto __pyx_L9; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":639 * d = sqrt(rx * rx + ry * ry) * else: * d = rx # <<<<<<<<<<<<<< * # this is the part where we are ignoring the end faces * */ /*else*/ { __pyx_v_d = __pyx_v_rx; } __pyx_L9:; } __pyx_L8:; } __pyx_L4:; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":642 * # this is the part where we are ignoring the end faces * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ if (unlikely(__pyx_v_self->clips == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_self->clips; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":643 * * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) # <<<<<<<<<<<<<< * return d * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clip, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_15 = 1; } } __pyx_t_7 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_15, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_15, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_15, __pyx_t_4); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __pyx_v_d; __pyx_t_7 = PyFloat_FromDouble(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_13) { __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = __pyx_t_2; } else { __pyx_t_4 = PyFloat_FromDouble(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_d = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":642 * # this is the part where we are ignoring the end faces * * for clip in self.clips: # <<<<<<<<<<<<<< * d = max(d, clip.distance(px, py, pz)) * return d */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":644 * for clip in self.clips: * d = max(d, clip.distance(px, py, pz)) * return d # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_d; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":605 * * * cpdef double _distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * """returns the distance to the frustum, but not including the end plate * if inside (and including the end plate if outside)""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cone._distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clip); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance[] = "returns the distance to the frustum, but not including the end plate\n if inside (and including the end plate if outside)"; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone._distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":648 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_x)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":649 * * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo # <<<<<<<<<<<<<< * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_xhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_xlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":648 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_x (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_x") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_18overlaps_x(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_18overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_x(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":650 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_y)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":651 * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo # <<<<<<<<<<<<<< * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_yhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_ylo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":650 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_y (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_y") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_20overlaps_y(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_20overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_y(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":652 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_z); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_z)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":653 * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo # <<<<<<<<<<<<<< * * */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_zhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_zlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":652 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_z (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_z") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_22overlaps_z(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_22overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_z(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.Cone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":660 * cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, sx, sy, sz, planed * property xlo: * def __get__(self): return self._xlo # <<<<<<<<<<<<<< * property xhi: * def __get__(self): return self._xhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.xlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":662 * def __get__(self): return self._xlo * property xhi: * def __get__(self): return self._xhi # <<<<<<<<<<<<<< * property ylo: * def __get__(self): return self._ylo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_xhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.xhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":664 * def __get__(self): return self._xhi * property ylo: * def __get__(self): return self._ylo # <<<<<<<<<<<<<< * property yhi: * def __get__(self): return self._yhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ylo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.ylo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":666 * def __get__(self): return self._ylo * property yhi: * def __get__(self): return self._yhi # <<<<<<<<<<<<<< * property zlo: * def __get__(self): return self._zlo */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_yhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.yhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":668 * def __get__(self): return self._yhi * property zlo: * def __get__(self): return self._zlo # <<<<<<<<<<<<<< * property zhi: * def __get__(self): return self._zhi */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zlo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.zlo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":670 * def __get__(self): return self._zlo * property zhi: * def __get__(self): return self._zhi # <<<<<<<<<<<<<< * property primitives: * def __get__(self): return [self] */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_zhi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.zhi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":672 * def __get__(self): return self._zhi * property primitives: * def __get__(self): return [self] # <<<<<<<<<<<<<< * * def get_clip(self): */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives___get__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives___get__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.primitives.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":674 * def __get__(self): return [self] * * def get_clip(self): # <<<<<<<<<<<<<< * # TODO: change this if ever expand to allow clipping * return [] */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_1get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_1get_clip(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip (wrapper)", 0); __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_get_clip(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_get_clip(CYTHON_UNUSED struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_clip", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":676 * def get_clip(self): * # TODO: change this if ever expand to allow clipping * return [] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":674 * def __get__(self): return [self] * * def get_clip(self): # <<<<<<<<<<<<<< * # TODO: change this if ever expand to allow clipping * return [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.get_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":679 * * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1, double x2, double y2, double z2): # <<<<<<<<<<<<<< * """(x2, y2, z2) denotes point to skew (x1, y1, z1) to""" * */ /* Python wrapper */ static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__[] = "(x2, y2, z2) denotes point to skew (x1, y1, z1) to"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__; #endif static int __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; double __pyx_v_r0; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; double __pyx_v_r1; double __pyx_v_x2; double __pyx_v_y2; double __pyx_v_z2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x0,&__pyx_n_s_y0,&__pyx_n_s_z0,&__pyx_n_s_r0,&__pyx_n_s_x1,&__pyx_n_s_y1,&__pyx_n_s_z1,&__pyx_n_s_r1,&__pyx_n_s_x2,&__pyx_n_s_y2,&__pyx_n_s_z2,0}; PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x0)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r0)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 9: if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 10: if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_z2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, 10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 11) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); values[9] = PyTuple_GET_ITEM(__pyx_args, 9); values[10] = PyTuple_GET_ITEM(__pyx_args, 10); } __pyx_v_x0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y0 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z0 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r0 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_r0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_x1 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_x1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y1 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_y1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z1 = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_z1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_r1 = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_r1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_x2 = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_x2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_y2 = __pyx_PyFloat_AsDouble(values[9]); if (unlikely((__pyx_v_y2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_z2 = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_z2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self), __pyx_v_x0, __pyx_v_y0, __pyx_v_z0, __pyx_v_r0, __pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_r1, __pyx_v_x2, __pyx_v_y2, __pyx_v_z2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_x0, double __pyx_v_y0, double __pyx_v_z0, double __pyx_v_r0, double __pyx_v_x1, double __pyx_v_y1, double __pyx_v_z1, double __pyx_v_r1, double __pyx_v_x2, double __pyx_v_y2, double __pyx_v_z2) { double __pyx_v_rmax; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; double __pyx_t_2; double __pyx_t_3; double __pyx_t_4; double __pyx_t_5; double __pyx_t_6; double __pyx_t_7; double __pyx_t_8; double __pyx_t_9; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":683 * * * if r1 > r0: # <<<<<<<<<<<<<< * x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2 = x2, y2, z2, r1, x2 - (x1 - x0), y2 - (y1 - y0), z2 - (z1 - z0), r0, x0, y0, z0 * */ __pyx_t_1 = ((__pyx_v_r1 > __pyx_v_r0) != 0); if (__pyx_t_1) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":684 * * if r1 > r0: * x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2 = x2, y2, z2, r1, x2 - (x1 - x0), y2 - (y1 - y0), z2 - (z1 - z0), r0, x0, y0, z0 # <<<<<<<<<<<<<< * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 */ __pyx_t_2 = __pyx_v_x2; __pyx_t_3 = __pyx_v_y2; __pyx_t_4 = __pyx_v_z2; __pyx_t_5 = __pyx_v_r1; __pyx_t_6 = (__pyx_v_x2 - (__pyx_v_x1 - __pyx_v_x0)); __pyx_t_7 = (__pyx_v_y2 - (__pyx_v_y1 - __pyx_v_y0)); __pyx_t_8 = (__pyx_v_z2 - (__pyx_v_z1 - __pyx_v_z0)); __pyx_t_9 = __pyx_v_r0; __pyx_t_10 = __pyx_v_x0; __pyx_t_11 = __pyx_v_y0; __pyx_t_12 = __pyx_v_z0; __pyx_v_x0 = __pyx_t_2; __pyx_v_y0 = __pyx_t_3; __pyx_v_z0 = __pyx_t_4; __pyx_v_r0 = __pyx_t_5; __pyx_v_x1 = __pyx_t_6; __pyx_v_y1 = __pyx_t_7; __pyx_v_z1 = __pyx_t_8; __pyx_v_r1 = __pyx_t_9; __pyx_v_x2 = __pyx_t_10; __pyx_v_y2 = __pyx_t_11; __pyx_v_z2 = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":683 * * * if r1 > r0: # <<<<<<<<<<<<<< * x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2 = x2, y2, z2, r1, x2 - (x1 - x0), y2 - (y1 - y0), z2 - (z1 - z0), r0, x0, y0, z0 * */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":686 * x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2 = x2, y2, z2, r1, x2 - (x1 - x0), y2 - (y1 - y0), z2 - (z1 - z0), r0, x0, y0, z0 * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 # <<<<<<<<<<<<<< * self.rra, self.rrb = r0 * r0, r1 * r1 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) */ __pyx_t_12 = __pyx_v_x0; __pyx_t_11 = __pyx_v_y0; __pyx_t_10 = __pyx_v_z0; __pyx_t_9 = __pyx_v_r0; __pyx_t_8 = __pyx_v_x1; __pyx_t_7 = __pyx_v_y1; __pyx_t_6 = __pyx_v_z1; __pyx_t_5 = __pyx_v_r1; __pyx_v_self->x0 = __pyx_t_12; __pyx_v_self->y0 = __pyx_t_11; __pyx_v_self->z0 = __pyx_t_10; __pyx_v_self->r0 = __pyx_t_9; __pyx_v_self->x1 = __pyx_t_8; __pyx_v_self->y1 = __pyx_t_7; __pyx_v_self->z1 = __pyx_t_6; __pyx_v_self->r1 = __pyx_t_5; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":687 * * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 * self.rra, self.rrb = r0 * r0, r1 * r1 # <<<<<<<<<<<<<< * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * */ __pyx_t_5 = (__pyx_v_r0 * __pyx_v_r0); __pyx_t_6 = (__pyx_v_r1 * __pyx_v_r1); __pyx_v_self->rra = __pyx_t_5; __pyx_v_self->rrb = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":688 * self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 * self.rra, self.rrb = r0 * r0, r1 * r1 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) # <<<<<<<<<<<<<< * * self.length = sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2 + (z1 - z0) ** 2) */ __pyx_t_6 = (__pyx_v_x1 - __pyx_v_x0); __pyx_t_5 = (__pyx_v_y1 - __pyx_v_y0); __pyx_t_7 = (__pyx_v_z1 - __pyx_v_z0); __pyx_v_self->axisx = __pyx_t_6; __pyx_v_self->axisy = __pyx_t_5; __pyx_v_self->axisz = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":690 * self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) * * self.length = sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2 + (z1 - z0) ** 2) # <<<<<<<<<<<<<< * # skew data * self.sx = (x2 - x1) / self.length */ __pyx_v_self->length = sqrt(((pow((__pyx_v_x1 - __pyx_v_x0), 2.0) + pow((__pyx_v_y1 - __pyx_v_y0), 2.0)) + pow((__pyx_v_z1 - __pyx_v_z0), 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":692 * self.length = sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2 + (z1 - z0) ** 2) * # skew data * self.sx = (x2 - x1) / self.length # <<<<<<<<<<<<<< * self.sy = (y2 - y1) / self.length * self.sz = (z2 - z1) / self.length */ __pyx_t_7 = (__pyx_v_x2 - __pyx_v_x1); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->sx = (__pyx_t_7 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":693 * # skew data * self.sx = (x2 - x1) / self.length * self.sy = (y2 - y1) / self.length # <<<<<<<<<<<<<< * self.sz = (z2 - z1) / self.length * */ __pyx_t_7 = (__pyx_v_y2 - __pyx_v_y1); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->sy = (__pyx_t_7 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":694 * self.sx = (x2 - x1) / self.length * self.sy = (y2 - y1) / self.length * self.sz = (z2 - z1) / self.length # <<<<<<<<<<<<<< * * # normalize the axis */ __pyx_t_7 = (__pyx_v_z2 - __pyx_v_z1); if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->sz = (__pyx_t_7 / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":697 * * # normalize the axis * self.axisx /= self.length # <<<<<<<<<<<<<< * self.axisy /= self.length * self.axisz /= self.length */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisx = (__pyx_v_self->axisx / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":698 * # normalize the axis * self.axisx /= self.length * self.axisy /= self.length # <<<<<<<<<<<<<< * self.axisz /= self.length * */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisy = (__pyx_v_self->axisy / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":699 * self.axisx /= self.length * self.axisy /= self.length * self.axisz /= self.length # <<<<<<<<<<<<<< * * self.planed = - (self.axisx * x0 + self.axisy * y0 + self.axisz * z0) */ if (unlikely(__pyx_v_self->length == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->axisz = (__pyx_v_self->axisz / __pyx_v_self->length); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":701 * self.axisz /= self.length * * self.planed = - (self.axisx * x0 + self.axisy * y0 + self.axisz * z0) # <<<<<<<<<<<<<< * * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) */ __pyx_v_self->planed = (-(((__pyx_v_self->axisx * __pyx_v_x0) + (__pyx_v_self->axisy * __pyx_v_y0)) + (__pyx_v_self->axisz * __pyx_v_z0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":703 * self.planed = - (self.axisx * x0 + self.axisy * y0 + self.axisz * z0) * * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) # <<<<<<<<<<<<<< * self.side1 = (r1 - r0) / self.conelength * self.side2 = self.length / self.conelength */ __pyx_v_self->conelength = sqrt((pow((__pyx_v_r1 - __pyx_v_r0), 2.0) + pow(__pyx_v_self->length, 2.0))); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":704 * * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) * self.side1 = (r1 - r0) / self.conelength # <<<<<<<<<<<<<< * self.side2 = self.length / self.conelength * cdef double rmax = max(r0, r1) */ __pyx_t_7 = (__pyx_v_r1 - __pyx_v_r0); if (unlikely(__pyx_v_self->conelength == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->side1 = (__pyx_t_7 / __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":705 * self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) * self.side1 = (r1 - r0) / self.conelength * self.side2 = self.length / self.conelength # <<<<<<<<<<<<<< * cdef double rmax = max(r0, r1) * */ if (unlikely(__pyx_v_self->conelength == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->side2 = (__pyx_v_self->length / __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":706 * self.side1 = (r1 - r0) / self.conelength * self.side2 = self.length / self.conelength * cdef double rmax = max(r0, r1) # <<<<<<<<<<<<<< * * self._xlo = min(x0 - rmax, x2 - rmax) */ __pyx_t_7 = __pyx_v_r1; __pyx_t_5 = __pyx_v_r0; if (((__pyx_t_7 > __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_rmax = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":708 * cdef double rmax = max(r0, r1) * * self._xlo = min(x0 - rmax, x2 - rmax) # <<<<<<<<<<<<<< * self._xhi = max(x0 + rmax, x2 + rmax) * self._ylo = min(y0 - rmax, y2 - rmax) */ __pyx_t_6 = (__pyx_v_x2 - __pyx_v_rmax); __pyx_t_7 = (__pyx_v_x0 - __pyx_v_rmax); if (((__pyx_t_6 < __pyx_t_7) != 0)) { __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_7; } __pyx_v_self->_xlo = __pyx_t_5; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":709 * * self._xlo = min(x0 - rmax, x2 - rmax) * self._xhi = max(x0 + rmax, x2 + rmax) # <<<<<<<<<<<<<< * self._ylo = min(y0 - rmax, y2 - rmax) * self._yhi = max(y0 + rmax, y2 + rmax) */ __pyx_t_5 = (__pyx_v_x2 + __pyx_v_rmax); __pyx_t_6 = (__pyx_v_x0 + __pyx_v_rmax); if (((__pyx_t_5 > __pyx_t_6) != 0)) { __pyx_t_7 = __pyx_t_5; } else { __pyx_t_7 = __pyx_t_6; } __pyx_v_self->_xhi = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":710 * self._xlo = min(x0 - rmax, x2 - rmax) * self._xhi = max(x0 + rmax, x2 + rmax) * self._ylo = min(y0 - rmax, y2 - rmax) # <<<<<<<<<<<<<< * self._yhi = max(y0 + rmax, y2 + rmax) * self._zlo = min(z0 - rmax, z2 - rmax) */ __pyx_t_7 = (__pyx_v_y2 - __pyx_v_rmax); __pyx_t_5 = (__pyx_v_y0 - __pyx_v_rmax); if (((__pyx_t_7 < __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_self->_ylo = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":711 * self._xhi = max(x0 + rmax, x2 + rmax) * self._ylo = min(y0 - rmax, y2 - rmax) * self._yhi = max(y0 + rmax, y2 + rmax) # <<<<<<<<<<<<<< * self._zlo = min(z0 - rmax, z2 - rmax) * self._zhi = max(z0 + rmax, z2 + rmax) */ __pyx_t_6 = (__pyx_v_y2 + __pyx_v_rmax); __pyx_t_7 = (__pyx_v_y0 + __pyx_v_rmax); if (((__pyx_t_6 > __pyx_t_7) != 0)) { __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = __pyx_t_7; } __pyx_v_self->_yhi = __pyx_t_5; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":712 * self._ylo = min(y0 - rmax, y2 - rmax) * self._yhi = max(y0 + rmax, y2 + rmax) * self._zlo = min(z0 - rmax, z2 - rmax) # <<<<<<<<<<<<<< * self._zhi = max(z0 + rmax, z2 + rmax) * */ __pyx_t_5 = (__pyx_v_z2 - __pyx_v_rmax); __pyx_t_6 = (__pyx_v_z0 - __pyx_v_rmax); if (((__pyx_t_5 < __pyx_t_6) != 0)) { __pyx_t_7 = __pyx_t_5; } else { __pyx_t_7 = __pyx_t_6; } __pyx_v_self->_zlo = __pyx_t_7; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":713 * self._yhi = max(y0 + rmax, y2 + rmax) * self._zlo = min(z0 - rmax, z2 - rmax) * self._zhi = max(z0 + rmax, z2 + rmax) # <<<<<<<<<<<<<< * * */ __pyx_t_7 = (__pyx_v_z2 + __pyx_v_rmax); __pyx_t_5 = (__pyx_v_z0 + __pyx_v_rmax); if (((__pyx_t_7 > __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_7; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_self->_zhi = __pyx_t_6; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":679 * * * def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1, double x2, double y2, double z2): # <<<<<<<<<<<<<< * """(x2, y2, z2) denotes point to skew (x1, y1, z1) to""" * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":717 * * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0))] */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_5starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_5starting_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("starting_points (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "starting_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_xs = values[0]; __pyx_v_ys = values[1]; __pyx_v_zs = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("starting_points", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_4starting_points(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self), __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_4starting_points(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("starting_points", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":719 * def starting_points(self, xs, ys, zs): * # TODO: this only works right if the entire object is inside the domain * return [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0))] # <<<<<<<<<<<<<< * #return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0))]) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->x0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->y0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->z0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_5 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":717 * * * def starting_points(self, xs, ys, zs): # <<<<<<<<<<<<<< * # TODO: this only works right if the entire object is inside the domain * return [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0))] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.starting_points", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":723 * * # TODO: allow clipping? * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * # CTNG:shearfrustdist * cdef double nx, ny, nz, y, yy, xx, ry, rx, dist */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz, int __pyx_skip_dispatch) { double __pyx_v_nx; double __pyx_v_ny; double __pyx_v_nz; double __pyx_v_y; double __pyx_v_yy; double __pyx_v_xx; double __pyx_v_ry; double __pyx_v_rx; double __pyx_v_dist; double __pyx_v_x; double __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; double __pyx_t_10; double __pyx_t_11; double __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distance)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_py); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pz); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_10; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":728 * * # compute signed distance of point to plane (note: axis vector has length 1) * dist = px * self.axisx + py * self.axisy + pz * self.axisz + self.planed # <<<<<<<<<<<<<< * * # deskew */ __pyx_v_dist = ((((__pyx_v_px * __pyx_v_self->axisx) + (__pyx_v_py * __pyx_v_self->axisy)) + (__pyx_v_pz * __pyx_v_self->axisz)) + __pyx_v_self->planed); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":731 * * # deskew * px -= dist * self.sx # <<<<<<<<<<<<<< * py -= dist * self.sy * pz -= dist * self.sz */ __pyx_v_px = (__pyx_v_px - (__pyx_v_dist * __pyx_v_self->sx)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":732 * # deskew * px -= dist * self.sx * py -= dist * self.sy # <<<<<<<<<<<<<< * pz -= dist * self.sz * */ __pyx_v_py = (__pyx_v_py - (__pyx_v_dist * __pyx_v_self->sy)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":733 * px -= dist * self.sx * py -= dist * self.sy * pz -= dist * self.sz # <<<<<<<<<<<<<< * * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 */ __pyx_v_pz = (__pyx_v_pz - (__pyx_v_dist * __pyx_v_self->sz)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":735 * pz -= dist * self.sz * * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 # <<<<<<<<<<<<<< * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y */ __pyx_t_10 = (__pyx_v_px - __pyx_v_self->x0); __pyx_t_11 = (__pyx_v_py - __pyx_v_self->y0); __pyx_t_12 = (__pyx_v_pz - __pyx_v_self->z0); __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_11; __pyx_v_nz = __pyx_t_12; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":736 * * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz # <<<<<<<<<<<<<< * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy */ __pyx_v_y = (((__pyx_v_nx * __pyx_v_self->axisx) + (__pyx_v_ny * __pyx_v_self->axisy)) + (__pyx_v_nz * __pyx_v_self->axisz)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":737 * nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y # <<<<<<<<<<<<<< * xx = nx * nx + ny * ny + nz * nz - yy * # in principle, xx >= 0, however roundoff errors may cause trouble */ __pyx_v_yy = (__pyx_v_y * __pyx_v_y); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":738 * y = nx * self.axisx + ny * self.axisy + nz * self.axisz * yy = y * y * xx = nx * nx + ny * ny + nz * nz - yy # <<<<<<<<<<<<<< * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 */ __pyx_v_xx = ((((__pyx_v_nx * __pyx_v_nx) + (__pyx_v_ny * __pyx_v_ny)) + (__pyx_v_nz * __pyx_v_nz)) - __pyx_v_yy); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":740 * xx = nx * nx + ny * ny + nz * nz - yy * # in principle, xx >= 0, however roundoff errors may cause trouble * if xx < 0: xx = 0 # <<<<<<<<<<<<<< * * if y < 0: */ __pyx_t_13 = ((__pyx_v_xx < 0.0) != 0); if (__pyx_t_13) { __pyx_v_xx = 0.0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":742 * if xx < 0: xx = 0 * * if y < 0: # <<<<<<<<<<<<<< * if xx < self.rra: * return -y */ __pyx_t_13 = ((__pyx_v_y < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":743 * * if y < 0: * if xx < self.rra: # <<<<<<<<<<<<<< * return -y * else: */ __pyx_t_13 = ((__pyx_v_xx < __pyx_v_self->rra) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":744 * if y < 0: * if xx < self.rra: * return -y # <<<<<<<<<<<<<< * else: * x = sqrt(xx) - self.r0 */ __pyx_r = (-__pyx_v_y); goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":743 * * if y < 0: * if xx < self.rra: # <<<<<<<<<<<<<< * return -y * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":746 * return -y * else: * x = sqrt(xx) - self.r0 # <<<<<<<<<<<<<< * return sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: */ /*else*/ { __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":747 * else: * x = sqrt(xx) - self.r0 * return sqrt(x * x + yy) # <<<<<<<<<<<<<< * elif xx < self.rrb and y > self.length: * return y - self.length */ __pyx_r = sqrt(((__pyx_v_x * __pyx_v_x) + __pyx_v_yy)); goto __pyx_L0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":742 * if xx < 0: xx = 0 * * if y < 0: # <<<<<<<<<<<<<< * if xx < self.rra: * return -y */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":748 * x = sqrt(xx) - self.r0 * return sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: # <<<<<<<<<<<<<< * return y - self.length * else: */ __pyx_t_14 = ((__pyx_v_xx < __pyx_v_self->rrb) != 0); if (__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L6_bool_binop_done; } __pyx_t_14 = ((__pyx_v_y > __pyx_v_self->length) != 0); __pyx_t_13 = __pyx_t_14; __pyx_L6_bool_binop_done:; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":749 * return sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: * return y - self.length # <<<<<<<<<<<<<< * else: * x = sqrt(xx) - self.r0 */ __pyx_r = (__pyx_v_y - __pyx_v_self->length); goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":748 * x = sqrt(xx) - self.r0 * return sqrt(x * x + yy) * elif xx < self.rrb and y > self.length: # <<<<<<<<<<<<<< * return y - self.length * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":751 * return y - self.length * else: * x = sqrt(xx) - self.r0 # <<<<<<<<<<<<<< * ry = x * self.side1 + y * self.side2 * if ry < 0: */ /*else*/ { __pyx_v_x = (sqrt(__pyx_v_xx) - __pyx_v_self->r0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":752 * else: * x = sqrt(xx) - self.r0 * ry = x * self.side1 + y * self.side2 # <<<<<<<<<<<<<< * if ry < 0: * return sqrt(x * x + yy) */ __pyx_v_ry = ((__pyx_v_x * __pyx_v_self->side1) + (__pyx_v_y * __pyx_v_self->side2)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":753 * x = sqrt(xx) - self.r0 * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * return sqrt(x * x + yy) * else: */ __pyx_t_13 = ((__pyx_v_ry < 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":754 * ry = x * self.side1 + y * self.side2 * if ry < 0: * return sqrt(x * x + yy) # <<<<<<<<<<<<<< * else: * rx = x * self.side2 - y * self.side1 */ __pyx_r = sqrt(((__pyx_v_x * __pyx_v_x) + __pyx_v_yy)); goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":753 * x = sqrt(xx) - self.r0 * ry = x * self.side1 + y * self.side2 * if ry < 0: # <<<<<<<<<<<<<< * return sqrt(x * x + yy) * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":756 * return sqrt(x * x + yy) * else: * rx = x * self.side2 - y * self.side1 # <<<<<<<<<<<<<< * if ry > self.conelength and y > self.length: * ry -= self.conelength */ /*else*/ { __pyx_v_rx = ((__pyx_v_x * __pyx_v_self->side2) - (__pyx_v_y * __pyx_v_self->side1)); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":757 * else: * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: # <<<<<<<<<<<<<< * ry -= self.conelength * return sqrt(rx * rx + ry * ry) */ __pyx_t_14 = ((__pyx_v_ry > __pyx_v_self->conelength) != 0); if (__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L10_bool_binop_done; } __pyx_t_14 = ((__pyx_v_y > __pyx_v_self->length) != 0); __pyx_t_13 = __pyx_t_14; __pyx_L10_bool_binop_done:; if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":758 * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: * ry -= self.conelength # <<<<<<<<<<<<<< * return sqrt(rx * rx + ry * ry) * else: */ __pyx_v_ry = (__pyx_v_ry - __pyx_v_self->conelength); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":759 * if ry > self.conelength and y > self.length: * ry -= self.conelength * return sqrt(rx * rx + ry * ry) # <<<<<<<<<<<<<< * else: * if rx >= 0: */ __pyx_r = sqrt(((__pyx_v_rx * __pyx_v_rx) + (__pyx_v_ry * __pyx_v_ry))); goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":757 * else: * rx = x * self.side2 - y * self.side1 * if ry > self.conelength and y > self.length: # <<<<<<<<<<<<<< * ry -= self.conelength * return sqrt(rx * rx + ry * ry) */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":761 * return sqrt(rx * rx + ry * ry) * else: * if rx >= 0: # <<<<<<<<<<<<<< * return rx * else: */ /*else*/ { __pyx_t_13 = ((__pyx_v_rx >= 0.0) != 0); if (__pyx_t_13) { /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":762 * else: * if rx >= 0: * return rx # <<<<<<<<<<<<<< * else: * return max(rx, y - self.length) */ __pyx_r = __pyx_v_rx; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":761 * return sqrt(rx * rx + ry * ry) * else: * if rx >= 0: # <<<<<<<<<<<<<< * return rx * else: */ } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":764 * return rx * else: * return max(rx, y - self.length) # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_t_12 = (__pyx_v_y - __pyx_v_self->length); __pyx_t_11 = __pyx_v_rx; if (((__pyx_t_12 > __pyx_t_11) != 0)) { __pyx_t_10 = __pyx_t_12; } else { __pyx_t_10 = __pyx_t_11; } __pyx_r = __pyx_t_10; goto __pyx_L0; } } } } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":723 * * # TODO: allow clipping? * cpdef double distance(self, double px, double py, double pz): # <<<<<<<<<<<<<< * # CTNG:shearfrustdist * cdef double nx, ny, nz, y, yy, xx, ry, rx, dist */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_px; double __pyx_v_py; double __pyx_v_pz; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_px = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_px == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_py = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_py == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_pz = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_pz == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_6distance(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self), __pyx_v_px, __pyx_v_py, __pyx_v_pz); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_6distance(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_px, double __pyx_v_py, double __pyx_v_pz) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_distance(__pyx_v_self, __pyx_v_px, __pyx_v_py, __pyx_v_pz, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":768 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_x)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":769 * * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo # <<<<<<<<<<<<<< * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_xhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_xlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":768 * * * cpdef bint overlaps_x(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_x(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_x (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_x") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_8overlaps_x(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_8overlaps_x(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_x", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_x(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_x", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":770 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_y)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":771 * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo # <<<<<<<<<<<<<< * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_yhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_ylo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":770 * cpdef bint overlaps_x(self, double lo, double hi): * return lo <= self._xhi and hi >= self._xlo * cpdef bint overlaps_y(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_y(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_y (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_y") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10overlaps_y(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10overlaps_y(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_y", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_y(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_y", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":772 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi, int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps_z); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_z)) { __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hi); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":773 * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): * return lo <= self._zhi and hi >= self._zlo # <<<<<<<<<<<<<< * */ __pyx_t_10 = ((__pyx_v_lo <= __pyx_v_self->_zhi) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = ((__pyx_v_hi >= __pyx_v_self->_zlo) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_9; goto __pyx_L0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":772 * cpdef bint overlaps_y(self, double lo, double hi): * return lo <= self._yhi and hi >= self._ylo * cpdef bint overlaps_z(self, double lo, double hi): # <<<<<<<<<<<<<< * return lo <= self._zhi and hi >= self._zlo * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_z(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lo; double __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps_z (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlaps_z") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lo = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lo == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_hi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("overlaps_z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_12overlaps_z(((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)__pyx_v_self), __pyx_v_lo, __pyx_v_hi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_12overlaps_z(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *__pyx_v_self, double __pyx_v_lo, double __pyx_v_hi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps_z", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_z(__pyx_v_self, __pyx_v_lo, __pyx_v_hi, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.graphicsPrimitives.SkewCone.overlaps_z", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement[] = { {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_5distance, METH_VARARGS|METH_KEYWORDS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_7starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement[] = { {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Complement", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union; p->objects = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->objects); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)o; if (p->objects) { e = (*v)(p->objects, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *)o; tmp = ((PyObject*)p->objects); p->objects = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union[] = { {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distance, METH_VARARGS|METH_KEYWORDS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union[] = { {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Union", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection; p->objects = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->objects); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)o; if (p->objects) { e = (*v)(p->objects, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *)o; tmp = ((PyObject*)p->objects); p->objects = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection[] = { {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distance, METH_VARARGS|METH_KEYWORDS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection[] = { {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Intersection", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane; return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane[] = { {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distance, METH_VARARGS|METH_KEYWORDS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane[] = { {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Plane", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere; p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->clips); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)o; if (p->clips) { e = (*v)(p->clips, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *)o; tmp = ((PyObject*)p->clips); p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_ylo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_yhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere[] = { {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distance, METH_VARARGS|METH_KEYWORDS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_7starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_x", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_x, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_y", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_y, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_z", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_z, METH_VARARGS|METH_KEYWORDS, 0}, {"set_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_15set_clip, METH_O, 0}, {"get_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_17get_clip, METH_NOARGS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere[] = { {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_primitives, 0, 0, 0}, {(char *)"xlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xlo, 0, 0, 0}, {(char *)"xhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xhi, 0, 0, 0}, {(char *)"ylo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_ylo, 0, 0, 0}, {(char *)"yhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_yhi, 0, 0, 0}, {(char *)"zlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zlo, 0, 0, 0}, {(char *)"zhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zhi, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Sphere", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder; p->neighbors = ((PyObject*)Py_None); Py_INCREF(Py_None); p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); p->neighbor_regions = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->neighbors); Py_CLEAR(p->clips); Py_CLEAR(p->neighbor_regions); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)o; if (p->neighbors) { e = (*v)(p->neighbors, a); if (e) return e; } if (p->clips) { e = (*v)(p->clips, a); if (e) return e; } if (p->neighbor_regions) { e = (*v)(p->neighbor_regions, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *)o; tmp = ((PyObject*)p->neighbors); p->neighbors = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->clips); p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->neighbor_regions); p->neighbor_regions = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_ylo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_yhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_axislength(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder[] = { {"get_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_5get_clip, METH_NOARGS, 0}, {"set_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_7set_clip, METH_O, 0}, {"axis", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_9axis, METH_NOARGS, 0}, {"set_neighbors", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_11set_neighbors, METH_VARARGS|METH_KEYWORDS, 0}, {"within_core", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_core, METH_VARARGS|METH_KEYWORDS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_15starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distance, METH_VARARGS|METH_KEYWORDS, 0}, {"_distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance}, {"overlaps_x", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_x, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_y", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_y, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_z", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_z, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder[] = { {(char *)"xlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xlo, 0, 0, 0}, {(char *)"xhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xhi, 0, 0, 0}, {(char *)"ylo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_ylo, 0, 0, 0}, {(char *)"yhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_yhi, 0, 0, 0}, {(char *)"zlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zlo, 0, 0, 0}, {(char *)"zhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zhi, 0, 0, 0}, {(char *)"axislength", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_axislength, 0, 0, 0}, {(char *)"_x0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x0, 0, 0, 0}, {(char *)"_y0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y0, 0, 0, 0}, {(char *)"_z0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z0, 0, 0, 0}, {(char *)"_r0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r0, 0, 0, 0}, {(char *)"_x1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x1, 0, 0, 0}, {(char *)"_y1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y1, 0, 0, 0}, {(char *)"_z1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z1, 0, 0, 0}, {(char *)"_r1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r1, 0, 0, 0}, {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Cylinder", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_1__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone; p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->clips); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)o; if (p->clips) { e = (*v)(p->clips, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *)o; tmp = ((PyObject*)p->clips); p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone[] = { {"set_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_3set_clip, METH_O, 0}, {"get_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_5get_clip, METH_NOARGS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_9starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distance, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_x", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_x, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_y", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_y, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_z", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_z, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone[] = { {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.SphereCone", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_1__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_7__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone; p->neighbors = ((PyObject*)Py_None); Py_INCREF(Py_None); p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); p->neighbor_regions = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone(PyObject *o) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->neighbors); Py_CLEAR(p->clips); Py_CLEAR(p->neighbor_regions); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)o; if (p->neighbors) { e = (*v)(p->neighbors, a); if (e) return e; } if (p->clips) { e = (*v)(p->clips, a); if (e) return e; } if (p->neighbor_regions) { e = (*v)(p->neighbor_regions, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone(PyObject *o) { PyObject* tmp; struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *p = (struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *)o; tmp = ((PyObject*)p->neighbors); p->neighbors = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->clips); p->clips = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->neighbor_regions); p->neighbor_regions = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_ylo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_yhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r0(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r1(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_axislength(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone[] = { {"set_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_5set_clip, METH_O, 0}, {"get_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_7get_clip, METH_NOARGS, 0}, {"within_core", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_core, METH_VARARGS|METH_KEYWORDS, 0}, {"axis", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_11axis, METH_NOARGS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_13starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distance, METH_VARARGS|METH_KEYWORDS, 0}, {"_distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance}, {"overlaps_x", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_x, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_y", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_y, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_z", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_z, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone[] = { {(char *)"xlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xlo, 0, 0, 0}, {(char *)"xhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xhi, 0, 0, 0}, {(char *)"ylo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_ylo, 0, 0, 0}, {(char *)"yhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_yhi, 0, 0, 0}, {(char *)"zlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zlo, 0, 0, 0}, {(char *)"zhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zhi, 0, 0, 0}, {(char *)"_x0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x0, 0, 0, 0}, {(char *)"_y0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y0, 0, 0, 0}, {(char *)"_z0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z0, 0, 0, 0}, {(char *)"_r0", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r0, 0, 0, 0}, {(char *)"_x1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x1, 0, 0, 0}, {(char *)"_y1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y1, 0, 0, 0}, {(char *)"_z1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z1, 0, 0, 0}, {(char *)"_r1", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r1, 0, 0, 0}, {(char *)"axislength", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_axislength, 0, 0, 0}, {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.Cone", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_1__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone, /*tp_traverse*/ __pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone; static PyObject *__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *)o); p->__pyx_vtab = __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone; return o; } static void __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_ylo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_yhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zlo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zhi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi_1__get__(o); } static PyObject *__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_primitives(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives_1__get__(o); } static PyMethodDef __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone[] = { {"get_clip", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_1get_clip, METH_NOARGS, 0}, {"starting_points", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_5starting_points, METH_VARARGS|METH_KEYWORDS, 0}, {"distance", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distance, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_x", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_x, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_y", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_y, METH_VARARGS|METH_KEYWORDS, 0}, {"overlaps_z", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_z, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone[] = { {(char *)"xlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xlo, 0, 0, 0}, {(char *)"xhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xhi, 0, 0, 0}, {(char *)"ylo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_ylo, 0, 0, 0}, {(char *)"yhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_yhi, 0, 0, 0}, {(char *)"zlo", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zlo, 0, 0, 0}, {(char *)"zhi", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zhi, 0, 0, 0}, {(char *)"primitives", __pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_primitives, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone = { PyVarObject_HEAD_INIT(0, 0) "neuron.rxd.geometry3d.graphicsPrimitives.SkewCone", /*tp_name*/ sizeof(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "graphicsPrimitives", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_At_least_one_Cone_radius_must_be, __pyx_k_At_least_one_Cone_radius_must_be, sizeof(__pyx_k_At_least_one_Cone_radius_must_be), 0, 0, 1, 0}, {&__pyx_kp_s_Complement_r, __pyx_k_Complement_r, sizeof(__pyx_k_Complement_r), 0, 0, 1, 0}, {&__pyx_kp_s_Cone_g_g_g_g_g_g_g_g, __pyx_k_Cone_g_g_g_g_g_g_g_g, sizeof(__pyx_k_Cone_g_g_g_g_g_g_g_g), 0, 0, 1, 0}, {&__pyx_kp_s_Cone_g_g_g_g_g_g_g_g_clips_r, __pyx_k_Cone_g_g_g_g_g_g_g_g_clips_r, sizeof(__pyx_k_Cone_g_g_g_g_g_g_g_g_clips_r), 0, 0, 1, 0}, {&__pyx_kp_s_Cylinder_g_g_g_g_g_g_g, __pyx_k_Cylinder_g_g_g_g_g_g_g, sizeof(__pyx_k_Cylinder_g_g_g_g_g_g_g), 0, 0, 1, 0}, {&__pyx_kp_s_Cylinder_g_g_g_g_g_g_g_clips_r, __pyx_k_Cylinder_g_g_g_g_g_g_g_clips_r, sizeof(__pyx_k_Cylinder_g_g_g_g_g_g_g_clips_r), 0, 0, 1, 0}, {&__pyx_kp_s_Intersection_r, __pyx_k_Intersection_r, sizeof(__pyx_k_Intersection_r), 0, 0, 1, 0}, {&__pyx_kp_s_Plane_g_g_g_g_g_g, __pyx_k_Plane_g_g_g_g_g_g, sizeof(__pyx_k_Plane_g_g_g_g_g_g), 0, 0, 1, 0}, {&__pyx_n_s_RxDException, __pyx_k_RxDException, sizeof(__pyx_k_RxDException), 0, 0, 1, 1}, {&__pyx_kp_s_SphereCone_g_g_g_g_g_g_g_g, __pyx_k_SphereCone_g_g_g_g_g_g_g_g, sizeof(__pyx_k_SphereCone_g_g_g_g_g_g_g_g), 0, 0, 1, 0}, {&__pyx_kp_s_Sphere_g_g_g_g, __pyx_k_Sphere_g_g_g_g, sizeof(__pyx_k_Sphere_g_g_g_g), 0, 0, 1, 0}, {&__pyx_kp_s_Sphere_g_g_g_g_clips_r, __pyx_k_Sphere_g_g_g_g_clips_r, sizeof(__pyx_k_Sphere_g_g_g_g_clips_r), 0, 0, 1, 0}, {&__pyx_kp_s_Union_r, __pyx_k_Union_r, sizeof(__pyx_k_Union_r), 0, 0, 1, 0}, {&__pyx_n_s_bisect, __pyx_k_bisect, sizeof(__pyx_k_bisect), 0, 0, 1, 1}, {&__pyx_n_s_bisect_left, __pyx_k_bisect_left, sizeof(__pyx_k_bisect_left), 0, 0, 1, 1}, {&__pyx_n_s_distance, __pyx_k_distance, sizeof(__pyx_k_distance), 0, 0, 1, 1}, {&__pyx_n_s_distance_2, __pyx_k_distance_2, sizeof(__pyx_k_distance_2), 0, 0, 1, 1}, {&__pyx_n_s_hi, __pyx_k_hi, sizeof(__pyx_k_hi), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_lo, __pyx_k_lo, sizeof(__pyx_k_lo), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_neighbor_regions, __pyx_k_neighbor_regions, sizeof(__pyx_k_neighbor_regions), 0, 0, 1, 1}, {&__pyx_n_s_neighbors, __pyx_k_neighbors, sizeof(__pyx_k_neighbors), 0, 0, 1, 1}, {&__pyx_n_s_neuron_rxd_rxdException, __pyx_k_neuron_rxd_rxdException, sizeof(__pyx_k_neuron_rxd_rxdException), 0, 0, 1, 1}, {&__pyx_n_s_nx, __pyx_k_nx, sizeof(__pyx_k_nx), 0, 0, 1, 1}, {&__pyx_n_s_ny, __pyx_k_ny, sizeof(__pyx_k_ny), 0, 0, 1, 1}, {&__pyx_n_s_nz, __pyx_k_nz, sizeof(__pyx_k_nz), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_objects, __pyx_k_objects, sizeof(__pyx_k_objects), 0, 0, 1, 1}, {&__pyx_n_s_overlaps_x, __pyx_k_overlaps_x, sizeof(__pyx_k_overlaps_x), 0, 0, 1, 1}, {&__pyx_n_s_overlaps_y, __pyx_k_overlaps_y, sizeof(__pyx_k_overlaps_y), 0, 0, 1, 1}, {&__pyx_n_s_overlaps_z, __pyx_k_overlaps_z, sizeof(__pyx_k_overlaps_z), 0, 0, 1, 1}, {&__pyx_n_s_primitives, __pyx_k_primitives, sizeof(__pyx_k_primitives), 0, 0, 1, 1}, {&__pyx_n_s_px, __pyx_k_px, sizeof(__pyx_k_px), 0, 0, 1, 1}, {&__pyx_n_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_pz, __pyx_k_pz, sizeof(__pyx_k_pz), 0, 0, 1, 1}, {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, {&__pyx_n_s_r0, __pyx_k_r0, sizeof(__pyx_k_r0), 0, 0, 1, 1}, {&__pyx_n_s_r1, __pyx_k_r1, sizeof(__pyx_k_r1), 0, 0, 1, 1}, {&__pyx_n_s_starting_points, __pyx_k_starting_points, sizeof(__pyx_k_starting_points), 0, 0, 1, 1}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_within_core, __pyx_k_within_core, sizeof(__pyx_k_within_core), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_x0, __pyx_k_x0, sizeof(__pyx_k_x0), 0, 0, 1, 1}, {&__pyx_n_s_x1, __pyx_k_x1, sizeof(__pyx_k_x1), 0, 0, 1, 1}, {&__pyx_n_s_x2, __pyx_k_x2, sizeof(__pyx_k_x2), 0, 0, 1, 1}, {&__pyx_n_s_xs, __pyx_k_xs, sizeof(__pyx_k_xs), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_y0, __pyx_k_y0, sizeof(__pyx_k_y0), 0, 0, 1, 1}, {&__pyx_n_s_y1, __pyx_k_y1, sizeof(__pyx_k_y1), 0, 0, 1, 1}, {&__pyx_n_s_y2, __pyx_k_y2, sizeof(__pyx_k_y2), 0, 0, 1, 1}, {&__pyx_n_s_ys, __pyx_k_ys, sizeof(__pyx_k_ys), 0, 0, 1, 1}, {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1}, {&__pyx_n_s_z0, __pyx_k_z0, sizeof(__pyx_k_z0), 0, 0, 1, 1}, {&__pyx_n_s_z1, __pyx_k_z1, sizeof(__pyx_k_z1), 0, 0, 1, 1}, {&__pyx_n_s_z2, __pyx_k_z2, sizeof(__pyx_k_z2), 0, 0, 1, 1}, {&__pyx_n_s_zs, __pyx_k_zs, sizeof(__pyx_k_zs), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":505 * * if r0 < 0: * raise RxDException('At least one Cone radius must be positive') # <<<<<<<<<<<<<< * if r1 < 0: * axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_At_least_one_Cone_radius_must_be); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initgraphicsPrimitives(void); /*proto*/ PyMODINIT_FUNC initgraphicsPrimitives(void) #else PyMODINIT_FUNC PyInit_graphicsPrimitives(void); /*proto*/ PyMODINIT_FUNC PyInit_graphicsPrimitives(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_graphicsPrimitives(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("graphicsPrimitives", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_neuron__rxd__geometry3d__graphicsPrimitives) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "neuron.rxd.geometry3d.graphicsPrimitives")) { if (unlikely(PyDict_SetItemString(modules, "neuron.rxd.geometry3d.graphicsPrimitives", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "Complement", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union.starting_points = (PyObject *(*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_starting_points; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "Union", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection.starting_points = (PyObject *(*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_starting_points; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "Intersection", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane.starting_points = (PyObject *(*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_starting_points; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__.doc = __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__; } } #endif if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "Plane", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere.overlaps_x = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_x; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere.overlaps_y = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_y; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere.overlaps_z = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_z; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "Sphere", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.within_core = (PyObject *(*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_within_core; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder._distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.overlaps_x = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_x; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.overlaps_y = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_y; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.overlaps_z = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_z; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "Cylinder", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone.overlaps_x = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_x; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone.overlaps_y = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_y; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone.overlaps_z = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_z; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "SphereCone", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.within_core = (PyObject *(*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_within_core; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone._distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.overlaps_x = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_x; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.overlaps_y = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_y; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.overlaps_z = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_z; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "Cone", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone; __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone = &__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone.distance = (double (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_distance; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone.overlaps_x = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_x; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone.overlaps_y = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_y; __pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone.overlaps_z = (int (*)(struct __pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone *, double, double, int __pyx_skip_dispatch))__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_z; if (PyType_Ready(&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__.doc = __pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__; } } #endif if (__Pyx_SetVtable(__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone.tp_dict, __pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyObject_SetAttrString(__pyx_m, "SkewCone", (PyObject *)&__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone = &__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":7 * # http://jgt.akpeters.com/papers/BarbierGalin04/Cone-Sphere.zip * * import bisect # <<<<<<<<<<<<<< * cimport cython * from neuron.rxd.rxdException import RxDException */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_bisect, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":9 * import bisect * cimport cython * from neuron.rxd.rxdException import RxDException # <<<<<<<<<<<<<< * * cdef extern from "math.h": */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_RxDException); __Pyx_GIVEREF(__pyx_n_s_RxDException); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_RxDException); __pyx_t_2 = __Pyx_Import(__pyx_n_s_neuron_rxd_rxdException, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RxDException); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_RxDException, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/graphicsPrimitives.pyx":1 * # this contains cone, spherecone, and cylinder code translated and modified from Barbier and # <<<<<<<<<<<<<< * # Galin 2004's example code * # see /u/ramcd/spatial/experiments/one_time_tests/2012-06-28/cone.cpp */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init neuron.rxd.geometry3d.graphicsPrimitives", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init neuron.rxd.geometry3d.graphicsPrimitives"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #endif __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ neuron-7.5/share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.pyx000066400000000000000000000702171323325274500267040ustar00rootroot00000000000000# this contains cone, spherecone, and cylinder code translated and modified from Barbier and # Galin 2004's example code # see /u/ramcd/spatial/experiments/one_time_tests/2012-06-28/cone.cpp # on 7 june 2012, the original code was available online at # http://jgt.akpeters.com/papers/BarbierGalin04/Cone-Sphere.zip import bisect cimport cython from neuron.rxd.rxdException import RxDException cdef extern from "math.h": double sqrt(double) double fabs(double) # I'm manually doing all maxes and mins here because I thought it would help # eliminate round-off issues at the surface. it doesn't #cdef double max(double a, double b): # return a if a > b else b #cdef double min(double a, double b): # return a if a < b else b cdef class Complement: def __init__(self, obj): self.obj = obj def __repr__(self): return 'Complement(%r)' % self.obj def distance(self, px, py, pz): return -self.obj.distance(px, py, pz) def starting_points(self, xs, ys, zs): return self.obj.starting_points(xs, ys, zs) property primitives: def __get__(self): return [self.obj] cdef class Union: cdef list objects def __init__(self, list objects): self.objects = objects def __repr__(self): return 'Union(%r)' % self.objects @cython.boundscheck(False) @cython.wraparound(False) cpdef double distance(self, px, py, pz): # CTNG:uniondist dists = [obj.distance(px, py, pz) for obj in self.objects] cdef double d, d2 d = dists[0] for d2 in dists: if d2 < d: d = d2 return d cpdef list starting_points(self, xs, ys, zs): return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) property primitives: def __get__(self): return sum([obj.primitives for obj in self.objects], []) cdef class Intersection: cdef list objects def __init__(self, list objects): self.objects = objects def __repr__(self): return 'Intersection(%r)' % self.objects @cython.boundscheck(False) @cython.wraparound(False) cpdef double distance(self, px, py, pz): # CTNG: intdist dists = [obj.distance(px, py, pz) for obj in self.objects] cdef double d, d2 d = dists[0] for d2 in dists: if d2 > d: d = d2 return d cpdef list starting_points(self, xs, ys, zs): return sum([c.starting_points(xs, ys, zs) for c in self.objects], []) property primitives: def __get__(self): return sum([obj.primitives for obj in self.objects], []) cdef class Plane: cdef double d, mul, nx, ny, nz, px, py, pz def __init__(self, double px, double py, double pz, double nx, double ny, double nz): """(px, py, pz) -- a point; (nx, ny, nz) -- the normal vector""" self.d = - (nx * px + ny * py + nz * pz) self.mul = 1. / sqrt(nx ** 2 + ny ** 2 + nz ** 2) self.nx = nx self.ny = ny self.nz = nz self.px = px self.py = py self.pz = pz property primitives: def __get__(self): return [] def __repr__(self): return 'Plane(%g, %g, %g, %g, %g, %g)' % (self.px, self.py, self.pz, self.nx, self.ny, self.nz) cpdef double distance(self, double x, double y, double z): return (self.nx * x + self.ny * y + self.nz * z + self.d) * self.mul cpdef list starting_points(self, xs, ys, zs): return [(bisect.bisect_left(xs, self.px), bisect.bisect_left(ys, self.py), bisect.bisect_left(zs, self.pz))] cdef class Sphere: cdef double x, y, z, r, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi cdef list clips property primitives: def __get__(self): return [self] def __init__(self, double x, double y, double z, double r): self.x, self.y, self.z, self.r = x, y, z, r self._xlo, self._xhi = x - r, x + r self._ylo, self._yhi = y - r, y + r self._zlo, self._zhi = z - r, z + r self.clips = [] def __repr__(self): if self.clips: return 'Sphere(%g, %g, %g, %g; clips=%r)' % (self.x, self.y, self.z, self.r, self.clips) else: return 'Sphere(%g, %g, %g, %g)' % (self.x, self.y, self.z, self.r) property xlo: def __get__(self): return self._xlo property xhi: def __get__(self): return self._xhi property ylo: def __get__(self): return self._ylo property yhi: def __get__(self): return self._yhi property zlo: def __get__(self): return self._zlo property zhi: def __get__(self): return self._zhi cpdef double distance(self, double x, double y, double z): d = sqrt((x - self.x) ** 2 + (y - self.y) ** 2 + (z - self.z) ** 2) - self.r old_d = d for clip in self.clips: d = max(d, clip.distance(x, y, z)) return d def starting_points(self, xs, ys, zs): #for theta in numpy.arange(0, 2 * numpy.pi, 10): # TODO: this only works right if the entire object is inside the domain return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x - self.r), bisect.bisect_left(ys, self.y), bisect.bisect_left(zs, self.z))]) cpdef bint overlaps_x(self, double lo, double hi): return lo <= self._xhi and hi >= self._xlo cpdef bint overlaps_y(self, double lo, double hi): return lo <= self._yhi and hi >= self._ylo cpdef bint overlaps_z(self, double lo, double hi): return lo <= self._zhi and hi >= self._zlo def set_clip(self, clips): self.clips = clips def get_clip(self): return self.clips cdef class Cylinder: cdef double cx, cy, cz, r, rr, axisx, axisy, axisz, x0, y0, z0, x1, y1, z1, h cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi cdef list neighbors, clips, neighbor_regions def __repr__(self): if self.clips: return 'Cylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r, self.clips) else: return 'Cylinder(%g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.x1, self.y1, self.z1, self.r) property xlo: def __get__(self): return self._xlo property xhi: def __get__(self): return self._xhi property ylo: def __get__(self): return self._ylo property yhi: def __get__(self): return self._yhi property zlo: def __get__(self): return self._zlo property zhi: def __get__(self): return self._zhi def __init__(self, double x0, double y0, double z0, double x1, double y1, double z1, double r): self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 self.x0, self.y0, self.z0, self.x1, self.y1, self.z1 = x0, y0, z0, x1, y1, z1 self.rr = r * r self.r = r self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) # normalize the axis self.axisx /= self.length self.axisy /= self.length self.axisz /= self.length self.h = self.length * 0.5 self._xlo = min(x0 - r, x1 - r) self._xhi = max(x0 + r, x1 + r) self._ylo = min(y0 - r, y1 - r) self._yhi = max(y0 + r, y1 + r) self._zlo = min(z0 - r, z1 - r) self._zhi = max(z0 + r, z1 + r) self.neighbors = [] self.clips = [] self.neighbor_regions = [] property axislength: def __get__(self): return self.length property _x0: def __get__(self): return self.x0 property _y0: def __get__(self): return self.y0 property _z0: def __get__(self): return self.z0 property _r0: def __get__(self): return self.r property _x1: def __get__(self): return self.x1 property _y1: def __get__(self): return self.y1 property _z1: def __get__(self): return self.z1 property _r1: def __get__(self): return self.r property primitives: def __get__(self): return [self] def get_clip(self): return self.clips def set_clip(self, clips): self.clips = clips def axis(self): return (self.axisx, self.axisy, self.axisz) def set_neighbors(self, neighbors, neighbor_regions): self.neighbors = neighbors self.neighbor_regions = neighbor_regions cpdef within_core(self, double px, double py, double pz): cdef double nx, ny, nz, y, yy, xx nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) return y < self.h def starting_points(self, xs, ys, zs): # TODO: this only works right if the entire object is inside the domain return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) cpdef double distance(self, double px, double py, double pz): # CTNG:cyldist cdef double nx, ny, nz, y, yy, xx, d nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) yy = y * y xx = nx * nx + ny * ny + nz * nz - yy if y < self.h: # this was wrong in my version from 2012-06-28, since did not # handle end-caps being closest d = max(y - self.h, sqrt(xx) - self.r) else: y -= self.h if xx < self.rr: d = y else: yy = y * y x = sqrt(xx) - self.r d = sqrt(yy + x * x) for clip in self.clips: d = max(d, clip.distance(px, py, pz)) return d cpdef double _distance(self, double px, double py, double pz): """returns the distance to the cylinder, but not including the end plate if inside (and including the end plate if outside)""" cdef double nx, ny, nz, y, yy, xx, d nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) yy = y * y xx = nx * nx + ny * ny + nz * nz - yy if y < self.h: # this is the part where we ignore the end plate if inside d = sqrt(xx) - self.r else: y -= self.h if xx < self.rr: d = y else: yy = y * y x = sqrt(xx) - self.r d = sqrt(yy + x * x) for clip in self.clips: d = max(d, clip.distance(px, py, pz)) return d cpdef bint overlaps_x(self, double lo, double hi): return lo <= self._xhi and hi >= self._xlo cpdef bint overlaps_y(self, double lo, double hi): return lo <= self._yhi and hi >= self._ylo cpdef bint overlaps_z(self, double lo, double hi): return lo <= self._zhi and hi >= self._zlo cdef class SphereCone: cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, ha, hb, hra, hrb cdef list clips property primitives: def __get__(self): return [self] def __repr__(self): return 'SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)' % (self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1) def set_clip(self, clips): self.clips = clips def get_clip(self): return self.clips def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): if r1 > r0: x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 self.rra, self.rrb = r0 * r0, r1 * r1 self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) # normalize the axis self.axisx /= self.length self.axisy /= self.length self.axisz /= self.length """ rab = r0 - r1 s = sqrt(self.length ** 2 - rab ** 2) self.ha = self.r0 * rab / self.length self.hb = self.r1 * rab / self.length self.hra = self.r0 * s / self.length self.hrb = self.r1 * s / self.length self.side1 = - self.ha / self.r0 self.side2 = self.hra / self.r0 self.conelength = self.length * self.hra / self.r0 """ self.r0 = r0 self.r1 = r1 self.rrb = r1 * r1 self.rra = r0 * r0 r0b = r0 - r1 s = sqrt(self.length * self.length - r0b * r0b) self.ha = self.r0 * r0b / self.length self.hb = self.r1 * r0b / self.length self.hra = self.r0 * s / self.length self.hrb = self.r1 * s / self.length self.side1 = -self.ha / self.r0 self.side2 = self.hra / self.r0 self.conelength = self.length * self.hra / self.r0 self._xlo = min(x0 - r0, x1 - r1) self._xhi = max(x0 + r0, x1 + r1) self._ylo = min(y0 - r0, y1 - r1) self._yhi = max(y0 + r0, y1 + r1) self._zlo = min(z0 - r0, z1 - r1) self._zhi = max(z0 + r0, z1 + r1) self.clips = [] def starting_points(self, xs, ys, zs): # TODO: this only works right if the entire object is inside the domain return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0 - self.axisx * self.r0), bisect.bisect_left(ys, self.y0 - self.axisy * self.r0), bisect.bisect_left(zs, self.z0 - self.axisz * self.r0))]) cpdef double distance(self, double px, double py, double pz): cdef double nx, ny, nz, y, yy, xx, ry, rx, nn, x, d nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 y = nx * self.axisx + ny * self.axisy + nz * self.axisz nn = nx * nx + ny * ny + nz * nz yy = y * y xx = nn - yy # in principle, xx >= 0, however roundoff errors may cause trouble if xx < 0: xx = 0 x = sqrt(xx) ry = x * self.side1 + y * self.side2 if ry < 0: d = sqrt(nn) - self.r0 elif ry > self.conelength: y = y - self.length yy = y * y nn = xx + yy d = sqrt(nn) - self.r1 else: rx = x * self.side2 - y * self.side1 d = rx - self.r0 for clip in self.clips: d = max(d, clip.distance(px, py, pz)) return d cpdef bint overlaps_x(self, double lo, double hi): return lo <= self._xhi and hi >= self._xlo cpdef bint overlaps_y(self, double lo, double hi): return lo <= self._yhi and hi >= self._ylo cpdef bint overlaps_z(self, double lo, double hi): return lo <= self._zhi and hi >= self._zlo cdef class Cone: cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, cx, cy, cz, h cdef list neighbors, clips, neighbor_regions cdef bint reversed property xlo: def __get__(self): return self._xlo property xhi: def __get__(self): return self._xhi property ylo: def __get__(self): return self._ylo property yhi: def __get__(self): return self._yhi property zlo: def __get__(self): return self._zlo property zhi: def __get__(self): return self._zhi def __repr__(self): cdef list order if self.reversed: order = [self.x1, self.y1, self.z1, self.r1, self.x0, self.y0, self.z0, self.r0] else: order = [self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1] if self.clips: return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)' % tuple(order + [self.clips]) else: return 'Cone(%g, %g, %g, %g, %g, %g, %g, %g)' % tuple(order) property _x0: def __get__(self): return self.x1 if self.reversed else self.x0 property _y0: def __get__(self): return self.y1 if self.reversed else self.y0 property _z0: def __get__(self): return self.z1 if self.reversed else self.z0 property _r0: def __get__(self): return self.r1 if self.reversed else self.r0 property _x1: def __get__(self): return self.x0 if self.reversed else self.x1 property _y1: def __get__(self): return self.y0 if self.reversed else self.y1 property _z1: def __get__(self): return self.z0 if self.reversed else self.z1 property _r1: def __get__(self): return self.r0 if self.reversed else self.r1 property axislength: def __get__(self): return self.length property primitives: def __get__(self): return [self] def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1): if r1 > r0: x0, y0, z0, r0, x1, y1, z1, r1 = x1, y1, z1, r1, x0, y0, z0, r0 self.reversed = True else: self.reversed = False self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 if r0 < 0: raise RxDException('At least one Cone radius must be positive') if r1 < 0: axisx, axisy, axisz = (x1 - x0, y1 - y0, z1 - z0) length = sqrt(axisx ** 2 + axisy ** 2 + axisz ** 2) axisx /= length; axisy /= length; axisz /= length f = r1 / (r1 - r0) x1 -= f * axisx; y1 -= f * axisy; z1 -= f * axisz; r1 = 0 self.rra, self.rrb = r0 * r0, r1 * r1 self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) self.length = sqrt(self.axisx ** 2 + self.axisy ** 2 + self.axisz ** 2) # normalize the axis self.axisx /= self.length self.axisy /= self.length self.axisz /= self.length self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) self.side1 = (r1 - r0) / self.conelength self.side2 = self.length / self.conelength cdef double rmax = max(r0, r1) self._xlo = min(x0 - rmax, x1 - rmax) self._xhi = max(x0 + rmax, x1 + rmax) self._ylo = min(y0 - rmax, y1 - rmax) self._yhi = max(y0 + rmax, y1 + rmax) self._zlo = min(z0 - rmax, z1 - rmax) self._zhi = max(z0 + rmax, z1 + rmax) self.neighbors = [] self.cx, self.cy, self.cz = (x0 + x1) * 0.5, (y0 + y1) * 0.5, (z0 + z1) * 0.5 self.h = self.length * .5 self.clips = [] self.neighbor_regions = [] def set_clip(self, clips): self.clips = clips def get_clip(self): return self.clips cpdef within_core(self, double px, double py, double pz): cdef double nx, ny, nz, y nx, ny, nz = px - self.cx, py - self.cy, pz - self.cz y = abs(self.axisx * nx + self.axisy * ny + self.axisz * nz) return y < self.h def axis(self): if self.reversed: return -self.axisx, -self.axisy, -self.axisz else: return (self.axisx, self.axisy, self.axisz) def starting_points(self, xs, ys, zs): # TODO: this only works right if the entire object is inside the domain return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0)), (bisect.bisect_left(xs, self.x1), bisect.bisect_left(ys, self.y1), bisect.bisect_left(zs, self.z1))]) cpdef double distance(self, double px, double py, double pz): # CTNG:frustumdist cdef double nx, ny, nz, y, yy, xx, ry, rx, d nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 y = nx * self.axisx + ny * self.axisy + nz * self.axisz yy = y * y xx = nx * nx + ny * ny + nz * nz - yy # in principle, xx >= 0, however roundoff errors may cause trouble if xx < 0: xx = 0 if y < 0: # always nonnegative distance in this case if xx < self.rra: d = -y else: x = sqrt(xx) - self.r0 d = sqrt(x * x + yy) elif xx < self.rrb and y > self.length: d = y - self.length else: x = sqrt(xx) - self.r0 # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) ry = x * self.side1 + y * self.side2 if ry < 0: # if ry < 0 (and y > 0 from above), then outside the cone d = sqrt(x * x + yy) else: rx = x * self.side2 - y * self.side1 if ry > self.conelength and y > self.length: ry -= self.conelength d = sqrt(rx * rx + ry * ry) else: d = rx if d < 0: # end faces could be closer than the cone itself d = max(rx, y - self.length) for clip in self.clips: d = max(d, clip.distance(px, py, pz)) return d cpdef double _distance(self, double px, double py, double pz): """returns the distance to the frustum, but not including the end plate if inside (and including the end plate if outside)""" cdef double nx, ny, nz, y, yy, xx, ry, rx, d nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 y = nx * self.axisx + ny * self.axisy + nz * self.axisz yy = y * y xx = nx * nx + ny * ny + nz * nz - yy # in principle, xx >= 0, however roundoff errors may cause trouble if xx < 0: xx = 0 if y < 0: # always nonnegative distance in this case (i.e. outside) if xx < self.rra: d = -y else: x = sqrt(xx) - self.r0 d = sqrt(x * x + yy) elif xx < self.rrb and y > self.length: # outside d = y - self.length else: x = sqrt(xx) - self.r0 # y >= 0 always at this point (and if outside, not in the cylinder extending through the small end face) ry = x * self.side1 + y * self.side2 if ry < 0: # if ry < 0 (and y > 0 from above), then outside the cone d = sqrt(x * x + yy) else: rx = x * self.side2 - y * self.side1 if ry > self.conelength and y > self.length: ry -= self.conelength d = sqrt(rx * rx + ry * ry) else: d = rx # this is the part where we are ignoring the end faces for clip in self.clips: d = max(d, clip.distance(px, py, pz)) return d cpdef bint overlaps_x(self, double lo, double hi): return lo <= self._xhi and hi >= self._xlo cpdef bint overlaps_y(self, double lo, double hi): return lo <= self._yhi and hi >= self._ylo cpdef bint overlaps_z(self, double lo, double hi): return lo <= self._zhi and hi >= self._zlo cdef class SkewCone: cdef double x0, y0, z0, r0, x1, y1, z1, r1, rra, rrb, axisx, axisy, axisz, conelength, side1, side2 cdef double length, _xlo, _xhi, _ylo, _yhi, _zlo, _zhi, sx, sy, sz, planed property xlo: def __get__(self): return self._xlo property xhi: def __get__(self): return self._xhi property ylo: def __get__(self): return self._ylo property yhi: def __get__(self): return self._yhi property zlo: def __get__(self): return self._zlo property zhi: def __get__(self): return self._zhi property primitives: def __get__(self): return [self] def get_clip(self): # TODO: change this if ever expand to allow clipping return [] def __init__(self, double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1, double x2, double y2, double z2): """(x2, y2, z2) denotes point to skew (x1, y1, z1) to""" if r1 > r0: x0, y0, z0, r0, x1, y1, z1, r1, x2, y2, z2 = x2, y2, z2, r1, x2 - (x1 - x0), y2 - (y1 - y0), z2 - (z1 - z0), r0, x0, y0, z0 self.x0, self.y0, self.z0, self.r0, self.x1, self.y1, self.z1, self.r1 = x0, y0, z0, r0, x1, y1, z1, r1 self.rra, self.rrb = r0 * r0, r1 * r1 self.axisx, self.axisy, self.axisz = (x1 - x0, y1 - y0, z1 - z0) self.length = sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2 + (z1 - z0) ** 2) # skew data self.sx = (x2 - x1) / self.length self.sy = (y2 - y1) / self.length self.sz = (z2 - z1) / self.length # normalize the axis self.axisx /= self.length self.axisy /= self.length self.axisz /= self.length self.planed = - (self.axisx * x0 + self.axisy * y0 + self.axisz * z0) self.conelength = sqrt((r1 - r0) ** 2 + self.length ** 2) self.side1 = (r1 - r0) / self.conelength self.side2 = self.length / self.conelength cdef double rmax = max(r0, r1) self._xlo = min(x0 - rmax, x2 - rmax) self._xhi = max(x0 + rmax, x2 + rmax) self._ylo = min(y0 - rmax, y2 - rmax) self._yhi = max(y0 + rmax, y2 + rmax) self._zlo = min(z0 - rmax, z2 - rmax) self._zhi = max(z0 + rmax, z2 + rmax) def starting_points(self, xs, ys, zs): # TODO: this only works right if the entire object is inside the domain return [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0))] #return sum([c.starting_points(xs, ys, zs) for c in self.clips], [(bisect.bisect_left(xs, self.x0), bisect.bisect_left(ys, self.y0), bisect.bisect_left(zs, self.z0))]) # TODO: allow clipping? cpdef double distance(self, double px, double py, double pz): # CTNG:shearfrustdist cdef double nx, ny, nz, y, yy, xx, ry, rx, dist # compute signed distance of point to plane (note: axis vector has length 1) dist = px * self.axisx + py * self.axisy + pz * self.axisz + self.planed # deskew px -= dist * self.sx py -= dist * self.sy pz -= dist * self.sz nx, ny, nz = px - self.x0, py - self.y0, pz - self.z0 y = nx * self.axisx + ny * self.axisy + nz * self.axisz yy = y * y xx = nx * nx + ny * ny + nz * nz - yy # in principle, xx >= 0, however roundoff errors may cause trouble if xx < 0: xx = 0 if y < 0: if xx < self.rra: return -y else: x = sqrt(xx) - self.r0 return sqrt(x * x + yy) elif xx < self.rrb and y > self.length: return y - self.length else: x = sqrt(xx) - self.r0 ry = x * self.side1 + y * self.side2 if ry < 0: return sqrt(x * x + yy) else: rx = x * self.side2 - y * self.side1 if ry > self.conelength and y > self.length: ry -= self.conelength return sqrt(rx * rx + ry * ry) else: if rx >= 0: return rx else: return max(rx, y - self.length) cpdef bint overlaps_x(self, double lo, double hi): return lo <= self._xhi and hi >= self._xlo cpdef bint overlaps_y(self, double lo, double hi): return lo <= self._yhi and hi >= self._ylo cpdef bint overlaps_z(self, double lo, double hi): return lo <= self._zhi and hi >= self._zlo neuron-7.5/share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.so000077500000000000000000043667401323325274500265250ustar00rootroot00000000000000ELF>ðQ@àä@8@$!üfüf mm#m#˜:Ð>  m m# m#ððÈÈÈ$$Påtd`/`/`/ääQåtdRåtdmm#m#øøGNU´±ìW‘ßÕ¾t›ƒ’ž<Ï+™øUÈÀ` @ UVXYZ[]ëÓïF:Ê/ÙqX×VŽë~ufCEÕìy\¤¹ñ»ã’| 0N›Z®eë Ý‘ïÉ„“Û0 4¼?‹Ø…ûe†œ­N( - x«pHuûêúIÜê; !„õa dÉv@λ]Ì»Ù8  –#˼MR"Zy“§w° X 88¨#Í §#n üXÀ§#8Æ §#¾¨#8 0NÙØ«#__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasses_Py_NoneStructPyBaseObject_TypePyObject_GetAttrPyObject_GC_UnTrackPyCapsule_NewPyDict_SetItem_PyThreadState_CurrentPyFrame_NewPyTraceBack_HerePyString_FromStringPyString_FromFormatPyCode_NewPyMem_ReallocPyMem_MallocPyList_NewPyFloat_FromDoublePyTuple_NewPyNumber_AddPyList_AsTuplePyString_FormatPyList_TypePyExc_TypeErrorPyErr_FormatPyModule_GetDictPyDict_NewPyInt_FromLongPyObject_CallFunctionObjArgsPyDict_NextPyString_Type_PyString_EqPyString_AsStringPyUnicodeUCS4_ComparePyErr_Occurred__stack_chk_failPyDict_SizePyDict_GetItemPyObject_SetAttrPyBaseString_TypePyUnicode_TypePyFloat_TypePyFloat_AsDoublePyExc_ZeroDivisionErrorPyErr_SetStringsqrt_Py_CheckRecursionLimitPyObject_Call_Py_CheckRecursiveCallPyExc_SystemErrorPyErr_WriteUnraisablePyMethod_TypePyNumber_NegativePyList_AppendPyExc_NameErrorPyCFunction_Type_Py_TrueStruct_Py_ZeroStructPyObject_IsTruePyObject_RichComparePyTraceBack_TypePyErr_NormalizeExceptionPyExc_BaseExceptionPyType_IsSubtypeinitgraphicsPrimitivesPyOS_snprintfPy_GetVersionPyErr_WarnExPyString_FromStringAndSizePy_InitModule4_64PyImport_AddModulePyObject_SetAttrStringPyString_InternFromStringPyUnicodeUCS4_DecodeUTF8__pyx_module_is_main_neuron__rxd__geometry3d__graphicsPrimitivesPyTuple_PackPyType_ReadyPyObject_GetAttrStringPyWrapperDescr_Type__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init____pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__PyExc_ImportErrorPyExc_AttributeErrorPyErr_ExceptionMatcheslibm.so.6libpthread.so.0libc.so.6_edata__bss_start_end/usr/lib/openmpi/libGLIBC_2.2.5GLIBC_2.4¢ ui ó¼ui óii ÿm#Tm#ÐSàq#àq#€w#@ª#ˆw#8ª#w#(ª# w#È©#¨w# ©#°w#x©#Àw#pª#àw#@ª#èw#8ª#ðw#(ª#x#È©#x# ©#x#x©# x#hª#@x#@ª#Hx#8ª#Px#(ª#`x#È©#hx# ©#px#x©#€x#hª# x#è©#¨x#À©#°x#˜©#Àx#È©#Èx# ©#Ðx#x©#àx#@ª#èx#8ª#ðx#(ª#øx#ˆª#y#€ª#y#xª# y#è©#(y#À©#0y#˜©#@y#È©#Hy# ©#Py#x©#`y#°ª#hy#Àª#€y#°ª#ˆy#Àª# y#°ª#¨y#Àª#Ày#è©#Èy#À©#Ðy#˜©#Øy# ª#ðy#˜ª#øy# ª# z#@ª#(z#8ª#0z#(ª#@z#È©#Hz# ©#Pz#x©#`z#@ª#hz#8ª#pz#(ª#€z#@ª#ˆz#8ª#z#(ª# z#°ª#¨z#Àª#Àz#°ª#Èz#Àª#àz#°ª#èz#Àª#{#à©#{#¸©#{#©#{#Ø©# {#°©#({#ˆ©#0{# ª#@{#È©#H{# ©#P{#x©#`{#@ª#h{#8ª#p{#(ª#€{#°ª#ˆ{#Àª# {#°ª#¨{#Àª#À{#°ª#È{#Àª#à{#à©#è{#¸©#ð{#©#ø{#ª#|#Ø©#|#°©#|#ˆ©#|#ª#@|#@ª#H|#8ª#P|#(ª#`|#È©#h|# ©#p|#x©#€|#@ª#ˆ|#8ª#|#(ª# |#@ª#¨|#8ª#°|#(ª#À|#°ª#È|#Àª#à|#°ª#è|#Àª#}#°ª#}#Àª# }#à©#(}#¸©#0}#©#8}#ª#@}#Ø©#H}#°©#P}#ˆ©#X}#ª#€}#È©#ˆ}# ©#}#x©# }#@ª#¨}#8ª#°}#(ª#À}#°ª#È}#Àª#à}#°ª#è}#Àª#~#°ª#~#Àª# ~#à©#(~#¸©#0~#©#8~#ª#@~#Ø©#H~#°©#P~#ˆ©#X~#ª#`~#Щ#h~#¨©#p~#€©#€~#H«#ˆ~#Às#¨~#@«#°~#(v#Ð~#8«#Ø~#`u#ø~#0«##@t# #(«#(# u#H# «#P#t#p#«#x#v#˜#«# #u#À#«#È#v#è#«#ð#€t#€#øª#€#àu#8€#ðª#@€#àt#`€#èª#h€#àv#ˆ€#àª#€#ûv#°€#ت#¸€#Hv#Ø€#Ъ#à€#Èv##Ȫ##¨v#(#Àª#0#hw#P#¸ª#X#ðv#x#°ª#€#ew# #¨ª#¨#w#È# ª#Ð#°u#ð#˜ª#ø#¸v#‚#ª# ‚#°t#@‚#ˆª#H‚#bw#h‚#€ª#p‚#_w#‚#xª#˜‚#\w#¸‚#pª#À‚#%w#à‚#hª#è‚#Øv#ƒ#`ª#ƒ#˜v#0ƒ#Xª#8ƒ#ˆv#Xƒ#Pª#`ƒ#xv#€ƒ#Hª#ˆƒ#hv#¨ƒ#@ª#°ƒ#Yw#Ѓ#8ª#؃#Vw#øƒ#0ª#„#Xv# „#(ª#(„#Sw#H„# ª#P„#qw#p„#ª#x„#Pw#˜„#ª# „#Mw#À„#ª#È„#Ðu#è„#ª#ð„#!w#…#ø©#…#w#8…#ð©#@…#8v#`…#è©#h…#ow#ˆ…#à©#…#Jw#°…#Ø©#¸…#Gw#Ø…#Щ#à…#Dw#†#È©#†#Aw#(†#À©#0†#mw#P†#¸©#X†#>w#x†#°©#€†#;w# †#¨©#¨†#8w#Ȇ# ©#І#5w#ð†#˜©#ø†#kw#‡#©# ‡#2w#@‡#ˆ©#H‡#/w#h‡#€©#p‡#,w#‡#x©#˜‡#)w#ø‡#Ø+ˆ#ÐWȈ#ÀŠ#؈#€‰#‰#lj#pX€‰#ì ˆ‰#pˆ¨‰#ð °‰# ˆÐ‰#ô ؉#Їø‰#ø Š#€‡ Š#ü (Š#0‡HŠ# PŠ#à†pŠ# xŠ#€bÀŠ# ÈŠ#ÀˆàŠ#è èŠ# ñ‹#C ‹#0¾ ‹# (‹#@P@‹# H‹#À?`‹#+ h‹#H¸‹#,Ћ#à[ø‹#iXŒ#€†`Œ# WˆŒ##˜Œ#@#ÈŒ#Ð’ØŒ#ÀX@#ì H#ðŠh#ð p# Š#ô ˜#PЏ#ø À#Šà#ü è#°‰Ž# Ž#`‰0Ž# 8Ž#PfXŽ# `Ž#àe€Ž# ˆŽ#pe¨Ž#$ °Ž#eÐŽ#( ØŽ#døŽ#, # d #0 (#°cH#4 P#@cp#8 x#‰˜#  #àb#C #@‹ # (#T@#6 H#p‚`#L h#Àf€#è ˆ#§ #C ¨#@À#B È# -Ø#@r#à# è# '‘# ‘#  ‘#+ (‘#àx‘#@,‘#€\¸‘#€r’#°V ’#ÐVH’#`“#X’#“#ˆ’#p¹˜’#0Y“# “# r`“#C h“#Œ€“# ˆ“#pT “#è ¨“#PzÀ“#C È“#à“# è“#`”# ”#  ”#+ (”#°`x”#x,”#À\¸”#Ðx•# † •#VH•#À˜#X•#–#ˆ•#@®˜•#Y–#ì –# ‘(–#ð 0–#ÐP–#ô X–#€x–#ø €–#0 –#ü ¨–#àÈ–# Ж#ð–#8 ø–#@—#  —#ðŽ@—# H—# Žh—# p—#PŽ—#$ ˜—#ޏ—#( À—#°à—#, è—#`˜#0 ˜#0˜#4 8˜#ÀŒX˜# `˜#PwÀ˜# Ș#PTà˜#C è˜#p‘™#L ™#°w ™#Ú (™#0«@™#6 H™#PŒ`™#è h™#€Ñ€™#C ˆ™#@ö ™#B ¨™#0丙#àr#À™# È™#0qà™# è™#pyš#+ š#ðhXš#°,pš#`]˜š#pøš#U›#°U(›# #8›#à›#h›# ¥x›#Zà›# è›#œ#ì œ#À“0œ#ð 8œ#p“Xœ#ô `œ# “€œ#ø ˆœ#Ð’¨œ#ü °œ#€’М# Øœ#0’ #C (#@#è H#ða`# h#P/€# ˆ#€7 #+ ¨#pXÀ#C È#”à# è#@T8ž#à,Pž#àWxž#ƒŸ#  #Ÿ#ÀŸ#HŸ#0XŸ#`ZÀŸ# ÈŸ#À”  #C ( #–@ #è H #ÀÓ˜ #-° # ]Ø #•8¡# U@¡#@Uh¡#€¢#x¡# ¢#¨¡#ظ¡#°Z ¢# (¢# ꀢ#C ˆ¢# ² ¢#è ¨¢# _ø¢#H-£#à]8£#`•˜£#°T £#ÐTÈ£#à¤#Ø£#€¤#¤#ðš¤#[€¤# ˆ¤#àíà¤#C è¤#@¥¥#è ¥#€PX¥#x-p¥#ðW˜¥#PÛ(¦#@§#8¦#à¦#h¦#™x¦#p[à¦# è¦#`Ü@§#C H§#0Ý`§#è h§#Ðão#o# o# (o# 0o# 8o#V@o#Ho#Po#Xo#`o#'ho#)po#*xo#0€o#1ˆo#4o#5˜o#Y o#:¨o#<°o#=¸o#?Ào#AÈo#[Ðo#EØo#Gào#Kèo#Lðo#Nøo#Tp# p#(p#0p#8p#@p# Hp# Pp#Xp#`p#hp#pp#xp#€p#ˆp#p#˜p# p#¨p#°p#¸p#Àp# Èp#!Ðp#"Øp##àp#$èp#%ðp#&øp#(q#+q#,q#-q#. q#/(q#20q#38q#6@q#7Hq#8Pq#9Xq#;`q#>hq#@pq#Bxq#C€q#Dˆq#Fq#H˜q#I q#J¨q#M°q#O¸q#PÀq#QÈq#RÐq#SHƒìH‹5!#H…Àtè›HƒÄÃÿ5²!#ÿ%´!#@ÿ%²!#héàÿÿÿÿ%ª!#héÐÿÿÿÿ%¢!#héÀÿÿÿÿ%š!#hé°ÿÿÿÿ%’!#hé ÿÿÿÿ%Š!#héÿÿÿÿ%‚!#hé€ÿÿÿÿ%z!#hépÿÿÿÿ%r!#hé`ÿÿÿÿ%j!#h éPÿÿÿÿ%b!#h é@ÿÿÿÿ%Z!#h é0ÿÿÿÿ%R!#h é ÿÿÿÿ%J!#h éÿÿÿÿ%B!#héÿÿÿÿ%:!#héðþÿÿÿ%2!#héàþÿÿÿ%*!#héÐþÿÿÿ%"!#héÀþÿÿÿ%!#hé°þÿÿÿ%!#hé þÿÿÿ% !#héþÿÿÿ%!#hé€þÿÿÿ%ú #hépþÿÿÿ%ò #hé`þÿÿÿ%ê #héPþÿÿÿ%â #hé@þÿÿÿ%Ú #hé0þÿÿÿ%Ò #hé þÿÿÿ%Ê #héþÿÿÿ% #héþÿÿÿ%º #héðýÿÿÿ%² #h éàýÿÿÿ%ª #h!éÐýÿÿÿ%¢ #h"éÀýÿÿÿ%š #h#é°ýÿÿÿ%’ #h$é ýÿÿÿ%Š #h%éýÿÿÿ%‚ #h&é€ýÿÿÿ%z #h'épýÿÿÿ%r #h(é`ýÿÿÿ%j #h)éPýÿÿÿ%b #h*é@ýÿÿÿ%Z #h+é0ýÿÿÿ%R #h,é ýÿÿÿ%J #h-éýÿÿÿ%B #h.éýÿÿÿ%: #h/éðüÿÿÿ%2 #h0éàüÿÿÿ%* #h1éÐüÿÿÿ%" #h2éÀüÿÿÿ% #h3é°üÿÿÿ% #h4é üÿÿÿ% #h5éüÿÿÿ% #h6é€üÿÿÿ%ú#h7épüÿÿÿ%Š#fÿ%#fAWAVE1ÿAUATI‰õUSHƒìH‹5­X#H‰<$H‹=ªY#è• H…À„ýE1äM…íH‰Åu1ÿèJüÿÿH…ÀI‰Å„€I‰ÄH‹=„Y#èïþÿÿH…ÀI‰ÆtièBþÿÿE1ÿH…ÀH‰Ãt^HƒÏÿènþÿÿH…ÀI‰ÂtMPjM‰ÑH‹t$H‰ÙL‰ò1ÀM‰èH‰ïL‰T$èÓýÿÿL‹T$I‰ÇI‹HPÿH…ÒI‰Y^uI‹RL‰×ÿR0ë1ÛE1ÿH‹EHPÿH…ÒH‰Uu H‹UH‰ïÿR0M…ätI‹$HPÿH…ÒI‰$u I‹T$L‰çÿR0H…ÛtH‹HPÿH…ÒH‰u H‹SH‰ßÿR0HƒÄL‰ø[]A\A]A^A_Ãf.„H=YT#HYT#UH)øH‰åHƒøvH‹Æ#H…Àt ]ÿàfD]Ã@f.„H=T#H5T#UH)þH‰åHÁþH‰ðHÁè?HÆHÑþtH‹)#H…Àt ]ÿàf„]Ã@f.„€=ÉS#u'Hƒ=#UH‰åt H‹=ò#èõýÿÿèHÿÿÿ]Æ S#óÃ@f.„H=#Hƒ?u é^ÿÿÿfDH‹y#H…ÀtéUH‰åÿÐ]é@ÿÿÿH‹GhHƒH‹GhÃH‹‡ÐHƒH‹‡ÐÃf.„H‹‡ðHƒH‹‡ðÃf.„H‹‡øHƒH‹‡øÃf.„H‹H‰ðH…ÿt H‰Öÿà€1ÀÃDH‹GH‹#HƒH…ÀH‰WtH‹HQÿH…ÒH‰t 1ÀÃfDHƒìH‹PH‰ÇÿR01ÀHƒÄÃf.„H‹H‰ðH…ÿt H‰Öÿà€1ÀÃDH‹GH‹-#HƒH…ÀH‰WtH‹HQÿH…ÒH‰t 1ÀÃfDHƒìH‹PH‰ÇÿR01ÀHƒÄÃf.„H‹hH‰ðH…ÿt H‰Öÿà€1ÀÃDH‹GhH‹½#HƒH…ÀH‰WhtH‹HQÿH…ÒH‰t 1ÀÃfDHƒìH‹PH‰ÇÿR01ÀHƒÄÃf.„USH‰ýHƒìH‹h#H‹¿ÈH‹H‰ÈHƒÀH…ÿH‰t Hƒ/tmH‹H‹½ÐHƒÀH‰ÐH‰H…ÿt Hƒ/t:H‹H‹½ØHƒÀH‰ØH‰H…ÿt Hƒ/uH‹GÿP0HƒÄ1À[]ÀH‹GÿP0ë½€H‹GÿP0늀H‹¿ðH‰ðH…ÿt H‰Öÿà@1ÀÃDH‹‡ðH‹š#HƒH…ÀH‰—ðtH‹HQÿH…ÒH‰t1ÀÃHƒìH‹PH‰ÇÿR01ÀHƒÄÃf.„USH‰ýHƒìH‹H#H‹¿ðH‹H‰ðHƒÀH…ÿH‰t Hƒ/tmH‹H‹½øHƒÀH‰øH‰H…ÿt Hƒ/t:H‹H‹½HƒÀH‰H‰H…ÿt Hƒ/uH‹GÿP0HƒÄ1À[]ÀH‹GÿP0ë½€H‹GÿP0늀H‹Gÿ @fDëî@f.„ëÞ@f.„A‰ðAƒèxWIcȉðHÁá9|C1öE…Àu ë@~8pD9Æ}&D‰À)ð‰ÁÁéÈÑøðHcÈHÁá‹ 9Ê}ØA‰ÀD9Æ|Ú1ö9Ê@ŸÆðóÃ@‹1À1ö9Ê@ŸÆðëêHƒìö‡ªu#1öÿ—0H…Àt H‹ßR#H‰PHƒÄÃfDH‹ù#1ÒH‹5S#ÿ8ëÍ„Hƒìö‡ªuC1öÿ—0H…Àt1H‹—R#H‰PH‹Œ#H‹2H‰ðH‰øH‰HNH‰ HƒÄÃH‹‰#1ÒH‹5˜R#ÿ8ë­„Hƒìö‡ªu31öÿ—0H…ÀtH‹/R#H‰PH‹#HƒH‰ðHƒÄÃ@H‹)#1ÒH‹58R#ÿ8뽄Hƒìö‡ªuC1öÿ—0H…Àt1H‹×Q#H‰PH‹¼#H‹2H‰ÈH‰ÐH‰ØHNH‰ HƒÄÃH‹¹#1ÒH‹5ÈQ#ÿ8ë­„Hƒìö‡ªu31öÿ—0H…ÀtH‹oQ#H‰PH‹L#HƒH‰PhHƒÄÀH‹Y#1ÒH‹5hQ#ÿ8뽄Hƒìö‡ªu#1öÿ—0H…Àt H‹Q#H‰PHƒÄÃfDH‹ #1ÒH‹5Q#ÿ8ëÍ„Hƒìö‡ªu31öÿ—0H…ÀtH‹ÏP#H‰PH‹œ#HƒH‰PHƒÄÀH‹©#1ÒH‹5¸P#ÿ8뽄Hƒìö‡ªu31öÿ—0H…ÀtH‹wP#H‰PH‹<#HƒH‰PHƒÄÀH‹I#1ÒH‹5XP#ÿ8뽄ö‡ªuH‹‡01öÿà@H‹#1ÒH‹5 P#H‹€8ÿàDf.„H‹WH‹‚H…ÀtÿàfDH‹B@H…ÀtHƒÆ$ÿàé„õÿÿ@SH‰ûè×õÿÿH‹»ðH…ÿtHǃðHƒ/tjH‹»øH…ÿtHǃøHƒ/t=H‹»H…ÿtHǃHƒ/uH‹GÿP0H‹CH‰ß[H‹€@ÿà„H‹GÿP0뺀H‹GÿP0ë€SH‰ûè7õÿÿH‹»ðH…ÿtHǃðHƒ/uH‹GÿP0H‹CH‰ß[H‹€@ÿàfSH‰ûè÷ôÿÿH‹»ÈH…ÿtHǃÈHƒ/tjH‹»ÐH…ÿtHǃÐHƒ/t=H‹»ØH…ÿtHǃØHƒ/uH‹GÿP0H‹CH‰ß[H‹€@ÿà„H‹GÿP0뺀H‹GÿP0ë€SH‰ûèWôÿÿH‹{hH…ÿtHÇChHƒ/uH‹GÿP0H‹CH‰ß[H‹€@ÿà„SH‰ûèôÿÿH‹{H…ÿtHÇCHƒ/uH‹GÿP0H‹CH‰ß[H‹€@ÿà„SH‰ûè×óÿÿH‹{H…ÿtHÇCHƒ/uH‹GÿP0H‹CH‰ß[H‹€@ÿà„US1ÒH‰ýH‰÷1öHƒìèÛòÿÿH…ÀtLH‹5ïK#H‰ÂH‰ïH‰Ãè¡òÿÿ…ÀH‹xHPÿ1ÀH…ÒH‰t4HƒÄ[]ÃDHƒèH…ÀH‰u H‹CH‰ßÿP0HƒÄ¸ÿÿÿÿ[]ÃfDH‹S‰D$ H‰ßÿR0‹D$ HƒÄ[]ÃDf.„AWAVAUATI‰üUS‰Õ‰óHƒì…öH‰L$u…Ò„*A‰×ëDA‰÷L‹5nL#M…ö„ÕD‹-VL#D‰úL‰÷D‰îèèøÿÿA9ÅŽ·H˜HÁàLðD98…¥L‹`Iƒ$H‹#H‹~L#1ÉL‰æH‹8èiïÿÿH…ÀH‰ÃtQ‰h|H‰ÇèVðÿÿIƒ,$„ÛHƒ+tHƒÄ[]A\A]A^A_ÃfDH‹CH‰ßH‹@0HƒÄ[]A\A]A^A_ÿàDIƒ,$uÄI‹D$L‰çH‹@0HƒÄ[]A\A]A^A_ÿàDH‹|$è>ðÿÿH…ÀI‰Åt‘…Ût8H{ªH=‹ª‰ÙL‰æ1Àè¸ðÿÿI‰Æë$H‹|$èðÿÿH…ÀI‰Å„UÿÿÿL‰çèòïÿÿI‰ÆM…ö„6L‹ wK#L‹hK#1É1Ò1ö1ÿAPUAVAUAQAQAQAQèìîÿÿI‰ÄI‹EHƒÄ@HƒèH…ÀI‰E„ Iƒ.„¦M…ä„èþÿÿ…ÛL‹=ÌJ#…¾…í„’þÿÿA‰îM…ÿ„Š‹¤J#D‰òL‰ÿ‰Æ‰Ã‰D$è1÷ÿÿLcèD9ë޵IcõHÁæLþD96„‹D$;lJ#„ž‹T$fDHcƒêHÁàA9ÕI‹LðI‹\øI‰ I‰\|ÞD‹T$D‰6L‰fAƒÂD‰J#Iƒ$éñýÿÿDI‹D$L‰çÿP0éþÿÿA‰ÞéEÿÿÿ„Iƒm…þÿÿI‹EL‰ïH‹@0éþÿÿD‹D$;ÊI#uT‹\$L‰ÿƒÃ@HcóHÁæèÞíÿÿH…ÀI‰Ç„~ýÿÿH‰£I#‹•I#IcõHÁ扌I#LþA9ʼnD$Œÿÿÿé=ÿÿÿIÁåK4/é-ÿÿÿH‹~L‰fHƒ/…-ýÿÿH‹GÿP0é!ýÿÿDI‹EL‰ïÿP0éQþÿÿI‹FL‰÷ÿP0éKþÿÿ¿è6ïÿÿH…À„éüÿÿH‰I#ÇI#@ÇòH#D‰0L‰`Iƒ$é½üÿÿSH‰û¿HƒìèîëÿÿH…ÀtHƒH‹PH‰HƒÄ[ÄH ¡©H=Ê©º ¾.FH‰D$èîûÿÿH‹D$HƒÄ[ÃSH‰û¿HƒìèŽëÿÿH…ÀtHƒH‹PH‰HƒÄ[ÄH A©H=²©ºì¾57H‰D$èŽûÿÿH‹D$HƒÄ[ÃHƒì‹‡…ÀtòG0èxìÿÿH…ÀtCHƒÄÃfDòGPè^ìÿÿH…À¾»6uáH Õ¨H=Ž©ºæè,ûÿÿ1ÀHƒÄÃD¾¶6ëÕf„Hƒì‹‡…ÀtòG(èìÿÿH…ÀtCHƒÄÃfDòGHèîëÿÿH…À¾q6uáH e¨H=^©ºãè¼úÿÿ1ÀHƒÄÃD¾l6ëÕf„Hƒì‹‡…ÀtòG è˜ëÿÿH…ÀtCHƒÄÃfDòG@è~ëÿÿH…À¾'6uáH õ§H=.©ºàèLúÿÿ1ÀHƒÄÃD¾"6ëÕf„Hƒì‹‡…ÀtòGè(ëÿÿH…ÀtCHƒÄÃfDòG8èëÿÿH…À¾Ý5uáH …§H=þ¨ºÜèÜùÿÿ1ÀHƒÄÃD¾Ø5ëÕf„Hƒì‹‡…ÀtòGPè¸êÿÿH…ÀtCHƒÄÃfDòG0èžêÿÿH…À¾“5uáH §H=ΨºØèlùÿÿ1ÀHƒÄÃD¾Ž5ëÕf„Hƒì‹‡…ÀtòGHèHêÿÿH…ÀtCHƒÄÃfDòG(è.êÿÿH…À¾I5uáH ¥¦H=ž¨ºÕèüøÿÿ1ÀHƒÄÃD¾D5ëÕf„Hƒì‹‡…ÀtòG@èØéÿÿH…ÀtCHƒÄÃfDòG è¾éÿÿH…À¾ÿ4uáH 5¦H=n¨ºÒèŒøÿÿ1ÀHƒÄÃD¾ú4ëÕf„Hƒì‹‡…ÀtòG8èhéÿÿH…ÀtCHƒÄÃfDòGèNéÿÿH…À¾µ4uáH Å¥H=>¨ºÎèøÿÿ1ÀHƒÄÃD¾°4ëÕf„AVAUATUS‹‡H‰ûòGh…À„‚fW:ÈèåèÿÿH…ÀH‰Å„ òCpfWÈèÇèÿÿH…ÀI‰Å„ûòCxfWþÇè©èÿÿH…ÀI‰Ä„U¿èóèÿÿH…À„¢H‰hL‰h L‰`([]A\A]A^ÃDèkèÿÿH…ÀH‰Åt[òCpèYèÿÿH…ÀI‰Ä„­òCxèCèÿÿH…ÀI‰Å„Ç¿èèÿÿH…À„ H‰hL‰` L‰h([]A\A]A^ÀA¾²;»+H ~¤H=7§‰ÚD‰öèÕöÿÿ[1À]A\A]A^Ãf.„A¾‹;»)ëÆHƒm„á»)A¾;ë«„A¾´;»+DH…ítŽHƒmu‡H‹EH‰ïÿP0éxÿÿÿD»+A¾¶;DIƒ,$uÉI‹D$L‰çÿP0ë¼@A¾;Hƒmt[I‹E1í»)HƒèH…ÀI‰Et+M…äu¾ëŒ@I‹E»+A¾¸;HƒèH…ÀI‰Euœ@I‹EL‰ïÿP0ëÉ@A¾‘;ëžH‹EH‰ïÿP0ë™H‹EH‰ïÿP0éÿÿÿDAWAVAUATI‰ýUSHƒì8‹‡…À„ òG8è—æÿÿH…ÀH‰Ã„#òAE@è€æÿÿH…ÀI‰Æ„´òAEHèiæÿÿH…ÀH‰D$„òAEPèPæÿÿH…ÀH‰D$„ròAEè7æÿÿH…ÀH‰$„ŠòAE èæÿÿH…ÀH‰D$„±òAE(èæÿÿH…ÀI‰Ä„ÚòAE0èïåÿÿH…ÀH‰Å„¿è‰äÿÿH…ÀI‰Ç„ýH‹@H‹T$H‹t$H‹<$H‹L$H‰I‹GL‰pI‹GH‰PI‹GH‰pI‹GH‰x I‹GH‰H(I‹GL‰`0I‹GH‰h8I‹…øH;#„÷Hƒx„ì¿èäÿÿH…ÀI‰Æ„ÖI‹…øL‰öL‰ÿHƒI‹FI‹•øH‰è2äÿÿH…ÀH‰Å„Iƒ.„ H‰ïèäãÿÿH…ÀI‰Ä„Hƒm„mH‹=F@#L‰æè^æÿÿH…ÀH‰Ã„ Iƒ,$„¿€Iƒ/u I‹GL‰ÿÿP0HƒÄ8H‰Ø[]A\A]A^A_ÃfDòGèŽäÿÿH…ÀH‰Ã„âòAE èwäÿÿH…ÀH‰Å„{òAE(è`äÿÿH…ÀI‰Ä„äòAE0èIäÿÿH…ÀH‰D$„KòAE8è0äÿÿH…ÀH‰$„«òAE@èäÿÿH…ÀH‰D$„ÊòAEHèÿãÿÿH…ÀH‰D$„ñòAEPèæãÿÿH…ÀI‰Æ„¿è€âÿÿH…ÀI‰Ç„tH‹@H‹T$H‹4$H‹|$H‹L$H‰I‹GH‰hI‹GL‰`I‹GH‰PI‹GH‰p I‹GH‰x(I‹GH‰H0I‹GL‰p8éòýÿÿDE1ÿA½¾3ÇD$$Ä1íE1äHÇD$HÇ$H‹4$H…ötH‹H‰D$HƒèH…ÀH‰„H‹L$H…ÉtH‹H‰$HƒèH…ÀH‰„M…ät Iƒ,$„ÎH…ít Hƒm„ÎH…Ût Hƒ+„ï‹T$$H LŸH==¢D‰î1Ûè£ñÿÿM…ÿ…êýÿÿéõýÿÿDE1ÿA½ý3ÇD$$Æ1íE1äHÇD$HÇ$é4ÿÿÿ@L‰ÿèHáÿÿH…ÀI‰Æ„¼H‹=½=#L‰öèÍãÿÿH…ÀH‰Ã„Iƒ.…wýÿÿI‹FL‰÷ÿP0éhýÿÿ„I‹D$L‰çÿP0é"ÿÿÿH‹EH‰ïÿP0é#ÿÿÿH‹FH‰÷ÿP0éÒþÿÿH‹AH‰ÏÿP0éãþÿÿH‹CH‰ßÿP0éÿÿÿA½Î3ÇD$$ÄfHƒ+tz1ÛM…öt Iƒ.„H‹L$H…ÉtH‹H‰D$(HƒèH…ÀH‰t{H‹T$H…Ò„=þÿÿH‹H‰D$HƒèH…ÀH‰…%þÿÿH‹BH‰×ÿP0éþÿÿfDA½ 4ÇD$$ÆëˆH‹CH‰ß1ÛÿP0éwÿÿÿ€I‹FL‰÷ÿP0épÿÿÿf„H‹AH‰ÏÿP0évÿÿÿI‹FL‰÷ÿP0éåûÿÿA½ÿ3ÇD$$ÆE1äHÇD$HÇ$E1ÿé†ýÿÿfDE1ÿA½À3ÇD$$Ä1íE1äHÇD$HÇ$HÇD$HÇD$éÂþÿÿfH‹EH‰ïÿP0é„ûÿÿA½4ÇD$$ÆHÇD$HÇ$E1ÿé ýÿÿf„A½Â3ÇD$$Ä1íE1äHÇD$HÇ$HÇD$E1ÿéKþÿÿI‹D$L‰çÿP0é8ûÿÿ„A½4ÇD$$ÆHÇ$E1ÿé’üÿÿfA½Ä3ÇD$$Ä1íE1äHÇD$HÇ$E1ÿéäýÿÿ@A½Æ3ÇD$$Ä1íE1äHÇD$E1ÿé¼ýÿÿ@A½4ÇD$$ÆE1ÿé"üÿÿfA½È3ÇD$$Ä1íE1äE1ÿé…ýÿÿDA½4ÇD$$ÆE1ÿéêûÿÿf.„A½Ê3ÇD$$Ä1íE1ÿéHýÿÿ„A½ 4ÇD$$ÆE1ÿé_ýÿÿf.„A½Ì3ÇD$$ÄE1ÿé ýÿÿf.„E1ÿA½ 4ÇD$$Æéýÿÿf.„1ÛA½b4ÇD$$Ê1íE1äHÇD$HÇ$é5ûÿÿD1ÛA½>4ÇD$$È1íE1äHÇD$HÇ$éûÿÿDA½d4ÇD$$Ê1íE1äHÇD$HÇ$HÇD$HÇD$éMüÿÿDL‰óA½C4E1öÇD$$Èé8ýÿÿ€1ÛI‰îA½F4ÇD$$Èë™E1öL‰ãA½I4ëÆf.„SH‰û¿HƒìèNÜÿÿH…ÀtHƒH‹PH‰HƒÄ[ÄH šH=*ºK¾)H‰D$èNìÿÿH‹D$HƒÄ[ÃAWAVI‰ÿAUATUSHƒì(òGè5ÝÿÿH…ÀH‰D$„ßòAG èÝÿÿH…ÀI‰Æ„PòAG(èÝÿÿH…ÀH‰Ã„ÉòAG0èîÜÿÿH…ÀI‰Ä„ÒòAG8è×ÜÿÿH…ÀH‰Å„ÓòAG@èÀÜÿÿH…ÀI‰Å„ÔòAGHè©ÜÿÿH…ÀH‰Æ„µòAGPH‰D$èÜÿÿH…ÀH‰ÁH‹t$„¬¿H‰D$èÍÜÿÿH…ÀH‰ÂH‹t$H‹L$„—H‹D$H‹={7#H‰rHL‰r H‰ÖH‰Z(L‰b0H‰BH‰j8L‰j@H‰JPH‰T$èžÝÿÿH…ÀH‹T$„`H‹HKÿH…ÉH‰ „HƒÄ([]A\A]A^A_ÃfDA¿Û)1ÉH‹|$H‹H‰D$HƒèH…ÀH‰„4Iƒ.„]H…Ût Hƒ+„zM…ä„ I‹$1ÒHƒèH…ÀI‰$„²H…ít Hƒm„rM…ít Iƒm„ÊH…ötHƒ.tWH…ÉtHƒ)ttH…ÒtHƒ*t1H Ê—H=;›D‰þºNèêÿÿHƒÄ(1À[]A\A]A^A_ÃDH‹BH‰×ÿP0ëÃ@H‹FH‰L$H‰÷H‰T$ÿP0H‹L$H‹T$뉄H‹AH‰T$H‰ÏÿP0H‹T$ésÿÿÿ€H‹\$H‹H‰D$HƒèH…ÀH‰…A¿Ñ)1ÛE1ä1íE1í1ö1ÉH‹|$H‰L$H‰t$H‹GÿP0M…öH‹t$H‹L$„­þÿÿIƒ.…£þÿÿI‹FH‰L$L‰÷H‰t$ÿP0H‹L$H‹t$é€þÿÿf„H‹CH‰L$H‰ßH‰t$ÿP0H‹L$H‹t$écþÿÿDH‹EH‰L$H‰ïH‰t$H‰T$ÿP0H‹L$H‹t$H‹T$éaþÿÿI‹D$H‰L$L‰çH‰t$H‰T$ÿP0H‹L$H‹t$H‹T$é þÿÿf.„I‹EH‰L$L‰ïH‰t$H‰T$ÿP0H‹L$H‹t$H‹T$é þÿÿH‹JH‰D$H‰×ÿQ0H‹D$HƒÄ([]A\A]A^A_ÃDA¿Ï)1Ò1ÉéÚýÿÿf„A¿Ó)1É1öE1í1íE1äé9ýÿÿf„A¿Õ)1É1öE1í1íéýÿÿ@A¿×)1É1öE1íéýÿÿfDA¿Ù)1É1öéñüÿÿA¿Ý)éåüÿÿDA¿ß)éÕüÿÿDA¿ù)1ÉéDýÿÿE1í1í1É1öA¿Ñ)1Òéýÿÿf.„SH‰û¿Hƒìè×ÿÿH…ÀtHƒH‹PH‰HƒÄ[ÄH Ñ”H=‚˜ºì¾8H‰D$èçÿÿH‹D$HƒÄ[ÃAUATUSH‰ûHƒìòG@è ØÿÿH…ÀtTòCHH‰Åè÷×ÿÿH…ÀI‰ÄtoòCPèå×ÿÿH…ÀH‰Ãt}¿è3ØÿÿH…À„ªH‰hL‰` H‰X(HƒÄ[]A\A]ÃA½íH +”H=$˜D‰îºöèæÿÿHƒÄ1À[]A\A]ÃfHƒmuaH‹EH‰ïA½ïÿP0ë½€A½ñHƒmtFIƒ,$tH…ÛtHƒ+u—H‹CH‰ßÿP0ë‹DI‹D$L‰çÿP0ë×A½óë¾A½ïécÿÿÿH‹EH‰ïÿP0ë®AWAVI‰ÿAUATUSHƒì8H‹‡ÐH;‰ö"t Hƒx…,òAGXèÉÖÿÿH…ÀH‰Ã„òAG`è²ÖÿÿH…ÀI‰Å„6òAGhè›ÖÿÿH…ÀH‰Å„§òAGpè„ÖÿÿH…ÀH‰D$„ÖòAGxèkÖÿÿH…ÀH‰D$„íòA‡€èOÖÿÿH…ÀH‰D$„òAG0è6ÖÿÿH…ÀI‰Æ„¿è€ÖÿÿH…ÀI‰Ä„H‹|$H‰XL‰h H‰h(H‹t$H‹D$I‰|$@H‹=E1#M‰t$HI‰t$8I‰D$0L‰æèV×ÿÿH…ÀI‰Æ„šIƒ,$„?HƒÄ8L‰ð[]A\A]A^A_ÃDòGXèžÕÿÿH…ÀI‰Ä„"òAG`è‡ÕÿÿH…ÀI‰Æ„+òAGhèpÕÿÿH…ÀH‰D$„JòAGpèWÕÿÿH…ÀH‰D$„òAGxè>ÕÿÿH…ÀH‰D$„¨òA‡€è"ÕÿÿH…ÀH‰Å„¾òAG0è ÕÿÿH…ÀH‰Ã„׿èUÕÿÿH…ÀI‰Å„ L‰p L‰`L‰îH‹D$H‹T$H‹L$I‰m@I‰]HI‰E(I‰U0I‰M8I‹‡ÐHƒI‹‡ÐH‹=ò/#I‰EPèÖÿÿH…ÀI‰Æ„=Iƒm…ÃþÿÿI‹EL‰ïÿP0é´þÿÿA¿¤ÇD$$£E1í1Û1íHÇD$fH‹t$H…ötH‹H‰D$HƒèH…ÀH‰tJH…ítHƒmtNH…ÛtHƒ+tSM…ítIƒmtW‹T$$H ŒH=½”D‰þE1öèââÿÿé.þÿÿDH‹FH‰÷ÿP0ëª@H‹EH‰ïÿP0ë¦@H‹CH‰ßÿP0ë¡@I‹EL‰ïÿP0ë@A¿åÇD$$¥E1í1íHÇD$é7ÿÿÿ€I‹D$L‰çÿP0é±ýÿÿA¿çÇD$$¥1íHÇD$éÿÿÿf1ÛA¿ÌÇD$$£1íHÇD$éàþÿÿ1ÛA¿ ÇD$$¥1íHÇD$HÇD$HÇD$I‹$E1íHƒèH…ÀI‰$ttM…ötIƒ.tYH‹T$H…ÒtH‹H‰D$(HƒèH…ÀH‰tcH‹L$H…É„eþÿÿH‹H‰D$HƒèH…ÀH‰…MþÿÿH‹AH‰ÏÿP0é>þÿÿfDI‹FL‰÷ÿP0ë›@I‹D$L‰çÿP0é|ÿÿÿ„H‹BH‰×ÿP0ë‘@1ÛA¿¦ÇD$$£1íHÇD$HÇD$HÇD$éÿÿÿfDA¿¨ÇD$$£1Û1íHÇD$HÇD$éïþÿÿ€A¿éÇD$$¥HÇD$é|ýÿÿ@A¿ªÇD$$£1Û1íHÇD$é¨þÿÿ„A¿ëÇD$$¥é=ýÿÿDA¿¬ÇD$$£1Û1íéqþÿÿA¿íÇD$$¥é ýÿÿDA¿®ÇD$$£1ÛéCþÿÿA¿ïÇD$$¥éjþÿÿDA¿°ÇD$$£éþÿÿDA¿ñÇD$$¥éþÿÿDA¿óÇD$$¥éùýÿÿDA¿²ÇD$$£éÍýÿÿf.„SH‰û¿Hƒìè^ÏÿÿH…ÀtHƒH‹PH‰HƒÄ[ÄH H=‚‘ºm¾{H‰D$è^ßÿÿH‹D$HƒÄ[ÃAWAVAUATI‰üUSHƒìH‹GhH;ìï"t Hƒx…ÇòAD$è+ÐÿÿH…ÀH‰Ã„ÇòAD$ èÐÿÿH…ÀH‰Å„ÇòAD$(èûÏÿÿH…ÀI‰Æ„_òAD$0èãÏÿÿH…ÀI‰Ç„‡¿è-ÐÿÿH…ÀI‰Å„‘H‹=â*#H‰XH‰ÆH‰h L‰p(L‰x0è"ÑÿÿH…ÀH‰Ã„ŽIƒm„ëHƒÄH‰Ø[]A\A]A^A_Ãf„òGèfÏÿÿH…ÀI‰Å„ÊòAD$ èNÏÿÿH…ÀI‰Ç„JòAD$(è6ÏÿÿH…ÀI‰Æ„²òAD$0èÏÿÿH…ÀH‰Ã„Ò¿èhÏÿÿH…ÀH‰Å„äH‰X0L‰hH‰îL‰x L‰p(I‹D$hHƒI‹D$hH‹=ô)#H‰E8èKÐÿÿH…ÀH‰Ã„ÏHƒm…)ÿÿÿH‹EH‰ïÿP0éÿÿÿDI‹EL‰ïÿP0éÿÿÿÇD$ A¼wf‹t$ H ýŠH=¶D‰â1ÛèTÝÿÿéÔþÿÿ€ÇD$ ±A¼yëÈ„ÇD$ ³A¼yfH…ÛtHƒ+tH…ít Hƒmu™H‹EH‰ïÿP0ëDH‹CH‰ßÿP0ë×@ÇD$ A¼wIƒm…_ÿÿÿ1ÛE1ÿE1öI‹EL‰ï1íÿP0M…ÿtIƒ/t M…öt‹Iƒ.u…I‹FL‰÷ÿP0évÿÿÿfDI‹GL‰ÿÿP0ëÔ@ÇD$ µA¼yéMÿÿÿDÇD$ ƒ1ÛIƒm„†1íA¼wë“f„A¼yÇD$ ·ë…ÇD$ …ëÈfDÇD$ ¹A¼yéWÿÿÿDÇD$ ‡ë fDÇD$ ÇA¼yé ÿÿÿDÇD$ ˜A¼wé¸þÿÿA¼wéûþÿÿfAWAVAUATUSH‰ûHƒìòG@èµÌÿÿH…À„TòCHI‰ÆèŸÌÿÿH…ÀI‰Å„sòCPè‰ÌÿÿH…ÀH‰Å„5òC(èsÌÿÿH…ÀI‰Ä„7òC0è]ÌÿÿH…ÀH‰Â„9òC8H‰$èCÌÿÿH…ÀI‰ÇH‹$„3¿è‰ÌÿÿH…ÀH‰ÃH‹$tUH‹=V'#L‰pH‰ÆL‰h H‰h(L‰`0H‰P8L‰x@èvÍÿÿH…À„ýH‹ HQÿH…ÒH‰„ZHƒÄ[]A\A]A^A_ÃÇ$Iƒ.„±Iƒm„ÎH…ít Hƒm„ÛM…ät Iƒ,$„ëH…ÒtHƒ*t@M…ÿtIƒ/tE‹4$H ó‡H=쌺bèJÚÿÿHƒÄ1À[]A\A]A^A_Ãf„H‹BH‰×ÿP0ë´@I‹GL‰ÿÿP0ë¯@Iƒ.…FÇ$ 1ÒE1ÿE1ä1íI‹FH‰T$L‰÷ÿP0M…íH‹T$„=ÿÿÿIƒm…2ÿÿÿI‹EH‰T$L‰ïÿP0H‹T$éÿÿÿ@H‹EH‰T$H‰ïÿP0H‹T$é ÿÿÿ€I‹D$H‰T$L‰çÿP0H‹T$éûþÿÿfDH‹SH‰$H‰ßÿR0H‹$HƒÄ[]A\A]A^A_ÀÇ$é×þÿÿ@Ç$ E1ÿ1ÒE1äétþÿÿ@Ç$E1ÿ1Òé_þÿÿ€Ç$E1ÿéIþÿÿf„Ç$é4þÿÿ@Hƒ+Ç$(…jþÿÿH‹CH‰ßÿP0é[þÿÿE1ÿ1ÒÇ$ é4þÿÿDf.„ATUI‰ÔSH‰ûH‹¿ÈH‰õH…ÿt H‰ÖÿÕ…Àu6H‹»ÐH…ÿt L‰æÿÕ…Àu!H‹»Ø1ÀH…ÿt[L‰æH‰è]A\ÿà€[]A\ÃATUI‰ÔSH‰ûH‹¿ðH‰õH…ÿt H‰ÖÿÕ…Àu6H‹»øH…ÿt L‰æÿÕ…Àu!H‹»1ÀH…ÿt[L‰æH‰è]A\ÿà€[]A\ÃHƒìò‡ÈèßÈÿÿH…Àt HƒÄÃDH Q…H=‚Šºž¾ÿEH‰D$èž×ÿÿH‹D$HƒÄÃ@Hƒìò‡ÀèÈÿÿH…Àt HƒÄÃDH …H=rŠºœ¾ÐEH‰D$èN×ÿÿH‹D$HƒÄÃ@Hƒìò‡¸è?ÈÿÿH…Àt HƒÄÃDH ±„H=bŠºš¾¡EH‰D$èþÖÿÿH‹D$HƒÄÃ@Hƒìò‡°èïÇÿÿH…Àt HƒÄÃDH a„H=RŠº˜¾rEH‰D$è®ÖÿÿH‹D$HƒÄÃ@Hƒìò‡¨èŸÇÿÿH…Àt HƒÄÃDH „H=BŠº–¾CEH‰D$è^ÖÿÿH‹D$HƒÄÃ@Hƒìò‡ èOÇÿÿH…Àt HƒÄÃDH ÁƒH=2Šº”¾EH‰D$èÖÿÿH‹D$HƒÄÃ@Hƒì1ÿèµÅÿÿH…ÀtHƒÄÃH yƒH=*Šº¤¾hFH‰D$èÆÕÿÿH‹D$HƒÄÃff.„Hƒìò‡˜è¯ÆÿÿH…Àt HƒÄÃDH !ƒH=Šºê¾þ6H‰D$ènÕÿÿH‹D$HƒÄÃ@Hƒìò‡Èè_ÆÿÿH…Àt HƒÄÃDH Ñ‚H= Šº¿¾t3H‰D$èÕÿÿH‹D$HƒÄÃ@Hƒìò‡ÀèÆÿÿH…Àt HƒÄÃDH ‚H=ú‰º½¾E3H‰D$èÎÔÿÿH‹D$HƒÄÃ@Hƒìò‡¸è¿ÅÿÿH…Àt HƒÄÃDH 1‚H=ꉺ»¾3H‰D$è~ÔÿÿH‹D$HƒÄÃ@Hƒìò‡°èoÅÿÿH…Àt HƒÄÃDH áH=Ú‰º¹¾ç2H‰D$è.ÔÿÿH‹D$HƒÄÃ@Hƒìò‡¨èÅÿÿH…Àt HƒÄÃDH ‘H=ʉº·¾¸2H‰D$èÞÓÿÿH‹D$HƒÄÃ@Hƒìò‡ èÏÄÿÿH…Àt HƒÄÃDH AH=º‰ºµ¾‰2H‰D$èŽÓÿÿH‹D$HƒÄÃ@USH‰ýHƒìH‹FH;¤ä"H‹ä"tSH9ÞtNH‹HH‹Ûã"HH5H‹81Àè«ÅÿÿH Ì€H=…‰º¾:èÓÿÿHƒÄ1À[]ÃDHƒH‹•øHƒ*tH‰µøHƒHƒÄH‰Ø[]Ãf.„H‹½øH‰t$H‹GÿP0H‹t$ëÇfDUSH‰ýHƒìH‹FH;äã"H‹]ã"tSH9ÞtNH‹HH‹ã"H^~H5\~H‹81ÀèëÄÿÿH €H=ýˆºQ¾@*è^ÒÿÿHƒÄ1À[]ÃDHƒH‹•ðHƒ*tH‰µðHƒHƒÄH‰Ø[]Ãf.„H‹½ðH‰t$H‹GÿP0H‹t$ëÇfDHƒìòG0èÃÿÿH…Àt HƒÄÄH qH=¢ˆºê¾H‰D$è¾ÑÿÿH‹D$HƒÄÃ@Hƒìò‡€è¯ÂÿÿH…Àt HƒÄÃDH !H=’ˆºç¾ÂH‰D$ènÑÿÿH‹D$HƒÄÃ@HƒìòGxèbÂÿÿH…Àt HƒÄÄH Ñ~H=‚ˆºä¾ƒH‰D$èÑÿÿH‹D$HƒÄÃ@HƒìòGpèÂÿÿH…Àt HƒÄÄH ~H=rˆºà¾DH‰D$èÎÐÿÿH‹D$HƒÄÃ@HƒìòG0èÂÁÿÿH…Àt HƒÄÄH 1~H=bˆºÜ¾H‰D$è~ÐÿÿH‹D$HƒÄÃ@HƒìòGhèrÁÿÿH…Àt HƒÄÄH á}H=RˆºÙ¾ÆH‰D$è.ÐÿÿH‹D$HƒÄÃ@HƒìòG`è"ÁÿÿH…Àt HƒÄÄH ‘}H=BˆºÖ¾‡H‰D$èÞÏÿÿH‹D$HƒÄÃ@HƒìòGXèÒÀÿÿH…Àt HƒÄÄH A}H=2ˆºÒ¾HH‰D$èŽÏÿÿH‹D$HƒÄÃ@Hƒìò‡èÀÿÿH…Àt HƒÄÃDH ñ|H="ˆºÎ¾ H‰D$è>ÏÿÿH‹D$HƒÄÃ@Hƒìò‡Àè/ÀÿÿH…Àt HƒÄÃDH ¡|H=ˆº±¾5H‰D$èîÎÿÿH‹D$HƒÄÃ@Hƒìò‡¸èß¿ÿÿH…Àt HƒÄÃDH Q|H= ˆº¯¾H‰D$èžÎÿÿH‹D$HƒÄÃ@Hƒìò‡°è¿ÿÿH…Àt HƒÄÃDH |H=ú‡º­¾×H‰D$èNÎÿÿH‹D$HƒÄÃ@Hƒìò‡¨è?¿ÿÿH…Àt HƒÄÃDH ±{H=ꇺ«¾¨H‰D$èþÍÿÿH‹D$HƒÄÃ@Hƒìò‡ èï¾ÿÿH…Àt HƒÄÃDH a{H=Ú‡º©¾yH‰D$è®ÍÿÿH‹D$HƒÄÃ@Hƒìò‡˜èŸ¾ÿÿH…Àt HƒÄÃDH {H=ʇº§¾JH‰D$è^ÍÿÿH‹D$HƒÄÃ@USH‰ýHƒìH‹FH;tÞ"H‹íÝ"tSH9ÞtNH‹HH‹«Ý"HîxH5ìxH‹81Àè{¿ÿÿH œzH=•‡ºó¾¦èîÌÿÿHƒÄ1À[]ÃDHƒH‹•ÐHƒ*tH‰µÐHƒHƒÄH‰Ø[]Ãf.„H‹½ÐH‰t$H‹GÿP0H‹t$ëÇfDHƒìòG`è’½ÿÿH…Àt HƒÄÄH zH=:‡º…¾ïH‰D$èNÌÿÿH‹D$HƒÄÃ@HƒìòGXèB½ÿÿH…Àt HƒÄÄH ±yH=*‡ºƒ¾ÀH‰D$èþËÿÿH‹D$HƒÄÃ@HƒìòGPèò¼ÿÿH…Àt HƒÄÄH ayH=‡º¾‘H‰D$è®ËÿÿH‹D$HƒÄÃ@HƒìòGH袼ÿÿH…Àt HƒÄÄH yH= ‡º¾bH‰D$è^ËÿÿH‹D$HƒÄÃ@HƒìòG@èR¼ÿÿH…Àt HƒÄÄH ÁxH=ú†º}¾3H‰D$èËÿÿH‹D$HƒÄÃ@HƒìòG8è¼ÿÿH…Àt HƒÄÄH qxH=ꆺ{¾H‰D$è¾ÊÿÿH‹D$HƒÄÃ@USH‰ýHƒìH‹FH;ÔÛ"H‹MÛ"tSH9ÞtNH‹HH‹ Û"HNvH5LvH‹81ÀèÛ¼ÿÿH üwH=µ†º—¾èNÊÿÿHƒÄ1À[]ÃDHƒH‹UhHƒ*tH‰uhHƒHƒÄH‰Ø[]ÃH‹}hH‰t$H‹GÿP0H‹t$ë×f„Hƒì1ÿèµ¹ÿÿH…ÀtHƒÄÃH ywH=r†º`¾ËH‰D$èÆÉÿÿH‹D$HƒÄÃff.„HƒìH‹wH‹=ù#è,¼ÿÿH…ÀtHƒÄÃfH !wH=b†ºA¾ H‰D$ènÉÿÿH‹D$HƒÄÃ@HƒìH‹wH‹=y#èÜ»ÿÿH…ÀtHƒÄÃfH ÑvH=R†º+¾ÆH‰D$èÉÿÿH‹D$HƒÄÃ@AWAVI‰×AUATI‰þUSHÎH‰õHƒìHdH‹%(H‰D$81ÀHD$0Ll$(Ld$ L‰D$HÇD$ HÇD$(HÇD$0H‰D$H‹t$L‰éL‰âL‰÷è­ºÿÿ…À„(H‹ H…É„ÁH‹t$ H‹9H‰ØH9þI‰ðu ët@H92tkHƒÀH‹H…ÒuïH‹FH;üØ"…_H‰Úëf„HƒÂH‹H…À„H‹8H‹FH9GuãH‰T$è ºÿÿ…ÀH‹T$u!H‹t$ I‰ðëÆfDH‹T$(H)èI‰é?ÿÿÿH‹L$(H‰ÐH)èI‰ Hƒ:…&ÿÿÿH‹t$ I‰ðë@H‹t$ H‹FH;`Ø"I‰ð…ÀH9Ý„›H‹EH‹8H9÷uyL‰Çè2¹ÿÿH‹T$H5…H‰ÁH‹Ø"H‹81Àèâ¹ÿÿ¸ÿÿÿÿH‹\$8dH3%(…qHƒÄH[]A\A]A^A_Ãè5¹ÿÿ…ÀutHƒÅH‹t$ H9ët%H‹EI‰ðH‹8H9÷t‡H‹FH9GtÍHƒÅH9ëuÞI‰ðL‰Ç裸ÿÿH‹T$H‰ÁH5L„élÿÿÿH‹€¨©tH…ÉI‰ð„&ÿÿÿH‹9éþÿÿL‹D$ é)ÿÿÿ©„©H…ÉtiH‰ÚëtDHƒÂH‹ H‹t$ H…ÉtQH‹9H9÷t+H‰T$èY¹ÿÿ…ÀH‹T$yÒè ¸ÿÿH…ÀH‹T$tÅë}€H‹L$(H‰ÐH)èI‰ Hƒ:…ŸýÿÿH‹t$ H9Ýu"é2ÿÿÿè ¹ÿÿ…Àx^„dÿÿÿHƒÅH9ëtEH‹t$ H‹EI‰ðH‹8H9÷uÔéuþÿÿH‹Ö"H‹T$H5ăH‹81Àèb¸ÿÿ¸ÿÿÿÿé{þÿÿ胶ÿÿL‹D$ éÎþÿÿèd·ÿÿH…ÀtžëÛf.„AVAUATUH‰ýSH‰óHƒìdH‹%(H‰D$1ÀH…ÒHÇ$…õH‹NHƒù…H‹VH‹MH‹5 #H‹˜H…À„H‰ïÿÐ…ÀˆJ1ÀH‹|$dH3<%(…[HƒÄ[]A\A]A^ÃH‰×èµÿÿH‹5Ñ#L‰ïI‰ÆèF¶ÿÿH…ÀH‰$IVÿ…–H‹KH‹Õ"HƒìHàpQH5ƒL °pH ÓpA¸H‹81Àè8·ÿÿXZ¾QH RrH=£‚ºè©Äÿÿ¸ÿÿÿÿéNÿÿÿ€L‹fI‰ÕM…ä„XÿÿÿIƒüu:H‹FH‰×H‰$èR´ÿÿH‰ÂH…Ò7H‹$éæþÿÿH‹AHH…ÀtHƒÆ$éîþÿÿfDL‰áé@ÿÿÿH‰ï踵ÿÿéØþÿÿLpH5%Ý"H‰âL‰áL‰ïèûÿÿ…Ày©¾FéHÿÿÿH šqH=뺾mèìÃÿÿ¸ÿÿÿÿé‘þÿÿè}´ÿÿf.„AVAUATUH‰ýSH‰óHƒìdH‹%(H‰D$1ÀH…ÒHÇ$…H‹NHƒù…ŸH‹^H;<Ô"tH‹CH;¯Ô"…!HƒH‹UHƒ*t+H‰]1ÀH‹t$dH34%(…¨HƒÄ[]A\A]A^Ã@H‹}H‹GÿP0ëÈH‰×è³ÿÿH‹5Á#L‰ïI‰Æè>´ÿÿH…ÀH‰$IVÿ…žH‹Kf„H‹qÓ"HƒìHÐnQH5L  nH ÃnA¸H‹81Àè(µÿÿXZ¾nH BpH=[º(è™Âÿÿ¸ÿÿÿÿé2ÿÿÿ€L‹fI‰ÕM…ä„PÿÿÿIƒüurH‹FH‰×H‰$èB²ÿÿH‰ÂH…ÒbH‹$éÆþÿÿH‹=qÓ"H9=zÓ"„|H‹ mÓ"L‹@H-nH‹«Ò"H5Œ€H‹IH‹81Àè~´ÿÿ¸ÿÿÿÿé§þÿÿ@L‰áéÿÿÿLãmH5JÛ"H‰âL‰áL‰ïèÌøÿÿ…À‰zÿÿÿ¾céÿÿÿf.„H;aÒ"„BþÿÿH;¬Ò"„5þÿÿéeÿÿÿè<²ÿÿff.„AVAUATUH‰ýSH‰óHƒìpdH‹%(H‰D$h1ÀH…ÒHÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$X…?H‹NHƒù…ÉH‹F H‹~H‰D$8H‹F(H‰|$0H‰D$@H‹F0H‰D$HH‹F8H‰D$PH‹F@H‰D$XH‹TÑ"H9_„ú蕲ÿÿò$ò,$f.-C‘z„ H‹|$8H9_„Üèg²ÿÿòD$òt$f.5‘z„ûH‹|$@H9_„¼è7²ÿÿòD$ò|$f.=ãz„ëH‹|$HH9_„œè²ÿÿf(Èf. »z„ãH‹|$PH9_„„òL$èÙ±ÿÿòL$f(Øf.‡z„×H‹|$XH9_„`ò\$ òL$蟱ÿÿò\$ f(àòL$f.%Gz„ÏòD$ò$òYÃòYÑòXÂòT$òYÔòXÂòòfWÂf(ÑòEf(ÃòYÑòYÃòXÂf(ÔòYÔòXÂòQÐf.ÒŠ.f.ãz„›òË1Àò<$ò^ÂòM(ò]0òe8ò}@òt$òl$òuHòE òmPH‹T$hdH3%(…BHƒÄp[]A\A]A^Äòò<$éþÿÿòwòt$éþÿÿòoòl$é?þÿÿòOécþÿÿfDò_é‡þÿÿfDògé·þÿÿfDH‹5ù #L‰ïIƒîè¯ÿÿH…ÀH‰D$0…÷H‹KH‹ÙÎ"HƒìH8jQH5n|L ÊjH +jA¸H‹81Àè°ÿÿXZ¾7H ªkH=û|ºUè¾ÿÿ¸ÿÿÿÿéîþÿÿ€L‹fIƒü‡4HËŒI‰ÕJc HÐÿà€H‹F@H‰D$XH‹C8H‰D$PH‹C0H‰D$HH‹C(H‰D$@H‹C H‰D$8H‹CH‰D$0L‰ïèj­ÿÿIƒüI‰Æ‡ºH‚ŒJc HÐÿàDH‹5Ù#L‰ï艮ÿÿH…ÀH‰D$8„RIƒîH‹5¨#L‰ïèh®ÿÿH…ÀH‰D$@„ëIƒîH‹5ç#L‰ïèG®ÿÿH…ÀH‰D$H„ƒIƒîH‹5¾#L‰ïè&®ÿÿH…ÀH‰D$P„uIƒîH‹5•#L‰ïè®ÿÿH…ÀH‰D$X„üIƒîM…ö¿H‹|$0éÅûÿÿè;®ÿÿH…À„çûÿÿ¾.éþÿÿ„è®ÿÿH…À„÷ûÿÿ¾/é_þÿÿ„èû­ÿÿH…À„üÿÿ¾0é?þÿÿ„òL$èÕ­ÿÿH…ÀòL$„üÿÿ¾1éþÿÿ@ò\$ òL$è§­ÿÿH…ÀòL$ò\$ „üÿÿ¾2éßýÿÿ„òd$(ò\$ òL$èi­ÿÿH…ÀòL$ò\$ òd$(„ÿûÿÿ¾3é›ýÿÿ@H‹iÌ"H5­gH‹8èJ¬ÿÿH +iH=|zºX¾`è}»ÿÿ¸ÿÿÿÿéjüÿÿH‹ôË"HƒìH5‘yjL ëgH LgHþÿÿ¾ÈérýÿÿH‹ôÄ"HƒìH \`jH5ˆrL ä`H<`A¸H‹81À誦ÿÿY^¾Äé-ýÿÿH‹¯Ä"HƒìH5LrjL ¦`H `H÷_A¸H‹81Àèe¦ÿÿ_¾¿AXéçüÿÿH‹iÄ"HƒìL i`jH5ýqH Á_H±_A¸H‹81Àè¦ÿÿAY¾ºAZé üÿÿH‹EéXüÿÿè3¤ÿÿAVAUATUI‰üSH‰óHƒì dH‹%(H‰D$1ÀH…ÒHÇ$HÇD$…ÜH‹NHƒù…VH‹nL‹v H‹ïÃ"H‹EL‹-dÄ"H9ÝtOL9ètJH‹HH‹ŸÃ"Hâ^H5à^H‹81Àèo¥ÿÿ¾m ºùH †`H=Orèâ²ÿÿ1Àé„HƒEI‹”$ÈHƒ*„1I‰¬$ÈI‹FL9èt8I9Þt3H‹HH‹(Ã"Hk^H5i^H‹81Àèø¤ÿÿ¾} ºúë‡@IƒI‹”$ØHƒ*t6HƒM‰´$ØH‰ØH‹t$dH34%(…½HƒÄ []A\A]A^ÃfDI‹¼$ØH‹GÿP0ë¹€H‹5éý"L‰ïIƒîè5£ÿÿH…ÀH‰$…¹H‹K@H‹qÂ"HƒìHø]QH5pL b^H Ã]A¸H‹81Àè(¤ÿÿXZ¾P H B_H= qºøè™±ÿÿ1Àé;ÿÿÿfI‹¼$ÈH‹GÿP0é»þÿÿ@H‹nI‰ÕHƒýtlHƒýt]H…íH‰é…iÿÿÿL‰ïè1¡ÿÿH…íI‰Æ„-ÿÿÿHƒýuH‹5ý"L‰ïè`¢ÿÿH…ÀH‰D$t[IƒîM…ö(H‹,$L‹t$éÑýÿÿ€H‹F H‰D$H‹CH‰$ëœL]H5Ì"H‰âH‰éL‰ïèÉçÿÿ…Ày¸¾C éÿÿÿH‹LÁ"HƒìH ´\jH5ànL <]H¼\A¸H‹81Àè£ÿÿY^¾? éÕþÿÿè!¡ÿÿAWAV¹AUATUSH‰ûH‰õHìˆLd$@dH‹%(H‰D$x1ÀL‰çH…ÒóH«…H‹NHƒù…šH‹F H‹~H‰D$HH‹F(H‰|$@H‰D$PH‹F0H‰D$XH‹F8H‰D$`H‹F@H‰D$hH‹FHH‰D$pH‹-\À"H9o„ è¡ÿÿò$ò4$f.5K€z„“H‹|$HH9o„ôèo¡ÿÿòD$òl$f.-€z„{H‹|$PH9o„Ôè?¡ÿÿòD$ò|$f.=ëz„cH‹|$XH9o„´è¡ÿÿf(àf.%Ãz„SH‹|$`H9o„œòd$èá ÿÿòd$f(èf.-z„GH‹|$hH9o„xòl$ òd$è§ ÿÿòl$ f(ðòd$f.5Oz„7H‹|$pH9o„Ðòt$(òl$ òd$èa ÿÿòt$(f(Èòl$ òd$f. z„+ò$ò=f(ÃòT$òDD$òXÄò[XòS`òDChòcpòYÇòkxò³€òK0òCf(ÂòXÅòYÇòC fA(ÀòXÆòYÇòC(f(ÁòYÁòC8f(Äò\Ãf(Ýò\Úf(ÖòC@òA\ÐòYÀò[HòYÛòSPòYÒòXØòXÓòQÂf.ÀŠnf.7~òƒz„—òS@1ÿò^ÐòS@òSHò^ÐòSHòSPò^ÐòYÇò<$òSPf(Ôòƒˆf(Çò\Ñò\ÁòXáò]Ðf(Çò|$òXÁò“˜f(×ò_àf(Åò\Ñò\ÁòXéò£ ò]Âòƒ¨f(Çò|$òXÁf(×ò\Ñò_èf(ÆòXñò\ÁòXÏò«°ò]Âò_ñòƒ¸ò³ÀèqœÿÿH…À„0H‹‹ÈH‹1HVÿH…ÒH‰„1ÿH‰ƒÈè@œÿÿH…À„H‹‹ÐH‹1HVÿH…ÒH‰„ 1ÿH‰ƒÐèœÿÿH…À„öH‹‹ØH‹1HVÿH…ÒH‰uH‹»ØH‰$H‹WÿR0H‹$H‰ƒØ1ÀH‹t$xdH34%(…“HĈ[]A\A]A^A_ÃòOéSýÿÿfDòò<$éñûÿÿf„òwòt$éüÿÿòò|$é'üÿÿògéKüÿÿfDòoéoüÿÿfDòwéŸüÿÿfDH‹»ÈH‰$H‹WÿR0H‹$éÇþÿÿDH‹»ÐH‰$H‹WÿR0H‹$éØþÿÿDL‹nIƒý‡½HSzI‰ÖJc¨HÐÿà€H‹FHH‰D$pH‹E@H‰D$hH‹E8H‰D$`H‹E0H‰D$XH‹E(H‰D$PH‹E H‰D$HH‹EH‰D$@L‰÷衚ÿÿIƒýI‰Ç‡ÚHzJc¨HÐÿà@H‹5‘õ"L‰÷èÁ›ÿÿH…ÀH‰D$H„ÒIƒïH‹5Hõ"L‰÷è ›ÿÿH…ÀH‰D$P„kIƒïH‹5oõ"L‰÷è›ÿÿH…ÀH‰D$X„IƒïH‹5&õ"L‰÷è^›ÿÿH…ÀH‰D$`„œIƒïH‹5Ýô"L‰÷è=›ÿÿH…ÀH‰D$h„<IƒïH‹5Tõ"L‰÷è›ÿÿH…ÀH‰D$p„IƒïM…ÿÚH‹|$@éÔùÿÿ€H‹5Ùô"L‰÷IƒïèÝšÿÿH…ÀH‰D$@…ÿþÿÿH‹MH‹º"HƒìHxUQH5®gL VH kUA¸H‹81ÀèЛÿÿXZ¾«H êVH=óhº³èA©ÿÿ¸ÿÿÿÿé&ýÿÿ€è»šÿÿH…À„_ùÿÿ¾¡ëÂ裚ÿÿH…À„wùÿÿ¾¢ëª苚ÿÿH…À„ùÿÿ¾£ë’òd$èmšÿÿH…Àòd$„“ùÿÿ¾¤ékÿÿÿ@òl$ òd$è?šÿÿH…Àòd$òl$ „“ùÿÿ¾¥é7ÿÿÿòt$(òl$ òd$è šÿÿH…Àòd$òl$ òt$(„—ùÿÿ¾¦éûþÿÿ@òL$0òt$(òl$ òd$èÙÿÿH…Àòd$òl$ òt$(òL$0„—ùÿÿ¾§é¯þÿÿ„H‹¹¸"H5ýSH‹8蚘ÿÿ¾º»H qUH=zgèͧÿÿ¸ÿÿÿÿé²ûÿÿH‹D¸"HƒìH5áejL ;TH œSHŒSA¸H‹81Àèú™ÿÿ_¾‹AXé$þÿÿD¾©ºÈëŒ@¾¸ºÉéyÿÿÿf„¾ÇºÊéaÿÿÿf(Âò|$8òL$0òt$(òl$ òd$èÊ™ÿÿò|$8òL$0òt$(òl$ òd$éHùÿÿLâRH5)Ã"L‰éL‰âL‰÷èËÝÿÿ…À‰ýÿÿ¾”épýÿÿH‹J·"HƒìH ²RjH5ÞdL :SH’RA¸H‹81Àè™ÿÿY^¾é+ýÿÿH‹·"HƒìL SjH5™dH ]RHMRA¸H‹81À軘ÿÿAY¾†AZéäüÿÿH‹¾¶"HƒìH5[djL µRH RHRA¸H‹81Àèt˜ÿÿA[¾[éžüÿÿH‹x¶"HƒìH5djL oRH ÐQHÀQA¸H‹81Àè.˜ÿÿ]¾|A\éXüÿÿH‹2¶"HƒìH5ÏcjL )RH ŠQHzQA¸H‹81Àèè—ÿÿA]¾wA^éüÿÿè–ÿÿL‰ééÅûÿÿf.„AWAV¹AUATUSH‰ûH‰õHì¨Ld$PdH‹%(H‰„$˜1ÀL‰çH…ÒóH«…ýH‹NHƒù…¯H‹F H‹~H‰D$XH‹F(H‰|$PH‰D$`H‹F0H‰D$hH‹F8H‰D$pH‹F@H‰D$xH‹FHH‰„$€H‹FPH‰„$ˆH‹-µ"H9o„è[–ÿÿò$ò<$f.= uz„™H‹|$XH9o„âè-–ÿÿòD$ò|$f.=Ùtz„H‹|$`H9o„Âèý•ÿÿòD$òt$f.5©tz„iH‹|$hH9o„¢èÍ•ÿÿf(Ðf.tz„YH‹|$pH9o„ŠòT$蟕ÿÿòT$f(èf.-Mtz„MH‹|$xH9o„fòl$ òT$èe•ÿÿòl$ f(ðòT$f.5 tz„EH‹¼$€H9o„Ãòt$(òl$ òT$è•ÿÿòt$(f(øòl$ òT$f.=¾sz„6H‹¼$ˆH9o„ò|$0òt$(òl$ òT$èÇ”ÿÿò|$0f(Èòt$(òl$ òT$f. csz„+f.Êw:f(Áf(Êf(Ðf(Çò|$òD$f(Æòt$òD$f(Åò,$ò$ò$$fD(Áò\$f(Äòc8òDYÁf(ãò[@òDd$ò\Åò\æfD(ÊfA(ÜòkòDYÊòs ò\ßòChòYÀòcpòYäò{(òK0ò[xòYÛòXàòDcHòSPòDCXòDK`òXÜòQÃf.ÀŠ…fïäòƒ˜f.Äz„†ò[hòDCXò^ØòK0òSPòDK`ò[hò[pò^Øò[pò[xò^ØòYÀò[xf(Ùò\ÚfD(ÃòDYÃòA\ÀòDQØfE.ÛŠÛòDƒ˜fD.Äz„òCPfD(ÓòDK0òYØòEYÑòAYÃfD.ÌòA^ØòE^Ðò›ØfA(ÛòAYÙòA^ÀòD“ÐòA^Øòƒèò›àz„KòKq1ÿò$$fDWÐf(ÃòAYØòA^ÁòA^Ùòƒf(ÅòXéò\ÁòE^Ñò›€f(Üò\Úò]Øf(ÄòXÂò› ò_Åòl$f(Ýòƒ¨f(Æò\ÚòD“ˆò\ÁòXñò]Øf(ÅòXÂò›°f(ßò_Æòt$ò\ÙòXÏòƒ¸f(Æò\ÂòXÖò]Ãò_ÑòƒÀò“ÈèÅÿÿH…À„|H‹‹ðHƒ)„«H‰ƒð1ÀfH‹´$˜dH34%(…ôHĨ[]A\A]A^A_Àòé`üÿÿfDòOò $éûúÿÿòò|$éûÿÿòOòL$é9ûÿÿòWé]ûÿÿfDòoéûÿÿfDòwé±ûÿÿfDH‹»ðH‰$H‹WÿR0H‹$é:ÿÿÿDòOé+üÿÿfDL‹vIƒþ‡2HonI‰ÕJc°HÐÿàH‹FPH‰„$ˆH‹EHH‰„$€H‹E@H‰D$xH‹E8H‰D$pH‹E0H‰D$hH‹E(H‰D$`H‹E H‰D$XH‹EH‰D$PL‰ïèyŽÿÿIƒþI‰Ç‡HnJc°HÐÿà@H‹5ié"L‰ïè™ÿÿH…ÀH‰D$X„@IƒïH‹5 é"L‰ïèxÿÿH…ÀH‰D$`„ØIƒïH‹5‡é"L‰ïèWÿÿH…ÀH‰D$h„qIƒïH‹5&é"L‰ïè6ÿÿH…ÀH‰D$p„ IƒïH‹5Ýè"L‰ïèÿÿH…ÀH‰D$x„¢IƒïH‹5”è"L‰ïèôŽÿÿH…ÀH‰„$€„˜IƒïH‹5øè"L‰ïèÐŽÿÿH…ÀH‰„$ˆ„²IƒïM…ÿwH‹|$PéÇøÿÿH‹5‘è"L‰ïIƒï蕎ÿÿH…ÀH‰D$P…ßþÿÿH‹MH‹Ñ­"HƒìH0IQH5f[L ÂIH #IA¸H‹81ÀèˆÿÿXZ¾+H ¢JH=ë\ºVèùœÿÿ¸ÿÿÿÿéýÿÿ€èsŽÿÿH…À„Yøÿÿ¾ö*ëÂè[ŽÿÿH…À„qøÿÿ¾÷*ëªèCŽÿÿH…À„‰øÿÿ¾ø*ë’òT$è%ŽÿÿH…ÀòT$„øÿÿ¾ù*ékÿÿÿ@òl$ òT$è÷ÿÿH…ÀòT$òl$ „øÿÿ¾ú*é7ÿÿÿ„òt$(òl$ òT$è¹ÿÿH…ÀòT$òl$ òt$(„‰øÿÿ¾û*éóþÿÿ@ò|$0òt$(òl$ òT$èsÿÿH…ÀòT$òl$ òt$(ò|$0„Œøÿÿ¾ü*é§þÿÿ„òL$8ò|$0òt$(òl$ òT$èÿÿH…ÀòT$òl$ òt$(ò|$0òL$8„‹øÿÿ¾ý*éKþÿÿ@H‹¬"H5UGH‹8èò‹ÿÿ¾‘+º`H ÉHH=[è%›ÿÿ¸ÿÿÿÿé;ûÿÿH‹œ«"HƒìH59YjL “GH ôFHäFA¸H‹81ÀèRÿÿ_¾ß*AXéÄýÿÿDH‹‰«"H5ÍFH‹8èj‹ÿÿ¾ï+ºtésÿÿÿH‹a«"H5¥FH‹8èB‹ÿÿ¾',ºxéKÿÿÿ¾­,º‚é9ÿÿÿf(ÃòDL$HòDD$@òL$8ò|$0òt$(òl$ òT$èìŒÿÿòDL$HòDD$@òL$8ò|$0òt$(òl$ òT$éøÿÿLöEH5·"L‰ñL‰âL‰ïèßÐÿÿ…À‰eüÿÿ¾è*éÌüÿÿH‹^ª"HƒìH ÆEjH5òWL NFH¦EA¸H‹81ÀèŒÿÿY^¾ä*é‡üÿÿòd$Hò\$@òL$8ò|$0òt$(òl$ òT$èŒÿÿòd$HfD(Øò\$@òL$8ò|$0òt$(òl$ òT$éÂ÷ÿÿH‹¶©"HƒìL ¶EjH5JWH EHþDA¸H‹81Àèl‹ÿÿAY¾Ú*AZéÝûÿÿH‹o©"HƒìH5 WjL fEH ÇDH·DA¸H‹81Àè%‹ÿÿA[¾Õ*[é—ûÿÿH‹)©"HƒìH5ÆVjL EH DHqDA¸H‹81Àèߊÿÿ]¾Ð*A\éQûÿÿH‹ã¨"HƒìH5€VjL ÚDH ;DH+DA¸H‹81À虊ÿÿA]¾Ë*A^é ûÿÿH‹œ¨"HƒìH59VjL “DH ôCHäCA¸H‹81ÀèRŠÿÿA_¾Æ*XéÄúÿÿèpˆÿÿL‰ñéxúÿÿ„AWAV¹ AUATUSH‰ûH‰õHìÈLd$`dH‹%(H‰„$¸1ÀL‰çH…ÒóH«…H‹NHƒù …o H‹F H‹~H‰D$hH‹F(H‰|$`H‰D$pH‹F0H‰D$xH‹F8H‰„$€H‹F@H‰„$ˆH‹FHH‰„$H‹FPH‰„$˜H‹FXH‰„$ H‹F`H‰„$¨H‹FhH‰„$°H‹-`§"H9o„æ衈ÿÿòD$ò|$f.=Mgz„- H‹|$hH9o„ÆèqˆÿÿòD$òt$f.5gz„ H‹|$pH9o„¦èAˆÿÿòD$ò|$f.=ífz„ýH‹|$xH9o„†èˆÿÿf(Èf. Åfz„íH‹¼$€H9o„kòL$(èà‡ÿÿòL$(òD$ òl$ f.-†fz„ÖH‹¼$ˆH9o„<òL$0衇ÿÿòL$0òD$(òt$(f.5Gfz„¿H‹¼$H9o„òL$8èb‡ÿÿòL$8òD$0ò|$0f.=fz„¨H‹¼$˜H9o„ÎòL$8è#‡ÿÿòL$8f(àf.%Ñez„™H‹¼$ H9o„§òd$@òL$8èæ†ÿÿòd$@f(èòL$8f.-Žez„†H‹¼$¨H9o„tòl$Hòd$@òL$8è†ÿÿòl$Hf(ðòd$@òL$8f.5?ez„wH‹¼$°H9o„5òt$Pòl$Hòd$@òL$8èH†ÿÿòt$Pf(øòl$Hòd$@òL$8f.=ädz„lf.ᆖò\$òT$ òD|$ò\ÓòDD$òt$ò|$òl$f(Âf(Õf(ëò\ÐòT$ òT$(òA\×f(Âf(ÖfA(÷ò\ÐòT$(òT$0òA\Ðf(Âf(×fA(øò\Ðf(Áf(Ìf(àòT$0f(Áò\$ òT$(òYÁò[8òD\$òDd$òDT$0òCXf(ÄòDl$òYÄòS@òD[òDc òDk(òC`f(Ãf(ÚòK0òA\ÃfA(ÒòA\ÜòDSHòA\ÕòcPòChòYÀò[pòYÛòSxòYÒòXÃòXÂòQÐf.ÒІfEïÀf(Åò“˜ò\D$ fA.Ðz„Eò^ÂòDKhò[pòD^ÊòƒÐf(Æò\D$(ò^ÂòDKhò^ÚòƒØf(Çò\D$0ò^Âò[pòDYL$òY\$òƒàòCxò^ÂòAXÙòYÒòCxòYD$òXÃò°bfWÃf(Üò\Ùòƒèf(ÃòYÃòXÐòQÂf.ÀŠñfA.Àòƒ€z„mò“˜ò_á1Àò^Øf(Ìò^Ðò›ˆò“f(ÕòXéò\Ôòd$f(Äò\Áò]Ðf(ÄòXÁò“ f(ÖòXñò_èò\Ñò«¨òl$f(Åò\Áò]Ðf(ÅòXÁò“°f(×òXùò_ðò\Ñò³¸òt$f(Æò\ÁòXÎò]Ðò_ùò“Àò»ÈH‹”$¸dH3%(…… HÄÈ[]A\A]A^A_Ãòwòt$0éjûÿÿòoòl$éúÿÿòoòl$é5úÿÿòwòt$éUúÿÿòOéyúÿÿfDòò|$ éœúÿÿòoòl$(éËúÿÿògé=ûÿÿfDòoépûÿÿfDòwé¯ûÿÿfDòéúûÿÿfDL‹vIƒþ ‡ºH`I‰ÕJc°HÐÿàH‹FhH‰„$°H‹E`H‰„$¨H‹EXH‰„$ H‹EPH‰„$˜H‹EHH‰„$H‹E@H‰„$ˆH‹E8H‰„$€H‹E0H‰D$xH‹E(H‰D$pH‹E H‰D$hH‹EH‰D$`L‰ïèŸÿÿIƒþ I‰Ç‡qH“_Jc°HÐÿàfH‹5‘Ú"L‰ïèÁ€ÿÿH…ÀH‰D$h„ IƒïH‹5HÚ"L‰ïè €ÿÿH…ÀH‰D$p„:IƒïH‹5¯Ú"L‰ïè€ÿÿH…ÀH‰D$x„ÔIƒïH‹5NÚ"L‰ïè^€ÿÿH…ÀH‰„$€„jIƒïH‹5Ú"L‰ïè:€ÿÿH…ÀH‰„$ˆ„ÿIƒïH‹5¶Ù"L‰ïè€ÿÿH…ÀH‰„$„•IƒïH‹5Ú"L‰ïèòÿÿH…ÀH‰„$˜„+IƒïH‹5¶Ù"L‰ïèÎÿÿH…ÀH‰„$ „ÀIƒïH‹5jÙ"L‰ïèªÿÿH…ÀH‰„$¨„IƒïH‹5Ù"L‰ïè†ÿÿH…ÀH‰„$°„IƒïM…ÿÝH‹|$`é7÷ÿÿH‹5GÙ"L‰ïIƒïèKÿÿH…ÀH‰D$`…mþÿÿH‹Mf„H‹ž"HƒìHà9QH5LL r:H Ó9A¸ H‹81Àè8€ÿÿXZ¾GH R;H=ÛMº§è©ÿÿ¸ÿÿÿÿéfüÿÿ€è#ÿÿH…À„Åöÿÿ¾GëÂè ÿÿH…À„Ýöÿÿ¾Gëªèó~ÿÿH…À„õöÿÿ¾Gë’òL$ èÕ~ÿÿH…ÀòL$ „ùöÿÿ¾Gékÿÿÿ@òL$(è­~ÿÿH…ÀòL$(„÷ÿÿ¾GéCÿÿÿ@òL$0è…~ÿÿH…ÀòL$0„'÷ÿÿ¾Géÿÿÿ@òL$8è]~ÿÿH…ÀòL$8„>÷ÿÿ¾Géóþÿÿ@òd$@òL$8è/~ÿÿH…ÀòL$8òd$@„A÷ÿÿ¾Gé¿þÿÿòl$Hòd$@òL$8èù}ÿÿH…ÀòL$8òd$@òl$H„H÷ÿÿ¾Géƒþÿÿ@òt$Pòl$Hòd$@òL$8è³}ÿÿH…ÀòL$8òd$@òl$Hòt$P„K÷ÿÿ¾ Gé7þÿÿ„ò|$Xòt$Pòl$Hòd$@òL$8è]}ÿÿH…ÀòL$8òd$@òl$Hòt$Pò|$X„J÷ÿÿ¾ GéÛýÿÿ@H‹Qœ"H5•7H‹8è2|ÿÿ¾¦Gº´H 9H=’Kèe‹ÿÿ¸ÿÿÿÿé"úÿÿLF7H5­ª"L‰ñL‰âL‰ïè/Âÿÿ…À‰ÿüÿÿ¾ïFélýÿÿH‹®›"HƒìH 7j H5BIL ž7Hö6A¸ H‹81Àèd}ÿÿY^¾ëFé'ýÿÿH‹i›"HƒìH5Ij L `7H Á6H±6A¸ H‹81Àè}ÿÿ_¾æFAXéáüÿÿfH‹Y›"H56H‹8è:{ÿÿ¾ HºÀéÿÿÿò|$Xòt$Pòl$Hòd$@òL$8è}ÿÿò|$Xf(Ðòt$Pòl$Hòd$@òL$8é0÷ÿÿf(ÂòDD$Pò\$Hò|$@òt$8òl$0òd$(òL$ è­|ÿÿòDD$Pò\$Hò|$@òt$8òl$0òd$(òL$ é«÷ÿÿH‹Nš"HƒìL N6jH5âGH ¦5H–5A¸ H‹81Àè|ÿÿAY¾áFAZéÅûÿÿH‹š"HƒìH5¤GjL þ5H _5HO5A¸ H‹81Àè½{ÿÿA[¾ÜF[éûÿÿH‹Á™"HƒìH5^GjL ¸5H 5H 5A¸ H‹81Àèw{ÿÿ]¾×FA\é9ûÿÿH‹{™"HƒìH5GjL r5H Ó4HÃ4A¸ H‹81Àè1{ÿÿA]¾ÒFA^éòúÿÿH‹4™"HƒìH5ÑFjL +5H Œ4H|4A¸ H‹81ÀèêzÿÿA_¾ÍFXé¬úÿÿH‹î˜"HƒìHM4jH5‚FL Þ4H ?4A¸ H‹81Àè¤zÿÿX¾ÈFZégúÿÿH‹©˜"HƒìH 4jH5=FL ™4Hñ3A¸ H‹81Àè_zÿÿY^¾ÃFé"úÿÿH‹d˜"HƒìH5FjL [4H ¼3H¬3A¸ H‹81Àèzÿÿ_¾¾FAXéÜùÿÿè8xÿÿL‰ñéùÿÿATUSHƒìH‹GH‹¨€H…ítHL‹% ˜"H‰ûI‹$‹BƒÀ‰BH‹ú—";61ÒH‰ßÿÕH‰ÃI‹$ƒhH…Ût?H‰ØHƒÄ[]A\ÃHƒÄ1Ò[]A\éayÿÿH=GH‰t$è_xÿÿ…ÀH‹t$t°1ÀëÆfè‹xÿÿH…Àu·H‹?—"H5pGH‰D$H‹:è‹wÿÿH‹D$HƒÄ[]A\Ãf.„AVAUATUH‰ýSH‰óHƒìdH‹%(H‰D$1ÀH…ÒHÇ$…H‹NHƒù…ŸH‹^H;,—"tH‹CH;Ÿ—"…!HƒH‹UHƒ*t+H‰]1ÀH‹t$dH34%(…¨HƒÄ[]A\A]A^Ã@H‹}H‹GÿP0ëÈH‰×èðuÿÿH‹5±Ñ"L‰ïI‰Æè.wÿÿH…ÀH‰$IVÿ…žH‹Kf„H‹a–"HƒìHÀ1QH5öCL 1H ³1A¸H‹81ÀèxÿÿXZ¾º H 23H=KFº>艅ÿÿ¸ÿÿÿÿé2ÿÿÿ€L‹fI‰ÕM…ä„PÿÿÿIƒüurH‹FH‰×H‰$è2uÿÿH‰ÂH…ÒbH‹$éÆþÿÿH‹=a–"H9=j–"„|H‹ ]–"L‹@H1H‹›•"H5|CH‹IH‹81Àènwÿÿ¸ÿÿÿÿé§þÿÿ@L‰áéÿÿÿLÓ0H5šž"H‰âL‰áL‰ïè¼»ÿÿ…À‰zÿÿÿ¾¯ éÿÿÿf.„H;Q•"„BþÿÿH;œ•"„5þÿÿéeÿÿÿè,uÿÿff.„AWAVAUATUSHƒìH‹-•"H‹EL‹xHL‹pPL‹hXHÇ@HHÇ@PHÇ@XèžuÿÿH‹UH‰ÃH‹zHL‹bPH‹jXL‰zHL‰rPL‰jXH…ÿtHƒ/tTM…ätIƒ,$t8H…ítHƒmu H‹EH‰ïÿP0H…Ût]H‰ßèõvÿÿHƒ+t/HƒÄ[]A\A]A^A_ÃI‹D$L‰çÿP0ë»H‹GÿP0룀H‹CH‰ßH‹@0HƒÄ[]A\A]A^A_ÿàDH‹=A”"HƒÄ[]A\A]A^A_é†vÿÿfDSHƒìH‹WH‹5Ï"H‹‚H…À„˜ÿÐH‰ÃH…Û„¢H‹=»Ï"H‰ÞèÃuÿÿH…Àt>H‹ HQÿH…ÒH‰tHƒÄ[Ãf„H‹SH‰D$H‰ßÿR0H‹D$HƒÄ[ÃfDH‹¾«HƒèH…ÀH‰tLH m0H=ÆCºèÄ‚ÿÿHƒÄ1À[Ã@H‹B@H…Àt3HƒÆ$éVÿÿÿfD¾©ë½f„H‹C‰t$H‰ßÿP0‹t$ë èuÿÿH‰Ãé$ÿÿÿDf.„SHƒìH‹WH‹5Î"H‹‚H…ÀtdÿÐH‰ÃH…Ûtj¿èðqÿÿH…ÀtH‹PH‰HƒÄ[ÃfDH‹¾*HƒèH…ÀH‰tDH •/H=.Cº#èìÿÿHƒÄ1À[Ã@H‹B@H…Àt+HƒÆ$ë¾(ëÅf„H‹C‰t$ H‰ßÿP0‹t$ ë¨èGtÿÿH‰Ãé`ÿÿÿDf.„AWAVAUATI‰üUSH‰óHƒì8dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$HÇD$ …`H‹NHƒù…êL‹nL‹v L‹~(I‹T$H‹5ÒÌ"H‹‚H…À„bL‰çÿÐH‰ÃH…Û„AH‹SH‹5Í"H‹‚H…À„VH‰ßÿÐH‰ÂH‹HƒèH…ÒH‰„ÛH…À„ÒH‹‘"H9B…‘H‹ZH…Û„„L‹bHƒIƒ$Hƒ*„½¿èóqÿÿH…ÀH‰Å„ÇH‰]¹º¸IƒEHƒÀL‰lÅIƒL‰tÕIƒL‰|ÍI‹D$H‹˜€H…Û„¿L‹-À"I‹U‹BƒÀ‰BH‹´";Ì1ÒH‰îL‰çÿÓI‹UƒjH…À„H‰ÃHƒm„“Iƒ,$„xH‰ßèpoÿÿH…Àt;H‹ HQÿH…ÒH‰„xH‹L$(dH3 %(…žHƒÄ8[]A\A]A^A_ÃDHƒ+„ÆA½LH -H=ò@ºD‰îèeÿÿ1Àë©H…í„­H‰é@H‹Ñ"HƒìHÁ+QH5f=L Â+H #+A¸H‹81ÀèˆqÿÿXZ¾H ¢,H=ƒ@ºèù~ÿÿ1Àé:ÿÿÿfH‹CH‰T$H‰ßÿP0H‹T$éþÿÿ€H‹BH‰×ÿP0é4þÿÿH‹CH‰ßÿP0é+ÿÿÿH‹A½:HƒèH…ÀH‰„¹Iƒ,$„„H…í„ÿÿÿHƒm…øþÿÿH‹EH‰ïÿP0ééþÿÿf„I‹D$L‰çÿP0éxþÿÿH‹EH‰ïÿP0é^þÿÿH‹SH‰D$H‰ßÿR0H‹D$éoþÿÿ€¿H‰T$èoÿÿH‹T$H…ÀH‰ÅI‰Ô„M¹º1Àéˆýÿÿ@H‹nI‰ÕHƒýt(ŽuþÿÿHƒýtHƒý…nþÿÿH‹F(H‰D$ H‹C H‰D$H‹CH‰D$L‰ïè‚mÿÿHƒýI‰Æt,HƒýtGH…íucH‹5É"L‰ïIƒîè«nÿÿH…ÀH‰D$„^H‹5ÞÈ"L‰ïèŽnÿÿH…ÀH‰D$„ûIƒîH‹5­È"L‰ïèmnÿÿH…ÀH‰D$ „IƒîM…öL‹l$L‹t$L‹|$ éàûÿÿfDI‹D$L‰çÿP0élþÿÿ„H…À…æE1äA½+H‹CH‰ßÿP0M…ä„Kýÿÿ1íé-þÿÿ@A½)é5ýÿÿDH‹B@H…À„þHƒÆ$éˆûÿÿf.„H‹B@H…À„îHƒÆ$é”ûÿÿf.„1ÒH‰îL‰çè£nÿÿH…ÀH‰Ã…iüÿÿ€A½Hé®ýÿÿDH=¡<è„mÿÿ…À„ üÿÿëÚH‹«Œ"HƒìH (jH5?:L ›(H„(A¸H‹81ÀèanÿÿY^¾ôéÔüÿÿDèkmÿÿH…Àu†H‹Œ"H5P<A½HH‹8èjlÿÿéýÿÿDA½:éýÿÿL‰çè=nÿÿH‰Ãé‹úÿÿH‰ßè-nÿÿH‰Âé§úÿÿHT$Lü'H52”"H‰éL‰ïèW²ÿÿ…À‰=þÿÿ¾øéDüÿÿH‹Ö‹"HƒìH5s9jL Í'H .'H¯'A¸H‹81ÀèŒmÿÿ_¾ïAXéþûÿÿH‹Ké¶ûÿÿè¡kÿÿA½+évûÿÿfDAWAVAUATI‰üUSH‰óHƒì8dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$HÇD$ … H‹NHƒù…ªL‹nL‹v L‹~(I‹T$H‹52Æ"H‹‚H…À„ÊL‰çÿÐH‰ÃH…Û„ÑH‹SH‹5žÅ"H‹‚H…À„ÆH‰ßÿÐH‰ÂH‹HƒèH…ÒH‰„ËH…À„’H‹{Š"H9B…QH‹ZH…Û„DL‹bHƒIƒ$Hƒ*„}¿èSkÿÿH…ÀH‰Å„wH‰]¹º¸IƒEHƒÀL‰lÅIƒL‰tÕIƒL‰|ÍI‹D$H‹˜€H…Û„L‹- Š"I‹U‹BƒÀ‰BH‹Š";Œ1ÒH‰îL‰çÿÓI‹UƒjH…À„ÑH‹MHQÿH…ÒH‰U„<I‹ $HQÿH…ÒI‰$„GH‹|$(dH3<%(…mHƒÄ8[]A\A]A^A_Ã@H…í„­H‰é@H‹q‰"HƒìH%QH57L b%H Ã$A¸H‹81Àè(kÿÿXZ¾ªH B&H=c:º è™xÿÿ1ÀékÿÿÿfH‹CH‰T$H‰ßÿP0H‹T$éUþÿÿ€H‹BH‰×ÿP0étþÿÿH‹A½ÝHƒèH…ÀH‰„ùIƒ,$„H…ít Hƒm„üH ½%H=Þ9º!D‰îèxÿÿ1Àéãþÿÿf.„H‹UH‰D$H‰ïÿR0H‹D$é«þÿÿ€I‹T$H‰D$L‰çÿR0H‹D$éŸþÿÿfD¿H‰T$è!iÿÿH‹T$H…ÀH‰ÅI‰Ô„M¹º1ÀéÈýÿÿ@H‹nI‰ÕHƒýt(ŽuþÿÿHƒýtHƒý…nþÿÿH‹F(H‰D$ H‹C H‰D$H‹CH‰D$L‰ïè"gÿÿHƒýI‰Æt,HƒýtGH…íucH‹5/Â"L‰ïIƒîèKhÿÿH…ÀH‰D$„^H‹5æÁ"L‰ïè.hÿÿH…ÀH‰D$„ûIƒîH‹5Á"L‰ïè hÿÿH…ÀH‰D$ „IƒîM…öL‹l$L‹t$L‹|$ é üÿÿfDH‹B@H…À„VHƒÆ$é üÿÿfA½ÌéYþÿÿDH‹B@H…À„nHƒÆ$é$üÿÿf.„E1äH…ÀA½Î…"þÿÿH‹CH‰ßÿP0M…ä„þÿÿ1íéíýÿÿ@H‹EH‰ïÿP0éõýÿÿI‹D$L‰çÿP0éÔýÿÿ1ÒH‰îL‰çèChÿÿH…À…©üÿÿf.„A½ëéžýÿÿDH=A6è$gÿÿ…À„`üÿÿëÚH‹K†"HƒìH ³!jH5ß3L ;"HÉ!A¸H‹81ÀèhÿÿY^¾—éÔüÿÿDè gÿÿH…Àu†H‹¿…"H5ð5A½ëH‹8è fÿÿéýÿÿDA½ÝéþüÿÿL‰çèÝgÿÿH‰ÃéËúÿÿHT$LQ!H5Ž"H‰éL‰ïè¬ÿÿ…À‰Mþÿÿ¾›éTüÿÿH‰ßègÿÿH‰Âé·úÿÿH‹v…"HƒìH53jL m!H Î Hô A¸H‹81Àè,gÿÿ_¾’AXéþûÿÿH‹Ké¶ûÿÿèAeÿÿAWAVAUATUSH‰û1ÿHƒìèHdÿÿH…À„ŸL‹{L;=,…"I‰Ä„›IƒE1öE1íM9wŽŠI‹GJ‹,ðIƒÆHƒEM…ít Iƒm„&H‹UH‹5³¿"H‹‚H…À„«H‰ïÿÐH‰ÃH…Û„I‹D$I;D$ ªHƒI‹T$H‰ÂHƒÀI‰D$Hƒ+„ÚM9wI‰ívÿÿÿIƒ/„61ÿè|cÿÿH…ÀI‰Ç„2¿èeÿÿH…ÀH‰Ã„'H‹-#À"L‰`L‰x H‹EL‹°€M…ö„,L‹%„"I‹$‹BƒÀ‰BH‹üƒ";-1ÒH‰ÞH‰ïAÿÖI‹$ƒjH…À„'H‹ L‰íHQÿH…ÒH‰u}H‹SH‰D$H‰ßÿR0H‹D$ëgI‹EL‰ïÿP0éËþÿÿH‹CH‰ßÿP0éÿÿÿIƒ,$A½² „³Iƒ/„ÇH…Ût Hƒ+„ÎH W H=è4ºOD‰îè«rÿÿ1ÀH…ít%H‹MHQÿH…ÒH‰UuH‹UH‰D$H‰ïÿR0H‹D$HƒÄ[]A\A]A^A_ÃH‹B@H…À„ÆHƒÆ$é?þÿÿf.„H‰ÞL‰çè…cÿÿ…À„YþÿÿIƒ,$A½´ …MÿÿÿI‹D$L‰çÿP0M…ÿ„CÿÿÿIƒ/…9ÿÿÿI‹GL‰ÿÿP0é*ÿÿÿ€H‹CH‰ßÿP0é#ÿÿÿf„A½¡ 1íé ÿÿÿH‹Q‚"H5Ê3A½¥ 1íH‹8èbbÿÿIƒ,$…áþÿÿ1ÛE1ÿéqÿÿÿH‰ïè5dÿÿH‰ÃézýÿÿI‹GL‰ÿÿP0é»ýÿÿL‰íA½¸ ëÁIƒ,$t}I‹L‰íA½º HƒèH…ÀI‰…Šþÿÿé=ÿÿÿ1ÒH‰ÞH‰ïè~cÿÿH…À…ýýÿÿL‰íA½Â éWþÿÿH=ˆ1èkbÿÿ…À„¿ýÿÿëÜèœbÿÿH…ÀuÒH‹P"H51H‹8è¡aÿÿëºL‰íA½º éµþÿÿAWAVAUATUSH‰û1ÿHƒìèˆ`ÿÿH…À„ŸL‹{L;=l"I‰Ä„›IƒE1öE1íM9wŽŠI‹GJ‹,ðIƒÆHƒEM…ít Iƒm„&H‹UH‹5ó»"H‹‚H…À„«H‰ïÿÐH‰ÃH…Û„I‹D$I;D$ ªHƒI‹T$H‰ÂHƒÀI‰D$Hƒ+„ÚM9wI‰ívÿÿÿIƒ/„61ÿè¼_ÿÿH…ÀI‰Ç„2¿èVaÿÿH…ÀH‰Ã„'H‹-c¼"L‰`L‰x H‹EL‹°€M…ö„,L‹%H€"I‹$‹BƒÀ‰BH‹<€";-1ÒH‰ÞH‰ïAÿÖI‹$ƒjH…À„'H‹ L‰íHQÿH…ÒH‰u}H‹SH‰D$H‰ßÿR0H‹D$ëgI‹EL‰ïÿP0éËþÿÿH‹CH‰ßÿP0éÿÿÿIƒ,$A½f „³Iƒ/„ÇH…Ût Hƒ+„ÎH —H=x1º9D‰îèënÿÿ1ÀH…ít%H‹MHQÿH…ÒH‰UuH‹UH‰D$H‰ïÿR0H‹D$HƒÄ[]A\A]A^A_ÃH‹B@H…À„ÆHƒÆ$é?þÿÿf.„H‰ÞL‰çèÅ_ÿÿ…À„YþÿÿIƒ,$A½h …MÿÿÿI‹D$L‰çÿP0M…ÿ„CÿÿÿIƒ/…9ÿÿÿI‹GL‰ÿÿP0é*ÿÿÿ€H‹CH‰ßÿP0é#ÿÿÿf„A½U 1íé ÿÿÿH‹‘~"H5 0A½Y 1íH‹8è¢^ÿÿIƒ,$…áþÿÿ1ÛE1ÿéqÿÿÿH‰ïèu`ÿÿH‰ÃézýÿÿI‹GL‰ÿÿP0é»ýÿÿL‰íA½l ëÁIƒ,$t}I‹L‰íA½n HƒèH…ÀI‰…Šþÿÿé=ÿÿÿ1ÒH‰ÞH‰ïè¾_ÿÿH…À…ýýÿÿL‰íA½v éWþÿÿH=È-è«^ÿÿ…À„¿ýÿÿëÜèÜ^ÿÿH…ÀuÒH‹}"H5Á-H‹8èá]ÿÿëºL‰íA½n éµþÿÿAWAVAUATI‰üUSH‰óHƒìXdH‹%(H‰D$H1ÀH…ÒHÇD$0HÇD$8HÇD$@…8H‹NHƒù…rH‹F L‹nH‰D$H‹F(H‰D$H‹͸"H‹=®¹"H‰ÞèÎ]ÿÿH…ÀH‰Å„ÚHƒH‹MH‹5›¸"H‹H…À„3H‰ïÿÐH‰ÃH…Û„ Hƒm„gòAD$è[]ÿÿH…ÀH‰Å„H‹˜|"H9C„.¿è”]ÿÿE1ÉH…ÀI‰Ç…5E1ÿA¼IE1íE1öHƒm„ H…Ût Hƒ+„œM…Ét Iƒ)„}M…ÿt Iƒ/„žM…öt Iƒ.„OM…ít Iƒm„¯H @H=i.ºÏD‰æè”kÿÿ1ÀH‹L$HdH3 %(…„ HƒÄX[]A\A]A^A_ÀH…í„ýH‰é@H‹Ù{"HƒìHnQH5n)L ÊH +A¸H‹81Àè]ÿÿXZ¾ÞHH ªH=Ó-ºÍèkÿÿ1Àéhÿÿÿf.„H‹EH‰ïÿP0éŠþÿÿI‰Þ¾1ÀfDIƒEHƒÀM‰lÇI‰l÷I‹FH‹˜€H…Û„L‹ :{"I‹‹BƒÀ‰BH‹/{";×1ÒL‰L$L‰þL‰÷ÿÓL‹L$I‹ƒjH…À„ÓH‰D$Iƒ/„”Iƒ.„zH‹c¶"H‹=D·"H‰Þèd[ÿÿH…ÀI‰Ç„HƒI‹WH‹51¶"H‹‚H…À„9L‰ÿÿÐH‰ÅH…í„Iƒ/„>òAD$ èòZÿÿH…ÀI‰Ç„&H‹/z"H9E„e¿è+[ÿÿH…ÀI‰Æ…'A¼8IE1íE1É1ÛH‹L$H‹H‰D$HƒèH…ÀH‰thH…í…yýÿÿéýÿÿf.„I‹FL‰÷ÿP0é¢ýÿÿI‹AL‰ÏÿP0étýÿÿH‹CL‰L$H‰ßÿP0L‹L$éKýÿÿ€I‹GL‰ÿÿP0éSýÿÿH‹|$L‰L$H‹GÿP0L‹L$뀄I‹EL‰ïÿP0éBýÿÿH‹EL‰L$H‰ïÿP0L‹L$éÜüÿÿ€I‹FL‰÷ÿP0éwþÿÿI‹GL‰ÿÿP0é]þÿÿI‹GL‰ÿÿP0é³þÿÿH‹nI‰ÕHƒýt(Ž%ýÿÿHƒýtHƒý…ýÿÿH‹F(H‰D$@H‹C H‰D$8H‹CH‰D$0L‰ïè:XÿÿHƒýI‰Æt,HƒýtGH…íucH‹5G³"L‰ïIƒîècYÿÿH…ÀH‰D$0„ H‹5þ²"L‰ïèFYÿÿH…ÀH‰D$8„x IƒîH‹5µ²"L‰ïè%YÿÿH…ÀH‰D$@„IƒîM…öÖH‹D$8L‹l$0H‰D$H‹D$@H‰D$éûÿÿ@H‹=±´"H‹WH‹‚H…À„nH‰ÞÿÐH‰ÅH…í…þúÿÿH‹•x"HS$H5²A¼IE1ÿH‹81Àè×YÿÿE1öE1íéûÿÿ@E1ÿA¼IE1íE1öE1Éé;ûÿÿH‹A@H…À„HƒÆ$é·úÿÿf.„E1ÉE1öE1íA¼IE1ÿéûÿÿf„L‹KM…É„ÅúÿÿL‹sIƒIƒHƒ+tq¿L‰L$èBXÿÿH…ÀI‰ÇL‹L$„ÿM‰O¾¸éÞûÿÿfD1ÒL‰þL‰÷èÛXÿÿH…ÀH‰D$…/üÿÿDL‰óE1ÉE1öE1íA¼!Ié{úÿÿH‹CL‰L$H‰ßÿP0L‹L$évÿÿÿH‹Øv"HƒìH @jH5l$L ÈHVA¸H‹81ÀèŽXÿÿY^¾ËHéùúÿÿfH‹= ³"H‹WH‹‚H…À„:H‰ÞÿÐI‰ÇM…ÿ…ÀûÿÿH‹ív"HS$H5 A¼%IE1íE1ö1Û1íH‹81Àè(XÿÿE1ÉéüÿÿH=&L‰L$èïVÿÿ…ÀL‹L$„ ûÿÿéÿÿÿDI‰êº1ÀfDH‹L$HƒÀHƒI‰LÆM‰|ÖI‹BH‹˜€H…Û„UL‹ Þu"I‹‹BƒÀ‰BH‹Óu";ÛL‰L$ 1ÒL‰×L‰T$L‰öÿÓL‹L$ H‰ÃL‹T$I‹ƒhH…Û„BIƒ.„¸Iƒ*„ÎL‹-ÿ°"H‹=à±"L‰îèVÿÿH…ÀI‰Æ„HƒI‹VH‹5Ͱ"H‹‚H…À„½L‰÷ÿÐI‰ÇM…ÿ„”Iƒ.„ŠòAD$(èŽUÿÿH…ÀI‰Æ„¢H‹Ët"I9G„é¿èÇUÿÿH…ÀI‰Å…KA¼ZIE1É1íéšúÿÿI‹FL‰T$L‰÷ÿP0L‹T$é/ÿÿÿ€I‹BL‰×ÿP0é#ÿÿÿf„I‹FL‰÷ÿP0égÿÿÿA¼'IE1íE1öE1É1Ûé9úÿÿf.„H‹B@H…À„#HƒÆ$é±ùÿÿf.„A¼*IE1íE1öE1É1Ûéùùÿÿf.„èUÿÿH…À…úüÿÿH‹Ës"H5ü#H‹8èTÿÿéßüÿÿ€L‹MM…É„ŽùÿÿL‹UIƒIƒHƒm„ê¿L‰L$(L‰T$ è˜TÿÿH…ÀI‰ÆL‹T$ L‹L$(„=M‰Nº¸é‡ýÿÿ€1ÒL‰×L‰öL‰T$è&UÿÿH…ÀH‰ÃL‹T$…ÛýÿÿDL‰ÕA¼CIE1íE1ÿE1Ééùÿÿf„H‹=©¯"H‹WH‹‚H…À„KL‰îÿÐI‰ÆM…ö…ÄýÿÿH‹s"IU$H5ªA¼GIE1íE1ÿ1íH‹81ÀèÊTÿÿE1Éé±øÿÿfH=±"L‰L$ L‰T$èŠSÿÿ…ÀL‹T$L‹L$ „ýüÿÿ„L‰ÕA¼CIE1íE1ÿE1É1Ûéføÿÿ€M‰üº1ÀfDH‹|$HƒÀHƒI‰|ÅM‰tÕI‹D$L‹°€M…ö„¤L‹ Ur"I‹‹BƒÀ‰BH‹Jr";ºL‰L$1ÒL‰îL‰çAÿÖL‹L$H‰ÅI‹ƒhH…í„IƒmtSIƒ,$t\¿èÒRÿÿH…ÀI‰Ç„¶H‹D$I‰_ ¿I‰o(I‰GèûPÿÿH…À„ªH‹PL‰:é”õÿÿfDI‹EL‰ïÿP0ë¡@I‹D$L‰çÿP0ë—A¼IIE1íE1É1íéL÷ÿÿDH‹B@H…À„¨HƒÆ$é-üÿÿfA¼LIE1íE1É1íé÷ÿÿDL‰T$è>RÿÿH…ÀL‹T$…ÐýÿÿH‹ép"H5!L‰T$H‹8è5QÿÿL‹T$é[þÿÿM‹OM…É„ üÿÿM‹gIƒIƒ$Iƒ/„€¿L‰L$èµQÿÿH…ÀI‰ÅL‹L$„OM‰Mº¸é1þÿÿ1ÒL‰îL‰çèSRÿÿH…ÀH‰Å…þÿÿ€M‰çE1öA¼eIE1ÉéKöÿÿ@H=I L‰L$è'Qÿÿ…ÀL‹L$„(þÿÿf.„M‰çE1öA¼eIE1É1íé öÿÿf.„A¼iIE1íE1öE1Ééëõÿÿ@A¼tIéøÿÿDèQÿÿH…À…jÿÿÿH‹³o"H5äH‹8èPÿÿë’H‹EL‰L$(H‰ïL‰T$ ÿP0L‹T$ L‹L$(éóûÿÿH‹B@H…À„Hs$ÿÐH‰Åé÷ÿÿH‰ïè¬QÿÿH‰Ãé™òÿÿHT$0L H5±}"H‰éL‰ïèÖ•ÿÿ…À‰÷ÿÿ¾ÏHé»óÿÿI‹GL‰L$L‰ÿÿP0L‹L$égþÿÿH‹B@H…À„¤Hs$ÿÐI‰Çé³øÿÿL‰ÿè8QÿÿH‰ÅéôÿÿH‹o"HƒìH5®jL  H i H A¸H‹81ÀèÇPÿÿ_¾ÆHAXé1óÿÿH‹B@H…ÀtLIu$ÿÐI‰Æé¦ûÿÿL‰÷èËPÿÿI‰Çé†ùÿÿH‹KéÂòÿÿH‰Þè²PÿÿH‰ÅéuöÿÿH‰Þè¢PÿÿI‰Çé øÿÿè•NÿÿL‰îèPÿÿI‰ÆéXûÿÿM‰ç1íA¼ZIé4ôÿÿL‰ÕA¼8IE1í1Ûé!ôÿÿL‰óé¥ñÿÿf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“¸f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹°ë×fDH‹H‹5Ú¨"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹.n"H9E„Äò $è NÿÿH…ÀI‰Æ„ò $f(ÁèðMÿÿH…ÀI‰Ç„$HƒEH‹(m"H9E„¿I‰íè!Nÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=.1Ûè—×ÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5wl"I‹‹BƒÀ‰BH‹ll";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%Zl"”ÃL;%Øk"”ÀØu L;%*l"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèLÿÿƒøÿ‰Ã…Äþÿÿè¸KÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èáJÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèKÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=„ègJÿÿ…À„KýÿÿëÝè˜JÿÿH…ÀuÓH‹Li"H5}H‹8èIÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèoKÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹¬h"H9_„¢èíIÿÿf(Ðf.¡(z„±H‹|$H9_„ò$èÀIÿÿò$f(Èf. o(z„§f(¾L‰çè&úÿÿ…Àu2H‹#h"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹ih"HƒëÌòWé]ÿÿÿfDH‹5i£"L‰ïIƒîèHÿÿH…ÀH‰D$…ÀH‹KH‹Ùg"HƒìH›QH5nL ÊH +A¸H‹81ÀèIÿÿXZ¾x1H ªH=º¨èWÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïè‘FÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5˜¢"L‰ïèÀGÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èîGÿÿH…Àò$„7þÿÿ¾s1é-ÿÿÿfDòL$ò$èÀGÿÿH…Àò$òL$„5þÿÿ¾t1éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LBH5Ær"H‰éL‰ïèËŒÿÿ…À‰^ÿÿÿ¾k1é°þÿÿH‹Jf"HƒìH ²jH5ÞL :HõA¸H‹81ÀèHÿÿY^¾g1ékþÿÿèFÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“¨f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹ ë×fDH‹H‹5¢ "H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹îe"H9E„Äò $èÊEÿÿH…ÀI‰Æ„ò $f(Áè°EÿÿH…ÀI‰Ç„$HƒEH‹èd"H9E„¿I‰íèáEÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=.1ÛèWÏÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹57d"I‹‹BƒÀ‰BH‹,d";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%d"”ÃL;%˜c"”ÀØu L;%êc"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèÈCÿÿƒøÿ‰Ã…ÄþÿÿèxCÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$è¡BÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèACÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=Dè'Bÿÿ…À„KýÿÿëÝèXBÿÿH…ÀuÓH‹ a"H5=H‹8è]Aÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿè/CÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹l`"H9_„¢è­Aÿÿf(Ðf.a z„±H‹|$H9_„ò$è€Aÿÿò$f(Èf. / z„§f(¾L‰çè&úÿÿ…Àu2H‹ã_"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹)`"HƒëÌòWé]ÿÿÿfDH‹5)›"L‰ïIƒîè]@ÿÿH…ÀH‰D$…ÀH‹KH‹™_"HƒìHfûQH5. L ŠûH ëúA¸H‹81ÀèPAÿÿXZ¾¬0H jüH=º¦èÁNÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèQ>ÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5Xš"L‰ïè€?ÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$è®?ÿÿH…Àò$„7þÿÿ¾§0é-ÿÿÿfDòL$ò$è€?ÿÿH…Àò$òL$„5þÿÿ¾¨0éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$L úH5fj"H‰éL‰ïè‹„ÿÿ…À‰^ÿÿÿ¾Ÿ0é°þÿÿH‹ ^"HƒìH rùjH5ž L úùHÀùA¸H‹81ÀèÀ?ÿÿY^¾›0ékþÿÿèß=ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“¸f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹°ë×fDH‹H‹5Z˜"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹®]"H9E„Äò $èŠ=ÿÿH…ÀI‰Æ„ò $f(Áèp=ÿÿH…ÀI‰Ç„$HƒEH‹¨\"H9E„¿I‰íè¡=ÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=.1ÛèÇÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5÷["I‹‹BƒÀ‰BH‹ì[";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%Ú["”ÃL;%X["”ÀØu L;%ª["…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèˆ;ÿÿƒøÿ‰Ã…Äþÿÿè8;ÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èa:ÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè;ÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH= èç9ÿÿ…À„KýÿÿëÝè:ÿÿH…ÀuÓH‹ÌX"H5ýH‹8è9ÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèï:ÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹,X"H9_„¢èm9ÿÿf(Ðf.!z„±H‹|$H9_„ò$è@9ÿÿò$f(Èf. ïz„§f(¾L‰çè&úÿÿ…Àu2H‹£W"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹éW"HƒëÌòWé]ÿÿÿfDH‹5é’"L‰ïIƒîè8ÿÿH…ÀH‰D$…ÀH‹KH‹YW"HƒìHóQH5îL JóH «òA¸H‹81Àè9ÿÿXZ¾DH *ôH= ºŠèFÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïè6ÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5’"L‰ïè@7ÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èn7ÿÿH…Àò$„7þÿÿ¾þCé-ÿÿÿfDòL$ò$è@7ÿÿH…Àò$òL$„5þÿÿ¾ÿCéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LÂñH5†c"H‰éL‰ïèK|ÿÿ…À‰^ÿÿÿ¾öCé°þÿÿH‹ÊU"HƒìH 2ñjH5^L ºñHuñA¸H‹81Àè€7ÿÿY^¾òCékþÿÿèŸ5ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“Èf.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹Àë×fDH‹H‹5"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹nU"H9E„Äò $èJ5ÿÿH…ÀI‰Æ„ò $f(Áè05ÿÿH…ÀI‰Ç„$HƒEH‹hT"H9E„¿I‰íèa5ÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=.1Ûè×¾ÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5·S"I‹‹BƒÀ‰BH‹¬S";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%šS"”ÃL;%S"”ÀØu L;%jS"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèH3ÿÿƒøÿ‰Ã…Äþÿÿèø2ÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$è!2ÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèÁ2ÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=Äè§1ÿÿ…À„KýÿÿëÝèØ1ÿÿH…ÀuÓH‹ŒP"H5½H‹8èÝ0ÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿè¯2ÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹ìO"H9_„¢è-1ÿÿf(Ðf.áz„±H‹|$H9_„ò$è1ÿÿò$f(Èf. ¯z„§f(¾L‰çè&úÿÿ…Àu2H‹cO"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹©O"HƒëÌòWé]ÿÿÿfDH‹5©Š"L‰ïIƒîèÝ/ÿÿH…ÀH‰D$…ÀH‹KH‹O"HƒìHñêQH5®üL ëH kêA¸H‹81ÀèÐ0ÿÿXZ¾ÏDH êëH=ºŒèA>ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèÑ-ÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5؉"L‰ïè/ÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$è./ÿÿH…Àò$„7þÿÿ¾ÊDé-ÿÿÿfDòL$ò$è/ÿÿH…Àò$òL$„5þÿÿ¾ËDéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$L˜éH5f["H‰éL‰ïè tÿÿ…À‰^ÿÿÿ¾ÂDé°þÿÿH‹ŠM"HƒìH òèjH5ûL zéHKéA¸H‹81Àè@/ÿÿY^¾¾Dékþÿÿè_-ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“¨f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹ ë×fDH‹H‹5â‡"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹.M"H9E„Äò $è -ÿÿH…ÀI‰Æ„ò $f(Áèð,ÿÿH…ÀI‰Ç„$HƒEH‹(L"H9E„¿I‰íè!-ÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=.ÿ1Ûè—¶ÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5wK"I‹‹BƒÀ‰BH‹lK";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%ZK"”ÃL;%ØJ"”ÀØu L;%*K"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çè+ÿÿƒøÿ‰Ã…Äþÿÿè¸*ÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èá)ÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè*ÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=„øèg)ÿÿ…À„KýÿÿëÝè˜)ÿÿH…ÀuÓH‹LH"H5}øH‹8è(ÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèo*ÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹¬G"H9_„¢èí(ÿÿf(Ðf.¡z„±H‹|$H9_„ò$èÀ(ÿÿò$f(Èf. oz„§f(¾L‰çè&úÿÿ…Àu2H‹#G"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹iG"HƒëÌòWé]ÿÿÿfDH‹5i‚"L‰ïIƒîè'ÿÿH…ÀH‰D$…ÀH‹KH‹ÙF"HƒìH¦âQH5nôL ÊâH +âA¸H‹81Àè(ÿÿXZ¾7CH ªãH=úºˆè6ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïè‘%ÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5˜"L‰ïèÀ&ÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èî&ÿÿH…Àò$„7þÿÿ¾2Cé-ÿÿÿfDòL$ò$èÀ&ÿÿH…Àò$òL$„5þÿÿ¾3CéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LMáH5æR"H‰éL‰ïèËkÿÿ…À‰^ÿÿÿ¾*Cé°þÿÿH‹JE"HƒìH ²àjH5ÞòL :áHáA¸H‹81Àè'ÿÿY^¾&Cékþÿÿè%ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u-òS@f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Ãf.K8ëßH‹H‹5²"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹þD"H9E„Äò $èÚ$ÿÿH…ÀI‰Æ„ò $f(ÁèÀ$ÿÿH…ÀI‰Ç„$HƒEH‹øC"H9E„¿I‰íèñ$ÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=>÷1Ûèg®ÿÿé¦þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5GC"I‹‹BƒÀ‰BH‹"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹9?"HƒëÌòWé]ÿÿÿfDH‹59z"L‰ïIƒîèmÿÿH…ÀH‰D$…ÀH‹KH‹©>"HƒìHvÚQH5>ìL šÚH ûÙA¸H‹81Àè` ÿÿXZ¾5H zÛH=+òºèÑ-ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèaÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5hy"L‰ïèÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$è¾ÿÿH…Àò$„7þÿÿ¾0é-ÿÿÿfDòL$ò$èÿÿH…Àò$òL$„5þÿÿ¾1éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LÙH5VG"H‰éL‰ïè›cÿÿ…À‰^ÿÿÿ¾(é°þÿÿH‹="HƒìH ‚ØjH5®êL ÙHÐØA¸H‹81ÀèÐÿÿY^¾$ékþÿÿèïÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u-òSPf.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Ãf.KHëßH‹H‹5zw"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹Î<"H9E„Äò $èªÿÿH…ÀI‰Æ„ò $f(ÁèÿÿH…ÀI‰Ç„$HƒEH‹È;"H9E„¿I‰íèÁÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=Nï1Ûè7¦ÿÿé¦þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5;"I‹‹BƒÀ‰BH‹ ;";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%ú:"”ÃL;%x:"”ÀØu L;%Ê:"…,¶ÛIƒ,$„žHƒm…çýÿÿH‹EH‰ïÿP0éØýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…™ýÿÿòL$H‰ïò$ÿP0òL$ò$éxýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çè¨ÿÿƒøÿ‰Ã…ÄþÿÿèXÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè!ÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=$èèÿÿ…À„KýÿÿëÝè8ÿÿH…ÀuÓH‹ì7"H5èH‹8è=ÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹L7"H9_„¢èÿÿf(Ðf.A÷z„±H‹|$H9_„ò$è`ÿÿò$f(Èf. ÷z„§f(¾L‰çè6úÿÿ…Àu2H‹Ã6"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹ 7"HƒëÌòWé]ÿÿÿfDH‹5 r"L‰ïIƒîè=ÿÿH…ÀH‰D$…ÀH‹KH‹y6"HƒìH;ÒQH5äL jÒH ËÑA¸H‹81Àè0ÿÿXZ¾H JÓH=;꺒è¡%ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïè1ÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹58q"L‰ïè`ÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èŽÿÿH…Àò$„7þÿÿ¾üé-ÿÿÿfDòL$ò$è`ÿÿH…Àò$òL$„5þÿÿ¾ýéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LâÐH5F?"H‰éL‰ïèk[ÿÿ…À‰^ÿÿÿ¾ôé°þÿÿH‹ê4"HƒìH RÐjH5~âL ÚÐH•ÐA¸H‹81Àè ÿÿY^¾ðékþÿÿè¿ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“¸f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹°ë×fDH‹H‹5:o"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹Ž4"H9E„Äò $èjÿÿH…ÀI‰Æ„ò $f(ÁèPÿÿH…ÀI‰Ç„$HƒEH‹ˆ3"H9E„¿I‰íèÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=Nç1Ûè÷ÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5×2"I‹‹BƒÀ‰BH‹Ì2";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%º2"”ÃL;%82"”ÀØu L;%Š2"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèhÿÿƒøÿ‰Ã…ÄþÿÿèÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èAÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèáÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=äßèÇÿÿ…À„KýÿÿëÝèøÿÿH…ÀuÓH‹¬/"H5ÝßH‹8èýÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèÏÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹ /"H9_„¢èMÿÿf(Ðf.ïz„±H‹|$H9_„ò$è ÿÿò$f(Èf. Ïîz„§f(¾L‰çè&úÿÿ…Àu2H‹ƒ."HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹É."HƒëÌòWé]ÿÿÿfDH‹5Éi"L‰ïIƒîèýÿÿH…ÀH‰D$…ÀH‹KH‹9."HƒìHûÉQH5ÎÛL *ÊH ‹ÉA¸H‹81ÀèðÿÿXZ¾ÚL šÈHUÈA¸H‹81Àè`ÿÿY^¾+Mékþÿÿè ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“Èf.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹Àë×fDH‹H‹5òf"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹N,"H9E„Äò $è* ÿÿH…ÀI‰Æ„ò $f(Áè ÿÿH…ÀI‰Ç„$HƒEH‹H+"H9E„¿I‰íèA ÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=Nß1Ûè·•ÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5—*"I‹‹BƒÀ‰BH‹Œ*";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%z*"”ÃL;%ø)"”ÀØu L;%J*"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çè( ÿÿƒøÿ‰Ã…ÄþÿÿèØ ÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$è ÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè¡ ÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=¤×è‡ÿÿ…À„KýÿÿëÝè¸ÿÿH…ÀuÓH‹l'"H5×H‹8è½ÿÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿè ÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹Ì&"H9_„¢è ÿÿf(Ðf.Áæz„±H‹|$H9_„ò$èàÿÿò$f(Èf. æz„§f(¾L‰çè&úÿÿ…Àu2H‹C&"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹‰&"HƒëÌòWé]ÿÿÿfDH‹5‰a"L‰ïIƒîè½ÿÿH…ÀH‰D$…ÀH‹KH‹ù%"HƒìHÑÁQH5ŽÓL êÁH KÁA¸H‹81Àè°ÿÿXZ¾NH ÊÂH=;Úºè!ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïè±ÿÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5¸`"L‰ïèàÿÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èÿÿH…Àò$„7þÿÿ¾Né-ÿÿÿfDòL$ò$èàÿÿH…Àò$òL$„5þÿÿ¾NéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LxÀH5F3"H‰éL‰ïèëJÿÿ…À‰^ÿÿÿ¾úMé°þÿÿH‹j$"HƒìH Ò¿jH5þÑL ZÀH+ÀA¸H‹81Àè ÿÿY^¾öMékþÿÿè?ÿÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“¨f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹ ë×fDH‹H‹5Â^"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹$"H9E„Äò $èêÿÿH…ÀI‰Æ„ò $f(ÁèÐÿÿH…ÀI‰Ç„$HƒEH‹#"H9E„¿I‰íèÿÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=N×1Ûèwÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5W""I‹‹BƒÀ‰BH‹L"";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%:""”ÃL;%¸!"”ÀØu L;% ""…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèèÿÿƒøÿ‰Ã…Äþÿÿè˜ÿÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èÁÿÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèaÿÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=dÏèGÿÿ…À„KýÿÿëÝèxÿÿH…ÀuÓH‹,"H5]ÏH‹8è}ÿþÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèOÿÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹Œ"H9_„¢èÍÿþÿf(Ðf.Þz„±H‹|$H9_„ò$è ÿþÿò$f(Èf. OÞz„§f(¾L‰çè&úÿÿ…Àu2H‹"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹I"HƒëÌòWé]ÿÿÿfDH‹5IY"L‰ïIƒîè}þþÿH…ÀH‰D$…ÀH‹KH‹¹"HƒìH†¹QH5NËL ª¹H ¹A¸H‹81ÀèpÿþÿXZ¾pLH ŠºH=;Òºèá ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèqüþÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5xX"L‰ïè ýþÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èÎýþÿH…Àò$„7þÿÿ¾kLé-ÿÿÿfDòL$ò$è ýþÿH…Àò$òL$„5þÿÿ¾lLéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$L-¸H5Æ*"H‰éL‰ïè«Bÿÿ…À‰^ÿÿÿ¾cLé°þÿÿH‹*"HƒìH ’·jH5¾ÉL ¸Hà·A¸H‹81ÀèàýþÿY^¾_LékþÿÿèÿûþÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u-òS`f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Ãf.KXëßH‹H‹5‚V"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹Þ"H9E„Äò $èºûþÿH…ÀI‰Æ„ò $f(Áè ûþÿH…ÀI‰Ç„$HƒEH‹Ø"H9E„¿I‰íèÑûþÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=^Ï1ÛèG…ÿÿé¦þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5'"I‹‹BƒÀ‰BH‹";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;% "”ÃL;%ˆ"”ÀØu L;%Ú"…,¶ÛIƒ,$„žHƒm…çýÿÿH‹EH‰ïÿP0éØýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…™ýÿÿòL$H‰ïò$ÿP0òL$ò$éxýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çè¸ùþÿƒøÿ‰Ã…ÄþÿÿèhùþÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$è‘øþÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè1ùþÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=4Çèøþÿ…À„KýÿÿëÝèHøþÿH…ÀuÓH‹ü"H5-ÇH‹8èM÷þÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèùþÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹\"H9_„¢è÷þÿf(Ðf.QÖz„±H‹|$H9_„ò$èp÷þÿò$f(Èf. Öz„§f(¾L‰çè6úÿÿ…Àu2H‹Ó"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹"HƒëÌòWé]ÿÿÿfDH‹5Q"L‰ïIƒîèMöþÿH…ÀH‰D$…ÀH‹KH‹‰"HƒìHa±QH5ÃL z±H Û°A¸H‹81Àè@÷þÿXZ¾ÍH Z²H=Kʺ”è±ÿÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèAôþÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5HP"L‰ïèpõþÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èžõþÿH…Àò$„7þÿÿ¾Èé-ÿÿÿfDòL$ò$èpõþÿH…Àò$òL$„5þÿÿ¾ÉéùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$L°H5v"H‰éL‰ïè{:ÿÿ…À‰^ÿÿÿ¾Àé°þÿÿH‹ú"HƒìH b¯jH5ŽÁL ê¯H»¯A¸H‹81Àè°õþÿY^¾¼ékþÿÿèÏóþÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“Èf.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹Àë×fDH‹H‹5BN"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹ž"H9E„Äò $èzóþÿH…ÀI‰Æ„ò $f(Áè`óþÿH…ÀI‰Ç„$HƒEH‹˜"H9E„¿I‰íè‘óþÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=^Ç1Ûè}ÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5ç"I‹‹BƒÀ‰BH‹Ü";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%Ê"”ÃL;%H"”ÀØu L;%š"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèxñþÿƒøÿ‰Ã…Äþÿÿè(ñþÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èQðþÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèñðþÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=ô¾è×ïþÿ…À„KýÿÿëÝèðþÿH…ÀuÓH‹¼"H5í¾H‹8è ïþÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèßðþÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹"H9_„¢è]ïþÿf(Ðf.Îz„±H‹|$H9_„ò$è0ïþÿò$f(Èf. ßÍz„§f(¾L‰çè&úÿÿ…Àu2H‹“ "HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹Ù "HƒëÌòWé]ÿÿÿfDH‹5ÙH"L‰ïIƒîè îþÿH…ÀH‰D$…ÀH‹KH‹I "HƒìH!©QH5ÞºL :©H ›¨A¸H‹81ÀèïþÿXZ¾D2H ªH=Kºªèqüþÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèìþÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5H"L‰ïè0íþÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$è^íþÿH…Àò$„7þÿÿ¾?2é-ÿÿÿfDòL$ò$è0íþÿH…Àò$òL$„5þÿÿ¾@2éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LȧH5V"H‰éL‰ïè;2ÿÿ…À‰^ÿÿÿ¾72é°þÿÿH‹º "HƒìH "§jH5N¹L ª§H{§A¸H‹81ÀèpíþÿY^¾32ékþÿÿèëþÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“Àf.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹¸ë×fDH‹H‹5F"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹^ "H9E„Äò $è:ëþÿH…ÀI‰Æ„ò $f(Áè ëþÿH…ÀI‰Ç„$HƒEH‹X "H9E„¿I‰íèQëþÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=^¿1ÛèÇtÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5§ "I‹‹BƒÀ‰BH‹œ ";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%Š "”ÃL;% "”ÀØu L;%Z "…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çè8éþÿƒøÿ‰Ã…ÄþÿÿèèèþÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èèþÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè±èþÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=´¶è—çþÿ…À„KýÿÿëÝèÈçþÿH…ÀuÓH‹|"H5­¶H‹8èÍæþÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèŸèþÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹Ü"H9_„¢èçþÿf(Ðf.ÑÅz„±H‹|$H9_„ò$èðæþÿò$f(Èf. ŸÅz„§f(¾L‰çè&úÿÿ…Àu2H‹S"HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹™"HƒëÌòWé]ÿÿÿfDH‹5™@"L‰ïIƒîèÍåþÿH…ÀH‰D$…ÀH‹KH‹ "HƒìHá QH5ž²L ú H [ A¸H‹81ÀèÀæþÿXZ¾H)H Ú¡H=KººAè1ôþÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèÁãþÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5È?"L‰ïèðäþÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èåþÿH…Àò$„7þÿÿ¾C)é-ÿÿÿfDòL$ò$èðäþÿH…Àò$òL$„5þÿÿ¾D)éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LˆŸH56"H‰éL‰ïèû)ÿÿ…À‰^ÿÿÿ¾;)é°þÿÿH‹z"HƒìH âžjH5±L jŸH;ŸA¸H‹81Àè0åþÿY^¾7)ékþÿÿèOãþÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“ f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹˜ë×fDH‹H‹5Ò="H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹"H9E„Äò $èúâþÿH…ÀI‰Æ„ò $f(ÁèàâþÿH…ÀI‰Ç„$HƒEH‹"H9E„¿I‰íèãþÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=^·1Ûè‡lÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5g"I‹‹BƒÀ‰BH‹\";¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;%J"”ÃL;%È"”ÀØu L;%"…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çèøàþÿƒøÿ‰Ã…Äþÿÿè¨àþÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$èÑßþÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïèqàþÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=t®èWßþÿ…À„KýÿÿëÝèˆßþÿH…ÀuÓH‹<þ!H5m®H‹8èÞþÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿè_àþÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹œý!H9_„¢èÝÞþÿf(Ðf.‘½z„±H‹|$H9_„ò$è°Þþÿò$f(Èf. _½z„§f(¾L‰çè&úÿÿ…Àu2H‹ý!HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹Yý!HƒëÌòWé]ÿÿÿfDH‹5Y8"L‰ïIƒîèÝþÿH…ÀH‰D$…ÀH‹KH‹Éü!HƒìH–˜QH5^ªL º˜H ˜A¸H‹81Àè€ÞþÿXZ¾°'H š™H=K²º=èñëþÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèÛþÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5ˆ7"L‰ïè°ÜþÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èÞÜþÿH…Àò$„7þÿÿ¾«'é-ÿÿÿfDòL$ò$è°ÜþÿH…Àò$òL$„5þÿÿ¾¬'éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$L=—H5¶"H‰éL‰ïè»!ÿÿ…À‰^ÿÿÿ¾£'é°þÿÿH‹:û!HƒìH ¢–jH5ΨL *—Hð–A¸H‹81ÀèðÜþÿY^¾Ÿ'ékþÿÿèÛþÿDf.„AWAVAUATUSH‰ûHƒì…öuH‹GHƒ¸ u=ò“°f.Ðs“öÛHƒÄ‰Ø[]A\A]A^A_Äf.‹¨ë×fDH‹H‹5Š5"H…Ò„7òL$ò$ÿÒò$H‰ÅòL$H…í„ðH‹Þú!H9E„Äò $èºÚþÿH…ÀI‰Æ„ò $f(Áè ÚþÿH…ÀI‰Ç„$HƒEH‹Øù!H9E„¿I‰íèÑÚþÿ1ÒH…ÀH‰Ã…‘Hƒmu%E1äH‹EH‰$H‰ïÿP0M…äH‹$t Iƒ,$„ÇM…öt Iƒ.„ØM…ÿt Iƒ/„iM…ít Iƒm„yH…Òt Hƒ*„ÊH…ÛtHƒ+u H‹CH‰ßÿP0H=^¯1ÛèGdÿÿé™þÿÿº1ÀHƒÀL‰tÃL‰|ÓI‹EL‹ €M…䄘L‹5'ù!I‹‹BƒÀ‰BH‹ù!;¡1ÒH‰ÞL‰ïAÿÔI‰ÄI‹ƒhM…ä„™Hƒ+„LIƒm„1L;% ù!”ÃL;%ˆø!”ÀØu L;%Úø!…,¶ÛIƒ,$„žHƒm…ÚýÿÿH‹EH‰ïÿP0éËýÿÿ@H‹MH•H9Q…'þÿÿH‹MHQÿH…ÒH‰U…‰ýÿÿòL$H‰ïò$ÿP0òL$ò$éhýÿÿDI‹GH‰$L‰ÿÿP0H‹$é€þÿÿf„I‹EH‰$L‰ïÿP0H‹$épþÿÿf„I‹D$H‰$L‰çÿP0H‹$é!þÿÿ„I‹FH‰$L‰÷ÿP0H‹$éþÿÿf„H‹BH‰×ÿP0é'þÿÿI‹EL‰ïÿP0éÀþÿÿH‹CH‰ßÿP0é¥þÿÿL‰çè¸Øþÿƒøÿ‰Ã…ÄþÿÿèhØþÿH…À„¶þÿÿHƒm„XE1í1ÒE1ÿ1ÛE1öé€ýÿÿH‹@@òL$ò$H…À„HƒÆ$ÿÐò$H‰ÅòL$é³üÿÿ1Û1ÒE1íE1ÿéýÿÿfI‹D$L‰çÿP0éRþÿÿ1Û1ÒE1íéýÿÿH‹UH…Ò„ÙüÿÿL‹mHƒIƒEHƒm„”¿H‰$è‘×þÿH…ÀH‰ÃH‹$„¾üÿÿH‰S¸ºéFýÿÿ1ÒH‰ÞL‰ïè1ØþÿH…ÀI‰Ä…ýÿÿD1ÒE1ÿE1öé€üÿÿH=4¦è×þÿ…À„KýÿÿëÝèH×þÿH…ÀuÓH‹üõ!H5-¦H‹8èMÖþÿë»H‹EH‰$H‰ïÿP0H‹$éUÿÿÿèØþÿòL$H‰Åò$éžûÿÿ1ÒE1í1ÛE1ÿE1öéüÿÿf.„AVAUATUI‰üSH‰óHƒì0dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$…ƒH‹NHƒù…ýH‹~H‹F H‰|$H‰D$H‹\õ!H9_„¢èÖþÿf(Ðf.Qµz„±H‹|$H9_„ò$èpÖþÿò$f(Èf. µz„§f(¾L‰çè&úÿÿ…Àu2H‹Óô!HƒH‹T$(dH3%(…/HƒÄ0[]A\A]A^ÃfDH‹õ!HƒëÌòWé]ÿÿÿfDH‹50"L‰ïIƒîèMÕþÿH…ÀH‰D$…ÀH‹KH‹‰ô!HƒìHKQH5¢L zH ÛA¸H‹81Àè@ÖþÿXZ¾|(H Z‘H=Kªº?è±ãþÿ1Àé3ÿÿÿf.„òOéïþÿÿfDH‹nI‰ÕHƒý„ÈHƒý„µH…íH‰é…aÿÿÿL‰ïèAÓþÿH…íI‰Æ„%ÿÿÿHƒýu!H‹5H/"L‰ïèpÔþÿH…ÀH‰D$„¹IƒîM…ö|H‹|$é(þÿÿò$èžÔþÿH…Àò$„7þÿÿ¾w(é-ÿÿÿfDòL$ò$èpÔþÿH…Àò$òL$„5þÿÿ¾x(éùþÿÿfH‹F H‰D$H‹CH‰D$é@ÿÿÿHT$LòŽH5–þ!H‰éL‰ïè{ÿÿ…À‰^ÿÿÿ¾o(é°þÿÿH‹úò!HƒìH bŽjH5Ž L êŽH¥ŽA¸H‹81Àè°ÔþÿY^¾k(ékþÿÿèÏÒþÿDf.„AWAVAUATUSH‰ûHƒì(…öuH‹GHƒ¸ …‰ò\ƒÐò\‹Øò\“àòYChòYKpòYSxòXÈò6²òXÑfTÐòƒèf.Âw H‹ò!HƒHƒÄ([]A\A]A^A_ÃfDH‹Yò!HƒHƒÄ([]A\A]A^A_ÃfDH‹H‹5’,"H…Ò„ŸòT$òL$òD$ÿÒòD$H‰ÅòL$òT$H…í„`H‹@ò!H9E„¶òT$òL$èÒþÿH…ÀH‰D$„âòL$f(ÁèøÑþÿH…ÀI‰ÆH‹L$„\òT$f(ÂèØÑþÿH…ÀI‰ÅH‹L$„RHƒEH‹ ñ!H9E„O¿H‰L$I‰ìèÿÑþÿH…ÀH‰ÃH‹L$…¦ÇD$ž:E1ÿH‹E1ÛHƒèH…ÀH‰E„tHƒ)„²M…öt Iƒ.„ÃM…ít Iƒm„£M…ät Iƒ,$„cM…ÿt Iƒ/„dH…Ût Hƒ+„•‹t$H ’H=æº èéßþÿHƒÄ(1À[]A\A]A^A_þº1À@HƒÀH‰LÃL‰tÓL‰lóI‹D$L‹°€M…ö„«L‹-1ð!I‹U‹BƒÀ‰BH‹%ð!;²1ÒH‰ÞL‰çAÿÖI‹UƒjH…À„¬H‹ HQÿH…ÒH‰„nI‹ $HQÿH…ÒI‰$„9Hƒm…‰ýÿÿH‹UH‰D$H‰ïÿR0H‹D$épýÿÿÇD$‹:1ÛE1äH‹EE1ÿHƒèH…ÀH‰E…½þÿÿE1öE1í1ÉH‹EH‰L$H‰ïÿP0H‹L$H…É…oþÿÿétþÿÿfDI‹D$L‰çÿP0éþÿÿI‹GL‰ÿÿP0éþÿÿH‹AH‰ÏÿP0é?þÿÿI‹EL‰ïÿP0éNþÿÿI‹FL‰÷ÿP0é.þÿÿH‹CH‰ßÿP0é\þÿÿH‹MHH9Q…5ýÿÿH‹MHQÿH…ÒH‰U…=üÿÿòT$H‰ïòL$òD$ÿP0òT$òL$òD$éüÿÿ€I‹T$H‰D$L‰çÿR0H‹D$é­þÿÿfDH‹SH‰D$H‰ßÿR0H‹D$éyþÿÿÇD$‡:éµýÿÿH‹@@òT$òL$òD$H…À„HƒÆ$ÿÐòD$H‰ÅòL$òT$éKüÿÿÇD$:E1ÿE1äE1íéòüÿÿÇD$:E1ÿE1äéßüÿÿL‹}M…ÿ„¤üÿÿL‹eIƒIƒ$Hƒm„š¿H‰L$èŽÎþÿH…ÀH‰ÃH‹L$„­L‰{¾º¸é-ýÿÿ1ÒH‰ÞL‰çè(ÏþÿH…À…~ýÿÿ€ÇD$¬:éÃýÿÿH=,èÎþÿ…À„:ýÿÿëÝè@ÎþÿH…ÀuÓH‹ôì!H5%H‹8èEÍþÿë»H‹EH‰ïÿP0H‹L$éRÿÿÿèÏþÿòT$H‰ÅòL$òD$é0ûÿÿÇD$ž:éàûÿÿAVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹Jì!H9_„Àè‹ÍþÿòD$ò\$f.7¬z„H‹|$(H9_„è[Íþÿf(Èf. ¬z„H‹|$0H9_„øòL$è-ÍþÿòL$f(Ðf.Û«z„ûòD$¾L‰çè ùÿÿH…À„WH‹T$8dH3%(…æHƒÄ@[]A\A]A^ÃfDògòd$é;ÿÿÿH…í„ÅH‰é@H‹që!HƒìHT‡QH5™L b‡H ÆA¸H‹81Àè(ÍþÿXZ¾0;H BˆH=s¡º è™Úþÿ1Àé[ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïè ÊþÿHƒýI‰Æt,HƒýtGH…íucH‹5%"L‰ïIƒîè3ËþÿH…ÀH‰D$ „¯H‹5f%"L‰ïèËþÿH…ÀH‰D$(„LIƒîH‹55%"L‰ïèõÊþÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿè+ËþÿH…À„ãýÿÿ¾*;é×þÿÿ„òL$èËþÿH…ÀòL$„ßýÿÿ¾+;é«þÿÿ@òT$òL$è×ÊþÿH…ÀòL$òT$„ßýÿÿ¾,;éwþÿÿH‹©é!HƒìH …jH5=—L ™…Hu…A¸H‹81Àè_ËþÿY^¾;é2þÿÿH q†H=¢Ÿº ¾F;èÃØþÿ1Àé…ýÿÿHT$ L&…H5)ö!H‰éL‰ïèŽÿÿ…À‰ìþÿÿ¾!;éÛýÿÿH‹ é!HƒìH5ª–jL …H e„HÙ„A¸H‹81ÀèÃÊþÿ_¾;AXé•ýÿÿH‹KéMýÿÿèØÈþÿ„AWAVAUATUSH‰ûHƒì(…öuH‹GHƒ¸ u}ò\Cò\K ò\S(òYC@òYKHòYSPòXÈòS¨òXÑfTÐòƒˆf.ÂwH‹è!HƒHƒÄ([]A\A]A^A_ÃH‹yè!HƒHƒÄ([]A\A]A^A_ÃfDH‹H‹5²""H…Ò„ŸòT$òL$òD$ÿÒòD$H‰ÅòL$òT$H…í„`H‹`è!H9E„¶òT$òL$è5ÈþÿH…ÀH‰D$„âòL$f(ÁèÈþÿH…ÀI‰ÆH‹L$„\òT$f(ÂèøÇþÿH…ÀI‰ÅH‹L$„RHƒEH‹+ç!H9E„O¿H‰L$I‰ìèÈþÿH…ÀH‰ÃH‹L$…¦ÇD$Ö E1ÿH‹E1ÛHƒèH…ÀH‰E„tHƒ)„²M…öt Iƒ.„ÃM…ít Iƒm„£M…ät Iƒ,$„cM…ÿt Iƒ/„dH…Ût Hƒ+„•‹t$H ²ƒH=#ºüè ÖþÿHƒÄ(1À[]A\A]A^A_þº1À@HƒÀH‰LÃL‰tÓL‰lóI‹D$L‹°€M…ö„«L‹-Qæ!I‹U‹BƒÀ‰BH‹Eæ!;²1ÒH‰ÞL‰çAÿÖI‹UƒjH…À„¬H‹ HQÿH…ÒH‰„nI‹ $HQÿH…ÒI‰$„9Hƒm…ŒýÿÿH‹UH‰D$H‰ïÿR0H‹D$ésýÿÿÇD$à 1ÛE1äH‹EE1ÿHƒèH…ÀH‰E…½þÿÿE1öE1í1ÉH‹EH‰L$H‰ïÿP0H‹L$H…É…oþÿÿétþÿÿfDI‹D$L‰çÿP0éþÿÿI‹GL‰ÿÿP0éþÿÿH‹AH‰ÏÿP0é?þÿÿI‹EL‰ïÿP0éNþÿÿI‹FL‰÷ÿP0é.þÿÿH‹CH‰ßÿP0é\þÿÿH‹MHH9Q…5ýÿÿH‹MHQÿH…ÒH‰U…IüÿÿòT$H‰ïòL$òD$ÿP0òT$òL$òD$éüÿÿ€I‹T$H‰D$L‰çÿR0H‹D$é­þÿÿfDH‹SH‰D$H‰ßÿR0H‹D$éyþÿÿÇD$¿ éµýÿÿH‹@@òT$òL$òD$H…À„HƒÆ$ÿÐòD$H‰ÅòL$òT$éKüÿÿÇD$Å E1ÿE1äE1íéòüÿÿÇD$Ç E1ÿE1äéßüÿÿL‹}M…ÿ„¤üÿÿL‹eIƒIƒ$Hƒm„š¿H‰L$è®ÄþÿH…ÀH‰ÃH‹L$„­L‰{¾º¸é-ýÿÿ1ÒH‰ÞL‰çèHÅþÿH…À…~ýÿÿ€ÇD$ä éÃýÿÿH=L“è/Äþÿ…À„:ýÿÿëÝè`ÄþÿH…ÀuÓH‹ã!H5E“H‹8èeÃþÿë»H‹EH‰ïÿP0H‹L$éRÿÿÿè:ÅþÿòT$H‰ÅòL$òD$é0ûÿÿÇD$Ö éàûÿÿAVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹jâ!H9_„Àè«ÃþÿòD$ò\$f.W¢z„H‹|$(H9_„è{Ãþÿf(Èf. /¢z„H‹|$0H9_„øòL$èMÃþÿòL$f(Ðf.û¡z„ûòD$¾L‰çè0ùÿÿH…À„WH‹T$8dH3%(…æHƒÄ@[]A\A]A^ÃfDògòd$é;ÿÿÿH…í„ÅH‰é@H‹‘á!HƒìHt}QH5&L ‚}H ã|A¸H‹81ÀèHÃþÿXZ¾h!H b~H=Ó—ºüè¹Ðþÿ1Àé[ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïè*ÀþÿHƒýI‰Æt,HƒýtGH…íucH‹5¯"L‰ïIƒîèSÁþÿH…ÀH‰D$ „¯H‹5†"L‰ïè6ÁþÿH…ÀH‰D$(„LIƒîH‹5U"L‰ïèÁþÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿèKÁþÿH…À„ãýÿÿ¾b!é×þÿÿ„òL$è%ÁþÿH…ÀòL$„ßýÿÿ¾c!é«þÿÿ@òT$òL$è÷ÀþÿH…ÀòL$òT$„ßýÿÿ¾d!éwþÿÿH‹Éß!HƒìH 1{jH5]L ¹{H•{A¸H‹81ÀèÁþÿY^¾U!é2þÿÿH ‘|H=–ºü¾~!èãÎþÿ1Àé…ýÿÿHT$ LF{H5)ê!H‰éL‰ïè®ÿÿ…À‰ìþÿÿ¾Y!éÛýÿÿH‹-ß!HƒìH5ÊŒjL ${H …zHùzA¸H‹81ÀèãÀþÿ_¾P!AXé•ýÿÿH‹KéMýÿÿèø¾þÿ„AWAVAUATUSH‰ûHƒì(…öuH‹GHƒ¸ u5òYC(òYK0òYS8òXÁòXÂòXCòYC HƒÄ([]A\A]A^A_ÃDH‹H‹5ú"H…Ò„ÐòT$òL$òD$ÿÒòD$H‰ÅòL$òT$H…í„ÝH‹ÈÞ!H9E„.òT$òL$è¾þÿH…ÀI‰Æ„¶òL$f(Á肾þÿH…ÀH‰Â„¬òT$H‰D$f(Âèb¾þÿH…ÀI‰ÇH‹T$„´HƒEH‹•Ý!H9E„ª¿H‰T$I‰ì艾þÿ1ÉH…ÀH‰ÃH‹T$…¨Hƒmu1E1íH‹EH‰L$H‰ïH‰T$ÿP0M…íH‹T$H‹L$t Iƒm„îM…öt Iƒ.„H…Òt Hƒ*„ M…ÿt Iƒ/„1M…ät Iƒ,$„H…Ét Hƒ)„’H…Ût Hƒ+„#H=¼“èçGÿÿfïÀéRþÿÿ¾¹1ÀfHƒÀL‰tÃH‰TËL‰|óI‹D$L‹¨€M…í„L‹5¹Ü!I‹‹BƒÀ‰BH‹®Ü!;1ÒH‰ÞL‰çAÿÕI‰ÅI‹ƒhM…í„BHƒ+„¾Iƒ,$„£H‹<Ü!I9E„‚L‰ïèz½þÿf.2œz„ÏIƒm„÷Hƒm…ˆýÿÿH‹EòD$H‰ïÿP0òD$émýÿÿf„H‹MH5H9Q…½ýÿÿH‹MHQÿH…ÒH‰U…ýÿÿòT$H‰ïòL$òD$ÿP0òT$òL$òD$éêüÿÿ€I‹D$H‰L$L‰çÿP0H‹L$éeþÿÿfDH‹AH‰ÏÿP0é_þÿÿI‹EH‰L$L‰ïH‰T$ÿP0H‹L$H‹T$éïýÿÿDI‹FH‰L$L‰÷H‰T$ÿP0H‹L$H‹T$éÖýÿÿDH‹BH‰L$H‰×ÿP0H‹L$éÇýÿÿ€I‹GH‰L$L‰ÿÿP0H‹L$é¶ýÿÿ€H‹CH‰ßÿP0éÎýÿÿòAEé{þÿÿDI‹D$L‰çÿP0éMþÿÿH‹CH‰ßÿP0é3þÿÿH‹@@òT$òL$òD$H…À„ŒHƒÆ$ÿÐòD$H‰ÅòL$òT$éüÿÿ1ÛéIýÿÿ1Û1ÉE1äE1ÿ1Òé´üÿÿ1Û1ÉE1äE1ÿé¥üÿÿI‹EòD$L‰ïÿP0òD$éîýÿÿ1Û1ÉE1äé{üÿÿH‹MH…É„IüÿÿL‹eHƒIƒ$Hƒm„Ø¿H‰L$H‰T$踺þÿH…ÀH‰ÃH‹T$H‹L$„,üÿÿH‰K¾¹¸éÊüÿÿ1ÒH‰ÞL‰çèM»þÿH…ÀI‰Å…ýÿÿ1ÉE1ÿ1ÒE1öéëûÿÿH=R‰è5ºþÿ…À„×üÿÿëÛòD$è`ºþÿH…ÀòD$„ýÿÿHƒmtsE1ö1ÒE1ÿ1ÛE1ä1ÉéÍûÿÿè1ºþÿH…ÀuœH‹åØ!H5‰H‹8è6¹þÿë„H‹EH‰L$H‰ïÿP0H‹T$H‹L$é ÿÿÿè»þÿòT$H‰ÅòL$òD$éúÿÿ1ÉE1ä1ÛE1ÿ1ÒE1öé7ûÿÿAVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹*Ø!H9_„Àèk¹þÿòD$ò\$f.˜z„H‹|$(H9_„è;¹þÿf(Èf. ï—z„H‹|$0H9_„øòL$è ¹þÿòL$f(Ðf.»—z„ûòD$¾L‰çèÐøÿÿè+¸þÿH…À„RH‹T$8dH3%(…áHƒÄ@[]A\A]A^Ãògòd$é;ÿÿÿH…í„ÅH‰é@H‹Q×!HƒìHAsQH5æ„L BsH £rA¸H‹81Àè¹þÿXZ¾óH "tH=ÓºcèyÆþÿ1Àé`ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïèêµþÿHƒýI‰Æt,HƒýtGH…íucH‹5"L‰ïIƒîè·þÿH…ÀH‰D$ „¯H‹5Î"L‰ïèö¶þÿH…ÀH‰D$(„LIƒîH‹5…"L‰ïèÕ¶þÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿè ·þÿH…À„ãýÿÿ¾íé×þÿÿ„òL$èå¶þÿH…ÀòL$„ßýÿÿ¾îé«þÿÿ@òT$òL$è·¶þÿH…ÀòL$òT$„ßýÿÿ¾ïéwþÿÿH‹‰Õ!HƒìH ñpjH5ƒL yqHbqA¸H‹81Àè?·þÿY^¾àé2þÿÿH QrH=Œºc¾ è£Äþÿ1ÀéŠýÿÿHT$ LqH5iÞ!H‰éL‰ïènûþÿ…À‰ìþÿÿ¾äéÛýÿÿH‹íÔ!HƒìH5Š‚jL äpH EpHÆpA¸H‹81À裶þÿ_¾ÛAXé•ýÿÿH‹KéMýÿÿ踴þÿ„AWAVAUATUSH‰ûHƒì8E…ÀH‰t$H‰T$H‰L$ uH‹GHƒ¸ …™1ÿè’³þÿH…ÀI‰Ä„vH‹kH;-sÔ!„õHƒEE1íE1öL;mH‹EJ‹èHƒM…öt Iƒ.„%H‹SH‹5Š"H‹‚H…À„ŠH‰ßÿÐH‰ÂH…Ò„iH‹²Ó!H9B…˜H‹rH…ö„‹L‹rHƒIƒHƒ*„Õ¿H‰t$膴þÿH…ÀI‰ÇH‹t$„5I‰wº¾¸H‹L$HƒÀHƒI‰LÇH‹D$HƒI‰D×H‹D$ HƒI‰D÷I‹FL‹ˆ€M…É„ðL‹AÓ!I‹‹BƒÀ‰BH‹6Ó!;îL‰T$1ÒL‰þL‰÷AÿÑL‹T$I‰ÁI‹ƒhM…É„öIƒ/„|Iƒ.„"I‹D$I;D$ 6IƒI‹T$L‰ ÂHƒÀI‰D$Iƒ)„bIƒÅL;mI‰ÞŒqþÿÿHƒm„>I‹D$L‹-jÒ!H‹8L9o„ß訳þÿf(Èf. \’z„ÒIƒ$1Ûë:H‰ïòL$èz³þÿòL$f.,’z„THƒm„ò]Áf(ÈI;\$I‹D$H‹,ØHƒÃHƒEL9mu¦òEë³€I‹FL‰÷ÿP0éÌýÿÿH‹BH‰t$H‰×ÿP0H‹t$éþÿÿ€I‹FL‰L$L‰÷ÿP0I‹D$I;D$ L‹L$ŒÊþÿÿL‰ÎL‰çL‰L$è<²þÿ…ÀL‹L$„ÃþÿÿE1ÿE1ö1öé}fI‹GL‰L$L‰ÿÿP0L‹L$ékþÿÿ€I‹AL‰ÏÿP0éþÿÿ¿H‰T$è²þÿH‹T$H…ÀI‰ÇI‰Öt'¾º1ÀéŽýÿÿH‹ÉÐ!H5ú€H‹8è±þÿ1öE1ÉE1íIƒ,$„ÇH…ít Hƒm„ßM…Ét Iƒ)„øH…öt Hƒ.„ M…öt Iƒ.„ M…ÿt Iƒ/„ H=Œ‡è;ÿÿM…ífïÉtI‹EfïÉHƒèH…ÀI‰Et9H…ÛtHƒ+uH‹CòL$H‰ßÿP0òL$HƒÄ8f(Á[]A\A]A^A_ÃDI‹EòL$L‰ïÿP0òL$ë¯I‹D$L‰L$L‰çH‰t$ÿP0L‹L$H‹t$éÿÿÿ@H‹EL‰L$H‰ïH‰t$ÿP0L‹L$H‹t$éþþÿÿDI‹AH‰t$L‰ÏÿP0H‹t$éïþÿÿ€H‹FH‰÷ÿP0éèþÿÿI‹FL‰÷ÿP0éçþÿÿI‹GL‰ÿÿP0éæþÿÿE1öE1ÿ1öE1Éé{þÿÿH‹B@H…À„=HƒÆ$é`ûÿÿf.„1ÒL‰þL‰÷èó°þÿH…ÀI‰Á…Aüÿÿ1öé;þÿÿH=L‰T$(L‰L$èÚ¯þÿ…ÀL‹L$L‹T$(„êûÿÿé þÿÿL‰L$èö¯þÿH…À„Ýýÿÿ1öL‹L$éìýÿÿ1ÛE1íé;þÿÿfDH‹H‹5B "H…Ò„àÿÒI‰ÄM…ätÏI‹D$H;3Ï!„ Iƒ$H;aÎ!„Í¿èa¯þÿH…ÀI‰ÆM‰á…)E1ÿ1ö1í1Ûéoýÿÿ@E1Éécýÿÿ„H‹AÎ!H5ºE1ÿE1ö1í1ÛH‹8èP®þÿ1öE1Éé1ýÿÿH‰ßè.°þÿH‰Âé$úÿÿfDH‹EòL$H‰ïòD$ÿP0òL$òD$éÀûÿÿf„òL$òD$èÏ®þÿH…ÀòD$òL$„†ûÿÿL‰àL‰óM‰åE1ÿI‰ÄE1ö1öE1Éé¬üÿÿòOé ûÿÿI‹L$HxH9Q…áþÿÿI‹ $HQÿH…ÒI‰$…ùÿÿL‰çÿP0éõøÿÿfDH‹EH‰ïÿP0é³úÿÿ¹º1ÀDH‹|$HƒÀHƒI‰|ÆH‹D$HƒI‰DÖH‹D$ HƒI‰DÎI‹AH‹˜€H…Û„ L‹÷Ì!I‹‹BƒÀ‰BH‹ìÌ!;ÜL‰T$1ÒL‰ÏL‰L$L‰öÿÓL‹T$H‰ÅL‹L$I‹ƒhH…í„ØIƒ.tpIƒ)t^H‹pÌ!H9EtJH‰ïè²­þÿf(Èf. fŒz„GHƒmtsIƒ,$… üÿÿI‹D$òL$L‰çÿP0òL$éðûÿÿòMë»I‹AL‰ÏÿP0ë–I‹FL‰L$L‰÷ÿP0L‹L$éwÿÿÿI‹$HƒèH…ÀI‰$„’L‰óM‰åévûÿÿH‹EòL$H‰ïÿP0òL$érÿÿÿH‹@@H…À„£HƒÆ$ÿÐI‰Äé ýÿÿI‹t$H…ö„%ýÿÿM‹L$HƒIƒIƒ,$„K¿L‰L$(H‰t$èd¬þÿH…ÀI‰ÆH‹t$L‹L$(„RI‰v¹º¸éþÿÿ1ÒL‰ÏL‰öL‰L$èô¬þÿH…ÀH‰ÅL‹L$…þÿÿE1ÿ1ö1Ûé2úÿÿòL$è¬þÿH…ÀòL$„ŸþÿÿL‰àE1öE1äéHýÿÿ€H=ÉzL‰T$L‰L$被þÿ…ÀL‹L$L‹T$„üýÿÿéYüÿÿL‰L$èÁ«þÿH…ÀL‹L$u„H‹pÊ!H5¡zL‰L$H‹8輪þÿL‹L$é üÿÿòL$臫þÿH…ÀòL$„øÿÿM‰åL‰óéÒùÿÿI‹D$òL$L‰çÿP0I‹$òL$éNþÿÿI‹D$L‰L$(L‰çH‰t$ÿP0H‹t$L‹L$(é‘þÿÿè4¬þÿI‰ÄéhûÿÿE1ÿ1í1ÛéùÿÿAVAUI‰ýATUSH‰óHƒì dH‹%(H‰D$1ÀH…ÒHÇ$HÇD$HÇD$…ËH‹NHƒùuaH‹vH‹S H‹K(A¸L‰ïèõÿÿè"ªþÿH…À„iH‹|$dH3<%(…;HƒÄ []A\A]A^ÄH…í„ H‰é@H‹QÉ!HƒìHAeQH5ævL BeH £dA¸H‹81Àè«þÿXZ¾ûH "fH= €º.èy¸þÿ1ÀéiÿÿÿfH‹nI‰ÔHƒýt$~HƒýtHƒý…zÿÿÿH‹F(H‰D$H‹C H‰D$H‹CH‰$L‰çè¨þÿHƒýI‰Æt+HƒýtFH…íu^H‹5”"L‰çIƒîè8©þÿH…ÀH‰$„8H‹5l"L‰çè©þÿH…ÀH‰D$„ÕIƒîH‹5;"L‰çèû¨þÿH…ÀH‰D$tEIƒîM…ö}H‹T$H‹4$H‹L$é|þÿÿH 1eH=º.¾ 胷þÿ1ÀésþÿÿH‹ýÇ!HƒìH ecjH5‘uL ícHÖcA¸H‹81À賩þÿY^¾èé¦þÿÿL³cH5IÐ!H‰âH‰éL‰çè îþÿ…À‰_ÿÿÿ¾ìéxþÿÿH‹ŠÇ!HƒìH5'ujL cH âbHccA¸H‹81Àè@©þÿ_¾ãAXé2þÿÿH‹KéêýÿÿèU§þÿDAWAVAUATUSH‰ûHƒì8E…ÀH‰t$H‰T$H‰L$ uH‹GHƒ¸ …™1ÿè2¦þÿH…ÀI‰Ä„vH‹kH;-Ç!„õHƒEE1íE1öL;mH‹EJ‹èHƒM…öt Iƒ.„%H‹SH‹5*"H‹‚H…À„ŠH‰ßÿÐH‰ÂH…Ò„iH‹RÆ!H9B…˜H‹rH…ö„‹L‹rHƒIƒHƒ*„Õ¿H‰t$è&§þÿH…ÀI‰ÇH‹t$„5I‰wº¾¸H‹L$HƒÀHƒI‰LÇH‹D$HƒI‰D×H‹D$ HƒI‰D÷I‹FL‹ˆ€M…É„ðL‹áÅ!I‹‹BƒÀ‰BH‹ÖÅ!;îL‰T$1ÒL‰þL‰÷AÿÑL‹T$I‰ÁI‹ƒhM…É„öIƒ/„|Iƒ.„"I‹D$I;D$ 6IƒI‹T$L‰ ÂHƒÀI‰D$Iƒ)„bIƒÅL;mI‰ÞŒqþÿÿHƒm„>I‹D$L‹- Å!H‹8L9o„ßèH¦þÿf(Èf. ü„z„ÒIƒ$1Ûë:H‰ïòL$è¦þÿòL$f.Ì„z„THƒm„ò_Áf(ÈI;\$I‹D$H‹,ØHƒÃHƒEL9mu¦òEë³€I‹FL‰÷ÿP0éÌýÿÿH‹BH‰t$H‰×ÿP0H‹t$éþÿÿ€I‹FL‰L$L‰÷ÿP0I‹D$I;D$ L‹L$ŒÊþÿÿL‰ÎL‰çL‰L$èܤþÿ…ÀL‹L$„ÃþÿÿE1ÿE1ö1öé}fI‹GL‰L$L‰ÿÿP0L‹L$ékþÿÿ€I‹AL‰ÏÿP0éþÿÿ¿H‰T$豤þÿH‹T$H…ÀI‰ÇI‰Öt'¾º1ÀéŽýÿÿH‹iÃ!H5šsH‹8躣þÿ1öE1ÉE1íIƒ,$„ÇH…ít Hƒm„ßM…Ét Iƒ)„øH…öt Hƒ.„ M…öt Iƒ.„ M…ÿt Iƒ/„ H=dzè.ÿÿM…ífïÉtI‹EfïÉHƒèH…ÀI‰Et9H…ÛtHƒ+uH‹CòL$H‰ßÿP0òL$HƒÄ8f(Á[]A\A]A^A_ÃDI‹EòL$L‰ïÿP0òL$ë¯I‹D$L‰L$L‰çH‰t$ÿP0L‹L$H‹t$éÿÿÿ@H‹EL‰L$H‰ïH‰t$ÿP0L‹L$H‹t$éþþÿÿDI‹AH‰t$L‰ÏÿP0H‹t$éïþÿÿ€H‹FH‰÷ÿP0éèþÿÿI‹FL‰÷ÿP0éçþÿÿI‹GL‰ÿÿP0éæþÿÿE1öE1ÿ1öE1Éé{þÿÿH‹B@H…À„=HƒÆ$é`ûÿÿf.„1ÒL‰þL‰÷è“£þÿH…ÀI‰Á…Aüÿÿ1öé;þÿÿH=¡qL‰T$(L‰L$èz¢þÿ…ÀL‹L$L‹T$(„êûÿÿé þÿÿL‰L$è–¢þÿH…À„Ýýÿÿ1öL‹L$éìýÿÿ1ÛE1íé;þÿÿfDH‹H‹5âü!H…Ò„àÿÒI‰ÄM…ätÏI‹D$H;ÓÁ!„ Iƒ$H;Á!„Í¿è¢þÿH…ÀI‰ÆM‰á…)E1ÿ1ö1í1Ûéoýÿÿ@E1Éécýÿÿ„H‹áÀ!H5ZrE1ÿE1ö1í1ÛH‹8èð þÿ1öE1Éé1ýÿÿH‰ßè΢þÿH‰Âé$úÿÿfDH‹EòL$H‰ïòD$ÿP0òL$òD$éÀûÿÿf„òL$òD$èo¡þÿH…ÀòD$òL$„†ûÿÿL‰àL‰óM‰åE1ÿI‰ÄE1ö1öE1Éé¬üÿÿòOé ûÿÿI‹L$HxH9Q…áþÿÿI‹ $HQÿH…ÒI‰$…ùÿÿL‰çÿP0éõøÿÿfDH‹EH‰ïÿP0é³úÿÿ¹º1ÀDH‹|$HƒÀHƒI‰|ÆH‹D$HƒI‰DÖH‹D$ HƒI‰DÎI‹AH‹˜€H…Û„ L‹—¿!I‹‹BƒÀ‰BH‹Œ¿!;ÜL‰T$1ÒL‰ÏL‰L$L‰öÿÓL‹T$H‰ÅL‹L$I‹ƒhH…í„ØIƒ.tpIƒ)t^H‹¿!H9EtJH‰ïèR þÿf(Èf. z„GHƒmtsIƒ,$… üÿÿI‹D$òL$L‰çÿP0òL$éðûÿÿòMë»I‹AL‰ÏÿP0ë–I‹FL‰L$L‰÷ÿP0L‹L$éwÿÿÿI‹$HƒèH…ÀI‰$„’L‰óM‰åévûÿÿH‹EòL$H‰ïÿP0òL$érÿÿÿH‹@@H…À„£HƒÆ$ÿÐI‰Äé ýÿÿI‹t$H…ö„%ýÿÿM‹L$HƒIƒIƒ,$„K¿L‰L$(H‰t$èŸþÿH…ÀI‰ÆH‹t$L‹L$(„RI‰v¹º¸éþÿÿ1ÒL‰ÏL‰öL‰L$蔟þÿH…ÀH‰ÅL‹L$…þÿÿE1ÿ1ö1Ûé2úÿÿòL$輞þÿH…ÀòL$„ŸþÿÿL‰àE1öE1äéHýÿÿ€H=imL‰T$L‰L$èBžþÿ…ÀL‹L$L‹T$„üýÿÿéYüÿÿL‰L$èažþÿH…ÀL‹L$u„H‹½!H5AmL‰L$H‹8è\þÿL‹L$é üÿÿòL$è'žþÿH…ÀòL$„øÿÿM‰åL‰óéÒùÿÿI‹D$òL$L‰çÿP0I‹$òL$éNþÿÿI‹D$L‰L$(L‰çH‰t$ÿP0H‹t$L‹L$(é‘þÿÿèÔžþÿI‰ÄéhûÿÿE1ÿ1í1ÛéùÿÿAVAUI‰ýATUSH‰óHƒì dH‹%(H‰D$1ÀH…ÒHÇ$HÇD$HÇD$…ËH‹NHƒùuaH‹vH‹S H‹K(A¸L‰ïèõÿÿèœþÿH…À„iH‹|$dH3<%(…;HƒÄ []A\A]A^ÄH…í„ H‰é@H‹ñ»!HƒìHáWQH5†iL âWH CWA¸H‹81Àè¨þÿXZ¾G H ÂXH=ãrºDè«þÿ1ÀéiÿÿÿfH‹nI‰ÔHƒýt$~HƒýtHƒý…zÿÿÿH‹F(H‰D$H‹C H‰D$H‹CH‰$L‰ç诚þÿHƒýI‰Æt+HƒýtFH…íu^H‹54ö!L‰çIƒîèØ›þÿH…ÀH‰$„8H‹5 ö!L‰çè¼›þÿH…ÀH‰D$„ÕIƒîH‹5Ûõ!L‰çè››þÿH…ÀH‰D$tEIƒîM…ö}H‹T$H‹4$H‹L$é|þÿÿH ÑWH=òqºD¾] è#ªþÿ1ÀésþÿÿH‹º!HƒìH VjH51hL VHvVA¸H‹81ÀèSœþÿY^¾4 é¦þÿÿLSVH5IÃ!H‰âH‰éL‰çè«àþÿ…À‰_ÿÿÿ¾8 éxþÿÿH‹*º!HƒìH5ÇgjL !VH ‚UHVA¸H‹81Àèà›þÿ_¾/ AXé2þÿÿH‹Kéêýÿÿèõ™þÿDAWAVAUATUSH‰ûHƒì(…öuH‹GHƒ¸ …òDChf(àò{pf(ÙòAYàòsxf(êòYßòYîòXãò›ÐòXåòX£èòYÜò\Ãò›ØòYÜòY£àò\Cò\Ëò\ÔfA(àò\K òYàf(Úf(Ðò\[(òYùòYÐòYÉòXçòYóòXÑòYÛòXæòXÓfïÛf(ìf.ÜòYìò\Õf(ÂòÂÃfTÂf(ЇÕòC`f.Âvf.£˜—À¶À…Àt f(Äò\ƒ˜HƒÄ([]A\A]A^A_ÃDòQÂf.ÀŠÚò\C0ò³ˆò‹f(ÔòYÑf(øòYþòX×f.Ú‡çòYÁò‹€òYôf.Ñò\Ævf.£˜—À¶À…À…7f.Ãqÿÿÿò\£˜ò_àf(Äé\ÿÿÿ„òKXf.Èv%òÍwHƒÄ([fWÄ]A\A]A^A_Ãf.„òQÈf.ÉŠò\K0òYÉòXÍòQÁf.À‹ûþÿÿf(ÁèΙþÿéíþÿÿf„H‹H‹5ó!H…Ò„?òT$òL$òD$ÿÒòD$H‰ÅòL$òT$H…í„H‹à·!H9E„fòT$òL$èµ—þÿH…ÀI‰Æ„òL$f(Áèš—þÿH…ÀH‰Â„òT$H‰D$f(Âèz—þÿH…ÀI‰ÇH‹T$„HƒEH‹­¶!H9E„¿H‰T$I‰ìè¡—þÿ1ÉH…ÀH‰ÃH‹T$…ÞHƒmu1E1íH‹EH‰L$H‰ïH‰T$ÿP0M…íH‹T$H‹L$t Iƒm„6M…öt Iƒ.„OH…Òt Hƒ*„hM…ÿt Iƒ/„yM…ät Iƒ,$„‰H…Ét Hƒ)„šH…Ût Hƒ+„ÃH=„mèÿ ÿÿfïÀéJýÿÿfDò\ÑòYÀòYÒòXÐòQÂf.À‹&ýÿÿf(Âèù—þÿéýÿÿ@¾¹1À@HƒÀL‰tÃH‰TËL‰|óI‹D$L‹¨€M…í„>L‹5™µ!I‹‹BƒÀ‰BH‹޵!;E1ÒH‰ÞL‰çAÿÕI‰ÅI‹ƒhM…í„vHƒ+„îIƒ,$„ÓH‹µ!I9E„²L‰ïèZ–þÿf.uz„ÿIƒm„'Hƒm…HüÿÿH‹EòD$H‰ïÿP0òD$é-üÿÿf„H‹MHµH9Q……ýÿÿH‹MHQÿH…ÒH‰U…ýúÿÿòT$H‰ïòL$òD$ÿP0òT$òL$òD$éÎúÿÿ€òYÀòXèòQÅf.À‹®ûÿÿf(Åè–þÿé ûÿÿ@H‹CH‰ßÿP0é.þÿÿf„I‹EH‰L$L‰ïH‰T$ÿP0H‹L$H‹T$é§ýÿÿDI‹FH‰L$L‰÷H‰T$ÿP0H‹L$H‹T$éŽýÿÿDH‹BH‰L$H‰×ÿP0H‹L$éýÿÿ€I‹GH‰L$L‰ÿÿP0H‹L$énýÿÿ€I‹D$H‰L$L‰çÿP0H‹L$é]ýÿÿfDH‹AH‰ÏÿP0éWýÿÿòAEéKþÿÿDI‹D$L‰çÿP0éþÿÿH‹CH‰ßÿP0éþÿÿ1Ûé ýÿÿH‹@@òT$òL$òD$H…À„»HƒÆ$ÿÐòD$H‰ÅòL$òT$é«ûÿÿ1Û1ÉE1äE1ÿ1ÒéLüÿÿ1Û1ÉE1äE1ÿé=üÿÿI‹EòD$L‰ïÿP0òD$é¾ýÿÿ1Û1ÉE1äéüÿÿH‹MH…É„áûÿÿL‹eHƒIƒ$Hƒm„¿H‰L$H‰T$èh“þÿH…ÀH‰ÃH‹T$H‹L$„ÄûÿÿH‰K¾¹¸éšüÿÿ1ÒH‰ÞL‰çèý“þÿH…ÀI‰Å…éüÿÿ1ÉE1ÿ1ÒE1öéƒûÿÿH=bèå’þÿ…À„§üÿÿëÛòD$è“þÿH…ÀòD$„çüÿÿHƒm„¿E1ö1Ò1ÛE1ÿE1ä1ÉéaûÿÿèÝ’þÿH…Àu˜H‹‘±!H5ÂaH‹8èâ‘þÿë€f(Âò\$òl$òd$èÅ“þÿò\$òl$òd$éôøÿÿH‹EH‰L$H‰ïÿP0H‹T$H‹L$éÔþÿÿè{“þÿòT$H‰ÅòL$òD$éñùÿÿòl$èf“þÿòl$f(Èéeùÿÿ1ÉE1äE1ÿ1Û1ÒE1öéúÿÿAVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹а!H9_„ÀèË‘þÿòD$ò\$f.wpz„H‹|$(H9_„蛑þÿf(Èf. Opz„H‹|$0H9_„øòL$èm‘þÿòL$f(Ðf.pz„ûòD$¾L‰çè0öÿÿè‹þÿH…À„RH‹T$8dH3%(…áHƒÄ@[]A\A]A^Ãògòd$é;ÿÿÿH…í„ÅH‰é@H‹±¯!HƒìH¡KQH5F]L ¢KH KA¸H‹81Àèh‘þÿXZ¾¤KH ‚LH=ãfºÓèÙžþÿ1Àé`ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïèJŽþÿHƒýI‰Æt,HƒýtGH…íucH‹5Ïé!L‰ïIƒîèsþÿH…ÀH‰D$ „¯H‹5¦é!L‰ïèVþÿH…ÀH‰D$(„LIƒîH‹5ué!L‰ïè5þÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿèkþÿH…À„ãýÿÿ¾žKé×þÿÿ„òL$èEþÿH…ÀòL$„ßýÿÿ¾ŸKé«þÿÿ@òT$òL$èþÿH…ÀòL$òT$„ßýÿÿ¾ KéwþÿÿH‹é­!HƒìH QIjH5}[L ÙIHÂIA¸H‹81ÀèŸþÿY^¾‘Ké2þÿÿH ±JH=eºÓ¾ºKèþÿ1ÀéŠýÿÿHT$ LsIH5É»!H‰éL‰ïèÎÓþÿ…À‰ìþÿÿ¾•KéÛýÿÿH‹M­!HƒìH5êZjL DIH ¥HH&IA¸H‹81Àèþÿ_¾ŒKAXé•ýÿÿH‹KéMýÿÿèþÿ„AWAVI‰ÖAUATI‰õUSI‰üHƒì(E…ÀH‰L$uH‹GHƒ¸ …eH‹Vè!H‹=7é!H‰ÞèWþÿH…ÀI‰Ç„ÛHƒI‹WH‹5$è!H‹‚H…À„œL‰ÿÿÐH‰ÃH…Û„«Iƒ/„ÙòAD$@èåŒþÿH…ÀI‰Ç„©H‹"¬!H9C„¸¿èþÿE1ÉH…ÀH‰Å…ŸE1í1í¾}A¾fE1äIƒ/„ªH…Ût Hƒ+„ÃH…ít Hƒm„ÓM…Ét Iƒ)„äM…ít Iƒm„ìM…ätIƒ,$tHH ÉHH=jcD‰òE1ÿè›þÿHƒÄ(L‰ø[]A\A]A^A_ÃDI‹GL‰ÿÿP0éÿÿÿf„I‹D$‰4$L‰çÿP0‹4$ë¥DI‹G‰t$L‰ÿL‰ $ÿP0H…Û‹t$L‹ $…8ÿÿÿé=ÿÿÿH‹C‰t$H‰ßL‰ $ÿP0‹t$L‹ $éÿÿÿH‹E‰t$H‰ïL‰ $ÿP0‹t$L‹ $éÿÿÿI‹A‰4$L‰ÏÿP0‹4$éÿÿÿI‹E‰4$L‰ïÿP0‹4$éÿþÿÿH‹=9ç!H‹WH‹‚H…À„ˆ H‰ÞÿÐI‰ÇM…ÿ…ýýÿÿH‹«!H5>FHS$A¾f1íH‹81Àè`Œþÿ¾jE1äE1ÉE1íéjþÿÿDH‹H‹5å!H…Ò„Q ÿÒH‰$H‹$H…À„, H‹@H;ê!„ H‹ $HƒH;î©!„D ¿èîŠþÿH…ÀI‰ÁH‹$¾G…™ A¾eE1äE1í1íE1ÿ„H‹ $H‹H‰D$HƒèH…ÀH‰tM…ÿ…£ýÿÿé¨ýÿÿf.„H‹A‰t$H‰ÏL‰L$ÿP0‹t$L‹L$ëÊfI‰Ûº1ÀfDIƒEHƒÀL‰lÅL‰|ÕI‹CH‹˜€H…Û„)L‹Z©!I‹‹BƒÀ‰BH‹O©!;ÇL‰T$1ÒL‰ßL‰\$H‰îÿÓL‹T$H‰ÁH‰$L‹\$I‹ƒhH…É„âHƒm„ÇIƒ+„ÛH‹vä!H‹=Wå!H‰Þèw‰þÿH…ÀH‰Å„ëHƒH‹UH‹5Dä!H‹‚H…À„<H‰ïÿÐI‰ÇM…ÿ„KHƒm„òAD$Hè‰þÿH…ÀH‰Å„HH‹A¨!I9G„‡¿è=‰þÿH…ÀI‰Å…¾ŸA¾fE1äE1É1ÛéYþÿÿf„H‹EL‰\$H‰ïÿP0L‹\$Iƒ+…%ÿÿÿI‹CL‰ßÿP0éÿÿÿH‹EH‰ïÿP0éaÿÿÿH‹B@H…À„ÿ HƒÆ$éNûÿÿf.„E1í1í¾lE1ÉA¾fE1äé™ûÿÿDE1äA¾fE1ɾo1íE1íéˆûÿÿDL‹KM…É„;ûÿÿL‹[IƒIƒHƒ+„½¿L‰\$L‰ $è:ˆþÿH…ÀH‰ÅL‹ $L‹\$„  L‰Mº¸é²ýÿÿf1ÒL‰ßH‰îL‰\$èΈþÿH…ÀH‰$L‹\$… þÿÿ@L‰ÛE1äE1ÉE1íHƒ+A¾f¾ˆ…äúÿÿé¢ûÿÿfH‹=Iã!H‹WH‹‚H…À„6H‰ÞÿÐH‰ÅH…í…íýÿÿH‹-§!HS$H5JBA¾fE1äE1í1ÛE1ÿH‹81Àègˆþÿ¾ŒE1Ééšüÿÿf.„H=AVL‰T$L‰$è‡þÿ…ÀL‹$L‹T$„ýÿÿé=ÿÿÿDM‰ûº1ÀfDIƒHƒÀM‰tÅI‰lÕI‹CH‹˜€H…Û„ŠL‹ ¦!I‹‹BƒÀ‰BH‹¦!;L‰T$1ÒL‰ßL‰\$L‰îÿÓL‹T$H‰ÃL‹\$I‹ƒhH…Û„—Iƒm„¼Iƒ+„ÒL‹5+á!H‹= â!L‰öè,†þÿH…ÀI‰Å„HHƒI‹UH‹5ùà!H‹‚H…À„L‰ïÿÐH‰ÅH…í„ÐIƒm„…òAD$Pè¹…þÿH…ÀI‰Å„íH‹ö¤!H9E„<¿èò…þÿH…ÀI‰Ä…†¾ÁA¾fE1ÉE1ÿéûÿÿI‹EL‰\$L‰ïÿP0L‹\$é+ÿÿÿ€I‹CL‰ßÿP0éÿÿÿI‹EL‰ïÿP0élÿÿÿH‹CL‰\$H‰ßL‰ $ÿP0L‹ $L‹\$é"ýÿÿH‹B@H…À„vHs$ÿÐH‰Åé·ýÿÿ@H‹B@H…À„óHƒÆ$é®ûÿÿf.„¾ŽA¾fE1äE1íE1É1ÛéUúÿÿD¾‘ëÞf„L‰$è…þÿH…ÀL‹$…ýÿÿH‹ã!H5ôSL‰$H‹8è„þÿL‹$éßüÿÿ€M‹OM…É„lûÿÿM‹_IƒIƒIƒ/„m¿L‰\$L‰L$艄þÿH…ÀI‰ÅL‹L$L‹\$„§M‰Mº¸éPýÿÿ1ÒL‰ßL‰îL‰\$è…þÿH…ÀH‰ÃL‹\$…¦ýÿÿDM‰ß¾ªA¾fE1äE1É1íé]ùÿÿDH‹=¡ß!H‹WH‹‚H…À„½L‰öÿÐI‰ÅM…í…ýÿÿH‹…£!IV$H5¢>A¾fE1ä1íE1ÿH‹81Àè„þÿ¾®E1ÉéõøÿÿDH=¡RL‰T$L‰\$èzƒþÿ…ÀL‹\$L‹T$„Àüÿÿ„M‰ß¾ªA¾fE1äE1É1í1Û飸ÿÿI‰îº1ÀfDH‹L$HƒÀHƒI‰LÄM‰lÔI‹FL‹¨€M…í„ÅL‹F¢!I‹‹BƒÀ‰BH‹;¢!;L‰T$1ÒL‰æL‰÷AÿÕL‹T$I‰ÇI‹ƒhM…ÿ„+Iƒ,$tTIƒ.t^¿èÄ‚þÿH…ÀH‰Å„˜H‹$L‰}(¿H‰] H‰Eèî€þÿH…ÀI‰Ç„ÒH‹@H‰(é÷õÿÿfDI‹D$L‰çÿP0ëŸI‹FL‰÷ÿP0ë–@¾°A¾fE1äE1ÉE1ÿé‡÷ÿÿ€H‹B@H…À„ HƒÆ$ééûÿÿf.„¾³A¾fE1äE1ÉE1ÿéG÷ÿÿ€L‰\$è‚þÿH…ÀL‹\$…°ýÿÿH‹Á !H5òPL‰\$H‹8è þÿL‹\$éCþÿÿL‹MM…É„·ûÿÿL‹uIƒIƒHƒm„ö¿L‰L$èþÿH…ÀI‰ÄL‹L$„áM‰L$º¸éþÿÿ„1ÒL‰æL‰÷è#‚þÿH…ÀI‰Ç…lþÿÿ€L‰õ¾ÌA¾fE1íE1Éégöÿÿ€¾ÐA¾fE1äE1íE1ÉéGöÿÿ€H=ñOL‰T$èÏ€þÿ…ÀL‹T$„ßýÿÿfL‰õ¾ÌA¾fE1íE1ÉE1ÿéöÿÿ@¾ÛA¾féUõÿÿèË€þÿH…À…bÿÿÿH‹{Ÿ!H5¬OH‹8èÌþÿëªf.„H‹ $HH‹IH9Q…ZõÿÿH‹ $H‹9HWÿH‰|$H…ÒH‰…žòÿÿH‰ÏÿP0é“òÿÿ¹º1À@HƒÀIƒEM‰lÁH‹D$IƒM‰tÑHƒI‰DÉH‹CL‹ €M…ä„£L‹Ÿ!I‹‹BƒÀ‰BH‹ Ÿ!;¼L‰T$1ÒL‰ÎL‰L$H‰ßAÿÔL‹T$I‰ÇL‹L$I‹ƒhM…ÿ„Iƒ)t]Hƒ+tGL;=Øž!I‹Gt H;KŸ!…—H‹ $H‹H‰D$HƒèH…ÀH‰…ÒòÿÿH‹<$H‹GÿP0éÂòÿÿH‹CH‰ßÿP0ë­@I‹AL‰ÏÿP0ë—@I‹GL‰\$L‰ÿL‰L$ÿP0L‹L$L‹\$épúÿÿH‹B@H…À„öHs$ÿÐI‰Çéeóÿÿ¾6A¾e1íé…óÿÿH‹@@H…À„ÙHƒÆ$ÿÐH‰$é™óÿÿL‰ÿèìþÿH‰ÃéPñÿÿH‹iH…턯óÿÿH‹YHƒEHƒH‹H‰D$HƒèH…ÀH‰„i¿èx~þÿH…ÀI‰Á„¸I‰i¹º¸é$þÿÿ1ÒL‰ÎH‰ßL‰L$èþÿH…ÀI‰ÇL‹L$…Žþÿÿ¾UA¾eE1äE1í1íéYóÿÿH= ML‰T$L‰L$èã}þÿ…ÀL‹L$L‹T$„þÿÿ¾Ué óÿÿH‹HH‹óœ!H5;8H/8A¾eE1äE1í1í1ÛH‹81Àè³~þÿ¾YE1ÉéæòÿÿH‹EL‰L$H‰ïÿP0L‹L$éñûÿÿL‰L$è£}þÿH…ÀL‹L$…DÿÿÿH‹Nœ!H5LL‰L$H‹8èš|þÿL‹L$é`ÿÿÿH‰ïèx~þÿI‰Çé¼óÿÿH‹B@H…Àt[Iv$ÿÐI‰Åé4ùÿÿL‰ïèQ~þÿH‰ÅéàöÿÿH‹AH‰ÏÿP0éˆþÿÿH‰Þè2~þÿI‰Çémñÿÿè%~þÿH‰$éÁñÿÿH‰Þè~þÿH‰Åé?õÿÿL‰öè~þÿI‰Åé×øÿÿM‰ß¾ŸA¾fE1ä1Ûéôñÿÿ¾GA¾eE1äE1íE1ÿéÛñÿÿL‰õ¾ÁA¾fE1ÿéÅñÿÿL‰Ûénïÿÿf.„AVAUI‰ýATUSH‰óHƒì dH‹%(H‰D$1ÀH…ÒHÇ$HÇD$HÇD$…ËH‹NHƒùuYH‹vH‹S H‹K(A¸L‰ïè'îÿÿH…À„nH‹|$dH3<%(…@HƒÄ []A\A]A^ÃDH…턬H‰é@H‹Ùš!HƒìHn6QH5nHL Ê6H +6A¸H‹81Àè|þÿXZ¾6H ª7H=KRºeèŠþÿ1Àélÿÿÿf.„H‹nI‰ÔHƒýt(ŽuÿÿÿHƒýtHƒý…nÿÿÿH‹F(H‰D$H‹C H‰D$H‹CH‰$L‰çè‹yþÿHƒýI‰Æt+HƒýtFH…íu^H‹5˜Ô!L‰çIƒîè´zþÿH…ÀH‰$„4H‹5PÔ!L‰çè˜zþÿH…ÀH‰D$„ÑIƒîH‹5Ô!L‰çèwzþÿH…ÀH‰D$tAIƒîM…ö}H‹T$H‹4$H‹L$é|þÿÿH ±6H=RQºe¾Lè‰þÿ1ÀénþÿÿH‹}™!HƒìH å4jH5GL m5Hû4A¸H‹81Àè3{þÿY^¾#éžþÿÿLØ4H5©¢!H‰âH‰éL‰çè‹¿þÿ…À‰_ÿÿÿ¾'épþÿÿH‹ ™!HƒìH5§FjL 5H b4Hˆ4A¸H‹81ÀèÀzþÿ_¾AXé*þÿÿH‹KéâýÿÿèÕxþÿDAWAVAUATUSH‰ûHƒìX…öòD$òL$ òT$(uH‹GHƒ¸ …÷òD$òd$ ò\CòL$(ò\c ò[@òSHò\K(òYØòYÔòYÀòYäòXÓò[PòYÙòXàòYÉòXÓò XòXÌfTÓf(ÂòYÂò\Èòƒˆf.‡åò\ÐòC8f.ÁòT$†LL‹£ÐL;%˜!„Iƒ$HÇD$01ÿH‹L$0I;L$È I‹D$H‹,ÈHƒEH…ÿt Hƒ/„kH‹UH‹5Ó!H‹‚H…À„@H‰ïÿÐI‰ÅM…í„OòD$èäwþÿH…ÀH‰D$„VòD$ èËwþÿH…ÀI‰Â„WòD$(H‰D$8è¯wþÿH…ÀI‰ÆL‹T$8„NH‹ç–!I9E…ÍI‹uH…ö„ÀM‹MHƒIƒIƒm„ù¿L‰L$HH‰t$@L‰T$8è°wþÿH…ÀH‰ÃL‹T$8H‹t$@L‹L$H„µH‰s¹¾¸H‹T$HƒÀH‰TÃL‰TËL‰tóI‹AL‹¨€M…í„ÆL‹5w–!I‹‹BƒÀ‰BH‹l–!; 1ÒL‰ÏL‰L$H‰ÞAÿÕI‰ÇI‹L‹L$ƒhM…ÿ„Hƒ+„bIƒ)„òD$èvþÿH…ÀH‰Ã„™ºH‰ÆL‰ÿèáuþÿH…ÀI‰Æ„ÅHƒ+„ƒL;5–!”ÀL;5’•!”ÁÁu L;5ä•!…v¶ØIƒ.„ …Û„I‹M‰ýHƒÀHƒèH…ÀI‰„#H‹`•!I9E„¾L‰ïèžvþÿòD$òt$f.5JUz„‚Iƒm„÷HƒD$0H‰ïéqýÿÿf„H‹GÿP0é‰ýÿÿ@òQÁf.ÀŠ ò\C0òD$éýÿÿfI‹AL‰ÏÿP0éÙþÿÿI‹EL‰L$HL‰ïH‰t$@ÿP0L‹T$8H‹t$@L‹L$Héßýÿÿ„H‹CL‰L$H‰ßÿP0L‹L$Iƒ)…Šþÿÿë òQÁf.ÀŠ, ò\C0ò|$f(ÏòYÏòYÀòXÁòQÈf.ÉŠõòL$érüÿÿfDH‹CH‰ßÿP0énþÿÿf„L‰÷èxuþÿ…À‰Ã‰{þÿÿHÇD$1ÛE1íE1Ò1öIƒ,$„}M…ÿt Iƒ/„–H…öt Hƒ.„¿M…öt Iƒ.„ÐM…Òt Iƒ*„áM…ít Iƒm„áH…ÛtHƒ+tfH‹T$H…ÒtH‹H‰D$HƒèH…ÀH‰tXH=Kè|þþÿfïíòl$H…ítHƒmu H‹EH‰ïÿP0òD$HƒÄX[]A\A]A^A_ÀH‹CH‰ßÿP0ëŽ@H‹BH‰×ÿP0ëœ@H‹FL‰T$H‰÷ÿP0L‹T$é(ÿÿÿ€I‹FL‰T$L‰÷ÿP0L‹T$éÿÿÿ€I‹BL‰×ÿP0éÿÿÿI‹EL‰ïÿP0éÿÿÿèËsþÿH…À„pýÿÿI‹$1ÛHÇD$HƒèH…ÀI‰$…ÑþÿÿE1Ò1öE1öE1ÿ€I‹D$H‰t$L‰çL‰T$ÿP0H‹t$L‹T$é_þÿÿ@I‹GH‰t$L‰ÿL‰T$ÿP0H‹t$L‹T$éGþÿÿD¿L‰T$8èsþÿH…ÀH‰ÃL‹T$8t^M‰é¾¹1ÀénûÿÿL‰L$èsþÿH…ÀL‹L$…pH‹±‘!H5âAL‰L$H‹8èýqþÿL‹L$M‰ÍHÇD$E1ÒE1ö1öE1ÿé¤ýÿÿ@òA}ò|$é?üÿÿ€I‹FL‰÷ÿP0…Û…íûÿÿòD$èrþÿH…ÀI‰Å„÷I‹HƒèH…ÀI‰…ÝûÿÿI‹GL‰ÿÿP0éÎûÿÿDI‹EL‰ïÿP0éúûÿÿH‹B@H…À„HƒÆ$éªùÿÿf.„E1öE1ÿHÇD$1ÛE1Ò1öéíüÿÿD1ÛE1ÒE1ö1öE1ÿéÖüÿÿfD1ÛE1ö1öE1ÿéÁüÿÿf„E1ÿ1Û1öé¬üÿÿ@H‹±!H5*BH‹8èÊpþÿHÇD$1íéäüÿÿf.„H‹H‹5úË!H…Ò„hÿÒI‰ÄM…ätÅH‹ø!I9D$„òD$èÒpþÿH…ÀH‰Æ„PòD$ H‰D$è¶pþÿH…ÀI‰ÆH‹t$„MòD$(èšpþÿH…ÀI‰ÂH‹t$„`Iƒ$H‹Í!I9D$„a¿H‰t$L‰T$è¾pþÿH…ÀH‰D$M‰åL‹T$H‹t$…¹1ÛE1ÿ1íéŸûÿÿ€1ÒL‰ÏH‰ÞL‰L$èNqþÿH…ÀI‰ÇL‹L$…aùÿÿDM‰ÍE1öHÇD$E1Ò1öéWûÿÿ€HÇD$E1íE1ÒE1ö1öé7ûÿÿ€H=?L‰L$è÷oþÿ…ÀL‹L$„ÖøÿÿéMýÿÿDE1íHÇD$E1Ò1öéòúÿÿA¸¿1ÀDH‹L$HƒÀH‰tÁL‰tùN‰TÁI‹EH‹˜€H…Û„ÐL‹5ÍŽ!I‹‹BƒÀ‰BH‹ÂŽ!;†1ÒH‹t$L‰ïÿÓI‰ÇI‹ƒhM…ÿ„äH‹L$H‹H‰D$HƒèH…ÀH‰„>Iƒm„H‹<Ž!I9G„òL‰ÿèzoþÿòD$òt$f.5&Nz„\Iƒ/„lIƒ,$…­úÿÿI‹D$L‰çÿP0éúÿÿf„M‰ÍE1ÿéÝùÿÿDI‹$H‰ýHƒèH…ÀI‰$…VúÿÿI‹D$L‰çÿP0éFúÿÿ„I‹L$H”H9Q…MýÿÿI‹ $HQÿH…ÒI‰$…õÿÿL‰çÿP0éõÿÿf.„E1öHÇD$1ÛE1Ò1öéPùÿÿ„òAwòt$é ÿÿÿ€I‹EL‰ïÿP0éÖþÿÿf„H‹AH‰ÏÿP0é³þÿÿH‰ïè)oþÿI‰Åé™õÿÿH‹@@H…À„ÐHƒÆ$ÿÐI‰Äé‚üÿÿHÇD$1ÛE1íE1ÒE1öE1ÿ1íéÀøÿÿE1íE1ÿHÇD$1ÛE1Ò1í饸ÿÿDI‹GL‰ÿÿP0é…þÿÿHÇD$1ÛE1íE1ÿ1íéyøÿÿI‹\$H…Û„‘üÿÿM‹l$HƒIƒEIƒ,$„¿H‰t$L‰T$è6mþÿH…ÀH‰D$L‹T$H‹t$túÿÿI‹D$L‰çÿP0é.úÿÿ„I‹L$HôH9Q…AýÿÿI‹ $HQÿH…ÒI‰$…ÞôÿÿL‰çÿP0éÓôÿÿf.„E1öHÇD$1ÛE1Ò1öé0ùÿÿ„òAvò4$éÿÿÿI‹EL‰ïÿP0éåþÿÿH‹AH‰ÏÿP0éÊþÿÿH‰ïè9KþÿI‰ÅéÃõÿÿf(ÃòL$0òT$ò$è'KþÿòL$0f(èòT$ò$éÃôÿÿfïöòt$(é$üÿÿH‹@@H…À„HƒÆ$ÿÐI‰Äé?üÿÿfïöHÇD$1ÛE1íE1ÒE1öE1ÿ1íòt$(écøÿÿfïíE1íE1ÿHÇD$1ÛE1Ò1íòl$(é>øÿÿfDI‹FL‰÷ÿP0éBþÿÿfïöHÇD$1ÛE1íE1ÿ1íòt$(éøÿÿI‹\$H…Û„0üÿÿM‹l$HƒIƒEIƒ,$„%¿H‰t$L‰$èåHþÿH…ÀH‰D$L‹$H‹t$tLH‹D$A¸¿H‰X¸éÜüÿÿH=¥L‰$è„Hþÿ…ÀL‹$„ýÿÿ„1ÛE1ÒE1ö1öfïöE1ÿ1íòt$(éZ÷ÿÿ1ÒH‰ÎL‰ïè5IþÿH…ÀI‰Æ…öüÿÿfïíE1ÿ1ÛE1Ò1ö1íòl$(é&÷ÿÿèYHþÿH…À„'ýÿÿfïíM‰÷HÇD$1ÛE1íE1ÒE1ö1ö1íòl$(éîöÿÿè!HþÿH…Àu£H‹Õf!H5H‹8è&GþÿéQÿÿÿf(ÃèIþÿéöÿÿI‹D$H‰t$L‰çL‰$ÿP0L‹$H‹t$é¹þÿÿèÜHþÿI‰Äé@úÿÿ@AVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹*f!H9_„ÀèkGþÿòD$ò\$f.&z„H‹|$(H9_„è;Gþÿf(Èf. ï%z„H‹|$0H9_„øòL$è GþÿòL$f(Ðf.»%z„ûòD$¾L‰çèÀðÿÿè+FþÿH…À„RH‹T$8dH3%(…áHƒÄ@[]A\A]A^Ãògòd$é;ÿÿÿH…í„ÅH‰é@H‹Qe!HƒìHAQH5æL BH £A¸H‹81ÀèGþÿXZ¾à/H "H=ƒº‰èyTþÿ1Àé`ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïèêCþÿHƒýI‰Æt,HƒýtGH…íucH‹5oŸ!L‰ïIƒîèEþÿH…ÀH‰D$ „¯H‹5FŸ!L‰ïèöDþÿH…ÀH‰D$(„LIƒîH‹5Ÿ!L‰ïèÕDþÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿè EþÿH…À„ãýÿÿ¾Ú/é×þÿÿ„òL$èåDþÿH…ÀòL$„ßýÿÿ¾Û/é«þÿÿ@òT$òL$è·DþÿH…ÀòL$òT$„ßýÿÿ¾Ü/éwþÿÿH‹‰c!HƒìH ñþjH5L yÿHbÿA¸H‹81Àè?EþÿY^¾Í/é2þÿÿH QH=²º‰¾ö/è£Rþÿ1ÀéŠýÿÿHT$ LÿH5)o!H‰éL‰ïèn‰þÿ…À‰ìþÿÿ¾Ñ/éÛýÿÿH‹íb!HƒìH5ŠjL äþH EþHÆþA¸H‹81Àè£Dþÿ_¾È/AXé•ýÿÿH‹KéMýÿÿè¸Bþÿ„AWAVAUATUSH‰ýHƒìH…öò$òL$òT$uH‹GHƒ¸ …ò$òD$ò\UòL$ò\E ò\M(òYÒòYÀòYÉòXÐòXÊòQÁf.ÀŠR ò\E0èœBþÿH…ÀH‰Ã„0H‹éa!H9C„ÏH‰ßè'Cþÿf.ß!z„wL‹ehL;%b!„žIƒ$HÇD$E1íH‹L$I;L$¥ I‹D$H‹,ÈHƒEM…ít Iƒm„wH‹UH‹5 !H‹‚H…À„ôH‰ïÿÐI‰ÀM…À„ûò$L‰D$ èÜAþÿH…ÀI‰ÅL‹D$ „óòD$èÀAþÿH…ÀI‰ÃL‹D$ „?òD$H‰D$(èŸAþÿH…ÀH‰ÂL‹D$ L‹\$(„ÁH‹Ò`!I9@…èI‹pH…ö„ÛM‹PHƒIƒIƒ(„5¿L‰T$8H‰t$0H‰T$(L‰\$ è—AþÿH…ÀI‰ÇL‹\$ H‹T$(H‹t$0L‹T$8„7I‰w¿¾¸HƒÀM‰lÇM‰\÷I‰TÿI‹BL‹¨€M…í„EL‹^`!I‹‹BƒÀ‰BH‹S`!;sL‰\$(1ÒL‰×L‰T$ L‰þAÿÕL‹\$(I‰ÆL‹T$ I‹ƒhM…ö„1Iƒ/„?Iƒ*„%HƒºH‰ÞL‰÷èÑ?þÿH…ÀH‰Ât:H;`!”ÀH;_!”ÁÁu9H;â_!t0H‰×H‰T$ èë@þÿ…ÀA‰ÅH‹T$ yI‰ØE1íE1ÿE1Û1öé¬@D¶èHƒ*t~E…íuiH‹I‰ßHƒÀHƒèH…ÀH‰„?Iƒ.„%Iƒ?„ Hƒ+„ñHƒD$I‰íL‰ûékýÿÿòCé/ýÿÿfDI‹EL‰ïÿP0ézýÿÿIƒM‰÷H‹ë•@H‹BH‰×ÿP0ésÿÿÿE1ÿ1Ò1öE1öfDIƒ,$„ÕM…öt Iƒ.„H…öt Hƒ.„/H…Òt Hƒ*„PM…Ût Iƒ+„iM…Àt Iƒ(„zM…ÿt Iƒ/„{M…ít Iƒm„{H=èOÉþÿH…ÛfïÀtHƒ+t0H…ítHƒmuH‹Eò$H‰ïÿP0ò$HƒÄH[]A\A]A^A_ÃH‹Cò$H‰ßÿP0ò$ëºf.„I‹D$H‰t$L‰çH‰T$L‰\$L‰$ÿP0H‹t$H‹T$L‹\$L‹$éõþÿÿf.„I‹FH‰t$L‰÷H‰T$L‰\$L‰$ÿP0H‹t$H‹T$L‹\$L‹$éÅþÿÿH‹FH‰T$H‰÷L‰\$L‰$ÿP0H‹T$L‹\$L‹$é¦þÿÿDH‹BL‰\$H‰×L‰$ÿP0L‹\$L‹$éþÿÿ€I‹CL‰$L‰ßÿP0L‹$é€þÿÿf„I‹@L‰ÇÿP0éwþÿÿI‹GL‰ÿÿP0évþÿÿI‹EL‰ïÿP0évþÿÿ1ÛE1í1íéYþÿÿ@I‹BL‰×ÿP0éÌüÿÿI‹GL‰T$ L‰ÿÿP0L‹T$ é¨üÿÿ€I‹@L‰T$8L‰ÇH‰t$0H‰T$(L‰\$ ÿP0L‹\$ H‹T$(H‹t$0L‹T$8é”ûÿÿf„H‹H‹5Ò—!H…Ò„ƒÿÒI‰ÄM…ä„[ÿÿÿH‹Ä\!I9D$„‰ò$èŸ<þÿH…ÀH‰Æ„hòD$H‰$è„<þÿH…ÀH‰ÂH‹4$„còD$H‰t$H‰$è`<þÿH…ÀI‰ÃH‹$H‹t$„„Iƒ$H‹[!I9D$„‚¿H‰t$H‰T$L‰$è|<þÿH…ÀI‰ÅM‰àL‹$H‹T$H‹t$…9E1ÿE1ö1í1Ûéüÿÿèk<þÿH…À„{ùÿÿ1íE1ÿE1íéËüÿÿDH‹CH‰ßÿP0éüÿÿI‹GL‰ÿÿP0éæûÿÿI‹FL‰÷ÿP0éÌûÿÿH‹CH‰ßÿP0é²ûÿÿ¿H‰T$0L‰\$(L‰D$ è×;þÿH…ÀI‰ÇL‹D$ L‹\$(H‹T$0tKM‰Â¿¾1ÀéHúÿÿ@H=™ L‰\$(L‰T$ èr;þÿ…ÀL‹T$ L‹\$(„eúÿÿM‰ÐE1íE1Û1Ò1öE1öé«ûÿÿH‹B@H…À„$HƒÆ$éöøÿÿfE1öE1íE1ÿE1Û1Ò1öé{ûÿÿE1ÿE1Û1Ò1öE1öéfûÿÿ¿¹1Àf.„HƒÀI‰tÅI‰TÍM‰\ýI‹@H‹˜€H…Û„L‹ Z!I‹‹BƒÀ‰BH‹ÿY!;+L‰\$1ÒL‰ÇL‰$L‰îÿÓL‹\$H‰ÃL‹$I‹ƒhH…Û„ÁIƒm„}Iƒ(„cH‹|Y!H9C„BH‰ßèº:þÿf.rz„5Hƒ+„Iƒ,$…5ûÿÿI‹D$ò$L‰çÿP0ò$éûÿÿE1ÿ1öE1öé[úÿÿH‹)Y!H5¢ H‹8èB9þÿé?üÿÿD1ÒL‰×L‰þL‰T$ è¶:þÿH…ÀI‰ÆL‹T$ …ìøÿÿDM‰ÐE1íE1Û1Ò1öéþùÿÿfDL‰$èÏ9þÿH…ÀL‹$uÖH‹X!H5°L‰$H‹8èÌ8þÿL‹$éþÿÿI‹L$HDH9Q…aüÿÿI‹ $HQÿH…ÒI‰$… öÿÿL‰çÿP0éöÿÿf.„M‰ÐE1öéuùÿÿDòCé¼þÿÿfDI‹@L‰ÇÿP0éŽþÿÿI‹EL‰$L‰ïÿP0L‹$élþÿÿf„Iƒ,$„þH‹ÞW!H9C„ãH‰ßè9þÿf.Ôz„PL‰íé~ùÿÿf(Áèë9þÿé õÿÿH‹@@H…À„MHƒÆ$ÿÐI‰ÄégûÿÿE1íE1ÿE1ÀE1Û1ÒE1ö1í1Ûé±øÿÿE1íE1ÿE1ÀE1ÛE1ö1í1Û陸ÿÿf„H‹Cò$H‰ßÿP0ò$éçýÿÿH‰ïè_9þÿI‰ÀéÓõÿÿE1íE1ÿE1ÀE1ö1í1ÛéRøÿÿM‹|$M…ÿ„pûÿÿM‹D$IƒIƒIƒ,$„J¿H‰t$H‰T$L‰\$L‰$èÏ7þÿH…ÀI‰ÅL‹$L‹\$H‹T$H‹t$tNM‰}¿¹¸éŒüÿÿH=L‰\$L‰$èg7þÿ…ÀL‹$L‹\$„¯üÿÿfDE1ÿE1Û1Ò1öE1ö1í1Ûéš÷ÿÿ1ÒL‰ÇL‰îL‰$è8þÿH…ÀH‰ÃL‹$…¡üÿÿE1öE1ÿE1Û1Ò1ö1íée÷ÿÿò$è;7þÿH…Àò$„³üÿÿI‰ÞE1íE1ÿE1ÀE1Û1Ò1ö1í1Ûé1÷ÿÿòCéþÿÿI‹D$L‰çÿP0éòýÿÿL‰$èî6þÿH…ÀL‹$uŒH‹žU!H5ÏL‰$H‹8èë5þÿL‹$é2ÿÿÿI‹D$H‰t$L‰çH‰T$L‰\$L‰$ÿP0L‹$L‹\$H‹T$H‹t$é€þÿÿò$è‚6þÿH…Àò$„˜ýÿÿL‰íé úÿÿèw7þÿI‰ÄéùÿÿDf.„AVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹ºT!H9_„Àèû5þÿòD$ò\$f.§z„H‹|$(H9_„èË5þÿf(Èf. z„H‹|$0H9_„øòL$è5þÿòL$f(Ðf.Kz„ûòD$¾L‰çè ñÿÿè»4þÿH…À„RH‹T$8dH3%(…áHƒÄ@[]A\A]A^Ãògòd$é;ÿÿÿH…í„ÅH‰é@H‹áS!HƒìHÑïQH5vL ÒïH 3ïA¸H‹81Àè˜5þÿXZ¾+H ²ðH=S º†è Cþÿ1Àé`ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïèz2þÿHƒýI‰Æt,HƒýtGH…íucH‹5§!L‰ïIƒîè£3þÿH…ÀH‰D$ „¯H‹5^!L‰ïè†3þÿH…ÀH‰D$(„LIƒîH‹5!L‰ïèe3þÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿè›3þÿH…À„ãýÿÿ¾%é×þÿÿ„òL$èu3þÿH…ÀòL$„ßýÿÿ¾&é«þÿÿ@òT$òL$èG3þÿH…ÀòL$òT$„ßýÿÿ¾'éwþÿÿH‹R!HƒìH íjH5­ÿL îHòíA¸H‹81ÀèÏ3þÿY^¾é2þÿÿH áîH=‚ º†¾Aè3Aþÿ1ÀéŠýÿÿHT$ L£íH5y[!H‰éL‰ïèþwþÿ…À‰ìþÿÿ¾éÛýÿÿH‹}Q!HƒìH5ÿjL tíH ÕìHVíA¸H‹81Àè33þÿ_¾AXé•ýÿÿH‹KéMýÿÿèH1þÿ„AWAVAUATUSH‰ûHƒìX…öòD$òL$òT$ uH‹GHƒ¸ …§òL$ò\$ò\KòT$ ò\[ òchòCpò\S(fïÿòYáò|$0òYÃòYÉòYÛòXàòCxòYÂòXËòYÒòXàòXÊf(ìf.üòYìò\Íf(ÁòÂÇfTÁf(ȇîòC`f.Ávf.£˜—À¶À…À„õò\£˜ò$$L‹£øL;%ZP!„¬Iƒ$HÇD$(1ÿH‹L$(I;L$\ I‹D$H‹,ÈHƒEH…ÿt Hƒ/„_H‹UH‹5d‹!H‹‚H…À„ôH‰ïÿÐI‰ÅM…í„ÃòD$è80þÿH…ÀH‰D$„êòD$è0þÿH…ÀI‰Â„ëòD$ H‰D$8è0þÿH…ÀI‰ÆL‹T$8„âH‹;O!I9E…qI‹uH…ö„dM‹MHƒIƒIƒm„ ¿L‰L$HH‰t$@L‰T$8è0þÿH…ÀH‰ÃL‹T$8H‹t$@L‹L$H„I H‰s¹¾¸H‹T$HƒÀH‰TÃL‰TËL‰tóI‹AL‹¨€M…í„bL‹5ËN!I‹‹BƒÀ‰BH‹ÀN!;ˆ1ÒL‰ÏL‰L$H‰ÞAÿÕI‰ÇI‹L‹L$ƒhM…ÿ„ÀHƒ+„&Iƒ)„ ò$èâ.þÿH…ÀH‰Ã„^ºH‰ÆL‰ÿè6.þÿH…ÀI‰Æ„bHƒ+„0L;5iN!”ÀL;5çM!”ÁÁu L;59N!…c¶ØIƒ.„Þ…Û„–I‹M‰ýHƒÀHƒèH…ÀI‰„¥H‹µM!I9E„[L‰ïèó.þÿò$ò4$f.5¡ z„YIƒm„ŽHƒD$(H‰ïétýÿÿH‹GÿP0é•ýÿÿ@òKXf.ȆÁò9 fWàò$$éýÿÿòQÁf.ÀŠ ò\C0ò“ˆò›f(ÌòYËf(ðòYòòXÎòt$0f.ñ‡‘òYÃòYÔò\Âò$òƒ€f.Èvf.£˜—À¶À…À„œüÿÿò\Èò4$f(ÆòYÉòYÆòXÈòQÁf.ÀŠc ò$éküÿÿL‰÷èà-þÿ…À‰Ã‰ŽþÿÿHÇD$1ÛE1íE1Ò1öIƒ,$„eM…ÿt Iƒ/„~H…öt Hƒ.„—M…öt Iƒ.„¨M…Òt Iƒ*„¹M…ít Iƒm„¹H…Ût Hƒ+„ªH‹T$H…ÒtH‹H‰$HƒèH…ÀH‰„™H=âèݶþÿòt$0ò4$H…ítHƒmu H‹EH‰ïÿP0ò$HƒÄX[]A\A]A^A_ÄòQÈf.ÉŠ8 ò\K0òYÉòXÍf(ÁòQÉf.ÉŠò $é9ûÿÿf„H‹CH‰ßÿP0éGÿÿÿH‹BH‰×ÿP0éXÿÿÿèK,þÿH…À„™ýÿÿI‹$1ÛHÇD$HƒèH…ÀI‰$…éþÿÿE1ÒE1öE1ÿ1ö€I‹D$H‰t$L‰çL‰$ÿP0H‹t$L‹$éyþÿÿfDI‹GH‰t$L‰ÿL‰$ÿP0H‹t$L‹$éaþÿÿ€H‹FL‰$H‰÷ÿP0L‹$éRþÿÿf„I‹FL‰$L‰÷ÿP0L‹$éAþÿÿf„I‹BL‰×ÿP0é8þÿÿI‹EL‰ïÿP0é8þÿÿI‹AL‰ÏÿP0éåûÿÿH‹CL‰L$H‰ßÿP0L‹L$éÁûÿÿ€I‹EL‰L$HL‰ïH‰t$@ÿP0L‹T$8H‹t$@L‹L$HéËúÿÿ„H‹CH‰ßÿP0éÁûÿÿ¿L‰T$8èÁ*þÿH…ÀH‰ÃL‹T$8tZM‰é¾¹1ÀéÊúÿÿL‰ $è·*þÿH…ÀL‹ $…jH‹cI!H5”ùL‰ $H‹8è°)þÿL‹ $M‰ÍHÇD$E1ÒE1ö1öE1ÿéðüÿÿòAuò4$é¢ûÿÿò$èÖ)þÿH…ÀI‰Å„*I‹HƒèH…ÀI‰…[ûÿÿI‹GL‰ÿÿP0éLûÿÿ„I‹FL‰÷ÿP0éûÿÿI‹EL‰ïÿP0écûÿÿE1öE1ÿHÇD$1ÛE1Ò1öéeüÿÿDH‹B@H…À„HƒÆ$éöøÿÿf.„1ÛE1ÒE1ö1öE1ÿé.üÿÿfD1ÛE1ö1öE1ÿéüÿÿf„E1ÿ1Û1öéüÿÿ@H‹qH!H5êùH‹8èŠ(þÿHÇD$1íé@üÿÿf.„H‹H‹5ºƒ!H…Ò„‡ÿÒI‰ÄM…ä„jH‹´H!I9D$„ÁòD$èŽ(þÿH…ÀH‰Æ„kòD$H‰$ès(þÿH…ÀI‰ÆH‹4$„tòD$ èX(þÿH…ÀI‰ÂH‹4$„—Iƒ$H‹ŒG!I9D$„¢¿H‰t$L‰$è~(þÿH…ÀH‰D$M‰åL‹$H‹t$…Âfïö1ÛE1ÿ1íòt$0éîúÿÿfD1ÒL‰ÏH‰ÞL‰L$è)þÿH…ÀI‰ÇL‹L$…ÅøÿÿDM‰ÍE1öHÇD$E1Ò1öé§úÿÿ€H=ñöL‰L$èÏ'þÿ…ÀL‹L$„ZøÿÿéqýÿÿDHÇD$E1íE1ÒE1ö1öé_úÿÿ€E1íHÇD$E1Ò1öéBúÿÿA¸¿1ÀDH‹L$HƒÀH‰tÁL‰tùN‰TÁI‹EH‹˜€H…Û„äL‹5…F!I‹‹BƒÀ‰BH‹zF!;ú1ÒH‹t$L‰ïÿÓI‰ÇI‹ƒhM…ÿ„FH‹L$H‹H‰$HƒèH…ÀH‰„GIƒm„,H‹õE!I9G„ L‰ÿè3'þÿò$ò,$f.-áz„·Iƒ/„ŸIƒ,$…úÿÿI‹D$L‰çÿP0éøùÿÿ@M‰ÍE1ÿé5ùÿÿDI‹$H‰ýHƒèH…ÀI‰$…¶ùÿÿI‹D$L‰çÿP0é¦ùÿÿ„òYÀòXÅòQÈf.É‹çùÿÿè…'þÿf(ÈéÙùÿÿ@I‹L$HH9Q…)ýÿÿI‹ $HQÿH…ÒI‰$…6ôÿÿL‰çÿP0é+ôÿÿfE1öHÇD$1ÛE1Ò1öéˆøÿÿ„òAoò,$éòþÿÿI‹EL‰ïÿP0éÅþÿÿH‹AH‰ÏÿP0éªþÿÿH‰ïèÙ&þÿI‰Åéõôÿÿfïíòl$0éHüÿÿH‹@@H…À„.HƒÆ$ÿÐI‰ÄécüÿÿfïöHÇD$1ÛE1íE1ÒE1öE1ÿ1íòt$0éï÷ÿÿfïíE1íE1ÿHÇD$1ÛE1Ò1íòl$0éÊ÷ÿÿf.„I‹GL‰ÿÿP0éRþÿÿfïöHÇD$1ÛE1íE1ÿ1íòt$0é÷ÿÿI‹\$H…Û„PüÿÿM‹l$HƒIƒEIƒ,$„O¿H‰t$L‰$èµ$þÿH…ÀH‰D$L‹$H‹t$„zH‹D$A¸¿H‰X¸éðüÿÿ1ÒH‰ÎL‰ïèC%þÿH…ÀI‰Ç…DýÿÿfïíE1ö1ÛE1Ò1ö1íòl$0éìöÿÿ@H=9óè$þÿ…À„òüÿÿ@fïí1ÛE1ÒE1ö1öE1ÿ1íòl$0é²öÿÿè-$þÿH…À„;ýÿÿfïíHÇD$1ÛE1íE1ÒE1ö1ö1íòl$0é}öÿÿèø#þÿH…ÀtfïöE1ö1ÛE1Ò1ö1íòt$0éXöÿÿH‹‘B!H5ÂòH‹8èâ"þÿémÿÿÿf(Áòl$ò$$èÉ$þÿòl$ò$$éOõÿÿI‹D$H‰t$L‰çL‰$ÿP0L‹$H‹t$éþÿÿè‚$þÿI‰Äé6úÿÿò,$è€$þÿò,$f(Èé°öÿÿf(Áèi$þÿéõÿÿfïöE1ÿ1íòt$0é°õÿÿAVAUATUI‰üSH‰óHƒì@dH‹%(H‰D$81ÀH…ÒHÇD$ HÇD$(HÇD$0…šH‹NHƒù… H‹F H‹~H‰D$(H‹F(H‰|$ H‰D$0H‹šA!H9_„ÀèÛ"þÿòD$ò\$f.‡z„H‹|$(H9_„è«"þÿf(Èf. _z„H‹|$0H9_„øòL$è}"þÿòL$f(Ðf.+z„ûòD$¾L‰çèðïÿÿè›!þÿH…À„RH‹T$8dH3%(…áHƒÄ@[]A\A]A^Ãògòd$é;ÿÿÿH…í„ÅH‰é@H‹Á@!HƒìH°ÜQH5VîL ²ÜH ÜA¸H‹81Àèx"þÿXZ¾kBH ’ÝH=sùº]èé/þÿ1Àé`ÿÿÿfòOéïþÿÿfDòWéÿÿÿfDH‹nI‰ÕHƒýt(Ž]ÿÿÿHƒýtHƒý…VÿÿÿH‹F(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïèZþÿHƒýI‰Æt,HƒýtGH…íucH‹5ßz!L‰ïIƒîèƒ þÿH…ÀH‰D$ „¯H‹5¶z!L‰ïèf þÿH…ÀH‰D$(„LIƒîH‹5…z!L‰ïèE þÿH…ÀH‰D$0„IƒîM…öîH‹|$ é¿ýÿÿè{ þÿH…À„ãýÿÿ¾eBé×þÿÿ„òL$èU þÿH…ÀòL$„ßýÿÿ¾fBé«þÿÿ@òT$òL$è' þÿH…ÀòL$òT$„ßýÿÿ¾gBéwþÿÿH‹ù>!HƒìH aÚjH5ìL éÚHÑÚA¸H‹81Àè¯ þÿY^¾XBé2þÿÿH ÁÛH=¢÷º]¾Bè.þÿ1ÀéŠýÿÿHT$ L‚ÚH5ÙK!H‰éL‰ïèÞdþÿ…À‰ìþÿÿ¾\BéÛýÿÿH‹]>!HƒìH5úëjL TÚH µÙH5ÚA¸H‹81Àè þÿ_¾SBAXé•ýÿÿH‹KéMýÿÿè(þÿ„AWAVAUATUSH‰ûHƒìX…öòD$òL$òT$ uH‹GHƒ¸ …§òL$ò\$ò\KòT$ ò\[ òchòCpò\S(fïÿòYáò|$0òYÃòYÉòYÛòXàòCxòYÂòXËòYÒòXàòXÊf(ìf.üòYìò\Íf(ÁòÂÇfTÁf(ȇþòC`f.Ávf.£˜—À¶À…À„ò\£˜ò$$L‹£øL;%:=!„¬Iƒ$HÇD$(1ÿH‹L$(I;L$¤ I‹D$H‹,ÈHƒEH…ÿt Hƒ/„oH‹UH‹5Dx!H‹‚H…À„ôH‰ïÿÐI‰ÅM…í„ÃòD$èþÿH…ÀH‰D$„êòD$èÿþÿH…ÀI‰Â„ëòD$ H‰D$8èãþÿH…ÀI‰ÆL‹T$8„âH‹þÿH…ÀH‰ÅL‹L$…}þÿÿA¾^ A½61É1ö1Ûé&úÿÿH=7ÐL‰T$L‰L$èþÿ…ÀL‹L$L‹T$„ þÿÿA¾^ éÓüÿÿL‰L$è)þÿH…ÀL‹L$u¢H‹Ø!H5 ÐL‰L$H‹8è$þÿL‹L$ë¿L‰ûA¾¨ A½71ÉE1ÿ1öE1ÉéŸùÿÿL‰ûA¾ª A½71ÉE1ÿ1öé„ùÿÿ1ÒL‰ÎH‰ßL‰L$èbþÿH…ÀH‰ÅL‹L$…­÷ÿÿL‰û1ÉA½71öA¾² E1ÿéfùÿÿH=WÏL‰T$L‰L$è0þÿ…ÀL‹L$L‹T$„9÷ÿÿë»L‰L$èRþÿH…ÀL‹L$u§H‹!H52ÏL‰L$H‹8èMÿýÿL‹L$ë…I‹D$L‰L$L‰çH‰t$ÿP0H‹t$L‹L$é þÿÿè þÿI‰ÄéIûÿÿA¾P A½61É1í1Ûéžøÿÿ@f.„AVAUI‰ýATUSH‰óHƒì dH‹%(H‰D$1ÀH…ÒHÇ$HÇD$HÇD$…ËH‹NHƒùuYH‹vH‹S H‹K(A¸L‰ïèÇóÿÿH…À„nH‹|$dH3<%(…@HƒÄ []A\A]A^ÃDH…턬H‰é@H‹!HƒìH®¹QH5®ËL ºH k¹A¸H‹81ÀèÐÿýÿXZ¾ H êºH=;׺6èA þÿ1Àélÿÿÿf.„H‹nI‰ÔHƒýt(ŽuÿÿÿHƒýtHƒý…nÿÿÿH‹F(H‰D$H‹C H‰D$H‹CH‰$L‰çèËüýÿHƒýI‰Æt+HƒýtFH…íu^H‹5ØW!L‰çIƒîèôýýÿH…ÀH‰$„4H‹5W!L‰çèØýýÿH…ÀH‰D$„ÑIƒîH‹5GW!L‰çè·ýýÿH…ÀH‰D$tAIƒîM…ö}H‹T$H‹4$H‹L$é|þÿÿH ñ¹H=BÖº6¾" èC þÿ1ÀénþÿÿH‹½!HƒìH %¸jH5QÊL ­¸H;¸A¸H‹81ÀèsþýÿY^¾ù éžþÿÿL¸H5)%!H‰âH‰éL‰çèËBþÿ…À‰_ÿÿÿ¾ý épþÿÿH‹J!HƒìH5çÉjL A¸H ¢·HÈ·A¸H‹81Àèþýÿ_¾ô AXé*þÿÿH‹KéâýÿÿèüýÿDAWAVI‰ÖAUATUSH‰ûHƒì8E…ÀH‰t$H‰L$ uH‹GHƒ¸ …£1ÿèôúýÿH…ÀI‰Ä„xH‹kH;-Õ!„HƒEE1íE1ÿL;m”H‹EJ‹èHƒM…ÿt Iƒ/„H‹SH‹5$V!H‹‚H…À„üH‰ßÿÐH‰ÂH…Ò„“H‹!H9B…JH‹rH…ö„=L‹zHƒIƒHƒ*„G¿H‰t$èèûýÿH…ÀH‰ÁH‹t$„OH‰qº¾¸H‹|$HƒÀHƒH‰|ÁH‹D$ IƒL‰tÑHƒH‰DñI‹GL‹ˆ€M…É„gL‹¨!I‹‹BƒÀ‰BH‹!;…L‰T$1ÒH‰ÎH‰L$L‰ÿAÿÑL‹T$I‰ÁH‹L$I‹ƒhM…É„£Hƒ)„)Iƒ/„I‹D$I;D$ £IƒI‹T$L‰ ÂHƒÀI‰D$Iƒ)„IƒÅL;mI‰ßŒlþÿÿHƒm„ã1ÿèùýÿH…ÀH‰Å„ƒ¿è¶úýÿH…ÀI‰Á„‹H‹ÃU!H‰h L‰`H‹CH‹¨€H…턃L‹¨!I‹‹BƒÀ‰BH‹!;ŸL‰T$1ÒL‰ÎL‰L$H‰ßÿÕL‹T$H‰ÅL‹L$I‹ƒhH…턘Iƒ)„ÓH;-k!H‹E„ºH;Ú!„­H‹HH‹!H5a´HU´L‰ûA½ME1ÿA¾ H‹81Àè×úýÿE1É1É1öé[I‹GL‰ÿÿP0ébýÿÿf„H‹BH‰t$H‰×ÿP0H‹t$é ýÿÿ€I‹GL‰L$L‰ÿÿP0I‹D$I;D$ L‹L$Œ]þÿÿL‰ÎL‰çL‰L$è,ùýÿ…ÀL‹L$„Vþÿÿ1ÉE1ÿ1öIƒ,$A¾ð A½M…¼I‹D$L‰L$L‰çH‰L$H‰t$ÿP0L‹L$H‹L$H‹t$éfH‹AL‰L$H‰ÏÿP0L‹L$é¾ýÿÿ€I‹AL‰ÏÿP0éâýÿÿ¿H‰T$èÁøýÿH‹T$H…ÀH‰ÁI‰×„u¾º1ÀéØüÿÿ@E1ÿA¾Ð A½M1É1öE1ÉfIƒ,$„EÿÿÿH…ít Hƒm„ÍM…Ét Iƒ)„îH…ötHƒ.tsM…ÿt Iƒ/„„H…ÉtHƒ)tIH R´H=ãÐD‰êD‰ö1íè¦þÿH…ÛtHƒ+u H‹CH‰ßÿP0HƒÄ8H‰è[]A\A]A^A_ÀH‹AH‰ÏÿP0ë«@H‹FH‰L$H‰÷ÿP0H‹L$étÿÿÿ€I‹GH‰L$L‰ÿÿP0H‹L$écÿÿÿ€H‹EL‰L$H‰ïH‰L$H‰t$ÿP0L‹L$H‹L$H‹t$éÿÿÿI‹AH‰L$L‰ÏH‰t$ÿP0H‹L$H‹t$éïþÿÿDH‹B@H…À„øHƒÆ$éîúÿÿf.„1ÒH‰ÎL‰ÿH‰L$èÞ÷ýÿH…ÀI‰ÁH‹L$…ÊûÿÿA¾ì A½M1öéjþÿÿf.„H=ÑÅL‰T$(L‰L$H‰L$è¥öýÿ…ÀH‹L$L‹L$L‹T$(„IûÿÿfDA¾ì A½M1öE1ÉéþÿÿfH‰L$L‰L$è¡öýÿH…ÀH‹L$tA¾ì A½M1öL‹L$éßýÿÿH‹8!H5iÅH‰L$H‹8è„õýÿH‹L$ë•DA¾Þ A½M1öE1Éé¢ýÿÿfA¾¿ A½M1ÛéÜýÿÿDH‹H‹5ÒO!H…Ò„wÿÒI‰ÄM…ä„VI‹D$H;‡!„¦Iƒ$H;µ!„w¿èµõýÿH…ÀI‰ÇM‰á…ÅA¾œ A½L1É1ö1í1Ûé ýÿÿDA¾Þ A½ME1Ééôüÿÿ@H‹!H5úÅA¾Ã A½ME1ÿ1í1ÛH‹8è‡ôýÿ1É1öE1Éé»üÿÿH‰ßècöýÿH‰Âé÷øÿÿI‹L$HH9Q…DÿÿÿI‹<$HWÿH…ÒI‰$…UøÿÿL‰çÿP0éJøÿÿDH‹EH‰ïÿP0éúÿÿ¹º1ÀDH‹\$HƒÀHƒI‰\ÇH‹D$ IƒM‰t×HƒI‰DÏI‹AH‹˜€H…Û„³L‹´!I‹‹BƒÀ‰BH‹©!;ËL‰T$1ÒL‰ÏL‰L$L‰þÿÓL‹T$H‰ÅL‹L$I‹ƒhH…í„ÍIƒ/„Iƒ)t{H‹EH;í!tSH;-d!tJH‹HH‹'!H5o®Hc®A¾® A½LE1ÿ1ÛH‹81Àèæôýÿ1É1öE1ÉéZûÿÿf.„Iƒ,$…ÄûÿÿI‹D$L‰çÿP0é´ûÿÿI‹AL‰ÏÿP0évÿÿÿI‹GL‰L$L‰ÿÿP0L‹L$éWÿÿÿA¾‹ A½L1ÛéIûÿÿH‹@@H…À„+HƒÆ$ÿÐI‰ÄésýÿÿL‰ûéAûÿÿI‹AL‰ÏÿP0éùÿÿI‹t$H…ö„{ýÿÿM‹L$HƒIƒIƒ,$„¼¿L‰L$H‰t$èóýÿH…ÀI‰ÇH‹t$L‹L$„ÃI‰w¹º¸éþÿÿ1ÒL‰ÏL‰þL‰L$èžóýÿH…ÀH‰ÅL‹L$…}þÿÿA¾ª A½L1É1ö1Ûé&úÿÿH=—ÁL‰T$L‰L$èpòýÿ…ÀL‹L$L‹T$„ þÿÿA¾ª éÓüÿÿL‰L$è‰òýÿH…ÀL‹L$u¢H‹8!H5iÁL‰L$H‹8è„ñýÿL‹L$ë¿L‰ûA¾ô A½M1ÉE1ÿ1öE1ÉéŸùÿÿL‰ûA¾ö A½M1ÉE1ÿ1öé„ùÿÿ1ÒL‰ÎH‰ßL‰L$èÂòýÿH…ÀH‰ÅL‹L$…­÷ÿÿL‰û1ÉA½M1öA¾þ E1ÿéfùÿÿH=·ÀL‰T$L‰L$èñýÿ…ÀL‹L$L‹T$„9÷ÿÿë»L‰L$è²ñýÿH…ÀL‹L$u§H‹a!H5’ÀL‰L$H‹8è­ðýÿL‹L$ë…I‹D$L‰L$L‰çH‰t$ÿP0H‹t$L‹L$é þÿÿèmòýÿI‰ÄéIûÿÿA¾œ A½L1É1í1Ûéžøÿÿ@f.„AVAUI‰ýATUSH‰óHƒì dH‹%(H‰D$1ÀH…ÒHÇ$HÇD$HÇD$…ËH‹NHƒùuYH‹vH‹S H‹K(A¸L‰ïèÇóÿÿH…À„nH‹|$dH3<%(…@HƒÄ []A\A]A^ÃDH…턬H‰é@H‹y!HƒìH«QH5½L j«H ˪A¸H‹81Àè0ñýÿXZ¾X H J¬H=ÛȺLè¡þýÿ1Àélÿÿÿf.„H‹nI‰ÔHƒýt(ŽuÿÿÿHƒýtHƒý…nÿÿÿH‹F(H‰D$H‹C H‰D$H‹CH‰$L‰çè+îýÿHƒýI‰Æt+HƒýtFH…íu^H‹58I!L‰çIƒîèTïýÿH…ÀH‰$„4H‹5ðH!L‰çè8ïýÿH…ÀH‰D$„ÑIƒîH‹5§H!L‰çèïýÿH…ÀH‰D$tAIƒîM…ö}H‹T$H‹4$H‹L$é|þÿÿH Q«H=âǺL¾n è£ýýÿ1ÀénþÿÿH‹!HƒìH …©jH5±»L ªH›©A¸H‹81ÀèÓïýÿY^¾E éžþÿÿLx©H5é!H‰âH‰éL‰çè+4þÿ…À‰_ÿÿÿ¾I épþÿÿH‹ª !HƒìH5G»jL ¡©H ©H(©A¸H‹81Àè`ïýÿ_¾@ AXé*þÿÿH‹KéâýÿÿèuíýÿDAWAVAUATUSH‰óHƒìXdH‹%(H‰D$H1ÀH…ÒH‰|$ HÇD$0HÇD$8HÇD$@…H‹NHƒù…PH‹FH‰D$H‹F H‰D$H‹F(H‰D$1ÿèìýÿH…ÀI‰Ä„*H‹D$ L‹hhL;-ò !„4IƒEE1öE1ÒM9uŽŒI‹EJ‹,ðHƒEM…Òt Iƒ*„cH‹UH‹5@G!H‹‚H…À„ØH‰ïÿÐH‰ÂH…Ò„/H‹0 !H9B…VL‹JM…É„IL‹zIƒIƒHƒ*„¿L‰ $èíýÿH…ÀH‰ÃL‹ $„ÕL‰K¾º¸H‹L$HƒÀHƒH‰LÃH‹D$HƒH‰DÓH‹D$HƒH‰DóI‹GL‹€€M…À„@L‹Á !I‹‹BƒÀ‰BH‹¶ !;NL‰$1ÒH‰ÞL‰ÿAÿÐL‹$I‰ÀI‹ƒhM…À„hHƒ+„>Iƒ/„dI‹D$I;D$ vIƒI‹T$L‰ÂHƒÀI‰D$Iƒ(„$IƒÆM9uI‰êtþÿÿIƒm„AH‹¡F!H‹=‚G!L‰$H‰ÞèžëýÿH…ÀI‰ÀL‹$„¿ HƒI‹PH‹5gF!H‹‚H…À„- L‰T$(L‰ÇL‰$ÿÐL‹$L‹T$(I‰ÇM…ÿ„ö Iƒ(„âH‹D$ L‰$ò@ò\@0è ëýÿH…ÀI‰ÀL‹$„ó H‹C !I9G„ö ¿L‰D$(L‰$è6ëýÿH…ÀI‰ÁL‹$L‹D$(…L‰ÕÇ$1ÛéÊI‹BL‰×ÿP0éŽýÿÿH‹BL‰ $H‰×ÿP0L‹ $éÖýÿÿf„I‹GL‰$L‰ÿÿP0I‹D$I;D$ L‹$ŒŠþÿÿL‰ÆL‰çL‰$èêýÿ…ÀL‹$„…þÿÿ1ÉE1ö1ÛE1ÉE1ÿIƒ,$Ç$ì…Ž@I‹D$H‰L$L‰çL‰L$L‰D$ÿP0M…íL‹D$L‹L$H‹L$„cIƒm…XI‹EH‰L$L‰ïL‰L$L‰D$ÿP0L‹D$L‹L$H‹L$é+fDH‹CL‰$H‰ßÿP0L‹$é«ýÿÿf„I‹@L‰ÇÿP0éÍýÿÿ¿H‰$èÒéýÿH‹$H…ÀH‰ÃI‰×„¾º1ÀéÌüÿÿfDH…í„ýH‰é@H‹©!HƒìH>¤QH5>¶L š¤H û£A¸H‹81Àè`êýÿXZ¾“H z¥H=SºŒèÑ÷ýÿ1ÀH‹t$HdH34%(…CHƒÄX[]A\A]A^A_Ã@E1ÿÇ$Ì1ÉE1ö1ÛE1ÉE1ÀIƒ,$„vþÿÿIƒm„¨þÿÿM…Àt Iƒ(„4M…ÿt Iƒ/„ÝM…Ét Iƒ)„öH…ÛtHƒ+tsM…öt Iƒ.„„H…Ét Hƒ)„•‹4$H ³¤H=ŒÁºè ÷ýÿ1ÀH…í„0ÿÿÿH‹}HWÿH…ÒH‰U…ÿÿÿH‹UH‰$H‰ïÿR0H‹$éÿÿÿH‹CH‰L$H‰ßÿP0H‹L$étÿÿÿ€I‹FH‰L$L‰÷ÿP0H‹L$écÿÿÿ€H‹AH‰ÏÿP0é\ÿÿÿI‹GH‰L$L‰ÿL‰L$ÿP0H‹L$L‹L$éÿÿÿDI‹AH‰L$L‰ÏÿP0H‹L$éñþÿÿ€I‹@H‰L$L‰ÇL‰L$ÿP0H‹L$L‹L$é©þÿÿDH‹B@H…À„¬HƒÆ$éúÿÿf.„1ÒH‰ÞL‰ÿè#èýÿH…ÀI‰À…ïúÿÿÇ$è1ÉE1öE1Éé2þÿÿH=!¶L‰\$(L‰$èûæýÿ…ÀL‹$L‹\$(„Œúÿÿf.„Ç$è1ÉE1öE1ÉE1Àéèýÿÿf„H‹nI‰ÔHƒýt(Ž%ýÿÿHƒýtHƒý…ýÿÿH‹F(H‰D$@H‹C H‰D$8H‹CH‰D$0L‰çè åýÿHƒýI‰Åt,HƒýtGH…íucH‹5@!L‰çIƒíè3æýÿH…ÀH‰D$0„åH‹5Î?!L‰çèæýÿH…ÀH‰D$8„ïIƒíH‹5…?!L‰çèõåýÿH…ÀH‰D$@„IƒíM…í‘H‹D$0H‰D$H‹D$8H‰D$H‹D$@H‰D$é*øÿÿ€L‰D$èæýÿH…ÀtÇ$è1ÉE1öE1ÉL‹D$éÇüÿÿH‹¡!H5Ò´H‹8èòäýÿé­þÿÿDÇ$Ú1ÉE1öE1ÉE1ÀéüÿÿÇ$»E1É1íE1ö1É1Ûé«üÿÿ„H‹!H5úµ1ÛE1ÿ1íH‹8è“äýÿÇ$¿E1ÉE1ÀI‹$1ÉE1öE1íHƒèH…ÀI‰$„©úÿÿé9üÿÿ@Ç$Ú1ÉE1öE1Àé üÿÿH‹!HƒìH …ŸjH5±±L  H›ŸA¸H‹81ÀèÓåýÿY^¾€énûÿÿH‰ïèïåýÿH‰Âég÷ÿÿI‹EL‰$L‰ïÿP0L‹$鍸ÿÿI‹@L‰$L‰ÇÿP0L‹$éùÿÿHT$0L5ŸH5† !H‰éL‰çèë)þÿ…À‰Iþÿÿ¾„éûÿÿH‹j!HƒìH5±jL aŸH žHèžA¸H‹81Àè åýÿ_¾{AXéºúÿÿL‰ýº1Àf„H‹|$HƒÀHƒI‰|ÁM‰DÑH‹EH‹˜€H…Û„áL‹ö!I‹‹BƒÀ‰BH‹ë!;L‰\$(L‰T$1ÒL‰ÎL‰ $H‰ïÿÓL‹\$(I‰ÅL‹ $L‹T$I‹ƒhM…í„§Iƒ)„Hƒm„H‹>!H‹=ï>!L‰$H‰Þè ãýÿH…ÀI‰ÁL‹$„ÄHƒI‹QH‹5Ô=!H‹‚H…À„L‰T$L‰ÏL‰ $ÿÐL‹ $L‹T$I‰ÀM…À„ Iƒ)„¿H‹D$ L‰D$(L‰T$òH f(Áò $èmâýÿH…ÀI‰ÁL‹T$L‹D$(„ËH‹ !I9@„ ¿L‰L$(L‰D$L‰$èŽâýÿH…ÀI‰ÆL‹$L‹D$L‹L$(…L‰ÕÇ$%1É1ÛE1ÿé]ùÿÿI‹AL‰$L‰ÏÿP0L‹$é×þÿÿH‹EL‰$H‰ïÿP0L‹$éËþÿÿI‹AL‰D$L‰ÏL‰$ÿP0L‹D$L‹$é ÿÿÿH‹=˜=!H‹GH‹H…Ò„é L‰$H‰ÞÿÒL‹$I‰ÀM…À…öÿÿH‹t!HS$H5‘œL‰D$L‰$1ÛE1ÿH‹81Àè±âýÿL‹$E1ÉÇ$ðL‹D$L‰ÕéPüÿÿL‰ÕÇ$ò1ÛE1Éé<üÿÿH‹B@L‰T$(H…À„H HƒÆ$é½õÿÿL‰ÕÇ$õ1ÛE1Éé üÿÿI‹_H…Û„ýõÿÿI‹oHƒHƒEIƒ/„w¿L‰D$(L‰$èáýÿH…ÀI‰ÁL‹$L‹D$(„Ò I‰Yº¸éôüÿÿ1ÒL‰ÎH‰ïL‰T$L‰ $è®áýÿH…ÀI‰ÅL‹ $L‹T$…OýÿÿI‰ïÇ$L‰Õ1ÛE1ÀélûÿÿH=£¯L‰\$(L‰L$L‰$èxàýÿ…ÀL‹$L‹L$L‹\$(„Ïüÿÿë·H‹KéßöÿÿH‹=§H‰L$L‰$H‹8èU×ýÿL‹$H‹L$é5ÿÿÿL‰ÕÇ$f1ÛE1ÿé­òÿÿH=ä¦L‰\$L‰L$L‰$è¹×ýÿ…ÀL‹$L‹L$L‹\$„·üÿÿL‰ÕÇ$né0òÿÿ1ÒL‰ÎH‰ßL‰ $èsØýÿH…ÀL‹ $L‹T$…»üÿÿëÌL‰L$L‰$è¡×ýÿH…ÀL‹$L‹L$u°H‹Lö H5}¦L‰L$L‰$H‹8è”ÖýÿL‹$L‹L$ë†I‹@L‰L$L‰ÇL‰$ÿP0L‹$L‹L$éÆùÿÿL‰ÇL‰$èLØýÿL‹T$(I‰ÇL‹$évëÿÿH‹@@L‰$H…À„Hs$ÿÐL‹$I‰ÀéõÿÿèÖýÿL‰÷è ØýÿL‹$I‰Áéì÷ÿÿH‹@@L‰$H…À„ÇHs$ÿÐL‹$I‰ÆéêùÿÿI‹AL‰ÏÿP0L‹$é-ýÿÿH‹@@L‰$H…ÀtCHs$ÿÐL‹$I‰Áé.öÿÿL‰ÏL‰ $èž×ýÿL‹T$I‰ÀL‹ $é[óÿÿH‰Þè…×ýÿL‹$I‰ÀéeôÿÿH‰Þèq×ýÿL‹$I‰ÁééõÿÿI‰ïÇ$L‰ÕéÝðÿÿI‰èÇ$%L‰Õ1ÉE1ÿé íÿÿI‰éÇ$GL‰ÕE1ÀéöìÿÿH‰Þè×ýÿL‹$I‰Æé!ùÿÿAWAVAUATUSH‰óHƒìXdH‹%(H‰D$H1ÀH…ÒH‰|$ HÇD$0HÇD$8HÇD$@…&H‹NHƒù…`H‹FH‰D$H‹F H‰D$H‹F(H‰D$1ÿè¶ÓýÿH…ÀI‰Ä„:H‹D$ L‹¨ðL;-ô „AIƒEE1öE1ÒM9uŽŒI‹EJ‹,ðHƒEM…Òt Iƒ*„pH‹UH‹5Ý.!H‹‚H…À„åH‰ïÿÐH‰ÂH…Ò„<H‹Íó H9B…cL‹JM…É„VL‹zIƒIƒHƒ*„ ¿L‰ $è¢ÔýÿH…ÀH‰ÃL‹ $„âL‰K¾º¸H‹L$HƒÀHƒH‰LÃH‹D$HƒH‰DÓH‹D$HƒH‰DóI‹GL‹€€M…À„ML‹^ó I‹‹BƒÀ‰BH‹Só ;[L‰$1ÒH‰ÞL‰ÿAÿÐL‹$I‰ÀI‹ƒhM…À„uHƒ+„KIƒ/„qI‹D$I;D$ ƒIƒI‹T$L‰ÂHƒÀI‰D$Iƒ(„1IƒÆM9uI‰êtþÿÿIƒm„NH‹>.!H‹=/!L‰$H‰Þè;ÓýÿH…ÀI‰ÀL‹$„Ï HƒI‹PH‹5.!H‹‚H…À„= L‰T$(L‰ÇL‰$ÿÐL‹$L‹T$(I‰ÇM…ÿ„ Iƒ(„ïH‹D$ L‰$òHhò@òYH0ò\ÁèžÒýÿH…ÀI‰ÀL‹$„ú H‹×ñ I9G„ý ¿L‰D$(L‰$èÊÒýÿH…ÀI‰ÁL‹$L‹D$(…L‰ÕÇ$z-1ÛéÎ@I‹BL‰×ÿP0éýÿÿH‹BL‰ $H‰×ÿP0L‹ $éÉýÿÿf„I‹GL‰$L‰ÿÿP0I‹D$I;D$ L‹$Œ}þÿÿL‰ÆL‰çL‰$èÒýÿ…ÀL‹$„xþÿÿ1ÉE1ö1ÛE1ÉE1ÿIƒ,$Ç$c-…Ž@I‹D$H‰L$L‰çL‰L$L‰D$ÿP0M…íL‹D$L‹L$H‹L$„cIƒm…XI‹EH‰L$L‰ïL‰L$L‰D$ÿP0L‹D$L‹L$H‹L$é+fDH‹CL‰$H‰ßÿP0L‹$éžýÿÿf„I‹@L‰ÇÿP0éÀýÿÿ¿H‰$èbÑýÿH‹$H…ÀH‰ÃI‰×„¾º1Àé¿üÿÿfDH…í„ýH‰é@H‹9ð HƒìH΋QH5ÎL *ŒH ‹‹A¸H‹81ÀèðÑýÿXZ¾ -H H=#ªº„èaßýÿ1ÀH‹t$HdH34%(…OHƒÄX[]A\A]A^A_Ã@E1ÿÇ$C-1ÉE1ö1ÛE1ÉE1ÀIƒ,$„vþÿÿIƒm„¨þÿÿM…Àt Iƒ(„4M…ÿt Iƒ/„ÝM…Ét Iƒ)„öH…ÛtHƒ+tsM…öt Iƒ.„„H…Ét Hƒ)„•‹4$H CŒH=\©º†èšÞýÿ1ÀH…í„0ÿÿÿH‹}HWÿH…ÒH‰U…ÿÿÿH‹UH‰$H‰ïÿR0H‹$éÿÿÿH‹CH‰L$H‰ßÿP0H‹L$étÿÿÿ€I‹FH‰L$L‰÷ÿP0H‹L$écÿÿÿ€H‹AH‰ÏÿP0é\ÿÿÿI‹GH‰L$L‰ÿL‰L$ÿP0H‹L$L‹L$éÿÿÿDI‹AH‰L$L‰ÏÿP0H‹L$éñþÿÿ€I‹@H‰L$L‰ÇL‰L$ÿP0H‹L$L‹L$é©þÿÿDH‹B@H…À„¬HƒÆ$éúÿÿf.„1ÒH‰ÞL‰ÿè³ÏýÿH…ÀI‰À…âúÿÿÇ$_-1ÉE1öE1Éé2þÿÿH=±L‰\$(L‰$è‹Îýÿ…ÀL‹$L‹\$(„úÿÿf.„Ç$_-1ÉE1öE1ÉE1Àéèýÿÿf„H‹nI‰ÔHƒýt(Ž%ýÿÿHƒýtHƒý…ýÿÿH‹F(H‰D$@H‹C H‰D$8H‹CH‰D$0L‰çèšÌýÿHƒýI‰Åt,HƒýtGH…íucH‹5§'!L‰çIƒíèÃÍýÿH…ÀH‰D$0„íH‹5^'!L‰çè¦ÍýÿH…ÀH‰D$8„ïIƒíH‹5'!L‰çè…ÍýÿH…ÀH‰D$@„IƒíM…í‘H‹D$0H‰D$H‹D$8H‰D$H‹D$@H‰D$éøÿÿ€L‰D$è–ÍýÿH…ÀtÇ$_-1ÉE1öE1ÉL‹D$éÇüÿÿH‹1ì H5bœH‹8è‚Ìýÿé­þÿÿDÇ$Q-1ÉE1öE1ÉE1ÀéüÿÿÇ$2-E1É1íE1ö1É1Ûé«üÿÿ„H‹ì H5Š1ÛE1ÿ1íH‹8è#ÌýÿÇ$6-E1ÉE1ÀI‹$1ÉE1öE1íHƒèH…ÀI‰$„©úÿÿé9üÿÿ@Ç$Q-1ÉE1öE1Àé üÿÿH‹­ë HƒìH ‡jH5A™L ‡H+‡A¸H‹81ÀècÍýÿY^¾÷,énûÿÿH‰ïèÍýÿH‰ÂéZ÷ÿÿI‹EL‰$L‰ïÿP0L‹$雸ÿÿI‹@L‰$L‰ÇÿP0L‹$éúøÿÿHT$0LņH5÷ H‰éL‰çè{þÿ…À‰Iþÿÿ¾û,éûÿÿH‹úê HƒìH5—˜jL ñ†H R†Hx†A¸H‹81Àè°Ìýÿ_¾ò,AXéºúÿÿL‰ýº1Àf„H‹|$HƒÀHƒI‰|ÁM‰DÑH‹EH‹˜€H…Û„äL‹†ê I‹‹BƒÀ‰BH‹{ê ;L‰\$(L‰T$1ÒL‰ÎL‰ $H‰ïÿÓL‹\$(I‰ÅL‹ $L‹T$I‹ƒhM…턵Iƒ)„Hƒm„!H‹ž%!H‹=&!L‰$H‰Þè›ÊýÿH…ÀI‰ÁL‹$„ÌHƒI‹QH‹5d%!H‹‚H…À„#L‰T$L‰ÏL‰ $ÿÐL‹ $L‹T$I‰ÀM…À„ Iƒ)„ÂH‹D$ L‰D$L‰$òHpò@ òYH0ò\ÁèùÉýÿH…ÀI‰ÁL‹$L‹D$„ÖH‹-é I9@„+¿L‰L$(L‰D$L‰$èÊýÿH…ÀI‰ÆL‹$L‹D$L‹L$(…šL‰ÕÇ$œ-1É1ÛE1ÿéZùÿÿI‹AL‰$L‰ÏÿP0L‹$éÔþÿÿH‹EL‰$H‰ïÿP0L‹$éÈþÿÿI‹AL‰D$L‰ÏL‰$ÿP0L‹D$L‹$éÿÿÿH‹=%%!H‹GH‹H…Ò„ò L‰$H‰ÞÿÒL‹$I‰ÀM…À…öÿÿH‹é HS$H5„L‰D$L‰$1ÛE1ÿH‹81Àè>ÊýÿL‹$E1ÉÇ$g-L‹D$L‰ÕéMüÿÿL‰ÕÇ$i-1ÛE1Éé9üÿÿH‹B@L‰T$(H…À„Q HƒÆ$é­õÿÿL‰ÕÇ$l-1ÛE1Éé üÿÿI‹_H…Û„öõÿÿI‹oHƒHƒEIƒ/„„¿L‰D$(L‰$è©ÈýÿH…ÀI‰ÁL‹$L‹D$(„Û I‰Yº¸éñüÿÿ1ÒL‰ÎH‰ïL‰T$L‰ $è;ÉýÿH…ÀI‰ÅL‹ $L‹T$…LýÿÿI‰ïÇ$…-L‰Õ1ÛE1ÀéiûÿÿH=0—L‰\$(L‰L$L‰$èÈýÿ…ÀL‹$L‹L$L‹\$(„Ìüÿÿë·DH‹Ké×öÿÿH‹=ˆ#!H‹GH‹H…Ò„Ç L‰$H‰ÞÿÒL‹$I‰ÁM…É…ýÿÿH‹dç HS$H5‚L‰L$L‰$E1ö1ÛE1ÿH‹81ÀèžÈýÿL‹$1ÉÇ$‰-E1ÀL‹L$L‰ÕéðöÿÿL‰ÕÇ$‹-1ÉE1ö1ÛE1ÿéÖöÿÿL‰Åº1ÀH‹|$HƒÀHƒI‰|ÆM‰LÖH‹EH‹˜€H…Û„‰L‹Sæ I‹‹BƒÀ‰BH‹Hæ ;'L‰\$L‰$1ÒL‰öH‰ïÿÓL‹\$I‰ÇL‹$I‹ƒhM…ÿ„&Iƒ.„ÿHƒm„ H‹u!!H‹=V"!L‰$H‰ÞèrÆýÿH…ÀI‰ÆL‹$„3HƒI‹VH‹5;!!H‹‚H…À„L‰$L‰÷ÿÐL‹$I‰ÁM…É„ÙIƒ.„¶H‹D$ L‰L$L‰$òHxò@(òYH0ò\ÁèÚÅýÿH…ÀI‰ÆL‹$L‹L$„~H‹å I9A„¿L‰L$L‰$èÆýÿH…ÀH‰ÁL‹$L‹L$…îL‰ÕÇ$¾-1ÛE1ÀéGõÿÿI‹FL‰$L‰÷ÿP0L‹$éêþÿÿH‹EL‰$H‰ïÿP0L‹$éÞþÿÿI‹FL‰L$L‰÷L‰$ÿP0L‹L$L‹$é)ÿÿÿH‹B@L‰T$H…À„yHƒÆ$éÇúÿÿL‰ÕÇ$Ž-1ÉE1ö1ÛE1ÿéÄôÿÿL‰L$L‰$ègÅýÿH…ÀL‹$L‹L$…ßüÿÿH‹ä H5?”L‰L$L‰$H‹8èVÄýÿL‹$L‹L$é²üÿÿI‹XH…Û„ÈúÿÿI‹hHƒHƒEIƒ(„¿L‰L$L‰$èÑÄýÿH…ÀI‰ÆL‹$L‹L$„I‰^º¸éLýÿÿ1ÒL‰öH‰ïL‰$èhÅýÿH…ÀI‰ÇL‹$…§ýÿÿI‰èÇ$§-L‰Õ1É1ÛE1ÉéÞóÿÿH‹=ø!H‹GH‹H…Ò„L‰$H‰ÞÿÒL‹$I‰ÆM…ö…ýÿÿH‹Ôã HS$H5ñ~L‰$1ÛH‹81ÀèÅýÿL‹$1ÉÇ$«-E1ÉE1ÀL‰ÕémóÿÿL‰Íº1ÀH‹|$HƒÀHƒH‰|ÁL‰tÑH‹EH‹˜€H…Û„tL‹êâ I‹‹BƒÀ‰BH‹ßâ ;%L‰\$L‰T$1ÒH‰ÎH‰ $H‰ïÿÓL‹\$I‰ÀH‹ $L‹T$I‹ƒhM…À„}Hƒ)„9Hƒm„O¿L‰D$L‰$èFÃýÿH…ÀI‰ÁL‹$L‹D$„L‰@(L‰h¿L‰x L‰T$H‰$èbÁýÿH…ÀI‰ÀL‹ $L‹T$„øH‹@¿L‰$L‰èèÂýÿH…ÀI‰ÁL‹$L‹T$„LH‹ì!L‰`L‰@ H‹CH‹¨€H…í„|L‹Ñá I‹‹BƒÀ‰BH‹Æá ;1ÒL‰\$L‰T$L‰ÎL‰ $H‰ßÿÕL‹\$L‹ $L‹T$I‹ƒjH…À„II‹9L‰ÕHWÿH…ÒI‰…:òÿÿI‹QH‰$L‰ÏÿR0H‹$é#òÿÿH‹AL‰D$H‰ÏL‰$ÿP0L‹D$L‹$é¦þÿÿH‹EL‰D$H‰ïL‰$ÿP0L‹D$L‹$éþÿÿH=ÚL‰\$L‰$è´Áýÿ…ÀL‹$L‹\$„³úÿÿI‰èÇ$§-L‰Õ1É1ÛE1ÉE1ÿéñÿÿL‰ÕÇ$°-1É1ÛE1ÀéñÿÿL‰ÕÇ$­-1É1ÛE1ÀéêðÿÿH‹B@L‰$H…À„HƒÆ$L‰÷ÿÐL‹$I‰Áéâúÿÿ1ÒH‰ÎH‰ïL‰T$H‰ $èÂýÿH…ÀI‰ÀH‹ $L‹T$…¼ýÿÿI‰éÇ$É-L‰ÕE1ö1Ûé‚ðÿÿI‹YH…Û„ïúÿÿI‹iHƒHƒEIƒ)„¼¿L‰$èÞÀýÿH…ÀH‰ÁL‹$„>H‰Yº¸éÇüÿÿL‰$èÒÀýÿH…ÀL‹$…üÿÿH‹~ß H5¯L‰$H‹8èË¿ýÿL‹$é¿þÿÿH=sL‰\$H‰L$L‰$èHÀýÿ…ÀL‹$H‹L$L‹\$„«üÿÿI‰éÇ$É-L‰ÕE1ö1ÛE1Àé§ïÿÿI‹GL‰D$(L‰ÿÿP0L‹$L‹D$(é_÷ÿÿL‰ÕÇ$Í-1ÉE1ö1ÛétïÿÿL‰ÕÇ$Ø-1ÛE1ÿéóÿÿH‰L$L‰$L‰D$èþ¿ýÿH…ÀL‹$H‹L$tI‰éÇ$É-L‰ÕE1ö1ÛL‹D$é#ïÿÿH‹Þ H5¾ŽH‰L$L‰$H‹8èÕ¾ýÿL‹$H‹L$é5ÿÿÿL‰ÕÇ$Ý-1ÛE1ÿéòÿÿH=dŽL‰\$L‰L$L‰$è9¿ýÿ…ÀL‹$L‹L$L‹\$„µüÿÿL‰ÕÇ$å-é òÿÿ1ÒL‰ÎH‰ßL‰ $èó¿ýÿH…ÀL‹ $L‹T$…¹üÿÿëÌL‰L$L‰$è!¿ýÿH…ÀL‹$L‹L$u°H‹ÌÝ H5ýL‰L$L‰$H‹8è¾ýÿL‹$L‹L$ë†I‹@L‰L$L‰ÇÿP0L‹$L‹L$éÈùÿÿL‰ÇL‰$èпýÿL‹T$(I‰ÇL‹$é]ëÿÿH‹@@L‰$H…À„Hs$ÿÐL‹$I‰Àéûôÿÿè—½ýÿL‰÷è¿ýÿL‹$I‰Áéà÷ÿÿH‹@@L‰$H…À„ÇHs$ÿÐL‹$I‰ÆéìùÿÿI‹AL‰ÏÿP0L‹$é1ýÿÿH‹@@L‰$H…ÀtCHs$ÿÐL‹$I‰Áé*öÿÿL‰ÏL‰ $è"¿ýÿL‹T$I‰ÀL‹ $éOóÿÿH‰Þè ¿ýÿL‹$I‰Àé\ôÿÿH‰Þèõ¾ýÿL‹$I‰ÁéåõÿÿI‰ïÇ$z-L‰ÕéÑðÿÿI‰èÇ$œ-L‰Õ1ÉE1ÿéÿìÿÿI‰éÇ$¾-L‰ÕE1ÀéêìÿÿH‰Þ裾ýÿL‹$I‰Æé#ùÿÿ€AWAV¹AUATUSH‰ûH‰õHìØL¤$€dH‹%(H‰„$È1ÀL‰çH…ÒóH«…rH‹NHƒù…L H‹F H‹~H‰„$ˆH‹F(H‰¼$€H‰„$H‹F0H‰„$˜H‹F8H‰„$ H‹F@H‰„$¨H‹FHH‰„$°H‹FPH‰„$¸H‹-¥Û H9o„‹èæ¼ýÿò$ò4$f.5”›z„$ H‹¼$ˆH9o„jèµ¼ýÿòD$ò|$f.=a›z„ H‹¼$H9o„G肼ýÿòD$òl$f.-.›z„. H‹¼$˜H9o„$èO¼ýÿf(Øf.›z„ H‹¼$ H9o„ ò\$è¼ýÿò\$f(àf.%Ìšz„ H‹¼$¨H9o„âòd$ ò\$èá»ýÿòd$ f(èò\$f.-‰šz„ H‹¼$°H9o„'òl$(òd$ ò\$蘻ýÿòl$(f(ðòd$ ò\$f.5:šz„òH‹¼$¸H9o„ òt$0òl$(òd$ ò\$èC»ýÿòt$0f(Èòl$(òd$ ò\$f. ß™z„çf.ˆ•f(Ãf(Ùǃf(ÈòD$òt$f(ðòD$òl$f(èò$ò$$f(àfEïÀò[0ò<$òc8ò{fD.Ãò|$òk@ò{ ò|$òsHò{(òKP‡™ fD.Á‡Åf(ÁòYÁf(ÓòC`f(ýf(ÄòYÓò\$ò\|$òSXf(Öò\T$òChòYÀò{pòYÿòSxòXÇòYÒòXÂòQÐf.ÒŠÝ fA.Ðò“˜z„ òChf(ùò^Âò\ûòChòCpò^ÂòCpòCxò^ÂòYÒòCxf(ÇòYÇòXÐòQÂf.ÀŠÐ fA.Àòƒ€z„Kò^øò_Ëòd$(1ÿòl$ òt$ò“˜ò^Ðò»ˆò<$f(Çò“f(Ôò\Áò\Ñò]Ðf(Äòd$òXÁò“ f(×ò|$òXÑò_Âf(×ò\Ñòƒ¨f(Åò\Áò]Âf(ÕòXÑòƒ°f(ÇòXÁò_Ðf(Æò\Áò“¸f(Ôò\Ñò]ÂòƒÀf(ÆòXÁòXÌò_ÁòƒÈè¡¶ýÿH…À„xH‹‹ðòt$òl$ òd$(H‹1HVÿH…ÒH‰„ôòX$$ò7—òXl$1ÿH‰ƒðòXt$òYàòYèòYðòYƒ˜ò£Ðò«Øò³àòƒèè¶ýÿH…À„øH‹‹øH‹1HVÿH…ÒH‰„1ÿH‰ƒøèàµýÿH…À„×H‹‹H‹1HVÿH…ÒH‰„½H‰ƒ1ÀH‹´$ÈdH34%(…r HÄØ[]A\A]A^A_ÃòwéüûÿÿfDǃé üÿÿf„òwò4$épúÿÿòwòt$é‘úÿÿòwòt$é´úÿÿò_éÛúÿÿfDògéûÿÿfDòoé5ûÿÿfDH‹»H‰$H‹WÿR0H‹$é(ÿÿÿDH‹»øH‰$H‹WÿR0H‹$é×þÿÿDòOéûÿÿfDf(üf(ÕfD(Öò\<$ò\T$òD\T$fD(Ïf(ÂòDYÏòYÂòAXÁfE(ÊòEYÊòAXÁòDQÈfE.ÉŠÕ fE.Èz„^f(Áò\ÃfA.Àz„qò^ÈfA(ÀòA^ùòA^ÑòE^ÑòYùòYÑòDYÑfA(Èò\çò\êòA\òéûÿÿDL‹vIƒþ‡; H7”I‰ÕJc°HÐÿàH‹FPH‰„$¸H‹EHH‰„$°H‹E@H‰„$¨H‹E8H‰„$ H‹E0H‰„$˜H‹E(H‰„$H‹E H‰„$ˆH‹EH‰„$€L‰ïè³ýÿIƒþI‰Ç‡HÓ“Jc°HÐÿàfH‹5!L‰ïè±´ýÿH…ÀH‰„$ˆ„dIƒïH‹55!L‰ïè´ýÿH…ÀH‰„$„ùIƒïH‹5™!L‰ïèi´ýÿH…ÀH‰„$˜„IƒïH‹55!L‰ïèE´ýÿH…ÀH‰„$ „—IƒïH‹5é !L‰ïè!´ýÿH…ÀH‰„$¨„,IƒïH‹5 !L‰ïèý³ýÿH…ÀH‰„$°„éIƒïH‹5!L‰ïèÙ³ýÿH…ÀH‰„$¸„ãIƒïM…ÿ¨H‹¼$€éB÷ÿÿH‹5— !L‰ïIƒï蛳ýÿH…ÀH‰„$€…ÊþÿÿH‹MfDH‹ÑÒ HƒìH0nQH5f€L ÂnH #nA¸H‹81À舴ýÿXZ¾·7H ¢oH=«ºïèùÁýÿ¸ÿÿÿÿéûûÿÿ€ès³ýÿH…À„Îöÿÿ¾¬7ëÂè[³ýÿH…À„éöÿÿ¾­7ëªH‹»ðH‰D$0òt$(òd$H‹WÿR0H‹D$0òt$(òl$ òd$éÑúÿÿDè³ýÿH…À„Äöÿÿ¾®7éOÿÿÿò\$èå²ýÿH…Àò\$„Ëöÿÿ¾¯7é+ÿÿÿ@òd$ ò\$è·²ýÿH…Àò\$òd$ „Îöÿÿ¾°7é÷þÿÿ„òl$(òd$ ò\$èy²ýÿH…Àò\$òd$ òl$(„Íöÿÿ¾±7é³þÿÿ@òt$0òl$(òd$ ò\$è3²ýÿH…Àò\$òd$ òl$(òt$0„Ðöÿÿ¾²7égþÿÿ„òL$8òt$0òl$(òd$ ò\$èݱýÿH…Àò\$òd$ òl$(òt$0òL$8„Ïöÿÿ¾³7é þÿÿ@H‹ÑÐ H5lH‹8è²°ýÿ¾à8º„H mH=Š‹èÝ¿ýÿ¸ÿÿÿÿéßùÿÿH‹TÐ HƒìH5ñ}jL KlH ¬kHœkA¸H‹81Àè ²ýÿ_¾•7AXé|ýÿÿDH‹AÐ H5…kH‹8è"°ýÿ¾9º ésÿÿÿ¾™9ºéaÿÿÿ¾¿9ºéQÿÿÿ¾Î9ºéAÿÿÿH‹éÏ H5-kH‹8èʯýÿ¾ƒ8ºýéÿÿÿH‹ÁÏ H5kH‹8袯ýÿ¾›8ºþéóþÿÿLÎjH55Ý L‰ñL‰âL‰ïè·õýÿ…À‰4üÿÿ¾ž7é¤üÿÿH‹6Ï HƒìH žjjH5Ê|L &kH~jA¸H‹81Àèì°ýÿY^¾š7é_üÿÿòDD$@òL$8òt$0òl$(òd$ ò\$èö°ýÿòDD$@f(ÐòL$8òt$0òl$(òd$ ò\$éËõÿÿf(ÂòDD$Hò|$@òL$8òt$0òl$(òd$ ò\$è”°ýÿòDD$Hò|$@òL$8òt$0òl$(òd$ ò\$éÌõÿÿH‹5Î HƒìL 5jjH5É{H iH}iA¸H‹81Àèë¯ýÿAY¾7AZé\ûÿÿH‹îÍ HƒìH5‹{jL åiH FiH6iA¸H‹81À褯ýÿA[¾‹7[éûÿÿH‹-h !H‹=! !H‰îèA®ýÿH…ÀH‰Ã„CHƒH‹CH‹5¦!H‹¨€H…í„\L‹%wÍ I‹$‹BƒÀ‰BH‹kÍ ;ã1ÒH‰ßÿÕI‹$ƒjH…À„9H‰ÅHƒ+„HÇD$xH‰l$hHÇD$pHƒEH‹D$xH‹.Í H9Є{H…À„rHƒH‹D$pH…À„ H9ЄHƒH‹ÎÌ H‹D$pH9P„ñH‹°Ì H5!‡H‹8èɬýÿH‹T$xH…Òt Hƒ*„2H‹T$hH…Òt Hƒ*„ H‹T$pH…ÒtHƒ*u H‹|$pH‹GÿP0H‹E¾N8ºùHƒèH…ÀH‰E…ÆûÿÿH‹E‰T$H‰ï‰4$ÿP0‹4$‹T$é©ûÿÿH‹Ì HƒìH5·yjL hH rgHbgA¸H‹81ÀèЭýÿ]¾†7A\éBùÿÿH‹ÔË HƒìH5qyjL ËgH ,gHgA¸H‹81À芭ýÿA]¾7A^éûøÿÿH‹Ë HƒìH5*yjL „gH åfHÕfA¸H‹81ÀèC­ýÿA_¾|7XéµøÿÿòDD$XòDT$PòT$Hò|$@òL$8òt$0òl$(òd$ ò\$è9­ýÿòDD$XfD(ÈòDT$PòT$Hò|$@òL$8òt$0òl$(òd$ ò\$é¬õÿÿHÇD$pH‹T$hH‹Bö€«€…ÂHƒ|$x„ÌH‹Ê H5>…H‹8趪ýÿéèýÿÿH‹CH‰ßÿP0éTýÿÿHÇD$xé„ýÿÿH‹|$hH‹GÿP0éâýÿÿH‹|$xH‹GÿP0é½ýÿÿH‹=»!H‹GH‹H…Ò„ÀH‰îÿÒH‰ÃH…Û…•üÿÿH‹ŸÊ HU$H5¼eH‹81Àèê«ýÿ¾G8ºùé{ùÿÿèªýÿHT$pHt$xH|$hè©ýÿH‹ãÉ H‹T$hH‹H‹xHH‰PHH‹T$xL‹`PH‹XXH…ÿH‰PPH‹T$pH‰PXt Hƒ/„M…ät Iƒ,$„H…Û„$ýÿÿHƒ+…ýÿÿH‹CH‰ßÿP0é ýÿÿH=AyH‰4$è ªýÿ…ÀH‹4$„üÿÿH‹ºù¾I8HƒèH…ÀH‰…·øÿÿH‹C‰T$H‰ß‰4$ÿP0‹T$‹4$éšøÿÿ1ÒH‰ßèÀªýÿH…ÀH‰Å…Ìûÿÿë®èý©ýÿH…Àu¤H‹±È H5âxH‹8è©ýÿëŒH‰D$hH‰T$xHƒH‹É H‹|$hH‹0莪ýÿ…À…ÔþÿÿH‹§È H5€ƒH‹8èÀ¨ýÿéòûÿÿH‹GÿP0éíþÿÿI‹D$L‰çÿP0éíþÿÿL‰ñé—õÿÿH‹@@H…ÀtHu$ÿÐH‰Ãé1þÿÿH‰îèhªýÿH‰Ãé!þÿÿAWAVAUATUSH‰óHƒìhdH‹%(H‰D$X1ÀH…ÒH‰|$(HÇD$@HÇD$HHÇD$P…nH‹NHƒù…pH‹FH‰D$H‹F H‰D$0H‹F(H‰D$ 1ÿè§ýÿH…ÀI‰Å„J H‹D$(L‹ øL;%ßÇ „Q E1ÛIƒ$E1öM9t$L‹|$0L‰ßŽ“I‹D$J‹,ðHƒEH…ÿt Hƒ/„–H‹UH‹5#!H‹‚H…À„£H‰ïÿÐH‰ÂH…Ò„BH‹Ç H9B…iL‹JM…É„\H‹ZIƒHƒHƒ*„F¿L‰L$èç§ýÿH…ÀH‰ÁL‹L$„ÞL‰I¾º¸H‹|$HƒÀHƒH‰|ÁH‹D$ IƒL‰|ÑHƒH‰DñH‹CL‹€€M…À„L‹ §Æ I‹‹BƒÀ‰BH‹œÆ ;4L‰L$1ÒH‰ÎH‰L$H‰ßAÿÐL‹L$I‰ÀH‹L$I‹ƒhM…À„BHƒ)„HHƒ+„ŽI‹EI;E ¢IƒI‹UL‰ÂHƒÀI‰EIƒ(„2IƒÆM9t$H‰ïmþÿÿIƒ,$I‰û„UH‹{!H‹=\!L‰\$H‰Þèw¦ýÿH…ÀI‰ÀL‹\$„ò HƒI‹PH‹5?!H‹‚H…À„Œ L‰\$L‰ÇL‰D$ÿÐL‹D$L‹\$I‰ÇM…ÿ„? Iƒ(„õH‹D$(L‰\$òHf(ÁòL$èÚ¥ýÿH…ÀI‰ÀL‹\$„I H‹Å I9G„E ¿L‰D$L‰\$è¦ýÿH…ÀI‰ÁL‹\$L‹D$…L‰ÝÇD$˜<ÇD$01ÒE1ÒE1ö1ÛE1äé f„H‹GÿP0é^ýÿÿ@H‹BL‰L$H‰×ÿP0L‹L$é¡ýÿÿ€H‹CL‰D$H‰ßÿP0I‹EI;E L‹D$Œ^þÿÿL‰ÆL‰ïL‰D$è.¥ýÿ…ÀL‹D$„Uþÿÿ1ÒE1ÒE1ö1ÛE1ÉE1ÿIƒmÇD$y<ÇD$/…qfDI‹EL‰T$0L‰ïL‰L$(H‰T$ L‰D$ÿP0L‹T$0L‹L$(H‹T$ L‹D$é4f„H‹AL‰D$H‰ÏÿP0L‹D$éŸýÿÿ€I‹@L‰ÇÿP0é¿ýÿÿ¿H‰T$衤ýÿH…ÀH‰ÁH‹T$„H‰Ó¾º1Àé¹üÿÿ@H…í„5H‰é@H‹yà HƒìH_QH5qL j_H Ë^A¸H‹81Àè0¥ýÿXZ¾<H J`H=‹~º-衲ýÿ1ÀH‹t$XdH34%(…hHƒÄh[]A\A]A^A_Ã@E1ÿÇD$Y<ÇD$/1ÒE1ÒE1ö1ÛE1ÉE1ÀDIƒm„•þÿÿM…ät Iƒ,$„MM…Àt Iƒ(„vM…ÿt Iƒ/„—M…Ét Iƒ)„¸H…Ût Hƒ+„‰M…öt Iƒ.„ÚM…Òt Iƒ*„“H…Òt Hƒ*„¤‹T$‹t$H U_H=–}1Û诱ýÿH…턦H‹EHPÿH‰ØH…ÒH‰U…ïþÿÿH‹UH‰\$H‰ïÿR0H‹D$éÖþÿÿDH‹CL‰T$ H‰ßH‰T$ÿP0L‹T$ H‹T$éTÿÿÿDI‹BH‰T$L‰×ÿP0H‹T$éTÿÿÿ€H‹BH‰×ÿP0éMÿÿÿf„I‹FL‰T$ L‰÷H‰T$ÿP0L‹T$ H‹T$éÿÿÿDI‹D$L‰T$0L‰çL‰L$(H‰T$ L‰D$ÿP0L‹T$0L‹L$(H‹T$ L‹D$é{þÿÿI‹@L‰T$(L‰ÇL‰L$ H‰T$ÿP0L‹T$(L‹L$ H‹T$é]þÿÿI‹GL‰T$(L‰ÿL‰L$ H‰T$ÿP0L‹T$(L‹L$ H‹T$é<þÿÿI‹AL‰T$ L‰ÏH‰T$ÿP0L‹T$ H‹T$é%þÿÿDH‹B@H…À„þHƒÆ$éGùÿÿf1ÒH‰ÎH‰ßH‰L$è>¢ýÿH…ÀI‰ÀH‹L$…+úÿÿI‰ßÇD$u<H‰ËÇD$/1ÒE1ÒE1öE1Ééwýÿÿ€H=!pL‰L$8H‰L$L‰D$èõ ýÿ…ÀL‹D$H‹L$L‹L$8„šùÿÿI‰ßH‰ËëVfDI‰ßL‰D$H‰Ëè¡ýÿH…Àt%ÇD$u<ÇD$/1ÒE1ÒE1öE1ÉL‹D$éöüÿÿH‹¿ H5ÀoH‹8èàŸýÿÇD$u<ÇD$/1ÒE1ÒE1öE1ÉE1Àé½üÿÿDH‹nI‰ÔHƒýt(ŽíûÿÿHƒýtHƒý…æûÿÿH‹F(H‰D$PH‹C H‰D$HH‹CH‰D$@L‰ç袞ýÿHƒýI‰Åt,HƒýtGH…íucH‹5¯ù L‰çIƒíèËŸýÿH…ÀH‰D$@„=H‹5fù L‰ç讟ýÿH…ÀH‰D$H„ÆIƒíH‹5ù L‰çèŸýÿH…ÀH‰D$P„íIƒíM…íhH‹D$@H‰D$H‹D$HH‰D$0H‹D$PH‰D$ éÒöÿÿ€H‰ÃI‰×ÇD$g<éÝþÿÿDH‰ØéYûÿÿ„ÇD$H<E1ö1íÇD$/1ÒE1ÒéØûÿÿH‹Q¾ H5ÊoE1ö1ÛE1ÿE1ä1íH‹8è]žýÿÇD$L<ÇD$/1ÒE1ÒE1ÉE1Àé=ûÿÿDI‰ßÇD$g<H‰ÃÇD$/1ÒE1ÒE1öE1ÀéûÿÿH‹ã½ HƒìH KYjH5wkL ÓYHaYA¸H‹81À號ýÿY^¾ <édúÿÿH‰ï赟ýÿH‰ÂéJöÿÿI‹D$H‰|$L‰çÿP0L‹\$é‘÷ÿÿI‹@L‰\$L‰ÇÿP0L‹\$éò÷ÿÿHT$@LöXH5gÊ H‰éL‰çè¬ãýÿ…À‰rþÿÿ¾<éñùÿÿH‹+½ HƒìH5ÈjjL "YH ƒXH©XA¸H‹81Àèážýÿ_¾<AXé«ùÿÿL‰ýº1Àf.„H‹t$HƒÀHƒI‰tÁM‰DÑH‹EH‹˜€H…Û„#H‹ ¶¼ H‹‹BƒÀ‰BH‹«¼ ;VH‰L$8L‰\$1ÒL‰ÎL‰L$H‰ïÿÓH‹L$8I‰ÄL‹L$L‹\$H‹ƒhM…ä„]Iƒ)„%Hƒm„3H‹Ì÷ H‹=­ø L‰\$H‰ÞèÈœýÿH…ÀI‰ÁL‹\$„@HƒI‹QH‹5÷ H‹‚H…À„ÒL‰\$L‰ÏL‰L$ÿÐL‹L$L‹\$I‰ÀM…À„“Iƒ)„ÒH‹D$(L‰D$8L‰\$òP f(ÂòT$è&œýÿH…ÀI‰ÁL‹\$L‹D$8„…H‹Y» I9@„Õ¿L‰L$8L‰D$L‰\$èFœýÿH…ÀI‰ÆL‹\$L‹D$L‹L$8…0L‰ÝÇD$º<ÇD$01ÒE1Ò1ÛE1ÿéIøÿÿI‹AL‰\$L‰ÏÿP0L‹\$éÂþÿÿH‹EL‰\$H‰ïÿP0L‹\$é´þÿÿI‹AL‰D$L‰ÏL‰\$ÿP0L‹D$L‹\$é ÿÿÿH‹==÷ H‹GH‹H…Ò„tL‰\$H‰ÞÿÒL‹\$I‰ÀM…À…ÜôÿÿH‹» HS$H54VL‰D$L‰\$E1ö1ÛE1ÿE1äH‹81ÀèMœýÿL‹\$ÇD$01ÒÇD$…<E1ÒE1ÉL‹D$L‰Ýéc÷ÿÿL‰ÝÇD$‡<ÇD$01ÒE1ÒE1ö1ÛE1ÉE1äé;÷ÿÿH‹B@L‰\$H…À„[HƒÆ$é^ôÿÿL‰ÝÇD$Š<ë»I‹_H…Û„®ôÿÿI‹oHƒHƒEIƒ/„þ ¿L‰D$L‰\$蛚ýÿH…ÀI‰ÁL‹\$L‹D$„QI‰Yº¸é²üÿÿ1ÒL‰ÎH‰ïL‰\$L‰L$è+›ýÿH…ÀI‰ÄL‹L$L‹\$… ýÿÿI‰ïÇD$£<L‰ÝÇD$01ÒE1ÒE1ö1ÛE1Àé]öÿÿH=iH‰L$8L‰L$L‰\$èâ™ýÿ…ÀL‹\$L‹L$H‹L$8„xüÿÿI‰ïÇD$£<L‰ÝÇD$01ÒE1ÒE1ö1ÛE1ÀE1äéöÿÿH‹KéOõÿÿH‹=@õ H‹GH‹H…Ò„ÂL‰\$H‰ÞÿÒL‹\$I‰ÁM…É…ŽüÿÿH‹¹ HS$H57TL‰L$L‰\$E1ö1ÛE1ÿH‹81ÀèSšýÿL‹\$ÇD$01ÒÇD$§<E1ÒE1ÀL‹L$L‰Ýéiõÿÿf„L‰ÝÇD$©<ÇD$01ÒE1ÒE1ö1ÛE1ÿé;õÿÿL‰Åº1ÀH‹t$0HƒÀHƒI‰tÆM‰LÖH‹EH‹˜€H…Û„H‹ ç· H‹‹BƒÀ‰BH‹Ü· ;¥H‰L$L‰\$1ÒL‰öH‰ïÿÓH‹L$I‰ÇL‹\$H‹ƒhM…ÿ„Iƒ.„Hƒm„H‹ó H‹=èó L‰\$H‰Þè˜ýÿH…ÀI‰ÆL‹\$„QHƒI‹VH‹5Ëò H‹‚H…À„“L‰\$L‰÷ÿÐL‹\$I‰ÁM…É„kIƒ.„ÅH‹D$(L‰L$8L‰\$òX(f(Ãò\$èk—ýÿH…ÀI‰ÆL‹\$L‹L$8„H‹ž¶ I9A„‰¿L‰L$L‰\$è—ýÿH…ÀI‰ÂL‹\$L‹L$…L‰ÝÇD$Ü<ÇD$01Ò1ÛE1Àé›óÿÿI‹FL‰\$L‰÷ÿP0L‹\$éÙþÿÿH‹EL‰\$H‰ïÿP0L‹\$éËþÿÿI‹FL‰L$L‰÷L‰\$ÿP0L‹L$L‹\$éÿÿÿH‹B@L‰\$H…À„?HƒÆ$éúÿÿL‰ÝÇD$¬<éÆýÿÿL‰L$L‰\$èì–ýÿH…ÀL‹\$L‹L$…tüÿÿH‹’µ H5ÃeL‰L$L‰\$H‹8èÙ•ýÿL‹\$L‹L$éŸüÿÿI‹XH…Û„úÿÿI‹hHƒHƒEIƒ(„å ¿L‰L$L‰\$èR–ýÿH…ÀI‰ÆL‹\$L‹L$„dI‰^º¸é8ýÿÿ1ÒL‰öH‰ïL‰\$èç–ýÿH…ÀI‰ÇL‹\$…“ýÿÿI‰èÇD$Å<L‰ÝÇD$01ÒE1Ò1ÛE1Éé!òÿÿH‹=jñ H‹GH‹H…Ò„0L‰\$H‰ÞÿÒL‹\$I‰ÆM…ö…}ýÿÿH‹Dµ HS$H5aPL‰\$1ÛH‹81À舖ýÿL‹\$ÇD$01ÒÇD$É<E1ÒE1ÉE1ÀL‰Ýé ñÿÿL‰Íº1ÀH‹t$ HƒÀHƒI‰tÂM‰tÒH‹EH‹˜€H…Û„gH‹ L´ H‹‹BƒÀ‰BH‹A´ ;”H‰L$8L‰\$1ÒL‰ÖL‰T$H‰ïÿÓH‹L$8I‰ÀL‹T$L‹\$H‹ƒhM…À„Iƒ*„\Hƒm„t¿L‰D$L‰\$襔ýÿH…ÀI‰ÁL‹\$L‹D$„H‹8ï H‹=ð L‰x L‰`L‰@(L‰\$H‰ÞH‰D$è#”ýÿH…ÀI‰ÇL‹L$L‹\$„áHƒI‹WH‹5æî H‹‚H…À„ZL‰L$L‰\$L‰ÿÿÐL‹\$L‹L$I‰ÄM…ä„ÎIƒ/„ÝH‹D$(L‰L$8L‰\$ò`8f(Äòd$è|“ýÿH…ÀI‰ÇL‹\$L‹L$8„5H‹¯² I9D$„‘¿L‰L$L‰\$è “ýÿH…ÀI‰ÆL‹\$L‹L$…lL‰ÝÇD$=ÇD$11ÒE1Ò1ÛE1Àé¨ïÿÿI‹BL‰D$L‰×L‰\$ÿP0L‹D$L‹\$éþÿÿH‹EL‰D$H‰ïL‰\$ÿP0L‹D$L‹\$éiþÿÿI‹GL‰L$L‰ÿL‰\$ÿP0L‹L$L‹\$éÿÿÿH=ðaH‰L$L‰\$èÉ’ýÿ…ÀL‹\$H‹L$„3úÿÿI‰èÇD$Å<L‰ÝÇD$01ÒE1Ò1ÛE1ÉE1ÿéïîÿÿL‰ÝÇD$Î<ÇD$01ÒE1Ò1ÛE1ÀéÍîÿÿL‰ÝÇD$Ë<ëÜH‹B@L‰\$H…À„îHƒÆ$L‰÷ÿÐL‹\$I‰ÁéWúÿÿL‰\$èn’ýÿH…ÀL‹\$…:üÿÿH‹± H5JaL‰\$H‹8èe‘ýÿL‹\$éDÿÿÿI‹YH…Û„júÿÿI‹iHƒHƒEIƒ)„† ¿L‰\$èè‘ýÿH…ÀI‰ÂL‹\$„ãI‰Zº¸énüÿÿ1ÒL‰ÖH‰ïL‰\$L‰T$è}’ýÿH…ÀI‰ÀL‹T$L‹\$…ÉüÿÿI‰éÇD$ç<L‰ÝÇD$01ÒE1ö1ÛéµíÿÿH=f`H‰L$8L‰T$L‰\$è:‘ýÿ…ÀL‹\$L‹T$H‹L$8„:üÿÿI‰éÇD$ç<L‰ÝÇD$01ÒE1ö1ÛE1Àé^íÿÿL‰ãº1ÀH‹t$HƒÀHƒI‰tÆM‰|ÖH‹CH‹¨€H…í„^H‹ ° H‹‹BƒÀ‰BH‹ÿ¯ ;H‰L$L‰L$1ÒL‰\$L‰öH‰ßÿÕH‹L$I‰ÀL‹\$L‹L$H‹ƒhM…À„.Iƒ.„JHƒ+„mH‹!ë H‹=ì L‰L$L‰D$L‰\$H‰ÞèýÿH…ÀI‰ÆL‹\$L‹D$L‹L$„ÿHƒI‹FH‹5Ñê H‹H…Ò„¸L‰L$L‰D$L‰÷L‰\$ÿÒL‹\$L‹D$I‰ÇL‹L$M…ÿ„|Iƒ.„H‹D$(L‰L$8L‰D$L‰\$òh@f(Åòl$èXýÿH…ÀI‰ÆL‹\$L‹D$L‹L$8„ H‹†® I9G„¿L‰L$L‰D$L‰\$èsýÿH…ÀH‰ÃL‹\$L‹D$L‹L$…XL‰ÝÇD$3=ÇD$11ÒE1ÒE1äéxëÿÿI‹FL‰L$L‰÷L‰D$L‰\$ÿP0L‹L$L‹D$L‹\$é‰þÿÿH‹CL‰L$H‰ßL‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éfþÿÿI‹FL‰L$L‰÷L‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éÑþÿÿI‹GL‰D$L‰ÿL‰\$ÿP0L‹\$L‹D$éßóÿÿL‰ÝÇD$ë<ÇD$01ÒE1ÒE1ö1Ûé¬êÿÿH‹=õé H‹GH‹H…Ò„, L‰L$L‰\$H‰ÞÿÒL‹\$L‹L$I‰ÇM…ÿ…ãùÿÿH‹Å­ HS$H5âHL‰L$L‰\$E1ö1ÛE1äH‹81ÀèþŽýÿL‹\$ÇD$11ÒÇD$þ<E1ÒE1ÀL‹L$L‰ÝéêÿÿH‹B@L‰L$L‰\$H…À„¯HƒÆ$éùÿÿL‰T$L‰\$L‰D$èÀýÿH…ÀL‹\$L‹T$t'I‰éÇD$ç<L‰ÝÇD$01ÒE1ö1ÛL‹D$éªéÿÿH‹C¬ H5t\L‰T$L‰\$H‹8芌ýÿL‹\$L‹T$éøûÿÿL‰ÝÇD$=ÇD$1éôòÿÿM‹T$M…Ò„aùÿÿI‹\$IƒHƒIƒ,$u)I‹D$L‰T$8L‰çL‰L$L‰\$ÿP0L‹\$L‹L$L‹T$8¿L‰T$8L‰L$L‰\$迌ýÿH…ÀI‰ÆL‹\$L‹L$L‹T$8„ª M‰Vº¸é}ûÿÿL‰ÝÇD$=éQÿÿÿI‹@L‰L$L‰ÇL‰\$ÿP0L‹\$L‹L$éøõÿÿL‰L$L‰\$L‰D$èjŒýÿH…ÀL‹\$L‹L$t*I‰ÜL‰ÝÇD$=ÇD$11ÒE1Ò1ÛE1ÿL‹D$éQèÿÿH‹êª H5‰L$L‰\$H‹8è1‹ýÿL‹\$L‹L$I‰ÜL‰ÝÇD$=ÇD$11ÒE1Ò1ÛE1ÿE1ÀéÿçÿÿH=°ZH‰L$L‰L$L‰\$è„‹ýÿ…ÀL‹\$L‹L$H‹L$„Æúÿÿë¤1ÒL‰öH‰ßL‰L$L‰\$èDŒýÿH…ÀI‰ÀL‹\$L‹L$…ÒúÿÿI‰ÜL‰ÝÇD$=ÇD$11ÒE1Ò1ÛE1ÿéyçÿÿH‹=Âæ H‹GH‹H…Ò„C L‰L$L‰D$H‰ÞL‰\$ÿÒL‹\$L‹D$I‰ÆL‹L$M…ö…»úÿÿH‹ˆª HS$H5¥EL‰L$ L‰D$1ÛL‰\$E1ÿE1äH‹81À輋ýÿL‹\$ÇD$11ÒÇD$ =E1ÒL‹D$L‹L$ L‰ÝéÐæÿÿL‰ÝÇD$%=ÇD$11ÒE1Ò1ÛE1ä鮿ÿÿL‰ÝÇD$"=ëÜH‹@@L‰L$L‰D$L‰\$H…À„Ý HƒÆ$L‰÷ÿÐL‹\$I‰ÇL‹D$L‹L$é2úÿÿH‹@@L‰\$H…À„Ê Hs$ÿÐL‹\$I‰ÀéyîÿÿL‰ýº1ÀH‹t$0HƒÀHƒH‰tÃL‰tÓH‹EL‹ €M…ä„3H‹ ì¨ H‹‹BƒÀ‰BH‹ᨠ;¯H‰L$0L‰L$1ÒL‰D$L‰\$H‰ÞH‰ïAÿÔH‹L$0I‰ÄL‹\$L‹D$L‹L$H‹ƒhM…ä„%Hƒ+„?Hƒm„aH‹-÷ã H‹=Øä L‰L$L‰D$L‰\$H‰îèéˆýÿH…ÀH‰ÃL‹\$L‹D$L‹L$„1HƒH‹CH‹5§ã H‹H…Ò„ÙL‰L$L‰D$H‰ßL‰\$ÿÒL‹\$L‹D$I‰ÆL‹L$M…ö„ŠHƒ+„öH‹D$(L‰L$L‰D$L‰\$ò@Hè8ˆýÿH…ÀH‰ÃL‹\$L‹D$L‹L$„\H‹f§ I9F„k¿L‰L$L‰D$L‰\$èSˆýÿH…ÀH‰ÂL‹\$L‹D$L‹L$…àL‰ÝÇD$U=ÇD$1E1ÒE1ÿéZäÿÿH‹CL‰L$H‰ßL‰D$L‰\$ÿP0L‹L$L‹D$L‹\$é”þÿÿH‹EL‰L$H‰ïL‰D$L‰\$ÿP0L‹L$L‹D$L‹\$érþÿÿH‹CL‰L$H‰ßL‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éÝþÿÿ辆ýÿL‰ÇL‰D$豈ýÿL‹\$I‰ÇL‹D$éáÿÿM‹WM…Ò„Ö÷ÿÿI‹oIƒHƒEIƒ/„пL‰T$8L‰L$L‰D$L‰\$è-‡ýÿH…ÀH‰ÃL‹\$L‹D$L‹L$L‹T$8„rL‰Sº¸éýÿÿH=ëUH‰L$0L‰L$L‰D$L‰\$躆ýÿ…ÀL‹\$L‹D$L‹L$H‹L$0„ýÿÿI‰ïÇD$>=L‰ÝÇD$11ÒE1ÒE1öE1äéØâÿÿ1ÒH‰ÞH‰ïL‰L$L‰D$L‰\$èL‡ýÿH…ÀI‰ÄL‹\$L‹D$L‹L$…þüÿÿI‰ïÇD$>=L‰ÝÇD$11ÒE1ÒE1öé~âÿÿL‰L$L‰D$L‰\$èJ†ýÿH…ÀL‹\$L‹D$L‹L$uµH‹ï¤ H5 UL‰L$L‰D$L‰\$H‹8è1…ýÿL‹\$L‹D$L‹L$éÿÿÿH‹=fá H‹GH‹H…Ò„²L‰L$L‰D$H‰îL‰\$ÿÒL‹\$L‹D$H‰ÃL‹L$H…Û…‰üÿÿH‹,¥ HU$H5I@L‰L$ L‰D$E1öL‰\$E1ÿH‹81Àèb†ýÿL‹\$ÇD$11ÒÇD$B=E1ÒL‹D$L‹L$ L‰ÝéváÿÿL‰ÝÇD$D=ÇD$11ÒE1ÒE1ÿéVáÿÿH‹@@L‰L$L‰D$L‰\$H…À„¶HƒÆ$H‰ßÿÐL‹\$I‰ÆL‹D$L‹L$éüÿÿH‹@@L‰\$H…À„£Hs$ÿÐL‹\$I‰Áé+ëÿÿL‰ÏL‰L$èØ…ýÿL‹\$I‰ÀL‹L$éÚçÿÿH‹@@L‰\$H…À„°Hs$ÿÐL‹\$I‰Æé½îÿÿI‹AL‰\$L‰ÏÿP0L‹\$éaòÿÿL‰õ¹1ÀH‹t$ HƒÀH‰ïL‰L$(L‰D$L‰\$H‰T$HƒH‰tÂH‰ÖH‰\Êè þÿH…ÀI‰ÇH‹T$L‹\$L‹D$L‹L$(„KHƒ*„çHƒm„ ¿L‰L$L‰D$L‰\$èʃýÿH…ÀI‰ÆL‹\$L‹D$L‹L$„"L‰x(L‰@¿L‰` L‰L$èäýÿH…ÀI‰ÇL‹\$L‹L$„8H‹@¿L‰I‹GL‰pèeƒýÿH…ÀI‰ÆL‹\$„æH‹=mÞ L‰hH‰ÆL‰x è= þÿH…ÀH‰ÃL‹\$„œI‹L‰ÝHPÿH…ÒI‰…÷ßÿÿI‹VL‰÷ÿR0éèßÿÿH‹BL‰L$H‰×L‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éìþÿÿH‹EL‰L$H‰ïL‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éÊþÿÿI‰îÇD$`=L‰ÝÇD$1E1Ò1ÛéÍÞÿÿL‰ÝÇD$d=ÇD$11ÒE1Ò1Ûé®ÞÿÿL‰ÝÇD$‡=ÇD$/1ÒE1Ò1ÛE1ÉE1ÀE1äé†ÞÿÿL‰ÝÇD$w=ÇD$01ÒE1Ò1ÛE1ÀE1äéaÞÿÿL‰ÝÇD$G=ÇD$11ÒE1ÒE1ÿéAÞÿÿM‹VM…Ò„ˆùÿÿI‹nIƒHƒEIƒ.„¿L‰T$(L‰L$L‰D$L‰\$è¿ýÿH…ÀH‰ÂL‹\$L‹D$L‹L$L‹T$(t8L‰R¹¸éBýÿÿL‰ÝÇD$=é-âÿÿL‰÷訂ýÿL‹\$I‰ÁéjéÿÿI‰îÇD$U=L‰ÝÇD$1E1ÿéÝÿÿI‹FL‰T$(L‰÷ÿP0L‹\$L‹D$L‹L$L‹T$(éHÿÿÿH‹@@L‰L$L‰\$H…Àt]Hs$ÿÐL‹\$I‰ÇL‹L$éÅòÿÿI‰ÜL‰ÝÇD$=ÇD$11Ò1ÛE1ÀéÝÿÿI‰èÇD$º<L‰ÝÇD$01ÒE1ÒE1ÿéõÜÿÿH‰ÞèÝýÿL‹L$I‰ÇL‹\$éfòÿÿI‰ïÇD$3=L‰ÝÇD$11ÒE1äé»ÜÿÿI‹GL‰T$8L‰ÿL‰L$L‰D$L‰\$ÿP0L‹\$L‹D$L‹L$L‹T$8éùøÿÿH‰ßèlýÿL‹L$I‰ÆL‹D$L‹\$é\÷ÿÿH‰ÞèMýÿL‹\$I‰Á醿ÿÿH‹@@L‰L$L‰D$L‰\$H…ÀtRHu$ÿÐL‹\$H‰ÃL‹D$L‹L$é?úÿÿH‹@@L‰L$L‰D$L‰\$H…ÀtH‰L$8L‰L$L‰\$èboýÿ…ÀL‹\$L‹L$H‹L$8„xüÿÿI‰ïÇD$T"L‰ÝÇD$1ÒE1ÒE1ö1ÛE1ÀE1äéöÿÿH‹KéOõÿÿH‹=ÀÊ H‹GH‹H…Ò„ÅL‰\$H‰ÞÿÒL‹\$I‰ÁM…É…ŽüÿÿH‹šŽ HS$H5·)L‰L$L‰\$E1ö1ÛE1ÿH‹81ÀèÓoýÿL‹\$ÇD$1ÒÇD$X"E1ÒE1ÀL‹L$L‰Ýéiõÿÿf„L‰ÝÇD$Z"ÇD$1ÒE1ÒE1ö1ÛE1ÿé;õÿÿL‰Åº1ÀH‹t$0HƒÀHƒI‰tÆM‰LÖH‹EH‹˜€H…Û„H‹ g H‹‹BƒÀ‰BH‹\ ;¥H‰L$L‰\$1ÒL‰öH‰ïÿÓH‹L$I‰ÇL‹\$H‹ƒhM…ÿ„Iƒ.„Hƒm„H‹‡È H‹=hÉ L‰\$H‰ÞèƒmýÿH…ÀI‰ÆL‹\$„QHƒI‹VH‹5KÈ H‹‚H…À„“L‰\$L‰÷ÿÐL‹\$I‰ÁM…É„kIƒ.„ÅH‹D$(L‰L$8L‰\$òXhf(Ãò\$èëlýÿH…ÀI‰ÆL‹\$L‹L$8„H‹Œ I9A„‰¿L‰L$L‰\$èmýÿH…ÀI‰ÂL‹\$L‹L$…L‰ÝÇD$"ÇD$1Ò1ÛE1Àé›óÿÿI‹FL‰\$L‰÷ÿP0L‹\$éÙþÿÿH‹EL‰\$H‰ïÿP0L‹\$éËþÿÿI‹FL‰L$L‰÷L‰\$ÿP0L‹L$L‹\$éÿÿÿH‹B@L‰\$H…À„BHƒÆ$éúÿÿL‰ÝÇD$]"éÆýÿÿL‰L$L‰\$èllýÿH…ÀL‹\$L‹L$…tüÿÿH‹‹ H5C;L‰L$L‰\$H‹8èYkýÿL‹\$L‹L$éŸüÿÿI‹XH…Û„úÿÿI‹hHƒHƒEIƒ(„å ¿L‰L$L‰\$èÒkýÿH…ÀI‰ÆL‹\$L‹L$„gI‰^º¸é8ýÿÿ1ÒL‰öH‰ïL‰\$èglýÿH…ÀI‰ÇL‹\$…“ýÿÿI‰èÇD$v"L‰ÝÇD$1ÒE1Ò1ÛE1Éé!òÿÿH‹=êÆ H‹GH‹H…Ò„3L‰\$H‰ÞÿÒL‹\$I‰ÆM…ö…}ýÿÿH‹ÄŠ HS$H5á%L‰\$1ÛH‹81ÀèlýÿL‹\$ÇD$1ÒÇD$z"E1ÒE1ÉE1ÀL‰Ýé ñÿÿL‰Íº1ÀH‹t$ HƒÀHƒI‰tÂM‰tÒH‹EH‹˜€H…Û„gH‹ ̉ H‹‹BƒÀ‰BH‹Á‰ ;”H‰L$8L‰\$1ÒL‰ÖL‰T$H‰ïÿÓH‹L$8I‰ÀL‹T$L‹\$H‹ƒhM…À„Iƒ*„\Hƒm„t¿L‰D$L‰\$è%jýÿH…ÀI‰ÁL‹\$L‹D$„H‹¸Ä H‹=™Å L‰x L‰`L‰@(L‰\$H‰ÞH‰D$è£iýÿH…ÀI‰ÇL‹L$L‹\$„áHƒI‹WH‹5fÄ H‹‚H…À„ZL‰L$L‰\$L‰ÿÿÐL‹\$L‹L$I‰ÄM…ä„ÎIƒ/„ÝH‹D$(L‰L$8L‰\$ò`pf(Äòd$èühýÿH…ÀI‰ÇL‹\$L‹L$8„5H‹/ˆ I9D$„‘¿L‰L$L‰\$è iýÿH…ÀI‰ÆL‹\$L‹L$…lL‰ÝÇD$Â"ÇD$1ÒE1Ò1ÛE1Àé¨ïÿÿI‹BL‰D$L‰×L‰\$ÿP0L‹D$L‹\$éþÿÿH‹EL‰D$H‰ïL‰\$ÿP0L‹D$L‹\$éiþÿÿI‹GL‰L$L‰ÿL‰\$ÿP0L‹L$L‹\$éÿÿÿH=p7H‰L$L‰\$èIhýÿ…ÀL‹\$H‹L$„3úÿÿI‰èÇD$v"L‰ÝÇD$1ÒE1Ò1ÛE1ÉE1ÿéïîÿÿL‰ÝÇD$"ÇD$1ÒE1Ò1ÛE1ÀéÍîÿÿL‰ÝÇD$|"ëÜH‹B@L‰\$H…À„ñHƒÆ$L‰÷ÿÐL‹\$I‰ÁéWúÿÿL‰\$èîgýÿH…ÀL‹\$…:üÿÿH‹™† H5Ê6L‰\$H‹8èåfýÿL‹\$éDÿÿÿI‹YH…Û„júÿÿI‹iHƒHƒEIƒ)„‰ ¿L‰\$èhgýÿH…ÀI‰ÂL‹\$„æI‰Zº¸énüÿÿ1ÒL‰ÖH‰ïL‰\$L‰T$èýgýÿH…ÀI‰ÀL‹T$L‹\$…ÉüÿÿI‰éÇD$˜"L‰ÝÇD$1ÒE1ö1ÛéµíÿÿH=æ5H‰L$8L‰T$L‰\$èºfýÿ…ÀL‹\$L‹T$H‹L$8„:üÿÿI‰éÇD$˜"L‰ÝÇD$1ÒE1ö1ÛE1Àé^íÿÿL‰ãº1ÀH‹t$HƒÀHƒI‰tÆM‰|ÖH‹CH‹¨€H…í„^H‹ Š… H‹‹BƒÀ‰BH‹… ;H‰L$L‰L$1ÒL‰\$L‰öH‰ßÿÕH‹L$I‰ÀL‹\$L‹L$H‹ƒhM…À„.Iƒ.„JHƒ+„mH‹¡À H‹=‚Á L‰L$L‰D$L‰\$H‰Þè“eýÿH…ÀI‰ÆL‹\$L‹D$L‹L$„ÿHƒI‹FH‹5QÀ H‹H…Ò„¸L‰L$L‰D$L‰÷L‰\$ÿÒL‹\$L‹D$I‰ÇL‹L$M…ÿ„|Iƒ.„H‹D$(L‰L$8L‰D$L‰\$òhxf(Åòl$èØdýÿH…ÀI‰ÆL‹\$L‹D$L‹L$8„ H‹„ I9G„ ¿L‰L$L‰D$L‰\$èódýÿH…ÀH‰ÃL‹\$L‹D$L‹L$…XL‰ÝÇD$ä"ÇD$1ÒE1ÒE1äéxëÿÿI‹FL‰L$L‰÷L‰D$L‰\$ÿP0L‹L$L‹D$L‹\$é‰þÿÿH‹CL‰L$H‰ßL‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éfþÿÿI‹FL‰L$L‰÷L‰D$L‰\$ÿP0L‹L$L‹D$L‹\$éÑþÿÿI‹GL‰D$L‰ÿL‰\$ÿP0L‹\$L‹D$éßóÿÿL‰ÝÇD$œ"ÇD$1ÒE1ÒE1ö1Ûé¬êÿÿH‹=u¿ H‹GH‹H…Ò„/ L‰L$L‰\$H‰ÞÿÒL‹\$L‹L$I‰ÇM…ÿ…ãùÿÿH‹Eƒ HS$H5bL‰L$L‰\$E1ö1ÛE1äH‹81Àè~dýÿL‹\$ÇD$1ÒÇD$¯"E1ÒE1ÀL‹L$L‰ÝéêÿÿH‹B@L‰L$L‰\$H…À„²HƒÆ$éùÿÿL‰T$L‰\$L‰D$è@cýÿH…ÀL‹\$L‹T$t'I‰éÇD$˜"L‰ÝÇD$1ÒE1ö1ÛL‹D$éªéÿÿH‹à H5ô1L‰T$L‰\$H‹8è býÿL‹\$L‹T$éøûÿÿL‰ÝÇD$±"ÇD$éôòÿÿM‹T$M…Ò„aùÿÿI‹\$IƒHƒIƒ,$u)I‹D$L‰T$8L‰çL‰L$L‰\$ÿP0L‹\$L‹L$L‹T$8¿L‰T$8L‰L$L‰\$è?býÿH…ÀI‰ÆL‹\$L‹L$L‹T$8„­ M‰Vº¸é}ûÿÿL‰ÝÇD$´"éQÿÿÿI‹@L‰L$L‰ÇL‰\$ÿP0L‹\$L‹L$éøõÿÿL‰L$L‰\$L‰D$èêaýÿH…ÀL‹\$L‹L$t*I‰ÜL‰ÝÇD$Í"ÇD$1ÒE1Ò1ÛE1ÿL‹D$éQèÿÿH‹j€ H5›0L‰L$L‰\$H‹8è±`ýÿL‹\$L‹L$I‰ÜL‰ÝÇD$Í"ÇD$1ÒE1Ò1ÛE1ÿE1ÀéÿçÿÿH=00H‰L$L‰L$L‰\$èaýÿ…ÀL‹\$L‹L$H‹L$„Æúÿÿë¤1ÒL‰öH‰ßL‰L$L‰\$èÄaýÿH…ÀI‰ÀL‹\$L‹L$…ÒúÿÿI‰ÜL‰ÝÇD$Í"ÇD$1ÒE1Ò1ÛE1ÿéyçÿÿH‹=B¼ H‹GH‹H…Ò„F L‰L$L‰D$H‰ÞL‰\$ÿÒL‹\$L‹D$I‰ÆL‹L$M…ö…»úÿÿH‹€ HS$H5%L‰L$ L‰D$1ÛL‰\$E1ÿE1äH‹81ÀèÞÿÿM‹VM…Ò„ˆùÿÿI‹nIƒHƒEIƒ.„¿L‰T$(L‰L$L‰D$L‰\$èAƒt”à#ýÿ™Aƒn Q ´`$ýÿ8AƒnÔ€$ýÿ8Aƒnô $ýÿ8Aƒn<À$ýÿ‘A†AƒN0x AAF Z FAG VAAœT %ýÿ¿BBŽB B(ŒD0†A8ƒHPª 8A0A(B BBBG O 8A0A(B BBBG W 8A0A(B BBBG zXA`BhBpBxB€BˆBPP$ô@(ýÿ]AƒL Y AI kA$x(ýÿ]AƒL Y AI kAD°(ýÿgD] G r F d)ýÿgD] G r F „P)ýÿgD] G r F ¤ )ýÿgD] G r F Äð)ýÿgD] G r F ä@*ýÿgD] G r F *ýÿgD] G r F $à*ýÿgD] G r F dD0+ýÿKBŽBB ŒA(†A0ƒ‹ (A BBBF Y (A BBBH d (C BBBK L¬-ýÿ BBŽB B(ŒD0†A8ƒDp 8D0A(B BBBG $üØ5ýÿ]AƒL Y AI kA|$6ýÿÃBBŽE B(ŒA0†A8ƒD`F 8A0A(B BBBG ¾ 8C0A(B BBBF À 8A0A(B BBBF $¤`:ýÿ]AƒL Y AI kAL̘:ýÿBBŒA †A(ƒG0Y (A ABBD e (C ABBC Lh;ýÿ3BBŽE B(ŒA0†A8ƒDp4 8D0A(B BBBF $lXAýÿ]AƒL Y AI kAL”AýÿŽBBŽB B(ŒD0†A8ƒDPÈ 8D0A(B BBBJ |äÐDýÿBBŽB B(ŒA0†A8ƒGPé 8A0A(B BBBD r 8C0A(B BBBJ Ö 8A0A(B BBBH 4d pGýÿ]BŒA†D ƒ GBI AAB4œ ˜Gýÿ]BŒA†D ƒ GBI AABÔ ÀGýÿLD V F kô ðGýÿLD V F k HýÿLD V F k4 PHýÿLD V F kT €HýÿLD V F kt °HýÿLD V F k” àHýÿDD P D k´ IýÿLD V F kÔ @IýÿLD V F kô pIýÿLD V F k  IýÿLD V F k4 ÐIýÿLD V F kT JýÿLD V F kt 0JýÿLD V F k4” `JýÿºA†AƒG0] CAF ` DAK 4Ì èJýÿºA†AƒG0] CAF ` DAK  pKýÿLD S I k$  KýÿLD V F kD ÐKýÿLD S I kd LýÿLD S I k„ 0LýÿLD S I k¤ `LýÿLD S I kÄ LýÿLD S I kä ÀLýÿLD S I k ðLýÿLD V F k$ MýÿLD V F kD PMýÿLD V F kd €MýÿLD V F k„ °MýÿLD V F k¤ àMýÿLD V F kÄ NýÿLD V F k4ä @NýÿºA†AƒG0] CAF ` DAK ÈNýÿLD S I k<øNýÿLD S I k\(OýÿLD S I k|XOýÿLD S I kœˆOýÿLD S I k¼¸OýÿLD S I k4ÜèOýÿ§A†AƒG0] CAF Z DAA `PýÿDD P D k4PýÿLD Y C kTÀPýÿLD Y C kTt0 ýÿCBBŽE B(ŒD0†A8ƒDPwXB`vXAPq8D0A(B BBBL̘PýÿCBBŽE B(ŒD0†A8ƒK€  8A0A(B BBBA L˜SýÿãBŽBB ŒA(†D0ƒG@u 0A(A BBBA {HHPfHA@Ll8Uýÿ4BŽBB ŒA(†D0ƒG@y 0A(A BBBE SHHPfHA@¬¼(WýÿêBŽBB ŒA(†D0ƒG  0A(A BBBI “¨H°f¨A ¶¨I°f¨G r¨I°f¨A U¨I°g¨G P¨I°g¨F P¨I°f¨G „lh^ýÿ BŽBB ŒA(†D0ƒG€æ 0A(A BBBH \ˆOfˆA€žˆIfˆA€UˆIfˆG€PˆIgˆG€\ôðcýÿBŽBB ŒA(†D0ƒGP? 0A(A BBBG KXH`fXAPöXI`fXAPÄT fýÿ# BBŽG B(ŒA0†A8ƒMÀn 8A0A(B BBBD [ÈHÐfÈAÀ¦ÈIÐfÈGÀÄÈIÐfÈAÀUÈIÐgÈGÀPÈIÐgÈFÀPÈIÐfÈGÀPÈIÐgÈGÀÔqýÿˆ BBŽG B(ŒA0†A8ƒMàr 8A0A(B BBBH kèHðfèAàèIðfèGàèIðfèAàxèIðgèGàPèIðgèFàPèIðfèGàPèIðgèGàPèIðgèFàôÀ}ýÿ0BBŽG B(ŒA0†A8ƒM€‰ 8A0A(B BBBA ˆHfˆA€¤ˆIfˆA€UˆIfˆG€åˆIgˆG€PˆIgˆF€PˆIfˆG€PˆIgˆG€PˆIgˆF€PˆIfˆF€PˆIfˆA€UˆIfˆG€LüèŒýÿÃBŒA†A ƒD0P  AABD D  CABF N AABLLhýÿ4BŽBB ŒA(†D0ƒG@y 0A(A BBBE SHHPfHA@tœXýÿ BBŽB B(ŒA0†A8ƒD@— 8A0A(B BBBA o 8A0A(B BBBG K8A0A(B BBB4ðýÿAƒD P AJ X AG p CE ,LÈýÿÁAƒD { AG p CE t|h‘ýÿšBBŽB B(ŒD0†A8ƒGpÜ 8A0A(B BBBF KxH€fxAp÷xI€fxAp¥xI€fxGptô—ýÿOBBŽB B(ŒD0†A8ƒGpÍ 8A0A(B BBBE [xH€fxAp÷xI€fxAp¥xI€fxGpLlhýÿ¿BBŽB B(ŒA0†A8ƒIP 8A0A(B BBBA L¼Ø ýÿ¿BBŽB B(ŒA0†A8ƒIP 8A0A(B BBBA „ H¤ýÿfBBŽB B(ŒD0†A8ƒG’ 8A0A(B BBBH [˜H f˜AÒ˜I f˜A—˜I f˜GL”0³ýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \äð·ýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LDÀºýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \”€¿ýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LôPÂýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \DÇýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`L¤àÉýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \ô Îýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LTpÑýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \¤0Öýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LÙýÿöBBŽB B(ŒA0†A8ƒGPg 8C0A(B BBBD \T°Ýýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`L´€àýÿöBBŽB B(ŒA0†A8ƒGPg 8C0A(B BBBD \0åýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LdèýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \´Àìýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LïýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \dPôýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LÄ ÷ýÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \àûýÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`Lt°þýÿöBBŽB B(ŒA0†A8ƒGPg 8C0A(B BBBD \Ä`þÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`L$ 0þÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \t ð þÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`LÔ À þÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \$!€þÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`L„!PþÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \Ô!þÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`L4"àþÿBBŽB B(ŒA0†A8ƒGPj 8C0A(B BBBI \„" !þÿ!BŽBB ŒA(†D0ƒG`ß 0A(A BBBG ShHpfhA``hIpfhA`|ä"p$þÿÍBBŽB B(ŒA0†A8ƒG`n 8A0A(B BBBG O 8A0A(B BBBG ‹ 8C0A(B BBBA ld#À)þÿBŽBB ŒA(†D0ƒGp 0A(A BBBG kxH€fxAp™xI€fxAplxI€fxGp|Ô#p-þÿ½BBŽB B(ŒA0†A8ƒG`a 8A0A(B BBBD O 8A0A(B BBBG ‹ 8C0A(B BBBA lT$°2þÿBŽBB ŒA(†D0ƒGp 0A(A BBBG kxH€fxAp™xI€fxAplxI€fxGpLÄ$`6þÿBBŽB B(ŒA0†A8ƒG`w 8A0A(B BBBF l%0<þÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpL„%à?þÿ BBŽB B(ŒA0†A8ƒGpC 8E0A(B BBBF lÔ% JþÿËBŽBE ŒA(†A0ƒGP} 0A(A BBBI [XH`fXAP%XI`fXAPCXI`fXGPLD&€Lþÿ BBŽB B(ŒA0†A8ƒGpC 8E0A(B BBBF l”&ÀVþÿËBŽBE ŒA(†A0ƒGP} 0A(A BBBI [XH`fXAP%XI`fXAPCXI`fXGPd' Yþÿ½BBŽB B(ŒA0†A8ƒG` 8A0A(B BBBF ¯ 8A0E(B BBBK ll'xaþÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpLÜ'(eþÿcBBŽE B(ŒD0†A8ƒG`> 8D0A(B BBBF l,(HvþÿËBŽBE ŒA(†A0ƒGPx 0A(A BBBF [XH`fXAP-XI`fXAPCXI`fXGPLœ(¨xþÿ™ BBŽB B(ŒA0†A8ƒGM 8A0A(B BBBH lì(ø…þÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpL\)¨‰þÿè BBŽB B(ŒA0†A8ƒGm 8A0A(B BBBH l¬)H—þÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpL*øšþÿ,BBŽB B(ŒA0†A8ƒGd 8A0A(B BBBA ll*بþÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpLÜ*ˆ¬þÿA BBŽB B(ŒA0†A8ƒG€c 8A0A(B BBBB l,+ˆ¹þÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpLœ+8½þÿBBŽB B(ŒA0†A8ƒG\ 8A0A(B BBBI lì+èËþÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpL\,˜ÏþÿKBBŽB B(ŒA0†A8ƒGd 8A0A(B BBBA l¬,˜ÞþÿBŽBB ŒA(†D0ƒGp$ 0A(A BBBB kxH€fxAp™xI€fxAplxI€fxGpL-Hâþÿ BBŽE B(ŒA0†A8ƒGpÏ 8D0A(B BBBH ll-ÈíþÿËBŽBE ŒA(†A0ƒGPx 0A(A BBBF [XH`fXAP-XI`fXAPCXI`fXGPLÜ-(ðþÿ BBŽE B(ŒA0†A8ƒGpÏ 8D0A(B BBBH l,.¨ûþÿËBŽBE ŒA(†A0ƒGPx 0A(A BBBF [XH`fXAP-XI`fXAPCXI`fXGP|œ.þþÿ]BBŽB B(ŒA0†A8ƒG¢˜H f˜Aw 8A0A(B BBBE ˜I f˜Aƒ˜I f˜G|/èÿÿyBBŽB B(ŒA0†A8ƒG²˜H f˜Aw 8A0A(B BBBE ˜I f˜Aƒ˜I f˜GÔœ/è-ÿÿ0BBŽG B(ŒA0†A8ƒMþ 8A0A(B BBBD ƒ˜H f˜AN˜I f˜Gè˜I f˜AјI g˜GP˜I g˜Fž˜I f˜GP˜I g˜GP˜I g˜F|t0@Aÿÿq*BBŽB B(ŒA0†A8ƒG Â¨H°f¨A w 8A0A(B BBBE !¨I°f¨A ˆ¨I°f¨G |ô0@kÿÿt*BBŽB B(ŒA0†A8ƒG Â¨H°f¨A w 8A0A(B BBBE !¨I°f¨A ˆ¨I°f¨G <t1@•ÿÿXBBŒH †A(ƒW   (A ABBD TÐS¢¬¼Þ 0N X m#m#õþÿoð8 h  p#@ðHP 5 þÿÿoÿÿÿoðÿÿoBùÿÿo m#fNvN†N–N¦N¶NÆNÖNæNöNOO&O6OFOVOfOvO†O–O¦O¶OÆOÖOæOöOPP&P6PFPVPfPvP†P–P¦P¶PÆPÖPæPöPQQ&Q6QFQVQfQvQ†Q–Q¦Q¶QÆQÖQàq#(x2, y2, z2) denotes point to skew (x1, y1, z1) toreturns the distance to the frustum, but not including the end plate if inside (and including the end plate if outside)returns the distance to the cylinder, but not including the end plate if inside (and including the end plate if outside)(px, py, pz) -- a point; (nx, ny, nz) -- the normal vectorAt least one Cone radius must be positiveCylinder(%g, %g, %g, %g, %g, %g, %g; clips=%r)Cone(%g, %g, %g, %g, %g, %g, %g, %g; clips=%r)SphereCone(%g, %g, %g, %g, %g, %g, %g, %g)neuron.rxd.rxdExceptionSphere(%g, %g, %g, %g; clips=%r)Cylinder(%g, %g, %g, %g, %g, %g, %g)Cone(%g, %g, %g, %g, %g, %g, %g, %g)Plane(%g, %g, %g, %g, %g, %g)neighbor_regionsstarting_pointsSphere(%g, %g, %g, %g)Intersection(%r)RxDExceptionComplement(%r)within_corebisect_left__pyx_vtable__primitivesoverlaps_zoverlaps_yoverlaps_x_distanceneighborsdistanceobjectsUnion(%r)__import__bisect__test____main__sumobjzsz2z1z0ysy2y1y0xsx2x1x0r1r0pzpypxnznynxlohizyxr@ª#8ª#(ª#È©# ©#x©#pª#@ª#8ª#(ª#È©# ©#x©#hª#@ª#8ª#(ª#È©# ©#x©#hª#è©#À©#˜©#È©# ©#x©#@ª#8ª#(ª#ˆª#€ª#xª#è©#À©#˜©#È©# ©#x©#°ª#Àª#°ª#Àª#°ª#Àª#è©#À©#˜©# ª#˜ª# ª#@ª#8ª#(ª#È©# ©#x©#@ª#8ª#(ª#@ª#8ª#(ª#°ª#Àª#°ª#Àª#°ª#Àª#à©#¸©#©#Ø©#°©#ˆ©# ª#È©# ©#x©#@ª#8ª#(ª#°ª#Àª#°ª#Àª#°ª#Àª#à©#¸©#©#ª#Ø©#°©#ˆ©#ª#@ª#8ª#(ª#È©# ©#x©#@ª#8ª#(ª#@ª#8ª#(ª#°ª#Àª#°ª#Àª#°ª#Àª#à©#¸©#©#ª#Ø©#°©#ˆ©#ª#È©# ©#x©#@ª#8ª#(ª#°ª#Àª#°ª#Àª#°ª#Àª#à©#¸©#©#ª#Ø©#°©#ˆ©#ª#Щ#¨©#€©#H«#Às#*@«#(v#8«#`u#%0«#@t#/(«# u#% «#t#/«#v#«#u#«#v# «#€t#+øª#àu#ðª#àt#!èª#àv# àª#ûv#ت#Hv# Ъ#Èv# Ȫ#¨v# Àª#hw#¸ª#ðv# °ª#ew#¨ª#w#  ª#°u#˜ª#¸v# ª#°t#ˆª#bw#€ª#_w#xª#\w#pª#%w#hª#Øv#`ª#˜v# Xª#ˆv# Pª#xv# Hª#hv# @ª#Yw#8ª#Vw#0ª#Xv#(ª#Sw# ª#qw#ª#Pw#ª#Mw#ª#Ðu#ª#!w#ø©#w# ð©#8v# è©#ow#à©#Jw#Ø©#Gw#Щ#Dw#È©#Aw#À©#mw#¸©#>w#°©#;w#¨©#8w# ©#5w#˜©#kw#©#2w#ˆ©#/w#€©#,w#x©#)w#Ø+ðÐWû&ÀŠ#€‰#ÇpXì pˆð  ˆô Їø €‡ü 0‡ à† €b Àˆè  ñC 0¾ @P À?+ H,à[iûE&€† W#@#Ð’ÀXì ðŠð  Šô PŠø Šü °‰ `‰ Pf àe pe$ e( d,  d0 °c4 @c8 ‰ àbC @‹ T6 p‚L Àfè §C @B  -@r#  '  + à@,ø€\€rûE&°VÐV`“#“#p¹0Y  rC Œ pTè PzC  `  + °`x,àÀ\ÐxûE& †VÀ˜#–#@®Yì  ‘ð Ðô €ø 0ü à 8 @ ðŽ  Ž PŽ$ Ž( °, `0 4 ÀŒ Pw PTC p‘L °wÚ 0«6 PŒè €ÑC @öB 0äàr# 0q py+ ðh°,p`]pûE&U°U #à›# ¥Z ì À“ð p“ô  “ø Ð’ü €’ 0’C è ða P/ €7+ pXC ” @Tà,XàWƒû&  #ÀŸ#0`Z À”C –è ÀÓ-  ]•ûE& U@U€¢# ¢#ذZ  êC  ²è  _H- à]`•ûE&°TÐTà¤#€¤#ðš[ àíC @¥è €Px-ðWPÛû&@§#à¦#™p[ `ÜC 0Ýè ÐãGCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609<@T¶ðQC’o(‚:‚À¯QsjNØ;¢• +È_§•"+ß­intí ƒl²d„l:^gN¬l£)+Õ~0µÑ~Øñ2þSòe©™÷}øqeù=hú €6û(zü0;{ý8æeþ@ ¤@H ^™P DXX á„z` Ç)€h Üep Y¡ et ožsx –I€ ˜¯W‚ †ƒ «–ˆ sž!~ ƒ)˜ –D*  ƒ+¨ ƒ,° ƒ.0¸ Úg/eÀ 61œÄ £B ‰ ,–qlœzJz0Xž€ê„¢eIµ £– ‰B £¬ ‰² £iNf’è • £à ‰P&H÷Å£6XªÕYЉÄ/‡BPŽ6 ­% ? Ó/ Iq !Ÿ)'A–²3D¤d¿¡k ¥¤oØz¢„ZBë+>“n&«b›>½. W5!„ž"ÓR#Y=$TŒ%¼r&”'Œ©(Í )² *Æ+¢0,Ïc-°.¾$/»)0Í–1wP23Q˜49–5ú6¸’7‹@8¦£9å:;´‹<Ñ?<Û=æ:>N’?›]@svAFB#SCD¿>EëqF^uGWHñ[I}J‘€KÉ LO?MUžN¸bO»¦P_8Q(RM2Sê¦T“hUê¢VºiW©1XbrYå2Zq~[÷‚\á|]Ó|^äz_Ír`sAa6b6c6dÅ™eÃfP¥g†hmiRj¾wkV£lQ)m€]no¸pjq6‚r)s+Tt+~uÏ.vö•wŒ x‡yžzŠ«{Rt|l}ZC~v\w€A¦Ä‚Ÿoƒ#Q„¯z…†‘‡•ˆÊ‰R0ŠÄ”‹†0Œµ gŽŸjëg‘[(’M¢“9”®©•1=–ý:—°>˜:0™pšÿ¯› ¢œôÛ0žvŸÉp ¡‚D¢†S£d~¤9~¥rj¦œS§³v¨Sy©u0ªËm«R¦¬R*­Aa®¾¯è°Ó¬±ÃY²*“³©´lµÇ“¶j ·ㇸ˜˜¹C!ºôz»U_¼#ƒ½Ýp¾Œ‚¿i?ÀhÁ> ÂÓ¦ÃΠÄR–Å[Æ·sǺ¯ëA<ì5Ÿí61îç1ïðÅ%ñÝ?òþUóIôþ˜õïFö[÷N‚ø>ž··Vnßœ7.·±9eth:e .Jj^äk÷Skû úˆDû äE÷ SEû  O5E÷ [F¬ Ó¯G÷ Ï G÷( ‹Kp0 ”•L8 7M¾@ ä)NðH O'P >P3X ªsT` ]Uh ®hV$p ¦€Z?x i$[“ € &\3ˆ Tf]ä å‹^˜ Ž]a*  ¼£dl¨ —vf¬° [!j㸠J1m½ À Àq`È ïtt÷Ð ƒ‘x‹Ø ·y—à àg|mè A‡}xð «Ž~ÇøS“û -6€h $‘£w¬‚¯c.ƒ÷ 5„»(F…ò0T†Ç8}‡S@ùˆ½ H‰h PLhŠh Xd‹h `õ‰Œh h"{h p¼YŽpx¢‚‘P€^Jl9nË= äo÷Soû O5o÷Å‹p gl…S Y h h h  w8†y  h “ h h 3'‡ž ¤ h ½ h h h AqˆÈ Î eÝ h ì‰è î ÷ý h !eŠ  e" " " h 93 9 h M h ÷9ŽX ^ h w h ÷÷Z¨‘‚ ˆ e¡ h ÷h U¨’¬ ² eÐ h ÷÷h A5“Û á eú h h h _  ÷0 h ÷ú Kž ghŸF L ÷` h ` ÷| q w ÷ h ÷ ]{`¤-buf¥obj¦h len§÷Ò ¨÷Žvªe Ö€«e$`l¬(€­` 0ª’®` 8 c¯` @"¦°-Hfš²X ÷= ‰ç¬³ ŠƒµSYerh re=–¶ƒ‰™h rƱפªe¾h h àØÉÏeãh $pÙîôe h ¾8Ûrän -¦ån ©Œæn 6Içn «èn _±én (&ê“ 0ÈJëH 8°|ìH @ò˜íH H_<î½ P\qïH Xzðn `[“ñn hù"òn phJón x2lôn €Õ­õý ˆÊ«öH –÷H ˜SnøH  9?ùH ¨Ä€úH °@?ün ¸à¯ýn Àñþn È?Vÿn Ð h–n Ø œŠ“ à Ón è ážn ð :_n ø—‰n Ó›n o n QŽ n 6’ n V n (·H 0 PWž OÝ Å n  & (  ó(  {žM úw ( ¡ 0 [)™8 šn @ h( HW!§¯ß <ˆ"Ý ç0#n  Ï+$Ð ©¯%ª0'mœG Œ,( Á)0  Ct*;  7F+f  ™:,H n•-x(oœ.ëñ‹1_epQV2|‚h ŽN3™Ÿe¸h ¸eª}4ÊÐh äh žv5y 76üeh h  7Û +8¤QB9S ô|:KQl`h +;lrh ‹h h e;<S #«=S Ž>>ž C=?Û  @Û ½vAÓÙh òû h h `fBþh û ÷žßGq/ %mr &¬ v 'düS (eÇq *¬0øs£ ( ÇЂ get 9set ^doc ;[  ~–'›^Ls Ç:ä ÷S û *9 lÉ: à C[Mä ÷S û ל )E[ ( #÷m­ä $÷S $û O5 $÷/ %lz &e  '†$ùm 1X _õä÷Sû O5÷V%õ h  ‰a ¸(M‹Yä÷Sû O5÷V%" ²£&÷ O‹'\V y q/ ,0o( QSNÉä R÷S Rû N“ Sz«d Th g) Uh UN V€0Õ:)ä ÷S û Aš!h ªd"h a˜#h hV$h (×:%Ôð‚€3ä÷Sû O5÷t†3ÿkœ* 2¢h ( ”h 0üŽh 8~" @n" HWh P²ˆ%h XÎ)%h `IU%h hòe'¤p¾=(exfq.e|Ê›/e€4a0%+„7%1õx43´•?eÉ2CeÅ2De k\F<(¿‚G<0£ŸHh 8­fIh @€Kh HF Lh PZDMh X´ˆOh `Ð)Ph hKUQh p©hSh xl[e€&%]e„´$_h ˆ*—`l•dbe˜¾šch   ô±%)-GMekh 3eh 1ˆg Pˆô@™Ô&5ö@‰|q€ \ˆä ÷S û û e£! eïSe˜Neœ@h ”h («‹h 0«h 8a4h @Q°h Hz&h P¯Eh Xe`˜«h h¦:pçh x^ˆª( ^0ý p " s  n ý ?Z ¬ ²² ±²! V²" ÷`0š!”#Ö6 ä×÷ S×û !y\ âx äã÷ Sãû  ì†ä  Qåh !cŒÐ  a Ѥ' CŠÒÍ'x!'œ ðè äñ÷ Sñû  ì†ò Qóh !zß a àü' CŠá%(è!BXþ« äÿ÷ Sÿû  ì†Ó d) mul) nx)( ny)0 nz)8 px)@ py)H pz)P!5QîÓ a ïT( CŠð}(«!Ãp• ä÷ Sû  ì†× x) y) z)( r)0 Y™)8 ÷Ž)@ «)H S)P • )X µ°)` ͬ h h!*e ý× a þ¬( ZÿÐ( N¡Ð( F)Ð(•!²@à+I! ä,÷ S,û  ì†-¥! cx.) cy/) cz0)( r1)0 rr2)8 ¶"3)@ Ä"4)H Ò"5)P x06)X y07)` z08)h x19)p y1:)x z1;)€ h<)ˆ ?ˆ=) Y™>)˜ ÷Ž?)  «@)¨ SA)° • B)¸ µ°C)À 'UDh È Í¬Eh Ð ¶“Fh Ø!0¥! V|ÿ( a () iv() ZL) N¡L) F)L)(I!!.+øQB# äR÷ SRû  ì†S„# x0T) y0U) z0V)( r0W)0 x1X)8 y1Y)@ z1Z)H r1[)P rra\)X rrb])` ¶"^)h Ä"_)p Ò"`)x ƒ£a)€ 5b)ˆ 5c) ?ˆd)˜ Y™e)  ÷Žf)¨ «g)° Sh)¸ • i)À µ°j)È hak)Ð hbl)Ø hram)à hrbn)è ͬoh ð! !„# a "{) Z#Ÿ) N¡$Ÿ) F)%Ÿ)B#Ñ£zH% ä{÷ S{û  ì†|¤% x0}) y0~) z0)( r0€)0 x1)8 y1‚)@ z1ƒ)H r1„)P rra…)X rrb†)` ¶"‡)h Ä"ˆ)p Ò"‰)x ƒ£Š)€ 5‹)ˆ 5Œ) ?ˆ)˜ Y™Ž)  ÷Ž)¨ «)° S‘)¸ • ’)À µ°“)È cx”)Ð cy•)Ø cz–)à h—)è 'U˜h ð ͬ™h ø¶“šh &›e!á 02¤% V|3Î) a 4÷) iv5÷) Z6* N¡7* F)8*(H%!ô0ð¦3' ä§÷ S§û  솨u' x0©) y0ª) z0«)( r0¬)0 x1­)8 y1®)@ z1¯)H r1°)P rra±)X rrb²)` ¶"³)h Ä"´)p Ò"µ)x ƒ£¶)€ 5·)ˆ 5¸) ?ˆ¹)˜ Y™º)  ÷Ž»)¨ «¼)° S½)¸ • ¾)À µ°¿)È sxÀ)Ð syÁ)Ø szÂ)à :Ã)è!D¯ Eu' a FJ* ZGn* N¡Hn* F)In*3')ž'ž'h h h e6{'h Í'ž'h h h eª')ö'ö'h h h e¦Ó'h %(ö'h h h e()N(N()))e+(h }(N(h h h eZ()¦(¦()))eÙƒ(eÐ(¦())e²(h ù(ù()))eÝÖ()()ù()))e)eL)ù())e.))u)u))))e«!R)eŸ)u)))e)h È)È))))eŠ#¥))÷)È))))eÔ)e*È)))eý))D*D*)))eª%!*en*D*))eP*á8lœ* O/âe Fãœ*:lät*!29åã* ½„æe ¹„çe * èã*¢*  Ë +T e…T e9¦ eÍ é* +5+ ‰‘24"­§€ev+#é•€ž'#=¢€h $ 3e"û+Ì e¬+#é•Ì ö'#=¢Ì h $ 3Í e"8Lh Þ+#é•L¦(%ñaf$ 3Mh "Maah ,#é•aù(%ña{$ 3bh "º°s*h B,#é•s*u)%ña*$ 3t*h ">SC:h t,#é•C:È)%ña]:$ 3D:h "m”Pe¸,&o”Ph &v”P¾&a”P'e•Pe'p–Pù("(ëQeü,&oëQh &vëQ¾&aëQ'eìQe'píQÈ)( TbU.-#ЂbU¬&objbUh #VbU"Ɔ·Th X-#Ђ·Th $nW¸Th (rU•-#VU" #Ô)U" &tbU" $ôeU¤(·g›U'.#Ђ›U¬#G›Ue#hqœUe#}&œU¬#DUe#²’Ue$Ñ«žUh $§*žUh $¾ žUh 'ctxŸUh $~ ¡U™"'‡YeO.&x‡Yh $qNˆYe(i=ÑU”.#VÑUh #Ô)ÑUh &tbÑUh #CUÒUh %IžûU"QXgUeâ.&objgUh #VgU#ÓgUe#ЂhU¬#›EhUe(1s6UD/#Ë‚7U¬#›E8Ue#½29U÷#ö:U÷#;U÷$V=U÷$YU>U¬"—FFh n/#é•Fh $ 3Fh "ïAöEh Ø/#é•öED*%ña F%õMF$ 3÷Eh $Ú~ùEh $@IúEe$¹_ûE¬$AüEe"·EëEh 0#é•ëEh $ 3ìEh "`zÇEh l0#é•ÇED*%ñaÛE%õM×E$ 3ÈEh $Ú~ÊEh $@IËEe$¹_ÌE¬$AÍEe"h{¼Eh –0#镼Eh $ 3½Eh "ÎX˜Eh 1#镘ED*%ña¬E%õM¨E$ 3™Eh $Ú~›Eh $@IœEe$¹_E¬$AžEe"½Eh *1#é•Eh $ 3ŽEh "JiEh ”1#é•iED*%ña}E%õMyE$ 3jEh $Ú~lEh $@ImEe$¹_nE¬$AoEe"’¢^Eh ¾1#é•^Eh $ 3_Eh "Û :Eh (2#é•:ED*%ñaNE%õMJE$ 3;Eh $Ú~=Eh $@I>Ee$¹_?E¬$A@Ee"b3/Eh R2#é•/Eh $ 30Eh "\ Eh ¼2#é• ED*%ñaE%õME$ 3 Eh $Ú~Eh $@IEe$¹_E¬$AEe"Eh æ2#é•Eh $ 3Eh "_’WFh P3#é•WFD*%ña{F%õMwF$ 3XFh $Ú~ZFh $@I[Fe$¹_\F¬$A]Fe"!7h z3#é•!7h $ 3"7h "×”í6h ä3#é•í6È)%ña7%õM 7$ 3î6h $Ú~ð6h $@Iñ6e$¹_ò6¬$Aó6e"H9â6h 4#é•â6h $ 3ã6h "b˜6h 84#镘6h $ 3™6h "’CN6h b4#é•N6h $ 3O6h "•Z6h Œ4#é•6h $ 36h "b¦º5h ¶4#镺5h $ 3»5h "í>p5h à4#é•p5h $ 3q5h "J'&5h  5#é•&5h $ 3'5h "¦9Ü4h 45#é•Ü4h $ 3Ý4h "•ž’4h ^5#é•’4h $ 3“4h "ók3h È5#é•k3È)%ña3%õM{3$ 3l3h $Ú~n3h $@Io3e$¹_p3¬$Aq3e"‚j`3h ò5#é•`3h $ 3a3h "n<3h \6#é•<3È)%õML3%ñaP3$ 3=3h $Ú~?3h $@I@3e$¹_A3¬$AB3e"413h †6#é•13h $ 323h "ªM 3h ð6#é• 3È)%ña!3%õM3$ 33h $Ú~3h $@I3e$¹_3¬$A3e"rw3h 7#é•3h $ 33h "®!Þ2h „7#é•Þ2È)%ñaò2%õMî2$ 3ß2h $Ú~á2h $@Iâ2e$¹_ã2¬$Aä2e"*ªÓ2h ®7#é•Ó2h $ 3Ô2h "ǯ2h 8#镯2È)%ñaÃ2%õM¿2$ 3°2h $Ú~²2h $@I³2e$¹_´2¬$Aµ2e" ¤2h B8#镤2h $ 3¥2h "i5€2h ¬8#é•€2È)%ña”2%õM2$ 32h $Ú~ƒ2h $@I„2e$¹_…2¬$A†2e"H"u2h Ö8#é•u2h $ 3v2h "·k:h L9#é•:È)#Ŭ:h %ña(:%õM$:$ 3:h $Ú~:h $@I:e$¹_:¬$A:e"j<y)h v9#é•y)h $ 3z)h "ì0*h ì9#é•0*u)#Ŭ0*h %ñaX*%õMT*$ 31*h $Ú~3*h $@I4*e$¹_5*¬$A6*e"™a$h :#é•$h $ 3%h "eðh €:#é•ðù(%ña%õM$ 3ñh $Ú~óh $@Iôe$¹_õ¬$Aöe"‹‘åh ª:#é•åh $ 3æh "E±h ;#镱ù(%ñaÕ%õMÑ$ 3²h $Ú~´h $@Iµe$¹_¶¬$A·e"¡[¦h >;#镦h $ 3§h "V¤rh ¨;#é•rù(%ña–%õM’$ 3sh $Ú~uh $@Ive$¹_w¬$Axe"ªgh Ò;#é•gh $ 3hh "²ƒ3h <<#é•3ù(%ñaW%õMS$ 34h $Ú~6h $@I7e$¹_8¬$A9e"Ö$(h f<#é•(h $ 3)h "ôh Ð<#é•ôù(%ña%õM$ 3õh $Ú~÷h $@Iøe$¹_ù¬$Aúe"wVéh ú<#é•éh $ 3êh "4—µh d=#镵ù(%ñaÙ%õMÕ$ 3¶h $Ú~¸h $@I¹e$¹_º¬$A»e"¼dªh Ž=#镪h $ 3«h "ù!vh ø=#é•vù(%õM–%ñaš$ 3wh $Ú~yh $@Ize$¹_{¬$A|e"ïOkh ">#é•kh $ 3lh ";ƒ7h Œ>#é•7ù(%ña[%õMW$ 38h $Ú~:h $@I;e$¹_<¬$A=e"§,h ¶>#é•,h $ 3-h " „øh  ?#镸ù(%ña%õM$ 3ùh $Ú~ûh $@Iüe$¹_ý¬$Aþe"G§íh J?#é•íh $ 3îh "­7,h ´?#é•,ù(%ña@%õM<$ 3-h $Ú~/h $@I0e$¹_1¬$A2e"f!h Þ?#é•!h $ 3"h "| ýh H@#é•ýù(%ña%õM $ 3þh $Ú~h $@Ie$¹_¬$Ae"øGòh r@#é•òh $ 3óh "ošÎh Ü@#é•Îù(%ñaâ%õMÞ$ 3Ïh $Ú~Ñh $@IÒe$¹_Ó¬$AÔe"}–Ãh A#é•Ãh $ 3Äh "…Ÿh pA#镟ù(%ña³%õM¯$ 3 h $Ú~¢h $@I£e$¹_¤¬$A¥e"vª”h šA#é•”h $ 3•h "±ph B#é•pù(%ña„%õM€$ 3qh $Ú~sh $@Ite$¹_u¬$Ave"eh .B#é•eh $ 3fh "•Ah ˜B#é•Aù(%ñaU%õMQ$ 3Bh $Ú~Dh $@IEe$¹_F¬$AGe"76h ÂB#é•6h $ 37h "¸\] h DC#é•] ù(#1t] h #Ô>] h %ña• %õM‘ $ 3^ h $Ú~` h $@Ia e$¹_b ¬$Ac e"q.–h ºC#é•–ù(#Ŭ–h %ña¾%õMº$ 3—h $Ú~™h $@Iše$¹_›¬$Aœe" æh $D#长¦(%ñaú%õMö$ 3çh $Ú~éh $@Iêe$¹_ë¬$Aìe"+Ûh ND#é•Ûh $ 3Üh "Œ·h ¸D#é•·¦(%ñaË%õMÇ$ 3¸h $Ú~ºh $@I»e$¹_¼¬$A½e"W¬h âD#镬h $ 3­h "#kˆh LE#镈¦(%ñaœ%õM˜$ 3‰h $Ú~‹h $@IŒe$¹_¬$AŽe"âQ}h vE#é•}h $ 3~h "Ó¡Yh àE#é•Y¦(%ñam%õMi$ 3Zh $Ú~\h $@I]e$¹_^¬$A_e"Z Nh  F#é•Nh $ 3Oh "-*h tF#é•*¦(%õM:%ña>$ 3+h $Ú~-h $@I.e$¹_/¬$A0e"b|h žF#é•h $ 3 h "•Qûh G#é•û¦(%ña%õM $ 3üh $Ú~þh $@Iÿe$¹_¬$Ae"é­ðh 2G#é•ðh $ 3ñh "u`gh \G#é•gh $ 3hh "$ h ÒG#é• ¦(#Ŭ h %õM-%ña1$ 3 h $Ú~ h $@I e$¹_¬$Ae"ù1Âh  h ":µh ÞJ#镵ž'%ñaÙ%õMÕ$ 3¶h $Ú~¸h $@I¹e$¹_º¬$A»e"`Lh K#é•h $ 3h "R~˜Se"K%õM›S"ÝPUh oK#DšPUh &argPUh &kwPUh $nWQUh $l$RU“ "‚ÑTeeL#y›ÒTh #ŸgÓTeL#b:ÔTh #£ÕT" #$sÖT÷#”0×T¬*bad2U%Ð1"U%‘)U%û%U'keyÙTh $Ô)ÙTh 'posÚT÷$ЂÛTeL$ü7ÜTeL+6L$7ñTeL+HL'cmpÿTe)$7 UeL)'cmpUe" "7¤Vh ÿL#ЂVh # «Vh #;¦Ve*badÁV$—‚Vh $i)ƒVh $¢h„Vh $C‚…Vh $«†Vh $Ú)ˆVh )$ûeµVh "õ§(YeM&t(YM,¸fAh @T œ¸M-é•Ah U-©>Ah T. 3Bh /¬+@TE0½+U1@T2É+HT3Ñ+9,*”Vh PTœON-é•Vh U-©>Vh T. 3Wh ]/Þ+PT Z0ï+U1PT 2û+[T3,–,Û’h*h pTœæN-é•h*h U-©>h*h T. 3i*h º/,pT l*0!,U1pT 2-,{T35,ó,ÆŸ8:h Tœ}O-é•8:h U-©>8:h T. 39:h /B,T <:0S,U1T 2_,›T3g,P,pk§Ne°Tœ÷O4o§Nh t4v§N¾­4a§N'e¨Ne5p©Nž'k6ÁTóT7TóQ8*•°NeÐTEœFP4o°Nh ¤5tmp±Nh Ý5p²Nž',v”Oe UœÀP4oOh L4vO¾…4aO÷'eOe5p Oö'C61UóT7TóQ8ªI'Oe@UEœQ4o'Oh |5tmp(Oh µ5p)Oö'ë, öOeUœ‰Q4oöOh $4vöO¾]4aöOÏ'e÷Oe5pøO¦(6¡UóT7TóQ8b*ÿOe°UEœØQ4oÿOh T5tmpPh 5pP¦(Ã8Ñs£PeV©œ'R4o£Ph ü5tmp¤Ph [5p¥Pù(Ê,†PkQe°Vœ¡R4okQh )4vkQ¾b4akQÔ'elQe5pmQu) 6ÄVóT7TóQ8ø;tQeÐVEœðR4otQh Y 5tmpuQh ’ 5pvQu)È 8HHúQe W©œ?S4oúQh  5tmpûQh ` 5püQÈ)Ï 9Ëw´RÐW œ}S4o´Rh . :ÚW7UóU,{Q×VeXpœüS-* ×Vã*U;½„×Veg -O/×VeQ.aØVe³ 5midØVeþ 5endØVep ,êN¦Rh pXHœŽT4t¦RÎ 4a¦Rh 0 4k¦Rh ’ 5p§RD*ô 5o¨Rh <…X~T7UóU7T0=¶X7Q0,®SÌQh ÀXhœ U4tÌQM4aÌQh ¯4kÌQh 5pÍQÈ)s5oÎQh –<ÕXU7UóU7T0=&Y7Q0,ÑšPQh 0YXœ²U4tPQÌ4aPQh .4kPQh 5pQQu)ò5oRQh „[üX7UóU7T0:¡[7Q0" œh AY&objh #h 'tpŽ? Y°[,œ¸Y@Yì@)Yw35Y>Â[“Y7UóU7TóT>×[ªY7TóT#$AÜ[BàlÝQà[™œvZ4oÝQh `5pÞQÈ)ÒC Z.)=åQh DC0&Z.)=æQh zD/\LZ.)=çQh °Eé[+dZ7Us:X\7UóUBL‡_Q€\>œ[4o_Qh Ó5p`Qu)2D•\ÖZ.)=gQh ‘E‰\+îZ7Us:¾\7UóUBSІPÀ\™œ¾[4o†Ph ´5p‡Pù(&C`T[.)=ŽPh ˜Cn[.)=Ph ÎD]”[.)=Ph EÉ\+¬[7Us:8]7UóUBTêO`]8œH\4oêOh '5pëO¦(†Dr]\.)=òOh åEi]+6\7Us:˜]7UóUBMIO ]8œÒ\4oOh  5pOö'g D²]¨\.)=Oh Æ E©]+À\7Us:Ø]7UóUBWO›Nà]8œ\]4o›Nh é 5pœNž'H!Dò]2].)=£Nh §!Eé]+J]7Us:^7UóU,[\pVe ^‘œ^;©hpVh Ê!;kipVh"*bad|V5obrVh ´"E5^7Ø]7UóT7T07Q0EO^Bö]7Uv7Qs<†^ ^7Us=¦^7Us";ìVœ*Q^#O/ìVe$FíVœ*'posîVe"É)Wœ*¿^#EE*W¬#t*We#«v+We#}&+W¬*badXW$„,Wœ*$+I-Wh $BE.Wh (?PúV'_#O/úVe#FúVœ*'posûVe'iûVe$* üVã*+_'tmpWœ*)$š}WeF¶y]WÀ^¿œWb;EE]W¬#;t]WeÔ#;«v^We…$;}&^W¬\%*badqW.„_Wœ*S&.î‚`WWbÖ&G^Þ^ÀaW`@,^n'HÀ38^¤'3D^Ç'I_}S7U~7T}7QGQ^Ø_ðdW8a@†^ê'@z^9(@n^p(@b^§(HðJ’^3š^/)3¦^ )3²^J*Eâ_M‚`7U‘¸E`Xº`7U ‡ 7T|7Q p 7RsE`MÔ`7U‘¸E.`Mì`7U|Ed`ca7U07T07Q07R0<*b&a7U}=:b7U~G¿^•`0fWb@Ø^â*@Ì^>+H03ä^­+3ð^ö+3ú^V,Dýa#¡a3 _ë,CÖa3_-I²an7U7T s $ &4$EÏ`}Súa7U7Ts7Q~IJby7U EW_„.b7T|7R0Ej_Fb7Us=[a7U|5+"7®%Fh Çb#é•%FD*%ñae7U1I2c'_7U Ð 7T 577Q ì7R X "¨x£6h ïe#é•£6È)%ñaÒ6%õMÍ6$ 3¤6h $Ú~¦6h $ä~§6h $@I¨6e$¹_©6¬$Aª6e,ó]=Rh @cgœg4o=Rh ÿ14x=Ra2K4Dc@>R@4Ã2H@3+4;3KyeDc@œ6@Še‡3H@2–e]c2že|c3¦e;3L²e3¾eÿ33Êe„43ÖeÒ43âe:5MXc¥Mrc¥I”c'_7U  7Q æ7R X "ÉyY6h ‹g#é•Y6È)%ñaˆ6%õMƒ6$ 3Z6h $Ú~\6h $ä~]6h $@I^6e$¹__6¬$A`6e,¨t9Rh °cgœ±h4o9Rh ™54x9Rû5K84´c€:R@I4]6H€3U4Õ6Kg´c€R6@&g!7H€22gÍc2:gìc3BgÕ6LNg3Zg™73fg83rgl83~gÔ8MÈc¥Mâc¥Id'_7U X 7Q ã7R X "w6h 'i#é•6È)%ña>6%õM96$ 36h $Ú~6h $ä~6h $@I6e$¹_6¬$A6e,˜W5Rh dgœMj4o5Rh 394x5R•9Kb4$dÀ6R@s4÷9HÀ34o:K±h$dÀ6@Âh»:HÀ2Îh=d2Öh\d3Þho:Lêh3öh3;3i¸;3i<3in<M8d¥MRd¥Itd'_7U ˜ 7Q à7R X ")†Å5h Ãj#é•Å5È)%ñaô5%õMï5$ 3Æ5h $Ú~È5h $ä~É5h $@IÊ5e$¹_Ë5¬$AÌ5e,¯n1Rh dgœék4o1Rh Í<4x1R/=KŒ4”d2R@4‘=H3©4 >KMj”d¾5@^jU>H2jj­d2rjÌd3zj >L†j3’jÍ>3žjR?3ªj ?3¶j@M¨d¥MÂd¥Iäd'_7U Ø 7Q Ü7R X "x{5h _l#é•{5È)%ñaª5%õM¥5$ 3|5h $Ú~~5h $ä~5h $@I€5e$¹_5¬$A‚5e,¬]-Rh egœ…m4o-Rh g@4x-RÉ@K¶4e@.R@Ç4+AH@3Ó4£AKéke@t5@úkïAH@2le2loýe2Fof3No×HLZo3fo›I3ro J3~onJ3ŠoÖJMøe¥Mf¥I4f'_7U ˜7Q Ò7R X "]…4h 3q#é•4È)%ñaÌ4%õMÇ4$ 3ž4h $Ú~ 4h $ä~¡4h $@I¢4e$¹_£4¬$A¤4e,hn!Rh PfgœYr4o!Rh 5K4x!R—KK45Tf"R@E5ùKH3Q5qLK½pTf–4@Îp½LH2Úpmf2âpŒf3êpqLLöp3q5M3qºM3qN3&qpNMhf¥M‚f¥I¤f'_7U Ø7Q Î7R X "Jl;h ór#é•l;È)%ñaØ;%õMÑ;$ 3m;h $Ú~o;e$ä~p;h $î~q;h $ø~r;h $Ñ0s;h $@It;e$¹_u;¬$Av;e,¡ea;h ÀfKœát;é•a;h ÏN;©>a;h vP. 3b;h ØPKYrÈf@e;@jrQH@2vrÓgJ~r3†r·R3’r=S3žrjS3ªrvT3¶r\U3ÂrhV3ÎrˆW3ÚrfX3ærVYMëf¥M g¥M'g¥E=g°t7U3Meg¥Mwg¥Mg¥E£g°Ft7U3Eëg'_~t7U 7T~7Qs7R X Îh í. 3Ïh &‘KŽwÀÒ@Ö^‘HÀ2â&xJê3ò%’3þ„’3 €“3€´“3"€s”3.€å”3:€p•3F€–MÇw¥MÙw¥Mëw¥Eýw°_7U3EAx'_—7U X7T}7Qö7R X †v¼7T|=S†7T|?¸,€†]œ‡Ž@É,¹Ì@Ó,.Í@Ý,¶Í3ç,>Î3ñ,tÎCp_Ž@Ý,éÎ@Ó,5Ï@É,ÏHpOç,Oñ,6цóT7TóQPž†vvŽ7T|=³†7T|,#WÑRh à†Lœ¡4oÑRh ºÏ4xÑRóÏKØ/䆰ÒR@é/,ÐH°3õ/{ÐKn/䆰ïE@/³ÐH°2‹/ö†2“/‡3›/{Ð3§/ìÐ3³/7Ñ3¿/qÑ3Ë/ÅÑMñ†¥I"‡'_7U 7T ÿE7Q ž7R X ,GÍRh 0‡Lœ»4oÍRh ÿÑ4xÍR8ÒKl04‡àÎR@}0qÒHà3‰0ÀÒK04‡àÀE@0øÒHà20F‡2'0m‡3/0ÀÒ3;01Ó3G0|Ó3S0¶Ó3_0 ÔMA‡¥Ir‡'_7U Ð7T ÐE7Q œ7R X ,Ý.ÉRh €‡LœÕ‘4oÉRh DÔ4xÉR}ÔK1„‡ÊR@1¶ÔH31ÕK–0„‡‘E@§0=ÕH2³0–‡2»0½‡3Ã0Õ3Ï0vÕ3Û0ÁÕ3ç0ûÕ3ó0OÖM‘‡¥I‡'_7U 7T ¡E7Q š7R X ,Í8ÅRh ЇLœï’4oÅRh ‰Ö4xÅRÂÖK”1Ô‡@ÆR@¥1ûÖH@3±1J×K*1Ô‡@bE@;1‚×H@2G1æ‡2O1 ˆ3W1J×3c1»×3o1Ø3{1@Ø3‡1”ØMᇥIˆ'_7U P7T rE7Q ˜7R X ,ÁRh ˆLœ ”4oÁRh ÎØ4xÁRÙK(2$ˆpÂR@92@ÙHp3E2ÙK¾1$ˆp3E@Ï1ÇÙHp2Û16ˆ2ã1]ˆ3ë1Ù3÷1Ú32KÚ32…Ú32ÙÚM1ˆ¥Ibˆ'_7U 7T CE7Q –7R X ,p)½Rh pˆLœ#•4o½Rh Û4x½RLÛK¼2tˆ ¾R@Í2…ÛH 3Ù2ÔÛKR2tˆ E@c2 ÜH 2o2†ˆ2w2­ˆ32ÔÛ3‹2EÜ3—2Ü3£2ÊÜ3¯2ÝMˆ¥I²ˆ'_7U Ð7T E7Q ”7R X ,—‡LFh ÀˆDœ.–;é•LFh XÝ;©>LFh ‘Ý. 3MFh ÊÝKæ2ĈÐPF@÷2ÞHÐ23Ј2 3õˆ33ÊÝ33;Þ3+3†Þ373ÀÞ3C3ßEˈšõ•7U0Iúˆ'_7U 7T hF7Q ¤7R X ,i±ARh ‰LœH—4oARh Nß4xAR‡ßKä3‰ BR@õ3ÀßH 34àKz3‰ æ6@‹3GàH 2—3&‰2Ÿ3M‰3§3à3³3€à3¿3Ëà3Ë3á3×3YáM!‰¥IR‰'_7U P7T þ67Q ê7R X ,s°Rh `‰Lœb˜4oRh “á4xRÌáKÈ5d‰0 R@Ù5âH0 3å5TâK^5d‰0 d3@o5ŒâH0 2{5v‰2ƒ5‰3‹5Tâ3—5Åâ3£5ã3¯5Jã3»5žãMq‰¥I¢‰'_7U ˜7T t37Q ¿7R X ,S Rh °‰Lœ|™4oRh Øã4xRäK\6´‰` R@m6JäH` 3y6™äKò5´‰` 53@6ÑäH` 26í‰26Ɖ36™ä3+6 å376Uå3C6å3O6ãåMÁ‰¥Iò‰'_7U Ø7T E37Q ½7R X ,Rh ŠLœ–š4oRh æ4xRVæKð6Š R@7æH 3 7ÞæK†6Š 3@—6çH 2£6Š2«6=Š3³6Þæ3¿6Oç3Ë6šç3×6Ôç3ã6(èMŠ¥IBŠ'_7U 7T 37Q »7R X ,ƪRh PŠLœ°›4oRh bè4xR›èK„7TŠÀ R@•7ÔèHÀ 3¡7#éK7TŠÀ ×2@+7[éHÀ 277fŠ2?7Š3G7#é3S7”é3_7ßé3k7ê3w7mêMaŠ¥I’Š'_7U X7T ç27Q ¹7R X ,µŽ Rh  ŠLœÊœ4o Rh §ê4x RàêK8¤Šð R@)8ëHð 358hëK®7¤Šð ¨2@¿7 ëHð 2Ë7¶Š2Ó7ÝŠ3Û7hë3ç7Ùë3ó7$ì3ÿ7^ì3 8²ìM±Š¥IâŠ'_7U ˜7T ¸27Q ·7R X ,™ Rh ðŠLœä4o Rh ìì4x R%íK¬8ôŠ  R@½8^íH 3É8­íKB8ôŠ y2@S8åíH 2_8‹2g8-‹3o8­í3{8î3‡8iî3“8£î3Ÿ8÷îM‹¥I2‹'_7U Ø7T ‰27Q µ7R X 8riõ9h @‹ºœ Ÿ;é•õ9h 1ï;Ŭõ9h ßï. 3ö9h hðKÖ8I‹P ù9@ç8 ð@ó8NñHP 2ÿ8Á‹29…‹39×ñ39ò3'9—ò339åò3?9MóE…‹ÝÔž7T — 7Q ’ I¢‹'_7U 7T :7Q 7R X 8]%*h Œºœ6 ;é•%*h ›ó;Ŭ%*h Iô. 3&*h ÒôKv9 Œ° )*@‡9 õ@“9¸õH° 2Ÿ9Œ2§9EŒ3¯9Aö3»9yö3Ç9÷3Ó9O÷3ß9·÷EEŒÝýŸ7T — 7Q ’ IbŒ'_7U P7T @*7Q Q7R X ,quêPh ÀŒLœO¡4oêPh ø4xêP>øK€:ÄŒ ëP@‘:wøH 3:ÆøK:ÄŒ é@':þøH 23:ÓŒ2;:ýŒ3C:Æø3O:7ù3[:‚ù3g:»ù3s:úMÎŒ¥I'_7U 7T 7Qê7R X ,¹æPh Lœh¢4oæPh Iú4xæP‚úK;@ çP@%;»úH@ 31; ûKª:@ ª@»:BûH@ 2Ç:&2Ï:M3×: û3ã:{û3ï:Æû3û:ÿû3;SüM!¥IR'_7U Ð7T Â7Qç7R X ,›—âPh `Lœ£4oâPh ü4xâPÆüK¨;dp ãP@¹;ÿüHp 3Å;NýK>;dp k@O;†ýHp 2[;s2c;3k;Ný3w;¿ý3ƒ; þ3;Cþ3›;—þMn¥I¢'_7U 7T ƒ7Qä7R X ,ñ‡ÞPh °Lœš¤4oÞPh Ñþ4xÞP ÿK<<´  ßP@M<CÿH  3Y<’ÿKÒ;´  ,@ã;ÊÿH  2ï;Ã2÷;í3ÿ;’ÿ3 <3<N3#<‡3/<ÛM¾¥Iò'_7U P7T D7Qà7R X ,0RÚPh ŽLœ³¥4oÚPh 4xÚPNKÐ<ŽÐ ÛP@á<‡HÐ 3í<ÖKf<ŽÐ í@w<HÐ 2ƒ<Ž2‹<=Ž3“<Ö3Ÿ<G3«<’3·<Ë3Ã<MŽ¥IBŽ'_7U 7T 7QÜ7R X ,nÖPh PŽLœÌ¦4oÖPh Y4xÖP’Kd=TŽ ×P@u=ËH 3=Kú<TŽ ®@ =RH 2=cŽ2=Ž3'=33=‹3?=Ö3K=3W=cM^Ž¥I’Ž'_7U Ð7T Æ7QÙ7R X ,`ŽÒPh  ŽLœå§4oÒPh 4xÒPÖKø=¤Ž0 ÓP@ >H0 3>^KŽ=¤Ž0 o@Ÿ=–H0 2«=ÝŽ2³=³Ž3»=^3Ç=Ï3Ó=3ß=S3ë=§M®Ž¥IâŽ'_7U 7T ‡7QÖ7R X ,{†ÎPh ðŽLœþ¨4oÎPh á4xÎPKŒ>ôŽ` ÏP@>SH` 3©>¢K">ôŽ` 0@3>ÚH` 2?>2G>-3O>¢3[> 3g>^ 3s>— 3>ë MþŽ¥I2'_7U P7T H7QÒ7R X ,äÊPh @Lœª4oÊPh % 4xÊP^ K ?D ËP@1?— H 3=?æ K¶>D ñ@Ç> H 2Ó>V2Û>}3ã>æ 3ï>W 3û>¢ 3?Û 3?/ MQ¥I‚'_7U 7T 7QÎ7R X ,ÆPh Lœ0«4oÆPh i 4xÆP¢ K´?”À ÇP@Å?Û HÀ 3Ñ?* KJ?”À %@[?b HÀ 2g?¦2o?Í3w?* 3ƒ?› 3?æ 3›?3§?sM¡¥IÒ'_7U Ø7T 57Q±7R X ,I#ÂPh àLœI¬4oÂPh ­4xÂPæKH@äð ÃP@Y@Hð 3e@nKÞ?äð ö@ï?¦Hð 2û?ö2@3 @n3@ß3#@*3/@c3;@·Mñ¥I"'_7U 7T 7Q¯7R X ,S¾Ph 0Lœb­4o¾Ph ñ4x¾P*KÜ@4 ¿P@í@cH 3ù@²Kr@4 Ç@ƒ@êH 2@F2—@m3Ÿ@²3«@#3·@n3Ã@§3Ï@ûMA¥Ir'_7U X7T ×7Q­7R X ,3ºPh €Lœ{®4oºPh 54xºPnKpA„P »P@A§HP 3AöKA„P ˜@A.HP 2#A–2+A½33Aö3?Ag3KA²3WAë3cA?M‘¥IÂ'_7U ˜7T ¨7Q«7R X ,]¥¶Ph ÐLœ”¯4o¶Ph y4x¶P²KBÔ€ ·P@BëH€ 3!B:KšAÔ€ i@«ArH€ 2·Aæ2¿A ‘3ÇA:3ÓA«3ßAö3ëA/3÷AƒMá¥I‘'_7U Ø7T y7Q©7R X ,8-²Ph ‘Lœ­°4o²Ph ½4x²PöK˜B$‘° ³P@©B/H° 3µB~K.B$‘° :@?B¶H° 2KB6‘2SB]‘3[B~3gBï3sB:3Bs3‹BÇM1‘¥Ib‘'_7U 7T J7Q§7R X 8>K‹h p‘ºœÕ±;é•‹h ;Ŭ‹h ¯. 3Œh 8KDCy‘à @UCp@aCHà 2mCñ‘2uCµ‘3}C§3‰Cß3•Cg3¡C´3­CEµ‘ݱ7T — 7Q ’ IÒ‘'_7U X7T ¦7Qó7R X ,×b Ph 0’Lœî²4o Ph j4x P£K$D4’@!P@5DÜH@3AD+KºC4’@ß@ËCcH@2×CC’2ßCm’3çC+3óCœ3ÿCç3 D 3Dt M>’¥Ir’'_7U ˜7T ï7Q…7R X ,yPh €’Lœ´4oPh ® 4xPç K¸D„’pP@ÉD !Hp3ÕDo!KND„’p°@_D§!Hp2kD“’2sD½’3{Do!3‡Dà!3“D+"3ŸDd"3«D¸"MŽ’¥IÂ’'_7U Ø7T À7Qƒ7R X ,¡NPh Ð’Lœ µ4oPh ò"4xP+#KLEÔ’ P@]Ed#H 3iE³#KâDÔ’ @óDë#H 2ÿDã’2E “3E³#3E$$3'Eo$33E¨$3?Eü$MÞ’¥I“'_7U 7T ‘7Q7R X ,\Ph “Lœ9¶4oPh 6%4xPo%KàE$“ÐP@ñE¨%HÐ3ýE÷%KvE$“ÐR@‡E/&HÐ2“E3“2›E]“3£E÷%3¯Eh&3»E³&3ÇEì&3ÓE@'M.“¥Ib“'_7U X7T b7Q7R X ,u=Ph p“LœR·4oPh z'4xP³'KtFt“P@…Fì'H3‘F;(K Ft“#@Fs(H2'F­“2/Fƒ“37F;(3CF¬(3OF÷(3[F0)3gF„)M~“¥I²“'_7U ˜7T 37Q}7R X ,øp Ph À“Lœk¸4o Ph ¾)4x P÷)KGÄ“0 P@G0*H03%G*KžFÄ“0ô@¯F·*H02»FÓ“2ÃFý“3ËF*3×Fð*3ãF;+3ïFt+3ûFÈ+MΓ¥I”'_7U Ø7T 7Q{7R X 8'jþh ”§œ“¹;é•þh ,;Ŭþh °,. 3ÿh 9-K\G”`@mGq-@yG.H`2…GU”2GŽ”3•G¨.3¡Gà.3­Gh/3¹Gµ/3ÅG0EU”Ý[¹7T — 7Q ’ Ir”'_7U 7T 7Q—7R X ,N‘Oh À”Dœ¶º4o‘Oh k04x‘O¤0K@ÆTh ?oK°•CœÀ@€Kÿ8@ŒK^9@¤K%:@°K„:@¼K½:JÈK2ÐK&—2ØKµ—2àK±˜RèK‘ RôK‘¨RL‘°3 Lõ:3L<S˜KCPì¾3)L¾<M{—C€¿3;Lô<M7˜ ME˜,C°U¿3IL*=Hà3VL`=M…˜ Mì˜,Tÿ½&—(#Už¿@¾–=@ ¾º=M.—7MN—ÝE#–BÊ¿7U~7T‘ˆ7Q|7R}M§–M½—7EΘÝ À7T ˆ7Q‘˜MݘM"S[^eƒÀ#é•^ƒÀ#I_^h %ña}%õMz$ 3_e$@Iae$¹_b¬$Ace"¢«¨eÊÀ&obj¨h #¨h #Ô)¨h 'tp©,HF,e™ãœiÄ;é•,h ß=;|l,h >;s›,h ü>U VE™U:›Rÿ™U~!PÀ™.I_-h ÿ?.@I.e›@.¹_/¬#A.A0e»A$ 31eC oÂV—g5iÄ Àw#V£6õ‘@H€.Xs8÷ZB.(s9ý¶BE˜™VÂ7U}Eª™aÂ7U}ENšV3Â7U}I©š%¾7U}7T Àw#7Qw7R|7X ² GÀE™ÐWuÃ@6ÀC@*À^CHÐJBÀ2JÀ·š3RÀºC3^ÀßC3jÀ?D3vÀ§DG‰ÀE™ m?Ã@²À E@¦ÀUE@šÀÔEH 3¾ÀF$ h ™s.@I% et.¹_& ¬®t.A' ebuN 3( h CPÛV—g, Ý ðy#V£- #Ý‘°H.Xs/ ÷v.(s0 ýˆvTâ.õ­9? ˜Ú@/Ñv@/õv@/õv@û.Ñv@ï.w1õ­93+/Ew37/iwI.®Ý7T ð7Q Ú 7R » 7X27Y S E»¬a°Ú7U}Eo­VÈÚ7U}E­aàÚ7U}Iç­%¾7U}7T ðy#7Qw7Rv7X Ú GÂB‚«ÀV Ü@ÓB•w@ÓB•w@ëBÞw@ßBxHÀJ÷B2ÿBË«3CPx3Cœx3Cüx3+Coy37CëyEÁ«ÝÈÛ7T — 7Q ’ EÞ«'_ôÛ7U (7R X I8¬Ý7T — 7Q ’ Tâ.Ь8P ÓÜ@/^z@/‚z@/‚z@û.¦z@ï.Êz1Ь83+/öz37/{I­Ý7T ð7Q Ú 7R » 7X27Y S E'­'_Ý7U (7Qø7R X M?®M " #Ý ‰ h 3Ý ‰"Ç-¸e9Þ#镸ù(#r¸)#Ø"¸)#Õ%¸)#v©¸)#ã"¸)#à%¸)#û¢¸)%ñaÞ%õMÚ$ 3¹e$Ú~»)$ä~¼)$î~½)$ø~¾)$Ñ0¿)$À)$5VÁh $@IÂe$¹_ì$AÄe8oJPe@®# œsè;é•Ph F{;|lPh |;s›Ph 6}U:›¬gµU~!ª(µU °E°.rQ)~.Ø"R)«~.Õ%S)7.v©T)Ã.ã"U)€.à%V)Y€.û¢W)¤€.@IXeï€.¹_Y¬o‚.AZe'„$ 3[eC¯åV—g_sè {#V£`ƒè‘€C øä.Xsb÷Â….(scý3†Tâ.ý¶9‹tà@/†@/³†@/³†@û.׆@ï.û†1ý¶93+/'‡37/K‡I6·Ý7T ð7Q ² 7R » 7X77Y S Tâ.÷·9)á@/w‡@/›‡@/›‡@û.¿‡@ï.ã‡1÷·93+/ˆ37/3ˆI0¸Ý7T ð7Q ² 7R » 7X77Y S Tâ.<¸9†Þá@/_ˆ@/ƒˆ@/ƒˆ@û.§ˆ@ï.ˈ1<¸93+/÷ˆ37/‰Iu¸Ý7T ð7Q ² 7R » 7X77Y S Tâ.ƒ¸9“â@/G‰@/k‰@/k‰@û.‰@ï.³‰1ƒ¸93+/߉37/ŠI¼¸Ý7T ð7Q ² 7R » 7X77Y S Tâ.ɸ9|Hã@//Š@/SŠ@/SŠ@û.wŠ@ï.›Š1ɸ93+/ÇŠ37/ëŠI¹Ý7T ð7Q ² 7R » 7X77Y S Tâ.¹9wýã@/‹@/;‹@/;‹@û.‹@ï._‹1¹93+/‹‹37/¯‹IH¹Ý7T ð7Q ² 7R » 7X77Y S Eÿ³Vä7U~E/´a-ä7U~EP´aEä7U~Eq´a]ä7U~E’´auä7U~E³´aä7U~EÔ´a¥ä7U~Eµa½ä7U~Iå·%¾7U~7T {#7Q|7R}7X ² Mã®xM¯xMA¯xMq¯xMŸ¯xMÙ¯xM°xM•µ,M­µ,Mŵ,Mãµ,M¶,MG¶,M¶,G3ÝE°ð±~ç@˜ÝÛ‹@ŒÝ&Œ@€ÝqŒ@tݼŒ@hÝ@\Ý“@PÝ÷@DÝkŽHðJ¤Ý2¬Ýà¶3´ÝÇŽ3ÀÝ3ÌÝÛ3ØÝ3äÝ?‘3ðÝÊ‘3üÝŒ’3Þ“3ÞN”3 ÞÖ”3,ÞR•E²š æ7U0E@²š·æ7U0Eq²šÎæ7U0EÖ¶ƒíæ7T Ë Eó¶'_ç7U h7R X I¦·Ž7aQ‘è~ö)‘Ð~ö)‘è~ö)‘Ð~ö)‘à~ö)‘È~ö)‘à~ö)‘È~ö)‘Ø~ö)wö)‘Ø~ö)wö)""Tâ.(µ8«3è@/Û•@/ÿ•@/ÿ•@û.#–@ï.G–1(µ83+/s–37/—–I`µÝ7T ð7Q ² 7R » 7X77Y S Eµ'_eè7U h7Q³7R X M[¹M " ƒè ‰ h “è ‰"ê+eáé#é•+u)#r+)#Ø"+)#Õ%+)#¯ +)#v©+)#ã"+)#à%+)#º +)%ñaÄ,%õMÀ,$´+)$µ¡+)$ 3+e$Ú~+e$ä~+)$î~+)$ø~+)$Ñ0+)$+)$5V+)$T+)$^+)$/+h $@I+e$¹_+¬$A+e8Ë`*ep¹ˆ œjõ;é•*h Ö;|l*h —;s›*h ܘU +å»U:›+¯ÁU~!+pÁ.rž*)š.Ø"Ÿ*)š.Õ% *)›.¯ ¡*)§›.v©¢*)ò›.ã"£*)=œ.à%¤*)ˆœ.º ¥*)Óœ.@I¦*e.¹_§*¬О.A¨*e¸ $ 3©*eC@NòV—g­*jõ à{#V£®*zõ‘ð~Cð}ñ.Xs°*÷}¢.(s±*ý£Tâ.¥Ã9ß*,ì@/ƒ£@/§£@/§£@û.Ë£@ï.ï£1¥Ã93+/¤37/?¤IÞÃÝ7T ð7Q ² 7R » 7X87Y S Tâ.ãÄ9ä*áì@/k¤@/¤@/¤@û.³¤@ï.פ1ãÄ93+/¥37/'¥IÅÝ7T ð7Q ² 7R » 7X87Y S Tâ.‹Å9Ú*–í@/S¥@/w¥@/w¥@û.›¥@ï.¿¥1‹Å93+/ë¥37/¦IÄÅÝ7T ð7Q ² 7R » 7X87Y S Tâ.ÒÅ9Õ*Kî@/;¦@/_¦@/_¦@û.ƒ¦@ï.§¦1ÒÅ93+/Ó¦37/÷¦I ÆÝ7T ð7Q ² 7R » 7X87Y S Tâ.Æ9Ð*ï@/#§@/G§@/G§@û.k§@ï.§1Æ93+/»§37/ß§IQÆÝ7T ð7Q ² 7R » 7X87Y S Tâ.^Æ9Ë*µï@/ ¨@//¨@//¨@û.S¨@ï.w¨1^Æ93+/£¨37/ǨI—ÆÝ7T ð7Q ² 7R » 7X87Y S Tâ.¥Æ9Æ*jð@/ó¨@/©@/©@û.ó¨@ï.;©1¥Æ93+/g©37/‹©IÞÆÝ7T ð7Q ² 7R » 7X87Y S E'ÀV‚ð7U}EWÀašð7U}ExÀa²ð7U}E™ÀaÊð7U}EºÀaâð7U}EÛÀaúð7U}EüÀañ7U}E Áa*ñ7U}E[ÁaBñ7U}IÑÄ%¾7U}7T à{#7Q|7R~7X ² M%ºxMSºxMƒºxM³ºxMáºxM»xMd»xM¹»xMÝÁ,MõÁ,M Â,M+Â,MYÂ,M—Â,MÝÂ,M3Ã,G“èå»P+tô@é·©@øè(ª@ìèïª@à莫@Ôè(¬@È膬@¼èæ¬@°èF­@¤è¥­HPJé2éˆÃ3 é®3,é_®38騮3Déá®3Pée¯3\é)°3hé±3téÁ²3€é5³3Œé€³3˜é˳3¤é´3°éa´3¼é6µ3Èé'¶3Ôé·E»¾šuó7U0E~Ôó7T Ë E›Ã'_Àó7U ¨7R X Eăßó7T Ë E.ăþó7T Ë E„ÄŽeô7aQ‘°~ö)‘Ð~ö)‘°~ö)‘Ð~ö)‘¨~ö)‘È~ö)‘¨~ö)‘È~ö)wö)‘À~ö)wö)‘À~ö)""MWÅŽTâ.pÁ8+)õ@/¸@/,¸@/,¸@û.P¸@ï.t¸1pÁ83+/ ¸37/ĸI¨ÁÝ7T ð7Q ² 7R » 7X87Y S EÇÁ'_\õ7U ¨7Q V7R X MðÆM " zõ ‰ h Šõ ‰"â®Ge÷#é•GD*#rG)#Ø"G)#Õ%G)#¯ G)#v©G)#ã"G)#à%G)#º G)#©G)#î"G)#ë%G)%ña˜H%õM•H$¡©G)$ 3Ge$Ú~Ge$ä~ G)$î~!G)$ø~"G)$Ñ0#G)$$G)$5V%G)$T&G)$^'G)$/(G)$:)G)$E*G)$@I+Ge$¹_,G¬$A-Ge,¬FeÇ0œ ;é•Fh ð¸;|lFh ʹ;s›Fh àºU:›GÿÐU~! GÀÐU GdÊ.rF)ã».Ø"‘F)Z¼.Õ%’F)Ѽ.¯ “F)H½.v©”F)“½.ã"•F) ¾.à%–F)¾.º —F)ã¾.©˜F).¿.î"™F)y¿.ë%šF)Ä¿.@I›FeÀ.¹_œF¬?Â.AFe·Ä$ 3žFeC°ZV—g¢F   ~#V££F‘à~C@;.Xs¥F÷úÆ.(s¦Fý~ÇTâ.“Ó9ëFƒù@/íÇ@/È@/È@û.5È@ï.YÈ1“Ó93+/…È37/©ÈIÌÓÝ7T ð7Q ² 7R » 7X;7Y S Tâ.ØÓ9æF8ú@/ÕÈ@/ùÈ@/ùÈ@û.É@ï.AÉ1ØÓ93+/mÉ37/‘ÉIÔÝ7T ð7Q ² 7R » 7X;7Y S Tâ.óÔ9áFíú@/½É@/áÉ@/áÉ@û.Ê@ï.)Ê1óÔ93+/UÊ37/yÊI,ÕÝ7T ð7Q ² 7R » 7X;7Y S Tâ.:Õ9ÜF¢û@/¥Ê@/ÉÊ@/ÉÊ@û.íÊ@ï.Ë1:Õ93+/=Ë37/aËIsÕÝ7T ð7Q ² 7R » 7X;7Y S Tâ.€Õ9×FWü@/Ë@/±Ë@/±Ë@û.ÕË@ï.ùË1€Õ93+/%Ì37/IÌI¹ÕÝ7T ð7Q ² 7R » 7X;7Y S Tâ.ÆÕ9ÒF ý@/uÌ@/™Ì@/™Ì@û.½Ì@ï.áÌ1ÆÕ93+/ Í37/1ÍIÿÕÝ7T ð7Q ² 7R » 7X;7Y S Tâ. Ö9ÍFÁý@/]Í@/Í@/Í@û.¥Í@ï.ÉÍ1 Ö93+/õÍ37/ÎIFÖÝ7T ð7Q ² 7R » 7X;7Y S Tâ.SÖ9ÈFvþ@/EÎ@/iÎ@/iÎ@û.Î@ï.±Î1SÖ93+/ÝÎ37/ÏIŒÖÝ7T ð7Q ² 7R » 7X;7Y S Tâ.˜Ö9ÃF+ÿ@/-Ï@/QÏ@/QÏ@û.uÏ@ï.™Ï1˜Ö93+/ÅÏ37/éÏIÑÖÝ7T ð7Q ² 7R » 7X;7Y S Tâ.ÝÖ9¾Fàÿ@/Ð@/9Ð@/9Ð@û.Ð@ï.]Ð1ÝÖ93+/‰Ð37/­ÐI×Ý7T ð7Q ² 7R » 7X;7Y S EÏVøÿ7U}E/Ïa7U}EPÏa(7U}EqÏa@7U}E’ÏaX7U}E¶Ïap7U}EÚÏaˆ7U}EþÏa 7U}E"Ða¸7U}EFÐaÐ7U}EjÐaè7U}E¥Ða7U}IÓ%¾7U}7T  ~#7Q|7R~7X ² MßÇxMÈxM?ÈxMoÈxM ÈxMßÈxMÉxM]ÉxMšÉxMãÉxM8ÊxM-Ñ,MEÑ,M]Ñ,M{Ñ,M£Ñ,MËÑ,MóÑ,M!Ò,MWÒ,MÒ,MóÒ,GŠõdÊG@öÙÐ@ö_Ñ@öåÑ@ûõkÒ@ïõÜÒ@ãõ>Ó@×õ¢Ó@ËõÔ@¿õwÔ@³õÕ@§õ¶Õ@›õUÖHJ+ö23öHÓ3;öžÖ3GöÁÖ3SöæÖ3_öM×3kö˜×3wöã×3ƒö.Ø3ö Ù3›öãÙ3§öèÛ3³ö7Ü3¿ö‚Ü3ËöùÜ3×öpÝ3ãöçÝ3ïö†Þ3ûößE>Óƒ­7T Ë E[Ó'_Ù7U è7R X E6Ôƒø7T Ë MhÔŽMÃÔŽTâ.ÀÐ8GÉ@/½ß@/áß@/áß@û.à@ï.)à1ÀÐ83+/Uà37/yàIøÐÝ7T ð7Q ² 7R » 7X;7Y S EÑ'_ü7U è7Q §7R X M(×M "  ‰ h * ‰ ?"K0×Üç@3K¥à@?KCá3VKâá3bK+âSKK7R X M4ÚM(C|UÊ #V|Uh #Ô)|Uh &tb|Uh $P=~Uh $œ9~Uh $y]~Uh $ôeU¤Y•-@Ú œ[ @¢-Nê0Æ-úÆ-Ÿ0º-úº-Ÿ0®-ú®-Ÿ3ê-‡ê3ö-Ðê3.ë3.bëO.SÞ-SÒ-TX-NÚ/¥Uš @}-÷ë@q-ì@e-Gì1NÚ/3ˆ-oìGi ‚ÚвU @Ž ’ì@‚ Èì@v þìHÐ3™ 4í3¥ jí3±  í3½ Öí<ÎÚ 7Uv=ûÚ7U|E‚ÚM5 7UóUEÛÚ°M 7UsAJÛ°"i—h Ñ #é•—ƒÀ%ñaÀ%õM»$ 3˜h $Ú~šh $ä~›h $@Iœe$¹_¬$Aže8Ý^Œh PÛœ4 ;镌h î. 3h —îK[ UÛ@l ÏîH2x äÛJ€ 3ˆ —î3” Zï3  ¦ï3¬ ð3¸ yð3Ä ýðG YUÛp©Ä @)Yuñ@YôñHp35YiòMIÜEÛÒÜ 7Ts<¿Ûð 7UsEüÛ'_! 7U ¸7QM7R X =>Ü7Us"åYh ª #镃À%ña9%õM4$ 3h $Ú~!h $ä~"h $@I#e$¹_$¬$A%e8ì™BNh `ÜÁœ"4oBNh ²ò4xBN=óKÞJeÜÀCN@ïJvóHÀ3ûJôK4 eÜÀ@E 9ôHÀ2Q ¼ÜJY 3a Äô3m #õ3y ƒõ3… Îõ3‘ Dö3 ÈöG YeÜ(Ä@)Y@÷@Y¿÷H35Y4øMÝEÜšÛ7U1EÔÜ'_ 7U ø7Q#7R X =Ý7Us"mBh ü#镃À#š h #$h #¥ h %ñac%õM\$ 3h $Ú~h $ä~h $î~h $ø~÷$Ñ0h $@Ie$¹_¬$Ae)$b23h )'tmp6h 8\‹Ðh 0Ýšœ¨;é•Ðh }ø;|lÐh !ú;s›Ðh cûU  ’ÝU:›¯ßU~!pß.š Ñh Sü.$Òh ý.¥ Óh ¹ý.@IÔelþ.¹_Õ¬Xÿ.AÖedN 3×h C`FV—gÛ¨ €w#V£Ü¸‘ HÀ.XsÞ÷k.(sßýñTâ.–â9ôô@/M@/q@/q@û.•@ï.¹1–â93+/å37/ IÏâÝ7T ð7Q C 7R » 7X37Y S Tâ.kã9ï©@/5@/Y@/Y@û.5@ï.}1kã93+/©37/ÍI¤ãÝ7T ð7Q C 7R » 7X37Y S EáVÁ7U}EEáaÙ7U}Ebáañ7U}Eƒáa 7U}IYã%¾7U}7T €w#7Q‘ 7Rv7X C G"’Ý ´@Wù@KH@?—@3æHJcJk3s+3³3‹‰3—À3£4 3¯¼ 3» 3Ç, 3ÓpG Y’Ý€)D@)Y¦@Y%H€35Yn<³Ý.7U|I#ã7U|G Y¿ÝÐ+¦@)Y·@Y6HÐ35Y<ßÝ7UsI3ã7UsC Ä3àÈHPOíG"K|Þ€H™@KK@?Kq@3KÍH€3VK)3bK_<¾Þ-7U|7Tv7Q0E]â™P7U|7Tv7Q0EŒâ¥o7U (Måâ,Iãƒ7T HE=Þ°°7U4EðÞ»È7UsE[ß'_ÿ7U @ 7T}7QO7R X <ßß7Us< à'7Us7UsIÃé7UsCÀ r3†ÿ+Hð O“G"Kå !ëG@KK5,@?K•,@3Kñ,H !3VKM-3bKƒ-<^åÛ7U|7Tv7Q0E½è™þ7U|7Tv7Q0Eìè¥7U (MEé,Iféƒ7T HEÝä°^7U4K¢IííÀ"A @³I>HÀ"2¿I×ïJÇI3ÏI?3ÛIZ@3çIº@3óI‹A3ÿI¾B3 JTC3JaD3#JgE3/J—FC#;%35<7U~ /E7U}<_ CE7U|<~ WE7U~<ª kE7U}<º E7UsMØ ,Ò.Ñ0:Dh 8Ó.;Dh Ô.5VDe›Ö./?DeäÖ.@I@De.×.¹_AD¬ú×.ABDeú×G Y0À0HDBU@)YnØ@YÒØHÀ035YÙ%½`7U~5Âr7U<^5Ör7U}<5êr7U|<ž5þr7U~<Ê5s7U}<Ú5&s7UsMø5,. 3¡Lež,.Ú~£Lh Ô,.ä~¤Lh 4-.î~¥Lh ö-.ø~¦Lh /.Ñ0§Lh þ/.¨Lh ä0.5V©L÷à1.TªLh T2.^«Lea3./¬Leª3.@I­Leô3.¹_®L¬À4.A¯LeÀ4G Y;€8µLÆy@)Y45@Y˜5H€835Yá5<4;·y7UsM‘?CÐ8z.b2ÂLh ?6H9'tmpÅLh =ƒ?7UvG"Kf<09ÔL×z@KKu6@?KÁ6@3K 7H093VKS73bKœ7<§<kz7U}7Ts7Q0E?™Žz7U}7Ts7Q0EI?¥­z7U (MX?,Is?ƒ7T HG'.Ï<€9ØL{W8.H€93B.å7I(>Ò7U|Mf;¥E€;¥@{7awö)E¯;°W{7U2<Õ;k{7Uv<;<{7UsEI<Ê §{7U #Zº- <=»{7Uv<[=Ï{7Uv<~=ã{7U<ž=÷{7U}<¿= |7U|<Þ=|7U~< >3|7U}<>G|7UsM8>,<«>h|7U|Iï>°7U3" ¡IMh þ|#é•IMD*#h°IM)#›£IM)%ña]M%õMYM$ 3JMh $Ú~LMh $@IMMe$¹_NM¬$AOMe,í Mh À?!œ#;é•Mh %8;|lMh Ð8;s›Mh —9U AMy@U:›=MGAU~!;MA.h°M)q:.›£M)»:.@IMe;.¹_M¬¨;.AMe\<N 3Mh CÀ9£V—gMÝ à}#V£M#Ý‘°C:n.XsM÷=.(sMý‚=Tâ.—B9+Mê~@/Ë=@/ï=@/ï=@û.Ë=@ï.>1—B93+/?>37/c>IÐBÝ7T ð7Q  7R » 7X27Y S Eó@a7U}E¯AV7U}EÐAa27U}I…B%¾7U}7T à}#7Q‘°7Rv7X  M3@xM`@xMB,M0B,G||y@@:BM-€@¥|>@™|²>@|Õ>H@:J±|J¹|3Á| ?3Í| ?3Ù| ?3å| ?3ñ| ?IŠ@x7U|7T1Tâ.A8[.ä~ØKh ž[.î~ÙKh `\.ø~ÚKh n].Ñ0ÛKh h^.ÜKh N_.5VÝK÷J`.TÞKh ¾`.^ßKeËa./àKeb.@IáKe^b.¹_âK¬*c.AãKe*cG YK`<éK Œ@)Yžc@YdH`<35YKd<´Kû‹7UsMPC°<FŒ.b2öKh ©dHà<'tmpùKh =P7UvG"KæL=L@KKßd@?K+e@3KteH=3VK½e3bKf<'M¯Œ7U}7Ts7Q0EŸO™ÒŒ7U}7Ts7Q0EÉO¥ñŒ7U (MØO,IóOƒ7T HG'.OM`= L\W8.H`=3B.OfI¨NÒ7U|MæK¥EL¥„7awö)E/L°›7U2vLq’@éŽùl@ÝŽm@ÑŽ?mH >JõŽJýŽ3um3um3um3)um35umI QEŠ7U|7T1Tâ.ˆQ8pL&“@/­m@/Ñm@/Ñm@û.õm@ï.n1ˆQ83+/En37/inIÀQÝ7T ð7Q  7R » 7X27Y S EßQ'_Y“7U $7Q 7R X MaSM8`M1epSöœá—;é•1¦(•n;h°1)×o;›£1)ûp;ö 1eÛq%AUña˜ëTUõMŽñV. 32e=r.Ú~4h sr.ä~5h Ór.î~6h •s.ø~7h £t.Ñ08h u.9h ƒv.5V:÷w.T;h ów.^<ey./=eIy.@I>e“y.¹_?¬[z.A@e[zG YÀSP>F,•@)YÏz@Y3{HP>35Y|{<äS•7UsMAXC >h•.b2Sh Ú{HÐ>'tmpVh =3X7UvG"KU?e=–@KK|@?K\|@3K¥|H?3VKî|3bK7}˜£„3J˜£„3V˜£„I:Yg“7U|7T1Tâ.¸Y8ÍGœ@/Û„@/ÿ„@/ÿ„@û.#…@ï.G…1¸Y83+/s…37/—…IðYÝ7T ð7Q + 7R » 7X27Y S EZ'_yœ7U P$7Q”7R X M‘[M8 C¨1e [œ¡;镨1u)Ã…;h°¨1)‡;›£¨1))ˆ;ö ¨1e ‰%Aø1Uña2+]UõM21_. 3©1ek‰.Ú~«1h ¡‰.ä~¬1h Š.î~­1h Ê.ø~®1h Ñ‹.Ñ0¯1h ËŒ.°1h ±.5V±1÷­Ž.T²1h !.^³1e../´1ew.@Iµ1eÁ.¹_¶1¬‘.A·1e‘G Y\@@½1Lž@)Y’@Ye’H@@35Y®’<$\=ž7UsM`C@ˆž.b2Ê1h “HÀ@'tmpÍ1h =s`7UvG"KV]ð@Ü1]Ÿ@KKB“@?KŽ“@3KדHð@3VK ”3bKi”<—]ñž7U}7Ts7Q0E`™Ÿ7U}7Ts7Q0E9`¥3Ÿ7U (MH`,Ic`ƒ7T HG'.¿]@Aà1žŸW8.H@A3B.²”I_Ò7U|MV\¥Ep\¥ÆŸ7awö)EŸ\°ÝŸ7U2<Å\ñŸ7Uv<+] 7UsE9]Ê - 7U $Zº- ª<^A 7Uv—.›£2)ˆ—.@I2eÓ—.¹_2¬u˜.A2e)™N 32h C€A)¤V—g 2Ý À{#V£!2#Ý‘°CÀAô£.Xs#2÷Þ™.(s$2ýOšTâ.‡c932p£@/˜š@/¼š@/¼š@û.˜š@ï.àš1‡c93+/ ›37/0›IÀcÝ7T ð7Q + 7R » 7X27Y S Eãaaˆ£7U}EŸbV £7U}EÀba¸£7U}Iuc%¾7U}7T À{#7Q‘°7Rv7X + M#axMPaxMòb,M c,G¡iaBJ2³¤@+¡\›@¡›@¡¢›HBJ7¡J?¡3G¡Ø›3S¡Ø›3_¡Ø›3k¡Ø›3w¡Ø›Iza‡œ7U|7T1Tâ.øa8D2h¥@/œ@/4œ@/4œ@û.Xœ@ï.|œ1øa83+/¨œ37/ÌœI0bÝ7T ð7Q + 7R » 7X27Y S EOb'_›¥7U $7Q ª7R X MÑcM80«¬(eàcœ$ª;镬(ù(øœ;h°¬():ž;›£¬()^Ÿ;ö ¬(e> Uña)keUõM )qg%Aü(. 3­(e  .Ú~¯(h Ö .ä~°(h 6¡.î~±(h ø¡.ø~²(h £.Ñ0³(h ¤.´(h æ¤.5Vµ(÷â¥.T¶(h V¦.^·(ec§./¸(e¬§.@I¹(eö§.¹_º(¬¨.A»(e¨G Y@d0BÁ(n§@)Y6©@Yš©H0B35Yã©;h $Ú~@;h $@IA;e$¹_B;¬$AC;e,-ù:h p‚œ¸Ë;é•ù:h Ôõ;|lù:h ö;s›ù:h o÷U 5;mƒU:›1;„U~!/;Ѓ.š ú:)_ø.$û:)Öø.¥ ü:)!ù.@Iý:elù.¹_þ:¬Lú.Aÿ:eDûN 3;h CðHãÉV—g;¨ @|#V£;¸‘°C@I”É.Xs;÷7ü.(s;ý½üTâ.˜…9;CÈ@/ý@/=ý@/=ý@û.aý@ï.…ý1˜…93+/±ý37/ÕýIÑ…Ý7T ð7Q 6 7R » 7X37Y S Tâ.4†9;øÈ@/þ@/%þ@/%þ@û.þ@ï.Iþ14†93+/uþ37/™þIm†Ý7T ð7Q 6 7R » 7X37Y S E–„VÉ7U}E½„a(É7U}EÚ„a@É7U}Eû„aXÉ7U}I"†%¾7U}7T @|#7Q‘°7Rv7X 6 Mõ‚xM%ƒxMSƒxM%…,MK…,My…,G¹ÅmƒI6;ÂÊ@îÅÅþ@âÅèþ@ÖÅ ÿ@ÊÅEÿHIJúÅ2Æà…3 Æ{ÿ3Ƴÿ3"Æýÿ3.Æ73:ÆwE€ƒÁŠÊ7U|7a‘˜ö)7T1Iý…'_7U %7T F;7Q 7R X Tâ.Ѓ80;wË@/±@/Õ@/Õ@û.ù@ï.1Ѓ83+/I37/mI„Ý7T ð7Q 6 7R » 7X37Y S E'„'_ªË7U %7Q 7R X Mˆ†M8¬¤ h †½œaÐ;镤 ù(™;š ¤ )Û;$¤ )0;¥ ¤ )m;ö ¤ eªUña)!›ˆ%õM!.¥ ) .¦ )K.§ )Š.o£¨ )É. 3© h ™.Ú~« h .ä~¬ h ’ .î~­ h  .ø~® h 0 .Ñ0¯ h ) .° h " .5V± h ..T² ÷.^³ h Š./´ ) .:µ )K.E¶ )Š.@I· eª.¹_¸ ¬ .A¹ e¤G Y0‡ÀI¿ ÝÍ@)Y@Y~HÀI35YÇ<[‡ÎÍ7UsM&ŒCJÎ.b2Ï h %H@J'tmpÒ h =Œ7UvG"KëˆpJä îÎ@KKn@?Kº@3KHpJ3VKL3bK‚<.‰‚Î7U|7Ts7Q0E¸‹™¥Î7U|7Ts7Q0Eá‹¥ÄÎ7U (Mð‹,I Œƒ7T HM›‡¥E¸‡¥Ï7a‘°ö)E؇¥3Ï7a‘¸ö)Eˆ°JÏ7U3E·ˆ'_…Ï7U Ð%7T‘¨”7Qü7R X <‰™Ï7Uv<lj­Ï7Uv<ë‰ÁÏ7U|<ú‰ÕÏ7U<ŠéÏ7U}<*ŠýÏ7U~<:ŠÐ7Us<‚Š%Ð7Uv<°Š9Ð7U|<ÏŠMÐ7UsI‚‹°7U4"|u!h ïÐ#é•u!ù(#š u!)#$u!)#¥ u!)%õM…!%ña‰!$ 3v!h $Ú~x!h $@Iy!e$¹_z!¬$A{!e,m41!h PŒœ^Ö;é•1!h Ë;|l1!h v;s›1!h fU m!MU:›i!ïU~!g!°.š 2!)V.$3!)Í.¥ 4!).@I5!ec.¹_6!¬?.A7!e7N 38!h C°J‹ÔV—g9.(sËýÄ9Tâ.¸™9àbÝ@/ :@/D:@/D:@û.h:@ï.Œ:1¸™93+/¸:37/Ü:Iñ™Ý7T ð7Q C 7R » 7X37Y S Tâ.Tš9ÛÞ@/;@/,;@/,;@û.;@ï.P;1Tš93+/|;37/ ;IšÝ7T ð7Q C 7R » 7X37Y S E¶˜V/Þ7U}EݘaGÞ7U}Eú˜a_Þ7U}E™awÞ7U}IBš%¾7U}7T  x#7Q‘°7Rv7X C M—xME—xMs—xME™,Mk™,M™™,GØÚ—0Mùíß@ ÛÌ;@Ûï;@õÚ<@éÚL<H0MJÛ2!Ûš3)Û‚<35Ûº<3AÛ=3MÛ==3YÛ}=E —^Ö©ß7U|7a‘˜ö)7T1M¥—¥Iš'_7U &7T 7Qc7R X Tâ.ð—8ó¢à@/·=@/Û=@/Û=@û.ÿ=@ï.#>1ð—83+/O>37/s>I(˜Ý7T ð7Q C 7R » 7X37Y S EG˜'_Ôà7U &7Qc7R X M¨šM8Ýrè)°š œ*è;é•èž'Ÿ>;š èh @;$èh ÂA;¥ èh "B;ö èeÒBUña»Áž%õM².›éh †C.¨ ê)¹D.?'ë)?E.I_ìh bE. 3í)G.Ú~ïh ½G.ä~ðh *I.î~ñh ›J.ø~òh ®L.Ñ0ó÷‰N.ôh 'P.5Võ)R.Tö÷àR.^÷h TS./øetT.@Iùe¡T.¹_ú¬*U.AûeºUG Y€ `Mçâ@)YDV@Y¨VH`M35YñV<™ Øâ7UsM,¥C°M#ã.b2 h OWHàM'tmp h =¥7U|G"KF¢Nüã@KKšW@?KæW@3K/XHN3VK¢X3bKëX<¢Žã7U‘˜7T~7Q0E ¤™³ã7U‘˜7T~7Q0En¤¥Òã7U (M¤,I´¤ƒ7T HC`N&ä5tmpBh 4Y=j7U~G Y;›NDˆä@)Y¶Y@Y5ZHN35Y~Z<[›rä7UsI2¡7UsCàN´ä.b2Kh ÇZHO'tmpNh G"Kü›@O`å@KK[@?Kp[@3KÌ[H@O3VK(\3bK›\ h ëv.Ñ0? ÷Æx.@ h dz.5VA )\|.TB ÷}.^C h ‘}./D e±~.@IE eÞ~.¹_F ¬g.AG e÷G Yà­ PM Ìï@)Y€@Yå€H P35Y.<ù­½ï7UsMŒ²CðPð.b2V h ŒH Q'tmpY h =x²7U|G"K¦¯PQk áð@KK×@?K#‚@3Kl‚HPQ3VKß‚3bK(ƒ<ð¯sð7U‘˜7T~7Q0El±™˜ð7U‘˜7T~7Q0Eα¥·ð7U (Mï±,I²ƒ7T HC Q ñ5tmpŽ h qƒ=ʪ7U~G Y›¨ÐQ mñ@)Yóƒ@Yr„HÐQ35Y»„<»¨Wñ7UsI’®7UsC R™ñ.b2— h …HPR'tmpš h G"K\©€R¬ rò@KKM…@?K­…@3K †H€R3VKe†3bK؆<¢©ò7U~7T7Q0E¶«ƒ!ò7T HEm­™Dò7U~7T7Q0E–­¥cò7U (Mº­,G ΩàR° Ñò@5 6‡@) ‡HàR3? ·‡3I ˆI$«Ç7U|7T‘˜EN¨šèò7U0E ©°ÿò7U4M8ªxEfªx$ó7Uv<ÿª8ó7U~ʰn7U2Ch &#é•CN(#ô¯Ch #÷Ch # (Ch %ñaW%õMS$ 3Dh $Ú~Fh $@IGe$¹_H¬$AIe,Fÿh ÀÓËœ(;é•ÿh •õ;|lÿh -ö;s›ÿh Œö% ;U:›7§ÔU~!5hÔ.ô¯h S÷.÷h ³÷. (h ø.@Ietø.¹_¬Pù.AeHúN 3h C°\gV—g ¨ Àx#V£ ¸‘°H].Xs ÷;û.(sý®ûTâ.ÄÕ9#@/÷û@/ü@/ü@û.?ü@ï.cü1ÄÕ93+/ü37/³üIýÕÝ7T ð7Q è 7R » 7X37Y S Tâ.7Ö9Ë@/ßü@/ý@/ý@û.ßü@ï.'ý17Ö93+/Sý37/wýIpÖÝ7T ð7Q è 7R » 7X37Y S EÕVã7U|E<Õaû7U|EXÕa7U|EyÕa+7U|I%Ö%¾7U|7T Àx#7Qw7Rv7X è G˜Ô@]<3@Í£ý@ÁÇý@µìý@©þH@]JÙJá3éFþ3õ~þ3Èþ3 ÿ3AÿE)Ôtü7U}7X1I½Õ'_7U '7T L7Qe7R X Tâ.hÔ86è@/{ÿ@/Ÿÿ@/Ÿÿ@û.Ãÿ@ï.çÿ1hÔ83+/37/7I ÔÝ7T ð7Q è 7R » 7X37Y S E¿Ô'_7U '7Qe7R X M‹ÖM8ó C%)Ö™ œK";é•C%ù(c;š C%)3;$C%);¥ C%)Î;ö C%e~Ub&d×Uúa!&d×Uña¤&ÎÛUõM™&ŽÜ.D%)à.E%)ž.F%)\.o£G%).ö%H%)Û.]°I%)¦ .¨ J%) .e£K%)\ ..{L%h  . 3M%)& .Ú~O%h | .ä~P%h Ã.î~Q%h `.ø~R%h e.Ñ0S%h Y.T%h ˜.5VU%h B.TV%÷‡.^W%h [./X%)  .:Y%)°!.EZ%)n". p[%eç#.^\%÷H%.@I]%e¼%.¹_^%¬¼%.A_%e¼%G YÀÞp]e%å@)Y&@Y€&Hp]35YÉ&<ÙÞÖ7UsM!äCÀ]!.b2t%h ''Hð]'tmpw%h = ä7U|G"Kpà ^‰%ú@KK]'@?K½'@3KZ(H ^3VK¶(3bKÿ(<²àŒ7U}7T‘€7Q0E8㥫7U (Eaã™Ð7U}7T‘€7Q0M®ã,IÉãƒ7T HC€^5tmp7&h [)G Yµ×°^A&v@)Y‘)@Y*H°^35YY*<Õ×`7UvI7â7UvC_².b2N&h ¢*H@_'tmpQ&h =tÚ7U}G"KÆØp_c&‹@KKí*@?KM+@3K©+Hp_3VK,3bKe,< Ù7U‘€7Ts7Q0MJÝ,Es݃I7T HE²ß™n7U‘€7Ts7Q0Ià¥7U (G'.uÙÐ_l&Ð@8.Á,HÐ_3B.÷,IÛÒ7U~Eì×¥ì7a‘ˆö)EØ¥7a‘ö)E!Ø¥$7a‘˜ö)E€Ø°;7U4ECÙ¥W7a‘ø~ö)E_ÙÞz7U7Ts7Q4EâÙx’7U}<ŸÚ¦7Us<Ûº7UsEÄÛÊ Ù7U @'<äÛí7Uv< Ü 7Us<Ü 7U‘€UõMÉ$nîUbO$$éUúaQ$$éUñaÔ$®í.m#)y>.n#)7?.o#)õ?.o£p#)³@.ö%q#)tA.]°r#)?B.¨ s#)®B.e£t#)âC..{u#h D. 3v#)¬E.Ú~x#h F.ä~y#h IG.î~z#h I.ø~{#h %K.Ñ0|#h N.}#h kP.5V~#h ØR.T#÷U.^€#h ñV./#)6Y.:‚#)[.Eƒ#)Ò[. p„#e£\.^…#÷^.@I†#ex^.¹_‡#¬x^.Aˆ#ex^G Y ðà`Ž#+@)Yì^@YP_Hà`35Y™_<¹ð+7UsM0öC0aP+.b2#h ÷_H`a'tmp #h =ö7U|G"KXòa²#),@KK-`@?K`@3K*aHa3VK†a3bKÏa<Ÿò»+7U}7T‘€7Q0E-õ¥Ú+7U (Eaõ™ÿ+7U}7T‘€7Q0M±õ,IÌõƒ7T HCðaC,5tmpg$h +bG Yué bq$¥,@)Yab@YàbH b35Y)c<•é,7UvI'ô7UvCpbá,.b2~$h rcH°b'tmp$h =Tì7U}G"K†êàb“$¶-@KK½c@?KdW3KHàb3VKyd3bKÂd<ÑêH-7U‘€7Ts7Q0M*ï,ESïƒt-7T HE’ñ™™-7U‘€7Ts7Q0Iþñ¥7U (G'.?ë@cœ$û-@8.eH@c3B.TeIøìÒ7U~E¬é¥.7a‘ˆö)EÅé¥3.7a‘ö)Eáé¥O.7a‘˜ö)E@ê°f.7U4E 륂.7a‘ø~ö)E)ëÞ¥.7U7Ts7Q4E¬ëx½.7U}<ìÑ.7Us<âìå.7UsE¤íÊ /7U €'<Äí/7Uv<êí,/7Us<úíB/7U‘€/ð;@)YÄ™@YCšHe35YŒš<ïûÚ;7UvI'7UvCàe,<.b2K/h ÕšH f'tmpN/h =¤þ7U}G"KàüPf`/=@KK ›@?K€›W3KHPf3VKÜ›3bK%œ<+ý“<7U‘ø~7Ts7Q0M),EPƒ¿<7T HEª™ä<7U‘ø~7Ts7Q0Iö¥7U (G'.˜ý°fi/F=@8.œH°f3B.·œIøþÒ7U~Eü¥b=7a‘€ö)Eü¥~=7a‘ˆö)E;ü¥š=7a‘ö)Ešü°±=7U4Efý¥Ì=7awö)E‚ýÞï=7U7Ts7Q4Eþx>7U}<Ïþ>7Us<êþ/>7UsE«ÿÊ N>7U À'<Ìÿb>7UvMåÿ,<4ƒ>7U|<[—>7U<ž«>7U~<Ê¿>7U}<ÚÓ>7Us<êé>7U‘ø~Eÿ°?7U3EŠ¥?7awö)<³/?7U<ÊC?7U~<ÚW?7U}M7ŽE–ƒƒ?7T È Eò¥Ÿ?7a‘€ö)E ¥»?7a‘ˆö)E(¥×?7a‘ö)Eb°î?7U3E x@7U~N7Us<ûRN7U|E.ƒqN7T È <á…N7U|<.™N7U}Edx±N7UsM…Ž<ïÒN7UsEa°éN7U4M,e,÷†ôh œ"U;é•ôh 3Ö;|lôh ÞÖ;s›ôh Î×U 0ýU:›,ŸU~!*`.e£õ)¾Ø.o£ö)5Ù.y£÷)€Ù.@IøeËÙ.¹_ù¬§Ú.AúeŸÛN 3ûh CjBSV—gÿ¨  y#V£¸‘°CàjóR.Xs÷’Ü.(sýÝTâ.(9¢Q@/tÝ@/˜Ý@/˜Ý@û.¼Ý@ï.àÝ1(93+/ Þ37/0ÞIaÝ7T ð7Q C 7R » 7X37Y S Tâ.Ä9WR@/\Þ@/€Þ@/€Þ@û.\Þ@ï.¤Þ1Ä93+/ÐÞ37/ôÞIýÝ7T ð7Q C 7R » 7X37Y S E&VoR7U}EMa‡R7U}EjaŸR7U}E‹a·R7U}I²%¾7U}7T  y#7Q‘°7Rv7X C M…xMµxMãxMµ,MÛ,M ,GOý0k1-T@MO ß@AOCß@5Ofß@)O ßH0kJYO2aOp3iOÖß3uOà3OXà3O‘à3™OÑàEÙFéS7U|7a‘˜ö)7T1M¥I'_7U (7T A7Q†7R X Tâ.`8+âT@/ á@//á@//á@û.Sá@ï.wá1`83+/£á37/ÇáI˜Ý7T ð7Q C 7R » 7X37Y S E·'_U7U (7Q†7R X MM8!J<@) œ¼^;é•<@È)óá;š <@)Ùã;$<@) æ;¥ <@)¹æ;ö <@eiçUD%¦AUë6AõUb¨AU bAUña+Bn#UõM B$UM%¤AUr,{Af".=@)Ëç.>@)‰è.?@)Gé.o£@@)ê.ö%A@)7ë.]°B@)Ïë.Ë$C@)wì.cD@)­ì.¨ E@)øì.e£F@)î..{G@h gî. 3H@)ûï.Ú~J@h dð.ä~K@h ¬ñ.î~L@h pó.ø~M@h ˜õ.Ñ0N@h Ÿø.O@h û.5VP@h ©ý.TQ@÷.^R@h Ð./S@)P.:T@)].EU@). pV@eŒ.^W@ek .iX@÷ .@IY@eˆ .¹_Z@¬ˆ .A[@eˆ G Y'`ka@OX@)Y @Yt H`k35Y½ <'@X7UsMÞ,C°k‹X.b2p@h  Hàk'tmps@h =Ë,7U|G"K¸(l…@dY@KKd @?KÄ @3Ka Hl3VK½ 3bK<ú(öX7U}7T‘ø~7Q0E½+™Y7U}7T‘ø~7Q0Eô+¥:Y7U (MX,,IŽ,ƒ7T HCl~Y5tmp¾Ah uG YaÀlÈAàY@)Y«@Y*HÀl35Ys<ÊY7UvI‡*7UvCmZ.b2ÕAh ¼HPm'tmpØAh =4%7U}G"Kr €mêAñZ@KK@?KgW3KH€m3VKÃ3bK <¸ ƒZ7U‘ø~7Ts7Q0M™%,EÀ%ƒ¯Z7T HEú'™ÔZ7U‘ø~7Ts7Q0IA(¥7U (G'. !àmóA6[@8.hHàm3B.žI°"Ò7U~E˜¥R[7a‘€ö)E±¥n[7a‘ˆö)EÍ¥Š[7a‘ö)E, °¡[7U4Eî ¥¼[7awö)E !Þß[7U7Ts7Q4E!x÷[7U}Ec#Ê \7U @(<„#*\7Uv<ê#>\7Us<ú#T\7U‘ø~M$,–5UD%H?02Uë6›>2UbJ?02U b€>02UñaÍ?–6UõMÂ?.7.¼=)¤#.½=)b$.¾=) %.o£¿=)Þ%.ö%À=)'.]°Á=)¨'.Ë$Â=)P(.cÃ=)™(.¨ Ä=)ø(.e£Å=)2*..{Æ=h {*. 3Ç=),.Ú~É=h x,.ä~Ê=h Ô-.î~Ë=h ˜/.ø~Ì=h À1.Ñ0Í=h Ç4.Î=h *7.5VÏ=h Ñ9.TÐ=÷)<.^Ñ=h ø=./Ò=)x@.:Ó=)8B.EÔ=) C. pÕ=eÛC.^Ö=eôE.i×=÷°F.@IØ=e$G.¹_Ù=¬$G.AÚ=e$GG Y :ðnà=õg@)Y¬G@YHHðn35YYH<9:æg7UsMI@C@o1h.b2ï=h ·HHpo'tmpò=h =6@7U|G"Kà; o> i@KKI@?K`I@3KýIH o3VKYJ3bK¢J<&<œh7U}7T‘ø~7Q0E?™Áh7U}7T‘ø~7Q0EX?¥àh7U (MÃ?,Iù?ƒ7T HCp$i5tmp`?h KG Y2@pj?†i@)YGK@YÆKH@p35YL<¡2pi7UvIç=7UvCpÂi.b2w?h XLHÐp'tmpz?h =T87U}G"K’3qŒ?—j@KK£L@?KMW3KHq3VK_M3bK¨M<Ý3)j7U‘ø~7Ts7Q0M¹8,Eà8ƒUj7T HE;™zj7U‘ø~7Ts7Q0If;¥7U (G'.J4`q•?Üj@8.NH`q3B.:NIØ5Ò7U~E¸2¥øj7a‘€ö)EÑ2¥k7a‘ˆö)Eí2¥0k7a‘ö)EL3°Gk7U4E4¥bk7awö)E44Þ…k7U7Ts7Q4E·4xk7U}E‹6Ê ¼k7U x(<¬6Ðk7Uv< 7äk7Us<7úk7U‘ø~M%7,n7U~EÛ>°-n7U4M‹?,M@ŽM[@ŽMr@Ž"°@h ðn#é•@È)#š @)#$@)#¥ @)%ña-@%õM)@$ 3@h $Ú~@h $@I@e$¹_@¬$A@e,„ Õ?h @œnt;é•Õ?h zN;|lÕ?h %O;s›Õ?h PU @AU:› @/BU~! @ðA.š Ö?)Q.$×?)|Q.¥ Ø?)ÇQ.@IÙ?eR.¹_Ú?¬òR.AÛ?eêSN 3Ü?h C qŒrV—gà?¨ €|#V£á?¸‘°Cðq=r.Xsã?÷ÝT.(sä?ýcUTâ.¸C9ù?ìp@/¿U@/ãU@/ãU@û.V@ï.+V1¸C93+/WV37/{VIñCÝ7T ð7Q C 7R » 7X37Y S Tâ.TD9ô?¡q@/§V@/ËV@/ËV@û.§V@ï.ïV1TD93+/W37/?WIDÝ7T ð7Q C 7R » 7X37Y S E¶BV¹q7U}EÝBaÑq7U}EúBaéq7U}ECar7U}IBD%¾7U}7T €|#7Q‘°7Rv7X C MAxMEAxMsAxMEC,MkC,M™C,GbnA@r@xs@—nkW@‹nŽW@n±W@snëWH@rJ£n2«nD3³n!X3¿nYX3Ën£X3×nÝX3ãnYE AÈd3s7U|7a‘˜ö)7T1M¥A¥ID'_7U x(7T "@7Q 37R X Tâ.ðA8 @-t@/WY@/{Y@/{Y@û.ŸY@ï.ÃY1ðA83+/ïY37/ZI(BÝ7T ð7Q C 7R » 7X37Y S EGB'_`t7U x(7Q 37R X M¨DM8hy+ h °D œ|;é•+ ž'?Z;ô¯+ h ü[;÷+ h ²\; (+ h ó_;ö + e£`UñaÌ zI%õMà .€¢, h Wa. 3- h \c.Ú~/ h »c.ä~0 h e.î~1 h g.ø~2 h j.Ñ03 ÷3l.4 h $n.5V5 ÷0p.T6 h ¸p.@I7 eQr.¹_8 ¬Þs.A9 eÎuG YˆKpr? #v@)Y`w@YÄwHpr35Y x<¡Kv7UsMSPCÀr_v.b2I h kxHðr'tmpL h =?P7U|G"KéL s^ 8w@KK¶x@?Ky@3KryH s3VKåy3bK.z<3MÊv7U‘˜7T7Q0EÂN™ïv7U‘˜7T7Q0EO¥w7U (M'O,ILOƒ7T HC€sbw5tmp‚ h Šz=ÒG7UG Y9E°s„ Äw@)Y {@Y‹{H°s35YÔ{°H x3? t°3I ½°IÔVÇ7U|7T‘˜G"K•Uàxþ %‡@KK±@?KT±@3KÚ±Hàx3VK#²3bKl²<ßU·†7Us7T‘˜7Q0E>^™܆7Us7T‘˜7Q0E€^¥û†7U (Mž^,IÃ^ƒ7T HEŒSš<‡7U0EHT°S‡7U4EdUšj‡7U0EzU°‡7U2EYVÝ­‡7T — 7Q ’ <¯VÁ‡7U<WÕ‡7U|EoW°ì‡7U3EX'_$ˆ7U ð(7T~7Q}7R X =@Y‡=H@ˆ35YÐ=H€ˆOK-I’ˆÝ7T ø IU…a7TsG Yi…Ј‹-ã­@)Yf>@Yå>HЈ35YV?<’…Ì­7UwI>’7UwC ‰®3º£Ÿ?HP‰OÇ£G"Kꈀ‰§-Ö®@KKû?@?K[@@3K·@H€‰3VKA3bK\A<3‰j®7Uv7T~7Q0E˜‹™®7Uv7T~7Q0E\Ž¥¬®7U (M~,I¥ƒ7T HG6)k‰à‰«-ó¯@G)¸AHà‰3S))BG.-Á‹ð‰ËUݯ@?-˜BHð‰OK-G YÈ‹@ЏT¦¯@)YöB@Y?CH@Š35YˆC<å‹|¯7Ts<ô‘¯7Ts$I½’7TsH€Š@?-æCH€ŠOK-IŒÝ7T ø I~‰a7TsG Y’‰°Š­-i°@)YD@Y‚DH°Š35YËD<¶‰?°7U~<ÏŽS°7U~IÑ‘7U~C‹™°3Ö£EH0‹Oã£= ’7U‘ø~G"KSŒ`‹É-p±@KKpE@?KÐE@3KBFH`‹3VKÄF3bK"G<¡Œ±7Uv7Tw7Q0EñŽ™'±7Uv7Tw7Q0EÈ¥F±7U (MR,I›ƒ7T HG"Klà‹å-G²@KK‘G@?KñG@3KvHHà‹3VKÒH3bKI<ºÚ±7Us7Tw7Q0E×¥ù±7U (E ‘™²7Us7Tw7Q0M/‘,I\‘ƒ7T HEÊzš^²7U0EŽ{°u²7U4M2}¥Ef}°™²7U2<Î}­²7U<:~Á²7U|=¢Û@KKfç@?KÆç@3K"èHpœ3VK~è3bKÇè<¦Æ6Û7Uv7Ts7Q0EVÉ¥UÛ7U (E´É™xÛ7Uv7Ts7Q0MÊ,I?ʃ7T HG6)éÆМB=ÅÜ@G)éHМ3S)léG.-SÊàœËU¯Ü@?-ÛéHàœOK-G YZÊ@¸TrÜ@)Y$ê@YmêH@35Y¶ê<‚ÊHÜ7Tv<>Ð\Ü7Tv$I’Ð7TvH€@?-ëH€OK-IÎÊÝ7T ø 7Qv$IÇa7TvG Y&ÇÀD=;Ý@)Y7ë@Y›ëHÀ35YäëÁ¦à7UsH€¥3S)¾>G.-Ïä¥ËU ñ@?--?H¥OK-G YÖäॸTÒð@)Y‹?@YÔ?Hà¥35Y@<ôä¨ð7Ts<5ö¼ð7Ts$Içû7TsH ¦@?-{@H ¦OK-I(åÝ7T ø Imâa7TsG Y‚âP¦|"•ñ@)Y³@@YAHP¦35Y`A<§âkñ7U~|Se‚ÿ%õMS"èZƒSeœÿ%õM“S"&ÊVh Òÿ#i)ÊVh #ЂÊVh $Ô)ËVh [i¢¡SüXœ© UõM’TŽUñaT®.Ú~§Sh ZS.ä~¨Sh ÝT.@I©SeV.¹_ªS¬_W.A«SeûXG ÿü­·SyH­R1ÿ‘à}R=ÿ‘ð}Dsü7RJÿ‘€~E›üñ7U|7TÈ7Q X+7Rs7X (+7YvIªü 7U07T|7Q1EGüD7Us7T47Q L 7R27X7MLüIeü7Uv7T47Q R GKþ`­ßSèH`­JKKÿLþ`­™S@MaZM1þ#Mkþ.I»þ97Q0Ghÿ÷þ­ïSæH­JyÿK.-÷þð­}S@?-ÆZHð­OK-G Yÿ`®¸T§@)Y"[@Yk[H`®35Y´[<ÿ}7Ts FÍ\hwh \O€h \¼h†h \1‘‹h \Ç’Œh \?o“h \•h \¤œh \"–¤\Ï6eV3µh Ы#Vz¶h È«#VÑ2·h À«#VÞ“¸h ¸«#VHD¹h °«#$@Iºe$A»eV#t¼“  p Ÿ ¬$¹_½¬ ¬´  ‰$û2ÀÀ  ¤ VèHÔ  ¨«#Vhã  «#VÓòÓ ˜«#V+c× «#Vž¥! ˆ«#VÓK'„# €«#V`„:¤% x«#V/`Ku' p«#VpCê®* `«#$Ø $…$­Š $¬ !$Îh"$a¡#$¼u$$ë}%$ƒ-&_Â(e 8¨#V1U+h P«# £3  ‰Vð—,#  qw#V¯_-#  ow#Vý|.#  mw#Vj˜/#  kw# £›  ‰VUl0‹  hw#VÍz1‹  ew#V#€2‹  bw#V.€3‹  _w#V9€4‹  \w#V®€5‹  Yw#VÖ„6‹  Vw#V¹€7‹  Sw#VFˆ8‹  Pw#VQˆ9‹  Mw#Vˆ™:‹  Jw#V“™;‹  Gw#Vž™<‹  Dw#VÌœ=‹  Aw#V.¯>‹  >w#V9¯?‹  ;w#V¯@‹  8w#V;A‹  5w#Và+B‹  2w#V°ŸC‹  /w#V»ŸD‹  ,w#V^¢E‹  )w#V«F2 %w#V$XG2 !w# £» ‰VŽ£H« w#Vƒ—I« w# £÷ ‰Vr+Jç ûv# £ ‰ V/SK  ðv# £C ‰ VïL3 àv#VšIMÐ Øv#VõIN« Èv#VUO3 ¸v#VïvP3 ¨v#Vð“Q  ˜v#VùR  ˆv#V”S  xv#V{>T  hv# £ ‰V_iU  Xv# £? ‰ V*KV/ Hv#VÓW/ 8v#VóxX  (v# £‘ ‰ VuY v# £· ‰V#Z§ v# £Ý ‰VkD[Í àu# £ ‰VY/\ó Ðu#V®“]§ °u# £? ‰VÒ™^/ u# £e ‰$VIš_U `u#V[`U  u# £¡ ‰ VXPa‘ àt# £Ç ‰V±0b· °t# £í ‰*VcXcÝ €t# £ ‰.VÄ•d @t#V2 e t# £O ‰)Vñf? Às#Vá›gh H«#V7/hh @«#V'}ih 8«#V/Ojh 0«#VFkh («#VÅvlh  «#Vh:mh «#VÎqnh «#VµŒoh «#Vph «#V¨¥qh øª#VÞrh ðª#VÊsh èª#VÛ‘th àª#VÞ±uh ت#V>Bvh Ъ#Vewh Ȫ#Vѱxh Àª#V¼zyh ¸ª#Vú‹zh °ª#Vw{h ¨ª#V&‰|h  ª#V&›}h ˜ª#Vóž~h ª#Vh ˆª#V‹˜€h €ª#Vbh xª#Vm>‚h pª#Vµ:ƒh hª#VH{„h `ª#VI›…h Xª#V^›†h Pª#VyN‡h Hª#V–ˆh @ª#VU3‰h 8ª#V–Šh 0ª#Vª‹h (ª#VŒh  ª#V–h ª#V£Žh ª#Vfgh ª#V° h ª#V5‘h ø©#Vž’h ð©#Vj¨“h è©#VK,”h à©#VX,•h Ø©#Ve,–h Щ#V-0—h È©#VR˜h À©#Vq!™h ¸©#V–!šh °©#V´›h ¨©#V¶1œh  ©#V^h ˜©#V™žh ©#VÃ1Ÿh ˆ©#Vý' h €©#V¾3¡h x©#V»J h p©# £ ‰:VÌŒá  €s#_€~ã ² ¨# £Ù ‰ƒVÂ¥¬&É àr# £ÿ ‰‚V(v3Bï @r# £% ‰2VŽ‹F r#_íDF² À§# oa ‰VuFNQ @§# ~‡ ‰VtrLNw à¦#VLQNÍ @¥#V.ŠNx `©#Vx½NQ à¤#V8ÃNw €¤#VUZÈNÍ à¢#V_xOè P©#V–l4OQ €¢#Vì‘:Ow  ¢#V‚?OÍ € #V¿¤xO« @©#Vq$•OQ   #V¯˜›Ow ÀŸ#VG OÍ  ž#Vl_ÙO•  ©# oá ‰V$PÑ  # ~ ‰VY /P÷ à›#V¨,:PÍ @š#VF@sPI! à¨# oY ‰ Vç/òPI À˜# ~ ‰V½4Qo –#VÆ=QÍ `”#V °NQB# À¨#Va1QÑ `“#V¹ŒQw “#Vh7‘QÍ `‘#V„¬ÊQH% €¨# o) ‰ VA‘IR #VáRWRo @#VäPkRÍ  ‹#VßW¤R3' `¨# o‘ ‰VÔJÙR ÀŠ#VØ#ãR÷ €‰#VjfîRÍ à‡# oã ‰VS1(SÓ @¨#   ‰;Vï)>Sù €~#`ÊÊÚ`ыы6a,_,_a‡l‡lpa a a ?aShSh BaˀˀGaQ<Q<5avv4aJJ=ah]h]a 8 8/a{{ 3aîî(`;D;D”a¨g¨g9a¥¡¥¡ KaHZHZÄaªª &`faþþ a§ƒ§ƒmaÀ…À… J`¥¥a¶™¶™Oa[[ Ea{{sb› › aæcæcza˜ƒ˜ƒn`»L»LÛa¦¦ 7a'¤'¤Na¦¦!œ`ãã0aococ5a„„ä`ò9ò9ëa¡E¡E4`''å` e eÕaÕ‚Õ‚]`’Ÿ’Ÿµ`±‚±‚AaÓAÓA" aŸ§Ÿ§#man™n™ Ta…… >`{{îa”e”e.`ý*ý*×at˜t˜\aGG$ua½ˆ½ˆ%`€g€gØ`®¦®¦Á% U$ > : ; I$ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I I: ; ( 7I : ; : ;I8 : ; nII : ; I8  : ; n: ;I : ;n< : ;  : ; I8 : ;  I: ; n : ;I8 ! : ;".: ;I #: ;I$4: ;I% : ;&: ;I'4: ;I(.: ; ) * : ;+ ,.: ;I@—B-: ;I.4: ;I/1X Y011 2 13414: ;I54: ;I6‰‚•B“B7Š‚‘B8.: ;I@–B9.: ;@—B:‰‚•B;: ;I<‰‚=‰‚>‰‚•B?.1@—B@1A‰‚•B1B.: ;@–BC UD E‰‚1F.: ;@G1RUX YH UI‰‚1J 1K1RUX YL41 M‰‚1N4: ;I O41P‰‚“BQ1 R41S1 T1X YU : ;V4: ;IW1X‰‚•B1Y.1@ZŠ‚1‘B[.?: ;@–B\4: ; I?<]4: ;I?<^!_4: ;I?`.?<n: ;a.?<n: ; b.?<nð£Ùû /usr/lib/gcc/x86_64-linux-gnu/5/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/python2.7/usr/include/x86_64-linux-gnu/sysgraphicsPrimitives.cppstddef.htypes.hstdio.hlibio.hpyport.htime.hobject.hmethodobject.hdescrobject.hintobject.hfloatobject.hstringobject.htupleobject.hlistobject.hclassobject.hframeobject.hpystate.hcode.hunicodeobject.hboolobject.hlongobject.hbytearrayobject.htraceback.hpyerrors.hceval.hobjimpl.hpycapsule.hdictobject.hpymem.habstract.hmoduleobject.hmathcalls.hwarnings.hpythonrun.hmodsupport.himport.hconfname.h @TÀ2p‚KŒ Jp¬u‰Öp¬uÇÖp¬uæ(ÖG?Y½„K­;K.æyO ç G?Y½„K­;K.æyO È G?Y½„K­;K.æyO  ”su×;=.‘u×X‘u×XfvíïÃòq?Y“„u­;u.æy<O ÿ ”su×;=.‘u×X‘u×Xfvíïµò0=-“”/7YóÕ; X n‚.½wºM‘†Z®z¬ ~äM‘†Z­v:uuØwXþ~äM‘†Z­"yŸ~äM‘†Z­v:uuØwXà~äM‘†Z­æyº™äM‘†Z®z¬ƒäM‘†Z­æyºƒäM‘†Z­æyºœä‘æÚê~(K¾‘hÈœ CYºººuuþñú~ò CYºuuž~¬ CYºººuuþñÜ~ò CYÖuuŸ~ CYÖuu€ CYÖuuÌ0,h,L\Zk70K-‡¸º IY‹%ßXM+[Ž.‚½K¡KöXŸ;=/=„­gI­Ô’Ô¾t¢8@/Ly"¢8@ f±‘Ö׃ž‘–.êt—f‚? ­²iò"ž;=I=-3V=K­ÏäŠòÝòºä»L:>»;=iwÆ’q"KKÅžó«òŸ‘uŸŸ=KÍw¬ÙfJ§XÙfJ L¥tãfÖ'î~ðIJ6XðIJ LŽ6túIÖ†6'vøHJŸ‰7äüH¬<uî6.÷Hžƒ7ò²HJŸÏ7ä¶H¬<u´7.±HžÉ7òìGJŸ•8äðG¬<uú7.ëGž8ò¦GJŸÛ8äªG¬<uÀ8.¥GžÕ8òàFJŸ¡9ääF¬<u†9.ßFž›9òšFJŸç9äžF¬<uÌ9.™Fžá9òÔEJŸ­:äØE¬<u’:.ÓEž§:òŽEJŸó:ä’E¬<uØ:.Ež± ò ‚`f*<vX ‚„ÊÊ1LLRJÈÖÊZZ1LL«JÈò$¬”tí “.! Çò»ò'ò!òaäò»tÃfuu«eJ¬¾òÁ‚½oä& ÖZh„„v„hh[NZZLvX>„„„„„„Ô‚ ÖZwcLן>­ 7 –~òåtZhh„v„„h[PZLZtX>„„„„„„ý~ #<hÖ-;×óóóóåK-[™~.â<©Ö-;¿> òóïóõÐ~ò¨òƒåÉ”;éòuuMòºò¦Ö;x‚%‰Ö/¹ò£Öx‚'dÖ-;y°¬¸t Öx‚)žbÖ-;x‚+º`Ö-;w꺖Ö-ž^Ö-v<ìÈ”Ö/ \Öu.îò’Ö1 OÖðJ׺\0&0_@À9w´:t°JðÏX°J LîÏtš°ÖæÏ'¬°$vhhhhhhô%XutvJJmó~¬%fZh„„„’h]HJm ˆBžø='zÖAJ¬> ÝAž£>'z«AJ×> ²AžÎ>'z€AJ‚? ‡Ažù>'êO<Xº)JW.‚MÉ t\J$J\<È`ä<Xº)JW.‚MÉ t\J$J\<È¥Íä—œJëã䦜ÈÚã'zÜ›J¦ä 뛞•ä'z¡›Jáää°›ÈÐä'zæšJœåäõšÈ‹å'z«šJ×åäºšÈÆå'zð™J’æäÿ™Èæ'zµ™JÍæäęȼæ'zú˜Jˆç䉙È÷æ'z¿˜JÃç Θž²ç'zï”J“ë ö”žŠë'zÄ”J¾ë Ë”žµë'z™”Jéë  ”žàë'zî“J”ì õ“ž‹ì'zÓJ¿ì Ê“ž¶ì'z˜“Jêì Ÿ“žáì'×<Xº)JW.‚MÉ t\J$J\<ÈõàäχJ³øäևȪø'z¤‡JÞøä«‡ÈÕø'zù†J‰ù䀇Ȁù'zΆJ´ùäՆȫù'z£†Jßù䪆ÈÖù'zø…JŠúäÿ…Èú'ð‘<Xº)JW.‚MŸ J\J$J\<<óìäºþ~JȺÁþ~‚¿'ãö~JmJ$t\'«yJmJ$t\'žš òuJt$!ç 6yÖzJæx- éwt ‚‘Uº‡æäYA#“zƒ‡zJ8‚…¹<×È­¥2uJÉ@åôéç£YKgxJŸ¢ž ºŸ`ä˜à~‚  ò;ƒfÙÞ|JÄJ½|tö¿X ‚d.cò…›?Š ž…à~8vvduåN8Nˆè|ä‘‹ä÷|‚–Èä5ž»`ží   ò;ƒfÙ†œJ’œä~MŸeJ .%Mò…›?í›#¢ä~8vvduåN8Nˆœäs<•ä~.\Ö ‚$œ<Œä~Öç  ò;6/fÚIKYHZY‘‘’žKä¬Yä¬YäóJäóžJ!ò 1wJ X*öÁ‚c.\X J X X X X fwfSX6XªXl)óóóóóRòÇŽ(ëñ~8vv¼K$‘‘‘‘‘”ƒI=£ºOºOºOºOºO .Ö!Ö!Öu<‘$ä,ÖÇX»¥žÍñ~9ÄÖE䪎0Òñ~9®ŽºÈñ~9¸ŽÖÃñ~9½ŽÈ¾ñ~98ȵX¢Ö ò;$#fÚIKYHZY’ó<Öó<óäX)òXKrJ/X^.uJW X XKsJ XKW XƒIY XÚ/ J¥.Î( tóóóTž£‡fù~8vvLK­‘‘‘”ƒI=¬ºO º.Ÿ‚%Ö'%î<»ï~.’õºO‚ „‡0øø~9ˆ‡ºóø~9‡Èîø~9*f¾‚  ò;fÙK$J¬&-/[ž[! ‚AM ÖtJ ‚L<''¸t’ê(„–8vv¾tuã=lƒ;=¿‚Op‘ž‰ê*ó•9ºõufJpX.pXò=;=5fÚIKYHZY‘‘‘’žKä¬Yä¬YäóJäóžJóòž*ògrJYYglXJY‚XXY ȃƒHZ XvJ XwJ X w‚ ‚†ŒXô~.  Ö  JmXXwJ ‚IKJsJJJpfvJ‚rJ JKIJgJ‚L ‚JpfJr‚ JJpJJfJ‚JtJ‚ ‚Ú v. tÚ v. tÚ, tÞ}.q)zòuóóóó‡òä§}äK$‘‘‘‘‘‘”ƒI=•ºOºOºOºOºOºO_Úó(ߌ8vvrÖŸÖŸÖó<‘­ä&&ó YÁž/ï𞿌9ž òtÉ~ä„J¸ó.ÄŒ9¼óººŒ9ÆóÖµŒ9ËóȰŒ9ÐóÈ«Œ9?Ö­XºJJoX.oX.=;=;fÚIKYHZY‘‘‘»¼žKä¬Yä¬YäóJäóžJó$žó*ò-ò6@ XuXfeJ XXeJYtKqJX_XXpX XH XvJ XXJYX X\‚g Xgf  wJ ‚¾>XBf#J X XKf X Ö6JJ-X ‚ Ö XwXSfrJ*X XZXrXX‚žVXXr‚‚†„‚ .\X XJrXXrX‚JpJ[JX ‚… Jw‚ ‚ Jwž ‚I¼JÅJrJ Jw‚‚rJ JgJfJ ‚‚uJJtJ‚ ‚Ú tÎ|Jp0zòóóóóó¶òÌ|ä´òK»»»‘‘‘‘‘”ƒI=•ºOºOºOºOºOäOäOZ.‹Õ(µ«8vvqÖŸÖŸÖó<‘$ä&&0,“ÖY±ž/‰Ñž“«9 Y7 Y† Ù}äâ~fäÔ.˜«9ÿ6éÒ9Ž«9òÔÖ‰«9÷ÔÈ„«9üÔÈÿª9ÕÖúª9ÆÈ¥XÞ7òJlX.lX.=;=ÍfÚIKYHZY‘»»»»»»¼¬Yä¬Yä¬YäótYtYtYtäóÈJó$žó*ò.ò ž»sLzgdyf‚qJŸ.qXŸ.qXŠNtJ;frJg frJTuy tYoJtrJSggf XKcJXZWfXffXX XvJ XwJ X WwJ ‚gÌ)J fsXWX‚Ö fXJ‚ÖXPÈ'‚  XnJ X Xw‚ ‚ vX ‚‚ ‚ïJø~.JtJsJ ‚‚JpJKØJv‚‚JeJ JwJ ‚ØJv‚‚JeJ JwJ ‚ÖrJJtJ‚‘}‚m)zòóóóóóôóóóœòK»»»»»»»»‘‘‘”ƒI=yºOºOºOäOäOäOäOäOäOäOK.“.Âc8vvnÖŸÖŸÖó<=<=<=<‘­ä&&0,›ÖYðž/Ø|žÝ.Ÿc9ẚc9¢äY‘-ã,Ïd•c9ëÖc9ðÈ‹c9õȆc9úÖc9ÿÈüb9„º÷b9‰ºòb9ÛÈXª‚„­Z"ŸƒVDuò .uJg‘i¡ç¶ê~X  ò;ƒfÙº•J’èê~MŸeJ .%Mò…›?¡•#îê~8vvduåN8NˆÄ•äs<áê~.\Ö ‚$Õ<Øê~ÖÑ•tÖ­KKKƒƒ‚QX/JRhääh<'ºo<X¼Wt*JV.ý{f‘–äòÙ{<­•¬Ìê~XšJçxt¾•XZç—Žtññ~ºu< X¼Žtôñ~JŒŽ.Îê~f‘•t òàx<»¬< ò;ŸfÙKK{J›Xæztö–‚åzJäztöË‚Mt3<MWuìgŸŸûtå;=gÊÛ~J»‹JÆô~tö¶‹‚’Ÿx lÖåy\òNf;3<9îô~É—‹.Kf;6<z<µÙÓg"K‘KKK°*™ïg ‘<ïg<²‚Í<=õÖÝ~tK󩢂•pN‰it®fÍ<@ø.—<ñg09²fÍ<<÷ZHLZïX»’'­W=uŽhuu[ZPTFRÙp óaò¬fÔ<9Ìô~ºÉ¹‹¬©f×<z<“1õg(K‘KKY¢ç÷<‘hÈï<‘h<ñ=ð íg("<=eAd9A ºåòÙØgtÞô~#ÉØºŠò‡0¼ô~‚ÉØ·£òúf9Ìõ~È‘ØÔŠ9¬õ~XÅ‹òl<.^¬½/<rtÆO L4Öƒkfd‚å¤òâÚtž¥t=áÚò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ÅÈX­’"×u¹·ŸõЬŸ¯<®¬\.'Jž#äåáåçTòñøÐòН‚öÐ<Н.f&ÖY¬T?*„¥‚uÓÚ‚,-;3žQò,-‚K‘KKY°ËÌÈ.¼·ÈÄÈ<¼·<Ç;ÇÈ‚\¡¥·t”¥fþÚ;+;<   ò;!fÙKIYZó<Öòuä 'eòoòêÇ(¬¸8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖáÇ0›¸9º}<L4Öƒkfd‚±¦ò–Ùtê¦t=•Ùò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’‘ÊX­’"×uíµŸÁÒ¬ŸÁ­<®¬\.'Jž#äåáåçTòñÄÒò¾­‚ÂÒ<¾­.f&ÖY¬T?*Ц‚u‡Ù‚,-;3žQò,-‚K‘KKY°Ë˜Ê.ðµÈÊ<ðµ<Ç;“Ê‚\¡Ùµtà¦f²Ù;+;<   ò;!fÙKIYZó<Öòuä 'eòoò¶É(à¶8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö­É0϶9º°%<L4Öƒkfd‚Úÿ~òíÿt“€t=ìÿò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’º#X­’"×uÄ\Ÿê+¬Ÿ˜T<®¬\.'Jž#äåáåçTòñí+ò•T‚ë+<•T.f&ÖY¬T?*ùÿ~‚uÞÿ‚,-;3žQò,-‚K‘KKY°ËÁ#.Ç\ȹ#<Ç\<Ç;¼#‚\¡°\t‰€f‰€;+;<   ò;!fÙKIYZó<Öòuä 'eòoòß"(·]8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖÖ"0¦]9º%<L4Öƒkfd‚Žþ~ò¹tÇþ~t=¸ò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’î!X­’"×u^Ÿž*¬ŸäU<®¬\.'Jž#äåáåçTòñ¡*òáU‚Ÿ*<áU.f&ÖY¬T?*­þ~‚uª‚,-;3žQò,-‚K‘KKY°Ëõ!.“^Èí!<“^<Ç;ð!‚\¡ü]t½þ~fÕ;+;<   ò;!fÙKIYZó<Öòuä 'eòoò“!(ƒ_8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖŠ!0ò^9ºÁ{<L4Öƒkfd‚¦ò¡þtßt= þò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’†%X­’"×uøZŸ¶-¬ŸÌR<®¬\.'Jž#äåáåçTòñ¹-òÉR‚·-<ÉR.f&ÖY¬T?*Å‚u’þ‚,-;3žQò,-‚K‘KKY°Ë%.ûZÈ…%<ûZ<Ç;ˆ%‚\¡äZtÕf½þ;+;<   ò;!fÙKIYZó<Öòuä 'eòoò«$(ë[8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö¢$0Ú[9ºצ<L4ÖYkfd<¨Y‚Ÿ&táYt=ž&ò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ˆýX­’"×uö‚Ÿ¸…¬ŸÊú~<®¬\.'Jž#äåáåçTòñ»…òÇú~‚¹…<Çú~.f&ÖY¬T?*ÇY‚u&‚,-;3žQò,-‚K‘KKY°Ëý.ù‚ȇý<ù‚<Ç;Šý‚\¡â‚t×Yf»&;+;<   ò;!fÙKIYZó<Öòuä 'eòoò­ü(éƒ8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö¤ü0؃9º%<L4ÖYkfd<ÜW‚ë't•Xt=ê'ò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’¼ûX­’"×u„Ÿìƒ¬Ÿ–ü~<®¬\.'Jž#äåáåçTòñïƒò“ü~‚íƒ<“ü~.f&ÖY¬T?*ûW‚uÜ'‚,-;3žQò,-‚K‘KKY°ËÃû.ńȻû<Å„<Ç;¾û‚\¡®„t‹Xf‡(;+;<   ò;!fÙKIYZó<Öòuä 'eòoòáú(µ…8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖØú0¤…9º”é<L4Öƒkfd‚¡í~ò¦’tÚí~t=¥’ò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’X­’"×uýnŸ±¬ŸÑf<®¬\.'Jž#äåáåçTòñ´òÎf‚²<Îf.f&ÖY¬T?*Àí~‚u—’‚,-;3žQò,-‚K‘KKY°Ëˆ.€oÈ€<€o<Ç;ƒ‚\¡éntÐí~fÂ’;+;<   ò;!fÙKIYZó<Öòuä 'eòoò¦(ðo8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö0ßo9º%<L3Öƒkfd‚Öë~òò“tŽì~t=ñ“ò’Y’[ 4žž×­XŸXŸX­XŸXfŸu-\AX¤’µX­’"×uÉpŸå¬Ÿh<®¬\.'Jž"äåáåçUòñèòšh‚æ<šh.f%ÖZ¬T?*ôë~‚uã“‚,-;3žQò,-‚K‘KKY°Ë¼.ÌpÈ´<Ìp<Ç;·‚\¡µpt„ì~fŽ”;+;;   ò;!fÙKIYZó<Öòuä 'eòoòÛ(»q8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖÒ0ªq9ºÂ{<L4Öƒkfd‚íî~òÚt¦ï~t=Ùò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ÍX­’"×u±mŸý¬Ÿ…e<®¬\.'Jž#äåáåçTòñ€ò‚e‚þ<‚e.f&ÖY¬T?*Œï~‚uË‚,-;3žQò,-‚K‘KKY°ËÔ.´mÈÌ<´m<Ç;Ï‚\¡mtœï~fö;+;<   ò;!fÙKIYZó<Öòuä 'eòoòò(¤n8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Öé0“n9º¶—<L4ÖYkfd<V‚·)tÉVt=¶)ò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ðùX­’"×uކŸ ‚¬Ÿâý~<®¬\.'Jž#äåáåçTòñ£‚òßý~‚¡‚<ßý~.f&ÖY¬T?*¯V‚u¨)‚,-;3žQò,-‚K‘KKY°Ë÷ù.‘†Èïù<‘†<Ç;òù‚\¡ú…t¿VfÓ);+;<   ò;!fÙKIYZó<Öòuä 'eòoò•ù(‡8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖŒù0ð†9ºÐ1<L4Öƒkfd‚™£ò®ÜtÒ£t=­Üò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ùÆX­’"×u…¹Ÿ©Ï¬ŸÙ°<®¬\.'Jž#äåáåçTòñ¬ÏòÖ°‚ªÏ<Ö°.f&ÖY¬T?*¸£‚uŸÜ‚,-;3žQò,-‚K‘KKY°Ë€Ç.ˆ¹ÈøÆ<ˆ¹<Ç;ûÆ‚\¡ñ¸tÈ£fÊÜ;+;<   ò;!fÙKIYZó<Öòuä 'eòoòžÆ(ø¹8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö•Æ0ç¹9ºÝl<L4Öƒkfd‚•µò²Êtεt=±Êò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’õØX­’"×u‰§Ÿ¥á¬ŸÝž<®¬\.'Jž#äåáåçTòñ¨áòÚž‚¦á<Úž.f&ÖY¬T?*´µ‚u£Ê‚,-;3žQò,-‚K‘KKY°ËüØ.Œ§ÈôØ<Œ§<Ç;÷Ø‚\¡õ¦tĵfÎÊ;+;<   ò;!fÙKIYZó<Öòuä 'eòoòšØ(ü§8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö‘Ø0ë§9ºÁ{<L4Öƒkfd‚­¸òšÇtæ¸t=™Çò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ÜX­’"×uñ£Ÿ½ä¬ŸÅ›<®¬\.'Jž#äåáåçTòñÀäò›‚¾ä<›.f&ÖY¬T?*̸‚u‹Ç‚,-;3žQò,-‚K‘KKY°Ë”Ü.ô£ÈŒÜ<ô£<Ç;Ü‚\¡Ý£tܸf¶Ç;+;<   ò;!fÙKIYZó<Öòuä 'eòoò²Û(ä¤8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘Ö©Û0Ó¤9º%<L4Öƒkfd‚á¶òæÈtš·t=åÈò’Y’[ 5žž×­XŸXŸX­XŸXfŸu-\@X¤’ÁÚX­’"×u½¥Ÿñ⬟‘<®¬\.'Jž#äåáåçTòñôâòŽ‚òâ<Ž.f&ÖY¬T?*€·‚u×È‚,-;3žQò,-‚K‘KKY°ËÈÚ.À¥ÈÀÚ<À¥<Ç;ÃÚ‚\¡©¥t·f‚É;+;<   ò;!fÙKIYZó<Öòuä 'eòoòæÙ(°¦8vvxdòue=lƒ;=¿ºO ž.Ÿ‚fº‘ÖÝÙ0Ÿ¦9ºå#<LÑ I¬bJ¬š‘Jøítˆ’tŸ÷íf’¼0ææ[ É.hŸXŸX­X­XŸXŸ²E3©¬ø’Zª5X»’#­ƒÕJ/M¬Y‚p‚+ï<äæ…óîôñö›ò,Jžz0ãY‚‹’È×úíäl‚;;‚j‚;‚K‘KKY°ç³5tØJÈ©5º\¡¾Jtû‘<‰îÖÛò  ò;ŸfÚIKYHZZ¬YäóJäòu¬o'_òÄ4täK8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘ 4žÑK92ä»Qt«40ÌK9#XéJÈLÑÖ@¬b ¬âDJ°:tÐEtŸ¯:f’¼0ææ[ É.hŸXŸX­X­XŸXŸ²E3©¬ø’ZòèX»’#­ƒ—/M¬Y‚p‚+ï<äæ…óîôñö›ò,Jžz0ãY‚ÓEÈײ:äl‚;;‚j‚;‚K‘KKY°çûèt—Èñèº\¡ö–tÃE<Á:ÖÛò  ò;ŸfÚIKYHZZ¬YäóJäòu¬o'_òŒètœ˜8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘è瞉˜92ä»Qtóç0„˜9#XÞ[ÈL9Öò×g<×t©htŸÖf’» %[ /%ž=ä­XŸXŸXŸX­XŸXŸ»MEXÜ’ZÌ‹X»’"×u³ô~Ÿ­‚ó®¬W$,Jž0åí((åç\òññ†hä×ÉäŽ-;;y,-;7¬Mž,-‚K‘KKY°*Õ‹t¶ô~ÈÊ‹<¶ô~<;-΋‚¹ô~¬<\t=/?/Ì‹ž¡œô~thÈøò;+;-5¬  ò;ŸfÚIKYHZZ¬YäóJäòuòo"_ò‹t§õ~8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘ÝŠž”õ~92ä»QtèŠ0õ~9#XêoÈj<ä03 0³‚Ï< ¿XÌvž¶ JËvtö± ‚”K‘KKK¢ç0ZHLY’Y’ó™X­’'­W=u‰æ~ŸàvžY­K‘ž XžHL:,f ¬" ò º<ó ¬l‚®%f½Ö òäàväYŸ XávXlš òÆ=¹çmòŠš0å~XX7<­X­XŸXŸXŸXŸ½:LdLÉXfôgpwt((åóó‹tÏv‚ÉÁ£.Œæ~Èô™<Œæ~<õ™È5¶Ü~+òtŽwt‘ñXZ![ Èf‚ut׬sòAÖ98*Ê.¼‚-Æ<ÞvXñ X<wºv‚‘ž&XJ>ªäZHLY’Y’´šX­’'åW>WuÈå~gg‚óv¬©s¹ü‚Jê~¬îvžÉõÖY‘YKK°*ÀštËå~ µš<Ëå~<X¬uX7ÈIf9ìšä2ç–æ~++Öð~äˆw$âÈy<*Øt  ò;‘f¡KKJu¬N)ù˜t¯ç~8vvTuu‘‘†ƒI=ÊçºO‚O/º»±˜tœç~9¾à˜.—ç~9#X®žj<ä03 0³‚Ï< ¿X€pž‚Jÿotöý‚”K‘KKK¢ç0ZHLY’Y’§“X­’'­W=uÕì~Ÿ”pžY­K‘êXžHL:,f ¬" ò º<ó ¬l‚®%f½Ö òä”päYëX•pXlæòÆ=¹çmò¾“0Üë~XX7<­X­XŸXŸXŸXŸ½:LdLÉXfôgpwt((åóó‹tƒp‚ÉÁ£.Øì~Ȩ“<Øì~<©“È5¶Ü~+¾tÂpt‘½XZ![ Èf‚ut׬sòAÖ98*Ê.¼‚-Æ<’pX½X<wºv‚‘ž&XJ>ªäZHLY’Y’è“X­’'åW>Wu”ì~gg‚óv¬©s¹ü‚Jê~¬¢pžÉÁÖY‘YKK°*ô“t—ì~ é“<—ì~<X¬uX7ÈIf9 ”ä2çâì~++Öð~ä¼p$®Èy<*Øt  ò;‘f¡KKJu¬N)­’tûí~8vvTuu‘‘†ƒI=ÊçºO‚O/º»å‘tèí~9¾”’.ãí~9#XÍúž L9 $-\‚$ºƒ»€YK JsX XtJJbJ XJn‚‚n‚J JmJJaJ J J ÄfYkÙ J¿ºÕ~< . $ž Jw‚ JvJ J3Ù'‚ž…—~J ¬‚‚þ}X‚J’~< .׊ò~Ö³ŒtÍó~tŸ²Œf’» %[ „%ž=ä­XŸXŸXŸX­XŸXŸ»¤ä J#Å}ø’ZðX»’"×uiŸ­‚ó®¬W$,Jžê0׈zt((åååˆ}òññLäÞó~tסŒä,-;;y,-;;¬Iž,-‚K‘KKY°*ùt’iÈî<’i<;-ò‚•i¬ò<‡}¬=2+@ðž¡âjt–~2Áó~Èæ%î~X8?*-Ь  ò;ŸfÚIKYHZZ¬YäóJäòuòo"_òÐtØl8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘¬žÅl92ä»Qt·0Àl9#XôˆÈfp<X05 ØŠtå;=gÊÛ~JÞJ£ftöÙ‚’Ÿx ò,ŸXŸX­XŸX­Xu;^ó~f†to!;ƒ+åuŇtÖÝ~tK󩢂•Ò°÷~J¿f•‰.¬÷~ž¥ft§tÙft‘¦fÊ… ÈÖXf;Âòusä÷Z’̉X­’'åWvWu±ö~­Ÿ¶Štå;=gÊÛ~J€Jftöû‚’­x Žòò<l<ñ=±‚fòÉ–XÃ.˺ÖËäK‘KKK¢(Ô‰J´ö~ ̉<´ö~Jèžȇ¬ÖÝ~tK󩢂•pNÎ÷~t¡f;ß<*·ˆ<Î÷~ž²ˆX— Êö~0÷L’ª‰X­’'åW>WuÓö~­Ÿ”Štå;=gÊÛ~J¢Jßetö‚’­x l$å÷Gò™fòÉÉû.[œf;ßfÀȉ<#ºö~*K‘KKK¢*²‰.Öö~ ª‰<Öö~<ƒÈüfˆºÖÝ~tK󩢂•pNð÷~tÿ~fü<2‘ˆ<ð÷~žˆX—È×õ~0þ<ƒ¬üfº÷ZHLZˆ‰X­’'­W=uõö~ug[NNzXHRxl¬óaòý~¬€fåeäÉ .ú~¬€f¬‰<1Üö~(K‘KKK°ç‰¬øö~Ȉ‰<øö~<%ª9Љ Ôö~ä#<« þˆòÙÜõ~"'‚¬h¬ùHZ\ULYLþ‰X­’'óW>Wuþõ~gg“¬üñÄò÷e#É£Ös¬éftÉæ©òK‘KYKx[ŠŠtö~ ÿ‰<ö~<XX;©Šž€ö~)¢TÖ;-<-/âæ‚œ‰È1¹Ü~%ï‘Ø®òÒfäŠ>ŽÖÞ<¼tf¬;7š‚lÖP‚‚J  ò;‘f¡KKJufN&¾ˆtê÷~8vvTu­‘‘†ƒI=ÊçºO‚O/‚»ö‡t×÷~9¾¥ˆ.Ò÷~9#X‚(ža. 09 geZe Xtž X‚n‚Èn‚ºnJJ ºƒž Jv f™ºòÉ¥ÅXs]ïXõ¹ÖÃtª¼t‘ÕÃXZ!hô®[  U18ˆàÖ¢ ñÝ<¢<-:‘ÿ–7=óÝ‘¢(z<‘š~ž&ØZÍßX­’"åu² »­ÖY ¬¾‚j<ÌÈtã}t,XJÍt v.¬~ ssмäïÉÄÃÖŽ-;;:8|8CŽ,y<ºIäŽ-88&tY‘YKY°(×ßÈã¡<Ð~.;;FXˆàtµ ÈËß<µ Wu¼žŸ h­í鞟•–<Ÿƒ¦óÖY¹¬O’ò/„šJkt0=®º .Î5ïét’–‚îé.’–.tf )79‚­XŸXŸXŸXŸX­Xgž=» Xt¡x¬óíååóYò"Ö]&#<(º(Ôá51™œä›<‘=utŸ†•ò>é½òÉÕÁXs]ïXŽÿ?t@t‘þ?XZ!hô®[  U18ßãÖ¿ž Áá<¿ž<-:‘ÿ–7=ÃáÁž0z<‘“~ž&ØZ¤ãX­’'»W=uÛœ»­ÖY ¬Åfj<ÌÈtÜ}t,XJÔt v.¥~ ssá¿äïÉí?ÖŽ-;;:8|8CŽ,y<ºIäŽ-88&tY‘YKY°(®ãÈ“ž$É~.;;FXßãtޜȢã<Þœ<«:F.Át«@¬äãt¡žÔwÖÜ~Öõ¿$ÇÂJ  ò;ŸfÚIKYHZZ¬YäóJäòuòo"_òáàtÇŸ8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘½àž´Ÿ92ä»QtÈà0¯Ÿ9#XòÈ"^." 09 geZe Xtž1X[J%J[f Jw‚ Èw‚ JJ ò È Ö $òÁÖ X@ñ}Ö‘.ôÛXÚ¨ž°×JѨtö«×‚’„höK‘KKK°41ØZöËX­’'óW>Wu‰´Ÿ Z­ ÔžŸâ«<Ÿƒ¦óÈK¹¬]°ò‚ äÛ‚kò0=¿¢Ôòß«‚¡Ô.ß«.tf )79‚­XŸXŸXŸXŸX­XŸžg»®Xt¡P<"Ö](#ž((ååóóó´ò‡Ì4#À±ÈÁ<‘=Èzò‡òvf òœ¨òÉ¢×X’ºî*s6ïXø§¦ÕtÚªt‘¥ÕX’!hØ [  U38¸Î.Œ´ ôË<Œ´<-:‘÷ˈ´0–7=z<‘í}ž&ØZýÍX­’&»I=u‚²­­ÈK ¬ë<j<ÌÈt¶}t,XJút v.ÿ} ññºªä–Öòç©CÉ”Õ Ž-;;:88CŽ,y<Â.I.Ž-88&ÈY‘YKY°&‡ÎÈà³$£~.;;F¸ÎÈ…²ÈûÍ<…²<ã:F.ÁÈã@¬½ÎÈ¡£³žÈ~ÖΪ"”Ø  ò;ŸfÚIKYHZZ¬YäóJäòuòo"_ò”Ët”µ8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘ðÊžµ92ä»QtûÊ0ü´9#XžHÈi.09  X‚ ò—Öë<ôÛX^¬ú!J‡^töõ!‚’æ®&K‘KKK¢>1’Z¬X­’'óW>WuÓþ~ŸŸL؉tŸg§ö~ÈÙ‰.§ö~<vžA8à‰Öªö~Jg\¡ó¡Ÿºžnò6òðMfâ­XŸXŸXŸXŸXŸXŸX­½:L.gXtæYîuä@80(åóó¢~ò£òñlä÷]@”!tì^t‘“!X’!ZØ)[  W88,Ýt¥Ö,µòñïñbò¹Hµý~(<==é]äÉì!¬º*^’Z‚X­’'×W>Iuðý~­Ÿ‚ó ¬1"s¬YážÖþ~ ª<Öþ~<+==°.ÙÉý~&,XJÄJj<LÈññä ¬‚òñ~‚·^ÖÉ„!Ö:;;;,8, t:;;98,ÂòÉ^‚‚!ò:;88,&tY‘YKK°8™‚tªþ~,G<;-HX,Ê‚tóý~‚<óý~<ñ;-H.?ºA&,Étwž<ÙÙý~#ž;Â]žß"¬  ò;ŸfÚIKYHZZ¬YäóJäòuòo"_òÉ€tßÿ~8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘¥€žÌÿ~92ä»Qt°€0Çÿ~9#X†ÖÈ"^." 09 geZe Xtž(XdJJdfJn‚Èn‚JwJJaJ J J ÅfYkÙ ‚‹È@’}Öð.ôÛXЃžºüJǃtöµü‚’„höK‘KKK°41ØZì&X­’"/=WK“YŸ Z­–/žŸìP<Ÿƒ¦óÈK¹¬Û›~ò ä Ï‚ . $ò ƒkÙ ‚ J (ó/‚éP‚—/.éP.tf )79‚­XŸXŸXŸXŸX­XŸžg»®Xt¡Ç}¬ .× XÈÖóWò"Ö]&#<((ååóGòñlä0jòý&4#ëUÈ <‘=Èzò‡òvf ò¿.ÓƒºÉ¬üºs6ïXî‚Òùt®†t‘ÑùX’!hØ [  T38*.–Y ê&<–Y<-:‘í&’Y(–7=z<‘}ž&ØZÑ)X­’"åu®V­­ÈK ¬É<j<ÌÈtË~t~(,XJØò v.¡} ññކäÓÉ¿ù Ž-;;:88CŽ,y<ÃfH.Ž-88'ÈY‘YKY°*Ú)ȱVÈÏ)<±V<œY:E.Ž*êX¬Å}.;;EXÂȹ¿¬’*ȪVÖÖ)<«V.:E.•*ÈÞWž¹~$¢†"áú ˜.½} 8íÈ  ò;ŸfÚIKYHZZ¬YäóJäòuòo"_ò‰&tŸZ8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘å%žŒZ92ä»Qtð%0‡Z9#XÅvÈ"^." 09 geZe Xtž(XdJJdfJn‚Èn‚JwJJaJ J J ÅfYkÙ ‚®È@ï|Ö“.ôÛX®ˆžÜ÷J¥ˆtö×÷‚’„höK‘KKK°41ØZÊ+X­’'óW>WuµTŸ Z­ô3žŸŽL<Ÿƒ¦óÈK¹¬Aø}ò ä Ï‚ . $ò ƒkÙ0‚ …Ó4.‹L‚õ3.‹L.tf )79‚­XŸXŸXŸXŸX­XŸžg»®Xt¡¤}< .× XëÖóWò"Ö](#ž((ååóGòñlä0jòÛ+4#êPÈÃ<‘=Èzò‡òvf ò¿.±ˆºÉÎ÷ºs6ïẊÑôt¯‹t‘ÐôX’!hØ [  T38Ž/.¸T È+<¸T<-:‘Ë+´T0–7=z<‘ì|ž&ØZÒ.X­’&»I=u­Q­­ÈK ¬ù< J (áºj<ÌÈt¨~ò~(,XJûò v.þ| ññ‹äÓɾô Ž-;;:88CŽ,y<ÃfH.Ž-88'ÈY‘YKY°*Û.ȰQÈÐ.<°Q<ã:E./ŒT$¢}.;;EXÂÈ㿬“/ȪQ.:E.–/ÈÝRž¹~$£‹"àõ ˜.½} 8   ò;ŸfÚIKYHZZ¬YäóJäòuòo"_òè*tÀU8vvwó\òu­‘‘”ƒI=ÊõºOºO .Öu<‘Ä*ž­U92ä»QtÏ*0¨U9#X”’È<o<ž05 0³‚Ï< ¿XŒtžö J‹ttöñ ‚”K‘KKK¢ç0ZHL\ULYL³—X­’'óW>WuÉè~Ÿ tžY­K‘Þ XžHL:,f­0`qH¥—J­’'åW>WuÛè~ŸÈMD tä täYß X¡tXlÚ òÆ/!X`X ºt^0çmòr;ñÁX­X­XŸXgXŸXg=-[Xf¢x‚ðåá0Ìs(ÉÁ£.Ìè~ ´—<Ìè~<µ—(Ëè~8¹—"Çè~ä¹—º½¶è~'qÖpžæ—º¶Ü~º° tÐtt‘¯ X’"[ ÈÖXfvfæºqºsº×½º8*Ê.@‚*-Æ<žtX¬ ò'XJ?ò©äZHL\ULYLõ—X­’'åW>Wu‡è~ŸgXJ(6.ç¬îã_‚š˜º¹Ü~tÉ¡ X“äY‘YKK°*˜tŠè~ ö—<Šè~<XfvJ©˜t‰è~(û—òçÌè~%ʪ—tÞè~ ¢—<Þè~<§—¬š/çðç~"Ét$» Èfºz.*©J  ò;‘f¡KKJufN&è–tÀé~8vvTu­‘‘†ƒI=ÊçºO‚O/‚» –t­é~9¾Ï–.¨é~9#Xàž<o<ž05 0³‚Ï< ¿XÀmžÂJ¿mtö½‚”K‘KKK¢ç0ZHL\ULYLçX­’'óW>Wu•ï~ŸÔmžY­K‘ªXžHL:,f­0`qHÙJ­’'åW>Wu§ï~ŸÈMD täÔmäY«XÕmXl¦òÆ/!X`X ºt^0çmòr;ñÁX­X­XŸXgXŸXg=-[Xf¢x‚ðåá0€m(ÉÁ£.˜ï~ è<˜ï~<é(—ï~8í"“ï~äíº½‚ï~'qÖpžš‘º¶Ü~ºüt„nt‘ûX’"[ ÈÖXfvfæºqºsº×½º8*Ê.@‚*-Æ<ÒmXøò'XJ?ò©äZHL\ULYL©‘X­’'åW>WuÓî~ŸgXJ(6.ç¬îã_‚Αº¹Ü~tÉíX“äY‘YKK°*µ‘tÖî~ ª‘<Öî~<XfvJÝ‘tÕî~(¯‘òç˜ï~%ÊÞtªï~ Ö<ªï~<Û¬š/ç¼î~"ým$‡Èfºz.*©J  ò;‘f¡KKJufN&œtŒð~8vvTu­‘‘†ƒI=ÊçºO‚O/‚»Ôtùï~9¾ƒ.ôï~9#Xùž òs< XŸfÙ‘‘00\`‚"< ÍÄ[ä¾$JÃ[tö¹$‚”K‘KKK¢Ë0ZHLY’Y’ëþX­’&­I=u‘ŸØ[žY­K‘¦$XžHL:,f­Òÿt/;=ŸÊÛ~Jä$J[tNß$J’Ÿ( G9 òäØ[ÖY§$XÙ[Jl¢$äAº-><0;”<í~X“t$ê~Vçmò’8áÿtÇ€8vv5.'až- u·Ÿ­°ÿt/;=ŸÊÛ~J†%JûZtN%J’Ÿ8 ˆ<ø.l.gk¢ýòÖÝ~tK=©¢º•pN²‚&Îýº´‚‚ [<!â$AK‘KKY¢(Îþ.ºXÆþ<º<ÇÈþ‚ã~;ÖÝ~tK=©¢º•pNîò’þ<Ó‚.­ý<ïÖå.o±ý‚Ö‚™ž-è<+‚£ZHLZ¤þX­’+ŸW>IuÙŸ­Žÿt/;=ŸÊÛ~J¨%JÙZt=¦%º’Ÿ- l4gkÚZò!„%–ž-ë<z.ÈþiÀ-K‘KKY¢(¬þ.ܤþ<Ü<ý~fƒ.-‰ý‚ÖÝ~tK=©¢º•pN.o@‹ý<‰ƒ‚£ZHLZ‚þX­’,×W>uûŸ­(FRzX’N“LVv˜oLçýJ­’"uYu—‚d-ó€þòÚ&=sþ~<‚J ¬ô~žŒ.z.…÷~ž‰.+ßZ‚Á£JþX‚þ<þ<«=l‚K‘KKY¢Ëþf#y#Ú0#<]t"<®È׺œ+A t¸úýXùX‡þtø<ˆþ<½Š‚-yºöý‚™‚0æýäš‚ëýº1Å*ôZò·‹$ ÷[X9°% ÏZ.É"î$E" ˆÈä.6‚lÈâZ‚¾Òf òs< XŸfÙ‘‘00†`‚"< ÍͬäµÓJ̬tö°Ó‚”K‘KKK¢Ë0ZHLY’Y’ôÏX­’&­I=uˆ°Ÿá¬žY­K‘ÓXžHL:,f­ÛÐt/;=ŸÊÛ~JÛÓJ¦¬tNÖÓJ’Ÿ1 G= òäá¬ÖYžÓXâ¬Jl™ÓäAº-><0;”<í~X“t$ê~Vçmò’8êÐt¾¯8vv5.'až- u®°Ÿ­¹Ðt/;=ŸÊÛ~JýÓJ„¬tNøÓJ’Ÿ; ˆ<ø.l.gk«ÎòÖÝ~tK=©¢º•pN©±&×κ«±‚©¬<!ÙÓAK‘KKY¢(×Ï.±°XÏÏ<±°<ÇÑÏ‚ã~@ÖÝ~tK=©¢º•pNå°ò›Ï<ʱ.¶Î<æ°Öå.oºÎ‚ͱ™ž-è<+‚£ZHLZ­ÏX­’+ŸW>IuаŸ­—Ðt/;=ŸÊÛ~JŸÔJâ«t=Ôº’Ÿ; l4gkã«ò!ûÓ–ž-ë<z.ÑÏi·°-K‘KKY¢(µÏ.Ó°­Ï<Ó°<ý~fƒ.-’΂ÖÝ~tK=©¢º•pNæ°ž‡.o@”Î<€²‚£ZHLZ‹ÏX­’,×W>uò°Ÿ­(FRzX’N“LVv˜oLðÎJ­’"uYuޱd-ó‰ÏòѰ&=sþ~<‚J ¬ô~žŒ.z.…÷~ž‰.+è«‚Á£Jõ°X‹Ï<õ°<«=lžK‘KKY¢Ë˜Ïf#y#Ѱ0#<]t"<®È׺œ+A t¸ƒÏXð°XÏtï°<‘Ï<½±-yºÿ΂±0ïÎ䑱ôκ1¼°*ý«º·‚Ó €­X9§Ô Ø«.É"åÓE" ˆÈä.6‚lÈë«‚¾çžJoX.o‚.=;=;fÚIKƒH„ƒ»»»»¼žK ¬Y ¬Y ótäóÈJó$žó*ò2ò!žsJ Jwž Jrfj Jqfj JpX\ÄJrXU\TXpXjTYjT] X#fÜ.K XIsJ JYrfXœ XvJ XwJ X wX ‚†#X]J#J]J X Ö wJ X vX ‚†JJÐfP. f—fsº'‚f‚KIM J1JOfwJ ‚JpfN Jv‚ ‚‡ Jw‚ ‚„ Jw‚ ‚†L ‚ƒLN ‚Ú,Éf_.tdKK Ju‚ƒƒ ‚ ‚Ú v. tÚ‘ tã{.p,èò’tóóóóó¡òqäð{ä·òKKVYg t 6ȃÌ JUYYVKKœKK¿}äK»»»»»»»»¾ƒI=yäOäOäOäOäOäOäOZXÕ;.ëD8vvqÖŸÖðž‘|@Öó<‘$ä&&0,¬ÖY„ /ç6žÉD9û Yˆ &òò´}òY Yƒ~ä®;.ÎD9»103Ç8dÄD9¼;Ö¿D9¼Èû:tå;=gŽJ÷EJ‰:tu’#uƒòEºˆ;òYËKiKZX==ÏD¬Kÿ9.ºD9Æ;ȵD9Ë;Ö°D9üEá:G  X¼ÞDžŠ;ä(Öÿ¼}ÖÝ~tK󩢂•pN‰Gû~ä§WužNŸËŽžKŸKƒ³ñ‚XžHZ:,f Ö½2t=;=­ÊÛ~JùñJˆŽtNôñf’Ÿ/ ¢=-;à<d.[ òäËŽäK´ñJÌŽXl¯ñòAÈ-;?<0;¨<Ù}X§ò×}Lçmò‘8Õ2tÓM8vv5/'a.-;!uÌNŸ­›2t=;=­ÊÛ~J›òJætN–òf’Ÿ9 €G-<l.ƒ‡0#ÖÝ~tKK©¢È•pNúN†1<¾OXÂ0<ÇO䵂Ë.´‚…1<ÉOò¯°‚-;Ò<rX–Ž‚!÷ñÍK‘KKY¢*¹1.ÏNf±1<ÏN<—&¯.9<r.à0‚ãM2ë<•‚ë<—‚-;êX–0<ÖÝ~tKK©¢È•pNúN†1<èO.˜0<éOä“‚í.’‚é<œ0‚ëO¯Ž‚-;ô<z.‚£ZHLZ1X­’,ŸW>WuîNŸ­ù1t=;=­ÊÛ~J½òJÄtK»òÈ’Ÿ9 Þ~=¢.l.ƒ‡Å#!™ò­1wÕN/K‘KKY¢*—1.ñN 1<ñN<õ~ò-Œ<-ô/‚ÖÝ~tKK©¢È•pN‹Pºñ~‚.ð~‚‹<@ö/<žP‚£ZHLZí0X­’,åW>uOŸ­*Ä1t®NtHNÐ1°N<Ð1XY;=óÊÛ~JòòJt”íò ’Ÿ9  ©~=×.dXt‚##Ó0#ÍN(#<]‚#<õ~‚-‹X ¬ì~.-•<z.…ÇÈ!Æ£ž1÷N%K‘KKY¢çõ0.“Ofí0<“O<Ó~&¬.=î0tïN2#<]‚#<Ó~‚¬.+È£ZHLZ¸0X­’,åW>uÅOŸŸ¢1tÉ;=KÊÛ~J”óJíŒt‘’ó¬’ŸC ‡~Gù.l<--ð~-×#Ï~.¯.9AÍ/tÖÝ~tK‘©¢ •pN¨PØ/<µP.Ë/<ÀPä¼~‚Ä.k‚ <É/‚ÔÝ~‚gÆ£tŽOfò0‚ŽO<Ó~‚¬.ó0<½¤O/¯ÍY‘YKK04o.³ò£12ÃOž~òŸ2.ÂOXÁ0ÈŠO*6fž~òátº0¬4ÈOf¸0<ÈO<ž~&â.W/‚ÖÝ~tK‘©¢¬•pNÝPt@Ÿ/<âPäš~‚æ.ž/‚çPJ•~.ë.zX…ðŒÈ­ã! ó.£ZHLZ–0X­’,KW>ãuçOŸ­€1tÉ;=KÊÛ~J¶óJËŒt‘´ó¬’Ÿ9 lJ--ä}-ëŽX•óÖK‘KKY¢>Ÿ0.ÆO<#<]‚#<ü}‚ƒX—0¬êO¬–0<êO<ü}+„.;œ0f…Ü~9ÖÝ~tK‘©¢¬•pNÿP†ý.<„Qäø}‚ˆ.ü.‚†QJö}.Š.9ÑŒ‚­ã!0Ó!Åò.ý‚£ZNzfL\:Z%Ÿ­4FJrX¡ JsX> ‚`oO9MZQ%--y,07(t[.%.X<.o<= ‚k..h< .=Z‚ó}..z< ‚K‘KKY¢:7.†ŒòÀóJlX‚ÁŒ(/þòt©~X×.d.E‚€X-í<ó‡~Xå.‚æŒ74u¹u¼ƒòr¢X-;Ä<™Ž‚ÇòÞ~XŽ.Í‚„<$ òs< XŸfÙ‘‘10c‚!<„0Û†CäüWuÏ™ŸšCžKŸKƒä<‚XžHZ:,f ÖŒçt=;=­ÊÛ~Jª=J×BtN¥=f’Ÿ/ ¢=-;à<d.[ òäšCäKåuý™Ÿ­êæt=;=­ÊÛ~JÌ=JµBtNÇ=f’Ÿ9 €G-<l.ƒ‡Üä#ÖÝ~tKK©¢È•pN«šÕå<ïšX‘å<øšäµ‚Ë.´‚Ôå<úšò¯°‚-;Ò<rXåB‚!¨=ÍK‘KKY¢*ˆæ.€šf€æ<€š<—&¯.9<r.¯å‚”™2ë<•‚ë<—‚-;êXåä<ÖÝ~tKK©¢È•pN«šÕå<™›.çä<š›ä“‚í.’‚é<ë䂜›¯Ž‚-;ô<z.‚£ZHLZÞåX­’,ŸW>WuŸšŸ­Èæt=;=­ÊÛ~Jî=J“BtKì=È’Ÿ9 Þ~=¢.l.ƒ‡”B#!Ê=üåw†š/K‘KKY¢*æå.¢š Þå<¢š<õ~ò-Œ<-Ãä‚ÖÝ~tKK©¢È•pN¼›ºñ~‚.ð~‚‹<@Åä<Ï›‚£ZHLZ¼åX­’,åW>uÁšŸ­*“ætß™tHNŸæá™<ŸæXY;=óÊÛ~J£>JÞAt”ž> ’Ÿ9  ©~=×.dXt‚##¢å#þ™(#<]‚#<õ~‚-‹X ¬ì~.-•<z.…–BÈ!Æ£ž1¨š%K‘KKY¢çÄå.Äšf¼å<Äš<Ó~&¬.=½åt š2#<]‚#<Ó~‚¬.+È£ZHLZ‡åX­’,åW>uöšŸŸñåtÉ;=KÊÛ~JÅ>J¼At‘Ã>¬’ŸC ‡~Gù.l<--ð~-×#Ï~.¯.9AœätÖÝ~tK‘©¢ •pNÙ›§ä<æ›.šä<ñ›ä¼~‚Ä.k‚ <˜ä‚ÔÝ~‚gÆ£t¿šfÁå‚¿š<Ó~‚¬.Âå<½Õš/¯ÍY‘YKK04o.³òòå2ôšž~òîæ.óšXåÈ»š*6fž~òát‰å¬4ùšf‡å<ùš<ž~&â.Wìã‚ÖÝ~tK‘©¢¬•pNŽœt@îã<“œäš~‚æ.í゘œJ•~.ë.zX…¿AÈ­ã!Ñ>.£ZHLZåäX­’,KW>ãu˜›Ÿ­ÏåtÉ;=KÊÛ~Jç>JšAt‘å>¬’Ÿ< lJ--ä}-ºCXÆ>ÖK‘KKY¢>îä.÷š<#<]‚#<ü}‚ƒXæä¬››¬åä<››<ü}+„.;ëäf…Ü~9ÖÝ~tK‘©¢¬•pN°œ†Ìã<µœäø}‚ˆ.Ëã‚·œJö}.Š.9 A‚­ã!0Ó!ö=.ý‚£ZNzfL\:Z%Ÿ­4FJrX¡ JsX> ‚`oO9MZQ%--y,07(t[.%.X<.o<= ‚k..h< .=Z‚ó}..z< ‚K‘KKY¢:7.Õ@òñ>JlX‚A(/¯>t©~X×.d.E‚€X-í<¾B‚Ï>‡~Xå.‚µA74u¹u¼´=r¢X-;Ä<èB‚ø=Þ~XŽ.œB‚‘ òõ J‹utõ .‹uòtõ .=WƒÉÛ(”uäÞž‘Ÿæft ¬ù(›utgÈ0OKK°Ì éÈÊhJ„hi­uÈ[tô t·uäÉÔ"Å}t‘à~tKó©¢XÕ}ottãtfè¬>I­Êwqu××ÊÕ­É"wqu××ÊÕ­É"wqu××ÌÓ¯×ÉK­NŸ"you××××ÊÕ­É"{ytu××××××ÊÕ­É"you××××ÊÕ­É"{ytu××××××ÊÕ­É"you××××ÌÓ¯×gK­NŸ"’Ét žZw9L×vtŸÌt­;=µ{fÉtŸf¥ÉžÒ~ò¢fÕ~ Ät×]Ö~ºnUftvåpN±~tÏf¿}ž•à~ò‘å ¬–ß~ë ÈŸä~Xÿ…úžvä ntËÖ1rZ°{غŸhÖºdävÔoÿxüyÿþwÿþyÿþwÿþyÿxü ðQ€­L:ÐxtR»x <…u;=”»;=0kX<;=.‘;=1#W=Kº,À< óÊ_SC_THREAD_SPORADIC_SERVER15PyNumberMethods__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi___get____pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi___get__attr_name_SC_2_SW_DEVPy_tracefunc_unused2_SC_TIMERS__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axis__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10overlaps_y_filenomessagelenfunc_SC_SHELLPyModule_GetDict__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives___get___SC_MEMORY_PROTECTION__pyx_d/home/hines/neuron/nrnmpi/share/lib/python/neuron/rxd/geometry3d__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_SC_SCHAR_MAX__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_yhi__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_x__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0_1__get____pyx_v_yssq_ass_slice_SC_THREAD_SAFE_FUNCTIONS_SC_UCHAR_MAXtp_getattr__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_PlanePyExc_TypeError_SC_C_LANG_SUPPORT__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_primitivessq_itemco_argcount__pyx_v_nx__pyx_v_ny__pyx_v_nz__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_distancenb_add__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zlo__pyx_module_is_main_neuron__rxd__geometry3d__graphicsPrimitives__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi_1__get____pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_yhi__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderob_refcntPyTuple_Newsq_ass_item__pyx_kp_s_SphereCone_g_g_g_g_g_g_g_gPyBaseObject_Type__Pyx_InitCachedBuiltins_SC_TTY_NAME_MAXsq_inplace_repeatnb_lshiftPyErr_WriteUnraisablesq_inplace_concat__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_within_coretp_is_gcco_firstlineno_SC_SELECT_shortbufnb_power__pyx_t_10__pyx_t_11__pyx_t_12_SC_SAVED_IDS__pyx_t_14__pyx_t_15c_linePyUnicodeUCS4_DecodeUTF8_SC_BC_STRING_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder___repr____pyx_k_At_least_one_Cone_radius_must_be__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10distance_SC_TRACE_INHERIT__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo___get__10PyTryBlock__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi___get___SC_SEMAPHORESob_sstate__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distance_SC_EQUIV_CLASS_MAX__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Conesq_repeat__Pyx_ListComp_Appendcurexc_value__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zlo__pyx_v_px__pyx_v_pz__pyx_n_s_sumold_tbsq_concattp_itemsize__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi___get__entries__pyx_k_Cylinder_g_g_g_g_g_g_g_clips_r__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphereinitproc__pyx_v_length_SC_DEVICE_SPECIFIC_SC_THREAD_THREADS_MAXcodec_search_cache__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__distance_SC_LEVEL3_CACHE_SIZE__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_1__repr__PyGetSetDef__pyx_v_r0__pyx_v_r1__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_3__repr__tp_bases__off_t__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_1__init____pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersectionis_unicode__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi_1__get___Py_NoneStruct__pyx_n_s_r_SC_THREAD_PROCESS_SHARED_SC_JOB_CONTROL__pyx_n_s_y__pyx_n_s_z__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_z__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo___get____pyx_n_s_z0sqrt_lock__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_8starting_points__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo_1__get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo_1__get__PyUnicodeUCS4_Compare__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_8overlaps_xsetattrofuncPyObject_CallFunctionObjArgs__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_ylof_valuestacktp_deallocnb_long_SC_NL_NMAX__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1_1__get___typeobject__pyx_n_s_nx__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0___get____pyx_n_s_nznb_floor_divide__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives_1__get____pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_20overlaps_x__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1___get____pyx_n_s_y2bf_getwritebuffernb_inplace_lshift_SC_POLL__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_primitives__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1___get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives___get___SC_V6_ILP32_OFF32invalid_keyword_type__pyx_v_dist_SC_BASEreversedwrapperbase__pyx_find_code_object_SC_LONG_BITreadbufferprocf_stacktop__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_7starting_points_SC_CLOCK_SELECTION__pyx_kp_s_Sphere_g_g_g_g_clips_r_SC_V7_LPBIG_OFFBIG__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zhi13PyTupleObject_SC_AIO_LISTIO_MAX__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__Pyx_CreateCodeObjectForTraceback__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_2set_clip__pyx_k_ys__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_points__pyx_n_s_pxvalues__pyx_n_s_pznb_indextp_richcompare_Py_CheckRecursionLimit__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_x_SC_FILE_SYSTEM_SC_TRACE_SYS_MAX__pyx_k_Cylinder_g_g_g_g_g_g_g_IO_write_endPyThreadState__pyx_n_s_pyx_vtablenb_remainder_SC_SCHAR_MIN_SC_LINE_MAXnone_allowedvisitproc__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_6__init__PyMethod_Type__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane_SC_TZNAME_MAX__pyx_n_s_r0__pyx_n_s_r1__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_14distance__pyx_k_overlaps_y__pyx_L4_argument_unpacking_done__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_core__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union_Py_TrueStruct__pyx_kp_s_Union_r__Pyx_PyObject_Callnb_inplace_multiplyob_sval__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distance__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_9starting_points_SC_2_VERSION_SC_2_PBS_CHECKPOINT__pyx_k_within_coreco_weakreflistnum_maxd_wrappedtp_compare__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xhi__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_x__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3__init__PyMemberDef__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_11set_neighborsinterninterp__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_primitives__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_x__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_yfull_tracebackob_type_SC_LEVEL4_CACHE_ASSOC__pyx_v_x0tp_free__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo___get__PyGILState_LOCKED__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distance__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_10primitives_1__get___SC_NL_LANGMAX__stack_chk_fail__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_ygetter_SC_LEVEL1_ICACHE_ASSOCtp_traversertversion__pyx_n_s_y0__pyx_L5_argtuple_error__pyx_n_s_y1co_nlocals__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo___get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0___get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo_1__get___PyByteArray_empty_string__pyx_v_axisx__pyx_v_axisy__pyx_v_axisz__pyx_v_y0__pyx_v_y1__pyx_v_y2nb_and__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_1__init____pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zlo__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_14set_cliptp_call__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Planeasync_exc_SC_2_C_BIND__pyx_v_ry__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1_1__get__gilstate_counterf_localsplus__pyx_L8__pyx_L9ob_item__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_y_SC_PRIORITY_SCHEDULING_SC_SS_REPL_MAX__pyx_v_z0__pyx_v_z1__pyx_v_z2__pyx_v_yytp_str__Pyx_ImportFrom__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_primitives_SC_VERSIONco_filename__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance__Pyx_PyObject_IsTrue_SC_FSYNCternaryfunc__pyx_v_d2__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0_1__get__PyTypeObject__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives___get____pyx_n_s_z2__pyx_v_zs__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_SC_FILE_ATTRIBUTESGNU C++ 5.4.0 20160609 -mtune=generic -march=x86-64 -g -g -O2 -fwrapv -fno-strict-aliasing -fstack-protector-strong -fPIC -fstack-protector-strong__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_12overlaps_z_SC_NZEROsq_containsm_module__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xlo_SC_2_C_DEV_chainf_exc_valuepy_importtp_setattr__pyx_string_tab__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_14overlaps_y_SC_SYMLOOP_MAX__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphereold_val__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distancePyObject_GetAttrStringrichcmpfuncunsigned char__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_k_bisect__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zhi_1__get__mp_ass_subscript__pyx_k_z0_SC_MQ_OPEN_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection___init____pyx_n_s_x0__pyx_n_s_x1__pyx_n_s_x2__pyx_L10_bool_binop_donebf_getreadbuffer_IO_lock_t__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_24overlaps_z__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xlo__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_2__init____pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionPyString_Typetp_dictoffset__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_6set_clip_SC_SEM_NSEMS_MAX_SC_USHRT_MAX__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_yhi_Py_ZeroStruct__pyx_kp_s_Complement_rcode_line__pyx_k_starting_pointsPyMethodDef__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement_SC_STREAM_MAX_SC_ASYNCHRONOUS_IO__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder__pyx_n_s_xs_SC_READER_WRITER_LOCKS_SC_CPUTIME20__Pyx_StringTabEntry_SC_2_PBS_LOCATE_SC_DEVICE_IOfunction_name_SC_RE_DUP_MAX__pyx_k_neuron_rxd_rxdException__pyx_t_5_SC_SIGNALSmp_subscript__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone_SC_V7_ILP32_OFFBIGtp_clear__pyx_methods__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_SC_PASS_MAX__pyx_n_s_ys__pyx_n_s_z1arg_passed_twicestdin_SC_V7_LP64_OFF64__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives___get___SC_NPROCESSORS_CONFfunction__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_primitivesnum_minuse_tracing__pyx_bPyList_Type_SC_XOPEN_XCU_VERSION__pyx_f__pyx_m__pyx_r__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union__pyx_n_s_py__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xhi_1__get___SC_MEMLOCK__pyx_n_s_zs__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_2__repr____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo_1__get__co_freevars__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_core__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderside1side2__pyx_n_s_testtp_initPyGILState_UNLOCKEDd_nameobjobjargprocob_size_SC_SEM_VALUE_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xlo___get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_x_SC_XOPEN_XPG2_SC_XOPEN_XPG3_SC_XOPEN_XPG4tp_dict__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_8within_core_IO_write_ptr_SC_REALTIME_SIGNALS__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_8axis__pyx_L6_bool_binop_donesetattrfuncargname__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo_1__get____pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi___get__first_kw_argPyList_New__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_16get_clip_SC_THREAD_PRIO_PROTECTbinaryfunc__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_y__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_ylossizessizeargfuncob_ival__Pyx_CodeObjectCache__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength_1__get__tmp_value__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0_1__get__PyNumber_Negativecodec_error_registry__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_2__repr__kwds2__pyx_kp_s_Intersection_rgraphicsPrimitives.cppbf_getbufferco_zombieframe__pyx_n_s_objects11PyIntObject14PyMethodObject_SC_PII_INTERNET_DGRAM_SC_SINGLE_PROCESSgetiterfunc__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_1__init____pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_distance__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_9axis__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_SC_RAW_SOCKETSPyMem_Reallocnb_nonzero__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_10primitives_1__get__codec_search_path__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_12overlaps_x_py_tmp_SC_MULTI_PROCESSdescrsetfunctmp_type_SC_BC_BASE_MAX__Pyx_Raise__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xhif_lasti__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_6starting_pointsPyWrapperDescr_Type__pyx_n_s_obj__pyx_k_primitivesdescrgetfunc_SC_RTSIG_MAXunused_SC_NETWORKING_SC_GETGR_R_SIZE_MAX__pyx_v_neighbor_regions__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0_1__get__nb_octnb_inplace_add_SC_THREAD_ATTR_STACKADDR_SC_LEVEL2_CACHE_ASSOC__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_1__init___SC_IOV_MAX_SC_TRACE_EVENT_NAME_MAX__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_zkw_name__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_SC_PII_INTERNETco_code_IO_save_base__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder16PyGILState_STATE__pyx_L3_bool_binop_done__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10primitives___get___SC_2_UPE__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_6starting_pointsPyErr_WarnExPyUnicode_Type__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi___get____pyx_n_s_distancereprfunc_SC_DELAYTIMER_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_4distance__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_y__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_z_SC_XBS5_ILP32_OFFBIG__pyx_code_cache__Pyx_ErrRestore__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1_1__get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_xPyBaseString_TypePyNumber_Add__pyx_empty_bytescurexc_traceback__pyx_k_Sphere_g_g_g_g_SC_SYSTEM_DATABASE__pad2__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_points__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__py_funcname__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_16distanceexactPyList_Appendco_name__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zhi_1__get___SC_T_IOV_MAX__pyx_kp_s_Cylinder_g_g_g_g_g_g_gbf_getcharbuffer__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_1__init____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives_1__get___SC_XOPEN_STREAMSPy_InitModule4_64__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zlo__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_primitives__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_2__init____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zlo_1__get____pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives_1__get____pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Unionpy_srcfilenb_divide__pyx_lineno__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_k_objects__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_k_distancePyFrame_New_nextPyObject__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__distancenb_xor__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3__init____pyx_tuple_nb_negative__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConewritebufferproc__pyx_k_bisect_left__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_7set_clip__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distance__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives_1__get__PyObject_SetAttr__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_x__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_y__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_z__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi___get____pyx_L1_error__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_primitives17PyCFunctionObject__ssize_tis_true__pyx_n_s_primitivesprintfuncco_flags__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_yhi__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_kp_s_Cone_g_g_g_g_g_g_g_g_clips_r__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_y__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y0_1__get____pyx_insert_code_object__pyx_k_Sphere_g_g_g_g_clips_r_SC_2_FORT_RUN__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConemodules_reloading__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_SC_ADVISORY_INFO__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane__pyx_bisect_code_objects__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo___get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi_1__get____pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r0__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_6starting_points_SC_TIMER_MAX__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_SC_THREADS__pyx_k_import__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_6get_clip_SC_SYSTEM_DATABASE_R_SC_USER_GROUPS_R__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Coneco_stacksizeml_flagstp_new__Pyx_RaiseArgumentTypeInvalid_SC_UINT_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_12overlaps_zb_handler__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_within_core__pyx_k_neighbors__pyx_builtin_sumcausef_exc_tracebackmore_or_less__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_x__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_y_SC_TRACE_NAME_MAXnum_expectednb_inplace_true_divide__pyx_t_7nb_inplace_dividedestructorPyCFunctionim_weakreflist__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r0_1__get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__17PySequenceMethods__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zhiresult__Pyx_check_binary_versionf_trace__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y1__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_k_sum_sbuf_SC_CHILD_MAX_IO_save_end__Pyx_ArgTypeTest__pyx_k_SphereCone_g_g_g_g_g_g_g_g__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_distance__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3yhi___get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_14starting_points__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_22overlaps_ztp_del_SC_V6_LP64_OFF64_SC_NGROUPS_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_10primitives___get__encodingPyErr_Format__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1_1__get__stdout__Pyx_InitCachedConstantsPyString_AsStringtp_name_SC_THREAD_ROBUST_PRIO_INHERITclosure13PyFloatObject__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement___init____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z1_1__get___SC_THREAD_DESTRUCTOR_ITERATIONS__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_ylo__Pyx_SetVtablec_profilefunc__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10set_neighborstp_as_sequence__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_3set_clipPyTraceBack_Heretmp_tb_SC_SSIZE_MAXtp_as_buffer_SC_PII_OSI_CLTS__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r0__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r1sizetype__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distance__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_3__repr__PyCapsule_Newnb_inplace_and__pyx_v_obj_SC_LEVEL1_DCACHE_SIZE__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_k_x__pyx_filenameshort unsigned int__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_1__repr__sysdict__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_10primitives_1__get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_7__init__startPyString_FromStringf_blockstack_SC_STREAMS__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_4get_clip__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives_1__get____pyx_L0__pyx_L3__pyx_L4__pyx_L5__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1_1__get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_4distance_SC_PAGESIZE_SC_THREAD_PRIORITY_SCHEDULING__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zhisuboffsets__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_Py_CheckRecursiveCall__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distance_SC_CHARCLASS_NAME_MAXPyDict_Sizetstate_head__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_16overlaps_z__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylindertrash_delete_nestingim_self__off64_t__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0_1__get__PyObject_RichComparecoercion__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_IO_read_base__pyx_n_s_distance_2PyTuple_Pack__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_11axis_IO_buf_endf_tstatepy_level__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3zhi_1__get__tp_getattroallocfunc__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConec_traceobj__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_17get_clip_SC_DEVICE_SPECIFIC_R__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_distance__pyx_n_s_starting_pointsPyObject_SetAttrString__pyx_pyargnamesPyList_AsTuple__Pyx_WriteUnraisablePyFloat_Type_modetp_methods_SC_PIPE__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_4distance_IO_write_basetp_mroPyString_FromFormatsegcountproctz_dsttimePyExc_BaseException_SC_PHYS_PAGESglobal_dicttp_as_mappingPyExc_ImportError__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_2__repr____pyx_k_pyx_vtable__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_5set_clip_SC_ATEXIT_MAX__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3__init___SC_SHRT_MAX_SC_FIFO__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_15set_clip_SC_USER_GROUPS__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi_1__get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_10primitives_1__get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3yhi___get____pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_4set_clipf_code_SC_TRACEtick_counter_SC_XBS5_ILP32_OFF32nb_or26__Pyx_CodeObjectCacheEntry__pyx_k_hiformatunaryfunc_IO_marker__pyx_argsPyDict_SetItem__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ConePyByteArray_Type__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_20overlaps_y__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_SC_2_PBS_MESSAGE__Pyx_GetModuleGlobalName14PyStringObject__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zlo___get__nb_floatdlopenflags__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x0__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x1__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_3__repr__PyExc_SystemError__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_primitives_SC_XOPEN_REALTIME_THREADS__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_6starting_points__pyx_t_13_SC_SPIN_LOCKStraverseproc__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_distance__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_2__repr___SC_SPORADIC_SERVER_SC_LEVEL1_DCACHE_LINESIZE__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xloinquiry_SC_PRIORITIZED_IOnb_invertf_linenoPyTraceBack_Type__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y0ml_doc__pyx_kp_s_Plane_g_g_g_g_g_g_SC_GETPW_R_SIZE_MAX__Pyx_ErrFetchml_name__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_z_SC_XOPEN_VERSION__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement_SC_BC_SCALE_MAX_SC_2_C_VERSION__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_distancenum_pos_args__Pyx_RaiseArgtupleInvalidlong doublekw_args__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distancetp_as_number_SC_LEVEL4_CACHE_LINESIZE__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder__pyx_v_nn__pyx_cfilenm__pyx_v_neighborsbf_getsegcount_SC_NL_TEXTMAX__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z0__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z1tp_weaklistoffset__pyx_k_RxDException__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement_SC_LOGIN_NAME_MAX__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r1__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_SC_XBS5_LP64_OFF64_SC_SPAWNml_meth__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance_SC_PII_OSI_MPyMem_Mallocreadonlytp_docgetattrofuncpy_line_SC_2_PBSnewfunc__pyx_kp_s_Cylinder_g_g_g_g_g_g_g_clips_r__pyx_k_distance_2__pyx_n_s_main__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y1___get___SC_XBS5_LPBIG_OFFBIG__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3yhi_1__get___SC_WORD_BIT__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r0___get____pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_r1___get____pyx_k_Complement_r__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z0___get___SC_2_PBS_ACCOUNTING__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_starting_points__Pyx_AddTraceback__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_z1___get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_8overlaps_x__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo___get___SC_BARRIERS__pyx_n_s_import__pyx_k_lo_SC_AIO_MAX_SC_2_CHAR_TERM_SC_LEVEL1_ICACHE_LINESIZEPyFloat_FromDoubletp_weaklist__pyx_v_clip_IO_buf_base__pyx_n_s_overlaps_xbufferinfo__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3zlo_1__get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_18overlaps_xcharbufferproc__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_12within_core__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xhi_1__get__nb_positive20PyWrapperDescrObject_SC_XOPEN_SHM_SC_XOPEN_ENH_I18Nhashfunc__pyx_k_y_SC_THREAD_KEYS_MAXgetattrfunc__pyx_kp_s_Cone_g_g_g_g_g_g_g_g__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_distance_IO_read_endnew_max__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_4distance__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_SC_ULONG_MAX_SC_TYPED_MEMORY_OBJECTS__Pyx_InitGlobals_SC_TIMEOUTS_SC_XOPEN_UNIX__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init___IO_FILE__pyx_t_1__pyx_t_2__pyx_t_3__pyx_t_4__pyx_t_6__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_t_8__pyx_t_9_SC_LEVEL2_CACHE_LINESIZE__Pyx_ParseOptionalKeywords__pyx_n_s_within_core__pyx_v_r0b__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_6starting_pointscurexc_typeshape__pyx_k_nx__pyx_k_ny__pyx_k_nz__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_y_SC_THREAD_STACK_MINtp_hash__pyx_k_px__pyx_k_pznb_hexPyCode_Newndim__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_2__repr____pyx_v_pyob_shash__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionPyDict_Next_SC_NL_MSGMAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xlo___get____pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_axislength_SC_SHRT_MINempty_dict_SC_THREAD_ROBUST_PRIO_PROTECT__Pyx_RaiseDoubleKeywordsError_SC_LEVEL2_CACHE_SIZEtp_version_tagPyOS_snprintfc_tracefuncfunc_namePyErr_NormalizeExceptionpy_frame_SC_XOPEN_CRYPT__pad1__pad3__pad4__pad5_SC_LEVEL1_DCACHE_ASSOC__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x0___get__getbufferprocPyDict_GetItemPyDict_New__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_x1___get__py_code__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength___get____pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_SC_AIO_PRIO_DELTA_MAXmax_count_SC_XOPEN_REALTIME__pyx_k_py_markers_possetterPyInt_TypePyString_FromStringAndSize__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0___get__wrapperfuncname_strobj_PyString_Eq__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distance_SC_INT_MAX__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1___get__f_back__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x0__Pyx_GetBuiltinNamePyCFunction_Type__pyx_vtab__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distancetp_members__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_1get_clip_SC_TRACE_LOG__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x1mp_length__pyx_k_r0__pyx_k_r112PyCodeObject__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone___repr__f_exc_typePyImport_AddModule__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_starting_points__pyx_n_s_neighbor_regions__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere___init___SC_OPEN_MAXnb_inplace_xor__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_distancetp_subclasses__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_12starting_points__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylindernb_inplace_power__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_points12PyListObject__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_5distanceco_names_SC_UIO_MAXIOV11PyVarObjectPyObject_GC_UnTracktp_setattrofreefunc__pyx_n_s_lo__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3zlo___get___SC_BC_DIM_MAX__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Unionnb_multiply__pyx_n_s_RxDException__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__num_found__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere__pyx_v_rx__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z0__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z1__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__nb_true_divide__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y0tp_getset__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xhif_localsPyLong_Type__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3xlo___get____pyx_k_objtp_iternext_SC_CHAR_MAX__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_5starting_points__pyx_k_Intersection_rplaned__pyx_clinenosq_length__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_z__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_z_SC_PII_XTIPyFrameObjectinvalid_keywordtp_descr_getPyExc_NameError__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Conetp_iter__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_r1_1__get____pyx_n_s_bisect__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersectionnb_inplace_floor_divide_SC_PII_OSI_COTS__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_get_clipstridesnogil_SC_PII_SOCKETPyExc_OverflowError__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_5get_clip_SC_V6_LPBIG_OFFBIG_SC_MQ_PRIO_MAXm_mltp_basenb_rshift__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection__pyx_k_neighbor_regions_SC_TRACE_EVENT_FILTER__pyx_empty_tuple__pyx_k_overlaps_xco_constsf_globals__pyx_k_overlaps_z__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_5get_clip__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection_SC_THREAD_CPUTIME__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_10axislength___get____pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Unionbf_releasebuffer_SC_C_LANG_SUPPORT_Rtp_printlong long unsigned intrecursion_depth__pyx_k_Cone_g_g_g_g_g_g_g_g_clips_r__pyx_v_self_SC_NL_ARGMAX_cur_columnreleasebufferproc_PyThreadState_Current_SC_PII_SC_MAPPED_FILES_SC_LEVEL4_CACHE_SIZEnb_inplace_remainder__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi_1__get___SC_2_FORT_DEV__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone___repr__thread_id__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_z0___get____pyx_k_testempty_list__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y1ctversion__pyx_k_r__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10primitives___get___SC_2_LOCALEDEFim_class__pyx_k_zPyErr_ExceptionMatches__pyx_n_s_ny_SC_LEVEL1_ICACHE_SIZE__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Planenb_absolute_SC_TRACE_USER_EVENT_MAX__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xlo_IO_backup_basePyString_InternFromString__pyx_k_x0__pyx_k_x1__pyx_k_x2_IO_read_ptrPyErr_Occurred_SC_CHAR_BIT__pyx_k_Plane_g_g_g_g_g_g__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_primitivesim_func__pyx_k_Cone_g_g_g_g_g_g_g_ginternal__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3yhi___get__trash_delete_later__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone__pyx_v_dists__pyx_n_s_neighbors__pyx_L3_error__pyx_n_s_overlaps_y__pyx_n_s_overlaps_z__pyx_kwds__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_6distancef_iblocknb_inplace_or__pyx_kp_s_At_least_one_Cone_radius_must_be__Pyx_PyObject_GetAttrStr__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection13PyBufferProcs__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_x__pyx_k_xsob_fvaltimezone__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_7starting_pointstp_reprtp_allocPyExc_AttributeErrortp_cache_SC_INT_MIN__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_4distancePyObject_GetAttr_SC_PII_INTERNET_STREAM__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3zhi___get__Py_ssize_traise_error_SC_THREAD_ATTR_STACKSIZE_old_offsetsq_slice_SC_SIGQUEUE_MAX__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x0_1__get__nb_inplace_rshift__pyx_n_s_neuron_rxd_rxdException_SC_FD_MGMT_SC_SYNCHRONIZED_IO_SC_V7_ILP32_OFF32__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3__repr__PyType_IsSubtypec_profileobj__pyx_k_z1__pyx_k_z2__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_7get_clip__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3xhi_1__get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo_1__get____pyx_v_d_SC_EXPR_NEST_MAX__pyx_v_f_SC_LEVEL3_CACHE_LINESIZElong long int__pyx_skip_dispatch__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10overlaps_y_flags2__pyx_ptype_6neuron_3rxd_10geometry3d_18graphicsPrimitives_CylinderPyString_Format__pyx_v_s_SC_MESSAGE_PASSING__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3ylo___get___SC_REGEX_VERSIONf_builtins__pyx_v_objects_SC_FILE_LOCKING__pyx_k_zsinitgraphicsPrimitives__pyx_v_cwrapper__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3ylo_1__get__modules_SC_AVPHYS_PAGES__pyx_v_r__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_3__repr___SC_MB_LEN_MAX__pyx_v_x__pyx_v_y__pyx_v_zconelength__pyx_k_main__pyx_v_hi_SC_PII_OSIallocatedtp_flags_SC_ARG_MAX__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ConePyExc_ZeroDivisionErrorPyErr_SetString__Pyx_Import_SC_MEMLOCK_RANGE__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3_y1___get___SC_SHARED_MEMORY_OBJECTS__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_22overlaps_y_SC_CHAR_MIN__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xhi__pyx_kp_s_Sphere_g_g_g_g__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distancePyFloat_AsDoublesmalltablenb_subtractb_level_SC_XOPEN_LEGACY_SC_2_PBS_TRACK__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_x1_1__get__PyType_Ready_SC_THREAD_PRIO_INHERIT_SC_LEVEL3_CACHE_ASSOC_SC_NPROCESSORS_ONLN__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_1__repr____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_10axislength_1__get__Py_GetVersion__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union___init____Pyx_InitStrings__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_starting_pointsssizessizeobjargproc__pyx_n_s_x__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_4starting_points__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3_y0___get___SC_HOST_NAME_MAX__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_13starting_points__pyx_v_x1__pyx_v_x2_SC_COLL_WEIGHTS_MAX__pyx_v_rmax_SC_MONOTONIC_CLOCK__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_zPyInt_FromLong_SC_CLK_TCK__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3ylo_1__get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3ylo_1__get____pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_ylofrom_listco_varnamesiternextfunc__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_z__pyx_v_order_SC_NL_SETMAXco_lnotab__Pyx_PyObject_SetAttrStr__pyx_v_old_dnb_intold_exc__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_10primitives___get__tp_descr_set__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone__pyx_v_clips_SC_V6_ILP32_OFFBIGPy_buffer__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_x__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_y__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_znb_coerceshort int__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3xlo_1__get____pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_10primitives___get____pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_15starting_points__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init____pyx_k_y0__pyx_k_y1__pyx_vtabstruct_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone__pyx_k_y2_vtable_offset16PyMappingMethods_SC_IPV6__pyx_k_Union_rtp_basicsizenb_inplace_subtract__pyx_v_xs_SC_REGEXP__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeco_cellvars__pyx_v_xx__pyx_v_lo__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zhi__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_4get_clipis_str__pyx_pf_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3xhi___get__nb_divmod__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_axislengthtz_minuteswestobjobjproc__pyx_n_s_hi__pyx_n_s_bisect_leftPyInterpreterState@THT0ŸHTMTuè@THT0ŸPT[T0Ÿ[TcTuÐPT[T0ŸpT{T0Ÿ{TƒTuðpT{T0ŸT›T0Ÿ›T£TuøT›T0Ÿ°T´TU´TËTóUŸ°T¿TT¿TÀTPÀTÁTóTŸÁTÊTPÊTËTT°TÀTQÀTÁTóQŸÁTËTQ°T´TU´TËTóUŸÐT UU UUóUŸÔTùTPúT UPÐT UU UUóUŸ U$UU$U;UóUŸ U/UT/U0UP0U1UóTŸ1U:UP:U;UT U0UQ0U1UóQŸ1U;UQ U$UU$U;UóUŸ@U{UU{U…UóUŸDUiUPjU}UP@U{UU{U…UóUŸU”UU”U«UóUŸUŸUTŸU UP U¡UóTŸ¡UªUPªU«UTU UQ U¡UóQŸ¡U«UQU”UU”U«UóUŸ°UëUUëUõUóUŸ´UÙUPÚUíUP°UëUUëUõUóUŸVVUVˆVVˆV‰VóUŸ‰V©VVV3VU=VVVU`VVU‰V–VU™V¦VUVVUVˆVVˆV‰VóUŸ‰V©VV°V·VU·VËVóUŸ°VÂVTÂVÃVPÃVÄVóTŸÄVÊVPÊVËVT°VÃVQÃVÄVóQŸÄVËVQ°V·VU·VËVóUŸÐV WU WWóUŸ×VÿVPW WPÐV WU WWóUŸ W7WU7W¨WV¨W©WóUŸ©WÉWV7WSWU]WvWU€WŸWU©W¶WU¹WÆWU W7WU7W¨WV¨W©WóUŸ©WÉWVÐWÙWUÙWÚWóUŸXXTX XP XpXóTŸX X0Ÿ XPXT\XdX0ŸX X0Ÿ X*XP*X:X0Ÿ:XPXP\XdX0ŸXXtŸXKXXKXPXP\XdXXpX„XU„XšXóUŸšXµXUµX¸XóUŸpXXTXšXóTŸšX°XT°X¸XóTŸpX„XQ„XšXóQŸšX©XQ©X¸XóQŸŠX•XP…XšXP¶X¸XPÀXÔXUÔXYóUŸY%YU%Y(YóUŸÀXÏXTÏXYóTŸY YT Y(YóTŸÀXÔXQÔXYóQŸYYQY(YóQŸÚX YPÕXYP&Y(YP0YDYUDYlYóUŸlY…YU…YˆYóUŸ0Y?YT?YlYóTŸlY€YT€YˆYóTŸ0YDYQDYlYóQŸlYyYQyYˆYóQŸJYgYPEYlYP†YˆYPY¤YU¤YàYóUŸàYõYUõYøYóUŸYŸYTŸYàYóTŸàYðYTðYøYóTŸY¤YQ¤YàYóQŸàYéYQéYøYóQŸªYÛYP¥YàYPöYøYPZZUZ9ZóUŸ9ZUZUUZXZóUŸZZTZ9ZóTŸ9ZPZTPZXZóTŸZZQZ9ZóQŸ9ZIZQIZXZóQŸZ4ZPZ9ZPVZXZP`ZtZUtZŠZóUŸŠZ¥ZU¥Z¨ZóUŸ`ZoZToZŠZóTŸŠZ ZT Z¨ZóTŸ`ZtZQtZŠZóQŸŠZ™ZQ™Z¨ZóQŸzZ…ZPuZŠZP¦Z¨ZP°ZÄZUÄZéZóUŸéZ[U[[óUŸ°Z¿ZT¿ZéZóTŸéZ[T[[óTŸ°ZÄZQÄZéZóQŸéZùZQùZ[óQŸÊZäZPÅZéZP[[P[$[U$[I[óUŸI[e[Ue[h[óUŸ[[T[I[óTŸI[`[T`[h[óTŸ[$[Q$[I[óQŸI[Y[QY[h[óQŸ*[D[P%[I[Pf[h[Pp[ƒ[Uƒ[„[óUŸ„[ [U [¡[óUŸp[‚[T‚[„[óTŸ„[˜[T˜[¡[óTŸp[ƒ[Qƒ[„[óQŸ„[‘[Q‘[¡[óQŸ°[Á[UÁ[Â[óUŸÂ[Ö[UÖ[×[óUŸ×[Û[UÛ[Ü[óUŸ°[Á[TÁ[Â[óTŸÂ[Õ[TÕ[Ö[t\ŸÖ[×[óTŸ×[Û[TÛ[Ü[óTŸ´[Á[QÂ[Ö[Q×[Û[Qà[è[Uè[O\SO\W\UW\X\óUŸX\y\Sä[è[Uè[O\SO\W\UW\X\óUŸX\y\Sõ[\Ui\v\U\#\UX\f\U/\F\U€\ˆ\Uˆ\µ\Sµ\½\U½\¾\óUŸ„\ˆ\Uˆ\µ\Sµ\½\U½\¾\óUŸ•\¬\UÀ\È\UÈ\/]S/]7]U7]8]óUŸ8]Y]SÄ\È\UÈ\/]S/]7]U7]8]óUŸ8]Y]SÕ\æ\UI]V]Uò\]U8]F]U]&]U`]h]Uh]]S]—]U—]˜]óUŸd]h]Uh]]S]—]U—]˜]óUŸr]†]U ]¨]U¨]Ï]SÏ]×]U×]Ø]óUŸ¤]¨]U¨]Ï]SÏ]×]U×]Ø]óUŸ²]Æ]Uà]è]Uè]^S^^U^^óUŸä]è]Uè]^S^^U^^óUŸò]^U ^*^U*^j^Vj^k^óUŸk^‘^V‘^’^óUŸ’^°^V°^±^óUŸ ^,^T,^4^U4^±^óTŸ5^N^PN^i^Sk^†^S’^¯^SÀ^_U_7_\7_Ó_óUŸÓ_ `\ ``U`g`\g`haóUŸha‹a\‹abóUŸÀ^ó^Tó^<_S<_Ó_óTŸÓ_Æ`SÆ``aóTŸ`a‹aS‹abóTŸbbSÀ^ _Q __V_Š_óQŸŠ_¡_V¡_«_óQŸ«_É_VÉ_Ó_óQŸÓ_ `V ``Q`bVÀ^_R_<_‘¸<_Ó_óRŸÓ_ `‘¸ ``R`Ê`‘¸Ê``aóRŸ`a‹a‘¸‹abóRŸbzb‘¸zbbóRŸÀ^<_0Ÿ<_{_\Š_›_\«_Ë_\Ë_Ò_UKa`a\À^]_0Ÿ]_i_Pi_{_SŠ_›_S«_Ka0ŸKa`aS`ab0ŸÞ^ë^Qó^<__7_<_\_'_PÓ_Š`‘¸ha‹a‘¸b?b‘¸Ó_ `V `&`0ŸÓ_ `S `&`0ŸÓ_ `\ ``U`g`\g`Š`óUŸha‹a\b?bóUŸÓ_g`0Ÿg`k`Pk`Š`\ha‹a0Ÿb?b\Ó_è_0Ÿè_`P` `] ` `0Ÿ `-`P-`Š`]ha‹a]b?b]Ó_ `0Ÿ ` `P `1`0Ÿ1`c`Pc`Š`^ha‹a0Ÿb?b^¢`Ka\`aha\‹ab\?bb\¢`­`V­`Ka^`ahaS‹ab^?bb^Ò`*a]‹aôa]ýab]þ`a‘¸a*aQâaíaPíaýa‘¸¢`Ka_`aha_‹a¸a_¸aËaPËab_?bJb_JbbPbbU¦aíaS€b‰bU‰b§bS§b¨bq¨bÜbSÜbÝbóUŸ€b‘bT‘bÝbóTŸ„b‰bU‰b¢bS¨b×bS„b¢b0Ÿ¨b×b0Ÿ„b’b0Ÿ’b¢bP¢b¨b0Ÿ¨bÑbPÑbÝb‘h„bÍb0ŸÍbÝb  Ÿ„b¢b0Ÿ¨bÍb0ŸÍb×b X Ÿ„bÍb0ŸÍbÝb .FŸàbébUébcSccqc4Ÿ‹qr0Ÿ r)rU)rGrSGrHrqHr|rS|r}róUŸ r1rT1r}róTŸ$r)rU)rBrSHrwrS$rBr0ŸHrwr0Ÿ$r2r0Ÿ2rBrPBrHr0ŸHrqrPqr}r‘h$rmr0Ÿmr}r KŸ$rBr0ŸHrmr0Ÿmrwr X Ÿ$rmr0Ÿmr}r )Ÿ€ršrUšrás_ásâsóUŸâsîs_îs uóUŸ u3u_3u]vóUŸ]v‚v_‚vƒvóUŸƒvŽv_Žv—vóUŸ—v¦v_¦v·vóUŸ·vÆv_ÆvÔvóUŸÔvÞv_ÞvêvóUŸêvöv_övÿvóUŸÿvw_w wóUŸ ww_wwóUŸw&w_&w-wóUŸ-w†B†PS†W†P †1†U1†f†Sf†q†óUŸq†y†Sy†}†óUŸW†o†\o†p†Tp†q†óQŸW†m†Vm†p†Pp†q†óTŸW†f†Sf†q†óUŸ€†‘†U‘†Æ†SƆцóUŸÑ†Ù†Sن݆óUŸ€†œ†Tœ†Í†V͆ІPІцóTŸÑ†Ú†Vچ݆óTŸ€††Q†Ï†\φІTІцóQŸÑ†Ü†\܆݆óQŸž†¢†P³†·†P€†‘†U‘†Æ†SƆцóUŸÑ†Ù†Sن݆óUŸ·†Ï†\φІTІцóQŸ·†Í†V͆ІPІцóTŸ·†Æ†SƆцóUŸà†ð†Uð†,‡óUŸà†ð†Tð†,‡óTŸà†ð†Uð†ö†óUŸû†'‡óUŸà†ö†0Ÿû†'‡0Ÿà†ð†Uð†,‡óUŸà†ñ†0Ÿñ†!‡P!‡,‡‘hà†‡0Ÿ‡,‡ žŸà†ö†0Ÿû†‡0Ÿ‡'‡ X Ÿà†‡0Ÿ‡,‡ ÿEŸ0‡@‡U@‡|‡óUŸ0‡@‡T@‡|‡óTŸ0‡@‡U@‡F‡óUŸK‡w‡óUŸ0‡F‡0ŸK‡w‡0Ÿ0‡@‡U@‡|‡óUŸ0‡A‡0ŸA‡q‡Pq‡|‡‘h0‡m‡0Ÿm‡|‡ œŸ0‡F‡0ŸK‡m‡0Ÿm‡w‡ X Ÿ0‡m‡0Ÿm‡|‡ ÐEŸ€‡‡U‡Ì‡óUŸ€‡‡T‡Ì‡óTŸ€‡‡U‡–‡óUŸ›‡Ç‡óUŸ€‡–‡0Ÿ›‡Ç‡0Ÿ€‡‡U‡Ì‡óUŸ€‡‘‡0Ÿ‘‡Á‡PÁ‡Ì‡‘h€‡½‡0Ÿ½‡Ì‡ šŸ€‡–‡0Ÿ›‡½‡0Ÿ½‡Ç‡ X Ÿ€‡½‡0Ÿ½‡Ì‡ ¡EŸÐ‡à‡Uà‡ˆóUŸÐ‡à‡Tà‡ˆóTŸÐ‡à‡Uà‡æ‡óUŸë‡ˆóUŸÐ‡æ‡0Ÿë‡ˆ0ŸÐ‡à‡Uà‡ˆóUŸÐ‡á‡0Ÿá‡ˆPˆˆ‘hЇ ˆ0Ÿ ˆˆ ˜ŸÐ‡æ‡0Ÿë‡ ˆ0Ÿ ˆˆ X ŸÐ‡ ˆ0Ÿ ˆˆ rEŸ ˆ0ˆU0ˆlˆóUŸ ˆ0ˆT0ˆlˆóTŸ ˆ0ˆU0ˆ6ˆóUŸ;ˆgˆóUŸ ˆ6ˆ0Ÿ;ˆgˆ0Ÿ ˆ0ˆU0ˆlˆóUŸ ˆ1ˆ0Ÿ1ˆaˆPaˆlˆ‘h ˆ]ˆ0Ÿ]ˆlˆ –Ÿ ˆ6ˆ0Ÿ;ˆ]ˆ0Ÿ]ˆgˆ X Ÿ ˆ]ˆ0Ÿ]ˆlˆ CEŸpˆ€ˆU€ˆ¼ˆóUŸpˆ€ˆT€ˆ¼ˆóTŸpˆ€ˆU€ˆ†ˆóUŸ‹ˆ·ˆóUŸpˆ†ˆ0Ÿ‹ˆ·ˆ0Ÿpˆ€ˆU€ˆ¼ˆóUŸpˆˆ0Ÿˆ±ˆP±ˆ¼ˆ‘hpˆ­ˆ0Ÿ­ˆ¼ˆ ”Ÿpˆ†ˆ0Ÿ‹ˆ­ˆ0Ÿ­ˆ·ˆ X Ÿpˆ­ˆ0Ÿ­ˆ¼ˆ EŸÀˆÆˆUƈ‰óUŸÀˆÊˆTʈ‰óTŸÀˆÐˆ0ŸÕˆÿˆ0ŸÀˆÆˆUƈ‰óUŸÀˆËˆ0ŸËˆùˆPùˆ‰‘hÀˆõˆ0Ÿõˆ‰ ¤ŸÀˆÐˆ0ŸÕˆõˆ0Ÿõˆÿˆ X ŸÀˆõˆ0Ÿõˆ‰ hFŸ‰ ‰U ‰\‰óUŸ‰ ‰T ‰\‰óTŸ‰ ‰U ‰&‰óUŸ+‰W‰óUŸ‰&‰0Ÿ+‰W‰0Ÿ‰ ‰U ‰\‰óUŸ‰!‰0Ÿ!‰Q‰PQ‰\‰‘h‰M‰0ŸM‰\‰ Ꟊ&‰0Ÿ+‰M‰0ŸM‰W‰ X Ÿ‰M‰0ŸM‰\‰ þ6Ÿ`‰p‰Up‰¬‰óUŸ`‰p‰Tp‰¬‰óTŸ`‰p‰Up‰v‰óUŸ{‰§‰óUŸ`‰v‰0Ÿ{‰§‰0Ÿ`‰p‰Up‰¬‰óUŸ`‰q‰0Ÿq‰¡‰P¡‰¬‰‘h`‰‰0Ÿ‰¬‰ ¿Ÿ`‰v‰0Ÿ{‰‰0Ÿ‰§‰ X Ÿ`‰‰0Ÿ‰¬‰ t3Ÿ°‰À‰UÀ‰ü‰óUŸ°‰À‰TÀ‰ü‰óTŸ°‰À‰UÀ‰Æ‰óUŸË‰÷‰óUŸ°‰Æ‰0ŸË‰÷‰0Ÿ°‰À‰UÀ‰ü‰óUŸ°‰Á‰0ŸÁ‰ñ‰Pñ‰ü‰‘h°‰í‰0Ÿí‰ü‰ ½Ÿ°‰Æ‰0ŸË‰í‰0Ÿí‰÷‰ X Ÿ°‰í‰0Ÿí‰ü‰ E3ŸŠŠUŠLŠóUŸŠŠTŠLŠóTŸŠŠUŠŠóUŸŠGŠóUŸŠŠ0ŸŠGŠ0ŸŠŠUŠLŠóUŸŠŠ0ŸŠAŠPAŠLŠ‘hŠ=Š0Ÿ=ŠLŠ »ŸŠŠ0ŸŠ=Š0Ÿ=ŠGŠ X ŸŠ=Š0Ÿ=ŠLŠ 3ŸPŠ`ŠU`ŠœŠóUŸPŠ`ŠT`ŠœŠóTŸPŠ`ŠU`ŠfŠóUŸkŠ—ŠóUŸPŠfŠ0ŸkŠ—Š0ŸPŠ`ŠU`ŠœŠóUŸPŠaŠ0ŸaŠ‘ŠP‘ŠœŠ‘hPŠŠ0ŸŠœŠ ¹ŸPŠfŠ0ŸkŠŠ0ŸŠ—Š X ŸPŠŠ0ŸŠœŠ ç2Ÿ Š°ŠU°ŠìŠóUŸ Š°ŠT°ŠìŠóTŸ Š°ŠU°Š¶ŠóUŸ»ŠçŠóUŸ Š¶Š0Ÿ»ŠçŠ0Ÿ Š°ŠU°ŠìŠóUŸ Š±Š0Ÿ±ŠáŠPáŠìŠ‘h ŠÝŠ0ŸÝŠìŠ ·Ÿ Š¶Š0Ÿ»ŠÝŠ0ŸÝŠçŠ X Ÿ ŠÝŠ0ŸÝŠìŠ ¸2ŸðŠ‹U‹<‹óUŸðŠ‹T‹<‹óTŸðŠ‹U‹‹óUŸ ‹7‹óUŸðŠ‹0Ÿ ‹7‹0ŸðŠ‹U‹<‹óUŸðŠ‹0Ÿ‹1‹P1‹<‹‘hðŠ-‹0Ÿ-‹<‹ µŸðŠ‹0Ÿ ‹-‹0Ÿ-‹7‹ X ŸðŠ-‹0Ÿ-‹<‹ ‰2Ÿ@‹~‹U~‹ª‹Vª‹«‹óUŸ«‹Á‹UÁ‹Õ‹VÕ‹Ö‹óUŸÖ‹ç‹Uç‹ú‹V@‹{‹T{‹«‹óTŸ«‹Á‹TÁ‹Ö‹óTŸÖ‹ò‹Tò‹ú‹‘X@‹È‹0ŸÖ‹ú‹0ŸE‹~‹U~‹ª‹Vª‹«‹óUŸ«‹Á‹UÁ‹Õ‹VÕ‹Ö‹óUŸÖ‹ç‹Uç‹ú‹VE‹{‹T{‹«‹óTŸ«‹Á‹TÁ‹È‹óTŸÖ‹ò‹Tò‹ú‹‘XE‹È‹0ŸÖ‹ú‹0ŸE‹«‹0Ÿ«‹Á‹TÁ‹È‹óTŸÈ‹Ö‹0ŸÖ‹ò‹Tò‹ú‹‘XE‹…‹0Ÿ…‹«‹ Ÿ«‹ú‹0ŸE‹…‹0Ÿ…‹«‹ X Ÿ«‹È‹0ŸÖ‹ú‹0ŸE‹…‹0Ÿ…‹«‹ :Ÿ«‹ú‹0ŸŒ>ŒU>ŒjŒVjŒkŒóUŸkŒŒUŒ•ŒV•Œ–ŒóUŸ–Œ§ŒU§ŒºŒVŒ;ŒT;ŒkŒóTŸkŒŒTŒ–ŒóTŸ–Œ²ŒT²ŒºŒ‘XŒˆŒ0Ÿ–ŒºŒ0ŸŒ>ŒU>ŒjŒVjŒkŒóUŸkŒŒUŒ•ŒV•Œ–ŒóUŸ–Œ§ŒU§ŒºŒVŒ;ŒT;ŒkŒóTŸkŒŒTŒˆŒóTŸ–Œ²ŒT²ŒºŒ‘XŒˆŒ0Ÿ–ŒºŒ0ŸŒkŒ0ŸkŒŒTŒˆŒóTŸˆŒ–Œ0Ÿ–Œ²ŒT²ŒºŒ‘XŒEŒ0ŸEŒkŒ QŸkŒºŒ0ŸŒEŒ0ŸEŒkŒ X ŸkŒˆŒ0Ÿ–ŒºŒ0ŸŒEŒ0ŸEŒkŒ @*ŸkŒºŒ0ŸÀŒÍŒUÍŒ óUŸÀŒÍŒTÍŒ óTŸÀŒÍŒU͌ӌóUŸØŒóUŸÀŒÓŒ0ŸØŒ0ŸÀŒÍŒUÍŒ óUŸÀŒÎŒ0ŸÎŒP ‘hÀŒýŒ0ŸýŒ êŸÀŒÓŒ0ŸØŒýŒ0ŸýŒ X ŸÀŒýŒ0ŸýŒ  Ÿ U \óUŸ T \óTŸ U &óUŸ+WóUŸ&0Ÿ+W0Ÿ U \óUŸ!0Ÿ!QPQ\‘hM0ŸM\çŸ&0Ÿ+M0ŸMW X ŸM0ŸM\ Ÿ`mUm¬óUŸ`mTm¬óTŸ`mUmsóUŸx§óUŸ`s0Ÿx§0Ÿ`mUm¬óUŸ`n0Ÿn¡P¡¬‘h`0Ÿ¬äŸ`s0Ÿx0Ÿ§ X Ÿ`0Ÿ¬ ƒŸ°½U½üóUŸ°½T½üóTŸ°½U½ÃóUŸÈ÷óUŸ°Ã0ŸÈ÷0Ÿ°½U½üóUŸ°¾0Ÿ¾ñPñü‘h°í0ŸíüàŸ°Ã0ŸÈí0Ÿí÷ X Ÿ°í0Ÿíü DŸŽ ŽU ŽLŽóUŸŽ ŽT ŽLŽóTŸŽ ŽU ŽŽóUŸŽGŽóUŸŽŽ0ŸŽGŽ0ŸŽ ŽU ŽLŽóUŸŽŽ0ŸŽAŽPAŽLŽ‘hŽ=Ž0Ÿ=ŽLŽÜŸŽŽ0ŸŽ=Ž0Ÿ=ŽGŽ X ŸŽ=Ž0Ÿ=ŽLŽ ŸPŽ]ŽU]ŽœŽóUŸPŽ]ŽT]ŽœŽóTŸPŽ]ŽU]ŽcŽóUŸhŽ—ŽóUŸPŽcŽ0ŸhŽ—Ž0ŸPŽ]ŽU]ŽœŽóUŸPŽ^Ž0Ÿ^Ž‘ŽP‘ŽœŽ‘hPŽŽ0ŸŽœŽÙŸPŽcŽ0ŸhŽŽ0ŸŽ—Ž X ŸPŽŽ0ŸŽœŽ ÆŸ Ž­ŽU­ŽìŽóUŸ Ž­ŽT­ŽìŽóTŸ Ž­ŽU­Ž³ŽóUŸ¸ŽçŽóUŸ Ž³Ž0Ÿ¸ŽçŽ0Ÿ Ž­ŽU­ŽìŽóUŸ Ž®Ž0Ÿ®ŽáŽPáŽìŽ‘h ŽÝŽ0ŸÝŽìŽÖŸ Ž³Ž0Ÿ¸ŽÝŽ0ŸÝŽçŽ X Ÿ ŽÝŽ0ŸÝŽìŽ ‡ŸðŽýŽUýŽ<óUŸðŽýŽTýŽ<óTŸðŽýŽUýŽóUŸ7óUŸðŽ0Ÿ70ŸðŽýŽUýŽ<óUŸðŽþŽ0ŸþŽ1P1<‘hðŽ-0Ÿ-<ÒŸðŽ0Ÿ-0Ÿ-7 X ŸðŽ-0Ÿ-< HŸ@PUPŒóUŸ@PTPŒóTŸ@PUPVóUŸ[‡óUŸ@V0Ÿ[‡0Ÿ@PUPŒóUŸ@Q0ŸQPŒ‘h@}0Ÿ}ŒΟ@V0Ÿ[}0Ÿ}‡ X Ÿ@}0Ÿ}Œ Ÿ U ÜóUŸ T ÜóTŸ U ¦óUŸ«×óUŸ¦0Ÿ«×0Ÿ U ÜóUŸ¡0Ÿ¡ÑPÑÜ‘hÍ0ŸÍܱŸ¦0Ÿ«Í0ŸÍ× X ŸÍ0ŸÍÜ 5ŸàðUð,óUŸàðTð,óTŸàðUðöóUŸû'óUŸàö0Ÿû'0ŸàðUð,óUŸàñ0Ÿñ!P!,‘hà0Ÿ,¯Ÿàö0Ÿû0Ÿ' X Ÿà0Ÿ, Ÿ0@U@|óUŸ0@T@|óTŸ0@U@FóUŸKwóUŸ0F0ŸKw0Ÿ0@U@|óUŸ0A0ŸAqPq|‘h0m0Ÿm|­Ÿ0F0ŸKm0Ÿmw X Ÿ0m0Ÿm| ן€UÌóUŸ€TÌóTŸ€U–óUŸ›ÇóUŸ€–0Ÿ›Ç0Ÿ€UÌóUŸ€‘0Ÿ‘ÁPÁÌ‘h€½0Ÿ½Ì«Ÿ€–0Ÿ›½0Ÿ½Ç X Ÿ€½0Ÿ½Ì ¨ŸÐàUà‘óUŸÐàTà‘óTŸÐàUàæóUŸë‘óUŸÐæ0Ÿë‘0ŸÐàUà‘óUŸÐá0Ÿá‘P‘‘‘hÐ ‘0Ÿ ‘‘©ŸÐæ0Ÿë ‘0Ÿ ‘‘ X ŸÐ ‘0Ÿ ‘‘ yŸ ‘0‘U0‘l‘óUŸ ‘0‘T0‘l‘óTŸ ‘0‘U0‘6‘óUŸ;‘g‘óUŸ ‘6‘0Ÿ;‘g‘0Ÿ ‘0‘U0‘l‘óUŸ ‘1‘0Ÿ1‘a‘Pa‘l‘‘h ‘]‘0Ÿ]‘l‘§Ÿ ‘6‘0Ÿ;‘]‘0Ÿ]‘g‘ X Ÿ ‘]‘0Ÿ]‘l‘ JŸp‘®‘U®‘Ú‘VÚ‘Û‘óUŸÛ‘ñ‘Uñ‘’V’’óUŸ’’U’*’Vp‘«‘T«‘Û‘óTŸÛ‘ñ‘Tñ‘’óTŸ’"’T"’*’‘Xp‘ø‘0Ÿ’*’0Ÿu‘®‘U®‘Ú‘VÚ‘Û‘óUŸÛ‘ñ‘Uñ‘’V’’óUŸ’’U’*’Vu‘«‘T«‘Û‘óTŸÛ‘ñ‘Tñ‘ø‘óTŸ’"’T"’*’‘Xu‘ø‘0Ÿ’*’0Ÿu‘Û‘0ŸÛ‘ñ‘Tñ‘ø‘óTŸø‘’0Ÿ’"’T"’*’‘Xu‘µ‘0Ÿµ‘Û‘óŸÛ‘*’0Ÿu‘µ‘0Ÿµ‘Û‘ X ŸÛ‘ø‘0Ÿ’*’0Ÿu‘µ‘0Ÿµ‘Û‘ ¦ŸÛ‘*’0Ÿ0’=’U=’|’óUŸ0’=’T=’|’óTŸ0’=’U=’C’óUŸH’w’óUŸ0’C’0ŸH’w’0Ÿ0’=’U=’|’óUŸ0’>’0Ÿ>’q’Pq’|’‘h0’m’0Ÿm’|’…Ÿ0’C’0ŸH’m’0Ÿm’w’ X Ÿ0’m’0Ÿm’|’ ’’U’Ì’óUŸ€’’T’Ì’óTŸ€’’U’“’óUŸ˜’Ç’óUŸ€’“’0Ÿ˜’Ç’0Ÿ€’’U’Ì’óUŸ€’Ž’0ŸŽ’Á’PÁ’Ì’‘h€’½’0Ÿ½’Ì’ƒŸ€’“’0Ÿ˜’½’0Ÿ½’Ç’ X Ÿ€’½’0Ÿ½’Ì’ ÀŸÐ’Ý’UÝ’“óUŸÐ’Ý’TÝ’“óTŸÐ’Ý’UÝ’ã’óUŸè’“óUŸÐ’ã’0Ÿè’“0ŸÐ’Ý’UÝ’“óUŸÐ’Þ’0ŸÞ’“P““‘hÐ’ “0Ÿ ““ŸÐ’ã’0Ÿè’ “0Ÿ ““ X ŸÐ’ “0Ÿ ““ ‘Ÿ “-“U-“l“óUŸ “-“T-“l“óTŸ “-“U-“3“óUŸ8“g“óUŸ “3“0Ÿ8“g“0Ÿ “-“U-“l“óUŸ “.“0Ÿ.“a“Pa“l“‘h “]“0Ÿ]“l“Ÿ “3“0Ÿ8“]“0Ÿ]“g“ X Ÿ “]“0Ÿ]“l“ bŸp“}“U}“¼“óUŸp“}“T}“¼“óTŸp“}“U}“ƒ“óUŸˆ“·“óUŸp“ƒ“0Ÿˆ“·“0Ÿp“}“U}“¼“óUŸp“~“0Ÿ~“±“P±“¼“‘hp“­“0Ÿ­“¼“}Ÿp“ƒ“0Ÿˆ“­“0Ÿ­“·“ X Ÿp“­“0Ÿ­“¼“ 3ŸÀ“Í“UÍ“ ”óUŸÀ“Í“TÍ“ ”óTŸÀ“Í“U͓ӓóUŸØ“”óUŸÀ“Ó“0ŸØ“”0ŸÀ“Í“UÍ“ ”óUŸÀ“Γ0ŸÎ“”P” ”‘hÀ“ý“0Ÿý“ ”{ŸÀ“Ó“0ŸØ“ý“0Ÿý“” X ŸÀ“ý“0Ÿý“ ” Ÿ”N”UN”z”Vz”{”óUŸ{”Ž”UŽ”Ÿ”VŸ” ”óUŸ ”¤”U¤”·”V”K”TK”{”óTŸ{”Ž”TŽ” ”óTŸ ”¯”T¯”·”‘X”’”0Ÿ ”·”0Ÿ”N”UN”z”Vz”{”óUŸ{”Ž”UŽ”Ÿ”VŸ” ”óUŸ ”¤”U¤”·”V”K”TK”{”óTŸ{”Ž”TŽ”’”óTŸ ”¯”T¯”·”‘X”’”0Ÿ ”·”0Ÿ”{”0Ÿ{”Ž”TŽ”’”óTŸ’” ”0Ÿ ”¯”T¯”·”‘X”U”0ŸU”{”—Ÿ{”·”0Ÿ”U”0ŸU”{” X Ÿ{”’”0Ÿ ”·”0Ÿ”U”0ŸU”{” Ÿ{”·”0ŸÀ”Æ”UÆ”•óUŸÀ”Ê”TÊ”•óTŸÀ”Æ”UÆ”•óUŸÀ”Д0ŸÕ”ÿ”0ŸÀ”Æ”UÆ”•óUŸÀ”Ë”0ŸË”ù”Pù”•‘hÀ”õ”0Ÿõ”•`ŸÀ”Д0ŸÕ”õ”0Ÿõ”ÿ” X ŸÀ”õ”0Ÿõ”• ËŸ••U•\•óUŸ•)•0Ÿ.•W•0Ÿ••U•\•óUŸ•$•0Ÿ$•Q•PQ•\•‘h•M•0ŸM•\•AŸ•)•0Ÿ.•M•0ŸM•W• X Ÿ•M•0ŸM•\•  Ÿ`•o•Uo•¬•óUŸ`•y•0Ÿ~•§•0Ÿ`•o•Uo•¬•óUŸ`•t•0Ÿt•¡•P¡•¬•‘h`••0Ÿ•¬•+Ÿ`•y•0Ÿ~••0Ÿ•§• X Ÿ`••0Ÿ•¬• ÆŸðQRUR{Rw{R´R‘°´R%Sw%S3S‘°ðQ RT RÓ0Ÿ>ÓHÓ ´ŸHÓZÓQÔ6Ô0Ÿ6ÔEÔ ÀŸEÔóÔ0ŸdʇÍ0Ÿ$Ó>Ó0Ÿ>ÓeÓ X ŸÔ6Ô0Ÿ6ÔEÔ X ŸEÔóÔ0ŸdʇÍ0Ÿ$Ó>Ó0Ÿ>ÓHÓ ¦GŸHÓZÓTÔ6Ô0Ÿ6ÔEÔ HŸEÔóÔ0Ÿ·ÐÓÐv·ÐøÐ;Ÿ·ÐøÐ1Ÿ·ÐøÐ ² Ÿ·ÐÿÐ;Ÿ·ÐøÐ » Ÿ0×j×Uj×t×St××óUŸ×ž×Už×Ÿ×óUŸŸ×¾×S¾×ó×óUŸ0×j×Tj××óTŸ×ž×Tž×Ÿ×óTŸŸ×°×T°×¾×‘X¾×ó×óTŸt×x×Pxׄ×S¾×ï×SC׊×Vט×V˜×ž×p€Ÿ×ð×VØEØUEØØVØ”ØóUŸ”Ø¥ØV¥Ø«ØU«ØAÙVAÙeÙUeÙÌÙVÌÙØÙUØÙ4ÚVØEØTEØ¥ØóTŸ¥ØzÙSzÙÌÙóTŸÌÙÚSÚ4ÚóTŸØEØQEØ¥ØóQŸ¥Ø¯ØQ¯Ø×Ø]רAÙóQŸAÙmÙQmÙÙ]ÙÌÙóQŸÌÙØÙQØÙÚ]Ú4ÚóQŸ"ØEØ0ŸEØcØw¥ØÙ0ŸÙÁÙwÌÙÚ0ŸÚ/Úw"ØsØ0Ÿ”ØÙ0ŸÙAÙ>ŸAÙüÙ0ŸüÙÚ>ŸÚ/Ú0Ÿ"ØsØ0Ÿ”ØÙ0ŸÙAÙ X ŸAÙüÙ0ŸüÙÚ X ŸÚ/Ú0Ÿ"ØsØ0Ÿ”ØÙ0ŸÙÙ º ŸÙ6ÙTAÙüÙ0ŸüÙÚ ¯ ŸÚ/Ú0ŸqØsØ0Ÿ½ØÁØPÁØ×Ø^qÙvÙQØÙéÙQ¥Ø×Ø\LÙÙ\ÌÙÚ\EØ_Ø1ŸÙÂÙ1ŸÚ/Ú1ŸEØ_Ø à ŸÙÂÙ à ŸÚ/Ú à ŸEØ_ØwÙÁÙwÚ/Úw”ÙÁÙw”ÙÂÙ à Ÿ_ØsØV”Ø¥ØV_ØcØwרóØsרÙ1Ÿ×ØÙ ² Ÿ×ØÙ1Ÿ×ØÙ » Ÿ@ÚÚUÚJÛóUŸ]ÚïÚ_ðÚ)Û_+ÛEÛ_aÚíÚ^ðÚ'Û^+ÛCÛ^eÚëÚ]ðÚ%Û]+ÛAÛ]‰Ú¬ÚP¬ÚæÚSðÚýÚSýÚÛPÛ ÛS Û*ÛU+Û<ÛS@Ú}Úò$ @Ú}Úò @Ú}Úò YÚ}ÚP‰ÚÎÚ]ðÚ Û]‰ÚÎÚ^ðÚ Û^‰ÚÎÚ_ðÚ Û_Ú¬ÚUýÚÛU‘ÚÎÚ\ðÚ Û\•ÚÎÚVðÚ ÛV‰Ú¬ÚQýÚÛQPÛqÛUqÛÜóUŸÜÜUÜDÜóUŸDÜHÜUHÜQÜóUŸPÛüÛ0ŸÜQÜ0ŸPÛqÛUqÛüÛóUŸÜÜUÜDÜóUŸDÜHÜUHÜQÜóUŸPÛuÛ0ŸÜÜ0ŸDÜQÜ0ŸPÛÛ0ŸÛ¾ÛP¾ÛÊÛ‘hÊÛQÜ0ŸPÛÊÛ0ŸÊÛäÛMŸÜ'Ü0Ÿ'ÜDÜMŸDÜQÜ0ŸPÛÊÛ0ŸÊÛäÛ X ŸÜ'Ü0Ÿ'ÜDÜ X ŸDÜQÜ0ŸPÛÊÛ0ŸÊÛäÛ «ŸÜ'Ü0Ÿ'ÜDÜ «ŸDÜQÜ0Ÿ`ÛpÛTpÛqÛ pª#ÜÜTÜÜ pª#DÜHÜT`ÛqÛUqÛuÛóUŸÜÜUDÜHÜUHÜQÜóUŸ`ÛqÛQÜÜQDÜHÜQ`Ü}ÜU}ÜÜÜóUŸÜÜïÜUïÜÝóUŸÝÝUÝ!ÝóUŸ`ÜpÜTpÜ!ÝóTŸ`Ü}ÜU}ÜÔÜóUŸÜÜïÜUïÜÝóUŸÝÝUÝ!ÝóUŸ`ÜÔÜ0ŸÜÜ!Ý0Ÿ`Ü}ÜU}ÜÔÜóUŸÜÜïÜUïÜÝóUŸÝÝUÝ!ÝóUŸ`ÜœÜ0ŸœÜ¢ÜP¢ÜÔÜ0ŸÜÜ!Ý0Ÿ`ÜÜ0ŸœÜ¢Ü0ŸÜÜïÜ0ŸÝ!Ý0Ÿ`ÜÜ0ŸÜœÜPœÜ!Ý0Ÿ`Ü¢Ü0Ÿ¢Ü¼Ü#ŸÜÜ÷Ü0Ÿ÷ÜÝ#ŸÝ!Ý0Ÿ`Ü¢Ü0Ÿ¢Ü¼Ü X ŸÜÜ÷Ü0Ÿ÷ÜÝ X ŸÝ!Ý0Ÿ`Ü¢Ü0Ÿ¢Ü¼Ü *ŸÜÜ÷Ü0Ÿ÷ÜÝ *ŸÝ!Ý0ŸpÜ|ÜT|Ü}Ü pª#ÜÜíÜTíÜïÜ pª#ÝÝTpÜ}ÜU}ÜÜóUŸÜÜïÜUÝÝUÝ!ÝóUŸpÜ}ÜQÜÜïÜQÝÝQ0Ý’ÝU’Ý Þ\ Þ_ßóUŸ_ßlßUlßéß\éß™àóUŸ™à½à\½àÔàóUŸÔàáUá²á\²áÈáóUŸÈáÜá\ÜáüáóUŸüáFâ\Fâ–âóUŸ–âÛâ\ÛâãóUŸãºã\ºã¿ãóUŸ¿ãÊã\0Ý’ÝT’ݶÝS¶Ý_ßóTŸ_ßÎßSÎßÔàóTŸÔà²áS²á âóTŸ â&âS&â–âóTŸ–âÛâSÛâãóTŸã&ãS&ã;ãóTŸ;ãºãSºãÊãóTŸ0Ý’ÝQ’Ý_ßóQŸ_ßlßQlßÔàóQŸÔàáQá£á]£á–âóQŸ–âÛâ]Ûâ;ãóQŸ;ãºã]ºãÊãóQŸTÝ’Ý0Ÿ’ݲÝ‘ _ßÎß0ŸÔà²á0Ÿ â&â‘ –âÛâ0Ÿã"ã‘ ;ãºã0ŸTÝ’Ý0Ÿ’ݲÝ‘¨_ßÎß0ŸÔà²á0Ÿ â&⑨–âÛâ0Ÿã"㑨;ãºã0ŸTÝ’Ý0Ÿ’ݲÝ‘°_ßÎß0ŸÔà²á0Ÿ â&â‘°–âÛâ0Ÿã"ã‘°;ãºã0ŸTÝß0Ÿ+ߨß0Ÿ¨ßÎßNŸÎßÏâ0ŸÏâÛâNŸÛâfã0ŸfãkãNŸkã¤ã0Ÿ¤ã±ãNŸ±ãºã0Ÿ¿ãÊã0ŸTÝß0Ÿ+ߨß0Ÿ¨ßÎß X ŸÎßÏâ0ŸÏâÛâ X ŸÛâfã0Ÿfãkã X Ÿkã¤ã0Ÿ¤ã±ã X Ÿ±ãºã0Ÿ¿ãÊã0ŸTÝß0Ÿ+ߨß0Ÿ¨ß¯ß Ÿ¯ßÆßTÎßÏâ0ŸÏâÛâ ôŸÛâfã0Ÿfãkã øŸkã¤ã0Ÿ¤ã±ã ãºã0Ÿ¿ãÊã0Ÿ%áDáPDáSá~ŸSá¨á^–âÛâ^;ã±ã^±ãºã~Ÿ_ßlßVÜà²áV–âÛâV;ãºãV–âÏâ2Ÿ–âÏâ3Ÿ–âÏâ1Ÿ–âÏâ C Ÿ–âÛâ3Ÿ–âÏâ » Ÿkã¤ã1Ÿkã¤ã3Ÿkã¤ã C Ÿkã±ã3Ÿkã¤ã » Ÿ’ݲÝ‘° â&â‘°ã"ã‘°’ݲÝ‘¨ â&⑨ã"㑨’ݲÝ‘  â&â‘ ã"ã‘ ’Ý Þ\ ÞßóUŸ+ß_ßóUŸÎßéß\éß™àóUŸ™à½à\½àÔàóUŸ²áÈáóUŸÈáÜá\ÜáüáóUŸüáFâ\Fâ–âóUŸÛâãóUŸã;ã\¿ãÊã\’Ýß0Ÿ+ß_ß0ŸÎßÔà0Ÿ²á–â0ŸÛâ;ã0Ÿ¿ãÊã0Ÿ’ÝÒÞ0Ÿ+ß@ßSÎßÿß0ŸÿßàSàWà0Ÿ™àÔà0Ÿ²ácâ0Ÿpâ–â0ŸÛâ;ã0Ÿ¿ãÊã0Ÿ’ݶÝ0ŸþÝÞ0ŸÞMÞSMÞß0Ÿ+ß@ß0ŸéßÿßSÿßà0Ÿà)àSWà™à0ŸªàÔà0ŸÈáüáS â&â0ŸFâ–â0ŸÛâ+ã0Ÿ¿ãÊãS’ÝâÝ0Ÿ)Þ\Þ\èÞðÞ0ŸðÞßP+ß@ß0Ÿéßÿß\ÿßà0Ÿà)à\àŽàPŽà™à‘˜ªàÔà‘˜Èáâá0ŸüáFâ0Ÿpâ{â\ã ã\ ã㑘ã;ã0Ÿ¿ãÊã0ŸþÝ3Þ0Ÿ3Þ\Þ1Ÿéßÿß0Ÿà)à1Ÿ™àÔà0Ÿ ãã0Ÿ’ÝCÞ0ŸCÞ\ÞP\ÞÝÞVÝÞß0Ÿ+ß@ß0ŸÎß)à0ŸWàpà0ŸpààVàºà0ŸºàÏàPÏàÔàVÈáFâ0ŸFâ–âVÛâ ãV ããPã;ã0Ÿ¿ãÊã0Ÿ’Ýß0Ÿ+ß@ßOŸÎßÿß0Ÿÿß)àOŸWàÔà0ŸÈáüáOŸüápâ0Ÿpâ{âOŸ{â–â0ŸÛâã0Ÿã ãOŸ ã;ã0Ÿ¿ãÊãOŸ’Ýß0Ÿ+ß@ß X ŸÎßÿß0Ÿÿß)à X ŸWàÔà0ŸÈáüá X Ÿüápâ0Ÿpâ{â X Ÿ{â–â0ŸÛâã0Ÿã ã X Ÿ ã;ã0Ÿ¿ãÊã X Ÿ’Ýß0Ÿ+ß@ß LŸÎßÿß0Ÿÿßà LŸà)à :ŸWàÔà0ŸÈáâá +Ÿüápâ0Ÿpâ{â HŸ{â–â0ŸÛâã0Ÿã ã HŸ ã;ã0Ÿ¿ãÊã +ŸžÝ®ÝT®Ý²Ý pª# â!âT!â&â pª#ã"ãTžÝ¶Ý\ â&â\ã+ã\žÝ²ÝQ â&âQã"ãQÊÝÚÝTÚÝÞÝ Ъ#&âAâTAâFâ Ъ#+ã2ãTÊÝâÝS&âFâS+ã;ãSÊÝÞÝQ&âFâQ+ã2ãQ Þ\Þ\éßÿß\à)à\|ÞÒÞ0ŸFâcâ0Ÿ{â–â0ŸÛâ ã0Ÿ|ÞÒÞVFâcâV{â–âVÛâ ãV|ÞÒÞ\Fâcâ\{â–â\Ûâ ã\¾ÞÒÞPÛâäâPˆÞÒÞSFâcâS{â–âSÛâ ãSl߃ßslߨß3Ÿlߨß1Ÿlß¨ß C Ÿl߯ß3Ÿlß¨ß » ŸÐã2äU2äÀä\Àä¼åóUŸ¼åÌåUÌåIæ\IæúæóUŸúæç\ç4çóUŸ4çyçUyçcè\cèöèóUŸöè;é\;é{éóUŸ{éê\êêóUŸÐã2äT2äVäSVä¼åóTŸ¼å.æS.æ4çóTŸ4ç.èS.èöèóTŸöè;éS;é{éóTŸ{é†éS†é‹éóTŸ‹é»éS»éËéóTŸËéêSêêóTŸÐã2äQ2ä¼åóQŸ¼åÌåQÌå4çóQŸ4ç}çQ}çè]èöèóQŸöè;é];é‹éóQŸ‹é»é]»éËéóQŸËéê]êêóQŸôã2ä0Ÿ2äRä‘ ¼å.æ0Ÿ4çè0Ÿè.è‘ öè;é0Ÿ{é‚é‘ ‹é»é0ŸËéê0Ÿôã2ä0Ÿ2äR䑨¼å.æ0Ÿ4çè0Ÿè.葨öè;é0Ÿ{é‚鑨‹é»é0ŸËéê0Ÿôã2ä0Ÿ2äRä‘°¼å.æ0Ÿ4çè0Ÿè.è‘°öè;é0Ÿ{é‚é‘°‹é»é0ŸËéê0Ÿôã™å0Ÿ¼åæ0Ÿæ.æ Ÿ.æ/é0Ÿ/é;é Ÿ;é¶é0Ÿ¶é»é Ÿ»éê0Ÿêê Ÿêê0Ÿôã™å0Ÿ¼åæ0Ÿæ.æ X Ÿ.æ/é0Ÿ/é;é X Ÿ;é¶é0Ÿ¶é»é X Ÿ»éê0Ÿêê X Ÿêê0Ÿôã™å0Ÿ¼åæ0Ÿææ ªŸæ&æT.æ/é0Ÿ/é;é —Ÿ;é¶é0Ÿ¶é»é ›Ÿ»éê0Ÿêê ’Ÿêê0Ÿ…ç¤çP¤ç³ç~Ÿ³çè^öè;é^‹é»é^Ëéê^êê~Ÿ¼åÌåV<çèVöè;éV‹é»éVËéêVöè/é2Ÿöè/é3Ÿöè/é1Ÿöè/é è Ÿöè;é3Ÿöè/é » ŸËéê1ŸËéê3ŸËéê è ŸËéê3ŸËéê » Ÿ2äRä‘°è.è‘°{é‚é‘°2äR䑨è.葨{é‚鑨2äRä‘ è.è‘ {é‚é‘ 2äÀä\Àä™åóUŸ.æIæ\IæúæóUŸúæç\ç4çóUŸècè\cèöèóUŸ;é{éóUŸ{é‹é\»éËé\2ä™å0Ÿ.æ4ç0Ÿèöè0Ÿ;é‹é0Ÿ»éËé0Ÿ2äoå0Ÿ.æ¶æ0Ÿúæ4ç0Ÿè½è0ŸÐèöè0Ÿ;é‹é0Ÿ»éËé0Ÿ2äVä0Ÿžä³ä0Ÿ³äíäSíä™å0ŸIæyæS¶æúæ0Ÿ ç4ç0Ÿè.è0ŸVèŒèS°èöè0Ÿ;é‹é0Ÿ2ä‚ä0ŸÉäüä\Iæyæ\ ç4瑘èrè0ŸÐèÛè\féké\ké{鑘{é‹é0Ÿ»éËé0ŸžäÓä0ŸÓäüä1ŸIæ_æ0Ÿ_æyæ1Ÿúæ4ç0Ÿké{é0Ÿ2äãä0ŸãäüäPüä„åV„å™å0Ÿ.æyæ0Ÿ¶æÙæVÙæç0Ÿç/çP/ç4çVèŒè0Ÿ°èöèV;ékéVké{éP{é‹é0Ÿ»éËé0Ÿ2ä™å0Ÿ.æ_æ0Ÿ_æyæ!Ÿ¶æ4ç0ŸèVè0ŸVèŒè!Ÿ°èÐè0ŸÐèÛè!ŸÛèöè0Ÿ;éfé0Ÿféké!Ÿké‹é0Ÿ»éËé0Ÿ2ä™å0Ÿ.æ_æ0Ÿ_æyæ X Ÿ¶æ4ç0ŸèVè0ŸVèŒè X Ÿ°èÐè0ŸÐèÛè X ŸÛèöè0Ÿ;éfé0Ÿféké X Ÿké‹é0Ÿ»éËé0Ÿ2ä™å0Ÿ.æ_æ0Ÿ_æyæ ÝŸ¶æ4ç0ŸèVè0ŸVèrè Ο°èÐè0ŸÐèÛè ëŸÛèöè0Ÿ;éfé0Ÿféké ëŸké‹é0Ÿ»éËé0Ÿ>äNäTNäRä pª#è)èT)è.è pª#{é‚éT>äVä\è.è\{é‹é\>äRäQè.èQ{é‚éQjäzäTzä~ä ª#;èQèTQèVè ª#»éÂéTjä‚äS;èVèS»éËéSjä~äQ;èVèQ»éÂéQÀäüä\Iæyæ\åoå0Ÿ°è½è0ŸÛèöè0Ÿ;éfé0ŸåoåV°è½èVÛèöèV;éféVåoå\°è½è\Ûèöè\;éfé\^åoåP;éDéP(åoåS°è½èSÛèöèS;éféSÌåãåsÌåæ3ŸÌåæ1ŸÌåæ è ŸÌåæ3ŸÌåæ » Ÿ ê/êU/êiêSiê×ìóUŸ×ìíSíßíóUŸ ê7êT7êßíóTŸ-ê/êU/êiêSiê<ìóUŸPì×ìóUŸ×ìíSíßíóUŸ-ê<ì0ŸPìßí0Ÿ-ê/êU/êiêSiê×ìóUŸ×ìíSíßíóUŸ-ê_ê0Ÿ_êuê]uêíêVíêšë]šëúëVì<ìVPì×ìV×ìí0Ÿí3íV3íKí]KíMíVMí`í]`íuíVuí”í]”í™íV™íÚí]ÚíßíV-êì0Ÿì;ìP;ì<쑸Pìßí0Ÿ-ê8ê0Ÿ8êiêPiê5ë\5ë°ë0Ÿ°ëðë\PìÁì\×ì÷ìP÷ìuí\uíÑí0ŸÑíßí\-êUê0ŸUêýê_ýê ë0Ÿ ëëPë5ë_5ëˆë0Ÿ°ëëë_Pì”ì_×ì#í0Ÿ#íBí_BíMíPMíuí_uí‚í0Ÿ‹íÑí0ŸÑíßí_Yê_ê0Ÿ_êiê]iê@ë^°ëëë^Pì”ì^#íuí^Ñíßí^-êqê0ŸqêŠêVŠê­ê0Ÿíê ë0Ÿ ë9ëP9ë°ëS°ë¿ëVÛëëëSPìfì0ŸŽì”ìS×ìuí0ŸuíÑíSÑíßí0Ÿ-êÛë0ŸÛëúëOŸPìŽì0ŸŽì×ìOŸ×ìí0Ÿí#íOŸ#íMí0ŸMíuíOŸuí‹í0Ÿ‹í™íOŸ™íÑí0ŸÑíßíOŸ-êÛë0ŸÛëúë X ŸPìŽì0ŸŽì×ì X Ÿ×ìí0Ÿí#í X Ÿ#íMí0ŸMíuí X Ÿuí‹í0Ÿ‹í™í X Ÿ™íÑí0ŸÑíßí X Ÿ-êÛë0ŸÛëëë]PìŽì0ŸŽì”ì]×ìí0Ÿí#í]#íMí0ŸMíuí º Ÿuí‹í0Ÿ‹í™í  Ÿ™íÑí0ŸÑíßí º Ÿuêíê]°ëÛë]PìŽì]#í3í]•ê¥êT¥ê©ê Hª#PìaìTaìfì Hª##í*íT•ê­êVPìfìV#í3íV•ê©êQPìfìQ#í*íQ¶êÜêSfì{ìS¶êÜê\fì{ì\¶êóê\¿ëÏë\fì”ì\»ê×êP×êÜêpŸfìzìP5ëˆë0Ÿuí‚í0Ÿ™íÑí0Ÿ5ë9ëP9ëˆëSuí‚íS™íÑíS5ëˆëVuí‚íV™íÑíVwëˆëP¯í³íP@ëˆë^uí‚í^™íÑí^àíïíUïí)îS)î—ðóUŸ—ðÎðSÎðŸñóUŸàí÷íT÷íŸñóTŸííïíUïí)îS)îüïóUŸð—ðóUŸ—ðÎðSÎðŸñóUŸííüï0ŸðŸñ0ŸííïíUïí)îS)î—ðóUŸ—ðÎðSÎðŸñóUŸííî0Ÿî5î]5î­îV­îZï]ZïºïV×ïüïVð—ðV—ðÎð0ŸÎðóðVóð ñ] ñ ñV ñ ñ] ñ5ñV5ñTñ]TñYñVYñšñ]šñŸñVíí×ï0Ÿ×ïûïPûïüðŸñ0Ÿííøí0Ÿøí)îP)îõî\õîpï0Ÿpï°ï\ðð\—ð·ðP·ð5ñ\5ñ‘ñ0Ÿ‘ñŸñ\ííî0Ÿî½î_½îÊî0ŸÊîÙîPÙîõî_õîHï0Ÿpï«ï_ðTð_—ðãð0Ÿãðñ_ñ ñP ñ5ñ_5ñBñ0ŸKñ‘ñ0Ÿ‘ñŸñ_îî0Ÿî)î])îï^pï«ï^ðTð^ãð5ñ^‘ñŸñ^íí1î0Ÿ1îJîVJîmî0Ÿ­îàî0ŸàîùîPùîpïSpïïV›ï«ïSð&ð0ŸNðTðS—ð5ñ0Ÿ5ñ‘ñS‘ñŸñ0Ÿíí›ï0Ÿ›ïºï9ŸðNð0ŸNð—ð9Ÿ—ðÎð0ŸÎðãð9Ÿãð ñ0Ÿ ñ5ñ9Ÿ5ñKñ0ŸKñYñ9ŸYñ‘ñ0Ÿ‘ñŸñ9Ÿíí›ï0Ÿ›ïºï X ŸðNð0ŸNð—ð X Ÿ—ðÎð0ŸÎðãð X Ÿãð ñ0Ÿ ñ5ñ X Ÿ5ñKñ0ŸKñYñ X ŸYñ‘ñ0Ÿ‘ñŸñ X Ÿíí›ï0Ÿ›ï«ï]ðNð0ŸNðTð]—ðÎð0ŸÎðãð]ãð ñ0Ÿ ñ5ñ n Ÿ5ñKñ0ŸKñYñ v ŸYñ‘ñ0Ÿ‘ñŸñ n Ÿ5î­î]pï›ï]ðNð]ãðóð]UîeîTeîiî Hª#ð!ðT!ð&ð Hª#ãðêðTUîmîVð&ðVãðóðVUîiîQð&ðQãðêðQvîœîS&ð;ðSvîœî\&ð;ð\vî³î\ïï\&ðTð\{î—îP—îœîpŸ&ð:ðPõîHï0Ÿ5ñBñ0ŸYñ‘ñ0ŸõîùîPùîHïS5ñBñSYñ‘ñSõîHïV5ñBñVYñ‘ñV7ïHïPoñsñPïHï^5ñBñ^Yñ‘ñ^ ñ òU ò´ò\´òQóóUŸQódóUdóõ\õéõóUŸéõö\öaöUaöL÷\L÷d÷óUŸd÷q÷\q÷÷óUŸ÷¯÷\¯÷·÷óUŸ·÷Jø\JøOøóUŸOøôø\ôøùóUŸù{ú\{ú…úóUŸ…úÖú\ÖúæúóUŸæúû\û&ûóUŸ&ûùû\ùûüóUŸüTü\TünüóUŸnü©ü\©ü¹üóUŸ¹üÃü\Ãü½ýóUŸ½ýÆý\ÆýÓýóUŸÓýöý\öýþóUŸþYþ\YþnÿóUŸnÿìÿ\ìÿóUŸÆ\ÆËóUŸËÛ\ÛëóUŸëô\ôþóUŸþ\ ñ òT òòSòQóóTŸQóÆóSÆóöóTŸö÷S÷iøóTŸiø®øS®ø¼ÿóTŸ¼ÿìÿSìÿ0óTŸ0vSvóTŸ¦S¦óTŸ ñ òQ òQóóQŸQódóQdóöóQŸöeöQeöðö]ðöiøóQŸiø®ø]®ø¼ÿóQŸ¼ÿìÿ]ìÿ0óQŸ0v]vóQŸ¦]¦óQŸÄñ ò0Ÿ ò!ò‘ QóÆó0Ÿö÷0Ÿiø®ø0Ÿ¼ÿìÿ0Ÿ0v0Ÿ¦0ŸÄñ ò0Ÿ ò!ò‘¨QóÆó0Ÿö÷0Ÿiø®ø0Ÿ¼ÿìÿ0Ÿ0v0Ÿ¦0ŸÄñ ò0Ÿ ò!ò‘°QóÆó0Ÿö÷0Ÿiø®ø0Ÿ¼ÿìÿ0Ÿ0v0Ÿ¦0ŸÄñ.ó0ŸQó ó0Ÿ óÆó ÍŸÆó¢ø0Ÿ¢ø®ø ÍŸ®øçÿ0Ÿçÿìÿ ÍŸìÿi0Ÿiv ÍŸvÆ0ŸË0ŸÄñ.ó0ŸQó ó0Ÿ óÆó X ŸÆó¢ø0Ÿ¢ø®ø X Ÿ®øçÿ0Ÿçÿìÿ X Ÿìÿi0Ÿiv X ŸvÆ0ŸË0ŸÄñ.ó0ŸQó ó0Ÿ ó§ó ÞHŸ§ó¾óTÆó¢ø0Ÿ¢ø®ø ËHŸ®øçÿ0Ÿçÿìÿ ÏHŸìÿi0Ÿiv ÆHŸvÆ0ŸË0ŸmöŒöPŒö›ö~Ÿ›ö÷^iø®ø^¼ÿìÿ^0v^¦~ŸQódóV$ö÷Viø®øV¼ÿìÿV0vV¦Viø¢ø2Ÿiø¢ø3Ÿiø¢ø1Ÿiø¢ø è Ÿiø®ø3Ÿiø¢ø » Ÿ0i1Ÿ0i3Ÿ0i è Ÿ0v3Ÿ0i » Ÿ ò!ò‘° ò!ò‘¨ ò!ò‘  ò´ò\´ò.óóUŸÆóõ\õéõóUŸéõö\÷L÷\L÷d÷óUŸd÷q÷\q÷÷óUŸ÷¯÷\¯÷·÷óUŸ·÷Jø\JøOøóUŸOøiø\®øôø\ôøùóUŸù{ú\{ú…úóUŸ…úÖú\ÖúæúóUŸæúû\û&ûóUŸ&ûùû\ùûüóUŸüTü\TünüóUŸnü©ü\©ü¹üóUŸ¹üÃü\Ãü½ýóUŸ½ýÆý\ÆýÓýóUŸÓýöý\öýþóUŸþYþ\YþnÿóUŸnÿ¼ÿ\ìÿóUŸ0\v\¦Æ\ËÛ\ÛëóUŸëô\ôþóUŸþ\ ò.ó0ŸÆóö0Ÿ÷iø0Ÿ®ø•ý0Ÿ•ýšýPšý¼ÿ0Ÿìÿ00Ÿv0Ÿ¦Æ0ŸË0Ÿ òºò0ŸÆóbô0ŸõFõ‘ø~Ÿõ°õR°õ¸õ‘ø~÷-ø0ŸOøiø0Ÿù3ù0Ÿ&ûYû0Ÿ|ýšý0Ÿ4ÿCÿ0Ÿ‘ÿ¼ÿ0Ÿ¦¶0Ÿþ0Ÿ ò2ò0Ÿiò{ò0Ÿ{òˆòPˆòºòVßóôVô¿ô0ŸûôFõVŸõ¸õVéõö0Ÿ÷d÷0Ÿ–÷·÷P·÷øVøOø0ŸOøiøV®ø3ù0Ÿ3ùBùVÚù…ú0Ÿ·úÏú0Ÿæúû0Ÿ&ûYû0Ÿyû„ûZ“û—ûZ—ûÁû‘ünü0Ÿ¹üFý0Ÿ|ý…ý0Ÿ…ý•ýP•ýšý0Ÿ½ýþ0ŸEþ³þ0ŸÔþÿ0Ÿ4ÿCÿPCÿnÿ0ŸnÿÿZÿ‘ÿ‘‘ÿ¬ÿ0Ÿìÿ00Ÿv0Ÿ¦Æ0ŸËë0Ÿëþ‘þV òUò0Ÿ’òºòSßóêóSêóvô^vôõ0ŸõFõSŸõ¸õSéõö^öö0Ÿ÷d÷0Ÿ÷–÷0ŸÙ÷Aø^AøOøSOøiø^®øù0Ÿù3ù^3ùÆù0ŸÏú&û0Ÿ&ûYû^Yûàû0Ÿnü˜ü0Ÿ|ýšý0ŸþEþ0Ÿ4ÿCÿ0Ÿnÿ¼ÿ0Ÿ00Ÿ¦Æ0Ÿëþ0Ÿþ^ ò«ò0Ÿ«òºòYÆóõ0Ÿõ8õYŸõ°õY°õ¸õ‘€éõö0Ÿ÷Ä÷0ŸÄ÷ß÷Yé÷í÷Yí÷ø‘ø~øOø0ŸOø^øY^øiø‘ø~®ødû0Ÿdû„ûY“û—ûY—û²û‘˜²ûLþ0ŸLþlþYvþzþYzþþ‘€þnÿ0ŸnÿÿYÿ‘ÿ‘˜‘ÿ¼ÿ0ŸìÿúÿYúÿ‘€00Ÿv0Ÿ¦Æ0ŸËÛ0ŸÛë‘€ëþ‘˜þ‘ø~ò«ò0Ÿßóêó0Ÿêôõ0Ÿ·÷é÷0Ÿé÷ø1ŸOøiø0Ÿ3ùBù0ŸNú…ú0ŸYû“û0Ÿ“ûÁû1Ÿ¹üÊü0ŸEþvþ0ŸvþŸþ1Ÿnÿ‘ÿ0Ÿìÿ0ŸÛ1Ÿ ò¥ò0Ÿ¥ò«òP«òºò0ŸÆóßó0ŸßóêóPêólô_lôœô0ŸÒôäô0ŸäôñôPñôFõ_Ÿõ¸õ_éõÿõ0Ÿÿõö_÷Y÷0ŸY÷d÷_d÷ô÷0Ÿô÷ øP øOø_Oøiø0Ÿ®øù0Ÿù_ù__ù#ú0Ÿ_ú…ú_…ú·ú0Ÿû&ûP&ûÁû_Áû¹ü0Ÿ¹üÊü_ÊüTý\Týdý0ŸdýoýPoý•ý_•ýšý0Ÿšý½ý\Óýîý0ŸþEþ0ŸbþÌþ\ÌþÔþ_Ôþ ÿ\ ÿÿ_ÿ4ÿP4ÿCÿ_Cÿnÿ\nÿ‘ÿ_‘ÿ¼ÿ0Ÿìÿ\ 0Ÿv0Ÿ¦Æ0ŸËÛ0ŸÛæ\æþ_þP òºò0ŸÆó õ0Ÿ õõPõFõ^Ÿõ¸õ^éõö0Ÿ÷iø0Ÿ®ø3ù0Ÿ3ùBùPBùÐù^Ðùú0Ÿ6úHú0ŸHúUúPUú¡ú^¡ú·ú0ŸÏúžû0Ÿžû¼ûP¼ûü^üfü0Ÿnüçü^çü½ý0ŸîýþPþŸþ^Ÿþ¼ÿ0Ÿìÿ^00Ÿv0Ÿ¦Æ0ŸËÛ0ŸÛë^ëþPþ0Ÿ òºò0ŸÆóõ0ŸõFõ]Ÿõ¸õ]éõö0Ÿ÷iø0Ÿ®øoú0Ÿoú…úP…ú¹ü0Ÿ¹üÊüPÊüMý]Mýšý0Ÿšý¬ý]¬ýþ0ŸþšþPšþÿ]ÿCÿ0ŸCÿnÿ]nÿ¼ÿ0Ÿìÿ00Ÿv0Ÿ¦Æ0ŸËÛ0ŸÛëPë0Ÿ ò«ò0Ÿ«òºò ÏŸÆóõ0ŸõFõ ÏŸŸõ¸õ ÏŸéõö0Ÿ÷Y÷0ŸY÷d÷ ÏŸd÷iø0Ÿ®ø¼ÿ0Ÿìÿ00Ÿv0Ÿ¦Æ0ŸË0Ÿ ò«ò0Ÿ«òºò X ŸÆóõ0ŸõFõ X ŸŸõ¸õ X Ÿéõö0Ÿ÷Y÷0ŸY÷d÷ X Ÿd÷iø0Ÿ®ø¼ÿ0Ÿìÿ00Ÿv0Ÿ¦Æ0ŸË0Ÿ ò«ò0Ÿ«òºò IŸÆóõ0ŸõFõ\Ÿõ¸õ\éõö0Ÿ÷Y÷0ŸY÷d÷\d÷iø0Ÿ®ø¼ÿ0Ÿìÿ00Ÿv0Ÿ¦Æ0ŸË0Ÿò2òS÷Y÷S‘ÿ¬ÿS¦¶S(ò2òP÷÷P÷+÷V‘ÿ§ÿV¦±V÷Y÷S‘ÿ¬ÿS¦¶S÷+÷S‘ÿ¬ÿS¦¶S÷'÷U‘ÿ£ÿU¦­U÷'÷Q‘ÿ£ÿQ¦­Q4÷Y÷S=òMòTMòQò ت#÷‘÷T‘÷–÷ ت#¬ÿ³ÿT=òUòV÷–÷V¬ÿ¼ÿV=òQòR÷–÷R¬ÿ³ÿRÑ÷ø^Oøiø^þ^ôbô0Ÿø-ø0Ÿù3ù0Ÿ&ûYû0Ÿôbô_ø-ø_ù3ù_&ûYû_ôbô^ø-ø^ù3ù^&ûYû^HôbôP&û4ûPôbôSø-øSù3ùS&ûYûS}ôœôS®øüøSüøùq\Ÿ S¶ÆS’ôœôP®øÂøPÂøÓø__¶Á_®øüøSüøùq\Ÿ S¶ÆS·øÓøS S¶ÆS·øÏøUU¶½U»øÏøQQ¶½QÜøüøSüøùq\Ÿ§ô·ôT·ô»ô ت#æúûTûû ت# 'T§ô¿ô_æúû_ 0_§ô»ôQæúûQ 'Qqû„ûZnÿÿZÿ‘ÿ‘_ùÆù0ŸÁûàû0Ÿnü˜ü0ŸþEþ0Ÿ_ùÆù^Áûàû^nü˜ü^þEþ^_ù•ùZÁûÙûZÙûàû‘€nü…üZ…ü˜ü‘€±ù¹ùP¹ùÆùSþEþSjù±ùSÁûàûSnü˜üSáùú]üWü]Wüeüq\Ÿv]ËÛ]öùúPü"üP"ü3ü^vˆ^ËÖ^üWü]Wüeüq\Ÿv]ËÛ]ü3ü]v]ËÛ]ü/üUv„UËÒUü/üQv„QËÒQ<üWü]Wüeüq\Ÿ úúTúú ت#ÓýéýTéýîý ت#”T ú#ú^Óýîý^^ úúQÓýîýQ”QYþŸþ\ìÿ\Ûæ\æë_çüFý0ŸŸþ³þ0ŸÔþÿ0ŸCÿnÿ0ŸçüFý]Ÿþ³þ]Ôþÿ]Cÿnÿ]çüFý\Ÿþ³þ\Ôþÿ\Cÿnÿ\6ý9ýP9ýFýVCÿnÿVóüFý^Ÿþ³þ^Ôþÿ^Cÿnÿ^dó{ósdó ó3Ÿdó ó1Ÿdó ó è Ÿdó§ó3Ÿdó ó » Ÿ3U3DSDXóUŸXS|óUŸ|ËS˾óUŸ¾ñSñóUŸSóUŸUSUÕóUŸÕSóUŸ3a3jóõ)Ÿj“a“ÁwÁ|óõ)Ÿ|¸w¸¾óõ)Ÿ¾ÛaÛïwïìóõ)Ÿìðaðwóõ)Ÿ3b3jóõ)Ÿj“b“°‘¸°Ëóõ)ŸË¾‘¸¾ÛbÛ쑸ìðbð‘¸3T3jóTŸj~T~óTŸ©®Sb|S30Ÿj¢0Ÿ¾ï0Ÿì0ŸG0ŸX'0Ÿ®0ŸbË0Ÿ¡¾\¾þ0Ÿ…0Ÿ0Ÿ\G0ŸXÌ0ŸÌßPß'^®Æ^ÆË0Ÿ_ï0ŸïþPþ0Ÿr^rÕ0ŸÕì^ì0ŸG0ŸXæ0ŸæøPø'_®Æ_ÆË0Ÿ_0ŸPr_rÕ0ŸÕì_ì0ŸG0ŸXñ0ŸV']®µVµ/]/Ë0Ÿ_]0Ÿ6ì]ì0ŸG0ŸX0Ÿ'Q®Ë0Ÿ_ 0Ÿ AQJNQNcwcÕ0ŸÕâQâìwì0Ÿñ0Ÿ®µ0ŸJ0ŸJr1ŸÕì0ŸG0ŸX0ŸP'S®µPµ$S$Ë0Ÿ_o0ŸoSU0ŸUhPhÕSÕ0Ÿ—P—¶S S;G õ)õ),ÿŸXj õ)õ),ÿŸG0ŸX0Ÿ› ¨Ÿ®Ë0ŸË_ ¨Ÿ_¡0Ÿ¡¾ ¨Ÿ¾0Ÿ ¨ŸG0ŸX0Ÿ®Ë0Ÿ_¡0Ÿ¾0Ÿ~“T¾ÚTÚÛ Xª#ìðT~¢S¾ïSìS~“P¾ÂPÂÛsìðs-r]Õì]Æ0Ÿr…0ŸÕ0ŸÆSr…SÕSÆ]r…]Õ]  P \³Õ\Ñ \r…\³\9WsÿŸsÿŸ oUo\óUŸÚ\Ú U ®\®ÇUÇA \ }T}„S„:óTŸ:§S§ÚóTŸÚUSU®óTŸ®< S< A óTŸ }Q}:óQŸ:e]eÚóQŸÚQU]U®óQŸ®ÇQÇ< ]< A óQŸ—§cUacazwÉÙbzb®‘¨Bù0Ÿ 0Ÿ Æ ¨ŸÆ©0Ÿ©® ¨Ÿ®0 0Ÿ0 <  ¨ŸBù0Ÿ 0Ÿ Æ X ŸÆ©0Ÿ©® X Ÿ®0 0Ÿ0 <  X ŸBù0Ÿ 0Ÿ § x1Ÿ§¾TÆ©0Ÿ©® t1Ÿ®0 0Ÿ0 <  g1Ÿ:RPRe~Ÿ!P!U^Ç< ^:eVäUV®< V÷0 1Ÿ÷0 2Ÿ÷0   Ÿ÷< 2Ÿ÷0  » ŸÙébÙécÙù\-\Ùù0Ÿ-0Ÿe{se 2Ÿe 1Ÿe   Ÿe§2Ÿe  » ŸP s Us „ S„ ˜ óUŸ˜ W SW ¼ óUŸ¼  S þ óUŸþ 1 S1 P óUŸP R SR \ óUŸ\ • S• óUŸDSDVóUŸP s as ª óõ)Ÿª Ó aÓ  w ¼ óõ)Ÿ¼ ø wø þ óõ)Ÿþ  a / w/ ,óõ)Ÿ,0a0DwDVóõ)ŸP s bs ª óõ)Ÿª Ó bÓ ð ‘¸ð  óõ)Ÿ þ ‘¸þ  b ,‘¸,0b0V‘¸P s Ts ª óTŸª ¾ T¾ VóTŸé î S¢ ¼ SP s 0Ÿª â 0Ÿþ / 0Ÿ,D0ŸP ‡ 0Ÿ˜ g 0Ÿî Z 0Ÿ¢  0Ÿá þ \þ > 0ŸP Å 0ŸÝ D0ŸDV\P ‡ 0Ÿ˜  0Ÿ  P g ^î  ^  0ŸŸ / 0Ÿ/ > P> P 0ŸP ² ^² 0Ÿ,^,V0ŸP ‡ 0Ÿ˜ & 0Ÿ& 8 P8 g _î  _  0ŸŸ P 0ŸP \ P\ ² _² 0Ÿ,_,V0ŸP ‡ 0Ÿ˜ 1 0ŸB ] V] g ]î õ Võ o ]o  0ŸŸ ¿ ]¿ \ 0Ÿv ,],V0ŸP ‡ 0Ÿ˜ ] 0Ÿ] g Qî  0ŸŸ ` 0Ÿ`  QŠ Ž QŽ £ w£ 0Ÿ"Q",w,V0Ÿ1 ] 0Ÿî õ 0Ÿ\ Š 0ŸŠ ² 1Ÿ,0ŸP ‡ 0Ÿ˜ W 0ŸW ] P] g Sî õ Põ d Sd  0ŸŸ ¯ 0Ÿ¯ ¿ S¿ • 0Ÿ• ¨ P¨ SV0ŸÍ × P× ö SDKS{ ‡  õ)õ),ÿŸ˜ ª  õ)õ),ÿŸP ‡ 0Ÿ˜ ] 0Ÿ] Û  ¦Ÿî  0Ÿ Ÿ  ¦ŸŸ á 0Ÿá þ  ¦Ÿþ D0ŸDV ¦ŸP ‡ 0Ÿ˜ ] 0Ÿî  0ŸŸ á 0Ÿþ D0Ÿ¾ Ó Tþ  T   `ª#,0T¾ â Sþ / S,DS¾ Ó Pþ  P  s,0sm ² ],] Z 0Ÿ² Å 0ŸÝ 0Ÿ Z S² Å SÝ S Z ]² Å ]Ý ]J M PM Z \ó \ J \² Å \Ý ó \y — sÿŸ¿ Í sÿŸ`¯U¯U\UZóUŸZ\JUJî\îU\`½T½ÄSÄzóTŸzçSçóTŸ•S•îóTŸî|S|óTŸ`½Q½zóQŸz¥]¥óQŸNQN•]•îóQŸîQ|]|óQŸ×çc•¡c¡ºw bºÏbÏ‚90ŸZà0Ÿà ¦Ÿé0Ÿéî ¦Ÿîp0Ÿp| ¦Ÿ‚90ŸZà0Ÿà X Ÿé0Ÿéî X Ÿîp0Ÿp| X Ÿ‚90ŸZà0Ÿàç ¬0ŸçþTé0Ÿéî ¨0Ÿîp0Ÿp| ›0Ÿz’P’¥~ŸUaPa•^|^z¥V$•Vî|V7p1Ÿ7p2Ÿ7p  Ÿ7|2Ÿ7p » Ÿ)b)c9\Zm\90ŸZm0Ÿ¥»s¥à2Ÿ¥à1Ÿ¥à  Ÿ¥ç2Ÿ¥à » Ÿ³U³ÄSÄØóUŸØ—S—üóUŸüKSK>óUŸ>qSqóUŸ’S’œóUŸœÕSÕUóUŸU„S„–óUŸ³a³êóõ)ŸêaAwAüóõ)Ÿü8w8>óõ)Ÿ>[a[owolóõ)Ÿlpap„w„–óõ)Ÿ³b³êóõ)Ÿêb0‘¸0Kóõ)ŸK>‘¸>[b[l‘¸lpbp–‘¸³T³êóTŸêþTþ–óTŸ).SâüS³0Ÿê"0Ÿ>o0Ÿl„0ŸÇ0ŸØ§0Ÿ.š0ŸâK0Ÿ!>\>~0Ÿ0Ÿ„0Ÿ„–\Ç0ŸØL0ŸL_P_§^.F^FK0Ÿßo0Ÿo~P~0Ÿò^òU0ŸUl^l–0ŸÇ0ŸØf0ŸfxPx§_.F_FK0Ÿß0ŸœPœò_òU0ŸUl_l–0ŸÇ0ŸØq0Ÿ‚V§].5V5¯]¯K0Ÿßÿ]ÿœ0Ÿ¶l]l–0ŸÇ0ŸØ0Ÿ§Q.K0Ÿß 0Ÿ ÁQÊÎQÎãwãU0ŸUbQblwl–0Ÿq0Ÿ.50ŸœÊ0ŸÊò1ŸUl0ŸÇ0ŸØ—0Ÿ—P§S.5P5¤S¤K0Ÿßï0ŸïÿSÿÕ0ŸÕèPèUSU–0Ÿ P6S„‹S»Ç õ)õ),ÿŸØê õ)õ),ÿŸÇ0ŸØ0Ÿ ŠŸ.K0ŸKß ŠŸß!0Ÿ!> ŠŸ>„0Ÿ„– ŠŸÇ0ŸØ0Ÿ.K0Ÿß!0Ÿ>„0ŸþT>ZTZ[ Xª#lpTþ"S>oSl„SþP>BPB[slps­ò]Ul]Fš0Ÿò0ŸU0ŸFšSòSUSFš]ò]U]ŠPš\3U\QŠ\ò\3\¹×sÿŸÿ sÿŸ ïUï•\•šóUŸšZ\ZŠUŠ.\.GUGÁ\ ýTýSºóTŸº'S'ZóTŸZÕSÕ.óTŸ.¼S¼ÁóTŸ ýQýºóQŸºå]åZóQŸZŽQŽÕ]Õ.óQŸ.GQG¼]¼ÁóQŸ'cÕácáúwIYbúb.‘¨Ây0Ÿš 0Ÿ F ŠŸF)0Ÿ). ŠŸ.°0Ÿ°¼ ŠŸÂy0Ÿš 0Ÿ F X ŸF)0Ÿ). X Ÿ.°0Ÿ°¼ X ŸÂy0Ÿš 0Ÿ ' DŸ'>TF)0Ÿ). ÿCŸ.°0Ÿ°¼ òCŸºÒPÒå~Ÿ•¡P¡Õ^G¼^ºåVdÕV.¼Vw°1Ÿw°2Ÿw°  Ÿw¼2Ÿw° » ŸYibYicYy\š­\Yy0Ÿš­0Ÿåûså 2Ÿå 1Ÿå   Ÿå'2Ÿå  » ŸÐóUóSóUŸ×S×<óUŸ<‹S‹~óUŸ~±S±ÐóUŸÐÒSÒÜóUŸÜS•óUŸ•ÄSÄÖóUŸÐóaó*óõ)Ÿ*SaSw<óõ)Ÿ<xwx~óõ)Ÿ~›a›¯w¯¬óõ)Ÿ¬°a°ÄwÄÖóõ)ŸÐóbó*óõ)Ÿ*SbSp‘¸p‹óõ)Ÿ‹~‘¸~›b›¬‘¸¬°b°Ö‘¸ÐóTó*óTŸ*>T>ÖóTŸinS"<SÐó0Ÿ*b0Ÿ~¯0Ÿ¬Ä0ŸÐ0Ÿç0ŸnÚ0Ÿ"‹0Ÿa~\~¾0ŸÐE0Ÿ]Ä0ŸÄÖ\Ð0ŸŒ0ŸŒŸPŸç^n†^†‹0Ÿ¯0Ÿ¯¾P¾Ð0ŸÐ2^2•0Ÿ•¬^¬Ö0ŸÐ0Ÿ¦0Ÿ¦¸P¸ç_n†_†‹0ŸÐ0ŸÐÜPÜ2_2•0Ÿ•¬_¬Ö0ŸÐ0Ÿ±0ŸÂÝVÝç]nuVuï]ï‹0Ÿ?]?Ü0Ÿö¬]¬Ö0ŸÐ0ŸÝ0ŸÝçQn‹0Ÿà0ŸàQ Q#w#•0Ÿ•¢Q¢¬w¬Ö0Ÿ±Ý0Ÿnu0ŸÜ 0Ÿ 21Ÿ•¬0ŸÐ0Ÿ×0Ÿ×ÝPÝçSnuPuäSä‹0Ÿ/0Ÿ/?S?0Ÿ(P(•S•Ö0ŸMWPWvSÄËSû õ)õ),ÿŸ* õ)õ),ÿŸÐ0ŸÝ0ŸÝ[ ŒŸn‹0Ÿ‹ ŒŸa0Ÿa~ ŒŸ~Ä0ŸÄÖ ŒŸÐ0ŸÝ0Ÿn‹0Ÿa0Ÿ~Ä0Ÿ>ST~šTš› Pª#¬°T>bS~¯S¬ÄS>SP~‚P‚›s¬°sí2]•¬]†Ú0Ÿ2E0Ÿ]•0Ÿ†ÚS2ES]•S†Ú]2E]]•]ÊÍPÍÚ\s•\‘Ê\2E\]s\ùsÿŸ?MsÿŸà/U/Õ\ÕÚóUŸÚš \š Ê UÊ n!\n!‡!U‡!"\à=T=DSDúóTŸúg Sg š óTŸš !S!n!óTŸn!ü!Sü!"óTŸà=Q=úóQŸú% ]% š óQŸš Î QÎ !]!n!óQŸn!‡!Q‡!ü!]ü!"óQŸWgc!!!c!!:!w‰™b:!O!bO!n!‘¨¹0ŸÚ` 0Ÿ` †  ŒŸ† i!0Ÿi!n! ŒŸn!ð!0Ÿð!ü! ŒŸ¹0ŸÚ` 0Ÿ` †  X Ÿ† i!0Ÿi!n! X Ÿn!ð!0Ÿð!ü! X Ÿ¹0ŸÚ` 0Ÿ` g  ÏDŸg ~ T† i!0Ÿi!n! ËDŸn!ð!0Ÿð!ü! ¾DŸú P % ~ŸÕ á Pá !^‡!ü!^ú% V¤ !Vn!ü!V·!ð!1Ÿ·!ð!2Ÿ·!ð! + Ÿ·!ü!2Ÿ·!ð! » Ÿ™©b™©c™¹\Úí\™¹0ŸÚí0Ÿ% ; s% ` 2Ÿ% ` 1Ÿ% `  + Ÿ% g 2Ÿ% `  » Ÿ"3"U3"D"SD"X"óUŸX"#S#|$óUŸ|$Ë$SË$¾%óUŸ¾%ñ%Sñ%&óUŸ&&S&&óUŸ&U&SU&Õ&óUŸÕ&'S''óUŸ"3"a3"j"óõ)Ÿj"“"a“"Á"wÁ"|$óõ)Ÿ|$¸$w¸$¾%óõ)Ÿ¾%Û%aÛ%ï%wï%ì&óõ)Ÿì&ð&að&'w''óõ)Ÿ"3"b3"j"óõ)Ÿj"“"b“"°$‘¸°$Ë$óõ)ŸË$¾%‘¸¾%Û%bÛ%ì&‘¸ì&ð&bð&'‘¸"3"T3"j"óTŸj"~"T~"'óTŸ©#®#Sb$|$S"3"0Ÿj"¢"0Ÿ¾%ï%0Ÿì&'0Ÿ"G"0ŸX"'#0Ÿ®#$0Ÿb$Ë$0Ÿ¡%¾%\¾%þ%0Ÿ&…&0Ÿ&'0Ÿ''\"G"0ŸX"Ì"0ŸÌ"ß"Pß"'#^®#Æ#^Æ#Ë$0Ÿ_%ï%0Ÿï%þ%Pþ%&0Ÿ&r&^r&Õ&0ŸÕ&ì&^ì&'0Ÿ"G"0ŸX"æ"0Ÿæ"ø"Pø"'#_®#Æ#_Æ#Ë$0Ÿ_%&0Ÿ&&P&r&_r&Õ&0ŸÕ&ì&_ì&'0Ÿ"G"0ŸX"ñ"0Ÿ##V#'#]®#µ#Vµ#/$]/$Ë$0Ÿ_%%]%&0Ÿ6&ì&]ì&'0Ÿ"G"0ŸX"#0Ÿ#'#Q®#Ë$0Ÿ_% &0Ÿ &A&QJ&N&QN&c&wc&Õ&0ŸÕ&â&Qâ&ì&wì&'0Ÿñ"#0Ÿ®#µ#0Ÿ&J&0ŸJ&r&1ŸÕ&ì&0Ÿ"G"0ŸX"#0Ÿ##P#'#S®#µ#Pµ#$$S$$Ë$0Ÿ_%o%0Ÿo%%S%U&0ŸU&h&Ph&Õ&SÕ&'0Ÿ%—%P—%¶%S' 'S;"G" õ)õ),ÿŸX"j" õ)õ),ÿŸ"G"0ŸX"#0Ÿ#›# ˆŸ®#Ë$0ŸË$_% ˆŸ_%¡%0Ÿ¡%¾% ˆŸ¾%'0Ÿ'' ˆŸ"G"0ŸX"#0Ÿ®#Ë$0Ÿ_%¡%0Ÿ¾%'0Ÿ~"“"T¾%Ú%TÚ%Û% `ª#ì&ð&T~"¢"S¾%ï%Sì&'S~"“"P¾%Â%PÂ%Û%sì&ð&s-&r&]Õ&ì&]Æ#$0Ÿr&…&0Ÿ&Õ&0ŸÆ#$Sr&…&S&Õ&SÆ#$]r&…&]&Õ&] $ $P $$\³&Õ&\Ñ# $\r&…&\&³&\9$W$sÿŸ%%sÿŸ 'o'Uo'(\((óUŸ(Ú(\Ú( )U )®)\®)Ç)UÇ)A*\ '}'T}'„'S„':(óTŸ:(§(S§(Ú(óTŸÚ(U)SU)®)óTŸ®)<*S<*A*óTŸ '}'Q}':(óQŸ:(e(]e(Ú(óQŸÚ()Q)U)]U)®)óQŸ®)Ç)QÇ)<*]<*A*óQŸ—'§'cU)a)ca)z)wÉ'Ù'bz))b)®)‘¨B'ù'0Ÿ( (0Ÿ (Æ( ˆŸÆ(©)0Ÿ©)®) ˆŸ®)0*0Ÿ0*<* ˆŸB'ù'0Ÿ( (0Ÿ (Æ( X ŸÆ(©)0Ÿ©)®) X Ÿ®)0*0Ÿ0*<* X ŸB'ù'0Ÿ( (0Ÿ (§( 7CŸ§(¾(TÆ(©)0Ÿ©)®) 3CŸ®)0*0Ÿ0*<* &CŸ:(R(PR(e(~Ÿ)!)P!)U)^Ç)<*^:(e(Vä(U)V®)<*V÷)0*1Ÿ÷)0*2Ÿ÷)0*  Ÿ÷)<*2Ÿ÷)0* » ŸÙ'é'bÙ'é'cÙ'ù'\(-(\Ù'ù'0Ÿ(-(0Ÿe({(se( (2Ÿe( (1Ÿe( (  Ÿe(§(2Ÿe( ( » ŸP*s*Us**S*•*óUŸ•*G+SG+¬,óUŸ¬,û,Sû,î-óUŸî-!.S!.@.óUŸ@.B.SB.L.óUŸL.….S…./óUŸ/4/S4/F/óUŸP*s*as*Ÿ*óõ)ŸŸ*Ã*aÃ*ñ*wñ*¬,óõ)Ÿ¬,è,wè,î-óõ)Ÿî- .a ..w./óõ)Ÿ/ /a /4/w4/F/óõ)ŸP*s*bs*Ÿ*óõ)ŸŸ*Ã*bÃ*à,‘¸à,û,óõ)Ÿû,î-‘¸î- .b ./‘¸/ /b /F/‘¸P*s*Ts*Ÿ*óTŸŸ*®*T®*F/óTŸÙ+Þ+S’,¬,SP*s*0ŸŸ*Ò*0Ÿî-.0Ÿ/4/0ŸP*„*0Ÿ•*W+0ŸÞ+J,0Ÿ’,û,0ŸÑ-î-\î-..0Ÿ@.µ.0ŸÍ.4/0Ÿ4/F/\P*„*0Ÿ•*ü*0Ÿü*+P+W+^Þ+ö+^ö+û,0Ÿ-.0Ÿ...P..@.0Ÿ@.¢.^¢./0Ÿ//^/F/0ŸP*„*0Ÿ•*+0Ÿ+(+P(+W+_Þ+ö+_ö+û,0Ÿ-@.0Ÿ@.L.PL.¢._¢./0Ÿ//_/F/0ŸP*„*0Ÿ•*!+0Ÿ2+M+VM+W+]Þ+å+Vå+_,]_,û,0Ÿ-¯-]¯-L.0Ÿf./]/F/0ŸP*„*0Ÿ•*M+0ŸM+W+QÞ+û,0Ÿ-P.0ŸP.q.Qz.~.Q~.“.w“./0Ÿ//Q//w/F/0Ÿ!+M+0ŸÞ+å+0ŸL.z.0Ÿz.¢.1Ÿ//0ŸP*„*0Ÿ•*G+0ŸG+M+PM+W+SÞ+å+På+T,ST,û,0Ÿ-Ÿ-0ŸŸ-¯-S¯-….0Ÿ….˜.P˜./S/F/0Ÿ½-Ç-PÇ-æ-S4/;/Sx*„* õ)õ),ÿŸ•*Ÿ* õ)õ),ÿŸP*„*0Ÿ•*M+0ŸM+Ë+ŸÞ+û,0Ÿû,-Ÿ-Ñ-0ŸÑ-î-Ÿî-4/0Ÿ4/F/ŸP*„*0Ÿ•*M+0ŸÞ+û,0Ÿ-Ñ-0Ÿî-4/0Ÿ®*Ã*Tî- .T . . `ª#/ /T®*Ò*Sî-.S/4/S®*Ã*Pî-ò-Pò- .s/ /s].¢.]//]ö+J,0Ÿ¢.µ.0ŸÍ./0Ÿö+J,S¢.µ.SÍ./Sö+J,]¢.µ.]Í./]:,=,P=,J,\ã./\,:,\¢.µ.\Í.ã.\i,‡,sÿŸ¯-½-sÿŸP/Ÿ/UŸ/E0\E0J0óUŸJ0 1\ 1:1U:1Þ1\Þ1÷1U÷1q2\P/­/T­/´/S´/j0óTŸj0×0S×0 1óTŸ 1…1S…1Þ1óTŸÞ1l2Sl2q2óTŸP/­/Q­/j0óQŸj0•0]•0 1óQŸ 1>1Q>1…1]…1Þ1óQŸÞ1÷1Q÷1l2]l2q2óQŸÇ/×/c…1‘1c‘1ª1wù/ 0bª1¿1b¿1Þ1‘¨r/)00ŸJ0Ð00ŸÐ0ö0Ÿö0Ù10ŸÙ1Þ1ŸÞ1`20Ÿ`2l2Ÿr/)00ŸJ0Ð00ŸÐ0ö0 X Ÿö0Ù10ŸÙ1Þ1 X ŸÞ1`20Ÿ`2l2 X Ÿr/)00ŸJ0Ð00ŸÐ0×0 5Ÿ×0î0Tö0Ù10ŸÙ1Þ1 1ŸÞ1`20Ÿ`2l2 $Ÿj0‚0P‚0•0~ŸE1Q1PQ1…1^÷1l2^j0•0V1…1VÞ1l2V'2`21Ÿ'2`22Ÿ'2`2  Ÿ'2l22Ÿ'2`2 » Ÿ 00b 00c 0)0\J0]0\ 0)00ŸJ0]00Ÿ•0«0s•0Ð02Ÿ•0Ð01Ÿ•0Ð0  Ÿ•0×02Ÿ•0Ð0 » Ÿ€2£2U£2±2S±2Å2óUŸÅ2w3Sw3Ü4óUŸÜ4+5S+56óUŸ6Q6SQ6p6óUŸp6r6Sr6|6óUŸ|6µ6Sµ657óUŸ57d7Sd7v7óUŸ€2£2a£2Ï2óõ)ŸÏ2ó2aó2!3w!3Ü4óõ)ŸÜ45w56óõ)Ÿ6;6a;6O6wO6L7óõ)ŸL7P7aP7d7wd7v7óõ)Ÿ€2£2b£2Ï2óõ)ŸÏ2ó2bó25‘¸5+5óõ)Ÿ+56‘¸6;6b;6L7‘¸L7P7bP7v7‘¸€2£2T£2Ï2óTŸÏ2Þ2TÞ2v7óTŸ 44SÂ4Ü4S€2£20ŸÏ230Ÿ6O60ŸL7d70Ÿ€2´20ŸÅ2‡30Ÿ4z40ŸÂ4+50Ÿ66\6^60Ÿp6å60Ÿý6d70Ÿd7v7\€2´20ŸÅ2,30Ÿ,3?3P?3‡3^4&4^&4+50Ÿ¿5O60ŸO6^6P^6p60Ÿp6Ò6^Ò6570Ÿ57L7^L7v70Ÿ€2´20ŸÅ2F30ŸF3X3PX3‡3_4&4_&4+50Ÿ¿5p60Ÿp6|6P|6Ò6_Ò6570Ÿ57L7_L7v70Ÿ€2´20ŸÅ2Q30Ÿb3}3V}3‡3]44V44]4+50Ÿ¿5ß5]ß5|60Ÿ–6L7]L7v70Ÿ€2´20ŸÅ2}30Ÿ}3‡3Q4+50Ÿ¿5€60Ÿ€6¡6Qª6®6Q®6Ã6wÃ6570Ÿ57B7QB7L7wL7v70ŸQ3}30Ÿ440Ÿ|6ª60Ÿª6Ò61Ÿ57L70Ÿ€2´20ŸÅ2w30Ÿw3}3P}3‡3S44P4„4S„4+50Ÿ¿5Ï50ŸÏ5ß5Sß5µ60Ÿµ6È6PÈ657S57v70Ÿí5÷5P÷56Sd7k7S¨2´2 õ)õ),ÿŸÅ2Ï2 õ)õ),ÿŸ€2´20ŸÅ2}30Ÿ}3û3’Ÿ4+50Ÿ+5¿5’Ÿ¿560Ÿ66’Ÿ6d70Ÿd7v7’Ÿ€2´20ŸÅ2}30Ÿ4+50Ÿ¿560Ÿ6d70ŸÞ2ó2T6:6T:6;6 Xª#L7P7TÞ23S6O6SL7d7SÞ2ó2P6"6P"6;6sL7P7s6Ò6]57L7]&4z40ŸÒ6å60Ÿý6570Ÿ&4z4SÒ6å6Sý657S&4z4]Ò6å6]ý657]j4m4Pm4z4\757\14j4\Ò6å6\ý67\™4·4sÿŸß5í5sÿŸ€7Ï7UÏ7u8\u8z8óUŸz8:9\:9j9Uj9:\:':U':¡:\€7Ý7TÝ7ä7Sä7š8óTŸš89S9:9óTŸ:9µ9Sµ9:óTŸ:œ:Sœ:¡:óTŸ€7Ý7QÝ7š8óQŸš8Å8]Å8:9óQŸ:9n9Qn9µ9]µ9:óQŸ:':Q':œ:]œ:¡:óQŸ÷78cµ9Á9cÁ9Ú9w)898bÚ9ï9bï9:‘¨¢7Y80Ÿz890Ÿ9&9’Ÿ&9 :0Ÿ ::’Ÿ::0Ÿ:œ:’Ÿ¢7Y80Ÿz890Ÿ9&9 X Ÿ&9 :0Ÿ :: X Ÿ::0Ÿ:œ: X Ÿ¢7Y80Ÿz890Ÿ99 Ÿ99T&9 :0Ÿ :: ýŸ::0Ÿ:œ: ðŸš8²8P²8Å8~Ÿu99P9µ9^':œ:^š8Å8VD9µ9V:œ:VW::1ŸW::2ŸW::  ŸW:œ:2ŸW:: » Ÿ98I8b98I8c98Y8\z88\98Y80Ÿz880ŸÅ8Û8sÅ892ŸÅ891ŸÅ89  ŸÅ892ŸÅ89 » Ÿ°:Ó:UÓ:ä:Sä:ø:óUŸø:·;S·;=óUŸ=k=Sk=^>óUŸ^>‘>S‘>°>óUŸ°>²>S²>¼>óUŸ¼>õ>Sõ>u?óUŸu?¤?S¤?¶?óUŸ°:Ó:aÓ: ;óõ)Ÿ ;3;a3;a;wa;=óõ)Ÿ=X=wX=^>óõ)Ÿ^>{>a{>>w>Œ?óõ)ŸŒ??a?¤?w¤?¶?óõ)Ÿ°:Ó:bÓ: ;óõ)Ÿ ;3;b3;P=‘¸P=k=óõ)Ÿk=^>‘¸^>{>b{>Œ?‘¸Œ??b?¶?‘¸°:Ó:TÓ: ;óTŸ ;;T;¶?óTŸI<N<S==S°:Ó:0Ÿ ;B;0Ÿ^>>0ŸŒ?¤?0Ÿ°:ç:0Ÿø:Ç;0ŸN<º<0Ÿ=k=0ŸA>^>\^>ž>0Ÿ°>%?0Ÿ=?¤?0Ÿ¤?¶?\°:ç:0Ÿø:l;0Ÿl;;P;Ç;^N<f<^f<k=0Ÿÿ=>0Ÿ>ž>Pž>°>0Ÿ°>?^?u?0Ÿu?Œ?^Œ?¶?0Ÿ°:ç:0Ÿø:†;0Ÿ†;˜;P˜;Ç;_N<f<_f<k=0Ÿÿ=°>0Ÿ°>¼>P¼>?_?u?0Ÿu?Œ?_Œ?¶?0Ÿ°:ç:0Ÿø:‘;0Ÿ¢;½;V½;Ç;]N<U<VU<Ï<]Ï<k=0Ÿÿ=>]>¼>0ŸÖ>Œ?]Œ?¶?0Ÿ°:ç:0Ÿø:½;0Ÿ½;Ç;QN<k=0Ÿÿ=À>0ŸÀ>á>Qê>î>Qî>?w?u?0Ÿu?‚?Q‚?Œ?wŒ?¶?0Ÿ‘;½;0ŸN<U<0Ÿ¼>ê>0Ÿê>?1Ÿu?Œ?0Ÿ°:ç:0Ÿø:·;0Ÿ·;½;P½;Ç;SN<U<PU<Ä<SÄ<k=0Ÿÿ=>0Ÿ>>S>õ>0Ÿõ>?P?u?Su?¶?0Ÿ->7>P7>V>S¤?«?SÛ:ç: õ)õ),ÿŸø: ; õ)õ),ÿŸ°:ç:0Ÿø:½;0Ÿ½;;< ŸN<k=0Ÿk=ÿ= Ÿÿ=A>0ŸA>^> Ÿ^>¤?0Ÿ¤?¶? Ÿ°:ç:0Ÿø:½;0ŸN<k=0Ÿÿ=A>0Ÿ^>¤?0Ÿ;3;T^>z>Tz>{> Xª#Œ??T;B;S^>>SŒ?¤?S;3;P^>b>Pb>{>sŒ??sÍ>?]u?Œ?]f<º<0Ÿ?%?0Ÿ=?u?0Ÿf<º<S?%?S=?u?Sf<º<]?%?]=?u?]ª<­<P­<º<\S?u?\q<ª<\?%?\=?S?\Ù<÷<sÿŸ>->sÿŸÀ?@U@µ@\µ@º@óUŸº@zA\zAªAUªANB\NBgBUgBáB\À?@T@$@S$@Ú@óTŸÚ@GASGAzAóTŸzAõASõANBóTŸNBÜBSÜBáBóTŸÀ?@Q@Ú@óQŸÚ@A]AzAóQŸzA®AQ®AõA]õANBóQŸNBgBQgBÜB]ÜBáBóQŸ7@G@cõABcBBwi@y@bB/Bb/BNB‘¨â?™@0Ÿº@@A0Ÿ@AfA ŸfAIB0ŸIBNB ŸNBÐB0ŸÐBÜB Ÿâ?™@0Ÿº@@A0Ÿ@AfA X ŸfAIB0ŸIBNB X ŸNBÐB0ŸÐBÜB X Ÿâ?™@0Ÿº@@A0Ÿ@AGA ]Sò] ^S [Ã[0Ÿú[2\0ŸN__0Ÿ|`”`0Ÿ [×[0Ÿè[·\0Ÿ>]ª]0Ÿò][^0Ÿ1_N_\N_Ž_0Ÿ _`0Ÿ-`”`0Ÿ”`¦`\ [×[0Ÿè[\\0Ÿ\\o\Po\·\^>]V]^V][^0Ÿï^_0Ÿ_Ž_PŽ_ _0Ÿ _`^`e`0Ÿe`|`^|`¦`0Ÿ [×[0Ÿè[v\0Ÿv\ˆ\Pˆ\·\_>]V]_V][^0Ÿï^ _0Ÿ _¬_P¬_`_`e`0Ÿe`|`_|`¦`0Ÿ [×[0Ÿè[\0Ÿ’\­\V­\·\]>]E]VE]¿]]¿][^0Ÿï^_]_¬_0ŸÆ_|`]|`¦`0Ÿ [×[0Ÿè[­\0Ÿ­\·\Q>][^0Ÿï^°_0Ÿ°_Ñ_QÚ_Þ_QÞ_ó_wó_e`0Ÿe`r`Qr`|`w|`¦`0Ÿ\­\0Ÿ>]E]0Ÿ¬_Ú_0ŸÚ_`1Ÿe`|`0Ÿ [×[0Ÿè[§\0Ÿ§\­\P­\·\S>]E]PE]´]S´][^0Ÿï^ÿ^0Ÿÿ^_S_å_0Ÿå_ø_Pø_e`Se`¦`0Ÿ_'_P'_F_S”`›`SË[×[ õ)õ),ÿŸè[ú[ õ)õ),ÿŸ [×[0Ÿè[­\0Ÿ­\+] ªŸ>][^0Ÿ[^ï^ ªŸï^1_0Ÿ1_N_ ªŸN_”`0Ÿ”`¦` ªŸ [×[0Ÿè[­\0Ÿ>][^0Ÿï^1_0ŸN_”`0Ÿ\#\TN_j_Tj_k_ Pª#|`€`T\2\SN__S|`”`S\#\PN_R_PR_k_s|`€`s½_`]e`|`]V]ª]0Ÿ``0Ÿ-`e`0ŸV]ª]S``S-`e`SV]ª]]``]-`e`]š]]P]ª]\C`e`\a]š]\``\-`C`\É]ç]sÿŸ__sÿŸ°`ÿ`Uÿ`¥a\¥aªaóUŸªajb\jbšbUšb>c\>cWcUWcÑc\°` aT aaSaÊaóTŸÊa7bS7bjbóTŸjbåbSåb>cóTŸ>cÌcSÌcÑcóTŸ°` aQ aÊaóQŸÊaõa]õajbóQŸjbžbQžbåb]åb>cóQŸ>cWcQWcÌc]ÌcÑcóQŸ'a7acåbñbcñb cwYaiab ccbc>c‘¨Ò`‰a0Ÿªa0b0Ÿ0bVb ªŸVb9c0Ÿ9c>c ªŸ>cÀc0ŸÀcÌc ªŸÒ`‰a0Ÿªa0b0Ÿ0bVb X ŸVb9c0Ÿ9c>c X Ÿ>cÀc0ŸÀcÌc X ŸÒ`‰a0Ÿªa0b0Ÿ0b7b D2Ÿ7bNbTVb9c0Ÿ9c>c @2Ÿ>cÀc0ŸÀcÌc 32ŸÊaâaPâaõa~Ÿ¥b±bP±båb^WcÌc^ÊaõaVtbåbV>cÌcV‡cÀc1Ÿ‡cÀc2Ÿ‡cÀc + Ÿ‡cÌc2Ÿ‡cÀc » Ÿiayabiayacia‰a\ªa½a\ia‰a0Ÿªa½a0Ÿõa bsõa0b2Ÿõa0b1Ÿõa0b + Ÿõa7b2Ÿõa0b » ŸàcdUddSd(dóUŸ(dçdSçdLfóUŸLf›fS›fŽgóUŸŽgÁgSÁgàgóUŸàgâgSâgìgóUŸìg%hS%h¥hóUŸ¥hÔhSÔhæhóUŸàcdad:dóõ)Ÿ:dcdacd‘dw‘dLfóõ)ŸLfˆfwˆfŽgóõ)ŸŽg«ga«g¿gw¿g¼hóõ)Ÿ¼hÀhaÀhÔhwÔhæhóõ)Ÿàcdbd:dóõ)Ÿ:dcdbcd€f‘¸€f›fóõ)Ÿ›fŽg‘¸Žg«gb«g¼h‘¸¼hÀhbÀhæh‘¸àcdTd:dóTŸ:dNdTNdæhóTŸye~eS2fLfSàcd0Ÿ:drd0ŸŽg¿g0Ÿ¼hÔh0Ÿàcd0Ÿ(d÷d0Ÿ~eêe0Ÿ2f›f0ŸqgŽg\ŽgÎg0ŸàgUh0ŸmhÔh0ŸÔhæh\àcd0Ÿ(dœd0Ÿœd¯dP¯d÷d^~e–e^–e›f0Ÿ/g¿g0Ÿ¿gÎgPÎgàg0ŸàgBh^Bh¥h0Ÿ¥h¼h^¼hæh0Ÿàcd0Ÿ(d¶d0Ÿ¶dÈdPÈd÷d_~e–e_–e›f0Ÿ/gàg0ŸàgìgPìgBh_Bh¥h0Ÿ¥h¼h_¼hæh0Ÿàcd0Ÿ(dÁd0ŸÒdídVíd÷d]~e…eV…eÿe]ÿe›f0Ÿ/gOg]Ogìg0Ÿh¼h]¼hæh0Ÿàcd0Ÿ(díd0Ÿíd÷dQ~e›f0Ÿ/gðg0ŸðghQhhQh3hw3h¥h0Ÿ¥h²hQ²h¼hw¼hæh0ŸÁdíd0Ÿ~e…e0Ÿìgh0ŸhBh1Ÿ¥h¼h0Ÿàcd0Ÿ(dçd0ŸçdídPíd÷dS~e…eP…eôeSôe›f0Ÿ/g?g0Ÿ?gOgSOg%h0Ÿ%h8hP8h¥hS¥hæh0Ÿ]gggPgg†gSÔhÛhS dd õ)õ),ÿŸ(d:d õ)õ),ÿŸàcd0Ÿ(díd0Ÿídke AŸ~e›f0Ÿ›f/g AŸ/gqg0ŸqgŽg AŸŽgÔh0ŸÔhæh AŸàcd0Ÿ(díd0Ÿ~e›f0Ÿ/gqg0ŸŽgÔh0ŸNdcdTŽgªgTªg«g Pª#¼hÀhTNdrdSŽg¿gS¼hÔhSNdcdPŽg’gP’g«gs¼hÀhsýgBh]¥h¼h]–eêe0ŸBhUh0Ÿmh¥h0Ÿ–eêeSBhUhSmh¥hS–eêe]BhUh]mh¥h]ÚeÝePÝeêe\ƒh¥h\¡eÚe\BhUh\mhƒh\ f'fsÿŸOg]gsÿŸðh?iU?iåi\åiêióUŸêiªj\ªjÚjUÚj~k\~k—kU—kl\ðhMiTMiTiSTi jóTŸ jwjSwjªjóTŸªj%kS%k~kóTŸ~k lS llóTŸðhMiQMi jóQŸ j5j]5jªjóQŸªjÞjQÞj%k]%k~kóQŸ~k—kQ—k l] llóQŸgiwic%k1kc1kJkw™i©ibJk_kb_k~k‘¨iÉi0Ÿêipj0Ÿpj–j AŸ–jyk0Ÿyk~k AŸ~kl0Ÿl l AŸiÉi0Ÿêipj0Ÿpj–j X Ÿ–jyk0Ÿyk~k X Ÿ~kl0Ÿl l X ŸiÉi0Ÿêipj0Ÿpjwj H)ŸwjŽjT–jyk0Ÿyk~k D)Ÿ~kl0Ÿl l 7)Ÿ j"jP"j5j~ŸåjñjPñj%k^—k l^ j5jV´j%kV~k lVÇkl1ŸÇkl2ŸÇkl + ŸÇk l2ŸÇkl » Ÿ©i¹ib©i¹ic©iÉi\êiýi\©iÉi0Ÿêiýi0Ÿ5jKjs5jpj2Ÿ5jpj1Ÿ5jpj + Ÿ5jwj2Ÿ5jpj » Ÿ lClUClTlSTlhlóUŸhl'mS'mŒnóUŸŒnÛnSÛnÎoóUŸÎopSp póUŸ p"pS"p,póUŸ,pepSepåpóUŸåpqSq&qóUŸ lClaClzlóõ)Ÿzl£la£lÑlwÑlŒnóõ)ŸŒnÈnwÈnÎoóõ)ŸÎoëoaëoÿowÿoüpóõ)Ÿüpqaqqwq&qóõ)Ÿ lClbClzlóõ)Ÿzl£lb£lÀn‘¸ÀnÛnóõ)ŸÛnÎo‘¸Îoëobëoüp‘¸üpqbq&q‘¸ lClTClzlóTŸzlŽlTŽl&qóTŸ¹m¾mSrnŒnS lCl0Ÿzl²l0ŸÎoÿo0Ÿüpq0Ÿ lWl0Ÿhl7m0Ÿ¾m*n0ŸrnÛn0Ÿ±oÎo\Îop0Ÿ p•p0Ÿ­pq0Ÿq&q\ lWl0ŸhlÜl0ŸÜlïlPïl7m^¾mÖm^ÖmÛn0Ÿooÿo0ŸÿopPp p0Ÿ p‚p^‚påp0Ÿåpüp^üp&q0Ÿ lWl0Ÿhlöl0ŸölmPm7m_¾mÖm_ÖmÛn0Ÿoo p0Ÿ p,pP,p‚p_‚påp0Ÿåpüp_üp&q0Ÿ lWl0Ÿhlm0Ÿm-mV-m7m]¾mÅmVÅm?n]?nÛn0Ÿooo]o,p0ŸFpüp]üp&q0Ÿ lWl0Ÿhl-m0Ÿ-m7mQ¾mÛn0Ÿoo0p0Ÿ0pQpQZp^pQ^pspwspåp0ŸåpòpQòpüpwüp&q0Ÿm-m0Ÿ¾mÅm0Ÿ,pZp0ŸZp‚p1Ÿåpüp0Ÿ lWl0Ÿhl'm0Ÿ'm-mP-m7mS¾mÅmPÅm4nS4nÛn0Ÿooo0ŸooSoep0ŸepxpPxpåpSåp&q0Ÿo§oP§oÆoSqqSKlWl õ)õ),ÿŸhlzl õ)õ),ÿŸ lWl0Ÿhl-m0Ÿ-m«m =Ÿ¾mÛn0ŸÛnoo =Ÿoo±o0Ÿ±oÎo =ŸÎoq0Ÿq&q =Ÿ lWl0Ÿhl-m0Ÿ¾mÛn0Ÿoo±o0ŸÎoq0ŸŽl£lTÎoêoTêoëo `ª#üpqTŽl²lSÎoÿoSüpqSŽl£lPÎoÒoPÒoëosüpqs=p‚p]åpüp]Öm*n0Ÿ‚p•p0Ÿ­påp0ŸÖm*nS‚p•pS­påpSÖm*n]‚p•p]­påp]nnPn*n\Ãpåp\ámn\‚p•p\­pÃp\IngnsÿŸoosÿŸ0qqUq%r\%r*róUŸ*rêr\êrsUs¾s\¾s×sU×sQt\0qqTq”qS”qJróTŸJr·rS·rêróTŸêresSes¾sóTŸ¾sLtSLtQtóTŸ0qqQqJróQŸJrur]urêróQŸêrsQses]es¾sóQŸ¾s×sQ×sLt]LtQtóQŸ§q·qcesqscqsŠswÙqéqbŠsŸsbŸs¾s‘¨Rq r0Ÿ*r°r0Ÿ°rÖr =ŸÖr¹s0Ÿ¹s¾s =Ÿ¾s@t0Ÿ@tLt =ŸRq r0Ÿ*r°r0Ÿ°rÖr X ŸÖr¹s0Ÿ¹s¾s X Ÿ¾s@t0Ÿ@tLt X ŸRq r0Ÿ*r°r0Ÿ°r·r °'Ÿ·rÎrTÖr¹s0Ÿ¹s¾s ¬'Ÿ¾s@t0Ÿ@tLt Ÿ'ŸJrbrPbrur~Ÿ%s1sP1ses^×sLt^JrurVôresV¾sLtVt@t1Ÿt@t2Ÿt@t  ŸtLt2Ÿt@t » Ÿéqùqbéqùqcéq r\*r=r\éq r0Ÿ*r=r0Ÿur‹rsur°r2Ÿur°r1Ÿur°r  Ÿur·r2Ÿur°r » Ÿ`tƒtUƒt”tS”t¨tóUŸ¨tguSguÌvóUŸÌvwSwxóUŸxAxSAx`xóUŸ`xbxSbxlxóUŸlx¥xS¥x%yóUŸ%yTySTyfyóUŸ`tƒtaƒtºtóõ)ŸºtãtaãtuwuÌvóõ)ŸÌvwwwxóõ)Ÿx+xa+x?xw?x‡T>‡MŒóTŸ³†¸† õ)sö)Ÿ¸†dža³†½† õ)s ö)Ÿ½†̆b³†† õ)s(ö)ŸÂ†цc³†¸†4õ)sö)sÀö)õ)s ö)sÈö)"õ)s(ö)sÐö)"Ÿ¸†½†.õ)sÀö)õ)s ö)sÈö)"õ)s(ö)sÐö)"Ÿ½††(õ)sÀö)õ)sÈö)"õ)s(ö)sÐö)"Ÿ†þ†0Ÿ ‡½ˆ0Ÿ½ˆȈPȈg‰0Ÿ‹‰MŒ0Ÿ†³†0Ÿ*‡p‡0Ÿ-ˆ›ˆV˜‰?ŠVæŠ%‹0Ÿ!Œ@Œ0Ÿ†?‰0Ÿg‰™Š0ŸÙЏ‹0ŸÕ‹ Œ0Ÿ ŒMŒ0Ÿ†›‡0Ÿ›‡·‡P·‡ ˆ‘¨-ˆDˆR눋‰0Ÿ‹‰˜‰P˜‰¸‰0Ÿ?Š%‹0Ÿ%‹-‹‘¨;‹C‹‘¨N‹}‹‘¨«‹ Œ0Ÿ Œ!Œ‘¨!Œ@Œ0Ÿ†¾‡0Ÿ¾‡ׇPׇDˆ^Ȉëˆ^눸‰0Ÿ?Š%‹0Ÿ%‹;‹P;‹«‹^«‹ Œ0Ÿ Œ!Œ^!Œ@Œ0Ÿ@ŒMŒ^†Þ‡0ŸÞ‡õ‡Põ‡Dˆ]Ȉëˆ]눸‰0Ÿ?Š;‹0Ÿ;‹N‹PN‹«‹]«‹ Œ0Ÿ Œ!Œ]!Œ@Œ0Ÿ@ŒMŒ]†î‡0Ÿ ˆ-ˆV-ˆ›ˆ\ȈÔˆVÔˆg‰\g‰˜‰0Ÿ˜‰?Š\?Š™Š0Ÿ™ŠÙŠ\ÙŠN‹0Ÿh‹!Œ\!Œ@Œ0Ÿ@ŒMŒ\†ÿ‡0Ÿ ˆ-ˆ0Ÿ-ˆDˆ_Ȉ¸‰0Ÿ?ŠR‹0ŸR‹—‹_—‹ Œ0Ÿ Œ!Œ_!Œ@Œ0Ÿ@ŒMŒ_î‡-ˆ0ŸÈˆÔˆ0ŸN‹}‹0Ÿ}‹«‹1Ÿ Œ!Œ0Ÿ@ŒMŒ1Ÿ†ˆ0Ÿˆ-ˆP-ˆDˆ0ŸÈˆÔˆPÔˆR‰SR‰˜‰0Ÿ˜‰¸‰S?ŠºŠ0ŸºŠÙŠSÙŠˆ‹0Ÿˆ‹¦‹P¦‹ ŒS Œ@Œ0Ÿ@ŒMŒP†-ˆ0Ÿ-ˆ›ˆüŸÈˆ˜‰0Ÿ˜‰?ŠüŸ?ŠMŒ0Ÿ†-ˆ0Ÿ-ˆ›ˆ X ŸÈˆ˜‰0Ÿ˜‰?Š X Ÿ?ŠMŒ0Ÿ†-ˆ0Ÿ-ˆ›ˆ‘¨Ȉ˜‰0Ÿ˜‰?Š‘¨?ŠMŒ0Ÿ>‡Z‡TæŠ ‹T ‹ ‹ ð©#!Œ%ŒT>‡p‡SæŠ%‹S!Œ@ŒS>‡Z‡PæŠêŠPêŠ ‹s!Œ%Œs_‹«‹\ Œ!Œ\@ŒMŒ\ëˆ?‰0Ÿ«‹¸‹0ŸÕ‹ Œ0Ÿëˆ?‰S«‹¸‹SÕ‹ ŒSëˆ?‰\«‹¸‹\Õ‹ Œ\.‰?‰Pë‹ï‹P÷ˆ?‰^«‹¸‹^Õ‹ Œ^PŒ¬ŒU¬Œ…\…ŠóUŸŠ \ ¬U¬*Ž\*ŽqŽUqŽh\PŒ¿ŒT¿ŒÆŒSÆŒ óTŸ ïSï*ŽóTŸ*ŽSxóTŸx½S½äóTŸäcSchóTŸPŒ¿ŒQ¿Œ óQŸ ¬Q¬*ŽóQŸ*ŽuŽQuŽ]xóQŸx½]½äóQŸäc]chóQŸÛŒi‘˜Ž*Ž‘˜dx‘˜½ä‘˜ b*b*D‘ =McDXcXx‘¨rŒi0ŸŠè0ŸèŽüŸŽs0ŸsxüŸx±0Ÿ±½üŸ½M0ŸMZüŸZc0ŸrŒi0ŸŠè0ŸèŽ X ŸŽs0Ÿsx X Ÿx±0Ÿ±½ X Ÿ½M0ŸMZ X ŸZc0ŸrŒi0ŸŠè0Ÿèï h!ŸïŽTŽs0Ÿsx d!Ÿx±0Ÿ±½ U!Ÿ½M0ŸMZ P!ŸZc0Ÿ}ŽœŽPœŽ«Ž~Ÿ«Ž^x½^äZ^Zc~Ÿ ¬V4ŽVx½VäcVx±2Ÿx±3Ÿx±1Ÿx± 6 Ÿx½3Ÿx± » ŸM1ŸM3ŸM 6 ŸZ3ŸM » ŸM_cM_bMi‘˜½ä‘˜Mi\½ä\Mi0Ÿ½ä0ŸM`0Ÿ`iP½ÜPMi0Ÿ½äüŸMi0Ÿ½ä X ŸMi0Ÿ½ä ~!Ÿ¬Ãs¬è3Ÿ¬è1Ÿ¬è 6 Ÿ¬ï3Ÿ¬è » Ÿp“U“´S´ÃóUŸÃ¯‘S¯‘G“óUŸG“©“S©“¯”óUŸ¯”ð”Sð”õ”óUŸõ”÷”S÷”•óUŸ••S•3•óUŸ3•5•S5•?•óUŸ?•~•S~•<–óUŸ<–y–Sy––óUŸp“a“Ãóõ)ŸÃòaò.‘‘¨.‘G“óõ)ŸG““‘¨“¯”óõ)Ÿ¯”Ó”aÓ”õ”‘¨õ”Z–óõ)ŸZ–^–a^–y–‘¨y––óõ)Ÿp“b“Ãóõ)ŸÃòbò(‘‘°(‘G“óõ)ŸG“‰“‘°‰“¯”óõ)Ÿ¯”Ó”bÓ”õ”‘°õ”Z–óõ)ŸZ–^–b^–y–‘°y––óõ)Ÿp“c“Ãóõ)ŸÃòcò€“‘¸€“©“óõ)Ÿ©“¯”‘¸¯”Ó”cÓ”Z–‘¸Z–^–c^––‘¸p“T“ÃóTŸÃÖTÖ–óTŸY’]’ ž]’b’a!“;“a;“G“‘¨p“0ŸÃ‘0Ÿ¯”î”0ŸZ–y–0Ÿp´0ŸÃÄ‘0Ÿb’Ø’0Ÿ!“©“0Ÿ¯”•0Ÿ3•¹•0ŸÏ•å•0Ÿÿ•–]–y–0Ÿy––]p´0ŸÃ9‘0Ÿ9‘M‘PM‘Ä‘^b’ƒ’^ƒ’©“0Ÿ”õ”0Ÿõ”•P••^•3•0Ÿ3•¦•^¦•<–0Ÿ<–Z–^Z––0Ÿp´0ŸÃT‘0ŸT‘m‘Pm‘Ÿ‘‘¨º‘Ä‘Qƒ’©“0Ÿ”•0Ÿ••P•3•0Ÿ3•s•‘¨¦•<–0Ÿ<–Z–‘¨Z––0Ÿp´0ŸÃt‘0Ÿt‘‹‘P‹‘Ä‘_b’ƒ’_ƒ’©“0Ÿ”3•0Ÿ3•?•P?•¦•_¦•<–0Ÿ<–Z–_Z––0Ÿp´0ŸÃ„‘0ŸŸ‘º‘Vº‘Ä‘\b’n’Vn’í’\í’©“0Ÿ”‹”0Ÿ‹”¯”\¯”?•0ŸY•å•\å•–0Ÿ–Z–\Z––0Ÿp´0ŸÃ•‘0ŸŸ‘º‘0Ÿº‘Ä‘Rb’©“0Ÿ”C•0ŸC•d•Rs•w•Rw•’•‘°’•<–0Ÿ<–J–RJ–Z–‘°Z––0Ÿ„‘º‘0Ÿb’n’0Ÿ?•s•0Ÿs•¦•1Ÿ<–Z–0Ÿp´0ŸÃ¯‘0Ÿ¯‘º‘Pº‘Ä‘Sb’n’Pn’â’Sâ’©“0Ÿ” ”0Ÿ ”¯”S¯”~•0Ÿ~•¡•P¡•å•Så•–0Ÿ–<–S<––0Ÿ““aå•ï•aï•–‘¨y––‘¨p´0ŸÃº‘0Ÿº‘>’cŸb’©“0Ÿ©“i”cŸ”ÿ•0Ÿÿ•–cŸ–y–0Ÿy––cŸp´0ŸÃº‘0Ÿb’©“0Ÿ”ÿ•0Ÿ–y–0ŸÖòT¯”Ò”TÒ”Ó” Ъ#Z–^–TÖ‘S¯”î”SZ–y–SÖòP¯”³”P³”Ó”sZ–^–sP•¦•\<–Z–\ƒ’Ø’0Ÿ¦•¹•0ŸÏ•å•0Ÿ–<–0Ÿƒ’Ø’S¦•¹•SÏ•å•S–<–Sƒ’Ø’\¦•¹•\Ï•å•\–<–\È’Ë’PË’Ø’]–<–]’È’]¦•¹•]Ï•å•]–ì–Uì–Ê—\Ê—Ï—óUŸÏ—à—\à—ì—Uì—j˜\j˜±˜U±˜¨š\–ÿ–Tÿ–—S—à—óTŸà—/˜S/˜j˜óTŸj˜@™S@™¸™óTŸ¸™ý™Sý™$šóTŸ$š£šS£š¨šóTŸ–ÿ–Qÿ–à—óQŸà—ì—Qì—j˜óQŸj˜µ˜Qµ˜@™]@™¸™óQŸ¸™ý™]ý™$šóQŸ$š£š]£š¨šóQŸ—®—‘˜N˜j˜‘˜@™D™dD™¸™‘˜ý™$š‘˜I—Y—bX™j™bj™„™‘ }——c„™˜™c˜™¸™‘¨²–®—0ŸÏ—(˜0Ÿ(˜N˜cŸN˜³™0Ÿ³™¸™cŸ¸™ñ™0Ÿñ™ý™cŸý™š0ŸšššcŸšš£š0Ÿ²–®—0ŸÏ—(˜0Ÿ(˜N˜ X ŸN˜³™0Ÿ³™¸™ X Ÿ¸™ñ™0Ÿñ™ý™ X Ÿý™š0Ÿššš X Ÿšš£š0Ÿ²–®—0ŸÏ—(˜0Ÿ(˜/˜ óŸ/˜F˜TN˜³™0Ÿ³™¸™ ™ñ™0Ÿñ™ý™ àŸý™š0Ÿššš ÛŸšš£š0Ÿ½˜ܘPܘë˜~Ÿë˜@™^¸™ý™^$ššš^šš£š~Ÿà—ì—Vt˜@™V¸™ý™V$š£šV¸™ñ™2Ÿ¸™ñ™3Ÿ¸™ñ™1Ÿ¸™ñ™ C Ÿ¸™ý™3Ÿ¸™ñ™ » ŸTšš1ŸTšš3ŸTšš C ŸTššš3ŸTšš » Ÿ—Ÿ—c—Ÿ—b—®—‘˜ý™$š‘˜—®—\ý™$š\—®—0Ÿý™$š0Ÿ—¥—0Ÿ¥—®—Pý™šP—®—0Ÿý™$šcŸ—®—0Ÿý™$š X Ÿ—®—0Ÿý™$š Ÿì—˜sì—(˜3Ÿì—(˜1Ÿì—(˜ C Ÿì—/˜3Ÿì—(˜ » Ÿ°šçšUçš ›S ›o óUŸo r Sr z óUŸz Þ SÞ ø óUŸø ¡S¡¼¡óUŸ¼¡ò¡Sò¡¢óUŸ¢Q¢SQ¢w£óUŸw£ú£Sú£¥óUŸ¥;¥S;¥@¥óUŸ°šçšTçšõœ‘ õœYóTŸY[ž‘ [žÏŸóTŸÏŸz ‘ z Ž TŽ Þ ‘ Þ ì óTŸì :¡‘ :¡²¡óTŸ²¡|¢‘ |¢w£óTŸw£¤‘ ¤Q¤óTŸQ¤d¤‘ d¤¾¤óTŸ¾¤ã¤‘ ã¤¥óTŸ¥@¥‘ °šçšQçšz ‘¨z ‡ Q‡ @¥‘¨°šçšRçšz ‘°z ˜ R˜ w£‘°w£‰£R‰£'¥‘°'¥+¥R+¥@¥‘°°šçšXçšz óXŸz ˜ X˜ w£óXŸw£‰£X‰£'¥óXŸ'¥+¥X+¥@¥óXŸ°šºœ0ŸºœY\Y^ž0Ÿ^žµž]ÁžŸ]ŸÏŸ]ÏŸ:¡0Ÿ:¡¥¡\¥¡²¡]²¡¼¡\¼¡<£0Ÿ<£\£\\£¾¤0Ÿ¾¤¥\¥@¥0Ÿìœb ‘˜/Yb<£Q£bã¤ó¤b󤥑˜'+a°š›0Ÿ› ›] ›,›^,›©œS©œY^YµžSÁžŸSŸo So ì 0Ÿì ø Sø *¡0Ÿ*¡:¡S:¡¨¡^¨¡²¡S²¡¼¡^¼¡ò¡0Ÿò¡¢^¢<£0Ÿ<£\£^\£¾¤0Ÿ¾¤¥^¥@¥0ŸÁžÒž žÒžßžbŸ'Ÿb'Ÿ0Ÿ‘˜é¢£b££‘˜Q£\£b°šçš0Ÿôš ›P ›ºœ\ºœìœ0Ÿìœµž\0Ÿo \o œ 0Ÿì ø \ø ¡P¡™¡\™¡²¡P²¡¼¡0Ÿò¡¢\<£\£\w£’£0Ÿ¾¤ã¤0Ÿã¤¥\'¥4¥0Ÿ°š ›0Ÿ ›ºœVºœõœ0Ÿõœ'V'C0ŸCµžV0Ÿo Vo Þ 0Ÿì ø Vø *¡0Ÿ*¡²¡V²¡ò¡0Ÿò¡¢V¢­¢0Ÿé¢£0Ÿ<£\£0Ÿw£¤0ŸQ¤@¥0Ÿ°š(›0Ÿ(›;›S;›Zœ0Ÿ©œY0ŸYoSo‰0ŸžVž0Ÿ[žižY0ŸDŸYDŸTŸ‘ ÏŸ 0Ÿ  ¸ 0ŸÅ Þ \ì ¢0Ÿ¢¢Y¹¢£0Ÿ<£’£0Ÿ­£¸£YǣˣYË£ú£‘¸)¤Q¤0Ÿ¾¤¥0Ÿ¥¥Y¥'¥‘¸'¥4¥0Ÿ4¥@¥‘¸°š|›0Ÿ|›››T¥›©›T©›¿›‘˜¿›o0Ÿo~T~‰‘˜‰ž0Ÿž[ž0Ÿ[žižT0ŸDŸTDŸTŸ‘˜ÏŸì 0Ÿì ø ‘˜ø —£0Ÿ—£¸£TǣˣTˣ棑˜æ£¥0Ÿ¥¥T¥'¥‘˜'¥4¥0Ÿ4¥@¥‘˜››0Ÿ›,›],›¢œ}Ÿ¢œÆœ]ñœõœ0ŸõœYSY[ž}ŸÏŸo }Ÿ¸ Þ 0Ÿì ø }Ÿ*¡:¡}Ÿ:¡™¡Sò¡¢]¢¢0Ÿ<£T£S’£Ç£0ŸÇ£ú£1Ÿã¤¥S¥'¥0Ÿ4¥@¥1Ÿ°š^›0Ÿ‘›Λ^nœo0Ÿo‰^®Þ0Ÿùž0Ÿž@ž‘˜[žµž^0ŸÏŸ^àŸöŸ0Ÿo Õ 0ŸÕ Þ PÞ ø ^ø ¢0Ÿ¢¢P¢³¢^³¢#£0Ÿ#£<£^<£Ò£0ŸÒ£õ£Põ£)¤^)¤Q¤0ŸQ¤¾¤^¾¤4¥0Ÿ4¥@¥PÜœìœb ag¡€¡a€¡²¡‘˜Ò¢â¢b)¤3¤b3¤Q¤‘˜¾¤ȤbȤ㤑˜g›¥›0Ÿ¥›Λ1Ÿo‰0Ÿž@ž0Ÿì ø 1Ÿ°š°›0Ÿ°›ΛPΛdœ_dœÞ0ŸÞù_ù*ž0Ÿ*ž;žP;žµž_0ŸÏŸ_ÏŸöŸ0ŸöŸo _o ì 0Ÿì ø Pø @¥0Ÿ'+ õ)õ)+ÿŸ°š[ž0ŸÏŸo 0Ÿz  ¡0Ÿ ¡*¡0Ÿ*¡™¡0Ÿ²¡@¥0Ÿ°š[ž0ŸÏŸo 0Ÿz  ¡0Ÿ ¡*¡ X Ÿ*¡™¡0Ÿ²¡@¥0Ÿ°š[ž0ŸÏŸo 0Ÿz  ¡0Ÿ ¡*¡ 7Ÿ*¡™¡0Ÿ²¡@¥0ŸŽ ˜ Tw£ˆ£Tˆ£‰£ Ъ#'¥+¥TŽ œ Sw£’£S'¥4¥SŽ ˜ Pw£{£P{£‰£s'¥+¥s¥£¸£Y¥¥Y¥'¥‘¸F¢­¢0Ÿú£¤0ŸQ¤¾¤0ŸF¢­¢^ú£¤^Q¤¾¤^F¢|¢Yú£ ¤Y ¤¤‘˜Q¤m¤Ym¤…¤‘˜˜¢ ¢P ¢­¢V…¤¾¤VQ¢­¢Sú£¤SQ¤¾¤S,›‰›^Yo^ž-ž^ÏŸÓŸ^àŸöŸ^*¡:¡^F›V›TV›Z› Ъ#àŸñŸTñŸöŸ Ъ#*¡1¡TF›^›SàŸöŸS*¡:¡SF›Z›QàŸöŸQ*¡1¡Q‰›Λ^o‰^ì ø ^ü›Zœ0Ÿ@žVž0ŸöŸ 0Ÿ  o 0Ÿü›Zœ_@žVž_öŸ _  o _ü›Zœ^@žVž^öŸ ^  o ^JœMœPMœZœY@žVž‘˜M Y YY o ‘˜œ2œYöŸ  Y  5 Y5 M ‘˜nœ”œY®ÃYÃÄ‘˜nœ”œ\®Ä\nœ¯œ\®Þ\ùž\sœœPœ”œpŸ®ÃP@¥›¥U›¥Õ¥]եإóUŸØ¥ì¥Uì¥N¦]N¦Œ¦UŒ¦ ¨]@¥“¥T“¥Ð¥SХإóTŸØ¥ ¨S@¥—¥Q—¥Ø¥óQŸØ¥ì¥Qì¥N¦óQŸN¦¦Q¦§\§D§óQŸD§¨\¨ ¨óQŸb¥›¥0Ÿ›¥¨¥wØ¥§0ŸD§¨0Ÿb¥›¥0Ÿ›¥¨¥‘¸Ø¥§0ŸD§¨0Ÿb¥›¥0Ÿ›¥¨¥‘@Ø¥§0ŸD§¨0Ÿb¥·¥0ŸØ¥(¦0Ÿ(¦N¦.ŸN¦}§0Ÿ}§‰§.Ÿ‰§²§0Ÿ²§·§.Ÿ·§ð§0Ÿð§ý§.Ÿý§¨0Ÿb¥·¥0ŸØ¥(¦0Ÿ(¦N¦ X ŸN¦}§0Ÿ}§‰§ X Ÿ‰§²§0Ÿ²§·§ X Ÿ·§ð§0Ÿð§ý§ X Ÿý§¨0Ÿb¥·¥0ŸØ¥(¦0Ÿ(¦/¦ ûŸ/¦F¦TN¦}§0Ÿ}§‰§ 蟉§²§0Ÿ²§·§ 쟷§ð§0Ÿð§ý§ ãŸý§¨0Ÿ˜¦·¦P·¦Ŧ~ŸÅ¦§^D§ý§^ý§¨~ŸØ¥ì¥VT¦§VD§¨VD§}§2ŸD§}§3ŸD§}§1ŸD§}§ C ŸD§‰§3ŸD§}§ » Ÿ·§ð§1Ÿ·§ð§3Ÿ·§ð§ C Ÿ·§ý§3Ÿ·§ð§ » Ÿ›¥¨¥‘@›¥¨¥‘¸›¥¨¥w›¥·¥]§D§]›¥·¥0Ÿ§D§0Ÿ›¥®¥0Ÿ®¥·¥P§<§P›¥·¥0Ÿ§D§.Ÿ›¥·¥0Ÿ§D§ X Ÿ›¥·¥0Ÿ§D§  Ÿì¥¦sì¥(¦3Ÿì¥(¦1Ÿì¥(¦ C Ÿì¥/¦3Ÿì¥(¦ » Ÿ¨G¨UG¨€¨S€¨Ï­óUŸÏ­Ò­SÒ­Ú­óUŸÚ­>®S>®X®óUŸX®x®Sx®¯óUŸ¯R¯SR¯g¯óUŸg¯±¯S±¯×°óUŸ×°Z±SZ±c²óUŸc²›²S›² ²óUŸ¨G¨TG¨Uª‘ Uª¹ªóTŸ¹ª»«‘ »«/­óTŸ/­Ú­‘ Ú­î­Tî­>®‘ >®L®óTŸL®š®‘ š®¯óTŸ¯ܯ‘ ܯ×°óTŸ×°}±‘ }±±±óTŸ±±ı‘ ı²óTŸ²C²‘ C²c²óTŸc² ²‘ ¨G¨QG¨Ú­‘¨Ú­ç­Qç­ ²‘¨¨G¨RG¨Ú­‘°Ú­ø­Rø­×°‘°×°é°Ré°‡²‘°‡²‹²R‹² ²‘°¨G¨XG¨Ú­óXŸÚ­ø­Xø­×°óXŸ×°é°Xé°‡²óXŸ‡²‹²X‹² ²óXŸ¨ª0Ÿª¹ª\¹ª¾«0Ÿ¾«¬]!¬`¬]s¬/­]/­š®0Ÿš®¯\¯¯]¯¯\¯œ°0Ÿœ°¼°\¼°²0Ÿ²c²\c² ²0ŸLªeªbeªlª‘˜ª¹ªbœ°±°bC²S²bS²c²‘˜‡ª‹ªa¨v¨0Ÿv¨€¨]€¨Œ¨^Œ¨ ªS ª¹ª^¹ª¬S!¬`¬Ss¬Ï­SÏ­L®0ŸL®X®SX®Š®0ŸŠ®š®Sš®¯^¯¯S¯¯^¯R¯0ŸR¯g¯^g¯œ°0Ÿœ°¼°^¼°²0Ÿ²c²^c² ²0Ÿ!¬2¬ ž2¬?¬bs¬‡¬b‡¬¬‘˜I°d°bd°p°‘˜±°¼°b¨G¨0ŸT¨€¨P€¨ª\ªLª0ŸLª¬\¬Ï­\Ï­ü­0ŸL®X®\X®g®Pg®ù®\ù®¯P¯¯0ŸR¯g¯\œ°¼°\×°ò°0Ÿ²C²0ŸC²c²\‡²”²0Ÿ¨k¨0Ÿk¨ªVªUª0ŸUª‡ªV‡ª£ª0Ÿ£ª¬V¬Ï­VÏ­>®0ŸL®X®VX®Š®0ŸŠ®¯V¯R¯0ŸR¯g¯Vg¯ °0ŸI°p°0Ÿœ°¼°0Ÿ×°r±0Ÿ±± ²0Ÿ¨ˆ¨0Ÿˆ¨›¨S›¨º©0Ÿ ª¹ª0Ÿ¹ªϪSϪéª0Ÿo«¶«0Ÿ»«É«Y¬¤¬Y¤¬´¬‘ /­s­0Ÿ€­®0Ÿ%®>®\L®g¯0Ÿg¯s¯Y°w°0Ÿœ°ò°0Ÿ ±±Y'±+±Y+±Z±‘¸‰±±±0Ÿ²c²0Ÿc²w²Yw²‡²‘¸‡²”²0Ÿ”² ²‘¸¨ܨ0ŸÜ¨û¨T© ©T ©©‘˜©Ϫ0ŸÏªÞªTު骑˜éªo«0Ÿz«»«0Ÿ»«É«T¬¤¬T¤¬´¬‘˜/­L®0ŸL®X®‘˜X®÷°0Ÿ÷°±T'±+±T+±F±‘˜F±c²0Ÿc²w²Tw²‡²‘˜‡²”²0Ÿ”² ²‘˜p¨v¨0Ÿv¨Œ¨]Œ¨ª}Ÿª&ª]QªUª0ŸUª¹ªS¹ª»«}Ÿ/­Ï­}Ÿ®>®0ŸL®X®}ŸŠ®š®}Ÿš®ù®SR¯g¯]g¯s¯0Ÿœ°´°Sò°'±0Ÿ'±Z±1ŸC²c²Sc²‡²0Ÿ”² ²1Ÿ¨¾¨0Ÿñ¨.©^ΩϪ0ŸÏªéª^«>«0ŸY«o«0Ÿz« «‘˜»«¬^¬/­^@­V­0ŸÏ­5®0Ÿ5®>®P>®X®^X®g¯0Ÿg¯s¯Ps¯°^°ƒ°0Ÿƒ°œ°^œ°2±0Ÿ2±U±PU±‰±^‰±±±0Ÿ±±²^²”²0Ÿ”² ²P<ªLªblª|ªaÇ®à®aய‘˜2°B°b‰±“±b“±±±‘˜²(²b(²C²‘˜Ǩ©0Ÿ©.©1ŸÏªéª0Ÿo« «0ŸL®X®1Ÿ¨©0Ÿ©.©P.©Ä©_Ä©>«0Ÿ>«Y«_Y«Š«0ŸŠ«›«P›«¬_¬/­_/­V­0ŸV­Ï­_Ï­L®0ŸL®X®PX® ²0Ÿ‡ª‹ª õ)õ)-ÿŸ¨»«0Ÿ/­Ï­0ŸÚ­€®0Ÿ€®Š®FŸŠ®ù®0Ÿ¯ ²0Ÿ¨»«0Ÿ/­Ï­0ŸÚ­€®0Ÿ€®Š® X ŸŠ®ù®0Ÿ¯ ²0Ÿ¨»«0Ÿ/­Ï­0ŸÚ­€®0Ÿ€®Š® ƒ ŸŠ®ù®0Ÿ¯ ²0Ÿî­ø­T×°è°Tè°é° Ъ#‡²‹²Tî­ü­S×°ò°S‡²”²Sî­ø­P×°Û°PÛ°é°s‡²‹²s±±Yc²w²Yw²‡²‘¸¦¯ °0ŸZ±r±0Ÿ±±²0Ÿ¦¯ °^Z±r±^±±²^¦¯ܯYZ±k±Yk±r±‘˜±±ͱYͱ屑˜ø¯°P° °Vå±²V±¯ °SZ±r±S±±²SŒ¨é¨^¹ªϪ^o««^/­3­^@­V­^Š®š®^¦¨¶¨T¶¨º¨ Ъ#@­Q­TQ­V­ Ъ#Š®‘®T¦¨¾¨S@­V­SŠ®š®S¦¨º¨Q@­V­QŠ®‘®Qé¨.©^Ϫéª^L®X®^\©º©0Ÿ «¶«0ŸV­s­0Ÿ€­Ï­0Ÿ\©º©_ «¶«_V­s­_€­Ï­_\©º©^ «¶«^V­s­^€­Ï­^ª©­©P­©º©Y «¶«‘˜­­¹­Y¹­Ï­‘˜g©’©YV­l­Y€­•­Y•­­­‘˜Ωô©Y«#«Y#«$«‘˜Ωô©\«$«\Ωª\«>«\Y«o«\Ó©ï©Pï©ô©pŸ«#«P ²û²Uû²5³]5³8³óUŸ8³L³UL³®³]®³ì³Uì³kµ] ²ó²Tó²0³S0³8³óTŸ8³kµS ²÷²Q÷²8³óQŸ8³L³QL³®³óQŸ®³ð³Qð³´\´¤´óQŸ¤´fµ\fµkµóQŸÂ²û²0Ÿû²³w8³´0Ÿ¤´fµ0ŸÂ²û²0Ÿû²³‘¸8³´0Ÿ¤´fµ0ŸÂ²û²0Ÿû²³‘@8³´0Ÿ¤´fµ0ŸÂ²³0Ÿ8³ˆ³0Ÿˆ³®³DŸ®³Ý´0ŸÝ´é´DŸé´µ0ŸµµDŸµPµ0ŸPµ]µDŸ]µfµ0ŸÂ²³0Ÿ8³ˆ³0Ÿˆ³®³ X Ÿ®³Ý´0ŸÝ´é´ X Ÿé´µ0Ÿµµ X ŸµPµ0ŸPµ]µ X Ÿ]µfµ0ŸÂ²³0Ÿ8³ˆ³0Ÿˆ³³ G Ÿ³¦³T®³Ý´0ŸÝ´é´ 4 Ÿé´µ0Ÿµµ 8 ŸµPµ0ŸPµ]µ / Ÿ]µfµ0Ÿø³´P´%´~Ÿ%´´^¤´]µ^]µfµ~Ÿ8³L³V´³´V¤´fµV¤´Ý´2Ÿ¤´Ý´3Ÿ¤´Ý´1Ÿ¤´Ý´ C Ÿ¤´é´3Ÿ¤´Ý´ » ŸµPµ1ŸµPµ3ŸµPµ C Ÿµ]µ3ŸµPµ » Ÿû²³‘@û²³‘¸û²³wû²³]´¤´]û²³0Ÿ´¤´0Ÿû²³0Ÿ³³P´œ´Pû²³0Ÿ´¤´DŸû²³0Ÿ´¤´ X Ÿû²³0Ÿ´¤´ ] ŸL³c³sL³ˆ³3ŸL³ˆ³1ŸL³ˆ³ C ŸL³³3ŸL³ˆ³ » Ÿpµ—µU—µ”¶S”¶£¶óUŸ£¶X·SX·f·óUŸf·—¸S—¸J¹óUŸJ¹|¹S|¹gºóUŸgºôºSôºÿ»óUŸÿ»¼S¼¼óUŸ¼G¼SG¼V¼óUŸV¼X¼SX¼ƒ¼óUŸƒ¼…¼S…¼¼óUŸ¼μSμ½óUŸ½¾S¾-¾óUŸpµ—µa—µصóõ)ŸØµܵ õ)õ)õ)ŸÜµàµõ)sÐö)õ)Ÿàµùµa§·Ú·aÚ·¸‘¨¸J¹óõ)Ÿ|¹gºóõ)Ÿgº¯º‘¨¯ºɺóõ)Ÿôºÿ»óõ)Ÿÿ»¼‘¨¼*¼a*¼E¼‘¨E¼½óõ)ŸÂ½à½óõ)Ÿà½ä½aä½ÿ½‘¨¾-¾óõ)Ÿpµ—µb—µصóõ)ŸØµôµõ)sØö)õ)Ÿýµ ¶b§·Ú·bÚ·¸‘°¸J¹óõ)Ÿ|¹gºóõ)Ÿgº©º‘°©ºɺóõ)Ÿôºÿ»óõ)Ÿÿ»¼‘°¼*¼b*¼E¼‘°E¼½óõ)ŸÂ½à½óõ)Ÿà½ä½bä½ÿ½‘°¾-¾óõ)Ÿpµ—µc—µصóõ)ŸØµôµõ)sàö)õ)Ÿ¶¶c¶¶d§·Ú·cÚ·J¹‘¸|¹ º‘¸ ºɺóõ)Ÿôº¼‘¸¼*¼c*¼½‘¸½à½‘¸à½ä½cä½ÿ½‘¸¾-¾‘¸pµ—µT—µ§·óTŸ§·¾·T¾·-¾óTŸ¶X¶a¶(¶b¶8¶d<¶”¶e£¶¶¶e8·~·e½ª½eª½½‘¨ÿ½ ¾eP¶”¶f£¶¶¶f8·~·f½ª½fª½½‘°ÿ½ ¾f ¾¾‘¨T¶e¶ce¶p¶ap¶”¶c£¶¶¶c8·S·aS·f·cf·~·a½ª½cÿ½ ¾aß¶8·cJ¹\¹c\¹v¹õ)sö)õ)"õ)ŸÉºîºc·3·aJ¹X¹aصôµe»¶í¶aƒ·‡·bɺÔºa\·f·a¢·§·aA¹J¹ žw¹|¹aAº[ºa[ºgº‘¨ïºôºapµ—µ0Ÿ§·ð·0Ÿ¼E¼0Ÿà½ÿ½0Ÿpµ”¶0Ÿ£¶¬¸0ŸJ¹ø¹0ŸAºôº0Ÿÿ»e¼0Ÿƒ¼ ½0Ÿ½5½0ŸO½n½]n½¾0Ÿ¾-¾]pµ”¶0Ÿ£¶!¸0Ÿ!¸5¸P5¸¬¸^J¹|¹0Ÿ|¹£¹^£¹ôº0ŸÏ»E¼0ŸE¼V¼PV¼e¼^e¼ƒ¼0Ÿƒ¼ö¼^ö¼½0ŸÂ½à½^à½-¾0Ÿpµ”¶0Ÿ£¶<¸0Ÿ<¸U¸PU¸‡¸‘¨¢¸¬¸QJ¹|¹0Ÿ£¹ôº0ŸÏ»V¼0ŸV¼e¼Pe¼ƒ¼0Ÿƒ¼ü‘¨ö¼½0ŸÂ½à½‘¨à½-¾0Ÿpµ”¶0Ÿ£¶\¸0Ÿ\¸s¸Ps¸¬¸_J¹|¹0Ÿ|¹£¹_£¹ôº0ŸÏ»ƒ¼0Ÿƒ¼¼P¼ö¼_ö¼½0ŸÂ½à½_à½-¾0Ÿpµ”¶0Ÿ£¶l¸0Ÿ‡¸¢¸V¢¸¬¸\J¹|¹0Ÿ|¹Œ¹VŒ¹ º\ ºôº0ŸÏ»Û»0ŸÛ»ÿ»\ÿ»¼0Ÿ©¼5½\5½n½0Ÿn½½\½½0ŸÂ½à½\à½-¾0Ÿpµ”¶0Ÿ£¶}¸0Ÿ‡¸¢¸0Ÿ¢¸¬¸RJ¹ôº0ŸÏ»“¼0Ÿ“¼´¼RüǼRǼ⼑°â¼½0ŸÂ½нRнད°à½-¾0Ÿl¸¢¸0Ÿ|¹Œ¹0Ÿ¼ü0ŸÃ¼ö¼1ŸÂ½à½0Ÿpµ”¶0Ÿ£¶—¸0Ÿ—¸¢¸P¢¸¬¸SJ¹|¹0Ÿ|¹Œ¹PŒ¹ºSºôº0ŸÏ»ð»0Ÿð»ÿ»Sÿ»μ0ŸÎ¼ñ¼Pñ¼5½S5½n½0Ÿn½½S½-¾0ŸùµX¶a&º6ºa5½?½a?½n½‘¨¾-¾‘¨ ¶(¶b+·3·a¶8¶d+·/·eT¶e¶õ)ô)-ÿŸe¶„¶õ)ô)-ÿŸ„¶”¶P£¶¶¶Pß¶·õ)ô)-ÿŸ··P·3·õ)ô)*ÿŸ8·S·õ)sØö)-ÿŸS·X·õ)sØö)-ÿŸX·f· õ)õ)-ÿŸf·t· õ)õ)-ÿŸt·~·õ)sØö)-ÿŸJ¹v¹Pɺîºõ)ô)-ÿŸ½ª½Pÿ½ ¾õ)sØö)-ÿŸp¶„¶ õ)õ)-ÿŸ„¶”¶P£¶¶¶P·· õ)õ)+ÿŸ·8·PJ¹v¹P½ª½Ppµ”¶0Ÿ£¶¢¸0Ÿ¢¸&¹ ÓŸJ¹ôº0Ÿ»Ï» ÓŸÏ»O½0ŸO½n½ ÓŸn½¾0Ÿ¾-¾ ÓŸpµ”¶0Ÿ£¶¢¸0ŸJ¹ôº0ŸÏ»O½0Ÿn½¾0Ÿ¾·Ú·T¼)¼T)¼*¼ Ъ#à½ä½T¾·ð·S¼E¼Sà½ÿ½S¾·Ú·P¼ ¼P ¼*¼sà½ä½s ¼ö¼\½à½\£¹ø¹0Ÿö¼ ½0Ÿ½5½0Ÿn½½0Ÿ£¹ø¹Sö¼ ½S½5½Sn½½S£¹ø¹\ö¼ ½\½5½\n½½\è¹ë¹Pë¹ø¹]n½½]¯¹è¹]ö¼ ½]½5½]0¾Œ¾UŒ¾j¿\j¿o¿óUŸo¿€¿\€¿Œ¿UŒ¿ À\ ÀQÀUQÀHÂ\0¾Ÿ¾TŸ¾¦¾S¦¾€¿óTŸ€¿Ï¿SÏ¿ ÀóTŸ ÀàÀSàÀXÁóTŸXÁÁSÁÄÁóTŸÄÁCÂSCÂHÂóTŸ0¾Ÿ¾QŸ¾€¿óQŸ€¿Œ¿QŒ¿ ÀóQŸ ÀUÀQUÀàÀ]àÀXÁóQŸXÁÁ]ÁÄÁóQŸÄÁCÂ]CÂHÂóQŸ»¾N¿‘˜î¿ À‘˜àÀäÀdäÀXÁ‘˜ÁÄÁ‘˜é¾ù¾bøÀ Áb Á$Á‘ ¿-¿c$Á8Ác8ÁXÁ‘¨R¾N¿0Ÿo¿È¿0ŸÈ¿î¿ ÓŸî¿SÁ0ŸSÁXÁ ÓŸXÁ‘Á0Ÿ‘ÁÁ ÓŸÁ-Â0Ÿ-Â: ӟ:ÂCÂ0ŸR¾N¿0Ÿo¿È¿0ŸÈ¿î¿ X Ÿî¿SÁ0ŸSÁXÁ X ŸXÁ‘Á0Ÿ‘ÁÁ X ŸÁ-Â0Ÿ-Â: X Ÿ:ÂCÂ0ŸR¾N¿0Ÿo¿È¿0ŸÈ¿Ï¿ ¤KŸÏ¿æ¿Tî¿SÁ0ŸSÁXÁ  KŸXÁ‘Á0Ÿ‘ÁÁ ‘KŸÁ-Â0Ÿ-Â: ŒKŸ:ÂCÂ0Ÿ]À|ÀP|À‹À~Ÿ‹ÀàÀ^XÁÁ^ÄÁ:Â^:ÂCÂ~Ÿ€¿Œ¿VÀàÀVXÁÁVÄÁCÂVXÁ‘Á2ŸXÁ‘Á3ŸXÁ‘Á1ŸXÁ‘Á C ŸXÁÁ3ŸXÁ‘Á » ŸôÁ-Â1ŸôÁ-Â3ŸôÁ- C ŸôÁ:Â3ŸôÁ- » Ÿ-¿?¿c-¿?¿b-¿N¿‘˜ÁÄÁ‘˜-¿N¿\ÁÄÁ\-¿N¿0ŸÁÄÁ0Ÿ-¿E¿0ŸE¿N¿PÁ¼ÁP-¿N¿0ŸÁÄÁ ÓŸ-¿N¿0ŸÁÄÁ X Ÿ-¿N¿0ŸÁÄÁ ºKŸŒ¿£¿sŒ¿È¿3ŸŒ¿È¿1ŸŒ¿È¿ C ŸŒ¿Ï¿3ŸŒ¿È¿ » ŸPƒÂUƒÂ4Ã\4óÃóUŸ³ÃÇÃ\ÇÃ}ÄóUŸ}ÄÕÄ\ÕÄãÄóUŸãÄÅUÅWÅ\WžÅóUŸ¾Å Ç\ ÇÇóUŸÇ–Ç\–Ç›ÇóUŸ›Ç£Ç\£Ç»ÇóUŸ»ÇNÈ\NÈnÈóUŸnÈ·È\·ÈÖÈóUŸÖÈDÊ\DÊ`ÊóUŸ`ÊË\ËËóUŸË Ì\ ÌÌóUŸÌ_Ì\_Ì{ÌóUŸ{ÌÁÌ\ÁÌÌÍóUŸÌÍÞÍ\ÞÍéÍóUŸéÍÎ\Î)ÎóUŸ)ΩÎ\©Î¦ÏóUŸ¦Ï0Ð\0ÐüÐóUŸüÐPÑ\PÑbÑUbÑÜÑ\ÜÑŠÒóUŸŠÒ£Ò\£ÒàÒóUŸàÒ6Ó\6Ó:ÓU:ÓuÓ\uÓ|ÓóUŸ|ÓŠÓ\ŠÓ«ÓóUŸ«Ó³Ó\PƒÂTƒÂ$Ã]$óÃóTŸ³ÃÇÃ]ÇÃ}ÄóTŸ}ÄÕÄ]ÕÄãÄóTŸãÄöÄTöÄcÅ]cžÅóTŸ¾ÅùÆ]ùÆÇóTŸÇƒÇ]ƒÇ›ÇóTŸ›Ç¶Ç]¶Ç»ÇóTŸ»ÇTÈ]TÈnÈóTŸnȺÈ]ºÈÖÈóTŸÖÈ É] ÉŸÊóTŸŸÊË]ËËóTŸË­Ë]­Ë¦ÏóTŸ¦ÏÒ]ÒÒóTŸÒoÒ]oÒ£ÒóTŸ£ÒðÒ]ðÒÓóTŸÓTÓ]TÓ|ÓóTŸ|ÓÓ]Ó«ÓóTŸ«Ó³Ó]PƒÂQƒÂ1Ã^1óÃóQŸ³ÃÇÃ^ÇÃ}ÄóQŸ}ÄÄÄ^ÄÄãÄóQŸãÄïÄQïÄ]Å^]žÅóQŸ¾Å Ç^ ÇÇóQŸÇ“Ç^“Ç›ÇóQŸ›Ç©Ç^©Ç»ÇóQŸ»Ç^È^^ÈnÈóQŸnÈ´È^´ÈÖÈóQŸÖȵÉ^µÉ`ÊóQŸ`ÊÊ^ÊŸÊóQŸŸÊ Ë^ ËËóQŸËÌ^Ì{ÌóQŸ{̾Ì^¾Ì)ÎóQŸ)ÎmÎ^mΦÏóQŸ¦ÏIÑ^IÑPÑóQŸPÑ Ò^ ÒÒóQŸÒiÒ^iÒ£ÒóQŸ£ÒðÒ^ðÒÓóQŸÓTÓ^TÓdÓóQŸdÓrÓ^rÓ|ÓóQŸ|Ó‡Ó^‡Ó«ÓóQŸ«Ó³Ó^PƒÂRƒÂ4Ѩ4óÃóRŸ³ÃÇѨÇÃ}ÄóRŸ}ÄÕÄ‘¨ÕÄãÄóRŸãÄÅRÅWÅ‘¨WžÅóRŸ¾ÅóË‘¨óËÌóRŸÌ¨Ì‘¨¨ÌÍÌóRŸÍÌ-Í‘¨-ÍÌÍóRŸÌÍ5Α¨5ÎmÎóRŸmÎéΑ¨éÎ)ÏóRŸ)Ï<Ï‘¨<ϦÏóRŸ¦Ï[Б¨[ÐüÐóRŸüÐPÑ‘¨PÑbÑRbÑéÑ‘¨éÑÒóRŸÒ(Ò‘¨(ÒŠÒóRŸŠÒ£Ò‘¨£ÒàÒóRŸàÒ6Ó‘¨6Ó:ÓR:Ó³Ó‘¨PƒÂXƒÂãÄóXŸãÄÅXÅPÑóXŸPÑbÑXbÑ6ÓóXŸ6Ó:ÓX:Ó³ÓóXŸP¡Ã0Ÿ³Ã¥Í0Ÿ¥ÍªÍ_ªÍ³Ð0ŸßгÓ0ŸPÂ4Ã0Ÿ³ÃÇÃ0Ÿ}ÄÅ0ŸhÅ–Åw–ŲÅR²Å¾Åw¾ÅNÆ0Ÿ_Ç9È0ŸÖÈ É0Ÿ[Ê`ÊwŸÊÁÊ0Ÿ'ËiË0Ÿ€ÍªÍ0ŸlÏ€Ï0Ÿ#Ñ>Ñ0ŸPÑ|Ñ0Ÿ}ÒŠÒw&ÓDÓ0Ÿ«Ó³Ó0ŸP©Â0ŸßÂñÂ0ŸñÂþÂPþÂ4Ã_}ÄÐÄ0ŸÕÄWÅ0ŸhÅãÅ_ãŬÆ0ŸéÆÇ_ÇMÇ0Ÿ›Ç»ÇP»ÇÈ_È É0Ÿ ÉÉ_®É[Ê0Ÿ[Ê`ÊPÊŸÊ0ŸŸÊÁÊ_ÁÊöÊ0Ÿ'ËiË0Ÿ‰Ë“Ë[¢Ë¦Ë[¦ËÐË‘¸Ì{Ì0ŸÍÌUÍ0Ÿ€Í˜Í0Ÿ˜Í¢ÍP¢Í¥Í_¥ÍªÍ0ŸÌÍ)Î0ŸmÎãÎ0Ÿ)ÏPÏ0ŸlÏ€ÏP€ÏÐ0Ÿ³ÐßÐ0ŸüÐÑ[Ñ#Ñ‘¸#ÑlÑ0Ÿ|ÑôÑ0ŸÒ?Ò0Ÿ}ÒŠÒ_ŠÒdÓ0ŸdÓ|Ó‘¸|Ó«Ó0Ÿ«Ó³Ó_PÂÌÂ0ŸÃ4ÃS}Ä+Å0Ÿ8ÅWÅwhÅÊÅScÆÇ0ŸMÇvÇ0ŸÙÇãÇ[ñÇõÇ[õÇÈ‘°nÈÖÈ0Ÿ É™É0Ÿ[Ê`ÊSŸÊ²Ê[²ÊÁÊ‘°ÁÊ'Ë0ŸiËèË0Ÿ{̨Ì0Ÿ€ÍªÍ0Ÿ)ÎmÎ0ŸlÏ€Ï0Ÿ¦ÏðÏ0ŸðÏüÏw™ÐßÐ0ŸüÐ|Ñ0Ÿ–ÑÜÑSJÒŠÒ0ŸàÒðÒ0ŸÓ&ÓS&ÓTÓ0ŸdÓ|Ó0Ÿ|Ó•ÓS«Ó³Ó‘°PÂÃ0ŸÃ!ÃP!Ã4Ã0Ÿ³ÃÇÃ0Ÿ}ÄÕÄ0ŸÕÄãÄVãÄhÅ0ŸhžÅV¾ÅÊÅPÊÅYÆVYƉÆ0ŸÀÆÒÆ0ŸÒÆ߯P߯4ÇV4ÇMÇ0Ÿ_ÇüÇ0ŸüÇÈPÈnÈVnÈÉÈ0ŸÖÈ2ÉV2É÷É0Ÿ4Ê`ÊV`ÊÊ0ŸŸÊÜÊ0ŸË'ËP'ËÐËVÐËÍÌ0ŸÍÌÚÌVÚÌbÍ^bÍrÍ0ŸrÍ|ÍP|Í¥ÍV¥ÍªÍ0ŸªÍÌÍ^éÍÎ0Ÿ)ÎmÎ0Ÿ‰ÎþÎ^þÎ ÏV Ï)ÏP)Ï^Ï^^Ï€ÏV€Ï¦Ï^¦ÏüÐ0ŸüÐ#ÑV#Ñ€Ñ0Ÿ€ÑÈÑVÈÑŠÒ0ŸŠÒ£Ò^£ÒàÒ0ŸðÒÓ0ŸÓ&ÓV&ÓdÓ0ŸdÓ•ÓV•Ó£Ó^£Ó«ÓV«Ó³ÓP÷Â!Ã0Ÿ+ÅWÅ0Ÿ¾ÅÊÅ0ŸØÆÇ0Ÿ»ÇñÇ0ŸñÇÈ1Ÿ ÉÉ0Ÿ#Ê`Ê0ŸŸÊÁÊ0ŸiË¢Ë0Ÿ¢ËÐË1ŸÍÌÚÌ0ŸmΞÎ0ŸžÎÈÎ1ŸðÏüÏ0ŸüÐ#Ñ0Ÿ|Ñ®Ñ0Ÿ®ÑÜÑ1ŸŠÒ£Ò0ŸÓ&Ó0ŸdÓ³Ó1ŸPÂ!Ã0Ÿ!Ã4ÃY³ÃÇÃ0Ÿ}ÄHÅ0ŸHÅWÅPhňÅY–ŲÅY²Å¾Å‘¨¾ÅÄÇ0ŸÄÇãÇYñÇõÇYõÇÈwÈ[Ê0Ÿ[Ê`ÊP`ÊŸÊ0ŸŸÊ²ÊY²ÊÁÊwÁÊtË0ŸtË“ËY¢Ë¦ËY¦ËÁË‘°ÁËtÎ0ŸtΔÎYžÎ¢ÎY¢Î¹Î‘°¹ÎðÏ0ŸðÏüÏPüÏ[ÐY“ÐìÐ0ŸüÐÑYÑ#Ñ‘°#ѾÑ0Ÿ¾Ñ×ÑP×ÑíÑYíÑÿÑ‘¨Ò,ÒY,Ò?Ò‘¨JÒŠÒ0ŸŠÒ˜ÒY˜Ò£Ò‘°àÒdÓ0ŸdÓ|Ó‘°|Ó•ÓP•Ó«Ó‘°«Ó³ÓwPÂ4Ã0Ÿ³ÃÇÃ0Ÿ}ÄhÅ0ŸhžÅ]¾ÅùÆ0ŸùÆÇPÇ É0Ÿ ÉÉPɤÉ]¤ÉÔÉ0Ÿ ÊÊ0ŸÊ*ÊP*ÊyÊ]yÊÊ0ŸŸÊ­Ë0Ÿ­ËËËPËËÌ]ÌnÌ0Ÿ{Ì÷Ì]÷ÌÌÍ0ŸÎ)ÎP)ÎÈÎ]ÈΊÒ0ŸŠÒ£Ò]£ÒÓ0ŸÓdÓ0ŸdÓ|ÓP|Ó•Ó0Ÿ•Ó«Ó]«Ó³Ó0ŸPÂ4Ã0Ÿ³ÃÇÃ0Ÿ}ÄhÅ0ŸhžÅ\¾ÅDÊ0ŸDÊ`ÊP`ÊÍÌ0ŸÍÌÚÌPÚÌ\Í\\ͪÍ0ŸªÍ½Í\½Í©Î0Ÿ©ÎÃÎPÃÎ Ï\ Ï)Ï0Ÿ)ÏlÏ\lÏ€Ï0Ÿ€Ï¦Ï\¦Ï•Ó0Ÿ•Ó«ÓP«Ó³Ó0ŸPÂ!Ã0Ÿ!Ã4ÃfŸ³ÃÇÃ0Ÿ}ÄÕÄ0ŸÕÄãÄ^ãÄhÅ0ŸhžÅ^¾Å[Ê0Ÿ[Ê`ÊfŸ`Ê}Ò0Ÿ}ÒŠÒeŸŠÒ³Ó0ŸPÂ!Ã0Ÿ!Ã4à X Ÿ³ÃÇÃ0Ÿ}ÄÕÄ0ŸÕÄãÄ X ŸãÄhÅ0ŸhžŠX Ÿ¾Å[Ê0Ÿ[Ê`Ê X Ÿ`Ê}Ò0Ÿ}ÒŠÒ X ŸŠÒ³Ó0ŸPÂ!Ã0Ÿ!Ã4à }Ÿ³ÃÇÃ0Ÿ}ÄÕÄ0ŸÕÄãÄTãÄhÅ0ŸhňÅT–ŲÅT²Å¾Å‘°¾Å[Ê0Ÿ[Ê`Ê ÁŸ`Ê}Ò0Ÿ}ÒŠÒ YŸŠÒ³Ó0ŸöÄÅTPÑaÑTaÑbÑ ª#6Ó:ÓTöÄÅUÅÅ\PÑbÑUbÑlÑ\6Ó:ÓU:ÓDÓ\öÄÅPPÑTÑPTÑbÑu6Ó:ÓuÑÜÑSÓ&ÓS|Ó•ÓS%ÐÐ0ŸÜÑôÑ0ŸÒ?Ò0Ÿ£ÒàÒ0Ÿ%Ð[ÐYÜÑíÑYíÑôÑ‘¨Ò,ÒY,Ò?Ò‘¨%ÐÐSÜÑôÑSÒ?ÒS£ÒàÒSxЀÐP€ÐÐ_£ÒàÒ_0ÐÐ\ÜÑôÑ\Ò?Ò\£ÒàÒ\ŠÂ©ÂS}ÄÐÄS#Ñ>ÑS&Ó6ÓSŸÂ©ÂP}Ä’ÄP’Ä£Ä_#Ñ9Ñ_&Ó1Ó_}ÄÕÄS#Ñ>ÑS&Ó6ÓS‡Ä£ÄS#Ñ>ÑS&Ó6ÓS‡ÄŸÄU#Ñ5ÑU&Ó-ÓU‹ÄŸÄQ#Ñ5ÑQ&Ó-ÓQ¬ÄÕÄS´ÂÄÂTÄÂÈ ت#_ÇqÇTqÇvÇ ت#lÑsÑT´ÂÌÂ__ÇvÇ_lÑ|Ñ_´ÂÈÂQ_ÇvÇQlÑsÑQÑÇãÇ[ŸÊ²Ê[²ÊÁÊ‘°ãÅNÆ0ŸÈ9È0ŸÖÈ É0Ÿ'ËiË0ŸãÅNÆVÈ9ÈVÖÈ ÉV'ËiËVãÅÆ[È1È[1È9È‘°ÖÈôÈ[ôÈ Éw9ÆAÆPAÆNÆR'Ë8ËRîÅNÆSÈ9ÈSÖÈ ÉS'ËiËSjƉÆSnȼÈS¼ÈÈÈq\ŸÁÊÜÊSDÓTÓSƉÆPnÈ‚ÈP‚È“ÈVÁÊ×ÊVDÓOÓVnȼÈS¼ÈÈÈq\ŸÁÊÜÊSDÓTÓSwÈ“ÈSÁÊÜÊSDÓTÓSwÈÈUÁÊÓÊUDÓKÓU{ÈÈQÁÊÓÊQDÓKÓQœÈ¼ÈS¼ÈÈÈq\Ÿ”ƤÆT¤Æ¨Æ ت#ÜÊñÊTñÊöÊ ت#àÒçÒT”ƬÆVÜÊöÊVàÒðÒV”ƨÆQÜÊöÊQàÒçÒQË“Ë[üÐÑ[Ñ#Ñ‘¸2É™É0ŸÐËèË0Ÿ{̨Ì0Ÿ)ÎmÎ0Ÿ2É™É]ÐËèË]{̨Ì])ÎmÎ]2ÉhÉ[ÐËáË[áËèË‘°{Ì•Ì[•̨̑°„ÉŒÉPŒÉ™ÉS)ÎmÎS=É„ÉSÐËèËS{̨ÌSµÉÔÉ^Ì\Ì^\ÌmÌq\ŸðÒÓ^TÓdÓ^ÊÉÔÉPÌ*ÌP*Ì;Ì]ðÒÓ]TÓ_Ó]Ì\Ì^\ÌmÌq\ŸðÒÓ^TÓdÓ^Ì;Ì^ðÒÓ^TÓdÓ^Ì7ÌUðÒþÒUTÓ[ÓU#Ì7ÌQðÒþÒQTÓ[ÓQDÌ\Ì^\ÌmÌq\ŸßÉïÉTïÉóÉ ت#éÍÎTÎÎ ت#ÓÓTßÉ÷É]éÍÎ]ÓÓ]ßÉóÉQéÍÎQÓÓQÎÈÎ^ŠÒ£Ò^•Ó£Ó^£Ó«ÓV÷ÌUÍ0ŸÈÎãÎ0Ÿ)ÏPÏ0Ÿ€Ï¦Ï0Ÿ÷ÌUÍ\ÈÎãÎ\)ÏPÏ\€Ï¦Ï\÷ÌUÍ^ÈÎãÎ^)ÏPÏ^€Ï¦Ï^EÍHÍPHÍUÍ_€Ï¦Ï_ÍUÍ]ÈÎãÎ])ÏPÏ]€Ï¦Ï]ÀÓÔUÔPÔ]PÔSÔóUŸSÔdÔUdÔÆÔ]ÆÔÕUÕ‹Ö]ÀÓÔTÔKÔSKÔSÔóTŸSÔ‹ÖSÀÓÔQÔSÔóQŸSÔdÔQdÔÆÔóQŸÆÔÕQÕŸÕ\ŸÕÄÕóQŸÄÕ†Ö\†Ö‹ÖóQŸâÓÔ0ŸÔ(ÔwSÔŸÕ0ŸÄÕ†Ö0ŸâÓÔ0ŸÔ(Ô‘¸SÔŸÕ0ŸÄÕ†Ö0ŸâÓÔ0ŸÔ(Ô‘@SÔŸÕ0ŸÄÕ†Ö0ŸâÓ2Ô0ŸSÔ Ô0Ÿ ÔÆÔeŸÆÔýÕ0ŸýÕ ÖeŸ Ö2Ö0Ÿ2Ö7ÖeŸ7ÖpÖ0ŸpÖ}ÖeŸ}Ö†Ö0ŸâÓ2Ô0ŸSÔ Ô0Ÿ ÔÆÔ X ŸÆÔýÕ0ŸýÕ Ö X Ÿ Ö2Ö0Ÿ2Ö7Ö X Ÿ7ÖpÖ0ŸpÖ}Ö X Ÿ}Ö†Ö0ŸâÓ2Ô0ŸSÔ Ô0Ÿ Ô§Ô 6Ÿ§Ô¾ÔTÆÔýÕ0ŸýÕ Ö #Ÿ Ö2Ö0Ÿ2Ö7Ö 'Ÿ7ÖpÖ0ŸpÖ}Ö Ÿ}Ö†Ö0ŸÕ;ÕP;ÕIÕ~ŸIÕŸÕ^ÄÕ}Ö^}Ö†Ö~ŸSÔdÔVÔÔŸÕVÄÕ†ÖVÄÕýÕ2ŸÄÕýÕ3ŸÄÕýÕ1ŸÄÕýÕ è ŸÄÕ Ö3ŸÄÕýÕ » Ÿ7ÖpÖ1Ÿ7ÖpÖ3Ÿ7ÖpÖ è Ÿ7Ö}Ö3Ÿ7ÖpÖ » ŸÔ(Ô‘@Ô(Ô‘¸Ô(ÔwÔ2Ô]ŸÕÄÕ]Ô2Ô0ŸŸÕÄÕ0ŸÔ)Ô0Ÿ)Ô2ÔPŸÕ¼ÕPÔ2Ô0ŸŸÕÄÕeŸÔ2Ô0ŸŸÕÄÕ X ŸÔ2Ô0ŸŸÕÄÕ LŸdÔ{ÔsdÔ Ô3ŸdÔ Ô1ŸdÔ Ô è ŸdÔ§Ô3ŸdÔ Ô » ŸÖÉÖUÉÖˆ×Sˆ×,ÚóUŸ,ÚNÚSNÚ°ÚóUŸ°ÚòÚSòÚŒÞóUŸŒÞ^ßS^߈áóUŸˆáÆáSÆá?âóUŸ?âeâSeâxâóUŸxâ‰âS‰â§âóUŸ§â²âS²â¿âóUŸ¿âÄâSÄâÎãóUŸÎãøãSøãäóUŸä)äSÖÉÖaÉÖ5Û‘ˆ5ÛÜóõ)ŸÜ¹Ü‘ˆ¹Ü Ýóõ)Ÿ ݶޑˆ¶ÞØÞaØÞhß‘ˆhß™ßóõ)Ÿ™ßFà‘ˆFàGáóõ)ŸGáèᑈèá/âóõ)Ÿ/â?⑈?âQâaQâ“⑈“â§âóõ)Ÿ§âð⑈ðâÎãóõ)ŸÎã䑈ä äa ä)䑈ÖÉÖbÉÖ¶Þ‘¶ÞØÞbØÞ?â‘?âQâbQâä‘ä äb ä)ä‘ÖÉÖcÉÖ¶Þ‘˜¶ÞØÞcØÞ?⑘?âQâcQâ䑘ä äc ä)䑘ÖÉÖTÉÖ¶ÞóTŸ¶ÞÎÞTÎÞ)äóTŸôÖ×a×d× ‘ˆö)sö)Ÿ,Ú>Ú ‘ˆö)sö)Ÿ°Ú¾Ú ‘ˆö)sö)ŸÎãÖã ‘ˆö)sö)Ÿêãòã ‘ˆö)sö)ŸôÖ×e×d× ‘ö)s ö)Ÿ,Ú>Ú ‘ö)s ö)Ÿ°Ú¾Ú ‘ö)s ö)ŸÎãÖã ‘ö)s ö)Ÿêãòã ‘ö)s ö)ŸôÖ×b×d× ‘˜ö)s(ö)Ÿ,Ú>Ú ‘˜ö)s(ö)Ÿ°Ú¾Ú ‘˜ö)s(ö)ŸÎãÖã ‘˜ö)s(ö)Ÿêãòã ‘˜ö)s(ö)Ÿ-×O×c^×d×c,Ú>Úc°Ú¾Úc¾ÚíÚ‘ø~ÎãÖãcÜãêã‘ø~êãòãcòãøã‘ø~-×5×õ)õ)Ÿ5×A×aA×O×õ)õ)Ÿ,Ú>Úõ)õ)Ÿ°ÚíÚ‘ø~ö)‘ø~ö)ŸÎãÖãõ)õ)ŸÜãøã‘ø~ö)‘ø~ö)Ÿ9×d×b,Ú>Úb°Ú¾ÚbÎãÖãbêãòãbd×èÙ‘ø~Ú,Ú‘ø~IÚNÚaNÚ°Ú‘ø~íÚòÚbòÚ5Û‘ø~ ÝEÝ‘ø~”ݤݑø~©ÝûÝ‘ø~Þ¦Þ‘ø~™ßÃß‘ø~áßFà‘ø~Gáˆá‘ø~Æáèá‘ø~/â?â‘ø~ÃÚÕÚaÖˆ×0Ÿˆ×¦×U¦×,ÚV,ÚNÚ0ŸNÚ°ÚV°ÚòÚ0ŸòÚšÛVÎÛäÛVùÛ ÜVÜŒÞVŒÞ™ß0Ÿ™ßFàVFàGá0ŸGá[áV[á€áU€áˆáVˆáÆá0ŸÆáèáVèá/â0Ÿ/â?âV?â)ä0ŸÄÛÎÛ žÎÛùÛ‘ø~,áGá‘ø~Öx×0Ÿx×,Ú\,ÚNÚ0ŸNÚ°Ú\°ÚòÚ0ŸòÚšÛ\ùÛ Ü\ÜŒÞ\ŒÞÜÞ0Ÿ™ßFà\Gáˆá\Æáèá\/â?â\?âZâ0ŸÎãøã0Ÿä)ä0ŸÖ¡×0Ÿ¡×µ×Vµ×$Ù0ŸÉÙÚ0ŸÚ,ÚV,ÚNÚ0Ÿ_ÚˆÚ0Ÿ°ÚòÚ0Ÿ5ÛCÛ_ܹÜ0Ÿ ÝxÝ0Ÿ”Ý©Ý0Ÿûݸß0Ÿà+à0ŸFàÅà0Ÿ,áÆá0Ÿ/â“â0Ÿ§â@ã0ŸTãgã0Ÿ©ã)ä0ŸÖGØ0ŸGØgØT{ØØT؟ؑ°ŸØ_Ú0Ÿ_ÚsÚTsÚˆÚ‘°ˆÚ5Û0Ÿ5ÛCÛTܹÜ0ŸÝß0ŸßßPßmß‘ø~™ßFà0ŸpàGá0ŸGá[á‘°[áZâ0ŸZâxâPxâ“â‘ø~“â§â0Ÿ§âæâ‘ø~,ãJã0ŸTãøã0Ÿøã 䑸~ä)ä0ŸÖ'Ø0Ÿ'Ø9ØP9ØÆØ^ÆØeÙ0ŸeÙuÙPuÙ§Ù^§Ù_Ú0Ÿ_ÚˆÚ^ˆÚòÚ0ŸòÚüÚPüÚCÛ^ܹÜ0Ÿ Ý@Ý^@ÝŠÝ0Ÿ”Ý©Ý0Ÿ©ÝºÝ^ºÝÓÝ0ŸÓÝÜÝPÜÝwÞ0ŸwÞŒÞPŒÞ ß0Ÿ ß5ßP5ß™ß^™ß+à0Ÿ+àFàPFàpà^pàGá0ŸGá[á^[áÆá0ŸÆáèáPèáxâ0Ÿxâ“âP“â§â0Ÿ§â,ã^,ãJã0ŸTãøã0Ÿøãä^ä)ä0ŸÖ Ø0Ÿ Ø ØP Ø{Ø‘¨ÆØ_Ú0Ÿ_ÚˆÚ‘¨ˆÚ5Û0Ÿ5ÛCÛZܹÜ0Ÿ ÝÝ‘¨@ÝŠÝ0Ÿ”ÝbÞ0ŸbÞwÞPwތޑ¨ŒÞ<ß0Ÿ<ßSßPSßqßZqߙߑø~™ßFà0ŸFàSà‘ø~pàGá0Ÿ[á§â0Ÿ§â¿âP¿âæâZ,ãJã0ŸTãøã0Ÿøã äZ ä䑸~ä)ä0ŸÖˆ×0Ÿ\ØgØY{ØØYخؑ¸8Ù¹Ù0Ÿ¹ÙÚ],ÚNÚ0Ÿ_ÚsÚYsÚˆÚ‘¸°Ú5Û0Ÿ5ÛšÛ]ùÛ Ü]Ü Ý]Ý@Ý]”Ý©Ý]©ÝÜÝ0ŸÜÝÞ]ŒÞLß0Ÿmß™ß\áßà0Ÿ+àFà0ŸFàSà\Sàíà]íàGá0ŸGá[ᑸˆáâ0Ÿâ/â]?â¿â0ŸÛâ~ã]~ã©ã0Ÿ©ãÎã]Îãøã0Ÿøãä]ä)ä0ŸÖ†Ø0Ÿ†Ø®ØP®Ø.ÙS.ÙIÙ0ŸIÙ^ÙP^ÙuÙSuÙˆÚ0ŸˆÚ¤ÚS¤ÚòÚ0ŸòÚÛSÛ5Û0Ÿ5ÛCÛSܹÜ0Ÿ Ý%Ý0Ÿ%Ý;ÝP;Ý”ÝS”Ý^ß0Ÿmß™ß0Ÿ™ßáßSáßàPàFàSFàGá0ŸGá[áP[áÄâ0ŸÄâ"ãS"ãJã0ŸTãøã0ŸøãäSä)ä0Ÿ}׈×0Ÿˆ×¦×‘ ¦×Ú‘ #ŸÚ&ÚrŸ&Ú,Ú‘ #ŸNÚ°Ú‘ #ŸòÚ5Û‘ #ŸÜ¹Ü‘ #Ÿ ݌ޑ #ŸLß™ß0Ÿ™ßFà‘ #ŸFàSà0ŸGá[á‘ #Ÿ[á‚áR‚áˆá‘ Æáèá‘ #Ÿ/â?â‘ #Ÿ¿âõâ0Ÿõâ,ã1Ÿøãä0ŸÖô×0ŸôרPØÆØ‘€ÆØ_Ú0Ÿ_ÚˆÚ‘€ˆÚ5Û0Ÿ5ÛCÛ‘€Ü¹Ü0Ÿ Ý@Ý‘€@ÝŠÝ0Ÿ”ÝKÞ0ŸKÞbÞPbތޑ€ŒÞzß0Ÿzß™ßP™ßFà0ŸFàSàPSàâà‘€âàGá0ŸGá[á‘€[áâ0Ÿâ/â‘€/âã0Ÿã'ãP'ã~ã‘€~ã©ã0Ÿ©ãÎã‘€Îã)ä0ŸÚÖ×a×d× ‘ˆö)sö)Ÿ,Ú>Ú ‘ˆö)sö)Ÿ°Ú¾Ú ‘ˆö)sö)Ÿ áGá‘ø~“â§â‘ø~~ã‚ãg‚ã©ã‘ø~ÎãÖã ‘ˆö)sö)Ÿêãòã ‘ˆö)sö)ŸåÖ×e×d× ‘ö)s ö)Ÿ,Ú>Ú ‘ö)s ö)Ÿ°Ú¾Ú ‘ö)s ö)ŸÎãÖã ‘ö)s ö)Ÿêãòã ‘ö)s ö)ŸôÖ×b×d× ‘˜ö)s(ö)Ÿ8ÙÚ‘ø~,Ú>Ú ‘˜ö)s(ö)Ÿ°Ú¾Ú ‘˜ö)s(ö)ŸòÚ5Û‘ø~Ü„Üg„ܑܹø~”ݤݑø~©ÝÞ‘ø~áßà‘ø~+àFà‘ø~Æáèá‘ø~ÎãÖã ‘˜ö)s(ö)Ÿêãòã ‘˜ö)s(ö)ŸA×O× õ)õ)-ÿŸ^×d× õ)õ)-ÿŸÙÚS,Ú4Ú õ)õ)-ÿŸ4Ú>Úõ)sˆö)-ÿŸ°Ú´Ú õ)õ)-ÿŸ´Ú¾Ú õ)s8ö)-ÿŸÛ5ÛPÜ”ÜS”ÝÞSÆáÞáSÎãÖãõ)sˆö)-ÿŸêãòã õ)s8ö)-ÿŸ2Ø{Ø0Ÿ{Ø®Ø1Ÿ_ÚˆÚ0Ÿ Ý@Ý0ŸGá[á1ŸÖ5Û0ŸÜŽÜ0Ÿ ݦÞ0Ÿ¶Þ)ä0ŸÎÞØÞT?âPâTPâQâ Ȫ#ä äTÎÞÜÞS?âZâSä)äSÎÞØÞP?âCâPCâQâsä äsÒâ,ã]øãä]pàÅà0Ÿ,ã@ã0ŸTãgã0Ÿ©ãÎã0Ÿpà¦àR¦àÅà‘€,ã7ãR7ã@ã‘€Tã`ãR`ãgã‘€©ãÎã‘€pàÅà],ã@ã]Tãgã]©ãÎã]µà¸àP¸àÅà_©ãÎã_{àÅàS,ã@ãSTãgãS©ãÎãS¦×µ×UÚ&ÚUÀ×Ð×TÐ×Ô× Ъ#Þ!ÞT!Þ&Þ Ъ#/â6âTÀר×VÞ&ÞV/â?âVÀ×Ô×QÞ&ÞQ/â6âQTØgØY_ÚsÚYsÚˆÚ‘¸ÆØ$Ù0Ÿ@ÝxÝ0Ÿ™ß¸ß0Ÿà+à0ŸÆØ$ÙS@ÝxÝS™ß¸ßSà+àSÆØüØY™ß±ßY±ß¸ß‘€ààYà+à‘€ÙÙPÙ$Ù_@ÝxÝ_ÑØ$Ù]@ÝxÝ]™ß¸ß]à+à]uÙÙ^ÛÛ^ÙÙpÿŸÛÛpÿŸ0äŒäUŒäjå\jåoåóUŸoå€å\€åŒåUŒå æ\ æQæUQæHè\0äŸäTŸä¦äS¦ä€åóTŸ€åÏåSÏå æóTŸ æàæSàæXçóTŸXççSçÄçóTŸÄçCèSCèHèóTŸ0äŸäQŸä€åóQŸ€åŒåQŒå æóQŸ æUæQUæàæ]àæXçóQŸXçç]çÄçóQŸÄçCè]CèHèóQŸ»äN员îå æ‘˜àæäædäæX瑘çÄ瑘éäùäbøæ çb ç$ç‘ å-åc$ç8çc8çX瑨RäNå0ŸoåÈå0ŸÈåîå #ŸîåSç0ŸSçXç #ŸXç‘ç0Ÿ‘çç #Ÿç-è0Ÿ-è:è #Ÿ:èCè0ŸRäNå0ŸoåÈå0ŸÈåîå X ŸîåSç0ŸSçXç X ŸXç‘ç0Ÿ‘çç X Ÿç-è0Ÿ-è:è X Ÿ:èCè0ŸRäNå0ŸoåÈå0ŸÈåÏå ä&ŸÏåæåTîåSç0ŸSçXç à&ŸXç‘ç0Ÿ‘çç Ñ&Ÿç-è0Ÿ-è:è Ì&Ÿ:èCè0Ÿ]æ|æP|æ‹æ~Ÿ‹æàæ^Xçç^Äç:è^:èCè~Ÿ€åŒåVæàæVXççVÄçCèVXç‘ç2ŸXç‘ç3ŸXç‘ç1ŸXç‘ç B ŸXçç3ŸXç‘ç » Ÿôç-è1Ÿôç-è3Ÿôç-è B Ÿôç:è3Ÿôç-è » Ÿ-å?åc-å?åb-åN员çÄ瑘-åNå\çÄç\-åNå0ŸçÄç0Ÿ-åEå0ŸEåNåPç¼çP-åNå0ŸçÄç #Ÿ-åNå0ŸçÄç X Ÿ-åNå0ŸçÄç ú&ŸŒå£åsŒåÈå3ŸŒåÈå1ŸŒåÈå B ŸŒåÏå3ŸŒåÈå » ŸPè‰èU‰èHéSHéôëóUŸôë"ìS"ììóUŸìÒìSÒìlðóUŸlð>ñS>ñxóóUŸxó¶óS¶ó/ôóUŸ/ôUôSUôhôóUŸhôyôSyô—ôóUŸ—ô¢ôS¢ô¯ôóUŸ¯ô´ôS´ôÑõóUŸÑõöSö+öóUŸ+ö8öSPè‰èa‰è푈í_îóõ)Ÿ_î™î‘ˆ™îëîóõ)Ÿëî–𑈖ð¸ða¸ðHñ‘ˆHñyñóõ)Ÿyñ.ò‘ˆ.ò9óóõ)Ÿ9óØó‘ˆØóôóõ)Ÿô/ô‘ˆ/ôAôaAôƒô‘ˆƒô—ôóõ)Ÿ—ôàô‘ˆàôÑõóõ)ŸÑõ+ö‘ˆ+ö/öa/ö8ö‘ˆPè‰èb‰è–ð‘–ð¸ðb¸ð/ô‘/ôAôbAô+ö‘+ö/öb/ö8ö‘Pè‰èc‰è–𑘖ð¸ðc¸ð/ô‘˜/ôAôcAô+ö‘˜+ö/öc/ö8ö‘˜Pè‰èT‰è–ðóTŸ–ð®ðT®ð8öóTŸ´èÀèaÀè$é ‘ˆö)sö)Ÿôëì ‘ˆö)sö)Ÿìžì ‘ˆö)sö)ŸÑõßõ ‘ˆö)sö)Ÿùõö ‘ˆö)sö)Ÿ´èÄèeÄè$é ‘ö)s ö)Ÿôëì ‘ö)s ö)Ÿìžì ‘ö)s ö)ŸÑõßõ ‘ö)s ö)Ÿùõö ‘ö)s ö)Ÿ´èÙèbÙè$é ‘˜ö)s(ö)Ÿôëì ‘˜ö)s(ö)Ÿìžì ‘˜ö)s(ö)ŸÑõßõ ‘˜ö)s(ö)Ÿùõö ‘˜ö)s(ö)Ÿíèécé$écôëìcìžìcžìÍì‘ø~Ñõßõcßõùõ‘ø~ùõöcöö‘ø~íèõèõ)õ)Ÿõèéaééõ)õ)Ÿôëìõ)õ)ŸìÍì‘ø~ö)‘ø~ö)ŸÑõßõõ)õ)Ÿßõö‘ø~ö)‘ø~ö)Ÿùè$ébôëìbìžìbÑõßõbùõöb$é²ë‘ø~áëôë‘ø~"ìì‘ø~ÍìÒìbÒìí‘ø~ëî%ï‘ø~tï„ï‘ø~‰ïÛï‘ø~ïï†ð‘ø~yñ£ñ‘ø~Áñ.ò‘ø~9óxó‘ø~¶óØó‘ø~ô/ô‘ø~£ìµìaPèHé0ŸHéféUféôëVôë"ì0Ÿ"ììVìÒì0ŸÒìzíV®íÄíVÙíìíVüílðVlðyñ0Ÿyñ.òV.ò9ó0Ÿ9óKóVKópóUpóxóVxó¶ó0Ÿ¶óØóVØóô0Ÿô/ôV/ô8ö0Ÿ¤í®í ž®íÙí‘ø~ó9ó‘ø~Pè8é0Ÿ8éôë\ôë"ì0Ÿ"ìì\ìÒì0ŸÒìzí\Ùíìí\üílð\lð¼ð0Ÿyñ.ò\9óxó\¶óØó\ô/ô\/ôJô0ŸÑõö0Ÿ+ö8ö0ŸPèaé0ŸaéuéVuéîê0Ÿ“ëáë0ŸáëôëVôë"ì0Ÿ7ìhì0ŸìÒì0Ÿí#í__î™î0ŸëîXï0Ÿtï‰ï0ŸÛï˜ñ0Ÿáñò0Ÿ.ò·ò0ŸóFó0ŸFóKóPKó¶ó0Ÿôƒô0Ÿ—ô@õ0ŸTõgõ0Ÿ¬õ8ö0ŸPèê0Ÿê'êT;ê?êT?ê_ê‘°_ê7ì0Ÿ7ìSìTSìhì‘°hìí0Ÿí#íT_î™î0Ÿúîäð0ŸäðùðPùðMñ‘ø~yñ.ò0ŸXò9ó0Ÿ9óFó‘°FóKóTKóJô0ŸJôhôPhôƒô‘ø~ƒô—ô0Ÿ—ôÖô‘ø~õJõ0ŸTõö0Ÿöö‘ø~+ö8ö0ŸPèçé0ŸçéùéPùé†ê^†ê/ë0Ÿ/ë?ëP?ëqë^që7ì0Ÿ7ìhì^hìÒì0ŸÒìÜìPÜì#í^_î™î0Ÿëî ï^ ïjï0Ÿtï‰ï0Ÿ‰ïšï^šï³ï0Ÿ³ï¼ïP¼ïWð0ŸWðlðPlðñ0ŸññPñyñ^yñò0Ÿò.òP.òXò^Xò9ó0Ÿ9óKó^Kó¶ó0Ÿ¶óØóPØóhô0ŸhôƒôPƒô—ô0Ÿ—ôõ^õJõ0ŸTõö0Ÿö+ö^+ö8ö0ŸPèËé0ŸËéàéPàé;ꑨ†ê7ì0Ÿ7ìh쑨hìí0Ÿí#íZ_î™î0Ÿëîú ïjï0ŸtïBð0ŸBðWðPWðlð‘¨lðñ0Ÿñ3ñP3ñQñZQñyñ‘ø~yñ.ò0Ÿ.ò;ò‘ø~Xò9ó0ŸFóKóZKó—ô0Ÿ—ô¯ôP¯ôÖôZõJõ0ŸTõö0ŸööZö+ö‘ø~+ö8ö0ŸPèHé0Ÿê'êYëƒë0Ÿƒëáë]ôë"ì0Ÿ7ìSìYSìh쑸ìí0Ÿízí]Ùíìí]üíëî]úî ï]tï‰ï]‰ï¼ï0Ÿ¼ïïï]lð,ñ0ŸMñyñ\Áñáñ0Ÿò.ò0Ÿ.ò;ò\;òßò]ßò9ó0Ÿxóñó0Ÿñóô]/ô¯ô0ŸËô~õ]~õ¬õ0Ÿ¬õÑõ]Ñõö0Ÿö+ö]+ö8ö0ŸPèFê0ŸFênêPnêøêSøêë0Ÿë(ëP(ë?ëS?ëhì0Ÿhì„ìS„ìÒì0ŸÒìçìSçìí0Ÿí#íS_î™î0Ÿëîï0ŸïïPïtïStï>ñ0ŸMñyñ0ŸyñÁñSÁñáñPáñ.òS.ò9ó0Ÿ9óKóPKó´ô0Ÿ´ôõSõJõ0ŸTõö0Ÿö+öS+ö8ö0Ÿ=éHé0ŸHéfé‘ féÙë‘ #ŸáëîërŸîëôë‘ #Ÿ"ìì‘ #ŸÒìí‘ #Ÿ_î™î‘ #Ÿëîlð‘ #Ÿ,ñyñ0Ÿyñ.ò‘ #Ÿ.ò;ò0Ÿ9óKó‘ #ŸKóróRróxó‘ ¶óØó‘ #Ÿô/ô‘ #Ÿ¯ôåô0Ÿåôõ1Ÿö+ö0ŸPè´é0Ÿ´éÄéPÄé†ê‘€†ê7ì0Ÿ7ìhì‘€hìí0Ÿí#í‘€_î™î0Ÿëî ï‘€ ïjï0Ÿtï+ð0Ÿ+ðBðPBðlð‘€lðZñ0ŸZñyñPyñ.ò0Ÿ.ò;òP;òÔò‘€Ôò9ó0Ÿ9óKó‘€Kóô0Ÿôô‘€ôòô0ŸòôõPõ~õ‘€~õ¬õ0Ÿ¬õÑõ‘€Ñõ8ö0ŸšèÀèaÀè$é ‘ˆö)sö)Ÿëáë‘ø~ôëì ‘ˆö)sö)Ÿìžì ‘ˆö)sö)ŸÒìí‘ø~_îdîgdî™î‘ø~tï„ï‘ø~‰ïïï‘ø~Áñáñ‘ø~ò.ò‘ø~þò9ó‘ø~¶óØó‘ø~ƒô—ô‘ø~~õ‚õg‚õ¬õ‘ø~Ñõßõ ‘ˆö)sö)Ÿùõö ‘ˆö)sö)Ÿ¥èÄèeÄè$é ‘ö)s ö)Ÿôëì ‘ö)s ö)Ÿì"ìcìžì ‘ö)s ö)ŸÑõßõ ‘ö)s ö)Ÿùõö ‘ö)s ö)Ÿ´èÙèbÙè$é ‘˜ö)s(ö)Ÿôëì ‘˜ö)s(ö)Ÿ ììaìžì ‘˜ö)s(ö)ŸÑõßõ ‘˜ö)s(ö)Ÿùõö ‘˜ö)s(ö)Ÿéé õ)õ)-ÿŸé$é õ)õ)-ÿŸgëáëSôëüë õ)õ)-ÿŸüëìõ)sˆö)-ÿŸì”ì õ)õ)-ÿŸ”ìžì õ)s8ö)-ÿŸüìíP_îtîStïïïS¶óÎóSÑõßõõ)sˆö)-ÿŸùõö õ)s8ö)-ÿŸòé;ê0Ÿ;ênê1Ÿ7ìhì0Ÿëî ï0Ÿ9óKó1ŸPèí0Ÿ_înî0Ÿëî†ð0Ÿ–ðFó0ŸKó8ö0Ÿ®ð¸ðT/ô@ôT@ôAô Ъ#+ö/öT®ð¼ðS/ôJôS+ö8öS®ð¸ðP/ô3ôP3ôAôs+ö/ösÂôõ]ö+ö]Xò·ò0Ÿõ@õ0ŸTõgõ0Ÿ¬õÑõ0ŸXòŽòRŽò·ò‘€õ,õR,õ@õ‘€Tõ`õR`õgõ‘€¬õÑõ‘€Xò·ò]õ@õ]Tõgõ]¬õÑõ]§òªòPªò·ò^¬õÑõ^cò·òSõ@õSTõgõS¬õÑõSféuéUáëîëU€ééTé”é Ъ#ïïðTðð Ъ#ô&ôT€é˜éVïïðVô/ôV€é”éQïïðQô&ôQê'êY7ìSìYSìh쑸†êîê0Ÿ ïXï0Ÿyñ˜ñ0Ÿáñò0Ÿ†êîêS ïXïSyñ˜ñSáñòSÙêáêPáêîê_ ïXï_‘êîê] ïXï]yñ˜ñ]áñò]?ëgë^çìüì^IëgëpÿŸçì÷ìpÿŸ@öœöUœöz÷\z÷÷óUŸ÷÷\÷œ÷Uœ÷ø\øaøUaøXú\@ö¯öT¯ö¶öS¶ö÷óTŸ÷ß÷Sß÷øóTŸøðøSðøhùóTŸhù­ùS­ùÔùóTŸÔùSúSSúXúóTŸ@ö¯öQ¯ö÷óQŸ÷œ÷Qœ÷øóQŸøeøQeøðø]ðøhùóQŸhù­ù]­ùÔùóQŸÔùSú]SúXúóQŸËö^÷‘˜þ÷ø‘˜ðøôødôøhù‘˜­ùÔù‘˜ùö ÷bùùbù4ù‘ -÷=÷c4ùHùcHùhù‘¨bö^÷0Ÿ÷Ø÷0ŸØ÷þ÷ Ÿþ÷cù0Ÿcùhù Ÿhù¡ù0Ÿ¡ù­ù Ÿ­ù=ú0Ÿ=úJú ŸJúSú0Ÿbö^÷0Ÿ÷Ø÷0ŸØ÷þ÷ X Ÿþ÷cù0Ÿcùhù X Ÿhù¡ù0Ÿ¡ù­ù X Ÿ­ù=ú0Ÿ=úJú X ŸJúSú0Ÿbö^÷0Ÿ÷Ø÷0ŸØ÷ß÷ %Ÿß÷ö÷Tþ÷cù0Ÿcùhù %Ÿhù¡ù0Ÿ¡ù­ù %Ÿ­ù=ú0Ÿ=úJú û$ŸJúSú0ŸmøŒøPŒø›ø~Ÿ›øðø^hù­ù^ÔùJú^JúSú~Ÿ÷œ÷V$øðøVhù­ùVÔùSúVhù¡ù2Ÿhù¡ù3Ÿhù¡ù1Ÿhù¡ù C Ÿhù­ù3Ÿhù¡ù » Ÿú=ú1Ÿú=ú3Ÿú=ú C ŸúJú3Ÿú=ú » Ÿ=÷O÷c=÷O÷b=÷^÷‘˜­ùÔù‘˜=÷^÷\­ùÔù\=÷^÷0Ÿ­ùÔù0Ÿ=÷U÷0ŸU÷^÷P­ùÌùP=÷^÷0Ÿ­ùÔù Ÿ=÷^÷0Ÿ­ùÔù X Ÿ=÷^÷0Ÿ­ùÔù )%Ÿœ÷³÷sœ÷Ø÷3Ÿœ÷Ø÷1Ÿœ÷Ø÷ C Ÿœ÷ß÷3Ÿœ÷Ø÷ » Ÿ`ú™úU™ú¢ûS¢ûLþóUŸLþ}þS}þóUŸ<S<|óUŸ|OSOˆóUŸˆÆSÆ/óUŸ/œSœµóUŸµÊSÊïóUŸïþSþóUŸSOóUŸO]S]óUŸŒS`ú™úa™úÿ‘€ÿàÿóõ)Ÿàÿ‘€ïóõ)Ÿï¦‘€¦ÈaÈY‘€Y’óõ)Ÿ’F‘€FLóõ)ŸLè‘€èóõ)Ÿr‘€r„a„Ú‘€Úïóõ)ŸïB‘€BOóõ)ŸO‘€ƒaƒŒ‘€`ú™úb™ú¦‘ˆ¦ÈbÈr‘ˆr„b„‘ˆƒbƒŒ‘ˆ`ú™úc™ú¦‘¦ÈcÈr‘r„c„‘ƒcƒŒ‘`ú™úT™ú¦óTŸ¦¾T¾ŒóTŸÄúÚúeÚú&û ‘€ö)sö)Ÿ/H ‘€ö)sö)ŸÄúÞúdÞú&û ‘ˆö)s ö)Ÿ/H ‘ˆö)s ö)ŸÄúóúbóú&û ‘ö)s(ö)Ÿ/H ‘ö)s(ö)Ÿ÷ú&ûcXþ\þc/HcHc‘ø~ûúûõ)õ)Ÿûûaû&ûõ)õ)ŸXþ\þõ)õ)Ÿ\þnþc/Hõ)õ)ŸHc‘ø~ö)‘ø~ö)ŸOWc û&ûd/HdHcwJûtûeLþnþe6eOWehûlûõ)õ)õ)õ)Ÿlûpûõ)sö)õ)õ)Ÿûú&ûbXþ\þ õ)õ)õ)"Ÿ`þnþd/HbHc‘ OWd&ûtûfLþnþf6fOWf~û þw8þLþwxþ}þa}þÿwï$wp{w€Ïwßw<–w’»wÙFwLˆwÆèw/w`ú¢û0Ÿ¢ûÀûUÀûLþVLþ}þ0Ÿ}þ~ÿV¶ÿÌÿVàÿßVïV<0Ÿ<|V|’0Ÿ’FVFL0ŸL[V[€U€ˆVˆÆ0ŸÆèVè0Ÿ/V/Œ0Ÿ«ÿ¶ÿ ž¶ÿÕÿwÕÿàÿ‘ð~1Lw`ú’û0Ÿ’ûLþ\Lþ}þ0Ÿ}þ~ÿ\àÿß\ï\<0Ÿ<|\|Ì0Ÿ’F\Lˆ\Æè\/\/c0Ÿr0ŸO]0ŸŒ0Ÿ`ú»û0Ÿ»ûÏûVÏûHý0Ÿìý8þ0Ÿ8þLþVLþ}þ0Ÿþ¸þ0Ÿÿ#ÿ_àÿ0ŸïT0Ÿp€0ŸÏ°0ŸÙ 0ŸFÍ0Ÿ1V0ŸV[P[Æ0ŸÚ0Ÿï 0Ÿ¾Ñ0Ÿ*Œ0Ÿ`úaü0ŸaüüT•ü™üT™ü¹ü‘°¹üþ0Ÿþ£þT£þ¸þ‘°¸þÿ0Ÿÿ#ÿTàÿ0Ÿúø0Ÿø P ]w’F0ŸpL0ŸLV‘°V[T[0ŸµPµÚwÚï0Ÿï8w|ª0Ÿ¾]0Ÿ]nwŒ0Ÿ`úAü0ŸAüSüPSüàü^àüˆý0Ÿˆý˜ýP˜ýÊý^Êýþ0Ÿþ¸þ^¸þàþ0ŸàþäþPäþ#ÿ^àÿ0Ÿï ^ f0Ÿp0Ÿ™P™¸0Ÿ¸Ï^Ïg0Ÿg|P|0Ÿ'P'’^’)0Ÿ)FPFp^pL0ŸL[^[Æ0ŸÆèPèµ0ŸµÚPÚï0Ÿï|^|ª0Ÿ¾]0Ÿ]^Œ0Ÿ`ú%ü0Ÿ%ü:üP:ü•ü‘¨àüþ0Ÿþ¸þ‘¨¸þÿ0Ÿÿ#ÿZàÿ0Ÿïú‘¨ f0ŸpR0ŸRgPg|‘¨|.0Ÿ.DPDaZa’w’F0ŸFSwpL0ŸV[Z[ï0ŸïP8Z|ª0Ÿ¾]0Ÿ]pZpwŒ0Ÿ`ú¢û0ŸvüüY\ýÜý0ŸÜý8þ]Lþ}þ0Ÿþ£þY£þ¸þ‘¸àþÿ0Ÿÿ~ÿ]àÿß]ú ]p€]€™0Ÿ™¸]¸Ï0ŸÏß]<0Ÿ|=0Ÿ]’\ F0ŸFS\Sô]ôL0Ÿˆ0Ÿ]/0Ÿ-ò]ò*0Ÿ*O]O]0Ÿ]]Œ0Ÿ`ú ü0Ÿ üÈüPÈüRýSRýlý0ŸlýýPý˜ýS˜ý¸þ0Ÿ¸þÔþSÔþàþ0ŸàþïþSïþÿ0Ÿÿ#ÿSàÿ0Ÿï0ŸPpSpO0Ÿ]’0Ÿ’ S )P)FSFL0ŸL[P[0ŸrSrª0Ÿ¾]0Ÿ]SŒ0Ÿ—û¢û0Ÿ¢ûÀû‘ Àû0þ‘ #Ÿ8þFþrŸFþLþ‘ #Ÿ}þÿ‘ #Ÿàÿ‘ #Ÿï‘ #Ÿ<|‘ #Ÿ=’0Ÿ’F‘ #ŸFS0ŸL[‘ #Ÿ[‚R‚ˆ‘ Æè‘ #Ÿ/‘ #ŸF0ŸF|1Ÿ]0Ÿ`úü0ŸüüPüàü‘ø~àüþ0Ÿþ¸þ‘ø~¸þÿ0Ÿÿ#ÿ‘ø~àÿ0Ÿï ‘ø~ f0Ÿp<0Ÿ<RPR|‘ø~|j0Ÿj’P’F0ŸFSPS鑸~éL0ŸL[‘ø~[0Ÿ‘ø~S0ŸSwPwò‘ø~ò*0Ÿ*O‘ø~OŒ0ŸªúÚúeÚú&û ‘€ö)sö)ŸLw/H ‘€ö)sö)ŸÚïwòögö*wµúÞúdÞú&û ‘ˆö)s ö)Ÿ/H ‘ˆö)s ö)ŸÄúóúbóú&û ‘ö)s(ö)Ÿ\ý8þwàþÿwàÿäÿfäÿwp{w€ßw FwÆèw/H ‘ö)s(ö)Ÿ ûûõ)ô)-ÿŸû&ûõ)õ)õ)ô)-ÿŸJûZûõ)ô)-ÿŸZûtûõ)s€ö)+ÿŸÀý8þSLþnþõ)s€ö)+ÿŸüþÿPàÿôÿSpßS6õ)ô)-ÿŸÆÞS/Hõ)õ)õ)ô)-ÿŸHc$‘ ö)‘ø~ö)‘ø~ö)ô)-ÿŸOWõ)s€ö)+ÿŸLü•ü0Ÿ•üÈü1Ÿþ¸þ0Ÿï 0ŸL[1Ÿ`úÿ0Ÿàÿîÿ0Ÿï–0Ÿ¦V0Ÿ[Œ0Ÿ¾ÈTrƒTƒ„ Ъ#ƒT¾ÌSrSŒS¾ÈPrvPv„sƒs$|]]]pÍ0Ÿ| 0Ÿ¾Ñ0Ÿ*O0Ÿp¦R¦Í‘ø~|‹R‹ ‘ø~¾ÊRÊÑ‘ø~*O‘ø~pÍ]| ]¾Ñ]*O]½ÀPÀÍ^*O^{ÍS| S¾ÑS*OSÀûÏûU8þFþUÚûêûTêûîû Ъ#ßñTñö Ъ#&TÚûòûVßöV/VÚûîûQßöQ&QnüüYþ£þY£þ¸þ‘¸àüHý0Ÿ T0Ÿ’°0ŸÙ 0ŸàüHýS TS’°SÙ S3ý;ýP;ýHý_ T_ëüHý] T]’°]Ù ]˜ýÀý^ïþüþ^¢ýÀýpÿŸïþ÷þpÿŸìUìÊ \Ê Ï óUŸÏ à \à ì Uì j \j ± U± ¨ \ÿTÿ S à óTŸà / S/ j óTŸj @ S@ ¸ óTŸ¸ ý Sý $ óTŸ$ £ S£ ¨ óTŸÿQÿà óQŸà ì Qì j óQŸj µ Qµ @ ]@ ¸ óQŸ¸ ý ]ý $ óQŸ$ £ ]£ ¨ óQŸ ® ‘˜N j ‘˜@ D dD ¸ ‘˜ý $ ‘˜I Y bX j bj „ ‘ }  c„ ˜ c˜ ¸ ‘¨²® 0ŸÏ ( 0Ÿ( N  ‰ŸN ³ 0Ÿ³ ¸  ‰Ÿ¸ ñ 0Ÿñ ý  ‰Ÿý  0Ÿ š  ‰Ÿš £ 0Ÿ²® 0ŸÏ ( 0Ÿ( N  X ŸN ³ 0Ÿ³ ¸  X Ÿ¸ ñ 0Ÿñ ý  X Ÿý  0Ÿ š  X Ÿš £ 0Ÿ²® 0ŸÏ ( 0Ÿ( /  à/Ÿ/ F TN ³ 0Ÿ³ ¸  Ü/Ÿ¸ ñ 0Ÿñ ý  Í/Ÿý  0Ÿ š  È/Ÿš £ 0Ÿ½ Ü PÜ ë ~Ÿë @ ^¸ ý ^$ š ^š £ ~Ÿà ì Vt @ V¸ ý V$ £ V¸ ñ 2Ÿ¸ ñ 3Ÿ¸ ñ 1Ÿ¸ ñ  C Ÿ¸ ý 3Ÿ¸ ñ  » ŸT  1ŸT  3ŸT   C ŸT š 3ŸT   » Ÿ Ÿ c Ÿ b ® ‘˜ý $ ‘˜ ® \ý $ \ ® 0Ÿý $ 0Ÿ ¥ 0Ÿ¥ ® Pý  P ® 0Ÿý $  ‰Ÿ ® 0Ÿý $  X Ÿ ® 0Ÿý $  ö/Ÿì  sì ( 3Ÿì ( 1Ÿì (  C Ÿì / 3Ÿì (  » Ÿ° è Uè ‹ V‹  óUŸ *V*oóUŸowVwçóUŸçUÙVÙàóUŸàðVð óUŸ VóUŸ3V3­óUŸ­æVæûóUŸû7V7|óUŸ|ŠVŠœUœ¸V¸¿óUŸ¿ÐVÐ×óUŸ×ùVù óUŸ VóUŸÏVÏÖóUŸÖV óUŸ 8V8YóUŸYÄVÄäóUŸäèUèñV° è aè jwjoóõ)ŸoçwçaGwGàóõ)Ÿàðwðûóõ)Ÿû°w°Åóõ)ŸÅ w óõ)Ÿ[w[róõ)Ÿr|w|­óõ)Ÿ­ûwû7óõ)Ÿ7twt|óõ)Ÿ|ŠwŠœaœ¿w¿ùóõ)Ÿù w ?óõ)Ÿ?YwYÄóõ)ŸÄÉwÉäóõ)Ÿäèaèñw° è bè j‘ˆjoóõ)Ÿo瑈çbg‘ˆgàóõ)Ÿà ‘ˆ óõ)Ÿû‘ˆû7óõ)Ÿ7Š‘ˆŠœbœ×‘ˆ×ùóõ)Ÿù ‘ˆ ?óõ)Ÿ?Y‘ˆYÄóõ)ŸÄ䑈äèbèñ‘ˆ° è cè j‘joóõ)Ÿoç‘çc¦‘¦àóõ)Ÿà ‘ óõ)Ÿû‘û7óõ)Ÿ7Š‘Šœcœ×‘×ùóõ)ŸùD‘D?óõ)Ÿ?Y‘YŽóõ)ŸŽ ‘ Äóõ)ŸÄä‘äècèñ‘° è Tè çóTŸçþTþñóTŸ° @ 0Ÿ@ G PG S _  S/oSor0ŸrçSçà0ŸàûSû_ S 0Ÿ­S­æ0ŸæûSû70Ÿ7|S|ù0Ÿù S ?0Ÿ?YSYÄ0ŸÄäSäñ0Ÿ° ‹ 0Ÿ‹ © ]©  V *0Ÿ*ÕVñ V/_Vo|0Ÿ|çVçð0Ÿð V 0ŸV30Ÿ3­V­æ0ŸæûVû70Ÿ7|]|ù0Ÿù V ?0Ÿ?Y]YÄ0ŸÄä]äñ0Ÿñú žúa/>a>Fwàúaúwt|a° è 0Ÿ: @ P@ z 0Ÿz  \ *0Ÿ*Æ\FO\r|0Ÿ|ç\ç 0Ÿàû0Ÿû \\30Ÿ3­\æû\7K\K|0ŸŠ¥0Ÿù \?I0ŸIY\Äñ0Ÿ° ¤ 0Ÿ¤ ¹ V¹ G0Ÿû _ *0Ÿ*?V_j0ŸjÆ^FO^o|0Ÿ©û0Ÿû_?°0ŸÅ˜0ŸàP0Ÿrû0Ÿ7×0Ÿùº0ŸÖí0Ÿ?ñ0Ÿ° \0Ÿ\{T”˜T˜½‘°½j0Ÿj{TFmTm†‘˜o©0Ÿ©ÍTÍç‘°ç70Ÿ7KPKkwà?0ŸT 0Ÿ3æ0Ÿæû‘°û¥0Ÿ¥¿P¿×w× 0Ÿ”Ê0ŸÖŽ0ŸÄñ0Ÿ° 70Ÿ7NPN{Qßu0ŸuP¤Q¤±‘ ÄÌQÒL0Ÿ_j0Ÿj{QFmQm†‘o©0Ÿ©ÍQÍ瑨çR0ŸRoPo¯wà?0Ÿ?XQX„‘°„»0ŸÅ 0Ÿ30ŸPæ0Ÿû¿0Ÿ¿×P× 0Ÿ Dw”Ê0ŸÖŽ0ŸŽ©wÄñ0Ÿ° 0Ÿ0P0{‘¨ß_0Ÿ_jPj{[Fm[m†‘ˆo©0Ÿ©Æ‘¨çv0Ÿv‘P‘³[³àwà?0Ÿ?O‘¨„»0ŸÅ 0Ÿ w30Ÿ‘¨æ0Ÿû 0Ÿ PD[”Ê0ŸÖŽ0ŸŽ«[«Ä‘ˆÄñ0Ÿ° Ü 0Ÿq{Z”˜Z˜Ì‘¸[_0Ÿ_ñSñ?0Ÿ?_Sj{XFmXm†wo|0Ÿ©ÍZÍ瑸çŠ0Ÿ¯Ñ\ÑàXà/0Ÿ/?ST„‘ ÅÞ0Ÿ X­0Ÿ30Ÿ­æ0Ÿæû‘¸û 0Ÿ70Ÿ9DX\`X`”w Y0ŸŽ«X«ÄwÄñ0Ÿ° Ÿ0ŸŸÌPÌQ_Qá0Ÿá_D0ŸLj0ŸjÆ_FO_o0Ÿ©_©œ0Ÿ¯0Ÿ?_?_0Ÿ_PÅ_Å30Ÿ3­_­æ0ŸæûPû#0Ÿ#€_€Ê0ŸÖŽ0ŸŽÄ_Äñ0Ÿ ‹ 0Ÿ‹ © ‘˜© ‘˜#Ÿ*9rŸ9j‘˜#Ÿ|瑘#ŸŠà0Ÿû ‘˜#Ÿ 0Ÿ‘˜#Ÿ3­‘˜#Ÿæû‘˜#Ÿ7KRK|‘˜ù ‘˜#Ÿ\0Ÿ\”1Ÿ?I‘˜ISRSY‘˜ŽÄ0ŸÄ䑘° ú 0Ÿú Pß]ß_0Ÿ_Æ]FO]o©0Ÿ©ç]çº0ŸºàPà?0Ÿ?„]„»0ŸÅõ0ŸõP£]£0Ÿ]æ0Ÿæû]û0Ÿ7]7g0ŸgP ] Y0ŸYŽ]Žñ0ŸY i aàäaÆÖadta a?wÄÍaÍäwG”0Ÿ”Ì1Ÿ©ç0Ÿ?„0Ÿæû1Ÿª±PÌ]?_]û?]° j0Ÿor0Ÿ|ð0Ÿû.0Ÿ.3‰Ÿ3ñ0Ÿ° j0Ÿor0Ÿ|ð0Ÿû.0Ÿ.3 X Ÿ3ñ0Ÿ° j0Ÿor0Ÿ|ð0Ÿû.0Ÿ.3 sŸ3ñ0ŸþTŠ›T›œ Ъ#äèTþU VŠœUœ¥VäèUèñVþPŠŽPŽœuäèu1DXŽ«X«Äw3˜0Ÿ”º0ŸÖí0ŸYŽ0Ÿ3˜]”º]Öí]YŽ]3iX”¨X¨ºwÖæXæíw„‹P‹˜SYŽS>„S”ºSÖíS© ú ]*?]Åæ]ù ]Ä Ô TÔ Ø  Ъ#ÅÙTÙÞ Ъ#ùTÄ Ü VÅÞVù VÄ Ø QÅÞQùQi{Z©ÍZÍ瑸ßG0Ÿ„°0Ÿ3P0Ÿr­0ŸßG_„°_3P_r­_ßZ„Z°‘ 3IZIP‘ 2:P:G^r­^êG]„°]3P]r­]wP¤Q¤ª‘ ÄÌQ¤pÿŸÄÌpÿŸSûS\U\:\:?óUŸ?P\P\U\Ú\Ú!U!\oTovSvPóTŸPŸSŸÚóTŸÚ°S°(óTŸ(mSm”óTŸ”SóTŸoQoPóQŸP\Q\ÚóQŸÚ%Q%°]°(óQŸ(m]m”óQŸ”]óQŸ‹‘˜¾Ú‘˜°´d´(‘˜m”‘˜¹ÉbÈÚbÚô‘ íýcôc(‘¨"0Ÿ?˜0Ÿ˜¾†Ÿ¾#0Ÿ#(†Ÿ(a0Ÿam†Ÿmý0Ÿý †Ÿ 0Ÿ"0Ÿ?˜0Ÿ˜¾ X Ÿ¾#0Ÿ#( X Ÿ(a0Ÿam X Ÿmý0Ÿý  X Ÿ 0Ÿ"0Ÿ?˜0Ÿ˜Ÿ +ŸŸ¶T¾#0Ÿ#( 'Ÿ(a0Ÿam Ÿmý0Ÿý  Ÿ 0Ÿ-LPL[~Ÿ[°^(m^” ^ ~ŸP\Vä°V(mV”V(a2Ÿ(a3Ÿ(a1Ÿ(a C Ÿ(m3Ÿ(a » ŸÄý1ŸÄý3ŸÄý C ŸÄ 3ŸÄý » Ÿýcýbý‘˜m”‘˜ý\m”\ý0Ÿm”0Ÿý0ŸPmŒPý0Ÿm”†Ÿý0Ÿm” X Ÿý0Ÿm” AŸ\ss\˜3Ÿ\˜1Ÿ\˜ C Ÿ\Ÿ3Ÿ\˜ » Ÿ YUY4S4Ì!óUŸÌ!¥"S¥"˜#óUŸ˜#×#S×#Ì&óUŸÌ&Ÿ'SŸ'È)óUŸÈ).*S.**óUŸ*È*SÈ*á*óUŸá*ö*Sö*+óUŸ+.+S.+A+óUŸA+F+SF+“,óUŸ“,·,S·,Ù,óUŸÙ, -S - -óUŸ YaYÍ"‘€Í"˜#óõ)Ÿ˜#×#‘€×#ÿ#óõ)Ÿÿ#9$‘€9$ï$óõ)Ÿï$ö&‘€ö&'a'©'‘€©'â'óõ)Ÿâ'Ž(‘€Ž(Œ)óõ)ŸŒ)H*‘€H**óõ)Ÿ*ž*‘€ž*°*a°*+‘€++óõ)Ÿ+r+‘€r+“,óõ)Ÿ“,Ù,‘€Ù,Ý,aÝ, -‘€ - -óõ)Ÿ YbYö&‘ˆö&'b'ž*‘ˆž*°*b°*Ù,‘ˆÙ,Ý,bÝ, -‘ˆ YcYö&‘ö&'c'ž*‘ž*°*c°*Ù,‘Ù,Ý,cÝ, -‘ YTYö&óTŸö&'T' -óTŸ„šbš ‘€ö)sö)ŸÌ!" ‘€ö)sö)Ÿ˜#®# ‘€ö)sö)Ÿ“,¦, ‘€ö)sö)Ÿæ,ï, ‘€ö)sö)Ÿ„ždž ‘ˆö)s ö)ŸÌ!" ‘ˆö)s ö)Ÿ˜#®# ‘ˆö)s ö)Ÿ“,¦, ‘ˆö)s ö)Ÿæ,ï, ‘ˆö)s ö)Ÿ„³c³ ‘ö)s(ö)ŸÌ!" ‘ö)s(ö)Ÿ˜#®# ‘ö)s(ö)Ÿ“,¦, ‘ö)s(ö)Ÿæ,ï, ‘ö)s(ö)Ÿ· e <‘€ö)sö)sèö)‘ˆö)s ö)sðö)"‘ö)s(ö)søö)"ŸÌ!ë!eë!õ!<‘€ö)sö)sèö)‘ˆö)s ö)sðö)"‘ö)s(ö)søö)"Ÿõ!"e˜#®#e“,¦,e¦,·,wæ,ï,eÇfÌ!"f˜#®#f“,¦,f¦,·,‘ø~æ,ï,fï,þ,wËÜbÜçaçbÌ!ç!aõ!"b˜#®#a“,¦,bæ,ï,a/"…"bÈ)Ü)bP"X"aX" "wþ, -w’!wÀ!Ì!wð!õ!e "¥"a¥"Í"wï$”%wà%ë%wð%?&wO&æ&wâ' (w)(Ž(wŒ)È)w.*H*w**w "C"a³#·#bÈ)Ô)a 40Ÿ4RURÌ!VÌ!¥"0Ÿ¥"6#Vn#„#V˜#×#0Ÿ×#ï#Vÿ#Ì&VÌ&â'0Ÿâ'Ž(VŽ(Œ)0ŸŒ)›)V›)À)UÀ)È)VÈ).*0Ÿ.*H*VH**0Ÿ**V* -0Ÿc#n# žn##w#˜#‘ð~q)Œ)w $0Ÿ$Ì!\Ì!¥"0Ÿ¥"6#\˜#×#0Ÿ×#ï#\ÿ#Ì&\Ì&'0Ÿâ'Ž(\Œ)È)\È)ô)0Ÿ.*H*\**\ž*¹*0Ÿ“,·,0ŸÙ, -0Ÿ M0ŸMaVaÐ 0Ÿt!À!0ŸÀ!Ì!VÌ!¥"0ŸÍ"Û"_˜#×#0Ÿÿ#9$0Ÿ%H%0Ÿ_%Ä%0Ÿà%ð%0Ÿ?&(0Ÿ)(S(0ŸŽ( )0Ÿq)–)0Ÿ–)›)P›).*0Ÿ*+0Ÿ+Ã+0Ÿä+,0ŸS, -0Ÿ ó0Ÿó T' + T+ K ‘°K Í"0ŸÍ"Û"T˜#×#0Ÿÿ#9$0Ÿï$%0Ÿ%3%T3%H%‘°H%_%0Ÿj%H'0ŸH'\'P\'­'wâ'Ž(0Ÿ¸(Œ)0ŸŒ)–)‘°–)›)T›)¹*0Ÿ¹*á*Pá*+w++0Ÿ+h+w°+·,0Ÿ·,È,wÙ, -0Ÿ Ó0ŸÓåPår ^r !0Ÿ! !P !R!^R!¥"0Ÿ¥"Û"^˜#×#0Ÿÿ#9$0Ÿï$%0Ÿ%H%^H%T%PT%%^%Ö%0Ÿà%&0Ÿ& &P &(&0Ÿ(&?&^?&·&0Ÿ·&Ì&PÌ&c'0Ÿc'w'Pw'â'^â'q(0Ÿq(Ž(PŽ(¸(^¸(Œ)0ŸŒ)›)^›).*0Ÿ.*H*PH*á*0Ÿá*+P++0Ÿ+°+^°+·,0Ÿ·,Ù,^Ù, -0Ÿ - -^ ·0Ÿ·ÌPÌ' ‘¨r Í"0ŸÍ"Û"Z˜#×#0Ÿÿ#9$0Ÿï$%0Ÿ%H%‘¨H%_%0Ÿ_%j%‘¨%Ö%0Ÿà%¢&0Ÿ¢&·&P·&Ì&‘¨Ì&~'0Ÿ~'”'P”'±'Z±'â'wâ'Ž(0ŸŽ(›(w¸(Œ)0Ÿ–)›)Z›)+0Ÿ+A+PA+h+Z°+·,0Ÿ·,Ê,ZÊ,Ù,wÙ, -0Ÿ 40Ÿ  Yä d!0Ÿd!À!]Ì!Í"0ŸÍ"6#]˜#×#0Ÿ×#ï#]ÿ#ï$]%3%Y3%H%‘¸H%_%0Ÿj%%]à%ð%]ð% &0Ÿ &(&](&?&0Ÿ?&O&]Ì&'0Ÿ­'â'\S(Ž(0ŸŽ(›(\›(4)]4)Œ)0ŸÈ)`*0Ÿ`**]*A+0Ÿ]+,],S,0ŸS,“,]“,·,0Ÿ·,Ù,]Ù, -0Ÿ - -] 2 0Ÿ2 Z PZ Ú SÚ ô 0Ÿô  !P ! !S !Í"0ŸÍ"Û"S˜#×#0Ÿÿ#9$0Ÿï$ÿ$0Ÿÿ$%S%H%0ŸH%_%S_%u%0Ÿu%‹%P‹%à%Sà%Ÿ'0Ÿ­'â'0Ÿâ'S(SS(q(Pq(Ž(SŽ(Œ)0ŸŒ)›)P›)F+0ŸF+¦+S¦+·,0Ÿ·,Ù,SÙ, -0Ÿ - -S)40Ÿ4R‘˜R¸!‘˜#ŸÀ!Æ!rŸÆ!Ì!‘˜#Ÿ¥"Í"‘˜#Ÿÿ#9$‘˜#Ÿï$Ì&‘˜#Ÿ'â'0Ÿâ'Ž(‘˜#ŸŽ(›(0ŸŒ)›)‘˜#Ÿ›)Â)RÂ)È)‘˜.*H*‘˜#Ÿ**‘˜#ŸA+v+0Ÿv+°+1Ÿ·,Ù,0Ÿ - -1Ÿ  0Ÿ °P°r ‘ø~r Í"0ŸÍ"Û"‘ø~˜#×#0Ÿÿ#9$0Ÿï$%0Ÿ%H%‘ø~H%_%0Ÿ_%%‘ø~%Ö%0Ÿà%†&0Ÿ†&¢&P¢&Ì&‘ø~Ì&º'0Ÿº'â'Pâ'Ž(0ŸŽ(›(P›())‘ø~))Œ)0ŸŒ)›)‘ø~›)o*0Ÿo**‘ø~*ƒ+0Ÿƒ+«+P«+,‘ø~,S,0ŸS,“,‘ø~“, -0Ÿ - -Pjšbš ‘€ö)sö)ŸÌ!" ‘€ö)sö)Ÿ˜#®# ‘€ö)sö)ŸR)Œ)w++w,",f",S,w“,¦, ‘€ö)sö)Ÿæ,ï, ‘€ö)sö)Ÿuždž ‘ˆö)s ö)ŸÌ!" ‘ˆö)s ö)Ÿ˜#®# ‘ˆö)s ö)Ÿ“,¦, ‘ˆö)s ö)Ÿæ,ï, ‘ˆö)s ö)Ÿ„³c³ ‘ö)s(ö)Ÿä À!wÌ!" ‘ö)s(ö)Ÿ¥"Í"w˜#®# ‘ö)s(ö)Ÿÿ#$g$9$wH%_%wà%ë%wð%O&wS(Ž(w.*H*w“,¦, ‘ö)s(ö)Ÿæ,ï, ‘ö)s(ö)ŸËÜõ)ô)-ÿŸÜûõ)ô)-ÿŸûPH!À!SÌ!ç!õ)sØö)-ÿŸõ!"P/"l"õ)ô)-ÿŸl"›"P´"Í"P˜#¤# õ)õ)-ÿŸ¤#®#õ)sØö)-ÿŸÿ#$Sà%O&SÈ)Ü)õ)ô)-ÿŸ.*>*S“,¦,Pæ,ï,õ)sØö)-ÿŸþ,-Pçû õ)õ)-ÿŸûPõ!"PX"l" õ)õ)+ÿŸl"›"P“,¦,Pþ,-PÞ' 0Ÿ' Z 1Ÿ%H%0Ÿ_%%0ŸŒ)›)1Ÿ Í"0Ÿ˜#×#0Ÿÿ#$0Ÿï$æ&0Ÿö&–)0Ÿ›) -0Ÿ''Tž*¯*T¯*°* Ȫ#Ù,Ý,T''Sž*¹*SÙ,æ,S''Pž*¢*P¢*°*sÙ,Ý,sT+°+]·,Ù,] - -]¸( )0Ÿ°+Ã+0Ÿä+,0ŸS,“,0Ÿ¸(î(Rî( )‘ø~°+¼+R¼+Ã+‘ø~ä+ó+Ró+,‘ø~S,“,‘ø~¸( )]°+Ã+]ä+,]S,“,]ý()P) )_S,“,_Ã( )S°+Ã+Sä+,SS,f,Sx,“,SRaUÀ!Æ!Ul|T|€ Ъ#k&&T&†& Ъ#*†*Tl„Vk&†&V**Vl€Qk&†&Q*†*Q  Y%3%Y3%H%‘¸r Ð 0Ÿ%Ä%0Ÿâ'(0Ÿ)(S(0Ÿr Ð S%Ä%Sâ'(S)(S(S» ¾ P¾ Ð _%Ä%_} Ð ]%Ä%]â'(])(S(] !H!^¥"´"^*!H!pÿŸ¥"¯"pÿŸ -|-U|-Z.\Z._.óUŸ_.p.\p.|.U|.ú.\ú.A/UA/81\ --T-–-S–-p.óTŸp.¿.S¿.ú.óTŸú.Ð/SÐ/H0óTŸH00S0´0óTŸ´031S3181óTŸ --Q-p.óQŸp.|.Q|.ú.óQŸú.E/QE/Ð/]Ð/H0óQŸH00]0´0óQŸ´031]3181óQŸ«->.‘˜Þ.ú.‘˜Ð/Ô/dÔ/H0‘˜0´0‘˜Ù-é-bè/ú/bú/0‘  ..c0(0c(0H0‘¨B->.0Ÿ_.¸.0Ÿ¸.Þ. ]ŸÞ.C00ŸC0H0 ]ŸH000Ÿ00 ]Ÿ010Ÿ1*1 ]Ÿ*1310ŸB->.0Ÿ_.¸.0Ÿ¸.Þ. X ŸÞ.C00ŸC0H0 X ŸH000Ÿ00 X Ÿ010Ÿ1*1 X Ÿ*1310ŸB->.0Ÿ_.¸.0Ÿ¸.¿. kBŸ¿.Ö.TÞ.C00ŸC0H0 gBŸH000Ÿ00 XBŸ010Ÿ1*1 SBŸ*1310ŸM/l/Pl/{/~Ÿ{/Ð/^H00^´0*1^*131~Ÿp.|.V/Ð/VH00V´031VH002ŸH003ŸH001ŸH00 B ŸH003ŸH00 » Ÿä011Ÿä013Ÿä01 B Ÿä0*13Ÿä01 » Ÿ./.c./.b.>.‘˜0´0‘˜.>.\0´0\.>.0Ÿ0´00Ÿ.5.0Ÿ5.>.P0¬0P.>.0Ÿ0´0 ]Ÿ.>.0Ÿ0´0 X Ÿ.>.0Ÿ0´0 BŸ|.“.s|.¸.3Ÿ|.¸.1Ÿ|.¸. B Ÿ|.¿.3Ÿ|.¸. » Ÿ@1y1Uy1T2ST2ü4óUŸü4Ì5SÌ5À6óUŸÀ6÷6S÷6ì9óUŸì9¿:S¿:¼<óUŸ¼<ñ<Sñ<0=óUŸ0=Ž=SŽ=ï=óUŸï=(>S(>A>óUŸA>V>SV>>óUŸ>Ž>SŽ>¡>óUŸ¡>¦>S¦>þ?óUŸþ?"@S"@D@óUŸD@w@Sw@‹@óUŸ@1y1ay1õ5‘€õ5À6óõ)ŸÀ6÷6‘€÷67óõ)Ÿ7Y7‘€Y78óõ)Ÿ8:‘€:8:a8:É:‘€É:;óõ)Ÿ;¶;‘€¶;¼<óõ)Ÿ¼<¨=‘€¨=ß=óõ)Ÿß=þ=‘€þ=>a>f>‘€f>>óõ)Ÿ>Ò>‘€Ò>þ?óõ)Ÿþ?D@‘€D@H@aH@w@‘€w@‹@óõ)Ÿ@1y1by1:‘ˆ:8:b8:þ=‘ˆþ=>b>D@‘ˆD@H@bH@‹@‘ˆ@1y1cy1:‘:8:c8:þ=‘þ=>c>D@‘D@H@cH@‹@‘@1y1Ty1:óTŸ:.:T.:‹@óTŸ¤1º1bº102 ‘€ö)sö)Ÿü465 ‘€ö)sö)ŸÀ6Î6 ‘€ö)sö)Ÿþ?@ ‘€ö)sö)ŸQ@Z@ ‘€ö)sö)Ÿ¤1¾1d¾102 ‘ˆö)s ö)Ÿü465 ‘ˆö)s ö)ŸÀ6Î6 ‘ˆö)s ö)Ÿþ?@ ‘ˆö)s ö)ŸQ@Z@ ‘ˆö)s ö)Ÿ¤1Ó1cÓ102 ‘ö)s(ö)Ÿü465 ‘ö)s(ö)ŸÀ6Î6 ‘ö)s(ö)Ÿþ?@ ‘ö)s(ö)ŸQ@Z@ ‘ö)s(ö)Ÿ×1+2e+202<‘€ö)sö)sèö)‘ˆö)s ö)sðö)"‘ö)s(ö)søö)"Ÿü45e5%5<‘€ö)sö)sèö)‘ˆö)s ö)sðö)"‘ö)s(ö)søö)"Ÿ%565eÀ6Î6eþ?@e@"@wQ@Z@eç102fü465fÀ6Î6fþ?@f@"@‘ø~Q@Z@fZ@i@wë1ü1bü12a202bü45a%565bÀ6Î6aþ?@bQ@Z@a_5Ì5b¼<Ñ<b0=<=b€5ˆ5aˆ5Ç5w¼<ì<wi@w@w02¼4wê4ü4w 5%5e¤5Ç5wÌ5õ5w8´8w9 9w9_9wo9:w;+;wI;¶;wì<ñ<añ<0=wŽ=¨=wß=ï=w;5s5aÓ6×6b0=4=a@1T20ŸT2r2Ur2ü4Vü4Ì50ŸÌ5^6V–6¬6VÀ6÷60Ÿ÷67V7ì9Vì9;0Ÿ;¶;V¶;ñ<0Ÿñ<=V=(=U(=0=V0=Ž=0ŸŽ=¨=V¨=ß=0Ÿß=ï=Vï=‹@0Ÿ‹6–6 ž–6µ6wµ6À6‘ð~¡<¼<w@1D20ŸD2ü4\ü4Ì50ŸÌ5^6\À6÷60Ÿ÷67\7ì9\ì9<:0Ÿ;¶;\¼<ñ<0Ÿñ<0=\0=T=0ŸŽ=¨=\ß=ï=\þ=>0Ÿþ?"@0ŸD@w@0Ÿ@1m20Ÿm22V2ú30Ÿž4ê40Ÿê4ü4Vü4Ì50Ÿõ56_À6÷60Ÿ7Y70Ÿ98h80Ÿ8ä80Ÿ990Ÿ_9 ;0ŸI;};0Ÿ¶;=<0Ÿ¡<þ<0Ÿþ<=P=Ž=0Ÿß=f>0Ÿ>#?0ŸD?h?0Ÿ¾?‹@0Ÿ@130Ÿ333TG3K3TK3k3‘°k3õ50Ÿõ56TÀ6÷60Ÿ7Y70Ÿ8980Ÿ98S8TS8h8‘°h880ŸŠ8h:0Ÿh:|:P|:Í:w;¶;0Ÿà;ñ<0Ÿñ<þ<‘°þ<=T=>0Ÿ>A>PA>f>wf>>0Ÿ>È>w?"@0Ÿ"@3@wD@w@0Ÿ@1ó20Ÿó23P3’3^’3:40Ÿ:4J4PJ4|4^|4Ì50ŸÌ56^À6÷60Ÿ7Y70Ÿ8980Ÿ98h8^h8t8Pt8°8^°8ö80Ÿ9 90Ÿ 9)9P)9H90ŸH9_9^_9×90Ÿ×9ì9Pì9ƒ:0Ÿƒ:—:P—:;^;™;0Ÿ™;¶;P¶;à;^à;ñ<0Ÿñ<=^=Ž=0ŸŽ=¨=P¨=A>0ŸA>f>Pf>>0Ÿ>?^?"@0Ÿ"@D@^D@w@0Ÿw@‹@^@1×20Ÿ×2ì2Pì2G3‘¨’3õ50Ÿõ56ZÀ6÷60Ÿ7Y70Ÿ8980Ÿ98h8‘¨h880Ÿ8Š8‘¨°8ö80Ÿ9Â90ŸÂ9×9P×9ì9‘¨ì9ž:0Ÿž:´:P´:Ñ:ZÑ:;w;¶;0Ÿ¶;Ã;wà;ñ<0Ÿþ<=Z=>0Ÿ>¡>P¡>È>Z?"@0Ÿ"@5@Z5@D@wD@w@0Ÿ@1T20Ÿ(333Y4Ž40ŸŽ4ê4]ü4õ50Ÿõ5^6]À6÷60Ÿ÷67]78]98S8YS8h8‘¸h880ŸŠ8°8]99]9)90Ÿ)9H9]H9_90Ÿ_9o9]ì9­:0ŸÍ:;\};¶;0Ÿ¶;Ã;\Ã;d<]d<ñ<0Ÿ0=À=0ŸÀ=ß=]ï=¡>0Ÿ½>†?]†?¾?0Ÿ¾?þ?]þ?"@0Ÿ"@D@]D@w@0Ÿw@‹@]@1R30ŸR3z3Pz34S440Ÿ434P34J4SJ4õ50Ÿõ56SÀ6÷60Ÿ7Y70Ÿ880Ÿ898S98h80Ÿh88S8•80Ÿ•8«8P«89S9¿:0ŸÍ:;0Ÿ;};S};™;P™;¶;S¶;ñ<0Ÿñ<=P=¦>0Ÿ¦>?S?"@0Ÿ"@D@SD@w@0Ÿw@‹@SI2T20ŸT2r2‘˜r2â4‘˜#Ÿê4ö4rŸö4ü4‘˜#ŸÌ5õ5‘˜#Ÿ7Y7‘˜#Ÿ8ì9‘˜#Ÿ­:;0Ÿ;¶;‘˜#Ÿ¶;Ã;0Ÿñ<=‘˜#Ÿ=*=R*=0=‘˜Ž=¨=‘˜#Ÿß=ï=‘˜#Ÿ¡>Ö>0ŸÖ>?1Ÿ"@D@0Ÿw@‹@1Ÿ@1À20ŸÀ2Ð2PÐ2’3‘ø~’3õ50Ÿõ56‘ø~À6÷60Ÿ7Y70Ÿ8980Ÿ98h8‘ø~h880Ÿ8°8‘ø~°8ö80Ÿ9¦90Ÿ¦9Â9PÂ9ì9‘ø~ì9Ú:0ŸÚ:;P;¶;0Ÿ¶;Ã;PÃ;Y<‘ø~Y<ñ<0Ÿñ<=‘ø~=Ï=0ŸÏ=ß=‘ø~ß=ã>0Ÿã> ?P ?†?‘ø~†?¾?0Ÿ¾?þ?‘ø~þ?w@0Ÿw@‹@PŠ1º1bº102 ‘€ö)sö)Ÿ4ê4wü465 ‘€ö)sö)ŸÌ5õ5wÀ6Î6 ‘€ö)sö)Ÿ7$7g$7Y7wh88w9 9w9o9w};¶;w‚<¼<wŽ=¨=wf>>w†?Š?fŠ?¾?wþ?@ ‘€ö)sö)ŸQ@Z@ ‘€ö)sö)Ÿ•1¾1d¾102 ‘ˆö)s ö)Ÿü465 ‘ˆö)s ö)Ÿ½5Ç5wÀ6Î6 ‘ˆö)s ö)Ÿþ?@ ‘ˆö)s ö)ŸQ@Z@ ‘ˆö)s ö)Ÿ¤1Ó1cÓ102 ‘ö)s(ö)Ÿü465 ‘ö)s(ö)Ÿ½5Â5eÀ6Î6 ‘ö)s(ö)Ÿþ?@ ‘ö)s(ö)ŸQ@Z@ ‘ö)s(ö)Ÿë1ü1õ)ô)-ÿŸü12õ)ô)-ÿŸ202Pr4ê4Sü45õ)sØö)-ÿŸ%565P_5œ5õ)ô)-ÿŸœ5¤5P¤5Ç5wö)ô)-ÿŸÜ5õ5PÀ6Ä6 õ)õ)-ÿŸÄ6Î6õ)sØö)-ÿŸ747S9o9S¼<ç<P0=<=õ)ô)-ÿŸŽ=ž=Sþ?@PQ@Z@õ)sØö)-ÿŸi@q@P22 õ)õ)-ÿŸ202P%565Pˆ5œ5 õ)õ)+ÿŸœ5Ì5P¼<ç<Pþ?@Pi@q@Pþ2G30ŸG3z31Ÿ98h80Ÿ8°80Ÿñ<=1Ÿ@1õ50ŸÀ6÷60Ÿ7.70Ÿ8:0Ÿ:þ<0Ÿ=‹@0Ÿ.:8:Tþ=>T>> Ъ#D@H@T.:<:Sþ=>SD@Q@S.:8:Pþ=>P>>sD@H@s´>?]"@D@]w@‹@]à;=<0Ÿ?#?0ŸD?h?0Ÿ¾?þ?0Ÿà;<R<=<‘ø~??R?#?‘ø~D?W?RW?h?‘ø~¾?þ?‘ø~à;=<]?#?]D?h?]¾?þ?]-<0<P0<=<^¾?þ?^ë;=<S?#?SD?h?S¾?Ñ?Sã?þ?Sr22Uê4ö4UŒ2œ2Tœ2 2 Ъ#‹9¡9T¡9¦9 Ъ#ß=æ=TŒ2¤2V‹9¦9Vß=ï=VŒ2 2Q‹9¦9Qß=æ=Q 333Y98S8YS8h8‘¸’3ú30Ÿ°8ä80Ÿ; ;0ŸI;};0Ÿ’3ú3S°8ä8S; ;SI;};Så3í3Pí3ú3_°8ä8_3ú3]°8ä8]; ;]I;};]J4r4^Ì5Ü5^T4r4pÿŸÌ5×5pÿŸ@ì@Uì@ÊA\ÊAÏAóUŸÏAàA\àAìAUìAjB\jB±BU±B¨D\@ÿ@Tÿ@ASAàAóTŸàA/BS/BjBóTŸjB@CS@C¸CóTŸ¸CýCSýC$DóTŸ$D£DS£D¨DóTŸ@ÿ@Qÿ@àAóQŸàAìAQìAjBóQŸjBµBQµB@C]@C¸CóQŸ¸CýC]ýC$DóQŸ$D£D]£D¨DóQŸA®A‘˜NBjB‘˜@CDCdDC¸C‘˜ýC$D‘˜IAYAbXCjCbjC„C‘ }AAc„C˜Cc˜C¸C‘¨²@®A0ŸÏA(B0Ÿ(BNB 3ŸNB³C0Ÿ³C¸C 3Ÿ¸CñC0ŸñCýC 3ŸýCD0ŸDšD 3ŸšD£D0Ÿ²@®A0ŸÏA(B0Ÿ(BNB X ŸNB³C0Ÿ³C¸C X Ÿ¸CñC0ŸñCýC X ŸýCD0ŸDšD X ŸšD£D0Ÿ²@®A0ŸÏA(B0Ÿ(B/B @Ÿ/BFBTNB³C0Ÿ³C¸C @Ÿ¸CñC0ŸñCýC ù?ŸýCD0ŸDšD ô?ŸšD£D0Ÿ½BÜBPÜBëB~ŸëB@C^¸CýC^$DšD^šD£D~ŸàAìAVtB@CV¸CýCV$D£DV¸CñC2Ÿ¸CñC3Ÿ¸CñC1Ÿ¸CñC C Ÿ¸CýC3Ÿ¸CñC » ŸTDD1ŸTDD3ŸTDD C ŸTDšD3ŸTDD » ŸAŸAcAŸAbA®A‘˜ýC$D‘˜A®A\ýC$D\A®A0ŸýC$D0ŸA¥A0Ÿ¥A®APýCDPA®A0ŸýC$D 3ŸA®A0ŸýC$D X ŸA®A0ŸýC$D "@ŸìABsìA(B3ŸìA(B1ŸìA(B C ŸìA/B3ŸìA(B » Ÿ°DåDUåDESEnKóUŸnK~KS~KƒKóUŸƒKðKSðKLóUŸLALSALeLóUŸeL›LS›L¯LóUŸ¯LÅLSÅLNóUŸNNSNNóUŸN1NS1NHNóUŸHN°NS°N*PóUŸ*PmPSmPrPóUŸ°DåDTåDjH‘¨jHŽHóTŸŽHI‘¨IKJóTŸKJƒK‘¨ƒK–KT–KrP‘¨°DåDQåD¯G^¯GÅGóQŸÅGSH^SHŽHóQŸŽHI^IKJóQŸKJ™J^™J¦JóQŸ¦JîJ^îJþJóQŸþJK^K1KóQŸ1K^K^^KnKóQŸnKvK^vKƒKóQŸƒKKQKðK^ðKLóQŸLL^LLóQŸL4L^4LULóQŸUL•M^•M¶MóQŸ¶M N^ NNóQŸNÙN^ÙNêNóQŸêNO^OOóQŸO\O^\OqOóQŸqOzO^zOŒOóQŸŒOÂO^ÂOÊOóQŸÊOaP^aPrPóQŸ°DåDRåDƒK‘°ƒK KR KN‘°N(NR(NNP‘°NPRPRRPrP‘°°DåDXåDƒKóXŸƒK KX KNóXŸN(NX(NNPóXŸNPRPXRPrPóXŸ°DE0ŸEE]E*E_*E¬FS¬F©G_©G¹GSÅG ISzIISKJnKSnKL0ŸLLSLUL0ŸULeLSeL›L0Ÿ›L¯L_¯L1N0Ÿ1NHN_HNSO0ŸSOgO_gOqOSqO…O_…OŒOSŒOÅO_ÅOÊOSÊO*P_*PrP0Ÿ°DzI0ŸzIIV¡I¶M0ŸÛMrP0Ÿ°DåD0ŸòDEPEñF\ñFÅG0ŸÅG I\KJnK\nK|KP|K¤K0ŸLL\L'LP'LeL\›L¯L\ªM¶M\NHN0ŸSOŒO\ŒO*P0ŸNP[P0Ÿ°D E0Ÿ E½FV½FÊF0ŸÊFÙFPÙFñFVñF\G0Ÿ¹G0IVñI%JVKJnKVnKðK0ŸLLVLUL0ŸULeLVeL›L0Ÿ›L¯LV¯LPM0ŸªM¶MV¶MÛM0ŸN1N0ŸHNÈN0ŸêNO0ŸOSO0ŸSOqOPqOŒOVŒO¤O0Ÿ¯OrP0Ÿ°D&E0Ÿ&E9ES9E]F0Ÿ¬FàF0ŸàFùFPùF+GYfGÅG0ŸÅG×GS×GùG0ŸYHyHYyHŽH‘¨¿HI0ŸIIYKJˆJ0Ÿ¦JâJ0ŸþJiK0ŸiKnKPnKÄK0ŸÑKêK\êKðKYL¯L0Ÿ¯L»LY`MÛM0ŸN9N0ŸcNnNY}NNYN°N‘ SOqO0ŸqOŒOPŒOOYO¯O‘˜¯OßOYßOôO‘˜*P>PY>PNP‘ NP[P0Ÿ[PrP‘ °DzE0ŸzE™ET£E§ET§E½E‘˜½E×G0Ÿ×GîGTîGùG‘˜ùGYH0ŸYH_HR_HyHTyHŽH‘˜ŽH¿H0ŸÊHI0ŸIITKJiK0ŸiKnKPnKL0ŸLL‘˜LMN0ŸMNnNT}NNTNœN‘˜œN*P0Ÿ*P>PT>PNP‘˜NP[P0Ÿ[PrP‘˜EE0ŸE*E]*E¥F}Ÿ¥F¦G]ÅGYH}ŸŽHI}ŸKJŸJ}Ÿ¦JôJ}ŸþJ%K}Ÿ1KdK}ŸÄKðK0ŸLL}ŸULeL}Ÿ›L¯L]¯L»L0Ÿ1NHN]HN}N0Ÿ}N°N1ŸSObO]qO€O]ŒOºO]ÊO*P]*PNP0Ÿ[PrP1Ÿ°D\E0ŸEÌE_qF×G0Ÿ×GùG_HYH0ŸYH_HR_HŽH_©H¿H0ŸÊHÎHQÎHôH‘˜I I_KJfJ0ŸSKnK‘˜nKáK0ŸáKðKPðKL_L¯L0Ÿ¯L»LP»LZM_ZMêM0ŸêMN_NˆN0ŸˆN«NP«NSO_SO[P0Ÿ[PrPPeE£E0Ÿ£EÌE1Ÿ×GùG0Ÿ¿HôH0ŸSKnK0ŸLL1Ÿ°D®E0Ÿ®EÌEPÌE+FRgFYH0ŸYHyHRyHŽH‘ ©HÚH0ŸÚHïHPïHôHRôHI0ŸIIRKJfJ0ŸfJJRJ¦J‘˜¦JÊJRÊJâJ‘˜SKnKPnKL0ŸLLPLrP0Ÿ°D¹G0Ÿ¹GÅG7ŸÅGYH0ŸYHŽH]ŽHI0ŸI I]KJiK0ŸiKnK7ŸnK|K0Ÿ|KƒK]ƒKIL0ŸILUL7ŸULªM0ŸªM¶M6Ÿ¶MN0ŸNN]N¯O0Ÿ¯OÊO7ŸÊOrP0Ÿ°D¹G0Ÿ¹GÅG X ŸÅGSH0ŸSHŽH X ŸŽHI0ŸIzI X Ÿ¡IKJ X ŸKJiK0ŸiKnK X ŸnK|K0Ÿ|KƒK X ŸƒKIL0ŸILUL X ŸULªM0ŸªM¶M X Ÿ¶MN0ŸNN X ŸN¯O0Ÿ¯OÊO X ŸÊOrP0Ÿ°D¹G0Ÿ¹GÅG µ ŸÅGSH0ŸSHŽH^ŽHI0ŸI I^KJiK0ŸiKnK ’ ŸnK|K0Ÿ|KƒK^ƒKIL0ŸILUL w ŸULªM0ŸªM¶M b Ÿ¶MN0ŸNN^N¯O0Ÿ¯OÊO ² ŸÊOrP0Ÿ–K KTN'NT'N(N ª#NPRPT–K¤KSN1NSNP[PS–K KPNNPN(NsNPRPs[NnNY*P>PY>PNP‘ éLPM0Ÿ°NÈN0ŸêNO0ŸOSO0ŸéLPM_°NÈN_êNO_OSO_éLMY°NÁNYÁNÈN‘˜êNÿNYÿNO‘˜;MCMPCMPMVOSOVôLPMS°NÈNSêNOSOSOS*E‡E_ÅG×G_¿HÝH_ôHûH_KJfJ_ULeL_DETETTEXE ª#KJaJTaJfJ ª#UL\LTDE\ESKJfJSULeLSDEXEQKJfJQUL\LQ‡EÌE_×GùG_LL_õE]F0ŸfJˆJ0Ÿ¦JâJ0ŸþJSK0ŸõE+FRfJJRJˆJ‘˜¦JÊJRÊJâJ‘˜õE]F_fJˆJ_¦JâJ_þJSK_HFPFPPF]FYþJKYKSK‘ F+FYfJJY¦JÊJYÊJâJ‘ qF—FYH3HY3H4H‘˜qF—F\H4H\qF²F\H_H\©H¿H\vF’FP’F—FpŸH3HPñF\G0ŸŒO¤O0ŸÊO*P0ŸñFùFPùF+GYŒOOYO¤O‘˜ÊOßOYßOôO‘˜ñF\GSŒO¤OSÊO*PSGGOGPOG\GVôO*PVGGGVŒO¤OVÊOôOV€PÛPUÛPQ]QQóUŸQ$QU$Q†Q]†QÐQUÐQKS]€PÓPTÓP QS QQóTŸQKSS€P×PQ×PQóQŸQ$QQ$Q†QóQŸ†QÔQQÔQ_R\_R„RóQŸ„RFS\FSKSóQŸ¢PÛP0ŸÛPèPwQ_R0Ÿ„RFS0Ÿ¢PÛP0ŸÛPèP‘¸Q_R0Ÿ„RFS0Ÿ¢PÛP0ŸÛPèP‘@Q_R0Ÿ„RFS0Ÿ¢PòP0ŸQ`Q0Ÿ`Q†Q6Ÿ†Q½R0Ÿ½RÉR6ŸÉRòR0ŸòR÷R6Ÿ÷R0S0Ÿ0S=S6Ÿ=SFS0Ÿ¢PòP0ŸQ`Q0Ÿ`Q†Q X Ÿ†Q½R0Ÿ½RÉR X ŸÉRòR0ŸòR÷R X Ÿ÷R0S0Ÿ0S=S X Ÿ=SFS0Ÿ¢PòP0ŸQ`Q0Ÿ`QgQ ŸgQ~QT†Q½R0Ÿ½RÉR ù ŸÉRòR0ŸòR÷R ý Ÿ÷R0S0Ÿ0S=S ô Ÿ=SFS0ŸÜQûQPûQ R~Ÿ R_R^„R=S^=SFS~ŸQ$QV”Q_RV„RFSV„R½R2Ÿ„R½R3Ÿ„R½R1Ÿ„R½R è Ÿ„RÉR3Ÿ„R½R » Ÿ÷R0S1Ÿ÷R0S3Ÿ÷R0S è Ÿ÷R=S3Ÿ÷R0S » ŸÛPèP‘@ÛPèP‘¸ÛPèPwÛPòP]_R„R]ÛPòP0Ÿ_R„R0ŸÛPéP0ŸéPòPP_R|RPÛPòP0Ÿ_R„R6ŸÛPòP0Ÿ_R„R X ŸÛPòP0Ÿ_R„R " Ÿ$Q;Qs$Q`Q3Ÿ$Q`Q1Ÿ$Q`Q è Ÿ$QgQ3Ÿ$Q`Q » ŸPS…SU…S¾SS¾SZóUŸZZSZ#ZóUŸ#ZZSZ¼ZóUŸ¼ZáZSáZ[óUŸ[;[S;[O[óUŸO[e[Se[£\óUŸ£\±\S±\¶\óUŸ¶\Ñ\SÑ\è\óUŸè\P]SP]Ê^óUŸÊ^ _S __óUŸPS…ST…S W‘¨ W.WóTŸ.W»W‘¨»WëXóTŸëX#Z‘¨#Z6ZT6Z_‘¨PS…SQ…SOV^OVeVóQŸeVóV^óV.WóQŸ.W¡W^¡WëXóQŸëX9Y^9YFYóQŸFYŽY^ŽYžYóQŸžY¿Y^¿YÑYóQŸÑYþY^þYZóQŸZZ^Z#ZóQŸ#Z/ZQ/ZZ^Z£ZóQŸ£Z®Z^®Z¼ZóQŸ¼ZÔZ^ÔZõZóQŸõZ5\^5\V\óQŸV\©\^©\¶\óQŸ¶\y]^y]Š]óQŸŠ]¸]^¸]½]óQŸ½]ü]^ü]^óQŸ^^^^,^óQŸ,^b^^b^j^óQŸj^_^__óQŸPS…SR…S#Z‘°#Z@ZR@Z¶\‘°¶\È\RÈ\î^‘°î^ò^Rò^_‘°PS…SX…S#ZóXŸ#Z@ZX@Z¶\óXŸ¶\È\XÈ\î^óXŸî^ò^Xò^_óXŸPS´S0Ÿ´S¾S]¾SÊS_ÊSLUSLUIV_IVYVSeVÀWSX/XSëXZSZ£Z0Ÿ£Z¼ZS¼ZõZ0ŸõZ[S[;[0Ÿ;[O[_O[Ñ\0ŸÑ\è\_è\ó]0Ÿó]^_^^S^%^_%^,^S,^e^_e^j^Sj^Ê^_Ê^_0ŸPSX0ŸX/XVAXV\0Ÿ{\_0ŸPS…S0Ÿ’S¾SP¾S‘U\‘UeV0ŸeVÀW\ëXZ\ZZPZDZ0Ÿ£Z¼Z\¼ZÇZPÇZ[\;[O[\J\V\\¯\è\0Ÿó],^\,^Ê^0Ÿî^û^0ŸPS©S0Ÿ©S]UV]UjU0ŸjUyUPyU‘UV‘UüU0ŸYVÐWV‘XÅXVëXZVZZ0Ÿ£Z¼ZV¼ZõZ0ŸõZ[V[;[0Ÿ;[O[VO[ð[0ŸJ\V\VV\{\0Ÿ£\Ñ\0Ÿè\h]0ŸŠ]²]0Ÿ½]ó]0Ÿó]^P^,^V,^D^0ŸO^_0ŸPSÆS0ŸÆSÙSSÙSýT0ŸLU€U0Ÿ€U™UP™UËUYVeV0ŸeVwVSwV™V0ŸùVWYW.W‘¨_W®W0Ÿ®W»WYëX(Y0ŸFY‚Y0ŸžY Z0Ÿ ZZPZdZ0ŸqZŠZ\ŠZZY£ZO[0ŸO[[[Y\{\0Ÿ£\Ù\0Ÿ]]Y]!]Y!]P]‘ ó]^0Ÿ^,^P,^=^Y=^O^‘˜O^^Y^”^‘˜Ê^Þ^YÞ^î^‘ î^û^0Ÿû^_‘ PST0ŸT9TTCTGTTGT]T‘˜]TwV0ŸwVŽVTŽV™V‘˜™VùV0ŸùVÿVRÿVWTW.W‘˜.W_W0ŸjW®W0Ÿ®W»WTëX Z0Ÿ ZZPZ£Z0Ÿ£Z¼Z‘˜¼Zí\0Ÿí\]T]!]T!]<]‘˜<]Ê^0ŸÊ^Þ^TÞ^î^‘˜î^û^0Ÿû^_‘˜®S´S0Ÿ´SÊS]ÊSEU}ŸEUFV]eVùV}Ÿ.W§W}ŸëX?Y}ŸFY”Y}ŸžYÅY}ŸÑYZ}ŸdZZ0Ÿ£Z´Z}ŸõZ[}Ÿ;[O[]O[[[0ŸÑ\è\]è\]0Ÿ]P]1Ÿó]^]^ ^],^Z^]j^Ê^]Ê^î^0Ÿû^_1ŸPSüS0Ÿ/TlT_UwV0ŸwV™V_¾VùV0ŸùVÿVRÿV.W_IW_W0ŸjWnWQnW”W‘˜®WÀW_ëXY0ŸóYZ‘˜ZZ0ŸZZPZ¼Z_¼ZO[0ŸO[[[P[[ú[_ú[Š\0ŸŠ\£\_£\(]0Ÿ(]K]PK]ó]_ó]û^0Ÿû^_PTCT0ŸCTlT1ŸwV™V0Ÿ_W”W0ŸóYZ0Ÿ£Z¼Z1ŸPSNT0ŸNTlTPlTËTRUùV0ŸùVWRW.W‘ IWzW0ŸzWWPW”WR”W®W0Ÿ®W»WRëXY0ŸY!YR!YFY‘˜FYjYRjY‚Y‘˜óYZPZ£Z0Ÿ£Z¼ZP¼Z_0ŸPSYV0ŸYVeVMŸeVùV0ŸùV.W].W®W0Ÿ®WÀW]ëX Z0Ÿ ZZMŸZZ0ŸZ#Z]#ZéZ0ŸéZõZMŸõZJ\0ŸJ\V\LŸV\¯\0Ÿ¯\¶\]¶\O^0ŸO^j^MŸj^_0ŸPSYV0ŸYVeV X ŸeVóV0ŸóV.W X Ÿ.W®W0Ÿ®WX X ŸAXëX X ŸëX Z0Ÿ ZZ X ŸZZ0ŸZ#Z X Ÿ#ZéZ0ŸéZõZ X ŸõZJ\0ŸJ\V\ X ŸV\¯\0Ÿ¯\¶\ X Ÿ¶\O^0ŸO^j^ X Ÿj^_0ŸPSYV0ŸYVeV  ŸeVóV0ŸóV.W^.W®W0Ÿ®WÀW^ëX Z0Ÿ ZZ Þ ŸZZ0ŸZ#Z^#ZéZ0ŸéZõZ à ŸõZJ\0ŸJ\V\ ® ŸV\¯\0Ÿ¯\¶\^¶\O^0ŸO^j^ þ Ÿj^_0Ÿ6Z@ZT¶\Ç\TÇ\È\ ª#î^ò^T6ZDZS¶\Ñ\Sî^û^S6Z@ZP¶\º\Pº\È\sî^ò^sû\]YÊ^Þ^YÞ^î^‘ ‰[ð[0ŸP]h]0ŸŠ]²]0Ÿ½]ó]0Ÿ‰[ð[_P]h]_Š]²]_½]ó]_‰[¿[YP]a]Ya]h]‘˜Š]Ÿ]YŸ]²]‘˜Û[ã[Pã[ð[V½]ó]V”[ð[SP]h]SŠ]²]S½]ó]SÊS'T_eVwV__W}W_”W›W_ëXY_õZ[_äSôSTôSøS ª#ëXYTYY ª#õZüZTäSüSSëXYSõZ[SäSøSQëXYQõZüZQ'TlT_wV™V_£Z¼Z_•TýT0ŸY(Y0ŸFY‚Y0ŸžYóY0Ÿ•TËTRY!YR!Y(Y‘˜FYjYRjY‚Y‘˜•TýT_Y(Y_FY‚Y_žYóY_èTðTPðTýTYžY®YY®YóY‘  TËTYY!YYFYjYYjY‚Y‘ U7UY¾VÓVYÓVÔV‘˜U7U\¾VÔV\URU\¾VÿV\IW_W\U2UP2U7UpŸ¾VÓVP‘UüU0Ÿ,^D^0Ÿj^Ê^0Ÿ‘U™UP™UËUY,^=^Y=^D^‘˜j^^Y^”^‘˜‘UüUS,^D^Sj^Ê^SçUïUPïUüUV”^Ê^V UçUV,^D^Vj^”^V _{_U{_°_]°_³_óUŸ³_Ä_UÄ_&`]&`p`Up`ëa] _s_Ts_«_S«_³_óTŸ³_ëaS _w_Qw_³_óQŸ³_Ä_QÄ_&`óQŸ&`t`Qt`ÿ`\ÿ`$aóQŸ$aæa\æaëaóQŸB_{_0Ÿ{_ˆ_w³_ÿ`0Ÿ$aæa0ŸB_{_0Ÿ{_ˆ_‘¸³_ÿ`0Ÿ$aæa0ŸB_{_0Ÿ{_ˆ_‘@³_ÿ`0Ÿ$aæa0ŸB_’_0Ÿ³_`0Ÿ`&`LŸ&`]a0Ÿ]aiaLŸia’a0Ÿ’a—aLŸ—aÐa0ŸÐaÝaLŸÝaæa0ŸB_’_0Ÿ³_`0Ÿ`&` X Ÿ&`]a0Ÿ]aia X Ÿia’a0Ÿ’a—a X Ÿ—aÐa0ŸÐaÝa X ŸÝaæa0ŸB_’_0Ÿ³_`0Ÿ`` X Ÿ``T&`]a0Ÿ]aia E Ÿia’a0Ÿ’a—a I Ÿ—aÐa0ŸÐaÝa @ ŸÝaæa0Ÿ|`›`P›`©`~Ÿ©`ÿ`^$aÝa^Ýaæa~Ÿ³_Ä_V4`ÿ`V$aæaV$a]a2Ÿ$a]a3Ÿ$a]a1Ÿ$a]a è Ÿ$aia3Ÿ$a]a » Ÿ—aÐa1Ÿ—aÐa3Ÿ—aÐa è Ÿ—aÝa3Ÿ—aÐa » Ÿ{_ˆ_‘@{_ˆ_‘¸{_ˆ_w{_’_]ÿ`$a]{_’_0Ÿÿ`$a0Ÿ{_‰_0Ÿ‰_’_Pÿ`aP{_’_0Ÿÿ`$aLŸ{_’_0Ÿÿ`$a X Ÿ{_’_0Ÿÿ`$a n ŸÄ_Û_sÄ_`3ŸÄ_`1ŸÄ_` è ŸÄ_`3ŸÄ_` » ŸðacbUcb‚f‘‚f”fU”fGi‘Gi‘iU‘iMz‘ðacbTcb¡bS¡b‚fóTŸ‚fñfSñfGióTŸGi9jS9jŸjóTŸŸj¬jS¬j¸jóTŸ¸jÐjSÐj$kóTŸ$kikSik§kóTŸ§klSl°oóTŸ°o¹oS¹oMzóTŸðacbQcb‚fóQŸ‚f”fQ”fGióQŸGi•iQ•i9j\9j$kóQŸ$kik\ik§kóQŸ§kl\l°oóQŸ°o¹o\¹oMzóQŸbcb0Ÿcbib‘ ‚fñf0ŸGi9j0Ÿ$kik0Ÿ§kl0Ÿ°o¹o0Ÿbcb0Ÿcbib‘¨‚fñf0ŸGi9j0Ÿ$kik0Ÿ§kl0Ÿ°o¹o0Ÿbcb0Ÿcbib‘°‚fñf0ŸGi9j0Ÿ$kik0Ÿ§kl0Ÿ°o¹o0ŸbÐf0ŸÐfñfŒŸg]k0Ÿ]kikŒŸikÒk0ŸÒk×kŒŸ×kl0ŸllŒŸlHy0ŸMyMz0ŸbÐf0ŸÐfñf X Ÿg]k0Ÿ]kik X ŸikÒk0ŸÒk×k X Ÿ×kl0Ÿll X ŸlHy0ŸMyMz0ŸbÐf0ŸÐf×f “Ÿ×fîfTg]k0Ÿ]kik €ŸikÒk0ŸÒk×k „Ÿ×kl0Ÿll {ŸlHy0ŸMyMz0Ÿi¼iP¼iËi}ŸËi9j]$kik]§kl]°o¹o}Ÿ‚f”fVTi9jV$kikV§klV°o¹oV$k]k2Ÿ$k]k3Ÿ$k]k1Ÿ$k]k è Ÿ$kik3Ÿ$k]k » Ÿ×kl1Ÿ×kl3Ÿ×kl è Ÿ×kl3Ÿ×kl » Ÿcbib‘°cbib‘¨cbib‘ cb‚f‘gGi‘9j$k‘ik§k‘l°o‘¹oHy‘MyMz‘cb—b0Ÿ—b®bZ®b'dV'd8dZ e‚fVgGiV9jŸjVŸj¬j0Ÿ¬j¸jV¸jêj0Ÿêj$kVikykVyk†kZ†kkwcb‚f0Ÿg¸g0Ÿ¸gãgPãgígwígGi0Ÿ9j$k0Ÿik§k0Ÿl°o0Ÿ¹oHy0ŸMyMz0Ÿcbpb0Ÿpb{bP{b‚f\gcg\?hch\hGi\9jŸj\Ÿj¬jP¬j¸j0Ÿ¸j$k\ik§k\l°o\¹oît\ît‡u0Ÿ‡u=x\=xçx0ŸçxHy\MyMz\cbŒb0ŸŒbJd]Jd e0Ÿ e¬e]f‚f]gEg]«hGi]9jŸj]Ÿj k0Ÿ k$k]ikk]k§k0Ÿl¶l0Ÿ!nXo0Ÿ~o°o0Ÿ]rªr0Ÿ›t‡u0Ÿxw•w0Ÿ«w¿w0Ÿ)xçx0ŸyHy0ŸÓyçy0Ÿûy z0Ÿ‘b—b0Ÿ—b¡bZ¡b®b^®b d~Ÿ dÖd^Öd e0Ÿ e’e~Ÿf‚f~Ÿg'g~Ÿ«hõh~Ÿýh—c>—H—õ)õ)ŸH—L—õ)õ)ŸL—b— ‘˜~ö)õ)Ÿb—j—cj—‚— wö)õ)"Ÿ‚—Š—aŠ—ž—cž—¶—õ)õ)"Ÿ¶—Ò—cÒ—Þ—aÊ™è™gè™%šc™¡®¡gú£6¤c6¤y¤‘¸~s•™•g™•·•‘€~·•–f––õ)õ)Ÿ.—>—d>—L—cL—f—af—~— ‘˜~ö)õ)"Ÿ~—†—c†—ž—õ)õ)Ÿž—¦—c¦—º—aº—Ηõ)õ)ŸÎ—Þ—b0˜6˜‘€~ö)õ)"ô)à?ŸB˜n˜gÊ™ï™fï™%šk:šPšaµŸÍŸa™¡®¡fú£6¤k6¤y¤‘À~s•‰•b‰•·•d·•–eÊ™%še™¡®¡eú£6¤e6¤y¤‘~s•³•w³•·•a·•–dÊ™%šd™¡®¡dú£6¤d6¤y¤‘ˆ~s•¥•‘ø}¥•®•a®•·•f·•̘‘€~z™»™‘€~ʙԙhÔ™ƒš‘€~C‘€~¤žíž‘€~3ŸÝŸ‘€~P  ¡‘€~™¡®¡h®¡'£‘€~ú£U¥‘€~Z¥Ѧ‘€~Ù¦§‘€~s•••‘€~••Ÿ•aŸ•·•g·•̘‘ø}z™»™‘ø}Ê™ƒš‘ø}C‘ø}¤žÈž‘ø}3ŸÝŸ‘ø}P  ¡‘ø}™¡£‘ø}ú£U¥‘ø}Z¥!¦‘ø}6¦Ѧ‘ø}Ù¦§‘ø}s•{•d{••a•·•b·•’˜w›™«™wÊ™ƒšwCw¤žÈžw3ŸŸwŸÝŸwP  ¡w™¡ý¡wú£y¤wþ¤U¥wà¥ë¥w6¦N¦wÙ¦§wi•̘0Ÿ™™0Ÿz™»™0ŸÊ™ƒš0ŸC0Ÿ¤žÈž0Ÿ3ŸÝŸ0ŸP  ¡0Ÿ™¡¿¡0Ÿ"¢'£0Ÿú£¿¤0ŸÎ¤F¥0ŸZ¥à¥0Ÿü¥6¦Sp¦Ѧ0ŸÙ¦§0Ÿi•ß—0Ÿß—˜P0˜o˜0Ÿo˜’˜P›˜ ˜0Ÿ ˜ØPʘ̘0Ÿ™™0Ÿz™‘™P‘™›™w›™±™P±™»™wÊ™ƒš0Ÿ&P&C‘ ~¤žÈž0Ÿ3Ÿ]Ÿ0Ÿ]ŸŠŸPŠŸÝŸ0ŸP  ¡0Ÿ™¡¢0Ÿú£y¤0Ÿþ¤U¥0Ÿà¥F¦0ŸN¦p¦0ŸÙ¦§0Ÿi•̘0Ÿ™™0Ÿz™»™0ŸÊ™ƒš0ŸC0Ÿ¤ž¾ž0Ÿ¾žÈž Ÿ3ŸNŸ0ŸNŸ]Ÿ Ÿ]ŸŠŸ0ŸŠŸŸ ŸŸ¦Ÿ0Ÿ¦ŸµŸ ýŸµŸΟ0ŸÎŸÝŸ þŸP  ¡0Ÿ™¡'£0Ÿú£U¥0ŸZ¥ü¥0Ÿü¥6¦ ùŸ6¦Ѧ0ŸÙ¦§0Ÿi•̘0Ÿ™™0Ÿz™»™0ŸÊ™ƒš0ŸC0Ÿ¤ž¾ž0Ÿ¾žÈž X Ÿ3ŸNŸ0ŸNŸ]Ÿ X Ÿ]ŸŠŸ0ŸŠŸŸ X ŸŸ¦Ÿ0Ÿ¦ŸµŸ X ŸµŸΟ0ŸÎŸÝŸ X ŸP  ¡0Ÿ™¡'£0Ÿú£U¥0ŸZ¥ü¥0Ÿü¥6¦ X Ÿ6¦Ѧ0ŸÙ¦§0Ÿi•̘0Ÿ™™0Ÿz™»™0ŸÊ™ƒš0ŸC0Ÿ¤ž¾ž0Ÿ¾žÈž à8Ÿ3ŸNŸ0ŸNŸ]Ÿ 9Ÿ]ŸŠŸ0ŸŠŸŸ Î9ŸŸ¦Ÿ0Ÿ¦ŸµŸ ƒ8ŸµŸΟ0ŸÎŸÝŸ ›8ŸP  ¡0Ÿ™¡'£0Ÿú£U¥0ŸZ¥ü¥0Ÿü¥6¦ I8Ÿ6¦Ѧ0ŸÙ¦§0Ÿ ¡¿¡Vþ¤F¥VÙ¦§Vµ¡¿¡Pþ¤ ¥P ¥!¥SÙ¦ë¦Sð¦û¦Sþ¤U¥VÙ¦§V¥!¥VÙ¦§V¥¥UÙ¦ç¦Uð¦÷¦U ¥¥PÙ¦ݦPݦç¦uð¦÷¦u*¥U¥VÊ¡¢0Ÿà¥ü¥0Ÿ6¦F¦0ŸN¦p¦0ŸÊ¡ý¡Tà¥ï¥Tï¥ü¥w6¦?¦TÊ¡¢Sà¥ü¥S6¦F¦SN¦p¦S¢¢PN¦R¦PÑ¡¢Và¥ü¥V6¦F¦VN¦p¦V9¢>¢‘è~>¢ë¢0Ÿy¤¿¤0ŸÎ¤פ0Ÿ×¤ܤ‘è~ܤþ¤0ŸZ¥à¥0Ÿp¦Ѧ0Ÿ9¢'£0Ÿy¤¿¤0ŸÎ¤þ¤0ŸZ¥à¥0Ÿp¦Ѧ0Ÿ0¢ë¢Vy¤¿¤VΤþ¤VZ¥à¥Vp¦ѦVn¥¨¥‘à~¨¥®¥Qµ¦»¦Qn¥¨¥‘è~n¥¨¥‘Ø~¥®¥Uµ¦»¦UŽ¥à¥\µ¦Ѧ\’¥à¥Sµ¦ѦS}¥®¥Pµ¦¹¦Pjœƒœvjœ¨œ8Ÿjœ¨œ1Ÿjœ¨œ ² Ÿjœ¯œ8Ÿjœ¨œ » Ÿ§s§Us§ «‘ˆ «G«óUŸG«´«‘ˆ´«Ä«UÄ«!¬‘ˆ!¬D¬óUŸD¬k¬‘ˆk¬“®óUŸ“®³¯‘ˆ³¯ù¯Uù¯»°‘ˆ»°ȰóUŸÈ°ݰ‘ˆݰï°óUŸï°È‘ˆÈ¢ÈóUŸ¢ÈâË‘ˆâËÎóUŸÎSΑˆSΰÎóUŸ°ÎÅΑˆÅÎãÎóUŸãÎìΑˆìÎ ÏóUŸ ÏqÑ‘ˆ§s§Ts§½§S½§´«óTŸ´«!¬S!¬³¯óTŸ³¯¡°S¡°ȰóTŸÈ°ݰSݰï°óTŸï°±S±^±óTŸ^±£±S£±æ±óTŸæ±\²S\²p¶óTŸp¶y¶Sy¶qÑóTŸ§s§Qs§´«óQŸ´«Ä«QÄ«³¯óQŸ³¯ý¯Qý¯¡°\¡°^±óQŸ^±£±\£±æ±óQŸæ±\²\\²p¶óQŸp¶y¶\y¶qÑóQŸ)§s§0Ÿs§y§‘ ´«!¬0Ÿ³¯¡°0Ÿ^±£±0Ÿæ±\²0Ÿp¶y¶0Ÿ)§s§0Ÿs§y§‘¨´«!¬0Ÿ³¯¡°0Ÿ^±£±0Ÿæ±\²0Ÿp¶y¶0Ÿ)§s§0Ÿs§y§‘°´«!¬0Ÿ³¯¡°0Ÿ^±£±0Ÿæ±\²0Ÿp¶y¶0Ÿ)§¬0Ÿ¬!¬ -ŸD¬—±0Ÿ—±£± -Ÿ£±²0Ÿ²² -Ÿ²O²0ŸO²\² -Ÿ\²È0Ÿ¢ÈqÑ0Ÿ)§¬0Ÿ¬!¬ X ŸD¬—±0Ÿ—±£± X Ÿ£±²0Ÿ²² X Ÿ²O²0ŸO²\² X Ÿ\²È0Ÿ¢ÈqÑ0Ÿ)§¬0Ÿ¬¬ <Ÿ¬¬TD¬—±0Ÿ—±£± <Ÿ£±²0Ÿ²² <Ÿ²O²0ŸO²\² <Ÿ\²È0Ÿ¢ÈqÑ0Ÿ°$°P$°3°}Ÿ3°¡°]^±£±]æ±\²]p¶y¶}Ÿ´«Ä«V¼¯¡°V^±£±Væ±\²Vp¶y¶V^±—±2Ÿ^±—±3Ÿ^±—±1Ÿ^±—± è Ÿ^±£±3Ÿ^±—± » Ÿ²O²1Ÿ²O²3Ÿ²O² è Ÿ²\²3Ÿ²O² » Ÿs§y§‘°s§y§‘¨s§y§‘ s§ «‘ˆG«´«‘ˆD¬k¬‘ˆ“®³¯‘ˆ¡°»°‘ˆȰݰ‘ˆï°^±‘ˆ£±æ±‘ˆ\²p¶‘ˆy¶È‘ˆ¢ÈâË‘ˆÎSΑˆ°ÎÅΑˆãÎìΑˆ ÏqÑ‘ˆs§·§0Ÿ·§˧U˧J©VJ©^©Ugª´«VD¬³¯V¡°ȰVȰݰ0ŸÝ°ï°Vï°3±0Ÿ3±^±V£±³±V³±À±UÀ±±[±ͱ‘è~s§´«0ŸD¬­0Ÿ­K­SK­³¯0Ÿ¡°»°0Ÿ»°ȰSȰ^±0Ÿ£±æ±0Ÿ\²p¶0Ÿy¶È0Ÿ¢ÈqÑ0Ÿs§€§0Ÿ€§‹§P‹§´«]D¬Ǭ]K­s­]Ó­³¯]¡°»°]ȰݰPݰï°0Ÿï°^±]£±æ±]\²p¶]y¶È]¢ÈîÌ]îÌ)Í0Ÿ)Í Î] Î°Î0Ÿ°ÎqÑ]s§Ÿ§0ŸŸ§q©\q©gª0Ÿgª´«\D¬Ǭ\K­s­\Ó­³¯\¡°»°\Ȱ3±0Ÿ3±^±\£±ͱ\ͱæ±0Ÿ\²ø²0Ÿ|´Ûµ0Ÿ¶E¶0ŸU¹¦¹0ŸÈ»¼0Ÿ‹¼ȼ\¿¿\¿¿¿SÕ¿øÀ0ŸøÀRÁSRÁ¢Á0ŸÄÁ|Â0Ÿ(ßÃSÒÃÄSÄÄ\ÄfÄSfÄqÄ\qÄïÄSïÄ÷Ä\÷ÄÍÆ0Ÿ¢ÈrÉ0Ÿ˜ÉºÉ0ŸòÉSÊ0Ÿ…Ì)Í0ŸÂÍÎ0Ÿ Î°Î0Ÿ Ï6Ï0Ÿ6ÏPÏSPÏXÏ\{ÏìÏ0ŸUЊÐ0Ÿ©Ð<Ñ0Ÿ§§·§0Ÿ·§½§U½§˧^˧B©~ŸB©ª^ªgª0Ÿgªçª~ŸG«´«~ŸD¬c¬~Ÿ“®ñ®~Ÿù®m¯~Ÿz¯¨¯~Ÿ¡°»°~Ÿ3±V±~Ÿ£±³±~Ÿ³±æ±^\²f²0ŸÀ³'´0Ÿ|´Ñ´^ µ(µ^5µ]µ^]µµ0Ÿµ¾µ1Ÿ5·?·0Ÿ{¸Õ¸0Ÿ¦¹Ù¹0ŸÙ¹º1ŸÐºÚº0Ÿj¼ȼ0Ÿ¾C¾0ŸC¾l¾1Ÿ¿¿0Ÿ“ÀøÀ0ŸÁ¢Á0Ÿ ÃlÃ0ŸlßÃ1Ÿ¯ÃÒÃ0Ÿ Æ0Æ^0Æ:Æ0Ÿ³ÇÈ0Ÿ¢ÈÁÈ^ÁÈþÈ0ŸþÈ6É1Ÿ¿ËâË0Ÿ/ÎlÎ0ŸlΠÎ1ŸÅÎãÎ1ŸãÎ Ï0Ÿ6Ï{Ï1Ÿ•ϵÏ1ŸµÏìÏ0ŸçÐüÐ^üÐ"Ñ1Ÿ<Ñ\Ñ1Ÿs§½§0ŸÆ§Ú§VÚ§þ¨0Ÿâ©ü©0Ÿü©ªPª+ªX+ªUª‘ð~gª|ªV|ª™ª0Ÿïª-«X-«G«‘ø~«´«0ŸD¬k¬0Ÿk¬{¬X“®È®0Ÿù®¯0Ÿ¡°»°0ŸÈ°^±0Ÿ£±³±0Ÿ\²f²‘ð~‡²t³0Ÿå³´‘ð~'´Y´0ŸPµ]µP]µµX¾µp¶0Ÿy¶·0Ÿ5·?·‘ð~å·Õ¸0Ÿ¹E¹0ŸU¹¦¹0ŸÀ¹ºVOºb»0ŸÈ»ȼ0Ÿ½1½0Ÿ½ؽ0Ÿ¾‰¾0Ÿ»¾í¾0Ÿ¿¤¿0ŸÁ’ÁX’Á¢Á‘ð~ÄÁ¯Ã0Ÿ¯ÃÒÃVÒÃIÄ0ŸqÄÂÄ0ŸVËØË0Ÿ…Ì)Í0ŸÂÍÎ0Ÿ ÎÅÎ0Ÿ ÏXÏ0ŸXÏfÏVfÏ{ÏX{Ï•Ï0Ÿ Ð Ð0Ÿ"ÑqÑ0Ÿs§ý§0Ÿ0¨m¨S©Å©0Ÿ'ªgª_gª|ª0Ÿ|ª™ªS¼ªïª0Ÿïª «Q «G«_i««0ŸŠ«´«‘è~k¬Ǭ_K­s­_Ó­“®_“®®®0Ÿ¡°¶°‘è~Ȱ3±0Ÿ3±F±SF±^±_£±ͱ0Ÿ\²f²_f² ³V ³'´0Ÿ'´Y´VY´ µ0Ÿ5µPµ0ŸwµùµVùµ¶_¶S¶VS¶p¶_y¶½·0Ÿ*¹U¹0ŸU¹¦¹V¦¹º0ŸÈ»ç»0Ÿ@¼Z¼0ŸZ¼q¼Pq¼ȼ_1½Y½0ŸØ½¾0Ÿ¿3¿_3¿=À0Ÿ¸ÀøÀ_øÀRÁ0ŸÁ¢ÁVÄÁ2Â0Ÿ ßÃ_ŸÃ¯ÃP¯Ã Å0ŸÏÅ0Æ0Ÿ0Æ:Æ_:ÆéÆVÿÆÈ0ŸÈpÈVpÈÈ0Ÿ¢ÈÁÈ0ŸÛÈ€ÉV€É˜É_˜ÉÝÉVÝÉòÉ_òÉSÊVSÊšË0ŸØËÌ0ŸÌBÌPBÌ…Ì_…Ì¢Ì0Ÿ¢Ì¶ÌP¶ÌîÌ_îÌùÌ0ŸùÌÍPÍ)ÍS)Í-ÍP-̓Í_ƒÍ£ÍP£ÍêÍ_êÍÎPΠÎ0Ÿ Î°ÎPÅÎ6Ï0Ÿ6ÏXÏ_XÏ•Ï0Ÿ•Ï£ÏV£ÏµÏ_µÏìÏVìÏüÐ0ŸüÐ ÑV Ñ"Ñ_s§¨0Ÿ¨:¨YD¨H¨YH¨^¨‘è~^¨2ª0Ÿ2ªgªPgª|ª0Ÿ|ªŽªYŽª™ª‘è~™ªïª0Ÿïª «Q «-«Y-«G«‘ˆG««0ŸŠ«´«0ŸD¬k¬0Ÿk¬{¬Y“®³¯0Ÿ¡°»°0ŸÈ°3±0Ÿ3±C±‘è~£±æ±0Ÿ\²f²Pf²½²Y³=³0Ÿ–³°³0Ÿ°³dzPdzé³Yé³'´‘˜@´Y´0Ÿ|´›µ0Ÿ›µ¹µP¹µÔµYԵ뵑è~¶-¶Y-¶E¶‘ð~y¶ݶ0Ÿ5·?·‘˜V·/¸0Ÿ›¸ɸ‘ð~ɸÕ¸‘˜Õ¸¹0ŸE¹U¹P¦¹ʹYºк0ŸÐºÚº‘ð~†»‘»0Ÿ‘»Ì»P̻绑è~1½½0Ÿ°½¾0Ÿ/¾l¾VÁ¢Á0Ÿ¢ÁÄÁPÄÁéÁ‘è~¯ÃÂÃYÂÃÒÑð~ Æ0Æ0Ÿ¢ÈÁÈ0ŸVË{Ë0ŸšË¿Ë0Ÿ¿ËØËVÆÌ)Í0ŸÂÍêÍ0Ÿ ÎÅÎ0Ÿ ÏÏ‘è~ Ð Ð0ŸçÐüÐ0ŸüÐ"ÑP<ÑJÑVJÑ\ÑY\ÑqÑ0Ÿ¨D¨0ŸD¨m¨1Ÿ|ª™ª0Ÿ«´«0Ÿ¡°»°0Ÿ3±^±1Ÿs§O¨0ŸO¨m¨Pm¨̨R©ª0Ÿ'ªïª0Ÿïª «Q «G«Si«•«0Ÿ•«¯«P¯«´«RD¬k¬0Ÿk¬ǬSK­s­SÓ­“®S“®®®0Ÿ®®Á®RÁ®Þ®‘è~ù®¯R¯:¯‘ð~¡°»°PȰ3±0Ÿ3±^±P£±æ±0Ÿ\²ѳ0Ÿå³aµ0Ÿaµ¯µS¯µp¶0Ÿy¶Œ¸0Ÿ›¸ª¹0Ÿª¹ø¹Sø¹¾0Ÿ¾]¾S]¾ÃÀ0ŸÃÀøÀPøÀÁ0ŸÁ¢ÁS¢Á¯Ã0Ÿ¯ÃÒÃSÒÃ0Æ0Ÿ0Æ:ÆP:ÆׯSׯ&Ç0ŸŽÇžÇ0ŸžÇºÇPºÇCÈSCÈpÈ0Ÿ¢È É0Ÿ É1ÉP1ÉSÊSSÊÎÊ0ŸVË¿Ë0Ÿ¿ËÌSÌÎ0ŸÎ/ÎP/ΠÎS ÎÅÎ0ŸÅÎ ÏS ÏXÏ0ŸXÏ{ÏS{Ï•Ï0Ÿ•ϵÏPµÏìÏ0Ÿ ÐüÐ0ŸüÐ"ÑS"Ñ<Ñ0Ÿ<Ñ\ÑS\ÑqÑ0Ÿs§ïª0Ÿïª «Q «G«^G«´«0ŸD¬k¬0Ÿk¬“®^“®³¯0Ÿ¡°»°0Ÿ»°Ȱ^Ȱݰ0ŸÝ°ï°^ï°^±0Ÿ£±æ±0Ÿ\²ð³0Ÿð³'´P'´p¶0Ÿy¶5·0Ÿ5·?·P?·Ç·^Ç·¸0ŸQ¸k¸0Ÿk¸‚¸P‚¸î¸^0Ÿ*¹ä¹0Ÿä¹ºPºOº^Oº¨º0ŸÐºñº^ñº–¼0Ÿ–¼ȼPȼ1½0Ÿ1½½^½Œ½Pؽl¾^l¾¿0Ÿ¿¿P¿®¿^®¿ü¿0ŸdÀ~À0Ÿ~ÀšÀPšÀ%Á^%ÁRÁ0ŸÁwÃ0ŸwÚÃPšÃŸÃ^ŸÃÒÃ0ŸÒÃ÷Ä^÷ÄtÅ0Ÿ Å«ÅP Æ0Æ0Ÿ0ÆQÆ^QÆgÇ0ŸØÇÈ^ÈpÈ0Ÿ¢ÈÁÈ0ŸÁÈ6É^6ÉúÊ0ŸË¿Ë0Ÿ¿ËâË^âËaÌVaÌlÌ0ŸlÌ›ÌP›ÌÆÌ^ÆÌÑÌ0ŸÑÌòÌPòÌ)Í^)Í‘ÍV‘Í£Í^£ÍêÍPêÍÎ^IΠÎV Î°Î^ÅÎÓÎVÓÎãÎ^ãÎ ÏV Ï6Ï0Ÿ6Ï{ÏP{Ï•Ï0Ÿ•ÏìÏ^ìÏÈÐ0ŸçÐ<Ñ0Ÿ<Ñ\Ñ^\ÑqÑ0Ÿs§ïª0Ÿïª «Q «-«Z-«G«‘G«´«0ŸD¬k¬0Ÿk¬{¬Z“®³¯0Ÿ¡°»°0ŸÈ°^±0Ÿ£±æ±0Ÿ\²p¶0Ÿy¶¦¸0Ÿ¦¸Õ¸PÕ¸к0ŸÐºÚºPÚº'»Zl»|¼0Ÿ‹¼ȼ0Ÿë¼N¾0ŸN¾g¾Pg¾‚¾Z‚¾¤¾‘è~»¾Õ¾ZÕ¾í¾‘ð~¿¤À0Ÿ¸À|Â0ŸõÂÃ0ŸÃHÃZHÃXјlÃpÃZpÃјÃÄÇ0ŸØÇÈ0Ÿ¢ÈÅÈ0ŸÅÈåÈZþÈÉZÉ'É‘˜'É3Î0Ÿ3ÎSÎZlÎpÎZpΑΑˆ‘ÎÅÎ0ŸÅÎãΑˆãÎñÎZñÎ Ï‘ˆ Ï6Ï0Ÿ6ÏXÏ‘˜XÏ•Ï0Ÿ•ϵϑ˜µÏÒÏZÒÏìÏ‘˜ìÏ<Ñ0Ÿ<Ñ\ÑP\ÑqÑ0Ÿs§ïª0Ÿïª-«Q-«G«‘€G«´«0ŸD¬k¬0Ÿk¬{¬Q“®³¯0Ÿ¡°»°0ŸÈ°^±0Ÿ£±æ±0Ÿ\²p¶0Ÿy¶ãÇ0ŸãÇÈPÈÈ0Ÿ¢ÈØË0ŸØËâËPâËÌQÌBÌ‘è~BÌ)Í0Ÿ)Í?Í‘è~V̓Í0ŸƒÍŽÍ‘è~£ÍwÎ0ŸwΛÎP›Î ÎQ ÎÅÎ0ŸÅÎãÎPãÎqÑ0Ÿs§ïª0Ÿïª«‘ð~G«´«0ŸD¬k¬0Ÿk¬{¬‘ð~“®³¯0Ÿ¡°»°0ŸÈ°ݰ0ŸÝ°ï° /Ÿï°±0Ÿ±3± /Ÿ3±^±0Ÿ£±æ±0Ÿ\²p¶0Ÿy¶È0Ÿ¢ÈqÑ0Ÿs§ïª0ŸïªG« X ŸG«´«0ŸD¬k¬0Ÿk¬­ X ŸK­“® X Ÿ“®³¯0Ÿ¡°»°0ŸÈ°ݰ0ŸÝ°ï° X Ÿï°±0Ÿ±3± X Ÿ3±^±0Ÿ£±æ±0Ÿ\²p¶0Ÿy¶È0Ÿ¢ÈqÑ0Ÿs§ïª0Ÿïªüª‘è~G«´«0ŸD¬k¬0Ÿk¬{¬‘è~“®³¯0Ÿ¡°»°0ŸÈ°ݰ0ŸÝ°ï°‘è~ï°±0Ÿ±3± L<Ÿ3±^±0Ÿ£±æ±0Ÿ\²p¶0Ÿy¶È0Ÿ¢ÈqÑ0ŸË§Ú§UgªvªUå§õ§Tõ§ù§ ª#“®©®T©®®® ª#£±ª±Tå§ý§V“®®®V£±³±Vå§ù§Q“®®®Q£±ª±Q(¨m¨S|ª™ªS3±F±SF±^±_–¨þ¨0Ÿ®®È®0Ÿù®¯0Ÿ–¨̨R®®Á®RÁ®È®‘è~ù®¯R¯:¯‘ð~–¨þ¨S®®È®Sù®8¯S8¯:¯_:¯K¯SK¯¯_é¨ñ¨Pñ¨þ¨X:¯O¯XO¯¯‘ø~¡¨̨X®®Á®Xù®¯X¯:¯‘è~©4©X¼ªѪXѪÒª‘è~©4©]¼ªÒª]©P©]¼ª «]i««]©0©P0©4©pŸ¼ªѪPq©Ž©S|´Ó´SÓ´â´q\Ÿ Æ0ÆSçÐüÐS©Ž©P|´‡´P‡´ ´X Æ"ÆXçÐîÐX|´Ó´SÓ´â´q\Ÿ Æ0ÆSçÐüÐSƒ´©´S Æ0ÆSçÐüÐSƒ´ ´U Æ"ÆUçÐîÐU‡´ ´P ÆÆPÆ"ÆuçÐîÐuδÓ´SÓ´â´q\Ÿ™©®©T®©·© ت#5µKµTKµPµ ت#¢È®ÈT™©·©X·©Å©‘è~5µPµX¢È®ÈX®ÈÁÈ‘è~™©·©Q5µPµQ¢È®ÈQnµ¾µVÁ¢ÁVüÐ ÑV Ñ"Ñ_‡²ø²0Ÿ¾µÛµ0Ÿ¶E¶0ŸU¹¦¹0Ÿ‡²½²Y¾µÔµYÔµÛµ‘è~¶-¶Y-¶E¶‘ð~‡²ø²V¾µÛµV¶E¶VU¹¦¹VÞ²ë²Pë²ø²\U¹¦¹\’²ø²S¾µÛµS¶E¶SU¹¦¹S ³=³Sy¶жSжܶq\ŸVË{ËS Ð ÐS.³=³Py¶„¶P„¶¶YVËmËY ÐÐYy¶жSжܶq\ŸVË{ËS Ð ÐS€¶¦¶SVË{ËS Ð ÐS€¶¶UVËmËU ÐÐU„¶¶PVËZËPZËmËu ÐÐu˶жSжܶq\ŸH³]³T]³f³ ت#*¹@¹T@¹E¹ ت#{ˇËTH³f³Yf³t³‘è~*¹E¹Y{ˇËY‡ËšË‘è~H³f³Q*¹E¹Q{ˇËQ·¹ºV¯ÃÒÃVXÏfÏVfÏ{ÏXV·½·0Ÿºº0Ÿ1½Y½0ŸØ½¾0ŸV·½·^ºº^1½Y½^ؽ¾^V·½·VººV1½Y½Vؽ¾V¨·°·P°·½·_ؽ¾_a·½·SººS1½Y½Sؽ¾Så·¸SOºžºSžº§ºq\ŸšË¿ËS\ÑqÑSó·¸POºZºPZº|º^šËºË^\ÑlÑ^OºžºSžº§ºq\ŸšË¿ËS\ÑqÑSVº|ºSšË¿ËS\ÑqÑSVºsºUšË±ËU\ÑcÑUZºsºPšËžËPžË±Ëu\ÑcÑuœºžºSžº§ºq\Ÿ ¸&¸T°½ƽTƽʽ ت#°Î·ÎT ¸/¸^°½ؽ^°ÎÅÎ^ ¸&¸Q°½ʽQ°Î·ÎQ&¾l¾V¿ËØËV<ÑJÑVJÑ\ÑYñºb»0Ÿl¾‰¾0Ÿ»¾í¾0Ÿ|ÂõÂ0Ÿñº'»Zl¾‚¾Z‚¾‰¾‘è~»¾Õ¾ZÕ¾í¾‘ð~ñºb»Vl¾‰¾V»¾í¾V|­ÂV­ÂÆÂYÆÂõÂVH»U»PU»b»X|ÂÂXÂõ‘ø~üºb»Sl¾‰¾S»¾í¾S|¼ÂSÆÂõÂSÈ»ç»SÄÁ%ÂS%Â1Âq\Ÿ Ï6ÏS{Ï•ÏSÓ»ç»PÄÁÏÁPÏÁûÁ_ Ï,Ï_{Ï‹Ï_ÄÁ%ÂS%Â1Âq\Ÿ Ï6ÏS{Ï•ÏSËÁûÁS Ï6ÏS{Ï•ÏSËÁíÁU Ï#ÏU{Ï‚ÏUÏÁíÁP ÏÏPÏ#Ïu{Ï‚Ïu Â%ÂS%Â1Âq\Ÿò» ¼T ¼¼ ت#\ÂwÂTwÂ| ت#"Ñ)ÑTò»¼_\Â|Â_"Ñ<Ñ_ò»¼Q\Â|ÂQ"Ñ)ÑQ ßÃS6ÏPÏSPÏXÏ\3¿¤¿0ŸÒÃIÄ0ŸqÄÂÄ0Ÿ3¿¤¿^ÒÃIÄ^qÄÂÄ^3¿¤¿SÒÃÄSÄÄ\ÄIÄSqÄÂÄSŠ¿—¿P—¿¤¿XÒÃåÃXåÃIÄ‘ø~>¿¤¿VÒÃûÃVÄIÄVqÄÂÄVÕ¿ü¿S÷Ä_ÅS_ÅsÅq\ŸUЊÐS©ÐÈÐSã¿ü¿P÷ÄÅPÅ3Å^UÐ{Ð^©Ð¹Ð^÷Ä_ÅS_ÅsÅq\ŸUЊÐS©ÐÈÐSþÄ8ÅSUЊÐS©ÐÈÐSþÄ%ÅUUÐrÐU©Ð°ÐUÅ%ÅPUÐYÐPYÐrÐu©Ð°ÐuÀ*ÀTÏÅïÅTïÅóÅ ت#ÈÐÏÐTÀ=À^ÏÅ Æ^ÈÐçÐ^À*ÀPÏÅÓÅPÓÅóÅ~ÈÐÏÐ~ÒÈ6ÉV•Ï£ÏV£ÏµÏ_µÏìÏVQÆÍÆ0Ÿ6ÉrÉ0Ÿ˜ÉºÉ0ŸòÉSÊ0ŸQÆÍÆS6ÉrÉS˜ÉºÉSòÉSÊSQÆÍÆV6ÉrÉV˜ÉºÉVòÉSÊV®ÆÀÆPÀÆÍÆ\òÉSÊ\\Æ®Æ\6ÉrÉ\˜ÉºÉ\ÿÆ&ÇVSÊÎÊV ÐUÐVŠÐ©ÐV Ç&ÇPSÊ^ÊP^ÊÊS ÐFÐSŠÐšÐSSÊõÊV ÐUÐVŠÐ©ÐVZÊ”ÊV ÐUÐVŠÐ©ÐVZÊÊU Ð=ÐUŠÐ‘ÐU^ÊÊP Ð$ÐP$Ð=ÐuŠÐ‘ÐuÁÊõÊV1ÇTÇTË:ËT:Ë>Ë ت#ìÏóÏT1ÇgÇSËVËSìÏ ÐS1ÇTÇPËËPË>ËsìÏóÏs@ΠÎVÅÎÓÎVÓÎãÎ^ãÎ ÏVī۫sÄ«¬3ŸÄ«¬1ŸÄ«¬ è ŸÄ«¬3ŸÄ«¬ » Ÿ€ÑóÑUóÑŠÕ‘ˆŠÕÇÕóUŸÇÕ4Ö‘ˆ4ÖDÖUDÖ¡Ö‘ˆ¡ÖÄÖóUŸÄÖëÖ‘ˆëÖÙóUŸÙ3Ú‘ˆ3ÚyÚUyÚ;Û‘ˆ;ÛHÛóUŸHÛ]Û‘ˆ]ÛoÛóUŸoÛ ó‘ˆ ó%óóUŸ%óeö‘ˆeö’øóUŸ’øÖø‘ˆÖø3ùóUŸ3ùHù‘ˆHùfùóUŸfùoù‘ˆoùŽùóUŸŽùôû‘ˆ€ÑóÑTóÑ=ÒS=Ò4ÖóTŸ4Ö¡ÖS¡Ö3ÚóTŸ3Ú!ÛS!ÛHÛóTŸHÛ]ÛS]ÛoÛóTŸoÛƒÛSƒÛÞÛóTŸÞÛ#ÜS#ÜfÜóTŸfÜÜÜSÜÜðàóTŸðàùàSùàôûóTŸ€ÑóÑQóÑ4ÖóQŸ4ÖDÖQDÖ3ÚóQŸ3Ú}ÚQ}Ú!Û\!ÛÞÛóQŸÞÛ#Ü\#ÜfÜóQŸfÜÜÜ\ÜÜðàóQŸðàùà\ùàôûóQŸ©ÑóÑ0ŸóÑùÑ‘ 4Ö¡Ö0Ÿ3Ú!Û0ŸÞÛ#Ü0ŸfÜÜÜ0Ÿðàùà0Ÿ©ÑóÑ0ŸóÑùÑ‘¨4Ö¡Ö0Ÿ3Ú!Û0ŸÞÛ#Ü0ŸfÜÜÜ0Ÿðàùà0Ÿ©ÑóÑ0ŸóÑùÑ‘°4Ö¡Ö0Ÿ3Ú!Û0ŸÞÛ#Ü0ŸfÜÜÜ0Ÿðàùà0Ÿ©Ñ€Ö0Ÿ€Ö¡Ö ŸÄÖÜ0ŸÜ#Ü Ÿ#Ü‘Ü0Ÿ‘Ü–Ü Ÿ–ÜÏÜ0ŸÏÜÜÜ ŸÜÜ ó0Ÿ%óôû0Ÿ©Ñ€Ö0Ÿ€Ö¡Ö X ŸÄÖÜ0ŸÜ#Ü X Ÿ#Ü‘Ü0Ÿ‘Ü–Ü X Ÿ–ÜÏÜ0ŸÏÜÜÜ X ŸÜÜ ó0Ÿ%óôû0Ÿ©Ñ€Ö0Ÿ€Ö‡Ö Ð!Ÿ‡ÖžÖTÄÖÜ0ŸÜ#Ü ½!Ÿ#Ü‘Ü0Ÿ‘Ü–Ü Á!Ÿ–ÜÏÜ0ŸÏÜÜÜ ¸!ŸÜÜ ó0Ÿ%óôû0Ÿ…Ú¤ÚP¤Ú³Ú}Ÿ³Ú!Û]ÞÛ#Ü]fÜÜÜ]ðàùà}Ÿ4ÖDÖV<Ú!ÛVÞÛ#ÜVfÜÜÜVðàùàVÞÛÜ2ŸÞÛÜ3ŸÞÛÜ1ŸÞÛÜ è ŸÞÛ#Ü3ŸÞÛÜ » Ÿ–ÜÏÜ1Ÿ–ÜÏÜ3Ÿ–ÜÏÜ è Ÿ–ÜÜÜ3Ÿ–ÜÏÜ » ŸóÑùÑ‘°óÑùÑ‘¨óÑùÑ‘ óÑŠÕ‘ˆÇÕ4Ö‘ˆÄÖëÖ‘ˆÙ3Ú‘ˆ!Û;Û‘ˆHÛ]Û‘ˆoÛÞÛ‘ˆ#ÜfÜ‘ˆÜÜðà‘ˆùà ó‘ˆ%óeö‘ˆ’øÖø‘ˆ3ùHù‘ˆfùoù‘ˆŽùôû‘ˆóÑ7Ò0Ÿ7ÒKÒUKÒÊÓVÊÓÞÓUçÔ4ÖVÄÖ3ÚV!ÛHÛVHÛ]Û0Ÿ]ÛoÛVoÛ³Û0Ÿ³ÛÞÛV#Ü3ÜV3Ü@ÜU@ÜBÜ[BÜMÜ‘è~óÑ4Ö0ŸÄÖ‘×0Ÿ‘×Ë×SË×3Ú0Ÿ!Û;Û0Ÿ;ÛHÛSHÛÞÛ0Ÿ#ÜfÜ0ŸÜÜðà0Ÿùà ó0Ÿ%óôû0ŸóÑÒ0ŸÒ ÒP Ò4Ö]ÄÖG×]Ë×ó×]SØ3Ú]!Û;Û]HÛ]ÛP]ÛoÛ0ŸoÛÞÛ]#ÜfÜ]ÜÜðà]ùà ó]%óq÷]q÷¬÷0Ÿ¬÷#ù]#ù3ù0Ÿ3ùôû]óÑÒ0ŸÒñÓ\ñÓçÔ0ŸçÔ4Ö\ÄÖG×\Ë×ó×\SØ3Ú\!Û;Û\HÛ³Û0Ÿ³ÛÞÛ\#ÜMÜ\MÜfÜ0ŸÜÜxÝ0ŸüÞ[à0Ÿ“àÅà0ŸÕã&ä0ŸHæžæ0Ÿ çHç\’éœé\œé?êSUêxë0ŸxëÒëSÒë"ì0ŸDìüì0Ÿ¨íîSRî’îS’îŸî\ŸîæîSæîñî\ñîoïSoïwï\wïMñ0Ÿ%óõó0Ÿô=ô0ŸuôÖô0Ÿ÷¬÷0ŸEø’ø0Ÿ#ù3ù0ŸŽù¹ù0Ÿ¹ùÓùSÓùÛù\þùoú0ŸØú û0Ÿ,û¿û0Ÿ'Ò7Ò0Ÿ7Ò=ÒU=ÒKÒ^KÒÂÓ~ŸÂÓ‡Ô^‡ÔçÔ0ŸçÔgÕ~ŸÇÕ4Ö~ŸÄÖãÖ~ŸÙqÙ~ŸyÙíÙ~ŸúÙ(Ú~Ÿ!Û;Û~Ÿ³ÛÖÛ~Ÿ#Ü3Ü~Ÿ3ÜfÜ^ÜÜæÜ0Ÿ@Þ§Þ0ŸüÞQß^ߨß^µßÝß^Ýßà0Ÿà>à1Ÿµá¿á0ŸûâUã0Ÿ&äYä0ŸYä‡ä1ŸPåZå0ŸêæHç0Ÿ•èÃè0ŸÃèìè1Ÿ’éœé0Ÿëxë0Ÿÿë"ì0Ÿíìí0Ÿìíî1Ÿ/îRî0Ÿ‹ð°ð^°ðºð0Ÿ6ò™ò0Ÿ%óDó^Dóó0Ÿó¹ó1ŸBöeö0Ÿ²øïø0Ÿïø#ù1ŸHùfù1ŸfùŽù0Ÿ¹ùþù1Ÿú8ú1Ÿ8úoú0Ÿjûû^û¥û1Ÿ¿ûßû1ŸóÑ=Ò0ŸFÒZÒVZÒ~Ó0ŸbÔ|Ô0Ÿ|ÔŽÔPŽÔ«ÔX«ÔÕÔ‘ð~çÔüÔVüÔÕ0ŸoÕ­ÕX­ÕÇÕ‘ø~ÿÕ4Ö0ŸÄÖëÖ0ŸëÖûÖXÙHÙ0ŸyÙÚ0Ÿ!Û;Û0ŸHÛÞÛ0Ÿ#Ü3Ü0ŸÜܑܿð~ÝôÝ0ŸeÞ˜Þ‘ð~§ÞÙÞ0ŸÐßÝßPÝßàX>àðà0Ÿùà‡á0Ÿµá¿á‘ð~eâUã0Ÿ‡ãÅã0ŸÕã&ä0Ÿ@ä‡äVÏäâå0ŸHæHç0ŸŽç±ç0ŸèXè0Ÿ•è é0Ÿ;émé0Ÿ’é$ê0ŸÿëìXì"ì‘ð~Dì/î0Ÿ/îRîVRîÉî0ŸñîBï0ŸÙõ[ö0Ÿ÷¬÷0ŸEø’ø0Ÿ#ùHù0ŸŽùÛù0ŸÛùéùVéùþùXþùú0ŸŽú£ú0Ÿ¥ûôû0ŸóÑ}Ò0Ÿ°ÒíÒS’ÓEÔ0Ÿ§ÔçÔ_çÔüÔ0ŸüÔÕS<ÕoÕ0ŸoÕŠÕQŠÕÇÕ_éÕÿÕ0Ÿ Ö4Ö‘è~ëÖG×_Ë×ó×_SØÙ_Ù.Ù0Ÿ!Û6Û‘è~HÛ³Û0Ÿ³ÛÆÛSÆÛÞÛ_#ÜMÜ0ŸÜÜæÜ_æÜ ÝV Ý§Þ0Ÿ§ÞÙÞVÙÞß0ŸµßÐß0Ÿ÷ßyàVyàà_“àÓàVÓàðà_ùà=â0ŸªãÕã0ŸÕã&äV&äŸä0ŸHægæ0ŸÀæÚæ0ŸÚæñæPñæHç_±çÙç0ŸXè•è0Ÿ’é³é_³é½ê0Ÿ8ëxë_xëÒë0Ÿÿë"ìVDì²ì0Ÿíî_î/îP/î ð0ŸOð°ð0Ÿ°ðºð_ºðiñVñ™ò0Ÿ™òóòVóò ó0Ÿ%óDó0Ÿ^óôVôô_ô`ôV`ôuô_uôÖôVÖôö0Ÿ[ö¡ö0Ÿ¡öÅöPÅö÷_÷%÷0Ÿ%÷9÷P9÷q÷_q÷|÷0Ÿ|÷Š÷PŠ÷¬÷S¬÷°÷P°÷ø_ø&øP&ømø_mø’øP’ø#ù0Ÿ#ù3ùPHù¹ù0Ÿ¹ùÛù_Ûùú0Ÿú&úV&ú8ú_8úoúVoúû0ŸûûVû¥û_óÑ›Ò0Ÿ›ÒºÒYÄÒÈÒYÈÒÞÒ‘è~ÞÒ²Ô0Ÿ²ÔçÔPçÔüÔ0ŸüÔÕYÕÕ‘è~ÕoÕ0ŸoÕŠÕQŠÕ­ÕY­ÕÇÕ‘ˆÇÕÿÕ0Ÿ Ö4Ö0ŸÄÖëÖ0ŸëÖûÖYÙ3Ú0Ÿ!Û;Û0ŸHÛ³Û0Ÿ³ÛÃÛ‘è~#ÜfÜ0ŸÜÜæÜPæÜ=ÝY‚ݽÝ0ŸÞ0Þ0Ÿ0ÞGÞPGÞiÞYiÞ§Þ‘˜ÀÞÙÞ0ŸüÞà0Ÿà9àP9àTàYTàkà‘è~“à­àY­àÅà‘ð~ùà]á0Ÿµá¿á‘˜Öá¯â0ŸãIã‘ð~IãU㑘Uã‡ã0ŸÅãÕãP&äJäY‡äPå0ŸPåZå‘ð~ææ0ŸæLæPLægæ‘è~±çè0Ÿ0è•è0Ÿ¯èìèVÿë"ì0Ÿ"ìDìPDìiì‘è~/îBîYBîRî‘ð~‹ð°ð0Ÿ%óDó0ŸÙõþõ0ŸöBö0ŸBö[öVI÷¬÷0ŸEømø0Ÿ#ùHù0ŸŽùœù‘è~Žú£ú0Ÿjûû0Ÿû¥ûP¿ûÍûVÍûßûYßûôû0Ÿ†ÒÄÒ0ŸÄÒíÒ1ŸüÔÕ0ŸÿÕ4Ö0Ÿ!Û;Û0Ÿ³ÛÞÛ1ŸóÑÏÒ0ŸÏÒíÒPíÒLÓRˆÓ˜Ô0Ÿ§ÔoÕ0ŸoÕŠÕQŠÕÇÕSéÕÖ0ŸÖ/ÖP/Ö4ÖRÄÖëÖ0ŸëÖG×SË×ó×SSØÙSÙ.Ù0Ÿ.ÙAÙRAÙ^Ù‘è~yÙšÙRšÙºÙ‘ð~!Û;ÛPHÛ³Û0Ÿ³ÛÞÛP#ÜfÜ0ŸÜÜQÞ0ŸeÞáß0Ÿáß/àS/àðà0Ÿùà ã0Ÿã*ä0Ÿ*äxäSxä™è0Ÿ™èÝèSÝèCë0ŸCëxëPxëÿë0Ÿÿë"ìS"ì/î0Ÿ/îRîSRî°ð0Ÿ°ðºðPºðWñSWñ¦ñ0Ÿò!ò0Ÿ!ò=òP=òÆòSÆòóò0Ÿ%óŒó0ŸŒó´óP´óÖôSÖôQõ0ŸÙõBö0ŸBö–öS–ö’ø0Ÿ’ø²øP²ø#ùS#ùHù0ŸHùŽùSŽùÛù0ŸÛùþùSþùú0Ÿú8úP8úoú0ŸŽúû0Ÿû¥ûS¥û¿û0Ÿ¿ûßûSßûôû0ŸóÑoÕ0ŸoÕŠÕQŠÕÇÕ^ÇÕ4Ö0ŸÄÖëÖ0ŸëÖÙ^Ù3Ú0Ÿ!Û;Û0Ÿ;ÛHÛ^HÛ]Û0Ÿ]ÛoÛ^oÛÞÛ0Ÿ#ÜfÜ0ŸÜÜpÞ0ŸpÞ§ÞP§Þðà0Ÿùàµá0Ÿµá¿áP¿áGâ^Gâ‚â0ŸÑâëâ0ŸëâãPãnã^nã‡ã0Ÿªãdä0Ÿdä‚äP‚äÏä^Ïä(å0ŸPåqå^qåç0ŸçHçPHç±ç0Ÿ±çè^è èPXèìè^ìè’é0Ÿ’éœéPœé.ê^.ê|ê0Ÿäêþê0ŸþêëPë¥ë^¥ëÒë0Ÿÿë÷í0Ÿ÷íîPîî^îRî0ŸRîwï^wïôï0Ÿ ð+ðP‹ð°ð0Ÿ°ðÑð^Ñðçñ0Ÿ[ò™ò^™òóò0Ÿ%óDó0ŸDó¹ó^¹ó}õ0ŸõBö0ŸBöeö^eöäöVäöïö0Ÿïö÷P÷I÷^I÷T÷0ŸT÷u÷Pu÷¬÷^¬÷øVø&ø^&ømøPmø’ø^Ìø#ùV#ù3ù^HùVùVVùfù^fùŽùVŽù¹ù0Ÿ¹ùþùPþùú0Ÿúoú^oúKû0Ÿjû¿û0Ÿ¿ûßû^ßûôû0ŸóÑoÕ0ŸoÕŠÕQŠÕ­ÕZ­ÕÇÕ‘ÇÕ4Ö0ŸÄÖëÖ0ŸëÖûÖZÙ3Ú0Ÿ!Û;Û0ŸHÛÞÛ0Ÿ#ÜfÜ0ŸÜÜðà0Ÿùà&ã0Ÿ&ãUãPUãPå0ŸPåZåPZå§åZìåüæ0Ÿ çHç0ŸkçÎè0ŸÎèçèPçèéZé$é‘è~;éUéZUémé‘ð~’é$ë0Ÿ8ëüì0Ÿuí’í0Ÿ’íÈíZÈíØí‘˜ìíðíZðíîGò0Ÿ[ò ó0Ÿ%óHó0ŸHóhóZó…óZ…óªó‘˜ªó¶ø0Ÿ¶øÖøZïøóøZóøù‘ˆùHù0ŸHùfù‘ˆfùtùZtùŽù‘ˆŽù¹ù0Ÿ¹ùÛù‘˜Ûùú0Ÿú8ú‘˜8úUúZUúoú‘˜oú¿û0Ÿ¿ûßûPßûôû0ŸóÑoÕ0ŸoÕ­ÕQ­ÕÇÕ‘€ÇÕ4Ö0ŸÄÖëÖ0ŸëÖûÖQÙ3Ú0Ÿ!Û;Û0ŸHÛÞÛ0Ÿ#ÜfÜ0ŸÜÜðà0Ÿùàfò0Ÿfò™òP™ò ó0Ÿ%ó[ö0Ÿ[öeöPeöšöQšöÅö‘è~Åö¬÷0Ÿ¬÷Â÷‘è~Ù÷ø0Ÿøø‘è~&øúø0ŸúøùPù#ùQ#ùHù0ŸHùfùPfùôû0ŸóÑoÕ0ŸoÕ„Õ‘ð~ÇÕ4Ö0ŸÄÖëÖ0ŸëÖûÖ‘ð~Ù3Ú0Ÿ!Û;Û0ŸHÛ]Û0Ÿ]ÛoÛ ŸoÛ“Û0Ÿ“Û³Û Ÿ³ÛÞÛ0Ÿ#ÜfÜ0ŸÜÜðà0Ÿùà ó0Ÿ%óôû0ŸóÑoÕ0ŸoÕÇÕ X ŸÇÕ4Ö0ŸÄÖëÖ0ŸëÖ‘× X ŸË×Ù X ŸÙ3Ú0Ÿ!Û;Û0ŸHÛ]Û0Ÿ]ÛoÛ X ŸoÛ“Û0Ÿ“Û³Û X Ÿ³ÛÞÛ0Ÿ#ÜfÜ0ŸÜÜðà0Ÿùà ó0Ÿ%óôû0ŸóÑoÕ0ŸoÕ|Õ‘è~ÇÕ4Ö0ŸÄÖëÖ0ŸëÖûÖ‘è~Ù3Ú0Ÿ!Û;Û0ŸHÛ]Û0Ÿ]ÛoÛ‘è~oÛ“Û0Ÿ“Û³Û ý!Ÿ³ÛÞÛ0Ÿ#ÜfÜ0ŸÜÜðà0Ÿùà ó0Ÿ%óôû0ŸKÒZÒUçÔöÔUeÒuÒTuÒyÒ ª#Ù)ÙT)Ù.Ù ª##Ü*ÜTeÒ}ÒVÙ.ÙV#Ü3ÜVeÒyÒQÙ.ÙQ#Ü*ÜQ¨ÒíÒSüÔÕS³ÛÆÛSÆÛÞÛ_Ó~Ó0Ÿ.ÙHÙ0ŸyÙÚ0ŸÓLÓR.ÙAÙRAÙHÙ‘è~yÙšÙRšÙºÙ‘ð~Ó~ÓS.ÙHÙSyÙ¸ÙS¸ÙºÙ_ºÙËÙSËÙÚ_iÓqÓPqÓ~ÓXºÙÏÙXÏÙÚ‘ø~!ÓLÓX.ÙAÙXyÙšÙXšÙºÙ‘è~’Ó´ÓX<ÕQÕXQÕRÕ‘è~’Ó´Ó]<ÕRÕ]’ÓÐÓ]<ÕŠÕ]éÕÿÕ]–Ó°ÓP°Ó´ÓpŸ<ÕQÕPñÓÔSüÞSßSSßbßq\Ÿ‹ð°ðSjûûSÿÓÔPüÞßPß ßX‹ð¢ðXjûqûXüÞSßSSßbßq\Ÿ‹ð°ðSjûûSß)ßS‹ð°ðSjûûSß ßU‹ð¢ðUjûqûUß ßP‹ððPð¢ðujûqûuNßSßSSßbßq\ŸÔ.ÔT.Ô7Ô ت#µßËßTËßÐß ت#%ó1óTÔ7ÔX7ÔEÔ‘è~µßÐßX%ó1óX1óDó‘è~Ô7ÔQµßÐßQ%ó1óQîß>àVÿë"ìVûûVû¥û_ÝxÝ0Ÿ>à[à0Ÿ“àÅà0ŸÕã&ä0ŸÝ=ÝY>àTàYTà[à‘è~“à­àY­àÅà‘ð~ÝxÝV>à[àV“àÅàVÕã&äV^ÝkÝPkÝxÝ\Õã&ä\ÝxÝS>à[àS“àÅàSÕã&äS Ý½ÝSùàPáSPá\áq\ŸÙõþõSŽú£úS®Ý½ÝPùàáPááYÙõðõYŽú•úYùàPáSPá\áq\ŸÙõþõSŽú£úSá&áSÙõþõSŽú£úSááUÙõðõUŽú•úUááPÙõÝõPÝõðõuŽú•úuKáPáSPá\áq\ŸÈÝÝÝTÝÝæÝ ت#ªãÀãTÀãÅã ت#þõ öTÈÝæÝYæÝôÝ‘è~ªãÅãYþõ öY öö‘è~ÈÝæÝQªãÅãQþõ öQ7ä‡äV/îRîVÛùéùVéùþùXÖá=â0Ÿ‡äŸä0Ÿ±çÙç0ŸXè•è0ŸÖá=â^‡äŸä^±çÙç^Xè•è^Öá=âV‡äŸäV±çÙçVXè•èV(â0âP0â=â_Xè•è_áá=âS‡äŸäS±çÙçSXè•èSeâ‚âSÏäåSå'åq\ŸöBöSßûôûSsâ‚âPÏäÚäPÚäüä^ö=ö^ßûïû^ÏäåSå'åq\ŸöBöSßûôûSÖäüäSöBöSßûôûSÖäóäUö4öUßûæûUÚäóäPö!öP!ö4öußûæûuååSå'åq\Ÿâ¦âT0èFèTFèJè ت#3ù:ùTâ¯â^0èXè^3ùHù^â¦âQ0èJèQ3ù:ùQ¦èìèVBö[öV¿ûÍûVÍûßûYqåâå0Ÿìè é0Ÿ;émé0Ÿüìuí0Ÿqå§åZìèéZé é‘è~;éUéZUémé‘ð~qåâåVìè éV;éméVüì-íV-íFíYFíuíVÈåÕåPÕåâåXüìíXíuí‘ø~|åâåSìè éS;éméSüì<íSFíuíSHægæSDì¥ìS¥ì±ìq\ŸŽù¹ùSþùúSSægæPDìOìPOì{ì_Žù¯ù_þùú_Dì¥ìS¥ì±ìq\ŸŽù¹ùSþùúSKì{ìSŽù¹ùSþùúSKìmìUŽù¦ùUþùúUOìmìPŽù’ùP’ù¦ùuþùúu ì¥ìS¥ì±ìq\ŸræŒæTŒææ ت#Üì÷ìT÷ìüì ت#¥û¬ûTræžæ_Üìüì_¥û¿û_rææQÜìüìQ¥û¬ûQ íîS¹ùÓùSÓùÛù\³é$ê0ŸRîÉî0ŸñîBï0Ÿ³é$ê^RîÉî^ñîBï^³é$êSRî’îS’îŸî\ŸîÉîSñîBïS êêPê$êXRîeîXeîÉî‘ø~¾é$êVRî{îVŸîÉîVñîBïVUê|êSwïßïSßïóïq\ŸØú ûS,ûKûScê|êPwï‚ïP‚ï³ï^Øúþú^,û<û^wïßïSßïóïq\ŸØú ûS,ûKûS~ï¸ïSØú ûS,ûKûS~ï¥ïUØúõúU,û3ûU‚ï¥ïPØúÜúPÜúõúu,û3ûu‡êªêTOðoðToðsð ت#KûRûT‡ê½ê^Oð‹ð^Kûjû^‡êªêPOðSðPSðsð~KûRû~Uó¹óVú&úV&ú8ú_8úoúVÑðMñ0Ÿ¹óõó0Ÿô=ô0ŸuôÖô0ŸÑðMñS¹óõóSô=ôSuôÖôSÑðMñV¹óõóVô=ôVuôÖôV.ñ@ñP@ñMñ\uôÖô\Üð.ñ\¹óõó\ô=ô\ñ¦ñVÖôQõV£úØúV û,ûVñ¦ñPÖôáôPáôõS£úÉúS ûûSÖôxõV£úØúV û,ûVÝôõV£úØúV û,ûVÝôõU£úÀúU ûûUáôõP£ú§úP§úÀúu ûûuDõxõV±ñÔñTõ½õT½õÁõ ت#oúvúT±ñçñSõÙõSoúŽúS±ñÔñPõ¡õP¡õÁõsoúvúsÃø#ùVHùVùVVùfù^fùŽùVDÖ[ÖsDÖ€Ö3ŸDÖ€Ö1ŸDÖ€Ö è ŸDÖ‡Ö3ŸDÖ€Ö » Ÿ7ü¾ü0Ÿ5ý:0Ÿ:UPUoVo0ŸŒPŒÊVÊè0Ÿ™0ŸÉá0Ÿæ0Ÿ1B0ŸBWVW•0Ÿ•ÔVÔåPåóVó P X 0Ÿ7ü¾ü0Ÿ5ý³0Ÿ³ÄPÄ'S'20Ÿ2MPMoSo™0ŸÉá0Ÿæ0ŸS1BPB¡S¹ÅPÅX 0Ÿ7ü¾ü0Ÿ5ýv0Ÿv1ŸŽ0ŸŽ™1ŸÉÜ0ŸÜá]áá0Ÿæ0Ÿ1B0ŸBW9ŸW‡0Ÿ‡¡9Ÿ¹Å0ŸÅÔ]ÔX 0Ÿ7ü¾ü0Ÿ5ýv0Ÿv X ŸŽ0ŸŽ™ X ŸÉÜ0ŸÜá X Ÿáá0Ÿæ0Ÿ1 X Ÿ1B0ŸBW X ŸW‡0Ÿ‡¹ X Ÿ¹Å0ŸÅÔ X ŸÔX 0Ÿ7ü¾ü0Ÿ5ýv0Ÿv\Ž0ŸŽ™\ÉÜ0ŸÜá\áá0Ÿæ0Ÿ1B0ŸBW TŸW‡0Ÿ‡• TŸ•¡ TŸ¹Å0ŸÅÔ\ÔX 0Ÿþ!þ €~#Ÿ!þqþS¡þÄþSovSÿ'ÿS9[SkS²¿SÿÿSkS²¿SÿÿUkyU²¹U ÿÿQkyQ²¹Q9kSSP6 G P¶ûP& 7 PÑè\W‡\ÑèSW‡SâèPW^P^‡Võ[\p\y\\#\`\p\Õ\æ\P]Y]ò\]@]P]Þ^ð^ó^<_Ø_Š`paa b@b•`œ`¢`Pa`apaa b@bbœaÅaÒaÛa„b‰bb¢b°b×bäbébíbcc7cDc]chc–c c§c´cÍcØcddd$d=dHdvd€d‡d”d­d¸dædðd÷dee(eVe`egetee˜eÆeÐe×eäeýef6f@fGfTfmfxf¦f°f·fÈfÎfÑfRg`g¸gÈgëgìgîgh i!i k8kr$r)r-rBrPrwr‘rÓsès¢t¦t¨t¸ttvˆvCwTwYw]wrw€w§w½wx xAxExGxPxÏxáxz(zÞ{è{2@gE€`€lxþ‚ƒöƒ„v„z„|„„b…x…†W†e†f†l†o†x†·†Å†Æ†Ì†Ï†Ø†ä†ö†‡'‡4‡F‡P‡w‡„‡–‡ ‡Ç‡Ô‡æ‡ð‡ˆ$ˆ6ˆ@ˆgˆtˆ†ˆˆ·ˆÄˆÐˆØˆÿˆ‰&‰0‰W‰d‰v‰€‰§‰´‰Æ‰Ð‰÷‰ŠŠ ŠGŠTŠfŠpЗФжŠÀŠçŠôŠ‹‹7‹I‹¢‹¦‹¨‹°‹Ì‹Ð‹Ó‹à‹ú‹ ŒbŒfŒhŒpŒŒŒŒ“Œ ŒºŒÄŒÓŒàŒ&0Wds€§´ÃÐ÷ŽŽ ŽGŽTŽcŽpޗޤ޳ŽÀŽçŽôŽ7DV`‡”¦°×äö'4FPw„– ÇÔæð‘$‘6‘@‘g‘y‘Ò‘Ö‘Ø‘à‘ü‘’’’*’4’C’P’w’„’“’ ’Ç’Ô’ã’ð’“$“3“@“g“t“ƒ““·“ēӓà“””r”v”x”€”–”š”” ”·”ĔДؔÿ”•)•0•W•d•y•€•§•—&—v—µ—˜˜%˜g˜v˜±˜ç˜ó˜€˜“˜˜±˜ç˜ó˜"™E™™À™(š`šxš€šš·š™À™(š`šxš€šš·šE™o™`šxš€šš·šÞšE™I™P™e™`šxš€šš›5›˜›Ð›8œpœÀœ˜›Ð›8œpœÀœ5›O›pœ²œO›a›ˆ›˜›RŸàŸh Ð £M£¥£Å£ ¥¥¥@ h Ð ¢M£¥£Å£ ¥¥¥Ÿ·Ÿ£M£¥£Å£B¥¦@§€§è§€©°©(«z§€§è§•¨°©(«¦§(§@§€©°©R«‚«¨¬Ð¬H­:®¨¬Ð¬H­:®‚«i¬¬¨¬0­H­D®I®\®a®q®E°Ø²P³³(µµÀ¶ý¶H·É·V¹[¹c¹³(µý¶H·É·V¹[¹c¹E°¯²P³³À¶ý¶H·É·t¹y¹Œ¹‘¹¤¹å»¿€¿ ¿pÁØÁhÃ¥ÃðõÄRÅ‹ÅëÆðÆøÆ°¿pÁ¥ÃðõÄRÅ‹ÅëÆðÆøÆå»à¾€¿ ¿hÃ¥ÃðõÄRÅ‹ÅÇ ÇÇ!Ç4ÇdʰÍÀÐ(Ñ(ÓeÓ ÔóÔ#×(×0×`ÎÀÐeÓ ÔóÔ#×(×0×dʇÍ(ÓeÓ ÔóÔ"ØEبØàØHÙ€ÙÐÙÚ¨ØàØHÙ€ÙÐÙÚEØ_Ø€ÙÂÙÚ/Ú_Øqؘب؂چډÚÎÚðÚÛUÛ¡Û°ÛÄÛÐÛüÛÜÜÜQÜUÛYÛ`ÛuÛÜ ÜDÜQÜeܜܨÜÔÜØÜÚÜàÜ!ÝeÜiÜpÜÜàÜðÜÝ!ÝTÝ’Ý`ßpߨà¸á–âàâ;ãºã`ßpߨà¸á–âàâ;ãºã’Ýß0ß`ßÐߨà¸á–âàâ;ã¿ãÊã’ݗݞݶÝâ0âã+ã¿ÝÃÝÊÝâÝ0âPâ+ã;ãÞ3Þðßà)Þ3Þðßà|ÞÒÞPâ]â`âcâ€â–âàâøâþâãôã2äÀåÐå8çèöè@é‹é»éËéêÀåÐå8çèöè@é‹é»éËéê2ä™å0æ8çèöè@é‹é»éËé2ä7ä>äVäè0è{é‹é_äcäjä‚ä@è`è»éËé¼äÓäPæ`æÉäÓäPæ`æåoå°è½èàèöè@éXé^épé-ê/ê3êêêíê<ìPìßízêŠê°ëÀëŠêŽê•ê­êPìpì#í3í¶êÜêpì{ì5ëˆëuí‚í™íÑíííïíóíªî­îüïðŸñ:îJîpï€ïJîNîUîmîð0ðãðóðvîœî0ð;ðõîHï5ñBñYñ‘ñÄñ òXóhó ö÷iø°ø¼ÿìÿ0vXóhó ö÷iø°ø¼ÿìÿ0v ò.óÐó ö÷iø°ø¼ÿìÿ0vÆËò2ò÷F÷O÷Y÷‘ÿ¬ÿ¦¶÷+÷‘ÿ¬ÿ¦¶4÷F÷O÷Y÷2ò6ò=òUò€÷ ÷¬ÿ¼ÿÍ÷ß÷PøiøÙ÷ß÷Pøiøôbôø%ø(ø-øù8ù0û`û}ôœô°øîøþøù ¶Æ·øÓø ¶ÆÜøîøþøùœô ô§ô¿ôðúû 0mû„ûnÿ‘ÿyû„ûnÿ‘ÿ_ùÆùÈûÚûÝûàûpü ü þHþáùúüNü\üpüvËÛü3üvËÛ<üNü\üpüúú ú#úØýðý¦UþlþìÿbþlþìÿçüFý þ­þ°þ³þØþÿHÿnÿpw~¢¾ïì)AÕì6AÕìÆr‚…Õ/W€ˆ‹BÙ0hÐ< @hà]°< Ùù 0° · ¾ â þ / ,Di  ,v  , Z ² ¿  Å Ý o — À È Ë Í ‚p¨|€¨ ð|9`pð÷þ">ol„©ÁUl¶ÁUlFšòÿU¯×  ÂY°èP¼Àè`Ý0¼Yy °07>b~¯¬Ä镬ö•¬†Ú2?BE]•ï@HKM™ð(  ü! (   !p!ü!™¹àðp"w"~"¢"¾%ï%ì&')&A&Õ&ì&6&A&Õ&ì&Æ#$r&&‚&…&&Õ&/$W$€%ˆ%‹%%B'Ù'0(h(Ð(<*@(h(à(])°)<*Ù'ù' (0( *§*®*Ò*î-./4/Y.q.//f.q.//ö+J,¢.¯.².µ.Í./_,‡,°-¸-»-½-r/ 0`0˜01l2p0˜011à1l2 0)0P0`0Ð2×2Þ236O6L7d7‰6¡657L7–6¡657L7&4z4Ò6ß6â6å6ý6574·4à5è5ë5í5¢7988È809œ: 8È8@9½9:œ:98Y8€88;;;B;^>>Œ?¤?É>á>u?Œ?Ö>á>u?Œ?f<º<??"?%?=?u?Ï<÷< >(>+>->â?y@Ð@ApAÜBà@A€AýAPBÜBy@™@À@Ð@PCWC^C‚CžFÏFÌGäG G!GµGÌGG!GµGÌG¦DúDRG_GbGeG}GµGE7E`FhFkFmF"H¹HIHI°IK IHIÀI=JJK¹HÙHIIK—KžKÂKÞNO P$PIOaOõO PVOaOõO PæL:M’OŸO¢O¥O½OõOOMwM N¨N«N­NbPùPPQˆQðQ\S`QˆQR}RÐR\SùPQ@QPQÀSÇSÎSòSW?W‡p‡æŠ%‹!Œ@Œ[‹s‹ Œ!Œh‹s‹ Œ!Œëˆ?‰«‹¸‹Õ‹ ŒrŒM°ŽÀäc °0ŽxÀäcMiÀäÈÏÖ‘¯”î”Z–y–L•d•<–Z–Y•d•<–Z–ƒ’Ø’¦•³•¶•¹•ϕ땖<–²–—Зð—P˜š$š£šà—ð—p˜@™¸™š$š£š—®—š$š€ ‡ Ž œ w£’£'¥4¥ £¸£¥'¥­£¸£¥'¥F¢­¢ú£ ¤¤¤X¤Ĥ,›;›`p;›?›F›^›àŸ *¡@¡…›››p‘›››pü›Zœ@žVž       p nœ”œŸ©®Äb¥›¥à¥ð¥P¦ §D§¨à¥ð¥P¦ §D§¨›¥·¥ §D§à­ç­î­ü­×°ò°‡²”²±±c²‡² ±±c²‡²¦¯ °Z±l±o±r±¸±$²Œ¨›¨ÀªЪ›¨Ÿ¨¦¨¾¨@­`­Š® ®å¨û¨Ъðªñ¨û¨Ъðª\©º© «¶«`­m­p­s­€­ЭΩô©ÿª ««$«²û²@³P³°³€´¤´fµ@³P³°³€´¤´fµû²³€´¤´°···¾·ð·¼E¼à½¾œ¼´¼½à½©¼´¼½à½£¹ø¹ö¼½½ ½½;½n½½R¾-¿p¿¿ð¿ ÁÄÁC€¿¿ÀàÀXÁ ÁÄÁCÂ-¿N¿ ÁÄÁèÄïÄöÄÅPÑlÑ6ÓDӉѮÑÓ&Ó–Ñ®ÑÓ&Ó%ÐÐÜÑîÑñÑôÑÒ@Ò¨ÒàÒŠÂ©Â€Ä¾ÄÆÄÐÄ#Ñ>Ñ&Ó6ӇģÄ#Ñ>Ñ&Ó6ӬľįÄÐĩ­´ÂÌÂ`Ç€ÇlÑ|ÑÍÇãÇ ÊÁÊÙÇãÇ ÊÁÊãÅNÆ È2È5È9ÈàÈÉ4ËpËjƉÆpȮȿÈÉÈÎÈàÈÁÊàÊDÓTÓwÈ“ÈÁÊàÊDÓTӜȮȿÈÉÈÎÈàÈ‰ÆÆ”ƬÆàÊËàÒðÒ}Ë“ËÑ#щ˓ËÑ#Ñ2É™ÉÐËâËåËèˀ̰Ì5ÎpεÉÔÉÌVÌdÌnÌsÌ€ÌðÒÓTÓdÓÌ;ÌðÒÓTÓdÓDÌVÌdÌnÌsÌ€ÌÔÉØÉßÉ÷ÉðÍÎÓÓ}ΔΊҨ҉ΔΊҨÒ÷ÌUÍÐÎÝÎàÎãÎ0ÏPπϰÏâÓÔXÔhÔÐÔ ÕÄÕ†ÖXÔhÔÐÔ ÕÄÕ†ÖÔ2Ô ÕÄÕÀÞÇÞÎÞÜÞ?âZâä)äÍâæâøãäÛâæâøãäpàÅà,ã@ãTãaãdãgã©ãÎã¦×µ× Ú0Úµ×¹×Àר×Þ0Þ/â?âPØgØ`ÚÚPáSá\ØgØ`ÚÚÆØ$ÙEÝxݠ߲ߵ߸ßà0àuÙÙÛÛÛÛRä-åpååðå çÄçCè€ååæàæXç çÄçCè-åNå çÄç ð§ð®ð¼ð/ôJô+ö8ö½ôÖôö+öËôÖôö+öXò·òõ@õTõaõdõgõ¬õÑõféuéèëøëuéyé€é˜éðïðô/ôê'ê@ìpì@óCóê'ê@ìpì†êîê%ïXï€ñ’ñ•ñ˜ñèñò?ëgëðìøìúìüìbö=÷€÷ ÷ø°ùÔùSú÷ ÷ øðøhù°ùÔùSú=÷^÷°ùÔù°·¾Ìr‘Œ8]-8]pÍ| ¾ËÎÑ*OÀûÏû@þPþÏûÓûÚûòûà/jüüþÀþPSvüüþÀþàüHý$T˜ª­°à˜ýÀýðþøþúþüþ² Ð ð P  $ £ à ð p @ ¸  $ £  ®  $ ð÷þ Š¥äñ,DŽÉ9DŽÉ3˜”ÀÖçêí]Ž© ¹ 0@¹ ½ Ä Ü Èàù e{°ððóq{°ðßGˆ°8JMP|°w¥§ªÈÌ"ý@`Àp”P`à°(p”ýp”''''ž*½*Ù,ë,O+h+·,Ù,]+h+·,Ù,¸( )°+½+À+Ã+è+,S,a,d,f,x,“,RaÀ!Ð!ael„p&&*ž*ü  %P%)“)   %P%r Ð ”%Ä%è'ú'ý'(0(X( !H!¨"°"²"´"B-.`.€.à.0´031p.€./Ð/H00´031.>.0´0 :':.:<:þ=>D@V@¯>È>"@D@½>È>"@D@à;=<?? ?#?H?l?¾?Ñ?ã?þ?r22ð452…2Œ2¤29°9ß=þ=333@8p8ø<û<(333@8p8’3ú3´8ä8;;; ;P;€;J4r4Ð5Ø5Ú5Ü5²@AÐAðAPBD$D£DàAðApB@C¸CD$D£DA®AD$DˆKK–K¤KN1NNP[PVNnN*PNPcNnN*PNPéLPM°NÂNÅNÈNêNO"OSO*E9EÈGàG9E=EDE\EPJpJULeLƒE™EàGHE™EàGHõE]FpJ‚J…JˆJ°JèJ KK%KXKqF—FHHH4HõF\G|KˆKNNŒOžO¡O¤O¯O*P¢PÛPQ(QQ`R„RFSQ(QQ`R„RFSÛPòP`R„R(Z/Z6ZDZ¶\Ñ\î^û^ö\]Ê^î^]]Ê^î^‰[ð[P]b]e]h]Š]²]Â]ó]ÊSÙShV€VÙSÝSäSüSðXYõZ[#T9T€V V/T9T€V V•TýTY"Y%Y(YPYˆYªY¹YÅYøYU7U¯V¹V¾VÔV•UüUZ(Z¯\¶\,^>^A^D^O^Ê^B_{_¸_È_0`a$aæa¸_È_0`a$aæa{_’_a$abbbcbˆf˜fPiEj$kik§klˆf˜fPiEj$kik§klcbˆfgPiEj$kik§klHyMyMz®b½b e0e½bÁbÈbàb°hÐhikykcc0ePecc0ePe|cØcÐhÝhàhãhi0iEjOj[jˆjìcd^ehelee?dfd!n†n’nšn%yHyÓyçy(nLn%yHyÓyçyUn†n’nšnfdjdqd›d®nÉny%yênoxw•w÷noxw•wGl¶làUàXà[à“àÅàßã&ä”ݽÝùàKáNáPáSábáááÙõþõŽú£úá&áÙõþõŽú£ú/áKáNáPáSábááá½ÝÁÝÈÝôݪãÅãþõö3äJä/îaî@äJä/îaîÖá=â‡ä™äœäŸä±çÙç]è•èYâ‚âÏä-åHåPåöBößûôûÖäüäöBößûôûå-åHåPå‚â†ââ¯â0è]è3ùHù¢è¹èBö[ö¯è¹èBö[öqåâåìèéé é;émé í"í*í-í:íuí(æ/æ@æCæHægæDì ì£ì¥ì¨ì·ìÔìÜìŽù¹ùþùúKì{ìŽù¹ùþùú„ì ì£ì¥ì¨ì·ìÔìÜìgækæræžæÜì í¥û¿û³é$êaî{îî’îŸîÉîñî<ï?ïBï?ê|êwïäïêïùï ð ðØú û,ûKû~ï¸ïØú û,ûKûÁïäïêïùï ð ð|ê€ê‡ê½êOð‹ðKûjûQóhó8úoú^óhó8úoúÑðMñ¹óõóô7ô:ô=ô„ôÖôiñ¦ñÖô<õGõVõhõ}õ£úØú û,ûÝôõ£úØú û,û õ<õGõVõhõ}õ¦ñªñ±ñçñõÙõoúŽú¿øÖøfùŽùÌøÖøfùŽùü ü üü7üªü8ýPýþxþ¨þÈþ÷þ'ÿ.ÿ5ÿ9KQ²¿÷þþþÿ'ÿ9KQ[k²¿ÿÿk²¿9KQ['ÿ.ÿ5ÿ<ÿBÿ^ÿé÷A6 G ˜¦±é& 7 ÑèW‡@TX ðQ3SÈðh8 BPðH 0N PN àQ ðQ X p `/H5m#m#m# m#o#p#àq# §# ñÿ m# @S €S. ÐSD §#Sm#z T†m#¥ñÿ¼ @T  PTu pTÕ T. °T ÐTEá UI @UE¢ U °UEW V©¬ °V ÐVEi W©º ÐW  àWe ðW¾ Xpü pXH`p«#«¸«# ÀXh"x«#i 0YXÏ€«#  Yh€ ˆ«#Ë  ZX- «#v  `ZH× ˜«#  °ZX‡  «#Ö  [X7 ¨«#  p[1å  °[,  à[™c  €\>¼  À\™ `]8h  ]8à à]8 ^‘70ª#Q À^¿q`«#‡È«#“°«#ª €b]  àb]j @cgÁ °cg dgo dgÆ eg pegt àegË Pfg" ÀfKx i Î0«#û8«#  r]… €rÃâ«#  Pw]o °wÈ Ðx3"(«#I «#x ]Ø pŽ0øª#Oðª#v ƒÍ«#ï †]S €†]³ à†L 0‡Li €‡LÄ ЇL ˆLz pˆLÕ ÀˆD2 ‰L `‰Lç °‰L> ŠL• PŠLì  ŠLC ðŠLš @‹ºó ŒºS ÀŒL® L  `Ld °L¿ ŽL  PŽLu   ŽLÐ  ðŽL+! @L! Lè! àLC" 0Lž" €Lù" ÐLT# ‘L¯# p‘º $ 0’Le$ €’L¾$ Ð’L% “Lp% p“LÉ% À“L"& ”§~& À”DÝ& •L<'«#[' `•L²'èª#Ê' ðQCö'¸ª# (À«#(Ы#$( °•Cj( ™ãÍ(pª#à(Àw#W) ðš4´)hª#Ë) x#<* 0ê™*@ª#«*8ª#½*(ª#Ï*ˆª#á*€ª#ó*xª#+àx#8v+ ¥ Ô+ ª#å+è©#ö+À©#,˜©#,Ày#(Š, 0«ð,˜ª# - ª#)-ðy#£- @®# .¸©#.©#'.Ø©#9.°©#K.ˆ©#].à©#o.{#@ã. p¹ˆ F/ª#X/ª#j/à{#Há/ Ç0A0Щ#S0¨©#e0€©#w0 ~#`ë0 0×à 1 Ø4…1€x#þ1 @Ú 82 PÛ•2@«#²2 `ÜÁ3 0Ýšz3Ъ#’3€w# 4 ÐãOs4ª#’4È©#¤4 ©#¶4x©#È4 w# F5 ê¿­5Hª#Ç5P«#Þ5 àí¿=6  ñf¤6àª#º6ت#Õ6€}# P7 í7Xª#8 !m8°ª#8Àª#‘8 {# 9 P ¨9`ª#Â9 `!(:€{#¢: 2;  !‘;à|#< Д<Pª#®< à! =}#€= "> '!o>À|#â> P*öv? P/!Ö?`y#J@ €2öÞ@ €7!?A€y#´A °:LB À?!¯Bà}#&C ðB¾C H!!D~#˜D 0K0E @P!’EÀ}#F pSöœF pX!ýF y#rG  [H °`!uHÀ{#ïH àc‡I ðh!êIàz#aJ lùJ 0q!\K z#ÓK `tkL py!ÎLÀz#EM  |Í×Mð©#òM p‚QN@|# ÄN †½^O PŒÂO z# :P pËP –(Q x# ™Q °š 6R @¥Ë“Ràw# S ¨ °S  ²ËT@x# ŽT pµ½%U 0¾…U }# ùU PÂcV ÀÓËWÀx# yW Ö™ XȪ#+X 0äX€z# Y Pèè šY @öûY`z# pZ `ú, [ p[`{# è[ ° A {\ Ù\ y# K] Û] -9^ |# «^ @1K:_ @—_€|# ` °D ¬` €PËax# ˆa PS ;b _˧b`x# 'c ða]Œc@y# d Pzyod@{# íd Ð’0Ie }#H¹e«#Õep©#çe §q*Kf`|# Ãf €Ñt*+g@z# §g@¨# ºg€~#` Ðg¨ª#ägª#÷gH«#(h@¥#ˆrh`©#¹hà¢#ˆþhP©#Li€ #ˆ˜i@©#ßi ž#ˆ$j€s#;rj ©# ºj@š#ˆkà¨#0Jk`”#ˆ’kÀ¨# Þk`‘#ˆ(l€¨#0nl ‹#ˆ²l`¨# ülà‡#ˆDmr#3–mª#½mø©#ÑmÀs#*ÿm(v#n`u#%;n@t#/en u#%‰nt#/µnv#Ñnu#ðnv# o€t#+2oàu#Noàt#!roàv# ‡oûv#›oHv# ´oÈv# Êo¨v# âohw#òoðv# pew#pw# (p°u#Fp¸v# ]p°t#‚pbw#’p_w#¢p\w#²p%w#ÃpØv#Øp˜v# ðpˆv# qxv# qhv# 8qYw#HqVw#XqXv#pqSw#€qqw#ŽqPw#žqMw#®qÐu#Ëq!w#Üqw# îq8v# row#rJw#%rGw#5rDw#ErAw#Urmw#cr>w#sr;w#ƒr8w#“r5w#£rkw#±r2w#Ár/w#Ñr,w#ár)w#ñrÀŠ#à|R|`| o|{|Œ|›|­|Ê|Ù|ñ|}Ø«#}}+}:} §#F}À§#8›}¦}³}Ç}Ó}å}ô} ~~)~>~L~[~¨#8¬~º~Ë~Ø~è~ù~ #4FWiv"’ 0N˜®»ÉÝó üX €crtstuff.c__JCR_LIST__deregister_tm_clones__do_global_dtors_auxcompleted.7585__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrygraphicsPrimitives.cpp_ZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_17get_clipP7_objectS0__ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_5get_clipP7_objectS0__ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_5get_clipP7_objectS0__ZL71__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_7get_clipP7_objectS0__ZL70__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionP7_objectPFiS0_PvES1__ZL67__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionP7_object_ZL77__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_IntersectionP7_objectPFiS0_PvES1__ZL74__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_IntersectionP7_object_ZL71__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereP7_objectPFiS0_PvES1__ZL68__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereP7_object_ZL70__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_CylinderP7_object_ZL75__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeP7_objectPFiS0_PvES1__ZL72__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeP7_object_ZL66__pyx_tp_clear_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ConeP7_object_ZL72__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConeP7_object_ZL69__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_PlaneP7_object_ZL74__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ComplementP7_object_ZL25__pyx_bisect_code_objectsP26__Pyx_CodeObjectCacheEntryii_ZL68__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConeP11_typeobjectP7_objectS2__ZL69__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone_ZL17__pyx_empty_tuple_ZL64__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ConeP11_typeobjectP7_objectS2__ZL65__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_ZL70__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeP11_typeobjectP7_objectS2__ZL71__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_ZL68__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_CylinderP11_typeobjectP7_objectS2__ZL69__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_ZL66__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereP11_typeobjectP7_objectS2__ZL67__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_ZL65__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_PlaneP11_typeobjectP7_objectS2__ZL66__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane_ZL72__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_IntersectionP11_typeobjectP7_objectS2__ZL73__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection_ZL65__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionP11_typeobjectP7_objectS2__ZL66__pyx_vtabptr_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union_ZL70__pyx_tp_new_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ComplementP11_typeobjectP7_objectS2__ZL25__Pyx_PyObject_GetAttrStrP7_objectS0__ZL68__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ConeP7_object_ZL74__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeP7_object_ZL72__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_CylinderP7_object_ZL70__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereP7_object_ZL76__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_IntersectionP7_object_ZL69__pyx_tp_dealloc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionP7_object_ZL15__Pyx_SetVtableP7_objectPv_ZL20__pyx_n_s_pyx_vtable_ZL18__Pyx_AddTracebackPKciiS0__ZL16__pyx_code_cache_ZL7__pyx_d_ZL17__pyx_empty_bytes_ZL81__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_primitivesP7_objectPv_ZL77__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_primitivesP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r1P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z1P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y1P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x1P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__r0P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__z0P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__y0P7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__x0P7_objectPv_ZL68__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_11axisP7_objectS0__ZL71__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_1__repr__P7_object_ZL39__pyx_kp_s_Cone_g_g_g_g_g_g_g_g_clips_r_ZL31__pyx_kp_s_Cone_g_g_g_g_g_g_g_g_ZL84__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_primitivesP7_objectPv_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_1__repr__P7_object_ZL37__pyx_kp_s_SphereCone_g_g_g_g_g_g_g_g_ZL81__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_primitivesP7_objectPv_ZL71__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_9axisP7_objectS0__ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_1__repr__P7_object_ZL33__pyx_kp_s_Cylinder_g_g_g_g_g_g_g_ZL41__pyx_kp_s_Cylinder_g_g_g_g_g_g_g_clips_r_ZL79__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_primitivesP7_objectPv_ZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_3__repr__P7_object_ZL25__pyx_kp_s_Sphere_g_g_g_g_ZL33__pyx_kp_s_Sphere_g_g_g_g_clips_r_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_3__repr__P7_object_ZL28__pyx_kp_s_Plane_g_g_g_g_g_g_ZL73__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_CylinderP7_objectPFiS0_PvES1__ZL69__pyx_tp_traverse_6neuron_3rxd_10geometry3d_18graphicsPrimitives_ConeP7_objectPFiS0_PvES1__ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zhiP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_zloP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_yhiP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_yloP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xhiP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_xloP7_objectPv_ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_1get_clipP7_objectS0__ZL77__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_axislengthP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zhiP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_zloP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_yhiP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_yloP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xhiP7_objectPv_ZL70__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_xloP7_objectPv_ZL71__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_5set_clipP7_objectS0__ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_3set_clipP7_objectS0__ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r1P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z1P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y1P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x1P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__r0P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__z0P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__y0P7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__x0P7_objectPv_ZL81__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_axislengthP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zhiP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_zloP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_yhiP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_yloP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xhiP7_objectPv_ZL74__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_xloP7_objectPv_ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_7set_clipP7_objectS0__ZL72__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zhiP7_objectPv_ZL72__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_zloP7_objectPv_ZL72__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_yhiP7_objectPv_ZL72__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_yloP7_objectPv_ZL72__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xhiP7_objectPv_ZL72__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_xloP7_objectPv_ZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_15set_clipP7_objectS0__ZL78__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_primitivesP7_objectPv_ZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_3__repr__P7_object_ZL25__pyx_kp_s_Intersection_r_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_3__repr__P7_object_ZL18__pyx_kp_s_Union_r_ZL12__Pyx_ImportP7_objectS0_i.constprop.60_ZL16__pyx_n_s_import_ZL7__pyx_b_ZL7__pyx_m_ZL27__Pyx_ParseOptionalKeywordsP7_objectPPS0_S0_S1_lPKc.constprop.63_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_1__init__P7_objectS0_S0__ZL13__pyx_n_s_obj_ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_1__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_1__init__P7_objectS0_S0__ZL17__pyx_n_s_objects_ZZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_1__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_1__init__P7_objectS0_S0__ZL12__pyx_n_s_px_ZL12__pyx_n_s_py_ZL12__pyx_n_s_pz_ZL12__pyx_n_s_nx_ZL12__pyx_n_s_ny_ZL12__pyx_n_s_nz_ZZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_1__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_1__init__P7_objectS0_S0__ZL11__pyx_n_s_r_ZL11__pyx_n_s_x_ZL11__pyx_n_s_y_ZL11__pyx_n_s_z_ZZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_1__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_11set_neighborsP7_objectS0_S0__ZL19__pyx_n_s_neighbors_ZL26__pyx_n_s_neighbor_regions_ZZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_11set_neighborsP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3__init__P7_objectS0_S0__ZL12__pyx_n_s_y0_ZL12__pyx_n_s_z0_ZL12__pyx_n_s_x1_ZL12__pyx_n_s_y1_ZL12__pyx_n_s_z1_ZL12__pyx_n_s_x0_ZZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_3__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_7__init__P7_objectS0_S0__ZL12__pyx_n_s_r0_ZL12__pyx_n_s_r1_ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_7__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3__init__P7_objectS0_S0__ZL12__pyx_n_s_x2_ZL12__pyx_n_s_y2_ZL12__pyx_n_s_z2_ZZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_3__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL19__Pyx_PyObject_CallP7_objectS0_S0_.constprop.65_ZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_1__init__P7_objectS0_S0__ZZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_1__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL21__Pyx_WriteUnraisablePKciiS0_ii.isra.10.constprop.61_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_3__repr__P7_object_ZL23__pyx_kp_s_Complement_r_ZL84__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_primitivesP7_objectPv_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_5distanceP7_objectS0_S0__ZL18__pyx_n_s_distance_ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_5distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL85__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_7starting_pointsP7_objectS0_S0__ZL25__pyx_n_s_starting_points_ZL12__pyx_n_s_xs_ZL12__pyx_n_s_ys_ZL12__pyx_n_s_zs_ZZL85__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10Complement_7starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL86__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_primitivesP7_objectPv_ZL20__pyx_n_s_primitives_ZL17__pyx_builtin_sum_ZL78__pyx_getprop_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_primitivesP7_objectPv_ZL82__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_5starting_pointsP7_objectS0_S0__ZL16__pyx_n_s_bisect_ZL21__pyx_n_s_bisect_left_ZZL82__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_5starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL78__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_yP67__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeddi_ZL20__pyx_n_s_overlaps_y_ZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_yP7_objectS0_S0__ZL12__pyx_n_s_lo_ZL12__pyx_n_s_hi_ZZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_15overlaps_yP7_objectS0_S0_E16__pyx_pyargnames_ZL78__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_xP67__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeddi_ZL20__pyx_n_s_overlaps_x_ZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_xP7_objectS0_S0__ZZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_13overlaps_xP7_objectS0_S0_E16__pyx_pyargnames_ZL71__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_yP61__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Coneddi_ZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_yP7_objectS0_S0__ZZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_21overlaps_yP7_objectS0_S0_E16__pyx_pyargnames_ZL71__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_zP61__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Coneddi_ZL20__pyx_n_s_overlaps_z_ZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_zP7_objectS0_S0__ZZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_23overlaps_zP7_objectS0_S0_E16__pyx_pyargnames_ZL71__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_overlaps_xP61__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Coneddi_ZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_xP7_objectS0_S0__ZZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_19overlaps_xP7_objectS0_S0_E16__pyx_pyargnames_ZL73__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_xP63__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphereddi_ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_xP7_objectS0_S0__ZZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_9overlaps_xP7_objectS0_S0_E16__pyx_pyargnames_ZL73__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_yP63__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphereddi_ZL76__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_yP7_objectS0_S0__ZZL76__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_11overlaps_yP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_yP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConeddi_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_yP7_objectS0_S0__ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_11overlaps_yP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_zP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConeddi_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_zP7_objectS0_S0__ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_13overlaps_zP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_overlaps_xP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConeddi_ZL77__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_xP7_objectS0_S0__ZZL77__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_9overlaps_xP7_objectS0_S0_E16__pyx_pyargnames_ZL73__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_overlaps_zP63__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphereddi_ZL76__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_zP7_objectS0_S0__ZZL76__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_13overlaps_zP7_objectS0_S0_E16__pyx_pyargnames_ZL78__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_overlaps_zP67__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConeddi_ZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_zP7_objectS0_S0__ZZL81__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_17overlaps_zP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_zP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderddi_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_zP7_objectS0_S0__ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_25overlaps_zP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_xP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderddi_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_xP7_objectS0_S0__ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_21overlaps_xP7_objectS0_S0_E16__pyx_pyargnames_ZL75__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_overlaps_yP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderddi_ZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_yP7_objectS0_S0__ZZL78__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_23overlaps_yP7_objectS0_S0_E16__pyx_pyargnames_ZL72__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_within_coreP61__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Conedddi_ZL21__pyx_n_s_within_core_ZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_coreP7_objectS0_S0__ZZL74__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_9within_coreP7_objectS0_S0_E16__pyx_pyargnames_ZL76__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_within_coreP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderdddi_ZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_coreP7_objectS0_S0__ZZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_13within_coreP7_objectS0_S0_E16__pyx_pyargnames_ZL70__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_distanceP62__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Planedddi_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distanceP7_objectS0_S0__ZZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_5distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL70__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_distanceP62__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionP7_objectS2_S2_i_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distanceP7_objectS0_S0__ZZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_5distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL78__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_distanceP69__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_IntersectionP7_objectS2_S2_i_ZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distanceP7_objectS0_S0__ZZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_5distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL73__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_distanceP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewConedddi_ZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distanceP7_objectS0_S0__ZZL75__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_7distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL77__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_starting_pointsP62__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_PlaneP7_objectS2_S2_i_ZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_pointsP7_objectS0_S0__ZZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane_7starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL74__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder__distanceP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderdddi_ZL20__pyx_n_s_distance_2_ZL77__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distanceP7_objectS0_S0__ZZL77__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_19_distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL73__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_distanceP65__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinderdddi_ZL76__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distanceP7_objectS0_S0__ZZL76__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_17distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL76__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_distanceP67__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereConedddi_ZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distanceP7_objectS0_S0__ZZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_11distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL71__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_distanceP63__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Spheredddi_ZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distanceP7_objectS0_S0__ZZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_5distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL70__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone__distanceP61__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Conedddi_ZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distanceP7_objectS0_S0__ZZL73__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_17_distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL69__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_distanceP61__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Conedddi_ZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distanceP7_objectS0_S0__ZZL72__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_15distanceP7_objectS0_S0_E16__pyx_pyargnames_ZL77__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_starting_pointsP62__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_UnionP7_objectS2_S2_i_ZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_pointsP7_objectS0_S0__ZZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Union_7starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL85__pyx_f_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_starting_pointsP69__pyx_obj_6neuron_3rxd_10geometry3d_18graphicsPrimitives_IntersectionP7_objectS2_S2_i_ZL87__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_pointsP7_objectS0_S0__ZZL87__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_12Intersection_7starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_7starting_pointsP7_objectS0_S0__ZZL80__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_6Sphere_7starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL85__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_9starting_pointsP7_objectS0_S0__ZZL85__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_10SphereCone_9starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL71__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3__init__P7_objectS0_S0__ZZL71__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_3__init__P7_objectS0_S0_E16__pyx_pyargnames_ZL22__pyx_n_s_RxDException_ZL12__pyx_tuple__ZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_13starting_pointsP7_objectS0_S0__ZZL79__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_13starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL83__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_15starting_pointsP7_objectS0_S0__ZZL83__pyx_pw_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_15starting_pointsP7_objectS0_S0_E16__pyx_pyargnames_ZL13__pyx_methods_ZL16__pyx_string_tab_ZL14__pyx_n_s_main_ZL13__pyx_n_s_sum_ZL43__pyx_kp_s_At_least_one_Cone_radius_must_be_ZL68__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement_ZL65__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union_ZL63__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union_ZL72__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection_ZL70__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection_ZL65__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane_ZL63__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane_ZL72__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init___ZL66__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_ZL64__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_ZL68__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_ZL66__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_ZL70__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_ZL68__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_ZL64__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_ZL62__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_ZL68__pyx_vtable_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone_ZL66__pyx_type_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone_ZL76__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init___ZL33__pyx_n_s_neuron_rxd_rxdException_ZL14__pyx_n_s_test_ZL40__pyx_k_At_least_one_Cone_radius_must_be_ZL20__pyx_k_Complement_r_ZL28__pyx_k_Cone_g_g_g_g_g_g_g_g_ZL36__pyx_k_Cone_g_g_g_g_g_g_g_g_clips_r_ZL30__pyx_k_Cylinder_g_g_g_g_g_g_g_ZL38__pyx_k_Cylinder_g_g_g_g_g_g_g_clips_r_ZL22__pyx_k_Intersection_r_ZL25__pyx_k_Plane_g_g_g_g_g_g_ZL20__pyx_k_RxDException_ZL34__pyx_k_SphereCone_g_g_g_g_g_g_g_g_ZL22__pyx_k_Sphere_g_g_g_g_ZL30__pyx_k_Sphere_g_g_g_g_clips_r_ZL15__pyx_k_Union_r_ZL14__pyx_k_bisect_ZL19__pyx_k_bisect_left_ZL16__pyx_k_distance_ZL18__pyx_k_distance_2_ZL10__pyx_k_hi_ZL14__pyx_k_import_ZL10__pyx_k_lo_ZL12__pyx_k_main_ZL24__pyx_k_neighbor_regions_ZL17__pyx_k_neighbors_ZL31__pyx_k_neuron_rxd_rxdException_ZL10__pyx_k_nx_ZL10__pyx_k_ny_ZL10__pyx_k_nz_ZL11__pyx_k_obj_ZL15__pyx_k_objects_ZL18__pyx_k_overlaps_x_ZL18__pyx_k_overlaps_y_ZL18__pyx_k_overlaps_z_ZL18__pyx_k_primitives_ZL10__pyx_k_px_ZL10__pyx_k_py_ZL18__pyx_k_pyx_vtable_ZL10__pyx_k_pz_ZL9__pyx_k_r_ZL10__pyx_k_r0_ZL10__pyx_k_r1_ZL23__pyx_k_starting_points_ZL11__pyx_k_sum_ZL12__pyx_k_test_ZL19__pyx_k_within_core_ZL9__pyx_k_x_ZL10__pyx_k_x0_ZL10__pyx_k_x1_ZL10__pyx_k_x2_ZL10__pyx_k_xs_ZL9__pyx_k_y_ZL10__pyx_k_y0_ZL10__pyx_k_y1_ZL10__pyx_k_y2_ZL10__pyx_k_ys_ZL9__pyx_k_z_ZL10__pyx_k_z0_ZL10__pyx_k_z1_ZL10__pyx_k_z2_ZL10__pyx_k_zs_ZL69__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone_ZL69__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SkewCone_ZL65__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_ZL65__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cone_ZL74__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_4Cone_16_distance_ZL71__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_ZL71__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_SphereCone_ZL69__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_ZL69__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Cylinder_ZL78__pyx_doc_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8Cylinder_18_distance_ZL67__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_ZL67__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Sphere_ZL66__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane_ZL66__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Plane_ZL73__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection_ZL73__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Intersection_ZL66__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union_ZL66__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Union_ZL71__pyx_methods_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement_ZL71__pyx_getsets_6neuron_3rxd_10geometry3d_18graphicsPrimitives_Complement__FRAME_END____JCR_END____dso_handle_DYNAMIC__GNU_EH_FRAME_HDR__TMC_END___GLOBAL_OFFSET_TABLE_PyNumber_NegativePyUnicodeUCS4_DecodeUTF8PyList_NewPyString_FromStringAndSizePyExc_SystemErrorPyDict_Size_Py_ZeroStructPyMethod_Type_ITM_deregisterTMCloneTablePyFloat_TypePyList_AsTuplePyFrame_New__pyx_module_is_main_neuron__rxd__geometry3d__graphicsPrimitivesPy_InitModule4_64PyNumber_AddPyObject_GetAttrStringPyImport_AddModulePyObject_SetAttrStringPyWrapperDescr_TypePyErr_WarnEx_edataPyErr_NormalizeExceptionPyObject_RichComparePyCode_New_fini__stack_chk_fail@@GLIBC_2.4PyErr_SetStringPyExc_TypeErrorPyString_InternFromStringPyMem_ReallocPyErr_ExceptionMatchesPyTraceBack_Type_PyThreadState_CurrentPyOS_snprintfPyTraceBack_HerePyFloat_FromDoublePyType_ReadyPyDict_GetItemPyList_Append_Py_CheckRecursiveCall_Py_CheckRecursionLimitPyString_FromStringPyString_Type__gmon_start__PyTuple_NewPyObject_SetAttrPyErr_OccurredPyString_AsStringPyObject_CallFunctionObjArgs_Py_NoneStructPyExc_ZeroDivisionErrorPyFloat_AsDouble_endPyObject_IsTruePyExc_BaseException_Py_TrueStruct__bss_start__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_8SkewCone_2__init__PyDict_New_PyString_EqPyString_FromFormatPyDict_NextPyBaseObject_TypePyInt_FromLong_Jv_RegisterClassesPyExc_ImportErrorPyDict_SetItemPyExc_AttributeErrorPyObject_CallPyUnicode_Type__pyx_wrapperbase_6neuron_3rxd_10geometry3d_18graphicsPrimitives_5Plane___init__PyCapsule_NewPyType_IsSubtypePyErr_FormatPyExc_NameErrorPyModule_GetDict_ITM_registerTMCloneTablePyString_FormatPyObject_GetAttrsqrt@@GLIBC_2.2.5PyCFunction_TypePyBaseString_TypePyMem_Malloc__cxa_finalize@@GLIBC_2.2.5_initPyUnicodeUCS4_ComparePyTuple_PackPy_GetVersionPyObject_GC_UnTrackPyErr_WriteUnraisableinitgraphicsPrimitivesPyList_Type.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.got.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_rangesÈÈ$.öÿÿoððt8 hhÐ@8 8 HÿÿÿoBB¼UþÿÿoPdPP 5nBðHðH@x0N0NsPNPN~àQàQ‡ðQðQh¸X X  “p p ð$›`/`/ä©H5H5´1³m#m¿m#mËm#mÐ m# mð‚o#oðÙp#pØâàq#àqÀ5 è §# §8 í0 §4öÔ§@¨–ªÇú¤Ìô£+0˜p²6Ÿ"A]Aàð¯ŽãOÐ/¨3#Ë xc€neuron-7.5/share/lib/python/neuron/rxd/geometry3d/llgramarea.c000066400000000000000000000014551323325274500245370ustar00rootroot00000000000000#include double llgramarea(double* p0, double* p1, double* p2) { /* setup the vectors */ double a[] = {p0[0] - p1[0], p0[1] - p1[1], p0[2] - p1[2]}; double b[] = {p0[0] - p2[0], p0[1] - p2[1], p0[2] - p2[2]}; /* take the cross-product */ double cpx = a[1] * b[2] - a[2] * b[1]; double cpy = a[2] * b[0] - a[0] * b[2]; double cpz = a[0] * b[1] - a[1] * b[0]; return sqrt(cpx * cpx + cpy * cpy + cpz * cpz); } double llpipedfromoriginvolume(double* p0, double* p1, double* p2) { /* take the cross-product */ double cpx = p1[1] * p2[2] - p1[2] * p2[1]; double cpy = p1[2] * p2[0] - p1[0] * p2[2]; double cpz = p1[0] * p2[1] - p1[1] * p2[0]; /* vol = p0.dot(numpy.cross(p1, p2)) / 6. */ return p0[0] * cpx + p0[1] * cpy + p0[2] * cpz; } neuron-7.5/share/lib/python/neuron/rxd/geometry3d/marching_cubes2.c000066400000000000000000000502371323325274500254650ustar00rootroot00000000000000/* This file contains code adapted from p3d.py in http://code.google.com/p/pythonisosurfaces/source/checkout which was released under the new BSD license. accessed 31 July 2012 */ #include #include const int edgeTable[] = {0x0, 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00, 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90, 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30, 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0, 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60, 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0, 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950, 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0, 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0, 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650, 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0, 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460, 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0, 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230, 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190, 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x0}; /* CTNG:tritable */ const int triTable[256][16] = {{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1}, {3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1}, {4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1}, {9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1}, {10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1}, {5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1}, {8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1}, {2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1}, {11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1}, {5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1}, {11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1}, {11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1}, {9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1}, {6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1}, {6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1}, {8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1}, {7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1}, {3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1}, {9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1}, {8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1}, {0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1}, {6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1}, {10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1}, {10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1}, {0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1}, {3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1}, {9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1}, {8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1}, {3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1}, {10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1}, {10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1}, {7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1}, {1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1}, {11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1}, {8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1}, {0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1}, {7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1}, {7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1}, {10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1}, {0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1}, {7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1}, {9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1}, {6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1}, {4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1}, {10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1}, {8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1}, {1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1}, {10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1}, {10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1}, {9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1}, {7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1}, {3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1}, {7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1}, {3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1}, {6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1}, {9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1}, {1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1}, {4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1}, {7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1}, {6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1}, {0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1}, {6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1}, {0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1}, {11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1}, {6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1}, {5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1}, {9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1}, {1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1}, {10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1}, {0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1}, {5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1}, {11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1}, {9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1}, {7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1}, {2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1}, {9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1}, {1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1}, {10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1}, {2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1}, {0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1}, {0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1}, {9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1}, {5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1}, {5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1}, {9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1}, {1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1}, {3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1}, {4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1}, {9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1}, {11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1}, {2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1}, {9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1}, {3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1}, {1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1}, {4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1}, {0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1}, {1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; /* CTNG:interpedge */ void vi(double* p1, double* p2, double v1, double v2, double* out) { if (fabs(v2) < 0.000000000001) { /* printf("interesting: v1 = %g, v2 = %g\n", v1, v2); */ out[0] = p2[0]; out[1] = p2[1]; out[2] = p2[2]; return; } if (fabs(v1) < 0.000000000001) { /* printf("interesting: v1 = %g, v2 = %g\n", v1, v2); */ out[0] = p1[0]; out[1] = p1[1]; out[2] = p1[2]; return; } if (isinf(v1)) { printf("v1 is inf\n"); } if (isinf(v2)) { printf("v2 is inf\n"); } double delta_v = v1 - v2; if (fabs(delta_v) < 0.0000000001) { out[0] = p1[0]; out[1] = p1[1]; out[2] = p1[2]; return; } if (isinf(v1) || isinf(v2)) { /* printf("interesting. v1 = %g, v2 = %g\n", v1, v2); */ } double mu = v1 / delta_v; if (isnan(mu)) { printf("Should be impossible to get here. delta_v = %g, v1 = %g, v2 = %g\n", delta_v, v1, v2); } out[0] = p1[0] + mu * (p2[0] - p1[0]); out[1] = p1[1] + mu * (p2[1] - p1[1]); out[2] = p1[2] + mu * (p2[2] - p1[2]); } int find_triangles(double value0, double value1, double value2, double value3, double value4, double value5, double value6, double value7, double x0, double x1, double y0, double y1, double z0, double z1, double* out) { double position[8][3] = {{x0, y0, z0}, {x1, y0, z0}, {x1, y1, z0}, {x0, y1, z0}, {x0, y0, z1}, {x1, y0, z1}, {x1, y1, z1}, {x0, y1, z1}}; /* CTNG:domarch */ int cubeIndex = 0; if (value0 < 0) cubeIndex |= 1; if (value1 < 0) cubeIndex |= 2; if (value2 < 0) cubeIndex |= 4; if (value3 < 0) cubeIndex |= 8; if (value4 < 0) cubeIndex |= 16; if (value5 < 0) cubeIndex |= 32; if (value6 < 0) cubeIndex |= 64; if (value7 < 0) cubeIndex |= 128; if (isinf(value0)) printf("value0 is inf\n"); if (isinf(value1)) printf("value1 is inf\n"); if (isinf(value2)) printf("value2 is inf\n"); if (isinf(value3)) printf("value3 is inf\n"); if (isinf(value4)) printf("value4 is inf\n"); if (isinf(value5)) printf("value5 is inf\n"); if (isinf(value6)) printf("value6 is inf\n"); if (isinf(value7)) printf("value7 is inf\n"); int et = edgeTable[cubeIndex]; if (et == 0) return 0; double vertexList[12][3]; if (et & 1) vi(position[0], position[1], value0, value1, vertexList[0]); if (et & 2) vi(position[1], position[2], value1, value2, vertexList[1]); if (et & 4) vi(position[2], position[3], value2, value3, vertexList[2]); if (et & 8) vi(position[3], position[0], value3, value0, vertexList[3]); if (et & 16) vi(position[4], position[5], value4, value5, vertexList[4]); if (et & 32) vi(position[5], position[6], value5, value6, vertexList[5]); if (et & 64) vi(position[6], position[7], value6, value7, vertexList[6]); if (et & 128) vi(position[7], position[4], value7, value4, vertexList[7]); if (et & 256) vi(position[0], position[4], value0, value4, vertexList[8]); if (et & 512) vi(position[1], position[5], value1, value5, vertexList[9]); if (et & 1024) vi(position[2], position[6], value2, value6, vertexList[10]); if (et & 2048) vi(position[3], position[7], value3, value7, vertexList[11]); int* tt = triTable[cubeIndex]; int i, j, k, count; for (i = 0, count = 0; i < 16; i += 3, count++) { if (tt[i] == -1) break; for (k = 0; k < 3; k++) { for (j = 0; j < 3; j++) out[j] = vertexList[tt[i + k]][j]; out += 3; } } return count; } neuron-7.5/share/lib/python/neuron/rxd/geometry3d/scalarField.py000066400000000000000000000055251323325274500250510ustar00rootroot00000000000000import neuron import numpy class ScalarField: """ A scalar field. """ def __init__(self, xlo, xhi, ylo, yhi, zlo, zhi, dx, dtype=None): """ Parameters ---------- xlo : double Minimum x value. xhi : double Maximum x value. ylo : double Minimum y value. yhi : double Maximum y value. zlo : double Minimum z value. zhi : double Maximum z value. dx : double Spatial step size. dtype : string, optional Passed to :mod:`numpy` to define the data type. .. note The ScalarField may contain locations slightly beyond `(xhi, yhi, zhi)` if the extrema are not evenly divisible by `dx`, however the center point of the voxels will not exceed the bounds. """ # I'm implicitly taking dx = dy = dz here xs = numpy.arange(xlo, xhi, dx) ys = numpy.arange(ylo, yhi, dx) zs = numpy.arange(zlo, zhi, dx) # shift everything by half a voxel xs = xs + dx * 0.5 ys = ys + dx * 0.5 zs = zs + dx * 0.5 if xs[-1] > xhi: xs = xs[: -1] if ys[-1] > yhi: ys = ys[: -1] if zs[-1] > zhi: zs = zs[: -1] self._xs = xs self._ys = ys self._zs = zs self._dx = dx self._values = numpy.zeros([len(self._xs), len(self._ys), len(self._zs)], dtype=dtype) @property def shape(self): """The shape of the scalar field. This is a convenience property and is equal to self._values.shape.""" return self._values.shape def __getitem__(self, *args): """ Indexing in to the values of the mesh. This is a syntactic shorthand for `values[indices]`. Examples -------- To return the value from `mesh` whose position is `mesh.xs[0]`, `mesh.ys[1]`, `mesh.zs[2]`: >>> a = mesh.__getitem__(0, 1, 2) Equivalently, one can use the syntactic shorthand []: >>> a = mesh[0, 1, 2] Slices are also supported: >>> a = mesh[0 : 2, :, 1] """ return self._values(*args) @property def dx(self): """Discretization size of the grid.""" return self._dx @property def xs(self): """The x coordinates of the centers of the voxels.""" return self._xs @property def ys(self): """The y coordinates of the centers of the voxels.""" return self._ys @property def zs(self): """The z coordinates of the centers of the voxels.""" return self._zs @property def values(self): """State values.""" return self._values neuron-7.5/share/lib/python/neuron/rxd/geometry3d/setup.py000066400000000000000000000040051323325274500237700ustar00rootroot00000000000000# run with # python setup.py build_ext --inplace import sys nrn_srcdir = "../nrn" #mingw = 1 mingw = 0 instdir = "/home/hines/neuron/nrnmpi" if nrn_srcdir[0] != '/' : # TODO: is this right? nrn_srcdir = '../../../../../../' + nrn_srcdir from distutils.core import setup from distutils.extension import Extension def have_vc(): if not mingw: return False try: from distutils import spawn x = spawn.find_executable("cl") x = True if x is not None and "Microsoft" in x else False except: x = False return x try: import numpy except: setup() else: use_vc = have_vc() if use_vc: mpicc_bin = 'cl' mpicxx_bin = 'cl' else: mpicc_bin = "mpicc" mpicxx_bin = "mpic++" print (mpicxx_bin) import os os.environ["CC"]=mpicc_bin os.environ["CXX"]=mpicxx_bin define_macros=[] if mingw and sys.version_info[0] == 2: define_macros=[('MS_WIN64', None)] include_dirs = [nrn_srcdir + '/share/lib/python/neuron/rxd/geometry3d', '.', numpy.get_include()] srcdir = nrn_srcdir + '/share/lib/python/neuron/rxd/geometry3d/' # name='neuron/rxd/geometry3d', setup( ext_modules = [ Extension("graphicsPrimitives", sources=["graphicsPrimitives.cpp"], define_macros=define_macros, include_dirs=include_dirs), Extension("ctng", sources=["ctng.cpp"], define_macros=define_macros, include_dirs=include_dirs), Extension("surfaces", sources=["surfaces.cpp", "marching_cubes2.c", "llgramarea.c"], define_macros=define_macros, include_dirs=include_dirs)], ) # package_dir = {'': instdir + '/share/lib/python/neuron/rxd/geometry3d'} neuron-7.5/share/lib/python/neuron/rxd/geometry3d/setup.py.in000066400000000000000000000040341323325274500243770ustar00rootroot00000000000000# run with # python setup.py build_ext --inplace import sys nrn_srcdir = "@NRN_SRCDIR@" @BUILD_MINGW_TRUE@mingw = 1 @BUILD_MINGW_FALSE@mingw = 0 instdir = "@prefix@" if nrn_srcdir[0] != '/' : # TODO: is this right? nrn_srcdir = '../../../../../../' + nrn_srcdir from distutils.core import setup from distutils.extension import Extension def have_vc(): if not mingw: return False try: from distutils import spawn x = spawn.find_executable("cl") x = True if x is not None and "Microsoft" in x else False except: x = False return x try: import numpy except: setup() else: use_vc = have_vc() if use_vc: mpicc_bin = 'cl' mpicxx_bin = 'cl' else: mpicc_bin = "@CC@" mpicxx_bin = "@CXX@" print (mpicxx_bin) import os os.environ["CC"]=mpicc_bin os.environ["CXX"]=mpicxx_bin define_macros=[] if mingw and sys.version_info[0] == 2: define_macros=[('MS_WIN64', None)] include_dirs = [nrn_srcdir + '/share/lib/python/neuron/rxd/geometry3d', '.', numpy.get_include()] srcdir = nrn_srcdir + '/share/lib/python/neuron/rxd/geometry3d/' # name='neuron/rxd/geometry3d', setup( ext_modules = [ Extension("graphicsPrimitives", sources=["graphicsPrimitives.cpp"], define_macros=define_macros, include_dirs=include_dirs), Extension("ctng", sources=["ctng.cpp"], define_macros=define_macros, include_dirs=include_dirs), Extension("surfaces", sources=["surfaces.cpp", "marching_cubes2.c", "llgramarea.c"], define_macros=define_macros, include_dirs=include_dirs)], ) # package_dir = {'': instdir + '/share/lib/python/neuron/rxd/geometry3d'} neuron-7.5/share/lib/python/neuron/rxd/geometry3d/setup_local.py000066400000000000000000000014221323325274500251420ustar00rootroot00000000000000# run with # python setup.py build_ext --inplace from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy setup( cmdclass = {'build_ext': build_ext}, ext_modules = [ Extension("graphicsPrimitives", sources=["graphicsPrimitives.pyx"], include_dirs=[numpy.get_include()]), Extension("ctng", sources=["ctng.pyx"], include_dirs=[numpy.get_include()]), Extension("surfaces", sources=["surfaces.pyx", "marching_cubes2.c", "llgramarea.c"], include_dirs=[numpy.get_include()])], ) neuron-7.5/share/lib/python/neuron/rxd/geometry3d/surface.py000066400000000000000000000050331323325274500242620ustar00rootroot00000000000000from . import ctng from . import surfaces from . import triangularMesh import numpy from numpy import sqrt, fabs def surface(source, dx=0.25, internal_membranes=False, n_soma_step=100): """ Generates a triangularized mesh of the surface of a neuron. Parameters ---------- source : :func:`list`, ``nrn.SectionList``, or ``nrn.Import3D`` The geometry to mesh. dx : double, optional Underlying mesh used to generate the triangles. internal_membranes : [``True`` | ``False``], optional Set to True to not remove internal membranes. n_soma_step : integer, optional Number of pieces to slice a soma outline into. Returns ------- result : :class:`TriangularMesh` The mesh. Examples -------- A simple meshing of the entire NEURON morphology. >>> tri_mesh = geometry3d.surface(h.allsec()) #doctest: +SKIP Importing from Neurolucida with a coarser grid. >>> h.load_file('stdlib.hoc') 1.0 >>> h.load_file('import3d.hoc') 1.0 >>> cell = h.Import3d_Neurolucida3() >>> cell.input(filename_dot_asc) >>> tri_mesh = geometry3d.surface(cell, dx=0.5) Removal of the internal membranes is not necessary if the only goal is to plot the surface; here we use :mod:`mayavi.mlab`. >>> tri_mesh = geometry3d.surface([sec1, sec2, sec3], ... internal_membranes=True) >>> mlab.triangular_mesh(tri_mesh.x, tri_mesh.y, tri_mesh.z, ... tri_mesh.faces, color=(1, 0, 0)) >>> mlab.show() .. note:: The use of Import3D objects is recommended over lists of sections because the former preserves the soma outline information while the later does not. Up to one soma outline is currently supported. """ objects = ctng.constructive_neuronal_geometry(source, n_soma_step, dx) xlo = min(obj.xlo for obj in objects) ylo = min(obj.ylo for obj in objects) zlo = min(obj.zlo for obj in objects) xhi = max(obj.xhi for obj in objects) yhi = max(obj.yhi for obj in objects) zhi = max(obj.zhi for obj in objects) # I'm implicitly taking dx = dy = dz here # NOTE: triangulate_surface requires consistent discretization xs = numpy.arange(xlo - 3 * dx, xhi + 3 * dx, dx) ys = numpy.arange(ylo - 3 * dx, yhi + 3 * dx, dx) zs = numpy.arange(zlo - 3 * dx, zhi + 3 * dx, dx) return triangularMesh.TriangularMesh(surfaces.triangulate_surface(objects, xs, ys, zs, internal_membranes)) neuron-7.5/share/lib/python/neuron/rxd/geometry3d/surfaces.cpp000066400000000000000000036510531323325274500246130ustar00rootroot00000000000000#define _hypot hypot /* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__neuron__rxd__geometry3d__surfaces #define __PYX_HAVE_API__neuron__rxd__geometry3d__surfaces #include "string.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "math.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include #else #include #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "neuron/rxd/geometry3d/surfaces.pyx", "__init__.pxd", "type.pxd", }; #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":725 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":726 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":727 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":728 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":732 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":733 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":734 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":735 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":739 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":740 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":749 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":750 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":751 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":753 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":754 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":755 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":757 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":758 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":760 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":761 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":762 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif /*--- Type declarations ---*/ /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":764 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":765 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":766 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":768 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace); #else #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\ ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); #else #define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) #define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) #endif #define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2) static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); #define UNARY_NEG_WOULD_OVERFLOW(x)\ (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static void __Pyx_RaiseBufferFallbackError(void); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L); #define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\ __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L)) #else #define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L) #define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L) #endif typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CallUnboundCMethod0(cfunc, self)\ ((likely((cfunc)->func)) ?\ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) : __Pyx__CallUnboundCMethod0(cfunc, self)))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) #else #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); static CYTHON_INLINE int __Pyx_div_int(int, int); static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) PyErr_SetObject(PyExc_KeyError, args); Py_XDECREF(args); } return NULL; } Py_INCREF(value); return value; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION < 3 #define __Pyx_PyBytes_Join _PyString_Join #else #define __Pyx_PyBytes_Join _PyBytes_Join #endif #else static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); #endif static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static int __Pyx_Print(PyObject*, PyObject *, int); #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 static PyObject* __pyx_print = 0; static PyObject* __pyx_print_kwargs = 0; #endif static int __Pyx_PrintOne(PyObject* stream, PyObject *o); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); static int __Pyx_check_binary_version(void); #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif static PyObject *__Pyx_ImportModule(const char *name); static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ /* Module declarations from 'cython' */ /* Module declarations from 'neuron.rxd.geometry3d.surfaces' */ static int __pyx_v_6neuron_3rxd_10geometry3d_8surfaces_total_surface_tests; static int __pyx_v_6neuron_3rxd_10geometry3d_8surfaces_corner_tests; __PYX_EXTERN_C int find_triangles(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double *); /*proto*/ __PYX_EXTERN_C double llgramarea(double *, double *, double *); /*proto*/ __PYX_EXTERN_C double llpipedfromoriginvolume(double *, double *, double *); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltas(PyObject *, int, int, int); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_chunkify(PyObject *, PyObject *, PyObject *, PyObject *, int, double, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_triangulate_surface(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__triangulate_surface_given_chunks(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *, int, int, int, int, PyObject *, int __pyx_skip_dispatch); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_area(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_area(PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_volume(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "float_t", NULL, sizeof(__pyx_t_5numpy_float_t), { 0 }, 0, 'R', 0, 0 }; #define __Pyx_MODULE_NAME "neuron.rxd.geometry3d.surfaces" int __pyx_module_is_main_neuron__rxd__geometry3d__surfaces = 0; /* Implementation of 'neuron.rxd.geometry3d.surfaces' */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_min; static PyObject *__pyx_builtin_zip; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_sum; static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static char __pyx_k_B[] = "B"; static char __pyx_k_H[] = "H"; static char __pyx_k_I[] = "I"; static char __pyx_k_L[] = "L"; static char __pyx_k_O[] = "O"; static char __pyx_k_Q[] = "Q"; static char __pyx_k_b[] = "b"; static char __pyx_k_d[] = "d"; static char __pyx_k_f[] = "f"; static char __pyx_k_g[] = "g"; static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_k[] = "k"; static char __pyx_k_l[] = "l"; static char __pyx_k_p[] = "p"; static char __pyx_k_q[] = "q"; static char __pyx_k_x[] = "x"; static char __pyx_k_y[] = "y"; static char __pyx_k_z[] = "z"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k__3[] = ", "; static char __pyx_k_dx[] = "dx"; static char __pyx_k_dy[] = "dy"; static char __pyx_k_dz[] = "dz"; static char __pyx_k_hi[] = "hi"; static char __pyx_k_i1[] = "i1"; static char __pyx_k_j1[] = "j1"; static char __pyx_k_k1[] = "k1"; static char __pyx_k_lo[] = "lo"; static char __pyx_k_nx[] = "nx"; static char __pyx_k_ny[] = "ny"; static char __pyx_k_nz[] = "nz"; static char __pyx_k_os[] = "os"; static char __pyx_k_pt[] = "pt"; static char __pyx_k_x0[] = "x0"; static char __pyx_k_x1[] = "x1"; static char __pyx_k_xs[] = "xs"; static char __pyx_k_y0[] = "y0"; static char __pyx_k_y1[] = "y1"; static char __pyx_k_ys[] = "ys"; static char __pyx_k_z0[] = "z0"; static char __pyx_k_z1[] = "z1"; static char __pyx_k_zs[] = "zs"; static char __pyx_k_end[] = "end"; static char __pyx_k_min[] = "min"; static char __pyx_k_pop[] = "pop"; static char __pyx_k_sum[] = "sum"; static char __pyx_k_xhi[] = "xhi"; static char __pyx_k_xlo[] = "xlo"; static char __pyx_k_yhi[] = "yhi"; static char __pyx_k_ylo[] = "ylo"; static char __pyx_k_zhi[] = "zhi"; static char __pyx_k_zip[] = "zip"; static char __pyx_k_zlo[] = "zlo"; static char __pyx_k_data[] = "data"; static char __pyx_k_file[] = "file"; static char __pyx_k_join[] = "join"; static char __pyx_k_keys[] = "keys"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_size[] = "size"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_xbar[] = "xbar"; static char __pyx_k_ybar[] = "ybar"; static char __pyx_k_zbar[] = "zbar"; static char __pyx_k_areas[] = "areas"; static char __pyx_k_array[] = "array"; static char __pyx_k_isnan[] = "isnan"; static char __pyx_k_numpy[] = "numpy"; static char __pyx_k_print[] = "print"; static char __pyx_k_range[] = "range"; static char __pyx_k_start[] = "start"; static char __pyx_k_zeros[] = "zeros"; static char __pyx_k_append[] = "append"; static char __pyx_k_bisect[] = "bisect"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_neuron[] = "neuron"; static char __pyx_k_resize[] = "resize"; static char __pyx_k_value0[] = "value0"; static char __pyx_k_value1[] = "value1"; static char __pyx_k_value2[] = "value2"; static char __pyx_k_value3[] = "value3"; static char __pyx_k_value4[] = "value4"; static char __pyx_k_value5[] = "value5"; static char __pyx_k_value6[] = "value6"; static char __pyx_k_value7[] = "value7"; static char __pyx_k_values[] = "values"; static char __pyx_k_xrange[] = "xrange"; static char __pyx_k_has_neg[] = "has_neg"; static char __pyx_k_has_pos[] = "has_pos"; static char __pyx_k_objdist[] = "objdist"; static char __pyx_k_objects[] = "objects"; static char __pyx_k_product[] = "product"; static char __pyx_k_r_inner[] = "r_inner"; static char __pyx_k_r_outer[] = "r_outer"; static char __pyx_k_the_map[] = "the_map"; static char __pyx_k_tridata[] = "tridata"; static char __pyx_k_SkewCone[] = "SkewCone"; static char __pyx_k_distance[] = "distance"; static char __pyx_k_get_clip[] = "get_clip"; static char __pyx_k_local_xs[] = "local_xs"; static char __pyx_k_local_ys[] = "local_ys"; static char __pyx_k_local_zs[] = "local_zs"; static char __pyx_k_neighbor[] = "neighbor"; static char __pyx_k_position[] = "position"; static char __pyx_k_refcheck[] = "refcheck"; static char __pyx_k_enumerate[] = "enumerate"; static char __pyx_k_itertools[] = "itertools"; static char __pyx_k_new_index[] = "new_index"; static char __pyx_k_triangles[] = "triangles"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_chunk_objs[] = "chunk_objs"; static char __pyx_k_chunk_size[] = "chunk_size"; static char __pyx_k_max_chunks[] = "max_chunks"; static char __pyx_k_overlaps_x[] = "overlaps_x"; static char __pyx_k_overlaps_y[] = "overlaps_y"; static char __pyx_k_overlaps_z[] = "overlaps_z"; static char __pyx_k_position_4[] = "position[4]:"; static char __pyx_k_primitives[] = "primitives"; static char __pyx_k_bisect_left[] = "bisect_left"; static char __pyx_k_last_object[] = "last object:"; static char __pyx_k_store_areas[] = "store_areas"; static char __pyx_k_RuntimeError[] = "RuntimeError"; static char __pyx_k_at_g_g_g_d_g[] = "at (%g, %g, %g): d = %g"; static char __pyx_k_bisect_right[] = "bisect_right"; static char __pyx_k_print_values[] = "print_values"; static char __pyx_k_process_cell[] = "process_cell"; static char __pyx_k_starting_points[] = "starting_points"; static char __pyx_k_contains_surface[] = "contains_surface"; static char __pyx_k_big_number_matrix[] = "big_number_matrix"; static char __pyx_k_reject_if_outside[] = "reject_if_outside"; static char __pyx_k_graphicsPrimitives[] = "graphicsPrimitives"; static char __pyx_k_internal_membranes[] = "internal_membranes"; static char __pyx_k_tri_area_exception[] = "tri_area exception: "; static char __pyx_k_volume_inside_cell[] = "volume_inside_cell"; static char __pyx_k_i_e_global_item_d_r[] = " (i.e. global item %d: %r)"; static char __pyx_k_print_reject_reason[] = "print_reject_reason"; static char __pyx_k_tri_volume_exception[] = "tri_volume exception:"; static char __pyx_k_7f_7f_7f_7f_7f_7f_7f_7f[] = "%7f %7f %7f %7f %7f %7f %7f %7f"; static char __pyx_k_register_on_neighbor_map[] = "_register_on_neighbor_map"; static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static char __pyx_k_neuron_rxd_geometry3d_surfaces[] = "neuron.rxd.geometry3d.surfaces"; static char __pyx_k_home_hines_neuron_nrn_share_lib[] = "/home/hines/neuron/nrn/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx"; static char __pyx_k_last_obj_distance_to_position_4[] = "last obj distance to position[4]: "; static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7[] = "(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)"; static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static char __pyx_k_distance_to_position_4_with_ever[] = "distance to position[4] with everything but the last object:"; static char __pyx_k_grr_it_thinks_there_is_surface_w[] = "grr... it thinks there is surface when no nearby objects."; static char __pyx_k_item_d_in_grid_d_d_d_contains_pr[] = "item %d in grid(%d, %d, %d) contains previously undetected surface"; static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static char __pyx_k_would_normally_reject_because_at[] = "would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)"; static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static char __pyx_k_distance_to_position_4_with_ever_2[] = "distance to position[4] with everything:"; static PyObject *__pyx_kp_s_7f_7f_7f_7f_7f_7f_7f_7f; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_SkewCone; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_kp_s__3; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_areas; static PyObject *__pyx_n_s_array; static PyObject *__pyx_kp_s_at_g_g_g_d_g; static PyObject *__pyx_n_s_big_number_matrix; static PyObject *__pyx_n_s_bisect; static PyObject *__pyx_n_s_bisect_left; static PyObject *__pyx_n_s_bisect_right; static PyObject *__pyx_n_s_chunk_objs; static PyObject *__pyx_n_s_chunk_size; static PyObject *__pyx_n_s_contains_surface; static PyObject *__pyx_n_s_d; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_distance; static PyObject *__pyx_kp_s_distance_to_position_4_with_ever; static PyObject *__pyx_kp_s_distance_to_position_4_with_ever_2; static PyObject *__pyx_n_s_dx; static PyObject *__pyx_n_s_dy; static PyObject *__pyx_n_s_dz; static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_get_clip; static PyObject *__pyx_n_s_graphicsPrimitives; static PyObject *__pyx_kp_s_grr_it_thinks_there_is_surface_w; static PyObject *__pyx_n_s_has_neg; static PyObject *__pyx_n_s_has_pos; static PyObject *__pyx_n_s_hi; static PyObject *__pyx_kp_s_home_hines_neuron_nrn_share_lib; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_i1; static PyObject *__pyx_kp_s_i_e_global_item_d_r; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_internal_membranes; static PyObject *__pyx_n_s_isnan; static PyObject *__pyx_kp_s_item_d_in_grid_d_d_d_contains_pr; static PyObject *__pyx_n_s_itertools; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_j1; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_k1; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_kp_s_last_obj_distance_to_position_4; static PyObject *__pyx_kp_s_last_object; static PyObject *__pyx_n_s_lo; static PyObject *__pyx_n_s_local_xs; static PyObject *__pyx_n_s_local_ys; static PyObject *__pyx_n_s_local_zs; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_max_chunks; static PyObject *__pyx_n_s_min; static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; static PyObject *__pyx_n_s_neighbor; static PyObject *__pyx_n_s_neuron; static PyObject *__pyx_n_s_neuron_rxd_geometry3d_surfaces; static PyObject *__pyx_n_s_new_index; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_nx; static PyObject *__pyx_n_s_ny; static PyObject *__pyx_n_s_nz; static PyObject *__pyx_n_s_objdist; static PyObject *__pyx_n_s_objects; static PyObject *__pyx_n_s_os; static PyObject *__pyx_n_s_overlaps_x; static PyObject *__pyx_n_s_overlaps_y; static PyObject *__pyx_n_s_overlaps_z; static PyObject *__pyx_n_s_p; static PyObject *__pyx_n_s_pop; static PyObject *__pyx_n_s_position; static PyObject *__pyx_kp_s_position_4; static PyObject *__pyx_n_s_primitives; static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_print_reject_reason; static PyObject *__pyx_n_s_print_values; static PyObject *__pyx_n_s_process_cell; static PyObject *__pyx_n_s_product; static PyObject *__pyx_n_s_pt; static PyObject *__pyx_n_s_r_inner; static PyObject *__pyx_n_s_r_outer; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_refcheck; static PyObject *__pyx_n_s_register_on_neighbor_map; static PyObject *__pyx_n_s_reject_if_outside; static PyObject *__pyx_n_s_resize; static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_start; static PyObject *__pyx_n_s_starting_points; static PyObject *__pyx_n_s_store_areas; static PyObject *__pyx_n_s_sum; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_the_map; static PyObject *__pyx_kp_s_tri_area_exception; static PyObject *__pyx_kp_s_tri_volume_exception; static PyObject *__pyx_n_s_triangles; static PyObject *__pyx_n_s_tridata; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_value0; static PyObject *__pyx_n_s_value1; static PyObject *__pyx_n_s_value2; static PyObject *__pyx_n_s_value3; static PyObject *__pyx_n_s_value4; static PyObject *__pyx_n_s_value5; static PyObject *__pyx_n_s_value6; static PyObject *__pyx_n_s_value7; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_volume_inside_cell; static PyObject *__pyx_kp_s_would_normally_reject_because_at; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_x0; static PyObject *__pyx_n_s_x1; static PyObject *__pyx_kp_s_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7; static PyObject *__pyx_n_s_xbar; static PyObject *__pyx_n_s_xhi; static PyObject *__pyx_n_s_xlo; static PyObject *__pyx_n_s_xrange; static PyObject *__pyx_n_s_xs; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_y0; static PyObject *__pyx_n_s_y1; static PyObject *__pyx_n_s_ybar; static PyObject *__pyx_n_s_yhi; static PyObject *__pyx_n_s_ylo; static PyObject *__pyx_n_s_ys; static PyObject *__pyx_n_s_z; static PyObject *__pyx_n_s_z0; static PyObject *__pyx_n_s_z1; static PyObject *__pyx_n_s_zbar; static PyObject *__pyx_n_s_zeros; static PyObject *__pyx_n_s_zhi; static PyObject *__pyx_n_s_zip; static PyObject *__pyx_n_s_zlo; static PyObject *__pyx_n_s_zs; static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces__register_on_neighbor_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_the_map, PyObject *__pyx_v_pt, PyObject *__pyx_v_neighbor); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_2contains_surface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_k, PyObject *__pyx_v_objdist, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_dx, PyObject *__pyx_v_r_inner, PyObject *__pyx_v_r_outer, PyObject *__pyx_v_reject_if_outside, int __pyx_v_print_reject_reason); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_4process_cell(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_k, PyObject *__pyx_v_objects, PyArrayObject *__pyx_v_xs, PyArrayObject *__pyx_v_ys, PyArrayObject *__pyx_v_zs, PyArrayObject *__pyx_v_tridata, int __pyx_v_start, int __pyx_v_store_areas, PyArrayObject *__pyx_v_areas, int __pyx_v_print_values); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_6volume_inside_cell(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_k, PyObject *__pyx_v_objects, PyArrayObject *__pyx_v_xs, PyArrayObject *__pyx_v_ys, PyArrayObject *__pyx_v_zs); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_8chunkify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_v_chunk_size, double __pyx_v_dx); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_10triangulate_surface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_internal_membranes); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_12_triangulate_surface_given_chunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_internal_membranes, int __pyx_v_chunk_size, PyObject *__pyx_v_chunk_objs, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_store_areas, PyObject *__pyx_v_areas); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_14tri_area(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_triangles); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_16_tri_area(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_triangles, int __pyx_v_lo, int __pyx_v_hi); /* proto */ static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_18tri_volume(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_triangles); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_keys, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0}; static PyObject *__pyx_float_2_; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_4; static PyObject *__pyx_int_16; static PyObject *__pyx_int_50; static PyObject *__pyx_int_1000; static PyObject *__pyx_int_1215; static PyObject *__pyx_int_9999; static PyObject *__pyx_int_10000000; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_neg_2; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_codeobj__12; static PyObject *__pyx_codeobj__14; static PyObject *__pyx_codeobj__16; static PyObject *__pyx_codeobj__21; /* "neuron/rxd/geometry3d/surfaces.pyx":26 * * * def _register_on_neighbor_map(the_map, pt, neighbor): # <<<<<<<<<<<<<< * # does not assume neighbor relations are bidirectional * if pt in the_map: */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map = {"_register_on_neighbor_map", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_the_map = 0; PyObject *__pyx_v_pt = 0; PyObject *__pyx_v_neighbor = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_register_on_neighbor_map (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_the_map,&__pyx_n_s_pt,&__pyx_n_s_neighbor,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_map)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pt)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_register_on_neighbor_map", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_neighbor)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_register_on_neighbor_map", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_register_on_neighbor_map") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_the_map = values[0]; __pyx_v_pt = values[1]; __pyx_v_neighbor = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_register_on_neighbor_map", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._register_on_neighbor_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces__register_on_neighbor_map(__pyx_self, __pyx_v_the_map, __pyx_v_pt, __pyx_v_neighbor); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces__register_on_neighbor_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_the_map, PyObject *__pyx_v_pt, PyObject *__pyx_v_neighbor) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_register_on_neighbor_map", 0); /* "neuron/rxd/geometry3d/surfaces.pyx":28 * def _register_on_neighbor_map(the_map, pt, neighbor): * # does not assume neighbor relations are bidirectional * if pt in the_map: # <<<<<<<<<<<<<< * the_map[pt].append(neighbor) * else: */ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_pt, __pyx_v_the_map, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "neuron/rxd/geometry3d/surfaces.pyx":29 * # does not assume neighbor relations are bidirectional * if pt in the_map: * the_map[pt].append(neighbor) # <<<<<<<<<<<<<< * else: * the_map[pt] = [neighbor] */ __pyx_t_3 = PyObject_GetItem(__pyx_v_the_map, __pyx_v_pt); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_neighbor); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":28 * def _register_on_neighbor_map(the_map, pt, neighbor): * # does not assume neighbor relations are bidirectional * if pt in the_map: # <<<<<<<<<<<<<< * the_map[pt].append(neighbor) * else: */ goto __pyx_L3; } /* "neuron/rxd/geometry3d/surfaces.pyx":31 * the_map[pt].append(neighbor) * else: * the_map[pt] = [neighbor] # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_neighbor); __Pyx_GIVEREF(__pyx_v_neighbor); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_neighbor); if (unlikely(PyObject_SetItem(__pyx_v_the_map, __pyx_v_pt, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "neuron/rxd/geometry3d/surfaces.pyx":26 * * * def _register_on_neighbor_map(the_map, pt, neighbor): # <<<<<<<<<<<<<< * # does not assume neighbor relations are bidirectional * if pt in the_map: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._register_on_neighbor_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":42 * @cython.wraparound(False) * #cdef bint contains_surface(int i, int j, int k, objdist, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, double dx, double r_inner, double r_outer, bint reject_if_outside, bint print_reject_reason=False): * def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): # <<<<<<<<<<<<<< * cdef bint has_neg = False * cdef bint has_pos = False */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface = {"contains_surface", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_i = 0; PyObject *__pyx_v_j = 0; PyObject *__pyx_v_k = 0; PyObject *__pyx_v_objdist = 0; PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; PyObject *__pyx_v_dx = 0; PyObject *__pyx_v_r_inner = 0; PyObject *__pyx_v_r_outer = 0; PyObject *__pyx_v_reject_if_outside = 0; int __pyx_v_print_reject_reason; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("contains_surface (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_j,&__pyx_n_s_k,&__pyx_n_s_objdist,&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,&__pyx_n_s_dx,&__pyx_n_s_r_inner,&__pyx_n_s_r_outer,&__pyx_n_s_reject_if_outside,&__pyx_n_s_print_reject_reason,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objdist)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r_inner)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 9: if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r_outer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 10: if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reject_if_outside)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, 10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_print_reject_reason); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "contains_surface") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); values[9] = PyTuple_GET_ITEM(__pyx_args, 9); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = values[0]; __pyx_v_j = values[1]; __pyx_v_k = values[2]; __pyx_v_objdist = values[3]; __pyx_v_xs = values[4]; __pyx_v_ys = values[5]; __pyx_v_zs = values[6]; __pyx_v_dx = values[7]; __pyx_v_r_inner = values[8]; __pyx_v_r_outer = values[9]; __pyx_v_reject_if_outside = values[10]; if (values[11]) { __pyx_v_print_reject_reason = __Pyx_PyObject_IsTrue(values[11]); if (unlikely((__pyx_v_print_reject_reason == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_print_reject_reason = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("contains_surface", 0, 11, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.contains_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_2contains_surface(__pyx_self, __pyx_v_i, __pyx_v_j, __pyx_v_k, __pyx_v_objdist, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_dx, __pyx_v_r_inner, __pyx_v_r_outer, __pyx_v_reject_if_outside, __pyx_v_print_reject_reason); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_2contains_surface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_k, PyObject *__pyx_v_objdist, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_dx, PyObject *__pyx_v_r_inner, PyObject *__pyx_v_r_outer, PyObject *__pyx_v_reject_if_outside, int __pyx_v_print_reject_reason) { int __pyx_v_has_neg; int __pyx_v_has_pos; double __pyx_v_x; double __pyx_v_y; double __pyx_v_z; double __pyx_v_xbar; double __pyx_v_ybar; double __pyx_v_zbar; PyObject *__pyx_v_d = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *(*__pyx_t_12)(PyObject *); Py_ssize_t __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; Py_ssize_t __pyx_t_19; PyObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains_surface", 0); /* "neuron/rxd/geometry3d/surfaces.pyx":43 * #cdef bint contains_surface(int i, int j, int k, objdist, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, double dx, double r_inner, double r_outer, bint reject_if_outside, bint print_reject_reason=False): * def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): * cdef bint has_neg = False # <<<<<<<<<<<<<< * cdef bint has_pos = False * cdef double x, y, z */ __pyx_v_has_neg = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":44 * def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): * cdef bint has_neg = False * cdef bint has_pos = False # <<<<<<<<<<<<<< * cdef double x, y, z * */ __pyx_v_has_pos = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":48 * * global total_surface_tests, corner_tests * total_surface_tests += 1 # <<<<<<<<<<<<<< * * # sphere tests added 2012-12-10 */ __pyx_v_6neuron_3rxd_10geometry3d_8surfaces_total_surface_tests = (__pyx_v_6neuron_3rxd_10geometry3d_8surfaces_total_surface_tests + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":51 * * # sphere tests added 2012-12-10 * cdef double xbar = xs[i] + dx / 2. # <<<<<<<<<<<<<< * cdef double ybar = ys[j] + dx / 2. * cdef double zbar = zs[k] + dx / 2. */ __pyx_t_1 = PyObject_GetItem(__pyx_v_xs, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_v_dx, __pyx_float_2_, 2., 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xbar = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":52 * # sphere tests added 2012-12-10 * cdef double xbar = xs[i] + dx / 2. * cdef double ybar = ys[j] + dx / 2. # <<<<<<<<<<<<<< * cdef double zbar = zs[k] + dx / 2. * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_ys, __pyx_v_j); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_v_dx, __pyx_float_2_, 2., 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ybar = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":53 * cdef double xbar = xs[i] + dx / 2. * cdef double ybar = ys[j] + dx / 2. * cdef double zbar = zs[k] + dx / 2. # <<<<<<<<<<<<<< * * d = fabs(objdist(xbar, ybar, zbar)) */ __pyx_t_1 = PyObject_GetItem(__pyx_v_zs, __pyx_v_k); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_v_dx, __pyx_float_2_, 2., 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_zbar = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":55 * cdef double zbar = zs[k] + dx / 2. * * d = fabs(objdist(xbar, ybar, zbar)) # <<<<<<<<<<<<<< * if d <= r_inner: return True * if d >= r_outer and reject_if_outside: */ __pyx_t_2 = PyFloat_FromDouble(__pyx_v_xbar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyFloat_FromDouble(__pyx_v_ybar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyFloat_FromDouble(__pyx_v_zbar); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_objdist); __pyx_t_6 = __pyx_v_objdist; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble(fabs(__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_d = __pyx_t_3; __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":56 * * d = fabs(objdist(xbar, ybar, zbar)) * if d <= r_inner: return True # <<<<<<<<<<<<<< * if d >= r_outer and reject_if_outside: * if print_reject_reason: */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_d, __pyx_v_r_inner, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "neuron/rxd/geometry3d/surfaces.pyx":57 * d = fabs(objdist(xbar, ybar, zbar)) * if d <= r_inner: return True * if d >= r_outer and reject_if_outside: # <<<<<<<<<<<<<< * if print_reject_reason: * print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_d, __pyx_v_r_outer, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L5_bool_binop_done; } __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_reject_if_outside); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __pyx_t_11; __pyx_L5_bool_binop_done:; if (__pyx_t_10) { /* "neuron/rxd/geometry3d/surfaces.pyx":58 * if d <= r_inner: return True * if d >= r_outer and reject_if_outside: * if print_reject_reason: # <<<<<<<<<<<<<< * print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) * else: */ __pyx_t_10 = (__pyx_v_print_reject_reason != 0); if (__pyx_t_10) { /* "neuron/rxd/geometry3d/surfaces.pyx":59 * if d >= r_outer and reject_if_outside: * if print_reject_reason: * print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) # <<<<<<<<<<<<<< * else: * return False */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_xbar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyFloat_FromDouble(__pyx_v_ybar); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyFloat_FromDouble(__pyx_v_zbar); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __Pyx_INCREF(__pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_d); __Pyx_INCREF(__pyx_v_r_outer); __Pyx_GIVEREF(__pyx_v_r_outer); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_r_outer); __Pyx_INCREF(__pyx_v_dx); __Pyx_GIVEREF(__pyx_v_dx); PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_v_dx); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_would_normally_reject_because_at, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PrintOne(0, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":58 * if d <= r_inner: return True * if d >= r_outer and reject_if_outside: * if print_reject_reason: # <<<<<<<<<<<<<< * print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) * else: */ goto __pyx_L7; } /* "neuron/rxd/geometry3d/surfaces.pyx":61 * print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) * else: * return False # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } __pyx_L7:; /* "neuron/rxd/geometry3d/surfaces.pyx":57 * d = fabs(objdist(xbar, ybar, zbar)) * if d <= r_inner: return True * if d >= r_outer and reject_if_outside: # <<<<<<<<<<<<<< * if print_reject_reason: * print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) */ } /* "neuron/rxd/geometry3d/surfaces.pyx":66 * * # indeterminant from spheres; check corners * corner_tests += 1 # <<<<<<<<<<<<<< * #print 'corner_tests = %d out of total_surface_tests = %d' % (corner_tests, total_surface_tests) * for x in xs[i : i + 2]: */ __pyx_v_6neuron_3rxd_10geometry3d_8surfaces_corner_tests = (__pyx_v_6neuron_3rxd_10geometry3d_8surfaces_corner_tests + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":68 * corner_tests += 1 * #print 'corner_tests = %d out of total_surface_tests = %d' % (corner_tests, total_surface_tests) * for x in xs[i : i + 2]: # <<<<<<<<<<<<<< * for y in ys[j : j + 2]: * for z in zs[k : k + 2]: */ __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_xs, 0, 0, &__pyx_v_i, &__pyx_t_9, NULL, 0, 0, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_8 = 0; __pyx_t_12 = NULL; } else { __pyx_t_8 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_9))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_12(__pyx_t_9); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_x = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":69 * #print 'corner_tests = %d out of total_surface_tests = %d' % (corner_tests, total_surface_tests) * for x in xs[i : i + 2]: * for y in ys[j : j + 2]: # <<<<<<<<<<<<<< * for z in zs[k : k + 2]: * d = objdist(x, y, z) */ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_j, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_ys, 0, 0, &__pyx_v_j, &__pyx_t_5, NULL, 0, 0, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0; __pyx_t_14 = NULL; } else { __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_14(__pyx_t_5); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_6); } __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_y = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":70 * for x in xs[i : i + 2]: * for y in ys[j : j + 2]: * for z in zs[k : k + 2]: # <<<<<<<<<<<<<< * d = objdist(x, y, z) * if print_reject_reason: */ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_k, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_zs, 0, 0, &__pyx_v_k, &__pyx_t_6, NULL, 0, 0, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_16(__pyx_t_6); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_z = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":71 * for y in ys[j : j + 2]: * for z in zs[k : k + 2]: * d = objdist(x, y, z) # <<<<<<<<<<<<<< * if print_reject_reason: * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_objdist); __pyx_t_17 = __pyx_v_objdist; __pyx_t_18 = NULL; __pyx_t_19 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_17))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_17, function); __pyx_t_19 = 1; } } __pyx_t_20 = PyTuple_New(3+__pyx_t_19); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_7); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF_SET(__pyx_v_d, __pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":72 * for z in zs[k : k + 2]: * d = objdist(x, y, z) * if print_reject_reason: # <<<<<<<<<<<<<< * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) * if d <= 0: */ __pyx_t_10 = (__pyx_v_print_reject_reason != 0); if (__pyx_t_10) { /* "neuron/rxd/geometry3d/surfaces.pyx":73 * d = objdist(x, y, z) * if print_reject_reason: * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) # <<<<<<<<<<<<<< * if d <= 0: * has_neg = True */ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_20 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_20); __Pyx_INCREF(__pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_d); __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_20 = 0; __pyx_t_20 = __Pyx_PyString_Format(__pyx_kp_s_at_g_g_g_d_g, __pyx_t_7); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PrintOne(0, __pyx_t_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":72 * for z in zs[k : k + 2]: * d = objdist(x, y, z) * if print_reject_reason: # <<<<<<<<<<<<<< * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) * if d <= 0: */ } /* "neuron/rxd/geometry3d/surfaces.pyx":74 * if print_reject_reason: * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) * if d <= 0: # <<<<<<<<<<<<<< * has_neg = True * if d >= 0: */ __pyx_t_20 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_10) { /* "neuron/rxd/geometry3d/surfaces.pyx":75 * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) * if d <= 0: * has_neg = True # <<<<<<<<<<<<<< * if d >= 0: * has_pos = True */ __pyx_v_has_neg = 1; /* "neuron/rxd/geometry3d/surfaces.pyx":74 * if print_reject_reason: * print 'at (%g, %g, %g): d = %g' % (x, y, z, d) * if d <= 0: # <<<<<<<<<<<<<< * has_neg = True * if d >= 0: */ } /* "neuron/rxd/geometry3d/surfaces.pyx":76 * if d <= 0: * has_neg = True * if d >= 0: # <<<<<<<<<<<<<< * has_pos = True * if has_pos and has_neg: */ __pyx_t_20 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_10) { /* "neuron/rxd/geometry3d/surfaces.pyx":77 * has_neg = True * if d >= 0: * has_pos = True # <<<<<<<<<<<<<< * if has_pos and has_neg: * return True */ __pyx_v_has_pos = 1; /* "neuron/rxd/geometry3d/surfaces.pyx":76 * if d <= 0: * has_neg = True * if d >= 0: # <<<<<<<<<<<<<< * has_pos = True * if has_pos and has_neg: */ } /* "neuron/rxd/geometry3d/surfaces.pyx":78 * if d >= 0: * has_pos = True * if has_pos and has_neg: # <<<<<<<<<<<<<< * return True * */ __pyx_t_11 = (__pyx_v_has_pos != 0); if (__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L18_bool_binop_done; } __pyx_t_11 = (__pyx_v_has_neg != 0); __pyx_t_10 = __pyx_t_11; __pyx_L18_bool_binop_done:; if (__pyx_t_10) { /* "neuron/rxd/geometry3d/surfaces.pyx":79 * has_pos = True * if has_pos and has_neg: * return True # <<<<<<<<<<<<<< * * return False */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":78 * if d >= 0: * has_pos = True * if has_pos and has_neg: # <<<<<<<<<<<<<< * return True * */ } /* "neuron/rxd/geometry3d/surfaces.pyx":70 * for x in xs[i : i + 2]: * for y in ys[j : j + 2]: * for z in zs[k : k + 2]: # <<<<<<<<<<<<<< * d = objdist(x, y, z) * if print_reject_reason: */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":69 * #print 'corner_tests = %d out of total_surface_tests = %d' % (corner_tests, total_surface_tests) * for x in xs[i : i + 2]: * for y in ys[j : j + 2]: # <<<<<<<<<<<<<< * for z in zs[k : k + 2]: * d = objdist(x, y, z) */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":68 * corner_tests += 1 * #print 'corner_tests = %d out of total_surface_tests = %d' % (corner_tests, total_surface_tests) * for x in xs[i : i + 2]: # <<<<<<<<<<<<<< * for y in ys[j : j + 2]: * for z in zs[k : k + 2]: */ } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":81 * return True * * return False # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":42 * @cython.wraparound(False) * #cdef bint contains_surface(int i, int j, int k, objdist, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, double dx, double r_inner, double r_outer, bint reject_if_outside, bint print_reject_reason=False): * def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): # <<<<<<<<<<<<<< * cdef bint has_neg = False * cdef bint has_pos = False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.contains_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_d); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":88 * @cython.wraparound(False) * #cdef int process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint print_values=False): * def process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint store_areas=False, numpy.ndarray[numpy.float_t, ndim=3] areas=None, bint print_values=False): # <<<<<<<<<<<<<< * cdef int new_index * cdef double x, y, z, x1, y1, z1 */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_5process_cell(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_5process_cell = {"process_cell", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_5process_cell, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_5process_cell(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; PyObject *__pyx_v_objects = 0; PyArrayObject *__pyx_v_xs = 0; PyArrayObject *__pyx_v_ys = 0; PyArrayObject *__pyx_v_zs = 0; PyArrayObject *__pyx_v_tridata = 0; int __pyx_v_start; int __pyx_v_store_areas; PyArrayObject *__pyx_v_areas = 0; int __pyx_v_print_values; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("process_cell (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_j,&__pyx_n_s_k,&__pyx_n_s_objects,&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,&__pyx_n_s_tridata,&__pyx_n_s_start,&__pyx_n_s_store_areas,&__pyx_n_s_areas,&__pyx_n_s_print_values,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; values[10] = (PyObject *)((PyArrayObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tridata)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_store_areas); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_areas); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_print_values); if (value) { values[11] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process_cell") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_j = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_k = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_objects = ((PyObject*)values[3]); __pyx_v_xs = ((PyArrayObject *)values[4]); __pyx_v_ys = ((PyArrayObject *)values[5]); __pyx_v_zs = ((PyArrayObject *)values[6]); __pyx_v_tridata = ((PyArrayObject *)values[7]); __pyx_v_start = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[9]) { __pyx_v_store_areas = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_store_areas == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_store_areas = ((int)0); } __pyx_v_areas = ((PyArrayObject *)values[10]); if (values[11]) { __pyx_v_print_values = __Pyx_PyObject_IsTrue(values[11]); if (unlikely((__pyx_v_print_values == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_print_values = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("process_cell", 0, 9, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.process_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), (&PyList_Type), 1, "objects", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xs), __pyx_ptype_5numpy_ndarray, 1, "xs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ys), __pyx_ptype_5numpy_ndarray, 1, "ys", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_zs), __pyx_ptype_5numpy_ndarray, 1, "zs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tridata), __pyx_ptype_5numpy_ndarray, 1, "tridata", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_areas), __pyx_ptype_5numpy_ndarray, 1, "areas", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_4process_cell(__pyx_self, __pyx_v_i, __pyx_v_j, __pyx_v_k, __pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_tridata, __pyx_v_start, __pyx_v_store_areas, __pyx_v_areas, __pyx_v_print_values); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_4process_cell(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_k, PyObject *__pyx_v_objects, PyArrayObject *__pyx_v_xs, PyArrayObject *__pyx_v_ys, PyArrayObject *__pyx_v_zs, PyArrayObject *__pyx_v_tridata, int __pyx_v_start, int __pyx_v_store_areas, PyArrayObject *__pyx_v_areas, int __pyx_v_print_values) { int __pyx_v_new_index; double __pyx_v_x; double __pyx_v_y; double __pyx_v_z; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; PyObject *__pyx_v_position = 0; double __pyx_v_value0; double __pyx_v_value1; double __pyx_v_value2; double __pyx_v_value3; double __pyx_v_value4; double __pyx_v_value5; double __pyx_v_value6; double __pyx_v_value7; PyObject *__pyx_v_p = NULL; PyObject *__pyx_v_objdist = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_areas; __Pyx_Buffer __pyx_pybuffer_areas; __Pyx_LocalBuf_ND __pyx_pybuffernd_tridata; __Pyx_Buffer __pyx_pybuffer_tridata; __Pyx_LocalBuf_ND __pyx_pybuffernd_xs; __Pyx_Buffer __pyx_pybuffer_xs; __Pyx_LocalBuf_ND __pyx_pybuffernd_ys; __Pyx_Buffer __pyx_pybuffer_ys; __Pyx_LocalBuf_ND __pyx_pybuffernd_zs; __Pyx_Buffer __pyx_pybuffer_zs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; __pyx_t_5numpy_float_t __pyx_t_2; Py_ssize_t __pyx_t_3; __pyx_t_5numpy_float_t __pyx_t_4; Py_ssize_t __pyx_t_5; __pyx_t_5numpy_float_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; double __pyx_t_23; double __pyx_t_24; double __pyx_t_25; double __pyx_t_26; double __pyx_t_27; double __pyx_t_28; double __pyx_t_29; double __pyx_t_30; int __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("process_cell", 0); __pyx_pybuffer_xs.pybuffer.buf = NULL; __pyx_pybuffer_xs.refcount = 0; __pyx_pybuffernd_xs.data = NULL; __pyx_pybuffernd_xs.rcbuffer = &__pyx_pybuffer_xs; __pyx_pybuffer_ys.pybuffer.buf = NULL; __pyx_pybuffer_ys.refcount = 0; __pyx_pybuffernd_ys.data = NULL; __pyx_pybuffernd_ys.rcbuffer = &__pyx_pybuffer_ys; __pyx_pybuffer_zs.pybuffer.buf = NULL; __pyx_pybuffer_zs.refcount = 0; __pyx_pybuffernd_zs.data = NULL; __pyx_pybuffernd_zs.rcbuffer = &__pyx_pybuffer_zs; __pyx_pybuffer_tridata.pybuffer.buf = NULL; __pyx_pybuffer_tridata.refcount = 0; __pyx_pybuffernd_tridata.data = NULL; __pyx_pybuffernd_tridata.rcbuffer = &__pyx_pybuffer_tridata; __pyx_pybuffer_areas.pybuffer.buf = NULL; __pyx_pybuffer_areas.refcount = 0; __pyx_pybuffernd_areas.data = NULL; __pyx_pybuffernd_areas.rcbuffer = &__pyx_pybuffer_areas; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xs.rcbuffer->pybuffer, (PyObject*)__pyx_v_xs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_xs.diminfo[0].strides = __pyx_pybuffernd_xs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xs.diminfo[0].shape = __pyx_pybuffernd_xs.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ys.rcbuffer->pybuffer, (PyObject*)__pyx_v_ys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_ys.diminfo[0].strides = __pyx_pybuffernd_ys.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ys.diminfo[0].shape = __pyx_pybuffernd_ys.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_zs.rcbuffer->pybuffer, (PyObject*)__pyx_v_zs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_zs.diminfo[0].strides = __pyx_pybuffernd_zs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_zs.diminfo[0].shape = __pyx_pybuffernd_zs.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tridata.rcbuffer->pybuffer, (PyObject*)__pyx_v_tridata, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_tridata.diminfo[0].strides = __pyx_pybuffernd_tridata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tridata.diminfo[0].shape = __pyx_pybuffernd_tridata.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_areas.rcbuffer->pybuffer, (PyObject*)__pyx_v_areas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_areas.diminfo[0].strides = __pyx_pybuffernd_areas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_areas.diminfo[0].shape = __pyx_pybuffernd_areas.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_areas.diminfo[1].strides = __pyx_pybuffernd_areas.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_areas.diminfo[1].shape = __pyx_pybuffernd_areas.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_areas.diminfo[2].strides = __pyx_pybuffernd_areas.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_areas.diminfo[2].shape = __pyx_pybuffernd_areas.rcbuffer->pybuffer.shape[2]; /* "neuron/rxd/geometry3d/surfaces.pyx":92 * cdef double x, y, z, x1, y1, z1 * cdef list position * x, y, z = xs[i], ys[j], zs[k] # <<<<<<<<<<<<<< * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] * */ __pyx_t_1 = __pyx_v_i; __pyx_t_2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_xs.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_xs.diminfo[0].strides)); __pyx_t_3 = __pyx_v_j; __pyx_t_4 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_ys.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_ys.diminfo[0].strides)); __pyx_t_5 = __pyx_v_k; __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_zs.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_zs.diminfo[0].strides)); __pyx_v_x = __pyx_t_2; __pyx_v_y = __pyx_t_4; __pyx_v_z = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":93 * cdef list position * x, y, z = xs[i], ys[j], zs[k] * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] # <<<<<<<<<<<<<< * * position = [(x, y, z), */ __pyx_t_7 = (__pyx_v_i + 1); __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_xs.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_xs.diminfo[0].strides)); __pyx_t_8 = (__pyx_v_j + 1); __pyx_t_4 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_ys.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_ys.diminfo[0].strides)); __pyx_t_9 = (__pyx_v_k + 1); __pyx_t_2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_zs.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_zs.diminfo[0].strides)); __pyx_v_x1 = __pyx_t_6; __pyx_v_y1 = __pyx_t_4; __pyx_v_z1 = __pyx_t_2; /* "neuron/rxd/geometry3d/surfaces.pyx":95 * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] * * position = [(x, y, z), # <<<<<<<<<<<<<< * (x1, y, z), * (x1, y1, z), */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":96 * * position = [(x, y, z), * (x1, y, z), # <<<<<<<<<<<<<< * (x1, y1, z), * (x, y1, z), */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":97 * position = [(x, y, z), * (x1, y, z), * (x1, y1, z), # <<<<<<<<<<<<<< * (x, y1, z), * (x, y, z1), */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_12); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":98 * (x1, y, z), * (x1, y1, z), * (x, y1, z), # <<<<<<<<<<<<<< * (x, y, z1), * (x1, y, z1), */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":99 * (x1, y1, z), * (x, y1, z), * (x, y, z1), # <<<<<<<<<<<<<< * (x1, y, z1), * (x1, y1, z1), */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_12); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":100 * (x, y1, z), * (x, y, z1), * (x1, y, z1), # <<<<<<<<<<<<<< * (x1, y1, z1), * (x, y1, z1)] */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":101 * (x, y, z1), * (x1, y, z1), * (x1, y1, z1), # <<<<<<<<<<<<<< * (x, y1, z1)] * cdef double value0, value1, value2, value3, value4, value5, value6, value7 */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = PyTuple_New(3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_12); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":102 * (x1, y, z1), * (x1, y1, z1), * (x, y1, z1)] # <<<<<<<<<<<<<< * cdef double value0, value1, value2, value3, value4, value5, value6, value7 * value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position] */ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":95 * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] * * position = [(x, y, z), # <<<<<<<<<<<<<< * (x1, y, z), * (x1, y1, z), */ __pyx_t_10 = PyList_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_15); PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_16); PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_17); PyList_SET_ITEM(__pyx_t_10, 4, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_10, 5, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_19); PyList_SET_ITEM(__pyx_t_10, 6, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_20); PyList_SET_ITEM(__pyx_t_10, 7, __pyx_t_20); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_v_position = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":104 * (x, y1, z1)] * cdef double value0, value1, value2, value3, value4, value5, value6, value7 * value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position] # <<<<<<<<<<<<<< * if print_values: * print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) */ __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_20 = __pyx_v_position; __Pyx_INCREF(__pyx_t_20); __pyx_t_21 = 0; for (;;) { if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_20)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_20, __pyx_t_21); __Pyx_INCREF(__pyx_t_19); __pyx_t_21++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_20, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); #endif __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyList_New(0); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_18 = __pyx_v_objects; __Pyx_INCREF(__pyx_t_18); __pyx_t_22 = 0; for (;;) { if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_17 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_22); __Pyx_INCREF(__pyx_t_17); __pyx_t_22++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_17 = PySequence_ITEM(__pyx_t_18, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PySequence_Tuple(__pyx_v_p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = __Pyx_PyObject_Call(__pyx_v_objdist, __pyx_t_17, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_19, (PyObject*)__pyx_t_16))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_19))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (1) { PyObject* sequence = __pyx_t_10; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 8)) { if (size > 8) __Pyx_RaiseTooManyValuesError(8); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_20 = PyList_GET_ITEM(sequence, 0); __pyx_t_19 = PyList_GET_ITEM(sequence, 1); __pyx_t_18 = PyList_GET_ITEM(sequence, 2); __pyx_t_16 = PyList_GET_ITEM(sequence, 3); __pyx_t_17 = PyList_GET_ITEM(sequence, 4); __pyx_t_15 = PyList_GET_ITEM(sequence, 5); __pyx_t_14 = PyList_GET_ITEM(sequence, 6); __pyx_t_13 = PyList_GET_ITEM(sequence, 7); __Pyx_INCREF(__pyx_t_20); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_13); #else { Py_ssize_t i; PyObject** temps[8] = {&__pyx_t_20,&__pyx_t_19,&__pyx_t_18,&__pyx_t_16,&__pyx_t_17,&__pyx_t_15,&__pyx_t_14,&__pyx_t_13}; for (i=0; i < 8; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_20); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_19); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_t_18); if (unlikely((__pyx_t_25 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_16); if (unlikely((__pyx_t_26 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_27 = __pyx_PyFloat_AsDouble(__pyx_t_17); if (unlikely((__pyx_t_27 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_28 = __pyx_PyFloat_AsDouble(__pyx_t_15); if (unlikely((__pyx_t_28 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_29 = __pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_29 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_30 = __pyx_PyFloat_AsDouble(__pyx_t_13); if (unlikely((__pyx_t_30 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_value0 = __pyx_t_23; __pyx_v_value1 = __pyx_t_24; __pyx_v_value2 = __pyx_t_25; __pyx_v_value3 = __pyx_t_26; __pyx_v_value4 = __pyx_t_27; __pyx_v_value5 = __pyx_t_28; __pyx_v_value6 = __pyx_t_29; __pyx_v_value7 = __pyx_t_30; /* "neuron/rxd/geometry3d/surfaces.pyx":105 * cdef double value0, value1, value2, value3, value4, value5, value6, value7 * value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position] * if print_values: # <<<<<<<<<<<<<< * print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) * print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) */ __pyx_t_31 = (__pyx_v_print_values != 0); if (__pyx_t_31) { /* "neuron/rxd/geometry3d/surfaces.pyx":106 * value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position] * if print_values: * print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) # <<<<<<<<<<<<<< * print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) * print 'last obj distance to position[4]: ', objects[len(objects)-1](*position[4]) */ __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_17 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_16 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = PyTuple_New(6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_16); __pyx_t_10 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7, __pyx_t_18); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__Pyx_PrintOne(0, __pyx_t_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":107 * if print_values: * print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) * print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) # <<<<<<<<<<<<<< * print 'last obj distance to position[4]: ', objects[len(objects)-1](*position[4]) * print 'distance to position[4] with everything but the last object:', min([objdist(*position[4]) for objdist in objects[:len(objects)-1]]) */ __pyx_t_16 = PyFloat_FromDouble(__pyx_v_value0); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __pyx_t_18 = PyFloat_FromDouble(__pyx_v_value1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PyFloat_FromDouble(__pyx_v_value2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_15 = PyFloat_FromDouble(__pyx_v_value3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = PyFloat_FromDouble(__pyx_v_value4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_value5); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_value6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_19 = PyFloat_FromDouble(__pyx_v_value7); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = PyTuple_New(8); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_t_19); __pyx_t_16 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_10 = 0; __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_7f_7f_7f_7f_7f_7f_7f_7f, __pyx_t_20); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__Pyx_PrintOne(0, __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":108 * print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) * print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) * print 'last obj distance to position[4]: ', objects[len(objects)-1](*position[4]) # <<<<<<<<<<<<<< * print 'distance to position[4] with everything but the last object:', min([objdist(*position[4]) for objdist in objects[:len(objects)-1]]) * print 'distance to position[4] with everything:', min([objdist(*position[4]) for objdist in objects[:]]) */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = PyList_GET_SIZE(__pyx_v_objects); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = (__pyx_t_21 - 1); __pyx_t_19 = PySequence_Tuple(PyList_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = __Pyx_PyObject_Call(PyList_GET_ITEM(__pyx_v_objects, __pyx_t_22), __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_INCREF(__pyx_kp_s_last_obj_distance_to_position_4); __Pyx_GIVEREF(__pyx_kp_s_last_obj_distance_to_position_4); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_s_last_obj_distance_to_position_4); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_20); __pyx_t_20 = 0; if (__Pyx_Print(0, __pyx_t_19, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":109 * print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) * print 'last obj distance to position[4]: ', objects[len(objects)-1](*position[4]) * print 'distance to position[4] with everything but the last object:', min([objdist(*position[4]) for objdist in objects[:len(objects)-1]]) # <<<<<<<<<<<<<< * print 'distance to position[4] with everything:', min([objdist(*position[4]) for objdist in objects[:]]) * print 'last object:', objects[len(objects) - 1] */ __pyx_t_19 = PyList_New(0); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = PyList_GET_SIZE(__pyx_v_objects); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = __Pyx_PyList_GetSlice(__pyx_v_objects, 0, (__pyx_t_22 - 1)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_10 = __pyx_t_20; __Pyx_INCREF(__pyx_t_10); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; for (;;) { if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_20 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_22); __Pyx_INCREF(__pyx_t_20); __pyx_t_22++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_20 = PySequence_ITEM(__pyx_t_10, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); #endif __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = PySequence_Tuple(PyList_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_v_objdist, __pyx_t_20, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_19, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_10, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_kp_s_distance_to_position_4_with_ever); __Pyx_GIVEREF(__pyx_kp_s_distance_to_position_4_with_ever); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_s_distance_to_position_4_with_ever); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_19); __pyx_t_19 = 0; if (__Pyx_Print(0, __pyx_t_10, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":110 * print 'last obj distance to position[4]: ', objects[len(objects)-1](*position[4]) * print 'distance to position[4] with everything but the last object:', min([objdist(*position[4]) for objdist in objects[:len(objects)-1]]) * print 'distance to position[4] with everything:', min([objdist(*position[4]) for objdist in objects[:]]) # <<<<<<<<<<<<<< * print 'last object:', objects[len(objects) - 1] * print 'position[4]:', position[4] */ __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_19 = __Pyx_PyList_GetSlice(__pyx_v_objects, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_13 = __pyx_t_19; __Pyx_INCREF(__pyx_t_13); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; for (;;) { if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_19 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_22); __Pyx_INCREF(__pyx_t_19); __pyx_t_22++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_19 = PySequence_ITEM(__pyx_t_13, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); #endif __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PySequence_Tuple(PyList_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = __Pyx_PyObject_Call(__pyx_v_objdist, __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_20))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_kp_s_distance_to_position_4_with_ever_2); __Pyx_GIVEREF(__pyx_kp_s_distance_to_position_4_with_ever_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_s_distance_to_position_4_with_ever_2); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10); __pyx_t_10 = 0; if (__Pyx_Print(0, __pyx_t_13, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":111 * print 'distance to position[4] with everything but the last object:', min([objdist(*position[4]) for objdist in objects[:len(objects)-1]]) * print 'distance to position[4] with everything:', min([objdist(*position[4]) for objdist in objects[:]]) * print 'last object:', objects[len(objects) - 1] # <<<<<<<<<<<<<< * print 'position[4]:', position[4] * */ if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_22 = PyList_GET_SIZE(__pyx_v_objects); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_21 = (__pyx_t_22 - 1); __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_kp_s_last_object); __Pyx_GIVEREF(__pyx_kp_s_last_object); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_s_last_object); __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_objects, __pyx_t_21)); __Pyx_GIVEREF(PyList_GET_ITEM(__pyx_v_objects, __pyx_t_21)); PyTuple_SET_ITEM(__pyx_t_13, 1, PyList_GET_ITEM(__pyx_v_objects, __pyx_t_21)); if (__Pyx_Print(0, __pyx_t_13, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":112 * print 'distance to position[4] with everything:', min([objdist(*position[4]) for objdist in objects[:]]) * print 'last object:', objects[len(objects) - 1] * print 'position[4]:', position[4] # <<<<<<<<<<<<<< * * new_index = start + 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) */ __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_kp_s_position_4); __Pyx_GIVEREF(__pyx_kp_s_position_4); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_s_position_4); __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_position, 4)); __Pyx_GIVEREF(PyList_GET_ITEM(__pyx_v_position, 4)); PyTuple_SET_ITEM(__pyx_t_13, 1, PyList_GET_ITEM(__pyx_v_position, 4)); if (__Pyx_Print(0, __pyx_t_13, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":105 * cdef double value0, value1, value2, value3, value4, value5, value6, value7 * value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position] * if print_values: # <<<<<<<<<<<<<< * print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) * print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) */ } /* "neuron/rxd/geometry3d/surfaces.pyx":114 * print 'position[4]:', position[4] * * new_index = start + 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) # <<<<<<<<<<<<<< * if store_areas: * areas[i, j, k] = _tri_area(tridata, start, new_index) */ __pyx_t_32 = __pyx_v_start; __pyx_v_new_index = (__pyx_v_start + (9 * find_triangles(__pyx_v_value0, __pyx_v_value1, __pyx_v_value2, __pyx_v_value3, __pyx_v_value4, __pyx_v_value5, __pyx_v_value6, __pyx_v_value7, __pyx_v_x, __pyx_v_x1, __pyx_v_y, __pyx_v_y1, __pyx_v_z, __pyx_v_z1, (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_tridata.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_tridata.diminfo[0].strides)))))); /* "neuron/rxd/geometry3d/surfaces.pyx":115 * * new_index = start + 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) * if store_areas: # <<<<<<<<<<<<<< * areas[i, j, k] = _tri_area(tridata, start, new_index) * return new_index */ __pyx_t_31 = (__pyx_v_store_areas != 0); if (__pyx_t_31) { /* "neuron/rxd/geometry3d/surfaces.pyx":116 * new_index = start + 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) * if store_areas: * areas[i, j, k] = _tri_area(tridata, start, new_index) # <<<<<<<<<<<<<< * return new_index * */ __pyx_t_33 = __pyx_v_i; __pyx_t_34 = __pyx_v_j; __pyx_t_35 = __pyx_v_k; *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_areas.diminfo[0].strides, __pyx_t_34, __pyx_pybuffernd_areas.diminfo[1].strides, __pyx_t_35, __pyx_pybuffernd_areas.diminfo[2].strides) = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_area(((PyArrayObject *)__pyx_v_tridata), __pyx_v_start, __pyx_v_new_index, 0); /* "neuron/rxd/geometry3d/surfaces.pyx":115 * * new_index = start + 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) * if store_areas: # <<<<<<<<<<<<<< * areas[i, j, k] = _tri_area(tridata, start, new_index) * return new_index */ } /* "neuron/rxd/geometry3d/surfaces.pyx":117 * if store_areas: * areas[i, j, k] = _tri_area(tridata, start, new_index) * return new_index # <<<<<<<<<<<<<< * * # a matrix whose values are unambiguously outside the object */ __Pyx_XDECREF(__pyx_r); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_new_index); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_r = __pyx_t_13; __pyx_t_13 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":88 * @cython.wraparound(False) * #cdef int process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint print_values=False): * def process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint store_areas=False, numpy.ndarray[numpy.float_t, ndim=3] areas=None, bint print_values=False): # <<<<<<<<<<<<<< * cdef int new_index * cdef double x, y, z, x1, y1, z1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_areas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tridata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zs.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.process_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_areas.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tridata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zs.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_position); __Pyx_XDECREF(__pyx_v_p); __Pyx_XDECREF(__pyx_v_objdist); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":128 * @cython.boundscheck(False) * @cython.wraparound(False) * def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): # <<<<<<<<<<<<<< * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] */ /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell = {"volume_inside_cell", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; PyObject *__pyx_v_objects = 0; PyArrayObject *__pyx_v_xs = 0; PyArrayObject *__pyx_v_ys = 0; PyArrayObject *__pyx_v_zs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("volume_inside_cell (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_j,&__pyx_n_s_k,&__pyx_n_s_objects,&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "volume_inside_cell") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 7) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); } __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_j = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_k = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_objects = ((PyObject*)values[3]); __pyx_v_xs = ((PyArrayObject *)values[4]); __pyx_v_ys = ((PyArrayObject *)values[5]); __pyx_v_zs = ((PyArrayObject *)values[6]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("volume_inside_cell", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.volume_inside_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), (&PyList_Type), 1, "objects", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xs), __pyx_ptype_5numpy_ndarray, 1, "xs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ys), __pyx_ptype_5numpy_ndarray, 1, "ys", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_zs), __pyx_ptype_5numpy_ndarray, 1, "zs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_6volume_inside_cell(__pyx_self, __pyx_v_i, __pyx_v_j, __pyx_v_k, __pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_6volume_inside_cell(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_k, PyObject *__pyx_v_objects, PyArrayObject *__pyx_v_xs, PyArrayObject *__pyx_v_ys, PyArrayObject *__pyx_v_zs) { double __pyx_v_x0; double __pyx_v_y0; double __pyx_v_z0; double __pyx_v_x1; double __pyx_v_y1; double __pyx_v_z1; double __pyx_v_dx; double __pyx_v_dy; double __pyx_v_dz; CYTHON_UNUSED PyArrayObject *__pyx_v_local_xs = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_local_ys = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_local_zs = 0; PyArrayObject *__pyx_v_data = 0; double __pyx_v_x; double __pyx_v_y; double __pyx_v_z; int __pyx_v_i1; int __pyx_v_j1; int __pyx_v_k1; PyArrayObject *__pyx_v_tridata = 0; int __pyx_v_start; PyObject *__pyx_v_value0 = NULL; PyObject *__pyx_v_value1 = NULL; PyObject *__pyx_v_value2 = NULL; PyObject *__pyx_v_value3 = NULL; PyObject *__pyx_v_value4 = NULL; PyObject *__pyx_v_value5 = NULL; PyObject *__pyx_v_value6 = NULL; PyObject *__pyx_v_value7 = NULL; PyObject *__pyx_v_objdist = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_data; __Pyx_Buffer __pyx_pybuffer_data; __Pyx_LocalBuf_ND __pyx_pybuffernd_local_xs; __Pyx_Buffer __pyx_pybuffer_local_xs; __Pyx_LocalBuf_ND __pyx_pybuffernd_local_ys; __Pyx_Buffer __pyx_pybuffer_local_ys; __Pyx_LocalBuf_ND __pyx_pybuffernd_local_zs; __Pyx_Buffer __pyx_pybuffer_local_zs; __Pyx_LocalBuf_ND __pyx_pybuffernd_tridata; __Pyx_Buffer __pyx_pybuffer_tridata; __Pyx_LocalBuf_ND __pyx_pybuffernd_xs; __Pyx_Buffer __pyx_pybuffer_xs; __Pyx_LocalBuf_ND __pyx_pybuffernd_ys; __Pyx_Buffer __pyx_pybuffer_ys; __Pyx_LocalBuf_ND __pyx_pybuffernd_zs; __Pyx_Buffer __pyx_pybuffer_zs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; PyArrayObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; int __pyx_t_18; int __pyx_t_19; Py_ssize_t __pyx_t_20; PyObject *(*__pyx_t_21)(PyObject *); PyObject *(*__pyx_t_22)(PyObject *); int __pyx_t_23; double __pyx_t_24; Py_ssize_t __pyx_t_25; PyObject *(*__pyx_t_26)(PyObject *); Py_ssize_t __pyx_t_27; PyObject *(*__pyx_t_28)(PyObject *); Py_ssize_t __pyx_t_29; PyObject *__pyx_t_30 = NULL; PyObject *__pyx_t_31 = NULL; PyObject *__pyx_t_32 = NULL; PyObject *__pyx_t_33 = NULL; Py_ssize_t __pyx_t_34; PyObject *__pyx_t_35 = NULL; __pyx_t_5numpy_float_t __pyx_t_36; Py_ssize_t __pyx_t_37; Py_ssize_t __pyx_t_38; Py_ssize_t __pyx_t_39; PyArrayObject *__pyx_t_40 = NULL; int __pyx_t_41; int __pyx_t_42; Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; __pyx_t_5numpy_float_t __pyx_t_45; Py_ssize_t __pyx_t_46; __pyx_t_5numpy_float_t __pyx_t_47; Py_ssize_t __pyx_t_48; Py_ssize_t __pyx_t_49; Py_ssize_t __pyx_t_50; Py_ssize_t __pyx_t_51; Py_ssize_t __pyx_t_52; Py_ssize_t __pyx_t_53; Py_ssize_t __pyx_t_54; Py_ssize_t __pyx_t_55; Py_ssize_t __pyx_t_56; Py_ssize_t __pyx_t_57; Py_ssize_t __pyx_t_58; Py_ssize_t __pyx_t_59; Py_ssize_t __pyx_t_60; Py_ssize_t __pyx_t_61; Py_ssize_t __pyx_t_62; Py_ssize_t __pyx_t_63; Py_ssize_t __pyx_t_64; Py_ssize_t __pyx_t_65; Py_ssize_t __pyx_t_66; Py_ssize_t __pyx_t_67; Py_ssize_t __pyx_t_68; Py_ssize_t __pyx_t_69; Py_ssize_t __pyx_t_70; Py_ssize_t __pyx_t_71; Py_ssize_t __pyx_t_72; Py_ssize_t __pyx_t_73; Py_ssize_t __pyx_t_74; double __pyx_t_75; double __pyx_t_76; double __pyx_t_77; double __pyx_t_78; double __pyx_t_79; double __pyx_t_80; double __pyx_t_81; Py_ssize_t __pyx_t_82; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("volume_inside_cell", 0); __pyx_pybuffer_local_xs.pybuffer.buf = NULL; __pyx_pybuffer_local_xs.refcount = 0; __pyx_pybuffernd_local_xs.data = NULL; __pyx_pybuffernd_local_xs.rcbuffer = &__pyx_pybuffer_local_xs; __pyx_pybuffer_local_ys.pybuffer.buf = NULL; __pyx_pybuffer_local_ys.refcount = 0; __pyx_pybuffernd_local_ys.data = NULL; __pyx_pybuffernd_local_ys.rcbuffer = &__pyx_pybuffer_local_ys; __pyx_pybuffer_local_zs.pybuffer.buf = NULL; __pyx_pybuffer_local_zs.refcount = 0; __pyx_pybuffernd_local_zs.data = NULL; __pyx_pybuffernd_local_zs.rcbuffer = &__pyx_pybuffer_local_zs; __pyx_pybuffer_data.pybuffer.buf = NULL; __pyx_pybuffer_data.refcount = 0; __pyx_pybuffernd_data.data = NULL; __pyx_pybuffernd_data.rcbuffer = &__pyx_pybuffer_data; __pyx_pybuffer_tridata.pybuffer.buf = NULL; __pyx_pybuffer_tridata.refcount = 0; __pyx_pybuffernd_tridata.data = NULL; __pyx_pybuffernd_tridata.rcbuffer = &__pyx_pybuffer_tridata; __pyx_pybuffer_xs.pybuffer.buf = NULL; __pyx_pybuffer_xs.refcount = 0; __pyx_pybuffernd_xs.data = NULL; __pyx_pybuffernd_xs.rcbuffer = &__pyx_pybuffer_xs; __pyx_pybuffer_ys.pybuffer.buf = NULL; __pyx_pybuffer_ys.refcount = 0; __pyx_pybuffernd_ys.data = NULL; __pyx_pybuffernd_ys.rcbuffer = &__pyx_pybuffer_ys; __pyx_pybuffer_zs.pybuffer.buf = NULL; __pyx_pybuffer_zs.refcount = 0; __pyx_pybuffernd_zs.data = NULL; __pyx_pybuffernd_zs.rcbuffer = &__pyx_pybuffer_zs; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xs.rcbuffer->pybuffer, (PyObject*)__pyx_v_xs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_xs.diminfo[0].strides = __pyx_pybuffernd_xs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xs.diminfo[0].shape = __pyx_pybuffernd_xs.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ys.rcbuffer->pybuffer, (PyObject*)__pyx_v_ys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_ys.diminfo[0].strides = __pyx_pybuffernd_ys.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ys.diminfo[0].shape = __pyx_pybuffernd_ys.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_zs.rcbuffer->pybuffer, (PyObject*)__pyx_v_zs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_zs.diminfo[0].strides = __pyx_pybuffernd_zs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_zs.diminfo[0].shape = __pyx_pybuffernd_zs.rcbuffer->pybuffer.shape[0]; /* "neuron/rxd/geometry3d/surfaces.pyx":129 * @cython.wraparound(False) * def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] # <<<<<<<<<<<<<< * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] * cdef double dx = x1 - x0, dy = y1 - y0, dz = z1 - z0 */ __pyx_t_1 = __pyx_v_i; __pyx_v_x0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_xs.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_xs.diminfo[0].strides)); __pyx_t_2 = __pyx_v_j; __pyx_v_y0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_ys.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_ys.diminfo[0].strides)); __pyx_t_3 = __pyx_v_k; __pyx_v_z0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_zs.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_zs.diminfo[0].strides)); /* "neuron/rxd/geometry3d/surfaces.pyx":130 * def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] # <<<<<<<<<<<<<< * cdef double dx = x1 - x0, dy = y1 - y0, dz = z1 - z0 * cdef numpy.ndarray[numpy.float_t, ndim=1] local_xs = numpy.array([x0 - dx, x0, x1, x0 + 2 * dx]) */ __pyx_t_4 = (__pyx_v_i + 1); __pyx_v_x1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_xs.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_xs.diminfo[0].strides)); __pyx_t_5 = (__pyx_v_j + 1); __pyx_v_y1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_ys.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_ys.diminfo[0].strides)); __pyx_t_6 = (__pyx_v_k + 1); __pyx_v_z1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_zs.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_zs.diminfo[0].strides)); /* "neuron/rxd/geometry3d/surfaces.pyx":131 * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] * cdef double dx = x1 - x0, dy = y1 - y0, dz = z1 - z0 # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.float_t, ndim=1] local_xs = numpy.array([x0 - dx, x0, x1, x0 + 2 * dx]) * cdef numpy.ndarray[numpy.float_t, ndim=1] local_ys = numpy.array([y0 - dy, y0, y1, y0 + 2 * dy]) */ __pyx_v_dx = (__pyx_v_x1 - __pyx_v_x0); __pyx_v_dy = (__pyx_v_y1 - __pyx_v_y0); __pyx_v_dz = (__pyx_v_z1 - __pyx_v_z0); /* "neuron/rxd/geometry3d/surfaces.pyx":132 * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] * cdef double dx = x1 - x0, dy = y1 - y0, dz = z1 - z0 * cdef numpy.ndarray[numpy.float_t, ndim=1] local_xs = numpy.array([x0 - dx, x0, x1, x0 + 2 * dx]) # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.float_t, ndim=1] local_ys = numpy.array([y0 - dy, y0, y1, y0 + 2 * dy]) * cdef numpy.ndarray[numpy.float_t, ndim=1] local_zs = numpy.array([z0 - dz, z0, z1, z0 + 2 * dz]) */ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyFloat_FromDouble((__pyx_v_x0 - __pyx_v_dx)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = PyFloat_FromDouble((__pyx_v_x0 + (2.0 * __pyx_v_dx))); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyList_New(4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_13, 2, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_13, 3, __pyx_t_12); __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_12 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } if (!__pyx_t_12) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_local_xs.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_local_xs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_local_xs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_local_xs.diminfo[0].strides = __pyx_pybuffernd_local_xs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_local_xs.diminfo[0].shape = __pyx_pybuffernd_local_xs.rcbuffer->pybuffer.shape[0]; } } __pyx_t_14 = 0; __pyx_v_local_xs = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":133 * cdef double dx = x1 - x0, dy = y1 - y0, dz = z1 - z0 * cdef numpy.ndarray[numpy.float_t, ndim=1] local_xs = numpy.array([x0 - dx, x0, x1, x0 + 2 * dx]) * cdef numpy.ndarray[numpy.float_t, ndim=1] local_ys = numpy.array([y0 - dy, y0, y1, y0 + 2 * dy]) # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.float_t, ndim=1] local_zs = numpy.array([z0 - dz, z0, z1, z0 + 2 * dz]) * # big numbers unambiguously outside, no two of which are the same so (probably) no risk of dividing by zero? */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyFloat_FromDouble((__pyx_v_y0 - __pyx_v_dy)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PyFloat_FromDouble((__pyx_v_y0 + (2.0 * __pyx_v_dy))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_10); __pyx_t_9 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_10 = 0; __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_10) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_15 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_local_ys.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_local_ys = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_local_ys.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_local_ys.diminfo[0].strides = __pyx_pybuffernd_local_ys.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_local_ys.diminfo[0].shape = __pyx_pybuffernd_local_ys.rcbuffer->pybuffer.shape[0]; } } __pyx_t_15 = 0; __pyx_v_local_ys = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":134 * cdef numpy.ndarray[numpy.float_t, ndim=1] local_xs = numpy.array([x0 - dx, x0, x1, x0 + 2 * dx]) * cdef numpy.ndarray[numpy.float_t, ndim=1] local_ys = numpy.array([y0 - dy, y0, y1, y0 + 2 * dy]) * cdef numpy.ndarray[numpy.float_t, ndim=1] local_zs = numpy.array([z0 - dz, z0, z1, z0 + 2 * dz]) # <<<<<<<<<<<<<< * # big numbers unambiguously outside, no two of which are the same so (probably) no risk of dividing by zero? * cdef numpy.ndarray[numpy.float_t, ndim=3] data = numpy.array(big_number_matrix) */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyFloat_FromDouble((__pyx_v_z0 - __pyx_v_dz)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = PyFloat_FromDouble((__pyx_v_z0 + (2.0 * __pyx_v_dz))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = PyList_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_9, 3, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0; __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_13) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_local_zs.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_local_zs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_local_zs.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_local_zs.diminfo[0].strides = __pyx_pybuffernd_local_zs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_local_zs.diminfo[0].shape = __pyx_pybuffernd_local_zs.rcbuffer->pybuffer.shape[0]; } } __pyx_t_16 = 0; __pyx_v_local_zs = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":136 * cdef numpy.ndarray[numpy.float_t, ndim=1] local_zs = numpy.array([z0 - dz, z0, z1, z0 + 2 * dz]) * # big numbers unambiguously outside, no two of which are the same so (probably) no risk of dividing by zero? * cdef numpy.ndarray[numpy.float_t, ndim=3] data = numpy.array(big_number_matrix) # <<<<<<<<<<<<<< * cdef double x, y, z * cdef int i1, j1, k1 */ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_big_number_matrix); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_9) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) { __pyx_v_data = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_data.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_data.diminfo[0].strides = __pyx_pybuffernd_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_data.diminfo[0].shape = __pyx_pybuffernd_data.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_data.diminfo[1].strides = __pyx_pybuffernd_data.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_data.diminfo[1].shape = __pyx_pybuffernd_data.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_data.diminfo[2].strides = __pyx_pybuffernd_data.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_data.diminfo[2].shape = __pyx_pybuffernd_data.rcbuffer->pybuffer.shape[2]; } } __pyx_t_17 = 0; __pyx_v_data = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":139 * cdef double x, y, z * cdef int i1, j1, k1 * if not objects: # <<<<<<<<<<<<<< * print 'grr... it thinks there is surface when no nearby objects.' * for i, x in zip([1, 2], [x0, x1]): */ __pyx_t_18 = (__pyx_v_objects != Py_None) && (PyList_GET_SIZE(__pyx_v_objects) != 0); __pyx_t_19 = ((!__pyx_t_18) != 0); if (__pyx_t_19) { /* "neuron/rxd/geometry3d/surfaces.pyx":140 * cdef int i1, j1, k1 * if not objects: * print 'grr... it thinks there is surface when no nearby objects.' # <<<<<<<<<<<<<< * for i, x in zip([1, 2], [x0, x1]): * for j, y in zip([1, 2], [y0, y1]): */ if (__Pyx_PrintOne(0, __pyx_kp_s_grr_it_thinks_there_is_surface_w) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":139 * cdef double x, y, z * cdef int i1, j1, k1 * if not objects: # <<<<<<<<<<<<<< * print 'grr... it thinks there is surface when no nearby objects.' * for i, x in zip([1, 2], [x0, x1]): */ } /* "neuron/rxd/geometry3d/surfaces.pyx":141 * if not objects: * print 'grr... it thinks there is surface when no nearby objects.' * for i, x in zip([1, 2], [x0, x1]): # <<<<<<<<<<<<<< * for j, y in zip([1, 2], [y0, y1]): * for k, z in zip([1, 2], [z0, z1]): */ __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_1); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_2); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_13); __pyx_t_10 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12); __pyx_t_7 = 0; __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_20 = 0; __pyx_t_21 = NULL; } else { __pyx_t_20 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_21 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { if (likely(!__pyx_t_21)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_20 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_20); __Pyx_INCREF(__pyx_t_12); __pyx_t_20++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_20 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_20); __Pyx_INCREF(__pyx_t_12); __pyx_t_20++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); #endif } } else { __pyx_t_12 = __pyx_t_21(__pyx_t_13); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_12); } if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) { PyObject* sequence = __pyx_t_12; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_22 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_7 = __pyx_t_22(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_10 = __pyx_t_22(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_22 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_i = __pyx_t_23; __pyx_v_x = __pyx_t_24; /* "neuron/rxd/geometry3d/surfaces.pyx":142 * print 'grr... it thinks there is surface when no nearby objects.' * for i, x in zip([1, 2], [x0, x1]): * for j, y in zip([1, 2], [y0, y1]): # <<<<<<<<<<<<<< * for k, z in zip([1, 2], [z0, z1]): * data[i, j, k] = min([objdist(x, y, z) for objdist in objects]) */ __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_12, 0, __pyx_int_1); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyList_SET_ITEM(__pyx_t_12, 1, __pyx_int_2); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_7); __pyx_t_10 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); __pyx_t_12 = 0; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { __pyx_t_7 = __pyx_t_9; __Pyx_INCREF(__pyx_t_7); __pyx_t_25 = 0; __pyx_t_26 = NULL; } else { __pyx_t_25 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_26 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { if (likely(!__pyx_t_26)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_25 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_25); __Pyx_INCREF(__pyx_t_9); __pyx_t_25++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_25); __pyx_t_25++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_25 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_25); __Pyx_INCREF(__pyx_t_9); __pyx_t_25++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_25); __pyx_t_25++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif } } else { __pyx_t_9 = __pyx_t_26(__pyx_t_7); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_9); } if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_12 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_22 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_12 = __pyx_t_22(__pyx_t_8); if (unlikely(!__pyx_t_12)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); index = 1; __pyx_t_10 = __pyx_t_22(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_unpacking_done; __pyx_L10_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_22 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L11_unpacking_done:; } __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_j = __pyx_t_23; __pyx_v_y = __pyx_t_24; /* "neuron/rxd/geometry3d/surfaces.pyx":143 * for i, x in zip([1, 2], [x0, x1]): * for j, y in zip([1, 2], [y0, y1]): * for k, z in zip([1, 2], [z0, z1]): # <<<<<<<<<<<<<< * data[i, j, k] = min([objdist(x, y, z) for objdist in objects]) * */ __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_int_1); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyList_SET_ITEM(__pyx_t_9, 1, __pyx_int_2); __pyx_t_10 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_12); __pyx_t_10 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8); __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_12 = __pyx_t_8; __Pyx_INCREF(__pyx_t_12); __pyx_t_27 = 0; __pyx_t_28 = NULL; } else { __pyx_t_27 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_28 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { if (likely(!__pyx_t_28)) { if (likely(PyList_CheckExact(__pyx_t_12))) { if (__pyx_t_27 >= PyList_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_27); __Pyx_INCREF(__pyx_t_8); __pyx_t_27++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_12, __pyx_t_27); __pyx_t_27++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_27 >= PyTuple_GET_SIZE(__pyx_t_12)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_27); __Pyx_INCREF(__pyx_t_8); __pyx_t_27++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_12, __pyx_t_27); __pyx_t_27++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_28(__pyx_t_12); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { PyObject* sequence = __pyx_t_8; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_22 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_22(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_22(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_22 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_unpacking_done; __pyx_L14_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_22 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L15_unpacking_done:; } __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_k = __pyx_t_23; __pyx_v_z = __pyx_t_24; /* "neuron/rxd/geometry3d/surfaces.pyx":144 * for j, y in zip([1, 2], [y0, y1]): * for k, z in zip([1, 2], [z0, z1]): * data[i, j, k] = min([objdist(x, y, z) for objdist in objects]) # <<<<<<<<<<<<<< * * # TODO: I probably don't need the 8 corner voxels */ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__pyx_v_objects == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_10 = __pyx_v_objects; __Pyx_INCREF(__pyx_t_10); __pyx_t_29 = 0; for (;;) { if (__pyx_t_29 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_29); __Pyx_INCREF(__pyx_t_9); __pyx_t_29++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_29); __pyx_t_29++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_30 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_INCREF(__pyx_v_objdist); __pyx_t_32 = __pyx_v_objdist; __pyx_t_33 = NULL; __pyx_t_34 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_32))) { __pyx_t_33 = PyMethod_GET_SELF(__pyx_t_32); if (likely(__pyx_t_33)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_32); __Pyx_INCREF(__pyx_t_33); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_32, function); __pyx_t_34 = 1; } } __pyx_t_35 = PyTuple_New(3+__pyx_t_34); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_35); if (__pyx_t_33) { __Pyx_GIVEREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_35, 0, __pyx_t_33); __pyx_t_33 = NULL; } __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_35, 0+__pyx_t_34, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_35, 1+__pyx_t_34, __pyx_t_30); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_35, 2+__pyx_t_34, __pyx_t_31); __pyx_t_11 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_32, __pyx_t_35, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_36 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_36 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_37 = __pyx_v_i; __pyx_t_38 = __pyx_v_j; __pyx_t_39 = __pyx_v_k; *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_38, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_39, __pyx_pybuffernd_data.diminfo[2].strides) = __pyx_t_36; /* "neuron/rxd/geometry3d/surfaces.pyx":143 * for i, x in zip([1, 2], [x0, x1]): * for j, y in zip([1, 2], [y0, y1]): * for k, z in zip([1, 2], [z0, z1]): # <<<<<<<<<<<<<< * data[i, j, k] = min([objdist(x, y, z) for objdist in objects]) * */ } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":142 * print 'grr... it thinks there is surface when no nearby objects.' * for i, x in zip([1, 2], [x0, x1]): * for j, y in zip([1, 2], [y0, y1]): # <<<<<<<<<<<<<< * for k, z in zip([1, 2], [z0, z1]): * data[i, j, k] = min([objdist(x, y, z) for objdist in objects]) */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":141 * if not objects: * print 'grr... it thinks there is surface when no nearby objects.' * for i, x in zip([1, 2], [x0, x1]): # <<<<<<<<<<<<<< * for j, y in zip([1, 2], [y0, y1]): * for k, z in zip([1, 2], [z0, z1]): */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":148 * # TODO: I probably don't need the 8 corner voxels * # 9 doubles/tri * 5 tri/cell * 27 cells = 1215 doubles * cdef numpy.ndarray[numpy.float_t, ndim=1] tridata = numpy.zeros(1215) # <<<<<<<<<<<<<< * cdef int start = 0 * for i in range(3): */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_40 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tridata.rcbuffer->pybuffer, (PyObject*)__pyx_t_40, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_tridata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tridata.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_tridata.diminfo[0].strides = __pyx_pybuffernd_tridata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tridata.diminfo[0].shape = __pyx_pybuffernd_tridata.rcbuffer->pybuffer.shape[0]; } } __pyx_t_40 = 0; __pyx_v_tridata = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":149 * # 9 doubles/tri * 5 tri/cell * 27 cells = 1215 doubles * cdef numpy.ndarray[numpy.float_t, ndim=1] tridata = numpy.zeros(1215) * cdef int start = 0 # <<<<<<<<<<<<<< * for i in range(3): * i1 = i + 1 */ __pyx_v_start = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":150 * cdef numpy.ndarray[numpy.float_t, ndim=1] tridata = numpy.zeros(1215) * cdef int start = 0 * for i in range(3): # <<<<<<<<<<<<<< * i1 = i + 1 * for j in range(3): */ for (__pyx_t_23 = 0; __pyx_t_23 < 3; __pyx_t_23+=1) { __pyx_v_i = __pyx_t_23; /* "neuron/rxd/geometry3d/surfaces.pyx":151 * cdef int start = 0 * for i in range(3): * i1 = i + 1 # <<<<<<<<<<<<<< * for j in range(3): * j1 = j + 1 */ __pyx_v_i1 = (__pyx_v_i + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":152 * for i in range(3): * i1 = i + 1 * for j in range(3): # <<<<<<<<<<<<<< * j1 = j + 1 * for k in range(3): */ for (__pyx_t_41 = 0; __pyx_t_41 < 3; __pyx_t_41+=1) { __pyx_v_j = __pyx_t_41; /* "neuron/rxd/geometry3d/surfaces.pyx":153 * i1 = i + 1 * for j in range(3): * j1 = j + 1 # <<<<<<<<<<<<<< * for k in range(3): * k1 = k + 1 */ __pyx_v_j1 = (__pyx_v_j + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":154 * for j in range(3): * j1 = j + 1 * for k in range(3): # <<<<<<<<<<<<<< * k1 = k + 1 * x, y, z = xs[i], ys[j], zs[k] */ for (__pyx_t_42 = 0; __pyx_t_42 < 3; __pyx_t_42+=1) { __pyx_v_k = __pyx_t_42; /* "neuron/rxd/geometry3d/surfaces.pyx":155 * j1 = j + 1 * for k in range(3): * k1 = k + 1 # <<<<<<<<<<<<<< * x, y, z = xs[i], ys[j], zs[k] * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] */ __pyx_v_k1 = (__pyx_v_k + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":156 * for k in range(3): * k1 = k + 1 * x, y, z = xs[i], ys[j], zs[k] # <<<<<<<<<<<<<< * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] * value0, value1, value2, value3, value4, value5, value6, value7 = (data[i, j, k], */ __pyx_t_43 = __pyx_v_i; __pyx_t_36 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_xs.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_xs.diminfo[0].strides)); __pyx_t_44 = __pyx_v_j; __pyx_t_45 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_ys.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ys.diminfo[0].strides)); __pyx_t_46 = __pyx_v_k; __pyx_t_47 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_zs.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_zs.diminfo[0].strides)); __pyx_v_x = __pyx_t_36; __pyx_v_y = __pyx_t_45; __pyx_v_z = __pyx_t_47; /* "neuron/rxd/geometry3d/surfaces.pyx":157 * k1 = k + 1 * x, y, z = xs[i], ys[j], zs[k] * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] # <<<<<<<<<<<<<< * value0, value1, value2, value3, value4, value5, value6, value7 = (data[i, j, k], * data[i1, j, k], */ __pyx_t_48 = (__pyx_v_i + 1); __pyx_t_47 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_xs.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_xs.diminfo[0].strides)); __pyx_t_49 = (__pyx_v_j + 1); __pyx_t_45 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_ys.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_ys.diminfo[0].strides)); __pyx_t_50 = (__pyx_v_k + 1); __pyx_t_36 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_zs.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_zs.diminfo[0].strides)); __pyx_v_x1 = __pyx_t_47; __pyx_v_y1 = __pyx_t_45; __pyx_v_z1 = __pyx_t_36; /* "neuron/rxd/geometry3d/surfaces.pyx":158 * x, y, z = xs[i], ys[j], zs[k] * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] * value0, value1, value2, value3, value4, value5, value6, value7 = (data[i, j, k], # <<<<<<<<<<<<<< * data[i1, j, k], * data[i1, j1, k], */ __pyx_t_51 = __pyx_v_i; __pyx_t_52 = __pyx_v_j; __pyx_t_53 = __pyx_v_k; __pyx_t_13 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_53, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); /* "neuron/rxd/geometry3d/surfaces.pyx":159 * x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] * value0, value1, value2, value3, value4, value5, value6, value7 = (data[i, j, k], * data[i1, j, k], # <<<<<<<<<<<<<< * data[i1, j1, k], * data[i, j1, k], */ __pyx_t_54 = __pyx_v_i1; __pyx_t_55 = __pyx_v_j; __pyx_t_56 = __pyx_v_k; __pyx_t_7 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_55, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_56, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); /* "neuron/rxd/geometry3d/surfaces.pyx":160 * value0, value1, value2, value3, value4, value5, value6, value7 = (data[i, j, k], * data[i1, j, k], * data[i1, j1, k], # <<<<<<<<<<<<<< * data[i, j1, k], * data[i, j, k1], */ __pyx_t_57 = __pyx_v_i1; __pyx_t_58 = __pyx_v_j1; __pyx_t_59 = __pyx_v_k; __pyx_t_12 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_58, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_59, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); /* "neuron/rxd/geometry3d/surfaces.pyx":161 * data[i1, j, k], * data[i1, j1, k], * data[i, j1, k], # <<<<<<<<<<<<<< * data[i, j, k1], * data[i1, j, k1], */ __pyx_t_60 = __pyx_v_i; __pyx_t_61 = __pyx_v_j1; __pyx_t_62 = __pyx_v_k; __pyx_t_8 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_61, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_62, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "neuron/rxd/geometry3d/surfaces.pyx":162 * data[i1, j1, k], * data[i, j1, k], * data[i, j, k1], # <<<<<<<<<<<<<< * data[i1, j, k1], * data[i1, j1, k1], */ __pyx_t_63 = __pyx_v_i; __pyx_t_64 = __pyx_v_j; __pyx_t_65 = __pyx_v_k1; __pyx_t_10 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_63, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_64, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_65, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); /* "neuron/rxd/geometry3d/surfaces.pyx":163 * data[i, j1, k], * data[i, j, k1], * data[i1, j, k1], # <<<<<<<<<<<<<< * data[i1, j1, k1], * data[i, j1, k1]) */ __pyx_t_66 = __pyx_v_i1; __pyx_t_67 = __pyx_v_j; __pyx_t_68 = __pyx_v_k1; __pyx_t_9 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_66, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_67, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_68, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); /* "neuron/rxd/geometry3d/surfaces.pyx":164 * data[i, j, k1], * data[i1, j, k1], * data[i1, j1, k1], # <<<<<<<<<<<<<< * data[i, j1, k1]) * # TODO: if i = 0, j = k = 1, then this finds the triangles to the left (so can get area that way), etc... */ __pyx_t_69 = __pyx_v_i1; __pyx_t_70 = __pyx_v_j1; __pyx_t_71 = __pyx_v_k1; __pyx_t_32 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_70, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_71, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); /* "neuron/rxd/geometry3d/surfaces.pyx":165 * data[i1, j, k1], * data[i1, j1, k1], * data[i, j1, k1]) # <<<<<<<<<<<<<< * # TODO: if i = 0, j = k = 1, then this finds the triangles to the left (so can get area that way), etc... * start += 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) */ __pyx_t_72 = __pyx_v_i; __pyx_t_73 = __pyx_v_j1; __pyx_t_74 = __pyx_v_k1; __pyx_t_35 = PyFloat_FromDouble((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_data.diminfo[0].strides, __pyx_t_73, __pyx_pybuffernd_data.diminfo[1].strides, __pyx_t_74, __pyx_pybuffernd_data.diminfo[2].strides))); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_35); __Pyx_XDECREF_SET(__pyx_v_value0, __pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF_SET(__pyx_v_value1, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_value2, __pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_value3, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_value4, __pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_value5, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_value6, __pyx_t_32); __pyx_t_32 = 0; __Pyx_XDECREF_SET(__pyx_v_value7, __pyx_t_35); __pyx_t_35 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":167 * data[i, j1, k1]) * # TODO: if i = 0, j = k = 1, then this finds the triangles to the left (so can get area that way), etc... * start += 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) # <<<<<<<<<<<<<< * # at this point tridata contains a triangularization that encloses the entire cell's volume * tridata.resize(start, refcheck=False) */ __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_value0); if (unlikely((__pyx_t_24 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_75 = __pyx_PyFloat_AsDouble(__pyx_v_value1); if (unlikely((__pyx_t_75 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_76 = __pyx_PyFloat_AsDouble(__pyx_v_value2); if (unlikely((__pyx_t_76 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_77 = __pyx_PyFloat_AsDouble(__pyx_v_value3); if (unlikely((__pyx_t_77 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_78 = __pyx_PyFloat_AsDouble(__pyx_v_value4); if (unlikely((__pyx_t_78 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_79 = __pyx_PyFloat_AsDouble(__pyx_v_value5); if (unlikely((__pyx_t_79 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_80 = __pyx_PyFloat_AsDouble(__pyx_v_value6); if (unlikely((__pyx_t_80 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_81 = __pyx_PyFloat_AsDouble(__pyx_v_value7); if (unlikely((__pyx_t_81 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_82 = __pyx_v_start; __pyx_v_start = (__pyx_v_start + (9 * find_triangles(__pyx_t_24, __pyx_t_75, __pyx_t_76, __pyx_t_77, __pyx_t_78, __pyx_t_79, __pyx_t_80, __pyx_t_81, __pyx_v_x, __pyx_v_x1, __pyx_v_y, __pyx_v_y1, __pyx_v_z, __pyx_v_z1, (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_tridata.rcbuffer->pybuffer.buf, __pyx_t_82, __pyx_pybuffernd_tridata.diminfo[0].strides)))))); } } } /* "neuron/rxd/geometry3d/surfaces.pyx":169 * start += 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) * # at this point tridata contains a triangularization that encloses the entire cell's volume * tridata.resize(start, refcheck=False) # <<<<<<<<<<<<<< * return tri_volume(tridata) * */ __pyx_t_35 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tridata), __pyx_n_s_resize); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_35); __pyx_t_32 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_32); __pyx_t_32 = 0; __pyx_t_32 = PyDict_New(); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); if (PyDict_SetItem(__pyx_t_32, __pyx_n_s_refcheck, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_35, __pyx_t_9, __pyx_t_32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":170 * # at this point tridata contains a triangularization that encloses the entire cell's volume * tridata.resize(start, refcheck=False) * return tri_volume(tridata) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_volume(((PyArrayObject *)__pyx_v_tridata), 0)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":128 * @cython.boundscheck(False) * @cython.wraparound(False) * def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): # <<<<<<<<<<<<<< * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_30); __Pyx_XDECREF(__pyx_t_31); __Pyx_XDECREF(__pyx_t_32); __Pyx_XDECREF(__pyx_t_33); __Pyx_XDECREF(__pyx_t_35); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_local_xs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_local_ys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_local_zs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tridata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zs.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.volume_inside_cell", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_data.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_local_xs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_local_ys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_local_zs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tridata.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ys.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_zs.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_local_xs); __Pyx_XDECREF((PyObject *)__pyx_v_local_ys); __Pyx_XDECREF((PyObject *)__pyx_v_local_zs); __Pyx_XDECREF((PyObject *)__pyx_v_data); __Pyx_XDECREF((PyObject *)__pyx_v_tridata); __Pyx_XDECREF(__pyx_v_value0); __Pyx_XDECREF(__pyx_v_value1); __Pyx_XDECREF(__pyx_v_value2); __Pyx_XDECREF(__pyx_v_value3); __Pyx_XDECREF(__pyx_v_value4); __Pyx_XDECREF(__pyx_v_value5); __Pyx_XDECREF(__pyx_v_value6); __Pyx_XDECREF(__pyx_v_value7); __Pyx_XDECREF(__pyx_v_objdist); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":173 * * * cdef append_with_deltas(list cell_list, int i, int j, int k): # <<<<<<<<<<<<<< * cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), */ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltas(PyObject *__pyx_v_cell_list, int __pyx_v_i, int __pyx_v_j, int __pyx_v_k) { int __pyx_v_im1; int __pyx_v_jm1; int __pyx_v_km1; int __pyx_v_ip1; int __pyx_v_jp1; int __pyx_v_kp1; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append_with_deltas", 0); __Pyx_INCREF(__pyx_v_cell_list); /* "neuron/rxd/geometry3d/surfaces.pyx":174 * * cdef append_with_deltas(list cell_list, int i, int j, int k): * cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 # <<<<<<<<<<<<<< * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), * (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), */ __pyx_v_im1 = (__pyx_v_i - 1); __pyx_v_jm1 = (__pyx_v_j - 1); __pyx_v_km1 = (__pyx_v_k - 1); __pyx_v_ip1 = (__pyx_v_i + 1); __pyx_v_jp1 = (__pyx_v_j + 1); __pyx_v_kp1 = (__pyx_v_k + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":175 * cdef append_with_deltas(list cell_list, int i, int j, int k): * cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), # <<<<<<<<<<<<<< * (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), * (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":176 * cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), * (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), # <<<<<<<<<<<<<< * (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), * (i, j, km1), (i, j, kp1), (i, jp1, km1), (i, jp1, k), (i, jp1, kp1), */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":177 * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), * (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), * (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), # <<<<<<<<<<<<<< * (i, j, km1), (i, j, kp1), (i, jp1, km1), (i, jp1, k), (i, jp1, kp1), * (ip1, jm1, km1), (ip1, jm1, k), (ip1, jm1, kp1), (ip1, j, km1), */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_im1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":178 * (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), * (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), * (i, j, km1), (i, j, kp1), (i, jp1, km1), (i, jp1, k), (i, jp1, kp1), # <<<<<<<<<<<<<< * (ip1, jm1, km1), (ip1, jm1, k), (ip1, jm1, kp1), (ip1, j, km1), * (ip1, j, k), (ip1, j, kp1), (ip1, jp1, km1), (ip1, jp1, k), */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = PyTuple_New(3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":179 * (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), * (i, j, km1), (i, j, kp1), (i, jp1, km1), (i, jp1, k), (i, jp1, kp1), * (ip1, jm1, km1), (ip1, jm1, k), (ip1, jm1, kp1), (ip1, j, km1), # <<<<<<<<<<<<<< * (ip1, j, k), (ip1, j, kp1), (ip1, jp1, km1), (ip1, jp1, k), * (ip1, jp1, kp1)] */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_21 = PyTuple_New(3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jm1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":180 * (i, j, km1), (i, j, kp1), (i, jp1, km1), (i, jp1, k), (i, jp1, kp1), * (ip1, jm1, km1), (ip1, jm1, k), (ip1, jm1, kp1), (ip1, j, km1), * (ip1, j, k), (ip1, j, kp1), (ip1, jp1, km1), (ip1, jp1, k), # <<<<<<<<<<<<<< * (ip1, jp1, kp1)] * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_25 = PyTuple_New(3); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_26 = PyTuple_New(3); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_km1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_27 = PyTuple_New(3); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_27, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_28 = PyTuple_New(3); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_28, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":181 * (ip1, jm1, km1), (ip1, jm1, k), (ip1, jm1, kp1), (ip1, j, km1), * (ip1, j, k), (ip1, j, kp1), (ip1, jp1, km1), (ip1, jp1, k), * (ip1, jp1, kp1)] # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ip1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_jp1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_kp1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_29 = PyTuple_New(3); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_29, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_29, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":175 * cdef append_with_deltas(list cell_list, int i, int j, int k): * cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), # <<<<<<<<<<<<<< * (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), * (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), */ __pyx_t_1 = PyList_New(26); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_1, 4, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_1, 5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_1, 6, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_1, 7, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyList_SET_ITEM(__pyx_t_1, 8, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); PyList_SET_ITEM(__pyx_t_1, 9, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyList_SET_ITEM(__pyx_t_1, 10, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_15); PyList_SET_ITEM(__pyx_t_1, 11, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_16); PyList_SET_ITEM(__pyx_t_1, 12, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_17); PyList_SET_ITEM(__pyx_t_1, 13, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_1, 14, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_19); PyList_SET_ITEM(__pyx_t_1, 15, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_20); PyList_SET_ITEM(__pyx_t_1, 16, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_21); PyList_SET_ITEM(__pyx_t_1, 17, __pyx_t_21); __Pyx_GIVEREF(__pyx_t_22); PyList_SET_ITEM(__pyx_t_1, 18, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_23); PyList_SET_ITEM(__pyx_t_1, 19, __pyx_t_23); __Pyx_GIVEREF(__pyx_t_24); PyList_SET_ITEM(__pyx_t_1, 20, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_25); PyList_SET_ITEM(__pyx_t_1, 21, __pyx_t_25); __Pyx_GIVEREF(__pyx_t_26); PyList_SET_ITEM(__pyx_t_1, 22, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_27); PyList_SET_ITEM(__pyx_t_1, 23, __pyx_t_27); __Pyx_GIVEREF(__pyx_t_28); PyList_SET_ITEM(__pyx_t_1, 24, __pyx_t_28); __Pyx_GIVEREF(__pyx_t_29); PyList_SET_ITEM(__pyx_t_1, 25, __pyx_t_29); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_29 = PyNumber_InPlaceAdd(__pyx_v_cell_list, __pyx_t_1); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_cell_list, ((PyObject*)__pyx_t_29)); __pyx_t_29 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":173 * * * cdef append_with_deltas(list cell_list, int i, int j, int k): # <<<<<<<<<<<<<< * cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 * cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_24); __Pyx_XDECREF(__pyx_t_25); __Pyx_XDECREF(__pyx_t_26); __Pyx_XDECREF(__pyx_t_27); __Pyx_XDECREF(__pyx_t_28); __Pyx_XDECREF(__pyx_t_29); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.append_with_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cell_list); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":194 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef chunkify(objects, xs, ys, zs, int chunk_size, double dx): # <<<<<<<<<<<<<< * * cdef int almost = chunk_size - 1 */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_chunkify(PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_v_chunk_size, double __pyx_v_dx, CYTHON_UNUSED int __pyx_skip_dispatch) { int __pyx_v_almost; int __pyx_v_nx; int __pyx_v_ny; int __pyx_v_nz; CYTHON_UNUSED PyObject *__pyx_v_objects_distances = 0; CYTHON_UNUSED int __pyx_v_m; int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; double __pyx_v_max_d; PyObject *__pyx_v_chunk_objs = 0; int __pyx_v_lenx; int __pyx_v_leny; int __pyx_v_lenz; CYTHON_UNUSED int __pyx_v_robj; double __pyx_v_xlo; double __pyx_v_xhi; double __pyx_v_ylo; double __pyx_v_yhi; double __pyx_v_zlo; double __pyx_v_zhi; double __pyx_v_bufferdx; PyObject *__pyx_v_obj = NULL; int __pyx_v_is_skew_cone; PyObject *__pyx_v_objdist = NULL; PyObject *__pyx_v_chunk_objsi = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; double __pyx_t_15; long __pyx_t_16; long __pyx_t_17; long __pyx_t_18; double __pyx_t_19; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; int __pyx_t_24; int __pyx_t_25; PyObject *__pyx_t_26 = NULL; int __pyx_t_27; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chunkify", 0); /* "neuron/rxd/geometry3d/surfaces.pyx":196 * cpdef chunkify(objects, xs, ys, zs, int chunk_size, double dx): * * cdef int almost = chunk_size - 1 # <<<<<<<<<<<<<< * cdef int nx = (len(xs) + almost) // chunk_size * cdef int ny = (len(ys) + almost) // chunk_size */ __pyx_v_almost = (__pyx_v_chunk_size - 1); /* "neuron/rxd/geometry3d/surfaces.pyx":197 * * cdef int almost = chunk_size - 1 * cdef int nx = (len(xs) + almost) // chunk_size # <<<<<<<<<<<<<< * cdef int ny = (len(ys) + almost) // chunk_size * cdef int nz = (len(zs) + almost) // chunk_size */ __pyx_t_1 = PyObject_Length(__pyx_v_xs); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 + __pyx_v_almost); if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_2))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nx = __Pyx_div_Py_ssize_t(__pyx_t_2, __pyx_v_chunk_size); /* "neuron/rxd/geometry3d/surfaces.pyx":198 * cdef int almost = chunk_size - 1 * cdef int nx = (len(xs) + almost) // chunk_size * cdef int ny = (len(ys) + almost) // chunk_size # <<<<<<<<<<<<<< * cdef int nz = (len(zs) + almost) // chunk_size * cdef list objects_distances = [obj.distance for obj in objects] */ __pyx_t_2 = PyObject_Length(__pyx_v_ys); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = (__pyx_t_2 + __pyx_v_almost); if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_ny = __Pyx_div_Py_ssize_t(__pyx_t_1, __pyx_v_chunk_size); /* "neuron/rxd/geometry3d/surfaces.pyx":199 * cdef int nx = (len(xs) + almost) // chunk_size * cdef int ny = (len(ys) + almost) // chunk_size * cdef int nz = (len(zs) + almost) // chunk_size # <<<<<<<<<<<<<< * cdef list objects_distances = [obj.distance for obj in objects] * cdef int m, i, j, k */ __pyx_t_1 = PyObject_Length(__pyx_v_zs); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 + __pyx_v_almost); if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_2))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nz = __Pyx_div_Py_ssize_t(__pyx_t_2, __pyx_v_chunk_size); /* "neuron/rxd/geometry3d/surfaces.pyx":200 * cdef int ny = (len(ys) + almost) // chunk_size * cdef int nz = (len(zs) + almost) // chunk_size * cdef list objects_distances = [obj.distance for obj in objects] # <<<<<<<<<<<<<< * cdef int m, i, j, k * */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_v_objects)) || PyTuple_CheckExact(__pyx_v_objects)) { __pyx_t_4 = __pyx_v_objects; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_objects); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_objects_distances = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":204 * * # this is bigger than sqrt(3) * dx / 2 \approx 0.866, the distance from center of cube to corner * cdef double max_d = dx * .87 * chunk_size # <<<<<<<<<<<<<< * * # safety factor */ __pyx_v_max_d = ((__pyx_v_dx * .87) * __pyx_v_chunk_size); /* "neuron/rxd/geometry3d/surfaces.pyx":207 * * # safety factor * max_d *= 2 # <<<<<<<<<<<<<< * * cdef list chunk_objs = [[[[] for k in range(nz)] for j in range(ny)] for i in range(nx)] */ __pyx_v_max_d = (__pyx_v_max_d * 2.0); /* "neuron/rxd/geometry3d/surfaces.pyx":209 * max_d *= 2 * * cdef list chunk_objs = [[[[] for k in range(nz)] for j in range(ny)] for i in range(nx)] # <<<<<<<<<<<<<< * * # identify chunk_objs */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __pyx_v_nx; for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_i = __pyx_t_8; __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __pyx_v_ny; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __pyx_v_nz; for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_k = __pyx_t_12; __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_v_chunk_objs = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":212 * * # identify chunk_objs * cdef int lenx = len(xs) # <<<<<<<<<<<<<< * cdef int leny = len(ys) * cdef int lenz = len(zs), robj = 0 */ __pyx_t_2 = PyObject_Length(__pyx_v_xs); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenx = __pyx_t_2; /* "neuron/rxd/geometry3d/surfaces.pyx":213 * # identify chunk_objs * cdef int lenx = len(xs) * cdef int leny = len(ys) # <<<<<<<<<<<<<< * cdef int lenz = len(zs), robj = 0 * cdef double xlo, xhi, ylo, yhi, zlo, zhi */ __pyx_t_2 = PyObject_Length(__pyx_v_ys); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_leny = __pyx_t_2; /* "neuron/rxd/geometry3d/surfaces.pyx":214 * cdef int lenx = len(xs) * cdef int leny = len(ys) * cdef int lenz = len(zs), robj = 0 # <<<<<<<<<<<<<< * cdef double xlo, xhi, ylo, yhi, zlo, zhi * cdef double bufferdx = 3 * dx */ __pyx_t_2 = PyObject_Length(__pyx_v_zs); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_lenz = __pyx_t_2; __pyx_v_robj = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":216 * cdef int lenz = len(zs), robj = 0 * cdef double xlo, xhi, ylo, yhi, zlo, zhi * cdef double bufferdx = 3 * dx # <<<<<<<<<<<<<< * * # TODO: the is_skew_cone business is here because distances are not the real distances in that case; */ __pyx_v_bufferdx = (3.0 * __pyx_v_dx); /* "neuron/rxd/geometry3d/surfaces.pyx":220 * # TODO: the is_skew_cone business is here because distances are not the real distances in that case; * # remove it when I fix this (and will get better performance) * for m, obj in enumerate(objects): # <<<<<<<<<<<<<< * is_skew_cone = isinstance(obj, graphicsPrimitives.SkewCone) * objdist = obj.distance */ __pyx_t_7 = 0; if (likely(PyList_CheckExact(__pyx_v_objects)) || PyTuple_CheckExact(__pyx_v_objects)) { __pyx_t_3 = __pyx_v_objects; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_objects); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_4); __pyx_t_4 = 0; __pyx_v_m = __pyx_t_7; __pyx_t_7 = (__pyx_t_7 + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":221 * # remove it when I fix this (and will get better performance) * for m, obj in enumerate(objects): * is_skew_cone = isinstance(obj, graphicsPrimitives.SkewCone) # <<<<<<<<<<<<<< * objdist = obj.distance * for i in range(nx): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_graphicsPrimitives); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SkewCone); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_14 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_6); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_is_skew_cone = __pyx_t_14; /* "neuron/rxd/geometry3d/surfaces.pyx":222 * for m, obj in enumerate(objects): * is_skew_cone = isinstance(obj, graphicsPrimitives.SkewCone) * objdist = obj.distance # <<<<<<<<<<<<<< * for i in range(nx): * xlo, xhi = xs[i * chunk_size], xs[min((i + 1) * chunk_size - 1, lenx - 1)] */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_distance); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":223 * is_skew_cone = isinstance(obj, graphicsPrimitives.SkewCone) * objdist = obj.distance * for i in range(nx): # <<<<<<<<<<<<<< * xlo, xhi = xs[i * chunk_size], xs[min((i + 1) * chunk_size - 1, lenx - 1)] * chunk_objsi = chunk_objs[i] */ __pyx_t_8 = __pyx_v_nx; for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; /* "neuron/rxd/geometry3d/surfaces.pyx":224 * objdist = obj.distance * for i in range(nx): * xlo, xhi = xs[i * chunk_size], xs[min((i + 1) * chunk_size - 1, lenx - 1)] # <<<<<<<<<<<<<< * chunk_objsi = chunk_objs[i] * # CTNG:testbb */ __pyx_t_10 = (__pyx_v_i * __pyx_v_chunk_size); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_xs, __pyx_t_10, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = (__pyx_v_lenx - 1); __pyx_t_17 = (((__pyx_v_i + 1) * __pyx_v_chunk_size) - 1); if (((__pyx_t_16 < __pyx_t_17) != 0)) { __pyx_t_18 = __pyx_t_16; } else { __pyx_t_18 = __pyx_t_17; } __pyx_t_16 = __pyx_t_18; __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_xs, __pyx_t_16, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_xlo = __pyx_t_15; __pyx_v_xhi = __pyx_t_19; /* "neuron/rxd/geometry3d/surfaces.pyx":225 * for i in range(nx): * xlo, xhi = xs[i * chunk_size], xs[min((i + 1) * chunk_size - 1, lenx - 1)] * chunk_objsi = chunk_objs[i] # <<<<<<<<<<<<<< * # CTNG:testbb * if not obj.overlaps_x(xlo - bufferdx, xhi + bufferdx): continue */ __pyx_t_6 = PyList_GET_ITEM(__pyx_v_chunk_objs, __pyx_v_i); __Pyx_INCREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_chunk_objsi, __pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":227 * chunk_objsi = chunk_objs[i] * # CTNG:testbb * if not obj.overlaps_x(xlo - bufferdx, xhi + bufferdx): continue # <<<<<<<<<<<<<< * for j in range(ny): * ylo, yhi = ys[j * chunk_size], ys[min(leny - 1, (j + 1) * chunk_size - 1)] */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_overlaps_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = PyFloat_FromDouble((__pyx_v_xlo - __pyx_v_bufferdx)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_20 = PyFloat_FromDouble((__pyx_v_xhi + __pyx_v_bufferdx)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = NULL; __pyx_t_1 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_21)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_21); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } __pyx_t_22 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_21) { __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_21); __pyx_t_21 = NULL; } __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_1, __pyx_t_20); __pyx_t_13 = 0; __pyx_t_20 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_22, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_23 = ((!__pyx_t_14) != 0); if (__pyx_t_23) { goto __pyx_L13_continue; } /* "neuron/rxd/geometry3d/surfaces.pyx":228 * # CTNG:testbb * if not obj.overlaps_x(xlo - bufferdx, xhi + bufferdx): continue * for j in range(ny): # <<<<<<<<<<<<<< * ylo, yhi = ys[j * chunk_size], ys[min(leny - 1, (j + 1) * chunk_size - 1)] * if not obj.overlaps_y(ylo - bufferdx, yhi + bufferdx): continue */ __pyx_t_10 = __pyx_v_ny; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_j = __pyx_t_11; /* "neuron/rxd/geometry3d/surfaces.pyx":229 * if not obj.overlaps_x(xlo - bufferdx, xhi + bufferdx): continue * for j in range(ny): * ylo, yhi = ys[j * chunk_size], ys[min(leny - 1, (j + 1) * chunk_size - 1)] # <<<<<<<<<<<<<< * if not obj.overlaps_y(ylo - bufferdx, yhi + bufferdx): continue * for k in range(nz): */ __pyx_t_12 = (__pyx_v_j * __pyx_v_chunk_size); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ys, __pyx_t_12, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = (((__pyx_v_j + 1) * __pyx_v_chunk_size) - 1); __pyx_t_18 = (__pyx_v_leny - 1); if (((__pyx_t_16 < __pyx_t_18) != 0)) { __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_18; } __pyx_t_16 = __pyx_t_17; __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ys, __pyx_t_16, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_ylo = __pyx_t_19; __pyx_v_yhi = __pyx_t_15; /* "neuron/rxd/geometry3d/surfaces.pyx":230 * for j in range(ny): * ylo, yhi = ys[j * chunk_size], ys[min(leny - 1, (j + 1) * chunk_size - 1)] * if not obj.overlaps_y(ylo - bufferdx, yhi + bufferdx): continue # <<<<<<<<<<<<<< * for k in range(nz): * zlo, zhi = zs[k * chunk_size], zs[min(lenz - 1, (k + 1) * chunk_size - 1)] */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_overlaps_y); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_22 = PyFloat_FromDouble((__pyx_v_ylo - __pyx_v_bufferdx)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_20 = PyFloat_FromDouble((__pyx_v_yhi + __pyx_v_bufferdx)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_13 = NULL; __pyx_t_1 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } __pyx_t_21 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_1, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_1, __pyx_t_20); __pyx_t_22 = 0; __pyx_t_20 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_21, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_23 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_14 = ((!__pyx_t_23) != 0); if (__pyx_t_14) { goto __pyx_L16_continue; } /* "neuron/rxd/geometry3d/surfaces.pyx":231 * ylo, yhi = ys[j * chunk_size], ys[min(leny - 1, (j + 1) * chunk_size - 1)] * if not obj.overlaps_y(ylo - bufferdx, yhi + bufferdx): continue * for k in range(nz): # <<<<<<<<<<<<<< * zlo, zhi = zs[k * chunk_size], zs[min(lenz - 1, (k + 1) * chunk_size - 1)] * if not obj.overlaps_z(zlo - bufferdx, zhi + bufferdx): continue */ __pyx_t_12 = __pyx_v_nz; for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_12; __pyx_t_24+=1) { __pyx_v_k = __pyx_t_24; /* "neuron/rxd/geometry3d/surfaces.pyx":232 * if not obj.overlaps_y(ylo - bufferdx, yhi + bufferdx): continue * for k in range(nz): * zlo, zhi = zs[k * chunk_size], zs[min(lenz - 1, (k + 1) * chunk_size - 1)] # <<<<<<<<<<<<<< * if not obj.overlaps_z(zlo - bufferdx, zhi + bufferdx): continue * # CTNG:testball */ __pyx_t_25 = (__pyx_v_k * __pyx_v_chunk_size); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_zs, __pyx_t_25, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = (((__pyx_v_k + 1) * __pyx_v_chunk_size) - 1); __pyx_t_17 = (__pyx_v_lenz - 1); if (((__pyx_t_16 < __pyx_t_17) != 0)) { __pyx_t_18 = __pyx_t_16; } else { __pyx_t_18 = __pyx_t_17; } __pyx_t_16 = __pyx_t_18; __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_zs, __pyx_t_16, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_zlo = __pyx_t_15; __pyx_v_zhi = __pyx_t_19; /* "neuron/rxd/geometry3d/surfaces.pyx":233 * for k in range(nz): * zlo, zhi = zs[k * chunk_size], zs[min(lenz - 1, (k + 1) * chunk_size - 1)] * if not obj.overlaps_z(zlo - bufferdx, zhi + bufferdx): continue # <<<<<<<<<<<<<< * # CTNG:testball * if is_skew_cone or objdist((xlo + xhi) * .5, (ylo + yhi) * .5, (zlo + zhi) * .5) < max_d: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_overlaps_z); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_21 = PyFloat_FromDouble((__pyx_v_zlo - __pyx_v_bufferdx)); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_20 = PyFloat_FromDouble((__pyx_v_zhi + __pyx_v_bufferdx)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_22 = NULL; __pyx_t_1 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } __pyx_t_13 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_1, __pyx_t_21); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_1, __pyx_t_20); __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_23 = ((!__pyx_t_14) != 0); if (__pyx_t_23) { goto __pyx_L19_continue; } /* "neuron/rxd/geometry3d/surfaces.pyx":235 * if not obj.overlaps_z(zlo - bufferdx, zhi + bufferdx): continue * # CTNG:testball * if is_skew_cone or objdist((xlo + xhi) * .5, (ylo + yhi) * .5, (zlo + zhi) * .5) < max_d: # <<<<<<<<<<<<<< * chunk_objsi[j][k].append(objdist) * return chunk_objs, nx, ny, nz */ __pyx_t_14 = (__pyx_v_is_skew_cone != 0); if (!__pyx_t_14) { } else { __pyx_t_23 = __pyx_t_14; goto __pyx_L23_bool_binop_done; } __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_xlo + __pyx_v_xhi) * .5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = PyFloat_FromDouble(((__pyx_v_ylo + __pyx_v_yhi) * .5)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_20 = PyFloat_FromDouble(((__pyx_v_zlo + __pyx_v_zhi) * .5)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(__pyx_v_objdist); __pyx_t_21 = __pyx_v_objdist; __pyx_t_22 = NULL; __pyx_t_1 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_21))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_21); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_21, function); __pyx_t_1 = 1; } } __pyx_t_26 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_26, 2+__pyx_t_1, __pyx_t_20); __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_20 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_26, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_21 = PyFloat_FromDouble(__pyx_v_max_d); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_26 = PyObject_RichCompare(__pyx_t_6, __pyx_t_21, Py_LT); __Pyx_XGOTREF(__pyx_t_26); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_26); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_23 = __pyx_t_14; __pyx_L23_bool_binop_done:; if (__pyx_t_23) { /* "neuron/rxd/geometry3d/surfaces.pyx":236 * # CTNG:testball * if is_skew_cone or objdist((xlo + xhi) * .5, (ylo + yhi) * .5, (zlo + zhi) * .5) < max_d: * chunk_objsi[j][k].append(objdist) # <<<<<<<<<<<<<< * return chunk_objs, nx, ny, nz * */ __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_chunk_objsi, __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_26, __pyx_v_k, int, 1, __Pyx_PyInt_From_int, 0, 0, 0); if (unlikely(__pyx_t_21 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_27 = __Pyx_PyObject_Append(__pyx_t_21, __pyx_v_objdist); if (unlikely(__pyx_t_27 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":235 * if not obj.overlaps_z(zlo - bufferdx, zhi + bufferdx): continue * # CTNG:testball * if is_skew_cone or objdist((xlo + xhi) * .5, (ylo + yhi) * .5, (zlo + zhi) * .5) < max_d: # <<<<<<<<<<<<<< * chunk_objsi[j][k].append(objdist) * return chunk_objs, nx, ny, nz */ } __pyx_L19_continue:; } __pyx_L16_continue:; } __pyx_L13_continue:; } /* "neuron/rxd/geometry3d/surfaces.pyx":220 * # TODO: the is_skew_cone business is here because distances are not the real distances in that case; * # remove it when I fix this (and will get better performance) * for m, obj in enumerate(objects): # <<<<<<<<<<<<<< * is_skew_cone = isinstance(obj, graphicsPrimitives.SkewCone) * objdist = obj.distance */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":237 * if is_skew_cone or objdist((xlo + xhi) * .5, (ylo + yhi) * .5, (zlo + zhi) * .5) < max_d: * chunk_objsi[j][k].append(objdist) * return chunk_objs, nx, ny, nz # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_21 = __Pyx_PyInt_From_int(__pyx_v_ny); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_v_nz); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_chunk_objs); __Pyx_GIVEREF(__pyx_v_chunk_objs); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_chunk_objs); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_21); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_26); __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_26 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":194 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef chunkify(objects, xs, ys, zs, int chunk_size, double dx): # <<<<<<<<<<<<<< * * cdef int almost = chunk_size - 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_26); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.chunkify", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_objects_distances); __Pyx_XDECREF(__pyx_v_chunk_objs); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_objdist); __Pyx_XDECREF(__pyx_v_chunk_objsi); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_objects = 0; PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; int __pyx_v_chunk_size; double __pyx_v_dx; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("chunkify (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objects,&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,&__pyx_n_s_chunk_size,&__pyx_n_s_dx,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chunkify", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chunkify", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chunkify", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunk_size)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chunkify", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("chunkify", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chunkify") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_objects = values[0]; __pyx_v_xs = values[1]; __pyx_v_ys = values[2]; __pyx_v_zs = values[3]; __pyx_v_chunk_size = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_chunk_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_dx = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_dx == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("chunkify", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.chunkify", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_8chunkify(__pyx_self, __pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_chunk_size, __pyx_v_dx); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_8chunkify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, int __pyx_v_chunk_size, double __pyx_v_dx) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("chunkify", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_chunkify(__pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_chunk_size, __pyx_v_dx, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.chunkify", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":252 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef triangulate_surface(list objects, xs, ys, zs, internal_membranes): # <<<<<<<<<<<<<< * # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks * cdef int chunk_size = max(10, int((len(xs) * len(ys) * len(zs) / max_chunks) ** (1 / 3.))) */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_triangulate_surface(PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_internal_membranes, CYTHON_UNUSED int __pyx_skip_dispatch) { int __pyx_v_chunk_size; double __pyx_v_grid_dx; CYTHON_UNUSED double __pyx_v_grid_dy; CYTHON_UNUSED double __pyx_v_grid_dz; double __pyx_v_dx; PyObject *__pyx_v_chunk_objs = 0; int __pyx_v_nx; int __pyx_v_ny; int __pyx_v_nz; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; long __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; double __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *(*__pyx_t_14)(PyObject *); int __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("triangulate_surface", 0); /* "neuron/rxd/geometry3d/surfaces.pyx":254 * cpdef triangulate_surface(list objects, xs, ys, zs, internal_membranes): * # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks * cdef int chunk_size = max(10, int((len(xs) * len(ys) * len(zs) / max_chunks) ** (1 / 3.))) # <<<<<<<<<<<<<< * cdef double grid_dx = xs[1] - xs[0], grid_dy = ys[1] - ys[0], grid_dz = zs[1] - zs[0] * cdef double dx = grid_dx */ __pyx_t_1 = PyObject_Length(__pyx_v_xs); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Length(__pyx_v_ys); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Length(__pyx_v_zs); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(((__pyx_t_1 * __pyx_t_2) * __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_max_chunks); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyFloat_FromDouble((1.0 / 3.)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Power(__pyx_t_6, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = 10; __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; } else { __pyx_t_8 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __pyx_t_8; __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_chunk_size = __pyx_t_10; /* "neuron/rxd/geometry3d/surfaces.pyx":255 * # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks * cdef int chunk_size = max(10, int((len(xs) * len(ys) * len(zs) / max_chunks) ** (1 / 3.))) * cdef double grid_dx = xs[1] - xs[0], grid_dy = ys[1] - ys[0], grid_dz = zs[1] - zs[0] # <<<<<<<<<<<<<< * cdef double dx = grid_dx * */ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_xs, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_xs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_grid_dx = __pyx_t_11; __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_ys, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_ys, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyNumber_Subtract(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_grid_dy = __pyx_t_11; __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_zs, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_zs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_grid_dz = __pyx_t_11; /* "neuron/rxd/geometry3d/surfaces.pyx":256 * cdef int chunk_size = max(10, int((len(xs) * len(ys) * len(zs) / max_chunks) ** (1 / 3.))) * cdef double grid_dx = xs[1] - xs[0], grid_dy = ys[1] - ys[0], grid_dz = zs[1] - zs[0] * cdef double dx = grid_dx # <<<<<<<<<<<<<< * * cdef list chunk_objs */ __pyx_v_dx = __pyx_v_grid_dx; /* "neuron/rxd/geometry3d/surfaces.pyx":260 * cdef list chunk_objs * cdef int nx, ny, nz * chunk_objs, nx, ny, nz = chunkify(objects, xs, ys, zs, chunk_size, dx) # <<<<<<<<<<<<<< * return _triangulate_surface_given_chunks(objects, xs, ys, zs, internal_membranes, chunk_size, chunk_objs, nx, ny, nz, False, None) * */ __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_chunkify(__pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_chunk_size, __pyx_v_dx, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { PyObject* sequence = __pyx_t_8; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); __pyx_t_12 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_12); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_6,&__pyx_t_12}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_6,&__pyx_t_12}; __pyx_t_13 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_14(__pyx_t_13); if (unlikely(!item)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_chunk_objs = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nx = __pyx_t_10; __pyx_v_ny = __pyx_t_15; __pyx_v_nz = __pyx_t_16; /* "neuron/rxd/geometry3d/surfaces.pyx":261 * cdef int nx, ny, nz * chunk_objs, nx, ny, nz = chunkify(objects, xs, ys, zs, chunk_size, dx) * return _triangulate_surface_given_chunks(objects, xs, ys, zs, internal_membranes, chunk_size, chunk_objs, nx, ny, nz, False, None) # <<<<<<<<<<<<<< * * cpdef _triangulate_surface_given_chunks(list objects, xs, ys, zs, internal_membranes, int chunk_size, list chunk_objs, int nx, int ny, int nz, bint store_areas, areas): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces__triangulate_surface_given_chunks(__pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_internal_membranes, __pyx_v_chunk_size, __pyx_v_chunk_objs, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, 0, Py_None, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":252 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef triangulate_surface(list objects, xs, ys, zs, internal_membranes): # <<<<<<<<<<<<<< * # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks * cdef int chunk_size = max(10, int((len(xs) * len(ys) * len(zs) / max_chunks) ** (1 / 3.))) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.triangulate_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_chunk_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_objects = 0; PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; PyObject *__pyx_v_internal_membranes = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("triangulate_surface (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objects,&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,&__pyx_n_s_internal_membranes,0}; PyObject* values[5] = {0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("triangulate_surface", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("triangulate_surface", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("triangulate_surface", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_internal_membranes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("triangulate_surface", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "triangulate_surface") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); } __pyx_v_objects = ((PyObject*)values[0]); __pyx_v_xs = values[1]; __pyx_v_ys = values[2]; __pyx_v_zs = values[3]; __pyx_v_internal_membranes = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("triangulate_surface", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.triangulate_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), (&PyList_Type), 1, "objects", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_10triangulate_surface(__pyx_self, __pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_internal_membranes); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_10triangulate_surface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_internal_membranes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("triangulate_surface", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_triangulate_surface(__pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_internal_membranes, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.triangulate_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":263 * return _triangulate_surface_given_chunks(objects, xs, ys, zs, internal_membranes, chunk_size, chunk_objs, nx, ny, nz, False, None) * * cpdef _triangulate_surface_given_chunks(list objects, xs, ys, zs, internal_membranes, int chunk_size, list chunk_objs, int nx, int ny, int nz, bint store_areas, areas): # <<<<<<<<<<<<<< * cdef int i, j, k, di, dj, dk * cdef double area */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunks(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__triangulate_surface_given_chunks(PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_internal_membranes, int __pyx_v_chunk_size, PyObject *__pyx_v_chunk_objs, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_store_areas, PyObject *__pyx_v_areas, CYTHON_UNUSED int __pyx_skip_dispatch) { int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; int __pyx_v_di; int __pyx_v_dj; int __pyx_v_dk; double __pyx_v_grid_dx; CYTHON_UNUSED double __pyx_v_grid_dy; CYTHON_UNUSED double __pyx_v_grid_dz; double __pyx_v_r_inner; double __pyx_v_r_outer; double __pyx_v_dx; PyObject *__pyx_v_cell_list = 0; PyObject *__pyx_v_to_process = 0; CYTHON_UNUSED int __pyx_v_cell_count; CYTHON_UNUSED int __pyx_v_dup_count; int __pyx_v_last_starti; CYTHON_UNUSED PyObject *__pyx_v_cell_list2 = 0; PyArrayObject *__pyx_v_triangles = 0; CYTHON_UNUSED int __pyx_v_surf_count; PyObject *__pyx_v_cur_processed = 0; int __pyx_v_brute_force_count; CYTHON_UNUSED PyObject *__pyx_v_clip_objs = 0; PyObject *__pyx_v_cell_id = 0; CYTHON_UNUSED int __pyx_v_numcompartments; int __pyx_v_triangles_i; int __pyx_v_reject_if_outside; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_v_objdist = NULL; PyObject *__pyx_v_chunk_pts = 0; int __pyx_v_num_keys; int __pyx_v_missing_objs; int __pyx_v_starti; int __pyx_v_a; int __pyx_v_b; int __pyx_v_c; PyObject *__pyx_v_chunk_objsa = NULL; PyObject *__pyx_v_chunk_ptsa = NULL; PyObject *__pyx_v_objs = NULL; PyObject *__pyx_v_cells = NULL; CYTHON_UNUSED PyObject *__pyx_v_start_i = NULL; PyObject *__pyx_v_process2 = 0; PyObject *__pyx_v_pt_neighbor_map = NULL; PyObject *__pyx_v_count = 0; int __pyx_v_old_start_i; PyObject *__pyx_v_still_to_process = 0; PyObject *__pyx_v_local_objs = 0; PyObject *__pyx_v_pts = NULL; PyObject *__pyx_v_xlo = NULL; PyObject *__pyx_v_ylo = NULL; PyObject *__pyx_v_zlo = NULL; PyObject *__pyx_v_pt = NULL; PyObject *__pyx_v_neighbor_list = NULL; PyObject *__pyx_v_neighbor = NULL; PyObject *__pyx_v_ncount = NULL; PyObject *__pyx_v_point = NULL; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_clipper = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; PyArrayObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *(*__pyx_t_19)(PyObject *); int __pyx_t_20; int __pyx_t_21; PyObject *__pyx_t_22 = NULL; Py_ssize_t __pyx_t_23; PyObject *__pyx_t_24 = NULL; PyObject *(*__pyx_t_25)(PyObject *); PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; Py_ssize_t __pyx_t_30; PyObject *__pyx_t_31 = NULL; int __pyx_t_32; Py_ssize_t __pyx_t_33; int __pyx_t_34; int __pyx_t_35; int __pyx_t_36; int __pyx_t_37; int __pyx_t_38; int __pyx_t_39; int __pyx_t_40; int __pyx_t_41; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_triangulate_surface_given_chunks", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; /* "neuron/rxd/geometry3d/surfaces.pyx":266 * cdef int i, j, k, di, dj, dk * cdef double area * cdef double grid_dx = xs[1] - xs[0], grid_dy = ys[1] - ys[0], grid_dz = zs[1] - zs[0] # <<<<<<<<<<<<<< * # TODO: we assume a cubic mesh * # assert(grid_dx == grid_dy == grid_dz) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_xs, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_xs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_grid_dx = __pyx_t_4; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_ys, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ys, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_grid_dy = __pyx_t_4; __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_zs, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_zs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_grid_dz = __pyx_t_4; /* "neuron/rxd/geometry3d/surfaces.pyx":269 * # TODO: we assume a cubic mesh * # assert(grid_dx == grid_dy == grid_dz) * cdef double r_inner = grid_dx / 2., r_outer = r_inner * sqrt(3) # <<<<<<<<<<<<<< * cdef double dx = grid_dx * */ __pyx_v_r_inner = (__pyx_v_grid_dx / 2.); __pyx_v_r_outer = (__pyx_v_r_inner * sqrt(3.0)); /* "neuron/rxd/geometry3d/surfaces.pyx":270 * # assert(grid_dx == grid_dy == grid_dz) * cdef double r_inner = grid_dx / 2., r_outer = r_inner * sqrt(3) * cdef double dx = grid_dx # <<<<<<<<<<<<<< * * cdef list cell_list */ __pyx_v_dx = __pyx_v_grid_dx; /* "neuron/rxd/geometry3d/surfaces.pyx":274 * cdef list cell_list * * cdef dict to_process = {} # <<<<<<<<<<<<<< * * cdef int cell_count = 0 */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_to_process = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":276 * cdef dict to_process = {} * * cdef int cell_count = 0 # <<<<<<<<<<<<<< * cdef int dup_count = 0 * cdef int last_starti */ __pyx_v_cell_count = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":277 * * cdef int cell_count = 0 * cdef int dup_count = 0 # <<<<<<<<<<<<<< * cdef int last_starti * */ __pyx_v_dup_count = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":280 * cdef int last_starti * * cdef list cell_list2 = [] # <<<<<<<<<<<<<< * * cdef numpy.ndarray[numpy.float_t, ndim=1] triangles */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_cell_list2 = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":283 * * cdef numpy.ndarray[numpy.float_t, ndim=1] triangles * cdef int surf_count = 0 # <<<<<<<<<<<<<< * * cdef dict cur_processed */ __pyx_v_surf_count = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":286 * * cdef dict cur_processed * cdef int brute_force_count = 0 # <<<<<<<<<<<<<< * cdef list clip_objs * cdef tuple cell_id */ __pyx_v_brute_force_count = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":293 * cdef int numcompartments * # locate all the potential boundary locations * triangles = numpy.zeros(1000) # <<<<<<<<<<<<<< * cdef int triangles_i = 0 * cdef bint reject_if_outside */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9); } } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __pyx_v_triangles = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":294 * # locate all the potential boundary locations * triangles = numpy.zeros(1000) * cdef int triangles_i = 0 # <<<<<<<<<<<<<< * cdef bint reject_if_outside * for m, obj in enumerate(objects): */ __pyx_v_triangles_i = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":296 * cdef int triangles_i = 0 * cdef bint reject_if_outside * for m, obj in enumerate(objects): # <<<<<<<<<<<<<< * # TODO: remove all the stuff about reject_if_outside when have true SkewCone distances * reject_if_outside = not(isinstance(obj, graphicsPrimitives.SkewCone)) */ __pyx_t_10 = 0; __pyx_t_3 = __pyx_v_objects; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_2); __pyx_t_2 = 0; __pyx_v_m = __pyx_t_10; __pyx_t_10 = (__pyx_t_10 + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":298 * for m, obj in enumerate(objects): * # TODO: remove all the stuff about reject_if_outside when have true SkewCone distances * reject_if_outside = not(isinstance(obj, graphicsPrimitives.SkewCone)) # <<<<<<<<<<<<<< * objdist = obj.distance * clip_objs = sum([clipper.primitives for clipper in obj.get_clip()], []) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_graphicsPrimitives); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SkewCone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_reject_if_outside = (!(__pyx_t_12 != 0)); /* "neuron/rxd/geometry3d/surfaces.pyx":299 * # TODO: remove all the stuff about reject_if_outside when have true SkewCone distances * reject_if_outside = not(isinstance(obj, graphicsPrimitives.SkewCone)) * objdist = obj.distance # <<<<<<<<<<<<<< * clip_objs = sum([clipper.primitives for clipper in obj.get_clip()], []) * cell_list = [] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_distance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":300 * reject_if_outside = not(isinstance(obj, graphicsPrimitives.SkewCone)) * objdist = obj.distance * clip_objs = sum([clipper.primitives for clipper in obj.get_clip()], []) # <<<<<<<<<<<<<< * cell_list = [] * cur_processed = {} */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_get_clip); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_14) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_13 = __pyx_t_2; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_16(__pyx_t_13); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_clipper, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_clipper, __pyx_n_s_primitives); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_13); __pyx_t_1 = 0; __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyList_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_13)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_clip_objs, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":301 * objdist = obj.distance * clip_objs = sum([clipper.primitives for clipper in obj.get_clip()], []) * cell_list = [] # <<<<<<<<<<<<<< * cur_processed = {} * for i, j, k in obj.starting_points(xs, ys, zs): */ __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_cell_list, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":302 * clip_objs = sum([clipper.primitives for clipper in obj.get_clip()], []) * cell_list = [] * cur_processed = {} # <<<<<<<<<<<<<< * for i, j, k in obj.starting_points(xs, ys, zs): * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): */ __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_cur_processed, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":303 * cell_list = [] * cur_processed = {} * for i, j, k in obj.starting_points(xs, ys, zs): # <<<<<<<<<<<<<< * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_starting_points); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_15 = 1; } } __pyx_t_14 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_15, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_15, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_15, __pyx_v_zs); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_2 = __pyx_t_13; __Pyx_INCREF(__pyx_t_2); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_16 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_15); __Pyx_INCREF(__pyx_t_13); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_2, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_15); __Pyx_INCREF(__pyx_t_13); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_2, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_13); } if ((likely(PyTuple_CheckExact(__pyx_t_13))) || (PyList_CheckExact(__pyx_t_13))) { PyObject* sequence = __pyx_t_13; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_14 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); __pyx_t_17 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_17); #else __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { Py_ssize_t index = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_18)->tp_iternext; index = 0; __pyx_t_14 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_14)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); index = 1; __pyx_t_1 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 2; __pyx_t_17 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_17)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L10_unpacking_done; __pyx_L9_unpacking_failed:; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L10_unpacking_done:; } __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_v_i = __pyx_t_6; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":304 * cur_processed = {} * for i, j, k in obj.starting_points(xs, ys, zs): * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): # <<<<<<<<<<<<<< * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i + di, j + dj, k + dk)) */ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_product); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyList_New(5); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_17, 0, __pyx_int_0); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_17, 1, __pyx_int_neg_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_17, 2, __pyx_int_1); __Pyx_INCREF(__pyx_int_neg_2); __Pyx_GIVEREF(__pyx_int_neg_2); PyList_SET_ITEM(__pyx_t_17, 3, __pyx_int_neg_2); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyList_SET_ITEM(__pyx_t_17, 4, __pyx_int_2); __pyx_t_14 = PyList_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_14, 0, __pyx_int_0); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_14, 1, __pyx_int_neg_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_14, 2, __pyx_int_1); __Pyx_INCREF(__pyx_int_neg_2); __Pyx_GIVEREF(__pyx_int_neg_2); PyList_SET_ITEM(__pyx_t_14, 3, __pyx_int_neg_2); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyList_SET_ITEM(__pyx_t_14, 4, __pyx_int_2); __pyx_t_18 = PyList_New(5); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_int_0); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_18, 1, __pyx_int_neg_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_18, 2, __pyx_int_1); __Pyx_INCREF(__pyx_int_neg_2); __Pyx_GIVEREF(__pyx_int_neg_2); PyList_SET_ITEM(__pyx_t_18, 3, __pyx_int_neg_2); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyList_SET_ITEM(__pyx_t_18, 4, __pyx_int_2); __pyx_t_22 = NULL; __pyx_t_23 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_22)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_23 = 1; } } __pyx_t_24 = PyTuple_New(3+__pyx_t_23); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_22); __pyx_t_22 = NULL; } __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_23, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_23, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_24, 2+__pyx_t_23, __pyx_t_18); __pyx_t_17 = 0; __pyx_t_14 = 0; __pyx_t_18 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_24, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_1 = __pyx_t_13; __Pyx_INCREF(__pyx_t_1); __pyx_t_23 = 0; __pyx_t_25 = NULL; } else { __pyx_t_23 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_25 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_25)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_23); __Pyx_INCREF(__pyx_t_13); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_1, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_23); __Pyx_INCREF(__pyx_t_13); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_13 = PySequence_ITEM(__pyx_t_1, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_25(__pyx_t_1); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_13); } if ((likely(PyTuple_CheckExact(__pyx_t_13))) || (PyList_CheckExact(__pyx_t_13))) { PyObject* sequence = __pyx_t_13; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_24 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_24 = PyList_GET_ITEM(sequence, 0); __pyx_t_18 = PyList_GET_ITEM(sequence, 1); __pyx_t_14 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_24); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_14); #else __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); #endif __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { Py_ssize_t index = -1; __pyx_t_17 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_17)->tp_iternext; index = 0; __pyx_t_24 = __pyx_t_19(__pyx_t_17); if (unlikely(!__pyx_t_24)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_24); index = 1; __pyx_t_18 = __pyx_t_19(__pyx_t_17); if (unlikely(!__pyx_t_18)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_18); index = 2; __pyx_t_14 = __pyx_t_19(__pyx_t_17); if (unlikely(!__pyx_t_14)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_17), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L14_unpacking_done:; } __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_di = __pyx_t_21; __pyx_v_dj = __pyx_t_20; __pyx_v_dk = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":305 * for i, j, k in obj.starting_points(xs, ys, zs): * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * cell_list.append((i + di, j + dj, k + dk)) * break */ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_contains_surface); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_18 = __Pyx_PyInt_From_int((__pyx_v_i + __pyx_v_di)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_24 = __Pyx_PyInt_From_int((__pyx_v_j + __pyx_v_dj)); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_17 = __Pyx_PyInt_From_int((__pyx_v_k + __pyx_v_dk)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_22 = PyFloat_FromDouble(__pyx_v_grid_dx); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_r_inner); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_27 = PyFloat_FromDouble(__pyx_v_r_outer); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_28 = __Pyx_PyBool_FromLong(__pyx_v_reject_if_outside); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_29 = NULL; __pyx_t_30 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_29)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_29); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_30 = 1; } } __pyx_t_31 = PyTuple_New(11+__pyx_t_30); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); if (__pyx_t_29) { __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_29); __pyx_t_29 = NULL; } __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_31, 0+__pyx_t_30, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_30, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_31, 2+__pyx_t_30, __pyx_t_17); __Pyx_INCREF(__pyx_v_objdist); __Pyx_GIVEREF(__pyx_v_objdist); PyTuple_SET_ITEM(__pyx_t_31, 3+__pyx_t_30, __pyx_v_objdist); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_31, 4+__pyx_t_30, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_31, 5+__pyx_t_30, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_31, 6+__pyx_t_30, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_31, 7+__pyx_t_30, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_31, 8+__pyx_t_30, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_31, 9+__pyx_t_30, __pyx_t_27); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_31, 10+__pyx_t_30, __pyx_t_28); __pyx_t_18 = 0; __pyx_t_24 = 0; __pyx_t_17 = 0; __pyx_t_22 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_31, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_12) { /* "neuron/rxd/geometry3d/surfaces.pyx":306 * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i + di, j + dj, k + dk)) # <<<<<<<<<<<<<< * break * if cell_list: break */ __pyx_t_13 = __Pyx_PyInt_From_int((__pyx_v_i + __pyx_v_di)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyInt_From_int((__pyx_v_j + __pyx_v_dj)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_31 = __Pyx_PyInt_From_int((__pyx_v_k + __pyx_v_dk)); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_28 = PyTuple_New(3); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_28, 2, __pyx_t_31); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_31 = 0; __pyx_t_32 = __Pyx_PyList_Append(__pyx_v_cell_list, __pyx_t_28); if (unlikely(__pyx_t_32 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":307 * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i + di, j + dj, k + dk)) * break # <<<<<<<<<<<<<< * if cell_list: break * else: */ goto __pyx_L12_break; /* "neuron/rxd/geometry3d/surfaces.pyx":305 * for i, j, k in obj.starting_points(xs, ys, zs): * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * cell_list.append((i + di, j + dj, k + dk)) * break */ } /* "neuron/rxd/geometry3d/surfaces.pyx":304 * cur_processed = {} * for i, j, k in obj.starting_points(xs, ys, zs): * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): # <<<<<<<<<<<<<< * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i + di, j + dj, k + dk)) */ } __pyx_L12_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":308 * cell_list.append((i + di, j + dj, k + dk)) * break * if cell_list: break # <<<<<<<<<<<<<< * else: * # CTNG:systemsearch */ __pyx_t_12 = (__pyx_v_cell_list != Py_None) && (PyList_GET_SIZE(__pyx_v_cell_list) != 0); if (__pyx_t_12) { goto __pyx_L8_break; } /* "neuron/rxd/geometry3d/surfaces.pyx":303 * cell_list = [] * cur_processed = {} * for i, j, k in obj.starting_points(xs, ys, zs): # <<<<<<<<<<<<<< * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): */ } /*else*/ { /* "neuron/rxd/geometry3d/surfaces.pyx":311 * else: * # CTNG:systemsearch * brute_force_count += 1 # <<<<<<<<<<<<<< * # TODO: we are highly unlikely to ever reach this code (happened 0 times with the neuron I tested) * # can we prove we never get here? */ __pyx_v_brute_force_count = (__pyx_v_brute_force_count + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":315 * # can we prove we never get here? * * numcompartments = (4 + len(range(bisect.bisect_left(xs, obj.xlo), bisect.bisect_right(xs, obj.xhi)))) * (4 + len(range(bisect.bisect_left(ys, obj.ylo), bisect.bisect_right(ys, obj.yhi)))) * (4 + len(range(bisect.bisect_left(zs, obj.zlo), bisect.bisect_right(zs, obj.zhi)))) # <<<<<<<<<<<<<< * for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): */ __pyx_t_28 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_xlo); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_14 = NULL; __pyx_t_23 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_23 = 1; } } __pyx_t_13 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_23, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_23, __pyx_t_28); __pyx_t_28 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_xhi); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; __pyx_t_23 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_28))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_28); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_28, function); __pyx_t_23 = 1; } } __pyx_t_27 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_27, 0+__pyx_t_23, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_27, 1+__pyx_t_23, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_28, __pyx_t_27, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_31); __pyx_t_1 = 0; __pyx_t_31 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_28, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_23 = PyObject_Length(__pyx_t_31); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_28 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ylo); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_27 = NULL; __pyx_t_30 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_27)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_27); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_30 = 1; } } __pyx_t_13 = PyTuple_New(2+__pyx_t_30); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_27) { __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_27); __pyx_t_27 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_30, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_30, __pyx_t_28); __pyx_t_28 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_yhi); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_27 = NULL; __pyx_t_30 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_28))) { __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_28); if (likely(__pyx_t_27)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28); __Pyx_INCREF(__pyx_t_27); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_28, function); __pyx_t_30 = 1; } } __pyx_t_14 = PyTuple_New(2+__pyx_t_30); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_27) { __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_27); __pyx_t_27 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_30, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_30, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_28, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_1); __pyx_t_31 = 0; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_28, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_30 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_30 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_28 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_zlo); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_14 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_31))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_31); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_31, function); __pyx_t_33 = 1; } } __pyx_t_13 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_33, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_33, __pyx_t_28); __pyx_t_28 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_zhi); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_28))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_28); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_28, function); __pyx_t_33 = 1; } } __pyx_t_27 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_27, 0+__pyx_t_33, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_27, 1+__pyx_t_33, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_28, __pyx_t_27, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_31); __pyx_t_1 = 0; __pyx_t_31 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_28, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_33 = PyObject_Length(__pyx_t_31); if (unlikely(__pyx_t_33 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_v_numcompartments = (((4 + __pyx_t_23) * (4 + __pyx_t_30)) * (4 + __pyx_t_33)); /* "neuron/rxd/geometry3d/surfaces.pyx":316 * * numcompartments = (4 + len(range(bisect.bisect_left(xs, obj.xlo), bisect.bisect_right(xs, obj.xhi)))) * (4 + len(range(bisect.bisect_left(ys, obj.ylo), bisect.bisect_right(ys, obj.yhi)))) * (4 + len(range(bisect.bisect_left(zs, obj.zlo), bisect.bisect_right(zs, obj.zhi)))) * for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): # <<<<<<<<<<<<<< * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i, j, k)) */ __pyx_t_28 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_product); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_27 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_xlo); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_14 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_33 = 1; } } __pyx_t_26 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_33, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_33, __pyx_t_27); __pyx_t_27 = 0; __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_26, NULL); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_SubtractObjC(__pyx_t_28, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_26 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_xhi); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_14 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_27))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_27); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_27, function); __pyx_t_33 = 1; } } __pyx_t_22 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_33, __pyx_v_xs); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_33, __pyx_t_26); __pyx_t_26 = 0; __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_t_22, NULL); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_27 = __Pyx_PyInt_AddObjC(__pyx_t_28, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_27); __pyx_t_13 = 0; __pyx_t_27 = 0; __pyx_t_27 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_28, NULL); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_ylo); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_26 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_22))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_22); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_22, function); __pyx_t_33 = 1; } } __pyx_t_14 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_33, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_33, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_14, NULL); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = __Pyx_PyInt_SubtractObjC(__pyx_t_28, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_yhi); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_26 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_33 = 1; } } __pyx_t_17 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_33, __pyx_v_ys); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_33, __pyx_t_14); __pyx_t_14 = 0; __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_17, NULL); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_t_28, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_13); __pyx_t_22 = 0; __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_28, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_zlo); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_14 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_17))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_17, function); __pyx_t_33 = 1; } } __pyx_t_26 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_33, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_33, __pyx_t_22); __pyx_t_22 = 0; __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_26, NULL); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = __Pyx_PyInt_SubtractObjC(__pyx_t_28, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_26 = __Pyx_GetModuleGlobalName(__pyx_n_s_bisect); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_zhi); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_14 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_22))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_22); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_22, function); __pyx_t_33 = 1; } } __pyx_t_24 = PyTuple_New(2+__pyx_t_33); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_33, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_33, __pyx_t_26); __pyx_t_26 = 0; __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_24, NULL); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = __Pyx_PyInt_AddObjC(__pyx_t_28, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = PyTuple_New(2); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_22); __pyx_t_17 = 0; __pyx_t_22 = 0; __pyx_t_22 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_28, NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; __pyx_t_28 = NULL; __pyx_t_33 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_28)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_28); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_33 = 1; } } __pyx_t_17 = PyTuple_New(3+__pyx_t_33); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (__pyx_t_28) { __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_28); __pyx_t_28 = NULL; } __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_33, __pyx_t_27); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_33, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_33, __pyx_t_22); __pyx_t_27 = 0; __pyx_t_13 = 0; __pyx_t_22 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_17, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_31)) || PyTuple_CheckExact(__pyx_t_31)) { __pyx_t_1 = __pyx_t_31; __Pyx_INCREF(__pyx_t_1); __pyx_t_33 = 0; __pyx_t_25 = NULL; } else { __pyx_t_33 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_25 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; for (;;) { if (likely(!__pyx_t_25)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_33 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_31 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_33); __Pyx_INCREF(__pyx_t_31); __pyx_t_33++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_31 = PySequence_ITEM(__pyx_t_1, __pyx_t_33); __pyx_t_33++; if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); #endif } else { if (__pyx_t_33 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_31 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_33); __Pyx_INCREF(__pyx_t_31); __pyx_t_33++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_31 = PySequence_ITEM(__pyx_t_1, __pyx_t_33); __pyx_t_33++; if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); #endif } } else { __pyx_t_31 = __pyx_t_25(__pyx_t_1); if (unlikely(!__pyx_t_31)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_31); } if ((likely(PyTuple_CheckExact(__pyx_t_31))) || (PyList_CheckExact(__pyx_t_31))) { PyObject* sequence = __pyx_t_31; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_17 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_22 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_13 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_17 = PyList_GET_ITEM(sequence, 0); __pyx_t_22 = PyList_GET_ITEM(sequence, 1); __pyx_t_13 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(__pyx_t_13); #else __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_13 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; } else { Py_ssize_t index = -1; __pyx_t_27 = PyObject_GetIter(__pyx_t_31); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_27)->tp_iternext; index = 0; __pyx_t_17 = __pyx_t_19(__pyx_t_27); if (unlikely(!__pyx_t_17)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); index = 1; __pyx_t_22 = __pyx_t_19(__pyx_t_27); if (unlikely(!__pyx_t_22)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_22); index = 2; __pyx_t_13 = __pyx_t_19(__pyx_t_27); if (unlikely(!__pyx_t_13)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_27), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; goto __pyx_L21_unpacking_done; __pyx_L20_unpacking_failed:; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L21_unpacking_done:; } __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_22); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_i = __pyx_t_6; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":317 * numcompartments = (4 + len(range(bisect.bisect_left(xs, obj.xlo), bisect.bisect_right(xs, obj.xhi)))) * (4 + len(range(bisect.bisect_left(ys, obj.ylo), bisect.bisect_right(ys, obj.yhi)))) * (4 + len(range(bisect.bisect_left(zs, obj.zlo), bisect.bisect_right(zs, obj.zhi)))) * for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * cell_list.append((i, j, k)) * break */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_contains_surface); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_27 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_28 = PyFloat_FromDouble(__pyx_v_grid_dx); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_r_inner); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_r_outer); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_v_reject_if_outside); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_18 = NULL; __pyx_t_30 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_30 = 1; } } __pyx_t_29 = PyTuple_New(11+__pyx_t_30); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_18); __pyx_t_18 = NULL; } __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_29, 0+__pyx_t_30, __pyx_t_22); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_29, 1+__pyx_t_30, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_29, 2+__pyx_t_30, __pyx_t_27); __Pyx_INCREF(__pyx_v_objdist); __Pyx_GIVEREF(__pyx_v_objdist); PyTuple_SET_ITEM(__pyx_t_29, 3+__pyx_t_30, __pyx_v_objdist); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_29, 4+__pyx_t_30, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_29, 5+__pyx_t_30, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_29, 6+__pyx_t_30, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_29, 7+__pyx_t_30, __pyx_t_28); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_29, 8+__pyx_t_30, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_29, 9+__pyx_t_30, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_29, 10+__pyx_t_30, __pyx_t_14); __pyx_t_22 = 0; __pyx_t_17 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_24 = 0; __pyx_t_26 = 0; __pyx_t_14 = 0; __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_29, NULL); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; if (__pyx_t_12) { /* "neuron/rxd/geometry3d/surfaces.pyx":318 * for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i, j, k)) # <<<<<<<<<<<<<< * break * else: */ __pyx_t_31 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_29); __pyx_t_31 = 0; __pyx_t_13 = 0; __pyx_t_29 = 0; __pyx_t_32 = __Pyx_PyList_Append(__pyx_v_cell_list, __pyx_t_14); if (unlikely(__pyx_t_32 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":319 * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i, j, k)) * break # <<<<<<<<<<<<<< * else: * #print 'objects with no contribution to surface' */ goto __pyx_L19_break; /* "neuron/rxd/geometry3d/surfaces.pyx":317 * numcompartments = (4 + len(range(bisect.bisect_left(xs, obj.xlo), bisect.bisect_right(xs, obj.xhi)))) * (4 + len(range(bisect.bisect_left(ys, obj.ylo), bisect.bisect_right(ys, obj.yhi)))) * (4 + len(range(bisect.bisect_left(zs, obj.zlo), bisect.bisect_right(zs, obj.zhi)))) * for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * cell_list.append((i, j, k)) * break */ } /* "neuron/rxd/geometry3d/surfaces.pyx":316 * * numcompartments = (4 + len(range(bisect.bisect_left(xs, obj.xlo), bisect.bisect_right(xs, obj.xhi)))) * (4 + len(range(bisect.bisect_left(ys, obj.ylo), bisect.bisect_right(ys, obj.yhi)))) * (4 + len(range(bisect.bisect_left(zs, obj.zlo), bisect.bisect_right(zs, obj.zhi)))) * for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): # <<<<<<<<<<<<<< * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * cell_list.append((i, j, k)) */ } /*else*/ { } __pyx_L19_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "neuron/rxd/geometry3d/surfaces.pyx":303 * cell_list = [] * cur_processed = {} * for i, j, k in obj.starting_points(xs, ys, zs): # <<<<<<<<<<<<<< * for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): * if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): */ __pyx_L8_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":324 * pass * * if not internal_membranes: # <<<<<<<<<<<<<< * # CTNG:floodfill * while cell_list: */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_internal_membranes); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = ((!__pyx_t_12) != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":326 * if not internal_membranes: * # CTNG:floodfill * while cell_list: # <<<<<<<<<<<<<< * cell_id = cell_list.pop() * if cell_id not in cur_processed: */ while (1) { __pyx_t_34 = (__pyx_v_cell_list != Py_None) && (PyList_GET_SIZE(__pyx_v_cell_list) != 0); if (!__pyx_t_34) break; /* "neuron/rxd/geometry3d/surfaces.pyx":327 * # CTNG:floodfill * while cell_list: * cell_id = cell_list.pop() # <<<<<<<<<<<<<< * if cell_id not in cur_processed: * cur_processed[cell_id] = 0 */ __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_cell_list); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_cell_id, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":328 * while cell_list: * cell_id = cell_list.pop() * if cell_id not in cur_processed: # <<<<<<<<<<<<<< * cur_processed[cell_id] = 0 * i, j, k = cell_id */ __pyx_t_34 = (__Pyx_PyDict_ContainsTF(__pyx_v_cell_id, __pyx_v_cur_processed, Py_NE)); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_34 != 0); if (__pyx_t_12) { /* "neuron/rxd/geometry3d/surfaces.pyx":329 * cell_id = cell_list.pop() * if cell_id not in cur_processed: * cur_processed[cell_id] = 0 # <<<<<<<<<<<<<< * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): */ if (unlikely(PyDict_SetItem(__pyx_v_cur_processed, __pyx_v_cell_id, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":330 * if cell_id not in cur_processed: * cur_processed[cell_id] = 0 * i, j, k = cell_id # <<<<<<<<<<<<<< * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * to_process[cell_id] = 0 */ if (likely(__pyx_v_cell_id != Py_None)) { PyObject* sequence = __pyx_v_cell_id; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_14); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_i = __pyx_t_21; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":331 * cur_processed[cell_id] = 0 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * to_process[cell_id] = 0 * append_with_deltas(cell_list, i, j, k) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_contains_surface); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_29 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_grid_dx); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_r_inner); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_r_outer); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_28 = __Pyx_PyBool_FromLong(__pyx_v_reject_if_outside); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_27 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_27)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_27); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_15 = 1; } } __pyx_t_17 = PyTuple_New(11+__pyx_t_15); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (__pyx_t_27) { __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_27); __pyx_t_27 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_15, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_15, __pyx_t_29); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_v_objdist); __Pyx_GIVEREF(__pyx_v_objdist); PyTuple_SET_ITEM(__pyx_t_17, 3+__pyx_t_15, __pyx_v_objdist); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_17, 4+__pyx_t_15, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_17, 5+__pyx_t_15, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_17, 6+__pyx_t_15, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_17, 7+__pyx_t_15, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_17, 8+__pyx_t_15, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_17, 9+__pyx_t_15, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_17, 10+__pyx_t_15, __pyx_t_28); __pyx_t_2 = 0; __pyx_t_29 = 0; __pyx_t_13 = 0; __pyx_t_31 = 0; __pyx_t_26 = 0; __pyx_t_24 = 0; __pyx_t_28 = 0; __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_17, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_12) { /* "neuron/rxd/geometry3d/surfaces.pyx":332 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * to_process[cell_id] = 0 # <<<<<<<<<<<<<< * append_with_deltas(cell_list, i, j, k) * */ if (unlikely(PyDict_SetItem(__pyx_v_to_process, __pyx_v_cell_id, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":333 * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * to_process[cell_id] = 0 * append_with_deltas(cell_list, i, j, k) # <<<<<<<<<<<<<< * * else: */ __pyx_t_14 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltas(__pyx_v_cell_list, __pyx_v_i, __pyx_v_j, __pyx_v_k); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":331 * cur_processed[cell_id] = 0 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * to_process[cell_id] = 0 * append_with_deltas(cell_list, i, j, k) */ } /* "neuron/rxd/geometry3d/surfaces.pyx":328 * while cell_list: * cell_id = cell_list.pop() * if cell_id not in cur_processed: # <<<<<<<<<<<<<< * cur_processed[cell_id] = 0 * i, j, k = cell_id */ } } /* "neuron/rxd/geometry3d/surfaces.pyx":324 * pass * * if not internal_membranes: # <<<<<<<<<<<<<< * # CTNG:floodfill * while cell_list: */ goto __pyx_L24; } /* "neuron/rxd/geometry3d/surfaces.pyx":337 * else: * # TODO: is this support ever really useful? * while cell_list: # <<<<<<<<<<<<<< * cell_id = cell_list.pop() * if cell_id not in cur_processed: */ /*else*/ { while (1) { __pyx_t_12 = (__pyx_v_cell_list != Py_None) && (PyList_GET_SIZE(__pyx_v_cell_list) != 0); if (!__pyx_t_12) break; /* "neuron/rxd/geometry3d/surfaces.pyx":338 * # TODO: is this support ever really useful? * while cell_list: * cell_id = cell_list.pop() # <<<<<<<<<<<<<< * if cell_id not in cur_processed: * cur_processed[cell_id] = 0 */ __pyx_t_14 = __Pyx_PyList_Pop(__pyx_v_cell_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (!(likely(PyTuple_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_14)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_cell_id, ((PyObject*)__pyx_t_14)); __pyx_t_14 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":339 * while cell_list: * cell_id = cell_list.pop() * if cell_id not in cur_processed: # <<<<<<<<<<<<<< * cur_processed[cell_id] = 0 * i, j, k = cell_id */ __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_cell_id, __pyx_v_cur_processed, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = (__pyx_t_12 != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":340 * cell_id = cell_list.pop() * if cell_id not in cur_processed: * cur_processed[cell_id] = 0 # <<<<<<<<<<<<<< * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): */ if (unlikely(PyDict_SetItem(__pyx_v_cur_processed, __pyx_v_cell_id, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":341 * if cell_id not in cur_processed: * cur_processed[cell_id] = 0 * i, j, k = cell_id # <<<<<<<<<<<<<< * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * if triangles_i > triangles.size - 50: */ if (likely(__pyx_v_cell_id != Py_None)) { PyObject* sequence = __pyx_v_cell_id; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_17); #else __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_17 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_v_i = __pyx_t_6; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":342 * cur_processed[cell_id] = 0 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * if triangles_i > triangles.size - 50: * triangles.resize(triangles.size * 2, refcheck=False) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_contains_surface); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_28 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_26 = PyFloat_FromDouble(__pyx_v_grid_dx); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_31 = PyFloat_FromDouble(__pyx_v_r_inner); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_13 = PyFloat_FromDouble(__pyx_v_r_outer); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = __Pyx_PyBool_FromLong(__pyx_v_reject_if_outside); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_2 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_15 = 1; } } __pyx_t_27 = PyTuple_New(11+__pyx_t_15); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_27, 0+__pyx_t_15, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_27, 1+__pyx_t_15, __pyx_t_28); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_27, 2+__pyx_t_15, __pyx_t_24); __Pyx_INCREF(__pyx_v_objdist); __Pyx_GIVEREF(__pyx_v_objdist); PyTuple_SET_ITEM(__pyx_t_27, 3+__pyx_t_15, __pyx_v_objdist); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_27, 4+__pyx_t_15, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_27, 5+__pyx_t_15, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_27, 6+__pyx_t_15, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_27, 7+__pyx_t_15, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_27, 8+__pyx_t_15, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_27, 9+__pyx_t_15, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_27, 10+__pyx_t_15, __pyx_t_29); __pyx_t_14 = 0; __pyx_t_28 = 0; __pyx_t_24 = 0; __pyx_t_26 = 0; __pyx_t_31 = 0; __pyx_t_13 = 0; __pyx_t_29 = 0; __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_27, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":343 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * if triangles_i > triangles.size - 50: # <<<<<<<<<<<<<< * triangles.resize(triangles.size * 2, refcheck=False) * triangles_i = process_cell(i, j, k, [objdist], xs, ys, zs, triangles, triangles_i, store_areas=store_areas, areas=areas) */ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_triangles_i); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangles), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_27 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_50, 50, 0); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_17, __pyx_t_27, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":344 * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * if triangles_i > triangles.size - 50: * triangles.resize(triangles.size * 2, refcheck=False) # <<<<<<<<<<<<<< * triangles_i = process_cell(i, j, k, [objdist], xs, ys, zs, triangles, triangles_i, store_areas=store_areas, areas=areas) * append_with_deltas(cell_list, i, j, k) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangles), __pyx_n_s_resize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_27 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangles), __pyx_n_s_size); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_17 = PyNumber_Multiply(__pyx_t_27, __pyx_int_2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_27 = PyTuple_New(1); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = PyDict_New(); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_refcheck, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_29 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_27, __pyx_t_17); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":343 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): * if triangles_i > triangles.size - 50: # <<<<<<<<<<<<<< * triangles.resize(triangles.size * 2, refcheck=False) * triangles_i = process_cell(i, j, k, [objdist], xs, ys, zs, triangles, triangles_i, store_areas=store_areas, areas=areas) */ } /* "neuron/rxd/geometry3d/surfaces.pyx":345 * if triangles_i > triangles.size - 50: * triangles.resize(triangles.size * 2, refcheck=False) * triangles_i = process_cell(i, j, k, [objdist], xs, ys, zs, triangles, triangles_i, store_areas=store_areas, areas=areas) # <<<<<<<<<<<<<< * append_with_deltas(cell_list, i, j, k) * */ __pyx_t_29 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_cell); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_27 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_objdist); __Pyx_GIVEREF(__pyx_v_objdist); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v_objdist); __pyx_t_31 = __Pyx_PyInt_From_int(__pyx_v_triangles_i); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_26 = PyTuple_New(9); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_t_27); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_26, 3, __pyx_t_13); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_26, 4, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_26, 5, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_26, 6, __pyx_v_zs); __Pyx_INCREF(((PyObject *)__pyx_v_triangles)); __Pyx_GIVEREF(((PyObject *)__pyx_v_triangles)); PyTuple_SET_ITEM(__pyx_t_26, 7, ((PyObject *)__pyx_v_triangles)); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_26, 8, __pyx_t_31); __pyx_t_17 = 0; __pyx_t_27 = 0; __pyx_t_1 = 0; __pyx_t_13 = 0; __pyx_t_31 = 0; __pyx_t_31 = PyDict_New(); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_13 = __Pyx_PyBool_FromLong(__pyx_v_store_areas); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_31, __pyx_n_s_store_areas, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (PyDict_SetItem(__pyx_t_31, __pyx_n_s_areas, __pyx_v_areas) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_29, __pyx_t_26, __pyx_t_31); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_triangles_i = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":346 * triangles.resize(triangles.size * 2, refcheck=False) * triangles_i = process_cell(i, j, k, [objdist], xs, ys, zs, triangles, triangles_i, store_areas=store_areas, areas=areas) * append_with_deltas(cell_list, i, j, k) # <<<<<<<<<<<<<< * * if internal_membranes: */ __pyx_t_13 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltas(__pyx_v_cell_list, __pyx_v_i, __pyx_v_j, __pyx_v_k); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":342 * cur_processed[cell_id] = 0 * i, j, k = cell_id * if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): # <<<<<<<<<<<<<< * if triangles_i > triangles.size - 50: * triangles.resize(triangles.size * 2, refcheck=False) */ } /* "neuron/rxd/geometry3d/surfaces.pyx":339 * while cell_list: * cell_id = cell_list.pop() * if cell_id not in cur_processed: # <<<<<<<<<<<<<< * cur_processed[cell_id] = 0 * i, j, k = cell_id */ } } } __pyx_L24:; /* "neuron/rxd/geometry3d/surfaces.pyx":296 * cdef int triangles_i = 0 * cdef bint reject_if_outside * for m, obj in enumerate(objects): # <<<<<<<<<<<<<< * # TODO: remove all the stuff about reject_if_outside when have true SkewCone distances * reject_if_outside = not(isinstance(obj, graphicsPrimitives.SkewCone)) */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":348 * append_with_deltas(cell_list, i, j, k) * * if internal_membranes: # <<<<<<<<<<<<<< * triangles.resize(triangles_i, refcheck=False) * return triangles */ __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_v_internal_membranes); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":349 * * if internal_membranes: * triangles.resize(triangles_i, refcheck=False) # <<<<<<<<<<<<<< * return triangles * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangles), __pyx_n_s_resize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_triangles_i); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_31 = PyTuple_New(1); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_refcheck, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_31, __pyx_t_13); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":350 * if internal_membranes: * triangles.resize(triangles_i, refcheck=False) * return triangles # <<<<<<<<<<<<<< * * cur_processed = None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_triangles)); __pyx_r = ((PyObject *)__pyx_v_triangles); goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":348 * append_with_deltas(cell_list, i, j, k) * * if internal_membranes: # <<<<<<<<<<<<<< * triangles.resize(triangles_i, refcheck=False) * return triangles */ } /* "neuron/rxd/geometry3d/surfaces.pyx":352 * return triangles * * cur_processed = None # <<<<<<<<<<<<<< * cdef list chunk_pts = [[[[] for k in range(nz)] for j in range(ny)] for i in range(nx)] * */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_cur_processed, ((PyObject*)Py_None)); /* "neuron/rxd/geometry3d/surfaces.pyx":353 * * cur_processed = None * cdef list chunk_pts = [[[[] for k in range(nz)] for j in range(ny)] for i in range(nx)] # <<<<<<<<<<<<<< * * */ __pyx_t_26 = PyList_New(0); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_21 = __pyx_v_nx; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_21; __pyx_t_20+=1) { __pyx_v_i = __pyx_t_20; __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = __pyx_v_ny; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_6; __pyx_t_35+=1) { __pyx_v_j = __pyx_t_35; __pyx_t_31 = PyList_New(0); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_36 = __pyx_v_nz; for (__pyx_t_37 = 0; __pyx_t_37 < __pyx_t_36; __pyx_t_37+=1) { __pyx_v_k = __pyx_t_37; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_31, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_13, (PyObject*)__pyx_t_31))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; } if (unlikely(__Pyx_ListComp_Append(__pyx_t_26, (PyObject*)__pyx_t_13))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __pyx_v_chunk_pts = ((PyObject*)__pyx_t_26); __pyx_t_26 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":359 * * # identify chunk_pts * for i, j, k in to_process.keys(): # <<<<<<<<<<<<<< * chunk_pts[i // chunk_size][j // chunk_size][k // chunk_size].append((i, j, k)) * */ __pyx_t_26 = __Pyx_PyDict_Keys(__pyx_v_to_process); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); if (likely(PyList_CheckExact(__pyx_t_26)) || PyTuple_CheckExact(__pyx_t_26)) { __pyx_t_13 = __pyx_t_26; __Pyx_INCREF(__pyx_t_13); __pyx_t_10 = 0; __pyx_t_16 = NULL; } else { __pyx_t_10 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_26); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_26 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_26); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_26 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_26 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_26); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_26 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); #endif } } else { __pyx_t_26 = __pyx_t_16(__pyx_t_13); if (unlikely(!__pyx_t_26)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_26); } if ((likely(PyTuple_CheckExact(__pyx_t_26))) || (PyList_CheckExact(__pyx_t_26))) { PyObject* sequence = __pyx_t_26; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_31 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_29 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_31 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_29 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_31); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_29); #else __pyx_t_31 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); #endif __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; } else { Py_ssize_t index = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_26); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_1)->tp_iternext; index = 0; __pyx_t_31 = __pyx_t_19(__pyx_t_1); if (unlikely(!__pyx_t_31)) goto __pyx_L43_unpacking_failed; __Pyx_GOTREF(__pyx_t_31); index = 1; __pyx_t_3 = __pyx_t_19(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L43_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_29 = __pyx_t_19(__pyx_t_1); if (unlikely(!__pyx_t_29)) goto __pyx_L43_unpacking_failed; __Pyx_GOTREF(__pyx_t_29); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_1), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L44_unpacking_done; __pyx_L43_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L44_unpacking_done:; } __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_31); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_29); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __pyx_v_i = __pyx_t_21; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":360 * # identify chunk_pts * for i, j, k in to_process.keys(): * chunk_pts[i // chunk_size][j // chunk_size][k // chunk_size].append((i, j, k)) # <<<<<<<<<<<<<< * * cdef int num_keys = len(to_process.keys()) */ if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_i))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_div_int(__pyx_v_i, __pyx_v_chunk_size); __pyx_t_26 = __Pyx_GetItemInt_List(__pyx_v_chunk_pts, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_j))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_div_int(__pyx_v_j, __pyx_v_chunk_size); __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_26, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_29 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_k))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_div_int(__pyx_v_k, __pyx_v_chunk_size); __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_29, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __pyx_t_29 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_31 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_29); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_31); __pyx_t_29 = 0; __pyx_t_3 = 0; __pyx_t_31 = 0; __pyx_t_32 = __Pyx_PyObject_Append(__pyx_t_26, __pyx_t_1); if (unlikely(__pyx_t_32 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":359 * * # identify chunk_pts * for i, j, k in to_process.keys(): # <<<<<<<<<<<<<< * chunk_pts[i // chunk_size][j // chunk_size][k // chunk_size].append((i, j, k)) * */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":362 * chunk_pts[i // chunk_size][j // chunk_size][k // chunk_size].append((i, j, k)) * * cdef int num_keys = len(to_process.keys()) # <<<<<<<<<<<<<< * cdef int missing_objs = 0 * */ __pyx_t_13 = __Pyx_PyDict_Keys(__pyx_v_to_process); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = PyObject_Length(__pyx_t_13); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_num_keys = __pyx_t_10; /* "neuron/rxd/geometry3d/surfaces.pyx":363 * * cdef int num_keys = len(to_process.keys()) * cdef int missing_objs = 0 # <<<<<<<<<<<<<< * * triangles = numpy.zeros(45 * num_keys) */ __pyx_v_missing_objs = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":365 * cdef int missing_objs = 0 * * triangles = numpy.zeros(45 * num_keys) # <<<<<<<<<<<<<< * cdef int starti = 0 * cdef int a, b, c */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_long((45 * __pyx_v_num_keys)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_31 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_26))) { __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_26); if (likely(__pyx_t_31)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26); __Pyx_INCREF(__pyx_t_31); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_26, function); } } if (!__pyx_t_31) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_13); } else { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_31); __pyx_t_31 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_26, __pyx_t_3, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7); } } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_triangles, ((PyArrayObject *)__pyx_t_13)); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":366 * * triangles = numpy.zeros(45 * num_keys) * cdef int starti = 0 # <<<<<<<<<<<<<< * cdef int a, b, c * cdef int extra_count */ __pyx_v_starti = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":371 * cdef list obj_search * # handle a chunk at a time * for a in range(nx): # <<<<<<<<<<<<<< * chunk_objsa = chunk_objs[a] * chunk_ptsa = chunk_pts[a] */ __pyx_t_6 = __pyx_v_nx; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_6; __pyx_t_20+=1) { __pyx_v_a = __pyx_t_20; /* "neuron/rxd/geometry3d/surfaces.pyx":372 * # handle a chunk at a time * for a in range(nx): * chunk_objsa = chunk_objs[a] # <<<<<<<<<<<<<< * chunk_ptsa = chunk_pts[a] * for b in range(ny): */ if (unlikely(__pyx_v_chunk_objs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_chunk_objs, __pyx_v_a, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_chunk_objsa, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":373 * for a in range(nx): * chunk_objsa = chunk_objs[a] * chunk_ptsa = chunk_pts[a] # <<<<<<<<<<<<<< * for b in range(ny): * for c in range(nz): */ __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_chunk_pts, __pyx_v_a, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_chunk_ptsa, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":374 * chunk_objsa = chunk_objs[a] * chunk_ptsa = chunk_pts[a] * for b in range(ny): # <<<<<<<<<<<<<< * for c in range(nz): * objs = chunk_objsa[b][c] */ __pyx_t_21 = __pyx_v_ny; for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_21; __pyx_t_35+=1) { __pyx_v_b = __pyx_t_35; /* "neuron/rxd/geometry3d/surfaces.pyx":375 * chunk_ptsa = chunk_pts[a] * for b in range(ny): * for c in range(nz): # <<<<<<<<<<<<<< * objs = chunk_objsa[b][c] * cells = chunk_ptsa[b][c] */ __pyx_t_36 = __pyx_v_nz; for (__pyx_t_37 = 0; __pyx_t_37 < __pyx_t_36; __pyx_t_37+=1) { __pyx_v_c = __pyx_t_37; /* "neuron/rxd/geometry3d/surfaces.pyx":376 * for b in range(ny): * for c in range(nz): * objs = chunk_objsa[b][c] # <<<<<<<<<<<<<< * cells = chunk_ptsa[b][c] * if cells and not objs: */ __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_chunk_objsa, __pyx_v_b, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_13, __pyx_v_c, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF_SET(__pyx_v_objs, __pyx_t_26); __pyx_t_26 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":377 * for c in range(nz): * objs = chunk_objsa[b][c] * cells = chunk_ptsa[b][c] # <<<<<<<<<<<<<< * if cells and not objs: * # we should never get here; this is just a sanity check */ __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_chunk_ptsa, __pyx_v_b, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_26, __pyx_v_c, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_XDECREF_SET(__pyx_v_cells, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":378 * objs = chunk_objsa[b][c] * cells = chunk_ptsa[b][c] * if cells and not objs: # <<<<<<<<<<<<<< * # we should never get here; this is just a sanity check * missing_objs += 1 */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_cells); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_12) { } else { __pyx_t_34 = __pyx_t_12; goto __pyx_L52_bool_binop_done; } __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_objs); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_38 = ((!__pyx_t_12) != 0); __pyx_t_34 = __pyx_t_38; __pyx_L52_bool_binop_done:; if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":380 * if cells and not objs: * # we should never get here; this is just a sanity check * missing_objs += 1 # <<<<<<<<<<<<<< * continue * for i, j, k in cells: */ __pyx_v_missing_objs = (__pyx_v_missing_objs + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":381 * # we should never get here; this is just a sanity check * missing_objs += 1 * continue # <<<<<<<<<<<<<< * for i, j, k in cells: * last_starti = starti */ goto __pyx_L49_continue; /* "neuron/rxd/geometry3d/surfaces.pyx":378 * objs = chunk_objsa[b][c] * cells = chunk_ptsa[b][c] * if cells and not objs: # <<<<<<<<<<<<<< * # we should never get here; this is just a sanity check * missing_objs += 1 */ } /* "neuron/rxd/geometry3d/surfaces.pyx":382 * missing_objs += 1 * continue * for i, j, k in cells: # <<<<<<<<<<<<<< * last_starti = starti * #starti = process_cell(i, j, k, objects_distances, xs, ys, zs, triangles, last_starti) #was objs */ if (likely(PyList_CheckExact(__pyx_v_cells)) || PyTuple_CheckExact(__pyx_v_cells)) { __pyx_t_13 = __pyx_v_cells; __Pyx_INCREF(__pyx_t_13); __pyx_t_10 = 0; __pyx_t_16 = NULL; } else { __pyx_t_10 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_cells); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_26 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_26); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_26 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_26 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_26); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_26 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); #endif } } else { __pyx_t_26 = __pyx_t_16(__pyx_t_13); if (unlikely(!__pyx_t_26)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_26); } if ((likely(PyTuple_CheckExact(__pyx_t_26))) || (PyList_CheckExact(__pyx_t_26))) { PyObject* sequence = __pyx_t_26; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_31 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); __pyx_t_31 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_31); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_31 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); #endif __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; } else { Py_ssize_t index = -1; __pyx_t_29 = PyObject_GetIter(__pyx_t_26); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_29)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_19(__pyx_t_29); if (unlikely(!__pyx_t_3)) goto __pyx_L56_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_19(__pyx_t_29); if (unlikely(!__pyx_t_1)) goto __pyx_L56_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 2; __pyx_t_31 = __pyx_t_19(__pyx_t_29); if (unlikely(!__pyx_t_31)) goto __pyx_L56_unpacking_failed; __Pyx_GOTREF(__pyx_t_31); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_29), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; goto __pyx_L57_unpacking_done; __pyx_L56_unpacking_failed:; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L57_unpacking_done:; } __pyx_t_39 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_39 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_40 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_40 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_41 = __Pyx_PyInt_As_int(__pyx_t_31); if (unlikely((__pyx_t_41 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __pyx_v_i = __pyx_t_39; __pyx_v_j = __pyx_t_40; __pyx_v_k = __pyx_t_41; /* "neuron/rxd/geometry3d/surfaces.pyx":383 * continue * for i, j, k in cells: * last_starti = starti # <<<<<<<<<<<<<< * #starti = process_cell(i, j, k, objects_distances, xs, ys, zs, triangles, last_starti) #was objs * #tri_data = list(triangles[last_starti : starti]) */ __pyx_v_last_starti = __pyx_v_starti; /* "neuron/rxd/geometry3d/surfaces.pyx":386 * #starti = process_cell(i, j, k, objects_distances, xs, ys, zs, triangles, last_starti) #was objs * #tri_data = list(triangles[last_starti : starti]) * start_i = process_cell(i, j, k, objs, xs, ys, zs, triangles, last_starti, store_areas=store_areas, areas=areas) # <<<<<<<<<<<<<< * ''' * # this an the two-above commented-out lines are for debugging to detect discrepancies between the */ __pyx_t_26 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_cell); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_31 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = __Pyx_PyInt_From_int(__pyx_v_last_starti); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_27 = PyTuple_New(9); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_27, 2, __pyx_t_3); __Pyx_INCREF(__pyx_v_objs); __Pyx_GIVEREF(__pyx_v_objs); PyTuple_SET_ITEM(__pyx_t_27, 3, __pyx_v_objs); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_27, 4, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_27, 5, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_27, 6, __pyx_v_zs); __Pyx_INCREF(((PyObject *)__pyx_v_triangles)); __Pyx_GIVEREF(((PyObject *)__pyx_v_triangles)); PyTuple_SET_ITEM(__pyx_t_27, 7, ((PyObject *)__pyx_v_triangles)); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_27, 8, __pyx_t_29); __pyx_t_31 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_29 = 0; __pyx_t_29 = PyDict_New(); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_store_areas); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_29, __pyx_n_s_store_areas, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_29, __pyx_n_s_areas, __pyx_v_areas) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_26, __pyx_t_27, __pyx_t_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_XDECREF_SET(__pyx_v_start_i, __pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":382 * missing_objs += 1 * continue * for i, j, k in cells: # <<<<<<<<<<<<<< * last_starti = starti * #starti = process_cell(i, j, k, objects_distances, xs, ys, zs, triangles, last_starti) #was objs */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_L49_continue:; } } } /* "neuron/rxd/geometry3d/surfaces.pyx":412 * * * last_starti = 0 # <<<<<<<<<<<<<< * cdef dict process2 * pt_neighbor_map = {} */ __pyx_v_last_starti = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":414 * last_starti = 0 * cdef dict process2 * pt_neighbor_map = {} # <<<<<<<<<<<<<< * cdef dict count * cdef int old_start_i */ __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_v_pt_neighbor_map = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":419 * cdef list still_to_process, local_objs * # append to the pt_neighbor_map * process2 = {} # <<<<<<<<<<<<<< * count = {} * */ __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_v_process2 = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":420 * # append to the pt_neighbor_map * process2 = {} * count = {} # <<<<<<<<<<<<<< * * for i in xrange(last_starti, starti, 9): */ __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_v_count = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":422 * count = {} * * for i in xrange(last_starti, starti, 9): # <<<<<<<<<<<<<< * pts = {} * for j in xrange(3): */ __pyx_t_6 = __pyx_v_starti; for (__pyx_t_20 = __pyx_v_last_starti; __pyx_t_20 < __pyx_t_6; __pyx_t_20+=9) { __pyx_v_i = __pyx_t_20; /* "neuron/rxd/geometry3d/surfaces.pyx":423 * * for i in xrange(last_starti, starti, 9): * pts = {} # <<<<<<<<<<<<<< * for j in xrange(3): * pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 */ __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_XDECREF_SET(__pyx_v_pts, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":424 * for i in xrange(last_starti, starti, 9): * pts = {} * for j in xrange(3): # <<<<<<<<<<<<<< * pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 * pts = list(pts.keys()) */ for (__pyx_t_21 = 0; __pyx_t_21 < 3; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":425 * pts = {} * for j in xrange(3): * pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 # <<<<<<<<<<<<<< * pts = list(pts.keys()) * if len(pts) == 3: */ __pyx_t_13 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_triangles), (__pyx_v_i + (3 * __pyx_v_j)), ((__pyx_v_i + (3 * __pyx_v_j)) + 3), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = PySequence_Tuple(__pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(PyObject_SetItem(__pyx_v_pts, __pyx_t_3, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "neuron/rxd/geometry3d/surfaces.pyx":426 * for j in xrange(3): * pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 * pts = list(pts.keys()) # <<<<<<<<<<<<<< * if len(pts) == 3: * # only consider triangles of nonzero area */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pts, __pyx_n_s_keys); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_29)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_29); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_29) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_29); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_pts, __pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":427 * pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 * pts = list(pts.keys()) * if len(pts) == 3: # <<<<<<<<<<<<<< * # only consider triangles of nonzero area * for j in xrange(3): */ __pyx_t_10 = PyObject_Length(__pyx_v_pts); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = ((__pyx_t_10 == 3) != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":429 * if len(pts) == 3: * # only consider triangles of nonzero area * for j in xrange(3): # <<<<<<<<<<<<<< * for k in xrange(3): * if j != k: */ for (__pyx_t_21 = 0; __pyx_t_21 < 3; __pyx_t_21+=1) { __pyx_v_j = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":430 * # only consider triangles of nonzero area * for j in xrange(3): * for k in xrange(3): # <<<<<<<<<<<<<< * if j != k: * _register_on_neighbor_map(pt_neighbor_map, pts[j], pts[k]) */ for (__pyx_t_35 = 0; __pyx_t_35 < 3; __pyx_t_35+=1) { __pyx_v_k = __pyx_t_35; /* "neuron/rxd/geometry3d/surfaces.pyx":431 * for j in xrange(3): * for k in xrange(3): * if j != k: # <<<<<<<<<<<<<< * _register_on_neighbor_map(pt_neighbor_map, pts[j], pts[k]) * */ __pyx_t_34 = ((__pyx_v_j != __pyx_v_k) != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":432 * for k in xrange(3): * if j != k: * _register_on_neighbor_map(pt_neighbor_map, pts[j], pts[k]) # <<<<<<<<<<<<<< * * last_starti = starti */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_register_on_neighbor_map); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_29 = __Pyx_GetItemInt(__pyx_v_pts, __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_29 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_29); __pyx_t_27 = __Pyx_GetItemInt(__pyx_v_pts, __pyx_v_k, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_27 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_27); __pyx_t_26 = NULL; __pyx_t_10 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_10 = 1; } } __pyx_t_1 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_26) { __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_26); __pyx_t_26 = NULL; } __Pyx_INCREF(__pyx_v_pt_neighbor_map); __Pyx_GIVEREF(__pyx_v_pt_neighbor_map); PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_10, __pyx_v_pt_neighbor_map); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_10, __pyx_t_29); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_10, __pyx_t_27); __pyx_t_29 = 0; __pyx_t_27 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":431 * for j in xrange(3): * for k in xrange(3): * if j != k: # <<<<<<<<<<<<<< * _register_on_neighbor_map(pt_neighbor_map, pts[j], pts[k]) * */ } } } /* "neuron/rxd/geometry3d/surfaces.pyx":427 * pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 * pts = list(pts.keys()) * if len(pts) == 3: # <<<<<<<<<<<<<< * # only consider triangles of nonzero area * for j in xrange(3): */ } } /* "neuron/rxd/geometry3d/surfaces.pyx":434 * _register_on_neighbor_map(pt_neighbor_map, pts[j], pts[k]) * * last_starti = starti # <<<<<<<<<<<<<< * xlo, ylo, zlo = xs[0], ys[0], zs[0] * */ __pyx_v_last_starti = __pyx_v_starti; /* "neuron/rxd/geometry3d/surfaces.pyx":435 * * last_starti = starti * xlo, ylo, zlo = xs[0], ys[0], zs[0] # <<<<<<<<<<<<<< * * # if no holes, each point should have each neighbor listed more than once */ __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_xs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_ys, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_zs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_v_xlo = __pyx_t_13; __pyx_t_13 = 0; __pyx_v_ylo = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_zlo = __pyx_t_1; __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":438 * * # if no holes, each point should have each neighbor listed more than once * for pt, neighbor_list in zip(pt_neighbor_map.keys(), pt_neighbor_map.values()): # <<<<<<<<<<<<<< * count = {} * for neighbor in neighbor_list: */ __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_pt_neighbor_map); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyDict_Values(__pyx_v_pt_neighbor_map); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_13 = __pyx_t_3; __Pyx_INCREF(__pyx_t_13); __pyx_t_10 = 0; __pyx_t_16 = NULL; } else { __pyx_t_10 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_16(__pyx_t_13); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_27 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_27 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_27); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_27 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_29 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_29)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_19(__pyx_t_29); if (unlikely(!__pyx_t_1)) goto __pyx_L70_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_27 = __pyx_t_19(__pyx_t_29); if (unlikely(!__pyx_t_27)) goto __pyx_L70_unpacking_failed; __Pyx_GOTREF(__pyx_t_27); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_29), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; goto __pyx_L71_unpacking_done; __pyx_L70_unpacking_failed:; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L71_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_pt, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_neighbor_list, __pyx_t_27); __pyx_t_27 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":439 * # if no holes, each point should have each neighbor listed more than once * for pt, neighbor_list in zip(pt_neighbor_map.keys(), pt_neighbor_map.values()): * count = {} # <<<<<<<<<<<<<< * for neighbor in neighbor_list: * if neighbor not in count: */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_count, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":440 * for pt, neighbor_list in zip(pt_neighbor_map.keys(), pt_neighbor_map.values()): * count = {} * for neighbor in neighbor_list: # <<<<<<<<<<<<<< * if neighbor not in count: * count[neighbor] = 1 */ if (likely(PyList_CheckExact(__pyx_v_neighbor_list)) || PyTuple_CheckExact(__pyx_v_neighbor_list)) { __pyx_t_3 = __pyx_v_neighbor_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0; __pyx_t_25 = NULL; } else { __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_neighbor_list); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_25 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_25)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_27 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_27); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_27 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_27 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_27); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_27 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); #endif } } else { __pyx_t_27 = __pyx_t_25(__pyx_t_3); if (unlikely(!__pyx_t_27)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_27); } __Pyx_XDECREF_SET(__pyx_v_neighbor, __pyx_t_27); __pyx_t_27 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":441 * count = {} * for neighbor in neighbor_list: * if neighbor not in count: # <<<<<<<<<<<<<< * count[neighbor] = 1 * else: */ __pyx_t_34 = (__Pyx_PyDict_ContainsTF(__pyx_v_neighbor, __pyx_v_count, Py_NE)); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_38 = (__pyx_t_34 != 0); if (__pyx_t_38) { /* "neuron/rxd/geometry3d/surfaces.pyx":442 * for neighbor in neighbor_list: * if neighbor not in count: * count[neighbor] = 1 # <<<<<<<<<<<<<< * else: * count[neighbor] += 1 */ if (unlikely(PyDict_SetItem(__pyx_v_count, __pyx_v_neighbor, __pyx_int_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":441 * count = {} * for neighbor in neighbor_list: * if neighbor not in count: # <<<<<<<<<<<<<< * count[neighbor] = 1 * else: */ goto __pyx_L74; } /* "neuron/rxd/geometry3d/surfaces.pyx":444 * count[neighbor] = 1 * else: * count[neighbor] += 1 # <<<<<<<<<<<<<< * for neighbor, ncount in zip(count.keys(), count.values()): * if ncount <= 1: */ /*else*/ { __Pyx_INCREF(__pyx_v_neighbor); __pyx_t_27 = __pyx_v_neighbor; __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_count, __pyx_t_27); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_29 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(PyDict_SetItem(__pyx_v_count, __pyx_t_27, __pyx_t_29) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; } __pyx_L74:; /* "neuron/rxd/geometry3d/surfaces.pyx":440 * for pt, neighbor_list in zip(pt_neighbor_map.keys(), pt_neighbor_map.values()): * count = {} * for neighbor in neighbor_list: # <<<<<<<<<<<<<< * if neighbor not in count: * count[neighbor] = 1 */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":445 * else: * count[neighbor] += 1 * for neighbor, ncount in zip(count.keys(), count.values()): # <<<<<<<<<<<<<< * if ncount <= 1: * # Note: this assumes (as we stated above) that dx = dy = dz */ __pyx_t_3 = __Pyx_PyDict_Keys(__pyx_v_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_27 = __Pyx_PyDict_Values(__pyx_v_count); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_29 = PyTuple_New(2); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_29, 1, __pyx_t_27); __pyx_t_3 = 0; __pyx_t_27 = 0; __pyx_t_27 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_29, NULL); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; if (likely(PyList_CheckExact(__pyx_t_27)) || PyTuple_CheckExact(__pyx_t_27)) { __pyx_t_29 = __pyx_t_27; __Pyx_INCREF(__pyx_t_29); __pyx_t_11 = 0; __pyx_t_25 = NULL; } else { __pyx_t_11 = -1; __pyx_t_29 = PyObject_GetIter(__pyx_t_27); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_25 = Py_TYPE(__pyx_t_29)->tp_iternext; if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; for (;;) { if (likely(!__pyx_t_25)) { if (likely(PyList_CheckExact(__pyx_t_29))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_29)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_27 = PyList_GET_ITEM(__pyx_t_29, __pyx_t_11); __Pyx_INCREF(__pyx_t_27); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_27 = PySequence_ITEM(__pyx_t_29, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_29)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_27 = PyTuple_GET_ITEM(__pyx_t_29, __pyx_t_11); __Pyx_INCREF(__pyx_t_27); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_27 = PySequence_ITEM(__pyx_t_29, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); #endif } } else { __pyx_t_27 = __pyx_t_25(__pyx_t_29); if (unlikely(!__pyx_t_27)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_27); } if ((likely(PyTuple_CheckExact(__pyx_t_27))) || (PyList_CheckExact(__pyx_t_27))) { PyObject* sequence = __pyx_t_27; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; } else { Py_ssize_t index = -1; __pyx_t_26 = PyObject_GetIter(__pyx_t_27); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_26)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_19(__pyx_t_26); if (unlikely(!__pyx_t_3)) goto __pyx_L77_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_19(__pyx_t_26); if (unlikely(!__pyx_t_1)) goto __pyx_L77_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_26), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; goto __pyx_L78_unpacking_done; __pyx_L77_unpacking_failed:; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L78_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_neighbor, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_ncount, __pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":446 * count[neighbor] += 1 * for neighbor, ncount in zip(count.keys(), count.values()): * if ncount <= 1: # <<<<<<<<<<<<<< * # Note: this assumes (as we stated above) that dx = dy = dz * for point in (pt, neighbor): */ __pyx_t_27 = PyObject_RichCompare(__pyx_v_ncount, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_27); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_38 = __Pyx_PyObject_IsTrue(__pyx_t_27); if (unlikely(__pyx_t_38 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (__pyx_t_38) { /* "neuron/rxd/geometry3d/surfaces.pyx":448 * if ncount <= 1: * # Note: this assumes (as we stated above) that dx = dy = dz * for point in (pt, neighbor): # <<<<<<<<<<<<<< * i, j, k = (point[0] - xlo) // dx, (point[1] - ylo) // dx, (point[2] - zlo) // dx * for di in range(-1, 2): */ __pyx_t_27 = PyTuple_New(2); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_INCREF(__pyx_v_pt); __Pyx_GIVEREF(__pyx_v_pt); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_v_pt); __Pyx_INCREF(__pyx_v_neighbor); __Pyx_GIVEREF(__pyx_v_neighbor); PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_v_neighbor); __pyx_t_1 = __pyx_t_27; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; for (;;) { if (__pyx_t_15 >= 2) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_27 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_27); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_27 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); #endif __Pyx_XDECREF_SET(__pyx_v_point, __pyx_t_27); __pyx_t_27 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":449 * # Note: this assumes (as we stated above) that dx = dy = dz * for point in (pt, neighbor): * i, j, k = (point[0] - xlo) // dx, (point[1] - ylo) // dx, (point[2] - zlo) // dx # <<<<<<<<<<<<<< * for di in range(-1, 2): * for dj in range(-1, 2): */ __pyx_t_27 = __Pyx_GetItemInt(__pyx_v_point, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_27 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_27); __pyx_t_3 = PyNumber_Subtract(__pyx_t_27, __pyx_v_xlo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_27 = PyFloat_FromDouble(__pyx_v_dx); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_26 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_27); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_26); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_point, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_26 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_26); __pyx_t_27 = PyNumber_Subtract(__pyx_t_26, __pyx_v_ylo); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = PyFloat_FromDouble(__pyx_v_dx); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_27, __pyx_t_26); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_point, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_26 = PyNumber_Subtract(__pyx_t_3, __pyx_v_zlo); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyFloat_FromDouble(__pyx_v_dx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_27 = PyNumber_FloorDivide(__pyx_t_26, __pyx_t_3); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_27); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_v_i = __pyx_t_6; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":450 * for point in (pt, neighbor): * i, j, k = (point[0] - xlo) // dx, (point[1] - ylo) // dx, (point[2] - zlo) // dx * for di in range(-1, 2): # <<<<<<<<<<<<<< * for dj in range(-1, 2): * for dk in range(-1, 2): */ for (__pyx_t_21 = -1L; __pyx_t_21 < 2; __pyx_t_21+=1) { __pyx_v_di = __pyx_t_21; /* "neuron/rxd/geometry3d/surfaces.pyx":451 * i, j, k = (point[0] - xlo) // dx, (point[1] - ylo) // dx, (point[2] - zlo) // dx * for di in range(-1, 2): * for dj in range(-1, 2): # <<<<<<<<<<<<<< * for dk in range(-1, 2): * cell_id = (i + di, j + dj, k + dk) */ for (__pyx_t_20 = -1L; __pyx_t_20 < 2; __pyx_t_20+=1) { __pyx_v_dj = __pyx_t_20; /* "neuron/rxd/geometry3d/surfaces.pyx":452 * for di in range(-1, 2): * for dj in range(-1, 2): * for dk in range(-1, 2): # <<<<<<<<<<<<<< * cell_id = (i + di, j + dj, k + dk) * if cell_id not in process2 and cell_id not in to_process: */ for (__pyx_t_6 = -1L; __pyx_t_6 < 2; __pyx_t_6+=1) { __pyx_v_dk = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":453 * for dj in range(-1, 2): * for dk in range(-1, 2): * cell_id = (i + di, j + dj, k + dk) # <<<<<<<<<<<<<< * if cell_id not in process2 and cell_id not in to_process: * process2[cell_id] = 0 */ __pyx_t_27 = __Pyx_PyInt_From_int((__pyx_v_i + __pyx_v_di)); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_j + __pyx_v_dj)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_26 = __Pyx_PyInt_From_int((__pyx_v_k + __pyx_v_dk)); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_31 = PyTuple_New(3); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_27); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_31, 2, __pyx_t_26); __pyx_t_27 = 0; __pyx_t_3 = 0; __pyx_t_26 = 0; __Pyx_XDECREF_SET(__pyx_v_cell_id, ((PyObject*)__pyx_t_31)); __pyx_t_31 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":454 * for dk in range(-1, 2): * cell_id = (i + di, j + dj, k + dk) * if cell_id not in process2 and cell_id not in to_process: # <<<<<<<<<<<<<< * process2[cell_id] = 0 * break */ __pyx_t_34 = (__Pyx_PyDict_ContainsTF(__pyx_v_cell_id, __pyx_v_process2, Py_NE)); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = (__pyx_t_34 != 0); if (__pyx_t_12) { } else { __pyx_t_38 = __pyx_t_12; goto __pyx_L89_bool_binop_done; } __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_cell_id, __pyx_v_to_process, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = (__pyx_t_12 != 0); __pyx_t_38 = __pyx_t_34; __pyx_L89_bool_binop_done:; if (__pyx_t_38) { /* "neuron/rxd/geometry3d/surfaces.pyx":455 * cell_id = (i + di, j + dj, k + dk) * if cell_id not in process2 and cell_id not in to_process: * process2[cell_id] = 0 # <<<<<<<<<<<<<< * break * */ if (unlikely(PyDict_SetItem(__pyx_v_process2, __pyx_v_cell_id, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":454 * for dk in range(-1, 2): * cell_id = (i + di, j + dj, k + dk) * if cell_id not in process2 and cell_id not in to_process: # <<<<<<<<<<<<<< * process2[cell_id] = 0 * break */ } } } } /* "neuron/rxd/geometry3d/surfaces.pyx":448 * if ncount <= 1: * # Note: this assumes (as we stated above) that dx = dy = dz * for point in (pt, neighbor): # <<<<<<<<<<<<<< * i, j, k = (point[0] - xlo) // dx, (point[1] - ylo) // dx, (point[2] - zlo) // dx * for di in range(-1, 2): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":456 * if cell_id not in process2 and cell_id not in to_process: * process2[cell_id] = 0 * break # <<<<<<<<<<<<<< * * still_to_process = process2.keys() */ goto __pyx_L76_break; /* "neuron/rxd/geometry3d/surfaces.pyx":446 * count[neighbor] += 1 * for neighbor, ncount in zip(count.keys(), count.values()): * if ncount <= 1: # <<<<<<<<<<<<<< * # Note: this assumes (as we stated above) that dx = dy = dz * for point in (pt, neighbor): */ } /* "neuron/rxd/geometry3d/surfaces.pyx":445 * else: * count[neighbor] += 1 * for neighbor, ncount in zip(count.keys(), count.values()): # <<<<<<<<<<<<<< * if ncount <= 1: * # Note: this assumes (as we stated above) that dx = dy = dz */ } __pyx_L76_break:; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":438 * * # if no holes, each point should have each neighbor listed more than once * for pt, neighbor_list in zip(pt_neighbor_map.keys(), pt_neighbor_map.values()): # <<<<<<<<<<<<<< * count = {} * for neighbor in neighbor_list: */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":458 * break * * still_to_process = process2.keys() # <<<<<<<<<<<<<< * #print 'len(still_to_process) = %d' % len(still_to_process) * # flood on those still_to_process */ __pyx_t_13 = __Pyx_PyDict_Keys(__pyx_v_process2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (!(likely(PyList_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_13)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_still_to_process = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":461 * #print 'len(still_to_process) = %d' % len(still_to_process) * # flood on those still_to_process * while still_to_process: # <<<<<<<<<<<<<< * cell_id = still_to_process.pop() * # make sure we haven't already handled this voxel */ while (1) { __pyx_t_38 = (__pyx_v_still_to_process != Py_None) && (PyList_GET_SIZE(__pyx_v_still_to_process) != 0); if (!__pyx_t_38) break; /* "neuron/rxd/geometry3d/surfaces.pyx":462 * # flood on those still_to_process * while still_to_process: * cell_id = still_to_process.pop() # <<<<<<<<<<<<<< * # make sure we haven't already handled this voxel * if cell_id not in to_process: */ if (unlikely(__pyx_v_still_to_process == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "pop"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_13 = __Pyx_PyList_Pop(__pyx_v_still_to_process); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (!(likely(PyTuple_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_13)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_cell_id, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":464 * cell_id = still_to_process.pop() * # make sure we haven't already handled this voxel * if cell_id not in to_process: # <<<<<<<<<<<<<< * i, j, k = cell_id * old_start_i = starti */ __pyx_t_38 = (__Pyx_PyDict_ContainsTF(__pyx_v_cell_id, __pyx_v_to_process, Py_NE)); if (unlikely(__pyx_t_38 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_34 = (__pyx_t_38 != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":465 * # make sure we haven't already handled this voxel * if cell_id not in to_process: * i, j, k = cell_id # <<<<<<<<<<<<<< * old_start_i = starti * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] */ if (likely(__pyx_v_cell_id != Py_None)) { PyObject* sequence = __pyx_v_cell_id; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_29 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_29); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_29); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_i = __pyx_t_21; __pyx_v_j = __pyx_t_20; __pyx_v_k = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":466 * if cell_id not in to_process: * i, j, k = cell_id * old_start_i = starti # <<<<<<<<<<<<<< * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] * if local_objs: */ __pyx_v_old_start_i = __pyx_v_starti; /* "neuron/rxd/geometry3d/surfaces.pyx":467 * i, j, k = cell_id * old_start_i = starti * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] # <<<<<<<<<<<<<< * if local_objs: * for m, objdist in enumerate(local_objs): */ if (unlikely(__pyx_v_chunk_objs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_i))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_div_int(__pyx_v_i, __pyx_v_chunk_size); __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chunk_objs, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_j))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_div_int(__pyx_v_j, __pyx_v_chunk_size); __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_29 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_chunk_size == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_chunk_size == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_k))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_6 = __Pyx_div_int(__pyx_v_k, __pyx_v_chunk_size); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_29, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_local_objs, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":468 * old_start_i = starti * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] * if local_objs: # <<<<<<<<<<<<<< * for m, objdist in enumerate(local_objs): * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): */ __pyx_t_34 = (__pyx_v_local_objs != Py_None) && (PyList_GET_SIZE(__pyx_v_local_objs) != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":469 * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] * if local_objs: * for m, objdist in enumerate(local_objs): # <<<<<<<<<<<<<< * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) */ __pyx_t_10 = 0; __pyx_t_1 = __pyx_v_local_objs; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_29 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_29); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_29 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); #endif __Pyx_XDECREF_SET(__pyx_v_objdist, __pyx_t_29); __pyx_t_29 = 0; __pyx_v_m = __pyx_t_10; __pyx_t_10 = (__pyx_t_10 + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":470 * if local_objs: * for m, objdist in enumerate(local_objs): * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): # <<<<<<<<<<<<<< * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) * for n, obj in enumerate(objects): */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_contains_surface); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_31 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_27 = PyFloat_FromDouble(__pyx_v_dx); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); __pyx_t_17 = PyFloat_FromDouble(__pyx_v_r_inner); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_24 = PyFloat_FromDouble(__pyx_v_r_outer); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_28 = NULL; __pyx_t_15 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_28)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_28); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_15 = 1; } } __pyx_t_14 = PyTuple_New(11+__pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_28) { __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_28); __pyx_t_28 = NULL; } __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_15, __pyx_t_31); __Pyx_GIVEREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_15, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_15, __pyx_t_3); __Pyx_INCREF(__pyx_v_objdist); __Pyx_GIVEREF(__pyx_v_objdist); PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_15, __pyx_v_objdist); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_14, 4+__pyx_t_15, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_14, 5+__pyx_t_15, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_14, 6+__pyx_t_15, __pyx_v_zs); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_14, 7+__pyx_t_15, __pyx_t_27); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_14, 8+__pyx_t_15, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_14, 9+__pyx_t_15, __pyx_t_24); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_14, 10+__pyx_t_15, Py_False); __pyx_t_31 = 0; __pyx_t_26 = 0; __pyx_t_3 = 0; __pyx_t_27 = 0; __pyx_t_17 = 0; __pyx_t_24 = 0; __pyx_t_29 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_29); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":471 * for m, objdist in enumerate(local_objs): * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) # <<<<<<<<<<<<<< * for n, obj in enumerate(objects): * if obj.distance == objdist: */ __pyx_t_29 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_17 = PyTuple_New(4); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_29); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_24); __pyx_t_29 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_24 = 0; __pyx_t_24 = __Pyx_PyString_Format(__pyx_kp_s_item_d_in_grid_d_d_d_contains_pr, __pyx_t_17); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__Pyx_PrintOne(0, __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":472 * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) * for n, obj in enumerate(objects): # <<<<<<<<<<<<<< * if obj.distance == objdist: * print ' (i.e. global item %d: %r)' % (n, obj) */ __pyx_t_15 = 0; __pyx_t_24 = __pyx_v_objects; __Pyx_INCREF(__pyx_t_24); __pyx_t_33 = 0; for (;;) { if (__pyx_t_33 >= PyList_GET_SIZE(__pyx_t_24)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_17 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_33); __Pyx_INCREF(__pyx_t_17); __pyx_t_33++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_17 = PySequence_ITEM(__pyx_t_24, __pyx_t_33); __pyx_t_33++; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_17); __pyx_t_17 = 0; __pyx_v_n = __pyx_t_15; __pyx_t_15 = (__pyx_t_15 + 1); /* "neuron/rxd/geometry3d/surfaces.pyx":473 * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) * for n, obj in enumerate(objects): * if obj.distance == objdist: # <<<<<<<<<<<<<< * print ' (i.e. global item %d: %r)' % (n, obj) * break */ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_distance); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_14 = PyObject_RichCompare(__pyx_t_17, __pyx_v_objdist, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":474 * for n, obj in enumerate(objects): * if obj.distance == objdist: * print ' (i.e. global item %d: %r)' % (n, obj) # <<<<<<<<<<<<<< * break * #starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti) # was objects_distances */ __pyx_t_14 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_14); __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_v_obj); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_i_e_global_item_d_r, __pyx_t_17); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__Pyx_PrintOne(0, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":475 * if obj.distance == objdist: * print ' (i.e. global item %d: %r)' % (n, obj) * break # <<<<<<<<<<<<<< * #starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti) # was objects_distances * starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti, store_areas=store_areas, areas=areas) */ goto __pyx_L99_break; /* "neuron/rxd/geometry3d/surfaces.pyx":473 * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) * for n, obj in enumerate(objects): * if obj.distance == objdist: # <<<<<<<<<<<<<< * print ' (i.e. global item %d: %r)' % (n, obj) * break */ } /* "neuron/rxd/geometry3d/surfaces.pyx":472 * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) * for n, obj in enumerate(objects): # <<<<<<<<<<<<<< * if obj.distance == objdist: * print ' (i.e. global item %d: %r)' % (n, obj) */ } __pyx_L99_break:; __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":470 * if local_objs: * for m, objdist in enumerate(local_objs): * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): # <<<<<<<<<<<<<< * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) * for n, obj in enumerate(objects): */ } /* "neuron/rxd/geometry3d/surfaces.pyx":469 * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] * if local_objs: * for m, objdist in enumerate(local_objs): # <<<<<<<<<<<<<< * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): * print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":477 * break * #starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti) # was objects_distances * starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti, store_areas=store_areas, areas=areas) # <<<<<<<<<<<<<< * * # mark it off so we know we don't visit that grid point again */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_cell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_starti); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = PyTuple_New(9); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_24); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_29, 1, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_29, 2, __pyx_t_17); __Pyx_INCREF(__pyx_v_local_objs); __Pyx_GIVEREF(__pyx_v_local_objs); PyTuple_SET_ITEM(__pyx_t_29, 3, __pyx_v_local_objs); __Pyx_INCREF(__pyx_v_xs); __Pyx_GIVEREF(__pyx_v_xs); PyTuple_SET_ITEM(__pyx_t_29, 4, __pyx_v_xs); __Pyx_INCREF(__pyx_v_ys); __Pyx_GIVEREF(__pyx_v_ys); PyTuple_SET_ITEM(__pyx_t_29, 5, __pyx_v_ys); __Pyx_INCREF(__pyx_v_zs); __Pyx_GIVEREF(__pyx_v_zs); PyTuple_SET_ITEM(__pyx_t_29, 6, __pyx_v_zs); __Pyx_INCREF(((PyObject *)__pyx_v_triangles)); __Pyx_GIVEREF(((PyObject *)__pyx_v_triangles)); PyTuple_SET_ITEM(__pyx_t_29, 7, ((PyObject *)__pyx_v_triangles)); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_29, 8, __pyx_t_13); __pyx_t_24 = 0; __pyx_t_14 = 0; __pyx_t_17 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_17 = __Pyx_PyBool_FromLong(__pyx_v_store_areas); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_store_areas, __pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_areas, __pyx_v_areas) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_29, __pyx_t_13); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_v_starti = __pyx_t_6; /* "neuron/rxd/geometry3d/surfaces.pyx":468 * old_start_i = starti * local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] * if local_objs: # <<<<<<<<<<<<<< * for m, objdist in enumerate(local_objs): * if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): */ } /* "neuron/rxd/geometry3d/surfaces.pyx":480 * * # mark it off so we know we don't visit that grid point again * to_process[cell_id] = 0 # <<<<<<<<<<<<<< * if old_start_i != starti: * append_with_deltas(still_to_process, i, j, k) */ if (unlikely(PyDict_SetItem(__pyx_v_to_process, __pyx_v_cell_id, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":481 * # mark it off so we know we don't visit that grid point again * to_process[cell_id] = 0 * if old_start_i != starti: # <<<<<<<<<<<<<< * append_with_deltas(still_to_process, i, j, k) * */ __pyx_t_34 = ((__pyx_v_old_start_i != __pyx_v_starti) != 0); if (__pyx_t_34) { /* "neuron/rxd/geometry3d/surfaces.pyx":482 * to_process[cell_id] = 0 * if old_start_i != starti: * append_with_deltas(still_to_process, i, j, k) # <<<<<<<<<<<<<< * * triangles.resize(starti, refcheck=False) */ __pyx_t_17 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltas(__pyx_v_still_to_process, __pyx_v_i, __pyx_v_j, __pyx_v_k); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":481 * # mark it off so we know we don't visit that grid point again * to_process[cell_id] = 0 * if old_start_i != starti: # <<<<<<<<<<<<<< * append_with_deltas(still_to_process, i, j, k) * */ } /* "neuron/rxd/geometry3d/surfaces.pyx":464 * cell_id = still_to_process.pop() * # make sure we haven't already handled this voxel * if cell_id not in to_process: # <<<<<<<<<<<<<< * i, j, k = cell_id * old_start_i = starti */ } } /* "neuron/rxd/geometry3d/surfaces.pyx":484 * append_with_deltas(still_to_process, i, j, k) * * triangles.resize(starti, refcheck=False) # <<<<<<<<<<<<<< * * return triangles */ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangles), __pyx_n_s_resize); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_starti); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_29 = PyTuple_New(1); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_refcheck, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_29, __pyx_t_13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":486 * triangles.resize(starti, refcheck=False) * * return triangles # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_triangles)); __pyx_r = ((PyObject *)__pyx_v_triangles); goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":263 * return _triangulate_surface_given_chunks(objects, xs, ys, zs, internal_membranes, chunk_size, chunk_objs, nx, ny, nz, False, None) * * cpdef _triangulate_surface_given_chunks(list objects, xs, ys, zs, internal_membranes, int chunk_size, list chunk_objs, int nx, int ny, int nz, bint store_areas, areas): # <<<<<<<<<<<<<< * cdef int i, j, k, di, dj, dk * cdef double area */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_22); __Pyx_XDECREF(__pyx_t_24); __Pyx_XDECREF(__pyx_t_26); __Pyx_XDECREF(__pyx_t_27); __Pyx_XDECREF(__pyx_t_28); __Pyx_XDECREF(__pyx_t_29); __Pyx_XDECREF(__pyx_t_31); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._triangulate_surface_given_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_cell_list); __Pyx_XDECREF(__pyx_v_to_process); __Pyx_XDECREF(__pyx_v_cell_list2); __Pyx_XDECREF((PyObject *)__pyx_v_triangles); __Pyx_XDECREF(__pyx_v_cur_processed); __Pyx_XDECREF(__pyx_v_clip_objs); __Pyx_XDECREF(__pyx_v_cell_id); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_objdist); __Pyx_XDECREF(__pyx_v_chunk_pts); __Pyx_XDECREF(__pyx_v_chunk_objsa); __Pyx_XDECREF(__pyx_v_chunk_ptsa); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XDECREF(__pyx_v_cells); __Pyx_XDECREF(__pyx_v_start_i); __Pyx_XDECREF(__pyx_v_process2); __Pyx_XDECREF(__pyx_v_pt_neighbor_map); __Pyx_XDECREF(__pyx_v_count); __Pyx_XDECREF(__pyx_v_still_to_process); __Pyx_XDECREF(__pyx_v_local_objs); __Pyx_XDECREF(__pyx_v_pts); __Pyx_XDECREF(__pyx_v_xlo); __Pyx_XDECREF(__pyx_v_ylo); __Pyx_XDECREF(__pyx_v_zlo); __Pyx_XDECREF(__pyx_v_pt); __Pyx_XDECREF(__pyx_v_neighbor_list); __Pyx_XDECREF(__pyx_v_neighbor); __Pyx_XDECREF(__pyx_v_ncount); __Pyx_XDECREF(__pyx_v_point); __Pyx_XDECREF(__pyx_v_clipper); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunks(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunks(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_objects = 0; PyObject *__pyx_v_xs = 0; PyObject *__pyx_v_ys = 0; PyObject *__pyx_v_zs = 0; PyObject *__pyx_v_internal_membranes = 0; int __pyx_v_chunk_size; PyObject *__pyx_v_chunk_objs = 0; int __pyx_v_nx; int __pyx_v_ny; int __pyx_v_nz; int __pyx_v_store_areas; PyObject *__pyx_v_areas = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_triangulate_surface_given_chunks (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_objects,&__pyx_n_s_xs,&__pyx_n_s_ys,&__pyx_n_s_zs,&__pyx_n_s_internal_membranes,&__pyx_n_s_chunk_size,&__pyx_n_s_chunk_objs,&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_store_areas,&__pyx_n_s_areas,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_objects)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_xs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ys)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_internal_membranes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunk_size)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunk_objs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 9: if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 9); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 10: if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_store_areas)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 10); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 11: if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_areas)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, 11); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_triangulate_surface_given_chunks") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 12) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); values[8] = PyTuple_GET_ITEM(__pyx_args, 8); values[9] = PyTuple_GET_ITEM(__pyx_args, 9); values[10] = PyTuple_GET_ITEM(__pyx_args, 10); values[11] = PyTuple_GET_ITEM(__pyx_args, 11); } __pyx_v_objects = ((PyObject*)values[0]); __pyx_v_xs = values[1]; __pyx_v_ys = values[2]; __pyx_v_zs = values[3]; __pyx_v_internal_membranes = values[4]; __pyx_v_chunk_size = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_chunk_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_chunk_objs = ((PyObject*)values[6]); __pyx_v_nx = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_ny = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nz = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_store_areas = __Pyx_PyObject_IsTrue(values[10]); if (unlikely((__pyx_v_store_areas == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_areas = values[11]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_triangulate_surface_given_chunks", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._triangulate_surface_given_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), (&PyList_Type), 1, "objects", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk_objs), (&PyList_Type), 1, "chunk_objs", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_12_triangulate_surface_given_chunks(__pyx_self, __pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_internal_membranes, __pyx_v_chunk_size, __pyx_v_chunk_objs, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_store_areas, __pyx_v_areas); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_12_triangulate_surface_given_chunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objects, PyObject *__pyx_v_xs, PyObject *__pyx_v_ys, PyObject *__pyx_v_zs, PyObject *__pyx_v_internal_membranes, int __pyx_v_chunk_size, PyObject *__pyx_v_chunk_objs, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_store_areas, PyObject *__pyx_v_areas) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_triangulate_surface_given_chunks", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces__triangulate_surface_given_chunks(__pyx_v_objects, __pyx_v_xs, __pyx_v_ys, __pyx_v_zs, __pyx_v_internal_membranes, __pyx_v_chunk_size, __pyx_v_chunk_objs, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_store_areas, __pyx_v_areas, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._triangulate_surface_given_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":489 * * * cpdef double tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles): # <<<<<<<<<<<<<< * return _tri_area(triangles, 0, len(triangles)) * */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_15tri_area(PyObject *__pyx_self, PyObject *__pyx_v_triangles); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_area(PyArrayObject *__pyx_v_triangles, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; double __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tri_area", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; /* "neuron/rxd/geometry3d/surfaces.pyx":490 * * cpdef double tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles): * return _tri_area(triangles, 0, len(triangles)) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_triangles)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_area(((PyArrayObject *)__pyx_v_triangles), 0, __pyx_t_1, 0); goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":489 * * * cpdef double tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles): # <<<<<<<<<<<<<< * return _tri_area(triangles, 0, len(triangles)) * */ /* function exit code */ __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("neuron.rxd.geometry3d.surfaces.tri_area", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_15tri_area(PyObject *__pyx_self, PyObject *__pyx_v_triangles); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_15tri_area(PyObject *__pyx_self, PyObject *__pyx_v_triangles) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tri_area (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_triangles), __pyx_ptype_5numpy_ndarray, 1, "triangles", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_14tri_area(__pyx_self, ((PyArrayObject *)__pyx_v_triangles)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_14tri_area(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_triangles) { __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tri_area", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_area(__pyx_v_triangles, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.tri_area", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":496 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double _tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles, int lo, int hi): # <<<<<<<<<<<<<< * cpdef double doublearea = 0., local_area * cdef int i */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_area(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_area(PyArrayObject *__pyx_v_triangles, int __pyx_v_lo, int __pyx_v_hi, CYTHON_UNUSED int __pyx_skip_dispatch) { double __pyx_v_doublearea; double __pyx_v_local_area; int __pyx_v_i; PyObject *__pyx_v_v = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; double __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; PyObject *(*__pyx_t_13)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_tri_area", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; /* "neuron/rxd/geometry3d/surfaces.pyx":497 * @cython.wraparound(False) * cpdef double _tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles, int lo, int hi): * cpdef double doublearea = 0., local_area # <<<<<<<<<<<<<< * cdef int i * for i in range(lo, hi, 9): */ __pyx_v_doublearea = 0.; /* "neuron/rxd/geometry3d/surfaces.pyx":499 * cpdef double doublearea = 0., local_area * cdef int i * for i in range(lo, hi, 9): # <<<<<<<<<<<<<< * local_area = llgramarea(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * doublearea += local_area */ __pyx_t_1 = __pyx_v_hi; for (__pyx_t_2 = __pyx_v_lo; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=9) { __pyx_v_i = __pyx_t_2; /* "neuron/rxd/geometry3d/surfaces.pyx":500 * cdef int i * for i in range(lo, hi, 9): * local_area = llgramarea(&triangles[i], &triangles[3 + i], &triangles[6 + i]) # <<<<<<<<<<<<<< * doublearea += local_area * if numpy.isnan(local_area): */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = (3 + __pyx_v_i); __pyx_t_5 = (6 + __pyx_v_i); __pyx_v_local_area = llgramarea((&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_triangles.diminfo[0].strides))), (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_triangles.diminfo[0].strides))), (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_triangles.diminfo[0].strides)))); /* "neuron/rxd/geometry3d/surfaces.pyx":501 * for i in range(lo, hi, 9): * local_area = llgramarea(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * doublearea += local_area # <<<<<<<<<<<<<< * if numpy.isnan(local_area): * print 'tri_area exception: ', ', '.join([str(v) for v in triangles[i : i + 9]]) */ __pyx_v_doublearea = (__pyx_v_doublearea + __pyx_v_local_area); /* "neuron/rxd/geometry3d/surfaces.pyx":502 * local_area = llgramarea(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * doublearea += local_area * if numpy.isnan(local_area): # <<<<<<<<<<<<<< * print 'tri_area exception: ', ', '.join([str(v) for v in triangles[i : i + 9]]) * return doublearea * 0.5 */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isnan); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble(__pyx_v_local_area); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_11) { /* "neuron/rxd/geometry3d/surfaces.pyx":503 * doublearea += local_area * if numpy.isnan(local_area): * print 'tri_area exception: ', ', '.join([str(v) for v in triangles[i : i + 9]]) # <<<<<<<<<<<<<< * return doublearea * 0.5 * */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_triangles), __pyx_v_i, (__pyx_v_i + 9), NULL, NULL, NULL, 1, 1, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_10 = __pyx_t_8; __Pyx_INCREF(__pyx_t_10); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { __pyx_t_12 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_10))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_8 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_13(__pyx_t_10); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_v); __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_tri_area_exception); __Pyx_GIVEREF(__pyx_kp_s_tri_area_exception); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_tri_area_exception); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10); __pyx_t_10 = 0; if (__Pyx_Print(0, __pyx_t_6, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":502 * local_area = llgramarea(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * doublearea += local_area * if numpy.isnan(local_area): # <<<<<<<<<<<<<< * print 'tri_area exception: ', ', '.join([str(v) for v in triangles[i : i + 9]]) * return doublearea * 0.5 */ } } /* "neuron/rxd/geometry3d/surfaces.pyx":504 * if numpy.isnan(local_area): * print 'tri_area exception: ', ', '.join([str(v) for v in triangles[i : i + 9]]) * return doublearea * 0.5 # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_r = (__pyx_v_doublearea * 0.5); goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":496 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double _tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles, int lo, int hi): # <<<<<<<<<<<<<< * cpdef double doublearea = 0., local_area * cdef int i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("neuron.rxd.geometry3d.surfaces._tri_area", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_v); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_area(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_area(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_triangles = 0; int __pyx_v_lo; int __pyx_v_hi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_tri_area (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_triangles,&__pyx_n_s_lo,&__pyx_n_s_hi,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triangles)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lo)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_tri_area", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_tri_area", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_tri_area") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_triangles = ((PyArrayObject *)values[0]); __pyx_v_lo = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_lo == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_hi = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_hi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_tri_area", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._tri_area", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_triangles), __pyx_ptype_5numpy_ndarray, 1, "triangles", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_16_tri_area(__pyx_self, __pyx_v_triangles, __pyx_v_lo, __pyx_v_hi); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_16_tri_area(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_triangles, int __pyx_v_lo, int __pyx_v_hi) { __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_tri_area", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_area(__pyx_v_triangles, __pyx_v_lo, __pyx_v_hi, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces._tri_area", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuron/rxd/geometry3d/surfaces.pyx":508 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double tri_volume(numpy.ndarray[numpy.float_t, ndim=1] triangles): # <<<<<<<<<<<<<< * cpdef double sixtimesvolume = 0., local_vol * cdef int i */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_19tri_volume(PyObject *__pyx_self, PyObject *__pyx_v_triangles); /*proto*/ static double __pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_volume(PyArrayObject *__pyx_v_triangles, CYTHON_UNUSED int __pyx_skip_dispatch) { double __pyx_v_sixtimesvolume; double __pyx_v_local_vol; int __pyx_v_i; long __pyx_v_j; __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; double __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; long __pyx_t_12; long __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tri_volume", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; /* "neuron/rxd/geometry3d/surfaces.pyx":509 * @cython.wraparound(False) * cpdef double tri_volume(numpy.ndarray[numpy.float_t, ndim=1] triangles): * cpdef double sixtimesvolume = 0., local_vol # <<<<<<<<<<<<<< * cdef int i * for i in range(0, len(triangles), 9): */ __pyx_v_sixtimesvolume = 0.; /* "neuron/rxd/geometry3d/surfaces.pyx":511 * cpdef double sixtimesvolume = 0., local_vol * cdef int i * for i in range(0, len(triangles), 9): # <<<<<<<<<<<<<< * local_vol = llpipedfromoriginvolume(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * sixtimesvolume += local_vol */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_triangles)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=9) { __pyx_v_i = __pyx_t_2; /* "neuron/rxd/geometry3d/surfaces.pyx":512 * cdef int i * for i in range(0, len(triangles), 9): * local_vol = llpipedfromoriginvolume(&triangles[i], &triangles[3 + i], &triangles[6 + i]) # <<<<<<<<<<<<<< * sixtimesvolume += local_vol * if numpy.isnan(local_vol): */ __pyx_t_3 = __pyx_v_i; __pyx_t_4 = (3 + __pyx_v_i); __pyx_t_5 = (6 + __pyx_v_i); __pyx_v_local_vol = llpipedfromoriginvolume((&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_triangles.diminfo[0].strides))), (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_triangles.diminfo[0].strides))), (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_triangles.diminfo[0].strides)))); /* "neuron/rxd/geometry3d/surfaces.pyx":513 * for i in range(0, len(triangles), 9): * local_vol = llpipedfromoriginvolume(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * sixtimesvolume += local_vol # <<<<<<<<<<<<<< * if numpy.isnan(local_vol): * print 'tri_volume exception:', */ __pyx_v_sixtimesvolume = (__pyx_v_sixtimesvolume + __pyx_v_local_vol); /* "neuron/rxd/geometry3d/surfaces.pyx":514 * local_vol = llpipedfromoriginvolume(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * sixtimesvolume += local_vol * if numpy.isnan(local_vol): # <<<<<<<<<<<<<< * print 'tri_volume exception:', * for j in range(i, i + 9): */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isnan); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyFloat_FromDouble(__pyx_v_local_vol); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_11) { /* "neuron/rxd/geometry3d/surfaces.pyx":515 * sixtimesvolume += local_vol * if numpy.isnan(local_vol): * print 'tri_volume exception:', # <<<<<<<<<<<<<< * for j in range(i, i + 9): * print triangles[j], */ if (__Pyx_Print(0, __pyx_tuple__4, 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":516 * if numpy.isnan(local_vol): * print 'tri_volume exception:', * for j in range(i, i + 9): # <<<<<<<<<<<<<< * print triangles[j], * print */ __pyx_t_12 = (__pyx_v_i + 9); for (__pyx_t_13 = __pyx_v_i; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_j = __pyx_t_13; /* "neuron/rxd/geometry3d/surfaces.pyx":517 * print 'tri_volume exception:', * for j in range(i, i + 9): * print triangles[j], # <<<<<<<<<<<<<< * print * return abs(sixtimesvolume / 6.) */ __pyx_t_14 = __pyx_v_j; __pyx_t_6 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_pybuffernd_triangles.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_triangles.diminfo[0].strides))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = 0; if (__Pyx_Print(0, __pyx_t_8, 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":518 * for j in range(i, i + 9): * print triangles[j], * print # <<<<<<<<<<<<<< * return abs(sixtimesvolume / 6.) */ if (__Pyx_Print(0, __pyx_empty_tuple, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "neuron/rxd/geometry3d/surfaces.pyx":514 * local_vol = llpipedfromoriginvolume(&triangles[i], &triangles[3 + i], &triangles[6 + i]) * sixtimesvolume += local_vol * if numpy.isnan(local_vol): # <<<<<<<<<<<<<< * print 'tri_volume exception:', * for j in range(i, i + 9): */ } } /* "neuron/rxd/geometry3d/surfaces.pyx":519 * print triangles[j], * print * return abs(sixtimesvolume / 6.) # <<<<<<<<<<<<<< */ __pyx_r = fabs((__pyx_v_sixtimesvolume / 6.)); goto __pyx_L0; /* "neuron/rxd/geometry3d/surfaces.pyx":508 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef double tri_volume(numpy.ndarray[numpy.float_t, ndim=1] triangles): # <<<<<<<<<<<<<< * cpdef double sixtimesvolume = 0., local_vol * cdef int i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("neuron.rxd.geometry3d.surfaces.tri_volume", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_19tri_volume(PyObject *__pyx_self, PyObject *__pyx_v_triangles); /*proto*/ static PyObject *__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_19tri_volume(PyObject *__pyx_self, PyObject *__pyx_v_triangles) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tri_volume (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_triangles), __pyx_ptype_5numpy_ndarray, 1, "triangles", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_18tri_volume(__pyx_self, ((PyArrayObject *)__pyx_v_triangles)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_18tri_volume(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_triangles) { __Pyx_LocalBuf_ND __pyx_pybuffernd_triangles; __Pyx_Buffer __pyx_pybuffer_triangles; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tri_volume", 0); __pyx_pybuffer_triangles.pybuffer.buf = NULL; __pyx_pybuffer_triangles.refcount = 0; __pyx_pybuffernd_triangles.data = NULL; __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_volume(__pyx_v_triangles, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("neuron.rxd.geometry3d.surfaces.tri_volume", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; int __pyx_v_i; int __pyx_v_ndim; int __pyx_v_endian_detector; int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; int __pyx_v_offset; int __pyx_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; char *__pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":203 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = ((__pyx_v_info == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":206 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":207 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * * ndim = PyArray_NDIM(self) */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":209 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":212 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ goto __pyx_L4; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":214 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ /*else*/ { __pyx_v_copy_shape = 0; } __pyx_L4:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":217 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L9_bool_binop_done; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":221 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L9_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":224 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":225 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_1 = (__pyx_v_copy_shape != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":229 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":230 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":231 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ __pyx_t_4 = __pyx_v_ndim; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":232 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":233 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ goto __pyx_L11; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":235 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":236 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } __pyx_L11:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":237 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) */ __pyx_v_info->suboffsets = NULL; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":238 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":239 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":242 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef int offset */ __pyx_v_f = NULL; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":243 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef int offset * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":246 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L15_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L15_bool_binop_done:; if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":250 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ goto __pyx_L14; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":253 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); } __pyx_L14:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":256 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): */ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); if (!__pyx_t_2) { goto __pyx_L20_next_or; } else { } __pyx_t_2 = (__pyx_v_little_endian != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_L20_next_or:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":258 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L19_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":260 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ switch (__pyx_v_t) { case NPY_BYTE: __pyx_v_f = __pyx_k_b; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":261 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ case NPY_UBYTE: __pyx_v_f = __pyx_k_B; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":262 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ case NPY_SHORT: __pyx_v_f = __pyx_k_h; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":263 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ case NPY_USHORT: __pyx_v_f = __pyx_k_H; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":264 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ case NPY_INT: __pyx_v_f = __pyx_k_i; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":265 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ case NPY_UINT: __pyx_v_f = __pyx_k_I; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":266 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ case NPY_LONG: __pyx_v_f = __pyx_k_l; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":267 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ case NPY_ULONG: __pyx_v_f = __pyx_k_L; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":268 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ case NPY_LONGLONG: __pyx_v_f = __pyx_k_q; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":269 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ case NPY_ULONGLONG: __pyx_v_f = __pyx_k_Q; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":270 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ case NPY_FLOAT: __pyx_v_f = __pyx_k_f; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":271 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ case NPY_DOUBLE: __pyx_v_f = __pyx_k_d; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":272 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ case NPY_LONGDOUBLE: __pyx_v_f = __pyx_k_g; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":273 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ case NPY_CFLOAT: __pyx_v_f = __pyx_k_Zf; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ case NPY_CDOUBLE: __pyx_v_f = __pyx_k_Zd; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":275 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ case NPY_CLONGDOUBLE: __pyx_v_f = __pyx_k_Zg; break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":276 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ case NPY_OBJECT: __pyx_v_f = __pyx_k_O; break; default: /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":278 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":279 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":280 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":282 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 */ /*else*/ { __pyx_v_info->format = ((char *)malloc(0xFF)); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":283 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":284 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":285 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_7; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":288 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = '\x00'; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* Python wrapper */ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":292 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":294 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":771 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":774 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":777 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":780 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":783 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child = 0; int __pyx_v_endian_detector; int __pyx_v_little_endian; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_childname = NULL; PyObject *__pyx_v_new_offset = NULL; PyObject *__pyx_v_t = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":790 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":791 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * cdef tuple fields * */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":795 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":796 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(__pyx_v_fields != Py_None)) { PyObject* sequence = __pyx_v_fields; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); if (!__pyx_t_7) { goto __pyx_L8_next_or; } else { } __pyx_t_7 = (__pyx_v_little_endian != 0); if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_or:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":802 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":813 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":814 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 0x78; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":815 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":816 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":818 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":821 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_6) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":826 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":827 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":828 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":829 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":830 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":831 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x66; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x64; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":841 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x67; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":842 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ /*else*/ { __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L15:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":845 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ goto __pyx_L13; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":849 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ /*else*/ { __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; } __pyx_L13:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":850 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_child); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_childname); __Pyx_XDECREF(__pyx_v_new_offset); __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ __pyx_t_1 = (__pyx_v_base == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":969 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ goto __pyx_L3; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":971 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ /*else*/ { Py_INCREF(__pyx_v_base); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":972 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< * Py_XDECREF(arr.base) * arr.base = baseptr */ __pyx_v_baseptr = ((PyObject *)__pyx_v_base); } __pyx_L3:; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":973 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< * arr.base = baseptr * */ Py_XDECREF(__pyx_v_arr->base); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":974 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":978 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":980 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyMethodDef __pyx_methods[] = { {"chunkify", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkify, METH_VARARGS|METH_KEYWORDS, 0}, {"triangulate_surface", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surface, METH_VARARGS|METH_KEYWORDS, 0}, {"_triangulate_surface_given_chunks", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunks, METH_VARARGS|METH_KEYWORDS, 0}, {"tri_area", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_15tri_area, METH_O, 0}, {"_tri_area", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_area, METH_VARARGS|METH_KEYWORDS, 0}, {"tri_volume", (PyCFunction)__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_19tri_volume, METH_O, 0}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "surfaces", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_7f_7f_7f_7f_7f_7f_7f_7f, __pyx_k_7f_7f_7f_7f_7f_7f_7f_7f, sizeof(__pyx_k_7f_7f_7f_7f_7f_7f_7f_7f), 0, 0, 1, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_SkewCone, __pyx_k_SkewCone, sizeof(__pyx_k_SkewCone), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_areas, __pyx_k_areas, sizeof(__pyx_k_areas), 0, 0, 1, 1}, {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, {&__pyx_kp_s_at_g_g_g_d_g, __pyx_k_at_g_g_g_d_g, sizeof(__pyx_k_at_g_g_g_d_g), 0, 0, 1, 0}, {&__pyx_n_s_big_number_matrix, __pyx_k_big_number_matrix, sizeof(__pyx_k_big_number_matrix), 0, 0, 1, 1}, {&__pyx_n_s_bisect, __pyx_k_bisect, sizeof(__pyx_k_bisect), 0, 0, 1, 1}, {&__pyx_n_s_bisect_left, __pyx_k_bisect_left, sizeof(__pyx_k_bisect_left), 0, 0, 1, 1}, {&__pyx_n_s_bisect_right, __pyx_k_bisect_right, sizeof(__pyx_k_bisect_right), 0, 0, 1, 1}, {&__pyx_n_s_chunk_objs, __pyx_k_chunk_objs, sizeof(__pyx_k_chunk_objs), 0, 0, 1, 1}, {&__pyx_n_s_chunk_size, __pyx_k_chunk_size, sizeof(__pyx_k_chunk_size), 0, 0, 1, 1}, {&__pyx_n_s_contains_surface, __pyx_k_contains_surface, sizeof(__pyx_k_contains_surface), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_distance, __pyx_k_distance, sizeof(__pyx_k_distance), 0, 0, 1, 1}, {&__pyx_kp_s_distance_to_position_4_with_ever, __pyx_k_distance_to_position_4_with_ever, sizeof(__pyx_k_distance_to_position_4_with_ever), 0, 0, 1, 0}, {&__pyx_kp_s_distance_to_position_4_with_ever_2, __pyx_k_distance_to_position_4_with_ever_2, sizeof(__pyx_k_distance_to_position_4_with_ever_2), 0, 0, 1, 0}, {&__pyx_n_s_dx, __pyx_k_dx, sizeof(__pyx_k_dx), 0, 0, 1, 1}, {&__pyx_n_s_dy, __pyx_k_dy, sizeof(__pyx_k_dy), 0, 0, 1, 1}, {&__pyx_n_s_dz, __pyx_k_dz, sizeof(__pyx_k_dz), 0, 0, 1, 1}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_get_clip, __pyx_k_get_clip, sizeof(__pyx_k_get_clip), 0, 0, 1, 1}, {&__pyx_n_s_graphicsPrimitives, __pyx_k_graphicsPrimitives, sizeof(__pyx_k_graphicsPrimitives), 0, 0, 1, 1}, {&__pyx_kp_s_grr_it_thinks_there_is_surface_w, __pyx_k_grr_it_thinks_there_is_surface_w, sizeof(__pyx_k_grr_it_thinks_there_is_surface_w), 0, 0, 1, 0}, {&__pyx_n_s_has_neg, __pyx_k_has_neg, sizeof(__pyx_k_has_neg), 0, 0, 1, 1}, {&__pyx_n_s_has_pos, __pyx_k_has_pos, sizeof(__pyx_k_has_pos), 0, 0, 1, 1}, {&__pyx_n_s_hi, __pyx_k_hi, sizeof(__pyx_k_hi), 0, 0, 1, 1}, {&__pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_k_home_hines_neuron_nrn_share_lib, sizeof(__pyx_k_home_hines_neuron_nrn_share_lib), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_i1, __pyx_k_i1, sizeof(__pyx_k_i1), 0, 0, 1, 1}, {&__pyx_kp_s_i_e_global_item_d_r, __pyx_k_i_e_global_item_d_r, sizeof(__pyx_k_i_e_global_item_d_r), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_internal_membranes, __pyx_k_internal_membranes, sizeof(__pyx_k_internal_membranes), 0, 0, 1, 1}, {&__pyx_n_s_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1}, {&__pyx_kp_s_item_d_in_grid_d_d_d_contains_pr, __pyx_k_item_d_in_grid_d_d_d_contains_pr, sizeof(__pyx_k_item_d_in_grid_d_d_d_contains_pr), 0, 0, 1, 0}, {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_j1, __pyx_k_j1, sizeof(__pyx_k_j1), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_k1, __pyx_k_k1, sizeof(__pyx_k_k1), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_kp_s_last_obj_distance_to_position_4, __pyx_k_last_obj_distance_to_position_4, sizeof(__pyx_k_last_obj_distance_to_position_4), 0, 0, 1, 0}, {&__pyx_kp_s_last_object, __pyx_k_last_object, sizeof(__pyx_k_last_object), 0, 0, 1, 0}, {&__pyx_n_s_lo, __pyx_k_lo, sizeof(__pyx_k_lo), 0, 0, 1, 1}, {&__pyx_n_s_local_xs, __pyx_k_local_xs, sizeof(__pyx_k_local_xs), 0, 0, 1, 1}, {&__pyx_n_s_local_ys, __pyx_k_local_ys, sizeof(__pyx_k_local_ys), 0, 0, 1, 1}, {&__pyx_n_s_local_zs, __pyx_k_local_zs, sizeof(__pyx_k_local_zs), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_max_chunks, __pyx_k_max_chunks, sizeof(__pyx_k_max_chunks), 0, 0, 1, 1}, {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, {&__pyx_n_s_neighbor, __pyx_k_neighbor, sizeof(__pyx_k_neighbor), 0, 0, 1, 1}, {&__pyx_n_s_neuron, __pyx_k_neuron, sizeof(__pyx_k_neuron), 0, 0, 1, 1}, {&__pyx_n_s_neuron_rxd_geometry3d_surfaces, __pyx_k_neuron_rxd_geometry3d_surfaces, sizeof(__pyx_k_neuron_rxd_geometry3d_surfaces), 0, 0, 1, 1}, {&__pyx_n_s_new_index, __pyx_k_new_index, sizeof(__pyx_k_new_index), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_nx, __pyx_k_nx, sizeof(__pyx_k_nx), 0, 0, 1, 1}, {&__pyx_n_s_ny, __pyx_k_ny, sizeof(__pyx_k_ny), 0, 0, 1, 1}, {&__pyx_n_s_nz, __pyx_k_nz, sizeof(__pyx_k_nz), 0, 0, 1, 1}, {&__pyx_n_s_objdist, __pyx_k_objdist, sizeof(__pyx_k_objdist), 0, 0, 1, 1}, {&__pyx_n_s_objects, __pyx_k_objects, sizeof(__pyx_k_objects), 0, 0, 1, 1}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_n_s_overlaps_x, __pyx_k_overlaps_x, sizeof(__pyx_k_overlaps_x), 0, 0, 1, 1}, {&__pyx_n_s_overlaps_y, __pyx_k_overlaps_y, sizeof(__pyx_k_overlaps_y), 0, 0, 1, 1}, {&__pyx_n_s_overlaps_z, __pyx_k_overlaps_z, sizeof(__pyx_k_overlaps_z), 0, 0, 1, 1}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1}, {&__pyx_kp_s_position_4, __pyx_k_position_4, sizeof(__pyx_k_position_4), 0, 0, 1, 0}, {&__pyx_n_s_primitives, __pyx_k_primitives, sizeof(__pyx_k_primitives), 0, 0, 1, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_print_reject_reason, __pyx_k_print_reject_reason, sizeof(__pyx_k_print_reject_reason), 0, 0, 1, 1}, {&__pyx_n_s_print_values, __pyx_k_print_values, sizeof(__pyx_k_print_values), 0, 0, 1, 1}, {&__pyx_n_s_process_cell, __pyx_k_process_cell, sizeof(__pyx_k_process_cell), 0, 0, 1, 1}, {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1}, {&__pyx_n_s_pt, __pyx_k_pt, sizeof(__pyx_k_pt), 0, 0, 1, 1}, {&__pyx_n_s_r_inner, __pyx_k_r_inner, sizeof(__pyx_k_r_inner), 0, 0, 1, 1}, {&__pyx_n_s_r_outer, __pyx_k_r_outer, sizeof(__pyx_k_r_outer), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_refcheck, __pyx_k_refcheck, sizeof(__pyx_k_refcheck), 0, 0, 1, 1}, {&__pyx_n_s_register_on_neighbor_map, __pyx_k_register_on_neighbor_map, sizeof(__pyx_k_register_on_neighbor_map), 0, 0, 1, 1}, {&__pyx_n_s_reject_if_outside, __pyx_k_reject_if_outside, sizeof(__pyx_k_reject_if_outside), 0, 0, 1, 1}, {&__pyx_n_s_resize, __pyx_k_resize, sizeof(__pyx_k_resize), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_starting_points, __pyx_k_starting_points, sizeof(__pyx_k_starting_points), 0, 0, 1, 1}, {&__pyx_n_s_store_areas, __pyx_k_store_areas, sizeof(__pyx_k_store_areas), 0, 0, 1, 1}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_the_map, __pyx_k_the_map, sizeof(__pyx_k_the_map), 0, 0, 1, 1}, {&__pyx_kp_s_tri_area_exception, __pyx_k_tri_area_exception, sizeof(__pyx_k_tri_area_exception), 0, 0, 1, 0}, {&__pyx_kp_s_tri_volume_exception, __pyx_k_tri_volume_exception, sizeof(__pyx_k_tri_volume_exception), 0, 0, 1, 0}, {&__pyx_n_s_triangles, __pyx_k_triangles, sizeof(__pyx_k_triangles), 0, 0, 1, 1}, {&__pyx_n_s_tridata, __pyx_k_tridata, sizeof(__pyx_k_tridata), 0, 0, 1, 1}, {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, {&__pyx_n_s_value0, __pyx_k_value0, sizeof(__pyx_k_value0), 0, 0, 1, 1}, {&__pyx_n_s_value1, __pyx_k_value1, sizeof(__pyx_k_value1), 0, 0, 1, 1}, {&__pyx_n_s_value2, __pyx_k_value2, sizeof(__pyx_k_value2), 0, 0, 1, 1}, {&__pyx_n_s_value3, __pyx_k_value3, sizeof(__pyx_k_value3), 0, 0, 1, 1}, {&__pyx_n_s_value4, __pyx_k_value4, sizeof(__pyx_k_value4), 0, 0, 1, 1}, {&__pyx_n_s_value5, __pyx_k_value5, sizeof(__pyx_k_value5), 0, 0, 1, 1}, {&__pyx_n_s_value6, __pyx_k_value6, sizeof(__pyx_k_value6), 0, 0, 1, 1}, {&__pyx_n_s_value7, __pyx_k_value7, sizeof(__pyx_k_value7), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_volume_inside_cell, __pyx_k_volume_inside_cell, sizeof(__pyx_k_volume_inside_cell), 0, 0, 1, 1}, {&__pyx_kp_s_would_normally_reject_because_at, __pyx_k_would_normally_reject_because_at, sizeof(__pyx_k_would_normally_reject_because_at), 0, 0, 1, 0}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_x0, __pyx_k_x0, sizeof(__pyx_k_x0), 0, 0, 1, 1}, {&__pyx_n_s_x1, __pyx_k_x1, sizeof(__pyx_k_x1), 0, 0, 1, 1}, {&__pyx_kp_s_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7, __pyx_k_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7, sizeof(__pyx_k_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7), 0, 0, 1, 0}, {&__pyx_n_s_xbar, __pyx_k_xbar, sizeof(__pyx_k_xbar), 0, 0, 1, 1}, {&__pyx_n_s_xhi, __pyx_k_xhi, sizeof(__pyx_k_xhi), 0, 0, 1, 1}, {&__pyx_n_s_xlo, __pyx_k_xlo, sizeof(__pyx_k_xlo), 0, 0, 1, 1}, {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, {&__pyx_n_s_xs, __pyx_k_xs, sizeof(__pyx_k_xs), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_y0, __pyx_k_y0, sizeof(__pyx_k_y0), 0, 0, 1, 1}, {&__pyx_n_s_y1, __pyx_k_y1, sizeof(__pyx_k_y1), 0, 0, 1, 1}, {&__pyx_n_s_ybar, __pyx_k_ybar, sizeof(__pyx_k_ybar), 0, 0, 1, 1}, {&__pyx_n_s_yhi, __pyx_k_yhi, sizeof(__pyx_k_yhi), 0, 0, 1, 1}, {&__pyx_n_s_ylo, __pyx_k_ylo, sizeof(__pyx_k_ylo), 0, 0, 1, 1}, {&__pyx_n_s_ys, __pyx_k_ys, sizeof(__pyx_k_ys), 0, 0, 1, 1}, {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1}, {&__pyx_n_s_z0, __pyx_k_z0, sizeof(__pyx_k_z0), 0, 0, 1, 1}, {&__pyx_n_s_z1, __pyx_k_z1, sizeof(__pyx_k_z1), 0, 0, 1, 1}, {&__pyx_n_s_zbar, __pyx_k_zbar, sizeof(__pyx_k_zbar), 0, 0, 1, 1}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {&__pyx_n_s_zhi, __pyx_k_zhi, sizeof(__pyx_k_zhi), 0, 0, 1, 1}, {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, {&__pyx_n_s_zlo, __pyx_k_zlo, sizeof(__pyx_k_zlo), 0, 0, 1, 1}, {&__pyx_n_s_zs, __pyx_k_zs, sizeof(__pyx_k_zs), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "neuron/rxd/geometry3d/surfaces.pyx":148 * # TODO: I probably don't need the 8 corner voxels * # 9 doubles/tri * 5 tri/cell * 27 cells = 1215 doubles * cdef numpy.ndarray[numpy.float_t, ndim=1] tridata = numpy.zeros(1215) # <<<<<<<<<<<<<< * cdef int start = 0 * for i in range(3): */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_1215); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "neuron/rxd/geometry3d/surfaces.pyx":293 * cdef int numcompartments * # locate all the potential boundary locations * triangles = numpy.zeros(1000) # <<<<<<<<<<<<<< * cdef int triangles_i = 0 * cdef bint reject_if_outside */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_int_1000); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "neuron/rxd/geometry3d/surfaces.pyx":515 * sixtimesvolume += local_vol * if numpy.isnan(local_vol): * print 'tri_volume exception:', # <<<<<<<<<<<<<< * for j in range(i, i + 9): * print triangles[j], */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_tri_volume_exception); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "neuron/rxd/geometry3d/surfaces.pyx":26 * * * def _register_on_neighbor_map(the_map, pt, neighbor): # <<<<<<<<<<<<<< * # does not assume neighbor relations are bidirectional * if pt in the_map: */ __pyx_tuple__11 = PyTuple_Pack(3, __pyx_n_s_the_map, __pyx_n_s_pt, __pyx_n_s_neighbor); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_n_s_register_on_neighbor_map, 26, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":42 * @cython.wraparound(False) * #cdef bint contains_surface(int i, int j, int k, objdist, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, double dx, double r_inner, double r_outer, bint reject_if_outside, bint print_reject_reason=False): * def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): # <<<<<<<<<<<<<< * cdef bint has_neg = False * cdef bint has_pos = False */ __pyx_tuple__13 = PyTuple_Pack(21, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_objdist, __pyx_n_s_xs, __pyx_n_s_ys, __pyx_n_s_zs, __pyx_n_s_dx, __pyx_n_s_r_inner, __pyx_n_s_r_outer, __pyx_n_s_reject_if_outside, __pyx_n_s_print_reject_reason, __pyx_n_s_has_neg, __pyx_n_s_has_pos, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_xbar, __pyx_n_s_ybar, __pyx_n_s_zbar, __pyx_n_s_d); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(12, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_n_s_contains_surface, 42, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":88 * @cython.wraparound(False) * #cdef int process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint print_values=False): * def process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint store_areas=False, numpy.ndarray[numpy.float_t, ndim=3] areas=None, bint print_values=False): # <<<<<<<<<<<<<< * cdef int new_index * cdef double x, y, z, x1, y1, z1 */ __pyx_tuple__15 = PyTuple_Pack(30, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_objects, __pyx_n_s_xs, __pyx_n_s_ys, __pyx_n_s_zs, __pyx_n_s_tridata, __pyx_n_s_start, __pyx_n_s_store_areas, __pyx_n_s_areas, __pyx_n_s_print_values, __pyx_n_s_new_index, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_x1, __pyx_n_s_y1, __pyx_n_s_z1, __pyx_n_s_position, __pyx_n_s_value0, __pyx_n_s_value1, __pyx_n_s_value2, __pyx_n_s_value3, __pyx_n_s_value4, __pyx_n_s_value5, __pyx_n_s_value6, __pyx_n_s_value7, __pyx_n_s_p, __pyx_n_s_objdist); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(12, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_n_s_process_cell, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":121 * # a matrix whose values are unambiguously outside the object * big_number_matrix = numpy.zeros([4, 4, 4]) * for i in range(4): # <<<<<<<<<<<<<< * for j in range(4): * for k in range(4): */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "neuron/rxd/geometry3d/surfaces.pyx":122 * big_number_matrix = numpy.zeros([4, 4, 4]) * for i in range(4): * for j in range(4): # <<<<<<<<<<<<<< * for k in range(4): * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "neuron/rxd/geometry3d/surfaces.pyx":123 * for i in range(4): * for j in range(4): * for k in range(4): # <<<<<<<<<<<<<< * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k * */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "neuron/rxd/geometry3d/surfaces.pyx":128 * @cython.boundscheck(False) * @cython.wraparound(False) * def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): # <<<<<<<<<<<<<< * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] */ __pyx_tuple__20 = PyTuple_Pack(37, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_objects, __pyx_n_s_xs, __pyx_n_s_ys, __pyx_n_s_zs, __pyx_n_s_x0, __pyx_n_s_y0, __pyx_n_s_z0, __pyx_n_s_x1, __pyx_n_s_y1, __pyx_n_s_z1, __pyx_n_s_dx, __pyx_n_s_dy, __pyx_n_s_dz, __pyx_n_s_local_xs, __pyx_n_s_local_ys, __pyx_n_s_local_zs, __pyx_n_s_data, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_i1, __pyx_n_s_j1, __pyx_n_s_k1, __pyx_n_s_tridata, __pyx_n_s_start, __pyx_n_s_value0, __pyx_n_s_value1, __pyx_n_s_value2, __pyx_n_s_value3, __pyx_n_s_value4, __pyx_n_s_value5, __pyx_n_s_value6, __pyx_n_s_value7, __pyx_n_s_objdist); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(7, 0, 37, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_share_lib, __pyx_n_s_volume_inside_cell, 128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_float_2_ = PyFloat_FromDouble(2.); if (unlikely(!__pyx_float_2_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1215 = PyInt_FromLong(1215); if (unlikely(!__pyx_int_1215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_9999 = PyInt_FromLong(9999); if (unlikely(!__pyx_int_9999)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_10000000 = PyInt_FromLong(10000000L); if (unlikely(!__pyx_int_10000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_neg_2 = PyInt_FromLong(-2); if (unlikely(!__pyx_int_neg_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initsurfaces(void); /*proto*/ PyMODINIT_FUNC initsurfaces(void) #else PyMODINIT_FUNC PyInit_surfaces(void); /*proto*/ PyMODINIT_FUNC PyInit_surfaces(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_surfaces(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("surfaces", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_neuron__rxd__geometry3d__surfaces) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "neuron.rxd.geometry3d.surfaces")) { if (unlikely(PyDict_SetItemString(modules, "neuron.rxd.geometry3d.surfaces", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "neuron/rxd/geometry3d/surfaces.pyx":1 * import os # <<<<<<<<<<<<<< * import numpy * import graphicsPrimitives */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":2 * import os * import numpy # <<<<<<<<<<<<<< * import graphicsPrimitives * import neuron */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":3 * import os * import numpy * import graphicsPrimitives # <<<<<<<<<<<<<< * import neuron * import numpy */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_graphicsPrimitives, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_graphicsPrimitives, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":4 * import numpy * import graphicsPrimitives * import neuron # <<<<<<<<<<<<<< * import numpy * cimport numpy */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_neuron, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_neuron, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":5 * import graphicsPrimitives * import neuron * import numpy # <<<<<<<<<<<<<< * cimport numpy * import itertools */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":7 * import numpy * cimport numpy * import itertools # <<<<<<<<<<<<<< * import bisect * cimport cython */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":8 * cimport numpy * import itertools * import bisect # <<<<<<<<<<<<<< * cimport cython * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_bisect, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":26 * * * def _register_on_neighbor_map(the_map, pt, neighbor): # <<<<<<<<<<<<<< * # does not assume neighbor relations are bidirectional * if pt in the_map: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map, NULL, __pyx_n_s_neuron_rxd_geometry3d_surfaces); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_register_on_neighbor_map, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":34 * * * max_chunks = 10000000 # <<<<<<<<<<<<<< * * cdef int total_surface_tests = 0 */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_max_chunks, __pyx_int_10000000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuron/rxd/geometry3d/surfaces.pyx":36 * max_chunks = 10000000 * * cdef int total_surface_tests = 0 # <<<<<<<<<<<<<< * cdef int corner_tests = 0 * */ __pyx_v_6neuron_3rxd_10geometry3d_8surfaces_total_surface_tests = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":37 * * cdef int total_surface_tests = 0 * cdef int corner_tests = 0 # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_v_6neuron_3rxd_10geometry3d_8surfaces_corner_tests = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":42 * @cython.wraparound(False) * #cdef bint contains_surface(int i, int j, int k, objdist, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, double dx, double r_inner, double r_outer, bint reject_if_outside, bint print_reject_reason=False): * def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): # <<<<<<<<<<<<<< * cdef bint has_neg = False * cdef bint has_pos = False */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface, NULL, __pyx_n_s_neuron_rxd_geometry3d_surfaces); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_contains_surface, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":88 * @cython.wraparound(False) * #cdef int process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint print_values=False): * def process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint store_areas=False, numpy.ndarray[numpy.float_t, ndim=3] areas=None, bint print_values=False): # <<<<<<<<<<<<<< * cdef int new_index * cdef double x, y, z, x1, y1, z1 */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_5process_cell, NULL, __pyx_n_s_neuron_rxd_geometry3d_surfaces); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_cell, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":120 * * # a matrix whose values are unambiguously outside the object * big_number_matrix = numpy.zeros([4, 4, 4]) # <<<<<<<<<<<<<< * for i in range(4): * for j in range(4): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_4); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_4); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_4); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_big_number_matrix, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":121 * # a matrix whose values are unambiguously outside the object * big_number_matrix = numpy.zeros([4, 4, 4]) * for i in range(4): # <<<<<<<<<<<<<< * for j in range(4): * for k in range(4): */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } if (PyDict_SetItem(__pyx_d, __pyx_n_s_i, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":122 * big_number_matrix = numpy.zeros([4, 4, 4]) * for i in range(4): * for j in range(4): # <<<<<<<<<<<<<< * for k in range(4): * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } if (PyDict_SetItem(__pyx_d, __pyx_n_s_j, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":123 * for i in range(4): * for j in range(4): * for k in range(4): # <<<<<<<<<<<<<< * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } if (PyDict_SetItem(__pyx_d, __pyx_n_s_k, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":124 * for j in range(4): * for k in range(4): * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_int_16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_AddCObj(__pyx_int_9999, __pyx_t_4, 0x270F, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_j); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = PyNumber_Multiply(__pyx_t_4, __pyx_int_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_k); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_big_number_matrix); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_j); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_k); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_14); __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; if (unlikely(PyObject_SetItem(__pyx_t_12, __pyx_t_15, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":123 * for i in range(4): * for j in range(4): * for k in range(4): # <<<<<<<<<<<<<< * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":122 * big_number_matrix = numpy.zeros([4, 4, 4]) * for i in range(4): * for j in range(4): # <<<<<<<<<<<<<< * for k in range(4): * big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":121 * # a matrix whose values are unambiguously outside the object * big_number_matrix = numpy.zeros([4, 4, 4]) * for i in range(4): # <<<<<<<<<<<<<< * for j in range(4): * for k in range(4): */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":128 * @cython.boundscheck(False) * @cython.wraparound(False) * def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): # <<<<<<<<<<<<<< * cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] * cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell, NULL, __pyx_n_s_neuron_rxd_geometry3d_surfaces); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_volume_inside_cell, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "neuron/rxd/geometry3d/surfaces.pyx":1 * import os # <<<<<<<<<<<<<< * import numpy * import graphicsPrimitives */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "../../../../../../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init neuron.rxd.geometry3d.surfaces", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init neuron.rxd.geometry3d.surfaces"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *args; PyObject *function = PyMethod_GET_FUNCTION(method); args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); Py_INCREF(function); Py_DECREF(method); method = NULL; result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); return result; } } #endif result = __Pyx_PyObject_CallOneArg(method, arg); bad: Py_XDECREF(method); return result; } static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) { const double b = floatval; double a, result; if (likely(PyFloat_CheckExact(op1))) { a = PyFloat_AS_DOUBLE(op1); } else #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { a = (double) PyInt_AS_LONG(op1); } else #endif if (likely(PyLong_CheckExact(op1))) { #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); switch (size) { case 0: a = 0.0; break; case -1: a = -(double) digits[0]; break; case 1: a = (double) digits[0]; break; case -2: case 2: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) { if (size == -2) a = -a; break; } } case -3: case 3: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) { if (size == -3) a = -a; break; } } case -4: case 4: if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) { if (size == -4) a = -a; break; } } default: #else { #endif a = PyLong_AsDouble(op1); if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL; } } else { return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)); } PyFPE_START_PROTECT("divide", return NULL) result = a / b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); long_long: llx = lla + llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t < '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparseable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static CYTHON_INLINE PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number; int ndim = ctx->head->field->type->ndim; ; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) return PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); if (*ts != ',' && *ts != ')') return PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); if (*ts == ',') ts++; i++; } if (i != ndim) return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return NULL; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return Py_None; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_IsLittleEndian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; buf->shape = __Pyx_zeros; buf->suboffsets = __Pyx_minusones; } static CYTHON_INLINE int __Pyx_GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (buf->ndim != nd) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", nd, buf->ndim); goto fail; } if (!cast) { __Pyx_BufFmt_Context ctx; __Pyx_BufFmt_Init(&ctx, stack, dtype); if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; } if ((unsigned)buf->itemsize != dtype->size) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; fail:; __Pyx_ZeroBuffer(buf); return -1; } static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { Py_ssize_t start = *_start, stop = *_stop, length = *_length; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; else if (stop > length) stop = length; *_length = stop - start; *_start = start; *_stop = stop; } static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject* dest; Py_ssize_t length = PyList_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (unlikely(length <= 0)) return PyList_New(0); dest = PyList_New(length); if (unlikely(!dest)) return NULL; __Pyx_copy_object_array( ((PyListObject*)src)->ob_item + start, ((PyListObject*)dest)->ob_item, length); return dest; } static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject* dest; Py_ssize_t length = PyTuple_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (unlikely(length <= 0)) return PyTuple_New(0); dest = PyTuple_New(length); if (unlikely(!dest)) return NULL; __Pyx_copy_object_array( ((PyTupleObject*)src)->ob_item + start, ((PyTupleObject*)dest)->ob_item, length); return dest; } #endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); long_long: llx = lla - llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *function = PyMethod_GET_FUNCTION(method); result = __Pyx_PyObject_CallOneArg(function, self); Py_DECREF(method); return result; } } #endif result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; target->method = method; #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(PyObject_TypeCheck(method, &PyMethodDescr_Type))) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_O | METH_NOARGS); } #endif return 0; } static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *args, *result = NULL; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); #else args = PyTuple_Pack(1, self); if (unlikely(!args)) goto bad; #endif result = __Pyx_PyObject_Call(cfunc->method, args, NULL); Py_DECREF(args); bad: return result; } static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { #if CYTHON_COMPILING_IN_CPYTHON if (Py_TYPE(L) == &PySet_Type) { return PySet_Pop(L); } #endif return __Pyx_PyObject_CallMethod0(L, __pyx_n_s_pop); } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) { if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { Py_SIZE(L) -= 1; return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); } return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L); } #endif static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d); else return PyDict_Keys(d); } static CYTHON_INLINE int __Pyx_div_int(int a, int b) { int q = a / b; int r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d); else return PyDict_Values(d); } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #endif __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } #if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op2))) { const long a = intval; long x; long b = PyInt_AS_LONG(op2); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op2))) { const long a = intval; long b, x; const PY_LONG_LONG lla = intval; PY_LONG_LONG llb, llx; const digit* digits = ((PyLongObject*)op2)->ob_digit; const Py_ssize_t size = Py_SIZE(op2); if (likely(__Pyx_sst_abs(size) <= 1)) { b = likely(size) ? digits[0] : 0; if (size == -1) b = -b; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); long_long: llx = lla + llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op2)) { const long a = intval; double b = PyFloat_AS_DOUBLE(op2); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } Py_DECREF(obj); view->obj = NULL; } #endif #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject((char *)"stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { int i; if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { PyObject* v; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) goto error; } v = PyTuple_GET_ITEM(arg_tuple, i); if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) goto error; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0) { switch (s[len-1]) { case ' ': break; case '\f': case '\r': case '\n': case '\t': case '\v': PyFile_SoftSpace(f, 0); break; default: break; } } } } if (newline) { if (PyFile_WriteString("\n", f) < 0) goto error; PyFile_SoftSpace(f, 0); } Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; } #else static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { PyObject* kwargs = 0; PyObject* result = 0; PyObject* end_string; if (unlikely(!__pyx_print)) { __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); if (!__pyx_print) return -1; } if (stream) { kwargs = PyDict_New(); if (unlikely(!kwargs)) return -1; if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) goto bad; if (!newline) { end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) goto bad; if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); goto bad; } Py_DECREF(end_string); } } else if (!newline) { if (unlikely(!__pyx_print_kwargs)) { __pyx_print_kwargs = PyDict_New(); if (unlikely(!__pyx_print_kwargs)) return -1; end_string = PyUnicode_FromStringAndSize(" ", 1); if (unlikely(!end_string)) return -1; if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { Py_DECREF(end_string); return -1; } Py_DECREF(end_string); } kwargs = __pyx_print_kwargs; } result = PyObject_Call(__pyx_print, arg_tuple, kwargs); if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) Py_DECREF(kwargs); if (!result) return -1; Py_DECREF(result); return 0; bad: if (kwargs != __pyx_print_kwargs) Py_XDECREF(kwargs); return -1; } #endif #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 static int __Pyx_PrintOne(PyObject* f, PyObject *o) { if (!f) { if (!(f = __Pyx_GetStdout())) return -1; } Py_INCREF(f); if (PyFile_SoftSpace(f, 0)) { if (PyFile_WriteString(" ", f) < 0) goto error; } if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) goto error; if (PyFile_WriteString("\n", f) < 0) goto error; Py_DECREF(f); return 0; error: Py_DECREF(f); return -1; /* the line below is just to avoid C compiler * warnings about unused functions */ return __Pyx_Print(f, NULL, 0); } #else static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { int res; PyObject* arg_tuple = PyTuple_Pack(1, o); if (unlikely(!arg_tuple)) return -1; res = __Pyx_Print(stream, arg_tuple, 1); Py_DECREF(arg_tuple); return res; } #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(enum NPY_TYPES) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), little, !is_unsigned); } } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ neuron-7.5/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx000066400000000000000000000561571323325274500246520ustar00rootroot00000000000000import os import numpy import graphicsPrimitives import neuron import numpy cimport numpy import itertools import bisect cimport cython # # declare prototypes # cdef extern int find_triangles(double value0, double value1, double value2, double value3, double value4, double value5, double value6, double value7, double x0, double x1, double y0, double y1, double z0, double z1, double* out) cdef extern double llgramarea(double* p0, double* p1, double* p2) cdef extern double llpipedfromoriginvolume(double* p0, double* p1, double* p2) cdef extern from "math.h": double sqrt(double) double fabs(double) def _register_on_neighbor_map(the_map, pt, neighbor): # does not assume neighbor relations are bidirectional if pt in the_map: the_map[pt].append(neighbor) else: the_map[pt] = [neighbor] max_chunks = 10000000 cdef int total_surface_tests = 0 cdef int corner_tests = 0 @cython.boundscheck(False) @cython.wraparound(False) #cdef bint contains_surface(int i, int j, int k, objdist, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, double dx, double r_inner, double r_outer, bint reject_if_outside, bint print_reject_reason=False): def contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, reject_if_outside, bint print_reject_reason=False): cdef bint has_neg = False cdef bint has_pos = False cdef double x, y, z global total_surface_tests, corner_tests total_surface_tests += 1 # sphere tests added 2012-12-10 cdef double xbar = xs[i] + dx / 2. cdef double ybar = ys[j] + dx / 2. cdef double zbar = zs[k] + dx / 2. d = fabs(objdist(xbar, ybar, zbar)) if d <= r_inner: return True if d >= r_outer and reject_if_outside: if print_reject_reason: print 'would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)' % (xbar, ybar, zbar, d, r_outer, dx) else: return False # indeterminant from spheres; check corners corner_tests += 1 #print 'corner_tests = %d out of total_surface_tests = %d' % (corner_tests, total_surface_tests) for x in xs[i : i + 2]: for y in ys[j : j + 2]: for z in zs[k : k + 2]: d = objdist(x, y, z) if print_reject_reason: print 'at (%g, %g, %g): d = %g' % (x, y, z, d) if d <= 0: has_neg = True if d >= 0: has_pos = True if has_pos and has_neg: return True return False @cython.boundscheck(False) @cython.wraparound(False) #cdef int process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint print_values=False): def process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint store_areas=False, numpy.ndarray[numpy.float_t, ndim=3] areas=None, bint print_values=False): cdef int new_index cdef double x, y, z, x1, y1, z1 cdef list position x, y, z = xs[i], ys[j], zs[k] x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] position = [(x, y, z), (x1, y, z), (x1, y1, z), (x, y1, z), (x, y, z1), (x1, y, z1), (x1, y1, z1), (x, y1, z1)] cdef double value0, value1, value2, value3, value4, value5, value6, value7 value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position] if print_values: print '(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)' % (x, y, z, x1, y1, z1) print '%7f %7f %7f %7f %7f %7f %7f %7f' % (value0, value1, value2, value3, value4, value5, value6, value7) print 'last obj distance to position[4]: ', objects[len(objects)-1](*position[4]) print 'distance to position[4] with everything but the last object:', min([objdist(*position[4]) for objdist in objects[:len(objects)-1]]) print 'distance to position[4] with everything:', min([objdist(*position[4]) for objdist in objects[:]]) print 'last object:', objects[len(objects) - 1] print 'position[4]:', position[4] new_index = start + 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) if store_areas: areas[i, j, k] = _tri_area(tridata, start, new_index) return new_index # a matrix whose values are unambiguously outside the object big_number_matrix = numpy.zeros([4, 4, 4]) for i in range(4): for j in range(4): for k in range(4): big_number_matrix[i, j, k] = 9999 + i * 16 + j * 4 + k @cython.boundscheck(False) @cython.wraparound(False) def volume_inside_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs): cdef double x0 = xs[i], y0 = ys[j], z0 = zs[k] cdef double x1 = xs[i + 1], y1 = ys[j + 1], z1 = zs[k + 1] cdef double dx = x1 - x0, dy = y1 - y0, dz = z1 - z0 cdef numpy.ndarray[numpy.float_t, ndim=1] local_xs = numpy.array([x0 - dx, x0, x1, x0 + 2 * dx]) cdef numpy.ndarray[numpy.float_t, ndim=1] local_ys = numpy.array([y0 - dy, y0, y1, y0 + 2 * dy]) cdef numpy.ndarray[numpy.float_t, ndim=1] local_zs = numpy.array([z0 - dz, z0, z1, z0 + 2 * dz]) # big numbers unambiguously outside, no two of which are the same so (probably) no risk of dividing by zero? cdef numpy.ndarray[numpy.float_t, ndim=3] data = numpy.array(big_number_matrix) cdef double x, y, z cdef int i1, j1, k1 if not objects: print 'grr... it thinks there is surface when no nearby objects.' for i, x in zip([1, 2], [x0, x1]): for j, y in zip([1, 2], [y0, y1]): for k, z in zip([1, 2], [z0, z1]): data[i, j, k] = min([objdist(x, y, z) for objdist in objects]) # TODO: I probably don't need the 8 corner voxels # 9 doubles/tri * 5 tri/cell * 27 cells = 1215 doubles cdef numpy.ndarray[numpy.float_t, ndim=1] tridata = numpy.zeros(1215) cdef int start = 0 for i in range(3): i1 = i + 1 for j in range(3): j1 = j + 1 for k in range(3): k1 = k + 1 x, y, z = xs[i], ys[j], zs[k] x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1] value0, value1, value2, value3, value4, value5, value6, value7 = (data[i, j, k], data[i1, j, k], data[i1, j1, k], data[i, j1, k], data[i, j, k1], data[i1, j, k1], data[i1, j1, k1], data[i, j1, k1]) # TODO: if i = 0, j = k = 1, then this finds the triangles to the left (so can get area that way), etc... start += 9 * find_triangles(value0, value1, value2, value3, value4, value5, value6, value7, x, x1, y, y1, z, z1, &tridata[start]) # at this point tridata contains a triangularization that encloses the entire cell's volume tridata.resize(start, refcheck=False) return tri_volume(tridata) cdef append_with_deltas(list cell_list, int i, int j, int k): cdef int im1 = i - 1, jm1 = j - 1, km1 = k - 1, ip1 = i + 1, jp1 = j + 1, kp1 = k + 1 cell_list += [(im1, jm1, km1), (im1, jm1, k), (im1, jm1, kp1), (im1, j, km1), (im1, j, k), (im1, j, kp1), (im1, jp1, km1), (im1, jp1, k), (im1, jp1, kp1), (i, jm1, km1), (i, jm1, k), (i, jm1, kp1), (i, j, km1), (i, j, kp1), (i, jp1, km1), (i, jp1, k), (i, jp1, kp1), (ip1, jm1, km1), (ip1, jm1, k), (ip1, jm1, kp1), (ip1, j, km1), (ip1, j, k), (ip1, j, kp1), (ip1, jp1, km1), (ip1, jp1, k), (ip1, jp1, kp1)] # TODO: move this someplace else. also useful for voxelize @cython.boundscheck(False) @cython.wraparound(False) cpdef chunkify(objects, xs, ys, zs, int chunk_size, double dx): cdef int almost = chunk_size - 1 cdef int nx = (len(xs) + almost) // chunk_size cdef int ny = (len(ys) + almost) // chunk_size cdef int nz = (len(zs) + almost) // chunk_size cdef list objects_distances = [obj.distance for obj in objects] cdef int m, i, j, k # this is bigger than sqrt(3) * dx / 2 \approx 0.866, the distance from center of cube to corner cdef double max_d = dx * .87 * chunk_size # safety factor max_d *= 2 cdef list chunk_objs = [[[[] for k in range(nz)] for j in range(ny)] for i in range(nx)] # identify chunk_objs cdef int lenx = len(xs) cdef int leny = len(ys) cdef int lenz = len(zs), robj = 0 cdef double xlo, xhi, ylo, yhi, zlo, zhi cdef double bufferdx = 3 * dx # TODO: the is_skew_cone business is here because distances are not the real distances in that case; # remove it when I fix this (and will get better performance) for m, obj in enumerate(objects): is_skew_cone = isinstance(obj, graphicsPrimitives.SkewCone) objdist = obj.distance for i in range(nx): xlo, xhi = xs[i * chunk_size], xs[min((i + 1) * chunk_size - 1, lenx - 1)] chunk_objsi = chunk_objs[i] # CTNG:testbb if not obj.overlaps_x(xlo - bufferdx, xhi + bufferdx): continue for j in range(ny): ylo, yhi = ys[j * chunk_size], ys[min(leny - 1, (j + 1) * chunk_size - 1)] if not obj.overlaps_y(ylo - bufferdx, yhi + bufferdx): continue for k in range(nz): zlo, zhi = zs[k * chunk_size], zs[min(lenz - 1, (k + 1) * chunk_size - 1)] if not obj.overlaps_z(zlo - bufferdx, zhi + bufferdx): continue # CTNG:testball if is_skew_cone or objdist((xlo + xhi) * .5, (ylo + yhi) * .5, (zlo + zhi) * .5) < max_d: chunk_objsi[j][k].append(objdist) return chunk_objs, nx, ny, nz # This assumes dx = dy = dz # CTNG:constructivecubes @cython.boundscheck(False) @cython.wraparound(False) cpdef triangulate_surface(list objects, xs, ys, zs, internal_membranes): # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks cdef int chunk_size = max(10, int((len(xs) * len(ys) * len(zs) / max_chunks) ** (1 / 3.))) cdef double grid_dx = xs[1] - xs[0], grid_dy = ys[1] - ys[0], grid_dz = zs[1] - zs[0] cdef double dx = grid_dx cdef list chunk_objs cdef int nx, ny, nz chunk_objs, nx, ny, nz = chunkify(objects, xs, ys, zs, chunk_size, dx) return _triangulate_surface_given_chunks(objects, xs, ys, zs, internal_membranes, chunk_size, chunk_objs, nx, ny, nz, False, None) cpdef _triangulate_surface_given_chunks(list objects, xs, ys, zs, internal_membranes, int chunk_size, list chunk_objs, int nx, int ny, int nz, bint store_areas, areas): cdef int i, j, k, di, dj, dk cdef double area cdef double grid_dx = xs[1] - xs[0], grid_dy = ys[1] - ys[0], grid_dz = zs[1] - zs[0] # TODO: we assume a cubic mesh # assert(grid_dx == grid_dy == grid_dz) cdef double r_inner = grid_dx / 2., r_outer = r_inner * sqrt(3) cdef double dx = grid_dx cdef list cell_list cdef dict to_process = {} cdef int cell_count = 0 cdef int dup_count = 0 cdef int last_starti cdef list cell_list2 = [] cdef numpy.ndarray[numpy.float_t, ndim=1] triangles cdef int surf_count = 0 cdef dict cur_processed cdef int brute_force_count = 0 cdef list clip_objs cdef tuple cell_id cdef int new_index cdef int numcompartments # locate all the potential boundary locations triangles = numpy.zeros(1000) cdef int triangles_i = 0 cdef bint reject_if_outside for m, obj in enumerate(objects): # TODO: remove all the stuff about reject_if_outside when have true SkewCone distances reject_if_outside = not(isinstance(obj, graphicsPrimitives.SkewCone)) objdist = obj.distance clip_objs = sum([clipper.primitives for clipper in obj.get_clip()], []) cell_list = [] cur_processed = {} for i, j, k in obj.starting_points(xs, ys, zs): for di, dj, dk in itertools.product([0, -1, 1, -2, 2], [0, -1, 1, -2, 2], [0, -1, 1, -2, 2]): if contains_surface(i + di, j + dj, k + dk, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): cell_list.append((i + di, j + dj, k + dk)) break if cell_list: break else: # CTNG:systemsearch brute_force_count += 1 # TODO: we are highly unlikely to ever reach this code (happened 0 times with the neuron I tested) # can we prove we never get here? numcompartments = (4 + len(range(bisect.bisect_left(xs, obj.xlo), bisect.bisect_right(xs, obj.xhi)))) * (4 + len(range(bisect.bisect_left(ys, obj.ylo), bisect.bisect_right(ys, obj.yhi)))) * (4 + len(range(bisect.bisect_left(zs, obj.zlo), bisect.bisect_right(zs, obj.zhi)))) for i, j, k in itertools.product(xrange(bisect.bisect_left(xs, obj.xlo) - 2, bisect.bisect_right(xs, obj.xhi) + 2), xrange(bisect.bisect_left(ys, obj.ylo) - 2, bisect.bisect_right(ys, obj.yhi) + 2), xrange(bisect.bisect_left(zs, obj.zlo) - 2, bisect.bisect_right(zs, obj.zhi) + 2)): if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): cell_list.append((i, j, k)) break else: #print 'objects with no contribution to surface' pass if not internal_membranes: # CTNG:floodfill while cell_list: cell_id = cell_list.pop() if cell_id not in cur_processed: cur_processed[cell_id] = 0 i, j, k = cell_id if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): to_process[cell_id] = 0 append_with_deltas(cell_list, i, j, k) else: # TODO: is this support ever really useful? while cell_list: cell_id = cell_list.pop() if cell_id not in cur_processed: cur_processed[cell_id] = 0 i, j, k = cell_id if contains_surface(i, j, k, objdist, xs, ys, zs, grid_dx, r_inner, r_outer, reject_if_outside): if triangles_i > triangles.size - 50: triangles.resize(triangles.size * 2, refcheck=False) triangles_i = process_cell(i, j, k, [objdist], xs, ys, zs, triangles, triangles_i, store_areas=store_areas, areas=areas) append_with_deltas(cell_list, i, j, k) if internal_membranes: triangles.resize(triangles_i, refcheck=False) return triangles cur_processed = None cdef list chunk_pts = [[[[] for k in range(nz)] for j in range(ny)] for i in range(nx)] # identify chunk_pts for i, j, k in to_process.keys(): chunk_pts[i // chunk_size][j // chunk_size][k // chunk_size].append((i, j, k)) cdef int num_keys = len(to_process.keys()) cdef int missing_objs = 0 triangles = numpy.zeros(45 * num_keys) cdef int starti = 0 cdef int a, b, c cdef int extra_count cdef list obj_search # handle a chunk at a time for a in range(nx): chunk_objsa = chunk_objs[a] chunk_ptsa = chunk_pts[a] for b in range(ny): for c in range(nz): objs = chunk_objsa[b][c] cells = chunk_ptsa[b][c] if cells and not objs: # we should never get here; this is just a sanity check missing_objs += 1 continue for i, j, k in cells: last_starti = starti #starti = process_cell(i, j, k, objects_distances, xs, ys, zs, triangles, last_starti) #was objs #tri_data = list(triangles[last_starti : starti]) start_i = process_cell(i, j, k, objs, xs, ys, zs, triangles, last_starti, store_areas=store_areas, areas=areas) ''' # this an the two-above commented-out lines are for debugging to detect discrepancies between the # chunked partitioning and using all the nodes if starti - last_starti != len(tri_data) or any(tri_data != triangles[last_starti : starti]): print 'discrepancy in grid (%d, %d, %d) -- chunk_size = %d' % (i, j, k, chunk_size) # identify which object(s)... grr... """ for m in xrange(len(objects)): tri_data2 = list(triangles[last_starti : starti]) starti = process_cell(i, j, k, objs + objects_distances[: m], xs, ys, zs, triangles, last_starti) #was objs if starti - last_starti != len(tri_data2) or any(tri_data2 != triangles[last_starti : starti]): print ' missed object %d: %r' % (m, objects[m - 1]) if starti - last_starti == len(tri_data) and all(tri_data == triangles[last_starti : starti]): break else: print ' *** should never get here ***'""" ''' # some regions of the surface may yet be missing # it's possible for voxels to not contain detectable surface of any component, but # contain detectable surface for their union # to find, we look for holes in the surface and flood from them, checking against every object # TODO: could be smarter about this: at least check (enlarged) bounding boxes first last_starti = 0 cdef dict process2 pt_neighbor_map = {} cdef dict count cdef int old_start_i cdef list still_to_process, local_objs # append to the pt_neighbor_map process2 = {} count = {} for i in xrange(last_starti, starti, 9): pts = {} for j in xrange(3): pts[tuple(triangles[i + 3 * j : i + 3 * j + 3])] = 0 pts = list(pts.keys()) if len(pts) == 3: # only consider triangles of nonzero area for j in xrange(3): for k in xrange(3): if j != k: _register_on_neighbor_map(pt_neighbor_map, pts[j], pts[k]) last_starti = starti xlo, ylo, zlo = xs[0], ys[0], zs[0] # if no holes, each point should have each neighbor listed more than once for pt, neighbor_list in zip(pt_neighbor_map.keys(), pt_neighbor_map.values()): count = {} for neighbor in neighbor_list: if neighbor not in count: count[neighbor] = 1 else: count[neighbor] += 1 for neighbor, ncount in zip(count.keys(), count.values()): if ncount <= 1: # Note: this assumes (as we stated above) that dx = dy = dz for point in (pt, neighbor): i, j, k = (point[0] - xlo) // dx, (point[1] - ylo) // dx, (point[2] - zlo) // dx for di in range(-1, 2): for dj in range(-1, 2): for dk in range(-1, 2): cell_id = (i + di, j + dj, k + dk) if cell_id not in process2 and cell_id not in to_process: process2[cell_id] = 0 break still_to_process = process2.keys() #print 'len(still_to_process) = %d' % len(still_to_process) # flood on those still_to_process while still_to_process: cell_id = still_to_process.pop() # make sure we haven't already handled this voxel if cell_id not in to_process: i, j, k = cell_id old_start_i = starti local_objs = chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size] if local_objs: for m, objdist in enumerate(local_objs): if contains_surface(i, j, k, objdist, xs, ys, zs, dx, r_inner, r_outer, False): print 'item %d in grid(%d, %d, %d) contains previously undetected surface' % (m, i, j, k) for n, obj in enumerate(objects): if obj.distance == objdist: print ' (i.e. global item %d: %r)' % (n, obj) break #starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti) # was objects_distances starti = process_cell(i, j, k, local_objs, xs, ys, zs, triangles, starti, store_areas=store_areas, areas=areas) # mark it off so we know we don't visit that grid point again to_process[cell_id] = 0 if old_start_i != starti: append_with_deltas(still_to_process, i, j, k) triangles.resize(starti, refcheck=False) return triangles cpdef double tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles): return _tri_area(triangles, 0, len(triangles)) # CTNG:surfacearea @cython.boundscheck(False) @cython.wraparound(False) cpdef double _tri_area(numpy.ndarray[numpy.float_t, ndim=1] triangles, int lo, int hi): cpdef double doublearea = 0., local_area cdef int i for i in range(lo, hi, 9): local_area = llgramarea(&triangles[i], &triangles[3 + i], &triangles[6 + i]) doublearea += local_area if numpy.isnan(local_area): print 'tri_area exception: ', ', '.join([str(v) for v in triangles[i : i + 9]]) return doublearea * 0.5 @cython.boundscheck(False) @cython.wraparound(False) cpdef double tri_volume(numpy.ndarray[numpy.float_t, ndim=1] triangles): cpdef double sixtimesvolume = 0., local_vol cdef int i for i in range(0, len(triangles), 9): local_vol = llpipedfromoriginvolume(&triangles[i], &triangles[3 + i], &triangles[6 + i]) sixtimesvolume += local_vol if numpy.isnan(local_vol): print 'tri_volume exception:', for j in range(i, i + 9): print triangles[j], print return abs(sixtimesvolume / 6.) neuron-7.5/share/lib/python/neuron/rxd/geometry3d/surfaces.so000077500000000000000000055075701323325274500244630ustar00rootroot00000000000000ELF>`P@x†@8@$!ÌôÌô ¸ü¸ü%¸ü%°*1 ÐüÐü%Ðü%ððÈÈÈ$$PåtdøÚøÚøÚQåtdRåtd¸ü¸ü%¸ü%HHGNUÚl¾Ví¥6f1T>†»ÑM‡“„˜€(DT¼(„…†‡ˆ‰‹ŒŽOÊHQ¹ñ=b ÌCEÕìe©®ºã’|ÙqXc«ZåyYõÑKŒëÓ .q¾N @JéPÃß:gÌÈ– 90A®LÔ­_øúF[  ik¤‘­Ì< Úú‹y¼í6ÕœQXu¬ýX¹ð¾„ÝŒhêîi$ ·=¼”+J?ë΄ׂ¹/œÙàü2}SO5G*a ¿&s ŒÆ Í“tÏs8 •ŸÝù´ªXR"gQ µÑç$Ý‹}¥ PrŒ @Jðà–@" h'&i '&5 ¸-&) h'&æàÖÑ 0pÄ 0Kö$ àz$ €z_< àyš__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasses_PyThreadState_CurrentPyExc_StopIterationPyErr_GivenExceptionMatchesPyExc_ValueErrorPyErr_FormatPyErr_SetStringPyList_AppendPyBuffer_ReleasePyType_IsSubtypefreePyInt_TypePyInt_FromLongPyFloat_TypePyNumber_AddPyLong_TypePyNumber_InPlaceAddPyFPE_counterPyFPE_jbuf_setjmpPyExc_FloatingPointErrorPyFPE_dummyPyFloat_FromDouble__stack_chk_failPyObject_GetAttr_Py_CheckRecursionLimitPyObject_Call_Py_CheckRecursiveCallPyErr_OccurredPyExc_SystemErrorPyFrame_NewPyTraceBack_HerePyString_FromStringPyString_FromFormatPyCode_NewPyMem_ReallocPyMem_MallocPyTuple_NewPyList_New_Py_NoneStructPyImport_ImportPyExc_TypeErrorPyOS_snprintfPyErr_WarnExPyDict_NextPyString_Type_PyString_EqPyString_AsStringPyUnicodeUCS4_ComparePyNumber_SubtractPyInt_FromSsize_tPyObject_GetItemPyLong_AsDoublePyNumber_DividePySys_GetObjectPyFile_SoftSpacePyFile_WriteStringPyFile_WriteObjectPyString_SizePyExc_RuntimeErrorPyList_TypePyTuple_TypePyExc_OverflowErrorPyErr_ExceptionMatchesPyErr_ClearPyExc_NameErrorPyDict_GetItemPySlice_NewPyNumber_IndexPyInt_AsSsize_tPyLong_AsSsize_tPyModule_GetDictPyDict_NewPyObject_CallFunctionObjArgsPyErr_WriteUnraisablePyCFunction_TypePyNumber_IntPyNumber_LongPyLong_AsLongPyTraceBack_TypePyErr_NormalizeExceptionPyExc_BaseExceptionPyMethod_TypePyObject_RichCompare_Py_TrueStruct_Py_ZeroStructPyObject_IsTruePyUnicodeUCS4_FormatPyObject_GetBuffermallocPyObject_SizellpipedfromoriginvolumellgramareaPyObject_GetIter_PyString_JoinPyDict_SizePySequence_TuplePyFloat_AsDoublePyString_Formatfind_trianglesPyBaseString_TypePyUnicode_TypePySequence_ContainsPyObject_SetItemPyObject_IsInstancePyExc_ZeroDivisionErrorPyDict_SetItemPyErr_FetchPyErr_RestorePyDict_KeysPyDict_ContainsPyNumber_MultiplyPyDict_ValuesPyNumber_FloorDividePyExc_AttributeErrorPyNumber_PowerinitsurfacesPy_GetVersionPyString_FromStringAndSizePy_InitModule4_64PyImport_AddModulePyObject_SetAttrStringPyString_InternFromStringPyUnicodeUCS4_DecodeUTF8__pyx_module_is_main_neuron__rxd__geometry3d__surfacesPyTuple_PackPyCFunction_NewExPyExc_ImportErrorviputs__printf_chkedgeTabletriTablesqrtlibm.so.6libpthread.so.0libc.so.6_edata__bss_start_end/usr/lib/openmpi/libGLIBC_2.2.5GLIBC_2.3.4GLIBC_2.4þ ui O  ti [ ii g ui O ¸ü%P’Àü%’&&€ & *&ˆ &ð(& &¸(&˜ &p(&  &P,&¨ &,&À & *&È &ð(&Ð &¸(&Ø &p(&à &+& & *& &ð(& &¸(& &p(& &+&( &P,&0 &X,&8 &À*&@ &¸*&H &°*&P &Ð)&X &,&€ & )&ˆ &0+& &À+&  &¸)&¨ &(*&° &è*&À &°+&È &p+&Ð &X+&Ø &¨*&à &ð(&è &¸(&ð &p(&ø &,&& *&&*&&ø)&&H*&@&°+&H&p+&P&X+&X& *&`&ð(&h&¸(&p&p(&x&˜)&€&à)&ˆ&Ð)&&,&˜&@*&À&°+&È&p+&Ð&X+&Ø& *&à&ð(&è&¸(&ð&p(&&Ø,&& &(&Ð,&0&`&P&È,&X&`&x&À,&€& & &¸,&¨&Ø&È&°,&Ð&h &ð&¨,&ø&˜ && ,& & &@&˜,&H&* &h&,&p&[ &&ˆ,&˜&U &¸&€,&À&À&à&x,&è&@&&p,&&# &0&h,&8& &X&`,&`&°&€&X,&ˆ&ˆ &¨&P,&°&x &Ð&H,&Ø&`&ø&@,&&/ & &8,&(&˜ &H&0,&P&X &p&(,&x&à&˜& ,& & &À&,&È& &è&,&ð& &&,&& &8&,&@&Å &`&ø+&h&Ø &ˆ&ð+&&“ &°&è+&¸&H &Ø&à+&à&&&Ø+&& &(&Ð+&0&¸ &P&È+&X&° &x&À+&€&ÿ & &¸+&¨&`&È&°+&Ð&' &ð&¨+&ø&ü && +& &€&@&˜+&H& &h&+&p&à&&ˆ+&˜&O &¸&€+&À&@&à&x+&è&È &&p+&&% &0&h+&8&ù &X&`+&`&Ž &€&X+&ˆ&# &¨&P+&°&ö &Ð&H+&Ø&‰ &ø&@+&& & &8+&(&ø&H&0+&P&ó &p&(+&x&8 &˜& +& &( &À&+&È& &è&+&ð&€ &&+&&h &8&+&@&Á &`&ø*&h&Ð&ˆ&ð*&&&°&è*&¸& &Ø&à*&à& &&Ø*&&°&(&Ð*&0&¸ &P&È*&X&I &x&À*&€&ð & &¸*&¨&í &È&°*&Ð&ê &ð&¨*&ø&¨ && *& &  &@&˜*&H&ç &h&*&p&X &&ˆ*&˜&H &¸&€*&À&8 &à&x*&è& &&p*&&½ &0&h*&8&ø &X&`*&`&( &€&X*&ˆ& &¨&P*&°&C &Ð&H*&Ø&`&ø&@*&& & &8*&(&&H&0*&P&˜ &p&(*&x&ä &˜& *& & &À&*&È&ˆ &è&*&ð&= &&*&&è &8&*&@&ð&`&ø)&h& &ˆ&ð)&& &°&è)&¸&y &Ø&à)&à&7 &&Ø)&&€&(&Ð)&0&è&P&È)&X&¹ &x&À)&€&p & &¸)&¨&€ &È&°)&Ð&À&ð&¨)&ø&@&& )& &¨ &@&˜)&H&x &h&)&p&à&&ˆ)&˜&ÿ &¸&€)&À&ø &à&x)&è&ñ & &p)& &ê &0 &h)&8 &ã &X &`)&` &Ü &€ &X)&ˆ &Õ &¨ &P)&° &Î &Ð &H)&Ø &Ç &ø &@)&!& & !&8)&(!& &H!&0)&P!& &p!&()&x!&á &˜!& )& !&Þ &À!&)&È!& &è!&)&ð!&k &"&)&"&µ &8"&)&@"&± &`"&ø(&h"&À &ˆ"&ð(&"&Û &°"&è(&¸"& &Ø"&à(&à"&Ø &#&Ø(&#&Õ &(#&Ð(&0#&f &P#&È(&X#&­ &x#&À(&€#&© & #&¸(&¨#&Ò &È#&°(&Ð#& &ð#&¨(&ø#&Ï &$& (& $&Ì &@$&˜(&H$&a &h$&(&p$&1 &$&ˆ(&˜$&¥ &¸$&€(&À$&¡ &à$&x(&è$& &%&p(&%&É &`%&­}h%&ÀÙ€%&Ý}ˆ%&3 %&°”¨%&À%&<}È%& à%&;}è%&&&U~&&àþ@&&¶}H&&pQ`&&V}h&&ði€&&‚}ˆ&& „ &&“}¨&&@«È&&p*&'&`~Àþ%Èþ%ˆÐþ% Øþ% àþ% èþ% ðþ%øþ%†ÿ%ÿ%ÿ%ÿ%# ÿ%*(ÿ%+0ÿ%08ÿ%1@ÿ%>Hÿ%@Pÿ%AXÿ%C`ÿ%Ehÿ%‹pÿ%Mxÿ%N€ÿ%Qˆÿ%Rÿ%[˜ÿ%\ ÿ%a¨ÿ%b°ÿ%e¸ÿ%fÀÿ%hÈÿ%lÐÿ%nØÿ%oàÿ%tèÿ%uðÿ%xøÿ%€& &(&0&8&@&H& P&X&`&h&p&x&€&ˆ&&˜& &¨&°&¸&À& È&!Ð&"Ø&$à&%è&&ð&'ø&(&)&,&-&. &/(&20&38&4@&5H&6P&7X&8`&9h&:p&;x&<€&=ˆ&?&B˜&D &F¨&G°&H¸&IÀ&JÈ&KÐ&LØ&Oà&Pè&Sð&Tø&U&V&W&X&Y &Z(&]0&^8&_@&`H&cP&dX&g`&ih&jp&kx&m€&pˆ&q&r˜&s &v¨&w°&y¸&zÀ&{È&|Ð&}Ø&~à&è&ð&‚ø&ƒHƒìH‹µ%H…ÀtèûHƒÄÃÿ5¢µ%ÿ%¤µ%@ÿ%¢µ%héàÿÿÿÿ%šµ%héÐÿÿÿÿ%’µ%héÀÿÿÿÿ%е%hé°ÿÿÿÿ%‚µ%hé ÿÿÿÿ%zµ%héÿÿÿÿ%rµ%hé€ÿÿÿÿ%jµ%hépÿÿÿÿ%bµ%hé`ÿÿÿÿ%Zµ%h éPÿÿÿÿ%Rµ%h é@ÿÿÿÿ%Jµ%h é0ÿÿÿÿ%Bµ%h é ÿÿÿÿ%:µ%h éÿÿÿÿ%2µ%héÿÿÿÿ%*µ%héðþÿÿÿ%"µ%héàþÿÿÿ%µ%héÐþÿÿÿ%µ%héÀþÿÿÿ% µ%hé°þÿÿÿ%µ%hé þÿÿÿ%ú´%héþÿÿÿ%ò´%hé€þÿÿÿ%ê´%hépþÿÿÿ%â´%hé`þÿÿÿ%Ú´%héPþÿÿÿ%Ò´%hé@þÿÿÿ%Ê´%hé0þÿÿÿ%´%hé þÿÿÿ%º´%héþÿÿÿ%²´%héþÿÿÿ%ª´%héðýÿÿÿ%¢´%h éàýÿÿÿ%š´%h!éÐýÿÿÿ%’´%h"éÀýÿÿÿ%Š´%h#é°ýÿÿÿ%‚´%h$é ýÿÿÿ%z´%h%éýÿÿÿ%r´%h&é€ýÿÿÿ%j´%h'épýÿÿÿ%b´%h(é`ýÿÿÿ%Z´%h)éPýÿÿÿ%R´%h*é@ýÿÿÿ%J´%h+é0ýÿÿÿ%B´%h,é ýÿÿÿ%:´%h-éýÿÿÿ%2´%h.éýÿÿÿ%*´%h/éðüÿÿÿ%"´%h0éàüÿÿÿ%´%h1éÐüÿÿÿ%´%h2éÀüÿÿÿ% ´%h3é°üÿÿÿ%´%h4é üÿÿÿ%ú³%h5éüÿÿÿ%ò³%h6é€üÿÿÿ%ê³%h7épüÿÿÿ%â³%h8é`üÿÿÿ%Ú³%h9éPüÿÿÿ%Ò³%h:é@üÿÿÿ%ʳ%h;é0üÿÿÿ%³%h<é üÿÿÿ%º³%h=éüÿÿÿ%²³%h>éüÿÿÿ%ª³%h?éðûÿÿÿ%¢³%h@éàûÿÿÿ%š³%hAéÐûÿÿÿ%’³%hBéÀûÿÿÿ%г%hCé°ûÿÿÿ%‚³%hDé ûÿÿÿ%z³%hEéûÿÿÿ%r³%hFé€ûÿÿÿ%j³%hGépûÿÿÿ%b³%hHé`ûÿÿÿ%Z³%hIéPûÿÿÿ%R³%hJé@ûÿÿÿ%J³%hKé0ûÿÿÿ%B³%hLé ûÿÿÿ%:³%hMéûÿÿÿ%2³%hNéûÿÿÿ%*³%hOéðúÿÿÿ%"³%hPéàúÿÿÿ%³%hQéÐúÿÿÿ%³%hRéÀúÿÿÿ% ³%hSé°úÿÿÿ%³%hTé úÿÿÿ%ú²%hUéúÿÿÿ%ò²%hVé€úÿÿÿ%ê²%hWépúÿÿÿ%â²%hXé`úÿÿÿ%Ú²%hYéPúÿÿÿ%Ò²%hZé@úÿÿÿ%ʲ%h[é0úÿÿÿ%²%h\é úÿÿÿ%º®%fÿ%º®%fÿ%ú®%fÿ%’¯%fAWAVDzÿAUATA‰ÕUS^ÿA‰ÎDaÿHìØHÿHcÛH‰¼$˜H‰ß‰t$è$þÿÿH…À„ÜMcÿH‰ÅL‰ÿè þÿÿH…ÀH‰$„‘IcÄH‰ÇH‰„$ èíýÿÿH…ÀI‰Ä„E¿èwüÿÿH…ÀH‰„$„úH‹<$L‰`(H‰hH‰x H‰ßè®ýÿÿH…ÀI‰Ä„šL‰ÿèšýÿÿH…ÀH‰$„IIcÆH‰ÇH‰„$¸èzýÿÿH…ÀH‰Å„î¿èüÿÿH…ÀH‰„$ˆ„—H‹<$H‰h(L‰`H‰x H‰ßè;ýÿÿH…ÀH‰Å„}L‰ÿè'ýÿÿH…ÀH‰$„ AÿÆIcÆH‰ÇH‰„$¨èýÿÿH…ÀI‰Ä„¹¿èŽûÿÿH…ÀH‰„$€„VH‹<$L‰`(H‰hH‰x H‰ßèÅüÿÿH…ÀI‰Ä„ÞIcÅH‰ÇH‰„$Àè¦üÿÿH…ÀH‰$„jH‹¼$ èŒüÿÿH…ÀH‰Å„ý¿èûÿÿH…ÀH‰D$x„‘H‹<$H‰h(L‰`H‰x H‰ßèPüÿÿH…ÀH‰Å„|Icýè<üÿÿH…ÀH‰$„ H‹¼$¸è"üÿÿH…ÀI‰Ä„—¿è¬úÿÿH…ÀH‰D$p„"H‹<$L‰`(H‰hH‰x H‰ßèæûÿÿH…ÀI‰Ä„˜IcýèÒûÿÿH…ÀH‰$„H‹¼$¨è¸ûÿÿH…ÀH‰Å„ž¿èBúÿÿH…ÀH‰D$h„ H‹<$H‰h(L‰`H‰x H‰ßè|ûÿÿH…ÀH‰Å„AÿÅIcÅH‰ÇH‰„$°èZûÿÿH…ÀH‰$„tH‹¼$ è@ûÿÿH…ÀI‰Ä„ï¿èÊùÿÿH…ÀH‰D$`„hH‹<$L‰`(H‰hH‰x H‰ßèûÿÿH…ÀI‰Ä„ÌH‹¼$°èëúÿÿH…ÀH‰$„:H‹¼$¸èÑúÿÿH…ÀH‰Å„©¿è[ùÿÿH…ÀH‰D$X„H‹<$H‰h(L‰`H‰x H‰ßè•úÿÿH…ÀH‰Å„H‹¼$°è|úÿÿH…ÀH‰$„iH‹¼$¨èbúÿÿH…ÀI‰Ä„Ò¿èìøÿÿH…ÀH‰D$P„9Hc\$H‹<$L‰`(H‰hH‰x H‰ßè!úÿÿH…ÀI‰Ä„†L‰ÿè úÿÿH…ÀH‰$„çH‹¼$ èóùÿÿH…ÀH‰Å„D ¿è}øÿÿH…ÀH‰D$H„¢ H‹<$H‰h(L‰`H‰x H‰ßè·ùÿÿH…ÀH‰Å„ˆ L‰ÿè£ùÿÿH…ÀH‰$„à H‹¼$¸è‰ùÿÿH…ÀI‰Ä„7!¿èøÿÿH…ÀH‰D$@„Œ!H‹<$L‰`(H‰hH‰x H‰ßèMùÿÿH…ÀI‰Ä„Ì!L‰ÿè9ùÿÿH…ÀH‰$„"H‹¼$¨èùÿÿH…ÀH‰Å„f"¿è©÷ÿÿH…ÀH‰D$8„²"H‹<$H‰h(L‰`H‰x H‰ßèãøÿÿH…ÀH‰Å„"H‹¼$ÀèÊøÿÿH…ÀH‰$„Þ"H‹¼$ è°øÿÿH…ÀI‰Ä„##¿è:÷ÿÿH…ÀH‰D$0„f#H‹<$L‰`(H‰hH‰x H‰ßètøÿÿH…ÀI‰Ä„”#H‹¼$Àè[øÿÿH…ÀH‰$„Ì#H‹¼$¨èAøÿÿH…ÀH‰Å„$¿èËöÿÿH…ÀH‰D$(„?$H‹<$H‰h(L‰`H‰x H‰ßèøÿÿH…ÀH‰Å„%$H‹¼$°èì÷ÿÿH…ÀH‰$„T$H‹¼$ èÒ÷ÿÿH…ÀI‰Ä„‡$¿è\öÿÿH…ÀH‰D$ „¸$H‹$L‰`(H‰ßH‰hH‰P è–÷ÿÿH…ÀI‰Ä„Ô$H‹¼$°è}÷ÿÿH…ÀH‰$„ú$H‹¼$¸èc÷ÿÿH…ÀH‰Å„!%¿èíõÿÿH…ÀH‰D$„I%H‹4$H‰h(H‰ßL‰`H‰p è'÷ÿÿH…ÀH‰Å„,%H‹¼$°è÷ÿÿH…ÀH‰$„I%H‹¼$¨èôöÿÿH…ÀI‰Ä„j%¿è~õÿÿH…ÀH‰D$„‰%H‹$L‰`(H‰hH‰X ‹\$ÿÃHcÛH‰ßè¯öÿÿH…ÀI‰Ä„Š%L‰ÿè›öÿÿH…ÀH‰$„£%H‹¼$ èöÿÿH…ÀH‰Å„¸%¿è õÿÿH…ÀH‰D$„Î%H‹<$H‰h(L‰`H‰x H‰ßèEöÿÿH…ÀH‰Å„±%L‰ÿè1öÿÿH…ÀH‰$„Á%H‹¼$¸èöÿÿH…ÀI‰Ä„Ð%¿è¡ôÿÿH…ÀI‰Æ„ß%H‰hH‹$H‰ßM‰f(I‰F èÝõÿÿH…ÀI‰Ä„Ý%L‰ÿèÉõÿÿH…ÀH‰$„ê%H‹¼$¨è¯õÿÿH…ÀH‰Å„ó%¿è9ôÿÿH…ÀI‰Å„ÿ%L‰`H‹$H‰ßI‰m(I‰E èuõÿÿH…ÀH‰Å„â%H‹¼$Àè\õÿÿH…ÀH‰$„ç%H‹¼$ èBõÿÿH…ÀI‰Ä„ð%¿èÌóÿÿH…ÀI‰Ç„ù%H‰hH‹$H‰ßM‰g(I‰G èõÿÿH…ÀI‰Ä„ñ%H‹¼$ÀèïôÿÿH…ÀH‰$„ó%H‹¼$¸èÕôÿÿH…ÀH‰Å„ö%¿è_óÿÿH…ÀI‰Â„ü%L‰`H‹$H‰ßI‰j(L‰$I‰B è—ôÿÿH…ÀH‰ÅL‹$„×%H‹¼$ÀL‰”$ÈèrôÿÿH…ÀH‰$L‹”$È„Æ%H‹¼$¨L‰”$ÀèHôÿÿH…ÀI‰ÄL‹”$À„¹%¿èÊòÿÿH…ÀI‰ÁL‹”$À„´%H‰hH‹$H‰ßM‰a(L‰ $I‰A èúóÿÿH…ÀI‰ÄL‹ $L‹”$À„–%H‹¼$°L‰Œ$ÈèÍóÿÿH…ÀH‰$L‹”$ÀL‹Œ$È„z%H‹¼$ è£óÿÿH…ÀH‰ÅL‹”$ÀL‹Œ$È„g%¿L‰Œ$ÀL‰”$ è òÿÿH…ÀI‰ÀL‹”$ L‹Œ$À„G%L‰`H‹$H‰ßI‰h(L‰$I‰@ è5óÿÿH…ÀH‰ÅL‹$L‹”$ L‹Œ$À„%H‹¼$°L‰„$ÈèóÿÿH…ÀH‰$L‹”$ L‹Œ$ÀL‹„$È„÷$H‹¼$¸èÎòÿÿH…ÀI‰ÄL‹”$ L‹Œ$ÀL‹„$È„Ü$¿L‰„$ÀL‰Œ$¸è0ñÿÿH…ÀH‰ÁL‹”$ L‹Œ$¸L‹„$À„±$H‰hH‹$H‰ßL‰a(H‰ $H‰A èPòÿÿH…ÀI‰ÄH‹ $L‹”$ L‹Œ$¸L‹„$À„~$H‹¼$°H‰Œ$ÈèòÿÿH…ÀH‰$L‹”$ L‹Œ$¸L‹„$ÀH‹Œ$È„M$H‹¼$¨H‰Œ$ÀL‰„$¸L‰Œ$°èÁñÿÿH…ÀH‰ÅL‹”$ L‹Œ$°L‹„$¸H‹Œ$À„ $¿H‰Œ$¸L‰„$°L‰Œ$¨èðÿÿH…ÀH‰ÃL‹”$ L‹Œ$¨L‹„$°H‹Œ$¸„Ð#L‰`H‹$¿H‰k(H‰C èýìÿÿH…ÀH‰ÅL‹”$ L‹Œ$¨L‹„$°H‹Œ$¸„™#H‹@H‹”$H‹´$ˆH‹¼$€H‰H‹EH‹T$xH‰pH‹EH‹t$pH‰xH‹EH‹|$hH‰PH‹EH‹T$`H‰p H‹EH‹t$XH‰x(H‹EH‹|$PH‰P0H‹EH‹T$HH‰p8H‹EH‹t$@H‰x@H‹EH‰PHH‹EH‰pPH‹EH‹|$8H‹T$0H‹t$(H‰xXH‹EH‹|$ H‰P`H‹EH‹T$H‰phH‹EH‹t$H‰xpH‹EH‹|$H‰PxH‹EH‰°€H‹EH‰îH‰¸ˆH‹EL‰°H‹EL‰¨˜H‹EL‰¸ H‹EL‰¨H‹EL‰ˆ°H‹EL‰€¸H‹EH‹¼$˜H‰ˆÀH‹EH‰˜Èè!ñÿÿH…ÀH‰Ã„<"HÿMu H‹EH‰ïÿP0H‹„$˜H‹Œ$˜H‹H‰$HÿÈH…ÀH‰u H‹AH‰ÏÿP0H‹ %H‰œ$˜HÿH‰Ãéœ-¾Wº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆHÇ„$éQ#¾Yº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆHÇ„$é!¾[º¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆHÇ„$éG ¾]º¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆéƒ¾hº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆé& ¾jº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆéø¾lº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆé¨¾néx¾yº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€éܾ{º¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€éº¾}º¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€é¾º¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xéV¾Šº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$x龌º¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xéû¾Žº¯1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xéþº¯éS¾£º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pé¾¥º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$péú¾§º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$péW¾©º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hé½¾´º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$h銾¶º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$h醾¸º°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hé`¾ºé*¾Åº°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`黾Ǻ°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`éÀ¾Éº°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`é/¾Ëº°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$Xé§¾Öº°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$X醾غ°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$X锾ں°1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$X逾ܺ°é ¾ïº±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$Péè¾ñº±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$Péÿ¾óº±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$P逾õº±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$Hé ¾º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$Héû¾º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$H龺±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$Hé ¾é⾺±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@é˜ ¾º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0HÇD$8HÇD$@éÁ ¾º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@éT ¾º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8éð ¾"º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8éó ¾$º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8é% ¾&º±1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8é5 ¾(º±éþ;º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0éÁ ¾=º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1äHÇD$(HÇD$0éü¾?º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(HÇD$0顾Aº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(éO¾Lº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(éd ¾Nº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(騾Pº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ HÇD$(éʾRéš¾]º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ ém¾_º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ E1ä麾aº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$HÇD$ éq¾cº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$é1¾nº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$éX¾pº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$鮾rº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$HÇD$éâ¾tëv¾º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$éš¾º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$E1äéù¾ƒº²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$é¾…º²1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$锾˜º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$é;šº³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$é5¾œº³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$é{¾žëR¾©º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öéE¾«º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öE1äé¶¾­º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íE1ö鑾¯º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íéo¾ºº³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íé´¾¼º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íé(¾¾º³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1íéz¾ÀëF¾Ëº³1Û1ÉE1ÀE1ÉE1ÒE1ÿéJ¾Íº³1Û1ÉE1ÀE1ÉE1ÒE1ÿE1äéÁ¾Ïº³1Û1ÉE1ÀE1ÉE1ÒE1ÿ颾Ѻ³1Û1ÉE1ÀE1ÉE1Ò醾亴1Û1ÉE1ÀE1ÉE1ÒéѾ溴1Û1ÉE1ÀE1ÉE1ÒéK¾èº´1Û1ÉE1ÀE1ÉE1Ò飾êë:¾õº´1Û1ÉE1ÀE1Ééy¾÷º´1Û1ÉE1ÀE1ÉE1äéö¾ùº´1Û1ÉE1ÀE1Ééݾûº´1Û1ÉE1ÀéǾº´1Û1ÉE1À龺´1Û1ÉE1À阾 º´1Û1ÉE1Àéö¾ º´1Û1Éér¾º´1Û1É鯾º´1Û1ÉE1äéI¾º´1Û1Éé6¾º´1Ûé%¾0ºµ1Ûé{¾2ºµ1Ûé¾4ºµ1Ûéc¾6ºµéã¾Iº¯é;¾™º¯1ÉE1ÀE1ÉE1ÒE1ÿE1íE1öHÇD$HÇD$E1äHÇD$HÇD$ HÇD$(HÇD$0HÇD$8HÇD$@HÇD$HHÇD$PHÇD$XHÇD$`HÇD$hHÇD$pHÇD$xHÇ„$€HÇ„$ˆHÇ„$HÇ$H…ítlHÿMufH‹E‰´$ÈH‰ï‰”$ÀH‰Œ$¸L‰„$°L‰Œ$¨L‰”$ ÿP0‹´$È‹”$ÀH‹Œ$¸L‹„$°L‹Œ$¨L‹”$ Hƒ<$„H‹$H‹<$H‹H‰„$ HÿÈH…ÀH‰ucH‹G‰´$ȉ”$ÀH‰Œ$¸L‰„$°L‰Œ$¨L‰”$ ÿP0‹´$È‹”$ÀH‹Œ$¸L‹„$°L‹Œ$¨L‹”$ M…äteIÿ $u_I‹D$‰´$ÀL‰ç‰”$¸H‰Œ$°L‰„$¨L‰Œ$ L‰$ÿP0‹´$À‹”$¸H‹Œ$°L‹„$¨L‹Œ$ L‹$Hƒ¼$t}H‹„$H‹¼$H‹H‰$HÿÈH…ÀH‰u[H‹G‰´$À‰”$¸H‰Œ$°L‰„$¨L‰Œ$ L‰$ÿP0‹´$À‹”$¸H‹Œ$°L‹„$¨L‹Œ$ L‹$Hƒ¼$ˆt}H‹„$ˆH‹¼$ˆH‹H‰$HÿÈH…ÀH‰u[H‹G‰´$¸‰”$°H‰Œ$¨L‰„$ L‰Œ$L‰$ÿP0‹´$¸‹”$°H‹Œ$¨L‹„$ L‹Œ$L‹$Hƒ¼$€t}H‹„$€H‹¼$€H‹H‰$HÿÈH…ÀH‰u[H‹G‰´$°‰”$¨H‰Œ$ L‰„$L‰Œ$ˆL‰$ÿP0‹´$°‹”$¨H‹Œ$ L‹„$L‹Œ$ˆL‹$Hƒ|$xtwH‹D$xH‹|$xH‹H‰$HÿÈH…ÀH‰u[H‹G‰´$¨‰”$ H‰Œ$L‰„$ˆL‰Œ$€L‰$ÿP0‹´$¨‹”$ H‹Œ$L‹„$ˆL‹Œ$€L‹$Hƒ|$ptqH‹D$pH‹|$pH‹H‰$HÿÈH…ÀH‰uUH‹G‰´$ ‰”$H‰Œ$ˆL‰„$€L‰L$xL‰$ÿP0‹´$ ‹”$H‹Œ$ˆL‹„$€L‹L$xL‹$Hƒ|$htkH‹D$hH‹|$hH‹H‰$HÿÈH…ÀH‰uOH‹G‰´$‰”$ˆH‰Œ$€L‰D$xL‰L$pL‰$ÿP0‹´$‹”$ˆH‹Œ$€L‹D$xL‹L$pL‹$Hƒ|$`teH‹D$`H‹|$`H‹H‰$HÿÈH…ÀH‰uIH‹G‰´$ˆ‰”$€H‰L$xL‰D$pL‰L$hL‰$ÿP0‹´$ˆ‹”$€H‹L$xL‹D$pL‹L$hL‹$Hƒ|$Xt_H‹D$XH‹|$XH‹H‰$HÿÈH…ÀH‰uCH‹G‰´$€‰T$xH‰L$pL‰D$hL‰L$`L‰$ÿP0‹´$€‹T$xH‹L$pL‹D$hL‹L$`L‹$Hƒ|$PtYH‹D$PH‹|$PH‹H‰$HÿÈH…ÀH‰u=H‹G‰t$x‰T$pH‰L$hL‰D$`L‰L$XL‰$ÿP0‹t$x‹T$pH‹L$hL‹D$`L‹L$XL‹$Hƒ|$HtYH‹D$HH‹|$HH‹H‰$HÿÈH…ÀH‰u=H‹G‰t$p‰T$hH‰L$`L‰D$XL‰L$PL‰$ÿP0‹t$p‹T$hH‹L$`L‹D$XL‹L$PL‹$Hƒ|$@tYH‹D$@H‹|$@H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$h‰T$`H‰L$XL‰D$PL‰L$HL‰$ÿP0‹t$h‹T$`H‹L$XL‹D$PL‹L$HL‹$Hƒ|$8tYH‹D$8H‹|$8H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$`‰T$XH‰L$PL‰D$HL‰L$@L‰$ÿP0‹t$`‹T$XH‹L$PL‹D$HL‹L$@L‹$Hƒ|$0tYH‹D$0H‹|$0H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$X‰T$PH‰L$HL‰D$@L‰L$8L‰$ÿP0‹t$X‹T$PH‹L$HL‹D$@L‹L$8L‹$Hƒ|$(tYH‹D$(H‹|$(H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$P‰T$HH‰L$@L‰D$8L‰L$0L‰$ÿP0‹t$P‹T$HH‹L$@L‹D$8L‹L$0L‹$Hƒ|$ tYH‹D$ H‹|$ H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$H‰T$@H‰L$8L‰D$0L‰L$(L‰$ÿP0‹t$H‹T$@H‹L$8L‹D$0L‹L$(L‹$Hƒ|$tYH‹D$H‹|$H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$@‰T$8H‰L$0L‰D$(L‰L$ L‰$ÿP0‹t$@‹T$8H‹L$0L‹D$(L‹L$ L‹$Hƒ|$tYH‹D$H‹|$H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$8‰T$0H‰L$(L‰D$ L‰L$L‰$ÿP0‹t$8‹T$0H‹L$(L‹D$ L‹L$L‹$Hƒ|$tYH‹D$H‹|$H‹H‰$HÿÈH…ÀH‰u=H‹G‰t$0‰T$(H‰L$ L‰D$L‰L$L‰$ÿP0‹t$0‹T$(H‹L$ L‹D$L‹L$L‹$M…ötEIÿu@I‹F‰t$(L‰÷‰T$ H‰L$L‰D$L‰L$L‰$ÿP0‹t$(‹T$ H‹L$L‹D$L‹L$L‹$M…ítFIÿMu@I‹E‰t$(L‰ï‰T$ H‰L$L‰D$L‰L$L‰$ÿP0‹t$(‹T$ H‹L$L‹D$L‹L$L‹$M…ÿtEIÿu@I‹G‰t$(L‰ÿ‰T$ H‰L$L‰D$L‰L$L‰$ÿP0‹t$(‹T$ H‹L$L‹D$L‹L$L‹$M…Òt;Iÿ u6I‹B‰t$ L‰×‰T$H‰L$L‰D$L‰ $ÿP0‹t$ ‹T$H‹L$L‹D$L‹ $M…Ét1Iÿ u,I‹A‰t$L‰Ï‰T$H‰L$L‰$ÿP0‹t$‹T$H‹L$L‹$M…Àt'Iÿu"I‹@‰t$L‰Ç‰T$H‰ $ÿP0‹t$‹T$H‹ $H…ÉtHÿ uH‹A‰t$H‰Ï‰$ÿP0‹t$‹$H…ÛtHÿ uH‹C‰t$H‰ß‰$ÿP0‹t$‹$H ¡þH=Âþ1Ûè#H‹„$˜H‹Œ$˜H‹H‰$HÿÈH…ÀH‰u H‹AH‰ÏÿP0HÄØH‰Ø[]A\A]A^A_ÃSHÿH‰óuH‹GÿP0H‹«q%H5”þH‰ÚH‹81Àè‡ÁÿÿƒÈÿ[ÃHƒì(dH‹%(H‰D$1ÀH‹FH;ãq%u.H‹FH‰ÂHÂ'yH1Ðx H‰×èôÀÿÿëTH‹Ãq%H‹@`ÿëEH;q%u7H‹ãq%òNHÇ$'òL$‹H…À‰ u,H‹=þp%èù¾ÿÿ…ÀuRëè&ÂÿÿH‹L$dH3 %(tb詽ÿÿòH*$òXD$H|$òD$è}½ÿÿò,ÀH‹rq%òD$)èU¾ÿÿëµH‹ìp%H5®íH‹8è½ÿÿH‹Fq%Ç1ÀëŽHƒÄ(ÃHƒì(dH‹%(H‰D$1ÀH‹GH;Øp%u.H‹OH‰ÈH)ÐH1ÁyH1Ây H‰Çèê¿ÿÿëQH‹¹p%H‹@`ÿPëAH;ùo%u3H‹ Øp%òWH‰$òT$‹p…À‰1u,H‹=÷o%èò½ÿÿ…ÀuVëèwÀÿÿH‹L$dH3 %(tf袼ÿÿòL$òH*$H|$ò\ÈòL$èr¼ÿÿò,ÀH‹gp%òD$)èJ½ÿÿë±H‹áo%H5¿ìH‹8肼ÿÿH‹;p%Ç1ÀëŠHƒÄ(ÃH…öUSH‰ýQyHwH;u}H‰ðHƒèx H‹EH‹ðHÿë?H‰÷èi¼ÿÿH…ÀH‰Ãt/H‰ïH‰ÆèF¼ÿÿH‰ÅH‹HPÿH…ÒH‰uH‹CH‰ßH‰ëÿP0ëH‰ëH‰ØZ[]ÃUSH…öAPH‹GH0x H9ðH‰óHNØH…Û Y[]1ÿéQºÿÿH‰ýH‰ßèFºÿÿH‰Á1ÀH…Ét H‹yH‹u1ÒH‹ÖH‰×HÿÂHÿH9ÓuíH‰ÈZ[]ÃUSH‰ýQHƒ=R–%uAH‹9–%H‹=*–%H‹0è’ H…Àu1íëiH‰*–%H‹@ H‹PH‰–%‹@ƒà‰–%¿è¼ÿÿH…ÀH‰ÃtÈHÿEH‰h1ÒH‹=ì•%H‰Æèl H‹ H‰ÅHQÿH…ÒH‰u H‹CH‰ßÿP0H‰èZ[]ÃH‹W H‹GHÑúH9Ð=H‹¢•%H…Àt,‹§•%ƒúu1öÿàƒúu 1ÒH‹5Hœ%ÿàÿÊu H‹5;œ%ÿàéÿÿÿH‹WHÿÈH‰GH‹ÂÃf.„fH=á•%Há•%UH)øH‰åHƒøvH‹>m%H…Àt ]ÿàfD]Ã@f.„H=¡•%H5š•%UH)þH‰åHÁþH‰ðHÁè?HÆHÑþtH‹ém%H…Àt ]ÿàf„]Ã@f.„€=i•%u'Hƒ=Ïm%UH‰åt H‹=Òp%è%¾ÿÿèHÿÿÿ]Æ@•%óÃ@f.„H=qj%Hƒ?u é^ÿÿÿfDH‹1m%H…ÀtéUH‰åÿÐ]é@ÿÿÿ@€ÿs‡VH×ë@¶×HcHÐÿàfHYèÄHÜèHJé…öHDÂÃH¼èHCé…öHDÂÃHµèHé…öHDÂÃH&èÃH7èÄH<èÄH¤èÄH3èÄHèÄH¾çÄHÆçÄHÍçÄHÓçÄHèÄHèÄH¿çÄHãçÄH0çÄHñçÄA‰ðAƒèxWIcȉðHÁá9|C1öE…Àu ë@~8pD9Æ}&D‰À)ð‰ÁÁéÈÑøðHcÈHÁá‹ 9Ê}ØA‰ÀD9Æ|Ú1ö9Ê@ŸÆðóÃ@‹1À1ö9Ê@ŸÆðëêAUATUSHƒìH‹Çj%H‹H‹kHH…íu1ÀHƒÄ[]A\A]ÃfDH‹!k%H‹0H9õumL‹kPL‹cXHÇCHHÇCPHÇCXHƒmt*M…ítIƒmt.M…ät¦Iƒ,$uŸI‹D$L‰çÿP0ë’DH‹EH‰ïÿP0ëÊ@I‹EL‰ïÿP0ëÆH‰ïèì¶ÿÿ…Àu‡¸ÿÿÿÿé]ÿÿÿ@f.„HƒìL‹GM…Àt{M‹I9ùtC‹w@¾Dè/ýÿÿI‹PðH5¬ôH‹ I‹M‹IH‹L‹H‰ÁH‹ªi%H‹81ÀHƒÄ錹ÿÿ@H‹LtæH‹‹w@¾DèßüÿÿH5(ôI‰ÁM‰ÐL‰Òë¼DL©æH æëÍ„GÁHƒì<4weH Vê¶ÀHcHÁÿáf¸HƒÄÃfD¸HƒÄÃfD¸HƒÄÃfD¸HƒÄÃfD¸HƒÄÃfDH‹Ùh%@¾×H5öóH‹81Àè´¸ÿÿ1ÀHƒÄÃf.„¶wD1À@„ö„ßAWAVAUATUSH‰ýHƒì(H‹GH‹H‹:Hƒ„ó@€þs„±@€þp„§D¶EGE1ÉE„À„Þ‹OX…ɎȃéHWA½HLÏ f„L¯*HƒÂH9ÑuóÆEGHÇE0V¾‹}@€ú1‡ŽH íé¶ÒHc‘HÑÿáDHƒ}0HÇE…&ÆEDÇE@1ÀHƒÄ([]A\A]A^A_óÃXH‹M0A¹A”ÀDˆEGH‹H‹:H‹WH9Ñ„8ÿÿÿH5èòéíA½éfÿÿÿA‰ôH‹¶EFIMÿL=ðêL5êH‰L$H‹ <@„i<^„`FÁ<4‡]¶ÀIc†LðÿàA¹f.„H‹Q¶A\L9Ê„¿ªÿÿH…ÀI‰Ç„~ýÿÿH‰C‹%‹5‹%IcõHÁæ‰,‹%LþA9ʼnD$Œÿÿÿé=ÿÿÿIÁåK4/é-ÿÿÿH‹~L‰fHƒ/…-ýÿÿH‹GÿP0é!ýÿÿDI‹EL‰ïÿP0éQþÿÿI‹FL‰÷ÿP0éKþÿÿ¿趬ÿÿH…À„éüÿÿH‰®Š%Ç Š%@Ç’Š%D‰0L‰`Iƒ$é½üÿÿHƒìH‹¾HЀù wIHJ¾Rƒè0rÐ@€þw!f.„€HƒÁDBоrÐ@€þvéƒøÿH‰t HƒÄÃ@¶¾ÐH‹»[%H5ÔèH‹81Àèš«ÿÿ¸ÿÿÿÿHƒÄÃAWAVI‰ÿAUATH‰ðUSHÙßH½>Hƒì8dH‹<%(H‰|$(1ÿH|$Ld$ H‰t$H‰|$¶€ù}wG¶ÑHc“HÚÿâD9t$…U„É„'AÆGGIÇG(HƒÀH‰D$¶€ù}vÀ€H‹|$èÞþÿÿƒøÿ„\H˜I‰G(H‹D$ë‘„E1öL‰ÿè%òÿÿƒøÿ„3I‹G(I‰G0A¶GEAˆGFH‹D$¶HƒÀE‰w@H‰D$IÇG(AˆWDé>ÿÿÿDE1öA8ODuªE;w@u¤A¶EA8Fu™HƒÀI‹W(IÇG(IW0H‰D$éÿÿÿ„A€Dt Iƒ„L‰ÿè†ñÿÿƒøÿ„”Iƒ…úH‹D$é„L‰ÿèXñÿÿƒøÿ„fI‹G(IG A¶GEIÇG(IÇG0AÆGDAˆGFH‹D$HƒÀH‰D$éoþÿÿfDHƒÀL‰ÿI‹_8H‰D$èûðÿÿƒøÿ„ H…ÛAÆGD„rÿÿÿI‹O 1ÒH‰ÈH÷óH…Ò„]ÿÿÿHÙH)ÑI‰O éNÿÿÿHƒÀAÆGE=H‰D$éþÿÿDHPH‰T$¶HAš<v €ùd…ÕH‰ÐA¾é þÿÿDHPM‹w(IÇG(I‹8H‰T$€x{H‰|$…ÝL‰ÿèHðÿÿƒøÿtZH‹D$AÆGDIÇG0IÇG8HƒÀM…öH‰D$„¯E1íH‰Æë€IƒÅM9î„“H‹t$L‰ÿèþüÿÿH…Àuá1Àé fHPH‰T$¶AˆGEH‰Ðé!ýÿÿ„I‹WH‰D$ HƒÀIƒ(H‹H‹H‰D$ ‹rX‰t$…¦L‰ÿèŽïÿÿƒøÿt H‹D$ E1öA½¶L‰êHÓâH!ê€ù)„Öüÿÿ„ÉuéÍüÿÿDH…Òt€ù vöL‰çèÖûÿÿƒøÿ„TÿÿÿD9t$~I‹WIcÎH‹H‹H‹TÊHcÈH9Ñ…†H‹D$ ¶€ù,t €ù)…/€ù,„±AƒÆéxÿÿÿH‹™W%H5òäH‹8èz¤ÿÿ1ÀH‹\$(dH3%(…‹HƒÄ8[]A\A]A^A_ÃDHPH‰T$€x:tHƒÀDH‰D$H‰ÂHƒÀ€xÿ:uîHBH‰D$éÑûÿÿL‰ÿè0íÿÿ1Àë”@H‹t$H‰D$H…ö„®ûÿÿI‰w8é¥ûÿÿ@HPH‰T$ ¶HH‰Ðé:ÿÿÿI‹GH55åD‰ñH‹H‹‹PXH‹ÂV%H‹81À訦ÿÿH…À…Àûÿÿ1Àé ÿÿÿ„H‹™V%H5bäH‹8èz£ÿÿ1ÀéûþÿÿH‹|V%H5¥ä¾ÑH‹81ÀèX¦ÿÿë®H‹_V%H5€áºZH‹81Àè9¦ÿÿ1Àéºþÿÿ‰ÁH‹9V%H52äH‹81Àè¦ÿÿékÿÿÿH‹V%H5µãH‹8èý¢ÿÿ1Àé~þÿÿH‹ÿU%H5€äH‹8èà¢ÿÿ1Àéaþÿÿ褢ÿÿ@AWAVI‰ÖAUATI‰õUSI‰üHìØdH‹%(H‰„$È1ÀèÞ£ÿÿH…À„µH‰ÅH‰Ç芦ÿÿHƒmH‰Ã„äH…Û„“L‰ïè«£ÿÿH…ÀI‰Ç„¯H‰ÆH‰ß褥ÿÿIƒ/H‰Å„×Hƒ+„½H…ítXH‹Eö€«€„ÇL9u ‡åH‰èt:H‹!U%H52äL‰éL‰âH‹81Àèú¤ÿÿHƒmuH‹EH‰ïÿP0f„1ÀH‹Œ$ÈdH3 %(…ÇHÄØ[]A\A]A^A_ÃDHƒ+uÊH‹CH‰ßÿP0ë¾fDH‹EH‰ïÿP0é ÿÿÿf„H‹CH‰ßÿP0é4ÿÿÿI‹GL‰ÿÿP0éÿÿÿH‹qT%H5ãL‰éL‰âH‹81ÀèB¤ÿÿéCÿÿÿDH!ãM‰èL‰á¾ÈH‰ç1À謡ÿÿ1Ò1ÿH‰æè€ ÿÿ…ÀˆÿÿÿH‰èé"ÿÿÿèË ÿÿf.„AWAVI‰×AUATI‰þUSHÎH‰õHƒìHdH‹%(H‰D$81ÀHD$0Ll$(Ld$ L‰D$HÇD$ HÇD$(HÇD$0H‰D$H‹t$L‰éL‰âL‰÷èí¢ÿÿ…À„(H‹ H…É„ÁH‹t$ H‹9H‰ØH9þI‰ðu ët@H92tkHƒÀH‹H…ÒuïH‹FH;lS%…_H‰Úëf„HƒÂH‹H…À„H‹8H‹FH9GuãH‰T$èI¢ÿÿ…ÀH‹T$u!H‹t$ I‰ðëÆfDH‹T$(H)èI‰é?ÿÿÿH‹L$(H‰ÐH)èI‰ Hƒ:…&ÿÿÿH‹t$ I‰ðë@H‹t$ H‹FH;ÐR%I‰ð…ÀH9Ý„›H‹EH‹8H9÷uyL‰Çè¡ÿÿH‹T$H5þáH‰ÁH‹tR%H‹81ÀèR¢ÿÿ¸ÿÿÿÿH‹\$8dH3%(…qHƒÄH[]A\A]A^A_Ãèu¡ÿÿ…ÀutHƒÅH‹t$ H9ët%H‹EI‰ðH‹8H9÷t‡H‹FH9GtÍHƒÅH9ëuÞI‰ðL‰Ç胠ÿÿH‹T$H‰ÁH54áélÿÿÿH‹€¨©tH…ÉI‰ð„&ÿÿÿH‹9éþÿÿL‹D$ é)ÿÿÿ©„©H…ÉtiH‰ÚëtDHƒÂH‹ H‹t$ H…ÉtQH‹9H9÷t+H‰T$è ¢ÿÿ…ÀH‹T$yÒèËŸÿÿH…ÀH‹T$tÅë}€H‹L$(H‰ÐH)èI‰ Hƒ:…ŸýÿÿH‹t$ H9Ýu"é2ÿÿÿ軡ÿÿ…Àx^„dÿÿÿHƒÅH9ëtEH‹t$ H‹EI‰ðH‹8H9÷uÔéuþÿÿH‹Q%H‹T$H5¬àH‹81ÀèÒ ÿÿ¸ÿÿÿÿé{þÿÿè“ÿÿL‹D$ éÎþÿÿè$ŸÿÿH…ÀtžëÛf.„Hƒì(dH‹%(H‰D$1ÀH‹GH;YP%…«òOòL$H‹)Q%‹H…À‰ tVòD$H|$òYëæòD$èÿÿò,ÀH‹õP%òD$)èØÿÿH‹L$dH3 %(…©HƒÄ(ÀH‹=P%èüÿÿ…ÀtšH‹AP%H5(ÍH‹8èâœÿÿH‹›P%Ç1Àë©H;IP%ufïÒòH*WòT$éBÿÿÿH;3P%u4è´žÿÿf.4æòD$Š ÿÿÿ…ÿÿÿèõÿÿH…À„ ÿÿÿ1ÀéMÿÿÿèðœÿÿéCÿÿÿè6œÿÿfDAWAVA‰öAUATI‰ýUSH=—ÌHƒìè ÿÿH…À„AHƒI‰ÄIƒ}Ž­1ÛëƒÃHcÃI;E˜¾L‰çèÚÿÿ…ÀtH=MÌL‰æèàœÿÿ…Àˆ˜HcúL‰æI‹lÅH‰ïèœÿÿ…Àx|H‹Eö€«tŸH‰ïèWÿÿH‰ïI‰Çè<ÿÿH…À~‡A¶Dÿƒè <‡vÿÿÿ1öƒÃL‰çèIšÿÿHcÃI;EŒlÿÿÿ@E…öu[I‹$HPÿ1ÀH…ÒI‰$t&HƒÄ[]A\A]A^A_ÃI‹$HPÿ¸ÿÿÿÿH…ÒI‰$uÚI‹T$‰D$ L‰çÿR0‹D$ HƒÄ[]A\A]A^A_ÃH=hËL‰æèù›ÿÿ…Àxµ1öL‰çè»™ÿÿéƒÿÿÿH‹÷M%H5-ËH‹8èàšÿÿ¸ÿÿÿÿévÿÿÿfDH…öATUStH‰ýH‹?H‰óH9þu9A¼D‰à[]A\ÃH‹QM%H5óÊE1äH‹8èšÿÿD‰à[]A\Àèkÿÿ…ÀA‰Äu»H‹EH‹KH5]ÝH‹PH‹rM%H‹81ÀèPÿÿD‰à[]A\ÄUSH‰ûHƒìH‹GH;N%„–H;ÿL%„ÁH‹hhH…ít0H‹EH…Àt'H‰ñHÁé?„Ét…Ò…ÔHƒÄH‰ß[]ÿàf„H‰÷èšÿÿH…ÀH‰Å„ÖH‰ßH‰Æèá™ÿÿH‹}HWÿH…ÒH‰UuH‹UH‰D$H‰ïÿR0H‹D$HƒÄ[]ÃD…ÒH‰ðt H…öyHG…Ét H;C}–H…Àx‘H‹SH‹ÂHƒHƒÄ[]ÃfD…ÒH‰ðt H…öyHG…ÉtH;CZÿÿÿH…ÀˆQÿÿÿH‹DÃHƒHƒÄ[]ÃH‹UH…Ò„ÿÿÿH‰t$ÿÒH…ÀH‹t$xHÆH‹Eéÿÿÿ1ÀéSÿÿÿH‹0L%H‰t$H‹8èK™ÿÿ…ÀH‹t$tÜH‰t$èØ™ÿÿH‹EH‹t$éÆþÿÿf.„USH‰ýH=òÈHƒìèû™ÿÿH…À„šHƒ1öH‰ÇH‰ÃèA—ÿÿ…ÀtH=ËÈH‰Þè^™ÿÿ…ÀxBºH‰ÞH‰ïè™ÿÿ…Àx.H=¦ÈH‰Þè7™ÿÿ…ÀxH‹HPÿ1ÀH…ÒH‰tHƒÄ[]ÃH‹HPÿ¸ÿÿÿÿH…ÒH‰uâH‹S‰D$ H‰ßÿR0‹D$ HƒÄ[]ÃH‹ùJ%H5/ÈH‹8èâ—ÿÿ¸ÿÿÿÿë©f.„USH‰ýHƒìH‹=Py%H‹WH‹‚H…Àt H‰îÿÐH‰ÃH…Ût+HƒÄH‰Ø[]Ãf„H‹B@H…Àt5Hu$ÿÐH‰ÃëÔ@H‹)K%HU$H5ÓÇH‹81Àè\šÿÿHƒÄH‰Ø[]ÃH‰îèššÿÿH‰ÃëDSH‰þH‰ûH‹=Êx%è ˜ÿÿH…ÀtHƒ[ÃfH‰ß[éGÿÿÿ€AWAVAUATUSH‰ýHƒì(H‹GD‹d$`H‹XhH…Û„¡Hƒ{ „–E…Éu8H…É„H‹9H;=&J%„H‹GH;5J%…çH‹wHƒþÿ„1E…äu8M…À„óI‹8H;=éI%„ãH‹GH;øI%…òH‹WHƒúÿ„$H‹C HƒÄ(H‰ï[]A\A]A^A_ÿàDL‹hpM…í„KIƒ}„@H…É„çL‹91ÛM…À„ñI‹0H‹oI%L‰ÿè™ÿÿH…ÛI‰ÄtHƒ+u H‹CH‰ßÿP0M…ätrL‰æH‰ïAÿUI‹ $HQÿH…ÒI‰$„»HƒÄ([]A\A]A^A_Ã@1öE…ä…Iÿÿÿé ÿÿÿ„Hºÿÿÿÿÿÿÿé-ÿÿÿH…ÛtHƒ+uH‹CH‰ßÿP0@1Àë©@L‰D$H‰T$èÑ–ÿÿH…ÀHÇÆÿÿÿÿH‹T$L‹D$„¦þÿÿ1ÀéuÿÿÿH‰t$視ÿÿH…ÀHÇÂÿÿÿÿH‹t$„½þÿÿ1ÀéOÿÿÿf.„I‹T$H‰D$L‰çÿR0H‹D$é+ÿÿÿfDH‹PH‹ýG%H5ö×H‹81ÀèÔ—ÿÿ1ÀéÿÿÿDH;IH%…(H‹GHHHƒù‡H…À„èþÿÿ‹OHƒøÿH‰Î…ïýÿÿH÷ÙH‰ÎéÚýÿÿDH;H%…fH‹GHPHƒú‡ÖH…À„ëHƒøÿ‹W…çýÿÿH÷ÚéÕýÿÿE…Éu'1ÛL‹=’G%é þÿÿDE…äu?H‹|G%H‰ÖéþÿÿH‰÷L‰D$H‰T$è2”ÿÿH…ÀH‰Ã„~þÿÿI‰ÇH‹T$L‹D$éÂýÿÿH‰×è ”ÿÿH…ÀI‰Æ„?þÿÿH‹)G%H‰ÆL‰ÿèΖÿÿH…ÛI‰Ät Hƒ+„¥Iƒ.…³ýÿÿI‹FL‰÷ÿP0é¤ýÿÿL‰D$H‰T$èÄ–ÿÿH…ÀI‰ÅH‹T$L‹D$„þýÿÿH‰ÇL‰D$H‰T$è<’ÿÿI‹MH‰ÆH‹T$L‹D$HƒéH…ÉI‰M…üÿÿH‰D$I‹EL‰ïL‰D$H‰T$ÿP0L‹D$H‹T$H‹t$ébüÿÿH‰t$èC–ÿÿH…ÀI‰ÄH‹t$„²ýÿÿH‰ÇH‰t$èÅ‘ÿÿI‹ $H‰ÂH‹t$HƒéH…ÉI‰ $…ZüÿÿH‰D$I‹D$L‰çÿP0H‹T$H‹t$é;üÿÿHƒøþt^Hƒøu7‹G‹wHÁàH ÆéêûÿÿHƒøþtlHƒøuO‹G‹WHÁàH Âé üÿÿ1ÒéüÿÿL‰D$H‰T$è'“ÿÿH‹T$H‰ÆL‹D$éšûÿÿ‹w‹GHÁæH ÆH÷Þé…ûÿÿH‰t$èö’ÿÿH‹t$H‰Âé«ûÿÿ‹W‹GHÁâH Âé¼ýÿÿH‹CH‰ßÿP0éLþÿÿ„AWAVI‰þAUATUSHƒìH‹=hs%H‹5Yq%H‹WH‹‚H…À„ÿÐH‰ÅH…í„W1ÿè(ÿÿH…ÀI‰Ä„,H‹=5s%è°”ÿÿH…ÀI‰Ç„ü诓ÿÿH…ÀH‰Ã„ëHÇÇÿÿÿÿè”ÿÿH…ÀI‰Å„ãHƒìI‰ÁH‰ÙjL‰úL‰ö1ÀM‰àH‰ïèì’ÿÿI‰ÆI‹EHƒèH…ÀI‰EZYtvH‹EHPÿH…ÒH‰Ut=Iƒ,$tGH…ÛtH‹HPÿH…ÒH‰u H‹CH‰ßÿP0HƒÄL‰ð[]A\A]A^A_ÃfDH‹EH‰ïÿP0Iƒ,$u¹I‹D$L‰çÿP0ë¬f.„I‹EL‰ïÿP0é{ÿÿÿH‹B@H…ÀtGHƒÆ$éÑþÿÿfD1ÛE1öéXÿÿÿfDE1öéJÿÿÿHƒmuH‹EH‰ïÿP0€E1öé`ÿÿÿ蛓ÿÿH‰Åé‹þÿÿAWAVAUATUSHƒìH‹-SC%H‹EL‹xHL‹pPL‹hXHÇ@HHÇ@PHÇ@Xè>‘ÿÿH‹UH‰ÃH‹zHL‹bPH‹jXL‰zHL‰rPL‰jXH…ÿtHƒ/tTM…ätIƒ,$t8H…ítHƒmu H‹EH‰ïÿP0H…Ût]H‰ßè•“ÿÿHƒ+t/HƒÄ[]A\A]A^A_ÃI‹D$L‰çÿP0ë»H‹GÿP0룀H‹CH‰ßH‹@0HƒÄ[]A\A]A^A_ÿàDH‹=©B%HƒÄ[]A\A]A^A_é&“ÿÿfDAUATUSH‰ûHƒìH‹ìB%H9GufH‹Gö@t\H‹--B%L‹`H‹_H‹U‹BƒÀ‰BH‹B%;áH‰ßAÿÔH‰ÃH‹EƒhH…Û„ïH‰ØHƒÄ[]A\A]Ãf„¿H‰t$èñÿÿH…ÀI‰Ä„³H‹t$HƒH‰pH‹CL‹¨€M…í„ÜH‹-•A%H‹U‹BƒÀ‰BH‹‰A%;Ñ1ÒH‰ßL‰æAÿÕH‰ÃH‹EƒhH…Û„ÒH‰ØI‹ $HQÿH…ÒI‰$…VÿÿÿI‹T$H‰D$L‰çÿR0H‹D$é<ÿÿÿH=IÍH‰t$èÿÿ…ÀH‹t$„ÿÿÿ1ÀéÿÿÿèCÿÿH…À…ÿÿÿH‹s@%H5,ÍH‰D$H‹:è¯ÿÿH‹D$HƒÄ[]A\A]À1ÒL‰æH‰ßèkÿÿéWÿÿÿfDH=ÉÌ褎ÿÿ…À„ÿÿÿ1Àé6ÿÿÿDèËŽÿÿH…À… ÿÿÿH‹û?%H5´ÌH‰D$H‹:è7ÿÿH‹D$éþþÿÿf.„USHƒìH‹GH÷€¨€…¥H‹@`H…À„Hƒ¸tnèéŽÿÿHl½H‰ÅH…í„ÞH‹EH‰ëH÷€¨€„ŽH‹€¨©€„ìH‹SHcʉÐH9Ê…*H‹3HVÿH…ÒH‰t;HƒÄ[]Ã@Hƒ¸˜t~èQŒÿÿHø¼H‰Åë†DHƒH‰û뙀H‹S‰D$ H‰ßÿR0‹D$ HƒÄ[]ÀL‹@H‹=?%H5VÏH‰ÑH‹81ÀèÿÿHƒmt:HƒÄ¸ÿÿÿÿ[]ÃfDècÿÿH…ÀuäH‹ÿ>%H5s¼H‹8èØ‹ÿÿëÌfDH‹EH‰ïÿP0ëº@©„õH‹CHƒÀHƒø‡£HôÄHc‚HÂÿâ‹S‹CHÁâH ÂH÷ÚHcʉÐH9Ê„ØþÿÿfH‹±>%H5ÊÎH‹8èZ‹ÿÿ¸ÿÿÿÿé¶þÿÿ1Àé¯þÿÿf„‹Céžþÿÿ„‹C÷ØéŒþÿÿfD‹S‹CHÁâH ÂHcʉÐH9Ê„kþÿÿë“H‰ßèxŒÿÿHcÐH‰ÅH9ЄOþÿÿHƒøÿ…oÿÿÿèJŒÿÿH…À„aÿÿÿ‰èé0þÿÿf.„H‰ßè˜ýÿÿéþÿÿSH‹GH‹€¨©€tMH‹WHcʉÐH9Êu![ÃD‹W‹GHÁâH ÂH÷ÚHcʉÐH9ÊtßH‹¯=%H5ÈÍH‹8èXŠÿÿ¸ÿÿÿÿ[é„•H‹GHƒÀHƒøwOHœÃHc‚HÂÿâ€1À[Ã@‹G[÷ØÃ‹G[ËW‹GHÁâH ÂHcʉÐH9Êuƒ[Àèc‹ÿÿHcÐH‰ÃH9ЄEÿÿÿHƒøÿ…\ÿÿÿè5‹ÿÿH…À„Nÿÿÿ‰Ø[Ä[éŠüÿÿf.„USHƒì8dH‹%(H‰\$(1ÛH…ÿH‰|$HÇD$ HÇD$„BHƒH‹¿<%H‹D$H…À„2H9Є)HƒH‹|$ H9×”ÂH…ÿ”À ЄÀ…¹HƒH‹ ><%H‹D$ H9H„¨H‹ <%H5‘ÌH‹8èùˆÿÿH‹T$H…ÒtHƒ*tiH‹T$H…ÒtHƒ*tIH‹T$ H…ÒtHƒ*t!H‹D$(dH3%(…‘HƒÄ8[]ÃfDH‹|$ H‹GÿP0ëÑf.„H‹|$H‹GÿP0ë©fH‹|$H‹GÿP0ë‰fHÇD$ H‹T$H‹Bö€«€uEHƒ|$„ÁH‹Z;%H5ûËH‹8è3ˆÿÿé5ÿÿÿfD¸HÇD$éäþÿÿDHT$ Ht$H|$è|‡ÿÿH‹;%H‹T$H‹H‹xHH‰PHH‹T$H‹hPH‹XXH…ÿH‰PPH‹T$ H‰PXt Hƒ/„ŒH…ítHƒmtpH…Û„ÞþÿÿHƒ+…ÔþÿÿH‹CH‰ßÿP0éÅþÿÿfDH‰D$H‰T$HƒH‹ã:%H‹|$H‹0èVŠÿÿ…À…bÿÿÿH‹o:%H5HËH‹8èH‡ÿÿéJþÿÿH‹EH‰ïÿP0ë„@H‹GÿP0éhÿÿÿèï†ÿÿH‹|$ H…ÿ”ÁH9×”À Èéäþÿÿ€AVAUATUSH‰óHƒìH‹GH;Î:%uDH‹W H‹GH‰ÑHÑùH9ÈŽMH9ÐDHƒH‹WH‰4ÂHƒÀH‰G1ÀHƒÄ[]A\A]A^ÃH‹H‹5g%H…Ò„ÊÿÒH‰ÅH…턲H‹EH;89%…*L‹uM…ö„¿L‹m蟇ÿÿH…ÀI‰Ä„¯IƒL‰pHƒH‰X IƒEHƒm„ÓI‹EH‹˜€H…Û„L‹509%I‹‹BƒÀ‰BH‹%9%;r1ÒL‰æL‰ïÿÓH‰ÅI‹ƒhH…í„pH‰ëIƒ,$tfIƒmtOH…Û„íH‹HPÿ1ÀH…ÒH‰…óþÿÿH‹S‰D$ H‰ßÿR0‹D$ éÜþÿÿf.„H‰Þ蘆ÿÿÁøéÂþÿÿI‹EL‰ïÿP0ë¥@I‹D$L‰çÿP0ëH‹EH‰ïÿP0éÿÿÿH; 9%…ÿH‹Eö@„ñL‹5F8%L‹`L‹mI‹‹BƒÀ‰BH‹38%;[H‰ÞL‰ïAÿÔH‰ÃI‹ƒhH…Û„/Hƒm…ÿÿÿH‹EH‰ïÿP0é ÿÿÿ¸ÿÿÿÿéþÿÿH‹@@H…À„'HƒÆ$ÿÐH‰Åé þÿÿH=íÃèÈ…ÿÿ…Àt•1Ûë­1ÒL‰æL‰ïèc‡ÿÿH‰Ãé®þÿÿH=ÄÃ蟅ÿÿ…À„zþÿÿ1Ûé“þÿÿèË…ÿÿH…ÀH‰Ã…þÿÿH‹ø6%H5±ÃH‹8è9„ÿÿégþÿÿ¿èz…ÿÿH…ÀI‰ÄtŽHƒH‰XH‹EH‹˜€H…Û„œL‹5'7%I‹‹BƒÀ‰BH‹7%;j1ÒL‰æH‰ïÿÓH‰ÃI‹ƒhH…ÛtwIƒ,$…áþÿÿI‹D$L‰çÿP0éÑþÿÿè…ÿÿH…À…ÃþÿÿH‹O6%H5ÃH‹8èƒÿÿé¨þÿÿèÖ†ÿÿH‰ÅéúüÿÿH=ÇÂ袄ÿÿ…Àt†1Ûë›1ÒL‰æH‰ïè=†ÿÿH‰Ãë‰èÄÿÿH…À…{ÿÿÿH‹ó5%H5¬ÂH‹8è4ƒÿÿé`ÿÿÿDf.„AWAVAUATUSHƒìHH;5k6%H‰|$H‰L$0L‰D$„–HƒI‰×E1Û1ÒH‰õHÇD$HÇ$E1ÒE1ÉH‰×M‰ÜH‹D$H9EŽsL‹lÅIƒEH…ÿt Hƒ/„ÂH‹D$H‹8H;=ó5%„mL‰îL‰T$(L‰L$ 蛂ÿÿH…ÀH‰ÃL‹L$ L‹T$(„H;¾5%H‹@thH;15%t_H‹HH‹\5%Hç²H5æ²L‰d$L‰L$L‰T$A¿ª7H‹81Àè…ÿÿL‹T$L‹\$I‰ØL‹L$º1ÉM‰ÔL‰ÛM‰ÎéHM…ät Iƒ,$„ H;95%„3H‹SHƒú…mH‹CL‹c HƒH‰D$ Iƒ$H;5%…ºM…Ét Iƒ)„M…Òt Iƒ*„ìH‹D$Hc8è'„ÿÿH…ÀH‰Á„+H‰ÆL‰çH‰D$(èë„ÿÿH…ÀI‰ÆH‹L$(„òHƒ)„°L‰÷èˆöÿÿHcЃúÿ„<Iƒ.„¢H‹D$0L)øH)ÐHƒøŽäH‹D$ €x>„.H‹D$H‰l$8H‰\$(‹8I‰ÆHcÿè’ƒÿÿH…ÀH‰Å„Œ1ÒL‰æH‰Çèi€ÿÿH…ÀH‰Ã„Hƒm„ÂH;#4%”ÀH;a3%”ÂÂu H;ó3%…­¶èH‹HPÿH…ÒH‰„‡…í„·AÆxA‹IƒÇxA‰>HcÿèƒÿÿH…ÀH‰Å…tÿÿÿH‹l$81ÉI‰ÀL‹t$ H‹\$(A¿H8º-Hƒm…H‹E‰T$H‰ïL‰D$H‰L$ÿP0‹T$L‹D$H‹L$ëW„H‹EH‰ïÿP0é/ÿÿÿH‰ßèÈÿÿ…À‰Å‰DÿÿÿH‰ÙL‹t$ H‹\$(H‹l$8A¿L8º-E1ÀfDHƒmtM…Àt Iƒ(„²H…Ét Hƒ)„ƒH G°H=M°D‰þE1ÿèšÒÿÿM…öt Iƒ.„H…Ût Hƒ+„M…ít Iƒm„M…ät Iƒ,$„H‹4$H…ötH‹H‰D$HƒèH…ÀH‰u H‹FH‰÷ÿP0HƒÄHL‰ø[]A\A]A^A_ÃH‹SH‰ßÿR0éjþÿÿH‹GL‰T$(L‰L$ ÿP0L‹T$(L‹L$ éüÿÿI‹D$L‰T$(L‰çL‰L$ ÿP0L‹T$(L‹L$ é¼üÿÿ@I‹BL‰×ÿP0éýÿÿf„I‹AL‰T$(L‰ÏÿP0L‹T$(M…Ò…ÕüÿÿéÚüÿÿfDI‰ÀL‹t$ A¿Þ7ºé˜þÿÿI‹FL‰÷ÿP0éÖþÿÿH‹CH‰ßÿP0éÕþÿÿI‹EL‰ïÿP0éÕþÿÿI‹D$L‰çÿP0éÔþÿÿH‹A‰T$H‰ÏÿP0‹T$éfþÿÿf„I‹@‰T$L‰ÇH‰L$ÿP0‹T$H‹L$é-þÿÿ€I‰èH‰ÁL‹t$ H‹\$(H‹l$8A¿J8º-éëýÿÿH‹AH‰ÏÿP0éAüÿÿI‹F‰T$(L‰÷ÿP0HcT$(éFüÿÿ„H‹q0%H5ŠÁA¿7E1íE1ä1ÛE1öH‹8è9}ÿÿºHÇ$é¤ýÿÿ€H‹10%H5rÁL‰d$L‰L$L‰T$A¿¦7H‹8èõ|ÿÿL‹T$L‹\$ºL‹L$1ÉE1ÀM‰ÔL‰ÛM‰Îé&ýÿÿfDM‰ãE1ÀM‰ÔL‰ÛM‰ÎA¿¨7º1Ééÿüÿÿ€H‹±/%H5ÊÀL‰L$L‰T$A¿Í7H‹8èz|ÿÿL‹T$L‹L$º1ÉE1ÀM‰ÔM‰Îé³üÿÿ2H…ÒM‰ÔxEH4®H ”¬HƒúH5¹ÀL‰T$L‰L$HEÈH‹,/%H‹81ÀèÿÿL‹T$L‹L$M‰ÔM‰ÎA¿¿7º1ÉE1ÀéEüÿÿDL‹5ù\%M…ö„_H‹D$ H‹xI9þ„$úÿÿL‰öL‰T$8L‰L$(è¤~ÿÿ…ÀL‹L$(L‹T$8…úÿÿL‰òL‹t$ H5‹¾H‹JL‰T$L‰L$I‹FH‹PH‹Ž.%H‹81Àèl~ÿÿL‹L$L‹T$L‰áM‰ðM‰ÔM‰ÎA¿Ï7ºéžûÿÿfDL‹t$ A¿Ü7ºE1Àé€ûÿÿ„H‹).%H5»ºL‰T$L‰L$H‹81Àèù}ÿÿéâþÿÿ@‰T$(èW|ÿÿH…ÀHcT$(„­ùÿÿM‰ðA¿á7L‹t$ º1Ééûÿÿ€H‹t$ H‹L$H‹\$(H‹l$8‹F H‰ðH‹v8H…ö„H‹D$ L‹D$L‰úH‹L$0Hx0èT÷ÿÿH…ÀI‰Ç„M‰âHƒD$L‰ïI‰ÜL‹L$ é…÷ÿÿ€HƒmM‰ã„õM‰ÔI‰ýL‰ÛM‰Îé¿úÿÿH‹5âU%H‹=ëZ%1ÒL‹t$ è_ÌÿÿH…ÀI‰À„BH‰ÇH‰D$èVðÿÿL‹D$Iƒ(„ÎA¿ñ7º1ÉE1Àé*úÿÿfH‹5U%H‹=šZ%1ÒL‹t$ èÌÿÿH…ÀI‰À„ûH‰ÇH‰D$èýïÿÿL‹D$Iƒ(„”A¿58º#1ÉE1ÀéÑùÿÿH‹",%H5Ä©L‰L$L‰T$L‹t$ H‹8èTyÿÿL‹T$L‹L$éãýÿÿH‹EL‰T$ L‰L$L‰d$H‰|$H‰ïÿP0L‹T$ H‹T$L‹\$L‹L$M‰ÔI‰ÕL‰ÛM‰Îé˜ùÿÿHcxè©{ÿÿH…ÀH‰D$(„JH‹4$H…ötH‹H‰D$8HƒèH…ÀH‰„-H‹D$0L)øHƒøŽé¿è^{ÿÿH…ÀH‰Á„<H‹|$(ºH‰ÆH‰$è,xÿÿH…ÀI‰ÆH‹ $„õHƒ)„ÂL;5ã+%”ÀL;5!+%”ÂÂu L;5³+%…¿¶ÀI‹6HVÿH…ÒI‰„r…À„ÔAÆbH‹D$(IƒÇH‰$é±ýÿÿI‹@L‰ÇA¿ñ7ÿP0º1ÉE1ÀéRøÿÿI‹@L‰ÇA¿58ÿP0º#1ÉE1Àé3øÿÿL‹t$ A¿:ºQ1ÉE1ÀéøÿÿA¿í7º1ÉéøÿÿA¿18º#1Ééõ÷ÿÿH‹FH‰÷ÿP0éÄþÿÿL‰÷èvyÿÿ…À‰4ÿÿÿH‹D$(M‰ðA¿¸8L‹t$ º:1ÉH‰$é³÷ÿÿ¿èzÿÿH…ÀI‰Æ„H‹|$(ºH‰ÆèÓvÿÿH…ÀH‰Á„7Iƒ.„ÅH; Ž*%”ÂH; Ì)%¶Â@”Æ@Öu H; Y*%…ÑA‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ö„èAÆBéšþÿÿI‹V‰$L‰÷ÿR0‹$éyþÿÿH‹AH‰ÏÿP0é/þÿÿL‹t$ 1ÉA¿ˆ8º5E1ÀéßöÿÿI‰ÀH‹D$(L‹t$ A¿¶8º:H‰$é¾öÿÿH‹D$(L‹t$ A¿´8º:E1ÀH‰$éöÿÿI‰ÀH‹D$(L‹t$ A¿Æ8º;1ÉH‰$ézöÿÿH‰ÏH‰ $èxÿÿ…ÀA‰ÆH‹ $‰ÿÿÿH‹D$(L‹t$ A¿Ê8º;E1ÀH‰$é>öÿÿ¿èŒxÿÿH…ÀH‰Á„°H‹|$(ºH‰ÆH‰$èZuÿÿH…ÀI‰ÆH‹ $tmHƒ)„¥L;5)%”ÂL;5S(%¶Â”ÁÑu L;5â(%…)I‹6HVÿH…ÒI‰„i…À„AAÆhé-ýÿÿH‰$I‹FL‰÷ÿP0H‹ $é$þÿÿI‰ÀH‹D$(L‹t$ A¿Ú8º<H‰$éxõÿÿH‹D$(L‹t$ A¿Ø8º<E1ÀH‰$éWõÿÿH‹AH‰ÏÿP0éLÿÿÿH‹D$(M‰ðA¿È8L‹t$ º;H‰$é'õÿÿH‹5xP%H‹=‘U%1ÒL‹t$ èÇÿÿH…ÀH‰Át>H‰ÇH‰$èëÿÿH‹ $Hƒ)u H‹AH‰ÏÿP0H‹D$(A¿¢8º71ÉE1ÀH‰$éÇôÿÿH‹D$(A¿ž8º7E1ÀH‰$é«ôÿÿL‰÷è;vÿÿ…À‰ÇþÿÿH‹D$(M‰ðA¿Ü8L‹t$ º<1ÉH‰$éxôÿÿ¿èÆvÿÿH…ÀI‰Æ„ŠH‹|$(ºH‰Æè˜sÿÿH…ÀH‰Á„Iƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; E'%”ÂH; ƒ&%¶Â@”Æ@Öu H; '%urA‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ö„žAÆHéUûÿÿI‰ÀH‹D$(L‹t$ A¿ê8º=1ÉH‰$éµóÿÿH‹D$(M‰ðA¿ì8L‹t$ º=H‰$é”óÿÿH‰ÏH‰ $è uÿÿ…ÀA‰ÆH‹ $‰vÿÿÿH‹D$(L‹t$ A¿î8º=E1ÀH‰$éXóÿÿI‹V‰$L‰÷ÿR0‹$é‚ýÿÿ¿è‘uÿÿH…ÀH‰Á„×H‹|$(ºH‰ÆH‰$è_rÿÿH…ÀI‰ÆH‹ $„Hƒ)u H‹AH‰ÏÿP0L;5&%”ÂL;5N%%¶Â”ÁÑu L;5Ý%%u,I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…Àt8AÆié$úÿÿL‰÷è7tÿÿ…ÀyÈH‹D$(M‰ðA¿9L‹t$ º>1ÉH‰$éxòÿÿ¿èÆtÿÿH…ÀI‰Æ„È H‹|$(ºH‰Æè˜qÿÿH…ÀH‰Á„‰ Iƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; E%%”ÂH; ƒ$%¶Â@”Æ@Öu H; %%u*A‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ötAAÆIéYùÿÿH‰ÏH‰ $èhsÿÿ…ÀA‰ÆH‹ $yÂH‹D$(L‹t$ A¿9º?E1ÀH‰$é¤ñÿÿ¿èòsÿÿH…ÀH‰Á„² H‹|$(ºH‰ÆH‰$èÀpÿÿH…ÀI‰ÆH‹ $„k Hƒ)u H‹AH‰ÏÿP0L;5q$%”ÂL;5¯#%¶Â”ÁÑu L;5>$%u,I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…Àt8AÆlé…øÿÿL‰÷è˜rÿÿ…ÀyÈH‹D$(M‰ðA¿$9L‹t$ º@1ÉH‰$éÙðÿÿ¿è'sÿÿH…ÀI‰Æ„£ H‹|$(ºH‰ÆèùoÿÿH…ÀH‰Á„d Iƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; ¦#%”ÂH; ä"%¶Â@”Æ@Öu H; q#%u*A‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ötAAÆLéº÷ÿÿH‰ÏH‰ $èÉqÿÿ…ÀA‰ÆH‹ $yÂH‹D$(L‹t$ A¿69ºAE1ÀH‰$éðÿÿ¿ èSrÿÿH…ÀH‰Á„ H‹|$(ºH‰ÆH‰$è!oÿÿH…ÀI‰ÆH‹ $„F Hƒ)u H‹AH‰ÏÿP0L;5Ò"%”ÂL;5"%¶Â”ÁÑu L;5Ÿ"%u,I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…Àt8AÆqéæöÿÿL‰÷èùpÿÿ…ÀyÈH‹D$(M‰ðA¿H9L‹t$ ºB1ÉH‰$é:ïÿÿ¿ èˆqÿÿH…ÀI‰Æ„~ H‹|$(ºH‰ÆèZnÿÿH…ÀH‰Á„? Iƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; "%”ÂH; E!%¶Â@”Æ@Öu H; Ò!%u*A‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ötAAÆQéöÿÿH‰ÏH‰ $è*pÿÿ…ÀA‰ÆH‹ $yÂH‹D$(L‹t$ A¿Z9ºCE1ÀH‰$éfîÿÿ¿ è´pÿÿH…ÀH‰Á„hH‹|$(ºH‰ÆH‰$è‚mÿÿH…ÀI‰ÆH‹ $„!Hƒ)u H‹AH‰ÏÿP0L;53!%”ÂL;5q %¶Â”ÁÑu L;5!%u,I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…Àt8AÆféGõÿÿL‰÷èZoÿÿ…ÀyÈH‹D$(M‰ðA¿l9L‹t$ ºD1ÉH‰$é›íÿÿ¿ èéoÿÿH…ÀI‰Æ„YH‹|$(ºH‰Æè»lÿÿH…ÀH‰Á„Iƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; h %”ÂH; ¦%¶Â@”Æ@Öu H; 3 %u*A‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ötAAÆdé|ôÿÿH‰ÏH‰ $è‹nÿÿ…ÀA‰ÆH‹ $yÂH‹D$(L‹t$ A¿~9ºEE1ÀH‰$éÇìÿÿ¿ èoÿÿH…ÀH‰Á„CH‹|$(ºH‰ÆH‰$èãkÿÿH…ÀI‰ÆH‹ $„üHƒ)u H‹AH‰ÏÿP0L;5”%”ÂL;5Ò%¶Â”ÁÑu L;5a%u,I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…Àt8AÆgé¨óÿÿL‰÷è»mÿÿ…ÀyÈH‹D$(M‰ðA¿9L‹t$ ºF1ÉH‰$éüëÿÿ¿èJnÿÿH…ÀI‰Æ„4H‹|$(ºH‰ÆèkÿÿH…ÀH‰Á„õIƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; É%”ÂH; %¶Â@”Æ@Öu H; ”%u3A‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ötJAÆZAÆGfIƒÇéÔòÿÿH‰ÏH‰ $èãlÿÿ…ÀA‰ÆH‹ $y¹H‹D$(L‹t$ A¿¢9ºGE1ÀH‰$éëÿÿ¿èmmÿÿH…ÀH‰Á„H‹|$(ºH‰ÆH‰$è;jÿÿH…ÀI‰ÆH‹ $„ÎHƒ)u H‹AH‰ÏÿP0L;5ì%”ÂL;5*%¶Â”ÁÑu L;5¹%u5I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…ÀtAAÆZAÆGdIƒÇé÷ñÿÿL‰÷è lÿÿ…Ày¿H‹D$(M‰ðA¿¶9L‹t$ ºH1ÉH‰$éKêÿÿ¿è™lÿÿH…ÀI‰Æ„ýH‹|$(ºH‰ÆèkiÿÿH…ÀH‰Á„¾Iƒ.uH‰$I‹FL‰÷ÿP0H‹ $H; %”ÂH; V%¶Â@”Æ@Öu H; ã%u3A‰ÆH‹HPÿH…ÒH‰u H‹QH‰ÏÿR0E…ötJAÆZAÆGgIƒÇé#ñÿÿH‰ÏH‰ $è2kÿÿ…ÀA‰ÆH‹ $y¹H‹D$(L‹t$ A¿Ê9ºIE1ÀH‰$énéÿÿ¿è¼kÿÿH…ÀH‰Á„ÞH‹|$(ºH‰ÆH‰$èŠhÿÿH…ÀI‰ÆH‹ $„—Hƒ)u H‹AH‰ÏÿP0L;5;%”ÂL;5y%¶Â”ÁÑu L;5%u,I‹6HVÿH…ÒI‰uI‹V‰$L‰÷ÿR0‹$…Àt8AÆOéOðÿÿL‰÷èbjÿÿ…ÀyÈH‹D$(M‰ðA¿Þ9L‹t$ ºJ1ÉH‰$é£èÿÿH‹t$(H‹=¿E%L‹t$ èlÿÿH…ÀI‰À„Ë¿H‰$èkiÿÿH…ÀH‰ÁL‹$„”H‹=ÜH%L‰@1ÒH‰ÆH‰$èBºÿÿH…ÀI‰ÀH‹ $tVHƒ)uH‰$H‹AH‰ÏÿP0L‹$L‰ÇL‰$è"ÞÿÿL‹$Iƒ(u I‹@L‰ÇÿP0H‹D$(A¿ù9ºL1ÉE1ÀH‰$éèçÿÿH‹D$(A¿ô9ºLH‰$éÏçÿÿH‹D$(A¿ï9ºLH‰$é¶çÿÿH‹D$(A¿í9ºL1ÉH‰$é›çÿÿI‰ÀH‹D$(L‹t$ A¿Ü9ºJH‰$ézçÿÿH‹D$(L‹t$ A¿Ú9ºJE1ÀH‰$éYçÿÿH‹D$(M‰ðA¿È9L‹t$ ºIH‰$é8çÿÿI‰ÀH‹D$(L‹t$ A¿Æ9ºI1ÉH‰$éçÿÿI‰ÀH‹D$(L‹t$ A¿´9ºHH‰$éôæÿÿH‹D$(L‹t$ A¿²9ºHE1ÀH‰$éÓæÿÿH‹D$(M‰ðA¿ 9L‹t$ ºGH‰$鲿ÿÿI‰ÀH‹D$(L‹t$ A¿ž9ºG1ÉH‰$éæÿÿI‰ÀH‹D$(L‹t$ A¿Ž9ºFH‰$énæÿÿH‹D$(L‹t$ A¿Œ9ºFE1ÀH‰$éMæÿÿH‹D$(M‰ðA¿|9L‹t$ ºEH‰$é,æÿÿI‰ÀH‹D$(L‹t$ A¿z9ºE1ÉH‰$é æÿÿI‰ÀH‹D$(L‹t$ A¿j9ºDH‰$éèåÿÿH‹D$(L‹t$ A¿h9ºDE1ÀH‰$éÇåÿÿH‹D$(M‰ðA¿X9L‹t$ ºCH‰$é¦åÿÿI‰ÀH‹D$(L‹t$ A¿V9ºC1ÉH‰$éƒåÿÿI‰ÀH‹D$(L‹t$ A¿F9ºBH‰$ébåÿÿH‹D$(L‹t$ A¿D9ºBE1ÀH‰$éAåÿÿH‹D$(M‰ðA¿49L‹t$ ºAH‰$é åÿÿI‰ÀH‹D$(L‹t$ A¿29ºA1ÉH‰$éýäÿÿI‰ÀH‹D$(L‹t$ A¿"9º@H‰$éÜäÿÿH‹D$(L‹t$ A¿ 9º@E1ÀH‰$é»äÿÿH‹D$(M‰ðA¿9L‹t$ º?H‰$éšäÿÿI‰ÀH‹D$(L‹t$ A¿9º?1ÉH‰$éwäÿÿI‰ÀH‹D$(L‹t$ A¿þ8º>H‰$éVäÿÿH‹D$(L‹t$ A¿ü8º>E1ÀH‰$é5äÿÿf.„AVAUATUH‰ýSA‰ÔH‰óHƒì H‹dH‹%(H‰D$1ÀH‹‡ H…Àt#ö‡ª tHƒx tH‰ïèÃeÿÿé"fDH‹5D%H9÷t èWfÿÿ…À„'H…Û„øL‹-¯%D‰àƒà8IƒEƒø8L‰k„'AƒäXAƒüX„A‹EH‹U‰C$H‰H‹E(H‰C8H‹E HÇC@H‰C0H‹E8Hc@ H‰C1ÀöEA”À‰C L‹e8Iƒ$Iƒ|$8„§HƒEH‹SHƒ*„t¿ÿH‰kè†dÿÿH‰C(Æ^HˆÿI‹t$8HPI|$0LD$ÇD$èhßÿÿH…À„ÆL9k„21ÛIƒ,$u I‹D$L‰çÿP0‰ØH‹L$dH3 %(…}HƒÄ []A\A]A^ÃH‹EH5ݦH‹PH‹:%H‹81Àèeÿÿ¸ÿÿÿÿëµöE@…ÏþÿÿL‹%×B%H‹5Ð=%I‹D$L‹¨€M…턃H‹-%H‹U‹BƒÀ‰BH‹ø%;˜1ÒL‰çAÿÕH‹UƒjH…À„·H‰ÅH‰ïèü×ÿÿHƒm„¾C3ºÚE1ä@H D’H=b’è´ÿÿH‹CH…ÀtH‹HQÿH…ÒH‰„HÇCM…ä»ÿÿÿÿ…ËþÿÿéØþÿÿfDH‹SIƒEHƒ*„½L‰kA€|$>„íA‹L$ƒù‡Hxš‰ÊHcHÐÿàDöE@…µýÿÿL‹%¯A%H‹5 <%I‹D$L‹¨€M…í„óH‹-Ü%H‹U‹BƒÀ‰BH‹Ð%;1ÒL‰çAÿÕH‹UƒjH…À„H‰ÅH‰ïèÔÖÿÿHƒm„)¾{3ºÞE1äé×þÿÿ€H‹{H‹GÿP0éïþÿÿIƒm„5HÇCé¶ýÿÿH: %H‰C(é›ýÿÿH5 %ëîH %ëåH %ëÜHö%ëÓH %ëÊH %ëÁH÷%ë¸Hô%ë¯Hé%ë¦HÌ%ëHÝ%ë”H¾%ë‹HÍ%ë‚H²%évÿÿÿHº%éjÿÿÿH°%é^ÿÿÿHcùè&bÿÿH…ÀH‰Å„¤H‹=ã<%H‰Æè;cÿÿH…ÀI‰Å„éHƒm„[¿èŠ`ÿÿH…ÀH‰ÅtrH‹=@%L‰h1ÒH‰Æèm±ÿÿH…ÀI‰Å„ZHƒm„,L‰ïè^ÕÿÿI‹E¾Ž5ºHƒèH…ÀI‰E…_ýÿÿI‹E‰T$ L‰ï‰4$ÿP0‹4$‹T$ éBýÿÿfI‹Eº¾„5HƒèH…ÀI‰E…!ýÿÿI‹E‰T$ L‰ï‰4$ÿP0‹T$ ‹4$éýÿÿ@H‹EH‰ïE1äÿP0¾C3ºÚéäüÿÿ@H‹{H‹GÿP0é3ýÿÿH‹{H‹GÿP0é|ûÿÿH‹EH‰ïE1äÿP0¾{3ºÞé¤üÿÿ@L‹-ñ>%H‹5Ú9%I‹EL‹°€M…ö„°H‹-%H‹U‹BƒÀ‰BH‹%;²1ÒL‰ïAÿÖH‹UƒjH…À„·H‰ÅH‰ïèÔÿÿH‹E¾°4ºHƒèH…ÀH‰E…üÿÿH‹E‰T$ H‰ï‰4$ÿP0‹4$‹T$ éûûÿÿ¾Ñ5ºééûÿÿf„1ÒL‰çè6`ÿÿH…ÀH‰Å…¦ûÿÿf.„¾?3ºÚE1äé®ûÿÿfDH=qœH‰4$èH^ÿÿ…ÀH‹4$„LûÿÿëÊf.„I‹EL‰ïÿP0é¼üÿÿè[^ÿÿH…Àu¦H‹%H5HœH‹8èÐ\ÿÿëŽfD1ÒL‰çèž_ÿÿH…ÀH‰Å…6üÿÿf¾w3ºÞE1äéûÿÿfDH=á›H‰4$è¸]ÿÿ…ÀH‹4$„äûÿÿëÊf.„èÛ]ÿÿH…Àu¶H‹%H5È›H‹8èP\ÿÿëž1ÒL‰ïè$_ÿÿH…ÀH‰Å…yþÿÿ¾¬4ºé©úÿÿH=r›H‰4$èI]ÿÿ…ÀH‹4$„2þÿÿëÓèv]ÿÿH…ÀuÉH‹ª%H5c›H‹8èë[ÿÿë±H‹EH‰ïÿP0é–üÿÿH‹EH‰ïÿP0éÅüÿÿè–[ÿÿ¾5ºé7úÿÿ¾‰5Hƒmt3H oŒH=ŒºèîÿÿH‹CH…À…"úÿÿ»ÿÿÿÿé ùÿÿ@H‹E‰4$H‰ïÿP0‹4$뻾5ë­Df.„ATUH‰ýSHƒìPdH‹%(H‰D$H1ÀH;5Ž%„PH…öH‰÷„DHÇEH‰îA‰ÌL‰Ãè6÷ÿÿƒøÿ„n‹M$D9á…GHÚ5%H‰#HÇC€=$6%SH‰çHÇD$H‰$HÍ‹H‰\$HÇD$ ÆD$E@H‰D$ÆD$F@HÇD$(HÇD$0ÆD$DÇD$@ÆD$GHÇD$8uEH^5%I‰Øëf„L‹D$IPH‰T$H‹PI‰PH‹T$HÇBH‹@H‹€x\StÐH‹u(è—±ÿÿH…À„H‹UL‹ 5%‰ÐL9È…À1ÀHƒ}@„£H‹L$HdH3 %(…ëHƒÄP[]A\ÃfDH;%HÇEHÇEH‰E8H‰E0Hâ%H‰E@1Àë¯H‹³ %H5|žD‰âH‹81Àè\ÿÿH¸:%HÇEHÇEH‰E8H‰E0H™%H‰E@¸ÿÿÿÿé`ÿÿÿH%H‰]@éMÿÿÿH 2‹H’‰IƒùL‹4%H‰ÎHBðHƒúHLÈH‹) %HƒìVH5-žH‹81Àè\ÿÿXZémÿÿÿèÇXÿÿ€AWAVAUATUSH‰ýHìdH‹%(H‰„$1ÀH…ÿHÇ„$¨HÇ„$ „ØH;= %„ËH´$¨ºè¹ôÿÿƒøÿ„[‹Œ$̃ù….HY3%€=®3%SH|$@H”$HÇ„$˜HÇD$PH‰D$@H@‰H‰¼$H‰T$XHÇD$`H‰D$HÆ„$…@Æ„$†@HÇD$hHÇD$pÆ„$„Ç„$€Æ„$‡HÇD$xuAHº2%ë „H‹T$XHJH‰L$XH‹HH‰JH‹T$XHÇBH‹@H‹€x\StÐH‹´$Ðèó®ÿÿH…À„UH‹”$ÀL‹ k2%‰ÐL9È…ðHƒ¼$èH‹„$à„YH‹H‰ïH‰D$èùXÿÿHƒøÿH‰D$ „"Hƒ|$ Ž fïÒA¼ HÇ$òT$(òT$0H‹\$AT$ýAt$úH‹¼$¨HcÒHcöH‰ØH¯$H¯ÓH¯óHúHþHÇH‰D$è0…L‹=q5%H‹=J8%òD$L‰þè„WÿÿH…ÀH‰Ã„`HƒH‹SH‹56%H‹‚H…À„!H‰ßÿÐI‰ÆH‹HƒèM…öH‰„ÎH…À„uòD$èúVÿÿH…ÀH‰Ã„>I‹FH;û%„]H;ö %…0I‹Fö@„"H‹-3 %L‹xM‹nH‹U‹BƒÀ‰BH‹ %;ÒH‰ÞL‰ïAÿ×H‰ÂH‹EƒhH…Ò„H‹M‰õHƒèH…ÀH‰„d@Iƒm„UH; %”ÀH;T%”ÁÁu H;æ%…ðD¶øHƒ*„E…ÿ…9IcÄH‰$ò\$0AƒÄ H‹4$H9t$ òX\$ò\$0=þÿÿf(Ãò Ÿò^ÑžfTÁHƒ¼$¨„iH?%H9„$è„{H¼$¨ò$è¥ÿÿò$é8DH‹CH‰ßÿP0é|þÿÿHù5%HÇ„$°H‰„$àH‰„$ØHÖ%H‰„$èHÇ5%éIýÿÿfH‰×H‰T$8èsVÿÿ…ÀA‰ÇH‹T$8‰÷þÿÿHƒ*„ùH‹-Š%Hƒ¼$¨H‹EL‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@X„ÛHT%H9„$è„þH¼$¨è9¤ÿÿH‹EH‹xHH‹hPH‹XXL‰pHL‰hPL‰`XH…ÿt Hƒ/„~H…ítHƒmtRH…ÛtHƒ+u H‹CH‰ßÿP0H=&™èqÃÿÿfïÀH‹„$dH3%(…_HÄ[]A\A]A^A_Ã@H‹EH‰ïÿP0ë¢@H‹BH‰×ÿP0éøþÿÿH‹GÿP0évÿÿÿ@I‹EH‰T$8L‰ïÿP0H‹T$8é’ýÿÿ€H‹= /%1öè¶ÿÿ…Àˆ±þÿÿMcüL9<$‘H‹„$¨H‹t$ò0è¦SÿÿH…ÀH‰D$8„þÿÿ¿è.TÿÿH…ÀI‰ÆH‹T$8„Zþÿÿ1öH‰PH‰Çè_¶ÿÿ…Àˆ·Iƒ.tQH‹=24%¾è@¶ÿÿ…Àˆ/þÿÿHƒ$H‹L$H‹$HL$I9ÇoÿÿÿL‰<$éýÿÿH‹BH‰×ÿP0éïüÿÿI‹FL‰÷ÿP0ë£@L‰pHL‰hPL‰`Xé‚þÿÿ€L‰ÿè`ºÿÿH…ÀH‰Ã„»ýÿÿé‹ûÿÿ€HÇ„$èéñýÿÿ€H‹-!%E1ÿ1Ò@Iƒ.t2H…ÒtHƒ*t?M…ÿ„týÿÿIƒ/…jýÿÿI‹GL‰ÿÿP0é[ýÿÿDI‹FH‰$L‰÷ÿP0H‹$ëº@H‹BH‰×ÿP0ëµ@H…À…ýÿÿH‹-¨%1ÒH‹CH‰$H‰ßE1ÿÿP0M…öH‹$…pÿÿÿéqÿÿÿH‹B@H…À„QHƒÆ$éÉúÿÿH‹K%H5–ºH‹81Àè%TÿÿHN2%fïíHÇ„$¨HÇ„$°H‰„$àH‰„$ØH%òl$(H‰„$èéoüÿÿ„I‹VH…Ò„–úÿÿM‹nHƒIƒEIƒ.„u¿H‰T$8èíQÿÿH…ÀI‰ÇH‹T$8„¼I‰WI‰_ I‹EH‹˜€H…Û„ÀH‹-‘%H‹U‹BƒÀ‰BH‹…%;Ç1ÒL‰þL‰ïÿÓH‰ÂH‹EƒhH…Ò„ Iƒ/…uúÿÿI‹GH‰T$8L‰ÿÿP0H‹T$8é\úÿÿ@fïöòt$(éûÿÿf„H5%H‰´$è铸ÿÿM‰õ1Ò€H‹-ñ%M‰îHƒ+„>þÿÿE1ÿéÄýÿÿ@1ÒL‰þL‰ïèƒRÿÿH…ÀH‰Â…hÿÿÿH‹-¸%M‰î1Òé–ýÿÿH=ÏŽèªPÿÿ…À„%ÿÿÿëàH ZHºIƒùL‹G*%H‰ÎHBðHƒúHLÈH‹Q%HƒìVH5U”H‹81Àè+RÿÿXZéÿýÿÿèPÿÿH…ÀuŠH‹Ã%H5|ŽM‰îH‹8èOÿÿ1Òé ýÿÿf.„¿è6PÿÿH…ÀI‰Ç„þþÿÿHƒH‰XI‹FL‹¨€M…í„IH‹-ß%H‹U‹BƒÀ‰BH‹Ó%;±1ÒL‰þL‰÷AÿÕI‰ÅH‹EƒhM…í„L‰êIƒ/„¥H…Ò…œøÿÿH‹-‡%M‰õ1ÒéŒþÿÿDH‹CH‰T$8H‰ßÿP0H‹T$8釸ÿÿI‹FH‰T$8L‰÷ÿP0H‹T$8érýÿÿfïÀéðøÿÿH=^è9Oÿÿ…À„øÿÿ1Òé4þÿÿH‰ßèBQÿÿI‰Æéy÷ÿÿH=3èOÿÿ…À„;ÿÿÿIƒ/…mÿÿÿ1ÒI‹GH‰T$8L‰ÿÿP0H‹T$8éBÿÿÿèOÿÿH…À…DÿÿÿH‹L%H5H‹8èMÿÿ1ÒéÀýÿÿHÇ„$èétøÿÿ1ÒL‰þL‰÷èHPÿÿH‰ÂéçþÿÿèËNÿÿH…À…ÖþÿÿH‹ûÿ$H5´ŒH‹8è %L‰öè&CÿÿH…ÀH‰Ã„*Iƒ.„x¿èÖ@ÿÿH…ÀI‰Æ„H‹%¾L‰÷HƒI‰^ H‹ü%I‰Fèó¢ÿÿ…ÀˆAI‹M‰ìHƒèH…ÀI‰…múÿÿI‹FL‰÷ÿP0é^úÿÿfDH‰ßèH§ÿÿH…ÀI‰Å…ùÿÿL‹=-ò$éjûÿÿH‹BH‰×ÿP0é'þÿÿH‰PHL‰pPL‰hXéôûÿÿ€I‹EH‰T$8L‰ïÿP0H‹T$8é|þÿÿ€M‰êE1íL‹=Óñ$éÌúÿÿfDH‹B@H…À„/HƒÆ$é²øÿÿf.„H‹BH‰×ÿP0éZþÿÿHÇ„$øéûÿÿ€I‰ÝE1ö1ÛL‹=qñ$é…úÿÿH‹Mñ$H5ƒºH‹81Àè'AÿÿHP%fïäHÇ„$¸HÇ„$ÀE1äH‰„$ðH‰„$èHþ$L‹= ñ$òd$H‰„$øé:úÿÿL‹sM…ö„.øÿÿL‹{IƒIƒHƒ+„ý¿èó>ÿÿH…ÀH‰Ã„GûÿÿL‰sL‰k I‹GL‹°€M…ö„“L‹ œð$I‹‹BƒÀ‰BH‹‘ð$;™L‰L$01ÒH‰ÞL‰ÿAÿÖL‹L$0I‰ÆI‹ƒhM…ö„¡Hƒ+…øÿÿH‹CH‰ßÿP0éøÿÿ„H9ý$H‹”$ðH‰„$øH‹„$¸éköÿÿ@1ÒH‰ÞL‰ÿè»?ÿÿH…ÀI‰Æu¢M‰ýL‹=ñï$ë]€H= |L‰L$0èß=ÿÿ…ÀL‹L$0„IÿÿÿM‰ýM‰Ïë0f.„M‰ýM‰Ïèõ=ÿÿH…ÀuH‹)ï$H5â{H‹8èj<ÿÿE1ö飸ÿÿfH JnHªlIƒùL‹7%H‰ÎHBðHƒúHLÈH‹Aï$HƒìVH5EH‹81Àè?ÿÿXZéíýÿÿL;{N‹dûIƒÇIƒ$éûÿÿ1ÒL‰îL‰ÇèÊ>ÿÿH…ÀH‰Â…ûÿÿéÐ÷ÿÿf„I‹GL‰ÿÿP0é¤úÿÿ¿è=ÿÿH…ÀI‰Ç„ØIƒEL‰hH‹CL‹°€M…ö„¦L‹ ®î$I‹‹BƒÀ‰BH‹£î$;ÐL‰L$01ÒL‰þH‰ßAÿÖL‹L$0I‰ÆI‹ƒhM…ö„ˆIƒ/„¿M…ö…öÿÿL‹=Qî$M‰êI‰ÝE1ö騸ÿÿM‰ýL‹=9î$é ÷ÿÿ@H‰ÖL‰÷H‰T$8è<ÿÿ…ÀH‹T$8„ÊúÿÿIƒ.I‰Ò…)üÿÿE1íL‹=üí$éÚöÿÿ€H=zL‰D$HL‰T$8èâ;ÿÿ…ÀL‹T$8L‹D$H„3úÿÿI‰ïé–öÿÿè<ÿÿH…ÀI‰ï……öÿÿH‹0í$H5éyH‹8èq:ÿÿéjöÿÿI‹EL‰ïÿP0éMõÿÿH‹YpH‰T$8H…Û„àHƒ{„ÕH‹|$(èf:ÿÿH…ÀI‰Ç„öÿÿH‹T$8H‰×èM:ÿÿH…À„WH‹mí$H‰ÆL‰ÿH‰D$(è =ÿÿIƒ/I‰ÅH‹L$(„°Hƒ)„—M…í„ÊõÿÿL‰îH‹|$ ÿSIƒmI‰Ç…øÿÿI‹EL‰ïÿP0é÷÷ÿÿH‹CH‰ßÿP0éôûÿÿH…À„ôfïÀE1äHºù$H9„$ø„„H{ò$螉ÿÿò$é‰öÿÿL‰ïè¬<ÿÿH‰Ãé„óÿÿM‰ÏL‰,$è¸:ÿÿH…ÀL‹$…þÿÿH‹äë$H5xL‰$H‹8è!9ÿÿL‹$éòýÿÿH=axL‰L$0è7:ÿÿ…ÀL‹L$0„ªóÿÿM‰êM‰ÏéÉýÿÿI‰Õ‹l$Dé$ùÿÿHƒ¼$¸òr‚òY„íõÿÿHœ$°é*ÿÿÿL‰L$0è!:ÿÿH…ÀL‹L$0…`ýÿÿH‹Lë$H5xL‰L$0H‹8èˆ8ÿÿL‹L$0Iƒ/uƒE1öI‹GL‰ÿÿP0é2ýÿÿH‹|ë$H‹QH5q{H‹81ÀèO;ÿÿé<ôÿÿH‹AH‰ÏÿP0éZþÿÿI‹GL‰ÿÿP0H‹L$(é<þÿÿH‹CH‰ßÿP0écøÿÿI‹FL‰÷ÿP0éyøÿÿM‰ý1ÛL‹=%ë$éöóÿÿHÇ„$øékþÿÿ1ÒL‰þH‰ßèº:ÿÿI‰ÆéüÿÿM‰êE1öI‰ÝL‹=êê$ézõÿÿIƒ/…¥óÿÿI‹GL‰ÿÿP0é–óÿÿfïÀéáôÿÿH=ävL‰L$0èº8ÿÿ…ÀL‹L$0„üÿÿéõþÿÿ„M‰ïE1íM‰üL‹=ˆê$éYóÿÿM‰ìL‹=yê$é§óÿÿè7ÿÿH‰Çè/7ÿÿ…À…s÷ÿÿIƒ.M‰ïtM‰ìL‹=Lê$ézóÿÿM‰üE1íE1ÒL‹=7ê$éóÿÿM‰ìéôòÿÿE1öé6óÿÿf.„AVAUATUSHìPH‹-ê%dH‹%(H‰„$H1ÀH…í„&H;5ê$H‰ó„^H‹~H9ý…±Ht$xºH‰ßHÇD$xHÇD$pè­Òÿÿƒøÿ„‹Œ$œƒù…éHM%€=¢%SHl$L¤$àHÇ„$èHÇD$ H‰D$H4gH‰¬$àL‰d$(HÇD$0H‰D$ÆD$U@ÆD$V@HÇD$8HÇD$@ÆD$TÇD$PÆD$WHÇD$HuDL‰âHº%ë „H‹T$(HJH‰L$(H‹HH‰JH‹T$(HÇBH‹@H‹€x\StÐH‹´$ H‰ïèðŒÿÿH…À„H‹”$L‹ h%‰ÐL9È…rHƒ¼$¸„–It$ºH‰ßHÇ„$èHÇ„$àèTÑÿÿƒøÿ„¾‹Œ$ ƒù…¢Hô%€=I%SHT$`H‰l$`HÇD$hH‰D$HêeHÇD$ H‰T$(HÇD$0H‰D$ÆD$U@ÆD$V@HÇD$8HÇD$@ÆD$TÇD$PÆD$WHÇD$Hu9Hr%ëH‹T$(HJH‰L$(H‹HH‰JH‹T$(HÇBH‹@H‹€x\StÐH‹´$H‰ïè°‹ÿÿH…À„ÚH‹”$L‹ (%‰ÐL9È…yHƒ¼$(„=H‰ßèÆ5ÿÿHƒøÿ„T1ö‰ÂH‰ßè°ëÿÿHƒ¼$èt.Hô$H9„$(„ H¼$èòD$èíƒÿÿòD$èb4ÿÿH…À„éHƒ|$xt)HÊó$H9”$¸„ÄH|$xH‰D$è­ƒÿÿH‹D$H‹œ$HdH3%(…<HÄP[]A\A]A^ÃHy%HÇD$xHÇD$pHÇ„$€HÇ„$èH‰„$°H‰„$¨H8ó$HÇ„$àHÇ„$ðH‰„$¸H%H‰„$ H‰„$Húò$H‰„$(é¯þÿÿDHáò$H‰„$¸éVýÿÿH ŽdHîbIƒùL‹{ %H‰ÎHBðHƒúHLÈH‹…å$HƒìVH5‰wH‹81Àè_5ÿÿXZH†%HÇ„$èHÇ„$ðH‰„$ H‰„$HWò$H‰„$(H‹@å$H‹L‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@XL‰pHL‰hPL‰`XDH=ñw蔡ÿÿfïÀéþÿÿHÇ„$¸é+þÿÿ€HÇ„$(éÏýÿÿ€H‹Aä$H5ãaH‹8è‚1ÿÿ1ÀéþÿÿH‹„ä$H5MvºH‹81Àè^4ÿÿH‡%HÇD$xHÇ„$€¾Û/H‰„$°H‰„$¨HVñ$H‰„$¸H‹?ä$H‹L‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@XL‰pHL‰hPL‰`X@H ypH=êvºéèøƒÿÿ1ÀéIýÿÿH‹áã$Hƒ|$xH‹L‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@X„pH¯ð$H9„$¸„*H|$xè—€ÿÿH‹H‹xHH‹hPH‹XXL‰pHL‰hPL‰`XH…ÿt Hƒ/„žH…ít Hƒm„šH…Û„H‹¾ß/HƒèH…ÀH‰…,ÿÿÿH‹C‰t$H‰ßÿP0‹t$éÿÿÿDH‰îèØ2ÿÿ…À…?ùÿÿH‹CH‹MHê`H5juL‹@H‹×â$H‹81Àèµ2ÿÿ1Àé6üÿÿfDH‹Éâ$H‹”$èH‹H…ÒL‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@X„xýÿÿH’ï$H9„$(„H¼$èèwÿÿH‹H‹xHH‹hPH‹XXL‰pHL‰hPL‰`XH…ÿt Hƒ/„™H…ít Hƒm„•H…Û„$ýÿÿHƒ+…ýÿÿH‹CH‰ßÿP0é ýÿÿH Õ`H5_IƒùL‹ %H‰ÎHBðHƒúHLÈH‹Ìá$HƒìVH5ÐsH‹81Àè¦1ÿÿY^éAýÿÿH‹GÿP0éVþÿÿH‹EH‰ïÿP0éWþÿÿH‹GÿP0é[ÿÿÿH‹EH‰ïÿP0é\ÿÿÿH‹rá$H5;sºH‹81ÀèL1ÿÿéêûÿÿHÇ„$¸éÅýÿÿHÇ„$(éÑþÿÿèð-ÿÿ¾ß/é6ýÿÿ¾ß/éýÿÿff.„AVAUATUSH‰óHìàdH‹%(H‰„$Ø1ÀH…ÒHÇD$pHÇD$xHÇ„$€…´H‹NHƒù…vL‹fH‹n H‹F(L‰d$pH‰l$xH‰„$€H‹MH‹¨©€„¢H‹EHcЉÃH9Ð…àƒûÿ„gL‹¬$€I‹MH‹¨©€„iI‹EHcЉÅH9Ð…Ÿƒýÿ„¬L‹-'%M…í„æL;%gà$„±I‹|$I9ý…£Ht$xºL‰çHÇD$xHÇD$pèÿÈÿÿƒøÿ„Ø‹Œ$œƒù…«HŸ%€=ô%SH|$HT$`HÇD$hHÇD$ H‰D$HŒ]H‰|$`H‰T$(HÇD$0H‰D$ÆD$U@ÆD$V@HÇD$8HÇD$@ÆD$TÇD$PÆD$WHÇD$Hu?H%ë fDH‹T$(HJH‰L$(H‹HH‰JH‹T$(HÇBH‹@H‹€x\StÐH‹´$ èSƒÿÿH…À„ìH‹”$L‹ Ë%‰ÐL9È……Hƒ¼$¸„–‰Þ‰êL‰çèeãÿÿèP,ÿÿH…ÀH‰Ã„ŒHƒ|$xtHµë$H9„$¸„H|$xè{ÿÿH‰ØH‹´$ØdH34%(… HÄà[]A\A]A^ÃH…í„xH‰é@H‹AÞ$HƒìH5^qQL ]H 2\H3\A¸H‹81Àèø-ÿÿY^¾31H ŠjH=Ëpºðè ~ÿÿ1Àéhÿÿÿf©„ÉI‹EHƒÀHƒø†kL‰ïè+,ÿÿHcЉÅH9ЄvýÿÿHƒøÿuè,ÿÿH…ÀuDH‹ÉÝ$H5âmH‹8èr*ÿÿèÝ+ÿÿH…À½ÿÿÿÿ„Aýÿÿ¾/1édÿÿÿDHy %HÇD$xHÇD$pHÇ„$€H‰„$°H‰„$¨HDê$H‰„$¸éVþÿÿ€H‹nI‰ÔHƒýt+Ž­þÿÿHƒýtHƒý…¦þÿÿH‹F(H‰„$€H‹C H‰D$xH‹CH‰D$pL‰çèg(ÿÿHƒýI‰Åt,HƒýtGH…íufH‹5,%L‰çIƒíèp*ÿÿH…ÀH‰D$p„xH‹5›%L‰çèS*ÿÿH…ÀH‰D$x„IƒíH‹5 %L‰çè2*ÿÿH…ÀH‰„$€„ÐIƒíM…íL‹d$pH‹l$xéûÿÿH‹6Ü$L‹AH5KlH‰ÑH‹81Àè,ÿÿHƒ+uH‹CH‰ßÿP0fDè[*ÿÿH…À»ÿÿÿÿ„†ûÿÿ¾.1éâýÿÿ©„H‹EHƒÀHƒøwHxbHc‚HÂÿâH‰ïè*ÿÿHcЉÃH9Є1ûÿÿHƒøÿu èö)ÿÿH…Àu‘H‹ÁÛ$H5ÚkH‹8èj(ÿÿéuÿÿÿDHÇ„$¸éØüÿÿ€HbHc‚HÂÿâ1ÛéÚúÿÿ‹]÷ÛéÇúÿÿ‹EHÁàH‰Â‹EH ÐH÷ØHcЉÃH9Є¦úÿÿë„‹]éœúÿÿ‹EHÁàH‰Â‹EH ÐHcЉÃH9Є~úÿÿéYÿÿÿ1íé´úÿÿA‹EHÁàH‰ÂA‹EH ÐHcЉÅH9Є‹úÿÿé%ýÿÿA‹EHÁàH‰ÂA‹EH ÐH÷ØHcЉÅH9ЄcúÿÿéýüÿÿA‹méUúÿÿA‹m÷ÝéJúÿÿH‹‚Ú$HƒìH5ŸmjL GYH rXHsXA¸H‹81Àè8*ÿÿ_¾ 1AXé:üÿÿH‹ÑÙ$H5sWH‹8è'ÿÿ1Àé¡ûÿÿH‹Ú$H5ÝkºH‹81Àèî)ÿÿH%HÇD$xHÇ„$€¾U1H‰„$°H‰„$¨Hææ$H‰„$¸H‹ÏÙ$H‹L‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@XL‰pHL‰hPL‰`X@H fH=Jlºð1Ûè†yÿÿéäúÿÿL‰îè8)ÿÿ…À…MùÿÿI‹D$I‹MHIWH5ÉkL‹@H‹6Ù$H‹81Àè)ÿÿ1Àé£úÿÿDH‹)Ù$H‹T$xH‹H…ÒL‹pHL‹hPL‹`XHÇ@HHÇ@PHÇ@X„$Hõå$H9„$¸„ãH|$xèÝuÿÿH‹H‹xHH‹hPH‹XXL‰pHL‰hPL‰`XH…ÿt Hƒ/„”H…ít Hƒm„H…Û„2H‹¾Y1HƒèH…ÀH‰…âþÿÿH‹C‰t$ H‰ßÿP0‹t$ éËþÿÿH %WH…UIƒùL‹%H‰ÎHBðHƒúHLÈH‹Ø$HƒìVH5 jH‹81Àèö'ÿÿXZéþÿÿH‹GÿP0é`ÿÿÿH‹EH‰ïÿP0éaÿÿÿHÇ„$¸é ÿÿÿ©€…šH‹A`H…À„ËHƒ¸„œH‰ïè•&ÿÿHUH‰ÃH…Û„¢H‹KH‰ÝH÷¨€„EûÿÿH‹¨©€„òH‹EHcЉÃH9Ð…·Hƒm…ÛöÿÿH‹EH‰ïÿP0éÌöÿÿHT$pLKUH5‰å$H‰éL‰çèƒÿÿ…À‰Òúÿÿ¾$1é ùÿÿ©€…ÝH‹A`H…À„ŽHƒ¸„_L‰ïèÎ%ÿÿHQTH‰ÅH…í„eH‹MI‰íH÷¨€„óH‹¨©€„³I‹EHcЉÅH9Ð…xIƒm…MöÿÿI‹EL‰ïÿP0é>öÿÿH‹vÖ$HƒìL DUjH5ŠiH fTHgTA¸H‹81Àè,&ÿÿAY¾1AZé-øÿÿHƒEéªþÿÿIƒEégÿÿÿH‹KéÑ÷ÿÿHƒ¸˜tH‰ïèÏ"ÿÿHvSH‰ÃéUþÿÿèK$ÿÿH…À…âùÿÿH‹ãÕ$H5WSH‹8è¼"ÿÿéÇùÿÿ€H‹ÁÕ$L‹AH5ÖeH‰ÑH‹81Àè‘%ÿÿHƒm…øÿÿH‹EH‰ïÿP0éøÿÿHƒ¸˜tL‰ïèE"ÿÿHìRH‰Åé’þÿÿèÁ#ÿÿH…À…Ö÷ÿÿH‹YÕ$H5ÍRH‹8è2"ÿÿé»÷ÿÿL‰ïè¥#ÿÿHcЉÅH9Є˜þÿÿHƒÀu è|#ÿÿH…ÀuH‹HÕ$H5aeH‹8èñ!ÿÿIƒm…t÷ÿÿƒÍÿéjþÿÿ©„²I‹EHPHƒúw˜H®[HcHÐÿàH‰ïè-#ÿÿHcЉÃH9ЄYýÿÿHƒÀu è#ÿÿH…ÀuH‹ÐÔ$H5édH‹8èy!ÿÿHƒm…~øÿÿƒËÿé+ýÿÿ©„¤H‹EHPHƒúw˜HJ[HcHÐÿàè!ÿÿ¾Y1é¾úÿÿ‹]÷ÛéÞüÿÿ‹EHÁàH‰Â‹EH ÐH÷ØHcЉÃH9Є½üÿÿéoÿÿÿ‹]é°üÿÿ‹EHÁàH‰Â‹EH ÐHcЉÃH9Є’üÿÿéDÿÿÿH‹E1ÛHƒèH…ÀH‰E…eóÿÿé|üÿÿH‰ïè“ÿÿ‰Ãébüÿÿ¾Y1éúÿÿA‹m÷ÝéýÿÿA‹EHÁàH‰ÂA‹EH ÐH÷ØHcЉÅH9ЄñüÿÿédþÿÿA‹méãüÿÿA‹EHÁàH‰ÂA‹EH ÐHcЉÅH9ЄÃüÿÿé6þÿÿI‹E1íHƒèH…ÀI‰E…óÿÿé­üÿÿL‰ïèù’ÿÿ‰Åé“üÿÿfAWAVAUATA‰üUS‰õ‰ÓHìˆH‹„$ÈH‰L$8L‹´$ÀL‹¼$àHÇ„$8HÇ„$0H‰D$HÇ„$¨dH‹%(H‰„$x1ÀH‹øÒ$M…ÀHÇ„$ HÇ„$HÇ„$HÇ„$ÈHÇ„$ÀHÇ„$XHÇ„$PH‰$„wI9À„nH´$8ºL‰ÇL‰L$èD»ÿÿƒøÿ„™‹Œ$\L‹L$ƒù…gHßù$€=4ú$SH¼$ðH”$@HÇ„$HHÇ„$H‰„$ðH½OH‰¼$@H‰”$HÇ„$H‰„$øÆ„$5@Æ„$6@HÇ„$HÇ„$ Æ„$4Ç„$0Æ„$7HÇ„$(uEH%ù$ë H‹”$HJH‰Œ$H‹HH‰JH‹”$HÇBH‹@H‹€x\StÇH‹´$`L‰L$èUuÿÿH…ÀL‹L$„eH‹”$PH‹Èø$‰ÑH9Á… Hƒ¼$xH‹„$p„æM…ÉL‹(„L; $„H´$¨ºL‰ÏHÇ„$¨蟹ÿÿƒøÿ„[‹Œ$̃ù….H?ø$€=”ø$SH¼$ðH”$@HÇ„$HHÇ„$H‰„$ðHNH‰¼$@H‰”$HÇ„$H‰„$øÆ„$5@Æ„$6@HÇ„$HÇ„$ Æ„$4Ç„$0Æ„$7HÇ„$(uEH…÷$ë H‹”$HJH‰Œ$H‹HH‰JH‹”$HÇBH‹@H‹€x\StÇH‹´$ÐèºsÿÿH…À„6H‹”$ÀL‹ 2÷$‰ÐL9È…Hƒ¼$èH‹„$à„€H‹M…öH‰D$„Ï L;4$„Å H´$ºL‰÷HÇ„$è¸ÿÿƒøÿ„—‹Œ$<ƒù…ÇH¤ö$€=ùö$SH¼$ðH”$@HÇ„$HHÇ„$H‰„$ðH‚LH‰¼$@H‰”$HÇ„$H‰„$øÆ„$5@Æ„$6@HÇ„$HÇ„$ Æ„$4Ç„$0Æ„$7HÇ„$(uJHêõ$ë„H‹”$HJH‰Œ$H‹HH‰JH‹”$HÇBH‹@H‹€x\StÇH‹´$@èrÿÿH…À„m H‹”$0L‹ ’õ$‰ÐL9È… Hƒ¼$XH‹„$P„0L‹0H‹4$H‹D$H9ð„{ H…À„r H‹|$H´$ȺHÇ„$Èè_¶ÿÿƒøÿ„—‹Œ$ìƒù…jHÿô$€=Tõ$SH¼$ðH”$@HÇ„$HHÇ„$H‰„$ðHÝJH‰¼$@H‰”$HÇ„$H‰„$øÆ„$5@Æ„$6@HÇ„$HÇ„$ Æ„$4Ç„$0Æ„$7HÇ„$(uEHEô$ë H‹”$HJH‰Œ$H‹HH‰JH‹”$HÇBH‹@H‹€x\StÇH‹´$ðèzpÿÿH…À„rH‹”$àL‹ òó$‰ÐL9È…Hƒ¼$H‹„$„ H‹M…ÿH‰D$X„oL;<$„eH´$XºL‰ÿHÇ„$XèÄ´ÿÿƒøÿ„|‹Œ$|ƒù…OHdó$€=¹ó$SH¼$ðH”$@HÇ„$HHÇ„$H‰„$ðHBIH‰¼$@H‰”$HÇ„$H‰„$øÆ„$5@Æ„$6@HÇ„$HÇ„$ Æ„$4Ç„$0Æ„$7HÇ„$(uJHªò$ë„H‹”$HJH‰Œ$H‹HH‰JH‹”$HÇBH‹@H‹€x\StÇH‹´$€èÚnÿÿH…À„RH‹”$pL‹ Rò$‰ÐL9È…Hƒ¼$˜H‹„$„H‹0H‹Œ$8H‹|$H‹”$¨H‰t$`H‹pH‹@H‰t$hH‰D$pIcÄAƒÄH‰D$xMcäI¯ÅM¯åò HcÅH‰ÆH‰„$€H‰øH¯ÆƒÅòL$HHcíòB$!H¯ïf(Áòd$0òHcÃÃH‰ÆHcÛH‰„$ˆI¯öH‹„$òT$(I¯Þò,*òl$@ò0ò4ò\$ òt$Pè ÿÿH…ÀH‰Å„îòD$(èôÿÿH…ÀH‰Â„xòD$ H‰D$èØÿÿH…ÀI‰ÄH‹T$„ ¿è]ÿÿH…ÀH‰ÃH‹T$„zòD$0L‰`(H‰hH‰P è•ÿÿH…ÀI‰Ä„àòD$(è~ÿÿH…ÀH‰D$„òD$ èeÿÿH…ÀH‰ÅH‹T$„%¿èêÿÿH…ÀI‰ÅH‹T$„GòD$0H‰h(L‰`H‰P è"ÿÿH…ÀH‰Å„8òD$@è ÿÿH…ÀH‰Â„}òD$ H‰D$èïÿÿH…ÀI‰ÄH‹T$„¹¿ètÿÿH…ÀI‰ÆH‹T$„~òD$HL‰`(H‰hH‰P è¬ÿÿH…ÀI‰Ä„’òD$@è•ÿÿH…ÀH‰D$„°òD$ è|ÿÿH…ÀH‰ÅH‹T$„Ë¿èÿÿH…ÀI‰ÃH‹T$„çòD$HH‰h(L‰`H‰P H‰D$è4ÿÿH…ÀH‰ÅL‹\$„úòD$(èÿÿH…ÀH‰ÂL‹\$„!òD$PL‰\$H‰D$èòÿÿH…ÀI‰ÄH‹T$L‹\$„<¿èrÿÿH…ÀI‰ÀH‹T$L‹\$„0òD$0L‰`(H‰hH‰P H‰D$è ÿÿH…ÀI‰ÄL‹D$L‹\$„/òD$(L‰D$L‰\$èuÿÿH…ÀH‰„$L‹\$L‹D$„0òD$PèOÿÿH…ÀH‰ÅL‹\$L‹D$H‹”$„8¿L‰„$L‰\$H‰T$èµÿÿH…ÀI‰ÂH‹T$L‹\$L‹„$„ òD$0H‰h(L‰`H‰P H‰D$èÛÿÿH…ÀH‰ÅL‹T$L‹\$L‹„$„&òD$@L‰”$L‰D$L‰\$è ÿÿH…ÀH‰ÂL‹\$L‹D$L‹”$„ºòD$PL‰”$˜L‰„$L‰\$H‰D$è]ÿÿH…ÀI‰ÄH‹T$L‹\$L‹„$L‹”$˜„V¿èÍÿÿH…ÀH‰ÁH‹T$L‹\$L‹„$L‹”$˜„:òD$HL‰`(H‰hH‰P H‰D$èëÿÿH…ÀI‰ÄH‹L$L‹\$L‹„$L‹”$˜„pòD$@H‰Œ$˜L‰”$L‰D$L‰\$è ÿÿH…ÀH‰„$ L‹\$L‹D$L‹”$H‹Œ$˜„LòD$PèjÿÿH…ÀH‰ÅL‹\$L‹D$L‹”$H‹Œ$˜H‹”$ „V¿H‰Œ$ L‰”$˜L‰„$L‰\$H‰T$è°ÿÿH…ÀI‰ÁH‹T$L‹\$L‹„$L‹”$˜H‹Œ$ „HL‰`H‰P ¿H‰h(H‰Œ$¨L‰”$ L‰„$˜L‰œ$H‰D$èwÿÿH…ÀH‰ÆH‰D$L‹L$L‹œ$L‹„$˜L‹”$ H‹Œ$¨„·H‹@1ÿH‰H‹FH‰óL‰hH‹FL‰pH‹FL‰XH‹FL‰@ H‹FL‰P(H‹FH‰H0H‹FL‰H8èøÿÿH…ÀH‰Å„HƒL‹t$8E1íE1ÿ1ÿH‰l$L‰¬$˜H‹D$H‹œ$˜H9XŽH‹@L‹$ØIƒ$H…ÿt Hƒ/„b1ÿè”ÿÿH…À„JL;4$„|1ÛIƒL‰¤$H‰ÝI9nL‰ÿI‰ÄŽ™I‹FL‹<èIƒH…ÿt Hƒ/„@H‹¼$èˆÿÿH…ÀI‰Å„E1ÒH‰ÆL‰ÿèïaÿÿH…ÀH‰Ã„æIƒm„CI‹D$I;D$ ‡HƒI‹T$H‰ÂHƒÀI‰D$Hƒ+„YHƒÅI9nL‰ÿgÿÿÿIƒ.L‰åL‹¤$„**¿èxÿÿH…ÀH‰Ã„ë)H‹= ð$H‰h1ÒH‰ÆèWaÿÿH…ÀH‰Å„Ÿ)Hƒ+„†)H‹|$H‰îè¤^ÿÿ…À…ò)Hƒm„Ø)Hƒ„$˜L‰çérþÿÿHéï$HÇ„$@H‰„$pH‰„$hHÆÎ$H‰„$xH·ï$éÜðÿÿfH©ï$HÇ„$¨HÇ„$°H‰„$àH‰„$ØHzÎ$H‰„$èHkï$é&òÿÿfDHYï$HÇ„$HÇ„$ H‰„$PH‰„$HH*Î$H‰„$XHï$évóÿÿfDH ï$HÇ„$ÈHÇ„$ÐH‰„$H‰„$øHÚÍ$H‰„$HËî$éÆôÿÿfDH5¹Í$H‰´$èélñÿÿH f?HÆ=IƒùL‹Sè$H‰ÎHBðHƒúHLÈH‹]À$HƒìVH5aRH‹81Àè7ÿÿ_AXH]î$HÇ„$HÇ„$ Ç$Ò H‰„$PH‰„$HH'Í$H‰„$X€ÇD$XE1É1ÉE1ÒE1ÀE1ÛE1öE1í1ÛE1ÿHÇD$HÇD$H…Ût Hƒ+„FM…ít Iƒm„~M…öt Iƒ.„·M…Ût Iƒ+„ðM…Àt Iƒ(„iM…Òt Iƒ*„ŠH…Ét Hƒ)„£M…Ét Iƒ)„´H‹]¿$Hƒ¼$XH‹L‹hHL‹`PH‹hXHÇ@HHÇ@PHÇ@Xt"H,Ì$H9„$˜„H¼$Xè\ÿÿHƒ¼$Èt"HÿË$H9„$„ñH¼$Èèä[ÿÿHƒ¼$8t"HÒË$H9„$x„ÜH¼$8è·[ÿÿHƒ¼$¨t"H¥Ë$H9„$è„ÇH¼$¨èŠ[ÿÿHƒ¼$t"HxË$H9„$X„:H¼$è][ÿÿH‹H‹xHL‹pPH‹XXL‰hHL‰`PH‰hXH…ÿt Hƒ/„ËM…öt Iƒ.„ÌH…ÛtHƒ+u H‹CH‰ßÿP0‹T$‹4$H qJH=JQ1Ûèó]ÿÿHƒ|$tH‹t$H‹H‰$HƒèH…ÀH‰„H‹t$H…ötH‹H‰$HƒèH…ÀH‰„M…ÿtIƒ/u I‹GL‰ÿÿP0H‰ØH‹œ$xdH3%(…#HĈ[]A\A]A^A_ÃDH‹GÿP0é)ÿÿÿ@I‹FL‰÷ÿP0é%ÿÿÿf„H‹FH‰÷ÿP0ébÿÿÿI‹@L‰L$0L‰ÇH‰L$(L‰T$ ÿP0L‹L$0H‹L$(L‹T$ éjýÿÿI‹BL‰L$(L‰×H‰L$ ÿP0L‹L$(H‹L$ éSýÿÿDH‹AL‰L$ H‰ÏÿP0L‹L$ éDýÿÿ€I‹AL‰ÏÿP0é=ýÿÿf„H‹FH‰÷ÿP0éãþÿÿH‹CL‰L$@H‰ßH‰L$8L‰T$0L‰D$(L‰\$ ÿP0L‹L$@H‹L$8L‹T$0L‹D$(L‹\$ éyüÿÿ€I‹EL‰L$@L‰ïH‰L$8L‰T$0L‰D$(L‰\$ ÿP0L‹L$@H‹L$8L‹T$0L‹D$(L‹\$ éAüÿÿ€I‹FL‰L$@L‰÷H‰L$8L‰T$0L‰D$(L‰\$ ÿP0L‹L$@H‹L$8L‹T$0L‹D$(L‹\$ éüÿÿ€I‹CL‰L$8L‰ßH‰L$0L‰T$(L‰D$ ÿP0L‹L$8H‹L$0L‹T$(L‹D$ éÙûÿÿHyé$HÇ„$XHÇ„$`H‰„$H‰„$ˆHJÈ$H‰„$˜H;é$éÖðÿÿfDHÇ„$Xéµüÿÿ€HÇ„$˜ééûÿÿ€HÇ„$éþûÿÿ€HÇ„$xéüÿÿ€HÇ„$èé(üÿÿH‹˜º$H5aLºH‹81Àèr ÿÿH›è$HÇ„$8HÇ„$@Ç$È H‰„$pH‰„$hHeÇ$H‰„$xé@úÿÿH‹1º$H5úKºH‹81Àè ÿÿH4è$HÇ„$¨HÇ„$°Ç$Í H‰„$àH‰„$ØHþÆ$H‰„$èéÙùÿÿH5éÆ$H‰´$xééÿÿH‹µ¹$H5~KºH‹81Àè ÿÿH¸ç$HÇ„$ÈHÇ„$ÐÇ$× H‰„$H‰„$øH‚Æ$H‰„$é]ùÿÿDH5iÆ$H‰´$Xé¼ëÿÿH‹5¹$H5þJºH‹81Àè ÿÿH8ç$HÇ„$XHÇ„$`Ç$Ü H‰„$H‰„$ˆHÆ$H‰„$˜éÝøÿÿH5îÅ$H‰´$éáìÿÿH5›7H û5HƒøI‰ÁH‹¥¸$L‹~à$H‰÷HBùHƒúHMÎHƒìH5”JWH‹81ÀèiÿÿA[[éïýÿÿE1ÉHÇD$Ç$ ÇD$_1ÉE1ÒE1ÀE1ÛE1öE1í1ÛE1ÿHÇD$émøÿÿH5KÅ$H‰´$˜éÞíÿÿH ø6HX5IƒùL‹åß$H‰ÎHBðHƒúHLÈH‹ï·$HƒìVH5óIH‹81ÀèÉÿÿAYAZéµýÿÿÇ$ ÇD$_E1É1ÉE1ÒE1ÀE1ÛE1öE1í1ÛE1äE1ÿHÇD$HÇD$H…ít Hƒm„°H…ÒtHƒ*t]M…ä„§÷ÿÿIƒ,$…œ÷ÿÿI‹D$L‰L$@L‰çH‰L$8L‰T$0L‰D$(L‰\$ ÿP0L‹L$@H‹L$8L‹T$0L‹D$(L‹\$ éZ÷ÿÿ€H‹BL‰L$@H‰×H‰L$8L‰T$0L‰D$(L‰\$ ÿP0L‹L$@H‹L$8L‹T$0L‹D$(L‹\$ ébÿÿÿ€H‹EL‰L$HH‰ïH‰L$@L‰T$8L‰D$0L‰\$(H‰T$ ÿP0L‹L$HH‹L$@L‹T$8L‹D$0L‹\$(H‹T$ éÿÿÿÇ$? ÇD$aE1É1ÉE1ÒE1ÀE1ÛE1öE1ÿHÇD$HÇD$é»þÿÿÇ$Œ ÇD$dE1É1ÉE1ÿHÇD$HÇD$éþÿÿÇ$ ÇD$_E1É1ÉE1ÒE1ÀE1ÛE1öE1í1ÛE1ÿHÇD$HÇD$éNþÿÿH ¸4H3IƒùL‹¥Ý$H‰ÎHBðHƒúHLÈH‹¯µ$HƒìVH5³GH‹81Àè‰ÿÿY^éóûÿÿ1ÉÇ$ ÇD$_E1ÉE1ÒE1ÀE1ÛE1öE1íE1ÿHÇD$HÇD$éÅýÿÿH /4H2IƒùL‹Ý$H‰ÎHBðHƒúHLÈH‹&µ$HƒìVH5*GH‹81ÀèÿÿXZéêûÿÿÇ$" ÇD$`E1É1ÉE1ÒE1ÀE1ÛE1öE1íE1ÿHÇD$HÇD$éõÿÿÇ$$ ÇD$`E1É1ÉE1ÒE1ÀE1ÛE1öE1íE1ÿHÇD$HÇD$éýÿÿE1ÉHÇD$Ç$& ÇD$`1ÉE1ÒE1ÀE1ÛE1öE1íE1ÿHÇD$éÒüÿÿÇ$( ÇD$`éÈýÿÿE1ÉHÇD$Ç$; ÇD$a1ÉE1ÒE1ÀE1ÛE1öE1ÿHÇD$é?ôÿÿH‹ý³$H5ÆEºH‹81Àè×ÿÿéžóÿÿÇ$= ÇD$aE1É1ÉE1ÒE1ÀE1ÛE1öE1äE1ÿHÇD$HÇD$éüÿÿÇ$A ÇD$aE1É1ÉE1ÒE1ÀE1ÛE1ÿHÇD$HÇD$éÞûÿÿÇ$T ÇD$bE1É1ÉE1ÒE1ÀE1ÛE1ÿHÇD$HÇD$éróÿÿÇ$V ÇD$bE1É1ÉE1ÒE1ÀE1ÛE1ÿHÇD$HÇD$é‹ûÿÿE1ÉHÇD$Ç$X ÇD$b1ÉE1ÒE1ÀE1ÛE1ÿHÇD$éIûÿÿÇ$Z ÇD$bE1É1ÉE1ÒE1ÀE1ÿHÇD$HÇD$éûÿÿH‹GÿP0é´ïÿÿE1ÉHÇD$Ç$m ÇD$c1ÉE1ÒE1ÀE1ÿHÇD$éòÿÿI‹EL‰ïÿP0é®ïÿÿÇ$o ÇD$cE1É1ÉE1ÒE1ÀE1äE1ÿHÇD$HÇD$éúÿÿH‹CH‰ßÿP0é˜ïÿÿÇ$q ÇD$cé2ÿÿÿÇ$s ÇD$cE1É1ÉE1ÒE1ÿHÇD$HÇD$é+úÿÿÇ$† ÇD$dE1É1ÉE1ÒE1ÿHÇD$HÇD$éÅñÿÿÇ$ˆ ÇD$dE1É1ÉE1ÒE1ÿHÇD$HÇD$éäùÿÿE1ÉHÇD$Ç$Š ÇD$d1ÉE1ÒE1ÿHÇD$é¨ùÿÿÇ$¡ ÇD$eE1É1ÉE1äE1ÿHÇD$HÇD$égùÿÿE1ÉHÇD$Ç$Ÿ ÇD$e1ÉE1ÿHÇD$éñÿÿH‹GÿP0é’íÿÿL‰áL‹¤$L‹L$L‹T$8H‹l$I‰ÃM‰èÇ$ ÇD$hL‰d$E1öE1í1ÛE1ä1ÒéçøÿÿL‰áL‹¤$L‹L$L‹T$8H‹l$I‰ÀÇ$ ÇD$hL‰d$E1Ûë¸Ç$£ ÇD$eéñùÿÿÇ$¥ ÇD$eE1ÉE1ÿHÇD$HÇD$éqøÿÿH‰ÞL‰çèþþÿ…À„|íÿÿL‰áL‹¤$H‹l$I‰ÛL‹L$L‹T$8Ç$ ÇD$hE1ÀL‰d$é,ÿÿÿÇ$¸ ÇD$fE1ÉE1ÿHÇD$HÇD$éÄïÿÿÇ$º ÇD$fE1ÉE1ÿHÇD$HÇD$éè÷ÿÿE1ÉÇ$õ ÇD$héðöÿÿE1ÉHÇD$Ç$¼ ÇD$fE1ÿHÇD$éš÷ÿÿÇ$Ñ ÇD$_E1ÿHÇD$é5ïÿÿHÇD$Ç$¾ E1ÿÇD$fHÇD$éA÷ÿÿL‹L$H‹l$H‰Á1ÛL‰d$Ç$ ÇD$hE1ÒE1ÀE1ÛE1öE1íE1ä1Òé÷ÿÿH‰D$ H‹‘®$H5ª?H‹l$E1öE1í1ÛH‹8è]ûþÿL‰d$L‹L$E1ÒÇ$ ÇD$hE1ÀE1ÛE1ä1ÒH‹L$ é¬öÿÿè÷úþÿH‹\$H‹l$H‰|$H‹H‰„$HƒèH…ÀH‰u H‹CH‰ßÿP0H‹UHƒú…%H‹EL‹H‹HL‹PL‹XL‹@ L‹p(L‹h0H‹X8IƒHƒIƒIƒIƒIƒIƒEHƒHƒmuZH‹EL‰Œ$°H‰ïH‰Œ$¨L‰”$ L‰„$˜L‰œ$ÿP0L‹Œ$°H‹Œ$¨L‹”$ L‹„$˜L‹œ$H‹-­$I9i„wL‰ÏH‰Œ$¸L‰”$°L‰„$¨L‰œ$ L‰Œ$˜èãûþÿH‹Œ$¸L‹”$°ò„$L‹„$¨L‹œ$ L‹Œ$˜ò¼$f.=YCz„FIƒ)uJI‹AH‰Œ$°L‰ÏL‰”$¨L‰„$ L‰œ$˜ÿP0H‹Œ$°L‹”$¨L‹„$ L‹œ$˜H9i„H‰ÏL‰”$¸L‰„$°L‰œ$¨H‰Œ$ èûþÿL‹”$¸L‹„$°ò„$˜L‹œ$¨H‹Œ$ ò¼$˜f.=•Bz„MHƒ)u:H‹AL‰”$°H‰ÏL‰„$¨L‰œ$ ÿP0L‹”$°L‹„$¨L‹œ$ I9j„ÒL‰×L‰„$¸L‰œ$°L‰”$¨èkúþÿL‹„$¸L‹œ$°ò„$ L‹”$¨ò¼$ f.=ñAz„!Iƒ*u*I‹BL‰„$°L‰×L‰œ$¨ÿP0L‹„$°L‹œ$¨I9k„œL‰ßL‰„$¸L‰œ$°èßùþÿL‹„$¸L‹œ$°ò„$¨ò¼$¨f.=mAz„Iƒ+uI‹CL‰„$°L‰ßÿP0L‹„$°I9h„• L‰ÇL‰„$¸èsùþÿL‹„$¸ò„$°ò¼$°f.= Az„Iƒ(u I‹@L‰ÇÿP0I9n„… L‰÷è'ùþÿò„$¸ò¼$¸f.=Å@z„+ Iƒ.u I‹FL‰÷ÿP0I9m„j L‰ïèãøþÿò„$Àò¼$Àf.=@z„+ Iƒmu I‹EL‰ïÿP0H9k„ H‰ßèžøþÿò„$Èò¼$Èf.=<@z„ Hƒ+u H‹CH‰ßÿP0ƒ¼$脜 òD$Hè#÷þÿH…ÀH‰Å„=òD$(è ÷þÿH…ÀH‰Ã„òD$ èõöþÿH…ÀI‰Å„ÏòD$0èÞöþÿH…ÀI‰Æ„‘òD$@èÇöþÿH…ÀI‰À„VòD$PH‰„$Ðè¨öþÿH…ÀI‰ÃL‹„$Є¿L‰„$ØH‰„$Ðè÷þÿH…ÀI‰ÂL‹œ$ÐL‹„$Ø„º H‹=¯Ò$L‰X@H‰ÆH‰hH‰X L‰h(L‰p0L‰@8H‰„$Ðè¯øþÿH…ÀI‰ÃL‹”$ЄS Iƒ*uH‰„$ÐI‹BL‰×ÿP0L‹œ$ÐL‰ßL‰œ$Ðè‹\ÿÿ…ÀL‹œ$Ј¯Iƒ+u I‹CL‰ßÿP0ò„$è½õþÿH…ÀI‰Ã„^ò„$˜H‰„$Ðè›õþÿH…ÀI‰ÂL‹œ$Є ò„$ H‰„$ØèqõþÿH…ÀI‰ÀL‹œ$ÐL‹”$Ø„Íò„$¨L‰”$àH‰„$Øè7õþÿH…ÀI‰ÆL‹œ$ÐL‹„$ØL‹”$à„mò„$°èõþÿH…ÀI‰ÅL‹œ$ÐL‹„$ØL‹”$à„ ò„$¸èÓôþÿH…ÀH‰ÃL‹œ$ÐL‹„$ØL‹”$à„Õ ò„$Àè¡ôþÿH…ÀH‰ÅL‹œ$ÐL‹„$ØL‹”$à„Š ò„$ÈèoôþÿH…ÀH‰ÁL‹œ$ÐL‹„$ØL‹”$à„< ¿H‰„$èèÙôþÿH…ÀI‰ÁL‹œ$ÐL‹„$ØL‹”$àH‹Œ$è„å H‹=Ô$H‰HPH‰ÆL‰XL‰P L‰@(L‰p0L‰h8H‰X@H‰hHH‰„$ÐèVöþÿH…ÀH‰ÁL‹Œ$Є„ Iƒ)uH‰„$ÐI‹AL‰ÏÿP0H‹Œ$ÐH‰ÏH‰Œ$Ðè2Zÿÿ…ÀH‹Œ$Ј- Hƒ)u H‹AH‰ÏÿP0H‹$H9\$8„á L‹t$8I‹^Hƒûÿ„· H‹D$HƒëH‹@H‹x èZõþÿH…ÀH‰Á„ I‹F1ÒH‰ÎH‰ $H‹<Øè¸DÿÿH…ÀI‰ÁH‹ $„E Hƒ)uH‰$H‹AH‰ÏÿP0L‹ $¿L‰ $è‚óþÿH…ÀH‰ÁL‹ $„ô H‹KÑ$H‰Ï¾H‰ $HƒL‰I H‹0Ñ$H‰Aè—Uÿÿ…ÀH‹ $ˆ¦ Hƒ)u H‹AH‰ÏÿP01ÿèTðþÿH…ÀH‰Á„m H‹|$8H‹GHƒøÿ„C HpÿH‰ $è­5ÿÿH…ÀH‰ÅH‹ $„ Hƒ8uH‹@H‰ïÿP0H‹ $E1íI‰ÎL‰ÿL9mŽêH‹EN‹$èIƒÅIƒ$H…ÿt Hƒ/uH‹GÿP0H‹D$H‹@H‹x è ôþÿH…ÀI‰Ç„†1ÒH‰ÆL‰çèsCÿÿH…ÀH‰ÃtTIƒ/u I‹GL‰ÿÿP0H‰ÞL‰÷èÀ@ÿÿ…ÀuHƒ+u H‹CH‰ßÿP0L‰çéiÿÿÿL‰ñM‰çÇ$ÇD$mE1Éé)õÿÿM‰ùL‰ñM‰çÇ$ÇD$mé õÿÿL‰ñI‰ÁM‰çÇ$ÇD$mE1ÒE1ÀéQóÿÿHƒmL‰ñI‰ÿuH‹EL‰4$H‰ïÿP0H‹ $¿H‰ $èªñþÿH…ÀH‰ÅH‹ $„ªH‹=;Ñ$H‰H1ÒH‰Æè…BÿÿH…ÀH‰Á„sHƒmuH‰$H‹EH‰ïÿP0H‹ $¿H‰ $èRñþÿH…ÀH‰ÅH‹ $„%H‹Ð$¾H‰ïHƒH‰M H‹ìÏ$H‰EèkSÿÿ…ÀˆÝHƒmu H‹EH‰ïÿP01ÿè+îþÿH…ÀH‰Å„¢H‹|$8H¾ÿÿÿÿÿÿÿè3ÿÿH…ÀH‰Ã„tHƒ8u H‹@H‰ßÿP0E1íL‰ÿL9kŽàH‹CN‹$èIƒÅIƒ$H…ÿt Hƒ/uH‹GÿP0H‹D$H‹@H‹x èúñþÿH…ÀI‰Ç„…1ÒH‰ÆL‰çèaAÿÿH…ÀI‰ÆtSIƒ/u I‹GL‰ÿÿP0L‰öH‰ïè®>ÿÿ…ÀuIƒ.u I‹FL‰÷ÿP0L‰çéiÿÿÿM‰ñM‰çÇ$VÇD$n1ÉéóÿÿL‰ùI‰ÁM‰çÇ$SÇD$néûòÿÿH‰ÁM‰çÇ$QÇD$né°ýÿÿHƒ+I‰ÿu H‹CH‰ßÿP0¿è²ïþÿH…ÀH‰Ã„=H‹=GÏ$H‰h1ÒH‰Æè‘@ÿÿH…ÀH‰Å„Hƒ+u H‹CH‰ßÿP0¿èkïþÿH…ÀH‰Ã„ÏH‹Î$¾H‰ßHƒH‰k H‹Î$H‰CèˆQÿÿ…Àˆ‡Hƒ+u H‹CH‰ßÿP0L‹t$8I‹nHƒýÿ„:¿HƒíèÿîþÿH…ÀH‰Ã„H‹ÄÌ$¾H‰ßHƒH‹±Ì$H‰CI‹FH‹èHƒI‹FH‹èH‰C èQÿÿ…Àˆ#Hƒ+u H‹CH‰ßÿP0¿è–îþÿH…ÀH‰Ã„çH‹ƒË$H‹t$H‰ßHƒH‹pË$H‰CH‹FH‹@ HƒH‹F¾H‹@ H‰C èšPÿÿ…Àˆ‰Hƒ+u H‹CH‰ßÿP0Hc¼$ÐH¯|$XH¼$Èÿt$Pÿt$(ÿt$Pÿt$@ÿt$Pÿt$pò¼$øò´$ðò¬$èò¤$àòœ$Øò”$ÐòŒ$Èò„$Àè§Àœ$HƒÄ0ƒ¼$ØtMH‹l$`H‹D$h‰ÚH¯„$€H¯l$x‹´$ÐH‹|$HÅH‹D$pH¯„$ˆHÅH¬$XèÇ£ÿÿòEHcûèªîþÿH…ÀH‰Ã„Hƒ¼$Xt*H ¬$H9„$˜u HÇ„$˜H¼$Xèé;ÿÿHƒ¼$Èt*H׫$H9„$u HÇ„$H¼$Èè´;ÿÿHƒ¼$8t*H¢«$H9„$xu HÇ„$xH¼$8è;ÿÿHƒ¼$¨t*Hm«$H9„$èu HÇ„$èH¼$¨èJ;ÿÿHƒ¼$„PàÿÿH4«$H9„$Xu HÇ„$XH¼$è;ÿÿé!àÿÿ1ÉÇ$ÕÇD$uE1ÉE1ÒE1ÀE1ÛE1öE1íéÿÝÿÿò{ò¼$ÈéìóÿÿòA}ò¼$Àé“óÿÿèøëþÿH…À„ãóÿÿÇ$` ÇD$hE1É1Éë¡Ç$˜ÇD$pE1É1Éë‹1ÉÇ$ÇD$pérÿÿÿÇ$†ÇD$oE1É1Éé\ÿÿÿ1ÉÇ$~ÇD$oéCÿÿÿòAxò¼$°éxòÿÿèeëþÿH…À„ÇòÿÿÇ$\ ÇD$hE1É1ÉE1ÒE1ÀE1ÛéÝÿÿòA~ò¼$¸éxòÿÿè!ëþÿH…À„ÇòÿÿÇ$^ ÇD$hE1É1ÉE1ÒE1ÀE1ÛE1öéÎÜÿÿÇ$|ÇD$oE1É1ÉE1ÒE1ÀE1ÛE1öE1í1Ûé¤ÜÿÿÇ$jÇD$nE1É1Ééxþÿÿ1ÉÇ$bé¦úÿÿE1ÉÇ$_ÇD$n1ÉéQþÿÿ1ÉÇ$Zéúÿÿ1ÉÇ$CéqúÿÿE1ÉÇ$=ÇD$néuÿÿÿÇ$3ÇD$mE1É1Éé;øÿÿE1ÉÇ$+ÇD$méGÿÿÿ1ÛÇ$(ÇD$méÑ÷ÿÿE1ÉÇ$#ÇD$méÿÿÿE1ÉÇ$ ÇD$méÿÿÿÇ$ ÇD$mE1Ééìþÿÿ1ÛÇ$ÇD$mézýÿÿÇ$÷ ÇD$lE1Éé¿þÿÿ1ÛÇ$ï ÇD$léPýÿÿÇ$œ ÇD$jE1É1ÉE1ÀE1öE1í1Ûé?ÛÿÿÇ$ˆ ÇD$jE1É1ÉE1ä1ÒéVãÿÿÇ$† ÇD$jE1É1ÉE1ÒE1ä1Òé5ãÿÿÇ$„ ÇD$jE1É1ÉE1ÒE1ÛE1ä1ÒéãÿÿÇ$‚ ÇD$jE1É1ÉE1ÒE1ÀE1ÛE1ä1ÒéêâÿÿÇ$€ ÇD$jE1É1ÉE1ÒE1ÀE1ÛE1öE1ä1ÒéÀâÿÿ1ÉÇ$~ ÇD$jé[öÿÿE1ÉÇ$| ÇD$jé¢ýÿÿÇ$ì ÇD$léýÿÿ1ÛÇ$ê ÇD$léüÿÿÇ$è ÇD$lE1ÉéaýÿÿH‹ã™$H5$+H‹8è¼æþÿÇ$â ÇD$lE1Éé4ýÿÿÇ$Ö ÇD$kE1Ééýÿÿ1ÛÇ$Ó ÇD$ké°ûÿÿÇ$¹ ÇD$kE1ä1ÒéßáÿÿÇ$· ÇD$kE1ÉE1ä1ÒéÃáÿÿE1ÉÇ$µ ÇD$k1ÉéuÙÿÿ1ÉÇ$³ ÇD$kE1Éé\ÙÿÿÇ$± ÇD$kE1É1É1ÛéAÙÿÿÇ$¯ ÇD$kE1É1ÉE1í1Ûé#ÙÿÿÇ$­ ÇD$kE1É1ÉE1öE1í1ÛéÙÿÿÇ$« ÇD$kéšýÿÿÇ$© ÇD$kE1É1ÉE1ÒE1ÀE1öE1í1ÛéÇØÿÿÇ$Ÿ ÇD$jë×H‹CH‰ßÿP0ékÖÿÿI‰ÚH‹l$H‰ÁL‹L$1ÛL‰d$Ç$! ÇD$hé–éÿÿH‰éI‰ÂH‹l$L‹L$L‰d$Ç$ ÇD$héyôÿÿI‹FL‰÷ÿP0éÇÕÿÿH‹EH‰ïÿP0éÖÿÿH‰éL‹L$H‹l$Ç$$ L‰d$ÇD$hé2ôÿÿÑH…Òˆ´HŸH ÿHƒúH5$)HEÈH‹¡—$H‹81Àè‡çþÿÇ$2 ÇD$héœûÿÿL‰Œ$¸H‰Œ$°L‰”$¨L‰„$ L‰œ$˜è¶åþÿH…ÀL‹œ$˜L‹„$ L‹”$¨H‹Œ$°L‹Œ$¸„\êÿÿÇ$R ÇD$héL×ÿÿÇ$2 ÇD$héûÿÿH‹ö–$H5ß#ºH‹81ÀèÐæþÿÇ$2 ÇD$héåúÿÿòAyò¼$éÖéÿÿH‰Œ$¸L‰”$°L‰„$¨L‰œ$ èóäþÿH…ÀL‹œ$ L‹„$¨L‹”$°H‹Œ$¸„eêÿÿÇ$T ÇD$hE1ÉéŽÖÿÿòyò¼$˜é"êÿÿL‰”$¸L‰„$°L‰œ$¨èƒäþÿH…ÀL‹œ$¨L‹„$°L‹”$¸„¡êÿÿÇ$V ÇD$hE1É1Éé$ÖÿÿòAzò¼$ é[êÿÿL‰„$¸L‰œ$°è äþÿH…ÀL‹œ$°L‹„$¸„ÊêÿÿÇ$X ÇD$hE1É1ÉE1ÒéÆÕÿÿòA{ò¼$¨éêÿÿL‰„$¸èÊãþÿH…ÀL‹„$¸„àêÿÿÇ$Z ÇD$hE1É1ÉE1ÒE1ÛéuÕÿÿf.„AWAV¹ AUATUSH‰õHì¸H‹`•$Ll$@dH‹%(H‰„$¨1ÀL‰ïH…ÒóH«H‰œ$…±H‹FHƒø t.ŽHƒø tHƒø …ûH‹FpH‰„$˜H‹EhH‰„$H‹E`H‰„$ˆH‹EXL‹eH‰„$€H‹EPL‰d$@H‰D$xH‹EHH‰D$pH‹E@H‰D$hH‹E8H‰D$`H‹E0H‰D$XH‹E(H‰D$PH‹E H‰D$HI‹L$H‹¨©€„I‹D$HcЉÅH9Ð…_ƒýÿ„ÖL‹l$HI‹MH‹¨©€„«I‹EHcÐA‰ÄH9Ð…èAƒüÿ„nL‹l$PI‹MH‹¨©€„C I‹EHcЉD$H9Ð…ƒ|$ÿ„L‹„$€H‹D$xL‹t$XL‹l$`L‹|$hL‹L$pI‹HH‰D$H‹¨©€„ I‹@HcЉÁH9Ð…^ ƒùÿ„Å H‹¼$ˆH…ÿ„\H;=“$”ÀH;=Û’$”ÂÂ…ÐH9ß„ÇL‰L$ ‰L$èéáþÿƒøÿ‰D$‹L$L‹L$ …ªèNáþÿH…À‹L$L‹L$ „“¾H ëbDHƒø „)þÿÿHíH ÝHƒøH5Ý%L ‡HOÊŸÂHƒìPH‹›’$¶ÒLDR HºH‹81ÀèjâþÿXZ¾U H üH=Õ%ºXè{2ÿÿ1Àé|@¶À‰D$H‹¼$˜L‹”$H…ÿ„Ð H;=‘’$”ÀH;=Ï‘$”ÂÂuhH9ßtcL‰T$(L‰L$ ‰L$èààþÿƒøÿA‰Ã‹L$L‹L$ L‹T$(u>L‰T$0L‰L$(‰L$ ‰D$è3àþÿH…ÀD‹\$‹L$ L‹L$(L‹T$0t¾N é>ÿÿÿD¶ØI9ÞtI‹FH;t’$… H‹¿$H…Ò„4I9Ý„ÝM‹EL9Â…ÈI9ßtI‹L9Ç… H…Ò„I9ÙtI‹yH9×…S H…Ò„èH‹D$H9ØtH‹xH9×…“ H…Ò„ÈI9Út I‹zH9×…à ASARM‰è‹D$ D‰æ‰ïPQL‰ñÿt$(AQM‰ù‹T$4èÁ½ÿÿHƒÄ0DH‹œ$¨dH3%(…ŠHĸ[]A\A]A^A_ÀH‰ÖL‰ÇH‰T$L‰T$8L‰L$0‰L$(D‰\$ èeàþÿ…ÀH‹T$„ÀH‹q¾$D‹\$ ‹L$(L‹L$0L‹T$8H…ÒI‰Ð…âþÿÿH‹ë$H5 H‹8è,Ýþÿ1Àé]ÿÿÿDL‹fIƒü ‡H#I‰ÖJc HÐÿàH‹FpH‰„$˜H‹EhH‰„$H‹E`H‰„$ˆH‹EXH‰„$€H‹EPH‰D$xH‹EHH‰D$pH‹E@H‰D$hH‹E8H‰D$`H‹E0H‰D$XH‹E(H‰D$PH‹E H‰D$HH‹EH‰D$@L‰÷è/ÛþÿIƒü I‰Ç‡ˆH·Jc HÐÿàH‹s$L‹AH5ˆH‰ÑH‹81ÀèCßþÿHƒmu H‹EH‰ïÿP0fè›ÝþÿH…À½ÿÿÿÿ„ûÿÿ¾> é°üÿÿ©„EI‹D$HƒÀHƒøwHkHc‚HÂÿâfDL‰çèXÝþÿHcЉÅH9Є»úÿÿHƒøÿuè/ÝþÿH…ÀuŠf.„H‹ñŽ$H5 H‹8èšÛþÿéeÿÿÿH‹¦Ž$L‹AH5»H‰ÑH‹81ÀèvÞþÿIƒ,$uI‹D$L‰çÿP0@èËÜþÿH…ÀA¼ÿÿÿÿ„~úÿÿ¾? éßûÿÿf©„<I‹EHƒÀHƒøwH°Hc‚HÂÿâL‰ïèÜþÿHcÐA‰ÄH9Є(úÿÿHƒÀu èeÜþÿH…ÀuH‹1Ž$H5JH‹8èÚÚþÿéuÿÿÿDÇD$éŠûÿÿL‰ïè;ÜþÿHcЉD$H9Є úÿÿHƒÀu èÜþÿH…ÀuH‹Ù$H5òH‹8è‚ÚþÿèíÛþÿH…À…õÇD$ÿÿÿÿéÓùÿÿ€1íéSùÿÿf„A‹l$÷Ýé5ùÿÿ@A‹D$A‹T$HÁàH ÐH÷ØHcЉÅH9Єùÿÿéiþÿÿf„A‹l$é÷øÿÿfDA‹D$HÁàH‰ÂA‹D$H ÐHcЉÅH9Ð„Ïøÿÿé)þÿÿE1äéùÿÿA‹EHÁàH‰ÂA‹EH ÐHcÐA‰ÄH9Ð„Øøÿÿé»þÿÿA‹EA‹UHÁàH ÐH÷ØHcÐA‰ÄH9Є¯øÿÿé’þÿÿfE‹eéŸøÿÿE‹eA÷Ü铸ÿÿH‹5Á¸$L‰÷è9ÚþÿH…ÀH‰D$H„É IƒïH‹5ˆ¸$L‰÷èÚþÿH…ÀH‰D$P„* IƒïH‹5¯·$L‰÷è÷ÙþÿH…ÀH‰D$X„¸ IƒïH‹5Þµ$L‰÷èÖÙþÿH…ÀH‰D$`„Q IƒïH‹5…µ$L‰÷èµÙþÿH…ÀH‰D$h„àIƒïH‹5µ$L‰÷è”ÙþÿH…ÀH‰D$p„xIƒïH‹5#¶$L‰÷èsÙþÿH…ÀH‰D$x„UIƒïH‹5J¶$L‰÷èRÙþÿH…ÀH‰„$€„ìIƒïM…ÿ~wH‹5¶$L‰÷è)ÙþÿH…ÀtH‰„$ˆIƒïM…ÿ~RH‹5¬¸$L‰÷èÙþÿH…ÀtH‰„$IƒïM…ÿ~-H‹57¶$L‰÷èߨþÿH…À„ÏH‰„$˜IƒïM…ÿºL‹d$@éžöÿÿH‹5p·$L‰÷Iƒïè¤ØþÿH…ÀH‰D$@…NþÿÿH‹Eé÷÷ÿÿDI‹EH‹JHôL‹@H‹¦Š$H5'H‹81Àè}Úþÿ1Àé®ùÿÿfD©„MI‹EHƒÀHƒø‡üÿÿHðHc‚HÂÿâÇD$é¢öÿÿE‹UA÷ÚD‰T$é†öÿÿA‹EHÁàH‰ÂA‹EH ÐH÷ØHcЉD$H9ЄaöÿÿécüÿÿA‹E‰D$éLöÿÿA‹EHÁàH‰ÂA‹EH ÐHcЉD$H9Є*öÿÿé,üÿÿH‹Õ‰$L‹AH5êH‰ÑL‰T$L‰L$H‹81Àè›ÙþÿL‹T$L‹L$Iƒ*uI‹BL‰×ÿP0L‹L$@L‰L$èÞ×þÿH…À…-¹ÿÿÿÿL‹L$éöÿÿfD©„[I‹@HƒÀHƒø‡ÓHäHc‚HÂÿâ1ÉéßõÿÿA‹H÷ÙéËõÿÿA‹@HÁàH‰ÂA‹@H ÐH÷ØHcЉÁH9Є¨õÿÿfDH‹)‰$L‰L$H5=H‹8èÍÕþÿL‹L$éKÿÿÿA‹HétõÿÿA‹@HÁàH‰ÂA‹@H ÐHcЉÁH9ЄTõÿÿë°„I‰Ðé(÷ÿÿ„H‹5Q‰$H95Z‰$„Ö H‹5M‰$L‹@H­H‹Né¼ýÿÿE1Ûé¬öÿÿ„L‰ÆL‰T$8L‰L$0‰L$(D‰\$ L‰D$èØþÿ…ÀH‹'¶$L‹D$D‹\$ ‹L$(L‹L$0L‹T$8…«öÿÿI‹GI‹HHHL‹@éLýÿÿH‰ÖL‰L$ H‰T$L‰T$8‰L$0D‰\$(è°×þÿ…ÀH‹T$L‹L$ tH‹»µ$D‹\$(‹L$0L‹T$8éeöÿÿI‹AH‹JHêL‹@éëüÿÿH‰ÖH‰T$L‰T$8L‰L$0‰L$(D‰\$ èP×þÿ…ÀH‹T$tH‹`µ$D‹\$ ‹L$(L‹L$0L‹T$8é%öÿÿH‹D$H‹JHŒH‹@L‹@é†üÿÿH‰ÖL‰T$8L‰L$0‰L$(D‰\$ H‰T$èèÖþÿ…ÀH‹T$D‹\$ ‹L$(L‹L$0L‹T$8…àõÿÿI‹BH‹JH5L‹@é+üÿÿ©€…H‹A`H…À„Hƒ¸„êL‰çè’ÕþÿHH‰ÅH…í„gH‹MI‰ìH÷¨€„÷ÿÿH‹¨©€„GI‹D$HcЉÅH9Ð…“Iƒ,$…(òÿÿI‹D$L‰çÿP0éòÿÿLfH5I•$L‰áL‰êL‰÷è2ÿÿ…À‰"ûÿÿ¾* é–óÿÿ©€…äH‹A`H…À„RHƒ¸„–L‰ïèËÔþÿHNI‰ÄM…ä„)I‹L$M‰åH÷¨€„ ÷ÿÿH‹¨©€„¢I‹EHcÐA‰ÄH9Ð…eIƒm…—ñÿÿI‹EL‰ïÿP0éˆñÿÿL‰ÇL‰L$èÓÓþÿHcЉÁL‹L$H9ЄúñÿÿHƒÀ…Nüÿÿè¡ÓþÿH…ÀL‹L$„;üÿÿé¦ûÿÿfD©€…SH‹A`H…À„šHƒ¸„BL‰ïèêÓþÿHmI‰ÆM…ö„qI‹NM‰õH÷¨€„×H‹¨©€„¤I‹EHcЉD$H9Ð…ñIƒm…ïðÿÿI‹EL‰ïÿP0éàðÿÿ¾@ éòÿÿH‹†„$HƒìH ˜jH5šL DH’A¸ H‹81Àè<ÔþÿY^¾ éÍñÿÿH‹A„$HƒìH5^jL H CHMA¸ H‹81Àè÷Óþÿ_¾ AXé‡ñÿÿ©€…TH‹A`H…À„‘Hƒ¸„‡L‰ÇL‰L$è·ÒþÿL‹L$H5I‰ÂM…Ò„^I‹JM‰ÐH÷¨€„ÃùÿÿH‹¨©€„²I‹@HcЉÁH9Ð…dIƒ(…ðÿÿI‹@L‰L$L‰Ç‰L$ÿP0L‹L$‹L$éòïÿÿ¾F éËðÿÿH‹?ƒ$HƒìL jH5SH AHKA¸ H‹81ÀèõÒþÿAY¾ AZé„ðÿÿH‹ø‚$HƒìH5jL ½H úHA¸ H‹81Àè®ÒþÿA[¾ [é>ðÿÿIƒ$é0üÿÿH‹¨‚$HƒìH5ÅjL mH ªH´A¸ H‹81Àè^Òþÿ]¾ A\éîïÿÿH‹b‚$HƒìH5jL 'H dHnA¸ H‹81ÀèÒþÿA]¾þ A^é§ïÿÿIƒEéaüÿÿH‹‚$HƒìH5.jL ÖH HA¸ H‹81ÀèÇÑþÿA_¾ù XéWïÿÿIƒEéñüÿÿHƒ¸˜„ŠL‰çèzÎþÿH!ÿH‰ÅéûÿÿIƒéûýÿÿH‹“$HƒìH¶ÿjH5§L QH ŽÿA¸ H‹81ÀèIÑþÿX¾ô ZéÚîÿÿHƒ¸˜„ L‰ïèÎþÿH®þI‰ÄéWûÿÿèƒÏþÿH…À…ÚñÿÿH‹$H5þH‹8èôÍþÿé¿ñÿÿ€H‹ù€$L‹AH5H‰ÑH‹81ÀèÉÐþÿIƒ.…=óÿÿI‹FL‰÷ÿP0é.óÿÿHƒ¸˜t@L‰ïè~ÍþÿH%þI‰Æé¯ûÿÿèúÎþÿH…À…!òÿÿH‹’€$H5þH‹8èkÍþÿéòÿÿèÑÎþÿH…À…ÖòÿÿH‹i€$H5ÝýH‹8èBÍþÿé»òÿÿHƒ¸˜„îL‰ÇL‰L$èÍþÿH©ýI‰ÂL‹L$éfüÿÿ©„ŒI‹D$HPHƒú‡ˆHµHcHÐÿàA‹l$÷Ýé’ùÿÿA‹D$HÁàH‰ÂA‹D$H ÐH÷ØHcЉÅH9ЄmùÿÿH‹ð$H5 H‹8è™ÌþÿIƒ,$…^ðÿÿƒÍÿéOùÿÿA‹l$é:ùÿÿA‹D$HÁàH‰ÂA‹D$H ÐHcЉÅH9Єùÿÿë©I‹$1íHƒèH…ÀI‰$…;ëÿÿéùÿÿL‰ïè´ÍþÿHcÐA‰ÄH9Є«ùÿÿHƒÀu èŠÍþÿH…ÀuH‹V$H5oH‹8èÿËþÿIƒm…”ðÿÿAƒÌÿé|ùÿÿ©„àI‹EHPHƒúw–H«HcHÐÿàE‹eA÷Üé<ùÿÿA‹EHÁàH‰ÂA‹EH ÐH÷ØHcÐA‰ÄH9ЄùÿÿéxÿÿÿE‹eé ùÿÿA‹EHÁàH‰ÂA‹EH ÐHcÐA‰ÄH9ЄéøÿÿéIÿÿÿI‹EE1äHƒèH…ÀI‰E…xêÿÿéÒøÿÿL‰L$è§ÌþÿH…ÀL‹L$…±ôÿÿH‹:~$H5®ûH‹8èËþÿL‹L$é‘ôÿÿ©„éI‹EHPHƒú‡·HÙHcHÐÿàA‹E÷؉D$é4ùÿÿA‹EHÁàH‰ÂA‹EH ÐH÷ØHcЉD$H9ЄùÿÿH‹é}$H5H‹8è’ÊþÿIƒm…ðÿÿÇD$ÿÿÿÿéìøÿÿA‹EHÁàH‰ÂA‹EH ÐHcЉD$H9Є¿øÿÿë®I‹EÇD$HƒèH…ÀI‰E…¥éÿÿ馸ÿÿA‹E‰D$éŽøÿÿèòÉþÿA‹@HÁàH‰ÂA‹@H ÐH÷ØHcЉÁH9ЄœùÿÿH‹@}$H5Y L‰D$L‰L$H‹8èßÉþÿL‹D$L‹L$Iƒ(…SóÿÿƒÉÿéjùÿÿ©„€I‹@HPHƒú‡ H§HcHÐÿàH;?}$„ëÿÿH;º|$„öêÿÿé ôÿÿL‰çèO<ÿÿ‰Åé&öÿÿL‰çèàÊþÿHcЉÅH9ЄöÿÿHƒÀ…™üÿÿè³ÊþÿH…À„‹üÿÿéœüÿÿL‰ïè­ÊþÿHcЉD$H9Є„÷ÿÿHƒÀ…kþÿÿè~ÊþÿH…À„]þÿÿénþÿÿL‰ïèØ;ÿÿA‰ÄévöÿÿA‹H÷Ù邸ÿÿA‹HéyøÿÿA‹@HÁàH‰ÂA‹@H ÐHcЉÁH9ЄYøÿÿé¸þÿÿI‹1ÉHƒèH…ÀI‰…eèÿÿéDøÿÿL‰ÇL‰L$L‰D$è ÊþÿHcЉÁL‹D$H9ÐL‹L$„øÿÿHƒÀ…jþÿÿL‰D$L‰L$èÊÉþÿH…ÀL‹L$L‹D$„HþÿÿIƒ(…ÅñÿÿémþÿÿL‰ÇL‰L$L‰D$è;ÿÿL‹D$‰ÁL‹L$é²÷ÿÿL‰ïèí:ÿÿ‰D$éköÿÿL‰àéFèÿÿff.„AWAV¹ AUATI‰÷USHì8H¬$ÀdH‹%(H‰„$(1ÀH‰ïH…ÒóH«…-H‹FHƒø „wHƒø …ÕH‹~pH‰¼$I‹GhM‹oPM‹g8I‹_(I‹o H‰D$8H‰„$I‹G`L‰¬$øL‰¤$àH‰œ$ÐH‰¬$ÈH‰D$(H‰„$I‹GXH‰D$H‰„$I‹GHH‰D$H‰„$ðI‹G@H‰$H‰„$èI‹G0M‹H‰„$ØL‰¼$ÀI‰ÆH…ÿ„ñ H;=Rz$”ÀH;=y$@”Æ@Æu H;= z$…ª¶À‰D$4L‰þL‰çH‰œ$ ƒª§$L‰¼$H‰¬$˜HÇ„$¨HÇ„$°HÇ„$¸è…ÆþÿH…ÀH‰Ã„) H‹5ª¢$L‰ïèª(ÿÿH…ÀI‰Ç„n H‰ÆH‰ßèkÊþÿH…ÀH‰Å„‡ Hƒ+„]Iƒ/„gH‹äx$H9E„2H‰ïèÚÇþÿòD$òT$f.~z„^ Hƒm„;H‹´$˜H‹<$èâÅþÿH…ÀI‰Á„n H‹5¢$L‰ïH‰D$ è(ÿÿH…ÀI‰ÇL‹L$ „q L‰ÏH‰Æè¾ÉþÿH…ÀH‰ÃL‹L$ „u Iƒ)„Iƒ/„H‹2x$H9C„0H‰ßè(ÇþÿòD$ ò\$ f.Ìz„L Hƒ+„âH‹´$ H‹|$è0ÅþÿH…ÀH‰Ã„T H‹5U¡$L‰ïèU'ÿÿH…ÀI‰Ç„Q H‰ÆH‰ßèÉþÿH…ÀH‰Å„b Hƒ+„èIƒ/„ÎH‹w$H9E„­H‰ïè…ÆþÿòD$@òd$@f.%)z„9 Hƒm„ÎòD$è#ÅþÿH…ÀI‰Ç„? òD$ è ÅþÿH…ÀH‰Ã„€òD$@èõÄþÿH…ÀH‰„$¨„tIƒH‹ñv$I9FL‰´$°„g¿è]ÅþÿH…ÀH‰ÆH‰„$¸…ùÇ$eÇD$7E1íE1ö1É1íH‹E1äE1ÉHƒèH…ÀH‰„M…ÿt Iƒ/„èM…Ét Iƒ)„)H‹”$¨H…Òt Hƒ*„2H‹”$°H…Òt Hƒ*„;H…Ét Hƒ)„LH‹”$¸H…Òt Hƒ*„EM…öt Iƒ.„NM…ít Iƒm„VM…ät Iƒ,$„F‹T$‹4$H ¸H=Á E1ÿè9ÿÿH…ítHƒmu H‹EH‰ïÿP0L‰øé—H‹5„¢$L‰çIƒíè¸ÃþÿH…ÀH‰„$À…'I‹GH÷óH çóHƒø H5çL ‘ôHOÊŸÂHƒìPH‹¥u$¶ÒLB HñóH‹81ÀèuÅþÿXZ¾ÅH H= º*è†ÿÿ1ÀH‹Œ$(dH3 %(…ºHÄ8[]A\A]A^A_Ã1ÿé˜úÿÿòsòt$ éÎüÿÿèûÃþÿƒøÿ‰D$4…KûÿÿèiÃþÿH…À„=ûÿÿ¾¾éxÿÿÿfDI‹D$L‰çÿP0éªþÿÿI‹GL‰L$L‰ÿH‰L$ÿP0L‹L$H‹L$éõýÿÿDH‹CL‰L$H‰ßH‰L$ÿP0L‹L$H‹L$M‰Ìé»ýÿÿfI‹AH‰L$L‰ÏÿP0H‹L$é¾ýÿÿ€H‹¼$¨H‰L$H‹GÿP0H‹L$é°ýÿÿfH‹¼$°H‰L$H‹GÿP0H‹L$é§ýÿÿfH‹AH‰ÏÿP0é¥ýÿÿH‹¼$¸H‹GÿP0é§ýÿÿ@I‹FL‰÷ÿP0é£ýÿÿf„I‹EL‰ïÿP0é›ýÿÿòmòl$éÌúÿÿH‹CH‰ßÿP0Iƒ/…™úÿÿI‹GL‰ÿÿP0éŠúÿÿDH‹EH‰ïÿP0é¶úÿÿf„H‹^Hƒû ‡]H‡ûI‰ÔHc˜HÐÿàH‹FpH‰„$I‹GhH‰„$I‹G`H‰„$I‹GXH‰„$I‹GPH‰„$øI‹GHH‰„$ðI‹G@H‰„$èI‹G8H‰„$àI‹G0H‰„$ØI‹G(H‰„$ÐI‹G H‰„$ÈI‹GH‰„$ÀL‰çèw¾þÿHƒû I‰Å‡§HûHc˜HÐÿàf.„H‹5ùž$L‰çèqÀþÿH…ÀH‰„$È„0IƒíH‹5½ž$L‰çèMÀþÿH…ÀH‰„$ЄÆIƒíH‹5é$L‰çè)ÀþÿH…ÀH‰„$Ø„IƒíH‹5 œ$L‰çèÀþÿH…ÀH‰„$à„‘IƒíH‹5±›$L‰çèá¿þÿH…ÀH‰„$è„ÅIƒíH‹5E›$L‰ç轿þÿH…ÀH‰„$ð„@IƒíH‹5Éž$L‰ç虿þÿH…ÀH‰„$ø„×IƒíH‹5­œ$L‰çèu¿þÿH…ÀH‰„$„^IƒíH‹5œ$L‰çèQ¿þÿH…ÀH‰„$„Ð IƒíH‹5=œ$L‰çè-¿þÿH…ÀH‰„$„+ IƒíM…í~SH‹5dœ$L‰çè¿þÿH…ÀtH‰„$IƒíM…í~.LyïH5°$H‰ÙH‰êL‰çèÿÿ…Ày¾žévûÿÿ@H‹„$èL‹¼$ÀH‹¬$ÈH‹œ$ÐL‹¤$àL‹¬$øH‰$H‹„$ðH‹¼$L‹´$ØH‰D$H‹„$H‰D$H‹„$H‰D$(H‹„$H‰D$8éyöÿÿI‹GL‰ÿÿP0éð÷ÿÿI‹AL‰ÏÿP0éÖ÷ÿÿH‹CH‰ßÿP0éøÿÿÇ$ÇD$3E1äE1ö1ÉE1ÉE1ÿ1íE1íéBùÿÿf„ò}ò|$@éQøÿÿI‹GL‰ÿÿP0é#øÿÿH‹CH‰ßÿP0é øÿÿÇ$ÇD$3E1íE1ö1É1íéÒøÿÿfH‹EH‰ïÿP0é#øÿÿÇ$ÇD$3E1íE1ö1É餸ÿÿ@èë½þÿH…À„”öÿÿÇ$!ÇD$31ÀI‰éE1íH‰ÅE1äE1ö1É铸ÿÿ1íÇ$,ÇD$4E1äE1ö1ÉE1ÿéÿÿÿ€Ç$.ÇD$4E1äE1ö1É1íéñþÿÿfÇ$0ëÞ€ÇD$4é0õÿÿèK½þÿH…À„¦öÿÿ1íÇD$4Ç$4E1íE1ö1ÉE1ÿéÑ÷ÿÿÇ$?ÇD$5é{þÿÿ@Ç$AÇD$5E1íE1ö1É1íéš÷ÿÿf.„Ç$CÇD$5E1íE1ö1Éét÷ÿÿ@軼þÿH…À„¹öÿÿÇ$GÇD$51ÀéËþÿÿ@Ç$RÇD$7E1äE1ö1ÉE1É1íéöýÿÿ€A¸¿1ÀHƒÀH‹¬$°L‰|ÆH‹„$¨H‰\þHÇ„$¨J‰DÆH‹EH‹˜€H…Û„uL‹=Îm$I‹‹BƒÀ‰BH‹Ãm$;1ÒH‰ïÿÓH‰ÅI‹ƒhH…í„ãH‹”$¸Hƒ*„H‹”$°HÇ„$¸Hƒ*„áH‹m$H9EHÇ„$°„´H‰ïèü»þÿf.¬z„ Hƒm„Ñò ÙfTÁè ºþÿH…ÀH‰Å„(H‹t$ºH‰Çèr¹þÿH…ÀI‰Á„,H;7m$”ÀL; ul$”ÂÂu L; m$…‘¶ØIƒ)„´…Û„¼H‹ýl$HƒI‰Çéuöÿÿf„òEéJÿÿÿfDH‹¼$°H‹GÿP0é ÿÿÿ@H‹¼$¸H‹GÿP0éÕþÿÿ@H‹EòD$HH‰ïÿP0òD$HéÿÿÿDL‰ÏL‰L$èóºþÿ…À‰ÃL‹L$‰VÿÿÿÇ$†ÇD$8E1äE1ö1ÉE1ÿéÄûÿÿDH‹t$(ºH‰ïè^¸þÿH…ÀI‰Á„ H;#l$”ÀL; ak$”ÂÂu L; ók$…¶ØIƒ)„ …Û…H‹5±”$H‹¼$1ɺƒc™$è& ÿÿH…ÀH‰„$¸„‹ HŒ$HƒìE1Éj1Ò1öL‰çL„$Èè!ÿÿH…ÀH‰„$¸AZA[„y H‹”$¸Hƒ*„ð H‹¼$¨HÇ„$¸H‹GH;Âk$„‹H;­j$„~èbºþÿH…ÀH‰„$¸„ÙH‹@H‹€àH…ÀH‰D$ „ÔHÇD$ÿÿÿÿH‹”$¨Hƒ*„˜ H„$¨HÇ„$¨ÇD$|ÇD$xH‰D$XH„$˜H‰D$`H„$°H‰D$hH„$ H‰D$pHƒ|$ …Ê H‹„$¸H‹ új$H9HH‹L$…B H9HŽì H‹@H‹ÈHƒÁH‰„$¨HƒH‰L$H‹¼$¨H‹¥i$H9G„Π螸þÿòD$ò|$f.=Bz„$ H‹”$¨Hƒ*„¿ H‹5É’$H‹¼$˜1ɺHÇ„$¨è9ÿÿH…ÀH‰„$¨„² HƒìE1É1ÒjL‹D$h1öH‹L$pH‹|$è'ÿÿH…ÀH‰„$ÀAXAY„yH‹”$¨Hƒ*„… H‹¼$°HÇ„$¨H‹GH;Ñh$„¤H;Ìi$„—èy¸þÿH…ÀH‰„$¨„ŸH‹@H‹€àH…ÀH‰D$H„rHƒËÿH‹”$°Hƒ*„‚ Hƒ|$HHÇ„$°…H‹„$¨H‹ Zi$H9H…H9XŽ:H‹@H‹ØHƒÃH‰„$°HƒH‹¼$°H‹h$H9G„‚ è·þÿòD$(ò|$(f.=¬þz„wH‹”$°Hƒ*„÷ H‹53‘$H‹¼$ 1ɺHÇ„$°è£ÿÿH…ÀH‰„$°„ÂHƒìE1É1öjL‹D$x1ÒH‹Œ$€H‹|$ èŽÿÿH…ÀI‰Á^_„H‹”$°Hƒ*„ I‹AH;Sg$HÇ„$°„%H;Bh$„L‰ÏL‰L$8èç¶þÿH…ÀH‰„$°L‹L$8„MH‹@H‹€àH…ÀH‰D$P„I‹IƒÍÿHƒèH…ÀI‰„0 H‰œ$€Hƒ|$P…vH‹„$°H‹ Æg$H9H…L9hŽÀH‹@N‹$èIƒÅIƒ$H‹Šf$I9D$„êL‰çèµþÿòD$8ò|$8f.=#ýz„— Iƒ,$„ÝòD$è´þÿH…ÀH‰D$@„¢ òD$(è´þÿH…ÀI‰Ä„¡ òD$8èí³þÿH…ÀI‰Ç„³ IƒH‹îe$I9F„¿èb´þÿH…ÀI‰À…j L‰ùH‹\$@M‰çÇ$Á ÇD$GE1íéïÿÿ@I‹AL‰ÏÿP0é=ùÿÿÇ$Té£÷ÿÿ@Ç$VéÂîÿÿ@I‹NH…É„ŒîÿÿI‹FHƒHƒH‹¼$°H‰„$°Hƒ/„˜¿H‰L$Hè¾³þÿH…ÀH‰ÆH‰„$¸H‹L$H„ H‰NA¸¿¸éL÷ÿÿ@1ÒH‰ïèµþÿH…ÀH‰Å…±÷ÿÿfÇ$sÇD$7éëôÿÿH=UñH‰t$Hè+³þÿ…ÀH‹t$H„c÷ÿÿëÌòD$HèQ³þÿH…ÀòD$H„Æ÷ÿÿÇ$wÇD$71Àé[õÿÿE1ÉÇ$yÇD$7E1äE1ö1ÉE1ÿé‰ôÿÿÇ$…顸ÿÿèù²þÿH…À…`ÿÿÿH‹)d$H5âðH‹8èj±þÿéEÿÿÿH‹L$8H; Ñd$”ÀH; d$”ÂÂu H; ¡d$…e¶À…À„¸øÿÿ‹\$4…Û…UH‹Ýc$HƒI‰Çé îÿÿH‹"d$HƒìH5?÷j L çâH $âHZâA¸ H‹81ÀèØ³þÿ]¾•A\é]îÿÿL‰ÏL‰L$讲þÿ…À‰ÃL‹L$‰%øÿÿÇ$—ÇD$9E1äE1ö1ÉE1ÿéóÿÿH‹¡c$HƒìH5¾öj L fâH £áHÙáA¸ H‹81ÀèW³þÿA]¾A^éÛíÿÿH‰¼$¸HÇD$ HƒHÇD$é—øÿÿH‹7c$HƒìH5TöjL üáH 9áHoáA¸ H‹81Àèí²þÿA_¾‹XéríÿÿI‹AL‰ÏÿP0éQ÷ÿÿH‹âb$HƒìH1ájH5öõL  áH ÝàA¸ H‹81À蘲þÿX¾†ZéíÿÿH‹b$HƒìH ¯àjH5±õL [áHÕàA¸ H‹81ÀèS²þÿY^¾éÙìÿÿH‰¼$¨HÇD$H1ÛHƒé€ùÿÿH‹àHtàA¸ H‹81Àèò±þÿ_¾|AXéwìÿÿH‹GH‰L$HÿP0H‹L$HéRüÿÿòD$èt¯þÿH…ÀI‰Á„i òD$ H‰D$èX¯þÿH…ÀH‰„$°L‹L$„$ òD$@è7¯þÿH…ÀH‰„$¸L‹L$„4 ¿è·¯þÿH…ÀH‰„$¨L‹L$„ H‹”$°L‰HH‰P H‹”$¸H‰P(HƒEH‹´$¨H‹D$(H‰n0HƒH‰F8IƒEL‰n@H‹=/‹$HÇ„$°HÇ„$¸è±þÿH…ÀH‰„$¸„¥ H‹”$¨Hƒ*„òH‹¼$¸HÇ„$¨èþÿÿ…Àˆ© H‹”$¸Hƒ*„«HÇ„$¸é õÿÿH‹”`$HƒìL bßjH5¨óH –ÞHÌÞA¸ H‹81ÀèJ°þÿAY¾wAZéÎêÿÿL‰Œ$°I‹E1íHÇD$PHƒÀé ùÿÿH‹-`$HƒìH5JójL òÞH /ÞHeÞA¸ H‹81Àèã¯þÿA[¾r[éhêÿÿH‹|$8è¼®þÿ…À‰ŒûÿÿÇ$žÇD$9E1äE1ö1ÉE1ÉE1ÿé‘ïÿÿÇ$–éîûÿÿH‹§_$HƒìH5ÄòjL lÞH ©ÝHßÝA¸ H‹81Àè]¯þÿ]¾mA\éâéÿÿH‹a_$HƒìH5~òjL &ÞH cÝH™ÝA¸ H‹81Àè¯þÿA]¾hA^é›éÿÿH‹¼$¸H‹GÿP0éüóÿÿòò|$é-õÿÿH‹¼$¨H‹GÿP0éTôÿÿH‹¼$¨H‹GÿP0é-õÿÿòA|$ò|$8éøÿÿòò|$(éyöÿÿI‹D$L‰çÿP0éøÿÿH‹¼$¨H‹GÿP0égõÿÿH‹¼$°H‹D$PÿÐH…ÀI‰Ä…£÷ÿÿH‹œ$€è¿¬þÿH…ÀtH‹ë^$H‹2H9ð…* èB¬þÿH‹„$°H‹HQÿH…ÒH‰…~õÿÿH‹¼$°H‹GÿP0éjõÿÿH‹¼$°H‹GÿP0éõõÿÿH‹¼$°H‰D$8H‹GÿP0L‹L$8éSöÿÿI‹AL‰ÏÿP0H‰œ$€éÁöÿÿÇ$ ÇD$DéñýÿÿÇ$> ÇD$EéÝýÿÿÇ$ ÇD$DéÉýÿÿèé«þÿH…À„ÎóÿÿH‰èÇ$3 ÇD$D1íéöíÿÿH‹¼$¸H‹D$ ÿÐH…ÀH‰„$¨…[óÿÿ被þÿH…ÀtH‹Î]$H‹2H9ð…ëè%«þÿH‹„$¸H‹HQÿH…ÒH‰„©HÇ„$¸éÅøÿÿH‹¼$¸H‹GÿP0éAüÿÿH‹¼$¨H‹GÿP0éúûÿÿH;H}®H‹DÈHƒÁH‰„$¨HƒH‰L$éÀòÿÿL‰ó¾º1ÀH‹L$@HƒÀH‰ßL‰D$@I‰LÀM‰dÐ1ÒM‰|ðL‰Æè³ûþÿH…ÀI‰ÄL‹D$@„,Iƒ(„ÑHƒ+„¸Hƒm„ž‹L$4…É„ÀòD$èÌ©þÿH…ÀH‰Ã„áòD$(赩þÿH…ÀH‰Å„¥òD$8èž©þÿH…À„i¿H‰D$8è&ªþÿH…ÀI‰ÇL‹D$8„ L‰@(H‰XH‰ÆH‰h Iƒ$H‹=‰$L‰`0èÑ«þÿH…ÀI‰À„ÇIƒ/„¤L‰ÇL‰D$8èÎÿÿ…ÀL‹D$8ˆÁIƒ(„qH‹5°„$ºL‰çèó§þÿH…ÀI‰À„<H;¸[$”ÃH;öZ$”ÀØu L;ˆ[$…ζÛIƒ(„…Û¸DD$xH‹5R„$ºL‰ç‰D$xè‘§þÿH…ÀI‰À„ÅH;V[$”ÃH;”Z$”ÀØu L;&[$…¿¶ÛIƒ(„~…ÛuG‹L$|…ɉÈuE…À…´L‰åéœóÿÿH‹EH‰ïÿP0éSþÿÿH‹CH‰ßÿP0é9þÿÿI‹@L‰ÇÿP0é þÿÿÇD$|1Àƒ|$x•Àë¯L‰ÇL‰D$8è7©þÿ…À‰ÃL‹D$8‰ÿÿÿL‰ãÇ$ M‰ÄH‰ÝÇD$JE1ö1ÉE1ÉE1ÿéÿéÿÿI‹@L‰ÇÿP0éìþÿÿL‰ÇL‰D$8èä¨þÿ…À‰ÃL‹D$8‰(ÿÿÿL‰ãÇ$0 M‰ÄH‰ÝÇD$LE1ö1ÉE1ÉE1ÿé¬éÿÿÇ$® ÇD$GéôùÿÿÇ$@ ÇD$Eéàùÿÿè¨þÿH…À„{ñÿÿH‰èÇ$k ÇD$E1íé êÿÿH‹¼$¨H‹D$HÿÐH…ÀH‰„$°…ñÿÿè¹§þÿH…ÀtH‹åY$H‹2H9ð…©è<§þÿH‹„$¨H‹HQÿH…ÒH‰„²HÇ„$¨éÓîÿÿÇ$v ÇD$Fé7ùÿÿèW§þÿH…À„[òÿÿH‰èÇ$£ L‰åÇD$FécéÿÿL;h°N‹dèIƒÅIƒ$éîñÿÿH‹\$@I‰ÇÇ$° ÇD$GE1íE1ö1Éé£áÿÿèN¥þÿH‰ÁH‹\$@M‰çÇ$² ÇD$GE1íE1öéyáÿÿH;X+ÿÿÿH‹DØHƒÃH‰„$°HƒéïïÿÿI‹@L‰ÇÿP0ésýÿÿM‰ÄI‰ÞE1ÉÇ$Ï ÇD$G1ÉE1ÿéóçÿÿI‹VH…Ò„ÛñÿÿI‹^HƒHƒIƒ.uI‹FH‰”$ˆL‰÷ÿP0H‹”$ˆ¿H‰”$ˆè ¦þÿH…ÀI‰ÀH‹”$ˆ„«I‰P¾º¸éûÿÿÇ$x ÇD$FE1äE1ö1ÉE1ÿé]çÿÿÇ$¶ÇD$;E1äE1ö1ÉE1ÿé>çÿÿÇ$´ëßÇ$ºëÖÇ$¸ëÍÇ$ÎÇD$;ék÷ÿÿL‰ãÇ$/ I‰ÄH‰Ýé6ýÿÿL‰ãÇ$ I‰ÄH‰ÝéÎüÿÿI‹@L‰ÇÿP0é€ûÿÿH‰D$8I‹GL‰ÿÿP0L‹D$8éCûÿÿL‰ãL‰ùI‰ÄH‰ÝÇ$û ÇD$IE1öE1ÉE1ÿ锿ÿÿI‰ÙL‰ãI‰îH‰ÁM‰ÄH‰ÝÇ$í ÇD$IE1ÿékæÿÿI‰ÙL‰ãI‰îI‰ÄH‰ÝÇ$ë ÇD$I1ÉE1ÿéCæÿÿL‰åI‰ÙE1öÇ$é ÇD$IE1ä1ÉE1ÿéæÿÿL‰åI‰ÁÇ$ç ÇD$IE1äE1ö1ÉE1ÿéùåÿÿH‹œ$€éÓ÷ÿÿÇ$ÑÇD$;é4öÿÿH‹ZV$H‹”$¨L‰ãHƒHƒ*uH‹¼$¨H‹GÿP0H‹”$°HÇ„$¨Hƒ*uH‹¼$°H‹GÿP0H‹”$¸HÇ„$°Hƒ*uH‹¼$¸H‹GÿP0HÇ„$¸H‰ÝL‹=ÎU$éMßÿÿH‹¼$¸H‹GÿP0éCøÿÿÇ$I ÇD$EétõÿÿÇ$G ÇD$Eé`õÿÿH‰ØéMßÿÿH‰Çèõ¡þÿ…À…ÆöÿÿH‰èÇ$ 1íÇD$FéƒåÿÿÇ$ éRýÿÿÇ$ ÇD$DéõÿÿÇ$ ÇD$DéûôÿÿL‰ãÇ$þ M‰ÄH‰ÝÇD$IE1ö1ÉE1ÉE1ÿéwäÿÿH‰Çèp¡þÿ…À…GûÿÿH‰èÇ$e ÇD$E1íéþäÿÿH‹¼$¨H‹GÿP0é:ûÿÿÇ$eÇD$7E1íE1ö1íéOÝÿÿH‰Çè¡þÿ…À…÷ÿÿH‰èÇ$- ÇD$D1íé¥äÿÿÇ$ étüÿÿI‰ÙL‰ùI‰ÕM‰çH‹\$@M‰ÎÇ$Á ÇD$GéòÜÿÿfAWAVAUATUSH‰óHƒì8dH‹%(H‰D$(1ÀH…ÒHÇD$HÇD$HÇD$ …‹H‹NHƒù…L‹fL‹n H‹n(L‰îL‰çè¶ þÿ…Àˆ>ƒøty¿èÏžþÿH…ÀH‰Ã„£HƒEH‰ÚL‰îH‹@L‰çH‰(艞þÿ…Àˆ±Hƒ+u H‹CH‰ßÿP0H‹jS$HƒH‹|$(dH3<%(…LHƒÄ8[]A\A]A^A_ÃL‰îL‰çèõŸþÿH…ÀH‰Ã„H‹@H;¦S$…(H‹S H‹CH‰ÑHÑùH9ÈŽiH9Ð`HƒEH‹SH‰,ÂHƒÀH‰Cé]ÿÿÿfDH…í„­H‰é@H‹yR$HƒìHÙÐQH5ŽåL 8ÑH cÐA¸H‹81Àè0¢þÿXZ¾ËH ÂÞH=ûåºèAòþÿ1Àéÿÿÿf.„H‹nI‰ÔHƒýt(ŽuÿÿÿHƒýtHƒý…nÿÿÿH‹F(H‰D$ H‹C H‰D$H‹CH‰D$L‰çèjþÿHƒýI‰Åt,HƒýtGH…íu_H‹5G|$L‰çIƒíèsŸþÿH…ÀH‰D$„zH‹5–|$L‰çèVŸþÿH…ÀH‰D$„æIƒíH‹55}$L‰çè5ŸþÿH…ÀH‰D$ tOIƒíM…í^L‹d$L‹l$H‹l$ é¹ýÿÿf.„º¾ëH ¯ÝH=èäè3ñþÿ1ÀéöýÿÿH‹ Q$HƒìH ÏjH5!äL ËÏHVÏA¸H‹81ÀèàþÿY^¾¸éŽþÿÿ€¾öºëŽ@¾ ºé{ÿÿÿH‹H‹5 ~$H…Ò„=H‰ßÿÒI‰ÄM…ä„CH‹)P$I9D$…=M‹|$M…ÿ„/¿M‹t$艞þÿH…ÀI‰Å„IƒL‰xHƒEH‰h IƒIƒ,$„{I‹FH‹¨€H…í„÷L‹%P$I‹$‹BƒÀ‰BH‹P$;é1ÒL‰îL‰÷ÿÕI‰ÇI‹$ƒhM…ÿ„æL‰ýIƒm„ Iƒ.„ðH…ítvH‹EHPÿH…ÒH‰U…eüÿÿH‹EH‰ïÿP0éVüÿÿ€º¾Hƒ+…FþÿÿH‹C‰t$ H‰ß‰T$ÿP0‹T$‹t$ é'þÿÿDH‰îH‰ßèMþÿ…À‰üÿÿº¾øë³H‰îL‰çèÞ ÿÿI‰ÅI‹$L‰íHPÿH…ÒI‰$…SÿÿÿI‹D$L‰çL‰íÿP0é@ÿÿÿHT$LWÍH5]]$H‰éL‰çèÒúþÿ…À‰|ýÿÿ¾¼é‡üÿÿI‹FL‰÷ÿP0éÿÿÿI‹EL‰ïÿP0éèþÿÿI‹D$L‰çÿP0éuþÿÿH‹“N$HƒìH5°ájL XÍH ƒÌHÜÌA¸H‹81ÀèIžþÿ_¾³AXéüÿÿH‹@@H…À„ŽHƒÆ$H‰ßÿÐI‰Äé­ýÿÿIƒ,$…îþÿÿE1íéÿÿÿH‹Kéšûÿÿ1ÒL‰îL‰÷èÕþÿH‰Åé8þÿÿH=6Úèœþÿ…À„þÿÿ1íéþÿÿè=œþÿH…ÀH‰Å… þÿÿH‹jM$H5#ÚH‹8諚þÿéñýÿÿèqšþÿH‰ßèéþÿI‰Äé ýÿÿAWAVD‰ÀAUATƒèUSE‰Ç‰ÃHìH‰|$ H‰÷H‰t$8H‰T$(H‰L$0òD$HD‰$‰D$@è œþÿHƒøÿ„HcÛHØE…ÿH‰D$„<ƒ<$ÿ„RH‹|$(èØ›þÿHƒøÿ„†H؃<$ÿH‰D$P„ŒH‹|$0è²›þÿHƒøÿ„ÈH؃<$ÿH‰D$X„Î1ÿèO˜þÿH…ÀI‰Æ„³H‹D$ H‹@H;“L$„H;ŽM$„€H‹|$ è6œþÿH…ÀH‰Å„ØH‹@IÇÄÿÿÿÿH‹€àH…ÀH‰D$ufÇD$ hÇD$(ÈE1ÀE1É1ÉE1ÿE1ä1ÛHÇD$HÇD$E1íHÇD$HÇ$é' H‹D$ HÇD$E1äHƒH‰ÅE1ÿHƒ|$H‰èL‰åI‰Ä…¥H‹ÑL$I9D$…I9l$ŽcI‹D$L‹,èHƒÅIƒEM…ÿt Iƒ/„J I‹MH‹5Çx$H‹H…À„gL‰ïÿÐH‰ÃH…Û„F I‹FI;F ØHƒI‹NH‰ÁHƒÀI‰FHƒ+„ Hƒ|$M‰ï„[ÿÿÿL‰çH‹D$ÿÐH…ÀI‰Å…tÿÿÿè ™þÿH…ÀL‰åtH‹ÉK$H‹2H9ð…Ýè ™þÿHƒm„#1ÿè~–þÿH…ÀH‰D$„Hc $H‹D$L‹d$L‹l$PH™H÷ùH‰ÊH¯ÐI)ÔH‰ÊL1âHÁê?M…ä@•ÆH!òH)ÐH‰ÇH‰D$h‰„$ H‹D$PH™H÷ùH‰ÊH¯ÐI)ÕH‰ÊL1êHÁê?M…í@•ÆH!òH‹t$XH)ÐH‰D$p‰D$`H‹D$XH™H÷ùH‰ÊH¯ÐH)ÖH1ñHÁé?H…ö•ÂH!ÑH)È…ÿH‰D$x‰D$dŽÇD$P1ÿ訕þÿH…ÀH‰Å„p‹D$`…À޹D‹d$dÇD$L‰t$1ÿèw•þÿH…ÀI‰Æ„v1ÛE…ä~I1ÿè]•þÿH…ÀI‰Å„iI‹FI;F ­IƒEI‹VL‰,ÂHƒÀI‰FIƒm„#ƒÃA9Üu·H‹EH;E ¢IƒH‹ML‰4ÁHƒÀH‰EIƒ.„uƒD$‹D$9D$`…^ÿÿÿL‹t$H‹|$H‰îè æþÿ…À…-Hƒm„ƒD$P‹D$P9„$ …òþÿÿH‹|$8è×—þÿHƒøÿ„­H‹|$(‰ÃèÁ—þÿHƒøÿ„qH‹|$0A‰Å誗þÿHƒøÿ„òl$H‰„$ìH‹D$ òY-vßH‹@H;£I$ò¬$€„&H;…H$„H‹|$ è5˜þÿH…ÀH‰Å„› H‹@H‹€àH…ÀH‰„$Є< H‰l$ HÇ„$ˆÿÿÿÿƒëAƒíHÇD$HcÃE1äL‰t$XH‰„$IcÅH‰„$Hƒ¼$Ð…¥H‹L$ H‹ûH$H9Q…YH‹”$ˆH9QŽH‹AH‹ÐH‰D$PHƒH‰ÐHƒÀH‰„$ˆM…ÿtIƒ/u I‹GL‰ÿÿP0H‹=‹t$èvýþÿH…ÀI‰Æ„¤H‹5Cu$H‰Çè»æþÿH…ÀH‰Å„HIƒ.u I‹FL‰÷ÿP0H‹|$PH‰îè‚”þÿ‰„$ðƒÀ„îHƒmu H‹EH‰ïÿP0H‹5jt$H‹|$Pè`æþÿH…ÀH‰D$„6M…ätIƒ,$u I‹D$L‰çÿP0H‹\$Ç„$àHÇ„$Ø‹”$Ø9”$ ŽàHc´$àH‹|$81É1Òè•ùþÿH…ÀH‰Å„šH‹šF$H9E„H‰ïè•þÿò„$ò¼$f.=.Ýz„ÑHƒmu H‹EH‰ïÿP0‹D$@„$àH‹”$H‹|$8H˜H9ÂHNÂ1É1ÒH‰ÆèùþÿH…ÀH‰Å„ÚH‹F$H9E„jH‰ïè •þÿò„$˜ò¼$˜f.=©Üz„`Hƒmu H‹EH‰ïÿP0H‹D$H‹”$ØH‹@H‹ÐHƒH…ÛH‰D$tHƒ+u H‹CH‰ßÿP0H‹5>q$H‹|$PèÔäþÿH…ÀI‰Å„Žò„$ò\„$€èA“þÿH…ÀI‰Ç„=ò”$€òX”$˜f(Âè“þÿH…ÀI‰Ä„ÛH‹E$I9E…˜I‹]H…Û„‹I‹mHƒHƒEIƒm„d¿èn“þÿH…ÀI‰Æ„I‰^I‰í¸IÆ1ÒL‰öL‰ïL‰xL‰` è=äþÿH…ÀH‰Å„¥Iƒ.„ŒIƒm„rH;-=E$”ÀH;-{D$¶Ø”ÂÂu H;- E$…ÅHƒm„÷…Û„î ‹„$ìÇ„$äÇ„$¤ƒèH˜H‰„$ø‹”$¤9T$`޳ Hc´$äH‹|$(1É1Òè÷þÿH…ÀH‰Å„ÄH‹D$H9E„îH‰ïèû’þÿò„$¨ò¼$¨f.=™Úz„fHƒm„N‹„$¤H‹”$H‹|$(ƒÀ‰„$ô‹D$@„$äH˜H9ÐHOÂ1É1ÒH‰ÆèpöþÿH…ÀH‰Å„ÝH‹uC$H9E„¹H‰ïèk’þÿò„$°ò”$°f. Úz„GHƒm„uH‹5Ïn$H‹|$PèmâþÿH…ÀI‰Ä„{ò„$¨ò\„$€èÚþÿH…ÀI‰Æ„òœ$€òXœ$°f(Ãè³þÿH…ÀI‰Å„H‹¸B$I9D$…TM‹|$M…ÿ„FI‹\$IƒHƒIƒ,$u I‹D$L‰çÿP0¿èþþÿH…ÀH‰Å„=I‰ÜL‰}H‰ë¸HÃ1ÒH‰ÞL‰çL‰pL‰h èÊáþÿH…ÀH‰Å„ãHƒ+u H‹CH‰ßÿP0Iƒ,$u I‹D$L‰çÿP0H;-½B$”ÀH;-ûA$¶Ø”ÂÂu H;-ŠB$…þHƒmu H‹EH‰ïÿP0…Û„@‹D$@HÇ„$ȉ„$è‹”$È9T$dŽ‹„$è+$1ÉH‹|$01ÒpHcöè…ôþÿH…ÀH‰Å„ÊH‹ŠA$H9E„úH‰ïè€þÿò„$¸ò¬$¸f.-Øz„•Hƒmu H‹EH‰ïÿP0Hc„$èH‹”$øH‹|$0H9ÐHOÂ1É1ÒH‰ÆèôþÿH…ÀH‰Å„H‹ A$H9E„ëH‰ïèþÿò„$Àò¼$Àf.=ž×z„cHƒmu H‹EH‰ïÿP0H‹5Vl$H‹|$PèüßþÿH…ÀH‰Ã„oò„$¸ò\„$€èiŽþÿH…ÀI‰Ç„ò¤$€òX¤$Àf(ÄèBŽþÿH…ÀH‰Å„²H‹G@$H9C…ˆL‹kM…í„{L‹sIƒEIƒHƒ+u H‹CH‰ßÿP0¿葎þÿH…ÀI‰Ä„ M‰l$L‰ó¸IÄ1ÒL‰æH‰ßH‰h L‰xè_ßþÿH…ÀH‰Å„¡Iƒ,$u I‹D$L‰çÿP0Hƒ+u H‹CH‰ßÿP0H;-R@$”ÀH;-?$D¶ð”ÂÂu H;-@$…š Hƒmu H‹EH‰ïÿP0E…öt‹„$ð1í…À@•Å„ò …í…Á ‹$Hƒ„$È”$èéyýÿÿDI‹GL‰ÿÿP0é§óÿÿf„H‹CH‰ßÿP0éçóÿÿL‰å1ÉHÇD$HÇD$HÇ$ÇD$ ‹ÇD$(ÈE1ÀE1ÉE1ÿE1äHÇD$M…öt Iƒ.„mH…ít Hƒm„H…Ût Hƒ+„®M…ät Iƒ,$„ÎM…ÿt Iƒ/„ïH…Ét Hƒ)„M…Ét Iƒ)„)M…Àt Iƒ(„:‹T$(‹t$ H ËH=ÜÒ1Ûè•ÞþÿHƒ<$tH‹4$H‹H‰D$ HƒèH…ÀH‰„‚H‹T$H…ÒtH‹H‰$HƒèH…ÀH‰tuM…ítIƒmtyH‹t$H…ötH‹H‰$HƒèH…ÀH‰tlH‹T$H…ÒtH‹H‰$HƒèH…ÀH‰u H‹BH‰×ÿP0HÄH‰Ø[]A\A]A^A_ÃH‹FH‰÷ÿP0éoÿÿÿH‹BH‰×ÿP0é|ÿÿÿI‹EL‰ïÿP0éxÿÿÿH‹FH‰÷ÿP0é…ÿÿÿI‹FL‰D$@L‰÷H‰L$8L‰L$0ÿP0L‹D$@H‹L$8L‹L$0éfþÿÿH‹EL‰D$@H‰ïH‰L$8L‰L$0ÿP0L‹D$@H‹L$8L‹L$0éFþÿÿH‹CL‰D$@H‰ßH‰L$8L‰L$0ÿP0L‹D$@H‹L$8L‹L$0é%þÿÿI‹D$L‰D$@L‰çH‰L$8L‰L$0ÿP0L‹D$@H‹L$8L‹L$0éþÿÿfI‹GL‰D$@L‰ÿH‰L$8L‰L$0ÿP0L‹D$@H‹L$8L‹L$0éäýÿÿH‹AL‰D$8H‰ÏL‰L$0ÿP0L‹D$8L‹L$0éÍýÿÿDI‹AL‰D$0L‰ÏÿP0L‹D$0é¾ýÿÿ€I‹@L‰ÇÿP0é·ýÿÿf„H‹A@H…À„aHƒÆ$éƒðÿÿf.„1ÉHÇD$E1íHÇD$HÇ$ÇD$ `ÇD$(ÈE1ÀE1ÉE1ÿE1äHÇD$éùüÿÿ€I;l$EM‹lìHƒÅIƒEéáïÿÿfH‰ÞL‰÷赉þÿ…À„)ðÿÿL‰åÇD$ ÇD$(ÈE1ÀE1É1ÉE1ÿE1äHÇD$HÇD$HÇD$HÇ$éHüÿÿ@ÇD$ 'ÇD$(ÅE1ÀE1É1ÉE1ÿE1äHÇD$HÇD$E1íHÇD$HÇ$é)üÿÿ€H‹Q;$H5ÏH‹8èÚ‡þÿÇD$ +ë˜H‹T$H‰ÐHÐ…íÿÿH‰ÐHÁè?„À„ŽíÿÿH‹ñ:$H5êÎH‹8蚇þÿÇD$ /éUÿÿÿDÇD$ :ÇD$(ÆéCÿÿÿH‰ÂHÐ…híÿÿH‰ÐHÁè?„À„YíÿÿH‹–:$H5ÎH‹8è?‡þÿÇD$ BÇD$(Æéúþÿÿf.„ÇD$ MÇD$(ÇéÛþÿÿH‰ÂHÐ…&íÿÿH‰ÐHÁè?„À„íÿÿH‹.:$H5'ÎH‹8è׆þÿÇD$ UÇD$(Çé’þÿÿL‰ïè ŠþÿH‰Ãé#îÿÿ1É1ÛHÇD$E1íHÇD$HÇ$ÇD$ fékúÿÿ@I‹EL‰ïÿP0éÎïÿÿL‰åéXîÿÿL‰óL‹t$I‰ÄM‰ýÇD$ ¼L‰4$L‹t$ÇD$(ÑE1ÀE1É1ÉE1ÿHÇD$HÇD$HÇD$éúÿÿL‰îL‰÷è+‡þÿ…À„UïÿÿL‰óL‹t$M‰ìÇD$ ¾M‰ýL‰4$L‹t$ë™H‹EH‰ïÿP0éÎíÿÿ1ÉHÇD$M‰ýL‰4$ÇD$ ­ÇD$(ÑéËüÿÿL‰4$1ÉL‹t$1ÛHÇD$M‰ýHÇD$ÇD$ ²ÇD$(ÑédùÿÿL‹t$H‰Ã1ÉHÇD$M‰ýÇD$ ·ÇD$(ÑL‰4$L‹t$HÇD$é'ùÿÿH‰Çè …þÿ…À…íÿÿ1É1ÛHÇD$HÇD$HÇ$M‰ýÇD$ ƒéáøÿÿI‹FL‰÷ÿP0é|îÿÿL‰öH‰ïè†þÿ…À„_îÿÿL‰óL‹t$M‰ýÇD$ ÁÇD$(ÑE1ÀE1É1ÉE1ÿL‰4$E1äL‹t$HÇD$HÇD$HÇD$éŠøÿÿH‹D$ HÇ„$ÐHÇ„$ˆHƒéïÿÿM‰ýL‰4$ÇD$ ÑÇD$(ÔE1ÀE1É1ÉE1ÿE1äHÇD$HÇD$éVøÿÿH‹EH‰ïÿP0éÞíÿÿM‰ýL‰4$ÇD$ ÄL‹t$ÇD$(ÑE1ÀE1É1ÉE1ÿE1ä1ÛHÇD$HÇD$HÇD$éÍ÷ÿÿòuò´$˜é”ðÿÿòuò´$éüïÿÿ‹$Hƒ„$Ø”$àH‹\$é‡ïÿÿM‰ýL‰4$ÇD$ ÛÇD$(Õé!ÿÿÿL‹t$XL‹l$PH‰Ã1É1íL‰4$L‹t$ ÇD$ aÇD$(àE1ÀE1ÉE1ÿE1äé3÷ÿÿL‹t$XL‹l$PH‰Ã1É1íL‰4$L‹t$ ÇD$ UëÃL‹d$L‹|$PéÎíÿÿL‹t$XL‰d$1ÉL‹l$P1Û1íÇD$(ÞE1ÀE1ÉL‰4$E1ÿL‹t$ E1äÇD$ =éÁöÿÿè(„þÿH…À„!ïÿÿL‹t$XL‹l$PH‰ëÇD$(àL‰4$L‹t$ ÇD$ WE1ÀE1É1ÉE1ÿE1ä1íéxöÿÿL‹t$XL‹l$PH‰ëL‰d$ÇD$(ÝL‰4$L‹t$ ÇD$ 2ë¾L‰õL‹t$XL‹l$PH‰Ã1ÉL‰d$L‰4$L‹t$ ÇD$ /ÇD$(ÝE1ÀE1ÉE1ÿE1äé öÿÿL‹t$XL‹l$PH‰Å1É1ÛL‰d$L‰4$L‹t$ ÇD$ -ë¾L‹t$XH‹T$ H‹H‰$HƒèH…ÀH‰u H‹BH‰×ÿP0Hc|$hè\„þÿH…ÀH‰Å„ÈHc|$pèF„þÿH…ÀH‰Á„~Hc|$xH‰$è,„þÿH…ÀI‰ÀH‹ $„<¿H‰D$è­‚þÿH…ÀH‰ÃH‹ $L‹D$„éH‹D$L‰d$M‰ýL‰4$HƒH‰CH‰k H‰K(L‰C0éÀõÿÿH‰ïèƒþÿ…ÀA‰Æ‰SôÿÿL‹t$XL‹l$PH‰ëÇD$(éL‰4$L‹t$ ÇD$ FéWþÿÿM‰ýL‰4$ÇD$ åÇD$(Öé{üÿÿHc´$¤H‹|$1É1ÒènæþÿH…ÀI‰Æ„ÍH‹´$È1É1ÒH‰ÇèNæþÿH…ÀI‰Çt;Iƒ.u I‹FL‰÷ÿP0H‹t$L‰ÿèiùþÿƒÀtTIƒ/…ÕóÿÿI‹GL‰ÿÿP0éÆóÿÿM‰ðL‹t$XL‹l$PH‰Á1Û1íÇD$(ìE1ÉE1ÿL‰4$E1äL‹t$ ÇD$ “éôÿÿL‹t$XL‹l$PL‰ùÇD$(ìE1ÀL‰4$L‹t$ ÇD$ –E1ÉE1ÿE1ä1Û1íéÙóÿÿL‹t$XL‹l$PI‰ÀÇD$(ìL‰4$L‹t$ ÇD$ ‘E1É1ÉE1ÿE1ä1Û1íéŸóÿÿò„$òX„$˜òY!Éè,€þÿH…ÀH‰Ã„¬ò„$¨òX„$°òYöÈè€þÿH…ÀI‰Ä„Iò„$¸òX„$ÀòYËÈèÖþÿH…ÀH‰Å„«H‹D$H‹Ö1$HƒH9P…sL‹hM…í„fL‹xIƒEH‰ÂIƒH‹H‰„$¸HƒèH…ÀH‰u H‹BH‰×ÿP0¿è€þÿH…ÀI‰Æ„æM‰n¸IÆ1ÒL‰öL‰ÿH‰h(H‰XL‰` èÖÐþÿH…ÀH‰Å„xIƒ.u I‹FL‰÷ÿP0Iƒ/u I‹GL‰ÿÿP0ò ÈfïÀòYL$Hò*$òYÁòXÀèæ~þÿH…ÀI‰Ç„ì1ÒH‰ÆH‰ïè½}þÿH…ÀI‰Æ„—Hƒmu H‹EH‰ïÿP0Iƒ/u I‹GL‰ÿÿP0L;5a1$”ÀL;5Ÿ0$¶è”ÂÂu L;5.1$uIƒ.…5ñÿÿI‹FL‰÷ÿP0é&ñÿÿL‰÷è›þÿ…À‰ÅyÙM‰ðL‹t$XL‹l$PÇD$(ëL‰4$L‹t$ ÇD$ „éËýÿÿL‹t$XL‰ùH‰ëL‹l$PI‰ÀÇD$(ëE1ÉE1ÿE1äL‰4$1íL‹t$ ÇD$ éBñÿÿL‹t$XL‹l$PH‰ëH‰Á1íL‰4$L‹t$ ÇD$ ÇD$(ëE1ÀE1ÉE1ÿE1äéñÿÿM‰ðL‹t$XL‰ùL‹l$PH‰Ã1íÇD$(ëE1ÉE1ÿL‰4$E1äL‹t$ ÇD$ {éÊðÿÿM‰ðL‹t$XM‰éL‰ùL‹l$PI‰ïÇD$(ëH‰Ý1ÛL‰4$L‹t$ ÇD$ mé‘ðÿÿ¿èÓ}þÿH…ÀI‰ÆtDL‹|$1ÀéÌýÿÿL‹t$XH‰ÝL‹l$PI‰ÇÇD$(ëE1ÀE1É1É1ÛL‰4$L‹t$ ÇD$ ^é;ðÿÿM‰ðL‹t$XI‰ïL‹l$PH‰ÝH‹L$ÇD$(ëE1É1ÛL‰4$L‹t$ ÇD$ méðÿÿL‹t$XL‹l$PH‰ÝÇD$(ëL‰4$L‹t$ ÇD$ \E1ÀE1É1ÉE1ÿ1ÛéÈïÿÿL‹t$XL‹l$PH‰Å1É1ÛL‰4$L‹t$ ÇD$ Zé‚þÿÿL‹t$XL‹l$PH‰ÝH‰Á1ÛL‰4$L‹t$ ÇD$ 'ÇD$(éE1ÀE1ÉE1ÿE1äéeïÿÿL‹t$XL‹l$PH‰Å1É1ÛL‰4$L‹t$ ÇD$ %ëÃòuò´$ÀéíÿÿL‹t$XL‹l$PH‰Ã1É1íL‰4$L‹t$ ÇD$ ÇD$(èE1ÀE1ÉE1ÿE1äéóîÿÿL‹t$XL‹l$PH‰Ã1É1íL‰4$L‹t$ ÇD$ ëË„$ô‹$”$䉄$¤éGéÿÿò]òœ$¸éìÿÿè|þÿH…À„ìÿÿL‹t$XL‹l$PH‰ëÇD$(èL‰4$L‹t$ ÇD$ éÙ÷ÿÿL‹t$XH‰ÝL‹l$PH‰Ã1ÉÇD$(éE1ÀE1ÉE1ÿL‰4$L‹t$ ÇD$ Bé-îÿÿL‰óL‹t$XM‰éL‰ùL‹l$PI‰ïÇD$(éH‰ÝE1ÀL‰4$1ÛL‹t$ ÇD$ 7éñíÿÿ¿è3{þÿH…ÀI‰ÄtC1Àé¬ìÿÿL‹t$XL‰ùH‰ÝL‹l$PI‰ÇÇD$(éE1ÀE1ÉE1äL‰4$1ÛL‹t$ ÇD$ )éœíÿÿL‹t$XL‰ùL‹l$PI‰ïÇD$(éH‰ÝE1ÀE1É1ÛL‰4$L‹t$ ÇD$ 7écíÿÿL‰d$M‰ýL‰4$ÇD$ ÀI‰îÇD$(í1íE1ÉE1ÿE1äé4íÿÿL‰4$L‰d$M‰ýI‰îÇD$ ¾ÇD$(íé%ùÿÿL‰d$M‰ýL‰4$1ÛI‰îÇD$ ¼1íÇD$(íE1ÀE1ÉE1ÿE1äéÜìÿÿL‰d$M‰ý1ÉL‰4$ÇD$ ºE1ÀÇD$(íE1ÉE1ÿE1äéÛìÿÿèzþÿH…À„’åÿÿL‹t$XL‹l$PH‰ëÇD$(àL‰4$L‹t$ ÇD$ céçõÿÿL‹t$XL‹l$PH‰Ã1É1íL‰4$L‹t$ ÇD$ ¶ÇD$(åE1ÀE1ÉE1ÿE1äé9ìÿÿòuò´$¨éçÿÿèyþÿH…À„«çÿÿL‹t$XL‹l$PH‰ëÇD$(åL‰4$L‹t$ ÇD$ Äé`õÿÿH‹EH‰ïÿP0é|çÿÿòMòŒ$°éEçÿÿL‹t$XL‹l$PH‰Ã1É1íL‰4$L‹t$ ÇD$ ÂéRÿÿÿH‹EH‰ïÿP0飿ÿÿ¿è×xþÿH…ÀH‰ÃtB1ÀéåçÿÿM‰ñL‹t$XL‰åI‰ÇL‹l$PÇD$(æE1À1ÉE1äL‰4$1ÛL‹t$ ÇD$ ÔéAëÿÿM‰ñL‹t$XM‰ïH‰ÙL‰åL‹l$P1ÛÇD$(æE1ÀL‰4$E1äL‹t$ ÇD$ âéëÿÿL‹t$XL‰åL‹l$PI‰ÁÇD$(æE1À1ÉE1ÿE1äL‰4$1ÛL‹t$ ÇD$ ÒéÊêÿÿL‹t$XL‹l$PH‰Å1É1ÛL‰4$L‹t$ ÇD$ ÐÇD$(æE1ÀE1ÉE1ÿE1äéêÿÿL‹t$XH‰ÙL‹l$PH‰ÃL‰åL‰4$L‹t$ ÇD$ íëÁM‰ñL‹t$XH‰ÞM‰üH‰ÃM‰ï1ÉL‹l$PH‰õL‰4$ÇD$(æE1ÀL‹t$ ÇD$ âé*êÿÿH‰ïèxþÿ…À‰Ã‰ðæÿÿL‹t$XL‹l$PH‰ëÇD$(æL‰4$L‹t$ ÇD$ ñé`óÿÿèTwþÿH…À„]çÿÿL‹t$XL‹l$PH‰ëÇD$(èL‰4$L‹t$ ÇD$ é'óÿÿH‹T$ H‹„$ˆH;B¼óÿÿH‹TÂHƒÀH‰„$ˆH‰T$PHƒé£àÿÿH‹|$ H‹„$ÐÿÐH…ÀH‰D$P…†àÿÿL‹t$XèÃvþÿH…À„róÿÿH‹ë($H‹2H9ðutèFvþÿéYóÿÿM‰ýL‰4$ÇD$ I‰îÇD$(ÜE1ÀE1É1ÉE1ÿE1ä1Û1íHÇD$HÇD$éòèÿÿ1ÉHÇD$M‰ýL‰4$ÇD$ þÇD$(ÜéæëÿÿH‰Çè¯tþÿ…Àu€L‰d$M‰ýL‰4$1ÉL‹t$ 1Û1íÇD$ ÇD$(ÜE1ÀE1ÉE1ÿE1äé‡èÿÿL‹t$XM‰üL‰íI‰ÇL‹l$PÇD$(ãE1ÀE1É1ÉL‰4$1ÛL‹t$ ÇD$ éLèÿÿL‹t$XL‰íI‰ÄL‹l$PÇD$(ãL‰4$L‹t$ ÇD$ }éDøÿÿL‹t$XH‰ÅL‹l$P1É1ÛÇD$(ãE1ÀE1ÉE1ÿL‰4$E1äL‹t$ ÇD$ {éãçÿÿH‰ïèÇuþÿ…À‰Ã‰)âÿÿL‹t$XL‹l$PH‰ëÇD$(ãL‰4$L‹t$ ÇD$ œéñÿÿH‹EH‰ïÿP0éúáÿÿèþtþÿH…À„ŒâÿÿL‹t$XL‹l$PH‰ëÇD$(åL‰4$L‹t$ ÇD$ ¸éÑðÿÿI‹EL‰ïÿP0éáÿÿI‹FL‰÷ÿP0éeáÿÿM‰ñL‹t$XL‰íH‰ÃL‹l$P1ÉÇD$(ãE1ÀE1ÿL‰4$E1äL‹t$ ÇD$ ˜éçÿÿM‰ñL‹t$XL‰àH‰ÙM‰üL‹l$PI‰ÇÇD$(ãE1ÀL‰4$1ÛL‹t$ ÇD$ éÈæÿÿI‹EL‰ïÿP0éàÿÿ¿èûsþÿH…ÀI‰Æt1Àé–àÿÿM‰ñL‹t$XL‰àL‰íM‰üL‹l$PI‰ÇÇD$(ãE1ÀL‰4$1ÉL‹t$ 1ÛÇD$ ébæÿÿ@f.„AWAVAUATUSH‰óHƒìXdH‹%(H‰D$H1ÀH…ÒHÇD$HÇD$HÇD$ HÇD$(HÇD$0HÇD$8…€H‹NHƒù…úL‹nL‹v L‹~(L‹f0H‹n8H‹F@L‰l$L‰t$L‰|$ L‰d$(H‰l$0H‰D$8H‹MH‹¨©€„ÎH‹EHcЉÃH9Ð…ƒûÿ„“H‹|$8H‹G$$H9G„åè@sþÿf.ðºz„A‰ØL‰áL‰úL‰öL‰ïè¬ÖÿÿH…À„ H‹t$HdH34%(…×HƒÄX[]A\A]A^A_ÃH‹5™O$L‰çIƒíèÝqþÿH…ÀH‰D$…H‹KH‹ù#$HƒìHs¢QH5·L ¸¢H ã¡A¸H‹81Àè°sþÿXZ¾EH B°H= ¸ºÂèÁÃþÿ1ÀéWÿÿÿf.„òGéÿÿÿfDH‹nHƒý‡aHÛ«I‰ÔHc¨HÐÿà€H‹F@H‰D$8H‹C8H‰D$0H‹C0H‰D$(H‹C(H‰D$ H‹C H‰D$H‹CH‰D$L‰çèºnþÿHƒýI‰Å‡ºH’«Hc¨HÐÿàDH‹5ÁL$L‰çè¹pþÿH…ÀH‰D$„.IƒíH‹5hL$L‰çè˜pþÿH…ÀH‰D$ „½IƒíH‹5ÿK$L‰çèwpþÿH…ÀH‰D$(„UIƒíH‹5¾O$L‰çèVpþÿH…ÀH‰D$0„âIƒíH‹5eO$L‰çè5pþÿH…ÀH‰D$8„ÎIƒíM…í‘L‹l$L‹t$L‹|$ L‹d$(H‹l$0épýÿÿH‹-"$L‹AH5B²H‰ÑH‹81ÀèýqþÿHƒ+uH‹CH‰ßÿP0DèSpþÿH…À»ÿÿÿÿ„Zýÿÿ¾@é"þÿÿ©„}H‹EHƒÀHƒøwH\ªHc‚HÂÿâ€H‰ïèpþÿHcЉÃH9ЄþüÿÿHƒøÿu èçoþÿH…ÀuŠfH‹±!$H5ʱH‹8èZnþÿémÿÿÿDòD$èµoþÿH…ÀòD$„æüÿÿ¾Aéƒýÿÿ@H Á­H=еºÂ¾[è;Áþÿ1ÀéÑüÿÿ@1Ûé~üÿÿf„‹EHÁàH‰Â‹EH ÐHcЉÃH9ЄNüÿÿé]ÿÿÿD‹E‹UHÁàH ÐH÷ØHcЉÃH9Є&üÿÿé5ÿÿÿD‹]éüÿÿ„‹]÷ÛéüÿÿH‹— $HƒìH5´³jL \ŸH ‡žHúžA¸H‹81ÀèMpþÿ_¾'AXé—üÿÿ©€…ŽH‹A`H…À„òHƒ¸„ÃH‰ïèoþÿH•H‰ÃH…Û„ÉH‹KH‰ÝH÷¨€„ËýÿÿH‹¨©€„ÈH‹EHcЉÃH9Ð…Hƒm…4ûÿÿH‹EH‰ïÿP0é%ûÿÿHT$L:žH5-$H‰éL‰çè›Ëþÿ…À‰Iýÿÿ¾0éÐûÿÿH‹Š$HƒìH ŠjH5ž²L HžHíA¸H‹81Àè@oþÿY^¾,é‹ûÿÿH‹E$HƒìL žjH5Y²H 5H¨A¸H‹81ÀèûnþÿAY¾"AZéDûÿÿH‹þ$HƒìH5²jL ÃH îœHaA¸H‹81Àè´nþÿA[¾[éþúÿÿHƒEé¶þÿÿH‹®$HƒìH5˱jL sH žœHA¸H‹81Àèdnþÿ]¾A\é®úÿÿHƒ¸˜tH‰ïè%kþÿHÌ›H‰Ãé.þÿÿè¡lþÿH…À…@üÿÿH‹9$H5­›H‹8èkþÿé%üÿÿ©„¿H‹EHPHƒú‡¼H±¦HcHÐÿà‹]÷Ûéþÿÿ‹EHÁàH‰Â‹EH ÐH÷ØHcЉÃH9ЄòýÿÿH‹ö$H5®H‹8èŸjþÿHƒm…¬ûÿÿƒËÿéÔýÿÿ‹]éÁýÿÿ‹EHÁàH‰Â‹EH ÐHcЉÃH9Є£ýÿÿë¯H‹E1ÛHƒèH…ÀH‰E…ÒøÿÿéýÿÿèjþÿH‰ïèÝþÿ‰ÃéqýÿÿH‰ïè¬kþÿHcЉÃH9Є[ýÿÿHƒÀ…_ÿÿÿèkþÿH…À„QÿÿÿébÿÿÿH‰ééùÿÿf„AWAVM‰ÎAUATA‰üUS‰õ‰ÓHì˜dH‹%(H‰„$ˆ1ÀH‹$M…ÀH‰L$0L‹¬$ÐHÇ„$ˆHÇ„$€HÇ„$øHÇ„$ðHÇ„$hHÇ„$`HÇ„$HÇ„$HÇ„$ØHÇ„$ÐHÇ„$HHÇ„$@HÇ„$¸HÇ„$°HÇ„$(HÇ„$ H‰$„aI9À„XH´$HºL‰Çèóÿÿƒøÿ„À ‹Œ$lƒù…“ H“C$€=èC$SH¼$°H”$HÇ„$HÇ„$ÀH‰„$°Hq™H‰¼$H‰”$ÈHÇ„$ÐH‰„$¸Æ„$õ@Æ„$ö@HÇ„$ØHÇ„$àÆ„$ôÇ„$ðÆ„$÷HÇ„$èuIHÙB$ë€H‹”$ÈHJH‰Œ$ÈH‹HH‰JH‹”$ÈHÇBH‹@H‹€x\StÇH‹´$pè ¿þÿH…À„—H‹”$`L‹ ‚B$‰ÐL9È…Ì"Hƒ¼$ˆH‹„$€„ L;4$H‹H‰D$X„M…ö„H´$¸ºL‰÷HÇ„$¸èTÿÿƒøÿ„‰‹Œ$܃ù…\HôA$€=IB$SH¼$°H”$HÇ„$HÇ„$ÀH‰„$°HÒ—H‰¼$H‰”$ÈHÇ„$ÐH‰„$¸Æ„$õ@Æ„$ö@HÇ„$ØHÇ„$àÆ„$ôÇ„$ðÆ„$÷HÇ„$èuJH:A$ë„H‹”$ÈHJH‰Œ$ÈH‹HH‰JH‹”$ÈHÇBH‹@H‹€x\StÇH‹´$àèj½þÿH…À„_H‹”$ÐL‹ â@$‰ÐL9È…#"Hƒ¼$øH‹„$ð„ L;,$H‹H‰D$`„¾M…턵H´$(ºL‰ïHÇ„$(è´ÿÿƒøÿ„6‹Œ$Lƒù…¤*HT@$€=©@$SH¼$°H”$HÇ„$HÇ„$ÀH‰„$°H2–H‰¼$H‰”$ÈHÇ„$ÐH‰„$¸Æ„$õ@Æ„$ö@HÇ„$ØHÇ„$àÆ„$ôÇ„$ðÆ„$÷HÇ„$èuJHš?$ë„H‹”$ÈHJH‰Œ$ÈH‹HH‰JH‹”$ÈHÇBH‹@H‹€x\StÇH‹´$PèÊ»þÿH…À„ H‹”$@L‹ B?$‰ÐL9È…«Hƒ¼$h„ØH‹”$`H‹„$(L‹T$XH‹2IcÔL‹L$`H‹Œ$¸AƒÄMcäI¯ÒH‰÷H‰´$€H‹´$HM¯âò$HcÕƒÅI¯ÑHcíòd$òB &I¯éòL$ ò\Ìò,HcÓƒÃHcÛH¯ßò<)H¯×H‹=(E$òl$ò|$8òL$òH‹*B$ò4òT$HH‰Þòt$@è9dþÿH…ÀI‰À„=IƒI‹PH‹5¶C$H‹‚H…À„mL‰ÇL‰D$(ÿÐL‹D$(I‰ÅM…í„çIƒ(„)òD$ò\D$è¨cþÿH…ÀH‰D$(„òD$ècþÿH…ÀI‰ÇL‹D$(„gòD$ èscþÿH…ÀI‰ÄL‹D$(„a!ò\$f(ÃòXÃòXD$èIcþÿH…ÀI‰ÆL‹D$(„Š!¿L‰D$èù`þÿH…ÀH‰ÅL‹D$„ "H‹@L‰H‹EL‰xH‹EL‰`H‹EL‰pH‹ $I9E„ "H‰îL‰ïèýÒþÿH…ÀH‰D$„¯"H‹EL‰ëHƒèH…ÀH‰E„÷€Hƒ+„ÎH‹$H9\$…¹#HC$HÇ„$ˆHÇ„$H‰„$ÀH‰„$¸Há!$H‰„$ÈH‹Z@$H‹=3C$H‰ÞèsbþÿH…ÀI‰Å„ÆIƒEI‹UH‹5ïA$H‹‚H…À„”'L‰ïÿÐI‰ÄM…䄿&Iƒm„ëò|$òl$8f(Çò\ïò\Åòl$(èØaþÿH…ÀI‰Å„_'òD$èÁaþÿH…ÀH‰Å„ê'òD$8èªaþÿH…ÀI‰Æ„n(òt$(f(ÆòXÆòXD$è…aþÿH…ÀI‰Ç„‰(¿è?_þÿH…ÀI‰À„Á(H‹@L‰(I‹@H‰hI‹@L‰pI‹@L‰xH‹U$I9D$„Ô(L‰ÆL‰çL‰D$(èBÑþÿH…ÀH‰D$hL‹D$(„3)I‹L‰ãHƒèH…ÀI‰„Ùf„Hƒ+„‘%H‹$H9\$h…W)H„$H‹t$hHœ$ðH¼$ø¹ºI‰ÀH‰„$ˆH‰œ$è˜ÿÿƒøÿ„É*H‹>$H‹=iA$H‰Þè©`þÿH…ÀI‰Ä„‹+HƒH‹5*@$L‰çèʱþÿH…ÀI‰Æ„Iƒ,$„C'òT$@òl$Hf(Âò\êò\Åòl$(è `þÿH…ÀI‰Ä„ ,òD$@è `þÿH…ÀH‰D$P„Á+òD$Hèð_þÿH…ÀI‰ÇL‹D$P„‰,òl$(f(ÅòXÅòXD$@èÆ_þÿH…ÀH‰ÅL‹D$P„Ð+¿L‰D$(èv]þÿH…ÀI‰ÅL‹D$(„[-H‹@L‰ I‹EL‰@I‹EL‰xI‹EH‰hH‹‡$I9F„¯,L‰îL‰÷èzÏþÿH…ÀH‰D$x„Ú.I‹EL‰óHƒèH…ÀI‰E„ü8Hƒ+„*H‹$H9\$x…½/L‹„$ˆH‹t$xH„$`H¼$h¹ºH‰„$èçÿÿƒøÿ„ë0H‹=ß<$èâÆþÿH…ÀI‰Æ„H0H‹5‡>$H‰Çè'°þÿH…ÀI‰Ç„*2Iƒ.„Ü+H‹=R>$è¥ÆþÿH…ÀI‰Æ„¿1H‹š$I9G„71L‰öL‰ÿèÎþÿH…ÀH‰D$p„5I‹L‰ûHƒèH…ÀI‰u I‹FL‰÷ÿP0Hƒ+„5-H‹$H9\$p…77L‹„$ˆH‹t$pH„$H¼$¹ºH‰„$˜èöÿÿƒøÿ„è3H‹„$PH‹H‰œ$H‹XH‹@H‰œ$ H‹$H‰„$ÐH‹D$0H9ØtHƒxuH‹=¾<$èAÄþÿ…Àˆ^¿è_[þÿH…ÀI‰Á„œ2H‹9$òD$L‰L$(HƒI‹QH‰H‹ï8$HƒI‹QH‰BèN]þÿH…ÀI‰ÇL‹L$(„5òD$ L‰L$è-]þÿH…ÀH‰ÅL‹L$„Ã4¿èâZþÿH…ÀI‰ÆL‹L$„R4H‹@¿L‰8I‹FH‰hèˆ]þÿH…ÀH‰ÅL‹L$„¢3H‹==$L‰p 1ÒL‰HH‰Æè^®þÿH…ÀI‰Æ„05Hƒm„5I‹FH;Ì$„k+H;Ç$„^+L‰÷èq^þÿH…ÀH‰Å„L6H‹@H‹€àH…ÀH‰„$Ø„`6I‹HÇ„$¨ÿÿÿÿHƒèH…ÀI‰„85HÇD$PH‰l$Hƒ¼$Ø…Õ6H‹N$H‹t$H‰ÃH9^H‰„$˜…ƒ6H‹œ$¨H9^Ž‘MH‹FL‹4ØH‰ØHƒÀH‰„$¨IƒI‹FH;„$˜„+H;æ $„ù*L‰÷è˜]þÿH…ÀI‰Ä„è\Iƒ.u I‹FL‰÷ÿP0I‹D$L‰çH‹˜àÿÓH…ÀI‰Å„\L‰çÿÓH…ÀI‰Ç„]L‰çÿÓH…À…þ\èë¢þÿ…Àˆ]Iƒ,$u I‹D$L‰çÿP0L‰ïèÉÏþÿHc؃ûÿ„ÎLIƒm„u0H‹3 $I9GH‰„$„H0L‰ÿè!\þÿò„$àò¬$àf.-¿£z„â\Iƒ/„0¿è‹XþÿH…ÀI‰Æ„e6H‹@6$òD$HƒI‹VH‰H‹ 6$HƒI‹VH‰BèZþÿH…ÀI‰Ç„Ü5òD$8èhZþÿH…ÀI‰Å„a6¿è"XþÿH…ÀI‰Ä„-5H‹@¿L‰8I‹D$L‰hèÌZþÿH…ÀI‰Å„^VH‹=Y:$L‰` 1ÒL‰pH‰Æè§«þÿH…ÀI‰Ä„VIƒmu I‹EL‰ïÿP0I‹D$H; $„ï-H;„$˜„á-L‰çè²[þÿH…ÀI‰Å„÷YH‹@H‹€àH…ÀH‰„$è„®VI‹$HÇ„$°ÿÿÿÿHƒèH…ÀI‰$u I‹D$L‰çÿP0H¯œ$L‰l$ H‰œ$0H‹\$PHƒ¼$èH‹|$ …VH‹´$˜H9w…ÔUH‹´$°H9wŽžUH‹GL‹$ðH‰ðHƒÀH‰„$°Iƒ$I‹D$H;„$˜„/-H; $„"-L‰çèËZþÿH…ÀI‰Å„ATIƒ,$u I‹D$L‰çÿP0I‹EL‰ïH‹¨àÿÕH…ÀI‰Æ„ÛWL‰ïÿÕH…ÀI‰Ç„ÈVL‰ïÿÕH…À…MXè þÿ…ÀˆþWIƒmu I‹EL‰ïÿP0L‰÷èüÌþÿƒøÿ‰Å„.XIƒ.u I‹FL‰÷ÿP0H‹„$I9G„/-L‰ÿèWYþÿò„$ðò¬$ðf.-õ z„XIƒ/„\N¿èÁUþÿH…ÀI‰Ä„µNH‹v3$òD$@HƒI‹T$H‰H‹U3$HƒI‹T$H‰Bè³WþÿH…ÀI‰Ç„NòD$HèœWþÿH…ÀI‰Æ„¶O¿èVUþÿH…ÀI‰Å„DOH‹@¿L‰8I‹EL‰pèXþÿH…ÀI‰Æ„ÀNH‹=Ž7$L‰h 1ÒL‰`H‰ÆèܨþÿH…ÀI‰Å„QNIƒ.„xMI‹EH;K $„í+H;„$˜„ß+L‰ïèïXþÿH…ÀI‰Æ„sPH‹@H‹€àH…ÀH‰„$ø„0PI‹EHÇ„$¸ÿÿÿÿHƒèH…ÀI‰E„ªOHcÅL‹l$0L‰t$(H¯„$ H„$0H‰„$8Hƒ¼$øH‹|$(…/OH‹´$˜H9w…ðNH‹´$¸H9wŽÀNH‹GL‹4ðH‰ðHƒÀH‰„$¸IƒI‹FH;„$˜„»*H;T$„®*L‰÷èXþÿH…ÀH‰Å„ÌQIƒ.u I‹FL‰÷ÿP0H‹EH‰ïL‹°àAÿÖH…ÀI‰Ä„ØXH‰ïAÿÖH…ÀI‰Ç„XH‰ïAÿÖH…À…ÞYèWþÿ…ÀˆŠYHƒmu H‹EH‰ïÿP0L‰çè6Êþÿƒøÿ‰„$,„NPIƒ,$„¶GH‹„$I9G„GL‰ÿè‘Vþÿò„$ò¬$f.-/žz„\PIƒ/„AG1ÿèþRþÿH…À„4HL;,$„fGIƒEH‰ßHÇ„$ H‰D$PM‰îH‹´$ I9vŽ˜DI‹FH‹ðH‰ðHƒÀH‰„$ HƒH…ÿt Hƒ/„ÞFò„$àèµTþÿH…ÀI‰Ä„°Jò„$ðè›TþÿH…ÀH‰„$À„AJò„$è|TþÿH…ÀH‰„$È„wIHƒH‹x$H9C„I¿èìTþÿH…ÀH‰Å…žGL‹D$PI‰ÛH‰\$PL‹t$(H‰ëL‹L$ L‹”$ÀH‹´$È1ÒH‹l$L‹|$0HÇD$@ÇD$XTÇD$`E1íHÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HM…É„n Iƒ)…d I‹AL‰œ$ L‰ÏH‰”$˜H‰´$L‰”$ˆL‰„$€ÿP0L‹œ$ H‹”$˜H‹´$L‹”$ˆL‹„$€é DH©3$HÇ„$PH‰„$€H‰„$xH†$H‰„$ˆHw3$éâêÿÿfHi3$HÇ„$¸HÇ„$ÀH‰„$ðH‰„$èH:$H‰„$øH+3$é6ìÿÿfDH3$HÇ„$(HÇ„$0Hú2$H‰„$`H‰„$XHã$H‰„$h1ÀéŒíÿÿ@H5É$H‰´$øéÌëÿÿH vƒHÖIƒùL‹c,$H‰ÎHBðHƒúHLÈH‹m$HƒìVH5q–H‹81ÀèGTþÿY^Hn2$HÇ„$(HÇ„$0ÇD$X8H‰„$`H‰„$XH7$H‰„$hÇD$`€1Û1ÒE1Û1öE1Ò1íE1öE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$hHÇD$M…ÿt Iƒ/„„M…ät Iƒ,$„ÄM…öt Iƒ.„H…ít Hƒm„EM…Òt Iƒ*„†H…öt Hƒ.„·M…Ût Iƒ+„ØH…Òt Hƒ*„éH…Ût Hƒ+„êH‹û$Hƒ¼$H‹L‹hHL‹`PH‹hXHÇ@HHÇ@PHÇ@Xt"HÊ$H9„$X„¼H¼$诟þÿHƒ¼$ˆt"H$H9„$È„§H¼$ˆ肟þÿHƒ¼$øt"Hp$H9„$8„ÂH¼$øèUŸþÿHƒ¼$ht"HC$H9„$¨„­H¼$hè(ŸþÿHƒ¼$Øt"H$H9„$„˜H¼$ØèûžþÿHƒ¼$Ht"Hé$H9„$ˆ„ƒH¼$HèΞþÿHƒ¼$¸t"H¼$H9„$ø„ÞH¼$¸衞þÿHƒ¼$(t"H$H9„$h„ÉH¼$(ètžþÿH‹e$H‹H‹xHH‹XPL‹xXL‰hHL‰`PH‰hXH…ÿt Hƒ/„KH…Ût Hƒ+„LM…ÿtIƒ/u I‹GL‰ÿÿP0‹T$`‹t$XH €H=q•E1ÿè¡þÿH‹\$H…ÛtH‹H‰D$XHƒèH…ÀH‰„H‹t$hH…ötH‹H‰D$HƒèH…ÀH‰„ýH‹\$xH…ÛtH‹H‰D$HƒèH…ÀH‰„ëH‹t$pH…ötH‹H‰D$HƒèH…ÀH‰„ÙH‹\$HH…ÛtH‹H‰D$HƒèH…ÀH‰„ÇH‹4$H…ötH‹H‰D$HƒèH…ÀH‰„¶H‹\$H…ÛtH‹H‰$HƒèH…ÀH‰„¥H‹t$H…ötH‹H‰$HƒèH…ÀH‰„”H‹\$ H…ÛtH‹H‰$HƒèH…ÀH‰„ƒH‹t$(H…ötH‹H‰$HƒèH…ÀH‰„rH‹\$0H…ÛtH‹H‰$HƒèH…ÀH‰„aH‹t$8H…ötH‹H‰$HƒèH…ÀH‰„PH‹\$@H…ÛtH‹H‰$HƒèH…ÀH‰„?H‹t$PH…ötH‹H‰$HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹œ$ˆdH3%(L‰ø…¢!HĘ[]A\A]A^A_Ã@H‹GÿP0é©ýÿÿ@H‹CH‰ßÿP0é¥ýÿÿf„H‹CH‰ßÿP0éâýÿÿH‹FH‰÷ÿP0éôýÿÿH‹CH‰ßÿP0éþÿÿH‹FH‰÷ÿP0éþÿÿH‹CH‰ßÿP0é*þÿÿH‹FH‰÷ÿP0é;þÿÿH‹CH‰ßÿP0éLþÿÿH‹FH‰÷ÿP0é]þÿÿH‹CH‰ßÿP0énþÿÿH‹FH‰÷ÿP0éþÿÿH‹CH‰ßÿP0éþÿÿH‹FH‰÷ÿP0é¡þÿÿH‹CH‰ßÿP0é²þÿÿI‹GL‰œ$˜L‰ÿH‰”$H‰´$ˆL‰”$€ÿP0L‹œ$˜H‹”$H‹´$ˆL‹”$€é-úÿÿI‹D$L‰œ$˜L‰çH‰”$H‰´$ˆL‰”$€ÿP0L‹œ$˜H‹”$H‹´$ˆL‹”$€éìùÿÿI‹FL‰œ$˜L‰÷H‰”$H‰´$ˆL‰”$€ÿP0L‹œ$˜H‹”$H‹´$ˆL‹”$€é¬ùÿÿH‹EL‰œ$˜H‰ïH‰”$H‰´$ˆL‰”$€ÿP0L‹œ$˜H‹”$H‹´$ˆL‹”$€élùÿÿI‹BL‰œ$L‰×H‰”$ˆH‰´$€ÿP0L‹œ$H‹”$ˆH‹´$€é;ùÿÿH‹FL‰œ$ˆH‰÷H‰”$€ÿP0L‹œ$ˆH‹”$€éùÿÿI‹CH‰”$€L‰ßÿP0H‹”$€é ùÿÿH‹BH‰×ÿP0éùÿÿH‹CH‰ßÿP0éùÿÿI‹@L‰ÇÿP0éÈåÿÿHÇ„$Xé3ùÿÿ€HÇ„$ÈéHùÿÿ€HÇ„$øéúÿÿ€HÇ„$hé&úÿÿ€HÇ„$8é-ùÿÿ€HÇ„$¨éBùÿÿ€HÇ„$éWùÿÿ€HÇ„$ˆélùÿÿH‹ û#H5錺H‹81ÀèúJþÿH#)$HÇ„$HHÇ„$PÇD$X.H‰„$€H‰„$xHì$H‰„$ˆé°öÿÿH‹¸ú#H5ŒºH‹81Àè’JþÿH»($HÇ„$¸HÇ„$ÀÇD$X3H‰„$ðH‰„$èH„$H‰„$øéHöÿÿ€H5i$H‰´$ˆéÌßÿÿ@H‹CH‰ßÿP0é#åÿÿf„H‰ßè8¯þÿH…ÀI‰À…³ãÿÿ1íE1öHÇD$ HÇD$HÇ$1ÛHÇD$HÇD$Xj1ÒÇD$`„E1Û1öE1ÒE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xHÇD$hHÇD$éðõÿÿHy$H‹”$`H‰„$hH‹„$(éâÿÿHÇD$0HÇD$1ÛHÇD$pHÇD$x1ÒHÇD$hHÇD$E1ÛÇD$XlÇD$`„1öE1Ò1íE1öE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$(HÇD$ HÇD$HÇ$HÇD$H„M…ÀtIƒ(teM…í„ õÿÿIƒm…þôÿÿI‹EL‰œ$˜L‰ïH‰”$H‰´$ˆL‰”$€ÿP0L‹œ$˜H‹”$H‹´$ˆL‹”$€é¯ôÿÿfI‹@L‰œ$˜L‰ÇH‰”$H‰´$ˆL‰”$€ÿP0L‹œ$˜H‹”$H‹´$ˆL‹”$€éLÿÿÿH‹B@H…À„hHƒÆ$é}áÿÿH •vHõtIƒùL‹‚$H‰ÎHBðHƒúHLÈH‹Œ÷#HƒìVH5‰H‹81ÀèfGþÿAYAZécüÿÿ1íE1öHÇD$ HÇD$HÇ$1ÛHÇD$HÇD$Xo1ÒÇD$`„E1Û1öE1ÒE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xHÇD$hHÇD$é?þÿÿH žuHþsIƒùL‹‹$H‰ÎHBðHƒúHLÈH‹•ö#HƒìVH5™ˆH‹81ÀèoFþÿ_AXéÕûÿÿHÇD$(ÇD$Xq1ÛÇD$`„1ÒE1Û1öE1Ò1íE1öE1äHÇD$PHÇD$@HÇD$8HÇD$0HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$hHÇD$éAýÿÿH‰ßèéªþÿH…À…?7HÇD$0HÇD$HÇD$pHÇD$xHÇD$hÇD$X´ÇD$`…1Û1ÒE1Û1öE1Ò1íE1öE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$(HÇD$ HÇD$HÇ$HÇD$Hé­ñÿÿH‹EH‰ïÿP0éàÿÿ1íHÇD$ HÇD$HÇ$HÇD$HÇD$XÇD$`†1Û1ÒE1Û1öE1ÒE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xé ñÿÿI‹@L‰ÇÿP0é!áÿÿI‹EL‰ïÿP0éàÿÿÇD$XsÇD$`„1Û1ÒE1Û1öE1Ò1íE1öHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(éèýÿÿ1íHÇD$ HÇD$HÇ$HÇD$HÇD$XuÇD$`„1Û1ÒE1Û1öE1ÒHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xHÇD$hHÇD$éÞúÿÿHÇD$ HÇD$HÇ$HÇD$HÇD$Xwé]ÿÿÿM‹uM…ö„éÝÿÿI‹]IƒHƒIƒm„+ ¿èPAþÿH…ÀI‰Ä„"M‰t$I‰l$ H‹CH‹¨€H…í„KH‹÷ò#H‹‹BƒÀ‰BH‹ìò#;­1ÒL‰æH‰ßÿÕH‰ÆH‰D$H‹Ãò#H‹ƒhH…ö„õIƒ,$…€ÝÿÿI‹D$L‰çÿP0épÝÿÿHÇD$0HÇD$1ÛHÇD$pHÇD$x1ÒHÇD$hÇD$XE1ÛÇD$`„1öE1ÒE1öE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$(HÇD$ HÇD$HÇ$HÇD$Hé]ùÿÿI‰ÝÇD$X”ÇD$`„1Û1ÒE1Û1öE1ÒE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$hHÇD$é¹øÿÿH‹7$H…Û„Ù H‹D$H‹xH9û…Ç H‹|$H´$ˆºHÇ„$ˆèÚþÿƒøÿ„㋌$¬ƒù…¶H¹$€=$SH¼$°H”$HÇ„$HÇ„$ÀH‰„$°H—nH‰¼$H‰”$ÈHÇ„$ÐH‰„$¸Æ„$õ@Æ„$ö@HÇ„$ØHÇ„$àÆ„$ôÇ„$ðÆ„$÷HÇ„$èuGHÿ$ë DH‹”$ÈHJH‰Œ$ÈH‹HH‰JH‹”$ÈHÇBH‹@H‹€x\StÇH‹´$°è2”þÿH…À„¼H‹”$ L‹ ª$‰ÐL9È…8Hƒ¼$È…çÚÿÿéÓÚÿÿ1ÒL‰æH‰ßè^?þÿH…ÀH‰D$…åüÿÿI‰ÝHÇD$0HÇD$HÇD$pHÇD$x1ÛHÇD$hÇD$Xš1ÒÇD$`„E1Û1öE1Ò1íE1öéùüÿÿH‹#ï#H5쀺H‹81Àèý>þÿH&$L‹L$HÇ„$HÇ„$ˆÇD$X¥1ÛH‰„$ÀH‰„$¸Hèû#ÇD$`„1ÒE1ÛH‰„$ÈH‹$1öE1Ò1íE1öE1äE1ÿE1íHƒE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$hH‰D$éèÿÿH=Pzè+<þÿ…À„?ûÿÿI‰ÝÇD$XšÇD$`„1Û1ÒE1Û1öE1Ò1íE1öéüÿÿH‹Ðí#H5™ºH‹81Àèª=þÿé`éÿÿH‹CH‰ßÿP0é`Úÿÿè<þÿH…À…þÿÿH‹1í#H5êyH‹8èr:þÿë€ÇD$X¶ÇD$`…1Û1ÒE1Û1öE1Ò1íE1öE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$hé^ôÿÿH‹B@H…À„}HƒÆ$éVØÿÿHÇD$0HÇD$1ÛHÇD$pHÇD$x1ÒHÇD$hÇD$X¹E1ÛÇD$`…1öE1Ò1íE1öE1ÿé ÷ÿÿH QkH±iIƒùL‹>$H‰ÎHBðHƒúHLÈH‹Hì#HƒìVH5L~H‹81Àè"<þÿXZéýÿÿE1öHÇD$ HÇD$HÇ$HÇD$HÇD$X»ÇD$`…1Û1ÒE1Û1öE1ÒE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xHÇD$hé óÿÿHÇD$ HÇD$HÇ$HÇD$HÇD$X½écÿÿÿI‹D$L‰çÿP0é­ØÿÿHÇD$(ÇD$X¿1ÛÇD$`…1ÒE1Û1öE1ÒHÇD$PHÇD$@HÇD$8HÇD$0éÓýÿÿHÇD$ HÇD$1ÛHÇ$HÇD$H1ÒÇD$XÁÇD$`…E1Û1öE1ÒéØþÿÿM‹|$M…ÿ„×ÿÿI‹\$IƒHƒIƒ,$„  ¿L‰D$(èÉ8þÿH…ÀI‰ÆL‹D$(„h1ÒM‰~M‰F L‰öH‰ß裉þÿH…ÀH‰D$h„âIƒ.…ûÖÿÿI‹FL‰÷ÿP0éìÖÿÿE1íHÇD$0HÇD$HÇD$pHÇD$x1ÛÇD$XÚÇD$`…1ÒE1Û1öE1Ò1íE1öé ñÿÿI‹EL‰ïÿP0éÆöÿÿH‹D$hH‹5Ô$Hxèë›þÿ…À…ŒÖÿÿL‹L$hÇD$Xé1ÛÇD$`…1ÒE1Û1öE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$héãÿÿ„I‰Ü1íHÇD$ HÇD$HÇ$1ÛHÇD$HÇD$XÞ1ÒÇD$`…E1Û1öE1ÒE1íHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xHÇD$héãïÿÿI‰ÜHÇD$0HÇD$HÇD$pHÇD$x1ÛÇD$XäÇD$`…1ÒE1Û1öE1Ò1íE1ÿéºòÿÿH‹$L‹L$h1ÛHÇ„$øÇD$Xï1ÒÇD$`…E1Û1öHƒE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xH‰D$hédáÿÿH‹CH‰ßÿP0éÒÕÿÿL‰ÇL‰D$(è7þÿL‹D$(I‰ÅéÑÿÿH‰ßèZœþÿH…ÀI‰Ä…eÔÿÿÇD$XþÇD$`†1Û1ÒE1Û1öE1Ò1íE1öE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xé'ãÿÿ1íHÇD$ HÇD$HÇ$HÇD$HÇD$Xé„ñÿÿÇD$XÇD$`†1Û1ÒE1Û1öE1Ò1íé8ÿÿÿHÇD$ HÇD$1ÛHÇ$HÇD$H1ÒÇD$X ÇD$`†E1Û1öE1ÒE1íHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$pHÇD$xé&íÿÿHÇD$(ÇD$X1ÛÇD$`†1ÒE1Û1öE1Ò1íE1íHÇD$PHÇD$@HÇD$8HÇD$0HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xé•ìÿÿI‹FL‰÷ÿP0éÔÿÿI‹nH…í„DÓÿÿI‹^HƒEHƒIƒ.u I‹FL‰÷ÿP0¿è"3þÿH…ÀI‰Ç„†1ÒI‰oM‰o L‰þH‰ßè„þÿH…ÀH‰D$x„Iƒ/…ÓÿÿI‹GL‰ÿÿP0éÓÿÿHÇD$0HÇD$1ÛHÇD$pHÇD$x1ÒÇD$X ÇD$`†E1Û1öE1ÒévëÿÿH‹îã#H5aH‹8è/1þÿL‹L$ÇD$XŸ1ÛÇD$`„1ÒE1Û1öE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xHÇD$hHÇD$é„ÝÿÿI‹L‰õHÇ„$ØHÇ„$¨HƒÀéºÔÿÿH‹CH‰ßÿP0é¼ÒÿÿH‰Þè-3þÿ…À…)òÿÿH‹D$H‹KH5sH‹@H‹PH‹.ã#H‹81Àè 3þÿéØþÿÿI‹VHƒú…a.H;Òâ#…D.M‹nM‹~ IƒEIƒIƒ.…PÕÿÿI‹FL‰÷ÿP0éAÕÿÿHÇD$0HÇD$1ÛHÇD$pÇD$X$1ÒÇD$`†E1Û1öE1Ò1íé`ðÿÿI‰ÞHÇD$0HÇD$HÇD$pÇD$X.ÇD$`†1Û1ÒE1Û1öE1Ò1íE1äéäìÿÿI‰ÞHÇD$(ÇD$X(ÇD$`†1Û1ÒE1Û1öE1ÒE1äHÇD$PHÇD$@HÇD$8HÇD$0HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xé9éÿÿH‹D$xH‹5²$HxèÉ“þÿ…À…&ÐÿÿL‹L$xÇD$X31ÛÇD$`†1ÒE1Û1öE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pHÇD$xéøÚÿÿ€I‹D$L‰D$(L‰çÿP0L‹D$(éFöÿÿ1íHÇD$ HÇD$HÇ$HÇD$H1ÛÇD$XHÇD$`ˆ1ÒE1Û1öE1ÒE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$péàÜÿÿH‹$L‹L$x1ÛHÇ„$hÇD$X91ÒÇD$`†E1Û1öHƒE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pH‰D$xéšÙÿÿM‹oM…턼ÎÿÿI‹_IƒEHƒIƒ/„¿è³-þÿH…ÀH‰Å„y1ÒL‰mL‰u H‰îH‰ßè’~þÿH…ÀH‰D$p„Hƒm…–ÎÿÿH‹EH‰ïÿP0é‡Îÿÿ1íHÇD$ HÇD$HÇ$HÇD$H1ÛÇD$XMÇD$`ˆ1ÒE1Û1öE1ÒE1äéJþÿÿHÇD$(ÇD$XJ1ÛÇD$`ˆ1ÒE1Û1öE1Ò1íE1äHÇD$PHÇD$@HÇD$8HÇD$0HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$péæÚÿÿL‰ïè‘.þÿI‰ÄéÚÉÿÿI‹$M‰åHÇ„$èHÇ„$°HƒÀé7ÒÿÿI‹T$Hƒú…/H;ÛÝ#…ô.M‹t$M‹|$ IƒIƒIƒ,$…$ÓÿÿI‹D$L‰çÿP0éÓÿÿ„I‹VHƒú…<%H;‹Ý#…%M‹fM‹~ Iƒ$IƒIƒ.…œÕÿÿI‹FL‰÷ÿP0éÕÿÿI‹EM‰îHÇ„$øHÇ„$¸HƒÀé9ÔÿÿòAoò¬$ðéÎÒÿÿè*þÿHÇD$0HÇD$ÇD$X›ÇD$`éçÿÿI‹GL‰ÿÿP0éìÏÿÿòAoò¬$àéµÏÿÿI‹EL‰ïÿP0é|ÏÿÿI‰ßHÇD$ HÇD$HÇ$HÇD$H1ÛÇD$X^ÇD$`ˆ1ÒE1Û1öE1ÒE1äHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$HÇD$péàãÿÿH‹$L‹L$p1ÛHÇ„$ÇD$Xo1ÒÇD$`ˆE1Û1öHƒE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HH‰D$péµÕÿÿHÇD$0HÇD$ÇD$XZÇD$`ˆé/ùÿÿE1ÀHÇD$ HÇD$HÇ$HÇD$H1ÛÇD$X¯ÇD$`1ÒE1Û1öE1ÒE1äE1ÿE1íHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$éÕÿÿE1ÀHÇD$ HÇD$HÇ$HÇD$HÇD$X§ÇD$`1Û1ÒE1Û1öE1ÒE1äE1íHÇD$PéxÿÿÿE1öE1ÀHÇD$ HÇD$HÇ$HÇD$HÇD$X¥ë¥HÇD$(ÇD$X£1ÛÇD$`1ÒE1Û1öE1Ò1íE1öE1äE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0é÷ÓÿÿI‰ßHÇD$0HÇD$ÇD$XdÇD$`ˆ1Û1ÒE1Û1öE1ÒE1öé™÷ÿÿH‹EH‰ïÿP0éÛÊÿÿHÇD$ HÇD$HÇ$HÇD$HÇD$X·ÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$éïÕÿÿI‹FL‰÷ÿP0é¹ÊÿÿH‹D$pH‹5G$Hxè^‹þÿ…À…¬ÈÿÿL‹L$pÇD$Xi1ÛÇD$`ˆ1ÒE1Û1öE1Ò1íE1öE1äE1ÿE1íE1ÀHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HHÇD$pé–ÒÿÿDI‹EL‰ïÿP0éõÆÿÿHÇD$ HÇD$HÇ$HÇD$HÇD$X¾é¢þÿÿÇD$XÀÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿHÇD$PHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HéfÔÿÿH‹\$H‹„$¨H;C L‹tÃHƒÀH‰„$¨IƒéyÉÿÿH‹|$H‹„$ØÿÐH…ÀI‰Æ„mH‹^Ø#H‰„$˜éJÉÿÿH‹l$M‰éHÇD$0I‰ÅHÇD$ÇD$X.ÇD$`Ž1Û1ÒE1Û1öE1ÒE1äE1ÀHÇD$@HÇD$8HÇD$(HÇD$ HÇD$HÇ$HÇD$HéðÐÿÿH‹l$HÇD$(1ÛÇD$X*ÇD$`Ž1ÒE1Û1öE1ÒE1äHÇD$@HÇD$8HÇD$0é þÿÿH‹l$HÇD$ HÇD$HÇ$HÇD$HÇD$X"ÇD$`Ž1Û1ÒE1Û1öE1ÒE1äE1ÿéÇüÿÿH‹l$HÇD$01ÛHÇD$ÇD$X,1ÒÇD$`ŽE1Û1öE1ÒE1äé½àÿÿH‹l$èv$þÿH…ÀtH‹¢Ö#H‹2H9ð…èù#þÿHƒmu H‹EH‰ïÿP0H‹=‰$茋þÿH…ÀH‰Å„˜H‹59ÿ#H‰ÇèÑtþÿH…ÀI‰Á„AHƒmuH‰D$H‹EH‰ïÿP0L‹L$H‹5sþ#1ÒL‰ÏL‰L$èÄtþÿH…ÀH‰D$HL‹L$„±Iƒ)u I‹AL‰ÏÿP0H‹$H9\$H…FL‹„$ˆH‹t$HH„$ÐH¼$عºH‰„$è¾ÆþÿƒÀ„zH‹„$H‹”$ E1öÇ„$,HÇD$@HÇD$8HÇD$0H‹HÇD$(HÇD$ HÇD$HÇD$HÇ$H‰„$XÇ„$¸L‰´$èH‹„$èHD$XH‹œ$ÐH+œ$ HÇ„$ÀÇ„$8H‰„$H‹„$H‰œ$ HÐH‰„$PH‹L$@H‹œ$ÀH\$`H‹¼$ L‹t$(L‹l$H‰Œ$°H‹L$8L‹|$H‹,$H‰œ$øH‰ÓHÇ„$ðH)ûH‰Œ$¨H‹L$0H‰ÞH‰œ$@H‰ÃH)ûH)ðI‰ôH‰ßH‰œ$HH‰Œ$˜H‹œ$ H‹L$ H)÷Ç„$0H‰¼$H‰„$ HÓH‰Œ$ˆH‹Œ$HH‹„$èH‹”$¸H‹´$ðH‹¼$ò,H‹„$Àò¬$`ò,H‹„$(ò¬$hò,0ò¬$pò,9H‹¼$øò¬$xò,:H‹¼$€ò¬$€Hþò,0H‹„$H‰´$ðò¬$ˆòB è` þÿH…ÀH‰$„å L‰àH„$H‹´$ò0è6 þÿH…ÀH‰D$„€ L‰àH„$H‹¼$ ò8è þÿH…ÀH‰D$„# L‰àH„$H‹Œ$ òèàþÿH…ÀH‰D$ „Ÿ H‹„$òèÀþÿH…ÀH‰D$(„ H‰ØH„$H‹´$ò0è•þÿH…ÀH‰D$0„v H‰ØH„$H‹¼$ ò8èjþÿH…ÀH‰D$8„Ä H‰ØH„$H‹Œ$ òè?þÿH…ÀH‰D$@„ H…ítHƒmu H‹EH‰ïÿP0M…ÿtIƒ/u I‹GL‰ÿÿP0M…ítIƒmu I‹EL‰ïÿP0H‹´$ˆH…öt!H‹H‰„$ÈHƒèH…ÀH‰u H‹FH‰÷ÿP0M…ötIƒ.u I‹FL‰÷ÿP0H‹´$˜H…öt!H‹H‰„$ˆHƒèH…ÀH‰u H‹FH‰÷ÿP0H‹´$¨H…öt!H‹H‰„$ˆHƒèH…ÀH‰u H‹FH‰÷ÿP0H‹´$°H…öt!H‹H‰„$ˆHƒèH…ÀH‰u H‹FH‰÷ÿP0H‹$H‹-@Ð#H9h„£H‹<$è5þÿò„$ˆò¬$ˆf.-Ófz„‹H‹D$H9h„'H‹|$èúþÿò„$˜ò¬$˜f.-˜fz„H‹D$H9h„ªH‹|$è¿þÿò„$¨ò¼$¨f.=]fz„–H‹D$ H9h„-H‹|$ è„þÿò„$°ò¼$°f.="fz„H‹D$(H9h„°H‹|$(èIþÿò„$Èò¼$Èf.=çez„œH‹D$0H9h„3H‹|$0èþÿò„$Øò¼$Øf.=¬ez„H‹D$8H9h„¶H‹|$8èÓþÿò„$àò¼$àf.=qez„¢H‹D$@H9h„$H‹|$@è˜þÿf(øf.=Dez„D‹¼$¸IcÿH¯¼$XH¼$Øÿ´$ˆÿ´$xÿ´$ÿ´$€ÿ´$˜ÿ´$ˆò´$ò¬$ò¤$øòœ$àò”$ØòŒ$Èò„$¸èZAÀD‰þH‹l$0ÆH‹„$‰´$èHƒÄ0IÄHì$0„£H‹D$@L‹t$(L‹l$L‹|$H‰„$°H‹D$8H‰„$¨H‹D$0H‰„$˜H‹D$ H‰„$ˆé4úÿÿH‹D$@òxéÛþÿÿò¼$¨èñþÿH…Àò¼$¨„ËþÿÿÇD$XžÇD$`§1Û1ÒE1Û1öE1Ò1íE1öE1äE1ÿéàÉÿÿH‹œ$ H‹”$@H‰ØHØH‹œ$øHÂH„$Hƒ¬$8H‰œ$À…Ùøÿÿƒ¬$,H‹„$H‹”$PH‰„$è…\øÿÿH‹5·÷#H‹|$HèíkþÿH…ÀH‰Ã„`Hc¼$¸èdþÿH…ÀI‰Ã„=¿H‰D$XèéþÿH…ÀI‰ÅL‹\$X„L‰Xè¯þÿH…ÀI‰Ã„çH‹,Ì#H‹5]÷#H‰ÇH‰D$Xèþÿ…ÀL‹\$Xˆ˜L‰ÚL‰îH‰ßèkþÿH…ÀI‰ÇL‹\$X„UHƒ+uH‹CH‰ßÿP0L‹\$XIƒmuI‹EL‰\$XL‰ïÿP0L‹\$XIƒ+u I‹CL‰ßÿP0Iƒ/u I‹GL‰ÿÿP0H‹|$Hèâ¿þÿè}þÿH…ÀI‰Ç„ÁHƒ¼$t.Hߨ#H9„$Xu HÇ„$XH‹¼$˜HƒÇè¸hþÿHƒ¼$ˆt*H¦Ø#H9„$Èu HÇ„$ÈH¼$ˆèƒhþÿHƒ¼$øt.HqØ#H9„$8u HÇ„$8H‹¼$HƒÇèJhþÿHƒ¼$ht.H8Ø#H9„$¨u HÇ„$¨H‹¼$HƒÇèhþÿHƒ¼$Øt.Hÿ×#H9„$u HÇ„$H‹¼$HƒÇèØgþÿHƒ¼$Ht*HÆ×#H9„$ˆu HÇ„$ˆH¼$Hè£gþÿHƒ¼$¸t*H‘×#H9„$øu HÇ„$øH¼$¸èngþÿHƒ¼$(„^ÉÿÿHX×#H9„$hu HÇ„$hH¼$(è5gþÿé/ÉÿÿÇD$XÇÇD$`ª1Û1ÒE1Û1öE1Ò1íE1öE1äétÆÿÿÇD$X¸ÇD$`©1Ò1öE1Ò1íE1öE1äé>ÑÿÿÇD$X·ÇD$`©1Ò1öE1Ò1íE1öE1äE1ÿéÑÿÿÇD$Xµë×ÇD$X°ÇD$`©1ÒéüÿÿÇD$X®ëçÇD$X¬ÇD$`©1ÒE1ÛéïûÿÿH‹D$8òhò¬$àéEúÿÿèšþÿH…À„PúÿÿÇD$XÇD$`§1Û1ÒE1Ûé­ûÿÿH‹D$0òhò¬$ØéÈùÿÿèXþÿH…À„ÓùÿÿÇD$XœÇD$`§1Û1ÒE1ÛékûÿÿH‹D$(òhò¬$ÈéKùÿÿèþÿH…À„VùÿÿÇD$X›ÇD$`§1Û1ÒE1Ûé)ûÿÿH‹D$ òhò¬$°éÎøÿÿèÔþÿH…À„ÙøÿÿÇD$XšÇD$`§1Û1ÒE1ÛéçúÿÿH‹D$òhò¬$¨éQøÿÿè’þÿH…À„\øÿÿÇD$X™ÇD$`§1Û1ÒE1Ûé¥úÿÿH‹D$òhò¬$˜éÔ÷ÿÿèPþÿH…À„ß÷ÿÿÇD$X˜ÇD$`§1Û1ÒE1Ûécúÿÿòhò¬$ˆé\÷ÿÿèþÿH…À„g÷ÿÿÇD$X—ÇD$`§1Û1ÒE1Ûé&úÿÿH‹„$°L‹\$8L‰ïL‹l$0I‰ìL‰öL‰ùH‹,$L‹t$H‰D$@H‹„$¨1ÛL‹|$(L‹D$ 1ÒL‹L$H‰t$(E1ÒH‰D$8H‹„$˜1öL‰$$H‰|$E1äH‰L$ÇD$X}H‰D$0H‹„$ˆÇD$`¥H‰D$ éñÀÿÿH‹„$¨L‰îL‹l$0I‰ìL‰óL‰ÿH‹,$L‹t$E1ÛH‰D$8H‹„$˜1ÒL‹|$(L‹D$ E1ÒL‹L$H‰\$(1ÛH‰D$0H‹„$ˆH‰t$L‰$$1öH‰|$ÇD$XpE1äH‰D$ ÇD$`¤éjÀÿÿH‹„$˜L‰îI‰ìL‰óL‰ÿH‹,$L‹t$L‹|$(E1íH‰D$0H‹„$ˆ1ÒL‹D$ L‹L$E1ÛH‰\$(H‰t$1ÛL‰$$H‰D$ 1öH‰|$ÇD$XcE1ÒÇD$`£E1äéò¿ÿÿL‰ðI‰ìL‰ûH‰D$(H‹„$ˆE1ÿH‹,$L‹t$1ÒL‹D$ L‹L$E1ÛL‰l$H‰\$1öL‰$$H‰D$ 1ÛÇD$XVÇD$`¢E1ÒE1äE1í錿ÿÿH‹„$ˆI‰ìL‹t$H‹,$L‹L$E1ÀL‰l$L‰|$H‰D$ L‰$$ÇD$XIÇD$`¡1Û1ÒE1Û1öE1ÒE1äE1ÿE1íé3¿ÿÿI‰ìL‹L$H‹,$E1öE1ÀL‰l$L‰|$L‰$$ÇD$X<ÇD$` ë´I‰ìL‰|$H‹,$ÇD$X/L‰$$1ÛÇD$`Ÿ1ÒE1Û1öE1ÒE1öE1äE1ÿé[ÁÿÿI‰ìE1ö1íL‰$$ÇD$X"1ÛÇD$`ž1ÒE1Û1öE1ÒE1äE1ÿé(ÁÿÿH‹$H‹l$H1ÛHÇ„$ØÇD$X¬1ÒÇD$`”E1Û1öHƒE1ÒE1öE1äE1ÿHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$H‰D$Hé™ÀÿÿH‹D$HH‹5ò#Hxèvþÿ…À…îÿÿH‹l$HÇD$X¦1ÛÇD$`”1ÒE1Û1öE1ÒE1öE1äE1ÿé’ëÿÿ1íE1öE1ÀHÇD$ HÇD$HÇ$ÇD$X£ÇD$`”1Û1ÒE1Û1öE1ÒE1äE1ÿE1íé3èÿÿHÇD$0HÇD$1ÛÇD$X ÇD$`”1ÒE1Û1öE1ÒE1öE1äE1ÿéÕÍÿÿE1öHÇD$ HÇD$HÇ$HÇD$HÇD$XžÇD$`”é‹ìÿÿH‰ÇèÕþÿ…À…ïìÿÿHÇD$ HÇD$HÇ$HÇD$HÇD$XÜÇD$`éCìÿÿM‰õL‹t$PIƒmu I‹EL‰ïÿP0¿èÒþÿH…ÀI‰Ç„kH‹=gð#L‰p1ÒH‰Æè±aþÿH…ÀI‰Æ„…Iƒ/u I‹GL‰ÿÿP0H‹„$I9Ft_L‰÷èþÿf.¿Xz„°Iƒ.uI‹FòD$PL‰÷ÿP0òD$PHc„$,H‹”$8H¯„$ÐH”$òéø¸ÿÿòAFë¡L‹L$ H‰\$PI‰ÀL‹t$(H‹l$1ÛHÇD$ HÇD$1ÒHÇ$HÇD$HE1ÛÇD$XoÇD$`1öE1ÒE1äE1íé>æÿÿòD$PèÔþÿH…ÀòD$P„6ÿÿÿM‰ðH‹l$L‹t$(L‹L$ H‰\$PÇD$XrÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿE1íHÇD$@éͺÿÿM‰ðH‰\$PL‹t$(H‹l$L‹L$ 1ÛHÇD$(ÇD$Xj1ÒÇD$`E1Û1öE1ÒE1äE1íHÇD$@HÇD$8HÇD$0醺ÿÿH‹l$é¶êÿÿè þÿH…À„$³ÿÿH‹l$M‰éÇD$XÇD$`1Û1ÒE1Û1öE1ÒE1öE1äE1íE1ÀHÇD$@éºÿÿI‹GL‰ÿÿP0é×àÿÿI‹GL‰ÿÿP0é°¸ÿÿH‹GÿP0é¹ÿÿòAoò¬$ém¸ÿÿI‹D$L‰çÿP0é:¸ÿÿH‰„$ˆH‹À#H5'QL‹L$ H‰\$PE1äL‹t$(H‹l$1ÛH‹8E1ÿE1íL‰Œ$€èÀ þÿÇD$X4ÇD$`1ÒE1Û1öE1ÒHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HL‹Œ$€L‹„$ˆéJ¹ÿÿL‹L$ I‰ÀL‹t$(H‹l$H‰\$PHÇD$ HÇD$HÇ$HÇD$HÇD$X0ÇD$`étûÿÿI‰Ý¾º1ÀHƒÀL‰ïL‰dÅH‹„$ÀH‰DÕH‹„$È1ÒH‰DõH‰îè^þÿH…ÀI‰Ä„·Hƒm„Iƒm„ƒH‹|$PL‰æèD[þÿ…Àu$Iƒ,$tH‰ßé"·ÿÿI‰Åéç©ÿÿI‹D$L‰çÿP0ëãL‹D$PM‰åH‰\$PL‹t$(H‹l$1ÛL‹L$ L‹|$01ÒÇD$XfÇD$`E1Û1öE1ÒE1äHÇD$@éзÿÿI‹EL‰ïÿP0énÿÿÿH‹EH‰ïÿP0éTÿÿÿL‹D$PM‰ëH‰\$PL‹|$0H‰ëL‹t$(H‹l$L‹L$ I‰ÅHÇD$0HÇD$1ÒÇD$XbÇD$`1öE1ÒE1äénæÿÿL‹{M…ÿ„å¶ÿÿL‹kIƒIƒEHƒ+u H‹CH‰ßÿP0¿è´ þÿH…ÀH‰ÅtnL‰}¾º¸éaþÿÿL‹D$PL‹t$(1ÒH‰\$PH‹l$1ÛL‹L$ L‹”$ÀE1ÛH‹´$ÈL‹|$0E1íÇD$XEÇD$`HÇD$@é°¶ÿÿL‹D$PL‰úH‰\$PL‹t$(L‹L$ M‰ëL‹”$ÀH‹´$ÈH‰ÃH‹l$L‹|$0HÇD$@ÇD$XTÇD$`éX¶ÿÿL‹D$PL‹t$(1ÒH‰\$PH‹l$1ÛL‹L$ L‹”$ÀE1ÛL‹|$0ÇD$XC1öÇD$`E1íHÇD$@é ¶ÿÿL‹D$PL‹t$(1ÒH‰\$PH‹l$1ÛL‹L$ L‹|$0E1ÛÇD$XAÇD$`1öE1ÒE1íHÇD$@éÀµÿÿI‹FL‰÷ÿP0éy²ÿÿI‹GL‰ÿÿP0镱ÿÿM‰åH‰\$PH‹l$L‹L$ HÇD$(1ÛÇD$X±ÇD$`1ÒE1Û1öE1ÒE1öE1äE1ÀHÇD$@HÇD$8HÇD$0é]µÿÿL‹L$ H‹l$I‰ÅH‰\$PHÇD$0HÇD$ÇD$X©ÇD$`1Û1ÒE1Û1öE1ÒE1öE1äE1ÿE1ÀéäÿÿL‹L$ I‰ÀH‹l$H‰\$PHÇD$ HÇD$HÇ$HÇD$HÇD$XÅÇD$`ég÷ÿÿH‹l$M‰èL‹L$ M‰åH‰\$PHÇD$ HÇD$HÇ$HÇD$HÇD$X½ÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿéUßÿÿH‹l$L‹L$ I‰ÀM‰åH‰\$PHÇD$ HÇD$HÇ$HÇD$HÇD$XµÇD$`1Û1ÒE1Û1öE1ÒE1äéùÞÿÿL‹L$ H‹l$M‰åH‰\$PE1ÀHÇD$ HÇD$HÇ$HÇD$HÇD$X³ë¢L‹t$(Iƒ.…2®ÿÿI‹FL‰÷ÿP0é#®ÿÿH‹t$(H‹„$¸H;F}ÏL‹tÆHƒÀH‰„$¸Iƒé±ÿÿH‹„$øÿÐH…ÀI‰Æ…ú°ÿÿI‰ÅL‹t$(èêþÿH…Àt’H‹º#H‹2H9ðuèqþÿéyÿÿÿI‹EL‰ïÿP0éG°ÿÿH‰Çè5þÿ…ÀuÛL‹L$ M‰èH‹l$H‰\$PHÇD$ HÇD$HÇ$HÇD$HÇD$XêÇD$`éZþÿÿH‹l$L‹L$ M‰èH‰\$PÇD$XÎÇD$`é¢÷ÿÿL‹L$ M‰èH‹l$H‰\$PHÇD$ HÇD$HÇ$HÇD$HÇD$XÌÇD$`éõÿÿI‹FL‹ L‹xéÙÚÿÿM‰ðH‹l$L‹t$(L‹L$ H‰\$PJ H…Òˆ4 H:7H š5HƒúH5¿IL‰Œ$ˆL‰„$€HEÈH‹,¸#H‹81ÀèþÿÇD$XúÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿE1íHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HL‹„$€L‹Œ$ˆé‘±ÿÿèóþÿH…À„¤¯ÿÿM‰åH‰\$PL‹t$(H‹l$L‹L$ 1ÛÇD$X"ÇD$`1ÒE1Û1öE1ÒE1äE1ÀHÇD$@éõ°ÿÿèžþÿH…À„–¯ÿÿL‹t$(H‹l$L‹L$ H‰\$PÇD$X$ÇD$`1Û1ÒE1Û1öE1ÒE1äE1íE1ÀHÇD$@é °ÿÿL‹L$ I‰ÀH‹l$M‰åH‰\$PE1öHÇD$ HÇD$HÇ$HÇD$HÇD$XˆÇD$`ŽéñûÿÿM‰ðH‰\$PI‰ÄL‹t$(H‹l$1ÛL‹L$ ÇD$X1ÒÇD$`E1Û1öE1ÒE1ÿE1íHÇD$@é°ÿÿH‹l$M‰éHÇD$0I‰ÅHÇD$ÇD$X>ÇD$`ŽéÆúÿÿH‹l$M‰åHÇD$0HÇD$ÇD$X61ÛÇD$`Ž1ÒE1Û1öE1ÒE1äE1ÿé¼ÃÿÿL‹l$ H‰\$PIƒm…@§ÿÿI‹EL‰ïÿP0é1§ÿÿH‹t$ H‹„$°H;F}ÉL‹dÆHƒÀH‰„$°Iƒ$é,ªÿÿH‹„$èÿÐH…ÀI‰Ä…ªÿÿL‹l$ H‰\$PèÊþÿH…ÀtŽH‹öµ#H‹2H9ðuKèQþÿéuÿÿÿH‹l$M‰éÇD$XGM‰åÇD$`Ž1Û1ÒE1Û1öE1ÒE1öE1äE1ÿE1ÀHÇD$@é½®ÿÿH‰Çèãþÿ…Àu©H‹l$M‰éHÇD$0M‰åHÇD$ÇD$XcÇD$`Ž1Û1ÒE1Û1öE1ÒE1öE1ÿE1Àé~ÝÿÿI‹FL‹(L‹xé´ÑÿÿH‹l$ZH…Òx.Hv3H Ö1HƒúH5ûEHEÈH‹x´#H‹81Àè^þÿÇD$XìÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿéÜÿÿH‹@´#H5)AºH‹81ÀèþÿëºH‹l$L‹L$ M‰èH‰\$P»Iƒ(uI‹@L‰ $L‰ÇÿP0L‹ $L‰ $è0Iþÿ…ÀL‹ $…×H¾2H 1HƒûH5CEH‰ÚL‰Œ$€HEÈH‹µ³#1ÛE1äE1ÿE1íH‹81ÀèþÿÇD$X˜ÇD$`Ž1ÒE1Û1öE1ÒE1ÀHÇD$@HÇD$8HÇD$0HÇD$(HÇD$ HÇD$HÇD$HÇ$HÇD$HL‹Œ$€é­ÿÿH‰\$PM‰èH‹l$L‹L$ 1ÛéüþÿÿÇD$X˜ÇD$`Ž1Û1ÒE1Û1öE1ÒE1äE1ÿE1íE1ÀHÇD$@鉬ÿÿM‰èH‰\$PH‹l$L‹L$ ÇD$X1ÛÇD$`Ž1ÒE1Û1öE1ÒE1äE1íHÇD$@éG¬ÿÿ¾H‰ÇèÆ@þÿ馧ÿÿèÞþÿH…À„ħÿÿH‹l$L‹L$ H‰\$PÇD$X›ÇD$`Žé@ûÿÿè¬þÿH…À„Þ§ÿÿH‹l$L‹L$ H‰\$PÇD$XÇD$`Žé–ñÿÿH‹l$M‰åHÇD$0HÇD$ÇD$XE1ÛÇD$`Ž1ÒE1Û1öE1ÒE1öE1äE1ÿé¶¿ÿÿÇD$X‰ÇD$`Œ1Û1ÒE1Û1öE1Ò1íE1öéxÙÿÿH‹l$I‰ÁM‰å1ÛIƒmuI‹EL‰ $L‰ïÿP0L‹ $L‰ $èÆFþÿ…ÀL‹ $…¤HT0H ´.HƒûH5ÙBH‰ÚL‰Œ$€HEÈH‹K±#1ÛE1öE1äE1ÿE1íH‹81Àè#þÿÇD$XÇD$`1ÒE1Û1öE1ÒéŽýÿÿH‹l$HÇD$01ÛHÇD$ÇD$X1ÒÇD$`E1Û1öE1ÒE1äE1ÿés»ÿÿÇD$XÇD$`1Û1ÒE1Û1öE1ÒE1öéÁýÿÿ¾H‰Çèã>þÿéõ¢ÿÿM‰éH‹l$M‰å»éãþÿÿM‰éH‹l$M‰åÇD$X ÇD$`1Û1ÒE1Û1öE1ÒE1öE1äE1ÀHÇD$@éÿ©ÿÿè¨þýÿH…À„£ÿÿH‹l$ÇD$X1ÛÇD$`1ÒE1Û1öE1ÒE1öE1äéå×ÿÿM‰åL‹t$(I‰ìL‹L$ H‹l$H‰\$P»Iƒ,$uI‹D$L‰ $L‰çÿP0L‹ $L‰ $èEþÿ…ÀL‹ $…HŸ.H ÿ,HƒûH5$AH‰ÚL‰Œ$€HEÈH‹–¯#1ÛH‹81ÀèzÿýÿÇD$XÇD$`1ÒE1Û1öE1ÒE1äE1ÿéßûÿÿI‰ìH‰\$PL‹t$(L‹L$ I‰ÅH‹l$1ÛéPÿÿÿÇD$XÇD$`1Û1ÒE1Û1öE1ÒE1äE1ÿE1ÀHÇD$@éèÿÿI‹D$L‹0L‹xéÑÿÿH‹l$L‹L$ M‰åH‰\$PH…ÒˆòH¹-H ,HƒúH5>@L‰Œ$€HEÈH‹³®#H‹81Àè™þýÿÇD$XsÇD$`Ž1Û1ÒE1Û1öE1ÒE1öéÿÿÿM‰åH‰\$PI‰ìL‹t$(L‹L$ 1ÛH‹l$ÇD$X1ÒÇD$`E1Û1öE1ÒE1ÀHÇD$@éð§ÿÿ¾H‰Çèo<þÿé¦ÿÿÇD$Xúé2õÿÿH‹®#H5;ºL‰Œ$ˆL‰„$€H‹81ÀèâýýÿéËõÿÿÇD$Xsé§øÿÿH‹Ù­#H5Â:ºL‰Œ$€H‹81Àè«ýýÿé ÿÿÿfDAWAV¹AUATUSH‰óHƒìhHl$ dH‹%(H‰D$X1ÀH‰ïH…ÒóH«…¶H‹NHƒù…ÈH‹F H‹nH‰D$(H‹F(H‰l$ H‰D$0H‹F0H‰D$8H‹F8H‰D$@H‹F@H‰D$HH‹FHH‰D$PH‹MH‹¨©€„ƒH‹EHcÐA‰ÄH9Ð…ÐAƒüÿ„FH‹\$(H‹KH‹¨©€„›H‹CHcÐA‰ÅH9Ð…ÐAƒýÿ„ÜH‹\$0H‹KH‹¨©€„£H‹CHcȉÂH9È…Áƒúÿ„ÎH‹L$8H‹-̬#L‹D$@L‹L$HL‹t$PH9étH‹AH;5­#…÷H‹PÚ#H…Û„AI9è„ÖM‹xL9û…áI9étI‹yL9ÿ…H…Û„I9ît I‹~H9û…lHƒìD‰îD‰çAVèóŽÿÿZYH‹t$XdH34%(…œHƒÄh[]A\A]A^A_ÃDH‹5QØ#L‰ïIƒîè…ùýÿH…ÀH‰D$ …wH‹KH‹¡«#HƒìH5¾>QL g*H ’)H*A¸H‹81ÀèXûýÿ^_¾pH ê7H=Û?º€èiKþÿ1ÀéRÿÿÿf©„>H‹CHƒÀHƒø†H‰ßè‹ùýÿHcÐA‰ÅH9ЄDþÿÿHƒÀuèaùýÿH…Àu@H‹)«#H5B;H‹8èÒ÷ýÿè=ùýÿH…ÀA½ÿÿÿÿ„þÿÿ¾gécÿÿÿ@L‹fIƒü‡ø Hw3I‰ÕJc HÐÿà€H‹FHH‰D$PH‹C@H‰D$HH‹C8H‰D$@H‹C0H‰D$8H‹C(H‰D$0H‹C H‰D$(H‹CH‰D$ L‰ïèñõýÿIƒüI‰Æ‡ÚH)3Jc HÐÿà@H‹5yÖ#L‰ïèñ÷ýÿH…ÀH‰D$(„|IƒîH‹5@Ö#L‰ïèÐ÷ýÿH…ÀH‰D$0„ IƒîH‹5gÕ#L‰ïè¯÷ýÿH…ÀH‰D$8„™IƒîH‹5–Ó#L‰ïèŽ÷ýÿH…ÀH‰D$@„3IƒîH‹5=Ó#L‰ïèm÷ýÿH…ÀH‰D$H„@IƒîH‹5ÔÒ#L‰ïèL÷ýÿH…ÀH‰D$P„IƒîM…ö<H‹l$ é.üÿÿ€H‰ÞL‰ÿL‰D$‰T$L‰L$H‰ $èùýÿ…ÀL‹D$„õH‹×#H‹ $L‹L$‹T$H…ÛI‰ß…ÕüÿÿH‹Ÿ¨#H5A&H‹8èàõýÿ1ÀéùüÿÿH‹ê¨#L‹AH5ÿ8H‰ÑH‹81ÀèºøýÿHƒ+uH‹CH‰ßÿP0f.„è ÷ýÿH…ÀA¼ÿÿÿÿ„¦ûÿÿ¾fé1ýÿÿf©„ÈH‹EHƒÀHƒøwHx1Hc‚HÂÿâ€H‰ïèÈöýÿHcÐA‰ÄH9ЄIûÿÿHƒøÿuèžöýÿH…Àu‰f„H‹a¨#H5z8H‹8è õýÿéeÿÿÿDH%1Hc‚HÂÿâH‰ßèhöýÿHcȉÂH9È„YûÿÿHƒÀuè?öýÿH…Àu f.„H‹¨#H58H‹8èªôýÿèöýÿH…Àºÿÿÿÿ„ûÿÿ¾hé<üÿÿDH‰Þ‰T$L‰L$L‰D$H‰ $è^÷ýÿ…ÀH‹ $L‹D$L‹L$‹T$…`ûÿÿI‹FH‹KH¦%L‹@H‹R§#H5Ó9H‹81Àè)÷ýÿ1ÀéBûÿÿfE1äé2úÿÿ„‹EHÁàH‰Â‹EH ÐHcÐA‰ÄH9ЄúÿÿéÌþÿÿ@‹E‹UHÁàH ÐH÷ØHcÐA‰ÄH9ЄÙùÿÿé¤þÿÿ@D‹eéÇùÿÿ€D‹eA÷Üé´ùÿÿE1íéîùÿÿ‹CHÁàH‰Â‹CH ÐHcÐA‰ÅH9ЄÅùÿÿéûÿÿ‹C‹SHÁàH ÐH÷ØHcÐA‰ÅH9Є¡ùÿÿélûÿÿD‹ké“ùÿÿD‹kA÷Ýé‡ùÿÿH‹P¦#HƒìH5m9jL %H @$H¼$A¸H‹81ÀèöýÿAZ¾PA[é§úÿÿ„©„ÜH‹CHƒÀHƒø‡ãýÿÿH /Hc‚HÂÿâ1ÒéDùÿÿ‹S÷Úé1ùÿÿ‹CHÁàH‰Â‹CH ÐH÷ØHcȉÂH9È„ùÿÿéÌýÿÿ@‹Séÿøÿÿ‹CHÁàH‰Â‹CH ÐHcȉÂH9È„áøÿÿéýÿÿDI‰ßé/ùÿÿH‹5!¦#H95*¦#„H‹5¦#L‹@H}#H‹NéàýÿÿI‹@H‹KHm#L‹@éÈýÿÿf„L‰þ‰T$L‰L$L‰D$H‰ $èÖôýÿ…ÀH‹íÒ#H‹ $L‹D$L‹L$‹T$…¶øÿÿI‹AI‹OH#L‹@élýÿÿ©€…ÁH‹A`H…À„×Hƒ¸„NH‰ïèóýÿH"H‰ÃH…Û„®H‹KH‰ÝH÷¨€„{ûÿÿH‹¨©€„¶H‹EHcÐA‰ÄH9Ð…yHƒm…4÷ÿÿH‹EH‰ïÿP0é%÷ÿÿL´"H5·³#L‰áH‰êL‰ïè Pþÿ…À‰ úÿÿ¾Yé–øÿÿ©€…LH‹A`H…À„?Hƒ¸„âH‰ßè¹òýÿH1H‰ÑH‹81ÀèùðýÿHƒm…öÿÿH‹EH‰ïÿP0é öÿÿHƒ¸˜tEH‰ßè­íýÿHTH‰Åéýÿÿè)ïýÿH…À…øÿÿH‹Á #H55H‹8èšíýÿéõ÷ÿÿDèûîýÿH…À…°õÿÿH‹“ #H5H‹8èlíýÿé•õÿÿ€H‹q #L‹AH5†0H‰ÑH‹81ÀèAðýÿHƒm…ŒøÿÿH‹EH‰ïÿP0é}øÿÿHƒ¸˜tH‰ßèõìýÿHœH‰Åé5ýÿÿèqîýÿH…À…NøÿÿH‹  #H5}H‹8èâìýÿé3øÿÿH‰ïèUîýÿHcÐA‰ÄH9Є—ûÿÿHƒÀu è+îýÿH…ÀuH‹÷Ÿ#H50H‹8è ìýÿHƒm…õöÿÿAƒÌÿéhûÿÿ©„¸H‹EHPHƒúw–HÀ(HcHÐÿàD‹eA÷Üé(ûÿÿ‹EHÁàH‰Â‹EH ÐH÷ØHcÐA‰ÄH9ЄûÿÿézÿÿÿD‹eéøúÿÿ‹EHÁàH‰Â‹EH ÐHcÐA‰ÄH9ЄÙúÿÿéMÿÿÿH‹EE1äHƒèH…ÀH‰E…òÿÿéÂúÿÿH‰ßè^íýÿHcÐA‰ÅH9ЄfûÿÿHƒÀu è4íýÿH…ÀuH‹Ÿ#H5/H‹8è©ëýÿHƒ+…ÍóÿÿAƒÍÿé7ûÿÿ©„H‹CHPHƒúw—HÞ'HcHÐÿàD‹kA÷Ýéøúÿÿ‹CHÁàH‰Â‹CH ÐH÷ØHcÐA‰ÅH9ЄÖúÿÿé{ÿÿÿD‹kéÈúÿÿ‹CHÁàH‰Â‹CH ÐHcÐA‰ÅH9Є©úÿÿéNÿÿÿH‹E1íHƒèH…ÀH‰…Iñÿÿé“úÿÿ©„.H‹CHPHƒú‡ÙHJ'HcHÐÿà‹S÷Úé/ûÿÿ‹CHÁàH‰Â‹CH ÐH÷ØHcȉÂH9È„ûÿÿH‹Û#H5ô-H‹8è„êýÿHƒ+…ÐõÿÿƒÊÿéðúÿÿ‹CHÁàH‰Â‹CH ÐHcȉÂH9È„Èúÿÿë¸H‹1ÒHƒèH…ÀH‰…Åðÿÿé¶úÿÿ‹Sé¤úÿÿèûéýÿH;\#„×ðÿÿH;Ç#„ÊðÿÿéÐ÷ÿÿH‰ßèä\þÿA‰Åé“ùÿÿH‰ßètëýÿHcȉÂH9È„ZúÿÿHƒÀ…BÿÿÿèGëýÿH…À„4ÿÿÿéEÿÿÿH‰ïè¡\þÿA‰ÄéŠøÿÿH‰ßè‘\þÿ‰ÂéúÿÿL‰áéñÿÿfAWAVAUATUSHìXH‹FH‹œ$H‰|$H‰4$H‰T$H‰Œ$ L‰D$H‰œ$0H‹œ$¸D‰Œ$(HÇ„$¸HÇ„$ÀHÇ„$ÈH‰œ$8HÇ„$èdH‹%(H‰œ$H1ÛH;æœ#HÇ„$à„ H;Å›#„× H‹@hH…À„² H‹@H…À„¥ ¾H‹<$ÿÐI‰ÅM…í„N H‹$H‹@H;‡œ#„i H;r›#„¼ H‹@hH…À„Ï H‹@H…À„ 1öH‹<$ÿÐI‰ÆM…ö„–L‰öL‰ïèãëýÿH…ÀI‰Ä„'Iƒm„ÌIƒ.„²H‹›#I9\$„ˆL‰çèøéýÿò„$øòŒ$øf. –1z„–Iƒ,$„³H‹D$H‹@H;Û#„EH;®š#„hH‹@hH…À„ H‹@H…À„þ ¾H‹|$ÿÐH‰ÅH…í„öH‹D$H‹@H;n›#„H;Yš#„ëH‹@hH…À„þH‹@H…À„ñ1öH‹|$ÿÐI‰ÆM…ö„4L‰öH‰ïèÉêýÿH…ÀI‰Å„ÍHƒm„âIƒ.„ÀI9]„¦L‰ïèæèýÿf.–0z„"Iƒm„ L‹¼$ 1Ò¹¾L‰ÿèLþÿH…ÀI‰Å„“#1Ò1ö¹L‰ÿèrLþÿH…ÀI‰Æ„%H‰ÆL‰ïè+êýÿH…ÀI‰Ä„‡&Iƒm„„Iƒ.„jI9\$„OL‰çèGèýÿf.÷/z„÷'Iƒ,$„èwèýÿH…ÀH‰„$„N)1ÿè¯äýÿH…ÀH‰„$„F,H‹ÏÄ#H‹=¨Ç#H‰ÞèèæýÿH…ÀI‰Å„´-HƒH‹5qÂ#L‰ïè 8þÿH…ÀI‰Æ„Iƒm„ZH‹5³Á#1ÒL‰÷è8þÿH…ÀH‰Ã„/Iƒ.„» H;™#…†0Hƒ¼$è„/-H¸¥#H9„$(„Ê.H„$àH¼$èH‰„$@è5þÿH‹´$@H„$йºI‰ÀH‰„$€H~H‰Þè܉þÿ…Àˆ¤1ò”$øH‹D$HÇD$@Ç„$ˆòYš.HÇ„$Hƒ‹„$°HÇ„$èHÇD$8HÇ„$ðH‰\$x…ÀH‹t—#HE$˜#E1ÉE1ÿò”$PòYU.E1äL‰ÏH‰„$Hò”$XH‹D$H‹T$@H9PŽÁCH‹@H‹ÐHƒH…ÿH‰D$pt Hƒ/„Ú%H‹Ä#H‹=ÔÅ#H‰ÞèåýÿH…ÀI‰Æ„81HƒH‹5½Ä#L‰÷è56þÿH…ÀH‰Å„é2Iƒ.„¿%H‹|$pH‰îèäýÿƒøÿ‰„$„4Hƒm„w(H‹5ðÃ#H‹|$pèæ5þÿH…ÀH‰„$„15M…ät Iƒ,$„å,1ÿèâýÿH…ÀH‰Å„W6H‹5cÃ#H‹|$pè¡5þÿH…ÀI‰Ä„x7H‹6–#H‹@H9ÐH‰”$˜…É1M‹L$M…É„»1I‹\$IƒHƒIƒ,$„L‰ÎH‰ßL‰L$ èóSþÿH…ÀI‰ÆL‹L$ „î9Iƒ)„Hƒ+„¶H‹ו#I‹FH9ØH‰œ$ „¢H;Ö#„•L‰÷èmåýÿH…ÀI‰Ä„h]H‹@H‹€àH…ÀH‰D$ „\I‹HÇÃÿÿÿÿëq@òA\$òœ$øétúÿÿI‹FL‰÷ÿP0é?úÿÿI‹EL‰ïÿP0é%úÿÿH‹D$HƒxŽ H‹h HƒEé¬úÿÿfI‹M‰ôHÇD$ 1ÛHƒÀHƒèH…ÀI‰„ëHƒ|$ H‰èM‰ýH‰ÝL‰ãI‰Ä…•H‹á•#H9C…Ÿ&H9kŽ¥@H‹CL‹<èHƒÅIƒM…ít Iƒm„H‹5À#L‰ÿèÖ3þÿH…ÀI‰Æ„z#I‹D$I;D$ j&IƒI‹L$L‰4ÁHƒÀI‰D$Iƒ.„ÊHƒ|$ M‰ý„kÿÿÿH‰ßH‹D$ ÿÐH…ÀI‰Çu„èÄâýÿH…ÀL‰åI‰ÜtH‹ê”#H‹2H9ð…-~èAâýÿIƒ,$„þE1ÿèŸßýÿH…ÀI‰Ä„¨I¿èYâýÿH…ÀI‰Æ„€MH‹=ÞÁ#1ÒH‰hL‰` H‰Æè43þÿH…ÀH‰D$0„!LIƒ.„GL‹|$0L;= ”#I‹G„Ö8H;—”#„É8H‹HH‹¶“#HPH5@L‰,$H‹\$xH‹l$pM‰üH‹81ÀèuãýÿL‹ $ÇD$˜Ç„$ø,M‰ÏHÇD$`HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PE1ÒE1ÛE1ÀHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é DI‹D$L‰çÿP0é=÷ÿÿ„¿èFßýÿH…ÀH‰Ã„ªH‹<$H‰ÆèßýÿH‹3I‰ÅHVÿH…ÒH‰…1öÿÿH‹CH‰ßÿP0é"öÿÿf„Hƒ~~©H‹FL‹HIƒM‰ÍéöÿÿD1ÿèÙÞýÿH…ÀH‰Ã„á3H‹<$H‰Æè±ÞýÿH‹3I‰ÆHVÿH…ÒH‰…öÿÿH‹CH‰ßÿP0éöÿÿ@òAEéW÷ÿÿDI‹FL‰÷ÿP0é1÷ÿÿf„H‹EH‰ïÿP0é÷ÿÿH‹$HƒxŽqÿÿÿH‹@L‹IƒM‰Æé°õÿÿfDH‹$HƒxŽÙþÿÿL‹H IƒM‰Íé;õÿÿf„I‹EL‰ïÿP0éæöÿÿH‹$HƒxŽÿÿÿL‹@IƒM‰ÆéSõÿÿ¿èÖÝýÿH…ÀI‰Ä„úH‹|$H‰Æè­ÝýÿI‹4$H‰ÅHVÿH…ÒI‰$…ÖõÿÿI‹D$L‰çÿP0éÆõÿÿDÇD$mÇ„$ø E1ÒHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$PHÇ„$ E1ÿHÇ„$˜HÇ„$1íHÇ„$€HÇD$x1ÛHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðf„M…ät Iƒ,$„0M…Àt Iƒ(„aM…Ût Iƒ+„‚M…Òt Iƒ*„“H‹t$PH…ötH‹H‰D$HƒèH…ÀH‰„H‹|$XH…ÿtH‹H‰D$HƒèH…ÀH‰„oH‹L$@H…ÉtH‹H‰D$HƒèH…ÀH‰„]H‹T$hH…ÒtH‹H‰D$HƒèH…ÀH‰„H‹t$H…ötH‹H‰D$HƒèH…ÀH‰„ H‹|$HH…ÿtH‹H‰D$HƒèH…ÀH‰„÷H‹L$`H…ÉtH‹H‰D$HƒèH…ÀH‰„åH‹Æ#Hƒ¼$èH‹H‹HHH‹PPL‹pXHÇ@HHÇ@PHÇ@X„¨H‘š#H9„$(„«H¼$èH‰T$H‰L$èl*þÿH‹]#H‹L$H‹T$H‹H‹xHL‹hPL‹`XH‰HHH‰PPL‰pXH…ÿt Hƒ/„QM…ít Iƒm„QM…ätIƒ,$u I‹D$L‰çÿP0‹”$ø‹t$H hH="E1äèé,þÿH‹Œ$ðH…ÉtH‹H‰D$HƒèH…ÀH‰„$H‹”$H…ÒtH‹H‰D$HƒèH…ÀH‰„H‹´$H…ötH‹H‰D$HƒèH…ÀH‰„úH…Ût Hƒ+„ûH‹L$8H…ÉtH‹H‰D$HƒèH…ÀH‰„éH‹œ$èH…ÛtH‹H‰D$HƒèH…ÀH‰„ÔH‹”$H…ÒtH‹H‰D$HƒèH…ÀH‰„¿H…ít Hƒm„¿H‹´$H…ötH‹H‰D$HƒèH…ÀH‰„ªH‹L$0H…ÉtH‹H‰D$HƒèH…ÀH‰„˜H‹\$ H…ÛtH‹H‰D$HƒèH…ÀH‰„†H‹T$(H…ÒtH‹H‰D$HƒèH…ÀH‰„tH‹´$ØH…ötH‹H‰D$HƒèH…ÀH‰„_H‹Œ$ÐH…ÉtH‹H‰D$HƒèH…ÀH‰„JH‹œ$àH…ÛtH‹H‰D$HƒèH…ÀH‰„5H‹”$ÀH…ÒtH‹H‰D$HƒèH…ÀH‰„ H‹´$ÈH…ötH‹H‰D$HƒèH…ÀH‰„ H‹Œ$ˆH…ÉtH‹H‰D$HƒèH…ÀH‰„öH‹\$pH…ÛtH‹H‰D$HƒèH…ÀH‰„äH‹$H…ÒtH‹H‰D$HƒèH…ÀH‰„ÓH‹´$¨H…ötH‹H‰$HƒèH…ÀH‰„¿H‹Œ$°H…ÉtH‹H‰$HƒèH…ÀH‰„«H‹œ$¸H…ÛtH‹H‰$HƒèH…ÀH‰„—H‹T$xH…ÒtH‹H‰$HƒèH…ÀH‰„†H‹´$€H…ötH‹H‰$HƒèH…ÀH‰„²H‹¼$H…ÿtH‹H‰$HƒèH…ÀH‰„žH‹Œ$˜H…ÉtH‹H‰$HƒèH…ÀH‰„ŠH‹œ$ H…ÛtH‹H‰$HƒèH…ÀH‰tzM…ÿtIƒ/u I‹GL‰ÿÿP0H‹œ$HdH3%(L‰à…/OHÄX[]A\A]A^A_Ãf„H‹FH‰÷ÿP0é?ÿÿÿH‹GÿP0éVÿÿÿ@H‹AH‰ÏÿP0égÿÿÿH‹CH‰ßÿP0éwÿÿÿH‹AH‰ÏÿP0éÍûÿÿH‹BH‰×ÿP0éâûÿÿH‹FH‰÷ÿP0é÷ûÿÿH‹CH‰ßÿP0éöûÿÿH‹AH‰ÏÿP0éüÿÿH‹CH‰ßÿP0éüÿÿH‹BH‰×ÿP0é2üÿÿH‹EH‰ïÿP0é2üÿÿH‹FH‰÷ÿP0éGüÿÿH‹AH‰ÏÿP0éYüÿÿH‹CH‰ßÿP0éküÿÿH‹BH‰×ÿP0é}üÿÿH‹FH‰÷ÿP0é’üÿÿH‹AH‰ÏÿP0é§üÿÿH‹CH‰ßÿP0é¼üÿÿH‹BH‰×ÿP0éÑüÿÿH‹FH‰÷ÿP0éæüÿÿH‹AH‰ÏÿP0éûüÿÿH‹CH‰ßÿP0é ýÿÿH‹BH‰×ÿP0éýÿÿH‹FH‰÷ÿP0é2ýÿÿH‹AH‰ÏÿP0éFýÿÿH‹CH‰ßÿP0éZýÿÿH‹BH‰×ÿP0ékýÿÿH‹BH‰×ÿP0éÖøÿÿH‹FH‰÷ÿP0éèøÿÿH‹GÿP0éýøÿÿ@H‹AH‰ÏÿP0é ùÿÿH‹GÿP0é£ùÿÿ@I‹EL‰ïÿP0é ùÿÿI‹D$L‰”$(L‰çL‰œ$ L‰D$ÿP0L‹”$(L‹œ$ L‹D$é–÷ÿÿfDI‹@L‰”$ L‰ÇL‰\$ÿP0L‹”$ L‹\$év÷ÿÿ€I‹CL‰T$L‰ßÿP0L‹T$ée÷ÿÿ€I‹BL‰×ÿP0é^÷ÿÿH‹FH‰÷ÿP0ép÷ÿÿH‹GÿP0é…÷ÿÿ@H‹AH‰ÏÿP0é”÷ÿÿH‰HHH‰PPL‰pXéÕøÿÿ€HÇ„$(éDøÿÿ€H‹D$HƒxŽÐôÿÿH‹@H‹hHƒEéØêÿÿfD1ÿè‘ÒýÿH…ÀI‰Ä„ 1H‹|$H‰ÆèhÒýÿI‹4$I‰ÆHVÿH…ÒI‰$…ãêÿÿI‹D$L‰çÿP0éÓêÿÿòAD$é­ëÿÿ@I‹FL‰÷ÿP0é‡ëÿÿI‹EL‰ïÿP0émëÿÿH‹D$HƒxŽxÿÿÿH‹@L‹IƒM‰Æé‰êÿÿDHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$HÇ„$˜E1ÿHÇ„$HÇ„$€1ÛHÇD$xHÇ„$¸E1ÒHÇ„$°HÇ„$¨1íHÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$oÇ„$ø HÇD$PHÇ„$ M…ítIƒmt|M…öt Iƒ.„­H‹T$H…Ò„?ôÿÿH‹H‰„$ HƒèH…ÀH‰…$ôÿÿH‹BL‰”$0H‰×L‰œ$(L‰„$ ÿP0L‹”$0L‹œ$(L‹„$ éåóÿÿDI‹EL‰”$0L‰ïL‰œ$(L‰„$ ÿP0L‹”$0L‹œ$(L‹„$ éEÿÿÿI‹FL‰”$0L‰÷L‰œ$(L‰„$ ÿP0L‹”$0L‹œ$(L‹„$ éÿÿÿI‹D$L‰çÿP0éÔèÿÿHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1ÿHÇD$HÇ„$˜1ÛHÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸1íHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$qÇ„$ø HÇD$PHÇ„$ éVýÿÿfDH‹D$HƒxŽûÿÿL‹@IƒM‰Æé$æÿÿ„èËÎýÿH…À„\åÿÿL‰d$ÇD$uÇ„$ø HÇD$`E1ÒHÇD$HHÇD$E1ÛHÇD$hHÇD$@E1ÀHÇD$XHÇD$PE1äHÇ„$ HÇ„$˜E1ÿHÇ„$HÇ„$€1íHÇD$xHÇ„$¸1ÛHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðé¤ûÿÿI‹EL‰ïÿP0éìéÿÿI‹FL‰÷ÿP0é'êÿÿÇD$xÇ„$ø E1ÒHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$PHÇ„$ E1ÿHÇ„$˜HÇ„$1íHÇ„$€HÇD$x1ÛHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðéDîÿÿ@H‰l$HÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1äHÇD$XHÇ„$˜E1ÿHÇ„$HÇ„$€1ÛHÇD$xHÇ„$¸E1ÒHÇ„$°HÇ„$¨1íHÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$zÇ„$ø HÇD$PHÇ„$ ébøÿÿ€I‹EL‰ïÿP0é—âÿÿf„H‰l$HÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1äHÇD$XHÇ„$˜E1ÿHÇ„$HÇ„$€1ÛHÇD$xHÇ„$¸E1ÒHÇ„$°HÇ„$¨1íHÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$|Ç„$ø HÇD$PHÇ„$ é£öÿÿ€HÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äL‰l$HÇ„$˜E1ÿHÇ„$HÇ„$€1ÛHÇD$xHÇ„$¸E1ÒHÇ„$°HÇ„$¨1íHÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$ðÇD$çÇ„$ø%HÇD$PHÇ„$ é2õÿÿ€H‹CH‰ßÿP0é;âÿÿf„I‹FL‰÷ÿP0éãÿÿI‹D$L‰L$ L‰çÿP0L‹L$ éÓáÿÿfDI‹AL‰ÏÿP0ééáÿÿI‹FL‰÷ÿP0é6ßÿÿèKÆýÿH…À„ÜÝÿÿÇD$€Ç„$ø E1ÒHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$PHÇD$E1öHÇ„$ HÇ„$˜E1ÿHÇ„$HÇ„$€1íHÇD$xHÇ„$¸1ÛHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðéóÿÿf.„HÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÿHÇ„$€HÇD$x1ÛHÇ„$¸HÇ„$°E1ÒHÇ„$¨HÇ$1íHÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$ƒÇ„$ø HÇD$PHÇ„$ éÔåÿÿ@HÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$HÇ„$˜E1ÿHÇ„$HÇ„$€1ÛHÇD$xHÇ„$¸E1ÒHÇ„$°HÇ„$¨1íHÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$…Ç„$ø HÇD$PHÇ„$ éÓïÿÿHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1ÿHÇD$HÇ„$˜1ÛHÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸1íHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðÇD$‡Ç„$ø HÇD$PHÇ„$ é>îÿÿfDH‹GÿP0éÚÿÿ@èË¿ýÿH…À„û×ÿÿL‰d$ÇD$‹éûðÿÿI‹FL‰÷ÿP0é2ÚÿÿM‰åH‹l$pI‰ÜHÇD$`H‹\$xE1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1ÒHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$…Ç„$ø,HÇD$PHÇ„$ é·ìÿÿ€HÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÿHÇ„$€HÇD$x1ÛHÇ„$¸HÇ„$°E1ÒHÇ„$¨HÇ$1íHÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$ðÇD$©Ç„$øHÇD$PHÇ„$ é˜ßÿÿ„H‹EH‰ïÿP0éz×ÿÿH;kL‹|ëHƒÅIƒé_Ùÿÿ@L‰öL‰çèE¼ýÿ…À„™ÙÿÿM‰åH‹l$pI‰ÜÇD$‡H‹\$xE1ÒÇ„$ø,HÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é¤éÿÿ@HÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÿHÇ„$€HÇD$x1ÛHÇ„$¸HÇ„$°E1ÒHÇ„$¨HÇ$1íHÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$ðÇD$ÇÇ„$øHÇD$PHÇ„$ é”Üÿÿ@H„$àH‰„$@éîÒÿÿH‰ßèp þÿH…ÀI‰Å…<ÒÿÿHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÿHÇ„$€HÇD$x1ÛHÇ„$¸HÇ„$°E1ÒHÇ„$¨HÇ$1íHÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$ðÇD$åÇ„$ø%HÇD$PHÇ„$ éðÚÿÿI‹D$L‰çÿP0é ÓÿÿHÇ„$(é%Ñÿÿ€HÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$HÇ„$˜E1ÿHÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸1íHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$ðÇD$êÇ„$ø%HÇD$PHÇ„$ éñäÿÿDH‹5!–#H{è8þÿ…À…bÏÿÿH‰\$ÇD$íÇ„$ø%HÇD$`E1ÒHÇD$HHÇD$E1ÛHÇD$hHÇD$@E1ÀHÇD$XHÇD$PE1äE1ÿHÇ„$ HÇ„$˜HÇ„$HÇ„$€1íHÇD$xHÇ„$¸1ÛHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$ðégãÿÿ@H”$ÈH´$ÀH¼$¸èóµýÿHŒ”#H‹”$ÈH‹´$ÀH‹¼$¸HÇ„$èH‰„$ H‰„$HQs#HÇ„$ðH‰„$(èØ±ýÿH‰\$ÇD$ýéþÿÿfDH‰ßèþÿH…À…êdL‰àH‹\$xH‹l$pHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$)Ç„$ø*HÇD$PHÇ„$ éyáÿÿfDH;Ye#…kI‹D$ö@„\H‹XH‹‘d#M‹l$H‹‹BƒÀ‰BH‹d#;1öL‰ïÿÓI‰ÆH‹`d#H‹ƒhM…ö„!L‰ãéÎÿÿL‰àH‹\$xH‹l$pHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$+Ç„$ø*HÇD$PHÇ„$ é«ßÿÿ€I‰íH‹\$xH‹l$pL‰¤$ÇD$.E1ÒÇ„$ø*HÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1äHÇD$XHÇD$PE1öHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éLÞÿÿL‰àH‹\$xH‹l$pHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$9Ç„$ø+HÇD$PHÇ„$ éÝÿÿH‹\$xH‹l$pE1ÛHÇD$`HÇD$HE1ÀHÇD$HÇD$hE1äHÇD$@HÇD$XE1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$EÇ„$ø,HÇD$PHÇ„$ éàÛÿÿI‰íH‹\$xH‹l$pHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1öHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$GÇ„$ø,HÇD$PHÇ„$ é„ÚÿÿÇD$oÇ„$ø E1ÒHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$PHÇD$E1öHÇ„$ HÇ„$˜E1ÿHÇ„$HÇ„$€1íHÇD$xHÇ„$¸1ÛHÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0HÇ„$HÇ„$HÇ„$èHÇD$8HÇ„$HÇ„$HÇ„$ðéìØÿÿH‰ÚI‰íH‹\$xH‹l$pM‰ÈHÇD$`HÇD$HHÇD$E1ÛHÇD$hHÇD$@I‰ÔHÇD$XHÇ„$˜E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$TÇ„$ø,HÇD$PHÇ„$ é¨×ÿÿHƒ¼$èt H‹´$èH‹H‰D$ HƒèH…ÀH‰„1ÿè.¦ýÿH…ÀH‰D$ „£H‹´$ðH…ötH‹H‰D$(HƒèH…ÀH‰„ð 覩ýÿH…ÀH‰D$(„H‹t$8H…ötH‹H‰D$HHƒèH…ÀH‰„Ê H‹5…#H‹|$pèUùýÿH…ÀI‰Æ„qH‹„$˜I9F…iI‹nH…í„\M‹~HƒEIƒIƒ.„† ¿è9¨ýÿH…ÀI‰Á„EWI‰i¹º¸H‹$HƒÀL‰ÎL‰ÿL‰L$8HƒI‰\ÁH‹D$HƒI‰DÑH‹„$ 1ÒHƒI‰DÉèØøýÿH…ÀI‰ÄL‹L$8„vIƒ)„ Iƒ/„ I‹D$H;„$ „-H;1Z#„ L‰çèÛ¨ýÿH…ÀI‰Æ„¢H‹@H‹€àH…ÀH‰„$°„(^I‹$HÇD$`ÿÿÿÿHƒèH…ÀI‰$„µ ‹¼$H‹§X#L‰l$XL‰t$8…ÿHDKY#H‰„$¨Hƒ¼$°…—+H‹D$8H‹˜Y#H9P…U+H‹t$`H9pŽmWH‹@L‹$ðHƒÆH‰t$`Iƒ$I‹D$H;„$ „pH;OY#„cL‰çèù§ýÿH…ÀI‰Æ„Í\Iƒ,$u I‹D$L‰çÿP0I‹FL‰÷H‹˜àÿÓH…ÀI‰Å„ǨL‰÷ÿÓH…ÀH‰Å„ލL‰÷ÿÓH…ÀI‰Ç„¥L‰÷ÿÓH…À…÷¤è:íýÿ…ÀˆÜjIƒ.„ÃjL‰ïè þÿƒøÿ‰„$È„%Iƒm„ø H‰ïèýþÿƒøÿ‰„$Ø„Û'Hƒm„Æ L‰ÿèÚþÿƒøÿ‰„$à„;&Iƒ/„• H‹=у#è$ þÿH…ÀI‰Ç„Å!H‹5q‚#H‰ÇèiöýÿH…ÀH‰Å„; Iƒ/„o¿è©¢ýÿH…ÀI‰Ç„t-H‹f€#¿HƒI‹WH‰H‹ÿ#HƒI‹WH‰BH‹4€#HƒI‹WH‰BH‹Ñ#HƒI‹WH‰BH‹€#HƒI‹WH‰B è5¢ýÿH…ÀI‰Å„.?H‹ò#¿HƒI‹UH‰H‹‹#HƒI‹UH‰BH‹À#HƒI‹UH‰BH‹]#HƒI‹UH‰BH‹’#HƒI‹UH‰B èÁ¡ýÿH…ÀI‰Æ„H=H‹~#HƒI‹VH‰H‹#HƒI‹VH‰BH‹Q#HƒI‹VH‰BH‹î~#HƒI‹VH‰BH‹##HƒI‹VH‰B H‹„$˜H9E„r<¿è ¤ýÿH…ÀI‰Ä…0H‹D$0L‹L$XM‰òL‹t$8H‹\$xM‰èM‰ûI‰íHÇD$`H‰„$èH‹D$(M‰ÏH‹l$pHÇD$HHÇD$HÇD$hH‰D$8H‹D$ HÇD$@HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$‘Ç„$ø0HÇD$PHÇ„$ éÑÿÿL‰åI‰ÜéÀÿÿH‰l$ÇD$zéÞÓÿÿI‹$M‰æHÇ„$°HÇD$`HƒÀéøúÿÿI‹T$Hƒú…Â%H;„$ …Ÿ%M‹l$I‹l$ M‹|$(IƒEHƒEIƒIƒ,$…áûÿÿI‹D$L‰çÿP0éÑûÿÿH‹t$I‰ùL‰d$PH‹\$xH‹H‰D$ HƒèH…ÀH‰„ûH‹t$H;5ëS#”ÀH;5)S#”ÂÂu H;5»S#…1 ¶À…À…H‹£S#H‹t$8HƒH…ötH‹H‰D$HƒèH…ÀH‰„1ÿL‰L$葞ýÿH…ÀH‰D$0L‹L$„,‹´$˜…öŽ ÇD$(L‰L$H‰\$ 1ÿèVžýÿH…ÀI‰Ä„“*‹Œ$ …ÉŽ’1Û1ÿè2žýÿH…ÀI‰Æ„©'‹”$¨1í…Ò~=1ÿèžýÿH…ÀI‰Å„5H‰ÆL‰÷è;ïýÿ…À…ÉIƒm„¿ƒÅ9¬$¨uÃL‰öL‰çèïýÿ…À…ýIƒ.u I‹FL‰÷ÿP0ƒÃ9œ$ …pÿÿÿH‹|$0L‰æèÜîýÿ…À…lIƒ,$u I‹D$L‰çÿP0ƒD$(‹D$(9„$˜…ÿÿÿL‹L$H‹\$ H‹¼$L‰L$èP¡ýÿH…ÀH‰D$@L‹L$„×H‹D$@H‹@H;•R#„¥H;€Q#„ö¤H‹|$@L‰L$è+¡ýÿH…ÀI‰ÄL‹L$„›£H‹@H‹€àH…ÀH‰D$H„G¢HÇD$8ÿÿÿÿH‹T$@H‹H‰D$HƒèL‰L$H…ÀH‰„¢H‰\$ L‰|$(Hƒ|$H…ðH‹R#I9D$…·H‹T$8I9T$ŽÊrI‹D$L‹<ÐH‰ÐHƒÀH‰D$8IƒI‹GH;ÂQ#„SrH;­P#„FrL‰ÿè_ ýÿH…ÀI‰Å„ãpIƒ/u I‹GL‰ÿÿP0I‹EL‰ïL‹¸àAÿ×H…ÀH‰Å„˜pL‰ïAÿ×H…ÀI‰Æ„.pL‰ïAÿ×H…ÀH‰Ã„\nL‰ïAÿ×H…À…Þìèžåýÿ…Àˆ~ëIƒmu I‹EL‰ïÿP0H‰ïè}þÿ‰D$@ƒÀ„ëHƒmu H‹EH‰ïÿP0L‰÷èWþÿƒøÿ‰Å„ˆêIƒ.u I‹FL‰÷ÿP0H‰ßè4þÿƒøÿA‰Å„éHƒ+u H‹CH‰ßÿP0ƒ¼$(„xç‹D$@‹œ$(‹t$@H‹|$0™÷û‰Ú¯Ð)Ö‰Ú1òÁê…ö‰Ñ•Â!Ê)ÐHcðèàýÿH…ÀI‰Ç„åå‰è‰îL‰ÿ™÷û‰Ú¯Ð)Ö‰Ú1òÁê…ö‰Ñ•Â!ʹ)кHcðèþÿH…ÀH‰Ã„YäIƒ/u I‹GL‰ÿÿP0‹Œ$(D‰èD‰î™H‰ß÷ù‰Ê¯Ð)Ö‰Ê1òÁê…ö‰Ñ•Â!ʹ)кHcðè§þÿH…ÀI‰Ç„ZïHƒ+u H‹CH‰ßÿP0Hc|$@èqžýÿH…ÀH‰Ã„éíHcýè]žýÿH…ÀI‰Æ„ŠìIcýèIžýÿH…ÀH‰Å„*ë¿èÓœýÿH…ÀI‰Å„œñH‰XL‰p H‰ÆH‰h(L‰ÿè`þÿƒÀ„!ðIƒ/u I‹GL‰ÿÿP0Iƒm…ýÿÿI‹EL‰ïÿP0éýÿÿDI‹D$L‰çÿP0éò¹ÿÿH‹5™|#1ÒL‰çèWíýÿH…ÀI‰Æ…ÓéÿÿI‰íH‹\$xH‹l$pHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$WÇ„$ø,HÇD$PHÇ„$ é…ÉÿÿDI‹FL‰÷ÿP0éݸÿÿI‹EL‰ïÿP0é2úÿÿH‹FH‰÷ÿP0éÖñÿÿH‹FH‰÷ÿP0éòÿÿH‹FH‰÷ÿP0é'òÿÿI‹FL‰÷ÿP0ékòÿÿI‹GL‰ÿÿP0éìòÿÿI‹AL‰ÏÿP0éÓòÿÿI‹D$L‰çÿP0é;óÿÿH=yØèTšýÿ…À„ÓçÿÿI‰íH‹\$xH‹l$pÇD$WÇ„$ø,E1ÒHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XE1öHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é£ÇÿÿI‹GL‰ÿÿP0é\óÿÿH‹EH‰ïÿP0é+óÿÿI‹EL‰ïÿP0éùòÿÿ¿èô˜ýÿH…À„wI‰ÁM‰÷¹º1ÀéºðÿÿH‹FH‰|$ H‰÷ÿP0L‹L$ éìöÿÿM‰éH‹\$xI‰íHÇD$`H‹l$pE1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1öHÇD$XM‰ÏHÇ„$˜HÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$‹Ç„$ø,HÇD$PHÇ„$ éìÅÿÿH‹|$L‰L$ è˜ýÿ…ÀL‹L$ ‰¶õÿÿH‹D$PL‰ÍÇD$ &Ç„$ø\HÇD$`E1ÒHÇD$HHÇD$E1ÛH‰„$HÇD$hE1ÀHÇD$@HÇD$XE1äHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éô¸ÿÿI‹GL‰ÿÿP0é‚ðÿÿH‹\$xH‹l$pE1ÛHÇD$`HÇD$HE1ÀHÇD$HÇD$hE1äHÇD$@HÇD$XM‰ïHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$•Ç„$ø,HÇD$PHÇ„$ éQÃÿÿM‰éH‹\$xI‰íHÇD$`H‹l$pE1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@M‰ÏHÇD$XHÇ„$˜E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$Ç„$ø,HÇD$PHÇ„$ éÂÿÿH‹5p#H‰ßL‰ $èFäýÿH…ÀI‰ÆH‰D$L‹ $„H‹l$pE1ÒH‰„$èH‹D$(M‰ÏÇ„$ø/HÇD$`E1ÀHÇD$HHÇD$E1äH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é «ÿÿI‹D$L‹(H‹hL‹xé[ÚÿÿL‹L$XL‹t$8H‹\$xH‹l$pø,H…Òx6Hø¬H X«HƒúH5}¿L‰ $HEÈH‹ö-#H‹81ÀèÜ}ýÿL‹ $H‹D$0M‰ÏÇD$ H‰„$èH‹D$(H‰D$8H‹D$ H‰„$ðÇ„$ø/HÇD$`E1ÒHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PE1ÛE1Àé¹üÿÿH‹t$8H‹D$`H;F,L‹dÆHƒÀH‰D$`Iƒ$é¤ÔÿÿH‹|$8H‹„$°ÿÐH…ÀI‰Ä…‰ÔÿÿL‹l$XL‹t$8èk{ýÿH…ÀtH‹—-#H‹2H9ð…%wèîzýÿH‹=7Z#è’âýÿH…ÀH‰Ã„w»H‹5Z#H‰Çè×ËýÿH…ÀH‰D$`„ºHƒ+„±¼H‹5ˆV#H‹|$pè®ËýÿH…ÀH‰Ã„ƒ¸H‹D$`H‹´$˜H9p„ñ·¿è±zýÿH…ÀI‰Ä…ùH‰\$H‹l$pM‰éH‹\$xHÇD$HE1ÛHÇD$hHÇD$@E1ÀHÇD$XH‹D$0M‰ÏHÇ„$˜HÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸H‰„$èH‹D$(HÇ„$°HÇ„$¨HÇ$HÇD$pH‰D$8H‹D$ HÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$Ð Ç„$ø;HÇD$PHÇ„$ éѧÿÿH‰D$`H‹D$0E1ÛL‹L$H‹\$ E1ÀHÇD$HHÇD$E1ÒH‰D$@H‹D$PHÇD$hHÇD$XL‰ÍHÇ„$˜HÇ„$H‰„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$m&Ç„$øaHÇD$PHÇ„$ H‹*#H‰D$8éÙšÿÿI‰ÃH‹D$0L‹L$XL‹t$8H‹\$xI‰íHÇD$`H‹l$pE1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$M‰ÏHÇD$hHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$RÇ„$ø0HÇD$PHÇ„$ éÿ¤ÿÿH‹D$0L‹L$E1ÛH‹\$ HÇD$`E1ÀHÇD$HHÇD$E1ÒH‰D$@H‹D$PL‰ÍHÇD$hHÇD$XHÇ„$˜HÇ„$H‰„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$h&Ç„$øaHÇD$PHÇ„$ H‹I'#H‰D$8é˜ÿÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1äH‰„$H‹õ&#L‰ÍHÇD$XHÇ„$˜E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$c&Ç„$øaHÇD$PHÇ„$ H‰D$8éÈ–ÿÿH‰ÃI‰è¹º1ÀHƒÀL‰ÇH‰ÞL‰|ÃL‰lÓ1ÒL‰tËL‰D$Hè±ÄýÿH…ÀI‰ÄL‹D$H„ûHƒ+„Iƒ(„ÀI‹D$H;„$ „…H; &#„xL‰çè´týÿH…ÀH‰Å„ã:H‹@H‹€àH…ÀH‰„$ЄX9I‹$HÇ„$¸ÿÿÿÿHƒèH…ÀI‰$„^Hƒ¼$Ð…y H‹%#H9E…@ H‹œ$¸H9]Ž” H‹EH‹4ØH‰ØHƒÀH‰„$¸HƒH‹FH;„$ „zH;M%#„mH‰÷H‰t$HèòsýÿH…ÀI‰ÇH‹t$H„P?Hƒ.„7?I‹GL‰ÿL‹ àAÿÔH…ÀH‰Ã„›@L‰ÿAÿÔH…ÀI‰Æ„Û>L‰ÿAÿÔH…ÀI‰Å„Ì<L‰ÿAÿÔH…À…«<è2¹ýÿ…Àˆ0;Iƒ/„;H‰ßèæýÿƒøÿA‰Ç„ÕHƒ+„sL‰÷èúåýÿƒøÿ‰Ã„QIƒ.„GL‰ïèÝåýÿƒøÿA‰Ä„ÏIƒm„H‹=§P#è*ÙýÿH…ÀI‰Å„žD¼$ÈIcÇH‰ÇH‰„$èèórýÿH…ÀI‰Æ„œ$ØHcÃH‰ÇH‰„$ðèÍrýÿH…ÀH‰Ã„óD¤$àIcÄH‰ÇH‰„$`è¦rýÿH…ÀI‰Ç„^ò„$øèŒpýÿH…ÀH‰D$P„Ýò„$PèppýÿH…ÀH‰„$À„Uò„$XèQpýÿH…ÀH‰D$h„Ùƒ¼$…iH‹ö"#HƒH‹„$˜I9E„l¿ è®pýÿH…ÀI‰Ä…¢H‹„$ÀL‹L$XM‰èH‰\$XL‰d$`M‰òH‹\$xL‹t$8I‰íH‰D$@H‹„$¨M‰ûH‹l$pHÇD$HE1äHÇ„$˜HÇ„$M‰ÏH‰D$H‹D$0HÇ„$€HÇD$xHÇ„$¸HÇ„$°H‰„$èH‹D$(HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8HÇD$(H‹D$ HÇD$ ÇD$1 Ç„$ø1HÇ„$ H‰„$ðéºÿÿH‹VHƒú…ØH;„$ …H‹^L‹v L‹n(HƒIƒIƒEHƒ.…ãüÿÿH‹FH‰÷ÿP0éÔüÿÿI‹$L‰åHÇ„$ÐHÇ„$¸HƒÀé ûÿÿI‹@L‰ÇÿP0é1ûÿÿI‹D$L‰çÿP0é’ûÿÿI‹EL‰ïÿP0éØüÿÿI‹FL‰÷ÿP0éªüÿÿH‹CH‰ßÿP0é~üÿÿH‹CH‰ßÿP0L‹D$HéÖúÿÿH‹Õ#Hƒé’ýÿÿI‰íI‰ôL‹L$XL‹t$8H‹\$xH‹l$p“³H…Òˆ2²HÍžH -HƒúH5R±L‰ $HEÈH‹Ë#H‹81Àè±oýÿH‹D$0L‹ $E1ÒÇD$ÕÇ„$ø0E1ÛHÇD$`HÇD$HE1ÀH‰„$èH‹D$(M‰ÏHÇD$HÇD$hHÇD$@HÇD$XH‰D$8H‹D$ HÇD$PHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é›ÿÿH‹D$0L‹L$XM‰ÇL‹t$8H‰\$XM‰ýH‹\$xH‹l$pE1ÛH‰„$èH‹D$(E1ÀHÇD$`HÇD$HM‰ÏHÇD$HÇD$hE1ÒH‰D$8H‹D$ HÇD$@HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ŸÇ„$ø0HÇD$PHÇ„$ é¯™ÿÿèRkýÿH…À„ùÿÿH‹D$0L‹L$XM‰òL‹t$8H‰\$XM‰èH‹\$xI‰íÇD$ H‰„$èH‹D$(M‰ÏH‹l$pÇ„$ø0E1ÛHÇD$`HÇD$HE1äH‰D$8H‹D$ HÇD$HÇD$hHÇD$@HÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é3˜ÿÿH‹„$¸H;E}XH‹tÅHƒÀH‰„$¸HƒéÅöÿÿH‰ïH‹„$ÐÿÐH…ÀH‰Æ…¬öÿÿI‰Äè’iýÿH…ÀtH‹¾#H‹2H9ð…½!èiýÿHƒm„·+H‹D$ H;N#„ÂÿÿHƒx„ÂÿÿL‹l$XL‹t$8Iƒ.u I‹FL‰÷ÿP0H‹|$H;=/#”ÂH;=m#¶Â”ÁÑu H;=ü#…b+…À„Ÿ«H‹œ$L‰l$8H‹D$ H;Õ#„<«Hƒx„1«H‹|$ èa¬ýÿH…ÀH‰„$„ nL‹¼$I‹GH;„$ „®mL;=ˆ#„¡mH‹HH‹/#Hº—L‹L$8H5´—I‰ÝH‹l$pH‹\$xH‹81ÀL‰ $èéiýÿH‹D$0L‹ $M‰øL‰¬$ÇD$Ù$Ç„$øRH‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðHÇD$`HÇD$HE1ÒHÇD$HÇD$hE1ÛHÇD$@HÇD$XHÇD$PE1äé@†ÿÿH‹EH…ÀH‰D$P„|ÃÿÿL‹EHƒIƒHƒm„ü+¿L‰D$HèkgýÿH…ÀH‰ÃL‹D$H„t*H‹D$P¹ºH‰C¸égóÿÿI‰ÂH‹D$0L‹L$XL‹t$8H‹\$xM‰èM‰ûI‰íÇD$tH‰„$èH‹D$(M‰ÏH‹l$pÇ„$ø0E1äHÇD$`HÇD$HH‰D$8H‹D$ HÇD$HÇD$hHÇD$@HÇD$XH‰„$ðHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éC”ÿÿI‰ÀH‹D$0L‹L$XL‹t$8H‹\$xM‰ûI‰íHÇD$`H‹l$pH‰„$èH‹D$(E1äHÇD$HHÇD$M‰ÏHÇD$hHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$cÇ„$ø0HÇD$PHÇ„$ éÑ’ÿÿH‰Çèñbýÿ…À…ÃÿÿM‰éH‹\$xI‰íHÇD$`H‹l$pE1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1öHÇD$XHÇ„$˜M‰ÏHÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0ÇD$}Ç„$ø,HÇD$PHÇ„$ éz‘ÿÿècýÿH…À„#ñÿÿH‹D$0L‹L$XM‰èL‹t$8H‹\$xI‰íÇD$ H‹l$pE1ÒH‰„$èH‹D$(M‰ÏÇ„$ø0HÇD$`E1ÛHÇD$HHÇD$E1äH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éúÿÿI‰ÂH‹D$0L‹L$XL‹t$8H‹\$xM‰èÇD$ I‰íÇ„$ø1H‰„$èH‹D$(M‰ÏH‹l$pHÇD$`E1ÛHÇD$HHÇD$E1äH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0鈎ÿÿI‰ÀH‹D$0L‹L$XL‹t$8H‹\$xI‰íHÇD$`H‹l$pE1ÛH‰„$èH‹D$(E1äHÇD$HHÇD$M‰ÏHÇD$hHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ Ç„$ø1HÇD$PHÇ„$ éÿÿè¹^ýÿH…À„¡ìÿÿH‹D$0L‹L$XM‰òL‹t$8H‹\$xM‰èÇD$ I‰íÇ„$ø0H‰„$èH‹D$(M‰ÏH‹l$pHÇD$`E1ÛHÇD$HHÇD$E1äH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é–‹ÿÿH‹FH‹L‹pL‹héðíÿÿH‹„$ÀL‹L$XM‰òL‹t$8H‰\$XM‰èH‹\$xM‰ûI‰íH‰D$@H‹D$0E1äH‹l$pHÇD$`M‰ÏHÇD$HHÇD$H‰„$èH‹D$(HÇ„$˜HÇ„$HÇ„$€HÇD$xH‰D$8H‹D$ HÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$! Ç„$ø1HÇ„$ é"ŠÿÿH‹„$ÀL‹L$XM‰èH‰\$XM‰òH‹\$xL‹t$8I‰íHÇD$`H‰D$@H‹D$0M‰ûH‹l$pHÇD$HE1äHÇD$HÇD$hM‰ÏH‰„$èH‹D$(HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8HÇD$(H‹D$ HÇD$ ÇD$ Ç„$ø1HÇ„$ H‰„$ð鹈ÿÿH‹D$0L‹L$XM‰òL‹t$8H‰\$XM‰èH‹\$xM‰ûI‰íH‰„$èH‹D$(M‰ÏH‹l$pÇD$ E1äÇ„$ø1HÇD$`H‰D$8H‹D$ HÇD$HHÇD$HÇD$hHÇD$@H‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éT‡ÿÿI‰ÃH‹D$0L‹L$XM‰òL‹t$8H‰\$XM‰èH‹\$xI‰íH‰„$èH‹D$(E1äH‹l$pHÇD$`M‰ÏHÇD$HHÇD$H‰D$8H‹D$ HÇD$hHÇD$@HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ Ç„$ø1HÇD$PHÇ„$ éæ…ÿÿL‹L$XH‰D$XM‰òH‹D$0L‹t$8M‰èH‹\$xI‰íHÇD$`H‹l$pHÇD$HE1ÛH‰„$èH‹D$(E1äHÇD$HÇD$hM‰ÏHÇD$@HÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ Ç„$ø1HÇD$PHÇ„$ éx„ÿÿ1ÀIÄH‹”$H‹t$L‰ïH‰X H‹$L‰pL‰x(HƒH‰P0H‹”$ HƒH‰X8H‹\$PHƒH‰p@L‰æHƒH‰XPH‹œ$ÀH‰PHH‹T$hH‰XXH‹œ$¨H‰P`1ÒH‰Xhè~¦ýÿH…ÀH‰Æ„Iƒ,$„Iƒm„ÝH;5}#”ÀH;5»#¶Ø”ÂÂu H;5J#…¯Hƒ.„3…Û„âÿÿH‹¼$èèuVýÿH…ÀI‰Ä„ëH‹¼$ðè\VýÿH…ÀI‰Å„¬H‹¼$`èCVýÿH…À„+¿H‰D$HèËTýÿH…ÀH‰ÃH‹L$H„SH‹|$ L‰`H‰ÆL‰h H‰H(èA£ýÿƒÀ„ÃHƒ+…9ëÿÿH‹CH‰ßÿP0é*ëÿÿI‹EH‰t$HL‰ïÿP0H‹t$Hé ÿÿÿH‰D$HI‹D$L‰çÿP0H‹t$HéåþÿÿI‹EH…ÀH‰D$H„‚ãÿÿM‹eHƒIƒ$Iƒm„€¿ èTýÿH…ÀH‰Æ„ H‹D$HM‰åI‰ôH‰F¸éõýÿÿL‰d$`I‰ÄH‹D$0L‹L$XL‹t$8M‰èH‹\$xI‰íHÇD$HH‰„$èH‹D$(E1ÛH‹l$pHÇD$M‰ÏHÇD$hHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$W Ç„$ø1HÇD$PHÇ„$ éý€ÿÿH‰÷H‰t$HèSýÿ…À‰ÃH‹t$H‰5ýÿÿH‹D$0L‹L$XI‰íL‹t$8H‹\$xI‰ôH‹l$pÇD$[ E1ÒH‰„$èH‹D$(M‰ÏÇ„$ø1HÇD$`E1ÛHÇD$HHÇD$E1ÀH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éoÿÿH‹FH‰÷ÿP0é¾ûÿÿI‰ÀH‹D$0M‰éH‹\$xI‰íHÇD$`H‹l$pHÇD$HM‰þH‰„$èH‹D$(E1ÛHÇD$HÇD$hE1äHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ÉÇ„$ø/HÇD$PHÇ„$ éò}ÿÿL‹l$XL‹t$8é=ÔÿÿH‹$#H5 ŽºL‰ $H‹81ÀèúPýÿéÓÿÿI‰ÆéÉiÿÿI‰Üé,tÿÿI‹EL‰ $L‰ïÿP0L‹ $雼ÿÿI‹D$L‰ $L‰çÿP0L‹ $éx¼ÿÿH‹FL‰ $H‰÷ÿP0L‹ $éV¼ÿÿH‹|$L‰ $H‹GÿP0L‹ $é!¼ÿÿH‹D$PHÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XL‰ÍHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$3&Ç„$ø]HÇD$PHÇ„$ é1|ÿÿH‹D$PHÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XL‰ÍHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$.&Ç„$ø]HÇD$PHÇ„$ éùzÿÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@L‰ÍHÇD$XHÇ„$˜E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$,&Ç„$ø]HÇD$PHÇ„$ é¸yÿÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1äHÇD$XHÇ„$˜L‰ÍHÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$*&Ç„$ø]HÇD$PHÇ„$ éÁlÿÿHÇ„$(éV¸ÿÿI‰ÂH‹D$0L‹L$XL‹t$8H‹\$xH‹l$pÇD$'H‰„$èH‹D$(M‰ÏÇ„$ø/HÇD$`HÇD$HHÇD$H‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðéÍÿÿH‹D$0H‹\$xM‰ïH‹l$pÇD$áH‰„$èH‹D$(H‰D$8H‹D$ H‰„$ðéÍÿÿH‹D$PHÇD$HE1ÛHÇD$HÇD$hE1ÀHÇD$@HÇD$XL‰ÍHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‰„$ÇD$6&Ç„$ø]HÇD$PHÇ„$ éXvÿÿH‹D$PL‰ÍÇD$5&Ç„$ø]H‰„$éûeÿÿH‰Çè5Fýÿ…À…3ÞÿÿH‹D$0L‹L$XI‰íL‹t$8H‹\$xE1ÛH‹l$pHÇD$`E1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ÅÇ„$ø0HÇD$PHÇ„$ é–tÿÿH‹D$0L‹L$XI‰íL‹t$8H‹\$xE1ÛH‹l$pHÇD$`E1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$f Ç„$ø2HÇD$PHÇ„$ é'sÿÿH‰D$`H‹D$0M‰èL‹L$XL‹t$8I‰íH‹\$xH‹l$pE1ÛH‰„$èH‹D$(E1ÒHÇD$HHÇD$M‰ÏHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$j Ç„$ø2HÇD$PHÇ„$ é¼qÿÿI‰ÀH‹D$0L‹L$XL‹t$8H‹\$xI‰íHÇD$`H‹l$pE1ÛH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$h Ç„$ø2HÇD$PHÇ„$ éMpÿÿH‹D$0L‹L$XI‰íL‹t$8H‰\$E1ÒH‹\$xH‹l$pE1ÛH‰„$èH‹D$(M‰ÏÇD$w Ç„$ø2E1ÀHÇD$`HÇD$HE1äH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éßnÿÿH‰D$H‹D$0M‰èL‹L$XL‹t$8I‰íH‹\$xH‹l$pE1ÛH‰„$èH‹D$(E1ÒH‰L$`HÇD$HM‰ÏHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$l Ç„$ø2HÇD$PHÇ„$ éxmÿÿM‰ûM‰çI‰ÄH‹„$ÀL‹L$XM‰òL‹t$8H‰\$XI‰íH‹\$xH‹l$pM‰øH‰D$@H‹„$¨M‰ÏHÇD$`HÇ„$˜HÇ„$HÇ„$€H‰D$H‹D$0HÇD$xHÇ„$¸HÇ„$°HÇ„$¨H‰„$èH‹D$(HÇ$HÇD$pHÇ„$ˆHÇ„$ÈH‰D$8H‹D$ HÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$1 Ç„$ø1HÇ„$ élÿÿI‹EL‰ïÿP0éqéÿÿH‹EH‰ïÿP0é:Ôÿÿè>ýÿ…À‰‘ÔÿÿH‹D$0H‹\$xM‰ïH‹l$pÇD$ã#Ç„$øDH‰„$èH‹D$(H‰D$8H‹D$ H‰„$ðHÇD$`HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PE1ÒE1ÛE1Àé;ÕÿÿL‹L$XH‰D$XM‰òH‹D$0L‹t$8M‰ûM‰ÇH‹\$xH‹l$pM‰èHÇD$`HÇD$HH‰„$èH‹D$(M‰ýHÇD$HÇD$hE1äHÇD$@HÇ„$˜M‰ÏH‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$‘Ç„$ø0HÇ„$ éöiÿÿH‹EL‰D$HH‰ïÿP0L‹D$HéëÓÿÿI‹FL‰÷ÿP0é.•ÿÿH‹D$0L‹L$XM‰òL‹t$8H‹\$xM‰èM‰ûI‰íÇD$1H‰„$èH‹D$(M‰ÏH‹l$pÇ„$ø/E1äHÇD$`HÇD$HH‰D$8H‹D$ HÇD$HÇD$hHÇD$@HÇD$XH‰„$ðHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é\hÿÿH‹D$0L‹L$XI‰íL‹t$8H‹\$xE1ÒH‹l$pÇD$©E1ÛH‰„$èH‹D$(M‰ÏÇ„$ø0HÇD$`E1ÀHÇD$HHÇD$H‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éífÿÿH‹D$0L‹L$XE1ÛL‹t$8H‹\$xE1ÀH‹l$pHÇD$`E1ÒH‰„$èH‹D$(M‰ÏHÇD$HHÇD$HÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$§Ç„$ø0HÇD$PHÇ„$ éeÿÿI‹GL‰ÿÿP0éÚÄÿÿH‹D$0L‹L$XM‰òL‹t$8H‰\$XM‰èH‹\$xM‰ûI‰íH‰„$èH‹D$(M‰ÏH‹l$pÇD$ùE1äÇ„$ø0HÇD$`H‰D$8H‹D$ HÇD$HHÇD$HÇD$hHÇD$@H‰„$ðHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0édÿÿ¾H‰Çè}uýÿéHÃÿÿL‹L$XM‰òI‰íH‰\$XL‹t$8M‰ûH‹\$xH‹l$pA¼Iƒ+uI‹CL‰T$L‰ßL‰ $ÿP0L‹T$L‹ $L‰T$L‰ $è"|ýÿ…ÀL‹ $L‹T$…lH«eH dIƒüH50xL‰âL‰”$ HEÈH‹¢æ"E1äH‹81Àè…6ýÿH‹D$0L‹ $E1ÛÇD$ Ç„$ø0E1ÀHÇD$`HÇD$HH‰„$èH‹D$(M‰ÏHÇD$HÇD$hHÇD$@HÇD$PH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0L‹”$ éõaÿÿL‹L$XI‰íH‰\$XM‰ûI‰ÂL‹t$8H‹\$xH‹l$pA¼éþýÿÿH‹FH‰÷ÿP0éºÀÿÿI‰ÃH‹D$0L‹L$XL‹t$8H‹\$xI‰íHÇD$`H‹l$pI‰ôH‰„$èH‹D$(E1ÀHÇD$HHÇD$M‰ÏHÇD$hHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ïÇ„$ø0HÇD$PHÇ„$ éG`ÿÿL‹L$XI‰íM‰ûL‹t$8H‰D$XE1äH‹\$xH‹l$pE1ÒéSüÿÿH‹D$0ÇD$ M‰ÏÇ„$ø0HÇD$`E1ÛHÇD$HHÇD$E1ÀH‰„$èH‹D$(E1äHÇD$hHÇD$@HÇD$PHÇ„$ H‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xH‰„$ðHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éÎ^ÿÿL‹L$H‹\$ L‹|$(H‰l$`L‰õA¾IƒmuI‹EL‰ $L‰ïÿP0L‹ $L‰ $èwýÿ…ÀL‹ $…—H¥`H _IƒþH5*sL‰òHEÈH‹¤á"H‹81ÀèŠ1ýÿH‹D$PL‹ $H‰l$ÇD$ç&Ç„$øgHÇD$HH‰„$L‰ÍH‹®á"HÇD$E1ÒHÇD$hHÇD$@E1ÛHÇD$XHÇD$PE1ÀHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8é)]ÿÿH‰l$`L‹L$H‰ÅH‹\$ L‹|$(A¾é;þÿÿH‹D$PH‰l$L‰ÍÇD$ç&Ç„$øgHÇD$HH‰„$é™þÿÿL‹L$H‰D$`1íH‹\$ L‹|$(E1öéçýÿÿH‹D$PL‹L$E1ÛL‰|$@H‹\$ E1ÀL‹|$(HÇD$`E1ÒHÇD$HHÇD$L‰ÍHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$Õ&Ç„$øgHÇD$PHÇ„$ H‹ëÞ"H‰D$8é±OÿÿI‹WHƒú…ˆ¢H;LÞ"…g¢I‹oM‹w I‹_(HƒEIƒHƒIƒ/…ŽÿÿI‹GL‰ÿÿP0éÿÿÿL‹L$H‹\$ L‹|$(Iƒ,$uI‹D$L‰L$L‰çÿP0L‹L$H‹¼$L‰L$èw-ýÿH…ÀI‰ÄL‹L$„£ H‰Çèž,ýÿHƒøÿH‰ÅL‹L$„EŸIƒ,$uI‹D$L‰çÿP0L‹L$H‹=f #L‰L$èd“ýÿH…ÀI‰ÅL‹L$„ÅH‹5 #H‰Çè¤|ýÿH…ÀH‰D$@L‹L$„YœIƒmuI‹EL‰ïÿP0L‹L$ký-L‰L$Hcÿèû,ýÿH…ÀI‰ÅL‹L$„p®H‹t$@H‹öÜ"H9FH‰„$˜„‡­H‹|$@L‰îL‰L$ èÚšýÿH…ÀH‰D$L‹L$ „ɱIƒmuI‹EL‰L$ L‰ïÿP0L‹L$ H‹t$@H‹H‰D$ HƒèH…ÀH‰uH‹FL‰L$ H‰÷ÿP0L‹L$ H‹D$H;Ý"…«Hƒ¼$èt8H»é"H9„$(u HÇ„$(H‹„$@L‰L$ HxèyýÿL‹L$ H‹„$@L‹„$€¹H‹t$ºL‰L$ HhH‰ïèÚÍýÿ…ÀL‹L$ ˆd©Hƒ+uH‹CL‰L$ H‰ßÿP0L‹L$ HÇD$HHÇ„$à1ÛHÇ„$ÐHÇ„$Ø1íL‰L$ L‰|$8‹D$H9„$˜Ž”nH‹„$0H;Ü"„6mH‹t$HH‹¼$0è$lýÿH…ÀH‰D$X„ìkH…ítHƒmu H‹EH‰ïÿP0H‹t$HH‹|$0èñkýÿH…ÀH‰D$(„H³H…ÛtHƒ+u H‹CH‰ßÿP0ÇD$pHcD$p9„$ Ž³L‹¬$ÐH‹œ$ØHÇD$hH‰D$xL‹t$hD9´$¨ŽÉ²H‹t$xH‹|$X¹ºè–ýÿH…ÀI‰Ç„z±¹ºL‰öH‰ÇèuýÿH…ÀH‰„$Ø„ô´Iƒ/u I‹GL‰ÿÿP0H…ÛtHƒ+u H‹CH‰ßÿP0H‹t$xH‹|$(¹ºè&ýÿH…ÀI‰Ä„„³H‹t$h¹ºH‰ÇèýÿH…ÀH‰„$Є·µIƒ,$u I‹D$L‰çÿP0M…ítIƒmu I‹EL‰ïÿP0H‹¼$ÐH;=sÚ"”ÂH;=±Ù"¶Â”ÁÑu H;=@Ú"…¶…À…F!H‹„$ÐH‹£Ù"H‹@H‰œ$€H9Ø„ü H;Ú"„ï H‹¼$Ðè4)ýÿH…ÀI‰Ç„¬H‹@H‹€àH…ÀH‰D$`„iHÇD$@ÿÿÿÿHƒ|$`…©H‹;Ú"I9G…H‹T$@I9WŽÁI‹GL‹$ÐH‰ÐHƒÀH‰D$@Iƒ$I‹D$H;ýÙ"„ H;„$€„ûL‰çè™(ýÿH…ÀI‰Æ„ÅIƒ,$u I‹D$L‰çÿP0I‹FL‰÷L‹ àAÿÔH…ÀI‰Å„mL‰÷AÿÔH…ÀH‰Ã„L‰÷AÿÔH…ÀH‰Å„L‰÷AÿÔH…À…øèÖmýÿ…Àˆ»Iƒ.u I‹FL‰÷ÿP0L‰ïè¶šýÿ‰„$ˆƒÀ„QIƒmu I‹EL‰ïÿP0H‰ßèšýÿƒøÿA‰Æ„éHƒ+u H‹CH‰ßÿP0H‰ïèišýÿƒøÿA‰Å„‘ Hƒmu H‹EH‰ïÿP0H‹=#è°ýÿH…ÀI‰Ä„B Hc¼$ˆè‡'ýÿH…ÀH‰Å„ Icþès'ýÿH…ÀH‰Ã„Ñ Icýè_'ýÿH…À„1ÿH‰„$ˆèG'ýÿH…ÀI‰ÆH‹”$ˆ„C¿ èÉ%ýÿH…ÀI‰ÅH‹”$ˆ„H‰hH‰X H‰P(H‹„$ØHƒI‰E0H‹$HƒI‰E8H‹D$HƒI‰E@H‹„$ HƒI‰EHH‹D$HƒM‰uXI‰EPè:&ýÿH…ÀI‰Æ„{ƒ¼$°„]H‹a×"HƒH‹œ$HH‹5–#L‰÷H‰Úè‹&ýÿ…ÀˆH‹H‰„$ˆHƒèH…ÀH‰uH‹¼$HH‹GÿP0H‹”$8H‹5#L‰÷èF&ýÿ…Àˆ¢L‰òL‰îL‰çèÀuýÿH…ÀH‰ÃtnIƒ,$u I‹D$L‰çÿP0Iƒmu I‹EL‰ïÿP0Iƒ.u I‹FL‰÷ÿP0H‹”$àH…Òt!H‹H‰„$ˆHƒèH…ÀH‰u H‹BH‰×ÿP0H‰œ$àé”üÿÿH‹D$PL‹L$ E1ÛL‰t$HL‹t$XE1ÀL‰d$@H‹\$M‰üH‰„$H‹$Ö"L‰ÍL‹|$8L‰l$hE1ÒHÇD$`HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$Ò(Ç„$ø‚HÇD$PHÇ„$ H‰D$8é FÿÿH‹D$PL‹L$ E1ÒL‰t$HL‹t$XE1ÛL‰d$@H‹\$M‰üH‰„$H‹Õ"L‰ÍL‹|$8L‰l$hE1ÀL‰t$ ÇD$Ñ(Ç„$ø‚HÇD$`HÇD$HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8éîDÿÿH‹„$HL‹L$ E1ÒL‰t$HL‹t$XE1ÛL‰d$@H‹\$M‰üH‰D$H‹D$PL‰ÍL‰l$hL‹|$8E1ÀL‰t$ ÇD$Ï(H‰„$H‹¾Ó"Ç„$ø‚HÇD$`HÇD$HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8évOÿÿH‹LÒ"HƒéžûÿÿH‰D$HH‹D$PE1ÛL‹L$ L‹t$XE1ÀL‰d$@H‹\$M‰üH‰„$H‹­Ò"E1ÒL‹|$8L‰l$hL‰ÍHÇD$`HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$Ë(Ç„$ø‚HÇD$PHÇ„$ H‰D$8é•BÿÿH‰D$hH‹D$PI‰ÝL‹L$ L‰t$HE1ÛL‹t$XH‰l$`E1ÀH‰„$H‹Ñ"E1ÒL‰d$@H‹\$M‰üL‰t$ L‹|$8E1öHÇD$XH‰T$L‰ÍHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇD$ÇD$®(Ç„$ø‚HÇD$PHÇ„$ H‰D$8éMÿÿH‰D$HH‹D$PI‰ÝL‹t$XL‹L$ E1ÛH‰l$`L‰d$@E1ÀH‰„$H‹jÐ"M‰üL‰t$ L‹|$8E1öH‹\$HÇD$hL‰ÍHÇD$XH‰T$E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇD$ÇD$¬(Ç„$ø‚HÇD$PHÇ„$ H‰D$8éßKÿÿI‰ÃH‹D$PL‹t$XL‹L$ I‰ÝH‰l$`L‰d$@H‹\$M‰üH‰„$H‹AÏ"E1ÀL‹|$8L‰t$ L‰ÍHÇD$HHÇD$hE1öHÇD$XHÇD$E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇD$ÇD$ª(Ç„$ø‚HÇD$PHÇ„$ H‰D$8é®JÿÿH‹D$PL‹L$ E1ÛL‹t$XH‰l$`E1ÀL‰d$@H‹\$M‰üH‰„$H‹Î"L‰ÍL‹|$8HÇD$HE1ÒHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$¨(Ç„$ø‚HÇD$PHÇ„$ H‰D$8éô=ÿÿH‰D$`H‹D$PE1ÛL‹L$ L‹t$XE1ÀL‰d$@H‹\$M‰üH‰„$H‹îÌ"E1ÒL‹|$8HÇD$HL‰ÍHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$¦(Ç„$ø‚HÇD$PHÇ„$ H‰D$8éÒ<ÿÿH‰D$@H‹D$PM‰üL‹L$ L‹t$XE1ÛL‹|$8H‹\$E1ÀH‰„$H‹ÌË"E1ÒHÇD$`HÇD$HL‰ÍHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$¤(Ç„$ø‚HÇD$PHÇ„$ H‰D$8é¬;ÿÿèçýÿH…À„aòÿÿH‹D$PL‹L$ M‰üL‹t$XH‰l$`E1ÒL‹|$8H‹\$E1ÛH‰„$H‹˜Ê"L‰ÍL‰t$ ÇD$Ž(E1ÀÇ„$ø~HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8éx:ÿÿè³ýÿH…À„ ñÿÿH‹D$PL‹t$XM‰üL‹L$ I‰ÝH‰l$`L‹|$8H‹\$E1ÒH‰„$H‹dÉ"E1ÛL‰t$ L‰ÍÇD$Œ(Ç„$ø~HÇD$HE1ÀHÇD$HÇD$hE1öHÇD$@HÇD$XHÇD$PHÇD$HÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8éÍDÿÿèpýÿH…À„¡ïÿÿL‰èL‹t$XL‹L$ H‰D$H‹D$PM‰üH‰l$`I‰ÝL‹|$8L‰t$ H‹\$L‰ÍH‰„$H‹È"E1ÒÇD$Š(Ç„$ø~E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1öHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8é‹CÿÿL‰èL‹L$ L‰t$HH‰D$H‹D$PM‰üL‹t$XH‰l$`I‰ÝL‹|$8H‹\$L‰ÍH‰„$H‹àÆ"E1ÒL‰t$ ÇD$(E1ÛÇ„$ø~HÇD$E1ÀHÇD$hHÇD$@E1öHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8é[Bÿÿ¾H‰ÇèÔSýÿéûìÿÿM‰üL‰t$HL‹L$ L‹D$(L‹t$XL‰èL‹|$8I‰Ý½H‰ÃH‹T$HH‹H‰$HƒèH…ÀH‰uH‹BL‰D$H‰×L‰ $ÿP0L‹D$L‹ $L‰D$L‰ $èeZýÿ…ÀL‹ $L‹D$…ŽHîCH NBHƒýH5sVH‰êHEÈH‹íÄ"H‹81ÀèÓýÿH‹D$PL‹D$E1ÒL‹ $H‰\$E1ÛL‰t$ H‹\$E1öH‰„$H‹þÄ"L‰D$(L‰ÍÇD$‡(Ç„$ø~HÇD$`E1ÀHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8ém@ÿÿL‰èM‰üI‰ÝL‰t$HL‹L$ H‰ÃL‹D$(L‹t$X½L‹|$8éþÿÿH‹D$PH‰\$L‰ÍL‰D$(L‰t$ E1ÒH‹\$ÇD$‡(E1ÛH‰„$H‹Ã"E1ÀÇ„$ø~HÇD$`E1öHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8é?ÿÿM‰üL‰t$HL‹L$ L‹D$(H‰ÃL‹t$XL‹|$8E1í1íéÑüÿÿH‰D$HH‹D$PE1ÛL‹L$ L‹t$XE1ÀL‰d$@H‹\$M‰üH‰„$H‹RÂ"E1ÒL‹|$8HÇD$`L‰ÍHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$u(Ç„$ø~HÇD$PHÇ„$ H‰D$8é62ÿÿI‹T$Hƒú…¾H;„$€…›M‹l$I‹\$ I‹l$(IƒEHƒHƒEIƒ,$…SèÿÿI‹D$L‰çÿP0éCèÿÿL‰ÿH‹D$`ÿÐH…ÀI‰Ä…zçÿÿèýÿH…ÀtH‹2Á"H‹2H9ð…Bè‰ýÿIƒ/u I‹GL‰ÿÿP0HƒD$hL‹¬$ÐH‹œ$ØéLåÿÿI‹D$L‹(H‹XH‹hé_ÿÿÿL‰d$@L‹L$ M‰üL‹D$(L‹t$XL‹|$8˜H…Òˆ{Hø>H X=HƒúH5}QL‰D$L‰ $HEÈH‹ñ¿"H‹81Àè×ýÿH‹D$PL‹D$E1ÒL‹ $H‹\$E1ÛL‰t$ ÇD$[(H‰„$H‹À"L‰D$(L‰ÍÇ„$ø~HÇD$`HÇD$HE1ÀHÇD$HÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8éê/ÿÿH‹D$@I;G2þÿÿM‹dÇHƒÀH‰D$@Iƒ$éråÿÿH‹D$PL‰D$(L‰ÍH‹\$L‰t$ E1ÒÇD$[(Ç„$ø~E1ÛH‰„$H‹´¾"E1ÀHÇD$`HÇD$HHÇD$HÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8é¯.ÿÿH‹ˆ½"H5qJºL‰D$L‰ $H‹81ÀèY ýÿH‹D$PL‹D$E1ÒL‹ $H‹\$E1ÛL‰t$ ÇD$[(H‰„$H‹„½"L‰D$(L‰ÍÇ„$ø~HÇD$`HÇD$HE1ÀHÇD$HÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8él-ÿÿH‰Çè$ ýÿ…À…®ûÿÿH‹D$PL‹L$ E1ÛL‹t$XL‰d$@E1ÀM‰üH‹\$L‹|$8H‰„$H‹V¼"L‰ÍHÇD$`HÇD$HE1ÒHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$K(Ç„$ø~HÇD$PHÇ„$ H‰D$8é6,ÿÿH‹D$PL‹L$ M‰üL‹t$XL‹|$8E1ÒH‹\$ÇD$0(E1ÛH‰„$H‹-»"L‰ÍL‰t$ Ç„$ø~E1ÀHÇD$`HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8é +ÿÿI‰ÄH‹D$PL‹L$ L‹t$XL‹|$8E1ÛH‹\$HÇD$`E1ÀH‰„$H‹º"L‰ÍHÇD$HHÇD$hE1ÒHÇD$@HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀL‰t$ HÇD$ÇD$.(Ç„$ø~HÇD$PHÇ„$ H‰D$8éâ)ÿÿH‹„$ÐHÇD$`HÇD$@HƒI‰Çé&ßÿÿH‹¼$ØH;=õ¸"”ÂH;=3¸"¶Â”ÁÑu H;=¸"u …À„ï÷ÿÿéÞÿÿè>ýÿ…ÀyêH‹D$PL‹L$ E1ÒL‹t$XL‹|$8E1ÛH‹\$ÇD$(E1ÀH‰„$H‹q¸"L‰ÍL‰t$ Ç„$øzE1äHÇD$`HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀH‰D$8éP(ÿÿH‹D$0H‹\$xE1ÛH‹l$pHÇD$`E1ÀHÇD$HHÇD$M‰ïH‰„$èH‹D$(E1ÒHÇD$hHÇD$@HÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ßÇ„$ø/HÇD$PHÇ„$ é¡2ÿÿH‰Çè¦ýÿ…À…ˈÿÿH‹D$0H‹\$xE1ÛH‹l$pHÇD$`E1ÀHÇD$HHÇD$M‰ïH‰„$èH‹D$(E1ÒHÇD$hHÇD$@HÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ýÇ„$ø/HÇD$PHÇ„$ é 1ÿÿH‹D$0L‹L$E1ÒH‹\$ L‰t$`E1ÛÇD$w&Ç„$øaE1ÀH‰D$@H‹D$PL‰ÍHÇD$HHÇD$HÇD$hHÇD$XH‰„$HÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‹b³"H‰D$8é($ÿÿ¾H‰Çè9AýÿéüZÿÿM‰èM‰òI‰íL‹L$XL‹t$8A¼H‹\$xH‹l$pIƒ*„L‰L$L‰$èûGýÿ…ÀL‹$L‹L$…¡H„1H ä/IƒüH5 DL‰âL‰ $HEÈH‹²"L‰„$ E1äH‹81ÀèZýÿH‹D$0L‹ $E1ÒÇD$9Ç„$ø/E1ÛHÇD$`HÇD$HH‰„$èH‹D$(M‰ÏHÇD$HÇD$hHÇD$@HÇD$XH‰D$8H‹D$ HÇD$PHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0L‹„$ éÁ-ÿÿH‹D$0ÇD$9M‰ÏÇ„$ø/HÇD$`E1ÒHÇD$HHÇD$E1ÛH‰„$èH‹D$(E1äHÇD$hHÇD$@HÇD$XHÇD$PH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éi,ÿÿI‹BL‰L$L‰×L‰$ÿP0L‹L$L‹$éÇüÿÿM‰èM‰òL‹L$XL‹t$8I‰ÅH‹\$xH‹l$pA¼é•üÿÿM‰òI‰ÀL‹L$XL‹t$8H‹\$xE1íH‹l$pE1äépüÿÿH‹BH‰×ÿP0H‰\$ L‰|$(éî]ÿÿH‹D$PL‰ÍÇD$&Ç„$øgHÇD$`E1ÒHÇD$HHÇD$E1ÛH‰„$H‹/¯"E1ÀHÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8éÿÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$XL‰ÍH‰„$H‹õ­"E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$&Ç„$øgHÇD$PHÇ„$ H‰D$8éÔÿÿH‹D$@HÇD$HHÇD$8HƒI‰Äé)[ÿÿH…ÛtHƒ+u H‹CH‰ßÿP0H‹´$H‹|$(èšøüÿ…ÀˆÑ<„‚H‹œ$龑ÿÿH‹D$0L‹L$8I‰ÝH‹l$pH‹\$xE1ÛHÇD$`HÇD$HE1ÀH‰„$èH‹D$(E1äHÇD$HÇD$hM‰ÏHÇD$@HÇD$XE1ÒH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ L‰¬$ÇD$×$Ç„$øRHÇD$PHÇ„$ é­'ÿÿH‹œ$H‹ Ô"H‹|$(H‰Þènúüÿ…Àˆ×:H;ÿª"„^:H‹SHƒú…¢9H‹„$H‹XL‹` L‹x(HƒH‰ßIƒ$Iƒè²lýÿ‰D$PƒÀ„î7Hƒ+u H‹CH‰ßÿP0L‰çèlýÿ‰D$hƒÀ„K6Iƒ,$u I‹D$L‰çÿP0L‰ÿèflýÿ‰„$°ƒÀ„Â5Iƒ/u I‹GL‰ÿÿP0H‹='×"èª_ýÿH…ÀI‰Ä„04HcD$PH‰ÇH‰„$¸èyùüÿH…ÀH‰Ã„Ÿ2HcD$hH‰ÇH‰„$ÀèXùüÿH…ÀI‰Æ„1Hc„$°H‰ÇH‰„$Èè4ùüÿH…ÀH‰D$X„‰/ò„$øè÷üÿH…ÀI‰Å„.ò„$PèþöüÿH…ÀH‰D$`„ž,ò„$XèâöüÿH…ÀH‰D$H„*+ƒ¼$…­)H‹‡©"HƒH‹„$˜I9D$„)¿ è>÷üÿH…ÀH‰Å„©'1ÀHDÅH‹´$¨1ÒL‰çH‰XH‹\$XL‰p H‰X(H‹œ$HƒH‰X0H‹$HƒH‰X8H‹\$HƒH‰X@H‹œ$ HƒH‰XHH‹\$`H‰phL‰hPH‰îH‰XXH‹\$HH‰X`è²GýÿH…ÀI‰Ç„®%Hƒmu H‹EH‰ïÿP0Iƒ,$u I‹D$L‰çÿP0L;=¤¨"”ÀL;=â§"¶Ø”ÂÂu L;=q¨"…¾$Iƒ/u I‹GL‰ÿÿP0…Û„§ûÿÿLc¬$ˆL‰ïè“÷üÿH…ÀI‰Ç„ #H‹5¨Ò"H‹|$xèæFýÿH…ÀI‰Ä„™!H‹5ÛÐ"º2H‰Çè/7ýÿH…ÀI‰Æ„ Iƒ,$u I‹D$L‰çÿP0ºL‰öL‰ÿèôüÿH…ÀI‰Ä„÷Iƒ/u I‹GL‰ÿÿP0Iƒ.u I‹FL‰÷ÿP0L;%½§"”ÀL;%û¦"¶Ø”ÂÂu L;%Ч"…Iƒ,$u I‹D$L‰çÿP0…Û„ H‹\$xH‹5ÞÑ"H‰ßèFýÿH…ÀI‰Ä„3H‹5»Ñ"H‰ßèûEýÿH…ÀI‰Æ„îH‹5Ð"H‰ÇèPóüÿH…ÀI‰Ç„gIƒ.u I‹FL‰÷ÿP0¿èêôüÿH…ÀI‰Æ„kL‰xèµõüÿH…ÀI‰Ç„êH‹2¦"H‹5cÑ"H‰Çè#öüÿ…Àˆ`L‰úL‰öL‰çèEýÿH…ÀH‰Å„ÚIƒ,$u I‹D$L‰çÿP0Iƒ.u I‹FL‰÷ÿP0Iƒ/u I‹GL‰ÿÿP0Hƒmu H‹EH‰ïÿP0H‹=Ñ"è²[ýÿH…ÀH‰Ã„H‹¼$¸è‰õüÿH…ÀI‰Ç„šH‹¼$ÀèpõüÿH…ÀI‰Æ„ H‹¼$ÈèWõüÿH…ÀI‰Ä„¤ ¿èñüÿH…ÀH‰ÅH‰D$H„ H‹”$L‰ïHƒH‹@H‰èõüÿH…ÀH‰D$`„•¿ èóüÿH…ÀI‰Å„"H‹4$H‹T$L‰xL‰p L‰`(I‰m0HƒI‰u8H‹´$ HƒI‰U@H‹T$xH‹D$`HƒI‰uHHƒI‰UPI‰EXèôüÿH…ÀH‰D$`„gƒ¼$°„IH‹B¥"HƒL‹¼$HH‹5wÏ"H‹|$`L‰úèjôüÿ…Àˆ¨I‹H‰D$HHƒèH…ÀI‰uH‹¼$HH‹GÿP0L‹|$`H‹”$8H‹5ëÑ"L‰ÿè#ôüÿ…Àˆ÷L‰úL‰îH‰ßèCýÿH…ÀH‰D$H„€Hƒ+u H‹CH‰ßÿP0Iƒmu I‹EL‰ïÿP0H‹\$`H‹H‰D$XHƒèH…ÀH‰u H‹CH‰ßÿP0H‹|$HèAfýÿ‰„$ˆƒÀt_H‹\$HH‹H‰D$XHƒèH…ÀH‰u H‹|$HH‹GÿP0‹Œ$°‹T$h‹t$PH‹|$ è÷ôüÿH…ÀI‰ÄtvHƒ(…I÷ÿÿH‹@L‰çÿP0é:÷ÿÿèññüÿH…Àt—H‹D$0L‹L$8L‹d$HH‹\$xH‹l$pÇD$ë%H‰„$èH‹D$(M‰ÏÇ„$øYH‰D$8H‹D$ H‰„$ðéÎÿÿH‹D$0L‹L$8E1ÛH‹\$xH‹l$pE1ÀHÇD$`HÇD$HE1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ö%Ç„$øZHÇD$PHÇ„$ é¢ÿÿH‹D$0L‹L$8E1ÛL‹d$HH‹l$pE1ÀH‰\$HL‰l$@E1ÒH‰„$èH‹D$(M‰ÏH‹\$xHÇD$HÇD$hHÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$æ%Ç„$øYHÇD$PHÇ„$ éGÿÿH‹D$0L‹L$8H‰\$HL‰l$@H‹\$xH‹l$pH‰„$èH‹D$(M‰ÏÇD$å%Ç„$øYHÇD$HÇD$hH‰D$8H‹D$ H‰„$ðéD±ÿÿH‹D$0L‹L$8H‰\$HL‰l$@H‹\$xH‹l$pH‰„$èH‹D$(M‰ÏL‹¤$HÇD$ã%Ç„$øYHÇD$H‰D$8H‹D$ HÇD$hH‰„$ðéZ ÿÿH‹AŸ"Hƒé²úÿÿH‹D$0L‹L$8E1ÛH‰\$HH‹l$pE1ÀH‹\$xL‰l$@E1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ß%Ç„$øYHÇD$PHÇ„$ éÿÿH‰D$@H‹D$0M‰ûL‹L$8L‰t$hM‰åH‹l$pL‹d$HE1ÀH‰„$èH‹D$(E1öH‰\$HHÇD$M‰ÏH‹\$xHÇD$XE1ÒH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$Â%Ç„$øYHÇD$PHÇ„$ éŠÿÿH‹D$0L‹L$8M‰ûL‰t$hH‹l$pM‰åHÇD$L‹d$HE1ÀH‰„$èH‹D$(E1öH‰\$HHÇD$@M‰ÏH‹\$xHÇD$XE1ÒH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$À%Ç„$øYHÇD$PHÇ„$ é)ÿÿH‹D$0L‹L$8M‰ûL‰t$hH‹l$pM‰åHÇD$`L‹d$HE1ÀH‰„$èH‹D$(E1öH‰\$HHÇD$M‰ÏH‹\$xHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$»%Ç„$øYHÇD$PHÇ„$ é¿ÿÿH‹D$0L‹L$8M‰ûH‰\$HH‹l$pE1ÀH‹\$xL‰t$hE1äH‰„$èH‹D$(M‰ÏHÇD$`HÇD$E1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$¹%Ç„$øYHÇD$PHÇ„$ éxÿÿH‰D$hH‹D$0M‰ûL‹L$8H‰\$HE1ÀH‹\$xH‹l$pE1äH‰„$èH‹D$(E1ÒHÇD$`HÇD$M‰ÏHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$·%Ç„$øYHÇD$PHÇ„$ éÿÿI‰ÃH‹D$0L‹L$8H‰\$HH‹l$pE1ÀH‹\$xHÇD$`E1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$µ%Ç„$øYHÇD$PHÇ„$ é°ÿÿH‰D$HH‹D$0E1ÛL‹L$8H‹\$xE1ÀH‹l$pHÇD$`E1äH‰„$èH‹D$(E1ÒHÇD$HÇD$hM‰ÏHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$³%Ç„$øYHÇD$PHÇ„$ éJÿÿL‰t$hI‰ÆH‹D$0L‹L$8H‹\$xM‰ûH‹l$pM‰åHÇD$`H‰„$èH‹D$(E1ÀHÇD$HHÇD$E1äHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$œ%Ç„$øXHÇD$PHÇ„$ éÃÿÿH‹D$0L‹L$8M‰ûL‰t$hH‹\$xM‰åH‹l$pÇD$›%E1ÒH‰„$èH‹D$(M‰ÏÇ„$øXHÇD$`E1ÀHÇD$HHÇD$E1äH‰D$8H‹D$ E1öHÇD$@HÇD$XHÇD$PHÇ„$ H‰„$ðHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éWÿÿI‰ÃH‹D$0L‹L$8L‰t$hH‹\$xM‰åH‹l$pHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$E1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$™%Ç„$øXHÇD$PHÇ„$ éë ÿÿH‰D$hH‹D$0M‰ûL‹L$8H‹\$xM‰åH‹l$pHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$E1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$”%Ç„$øXHÇD$PHÇ„$ é ÿÿH‹D$0L‹L$8E1ÛH‹\$xH‹l$pE1ÀHÇD$`HÇD$HE1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$%Ç„$øXHÇD$PHÇ„$ é0 ÿÿI‰ÃH‹D$0L‹L$8L‰t$hH‹\$xM‰åH‹l$pHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$E1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$‘%Ç„$øXHÇD$PHÇ„$ é©ÿÿH‰D$hH‹D$0M‰åL‹L$8H‹\$xE1ÛH‹l$pHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$E1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$%Ç„$øXHÇD$PHÇ„$ é=ÿÿH‹D$0L‹L$8M‰ûH‹\$xH‹l$pE1ÀL‰t$hHÇD$`E1äH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$%Ç„$øWHÇD$PHÇ„$ éòÿÿL‰çè÷×üÿ…À‰Ã‰ÙáÿÿH‹D$0L‹L$8M‰åH‹\$xH‹l$pE1ÒÇD$‚%Ç„$øWE1ÛH‰„$èH‹D$(M‰ÏHÇD$`HÇD$HE1ÀHÇD$HÇD$hE1äH‰D$8H‹D$ E1öHÇD$@HÇD$XHÇD$PHÇ„$ H‰„$ðHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éUÿÿH‰D$hH‹D$0M‰ûL‹L$8H‹\$xM‰åH‹l$pHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$E1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$|%Ç„$øWHÇD$PHÇ„$ ééÿÿH‹D$0L‹L$8M‰ûH‹\$xH‹l$pE1ÀHÇD$`HÇD$HE1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$z%Ç„$øWHÇD$PHÇ„$ éšÿÿI‰ÃH‹D$0L‹L$8H‹\$xH‹l$pE1ÀHÇD$`HÇD$HE1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$x%Ç„$øWHÇD$PHÇ„$ é0ÿÿL‰ÿè5Òüÿ…À‰Ã‰0ÛÿÿH‹D$0L‹L$8M‰ûH‹\$xH‹l$pÇD$m%Ç„$øVH‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðHÇD$`HÇD$HE1ÒHÇD$HÇD$hHÇD$@HÇD$XHÇD$Pé ”ÿÿI‰ÃH‹D$0L‹L$8I‰îH‹\$xH‹l$pL‰t$hM‰åHÇD$`H‰„$èH‹D$(E1ÀHÇD$HHÇD$E1äHÇD$@HÇD$XE1öH‰D$8H‹D$ M‰ÏHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$i%Ç„$øVHÇD$PHÇ„$ éþþÿH‹„$¨L‰l$@M‰åL‹d$HL‹L$8I‰ØL‰t$H‹\$xI‰îH‰D$HH‹D$0E1ÛH‹l$pHÇD$hM‰ÏHÇ„$˜HÇ„$E1ÒH‰„$èH‹D$(HÇ„$€HÇD$xHÇ„$¸HÇ„$°H‰D$8H‹D$ HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$C%Ç„$øVHÇD$PHÇ„$ é¥üþÿI‹l$H…í„×ÖÿÿM‹D$HƒEIƒIƒ,$uI‹D$L‰„$ÐL‰çÿP0L‹„$п L‰„$ÐèÝÍüÿH…ÀI‰ÇL‹„$Ðt$I‰oM‰ÄL‰ý¸é‰ÖÿÿH‹""HƒéNÖÿÿI‰ÃH‹„$¨L‹d$HL‹L$8M‰ÇL‰t$L‰l$@I‰îI‰ØH‰D$HH‹D$0M‰ýH‹\$xH‹l$pM‰ÏHÇD$hHÇ„$˜E1ÒH‰„$èH‹D$(HÇ„$HÇ„$€HÇD$xHÇ„$¸H‰D$8H‹D$ HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$C%Ç„$øVHÇD$PHÇ„$ éÂúþÿH‹D$0L‹L$8I‰ØL‰t$L‰l$@E1ÛH‹\$xH‹l$pM‰åH‰„$èH‹D$(E1öL‹d$HHÇD$hM‰ÏHÇD$HHÇ„$˜E1ÒH‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$3%Ç„$øVHÇD$PHÇ„$ éjùþÿH‹D$0L‹L$8I‰ØL‰t$L‰l$@E1ÛH‹\$xH‹l$pM‰åH‰„$èH‹D$(E1äHÇD$HHÇD$hE1öHÇ„$˜HÇ„$M‰ÏH‰D$8H‹D$ E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$1%Ç„$øVHÇD$PHÇ„$ éøþÿH‰D$@H‹D$0I‰ØL‹L$8L‰t$M‰åH‹\$xH‹l$pE1ÛH‰„$èH‹D$(E1äHÇD$`HÇD$HE1öHÇD$hHÇ„$˜M‰ÏH‰D$8H‹D$ E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$/%Ç„$øVHÇD$PHÇ„$ éµöþÿH‹D$0L‹L$8I‰ØL‰t$H‹\$xM‰åH‹l$pHÇD$`E1ÛH‰„$èH‹D$(E1äHÇD$HHÇD$hE1öHÇD$@HÇ„$˜M‰ÏH‰D$8H‹D$ E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$-%Ç„$øVHÇD$PHÇ„$ éRõþÿH‰D$H‹D$0I‰ØL‹L$8H‹\$xM‰åH‹l$pHÇD$`E1ÛH‰„$èH‹D$(E1äHÇD$HHÇD$hE1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$+%Ç„$øVHÇD$PHÇ„$ éæóþÿI‰ÀH‹D$0L‹L$8H‹\$xH‹l$pM‰åHÇD$`HÇD$HE1ÛH‰„$èH‹D$(E1äHÇD$HÇD$hE1öHÇD$@HÇD$XM‰ÏH‰D$8H‹D$ E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$)%Ç„$øVHÇD$PHÇ„$ évòþÿH‹D$0L‹L$8E1ÛH‹\$xH‹l$pE1ÀHÇD$`HÇD$HE1äH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$'%Ç„$øVHÇD$PHÇ„$ é'ñþÿè¯ÂüÿH…À„0ÊÿÿH‹D$0L‹L$8M‰ûH‹\$xH‹l$pÇD$%Ç„$øUH‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðéöðÿÿèPÂüÿH…À„§ÉÿÿH‹D$0L‹L$8M‰ûH‹\$xH‹l$pM‰åÇD$%Ç„$øUE1ÒH‰„$èH‹D$(M‰ÏHÇD$`HÇD$HE1ÀHÇD$HÇD$hE1äH‰D$8H‹D$ E1öHÇD$@HÇD$XHÇD$PHÇ„$ H‰„$ðHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é/ïþÿèÒÀüÿH…À„ÈÿÿH‹D$0L‹L$8I‰ØH‹l$pH‹\$xM‰ûM‰åÇD$%Ç„$øUH‰„$èH‹D$(M‰ÏHÇD$`HÇD$HE1ÒHÇD$HÇD$hE1äH‰D$8H‹D$ E1öHÇD$@HÇD$XHÇD$PHÇ„$ H‰„$ðHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é±íþÿL‹L$8H‹\$xH‹l$pzH…Òx6H½ïH îHƒúH5BL‰ $HEÈH‹»p"H‹81Àè¡ÀüÿL‹ $H‹D$0M‰ÏÇD$%Ç„$øUH‰„$èH‹D$(H‰D$8H‹D$ H‰„$ðé{ÿÿH‹gp"H5PýºL‰ $H‹81Àè=ÀüÿëšH‹Lp"L‹L$8H5`H‹\$xH‹l$pH‹8L‰ $è½üÿH‹D$0L‹ $ÇD$%Ç„$øUH‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðéì€ÿÿH‹D$0L‹L$8H‹\$xH‹l$pÇD$ï$Ç„$øTH‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ð鞀ÿÿH‹D$0L‹L$8H‹\$xH‹l$pÇD$ä$Ç„$øSH‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðéP€ÿÿL‹l$8H‹D$0HƒD$@M‰ïL‹¤$H‹|$pH‰„$èH‹D$(H‰D$8H‹D$ H‰„$ðéq×þÿH‹„$L‰l$8H‰ÃH‹D$ H;3o"H‰ÝtHƒxuL‹l$8H‰œ$ëŠH‹|$ èµýÿH…ÀH‰Ã„,H‹CH;„$ „ÝH;én"„ÐH‹HH‹n"HìL‹L$8H5ìI‰íI‰ÞH‹l$pH‹\$xH‹81ÀL‰ $èG¾üÿH‹D$0L‹ $L‰¬$ÇD$û#Ç„$øGHÇD$`H‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðHÇD$HHÇD$E1ÒHÇD$hHÇD$@E1ÛHÇD$XHÇD$PE1ÀE1äé=ÿÿH‹D$0ÇD$ÕM‰ÏÇ„$ø0HÇD$`E1ÒHÇD$HHÇD$E1ÛH‰„$èH‹D$(E1ÀHÇD$hHÇD$@HÇD$XHÇD$PH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é!éþÿH‹bl"H5KùºL‰ $H‹81Àè8¼üÿH‹D$0L‹ $E1ÒÇD$ÕÇ„$ø0E1ÛHÇD$`HÇD$HE1ÀH‰„$èH‹D$(M‰ÏHÇD$HÇD$hHÇD$@HÇD$XH‰D$8H‹D$ HÇD$PHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é¤çþÿH‰D$HH‹D$PE1ÛL‹L$L‰|$@E1ÀH‹\$ L‹|$(E1ÒHÇD$`HÇD$HÇD$hHÇD$XL‰ÍHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$'Ç„$øhHÇD$PHÇ„$ H‹ûi"H‰D$8éÁÚþÿH‰D$@H‹D$PE1ÛL‹L$H‹\$ E1ÀL‹|$(HÇD$`E1ÒHÇD$HHÇD$HÇD$hHÇD$XL‰ÍHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$'Ç„$øhHÇD$PHÇ„$ H‹¬h"H‰D$8érÙþÿH‹£h"L‹L$H5OüH‹\$ L‹|$(H‹8L‰ $èµüÿH‹D$PL‹ $E1ÒÇD$ý&Ç„$øhE1ÛHÇD$`HÇD$HE1ÀH‰„$H‹3h"L‰ÍHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8éØþÿè<µüÿH…À„ëÿÿH‹D$PL‹L$E1ÒH‰\$HL‹|$(E1ÛH‹\$ ÇD$î&E1ÀH‰„$Ç„$øgL‰ÍHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‹Þe"H‰D$8é¤Öþÿèß³üÿH…À„jÿÿL‹L$H‹D$PH‰\$HL‹|$(H‹\$ L‰t$H‰„$L‰ÍÇD$ì&Ç„$øgHÇD$`éǃÿÿ至üÿH…À„îÿÿL‹L$H‹D$PH‰l$`H‰\$HL‹|$(H‹\$ L‰t$H‰„$L‰ÍÇD$ê&Ç„$øgésƒÿÿH‹D$PL‹L$E1ÒH‰l$`H‰\$HE1ÛL‹|$(L‰t$E1ÀH‰„$H‹\$ L‰ÍÇD$ß&Ç„$øgE1öHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‹ßc"H‰D$8é=àþÿ¾H‰Çè¶ñüÿéÿÿL‹L$H‰D$`E1ÛH‹D$PL‰|$@E1ÀH‰\$HL‹|$(H‹\$ HÇD$L‰ÍHÇD$hHÇD$XL‰t$HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$"'Ç„$øhH‹™b"HÇD$PE1ÒHÇ„$ H‰D$8éúÞþÿH‹D$PL‹L$E1ÛL‰|$@H‰\$HE1ÀH‹\$ L‹|$(E1ÒHÇD$`HÇD$L‰ÍHÇD$hHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$ 'Ç„$øhHÇD$PHÇ„$ H‹6a"H‰D$8éüÑþÿH‰D$HH‹D$PE1ÛL‹L$L‰|$@E1ÀH‹\$ L‹|$(E1ÒHÇD$`HÇD$HÇD$hHÇD$XL‰ÍHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$'Ç„$øhHÇD$PHÇ„$ H‹ë_"H‰D$8é±ÐþÿH‰D$@H‹D$PE1ÛL‹L$H‰\$HE1ÀH‹\$ L‹|$(E1ÒHÇD$`HÇD$HÇD$hHÇD$XL‰ÍHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$'Ç„$øhHÇD$PHÇ„$ H‹ ^"H‰D$8éfÏþÿH‹D$PL‹L$E1ÒL‰|$@H‹\$ E1ÛL‹|$(ÇD$/'E1ÀH‰„$Ç„$øhL‰ÍHÇD$`HÇD$HE1öHÇD$HÇD$hHÇD$XHÇD$PHÇD$HÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‹E]"H‰D$8é£ÙþÿL‹L$H‹D$PE1ÛH‰l$`L‰|$@E1ÀH‰\$HL‹|$(H‹\$ HÇD$L‰ÍHÇD$hHÇD$XL‰t$HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰„$ÇD$$'Ç„$øhésùÿÿH…ítHƒmu H‹EH‰ïÿP0H‹|$(H‰ÞèЧüÿ…Àˆ¥…£ìÿÿH‹Ë„"H‹|$(H‰Þè.«üÿ…Àˆ-H;¿["„·H‹SHƒú…óL‹sH‹k L‹{(IƒL‰÷HƒEIƒèzýÿ‰D$PƒÀ„BIƒ.u I‹FL‰÷ÿP0H‰ïèUýÿ‰„$°ƒÀ„”Hƒmu H‹EH‰ïÿP0L‰ÿè,ýÿ‰„$¸ƒÀ„Iƒ/u I‹GL‰ÿÿP0H‹=í‡"èpýÿH…ÀH‰Å„jHc|$PèJªüÿH…ÀI‰Æ„ßHc¼$°è1ªüÿH…ÀH‰D$H„XHc¼$¸èªüÿH…ÀI‰Ä„Ö ò„$øèü§üÿH…ÀH‰D$`„Z ò„$Pèà§üÿH…ÀI‰Å„ä ò„$XèÆ§üÿH…ÀH‰D$X„uƒ¼$…WH‹kZ"HƒH‹„$˜H9E„ÿ è#¨üÿH…ÀI‰À„V1ÀH‹t$HIÀH‹”$H‰ïL‰D$HL‰pL‰`(H‰p H‹4$HƒH‰P0H‹T$HƒH‰p8H‹´$ HƒH‰P@H‹T$`HƒH‰pHH‰PPH‹t$XH‹”$¨L‰hXH‰p`L‰ÆH‰Ph1Òè“øüÿH…ÀI‰ÇL‹D$H„–Iƒ(u I‹@L‰ÇÿP0Hƒmu H‹EH‰ïÿP0L;=‚Y"”ÀL;=ÀX"¶è”ÂÂu L;=OY"…Iƒ/u I‹GL‰ÿÿP0…í„òéÿÿH‹‚"H‹¼$H‰Þèz¨üÿ…Àˆ‹Œ$¸‹”$°‹t$PH‹|$ èæ©üÿH…ÀH‰Å„fHƒ(…¡éÿÿH‹@H‰ïÿP0é’éÿÿH‹„$¨L‹L$8M‰ÃL‰l$@H‰œ$I‰íH‹\$xH‹l$pE1ÀH‰D$H‹D$0M‰ÏHÇD$hHÇ„$˜E1ÒHÇ„$HÇ„$€H‰„$èH‹D$(HÇD$xHÇ„$¸HÇ„$°HÇ„$¨H‰D$8H‹D$ HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$e$Ç„$øKHÇD$PHÇ„$ éâÓþÿH‹EH…ÀH‰D$h„+ýÿÿH‹UHƒHƒHƒmuH‹EH‰”$ÀH‰ïÿP0H‹”$À¿ H‰”$Àè¥üÿH…ÀI‰ÇH‹”$À„ÄH‹D$hH‰ÕM‰øI‰G¸é×üÿÿM‰ÃI‰ÀH‹D$0L‹L$8H‰œ$I‰íH‹\$xH‹l$pE1äH‰„$èH‹D$(E1öHÇD$`HÇD$HM‰ÏHÇD$HÇD$hE1ÒH‰D$8H‹D$ HÇD$@HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$‹$Ç„$øKHÇD$PHÇ„$ éìÑþÿH‹D$0L‹L$8E1ÛH‰œ$H‹l$pE1ÀH‹\$xHÇD$`E1äH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$£$Ç„$øMHÇD$PHÇ„$ é•ÐþÿH‹D$0L‹L$8H‰œ$H‹l$pH‹\$xÇD$š$H‰„$èH‹D$(M‰ÏÇ„$øLH‰D$8H‹D$ H‰„$ðéydÿÿL‰ÿèD¢üÿ…À‰Å‰aúÿÿH‹D$0L‹L$8M‰øH‰œ$H‹l$pH‹\$xÇD$$H‰„$èH‹D$(M‰ÏÇ„$øKH‰D$8H‹D$ H‰„$ðéQ9ÿÿI‰ÀH‹„$¨L‹L$8L‰l$@H‰œ$E1ÛH‹\$xH‹l$pI‰ÕH‰D$H‹D$0M‰ÏHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xH‰„$èH‹D$(HÇ„$¸HÇ„$°HÇ„$¨HÇ$H‰D$8H‹D$ HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$e$Ç„$øKHÇD$PHÇ„$ ékÎþÿH‹\Q"Hƒé¤÷ÿÿH‹D$0L‹L$8E1ÛL‰l$@H‰œ$I‰íH‹\$xH‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇ„$˜HÇ„$H‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$U$Ç„$øKHÇD$PHÇ„$ éÍþÿH‰D$@H‹D$0I‰íL‹L$8H‰œ$E1ÛH‹\$xH‹l$pE1ÀH‰„$èH‹D$(E1ÒHÇD$HÇD$hM‰ÏHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$S$Ç„$øKHÇD$PHÇ„$ é¬ËþÿH‹D$0L‹L$8I‰íH‰œ$H‹l$pE1ÛH‹\$xHÇD$E1ÀH‰„$èH‹D$(M‰ÏHÇD$hHÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$Q$Ç„$øKHÇD$PHÇ„$ éLÊþÿH‹D$0L‹L$8I‰íH‰œ$H‹l$pE1ÛH‹\$xHÇD$`E1ÀH‰„$èH‹D$(M‰ÏHÇD$HÇD$hE1ÒHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$O$Ç„$øKHÇD$PHÇ„$ éãÈþÿH‹D$0L‹L$8I‰íH‰œ$H‹l$pE1ÛH‹\$xHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HÇD$hM‰ÏHÇD$@HÇD$XE1ÒH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$M$Ç„$øKHÇD$PHÇ„$ éwÇþÿH‹D$0L‹L$8I‰íH‰œ$H‹l$pE1ÛH‹\$xHÇD$`E1ÀH‰„$èH‹D$(E1äHÇD$HHÇD$M‰ÏHÇD$hHÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$K$Ç„$øKHÇD$PHÇ„$ éÆþÿH‹D$0L‹L$8E1ÛH‰œ$H‹l$pE1ÀH‹\$xHÇD$`E1äH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$I$Ç„$øKHÇD$PHÇ„$ é«Äþÿè3–üÿH…À„îìÿÿH‹D$0L‹L$8M‰øH‰œ$H‹l$pH‹\$xÇD$<$H‰„$èH‹D$(M‰ÏÇ„$øJH‰D$8H‹D$ H‰„$ðéÁ-ÿÿèÌ•üÿH…À„^ìÿÿH‹D$0L‹L$8M‰øH‰œ$I‰íH‹\$xH‹l$pÇD$:$E1ÒH‰„$èH‹D$(M‰ÏÇ„$øJHÇD$`E1ÛHÇD$HHÇD$E1äH‰D$8H‹D$ E1öHÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é£ÂþÿèF”üÿH…À„°êÿÿH‹D$0L‹L$8M‰øH‰œ$I‰íH‹\$xH‹l$pÇD$8$E1ÒH‰„$èH‹D$(M‰ÏÇ„$øJHÇD$`E1ÛHÇD$HHÇD$E1äH‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é ÁþÿH‰œ$L‹L$8H‹\$xH‹l$pzH…Òx6H$ÃH „ÁHƒúH5©ÕL‰ $HEÈH‹"D"H‹81Àè”üÿL‹ $H‹D$0M‰ÏÇD$$$H‰„$èH‹D$(H‰D$8H‹D$ H‰„$ðÇ„$øJéâTÿÿH‹ÎC"H5·ÐºL‰ $H‹81À褓üÿëšH‹³C"L‹L$8H5ÇÔH‰œ$H‹l$pH‹\$xH‹8L‰ $èqüÿH‹D$0L‹ $ÇD$6$H‰„$èH‹D$(M‰ÏH‰D$8H‹D$ H‰„$ðédÿÿÿH‹D$0L‹L$8H‰œ$H‹l$pH‹\$xÇD$$H‰„$èH‹D$(M‰ÏÇ„$øIH‰D$8H‹D$ H‰„$ðéTÿÿH‹D$0L‹L$8H‰œ$H‹l$pH‹\$xÇD$$H‰„$èH‹D$(M‰ÏÇ„$øHH‰D$8H‹D$ H‰„$ðéªSÿÿH‹D$0L‹L$8I‰íH‹\$xH‹l$pE1ÛHÇD$`HÇD$HE1ÀH‰„$èH‹D$(E1äHÇD$HÇD$hM‰ÏHÇD$@HÇD$XE1ÒH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ L‰¬$ÇD$ù#Ç„$øGHÇD$PHÇ„$ éû½þÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$XE1äH‰„$H‹.A"E1öHÇD$HÇ„$˜L‰ÍHÇ„$HÇ„$€E1ÒHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$\'Ç„$ømHÇD$PHÇ„$ H‰D$8é–¼þÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@E1äH‰„$H‹ä?"L‰ÍHÇD$XHÇ„$˜E1ÒHÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$Z'Ç„$ømHÇD$PHÇ„$ H‰D$8é·¯þÿH‹D$PL‰ÍÇD$F'Ç„$øjHÇD$`E1ÒHÇD$HHÇD$E1ÛH‰„$H‹œ>"E1ÀHÇD$hHÇD$@HÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8és®þÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$@L‰ÍH‰„$H‹Y="E1ÒHÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$D'Ç„$øjHÇD$PHÇ„$ H‰D$8é/­þÿI‹GH‹(L‹pH‹Xé‘]ÿÿL‰|$@L‹L$H‹\$ L‹|$(;H…Òˆ÷H²ºH ¹HƒúH57ÍL‰ $HEÈH‹°;"H‹81Àè–‹üÿH‹D$PL‹ $E1ÒÇD$»&Ç„$øgE1ÛHÇD$`HÇD$HE1ÀH‰„$H‹°;"L‰ÍHÇD$HÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8釫þÿH‹D$8I;D$\ÿÿM‹|ÄHƒÀH‰D$8IƒéKéþÿL‰çH‹D$HÿÐH…ÀI‰Ç…5éþÿH‰D$@H‹\$ L‹|$(èvˆüÿH…ÀL‹L$„Ó[ÿÿH‹™:"H‹2H9ð…¯L‰L$èë‡üÿL‹L$é¬[ÿÿH‹D$PL‰ÍÇD$»&Ç„$øgHÇD$`E1ÒHÇD$HHÇD$E1ÛH‰„$H‹æ9"E1ÀHÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8鯩þÿH‹Ÿ8"H5ˆÅºL‰ $H‹81ÀèuˆüÿH‹D$PL‹ $E1ÒÇD$»&Ç„$øgE1ÛHÇD$`HÇD$HE1ÀH‰„$H‹8"L‰ÍHÇD$HÇD$hHÇD$XHÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ H‰D$8éf¨þÿH‰Çè„üÿ…ÀL‹L$…<ýÿÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$XL‰ÍH‰„$H‹77"E1ÒHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$«&Ç„$øgHÇD$PHÇ„$ H‰D$8é§þÿH‹D$PHÇD$`E1ÛHÇD$HHÇD$E1ÀHÇD$hHÇD$XE1äH‰„$H‹ü5"L‰ÍHÇ„$˜HÇ„$E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ ÇD$‡&Ç„$øgHÇD$PHÇ„$ H‰D$8騥þÿH‹D$0L‹L$E1ÒH‹\$ ÇD$z&E1ÛÇ„$øaHÇD$`E1ÀH‰D$@H‹D$PL‰ÍHÇD$HHÇD$HÇD$hHÇD$XH‰„$HÇD$PHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0H‹º3"H‰D$8逤þÿ1ÀH‹4$IÄH‹|$`1ÒHƒH‰pL‰æH‰X è{ÒüÿH…ÀH‰Å„L½Iƒ,$„1½H‹\$`H‹H‰D$8HƒèH…ÀH‰„½H‹=P`"è«èüÿH…ÀI‰Ä„…»H‹5(`"H‰ÇèðÑüÿH…ÀH‰Ã„ºIƒ,$u I‹D$L‰çÿP0H‹5£\"H‹|$pèÁÑüÿH…ÀI‰Ä„·H‹„$˜H9C„‚¶¿èÉ€üÿH…ÀI‰Á„µ1ÀH‹$IÁL‰ÎH‰ßL‰L$8HƒH‰P1ÒL‰` è•ÑüÿH…ÀH‰D$`L‹L$8„p³Iƒ)u I‹AL‰ÏÿP0Hƒ+u H‹CH‰ßÿP0¿èX€üÿH…ÀH‰Ã„ܱH‰hH‹D$`1ÒH‹=ê_"H‰ÞH‰C è.ÑüÿH…ÀH‰D$`„X°Hƒ+u H‹CH‰ßÿP0H‹\$`H‰ßès€üÿHƒÀ„7­H‹H‰D$8HƒèH…ÀH‰u H‹|$`H‹GÿP0H‹=â^"è=çüÿH…ÀH‰Ã„ž«H‹5Â^"H‰Çè‚ÐüÿH…ÀH‰Å„"­Hƒ+u H‹CH‰ßÿP0H‹5ïZ"H‹|$pèUÐüÿH…ÀH‰Ã„ï©H‹„$˜H9E„©¿è]üÿH…ÀI‰Ä„¨1ÀH‹t$IÄ1ÒH‰ïHƒH‰pL‰æH‰X è-ÐüÿH…ÀH‰D$`„v¦Iƒ,$u I‹D$L‰çÿP0Hƒmu H‹EH‰ïÿP0H‹=^"è`æüÿH…ÀI‰Ä„â¤H‹5Ý]"H‰Çè¥ÏüÿH…ÀH‰Ã„R£Iƒ,$u I‹D$L‰çÿP0H‹5Z"H‹|$pèvÏüÿH…ÀI‰Ä„ΡH‹„$˜H9C„_¡¿è~~üÿH…ÀH‰Å„ñŸI‰Á1ÀH‹T$HDÅH‰îH‰ßL‰L$8HƒH‰P1ÒL‰` èEÏüÿH…ÀH‰ÅL‹L$8„[žIƒ)u I‹AL‰ÏÿP0Hƒ+u H‹CH‰ßÿP0¿è ~üÿH…ÀH‰Ã„ÇœH‹D$`H‹=¢]"1ÒH‰k H‰ÞH‰CèàÎüÿH…ÀH‰Å„<›Hƒ+u H‹CH‰ßÿP0H‰ïè,~üÿHƒÀ„¯™Hƒmu H‹EH‰ïÿP0H‹=ª\"èåüÿH…ÀH‰Ã„%˜H‹5Š\"H‰ÇèJÎüÿH…ÀH‰D$`„°–Hƒ+u H‹CH‰ßÿP0H‹5mX"H‹|$pèÎüÿH…ÀH‰Ã„å”H‹D$`H‹”$˜H9P„S”¿è}üÿH…ÀH‰Å„â’I‰Ä1ÀH‹´$ HDÅH‹|$`1ÒHƒH‰pH‰îH‰X èåÍüÿH…ÀH‰Å„P‘Iƒ,$u I‹D$L‰çÿP0H‹\$`H‹H‰D$8HƒèH…ÀH‰u H‹CH‰ßÿP0H‹=­["èäüÿH…ÀI‰Ä„›H‹5…["H‰ÇèMÍüÿH…ÀH‰Ã„ŽIƒ,$u I‹D$L‰çÿP0H‹5€W"H‹|$pèÍüÿH…ÀI‰Ä„%‹H‹„$˜H9C„˜Š¿è&|üÿH…ÀI‰Á„‰1ÀH‹”$ IÁL‰ÎH‰ßL‰L$8HƒH‰P1ÒL‰` èîÌüÿH…ÀH‰D$`L‹L$8„‚‡Iƒ)u I‹AL‰ÏÿP0Hƒ+u H‹CH‰ßÿP0¿è±{üÿH…ÀH‰Ã„î…H‰hH‹D$`1ÒH‹=C["H‰ÞH‰C è‡ÌüÿH…ÀH‰D$`„j„Hƒ+u H‹CH‰ßÿP0H‹\$`H‰ßèÌ{üÿHƒÀ„úƒH‹H‰D$8HƒèH…ÀH‰u H‹|$`H‹GÿP0H‹=CY"è–âüÿH…ÀH‰Ã„a‚H‹5ãW"H‰ÇèÛËüÿH…ÀH‰Å„!~Hƒ+u H‹CH‰ßÿP0H‹=øY"èSâüÿH…ÀH‰ÃH‰D$h„’|H‹5ÓY"H‰Çè“ËüÿH…ÀI‰Ä„:H‹H‰D$8HƒèH…ÀH‰u H‹|$hH‹GÿP0H‹50V"H‹|$pèVËüÿH…ÀH‰D$h„ÙzH‹„$˜I9D$„[z¿è[züÿH…ÀI‰À„êx1ÀH‹$IÀ1ÒL‰ÆL‰çL‰D$8HƒH‰XH‹\$hH‰X è"ËüÿH…ÀH‰ÃL‹D$8„LwIƒ(u I‹@L‰ÇÿP0Iƒ,$u I‹D$L‰çÿP0H‹5ØT"ºH‰ßè»üÿH…ÀI‰Ä„¦uHƒ+u H‹CH‰ßÿP0H‹=ÈX"è#áüÿH…À„tH‹5£X"H‰ÇH‰D$8èfÊüÿH…ÀH‰D$hL‹D$8„›rIƒ(u I‹@L‰ÇÿP0H‹5U"H‹|$pè2ÊüÿH…ÀI‰À„¼oH‹D$hH‹´$˜H9p„o¿L‰D$8è0yüÿH…ÀH‰D$PL‹D$8„Ÿm1ÀH‹4$L‹|$P1ÒH‹|$hHƒIÇH‰pL‰@ L‰þèóÉüÿH…ÀH‰Ã„lI‹H‰D$8HƒèH…ÀI‰u H‹|$PH‹GÿP0H‹T$hH‹H‰D$8HƒèH…ÀH‰u H‹BH‰×ÿP0H‹5S"1ɺH‰ßèÈüÿH…ÀH‰D$h„UjHƒ+u H‹CH‰ßÿP0¿èfxüÿH…ÀH‰Ã„ÔhL‰`H‹D$h1ÒH‹=ØW"H‰ÞH‰C è<ÉüÿH…ÀH‰D$h„dHƒ+u H‹CH‰ßÿP0H‹='W"è‚ßüÿH…ÀI‰Ä„cH‹5W"H‰ÇèÇÈüÿH…ÀH‰D$P„¶eIƒ,$u I‹D$L‰çÿP0H‹50S"H‹|$pè–ÈüÿH…ÀI‰Ä„taH‹D$PH‹œ$˜H9X„æ`¿è™wüÿH…ÀI‰Á„z_1ÀH‹\$IÁH‹|$P1ÒL‰ÎL‰L$8HƒH‰XL‰` èbÈüÿH…ÀH‰ÃL‹L$8„é]Iƒ)u I‹AL‰ÏÿP0H‹t$PH‹H‰D$8HƒèH…ÀH‰u H‹FH‰÷ÿP0H‹5R"ºH‰ßèC¸üÿH…ÀH‰D$P„?\Hƒ+u H‹CH‰ßÿP0H‹=õU"èPÞüÿH…À„ÁZH‹5ÐU"H‰ÇH‰D$8è“ÇüÿH…ÀI‰ÄL‹L$8„FYIƒ)u I‹AL‰ÏÿP0H‹5R"H‹|$pèaÇüÿH…ÀI‰Á„kVH‹„$˜I9D$„ÜU¿L‰L$8ècvüÿH…ÀI‰ÇL‹L$8„fT1ÀH‹\$IÇ1ÒL‰þL‰çHƒH‰XL‰H è.ÇüÿH…ÀH‰Ã„äRIƒ/u I‹GL‰ÿÿP0Iƒ,$u I‹D$L‰çÿP0H‹5éP"1ɺH‰ßèjÅüÿH…ÀI‰Ä„NQHƒ+u H‹CH‰ßÿP0¿èÄuüÿH…ÀH‰Ã„ÖOH‹D$PH‹=M‰ÏH‰„$èH‹D$(E1ÒHÇD$`HÇD$HE1ÛHÇD$HÇD$hE1äH‰D$8H‹D$ HÇD$@HÇD$XHÇD$PHÇ„$ H‰„$ðHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é™þÿI‰ÀH‹D$0M‰éH‹\$xI‰íHÇD$H‹l$pHÇD$hE1ÛH‰„$èH‹D$(M‰ÏHÇD$@HÇD$XE1ÒHÇ„$˜HÇ„$H‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$¤#Ç„$ø>HÇD$PHÇ„$ é¿—þÿH‹D$0M‰éH‹\$xI‰íHÇD$H‹l$pHÇD$hHÇD$@E1ÛH‰„$èH‹D$(E1ÀHÇD$XHÇ„$˜M‰ÏHÇ„$HÇ„$€E1ÒH‰D$8H‹D$ HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$¢#Ç„$ø>HÇD$PHÇ„$ éi–þÿH‹D$0M‰éH‹\$xI‰íHÇD$HH‹l$pHÇD$HÇD$hE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XM‰ÏHÇ„$˜HÇ„$E1ÒH‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ #Ç„$ø>HÇD$PHÇ„$ é •þÿH‹D$0M‰éH‹\$xI‰íHÇD$HH‹l$pHÇD$HÇD$hE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$M‰ÏH‰D$8H‹D$ E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ž#Ç„$ø>HÇD$PHÇ„$ é¨“þÿH‰D$`H‹D$0I‰íL‹L$8L‹t$HE1ÛH‹\$xH‹l$pE1ÀH‰„$èH‹D$(E1ÒH‰L$HHÇD$M‰ÏHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$#Ç„$ø=HÇD$PHÇ„$ éA’þÿH‹D$`L‹L$8M‰ûL‰l$hL‰t$PI‰íL‹t$HH‰\$E1ÒH‰D$@H‹D$0M‰ÏH‹\$xH‹l$pL‹„$¨H‰L$HH‰„$èH‹D$(HÇD$`HÇ„$˜HÇ„$HÇ„$€H‰D$8HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‹D$ ÇD$i#HÇD$ Ç„$ø=HÇ„$ H‰„$ðéåþÿI‹D$H…ÀH‰„$°„ùòÿÿM‹D$HƒIƒIƒ,$uI‹D$L‰„$ÐL‰çÿP0L‹„$п L‰„$ÐèbüÿH…ÀH‰ÁL‹„$Ðt)H‹„$°M‰ÄH‰A¸é§òÿÿH‹V"HƒélòÿÿH‹D$`L‹L$8M‰ûL‹”$°M‰ÇL‰l$hL‰t$PH‰\$I‰íH‰D$@H‹D$0M‰üL‹t$HH‹\$xM‰ÏH‹l$pL‹„$¨H‰„$èH‹D$(H‰L$HHÇD$`HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8H‹D$ HÇD$(HÇD$ ÇD$i#Ç„$ø=H‰„$ðHÇ„$ éîŽþÿH‹D$`L‹L$8M‰ûL‰l$hL‰t$PI‰íL‹t$HH‰\$E1ÀH‰D$@H‹D$0M‰ÏH‹\$xH‹l$pE1ÒHÇD$`HÇD$HH‰„$èH‹D$(HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8HÇD$(H‹D$ HÇD$ ÇD$Y#Ç„$ø=HÇ„$ H‰„$ðé“þÿH‹D$0L‹L$8M‰ûL‰l$hL‰t$PI‰íL‹t$HH‰\$E1ÀH‰„$èH‹D$(M‰ÏH‹\$xH‹l$pE1ÒHÇD$`HÇD$HH‰D$8H‹D$ HÇD$@HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$W#Ç„$ø=HÇ„$ é9ŒþÿH‰D$H‹D$0M‰ûL‹L$8L‰l$hI‰íL‰t$PH‹\$xE1ÀH‰„$èH‹D$(E1ÒL‹t$HH‹l$pM‰ÏHÇD$`HÇD$HHÇD$@HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8HÇD$(H‹D$ HÇD$ ÇD$U#Ç„$ø=HÇ„$ H‰„$ðéÖŠþÿH‰D$hH‹D$0I‰íL‹L$8L‰t$PM‰ûL‹t$HH‹\$xE1ÀH‰„$èH‹D$(E1ÒH‹l$pHÇD$`M‰ÏHÇD$HHÇD$HÇD$@HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8HÇD$(H‹D$ HÇD$ ÇD$S#Ç„$ø=HÇ„$ H‰„$ðéo‰þÿI‰ÃH‹D$0L‹L$8L‰t$PH‹\$xI‰íL‹t$HH‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$`HÇD$HE1ÒHÇD$HÇD$hHÇD$@HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0H‰D$8HÇD$(H‹D$ HÇD$ ÇD$Q#Ç„$ø=HÇ„$ H‰„$ðéˆþÿH‰D$PH‹D$0I‰íL‹L$8L‹t$HE1ÒH‹\$xH‹l$pE1ÛH‰„$èH‹D$(E1ÀÇD$O#Ç„$ø=M‰ÏHÇD$`HÇD$HH‰D$8H‹D$ HÇD$HÇD$hHÇD$@HÇD$XH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0陆þÿH‹D$0L‹L$8I‰íL‹t$HH‹\$xE1ÛH‹l$pHÇD$`E1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$hHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$M#Ç„$ø=HÇD$PHÇ„$ é*…þÿèÍVüÿH…À„?æÿÿH‹D$0L‹L$8I‰íL‹t$HH‹\$xE1ÒH‹l$pÇD$@#E1ÛH‰„$èH‹D$(M‰ÏÇ„$ø<HÇD$`E1ÀHÇD$HHÇD$H‰D$8H‹D$ HÇD$hHÇD$@HÇD$XHÇD$PH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é­ƒþÿèPUüÿH…À„ŸäÿÿH‹D$0L‹L$8I‰íL‰t$PH‹\$xE1ÒL‹t$HH‹l$pE1ÛH‰„$èH‹D$(M‰ÏÇD$>#Ç„$ø<E1ÀHÇD$`HÇD$HH‰D$8H‹D$ HÇD$HÇD$hHÇD$@HÇD$XH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é4‚þÿè×SüÿH…À„ãÿÿH‹D$0L‹L$8M‰ûL‰t$PH‹\$xI‰íL‹t$HH‹l$pE1ÒH‰„$èH‹D$(M‰ÏÇD$<#Ç„$ø<E1ÀHÇD$`HÇD$HH‰D$8H‹D$ HÇD$HÇD$hHÇD$@HÇD$XH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0黀þÿH‹D$0L‹L$8M‰ûL‰l$hL‰t$PI‰íL‹t$HH‹\$xE1ÒH‰„$èH‹D$(M‰ÏH‹l$pÇD$1#E1ÀÇ„$ø<HÇD$`H‰D$8H‹D$ HÇD$HHÇD$HÇD$@HÇD$XH‰„$ðHÇ„$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éTþÿ¾H‰ÇèÍüÿéðßÿÿL‰l$hL‰t$PI‰íL‹L$8L‹t$HM‰ûH‹\$xH‹l$pA¼H‹t$hH‹H‰$HƒèH…ÀH‰uH‹FL‰\$H‰÷L‰ $ÿP0L‹\$L‹ $L‰\$L‰ $è^—üÿ…ÀL‹ $L‹\$…ÃHç€H GIƒüH5l“L‰âL‰œ$ HEÈH‹Þ"E1äH‹81ÀèÁQüÿH‹D$0L‹ $E1ÒÇD$9#Ç„$ø<E1ÀHÇD$`HÇD$HH‰„$èH‹D$(M‰ÏHÇD$HÇD$hHÇD$@HÇD$XH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0L‹œ$ é1}þÿL‰l$hL‹L$8I‰íM‰ûH‰D$PL‹t$HH‹\$xH‹l$pA¼éêýÿÿH‹D$0ÇD$9#M‰ÏÇ„$ø<HÇD$`E1ÒHÇD$HHÇD$E1ÀH‰„$èH‹D$(E1äHÇD$hHÇD$@HÇD$XHÇ„$ H‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xH‰„$ðHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é³{þÿL‰l$hL‹L$8I‰íI‰ÃL‹t$HH‹\$xH‹l$pE1äHÇD$PéküÿÿH‰D$hH‹D$0I‰íL‹L$8L‹t$HE1ÛH‰\$`H‹l$pE1ÀH‰„$èH‹D$(E1äH‹\$xHÇD$HM‰ÏHÇD$HÇD$@E1ÒH‰D$8H‹D$ HÇD$XHÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$'#Ç„$ø<HÇD$PHÇ„$ ézþÿH‹SHƒúu\H;„$ uAL‹{L‹s L‹c(IƒIƒIƒ$Hƒ+…©ÚÿÿH‹CH‰ßÿP0éšÚÿÿL‹l$8L‹t$Hé©ÝÿÿH‹CL‹8L‹pL‹`ëºI‰íH‰\$`L‹L$8L‹t$HH‹\$xH‹l$pYH…ÒˆþHª{H zHƒúH5/ŽL‰ $HEÈH‹¨ü!E1äH‹81Àè‹LüÿH‹D$0L‹ $E1ÒÇD$ #Ç„$ø<E1ÛHÇD$HHÇD$E1ÀH‰„$èH‹D$(M‰ÏHÇD$hHÇD$@HÇD$XHÇD$PH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éxþÿH‹D$PH;EþÿÿH‹\ÅHƒÀH‰D$PHƒéô×ÿÿH‰ïH‹D$hÿÐH…ÀH‰Ã…Þ×ÿÿL‹l$8L‹t$HH‰D$`èXIüÿH…À„ŒÛÿÿH‹€û!H‹2H9ð…Óè×HüÿéoÛÿÿH‹D$0ÇD$ #M‰ÏÇ„$ø<HÇD$HE1ÒHÇD$HÇD$hE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XE1äHÇD$PHÇ„$ H‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xH‰„$ðHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é8vþÿH‹yù!H5b†ºL‰ $E1äH‹81ÀèLIüÿH‹D$0L‹ $E1ÒÇD$ #Ç„$ø<E1ÛHÇD$HHÇD$E1ÀH‰„$èH‹D$(M‰ÏHÇD$hHÇD$@HÇD$XHÇD$PH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éÁtþÿH‰ÇèáDüÿ…À…ýÿÿH‹D$0M‰éH‹\$xI‰íHÇD$HH‹l$pHÇD$HÇD$hE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XE1äHÇ„$˜HÇ„$M‰ÏH‰D$8H‹D$ E1ÒHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ý"Ç„$ø<HÇD$PHÇ„$ éOsþÿH‹BH‰×ÿP0L‰l$8L‰t$Hé ÓÿÿH‹D$0M‰éH‹\$xI‰íÇD$á"H‹l$pÇ„$ø<HÇD$HM‰ÏH‰„$èH‹D$(E1ÒHÇD$HÇD$hE1ÛHÇD$@HÇD$XE1ÀH‰D$8H‹D$ E1äHÇD$PHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éÔqþÿH‹D$0H‹\$xE1ÛH‹l$pHÇD$HE1ÀHÇD$HÇD$hE1äH‰„$èH‹D$(M‰ïHÇD$@HÇD$XE1ÒHÇ„$˜HÇ„$H‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ß"Ç„$ø<HÇD$PHÇ„$ é„pþÿH‹D$`HÇD$PHÇD$hHƒH‰ÅéÐÿÿH‹D$0M‰éH‹\$xM‰ûI‰íHÇD$HH‹l$pHÇD$E1ÀH‰„$èH‹D$(E1äHÇD$hHÇD$@M‰ÏHÇD$XHÇ„$˜E1ÒH‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$×"Ç„$ø<HÇD$PHÇ„$ éónþÿH‹D$0M‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pHÇD$HE1ÀH‰„$èH‹D$(M‰ÏHÇD$HÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$É"Ç„$ø<HÇ„$ émþÿH‹]H…Û„uÌÿÿL‹}HƒIƒHƒmu H‹EH‰ïÿP0¿èñ>üÿH…ÀI‰Á„fL‰ýI‰YM‰Ï¸éFÌÿÿH‹D$0M‰éH‰\$I‰íH‹\$xH‹l$pÇD$º"Ç„$ø<M‰ÏH‰„$èH‹D$(E1ÒHÇD$`HÇD$HE1ÛHÇD$@HÇD$XE1ÀH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é÷kþÿI‰ÀH‹D$0M‰éH‰\$H‹l$pM‰ýH‹\$xHÇD$`E1ÛH‰„$èH‹D$(M‰ÏHÇD$HHÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$É"Ç„$ø<HÇ„$ é¥jþÿH‰D$H‹D$0M‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$²"Ç„$ø<HÇ„$ éSiþÿH‹D$0M‰éH‰\$M‰ûH‹\$xI‰íÇD$¯"H‹l$pM‰ÏH‰„$èH‹D$(E1ÒÇ„$ø<HÇD$`E1ÀHÇD$HHÇD$@H‰D$8H‹D$ HÇD$XHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éhþÿH‰D$H‹D$0M‰ÈM‰éH‹\$xL‰D$XM‰ûI‰íHÇD$`H‰„$èH‹D$(E1ÀH‹l$pHÇD$HM‰ÏHÇD$@HÇ„$˜E1ÒH‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$«"Ç„$ø<HÇ„$ é°fþÿH‹D$0L‰D$@M‰ÈM‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ "Ç„$ø<HÇ„$ é^eþÿL‹HH‰ÂM…É„ ÃÿÿH‹XIƒHƒH‹H‰D$8HƒèH…ÀH‰uH‹BL‰D$HH‰×L‰L$8ÿP0L‹L$8L‹D$H¿L‰D$HL‰L$8è„6üÿH…ÀH‰D$XL‹L$8L‹D$H„mH‹D$XH‰\$PL‰HI‰Á¸é¦ÂÿÿH‰D$@H‹D$0M‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$’"Ç„$ø<HÇ„$ éwcþÿH‹D$0L‰D$@M‰ûM‰ÈI‰ßM‰éH‹\$xL‰|$PI‰íH‰„$èH‹D$(M‰ÏH‹l$pHÇD$`E1ÒHÇD$HHÇD$H‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$ "Ç„$ø<HÇ„$ é&bþÿH‹D$0M‰éL‰D$@H‹\$xM‰ûI‰íÇD$"H‹l$pM‰ÏH‰„$èH‹D$(E1ÒÇ„$ø<HÇD$`E1ÀHÇD$HHÇD$H‰D$8H‹D$ HÇD$XHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0éÔ`þÿH‰D$@H‹D$0M‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$"Ç„$ø<HÇD$PHÇ„$ éy_þÿI‰ÃH‹D$0M‰éH‰\$I‰íH‹\$xH‹l$pHÇD$`E1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$Š"Ç„$ø<HÇD$PHÇ„$ é^þÿH‰D$H‹D$0M‰éL‰D$@H‹\$xM‰ûI‰íHÇD$`H‹l$pH‰„$èH‹D$(E1ÀHÇD$HHÇD$XM‰ÏHÇ„$˜HÇ„$E1ÒH‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$†"Ç„$ø<HÇD$PHÇ„$ éÇ\þÿH‹D$0M‰éL‰D$@H‹\$xM‰ûI‰íHÇD$`H‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD${"Ç„$ø<HÇ„$ éu[þÿM‹OM…É„û·ÿÿI‹_IƒHƒIƒ/uI‹GL‰L$8L‰ÿÿP0L‹L$8¿L‰L$8è»,üÿH…ÀH‰D$XL‹L$8„vH‹D$XI‰ßL‰HI‰À¸é²·ÿÿH‹D$0M‰éH‹\$xM‰ûI‰íÇD$m"H‹l$pÇ„$ø<M‰ÏH‰„$èH‹D$(E1ÒHÇD$`HÇD$HE1ÀHÇD$HÇD$@H‰D$8H‹D$ HÇD$XHÇ„$ HÇ„$˜HÇ„$H‰„$ðHÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é±YþÿH‹D$0M‰éH‹\$xI‰íÇD$h"H‹l$pÇ„$ø<HÇD$`M‰ÏH‰„$èH‹D$(E1ÒHÇD$HHÇD$E1ÛHÇD$@HÇD$XE1ÀH‰D$8H‹D$ HÇ„$ HÇ„$˜HÇ„$HÇ„$€H‰„$ðHÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$(HÇD$ HÇD$0é[XþÿH‹D$0M‰éH‰\$I‰íH‹\$xH‹l$pHÇD$`HÇD$HE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XM‰ÏHÇ„$˜HÇ„$E1ÒH‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$e"Ç„$ø<HÇD$PHÇ„$ éWþÿI‰ÃH‹D$0M‰éH‹\$xI‰íHÇD$`H‹l$pHÇD$HE1ÀH‰„$èH‹D$(M‰ÏHÇD$HÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$j"Ç„$ø<HÇ„$ éªUþÿH‹D$0I‰ßM‰ÈM‰éH‹\$xI‰íHÇD$`H‹l$pM‰ûH‰„$èH‹D$(M‰ÏHÇD$HHÇD$E1ÒHÇD$@HÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD${"Ç„$ø<HÇ„$ éZTþÿH‰D$H‹D$0M‰éH‹\$xI‰íHÇD$`H‹l$pHÇD$HE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XM‰ÏHÇ„$˜HÇ„$E1ÒH‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$]"Ç„$ø<HÇ„$ éSþÿH‹D$0M‰éH‰\$I‰íH‹\$xH‹l$pHÇD$`HÇD$HE1ÛH‰„$èH‹D$(E1ÀHÇD$@HÇD$XM‰ÏHÇ„$˜HÇ„$E1ÒH‰D$8H‹D$ HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$Z"Ç„$ø<HÇ„$ é¶QþÿH‰D$H‹D$0M‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pE1ÀH‰„$èH‹D$(M‰ÏHÇD$HHÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$V"Ç„$ø<HÇ„$ édPþÿH‹D$0M‰ÈM‰éH‹\$xM‰ûI‰íHÇD$`H‹l$pM‰ÏH‰„$èH‹D$(E1ÒHÇD$HHÇD$HÇD$@HÇD$XH‰D$8H‹D$ HÇ„$˜HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$K"Ç„$ø<HÇ„$ éOþÿM‹D$M…À„ªÿÿI‹\$IƒHƒIƒ,$uI‹D$L‰D$HL‰çL‰L$8ÿP0L‹L$8L‹D$H¿L‰D$HL‰L$8èA üÿH…ÀI‰ÇL‹L$8L‹D$H„gM‰GI‰Ü¸éÊ©ÿÿI‰ÀH‹D$0M‰éH‹\$xI‰íHÇD$`H‹l$pHÇD$HE1ÛH‰„$èH‹D$(M‰ÏHÇD$HÇD$@E1ÒHÇD$XHÇ„$˜H‰D$8H‹D$ HÇ„$HÇ„$€HÇD$xHÇ„$¸HÇ„$°HÇ„$¨HÇ$HÇD$pHÇ„$ˆHÇ„$ÈHÇ„$ÀHÇ„$àHÇ„$ÐHÇ„$ØHÇD$0HÇD$(H‰„$ðHÇD$ ÇD$="Ç„$ø<HÇ„$ éI‰F u I‹FL‰÷ÿP0IFL‰¤$€H‹¼$ L‹¤$L‰t$HH‰„$IF(H‰„$hH‹„$H‹HƒH…ÿH‰„$ t Hƒ/uH‹GÿP0H‹¼$ 1Ò1ö¹èlüÿH…ÀH‰Ã„H‹´$¨H‰Çè ´ûÿH…ÀI‰Å„•Hƒ+u H‹CH‰ßÿP0ò„$øè±ûÿH…ÀH‰Ã„ŽH‰ÆL‰ïè_´ûÿH…ÀH‰Å„¨ Iƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0H‰ïèj%üÿ‰„$ƒÀ„ƒ Hƒmu H‹EH‰ïÿP0H‹¼$ 1Ò¹¾è üÿH…ÀH‰Å„o H‹´$°H‰ÇèT³ûÿH…ÀH‰Ã„yHƒmu H‹EH‰ïÿP0ò„$øèI°ûÿH…ÀH‰Å„tH‰ÆH‰ßè’³ûÿH…ÀI‰Å„ƒHƒ+u H‹CH‰ßÿP0Hƒmu H‹EH‰ïÿP0L‰ïè$üÿ‰„$pƒÀ„[Iƒmu I‹EL‰ïÿP0H‹¼$ 1Ò¹¾èÓüÿH…ÀI‰Å„CH‹´$¸H‰Ç臲ûÿH…ÀH‰Å„Ì Iƒmu I‹EL‰ïÿP0ò„$øè|¯ûÿH…ÀI‰Å„à H‰ÆH‰ïèŲûÿH…ÀH‰Ã„Ó Hƒmu H‹EH‰ïÿP0Iƒmu I‹EL‰ïÿP0H‰ßèÏ#üÿ‰„$tƒÀ„­ Hƒ+u H‹CH‰ßÿP0AƒÎÿM‰å‹„$Ç„$ˆÿÿÿÿD‰´$ˆF$0IcÄH‰„$€D‹¤$ˆD¤$pM‰îƒÍÿIcÄH‰„$xH‹¼$€è±°ûÿH…ÀI‰Ç„SH‹¼$x蘰ûÿH…ÀH‰Ã„\‹„$t<(Hcÿèz°ûÿH…ÀI‰Ä„| ¿è¯ûÿH…ÀI‰ÅtSM…öL‰xH‰X L‰`(tIƒ.u I‹FL‰÷ÿP0H‹¼$ÀL‰î軬ûÿ…Àˆ‰„aƒÅƒý„ø M‰îéKÿÿÿI‰ÃH‹„$€L‹l$HI‰ØH‹l$`H‹\$pL‹L$@L‰´$E1ÒH‰D$HH‹D$PL‹t$xL‰|$hL‰d$@L‹|$XH‰„$H‹_`!L‹d$8L‰D$E1ÀH‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$XHÇ$HÇD$pHÇD$ÇD$Ø+Ç„$øÅHÇD$PH‰D$8éHÜýÿI‰ÀH‹„$€L‹l$HH‹l$`H‹\$pE1ÛL‹L$@L‰´$E1ÒH‰D$HH‹D$PL‹t$xL‹d$8L‰|$hH‰¬$€L‰ÍH‰„$H‹€_!L‹|$XH‰\$xL‰´$ˆH‹\$E1öHÇD$`HÇD$@HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$Ô+Ç„$øÅHÇD$PH‰D$8éjÛýÿH‰D$hH‹„$€E1ÛL‹l$HH‹l$`E1ÀH‹\$pL‹L$@E1ÒH‰D$HH‹D$PL‰´$L‹t$xL‹d$8L‹|$XH‰„$H‹¨^!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$@HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$Ò+Ç„$øÅHÇD$PH‰D$8éŒÚýÿI‰ÀH‹„$€L‹l$HL‹t$xH‹l$`E1ÛH‹\$pL‹L$@E1ÒH‰D$HH‹D$PL‰¤$L‹|$XL‹d$8H‰¬$€L‰ÍH‰„$H‹Ä]!H‰\$xL‰´$ˆE1öH‹\$HÇD$`HÇD$hHÇD$@HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$œ+Ç„$øÁHÇD$PH‰D$8éªÙýÿèM«ûÿH…À„—úÿÿH‹„$€M‰èL‹l$HL‹t$xH‹l$`E1ÒH‹\$pL‹L$@E1ÛH‰D$HH‹D$PL‰¤$L‹|$XL‹d$8L‰D$E1ÀH‰„$H‹×\!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öÇD$š+Ç„$øÁHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇ$HÇD$pH‰D$8黨ýÿI‰ÀH‹„$€L‹l$HL‹t$xL‹L$@E1ÛH‰\$hH‰l$@E1ÒH‰D$HH‹D$PH‹l$`H‹\$pL‰¤$L‹|$XH‰„$H‹ù[!L‹d$8H‰¬$€L‰ÍH‰\$xL‰´$ˆE1öH‹\$HÇD$`HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$–+Ç„$øÁHÇD$PH‰D$8éá×ýÿL‹L$@H‰D$@E1ÛH‹„$€L‹l$HE1ÀL‹t$xH‹l$`E1ÒH‰\$hH‹\$pH‰D$HH‹D$PL‰¤$L‹|$XL‹d$8H‰¬$€L‰ÍH‰„$H‹[!H‰\$xL‰´$ˆE1öH‹\$HÇD$`HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$”+Ç„$øÁHÇD$PH‰D$8é×ýÿH‰D$hH‹„$€E1ÛL‹l$HL‹t$xE1ÀH‹\$pL‹L$@E1ÒH‰D$HH‹D$PH‰l$@H‹l$`L‰¤$L‹|$XH‰„$H‹EZ!L‹d$8H‰¬$€L‰ÍH‰\$xL‰´$ˆE1öH‹\$HÇD$`HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$‘+Ç„$øÁHÇD$PH‰D$8é-ÖýÿL‹L$@H‰D$@E1ÛH‹„$€L‹l$HE1ÀL‹t$xH‹l$`E1ÒH‹\$pL‰¤$H‰D$HH‹D$PL‹d$8L‹|$XH‰¬$€H‰\$xL‰ÍH‰„$H‹[Y!L‰´$ˆH‹\$E1öHÇD$`HÇD$hHÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$+Ç„$øÁHÇD$PH‰D$8éOÕýÿèò¦ûÿH…À„oõÿÿH‹„$€L‹l$HE1ÒL‹t$xH‹\$pE1ÛL‹L$@H‰l$@E1ÀH‰D$HH‹D$PH‹l$`L‰¤$L‹|$XL‹d$8H‰„$H‹X!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öÇD$+Ç„$øÁHÇD$`HÇD$HÇD$hHÇD$XHÇD$PHÇD$HÇ$HÇD$pH‰D$8écÔýÿL‹L$@H‰D$@M‰èH‹„$€L‹l$HE1ÛL‹t$xH‹l$`E1ÒH‰\$hH‹\$pH‰D$HH‹D$PL‰¤$L‹|$XL‹d$8L‰D$E1ÀH‰„$H‹”W!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$XHÇ$HÇD$pHÇD$ÇD$‰+Ç„$øÁHÇD$PH‰D$8éŠÓýÿè-¥ûÿH…À„EõÿÿH‹„$€L‹l$HE1ÒL‹t$xH‹l$`E1ÛL‹L$@H‰\$hE1ÀH‰D$HH‹D$PH‹\$pL‰¤$L‹|$XL‹d$8H‰„$H‹ºV!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öÇD$§+Ç„$øÁHÇD$`HÇD$HÇD$@HÇD$XHÇD$PHÇD$HÇ$HÇD$pH‰D$8éžÒýÿH‰D$hH‹„$€M‰èL‹l$HL‹t$xE1ÛH‹\$pL‹L$@E1ÒH‰D$HH‹D$PH‰l$@H‹l$`L‰¤$L‹|$XH‰„$H‹ÜU!L‹d$8L‰D$E1ÀH‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$XHÇ$HÇD$pHÇD$ÇD$£+Ç„$øÁHÇD$PH‰D$8éÅÑýÿI‰ÀH‹„$€L‹l$HL‹t$xH‹\$pE1ÛL‹L$@H‰l$@E1ÒH‰D$HH‹D$PH‹l$`L‰¤$L‹|$XL‹d$8H‰„$H‹U!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$hHÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$¡+Ç„$øÁHÇD$PH‰D$8éçÐýÿL‹L$@H‰D$@M‰èH‹„$€L‹l$HE1ÛL‹t$xH‹l$`E1ÒH‹\$pL‰¤$H‰D$HH‹D$PL‹d$8L‹|$XL‰D$H‰¬$€E1ÀH‰„$H‹T!L‰ÍH‰\$xL‰´$ˆE1öH‹\$HÇD$`HÇD$hHÇD$XHÇ$HÇD$pHÇD$ÇD$ž+Ç„$øÁHÇD$PH‰D$8é ÐýÿL‹L$@H‰D$@I‰ØH‹„$€L‹l$HE1ÛH‹l$`H‹\$pE1ÒL‰´$L‹t$xH‰D$HH‹D$PL‰|$hL‹d$8L‹|$XL‰D$E1ÀH‰„$H‹;S!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$XHÇ$HÇD$pHÇD$ÇD$Ö+Ç„$øÅHÇD$PH‰D$8é1Ïýÿƒ„$ˆ‹„$ˆƒø…"ñÿÿD‹´$ˆAƒÆAƒþ…ãðÿÿHƒ„$H‹¼$ H‹„$H9„$h„M‰ìé!îÿÿH‹¼$L‰îè<žûÿ…ÀˆC…ñÿÿH‹7{!H‹¼$ÀL‰îè—¡ûÿ…À‰bñÿÿH‹„$€M‰ëL‹l$HL‹t$xH‹l$`E1ÒH‹\$pL‹L$@E1ÀH‰D$HH‹D$PL‹d$8L‹|$XH‰¬$€H‰\$xL‰ÍH‰„$H‹ÒQ!L‰´$ˆL‰œ$E1öH‹\$ÇD$,E1ÛÇ„$øÇHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇD$HÇ$HÇD$pH‰D$8é²ÍýÿH‹„$€M‰ëL‹l$HL‹t$xH‹l$`E1ÒH‹\$pL‹L$@E1ÀH‰D$HH‹D$PL‹d$8L‹|$XH‰¬$€H‰\$xL‰ÍH‰„$H‹íP!L‰´$ˆL‰œ$E1öH‹\$ÇD$í+E1ÛÇ„$øÆHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇD$HÇ$HÇD$pH‰D$8éÍÌýÿL‹t$HL‹¤$€L‰¬$I‹HƒèH…ÀI‰u I‹FL‰÷ÿP0Iƒ,$u I‹D$L‰çÿP0H‹\$`H‹l$pL‹l$xéÆäÿÿH‹„$€M‰ëL‹l$HL‹t$xH‹l$`E1ÒH‹\$pL‹L$@E1ÀH‰D$HH‹D$PL‹d$8L‹|$XH‰¬$€H‰\$xL‰ÍH‰„$H‹´O!L‰´$ˆL‰œ$E1öH‹\$ÇD$ô+E1ÛÇ„$øÆHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇD$HÇ$HÇD$pH‰D$8é”ËýÿH‰D$hH‹„$€M‰èL‹l$HL‹t$xE1ÛH‹l$`H‹\$pE1ÒH‰D$HH‹D$PL‹L$@L‰¤$L‹|$XL‹d$8H‰„$H‹ÒN!L‰D$H‰¬$€E1ÀH‰\$xL‰´$ˆL‰ÍH‹\$HÇD$`E1öHÇD$@HÇD$XHÇ$HÇD$pHÇD$ÇD$‡+Ç„$øÁHÇD$PH‰D$8é·ÊýÿI‰ÀH‹„$€L‹l$HL‹t$xH‹l$`E1ÛL‹L$@H‰\$hE1ÒH‰D$HH‹D$PH‹\$pL‰¤$L‹|$XL‹d$8H‰„$H‹õM!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$@HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$„+Ç„$øÁHÇD$PH‰D$8éÙÉýÿH‰D$hH‹„$€E1ÛL‹l$HL‹t$xE1ÀH‹l$`H‹\$pE1ÒH‰D$HH‹D$PL‹L$@L‰¤$L‹|$XL‹d$8H‰„$H‹M!H‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$@HÇD$XHÇD$HÇ$HÇD$pHÇD$ÇD$‚+Ç„$øÁHÇD$PH‰D$8éûÈýÿH‹D$PH‹l$`E1ÛH‹\$pL‹L$@E1ÀL‹t$xL‹d$8E1ÒH‰„$H‹]L!L‹|$XH‰¬$€L‰ÍH‰\$xL‰l$HH‹\$HÇD$`HÇD$hHÇD$@HÇD$XHÇ$HÇD$pL‰´$ˆHÇD$ÇD$f+Ç„$øÀHÇD$PH‰D$8颼ýÿH‹„$H‹\$pL‰öL‹L$@L‹t$xL‰úL‰l$HI‰íH‹l$`H‰D$H‹D$PE1ÒL‰d$@L‹|$XE1ÛL‹d$8H‰¬$€E1ÀH‰„$H‹oK!L‰ÍH‰\$xL‰´$ˆE1öH‹\$H‰”$˜H‰´$ÇD$C+Ç„$ø½HÇD$`HÇD$HÇD$hHÇD$XHÇD$PHÇ$HÇD$pH‰D$8éTÇýÿ¾H‰ÇèÍØûÿé­ãÿÿL‹L$@L‰4$L‰d$@L‰|$L‹d$8H‹l$`H‹\$pL‹t$xL‹|$XL‰l$HA½H‹T$@H‹H‰D$HƒèH…ÀH‰uH‹BL‰L$H‰×ÿP0L‹L$L‰L$è\ßûÿ…ÀL‹L$…8HéÈH IÇIƒýH5nÛL‰êL‰L$8HEÈH‹ãI!H‹81ÀèÉ™ûÿH‹„$L‹L$8H‰¬$€H‰\$xL‰´$ˆH‰D$H‹D$H‰„$˜H‹$H‰„$H‹D$PH‰„$H‹\$L‰ÍÇD$K+Ç„$ø½HÇD$`HÇD$HÇD$hH‹ŸI!HÇD$@E1ÒHÇD$XHÇD$PE1ÛE1ÀHÇ$HÇD$pH‰D$8éãÅýÿL‹L$@L‰l$HE1íL‰d$@L‰4$L‰|$L‹d$8H‹l$`H‹\$pL‹t$xL‹|$Xé„þÿÿH‹„$H‰¬$€H‰\$xL‰´$ˆH‰D$H‹D$H‰„$˜H‹$H‰„$H‹D$PH‰„$éþþÿÿL‹L$@H‰D$@E1ÛH‹D$PH‹\$pE1ÀL‹t$xH‰¬$˜E1ÒH‹l$`L‹d$8H‰„$H‹—H!L‹|$XH‰\$xH‰¬$€H‹\$L‰ÍH‰L$hL‰l$HHÇD$`HÇD$XHÇ$HÇD$pL‰´$ˆHÇD$ÇD$;+Ç„$ø½HÇD$PH‰D$8éé¸ýÿH‹QHƒúuzH;D$HH‹Au^H‹i H‰„$H‹„$HƒHƒEHƒ)…ÊàÿÿH‹AH‰ÏÿP0é»àÿÿM‰ìH‰¬$˜é‡÷ÿÿI;]}êI‹LÝHƒÃHƒéËßÿÿH‹H‹hH‰”$ëH‰¬$˜L‹d$8L‹L$@L‹t$xH‰L$hH‹\$pL‰l$HH‹l$`L‹|$XH…Òˆ~HàÅH @ÄHƒúH5eØL‰ $HEÈH‹ÞF!H‹81ÀèÄ–ûÿH‹D$PL‹ $E1ÒH‰¬$€H‰\$xE1ÛH‹\$L‰´$ˆE1ÀH‰„$H‹éF!L‰ÍÇD$&+Ç„$ø½HÇD$`HÇD$HÇD$@HÇD$XHÇD$PHÇ$HÇD$pH‰D$8é[·ýÿL‰ïH‹„$€ÿÐH…ÀH‰Á…—ÞÿÿI‰ÇH‰¬$˜M‰ìèo”ûÿH…À„öÿÿH‹—F!H‹2H9ð…Çèî“ûÿéöÿÿH‹D$PH‹l$`E1ÒH‹\$pL‹L$@E1ÛL‹t$xL‰|$hE1ÀH‰„$H‹F!L‰d$HL‹|$XL‹d$8H‰¬$€L‰ÍH‰\$xL‰´$ˆH‹\$ÇD$ú*Ç„$ø½HÇD$`HÇD$HÇD$@HÇD$XHÇD$PHÇ$HÇD$pH‰D$8éL¶ýÿH‰Çè’ûÿ…À…)ÿÿÿH‹D$PH‹l$`E1ÛH‹\$pL‹L$@E1ÀL‹t$xL‰|$hE1ÒH‰„$H‹6E!L‹d$8L‹|$XH‰¬$€H‰\$xL‰ÍH‹\$L‰l$HHÇD$`HÇD$@HÇD$XHÇ$HÇD$pL‰´$ˆHÇD$ÇD$+Ç„$ø½HÇD$PH‰D$8éµýÿH‰D$HH‹D$PE1ÛH‹l$`H‹\$pE1ÀL‹L$@L‹t$xE1ÒH‰„$H‹yD!L‰|$hL‹d$8L‹|$XH‰¬$€L‰ÍH‰\$xHÇD$`H‹\$HÇD$@HÇD$XHÇ$HÇD$pL‰´$ˆHÇD$ÇD$ø*Ç„$ø½HÇD$PH‰D$8é´ýÿIƒM‰üHÇ„$€1ÛéÛÿÿH‹D$PH‰¬$€E1ÒH‰\$xL‰´$ˆL‰ÍH‹\$ÇD$&+E1ÛH‰„$H‹™C!E1ÀÇ„$ø½HÇD$`HÇD$HÇD$@HÇD$XHÇD$PHÇ$HÇD$pH‰D$8é´ýÿH‹ìB!H5ÕϺL‰ $H‹81ÀèÂ’ûÿH‹D$PL‹ $E1ÒH‰¬$€H‰\$xE1ÛH‹\$L‰´$ˆE1ÀH‰„$H‹çB!L‰ÍÇD$&+Ç„$ø½HÇD$`HÇD$HÇD$@HÇD$XHÇD$PHÇ$HÇD$pH‰D$8éY³ýÿH‰D$hH‹D$PE1ÛH‹l$`H‹\$pE1ÀL‹L$@L‹t$xE1ÒH‰„$H‹SB!L‰d$HL‹|$XL‹d$8H‰¬$€L‰ÍH‰\$xHÇD$`H‹\$HÇD$@HÇD$XHÇ$HÇD$pL‰´$ˆHÇD$ÇD$ñ*Ç„$ø½HÇD$PH‰D$8露ýÿH‹l$`H‹\$pM‰õL‹L$@L‹t$xE1ÛH‰D$HH‹D$PE1ÀL‹d$8L‰|$hH‰¬$€L‹|$XL‰ÍH‰\$xHÇD$`H‹\$HÇD$@HÇD$XL‰l$HÇ$HÇD$pL‰´$ˆH‰„$HÇD$ÇD$é*H‹(A!Ç„$ø½E1ÒHÇD$PH‰D$8銽ýÿH‹l$`H‹\$pM‰õL‹L$@L‹t$xE1ÛH‰D$hH‹D$PE1ÀL‹|$XH‰¬$€H‰\$xL‹d$8L‰ÍH‹\$HÇD$`HÇD$HHÇD$@HÇD$XL‰l$HÇ$HÇD$pL‰´$ˆH‰„$HÇD$ÇD$ç*é2ÿÿÿH‹D$PH‹l$`E1ÛH‹\$pL‹L$@E1ÀL‹t$xL‹d$8E1ÒH‰„$H‹+@!L‹|$XH‰¬$€L‰ÍH‰\$xHÇD$`H‹\$HÇD$HHÇD$hHÇD$@HÇD$XHÇ$HÇD$pL‰´$ˆHÇD$ÇD$å*Ç„$ø½HÇD$PH‰D$8él°ýÿH;kuÖÿÿL‹|ëHƒÅIƒé ÖÿÿL‰|$hH‹D$hH‰ßH‹l$`L‹t$xH‹\$pL‹L$@H‰„$H‹D$PH‰¬$€L‹d$8H‰\$xL‹|$XL‰ÍH‰|$L‰´$ˆH‰„$H‹\$ÇD$³*Ç„$øºHÇD$`HÇD$Hé<õÿÿIƒH‹|$xL‰þ裋ûÿH…ÀI‰Å„×H‹5¸g!¹ºH‰Çè.ÜûÿH…ÀI‰Ä„ßIƒmu I‹EL‰ïÿP0H‹|$xL‰âL‰þèñûÿ…Àx+Iƒ,$u I‹D$L‰çÿP0Iƒ/…LÕÿÿI‹GL‰ÿÿP0é=ÕÿÿL‰øH‹l$`L‹t$xH‰ÞL‹L$@H‹\$pH‰„$H‹D$PL‰|$hL‰d$HH‰¬$€H‰\$xL‰ÍH‹\$L‹d$8L‹|$XH‰t$L‰´$ˆH‰„$ÇD$Î*Ç„$ø¼HÇD$`HÇD$é-ôÿÿL‰øL‹t$xH‹l$`H‰„$H‹D$PH‰ÚL‹L$@H‹\$pE1ÛL‰|$hL‰d$HE1ÀH‰„$H‹=!E1ÒL‹d$8L‹|$XH‰¬$€H‰\$xL‰ÍL‰´$ˆH‹\$E1öHÇD$`HÇD$@HÇD$XH‰T$HÇ$HÇD$pHÇD$ÇD$Ë*Ç„$ø¼HÇD$PH‰D$8éh¹ýÿL‰øH‹l$`L‹L$@H‰„$H‹D$PH‰ÞL‹t$xH‹\$pE1ÛL‹d$8L‰|$hE1ÀH‰„$H‹ºÑûÿ‰„$pƒÀ„Z"Iƒmu I‹EL‰ïÿP0H‹„$0H;!„˜!ƒ¼$(„ï ‹D$H‹œ$(‹t$HH‹¼$0™÷û‰Ú¯Ð)Ö‰Ú1òÁê…ö‰Ñ•Â!Ê)ÐHcðèŸûÿH…ÀI‰Å„# ‹„$h‹´$hL‰ï™÷û‰Ú¯Ð)Ö‰Ú1òÁê…ö‰Ñ•Â!ʹ)кHcðèäÀûÿH…ÀH‰Ã„ÉIƒmu I‹EL‰ïÿP0‹„$p‹Œ$(H‰ß‹´$p™÷ù‰Ê¯Ð)Ö‰Ê1òÁê…ö‰Ñ•Â!ʹ)кHcðèÀûÿH…ÀI‰Ç„åHƒ+u H‹CH‰ßÿP0I‹GH;‚!„ÒL;=í !„ÅH‹HH‹” !H.ŒH5‹H‰ëM‰ýH‹l$8L‹|$PE1äH‹81ÀE1öèN]ûÿH‹§ !H‰$E1ÒH‹\$ÇD$Ú,E1ÛÇ„$øÓHÇD$`E1ÀHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇD$H‰D$8阉ýÿH‰èH‰\$HH‹l$8H‰$H‹ !E1ÛL‹|$PH‹\$E1ÀHÇD$`HÇD$hE1äHÇD$@HÇD$XE1ÒHÇD$ÇD$×,Ç„$øÓHÇD$PH‰D$8é}ýÿH‰èH‰\$HH‹l$8H‰$H‹— !E1ÛL‹|$PH‹\$E1ÀHÇD$`HÇD$hE1äHÇD$@HÇD$XE1öHÇD$HÇD$E1ÒÇD$Ë,Ç„$øÓHÇD$PH‰D$8銈ýÿH…ítHƒmu H‹EH‰ïÿP0L;= !„¼Iƒ„9HcD$HIƒH‹¼$L‹t$HÇD$XL‰¼$`H‰„$xHc„$hH‰„$€Hc„$pH‰„$ˆH‹´$`H‹\$XH9^ŽÙH‹FH‹ØHƒH‰„$H‰ØHƒÀH…ÿH‰„$t Hƒ/uH‹GÿP0H‹=*8!è­ÀûÿH…ÀI‰Ä„öH‹¼$xè„ZûÿH…ÀH‰D$`„NH‹¼$€èiZûÿH…ÀH‰D$@„¯H‹¼$ˆèNZûÿH…ÀH‰Ã„ò„$øè4XûÿH…ÀH‰D$h„ƒò„$PèXûÿH…ÀI‰Ç„ò„$XèþWûÿH…ÀH‰Å„ò H‹„$˜I9D$„K ¿ èuXûÿH…ÀI‰Å„ 1ÀH‹t$`IDÅH‹T$hL‰çH‰X(H‹œ$H‰pH‹t$@H‰p HƒH‰X0H‹$H‹5™ !HƒH‰X8H‹\$HƒH‰X@H‹œ$ HƒHƒH‰XHH‰PPH‰ph1ÒL‰xXL‰îH‰h`èæ¨ûÿH…ÀH‰Ãt}Iƒmu I‹EL‰ïÿP0Iƒ,$u I‹D$L‰çÿP0H;Ü !”ÀH; !¶è”ÂÂu H;© !…ÄHƒ+u H‹CH‰ßÿP0…í…SH‹„$H‹¼$H‰D$XéÌýÿÿH‰D$HH‹„$`M‰èH‹l$8L‹|$PE1ÛH‹\$HÇD$`E1öH‰$I‰ÅH‹5 !HÇD$hHÇD$@E1ÒHÇD$XHÇD$HÇD$ÇD$E-Ç„$øÖHÇD$PH‰D$8éG…ýÿH‰ßègWûÿ…À‰Å‰*ÿÿÿH‹„$`H‰\$HE1ÒH‹l$8L‹|$PE1ÛH‹\$ÇD$I-E1ÀH‰$I‰ÅH‹’!Ç„$øÖHÇD$`E1äHÇD$HÇD$hE1öHÇD$@HÇD$XHÇD$PHÇD$H‰D$8é „ýÿH‹|$XèþTûÿH…ÀH‰Ã„Ö H‹¼$xèeWûÿH…ÀI‰Ä„+ H‹¼$€èLWûÿH…ÀI‰Å„€H‹¼$ˆè3WûÿH…ÀH‰Å„Ù¿è½UûÿH…ÀI‰Ç„5H‹=Ê3!H‰h0H‰ÆH‰XL‰` L‰h(èrWûÿH…ÀH‰Å„uIƒ/u I‹GL‰ÿÿP0H‰ïèn»ûÿ…ÀˆÀHƒmu H‹EH‰ïÿP0H‹l$8Iƒ1ÛH‰ïI9^ŽI‹FLcH‹,ØHƒEH…ÿt Hƒ/uH‹GÿP0H‹5ã3!H‰ïèÛ¥ûÿH…ÀI‰Ç„ºH‹´$ºH‰Çè:SûÿH…ÀI‰Å„Iƒ/u I‹GL‰ÿÿP0L;-ï!”ÀL;--!D¶ø”ÂÂu L;-»!u%Iƒmu I‹EL‰ïÿP0E…ÿ…°L‰ãH‰ïé=ÿÿÿL‰ïèUûÿ…ÀA‰ÇyÌH‹„$`M‰èL‹|$PH‹\$ÇD$‘-E1ÒÇ„$øÙHÇD$`E1ÛH‰$H‹D$E1äL‹,$HÇD$HE1öHÇD$HÇD$hH‰D$XH‹!HÇD$@HÇD$PHÇD$H‰D$8éW‚ýÿH‰ßH‰l$8è²RûÿH…ÀI‰Å„R¿è¼SûÿH…ÀI‰Ç„¢L‰hHƒEL‰þH‹=Ý1!I‰o ètUûÿH…ÀI‰Å„àIƒ/u I‹GL‰ÿÿP0L‰ïèp¹ûÿ…Àx*Iƒmu I‹EL‰ïÿP0Iƒ.…ÖûÿÿI‹FL‰÷ÿP0éÇûÿÿH‹„$`H‹t$M‰èH‹l$8L‹|$PE1ÒH‹\$ÇD$©-E1ÛH‰$I‰ÅH‹!H‰t$XÇ„$øÚE1äHÇD$`HÇD$HE1öHÇD$HÇD$hHÇD$@HÇD$PHÇD$H‰D$8é ýÿI‰ÀH‹„$`H‹T$M‰ûH‹l$8L‹|$PH‹\$HÇD$`E1äH‰$I‰ÅH‹|!HÇD$HHÇD$hE1öHÇD$@H‰T$XE1ÒHÇD$HÇD$ÇD$¦-Ç„$øÚHÇD$PH‰D$8醀ýÿI‰ÃH‹„$`H‹\$M‰èH‹l$8L‹|$PHÇD$`HÇD$HE1äH‰$I‰ÅH‹Þ!H‰\$XHÇD$hE1öH‹\$HÇD$@E1ÒHÇD$HÇD$ÇD$ž-Ç„$øÚHÇD$PH‰D$8éìýÿI‰ÀH‹„$`H‹t$H‹l$8L‹|$PE1ÛH‹\$HÇD$`E1äH‰$I‰ÅH‹H!HÇD$HHÇD$hE1öHÇD$@H‰t$XE1ÒHÇD$HÇD$ÇD$œ-Ç„$øÚHÇD$PH‰D$8éRýÿI‰ÀH‹„$`H‹T$M‰ûH‹\$L‹|$PHÇD$`HÇD$HE1äH‰$I‰ÅH‹ª!HÇD$hHÇD$@E1öH‰T$XHÇD$E1ÒHÇD$ÇD$-Ç„$øÙHÇD$PH‰D$8é½~ýÿI‰ÃH‹„$`H‹T$L‹|$PH‹\$E1ÀHÇD$`HÇD$HE1äH‰$I‰ÅH‹!HÇD$hHÇD$@E1öH‰T$XHÇD$E1ÒHÇD$ÇD$-Ç„$øÙHÇD$PH‰D$8é(~ýÿH‰l$8éKüÿÿH‹„$`H‰l$XE1ÒH‹l$8L‹|$PE1ÛH‹\$ÇD$m-E1ÀH‰$I‰ÅH‹{!Ç„$ø×HÇD$`E1äHÇD$HHÇD$E1öHÇD$hHÇD$@HÇD$PHÇD$H‰D$8é‰}ýÿH‰D$XH‹„$`M‰ûH‹l$8L‹|$PE1ÀH‹\$HÇD$`E1äH‰$I‰ÅH‹å!HÇD$HHÇD$hE1öHÇD$@HÇD$E1ÒHÇD$ÇD$j-Ç„$ø×HÇD$PH‰D$8éô|ýÿI‰ÃH‹„$`M‰èH‰l$XH‰\$HE1öH‹l$8L‹|$PE1ÒH‰$I‰ÅH‹V!H‹\$HÇD$`HÇD$hHÇD$@HÇD$HÇD$ÇD$\-Ç„$ø×HÇD$PH‰D$8éf|ýÿH‰D$XH‹„$`M‰èH‰\$HH‹l$8E1ÛL‹|$PH‹\$E1öH‰$I‰ÅH‹Æÿ HÇD$`HÇD$hE1ÒHÇD$@HÇD$HÇD$ÇD$Z-Ç„$ø×HÇD$PH‰D$8éØ{ýÿI‰ÀH‹„$`H‰\$HH‹l$8L‹|$PE1ÛH‹\$HÇD$`E1öH‰$I‰ÅH‹4ÿ HÇD$hHÇD$@E1ÒHÇD$XHÇD$HÇD$ÇD$X-Ç„$ø×HÇD$PH‰D$8éF{ýÿH‹„$`H‰\$HE1ÛH‹l$8L‹|$PE1ÀH‹\$HÇD$`E1öH‰$I‰ÅH‹¢þ HÇD$hHÇD$@E1ÒHÇD$XHÇD$HÇD$ÇD$V-Ç„$ø×HÇD$PH‰D$8é´zýÿH‰D$HH‹„$`E1ÛH‹l$8L‹|$PE1ÀH‹\$HÇD$`E1äH‰$I‰ÅH‹þ HÇD$hHÇD$@E1öHÇD$XHÇD$E1ÒHÇD$ÇD$T-Ç„$ø×HÇD$PH‰D$8ézýÿH‹„$`M‰èM‰ûH‰l$XL‹|$PE1öH‹l$8H‰\$E1ÒH‰$I‰ÅH‹ý H‹\$HÇD$HHÇD$ÇD$-Ç„$øÖHÇD$PH‰D$8é¬yýÿI‹T$H…Ò„§òÿÿI‹L$HƒHƒIƒ,$u+I‹D$H‰Œ$¨L‰çH‰”$ ÿP0H‹”$ H‹Œ$¨¿ H‰Œ$¨H‰”$ èÍJûÿH…ÀH‹”$ H‹Œ$¨„þH‰PI‰ÅI‰Ì¸é9òÿÿH‰D$XH‹„$`M‰ûH‹l$8L‹|$PE1ÀH‰\$HÇD$HE1öH‰$I‰ÅH‹tü H‹\$ÇD$-E1ÒHÇD$Ç„$øÖHÇD$PH‰D$8é¥xýÿI‰ÃH‹„$`H‹l$8L‹|$PH‰\$E1ÀH‹\$HÇD$XE1öH‰$I‰ÅH‹ü HÇD$HHÇD$E1ÒÇD$-Ç„$øÖHÇD$PH‰D$8é.xýÿI‰ÆH‹„$`M‰ûH‰l$XL‹|$PE1ÀH‹l$8H‰\$I‰ÌH‰$H‹“û E1ÒH‹\$HÇD$HL‹,$H‰T$ÇD$-Ç„$øÖHÇD$PH‰D$8é»wýÿH‹„$`H‹l$8E1ÛL‹|$PH‰\$E1ÀH‹\$HÇD$XE1öH‰$I‰ÅH‹û HÇD$HHÇD$E1ÒÇD$ -Ç„$øÖHÇD$PH‰D$8éDwýÿH‰D$HH‹„$`E1ÛH‹l$8L‹|$PE1ÀH‹\$HÇD$hE1öH‰$I‰ÅH‹ ú HÇD$XHÇD$E1ÒHÇD$ÇD$ -Ç„$øÖHÇD$PH‰D$8éÄvýÿH‹„$`H‹l$8E1ÛL‹|$PH‹\$E1ÀHÇD$HHÇD$hE1öH‰$I‰ÅH‹ú HÇD$XHÇD$E1ÒHÇD$ÇD$ -Ç„$øÖHÇD$PH‰D$8é@výÿH‹„$`H‹l$8E1ÛL‹|$PH‹\$E1ÀHÇD$HHÇD$hE1öH‰$I‰ÅH‹˜ù HÇD$@HÇD$XE1ÒHÇD$HÇD$ÇD$-Ç„$øÖHÇD$PH‰D$8é³uýÿH‹„$`H‹l$8E1ÛL‹|$PH‹\$E1ÀHÇD$`HÇD$HE1öH‰$I‰ÅH‹ ù HÇD$hHÇD$@E1ÒHÇD$XHÇD$HÇD$ÇD$-Ç„$øÖHÇD$PH‰D$8éuýÿL‹¼$`Iƒ/u I‹GL‰ÿÿP0H‹=^#!èñ­ûÿH…ÀI‰Å„ÀHc|$HèËGûÿH…ÀH‰D$X„#Hc¼$hè°GûÿH…ÀH‰Å„…Hc¼$pè—GûÿH…ÀI‰Æ„çHc¼$tè~GûÿH…ÀI‰Ä„L¿ èFûÿH…ÀH‰Ã„¸H‹D$XH‰k L‰s(H‰CH‹$IƒL‰{0HƒH‰C8H‹D$HƒH‰C@H‹„$ HƒH‰CHH‹D$HƒL‰cXH‰CPè„FûÿH…ÀI‰Ä„̓¼$°„¯H‹«÷ HƒL‹´$HH‹5à!!L‰çL‰òèÕFûÿ…ÀˆöI‹H‰D$@HƒèH…ÀI‰uH‹¼$HH‹GÿP0H‹”$8H‹5[$!L‰çè“Fûÿ…Àˆ-L‰âH‰ÞL‰ïè –ûÿH…ÀI‰Æ„ŒIƒmu I‹EL‰ïÿP0Hƒ+u H‹CH‰ßÿP0Iƒ,$u I‹D$L‰çÿP0L‰÷èÆ¸ûÿƒøÿ‰Ã„¶Iƒ.u I‹FL‰÷ÿP0H‹¤!H‹´$H‹¼$èÿEûÿ…Àˆ;œ$ttA‹Œ$p‹”$h‹t$HH‹|$pèbGûÿH…Àt0H‹0‰œ$tHVÿH…ÒH‰u H‹PH‰ÇÿR0L‰ýL‹¬$éyÜÿÿH‹6ö H‹l$8E1ÒL‰<$H‹\$E1ÛL‹|$PÇD$=.E1ÀÇ„$øâHÇD$`E1äHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8é‹fýÿH‹¤!H‹´$H‹¼$èÿDûÿ…À‰JÿÿÿH‹õ H‹l$8E1ÒL‰<$H‹\$E1ÛL‹|$PÇD$*.E1ÀÇ„$øàHÇD$`E1äHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8éåeýÿè CûÿH…À„<þÿÿH‹õ H‹l$8M‰óL‰<$H‹\$E1ÒL‹|$PÇD$.E1ÀÇ„$øÝHÇD$`E1äHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8éUeýÿI‰ÃH‹{ô H‰\$HH‹l$8L‰<$E1ÀL‹|$PH‹\$E1öHÇD$`HÇD$hE1ÒHÇD$@HÇD$XHÇD$HÇD$ÇD$.Ç„$øÝHÇD$PH‰D$8éfpýÿH‹÷ó H‰\$HE1ÒH‹l$8L‰<$E1ÛL‹|$PH‹\$E1ÀÇD$.Ç„$øÝE1öHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇD$H‰D$8éßoýÿH‹pó H‰\$HE1ÒH‹l$8L‰<$E1ÀL‹|$PH‹\$E1öL‹œ$HÇD$.Ç„$øÝHÇD$`HÇD$HÇD$hHÇD$@HÇD$XHÇD$PHÇD$H‰D$8éSoýÿH‹Dò HƒéLûÿÿH‹Ôò H‰\$HE1ÛH‹l$8L‰<$E1ÀL‹|$PH‹\$E1öHÇD$`HÇD$hE1ÒHÇD$@HÇD$XHÇD$HÇD$ÇD$ .Ç„$øÝHÇD$PH‰D$8é¼nýÿH‰D$HH‹Hò I‰èM‰óH‹l$8L‰<$H‹\$L‹|$PE1öHÇD$`HÇD$hE1ÒHÇD$@HÇD$HÇD$ÇD$í-Ç„$øÝHÇD$PH‰D$8é>nýÿH‹Ïñ I‰èM‰óH‹l$8L‰<$E1öL‹|$PH‹\$E1ÒHÇD$`HÇD$HHÇD$hHÇD$@HÇD$HÇD$ÇD$ë-Ç„$øÝHÇD$PH‰D$8é¼mýÿI‰ÃH‹Jñ I‰èL‰<$H‹l$8E1äL‹|$PH‹\$E1öHÇD$`HÇD$HE1ÒHÇD$hHÇD$@HÇD$HÇD$ÇD$é-Ç„$øÝHÇD$PH‰D$8é7mýÿI‰ÀH‹Åð H‹l$8L‰<$H‹\$E1ÛL‹|$PHÇD$`E1äHÇD$HHÇD$hE1öHÇD$@HÇD$E1ÒHÇD$ÇD$ç-Ç„$øÝHÇD$PH‰D$8é²lýÿH‹Cð H‹l$8E1ÛL‰<$H‹\$E1ÀL‹|$PHÇD$`E1äHÇD$HHÇD$hE1öHÇD$@HÇD$E1ÒHÇD$ÇD$å-Ç„$øÝHÇD$PH‰D$8é-lýÿH‹¾ï H‹l$8E1ÛL‰<$H‹\$E1ÀL‹|$PHÇD$`E1äHÇD$HHÇD$hE1ÒHÇD$@HÇD$XHÇD$ÇD$ã-Ç„$øÝHÇD$PH‰D$8é`ýÿH‹,!H‹´$H‹¼$è‡>ûÿ…À‰ÒøÿÿL‰<$H‹$E1ÒH‹l$8L‹|$PE1ÛH‹\$ÇD$*.E1ÀH‰D$8Ç„$øàE1äHÇD$`HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$Pép_ýÿH‰èL‹|$PH‹l$8H‰$H‹ˆî E1ÛH‹\$HÇD$`E1ÀHÇD$HHÇD$hE1äHÇD$@HÇD$XE1ÒHÇD$ÇD$À,Ç„$øÓHÇD$PH‰D$8éë^ýÿH‹î H5ÍH‰ëL‹|$PH‹l$8E1äH‹8è•:ûÿH‹îí H‰$E1ÒH‹\$ÇD$¹,E1ÛÇ„$øÓHÇD$`E1ÀHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8éP^ýÿH‹1í H5r~H‰ëL‹|$PH‹l$8E1äH‹8èú9ûÿH‹„$0H‰$E1ÒH‹\$ÇD$µ,E1ÛÇ„$øÓHÇD$`E1ÀHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8é´]ýÿèï:ûÿH…À„˜ÝÿÿH‹Ïì I‰îL‹|$PH‹l$8L‰4$E1ÒH‹\$ÇD$,E1ÛÇ„$øÑHÇD$`E1ÀHÇD$HHÇD$E1äHÇD$hHÇD$@E1öHÇD$XHÇD$PHÇD$H‰D$8é­hýÿèP:ûÿH…À„ÑÜÿÿH‹0ì I‰îH‰\$HH‹l$8L‹|$PE1ÒL‰4$H‹\$E1ÛÇD$›,Ç„$øÑE1ÀHÇD$`HÇD$E1äHÇD$hHÇD$@E1öHÇD$XHÇD$PHÇD$H‰D$8éhýÿèµ9ûÿH…À„ ÜÿÿH‹•ë I‰îH‰\$HH‹l$8L‹|$PE1ÒL‰4$H‹\$E1ÛÇD$™,Ç„$øÑE1ÀHÇD$`HÇD$E1öHÇD$hHÇD$@HÇD$XHÇD$PHÇD$H‰D$8ézgýÿI‰îL‹|$PH‹l$8ÃH…ÒˆBH€iH àgHƒúH5|HEÈH‹‚ê E1äH‹81Àèe:ûÿH‹¾ê H‹\$E1ÒL‰4$ÇD$…,E1ÛÇ„$øÑHÇD$`E1ÀHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8é [ýÿH‹ê H5{H‰ëL‹|$PH‹l$8E1äH‹8èÊ6ûÿH‹„$H‰$E1ÒH‹\$ÇD$—,E1ÛÇ„$øÑHÇD$`E1ÀH‰D$8HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$Pé„ZýÿH‹­é H‹\$E1ÒL‰4$ÇD$…,E1ÛÇ„$øÑHÇD$`E1ÀHÇD$HHÇD$E1äHÇD$hHÇD$@HÇD$XHÇD$PH‰D$8é ZýÿH‹åè H5ÎuºE1äH‹81Àè¼8ûÿH‹é H‹\$E1ÒL‰4$ÇD$…,E1ÛÇ„$øÑHÇD$`E1ÀHÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$PH‰D$8éwYýÿI‰ïéRòÿÿH‰èL‹|$PH‹l$8H‰$H‹‡è E1ÒH‹\$ÇD$p,E1ÛÇ„$øÐHÇD$`E1ÀHÇD$HHÇD$E1äHÇD$hHÇD$@HÇD$XHÇD$PH‰D$8éêXýÿH‰èL‹|$PH‹l$8H‰$H‹è E1ÛH‹\$HÇD$`E1ÀHÇD$HHÇD$hE1äHÇD$@HÇD$XE1ÒHÇD$L‰¬$ÇD$c,Ç„$øÎHÇD$PH‰D$8é]XýÿH‹Æç HÝeH5H|I‰îL‹|$PH‹l$8E1äH‹81Àèþ6ûÿH‹D$pH‹\$E1ÒL‰4$ÇD$a,E1ÛÇ„$øÎHÇD$`E1ÀH‰D$8HÇD$HHÇD$HÇD$hHÇD$@HÇD$XHÇD$Pé»Wýÿf.„AWAV¹ AUATUSH‰õHì¨H\$0dH‹%(H‰„$˜1ÀH‰ßH…ÒóH«…ÐH‹NHƒù …BH‹FHH‹^L‹f L‹n(L‹v0L‹~8H‰D$`H‹FPH‹N@H‰\$0L‰d$8L‰l$@H‰D$hH‹FXL‰t$HL‰|$PH‰L$XH‰D$pH‹F`H‰D$xH‹FhH‰„$€H‹FpH‰„$ˆH‹qH‹†¨©€„šH‹AHcЉÅH9Ð…8ƒýÿ„ßH‹L$hL‹T$`H‹qH‹†¨©€„oH‹AHcÐA‰ÁH9Ð…¬Aƒùÿ„ÀH‹L$pH‹qH‹†¨©€„H‹AHcÐA‰ÃH9Ð…<Aƒûÿ„ZH‹L$xH‹qH‹†¨©€„ïH‹AHcȉÂH9È…= ƒúÿ„f H‹¼$€H;=Må ”ÀH;=‹ä ”ÁÁH‹ å u H9Ï…$¶ðH9ËH‹¼$ˆtL‹CH‹å I9À…(I9ÊtM‹BH‹hå I9À…OWVM‰øRASL‰ñAQARA‰éL‰êL‰æH‰ßè·GýÿHƒÄ0H…À„ºf.„H‹œ$˜dH3%(…úHĨ[]A\A]A^A_ÃH‹5 !L‰çIƒîèä1ûÿH…ÀH‰D$0…FH‹MfH‹ä HƒìH~yQH5wL ÀbH ëaA¸ H‹81Àè¸3ûÿXZ¾I/H JpH=ûxºèɃûÿ1ÀéRÿÿÿfH‰L$ D‰L$D‰\$‰T$L‰$èd2ûÿƒøÿ‰ÆL‹$‹T$D‹\$D‹L$H‹L$ …¡þÿÿH‰L$(D‰L$ D‰\$‰T$‰D$è¦1ûÿH…ÀL‹$‹t$‹T$D‹\$D‹L$ H‹L$(„aþÿÿ¾D/éWÿÿÿ„©„sH‹AHƒÀHƒø†£H‰ÏL‰$èW1ûÿHcÐA‰ÁL‹$H9ЄhýÿÿHƒÀuè)1ûÿH…ÀL‹$uH‹ñâ L‰$H5sH‹8è–/ûÿL‹$L‰$èù0ûÿH…À…¯A¹ÿÿÿÿL‹$éýÿÿL‹nIƒý ‡MHëkI‰ÔJc¨HÐÿàH‹FpH‰„$ˆH‹EhH‰„$€H‹E`H‰D$xH‹EXH‰D$pH‹EPH‰D$hH‹EHH‰D$`H‹E@H‰D$XH‹E8H‰D$PH‹E0H‰D$HH‹E(H‰D$@H‹E H‰D$8H‹EH‰D$0L‰çè…-ûÿIƒý I‰Æ‡‰H…kJc¨HÐÿà„H‹5‰ !L‰çè/ûÿH…ÀH‰D$8„Ÿ IƒîH‹50 !L‰çè`/ûÿH…ÀH‰D$@„ IƒîH‹5Ç !L‰çè?/ûÿH…ÀH‰D$H„› IƒîH‹5Æ !L‰çè/ûÿH…ÀH‰D$P„, IƒîH‹5e!L‰çèý.ûÿH…ÀH‰D$X„Å IƒîH‹5L!L‰çèÜ.ûÿH…ÀH‰D$`„] IƒîH‹5“ !L‰çè».ûÿH…ÀH‰D$h„ IƒîH‹5j !L‰çèš.ûÿH…ÀH‰D$p„¨IƒîH‹5A !L‰çèy.ûÿH…ÀH‰D$x„@IƒîH‹5@ !L‰çèX.ûÿH…ÀH‰„$€„IƒîH‹5Ü !L‰çè4.ûÿH…ÀH‰„$ˆ„SIƒîM…öH‹\$0L‹d$8L‹l$@L‹t$HL‹|$PH‹L$XéSúÿÿ©„íH‹AHƒÀHƒøwgHäiHc‚HÂÿâH‹øß L‹FH5 pH‰ÑH‹81ÀèÈ/ûÿHƒmuH‹EH‰ïÿP0€è.ûÿH…À½ÿÿÿÿ„úÿÿ¾?/éâûÿÿH‰Ïè.ûÿHcЉÅH9ЄâùÿÿHƒøÿuèß-ûÿH…Àuºf.„H‹¡ß H5ºoH‹8èJ,ûÿ똄HAiHc‚HÂÿâH‰ÏD‰L$L‰$èŸ-ûÿHcÐA‰ÃL‹$H9ÐD‹L$„ãùÿÿHƒÀuèl-ûÿH…ÀL‹$D‹L$u.fDH‹)ß D‰L$H5=oL‰$H‹8èÉ+ûÿL‹$D‹L$D‰L$L‰$è"-ûÿH…À…TA»ÿÿÿÿL‹$D‹L$é{ùÿÿDH )kH=Úsº¾e/è£~ûÿ1Àé,úÿÿ@H;9ß „^H‹HM‹@HŸ\H‹]Þ H5ÞpH‹81Àè4.ûÿ1ÀéíùÿÿDH;ùÞ „=H‹HM‹@HÎ\ë¾f.„1íéjøÿÿf„‹i÷ÝéNøÿÿfD‹A‹QHÁàH ÐH÷ØHcЉÅH9Є*øÿÿé]þÿÿD‹iéøÿÿ‹AHÁàH‰Â‹AH ÐHcЉÅH9Єú÷ÿÿé-þÿÿE1Éé3øÿÿ‹AHÁàH‰Â‹AH ÐHcÐA‰ÁH9Є øÿÿé±úÿÿ‹A‹QHÁàH ÐH÷ØHcÐA‰ÁH9Єæ÷ÿÿéúÿÿD‹IéØ÷ÿÿD‹IA÷ÙéÌ÷ÿÿLÁrH5 ë L‰éH‰ÚL‰çè‰ûÿ…À‰Îüÿÿ¾(/éIùÿÿf.„H‹Ý HƒìH [j H5pL ¿[HgrA¸ H‹81Àè·,ûÿY^¾$/éúøÿÿ©„ƒH‹AHƒÀHƒø‡[ýÿÿH fHc‚HÂÿâE1ÛéY÷ÿÿD‹YA÷ÛéC÷ÿÿ‹AHÁàH‰Â‹AH ÐH÷ØHcÐA‰ÃH9Є!÷ÿÿéXýÿÿD‹Yé÷ÿÿ‹AHÁàH‰Â‹AH ÐHcÐA‰ÃH9Єôöÿÿé+ýÿÿ©„—H‹AHƒÀHƒø‡,HfHc‚HÂÿâ1Òéøöÿÿ‹Q÷Úéåöÿÿ‹AHÁàH‰Â‹AH ÐH÷ØHcȉÂH9È„ÄöÿÿH‹ñÛ H5 lD‰L$D‰\$L‰$H‹8èŒ(ûÿL‹$D‹\$D‹L$D‰L$D‰\$L‰$èÛ)ûÿH…À…êºÿÿÿÿL‹$D‹\$D‹L$éföÿÿ‹QéUöÿÿ‹AHÁàH‰Â‹AH ÐHcȉÂH9È„7öÿÿéoÿÿÿ€©€…NH‹F`H…À„×Hƒ¸„ÙH‰Ïèê)ûÿHmXH‰ÅH…í„®H‹uH‰éH÷†¨€„ØúÿÿH‹†¨©€„ãH‹AHcЉÅH9Ð…¡Hƒ)…ùôÿÿH‹AH‰ÏÿP0éêôÿÿ©€…H‹F`H…À„þHƒ¸„H‰ÏL‰$èP)ûÿL‹$HÏWI‰ÁM…É„ÍI‹qL‰ÉH÷†¨€„}H‹†¨©€„ãH‹AHcÐA‰ÁH9Ð…+ Hƒ)…–ôÿÿH‹AD‰L$H‰ÏL‰$ÿP0D‹L$L‹$éuôÿÿ¾A/éöÿÿH‰ÏD‰L$D‰\$L‰$è1(ûÿHcȉÂL‹$H9ÈD‹\$D‹L$„¨ôÿÿHƒÀ…Ûýÿÿèö'ûÿH…ÀL‹$D‹\$D‹L$„¿ýÿÿéìýÿÿf.„H‹qÙ HƒìH5Žlj L 6XH aWH×nA¸ H‹81Àè')ûÿ_¾/AXéiõÿÿ©€…íH‹F`H…À„’Hƒ¸„QH‰ÏD‰L$L‰$èã'ûÿL‹$D‹L$H]VI‰ÃM…Û„WI‹sL‰ÙH÷†¨€„¯H‹†¨©€„‰H‹AHcÐA‰ÃH9Ð…ÑHƒ)…\óÿÿH‹AD‰L$H‰ÏD‰\$L‰$ÿP0D‹L$D‹\$L‹$é1óÿÿ¾B/éšôÿÿH‹\Ø HƒìL *Wj H5pkH LVHÂmA¸ H‹81Àè(ûÿAY¾/AZéSôÿÿH‹Ø HƒìH52kjL ÚVH VH{mA¸ H‹81ÀèË'ûÿA[¾/[é ôÿÿH‹Ï× HƒìH5ìjjL ”VH ¿UH5mA¸ H‹81Àè…'ûÿ]¾/A\éÇóÿÿ¾C/é½óÿÿ©€…¶H‹F`H…À„Hƒ¸„”H‰ÏD‰L$D‰\$L‰T$è1&ûÿL‹T$D‹\$HªTD‹L$H‰$H‹$H…À„¹H‹pH‰ÁH÷†¨€„»H‹†¨©€„¶H‹AHcð‰ÂH9ð…0Hƒ)…×ñÿÿH‹AD‰L$H‰ÏD‰\$‰T$L‰$ÿP0D‹L$D‹\$‹T$L‹$é¤ñÿÿH‹¢Ö HƒìH5¿ijL gUH ’THlA¸ H‹81ÀèX&ûÿA]¾ /A^é™òÿÿH‹[Ö HƒìH5xijL UH KTHÁkA¸ H‹81Àè&ûÿA_¾/XéSòÿÿH‹Ö HƒìH’kjH5)iL ÓTH þSA¸ H‹81ÀèË%ûÿX¾/ZéòÿÿHƒé÷úÿÿH‹ÇÕ HƒìH ÇSjH5ÛhL …TH-kA¸ H‹81Àè}%ûÿY^¾ü.éÀñÿÿHƒéGûÿÿH‹yÕ HƒìH5–hjL >TH iSHßjA¸ H‹81Àè/%ûÿ_¾÷.AXéqñÿÿHƒéjüÿÿHƒ¸˜„âH‰Ïèã!ûÿHŠRH‰ÅéúÿÿH‹Õ HƒìL ÓSjH5hH õRHkjA¸ H‹81Àè»$ûÿAY¾ò.AZéüðÿÿHƒé²ýÿÿH‹µÔ L‹FH5ÊdH‰ÑL‰L$L‰$H‹81Àè|$ûÿL‹L$L‹$Iƒ)…×ñÿÿI‹AL‰ÏÿP0L‹$éÄñÿÿHƒ¸˜„ÜH‰ÏL‰$è!ûÿHÃQI‰ÁL‹$éçùÿÿè”"ûÿH…À…kôÿÿH‹,Ô H5 QH‹8è!ûÿéPôÿÿH‹Ô L‹FH5&dH‰ÑL‰\$D‰L$L‰$H‹81ÀèÓ#ûÿL‹\$L‹$D‹L$Iƒ+…ûôÿÿI‹CL‰ßÿP0L‹$D‹L$éãôÿÿHƒ¸˜„%H‰ÏD‰L$L‰$èd ûÿH QI‰ÃD‹L$L‹$éœúÿÿL‰$èÓ!ûÿH…ÀL‹$…ÄðÿÿH‹gÓ H5ÛPH‹8è@ ûÿL‹$é¥ðÿÿH‹HÓ L‹FH5]cH‰ÑD‰L$ D‰\$L‰T$H‹81Àè #ûÿH‹<$L‹T$D‹\$D‹L$ H‹H‰D$HƒèH…ÀH‰…`÷ÿÿH‹GD‰L$D‰\$L‰T$ÿP0L‹T$D‹\$D‹L$é6÷ÿÿHƒ¸˜„UH‰ÏD‰L$D‰\$L‰T$èoûÿHPH‰$D‹L$D‹\$L‹T$éYûÿÿD‰L$L‰$èÒ ûÿH…ÀL‹$D‹L$…óÿÿH‹aÒ H5ÕOH‹8è:ûÿL‹$D‹L$élóÿÿH‰ÏH‰ $è  ûÿHcЉÅH‹ $H9Єs÷ÿÿHƒÀuès ûÿH…ÀH‹ $uH‹;Ò H5TbH‰ $H‹8èàûÿH‹ $Hƒ)…"òÿÿƒÍÿé9÷ÿÿ©„dH‹AHPHƒúw…Hî[HcHÐÿà‹i÷Ýéüöÿÿ‹AHÁàH‰Â‹AH ÐH÷ØHcЉÅH9ЄÛöÿÿéwÿÿÿ‹iéÎöÿÿ‹AHÁàH‰Â‹AH ÐHcЉÅH9Є°öÿÿéLÿÿÿH‹1íHƒèH…ÀH‰…¢ëÿÿé›öÿÿ©„3H‹AHPHƒú‡¿H`[HcHÐÿàD‹IA÷Ùé÷öÿÿ‹AHÁàH‰Â‹AH ÐH÷ØHcÐA‰ÁH9ЄÕöÿÿH‹Ñ H5+aH‰L$L‰$H‹8è²ûÿH‹L$L‹$Hƒ)… îÿÿAƒÉÿé¤öÿÿ‹AHÁàH‰Â‹AH ÐHcÐA‰ÁH9Є{öÿÿë¤H‹E1ÉHƒèH…ÀH‰… ëÿÿéhöÿÿD‹IéUöÿÿD‰L$D‰\$L‰$è®ûÿH…ÀL‹$D‹\$D‹L$…©ôÿÿH5³MH‹1Ð é€ôÿÿ©„ÈH‹AHPHƒú‡+H\ZHcHÐÿàD‹YA÷ÛéQ÷ÿÿ‹AHÁàH‰Â‹AH ÐH÷ØHcÐA‰ÃH9Є/÷ÿÿH‹úÏ H5`D‰L$H‰L$L‰$H‹8è•ûÿH‹L$L‹$D‹L$Hƒ)…½ðÿÿAƒËÿéôöÿÿD‹Yéáöÿÿ‹AHÁàH‰Â‹AH ÐHcÐA‰ÃH9ЄÂöÿÿë‘H‹E1ÛHƒèH…ÀH‰…êÿÿé¯öÿÿèúûÿ©„©H‹AHPHƒú‡H†YHcHÐÿàL;¦Ï „`êÿÿL;!Ï „SêÿÿéƒðÿÿL;‡Ï „ZêÿÿL;Ï „Mêÿÿé¤ðÿÿ‹AHÁàH‰Â‹AH ÐH÷ØHcð‰ÂH9ð„Ð÷ÿÿH‹ßÎ H5ø^D‰L$D‰\$H‰L$L‰$H‹8èuûÿH‹L$L‹$D‹\$D‹L$Hƒ)…ÚòÿÿƒÊÿéŒ÷ÿÿH‰ÏL‰T$H‰ $è¿ûÿHcÐA‰ÁH‹ $H9ÐL‹T$„+ôÿÿHƒÀ…LýÿÿH‰L$L‰$èûÿH…ÀL‹$H‹L$„,ýÿÿHƒ)…aëÿÿéOýÿÿH‰ÏL‰T$H‰ $è½ûÿH‹ $A‰ÁL‹T$éÐóÿÿH‰ÏD‰L$L‰T$H‰ $è6ûÿHcÐA‰ÃH‹ $H9ÐL‹T$D‹L$„õÿÿHƒÀ…ÖýÿÿH‰L$L‰$èñûÿH…ÀL‹$H‹L$D‹L$„±ýÿÿHƒ)… îÿÿéÞýÿÿH‰ÏH‰ $è/ûÿH‹ $‰Åé©òÿÿ‹Q÷Úélöÿÿ‹Qédöÿÿ‹AHÁàH‰Â‹AH ÐHcð‰ÂH9ð„FöÿÿéqþÿÿH‹1ÒHƒèH…ÀH‰…èÿÿé1öÿÿH‰ÏD‰L$D‰\$L‰T$H‰ $èZûÿHcð‰ÂH‹ $H9ðL‹T$D‹\$D‹L$„ëõÿÿHƒÀ…þÿÿH‰L$L‰$èûÿH…ÀL‹$H‹L$D‹\$D‹L$„çýÿÿHƒ)…ýðÿÿéþÿÿH‰ÏD‰L$D‰\$L‰T$H‰ $è;ŒûÿH‹ $‰ÂL‹T$D‹\$D‹L$ésõÿÿH‰ÏD‰L$L‰T$H‰ $è ŒûÿH‹ $A‰ÃL‹T$D‹L$é‹óÿÿL‰ééèÿÿf.„AWAVAUATUSH‰óHìˆdH‹%(H‰D$x1ÀH…ÒHÇD$PHÇD$XHÇD$`HÇD$hHÇD$p…V H‹NHƒù…H‹F H‹nH‰$H‹F(H‰D$H‹F0H‰D$H‹F8H‰D$H;-ÊË tH‹EH‹EÌ H9Ø…ô H‹<$HÇD$0HÇD$8HÇD$@HÇD$HèçûÿHƒøÿH‰Ã„* H‹|$èÐûÿHƒøÿI‰Ä„‹ H‹|$è¹ûÿHƒøÿ„ I¯ÜH‰ßH¯øèûÿH…ÀI‰ÄH‰D$0„nH‹¿ö H‹=Xù H‰Þè˜ûÿH…ÀI‰Æ„l HƒH‰D$8L‰öL‰çèûÿH…ÀI‰ÅH‰D$@„w Iƒ,$„Iƒ.HÇD$0„ùò)aè ûÿH…ÀH‰ÃH‰D$8„ë H‹¤Ê H‰ÆL‰ïèùûÿH…ÀI‰ÄH‰D$0„è Iƒm„ Hƒ+HÇD$@„úL‰çèûÿH…ÀH‰ÃH‰D$8„Ñ Iƒ,$„f¿ HÇD$0èƒûÿH…ÀI‰ÄH‰D$@„º ºH‰ÆH‰ßèRûÿH…ÀI‰Æ„Þ Iƒ,$„+L;5 Ê HÇD$@”ÀL;5AÉ ”ÂÂu L;5ÓÉ …D¶àI‹HPÿH…ÒI‰„6 E…ä„= H‹H‰\$0I‰ÜHƒÀHƒèH…ÀH‰„n L‰çHÇD$8èm‹ûÿƒøÿ‰D$,„€ Iƒ,$„µ H‹$H‹âÉ HÇD$0H‹@H9Ø„ì H;½È „· H‹@hH…À„: H‹@H…À„- ¾H‹<$ÿÐI‰ÅM…íL‰l$0„a H‹$H‹@H9Ø„P H;iÈ „Û H‹@hH…À„† H‹@H…À„y 1öH‹<$ÿÐI‰ÄM…äL‰d$8„` L‰æL‰ïèÕûÿH…ÀI‰Æ„ Iƒm„þ Iƒ,$HÇD$0„Ú L‹-ëÇ M9nHÇD$8„ˆ L‰÷èØûÿòD$ òL$ f. |^z„4Iƒ.„¢ H‹D$H‹@H9Ø„P H;™Ç „[ H‹@hH…À„Þ H‹@H…À„Ñ ¾H‹|$ÿÐI‰ÆM…ö„!H‹D$H‹@H9Ø„÷ H;HÇ „¢ H‹@hH…À„E H‹@H…À„8 1öH‹|$ÿÐI‰ÇM…ÿL‰|$8„ð L‰þL‰÷è³ûÿH…ÀI‰ÄH‰D$0„Iƒ.„P Iƒ/„^ M9l$HÇD$8„ L‰çèÂûÿf.r]z„;Iƒ,$„¿ H‹D$HÇD$0H‹@H9Ø„, H;…Æ „ H‹@hH…À„âH‹@H…À„Õ¾H‹|$ÿÐI‰ÇM…ÿL‰|$0„H‹D$H‹@H9Ø„' H;/Æ „ H‹@hH…À„K H‹@H…À„> 1öH‹|$ÿÐI‰ÄM…äL‰d$8„L‰æL‰ÿèšûÿH…ÀI‰Æ„Iƒ/„ä Iƒ,$HÇD$0„À M9nHÇD$8„} L‰÷è¥ûÿf.U\z„0Iƒ.„k D‹D$,H‹L$H‰ïH‹T$H‹4$òD$ èúwüÿH…ÀI‰Æ„aH‹@H9Ø„H;JÅ „tHD$8L‰÷H‰D$PHD$0H‰D$XHD$@H‰D$`HD$HH‰D$hèÔûÿH…ÀI‰Ç„ÞIƒ.„vI‹GE1äL‹¨àL‰ÿAÿÕH…À„õJ‹täPIƒÄIƒüH‰ußL‰ÿAÿÕH…À…¬è+Zûÿ…Àˆ±Iƒ/„^L‹d$0L‹l$8€I‹EH9Ø„‹L;-Å „~H‹HH‹«Ä HECH55B½@E1ÿE1öH‹81ÀèpûÿÇ$f„M…ät Iƒ,$„ðH‹\$8H…Û…¢E1íéõf.„H‹5¹ï L‰çIƒíèýûÿH…ÀH‰D$P…?H‹KH‹Ä HƒìHÃBQH5.WL ØBH BA¸H‹81ÀèÐûÿXZ¾¿H bPH=ƒYºüèácûÿ1ÀH‹L$xdH3 %(…LHĈ[]A\A]A^A_Ãf„I‹D$L‰çÿP0éŠùÿÿI‹D$L‰çÿP0éÅùÿÿ½ Ç$þE1öE1ífDE1ÿH‹|$@H…ÿt Hƒ/„¡M…öt Iƒ.„¢H‹|$HH…ÿtHƒ/tbM…ÿtIƒ/tg‹$H OH=¾X‰îècûÿM…ítIƒmu I‹EL‰ïÿP0H rOH=“Xºü¾Úèìbûÿ1ÀéÿÿÿDH‹GÿP0ë•€I‹GL‰ÿÿP0ë@H‹GÿP0éSÿÿÿ@I‹FL‰÷ÿP0éOÿÿÿI‹FL‰÷ÿP0éø÷ÿÿI‹D$L‰çÿP0éÔ÷ÿÿH‹nHƒý‡KHÏLI‰ÔHc¨HÐÿà€H‹F8H‰D$pH‹C0H‰D$hH‹C(H‰D$`H‹C H‰D$XH‹CH‰D$PL‰çè£ ûÿHƒýI‰Å‡šH‹LHc¨HÐÿàfDH‹5©ë L‰çè¡ûÿH…ÀH‰D$X„“ IƒíH‹5Pë L‰çè€ûÿH…ÀH‰D$`„Ú IƒíH‹5çê L‰çè_ûÿH…ÀH‰D$h„ IƒíH‹5æí L‰çè>ûÿH…ÀH‰D$p„| IƒíM…íüH‹D$XH‹l$PH‰$H‹D$`H‰D$H‹D$hH‰D$H‹D$pH‰D$é¡õÿÿfH‹CH‰ßÿP0é÷öÿÿI‹EL‰ïÿP0éÔöÿÿ½Ç$þE1öE1íé‘ýÿÿf„L‰÷è¸ûÿ…ÀA‰Ä‰T÷ÿÿ½¶„E1ÿÇ$þfDH‹E1íHƒèH…ÀH‰…EýÿÿH‹CH‰ßÿP0é6ýÿÿ½žÇ$þE1öE1íéýÿÿH;1Á „ L‹@H‹`À H”>H‹KH5ÖRH‹81Àè,ûÿ1ÀévüÿÿDI‹VL‰÷ÿR0é»öÿÿ¿ è¶ûÿH…ÀI‰Æ„kH‰D$0M‰ôH‹é¬öÿÿf.„½ŸÇ$þE1öE1íéüÿÿf„H‹CH‰ßÿP0éƒöÿÿ¿èÖ ûÿH…ÀI‰Ä„ H‹|$H‰Æè­ ûÿI‹ $I‰ÇHqÿH…öI‰4$…ÿøÿÿI‹D$L‰çÿP0éïøÿÿDI‹D$L‰çÿP0éûÿÿI‹D$L‰çÿP0é;öÿÿH‰ßèhtûÿH…ÀI‰ÆH‰D$8…„ôÿÿ½¢Ç$þE1ÿE1öéµúÿÿL‹d$0½¤Ç$þE1ÿE1öé”úÿÿ@I‹VHƒú…ÙH;»¾ …dM‹VM‹f I‹V(I‹F0L‰T$8L‰d$0H‰T$@H‰D$HIƒM‰ÕIƒ$HƒHƒI‹HƒèH…ÀI‰…ÒùÿÿI‹FL‰÷ÿP0éÃùÿÿòAVòT$ éuöÿÿ€½¨Ç$þE1öE1íéûÿÿf„I‹D$L‰çÿP0éöÿÿI‹EL‰ïÿP0éóõÿÿL‰çèh€ûÿƒøÿ‰Ã„ÈIƒ,$„ŠL‹t$@HÇD$0L‰÷è<€ûÿƒøÿA‰Ä„Iƒ.„nL‹t$HHÇD$@L‰÷è€ûÿƒøÿA‰Ç„Iƒ.„®HÇD$HHÇD$8H‰ïÿ5ï½ jAWATSAUD‹L$\L‹D$HH‹L$@H‹T$8H‹t$0èÈ ýÿHƒÄ0H…ÀI‰Æ„ÀIƒm„G L‰ðé–ùÿÿD½ªE1öéƒüÿÿI‹FL‰÷ÿP0éOõÿÿ½®Ç$þéôýÿÿ€½²E1öéKüÿÿH‹$H‹@H‹PHƒI‰ÕL‰l$0é:ôÿÿòAD$éêõÿÿ@½´éüÿÿfDI‹FL‰÷ÿP0é¡õÿÿf„I‹GL‰ÿÿP0é“õÿÿ¿è¶ ûÿH…ÀI‰Ä„$H‹<$H‰ÆèŽ ûÿI‹ $I‰ÅHqÿH…öI‰4$…§óÿÿI‹D$L‰çÿP0é—óÿÿfDH‹$H‹@H‹HƒI‰ÌL‰d$8éÔóÿÿ@H‹$H‹P HƒI‰Õé'ÿÿÿ@I‹D$L‰çÿP0é1õÿÿ„1ÿè ûÿH…ÀI‰Æ„ÜH‹<$H‰ÆèñûÿI‹I‰ÄHqÿH…öI‰6…]óÿÿI‹FL‰÷ÿP0éNóÿÿ@H‹$H‹HHƒI‰Ìéfÿÿÿ@èû ûÿH…À„ròÿÿÇ$þ½ÂéVüÿÿH‹D$H‹@L‹HIƒM‰ÎéÖóÿÿ€òAFé€õÿÿDH‹\$8½ÍE1öÇ$ÿE1ÿéÙöÿÿ@I‹D$L‰çÿP0é0õÿÿI‹GL‰ÿÿP0é õÿÿHÇD$8„L‹d$0½ÏE1öM…ä„ÅÇ$ÿE1ÿépöÿÿ¿èîûÿH…ÀI‰Ä„H‹|$H‰ÆèÅûÿI‹ $I‰ÆHƒéH…ÉI‰ $…óÿÿI‹D$L‰çÿP0éóòÿÿDH‹D$H‹@H‹HƒI‰×L‰|$8é-óÿÿH‹D$L‹H IƒM‰ÎéÂòÿÿI‹FL‰÷ÿP0é†ôÿÿL‹d$0½ÑÇ$ÿE1ÿé·õÿÿ€1ÿè9ûÿH…ÀI‰Ä„¶H‹|$H‰ÆèûÿI‹ $I‰ÇHqÿH…öI‰4$…œòÿÿI‹D$L‰çÿP0éŒòÿÿ„H‹D$H‹PHƒI‰×éFÿÿÿèûÿH…À„¾ñÿÿ½ÕÇ$ÿE1íé>öÿÿfDH‹D$H‹@H‹PHƒI‰×L‰|$0éúòÿÿfH‹\$8Ç$ÿ½ØE1ÿéüôÿÿHÇD$8L‹d$0½ÚéLþÿÿH‹D$H‹@H‹HƒI‰ÌL‰d$8éýòÿÿH‹D$H‹P HƒI‰×ë”H‹\$8½Üé¾ýÿÿ1ÿèûÿH…ÀI‰Æ„ÇH‹|$H‰ÆèñûÿI‹I‰ÄHqÿH…öI‰6…˜òÿÿI‹FL‰÷ÿP0é‰òÿÿH‹D$H‹HHƒI‰Ìé{ÿÿÿèûÿH…À„·ñÿÿ½àÇ$ÿé]ùÿÿI‹D$L‰çÿP0éfúÿÿI‹FL‰÷ÿP0éƒúÿÿH‹\$8½ãE1öéýÿÿHT$PL7H5äÅ H‰éL‰çè9dûÿ…À‰Þöÿÿ¾¬éNôÿÿHÇD$8L‹d$0½åE1öéýÿÿI‹FL‰÷ÿP0éCúÿÿL‹d$0½çÇ$ÿE1ÿétóÿÿH‹å· HƒìH å5jH5ùJL £6Hx6A¸H‹81Àè›ûÿY^¾¨éÆóÿÿ½¼éÕöÿÿèðûÿH…À„Âñÿÿ½ëÇ$ÿE1íéôÿÿH‹t· HƒìH5‘JjL 96H d5H6A¸H‹81Àè*ûÿ_¾£AXéTóÿÿ½ÿÇ$E1íéÁóÿÿ|H…ÒˆÚHä5H D4HƒúH5iH½ HEÈH‹á¶ E1íH‹81ÀèÄûÿÇ$épóÿÿH‹ɶ HƒìL —5jH5ÝIH ¹4H\5A¸H‹81ÀèûÿAY¾žAZé¨òÿÿI‹FL‹L‹`H‹PH‹@L‰T$8L‰d$0H‰T$@H‰D$Hé”÷ÿÿè°ûÿH…À„*øÿÿ½AÇ$E1ÿE1öéÀñÿÿH‹1¶ HƒìH5NIjL ö4H !4HÄ4A¸H‹81ÀèçûÿA[¾™[éòÿÿèEûÿH…À„ì÷ÿÿ½CL‰ëE1öE1ÿÇ$éõÿÿèûÿH…À„ð÷ÿÿ½EëÖD½UÇ$é?òÿÿH‹µ H5yBº½ E1íH‹81ÀèbûÿÇ$éòÿÿ½ÍÇ$ÿE1öE1íé÷ñÿÿH;pµ „ÞéÿÿH;Ûµ „ÑéÿÿéÍôÿÿ½ Ç$E1íéÄñÿÿIƒ/„¿èMJûÿ…À…™Hß3H ?2IƒüH5dFL‰â½=HEÈH‹Ù´ E1ÿE1öH‹81Àè¹ûÿL‹d$0Ç$éHðÿÿI‹FL‰÷ÿP0é{ïÿÿ½ØÇ$ÿE1öE1íé:ñÿÿ½ãÇ$ÿE1öE1íé#ñÿÿI‹GL‰ÿÿP0é“ïÿÿ½=E1ÿE1öë–èûÿ½,ëŠI‹GL‰ÿÿP0é2ÿÿÿ¾H‰ÇèuBûÿéGïÿÿ½5E1öé\ÿÿÿE1íÇ$ÿé¾ðÿÿI‹EL‰ïÿP0éªöÿÿH‰ééçïÿÿDf.„AWAVH¿2AUATA¸US¹¾HìHH\$PHl$`dH‹%(H‰„$81ÀH‰ßè#ûÿè^ûÿHw2H‰Á¾1ÀH‰ïèûÿ¶D$`8D$P„fLd$pLZIHsII‰éH‰Ù¾ÈL‰ç1ÀèÎûÿ1ÿºL‰æèŸÿúÿ…À‰7HÀ?ÇD$«<ÇD$H‰D$1ÉE1ä1Ò1Û1íE1íE1öE1ÿH…ít Hƒm„GH…Ût Hƒ+„ˆH…Òt Hƒ*„¡M…ät Iƒ,$„±H…Ét Hƒ)„ÂM…ÿt Iƒ/„#M…öt Iƒ.„,M…ít Iƒm„ÌH‹=á H…ÿ„Hƒ=üà t H‹L$‹T$H=ÂH‹t$èyRûÿH‹=âà Hƒ/uH‹GÿP0HÇÊà H‹„$8dH3%(…˜HÄH[]A\A]A^A_öD$b8D$R…‹þÿÿ1ÿè9ûÿH…ÀH‰gà „1H=*/1öè[ýúÿH…ÀH‰Aà „ÃH5Ø H= 01É1ÒA¸õèÎýúÿH…ÀH‰4à „VHƒH‰Çè¢ûÿH…ÀH‰à „¢HƒH=c0è²ýúÿH…ÀH‰èß „ªH‹=ëß H5L0H‰Âèœýúÿ…ÀˆdH‹-Á H‹² H…íH‰ÌØ „¶HÿÀ ë/DH‹{è?þúÿH‰EH‹Hƒ8„^HƒÃ(H‹+H…í„~€{ …T€{"uÆH‹CH‹{HpÿèMüúÿH‰Eë¼€I‹EL‰ïÿP0é%þÿÿH‹EH‰T$(H‰ïH‰L$ ÿP0H‹T$(H‹L$ é–ýÿÿDI‹GL‰ÿÿP0éÎýÿÿf„I‹FL‰÷ÿP0éÅýÿÿH‹CH‰T$(H‰ßH‰L$ ÿP0H‹T$(H‹L$ éUýÿÿDH‹BH‰L$ H‰×ÿP0H‹L$ éFýÿÿ€I‹D$H‰L$ L‰çÿP0H‹L$ é5ýÿÿfDH‹AH‰ÏÿP0é/ýÿÿf„Hi<ÇD$Ñ<ÇD$H‰D$é¤üÿÿ€HA<ÇD$¬<ÇD$H‰D$é|üÿÿ€H‹CH‹{1ÒHpÿèÝúúÿH‰Eéiþÿÿ@ò(FèýúÿH…ÀH‰¡Ø „{1ÿèìþúÿH…ÀH‰‚Ø „d¿èÒþúÿH…ÀH‰`Ø „J¿è¸þúÿH…ÀH‰>Ø „0¿èžþúÿH…ÀH‰Ø „¿è„þúÿH…ÀH‰ú× „ü¿2èjþúÿH…ÀH‰Ø× „â¿èèPþúÿH…ÀH‰¶× „È¿¿è6þúÿH…ÀH‰”× „®¿'èþúÿH…ÀH‰r× „”¿€–˜èþúÿH…ÀH‰P× „zHÇÇÿÿÿÿèæýúÿH…ÀH‰,× „^HÇÇþÿÿÿèÊýúÿH…ÀH‰× „BH‹»­ ‹…Àt"H‹öÙ H‹=Ü H5ý,èCúúÿ…ÀˆTH‹=ÔØ èÿbûÿH…ÀH‰ÅÛ „YH‹=¨Ù èãbûÿH…ÀH‰¡Û „=H‹= × èÇbûÿH…ÀH‰}Û „!H‹=hÚ è«bûÿH…À„ H‹=#Ø è–bûÿH…ÀH‰DÛ „ðH‹=7× èzbûÿH…ÀH‰ Û „ÔH‹=ËÚ è^bûÿH…ÀH‰üÚ „¸H‹=¿Ú èBbûÿH…ÀH‰ØÚ „œH‹5Ö 1À¿èŸýúÿH…ÀH‰ÕÕ „ÇH‹5øÕ 1À¿è|ýúÿH…ÀH‰ªÕ „¤H‹5M× 1À¿èYýúÿH…ÀH‰Õ „H‹5zØ 1À¿è6ýúÿH…ÀH‰TÕ „^H‹5OØ 1À¿èýúÿH…ÀH‰)Õ „;H‹5üÙ 1À¿èðüúÿH…ÀH‰þÔ „H‹5éÙ 1À¿èÍüúÿH…ÀH‰ÓÔ „õH‹5¶Ù 1À¿èªüúÿH…ÀH‰¨Ô „ÒH‹5›Ù 1À¿è‡üúÿH…ÀH‰}Ô „¯H‹ ˜× H‹ÑÖ 1ÀH‹5XÖ ¿èVüúÿH…À„…L‹ Ú L‹Ú 1É1Ò¾¿APjÿ5gÖ ÿ5Ø AQAQPAQèøúÿHƒÄ@H…À„@ÿ5‚Ø ÿ5ÔÔ 1Àÿ5Õ ÿ5>Õ ¿ÿ5ÓÔ ÿ5Õ ÿ5GÕ ÿ5Ù× ÿ5Û× ÿ5MÖ ÿ5÷Õ ÿ5Ö ÿ5Ö ÿ5Ø ÿ5WÔ ÿ5™Ô L‹ ÊÔ L‹{Ö H‹ $× H‹5× H‹5n× èyûúÿHƒì€H…À„¤ L‹ =Ù L‹.Ù 1É1Ò¾¿ APj*ÿ5Î× ÿ58× AQAQPAQè4÷úÿHƒÄ@H…À„_ Hƒìÿ5Ö ÿ5ÏÕ ÿ5¡Ô ÿ5£Ô 1Àÿ5£Ô ÿ5¥Ô ¿ÿ5¢Ô ÿ5¤Ô ÿ5¦Ô ÿ5¨Ô ÿ5‚Õ ÿ5´Ó ÿ5æÓ ÿ5(Ô ÿ5²Ó ÿ5äÓ ÿ5&Ô L‹ ßÓ L‹ˆÕ H‹ 9Ö H‹JÖ H‹5ƒÖ ÿ5Õ ÿ5Õ ÿ5Q× ÿ5‹Ô ÿ5•Ô ÿ5GÔ ÿ5Ó ÿ5[Ó è^úúÿHÄÐH…À„† L‹ Ø L‹Ø 1É1Ò¾¿ APjXÿ5 Ô ÿ5Ö AQAQPAQèöúÿHƒÄ@H…À„A H‹5ŠÒ 1À¿èöùúÿH…ÀH‰äÑ „ H‹5gÒ 1À¿èÓùúÿH…ÀH‰¹Ñ „û H‹5DÒ 1À¿è°ùúÿH…ÀH‰ŽÑ „Ø ÿ5‚Ô ÿ5$Ó 1Àÿ5$Ó ÿ5&Ó ¿%ÿ5#Ó ÿ5%Ó ÿ5'Ó ÿ5)Ó ÿ5+Ó ÿ5}Ó ÿ5/Ó ÿ5áÔ ÿ5óÔ ÿ5-Õ ÿ5/Ò ÿ5aÒ ÿ5£Ò L‹ \Ò ÿ5žÕ ÿ5xÔ ÿ5zÔ ÿ5|Ô ÿ5VÕ ÿ5XÕ ÿ5ZÕ ÿ5ÜÑ ÿ5Ò ÿ5PÒ ÿ5ÒÑ ÿ5Ò ÿ5FÒ ÿ5ˆÑ ÿ5ÊÑ L‹«Ó H‹ \Ô H‹mÔ H‹5¦Ô è±øúÿHÄH…À„Ù L‹ rÖ L‹cÖ 1É1Ò¾%¿APh€ÿ5øÑ ÿ5jÔ AQAQPAQèfôúÿHƒÄ@H…À„‘ H5¶%H=—&ºhèÁQûÿH…À„¤ H5”%H=˜&º`è QûÿH…ÀH‰~Õ „¬ H5}&H=p&ºH èxQûÿH…À„Á H5e&H=O&º0èWQûÿH…À„Á H5N&H=.&ºPè6QûÿH…ÀH‰ Õ „É H5.&H=&ºÀèQûÿH…À„Þ H‹=VÒ èÙaûÿH…À„ê H‹5AÒ H‹=JÕ H‰ÂH‰D$èeöúÿ…ÀL‹L$ˆN Iƒ)„Ë H‹=?Ò è’aûÿH…À„ó H‹5*Ò H‹=Õ H‰ÂH‰D$èöúÿ…ÀL‹L$ˆ¾ Iƒ)„ H‹=Ó èKaûÿH…À„ÿ H‹5ûÒ H‹=¼Ô H‰ÂH‰D$è×õúÿ…ÀL‹L$ˆþ Iƒ)„V H‹=ÉÑ èaûÿH…À„ó H‹5´Ñ H‹=uÔ H‰ÂH‰D$èõúÿ…ÀL‹L$ˆ( Iƒ)„w H‹=jÑ è½`ûÿH…ÀH‰Ã„Õ H‹5RÑ H‹=+Ô H‰ÂèKõúÿ…Àˆ) Hƒ+„r H‹=ÚÑ è}`ûÿH…ÀH‰Ã„ H‹5ÂÑ H‹=ëÓ H‰Âè õúÿ…Àˆ° Hƒ+„— H‹=’Ò è=`ûÿH…ÀH‰Ã„í H‹5zÒ H‹=«Ó H‰ÂèËôúÿ…Àˆ Hƒ+„ï H‹ºÐ H={Ì 1öèôðúÿH…ÀH‰Ã„ H‹5ÁÏ H‹=bÓ H‰Âè‚ôúÿ…Àˆà Hƒ+u H‹CH‰ßÿP0H‹«Í H‹5”Ð H‹=-Ó èPôúÿ…Àˆ H‹IÐ H=êË 1öÇzÒ ÇlÒ èoðúÿH…ÀH‰Ã„Ó H‹5„Ñ H‹=ÝÒ H‰Âèýóúÿ…Àˆ Hƒ+„ØH‹ìÏ H=mË 1öè&ðúÿH…ÀH‰Ã„H‹5+Ï H‹=”Ò H‰Âè´óúÿ…ÀˆWHƒ+„>H‹=“Ï è–YûÿH…ÀH‰Å„–H‹5CÍ H‰ÇèÛBûÿH…ÀH‰Ã„kHƒm„ƒ¿èïúÿH…ÀH‰Å„]H‹¿Ì HƒH‹UH‰HƒH‹UH‰BHƒH‹UH‰BH‹%£ H9C„yH‰îH‰ßèaûÿH…ÀI‰Á„:HƒmuH‹EL‰L$H‰ïÿP0L‹L$Hƒ+uH‹CL‰L$H‰ßÿP0L‹L$H‹5hÐ H‹=‘Ñ L‰ÊL‰L$è¬òúÿ…ÀL‹L$ˆÈIƒ)u I‹AL‰ÏÿP0H‹5pË H‹=ÁÐ 1Òè BûÿH…ÀI‰Á„kH‹@H;ƒ¢ „<H;~£ „/L‰ÏL‰L$è#òúÿH…ÀH‰ÃL‹L$„÷H‹@H‹€àH…ÀH‰D$(„ÑHÇD$ÿÿÿÿIƒ)„ªH‰\$Hƒ|$(…óH‹t$H‹ £ H9N…²H‹L$H;N§ H‹FL‹4ÈH‰ÈHƒÀH‰D$IƒH‹5‘Î H‹=‚Ð L‰òè¢ñúÿ…ÀˆB Iƒ.u I‹FL‰÷ÿP0H‹5cÊ H‹=¼Ï 1ÒèAûÿH…ÀI‰Æ„â H‹@H;~¡ „³ H;y¢ „¦ L‰÷è#ñúÿH…ÀI‰Ä„s H‹@H‹€àH…ÀH‰D$0„E HÇD$ ÿÿÿÿIƒ.u I‹FL‰÷ÿP0Hƒ|$0…y H‹¢ I9D$…º H‹L$ I;L$ I‹D$L‹<ÈH‰ÈHƒÀH‰D$ IƒH‹5WÍ H‹=ˆÏ L‰úè¨ðúÿ…Àˆô Iƒ/u I‹GL‰ÿÿP0H‹5aÉ H‹=ÂÎ 1Òè @ûÿH…ÀI‰Ç„— H‹@H;Œ¡ „n H;w  „a L‰ÿè)ðúÿH…ÀH‰Å„8 H‹@H‹€àH…ÀH‰D$8„ IƒÍÿIƒ/„ L‰d$Hƒ|$8…v H‹&¡ H9E…M L;m$ H‹EN‹<èIƒÅIƒH‹5[Ì H‹=¤Î L‰úèÄïúÿ…ÀˆÇIƒ/u I‹GL‰ÿÿP0H‹=…Ì è UûÿH…ÀI‰Ç„pH‹5ýÈ H‰ÇèUìúÿH…ÀI‰Æ„%Iƒ/u I‹GL‰ÿÿP0H‹=²È L‰öè.ûÿH…ÀI‰Ç„ÊIƒ.u I‹FL‰÷ÿP0H‹=×Ë è2UûÿH…ÀI‰Æ„çH‹5—È H‰ÇèçëúÿH…ÀH‰Ã„›Iƒ.u I‹FL‰÷ÿP0H‰ÞL‰ÿèhðúÿH…ÀI‰Æ„CIƒ/u I‹GL‰ÿÿP0Hƒ+u H‹CH‰ßÿP0H‹=EË è¸TûÿH…ÀH‰Ã„Ú H‰ÆL‰÷èðúÿH…ÀI‰Ç„£Iƒ.u I‹FL‰÷ÿP0Hƒ+u H‹CH‰ßÿP0H‹=Ì èiTûÿH…ÀH‰Ã„;H‹=6Ë èQTûÿH…ÀI‰Æ„„H‹=ÞÊ è9TûÿH…À„& H‹=±Ê H‰D$@èTûÿH…ÀH‹t$@„,¿H‰D$Hè’ìúÿH…ÀI‰ÄH‹t$@L‹T$H„ÖH‰p L‰pL‰úL‰P(H‰ÆH‰ßèréúÿ…ÀˆHƒ+u H‹CH‰ßÿP0Iƒ,$u I‹D$L‰çÿP0Iƒ/…ýÿÿI‹GL‰ÿÿP0é~ýÿÿ€ÇD$Ó<ÇD$E1ä1Û1íHJ*E1íE1öE1ÿ1É1ÒH‰D$éœêÿÿH)*ÇD$Ó<ÇD$H‰D$édêÿÿ€èÓëúÿH…À…0ëÿÿH‹ë H5¼3H‹8èDêúÿéëÿÿ€ÇD$Ê<ÇD$E1ä1Û1íékÿÿÿ@ÇD$å<ÇD$E1ä1Û1íéKÿÿÿ@H‘)ÇD$­<ÇD$H‰D$éÌéÿÿ€Hi)ÇD$Ë<ÇD$H‰D$é¤éÿÿ€HA)ÇD$Í<ÇD$H‰D$é|éÿÿH )ÇD$Ø<ÇD$H‰D$é[éÿÿÇD$ã<ÇD$E1ä1Û1íé™þÿÿÇD$=ÇD$E1íE1öE1ÿ1ÉE1ä1Ò1Û1íI‹H5¼(H‰t$HƒèH…ÀI‰…éÿÿI‹AH‰T$(L‰ÏH‰L$ ÿP0H‹T$(H‹L$ éíèÿÿH¾ÇD$ñ<ÇD$ H‰D$é¸èÿÿI‹AL‰ÏÿP0é&õÿÿHxÇD$ò<ÇD$›H‰D$éˆèÿÿÇD$=ÇD$éDÿÿÿHBÇD$ó<ÇD$¨H‰D$éRèÿÿH!ÇD$ô<ÇD$¬H‰D$é1èÿÿI‹AL‰ÏÿP0éæôÿÿHñÇD$õ<ÇD$µH‰D$éèÿÿÇD$=ÇD$é½þÿÿH»ÇD$ö<ÇD$]H‰D$éËçÿÿE1ä1Û1íÇD$=H`'ÇD$1É1ÒH‰D$éªçÿÿI‹AL‰ÏÿP0é›ôÿÿÇD$(=ÇD$éLþÿÿH'E1ä1Û1íÇD$=ÇD$H‰D$1É1ÒéZçÿÿI‰ÙÇD$4=ÇD$éþÿÿI‹AL‰ÏÿP0ézôÿÿHÌ&E1ä1Û1íÇD$=ÇD$H‰D$1É1ÒéçÿÿH‹CH‰ßÿP0éôÿÿH‘&E1ä1Û1íÇD$&=ÇD$H‰D$1É1ÒéÌæÿÿHe&E1ä1íÇD$2=ÇD$1ÉH‰D$1Ò颿ÿÿH‹CH‰ßÿP0éZôÿÿI‰ÙÇD$@=ÇD$éAýÿÿèFæúÿI‰ÙÇD$L=ÇD$é$ýÿÿH÷%E1ä1íÇD$>=ÇD$1ÉH‰D$1Òé4æÿÿHÍ%E1ä1íÇD$J=ÇD$1ÉH‰D$1Òé æÿÿH‹CH‰ßÿP0éôÿÿH”%ÇD$b=ÇD$"H‰D$éÏåÿÿI‰ÙÇD$X=ÇD$éˆüÿÿH[%E1ä1íÇD$V=ÇD$1ÉH‰D$1Òé˜åÿÿI‰ÙÇD$=ÇD$*éFüÿÿH%E1ä1íÇD$}=ÇD$*1ÉH‰D$1ÒéVåÿÿH‰ÙM‰ùL‹d$L‰òI‰÷I‰ÅM‰ÖH‹\$ÇD$„>ÇD$|éÿûÿÿH‰ÙM‰ùL‹d$L‰òI‰÷I‰ÆH‹\$ÇD$‚>E1íÇD$|éÎûÿÿH‰ÙM‰ùM‰åH‹\$L‹d$E1öÇD$>ÇD$|E1ÿ1ÒéžûÿÿH]$L‹d$H‹\$L‰òÇD$j>ÇD$|H‰D$1Éé”äÿÿL‹d$H‹\$M‰ùH‰ÂÇD$g>ÇD$|E1íE1öE1ÿ1Éé>ûÿÿHý#L‹d$H‹\$ÇD$e>ÇD$|1ÉH‰D$1Òé5äÿÿL‹d$H‹\$M‰ùÇD$[>ÇD${E1íE1öE1ÿ1É1ÒéàúÿÿL‹d$Hƒm…±õÿÿH‹EH‰ïÿP0é¢õÿÿL;m}ÛN‹|íIƒÅIƒéµöÿÿH‰ïH‹D$8ÿÐH…ÀI‰Ç…ŸöÿÿL‹d$èåúÿH…Àt©H‹K— H‹2H9ðuè¦äúÿë“I‹GL‰ÿÿP0L‰d$é/öÿÿH‰Çèhãúÿ…ÀuÙH‹\$ÇD$U>ÇD${驸ÿÿM‰ùH‹\$ÇD$9>é%ÿÿÿM‰ùH‹\$ÇD$7>éÿÿÿIƒL‰ýHÇD$8E1íé¸õÿÿH±"H‹\$1íÇD$1>ÇD${1ÉH‰D$1ÒéìâÿÿH‹\$M‰ùÇD$'>ÇD$zE1íE1öE1ÿ1É1Ò1íéšùÿÿL‰çH‹D$0ÿÐH…ÀI‰Ç…¬ôÿÿèäúÿH…ÀtH‹A– H‹2H9ð…½è˜ãúÿIƒ,$…<óÿÿI‹D$L‰çÿP0é,óÿÿH‹D$ I;D$}ÙM‹|ÄHƒÀH‰D$ IƒéLôÿÿH‰ÙM‰ùL‹d$L‰òI‰ÇH‹\$ÇD$€>ÇD$|E1íE1öéóøÿÿM‰ñH‹\$ÇD$>é(ÿÿÿM‰ñH‹\$1íÇD$>ÇD$zéÍýÿÿIƒM‰ôHÇD$0HÇD$ éróÿÿH`!H‹\$E1ä1íÇD$ý=ÇD$zH‰D$1É1Òé˜áÿÿH‹\$M‰ñÇD$ó=ÇD$yE1íE1öE1ÿ1ÉE1ä1Ò1íéCøÿÿH‹\$Hƒ+u H‹CH‰ßÿP0H‹À H=v» 1öèOàúÿH…ÀH‰Ã„œH‹5\¾ H‹=½Â H‰ÂèÝãúÿ…ÀxXHƒ+u H‹CH‰ßÿP0è4ãúÿH…ÀH‰Ã„$H‹5¡¾ H‹=‚ H‰Âè¢ãúÿ…ÀˆÜHƒ+…¦áÿÿH‹CH‰ßÿP0é—áÿÿHZ ÇD$»>ÇD$€1ÉE1ä1ÒH‰D$1íé—àÿÿH0 E1ä1íÇD$¹>ÇD$€1ÉH‰D$1ÒémàÿÿH‹L$H‹D$H;AðþÿÿL‹tÁHƒÀH‰D$IƒéJñÿÿH‹|$H‹D$(ÿÐH…ÀI‰Æ…2ñÿÿH‹\$èáúÿH…À„³þÿÿH‹¸“ H‹2H9ðuFèáúÿéšþÿÿH—ÇD$Å>ÇD$1ÉE1ä1ÒH‰D$1íéÔßÿÿE1ä1íÇD$Ã>éû÷ÿÿH‰Çèªßúÿ…Àu®E1ä1íÇD$í=ÇD$yéëôÿÿI‹AL‰ÏÿP0H‰\$éGðÿÿÇD$Ñ=éóýÿÿE1ä1íÇD$Ï=ÇD$yéIûÿÿIƒL‰ËHÇD$(HÇD$éóïÿÿHÜE1ä1Û1íÇD$É=ÇD$yH‰D$1É1ÒéßÿÿÇD$¿=ÇD$xéÈõÿÿE1äÇD$°=HÇD$x1É1ÒH‰D$éÚÞÿÿH‹SH…Ò„zîÿÿL‹kHƒIƒEHƒ+uH‹CH‰T$H‰ßÿP0H‹T$¿H‰T$èçßúÿH…ÀI‰ÄH‹T$„vI‰T$I‰l$ 1ÒL‰æL‰ïè¿0ûÿH…ÀI‰Á„AI‹$L‰ëHƒèH…ÀI‰$…*îÿÿI‹D$L‰L$L‰çÿP0L‹L$éîÿÿE1äÇD$š=é*ÿÿÿH‹EH‰ïÿP0éníÿÿH‰ÁH¨L‹d$H‹\$L‰òÇD$v>H‰D$ÇD$|éáÝÿÿH‰ÙM‰ùL‹d$H‰ÂH‹\$ÇD$r>ÇD$|E1íE1öE1ÿéŠôÿÿM‰ùL‹d$L‰òH‰ÁH‹\$ÇD$o>ÇD$|E1íE1öE1ÿéYôÿÿM‰ùL‹d$H‰ÂH‹\$ÇD$m>éæøÿÿM‰ùL‹d$H‰ÁH‹\$ÇD$|>E1íÇD$|E1öE1ÿ1Òé ôÿÿHËH‰ÙL‹d$H‹\$L‰òÇD$x>H‰D$ÇD$|éÝÿÿH‰ÙM‰ùL‹d$H‰ÂH‹\$ÇD$~>ÇD$|E1íE1öE1ÿéªóÿÿH‰Çè¸Üúÿ…À…3úÿÿH‹\$1íÇD$!>ÇD$zéóñÿÿH‹CH‰ßÿP0é³ëÿÿI‰ÙÇD$‹=ÇD$XéCóÿÿHE1ä1íÇD$‰=ÇD$X1ÉH‰D$1ÒéSÜÿÿH‹CH‰ßÿP0éëÿÿE1äÇD$—=é=ýÿÿE1ä1ÛÇD$•=é+ýÿÿL‰ë1íÇD$º=éýÿÿH©L‰ëÇD$´=ÇD$x1ÉH‰D$éêÛÿÿf.„ò¸%f(áòœjfTãf.Ô‡îf(èfTëf.Õ‡¼ATUI‰üSH‰õH‰ÓHƒì@òkjf.ê‡Af.â‡ÿf(àòSjò\áfTÜf.Ó‡±f(Øò^Üf.ÛŠQòA $òEò\ÁòYÃòXÁòòAL$òEò\ÁòYÃòXÁòCòAD$òMò\ÈòYÙòXØò[HƒÄ@[]A\ÃòòòGòBòGòBÃòòòFòBòFòBÃòA$òòAD$òCòAD$òCHƒÄ@[]A\ÃDH=s$òL$(òD$)$èdÙúÿòL$(òD$f($éÏþÿÿfDH=1$òL$8òD$0òT$()\$ò$$è ÙúÿòL$8òD$0òT$(f(\$ò$$éuþÿÿf(ÑH5k$f(È¿f(ĸò$è÷Ûúÿò$é~þÿÿf.„ATU1íSfD(ÀfD(ÉH‰ûHìPfD(ÒòD$PfD(Ûò„$˜òL$fD(äòŒ$ˆòT$fD(íò”$pò\$òd$ òœ$xò¤$€òl$(ò¬$dH‹%(H‰„$H1ÀòT$`òŒ$˜ò”$¨òŒ$°ò”$Àòt$0ò|$8òd$hòl$pò\$xò¤$€ò¬$ˆòœ$ò¬$ ò¬$¸ò¤$Èò„$Ðò„$èò„$ò„$fïÀò”$fA(ÐòŒ$øfA.ÀòŒ$ò *gòœ$Ø@—Åò¤$à‰èòœ$ðƒÈfA.ÁGè‰èƒÈfA.ÂGè‰èƒÈfA.ÃGè‰èƒÈfA.ÄGè‰èƒÈ fA.ÅGè‰èƒÈ@f.ÆGè‰è €f.Çò¶!fTÐGèf.чòT$fTÐf.чÁòT$fTÐf.ч}òT$fTÐf.ч9òT$ fTÐf.чõòT$(fTÐf.ч±òT$0fTÐf.чuòt$8fTÆf.Á‡IH‹ŠŠ HcíD‹$¨1ÀE…ä„ AöÄ…¶AöÄ…ØAöÄ…þAöÄ…'AöÄ…IAöÄ …rAöÄ@…›AöÄ€…ÄA÷Ä…íA÷Ä…A÷Ä…5Aä… HÁå1ÀE1ÀH‰ïH=q‰ I‰úAƒ:ÿtjLKHD‰ÁHcÑHƒÃƒÁH—Hc2H4vò„ô òCèHc2H4vò„ô(òCðHcHRò„Ô0òCøL9Ëu®AƒÀƒÀIƒÂ AƒøuH‹Œ$HdH3 %(…ÆHÄP[]A\ÃH=O èäÔúÿé¦þÿÿ€H=) òL$X)D$@èÁÔúÿòL$Xf(D$@écþÿÿH=óòL$X)D$@è™ÔúÿòL$Xf(D$@é'þÿÿ„H=µòL$X)D$@èiÔúÿòL$Xf(D$@éãýÿÿ„H=wòL$X)D$@è9ÔúÿòL$Xf(D$@éŸýÿÿ„H=9òL$X)D$@è ÔúÿòL$Xf(D$@é[ýÿÿ„H=ûòL$X)D$@èÙÓúÿòL$Xf(D$@éýÿÿ„H=½òL$X)D$@è©ÓúÿòL$Xf(D$@éÓüÿÿ„H”$(H´$H¼$¨òL$8òD$è‡øÿÿéÆýÿÿfH|$`H”$ òL$HwòD$Pè^øÿÿAöÄ„(ýÿÿH”$8H´$H|$xòL$òD$è.øÿÿAöÄ„ýÿÿH”$PH´$¨H¼$òL$òD$èû÷ÿÿAöÄ„ÙüÿÿHt$`H”$hòL$PH~HòD$èÏ÷ÿÿAöÄ„·üÿÿH”$€H´$ØH¼$ÀòL$(òD$ èœ÷ÿÿAöÄ „ŽüÿÿH”$˜H´$ðH¼$ØòL$0òD$(èi÷ÿÿAöÄ@„eüÿÿH”$°H´$H¼$ðòL$8òD$0è6÷ÿÿAöÄ€„<üÿÿH”$ÈH´$ÀH¼$òL$ òD$8è÷ÿÿA÷Ä„üÿÿH|$`H”$àòL$ Hw`òD$PèÔöÿÿA÷Ä„ñûÿÿH”$øH´$ØH|$xòL$(òD$è¡öÿÿA÷Ä„ËûÿÿH”$H´$ðH¼$òL$0òD$èköÿÿAä„¢ûÿÿé©ýÿÿèÒúÿ@òWòoò'f(òf(Ýf(Ìò\vò\^ò\ò\"ò\Rò\jf(Æf(ûòYÜòYúòYÅòYéòYÑòYæò\Çò\Ýò\ÔòYÀòYÛf(ÊòXØòYÊòXËòQÁf.ÀzÃf(ÁHƒìèûÔúÿHƒÄÃfDònòVòbf(Åòròf(úòòYÄòYþòYáòYÓòYÎò\ÇòYÝò\ÔòYò\ËòYWòYOòXÂòXÁÃHƒìHƒÄÃ'char''signed char''unsigned char''short''unsigned short''int''unsigned int''long''unsigned long''long long''unsigned long long''float''double''long double'a structPython objecta pointera stringendunparseable format string'complex long double''complex double''complex float'addsurfaces.cpp%s (%s:%d)subtractdividelost sys.stdout Missing type objectname '%.200s' is not definedintlongan integer is requiredtupleExpected %.16s, got %.200s__init__.pxdnumpy._util_dtypestringnumpy.ndarray.__getbuffer__buffer dtypetrianglesexactly_tri_areaat leastat mostprocess_cellobjectsxsyszstridataareascontains_surface_register_on_neighbor_mapchunkifyvolume_inside_celllistpopchunk_objstriangulate_surfacetype.pxd%d.%d%ssurfaces__builtin____builtins____name__numpyflatiterbroadcastndarrayufunctri_volumefloat_tØûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿèûÿxûÿxûÿxûÿxûÿxûÿøûÿûÿxûÿxûÿûÿxûÿxûÿ(ûÿ8ûÿHûÿxûÿxûÿXûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿxûÿhûÿ8ûÿHûÿxûÿ`ûÿxûÿûÿ˜ûÿxûÿxûÿ¨ûÿxûÿxûÿxûÿ¸ûÿÈûÿxûÿ¸ûÿØûÿûÿûÿØûÿûÿûÿûÿûÿûÿèûÿÈûÿûÿûÿ¸ûÿûÿûÿ¸ûÿ¸ûÿ¸ûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿûÿØûÿØûÿ¸ûÿûÿÈûÿøûÿèûÿÈûÿûÿûÿ¸ûÿûÿûÿûÿØûÿ¸ûÿûÿØûÿûÿšûÿšûÿšûÿšûÿšûÿûÿûÿšûÿšûÿûÿšûÿšûÿ—ûÿ—ûÿûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿšûÿqûÿfûÿ|ûÿšûÿ|ûÿ|ûÿqûÿqûÿšûÿšûÿqûÿšûÿšûÿšûÿqûÿqûÿšûÿqûÿ‡ûÿlûÿlûÿ‡ûÿlûÿlûÿlûÿlûÿlûÿÞûÿ|ûÿlûÿlûÿ|ûÿlûÿlûÿûÿûÿûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿlûÿ‡ûÿ‡ûÿ¥ûÿlûÿ’ûÿ¸ûÿÞûÿ|ûÿlûÿlûÿ|ûÿlûÿlûÿlûÿ‡ûÿûÿlûÿ‡ûÿFûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ;ûÿdûÿ˜ûÿ˜ûÿ0ûÿ˜ûÿ˜ûÿ0ûÿ0ûÿ0ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿ˜ûÿFûÿFûÿoûÿ˜ûÿ‚ûÿQûÿ;ûÿdûÿ˜ûÿ˜ûÿ0ûÿ˜ûÿ˜ûÿ˜ûÿFûÿ0ûÿ˜ûÿFûÿ`!ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ ûÿ¨ ûÿ¨ ûÿ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ ûÿ$ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ@#ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿP$ûÿ¨ ûÿ@"ûÿ #ûÿ$ûÿ¨ ûÿ #ûÿ¨ ûÿ !ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ !ûÿ !ûÿ¨ ûÿ¨ ûÿ !ûÿ¨ ûÿ¨ ûÿ !ûÿ¨ ûÿ !ûÿ¨ ûÿ¨ ûÿˆ"ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿX"ûÿ¨ ûÿ¨ ûÿ¨ ûÿ #ûÿ¨ ûÿ¨ ûÿ¨ ûÿ !ûÿ !ûÿ !ûÿ¨ ûÿ !ûÿ !ûÿ !ûÿ !ûÿ¨ ûÿ¨ ûÿ !ûÿ¨ ûÿ¨ ûÿ¨ ûÿ !ûÿ !ûÿ¨ ûÿÐ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿ !ûÿ¨ ûÿ¨ ûÿ¨ ûÿ¨ ûÿð!ûÿ;ûÿx;ûÿX;ûÿh;ûÿˆ;ûÿ <ûÿ|<ûÿt<ûÿ„<ûÿŒ<ûÿgûÿ±fûÿöfûÿXfûÿêfûÿÞfûÿÕfûÿÌfûÿÃfûÿºfûÿ¨fûÿŸfûÿ–fûÿfûÿ„fûÿ{fûÿrfûÿifûÿžûÿžûÿžûÿ4žûÿ<žûÿwžûÿ¨žûÿKžûÿŸžûÿRžûÿ}¥ûÿr¥ûÿÓ¥ûÿ¥¥ûÿ®¥ûÿؤûÿΤûÿ)¥ûÿþ¤ûÿ¥ûÿaéûÿXéûÿOéûÿFéûÿ=éûÿ4éûÿ+éûÿ"éûÿéûÿ éûÿéûÿõèûÿéèûÿÝíûÿLìûÿmìûÿŽìûÿ¯ìûÿÐìûÿñìûÿíûÿ3íûÿWíûÿ|íûÿ¡íûÿDëûÿ4ëûÿ$ëûÿtëûÿ„ëûÿÈëûÿùëûÿ—ëûÿðëûÿŸëûÿ7îûÿ&îûÿîûÿdîûÿqîûÿ7ïûÿ,ïûÿ%ïûÿ…ïûÿŽïûÿ`øûÿTøûÿÜøûÿ®øûÿ¸øûÿjùûÿ^ùûÿÂùûÿ“ùûÿœùûÿ?úûÿ0úûÿ¶úûÿØúûÿ’úûÿÖúûÿüûÿAüûÿüûÿüûÿüÿ üÿýüÿñüÿåüÿÙüÿÍüÿÁüÿµüÿ©üÿüÿ‘üÿ…üÿÅüÿüÿ4üÿXüÿ|üÿ üÿÄüÿèüÿ üÿ0üÿTüÿxüÿnTüÿeTüÿ\TüÿSTüÿJTüÿATüÿ8TüÿTSüÿ|TüÿTüÿ¾TüÿßTüÿUüÿ„Vüÿ¼VüÿLVüÿ¬Vüÿ\VüÿbYüÿXYüÿÔYüÿ¬Yüÿ´YüÿÛÌüÿÒÌüÿÉÌüÿÀÌüÿ·Ìüÿ®Ìüÿ¥ÌüÿœÌüÿLËüÿäÌüÿÍüÿ&ÍüÿGÍüÿhÍüÿ‰ÍüÿÐüÿ8ÐüÿÈÏüÿ(ÐüÿØÏüÿ\Ðüÿ‰Ðüÿ0Ðüÿ€Ðüÿ8ÐüÿÑüÿÑüÿýÐüÿ8Ñüÿ@ÑüÿU×üÿI×üÿ©×üÿ|×üÿ…×üÿ7Øüÿ+Øüÿ‹Øüÿ^ØüÿgØüÿÉØüÿ¿Øüÿ2ÙüÿLÙüÿÙüÿ“”ÿÿŠ”ÿÿ”ÿÿx”ÿÿo”ÿÿf”ÿÿ]”ÿÿT”ÿÿK”ÿÿB”ÿÿ9”ÿÿ-”ÿÿ!”ÿÿ%’ÿÿŒ”ÿÿ­”ÿÿΔÿÿï”ÿÿ•ÿÿ1•ÿÿR•ÿÿs•ÿÿ”•ÿÿµ•ÿÿÙ•ÿÿ,˜ÿÿ˜ÿÿ ˜ÿÿT˜ÿÿ\˜ÿÿ—˜ÿÿĘÿÿk˜ÿÿ»˜ÿÿs˜ÿÿ}™ÿÿq™ÿÿi™ÿÿ¤™ÿÿ­™ÿÿþ™ÿÿô™ÿÿí™ÿÿ†šÿÿŽšÿÿ%¤ÿÿ¤ÿÿv¤ÿÿK¤ÿÿS¤ÿÿµ¤ÿÿ©¤ÿÿ3¥ÿÿN¥ÿÿ¥ÿÿ¹¥ÿÿ­¥ÿÿJ¦ÿÿ ¦ÿÿ)¦ÿÿÁ¦ÿÿ<¨ÿÿq¨ÿÿF¨ÿÿN¨ÿÿq³ÿÿh³ÿÿ_³ÿÿV³ÿÿM³ÿÿD³ÿÿ$±ÿÿ„³ÿÿ¥³ÿÿƳÿÿç³ÿÿBuffer dtype mismatch, expected %s%s%s but got %sBuffer dtype mismatch, expected '%s' but got %s in '%s.%s'Unexpected format string character: '%c'Expected a dimension of size %zu, got %zuExpected %d dimensions, got %dPython does not define a standard format string size for long double ('g')..Buffer dtype mismatch; next field is at offset %zd but %zd expected while calling a Python objectNULL result without error in PyObject_Callneuron/rxd/geometry3d/surfaces.pyxneuron.rxd.geometry3d.surfaces.append_with_deltastoo many values to unpack (expected %zd)Does not understand character buffer dtype format string ('%c')Big-endian buffer not supported on little-endian compilerBuffer acquisition: Expected '{' after 'T'Cannot handle repeated arrays in format stringExpected a dimension of size %zu, got %dExpected a comma in format string, got '%c'Expected %d dimension(s), got %dUnexpected end of format string, expected ')'%.200s.%.200s is not a type object%s.%s size changed, may indicate binary incompatibility%.200s.%.200s has the wrong size, try recompiling%.200s() got an unexpected keyword argument '%.200s'%s() got multiple values for keyword argument '%s'%.200s() keywords must be stringsCannot convert %.200s to %.200s'%.200s' object is unsliceable__%.4s__ returned non-%.4s (type %.200s)value too large to convert to intraise: arg 3 must be a traceback or Noneinstance exception may not have a separate valueraise: exception class must be a subclass of BaseException'NoneType' object is not iterable'NoneType' object is not subscriptableneed more than %zd value%.1s to unpack'%.200s' does not have the buffer interfaceBuffer has wrong number of dimensions (expected %d, got %d)Item size of buffer (%zd byte%s) does not match size of '%s' (%zd byte%s)neuron.rxd.geometry3d.surfaces.tri_volumeArgument '%.200s' has incorrect type (expected %.200s, got %.200s)neuron.rxd.geometry3d.surfaces._tri_areaneuron.rxd.geometry3d.surfaces.tri_area%.200s() takes %.8s %zd positional argument%.1s (%zd given)neuron.rxd.geometry3d.surfaces.process_cellneuron.rxd.geometry3d.surfaces.contains_surfaceneuron.rxd.geometry3d.surfaces._register_on_neighbor_mapinteger division or modulo by zerovalue too large to perform divisionneuron.rxd.geometry3d.surfaces.chunkifyneuron.rxd.geometry3d.surfaces.volume_inside_cellBuffer acquisition failed on assignment; and then reacquiring the old buffer failed too!'NoneType' object has no attribute '%s'neuron.rxd.geometry3d.surfaces._triangulate_surface_given_chunks_triangulate_surface_given_chunksneuron.rxd.geometry3d.surfaces.triangulate_surfaceneuron.rxd.geometry3d.surfacescompiletime version %s of module '%.100s' does not match runtime version %sinit neuron.rxd.geometry3d.surfacesð¿à?@@×£p= ×ë?ªLXèz¶û?UUUUUUÕ?@ÿÿÿÿÿÿÿv1 is infv2 is infvalue0 is infvalue1 is infvalue2 is infvalue3 is infvalue4 is infvalue5 is infvalue6 is infvalue7 is infShould be impossible to get here. delta_v = %g, v1 = %g, v2 = %g ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ  ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ     ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ     ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ      ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ     ÿÿÿÿ  ÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿ   ÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿ     ÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿ   ÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿ   ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ     ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿ     ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ        ™“š–Ÿ•œœ •Ÿ – š “ ™093:6?5<< 5 ?6 :39 0  ©£ª¦¯¥¬¬ ¥ ¯ ¦ª£©   `icjfoell e ofjc i ` ðùóúöÿõüü õ ÿöú óù ð PYSZV_U\\U_ V Z S YP ÀÉÃÊÆÏÅÌÌÅÏ Æ Ê Ã É ÀÀÉ Ã Ê Æ Ï ÅÌÌÅÏÆÊÃÉÀP YS Z V _ U\\U_VZSYPð ù óú öÿõ ü üõÿöúóùð` i c jfoe l leofjci`  © £ª¦¯ ¥ ¬ ¬¥¯¦ª£© 0 9 3:6 ?5 < <5?6:390™“ š – Ÿ •œ œ•Ÿ–š“™        ê-™—q=ÿÿÿÿÿÿ﻽×Ùß|Û=;Ahoúÿ0huúÿ f²úÿp–²úÿP¡³úÿÀ¬´úÿàµúÿ(€µúÿȶúÿðˆ·úÿXø¸úÿph¹úÿˆ8ºúÿÈغúÿèx»úÿ ØÀúÿ€Áúÿ˜HÁúÿ°èÁúÿø8ÃúÿhÃúÿ0HÄúÿ€ÈúÿˆÈúÿ°HÎúÿ(ÐúÿpxÓúÿ¸Ôúÿ`HÖúÿØÖúÿPhØúÿ HÙúÿØØÙúÿ Úúÿ0 (ßúÿ˜ Øàúÿð èáúÿh øãúÿ¸ hæúÿ xçúÿH êúÿx øíúÿÀ H ûÿ ÈûÿX (ûÿ  è#ûÿ Ø(ûÿX (:ûÿ¸ Cûÿ Qûÿ°øŽûÿx(©ûÿxHÐûÿ¸ˆÖûÿ0Èþûÿ€(üÿ0xvüÿèx‡üÿÀ˜=ÿÿXÿÿ@8pÿÿ8•ÿÿX—ÿÿhèžÿÿ ˆŸÿÿ¸zRx $0múÿàFJ w€?;*3$"D(µúÿh\€¶úÿp<tضúÿÂBBŒA †A(ƒD0Y (A ABBG ´h·úÿ˜DK I 4Ôè·úÿ“Gb G I G I G I G I G b\ P¸úÿ`QBŽB B(ŒA0†A8ƒG`Ä8AÃ0AÆ(BÌ BÍBÎBÏB`ƒ†ŒŽlP½úÿ-„h½úÿ5Dœ½úÿœA†AƒD m AAK m AAA S AAK äè½úÿBD0J B ¿úÿ,L0¿úÿÑBŒA†A ƒD0N  AABF D  AABH \ AABœlÀ¿úÿ¿BBŽB B(ŒD0†A8ƒHPª 8A0A(B BBBG O 8A0A(B BBBG W 8A0A(B BBBG zXA`BhBpBxB€BˆBPPL @púÿþ<BBŽF B(ŒD0†A8ƒQÎ<8D0A(B BBB\î¬úÿ0Aƒn|pÂúÿ€DO E gLœÐÂúÿ¼BBŽE B(ŒD0†A8ƒUp  8A0A(B BBBF Lì@ÈúÿÕBBŽE B(ŒD0†A8ƒJö 8A0A(B BBBF <>¬úÿ D0L\°ÉúÿCBBŽE B(ŒD0†A8ƒK€  8A0A(B BBBA ¬Ù¬úÿ D0$ÌÄ­úÿqD†AƒD eAAôhÌúÿ:D0Œ H 4í­úÿcA†AƒE Z AAG vAAdLPÍúÿŠBBŽE B(ŒD0†A8ƒKPé 8A0A(B BBBB m 8A0A(B BBBA $´°­úÿŸA†AƒD –AAÜ'®úÿ]Dô8ÎúÿˆEŒA†A ƒZ ABD ] ABH tABL<€Îúÿ†A†AƒG0G DAK H AAF o AAG t AAB 4ŒÀÏúÿÕA†AƒN0r AAD j AAD 4ÄhÐúÿ‹A†AƒG h DAJ x DAA üÀÐúÿ)Aƒ\ C DdÐÐúÿBBŽB B(ŒA0†A8ƒG`£ 8D0A(B BBBG  8A0A(B BBBE T„ˆÕúÿ­BBŽE B(ŒA0†A8ƒD@ˆHHPfHA@| 8D0A(B BBBG tÜàÖúÿ BBŽB B(ŒA0†A8ƒD@— 8A0A(B BBBA o 8A0A(B BBBG K8A0A(B BBBLTx×úÿBBŒA †A(ƒG@c (A ABBJ   (A ABBH D¤8ÙúÿmA†AƒD0“ AAE F AAH j FAG Dì`ÛúÿAƒa F v B s E D D D D X H o I A,4 (Üúÿ™A†AƒDPé AAG Dd ˜ÞúÿÑBŽBB ŒA(†A0ƒG@G 0A(A BBBB L¬ 0âúÿCBBŽB B(ŒA0†A8ƒD€ 8D0A(B BBBD Dü 0ûÿqBŽBB ŒA(†D0ƒJPw 0A(A BBBD DD h ûÿYBŒA†D ƒDpb  AABG ÃxA€RxAp\Œ € ûÿ¾ BBŽB B(ŒA0†A8ƒJÐM 8A0A(B BBBE CØAàRØAÐTì àûÿäBŽBB ŒA(†A0ƒGå 0A(A BBBD †˜A R˜A\D xûÿFBBŽB B(ŒA0†A8ƒIà‘ 8A0A(B BBBB cèAðRèAàd¤ h,ûÿäBŽBB ŒA(†A0ƒG€‡ 0A(A BBBB ߈ARˆA€¥ˆARˆA€Œ ð4ûÿî BŽBB ŒA(†A0ƒJ¢ 0A(A BBBD [˜H f˜A˜I f˜G(˜A R˜Aš˜I g˜GÄœ PBûÿæ=BBŽB B(ŒD0†A8ƒKÀ¯ÈAÐRÈBÀì 8A0A(B BBBF ½ÈHÐLÈAÀ‹ÈAÐSÈBÀ*ÈAÐRÈAÀuÈAÐRÈAÀ6ÈDÐDØDàDèDð[Àüd xûÿ$BBŽG B(ŒA0†A8ƒJð|øA€aøAðrøB€MˆAG˜B Pðc 8A0A(B BBBH . øI€føAðUøI€føGðÌøI€gøGðPøI€gøFðZøI€føGðPøI€gøGðZøI€gøFðHøI€føFð<d¨˜ûÿ'BBŽG B(ŒD0†A8ƒGðBøA€`øAð} 8A0A(B BBBD ï øE€aøBð½øG€cøBðjøG€`øAðøI€føGðKøI€gøGðsøI€gøFð_øI€føFðPøI€føAðqøI€føGðrøI€gøGðpøI€gøFðPøI€føGðPøI€gøGðt¤ˆ¾ûÿ?BBŽB B(ŒA0†A8ƒGpÑ 8A0A(B BBBD ƒxH€fxAp=xI€fxApJxI€fxGpLPÄûÿ2(BBŽE B(ŒD0†A8ƒLЦ 8D0A(B BBBA ¬l@ìûÿWBBŽB B(ŒA0†A8ƒG$ 8A0A(B BBBA s˜H f˜A3˜I f˜GטI f˜AU˜I g˜GP˜I g˜FZ˜I f˜G´ðóûÿJoBBŽE B(ŒD0†A8ƒKÐ |Ø Aà RØ AÐ n 8A0A(B BBBE PØ Aà SØ BÐ áØ Aà RØ BÐ 8 Ø Aà RØ AÐ ŸØ Gà Gè Gð Gø G€ dÐ ÔÔˆbüÿþBBŽG B(ŒA0†A8ƒG š¨H°F¨A Y 8A0A(B BBBF s¨H°f¨A "¨I°g¨G ¸¨I°g¨G ¬¨I°f¨F P¨I°g¨G Z¨I°g¨G Y¨I°f¨F L¬°rüÿ¶BBŽB B(ŒA0†A8ƒGË 8A0A(B BBBJ ,ü€(ÿÿsBBŽG B(ŒA0†A8ƒJàñèAðDøB€EˆBUàq 8A0A(B BBBA rèHðfèAàÑèIðfèAà`èIðfèGàßèIðgèGàPèIðgèFàPèIðfèGà÷èIðgèGàPèIðgèFàPèIðfèFàYèIðfèAà^èIðfèGà~èIðgèGà¼,ÐAÿÿBBŽB B(ŒA0†A8ƒJÀïÈHÐfÈAÀz 8A0A(B BBBJ ñÈBÐBØBàAèBðbÀ›ÈIÐfÈAÀAÈIÐfÈGÀuÈIÐgÈGÀaÈIÐgÈFÀì0Yÿÿö$BBŽI B(ŒG0†A8ƒQ€¬ 8A0A(B BBBB ˆBF˜F B¨B°A¸BÀI€OˆFH˜F K¨F°F¸FÀFÈFÐFØFàFèFðFøF€l€gˆBF˜F B¨B°A¸BÀI€MˆFF˜F F¨H°F¸KÀFÈFÐFØFàFèFðFøF€FˆFi˜F F¨F°F¸FÀFÈFÐL€gˆBF˜F B¨B°A¸BÀI€xˆFH˜F K¨F°F¸FÀFÈFÐFØFàFèFðFøF€FˆMF˜F F¨F°F¸FÀFÈFÐFØFàFèFðFøF€h€gˆEF˜F B¨B°A¸BÀI€L|ÿÿvŒA†D ƒJ`¥ AÃAÆBÌB`ƒ†Œf  AÃAÆBÌF 4Tè}ÿÿŒBŒA†C ƒTð®  AABD Œ@…ÿÿšI¤È…ÿÿ_P’’þ  : @J àz¸ü%Àü%õþÿoð8  q &¸ˆA0X& þÿÿoÐÿÿÿoðÿÿoªùÿÿoqÐü%vJ†J–J¦J¶JÆJÖJæJöJKK&K6KFKVKfKvK†K–K¦K¶KÆKÖKæKöKLL&L6LFLVLfLvL†L–L¦L¶LÆLÖLæLöLMM&M6MFMVMfMvM†M–M¦M¶MÆMÖMæMöMNN&N6NFNVNfNvN†N–N¦N¶NÆNÖNæNöNOO&O6OFOVOfOvO†O–O¦O¶OÆOÖOæOöOPP&P6P&distance to position[4] with everything:Format string allocated too short.would normally reject because at (%g, %g, %g): d = %g, r_outer = %g (dx = %g)ndarray is not Fortran contiguousitem %d in grid(%d, %d, %d) contains previously undetected surfacegrr... it thinks there is surface when no nearby objects.distance to position[4] with everything but the last object:Non-native byte order not supportedFormat string allocated too short, see comment in numpy.pxd(x, y, z) = (%7f, %7f, %7f); (x1, y1, z1) = (%7f, %7f, %7f)unknown dtype code in numpy.pxd (%d)last obj distance to position[4]: /home/hines/neuron/nrn/share/lib/python/neuron/rxd/geometry3d/surfaces.pyxneuron.rxd.geometry3d.surfacesndarray is not C contiguous_register_on_neighbor_map%7f %7f %7f %7f %7f %7f %7f %7ftri_volume exception:print_reject_reason (i.e. global item %d: %r)volume_inside_celltri_area exception: internal_membranesgraphicsPrimitivesreject_if_outsidebig_number_matrixcontains_surfacestarting_pointsprocess_cellprint_valuesbisect_rightat (%g, %g, %g): d = %gRuntimeErrorstore_areaslast object:bisect_leftprimitivesposition[4]:overlaps_zoverlaps_yoverlaps_xmax_chunkschunk_sizechunk_objsValueErrortrianglesnew_indexitertoolsenumeraterefcheckpositionneighborlocal_zslocal_yslocal_xsget_clipdistanceSkewConetridatathe_mapr_outerr_innerproductobjectsobjdisthas_poshas_negxrangevaluesvalue7value6value5value4value3value2value1value0resizeneuron__import__bisectappendzerosstartrangeprintnumpyisnanarrayareaszbarybarxbar__test__size__main__keysjoinfiledatazlozipzhiyloyhixloxhisumpopminendzsz1z0ysy1y0xsx1x0ptosnznynxlok1j1i1hidzdydx, ZgZfZdzyxqplkjihgfdbQOLIHBÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ *&ð(&¸(&p(&P,&,& *&ð(&¸(&p(&+& *&ð(&¸(&p(&+&P,&X,&À*&¸*&°*&Ð)&,& )&0+&À+&¸)&(*&è*&°+&p+&X+&¨*&ð(&¸(&p(&,& *&*&ø)&H*&°+&p+&X+& *&ð(&¸(&p(&˜)&à)&Ð)&,&@*&°+&p+&X+& *&ð(&¸(&p(&Ø,& & Ð,&`&<È,&`&#À,& &$¸,&Ø& °,&h & ¨,&˜ &  ,& &˜,&* &,&[ &ˆ,&U &€,&À&x,&@&p,&# &h,& & `,&°& X,&ˆ & P,&x & H,&`&@,&/ &8,&˜ &0,&X & (,&à&= ,& &),& &,& &,& &,&Å &ø+&Ø & ð+&“ &è+&H & à+&&Ø+& &:Ð+&¸ &È+&° &À+&ÿ &¸+&`&K°+&' &¨+&ü & +&€&˜+& & +&à&ˆ+&O &€+&@&Cx+&È & p+&% &h+&ù &`+&Ž &X+&# &P+&ö &H+&‰ &@+& &#8+&ø& 0+&ó &(+&8 &  +&( & +& & +&€ & +&h & +&Á &ø*&Ð&ð*&&"è*& & à*& &Ø*&°&Ð*&¸ & È*&I &À*&ð &¸*&í &°*&ê &¨*&¨ & *&  &˜*&ç &*&X & ˆ*&H & €*&8 & x*& &p*&½ &h*&ø & `*&( & X*& & P*&C &H*&`&@*& & 8*&& 0*&˜ &(*&ä & *& &*&ˆ &*&= &*&è & *&ð&ø)& &ð)& &è)&y &à)&7 &Ø)&€&Ð)&è& È)&¹ &À)&p & ¸)&€ &°)&À&¨)&@& )&¨ & ˜)&x &)&à&%ˆ)&ÿ &€)&ø &x)&ñ &p)&ê &h)&ã &`)&Ü &X)&Õ &P)&Î &H)&Ç &@)& &8)& &R0)& &()&á & )&Þ &)& &<)&k &)&µ &)&± &ø(&À &ð(&Û &è(& &à(&Ø &Ø(&Õ &Ð(&f &È(&­ &À(&© &¸(&Ò &°(& &¨(&Ï & (&Ì &˜(&a &(&1 &ˆ(&¥ &€(&¡ &x(& &p(&É &­}ÀÙÝ}3°”<} ;}U~àþ¶}pQV}ði‚} „“}@«p*&`~RGCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609<€’¦Ý`PA,ï0p¬ ,vûàyÿï¢ eTGPò7int ØINX„2v.SX†2DH(0¸6ƒ7ZS„7LG¬7®2þ\º7d0ËŒdØñH ;ò0L%÷¨4ø¨b/ù¨#Kú¨ ¸&û¨(ºü¨0ôý¨83.þ¨@ ¨H ݨP Ü>¨X mE'` a-h E0p ·% 0t §<~x bPW€ ñe‚ ¸13ƒ [,Cˆ «<!‰ Ô)›˜ Û*›  â+›¨ é,›° ð.>¸ :/0À Ê 1IÄ 1@Ë S†— V~ Ÿ0X^ n\—|2T0ˆ1]_ ®§”ˆ^S aïùd^~9^³a›Åa›A%–$œ'Ö9'Â1ž-R ¢0öË ®C”ï ®Y”_®0s›’Gf0‘HÄ0 € T1®‹_ ® I¾”V1 •IX ®à” ®ð”ö0ðð›] µ• 3^)  ¤ ·sU@ÓP 7iY` 90È5 :0Ditm8…(‡0Q ˆ0‰0²=Š0 ΋0RŒ0kS0,Ž0¤B0 ÷]’7(Ò“Y01:j)0k2;kÆFˆDÆ 0E2 ;EÆ –YE2 /IFY G2 ”?G2( KA0 ±.L^8 šM@ %NÁH 1gOøP UPX ¿*Té` tUïh Ò;Võp õ-Zx ;T[^€ ùe\ˆ ¸[]µ A^ì˜ è )}Ið E~˜øI ÆuW€3áZt-‚€_aƒ2 t„Œ(K1…Ã0‚ †˜8¤‡$@‡8ˆˆHÈ1‰3P„DŠ3Xî]‹3`£cŒ3h† 3pÌ@ŽAx¿%‘^€)$?l n&0o2;oÆ–Yo2(p×-f…$333ÌfQ†DJ3^33‡io3ˆ333~ˆ“™0¨3Ñ1‰³¹2È3»ŠÓÙ0ííí3raþ 3 32maŽ# ) 3B 322Ü_‘M S 0l 323×_’w } 0› 3223‘I“¦ ¬ 0Å 333›0¨r â è 2 32Å Á>žâ *Ÿ  21 31 2¯  B H 2a 32Ñ —`¤þ buf¥›obj¦3len§2—?¨2Šª0 ¥«0$ØC¬¨(-­1 0lc®1 8»¯1 @ °þ H! ²›X 2 ”÷³a žAµ$ * 0C 3C 0 ¤W¶T Z j 3C  ?×u { 0 33l.Øš   0´ 3›­RÙ¿ Å 0Þ 3 ›8ÛR6Ó ƒcä9óå9E8æ9ç9—è9 ¡é9(-ê^0Zë8$6ì@!íHßîˆPïXKð9`ª\ñ9h´ò9p.Bó9x]ô9€Ó"õȈ)+ö¸÷˜F"ø N?ù¨^Tú°Uü9¸-7ý9ÀqXþ9Ȭ/ÿ9Ð ¬9Ø Ž*^à Ö.9è O"9ð ï\9ø+ 9.W9ÐR 9D/ 9£ 9 ê+ 9(À0T6Þ P)]o #¨ ªJ9 Y(ó ›Zó 4 &B ( ì2l 0 j 8 G(9@ ÂóH+]ß !Ű D?"¨ ¯#9 øL$› Ç%{0'LR ç(× M)  º.*  ×g+7  X2, ±U-I (NR.¼M:106A›n2MS^3:$3jp0‰3‰0Àú'4›¡3µ3¨%5D‘6ÍÓ0ì3¨3õJ7¦ T]8u ·)9ø(:"713P];=C3\330ë^<u=Ö>iX?¦ …X@¦ €GA¤ª3ÃÆ33 BÏÕ3éÆ2Ó o°éI %>é&Y»;'” ;(0„_*YPeDIE( ˜P ¨get tset™doc¨\e› O|›) 7%3`zS%3h'Bpf(0xf.0|¼/0€fI0)3„N1%xoßM…3™3›¡1 ¤ª0Ã33›ž (1ä022;2ƹ?2Ã,.23É3µ æ4É_isP¢×9¢–&ÉŸO3ƒT3Õ53 jY3(*30PF383@Þ+0H_ts¨8É×9;ÉA< òB>nc*?0” C0 D0 LFÚ(\+GÚ0–H38²'I3@§OK3H2 L3P–[M3XhO3`=>P3h|SQ3p„=S3x¡7[0€¾\]0„ƒU_3ˆÄ`7!Pb0˜ò;c3 ¨"%Ü`-åë0 3n03ÏÄ g¨ ^ˆžT7!zA!ú T‰ € -0 2; ÆQ 0 K 0è-0À:0®73 í:3((/30³<38é`3@®03Hy3PÈY3XÙ70`­#3hÓE›pŠV3xH&TC 7S”üÈ"„e](8w)0@0+*¾H(T0 SŸ”Ê?¶'’1PTIO)b8W7"V^ 7Ž!ÿ!qQ!A!Þ !¢H!kZ!ƒ>!Õ+!ª! c !¶X !´\ !ëc !  !XW!0!´2!s!' !Ž!¬:!Çd!á\!îZ!¢#!½g!²#öc!õC ^ Ì«±!Ý!¥0!ýD­ ÐŽ> $È$ø9 *ý § +5 ¶ ,; Ä- .Aw; ' ¼h+ (&5ý ›Q”[@ a]3q››" b}0–3››, d¢Ë›Ÿ›ŸŸ0›{ g×ñ››0›¿" hýª››= p÷| q)0G›ŸG›ŸI sY‚›Ÿ›Ÿ›Ÿ›\U vŽ­››Ÿ››˜P }¹0׉›¨×Ý$D` 2Æ 0 32 ; 3Æ  :à ®$ <® > >® ‘ C® ; E® - G0 é> I0 —7 K0$  Q6!( ¯Y W30 +/ \38%f aa'Y>a'½0‘`p>Œ'~&Y>a'0Ò3l0¢'¢'¨'½0=)Ú>Ò'~&Ò'>a'Y0·fû±ó'„&X&0Ã@± („&08)0*(~&>Á&10¡6ˆ0F(Á&Á&10†±a(±X&0mf)l0(X&Á&(²0áA´0§(X&Á&(08);0Ì(~&>Á&(0 6À0ì(Á&Á&(0~#)f0)Á&(0n^¼0")Á&(0¤)¸>B)¨„&a'3:%)ö~&\)~&Á&3/¦0v)Á&Á&323Ã0)Á&Á&31)˜~&ª)~&Á&3 /ÿ>Ä)Á&Á&0F5Z>é)~&>Á&é)ï)t0û!"> *Á&0eG)~&**~&Á&>3}:©0I*Á&Á&>35=)¿~&h*~&Á&>0ö.)ü>*¨*>a'Á&0‹;>®*Á&Á&0ßCÅ)É*Á&É*~&0dSÌ=ê*Á&É*0îC~& +~&Á&É*0sS×7*+Á&É*00Þ5ÜIJ+Á&É*03œ-Ç>i+~&Á&>0Ù10+±0VH0Ÿ+Á&Á&>3ŽX)'~&¾+~&Á&>3™H)D~&Ý+~&Á&>3%5)~&ü+~&„&>0of)S0,Á&10ãA…0*,Á&14"+ã"+Á&H,Á&„&5¬2 ¬2Á&g,Á&Á&4;*í;*Á&…,Á&„&5eeÁ&¤,Á&Á&5ÄQ?ÄQÁ&È,Á&„&>0¡.Ϊã,Á&É*0©.æƒ-Á&É*00‡BíÉ#-Á&É*0,ì=#76-)#8<$–9`*5j.¼`*9¨“*:¨—Q*@¨Â3*F¨X *G¨ ¸`*H¨(*I¨0“Q*J¨8)*K¨@+<*L¨HI`*M®PM`*N®Qmd*P®Rý2*R®S€F*T®T‡*V®UB*]®Vâ8*^®Wid*a®Xù2*c®Y|F*e®Zƒ*g®[>*n®\Þ8*o®]3f5*|¨„.0Y6E*.=-6- ®ª.”YI;+4ICg+ºÊ.Ð.s3\]+¯0ï.±´.3+ݱ /±¿.3+Ú¿./Y3^]+«´.3/Yl7M@& ) 7hâ5!Í/ PãY ¯Yä0 ™Yå> æ0 ¥ç0X  \è®\ à=é®] ;ê0`$ #ì0 >í$0 PîY ¬<ï>Í/ >0”7!ëW/0¥%ðÍ/ñe9^0 ?cò^0 Kdó>*0g9ô60Hõ½f 1 G>ö*0 &÷ 1 T$ø> Iaù>( ’-ù>0 7ú>8 Þdû0@ %%ü®D J<ý®E Ôþ®F ®ÿ®Gd0¿fp0›E¬¶(ð¥z1 >ñ3 '.òí 0aó” Ëô3 …+õ0 §ö+1EÌ*®1 ü#F0 -:G®1-Î*H†1$SIõ1 ~2J0 *K0 ŠSLõ1´1V3b02 -W2 lcW2 »W25bXû1hYêAd2 ‰.Z> œ%[ ìA\<2Ð]D¥2 &^¥2 é_¨ ^5`«2d2 02»2”ŸDap2W-ù".Š Ç2í2”  [[3< 0ç 0ì_ 0][í2 393”-2o7Q8^Cš38¶T^C1 8 ^C1 8F?^C1 9·T_C29 _C29G?_C27ÂUmCà3:srcmCà38 mCà38G?mC2;vnC3;ioC2í<ÅuC334:srcvC38·TvC28 vC29 wC39G?xC27¹]Ae48PAY:objA38>AÃ7ÕRC48ó#RC2< HõC0©48ÕõC38ó#õC27?.bAÂ4:chbA®<šaLA0õ4:tsLAÒ'9~2MA0;tNAY<º$[A05:ts[AÒ'9Å*\A0<-;-A0:5;n.A^<ÓaoG0Ö6:xoG3=¥@H=1/!H9u`pG~9qpG~9à=qG~>©59Š1uG7?9wuG7>»69¾P·GÖ6>Ì59Š1ºGÒ2>Þ59Š1»GÇ2>þ59Š1¿G7?9w¿G7>69Š1ÈGI?9wÈGI>>69Š1ÑG7?9wÑG7>^69Š1ÚGI?9wÚGI>~69Š1ãG7?9wãG7>ž69Š1ìGI?9wìGI?9Š1õG7?9wõG7?;valH0;tmpH3Ü6Ç2AÃ8FAA08PAY8ÐA0<ÃÇC0Y7:objÇC38>ÇCÃ]E38Š1]E3:tb]E38Ð9^E3=(U‡E7¢U¨C÷78>¨Cí8Š1¨Cí:tb¨Cí9ªCB7 ,2E‰88P2EY812E08f3E08|3EY8Ù04E08ò94E09×5E39l5E39Š+5E3;ctx6E39µc8E77p<6»88É.6û!8k6C 9•b607]N6á88É.638k6C <±d,D3{9:o,D3:i,D28;,D08†J-D08{.D0>F9;n1D2?;r3D3>b9;n9D2?;r;D3?;m@Dï?;lCD23ñ98Pÿ>39??3<è ^D3:80a^D3¦<;tmpš73>¸<;tmp«73>Ö<9z¶739™Y¸72>è<;tmpÐ73>ú<;tmpÒ73?;tmpŠ83<Ä220K=8É.238k2C 8209Tž207–]#Ce=:buf#CC <×*C0à=:buf+CC :obj+C38•)+C$08;+C0:nd,C08a,C08ª,,C 1=¡dHC?;ctx;C175LCú=8sLCC <-z1)´?8×'z1û!8UOz10=ç >2=#&M2=&K29 4{1)9œ!|1)9›}109¥~179\'1»29ÎO€1d29T1)9•bƒ129Ÿb„109©b…129³b†129½b‡129Çbˆ139Ñb‰139ÛbŠ139åb‹139ÓGŒ139ÞG109éGŽ179ôG179ÿG129#‘109"g’1Y9+“10>m?9¤,š1´?>?9ºÚ13?;tmpÝ13?90D239+D239¸HD23 d0Ä?”<ÑX…3lI8P…38›…08¥…08è…08éd…38¾/…û!8¼L…û!8/N…û!=w =q!=&ñ=£™=# =ç Ö=”=#&ú=UE9AJ†)9,#‡)9ß1ˆ)9LJ‰)9ÂKŠ)9ÇL‹)9AŒ)9Ü9)9ç9Ž)9é'û!9c(û!9À)‘û!9ô7’û!9þ“)9”)9•)9ù<–09º=—09Ñ>˜09î8™û!9ñš09C6›39Ï œ39d639s6ž39‚6Ÿ39‘6 39 ¡39©6¢39÷5£39ؤ»29}`¥d29'¦»29þK§d29!(¨»29YM©d29¶(ª»29¢N«d29}[¬»29ó*­d295 ®»29§]¯d29u°»29‡^±d29v²»29r_³d29T´39•b¶29Ÿb·29©b¸29³b¹29½bº29Çb»29Ñb¼39Ûb½39åb¾39ÓG¿39ÞGÀ39éGÁ39ôGÂ39ÿGÃû!9ì5Äû!9'HÅû!92HÆû!9=HÇ096È09ÁHÉ29ÌHÊ9×HË9âHÌ09íHÍ)9øHÎ29IÏ9IÐ29IÑ9$IÒ29½IÓ39ÈIÔ39ÓIÕ39ÞIÖ39A9×29õIØ39JÙ19 JÚ29JÛ29!JÜ292KÝû!9=KÞ09HKß09SKà29^Ká29iKâ19tKã29Kä19ŠKå29•Kæ29-Lç298Lè29CLé29NLê29YLë29dLì29e<í29‡Lî29’Lï29Lð29Mñ29¨Mò29³Mó29¾Mô29ÉMõ29ÔMö29x>÷29æMø29ñMù29üMú29ÄNû29ÏNü29ÚNý29åNþ29ðNÿ29ûN)9O)9O)9O)9'O)9çO)9òO)9ýO29#09"g Y9+ 0>¿F9¤,-´?>ÑF9¤,2´?>ãF9¤,7´?>G9º‰3?;tmpŒ3>G9¤,¢´?>5G9ºÓ3?;tmpÖ3>GG9¤,ì´?>gG9º3?;tmp 3>yG9¤,6´?>™G9ºS3?;tmpV3>«G9¤,l´?>½G9hÙ3>ÛG9zã39™Yå2>íG9Ã2>ÿG9h`3>H9zj39™Yl2>/H9Ç2>AH9hç3>_H9zñ39™Yó2>qH9Ã2>ƒH;tmp?3>£H9ºM3?;tmpP3>µH9¤,©´?>ÇH;tmp3>ÙH;tmp3>ëH;tmpƒ3>ýH;tmp…3>I;tmp‡3>!I;tmp‰3>3I;tmp‹3>EI;tmp3?90ã39+ã39¸Hã37(  ?ÎI8zP ?Y8Ð?08ˆG?28á@?28fA?29ï#?29ïb?Y<0)¸K8×'0û!8o@008œ<008UO00=#&ô0=&ò0=ç å09"0)9ôE0)9›009ô039\'0»29ÎO0d29T0)9•b 009Ÿb 009©b 029³b 029½b 029Çb039Ñb039Ûb039åb039ÓG039ÞG009éG029ôG09#009"g0Y9+00>MK9¤,0´?>mK9º_03?;tmpb03>K9h£03>‘K;tmp¬03?90ë039+ë039¸Hë03_L9¤,Ž/´??90¨/39+¨/39¸H¨/3P9¤,Ç ´?>“P9¤,Ì ´?>¥P9¤,Ñ ´?>·P9¤,Ö ´?>ÉP9¤,Û ´?>ÛP;tmp 3>íP;tmp 3> Q9z) 39™Y+ 2>Q;tmp3>/Q;tmpO3?90ð39+ð39¸Hð3<÷ZÒ3&ë=VV =&° =ç £ =U?U 9²Ó09›)Ô09þÕ)9Ö)9×)9Š Ø)9ÛÙ)9zOÚ)9‡Û39TÜ39•bÞ39Ÿbß39©bà39³bá)9½bâ39Çbã39Ñbä39Ûbå29åbæ39ÓGç09ÞGè09éGé9ôGê29ÿGë9ì5ì29'Hí92Hî39=Hï396ð29ÁHñ39#ò09"góY9+ô0>×S9º^3?;tmpa3>éS9h* 3>ûS9hb 3> T9hš 3>-T9ºº 3?;tmp½ 3?;tmpÓ 3ÞU9¤,v2´??90„239+„239¸H„23<°,E13ëV8PE138×'E1û!8o@E108œ<E10=#&k1=&i1=ç `19\'F1»29ÎOG1d29TH139•bJ139#K109"gL1Y9+M10>ÄV9¤,T1´??90b139+b139¸Hb13<éË/3¹W8PË/38×'Ë/û!=#&ñ/=&ï/=ç æ/9\'Ì/»29ÎOÍ/d29TÎ/39•bÐ/39#Ñ/09"gÒ/Y9+Ó/0>’W9¤,Ú/´??90è/39+è/39¸Hè/3@’;XD÷+=übÎ#=XL+=âDG+=2d:#=ç ƒ.=ÖFÒ*=#&›.="R]*=Í-X*=¶WÆ-=(ˆ(=.'ƒ(=‹Tã(=ÞL(=IWÙ#=8” =vH =¦>ý=oV5#=gè&=CTã&=cF:=½T5=&™.9›õ09¥ö09è÷09º9ø09Å9ù09ú09¤-û)9´-ü)9…:ý)9ôfþ)9Œÿ)9A)9cW39G&39=]09A709ý-09÷^39×'û!9#09V: 39c= 09‹D 39f 39n] 09309|Y09¼29é/39÷539 Z39EV09\09 09g09q09»09W39BO39h`39NU39D$39]39a7 39‡b!39a1"09-5#39$395%39u1&39‚'39àR(39¡/)39ê1*39›+39Ã;,39k%-39Æ.29#>/39\'0»29ÎO1d29T239•b439Ÿb539©b639³b7)9½b8û!9Çb909Ñb:39Ûb;39åb<39ÓG=29ÞG>29éG?09ôG@39ÿGA39ì5B29'HC92HD39=HE396F9ÁHG09ÌHH09×HI39âHJ29íHK39øHL9IM39IN39IO39$IP39½IQ29ÈIR39ÓIS09ÞIT29A9U09õIV09JW09 JX09JY09!JZ092K[09=K\09#]09"g^Y9+_0>F_9¤,ð´?>X_;tmp3>j_;tmp;3>Š_9ºM3?;tmpP3>œ_9hz3>®_;tmpƒ3>À_;tmp™3>Ò_;tmp¥3>ä_;tmp±3>`9ºÂ3?;tmpÅ3>`9hú3>4`9z39™Y2>F`9Ã&2>f`9ºŠ3?;tmp3>x`9hÂ3>–`9zÌ39™YÎ2>¨`9Ãî2>È`9º* 3?;tmp- 3>è`9ºÉ 3?;tmpÌ 3>a9ºë 3?;tmpî 3>(a9º!3?;tmp!3>Ha9ºha9ºk!3?;tmpn!3>ˆa9º!3?;tmp!3>¨a9ºÊ!3?;tmpÍ!3>Èa9ºï!3?;tmpò!3>èa9º"3?;tmp""3>b9ºD"3?;tmpG"3>(b9ºt"3?;tmpw"3>Hb9º™"3?;tmpœ"3>hb9ºÂ"3?;tmpÅ"3>zb9hú"3>˜b9z#39™Y#2>ªb9Ã>Êb9ºb#3?;tmpe#3>Üb;tmpü#3>úb9z$39™Y$2>c9º^$3?;tmpa$3>,c;tmpÚ$3>Jc9zù$39™Yû$2>jc9º<%3?;tmp?%3>|c;tmpZ&3>Žc9h¨&3>¬c9z²&39™Y´&2>¾c9ÃÔ&2>Þc9ºe'3?;tmph'3>ðc9¤,~'´?>d;tmpŽ'3>d;tmp²'3>&d;tmp¾'3>8d;tmpã'3>Jd;tmpò'3>\d9hH(3>zd9zR(39™YT(2>Œd9Ãt(2>žd;tmp×(3>°d;tmp))3>Ðd9ºS)3?;tmpV)3>âd;tmpd)3>e9º¢)3?;tmp¥)3>e9h$*3>2e9z.*39™Y0*2>De9ÃK*2>Ve;tmp_*3>he;tmpa*3>ze;tmpm*3>Œe9h•*3>že;tmpž*3>°e9h+3>Îe9z+39™Y+2>àe9Ã:+2>òe;tmpN+3>f;tmpP+3>f;tmpx+3>(f;tmpã+3>:f;tmpf,3>Xf9z|,39™Y~,2>jf;tmpÛ,3>|f;tmpù,3>œf9º-3?;tmp-3>®f;tmp-3?90’.39+’.39¸H’.3<ü?\/3Ïg8P\/38éd\/38¾/\/38¼L\/38/N\/38´\/38b\/08³\/38ÀA\/08ËA\/08ÖA\/08@\/08É_\/3=&p/=ç l/9T]/39•b_/39#`/09"ga/Y9+b/0<š D2 h:aD2:bD2;qD2;rD2<¢Ú33l8édÚ38¾/Ú38¼LÚ38/NÚ38bÚ08AÚ)8UOÚ0=OD‡=X\¡=ç Û=£=D¥=&æ9ìÛ09ÀAÜ09ËAÝ09ÖAÞ09úSß39¼à09›á09¥â09èã09%bä)9³å39k-æ09x-ç09…-è09h é09u1ê)9`.ë)9‚ì)9ègí)9àRî)9è7ï)9Øð)9é/ñ39éKò09÷5ó39xô39Tõ39•b÷29Ÿbø29©bù39³bú39½bû9Çbü39Ñbý09Ûbþ09åbÿ09ÓG09ÞG09éG09ôG39ÿG09ì5)9'H792H79=H796 )9ÁH 39ÌH 39×H 39âH 09íH09øH09I39I09#09"gY9+0>\k9h€3>nk;tmp‰3>€k9h3>’k;tmp!3>¤k;tmp?3>¶k;tmpq3>Ök9º†3?;tmp‰3>ök9ºÛ3?;tmpÞ3>l9º03?;tmp33?9ºf3?;tmpi3<^u3On8édu38¾/u38¼Lu38/Nu38´u38UOu0=ç d=&m=í>=I=99bv09¤-w)9´-x)9…:y)9Az)9³{39ÀA|09ËA}09ÖA~09T39•b29Ÿb‚29©bƒ29³b„39½b…39Çb†39Ñb‡79Ûbˆ39åb‰09ÓGŠ09ÞG‹)9éGŒ39ôG39ÿGŽ9ì509'H09#‘09"g’Y9+“0>&n9z39™Y2?9Ã*29@A+On?9ê413 í_n”<ßÑ3o8PÑ38édÑ38¾/Ñ38¼LÑ38/NÑ38´Ñ3=&å=ç á9TÒ39•bÔ39#Õ09"gÖY9+×0<1R3·o8PR38édR38¾/R38¼LR38/NR38bR08AR)=&f=ç b9TS39•bU39#V09"gWY9+X0<ø=âD0ïo8Ü?âDïo9ËãD3?9ÇíDõoz1<ÌõD3Ep8 õDïo8¯õD3AbadE9ËöD39?öD33A$01<C²@3ßq:obj²@38› ³@28¯³@28À?´@í8"´@í8ê´@í8— µ@08«µ@08†Jµ@0AbadA;mp·@õ;ms¹@ï>’q;lÊ@2?9?â@39ëã@39Á?ã@39#ã@3?9±Tç@39 è@3<Ð(‘H0 r:f‘H3:o‘H3=ð ¡H<ï @3or:op1@3:op2@38À@)8Y @0;b@K/;a@)9?@)<ùAD3¹r:oD3:iD28†JD08{D0?;rD3<ß(mD3As:op1mD3:op2mD38=mD78Y mD0>s;bpD8/;xqD7;arD7?;bÁD8/;aÂD)9?ÃD)t9,R?7t>t;cmp`?0?9,n?7t?;cmpp?0í<²C K0Yt:t KYti"< cFF3çt:op1FF3:op2FF38=FF78Y FF0>Ät;aIF8/;xJF7;bKF7?;ašF8/;b›F)9?œF)<„IüE3{u8PüE38…güE38î_üE0Abad8ãÍJ0AbadK9±;ÏJ39?ÐJ39¸ZÑJ39ðÒJv9ÓJ2 ®v”ÇB_fAY€’hœOvCchfA®UDÞdfA0TBø¦F0ð“pœÎvDŠS¦Fõ1UE~2¦F0Dü#¦F0QF·T§F0LGmid§F0—Gend§F0 Bv^ÓC0`”œ‡wFÕCBgFhÖC3HrwF=>ÙC3ÓFA,ÙC3öIé”MwJU|Iú”awJUvK •JU}L•nêJUvM‡#ôA0•˜œ9xNctxôAápH0ùwF?cB^0ŽF³$B^0±OQ•vP„•zêQˆ•@Fó#öAYÕFSA÷AYøO¡•vB™`ÍA>Е“œÅxNchÍA®EÞdÍA0TR©4@–ÛAS¶4L\–zêJT HŠJQ óU8$8&<y:chA®8ÞdA0<í ~A>@y:ch~A®8Þd~A0Bq B0p–`œÛ{Nctx BápÙ9¤\ B®F™YB>8F¬<B>pFB>ÀH`ñyGiB0EF¥B0}LÆ›zêJT ¨ŠTÅx — 'BUzSáxïSÖxMU©4¦šðïAS¶4©LÅšzêJT HŠV F?c)B^0ßF>*B$0üHp”zFKdbB>•Tîx±— ,B¿zS yßSÿx Ty¸—ð.BB{S3yS S(y¢ W©4@š%ŒA&{X¶4LašzêJT HŠL§™†êJT ÈŠYì˜$h{FKdñ YÀ™€´{F¶Y1B> FN2B>J ZÖ™O(š9x[q›‡wÌ{JUvO“›zêTš?^\ï`žÑœí€S€/S €ÍS€l]#€ ]/€TIŸž˜€JUsPÍž ë[åžëÄ€JU `‹OŸ%ëL$Ÿ†êJT €‹<":»F®1#8ü#»F09-:¼F®1;pos½F0<Ú3øF®1‘8>ùFY8ÎZùF08üUúF08|úFYAbad'G9=8ûF®19vEüF39;ýF37/ÉFù8ü#ÉF08-:ÉF®1;posÊF0;iÊF09ŠSËFõ1>ê;tmpÝF®1?96ãF0aW4,G@Ÿ¿œ)…E>,GY²EÎZ,G0vEüU-G0'E|-GYþAbad@GF=8.G®1õFïB/G)…xTí€^Ÿ°0GÙ‚Sþ€V°] F]iL˜ŸOvJU~JT}JQT#X à3G „SXŒSLÛS@S4IVàbd]lÑ]xB]„ì[b 1ëTƒJU‘¸[ˆ =댃JU :|JT|JQ -|JRs[š 1릃JU‘¸[® 1뾃JU|[ä IëäƒJU0JT0JQ0JR0Iª¢øƒJU}Kº¢JU~T‘¡ 5Gã„Sª„SžàV ]¶O]˜]ÌøY}¢#s„]Ý H€¨„]ë° L2¢UëJUJT s $ &4$[O¡OvÌ„JUJTsJQ~LÊ¢aëJU [ןmë…JT|JR0[êŸyë…JUsKÛ¡JU|93cl3`Pþ<œ!¨EcW3Ó E›03!E¥0,Eè0=0d&Êdç ª;‚FG0z2FÚU0}AF.%0˜GFƒ0ŽHF!X03UFw'0ÌYFT3(\F•b3†\FŸb 3ÎgF©b!3tF³b"3ý~F½b#3®FÇb$3_€FÑb%3FÛb&3ÁFåb'3r‚FÓG(3#ƒFÞG)3ÔƒFéG*3…„FôG+36…FÿG,3ç…Fì5-3˜†F'H.3I‡F2H/3ú‡F=H03«ˆF613\‰FÁH23 ŠFÌH33¾ŠF×H43o‹FâH53ŒFíH63ÅŒFøH73pFI83EŽFI93FI:3ïF$I;3ÄF#<0¨‘F"g=Yô‘F+>04’T‚:qP°WoˆS“:€’V°eŸ:f«:f·:LœPÅêJUsT‚:¥PYƈS“:£’V]Ÿ:Æ’]«:“]·:“L³PÅêJUT‚:ÀP0[‰S“:8“V0]Ÿ:[“]«:•“]·:•“LÓPÅêJU‘T‚: Q`hv‰S“:Í“V`]Ÿ:ð“]«:*”]·:*”LQÅêJUsT‚:Qj͉S“:b”V]Ÿ:…”]«:¿”]·:¿”L&QÅêJUT‚:3QÀl&ŠS“:÷”VÀ]Ÿ:•]«:T•]·:T•LFQÅêJU‘¨T‚:}Qðy}ŠS“:Œ•Vð]Ÿ:¯•]«:þ•]·:þ•L…QÅêJUsT‚:‘Q {ÔŠS“:J–V ]Ÿ:m–]«:¼–]·:¼–L™QÅêJUT‚:¦QP}-‹S“:—VP]Ÿ:@—]«:—]·:—L¼QÅêJU‘˜T‚:óQ€Š„‹S“:Û—V€]Ÿ:þ—]«:8˜]·:8˜LûQÅêJUsT‚:R°ŒÝ‹S“:p˜V°]Ÿ:“˜]«:͘]·:͘LRÅêJU‘°T‚:'RàŽ6ŒS“:™Và]Ÿ:*™]«:d™]·:d™L4RÅêJU‘T‚:hR£ŒS“:œ™V]Ÿ:¿™]«:š]·:šLpRÅêJUsT‚:|R@¥æŒS“:ZšV@]Ÿ:}š]«:Ìš]·:ÌšL„RÅêJU‘°T‚:‘Rp§?S“:›Vp]Ÿ:=›]«:Œ›]·:Œ›LžRÅêJU‘¨T‚:ÒR ´–S“:Ø›V ]Ÿ:û›]«:5œ]·:5œLÚRÅêJUsT‚:æRжïS“:mœVÐ]Ÿ:œ]«:Êœ]·:ÊœLîRÅêJU‘°T‚:ûR¸HŽS“:V]Ÿ:%]«:_]·:_LSÅêJU‘˜T‚:À]«:xÀ]·:xÀLÆZÅêJUsT‚:ÞZp… S“:°ÀVp]Ÿ:ÕÀ]«:Á]·:ÁLóZÅêJU‘ T‚:[  Þ S“:GÁV ]Ÿ:lÁ]«:¦Á]·:¦ÁL[ÅêJU‘T‚:w[Ð5¡S“:ÞÁVÐ]Ÿ:Â]«:@Â]·:@ÂL‹[ÅêJUsT‚:«[Ž¡S“:xÂV]Ÿ:Â]«:×Â]·:×ÂLÀ[ÅêJU‘ T‚:å[@ç¡S“:ÃV@]Ÿ:9Ã]«:sÃ]·:sÃLò[ÅêJU‘¨T‚:\\p0>¢S“:«ÃVp]Ÿ:ÓÃ]«: Ä]·: ÄLp\ÅêJUsT‚:˜\°2—¢S“:EÄV°]Ÿ:jÄ]«:¤Ä]·:¤ÄL­\ÅêJU‘ T‚:Ú\à4ð¢S“:ÜÄVà]Ÿ:Å]«:;Å]·:;ÅLÿ\ÅêJU‘˜Y;_,(£Gtmpœ3sÅKg_JU‘ˆ[éP…ë?£JU3[\Q…ëV£JU3[ÒQ…ëm£JU3[JR…ë„£JU3[´R…뛣JU3[S…ë²£JU3[–S…ëÉ£JU3[T…ëà£JU3[tT…ë÷£JU3[ãT…ë¤JU3[MU…ë%¤JU3[·U…ë<¤JU3[&V…ëS¤JU3[•V…ëj¤JU3[W…ë¤JU3[sW…똤JU3[âW…믤JU3[UX…ëƤJU3[¿X…ëݤJU3['Y…ëô¤JU3[”Y…ë ¥JU3[Z…ë"¥JU3[–Z…ë9¥JU3[S[…ëP¥JU3[0\…ëg¥JU3[M]…ë~¥JU3[“]‘ë•¥JUJ[_ëµ¥JU‘ˆJTvI;_É¥JUvI~‚Ý¥JUvI ƒò¥JUwIxƒ¦JU|I„¦JU‘€Iˆ„2¦JU‘ø~I…H¦JU‘ð~I…^¦JU‘è~I †t¦JU‘à~I†Š¦JU‘Ø~Iñ† ¦JU‘Ð~I[‡¶¦JU‘È~I¿‡Ì¦JU‘À~I ˆâ¦JU‘¸~Iˆø¦JU‘°~I∧JU‘¨~IC‰$§JU‘ ~I¤‰:§JU‘˜~IŠP§JU‘~IfŠf§JU‘ˆ~IÇŠ|§JU‘€~I(‹’§JU‘ø}Ir‹¦§JU~I½‹º§JU}IŒÎ§JUIâ§JUs[ù¨JU Ø‹JR °‹KIJU‘ˆ\4^0œ§¨S4˜ÅSœ4ÑÅWe4nøC•¨Sr4ÆL‰zêJT ŒJQsKnJUóU\õ4£€œX©S5@Æg5TÂ4£\A ©SÓ4yÆV]Þ4œÆ]ê4éÆQ[£ S5ÇQ[£ g5Lv£zêJT @Œ<{?sB3¯©:ctxsBáp:tspsBÒ';tsuBY;ivB09Å*vB09¥wB0B­BžBY€£¼œó¬NctxžBápXÇNtsžBY·ÇFæ5ŸB0ÚÇH@0ªFÅ*C0ÄÈL"¤õ4JU‘˜TX©º£€CR«Su©çÈSi©uÉV€]©÷É]Œ©Ê]–©ÄÊ]¢© Ë[â¦@y›ªJU[*§õ4³ªJU|[h¨zêتJT €JR~[–¨†ê÷ªJT ðŒ[¸¨zê«JT P[ø¨zê5«JT  L0©†êJT ¨Y`¥PŒ«F—7ãB>ÁËLu¥@yJUH¬FÚÊBYäËGiËB>-ÌFõ`ËB>dÌF7ÌB>­Ì[(¦@yë«JU[‚¦¯©¬JUL©†êJT ÀŒW©4º¨ùBf¬S¶4"ÍLרzêJT HŠJQZ[K¤@y~¬JU[ê¤@y–¬JU[¥@y®¬JU[–§†êͬJT €Œ[¨‡wå¬JUO<©õê<06»J31­8P»JYAbadÄJ9¸Z¼J39±;½J3\{u@©Õœa¯SŒuGÍS˜u¦ÍS¤uÎb¼u]ÄudÎ]Ðu×Î]Üu”Ïhèu‘ð}]ôuSÐi°uTó¬m©P×J®S­³ÐVPb­]­üÐ]$­YÑ[r©1ëô­JU|[†©ªë ®JUvK‚ªJUv[¥©1ë6®JU}[¼©ÿêT®JUsJT[ªzê®JT 8ŽJQ|JR}I'ª“®JUvIpª§®JUsIšª»®JUsIªªÏ®JU[Ϊzêú®JT ØJQ|JR}[ôª¶ë1¯JUwJTÈJQ ŽJR|JX}[«ÃëS¯JU0JTwJQ0O«õêj_tŽ œe°Spt¶ÑS|tjÒi”tkˆt'Y¯.Ù¯]¥tÓ]¯tDÓ]¹t‘ÓOÌÅêH€J°]ÅtÜÓ]ÏtÔhÙt‘`OŽÑê[SŽÝê!°JU‘`OkŽéêLƒŽ†êJT )|O"ŽÏëO7Žõê7;%?‹°8zP&?Y8æC'?3\As «Cœ²SRscÔS^sÂÔSvs‰ÕS‚sèÕSŽs!Ölšs%­l¢s!®bªsl²s–¬hºs‘ hÆs‘¨hÒs‘°]ÞsYÖ]ês{×ijsH°R±]ûs"ØOë¬ÜëHà±] tXØO§­èëOµ­%ëH»±]tŽØV@](tÄØOõ­èëO\®%ëWe°–¬(„?²S~°úØSr°ÙOž¬õëO¾¬zê[“«ì0²JU~JT‘ˆJQ|JR}O¬ÜëO-­õë[>®zêq²JT àŽJQ‘˜OM®õêj¹r™Ž œ…³SÊrCÙSÖr÷ÙSâr«ÚiîrYºŽ.ù²]ÿr^Û] s—Û]sçÛOÖŽÅêH€j³]sIÜ])slÜh3s‘`OÑê[^ÝêA³JU‘`OvéêLކêJT E|O) ìO>õê<ð>D3µ³:oD3:jD3;rD3jor¤qœo´S€r·ÜSŠrÝi ri”rY ´]­r9ÝT…³×°Da´S ³\ÝS–³¸ÝV°]ª³ñÝLêìJUvJTsO×'ì\ rp®:œUµSr'ÞS*r²ÞmNr@]Xr=ßhbr‘`iBrn6r@[ЮÝêç´JU‘`Oè®éêO¯Ñê[.¯†ê µJT N|Ol¯3ìO‹¯%ëO ¯?ìOª¯õê\å3cœÀ¶Sö3ŽßS4à]4Là]&4‚ài4TD3àyCïµSi3ËàS]3óàSQ3áVà]u3Cá]3gá]3ŠáY8 O¶Sö3ÀáS4ùáS4âQ8 g4g&4o?‘ëJU0Wš3\‚C«¶S¿3VâS³3yâS§3œâQ\]Ë3¿â]Õ3ââLJ‘ëJUs\Ep°¯Šœ±¸S`pãSlp¡ãlxpÀ°]€p)äSVpˆäTY7À¯2H…·V]j7 åY±h·gj7L0±†êJT U|LЯLìJU ^|HP^¸]‹pBåH€ü·]–pxå] p®å[Y°õëÊ·JUv[d°Xìâ·JUvL‡°dìJU|JT0[ °dì¸JU|JT1[ °pì>¸JU e|JT|L@°|ìJUvJT|JQ1Iå°r¸JU|[±pì—¸JU g|JT|L±dìJU|JT0\ûoxŸœž¹SpÑåb$p],pFæ]8p|æp p À&&ŸT·oˆ°÷DY¹SÈoÆæV°]ÔoçY®J¹]áo_çOžC[Ó…ëp¹JU1[ôï¹JTsJQ0K‘JUsq:‘]œ ºS :ŠçY_‘ö¹S :Qèod‘±¸JUóU`B‘ºJUóUJT0rR‘JQ0\/7@±ˆœ¸ºSL7Šèp@7ú@7ŸYh±ºSL7(éX@7L±†êJT i|O•±¸êLÀ±zêJT já8б†œ‹¼Sò8LéSü83êS9XëS9 ìi9HàZ»]c9—ìY³TH»]n9àìO5³ˆìOH³”ìr'²JUóUY¸²0”»]K9íQß² ]V99íY€²+λ]/9\íQŸ² ]:9íQ0²DS9¢íS9ÆíS9ÿíSü88îSò8qîT…³8²0UDt¼S ³”îS–³ÊîV0]ª³íî[O²ìb¼JUsJTvKo²JUvL8²'ìJUóT\ßq`³ÕœÙ½Súq$ïlrè³Sðq¬ïTY7e³`“H>½V`]j7ðY´!½gj7L.´†êJT U|Lu³LìJU ^|[³dì[½JUsJT0[¢³p쀽JU e|JTs[¶³|죽JUvJTsJQ1[ɳpìȽJU g|JTsK ´JUs\Ç9@´‹œÌ¾SØ9Sðgä9TCP´ ?x¾S`ÛðST$ñV ]lmñIe´N¾JTvI´b¾JTv$LÆ´ÿêJTvQ˜´SØ9¶ñQ˜´gä9L´´zêJT }|JQv$<B¶C3ö¾8P¶C39?·C3\̾д)œQ¿Sݾïñ]é¾wò[ã´ ì;¿JTsoù´Ç9JUóU\çpµœêÂSøpšòSqºóSq,öSqQøS(q€ùS@q|ûpLq‘bdq]lqOý]wq¾ýiXqi4qT{9Pµà½@¸ÀSŒ9hþVà]–9êþ]¢9qÿH@.À]­9§ÿ]¹9 O¹¹¬ìY˹ÀXŒ9Q˹g–9g¢9Q˹g­9g¹9OŒ¸¸ì[´¸Åì¦ÀJU}Kï¸JU}T{9µ€Ä@ƒÁSŒ9V€]–9]¢9oHàÁ]­9¥]¹9 O깬ìH LÁSŒ9´V g–9g¢9V g­9g¹9O ¹¸ì[+¹ÅìqÁJU|KX¹JU|HPŸÂ]“q×]Ÿq"]«q·]·qLH°tÂ]ÄqÎ]ÐqŸ[ ¶ÑìãÁJUI!¶÷ÁJUsI”¶ ÂJUs[¸'ì$ÂJUóTO4¸'ì[R¸ÑìOÂJUJT~Ix¸cÂJU~KºJUsI0¶ŽÂJUvJT|K·JU|`õ´ÂJUóUO¯¶%ëOÚ¶%ëL<·zêJT (jçt º­œ‡ÄSøt6bu]$u]0u¨]—C38Š1—C3:tb—C39Ó?™C390™C39_Q™C39šCBq÷7л œyÆS8% p(8ú(8Ÿp8ú8Ÿp8ú8Ÿ]L8^ ]X8§ ]d8ð ]p89 g|8i@8i48Wº7Þ»/Ï]FÏ6&]RÏ‚&TCpÅ á?×ÐS`1%STá&V ]ll'I‰ÅÈÐJUóUOŠÈÿêHp&Ò]_ÏÊ'V°]lÏ(]xÏ•(TïíÅðñ?ÕÑS€Þ(S €)S€L)Vð]#€‚)]/€Ë)I-ÆiÑJU}JT|JQ0[Ç ëŒÑJU}JT|JQ0[¡Çë«ÑJU `‹OµÇ%ëL×džêJT €‹[ÁÅ…ëìÑJU2IªÆÒJU}I»ÆÒJU|KÊÆJUvTyÆÐÆ ø?5ÔS–Æ'*SŠÆð*T£ÆëÆpÏ?ýÒSÀÆL+S´Æ®+Vp]ÌÆ÷+]ØÆ@,]䯉,IÇ´ÒJU}JTs[xÇëÓÒJU `‹OaÈ%ëL€È†êJT €‹UñÆÜǰÒ?SÇÒ,SÇ_-V°gÇ]&Ç•-TïöÇàÄ? ÔS€Þ-S €.S€_.Và]#€•.]/€Þ.I2ÈŸÓJUvJT|JQ0[žÈë¾ÓJU `‹[³È ëáÓJUvJT|JQ0O½È%ëLÜȆêJT €‹[æÇ…ë"ÔJU1KWÈJU|KBÇJUvK}ÆJUsj3;ðÈCœ8ëSP;'/S\;=5Sh;5pD;úD;ŸpD;úD;Ÿlt;Ël|;Ëb„;lŒ;¦Ìb”;lœ;åÓ]¤;W8]°;q:f¼;]È;©:]Ô;=]à;>]ì;€?]ø;«@]<ô@]<±A]<4C](<·T]4<^a]@<©a]L<Óh]X<Bi]d<¶i]p<ìi]|<}k]ˆ<QmH ªÕ]™<ànTÄ:Ê@ Þ9ïÕSÕ:oV@ ]ß:LoLžã@íJU~T‚:Ó ˆ8?ÖS“:‚oV ]Ÿ:ªo]«:äo]·:äoOÓÅêHÀ%cÖ]û<pK}ÔJUwTì:XÓð%´8¹ÖSý:£pVð%] ;Çp];+q]!;+qLbÓÅêJU1TÄ:žÓ &¸8þÖSÕ:‹qV &]ß:ÁqLŠÔ@íJU~Tì:µÔP&Æ8T×Sý:rVP&] ;%r];tr]!;trL¿ÔÅêJU2TÄ:óÔ€&Ê8š×SÕ:ÀrV€&]ß: sLúÕ@íJUwTì:*ÖÀ&Ø8ð×Sý:@sVÀ&] ;ds];³s]!;³sL4ÖÅêJU3TÄ:lÖð&Ü85ØSÕ:ÿsVð&]ß:5tLÅ×@íJU~Tì:ð× 'ê8‹ØSý:ktV '] ;t];Ét]!;ÉtLú×ÅêJU4TÄ:<ØP'î8ÑØSÕ:uVP']ß:KuLàØ@íJUwTì:%Ù'ü8ÙSý:uV'e ;f;f!;L/ÙÅêJU5TÄ:qÙÀ'9cÙSÕ:¥uVÀ']ß:ÛuLÉÙ@íJU~Tì:ðÙð'9¹ÙSý:vVð'] ;5v];Zv]!;ZvLúÙÅêJU6TÄ:<Ú (9ÿÙSÕ:~vV (]ß:ÈvL˜Ú@íJUwTì:ÄÚ`( 9UÚSý:þvV`(] ;"w];Gw]!;GwLÎÚÅêJU7TÄ:Û($9šÚSÕ:kwV(]ß:¡wLhÛ@íJU~Tì:ÛÀ(29ðÚSý:×wVÀ(] ;ûw]; x]!; xL™ÛÅêJU8TÄ:ÛÛð(696ÛSÕ:DxVð(]ß:ŽxL7Ü@íJUwTì:cÜ0)D9ŒÛSý:ÄxV0)] ;èx]; y]!; yLmÜÅêJU9TÄ:¯Ü`)H9ÑÛSÕ:1yV`)]ß:gyLÝ@íJU~Tì:.Ý)V9'ÜSý:yV)] ;Áy];æy]!;æyL8ÝÅêJU:TÄ:zÝÀ)Z9mÜSÕ: zVÀ)]ß:TzLÖÝ@íJUwTì:Þ*h9ÃÜSý:ŠzV*] ;®z];Óz]!;ÓzL ÞÅêJU;TÄ:NÞ0*l9ÝSÕ:÷zV0*]ß:-{L¦Þ@íJU~Tì:ÍÞ`*z9^ÝSý:c{V`*] ;‡{];¬{]!;¬{L×ÞÅêJU<TÄ:ß*~9¤ÝSÕ:Ð{V*]ß:|Luß@íJUwTì:¡ßÐ*Œ9úÝSý:P|VÐ*] ;t|];™|]!;™|L«ßÅêJU=TÄ:íß+9?ÞSÕ:½|V+]ß:ó|LEà@íJU~Tì:là0+ž9•ÞSý:)}V0+] ;M}];r}]!;r}LvàÅêJU>TÄ:¸à`+¢9ÛÞSÕ:–}V`+]ß:à}Lá@íJUwTì:Iá +²91ßSý:~V +] ;:~];_~]!;_~LSáÅêJU?TÄ:•áÐ+¶9vßSÕ:ƒ~VÐ+]ß:¹~Löá@íJU~Tì:â,Æ9ÌßSý:ï~V,] ;];8]!;8L'âÅêJU@TÄ:iâ0,Ê9àSÕ:\V0,]ß:¦LÎâ@íJUwTì:úâp,Ú9hàSý:ÜVp,] ;€];%€]!;%€LãÅêJUAH ,‹à]«<I€KeÍJU|HÐ,&á]½<¸€]É<àT_:ÆÏ-¾7ãàSl:c‚LþÏzêJT ˜Re4ðÐ4½7Sr4†‚LÑzêJT ŒJQ2Ty:pÏ@-Í7ZáL–φêJT HH-má]Û<ª‚HÀ-€á]í<à‚T‚:ŒÊ.Ü7ÐáS“:)ƒV.]Ÿ:Oƒ]«:„]·:„O™ÊÅêT‚:&Ë0.H8-âS“:à„V0.]Ÿ:>…]«:ö…]·:ö…O.ËÅêOºËÅêTÄ:^Ë€.L8râSÕ:¦†V€.]ß:܆L8Ì@íJUsT/7/ÐÀ.Ï7ãS@7‡SL7V‡Y—Ò4ÛâSL7º‡X@7L¼Ò†êJT i|[\иêóâJT~L¤ÐzêJT [•Éì'ãJT}[ùÉzêSãJT À|JQ º|[µÊ ìsãJU|JT‘¨[ØÊ:5‹ãJU~[GËMí®ãJUvJT|JQ0IÌÂãJUvI*ÌÖãJUv[¦ÌùäJU è|JR Û|I ÍäJUwI*Í+äJUsIÚÍ?äJU~IêÍSäJUsIúÍgäJU}I Î{äJU|IŠÎ‘äJU‘¨IžÎ¥äJU~[×ΆêÄäJT H[φêãäJT pO)Ñ%ë[œÑZÔ,åJU‘ #0JQJR‘°JX‘ˆtD;‘ [ÒïCåJQ0[Ò›ÍdåJU‘ˆt¥70[ZÒï{åJQ0[sқ͜åJU‘ˆt¥70IéÒ°åJUv[„ÓMíÖåJU‘¨JTwJQ2IÔìåJU‘ˆI&ÔæJU‘ˆ[ÝÔMí'æJU‘¨JT~JQ2IXÕ;æJU~IjÕPæJUw[VÖMívæJU‘¨JTwJQ2IÆÖŠæJU~IןæJUw[[×ï¶æJQ0[o×›ÍÖæJUwt¥70Iƒ×ëæJUw[ØMíçJU‘¨JT~JQ2I8Ø$çJU~IÙ8çJU~[QÙMí^çJU‘¨JTwJQ2IqÙsçJUwI±Ù‡çJU~[ÚMí¬çJU‘¨JT~JQ2I8ÚÀçJU~[ðÚMíæçJU‘¨JTwJQ2IÛûçJUwIPÛèJU~[·ÛMí4èJU‘¨JT~JQ2I×ÛHèJU~[ÜMínèJU‘¨JTwJQ2I¯ÜƒèJUwIïÜ—èJU~[VÝMí¼èJU‘¨JT~JQ2IvÝÐèJU~[.ÞMíöèJU‘¨JTwJQ2INÞ éJUwIŽÞéJU~[õÞMíDéJU‘¨JT~JQ2IßXéJU~[ÍßMí~éJU‘¨JTwJQ2Iíß“éJUwI-à§éJU~[”àMíÌéJU‘¨JT~JQ2I´ààéJU~[uáMíêJU‘¨JTwJQ2I•áêJUwIÕá/êJU~[EâMíTêJU‘¨JT~JQ2IeâhêJU~[&ãMíŽêJU‘¨JTwJQ2IFã£êJUwI†ã·êJU~[ÛãZíÑêJT‘¨[õã…ëèêJU1[äïëJTwJQ0[Nä›Í&ëJUwt¥70KbäJUw<(¨20Âì8É.¨2û!8k¨2C 8¨20=½'š4=e‰4=”Aa4=,"94=ûï3=DZe3=ç é5=L9-3=5&3=&ó5=#&ø59ó,©209›ª209«209“ ¬209wf­209ê®209‘¯2¨9œJ°2N!9ŸI±209_!²209T³209•bµ209Ÿb¶209©b·239³b¸209½b¹209Çbº239Ñb»2¨9#¼209"g½2Y9+¾20cé@FG0@èqœèóNobjFG3Þ‡E‰ FGC ›‰E;FG0uŠT =±èð.HGŠóS2=‹S&=ˆ‹S=9ŒVð.h>=SU8ë±èð.¡2SaëùSUëqŽSIë"Vð.lmëëluëëb}ël…ë-élë él•ë(ëbël¥ëêl­ëÌèbµël½ëÇê]ÅëâgÑë]Ýë.‘]éëR‘]õëR‘]ìž‘] ìý‘]ì•”h%ì‘D]1ìÉ•]=ì–]IìÁ–]UìÒ—]aìè™]mìž‘gyì]…ì”›]‘ì]ì8]©ìž]µìÔžTïê0/?3{ïS€ÀŸS €  S€} V0/]#€Ù ]/€¡IXêïJU|JQ0[ºî ë2ïJU|JQ0[øîëQïJU `‹O%ï%ëL@ï†êJT €‹Tï@ë/w3DðS€k¡S €·¡S€¢V/]#€]¢]/€“¢I€ëÞïJU|JQ0[Rï ëûïJU|JQ0[ˆïëðJU `‹O¥ï%ëLÀï†êJT €‹T‚:’ìà/5”ðS“:Ü¢Và/]Ÿ:ÿ¢]«:N£]·:N£OšìÅêTïþí0¬4]ñS€š£S €æ£S€C¤V0]#€Œ¤]/€Â¤I=î÷ðJU}JQ0[Ìï ëñJU}JQ0[÷ïë3ñJU `‹O ð%ëL%ð†êJT €‹[ZégíuñJUÿ[ˆéZÔ›ñJU|0JX‘DtD;|I²é¯ñJU|[tê›ÍÎñJUvt¥70[£êùúñJU }JR Û|[œë›ÍòJUvt¥70[µìZí1òJTv[Öì…ëHòJU1[óìïeòJTvJQ0[í›Í„òJU}t¥70IBí˜òJU}I€í¬òJU}IíÀòJUvIÝíÔòJUv[Yî›ÍóòJUvt¥70I‰îóJUvIïóJU}I1ð/óJUvI@ðCóJUv[}ðùvóJU }JQ JR Û|K¥ðJUv[ètí®óJUvJTsJQ|O©è¸ê[øézêÚóJT ÀOJðõê\e=ÀðYœëõSv= ¥S‚=j¥Sš=ߥS¦=A¦S½=ɦlÉ=òi±=pŽ= '&ŸYñÓ·ôhÒ=‘W¯pñÁM©p>ú>Ÿb#>l+>cøl3>ëö];>fª]G>|¬]S>›­]_>¼®]k>ô®hw>‘Ð~]ƒ>d±]>š±]›>µ²]§>´]³>'µ]¿>Ķ]Ë>a¸]×>Ö¹]ã>•»]ï>¾]û>a¿]?…À]?áÀ]?Á]+?¼®]7?vÁ]C?<Â]O?ÃH`0 ùh`?‘À~Ue=Gó`0›1SŽ=ÎÃS±=jÄS½=ÞÄS¦=…ÅSš=ùÅS‚=mÆSv=ïÆV`0lÉ=ëúY óöí÷hÒ=‘ð}W¯p óàý03Ä?ÝûS€!ÏS €mÏS€ÉÏV03]#€Ð]/€[ÐI€ýqûJU~JTJQ0[2þëûJU `‹[¨þ ë³ûJU~JTJQ0Oµþ%ëLÔþ†êJT €‹[*ý…ëôûJU1KUþJUTÄ:köp3ð1NüSÕ:¤ÐVp3]ß:ïÐL÷@íJU‘è}TïŒû°3ë1#ýS€/ÑS €ÑS€þÑV°3]#€ZÒ]/€£ÒIÍû·üJU}JTJQ0[mü ëÚüJU}JTJQ0[–üëùüJU `‹Oñü%ëLý†êJT €‹Tà=ëö 4L2ZýSí=ÿÒL!÷÷|JU‘Ø~HP4‡þ]Ž?dÓ]š?ÓÓ]¦?BÔTà=®÷°4F2µýSí=±ÔLø÷|JU‘Ø~Wº7·÷(E2þSß7ÕSÓ7>ÕSÇ7fÕQ·÷(]ê7ŽÕU‡Äøð4G2S¬Ä±ÕS Ä ÖS”ÄiÖVð4]·ÄÅÖ]ÃÄ×]ÏÄm×]ÛÄÊ×ISøtþJUsKšøJUv[×ôíŸþJUvOPõŽí[ÆõéêÈþJa‘¸}ö)I:÷ÜþJUs[_øèÄûþJU €‘IÏøÿJU}[îøÀ¶&ÿJT0Oùéê[2ù…ëJÿJU1[QùÀ¶gÿJU~JT0[pùÀ¶~ÿJT1Iºù’ÿJU~INú¦ÿJUIfúºÿJU~I£úÎÿJUs[sû…ëåÿJU2IúûùÿJUIÏý JUsOÞþõêcÕT23àþäœÎEPT23ØE×'T23žØd&b2¶=ç `2u#U20u"gV2Yu+W20FTX23¡ÙTá6 ÿ@5[2¡S 7OÚS"7›ÚS7çÚSþ6KÛSò6”ÛYH,XL7X@7L^†êJT i|W340+)AŒSL4óÛSX4ÜS@49ÜL[zêJT °‘JQ )}L(¸êJTvT7U/ÿ€5\2ÀSHUeÜSTUöÜV€5l`U¶lhU…lpUhgxUh„U‘à~]U½Ý]œUlÞ]¨Uß]´U¿ß]ÀUàHð5hÑU‘Ð~Ue=/ÿ`6w2SŽ=ZáS±=ÚáS½=:âS¦=ËâSš=+ãS‚=‹ãSv=çãV`6lÉ=‚YlÿÚ hÒ=‘€~W¯plÿÄ0O|éêLùJU €‘JQ üJR °‹O°õêjÎIÐFœËSßIµëSëIíS÷IZîpJúJŸlJ5 lJBlJÙ]'J¨ï]3JÆò]?Jyô]KJ,÷]WJºùhcJ‘Ð~]oJXý]{J¾ý]‡J þ]“JŸ]ŸJ]«J2]·J;]ÃJ1 ]ÏJ]ÛJñ]çJÆ]óJ‘]ÿJ] Kn]KÐ]#Kæ]/KH8äh@K‘À~Ue=ö8 0SŽ=S±=´S½=(S¦=ÏSš=CS‚=·Sv=AV8lÉ=é YaõáhÒ=‘ð}W¯paß)S@q>)S(qÞ(SqÞ(Sqž)SqA*Søp¥*H<¸ bdq]lq +]wqV+Hp<œ ]“q¸+]Ÿqî+]«q],]·q¹,H°<o ]Äq-]Ðq‰-[Ú'ì JU‘È}[ó'ì* JU‘Ø}[ÑìJ JUJT‘È}Iß^ JUKgJUIC‹ JU‘À}JT}K[JU}LÁzêJT (KT JU‘À}JT‘È}JQv $ &Hð<]rKý-O4 %ëOQ ”ìOÑnêH =,]„K3.Tï\ P=³0ñS€V.S €¢.X€VP=]#€þ.]/€G/I® ‹JT}JQ0[& ë¨JT}JQ0[^ëÇJU `‹O}%ëLŸ†êJT €‹TÛ{Í °=¶0PSø{¥/Sì{ð/V°=]|&0] |o0L’êJU~JT‘Ø}Tïà=p0%S€º0S €1S€b1Và=]#€ä1]/€-2IǹJUJTsJQ0[5 ëÜJUJTsJQ0[aëûJU `‹O‹%ëL¦†êJT €‹H0>R]’Kv2]žKû2]ªKj3Tà=z>í0€Sí=Ù3LÖ÷|JU‘Ø~Wº7ƒ'ì0ÓSß7>4SÓ7f4SÇ7Ž4Qƒ']ê7¶4U‡ÄÖÐ>î0S¬ÄÙ4S Ä55S”Ä‘5VÐ>]·Ä6]ÃÄN6]ÏÄ«6]ÛÄ7I% ?JUsKŠ JUvTà=o ?ó0ˆSí=Q7L¢÷|JUsOò›í[^éê°Jawö)IŠÄJU}IêØJUI)ìJU~[1 èÄ JU ø‘IQ JU|Iš 3JUsIº GJU}I [JU~[ ‘ërJU0[~ ¨íŠJUI žJU~[P …ëµJU1v ‘È}ÎJUs[j µíæJT~[Š …ëýJU2[½ À¶JU~JT1Iå .JU~IG BJU}[m…ëYJU2IómJUsIJJUI®•JU}Ió©JUsI½JU~OÉõêcMg¸/3 䜣EP¸/3£7E×'¸/3.8d&Æ/˜=ç Ä/u#¹/0u"gº/Yu+»/0FT¼/3ƒ9Tá6I€?¿/QS 71:S"7}:S7É:Sþ6-;Sò6v;YxÜXL7X@7LކêJT i|W340+)A<SL4Õ;SX4ø;S@4<L[zêJT °‘JQ )}L(¸êJTvTëVoÀ?À/•SüVG<SWØ<VÀ?lW˜lWgl$WPg,Wh8W‘ð}]DW>]PWô>]\W?]hWo@]tWƒAH0@Æh…W‘à~Ue=oÐ@Û/SŽ=ŒBS±=(CS½=œCS¦='DSš=›DS‚=ESv=~EVÐ@lÉ=²Y¬íÄhÒ=‘}W¯p¬ÔñS‚=^NSŽ=NSš=­NS¦=ÑNS±=õNS½=OSv=?OQ³>lÉ=³RK=³>ICSX=?O[ìÂìJUsJT|JQL[±zê3JT 0‘LÄzêJT ðJQ1Tà= @C°/Sí=eOLS÷|JU‘è~HpCª]`LÊO]lL&P]xL‚PTº7ñÀC©/ôSß7ÞPSÓ7QSÇ7^QVÀC]ê7žQT‡ÄD«/vS¬ÄÔQS ÄRS”ÄfRVD]·Ä¯R]ÃÄúR]ÏÄDS]ÛÄŽSI dJUsK¢JUvUà=z@Dª/Sí=×SLÉ÷|JU‘è~[ íÂJUs[ ÎæJUsJT0tJ0L<èÄJU (’Tà=g€Dð/:Sí=1d²E81òdEc41!d\21à =&@1F×'ý0û!ï]9o@þ009œ<ÿ00F#10 _F"g1Yý_F+10 aFT13bHàEj)_}W1On € &_¿G1~/‘à~HpFû F< 12\bFÇ 1d"õbWlIŸ$9 1ªS©IwcSI›cS‘I›cS…I¿cSyIãcQŸ$9]µId]ÁI3dLØ$zêJT P’JQ ;}JR 3}JX3JY ~WlI«(91_ S©I_dSIƒdS‘IƒdS…I_dSyI§dQ«(9]µIÓd]ÁI÷dLä(zêJT P’JQ ;}JR 3}JX3JY ~[Y"Áíw JU|[€" ì JU|[" ì§ JU|[¾" ì¿ JU|L(‹°JU|JT € &JQ‘à~JRvJX ;}T:5ˆÐF.1%%SK5#eVÐFlU5#b]5]e5±e]q5if]}5ifYžm!]Ž5gHpGW"]®5$%È%]6XoYc$(ç%]ã5{oY‹$ &]Ñ5žoY”$ %&]¿5ÂoQ]!+]Ÿ6ûoYs!k&]¬6pO~!%ëLe!(íJU}H`I2)SK5BpV`IbU5b]5ge5gq5g}5V`Ig¼6gÈ6T?É(ðIHŽ'SPÉBpVðI]ZÉ‹p]dÉÁp]pÉkq[B(í'JU}[)zê8'JT HI”)L'JUv[«)íd'JU}O¿)%ëLÞ)†êJT £|T:5m(0JH)SK5rV0JlU5 *b]5]e5rr]q5Ár]}5ÁrY((]Ž5 sH Jê(]®50sYã)&q(]Ÿ6sYù)\(]¬6¢sO*%ëLë)(íJU}Yr+ (]¿5ÆsY}+(¯(]ã5tY¥+ Î(]Ñ5$tQ®+%]6Ht[*†ê )JT xL÷+}ÉJU}K¦(JU}Lž!†êJT xO£!%ëO%#%ëTá6ùðJ91W*S 7ktS"7·tS7uSþ6guXò6Yè$æ)XL7X@7Lþ$†êJT i|W34Ð%,)AB*XL4SX4°uS@4ÓuLü%zêJT °‘JQ )}LÈ%¸êJT}TV0K:1ˆ.SVÿuS:V©vS.VQwX"VV0KlFV£ lNV| lVV&g^VhjV‘à~]vV­w]‚Vnx]ŽVDy]šV:z]¦VN{H°KË,h·V‘Ð~Ue= LU1SŽ=W|S±=×|S½=7}S¦=È}Sš=(~X‚=Sv=ˆ~V LlÉ="%YZÜÍ+hÒ=‘€~W¯pZÆYU0%7hÒ=‘°zW¯pU0UK=Ü>QICSX=T [<0Âìé7JU~JT‘Ø~JQL[Ù>zê8JT 0‘L9KzêJT ðJQ1HÀQ:hªP‘€{Ue=£1 R× SŽ=z S±=S½=ŠS¦=1Sš=¥S‚=Sv=V RlÉ=EYú19hÒ=‘°zW¯pú1ÿP/C,9SX=HR¦9S‚=4SŽ=XSš=„S¦=¨S±=ÌS½=ðSv=VRlÉ=EUK=ERICSX=[á1ÂìÌ9JU‘ÐxJT‘ˆ|JQL[Ezêð9JT ðJQ1L‡IzêJT 0‘HÀRï;h¼P‘€{Ue=C30SÜ SŽ=<S±=ØS½=LS¦=óSš=gS‚=ÛSv=JV0SlÉ=FY•3é:hÒ=‘°zW¯p•3]0Qw]JUsKòAJU~Y°ZŠ>]Q`YÂ\©>]"QƒHVX?]òP¦]þPïT_:ŒZV1 ?Sl:L L‰gzêJT ˜We4#h0 G?Sr4o L@hzêJT ŒJQ8K¤QJUvT‚:`ðVÕµ?S“:“ VðV]Ÿ:¶ ]«:Û ]·:Û L`ÅêJUs $ &Wà="`5üð?Sí=ÿ LW`÷|JU‘˜{Wà=W`5ý+@Sí=N!LŒ`÷|JU‘ˆ|Wà=Œ`5þf@Sí=!LÁ`÷|JU‘ø|Wà=Á`5ÿ¡@Sí=ì!Lö`÷|JU‘è}Wà=ö`>Ü@Sí=;"L/a÷|JU‘Ø~[µ5éêø@Ja‘ˆyö)[Ì5éêAJa‘èxö)[è5éê0AJa‘àxö)[6…ëGAJU3[+6éêcAJa‘ðxö)[B6éêAJa‘èxö)[[6éê›AJa‘àxö)[v6…ë²AJU3[ž6éêÎAJa‘ðxö)[µ6éêêAJa‘€yö)[Ñ6éêBJa‘àxö)[ì6…ëBJU3[7éê9BJa‘ˆyö)[+7éêUBJa‘€yö)[D7éêqBJa‘àxö)[_7…ëˆBJU3[Œ7éê¤BJa‘ˆyö)[¨7éêÀBJa‘èxö)[Î7éêÜBJa‘yö)[î7…ëóBJU3[ 8éêCJa‘ðxö)[K8éê+CJa‘èxö)[q8éêGCJa‘yö)[«8…ë^CJU3[å8éêzCJa‘ðxö)[ 9éê–CJa‘€yö)[c9éê²CJa‘yö)[“9…ëÉCJU3[Õ9éêåCJa‘ˆyö)[ :éêDJa‘€yö)[V:éêDJa‘yö)[°:…ë4DJU3[;‘ëKDJU8[˜;‘ëbDJU0[ü;‘ëyDJU0[X<Íí“DJU‘Ðy[q<ï¶DJUJT}JQ0[è<…ëÍDJU1[ =ïêDJTsJQ0[,=Û{ EJU‘ØxJTv[MAùGEJU ’JTw”JQ‘Ðx”JR °‹I§A[EJUI BqEJU‘ÈxIªB‡EJU‘ØxIÓB›EJUsIC¯EJU}IcCÃEJU~IãG×EJU|IxHëEJUvIÕLÿEJU}IMFJUs[³P†ê2FJT HOéPõêIQSFJUs[ RÚímFJU‘Øy[ÙRÚí‡FJU‘ày[…SÚí¡FJU‘èy[TÚí»FJU‘ðy[}TÚíÕFJU‘øy[ÉTÚííFJU~IûTGJU~[ UÚíGJU}I@U-GJU}[RUÚíEGJUsI„UYGJUs[UéêuGJa‘ˆyö)[´Uéê‘GJa‘èxö)[ËUéê­GJa‘àxö)[âUéêÉGJa‘ðxö)[ùUéêåGJa‘€yö)[VéêHJa‘yö)[FV…ëHJU6[‘Væí2HJT‘z[ÕV‹¼LHJU‘zIõVbHJU‘z[Wéê~HJa‘Ðyö)[%WéêšHJa‘Øyö)[OWéê¶HJa‘àyö)[‰WéêÒHJa‘èyö)[»WéêîHJa‘ðyö)[íWéê IJa‘øyö)[Xéê&IJa‘€zö)[QXéêBIJa‘ˆzö)[‡X…ëYIJU8[êXæísIJT‘z[.Y‹¼IJU‘zINY£IJU‘zO†YÍí[¨YïÎIJTwJQ0[ÞY…ëåIJU2[ZÀ¶JJUwJT1I5ZJJUw[SyI+>Q›z9]µIW>]ÁI{>LÔzzêJT P’JQ V}JR E}JX9JY ~WlIàz9 »RS©I§>SIË>S‘Iï>S…I?SyI7?Qàz9]µIc?]ÁI‡?L{zêJT P’JQ V}JR E}JX9JY ~WlIâ{9 pSS©I³?SI×?S‘Iû?S…I@SyIC@Qâ{9]µIo@]ÁI“@L|zêJT P’JQ V}JR E}JX9JY ~WlI)|9 %TS©I¿@SIã@S‘IAS…I+ASyIOAQ)|9]µI{A]ÁIŸALb|zêJT P’JQ V}JR E}JX9JY ~WlIy|9 ÚTS©IËASIïAS‘IBS…I7BSyI[BQy|9]µI‡B]ÁI«BL²|zêJT P’JQ V}JR E}JX9JY ~WlI¿|9þ US©I×BSIûBS‘ICS…ICCSyIgCQ¿|9]µI“C]ÁI·CLø|zêJT P’JQ V}JR E}JX9JY ~WlI}9ù DVS©IãCSIDS‘I+DS…IODSyIsDQ}9]µIŸD]ÁIÃDLI}zêJT P’JQ V}JR E}JX9JY ~WlIŽ}9ô ùVS©IïDSIES‘I7ES…I[ESyIEQŽ}9]µI«E]ÁIÏELÇ}zêJT P’JQ V}JR E}JX9JY ~[‘oÁíWJU~[·r ì)WJU~[Ør ìAWJU~[ùr ìYWJU~[s ìqWJU~[;s ì‰WJU~[\s ì¡WJU~[}s ì¹WJU~[žs ìÑWJU~[Lt ìéWJU~Ly‹°JU~JT @&JQ}JR|JX V}T:5×jpX> N\SK5ûEVpXlU5`pb]5]e5ƒF]q5G]}5GYîj–X]Ž5HH Y€Y]®5²HYÀqÇX]¿5òHYÐq0æX]ã5+IYrY]Ñ5NIYr'$Y]6rIQ0p0]Ÿ6•IYFpjY]¬6¸IOQp%ëL8p(íJU|HPY1\SK5ÜIVPYbU5b]5ge5gq5g}5VPYg¼6gÈ6T?É®oÐYHZSPÉÜIVÐY]ZÉ(J]dÉ^J]pÉK[ÍozêZJT HIÞo3ZJUv[~xíKZJU|[v}ícZJU|Oý}%ëL~†êJT £|T:5©x0ZH\SK5 KV0ZlU5ab]5]e5üK]q5KL]}5KLY»xÿZ]Ž5—LHZé[]®5ºLY0 0[]¿5 MY<%O[]ã5DMYŠ n[]Ñ5gMY”$[]6‹MQ¨‚3]Ÿ6®MY¾‚Ó[]¬6ÑMOÍ‚%ëL°‚(íJU|[w†ê\JT xL¡‚}ÉJU|KäxJU|Lvp†êJT xT:5kàZ? x`SK5õMVàZlU5 qb]5]e5ŠN]q5êO]}5êOY%kÀ\]Ž5:QH[ª]]®5]QY?r)ñ\]6—QYhr(]]ã5ºQYr /]]Ñ5ÝQY™rN]]¿5RQùp']Ÿ6:RYq”]]¬6]ROq%ëLq(íJU}HÀ[[`SK5RVÀ[bU5b]5ge5gq5g}5VÀ[g¼6gÈ6T?É{p@\H·^SPÉRV@\]ZÉÝR]dÉS]pɽS[špzêI^JT HI¬p]^JU|[Eyíu^JU}[é}í^JU}O†~%ëL¥~†êJT £|T:5qy \HH`SK5UTV \lU5ûb]5]e5±T]q5U]}5UYƒy)_]Ž5LUH]`]®5oUYÔ'š_]Ÿ6©UYë…_]¬6ÌUOö%ëLÜ(íJU}YN€ ¹_]¿5ðUYZ€)Ø_]ã5+VYƒ€ ÷_]Ñ5NVQŒ€&]6rV[€†ê2`JT xLƒ}ÉJU}K«yJU}L6q†êJT xT:5Gk@]@ ¢dSK5•VV@]lU5xqb]5]e5*W]q5uX]}5uXY]kê`]Ž5±YHð]Ôa]®5ÔYYMq+[a]Ÿ6ZYeqFa]¬61ZOpq%ëLUq(íJU}YÚtza]¿5UZYët-™a]ã5ŽZYu ¸a]Ñ5±ZQ%u']6ÕZHp]…dSK5øZVp]bU5b]5ge5gq5g}5Vp]g¼6gÈ6T?Éøy ^HábSPÉøZV ^]ZÉT[]dÉŠ[]pÉ4\[&zílbJU}[G~zê‹bJT HI[~ŸbJU}[r~í·bJU}O¯~%ëLÎ~†êJT £|T:5Qzp^HrdSK5Ì\Vp^lU5hb]5]e5N]]q5²]]}5²]YczSc]Ž5^Hð^=d]®55^Y4„c]¿5„^YC%£c]ã5¿^Y–$Âc]6â^YÜ ác]Ñ5_QÛ‚5]Ÿ6)_Yó‚'d]¬6L_Oƒ%ëLã‚(íJU}[~†ê\dJT xL„}ÉJU}KŒzJU}LŽq†êJT xT:5kP_F ¡hSK5p_VP_lU54vb]5]e5`]q5&a]}5&aY¸ke]Ž5:bH`÷e]®5]bYôu Ee]¿5¬bYÿu)de]ã5åbYMv ƒe]Ñ5cYVv*¢e]6,cQ°yH]Ÿ6OcYÐy(èe]¬6rcOßy%ëO½y(íHP`„hSK5–cVP`bU5b]5ge5gq5g}5VP`g¼6gÈ6T?ÉLuÐ`HðfSPÉ–cVÐ`]ZÉßc]dÉd]pÉ¿d[uuzê–fJT HIu¬fJU‘¨~OY{íOî~íOÙ€%ëLý€†êJT £|U:5‰{0aHSK5eV0alU5)‚b]5]e5+f]q5zf]}5zfY›{^g]Ž5ÆfH°aJh]®5éfYî#g]ã5QgY ƒ ®g]¿5tgY+ƒ Íg]Ñ5¯gY4ƒ%ìg]6ÓgQsƒV]Ÿ6ögYƒ,2h]¬6hO¶ƒ%ëL…ƒ(íJU‘ ~[1‚†êihJT xLêƒ}ÉJU‘ ~LCv†êJT xTÄ:äkbH ßhSÕ:=hVb]ß:shOl@íTÄ:ðlPbN iSÕ:³hVPb]ß:éhO m@íO2l%ëOMm%ëOåo%ëOµp%ëO“q%ëO¢u%ëWlIZlLU jS©I)iSIMiS‘IqiS…I•iSyI¹iQZlL]µIåi]ÁI$jL¦lzêJT P’JQ V}JY ~Tá6tmb[ jS 7GjS"7GjS7“jXþ6Sò6÷jR34¤v)ASL4@kXX4S@4ckTá6‘mÐb\ 0kS 7kS"7ïkS7OlSþ6ÏlSò6]mW34ht+)AkSL4¹mSX4ÜmS@4nL“tzêJT °‘L›n¸êJT‘¨~Tá6°m c] ÄkS 7@nS"7ŒnS7ØnSþ63ÊFA?3ƒFôf@3p„FŒA3Ã…F|YB3‡FyC0iˆF#D0„ŠF"gEY¨ŒF+F0 FTG3c‘Hdy_}WK-n À &_¿GL=n‘Ð~H eÎxF<N2ÑFÇOd"¹’YÝ apFŠ1™3š“Lì ìJU|WlIÿš9•qS©I½“SIá“S‘I”S…I)”SyIM”Qÿš9]µIy”]ÁI”L8›zêJT P’JQ ‚}JR E}JX;JY ~WlI€›9ËqS©IÉ”SIí”S‘I•S…I5•SyIY•Q€›9]µI…•]ÁI©•L¹›zêJT P’JQ ‚}JR E}JX;JY ~WlIê›9‹€rS©IÕ•SIù•S‘I–S…IA–SyIe–Qê›9]µI‘–]ÁIµ–L#œzêJT P’JQ ‚}JR E}JX;JY ~WlI?œ9†5sS©Iá–SI—S‘I)—S…IM—SyIq—Q?œ9]µI—]ÁIÁ—LxœzêJT P’JQ ‚}JR E}JX;JY ~WlI„œ9êsS©Ií—SI˜S‘I5˜S…IY˜SyI}˜Q„œ9]µI©˜]ÁI͘L½œzêJT P’JQ ‚}JR E}JX;JY ~WlIåœ9|ŸtS©Iù˜SI™S‘IA™S…Ie™SyI‰™Qåœ9]µIµ™]ÁIÙ™LzêJT P’JQ ‚}JR E}JX;JY ~WlIž9wTuS©IšSI)šS‘IMšS…IqšSyI•šQž9]µIÁš]ÁIåšLÆžzêJT P’JQ ‚}JR E}JX;JY ~WlIôž9r vS©I›SI5›S‘IY›S…I}›SyI¡›Qôž9]µIÍ›]ÁIñ›L-ŸzêJT P’JQ ‚}JR E}JX;JY ~WlIzŸ9m¾vS©IœSIAœS‘IeœS…I‰œSyI­œQzŸ9]µIÙœ]ÁIýœL³ŸzêJT P’JQ ‚}JR E}JX;JY ~WlIÀŸ9hswS©I)SIMS‘IqS…I•SyI¹QÀŸ9]µIå]ÁI žLùŸzêJT P’JQ ‚}JR E}JX;JY ~[8‰ ì‹wJU|[IŒÁí£wJU|[Œ ì»wJU|[£Œ ìÓwJU|[ÇŒ ìëwJU|[댠ìxJU|[ ìxJU|[3 ì3xJU|[W ìKxJU|[{ ìcxJU|[Ÿ ì{xJU|[àì“xJU|LŽ‹°JU|JT À &JQvJRsJX ‚}TÄ:/…àe¾ ySÕ:5žVàe]ß:ožOŠ@íOŠ%ëTVQ]… fË?†SgQ¯žS÷Q  XëQXßQXÓQXÇQX»QX¯QX£QX—QS‹Qü¡SQƒ£SsQ ¥V flRˆžl RØšlR‰bRl#Rk¤]+R§¦]7R%ª]CRQ­]ORß­][R‚®]gRO¯]sR–±]R5³]‹R¿´]—RFº]£R½»]¯RÀ]»R0Å]ÇRmÍhÓR‘¸~hßR‘À~]ëRÒ]÷RžÕhS‘È~]SÅ×]S0Ú]'SÛ]3StÛ]?S€Ü]KSßÜ]WSLÞ]cSÜÞ]oS›á]{Svã]‡Sêã]“SNè]ŸSê]«SÚëH g{]¼SŽíVPg]ÉSÄíTïO‘€gsÙ{S€úíS €ZîS€¸îV€g]#€ï]/€JïIŒ‘s{JUvJQ0[â™ ë{JUvJQ0[šë¯{JU `‹O‡š%ëL¦š†êJT €‹TÄ:J’àg† |SÕ:¦ïVàg]ß:ðL “@íJU‘¨}TÄ:^“ h—g|SÕ:DðV h]ß:¢ðLR›@íJU‘¨}H`h¡|]îSâðOÇ¥%ëO䥔ìOªnêHhÛ|]TñOÁ %ëOÞ ”ìO ªnêHÐh}]TNñQ%§ gTK=§JU~Hi8}].T—ñK…¤JUvTÄ:É£0i }SÕ:àñV0i]ß:>òLɤ@íJU‘È}TÄ:+¤pi0 Æ}SÕ:~òVpi]ß:ÜòL¥@íJU‘È}H°i~]ÜSóOÞ¡%ëOû¡”ìOéªnêTÄ:«šàižC~XÕ:Vài]ß:RóLDŸ@íJU‘È}[«…ìa~JU|JT[Æ…o´y~JU}[Ý…Ïë—~JUsJT[†Úí¯~JUv[N†ìÈ~JUw[n†o´à~JU}[ІÏëJU‘°}JT[ȆÚíJUs[‡ì2JU‘ }[‡o´JJU}[2‡ÏëhJUsJT[k‡Úí€JUv[‡éêœJa‘˜}ö)[´‡éê¸Ja‘°}ö)[ˇéêÔJa‘Ð}ö)[ˆ…ëëJU3[‰ù(€JU À’JTw”JQ‘˜}”JR °‹I‰<€JUvI;ŠP€JU|ITŠd€JUI|Šx€JUsI"‹Œ€JU~I:‹ €JU}IZ‹´€JUsIn‹È€JUI‚‹Ü€JUvIºŽð€JUIÊŽJU‘°}IÚŽJUsI*.JUI:BJUsIjVJUvO•%ëO5%ëOÅ%ë[ô‘Úí•JUvO ’éê[>’MíÇJUvJT‘¨}JQ1Ið’ÛJUv[R“Mí‚JUvJT‘¸}JQ5[º“Ú}‚JQ2JR0[ð“Q¿Q‚JU|JT0JQ0JR‘ ~JX‘È~JY0ON”¨íOR•Úí[§•Ú}‡‚JQ2JR0[Ù•Q¿À‚JU‘}JT0JQ0JR‘ð}JX‘è}JY0O7–¨íOè–Úí[=—Ú}ö‚JQ2JR0[r—Q¿/ƒJU‘ }JT0JQ0JR‘€~JX‘ø}JY0[É—¨íIƒJU‘È}[q˜ÚíaƒJU|[£˜éê}ƒJa‘¨}ö)[¼˜éꙃJa‘¸}ö)[Ó˜é굃Ja‘È}ö)[þ˜…ë̃JU3[¢™…ëãƒJU4O/š%ë[Léê „Ja‘˜}ö)[héê(„Ja‘°}ö)[‰éêD„Ja‘Ð}ö)[©…ë[„JU6O&žæíObž‹¼I€ ‰„JU|w¨ ‘à}O—¡%ëwÈ¡‘°}[­¢ïׄJUsJT‘Ð}JQ0[ô¢éêó„Ja‘¨}ö)[ £éê…Ja‘¸}ö)["£éê+…Ja‘È}ö)[:£…ëB…JU4[o£æíZ…JT[’£‹¼t…JU‘È}[½£Mí‘…JU|JQ1[¤Mí®…JU|JQ5I”¤Â…JUsI£¤Ø…JU‘Ð}O€¥%ëw±¥‘Ø}O)¦%ë[W§…ë†JU4I$¨-†JU‘È}K8¨JUWlIP‰KÅâ†S©I’óSI¶óS‘IÚóS…IþóSyI"ôQP‰K]µINô]ÁI†ôL›‰zêJT P’JQ ‚}JY ~[º‰ù‡JU À’JQ*JR °‹O’¦õêBç[”3@«?œEP”3©ôE _”34õE—U”3vödEcÌç¬d\ʨ¬d²EП«FBB•3¸÷F¡/–3UøF›—3òøF#˜0ùF"g™Y{úF+š0‡ûuT›3HjlŠ_}WŸOn   &_¿G ~/‘ V€jF<¢2ŽüFÇ£d"'ýWlI®9¸‰S©I©ýSIÍýS‘IÍýS…IñýSyIþQ®9]µIAþ]ÁIeþLM®zêJT P’JQ “}JR 3}JX3JY ~WlIް9³ωS©I‘þSIµþS‘IµþS…I‘þSyIÙþQް9]µIÿ]ÁI)ÿLǰzêJT P’JQ “}JR 3}JX3JY ~[V­Áíç‰JU|[}­ ìÿ‰JU|[š­ ìŠJU|[»­ ì/ŠJU|LN°‹°JU|JT   &JQ‘ JRvJX “}T}TŸ«àjÑSŽTUÿS²TS¦T:SšT_Vàjb¾TlÆTÿ«bÎT]ÖT„]âT4]îT4]úT‚gU]U³]Uï]*U/WÏ]FÏ· ]RÏ TC€®àlá?ÒŒS`ÑST± Vàl]lú Iœ®¨ŒJUsIê°¼ŒJUsLw±ÿêJUsH0m!Ž]_ÏX Vpm]lÏ´ ]xÏI Tﯰmñ?ÐS€¥ S €Ý S€ V°m]#€I ]/€’ ID¯dJU~JT}JQ0[± ë‡JU~JT}JQ0[/±ë¦JU `‹OC±%ëLe±†êJT €‹[×®…ëçJU2Ij°ûJU~Iy°ŽJU}K‰°JU|[°yÆ?ŽJU|JTvK+°JU|K”¯JUv[Á«‘ë{ŽJU1[ç« îŸŽJU|JT}JQsIÿ«³ŽJUs[;¬ìÑŽJU|JT}[ ®ùýŽJU ð’JR °‹KƯJUsWlI¨¬8ËÄS©Iî SIS‘IS…I6SyIZQ¨¬8]µI†]ÁIªLà¬zêJT P’JQ “}JR 3}JX3JY ~[ÿ¬ùõJU ð’JQJJR °‹Oo±õêj h€±2(œê¤ShÖS&hÒS2h¡S>hGSJhSVhspbhúbhŸlnhƒ¿bvhl~hÀb†hbŽhl–h«À]žhJ]ªhG]¶h›]Âhï]ÎhÏgÚh]æh]òhS ]þh‰!] i"]ig5]"il6].i6]:i²6]FiÕ6]RiI7]^iì7]ji8]vi9]‚i«9]Ži9:]šiÇ:]¦iQ;]²iÌ>]¾i„?]ÊiÛA]ÖiC]âi£C]îióE]úi4I]j°M]jV]j‚W]*j÷_]6jC`]Bjø`]NjØa]ZjJc]fjd]rje]~j¶h]Šjj]–j´k]¢j'o]®j‚q]ºjPt]Æjªu]Òj y]ÞjÎ}]êjЀ]öj‚]kÀ‚]kê…]kˈ]&kîˆ]2kŠ]>kL‹HàmÍ’]OkjŒOà³%ëO´”ìOàÆnêH nð’]ak ŒK²¿JUTC^³Pn‹R“S`STŽVPn]l×I~³<“JU}LVÅÿêJU}TÛ{г n¯“Sø{ ŽSì{VŽV n]|ŒŽ] |ÕŽL{Ã’êJU~JTsTÏg$´Ðn1ä“XêgXàgVÐngôghþg\TÏg.´oD”XêgXàgVogôghþg]TÏg´0oWN”XêgXàgV0ogôghþgQTÛ{?µ`o¾«”Sø{ Sì{iV`o]|Ÿ] |ûLÆ’êJU~JT}TÛ{uµoÁ•Sø{FSì{|Vo]|²] |èL0Ç’êJUvJT~HÀoF•]ûk3‘Qµ¾]l‘KžJUsTÄ:/¿ðoF‹•SÕ:Å‘Vðo]ß:û‘LúÊ@íJUvYÍ1ו]l1’Q-Í!]$lz’KNÍJU‘È}TÄ: Î0p„–SÕ:Ú’V0p]ß:“LeÎ@íJU~HppZ–]ÛkF“QF¼]èk¢“KX¼JU|TÄ:ļ pñŸ–SÕ:Ø“V p]ß:”LòÕ@íJUvHàp–]©kD”KK¹JUsHqô–]»k”V@q]ÈkÔKVÙJU}TÄ:Dºpqœ9—SÕ: •Vpq]ß:B•L9Ø@íJUvH°qs—]skx•O½Ö%ëOÚÖ”ìOQ×nêY9·¢—]…k®•KN·JUYÞ·Ñ—]—k –Kõ·JU|T‚:ZÊðqº-˜X“:Vðq]Ÿ:-–]«:g–]·:g–LdÊÅêJU ‘˜~” $ &T‚:pÊ r¼‰˜X“:V r]Ÿ:Ÿ–]«:Ù–]·:Ù–LzÊÅêJU ‘ ~” $ &T‚:†ÊPr¾å˜X“:VPr]Ÿ:—]«:K—]·:K—L”ÊÅêJU ‘¨~” $ &[Ʊíÿ˜JU‘è}[ø±í™JU‘Ø}[²í3™JU‘à}[A²‘ëJ™JU0[z²¨íd™JU‘Ð}vϳ‘¸}}™JU|[´‘ë”™JU0[è´‘ë«™JU0[µ‘ë™JU0[3µ‘ëÙ™JU0[ƵÛ{ù™JU‘À}JTv[ùµíšJU‘è}[¶í-šJU‘Ø}[&¶íGšJU‘à}[{¶¨íašJU‘Ð}OZ·̾[u·C†šJU~I‘·ššJU~[ž·îºšJU‘€~JTvI¿·ΚJUv[зCèšJU‘€~[;¸¸º›JU‘è}JT ‘” $ &JQ0JR0[`¸Úí3›JUvI“¸G›JUv[À¸¸ºŸ›JU‘è}JT0‘°‘ð}”‘”" $ &‘°‘ð}”‘”" $ &,(JQ0JR0[å¸Úí·›JUvI¹Ë›JUv[\¹Cå›JU‘€~[¹éêœJa ‘À~ö)‘°~ö)[¦¹éê+œJa ‘°~ö)‘È~ö)"[ò¹…ëBœJU3[#ºïeœJU}JT~JQ0[к¸º˜œJU‘Ø}JT ‘”” $ &JQ0JR0[õºÚí°œJUv[`»¸ºJU‘Ø}JT0‘ð}”‘””" $ &‘¸‘ð}”‘””" $ &‘¸,(JQ0JR0[…»Úí JUv[ûC:JU‘€~[æ»éê]Ja ‘Ø~ö)‘°~ö)[ ¼éê€Ja ‘°~ö)‘à~ö)"[b¼…ë—JU3[–¼ïºJU|JTsJQ0I²¼ÎJUsIļâJU|Iý¼öJUv[K½¸º0žJU‘à}JT‘˜”w”# $ &JQ0JR0[p½ÚíHžJUvI£½\žJUv[˽¸º¨žJU‘à}JT$‘˜” $ &‘¨‘˜” $ &‘¨,(JQ0JR0[ð½ÚíÀžJUvI#¾ÔžJUv[4¾CîžJU‘€~[W¾éêŸJa ‘è~ö)‘°~ö)[~¾éê4ŸJa ‘°~ö)‘ð~ö)"[Ͼ…ëKŸJU3[¿ïnŸJUsJT|JQ0I¿‚ŸJU|I/¿–ŸJUsIi¿ªŸJUvIÊ¿¾ŸJUs[«ÀùüŸJU €“JT‘Ð}”JQ‘Ø}”JR °‹I;Á JU‘¸}IZÁ' JUwIjÁ= JU‘À}IzÁQ JU}IŠÁg JU‘È}I©Á{ JU~IÙÁ JUvI £ JUsI:· JU|IiÂË JU[6Ćêê JT 0“[vÄ†ê ¡JT X“[ÑĆê(¡JT X“[9ņêG¡JT X“IšÅ[¡JU}I8Æo¡JUvI ǃ¡JU~IöÇ—¡JUvOXÉ%ëIZʺ¡JU‘Ð}[³Ê…ëÑ¡JU4[b˸º¢JU‘¸}JT ‘Ô~” $ &JQ0JR0[‚˸º.¢JU~JT‘ø~JQ0JR0IšËB¢JU~[§Ë+:b¢JUJT‘È}IÀËv¢JU[”ÌéꥢJa‘À~ö)‘È~ö)"ô)à?[¿ÌéêÔ¢Ja‘Ø~ö)‘à~ö)"ô)à?[êÌéê£Ja‘è~ö)‘ð~ö)"ô)à?[XÍ…ë£JU4[ŠÍï=£JUJT~JQ0I¦ÍQ£JU~I¶Íe£JUOÚÍéê[óÍMí•£JUvJTJQ0IΩ£JUvI ν£JUIXÎÑ£JU~[Ï…ëè£JU3OzÑ%ë[-Ò…ë ¤JU2OlÓ%ëOóÓ%ëI1Ô:¤JUvIzÔN¤JUv[‰Ô…ëe¤JU2O,Ö%ëv¥Ö‘€¤JU‘Ð}IxØ¡¤JUvO‚Ø%ëIÀؤJU}IÏØÖ¤JU~LeÙ…ëJU2BŽó3ÀÙWœ ±EPó3ƒ—E _ó3ø—E—Uó3šd\D(Ûd²EJÀÚdEcFgÛFédô3F›F¾/õ3`œF¼Lö3zF/N÷3”ž9bø0FAù)®ŸF#ú0ùŸF"gûYd¡F+ü0£uTý3H€r¯_}W ± € &_¿G±‘€HàrʪF<2…¤FÇd"¥WlIŠÞ9'§S©Iž¥SIÂ¥S‘IÂ¥S…Iæ¥SyI ¦QŠÞ9]µI6¦]ÁIZ¦LÃÞzêJT P’JQ ­}JR 3}JX6JY ~WlI—ß9,ǧS©I†¦SIª¦S‘Iª¦S…IΦSyIò¦Q—ß9]µI§]ÁIB§LÐßzêJT P’JQ ­}JR 3}JX6JY ~WlIÜß9"|¨S©In§SI’§S‘I’§S…I¶§SyIÚ§QÜß9]µI¨]ÁI*¨LàzêJT P’JQ ­}JR 3}JX6JY ~WlI#à91©S©IV¨SIz¨S‘Iz¨S…Iž¨SyI¨Q#à9]µIî¨]ÁI©L\àzêJT P’JQ ­}JR 3}JX6JY ~WlIsà9æ©S©I>©SIb©S‘Ib©S…I>©SyI†©Qsà9]µI²©]ÁIÖ©L¬àzêJT P’JQ ­}JR 3}JX6JY ~[Û ìþ©JU|[ÜÁíªJU|[7Ü ì.ªJU|[XÜ ìFªJU|[yÜ ì^ªJU|[šÜ ìvªJU|[»Ü ìŽªJU|L…ß‹°JU|JT € &JQ‘€JRvJX ­}T:5dÚPs@ô®SK5ªVPslU5 Ýb]5]e5ª]q53«]}53«YzÚ<«]Ž5Ï«Hàs&¬]®5ò«Y Þ(m«]64¬YHÞ(Œ«]ã5W¬YpÞ««]Ñ5z¬Y€Þ Ê«]¿5ž¬QxÝ(]Ÿ6׬YŽÝ¬]¬6ú¬O™Ý%ëL€Ý(íJUvHt×®SK5­VtbU5b]5ge5gq5g}5Vtg¼6gÈ6T?ÉôÜptH3­SPÉ­Vpt]ZÉm­]dÉ£­]pÉM®[ÝzêŬJT HI#ÝÙ¬JUs[þÞíñ¬JUv[Ëàí ­JUvOßà%ëLþà†êJT £|T:5)ßÀtHÄ®SK5å®VÀtlU5[áb]5]e5A¯]q5¯]}5¯Y;ߥ­]Ž5ܯH u®]®5ÿ¯Y0á Ö­]¿5N°Y:á!õ­]ã5‰°Y„á®]Ñ5¬°YŒá 3®]6аQÜá3]Ÿ6ó°Yòáy®]¬6±Oâ%ëLäá(íJUv[qá†ê®®JT xLÕá}ÉJUvKbßJUvL¶Ý†êJT xO°ÚÚíO-Ý%ëOËÝ%ëToÀÚpuK°So:±S^ov±SRo™±XFoX:oX.oX"oVpubjolroèÝ]zoϱ]†o²]’oQ²]žoв]ªoʲ[ÔÚÞ¯JU}JT~JQJR|JXstbh0LÞùJU €“JT [JQÂJR °‹WlI(Û8EʰS©I³SI(³S‘I(³S…IL³SyIp³Q(Û8]µIœ³]ÁIÀ³L`ÛzêJT P’JQ ­}JR 3}JX6JY ~[Ûùü°JU €“JQÂJR °‹OÍáõê í±” 3*±”jÄ? âJoœáàSá?ì³Sí?W·Sù?ûºS@L¾S@‚ÉS@äÉp)@‘pÕ?úÕ?Ÿl5@xMl=@,OlE@O3lM@\ôlU@"÷l]@ùle@Klm@?þlu@ñ]}@ÝË]‰@ÛÏ]•@)Õ]¡@ŒÚ]­@ÊÚ]¹@ ß]Å@Wä]Ñ@7ë]Ý@ô]é@‹þ]õ@é]A!] A0]AS]%Ax]1A² ]=A³ ]IA ]UAo ]aAÍ ]mAÒ ]yA3 ]…A}]‘A¬]AÛ]©A ]µA9]ÁAh]ÍA—]ÙAÆ]åAÎhñA‘ÀxhýA ‘°yŸ““Èh B‘°y]Bþ!h!B‘ z]-B…$h9B‘{]EBŠ&hQB‘€|]]B\'hiB‘ð|]uBŽHhB‘à}]BRhh™B‘Ð~]¥Blg±Bg½BgÉBgÕBgáBgíB]ùB†m]C z]C”„]CÉ])Cõ]5Cµ£]ACŰ]MCSº]YCj»]eCD¼]qC½]}Cø½]‰C0¾]•Cj¾]¡CÚ¿]­CÁ]¹CÜÂ]ÅC3Æ]ÑCðÈ]ÝCŸÊ]éCýË]õC¬Í]D Ï] DúÏ]D7Ñ]%D‰Ò]1DÆÕ]=D×Ö]IDK×]UDâÙgaDgmD]yDÚ]…DàÚ]‘D’Û]DÜ]©DÜ]µDÝ]ÁDpÝgÍD]ÙDíÝ]åDhÞ]ñDØÞgýD] EHß]E¸ßg!E]-E(à]9E˜àgEE]QEá]]ExágiE]uEèá]EXâgE]™EÈâ]¥E8ãg±E]½E¨ã]ÉEägÕE]áEˆä]íEøägùE]Fhå]FØågF])FHæ]5F¿æ]AF6ç]MF­ç]YFè]eFqè]qFÓè]}Fé]‰Féé]•Fãë]¡F#îH uH¸h²F‘°xUe=Uâv.SŽ=ðS±=¬ðS½= ñS¦=ÇñSš=;òS‚=¯òSv==óVvlÉ=YfãA·hÒ=‘àwW¯pfã/C˜½SX=ÙY@ü½hÒ=‘àwW¯p@JUH@~jÁhžG‘°xLÊîèóJU‘ÈxJT‘ uJQMJR3JX‘¸uHà~¤Á]°Gö O )%ëO')”ìO+<nêH åÂ]àG, T4gñp ÂSœ4ï S4'OuñÎvL{N!¨JT2T_:¦M >ÂSl:]LíMzêJT ˜[ñ¨íVÂJU~I4ñjÂJU~vEñsÂJU|vVñs˜ÂJU|vgñs¯ÂJU|IñÃÂJU|IM×ÂJU|OšMÎvHð”Ã]ÂG€]ÎG¶T_:„J €ë=ÃSl:L²JzêJT ˜We4ÙJ1êƒÃSr46LöJzêJT ŒJQ2KIJU~HP€ÎÃ]4HZO–E%ëO¯E”ìOËEnêH€Å]dHT4ûö+ÄSœ4gS4ŸO ÷ÎvLïP!¨JT2T_:—@@hÄSl:ÕL–OzêJT ˜[ªö¨í€ÄJU~IÆö”ÄJU~v×ö~«ÄJUvvéö~ÂÄJUvvûö~ÙÄJUvI"÷íÄJUvIBOÅJU|OOOÎvH¾Å]FHø]RH~T_:ÀFðùgÅSl:ÛLþFzêJT ˜We4Q2ø­ÅSr4þL.QzêJT ŒJQ2K!JU~H ‚ÑÅ]vH"Y…AÆ]ˆHXQ’A]•HŽK¢AJUsHP‚UÆ]òGÙO¶I%ëOÏI”ìOJnêH‚–Ç]"HT45ô ƒ²ÆSœ4æS4OCôÎvL˜L!¨JT2T_:ùXÐSí=…"L 5÷|JU‘Ø~[ééê{ÐJa ‘Àtö)‘¸tö)[1ééê—ÐJa‘Àtö)[Mééê³ÐJa‘Ðtö)[wééêÝÐJa‘¸tö)‘¸tö)"‘Àtö)"[—é‘ëôÐJU4[ãéyÆÑJU}JTv[èêéê5ÑJa ‘Ètö)‘Øtö)[ÿêéêQÑJa‘Ètö)[ëéêmÑJa‘ètö)[;ëéê—ÑJa‘Øtö)‘Øtö)"‘Ètö)"[Që‘ë®ÑJU4[žëyÆÎÑJU|JT‘Øt[fìCæÑJU|[ ìéê ÒJa ‘ðtö)‘Øtö)[·ìéê%ÒJa‘ðtö)[ÐìéêAÒJa‘øtö)[úìéêkÒJa‘Øtö)‘Øtö)"‘ðtö)"[í‘ë‚ÒJU4[fíyÆ ÒJU~JT}Oîí̾[ îCÅÒJU~O+î̾[SîyÆðÒJUJT~I}îÓJU~O[1ï‘ë(ÓJU2[rïéêDÓJa‘Àtö)[“ïéê`ÓJa‘Ðtö)[®ï‘ëwÓJU2[Øï…ëŽÓJU2[ðï«ÓJTvJQ0[?ð¨íÃÓJU~[—ñ:5ÛÓJU}[ÏñÚíóÓJU[ò‘ë ÔJU2[Aòéê&ÔJa‘Ètö)[XòéêBÔJa‘ètö)[nò‘ëYÔJU2[”ò…ëpÔJU2[¹òïÔJT}JQ0IÖò¡ÔJU}[þò¨í¹ÔJU|INóÍÔJU|[dô:5åÔJU~IôùÔJU~[™ôÚíÕJU[Ïô‘ë(ÕJU2[ õéêDÕJa‘ðtö)[$õéê`ÕJa‘øtö)[:õ‘ëwÕJU2[_õ…ëŽÕJU2[„õï«ÕJT~JQ0[Áõ¨íÃÕJU}[*÷:5ÛÕJU|[_÷ÚíóÕJU[’÷‘ë ÖJU0[ øéê&ÖJa‘vö)[%øéêBÖJa‘ vö)[Døéê^ÖJa‘°vö)[tø…ëuÖJU3[?þù³ÖJU ¨“JT‘ˆu”JQ‘u”JR °‹IÉÖJU‘€uIzÝÖJUsIŠóÖJU‘˜uIš×JUsIª×JU‘ uIº1×JUsIÊF×JUwIÚZ×JUsIêp×JU‘ÈtIú„×JUsI š×JU‘ØtI®×JUsI*Ä×JU‘ètI:Ø×JUsIjì×JUI»ØJU|I ØJU~IZ(ØJUvI*<ØJUsIòPØJUsIÙdØJU}I xØJUvIª ŽØJU‘ØtIº ¢ØJU}[ …ë¹ØJU2I› ÍØJU|IuáØJUsIËõØJU|[—…ë ÙJU2[½ï/ÙJUsJT~JQ0IßCÙJU~[U ºiÙJU‘˜u#t@7‘˜uI¿}ÙJUsI‘ÙJU~[>…ë¨ÙJU2[_ïËÙJUsJTJQ0IßÙJUIÆóÙJUs[w ºÚJU‘¨u#t@7‘¨u[­…ë0ÚJU2[ÎïSÚJUsJTvJQ0IñgÚJUvOÙ!õêI "ˆÚJUI-"œÚJU}I9%°ÚJUvIÈ%ÄÚJU~[â% ºêÚJU‘ u#t@7‘ uI’&þÚJU}v‡'‘ˆvÛJU‘ÀtI8)-ÛJUvOD)̾[_)CRÛJUvI)fÛJUv[œ)ï…ÛJU‘ÀtJQ0I¿)›ÛJU‘ÀtO`,éêOŠ,éêOµ,éêOà,éêO-éêO+-éêOV-éêO-éê[».ÚíÜJUw[ö.Úí6ÜJU‘Àt[1/ÚíPÜJU‘Èt[l/ÚíjÜJU‘Ðt[§/Úí„ÜJU‘Øt[â/ÚížÜJU‘àt[0Úí¸ÜJU‘èt[X0ÚíÒÜJU‘ðt[ö0òí*ÝJa‘¸uö)Jb‘Èuö)Jc‘Øuö)Jd‘àuö)Je‘øuö)Jf‘ˆvö)Jg‘vö)O1%ë[C2CQÝJU‘øt[w2…ëhÝJU1O‘2öì[¸2&îÝJU‘ˆu[Ó2ïµÝJUsJT}JQ‘ˆuIô2ÉÝJUsI3ÝÝJU}I43ñÝJU[>3ëõÞJU‘øtt>0OC3éêOæ5%ëO(6%ëOj6%ëO¬6%ëOî6%ëO07%ëOm7%ë[); º ÞJU‘øt#t@7‘øtI„<´ÞJU}[Ž<…ëËÞJU1[¯<ïèÞJTJQ0IË<üÞJU[á<ÚíßJU~I=(ßJU~O¬=%ëOv>%ëIÖ>VßJUI?jßJU|[P?†ê‰ßJT H[]@ï¬ßJU}JTvJQ0[Œ@Û{ÌßJU‘€uJT|I²@àßJU|I AôßJU}IAàJUv[¬A…ëàJU4IC3àJU~I+CGàJUIAE[àJU~w}E‘¨vI¾E}àJU}OG%ëOâG%ëI^I«àJU}w›I‘˜vO¢L%ëOÔL%ëOØN%ëB´J3pQþœæ÷EP3Ô"E _3 #E—U3X%=&€=ç ~d²Eu³RdEcq¿Sd\o€S9›09¥09è0Féd3ÿ&F¾/û!(F¼Lû!#)F/Nû!!*F#0+F"gYœ,F+0h.FT 30Hp‡Nô_}W$æ÷ À&_¿G%ö÷‘€H ˆ¨çF<'2v0FÇ(d"F1WlIÑX9P$ãS©I2SI%2S‘I%2S…II2SyIm2QÑX9]µI™2]ÁI½2L YzêJT P’JQ ¶}JR 3}JX7JY ~WlIÀ[9UÙãS©Ié2SI 3S‘I 3S…I13SyIU3QÀ[9]µI3]ÁI¥3Lù[zêJT P’JQ ¶}JR 3}JX7JY ~WlI£\9KŽäS©IÑ3SIõ3S‘Iõ3S…I4SyI=4Q£\9]µIi4]ÁI4LÜ\zêJT P’JQ ¶}JR 3}JX7JY ~WlIè\9FCåS©I¹4SIÝ4S‘IÝ4S…I5SyI%5Qè\9]µIQ5]ÁIu5L!]zêJT P’JQ ¶}JR 3}JX7JY ~WlI9]9AøåS©I¡5SIÅ5S‘IÅ5S…Ié5SyI 6Q9]9]µI96]ÁI]6Lr]zêJT P’JQ ¶}JR 3}JX7JY ~WlI‰]9<­æS©I‰6SI­6S‘I­6S…I‰6SyIÑ6Q‰]9]µIý6]ÁI!7LÂ]zêJT P’JQ ¶}JR 3}JX7JY ~[kS ìÅæJU}[ÏTÁíÝæJU}[ÿT ìõæJU}[ U ì çJU}[AU ì%çJU}[bU ì=çJU}[ƒU ìUçJU}[¤U ìmçJU}L[‹°JU}JT À&JQvJR|JX ¶}T:5÷QÀˆfÒëSK5M7VÀˆlU5ðVb]5]e5Û7]q5½8]}5½8Y Rè]Ž5•9Hp‰é]®5¸9YX(Kè]6ú9Y(X(jè]ã5:YPX‰è]Ñ5@:Y`X ¨è]¿5d:QÀV0]Ÿ6:Y×Vîè]¬6À:OâV%ëLÈV(íJUvH ‰µëSK5ä:V ‰bU5b]5ge5gq5g}5V ‰g¼6gÈ6T?É7V ŠHêSPÉä:V Š]ZÉ3;]dÉi;]pÉ<[VVzê£éJT HIfV·éJUs[‘ZíÏéJUv[é]íçéJUvOW^%ëLv^†êJT £|T:5¼Z€ŠH¢ëSK5«<V€ŠlU5Z_b]5]e5=]q5V=]}5V=YÎZƒê]Ž5¢=HàŠmë]®5Å=Y3_'ôê]Ÿ6ÿ=YJ_ßê]¬6">OU_%ëL;_(íJUvY­_ ë]¿5F>Y¹_'2ë]ã5>Yà_ Që]Ñ5¤>Qé_$]6È>[p_†êŒëJT xLOb}ÉJUvKöZJUvLW†êJT xT:5/R ‹güïSK5ë>V ‹lU5(Tb]5]e5“?]q5Þ@]}5Þ@YERDì]Ž5BHЋ.í]®5=BYtX$uì]6ŒBY˜X$”ì]ã5¯BY¼X ³ì]Ñ5ÒBYÅX Òì]¿5öBQýS+]Ÿ6/CYTí]¬6RCOT%ëLT(íJUsH`‹ßïSK5vCV`‹bU5b]5ge5gq5g}5V`‹g¼6gÈ6T?É)[ŒH;îSPÉvCVŒ]ZÉÒC]dÉD]pɲD[W[íÆíJUs[^zêåíJT HI,^ùíJUs[C^íîJUsO…^%ëL¤^†êJT £|T:5‚[`ŒHÌïSK5JEV`ŒlU5Q`b]5]e5¦E]q5õE]}5õEY”[­î]Ž5AFHÀŒ—ï]®5dFY*`'ï]Ÿ6žFYA` ï]¬6ÁFOL`%ëL2`(íJUsY£` =ï]¿5åFY¯`'\ï]ã5 GYÖ` {ï]Ñ5CGQß`$]6gG[g`†ê¶ïJT xL b}ÉJUsK»[JUsL>T†êJT xT:5gRh&ôSK5ŠGVlU5PWb]5]e5 H]q5I]}5IY}Rnð]Ž5ïIH Xñ]®5JY W0ßð]Ÿ6LJY6WÊð]¬6oJOAW%ëL(W(íJUsYTY þð]¿5“JY^Y*ñ]ã5ÌJYˆY<ñ]Ñ5ïJQY(]6KH0 ôSK56KV0bU5b]5ge5gq5g}5V0g¼6gÈ6T?É\ÐHeòSPÉ6KVÐ]ZÉK]dɵK]pÉ_L[5\íðñJUs[Ï^zêòJT HIä^#òJUs[û^í;òJUsO_%ëL._†êJT £|T:5`\ŽHöóSK5÷LVŽlU5vab]5]e5yM]q5ÝM]}5ÝMYr\×ò]Ž5=NHŽÁó]®5`NYKa ó]¿5¯NYUa!'ó]ã5êNYža Fó]6 OYØaeó]Ñ50OQb3]Ÿ6TOY*b«ó]¬6wOO9b%ëLb(íJUs[Œa†êàóJT xL_b}ÉJUsK›\JUsLfW†êJT xOCT%ëOuV%ëOkW%ëTá6RðŽvÀôS 7›OS"7›OS7çOXþ6Sò6KPR34ÔY)ASL4©PXX4S@4áPTá6ÐR@woõS 7 QS"7mQS7ÍQSþ6MRSò6ÄRT34ÏW )ATõSL47SSX4\SS@4SLçWzêJT °‘LíU¸êJUJTsTá6ïRÐxýõS 7«SS"7÷SS7CTSþ6§TSò6øTW34KZ)AèõXL4SX4US@4@UL*Z¸êJTTá6SyÊöS 7lUS"7¤US7ÜUSþ6$VSò6ZVYV}öXL7X@7L0V†êJT i|W34¼W)AµöSL4VSX4³VS@4ÖVL¢W¸êJTsWlI€S8p÷S©IWSI&WS‘I&WS…IJWSyInWQ€S8]µIšW]ÁI¾WL¸SzêJT P’JQ ¶}JR 3}JX7JY ~[-S*±¦÷JU|JT}tÕ?óU[×SùØ÷JU ¨“JQ€JR °‹Oåaõê íö÷” 3ø”j·Xpb¶œˆySÈXêWSÔXÝXSàXÍYSìXÀZSøX³[SY¦\SYÃ]SY#^S(Yƒ^S4Yã^S@YC_SLY£_pXYúXYŸbdYllY9¯ltY­l|Y½ßl„Y]˜lŒYÍ´l”YŸÜlœYØ{b¤Yl¬YWrl´Y •l¼YÈlÄYúlÌY¢&lÔY¹9lÜY§>läY°FlìY=älôY älüY@ÛlZl ZÀülZÛ®lZ'l$Z8§l,ZMLl4Z»] ]¤^‡ ]°^O ]¼^)! gÈ^]Ô^J$ ]à^_' ]ì^(( ]ø^ó( ]_®) ]_C* ]_Á, ](_‰/ Tá8bPm5ÿS92 S9S2 S92 Sü8S2 Sò8Ÿ2 Y1c(þ]c9#3 KVcJUwJT1Yn(?þ]K9w3 Qn]V9›3 Y@m yþ]/9¾3 QGm]:9â3 QðlPS94 S94 S9)4 Sü8)4 Sò8M4 T…³úl°UD ÿS ³q4 S–³§4 V°]ª³Ë4 [mìÿJUwJTsK2mJUsLúl'ìJU1Tá8bcàoÓS95 S9u5 S95 Sü85 Sò8é5 Y„c%¯ÿ]c9]6 K¦cJUwJT0Y@n éÿ]K9š6 QOn]V9¾6 Yàm(#]/9á6 Qïm]:97 V@‘S9(7 S9(7 S9`7 Sü8(7 Sò8˜7 T…³gmp‘UD¾S ³Ð7 S–³8 Vp‘]ª³Q8 [mì¬JUwJTsKŸmJUsLgm'ìJU0Tá8%d°‘xS9‡8 S9ç8 S9‡8 Sü8ç8 Sò8G9 YHd)N]c9«9 KndJU‘øzJT1Y°i ˆ]K9é9 QÀi]V9 : Y€y(Â]/90: Qy]:9T: Q`nPS9w: S9w: S9›: Sü8›: Sò8¿: T…³jn’UDjS ³ä: S–³; V’]ª³?; [ƒnìXJU‘øzJT|K¦nJU|Ljn'ìJU1Tá8zd0’zS9u; S9é; S9u; Sü8u; Sò8]< Yd&ú]c9Ö< KÀdJU‘øzJT0Yˆ~(4]K9= Q˜~]V98= Y z(n]/9[= Q0z]:9= V’S9¢= S9¢= S9Ú= Sü8¢= Sò8> T…³¯yÀ’UD S ³L> S–³•> VÀ’]ª³Ï> [ÈyìøJU‘øzJT|KëyJU|L¯y'ìJU0T̾ùe“å|Sݾ? V“]é¾;? [f ìfJTsLГÇ9JUsH@“¯h9_‘À~Tà=rf€“ñÅSí=„? L³f÷|JU‘Ø~Te=­˜°“õFSŽ=ÿ? S±=+@ S½=O@ S¦=t@ Sš=˜@ S‚=+@ Sv=¼@ V°“bÉ=UK=­˜°“/CSX=¼@ [äfèózJU‘°}#JTsJQLJR1JX‘ð{[­˜2î¡JU‘¨~JT‘°~JQ‘¸~O™>îHà“Â]K_â@ T̾Íg ”)SݾA V ”]é¾NA [Üg ì JTsL(™Ç9JUsHP”B]]_—A K[•JU|H€”t]o_àA VÀ”]|_U L‹zêJT ˜[¾Ú¨íñJU‘¸{vêÚ|JUvüÚ|JUvÛ|6JUv Û|MJUIaaJUI'uJUO>ÎvKJU‘¸{HП,]}`aU ]‰`ãU T_:-ß  ÔíSl:SV L_ßzêJT ˜Ue4·’¡ÓSr4vV LØ’zêJT ŒJQ3T‚:²Û`¡ …S“:šV V`¡]Ÿ:ØV ]«:QW ]·:QW LÍÛÅêJU‘Ø|T‚:ÙÛ¡ ÞS“:ÅW V¡]Ÿ:X ]«:gX ]·:gX LóÛÅêJU‘à|T‚:ÿÛÀ¡ 7S“:ÇX VÀ¡]Ÿ:Y ]«:~Y ]·:~Y LÜÅêJU‘Ð}Hð¡i]­`òY V0¢]º`tZ KÈJU}TÄ:ø`¢[ °SÕ:½Z V`¢]ß:[ Lèú@íJU‘¸{T‚:>ø ¢f S“:>[ V ¢]Ÿ:c[ ]«:[ ]·:[ LKøÅêJU‘Ø|T‚:WøТh bS“:Õ[ VТ]Ÿ:ú[ ]«:4\ ]·:4\ LdøÅêJU‘à|W‚:pø j ËS“:l\ Qpø ]Ÿ:‘\ ]«:à\ ]·:à\ L}øÅêJU‘Ð}H£ ]Í`,] Q³Š(]Ú`Œ] KÖŠJU‘Ð{H0£I]í`ì] Q(ƒ$]ú`$^ KBƒJUsH`£‡] aZ^ Q˜w]a£^ K©wJUvH£Å]-aÙ^ QUp]:a_ KepJUsHÀ£]MaE_ Q¨d(]Za_ KËdJU‘Ð{Hð£C]mað_ Qá[$]za(` Kû[JUsH ¤]a^` QqM]šaº` KˆMJU|HP¤Á]­að` QPC2]ºa;a KxCJU‘Ø{H€¤]Ía›a Q¿6(]Úaæa Kâ6JU‘À{H°¤?]íaFb Qå,&]úa¢b K-JU|Hà¤}] bØb Q| ]b4c K‘ JUH¥½]-b}c Q–2]:bÛc K¾JU‘À{H@¥û]Mb;d QT]Zb—d KeJUvHp¥5]mbÍd O(%ëOI”ìOnêHð¥]be T4xÜà¦1#’Sœ4îe S4&f O†ÜÎvL‘ü!¨JT3T_:ý§8#ÏSl:\f LOýzêJT ˜[ܨíçJUsI5ÜûJUsvEÜsJU}vVÜs)JU}vgÜs@JU}vxÜsWJU}IŸÜkJU}IëüJU‘Ø{OýÎvHp§:]bf ]‹bßf T_:P¨ #çSl:@g L…zêJT ˜Te4 P¨ #)Sr4cg LÄzêJT ŒJQ3KJUsT‚:%Ý ¨O#“S“:‡g V ¨]Ÿ:¬g ]«:æg ]·:æg L:ÝÅêJU‘¨|T‚:FÝШQ#ìS“:h VШ]Ÿ:Ah ]«:{h ]·:{h LYÝÅêJU‘°|T‚:eÝ©S#ES“:³h V©]Ÿ:Öh ]«:i ]·:i LxÝÅêJU‘¸|H0©ƒ]¯bHi Që"]¼b€i K0ëJU|TÄ:ÊÞ`©“#ÈSÕ:¶i V`©]ß:ìi Lßß@íJUsT‚: ß ©ž#X“:V ©]Ÿ:"j ]«:\j ]·:\j L#ßÅêJU‘¨|T‚:4ßЩ #vS“:”j VЩ]Ÿ:¹j ]«:ój ]·:ój LAßÅêJU‘°|T‚:Mߪ¢#ÏS“:+k Vª]Ÿ:Pk ]«:Šk ]·:Šk LZßÅêJU‘¸|TÄ:Mä0ªã# SÕ:Âk V0ª]ß:l Oá@íH`ª¨]ábEl ]íbo Te4µåàª"$jSr4so Ll»zêJT ŒJQ3R_:Öº2#$Sl:—o L»zêJT ˜Ty:n»@«6$ÜLŸ»†êJT HT‚:l¤€«K$<S“:ºo V€«]Ÿ:ßo ]«:p ]·:p Lv¤ÅêJU ‘À{” $ &T‚:‚¤°«M$œS“:(p V°«]Ÿ:Mp ]«:rp ]·:rp L¤ÅêJU ‘ |” $ &T‚:¤à«O$üS“:–p Và«]Ÿ:»p ]«:àp ]·:àp Lª¤ÅêJU ‘¨|” $ &H¬:]ÿbq Q¨!] cîYó"É(]õcƒ K#JUsYŽ#ø(]d;ƒ K¤#JUvYÁ#')]dqƒ KÖ#JUsY|$V)]+d”ƒ K‘$JUsYð$…)]=d„ K%JU}TÄ:%ÐÈü'Ã)SÕ:L„ VÐÈ]ß:™„ OÈÛ@íHÉý)]OdÏ„ Oz>%ëO—>”ìOÜBnêHPÉ|+]d… T4|&Ê(Z*Sœ4Ý… S4† OŠ&ÎvLŠ9!¨JT3T_: :@ʆ(¼*Sl:K† L=:zêJT ˜JQvJR~h|v1.([&¨íÔ*JU|I5&è*JU|vF&|ÿ*JU~vX&|+JU~vj&|-+JU~v|&|D+JU~I¢&X+JU~Iä9n+JU‘¸{Oû9ÎvH Ê',]adn† ]mdΆ T_:?€ËZ(Ô+Sl:/‡ L9?zêJT ˜Te4‘AàËY(,Sr4R‡ L·AzêJT ŒJQ3KZ>JU|T‚:,'@̦(‡,S“:v‡ V@Ì]Ÿ:›‡ ]«:À‡ ]·:À‡ L9'ÅêJU ‘ø{” $ &T‚:E'p̨(ä,S“:ä‡ VpÌ]Ÿ:ˆ ]«:,ˆ ]·:,ˆ LM'ÅêJU~ $ &T‚:Y' Ìª(A-S“:Pˆ V Ì]Ÿ:sˆ ]«:˜ˆ ]·:˜ˆ La'ÅêJU} $ &T‚:j'à̬(—-S“:¼ˆ VàÌ]Ÿ:àˆ ]«:‰ ]·:‰ Ly'ÅêJU0YÛ(.È-]‘d)‰ K )JU‘Ð|TÄ:„FÍ(.SÕ:N‰ VÍ]ß:›‰ OÂF@íTXÜ’@Íö)<.SXщ Lä’VîJUsT›Xõ’pÍø)r.S¬Xô‰ Lý’bîJUsH Í¬.]eŠ Oxã%ëOŸã”ìOËänêHðÍ0]7eMŠ T4ø”°ÎT* /Sœ4ýŠ S45‹ O•ÎvLÛÇ!¨JT2T_:RÈàÎ[*k/Sl:k‹ L‰ÈzêJT ˜JQvJR~h|v1.([¢”¨íƒ/JU~I¾”—/JU~vД~®/JU|vä”~Å/JU|vø”~Ü/JU|I •ð/JU|I9È0JU‘¸{OFÈÎvH@ÏÃ0]eŽ‹ ]%eê‹ T_:·ìpÏ6*l0Sl:GŒ LéìzêJT ˜We4 î&5*²0Sr4jŒ LÁîzêJT ŒJQ2K@ìJU~Y •ò0]IeŽŒ K6•JUvY6•!1][eýŒ KK•JUsY^•P1]mel Ko•JU}H ÏŠ1]e¢ OèÃ%ëO Ä”ìOÄnêYü•¹1]‘eØ K–JU|TÂW–ðϨ*2SëWGŽ SßWŽ SÓW·Ž VðÏ]öW L#–JîJU‘è{JTTXk–@Ðå*P2SX6 Lx–VîJU‘è{T›X„–Ðç*ˆ2S¬X[ LŒ–bîJU‘è{HÀÐÂ2]£e€ O¹%ëO2¹”ìOü¹nêHÑ84]Óe¶ T45˜°ÑC+3Sœ4f S4ž OC˜ÎvL‘´!¨JT2W_:µƒJ+…3Sl:Ô LGµzêJT ˜JQ}JR~h|}1.([Á—¨íŸ3JU‘ø{Iå—µ3JU‘ø{vþ—‘ø{Î3JU|v˜‘ø{ç3JU|v5˜‘ø{4JU|I]˜4JU|Iõ´*4JU‘°{OµÎvHàÑÏ4]µe ‘ ]Áe}‘ T_:¸Ò%+4Sl:’ LL¸zêJT ˜Ue4-¼àÒ$+Sr48’ LN¼zêJT ŒJQ2Y]˜þ4]åe\’ Kr˜JU~Yr˜-5]÷e’’ K‡˜JUTÄ:£˜0Ó[+t5SÕ:“ V0Ó]ß:_“ LÊ™@íJU‘ø{T‚:ÊpÓÒ+Í5S“:•“ VpÓ]Ÿ:Ó ]«:” ]·:” LžÅêJU‘ð}T‚:á°ÓÔ+&6S“:^” V°Ó]Ÿ:Œ” ]«:Û” ]·:Û” L(žÅêJU‘è}T‚:4ž ÔÖ+‰6S“:'• V Ô]Ÿ:€• ]«:Ï• ]·:Ï• LFžÅêJU‘ä}”v" $ &HPÔ¬6]f– K…žJU~TÂW…ž€Ôí+ 7SëWŠ– SßW– SÓWü– V€Ô]öWY— L•žJîJU‘°|JT}TÂW­ðÔô+j7SëW— SßWÇ— SÓW˜ VðÔ]öW^˜ L­JîJU‘€}JT}H`Õ}7] f”˜ TXÀãÕG,µ7SX·˜ LÒãVîJU‘°|YRïä7]-fï˜ KhïJU}TÂWhïÀÕp,E8SëW%™ SßW]™ SÓW—™ VÀÕ]öWä™ L€ïJîJU‘€}JT‘ø|H0ÖØ8g?f]Kfš T_:åõðÖ„,™8Sl:wš L«zêJT ˜Ue44`׃,Sr4šš LTzêJT ŒJQ3Ty: À×—, 9LF†êJT HTXfð0Ø¿,M9S:X¾š S0Xãš V0Ø]DX› hNXTTX­ð`ØÊ,Ž9S:X+› S0XP› V`Ø]DXu› hNXTTX ñØÖ,Ï9S:X˜› S0X½› VØ]DXâ› hNXTYNóþ9]]fœ KdóJUvT‚:|óÀØ-W:S“:Nœ VÀØ]Ÿ:sœ ]«:˜œ ]·:˜œ L<ôÅêJU‘è}T‚:«óÙ -°:S“:¼œ VÙ]Ÿ:ᜠ]«: ]·: LWôÅêJU‘ð}T‚:»óPÙ - ;S“:* VPÙ]Ÿ:O ]«:t ]·:t LrôÅêJU‘ø}HàÙ;]of˜ HÚZ;]f» QG2]Žfó KiJU|TÄ:¥õ@ÚI-Ÿ;SÕ:)ž V@Ú]ß:_ž L™ö@íJUsT‚:N÷€ÚV-ø;S“:•ž V€Ú]Ÿ:ºž ]«:ßž ]·:ßž L[÷ÅêJU‘è}T‚:g÷°ÚX-Q<S“:Ÿ V°Ú]Ÿ:(Ÿ ]«:MŸ ]·:MŸ Lt÷ÅêJU‘ð}T‚:€÷àÚZ-ª<S“:qŸ VàÚ]Ÿ:–Ÿ ]«:»Ÿ ]·:»Ÿ L÷ÅêJU‘ø}Y4øÉ<]¡fߟ TÄ:’øÛ‘-=SÕ:  VÛ]ß:8  Läø@íJU}W‚:ë å-~=S“:n  Që ]Ÿ:“  ]«:â  ]·:â  LõÅêJU ‘¸{” $ &T‚:PÛç-Þ=S“:.¡ VPÛ]Ÿ:S¡ ]«:¢¡ ]·:¢¡ LÅêJU ‘Ø}” $ &T‚:€Ûé->>S“:î¡ V€Û]Ÿ:¢ ]«:b¢ ]·:b¢ L)ÅêJU ‘à}” $ &T‚:5°Ûë-ž>S“:®¢ V°Û]Ÿ:Ó¢ ]«:"£ ]·:"£ LBÅêJU ‘ä}” $ &T‚:ñåàÛ].û>S“:n£ VàÛ]Ÿ:‘£ ]«:¶£ ]·:¶£ LþåÅêJUs $ &[½c ì?JU}JT~[øcÚí1?JU|[×d ìO?JUvJT~[ eÚíg?JU}[Ae¸ºŽ?JUJT1JQ0JR1[^e¸ºµ?JUJT0JQ0JR1[ue ìÓ?JU}JT~[©eÚíë?JU|OÉeöì[áe‘ë@JU0['fC'@JU}[OfïD@JU~JQ0[ûgC\@JU~[hî|@JU‘à{JTv[JhC–@JU‘à{[rh‘ë­@JU0[hCÇ@JU‘à{[íhyÆç@JUsJT‘{[Ci¨íÿ@JU~IšiAJU~Iªi'AJU}[ZjC?AJUv¯j‘{XAJUs[ñj‘ëoAJU0[k…ë†AJU2[,kï£AJT~JQ0[›kzêÏAJT À|JQ É}IãlãAJU|IÂm÷AJU~IÚm BJUvI:nBJU}[Wrù]BJU h”JT‘øz”JQ‘è|”JR °‹I+vqBJUIjv‡BJU‘ð{IwvBJU‘€|IŠv³BJU‘ˆ|IšvÇBJUsIªvÝBJU‘à|IºvóBJU‘€}IÊv CJU‘ˆ}IÚvCJUsIêv3CJU‘¨{IúvGCJUsI w]CJU‘ø|IwqCJUvI*w‡CJU‘ð|I:wCJU‘ {IJw±CJUsIZwÇCJU‘˜{IjwÝCJU‘È|IzwóCJU‘À|IŠwDJUsIšwDJU‘°|Iªw3DJU‘¸|IºwIDJU‘ø{IÊw]DJUsIÚwrDJUwIêwˆDJU‘˜|IúwžDJU‘ |I x²DJUsIxÈDJU‘è{I*xÞDJU‘Ø{I:xôDJU‘ˆ{IGx EJU‘¸{IZx EJU‘Ð{I x4EJU|I*yJEJU‘À{I7y`EJU‘È{IJyvEJU‘°{I zŠEJU~IzžEJU}I>|´EJU‘€{I‚|ÈEJU}IÂ|ÜEJU~Ië|ðEJU|Oµ~%ëIj€FJU~I¢ƒ%FJU}IÒ†9FJUsIê†MFJU~I‡cFJU‘{I*‡wFJU~O5‡%ëOµ%ëIÚ¥FJU~Iº¹FJUv[— ºÙFJUst@7s[b¤‘ëðFJU0Oš¤öì[Û¤CGJU‘à{['¥…ë.GJU4[ˆ¥ïSGJUJT‘¨{JQ0[Õ¥¨íkGJU|[@§:5ƒGJU}[c§:5›GJUv[†§:5³GJUO¬§̾[ǧCØGJU[ç§‘ëïGJU5[[¨‘ëHJU5[Ϩ‘ëHJU5[U©…ë4HJU3[ÿ«‘ëKHJU0[:¬‘ëbHJU0[^¬‘ëyHJU0[~¬‘ëHJU0[•¬Û{®HJU~JT}[¿¬Û{ÌHJU|JT~I׬àHJU~[ô¬Û{IJU‘ {JT|I­IJU|[…­¨í.IJU‘°{[ã®:5FIJUvI¯ZIJUv[ ¯:5rIJU~I$¯†IJU~[,¯:5žIJUsIH¯²IJUs[ޝµ³ÌIJU‘ {[ϯ¸ºîIJUJQ1JR1Ië¯JJU[)°¸º$JJUsJQ1JR1IE°8JJUs[°…ëOJJU3[°°+:mJJUJT}IɰJJUIÞ°•JJU}Ió°©JJUsIb²½JJU~Iq²ÑJJU}I¼²åJJUI˲ûJJU‘¨{IÛ²KJU|I?´#KJUIN´7KJUvI]´KKJU}[l´…ëbKJU3I›´xKJU‘€{IV·ŒKJU[ê¹C¤KJUs[&º…ë»KJU1ODºöì[jº&îàKJU|[„ºïLJU~JTvJQ|OyÅõêOVÌ%ëOÖÍ%ëOSÏ%ëvúÑ‘ |SLJU‘¨{O>Ò̾[YÒCxLJUs[‚ÒC’LJU‘à{[¯Ò…ë©LJU2[¯ÙïÎLJU‘¸{JTsJQ0[üÙ¨íæLJU|[HÛ:5þLJUs[fÛ:5MJU~[ƒÛ:5.MJU}O¦Û̾[4ÜéêWMJa‘è|ö)[PÜéêsMJa‘À}ö)[oÜéêMJa‘È}ö)[²Ü…ë¦MJU;I®ÞºMJU|I½ÞÎMJU}IÌÞâMJU~IÛÞöMJUsIêÞ NJUsO.â%ëvÚã‘À|0NJUvIMäDNJU~[¶ä:^NJU‘{['åzêŠNJT À|JQ º|[õå…ë¡NJU4Ocê%ëOÇî%ë[â÷ïÞNJU}JT|JQ0[•ø…ëõNJU3[¿øl|OJU‘{JTsIÜø)OJUsIðø=OJU}I ùQOJU|[Hù…ëhOJU<I9þ|OJU}IQþOJU|Ihþ¦OJU‘Ð{Iþ¼OJU‘€{I×ÐOJUvI!äOJU|[2!íüOJU|IV!PJU|Ol!̾[Œ!C5PJU}I°!IPJU}["yÆiPJU‘°{JT}I/"}PJU}I\"“PJU‘°{[€#µ³µPJU‘ }JT‘¸{[³#µ³×PJU‘ {JT‘¸{[:$¸ºQJU‘È{JT‘è{JQ1JR1[[$¸º+QJUJT~JQ1JR1I|$?QJU[ª$¸ºkQJU‘˜{JT‘è{JQ1JR1[Í$¸º•QJU|JT‘Ø{JQ1JR1Ið$©QJU|[|%¨íÃQJU‘À|[ª&:5ÛQJU}IË&ïQJU}[Ó&:5RJUsIï&RJUs[÷&:53RJUvI'GRJUvO '̾[—'…ëkRJU9O(öì[E(&î˜RJU~JQ‘¸}Is(®RJU‘¸}[Š(&îÎRJU~JQ‘¨}[ (ïòRJU|JT}JQ~Iº(SJU|IË(SJU}IÛ(.SJU~O™4%ëOÍ5%ëO7%ëvi>‘Ð{nSJUI§>‚SJUIçO˜SJU‘°{[bT&î¸SJU‘˜{JTs[®T:5ÐSJUsIËTäSJUs[ÓT:5üSJU|IòTTJU|[úT:5(TJUIUÓï;aJU|JT‘¨{JQ0I_ÓQaJU‘¨{IqÓeaJU|[…Ó²‚aJUsJQ2I¡Ó–aJUsO­Ó̾[ÊÓC½aJU‘¨{IíÓÓaJU‘¨{[þÓCíaJU‘à{[0Ô…ëbJU2[mÔï)bJU‘Ø{JTJQ0I™Ô?bJU‘À{I¼ÔUbJU‘Ø{[ÒÔÚ}wbJUsJQ2JR0IðÔ‹bJUs[úÔ…ë¢bJU2[$Õï¿bJTsJQ0IBÕÓbJUsONÕ̾[iÕCøbJU|I‰Õ cJU|[šÕC&cJU‘à{[ÇÕ…ë=cJU2[þÕïdcJU‘À{JT‘¨{JQ0IÖzcJU‘¨{IBÖcJU‘À{[VÖ²­cJUsJQ2ItÖÁcJUsO€Ö̾[ÖCècJU‘¨{I¾ÖþcJU‘¨{[ÏÖCdJU‘à{[ýÖ…ë/dJU2[2×ïRdJU|JTJQ0IN×fdJUI`×zdJU|[v×Ú}œdJUsJQ2JR0I’×°dJUs[œ×…ëÇdJU2[Æ×ïädJTsJQ0Iâ×ødJUsOî×̾[ØCeJUsI:Ø3eJU‘À{[KØCMeJU‘à{[uØ…ëdeJU2[²Øï‰eJUJT‘¨{JQ0IÓØŸeJU‘¨{IãØ³eJU[÷زÐeJUsJQ2IÙäeJUsOÙ̾[<ÙC fJU‘¨{I_Ù!fJU‘¨{[pÙC;fJU‘à{[¢Ù…ëRfJU2[áÙïyfJU‘À{JT‘¨{JQ0IÚfJU‘¨{I%Ú¥fJU‘À{[;ÚÚ}ÇfJUsJQ2JR0IYÚÛfJUs[cÚ…ëòfJU2[ÚïgJTsJQ0I«Ú#gJUs[ÇÚ…ë:gJU3[üÚï]gJUvJTJQ0IÛqgJUI+Û…gJUv[YÛ¨íŸgJU‘Ð{[§Ü:5·gJUIÄÜËgJU[ÌÜ:5ãgJU~IèÜ÷gJU~[ðÜ:5hJU|I Ý#hJU|OÝ̾[’ÝéêLhJa‘è|ö)[¬ÝéêhhJa‘À}ö)[ÈÝéê„hJa‘È}ö)[ Þ…ë›hJU;[—ÞïÀhJU|JT‘È{JQ0I¸ÞÖhJU‘È{IÊÞêhJU|IßþhJUs[uß…ëiJU3[Ÿßl|7iJU‘{JT‘¨{I½ßMiJU‘¨{IÒßaiJUv[Jë…ëxiJU<O³ö%ëO0ø%ëO©ù%ëv‘Ø{¸iJUvI“ÎiJU‘Ð{[o…ëåiJU4[Ü…ëüiJU3[¥ …ëjJU3[-…ë*jJU3[ö6…ëAjJU3[–C…ëXjJU3[œM…ëojJU3[\…ë†jJU3[ßd…ëjJU3[op…ë´jJU3[³w…ëËjJU3[`ƒ…ëâjJU3I(‰öjJUsI8‰ kJU|[ꊅë!kJU3I,5kJUs[Õ†êTkJT pO ’öìO.’öìOI’öì[q’¸º£kJUwJT0JQ0JR1[š’¸ºÌkJU‘øzJT0JQ0JR1[Æ’¸ºõkJU‘}JT0JQ0JR1[“…ë lJU2[B“ï)lJT|JQ0Ie“=lJU|[•“¨íUlJU}Iá“ilJU}OP•öì[š•¨ílJU‘Ð{[C–&î°lJU‘è{JTIk–ÄlJUs[¢–…ëÛlJU2[Ç–ïølJT|JQ0Iå– mJU|[ —¨í$mJUIE—8mJU[›˜MíUmJUvJQ1[·š…ëlmJU2Iðš€mJU~[d›¸º©mJU‘|JT0JQ0JR1[€› ìÉmJUsJT‘˜|Iœ›ÝmJUs[ª›éêùmJa‘è|ö)[Á›{înJU}JTsIÞ›+nJU}Iî›?nJUs[ö›:5WnJUvIœknJUv[0œ¸º”nJU‘|JT1JQ0JR1[Lœ ì´nJUvJT‘ |IiœÈnJUv[wœéêänJa‘è|ö)[Žœ{îoJUsJTvIªœoJUsI»œ*oJUv[Ü:5BoJU}IäœVoJU}[ýœ¸ºoJU‘|JT2JQ0JR1[ ìŸoJU}JT‘¨|I6³oJU}[DéêÏoJa‘è|ö)[[{îíoJUvJT}IxpJUvI‰pJU}[‘:5-pJUsI±ApJUs[\ž…ëXpJU3O3¢%ëOަ%ëOS¨%ë[9­&îŸpJU‘°|JT}I9¯³pJU~IK¯ÇpJU|vò¸‘ð{àpJU}[ÀìqJU‘è{JT[²ÀÚ}"qJU}JQ1JR1IÏÀ6qJU}[ßÀ&î\qJU‘è{JTJQ|IõÀpqJU|I Á„qJUvÏÃ~›qJUs[%Î ºÁqJU‘ˆ{#t@7‘ˆ{[×Ï…ëØqJU2[ÐïûqJUvJT~JQ0I<ÐrJU~v>ã‘Ð}*rJU‘¨{I»ã>rJU|[-äzêjrJT À|JQ É}[ååC„rJU‘ˆ{[æ…ë›rJU1O8æöì[_æ&îÀrJU|[zæïærJU‘øzJTsJQ|I—æürJU‘øzIºæsJUsIÌæ$sJU|IÝæ8sJU}[‰é:RsJU‘à{[ëézê~sJT À|JQ º|[Óï:5–sJU|IòïªsJU|[úï:5ÂsJUsIðÖsJUs["ð:5îsJU}ICðtJU}[¡ðµ³tJU‘ }[ìð¸º>tJU}JQ1JR1I ñRtJU}[Oñ¸ºttJUsJQ1JR1IkñˆtJUs[Âñzê´tJT À|JQ É}O#ô̾[ŒôéêÝtJa‘è|ö)[¨ôéêùtJa‘À}ö)[ÂôéêuJa‘È}ö)[ëô…ë,uJU;[zõïOuJU|JT}JQ0I“õcuJU}I¥õwuJU|IÝõ‹uJUs[B÷'ì¥uJU‘È{[£÷…ë¼uJU4[Î÷æíÔuJTIê÷èuJU[ò÷‹¼vJUvI øvJUv[UøC,vJUv[vøMíQvJUJT‘ð|JQ2I’øevJUIÈøyvJU}[Žù'ì‘vJUs[¤ù…ë¨vJU2[ÌùæíÀvJTIèùÔvJU[ðù‹¼ìvJU}IúwJU}IúwJU~[“…ë+wJU<IÓ?wJUOß̾[X…ëcwJU9O¼öì[û&îwJU|JQ‘¸}I&¦wJU‘¸}[=&îÆwJU|JQ‘¨}[SïêwJU}JTsJQ|IpþwJU}I€xJUsI’&xJU|[š:5>xJU~IµRxJU~[Ñ&îtxJU‘€}JT‘ø|[þ/…©xJU‘à{JT‘¸{”JQ‘Ø}”JR‘à}”[Ñ &îËxJU‘€}JT‘ø|O` %ë[I&îúxJU‘€}JT‘ø|[{†êyJT 0“[†ê8yJT pO‘%ëO0%ëOË%ëLzêJT @”JQ Î}cœ Á.3sœð—EPÁ.3Ú£ E _Á.3¤ E—UÁ.3§ =&W/dEcJ/_=ç U/d²EN/jd\H/ FédÂ.3å¨ F¾/Ã.3dª F¼LÄ.3ã« F/NÅ.3b­ F´Æ.3á® 9bÇ.0F³È.3`° 9ÀAÉ.09ËAÊ.09ÖAË.0F@Ì.0q² FÉ_Í.3©² F#Î.0“³ F"gÏ.Y¶ F+Ð.0½¸ uTÑ.3HÜá”_}WÕ.-n  &_¿GÖ.=n‘Ð~H°Ü™„F<Ø.2>» FÇÙ.d"4¼ WlI "9$/|S©I½ SI9½ S‘I9½ S…I]½ SyI½ Q "9]µI­½ ]ÁIѽ LY"zêJT P’JQ °”JR 3}JXƒJU|[;ÁíVƒJU|[o ìnƒJU|[ ì†ƒJU|[± ìžƒJU|[Ҡ춃JU|[ó ì΃JU|[ ìæƒJU|[5 ìþƒJU|[V ì„JU|[w ì.„JU|[˜ ìF„JU|[¼ ì^„JU|L"‹°JU|JT  &JQsJR}JX °”T:5P`Ý?/”ˆSK5éÆ V`ÝlU5°b]5]e5ŒÇ ]q5ƒÈ ]}5ƒÈ Yf …]Ž5oÉ HÞî…]®5’É Y !<…]¿5íÉ Y0!([…]ã5&Ê YX!z…]Ñ5IÊ Y`!#™…]6mÊ Q€0]Ÿ6Ê Y–ß…]¬6³Ê O¡%ëOˆ(íHPÞwˆSK5×Ê VPÞbU5b]5ge5gq5g}5VPÞg¼6gÈ6T?É)ÐÞHå†SPÉ×Ê VÐÞ]ZÉ&Ë ]dÉ\Ë ]pÉÌ [Hzê†JT HIY¡†JUvO&$íO *íOì*%ëL +†êJT £|U:5Q$0ßHSK5±Ì V0ßlU5(-b]5]e55Í ]q5„Í ]}5„Í Yc$S‡]Ž5ÐÍ Hß>ˆ]®5óÍ Yä,2Ň]Ÿ6EÎ Y-¯‡]¬6hÎ O -%ëLð,(íJUwYo- ä‡]¿5ŒÎ Yy-&ˆ]ã5ÇÎ YŸ-"ˆ]Ñ5êÎ Q§-#]6Ï [0-†ê]ˆJT xLÁ1}ÉJUwLƆêJT xT:5‹ÐßA/‘ŒSK51Ï VÐßlU5kb]5]e5ÆÏ ]q5Ñ ]}5Ñ Y¡‰]Ž5MÒ H€àé‰]®5pÒ Y‹!$7‰]6¿Ò Y¯!$V‰]ã5âÒ YÓ! u‰]Ñ5Ó YÜ! ”‰]¿5)Ó Q-3]Ÿ6bÓ YLÚ‰]¬6…Ó OW%ëO9(íHàtŒSK5©Ó VàbU5b]5ge5gq5g}5Vàg¼6gÈ6T?ÉŽ$ÀàHâŠSPÉ©Ó VÀà]ZÉòÓ ]dÉ(Ô ]pÉÒÔ OÀ$í[”*zꕊJT HI±*«ŠJU‘¨~OÔ*íO­+%ëLÐ+†êJT £|U:5ï$áHSK5’Õ VálU5V.b]5]e5<Ö ]q5‹Ö ]}5‹Ö Y%P‹]Ž5×Ö Há;Œ]®5úÖ Y. ‹]¿5a× Y." ‹]ã5œ× Yz.!¿‹]6¿× Y¶.Þ‹]Ñ5â× QÀ0S]Ÿ6Ø Yé0*$Œ]¬6)Ø O1%ëLÑ0(íJUw[^.†êZŒJT xL31}ÉJUwLz†êJT xT:5ÃðáB/ŽSK5MØ VðálU5? b]5]e5ÏØ ]q5Ú ]}5Ú YÙ]Ž5VÛ H âæ]®5yÛ YàHm]Ÿ6³Û Y _]¬6ÖÛ O %ëOñ(íY" Œ]¿5úÛ Y©"'«]ã53Ü YÐ" Ê]Ñ5VÜ QÙ"']6zÜ H âqSK5Ü V âbU5b]5ge5gq5g}5V âg¼6gÈ6T?Éö%ÐâHߎSPÉÜ VÐâ]ZÉæÜ ]dÉÝ ]pÉÆÝ O-&í[=+zê’ŽJT HI_+¨ŽJU‘°~OŒ+íO®,%ëLÖ,†êJT £|U:5a& ãHSK5†Þ V ãlU5s/b]5]e5ß ]q5ß ]}5ß Ys&M]Ž5áß Hã8]®5à Y)/ ~]¿5kà Y5/"]ã5¦à Yœ/ ¼]Ñ5Éà Y¥/!Û]6íà QD1b]Ÿ6á Yw1/!]¬63á O1%ëLZ1(íJUw[{/†êWJT xLå2}ÉJUwLG †êJT xT:5ûàãC/a”SK5Wá VàãlU5|#b]5]e5+â ]q5"ã ]}5"ã Y‘]Ž5ä H äã‘]®51ä Y4# 1‘]¿5²ä Y>#"P‘]ã5ëä YÆ#o‘]Ñ5å YÎ#*Ž‘]62å QI%g]Ÿ6Uå Y{%5Ô‘]¬6xå OŠ%%ëO_%(íH äR”SK5œå V äbU5b]5ge5gq5g}5V äg¼6gÈ6T?É¢'àäHÀ’SPÉœå Vàä]ZÉåå ]dÉæ ]pÉÅæ Oß'í[,zê’JT HIH,¤’JUwO,íOÒ.%ëU:5(0åHSK5rç V0ålU5“0b]5]e5è ]q5€è ]}5€è Y0(.“]Ž5àè HÀå”]®5é YQ0!_“]ã5jé YÌ1 ~“]¿5é YÖ1“]Ñ5Èé YÞ1#¼“]6ìé Q2p]Ÿ6ê YW24”]¬62ê Oo2%ëL62(íJUw[›0†ê8”JT xLµ2}ÉJUwO„#†êTÄ:4 æD/Ÿ”SÕ:Vê V æ]ß:Œê Oœ@íOÚ%ëO‡%ëOe%ëO^ %ëO¥#%ëTá6_`æO/K•S 7Ìê S"7Ìê S7ë Xþ6Xò6R34µ )AXL4XX4S@4|ë Tá6€°æP/Ì•S 7¨ë S"7¨ë S7ôë Xþ6Xò6U34Ä ç)AXL4XX4S@4Xì LÜ zêJT °‘TÕf™0çQ/ú–Sæf„ì SvgÀì Sjgøì S^g0í SRghí SFg‹í X:gS.gÃí X"gXgX gXþfXòfV0çb‚glŠg€ ]’gùí ]žg1î ]ªg{î ]¶gµî ]Âgõî [¹ø–JUsJT|JQ}JR~JXJYvtXY0L ùJU h”JT e/JQ JR °‹WlI 8I/¯—S©I/ï SISï S‘ISï S…Iwï SyI›ï Q 8]µIÇï ]ÁIëï LXzêJT P’JQ °”JR 3}JX')ASL4D XX4S@4i Lä>zêJT °‘JQ c}T_n¼3ÐèÆ=²Spn• S¬n— S n¼ S”ná Sˆn S|n+ VÐèb¸nbÀn]ÈnP ]Ôn< ]ànP ]ìne ]øn T3l¼3éÚ²S€lP Stl— Shl¼ S\lá SPl SDl+ VélŒl°:l”l!<lœlG:l¤lJ]¬l— ]¸l% gÄlgÐl]Ül³ ]èl¿ ]ôl! ]mj ] m³ ]mü ]$mI ]0m¸ ]@íJU~Tá8 60ëÍ6¢S9Ý* S9Ý* S9Ý* Sü8Q+ Xò8Y96(¡]c9Å+ K^6JUwJT1YðBT¡]K9, QðB]V9@, YBŽ¡]/9c, QB]:9‡, V ëS9ª, S9ª, S9ª, Sü8â, Xò8T…³ŠBÐëUD!¢S ³- X–³VÐë]ª³c- [¢Bì¢JUwJT|KÅBJU|LŠB'ìJU1Tá8o6ìÏÔ£S9™- S9™- S9™- Sü8™- Xò8Y6%¬¢]c9å- K¯6JUwJT0YhCæ¢]K9<. QhC]V9`. YÐB £]/9ƒ. QÐB]:9§. Q CHS9Ê. S9Ê. S9Ê. Sü8Ê. Xò8T…³'CPìUD¿£S ³/ X–³VPì]ª³K/ [?Cì­£JUwJT~K_CJU~L'C'ìJU0Tá8>7€ìØh¥S9/ S9/ S9/ Sü8õ/ Xò8Y]7)K¤]c9i0 Kƒ7JU‘È~JT1Y¸D…¤]K9Â0 Q¸D]V9æ0 Y C ¿¤]/9 1 Q C ]:9-1 VàìS9P1 S9P1 S9P1 Sü8ˆ1 Xò8T…³RDíUDS¥S ³À1 X–³Ví]ª³ 2 [kDìA¥JU‘È~JT|KŽDJU|LRD'ìJU1Tá87PíÚ§S9?2 S9?2 S9?2 Sü8?2 Xò8Y®7&ߥ]c9‹2 KÑ7JU‘È~JT0YPE¦]K9ä2 QPE]V93 Y˜DS¦]/9+3 Q˜D]:9O3 QEPS9r3 S9r3 S9r3 Sü8r3 Xò8T…³EíUDó¦S ³ª3 X–³Ví]ª³ó3 [ Eìá¦JU‘È~JT|KCEJU|LE'ìJU0Tá8I8Àí㨨S9)4 S9)4 S9)4 Sü84 Xò8Yq8)§]c95 K—8JU‘Ð~JT1YþE¹§]K9j5 QþE]V9Ž5 YEó§]/9±5 QE]:9Õ5 Q`?PS9ø5 S9ø5 S9ø5 Sü806 Xò8T…³j? îUD“¨S ³h6 X–³V î]ª³±6 [ƒ?ì¨JU‘Ð~JT|K¦?JU|Lj?'ìJU1Tá8¨8PîåHªS9ç6 S9ç6 S9ç6 Sü8ç6 Xò8YÇ8&©]c937 Kê8JU‘Ð~JT0YdFY©]K9Œ7 QdF]V9°7 YáE“©]/9Ó7 QáE]:9÷7 QFES98 S98 S98 Sü88 Xò8T…³&FîUD3ªS ³R8 X–³Vî]ª³›8 [?Fì!ªJU‘Ð~JT~K_FJU~L&F'ìJU0HÀ]'nÑ8 h3n‘H]@nl9 K:JUT4':@ï5ѪSœ4µ9 S4í9 O5:ÎvLéJ!¨JT4T_:Jpï<3«Sl:#: LWJzêJT ˜JQ|JR~h||1.([Ü9¨íK«JU~I':_«JUOJÎvIrJ€«JU~I¯J”«JUK×JJUH°ïP¬] nF: ]nµ: T_:H0ð ý«Sl:`; LLHzêJT ˜Te4‰Ipð ?¬Sr4ƒ; L®IzêJT ŒJQ4K@JU~TYX? ð¼¦¬SjX§; V ð]vXË; ]‚X< ]ŽX< L ?ÅêJU:[é3í¿¬JUw[4íÙ¬JU‘È~[4íó¬JU‘Ð~O14'ì[x4?ì­JU|JT~[´4éê?­Ja ô)UUUUUUÕ?[×4ˆî]­JU}JTs[5íu­JU|[^5M혭JUsJT|JQ4[ó5:5°­JU|[Ë6 ìέJU}JT|[7Úíæ­JU~[í7 ì®JU~JT[.8Úí®JU|[9 ì:®JUJT|[K9ÚíR®JU~[†9›®JUvJTwJQ‘È~JR‘Ð~JX‘ì~”Ja‘à~ö)tbh0[ :zêÇ®JT À|JQ É}I›;Û®JU|I«;ï®JU|[!<ù)¯JU Ø”JTvJQw”JR °‹I7<=¯JU}Iz<Q¯JUIš<e¯JU~Iª<y¯JU~I»<¯JU|I >¡¯JUsI>µ¯JU}I>ɯJUsIú>ݯJU~IZ?ñ¯JUsI»?°JU|IË?°JU|IÛ@-°JU|Iê@A°JU}[ø@:5Y°JU|[$A:5q°JU~[PA:5‰°JU~[¨AøѰJUvJT‘À~JQ‘È~JR‘Ð~JX‘Ø~JY‘ì~”tXY0IêAå°JU~IbBù°JU~IzB ±JUIC!±JU|O…C%ëIûCB±JU|I DV±JUIÚDj±JU~OmE%ëO~F%ëI£F˜±JU|I²F¬±JU~IGÀ±JU~OG%ëOÐH%ëO;I%ëOcI%ëKKJU}LT<ùJU Ø”JT ÚJQüJR °‹WlI;8¿ò²S©I=< SIa< S‘Ia< S…I…< SyI©< Q;8]µIÕ< ]ÁIù< L@;zêJT P’JQ Ý}JR 3}JX5JY ~[_;ù$³JU Ø”JQüJR °‹OÆJõê íB³” 3R³”<žªJ0г9«J—9½«J—?9’2¯Jvo<0¤³=ç ‚<<÷Ÿ;0¾³=ç ­;<\R±;0س=ç j<xYAˆ<0Kö$œÈÆdç Ó>_ad&å>¶aF•bŽ<3%= FŸb<3KI F©b<33 e Oki%ëOˆi”ìOHonêH òñ»FhR>3Ae Oah%ëOzh”ìO˜hnê[ÇLù*¼JU €•JT‘˜}”JQ‘}”JR‘ˆ}['M…ëA¼JU0[EM­îe¼JU h|JT0[rMÒJU ~JT `%&JQ0JR0JX õOŽMêì[®MÞîμJU  ~[ÔMêîí¼JT ~IjN½JU}I„N½JUvI¢N)½JUIºN=½JU~IÔNQ½JUsIOe½JU|[-QêJT %~[W1­·½JU  ~JT $}JQ h[ W1­é½JU .~JT #}JQ`[ÈW1­¾JU .~JT 4~JQ H [éW1­O¾JU .~JT =~JQ 0[ X1­¾JU .~JT G~JQP[2X1­³¾JU .~JT O~JQÀOGXêÂ[kX&îÚ¾JQ‘ˆ}OŽXêÂ[²X&î¿JQ‘ˆ}OÕXêÂ[ùX&î(¿JQ‘ˆ}OYêÂ[@Y&îO¿JQ‘ˆ}OcYêÂ[…Y&ît¿JQsO£YêÂ[ÅY&JQsOãYêÂ[Z&JQs[,Z÷îâ¿JU  &&JT0[NZ&îú¿JQsIfZÀJUsO€Z&î[±Z÷î?ÀJU €&&JT0[ÓZ&îWÀJQs[úZ÷î{ÀJU `&&JT0[[&î“ÀJQsO:[̾[U[C¸ÀJUv[v[‘ëÏÀJU3[È[yÆíÀJUsJTvIê[ÁJUvI\ÁJUs[$\&î/ÁJQ‘ˆ}IA\EÁJU‘ˆ}[V\ï\ÁJQ0[\¨ívÁJU‘ˆ}[.]&îŽÁJQ~IF]¢ÁJU~[[]ï¹ÁJQ0[]¨íÑÁJU~IË]åÁJU~[(^&îýÁJQI@^ÂJU[U^ï(ÂJQ0[‡^¨í@ÂJU[ _&îXÂJQI$_lÂJUO0_̾[K_nî‘ÂJUIg_¥ÂJU[v_a¯½ÂJT~I’_ÑÂJU~Ož_̾[¹_nîöÂJU~IÕ_ ÃJU~[à_Ïë(ÃJUJTsIü_<ÃJUI `PÃJUsO`̾[/`Ïë{ÃJU~JTsIK`ÃJU~I[`£ÃJUsOg`̾O`̾O—`̾O±`̾[Î`…ëîÃJU3[þ` îÄJUsJT|JQIa&ÄJUsI(a:ÄJU|IË  &_‰?Ë  &_“@Ë  & ®ÞÌ”_¡:AÎÌ  &_øBÎÌ  &_µ:CÎÌ  &_B:DÎÌ  &_‘CEÎÌ  &_œCFÎÌ  &_§CGÎÌ  &_EFHÎÌ ÿ &_ŽFIÎÌ ü &_šGJÎÌ ù &_­HKÎÌ ö &_KLÎÌ ó &_MMÎÌ ð &_&MNÎÌ í &_1MOÎÌ ê &_‰NPÎÌ ç &_”OQÎÌ ä &_æURÎÌ á &_ñUSÎÌ Þ &_WTÎÌ Û &_âEUÎÌ Ø &_#WVÎÌ Õ &_ŽWWÎÌ Ò &_XHXÎÌ Ï &_™WYÎÌ Ì &_WJZÎÌ É &_;([— Å &_ÒL\— Á &_5,]— ½ &_r ^— ¹ &_³O_— µ &_==`— ± &_ua— ­ &_7#b— © &_sZc— ¥ &_ÕZd— ¡ &_’Se—  & ®Ð”_^f Ð ˜ &_Ú[g Ð “ &_-h Ð Ž &_ƒ'i Ð ‰ & ®„Д_o2jtÐ € &_Ý"k Ð y &_4UltÐ p &_]m Ð k &_>n Ð f &_î!o Ð a & ®Ñ”_ÐYpÑ [ &_ÀZqÑ U &_ÛKrÑ O &_!4sÑ I &_è.tÑ C &_ÞuÑ = &_vÑ 7 &_W<wÑ 1 & ®ØÑ”_’.xÈÑ * &_¿OyÈÑ # & ®Ò” _ôgzÒ  &_Ê7{ÈÑ  &_7|ÈÑ  &_J3}ÈÑ ÿ &_Y3~ÈÑ ø &_tcÈÑ ñ &_h3€ÈÑ ê &_w3ÈÑ ã &_†3‚ÈÑ Ü &_•3ƒÈÑ Õ &_¤3„ÈÑ Î &_ï4…ÈÑ Ç &_´@†ÈÑ À &_MN‡Ð ¸ &_G ˆÐ ° &_.‰Ð ¨ &_¨1ŠÐ   &_°‹Ð ˜ &_:3ŒÐ  &_2OÐ ˆ &_ŽÐ € &_¹Ð x &_ô_tÐ h &_9<‘tÐ X &_’tÐ H &_“tÐ 8 &_Í”tÐ ( &_Ü•tÐ  &_¾ –tÐ  &_a —tÐ ø &_˜tÐ è & ®ÎÔ” _ ™¾Ô Ø &_€š¾Ô È &_›¾Ô ¸ &_hœ¾Ô ¨ &_©PÒ ˜ &__$žÒ ˆ &_ŸÒ x &_ò Ò h &_†"¡Ò X &_™"¢Ò H &_¬"£Ò 8 & ®ÐÕ” _w ¤ÀÕ ( &_h¥Ò  & ® Ö” _/¦üÕ  &_5a§ÀÕ ø&_}C¨üÕ è&_ù©ÀÕ Ø& ®tÖ”_è0ªdÖ À&_¨g«ÀÕ °&_Úe¬ÀÕ  &_e­ÀÕ &_ÆW®š. €& ®òÖ”_F¯âÖ `& ®×”_If°× @&_*Z±×  & ®T×”_W ²D× &_iD³D× à& ®×”_™´€× À&_:µD×  & ®Ì×”_œ¶¼× €&_I ·I `& ®Ø”_D¸ø× @&_Ÿ*¹à  & ®DØ”_Tº4Ø ð& ®jØ”_bJ»ZØ Ð& ®Ø”_™V¼€Ø °& ®¶Ø”J_e½¦Ø `& ®ÜØ”"_Û6¾ÌØ  & ®Ù”$_+¿òØ à& ®(Ù”;_>ÀÙ  &_UÁÙ `& ®dÙ”#_˜ÂTÙ  & ®ŠÙ”<_$ÃzÙ à& ®°Ù”9_/\Ä Ù  & ®ÖÙ”B_±eÅÆÙ @& ®üÙ”!_”ÆìÙ & ®"Ú”Q_B-ÇÚ  &_§ ÈÌØ `& ®^Ú”(_p5ÉNÚ  &_j4Ê3 Ø,&_Æ&Ë3 Ð,&_z$Ì3 È,&_qMÍ3 À,&_`Î3 ¸,&_)Ï3 °,&_ä<Ð3 ¨,&_ZÑ3  ,&_‚ Ò3 ˜,&_Œ!Ó3 ,&_I Ô3 ˆ,&_ÿÕ3 €,&_Ö3 x,&_“,×3 p,&_w&Ø3 h,&_)AÙ3 `,&_,JÚ3 X,&_Û3 P,&_À6Ü3 H,&_«)Ý3 @,&_³3Þ3 8,&_‚ß3 0,&_Là3 (,&_fá3  ,&_Œ>â3 ,&_™>ã3 ,&_3 8)&_A?3 0)&_êP@3 ()&_÷PA3  )&_VB3 )&_hC3 )&_ND3 )&_‰E3 )&_sIF3 ø(&_ÌQG3 ð(&_AH3 è(&_fI3 à(&_ÙQJ3 Ø(&_ÈgK3 Ð(&_y7L3 È(&_PM3 À(&_vRN3 ¸(&_/*O3 °(&_µP3 ¨(&_ƒRQ3  (&_®IR3 ˜(&_áS3 (&_ÍKT3 ˆ(&_U3 €(&_¬V3 x(&_ W3 p(&9ÐBdz19¥Gez1_¬fz1 À&&_: g3 h(&_dh3 `(&_di3 X(&_dj3 P(&_&dk3 H(&_5Bl3 @(&_3>?ƒÎ%Î%5†ƒ 3…•d•d„11Ú„ØØ90ƒAA45ƒ-X-X3Oƒö ö ?ƒBƒÔÔGƒs*s*:5ƒy"y":4ƒ7f7f=ƒ^^2ƒ‘_‘_(ƒÓ Ó /„ÐÐ9ƒii;„YY3Aƒ ] ]< „ÔfÔf9”ƒJ„ÇÇ,ƒò&ò&Eƒ¯Q¯Q/s„à;à;9„Þ Þ 9¼ƒ’ ’ (ƒÒ Ò -„†]†]9°ƒYdYd= ƒÅPÅPDƒã?ã?>4ƒŸ'Ÿ'>5ƒÈ#È#>3ƒAA3\ƒµ+µ+3PƒÉ:É:/nƒ;R;R„íí9Uƒêê*ƒÀVÀV? „Z&Z&9fƒÍ8Í8@ƒ« « /mƒ¢&¢&3ä„(=(=9s„»_»_9|ƒÜPÜPƒŠcŠc3]„Þ]Þ]å„44Õ„p/p/,!„%"%"8Ò„<<9„gg9¥„››„ŽŽ„  9xƒ''`ƒŸFŸF/z„v8v89pƒ7ƒ#h#hK„""„D2D29«„ÉÉ9Å„BB9^ƒ 8 8/pƒ!!3Qƒ``3Rƒòò/|ƒII/wƒ®L®L/x„Ï\Ï\9¦„ff9¹„Ú/Ú/9áƒË0Ë0Amƒ/4/4TƒÅ^Å^>„ÒcÒc,îƒý3ý3.ƒ__Buƒ:N:N;„__؃Y%Y%1n ³kh iG0p¬ 7U@SXintO2 ØaNX„2v.†2D¸6ƒ„ZS„„LŒdØñ' ;òBL%÷I4øIb/ùI#KúI ¸&ûI(ºüI0ôýI83.þI@ IH ÝIP Ü>IX mE_` aeh EBp ·% Bt §<‹x bPo€ ñv‚ ¸1kƒ [,{ˆ «<!– Ô)¨˜ Û*¨  â+¨¨ é,¨° ð.V¸ :/BÀ Ê 1Ä A%–$œ_Ö9_Â1žeR ¢B.ª O{ ¡' O‘ ¡— O`fB¹þhf¹‘vi1p11p21v11-v21-out1ThB-muJ--¾0pœ‰Êwe Õ8f àùf ëÉg önh €ò ö/i ë¤i àj Õ\j ÊÑj €òFk k œr1L¬ ˆ–Ÿ9r˜ U1T ˆ– œq8@K¬Ùk ¬q² U  –œÈqJ=¬l ðq² U –!"SBPrŒœñ "R3S-)l "a3S-œl "|cS-m "p3S-‚m "3S-õm "Ž3S-hn "3S-Ûn "¬3S-;o #x0S-‘#x1S-‘#y0S-‘#y1S-‘#z0S-‘ #z1S-‘($outS›o %i Tñ ‘ð{&i^B p 'etrBVp %3hv ‘°}'tt„ ìp 'i…Bq 'j…BFq 'k…B¦q &~2…Bçq œ vpX¬r ,v² U v– œ8v(o™¬Fr Ov² U h– œ`v0nÚ¬nr wv² U Z– œv0m¬–r §v² U L– œÀv0l\¬¾r ×v² U >– œðv0k¬ær w² U 0– œ w0jÞ¬s 7w² U "– œPw0i¬6s gw² U –(©w¾ZU‘¸|T‘˜}a‘¨{ö-b‘È{ö-Q‘¸(Òw¾•U‘ð{T‘ˆ|a‘à{ö-b‘˜{ö-Q‘°}(x¾ÐU‘ˆ|T‘ |a‘˜{ö-b‘ {ö-Q‘È}(5x¾ U‘ |T‘¸|a‘ {ö-b‘¨{ö-Q‘à}(ax¾F U‘¸|T‘ð{a‘¨{ö-b‘à{ö-Q‘ø}(”x¾ U‘Ð|T‘è|a‘°{ö-b‘¸{ö-Q‘~(Çx¾¼ U‘è|T‘€}a‘¸{ö-b‘À{ö-Q‘¨~(úx¾÷ U‘€}T‘˜}a‘À{ö-b‘È{ö-Q‘À~(-y¾2 U‘˜}T‘Ð|a‘È{ö-b‘°{ö-Q‘Ø~(\y¾m U‘ð{T‘Ð|a‘à{ö-b‘°{ö-Q‘ð~(y¾¨ U‘ˆ|T‘è|a‘˜{ö-b‘¸{ö-Q‘ˆ(Åy¾ã U‘ |T‘€}a‘ {ö-b‘À{ö-Q‘ )Üyh - ¡ ¡ - ¡ ¡B*R¨e*íE©e I I ¡ÿ B+ i c àÖ 9 I ~ ¡ÿ ¡+Kh-“ à– h ,>h>hW- ž v2 is inf .fh\hfh- ž v1 is inf -žvalue7 is inf -žvalue6 is inf -žvalue5 is inf -žvalue4 is inf -žvalue3 is inf -žvalue2 is inf -žvalue1 is inf -žvalue0 is inf /•d•dˆ kh /iGàyÿ 7U@SXint2Ž-àyšœðp0ð^s p1ð—s p2ðÐs aö t bö¦t cpx -•u cpy -Þu cpz -/v uz€- - L›-€z_œ€ p0ðU p1ðT p2ðQcpx-ev cpy- $ > : ; I  I : ;  : ; I8 : ;I8  : ; n  : ;  : ; I I!I/ : ; &III&: ;I7I : ;  : ; : ;I8 : ; I8  : ; n : ;n< : ;  : ; I8  I: ; n!( " I: ; #($ : ;% : ;I8 & : ;n'9: ; (9: ; ):: ; *: ; +: ;,9: ; - : ; I?<./I/ : ; 0.?: ;I<12.?: ;I<3.?: ; I<4.?: ; nI<5.?: ;nI<6.?: ; I<7.: ; 8: ;I94: ;I:: ;I;4: ;I<.: ;I = : ;> ? @.: ; A : ;B.: ;I@—BC: ;ID: ;IE: ;IF4: ;IG4: ;IH UI‰‚JŠ‚‘BK‰‚L‰‚1M.: ;@—BN: ;IO‰‚1P‰‚•B1Q R1X YS1T1RUX YU1RUX YV UW1X YX1Y Z‰‚[‰‚1\.1@—B]41^‰‚•B1_4: ;I`‰‚•Ba.: ;@b 1c.: ;I@–Bd : ;e41 f41 g41h41i1 j.1@–Bk1l 1m41 n1 o‰‚•B1p1q.1@r‰‚•Bs1 tŠ‚1‘Bu4: ;I v‰‚“Bw‰‚“Bx.?: ;@–By4: ; I?<z4: ;I?<{!|4: ; I }4: ;I?~4Gn 4Gn€4Gn 4Gn‚4Gnƒ.?<n: ; „.?<n: ;….?<n% $ > $ >  I: ; I  : ;  : ; I8 : ;I8 : ; I !I/ &I.?: ; 'I 4: ; I7I.?: ;' : ;I4: ;I4: ;I.1@—B141 U U411X Y1‰‚1Š‚‘B 1X Y!.?: ;'I@—B": ;I#: ;I$: ;I%4: ;I&4: ;I'4: ;I(‰‚1)‰‚1*4: ; I?<+4: ; I?,.?<n: ; -6..?<n: ; n/.?<n% $ > $ > .?: ; 'I@—B: ; I4: ; I‰‚1 I I !I/ : ; I .?<n: ; û /usr/lib/gcc/x86_64-linux-gnu/5/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/usr/include/python2.7/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/usr/include/c++/5/usr/include/x86_64-linux-gnu/c++/5/bits/usr/include/c++/5/debug/usr/include/c++/5/bits/usr/include/c++/5/extsurfaces.cppstddef.htypes.hstdio.hlibio.hwchar.htypes.hsigset.hunistd.hstdint.hpyport.htime.htime.hobject.hmethodobject.hdescrobject.hintobject.hlongobject.hlongintrepr.hfloatobject.hstringobject.htupleobject.hlistobject.hclassobject.hframeobject.hpystate.hcode.hsetjmp.hsetjmp.hnpy_common.hndarraytypes.hcwcharc++config.hdebug.h clocalecwctypepredefined_ops.h new_allocator.h numeric_traits.h wchar2.hlocale.hwctype.hunicodeobject.hboolobject.hbytearrayobject.hdictobject.hsetobject.hcobject.htraceback.hpyerrors.hceval.hpyfpe.h__multiarray_api.h__ufunc_api.hstdlib.habstract.hpymem.himport.hwarnings.hsysmodule.hfileobject.hsliceobject.hmoduleobject.hpythonrun.hmodsupport.h €’å‚åtwsvvt„ô òxò òpòôôôùózòösòò« ò=-“”/7YóÕ; X n‚.›zº ŸK X.eæKKƒƒƒuXuXtóxº º|tK‚½©i„Hs=s?½q?xÈsT;K ‚]x¬`q¬Xr¬Xz¬^†¬ø¬0. áL <• =[K»‚Ç<¹<öòWƒfKu/¢òLIe„1vä_¬<<>&JÀ~JntÒtYX=Ô~ t°ò‰Jž–ƒIK–=YÉž ±~ÖÀ<˜­‘»KZ.Ç~J¹žò‘‚­ƒIKKƒi‚Y>I=æ~‚qtª°/0$¨‚ƒZ:>gggXŸ­Y¬~t)%Õȯ°,ý~¬Œ ô~<8ºw¬« ¬y.²-ÉX½ƒK»\Xƒ¥uTž©Éõ‚žKgKƒ†¼‚IKóKƒ†Iê‡ògKYò{zf¯ä»gƒÇ]tK t¯"JÑ]f­"¬þqòJ0ËKKYÕX<vf ¬«ºZÓžírWYZJKW!óe/¡‹….K¾‘hÖø„­Z"ƒƒVDuXƒ"١ˆtM+[Ž.‚½K¡KöXŸ;=/=„­gI­Ô’Ô¾t¢8@/Ly"¢8@ f±‘Ö׃ž‘–.êt—f‚? ­²iò"ž;=I=-3V=K­ÏäŠòÝòºä»L:>»;=iwÆ’q"KKÅžó«òŸ‘uŸŸ=K„u¬sJ=¯KI=Z€ º7A2¸æ½XõýJþòé~XXþX…Xpf¯‡Yƒ–û䟑ƒJè<ƒ‘„IKYOžß<ff±GKMYÈt°ì"†UƒƒYK×p¬K:KYØ;YfKPäIYY>ž‘dXòGLLYG[jÌUYƒƒL:ZJ!ƒLXó°òH\KUhVwk'÷ƒ‘%[‘.Yä.q(‘ä!‘ŽXƒ9‚WY°Èyÿ=…<Uä+Xft×}º–ºtÆÖYEtXûtªr.Y¼ƒW=f’ƒ;=h­I=h Z¤[Α/.¾ttð ò(­ ¬«hò òuJt$!ç 6yÖzJæx- éwt ‚‘Uº‡æäYA#“zƒ‡zJ8‚…¹<×È­¥2uJÉ@åôéç£YKgxJŸ¢ž ºŸ`äš‚Jõ7¬!gW×óe/YàL8‘M*Ygõ¤á¬zòzzJY uæi=Y¼Éƒ;=YYp.<p‚]ƒ-•ðƒW®wä0[ä`”wò;K\­jx¬Šß¼KæÛò”ÐK×.wJ <w.´´‚Ì<´0u-Š™uW•„žéXël ‘»ˆtK»Ä÷‚ Xµˆ.‘Æ÷äpN¸ˆžô€ #9?»Y JG?ðyºyJ_K=Yã‚jJ¢YÜ‚¤jJž6JJJ6<JžwK <‘9 .‘ žƒ;="[£R¯.0]1ä‚® ÒÖµºËyé®–ºËK×»I=zXËKבI= fµj¬S ._qä!;=|ƒ;=m!;=»Ó#Y;=ó!K;MY;=­ÉK;Y5½½y &fff Èj ý f·ú~ÖKöÅ…X–u;=j»;=hY;=f»;=i" .uÊo uÈŠú~ò‘À…ä,ÀX@tÄú~‚ðƒòø|Ö­KKKƒƒ•‚Õ|X«JÖ|Á'ž¿X.× òËN¤KKH[ XÉæ‰"ä^Èÿ!<^ ¬ãòóóóyòãŽ|=–.ô¬ä×Rf=:+1<ƒTXÂ<»e!Wvt <iò%³etÍf³e ÍX’e.î<£eÖgš‚"þLåhò›¬Òh.#Èùt”>IK‚hÖ¸ žu¬ƒòi4Š'&ŠZÖ ‚u™Öýz"äÈ{Ö&Éåo¬.Áž&É嫬Ô.•‚Ül4¶C­_Ó <­_Xh òˆ$ —\žé#<—\ªn ägÏôu æìX–btZèJ­’#׃”bᥬKŸKƒÚ‚WžzfB¬Ÿ;=!YYtŸ ŸZzz‚NH°Éü%+’Y‚î&<’Y<Ø ò%òKK•Zò1#Ù¤JÉ÷Ú.—%ò‹ZtÞ%<oºª»ßYº¢&<ƒƒµZòK‘KKK¦ZL¬J­’'­W=uÑaÔ%òÖx(ÔaȬ<Ôa<­J6¡µaXç%ž#qçÕZ$ ‚.—bÈé<—b<Y<´òŸ;=gYWJ­’'­W=u$¡ažž.™§È™Úò0ÈOÈèX0Ãaž÷ ä‘<Ÿ;=nÉ—gI=­Ÿ“±SAÙ^Jë%äŒ[«~JÊ&<Kóÿ~tòøf#y#5Œ[ô$ºÔxt1!äÉtròãº_<çF Ì%ÖÎx%t· á_‚Äb.#;ä­XÁò»žÅ<_ä!‚Ò} ëytã".”úŒÈ¢YÈ‘Ý&ׂ|òtot]~½ŽYq‡ZŒ^YY‘‘YƒY‘Ÿ‘ƒÉpøf„—mäÖXÈ»©'º×‚|òtttSY‘Yu‘ZŒ^YY‘‘YƒY‘ó‘ƒÉpøf„—ÔXä!²'º­KY‚î&ÖƒKúX<Ý&(¯Yt‘Ï&äXº'ºƒƒâXt›'º½€åƒ‚z<#qçcÖr»»ƒƒ‚äŸKKKƒƒn‚KKŒX»¡'ºû0¤XXV.ô&Xoºr‘¶YºË&Xƒƒ‚äŸKKKƒƒn‚KKÌX‚u½'‚£tÝf=KKKƒƒ‚gKËž=KKKKKKåó„{=mòL×]'½'È£ ÞL:L„„„„„‚‡}º;üähÍæô¢Hhh¿æ„„ÿl¬Y­K‘ÿsžHL:fK]rLZŸKV¬«ìs»ƒƒ¸r»»ƒƒðr»»ƒƒðr»»ƒƒòz<#qçcär»­‘ºÔîtƒƒ¥‘XQ‚;-;;;;;g.;wôåóååååå»éä£tÝ=KKKƒƒ‚/KÆ­KÆ­KÆ­KÆ­KËÈ=KKKKKKååÕ–JK- X$óN™é1óà–tjò0(åteòHHH»è8r»»ƒƒ&òiqoºr»£‘ºÞîtƒƒ<oºr»¨‘ºÙîtƒƒJq<oºr»²‘ºÏîtƒƒ‚q<oºr»·‘ºÊîtƒƒ<z<#ýçÛÈV<•”ä-;;;;;g.;ÉïÖz<#qçÈ‘&“ä;-;;;;;-h<;wñºó­]HÚzKß~ä;-;;;e<;w˜Ö’~ä;a.;w™Ö‘ä;-;;;;;g.;wÌïÖ#qçÚ$ò.ä:;;;;f<;wÌïÖ#qçß‘$ü~ä;-;;;;f<;w°Öú~ä;-;;;;f<;w*ÖV<²÷~ä-;;;;f<;«Öö~<V<Çâ~ä-;;;e<;ºïÖ†’"á~ä;-;;;—<Î~<;wÍÖÝ~ä;-;;d<;wàÖÊ~ä;-;;d<;wâÖÈ~ä;-;;d<;w*ÖV<äÅ~ä-;;d<;ÝÖÄ~ä;-;c<;wÖ}ºV<ù°~ä-;c<;šÖØ~ä¯~ä;-;Ç<œ~<;w¥ÖØ~ä>«~ä;-b<;w’Ö˜~ä;-b<;w”Ö–~ä;-b<;w*ÖV<–“~ä-b<;¤Öý}ä;÷.ê}<;w*ÖV<«þ}äa.;ƒÖff$ÓX=ä<“}.=Ì hòÐXØ}X>ù}ä`<;w©pÖû¬4d<½žæ}ä`<;wÆÖä}ä`<;wöÖ <©}<V<ÈÂ}ä;ÔÖ­}ä;wÖÊÀ}tÀ<¿}‚…ÖaÈ._Êä=:?=÷}<=>º`.;;".v‚ XƒãAf=ÁºŸ|X0N¤uKKKKKKKKKKKKKY Ja‹Pt@d0TåDó4ó44ò Öhhhhh'6ytQowt Jisº>ÃJxXvXx‚Ü}X>wº>0@:…>uº>0@:@Ÿ‚¶ š.=:?=î<-tx‚Ó}iÖzÖvfytcSifekäZ‚1.v<ãZ‚.­<·ä>Å.;;;qtKä>ñ~.=¿tMä>0ï~<=½tOä>0>í~<=»tQä>0@:í~<=¹tSä>0@:@é~<=Žt).U<)<ð<d<.:mä ‚Ysäƒã}1f<~ä=ðtœäó~<=Œtâ< äÞ äÞ‚¢ä>Â.t¤ä>Ã.;t¦ä>Ä.;;t:ªä>É.8;;;|„ŽBX.&XÑ_X!X; äW)X Èg§ì"rLØ“ <`J¢ì<Þ“º <4=ƒ+5>u$- >0ƒ®y%>0>éz JkXòskX.>:=ƒÔfå»»»RxJƒQyXY‘‘‘‘‘»øhɇ.‘´øXZʇ.Ÿ³øXZˇ<²TYYY¯øXÒ‡J®øX"ч ‘£€Ÿ$Üÿ~X¤€<Üÿ~Jäfeºêçž  uÖ tuº <³˜Xvv‘€¬ãÿ~tƒ€Ÿóâÿ~Xž€<âÿ~<"ºœ€¬µkJZ»”¿ët”˜xÈ`tÈ”`tÈ”¦tÈ”`º”È'–½ë0t7®ÖXõ~ºK»»»»»‘‘‘‘‘‘‘”ƒI=£X×­ÿ~..ÁøÈ9¬=%*0ñž×®ÿ~X<Àøº9¬=È*'«†ä«ùÈ*+¡†Xùø"ó÷0 òq'‚w)(¸†äºOºOºOºOºOºOºOäOYåX½YåX½Yå½F.¥ì/LД'™øÈ9¬"É- ÈÈ')µÿ~(¹ø#9¬"u±à)œ% ×r*ös<º”¬×ëòmGLJmHL<mHZªLºm@LÝ<±Lhu <’éwt"¥.†žÉ€.±Lhu <’éw‚"¥.[þH±Lhu <’éwt"¥<¦†âçžõ—9‹èºð—9á€ȱLhu <’éwt"¥ ¬†+Üçžë—9•èÖæ—9ï€È«gžá—9ŸèÈÜ—9ù€Ö«gž×—9þ€È¥Øuw‚«gÒ—9ŠºØu‚Øy"×m‚ u‚ØœØgžØÇu;€xž9¬#¿à%S²›‚ žÒ$ŸJá.[X*'S²ß~9¬Ê¿) Ò&ŸJá<ûž0èwä9¬"éà%S²¨ÈÒ$ŸJá‚¡X¯‡ÈÕøXà#ßBß~‚9¬ër"Ò .Ex­ Ò%Ÿ<á.[J%VÁ…CÜx<JkXòk‚.=;=Ôfu»MMLKwJÉL…„ƒx‚ÉôMG…ƒ<­‡Ÿ¹¯ù~twÖRf»½3º hŸŸ5 ¬¼%®ŸŸ5 žÊ hŸŸ5 ¬hh®Mª„ fŠ-;÷<ö~.É.ƒååggågåóóK;[žzX”‚´ï+  uÖ tuº <£‘Jvv5Q,“‚¸†òÒø~X®‡<Òø~JfÖïòxò((åååóuuõzòðŸÊ­~tK»»»»»»»»»»»»¾ƒI=éäOäOäOäOäOäOäOäOäOäOYåX½Y•®ñõdòXä9‚‚ë~<Ù.ññVòTä;v<w.íUòRä;v<=¬ººÉ.·z‚Ñ.Eä9v<<.ävA‚9v<w.Õòôò§ÖÙ. äv®ä;v<w.è¬ä;v<㬔º÷¬v‚9v<ä.“<ŠÖøRx‚\€]·«îX­’"ŸuÔ‘!»Ÿ«»É­ ºå…ÈŸú~<Ÿ„­lñswô…äšú~Èæ….šú~.ë~9˜<j.&ÈÔ…ÈŸ®ú~<Ÿí‚wX tZ:!»ÌZ€”- S‚ô}ºw‚‚8 »/Wg º:  vX ºZ6!»ÌZ€N"d¼gƒ t:  vX ºZ2!«»2#ªNv»ƒ 6 ¬„hhM Æ}<MòôøK‘KKK”(´îºבž©î<ב<ªî¬Ú‘&ä~#žtø~ 9‹<w.‚œîºÙÆžå·ú~< ‚뺭‹é‚ó9ׇÈ«ú~ÈÕ….«ú~.Ú~9©<Y.²í‚î9üÖƒ–ì é9ÈŠíää9œïºß9úƒÞë¬Ú9åÈÓXh&ôé€LL»ZƒWKLKZNr»»Z!»ÉÐì#Õ9…ÖצëÐ9ú‡È²ú~žfv‚ <è}‚ŒíºË9µïÈÆ9¢Ö)<`ò!<ï<H 9òžòÖ<å;=×YYÜäÓ}.!<< ȃf8<J<+<u'å;ƒgYYàäÆ|$:ÏëF JwífQž/<}@)U<—‚/ãžtã{<Šä;m<Ñt/ãÕt9ºCÓyX ò;ŸfÙKK‘yJ­˜‚ XZ[eK;=É ò¶¬ &‰òf݆IKuYƒÅ.ÿðt©8vvTu­‘‘”ƒI=ÊõºO‚O0'9ž/ýït–9>.ò¯xòÆùtº†t‘¥ù‚’!Y“WYY;=gKKYKKª¬­’#ɃŽÓ<­žZŽ+ž¿x.žù¬ø‚€òºØH>Â$·ò0ãâ²~ò‘9ŒyÈɺùf¬¼K=w²ŽžìxX˜)ÄJ¼<ÄJ¼<ÄX¼.tÄò Jåg;Yj ž=AE] f=AE] f0#ZHv¨ò8;-y<y<x.Žt<z„òY¡AK!® ²UäÐ*J±UtöË*‚‹VKŸKƒô)‚]žaAfŸ;=gYƒt¬„JÐ×JYY¯¨žÐ×&Ÿ¨ž¾×<¨X½×ºŸÕ¨žÙ.§.ÙØ1Ê1vÚU.KŸYƒ¥*‚§ÜU‚KŸKƒ¨*‚sžtKk¬!X <wX . äwX < ävftvX ‚v¬ 2ZðÛºâ<Ã~JÛ¥<Û‚â‚È~¬åY"ä Jv ó» Ø f 0";³yÈ5Ø; KK:Z  ¼#'K‘KKY°[ú}LMŸÏ㬟s=²œ<®ñ‚tñX›È ";­|xÈnØ; ¬¼#'!Y‘YKK$[6}LMóúâ Ÿs=‡< Ö *;Š,; ¼#'K‘KYKö[HO!¥âòŸsKÜ< Xå3f|%yý~.h.rz¬‚[‚ª‚8:y<q<èåóåóååååY-[#»»»'xJóóórò00000(åÜPtÉË).h.Žt<z‚°ò8:ô<ö}<J®¦VJð)¬ƒž8;-y<q<rzÈŠa‚8;-y<q<Žt<zË<Y åY  zŸY ÖzŸYíUJÉ)òq.w.Žt<z‡‚Ù#>Ò~‚8;-j<r¸WÖ¡*¬R)û~äh.º±Ù~J§.Á~t¿³~<ÍÙ~ºh.Ä®~¬Ö‰òó.õ~.rz£‚=?ÈÛUä¤*¬Ï~#8;-·<³~ºr–ÖY¹VJ¿~f8;-Û<~<ÒÖãÌ~¬8;-º<°~XrþÖt.s&‘ž†)t;ufs<tÖ .*[4Õ=0>ƒò«Ü"ߣž¡Ü<ߣ<¡ÜfᣞŸÜ<á£<ŸÜfã£ÖÜ<ã£< $`xºLLLL¢áÚ‚¦â.Ú<Ÿ}1¬¬"®ó!)8=(SÖI-+++[qMŸK‘KW>Kö[ È~FLPó|òäžLƒçáòŸs=šžòç႘ž‚èá.˜ž.@y¬;DwJ .w"5€>7;1«=H>r(Z¬&.qDbÖ5.ß})°XZ¬&.o#dÖ/By<5.@& .7u. .t.ât;”fîº .'I0Õ=u,y‚Cct.r>qJ."c.‰X/$4©}/ÓF Jv‚ .9ãâw)är,q<.q(.p4sf .Ôu. .ª==uBytCŠãò…‚ûâ.….1€~9hÝå;Y­Y‘f‚~8;-ö<ô}tÖh.‹¬î3ñå$s< .þ+w. .ñã*°œ‚Ðã.°œ.1äc9ãþÇ=H>u+eä.èeH.æžò;6/fÙKKKKKEYYYYY¹ØXZ˧ ‘XXòuºC#È(£¸8vvxDòK$‘‘‘‘‘”ƒI=£ºOºOºOºOºOáà'ׯŸJ.¿ØÈ9¬=%*(¢¦&<#Ö»ÔØ¬òw((ñènž…¸9ÌàȱLhu <’éwt"¥ –¦òÇ0Џ9öǺ€¸9€ÈÖû·9ÚàÈ«gžö·9æàÈ u‚Øèwž9¬"£àòS²›‚ ‚ÒäŸJá.¶¦X¥Ù<¦3€iž©çט<‡È»½»½»½»½»½»½»½»…æòéÉ‚|òtot‡~½¸ƒq‡„¶ˆƒƒ»»ƒ­ƒ»‘»ƒópøfZ—hf‚šJþå‚éñ»×‚|òtot‡~½¸ƒq‡„¶ˆƒƒ»»ƒ­ƒ»Ÿ»ƒópøfZ—hf‡šJùå‚éñ»×‚|òtot‡~½¸ƒq‡„¶ˆƒƒ»»ƒ­ƒ»Ÿ»ƒópøfZ—þ™ÖvX <> ÈrtvJ ¬‚rJZ<r<Jp<fhH fgJZ<œtXñæJ™tf fwfX^tXãæf™<ñæfY;=g€ÿ~J±JÐetö¬ ’ŸØ®®*çv„„ˆ ƒ ÖŸ‡åär»»ƒƒŒ›ä…ætå;=g€ÿ~XûJ†etöö‚’¨¬Ùº§JÙJ hh%[v„„ˆ  # ÖŸèH»åtå;=gÅšJ ß~¬¢ºÞ~J¢J „®*çv„„ˆ ƒ tŸè=v Ÿw ƒ ¬Ÿè=#rJ‚ <ZzeSLu®ƒZô¡OS>…`qM)O>­Ì>Ô¾îØ®Xåó"žÖ>óY;uØíãX•ŽœX„  =­C žZzzfLu®ƒh[OS>“qM)O>è>â¾®tÔ}ž‘Wg!"¬ä>!K;uØæâX••X„ /ó< žZzzfLƒ®‘h[OS>…qM)O>ŸÚ>â¾§Û~&‘Wg!"žÖ>óK;uæ"ßáf•œžX„ u­< žô¢®"£æ’ØØM ÎxL²lòáx<€¾ ÏÜws»ƒƒ¸r»»ƒƒðr»½rƒƒz<#qçcÖr»“šºî傃ƒ‹šä¥‚,-;-o<-;;d<€yË åóåóååååÈÝä£tÝ=KKKƒƒ‚/KÆ­KÆ­KÆ­KÆ­KÆ­KÆ­KÆ­KËÈŸKKKKKKååË¢JY; X"""""óóóóóóóó'•Ý0óÙ¢tóóóóóóóóóóóóSòPPPP@0åóŒwòàåòi¹oºr»‰šºøå‚ƒƒ<oºr»Žšºó傃ƒžØšt¤æt¨™‚Øæ<¨™<Ø~f-]<Ž=‚A.Ñì~‚”.ë~‚;-m<;d<v·çÚ˜$Œ<º.ź.Æ—<è~ò-o<-;š<É}<ŽŽ€¿ ­eç\OÉ€€#qçÿ˜&-]<Ž=‚A.Öç~‚™.æ~‚;-m<;d<v±çÖ#qçܘ%Òç~‚™.å~‚-;-o<-;c<Ž€y³èÖò™‚ì}Œv¤¤~ò,-;-È<ú~XÓ<»|<ŽŽ€øÖ;äÒ}.Ž€ç‡Ó}‚,-;-²<ž}<vÊÖ]ò»äå~ò,-;-o<-b<#Ö\.ހ܄á~‚,-;-P<vÖŽ€ÞÈK‘KKK´ZZ‚ÞX­’"!×û¡„~žŒ<º.ź.€Å~‚»<Ä~‚-½<…<>Œ}<ŽŽ€ûÖÄ~.,-;-¯<¡~<€yÖ©æt”ç~ »×‚|òtot‡~½¸ƒq‡„¶ˆƒƒ»»ƒ­ƒ»u»ƒópøfZ—Öx<þ¡È‚Þ<þ¡X†~ŒvǸ.м~‚Ä.»~‚;-Æ<+¡å‚oºÿšt€åXÿšº»³~‚Îæ.ƒƒýšt±~‚-Óæ<üš‚°~J-Ò<]‚ô{<úÖˆ}<ހޱ|ò,-;-Â<’<ü{<‚Öñ~<ˆ}<Ž€Œú{ž„µ|‚Ë.³|‚-;-Ð<ò~XŽ<ó~<}<ÄÖ¼|<ŒÈô|ò,-;-<Ö‚å{䎀ž¡|ò,-;-Â<˜<ö{<¦Ö§<ï|%‘.í|‚-;-–<¬XÓ<=­<}<€y“.ù|䎀¥Ê˜|ò,-;-Â<Ó<»|<€µÖh—å;=È{"¶’ôz"ŽŽ€4‹øzÖ,Ž€‰üò‚x¬Œðz.­'YYºt v Ÿ)óè=õwÈòw<’‚‚ܬ¤~%/:Áô„ ‚o‚Z€’Z€’ ÖZ€’„Xqò t + + + ä + ++ZLZ.L.. .@;;;;;;-Ê~¦´`p?.n.$<§~>mXè&¯èºÓ—È­è<Ó—­­ñßtÜš‚³‚$ve8-;Ãx<ÃÖ㪾xŒÆ-;l‚K‘KKYö#n"+ AÝxò²@ÎxX²oÖ5âx<Ÿt0âx<¥ÖWäzò’k¬<ñyf)s¬ <u< <õyŽ€¬Ùy*Ž€¤Kò–z,Ž€œ6ëy<Ž€šÎäÛ~‚0—Ÿ;=×YYg‚äµyÈŽ€Ñd',‚¤yÖŽ€³5Juvägßà"dL ŸààòȘJ€‰È€yG‚ÖA=þx<æ#–z<Ž€ï‡*“y'V¶¢âzºŒšÔ× Ê}0¥Ÿ;=óYYeò,¬°ztÀÖ¾z<¶Çñ‘uvÖ/íâX"rL’îâòzfºž1_®Áá"L°žäÐá<¾žžÂáò·Ÿž‘y<€ó( tñs  <z<îäzÖ˜z<ùä2ƒz:Œ©w¬ <o<Õ~‚Ï|ò,-;-¶<üJ .¼Èâ"L©×â<´fÌâ<·žÉâòƘ<á›{.å%ñsº%Lz¬B™{fôÖÿT_ʺà"LÅŸ.»àòŸž¾à<¹Ÿ" tñ¸>s<‘y<ØÖƒvžgæá"âL™žçáò½Ÿ)zò‘y<ØäÚàÈŸž2ááÈÁ—0JpXÈpXò=;=5fÚIKYHZY‘‘‘ðZñ.ŸŒðXZò.Ÿ‹ðXZó ‘¶ãXËœtYY³ãXZÖœ¤ãt”˜xÈ`tÈ”`ÓœÈB´(ëß(Π8vv‹ð9¬= *+ÈŽX<AÖK$‘‘‘‘‘‘”ƒI=•ºOºOºOºOºOºOÏãt1®‚¶—X‘øt×Õ‡<™ðº9¬=%*0™ä=ò*0ÉŽX.¿ãäm4Léœ'ºðòw((ñ¹‚w$$ènº® 9¯ðX9¬"u£* ‚×r(†s<œLºm;LÝ<±Lhu <’éwt"¥.¿Žšø.±Lhu <’éwt"¥.ˆn‚³ 9žøÖ±Lhu <’éwt"¥ ˆnÖ© 9×ߺ¤ 9±øÖ«gžŸ 9¶øÖ«gš 9»øº— u‚×m u‚ØâØy"×m u‚ØÞxž*'S²ß~9¬Ê¿' Ò$ŸJá<[X*'S¤ß~9¬Ê¿' Ò$Ÿ<á<å~J9¬"£àòS¤¨‚ÒäŸ<á.¡JÈ‚ ãXÒ /³ŽRÌž¼ÎıJÆ;»»¸ºí‚“º¼Î.²²tÎͺnÐK X ²ÖÃÍRÐK X¢²¬’h­Ÿ<ºÍ¬`ÐK X«²ä¸Í`ÐK X­²º’h­Ÿ"®(¼h­Ÿ#¬XtÔËtå;=g¬´J ­¼ŸàÊÈåK£µº1£‚þvÖŒ¬ö~‚ˆº÷}¬¸x"<ç<‘û~‚…Öÿ>¿7] ºËtå;=gð´J Ÿ» ¬" ò0½­Y‘YKK°ó£Ÿ)>ª–~ÈsñÇÍòóK ´ºgmôzÀg òô‘JžY­K‘î5]žzfBfŸ;=/Y­t­0`‹LMZŸJ?Ò$Žû~øû~‡oºˆ<Ëo<¹¹¹¹¹¹¸Ž¹¹¹¹¹¹yã.ßÍt´žÌ<´<®½8¹]º".ºb<¹kº.޹¹¹¹¹¹yzº¹¸¶¹„ºD.d%<Žt <s <ŽdØ<¥[º$.¹ºd<iº.¹¸Ž¹¹¹¹¹¹yzº¹¸¶¹†ºB.dðfî~ò¢äØž§}D¹¹¹¹¹¸Ž¹¹¹¹¹¹yò¨}¬%tŽt <s <Žul<¹¾7¹^!.¹ºa<¸m‚.޹¹¹¹¹¹yzº¹¸µ¨º .d‚‚Àò ¬JXê5¬¦}s¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y? Žt <s <Žul<¹¾7¹^!.¹ºa<¸m‚.޹¹¹¹¹¹yzº¹¸xƺ‚.d•Í-£´‚ÝË<£´<í~fŽt <s <Žul<¹¾7¹^!.¹ºa<¸m‚.޹¹¹¹¹¹yzº¹¸xäºä~.dŽ“Êò„´tŽt <s <Žuª<Â~½8¹ºd<iº.¹¸Ž¹¹¹¹¹¹yzº¹¸xéºß~.dÀXå~3s <u <t <Žwo<:¹¹¹gº._º .¹¸Ž¹¹¹¹¹¹yzº¹¸xóJ²ÊºÓµt«Êt¼ƒƒq½ѵ‚\ÅËtç´‚ƒ~U¹þº~<¹¹¹¸Ž¹¹¹¹¹¹y–„~$µÎfÊÊväLsY Ÿ×£½TJ~?¹€ºÿ}<¹¹¹¸Ž¹¹¹¹¹¹y˜‚~$%f€~<¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y¦žó}?¹Žºñ}<¹¹¹¸Ž¹¹¹¹¹¹y¦ô}$˜žç}B¹¹¹¹¹¸Ž¹¹¹¹¹¹y²è}¬šÈf<ÿ}<¹œºã}<¹¹¹¸Ž¹¹¹¹¹¹y´æ}¬ÂV. <Žt <s <Žu <mÓͤ²<¹½8¹gº._º .¹¸Ž¹¹¹¹¹¹yzº¹¸¶¹Ó$y0CØ}¨º×}<¹¹¹¹¸Ž¹¹¹¹¹¹yÁÙ}¬ì +L %0 "¾!K‘KYK¢[0LQw¬LY’Y…+LYZŸŸè>â”;åYæX$ä>!K;uØÅÉX•¶¶X„ žu­u­u žv ŸZtqXLu®ƒ®ƒ®ƒ®ƒtqXLu®ƒ®ƒ®ƒ®ƒ®u®ƒ®ƒ®ƒ®…  „~Xüä„~‚âXž~#tXîX›{ ¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚÷œ{¬Üͬñ²XâÈu¹* \¤×YY^YY Jó žÓÊ*å·µ<8‚uWK ºÙô11Ê0/§Á/sòòKk »=äæB š=<æBX®#怔,»!ô‚$È>óK;uæ""—:f•äEX„ K/ó= òª<Ö­ÞCJ¡{å;=óYYÁtv¼Ÿ¾ fÅ{R»XÜx<¹¹¦ºÙx<íº‚ø|X¹¸ŒtXþ|X¹¹¹¹¹wº˜ˆ÷|‚¶Ýx¬ÀX¿mI¹Âº½m‚¹¹¹¸Ž¹¹¹¹¹¹yÚÀm¬­º»p<½fkÖØ~<‚£XÝ~-tX¯XÚ{¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¸Û{¬»ÄmR¹½ºÂm‚¹¹¹¸Ž¹¹¹¹¹¹yÕÅm¬­º wC tÉmº·ºÈm<¹¹¹¹¸Ž¹¹¹¹¹¹ÉÊm¬­º·rž&RxfZ^*\ ŸŸè>â¾å"ž$ÖÊŸK;uæ""ýÇf•þ·X„ ž=Ÿ/Ÿ= ¬ÆÑt¼®žÄÑ<¼®<ÄÑf¾®ÂÑ<¾®<ÂÑfÀ®žÀÑ<À®'‘~<tXüX{¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚…Ž{¬×‘}Öï"‘}‚‚ÕX«}+tXáXŸ}$Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y¤ÖØ—É;=‘YYÑt ¬¼'Ïòås=ú°<èJ º ¼s`Ä XH>¼sž‚ª XÖs<tX¶ Èû<E´¸‚K;YgKKK°ç~äߺ¡~‚‚ÅX»~(tXÑX¯~$Ñ‚¹{¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚β~Ö‚´XÌ~-tXÀXÉ{¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÉÊ{¬ÏS@°}к¯}<¹Òº­}<¹¹¸Ž¹¹¹¹¹¹yê-±}Û}ÖóÇŽ}<‚ÙX§}/tXåX“›}Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚‚fþ|X‚èX˜})tXôXn Œ}Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚€f€}‚æXr*¨}<tXâX§z¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚û˜z¬Ù}Öñ}X‚×X©})tXãX‘}Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹yÊÖuK¶}6ŒXô|&‚ý|X¹¹¹†tX…}X¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚‡Œz.ò6ö|ÖŠÈö|ò‚ý|X¹¹¹¹¹¸Ž¹¹¹¹¹wºœì|Xˆ÷|X…Žz.öºrÈ-îX’}'tXúX†}$Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚*ìX”}&tXøX‘z ¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚’z¬èÈ„Jü|‚êX“zòƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÿ”z¬„ fˆXbq"<­zžÓº¬zž¹¹¹×¨z‚¹¹¸Ž¹¹¹¹¹¹yÊ%m¼ò8"œLGÖó8.€F<’tÁl6¹¹¹¹¹¹¸Ž¹¹¹¹¹¹Àò ¬É-sä8×lR¹¹¹¹¹¸Ž¹¹¹¹¹¹»Øl$­ºÚN¤ÉKKPYK Jé(æ;¬£D Ý;<£D<®‘f""ãÂXž½òâÂ<ž½<¯ È% ž-Ò7 ­»±Hž0 Èj*; Næ X¼ J3vX .%&ó J%(!øÆX!s=’¹<-‚1„€•»æ‚$ä>!K;uæ""÷6f•„IX„ òu=ó=·Àt˿ȵÀ<Ë¿<µÀfÍ¿‚³À<Í¿<³ÀfÏ¿‚±ÀÑ¿ä¯À<Ñ¿<ØËLLK¼K„K’K¼K”HQ„"&×Z!ó×~.¤Èˆ{/øtuò Úh¹¹¹¹¹¸Ž¹¹‘º¢XÛh%­º÷ž‰{/÷tß}ò¡Xv. Ühž¹¹¹¹¹¹¸Ž¹¹»ºõžá}DŸX‹{òõtx¬˜Þhž¹¹¹¹¹¹¸Ž¹¹»ºóžH{*ñtî”áh¹¹¹¹¹¸Ž¹¹‘º›Xâh%­ºÔä¬{*Ôt‚~òþž­ÀºÓ¿Xþh<¹¹¹¹¹¸Ž¹¹ºÿh%­ºÒä®{*Öžüž¯ÀºÑ¿X€i<¹¹¹¹¹¸Ž¹¹ºi%­ºÐȰ{,Ðt†~‚úX‚i-¹¹¹¹¹¸Ž¹¹‹ºƒi%­ºÎž²{/Ît„i&¹¹¹¹¹¸Ž¹¹‘ºøX…i%­ºÌä´{*Ìt†i&¹¹¹¹¹¸Ž¹¹‘ºöX‡i%­ºÊä¶{*Êtk<ˆiȹ¹¹¹¹¸Ž¹¹‘ºôX‰i%­º´žÌ{=´t¢~<ÞXŸiL¹¹¹¹¹¹¸Ž¹¹»º²žÎ{=²t¤~<ÜXR¢i¹¹¹¹¹¹¸Ž¹¹»º°ž¦~5ÚXÐ{ò°t£iU¹¹¹¹¹¹¸Ž¹¹»ºŸf^Û{*¥t±~<ÏXx+˜®iJ¹¹¹¹¹¹¸Ž¹¹»º£>‰=Ò5X"œL€F?€:t­J‚Ó5.ªJºÖ5J ã5Ó³ ¹¹¹¹¹¹¸Ž¹¹»º¡* ä×Ô{¬¬t=«¸’q §i ¹¹¹¹¹¹¸Ž¹¹»ºŸ)àå{*›t·i&¹¹¹¹¹¸Ž¹¹‘ºÅX¸i%­ºúž\¤×YY^YK XTžŸ;=gYY˜t+ƒKt%gþ5"ðLâHXž7XÖHä«Xÿ5‚€F‚âtž7XJ<ÿ5¬Ó³9¹¹¹¹¹¹¸Ž¹¹»ºãžætâ~XžXÖ~‚ªX=-€|¬€tÓi9¹¹¹¹¹¹¸Ž¹¹»ºú9žèH+˜7XÜHä«Xù5‚†F‚ât˜7X‡J<ù5¬Ù³9¹¹¹¹¹¹¸Ž¹¹»ºðž|?ðtâi*¹¹¹¹¹¸Ž¹¹‘ºšX‘-ãi­ºÖžª|2Öt€<€XA2?ýi ¹¹¹¹¹¹¸Ž¹¹»ºÔȬ|0ÔtCt=þi¹¹¹¹¹¸Ž¹¹‘ºþXÿi%­ºÑžƒ¿ÆJ!s=›¹òæÆÈ–¹XØ|6¨t®<ÒXq¬<o$«j ¹¹¹¹¹¹¸Ž¹¹»º»pžÊžzB¶J‚0XÍ|ȃºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÅÎ|¬Ï™òçž™)‚ÍX°|ȃºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ã-±|ʶmr¹¹¹¹¹¹¸Ž¹¹¹¹¹¹yÇÕq6ù0 ÈX"ÔLÏ·ä±È<Ü·.?¡È.Ó³\¹¹¯Ìºг‚¹¹¹¸Ž¹¹¹¹¹¹y¥XY=«Ž>q"<õ{.¹¹¹Žºñ{‚¹¹¸Ž¹¹¹¹¹¹y£Öw>âæò€KD5tžmȹ¹¹¹¹¹¸Ž¹¹¹¹¹¹À3žMC3tŸm<¹¹¹¹¹¸Ž¹¹¹¹¹¹ó m¬­º0žYÐ|J«¾J!àÁ‚ÿ}f°uÈ f¾st‚¨ XØs-tX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚½Öp$ $ËN¤»KKJsX"ªLzÁ¶J¿ÉXÐA<ñt‚‚tž Ȱ>òÆ#û²1…ÍXœ¾Jßt‚‚ëÌX•³<tXr ü ¬„u‚‚â XžuÖtXr ñ ¬u‚‚×JX€À<©u¬tXr ä fœut‚Ê X¶u-tX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ß ´r$¯k8<þ}‚‚tÐkº°ºÏk<¹²ºÍk<¹¹¸Ž¹¹¹¹¹¹ÂÑk¬­º€žm8<€~‚€tÒkº®ºÑk<¹¹¹¹¸Ž¹¹¹¹¹¹ÀÓk¬­ºìž”~Dìtçk'¹¹¹¹¹¹¸Ž¹¹¹¹¹¹Àêž–~Cêtèkº¹¹¹¹¹¸Ž¹¹¹¹¹¹ªék¬­ºéžuKtºgž9"ªLáFºŸ9.€Fä€:tÓ³'¹¹¹¹¹¹¸Ž¹¹¹¹¹¹ÀÞômŸ;=KY×'ƒ- )àtólȹ¹¹¹¹¹¸Ž¹¹¹¹¹¹Àú9žçF-™9.†Fäú9tÙ³'¹¹¹¹¹¹¸Ž¹¹¹¹¹¹ÀО°XÐt‚m<¹¹¹¹¹¸Ž¹¹¹¹¹¹‘-ƒm­º-žSC-t¥m<¹Üº£m<¹¹¹¸Ž¹¹¹¹¹¹í¦m¬­º ž³mv¹¹¹¹¹¹¸Ž¹¹¹¹¹¹yÇöt3ˆztLN:L­»v !¾  yˆz¬LN,Lvóó[L[·M0ógåv ó¾  y–zXLN:L0!v !¾  £¤z¬LN,LZóó[]M7Oó!v¼ó¾ f£ÎztLN:L!#v !¾  yÀz¬LN,Lvóó[L[·M0óg äv ó¼ åÚ .yˆzÈLL’Zó!æóL'ó¾ f$–zt„LL>å#$ó[L[·M0óv¼!¾ fy–zäLLLZó#"óL%ó¾ ."–z‚LLLó!"ó[]M7Oó¼ åÚ  yÀz¬LL’vóóæóL'ó¾ f"ÀzäLLLZó#$ó[L[·M0õ   tT˜zfLFRLó$Z€”'»æt$Ö>óK;uØÅÁX•¶¾X„ Kó=ó/  ŽËtô´JŒË<ô´<ŒËfö´.ŠË<ö´<ŠËfø´.ˆË<ø´#‚v<tXê XŒ¥söº‰}‚¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚ö òÕŒv<‚õ Xi<ˆs<¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Š d.¥sèö òÕ“ŒŒv<‚ß X: sö º‰s<¹ø ºv<tX†}X¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ˆ f.¥sèü òzÖŒv<‚ß X;Œs<¹õ ºv<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚† h.¥sèü òzÖŒv<‚ß X;–šs<¹ó º‘v<tXû XŒs<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚„ j.¥sèXô  ͇v<‚à X~”7“¢vtXé X s¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚õ y.¥s¼ 5¬v‚Ô X¬v‚º XÃs¹¹…ºú|X¹¹¸Ž¹¹¹¹¹wº˜ˆÆ X±s‚Ï Äs¬öº½ ÈY;ƒgYKK""o‚ºv?Í XϬvò‚º žÃs¹¹¹¹¹¸Ž¹¹¹¹¹wºœtXø|XÏ ºv.Š}‚¬ 5¼v‚Ä X¼v"‚ý|X¹¹¹¹¹¸Ž¹¹¹¹¹wºœì|Xˆ÷|X¿ Ôs.öºrÈ $¾v<‚¨ XØv"tX´ XÕs¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚½ Ös.èXÀ ÖÀv<‚¦ X×s4¹¹¹¹¹¸Ž¹¹¹¹¹wºœì|Xˆ÷|X» Øs.öºr ¾ ÖÂv<‚¤ XÙs8¹¹¹¹¹¸Ž¹¹¹¹¹wºœì|Xˆ÷|X¹ Ús.öºrò¼ òÄv<‚¢ XÛs<¹¹¹¹¹¸Ž¹¹¹¹¹wºœì|Xˆ÷|X· Üs.öºr º  nÈØv<‚  Xàv+tX¬ XÔv$Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚Ö¨ f‚Èvº‚ž Xâv*tXª Xßs¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚³ r.îs“ ÕvÖ« fïØv<‚‘ Xïv,tX XävŠ}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y« Ö×vÖ© fÇØv<‚ Xñv+tX› Xåv$Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y© ÖÙvÖ§ $Ùv<‚ Xóv+tX™ Xçv$Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹y‚Öœ $äv<‚‚ XxȆwtXŽ Xòv$Š}‚¹¹¹¹¹¹¸Ž¹¹¹¹¹¹yœ Dm= ÀX"Lß¿ä¡À.Ï¿<±ÀÜ¿"¤ÀÓ³¬¹¹¹°Ìºϳ‚¹¹¸Ž¹¹¹¹¹¹yš : ¬Y=p¬(’õs ‹ ºôsž¹¹¹ ðs‚¹¹¸Ž¹¹¹¹¹¹y˜ -êvX’  îvò‚øXˆw)tX„ X…t¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ †t¬Ù NlŸKKPKK Xq(uKt"gÌÀ"ªL»¶<ÅÉX³¿tÍÀ.»¶t‚«ÉXÕ¶'tXŠ}X¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹yÜ ÖæmŸ;=KY‘™wºøX=«‰wò‚ÝX¡tò‚ºtX‰}X¹¹¹ú…}‚¹¹¸Ž¹¹¹¹¹¹yÁÌÖÁ¶$¿ÉX¹¿tÇÀ.Á¶t‚¥ÉXÛ¶'tXŠ}X¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹yé Ö™wòçò™w#‚ÍX°tt¹Ñ º³w<tXÙX®t<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ã -±t¶ ²w‚Ìò´w$‚²Xsº•Q<“4Îw<tX²X=×t¹¹øº‡}‚¹¹¹¸Ž¹¹¹¹¹¹y‚ÖÄžˆuJ‘Àw<‚°XK<“2Ít<¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Å w.×t¯ ×¹wºÂ.¾w‚¦X;V-V<ÿt« ºØw<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚½ -×tèš.šÖÌwº‚šXaºd<ÿtƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¯ ät.“ K‘KKK[Éw<¥ÛwX‚‹Xõ}<‹Žr<“ õw<tXŠ}X¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹y‚­ í}‚šÌw<‚šXaºd<ÿtƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¯ ät.èXš.ƒÖãw<‚ƒXxº˜7ÿtƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚˜ ût.èštæwò‚€X€~Ö€µ…xtXŠX€u¹¹øº‡}‚¹¹¹¸Ž¹¹¹¹¹¹y‚.–ò„~¬æy‚üX;‚uÿ º„x<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚‘ ‚u.èšžæyÖ‚ñXlºŒuºƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚† u.ê u‘KKK2,òwäš.ãÖƒx<‚ãXzº–šuºƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ø ›u.脞üw‚‚ñX~‚ñlº£xtX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚† u.èút†xò‚àX ~Öà·£xtXìXžu¹¹øº‡}‚¹¹¹¸Ž¹¹¹¹¹¹y‚.š.ÞÖˆx<‚ÞX¹‘ŸuºƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ó x.¨uè<šÛ‹x<‚ÛX¸’¢uºƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ð )¨uèXštæyÖ‚×X¦ut¹Û º©x<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ì -¨uèštÌÖšx<‚ÌXlº±uºƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚á ²u.Å K‘KKK”"—x‚Ø.¨xž‚¾XÂ~<¾h<–ÂxtXÊXÀu¹¹øº‡}‚¹¹¹¸Ž¹¹¹¹¹¹y‚ÖÓòÇ~t¹­x<‚¹X¹q<m Úx<tXŠ}X¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹y‚Öš¶s½x<‚¦X<ÇuJ¹º ºÊx<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Ë ,Êuè<šò»ÖkÀx<‚»X9“ÂuJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Ð Ãu.èšXÅÖ¡x<‚ÌXlº±uºƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚á ²u.èXšò®Ö‹½x<‚¦XDÏuJ¹² ºÒx<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚à Ðu.èš«Ž½x<‚¦XAÒuJ¹¯ ºÕx<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚À Óu.èXš.¦ÖÀx<‚§XÖuòƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¼ ×u.èšXœÖÊx<‚œXlºäx tX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚± âu.• Y‘YKK&*Çx<šòŽÖØxº‚ŽXz<–ïuJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚£ ðu.è<šžæy‚•X‰lºäxºtX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚± âu.èš.‹ÖÛxº‚‹X9“òuJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚  óu.è<šò‰ÖÝxº‚XC‘ôuJŒ º÷x<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ž õu.è àxX‚†Xú~<†Æüx<tXXýu<¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹y‚.š.‚Öäx<‚X=ûuÈ… ºþx<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚— üu.èš.÷Öïxº‚÷Xl<†vJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Œ ‡v.ð u‘KKK(çìx.šòéÖz–ýx<‚éXh<”vº¹í º—y<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚þ •v.èšòäÖ‘‚y<‚äXm<™vº¹è ºœy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ù p.ªvèšá…yº‚áXp<Žžv<¹å ºŸy<tXíXšv<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ö s.ªvè€òštæ€y<‚æX·“k<šyºtXŠ}X¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹y‚XŠÈ‚æyÖ‚÷Xlº†vºú º‰y<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Œ ‡v.èXšòÙÖyº‚ÙXx<˜¤vº¹Ý º§y<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚î )ªvèšÖyº‚ÖX7•§vº¹Ú ºªy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ë ,ªvèXšòÒÖ”yº‚ÒX;‘«vº¹Ö º®y<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ç ¬v.èáJŸyž‚ÇX¹<Çlº¹yºtXŠ}X¹¹¹ùº†}‚¹¹¸Ž¹¹¹¹¹¹yÚ Öu‘KKK2,œyºšò9Ö­yº‚¹Xz<–Ävº¹½ ºÇy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Î Åv¬èÚJ‰ŸyÈ‚ÇX¹ÖÇlº¹y<tXÓX·v¹¹øº‡}‚¹¹¹¸Ž¹¹¹¹¹¹y‚ÖšJ6Ö°yº‚¶X9“Çvº¹º ºÊy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Ë Èv¬èXšò4Ö²yº‚´X;y˜Évº· ºÌy<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚É Êv¬èš1µyº‚±X7“’Ìvº´ ºÏy<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Æ Ív¬èXšJ-Ö¹y<‚­X¹‘Ðvº° ºÓy<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ Ñv¬èšJ"ÖÄyº‚¢Xl<Ûvº¹¦ ºÞy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚· Üv¬› Y‘YKK°çÁy<šòÖz–Òy<‚”Xévt¹˜ ºìy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚© êv¬èšòÖ‘×y<‚X`JŽw<¹“ ºñy<tX›Xìv<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¤ ïv¬è¦žtò c÷y<‚ŒXf<ñvJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¡ òv¬èšòÖ“Õy<‚‘Xìvt¹• ºïy<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¦ ív¬è<šXæyÖ‚›XClÞyttX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚· Üv¬èX¤Xvò e÷y<‚ŠXh<óvJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Ÿ ôv¬è™žçyò‚tž‹Èçyò–žv‚÷y<‚üXwt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚‘ ‚w¬èXŽòÔ’òy<‚ôXEŽw<¹øºŒz<tX€X‡w<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚‰ Šw¬èŠòöyJ‚ðXI=wóºz<tXüXŒw<¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚… Žw¬èëºz<‚åX›z*tX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ú™w¬ÞK‘KKK$*þy<ë–zº‚×X¦wòÚº©z<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ì§w¬è<ë.Öz<‚åXyº_›z tXñX˜w¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ú™w¬èXëòÙ’zº‚ÔX©wò׺¬z<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚éªw¬èëò׋•”z<‚ÒX«wòÕº®z<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ç¬w¬èèž;‘˜zº‚ÎX¯wJ¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ã°w¬Å#£z*ÝXºwf¹Çº¸w<¹ì‚ù|X¹¹¸‹‚tX€}X޹¹¹¹¹wº˜ˆ÷|‚Ø»w¬¼u‘KKY(ç zžÏXlÈ<i Èz<‚µXÈwt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÊÉw¬Å&y<_£z)ÌžoÈ<l Èz<‚²XËwt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÇÌw¬èXÊXqÈD—nÈz<‚°XÍwòƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÅÎw¬èÈòo•¸z<‚®X¹‘sJßz<tXªX<Ðw ¹÷ºˆ}‚¹¹¹¹¸Ž¹¹¹¹¹¹y‚ÖÅžvÈD’sÈz<‚«XÒwòƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÀÓw¬èX½òÃz‚¡X>ßw<¹§ºÝz<tX¯XØw<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¸Ûw¬è¹fIÈz<‚ŸXÞwt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚´ßw¬–#Òz ®Xéwž¹˜ºÒz<‚û|X¹¹ˆºtXƒ}X¸Ž¹¹¹¹¹wº˜ˆ÷|‚©êw¬K;YgKKKö[Ïz‚ žàz%‚†X÷wJ¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚›øw¬èXXãz%‚ƒXúwJ¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚˜ûw¬–ÈyÙzž›ž7•åzº‚XüwJ¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚–ýw¬è—òÕ‘ézº‚ýX€xt¹ºƒ{<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚’x¬èøôzº‚òX‹xòõºŽ{<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚‡Œx¬ëK;YgKKK[ñz¬øòÜ‚{º‚äXl<i<™x纜{<tXðX˜x<¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ùšx¬èXùXñ‘n™{<‚ßXq<žxJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ôŸx¬è÷ž‰{ò‚tžr ûžï“l™{<‚áXo<œxJƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚öx¬è…fs<ôzº‚òX‹xt¹öºŽ{<tX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚‡Œx¬èôžv‚™{<‚ÚX£xt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ï¤x¬èXìòÔ’”{<‚ÒXE°x<¹Öº®{<tXÞX©x<¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ç¬x¬èèò˜{J‚ÎXI=¯xѺ²{<tXÚX®x<¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ã°x¬èɺ£{<‚ÃX½{*tX‰}X¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Ø»x¬¼K‘KKK$* {<É–±{º‚µXÈxò¸ºË{<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÊÉx¬è<É.Ö£{<‚ÃXyº_½{ tXÏXºx¹¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚Ø»x¬èXÉòÙ´{º‚²XËxòµºÎ{<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÇÌx¬èÉò׋•¶{<‚°XÍxò³ºÐ{<tXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÅÎx¬±ã¸{òÆž;‘º{º‚¬XÑxJ¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚ÁÒx¬šu‘KKY(çÂ{ž­XÓ{%‚“Xêxt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¨ëx¬èªžÖ{%‚Xíxt¹„ºtX‡}X¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚¥îx¬èX¨XØ{%‚ŽXïxòƒºtXˆ}X¹¹¹¹¸Ž¹¹¹¹¹wº˜ˆ÷|‚£ðx¬”n'à /ª}/Ötüj3¹¹¹¹¹¸Ž¹¹‘ºýj%­ºÓžB=«­}<Ó‚€k9¹¹¹¹¹¹¸Ž¹¹»ºž# # žÒž()»6,ÕI‚«6<ÕI<¹6¬ÉI‚·6<ÉI<®¦oO+M„gÌʪ”#7åY"t&>óY;u>¢3f•ÙLX„  Z J0 öZÔy‘hòç²fó¤Í‚ fHáòÅ4òÄKȼ4<ÄK<Ê4f¸K‚È4<¸K!°>ªNî^å ò¬$óY;u „³1È•ÈNX„  L JÀ¬ŸsKñ¿<óÅ€v2€ Êc5Èï‚€v%’Êžï¿ò‘À.ï¿<ÿu@ ~Öð‚Éc@·Œ žô’K¾HLéò›1é7‡ ä"®ó’hóu%®’hóu%®’hu0òƒ:‚íE'“:f÷Et‰:<÷E<‰:fùEȇ:<ùE<‡:fûE …:<ûE‚u)źýEX“}.í‚Ìbµ‚u%ú $†u?ú º—}Xé‚Ðb,±†u%ø fˆuFø t™}òç‚Òb,¯ˆu% $¾u? tÏ}X±‚ü‘“ˆc ù¾u%À žT\Àu¬À tÑ}ò¯‚-‘‘Šc ·¼ $Äu9¼ ºÕ}ò«‚Žc#óÄu%º <ÆuYº t×}X©‚w™cñÆu%· fÉuF· ºÚ}ò¦‚z™cîÉu%µ <ËuY‘t¤‚ý“Œ™cìËu%³ žÍua³ tÞ}ò¢‚-‘™c·¯ $6 ]Ñu¬¯ tâ}òž‚›cæÑu%Í ž³uaÍ tÄ}ò¼‚-’þb·É $·u9Ç ºZÈ}.¸‚c€·u%Ç $¹u9Ç tÊ}ò¶‚w ƒc þ¹u%Ä $1Z¼u.Ä tÍ}‚³‚z–†cû¼u%ü $…:6ûEX„u¬ü t•}òë‚Îb³„u%ä žvä½'çÖ­°‚óòÏ‚ fÙtu‘tí‚)‚cÈ_’` Ãb·¬»$ÔÄ<‘tí‚®°‚çÏ‚™°‚çÏ<w¬¢°ÚÏ’¤°ÛÏ Ãb·þ f?‚‚Õ{ ý³.ÔÄ<‘tí‚®°‚îÏ‚’°‚îÏ<p¬¢°ÚÏ’¤°ÛÏ Ãb·­ $Óu9ª t[ä}òœ‚c&äÓu%ª $Öu9ª tç}ò™‚ c,áÖu%¨ fØuF¨ té}ò—‚¢c,ߨu%Œ žôu/Œ º¾c>Èû‚ôu%å ž/—v-é t¨~‚Ø‚z=–ác ·ç Mm2Ž0 "âLðO^ƒ-s vî t’Úcž·å < /qWŸv2á ºéc1ÈЂŸv%Å žNlYI0Iˆ»_P)h# =Iw:g³0"ªL‘N2ï1‚€F¬€:tÌO<´0.ʳ-·· žÉ;==Y‘eºàv/  Xñ~ò‚ªdE·» žÅv?» d5Ȫ‚‘-Åvž äâv*ž X¬d0È‚âv%› žu¹0tÆ~Jº‚ƒµv¬Ë t=«ÿc-·ú9ž—NBé1‚†F¬ú9tÒO<®0.г-·— äév*— X³d0Ȇ‚év% ò¸4Oƒ°XÈþ‚ñv‚ tñvf òº4Sƒ°XÈü‚Æõv/‹ º¿dBÈú‚õv%°ž 'f¸HÈ‚7L„%=!3;ã‚?w2ñt ºà‚Ùd(¨w%ïf‘w2ïtÛdFÈÞ‚‘w%¬»$åÌ,›³‚¢ÍÈÞ².Ífg;=×Y‘f4ªZn<‚7ÃwL½ºe9È,‚‘-Ãw¡žßw/¡ºg'©e È‚ßw%žžY;s‚ïw/‘tw/ ¹e Èïw%úž†x2útŒ>ZzHÖe·øJ_.ý1"ÆL‚N%þ1‚‚N<þ1¬€F<€:tÿM<2ôM-Öe·ö<À}+Êz?¶tœhºäº›h<¹¹¹¹¸íh%­ºªžÖz?ªt¨hºØº§h<¹¹¹¹¸Žãº©h%­ºžžâz?žt´hºÌº³h<¹¹¹¹¸Ž¸Ùºµh%­º¨žó*%Ï}@±toJ¢k ¹¹¹¹¹¹¸Ž¹¹¹¹¹¹À¡žß}b¡tI‘²k ¹¹¹¹¹¹¸Ž¹¹¹¹¹¹À‰žu;YgKL;Y(æ\,L¨Nvg,h8<û}‚…tÍk<¹´ºËk<¹¹¹¸Ž¹¹¹¹¹¹ÅÎk¬­ºœžÄ”¶k&ʺµk<¹¹¹¹¸Ž¹¹¹¹¹¹ÜzäW4)<ê}‚–t¼kºÄº»k<¹¹¹¹¸Ž¹¹¹¹¹¹Ö½k¬­º’žî}C’tÀk<¹Áº¾k<¹Ã¼k<¹¹¸Ž¹¹¹¹¹¹ÒÁk¬­ºªžÖ9z„G&ü|0„tÎj*¹¹¹¹¹¸Ž¹¹‘º.XÏj%­ºïžsÖž}/âtðj5¹¹¹¹¹¸Ž¹¹‘º Xñj%­º“äu  ‚í|ò“t¿j*¹¹¹¹¹¸Ž¹¹‘º=XÀj%­º†žú|2†tÌj6¹¹¹¹¹¸Ž¹¹‘º0XÍj%­º•žë|/•t½j*¹¹¹¹¹¸Ž¹¹‘º?X¾j-­º’Êž¹XÞ|:¢t´<ÌXw¬ <u$ ±j ¹¹¹¹¹¹¸Ž¹¹»º¬žƒ¹ÒØx?¨tªfº¹¹¹‹ß«f%­º žàx; t²ft¹¹¹‹×³f%­ºžžq4<âx‚žt´ft¹¹¹‹Õµf%­ºœžs4 <äx‚œt¶fºÊºµf<¹¹‹Ó·f%­ºŒžÆfU¹¹¹Ž¹¸Ã)öx>ŠtÈfJ¹¹¹¸¸ÁÉf%­ºˆžøx?ˆtÊfº¶ºÉf<¹¹¹·¿Ëf%­º¿ž>må;=/YŸ˜"ã1¬¦N Ú1<¦N‚®‘t€ï tÛa9·Ìž´xTÌtþeºƒ‘-´xû ž†j€5º‚KÈþ4<‚K<®çLZ# ó#! äoºtóoTŒôoTŠöoT…ûoTƒýo]ÿo`… ž$ÊõsN‹ tõslû ž¶{äÏx<±t¢f9¹¹¹¹‹·¯ž£fE¹¹¹‹æ')N¤YI/Y•‘—uB=IYv.g¢2"ªLÝM/£2.òM¬Žx-òºØe9©Žx%žó=«ÿw<t:’s0Öe·Üžž2fóQ&“t?í tÝaº£‚“t(Œ žŸ¯XuìЂ fËN¤»KKXszX–’tƒs<è tŽ•;”•r%’ÊžÝC‚£<.ÝC.zäBÆtƒs<ï tv¬ =y—w<”•x™rú ž‡7XûHÈ…7<ûH<…7fýHȃ7<ýH<ƒ7fÿHÈ7<ÿHUX(ð~tƒs<Œt\(V<‘)ðq(‚"û~<ƒs<‚tcX“Ž‘þq%é $‚ý~ºƒs<å t“f<‘€r%é $<gXÿ~tƒs<è tŽl<‚r%é fÌ<iXtƒs<è tŽn<„r%é fÌ <kX tƒs<è tŽp<†r(Å "¼7‚ÄHX¸tƒs<Å t[X%»r%¼ žY‘YKK23o.Ê7<ŸHXFtƒs<· tÉr-ÅÖ´HXHtƒs<  tËr(Å "¼7‚½HXÂrtÅ t[‚]?J X»r¬³ fÎ7‚²HXJtƒs<  tÍr(± fL%ƒs<± tÏr:¯ fqòNòƒs<¯ tÑr:­ fsò Pòƒs<­ tÓrC« fu‚ Rtƒs<« tÕrL€  òø5tŠJžö5ÖŒJÈô5<ŒJ<ô5fŽJÈò5<ŽJ<ò5fJÈð5<Jàò) ÀU‚%S[1%b &Ÿ ‚Ò#Ÿ<á.[J%p¿Mp[J<ò;-)fÚIKK‘‘êÈ’ü´<gJ‘‘–!g=ô—Ðtå;=gç¯JZ®­I‘gÊ#­I‘g„‘Ú¬ï¥X‘Úñ¥XÚ<ñ¥<®­µß¬Ë tµß=Í J/‘=Ró;‘!íЬ“¯¬íÐÐÐK X€¯ÖãÐÖÐK X‚¯¬Øh­W‘g«‘*ÚО(ÐK X‹¯äØÐ(ÐK X¯ºØ®ŸŸW‘ÉÏЬ±¯XÏÐÐÐK X–¯äÍÐÖ(ÐK X˜¯ºØhŸW‘gI‘Éž-*Y;#ŸK;væU…93ÁÏf•º°X„ ž%XK.žŽÅ(»8vv .á}/÷kòhºs<ê>=åó­wõX»…ºóïó¿~òñáòK$‘‘‘‘”ƒI=±ºOºOºOºO‚~<ñqòkºs<ñßÊ ‚¶ß.Ê <W.Ùò¸~(jºs<¨Ësȵ·'ì}ºŠÚòû¥ž…Ú<û¥€”f »!ô‚Éf žôÌ>€Næ» òÉf žv fŸ fŸv fŸhfŸfŸvhfŸfŸvvLØ%HR8N/fŸt­žÁ|X¿ò:-Ä#(×]â{ºHò:-Ö¬­ò:-¬(( ò ò¯ò:-öt—ò;;;¥t–JÖ|#òläòcJóòdä'òZJœò:-ô.À‚Ú|º äfJ„t:-ÿ.‹Jx.£žuJqäø~t:-‹.ÿ~Jx.¤tqäì~t:-—.ó~Jx.¡tà~t9£.ç~ò™.ß~X°t¬Jà|‚rJÔ~t9¯.Û~ò¥.Ó~X¹tÈ~t9».Ï~ò±.Ç~X¼täv$H¼~t9Ç.Ã~ò½.»~XîžH•~t9î.œ~òä.”~Xó#. +=ð;^t@ˆxtv<Á'¬«äh'Ÿ;=­YYgX<dºHÅK¹=Tv4u$Ÿ;=gYY†t¬í~ò¼ë-…#dGK¹‘Tv7½,f žô‘f¥Éžuä*¦~*>m»;=­Y‘Ù‚/©~ÈfJ:GK¹‘Tuž JÐ}J¦Ó}Jž<é}f—JwžK‘KKYfDæZZ„tÖ}ˆ<ÇÝ A1.º€rD¢Ègë~JH‰~t9ú.~òð.ˆ~Xït’~ä…<û}È:….$ò/zÈå}›.  `P•*4JLJÅ绘<5<KJ*t›ç<»˜<Åç‚»˜<ÅçJü˜X„çþ˜Ö‚ç<þ˜J‚çf€™.€ç<€™L¹ãJÉœ<€¹ãJÕœX«ã<Õœ<«ã"לJ©ã<לJ©ã&Ùœ%§ã<Ùœ<&NLJtXHJ1¼„~>NTLNTLNTLNTLNTLNTLNTLNTL„„’ZTLNTLNTLNTLNTL®+JUÝ~ªžÈXJôËLŸÊä”rWƒh¿YE»Wgóe/q'Ê{XJôËKgŸŸÊò”rWKh¿YE»WŸóe/q'Ä~X8jgåƒ[q‚<q:‚ñJhmžYXpJ{å ºŸ;=/KO;=[ töº¬JX¬ JVIuM÷Çû /usr/include/x86_64-linux-gnu/bits/usr/lib/gcc/x86_64-linux-gnu/5/include/usr/includemarching_cubes2.cstdio2.hstddef.htypes.hlibio.hstdio.h 0p°"z  #¡KK݃¡Ÿ»»hžß­J "—~ÖëÀ <u.J*» lvJkX vXk‚ vJ t. ­ÉÉÉÉ»…·?Ÿ======>دŸŸŸŸŸŸŸŸÉÉÉÊLVËõ«?VÚ}&šàu0"03,3333/36  Uû /usr/include/x86_64-linux-gnu/bitsllgramarea.cmathcalls.h ày(ÙƒIƒK€KKKKYIwJ JY¯éEYNFN:long long int__pyx_k_start_PyString_Eqpositive_signPyExc_StopIterationnb_lshift__pyx_v_new_offset__pyx_k_triangles__pyx_k_B__pyx_k_H__pyx_k_I__pyx_k_L__pyx_k_O__pyx_umethod_PyList_Type_pop__pyx_k_Q__pad1__pad2__pad3__pad4__pad5__Pyx_InitCachedBuiltins__pyx_k_b__pyx_L16_continue__pyx_k_join__pyx_k_f__pyx_k_hgetwchar__pyx_k_k__pyx_k_l__pyx_k_p__pyx_k_qnb_divide__pyx_k_y__pyx_k_z__pyx_n_s_chunk_sizeNPY_CHARsuboffsets__pyx_kp_s_last_object_Value19PyMethodDescrObject_Py_NoneStructallocfunc__pyx_v_local_objs__pyx_n_s_print_reject_reason_PyArray_Descrim_class__pyx_v_missing_objsPyByteArray_Type__pyx_v_ylollgramarea__pyx_k_tri_area_exceptionnb_and__pyx_v_c__Pyx_PyList_GetSlice__pyx_v_ybar__pyx_v_kPyDict_ContainsPyFPE_jbufPyCObject_Typearraysize11PyVarObjectPyObject_RichComparePyArray_DotFuncPyOS_snprintf__pyx_v_a__pyx_v_bboundscheck__pyx_v_d__pyx_v_f__pyx_v_i__pyx_v_jmp_subscript__pyx_v_m__pyx_v_n__pyx_v_p13PyFloatObject__pyx_v_t__pyx_v_v__pyx_v_x__pyx_v_y__pyx_v_z__pyx_k_new_index__pyx_k_objdistNpyAuxData__pyx_ptype_5numpy_broadcast__pyx_n_s_y0NPY_OBJECT__pyx_int_neg_1__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkify16PyMappingMethods__pyx_v_bufferdxml_name__Pyx_BufFmt_TypeCharToNativeSize12PyCodeObject_py_stop__pyx_clinenolconvresult__pyx_k_contains_surfacePyFloat_Type__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltashas_cstop__pyx_n_s_z0sq_inplace_repeatenc_packmode__pyx_n_s_zeros__pyx_v_start__pyx_kp_s_at_g_g_g_d_gtp_deallocPyInterpreterState__pyx_kp_s_i_e_global_item_d_r__pyx_k_register_on_neighbor_mapiternextfunc__pyx_n_s_distanceuint32_t__Pyx_check_binary_version__pyx_k_tridatad_methodtm_zonets_after_subb_handlerPyErr_GivenExceptionMatches__pyx_n_s_zs__pyx_k_get_clip__pyx_k_unknown_dtype_code_in_numpy_pxd__Pyx_CodeObjectCachePyImport_Importco_filename__pyx_v_endsetattrfunc__pyx_L10_unpacking_failednb_longfloatvalPyObject_SetItem__pyx_int_1000__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_14tri_areaPyErr_Fetch__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_volume__Pyx_PySequence_ContainsTF__pyx_k_itertoolsnpy_boolllpipedfromoriginvolume__pyx_v_chunk_objs__pyx_n_s_neuron_rxd_geometry3d_surfaces__Pyx_ImportType__pyx_n_s_printPyCFunction_Typeinternal__pyx_n_s_max_chunksfgetwc__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_mapuse_tracing__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunks__Pyx_BufFmt_TypeCharToStandardSize__pyx_v_startifgetwsNPY_STRINGcurexc_value__cxx11__pyx_k_has_pos__pyx_k_graphicsPrimitivesreadbufferprocdesttp_weaklist__debug__Pyx_div_Py_ssize_tcharbufferproc__pyx_k_neighbor__pyx_v_value1PyObject_GetItem__Pyx_PyFloat_DivideObjCPyObject_GetIter__pyx_v_value6__Pyx_RaiseArgtupleInvalid__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_3contains_surfacetp_newview__Pyx_zerosPyLongObject__pyx_k_Format_string_allocated_too_shor_2PyArray_FastTakeFunc__pyx_L1_errorPyString_FromString__pyx_kp_s_position_4smalltablenb_inplace_xor__pyx_float_2___pyx_n_s_arrayinplace__pyx_k_position__pyx_k_sumcancastscalarkindtoPyInt_FromSsize_t__pyx_ptype_7cpython_4type_typePyThreadStatePyLong_AsDouble_ZN9__gnu_cxx24__numeric_traits_integerIiE5__maxE__pyx_k_enumeratecomplex double__pyx_pybuffernd_xstp_basetm_mincurrency_symbol__pyx_v_robjfwidef_back__pyx_n_s_append__pyx_v_endian_detectorPyDict_Newclone11PyIntObject_unused2PyList_NewNPY_SHORT__Pyx_PyObject_CallNoArg__pyx_n_s_importtp_basicsizectversiontp_memberssq_sliceintval__pyx_L13_continue__pyx_v_chunk_objsa__pyx_v_info__pyx_v_chunk_objsiempty_listbufferinfo__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_chunkifyold_excnb_nonzeroPyInt_AsSsize_tPyGILState_UNLOCKEDPyString_FromFormat__pyx_n_s_mintmp_value_mode__pyx_v_store_areastp_flags__pyx_v_process2destructor__pyx_v_print_reject_reason__pyx_n_s_overlaps_x__pyx_n_s_overlaps_y__pyx_n_s_overlaps_zPyCode_New__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_10triangulate_surface__pyx_v_doublearea__pyx_v_ptstp_setattroPyArray_FillWithScalarFunc__pyx_k_primitivesPyArray_CopySwapFunc__pyx_k_the_mapPyString_Typeis_valid_array__min__Pyx_TypeTest__Pyx_PyObject_Callis_str__pyx_L4_unpacking_donecodec_error_registryf_tstate__pyx_v_surf_countnew_maxint_p_sign_posn__pyx_n_s_xhicopyswapnf_lasti__wchb__pyx_pybuffernd_ys__pyx_n_s_position__pyx_k_i_e_global_item_d_r__Pyx_Raisethread_idtm_mon__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_19tri_volumetowctrans__pyx_k_chunk_sizeargname__pyx_kp_s_last_obj_distance_to_position_4PyObject_SetAttrString__pyx_pybuffernd_zsreadonly__Pyx_minusones__pyx_L11_unpacking_donef_iblock__pyx_n_s_resize__Pyx_PyObject_GetAttrStrwarning__pyx_k_Zf__pyx_n_s_value0__pyx_n_s_value1__pyx_n_s_value3__pyx_n_s_value4__pyx_n_s_value5__pyx_n_s_value6__Pyx_ListComp_Append__pyx_n_s_testPyArray_FromStrFuncfromstr12PyListObjectPyExc_ValueError__opsPyNumber_InPlaceAddPyExc_RuntimeErrorPy_buffertm_hour__pyx_n_s_valuesob_shash__pyx_L15_unpacking_donePyObject_GetBuffer_ZN9__gnu_cxx24__numeric_traits_integerIsE5__maxE__numeric_traits_integer__pyx_n_s_isnan__pyx_k_productPyExc_FloatingPointError__pyx_b__pyx_d__pyx_f_vtable_offsetsubarray__pyx_m__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell__pyx_r__pyx_L5_argtuple_errortp_initPyTypeObject__pyx_n_s_xlonb_remaindertp_freenb_inplace_remainderdotfuncfillwithscalar__pyx_pybuffernd_data__pyx_n_s_tridata__pyx_k_local_xs__pyx_ptype_5numpy_ndarray__pyx_builtin_sum__pyx_k_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7__pyx_kp_s_distance_to_position_4_with_ever_2__numeric_traits_integer__pyx_v_has_neg_arr_descr__pyx_k_local_ys__pyx_k_range__pyx_v_almost__pyx_L11__pyx_v_flagsternaryfunc__pyx_L13Py_intptr_t__pyx_L15__Pyx_PyInt_From_enum__NPY_TYPES__pyx_n_s_neuronconst_zeroPyArray_ArgFunc__pyx_v_r_outerim_weakreflist__pyx_v_print_valuesnb_indexPyLong_Typeretval__pyx_k_local_zsPySet_Type__pyx_n_s_objectsNPY_LONGDOUBLEsq_containstp_setattrm_ml__Pyx_SafeReleaseBuffer__Pyx_PyDict_ContainsTF__pyx_L20_next_or__mask_was_savedPyExc_NameError__pyx_k_Non_native_byte_order_not_suppor__pyx_builtin_range__Pyx_RaiseTooManyValuesErrornb_subtractNPY_BOOLtypeobj__pyx_k_refchecknb_absolutePyFrameObjectob_type__Pyx_PyDict_Keys__pyx_k_Format_string_allocated_too_shorinquiryungetwcNPY_UNICODEtp_getattr21__Pyx_CachedCFunctionrtversionPyUnicodeUCS4_Compare_IO_backup_basePyNumber_Index__jmp_buf_tagPyType_IsSubtype__pyx_kp_s_tri_volume_exceptionpy_funcname__pyx_v_im1__pyx_n_s_r_inner__Pyx_PyInt_From_int__Pyx_Print11__mbstate_t__pyx_k_ndarray_is_not_Fortran_contiguou__pyx_n_s_fileclass_name__Pyx_GetBufferAndValidate__pyx_k_max_chunks__pyx_v_dk__pyx_n_s_sumnb_invert__pyx_L57_unpacking_done__pyx_v_dx__pyx_kp_s_distance_to_position_4_with_everempty_dictint_n_sep_by_spacec_profileobjnb_inplace_floor_dividecoercion__pyx_n_s_value2is_trueNPY_CLIP16PyArray_ArrFuncs__pyx_k_RuntimeError__pyx_n_s_value7__pyx_n_s_big_number_matrix__Pyx_RaiseDoubleKeywordsError__pyx_kp_s__3__pyx_n_s_xbar__pyx_L6_unpacking_failedbyteorder__pyx_v_neighborim_self__pyx_v_internal_membraneskwds2__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces__register_on_neighbor_map__pyx_n_s_zipmax_count_IO_read_endPyErr_ExceptionMatchesdescrsetfuncwcsstrold_valtp_as_sequence__pyx_v_ip1_IO_save_base__pyx_v_ndimNPY_ULONG__pyx_builtin_enumerate__Pyx__CallUnboundCMethod0bf_getreadbuffer__pyx_bisect_code_objectsPyFloat_AsDouble__pyx_lineno__pyx_code_cache_Py_CheckRecursiveCall__pyx_L78_unpacking_done__Pyx_BufFmt_ProcessTypeChunkmon_thousands_sepnb_divmod12NPY_CLIPMODE_IO_write_end__numeric_traits_integer_Py_CheckRecursionLimit__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_area__pyx_n_s_trianglesf_localsplus_PyByteArray_empty_string__pyx_k_yhi__numeric_traits_integerwcrtomb__pyx_n_s_zlofunctionnum_pos_argsexactdescrgetfuncstrict_py_slice_IO_buf_baseowned_stopPyFloat_FromDouble__pyx_n_s_reject_if_outside__pyx_v_child__pyx_k_print_reject_reason__Pyx_ArgTypeTest__pyx_k_position_4__pyx_v_xbarhas_cstartGNU C++ 5.4.0 20160609 -mtune=generic -march=x86-64 -g -g -O2 -fwrapv -fno-strict-aliasing -fstack-protector-strong -fPIC -fstack-protector-strong14__Pyx_TypeInfo__pyx_L7_bool_binop_done__pyx_v_hasfields__pyx_L14_unpacking_failed__pyx_n_s_areas__pyx_v_local_vol__pyx_v_6neuron_3rxd_10geometry3d_8surfaces_total_surface_tests__pyx_k_zbarwcslenPyArray_SetItemFuncfind_trianglesmalloc__pyx_L15_bool_binop_donenb_floatnb_inplace_rshift__Pyx_ErrRestorembrlenPyMem_Malloc__pyx_k_overlaps_x__pyx_k_overlaps_y__pyx_k_overlaps_zPyArray_NonzeroFuncnb_coerce__pyx_k_size__pyx_tuple__2sdigitsq_length__Pyx_StructField___pyx_tuple__9__pyx_v_y0__pyx_k_ylo__pyx_n_s_volume_inside_cell__pyx_kp_s_tri_area_exceptionvwprintf__Pyx_BufFmt_RaiseExpectedNPY_NTYPESco_lnotabarg_passed_twicePyFile_WriteObject__pyx_n_s_new_indexnum_expectedcode_line_IO_marker__pyx_k_distance_to_position_4_with_everprintfunc__pyx_v_start_ifmt_offset__pyx_k_chunk_objssetitem__pyx_kp_u_Format_string_allocated_too_shor_2scalarkindparent__Pyx_BufFmt_ExpectNumber_ZN9__gnu_cxx24__numeric_traits_integerIlE5__maxE__pyx_empty_tuplegetattrofuncenc_type__pyx_v_km1wcscat_IO_lock_t_IO_read_ptrPyCFunction_NewEx__pyx_v_point__Pyx_PyList_PopPyExc_ImportErrorpybuffer__Pyx_StructField_flags2tp_version_tagPyFPE_dummy__pyx_kp_s_would_normally_reject_because_atsq_ass_itemgetitem__pyx_L0__pyx_L2__pyx_L3__pyx_L4__pyx_L7__pyx_v_to_processPyObject_CallFunctionObjArgs__pyx_n_s_bisect_leftrcbuffertstate_headPyErr_WriteUnraisable_IO_write_ptr__pyx_kp_u_Format_string_allocated_too_shorPyString_AsString__pyx_pybuffernd_local_xsPyErr_SetString__pyx_L56_unpacking_failed__pyx_n_s_get_clip__pyx_pybuffernd_triangles__pyx_v_kp1__pyx_k_keys_PyString_JoinPyFile_WriteStringc_traceobj__pyx_L19_bool_binop_done__pyx_v_triangles__pyx_v_local_xsgetattrfunctm_sec__pyx_n_s_itertools__pyx_pybuffernd_local_ys__pyx_k_endsq_inplace_concatsq_repeat__pyx_v_local_ys__pyx_builtin_RuntimeError__pyx_pf_5numpy_7ndarray___getbuffer____pyx_pybuffernd_local_zs__Pyx_PrintOne__Pyx_PyInt_SubtractObjChashfunc__pyx_tuple__10__pyx_n_s_SkewCone__pyx_tuple__13PyFPE_counter__pyx_tuple__15__pyx_tuple__17__pyx_tuple__18__pyx_tuple__19__pyx_ptype_5numpy_dtype__pyx_v_has_pos__pyx_n_s_dreprfunc__pyx_v_local_zs__pyx_n_s_i__pyx_n_s_j__pyx_n_s_k__pyx_n_s_psegcountproc__pyx_n_s_joincodec_search_path__pyx_n_s_zwcsrchr__Pyx_GetStdout__pyx_tuple__20recursion_depthPyMem_ReallocPyErr_Formatnb_inplace_power__pyx_k_7f_7f_7f_7f_7f_7f_7f_7ftp_as_number26__Pyx_CodeObjectCacheEntrypy_import__pyx_pybuffer_tridataPyList_Type__pyx_valuewcschrnb_int__saved_maskPyExc_SystemErrorPyTuple_Typec_tracefuncNpyAuxData_CloneFuncob_fvalflagold_tbPyBaseString_Type__pyx_v_new_indexPyErr_Clear__pyx_n_s_enumerateNPY_LONGdlopenflagsnb_inplace_true_dividetm_yday__Pyx_WriteUnraisablePyArray_CopySwapNFunc__pyx_k_popexc_tbnewlinedimensions_lock_ZN9__gnu_cxx24__numeric_traits_integerIiE5__minE__pyx_n_s_bisect__pyx_stack__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_16_tri_areacancastto__pyx_v_copy_shapetype_numtp_descr_setnb_power__pyx_n_s_internal_membranes__pyx_k_would_normally_reject_because_at__pyx_v_lenx__pyx_v_leny__pyx_v_lenzenc_countwcsxfrm__pyx_v_grid_dx__pyx_v_grid_dyreserved__pyx_L70_unpacking_failedco_stacksizetp_hash__pyx_v_last_starti__pyx_n_s_store_areasmethod_name_IO_buf_end__Pyx_BufFmt_RaiseUnexpectedChar__pyx_v_xhivisitprocshort unsigned intrefcount__pyx_k_appendwcstoldwcstolltp_printbf_getsegcount__pyx_v_selfnb_inplace_lshift__pyx_k_printwcsrtombs__pyx_insert_code_objectwcscmpwcscspnco_namesraise_neg_overflownb_true_dividetp_richcompare_IO_read_basePyUnicodeUCS4_Formattp_iter__pyx_k_bisect_left__pyx_v_ptnb_inplace_divide__pyx_v_xsPyTraceBack_TypePyNumber_Power__pyx_v_obj14PyStringObjectNPY_CDOUBLEob_refcnt__pyx_type__Pyx_RaiseNoneNotIterableError__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface__pyx_n_s_process_cell__wchNPY_WRAPco_cellvarsPyBuffer_ReleasePy_GetVersionfull_traceback__pyx_k_at_g_g_g_d_g__pyx_n_s_start__FILE__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_8chunkifytp_alloc10__sigset_t__pyx_v_old_start_i__pyx_v_xlowcscpy__valuePyObject_GetAttrsetter__pyx_k_objects_shortbuf_sbuftp_baseslenfuncwctob__pyx_v_z0__pyx_v_neighbor_list__numeric_traits_integerinvalid_keywordargsortPySequence_Containsbf_getbufferf_globals__pyx_k_main__countunsigned charmessage__pyx_n_s_has_negwcspbrkNPY_CLONGDOUBLE__pyx_pw_5numpy_7ndarray_1__getbuffer__sq_ass_sliceint_p_sep_by_space__pyx_n_s_r_outer__pyx_v_triangles_iwcscoll__pyx_k_r_inner__pyx_k_value0__pyx_k_value1__pyx_k_value3__pyx_k_value4__pyx_k_value5__pyx_k_value6__pyx_k_value7__pyx_n_s_dataint_curr_symbolmbsinit__Pyx_CreateCodeObjectForTracebackPyTuple_Pack__pyx_v_sixtimesvolume__pyx_k_numpyPyString_InternFromStringPyMethod_Type__Pyx_AddTraceback__pyx_kp_s_7f_7f_7f_7f_7f_7f_7f_7fPyArray_API__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__triangulate_surface_given_chunksob_item__pyx_k_values__pyx_kp_u_ndarray_is_not_C_contiguouswmemset__pyx_v_still_to_processwcsftimePyInt_FromLongdiminfosetlocale__pyx_k_distance_to_position_4_with_ever_2__pyx_f_5numpy__util_dtypestringPyDict_Typetz_dsttimef_builtinswcstoulgot_Z__pyx_t_15__pyx_v_objdist__pyx_t_19__Pyx_BufFmt_Initnb_positive__Pyx_ImportModule__pyx_v_value015PyNumberMethods__pyx_v_value2__pyx_v_value3__pyx_v_value4__pyx_v_value5vswscanf__pyx_v_value7__off_t__pyx_n_s_contains_surface__pyx_k_last_obj_distance_to_position_4complex long double__pyx_k_resizef_codenb_inplace_subtract__pyx_v_dup_countfunction_name__pyx_v_pt_neighbor_map__pyx_n_s_yhiencodingstruct_alignmenttick_counterco_codePyArray_ArgSortFunc__pyx_k_neuronco_firstlineno__pyx_v_zhi__pyx_v_datavswprintfPyDict_SetItem__pyx_L12_break__pyx_n_s_refcheckpy_codenb_multiply__Pyx_crop_slicenpy_hash_tscanfuncPySequence_Tupletp_is_gc__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_5process_cellPyModule_GetDictint_n_sign_posn__pyx_v_tridata__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surface__pyx_t_34__pyx_L6_bool_binop_done22__Pyx_BufFmt_StackElemfp_offset_ZN9__gnu_cxx24__numeric_traits_integerIsE5__minE__pyx_v_di__pyx_v_djcause_next__pyx_v_dy__pyx_v_dznogilNpyAuxData_tag__pyx_k_volume_inside_cell__pyx_find_code_objectfastclip__pyx_k__3freefunc__pyx_v_cur_processed__pyx_string_tabwcsncmp__pyx_v_grid_dz__is_signed__pyx_k_ZdNPY_VOID__pyx_k_Zgco_flagsPyDict_GetItemPyArray_FastClipFuncco_consts__Pyx_ReleaseBufferml_flagsis_listwctype_tob_ival__Pyx_IsLittleEndian_ZN9__gnu_cxx24__numeric_traits_integerImE8__digitsENpyAuxData_FreeFuncwcsspn__Pyx_RaiseBufferFallbackErrorpy_moduleml_meth__pyx_v_ncounttp_as_mappingPyNumber_Subtracttrash_delete_latertp_weaklistoffsetkw_argstp_iternextnegative_sign__pyx_k_distancenew_packmode__pyx_k_zeros__pyx_t_56__pyx_pf_5numpy_7ndarray_2__releasebuffer____pyx_v_hi_old_offsetco_varnames__pyx_empty_bytes__pyx_n_s_neighbor__pyx_n_s_ValueError__pyx_v_i1PyArray_CompareFuncmbsrtowcs__Pyx_PyNumber_Intwcsncpy__pyx_k_xlo__pyx_L3_unpacking_failed__pyx_v_brute_force_countglobal_dict__pyx_n_s_starting_points__pyx_int_1215tm_mday__pyx_v_j1first_kw_arg__Pyx_div_intis_unsigned__gnu_debug__Pyx_TryUnpackUnboundCMethod__pyx_k_ybar__pyx_v_clipper_setjmpf_exc_valueroot__Pyx_InitGlobals__pyx_L89_bool_binop_done__pyx_t_66NPY_UINT__pyx_n_s_dx__pyx_n_s_dy__pyx_L13_unpacking_failedwritebufferproc__pyx_v_k1_IO_save_endelsize__Pyx_GetItemInt_Generic__Pyx_PyObject_CallMethod1PyObject__pyx_n_s_print_valuesmp_lengthnb_oct__pyx_L18_bool_binop_done_longobject__pyx_buffmt_parse_arraytp_itemsizeobjobjprocinvalid_keyword_type_py_startnpy_intptmp_typetargetPyFile_SoftSpacef_trace__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_12_triangulate_surface_given_chunkscomplex floatPyArray_GetItemFunc__pyx_v_lo__pyx_kp_s_home_hines_neuron_nrn_share_libraise_overflow__pyx_k_xrangeputwchartp_delPyArrayObjectnum_max__Pyx_GetBufferinterninterpNPY_UBYTE__pyx_n_s_x__pyx_n_s_y__pyx_n_s_bisect_righttempsnone_allowedquoteinitsurfacesnum_foundattr_namePyGILState_LOCKEDwchar_t__pyx_L14getbufferproc__Pyx_PyList_Append__pyx_v_nx__pyx_v_ny__pyx_v_nzvfwscanf12__Pyx_Buffer__Pyx_GetItemInt_List_Fast__Pyx_GetModuleGlobalNamenb_xor__pyx_int_16__pyx_v_the_map__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_areawcstoullPyObject_IsInstancetm_isdst__Pyx_BufFmt_CheckString__pyx_L24__pyx_umethod_PyDict_Type_keyspy_frame_Py_ZeroStruct__Pyx_PyObject_GetSlice__pyx_ptype_5numpy_flatiter_ZN9__gnu_cxx24__numeric_traits_integerIlE5__minE13PyTupleObject__pyx_k_store_areas__pyx_k_dx__pyx_k_dy__pyx_k_dz__Pyx_InitStrings__pyx_n_s_k1argmaxformatwcstodkw_namewcstokNPY_NTYPES_ABI_COMPATIBLEshort int__pyx_k_tri_volume_exception__Pyx_PyObject_CallMethO__pyx_L23_bool_binop_done__pyx_k_internal_membranestp_mro__pyx_v_clip_objs17__Pyx_LocalBuf_ND__pyx_n_s_lo__pyx_n_s_main__Pyx_GetBuiltinName__pyx_L77_unpacking_failedNPY_RAISEpy_leveltp_getsetfilllocaleconv__pyx_n_s_has_pos__pyx_int_50PyGetSetDef__pyx_L7_unpacking_done_markerspy_srcfile_fileno__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t__pyx_L4_argument_unpacking_doneco_zombieframe__pyx_k_y0stdout__pyx_v_local_area_typeobject_ZN9__gnu_cxx24__numeric_traits_integerIcE5__maxE__pyx_k_hicodec_search_cache__pyx_L10_unpacking_doneint_n_cs_precedes__pyx_k_i1btowcPyDict_Size__pyx_builtin_zip__pyx_builtin_ValueError__pyx_L74m_module__pyx_n_s_nx__pyx_n_s_ny__pyx_n_s_nz/home/hines/neuron/nrnmpi/share/lib/python/neuron/rxd/geometry3dPyExc_OverflowErrorwcsncat__pyx_n_s_local_xsnewfuncnum_min__ssize_t__pyx_k_j1__pyx_umethod_PyDict_Type_values__pyx_n_s_os__pyx_t_10__pyx_t_11__pyx_t_12__pyx_t_13__pyx_t_14__Pyx_IternextUnpackEndCheck__pyx_t_16__pyx_t_17__pyx_t_18__pyx_n_s_range__pyx_k_z0__pyx_n_s_local_ys__pyx_L14_unpacking_done__int32_twmemmoveNPY_USHORT__pyx_k_k1__pyx_tb__pyx_t_20__pyx_t_21__pyx_t_22__pyx_t_23__pyx_t_24__pyx_t_25__pyx_t_26__pyx_t_27__pyx_t_28__pyx_t_29tp_name__gnu_cxx__pyx_n_s_local_zsnpy_doubletp_docf_blockstack__pyx_n_s_xrange__Pyx_Importobjobjargproc__pyx_v_offset__pyx_n_s_zbar__pyx_t_30__pyx_t_31__pyx_t_32__pyx_t_33PyMethodDef__pyx_t_35__pyx_t_36__pyx_t_37__pyx_t_38__pyx_t_39__pyx_n_s_chunk_objs__pyx_v_x0__pyx_v_x1__pyx_k_zs__pyx_k_ndarray_is_not_C_contiguouswraparoundPyInt_Type__pyx_v_descrsq_concat__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cellsetattrofunc__pyx_k_loargmin__pyx_n_s_size_IO_write_base__pyx_t_40__pyx_t_41__pyx_t_42__pyx_t_43__pyx_t_44__pyx_t_45__pyx_t_46__pyx_t_47__pyx_t_48__pyx_t_49co_nlocalsPyArray_ScalarKindFunc__pyx_v_y1__pyx_n_s_zhi__pyx_k_isnan__pyx_v_is_skew_cone__pyx_pybuffer_local_xssizetypec_profilefunc__pyx_t_50__pyx_t_51__pyx_t_52__pyx_t_53__pyx_t_54__pyx_t_55PyArray_FastPutmaskFunc__pyx_t_57__pyx_t_58__pyx_t_59__Pyx_PyDict_Values__pyx_v_ys__pyx_v_z1__pyx_k_min__pyx_L52_bool_binop_donemp_ass_subscriptbf_getwritebuffer__pyx_k_nx__pyx_k_ny__pyx_k_nz__Pyx_BufFmt_TypeCharToGroup__pyx_pybuffer_local_ys__pyx_kp_u_Non_native_byte_order_not_suppor__pyx_t_60__pyx_t_61__pyx_t_62__pyx_t_63__pyx_t_64__pyx_t_65getter__pyx_t_67__pyx_t_68__pyx_t_69align_mod_offset_PyThreadState_Current__pyx_v_zsPyImport_AddModule__pyx_k_has_neg__pyx_pw_5numpy_7ndarray_3__releasebuffer____pyx_k_os__pyx_cfilenm__pyx_pybuffer_local_zsarg_tuple__pyx_t_70__pyx_t_71__pyx_t_72__pyx_t_73__pyx_t_74__pyx_t_75__pyx_t_76__pyx_t_77__pyx_t_78__pyx_t_79__pyx_k_r_outer__pyx_v_chunk_ptsa__pyx_skip_dispatch__pyx_L8_next_or__pyx_v_zbarf_valuestack__pyx_k_ptmodulescurexc_type__pyx_k_xhi__pyx_k_bisect__pyx_pybuffer_triangles__pyx_t_80__pyx_t_81__pyx_t_82__pyx_self__pyx_n_s_ylotrash_delete_nesting__pyx_kp_u_ndarray_is_not_Fortran_contiguou_cur_columntp_traversefunc_name17PyCFunctionObjectPyArray_ScanFunc__pyx_k_ValueError__digitsPyString_SizetimezonePyLong_AsLong__pyx_n_s_x0__pyx_n_s_x1__pyx_int_10000000co_argcountob_svalPyExc_ZeroDivisionError__Pyx_ParseOptionalKeywordstmp_tbbinaryfuncNPY_BYTE__pyx_ptype_5numpy_ufuncmon_groupingPyUnicode_TypePyDict_Nextfasttakewmemchr__pyx_n_s_xs__pyx_n_s_y1__Pyx_PyInt_From_longcastdicttm_year__pyx_n_s_keysstdin__pyx_L71_unpacking_donePyLong_AsSsize_t13PyBufferProcs__Pyx_InitCachedConstants__pyx_n_s_ys__pyx_n_s_z1PyExc_TypeError__pyx_n_s_hitraverseprocf_locals__pyx_n_s_i1nb_floor_divide__pyx_v_zlo__pyx_n_s_register_on_neighbor_map__pyx_tuple__4__pyx_tuple__5__pyx_tuple__6__pyx_tuple__7__pyx_tuple__8__off64_twcstoftm_wdaywcstolf_exc_tracebackentries__pyx_k_zlo__pyx_methods__pyx_v_6neuron_3rxd_10geometry3d_8surfaces_corner_tests__pyx_builtin_xrange__pyx_v_objects_distances__pyx_n_s_objdist__jmp_bufis_unicodetp_call__pyx_L43_unpacking_failednb_hexsurfaces.cppPyArray_FillFuncsysdict__pyx_L49_continue16PyGILState_STATEowned_start__pyx_L9_unpacking_failed__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_18tri_volumenb_inplace_addtp_reprraise_error__pyx_k_test__pyx_n_s_j1__pyx_v_cellsPyArray_VectorUnaryFunc__pyx_v_fieldsasync_excallocated__pyx_kwds__Pyx_ErrFetchbf_releasebuffer__Pyx_copy_object_array__pyx_v_jm1__pyx_k_x0__pyx_k_x1py_line__pyx_n_s_endwmemcmp__pyx_kp_s_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7__pyx_v_num_keys__pyx_L5_bool_binop_done__pyx_L20_unpacking_failedco_weakreflist__pyx_k_neuron_rxd_geometry3d_surfacesPySlice_Newfastputmask__pyx_module_is_main_neuron__rxd__geometry3d__surfacesob_digit__pyx_k_xs__pyx_k_y1nb_inplace_ortp_as_buffer__pyx_L8_breakNPY_CFLOAT__pyx_v_cell_listtp_dict__pyx_pyargnames__pyx_k_ys__pyx_k_z1releasebufferproc__pyx_L99_break__pyx_k_starting_points__Pyx_PyObject_CallOneArg20__Pyx_StringTabEntry__pyx_builtin_min__pyx_v_jp1PyErr_Occurred__pyx_n_s_dzlong long unsigned intPyExc_IndexErrornb_inplace_multiplyinitprocwmemcpy__pyx_pybuffernd_areastp_clearNPY_ULONGLONG__pyx_tuple___pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_6volume_inside_cell__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_area__Pyx_RaiseNeedMoreValuesErrormodules_reloading__pyx_v_reject_if_outsideob_sizetagPyArrayObject_fieldsalign_atcopyswapco_name__pyx_k_areas__pyx_kp_u_unknown_dtype_code_in_numpy_pxd__pyx_v_chunk_pts__pyx_int_9999__pyx_k_reject_if_outside__pyx_L9_bool_binop_done__pyx_n_s_popNPY_INT__pyx_k_zhinb_negative__pyx_L76_breaksq_itemPyExc_AttributeErrorpy_name__pyx_k_arrayc_line__pyx_k_ziptp_descr_getNPY_HALF__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_2contains_surface__pyx_v_position__Pyx_PyInt_AddObjC10PyTryBlock__pyx_pybuffer_areas__pyx_pybuffernd_tridatacurexc_traceback14PyMethodObjecttp_getattro__Pyx_PyObject_Append__pyx_k_file__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map__pyx_k_grr_it_thinks_there_is_surface_w__pyx_L19_continuePyCFunctionWithKeywords__pyx_n_s_graphicsPrimitivestypegroupnb_rshiftNPY_FLOATgilstate_counterPyNumber_MultiplyNPY_TIMEDELTAnb_inplace_and__intptr_tPyErr_WarnExnb_or__pyx_k_xbar17PySequenceMethods__pyx_v_cell_countrichcmpfunciswctype__jmpbuf__pyx_v_numcompartmentsPyNumber_Divide__Pyx_ZeroBuffer__pyx_pybuffer_xs__Pyx_RaiseArgumentTypeInvalid__Pyx_PyObject_IsTruetp_cachetm_gmtoff__pyx_k_dataPyTraceBack_Here__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_triangulate_surface_Py_TrueStructvwscanf__Pyx_IterFinish__pyx_pybuffer_ys__pyx_kp_s_item_d_in_grid_d_d_d_contains_prPyString_FromStringAndSizetp_methodsgetiterfunc__pyx_v_cell_list2__pyx_argsPy_InitModule4_64__pyx_int_neg_2__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_5process_cell__pyx_pybuffer_zsml_doc__valPyTuple_New__Pyx_BufFmt_DescribeTypeCharPyNumber_Long__pyx_v_areasssizessizeobjargprocb_level__pyx_k_SkewConePyErr_Restore__pyx_n_s_RuntimeError__pyx_n_s_pt__pyx_n_s_productint_frac_digitstz_minuteswest__pyx_v_objsneg_one__pyx_pybuffer_datambrtowc__Pyx_BufFmt_TypeCharToPaddingmon_decimal_point__pyx_n_s_the_mapPy_tracefuncco_freevarsstruct_count_chaintypedef __va_list_tag __va_list_tagim_func__pyx_k_last_objectnew_countPyCFunctiontp_dictoffsetssizessizeargfunc__Pyx__PyObject_CallOneArg__Pyx_BufFmt_ParseNumberoverflow_arg_areareg_save_area__Pyx_PyInt_As_int__pyx_kp_s_grr_it_thinks_there_is_surface_w__pyx_v_chunk_size__pyx_v_max_d17__Pyx_Buf_DimInfo__pyx_k_j__pyx_codeobj__12__pyx_codeobj__14__pyx_codeobj__16__pyx_v_count__pyx_t_1__pyx_t_2__pyx_t_3__pyx_t_4__pyx_t_5__pyx_t_6__pyx_t_7__pyx_t_8__pyx_t_9more_or_less__pyx_L19_break__Pyx_PyInt_AddCObjNPY_LONGLONG__pyx_codeobj__21field__pyx_L3_error__Pyx_PyIndex_AsSsize_tstrides__pyx_k_value2nb_addPyErr_NormalizeExceptiontp_subclassesob_sstatemodule_namec_metadataPyUnicodeUCS4_DecodeUTF8NPY_DOUBLENPY_USERDEF__pyx_int_0__pyx_int_1__pyx_int_2__pyx_int_4__pyx_L21_unpacking_doneparent_offsetPySys_GetObjectint_p_cs_precedesPyArray_SortFunc_IO_FILE__stack_chk_failf_stacktop__Pyx_GetItemInt_FastNPY_DATETIMEptrdiff_tis_complex__pyx_v_objectsgp_offset__pyx_k_process_cell__pyx_k_home_hines_neuron_nrn_share_lib__pyx_tuple__11PyMemberDefclosure__pyx_v_childname__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_4process_cell__pyx_k_item_d_in_grid_d_d_d_contains_pr__pyx_k_print_values__pyx_k_dtp_strf_lineno__pyx_k_g__pyx_k_i__pyx_v_cell_idunaryfuncPyFrame_New__max__pyx_k_big_number_matrix__pyx_k_xvfwprintf__pyx_v_little_endianPyNumber_FloorDividePyExc_BaseExceptionfputwc20__Pyx_BufFmt_ContextPyNumber_AddfputwsPyUFunc_API__pyx_v_r_inner__pyx_n_s_numpyPyObject_Size__pyx_filenametp_comparewint_twctrans_t__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_15tri_areafrom_list__pyx_L44_unpacking_done__pyx_k_bisect_rightNPY_NOTYPE__pyx_n_s_ybarbf_getcharbuffer__pyx_v_yhi__pyx_k_import__pyx_n_s_primitivesf_exc_typePyString_FormatvertexList__printf_chktriTabledelta_v__builtin_putsGNU C11 5.4.0 20160609 -mtune=generic -march=x86-64 -g -g -O2 -fwrapv -fno-strict-aliasing -fstack-protector-strong -fPIC -fstack-protector-strong__fmtmarching_cubes2.ccubeIndexedgeTablesqrtllgramarea.cð“ ”T ””P”`”óTŸð“”0Ÿ”@”TL”T”0Ÿð“”0Ÿ””P”*”0Ÿ*”@”PL”T”0Ÿð“÷“tŸ÷“;”X;”@”PL”T”Xt”„”SŠ”"•Sx”…”VŠ”"•V£” •]§” •\0•L•UL•„•óUŸ„•œ•Uœ•³•óUŸ³•È•UE•P•YE•P•xp•• •R•• •ZЕU–UU–c–óUŸÐ•R–TR–c–óTŸ@–U–UU–[–Q[–\–óUŸp–š–Uš–V—VV—`—óUŸ`—ЛV³™Õ™YÕ™#š‘°@˜L˜RL˜^˜sp"Ÿ{›‚›Rp–ç–1Ÿç–ý–] —P—]`—£—1Ÿ£—‚›]›Ð›1ŸÊ–ç–0Ÿ›¨›0Ÿ¥–Á–0ŸÁ– —Y`—v—0Ÿv—•—1Ÿ›Å›Y—+—U£—¦—Urš¾šU¾šÄšvÀ—+—T£—¦—Trš¸šT¸šÄšQ¦š¸šT¸šÄšQ+—C—S©—e˜Se˜ƒ˜Qƒ˜”˜S”˜¨˜Q¨˜°˜sŸ°˜²˜Q²˜™S)™ršSÕš=›S=›H›QH›`›P`›d›ui›‚›SÇ—ö—R²˜É˜R0™¦™R¦™³™‘°;š`šR`šrš‘°Õš=›Rr˜€˜ v#s("Ÿ=›T› v#s("Ÿ8™P™vÀÕš=›vÀ8™P™vÄÕš=›vÄØ—ö—vÀ²˜É˜vÀP™¦™vÀØ—ö—vIJ˜É˜vÄP™¦™vÄü˜™PÜ™õ™Põ™šUø™'šQЛü›Uü›ý›óUŸÐ›ü›Tü›ý›óTŸÐ›ü›Uü›ý›óUŸÔ›ê›Pê›ð›pŸð›ñ›u1Ÿñ›ü›Pœ4œU4œ5œóUŸœ4œT4œ5œóTŸœ4œU4œ5œóUŸœ(œP(œ.œpŸ.œ/œu1Ÿ/œ4œP@œyœUyœzœóUŸzœ’œU’œ©œV©œ°œóUŸ°œÅœVŜʜóUŸÊœÜœVJœtœStœyœuzœ®œS°œÄœSʜܜS°œÅœVŜʜóUŸ°œÄœS°œÅœVŜʜóUŸ°œÄœ s8#80.ÿŸàœ÷œU÷œP/óUŸ/HPHKóUŸKdPdgóUŸg˜P˜"žóUŸàœT/óTŸ/HTHKóTŸKdTdgóTŸg›T›"žóTŸàœQ/óQŸ/DQDKóQŸKSQSgóQŸgwQwyóQŸy¬Q¬ž‘Xž"žóQŸàœR/óRŸ/HRHgóRŸg‡R‡"žóRŸQóQŸKSQSgóQŸ UK_U_dpóQ"ŸRpKdpy¡Q–¬b¬žw0žAžUAžBžóUŸBžVžUVžWžóUŸWž[žU[ž\žóUŸ0žAžTAžBžóTŸBžUžTUžVžt\ŸVžWžóTŸWž[žT[ž\žóTŸ4žAžQBžVžQWž[žQ`žšžUšž¢žS¢ž»žóUŸ»žÌžU̞͞óUŸÍžöžSöž1ŸóUŸ`žšžTšž»žóTŸ»žÌžT̞͞óTŸÍžäžTäžöžwöž1ŸóTŸ`žšžQšž»žóQŸ»žÌžQ̞͞óQŸÍžäžQäžöž‘Xöž1ŸóQŸ¢ž¦žP¦ž²žSöž-ŸSsž¸žV»žÆžVƞ̞p€Íž.ŸV@ŸŸUŸ·Ÿ\·ŸS óUŸS  \ • U• ç \ç è¡óUŸè¡ ¢\ ¢ÿ¢óUŸ@ŸsŸTsŸ¼ŸS¼ŸS óTŸS F¡SF¡à¡óTŸà¡ ¢S ¢›¢óTŸ›¢ÿ¢S@ŸŸQŸ V   óQŸ  ! V! + óQŸ+ I VI S óQŸS  V ™ Q™ ÿ¢V@Ÿ—ŸR—Ÿ¼Ÿ‘¸¼ŸS óRŸS  ‘¸ ™ R™ J¡‘¸J¡à¡óRŸà¡ ¢‘¸ ¢›¢óRŸ›¢ú¢‘¸ú¢ÿ¢óRŸ@Ÿ¼Ÿ0Ÿ¼ŸûŸ\   \+ K \K R UË¡à¡\@ŸÝŸ0ŸÝŸéŸPéŸûŸS   S+ Ë¡0ŸË¡à¡Sà¡ÿ¢0Ÿ^ŸkŸQsŸ¼Ÿ_·Ÿ¼Ÿ\˜Ÿ§ŸPS  ¡‘¸è¡ ¢‘¸›¢¿¢‘¸S  V ¦ 0ŸS  S ¦ 0ŸS  \ • U• ç \ç  ¡óUŸè¡ ¢\›¢¿¢óUŸS ç 0Ÿç ë Pë  ¡\è¡ ¢0Ÿ›¢¿¢\S h 0Ÿh ƒ Pƒ  ]   0Ÿ  ­ P­  ¡]è¡ ¢]›¢¿¢]S ‹ 0Ÿ‹  P ± 0Ÿ± ã Pã  ¡^è¡ ¢0Ÿ›¢¿¢^"¡Ë¡\à¡è¡\ ¢›¢\¿¢ÿ¢\"¡-¡V-¡Ë¡^à¡è¡S ¢›¢^¿¢ÿ¢^R¡ª¡] ¢t¢]}¢›¢]~¡‚¡‘¸‚¡ª¡Qb¢m¢Pm¢}¢‘¸"¡Ë¡_à¡è¡_ ¢8¢_8¢K¢PK¢›¢_¿¢Ê¢_Ê¢ÿ¢P¢•¢U&¢m¢S`P“PU“P;_‘ˆ;_|_S|_^‘ˆ`P›PT›P]X‘ø}]X_óTŸ_ª_‘ø}ª_Q`óTŸQ`z`‘ø}z`$aóTŸ$aMa‘ø}MaôaóTŸôab‘ø}b¸bóTŸ¸báb‘ø}áb|cóTŸ|c¥c‘ø}¥c@dóTŸ@did‘ø}ideóTŸe7e‘ø}7eÆeóTŸÆeïe‘ø}ïefóTŸfªf‘ø}ªf9góTŸ9gbg‘ø}bgågóTŸågh‘ø}h‘hóTŸ‘hºh‘ø}ºh=ióTŸ=ifi‘ø}fiéióTŸéi!j‘ø}!j›jóTŸ›jÄj‘ø}ÄjAkóTŸAkjk‘ø}jkäkóTŸäk l‘ø} l~lóTŸ~l§l‘ø}§lmóTŸmAm‘ø}Am²móTŸ²mÛm‘ø}ÛmLnóTŸLnn‘ø}nçnóTŸçno‘ø}o{oóTŸ{o¤o‘ø}¤o póTŸ p5p‘ø}5p”póTŸ”p½p‘ø}½pqóTŸqEq‘ø}Eq¤qóTŸ¤qÍq‘ø}Íq,róTŸ,rdr‘ø}drºróTŸºrãr‘ø}ãrzóTŸ>zgz‘ø}gzzóTŸz¹z‘ø}¹zâzóTŸâz{‘ø}{5{óTŸ5{^{‘ø}^{{óTŸ{ª{‘ø}ª{Ê{óTŸÊ{ó{‘ø}ó{ |óTŸ |3|‘ø}3|J|óTŸJ|s|‘ø}s|Š|óTŸŠ|³|‘ø}³|Ê|óTŸÊ|ú|‘ø}ú|}óTŸ}1}‘ø}1}B}óTŸB}k}‘ø}k}y}óTŸy}¢}‘ø}¢}§}óTŸ§}Ð}‘ø}Ð}Õ}óTŸÕ}þ}‘ø}þ}~óTŸ~,~‘ø},~^óTŸ`P›PQ›PSS]SS-Y}Ÿ-Yú\‘ ”1Ÿú\_óQŸ_ž_]ž_Q`óQŸQ`n`]n`$aóQŸ$aAa]AaôaóQŸôab]b¸bóQŸ¸bÕb]Õb|cóQŸ|c™c]™c@dóQŸ@d]d]]deóQŸe+e]+eÆeóQŸÆeãe]ãefóQŸfžf]žf9góQŸ9gVg]VgågóQŸågh]h‘hóQŸ‘h®h]®h=i‘°=iZi]Ziéi‘°éij]j›j‘°›j¸j]¸jAk‘°Ak^k]^käk‘°äkl]l~l‘°~l›l]›lm‘°m5m]5m²m‘°²mÏm]ÏmLn‘°Lnsn]snE€‘°E€8‘ ”1Ÿ8^óQŸ`P›PR›P©Q^©QÅX~ŸÅXH]‘˜”1ŸH]_óRŸ_¡_^¡_Q`|ŸQ`q`^q`˜`|Ÿ˜`$aóRŸ$aDa^Daôa‘”#Ÿôab^b¸b‘”#Ÿ¸bØb^Øb|c‘”#Ÿ|cœc^œc@d‘”#Ÿ@d`d^`de‘¨e.e^.eÆe‘¨Æeæe^æe‘¨I‘˜”1ŸI^óRŸ—P‡TS‡T]X‘ø}”1Ÿ]X_óT1Ÿ__S_ª_‘ø}”1Ÿª_Q`óT1ŸQ`]`S]`z`‘ø}”1Ÿz`$aóT1Ÿ$a0aS0aMa‘ø}”1ŸMaôaóT1ŸôabSbb‘ø}”1Ÿb¸bóT1Ÿ¸bÄbSÄbáb‘ø}”1Ÿáb|cóT1Ÿ|cˆcSˆc¥c‘ø}”1Ÿ¥c@dóT1Ÿ@dLdSLdid‘ø}”1ŸideóT1ŸeeSe7e‘ø}”1Ÿ7eÆeóT1ŸÆeÒeSÒeïe‘ø}”1ŸïefóT1ŸffSfªf‘ø}”1Ÿªf9góT1Ÿ9gEgSEgbg‘ø}”1ŸbgågóT1ŸågñgSñgh‘ø}”1Ÿh‘hóT1Ÿ‘hhShºh‘ø}”1Ÿºh=ióT1Ÿ=iIiSIifi‘ø}”1ŸfiéióT1ŸéijSj!j‘ø}”1Ÿ!j›jóT1Ÿ›j§jS§jÄj‘ø}”1ŸÄjAkóT1ŸAkMkSMkjk‘ø}”1ŸjkäkóT1ŸäkðkSðk l‘ø}”1Ÿ l~lóT1Ÿ~lŠlSŠl§l‘ø}”1Ÿ§lmóT1Ÿm$mS$mAm‘ø}”1ŸAm²móT1Ÿ²m¾mS¾mÛm‘ø}”1ŸÛmLnóT1ŸLnbnSbnn‘ø}”1ŸnçnóT1ŸçnónSóno‘ø}”1Ÿo{oóT1Ÿ{o‡oS‡o¤o‘ø}”1Ÿ¤o póT1Ÿ ppSp5p‘ø}”1Ÿ5p”póT1Ÿ”p pS p½p‘ø}”1Ÿ½pqóT1Ÿq(qS(qEq‘ø}”1ŸEq¤qóT1Ÿ¤q°qS°qÍq‘ø}”1ŸÍq,róT1Ÿ,rGrSGrdr‘ø}”1ŸdrºróT1ŸºrÆrSÆrãr‘ø}”1ŸãrzóT1Ÿ>zgz‘ø}”1ŸgzzóT1Ÿz¹z‘ø}”1Ÿ¹zâzóT1Ÿâz{‘ø}”1Ÿ{5{óT1Ÿ5{^{‘ø}”1Ÿ^{{óT1Ÿ{ª{‘ø}”1Ÿª{Ê{óT1ŸÊ{ó{‘ø}”1Ÿó{ |óT1Ÿ |3|‘ø}”1Ÿ3|J|óT1ŸJ|s|‘ø}”1Ÿs|Š|óT1ŸŠ|³|‘ø}”1Ÿ³|Ê|óT1ŸÊ|ú|‘ø}”1Ÿú|}óT1Ÿ}1}‘ø}”1Ÿ1}B}óT1ŸB}k}‘ø}”1Ÿk}y}óT1Ÿy}¢}‘ø}”1Ÿ¢}§}óT1Ÿ§}Ð}‘ø}”1ŸÐ}Õ}óT1ŸÕ}þ}‘ø}”1Ÿþ}~óT1Ÿ~,~‘ø}”1Ÿ,~^óT1Ÿ—PšY_šYú\‘ ”2Ÿú\_óQ1Ÿ_›__›_ž_}Ÿž_Q`óQ1ŸQ`k`_k`n`}Ÿn`$aóQ1Ÿ$a>a_>aAa}ŸAaôaóQ1Ÿôab_bb}Ÿb¸bóQ1Ÿ¸bÒb_ÒbÕb}ŸÕb|cóQ1Ÿ|c–c_–c™c}Ÿ™c@dóQ1Ÿ@dZd_Zd]d}Ÿ]deóQ1Ÿe(e_(e+e}Ÿ+eÆeóQ1ŸÆeàe_àeãe}ŸãefóQ1Ÿf›f_›fžf}Ÿžf9góQ1Ÿ9gSg_SgVg}ŸVgågóQ1Ÿågÿg_ÿgh}Ÿh‘hóQ1Ÿ‘h«h_«h®h}Ÿ®h=i‘°”1Ÿ=iWi_WiZi}ŸZiéi‘°”1Ÿéij_jj}Ÿj›j‘°”1Ÿ›jµj_µj¸j}Ÿ¸jAk‘°”1ŸAk[k_[k^k}Ÿ^käk‘°”1Ÿäkþk_þkl}Ÿl~l‘°”1Ÿ~l˜l_˜l›l}Ÿ›lm‘°”1Ÿm2m_2m5m}Ÿ5m²m‘°”1Ÿ²mÌm_ÌmÏm}ŸÏmLn‘°”1ŸLnpn_pnsn}ŸsnE€‘°”1ŸE€8‘ ”2Ÿ8^óQ1Ÿ—PÙP\ÙPN[‘N[H]‘˜”2ŸH]_óR1Ÿ_˜`\˜`$aóR1Ÿ$a¶€‘¶€‘¨”1ŸI‘˜”2ŸI^óR1Ÿ—P›PtŸ›P]X‘ø}”#Ÿ]X_óT#Ÿ_ª_‘ø}”#Ÿª_Q`óT#ŸQ`z`‘ø}”#Ÿz`$aóT#Ÿ$aMa‘ø}”#ŸMaôaóT#Ÿôab‘ø}”#Ÿb¸bóT#Ÿ¸báb‘ø}”#Ÿáb|cóT#Ÿ|c¥c‘ø}”#Ÿ¥c@dóT#Ÿ@did‘ø}”#ŸideóT#Ÿe7e‘ø}”#Ÿ7eÆeóT#ŸÆeïe‘ø}”#ŸïefóT#Ÿfªf‘ø}”#Ÿªf9góT#Ÿ9gbg‘ø}”#ŸbgågóT#Ÿågh‘ø}”#Ÿh‘hóT#Ÿ‘hºh‘ø}”#Ÿºh=ióT#Ÿ=ifi‘ø}”#ŸfiéióT#Ÿéi!j‘ø}”#Ÿ!j›jóT#Ÿ›jÄj‘ø}”#ŸÄjAkóT#ŸAkjk‘ø}”#ŸjkäkóT#Ÿäk l‘ø}”#Ÿ l~lóT#Ÿ~l§l‘ø}”#Ÿ§lmóT#ŸmAm‘ø}”#ŸAm²móT#Ÿ²mÛm‘ø}”#ŸÛmLnóT#ŸLnn‘ø}”#ŸnçnóT#Ÿçno‘ø}”#Ÿo{oóT#Ÿ{o¤o‘ø}”#Ÿ¤o póT#Ÿ p5p‘ø}”#Ÿ5p”póT#Ÿ”p½p‘ø}”#Ÿ½pqóT#ŸqEq‘ø}”#ŸEq¤qóT#Ÿ¤qÍq‘ø}”#ŸÍq,róT#Ÿ,rdr‘ø}”#ŸdrºróT#Ÿºrãr‘ø}”#ŸãrzóT#Ÿ>zgz‘ø}”#ŸgzzóT#Ÿz¹z‘ø}”#Ÿ¹zâzóT#Ÿâz{‘ø}”#Ÿ{5{óT#Ÿ5{^{‘ø}”#Ÿ^{{óT#Ÿ{ª{‘ø}”#Ÿª{Ê{óT#ŸÊ{ó{‘ø}”#Ÿó{ |óT#Ÿ |3|‘ø}”#Ÿ3|J|óT#ŸJ|s|‘ø}”#Ÿs|Š|óT#ŸŠ|³|‘ø}”#Ÿ³|Ê|óT#ŸÊ|ú|‘ø}”#Ÿú|}óT#Ÿ}1}‘ø}”#Ÿ1}B}óT#ŸB}k}‘ø}”#Ÿk}y}óT#Ÿy}¢}‘ø}”#Ÿ¢}§}óT#Ÿ§}Ð}‘ø}”#ŸÐ}Õ}óT#ŸÕ}þ}‘ø}”#Ÿþ}~óT#Ÿ~,~‘ø}”#Ÿ,~^óT#Ÿ—P›PqŸ›PSS}ŸSS-Y]-Yú\‘ ú\_óQ#Ÿ_ž_}Ÿž_Q`óQ#ŸQ`n`}Ÿn`$aóQ#Ÿ$aAa}ŸAaôaóQ#Ÿôab}Ÿb¸bóQ#Ÿ¸bÕb}ŸÕb|cóQ#Ÿ|c™c}Ÿ™c@dóQ#Ÿ@d]d}Ÿ]deóQ#Ÿe+e}Ÿ+eÆeóQ#ŸÆeãe}ŸãefóQ#Ÿfžf}Ÿžf9góQ#Ÿ9gVg}ŸVgågóQ#Ÿågh}Ÿh‘hóQ#Ÿ‘h®h}Ÿ®h=i‘°”#Ÿ=iZi}ŸZiéi‘°”#Ÿéij}Ÿj›j‘°”#Ÿ›j¸j}Ÿ¸jAk‘°”#ŸAk^k}Ÿ^käk‘°”#Ÿäkl}Ÿl~l‘°”#Ÿ~l›l}Ÿ›lm‘°”#Ÿm5m}Ÿ5m²m‘°”#Ÿ²mÏm}ŸÏmLn‘°”#ŸLnsn}ŸsnE€‘°”#ŸE€8‘ 8^óQ#Ÿ—P›PrŸ›P©Q~Ÿ©QÅX^ÅXH]‘˜H]_óR#Ÿ_¡_~Ÿ¡_Q`|ŸQ`q`~Ÿq`˜`|Ÿ˜`$aóR#Ÿ$aDa~ŸDaôa‘”#Ÿôab~Ÿb¸b‘”#Ÿ¸bØb~ŸØb|c‘”#Ÿ|cœc~Ÿœc@d‘”#Ÿ@d`d~Ÿ`de‘¨”#Ÿe.e~Ÿ.eÆe‘¨”#ŸÆeæe~Ÿæe‘¨”#ŸI‘˜I^óR#Ÿ—Pg_0Ÿ_0ŸTST^P—PœP0ŸœP²PP²PQVQLQ0ŸLQ[QP[QuQVuQ‹Q0Ÿ‹Q˜QP˜QëQVëQ:R0Ÿ:RIRPIR`RV`RvR0ŸvRƒRPƒRÊRVÊRS0ŸSSPS4SV4SJS0ŸJSVSPVS¬SV¬SõS0ŸõSTPTTVT1T0Ÿ1TCTPCTTVTÓT0ŸÓTâTPâTùTVùTU0ŸUUPUcUVcU§U0Ÿ§U¶UP¶UÍUVÍUãU0ŸãUõUPõUXP>XkXwkX–X0Ÿ–X¨XP¨XÚXwÚXþX0ŸþXYPYBYwBYkY0ŸkY}YP}Y¯Yw¯YØY0ŸØYêYPêY Zw ZUZ0ŸUZwZPwZ½Zw½ZúZ0ŸúZ[P[‚[w‚[Ç[0ŸÇ[ñ[Pñ[g\wg\´\0Ÿ´\þ\Pþ\Š]wŠ]Q`0ŸQ`$aP$a¸bw¸b|c0Ÿ|c@dP@deweÆe0ŸÆefPfågwåg‘h0Ÿ‘h=iP=iøiwøi›j0Ÿ›jAkPAk~lw~lm0Ÿm²mP²mVnwVnçn0Ÿçn{oP{o”pw”pq0Ÿq¤qP¤q;rw;rºr0Ÿºrz0Ÿ>zzPzìzwìz5{0Ÿ5{{P{ |w |J|0ŸJ|Š|PŠ|Ñ|wÑ|}0Ÿ}B}PB}§}w§}Õ}0ŸÕ}~P~8~w8~]~0Ÿ]~…~P…~Ì~wÌ~î~0Ÿî~P9w9X0ŸXzPzµwµÑ0ŸÑíPí€w€)€0Ÿ)€E€PE€t€wt€Š€0ŸŠ€ €P €É€wɀ܀0ŸÜ€ò€Pò€w'0Ÿ'8P8XwX;‚0Ÿ;‚¢ƒw—PÙP0ŸÙPèPPèPQ\QQ0ŸQ%QP%QuQ\uQÂQ0ŸÂQÑQPÑQëQ\ëQR0ŸR RP R`R\`R¤R0Ÿ¤R³RP³RÊR\ÊRàR0ŸàRíRPíR4S\4S†S0Ÿ†S•SP•S¬S\¬SÂS0ŸÂSÔSPÔST\TdT0ŸdTsTPsTT\T¥T0Ÿ¥T²TP²TùT\ùT=U0Ÿ=ULUPLUcU\cUyU0ŸyU†UP†UÍU\ÍUV0ŸV%VP%VzP>zìz\ìz{0Ÿ{†{P†{ |\ |J|PJ|Ñ|\Ñ|B}0ŸB}G}PG}§}\§}Õ}PÕ}8~\8~…~0Ÿ…~Š~PŠ~Ì~\Ì~î~Pî~9\9z0ŸzPµ\µÑPÑ€\€E€0ŸE€J€PJ€t€\t€Š€PЀɀ\É€ò€0Ÿò€P\'P'X\X;‚0Ÿ;‚¢ƒ\—PôP0ŸôPQPQ_‘€_ôa0Ÿôa¸bP¸bg‘€g;‚0Ÿ;‚¢ƒ‘€—PgQ0ŸgQ„QP„Q_‘ø~_e0ŸeePeg‘ø~g;‚0Ÿ;‚¬‚‘ø~—PÝQ0ŸÝQúQPúQ_‘ð~_9g0Ÿ9gågPågg‘ð~g;‚0Ÿ;‚¬‚‘ð~—PRR0ŸRRoRPoR_‘è~_éi0ŸéiøiPøig‘è~g;‚0Ÿ;‚¬‚‘è~—P¼R0Ÿ¼RÙRPÙR_‘à~_äk0Ÿäk~lP~lg‘à~g;‚0Ÿ;‚¬‚‘à~—P&S0Ÿ&SCSPCS_‘Ø~_Ln0ŸLnVnPVng‘Ø~g;‚0Ÿ;‚¬‚‘Ø~—PžS0ŸžS»SP»S_‘Ð~_ p0Ÿ p”pP”pg‘Ð~g;‚0Ÿ;‚¬‚‘Ð~—P T0Ÿ T*TP*T_‘È~_,r0Ÿ,r;rP;rg‘È~g;‚0Ÿ;‚¬‚‘È~—P|T0Ÿ|TžTPžT_‘À~_»s0Ÿ»s1tP1tg‘À~g;‚0Ÿ;‚¬‚‘À~—PëT0ŸëTUPU_‘¸~_“u0Ÿ“uuPug‘¸~g;‚0Ÿ;‚¬‚‘¸~—PUU0ŸUUrUPrU_‘°~_çv0ŸçvKwPKwg‘°~g;‚0Ÿ;‚¬‚‘°~—P¿U0Ÿ¿UÜUPÜU_‘¨~_wx0Ÿwx†xP†xg‘¨~g;‚0Ÿ;‚¬‚‘¨~—P.V0Ÿ.VKVPKV_‘ ~_šy0ŸšyìyPìyg‘ ~g;‚0Ÿ;‚¬‚‘ ~—PV0ŸVºVPºV_‘˜~_âz0ŸâzìzPìzg‘˜~g;‚0Ÿ;‚¬‚‘˜~—P W0Ÿ W)WP)W_‘~_Ê{0ŸÊ{ |P |g‘~g;‚0Ÿ;‚¬‚‘~—P{W0Ÿ{W˜WP˜W_‘ˆ~_Ê|0ŸÊ|Ñ|PÑ|g‘ˆ~g;‚0Ÿ;‚¬‚‘ˆ~—PêW0ŸêWXPX_‘€~_y}0Ÿy}§}P§}g‘€~g;‚0Ÿ;‚¬‚‘€~—P]X0Ÿ]XzXPzX_‘ø}_1~0Ÿ1~8~P8~g‘ø}g;‚0Ÿ;‚¬‚‘ø}—PÅX0ŸÅXÓXPÓX_^_ª~0Ÿª~Ì~PÌ~g^g;‚0Ÿ;‚¬‚^—P-Y0Ÿ-Y;YP;Y_]_20Ÿ29P9g]g;‚0Ÿ;‚¬‚]—PšY0ŸšY¨YP¨Y___™0Ÿ™µPµg_g;‚0Ÿ;‚¬‚_—PZ0ŸZZPZ(ZZ(ZUZw_ €0Ÿ €€P€)€wg;‚0Ÿ;‚}‚Z}‚¬‚‘—PœZ0ŸœZ²ZP²ZÅZYÅZúZw_^€0Ÿ^€t€Pt€Š€wg;‚0Ÿ;‚}‚Y}‚¬‚‘˜—PY[0ŸY[w[Pw[Š[XŠ[Ç[w_¶€0Ÿ¶€É€Pɀ܀wg;‚0Ÿ;‚}‚X}‚¬‚‘ —P6\0Ÿ6\\\P\\o\Ro\´\w_0ŸP'wg;‚0Ÿ;‚}‚R}‚¬‚‘¨—PS]0ŸS]]P]_S_%_0Ÿ%_5_P5_g_Sg_I0ŸIXPXgSg;‚P;‚¬‚S—P;‚0Ÿ;‚}‚Q}‚¬‚‘°—P;‚0Ÿ;‚¬‚ °‹Ÿ—P;‚0Ÿ;‚}‚T}‚¬‚‘¸—PœPS«PºP_«P_ ÿŸQ`¢ƒ ÿŸ«P_0ŸQ`¢ƒ0ŸÀPÙP\ÀP_ ÿŸ$a;‚ ÿŸÀP_0Ÿ$a;‚0ŸQQSQ_ ÿŸ¸b;‚ ÿŸQ_0Ÿ¸b;‚0ŸQ-Q_Q_ ÿŸ|c;‚ ÿŸQ_0Ÿ|c;‚0Ÿ3QLQ^3Q_ ÿŸ@d;‚ ÿŸ3Q_0Ÿ@d;‚0ŸuQ‹QSuQ_ ÿŸe†f ÿŸ9g;‚ ÿŸuQ_0Ÿe†f0Ÿ9g;‚0Ÿ‘Q Q_‘Q_ ÿŸÆe†f ÿŸ9g;‚ ÿŸ‘Q_0ŸÆe†f0Ÿ9g;‚0Ÿ¦Q©Q~Ÿ©QÂQ^¦Q_ ÿŸf†f ÿŸ9g;‚ ÿŸ¦Q_0Ÿf†f0Ÿ9g;‚0ŸëQRSëQ_ ÿŸåg;‚ ÿŸëQ_0Ÿåg;‚0ŸR!R]R_ ÿŸ‘h;‚ ÿŸR_0Ÿ‘h;‚0Ÿ'R:R‘'R_ ÿŸ=i;‚ ÿŸ'R_0Ÿ=i;‚0Ÿ`RvRS`R_ ÿŸøiKk ÿŸäk;‚ ÿŸ`R_0ŸøiKk0Ÿäk;‚0Ÿ|R‹R]|R_ ÿŸ›jKk ÿŸäk;‚ ÿŸ|R_0Ÿ›jKk0Ÿäk;‚0Ÿ‘R¤R~Ÿ‘R_ ÿŸAkKk ÿŸäk;‚ ÿŸ‘R_0ŸAkKk0Ÿäk;‚0ŸÊRàRSÊR_ ÿŸ~l;‚ ÿŸÊR_0Ÿ~l;‚0ŸæRõR]æR_ ÿŸm;‚ ÿŸæR_0Ÿm;‚0ŸûRS^ûR_ ÿŸ²m;‚ ÿŸûR_0Ÿ²m;‚0Ÿ4SJSS4S_ ÿŸVn€o ÿŸ p;‚ ÿŸ4S_0ŸVn€o0Ÿ p;‚0ŸPSSS}ŸSSmS]PS_ ÿŸçn€o ÿŸ p;‚ ÿŸPS_0Ÿçn€o0Ÿ p;‚0ŸsS†S‘sS_ ÿŸ{o€o ÿŸ p;‚ ÿŸsS_0Ÿ{o€o0Ÿ p;‚0Ÿ¬SÂSS¬S_ ÿŸ”p;‚ ÿŸ¬S_0Ÿ”p;‚0ŸÈSÜS]ÈS_ ÿŸq;‚ ÿŸÈS_0Ÿq;‚0ŸâSõS~ŸâS_ ÿŸ¤q;‚ ÿŸâS_0Ÿ¤q;‚0ŸT1TST_ ÿŸ;rFs ÿŸ»s;‚ ÿŸT_0Ÿ;rFs0Ÿ»s;‚0Ÿ7TKT]7T_ ÿŸºrFs ÿŸ»s;‚ ÿŸ7T_0ŸºrFs0Ÿ»s;‚0ŸQTdT^QT_ ÿŸz;‚ ÿŸXV_0Ÿ>z;‚0ŸrV…V^rV_ ÿŸz;‚ ÿŸrV_0Ÿz;‚0Ÿ«VÁV‘ø}«V_ ÿŸìz†{ ÿŸÊ{;‚ ÿŸ«V_0Ÿìz†{0ŸÊ{;‚0ŸÇVÛV]ÇV_ ÿŸ5{†{ ÿŸÊ{;‚ ÿŸÇV_0Ÿ5{†{0ŸÊ{;‚0ŸáVôV‘áV_ ÿŸ{†{ ÿŸÊ{;‚ ÿŸáV_0Ÿ{†{0ŸÊ{;‚0ŸW0W‘ø}W_ ÿŸ |;‚ ÿŸW_0Ÿ |;‚0Ÿ6WJW]6W_ ÿŸJ|;‚ ÿŸ6W_0ŸJ|;‚0ŸPWcW~ŸPW_ ÿŸŠ|;‚ ÿŸPW_0ŸŠ|;‚0Ÿ‰WŸW‘ø}‰W_ ÿŸÑ|G} ÿŸy};‚ ÿŸ‰W_0ŸÑ|G}0Ÿy};‚0Ÿ¥W¹W]¥W_ ÿŸ}G} ÿŸy};‚ ÿŸ¥W_0Ÿ}G}0Ÿy};‚0Ÿ¿WÒW^¿W_ ÿŸB}G} ÿŸy};‚ ÿŸ¿W_0ŸB}G}0Ÿy};‚0ŸøWX‘ø}”#ŸøW_ ÿŸ§};‚ ÿŸøW_0Ÿ§};‚0ŸX,X_X_ ÿŸÕ};‚ ÿŸX_0ŸÕ};‚0Ÿ2XEX‘2X_ ÿŸ~;‚ ÿŸ2X_0Ÿ~;‚0ŸkXXóT#ŸkX_ ÿŸ8~Š~ ÿŸª~;‚ ÿŸkX_0Ÿ8~Š~0Ÿª~;‚0Ÿ‡X–X_‡X_ ÿŸ]~Š~ ÿŸª~;‚ ÿŸ‡X_0Ÿ]~Š~0Ÿª~;‚0ŸœX¯X~ŸœX_ ÿŸ…~Š~ ÿŸª~;‚ ÿŸœX_0Ÿ…~Š~0Ÿª~;‚0ŸÚXéXóT#ŸÚX_ ÿŸÌ~;‚ ÿŸÚX_0ŸÌ~;‚0ŸïXþX_ïX_ ÿŸî~;‚ ÿŸïX_0Ÿî~;‚0ŸYY‘˜Y_ ÿŸ;‚ ÿŸY_0Ÿ;‚0ŸBYQYóT#ŸBY_ ÿŸ9 ÿŸ™;‚ ÿŸBY_0Ÿ90Ÿ™;‚0ŸWYkY‘ ”1ŸWY_ ÿŸX ÿŸ™;‚ ÿŸWY_0ŸX0Ÿ™;‚0ŸqY„Y‘qY_ ÿŸz ÿŸ™;‚ ÿŸqY_0Ÿz0Ÿ™;‚0Ÿ¯Y¾YóT#Ÿ¯Y_ ÿŸµ;‚ ÿŸ¯Y_0Ÿµ;‚0ŸÄYØY‘ ”1ŸÄY_ ÿŸÑ;‚ ÿŸÄY_0ŸÑ;‚0ŸÞYñY‘˜”1ŸÞY_ ÿŸí;‚ ÿŸÞY_0Ÿí;‚0Ÿ Z/ZóT#Ÿ Z_ ÿŸ€J€ ÿŸ^€;‚ ÿŸ Z_0Ÿ€J€0Ÿ^€;‚0ŸIZUZ‘ ”1ŸIZ_ ÿŸ)€J€ ÿŸ^€;‚ ÿŸIZ_0Ÿ)€J€0Ÿ^€;‚0ŸsZ~Z‘˜sZ_ ÿŸE€J€ ÿŸ^€;‚ ÿŸsZ_0ŸE€J€0Ÿ^€;‚0Ÿ½ZÌZóT#Ÿ½Z_ ÿŸt€;‚ ÿŸ½Z_0Ÿt€;‚0ŸîZúZ‘ îZ_ ÿŸŠ€;‚ ÿŸîZ_0ŸŠ€;‚0Ÿ[#[‘[_ ÿŸ €;‚ ÿŸ[_0Ÿ €;‚0Ÿ‚[‘[óT#Ÿ‚[_ ÿŸÉ€;‚ ÿŸ‚[_0ŸÉ€;‚0Ÿ»[Ç[‘ »[_ ÿŸÜ€;‚ ÿŸ»[_0ŸÜ€;‚0Ÿå[ø[‘˜”1Ÿå[_ ÿŸò€;‚ ÿŸå[_0Ÿò€;‚0Ÿg\v\óT#Ÿg\_ ÿŸ;‚ ÿŸg\_0Ÿ;‚0Ÿ¨\´\‘ ¨\_ ÿŸ';‚ ÿŸ¨\_0Ÿ';‚0Ÿú\]‘˜ú\_ ÿŸ8;‚ ÿŸú\_0Ÿ8;‚0Ÿ;_v_‘ˆ^mUmŽóUŸ^mTmSŽóTŸn‰S£o£Uo£€£óUŸ£M£U£0£P0£3£p:Ÿ;£M£P££Q£M£R[£o£Uo£€£óUŸ€£µ£Uµ£º§_º§»§óUŸ»§<©_€£É£Tµ£C¤0ŸC¤‚¤^‚¤“¤0Ÿ“¤º¤^º¤Ã¥0ŸÃ¥ó¥1Ÿó¥‡¦0ŸŽ¦˜§0Ÿ»§º¨0Ÿº¨Þ¨1ŸÞ¨7©0Ÿ"¤1¤PÝ£¤‘˜°¦€§‘˜$¨h¨‘˜x¨º¨‘˜Þ¨ý¨‘˜©7©‘˜Ý£¤_°¦€§_$¨h¨_x¨º¨_Þ¨ý¨_©7©_¤ ¤PÝ£¤^¹¦ø¦0Ÿ§€§^$¨h¨^x¨¨0Ÿ¨º¨^Þ¨ý¨^©7©^*§]§PÞ¨ç¨Pç¨÷¨RÝ£¤‘ Ô¦á¦Tᦀ§‘ $¨h¨‘ x¨Ž¨Tލº¨‘ Þ¨ý¨‘ ©7©‘ k¥°¥SS¦¦P‚¦‡¦P¨$¨PS¦a¦0Ÿa¦‡¦]¦‡¦^¨$¨^ý¨©^¦#¦U#¦‡¦‘ ¨$¨‘ ý¨©U©©‘ º¨×¨ZŸ@©q©Uq©Tª\Tª[ªóUŸ[ª«\@©q©Tq©Vª]Vª[ªóTŸ[ª«]@©q©Qq©Xª^Xª[ªóQŸ[ª«^m©”©0ŸÓ©'ª0Ÿ[ªrªSrª‡ª0Ÿ¯ª«0Ÿm©Ã©0ŸÃ©É©PÉ©ø©Vø©ÿ©Pÿ©'ªV[ª‡ª0Ÿ‡ªŸªVŸª¤ªP¤ª«Vm©«©0Ÿ«©»©P»©É©_É©'ª0Ÿ[ªjªPjªrª_rªŸª0ŸŸª¯ª_¯ª«0Ÿé©ø©v ø©ÿ©p ÿ©ªv Óªóªv m©q©Uq©”©\rª‡ª\m©r©0Ÿr©…©P…©”©Vrª‡ªVm©Ž©0ŸŽ©”©Prª|ªP|ª‡ªSŽÇUÇÎóUŸÎÚUÚÝóUŸÝŽUŽŽóUŸŽ!ŽU!Ž™ŽóUŸŽËTËÎóTŸÎÚTÚÝóTŸÝŽTŽŽóTŸŽ!ŽT!Ž™ŽóTŸ¯Ý 'Ÿ³½pΟ½ËQÎÚQ³ÂPÂËtÎÚtæŽ 'ŸmŽ”Ž 'ŸŽŽbŽŽ‘X7ޔޑX ««U«ã¬^ã¬æ¬óUŸæ¬c®^ ««T«–¬V–¬A­óTŸA­c­Vc­m­óTŸm­ð­Vð­!®óTŸ!®>®V>®c®óTŸ ««Q«å¬_嬿¬óQŸæ¬c®_ ««R«c®óRŸ ««X«c®‘˜›«º«Sº«Ñ«PÑ«ç«Sô«¬Q¬*¬‘*¬8¬PA¬d¬‘d¬¬SA­c­Sm­‚­S‚­ˆ­‘ˆ­¦­Q¦­Á­‘!®>®SK«º«Sº«¼«P¼«Ñ¬SÑ¬æ¬ óR3$óT"Ÿæ¬H®SH®M® óR3$óT"ŸM®c®S¬–¬Væ¬"­V‚­„­P§­´­Pæ­!®VM®c®Võ­ÿ­PW®[®P–¬¬|–¬­¬‘˜™ŽÑŽUÑŽØŽóUŸØŽåŽUåŽèŽóUŸèŽU$óUŸ$(U(¤óUŸ™ŽÕŽTÕŽØŽóTŸØŽåŽTåŽèŽóTŸèŽ T $óTŸ$(T(¤óTŸ™ŽÌŽQÌŽèŽóQŸèŽQ$w$(Q(>óQŸ>ŸwŸ¤óQŸºŽÌŽQÌŽèŽóQŸÄŽÕŽP؎ߎPߎåŽuóQŸ¾ŽÇŽRÇŽÑŽuÑŽÕŽóU#ØŽåŽuñŽQc$‘X>Ÿ‘X¤ÒUÒíVíóUŸ¤³T³ÖTÊÏSÝéPéSU SÝíVíóUŸíðPðVp® ®U ®?¯óUŸ?¯k¯Uk¯›¯óUŸ›¯Ÿ¯UŸ¯ª¯óUŸp® ®T ®?¯óTŸ?¯k¯Tk¯›¯óTŸ›¯Ÿ¯TŸ¯ª¯óTŸY¯^¯u÷7÷)Ÿz¯Š¯aН›¯‘X:U:?óUŸ?EUEwVwxóUŸ0T07S?vSMOPOxR 0P07S?tS 0ò‹µ 0òyµ 0ò”µ 00Ÿ 0T >P?IP5:U:?óUŸ5?0Ÿ5>T>?óTŸ\tS\tU\tTftP\^0Ÿ^tQ°¯Ç¯Uǯº°]º°¿°óUŸ¿°ó°]ó°ø°óUŸø°:±]°¯Ï¯Tϯ¼°^¼°¿°óTŸ¿°õ°^õ°ø°óTŸø°:±^à¯ï¯0Ÿï¯°S°‡°sŸ‡°”°S°¯à¯0Ÿà¯ï¯Pﯰ°\¿°ñ°\ø°±\±:±0ŸÐ¯à¯P±!±PﯰV8°”°V_°c°Pc°”°_d°o°Px–U–¥V¥§óUŸ§úVú‘óUŸÙóPó‘Sxô0Ÿô ‘P ‘‘Vˆ£ À&&Ÿ§É À&&Ÿž£P§²P²É Ø&&®É Ø&&‘A‘UA‘B‘óUŸB‘Q‘UQ‘R‘óUŸR‘^‘U^‘_‘óUŸ_‘c‘Uc‘d‘óUŸd‘t‘U_‘c‘Uc‘d‘óUŸ@±W±TW±a±Sa±e±óTŸe±v±Tv±‰±óTŸ‰±Ä±SıȱóTŸe±±0ŸÐ±²U²$²S$²&²U&²'²óUŸ'²y²Sy²{²óUŸ{²°²S°²²²U²²í²Sí²ï²Uï²V³Sб²T²&²T'²7²T7²{²óTŸ{²‡²T‡²²P²¿²T¿²È²PȲ³T³³‘X³³T³!³óTŸ!³-³‘X-³V³óTŸÐ±²Q²'²óQŸ'²7²Q7²{²óQŸ{²£²Q£²²²óQŸ²²ô²Qô²V³óQŸÐ± ²R ²'²óRŸ'²7²R7²{²óRŸ{²ï²Rï²V³óRŸû±%²Vï²³V!³V³V³³P!³(³PȲä²Pä²ï²P²§²P§²²²P'²t²0Ÿ'²7²Q7²t²óQŸ'²7²R7²t²óRŸ'²7²T7²t²óTŸ'²t²S>²N²PN²t²V>²t²SO²n²Pn²t²‘X`³l³Ul³ä³Vä³å³óUŸå³´V´´óUŸ´5´V`³Š³0ŸŠ³Ž³PŽ³Þ³Så³´S´5´0Ÿu³Š³P´´P@´P´UP´v´Vv´w´óUŸw´½´V½´¾´óUŸ¾´Ë´VP´h´Vw´”´V¾´Ë´VP´d´Uw´Ž´U¾´Å´UT´d´Qw´Ž´Q¾´Å´Q”´½´V½´¾´óUŸÐ´Þ´UÞ´í´Sí´î´óUŸî´ô´Sô´ø´Uø´ù´óUŸã´ø´PµCµUCµ¹µV¹µÂµUµõóUŸÃµîµUîµK¶VK¶T¶óUŸT¶·V·5·U5·Í·VÍ·ã·Uã·ü·Vü·ÿ·Uÿ·ºVµeµToµ¢µT¬µÂµTõîµTîµE¶óTŸT¶¶T¶œ¶óTŸö¶·óTŸ·2·T2·C·óTŸC·z·Tz·‹·óTŸ‹·ã·Tã·ü·óTŸü· ¸T ¸}¸óTŸ}¸‹¸T‹¸¹óTŸ¹ ¹T ¹&¹‘¨g¹y¹Ty¹…¹óTŸ…¹¸¹T¸¹Ë¹óTŸË¹Î¹Tιà¹óTŸà¹é¹Té¹÷¹‘¨÷¹ ºT ººóTŸµeµQeµ¢µóQŸ¬µÂµQõîµQîµE¶óQŸT¶h¶Qh¶Ð¶óQŸö¶·óQŸ·$·Q$·C·óQŸC·‹·Q‹·Í·óQŸÍ·ã·Qã·ü·óQŸü· ¸Q ¸,¸‘¨,¸}¸óQŸ}¸‹¸Q‹¸¯¸‘¨¯¸g¹óQŸg¹…¹Q…¹ª¹óQŸª¹¸¹Q¸¹Ë¹‘¨˹à¹Q๺óQŸµeµReµÃµóRŸÃµîµRîµ·óRŸ·;·R;·C·óRŸC·]·R]·Í·óRŸÍ·ã·Rã·ü·óRŸü· ¸R ¸}¸óRŸ}¸‹¸R‹¸ºóRŸµeµXeµÃµóXŸÃµîµXîµT¶óXŸT¶h¶Xh¶·óXŸ·;·X;·C·óXŸC·‹·X‹·Í·óXŸÍ·ã·Xã·ü·óXŸü· ¸X ¸,¸‘°,¸}¸óXŸ}¸‹¸X‹¸ª¸‘°ª¸g¹óXŸg¹…¹X…¹ª¹óXŸª¹¸¹X¸¹Ë¹‘°˹à¹X๺óXŸµeµYeµÃµóYŸÃµîµYîµT¶óYŸT¶h¶Yh¶·óYŸ·;·Y;·C·óYŸC·‹·Y‹·Í·óYŸÍ·ã·Yã·ü·óYŸü· ¸Y ¸}¸óYŸ}¸‹¸Y‹¸g¹óYŸg¹…¹Y…¹ª¹óYŸª¹¸¹Y¸¹Ë¹óYŸË¹à¹Y๺óYŸÌµE¶]¶œ¶]ö¶C·]Í·}¸] ºº]µ¸µSõîµST¶¶Sœ¶ö¶S·×·S×·ã·pèü·¸S}¸ ºSPµeµUC·‹·U}¸‹¸Ug¹…¹Uª¹¸¹U˹à¹Us·€·R€·ƒ·rŸƒ·‹·R´¸ß¸P߸î¸T‘¨’¸³¸P³¸¹]U·‹·uŸg¹…¹uŸª¹¸¹uŸË¹à¹uŸY·‹·Pg¹v¹Pv¹…¹uª¹¸¹P˹ѹPѹà¹uµ¢µU‹·Í·U¹ ¹U…¹ª¹Uà¹é¹U÷¹ ºU¿·Å·Q+¹R¹PR¹W¹QW¹g¹‘°¹*¹P*¹g¹\·Í·uŸ…¹ª¹uŸà¹é¹uŸ÷¹ ºuŸ¡·Å·PÅ·Í·u…¹”¹P”¹£¹u£¹ª¹Pà¹é¹P÷¹ý¹Pý¹ ºu÷¹ ºU0¶E¶Pö¶·P··‘¨¶¶P¶E¶\ö¶·\X¸d¸Pd¸}¸\ º ºP ºº\ìµE¶_¶”¶_ö¶·_ã·ü·_¸,¸P,¸}¸_ ºº_úµ¶T¶Ž¶P޶”¶^:¸Q¸PQ¸}¸^ ºº^àµîµ0ŸîµE¶S¶œ¶Sö¶·SÍ·ã·0Ÿã·ü·Sü·¸0Ÿ¸,¸P,¸}¸S ººSàµ!¶0Ÿ¶Ž¶P޶”¶^Í·:¸0Ÿ:¸Q¸PQ¸}¸^ ºº^ º8ºU8º×º^׺o»óUŸo»»^»’»óUŸ’»›»^›» »óUŸ »»»^»»À»óUŸÀ»Í»^ ºnº0ŸnººPº »\2»o»\o»‚»0Ÿ‚» »\ »Í»0Ÿ º×º0Ÿ×ºÛºPÛº »^2»o»^o»Í»0Ÿ º†º0Ÿ†ººPº »_2»o»_o»‚»0Ÿ‚» »_ »Í»0Ÿ º—º0Ÿ—º¨ºP¨º »S2»o»So»‚»0Ÿ’» »S »Í»0ŸtººPº »\2»o»\‚» »\?ºSºTSºTº ˜+&o»}»T}»‚» ˜+&À»Ä»T8ºTºUo»‚»UÀ»Ä»UCºTºQo»‚»QÀ»Ä»Q¯ºÉºPɺӺYÓºêº]V»o»]’» »Pл¼U¼Ú¼óUŸí»¼_€¼¹¼_»¼Õ¼_ñ»}¼^€¼·¼^»¼Ó¼^õ»{¼]€¼µ¼]»¼Ñ¼]¼<¼P<¼v¼S€¼¼S¼”¼P”¼°¼S°¼º¼U»¼Ì¼Sл ¼òBÅл ¼ò9Åл ¼ò0Åé» ¼P¼^¼]€¼™¼]¼^¼^€¼™¼^¼^¼_€¼™¼_¼<¼U¼–¼U!¼^¼\€¼™¼\%¼^¼V€¼™¼V¼<¼Q¼–¼Qà¼/½U/½W½óUŸW½Í½Sͽ¾óUŸ¾¾U¾q¾óUŸq¾«¾S«¾ã¾óUŸà¼/½T/½W½óTŸW½n½Tn½á½‘Há½¾óTŸ¾ ¾T ¾5¾‘H5¾q¾óTŸq¾Ñ¾‘HѾã¾óTŸ½/½T/½L½óTŸ¾ ¾T ¾.¾‘H5¾q¾óTŸ½/½U/½L½óUŸ¾¾U¾.¾óUŸ5¾q¾óUŸ½8½S¾.¾S8½<½P<½L½S5¾k¾S½L½\¾.¾\5¾n¾\j½á½‘Há½¾óTŸq¾Ñ¾‘HѾã¾óTŸj½Í½Sͽ¾óUŸq¾«¾S«¾ã¾óUŸu½Œ½PŒ½¾\q¾ã¾\ˆ½á½0Ÿq¾ã¾0Ÿˆ½Œ½PŒ½á½\q¾ã¾\ˆ½Í½Sͽá½óUŸq¾«¾S«¾ã¾óUŸÍ½Ñ½Pѽá½S«¾ã¾S“½á½]q¾ã¾]ð¾&¿U&¿Œ¿óUŸŒ¿ž¿Už¿«¿óUŸ«¿¹¿U¹¿]ÁóUŸð¾&¿U&¿R¿óUŸŒ¿ž¿Už¿«¿óUŸ«¿¹¿UÙ¿ÀóUŸÀLÀóUŸ¿&¿PŒ¿ž¿Pð¾"¿0Ÿ"¿1¿ š|Ÿ1¿R¿QŒ¿š¿0Ÿš¿«¿ ž|Ÿ«¿¹¿0ŸÙ¿þ¿Qð¾1¿0Ÿ1¿>¿P>¿R¿VŒ¿©¿0Ÿ©¿«¿P«¿¹¿0ŸÙ¿ÀS:ÀLÀSR¿v¿SLÀ]ÁSR¿Œ¿ ÿŸ¹¿Ù¿ ÿŸLÀ]Á ÿŸR¿Œ¿0Ÿ¹¿Ù¿0ŸLÀ]Á0Ÿh¿v¿Q[ÀžÀsŸÀÀFÁsŸÀžÀQÐÀØÀsØÀåÀs”ŸåÀêÀPýÀ ÁQÁ5ÁP5ÁFÁV'ÁFÁ0Ÿ`ÁÁUÁƒÁóUŸƒÁ¢ÁU¢Á¿ÁóUŸ¿Á,ÂU,ÂXÂóUŸXÂeÂUeÂfÂóUŸwÁÁQƒÁ¢ÁuŸËÁ,ÂuŸ,ÂXÂóU#Ÿ˜Á¢ÁQûÁþÁpŸþÁÿÁPÿÁÂuÂ!ÂQ3ÂJÂPJÂWÂS<ÂXÂ0ŸpÂÑÂUÑÂâÃóUŸâÃíÃUíÃñÄóUŸñÄöÄUöÄ ÅóUŸ—ÂGÃSGÃbÃ0ŸbÃ8ÄS8Ä‚Ä0Ÿ‚ÄÍÄSÍÄñÄ0ŸñÄ ÅS ÂGÃSGÃbÃ0ŸbÃ8ÄS8Ä‚Ä0Ÿ‚ÄÍÄSÍÄñÄ0ŸñÄ ÅSÄNÄ‘PNÄTÄQÜÄæÄQÄNÄ‘HÄNÄ‘¸'ÄTÄUÜÄæÄU4Ä‚ÄVÍÄìÄV8Ä‚ÄSÍÄìÄS#ÄTÄPÜÄäÄPÅbÅUbÅoÅóUŸoňÅUˆÅ†ÆóUŸ†Æ—ÆU—ÆQÇóUŸQÇcÇUcÇ…ÈóUŸ…ȉÈU‰ÈáÈóUŸÅbÅTbÅoÅóTŸoÅøÅSøÅ†ÆóTŸ†Æ ÆS Æ½ÆóTŸ½ÆÇSÇQÇóTŸQÇ~ÇS~ÇÜÇóTŸÜÇÈSÈÈ|È…ÈóTŸ…È’ÈS’ȦÈóTŸ¦È²È|²ÈáÈóTŸ,Å`ÅT†Æ˜ÆS,Å`ÅU†Æ—ÆU—ƘÆóUŸ,ÅbÅU†Æ—ÆU—Æ ÆóUŸ4Å\ÅP\Å`ÅpŸ†Æ—ÆPoÅøÅSøÅ†ÆóTŸ Æ½ÆóTŸ½ÆÇSÇQÇóTŸQÇ~ÇS~ÇÜÇóTŸÜÇÈSÈÈ|È…ÈóTŸ…È’ÈS’ȦÈóTŸ¦È²È|²ÈáÈóTŸoňÅUˆÅ†ÆóUŸ ÆQÇóUŸQÇcÇUcÇ…ÈóUŸ…ȉÈU‰ÈáÈóUŸ~ÅøÅSøÅQÆóTŸ Æ½ÆóTŸ½ÆÇSÇGÇóTŸQÇ~ÇS~ÇÜÇóTŸÜÇÈSÈÈ|È…ÈóTŸ…È’ÈS’ȦÈóTŸ¦È²È|²ÈáÈóTŸ~ňÅTQÇbÇTbÇcÇ ˜,&…ȉÈT~ňÅUˆÅQÆóUŸ ÆGÇóUŸQÇcÇUcÇ…ÈóUŸ…ȉÈU‰ÈáÈóUŸíÅQÆ0Ÿ Æ½Æ0Ÿ€ÇÜÇ0Ÿ~ÅCÆ0Ÿ½Æ-Ç0Ÿ-ÇGÇSQÇáÈ0Ÿ~ňÅUˆÅŒÅóUŸQÇcÇUcÇlÇóUŸ…ȉÈU‰È’ÈóUŸ~ňÅPQÇUÇPUÇcÇu…ȉÈuªÅÆ^½ÆÏÆ^€Ç•Ç^ÇÅíÅPíÅQÆ\ Æ½Æ\½ÆÄÆPÄÆÏÆ\€ÇÜÇ\¼ÅQÆ] ÆÏÆ]€ÇÜÇ]íÅCÆ0Ÿ€ÇÜÇ0ŸíÅCÆ\€ÇÜÇ\íÅCÆ]€ÇÜÇ]0Æ3ÆP3ÆCÆV°ÇÜÇVøÅ@ÆS€ÇÇS•Ç«ÇS°Ç»ÇSÏÆÇSÇ-ÇóTŸlÇ|ÇSÜÇÈSÈÈ|È…ÈóTŸ’ȦÈóTŸ¦È²È|²ÈáÈóTŸÏÆ-ÇVlÇ|ÇVÜÇ…ÈV’ÈáÈVëÆÇSÇ-ÇóTŸlÇ|ÇS\È…ÈóTŸëÆ-ÇVlÇ|ÇV\È…ÈVúÆ-Ç]lÇ|Ç]\È…È]Ç ÇP Ç-ÇS\È…ÈSöÆ-Ç\lÇ|Ç\\È…È\ÜÇÈSÈÈ|È\ÈóTŸ’ȦÈóTŸ¦È²È|²ÈáÈóTŸÜÇ\ÈV’ÈáÈVìÇúÇPúÇ\È\’ÈáÈ\öÇAÈ0Ÿ’ÈáÈ0ŸöÇúÇPúÇAÈ\’ÈáÈ\öÇAÈV’ÈáÈV5È8ÈP8ÈAÈS¸ÈáÈSÈ5ÈS’ȤÈS¦È¶ÈSðÈ&ÉQ&ÉïÉ_ ÊàË_ÌZÌ_ÍÆÍ_QÎsÎ_}ΨÎ_¨ÎÖÎQÖÎéÎóQŸéÎÏ_BÏ]Ï_iÏŽÏ_µÏÐ_#ÐÀÐ_ÊÐÛÐ_èÐ@Ñ_QÑ¢Ñ_ÁÑ/Ò_>ÒˆÒ_—ÒÔ_Ô#Ô_OÔUÔ_aÔgÔ_sÔ Ô_µÔ|Õ_‰ÕœÕ_ªÕºÕ_ËÕÞÕ_îÕÖ_*ÖâÖ_ðÖ×_×.×_A׎×_¡×¬×_½×Û×_ð×£Ø_³ØÁØ_ÔØÿØ_ÙÛÙ_ðÙ³Ú_ÄÚzÛ_ÛRÜ_cÜÝ_.ÝñÝ_Þ¸Þ_ÍÞß_¡ßWà_là8á_Iáâ_âéâ_úâ°ã_Åãmä_€ä‹ä_™ä¤ä_²ä½ä_Íäàä_îäþä_åå_0åCå_Såfå_tå„å_•å£å_¶åÉå_Ùåìå_úå æ_æ)æ_<æOæ__æræ_€ææ_¡æ¯æ_ÂæÕæ_åæøæ_çç_'ç5ç_Hç[ç_kç~ç_Œçœç_­ç»ç_Îçáç_ñçè_è"è_ðÈFÉRFɨΑ°¨ÎÖÎRÖÎ3è‘°ðÈFÉXFÉéÉ‘ˆéÉ ÊóXŸ ÊðË‘ˆðËÌóXŸÌbÌ‘ˆbÌÍóXŸÍÐÍ‘ˆÐÍQÎóXŸQΨΑˆ¨ÎÖÎXÖÎ Ï‘ˆ ÏBÏóXŸBψÏ‘ˆˆÏµÏóXŸµÏéÏ‘ˆéÏ#ÐóXŸ#ЋÐ‘ˆ‹ÐÊÐóXŸÊÐ Ñ‘ˆ ÑÑóXŸÑÒ‘ˆÒ>ÒóXŸ>ÒnÒ‘ˆnÒ—ÒóXŸ—Ò¯Ò‘ˆ¯ÒËÒóXŸËÒãÒ‘ˆãÒÓóXŸÓ÷Ó‘ˆ÷Ó5ÔóXŸ5Ô3葈ðÈFÉ0ŸFÉnÉYÊ ÊYnÊåË‘ åËÌ^ÌbÌ‘ bÌÌ^¦ÌÍ^Í/Í‘ /Í@ÍY@ÍPÍ‘ tÍÐÍ‘ ÐÍQÎ^QΨΑ ¨ÎéÎ0ŸÊÐèБ ÑJÑ‘ JÑQÑ^QÑÁÑ‘ ÁÑçÑYçÑ—Ò‘ ËÒèÒYèÒÓ‘˜ÓJÔ‘ JÔOÔ^OÔ3è‘ ðÈ Í1ŸÍ3è1ŸðÈFÉ0ŸFÉÊ\ÊÊ‘˜Ê:ËS:ËåË‘¨åËÌSÌbÌ‘¨bÌÌS¦ÌÍSÍ/Í‘¨/ÍPÍ\PÍQÎSQÎ}Α¨}ΨÎS¨ÎéÎ0ŸéÎ7Ï\7ÏBÏ‘˜BÏQÏ\QÏiÏ[iÏQÑSQѨÑ‘¨ÁÑÖÑ\ÖÑçÑ[çÑËÒSËÒèÒ[èÒÓ\ÓÓ‘ÓÓ‘¨÷Ó5ÔS5ÔJÔ‘¨JÔsÔSðÈFÉ0ŸFÉ_ÉU_ÉÌ]¦ÌÍ]ͨÎ]¨ÎéÎ0ŸéÎÁÑ]ÁÑçÑUçÑËÒ]ËÒæÒUæÒÓ‘ˆÓ3è]ðÈFÉ0ŸFÉnÉZÊ ÊZ}ÊÌ\¦ÌÍ\Í/Í\/Í@ÍZ@ÍPÍ‘¨t͇Í\¤Í¨Î\¨ÎéÎ0ŸÊÐèÐ\Ñ·Ñ\·ÑçÑZçÑ—Ò\ËÒèÒZèÒÓ‘ Ó3è\ðÈFÉ0ŸFÉÌw¦ÌÍwÍÍ‘€ͨÎw¨ÎéÎ0ŸéΨÑwÁÑ%Ów%Ó1ÓP1Ó÷Ó‘¨÷ÓsÔwsÔoÕ‘¨oÕ‰Õw‰Õ3葨¦ÌÍ_ÍÍPÐÍÎ_ðÈ!É0Ÿ!ÉFÉTÊ ÊVåËÌVbÌÌVÎQÎV¨ÎéÎ0ŸJÑQÑVJÔOÔV!ÉFÉ0ŸFÉ_É‘˜_ÉßÉ‘˜#Ÿ ÊðË‘˜#ŸÌbÌ‘˜#ŸÍ/Í‘˜#Ÿ/Í4ÍpŸ4ÍÐÍ‘˜#ŸQΨΑ˜#ŸéÎÏ‘˜#ŸBϱÑ‘˜#ŸÁÑçÑPçÑËÒ‘˜#ŸËÒÏÒPÏÒÙÒ‘˜Ó3葘#ŸðÈZÉ0ŸZÉnÉ]nÉ›É0Ÿ›É¶ÉP¶ÉÊSÊ ÊX Ê0ÊS0Ê\Ê0Ÿ\ÊnÊPnÊ}Ê‘ }Ê»Ê0Ÿ»ÊÐÊPÐÊîÊ^îÊ4Ë0Ÿ4ËFËPFË^ËV^ËÀË0ŸÀËåËPåËÌXÌÌ‘Ì/ÌV/ÌbÌ0ŸbÌoÌXÍ/Í0Ÿ/ÍPÍ]PÍtÍSt͇Í0Ÿ‡Í¤Í‘ ¤Í²Í0Ÿ²ÍÐÍPQÎmÎVmÎ}ÎX}΄ÎP„ΨÎ^¨ÎBÏ0ŸBÏiÏPiÏ#Ð0Ÿ#Ð=ÐP=ÐÊБ ÊÐÑ0ŸÑEÑ^EÑQÑXQÑÒ0ŸÒÒPÒ>Ò‘ˆ>Ò`Ò0Ÿ`ÒrÒPrÒ—Ò‘ˆ—ÒžÒPžÒËÒ‘ ËÒŠÓ0ŸŠÓžÓPžÓÙÓ^ÙÓ÷Ó0Ÿ÷Ó5Ô‘ˆ5ÔOÔ0ŸOÔsÔPsÔ‚Ô0Ÿ‚Ô¥Ô^¥ÔµÔXµÔÅÔ0ŸÅÔÜÔPÜÔóÔ^óÔKÕ0ŸKÕ`Õ^`ÕdÕPdÕoÕ^oÕ‰Õ0Ÿ‰Õ‘ÕP‘Õ–Õ^–ÕªÕXªÕËÕ0ŸËÕÓÕPÓÕØÕ^ØÕîÕXîÕ\Ö0Ÿ\ÖlÖPlÖ§Ö^§Ö¸Ö0Ÿ¸ÖÏÖ^ÏÖ×ÖP×ÖÜÖ^ÜÖðÖXðÖ×0Ÿ××P×3×^3×A×XA×½×0Ÿ½×à×^à×ð×Xðר0ŸØØPØ<Ø^<ØØ0ŸØ˜ØP˜ØØ^سØX³ØÆØ^ÆØÔØXÔØÙ0ŸÙ%Ù^%ÙWÙ0ŸWÙkÙPkÙ´Ù^´ÙÁÙ0ŸÁÙàÙ^àÙðÙXðÙÚ0ŸÚÚPÚ<Ú^<ÚöÚ0ŸöÚ ÛP ÛSÛ^SÛ`Û0Ÿ`ÛÛ^ÛÛXÛŸÛ0ŸŸÛ¶ÛP¶ÛÛÛ^ÛÛ•Ü0Ÿ•Ü©ÜP©ÜòÜ^òÜÿÜ0ŸÿÜÝ^Ý.ÝX.Ý>Ý0Ÿ>ÝUÝPUÝzÝ^zÝ4Þ0Ÿ4ÞHÞPHÞ‘Þ^‘ÞžÞ0ŸžÞ½Þ^½ÞÍÞXÍÞÝÞ0ŸÝÞôÞPôÞß^ßÓß0ŸÓßçßPçß0à^0à=à0Ÿ=à\à^\àlàXlà|à0Ÿ|à“àP“à¸à^¸à{á0Ÿ{ááPáØá^Øáîá0Ÿîá â^ ââXâ-â0Ÿ-âDâPDâiâ^iâ,ã0Ÿ,ã@ãP@ã‰ã^‰ã–ã0Ÿ–ãµã^µãÅãXÅãáã0ŸáãôãPôãäwä$ä0Ÿ$ä8äP8ä=äX=äBäw€ä…äP…ä™äX™ä­äw²ä·äP·äÍäXÍäÕäPÕäÚä^ÚäîäXîäå0Ÿå"å^"å0åX0å8åP8å=å^=åSåXSå[åP[å`å^`åtåXtå•å0Ÿ•å¨å^¨å¶åX¶å¾åP¾åÃå^ÃåÙåXÙåáåPáåæå^æåúåXúåæ0Ÿæ.æ^.æ<æX<æDæPDæIæ^Iæ_æX_ægæPgælæ^læ€æX€æ¡æ0Ÿ¡æ´æ^´æÂæXÂæÊæPÊæÏæ^ÏæåæXåæíæPíæòæ^òæçXç'ç0Ÿ'ç:ç^:çHçXHçPçPPçUç^UçkçXkçsçPsçxç^xçŒçXŒç­ç0Ÿ­çÀç^ÀçÎçXÎçÖçPÖçÛç^ÛçñçXñçùçPùçþç^þçèXè3è0ŸðÈ\Ê0Ÿ\ÊŒÊ\ŒÊŸÊ0ŸŸÊ´ÊP´ÊÐÊ‘¨ÐÊMË0ŸMË^ËP^Ë™ËS™ËåË0ŸåËÌRÌÌ‘ˆÌ$ÌP$ÌOÌSOÌoÌRÍ/ÍS/ÍtÍ0ŸtͲÍ\²ÍÐÍ‘¨QÎ}ÎP}ÎΑ¨Î#Ð0Ÿ#зÐ\·ÐÊÐRÊÐèÐPèЗÒ0Ÿ—ÒËÒ\ËÒÓ0ŸÓ1ÓP1ÓFÓ‘¨FÓhÓ0ŸhÓƒÓPƒÓžÓwžÓsÔ0ŸsÔ‚Ô‘¨‚ÔãÔ0ŸãÔóÔP9Õ`Õ0Ÿ`ÕoÕwoÕ‰ÕP‰Õ¥ÕwªÕ¯ÕP¯ÕËÕRËÕîÕ0Ÿ*Ö:Ö0Ÿ:ÖUÖPUÖlÖwlÖ¸Ö0Ÿ¸ÖÀÖPÀÖÅÖRÅÖëÖwðÖõÖPõÖ×R× ×w ×%×P%×A×RA×a×0Ÿa×n×Pnל×w¡×¦×P¦×½×R½×Ø0ŸØ2ØP2Ø7ØR7Ø<Øw~سØ0Ÿ³Ø¸ØP¸ØÔØRÙ5Ù0Ÿ5ÙPÙPPÙqÙwqÙÚ0ŸÚ2ÚP2Ú7ÚR7Ú<Úw~ÚŒÚ0ŸÄÚÔÚ0ŸÔÚïÚPïÚÛwÛ½Û0Ÿ½ÛÑÛPÑÛÖÛRÖÛÛÛwÜ+Ü0ŸcÜsÜ0ŸsÜŽÜPŽÜ¯Üw¯Ü\Ý0Ÿ\ÝpÝPpÝuÝRuÝzÝw¼ÝÊÝ0ŸÞÞ0ŸÞ-ÞP-ÞNÞwNÞûÞ0ŸûÞßPßßRßßw[ßiß0Ÿ¡ß±ß0Ÿ±ßÌßPÌßíßwíßšà0Ÿšà®àP®à³àR³à¸àwúàá0ŸIáYá0ŸYátáPtá•áw•áKâ0ŸKâ_âP_âdâRdâiâw«âÂâ0Ÿúâ ã0Ÿ ã%ãP%ãFãwFãûã0ŸûãäPä4äwBä€ä0Ÿ€ä”äw™äžäPžä²äR²äÍä0ŸÍäéäwîäóäPóäåRååPå0åR0åSå0ŸSåoåwtåyåPyå•åR•åšåPšå¶åR¶åÙå0ŸÙåõåwúåÿåPÿåæRæ æP æ<æR<æ_æ0Ÿ_æ{æw€æ…æP…æ¡æR¡æ¦æP¦æÂæRÂæåæ0Ÿåæçwç çP ç'çR'ç,çP,çHçRHçkç0Ÿkç‡çwŒç‘çP‘ç­çR­ç²çP²çÎçRÎçñç0Ÿñç èwèèPè3èRÛÊäÊQÑ(ÑQ(ÑQÑ‘¨îÊË‘°q $ &>,ÿŸË-Ë‘ #”<)ÿŸ†ËÀËV<ÌbÌPÍ/ÍVQÑlÑVxÑ›Ñt0)ÿŸçÑ÷Ñ‘°q $ &>,ÿŸ>ÒPÒ‘°q $ &>,ÿŸÓÓt0)ÿŸFÓÆÓ ‘°4,ÿŸÆÓÙÓP‚ÔŠÔ ‘°4,ÿŸŠÔ—ÔP ÕKÕ^KÕWÕPWÕ`Õw`ÕoÕ ‘°4,ÿŸ‰ÕœÕ ‘°4,ÿŸªÕºÕ ‘°4,ÿŸÿÕÖPÖÖ^*Ö\Ö^”Ö§ÖPðÖúÖ^A×Ž× ‘°4,ÿŸ¡×¬× ‘°4,ÿŸÅ×Ò×PeØØ^åØôØPôØùØ^ÙÙPÙ%Ùw%ÙWÙ^•Ù°ÙP°Ù´ÙwÉÙÒÙPeÚŒÚ^Ú¨ÚP¨Ú­Ú^ÄÚöÚ^4ÛOÛPOÛSÛwhÛqÛPÜ+Ü^<ÜGÜPGÜLÜ^cÜ•Ü^ÓÜîÜPîÜòÜwÝÝP£ÝÊÝ^ÛÝæÝPæÝëÝ^Þ4Þ^rÞÞPÞ‘Þw¦Þ¯ÞPBßiß^zß…ßP…ߊß^¡ßÓß^à,àP,à0àwEàNàPáàá^"á-áP-á2á^Iá{á^¹áÔáPÔáØáwöáÿáP’âÂâ^ÓâÞâPÞâãâ^úâ,ã^jã…ãP…ã‰ãwžã§ãPîäøä^tå~å^úåæ^€æŠæ^çç^Œç–ç^èè^ËË‘ #”>)ÿŸË-Ë‘ #”<)ÿŸ>ÒYÒ p”>)ÿŸ¬ËÆË0ŸlÑÁÑ0ŸÓ÷Ó0Ÿ5ÔOÔ0ŸsÔ3è0Ÿ¢Ñ¨ÑP5ÔOÔPðÈÊ0ŸÊ ÊQ ÊåË0ŸåËÌQÌÌ‘˜ÌbÌ0ŸbÌoÌQÍÐÍ0ŸQÎ×Î0Ÿ×ÎéÎ ŸéÎÏ0ŸÏBÏ ŸBÏ–Ï0Ÿ–ϵÏ ŸµÏJÑ0ŸJÑQÑQQÑJÔ0ŸJÔOÔ QŸOÔ3è0ŸðÈÊ0ŸÊ Ê Û|Ÿ ÊàË0ŸàËÌ Û|ŸÌbÌ0ŸbÌ¦Ì Û|ŸÍÐÍ0ŸÎQÎ Û|ŸQÎ×Î0Ÿ×ÎéÎ Û|ŸéÎÏ0ŸÏBÏ Û|ŸBÏ–Ï0Ÿ–ÏµÏ Û|ŸµÏJÑ0ŸJÑQÑ Û|ŸQÑJÔ0ŸJÔOÔ Û|ŸOÔ3è0ŸðÈÊ0ŸÊ Ê_ ÊàË0ŸàËÌ_ÌbÌ0ŸbÌÌ_ÍÐÍ0ŸÎQÎ_QÎ×Î0Ÿ×ÎéÎ 7ŸéÎÏ0ŸÏBÏ ¦7ŸBÏ–Ï0Ÿ–ϵÏ Í7ŸµÏJÑ0ŸJÑQÑ_QÑJÔ0ŸJÔOÔ :ŸOÔ3è0Ÿ_ÉnÉU/Í@ÍUFãjã^–ãžã^ZãjãP–ããPÓÓ‘ #Ó÷Ó ÿŸsÔ3è ÿŸÓ÷Ó0ŸsÔ3è0Ÿ%ÓÓwsÔ|ÔT|Ô‚ÔwªÕÆÕwA×j×w¡×¸×wXÓhÓ1ŸXÓ÷Ó ÿŸ‚ÔoÕ ÿŸ‰ÕA× ÿŸ½×3è ÿŸXÓ÷Ó0Ÿ‚ÔoÕ0Ÿ‰ÕA×0Ÿ½×3è0ŸžÓÆÓ^‚ÔŠÔ^¨ÓÆÓpÿŸ‚Ô‰ÔpÿŸµÔÅÔ2ŸµÔKÕ ÿŸËÕA× ÿŸ½×3è ÿŸµÔKÕ0ŸËÕA×0Ÿ½×3è0ŸóÔ ÕRîÕùÕRùÕÿÕwÕ ÕPîÕùÕP*Ö:Ö3Ÿ*Ö¸Ö ÿŸÏÖ × ÿŸ½×3è ÿŸ*Ö¸Ö0ŸÏÖ ×0Ÿ½×3è0ŸlÖ”Ö^½×Å×^€Ö”ÖP½×Ä×Pðר4Ÿð×Ù ÿŸ%Ù3è ÿŸð×Ù0Ÿ%Ù3è0Ÿ<ØeØRÔØßØRߨåØwPØeØPÔØßØP%Ù5Ù5ŸqÙ•Ù^ÁÙÉÙ^…Ù•ÙPÁÙÈÙPðÙÚ6ŸðÙñç ÿŸðÙñç0Ÿ<ÚeÚRŒÚ—ÚR—ÚÚwPÚeÚPŒÚ—ÚPÄÚÔÚ7ŸÄÚ­ç ÿŸÄÚ­ç0ŸÛ4Û^`ÛhÛ^$Û4ÛP`ÛgÛPÛŸÛ8ŸÛkç ÿŸÛkç0ŸÛÛÜR+Ü6ÜR6Ü<ÜwïÛÜP+Ü6ÜPcÜsÜ9ŸcÜ'ç ÿŸcÜ'ç0Ÿ¯ÜÓÜ^ÿÜÝ^ÃÜÓÜPÿÜÝP.Ý>Ý:Ÿ.Ýåæ ÿŸ.Ýåæ0ŸzÝ£ÝRÊÝÕÝRÕÝÛÝwŽÝ£ÝPÊÝÕÝPÞÞ;ŸÞ¡æ ÿŸÞ¡æ0ŸNÞrÞ^žÞ¦Þ^bÞrÞPžÞ¥ÞPÍÞÝÞ<ŸÍÞ_æ ÿŸÍÞ_æ0ŸßBßRißtßRtßzßw-ßBßPißtßP¡ß±ß=Ÿ¡ßæ ÿŸ¡ßæ0Ÿíßà^=àEà^ààP=àDàPlà|à>ŸlàÙå ÿŸlàÙå0Ÿ¸àáàRááRá"áwÌàáàPááPIáYá?ŸIá•å ÿŸIá•å0Ÿ•á¹á^îáöá^©á¹áPîáõáPâ-â@ŸâSå ÿŸâSå0Ÿiâ’âRÂâÍâRÍâÓâw}â’âPÂâÍâPúâ ãAŸúâå ÿŸúâå0Ÿ ÊSÊ\PÍtÍ\iÏ­Ï\µÏÄÏ\èÐÑ\=Ê:ËS:ËðË‘¨ÌbÌ‘¨Í/Í‘¨tÍÐÍSQÎ}Α¨}ΨÎSµÏQÑSQѨÑ‘¨çÑËÒSÓÓ‘¨÷Ó5ÔS5ÔOÔ‘¨OÔsÔSAÊnÊQµÏýÏQ#Ð[ÐQèÐÑQÑÑs—Ò»ÒQéÏýÏQ ÑÑ2ŸnÊ‚ÊY‡ÍžÍY}ÊŒÊZtÍÍZ¤Í²ÍZŒÊ˜Ê‘ˆŒÊðË ÿŸÌbÌ ÿŸÍ/Í ÿŸ²ÍÐÍ ÿŸQΨÎ ÿŸÊÐèÐ ÿŸÑÁÑ ÿŸçÑ—Ò ÿŸÓ3è ÿŸŒÊðË0ŸÌbÌ0ŸÍ/Í0Ÿ²ÍÐÍ0ŸQΨÎ0ŸÊÐèÐ0ŸÑÁÑ0ŸçÑ—Ò0ŸÓ3è0Ÿ&Ë)ËU)Ë-Ëp²ËµËUµË¹Ë~&ËðË ÿŸÌbÌ ÿŸÍ/Í ÿŸQÎ}Î ÿŸQÑÁÑ ÿŸÓ÷Ó ÿŸ5ÔOÔ ÿŸsÔ3è ÿŸ&ËðË0ŸÌbÌ0ŸÍ/Í0ŸQÎ}Î0ŸQÑÁÑ0ŸÓ÷Ó0Ÿ5ÔOÔ0ŸsÔ3è0Ÿ^ˆËS/Ì<ÌShˆËpÿŸ/Ì7ÌpÿŸ/ÐÊБ —ÒËÒ‘ /ÐvÐ^vГÐQ—Ò´Ò^´Ò»Ò (-&´Ò¼Ò0Ÿ@èYèUYè éV éÕéóUŸÕé4êV4êÚêóUŸÚê\ëV\ëÐëóUŸÐë ìV ì¬íóUŸ¬íÐíVÐíìíóUŸìíîVî•îóUŸ•îÀîVÀîïóUŸïïVïBïóUŸBïXïVXïÂïóUŸÂïÒïVÒï±ðóUŸ@èŒèTŒè éS éÕéóTŸÕéÏêSÏêÚêóTŸÚêEðSEðJðóTŸJððSð”ðóTŸ”ð±ðS@èŒèQŒè’è\’è¨èQ¨èÝè\ÝèÕéóQŸÕéê\ê±ðóQŸ±èÝè\Ýè²éóQŸÿéê\êEðóQŸJð±ðóQŸ±è éS é²éóTŸÿéÏêSÏêÚêóTŸÚêEðSJððSð”ðóTŸ”ð±ðS±è éV é²éóUŸÿé4êV4êÚêóUŸÚê\ëV\ëÐëóUŸÐë ìV ì¬íóUŸ¬íÐíVÐíìíóUŸìíîVî•îóUŸ•îÀîVÀîïóUŸïïVïBïóUŸBïXïVXïÂïóUŸÂïÒïVÒïEðóUŸJð±ðóUŸ±èÝè\Ýè²éóQŸÿéê\êEðóQŸJð±ðóQŸ±è éS é²éóTŸÿéÏêSÏêÚêóTŸÚêEðSJððSð”ðóTŸ”ð±ðS±è éV é²éóUŸÿé4êV4êÚêóUŸÚê\ëV\ëÐëóUŸÐë ìV ì¬íóUŸ¬íÐíVÐíìíóUŸìíîVî•îóUŸ•îÀîVÀîïóUŸïïVïBïóUŸBïXïVXïÂïóUŸÂïÒïVÒïEðóUŸJð±ðóUŸÌè²é0ŸÿéEð0ŸJð±ð0ŸÌèÓèvÌè²é1ŸÿéEð1ŸJð±ð1Ÿ÷ê#ë|èë™ìRìí&î|ÂïËï|$é‘é0Ÿ‘éžéPÚê#ë0ŸÐëÛëPèëïë0ŸïëùëPùëì 5 &Ÿì ì  &Ÿ ìì  &Ÿìì  &Ÿì&ì + &Ÿ&ì/ì / &Ÿ/ì8ì - &Ÿ8ìAì 3 &ŸAìJì0ŸJìSì  &ŸSì\ì 7 &Ÿ\ìeì ! &Ÿeìnì 9 &Ÿnìzì ' &Ÿzì†ì ; &Ÿ†ìŒí0Ÿ¬íÐí0Ÿìí§î0ŸïïPÂïEð0ŸJð±ð0Ÿ±è-é0Ÿ-é²é\ÿéŒê0ŸÇê#ë\#ë¹ë0ŸÐëŒí\Œí¬í0Ÿ¬íÐí\Ðíìí0Ÿìí§î\§îï0Ÿïï\ïÂï0ŸÂïEð\Jð±ð\-é>é |80.ÿŸÚêíê |80.ÿŸ”é é0Ÿ é²éS£êÚê ÿŸ¹ëÐë ÿŸÐëèë0Ÿôëùë0Ÿïï0Ÿ}ð”ð ÿŸÌè-é0Ÿ-é>é |80)ÿŸÿé4ê vÀ” ÿŸ4êAê óU#@” ÿŸ÷êë1Ÿ#ë\ëvÀ”2 $0)ÿŸ\ëiëóU#@”2 $0)ÿŸ§î¹î vÀ” ÿŸBïQïvÀ”2 $0)ÿŸÌèÙè| 8 $0)ÿŸÙèÝè| X $0)ÿŸÝèçèóQ X $0)ÿŸ-é>é |80)ÿŸÿé4ê vÀ” ÿŸ4êAê óU#@” ÿŸÚêíê |80)ÿŸ÷êë |”>)ÿŸë#ë |”<)ÿŸ#ë\ëvÀ”2 $0)ÿŸ\ëiëóU#@”2 $0)ÿŸèëôë |”<)ÿŸùë™ì |”<)ÿŸìí&î |”>)ÿŸ§î¹î vÀ” ÿŸBïQïvÀ”2 $0)ÿŸÂïËï |”>)ÿŸ±è(é0Ÿ(é-é\-é é0Ÿÿélê0ŸÚê”ë0ŸÐë ì0Ÿ ì´ìP´ìÌìVÌìÜì0ŸÜìòìPòì íV íŒí0Ÿ¬íÐí0ŸìíQî0Ÿ•îÀî0ŸâîXï0ŸrïÒï0Ÿçï'ð0Ÿ'ðEðVJðYðPYð±ðV±è é0ŸÿéŒê0ŸÚê¹ë0ŸÐë»ì0Ÿ»ìÌìPÌìéì]éìùì0Ÿùì íP íŒí]Œí'ð0Ÿ'ð+ðP+ð6ð]6ð:ðP:ðEð]JðYð0ŸYð^ðP^ðªð0Ÿªð±ðPˆé”éP•î§îP±è é0ŸÿéŒê0ŸÚê¹ë0ŸÐëNí0ŸNíŒí ŸŒíEð0ŸJð^ð0Ÿ^ðªð Ÿªð±ð0Ÿ±è é0ŸÿéŒê0ŸÚê¹ë0ŸÐëNí0ŸNíŒí Û|ŸŒíEð0ŸJð^ð0Ÿ^ðªð Û|Ÿªð±ð0Ÿ±è é0ŸÿéŒê0ŸÚê¹ë0ŸÐëNí0ŸNíŒí „5ŸŒíEð0ŸJð^ð0Ÿ^ðeðT”ð¤ðT¤ðªðwªð±ð0Ÿêlê0Ÿ§îÀî0Ÿâîï0ŸïBï0ŸêPêT§î¹îTâî÷îT÷îïwêlê\§îÀî\âîï\ïBï\XêlêPï$ïP$êlê]§îÀî]âîï]ïBï]@ë”ë0ŸBïXï0ŸrïÂï0Ÿ@ëxëTBïQïTrï‡ïT‡ï–ïw9ë”ë\BïXï\rïÂï\€ë”ëP–ï¤ïPLë”ë]BïXï]rïÂï]’ì™ìR’ìŒí ÿŸ'ðEð ÿŸJð±ð ÿŸ’ìŒí0Ÿ'ðEð0ŸJð±ð0ŸþíQî0ŸÂïÒï0Ÿçï'ð0Ÿþí5îTÂïËïTçïöïTöïðw÷íQî]ÂïÒï]çï'ð]=îQîPð ðP îQî^ÂïÒï^çï'ð^ÀðîðUîð/òV/ò2òóUŸ2òóVÀðÿðTÿð ñU ñ2òóTŸ2òfòTfòóóTŸÀð ñQ ñ2òóQŸ2òfòQfòóóQŸÀð ñR ñò\ò2òóRŸ2òfòRfòó\óóóRŸÀð ñX ñòSò2òóXŸ2òfòXfò¿òS¿òÈòóXŸÈòóSóóóXŸñ§ñ '&Ÿ§ñ×ñPÚñàñPñàñSñ›ñW›ñàñU2òbòVò«òóTŸò«ò '&Ÿò«òóQŸò«ò\ò«ò0Ÿò«òSò«òV ó†óU†óõVõ?÷óUŸ?÷~÷U~÷ÎúóUŸÎú8ûV8ûüóUŸü4üV4ü üóUŸ üìüVìüòýóUŸòýûýVûýÞþóUŸÒôõ žõdõ‘à}dõkõ õ)‘à}ö)"ŸkõÍö‘¸}ö)‘à}ö)"Ÿ+÷?÷‘¸}ö)‘à}ö)"Ÿ~÷§÷‘¸}ö)‘à}ö)"Ÿœø¯ø‘¸}ö)‘à}ö)"Ÿ¼ø¼ù‘¸}ö)‘à}ö)"ŸÑùñù‘¸}ö)‘à}ö)"Ÿ úÎú‘¸}ö)‘à}ö)"Ÿ8ûü‘¸}ö)‘à}ö)"Ÿüü ž4ü ü‘¸}ö)‘à}ö)"Ÿìüòý‘¸}ö)‘à}ö)"Ÿòýûý žûýŠþ‘¸}ö)‘à}ö)"Ÿ›þÙþ‘¸}ö)‘à}ö)"Ÿdõkõakõëö‘¸}+÷?÷‘¸}~÷§÷‘¸}œø¯ø‘¸}¼ø¼ù‘¸}Ñùñù‘¸} úÎú‘¸}8ûü‘¸}4ü ü‘¸}ìüòý‘¸}ûýŠþ‘¸}›þÙþ‘¸}õ¸ö|wŸ¸öëö|nŸ+÷?÷|wŸ~÷§÷|wŸœø¯ø|wŸ¼ø¼ù|wŸÑùñù|wŸ úÎú|wŸ8ûü|wŸ4ü ü|wŸìüòý|wŸûýŠþ|wŸ›þÙþ|wŸù}ùw¯ù¼ùwbóÒô ‘Ð~Ÿ““ÈÒôÖô‘Ð~Ÿ““P““°Öô?÷‘Ð~Ÿ““‘À}““°?÷~÷ ‘Ð~Ÿ““È~÷§÷‘Ð~Ÿ““‘À}““°§÷œø ‘Ð~Ÿ““Èœø¯ø‘Ð~Ÿ““‘À}““°¯ø¼ø ‘Ð~Ÿ““ȼø¼ù‘Ð~Ÿ““‘À}““°¼ùÑù ‘Ð~Ÿ““ÈÑùñù‘Ð~Ÿ““‘À}““°ñù ú ‘Ð~Ÿ““È úÎú‘Ð~Ÿ““‘À}““°Îú8û ‘Ð~Ÿ““È8ûü‘Ð~Ÿ““‘À}““°ü4ü ‘Ð~Ÿ““È4ü ü‘Ð~Ÿ““‘À}““° üìü ‘Ð~Ÿ““ÈìüÙþ‘Ð~Ÿ““‘À}““°ÙþÞþ ‘Ð~Ÿ““ÈcøŒøaÙþÝþaàôõPõ?÷‘Ð}~÷§÷‘Ð}œø¯ø‘Ð}¼ø¼ù‘Ð}Ñùñù‘Ð} úÎú‘Ð}8ûü‘Ð}üüP4ü ü‘Ð}ìüòý‘Ð}òýûýPûýÙþ‘Ð}æôõ0Ÿõ¸ö|wŸ¸öÍö|nŸÍöëö|wŸ+÷?÷|wŸ~÷§÷|wŸœø¯ø|wŸ¼ø¼ù|wŸÑùñù|wŸ úÎú|wŸ8ûü|wŸ4ü ü|wŸìüòý|wŸòýûý0ŸûýŠþ|wŸ›þÙþ|wŸõ®öw+÷?÷w~÷÷w¼øùwù¯ùwÑùñùw|úšúwµúÎúw8ûüw4ü üwìüòýwûýŠþw›þÙþwõ-õ |z $ &Ÿ-õ=õT=õ¸ö |z $ &Ÿ¸öëö |q $ &Ÿ+÷?÷ |z $ &Ÿ~÷§÷ |z $ &Ÿœø¯ø |z $ &Ÿ¼ø¼ù |z $ &ŸÑùñù |z $ &Ÿ úÎú |z $ &Ÿ8ûü |z $ &Ÿ4ü ü |z $ &Ÿìüòý |z $ &ŸûýŠþ |z $ &Ÿ›þÙþ |z $ &Ÿõ*õ |} $ &Ÿ*õ9õQ9õ¸ö |} $ &Ÿ¸öëö |t $ &Ÿ+÷?÷ |} $ &Ÿ~÷§÷ |} $ &Ÿœø¯ø |} $ &Ÿ¼ø¼ù |} $ &ŸÑùñù |} $ &Ÿ úÎú |} $ &Ÿ8ûü |} $ &Ÿ4ü ü |} $ &Ÿìüòý |} $ &ŸûýŠþ |} $ &Ÿ›þÙþ |} $ &ŸGóFö0Ÿ\ököQžö~÷0Ÿ÷§÷Qœø©øQ¼øÎøQÎøÙø‘è}Ùøù0Ÿù1ùP1ùIù‘è}Iùù0Ÿ¯ù¼ù0ŸÑùñù0Ÿ úú0Ÿ|úáû0Ÿüsü0ŸŠü¡ý0ŸÙýÙþ0ŸGó|õ0Ÿ»õÌõ0ŸÌõÖõPÖõ\öS\ö+÷0Ÿ?÷§÷0Ÿœø¯ø0Ÿ¼ø¼ù0ŸÑùæù0Ÿ úú0Ÿ|úµúSÎú8û0Ÿ8ûŒûSŒû4ü0Ÿ4ü\üS\üý0ŸýòýSòýûý0ŸûýþS&þŠþSŠþ›þ0Ÿ›þÙþSGóŸõ0Ÿãõ\ö^\ökö]kö+÷0Ÿ?÷®÷0Ÿœø¯ø0Ÿ¼øÙø]Ùø8ù0Ÿ8ùPùPPù_ù^_ù¯ù0Ÿ¯ù¼ù^Ñùñù0Ÿ úú^|ú’ú0Ÿµú8û0ŸZûü]ü4ü0Ÿ4ü9ü^9üJü]Jü\ü^\ü ü] üìü0Ÿìüý]ý»ý^»ýòý]òýûý0Ÿûýþ^þ&þ0Ÿ&þŠþ^Šþ›þ0Ÿ›þÙþ^Gó®÷0Ÿœø¯ø0Ÿ¼ø¼ù0ŸÑùñù0Ÿ úú0Ÿ|ú’ú0ŸµúDû0ŸDûdûQnûrûQrûˆû‘è}ˆû9ü0ŸGüJüQ\üÙý0ŸÙýçýQçýòý‘è}òýÙþ0ŸGó®÷0Ÿœø¯ø0Ÿ¼ø¼ù0ŸÑùñù0Ÿ úú0Ÿ|úyû0ŸyûûPûü_ü9ü0ŸGü\ü0Ÿ\ü ü_ üìü0Ÿìüý_ýÙþ0Ÿ”ö®ö_’÷÷PÙøùø_ù¯ù_ùøù_¯ù¼ù_ùø}ùw†ù”ùP”ùùw¯ù¼ùwGó÷0Ÿ¼ø¼ù0ŸÑùñù0Ÿµú3û0Ÿ3û8û üŸ8ûGü0Ÿ\üþ0Ÿþƒþ0ŸŠþÙþ0ŸGó÷0Ÿ¼ø¼ù0ŸÑùñù0Ÿµú3û0Ÿ3û8û °‹Ÿ8ûGü0Ÿ\üþ0Ÿþƒþ0ŸŠþÙþ0ŸGó÷0Ÿ¼ø¼ù0ŸÑùñù0Ÿµú3û0Ÿ3û8û ›1Ÿ8ûGü0Ÿ\üþ0Ÿþƒþ0ŸŠþÙþ0ŸbóÇô '&Ÿ?÷~÷ '&ŸÎú3û '&Ÿü4ü '&Ÿ üìü '&ŸbóÇô0Ÿ?÷~÷0ŸÎú3û0Ÿü4ü0Ÿ üìü0Ÿbó»ó‘À~Ÿ»óHôQHôÇô‘À~Ÿ?÷~÷‘À~ŸÎú3û‘À~Ÿü4ü‘À~Ÿ üìü‘À~ŸbóÇô1Ÿ?÷~÷1ŸÎú3û1Ÿü4ü1Ÿ üìü1ŸbóÇôLŸ?÷~÷LŸÎú3ûLŸü4üLŸ üìüLŸbó†óU†óÇôV?÷~÷UÎú3ûVü4üV üìüVbó}ó‘Ø~Ÿ}ó†óT†óÇô‘Ø~Ÿ?÷~÷‘Ø~ŸÎú3û‘Ø~Ÿü4ü‘Ø~Ÿ üìü‘Ø~Ÿ óHô '&ŸHôwôPzô€ôP ó»ó‘À~Ÿ»óHôQHô€ô‘À~Ÿ ó³ó‘ð}Ÿ³ó€ôU?÷r÷‘Ø~Ÿëú3ûVëú3û '&Ÿëú3ûLŸëú3û1Ÿëú3û0Ÿëú3û‘À~Ÿëú3û‘Ø~Ÿdõ|õ_Ñùæù_rõ|õPÑùßùPßùæùS‡õ—õT—õ›õ ˆ+&µúÉúTÉúÎú ˆ+&þþT‡õŸõSµúÎúSþ&þS‡õ›õQµúÎúQþþQQûü]\ü ü]ìüý]Ùýòý]ãõFöS4ü9üSý¡ýSûýþS&þƒþS›þÙþSãõFö^4ü9ü^ý¡ý^ûýþ^&þƒþ^›þÙþ^þõFöSûýþS_þŠþSþõFö^ûýþ^_þŠþ^ öFö]ûýþ]_þŠþ]5ö9öP9öFöQ_þcþQ öFö_ûýþ__þŠþ_4ü9üSý±ýS&þ_þS›þÙþS4ü9ü^ý±ý^&þ_þ^›þÙþ^4ü9üP0ýBýPBý±ý_&þ_þ_›þÙþ_>ý—ý0Ÿ&þ:þ0Ÿ›þÙþ0Ÿ>ýBýPBý—ý_&þ:þ_›þÙþ_>ý—ý^&þ:þ^›þÙþ^ƒý‡ýP‡ý—ý]°þÙþ]Iýƒý]&þ:þ]›þ°þ]kö”öQ~÷Œ÷QŒ÷’÷‘è}uö”öpÿŸ~÷Œ÷pÿŸŒûáû0Ÿ\üsü0ŸŠü ü0Ÿìüý0ŸŒûûPûáû_\üsü_Šü ü_ìüý_Œûáû]\üsü]Šü ü]ìüý]ÐûÔûPÔûáûQìüðüQ—ûáûS\üsüSŠü üSìüýSëö÷‘Ø~Ÿ÷ ÷U ÷+÷‘Ø~ŸŠþ›þ‘Ø~Ÿ¿÷Sø^Œøœø^¯ø¼ø^¼ùÑù^ñù ú^Ã÷Sø]Œøœø]¯ø¼ø]¼ùÑù]ñù ú]Ç÷Sø\Œøœø\¯ø¼ø\¼ùÑù\ñù ú\ß÷ø‘Ø~ŸøøUøø‘Ø~Ÿñù ú‘Ø~Ÿ®÷ß÷òuý®÷ß÷òlý®÷ß÷òcý»÷ß÷PøSø\Œøœø\¯ø¼ø\¼ùÑù\øSø]Œøœø]¯ø¼ø]¼ùÑù]øSø^Œøœø^¯ø¼ø^¼ùÑù^ø2øU¯ø¶øU¼ùÄùpÈøSøVŒøœøV¯ø¼øV¼ùÑù0ŸøSøSŒøœøS¯ø¼øS¼ùÑù0Ÿ ø2øP¯ø´øP¼ùÑùPàþ&ÿU&ÿÝóUŸÝUAóUŸAYUYÄóUŸàþ/ÿT/ÿ¶S¶ÝóTŸÝASAVTVeóTŸeðSðóTŸoSo3óTŸ3SÄóTŸ ÿ¶0Ÿ¶ÝPÝ`0Ÿe0Ÿ]0Ÿb«0Ÿ«¯P°Ä0Ÿ ÿ/ÿ1ŸAe1Ÿb1Ÿ ÿ/ÿ0ŸAe0Ÿb0Ÿ ÿ/ÿ )}ŸAe )}Ÿb )}Ÿ ÿ/ÿVAeVbV ÿ/ÿTAVTVeóTŸbS0bS0bV0[ )}Ÿ/ÿ¶óUŸÝUAóUŸeóUŸb«óUŸ°ÄóUŸ/ÿ¶SùASeðSðóTŸboSo3óTŸ3S«óTŸ°ÄóTŸ/ÿ…0Ÿ…°P°¶‘ø}Ý)0Ÿ)APe0Ÿb«0Ÿ°Ä0Ÿ/ÿ|0Ÿ|…P…¶0ŸÝA0Ÿe0Ÿb«0Ÿ°Ä0Ÿ/ÿ¶0ŸÝA0ŸeÂ0ŸÂ üŸb3 üŸ30Ÿ« üŸ°Ä üŸ/ÿ¶0ŸÝA0ŸeÂ0ŸÂ °‹Ÿb3 °‹Ÿ30Ÿ« °‹Ÿ°Ä °‹Ÿ/ÿ¶0ŸÝA0ŸeÂ0ŸÂð w2ŸðüTb3 {2Ÿ30Ÿ« {2Ÿ°Ä {2ŸNÿo '&Ÿù) '&Ÿe '&Ÿ3 '&ŸNÿo0Ÿù)0ŸeÂ0Ÿ30ŸNÿ„ÿ‘Ð~Ÿ„ÿüÿQüÿo‘Ð~Ÿù)‘Ð~Ÿe‘Ð~Ÿ3‘Ð~ŸNÿo1Ÿù)1ŸeÂ1Ÿ31ŸNÿoLŸù)LŸeÂLŸ3LŸNÿoSù)SeÂS3SNÿRÿTRÿo‘è~Ÿù)‘è~Ÿe‘è~Ÿ3‘è~Ÿlÿüÿ '&Ÿüÿ'P*0Plÿ„ÿ‘Ð~Ÿ„ÿüÿQüÿ0‘Ð~Ÿlÿÿ‘€~Ÿÿ0Uù‘è~Ÿ‚ÂS‚ '&Ÿ‚ÂLŸ‚Â1Ÿ‚Â0Ÿ‚‘Ð~Ÿ‚‘è~Ÿ…§‘è~Ÿ§°U°¶‘è~Ÿ)A‘è~ŸÐü^|3^«^°Ä^Ôü]€3]«]°Ä]Øü\„3\«\°Ä\ÂðòabœòaÂðòXbœòXÂðòObœòOÌðPxœPðü\Á3\š\ºÄ\ðü]Á3]š]ºÄ]ðü^Á3^š^ºÄ^ðôpÈÈëU…Uðü0ŸÌ3VšVºÄVðü0ŸÐ3SšSºÄSðüPÄëPƒPœ¼‘è~Ÿ¼ÀUÀÁ‘è~Ÿš«‘è~Ÿ°º‘è~ŸÐGUG·‘À}·óUŸßUßÌ óUŸÌ @‘À}@øóUŸø$‘À}$®óUŸ®ü‘À}üoóUŸo‘À}lóUŸlu‘À}uóUŸÐCTC¨V¨·vwŸ·óTŸßTßÌ óTŸÌ @V@øóTŸø$V$®óTŸ®üVüoóTŸoVlóTŸluVuóTŸÐ?Q?·‘à}·óQŸßQßÌ óQŸÌ @‘à}@øóQŸø$‘à}$®óQŸ®ü‘à}üoóQŸo‘à}lóQŸlu‘à}uóQŸ›· ž·‘°}  õ)‘°}ö)"Ÿ H wö)‘°}ö)"Ÿw wö)‘°}ö)"ŸÒß žß wö)‘°}ö)"Ÿ¿ Í  wö)‘°}ö)"Ÿ   wö)‘°}ö)"Ÿê   wö)‘°}ö)"ŸQ [  wö)‘°}ö)"Ÿj †  wö)‘°}ö)"Ÿ± Ì  wö)‘°}ö)"Ÿ@ø wö)‘°}ö)"Ÿ$® wö)‘°}ö)"Ÿ7ê wö)‘°}ö)"Ÿõ wö)‘°}ö)"Ÿ¤o wö)‘°}ö)"Ÿo ž¬Ã wö)‘°}ö)"Ÿø! wö)‘°}ö)"ŸUé wö)‘°}ö)"Ÿ wö)‘°}ö)"Ÿ)l wö)‘°}ö)"Ÿlu žu˜ wö)‘°}ö)"Ÿ a Hwwwßw¿ Í w  wê  wQ [ wj † w± Ì w@øw$®w7êwõw¤ow¬Ãwø!wUéww)lwu˜w·»vwŸ»¥_¥H‘È}w_ß‘È}¿ â ‘È} W ‘È}W ± vwŸ± Ç ‘È}Ç  vwŸê  _  ‘È}Q [ _j † _± Ç _Ç Ì ‘È}@Q_Qø‘È}$®‘È}7OvwŸO`_`õ‘È}õvwŸ¤‘È}`vwŸ`o‘È}¬¼_¼!‘È}UÆ‘È}ÆévwŸvwŸ)l‘È}u˜‘È}ö·0Ÿ·H\d\ß0Ÿß\\5 V \¿ â \  \ 7 Q7  \  Q  \ Q ‘Ø}ê  \1 Ÿ \± Ì \Ì @0Ÿ@ø\ø$0Ÿ$®\®ü0ŸüQo\o0Ÿ¬!\!-Q-é\\)l\lu0Ÿu˜\É‘Ø}5 ‘Ð~Ÿ““È5›S““È›¡ S““T““°¡‘Ð~Ÿ““‘¨}““°Ò ‘Ð~Ÿ““ÈÒÚ‘Ð~Ÿ““P““°Úz‘Ð~Ÿ““‘¨}““°zŒ  ‘Ð~Ÿ““ÈŒ Ÿ ‘Ð~Ÿ““‘¨}““°Ÿ ¬  ‘Ð~Ÿ““Ȭ  ‘Ð~Ÿ““‘¨}““° 1  ‘Ð~Ÿ““È1 Ÿ ‘Ð~Ÿ““‘¨}““°Ÿ ±  ‘Ð~Ÿ““ȱ Ì ‘Ð~Ÿ““‘¨}““°Ì @S““È@ø‘Ð~Ÿ““‘¨}““°ø$S““È$®‘Ð~Ÿ““‘¨}““°®üS““Èüo‘Ð~Ÿ““‘¨}““°o S““T““°¬ S““‘¨}““°¬P‘Ð~Ÿ““‘¨}““°PU S““‘¨}““°U‘Ð~Ÿ““‘¨}““°) S““‘¨}““°)Ä‘Ð~Ÿ““‘¨}““°ÄÉ ‘Ð~Ÿ““ÈÉ‘Ð~Ÿ““‘¨}““°5 P aP V wo žBUa›‘à}Òz‘à}Œ Ÿ ‘à}¬  ‘à}1 Ÿ ‘à}± Ì ‘à}@ø‘à}$®‘à}üÄ‘à}É‘à}›¨V¨»vwŸ»¥_¥H‘È}w_ÒßTß‘È}¿ â ‘È} W ‘È}W ± vwŸ± Ç ‘È}Ç  vwŸê  _  ‘È}Q [ _j † _± Ç _Ç Ì ‘È}@Q_Qø‘È}$®‘È}7OvwŸO`_`õ‘È}õvwŸ¤‘È}`vwŸ`o‘È}oV¬¼_¼!‘È}UÆ‘È}ÆévwŸvwŸ)l‘È}luVu˜‘È}ÑØRØH‘È}w‘È}ß‘È}¿ â ‘È} W ‘È}W ±  vw $ &Ÿ± Ç ‘È}Ç   vw $ &Ÿê  ‘È}Q [ ‘È}j † ‘È}± Ì ‘È}@ø‘È}$®‘È}7O vw $ &ŸOõ‘È}õ vw $ &Ÿ¤‘È}` vw $ &Ÿ`o‘È}¬!‘È}UÆ‘È}Æé vw $ &Ÿ vw $ &Ÿ)l‘È}u˜‘È}ÑÛ vz $ &ŸÛãTãH vz $ &Ÿw vz $ &Ÿß vz $ &Ÿ¿ â  vz $ &Ÿ   vz $ &Ÿê   vz $ &ŸQ [  vz $ &Ÿj †  vz $ &Ÿ± Ì  vz $ &Ÿ@ø vz $ &Ÿ$® vz $ &Ÿ7 vz $ &Ÿ¤o vz $ &Ÿ¬! vz $ &ŸUé vz $ &Ÿ vz $ &Ÿ)l vz $ &Ÿu˜ vz $ &ŸÑßQßH v} $ &Ÿw v} $ &Ÿß v} $ &Ÿ¿ â  v} $ &Ÿ   v} $ &Ÿê   v} $ &ŸQ [  v} $ &Ÿj †  v} $ &Ÿ± Ì  v} $ &Ÿ@ø v} $ &Ÿ$® v} $ &Ÿ7 v} $ &Ÿ¤o v} $ &Ÿ¬! v} $ &ŸUé v} $ &Ÿ v} $ &Ÿ)l v} $ &Ÿu˜ v} $ &Ÿöæ0Ÿþ<^<H0Ÿdß0Ÿß6^¿ â 0Ÿ  0Ÿ 7 P7 € ^€  0Ÿ  P ê ^ê  0Ÿ  ^1 Q ^Q [ 0Ÿj † 0Ÿ† Ÿ ^± ß0Ÿø;0ŸI¦0Ÿ®ü0ŸüO^O×0Ÿêõ0Ÿõ¤^³`^`0Ÿ!-^-¥0Ÿ¥^S0ŸSl^l˜0Ÿ˜µ^µ¸P¸Ä0ŸÉ^ö0ŸTd0ŸdnPnþ]þw0Ÿ0Ÿ0Ÿ¿ Æ ]Æ â Z  0Ÿ þ 0Ÿ  0Ÿ± Ì PÌ @0Ÿ@],0Ÿ7O0ŸOê]êõZõ0Ÿ,AQA¤0Ÿ¤³]³`0Ÿ`o]o¬0Ÿ¼!]!U0ŸU¥]¥)0Ÿ)D]DSZSu0Ÿu˜]˜Ä0ŸÉ0Ÿö@0Ÿ{þS w0Ÿß0Ÿï0Ÿ]¿ Í _ W 0Ÿ± Ç 0Ÿ . 0Ÿ. F \F V 0ŸV p Pp Í ]Í  0Ÿ 3 P3 Q \Q  0Ÿ  \1 Q ]j Ÿ 0ŸÌ @0ŸYø_ø$0Ÿ$G_GI]It_tv]v†_†®]® 0Ÿ \7]OõSA0ŸA¤]¤³S³`0Ÿ`o_o¼0Ÿ¼!S!U0ŸU¥S¥0Ÿ)0Ÿ)SSSu0Ÿu˜S˜Ä0ŸÉÙ\Ù0ŸöL0Ÿ¿ Í ^  0Ÿ1 Ÿ 0Ÿ± D0ŸD}^}`0Ÿ`o^oÄ0ŸÉ0Ÿö0Ÿ¿ Í P „ 0Ÿ„ Ž PŽ ± S± Ç 0Ÿã [ S[ p 0Ÿp € P€ ­ S­  0Ÿ  S1 Q SQ [ 0Ÿj † 0Ÿ† Ÿ S± s0Ÿs…P…øSø$0Ÿ$®S®ü0ŸüOSOõ0Ÿõ¤S¤!0Ÿ!-S-é0ŸéøSøüPüS˜0Ÿ˜µPµÄSÉS0Ÿ2HSüP W S± Ç S³·Sv ±  ÿŸã  ‘Ø} ê _  _1 Q _† Ÿ _ü7_7O‘Ø}õ ÿŸ<_As_xƒ_!-_é_˜£_µ¿_Éà__ ¦ P¦ ± ‘È}ã  ‘È}7O‘È}ö0Ÿ¿ Í 0Ÿ  0Ÿ1 [ 0Ÿj Ÿ 0Ÿ± ;0Ÿ;@ ðŸ@ê0Ÿõ,0ŸAD0ŸS¸0ŸÉÙ0Ÿ0Ÿö0Ÿ¿ Í 0Ÿ  0Ÿ1 [ 0Ÿj Ÿ 0Ÿ± ;0Ÿ;@ °‹Ÿ@ê0Ÿõ,0ŸAD0ŸS¸0ŸÉÙ0Ÿ0Ÿö0Ÿ¿ Í 0Ÿ  0Ÿ1 [ 0Ÿj Ÿ 0Ÿ± ;0Ÿ;@ 0Ÿ@ê0Ÿõ,0ŸAD0ŸS¸0ŸÉÙ0Ÿ0Ÿ '&ŸÆ '&ŸÌ ; '&Ÿø$ '&Ÿ®ü '&Ÿ0ŸÆ0ŸÌ ;0Ÿø$0Ÿ®ü0Ÿ|‘À~Ÿ|Q‘À~ŸÆ‘À~ŸÌ ;‘À~Ÿø$‘À~Ÿ®ü‘À~Ÿ1ŸÆ1ŸÌ ;1Ÿø$1Ÿ®ü1ŸLŸÆLŸÌ ;LŸø$LŸ®üLŸGUG‘À}ÆUÌ ;‘À}ø$‘À}®ü‘À}‘Ø~ŸÆ‘Ø~ŸÌ ;‘Ø~Ÿø$‘Ø~Ÿ®ü‘Ø~Ÿa '&Ÿ7P:@Pa|‘À~Ÿ|Q@‘À~Ÿat‘ð}Ÿt@UÆ‘Ø~Ÿé ;‘À}é ; '&Ÿé ;LŸé ;1Ÿé ;0Ÿé ;‘À~Ÿé ;‘Ø~ŸSê þ SPê ÷ P÷ þ ](8T8< ˆ+&j  T †  ˆ+&¬³T(@]j † ]¬¼](<Qj † Q¬³Q¿ Í _Qø_$G_GI]It_tv]v†_†®]`o_{æ]O×]¼]U¥])G]GSZu˜]{æSO×S¼SU¥S)SSu˜S–æ]¼]–æS¼S¥æ_¼¿_ø_ÖÙPÙæ^¼ø^¡Ö^ø^Oê]U¥])G]GSZu˜]OêSU¥S)SSu˜S`sPsç_U¥_)>_>SPu˜_oÍ0ŸU0Ÿ)>0Ÿu˜0ŸosPsÍ_U_)>_u˜_oÍSUS)>Su˜S½ÀPÀÍ^U^z½^)9^u˜^ 2^ïü^2pÿŸï÷pÿŸ/ W 0Ÿ³`0Ÿ¥é0ŸSl0Ÿ/ W 1Ÿ³`1Ÿ¥é1ŸSl1Ÿ/ S QS W  v $ &Ÿ³ÙQÙ`‘Ø}¥°Q°é‘Ø}Sl‘Ø}/ W ‘È}³‘È}¥Æ‘È}Sl‘È}/ W óUŸ³`óUŸ¥éóUŸSlóUŸ·`S¥éSSlS7 D PD S rè³Ùrè¥ÀrèKUPU`_%P%`]ÆÕ]ÕÙPÙé]àòPòK_Æé_Sl_óP`‘È}Æé‘È}SaPÐà0ŸàòPòK_Æé_Sl_Ðó0ŸóP`‘È}Æé‘È}SaP4 L PÉÐPù  \l  0Ÿ,0ŸA¤0Ÿl p Pp  ],]A¤]± µ Pµ  Qx|Qw £ Z%ZA]Z]x‘Ø}Í ï QQ‘Ø}Í ï ^^Í  ^† Ÿ ^A^Ñ ë Pë ï pŸPß0Ÿ$;0ŸI¦0Ÿ…P…ßS$;SI¦Sß_$;_It_tv]v†_†¦]ÏÒPÒß^v¦^ŒÏ^$;^Iv^ŠÕQÕ% w Œ wŸ ¬ w 1 QŸ ± QŽ% ^ Œ ^Ÿ ¬ ^ 1 ^Ÿ ± ^’% ] Œ ]Ÿ ¬ ] 1 ]Ÿ ± ]ªÍ‘Ø~ŸÍÕUÕÖ‘Ø~ŸŸ ± ‘Ø~Ÿzªò@zªò7zªò.†ªPÖ% ] Œ ]Ÿ ¬ ] 1 ]Ö% ^ Œ ^Ÿ ¬ ^ 1 ^Ö% w Œ wŸ ¦ Q¦ ¬ w 1 Qá UŸ ¦ U $ pÈå% V Œ VŸ ¬ V 1 0Ÿé% S Œ SŸ ¬ S 1 0ŸÙ PŸ ¤ P 1 Po¬‘Ø~ŸBU‘Ø~Ÿ)‘Ø~Ÿ fUf¿óUŸ¿?U?qóUŸq‰U‰óUŸ oToYSY¿óTŸ¿SYóTŸYqSq†T†•óTŸ• S óTŸoSo%óTŸ%qSq§óTŸ§ÉSÉóTŸI˜0Ÿ˜¿P¿0Ÿ•J0ŸO]0Ÿbë0ŸëïPð0ŸIo1Ÿq•1Ÿb1ŸIo0Ÿq•0Ÿb0ŸIo )}Ÿq• )}Ÿb )}ŸIoVq•VbVIoTq†T†•óTŸbS0bS0bV0[ )}Ÿo˜óUŸ¿?U?qóUŸ•óUŸbëóUŸðóUŸoYSY˜óTŸÙSYóTŸYqS• S JóTŸOóTŸboSo%óTŸ%qSq§óTŸ§ÉSÉëóTŸðóTŸog0Ÿg’P’˜‘ˆ}¿E0ŸEYPYq0Ÿ•J0ŸO0Ÿbë0Ÿð0Ÿo^0Ÿ^gPg˜0Ÿ¿q0Ÿ•0Ÿbë0Ÿð0Ÿo˜0Ÿ¿q0Ÿ•ò0Ÿò éŸbq0ŸqŒ 韌É0ŸÉÚ éŸÚë0Ÿð éŸo˜0Ÿ¿q0Ÿ•ò0ŸòJ °‹ŸO °‹Ÿbq0ŸqŒ °‹ŸŒÉ0ŸÉÚ °‹ŸÚë0Ÿð °‹Ÿo˜0Ÿ¿q0Ÿ•ò0Ÿò  Û/Ÿ ,TO ß/Ÿbq0ŸqŒ ß/ŸŒÉ0ŸÉÚ ß/ŸÚë0Ÿð ß/ŸŽÂ '&ŸÙ( '&ŸSl '&Ÿ•ò '&Ÿ%q '&ŸŽÂ0ŸÙ(0ŸSl0Ÿ•ò0Ÿ%q0ŸŽÇ‘à~ŸÇÂ\Ù(‘à~ŸSl\•ò‘à~Ÿ%q\ŽÂ1ŸÙ(1ŸSl1Ÿ•ò1Ÿ%q1ŸŽÂLŸÙ(LŸSlLŸ•òLŸ%qLŸŽÂSÙ(SSlS•òS%qSŽ’T’‘ø}ŸÙ(‘ø}ŸSl‘ø}Ÿ•ò‘ø}Ÿ%q‘ø}Ÿ¬H '&ŸHwPz€P¬Ç‘à~ŸÇ€\¬¿‘}Ÿ¿€VÙ(‘ø}Ÿ²òS²ò '&Ÿ²òLŸ²ò1Ÿ²ò0Ÿ²ò‘à~Ÿ²ò‘ø}ŸÂ˜0Ÿ(S0Ÿlq0ŸO0Ÿb%0Ÿqë0Ÿð0ŸÂYS(SSlSEóTŸYqSboSo%óTŸŒ§óTŸ§ÉSÚëóTŸ RaRY‘ˆ}Yqa PbzPÂY0Ÿ(S0Ÿlñ0ŸYq0Ÿbw0Ÿ§É0Ÿç '&Ÿ(S '&Ÿlñ '&Ÿ§É '&Ÿç0Ÿ(S0Ÿlñ0Ÿ§É0Ÿç‘à}ŸQ‘à}Ÿ(S‘à}Ÿlñ‘à}Ÿ§É‘à}Ÿç1Ÿ(S1Ÿlñ1Ÿ§É1ŸçLŸ(SLŸlñLŸ§ÉLŸçS(SSlñS§ÉSç‘è~Ÿ(S‘è~Ÿlñ‘è~Ÿ§É‘è~Ÿ '&Ÿ·PºÀP‘à}ŸQÀ‘à}ŸÀV(?‘è~Ÿ³ñS³ñ '&Ÿ³ñLŸ³ñ1Ÿ³ñ0Ÿ³ñ‘à}Ÿ³ñ‘è~Ÿ H‘è~ŸHRURY‘è~ŸYq‘è~Ÿÿ+^%^Œ§^Úë^+]…%]Œ§]Úë]+\‰%\Œ§\Úë\ñò¨w¡ò¨ñòŸw¡òŸñò–w¡ò–ûPz¡P+\É%\Œ§\+]É%]Œ§]+^É%^Œ§^#pÈÐóUŒ’U+0ŸÔ%VŒ§V+0ŸØ%SŒ§S+PÌóPŒP¡Ä‘è~ŸÄÈUÈÉ‘è~ŸÚë‘è~Ÿg‰‘ø}Ÿ‰’U’˜‘ø}ŸEY‘ø}Ÿ,^d^qŒ^ÉÚ^ð^,]h]qŒ]ÉÚ]ð],\l\qŒ\ÉÚ\ð\ò òUO„òUò òLO„òLò òCO„òCü P`„P ,\©\qŒ\ðú\ ,]©]qŒ]ðú] ,^©^qŒ^ðú^ $pȰÓUqwU ,0Ÿ´VqŒVðúV ,0Ÿ¸SqŒSðúS ,P¬ÓPquP„¤‘ø}Ÿ¤¨U¨©‘ø}ŸÉÚ‘ø}Ÿú‘ø}ŸˆUˆÍ óUŸÍ Ü UÜ  "óUŸ "T"UT"þ+óUŸˆTˆ§S§Í óTŸÍ !S! "óTŸ "ë"Së"=#óTŸ=#v#Sv#Ø#óTŸØ#Ú#SÚ#ß#óTŸß#â#Sâ#é#óTŸé#$S$ $óTŸ $$S$$óTŸ$)$S)$Ÿ$óTŸŸ$å$Så$M'óTŸM'…'S…'ä'óTŸä'(S(«(óTŸ«(ü(Sü()óTŸ)+)S+)þ+óTŸˆQˆÍ óQŸÍ Ü QÜ  "óQŸ "X"QX"á"\á"Ÿ$óQŸŸ$å$\å$ä'óQŸä'(\(«(óQŸ«(ò(\ò()óQŸ))\)þ+óQŸ5ˆ0Ÿˆ°‘à~Í !0Ÿ "ë"0Ÿ=#p#‘à~Ø#7$‘à~Ÿ$å$0ŸM'z'‘à~ä'(0Ÿ«(ò(0Ÿò(÷(‘à~))0Ÿ) )‘à~5¦ 0ŸÍ !0Ÿ!>! ðŸ>!¶!0Ÿ¶!»! ðŸ»!Ø$0ŸØ$å$ ðŸå$ä(0Ÿä(ò( ðŸò(Ó*0ŸØ*þ+0Ÿ5¦ 0ŸÍ !0Ÿ!>! °‹Ÿ>!¶!0Ÿ¶!»! °‹Ÿ»!Ø$0ŸØ$å$ °‹Ÿå$ä(0Ÿä(ò( °‹Ÿò(Ó*0ŸØ*þ+0Ÿ5¦ 0ŸÍ !0Ÿ!! 31Ÿ!6!T>!¶!0Ÿ¶!»! /1Ÿ»!Ø$0ŸØ$å$ 1Ÿå$ä(0Ÿä(ò( 1Ÿò(Ó*0ŸØ*þ+0Ÿ5£ 0ŸÍ Ó*0ŸØ*þ+0Ÿ`""P"Ž"}ŸŽ"ë"]Ÿ$å$]ä'(]«(ò(]))}ŸÍ Ü V"æ"VŸ$å$Vä'(V«(ò(V))VŸ$Ø$2ŸŸ$Ø$3ŸŸ$Ø$1ŸŸ$Ø$ ;}ŸŸ$å$3ŸŸ$Ø$ 3}Ÿ«(ä(1Ÿ«(ä(3Ÿ«(ä( ;}Ÿ«(ò(3Ÿ«(ä( 3}Ÿˆ°‘è~=#p#‘è~Ø#7$‘è~M'z'‘è~ò(÷(‘è~) )‘è~ˆ¦  ÿŸ>! " ÿŸë"Ÿ$ ÿŸå$ä' ÿŸ(«( ÿŸò() ÿŸ)Ó* ÿŸØ*þ+ ÿŸˆ¦ 0Ÿ>! "0Ÿë"Ÿ$0Ÿå$ä'0Ÿ(«(0Ÿò()0Ÿ)Ó*0ŸØ*þ+0Ÿ¢°PK#p#‘è~#ŸØ#7$‘è~#Ÿâ#ä#sŸä#é#Sü# $P $$v$$7$Pq#‰#P##0ŸM'z'‘è~ò(÷(‘è~) )‘è~\'z'P) )Pë" #QM's'0Ÿs'…' š|Ÿ…'¦'Qò(ü(0Ÿ))0Ÿ)0) ž|Ÿë"ò"Pò"#SM'…'0Ÿ…'¦'Pò(ü(0Ÿ)+)0Ÿ+)0)P¦'Ê'V[*—*Vª*Ó*Vâ*=+VY+h+V¦'ä' ÿŸ[*Ó* ÿŸâ*h+ ÿŸ¦'ä'0Ÿ[*Ó*0Ÿâ*h+0Ÿ¼'Ê'P[**vŸµ*Ó*vŸâ*Y+vŸc*u*Pq**0Ÿâ*ç*v”Ÿç*ì*Sÿ*+P++v*+=+PÁé]>!ž!]Á#Ø#]7$Ÿ$](\(]ü()]™)ã)]Á¦  ÿŸ>! " ÿŸ«#Ø# ÿŸ7$Ÿ$ ÿŸå$M' ÿŸ(«( ÿŸü() ÿŸY)[* ÿŸØ*â* ÿŸh+þ+ ÿŸÁ¦ 0Ÿ>! "0Ÿ«#Ø#0Ÿ7$Ÿ$0Ÿå$M'0Ÿ(«(0Ÿü()0ŸY)[*0ŸØ*â*0Ÿh+þ+0ŸÛéPK!ƒ!}ŸÁ#Ø#}Ÿ7$Ÿ$}ŸP$c$Px$‹$P‹$”$}˜$š$vŸš$Ÿ$Ve!}!Ps!ƒ!0Ÿ(\(]ü()]™)ã)]#(A(P™)ª)P(:(0Ÿ:(L( š|ŸL(m(Qü()0ŸY)~)Q™)£)0Ÿ£)º) ž|Ÿ(L(0ŸL(m(Pü()0ŸY)g)Pg)™)V™)µ)0Ÿµ)º)Pm(‘(]ã)*]2*[*]r+Ó+]ï+þ+]m(«( ÿŸã)[* ÿŸr+þ+ ÿŸm(«(0Ÿã)[*0Ÿr+þ+0Ÿƒ(‘(Pã) *}Ÿ=*[*}Ÿr+ï+}Ÿë)ý)Pù) *0Ÿr+x+}”Ÿx+}+V’+¥+P¥+®+}À+Ó+Pù1Ÿå$þ$1Ÿ¿%ü%1Ÿù0Ÿå$þ$0Ÿ¿%ü%0Ÿù )}Ÿå$þ$ )}Ÿ¿%ü% )}Ÿù]å$þ$]¿%ü%]Ð%&]Ð%ü% )}Ÿ¦ óUŸ»! "óUŸ«#Á#óUŸ%¿%óUŸ&M'óUŸØ*â*óUŸh+r+óUŸ£ V»! "V«#Á#V%œ%V&n&VÕ&!'V<'M'Vh+r+Vv S»! "S%%SÕ&!'S| 0Ÿ| ‹ P‹ £ S»! "0Ÿ«#Á#S%¿%0Ÿ&M'0ŸØ*â*0Ÿh+r+0Ÿv 0Ÿv | P| ¦ 0Ÿ»! "0Ÿ«#Á#0Ÿ%¿%0Ÿ&&P&M'0ŸØ*â*0Ÿh+r+0Ÿ£ 0Ÿ»! "0Ÿ«#Á#0Ÿ%b%0Ÿb%¿% ðŸ&&0Ÿ&Õ& ðŸÕ&!'0Ÿ!'M' ðŸØ*â* ðŸh+r+ 🣠0Ÿ»! "0Ÿ«#Á#0Ÿ%b%0Ÿb%¿% °‹Ÿ&&0Ÿ&Õ& °‹ŸÕ&!'0Ÿ!'M' °‹ŸØ*â* °‹Ÿh+r+ °‹Ÿ£ 0Ÿ»! "0Ÿ«#Á#0Ÿ%b%0Ÿb%% U1Ÿ%œ%T&&0Ÿ&Õ& Y1ŸÕ&!'0Ÿ!'M' Y1ŸØ*â* Y1Ÿh+r+ Y1Ÿ<_  '&ŸÙ! " '&Ÿ%b% '&ŸÕ&!' '&Ÿ<_ 0ŸÙ! "0Ÿ%b%0ŸÕ&!'0Ÿ<r‘Ð~ŸrêQê_ ‘Ð~ŸÙ! "‘Ð~Ÿ%b%‘Ð~ŸÕ&!'‘Ð~Ÿ<_ 1ŸÙ! "1Ÿ%b%1ŸÕ&!'1Ÿ<_ LŸÙ! "LŸ%b%LŸÕ&!'LŸ<@T@_ ‘è~ŸÙ! "‘è~Ÿ%b%‘è~ŸÕ&!'‘è~ŸZê '&Ÿê P  PZr‘Ð~ŸrêQê ‘Ð~ŸZm‘€~Ÿm UÙ!õ!‘è~Ÿ"%b% '&Ÿ"%b%LŸ"%b%1Ÿ"%b%0Ÿ"%b%‘Ð~Ÿ"%b%‘è~Ÿ| ž ‘è~Ÿž ¢ U¢ £ ‘è~Ÿ«#Á#‘è~Ÿp%œ%^&Õ&^!'M'^Ø*â*^h+r+^t%œ%]"&Õ&]!'M']Ø*â*]h+r+]x%œ%\&&Õ&\!'M'\Ø*â*\h+r+\b%%ò-&>&ò-b%%ò-&>&ò-b%%ò -&>&ò -l%%P&>&P%œ%\c&Õ&\!'<'\Ø*â*\%œ%]c&Õ&]!'<']Ø*â*]%œ%^c&Õ&^!'<'^Ø*â*^%”%pÈj&&U!'''U%œ%0Ÿn&Õ&V!'<'VØ*â*V%œ%0Ÿr&Õ&S!'<'SØ*â*S%œ%Pf&&P!'%'P>&^&‘è~Ÿ^&b&Ub&c&‘è~Ÿ<'M'‘è~Ÿh+r+‘è~ŸÜ ó sÜ !3ŸÜ !1ŸÜ ! ;}ŸÜ !3ŸÜ ! 3}Ÿ,ò,Uò,5\5&5|Ÿ&5P=‘¸yP=Ž=UŽ=[?\[?¿CóUŸ¿C D\ DDóUŸD¯F\¯FîF‘¸yîFPG\PGBI‘¸yBIŽI\ŽIËI‘¸yËIJ\JK‘¸yK>K\>KäP‘¸yäPéPóUŸéPæi‘¸y,ê,Tê,C5VC5V5vŸV5n5Tn5P=‘ÀyP=Ž=TŽ=[?V[?¿CóTŸ¿C DV DDóTŸD¯FV¯FîF‘ÀyîFPGVPGBI‘ÀyBIŽIVŽIËI‘ÀyËIJVJK‘ÀyK>KV>KäP‘ÀyäPéPóTŸéPæi‘Ày,ï,Qï,k5Sk55sŸ5P=‘ÈyP=Ž=QŽ=!?S!?¿CóQŸ¿C DS DDóQŸDžDSžDèDóQŸèDªFSªF¯FóQŸ¯FîF‘ÈyîFPGSPGBI‘ÈyBIŽISŽIËI‘ÈyËIJSJK‘ÈyK>KS>KäP‘ÈyäPéPóQŸéPæi‘Èy,û,Rû,P=‘øxP=Ž=RŽ=[?‘øx[?¿CóRŸ¿C D‘øx DDóRŸD G‘øx GIHóRŸIHfH‘øxfH›HóRŸ›HäP‘øxäPéPóRŸéPæi‘øx,û,Xû,P=óXŸP=Ž=XŽ=æióXŸ,û,Yû,&.‘Èx&.P=óYŸP=Ž=YŽ=DóYŸDžD‘ÈxžDæióYŸ³_`Sª5´5b´5P=‘ˆy¯FîF‘ˆyPG G‘ˆyIHYH‘ˆy›HBI‘ˆyŽIËI‘ˆyJK‘ˆy>KäP‘ˆyéPæi‘ˆyª5´5c´5P=‘èx¯FîF‘èxPG G‘èxIHpH‘èx›HBI‘èxŽIËI‘èxJK‘èx>KäP‘èxéPæi‘èxª5´5d´5P=‘àx¯FîF‘àxPGG‘àx›HBI‘àxŽIËI‘àxJK‘àx>KP‘àxéPæi‘àx°5´5e´5P=‘ðx¯FîF‘ðxPG G‘ðxIHkH‘ðx›HBI‘ðxŽIËI‘ðxJK‘ðx>KäP‘ðxéPæi‘ðx°5´5f´5P=‘€y¯FîF‘€yPG G‘€yIHaH‘€y›HBI‘€yŽIËI‘€yJK‘€y>KäP‘€yéPæi‘€y°5´5g´5P=‘y¯FîF‘yPGBI‘yŽIËI‘yJK‘y>KäP‘yéPæi‘yq,“;0Ÿ“;—;T—;Â;SÂ;P=‘ÈxP=[?0ŸMAÓA‘Èx÷A BT BB‘Èx—B¯B‘Èx¿C D0ŸDÊF0ŸîFG0ŸG G‘ÈxIH›H‘Èx›H‹L0Ÿ‹L—L‘Èx—LËL0ŸËLÚL‘ÈxÚLM0ŸM M‘Èx MWN0ŸWNßN‘ÈxßNO0ŸOkO‘ÈxkOÃO0ŸÃOÚOSÚOOP0ŸOPæi‘Èx„U~[‘Ðy‰[Ha‘Ðy§ab‘Ðyb9c‘ÐyCc¥f‘Ðy„U~[‘Øy‰[Ha‘Øy§ab‘Øyb9c‘ØyCc¥f‘Øy„U~[‘ày‰[Ha‘ày§ab‘àyb9c‘àyCc¥f‘ày„U~[‘èy‰[Ha‘èy§ab‘èyb9c‘èyCc¥f‘èy„U~[‘ðy‰[Ha‘ðy§ab‘ðyb9c‘ðyCc¥f‘ðy„U~[‘øy‰[Ha‘øy§ab‘øyb9c‘øyCc¥f‘øy„U~[‘€z‰[Ha‘€z§ab‘€zb9c‘€zCc¥f‘€z„U~[‘ˆz‰[Ha‘ˆz§ab‘ˆzb9c‘ˆzCc¥f‘ˆzq,Â;0ŸÂ;æ;Uæ;*<\*<P=‘ÐyP=[?0ŸMAÓA‘Øx÷AB‘Øx—B¯B‘Øx¿C D0ŸDG0ŸG G‘ØxIH›H‘Øx›H‹L0Ÿ‹L—L‘Ðy—LËL0ŸËLÚL‘ÐyÚLM0ŸM M‘Ðy MWN0ŸWNcN\cN—N‘Ðy©NÚN‘ÐyßNO0ŸOkO‘ÐykOOP0ŸOPrP\rPuP‘Øx‹PØP\ØPéP‘ØxéPQUQ~[‘Øx‰[¥f‘Øx¥fLg‘ÐyLgæi‘Øxq,Â;0ŸÂ;0<_0<<<U<<Ã<_Ã<Þ<UÞ<P=_P=[?0ŸMAÒA_÷AB_—B¯B_¿C D0ŸDG0ŸG G_IH›H_›H‹L0Ÿ‹L—L_—LËL0ŸËLÚL_ÚLM0ŸM M_ MWN0ŸWNßN_ßNO0ŸOkO_kOOP0ŸOP•Z_•Z«ZU«ZA[\A[I[_I[~[\~[‰[_‰[¡[U¡[§\_§\½\U½\„]\„]‘]_‘]¡]U¡]g_ggUgæi_Ï,ý4 ‘{Ÿ““Èý45‘{Ÿ““T““°55‘{Ÿ““p““°5P=‘{Ÿ““‘ y““°P=¯F ‘{Ÿ““ȯFîF‘{Ÿ““‘ y““°îFPG ‘{Ÿ““ÈPGBI‘{Ÿ““‘ y““°BIŽI ‘{Ÿ““ÈŽIËI‘{Ÿ““‘ y““°ËIJ ‘{Ÿ““ÈJK‘{Ÿ““‘ y““°K>K ‘{Ÿ““È>KäP‘{Ÿ““‘ y““°äPéP ‘{Ÿ““ÈéPæi‘{Ÿ““‘ y““°·,K3 ‘€|Ÿ““ÈK3{3‘€|Ÿ““P““°{3P=‘€|Ÿ““‘˜y““°P=¿C ‘€|Ÿ““È¿CÇC‘€|Ÿ““P““°ÇC D‘€|Ÿ““‘˜y““° DäE ‘€|Ÿ““ÈäEKF‘€|Ÿ““‘˜y““°KF¯F ‘€|Ÿ““ȯFG‘€|Ÿ““‘˜y““°GPG ‘€|Ÿ““ÈPGBI‘€|Ÿ““‘˜y““°BIŽI ‘€|Ÿ““ÈŽIK‘€|Ÿ““‘˜y““°K>K ‘€|Ÿ““È>KäP‘€|Ÿ““‘˜y““°äPéP ‘€|Ÿ““ÈéPæi‘€|Ÿ““‘˜y““°q,p. ‘ð|Ÿ““Èp.|6‘ð|Ÿ““]““°|6Ž= ‘ð|Ÿ““ÈŽ=!?‘ð|Ÿ““]““°!?¿C ‘ð|Ÿ““È¿C D‘ð|Ÿ““]““° DèD ‘ð|Ÿ““ÈèDOE‘ð|Ÿ““]““°OEdE ‘ð|Ÿ““ÈdE_F‘ð|Ÿ““]““°_F¯F ‘ð|Ÿ““ȯFÊF‘ð|Ÿ““]““°ÊFîF ‘ð|Ÿ““ÈîFsG‘ð|Ÿ““]““°sGI ‘ð|Ÿ““ÈI&I‘ð|Ÿ““]““°&IBI ‘ð|Ÿ““ÈBI±I‘ð|Ÿ““]““°±IËI ‘ð|Ÿ““ÈËI:J‘ð|Ÿ““]““°:JTJ ‘ð|Ÿ““ÈTJwJ‘ð|Ÿ““]““°wJ‘J ‘ð|Ÿ““È‘J½J‘ð|Ÿ““]““°½JK ‘ð|Ÿ““ÈK>K‘ð|Ÿ““]““°>Kæi ‘ð|Ÿ““ȇ, 0 ‘à}Ÿ““È 0;0‘à}Ÿ““P““°;0ã5‘à}Ÿ““‘Èx““°ã5Ú= ‘à}Ÿ““ÈÚ=ç=‘à}Ÿ““P““°ç=z>‘à}Ÿ““‘Èx““°z>”> ‘à}Ÿ““È”>!?‘à}Ÿ““‘Èx““°!?¿C ‘à}Ÿ““È¿C D‘à}Ÿ““‘Èx““° DdE ‘à}Ÿ““ÈdE_F‘à}Ÿ““‘Èx““°_F¯F ‘à}Ÿ““ȯF»F‘à}Ÿ““‘Èx““°»FîF ‘à}Ÿ““ÈîFG‘à}Ÿ““‘Èx““°GPG ‘à}Ÿ““ÈPGG‘à}Ÿ““‘Èx““°GBI ‘à}Ÿ““ÈBIŽI‘à}Ÿ““‘Èx““°ŽIËI ‘à}Ÿ““ÈËIJ‘à}Ÿ““‘Èx““°JK ‘à}Ÿ““ÈK>K‘à}Ÿ““‘Èx““°>Kæi ‘à}Ÿ““ÈŸ,£1 ‘Ð~Ÿ““È£1ò6‘Ð~Ÿ““^““°ò6*> ‘Ð~Ÿ““È*>z>‘Ð~Ÿ““^““°z>¿C ‘Ð~Ÿ““È¿C D‘Ð~Ÿ““^““° DdE ‘Ð~Ÿ““ÈdEËE‘Ð~Ÿ““^““°ËEäE ‘Ð~Ÿ““ÈäE_F‘Ð~Ÿ““^““°_F¯F ‘Ð~Ÿ““ȯFÊF‘Ð~Ÿ““^““°ÊFîF ‘Ð~Ÿ““ÈîFG‘Ð~Ÿ““^““°GPG ‘Ð~Ÿ““ÈPGpG‘Ð~Ÿ““^““°pG›H ‘Ð~Ÿ““È›H»H‘Ð~Ÿ““^““°»HI ‘Ð~Ÿ““ÈI#I‘Ð~Ÿ““^““°#IBI ‘Ð~Ÿ““ÈBI®I‘Ð~Ÿ““^““°®IËI ‘Ð~Ÿ““ÈËI7J‘Ð~Ÿ““^““°7JTJ ‘Ð~Ÿ““ÈTJtJ‘Ð~Ÿ““^““°tJ‘J ‘Ð~Ÿ““È‘JºJ‘Ð~Ÿ““^““°ºJÎJ ‘Ð~Ÿ““ÈÎJ K‘Ð~Ÿ““^““° K>K ‘Ð~Ÿ““È>K^K‘Ð~Ÿ““^““°^Kæi ‘Ð~Ÿ““Èq,UA0ŸUAqASÓA÷A0Ÿ÷ABSB—B0Ÿ¯BäP0ŸéP"`0Ÿ"`4`P4`4aS4aæi0Ÿ5"5P"5P=‘¸y¯FîF‘¸yPGBI‘¸yŽIËI‘¸yJK‘¸y>KäP‘¸yéPæi‘¸yI5°5b°5´5g´5P=‘y¯FîF‘yPGBI‘yŽIËI‘yJK‘y>KäP‘yéPæi‘yI5n5Tn5P=‘Ày¯FîF‘ÀyPGBI‘ÀyŽIËI‘ÀyJK‘Ày>KäP‘ÀyéPæi‘Ày‹5ª5cª5´5f´5P=‘€y¯FîF‘€yPG G‘€yIHaH‘€y›HBI‘€yŽIËI‘€yJK‘€y>KäP‘€yéPæi‘€yª5´5e´5P=‘ðx¯FîF‘ðxPG G‘ðxIHkH‘ðx›HBI‘ðxŽIËI‘ðxJK‘ðx>KäP‘ðxéPæi‘ðxq,»50Ÿ»5Ë5PË56V6a60Ÿa6u6Pu6‘6V‘6¤60Ÿ¤6´6P´67V7J70ŸJ7^7P^7‡7V‡7’70Ÿ’7§7P§78V8w80Ÿw8ª8Pª8à8Và8ë80Ÿë89P9Ð9VÐ9\:0Ÿ\:¯:P¯:;V;$;0Ÿ$;S;PS;“;T“;ž;0Ÿž;Â;PÂ;P=‘ØxP=[?0Ÿ¿C D0ŸD¯F0Ÿ¯FîFPîFPG0ŸPG«GVHBIVBIŽI0ŸŽIËIVËI‘J0Ÿ‘JÎJPÎJâJVâJKPK>K0Ÿ>K²KV²K L0Ÿ LWLPWL‹LV‹L—L‘Øx—LËLPËLÚL‘ØxÚLMVM M‘Øx MeMVeMÇM0ŸÇMøMPøM)NV)NWNPWN—N‘Øx©NÚN‘ØxßNOVOfO‘ØxkOÃO0ŸÃO&PP&POPVOPcP‘Øx‹P¸P‘ØxéPøP‘ØxÌQ£U0Ÿ£U³UP³UmVVmV%X0Ÿ%XPXPPX¾XV¾XxZ0ŸxZ‚ZP‚Z~[V‰[±[V±[¼[0Ÿ¼[Ú[PÚ[ \V \\0Ÿ\%\P%\^\V^\k\0Ÿk\„\P„\Å]VÅ]Õ]0ŸÕ]å]På]^V^Ha0Ÿ\aŸb0Ÿ·bÐb0ŸÐbÞbVÞb÷bP÷bcVc*cP*c9cVCcZcPZcpcVpc‡cP‡cd0ŸdædVædýdPýd˜e0Ÿ˜eÍeVÍeæePæe¥f0Ÿ¥fËf‘Øxßfôf‘Øxg?g‘Øxgh0ŸThæi0Ÿq,Ò50ŸÒ5ç5Pç56‘Èx6B60ŸB6Z6PZ6‘6‘Èx‘6»60Ÿ»6Ð6PÐ67‘Èx7+70Ÿ+7C7PC7‡7‘Èx‡7®70Ÿ®7Í7PÍ78‘Èx8K80ŸK8p8Pp8œ8‘Ðyà8&90Ÿ&9b9Pb9Ð9‘ÈxÐ9 :0Ÿ :U:PU:‘:‘ày;[?0Ÿ¿C D0ŸDPG0ŸPGGPG GQIHwHQwH›H‘àx›HÕH‘ÈxI=I‘ÈxBIŽI0ŸŽIÆI‘ÈxËITJ0ŸTJ‘JP‘JJ‘ÈxÎJâJ‘ÈxâJ>K0Ÿ>K{KP{K­K‘Èx²KéK0ŸéK LP L,L‘ÈxWL‹L‘Èx‹LÚL0ŸÚLMPM M0Ÿ M`M‘ÈxeM–M0Ÿ–MÇMPÇMøM‘ÐyøM)NP)NßN0ŸßNO‘ÈxO—O0Ÿ—OÃOPÃOÚO0ŸÚOP‘àyP&P0ŸOPäP0ŸéPæi0Ÿq,î50Ÿî56P66\6160Ÿ16A6PA6‘6\‘6×60Ÿ×6ë6Pë67\770Ÿ7*7P*7‡7\‡7Ô70ŸÔ7í7Pí78\8&80Ÿ&8J8PJ8à8\à8i90Ÿi9’9P’9Ð9\Ð9Û90ŸÛ9:P:;\;[?0Ÿ¿C D0ŸDG0ŸG›H\›HªHPªHI\IBIPBIŽI0ŸŽIËI\ËIJ0ŸJTJPTJâJ\âJ{K0Ÿ{K²K\²KéKPéK‹L\‹L M0Ÿ M4MP4MeM\eM–MP–MøM\øMßN0ŸßNóNPóNO\OkO0ŸkO—OP—OÃO\ÃOÚO0ŸÚOP\P&P0Ÿ&POP\OPäP0ŸéPæi0Ÿq, 60Ÿ 6*6P*6_;S“;[?0Ÿ¿C D0ŸDG0ŸGISIŽI0ŸŽIËIPËIJ0ŸJKSK>K0Ÿ>K‹LS‹L—L0Ÿ—LËLSËLÚL0ŸÚLMSM M0Ÿ MWNSWNßN0ŸßNOSOkO0ŸkOÃOSÃOÚO0ŸÚOOPSOPrP0Ÿ‹PäP0ŸéPJQ0ŸJQ„US„UºU0ŸºUÊUPÊUmVSmVóW0ŸóWXPX¾XS¾XóZ0ŸóZÿZPÿZA[SI[f[Pf[‘\0Ÿ‘\›\P›\„]S‘]¤]S¤]´]0Ÿ´]Î]PÎ]ë]Së]û]0Ÿû]^P^@^S@^g^0Ÿg^t^Pt^À^SÀ^Ð^0ŸÐ^Ý^PÝ^._S`"`P"`4a0Ÿ4aEaP\a½aS½aÓaPÓaìaSìabPbbSb·b0Ÿ·bÐbSÐbÞbPÞb÷bS÷bcPcd0ŸdÐdSÐdædPæd˜e0Ÿ˜eæeSæeÿePÿeg0ŸghShTh0ŸThæiSq,|60Ÿ|66P6“;]“;[?0Ÿ¿C D0ŸDG0ŸG G]IHI]IÎJ0ŸÎJâJPâJK]K>K0Ÿ>K‹L]‹L—L0Ÿ—LËL]ËLÚL0ŸÚLM]M M0Ÿ MWN]WNßN0ŸßNO]OkO0ŸkOÃO]ÃOÚO0ŸÚOOP]OPäP0ŸéPFQ0ŸFQ@U]@UÑU0ŸÑUáUPáUmV]mVÁW0ŸÁWìWPìW¾X]¾Xoa0Ÿoaƒa]ƒab0Ÿbb]bd0Ÿd¦d]¦dÐdPÐd˜e0Ÿ˜eÿe]ÿefPfg0Ÿgh]hTh0ŸThæi]q,ò60Ÿò67P7“;^“;[?0Ÿ¿C D0ŸDG0ŸG G^IH›H^›HÕH0ŸÕHI^I{K0Ÿ{K²KP²K‹L^‹L—L0Ÿ—LËL^ËLÚL0ŸÚLM^M M0Ÿ MWN^WNßN0ŸßNO^OkO0ŸkOÃO^ÃOÚO0ŸÚOOP^OPäP0ŸéPBQ0ŸBQûT^ûTèU0ŸèUøUPøUmV^mVW0ŸWºWPºW¾X^¾Xb0ŸbZb^Zbd0Ÿdd^d¦dP¦d˜e0Ÿ˜ef^f8fP8fg0Ÿgh^hTh0ŸThæi^q,e70Ÿe7‹7P‹7É7‘Èx“;w<0Ÿw<ˆ<Pˆ<Ã<SÃ<[?0Ÿ¿C D0ŸDG0ŸG G[IHwH[wH›H‘èx›HÕH0ŸIWL0ŸWLfLP‹L—L0Ÿ—L£L‘ÈxËLÏLPÏLÚLSÚL M‘ÈxM MSWNcN0ŸcN—NP©NßN0ŸOkOSÃOÚO0ŸOPäP0ŸéP:Q0Ÿ:Q£Q[£QÌQ‘ÐycTV0ŸVEVPEVmV‘zmV—V0Ÿ—V·VP·V¼V[¼VÅV‘zõV W0Ÿ W$WP$W¾X‘z¾Xøc0ŸøcdPd:d‘z:d[dP[d˜e0Ÿ˜emf‘zmf|fP¥fg0ŸhTh0Ÿ©iæi0Ÿq,ô70Ÿô78P8F8‘Èx“;8<0Ÿ8<K<_K<^<0Ÿ^<p<Pp<ˆ<]ˆ<[?0Ÿ¿C D0ŸDG0ŸG GXIHwHXwH›H‘ðx›HÕH0ŸI‹L0Ÿ‹L—L_—LËL0ŸËLÚL]ÚL4M0Ÿ4MeMPeM‘M‘ÈxWNcN0ŸcN—N]©NÚNPOkO0ŸÃOÚO0ŸOPäP0ŸéP>Q0Ÿ>Q£QX£QÌQ‘Øy·TÿU0ŸÿUVPVAV‘zmVUW0ŸUWˆWPˆW¾X‘˜z¾Xb0Ÿbd0Ÿ:d[d‘z[ddPd˜e0Ÿ˜e8f‘˜z8fYfPYfg0ŸhTh0Ÿq,±80Ÿ±8ä8Pä89‘Èx“;<0Ÿ<Þ<^Þ<î<0Ÿî<=P==S=[?0Ÿ¿C D0ŸDG0ŸG GZIHwHZwH›H‘øx›HÕH0ŸÕHäHPI‹L0Ÿ‹L—L^—LËL0ŸËLÚL^ÚLM0ŸM M^ MøM0Ÿ)N5N‘ÈxWNcN0ŸcN—N^©NÚN^OkO^ÃOÚO0ŸOPuP0Ÿ‹PäP0ŸéP6Q0Ÿ6Q£QZ£QÌQ‘àyïSLV0ŸLVVPV³V‘zÅV+W0Ÿ+WNWPNW„W‘˜z¾X[0Ÿ‰[øc0Ÿøcd‘zd:dP:d˜e0Ÿ8fYf‘˜zYfmfPmf¥f0Ÿ¥fÆfSÆfßfZßfgPgg^gg0ŸhTh0ŸKiæi0Ÿq,™90Ÿ™9Ô9PÔ9:‘Èx“;á;0Ÿá;õ;\õ;ü;0Ÿü;0<P0<Ø<\Ø<ÿ<Vÿ<=0Ÿ==P=P=VP=[?0Ÿ¿C D0ŸDG0ŸG GRIHwHRwH›H‘€y›H‹L0Ÿ‹L—L\—LËL0ŸËLÚL\ÚLM0ŸM M\ MWN0ŸWNnN\nN—NR©N´N\´NÚNRßNóN0ŸóNOPO=O\=OkORkO’O‘ÈxÃOÚO0ŸOPrPP‹P—PP—PäP‘àxéP2Q0Ÿ2Q£QR£QÌQ‘èy[SWX0ŸWX†XP†X¾X‘¨z¾XðX0ŸðXYPYYRYY‘zNYŒY0ŸŒY–YP–Y§YR§YÂYwÙYäY0ŸäYõYPõYZRZ5Zw5ZBZ0ŸBZQZPQZgZRgZ9[wI[Y[wf[v[w‰[ž[wÑ[á[0Ÿá[ö[Pö[û[Rû[\w5\‹\0Ÿ‹\›\P›\§\S§\¹\0Ÿ¹\Ô\\Ô\ì\0Ÿì\þ\Pþ\]_]Z]0ŸZ]c]_c]w]Rw]„]P‘]Ea0Ÿ\a¡b0Ÿ·bc0ŸccPcCc0ŸZcpcP‡c‘cwžcµcRµcËcPËcÒcwâcøcPøcýd0Ÿýdewe'eP'eke0Ÿ‚e˜eP˜e±e‘¨z±eÍePÍe¥f0Ÿ¥f©fP©f´fV´fßfPßfêfVêfgRg3gV3gLgRLgg0ŸhTh0Ÿàhæi0Ÿq,¶:0Ÿ¶:;P;“;‘Øx“;¤;0Ÿ¤;Â;SÂ;P=‘ÈxP=[?0Ÿ¿C D0ŸDG0ŸG GYIHwHYwH›H‘ˆy›H‹L0Ÿ‹L—L‘Èx—LËL0ŸËLÚL‘ÈxÚLM0ŸM M‘Èx MWN0ŸWN—N‘Èx©NÚN‘ÈxßNO0ŸOkO‘ÈxkOP0ŸP!P‘Øx&POPPOPrP‘Èx‹PäP‘ÈxéPQ‘ÈxQ.Q0Ÿ.Q£QY£QÌQ‘ðy§RX0ŸXéXPéX Y‘zY®Y0Ÿ®YÆYPÆYËYYËYÐYw ZnZ0ŸnZ‚ZP‚Z•ZV•Z§Z0Ÿ§ZÂZ\ÂZÚZ0ŸÚZìZPìZ[_[I[0ŸI[R[_R[f[Yf[~[P‰[]0Ÿ]]P]Z]^Z]w]Pw]Ha0Ÿ\a¡b0Ÿ·b‡c0Ÿ‡cžcPžcâc0Ÿøcýd0ŸýdePe‚e0Ÿ‚e˜e‘z˜e±eP±e¥f0Ÿ¥fLg‘ÈxLgg0ŸhTh0Ÿhhæi0Ÿ¨;Â;0ŸÂ;æ;‘Øyæ;H=‘Øy#Ÿ‹L—L‘Øy#ŸËLÚL‘Øy#ŸM M‘Øy#ŸWNcNsŸcN—N‘Øy#Ÿ©NÚN‘Øy#ŸOkO‘Øy#ŸOP^PsŸ^PrP‘Øy#Ÿ‹P«PsŸ«PäP‘Øy#ŸéPîPSîP™Q‘ØyfYyYSyY…Y~…Y•ZsŸ\^._V§abV‡c·csŸËcäcsŸýdesŸ'e>eS¥fLg‘Øy#ŸLgg‘ØyhTh‘Øy< <0Ÿ <0<S0<<<V<<¼<vŸ¼<Ð<V‹L—LvŸËLÚLvŸM MvŸcN}NvŸ©NÃNvŸOBOvŸyYQZSQZgZPxZ•Z0Ÿ•ZA[]I[~[]‰[‘\]‘\§\0Ÿ§\I^]I^\^V\^`^~`^._vŸ§abvŸbŸbV·b9c]Cc‡c]žcµcPµc·cSËcäcSýdeS>R~[‘Ðy‰[9c‘ÐyCc¥f‘ÐygÉghÉgh‘Ðyhhæi‘ÐyS~[‘Øy‰[9c‘ØyCc¥f‘ØyhhŒhhŒhÍh‘Øyàhæi‘Øy¦S~[‘ày‰[9c‘àyCc¥f‘àyàhühhüh7i‘àyKiæi‘ày*T~[‘èy‰[9c‘èyCc¥f‘èyKi_ih_i•i‘èy©iæi‘èyŽT~[‘ðy‰[b‘ðyb9c‘ðyCc¥f‘ðy©iµihµiæi‘ðyÒT~[‘øy‰[b‘øybbhbFb‘øyZb9c‘øyCc¥f‘øyU~[‘€z‰[oa‘€zƒab‘€zZb^bh^b9c‘€zCc¥f‘€z[U~[‘ˆz‰[\a‘ˆzƒa‡ah‡ab‘ˆzb9c‘ˆzCc¥f‘ˆz„U~[ ‘(”0.ÿŸ‰[³_ ‘(”0.ÿŸ³_Ea ‘”0.ÿŸ§ab ‘(”0.ÿŸb9c ‘(”0.ÿŸCc¥f ‘(”0.ÿŸ._6_ ‘” $ &Ÿ6_<_U<_Ea ‘” $ &ŸÁ_`‘¸yÁ_`‘ÀyÁ_`‘Èyq,!?0Ÿ!?[?XŸ¿C D0ŸDãD0ŸãDèDXŸèDJE0ŸJEOEXŸOEÆE0ŸÆEËEXŸËEFF0ŸFFKFXŸKFG0ŸG G‘ÐxIH›H‘Ðx›H³P0Ÿ³PäPhŸéPŸb0Ÿ·bTe0ŸTekelŸkeæi0Ÿq,!?0Ÿ!?[? °‹Ÿ¿C D0ŸDãD0ŸãDèD °‹ŸèDJE0ŸJEOE °‹ŸOEÆE0ŸÆEËE °‹ŸËEFF0ŸFFKF °‹ŸKFG0ŸG G °‹ŸIH›H °‹Ÿ›H³P0Ÿ³PäP °‹ŸéPŸb0Ÿ·bTe0ŸTeke °‹Ÿkeæi0Ÿq,!?0Ÿ¿C D0ŸDãD0ŸãDèD È ŸèDJE0ŸJEOE Í ŸOEÆE0ŸÆEËE × ŸËEFF0ŸFFKF Ü ŸKFG0ŸG GwIH›Hw›H³P0Ÿ³PäP  ŸéPŸb0Ÿ·bTe0ŸTeke â Ÿkeæi0ŸÏ,j. '&ŸP=Ž= '&ŸDãD '&ŸOEdE '&Ÿ_F¯F '&ŸÏ,j.0ŸP=Ž=0ŸDãD0ŸOEdE0Ÿ_F¯F0ŸÏ,8-‘€{Ÿ8-Ý-QÝ-j.‘€{ŸP=Ž=‘€{ŸDãD‘€{ŸOEdE‘€{Ÿ_F¯F‘€{ŸÏ,j.1ŸP=Ž=1ŸDãD1ŸOEdE1Ÿ_F¯F1ŸÏ,j.LŸP=Ž=LŸDãDLŸOEdELŸ_F¯FLŸÏ,û,Xû,j.óXŸP=Ž=XDãDóXŸOEdEóXŸ_F¯FóXŸÏ,ê,‘ø|Ÿê,û,Tû,j.‘ø|ŸP=Ž=‘ø|ŸDãD‘ø|ŸOEdE‘ø|Ÿ_F¯F‘ø|Ÿ-Ý- '&ŸÝ-.P..P-8-‘€{Ÿ8-Ý-QÝ-&.‘€{Ÿ-0-‘°zŸ0-&.UP=‚=‘ø|ŸžDãDóXŸžDãD '&ŸžDãDLŸžDãD1ŸžDãD0ŸžDãD‘€{ŸžDãD‘ø|Ÿp.0 '&ŸŽ=Ú= '&Ÿz>”> '&ŸèDJE '&ŸGPG '&Ÿp.00ŸŽ=Ú=0Ÿz>”>0ŸèDJE0ŸGPG0Ÿp.Ø.‘€{ŸØ.}/Q}/0‘€{ŸŽ=Ú=‘€{Ÿz>”>‘€{ŸèDJE‘€{ŸGPG‘€{Ÿp.01ŸŽ=Ú=1Ÿz>”>1ŸèDJE1ŸGPG1Ÿp.0LŸŽ=Ú=LŸz>”>LŸèDJELŸGPGLŸp.0óYŸŽ=Ú=óYŸz>”>óYŸèDJEóYŸGPGóYŸp.ˆ.‘è}Ÿˆ. .T .0‘è}ŸŽ=Ú=‘è}Ÿz>”>‘è}ŸèDJE‘è}ŸGPG‘è}Ÿº.}/ '&Ÿ}/°/P³/¹/Pº.Ø.‘€{ŸØ.}/Q}/¹/‘€{Ÿº.Ð.‘°zŸÐ.¹/UŽ=Î=‘è}ŸEJEóYŸEJE '&ŸEJELŸEJE1ŸEJE0ŸEJE‘€{ŸEJE‘è}Ÿ 0 1 '&ŸÚ=*> '&Ÿ”>!? '&ŸËEäE '&ŸK>K '&Ÿ 0 10ŸÚ=*>0Ÿ”>!?0ŸËEäE0ŸK>K0Ÿ 0s0‘€{Ÿs01Q1 1‘€{ŸÚ=*>‘€{Ÿ”>!?‘€{ŸËEäE‘€{ŸK>K‘€{Ÿ 0 11ŸÚ=*>1Ÿ”>!?1ŸËEäE1ŸK>K1Ÿ 0 1LŸÚ=*>LŸ”>!?LŸËEäELŸK>KLŸ 0 1^Ú=*>^”>!?^ËEäE^K>K^ 0#0‘Ø~Ÿ#0;0T;0 1‘Ø~ŸÚ=*>‘Ø~Ÿ”>!?‘Ø~ŸËEäE‘Ø~ŸK>K‘Ø~ŸU01 '&Ÿ1P1PS1Y1PU0s0‘€{Ÿs01Q1Y1‘€{ŸU0k0‘°zŸk0Y1UÚ=>‘Ø~ŸÜ>!?^Ü>!? '&ŸÜ>!?LŸÜ>!?1ŸÜ>!?0ŸÜ>!?‘€{ŸÜ>!?‘Ø~Ÿ£1@3 '&Ÿ*>z> '&ŸdEÆE '&ŸKF_F '&ŸBIŽI '&Ÿ£1@30Ÿ*>z>0ŸdEÆE0ŸKF_F0ŸBIŽI0Ÿ£12‘€{Ÿ2½2Q½2@3‘€{Ÿ*>z>‘€{ŸdEÆE‘€{ŸKF_F‘€{ŸBIŽI‘€{Ÿ£1@31Ÿ*>z>1ŸdEÆE1ŸKF_F1ŸBIŽI1Ÿ£1@3LŸ*>z>LŸdEÆELŸKF_FLŸBIŽILŸ£1@3‘*>z>‘dEÆE‘KF_F‘BIŽI‘£1Ë1‘ˆ|ŸË1à1Tà1@3‘ˆ|Ÿ*>z>‘ˆ|ŸdEÆE‘ˆ|ŸKF_F‘ˆ|ŸBIŽI‘ˆ|Ÿú1½2 '&Ÿ½2ð2Pó2ù2Pú12‘€{Ÿ2½2Q½2ù2‘€{Ÿú12‘°zŸ2ù2U*>n>‘ˆ|ŸEÆE‘EÆE '&ŸEÆELŸEÆE1ŸEÆE0ŸEÆE‘€{ŸEÆE‘ˆ|ŸK3à4 '&Ÿ¿C D '&ŸäEFF '&ŸîFG '&ŸËIJ '&ŸK3à40Ÿ¿C D0ŸäEFF0ŸîFG0ŸËIJ0ŸK3³3‘€{Ÿ³3X4QX4à4‘€{Ÿ¿C D‘€{ŸäEFF‘€{ŸîFG‘€{ŸËIJ‘€{ŸK3à43Ÿ¿C D3ŸäEFF3ŸîFG3ŸËIJ3ŸK3à4MŸ¿C DMŸäEFFMŸîFGMŸËIJMŸK3à4_¿C D_äEFF_îFG_ËIJ_K3c3‘˜{Ÿc3{3T{3à4‘˜{Ÿ¿C D‘˜{ŸäEFF‘˜{ŸîFG‘˜{ŸËIJ‘˜{Ÿ•3X4 '&ŸX44P“4™4P•3³3‘€{Ÿ³3X4QX4™4‘€{Ÿ•3«3‘°zŸ«3™4U¿CþC‘˜{ŸFFF_FFF '&ŸFFFMŸFFF3ŸFFF0ŸFFF‘€{ŸFFF‘˜{Ÿæ;õ;UWN]NU<<K<U‹L‘LUˆ<®<SO*OSˆ<®<\O*O\ˆ<É<\M M\O=O\=OkOR<©<P©<®<pŸO)OPë?1A]ÓA÷A] DD]ï?1A\ÓA÷A\ DD\ó?1AVÓA÷AV DDVÔ? @ò<Ô? @ò„<Ô? @ò{<ç? @P @*@‘˜{Ÿ*@.@U.@/@‘˜{Ÿ!D9D‘˜{Ÿ/@W@‘ˆ|ŸW@[@U[@\@‘ˆ|Ÿ9DQD‘ˆ|Ÿ\@„@‘ø|Ÿ„@ˆ@Uˆ@‰@‘ø|ŸQDiD‘ø|Ÿ‰@±@‘è}Ÿ±@µ@Uµ@¶@‘è}ŸiDD‘è}Ÿ¶@Þ@‘Ø~ŸÞ@â@Uâ@ã@‘Ø~Ÿ D!D‘Ø~Ÿã@1AVÓA÷AVã@1A\ÓA÷A\ã@1A]ÓA÷A]ê@ AUÓAÞAUî@1A^ÓA÷A^ò@1ASÓA÷ASæ@ APÓAÜAP«ZÁZU½\Ó\UQÓQVLggVhThVQ£QQLgˆgQh6hQ6h?hv[gˆgQ#hTh8Ÿ``S`Ea ÿŸ`Ea0Ÿ"`R`‘˜{ŸR`V`UV`W`‘˜{ŸW`‡`‘ˆ|Ÿ‡`‹`U‹`Œ`‘ˆ|ŸŒ`¼`‘ø|Ÿ¼`À`UÀ`Á`‘ø|ŸÁ`ñ`‘è}Ÿñ`õ`Uõ`ö`‘è}Ÿö`*a‘Ø~Ÿ*a.aU.a4a‘Ø~Ÿði+jU+j„óUŸði×jT×jøjVøjKlóTŸKlZlTZl­lV­lënóTŸënoTo®oV®oýoóTŸýo=pV=p©qóTŸ©q²qV²q·qóTŸ·qÅqVÅqÌqóTŸÌqéqVéq÷qóTŸ÷qrVr róTŸ r)rV)r¥róTŸ¥rctVctPxóTŸPxˆxVˆxéxóTŸéxyVy›zóTŸ›z&{V&{â{óTŸâ{³|V³|¿|óTŸ¿|}V}}óTŸ}V}VV}`}óTŸ`}€}V€}Ž}óTŸŽ}Ó}VÓ} „óTŸ „„Tði×jQ×jKlóQŸKlZlQZlënóQŸën oQ o®o^®o¥róQŸ¥rct^ctéxóQŸéxy^y›zóQŸ›z&{^&{â{óQŸâ{o|^o|y|óQŸy|}^}}óQŸ}V}^V}Ž}óQŸŽ}Ó}^Ó} „óQŸ „„Q(jŽk0ŸŽkKl^Kl­l0ŸÌlCn^qnën^ën;q0Ÿ;qMq^Mqct0Ÿctšt^štLu0ŸLuPx^Px°y0Ÿ°yòy^òy&{0Ÿ&{â{^â{…}0Ÿ…}Ž}^Ž}Ó~0ŸÓ~^Ï€0ŸÏ€^é0Ÿî™‚^™‚ ƒ0Ÿ ƒûƒ^ûƒ„0Ÿ(j“k0Ÿ“kKl]Kl­l0ŸÌlCn]qnën]ën;q0Ÿ;qMq]Mqct0Ÿctšt]štLu0ŸLuPx]Px°y0Ÿ°yòy]òy&{0Ÿ&{â{]â{…}0Ÿ…}Ž}]Ž}Ó~0ŸÓ~]Ï€0ŸÏ€]é0Ÿî™‚]™‚ ƒ0Ÿ ƒûƒ]ûƒ„0Ÿ(j˜k0Ÿ˜kKl_Kl­l0ŸÌlCn_qnën_ën;q0Ÿ;qMq_Mqct0Ÿctšt_štLu0ŸLuPx_Px°y0Ÿ°yòy_òy&{0Ÿ&{â{_â{…}0Ÿ…}Ž}_Ž}Ó~0ŸÓ~_Ï€0ŸÏ€_é0Ÿî™‚_™‚ ƒ0Ÿ ƒûƒ_ûƒ„0Ÿ(jk0ŸkÊkYKl­l0Ÿën;q0ŸMqct0ŸštLu0ŸLuku‘ ~ºu"vYMvxvYPx°y0Ÿ°y¼yY¼yòy‘ ~òy&{0Ÿ&{X{YX{‰{‘ ~â{…}0Ÿ…}Ž}YŽ}Ó~0ŸÓ~í~Yí~‘ ~Ï€0Ÿé0Ÿ™‚ ƒ0Ÿûƒ„0Ÿ(j¦k0Ÿ¦k­kP­kÊk‘ˆÊkKl‘˜~Kl­l0ŸÌlCn‘˜~qnën‘˜~ën;q0Ÿ;qMq‘˜~Mqct0Ÿctšt‘˜~štLu0ŸLuºu‘˜~ºu"v‘ˆ"vMv‘˜~Mvxv‘ˆxvPx‘˜~Px°y0Ÿ°y¼y‘ˆ¼yòy‘˜~òy&{0Ÿ&{X{‘ˆX{â{‘˜~â{…}0Ÿ…}‰}‘ˆ‰}Ž}‘˜~Ž}Ó~0ŸÓ~í~‘ˆí~‘˜~Ï€0ŸÏ€‘˜~é0Ÿî™‚‘˜~™‚ ƒ0Ÿ ƒûƒ‘˜~ûƒ„0Ÿl1lP1lKl‘ ~×lCn‘ ~qnën‘ ~ctšt‘ ~xvPx‘ ~z‚™‚‘ ~(j­l0ŸÌlçl0ŸçlmZm@m‘¸~omtmZënct0Ÿštxv0Ÿ¿vÈvZPxé0Ÿîz‚0Ÿ™‚„0Ÿ&mLmPLmom‘¨~tm°m[qnšn[šnÎn‘°~ct{t‘°~xv¿v[z‚™‚[(j¦l0Ÿ¦lÌlXŸÌljm0ŸjmomXŸomCn0ŸqnÔz0ŸÔzàzXŸàz{0Ÿ{&{XŸ&{|0Ÿ|)|XŸ)|b|0Ÿb|o|XŸo|²|0Ÿ²|¿|XŸ¿|ø|0Ÿø|}XŸ}I}0ŸI}V}XŸV}Ç}0ŸÇ}Ó}XŸÓ}é0Ÿî„0Ÿ(j¦l0Ÿ¦lÌl °‹ŸÌljm0Ÿjmom °‹ŸomCn0ŸqnÔz0ŸÔzàz °‹Ÿàz{0Ÿ{&{ °‹Ÿ&{|0Ÿ|)| °‹Ÿ)|b|0Ÿb|o| °‹Ÿo|²|0Ÿ²|¿| °‹Ÿ¿|ø|0Ÿø|} °‹Ÿ}I}0ŸI}V} °‹ŸV}Ç}0ŸÇ}Ó} °‹ŸÓ}é0Ÿî„0Ÿ(j¦l0Ÿ¦l­l U Ÿ­lÄlTÌljm0Ÿjmom N ŸomCn0ŸqnÔz0ŸÔzàz  Ÿàz{0Ÿ{&{  Ÿ&{|0Ÿ|)| Ÿ)|b|0Ÿb|o|  Ÿo|²|0Ÿ²|¿|  Ÿ¿|ø|0Ÿø|} þ Ÿ}I}0ŸI}V} ù ŸV}Ç}0ŸÇ}Ó} ô ŸÓ}é0Ÿî„0Ÿ(j?n0Ÿ?nCnPqné0Ÿî„0Ÿ˜o¥oP¥o®o_¥r/t_9tGt_GtctŸ›z&{_â{o|_y|}_}K}_Ž}Ó}_ôn®o\¥r4t\9tct\éxy\›z&{\â{o|\y|º|\¿|}\}V}\Ž}Ó}\ „„\ÇsØsPìsýsPt&tP›zÔz8Ÿ›zÔz<Ÿ›zÔz9Ÿ›zÔz0Ÿ›zÔz V}Ÿ›zàz9Ÿ›zÔz E}Ÿàz{7Ÿàz{<Ÿàz{9Ÿàz{0Ÿàz{ V}Ÿàz&{9Ÿàz{ E}Ÿâ{|6Ÿâ{|<Ÿâ{|9Ÿâ{|0Ÿâ{| V}Ÿâ{)|9Ÿâ{| E}Ÿ)|b|5Ÿ)|b|<Ÿ)|b|9Ÿ)|b|0Ÿ)|b| V}Ÿ)|o|9Ÿ)|b| E}Ÿy|²|4Ÿy|²|<Ÿy|²|9Ÿy|²|0Ÿy|²| V}Ÿy|¿|9Ÿy|²| E}Ÿ¿|ø|3Ÿ¿|ø|<Ÿ¿|ø|9Ÿ¿|ø|0Ÿ¿|ø| V}Ÿ¿|}9Ÿ¿|ø| E}Ÿ}I}2Ÿ}I}<Ÿ}I}9Ÿ}I}0Ÿ}I} V}Ÿ}V}9Ÿ}I} E}ŸŽ}Ç}1ŸŽ}Ç}<ŸŽ}Ç}9ŸŽ}Ç}0ŸŽ}Ç} V}ŸŽ}Ó}9ŸŽ}Ç} E}Ÿ×jk}ýo7p}©q7r}Px}x}o|t|}`}u}}×jKl ÿŸÌlCn ÿŸqnën ÿŸ®o¥r ÿŸctéx ÿŸy›z ÿŸ&{â{ ÿŸo|y| ÿŸ}} ÿŸV}Ž} ÿŸÓ}é ÿŸî „ ÿŸ×jKl0ŸÌlCn0Ÿqnën0Ÿ®o¥r0Ÿctéx0Ÿy›z0Ÿ&{â{0Ÿo|y|0Ÿ}}0ŸV}Ž}0ŸÓ}é0Ÿî „0ŸójkP p7p}#Ÿ©q7r}#ŸÅqÇqvŸÇqÌqVäq÷qP÷q r|$r7rP8pPpPFpVp0ŸPx}x}o|t|}`}u}}_x}xP`}u}P®oÌoQPxvx0Ÿvxˆx š|Ÿˆx©xQo|y|0Ÿ`}n}0Ÿn}…} ž|Ÿ®oµoPµoÞoVPxˆx0Ÿˆx©xPo|y|0Ÿ`}€}0Ÿ€}…}P©xÎx\w\Џ\™‚Û‚\©xéx ÿŸÔ ÿŸ™‚Û‚ ÿŸ©xéx0ŸÔ0Ÿ™‚Û‚0ŸÀxÎxP a|ŸŠÔ|Ÿ¨‚Û‚|Ÿ07|”Ÿ7<VSaPŠ”|¨¸P°‚‚P¾‚Û‚0Ÿk8k]Îp6q]7r¥r]y`y]}}]Ó}ø}]~ª~]kKl ÿŸÌlCn ÿŸqnën ÿŸ{p©q ÿŸ7r¥r ÿŸctPx ÿŸy›z ÿŸ&{â{ ÿŸ}} ÿŸV}`} ÿŸ…}Ž} ÿŸÓ}ø} ÿŸ!~ ÿŸÔé ÿŸî™‚ ÿŸÛ‚ „ ÿŸkKl0ŸÌlCn0Ÿqnën0Ÿ{p©q0Ÿ7r¥r0ŸctPx0Ÿy›z0Ÿ&{â{0Ÿ}}0ŸV}`}0Ÿ…}Ž}0ŸÓ}ø}0Ÿ!~0ŸÔé0Ÿî™‚0ŸÛ‚ „0Ÿ)k8kPÛp q}Ÿ7r¥r}ŸQrerPzrŽrPŽr™r}r r|Ÿ r¥r\qqPq q0Ÿy`y]}}]Ó}ø}]~ª~]&yDyPÓ}è}P{p™pQy=y0Ÿ=yOy š|ŸOyqyQ}}0ŸÓ}á}0Ÿá}ø} ž|Ÿ{p‚pP‚p¬p\yOy0ŸOyqyP}}0ŸÓ}ó}0Ÿó}ø}Pqy–y]Ô€]%€²€]ƒ ƒ]qy°y ÿŸÔÏ€ ÿŸƒ ƒ ÿŸqy°y0ŸÔÏ€0Ÿƒ ƒ0Ÿ‡y–yPÔû}Ÿ0€Ï€}ŸÜïPëû0ŸN€U€}”ŸU€Z€\o€ƒ€Pƒ€Œ€}ž€²€PGkqk]MqŽq]štLu]òy@z]V}`}]`~~]ª~Ó~]GkKl ÿŸÌlCn ÿŸqnën ÿŸ;q©q ÿŸctPx ÿŸ°y›z ÿŸ&{â{ ÿŸV}`} ÿŸ…}Ž} ÿŸ!~~ ÿŸª~ ÿŸÏ€é ÿŸî™‚ ÿŸÛ‚ƒ ÿŸ ƒ „ ÿŸGkKl0ŸÌlCn0Ÿqnën0Ÿ;q©q0ŸctPx0Ÿ°y›z0Ÿ&{â{0ŸV}`}0Ÿ…}Ž}0Ÿ!~~0Ÿª~0ŸÏ€é0Ÿî™‚0ŸÛ‚ƒ0Ÿ ƒ „0ŸakqkPMquq}Ÿ«tLu}ŸUqiqPequq0ŸÞtátzŸátëtZuuPu%u}7uLuPòy@z]V}`}]`~~]ª~Ó~]z%zP`~q~Pòyz0Ÿz0z š|Ÿ0zQzQV}`}0Ÿ!~F~Q`~j~0Ÿj~~ ž|Ÿòy0z0Ÿ0zQzPV}`}0Ÿ!~/~P/~`~]`~|~0Ÿ|~~PQzwz]~]–º]Üé]Û‚ƒ]ûƒ „]Qz‘z ÿŸé ÿŸÛ‚ƒ ÿŸûƒ „ ÿŸQz‘z0Ÿé0ŸÛ‚ƒ0Ÿûƒ „0ŸgzwzPh}Ÿ–é}ŸÛ‚ƒ}Ÿ4:}”Ÿ:CPXhP¨ºPÜé}ã‚÷‚Pó‚ƒ0Ÿ¦kÊkXºu"vXMvxvX°y¼yX&{X{X…}Ž}XÓ~í~X¦kKl ÿŸÌlCn ÿŸqnën ÿŸ;qMq ÿŸctšt ÿŸLuPx ÿŸ°yòy ÿŸ&{â{ ÿŸ…}Ž} ÿŸÓ~ ÿŸÏ€ ÿŸî™‚ ÿŸ ƒûƒ ÿŸ¦kKl0ŸÌlCn0Ÿqnën0Ÿ;qMq0Ÿctšt0ŸLuPx0Ÿ°yòy0Ÿ&{â{0Ÿ…}Ž}0ŸÓ~0ŸÏ€0Ÿî™‚0Ÿ ƒûƒ0Ÿ¼kÊkPËu"vxŸMvxvxŸ°y¼yxŸøuúurŸúuÿuRv"vPMvVvxhvxvP½yÔyPÐyòy0Ÿ&{X{X…}Ž}XÓ~í~X5{X{PÓ~í~PLutuQ&{T{0ŸT{h{ š|Ÿh{‰{Q…}Ž}0ŸÓ~é~0Ÿé~ ž|ŸLuSuPSuWuXWutuZtu”u‘¨~&{h{0Ÿh{‰{P…}Ž}0ŸÓ~ø~0Ÿø~P‰{­{Xî‚XM‚z‚X ƒYƒXsƒ„ƒX„ƒ±ƒ‘ ~؃éƒXéƒûƒ‘ ~‰{Ø{ ÿŸîz‚ ÿŸ ƒûƒ ÿŸ‰{Ø{0Ÿîz‚0Ÿ ƒûƒ0ŸŸ{­{Pî‚xŸX‚z‚xŸ ƒ„ƒxŸ„ƒ±ƒ‘ ~#Ÿ‚‚P ƒ&ƒx”Ÿ&ƒ+ƒR+ƒ4ƒxFƒYƒP…ƒ¡ƒPƒ؃0ŸäklUÌl×lUîklpÿŸÌl×lpÿŸðlmUomtmUúlmpÿŸomtmpÿŸZl†lvZl¦l<ŸZl¦l9ŸZl¦l0ŸZl¦l V}Ÿl•l q1$q"# Ÿ•l¥lXl¥lRtmŠm1Ÿˆv¿v1Ÿz‚™‚1ŸtmŠm c}Ÿˆv¿v c}Ÿz‚™‚ c}ŸtmŠm^ˆv¿v^z‚™‚^¤v¿v^¤v¿v c}Ÿ‘m°m1ŸqnÈn1Ÿct{t1Ÿxvˆv1Ÿ‘m°m0ŸqnÈn0Ÿct{t0Ÿxvˆv0Ÿ‘m°m k}ŸqnÈn k}Ÿct{t k}Ÿxvˆv k}Ÿ‘m°mQqnšnQšn¨n‘¨~¨nÈn  -&ct{t‘¨~xvˆvQ‘m°m]qnÈn]ct{t]xvˆv]ct{t]ctwtQwt{t‘¨~ct{t k}Ÿ°mÂm1ŸÈnÎn1ŸÈv/w1Ÿ°mÂm0ŸÈnÎn0ŸÈv/w0Ÿ°mÂm n}ŸÈnÎn n}ŸÈv/w n}Ÿ°mÂmXÈnÎn  -&ÈvïvXïv/w‘¨~°mÂm_ÈnÎn_Èv/w_w/w_w*wX*w/w‘¨~w/w n}ŸÂmÝm1Ÿ/ww1ŸÂmÝm0Ÿ/ww0ŸÂmÝm q}Ÿ/ww q}ŸËmÝmQ/wOwQOww‘¨~xw‡wQ‡ww‘¨~xww q}ŸÝmým1Ÿwõw1ŸÝmým0Ÿwõw0ŸÝmým t}Ÿwõw t}ŸæmýmQw¯wQ¯wõw‘¨~Ýmým‘˜~wõw‘˜~Øwõw‘˜~ØwèwQèwõw‘¨~Øwõw t}Ÿýmn1ŸõwPx1Ÿýmn0ŸõwPx0Ÿýmn |}ŸõwPx |}ŸnnQõwxQxPx‘¨~8xGxQGxPx‘¨~8xPx |}Ÿ „W„UW„>«óUŸ „&…T&…%‰óTŸ%‰¢‰_¢‰å‰óTŸå‰ï‰T‹óTŸ‡‹HŒTHŒ@Ž_@ŽÿšóTŸÿšE›_E›€›óTŸ€›Ç›_Ç›ê›óTŸê›%œ_%œ?œóTŸ?œÉœ_ÉœåœóTŸåœ+_+žóTŸžÔž_ÔžôžóTŸôž:Ÿ_:ŸzŸóTŸzŸ _ û©óTŸû©ªTª>«óTŸ „&…Q&…%‰óQŸ%‰M‰\M‰å‰óQŸå‰ï‰Q‹óQŸ‡‹¬‹Q¬‹XŽ\XŽÿšóQŸÿš@›\@›€›óQŸ€›Ç›\Ç›ê›óQŸê›0œ\0œ?œóQŸ?œÉœ\ÉœåœóQŸåœ+\+žóQŸžÔž\ÔžôžóQŸôž:Ÿ\:ŸzŸóQŸzŸ»Ÿ\»ŸÀŸóQŸÀŸ \ û©óQŸû©ªQª>«óQŸT„&…0Ÿ&…]…‘Ð~%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘Ð~‡‹­Ž0Ÿ-‘Ð~ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘Ø~%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘Ø~‡‹­Ž0Ÿ-‘Ø~ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘à~%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘à~‡‹­Ž0Ÿ-‘à~ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘è~%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘è~‡‹­Ž0Ÿ-‘è~ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘ð~%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘ð~‡‹­Ž0Ÿ-‘ð~ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘ø~%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘ø~‡‹­Ž0Ÿ-‘ø~ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘€%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘€‡‹­Ž0Ÿ-‘€ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘ˆ%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘ˆ‡‹­Ž0Ÿ-‘ˆÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘‡‹­Ž0Ÿ-‘ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘˜%‰¢‰0Ÿå‰ï‰0ŸŠŠ‘˜‡‹­Ž0Ÿ-‘˜ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0ŸT„&…0Ÿ&…]…‘ %‰¢‰0Ÿå‰ï‰0ŸŠŠ‘ ‡‹­Ž0Ÿ-‘ ÿšE›0Ÿ€›Ç›0Ÿê›0œ0Ÿ?œÉœ0Ÿåœ+0ŸžÔž0Ÿôž:Ÿ0ŸzŸ 0Ÿû©ª0Ÿ]…0ˆ‘Ä}‘Ä} ŠŠPŠ*Š‘Ä}?‹‡‹‘Ä}­ŽÿŽ‘Ä}¯‘Ä}Å‘Ä}-㔑Ä},™ìš‘Ä}E›€›‘Ä}ǛꛑÄ}0œ?œ‘Ä}+ž‘Ä}:Ÿ[Ÿ‘Ä}nŸzŸ‘Ä}  ‘Ä}+ ? ‘Ä}V¡j¡‘Ä}~¡’¡‘Ä}'¢O¢‘Ä}¢§ð§‘Ä}©'©‘Ä}8ª`ª‘Ä}Ū᪑Ä}T„›‰0Ÿ›‰¼‰*Ÿå‰%Š0Ÿ%Š*Š*Ÿ*Š8›0Ÿ8›E›*ŸE›¹›0Ÿ¹›Ç›*ŸÇ›#œ0Ÿ#œ0œ*Ÿ0œxœ0Ÿxœ„œ*Ÿ„œ½œ0Ÿ½œÉœ*ŸÉœ0Ÿ+*Ÿ+Æž0ŸÆžÔž*ŸÔž-Ÿ0Ÿ-Ÿ:Ÿ*Ÿ:Ÿ³Ÿ0Ÿ³ŸÀŸ*ŸÀŸùŸ0ŸùŸ *Ÿ ¦0Ÿ’¦>«0ŸT„›‰0Ÿ›‰¼‰ °‹Ÿå‰%Š0Ÿ%Š*Š °‹Ÿ*Š8›0Ÿ8›E› °‹ŸE›¹›0Ÿ¹›Ç› °‹ŸÇ›#œ0Ÿ#œ0œ °‹Ÿ0œxœ0Ÿxœ„œ °‹Ÿ„œ½œ0Ÿ½œÉœ °‹ŸÉœ0Ÿ+ °‹Ÿ+Æž0ŸÆžÔž °‹ŸÔž-Ÿ0Ÿ-Ÿ:Ÿ °‹Ÿ:Ÿ³Ÿ0Ÿ³ŸÀŸ °‹ŸÀŸùŸ0ŸùŸ  °‹Ÿ ¦0Ÿ’¦>«0ŸT„›‰0Ÿ›‰¢‰ ÅŸ¢‰¹‰Tå‰%Š0Ÿ%Š*Š ¾Ÿ*Š8›0Ÿ8›E› •ŸE›¹›0Ÿ¹›Ç› ŸÇ›#œ0Ÿ#œ0œ ‹Ÿ0œxœ0Ÿxœ„œ †Ÿ„œ½œ0Ÿ½œÉœ ŸÉœ0Ÿ+ |Ÿ+Æž0ŸÆžÔž wŸÔž-Ÿ0Ÿ-Ÿ:Ÿ rŸ:Ÿ³Ÿ0Ÿ³ŸÀŸ mŸÀŸùŸ0ŸùŸ  hŸ ¦0Ÿ’¦>«0ŸT„‰0Ÿ%‰¼‰0Ÿå‰¦0Ÿ’¦>«0Ÿ%‰3‰]3‰M‰}ŸPŒ]ŒP]ŒŽ]ÿšE›]€›»›]ê›0œ]?œÉœ]åœ+]žÔž]ôž:Ÿ]zŸûŸ]%‰M‰S”‹PŽSÿšE›S€›Ç›Sê›0œS?œÉœSåœ+SžÔžSôž5ŸSzŸ Sû©ªSìýPÿš8›:Ÿÿš8›<Ÿÿš8›;Ÿÿš8›0Ÿÿš8› ‚}ŸÿšE›;Ÿÿš8› E}Ÿ€›¹›9Ÿ€›¹›<Ÿ€›¹›;Ÿ€›¹›0Ÿ€›¹› ‚}Ÿ€›Ç›;Ÿ€›¹› E}Ÿê›#œ8Ÿê›#œ<Ÿê›#œ;Ÿê›#œ0Ÿê›#œ ‚}Ÿê›0œ;Ÿê›#œ E}Ÿ?œxœ7Ÿ?œxœ<Ÿ?œxœ;Ÿ?œxœ0Ÿ?œxœ ‚}Ÿ?œ„œ;Ÿ?œxœ E}Ÿ„œ½œ6Ÿ„œ½œ<Ÿ„œ½œ;Ÿ„œ½œ0Ÿ„œ½œ ‚}Ÿ„œÉœ;Ÿ„œ½œ E}Ÿåœ5Ÿåœ<Ÿåœ;Ÿåœ0Ÿåœ ‚}Ÿåœ+;Ÿåœ E}ŸžÆž4ŸžÆž<ŸžÆž;ŸžÆž0ŸžÆž ‚}ŸžÔž;ŸžÆž E}Ÿôž-Ÿ3Ÿôž-Ÿ<Ÿôž-Ÿ;Ÿôž-Ÿ0Ÿôž-Ÿ ‚}Ÿôž:Ÿ;Ÿôž-Ÿ E}ŸzŸ³Ÿ2ŸzŸ³Ÿ<ŸzŸ³Ÿ;ŸzŸ³Ÿ0ŸzŸ³Ÿ ‚}ŸzŸÀŸ;ŸzŸ³Ÿ E}ŸÀŸùŸ1ŸÀŸùŸ<ŸÀŸùŸ;ŸÀŸùŸ0ŸÀŸùŸ ‚}ŸÀŸ ;ŸÀŸùŸ E}Ÿ/…]…‘¨ŠŠ‘¨9…]…pÿŸŠŠpÿŸ‚…%‰óUŸï‰ŠóUŸ*Ї‹óUŸ­ŽóUŸ-ÿšóUŸE›€›óUŸÇ›ê›óUŸ0œ?œóUŸÉœåœóUŸ+žóUŸÔžôžóUŸ:ŸzŸóUŸ ¦óUŸ’¦û©óUŸª>«óUŸ‚…0ˆ‘Ä}‘Ä}?‹‡‹‘Ä}­ŽÿŽ‘Ä}¯‘Ä}Å‘Ä}-㔑Ä},™ìš‘Ä}E›€›‘Ä}ǛꛑÄ}0œ?œ‘Ä}+ž‘Ä}:Ÿ[Ÿ‘Ä}nŸzŸ‘Ä}  ‘Ä}+ ? ‘Ä}V¡j¡‘Ä}~¡’¡‘Ä}'¢O¢‘Ä}¢§ð§‘Ä}©'©‘Ä}8ª`ª‘Ä}Ū᪑Ä}‚…±…S±…‰‘°~‘°~*Ї‹‘°~­Ž‘°~-Þ”‘°~Þ”ã”pã”ÿš‘°~E›€›‘°~Ǜꛑ°~0œ?œ‘°~ɜ圑°~+ž‘°~Ôžôž‘°~:ŸzŸ‘°~ ¦‘°~’¦û©‘°~ª>«‘°~‚…ã…Vã…‰‘¨~‘¨~*Ї‹‘¨~­Ž‘¨~-Ä”‘¨~Ĕєpє㔑ð}ã”ÿš‘¨~E›€›‘¨~Ǜꛑ¨~0œ?œ‘¨~ɜ圑¨~+ž‘¨~Ôžôž‘¨~:ŸzŸ‘¨~ ¦‘¨~’¦û©‘¨~ª>«‘¨~z…ª…Tª…‰‘ ~‘ ~*Ї‹‘ ~­Ž‘ ~-Ó“‘ ~Ó“ï“rï“ÿš‘ ~E›€›‘ ~Ǜꛑ ~0œ?œ‘ ~ɜ圑 ~+ž‘ ~Ôžôž‘ ~:ŸzŸ‘ ~ ¦‘ ~’¦û©‘ ~ª>«‘ ~¦…0ˆ0Ÿï‰Š0Ÿ?‹‡‹0Ÿ­ŽÿŽ0Ÿ¯0ŸÅ0Ÿ-ã”0Ÿã”/•‘ˆ~w–Ê–‘ˆ~˜W˜‘ˆ~,™ìš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0Ÿ+ž0Ÿ:Ÿ[Ÿ0ŸnŸzŸ0Ÿ  0Ÿ+ ? 0Ÿ™ ù ‘ˆ~V¡j¡0Ÿ~¡’¡0Ÿ¹¡'¢‘ˆ~'¢O¢0ŸO¢j¢‘ˆ~¤¤P¤{¤‘ˆ~¨¤¼¤‘ˆ~¥S¥‘ˆ~¢¥¦‘ˆ~L¦d¦‘ˆ~·¦Ö¦‘ˆ~ۦꦑˆ~¢§ð§0Ÿð§¨‘ˆ~©©‘ˆ~©'©0Ÿ'©Ó©‘ˆ~ª,ª‘ˆ~8ª`ª0ŸˆªŪ‘ˆ~Ūáª0Ÿáª «‘ˆ~¦…0ˆ0Ÿï‰Š0Ÿ?‹‡‹0Ÿ­ŽÿŽ0Ÿ¯0ŸÅ0Ÿ-ã”0Ÿã”/•‘Œ~w–Ê–‘Œ~˜W˜‘Œ~,™ìš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0Ÿ+ž0Ÿ:Ÿ[Ÿ0ŸnŸzŸ0Ÿ  0Ÿ+ ? 0Ÿ™ ù ‘Œ~V¡j¡0Ÿ~¡’¡0Ÿ¹¡'¢‘Œ~'¢O¢0ŸO¢j¢‘Œ~a¤{¤‘Œ~°¤¼¤‘Œ~¢¥¦‘Œ~L¦d¦‘Œ~·¦Ö¦‘Œ~¢§ð§0Ÿ©©‘Œ~©'©0Ÿ'©Ó©‘Œ~ª,ª‘Œ~8ª`ª0ŸˆªŪ‘Œ~Ūáª0Ÿáª «‘Œ~¢•w–‘¨}ɜ圑¨}… ™ ‘¨}j¡~¡‘¨}g¥{¥‘¨}Ó©û©‘¨}8—˜‘¸}Ôžôž‘¸}!¡V¡‘¸}¦$¦‘¸}ƒ§¢§‘¸},ª8ª‘¸} ««‘¸}˜˜,™‘È}t¢5£‘È}{¤¨¤‘È}S¥g¥‘È}i¦¦‘È}’¦·¦‘È}ꦃ§‘È}”¨©‘È}«>«‘È}=†&ˆ‘˜}‘˜}­Žߎ‘˜}?‘˜}^o‘˜}ÅÙ‘˜}éÿ‘˜}‘˜}-H‘˜}_o‘˜}t‡‘˜}–¯‘˜}¼Ý‘˜}ä÷‘˜} ‘+“‘˜};“˜“‘˜},™ÿ™‘˜}šMš‘˜}Tšfš‘˜}všìš‘˜}E›p›‘˜}0œ?œ‘˜}+c‘˜}:Ÿ[Ÿ‘˜}nŸzŸ‘˜}Á§ʧ‘˜}ŪÔª‘˜}î†0ˆ‘°}?‘°}^o‘°}_r”‘°},™ìš‘°}E›€›‘°}Ǜ؛‘°}0œ?œ‘°}+ž‘°}:Ÿ[Ÿ‘°}nŸzŸ‘°}  ‘°}V¡j¡‘°}~¡’¡‘°}'¢O¢‘°}¢§ð§‘°}©'©‘°}8ªLª‘°}Ū᪑°}’‡0ˆ‘Ð}ä㔑Ð},™ìš‘Ð}E›€›‘Ð}ǛꛑÐ}0œ?œ‘Ð}+ž‘Ð}:Ÿ[Ÿ‘Ð}nŸzŸ‘Ð}  ‘Ð}+ ? ‘Ð}V¡j¡‘Ð}~¡’¡‘Ð}'¢O¢‘Ð}¢§ð§‘Ð}©'©‘Ð}8ª`ª‘Ð}Ū᪑Ð}‚…0ˆ0Ÿ0ˆ‰V0Ÿ*Š?‹V?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽV¯0Ÿ¯ÅPÅ0Ÿ-,’0Ÿ,’=’P=’—’V—’û’0Ÿû’?™V?™vš0Ÿvš‚šV‚š«š0Ÿ«šÿšVE›€›VÇ›ê›V0œ?œVÉœåœV+A0ŸAžVÔžôžV:ŸzŸV ´¡V´¡¹¡P¹¡Ò¢VÒ¢Ф\Ф¨¤V¨¤å¤\夥S¥8¥\8¥S¥SS¥¥V¥¢¥P¢¥?¦V?¦L¦PL¦¦V’¦Û¦VÛ¦ê¦\ê¦ð§Vð§ý§\ý§¨S¨¨\¨¨S¨K¨\K¨k¨Sk¨z¨\z¨”¨S”¨ ¨\ ¨¼¨S¼¨ר\רá¨Vá¨ù¨\ù¨'©V'©C©\C©¿©S¿©û©VªªVª,ªP,ª`ªV`ªmª\mªˆªSˆª¬ªV¬ª±ªP±ªŪVŪáª0Ÿáª«V« «P «>«V‚… ‰0Ÿ ‰‰_0Ÿ*Ї‹0Ÿ­Ž0Ÿ-’0Ÿ—’÷š0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ ¦0Ÿ’¦=©0Ÿ¿©û©0Ÿª>«0Ÿ‚…±…0Ÿ±…Å…PÅ…ó…Só…†0Ÿ†¥†P¥†î†S0Ÿ‡‡P‡H‡SH‡º‡0Ÿº‡ʇPʇIˆSScŠŽŠS?‹P‹0ŸP‹Z‹SZ‹‡‹0Ÿ­Ž¿ŽS¿ŽÄŽPÄŽߎSߎïŽPÿŽ/0Ÿ/^S^o0ŸoŒSŒ÷0ŸP-_S_tPt¼S¼ï0Ÿ ‘O‘SO‘«˜0Ÿ«˜»˜P»˜,™‘Ð},™?™0Ÿ?™L™PL™Ô™SÔ™ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ASAž0ŸÔžôž0Ÿ:Ÿ[Ÿ0ŸnŸzŸ0Ÿ t¢0Ÿt¢”¢‘Ð}¥¢S¥0ŸS¥g¥Pg¥i¦0Ÿi¦¦‘Ð}’¦·¦‘Ð}·¦ §0Ÿ §ƒ§‘Ð}ƒ§û©0ŸªŪ0ŸÅªáªS᪫0Ÿ«>«‘Ð}‚…Ì…0ŸÌ…Ü…PÜ…ý…_ý…t†0Ÿt†‰†P‰†¯†_¯†!‡0Ÿ!‡1‡P1‡R‡_R‡£‡0Ÿ£‡³‡P³‡Xˆ_0Ÿ@ŠŽŠ_?‹P‹0ŸP‹s‹_s‹‡‹0Ÿ­ŽÏŽ_ÏŽÿŽ0ŸÿŽ_ 0Ÿ ?_?^P^o0ŸoŒ_Œé0Ÿé÷P÷_-t0Ÿt–P–¼_¼ä0ŸäïPïO‘_O‘˜0ŸÂ˜Ò˜PÒ˜,™\,™?™0Ÿ?™Ô™_Ô™ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+A_Až0ŸÔžôž0Ÿ:ŸzŸ0Ÿ t¢0Ÿt¢¥¢\¥¢i¦0Ÿi¦¦P’¦·¦\·¦ §0Ÿ §ƒ§\ƒ§û©0ŸªŪ0ŸÅªáª_᪫0Ÿ«>«\‚…ã…0Ÿã…ý…Pý…=†V=†T†0ŸT†m†Pm†¥†‘°}¥†8‡0Ÿ8‡H‡PH‡’‡V’‡Iˆ0Ÿï‰Š0ŸcŠŽŠ0Ÿ?‹P‹VP‹T‹PT‹‡‹V­Ž¿Ž0Ÿ¿ŽÏŽ‘°}ÏŽïŽ0ŸÿŽY/V/4P4?V?^0Ÿ^oVoŒPŒ¸V¸ÅYÅéPé‘°}-–0Ÿ–¼P¼äV䟑0Ÿ’&’0Ÿ&’,’P,’D’0ŸD’T’PT’r’Y|’—’0Ÿû’ “Y “#“‘¨};“X“0ŸX“h“Ph“†“Y“x—0Ÿx—’—P˜N˜0ŸN˜˜˜\˜˜,™0Ÿ?™è™0Ÿš$š0ŸTš‚šP‚šÿš0ŸE›Q›YQ›h›‘¨}Ç›ê›0ŸÉœåœ0Ÿ+R0ŸRgPgž‘˜}žž0Ÿ:ŸnŸ0ŸnŸzŸP S 0ŸS e \e u 0Ÿu … \… ® 0Ÿ® À PÀ æ \æ !¡0Ÿ!¡2¡P2¡4¡Y4¡?¡‘È}V¡³¢0Ÿ³¢È¢PȢݢ\Ý¢ú¢0Ÿú¢ £P £j£Sj£{¤0Ÿ{¤™¤\™¤¤P¤¨¤\¨¤$¦0Ÿ$¦L¦\L¦[¦0Ÿ[¦i¦\i¦¦0Ÿ’¦ê¦0Ÿê¦ §P §ƒ§0Ÿƒ§ЧP¢§©§‘˜}Á§ʧPʧܧ‘˜}ܧk¨0Ÿk¨q¨Sq¨”¨Y”¨š¨Sš¨¼¨Y¼¨á¨SᨩP©û©0Ÿª,ª\8ª «0Ÿ«>«0Ÿ†Ά‘˜}Άq‡‘°}q‡0ˆ‘Ð}‘˜}s‹‡‹‘˜}­ŽÏŽ‘˜}ÏŽߎ‘°}?‘°}^o‘Ð}Œ”c”­‘˜}ÅÙ‘˜}éÿ‘˜}‘˜}-4d4¼‘°}¼ÄeÄô‘‘Ð}ô‘’a—’Ü’‘Ð}X•w–‘¨}î–˜‘¸}w˜,™‘È}?™$š‘Ð}$š.ša.šTš‘Ø}‚š«š‘Ð}ɜ圑¨}+A‘Ð}Ôžôž‘¸}? S ‘¨}u … ‘È}… ™ ‘¨} ¡V¡‘¸}j¡~¡‘¨}’¡–¡h–¡¹¡‘¨}t¢5£‘È}{¤¨¤‘È}S¥g¥‘È}g¥{¥‘¨}{¥¥h¥¢¥‘¸}¦$¦‘¸}$¦(¦h(¦L¦‘È}i¦¦‘È}’¦·¦‘È}ꦃ§‘È}ƒ§¢§‘¸}”¨©‘È}Ó©û©‘¨},ª8ª‘¸}Ū᪑Ð} ««‘¸}«>«‘È}š…0ˆ0Ÿ0ˆIˆR0ŸcŠ{ŠR{ŠŽŠ‘ }?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽR0Ÿ-Ù˜0ŸÙ˜ê˜Pꘙ_™,™R,™d™0Ÿd™“™R™¡™R¡™¿™‘Ø}¿™ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+6R6A‘Ø}Až0ŸÔžôž0Ÿ:ŸzŸ0Ÿ t¢0Ÿt¢¥¢_¥¢@£0Ÿ@£n£Pn£…£_…£¦0Ÿ’¦·¦P·¦ §0Ÿ §ƒ§_ƒ§)¨0Ÿ)¨f¨_f¨k¨Rk¨”¨P”¨û©0ŸªŪ0ŸÅªáª‘Ø}᪫0Ÿ«"«_"«>«Ró‡ˆ0Ÿ ‘‘0ŸI”” ÿŸ”/•‘˜}/•4•rŸ4•w–‘˜}\™™0Ÿ™Ô™1ŸÜ›ê›0ŸÉœåœ‘˜}+A0Ÿ S ‘˜}… ™ ‘˜}j¡y¡‘˜}’¡²¡‘˜}¹¡'¢‘˜}O¢^¢R^¢j¢‘˜}j¢o¢rŸo¢t¢Rg¥v¥‘˜}¿©â©‘˜}ç©ö©‘˜}8ª`ª ÿŸÅªáª1Ÿáª«‘˜}r’—’S“#“P;“†“S,™?™SØšàšPàšìš ‘Ä}”0.ÿŸE›V›SAž s $0.ÿŸnŸzŸS'¢O¢ s $0.ÿŸÝ¢ñ£ ‘Ä}”0.ÿŸñ£5¤SS¤k¤Sk¤{¤P¨¤º¤Sº¤¼¤P¼¤ͤ ‘Ä}”0.ÿŸÍ¤è¤P¥¥S ¥;¥PÛ¦ê¦S¢§ð§ s $0.ÿŸð§ó§S¨© ‘Ä}”0.ÿŸ©'© s $0.ÿŸ'©.©P`ªˆª ‘Ä}”0.ÿŸ†“˜“S«šØšSV›h›P0œ?œS:ŸDŸSDŸ[ŸPi¤k¤‘Œ~k¤{¤Pº¤¼¤P'©.©Pr””P”㔑°}Ü›ê›0Ÿ+ ? ‘°}Lª`ªP2–e– ÿŸe–˜Sàœåœ0ŸÔžôžSe u S ¡V¡S{¥$¦S·¦Û¦Sƒ§¢§SÓ©û© ÿŸ,ª8ªSˆªŪS ««S[–e–Pe–w–‘Ø}àœåœ0ŸÓ©ç©P¼—ÿ— ÿŸÿ—'™]ïžôž0ŸS e ]u … ]™ ù ]?¡V¡]t¢g¥]$¦ƒ¦]’¦¯¦]Û¦ƒ§]ð§©]'©¿©]ª,ª],ª8ª ÿŸ`ªˆª] «« ÿŸ««]ò—û—Pû—ÿ— ‘À~##àÿ—˜‘à}ïžôž0Ÿ?¡V¡‘à} ««P¦…0ˆ0Ÿ0ˆXˆ^0Ÿ@ŠŽŠ^?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽ^0Ÿ-ã˜0Ÿ,™ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ t¢0ŸÒ¢£0Ÿ£!£P!£j£Vj£Ф0Ÿ¨¤¦0Ÿ’¦ê¦0Ÿ%§ƒ§Sƒ§k¨0Ÿk¨}¨V}¨”¨^”¨£¨V£¨¼¨^¼¨á¨Pá¨û©0Ÿª«0Ÿ«'«S'«>«Y¦…0ˆ0Ÿ0ˆIˆ]0ŸcŠŽŠ]?‹‡‹0Ÿ­Ž0Ÿ-ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ ¦0Ÿ’¦§0Ÿ§<§Q<§E§‘˜~R§V§QV§o§‘˜~o§û©0Ÿª«0Ÿ«>«‘˜~ã˜,™0Ÿt¢ƒ¢0Ÿ §R§0ŸR§ƒ§1Ÿ«>«1Ÿ¦…Iˆ0Ÿï‰Š0ŸcŠŽŠ0Ÿ?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽ\0Ÿ-™0Ÿ™,™P,™ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ t¢0Ÿt¢ƒ¢Pƒ¢¬¢X¬¢È¢‘Ð}È¢"£0Ÿ"£9£P9£j£‘È}j£u£0Ÿu£…£PãÝ£PÝ£ñ£Xû£%¤0Ÿ%¤?¤P?¤S¤X]¤™¤0Ÿ™¤¨¤‘Ð}¨¤¼¤0Ÿ¼¤ȤXȤ褑È}¥¥X¥;¥‘È}S¥¦0Ÿ’¦Û¦0Ÿê¦ §‘Ð} §]§0Ÿ]§~§P~§ƒ§Xƒ§ð§0Ÿð§¨P)¨2¨P2¨7¨X7¨B¨‘È}B¨k¨Pk¨”¨‘È}”¨¼¨P¼¨û©0Ÿª`ª0Ÿˆª«0Ÿ«>«P¦…0ˆ0Ÿ0ˆ ‰‘˜}0Ÿ*Š?‹‘˜}?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽ‘˜}¯0Ÿ¯Å‘˜}Å0Ÿ-ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ ¦0Ÿ’¦û©0Ÿª>«0Ÿ¦…0ˆ0Ÿ0ˆ ‰ °‹Ÿï‰Š0Ÿ*Š?‹ °‹Ÿ?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽ °‹Ÿ¯0Ÿ¯Å °‹ŸÅ0Ÿ-ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ ¦0Ÿ’¦û©0Ÿª>«0Ÿ¦…0ˆ0Ÿ0ˆ ‰w0Ÿ*Š?‹w?‹‡‹0Ÿ­ŽÿŽ0ŸÿŽw¯0Ÿ¯ÅwÅ0Ÿ-ÿš0ŸE›€›0ŸÇ›ê›0Ÿ0œ?œ0ŸÉœåœ0Ÿ+ž0ŸÔžôž0Ÿ:ŸzŸ0Ÿ ¦0Ÿ’¦û©0Ÿª>«0Ÿq™“™P+/P™“™U+6UO‘Ÿ‘0ŸÔ™è™0Ÿš$š0Ÿ‚š«š0ŸO‘…‘TÔ™á™TššTš$š‘Ø}O‘‘VÔ™è™Vš$šV‘’‘P’‘Ÿ‘V‚š«šVZ‘Ÿ‘SÔ™è™Sš$šS‚š«šSJ’T’PT’r’Yû’ “Y ““‘¨}T’r’pÿŸû’ “pÿŸ^“h“Ph“†“YE›Q›YQ›V›‘¨}h“†“pÿŸE›Q›pÿŸÇ¥ߥPˆªªPÁ Ù Pª ªP§ƒ§S«'«S'«>«YÒ¢£V{¤ФVá¨ä¨VɣݣPÝ£ñ£X¼¤ȤXȤͤ‘È}Ó£ñ£sÿŸ¼¤ͤsÿŸ+¤?¤P?¤S¤X¥¥X¥ ¥‘È}5¤S¤sÿŸ¥ ¥sÿŸÞ¡ö¡PáªèªPºšØšpÿŸ:ŸCŸpÿŸM‰|‰M‰›‰<ŸM‰›‰;ŸM‰›‰0ŸM‰›‰ ‚}Ÿ†‰Љq ŸŠ‰š‰X†‰š‰R@«Ÿ«UŸ«’¬óUŸ’¬¤¬U¤¬­óUŸ­Q­UQ­±óUŸ@«Ÿ«TŸ«Ç«SÇ«-¬óTŸ-¬A¬SA¬’¬óTŸ’¬ú­Sú­®óTŸ®Y®SY®0°óTŸ0°`°S`°ްóTŸŽ°Ô°SÔ°±óTŸ±±S±±óTŸ@«Ÿ«QŸ«’¬óQŸ’¬¤¬Q¤¬­óQŸ­U­QU­×­\×­®óQŸ®Y®\Y®0°óQŸ0°`°\`°ްóQŸŽ°Ô°\Ô°±óQŸ±±\±±óQŸa«Ÿ«0ŸŸ«©«‘ ’¬æ­0Ÿ®Y®0Ÿ0°`°0ŸŽ°Ô°0Ÿ±±0Ÿa«Ÿ«0ŸŸ«©«‘¨’¬æ­0Ÿ®Y®0Ÿ0°`°0ŸŽ°Ô°0Ÿ±±0Ÿa«Ÿ«0ŸŸ«©«‘°’¬æ­0Ÿ®Y®0Ÿ0°`°0ŸŽ°Ô°0Ÿ±±0Ÿa« ¬0Ÿ-¬à¬0Ÿà¬­JŸ­M®0ŸM®Y®JŸY®[°0Ÿ[°`°JŸ`°ǰ0ŸÇ°Ô°JŸÔ°j±0Ÿo±±0Ÿa« ¬0Ÿ-¬à¬0Ÿà¬­ °‹Ÿ­M®0ŸM®Y® °‹ŸY®[°0Ÿ[°`° °‹Ÿ`°ǰ0ŸÇ°Ô° °‹ŸÔ°j±0Ÿo±±0Ÿa« ¬0Ÿ-¬à¬0Ÿà¬ç¬ ËŸç¬þ¬T­M®0ŸM®Y® ¸ŸY®[°0Ÿ[°`° ¼Ÿ`°ǰ0ŸÇ°Ô° ³ŸÔ°j±0Ÿo±±0Ÿ]­|­P|­‹­}Ÿ‹­Ü­]®Y®]0°`°]ްÔ°]±±}Ÿ’¬¤¬V­á­V®Y®V0°`°VްÔ°V±±V®M®2Ÿ®M®3Ÿ®M®1Ÿ®M® “}Ÿ®Y®3Ÿ®M® 3}ŸŽ°ǰ1ŸŽ°ǰ3ŸŽ°ǰ “}ŸŽ°Ô°3ŸŽ°ǰ 3}ŸŸ« ¬óUŸ-¬’¬óUŸæ­®óUŸY®0°óUŸ`°ްóUŸÔ°±óUŸ±j±óUŸo±±óUŸŸ«©«‘°Ÿ«©«‘¨Ÿ«©«‘ Ÿ«ÿ«0Ÿ-¬’¬0Ÿæ­®0ŸY®0°0Ÿ`°ް0ŸÔ°±0Ÿ±j±0Ÿo±±0Ÿ²«À« p $@L$)ÿŸ-¬:¬ p $@L$)ÿŸŸ«Ç«0ŸÇ«Ü«PÜ«æ«Qæ« ¬S-¬A¬0ŸA¬K¬PK¬’¬Sæ­ú­0ŸY®z®Pz®®0Ÿ®0°S`°ްSÔ°±S±j±So±±SŸ« ¬0Ÿ-¬’¬0Ÿæ­ú­0ŸY®z®0Ÿz®®OŸ®ª¯0Ÿª¯ůQůÓ¯‘˜Ó¯ë¯0Ÿë¯÷¯MŸ÷¯0°0Ÿ`°ް0ŸÔ°±0Ÿ±j±0Ÿo±±0ŸŸ« ¬0Ÿ-¬’¬0Ÿæ­ú­0ŸY®z®0Ÿz®® °‹Ÿ®ª¯0Ÿª¯Ó¯ °‹ŸÓ¯ë¯0Ÿë¯÷¯ °‹Ÿ÷¯0°0Ÿ`°ް0ŸÔ°±0Ÿ±j±0Ÿo±±0ŸŸ« ¬0Ÿ-¬’¬0Ÿæ­ú­0ŸY®z®0Ÿz®® Ÿ®ª¯0Ÿª¯ůTůÓ¯‘œÓ¯ë¯0Ÿë¯÷¯ øŸ÷¯0°0Ÿ`°ް0ŸÔ°±0Ÿ±j±0Ÿo±±0ŸŸ«²«2Ÿæ­ú­2Ÿª«²«Pæ­ú­PG¬K¬PK¬¬S®”¯SÓ¯ë¯S÷¯0°S`°ްSÔ°±S±j±So±±SX¬¬SÓ¯ã¯SX¬’¬SÓ¯ë¯S`¬‰¬P‰¬¬pŸÓ¯â¯P®™¯S÷¯0°S`°ްSÔ°±S±j±So±±SŽ®›®TÔ°å°Tå°é° ˜,&o±v±TŽ®p¯S÷¯0°S`°ްSÔ°±S±j±So±±S¯p¯0Ÿ`°~°0Ÿ±j±0ŸŽ®[¯0Ÿ÷¯°0Ÿ° °P °°]~°ް0ŸÔ°±0Ÿ±j±0Ÿo±±0ŸŽ®Ÿ®SÔ°ò°So±±SŽ®›®PÔ°ذPذé°so±v±s¿®G¯_~°ް_ò°±_±>±_Ý®¯P¯p¯]`°~°]~°ƒ°Pƒ°ް]ò°±P±j±]Ò®p¯^`°ް^ò°±^±j±^¯[¯0Ÿ±j±0Ÿ¯[¯]±j±]¯[¯^±j±^G¯K¯PK¯[¯_>±j±_¯X¯V±±V#±9±V>±I±V¤¬»¬s¤¬à¬3Ÿ¤¬à¬1Ÿ¤¬à¬ “}Ÿ¤¬ç¬3Ÿ¤¬à¬ 3}Ÿ€±¤±U¤±ª²‘Ð}ª²í²óUŸí² ³‘Ð} ³öÂóUŸöÂ'ÑÐ}'ÃÌÃóUŸÌÃØÃ‘Ð}ØÃÄóUŸÄ>Ä‘Ð}>Ä@ÄóUŸ@Ä~Ä‘Ð}~ăÄóUŸƒÄÄ‘Ð}ÄÄóUŸÄÙÄ‘Ð}ÙÄæÄóUŸæÄøÄ‘Ð}øÄÅóUŸÅAÅ‘Ð}AÅ^ÅóUŸ^ŇőÐ}‡Å²ÙóUŸ€±űTű ³‘è} ³öÂóTŸöÂ/Ñè}/ÃÌÃóTŸÌÃNÅ‘è}NÅ^ÅóTŸ^Ōőè}ŒÅ²ÙóTŸ€±űQű²²‘Ø}²²í²óQŸí² ³‘Ø} ³öÂóQŸöÂ/ÑØ}/ÃÌÃóQŸÌÃàÑØ}àÃÄóQŸÄ˜Ä‘Ø}˜ÄÄóQŸÄáÄ‘Ø}áÄæÄóQŸæÄÅ‘Ø}ÅÅóQŸÅIÅ‘Ø}IÅ^ÅóQŸ^ŌőØ}ŒÅ²ÙóQŸ€±űRű ³‘à} ³öÂóRŸöÂ/Ñà}/ÃÌÃóRŸÌÃNÅ‘à}NÅ^ÅóRŸ^Ōőà}ŒÅ²ÙóRŸ€±űXű½²_½²è²wè²í²‘ð}”#Ÿí² ³_ ³ ³w ³öÂóXŸöÂ/Ã_/ÃÌÃóXŸÌÃëÃ_ëÃÄwÄÄ‘ð}”#ŸÄNÅ_NÅ^ÅóXŸ^ÅŒÅ_ŒÅ²ÙóXŸ€±űaű ³‘ø} ³öÂóõ)ŸöÂ/Ñø}/ÃÌÃóõ)ŸÌÃNÅ‘ø}NÅ^Åóõ)Ÿ^Ōőø}ŒÅ²Ùóõ)ŸÁ±űPűÓ±SÓ± ³‘ð} ³öÂóX1ŸöÂ/Ñð}/ÃÌÃóX1ŸÌÃØÃSØÃNÅ‘ð}NÅ^ÅóX1Ÿ^Ōőð}ŒÅ²ÙóX1Ÿî±Ô²b‘È}w” $ &‘È}‘È}w” $ &w” $ &0.‘È}‘È}w” $ &w” $ &w” $ &'0-ÿŸí² ³b‘È}w” $ &‘È}‘È}w” $ &w” $ &0.‘È}‘È}w” $ &w” $ &w” $ &'0-ÿŸö Ãb‘È}w” $ &‘È}‘È}w” $ &w” $ &0.‘È}‘È}w” $ &w” $ &w” $ &'0-ÿŸƒÄNÅb‘È}w” $ &‘È}‘È}w” $ &w” $ &0.‘È}‘È}w” $ &w” $ &w” $ &'0-ÿŸ^ÅkÅb‘È}w” $ &‘È}‘È}w” $ &w” $ &0.‘È}‘È}w” $ &w” $ &w” $ &'0-ÿŸ²è²b‘€~w” $ &‘€~‘€~w” $ &w” $ &0.‘€~‘€~w” $ &w” $ &w” $ &'0-ÿŸí² ³b‘€~w” $ &‘€~‘€~w” $ &w” $ &0.‘€~‘€~w” $ &w” $ &w” $ &'0-ÿŸöÂÃb‘€~w” $ &‘€~‘€~w” $ &w” $ &0.‘€~‘€~w” $ &w” $ &w” $ &'0-ÿŸæÄNÅb‘€~w” $ &‘€~‘€~w” $ &w” $ &0.‘€~‘€~w” $ &w” $ &w” $ &'0-ÿŸ^ÅÅb‘€~w” $ &‘€~‘€~w” $ &w” $ &0.‘€~‘€~w” $ &w” $ &w” $ &'0-ÿŸ:²è²b‘ˆ~w” $ &‘ˆ~‘ˆ~w” $ &w” $ &0.‘ˆ~‘ˆ~w” $ &w” $ &w” $ &'0-ÿŸí² ³b‘ˆ~w” $ &‘ˆ~‘ˆ~w” $ &w” $ &0.‘ˆ~‘ˆ~w” $ &w” $ &w” $ &'0-ÿŸöÂÃb‘ˆ~w” $ &‘ˆ~‘ˆ~w” $ &w” $ &0.‘ˆ~‘ˆ~w” $ &w” $ &w” $ &'0-ÿŸ^ÅÅb‘ˆ~w” $ &‘ˆ~‘ˆ~w” $ &w” $ &0.‘ˆ~‘ˆ~w” $ &w” $ &w” $ &'0-ÿŸ€± ´0Ÿ ´á´^£¿ÿ¿0ŸÀBÀw«ÀBÁwBÁPÁ‘°}PÁYÁTYÁÂw×Â/Ã0ŸIÃŒÅ0ŸŸÅ¨Å0Ÿ.Æ=Æ0Ÿ=ÆdÆ^ØÆÇ0ŸíÊòÊ^á´Þµ‘€~%¸£¿‘ˆŒÅŸÅ‘€~¨Å.Æ‘€~dÆØÆ‘€~ÇŠÇ‘€~ìÇGÈ‘€~GÈyÈ‘ˆ¦ÈÉ‘ˆSɇɑˆòÊ0Ë‘ˆLË)Ì‘ˆ;̱ґˆgÓ`Ö‘ˆ×²Ù‘ˆµ¦µ‘È}ºº£¿‘Ô~ŒÅŸÅ‘È}¨ÅìÅ‘È}úÅ.Æ‘È}›Æ®Æ‘È}Ç|Ç‘È}òÊ0Ë‘Ô~LË)Ì‘Ô~;Ì:БÔ~LÐ]Ñ‘Ô~bѱґÔ~ Ó`Ö‘Ô~}ضؑÔ~,µpµSpµuµsŸ-½—¿‘ø~ŒÅŸÅS¨Å«ÅSúÅÆSòÊ0Ë‘ø~LË)Ì‘ø~;Ì:Бø~LÐEÑ‘ø~bѱґø~'Ö`Ö‘ø~ ´£¿8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸŒÅŸÅ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ¨ÅÂÅ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸúÅ'Æ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ=ÆOÆ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸdÆhÆ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ›ÆÅÆ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÇbÇ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸŠÇ·Ç8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸìÇÈ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸGÈ‘È8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ¦È»È8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸáÈöÈ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÉ;É8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸSÉzÉ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸœÉºÉ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÉÉäÉ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ Ê$Ê8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ3ÊDÊ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸòÊË8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ0Ë7Ë8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸLËëË8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÌÌ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ;ÌTÌ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸuÌ„Î8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ–ξÎ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÒÎèÎ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÏ5Ï8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸJÏqÏ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸƒÏÇÏ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÙÏÐ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÐ-Ð8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸLÐaÐ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸsЉÐ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ¯ÐÄÐ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÓÐûÐ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ!Ñ6Ñ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸEÑœÑ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ®ÑÕÑ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸçÑÒ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ#ÒdÒ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸxÒŸÒ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸgÓŽÓ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ ÓµÓ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÛÓÔ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ'Ô^Ô8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸpÔ¿Ô8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÓÔúÔ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÕ6Õ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸJÕ_Õ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ…ÕœÕ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ«ÕÍÕ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸêÕÖ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ'ÖNÖ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ`ÖæÖ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ"×4×8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸI×a×8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ×´×8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÈ×ä×8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿöר8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ1Ø\Ø8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸnؤØ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ¶ØûØ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸÙ8Ù8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"ŸLÙœÙ8‘ø}ö)ô)×£p= ×ë?w”÷0÷)‘ø}ö)ô)×£p= ×ë?w”÷0÷)"Ÿ€±ïµ0Ÿïµ£¿‘À}£¿À0ŸÀBÀ‘À}«À‘À}×Â/Ã0ŸIÊÇ0ŸŠÇìÇ‘À}ìÇGÈ0ŸGÈíÊ‘À}íÊòÊPòʲّÀ} ¶¶P!¶%¶P=¶B¶P=¶£¿0ŸŠÇ°Ç0ŸGÈŠÈ0Ÿ¦È0Ë0ŸL˲Ù0Ÿ¹£¿‘À~mÈŠÈ‘À~òÊ0Ë‘À~LË)Ì‘À~;̱ґÀ~ Ó`Ö‘À~ײّÀ~¹£¿‘È~mÈŠÈ‘È~òÊ0Ë‘È~LË)Ì‘È~;̱ґÈ~ Ó`Ö‘È~ײّÈ~²»£¿‘Ø~òÊ0Ë‘Ø~LË)Ì‘Ø~;Ì:БØ~LбґØ~Ô`Ö‘Ø~²»£¿‘à~òÊ0Ë‘à~LË)Ì‘à~;Ì:Бà~Lбґà~Ô`Ö‘à~#¾ƒ¿‘è~òÊ0Ë‘è~uÌ8Í‘è~ƒÏ:Бè~LÐÓБè~®Ñ±Ò‘è~#¾£¿‘ð~òÊ0Ë‘ð~LË)Ì‘ð~;Ì:Бð~LÐÓБð~®Ñ±Ò‘ð~^¶z¶fz¶£¿‘°~ŠÇ°ÇfGÈŠÈ‘°~¦È0Ë‘°~L˲ّ°~€±³0Ÿ³O³_O³¿³]¿³9·_9·£¿‘€~£¿÷¿]ÀBÀ]«ÀKÁ]PÁÂ]×ÂöÂ]öÂ/Ã0ŸIÃnÃ_nÃÌÃ]ÌÃNÅ0ŸNÅ^Å]^ÅŒÅ0ŸŒÅÇÅ_ÇÅúÅ]úÅ^Ç_^ÇŠÇ]ŠÇÇÇ_ÇÇìÇ]ìÇ"È_"ÈGÈ]GÈŠÈ‘€~ŠÈ¦È_¦È3Ê‘€~3ÊíÊ_íÊòÊ]òÊ0Ë‘€~0ËLË_LË)Ì‘€~;̱ґ€~±ÒØÒ_ØÒàÒ]àÒ0Ó_0Ó8Ó]8Ó_Ó__ÓgÓ]gÓ`Ö‘€~`Ö×_×"×]"×…×_…××]ײّ€~¿·£¿‘ GÈŠÈ‘ ¦È‡É‘ òÊ0Ë‘ LË)Ì‘ ;̱ґ gÓ`Ö‘ ×²Ù‘ €±â¶0Ÿâ¶Þ·\Þ·ï·Pï·£¿‘È}£¿À0ŸÀBÀ‘È}«À‘È}×ÂGÈ0ŸGÈŠÈ‘È}ŠÈ¦È0Ÿ¦ÈÉ‘È}ÉFÉ\FɜɑÈ}œÉÊ\Ê Ê‘È} ÊíÊ\íÊ0Ë‘È}0ËLË0ŸL˱ґÈ}±ÒÛÒ\ÛÒàÒ‘È}àÒ3Ó\3Ó8Ó‘È}8ÓbÓ\bÓ`Ö‘È}`ÖßÖ\ßÖI×0ŸI׈×\ˆ×²Ù‘È}€±â¶0Ÿâ¶9¹‘¸}9¹E¹PE¹£¿‘¸}£¿À0ŸÀBÀ‘¸}«À‘¸}×ÂGÈ0ŸGÈŠÈ‘¸}ŠÈ¦È0Ÿ¦È0Ë‘¸}0ËLË0ŸLËßÖ‘¸}ßÖI×0ŸIײّ¸}€±²À0Ÿ²ÀÎÀSPÁ_ÁSÁíÊ0ŸíÊòÊSòʲÙ0ŸÆ±Ö±P²²P²²‘€~²+²P²¹è¹0Ÿè¹ º1Ÿ¼X¼0ŸX¼}¼1ŸŠ¾ž0ŸÅ¾è¾1ŸÌÃØÃPĦÄP¦Ä¬Ä‘€~¬ÄÐÄQÐĿđ€~æÄÅPÍNÍ0ŸNÍmÍ1ŸJσÏ1ŸƒÏ¡Ï0ŸÙÏÐ0ŸçÑ#Ò1Ÿ#Ò<Ò0ŸxÒ±Ò0ŸÔ˜Ô0ŸÓÔÕ0Ÿ«ÕêÕ1ŸÙLÙ1ŸLÙ²Ù0ŸÞ±î±Pî±ø±‘È}ø±²P4²:²P:²p²‘ˆ~p²í² ÿŸí²³‘ˆ~³³0Ÿ³æ³Vùµ¶P¶%¶P&¶B¶Pq¶´¶ ÿŸâ¶£¿‘¸~£¿Ó¿V×ÂöÂVöÂ/ш~IÆÃVÄ'ÄP'Ä@Ä‘È}@ÄHÄPHăđÈ}ƒÄÄPÅÅPÅÅ‘ˆ~Å8ÅQ8ÅNÅ‘ˆ~NÅ^ÅV^ŌŠÿŸŸÅ£ÅV«Ç°Ç0Ÿ°ÇÇÇPGÈŠÈ‘¸~ŠÈ¦ÈP¦È0Ë‘¸~0ËLËPLˈ֑¸~Ö–ÖP–ÖßÖ‘¸~ßÖI× ÿŸIײّ¸~€±G²0ŸG²R²PR² ´^ ´´0Ÿ´)´P)´ïµ‘À}ïµ¶0Ÿ¶‹¶P‹¶´¶V´¶£¿‘Ð}£¿ÿ¿^ÀBÀ^ÁÂ^×ÂöÂ^öÂIÃPIÃÌÃ^ÌÃNÅ0ŸNÅŒÅ^ŒÅŸÅ‘À}ŸÅ¨Å^¨ÅõÅ‘À}úÅ.Æ‘À}.Æ=Æ^=ÆdÆPdƆƑÀ}›ÆÓÆ‘À}ØÆÇ^Ç…Ç‘À}ŠÇ°Ç‘Ð}°ÇìÇ0ŸìÇBÈ‘À}GÈŠÈ‘Ð}ŠÈ¦È0Ÿ¦È3Ê‘Ð}3Ê8ÊR8ÊZÊ‘Ð}ZÊjÊ0ŸjÊyÊPyÊíÊVíÊòÊ0ŸòÊ0Ë‘Ð}0ËLË0ŸLË)Ì‘Ð};̱ґÐ}±ÒÒÒVÒÒàÒ^àÒÓVÓ8Ó^8ÓgÓPgÓ`Ö‘Ð}`Ö–ÖR–ÖßÖ‘Ð}ßÖ ×V ×"×^"×I×PI×tבÐ}ײّÐ}€±€²0Ÿ€²вPвí²Ví²³‘Ð}³³V³ ³P ³è³\è³ ´V ´î´0Ÿî´ø´Pø´ÙµVÙµ&·0Ÿ&·-·P-·N·‘€~N·`·0Ÿ`·t·Pt·‘·^‘·b¹0Ÿb¹~¹P~¹ݹ]ݹ ºV ºDº]DºÉ»0ŸÉ»å»På»F¼\F¼x¼Sx¼ļ\ļ:¾0Ÿ:¾V¾PV¾µ¾Sµ¾è¾^è¾/¿S/¿£¿0Ÿ£¿÷¿\÷¿BÀVÁÂV×ÂöÂ\öÂIÃ0ŸIäÃ\¤ÃÌÃVÌÃNÅ0ŸNÅ^Å\^ÅŒÅPŒÅŸÅVŸÅ¨Å\¨Å=ÆV=ÆdÆ0ŸdÆ›ÆP›ÆŠÇVŠÇìÇ0ŸìÇGÈVGÈÉÉ0ŸÉÉÑÉ^ÑÉ ÊV Ê3ÊP3ÊšÌ0ŸšÌ¾ÌP¾Ì}ÍS}ÍõÎ0ŸÏJÏ0ŸJÏmÏSmσÏVƒÏÃÏSÃÏÙÏVÙÏþÏSþÏÐVÐ:ÐS:ÐLÐVLÐsÐPsÐ…ÐS…ЯÐV¯ÐÓÐPÓЮÑ0Ÿ®Ñ¾ÑS¾ÑçÑVçÑïÑ^ïÑÒSÒ#ÒV#ÒfÒSfÒxÒVxÒ›ÒS›Ò±ÒV±ÒÔ0ŸÔ»Ô\»ÔÓÔVÓÔýÔ\ýÔÕVÕ2Õ\2ÕJÕVJÕlÕPlÕ…ÕV…Õ«Õ\«Õ¼ÕS¼ÕêÕTêÕÖ0ŸÖ–ÖQ–Ö­Ö0Ÿ­Ö¼ÖP¼ÖßÖ‘€~ßÖI×0ŸI×ב€~× ×] ×È×VÈר×]Ø×ö×Vö×1ØP1ضØ0Ÿ¶ØçØ]çØ[ÙV[ÙŠÙ]ŠÙ²ÙV ²í²P³³0Ÿ³ ³‘¸} ³O³0Ÿ¿³´‘¸}¶´¶Pâ¶ñ¶‘€ñ¶9·0ŸIÃnÃ0ŸŸÅ¨Å0ŸØÆÇ‘¸}«Ç°Ç0Ÿ3Ê8Ê0Ÿ`Ö–Ö0Ÿ–ÖßÖ‘€ßÖ"×PI×ב€€±F³0ŸF³^³]^³³0Ÿ¿³Õ³0ŸÕ³ß³Pß³´]´µ0Ÿµ,µP,µ¡µ^¡µ{·0Ÿ{·‹·P‹·¿·V¿·Ø·0ŸØ·ï·Pï·¸‘È}¸A¸0ŸA¸N¸PN¸“¸V“¸Ƹ0ŸÆ¸Ó¸PÓ¸¹V¹9¹0Ÿ9¹E¹PE¹K¹‘¸}K¹)º0Ÿ)º9ºP9ºwºVwºÖº0ŸÖºãºPãº"»V"»f»0Ÿf»s»Ps»²»V²»œ¼0Ÿœ¼¬¼P¬¼ý¼Vý¼Q½0ŸQ½^½P^½£½V£½ѽ0ŸÑ½Þ½PÞ½#¾V#¾¿0Ÿ¿¿P¿i¿Vi¿£¿0Ÿ£¿·¿]ÀBÀSÁÂS×Â`Ã0Ÿ`ÃnÃ]ÌÃŒÅ0ŸŒÅŸÅ^ŸÅ¨Å0Ÿ¨Å°Å^°ÅúÅSúÅÆ^Æ.ÆS.Æ›Æ0Ÿ›ÆØÆPØÆ Ç]Ç@Ç^@ÇŠÇSŠÇGÈ0ŸGÈmÈVmȦÈ0Ÿ¦ÈÉPÉÉ0ŸÉSÉPSɇÉV‡ÉœÉSœÉÉÉVÉÉñÉP ʹÊ0Ÿ¹ÊÍÊPÍÊíÊSíÊòÊ0ŸòÊ0ËV0ËÍ0ŸÍ ÍP ÍÎVΖÎ0Ÿ–ÎÀÎVÀÎÒÎSÒÎäÎVäÎõÎSÏJÏPJÏÓÐ0ŸÓÐæÐVæÐEÑPEÑbÑ0ŸbÑ®ÑV®ÑçÑPçѱÒ0Ÿ±ÒàÒPàÒgÓ0ŸgÓ ÓV ÓÛÓPÛÓIÔVIÔpÔPpÔÔVÔlÕ0Ÿ…Õ«ÕP«ÕêÕ0ŸêÕ`ÖV`Ö1Ø0Ÿ1ØÅØVÅØÉØPÉØÔØVÔØÙPÙ²Ù0Ÿ^¶â¶0ŸŠÇ°Ç0ŸßÖI×0ŸÓ´á´0Ÿá´Þµ‘€~âµïµPŒÅŸÅ‘€~¨Å.Æ‘€~dÆØÆ‘€~ÇŠÇ‘€~ìÇGÈ‘€~¸£¿‘ˆGÈyÈ‘ˆ¦ÈÉ‘ˆÉÉQSɇɑˆòÊ0Ë‘ˆLË)Ì‘ˆ;̱ґˆgÓ`Ö‘ˆ×²Ù‘ˆô´µ0Ÿµ¦µ‘È}ªµ¹µP%¸£¿‘ŒÅŸÅ‘È}¨ÅìÅ‘È}úÅ.Æ‘È}›Æ®Æ‘È}Ç|Ç‘È}GȀȑ¦ÈÉ‘SɇɑòÊ0Ë‘LË)Ì‘;̱ґgÓ`֑ײّ©º£¿‘Ô~òÊ0Ë‘Ô~LË)Ì‘Ô~;Ì:БÔ~LÐ]Ñ‘Ô~bѱґÔ~ Ó`Ö‘Ô~}ضؑÔ~%µ,µ0Ÿ,µuµSºº£¿‘”ŒÅŸÅS¨Å«ÅSúÅÆSòÊ0Ë‘”LË)Ì‘”;Ì:Б”LÐVÑ‘”bѱґ” Ó`Ö‘”}ضؑ”€±9µ0Ÿ9µCµPCµmµ]mµ…¹0Ÿ…¹¥¹P¥¹º_º0¼0Ÿ0¼u¼_u¼Õ¾0ŸÕ¾è¾P辿\¿À0ŸÀBÀ\ÁÂ\×ÂŒÅ0ŸŒÅŸÅ]ŸÅ¨Å0Ÿ¨ÅÇÅPÇÅúÅ\úÅ#Æ]#Æ.Æ\.ÆÅÌ0ŸÅÌéÌPéÌ}Í\}ÍJÏ0ŸJÏÐ\ÐLÐPLЮÑ0Ÿ®ÑçÑ\çÑ#ÒP#Ò3Ò0Ÿ3Ò7ÒP7Ò<Ò\<ÒxÒ0ŸxÒ±ÒP±Ò«Õ0Ÿ«Õ¿Õ_¿ÕêÕ\êÕ×0Ÿ×›×_›×È×\È×ö×Pö×Ù0ŸÙ)Ù_)ÙLÙ\LÙÙ_Ù²Ù\¥·¨·P¨·¸‘ lº©ºSý¼½ s $0)ÿŸX¿}¿^}¿ƒ¿VÉSÉ‘ œÉÉÉ‘ ÿÊ0ËPuÌðÌVDÎ]ÎViΖÎPÐ!ÐVLÐYÐV=ØnØPnØ}ØSi¸©º‘À~Ž»½‘à~y½ƒ¿‘è~GÈZÈ‘À~¦ÈÈÈ‘À~SÉWÉhWɇɑÀ~òÊ0Ë‘è~uÌ8Í‘è~ƒÏ:Бè~LÐÑ‘è~uѱґè~gÓ Ó‘À~îÓòÓcòÓ6Ô‘à~Ô'Ö‘à~'Ö+Öf+Ö`Ö‘è~×}Ø‘À~¶Ø²Ù‘À~“¸­¸‘°­¸´¸‘°p-(Ÿ´¸©º‘ð}”‘”" $ &‘°-(ŸM»T»pq-(ŸT»X»‘ð}”‘””" $ &q-(ŸX»½‘ð}”‘””" $ &‘¸-(Ÿ«½¿½p‘¨-(Ÿ¿½ž¿‘˜” $ &‘¨-(ŸGÈZÈ‘ð}”‘”" $ &‘°-(Ÿ¦ÈÈÈ‘ð}”‘”" $ &‘°-(ŸòÊ0Ë‘˜” $ &‘¨-(ŸLË)Ì‘˜” $ &‘¨-(Ÿ;Ì:Б˜” $ &‘¨-(ŸLÐÑ‘˜” $ &‘¨-(Ÿuѱґ˜” $ &‘¨-(ŸgÓ Ó‘ð}”‘”" $ &‘°-(ŸîÓpÔ‘ð}”‘””" $ &‘¸-(ŸÔ'Ö‘ð}”‘””" $ &‘¸-(Ÿ×}Ø‘ð}”‘”" $ &‘°-(Ÿ¶Ø²Ù‘ð}”‘”" $ &‘°-(Ÿ­¸´¸P´¸©º‘ð}”‘”" $ &ŸM»T»pq-(ŸT»X»‘ð}”‘””" $ &q-(ŸX»½‘ð}”‘””" $ &‘¸-(Ÿ«½£¿‘¨GÈZÈ‘ð}”‘”" $ &Ÿ¦ÈÈÈ‘ð}”‘”" $ &ŸòÊ0Ë‘¨LË)Ì‘¨;Ì:Б¨LÐÑ‘¨uѱґ¨gÓ Ó‘ð}”‘”" $ &ŸîÓpÔ‘ð}”‘””" $ &‘¸-(ŸÔ'Ö‘ð}”‘””" $ &‘¸-(Ÿ×}Ø‘ð}”‘”" $ &Ÿ¶Ø²Ù‘ð}”‘”" $ &Ÿ­¸´¸‘°p-(Ÿ´¸©º‘ð}”‘”" $ &‘°-(ŸM»X»QX»½‘¸«½¿½p‘¨-(Ÿ¿½ž¿‘˜” $ &‘¨-(ŸGÈZÈ‘ð}”‘”" $ &‘°-(Ÿ¦ÈÈÈ‘ð}”‘”" $ &‘°-(ŸòÊ0Ë‘˜” $ &‘¨-(ŸLË)Ì‘˜” $ &‘¨-(Ÿ;Ì:Б˜” $ &‘¨-(ŸLÐÑ‘˜” $ &‘¨-(Ÿuѱґ˜” $ &‘¨-(ŸgÓ Ó‘ð}”‘”" $ &‘°-(ŸîÓpÔ‘¸Ô'Ö‘¸×}Ø‘ð}”‘”" $ &‘°-(Ÿ¶Ø²Ù‘ð}”‘”" $ &‘°-(Ÿî¸©º‘È~þº½‘Ø~ù½£¿‘ð~òÊ0Ë‘ð~LË)Ì‘ð~;Ì:Бð~LÐÓБð~uÑyÑhyѱґð~gÓkÓhkÓ Ó‘È~îÓ'Ö‘Ø~×}Ø‘È~}ØØhضؑØ~¶Ø²Ù‘È~€±¬¹0Ÿ¬¹¹¹P¹¹º\º¼0Ÿ¼ ¼P ¼‘¼]‘¼„¾0Ÿ„¾‘¾P‘¾ø¾Vø¾À0ŸÀBÀ_ÁÂ_×ÂðÌ0ŸðÌûÌPûÌ}ÍV}ÍJÏ0ŸJÏkÏVkσÏ_ƒÏ¡ÏV¡ÏÙÏPÙÏìÏVìÏÐ_ÐçÑ0ŸçÑÒVÒ#Ò_#Ò<ÒV<ÒxÒPxÒ“ÒV“Ò±Ò_±ÒÔ0ŸÔ˜Ô]˜ÔÓÔPÓÔéÔ]éÔÕ_Õ«Õ0Ÿ«ÕÆÕ]ÆÕêÕ_êÕ×0Ÿ×È×PÈ×Ù0ŸÙ!Ù\!ÙLÙPLÙ…Ù\…Ù²ÙP€±ǹ0ŸÇ¹ºSºh¼0Ÿh¼}¼P}¼²¼S²¼]¾0Ÿ]¾}¾P}¾ø¾_ø¾‹¿0Ÿ£¿À0ŸÀ#ÀRÁ¨ÁR¨Á½Á‘è}×€Ê0Ÿ€Ê“ÊP“ÊÙÊwíʈË0ŸˆË”ËP”ËÅË_ÅËÌPÌ)Ì_;ÌÍ0ŸÍ-ÍP-ÍmÍ_¶ÍàÍ0ŸàÍòÍPòÍ Î_ ΖÎ0Ÿ–ηÎ_·ÎÒÎRÒÎõÎPJÏ`Ï_`σÏRƒÏ¡Ï‘È}¡ÏÙÏ0ŸÙÏБÈ}ÐsÐ0ŸsЖÐP¯ÐçÑ0ŸçÑýÑ_ýÑ#ÒR#ÒOÒ_OÒxÒRxÒˆÒ_ˆÒ±ÒR±Ò½ÒwàÒäÒwÓ8ÓP8ÓÔ0ŸÔ“ÔP“Ô˜ÔS˜ÔÓÔ0ŸÓÔÕPÕlÕ0Ÿ…Õ•ÕS•Õ«ÕR«ÕêÕPêÕÙ0ŸÙ:ÙS:ÙLÙRLÙ[ÙS[Ù²Ù0Ÿ€±ø¹0Ÿø¹ ºP º9º^9ºì»0Ÿì» ¼P ¼‘¼^‘¼Ÿ¾0ŸŸ¾à¾]à¾À0ŸÀ#ÀYÁ¨ÁY¨Á½Á‘à}×ÂÍ0ŸÍhÍ]hÍJÏ0ŸJÏ]Ï]]σÏYƒÏçÑ0ŸçÑúÑ]úÑ#ÒY#ÒÔ0ŸÔ Ô^ ÔÓÔYÓÔÛÔ^ÛÔÕYÕJÕPJÕ«Õ0Ÿ«Õ³Õ^³ÕêÕYêÕÅØ0ŸÅØÜØ^ÜØÙYÙÙPÙLÙYLÙkÙ0ŸkÙoÙPoÙtÙ^tÙÙPÙ²ÙYwº©º s $0)ÿŸì¼½Si¿ƒ¿ ~ $0)ÿŸƒ¿‹¿VLËÙËVÌ)ÌV;ÌaÌVuÌ^Í ~ $0)ÿŸƒÏ“Ï ~ $0)ÿŸ¡Ï¦Ï ~ $0)ÿŸÐÐ ~ $0)ÿŸLÐQÐ ~ $0)ÿŸöÕ'ÖP½—¿‘ø~òÊ0Ë‘ø~LË)Ì‘ø~;Ì:Бø~LÐEÑ‘ø~bѱґø~'Ö`Ö‘ø~-½C½ ‘˜”w”#ŸC½J½TJ½ž¿ ‘˜”w”#ŸòÊË ‘˜”w”#ŸLËëË ‘˜”w”#ŸÌÌ ‘˜”w”#Ÿ;ÌTÌ ‘˜”w”#ŸūΠ‘˜”w”#Ÿ–ξΠ‘˜”w”#ŸÒÎèÎ ‘˜”w”#ŸÏ5Ï ‘˜”w”#ŸJÏqÏ ‘˜”w”#ŸƒÏÇÏ ‘˜”w”#ŸÙÏÐ ‘˜”w”#ŸÐ-Ð ‘˜”w”#ŸLÐaÐ ‘˜”w”#ŸsЉР‘˜”w”#Ÿ¯ÐÄÐ ‘˜”w”#ŸÓÐûÐ ‘˜”w”#Ÿ!Ñ6Ñ ‘˜”w”#ŸbÑœÑ ‘˜”w”#Ÿ®ÑÕÑ ‘˜”w”#ŸçÑÒ ‘˜”w”#Ÿ#ÒdÒ ‘˜”w”#ŸxÒŸÒ ‘˜”w”#Ÿ'ÖNÖ ‘˜”w”#Ÿ€±À0ŸÀ#ÀXÁ¨ÁX¨Á½Á‘ð}ךÊ0ŸšÊ²ÊP²ÊÒÊ‘È}íÊhË0ŸhËËPËšË^šËÅË0ŸÅËÍË^ÍËÌXÌ)Ì0Ÿ;ÌaÌPaÌuÌXuÌ^Í0Ÿ^ÍmÍPmͦÍ^¦ÍùÍ0ŸùÍ ÎP ÎsÎ^sΖÎX–ÎÒÎPÒÎÏ0ŸÏÏ^ÏJÏXJσÏPƒÏ“Ï0Ÿ“ÏœÏPœÏ¡Ï^¡ÏÙÏ0ŸÙÏÐPбÒ0Ÿ±Ò¶Ò‘È}àÒÓPÓ²Ù0Ÿ§ËªËP€±À0ŸÀBÀ‘Ø}Á‘Ø}×ÂØÃ0ŸÄ6Ä0Ÿ6Ä@ÄÅŸ@ÄvÄ0ŸvăÄÅŸƒÄÑÄ0ŸÑĿįŸæÄ9Å0Ÿ9ÅNÅÇŸNŲÙ0Ÿ€±À0ŸÀBÀ °‹ŸÁ °‹Ÿ×ÂØÃ0ŸÄ6Ä0Ÿ6Ä@Ä °‹Ÿ@ÄvÄ0ŸvÄƒÄ °‹ŸƒÄÑÄ0ŸÑÄæÄ °‹ŸæÄ9Å0Ÿ9ÅNÅ °‹ŸNŲÙ0Ÿ€±À0ŸÀBÀ‘Ð}Á‘Ð}×ÂØÃ0ŸÄ6Ä0Ÿ6Ä@Ä +Ÿ@ÄvÄ0ŸvÄƒÄ /ŸƒÄÑÄ0ŸÑÄæÄ BŸæÄ9Å0Ÿ9ÅNÅ UŸNŲÙ0Ÿà³û³PØÆ߯PO³¿³_£¿÷¿_×ÂöÂ_náÃ_NÅ^Å_i³y³Ty³}³ 0,&×ÂñÂTñÂö 0,&NÅUÅTi³³]×ÂöÂ]NÅ^Å]i³}³R×ÂöÂRNÅUÅRг¬³SnÃ{ÃSг¬³^nÃ{Ã^гų^·¿Ï¿^nÃÌÃ^޳¨³P¨³¬³pŸnÃzÃP?µCµPCµbµ]úÅÆ]?µbµ^úÅÆ^?µuµ^ŒÅŸÅ^úÅÆ^Æ.ÆSCµ^µP^µbµpŸúÅÆPuµ—µ^%Ç0Ç^uµ—µV%Ç0ÇVuµ¹µVÇŠÇVyµ“µP“µ—µpŸ%Ç/ÇP¬¾è¾^çÑïÑ^ïÑÒSÒ#ÒVµ¾ã¾SçÑêÑS/¿X¿VòÊÿÊVD¿X¿^òÊÿÊ^!ÍmÍ_JÏ`Ï_`σÏR-Í0ÍP0ÍMÍQMÍmÍ‘È}JσϑÈ} ÎDÎ^]ÎiÎ^4ÎDÎV]ÎiÎV>¼x¼Sx¼}¼\«Õ¼ÕS¼ÕêÕTF¼q¼\«Õ¹Õ\ļì¼VêÕöÕVؼì¼SêÕöÕS9¹ǹS×¶×SÈרSÔ¹ ºVÙ[ÙVݹº]Ù&Ù]LÙ[Ù]DºlºV1Ø=ØVXºlºS1Ø=ØS½ÖÕÖPI×P×P9·¸_É>É_œÉÊ_ Ê3Ê_Þ·¸\ZÊòÊ ÿŸ±ÒgÓ ÿŸZÊòÊ0Ÿ±ÒgÓ0ŸpÊòÊ ÿŸ±Ò8Ó ÿŸpÊòÊ0Ÿ±Ò8Ó0ŸÊòÊ ÿŸ±ÒÓ ÿŸÊòÊ0Ÿ±ÒÓ0ŸÀÙdÚUdÚšÛóUŸšÛÜUÜâóUŸââUÀÙdÚTdÚƒÚSƒÚÛóTŸÛgÛSgÛšÛóTŸšÛôÜSôÜEÝóTŸEÝ…ÝS…Ý ÞóTŸ ÞÞSÞÞóTŸÞ5ÞS5ÞCÞóTŸCÞ]ÞS]ÞkÞóTŸkÞsÞSsÞxÞóTŸxÞƒÞSƒÞŠÞóTŸŠÞßSßgßóTŸgßdàSdàiàóTŸiàÕàSÕàâóTŸââSÀÙdÚQdÚÛóQŸÛ%Û\%ÛšÛóQŸšÛ¼ÛQ¼ÛêÜ\êÜŠÞóQŸŠÞÐÞ\ÐÞgßóQŸgßià\iàsàóQŸsà´à\´àâóQŸââQáÙdÚ0Ÿdڌڑ€ÛgÛ0ŸšÛôÜ0ŸEÝÝ‘€ ÞŠÞ‘€ŠÞÐÞ0ŸÐÞýÞ‘€gßià0Ÿiànà‘€sà¹à0Ÿ¹àÊà‘€ââ0ŸáÙdÚ0ŸdڌڑˆÛgÛ0ŸšÛôÜ0ŸEÝÝ‘ˆ ÞŠÞ‘ˆŠÞÐÞ0ŸÐÞýÞ‘ˆgßià0Ÿiànà‘ˆsà¹à0Ÿ¹àÊà‘ˆââ0ŸáÙdÚ0ŸdڌڑÛgÛ0ŸšÛôÜ0ŸEÝÝ‘ ÞŠÞ‘ŠÞÐÞ0ŸÐÞýÞ‘gßià0Ÿiànà‘sà¹à0Ÿ¹àÊà‘ââ0ŸáÙdÚ0Ÿdڌڑ˜ÛgÛ0ŸšÛôÜ0ŸEÝÝ‘˜ ÞŠÞ‘˜ŠÞÐÞ0ŸÐÞýÞ‘˜gßià0Ÿiànà‘˜sà¹à0Ÿ¹àÊà‘˜ââ0Ÿ°ÚÀÚa»ÝÊÝaÊÝäÝ‘ø~áÙÝÚ0ŸÛ`Û0Ÿ`Û†ÛŸ†ÛßÝ0ŸßÝäÝŸäÝÃÞ0ŸÃÞÐÞŸÐÞÐß0ŸÐßÜߟÜßà0Ÿà#àŸ#à\à0Ÿ\àiàŸià¬à0Ÿ¬à¹àŸ¹àÈá0ŸÍáâ0ŸáÙÝÚ0ŸÛ`Û0Ÿ`Û†Û °‹Ÿ†ÛßÝ0ŸßÝäÝ °‹ŸäÝÃÞ0ŸÃÞÐÞ °‹ŸÐÞÐß0ŸÐßÜß °‹ŸÜßà0Ÿà#à °‹Ÿ#à\à0Ÿ\àià °‹Ÿià¬à0Ÿ¬à¹à °‹Ÿ¹àÈá0ŸÍáâ0ŸáÙÝÚ0ŸÛ`Û0Ÿ`ÛgÛ EŸgÛ~ÛT†ÛßÝ0ŸßÝäÝ AŸäÝÃÞ0ŸÃÞÐÞ 'ŸÐÞÐß0ŸÐßÜß ,ŸÜßà0Ÿà#à "Ÿ#à\à0Ÿ\àià Ÿià¬à0Ÿ¬à¹à Ÿ¹àÈá0ŸÍáâ0ŸÛÛ]Û%Û}Ÿ ÜÜPÜÛÜ]ŠÞÐÞ]gßià]sà¹à]Û%ÛV¤ÛïÜVŠÞÐÞVgßiàVsà­àVââVŠÞÃÞ4ŸŠÞÃÞ6ŸŠÞÃÞ1ŸŠÞÃÞ ­}ŸŠÞÐÞ6ŸŠÞÃÞ 3}Ÿ—ßÐß5Ÿ—ßÐß6Ÿ—ßÐß1Ÿ—ßÐß ­}Ÿ—ßÜß6Ÿ—ßÐß 3}ŸÜßà3ŸÜßà6ŸÜßà1ŸÜßà ­}ŸÜß#à6ŸÜßà 3}Ÿ#à\à2Ÿ#à\à6Ÿ#à\à1Ÿ#à\à ­}Ÿ#àià6Ÿ#à\à 3}Ÿsà¬à1Ÿsà¬à6Ÿsà¬à ­}Ÿsà¹à6Ÿsà¬à 3}Ÿdڌڑ EÝÝ‘  ÞŠÞ‘ ÐÞýÞ‘ iànà‘ ¹àÊà‘ dÚÝÚ ÿŸ†ÛšÛ ÿŸôÜŠÞ ÿŸÐÞgß ÿŸiàsà ÿŸ¹àÈá ÿŸÍáâ ÿŸdÚÝÚ0Ÿ†ÛšÛ0ŸôÜŠÞ0ŸÐÞgß0Ÿiàsà0Ÿ¹àÈá0ŸÍáâ0Ÿ~ÚŒÚPSÝÝ‘ #Ÿ ÞŠÞ‘ #Ÿ0ÞCÞPXÞkÞPkÞxÞvƒÞ…ÞsŸ…ÞŠÞS€Ý˜ÝPŽÝžÝ0ŸÐÞýÞ‘ iànà‘ ¹àÊà‘ ßÞýÞP¹àÊàPôÜÝQÐÞöÞ0ŸöÞß š|Ÿß)ßQiàsà0Ÿ¹àÃà0ŸÃàÚà ž|ŸôÜûÜPûÜ#ÝSÐÞß0Ÿß)ßPiàsà0Ÿ¹àÕà0ŸÕàÚàP)ßMßVáqáV„á¬áVÍáâV)ßgß ÿŸáÈá ÿŸÍáâ ÿŸ)ßgß0ŸáÈá0ŸÍáâ0Ÿ?ßMßPá[ávŸ„áÈávŸÜáâvŸ0á5áv”Ÿ5á:áSMá[áP„áŒávœá¬áPäáöáPòáâ0ŸÀÚÝÚóUŸäÝ ÞóUŸÀÚÓÚaÀÚÝÚSäÝ ÞSÀÚÝÚ0ŸäÝ Þ0ŸÀÚÔÚ0ŸÔÚÝÚPäÝÞPÀÚÝÚ0ŸäÝ ÞŸÀÚÝÚ0ŸäÝ Þ °‹ŸÀÚÝÚ0ŸäÝ Þ [Ÿ%Û;Ûs%Û`Û6Ÿ%Û`Û1Ÿ%Û`Û ­}Ÿ%ÛgÛ6Ÿ%Û`Û 3}Ÿ âHãUHãè\è2è|Ÿ2è”ðóUŸûñWóS‹ùÎùUÎù-û\-û­ûóUŸ/?óUŸùä\ä½óUŸ½ä\äˆóUŸOeóUŸe³\³\óUŸ\©\©½ óUŸ û óUŸ> IóUŸIk\k óUŸN× óUŸ× ÿ SÙ!"óUŸ2"ß#óUŸ$Œ%óUŸ¾%ò&óUŸ§'Ö'S)(9(Sv(®(SÅ(Õ(SŽ*¸13‘Üv”ŸÍ123‘Üv”ŸÉ5…:3‘Üv”Ÿ½>Ì>óUŸŸ@§@óUŸÌH"ISÔIçISM%MSEMkMóUŸ â@ãT@ã=èV=èTèvŸTè”ðóTŸÅô0öV‹ùÎùTÎù'ûV'û­ûóTŸ/?óTŸùäVä½óTŸ½äVäˆóTŸOeóTŸe³V³\óTŸ\©V©½ óTŸ û óTŸ> IóTŸIkVk óTŸN× óTŸ•!À!VÙ!"óTŸ2"ß#óTŸ$Œ%óTŸ¾%ò&óTŸå*¸13‘èv”ŸÍ1þ13‘èv”ŸÉ5…:3‘èv”Ÿ½>Ì>óTŸŸ@§@óTŸC!CV0C=CVCšCVáCîCV+D0DVŠDDVæDðDV´EÃEVFFV@FMFVEMkMóTŸ âEãQEãièSièpèsŸpèyèQyè”ðóQŸ‹÷Òø‘Üv‹ùÎùQÎùûSû­ûóQŸ/?óQŸùäSä½óQŸ½äSäˆóQŸOeóQŸe³S³\óQŸ\©S©½ óQŸ û óQŸ> IóQŸIkSk óQŸN× óQŸÙ!"óQŸ2"ß#óQŸ$Œ%óQŸ¾%ò&óQŸ¦+$13‘àv”Ÿr1¸13‘àv”ŸÉ5…:3‘àv”Ÿk<â=‘Üv>g>‘Üv½>Ì>óQŸÛ>ç>‘Üv ?Ÿ@‘ÜvŸ@§@óQŸ§@C‘ÜvEMkMóQŸ âLãRLãäø‘àtäø‹ùóRŸ‹ùÎùRÎùTû‘àtTû/óRŸ/?‘àt?ùóRŸù‚‘àt‚½óRŸ½í‘àtíOóRŸO!‘àt!\óRŸ\ú‘àtúO óRŸO i ‘àti  óRŸ w ‘àtw   óRŸ   ‘àt  óRŸ w ‘àtw ² óRŸ² © ‘àt© > óRŸ> „ ‘àt„ â óRŸâ ¬‘àt¬öóRŸö¯‘àt¯ óRŸ è‘àtè=óRŸ=\‘àt\©óRŸ©^‘àt^óRŸ‘àtóRŸð‘àtð1óRŸ1³‘àt³óRŸ{‘àt{­óRŸ­¹‘àt¹úóRŸúd‘àtdµóRŸµ:‘àt:†óRŸ†A‘àtAjóRŸj¸‘àt¸ûóRŸû‘àtËóRŸË7‘àt7•óRŸ•W‘àtWŒóRŸŒ˜‘àt˜ÐóRŸÐ‘àtbóRŸbÕ‘àtÕ!óRŸ!­‘àt­ÍóRŸÍ7‘àt7óRŸ ‘àt Ç óRŸÇ Ô!‘àtÔ!Ù!óRŸÙ!â!‘àtâ!"óRŸ"›"‘àt›"»"óRŸ»"%#‘àt%#d#óRŸd#m#‘àtm#‹#óRŸ‹#ú#‘àtú#$óRŸ$ñ$‘àtñ$ö$óRŸö$%‘àt%/%óRŸ/%§%‘àt§%¾%óRŸ¾%@&‘àt@&ƒ&óRŸƒ& '‘àt 'G'óRŸG'¸'‘àt¸')(óRŸ)(q(‘àtq(v(óRŸv(Ó(‘àtÓ()óRŸ)D*‘àtD*…:óRŸ…:Þ:‘àtÞ:;óRŸ;µ;‘àtµ;è;óRŸè;b>‘àtb>g>óRŸg>…?‘àt…?Ï?óRŸÏ?PA‘àtPAxAóRŸxA‹C‘àt‹CCóRŸC«C‘àt«CáCóRŸáC>G‘àt>GˆGóRŸˆGÝH‘àtÝHþHóRŸþHI‘àtI?IóRŸ?I2J‘àt2JhJóRŸhJ¸K‘àt¸KúKóRŸúKM‘àtMEMóRŸEMN‘àtNJNóRŸJNjQ‘àt âLãXLã‹ùóXŸ‹ùÎùXÎùjQóXŸ âLãYLã}é^}é‹ùóYŸ‹ùÎùYÎù*û^*û/óYŸ/?^?ùóYŸùä^ä÷óYŸ÷^½óYŸ½;^;OóYŸO¸^¸\óYŸ\Ó^Ó¿ óYŸ¿ à ^à IóYŸIk^kÄóYŸÄÞ^ÞjQóYŸJè¶èe¶èŽï‘Àt/?‘Àt䔑Àtäö‘ÀtOe‘Àt³3‘Àt© ‘ÀtO r ‘Àt ‰ ‘Àt  ‰ ‘Àt² ² ‘Àt> ¨ ‘Àtâ µ‘ÀtöÓ‘Àt I‘Àtk ‘Àt=e‘Àt©p‘Àtù‘Àt1בÀt‘Àt­Â‘Àtúˆ‘Àtµ^‘Àt†S‘ÀtjÓ‘Àtû˜‘ÀtË[‘Àt¼ ‘ÀtN`‘ÀtŒ¡‘ÀtÐ:‘Àtbù‘Àt!¿‘ÀtÍ[‘Àt¨ ‘ÀtÇ × ‘ÀtÙ!ë!‘Àt2"­"‘Àt»"I#‘Àtd#v#‘Àtš$ %‘ÀtÍ%d&‘Àtƒ&—&‘Àt½>Ì>‘ÀtŸ@§@‘ÀtEMkM‘Àt†è¶èf¶èÿø‘Èt/?‘Ètä+‘Ètäw‘ÈtOe‘Èt³Ê‘Èt© ‘ÈtO ê ‘Èt # ‘Èt  & ‘Èt² Ä ‘Ètâ ( ‘Èt> Ÿ ‘Ètâ Ê‘Èt I‘Ètk‘Èt= ‘Èt¢‘ÈtÀ0‘ÈtbΑÈt'‘Èt­‘ÈtµU‘Èt†š‘Èt¸í‘ÈtjÊ‘ÈtûR‘Èt•1‘Ètbð‘Èt!V‘ÈtÍR‘Èt ‘Èt? Ÿ ‘ÈtÇ Ô!‘ÈtÙ!G"‘Èt»"@#‘Ètd# #‘Èt$&$‘Ètg$$‘Ètš$P%‘Èt¾%[&‘Ètƒ&©&‘ÈtÇ&('‘ÈtG'(‘Èt)((‘ÈtÅ(b*‘Èt…:ù:‘Èt;z;‘Èt¬;ý;‘Èt#<E<‘Ètk<k=‘Èt¡= ?‘ÈtÏ?ø?‘Èt@D‘Èt+DRD‘ÈtŠD±D‘ÈtæD E‘Èt(EóE‘ÈtFdF‘ÈtŠFYG‘ÈtˆG\H‘Èt‚HÓK‘ÈtúKjQ‘Èt²è¶èg¶è¿ø‘ðt/?‘ðtäp‘ðtäS‘ðtOe‘ðt³‘ðt©è‘ðtO Æ ‘ðt e ‘ðt  ò ‘ðt e ‘ðt²  ‘ðt> r ‘ðtâ ‘ðt I‘ðtkÖ‘ðt=L‘ðt‘ðt¡‘ðti‘ðt­R‘ðtµ(‘ðt†/‘ðtj¦‘ðtû%‘ðt• ‘ðtbÑðt!›‘ðtÍ%‘ðt{ ‘ðtÇ Ô!‘ðtÙ!‰"‘ðt»"#‘ðtd#è#‘ðt$ß$‘ðtö$•%‘ðt¾%.&‘ðtƒ&û&‘ðtG'ï'‘ðt)(_(‘ðtv(2*‘ðt…:Ì:‘ðt;>‘ðt>P>‘ðtg>¸>‘ðt½>s?‘ðtÏ?ý@‘ðtAB‘ðt"BbB‘ðtwBÂB‘ðtÇB C‘ðtCyC‘ðtC,G‘ðtˆGØG‘ðtÝG-H‘ðt2HÇH‘ðtÌHJ‘ðtJ¦K‘ðtúKDL‘ðtIL†L‘ðt‹LÎN‘ðtÓN P‘ðtPÝP‘ðtâPjQ‘ðtU,_,r‘°v"_,…:‘¨w²è¶èh¶èÛø‘èt/?‘ètäy‘ètä\‘ètOe‘èt³‘èt©ñ‘ètO Ï ‘èt n ‘èt  û ‘èt n ‘èt²  ‘èt> { ‘ètâ ¦‘èt I‘ètkß‘èt=U‘èt‘ètª‘ètr‘èt­[‘ètµ1‘èt†8‘ètj¯‘ètû.‘èt•‘ètbÌ‘èt!¤‘ètÍ.‘èt„ ‘ètÇ Ô!‘ètÙ!’"‘èt»"#‘ètd#ñ#‘èt$è$‘ètö$ž%‘èt¾%7&‘ètƒ&'‘ètG'ø'‘èt)(h(‘ètv(;*‘ètU,_,q‘¨v"_,…:‘°w…:Õ:‘èt;Y>‘ètg>|?‘ètÏ?‚C‘ètC5G‘ètˆG¯K‘ètúKjQ‘èt²è¶èc¶èù‘øt/?‘øtä>‘øt䈑øtOe‘øt³Ý‘øt©& ‘øtO û ‘øt 4 ‘øt  7 ‘øt² Õ ‘øtâ 9 ‘øt> ¹ ‘øtâ 䑸t I‘øtk‘øt=‘øt³‘øtÀC‘øtbè‘øt:‘øt­™‘øtµo‘øt†«‘øt¸‘øtj䑸tûl‘øt•K‘øtb ‘øt!g‘øtÍl‘øt ‘øt? ¹ ‘øtÇ Ô!‘øtÙ!X"‘øt»"Z#‘øtd#±#‘øt$7$‘øtg$$‘øtš$a%‘øt¾%u&‘øtƒ&º&‘øtÇ&ò&‘øtG'$(‘øt)(ž(‘øtÅ(¤)‘øtU,_,f_,…:‘¸w¬;<‘øt#<V<‘øtk<~=‘øt¡=º?‘øtÏ? @‘øt@D‘øt+DcD‘øtŠDÂD‘øtæDE‘øt(EF‘øtFuF‘øtŠFsG‘øtˆGmH‘øt‚HíK‘øtúKjQ‘øt²è¶èb¶è’鑸t’éŽï‘Ðtö)‘Àtö)Ÿ/?‘¸tä÷‘Ðtö)‘Àtö)Ÿ÷¸‘¸t䑸tOe‘¸t³W‘¸t©J ‘¸tO r ‘Ðtö)‘Àtö)Ÿ  ‘Ðtö)‘Àtö)Ÿ  ¿ ‘Ðtö)‘Àtö)Ÿ¿ ? ‘¸t² » ‘Ðtö)‘Àtö)Ÿâ ² ‘Ðtö)‘Àtö)Ÿ> – ‘Ðtö)‘Àtö)Ÿâ µ‘Ðtö)‘Àtö)ŸöÁ‘Ðtö)‘Àtö)Ÿ I‘Ðtö)‘Àtö)Ÿkú‘Ðtö)‘Àtö)Ÿ=e‘Ðtö)‘Àtö)Ÿ©‘Ðtö)‘Àtö)Ÿ™‘Ðtö)‘Àtö)ŸÀ'‘Ðtö)‘Àtö)Ÿbù‘Ðtö)‘Àtö)Ÿ1Å‘Ðtö)‘Àtö)Ÿ‘Ðtö)‘Àtö)Ÿ­Â‘Ðtö)‘Àtö)Ÿúv‘Ðtö)‘Àtö)ŸµÄ‘Ðtö)‘Àtö)ŸÄÞ‘¸tÞL‘Ðtö)‘Àtö)Ÿ†‘‘Ðtö)‘Àtö)Ÿ¸ä‘Ðtö)‘Àtö)ŸjÁ‘Ðtö)‘Àtö)Ÿû˜‘Ðtö)‘Àtö)ŸËI‘Ðtö)‘Àtö)Ÿ¼ ‘Ðtö)‘Àtö)ŸN`‘Ðtö)‘Àtö)ŸŒ¡‘Ðtö)‘Àtö)ŸÐ(‘Ðtö)‘Àtö)Ÿbç‘Ðtö)‘Àtö)Ÿ!M‘Ðtö)‘Àtö)ŸÍI‘Ðtö)‘Àtö)Ÿ ‘Ðtö)‘Àtö)Ÿ? – ‘Ðtö)‘Àtö)ŸÇ × ‘Ðtö)‘Àtö)ŸÙ!ë!‘Ðtö)‘Àtö)Ÿ2">"‘Ðtö)‘Àtö)Ÿ»"7#‘Ðtö)‘Àtö)Ÿd#v#‘Ðtö)‘Àtö)Ÿš$ %‘Ðtö)‘Àtö)ŸÍ%R&‘Ðtö)‘Àtö)Ÿƒ&—&‘Ðtö)‘Àtö)Ÿ½>Ì>‘Ðtö)‘Àtö)ŸŸ@§@‘Ðtö)‘Àtö)ŸEMkM‘Ðtö)‘Àtö)Ÿ²è¶èõ)õ)Ÿ¶èÛø‘ètö)‘Ètö)Ÿ/?‘ètö)‘Ètö)Ÿä+‘ètö)‘Ètö)Ÿä\‘ètö)‘Ètö)ŸOe‘ètö)‘Ètö)Ÿ³Ê‘ètö)‘Ètö)Ÿ©ñ‘ètö)‘Ètö)ŸO Ï ‘ètö)‘Ètö)Ÿ # ‘ètö)‘Ètö)Ÿ  û ‘ètö)‘Ètö)Ÿ & ‘ètö)‘Ètö)Ÿ² Ä ‘ètö)‘Ètö)Ÿâ  ‘ètö)‘Ètö)Ÿ> { ‘ètö)‘Ètö)Ÿâ ¦‘ètö)‘Ètö)Ÿ I‘ètö)‘Ètö)Ÿkß‘ètö)‘Ètö)Ÿ= ‘ètö)‘Ètö)Ÿ¢‘ètö)‘Ètö)ŸÀ‘ètö)‘Ètö)Ÿ0‘ètö)‘Ètö)Ÿbª‘ètö)‘Ètö)Ÿ'‘ètö)‘Ètö)Ÿ­[‘ètö)‘Ètö)Ÿµ1‘ètö)‘Ètö)Ÿ†š‘ètö)‘Ètö)Ÿ¸í‘ètö)‘Ètö)Ÿj¯‘ètö)‘Ètö)Ÿû.‘ètö)‘Ètö)Ÿ•‘ètö)‘Ètö)ŸbÌ‘ètö)‘Ètö)Ÿ!V‘ètö)‘Ètö)ŸÍ.‘ètö)‘Ètö)Ÿ ‘ètö)‘Ètö)Ÿ? „ ‘ètö)‘Ètö)ŸÇ Ô!‘ètö)‘Ètö)ŸÙ!G"‘ètö)‘Ètö)Ÿ»"#‘ètö)‘Ètö)Ÿd# #‘ètö)‘Ètö)Ÿ$&$‘ètö)‘Ètö)Ÿg$$‘ètö)‘Ètö)Ÿš$è$‘ètö)‘Ètö)Ÿö$P%‘ètö)‘Ètö)Ÿ¾%7&‘ètö)‘Ètö)Ÿƒ&©&‘ètö)‘Ètö)ŸÇ&'‘ètö)‘Ètö)ŸG'ø'‘ètö)‘Ètö)Ÿ)(h(‘ètö)‘Ètö)Ÿv((‘ètö)‘Ètö)ŸÅ(;*‘ètö)‘Ètö)Ÿ…:Õ:‘ètö)‘Ètö)Ÿ;z;‘ètö)‘Ètö)Ÿ¬;ý;‘ètö)‘Ètö)Ÿ#<E<‘ètö)‘Ètö)Ÿk<k=‘ètö)‘Ètö)Ÿ¡=Y>‘ètö)‘Ètö)Ÿg>|?‘ètö)‘Ètö)ŸÏ?ø?‘ètö)‘Ètö)Ÿ@‚C‘ètö)‘Ètö)ŸCD‘ètö)‘Ètö)Ÿ+DRD‘ètö)‘Ètö)ŸŠD±D‘ètö)‘Ètö)ŸæD E‘ètö)‘Ètö)Ÿ(EóE‘ètö)‘Ètö)ŸFdF‘ètö)‘Ètö)ŸŠF5G‘ètö)‘Ètö)ŸˆG\H‘ètö)‘Ètö)Ÿ‚H¯K‘ètö)‘Ètö)ŸúKjQ‘ètö)‘Ètö)Ÿ²è¶èõ)õ)Ÿ¶è¿ø‘øtö)‘ðtö)Ÿ/?‘øtö)‘ðtö)Ÿä>‘øtö)‘ðtö)ŸäS‘øtö)‘ðtö)ŸOe‘øtö)‘ðtö)Ÿ³Ý‘øtö)‘ðtö)Ÿ©è‘øtö)‘ðtö)ŸO Æ ‘øtö)‘ðtö)Ÿ 4 ‘øtö)‘ðtö)Ÿ  ò ‘øtö)‘ðtö)Ÿ 7 ‘øtö)‘ðtö)Ÿ² Õ ‘øtö)‘ðtö)Ÿâ  ‘øtö)‘ðtö)Ÿ> r ‘øtö)‘ðtö)Ÿâ ‘øtö)‘ðtö)Ÿ I‘øtö)‘ðtö)ŸkÖ‘øtö)‘ðtö)Ÿ=‘øtö)‘ðtö)Ÿ³‘øtö)‘ðtö)ŸÀ‘øtö)‘ðtö)ŸC‘øtö)‘ðtö)Ÿb¡‘øtö)‘ðtö)Ÿ:‘øtö)‘ðtö)Ÿ­R‘øtö)‘ðtö)Ÿµ(‘øtö)‘ðtö)Ÿ†«‘øtö)‘ðtö)Ÿ¸‘øtö)‘ðtö)Ÿj¦‘øtö)‘ðtö)Ÿû%‘øtö)‘ðtö)Ÿ• ‘øtö)‘ðtö)ŸbÑøtö)‘ðtö)Ÿ!g‘øtö)‘ðtö)ŸÍ%‘øtö)‘ðtö)Ÿ ‘øtö)‘ðtö)Ÿ? { ‘øtö)‘ðtö)ŸÇ Ô!‘øtö)‘ðtö)ŸÙ!X"‘øtö)‘ðtö)Ÿ»"#‘øtö)‘ðtö)Ÿd#±#‘øtö)‘ðtö)Ÿ$7$‘øtö)‘ðtö)Ÿg$$‘øtö)‘ðtö)Ÿš$ß$‘øtö)‘ðtö)Ÿö$a%‘øtö)‘ðtö)Ÿ¾%.&‘øtö)‘ðtö)Ÿƒ&º&‘øtö)‘ðtö)ŸÇ&ò&‘øtö)‘ðtö)ŸG'ï'‘øtö)‘ðtö)Ÿ)(_(‘øtö)‘ðtö)Ÿv(ž(‘øtö)‘ðtö)ŸÅ(¤)‘øtö)‘ðtö)Ÿ¬;<‘øtö)‘ðtö)Ÿ#<V<‘øtö)‘ðtö)Ÿk<~=‘øtö)‘ðtö)Ÿ¡=>‘øtö)‘ðtö)Ÿ>P>‘øtö)‘ðtö)Ÿg>¸>‘øtö)‘ðtö)Ÿ½>s?‘øtö)‘ðtö)ŸÏ? @‘øtö)‘ðtö)Ÿ@ý@‘øtö)‘ðtö)ŸAB‘øtö)‘ðtö)Ÿ"BbB‘øtö)‘ðtö)ŸwBÂB‘øtö)‘ðtö)ŸÇB C‘øtö)‘ðtö)ŸCyC‘øtö)‘ðtö)ŸCD‘øtö)‘ðtö)Ÿ+DcD‘øtö)‘ðtö)ŸŠDÂD‘øtö)‘ðtö)ŸæDE‘øtö)‘ðtö)Ÿ(EF‘øtö)‘ðtö)ŸFuF‘øtö)‘ðtö)ŸŠF,G‘øtö)‘ðtö)ŸˆGØG‘øtö)‘ðtö)ŸÝG-H‘øtö)‘ðtö)Ÿ2HmH‘øtö)‘ðtö)Ÿ‚HÇH‘øtö)‘ðtö)ŸÌHJ‘øtö)‘ðtö)ŸJ¦K‘øtö)‘ðtö)ŸúKDL‘øtö)‘ðtö)ŸIL†L‘øtö)‘ðtö)Ÿ‹LÎN‘øtö)‘ðtö)ŸÓN P‘øtö)‘ðtö)ŸPÝP‘øtö)‘ðtö)ŸâPjQ‘øtö)‘ðtö)Ÿ]âgê0Ÿgê‹ù‘¸t‹ù­û0Ÿ?þsþ‘¸tsþˆþSgS/?0Ÿù>0ŸOO 0ŸO  ‘¸t  0Ÿ ¿ ‘¸t¿ ì 0Ÿ> m0Ÿ k0Ÿkz‘¸tz 0Ÿ ©‘¸t©õ0Ÿõ1‘¸t1@0Ÿ@Ä‘¸tÄÞ0ŸÞË‘¸tË•0Ÿ•Ë‘¸tË 0Ÿ Ô!‘¸tÙ!jQ‘¸t]â1ì0Ÿ1ì‹ù‘˜u‹ù­û0Ÿ?þD‘˜ug?‘˜u/?0ŸùA0ŸO 0Ÿ  0Ÿ   ‘˜u  ì 0Ÿ> À0ŸÀБ˜uÐú0ŸµÄ‘˜uÄÞ0ŸÞË‘˜uË•0Ÿ•Ë‘˜uË 0Ÿ !‘˜u!B0ŸBÇ ‘˜uÇ × 0Ÿ× Ÿ@‘˜uŸ@§@0Ÿ§@jQ‘˜u]ââí0Ÿâí‹ù‘¨u‹ù­û0Ÿ?þD‘¨ug?‘¨u/?0Ÿùˆ0ŸO 0Ÿ û 0Ÿ> û0Ÿû ‘¨u •0Ÿ•Ë‘¨uË 0Ÿ N‘¨uNº0ŸÐB0ŸBÍ‘¨uÇ ‘¨uÇ × 0Ÿ× ƒ&‘¨uƒ&—&0Ÿ—&Ÿ@‘¨uŸ@§@0Ÿ§@jQ‘¨u]âï0Ÿï‹ù‘ u‹ù­û0Ÿ?þD‘ ug?‘ u/?0Ÿùˆ0ŸO 0Ÿ û 0Ÿ> •0Ÿ•¼‘ u¼ 0Ÿ N‘ uN× 0Ÿ× 2"‘ u2"»"0Ÿd#‹#0Ÿ‹#ö$‘ uö$/%0Ÿ/%Í%‘ uÍ%—&0Ÿ—&½>‘ u½>Ì>0ŸÌ>Ÿ@‘ uŸ@§@0Ÿ§@jQ‘ uûñÒø‘v× Ô!‘v§'®(‘vÅ()‘v,_,r‘˜v"_,…:‘wk<g>‘vÌ>Ÿ@‘v§@hJ‘vøJšK‘vúK/L‘vILEM‘v OjQ‘vÅôÒø‘ vH!À!‘ v,_,q‘ðu"_,…:‘˜wk<g>‘ vÌ>Ÿ@‘ v§@!C‘ v0CÄC‘ váCsD‘ vŠDH‘ v‚HÌH‘ v O°O‘ v»OP‘ v›P3Q‘ v‹÷Òø‘°v, ,f ,7,pt"7,D,p‘ v"D,L, ‘Ø~‘ v"L,…:‘ wk<â=‘°v>g>‘°vÛ>ç>‘°v ?Ÿ@‘°v§@C‘°vŽ*¸14‘Üv”ŸÍ124‘Üv”ŸÉ5…:4‘Üv”Ÿå*¸14‘èv”ŸÍ1þ14‘èv”ŸÉ5…:4‘èv”Ÿ¦+$14‘àv”Ÿr1¸14‘àv”ŸÉ5…:4‘àv”Ÿ]âù0Ÿù‹ù‘øt‹ù­û0Ÿ?þD‘øtg?‘øt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘øtÙ!{*0Ÿ{*…:‘øt;jQ0Ÿ{*Ž*0ŸŽ*1‘èu1r1Tr1…:‘èu]âù0Ÿ‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!Ž*0Ÿ`,p,Pp,0w01‘°t1ô7w(8‹8w’88\89w 9"9\"9b9wb9…9\…9³9w³9Û9\Û9:w::\: :w :$:V$:J:\J:R:wR:X:PX:Z:VZ:}:\}:…:w…:jQ0Ÿ]âù0Ÿù‹ù‘Àt‹ù­û0Ÿ?þD‘Àtg?‘Àt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘ÀtÙ!Ž*0ŸŽ*’,‘Àt¥-’7‘ÀtR:…:‘Àt…:jQ0Ÿ]âù0Ÿù‹ù‘Èt‹ù­û0Ÿ?þD‘Ètg?‘Èt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘ÈtÙ!Ž*0ŸŽ*½,‘Ètº-’7‘Èt:…:‘Èt…:jQ0Ÿ]âù0Ÿù‹ù‘Ðt‹ù­û0Ÿ?þD‘Ðtg?‘Ðt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘ÐtÙ!Ž*0ŸŽ*è,‘ÐtÐ-’7‘Ðtæ9…:‘Ðt…:jQ0Ÿ]âù0Ÿù‹ù‘Øt‹ù­û0Ÿ?þD‘Øtg?‘Øt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘ØtÙ!Ž*0ŸŽ*-‘Øtþ-’7‘Øt9…:‘Øt…:jQ0Ÿ]âù0Ÿù‹ù‘àt‹ù­û0Ÿ?þD‘àtg?‘àt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘àtÙ!Ž*0ŸŽ*3-‘àt.’7‘àt'9…:‘àt…:jQ0Ÿ]âù0Ÿù‹ù‘èt‹ù­û0Ÿ?þD‘ètg?‘èt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘ètÙ!Ž*0ŸŽ*^-‘ètA.’7‘èt¯8…:‘èt…:jQ0Ÿ]âù0Ÿù‹ù‘ðt‹ù­û0Ÿ?þD‘ðtg?‘ðt/?0Ÿùˆ0ŸOÔ!0ŸÔ!Ù!‘ðtÙ!Ž*0ŸŽ*‰-‘ðto.’7‘ðt(8…:‘ðt…:jQ0Ÿ]â”ð0Ÿ”ðió‘€uióÛ÷SÛ÷ê÷Uê÷•øS•øÏø[Ïøíø‘€uù‹ù‘€u‹ù­û0Ÿ?þD‘€ug?‘€u/?0Ÿùˆ0ŸO½ 0Ÿ û 0Ÿ>  0Ÿ N‘€uN× 0Ÿ× ÿ ‘€uÿ Ô!SÔ!Ù!‘€uÙ!"0Ÿ"2"‘€u2"ß#0Ÿ$Œ%0Ÿ¾%ò&0ŸG'k<‘€uk<Y=SY=¡=‘€u¡=ä=Sä=>‘€u>>S>½>‘€u½>Ì>0ŸÌ>:?S:?Ï?‘€uÏ?Ÿ@SŸ@§@0Ÿ§@Í@SÍ@A‘€uA5AS5AxA‘€uxAäASäA"B‘€u"BOBSOBwB‘€uwBBSBÇB‘€uÇBßBSßBC‘€uCMCSMCC‘€uCÄCSÄCáC‘€uáCuDSuDŠD‘€uŠDÔDSÔDæD‘€uæDGSGˆG‘€uˆG¯GS¯GÝG‘€uÝGHSH2H‘€u2H™HS™H?I‘€u?IÔISÔIJ‘€uJPJSPJøJ‘€uøJKSKúK‘€uúKLSLIL‘€uILeLSeL‹L‘€u‹LMSMEM‘€uEMkM0ŸkM O‘€u O,OS,O»O‘€u»O×OS×OP‘€uP‰PS‰P›P‘€u›P²PS²PâP‘€uâPjQSÅâ«î ‘ÀxŸ““È«îÉîP““ÈÉîæî‘Èw““Èæîêî ‘Èw““S““°êîîî‘Èw““p““°îîï‘Èw““‘€y““°ïù‘Èw““‘Èv““°ù• ‘ÀxŸ““È•¼‘Èw““‘Èv““°¼  ‘ÀxŸ““È N‘Èw““‘Èv““°N×  ‘ÀxŸ““È× Ô!‘Èw““‘Èv““°Ô!Ù! ‘ÀxŸ““ÈÙ!2"‘Èw““‘Èv““°2"»" ‘ÀxŸ““È»"d#‘Èw““Èd#‹# ‘ÀxŸ““È‹#ö$‘Èw““‘Èv““°ö$/% ‘ÀxŸ““È/%Í%‘Èw““‘Èv““°Í%—& ‘ÀxŸ““È—&½>‘Èw““‘Èv““°½>Ì> ‘ÀxŸ““ÈÌ>Ÿ@‘Èw““‘Èv““°Ÿ@§@ ‘ÀxŸ““ȧ@jQ‘Èw““‘Èv““°•âþë ‘ zŸ““Èþë8ìS““È8ìù‘Àu““Èù  ‘ zŸ““È   ‘Àu““È  À ‘ zŸ““ÈÀБÀu““ÈÐú ‘ zŸ““ÈúS““ÈÄ‘Àu““ÈÄÞ ‘ zŸ““ÈÞË‘Àu““ÈË• ‘ zŸ““ȕˑÀu““ÈË  ‘ zŸ““È !‘Àu““È!B ‘ zŸ““ÈBÇ ‘Àu““ÈÇ ×  ‘ zŸ““È× Ô!‘Àu““ÈÔ!Ù! ‘ zŸ““ÈÙ!Ÿ@‘Àu““ÈŸ@§@ ‘ zŸ““ȧ@jQ‘Àu““È­âºí ‘{Ÿ““ȺíØíP““ÈØíù‘¸v““Èùû ‘{Ÿ““Èû ‘¸v““È • ‘{Ÿ““ȕˑ¸v““ÈË  ‘{Ÿ““È N‘¸v““ÈNB ‘{Ÿ““ÈBÇ ‘¸v““ÈÇ ×  ‘{Ÿ““È× Ô!‘¸v““ÈÔ!Ù! ‘{Ÿ““ÈÙ!ƒ&‘¸v““ȃ&—& ‘{Ÿ““È—&Ÿ@‘¸v““ÈŸ@§@ ‘{Ÿ““ȧ@jQ‘¸v““ÈÝâã) ‘€|Ÿ““Èã)*P““È*{*‘Àw““È{*Ž* ‘Àw““P““°Ž*…:‘Àw““‘ˆw““°…:;‘Àw““È;jQ ‘€|Ÿ““Èõâ¼ä ‘ð|Ÿ““ȼäëä‘ð|Ÿ““P““°ëäÇø‘ð|Ÿ““‘ˆu““°ÇøÎù ‘ð|Ÿ““ÈÎù×ù‘ð|Ÿ““P““°×ùòú‘ð|Ÿ““‘ˆu““°òú/ ‘ð|Ÿ““È/?‘ð|Ÿ““‘ˆu““°?a ‘ð|Ÿ““Èa¥‘ð|Ÿ““‘ˆu““°¥ä ‘ð|Ÿ““ÈäF‘ð|Ÿ““‘ˆu““°F½ ‘ð|Ÿ““Ƚ)‘ð|Ÿ““‘ˆu““°)O ‘ð|Ÿ““ÈOe‘ð|Ÿ““‘ˆu““°e³ ‘ð|Ÿ““ȳå‘ð|Ÿ““‘ˆu““°å\ ‘ð|Ÿ““È\º‘ð|Ÿ““‘ˆu““°ºO  ‘ð|Ÿ““ÈO • ‘ð|Ÿ““‘ˆu““°•   ‘ð|Ÿ““È < ‘ð|Ÿ““‘ˆu““°<    ‘ð|Ÿ““È  Ç ‘ð|Ÿ““‘ˆu““°Ç   ‘ð|Ÿ““È ? ‘ð|Ÿ““‘ˆu““°? ²  ‘ð|Ÿ““Ȳ Ý ‘ð|Ÿ““‘ˆu““°Ý â  ‘ð|Ÿ““Èâ Ù ‘ð|Ÿ““‘ˆu““°Ù >  ‘ð|Ÿ““È> I ‘ð|Ÿ““‘ˆu““°I â  ‘ð|Ÿ““Èâ Ú‘ð|Ÿ““‘ˆu““°Úö ‘ð|Ÿ““Èö?‘ð|Ÿ““‘ˆu““°?  ‘ð|Ÿ““È +‘ð|Ÿ““‘ˆu““°+I ‘ð|Ÿ““ÈI¨‘ð|Ÿ““‘ˆu““°¨= ‘ð|Ÿ““È=Œ‘ð|Ÿ““‘ˆu““°Œ© ‘ð|Ÿ““È©#‘ð|Ÿ““‘ˆu““°# ‘ð|Ÿ““È»‘ð|Ÿ““‘ˆu““°»À ‘ð|Ÿ““ÈÀá‘ð|Ÿ““‘ˆu““°á ‘ð|Ÿ““ÈM‘ð|Ÿ““‘ˆu““°Mb ‘ð|Ÿ““Èb‘ð|Ÿ““‘ˆu““°1 ‘ð|Ÿ““È1j‘ð|Ÿ““‘ˆu““°j ‘ð|Ÿ““ÈB‘ð|Ÿ““‘ˆu““°B­ ‘ð|Ÿ““È­Þ‘ð|Ÿ““‘ˆu““°Þú ‘ð|Ÿ““Èú‘ð|Ÿ““‘ˆu““°µ ‘ð|Ÿ““ȵú‘ð|Ÿ““‘ˆu““°ú† ‘ð|Ÿ““Ȇ³‘ð|Ÿ““‘ˆu““°³¸ ‘ð|Ÿ““ȸÀ‘ð|Ÿ““‘ˆu““°ÀÛ ‘ð|Ÿ““ÈÛ ‘ð|Ÿ““‘ˆu““° j ‘ð|Ÿ““Èj{‘ð|Ÿ““‘ˆu““°{û ‘ð|Ÿ““Èû¶‘ð|Ÿ““‘ˆu““°¶Ë ‘ð|Ÿ““ÈËî‘ð|Ÿ““‘ˆu““°î• ‘ð|Ÿ““È•s‘ð|Ÿ““‘ˆu““°sŒ ‘ð|Ÿ““ÈŒ²‘ð|Ÿ““‘ˆu““°²Ð ‘ð|Ÿ““ÈÐä‘ð|Ÿ““‘ˆu““°äb ‘ð|Ÿ““ÈbŒ‘ð|Ÿ““‘ˆu““°Œ! ‘ð|Ÿ““È!q‘ð|Ÿ““‘ˆu““°qÍ ‘ð|Ÿ““ÈÍì‘ð|Ÿ““‘ˆu““°ì ‘ð|Ÿ““È% ‘ð|Ÿ““‘ˆu““°% ?  ‘ð|Ÿ““È? P ‘ð|Ÿ““‘ˆu““°P Ç  ‘ð|Ÿ““ÈÇ Ô!‘ð|Ÿ““‘ˆu““°Ô!Ù! ‘ð|Ÿ““ÈÙ!ó!‘ð|Ÿ““‘ˆu““°ó!" ‘ð|Ÿ““È"b"‘ð|Ÿ““‘ˆu““°b"»" ‘ð|Ÿ““È»"Ú"‘ð|Ÿ““‘ˆu““°Ú"d# ‘ð|Ÿ““Èd#~#‘ð|Ÿ““‘ˆu““°~#‹# ‘ð|Ÿ““È‹#»#‘ð|Ÿ““‘ˆu““°»#$ ‘ð|Ÿ““È$?$‘ð|Ÿ““‘ˆu““°?$g$ ‘ð|Ÿ““Èg$˜$‘ð|Ÿ““‘ˆu““°˜$š$ ‘ð|Ÿ““Èš$«$‘ð|Ÿ““‘ˆu““°«$ö$ ‘ð|Ÿ““Èö$%‘ð|Ÿ““‘ˆu““°%/% ‘ð|Ÿ““È/%i%‘ð|Ÿ““‘ˆu““°i%¾% ‘ð|Ÿ““Ⱦ%÷%‘ð|Ÿ““‘ˆu““°÷%ƒ& ‘ð|Ÿ““ȃ&Â&‘ð|Ÿ““‘ˆu““°Â&Ç& ‘ð|Ÿ““ÈÇ&Ï&‘ð|Ÿ““‘ˆu““°Ï&G' ‘ð|Ÿ““ÈG'Ì'‘ð|Ÿ““‘ˆu““°Ì')( ‘ð|Ÿ““È)(A(‘ð|Ÿ““‘ˆu““°A(v( ‘ð|Ÿ““Èv(¦(‘ð|Ÿ““‘ˆu““°¦(Å( ‘ð|Ÿ““ÈÅ(æ(‘ð|Ÿ““‘ˆu““°æ() ‘ð|Ÿ““È)©1‘ð|Ÿ““‘ˆu““°©1Í1 ‘ð|Ÿ““ÈÍ1r2‘ð|Ÿ““‘ˆu““°r2¥5 ‘ð|Ÿ““È¥5­5‘ð|Ÿ““‘ˆu““°­5¯5 ‘ð|Ÿ““ȯ5·5‘ð|Ÿ““‘ˆu““°·5É5 ‘ð|Ÿ““ÈÉ5÷5‘ð|Ÿ““‘ˆu““°÷5 6 ‘ð|Ÿ““È 696‘ð|Ÿ““‘ˆu““°96M6 ‘ð|Ÿ““ÈM6{6‘ð|Ÿ““‘ˆu““°{66 ‘ð|Ÿ““È6½6‘ð|Ÿ““‘ˆu““°½6Ñ6 ‘ð|Ÿ““ÈÑ6ÿ6‘ð|Ÿ““‘ˆu““°ÿ67 ‘ð|Ÿ““È7A7‘ð|Ÿ““‘ˆu““°A7U7 ‘ð|Ÿ““ÈU7~7‘ð|Ÿ““‘ˆu““°~7’7 ‘ð|Ÿ““È’7 8‘ð|Ÿ““‘ˆu““° 8(8 ‘ð|Ÿ““È(8š8‘ð|Ÿ““‘ˆu““°š8¯8 ‘ð|Ÿ““ȯ89‘ð|Ÿ““‘ˆu““°9'9 ‘ð|Ÿ““È'9w9‘ð|Ÿ““‘ˆu““°w99 ‘ð|Ÿ““È9Ä9‘ð|Ÿ““‘ˆu““°Ä9æ9 ‘ð|Ÿ““Èæ9:‘ð|Ÿ““‘ˆu““°:: ‘ð|Ÿ““È:,:‘ð|Ÿ““‘ˆu““°,:R: ‘ð|Ÿ““ÈR:f:‘ð|Ÿ““‘ˆu““°f:…: ‘ð|Ÿ““È…:¤:‘ð|Ÿ““‘ˆu““°¤:; ‘ð|Ÿ““È;>;‘ð|Ÿ““‘ˆu““°>;`; ‘ð|Ÿ““È`;Š;‘ð|Ÿ““‘ˆu““°Š;¬; ‘ð|Ÿ““Ȭ;È;‘ð|Ÿ““‘ˆu““°È;è; ‘ð|Ÿ““Èè;<‘ð|Ÿ““‘ˆu““°<#< ‘ð|Ÿ““È#<^<‘ð|Ÿ““‘ˆu““°^<k< ‘ð|Ÿ““Èk<‰=‘ð|Ÿ““‘ˆu““°‰=¡= ‘ð|Ÿ““È¡=Ú=‘ð|Ÿ““‘ˆu““°Ú=> ‘ð|Ÿ““È>/>‘ð|Ÿ““‘ˆu““°/>g> ‘ð|Ÿ““Èg>>‘ð|Ÿ““‘ˆu““°>½> ‘ð|Ÿ““Ƚ>X?‘ð|Ÿ““‘ˆu““°X?Ï? ‘ð|Ÿ““ÈÏ?@‘ð|Ÿ““‘ˆu““°@@ ‘ð|Ÿ““È@á@‘ð|Ÿ““‘ˆu““°á@A ‘ð|Ÿ““ÈAcA‘ð|Ÿ““‘ˆu““°cAxA ‘ð|Ÿ““ÈxA B‘ð|Ÿ““‘ˆu““° B"B ‘ð|Ÿ““È"BjB‘ð|Ÿ““‘ˆu““°jBwB ‘ð|Ÿ““ÈwB¬B‘ð|Ÿ““‘ˆu““°¬BÇB ‘ð|Ÿ““ÈÇBôB‘ð|Ÿ““‘ˆu““°ôBC ‘ð|Ÿ““ÈCUC‘ð|Ÿ““‘ˆu““°UCC ‘ð|Ÿ““ÈC¼C‘ð|Ÿ““‘ˆu““°¼CáC ‘ð|Ÿ““ÈáCD‘ð|Ÿ““‘ˆu““°D+D ‘ð|Ÿ““È+DkD‘ð|Ÿ““‘ˆu““°kDŠD ‘ð|Ÿ““ÈŠDÊD‘ð|Ÿ““‘ˆu““°ÊDæD ‘ð|Ÿ““ÈæD&E‘ð|Ÿ““‘ˆu““°&E(E ‘ð|Ÿ““È(E F‘ð|Ÿ““‘ˆu““° FF ‘ð|Ÿ““ÈF3F‘ð|Ÿ““‘ˆu““°3F@F ‘ð|Ÿ““È@F}F‘ð|Ÿ““‘ˆu““°}FŠF ‘ð|Ÿ““ÈŠFG‘ð|Ÿ““‘ˆu““°GˆG ‘ð|Ÿ““ȈG·G‘ð|Ÿ““‘ˆu““°·GÝG ‘ð|Ÿ““ÈÝGH‘ð|Ÿ““‘ˆu““°H2H ‘ð|Ÿ““È2HuH‘ð|Ÿ““‘ˆu““°uH‚H ‘ð|Ÿ““È‚H¦H‘ð|Ÿ““‘ˆu““°¦HÌH ‘ð|Ÿ““ÈÌHñH‘ð|Ÿ““‘ˆu““°ñHþH ‘ð|Ÿ““ÈþH I‘ð|Ÿ““‘ˆu““° I?I ‘ð|Ÿ““È?IäI‘ð|Ÿ““‘ˆu““°äIJ ‘ð|Ÿ““ÈJFJ‘ð|Ÿ““‘ˆu““°FJhJ ‘ð|Ÿ““ÈhJºJ‘ð|Ÿ““‘ˆu““°ºJÙJ ‘ð|Ÿ““ÈÙJˆK‘ð|Ÿ““‘ˆu““°ˆKúK ‘ð|Ÿ““ÈúKL‘ð|Ÿ““‘ˆu““°LIL ‘ð|Ÿ““ÈILcL‘ð|Ÿ““‘ˆu““°cL‹L ‘ð|Ÿ““È‹LÂL‘ð|Ÿ““‘ˆu““°ÂLÏL ‘ð|Ÿ““ÈÏLôL‘ð|Ÿ““‘ˆu““°ôLM ‘ð|Ÿ““ÈM#M‘ð|Ÿ““‘ˆu““°#MEM ‘ð|Ÿ““ÈEMMM‘ð|Ÿ““‘ˆu““°MMkM ‘ð|Ÿ““ÈkMõM‘ð|Ÿ““‘ˆu““°õM N ‘ð|Ÿ““È N-N‘ð|Ÿ““‘ˆu““°-NJN ‘ð|Ÿ““ÈJNRN‘ð|Ÿ““‘ˆu““°RNnN ‘ð|Ÿ““ÈnN¨N‘ð|Ÿ““‘ˆu““°¨NÓN ‘ð|Ÿ““ÈÓNîN‘ð|Ÿ““‘ˆu““°îN O ‘ð|Ÿ““È OžO‘ð|Ÿ““‘ˆu““°žO»O ‘ð|Ÿ““È»OäO‘ð|Ÿ““‘ˆu““°äOP ‘ð|Ÿ““ÈPP‘ð|Ÿ““‘ˆu““°P›P ‘ð|Ÿ““È›P¿P‘ð|Ÿ““‘ˆu““°¿PâP ‘ð|Ÿ““ÈâPüP‘ð|Ÿ““‘ˆu““°üPQ ‘ð|Ÿ““ÈQ;Q‘ð|Ÿ““‘ˆu““°;Q@Q ‘ð|Ÿ““È@QjQ‘ð|Ÿ““‘ˆu““° ã\æ ‘à}Ÿ““È\æ‹æ‘à}Ÿ““P““°‹æÏø‘à}Ÿ““‘u““°Ïøú ‘à}Ÿ““Èú'ú‘à}Ÿ““P““°'úlú‘à}Ÿ““‘u““°lú„ú ‘à}Ÿ““È„úû‘à}Ÿ““‘u““°û/ ‘à}Ÿ““È/?‘à}Ÿ““‘u““°?ä ‘à}Ÿ““ÈäP‘à}Ÿ““‘u““°P½ ‘à}Ÿ““Ƚ1‘à}Ÿ““‘u““°1O ‘à}Ÿ““ÈOe‘à}Ÿ““‘u““°e³ ‘à}Ÿ““ȳï‘à}Ÿ““‘u““°ï© ‘à}Ÿ““ȩđà}Ÿ““‘u““°ÄO  ‘à}Ÿ““ÈO  ‘à}Ÿ““‘u““°   ‘à}Ÿ““È D ‘à}Ÿ““‘u““°D    ‘à}Ÿ““È  Ï ‘à}Ÿ““‘u““°Ï   ‘à}Ÿ““È G ‘à}Ÿ““‘u““°G ²  ‘à}Ÿ““Ȳ ä ‘à}Ÿ““‘u““°ä >  ‘à}Ÿ““È> Q ‘à}Ÿ““‘u““°Q â  ‘à}Ÿ““Èâ ä‘à}Ÿ““‘u““°äö ‘à}Ÿ““Èö`‘à}Ÿ““‘u““°`  ‘à}Ÿ““È 3‘à}Ÿ““‘u““°3I ‘à}Ÿ““ÈI°‘à}Ÿ““‘u““°°= ‘à}Ÿ““È=—‘à}Ÿ““‘u““°—© ‘à}Ÿ““È©+‘à}Ÿ““‘u““°+ ‘à}Ÿ““Èë‘à}Ÿ““‘u““°ë ‘à}Ÿ““ÈU‘à}Ÿ““‘u““°Ub ‘à}Ÿ““Èb‘à}Ÿ““‘u““°1 ‘à}Ÿ““È1t‘à}Ÿ““‘u““°t ‘à}Ÿ““ÈL‘à}Ÿ““‘u““°L­ ‘à}Ÿ““È­æ‘à}Ÿ““‘u““°æú ‘à}Ÿ““Èú#‘à}Ÿ““‘u““°#µ ‘à}Ÿ““ȵ‘à}Ÿ““‘u““°† ‘à}Ÿ““Ȇȑà}Ÿ““‘u““°ÈÛ ‘à}Ÿ““ÈÛ‘à}Ÿ““‘u““°j ‘à}Ÿ““Èj…‘à}Ÿ““‘u““°…û ‘à}Ÿ““Èû¾‘à}Ÿ““‘u““°¾Ë ‘à}Ÿ““ÈËø‘à}Ÿ““‘u““°ø• ‘à}Ÿ““È•}‘à}Ÿ““‘u““°}Œ ‘à}Ÿ““ÈŒº‘à}Ÿ““‘u““°ºÐ ‘à}Ÿ““ÈÐì‘à}Ÿ““‘u““°ìb ‘à}Ÿ““Èb–‘à}Ÿ““‘u““°–! ‘à}Ÿ““È!y‘à}Ÿ““‘u““°yÍ ‘à}Ÿ““ÈÍö‘à}Ÿ““‘u““°ö ‘à}Ÿ““È- ‘à}Ÿ““‘u““°- ?  ‘à}Ÿ““È? Z ‘à}Ÿ““‘u““°Z Ç  ‘à}Ÿ““ÈÇ Ô!‘à}Ÿ““‘u““°Ô!Ù! ‘à}Ÿ““ÈÙ!û!‘à}Ÿ““‘u““°û!" ‘à}Ÿ““È"j"‘à}Ÿ““‘u““°j"»" ‘à}Ÿ““È»"ä"‘à}Ÿ““‘u““°ä"d# ‘à}Ÿ““Èd#†#‘à}Ÿ““‘u““°†#‹# ‘à}Ÿ““È‹#Ã#‘à}Ÿ““‘u““°Ã#$ ‘à}Ÿ““È$G$‘à}Ÿ““‘u““°G$g$ ‘à}Ÿ““Èg$µ$‘à}Ÿ““‘u““°µ$ö$ ‘à}Ÿ““Èö$%‘à}Ÿ““‘u““°%/% ‘à}Ÿ““È/%q%‘à}Ÿ““‘u““°q%¾% ‘à}Ÿ““Ⱦ%&‘à}Ÿ““‘u““°&ƒ& ‘à}Ÿ““ȃ&×&‘à}Ÿ““‘u““°×&G' ‘à}Ÿ““ÈG'Ô'‘à}Ÿ““‘u““°Ô')( ‘à}Ÿ““È)(I(‘à}Ÿ““‘u““°I(v( ‘à}Ÿ““Èv(®(‘à}Ÿ““‘u““°®(Å( ‘à}Ÿ““ÈÅ(ð(‘à}Ÿ““‘u““°ð() ‘à}Ÿ““È)±1‘à}Ÿ““‘u““°±1Í1 ‘à}Ÿ““ÈÍ1 5‘à}Ÿ““‘u““° 595 ‘à}Ÿ““È95I5‘à}Ÿ““‘u““°I5]5 ‘à}Ÿ““È]5m5‘à}Ÿ““‘u““°m5„5 ‘à}Ÿ““È„5ž5‘à}Ÿ““‘u““°ž5¥5 ‘à}Ÿ““È¥5¿5‘à}Ÿ““‘u““°¿5É5 ‘à}Ÿ““ÈÉ5ÿ5‘à}Ÿ““‘u““°ÿ5 6 ‘à}Ÿ““È 6A6‘à}Ÿ““‘u““°A6M6 ‘à}Ÿ““ÈM6ƒ6‘à}Ÿ““‘u““°ƒ66 ‘à}Ÿ““È6Å6‘à}Ÿ““‘u““°Å6Ñ6 ‘à}Ÿ““ÈÑ67‘à}Ÿ““‘u““°77 ‘à}Ÿ““È7I7‘à}Ÿ““‘u““°I7U7 ‘à}Ÿ““ÈU7†7‘à}Ÿ““‘u““°†7’7 ‘à}Ÿ““È’78‘à}Ÿ““‘u““°8(8 ‘à}Ÿ““È(8ª8‘à}Ÿ““‘u““°ª8¯8 ‘à}Ÿ““ȯ89‘à}Ÿ““‘u““°9'9 ‘à}Ÿ““È'99‘à}Ÿ““‘u““°99 ‘à}Ÿ““È9Ì9‘à}Ÿ““‘u““°Ì9æ9 ‘à}Ÿ““Èæ9:‘à}Ÿ““‘u““°:: ‘à}Ÿ““È:::‘à}Ÿ““‘u““°::R: ‘à}Ÿ““ÈR:p:‘à}Ÿ““‘u““°p:…: ‘à}Ÿ““È…:®:‘à}Ÿ““‘u““°®:; ‘à}Ÿ““È;H;‘à}Ÿ““‘u““°H;`; ‘à}Ÿ““È`;’;‘à}Ÿ““‘u““°’;¬; ‘à}Ÿ““Ȭ;Ð;‘à}Ÿ““‘u““°Ð;è; ‘à}Ÿ““Èè;<‘à}Ÿ““‘u““°<#< ‘à}Ÿ““È#<f<‘à}Ÿ““‘u““°f<k< ‘à}Ÿ““Èk<‘=‘à}Ÿ““‘u““°‘=¡= ‘à}Ÿ““È¡=â=‘à}Ÿ““‘u““°â=> ‘à}Ÿ““È>9>‘à}Ÿ““‘u““°9>g> ‘à}Ÿ““Èg>—>‘à}Ÿ““‘u““°—>½> ‘à}Ÿ““Ƚ>`?‘à}Ÿ““‘u““°`?Ï? ‘à}Ÿ““ÈÏ?@‘à}Ÿ““‘u““°@@ ‘à}Ÿ““È@é@‘à}Ÿ““‘u““°é@A ‘à}Ÿ““ÈAkA‘à}Ÿ““‘u““°kAxA ‘à}Ÿ““ÈxAB‘à}Ÿ““‘u““°B"B ‘à}Ÿ““È"BrB‘à}Ÿ““‘u““°rBwB ‘à}Ÿ““ÈwB¶B‘à}Ÿ““‘u““°¶BÇB ‘à}Ÿ““ÈÇBüB‘à}Ÿ““‘u““°üBC ‘à}Ÿ““ÈC]C‘à}Ÿ““‘u““°]CC ‘à}Ÿ““ÈCÄC‘à}Ÿ““‘u““°ÄCáC ‘à}Ÿ““ÈáC&D‘à}Ÿ““‘u““°&D+D ‘à}Ÿ““È+DsD‘à}Ÿ““‘u““°sDŠD ‘à}Ÿ““ÈŠDÒD‘à}Ÿ““‘u““°ÒDæD ‘à}Ÿ““ÈæDF‘à}Ÿ““‘u““°FF ‘à}Ÿ““ÈF;F‘à}Ÿ““‘u““°;F@F ‘à}Ÿ““È@F…F‘à}Ÿ““‘u““°…FŠF ‘à}Ÿ““ÈŠFG‘à}Ÿ““‘u““°GˆG ‘à}Ÿ““ȈG¿G‘à}Ÿ““‘u““°¿GÝG ‘à}Ÿ““ÈÝGH‘à}Ÿ““‘u““°H2H ‘à}Ÿ““È2H}H‘à}Ÿ““‘u““°}H‚H ‘à}Ÿ““È‚H°H‘à}Ÿ““‘u““°°HÌH ‘à}Ÿ““ÈÌHùH‘à}Ÿ““‘u““°ùHþH ‘à}Ÿ““ÈþH*I‘à}Ÿ““‘u““°*I?I ‘à}Ÿ““È?IïI‘à}Ÿ““‘u““°ïIJ ‘à}Ÿ““ÈJNJ‘à}Ÿ““‘u““°NJhJ ‘à}Ÿ““ÈhJÂJ‘à}Ÿ““‘u““°ÂJÙJ ‘à}Ÿ““ÈÙJK‘à}Ÿ““‘u““°KúK ‘à}Ÿ““ÈúK#L‘à}Ÿ““‘u““°#LIL ‘à}Ÿ““ÈILmL‘à}Ÿ““‘u““°mL‹L ‘à}Ÿ““È‹LÊL‘à}Ÿ““‘u““°ÊLÏL ‘à}Ÿ““ÈÏLüL‘à}Ÿ““‘u““°üLM ‘à}Ÿ““ÈM-M‘à}Ÿ““‘u““°-MEM ‘à}Ÿ““ÈEMUM‘à}Ÿ““‘u““°UMkM ‘à}Ÿ““ÈkMýM‘à}Ÿ““‘u““°ýM N ‘à}Ÿ““È N7N‘à}Ÿ““‘u““°7NJN ‘à}Ÿ““ÈJNZN‘à}Ÿ““‘u““°ZNnN ‘à}Ÿ““ÈnN°N‘à}Ÿ““‘u““°°NÓN ‘à}Ÿ““ÈÓNøN‘à}Ÿ““‘u““°øN O ‘à}Ÿ““È O¦O‘à}Ÿ““‘u““°¦O»O ‘à}Ÿ““È»OìO‘à}Ÿ““‘u““°ìOP ‘à}Ÿ““ÈP‡P‘à}Ÿ““‘u““°‡P›P ‘à}Ÿ““È›PÉP‘à}Ÿ““‘u““°ÉPâP ‘à}Ÿ““ÈâPjQ‘à}Ÿ““‘u““°%ã&è ‘Ð~Ÿ““È&è.è‘Ð~Ÿ““T““°.è€è‘Ð~Ÿ““U““°€èù‘Ð~Ÿ““‘°u““°ù/ ‘Ð~Ÿ““È/?‘Ð~Ÿ““‘°u““°?ä ‘Ð~Ÿ““È佑Ð~Ÿ““‘°u““°½ä ‘Ð~Ÿ““È䈑Ð~Ÿ““‘°u““°ˆO ‘Ð~Ÿ““ÈOe‘Ð~Ÿ““‘°u““°e³ ‘Ð~Ÿ““ȳ\‘Ð~Ÿ““‘°u““°\© ‘Ð~Ÿ““È©I‘Ð~Ÿ““‘°u““°Ik ‘Ð~Ÿ““ÈkÔ!‘Ð~Ÿ““‘°u““°Ô!Ù! ‘Ð~Ÿ““ÈÙ!K?‘Ð~Ÿ““‘°u““°K?Ï? ‘Ð~Ÿ““ÈÏ?éF‘Ð~Ÿ““‘°u““°éFˆG ‘Ð~Ÿ““ȈG`K‘Ð~Ÿ““‘°u““°`KúK ‘Ð~Ÿ““ÈúKÊM‘Ð~Ÿ““‘°u““°ÊM N ‘Ð~Ÿ““È NO‘Ð~Ÿ““‘°u““°O»O ‘Ð~Ÿ““È»ObP‘Ð~Ÿ““‘°u““°bP›P ‘Ð~Ÿ““È›P$Q‘Ð~Ÿ““‘°u““°$Q3Q ‘Ð~Ÿ““È3Q[Q‘Ð~Ÿ““‘°u““°[QjQ ‘Ð~Ÿ““È]â?þ0Ÿ?þ2_2DPDg0Ÿg?_?Ô!0ŸÔ!Ø!PØ!Ù!_Ù!O30ŸO3a3Pa35_5jQ0Ÿ]âëé0ŸëéõéPõégꑸtgê¦ë0Ÿ¦ë´ëP´ë1쑘u1ìní0ŸníxíPxíâ푨uâí[î0Ÿ[îdîPdîï‘ uï7ï0Ÿ7ïDïPDïqïYqïôï‘ØtôïKñ0ŸKñUñPUñ®ñ]®ñ^ò0Ÿ^òmòPmòò]òšò0Ÿšò¸òP¸òÖò]Öòó0ŸóóPóió]ióÒø‘Ðtù]ùY‹ù­û0Ÿ/?0Ÿùä0Ÿä÷‘¸t÷>0ŸO 0Ÿ  ‘¸t   0Ÿ  ¯ ‘˜u¯ … 0Ÿ  ï P> ] 0Ÿâ …‘¸t…š0Ÿö‘¸t  0ŸIk0Ÿkz‘˜uz©0Ÿ©õ‘¸tõÅ0ŸÅÙPÙ䑘uä1P1@0Ÿ@‘˜u­0Ÿ­úPú°‘˜uµÄ‘¨uÄg0Ÿg{P{†‘¨u†Ë0ŸË‘¸t•¼0Ÿ¼Ë‘ uË ‘¸t (0Ÿ(N]NÐPÐb0Ÿb‘¨u!Í0ŸÍz‘¨uÖ0ŸÖëPëö‘ uö× 0Ÿ× ÿ \ÿ Ô!‘ÐtÙ!"P"#"0Ÿ#"2"]2"»"0Ÿ»"_#‘ ud#‹#P‹#ß#‘Øt$£$‘Øtö$/%P/%Í%0ŸÍ%~&‘ uƒ&—&‘¨u—&§'0Ÿ§'»']»'æ'Y)(Å(0ŸÅ()P)e)0Ÿe){)P{)€)Y€)†)‘Àt¿)’,0Ÿ’,›,P›,º-‘Àtº-’70Ÿ’78‘Àt(8’8‘Àt¯8 9‘Àt'9b9‘Àt9³9‘Àtæ9:‘Àt:R:PR:`;0Ÿ¬;è;Pè;k<0Ÿk<b=‘Ðt¡=g>‘Ðtg>q>0Ÿq>—>]½>Ì>0ŸÌ>—?‘ÐtÏ?ï?‘Ðt@Ÿ@‘ÐtŸ@§@0Ÿ§@ÄC‘ÐtáCüC‘Ðt+DID‘ÐtŠD¨D‘ÐtæDE‘Ðt(EêE‘ÐtF[F‘ÐtŠFPG‘ÐtˆGSH‘Ðt‚HÌH‘ÐtÌHàH]àHþHYþH?IP?IÔI‘ÐtÔIçI]JhJ‘ÐthJoJ0ŸoJxJ]xJøJ0ŸøJšK‘ÐtúK/L‘ÐtILM‘ÐtMEMPEMkM0ŸkMxMPxMŒMYŒM‘Mw NJN0ŸnN‹N]‹N•NY•N N] NÓNYÓN O0Ÿ OjQ‘Ðt]âÇè0Ÿéé0Ÿé0éP0éÇ鑨tÇéWë0ŸWëaëPaëëXëÇë‘ØtÇë·ì0Ÿ·ìÏìPÏìJí‘€uJíëó0ŸëóýóPýó\ô]\ô@õ0Ÿ@õJõPJõvõ]võŠõ0ŸŠõšõPšõö]0öpö0ŸpöÆö^Æö’÷0Ÿ’÷Á÷PÁ÷ø‘€uù]ùX]ù‹ù‘°u‹ù­û0Ÿù0Ÿ½ä0Ÿe³0Ÿ³\P\©0Ÿ©²‘ØtO < 0Ÿ  ¯ ‘Øt¯ ¿ 0Ÿ¿  ‘Øt € ‘Øt² â ‘Øtâ :0Ÿ0ŸbPbˆX²ä0Ÿä1‘Øt10Ÿ­Ä0ŸÞ†0Ÿ†¸P¸Û0ŸÛ&‘€uj‘€uû†0Ÿ†Ë‘€uË!0Ÿ!7X7B‘ØtBH!0ŸH!•!^•!À!]À!Ô!0ŸÙ!ß#0Ÿ$æ'0Ÿ)(è,0Ÿè,ö,Pö,þ-‘Ðtþ-’70Ÿ’7#8‘Ðt(8¢8‘Ðt¯89‘Ðt'9m9‘Ðt9•9P•9¸9‘Ðtæ9’;0Ÿ¬;k<0Ÿk<¥<‘€u¥<µ<0Ÿµ<Å<PÅ< =^ =8=0Ÿ8=@=^@=¡=P¡=È=^È=>X> >‘€ug>Û>0ŸÛ>ç>‘€uç> ?0Ÿ ??P?Ï?‘¸uÏ?@P@Ÿ@‘€uŸ@§@0Ÿ§@Á@‘€uA-A‘€uxAÝA‘€u"B/B‘€uwBˆB‘€uÇBØB‘€uCCPC!C]!CáC0ŸáC+DP+D;D];DŠDXŠDÊDPæD^E0Ÿ^EsE^sEƒE0ŸƒE•EP•E3F]3F@FX@FŠF]ŠF§F^§FýFXýFˆG‘°uˆG2H0Ÿ2H‚HP‚H’H^’HÌHXÌHøJ0ŸøJK]K"KX"K+K]+KúK0ŸúKL]LIL0ŸIL}L]}L‹LX‹LL]LôP0ŸôP-QX-Q3Q‘°u3QjQ0Ÿ]âôè0ŸØé ê] êêSêŽê0ŸÅêîê0ŸîêþêPþê|ë]|ë í0Ÿ í/íP/íŒí]Œíñ0Ÿñ.ñP.ññ\ñtò0Ÿtò~òP~ò«ò\«ò¿ò0Ÿ¿òÐòPÐòió\ió©ó0Ÿ©óô\ôÕô0ŸÕôâôPâôvõ\võÝö0ŸÝöèöPèöE÷\E÷Û÷0ŸÛ÷ý÷Sý÷Òø0Ÿù‹ù]‹ù­û0Ÿùä0Ÿä÷S÷ä0ŸO³0Ÿ\©0ŸO W 0Ÿ  S ¯ 0Ÿû   S  > ]> S SS â ]â …0Ÿ…ÉSÉö]ö 0Ÿ 5S5I]Iz0Ÿz SS©P©õ0ŸõÀ]ÀÐ0ŸÐb]b10Ÿ1@S@ 0Ÿ T]T†0Ÿ†ËPËN0ŸNŒ]ŒÐ0ŸÐb]bƒ0Ÿƒ¿]¿Ç 0Ÿ× H!\H!o!0Ÿo!•!\•!Ô!0ŸÙ!2"0Ÿ2"»"]»"ß#0Ÿ$ƒ&0Ÿƒ&—&]—&§'0Ÿ§'æ'Pæ')(])(3-0Ÿ3-<-P<-A.‘àtA.¸10ŸÍ1}20Ÿ}22P23]3950Ÿ95Ž5]Ž5–5P¥5’70Ÿ’78‘àt(8z8‘àt¯8·8P·8Ù8‘àt'9½>0Ÿ½>Ì>]Ì>Û>0ŸÛ>ç>Sç>û>0Ÿû> ?\ ?c@0Ÿc@t@Pt@Ÿ@\§@ô@\ô@A]AA\AAPA A\ AxAPxA0C0Ÿ0CmC\mCC]CáCPáC+D0Ÿ+DsD\ŠDáD\áDæD]æD(E\(E‘F0Ÿ‘FšF\šFˆG0ŸˆGÌG\ÌGÝG]ÝG2H0Ÿ2H‚H\‚HÌH0ŸÌHþHPþH7I\7I?I]?I{I0Ÿ{I‘I\‘I¡I0Ÿ¡IµIPµIJ\JJ]JhJ\hJšK0ŸúKM0ŸM=M\=MEM]EMkM0ŸkM•M\•M N0Ÿ NJNPJNnN0ŸnNÂN\ÂNÓN]ÓN O0Ÿ OO\O»O]»OÜOPÜOP]P¦P\¦PâP]âPôP\ôP3Q0Ÿ3QjQ\]â7é0Ÿ7éLéPLéÇé_ÇéAë0ŸAëPëPPë|ë_|ëÖì0ŸÖìùìPùìJí_Jíî0ŸîîPîsî_sî‡îS‡îxï0Ÿxï’ïP’ïÓï_Óï\ñ0Ÿ\ñfñPfñûñ_ûñGò0ŸGòWòPWòò_ò*ô0Ÿ*ô4ôP4ôÅô_Åôõ0Ÿõ#õP#õZõ_Zõïö0ŸïöúöPúö‹÷_‹÷¥÷0Ÿ¥÷Á÷]Á÷’ø^’øÒø‘àtù‹ù_‹ù­û0Ÿ/?0ŸùA0ŸO©0Ÿ©úPúO _O ´ 0Ÿ ¿ 0Ÿ¿ â _â ñ0Ÿ=:0ŸÐ0ŸÐPb_bg0Ÿg®_®0Ÿ­_­Û0ŸÛj_jÿPÿ _ D0ŸD^P^Ë_˼0Ÿ¼ËSË,0Ÿ,N_NŒ0ŸŒÐ_ÐbPb!0Ÿ!B_B‰0ŸÍ0Ÿ™_™öSö? _? Ç PÇ %!0Ÿ%!H!_H!s!0Ÿs!•!_•!À!0ŸÀ!Ô!_Ù!"0Ÿ"2"_2"Z"SZ"»"_»"d#0Ÿd#‹#_‹#ß#0Ÿ$š$_š$ö$Pö$%S%/%_/%ò&0ŸG'§'0Ÿ§'æ'_)(v(Pv(Å(0ŸÅ()_)-0Ÿ--P-.‘Øt.Ù20ŸÙ2î2Pî243_43I30ŸI3O3PO350Ÿ5]5P]5’70Ÿ’7Þ7‘Øt(8s8‘Øt¯8õ8‘Øt'9*9P*959‘Øt9k<0Ÿk<s<^s<z<‘àtz<„<]„<”<0Ÿ”<®<P®<Ë<_Ë<@=0Ÿ@=¡=_¡=>0Ÿ>g>Pg>q>0Ÿq>½>_½>Ì>SÌ>Û>_Û>ç>^ç> ?_ ?@0Ÿ@Ÿ@^Ÿ@§@0Ÿ§@Æ@^Æ@A‘àtA:A^:APA‘àtxAÖA^ÖA"B‘àt"B4B^4BwB‘àtwBB^BÇB‘àtÇBÑB^ÑBC‘àtC!C0Ÿ!C0C_0CCPCŠD0ŸŠD(E_(E•F0Ÿ•FšF_šFˆG0ŸˆG2H_2HsJ0ŸsJxJ_xJøJ0ŸøJKPKIL0ŸILM_MnN0ŸnN€N_€N•NP•N O_ O,OP,OP0ŸP P_ P›P0Ÿ›PôP_ôPjQ0Ÿ]âSé0ŸSévéPvéÇé\Çé±ê0ŸŽëÇë\ÇëÚëSÚëWì0Ÿ}ì¦ì0Ÿ¦ì¶ìP¶ìJí\Jí°ö0Ÿ°öÀöPÀö"÷V"÷ø0Ÿø$øP$øÒø\ù‹ù\‹ù­û0Ÿ/?0Ÿù>0ŸOú0ŸO ´ 0Ÿ  0Ÿ  ¯ S¿  P â \â  0Ÿ * P*   \  ï 0Ÿ> ] P] â \â …0Ÿ…ö\ö 0Ÿ I\Ik0ŸkzSz \=S0Ÿ©õ0Ÿ}äSä1\10Ÿ1S1­\­ÖSÖú\úì0Ÿ†¸\¸ÛPÛû\û†0Ÿ†Ë\Ë!0Ÿ!BSBÔ!0ŸÙ!@0Ÿ@U@\U@xA0ŸxAÇB\ÇBCPC‚H0Ÿ‚HÌHPÌH O0Ÿ O"OV"OJO\JO»O0Ÿ»OÕOVÕOÜO\ÜO›P0Ÿ›P·PV·PâP\âPôPVôPjQ0Ÿ]â}é0Ÿ}é–éP–éÇé^Çéë0Ÿë:ëP:ë|ë^|ëlì0Ÿlì}ìP}ìŒí^Œí–íS–íôí0ŸôíîPîî^î1î0Ÿ1î>îP>î}î^}î´ï0Ÿ´ïÃïPÃïôï^ôïð0ŸððPð”ð^”ðÞð0ŸÞð4ñ^4ñ ò0Ÿ òòPò«ò^«òô0Ÿô#ôP#ôô^ô*õ0Ÿ*õ9õP9õZõ^Zõeõ0ŸeõƒõPƒõšõ^šõÇõ0ŸÇõÑõPÑõ0ö^0öÒø‘Øtù‹ù^‹ù­û0Ÿ/?0ŸùA0ŸO´ 0Ÿ  0Ÿ < P<   ^   0Ÿ ? P? â ^â æ 0Ÿæ ! ^! ì 0Ÿ> ] ^â ñ0Ÿ=#0ŸÅPÅb^b0Ÿ¼P¼ä^ä10Ÿ1@^@0Ÿ­P­ú^úµ0ŸµÄSÄ0Ÿ†$^$†S†Ë^Ë•0Ÿ•¼^¼ 0Ÿ Œ^ŒºSºÈ^ÐîSîb^bB0ŸBÍPÍ0ŸÃ^Ãö0Ÿö? P? Ç ^Ç  !0Ÿ !H!^H!•!‘Øt•!À!]À!Ô!0ŸÙ!2"0Ÿ2"»"^»"d#0Ÿd#ß#^$?$Pg$/%0Ÿ/%3%P3%>%^>%i%Pi%Œ%^¾%Í%^Í%ƒ&0Ÿƒ&—&S—&ã&^G'c'0Ÿc'x'^x''0Ÿ'š'Pš'æ'^)(v(^v(®(PÅ()^) )P )')^')½,0Ÿ½,Æ,PÆ,Ð-‘ÈtÐ-’70Ÿ’7ù7‘Èt(8‡8‘Èt¯8ú8‘Èt'9]9‘Èt9®9‘Ètæ9:P:’;0Ÿ¬;#<0Ÿ#<k<^k<â=‘Øt>'>‘Øtg>½>0Ÿ½>Ì>^Ì>Ž?‘ØtÏ?Ÿ@‘ØtŸ@§@0Ÿ§@C‘ØtC!C^!CáC0ŸáC+D^+DsDPŠDæD^æD(EP(E´E‘Øt´EÃE^ÃEF‘ØtF3F^@FŠFPŠFGG‘ØtˆGH‘Øt2H‚H0Ÿ‚HÌH‘ØtÌHþH0ŸþH?I^?IhJ0ŸhJšK^úKLPL/L^ILÏL^ÏL N0Ÿ NJN^JN O0Ÿ O°O‘Øt»OP‘ØtPP0ŸP P^ P›P0Ÿ›P3Q‘Øt3QjQ0Ÿ]âé0Ÿé¬éP¬é êV êë0ŸëëPë|ëV|ëí0ŸííPíJíVJí™ï0Ÿ™ï­ïP­ïÓïVÓïÞï0ŸÞïðPððVðEð0ŸEðOðPOð”ðV”ðíø‘Àtù‹ùV‹ù­û0Ÿ/?0ŸùA0ŸO´ 0Ÿ  V ? 0Ÿ² â Pâ & V&   0Ÿ  ì V> ] Vâ ñ0Ÿ=õ0Ÿõ#P#ÀVÀÐ0ŸÐbVb10Ÿ1@V@Û0ŸÛjPj0ŸPVP†0Ÿ†ËVË•0Ÿ•¼^¼ 0Ÿ N‘ÀtNÈ0ŸÐbVb³0Ÿ³ÍPÍöVö× 0Ÿ× Ô!‘ÀtÙ!"0Ÿ"2"‘Àt2"»"P»"‹#0Ÿ‹#ß#P$g$Vg$š$Pš$ö$0Ÿö$Œ%V¾%Í%VÍ%—&0Ÿ—&Ç&PÇ&ã&VG'Ä'‘Àt)(®(‘ÀtÅ(Þ(‘Àt)8)‘Àt8)J)0ŸJ)^)P^)†)V†)¤)0Ÿ¤)¹)P¹){*‘øt{*g,0Ÿg,p,Pp,¥-w¥-’70Ÿ’7ô7w(8‹8w’88\89w 9"9\"9b9wb9…9\…9³9w³9Û9\Û9:w::\: :w :$:V$:J:\J:R:wR:X:PX:Z:VZ:}:\}:…:w…:;‘øt;`;‘øt`;’;P¬;è;Vè;#<P#<½>‘Àt½>Ì>0ŸÌ>©?‘ÀtÏ?Ÿ@‘ÀtŸ@§@0Ÿ§@YA‘ÀtxA´C‘ÀtáCbG‘ÀtˆGéH‘ÀtþHI‘Àt?I>J‘ÀthJÜK‘ÀtúKM‘ÀtEMkM0ŸkM%N‘ÀtJNjQ‘Àt]â)ê0Ÿgêù0Ÿ‹ù­û0Ÿ/?0Ÿùˆ0ŸO0Ÿ…‘¸t…ö0Ÿö‘¸t ©0Ÿ©õ‘¸tõÔ!0ŸÙ!jQ0Ÿ]âéë0Ÿéë1쑘u1ìù0Ÿ‹ù­û0Ÿ/?0Ÿùˆ0ŸOú0Ÿú°‘˜uµÔ!0ŸÙ!jQ0Ÿ]â¥í0Ÿ¥íâ푨uâíù0Ÿ‹ù­û0Ÿ/?0Ÿùˆ0ŸOÍ0ŸÍz‘¨uÔ!0ŸÙ!jQ0Ÿ]â–î0Ÿ–îï‘ uïù0Ÿ‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!»"0Ÿ»"_#‘ ud#jQ0Ÿï'ï0ŸEMkM0Ÿï'ïÿŸEMkMÿŸ7ðvð ÿŸvðíð‘ØuíðñðPñðíø‘Øu·¼0Ÿ N‘Øu× Ô!‘Øu"2"‘Øu¾%Í%‘Øu—&ã& ÿŸG'o'‘Øuo'x'Px'Ž*‘Øu…:½>‘ØuÌ>Ÿ@‘Øu§@EM‘ØukMjQ‘ØuaðjðPjðvðv#àvðíø‘ˆv·¼0Ÿ N‘ˆv× Ô!‘ˆv"2"‘ˆv¾%Í%‘ˆvÇ&ã&PG'Ž*‘ˆv…:½>‘ˆvÌ>Ÿ@‘ˆv§@EM‘ˆvkMjQ‘ˆvCñ}ñS}ññ0ŸôKôVKô\ô0ŸÔö÷^÷"÷0ŸøJýJV+KšK0ŸúKLVLIL0ŸILVLV‹LLVkMxMS•M N0ŸJNnN0ŸnNNS•N²NS OO^JO°O0Ÿ»OÈO^ÜOP0Ÿ›P«P^âPôP^šñ£ñP£ñWóSiôoôPoô0öV4÷:÷P:÷Òø‘Üv× ÿ S•!Ô!V"2"S§'Ö'S)(9(Sv(®(SÅ(Õ(S{*Ž*0ŸŽ*¸13‘Üv”ŸÍ1 23‘Üv”Ÿ 224‘Üv”ŸÉ5…:3‘Üv”Ÿk<â=‘Üv>g>‘Üvq>u>Pu>—>SÌ>Ÿ@‘Üv§@C‘ÜvC=CVCšCVáCîCV+D0DVŠDDVæDðDV´EÃEVFFV@FMFVˆGŒGPŒGH‘ÜvÌH"ISÔIçISL¡LP¡L°LVÏLâLVM%MSÓNðNSØñió‘v¢ô0ö‘ vh÷Òø‘°v× ÿ ‘v•!À!‘ v""‘v§'æ'‘v)(®(‘vÅ()‘vÄ.m1‘¸ur1U7‘¸uh7l7fl7’7‘¸uk<â=‘°v>g>‘°vÌ>ç>‘°v ?Ÿ@‘°v§@C‘°vCÄC‘ váCsD‘ vŠD(E‘ v´EÃE‘ vF3F‘ v@FŠF‘ vÝGáGfáGH‘°vÌH?I‘vÔIçI‘vÏLÓLfÓLM‘ vMEM‘vÓN×Nf×N O‘vöò6ó ÿŸ6ó¸ó‘àu¸ó½óP½óÒø‘àuú ÿ 0Ÿÿ Ô!‘àuk<g>‘àuÌ>Ÿ@‘àu§@ÄC‘àuáCÌH‘àu?I‡I‘àu‡I‘IP‘IÔI‘àuÔIçI ÿŸJhJ‘àuøJšK‘àuúK/L‘àuILM‘àuMEM ÿŸ OjQ‘àu ó*óP*ó6ó}#à6óÒø‘˜vú ÿ 0Ÿÿ Ô!‘˜vk<g>‘˜vÌ>Ÿ@‘˜v§@ÄC‘˜váCÌH‘˜v?IÔI‘˜vÔIçIPçIhJ‘˜vøJšK‘˜vúK/L‘˜vILM‘˜v OjQ‘˜v¹õùõ ÿŸùõö‘èuöƒöPƒöÒø‘èuH!•!‘èu»!À!0Ÿk<â=‘èu>g>‘èuÌ>Ÿ@‘èu§@C‘èu(EjE‘èujEsEPsEF‘èuF3F ÿŸ@FŠF ÿŸŠFH‘èu‚HÌH‘èu O°O‘èu»OP‘èu›P3Q‘èuãõíõPíõùõ~#àùõÒø‘¨vH!•!‘¨v»!À!0Ÿk<g>‘¨vÌ>Ÿ@‘¨v§@C‘¨v(EF‘¨vF3FP3F@F‘¨vŠFH‘¨v‚HÌH‘¨v O°O‘¨v»OP‘¨v›P3Q‘¨vª÷Á÷0ŸÁ÷ê÷‘Ðvê÷ý÷Pý÷Òø‘Ðvk<ƒ<Tƒ<â=‘Ðv>g>‘ÐvÛ>ß>Pß>ç>‘Ðv@Ÿ@‘Ðv§@C‘Ðv]â0ø0Ÿ0øCøPCøÒø‘ðuù]ùZ]ù‹ù‘¸u‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!@0Ÿ@U@‘ðuU@xA0ŸxAwB‘ðuwBÇBPÇBjQ0Ÿ]âOø0ŸOø`øP`øÒø‘øuù]ùT]ù‹ù‘Àu‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!@0Ÿ@U@‘øuU@xA0ŸxAÌA‘øuÌA"BP"BwB‘øuwBjQ0Ÿ]âYø0ŸYø•øS•øÒø[ù]ù[]ù‹ù‘Ðu‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!æ'0Ÿ)(^-0Ÿ^-g-Pg-o.‘èto.¸10ŸÍ1b20Ÿb2v2Pv2Œ2‘ˆuŒ2—20Ÿ—2·2P·2 3‘ˆu$3950Ÿ95A5‘ˆu]5e5‘ˆu„5Ž5PŽ5–5‘ˆu¥5¯5P¯5’70Ÿ’7æ7‘èt(808P08R8‘èt¯8@0Ÿ@-@S-@@]@A0ŸAGA]GAxA[xA’AS’AÌA]ÌA"B0Ÿ"BwB]wBjQ0Ÿ]âÏø0Ÿù]ùQ]ù‹ù‘Èu‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!|A0Ÿ|A¸A_¸A"B0Ÿ"BYB_YBwBQwBjQ0ŸYøÏø0Ÿ@-@0ŸxA¢A0Ÿ¢AÌA1Ÿ"BwB1Ÿ]âzø0ŸzøÒøPù‹ùS‹ù­û0Ÿ/?0Ÿùˆ0ŸOÔ!0ŸÙ!æ'0Ÿ)(‰-0Ÿ‰-Ÿ-PŸ-.‘ðt.¸10ŸÍ1I20ŸI2[2P[2ù2Sù2950Ÿ95¯5S¯5É5PÉ5’70Ÿ’7š7Pš7¾7‘ðt(8@0Ÿ@-@P-@t@Vt@A0ŸA?AV?AxASxA²A0Ÿ²AÇAPÇAÌAVÌA"B0Ÿ"BwBPwBjQ0Ÿä+é+fé+U,r‘˜v"U,_,f_,…:‘¸wá<ñ<a¡=«=a«=Ò=‘€u == ‘Üv” $ &Ÿ=&=P&=8= ‘Üv” $ &Ÿ]â­û0Ÿ/?0ŸùÔ!0ŸÙ!Î)0ŸÎ){*‘øt{*…:0Ÿ…:;‘øt;jQ0ŸŽ*å*0Ÿå*¸13‘èv”ŸÍ1þ14‘èv”ŸÉ5…:3‘èv”Ÿå*¦+0Ÿ¦+13‘àv”Ÿ1$14‘àv”Ÿr1¸13‘àv”ŸÉ5…:3‘àv”Ÿ¦+¸13‘Üv” $ &ŸÍ123‘Üv” $ &ŸÉ5…:3‘Üv” $ &Ÿä+¸13‘èv” $ &ŸÍ1þ13‘èv” $ &ŸÉ5…:3‘èv” $ &Ÿú+ÿ+fÿ+4,q‘ðu"4,<,f<,_,q‘¨v"_,…:‘°w, ,f ,,pt",#,f#,_,r‘°v"_,…:‘¨w,¸14‘Üv” $ &ŸÍ124‘Üv” $ &ŸÉ5…:4‘Üv” $ &Ÿ,¸14‘èv” $ &ŸÍ1þ14‘èv” $ &ŸÉ5…:4‘èv” $ &ŸU,¸13‘Üv” $ &ŸÍ123‘Üv” $ &ŸÉ5…:3‘Üv” $ &ŸU,¸13‘èv” $ &ŸÍ1þ13‘èv” $ &ŸÉ5…:3‘èv” $ &Ÿm,¸14‘Üv” $ &ŸÍ124‘Üv” $ &ŸÉ5R:4‘Üv” $ &Ÿm,¸13‘èv” $ &ŸÍ1þ13‘èv” $ &ŸÉ5R:3‘èv” $ &Ÿ˜,¸14‘Üv” $ &ŸÍ124‘Üv” $ &ŸÉ5:4‘Üv” $ &Ÿ˜,¸14‘èv” $ &ŸÍ1þ14‘èv” $ &ŸÉ5:4‘èv” $ &ŸÃ,¸13‘Üv” $ &ŸÍ123‘Üv” $ &ŸÉ5Ì93‘Üv” $ &ŸÃ,¸14‘èv” $ &ŸÍ1þ14‘èv” $ &ŸÉ5Ì94‘èv” $ &Ÿî,¸13‘Üv” $ &ŸÍ123‘Üv” $ &ŸÉ593‘Üv” $ &Ÿî,¸13‘èv” $ &ŸÍ1þ13‘èv” $ &ŸÉ593‘èv” $ &Ÿ-¸14‘Üv” $ &ŸÍ124‘Üv” $ &ŸÉ5'94‘Üv” $ &Ÿ-¸13‘èv” $ &ŸÍ1þ13‘èv” $ &ŸÉ5'93‘èv” $ &Ÿ9-¸14‘Üv” $ &ŸÍ124‘Üv” $ &ŸÉ5¯84‘Üv” $ &Ÿ9-¸14‘èv” $ &ŸÍ1þ14‘èv” $ &ŸÉ5¯84‘èv” $ &Ÿd-¸13‘Üv” $ &ŸÍ123‘Üv” $ &ŸÉ5(83‘Üv” $ &Ÿd-¸14‘èv” $ &ŸÍ1þ14‘èv” $ &ŸÉ5(84‘èv” $ &Ÿÿ.`1‘Èur1¸1‘ÈuÍ17‘Èu+7/7f/7U7‘Èu:/S1‘Øur1¸1‘ØuÍ1Ñ6‘Øué6í6hí67‘Øuu/F1‘àur1¸1‘àuÍ16‘àu§6«6h«6Ñ6‘àu°/¸1‘øuÍ1M6‘øue6i6hi66‘øuë/¸1‘ˆvÍ1 6‘ˆv#6'6h'6M6‘ˆv&0¸1‘vÍ1É5‘vá5å5hå5 6‘v\0l0h1Ž1hŽ1¸1‘Øwl0w0 ‘èu” $ &Ÿw0€0U€01 ‘èu” $ &Ÿ1>1  $ &ŸÍ1Ù2  $ &Ÿ]55  $ &Ÿ„5É5  $ &Ÿ]âù0Ÿù‹ù‘u‹ùû0Ÿû­û€Ÿ/?0Ÿù\0Ÿ\a€ŸaÄ0ŸÄÉ€ŸÉˆ0ŸOm0Ÿm „Ÿ 0Ÿµ…Ÿµä0Ÿä†ŸÔ!0ŸÙ!Ò"0ŸÒ"d#ˆŸd#œ:0Ÿœ:;”Ÿ;P?0ŸP?Ï?ŸÏ?jQ0Ÿ]âù0Ÿù‹ù °‹Ÿ‹ùû0Ÿû­û °‹Ÿ/?0Ÿù\0Ÿ\a °‹ŸaÄ0ŸÄÉ °‹ŸÉˆ0ŸOm0Ÿm  °‹Ÿ 0Ÿµ °‹Ÿµä0Ÿä °‹ŸÔ!0ŸÙ!Ò"0ŸÒ"d# °‹Ÿd#œ:0Ÿœ:; °‹Ÿ;P?0ŸP?Ï? °‹ŸÏ?jQ0Ÿ]âù0Ÿù‹ù‘ˆu‹ùû0Ÿ/?0Ÿù\0Ÿ\a .ŸaÄ0ŸÄÉ 3ŸÉˆ0ŸOm0Ÿm  ¥Ÿ 0Ÿµ ä0Ÿä 9ŸÔ!0ŸÙ!Ò"0ŸÒ"d# oŸd#œ:0Ÿœ:; ¬Ÿ;P?0ŸP?Ï? 4ŸÏ?jQ0Ÿ%ã°ä '&Ÿ‹ùÎù '&Ÿù\ '&ŸÉä '&Ÿe³ '&Ÿ%ã°ä0Ÿ‹ùÎù0Ÿù\0ŸÉä0Ÿe³0Ÿ%ã„ã‘°xŸ„ã)äQ)ä°ä‘°xŸ‹ùÎù‘°xŸù\‘°xŸÉä‘°xŸe³‘°xŸ%ã°ä1Ÿ‹ùÎù1Ÿù\1ŸÉä1Ÿe³1Ÿ%ã°äLŸ‹ùÎùLŸù\LŸÉäLŸe³LŸ%ãLãXLã°äóXŸ‹ùÎùXù\óXŸÉäóXŸe³óXŸ%ã@ã‘ø|Ÿ@ãLãTLã°ä‘ø|Ÿ‹ùÎù‘ø|Ÿù\‘ø|ŸÉ䑸|Ÿe³‘ø|Ÿfã)ä '&Ÿ)ä`äPcäiäPfã„ã‘°xŸ„ã)äQ)äiä‘°xŸfã|ã‘àwŸ|ãiäU‹ùÂù‘ø|Ÿ\óXŸ\ '&Ÿ\LŸ\1Ÿ\0Ÿ\‘°xŸ\‘ø|Ÿ¼äPæ '&ŸÎùú '&Ÿlú„ú '&ŸaÄ '&Ÿ\© '&Ÿ¼äPæ0ŸÎùú0Ÿlú„ú0ŸaÄ0Ÿ\©0Ÿ¼ä#å‘°xŸ#åÈåQÈåPæ‘°xŸÎùú‘°xŸlú„ú‘°xŸaÄ‘°xŸ\©‘°xŸ¼äPæ1ŸÎùú1Ÿlú„ú1ŸaÄ1Ÿ\©1Ÿ¼äPæLŸÎùúLŸlú„úLŸaÄLŸ\©LŸ¼äPæ^Îùú^lú„ú^aÄ^\©^¼äÓä‘è}ŸÓäëäTëäPæ‘è}ŸÎùú‘è}Ÿlú„ú‘è}ŸaÄ‘è}Ÿ\©‘è}ŸåÈå '&ŸÈåæPæ æPå#å‘°xŸ#åÈåQÈå æ‘°xŸåå‘àwŸå æUÎùú‘è}Ÿ~Ä^~Ä '&Ÿ~ÄLŸ~Ä1Ÿ~Ä0Ÿ~Ä‘°xŸ~Ä‘è}Ÿ\æøç '&Ÿúlú '&Ÿ„úû '&Ÿ½ä '&ŸIk '&Ÿ\æøç0Ÿúlú0Ÿ„úû0Ÿ½ä0ŸIk0Ÿ\æÃæ‘°xŸÃæhçQhçøç‘°xŸúlú‘°xŸ„úû‘°xŸ½ä‘°xŸIk‘°xŸ\æøç1Ÿúlú1Ÿ„úû1Ÿ½ä1ŸIk1Ÿ\æøçLŸúlúLŸ„úûLŸ½äLŸIkLŸ\æøç]úlú]„úû]½ä]Ik]\æsæ‘Ø~Ÿsæ‹æT‹æøç‘Ø~Ÿúlú‘Ø~Ÿ„úû‘Ø~Ÿ½ä‘Ø~ŸIk‘Ø~Ÿ¥æhç '&Ÿhç çP£ç©çP¥æÃæ‘°xŸÃæhçQhç©ç‘°xŸ¥æ»æ‘àwŸ»æ©çUúeú‘Ø~ŸËúû]Ëúû '&ŸËúûLŸËúû1ŸËúû0ŸËúû‘°xŸËúû‘Ø~Ÿ²èÇèS÷S½èÇèP÷PÒèâèTâèëè ˆ,&O`T`e ˆ,&ÄÐTÒèëèXëèôè‘ØtOeXÄÐXÐÞ‘ØtÒèëèQOeQÄÐQó   S> S SS â ]…ÉSÉö] 5S5I]z S1@S)êgê '&Ÿ… '&Ÿöm '&Ÿ©õ '&Ÿ)êgê0Ÿ…0Ÿöm0Ÿ©õ0Ÿ)êgê‘°xŸ^‘°xŸ^Q…‘°xŸöm‘°xŸ©õ‘°xŸ)êgê1Ÿ…1Ÿöm1Ÿ©õ1Ÿ)êgêLŸ…LŸömLŸ©õLŸ…‘¸töm‘¸t©õ‘¸t)êgꑸyŸ‘¸yŸ&T&…‘¸yŸöm‘¸yŸ©õ‘¸yŸ)êXꑸyŸ@ '&Ÿ8P;AP@^‘°xŸ^QA‘°xŸ@V‘àwŸVAUm‘¸tm '&ŸmLŸm1Ÿm0Ÿm‘°xŸm‘¸yŸnêŽêSO W SƒêŽêPO V PV W ]™ê©êT©ê­ê ˆ,&=NTNS ˆ,&Ç Î T™ê±ê]=S]Ç × ]™ê­êQ=SQÇ Î QuäS1S1­\­ÖSÖú\!BS8ìWìSÞìSMìWìPÞåPåì\†SŒºSÐîSîb^$†^Œ^ÐÓ^öS2"Z"SZ"»"_ö$%S%/%_½>Ì>S™ö_2"5"_ö$ù$_½>Ì>_ )")P#<*<PñCñ ÿŸCñQñ0ŸQññ1ŸkMxM0ŸxM×MS×MìMQ NJN ÿŸJN\NSnNÓN1Ÿgñuñ2ŸnN€N2ŸgñtñPnNzNPÊMìMQ N^hJøJ^ HQhJ±JQÙJìJQìJõJ~„J±JQÙJøJ2Ÿ–EªEPÃEÊEP¢öÔö ÿŸÔöãö0Ÿãö"÷1Ÿ‚HÌH ÿŸ O,O1Ÿ,OŒOSŒO•OQ»OÜO0ŸÜOîOS›PôP1Ÿûö ÷2ŸâPôP2Ÿûö÷PâPîPPO•OQH!•!^ŠF§F^§FýFXýFˆG‘°uôP-QX-Q3Q‘°uT!!QŠFýFQôPQQQ-QxéFýFQ$Q3Q2Ÿê÷ý÷UÛ>á>U‰AÌA]"BwB]’AÌAS"BOBSOBwB‘€u¶IÊIPJJPÝóô ÿŸôô0Ÿô\ô1Ÿ2H‚H ÿŸøJK1ŸKmKSmKKQúKL0ŸL%LSILL1Ÿ5ôCô2Ÿ‹LL2Ÿ5ôBôP‹L—LP`KKQÿ H!\P›P\3QjQ\!B!QPvPQ3QSQQSQdQ|bPvPQMü!þ]Dg]?ù]Qü!þ\Dg\?ù\Uü!þVDgV?ùV6ümüò]È6ümüòTÈ6ümüòKÈIümüPmüŒü‘ÈxŸŒüüUü‘ü‘ÈxŸ?Q‘ÈxŸ‘ü¹ü‘¸yŸ¹ü½üU½ü¾ü‘¸yŸQi‘¸yŸ¾üæü‘¨zŸæüêüUêüëü‘¨zŸ™±‘¨zŸëüý‘˜{ŸýýUýý‘˜{Ÿ±É‘˜{Ÿý@ý‘ˆ|Ÿ@ýDýUDýEý‘ˆ|ŸÉᑈ|ŸEýmý‘ø|ŸmýqýUqýrý‘ø|Ÿáù‘ø|Ÿrýšý‘è}ŸšýžýUžýŸý‘è}Ÿi‘è}ŸŸýÇý‘Ø~ŸÇýËýUËýÌý‘Ø~Ÿ™‘Ø~ŸÌý!þVDgVÌý!þ\Dg\Ìý!þ]Dg]ÚýýýUDNUÞý!þSDgSâý!þ_Dg_ÖýýýPDLP& … 0Ÿ…š0Ÿ  0Ÿz 0Ÿ& * P* … \…š\  \z \& … S…šS  Sz Sn u Pu … Tz~T~ ‘¸t1 … V…šV  Vz Vé …‘¸tö‘¸t©õ‘¸tË‘¸tËÒPÒ ‘¸té SËáSË SËá0Ÿ-¨.V¥-t0_r1¸1_É5’7_º-91]r1¸1]Í1}2]¥5’7]Ð-+.‘¸uþ-41^r1Â1^Í115^95U5^]5y5^„5’7^.ÿ.‘Èu7&7‘ÈuU7’7‘ÈuA.:/‘ØuÑ6ä6‘Øu7’7‘Øuo.u/‘àu6¢6‘àuÑ6’7‘àuO2b2‘èuO2¯5 ÿŸO2¯50ŸO3ˆ3‘ÈxŸˆ3¸3‘¸yŸ¸3¼3U¼3½3‘¸yŸ½3ö3‘¨zŸö3/4‘˜{Ÿ/4h4‘ˆ|Ÿh4˜4‘ø|Ÿ˜4œ4Uœ44‘ø|Ÿ4Í4‘è}ŸÍ4Ñ4UÑ4Ò4‘è}ŸÒ45‘Ø~Ÿ5 5U 55‘Ø~ŸpQžQUžQnbóUŸpQ÷QT÷Q RS RSSóTŸSS¿SS¿S\TóTŸ\TÉUSÉUŽVóTŸŽV WS WîWóTŸîWlXSlXÑXóTŸÑXYSYcZóTŸcZ›ZS›ZûZóTŸûZ)[S)[À[óTŸÀ[\S\£\óTŸ£\Ý\SÝ\è\óTŸè\€]S€]‰]óTŸ‰]Î]SÎ]×]óTŸ×]ó]Só]fbóTŸfbnbSpQ÷QQ÷QSSóQŸSS}S]}S\TóQŸ\T|TQ|TÉU]ÉUÑXóQŸÑXY]YûZóQŸûZ)[])[À[óQŸÀ[\]\£\óQŸ£\*]]*]9]óQŸ9]€]]€]‰]óQŸ‰]Î]]Î]fbóQŸfbnbQ›QR0ŸRïRRSSÉU0ŸÉUìURìUVw7VƒW0ŸîW³Y0Ÿ³YêYRêYïY‘˜ïYZwcZàa0ŸåabRbnb0Ÿ›Q©R0Ÿ©RïRXSSÉU0ŸÉUìUXìUV‘è~7VƒW0ŸîW³Y0Ÿ³YßYXßYïY‘ ïYZ‘è~cZàa0ŸåabXbnb0Ÿ›Q®R0Ÿ®RïRYSSÉU0ŸÉUìUYìUV‘ð~7VƒW0ŸîW³Y0Ÿ³YïYYïYZ‘ð~cZàa0ŸåabYbnb0Ÿ›Q³R0Ÿ³R/S^SSÉU0ŸÉU7V^7VƒW0ŸƒWîW^îW³Y0Ÿ³YcZ^cZàa0Ÿåab^bnb0Ÿ›Q/S0ŸSS¸S0Ÿ¸SÞS€ŸÞS~W0Ÿ~WƒW€ŸƒW Y0Ÿ YY€ŸYù[0Ÿù[\€Ÿ\Ü\0ŸÜ\è\€Ÿè\!]0Ÿ!]/]€Ÿ/]r]0Ÿr]€]€Ÿ€]Â]0ŸÂ]Î]€ŸÎ]àa0Ÿåanb0Ÿ›Q/S0ŸSS¸S0Ÿ¸SÞS °‹ŸÞS~W0Ÿ~WƒW °‹ŸƒW Y0Ÿ YY °‹ŸYù[0Ÿù[\ °‹Ÿ\Ü\0ŸÜ\è\ °‹Ÿè\!]0Ÿ!]/] °‹Ÿ/]r]0Ÿr]€] °‹Ÿ€]Â]0ŸÂ]Î] °‹ŸÎ]àa0Ÿåanb0Ÿ›Q/S0ŸSS¸S0Ÿ¸S¿S pŸ¿SÖSTÞS~W0Ÿ~WƒW hŸƒW Y0Ÿ YY PŸYù[0Ÿù[\ UŸ\Ü\0ŸÜ\è\ KŸè\!]0Ÿ!]/] FŸ/]r]0Ÿr]€] AŸ€]Â]0ŸÂ]Î] <ŸÎ]àa0Ÿåanb0Ÿ›Q-S0Ÿ-S/SPSSàa0Ÿåanb0ŸSSfS^fS}S~ŸÖTãTPãTÉU^ÑXY^ûZ)[^À[\^£\/]^9]t]^‰]Î]^SS}S\dTÉU\ÑXY\ûZ)[\À[\\£\#]\9]€]\‰]Î]\fbnb\ÑX Y5ŸÑX Y7ŸÑX Y1ŸÑX Y ¶}ŸÑXY7ŸÑX Y 3}ŸÀ[ù[6ŸÀ[ù[7ŸÀ[ù[1ŸÀ[ù[ ¶}ŸÀ[\7ŸÀ[ù[ 3}Ÿ£\Ü\4Ÿ£\Ü\7Ÿ£\Ü\1Ÿ£\Ü\ ¶}Ÿ£\è\7Ÿ£\Ü\ 3}Ÿè\!]3Ÿè\!]7Ÿè\!]1Ÿè\!] ¶}Ÿè\/]7Ÿè\!] 3}Ÿ9]r]2Ÿ9]r]7Ÿ9]r]1Ÿ9]r] ¶}Ÿ9]€]7Ÿ9]r] 3}Ÿ‰]Â]1Ÿ‰]Â]7Ÿ‰]Â] ¶}Ÿ‰]Î]7Ÿ‰]Â] 3}Ÿ÷Q R‘€ŽVÇV‘€îWlX‘€cZZ‘€/]4]‘€×]è]‘€÷Q/S ÿŸÞS\T ÿŸÉUÑX ÿŸYûZ ÿŸ)[À[ ÿŸ\£\ ÿŸ/]9] ÿŸ€]‰] ÿŸÎ]àa ÿŸåafb ÿŸ÷Q/S0ŸÞS\T0ŸÉUÑX0ŸYûZ0Ÿ)[À[0Ÿ\£\0Ÿ/]9]0Ÿ€]‰]0ŸÎ]àa0Ÿåafb0ŸR RP›VÇV‘€#ŸîWlX‘€#ŸX$XP8XLXPLXYXvdXgX|ŸgXlX\ÈVáVP×VçV0ŸcZZ‘€/]4]‘€×]è]‘€rZZP×]è]P7VUVQcZ‰Z0Ÿ‰Z›Z š|Ÿ›Z¼ZQ/]9]0Ÿ×]á]0Ÿá]ø] ž|Ÿ7V>VP>VfVScZ›Z0Ÿ›Z¼ZP/]9]0Ÿ×]ó]0Ÿó]ø]P¼ZáZV3_p_V„_ `VGbWbV¼ZûZ ÿŸ3_*` ÿŸGbWb ÿŸ¼ZûZ0Ÿ3_*`0ŸGbWb0ŸÒZáZP3_Z_vŸ_*`vŸ;_N_PJ_Z_0Ÿ­_´_v”Ÿ´_¹_\Ì_à_Pà_é_vù_ `P/RXRSÞS>TS W WSlXÑXS)[q[S€]‰]S1^R^S{^©^S/R/S ÿŸÞS\T ÿŸÉU7V ÿŸ WîW ÿŸlXÑX ÿŸYcZ ÿŸ)[À[ ÿŸ\£\ ÿŸ€]‰] ÿŸÎ]×] ÿŸø]R^ ÿŸ{^3_ ÿŸ*`àa ÿŸåaGb ÿŸWbfb ÿŸ/R/S0ŸÞS\T0ŸÉU7V0Ÿ WîW0ŸlXÑX0ŸYcZ0Ÿ)[À[0Ÿ\£\0Ÿ€]‰]0ŸÎ]×]0Ÿø]R^0Ÿ{^3_0Ÿ*`àa0ŸåaGb0ŸWbfb0ŸIRXRPëS$TsŸ W WsŸlXÑXsŸ„X˜XP¨X¼XP¼XÅXsÉXÌX}ŸÌXÑX]TTPT$T0Ÿ)[q[S€]‰]S1^R^S{^©^S8[V[P1^B^P)[O[0ŸO[a[ š|Ÿa[‚[Q€]‰]0Ÿø]^Q1^;^0Ÿ;^R^ ž|Ÿ)[a[0Ÿa[‚[P€]‰]0Ÿø]ÿ]Pÿ]1^S1^M^0ŸM^R^P‚[§[S*`g`Sz`aSbbS‚[À[ ÿŸ*`a ÿŸbb ÿŸ‚[À[0Ÿ*`a0Ÿbb0Ÿ˜[§[P*`Q`sŸ…`asŸ2`E`PA`Q`0Ÿ£`ª`s”Ÿª`¯`]Â`Ö`PÖ`ß`sï`aPgRRS WfWSY³YS\O\SÎ]×]Sé^3_SgR/S ÿŸÉU7V ÿŸ WîW ÿŸYcZ ÿŸ\£\ ÿŸÎ]×] ÿŸ©^3_ ÿŸaàa ÿŸåab ÿŸbGb ÿŸWbfb ÿŸgR/S0ŸÉU7V0Ÿ WîW0ŸYcZ0Ÿ\£\0ŸÎ]×]0Ÿ©^3_0Ÿaàa0Ÿåab0ŸbGb0ŸWbfb0ŸRRP WFWsŸ+Y³YsŸ(W:WP6WFW0ŸWYYYqŸYY^YQqY„YP„YYs Y³YP\O\SÎ]×]Sé^3_S\4\Pé^ú^P\-\0Ÿ-\?\ š|Ÿ?\`\QÎ]×]0Ÿ©^Î^Qé^ó^0Ÿó^ _ ž|Ÿ\?\0Ÿ?\`\PÎ]×]0Ÿ©^·^P·^é^Sé^_0Ÿ_ _P`\„\SaŒaSža¾aSØaàaSbGbSWbfbS`\£\ ÿŸaàa ÿŸbGb ÿŸWbfb ÿŸ`\£\0Ÿaàa0ŸbGb0ŸWbfb0Ÿv\„\P)avasŸžaàasŸbGbsŸKaPas”ŸPaUaQhavaP®a¾aPØaàasb.bP*bGb0Ÿ³RÉR1ŸÀYïY1Ÿåab1Ÿ³RÉR c}ŸÀYïY c}Ÿåab c}Ÿ³RÉRRÀYêYRêYïY‘˜åabRÔYêYRêYïY‘˜ÔYïY c}ŸÐRïR1ŸÉUV1Ÿ³YÀY1ŸïYZ1ŸÐRïR0ŸÉUV0Ÿ³YÀY0ŸïYZ0ŸÐRïR k}ŸÉUV k}Ÿ³YÀY k}ŸïYZ k}ŸÐRïRSÉUúUSúUV  -&³YÀYSïYZSÐRïRXÉUìUXìUV‘è~³YÀYXïYZ‘è~ïYZ‘è~ïYZSïYZ k}ŸïRS1ŸVV1ŸZcZ1ŸïRS0ŸVV0ŸZcZ0ŸïRS n}ŸVV n}ŸZcZ n}ŸïRS_VV  -&ZcZ_VV‘ð~KZcZ_KZcZ n}ŸSS1ŸƒWÏW1ŸSS0ŸƒWÏW0ŸSS q}ŸƒWÏW q}Ÿ SSSƒWÏWSSS^ƒWÏW^¼WÏW^¼WÏWS¼WÏW q}Ÿ}S“Ss}S¸S7Ÿ}S¸S1Ÿ}S¸S ¶}Ÿ}S¿S7Ÿ}S¸S 3}ŸpbTcUTcbc‘€{bcèlóUŸèlõlUõl7m‘€{7m[mU[mnóUŸn'nU'n«nóUŸ«n7p‘€{7p…óUŸpbPcTPcbcwbcèlóTŸèlùlTùl7mw7m[mT[mnóTŸn'nT'n«nóTŸ«nzowzo…óTŸpbUcQUcbc‘øzbcèlóQŸèlùlQùl7m‘øz7m[mQ[mnóQŸn'nQ'n«nóQŸ«n¸n‘øz¸n…óQŸpbUcRUcbc‘}bcèlóRŸèlùlRùl7m‘}7m[mR[mnóRŸn'nR'n«nóRŸ«n7p‘}7p…óRŸpbUcXUcbc‘ˆ{bcèlóXŸèlùlXùl7m‘ˆ{7m[mX[mnóXŸn'nX'n«nóXŸ«nän‘ˆ{än…óXŸpbUcYUcbc‘˜}bcèlóYŸèlùlYùl7m‘˜}7mOmYOmSm‘˜}SmnóYŸnnYnn‘˜}n«nóYŸ«n7p‘˜}7p…óYŸpbbc‘èlSm‘nn‘«n7p‘pbbc‘èlSm‘nn‘«n7p‘pbbc‘èlSm‘nn‘«n7p‘pbbc‘èlSm‘nn‘«n7p‘pbbc‘ èlSm‘ nn‘ «n7p‘ pbbc‘(èlSm‘(nn‘(«n7p‘( §Pª‘¸|3¬­‘˜{H¯ã°‘°{g²v²‘˜{L·[·‘¸|f½œ¾‘˜{¿¾È¿‘˜{ÈýÈ‘¸|}ÉlÊ‘¸|ÔÕ‘˜{gÕYÖ‘¸|Ùֿב˜{xÙÝ‘¸|Þkà‘¸|»à©á‘¸|)âU㑸|¥ã=䑸|½åE瑸|•ç‡è‘¸|^êŽë‘¸|Þë푸|PíB|Âîò|Bð?ñ‘¸|¶ñžò‘¸|ó4ô‘¸|„ôrõ‘¸|òõàö‘¸|`÷[ú‘¸|Ûúü‘¸|iüxü‘¸|Ѹ|B1‘¸|±œ ‘¸|  ‘¸|‹ © ‘¸|ù à ‘¸|`=‘¸|¾Ü‘¸|zk‘¸|âû‘¸||›‘¸|ëב¸|W„‘¸|Ô‹‘¸|㑸|‘º‘¸|'t'‘ø{ù/×0‘ø{*1ô1‘ø{L23‘ø{n3<4‘ø{ÄJõK‘˜{U@]‘À{Q]›^‘À{¬^à`‘À{ñ`=b‘À{Nbžc‘À{¯ce‘À{ejf‘À{{fÌg‘À{Ýg2i‘À{Ci˜j‘À{©jl‘À{l£l‘À{mÜn‘À{ínHp‘À{Yp²q‘À{Ãqs‘À{/sŠt‘À{›tðu‘À{v¥v‘À{ƒwÞx‘À{ïxHz‘À{Yz²{‘À{Ã{!|‘À{h|Æ}‘À{×}"‘À{3‘À{]‚‘À{n‚³ƒ‘À{ă…‘À{#…u†‘À{††á‡‘À{ò‡Q‰‘À{b‰»Š‘À{_‘g’‘¸|·’ä“‘¸|4”K”‘°{•„•‘°{Ζ[—‘°{­›Ä›‘°{ùœ ‘°{Dž[ž‘°{Ÿ”Ÿ‘°{Ú ì ‘°{5¢L¢‘°{T¤å§‘À{ö§Û©‘À{ì©M«‘À{^«\­‘À{m­¿®‘À{Ю°‘À{,°{±‘À{Œ±ä²‘À{õ²P´‘À{a´ŵ‘À{Öµ7·‘À{hÊË‘˜{ Ý´Ý‘È{Ÿïð‘È{ñnñ‘È{iòÙò‘È{Ôóaô‘È{?õ´õ‘È{Cðò‘¸{@òHò‘¸{ÁòÉò‘¸{Nóö‘¸{‘ö°ö‘¸{8÷;ù‘¸{ù~ú‘¸{¸úýú‘¸{Rûû‘¸{ìû1ü‘¸{†üµü‘¸{ýJý‘¸{°ýþ‘¸{Oþ”þ‘¸{äþüþ‘¸{rÿ‡ÿ‘¸{‘¸{’Ÿ‘¸{$)‘¸{¹ý‘¸{,둸{3x‘¸{ªî‘¸{b‘¸{”™‘¸{:‘¸{˜¾‘¸{%T‘¸{»# ‘¸{3 ~ ‘¸{µ $ ‘¸{[ ´ ‘¸{ë ú ‘¸{r ~ ‘¸{ù  ‘¸{… ¡ ‘¸{ ! ‘¸{š Ò ‘¸{T‘¸{¡Ö‘¸{&[‘¸{«à‘¸{-ž‘¸{Б¸{U¹‘¸{ðU‘¸{ §€ª‘È|W¬Ú¬SÚ¬ç¬sŸH¯}°Vg²v²SL·[·‘È|f½}½S¿¾ѾSÈ-É‘È|}ɜʑÈ|Ô*ÔSgÕ‰Ö‘È|xÙÍÝ‘È|Þ›à‘È|»àÙá‘È|)â…ã‘È|¥ã=ä‘È|½åuç‘È|•ç·è‘È|^ê¾ë‘È|Þë0í‘È|Pírî‘È|Âî"ð‘È|Bðoñ‘È|¶ñÎò‘È|ódô‘È|„ô¢õ‘È|òõ÷‘È|`÷‹ú‘È|ÛúIü‘È|iüxü‘È|Ãò‘È|Ba‘È|±Ì ‘È| ; ‘È|‹ Ù ‘È|ù ‘È|`w‘È|¾Ü‘È|z›‘È|âû‘È||Ë‘È|ë‘È|W´‘È|Ô»‘È|ãA‘È|‘ê‘È|''^ù/0^*1<1^L2c2^n3…3^ÄJÖJSU8\‘Ø{Q]Ÿ]‘Ø{¬^ÿ^‘Ø{_{_‘Ø{ˆ_á_‘Ø{ñ`a‘Ø{Nb`b‘Ø{¯cÁc‘Ø{e=e‘Ø{{f€f‘Ø{Ýg*h‘Ø{Cii‘Ø{©j®j‘Ø{l'l‘Ø{m“m‘Ø{ínòn‘Ø{Ypªp‘Ø{ÃqÕq‘Ø{/s4s‘Ø{›tºt‘Ø{vzv‘Ø{ƒwˆw‘Ø{ïx@y‘Ø{Yzªz‘Ø{Ã{!|‘Ø{h|‡|‘Ø{×}~‘Ø{3€‘Ø{[‘Ø{n‚·‚‘Ø{ă„‘Ø{#…p…‘Ø{††Ó†‘Ø{ò‡Cˆ‘Ø{b‰³‰‘Ø{_‘—’‘È|·’”‘È|4”‚”V•Ñ•VΖ@—Vùœ5VDž’žVŸÝŸVT¤7§‘ |ö§7©‘ |ì©©ª‘ |^«®¬‘ |m­®‘ |Юw¯‘ |,°×°‘ |Œ±@²‘ |õ²¬³‘ |a´!µ‘ |Öµ“¶‘ | Ý~Ý]~ݽߑ°|×ßá‘°|Xáâ‘°|Ãâ¥ã‘°|äûä‘°|oåZæ‘°|Îæ¼ç‘°|0è#é‘°|—éƒê‘°|óêuì‘°|êìÐí‘°|Eî4ï‘°|Ÿïð‘°|ñôñ‘°|iòƒò]ƒò_ó‘°|Ôóáó]?õLõ]Cð# ‘Ø}3 Œ‘Ø} §hª‘Ð|w¬«¬V«¬´¬vŸH¯“°]g²v²VL·[·‘Ð|f½½V¿¾û¾VÈÉ‘Ð|}ɄʑÐ|gÕqÖ‘Ð|xٵݑÐ|Þƒà‘Ð|»àÁá‘Ð|)âmã‘Ð|¥ã=ä‘Ð|½å]ç‘Ð|•çŸè‘Ð|^ê¦ë‘Ð|Þëí‘Ð|PíZî‘Ð|Âî ð‘Ð|BðWñ‘Ð|¶ñ¶ò‘Ð|óLô‘Ð|„ôŠõ‘Ð|òõøö‘Ð|`÷sú‘Ð|Ûú1ü‘Ð|iüxü‘Ð|ÃÚ‘Ð|BI‘Ð|±´ ‘Ð| # ‘Ð|‹ Á ‘Ð|ù ø ‘Ð|`_‘Ð|¾Ü‘Ð|zƒ‘Ð|âû‘Ð||³‘Ð|ëï‘Ð|Wœ‘Ð|Ô£‘Ð|ã)‘Ð|‘Ò‘Ð|'']Ð.Ý.]ù/0]*1”4]Uœ\‘ |Q]÷]‘ |¬^<`‘ |ñ`™a‘ |Nbúb‘ |¯cdd‘ |eÆe‘ |{f(g‘ |ÝgŽh‘ |Ciôi‘ |©j`k‘ |lül‘ |m8n‘ |ín¤o‘ |Ypq‘ |Ãqzr‘ |/sæs‘ |›tLu‘ |vþv‘ |ƒw:x‘ |ïx¤y‘ |Yz{‘ |Ã{!|‘ |h|"}‘ |×}t~‘ |3a€‘ |¹‘ |n‚ƒ‘ |ăn„‘ |#…Ñ…‘ |††=‡‘ |ò‡­ˆ‘ |b‰Š‘ |_‘’‘Ð|·’ü“‘Ð|4”?˜]­›М]ùœÚ ]T¤+§‘¨|ö§+©‘¨|쩪‘¨|^«¢¬‘¨|m­®‘¨|Юk¯‘¨|,°˰‘¨|Œ±4²‘¨|õ² ³‘¨|a´µ‘¨|Öµ‡¶‘¨| ݘÝS˜Ý½ß‘¸|×ßᑸ|Xás⑸|Ãâ™ã‘¸|äï䑸|oåN摸|Îæ°ç‘¸|0è鑸|—éwꑸ|óêi쑸|êìÄ푸|Eî(|Ÿïð‘¸|ñ&ñS&ñèñ‘¸|iò€òSÔóóóS?õVõSCð# ‘à}3 Œ‘à}šÛºÛ_Pí í_šÛàÛSÞëõëSPígíSšÛÜ\ÞëDì\Pí‹í\òõ>ö\ž¦žV¦ž·žvŸ·žÏžVŸ¥ŸVn ˆ VΫð«V§¬­vŸ­[­V&®@®V ¯9¯vŸ_¯y¯V%dzd‘è|¯iÉi‘è|_n«n‘è|yyy‘è|o€ƒ€‘è|Äe’g‘è|ö)ô)à?Ÿ‘ƒ§ƒ‘è|ö)ô)à?ŸA…§†‘è|ö)ô)à?Ÿ‡/‡‘è|ö)ô)à?Ÿ!Ž‘è|ö)ô)à?Ÿ4’’“‘è|ö)ô)à?Ÿ¬“6•‘è|ö)ô)à?Ÿ`•Ù–‘è|ö)ô)à?Ÿó–+—‘è|ö)ô)à?ŸŒ˜™‘è|ö)ô)à?ŸÄe’g‘è|ö)ô)à?ô)ªLXèz¶û?Ÿ‘ƒ§ƒ‘è|ö)ô)à?ô)ªLXèz¶û?ŸA…§†‘è|ö)ô)à?ô)ªLXèz¶û?Ÿ‡/‡‘è|ö)ô)à?ô)ªLXèz¶û?Ÿ!Ž‘è|ö)ô)à?ô)ªLXèz¶û?Ÿ4’’“‘è|ö)ô)à?ô)ªLXèz¶û?Ÿ¬“6•‘è|ö)ô)à?ô)ªLXèz¶û?Ÿ`•Ù–‘è|ö)ô)à?ô)ªLXèz¶û?Ÿó–+—‘è|ö)ô)à?ô)ªLXèz¶û?ŸŒ˜™‘è|ö)ô)à?ô)ªLXèz¶û?ŸÄe’g‘è|‘ƒ§ƒ‘è|A…§†‘è|‡/‡‘è|!Ž‘è|4’’“‘è|¬“6•‘è|`•Ù–‘è|ó–+—‘è|Œ˜™‘è| c’g0Ÿ’gti‘à|tiÎi0ŸÎij‘à|Ól7p0ŸWrŸv‘à|Ÿv©vR©vx‘à|yyØ{0ŸØ{ä{‘à|[|Ÿ|‘à|ß|O€0Ÿo€Á†0ŸÁ†‡‘à|‡š0Ÿš¬‘à|¬Ð0ŸÐß‘à|!¨0Ÿ¨¿‘à|4’P•0ŸP•`•‘à|`•™0Ÿ™T¡‘à|T¡ì¢0Ÿì¢0¤‘à|p¤€¤P€¤£ª‘{Ûªíª0Ÿíªg«‘{g«ã°‘à|ø°S²‘à|g²v²‘à|…²à²‘{à²5´‘à|5´Œ´‘{Œ´¥´‘à|ìµL·‘à|L·[·‘{×¹»‘à|ÿ»À‘à|XÁ‘{½ÂâÑ{ÄGÅ‘{tÅÈ‘à|ÈPÉ‘{}ɿʑ{ìÊ$Ì‘{QÌÃÍ‘{ÑÍ@Ï‘{NÏÀБ{ÎÐæÓ‘{ÔgÕ‘à|gÕ¬Ö‘{ÙÖxÙ‘à|xÙòÝ‘{Þ­à‘{»àüá‘{)â—ã‘{¥ã‡ç‘{•çÚè‘{^êÐë‘{ÞëBí‘{Pí•î‘{Âî4ð‘{Bð’ñ‘{¶ñóò‘{óvô‘{„ôÅõ‘{òõ3÷‘{`÷®ú‘{Ûú[ü‘{iü¹ý‘{æýþ‘{þ#þ‘à|+þ‘à|c‘{cÑà|Ñ{B„‘{±ï ‘{ ^ ‘{‹ ë ‘{ù 3‘{`š‘{¾¾‘{ân‘{|Ý‘{ë*‘{WÆ‘{ÔÍ‘{ãd‘{‘ü‘{ ðG‘à|ðG%I‘{RI—J‘{ÄJL‘à|LN‘{NaO‘{oOÝO‘{ÝOR‘à|RT‘{FT$]‘{Q]^‘{¬^Ä`‘{ñ`!b‘{Nb‚c‘{¯cìd‘{eNf‘{{f°g‘{Ýgi‘{Ci|j‘{©jèk‘{lsm‘{mÀn‘{ín,p‘{Yp–q‘{Ãqs‘{/snt‘{›tÔu‘{vuw‘{ƒwÂx‘{ïx,z‘{Yz–{‘{Ã{ª}‘{×}‘{3逑{A‚‘{n‚—ƒ‘{ăö„‘{#…Y†‘{††Ň‘{ò‡5‰‘{b‰ŸŠ‘{ÌŠ›Œ‘{©ŒŽ‘{'Ž©’‘{·’&”‘{4”]£‘à|]£ɧ‘{ö§¿©‘{ì©1«‘{^«@­‘{m­£®‘{Юÿ¯‘{,°_±‘{Œ±Ȳ‘{õ²4´‘{a´©µ‘{Öµ·‘{H·'¹‘{5¹ªº‘{¸ºý‘{ø½ÀË‘à|ÀËJá‘{Xáµâ‘{Ãâìã‘{äBå‘{o塿‘{Îæè‘{0èjé‘{—éÏê‘{óê¾ì‘{êìî‘{Eî{ï‘{ŸïÖð‘{ñ=ò‘{iò¨ó‘{Ôó1õ‘{?õö‘{®öø‘{+ø–ù‘{¤ùû‘{ûvü‘{„ü‘þ‘{§þ‘{%’‘{¿Ê‘{Ø’‘{  ‘{\‘{‰ö ‘{ 3 ‘{` ¸ ‘{å ‘{;Ó‘{á‘{3a‘{…É‘{ב{(V‘{z=‘{aŽ‘{²ö‘{2‘{_‘{ºä‘{? ‘{c "‘{'"o#‘{}#«$‘{Ø$ &‘{.&Z'‘{~'¬(‘{Ð(þ)‘{"*P+‘{t+¦,‘{Ê,x.‘{œ.Ð/‘{ô/&1‘{J12‘{£2ê3‘{ø3)5‘{M56‘{£6L8‘{p8¢9‘{Ï9;‘{-;u<‘{ƒ<¶=‘{Ú=?‘{5?c@‘{@¾A‘{âA&C‘{4CôD‘{!EjF‘{xF¦G‘{ÓG I‘{7InJ‘{›JÎK‘{ûK)M‘{VMóN‘{ OUP‘{‚P¶Q‘{ãQS‘{BSzT‘{§TÛU‘{V|W‘{©WÚX‘{Y7Z‘{dZ›[‘{È[z]‘{§]Þ^‘{ _B`‘{o`ªa‘{×ac‘{0c^d‘{‹d1f‘{^fÏg‘{üg0i‘{]iºj‘{Èjük‘{)lZm‘{‡m²n‘{ßn p‘{7p¼q‘{éqs‘{>sŠt‘{·téu‘{vMw‘{zwy‘{=yqz‘{žz|‘{=|k}‘{˜}Ã~‘{ð~!€‘{N€~‘{«â‚‘{ƒÁ„‘{î„%†‘{R†‰‡‘{¶‡ñˆ‘{‰iŠ‘{–Š<Œ‘{iŒ”‘{ÁõŽ‘{"z‘{z%”‘à|]Éã‘à|wêóë‘à| cÚe0ŸÚeàePàe’g‘€}tiÎi0ŸÓl7p0ŸWrx‘€}yyØ{0ŸØ{ä{‘€}[|Ÿ|‘€}ß|O€0Ÿo€‘ƒ0Ÿ‘ƒ§ƒ‘€}§ƒA…0ŸA…Á†‘€}‡/‡‘€}/‡š0Ÿ¬Ð0Ÿ!¨0Ÿ4’P•‘€}`•™‘€}T¡ì¢0ŸÛªíª0ŸtÅyÅ‘€}Úeti0ŸÎiÓl0ŸO€o€0Ÿ‘ƒ§ƒ0ŸA…/‡0Ÿš¬0ŸÐ!0Ÿ¨T¡0Ÿì¢Ûª0ŸíªtÅ0ŸyÅ…0Ÿ'”40Ÿ’WÌ0ŸúÜ…0Ÿ còe0ŸòefPf’g‘ˆ}tiÎi0ŸÓl7p0ŸWrx‘ˆ}yyØ{0ŸØ{ä{‘ˆ}[|Ÿ|‘ˆ}ß|O€0Ÿo€‘ƒ0Ÿ‘ƒ§ƒ‘ˆ}§ƒA…0ŸA…Á†‘ˆ}‡/‡‘ˆ}/‡š0Ÿ¬Ð0Ÿ!¨0Ÿ4’¬“0Ÿ¬“P•‘ˆ}`•™‘ˆ}T¡ì¢0ŸÛªíª0ŸtÅyÅ‘ˆ} c’g0ŸtiÎi0ŸÓl7p0ŸWrÿrSŸvïvSyyØ{0ŸØ{ä{S[|Ÿ|Sß|O€0Ÿo€Á†0Ÿ‡š0Ÿ¬Ð0Ÿ!¨0Ÿ4’P•0Ÿ`•™0ŸT¡ì¢0ŸÛªíª0ŸÂ»ÿ»S#þ+þSSó"*‘ˆ{4*¤*‘ˆ{R+Ï+‘ˆ{},y-‘ˆ{«-ž.‘ˆ{Ð.Ç/‘ˆ{ù/ø0‘ˆ{*12‘ˆ{L2<3‘ˆ{n3b4‘ˆ{”45‘ˆ{È5?6‘ˆ{ 7‡7‘ˆ{M8·8‘ˆ{}9«:‘ˆ{k;ÿ;‘ˆ{¿<Ø=‘ˆ{ >Ÿ?‘ˆ{V@Ú@‘ˆ{‘AB‘ˆ{ÔBØC‘ˆ{ DtD‘ˆ{4E,F‘ˆ{^F0G‘ˆ{zr‘ˆ{¤-‘‘ˆ{í‘%”‘ˆ{]ÉÊ‘ˆ{OÊË‘ˆ{MË%Ì‘ˆ{ÀÕ¸Ö‘ˆ{êÖØ‘ˆ{:Ø.Ù‘ˆ{`ÙcÚ‘ˆ{•Ú‰Û‘ˆ{ÃÛ:Ü‘ˆ{úܵݑˆ{ç݈ޑˆ{ºÞ_ß‘ˆ{‘ß-à‘ˆ{_àᑈ{3áìᑈ{âÒ⑈{wêÏꑈ{GëÛ둈{òeti0ŸÎiÓl0ŸO€o€0Ÿ‘ƒ§ƒ0ŸA…/‡0Ÿš¬0ŸÐ!0Ÿ¨4’0Ÿ¬“T¡0Ÿì¢Ûª0ŸíªtÅ0ŸyÅ…0Ÿ c’g0Ÿ’gti‘¨{tiÎi0ŸÎij‘¨{Ól7p0ŸWrx‘¨{yyØ{0ŸØ{ä{‘¨{[|Ÿ|‘¨{ß|O€0Ÿo€Á†0ŸÁ†‡‘¨{‡š0Ÿš¬‘¨{¬Ð0ŸÐß‘¨{!¨0Ÿ¨¿‘¨{4’P•0ŸP•`•‘¨{`•™0Ÿ™T¡‘¨{T¡ì¢0Ÿì¢0¤‘¨{¨¤µ¤Pµ¤’ª‘˜{Ûªíª0Ÿíªg«‘˜{g«Ö«‘¨{ø°S²‘¨{”²à²‘˜{à²5´‘¨{5´Œ´‘˜{Œ´¥´‘¨{ìµL·‘¨{L·[·‘˜{×¹f½‘¨{XÁ‘˜{Ä6Å‘˜{tÅõÇ‘¨{È?É‘˜{}ɮʑ˜{ìÊÌ‘˜{Q̺͑˜{ÑÍ7Ï‘˜{NϷБ˜{ÎÐÕÓ‘˜{gÕ›Ö‘˜{xÙäÝ‘˜{Þ¤à‘˜{»àëᑘ{)âŽã‘˜{¥ã~瑘{•çÉ葘{^êÇ둘{Þë9푘{Pí„{Âî+ð‘˜{Bðñ‘˜{¶ñåò‘˜{ómô‘˜{„ô´õ‘˜{òõ"÷‘˜{`÷ú‘˜{ÛúRü‘˜{iü¨ý‘˜{æýþ‘˜{þ‘¨{c‘˜{cѨ{ј{Bs‘˜{±Þ ‘˜{ M ‘˜{‹ â ‘˜{ù "‘˜{`‰‘˜{¾­‘˜{âe‘˜{|Ô‘˜{둘{W½‘˜{ÔÄ‘˜{ãS‘˜{‘ó‘˜{ðGI‘˜{RI†J‘˜{LøM‘˜{NXO‘˜{oOÝO‘˜{RT‘˜{FT]‘˜{Q]n^‘˜{¬^³`‘˜{ñ`b‘˜{Nbqc‘˜{¯cÛd‘˜{e=f‘˜{{fŸg‘˜{Ýgi‘˜{Cikj‘˜{©j×k‘˜{ljm‘˜{m¯n‘˜{ínp‘˜{Yp…q‘˜{Ãqñr‘˜{/s]t‘˜{›tÃu‘˜{vlw‘˜{ƒw±x‘˜{ïxz‘˜{Yz…{‘˜{Ã{™}‘˜{×}õ~‘˜{3Ø€‘˜{0‚‘˜{n‚†ƒ‘˜{ăå„‘˜{#…H†‘˜{††´‡‘˜{ò‡$‰‘˜{b‰ŽŠ‘˜{ÌŠ’Œ‘˜{©ŒŽ‘˜{'Ž ’‘˜{·’”‘˜{]£¸§‘˜{ö§®©‘˜{ì© «‘˜{^«/­‘˜{m­’®‘˜{Ю˜{,°N±‘˜{Œ±·²‘˜{õ²#´‘˜{a´˜µ‘˜{Öµ ·‘˜{H·¹‘˜{5¹¡º‘˜{¸º²½‘˜{ÀËAᑘ{Xá¬â‘˜{ÃâÛ㑘{ä1员{oåæ‘˜{Îæò瑘{0èY鑘{—é¹ê‘˜{óêµì‘˜{êì {Eîj{ŸïÈð‘˜{ñ/ò‘˜{iòšó‘˜{Ôó(õ‘˜{?õpö‘˜{®öø‘˜{+øù‘˜{¤ùû‘˜{ûmü‘˜{„üˆþ‘˜{§þ‘˜{%‘˜{¿Á‘˜{؉‘˜{ ‘˜{K‘˜{‰í ‘˜{ " ‘˜{` § ‘˜{å ‘˜{;Ê‘˜{áþ‘˜{3P‘˜{…À‘˜{×ó‘˜{(E‘˜{z,‘˜{a}‘˜{²í‘˜{!‘˜{_|‘˜{ºÓ‘˜{. ‘˜{c "‘˜{'"f#‘˜{}#š$‘˜{Ø$ù%‘˜{.&I'‘˜{~'›(‘˜{Ð(í)‘˜{"*?+‘˜{t+•,‘˜{Ê,g.‘˜{œ.¿/‘˜{ô/1‘˜{J1n2‘˜{£2á3‘˜{ø35‘˜{M5n6‘˜{£6;8‘˜{p8‘9‘˜{Ï9ï:‘˜{-;l<‘˜{ƒ<¥=‘˜{Ú=÷>‘˜{5?R@‘˜{@­A‘˜{âAC‘˜{4CãD‘˜{!EaF‘˜{xF•G‘˜{ÓGùH‘˜{7I]J‘˜{›J½K‘˜{ûKM‘˜{VMâN‘˜{ ODP‘˜{‚P¥Q‘˜{ãQS‘˜{BSiT‘˜{§TÊU‘˜{VkW‘˜{©WÉX‘˜{Y&Z‘˜{dZŠ[‘˜{È[i]‘˜{§]Í^‘˜{ _1`‘˜{o`™a‘˜{×aòb‘˜{0cMd‘˜{‹d f‘˜{^f¾g‘˜{ügi‘˜{]i±j‘˜{Èjëk‘˜{)lIm‘˜{‡m¡n‘˜{ßnùo‘˜{7p«q‘˜{éqs‘˜{>syt‘˜{·tØu‘˜{v‘ {5?I@‘ {@¤A‘ {âA/C‘ {4CÚD‘ {!EsF‘ {xFŒG‘ {ÓGðH‘ {7ITJ‘ {›J´K‘ {ûKM‘ {VMÙN‘ { O;P‘ {‚PœQ‘ {ãQûR‘ {BS`T‘ {§TÁU‘ {VbW‘ {©WÀX‘ {YZ‘ {dZ[‘ {È[`]‘ {§]Ä^‘ { _(`‘ {o`a‘ {×aéb‘ {0cDd‘ {‹df‘ {^fµg‘ {ügi‘ {]iÃj‘ {Èjâk‘ {)l@m‘ {‡m˜n‘ {ßnðo‘ {7p¢q‘ {éq÷r‘ {>spt‘ {·tÏu‘ {v3w‘ {zwöx‘ {=yWz‘ {žzö{‘ {=|Q}‘ {˜}©~‘ {ð~€‘ {N€d‘ {«È‚‘ {ƒ§„‘ {î„ †‘ {R†o‡‘ {¶‡׈‘ {‰OŠ‘ {–Š"Œ‘ {iŒz‘ {ÁÛŽ‘ {"z‘ {z%”‘Ø|]Éã‘Ø|wêóë‘Ø| c’g0Ÿ’gti‘ø|tiÎi0ŸÎij‘ø|Ól7p0ŸWrx‘ø|yyØ{0ŸØ{ä{‘ø|[|Ÿ|‘ø|ß|O€0Ÿo€Á†0ŸÁ†‡‘ø|‡š0Ÿš¬‘ø|¬Ð0ŸÐß‘ø|!¨0Ÿ¨¿‘ø|4’P•0ŸP•`•‘ø|`•™0Ÿ™T¡‘ø|T¡ì¢0Ÿì¢0¤‘ø|Ûªíª0Ÿg«ã°‘ø|ø°S²‘ø|g²v²‘ø|à²5´‘ø|Œ´¥´‘ø|ìµL·‘ø|×¹À‘ø|tÅÈ‘ø|ÔgÕ‘ø|ÙÖxÙ‘ø|äÁ䑸|þ‘ø|cÑø| ðG‘ø|ÄJL‘ø|ÝOÑR‘ø|FT!‘ø|@hSh¶V¶‘]4”]£‘ø|]£ĦSĦö§‘ø|ö§”¨S”¨ì©‘ø|쩪Sª^«‘ø|^«z«Sz«´«‘ø|´«å«S嫬‘ø|¬D¬SD¬m­‘ø|m­Ÿ­SŸ­Ю‘ø|Юò®Sò®,°‘ø|,°N°SN°Œ±‘ø|Œ±®±S®±õ²‘ø|õ²³S³a´‘ø|a´ƒ´Sƒ´Öµ‘ø|ÖµøµSøµH·‘ø|H·u·Su·¯·‘ø|¯·Ú·SÚ·5¹‘ø|5¹`¹S`¹¸º‘ø|¸ºʺSʺn»‘ø|n»“»S“»×»‘ø|×»ó»Só»-¼‘ø|-¼I¼SI¼ƒ¼‘ø|ƒ¼š¼Vš¼ø½]ø½ÀË‘ø|zÌ•‘ø|ðš%›‘ø|%›¸\¸\ž]\žžPž·ž]·žžPžÇž]ÇžŸ[Ÿ Ÿ] ŸÌŸ^ÌŸ% ‘ø|% n 0Ÿn ƒ ]ƒ ¯ ^¯ ¡‘ø|¡L¡0ŸL¡’¡\’¡.¢‘ø|.¢‚¢\‚¢£‘ø|£|£\|£÷£‘ø|÷£G¤\G¤Ѥ‘ø|Ѥ0¥\0¥«¥‘ø|«¥ñ¥\ñ¥‰¦‘ø|‰¦â¦\â¦u§‘ø|u§ŧ\ŧN¨‘ø|N¨§¨\§¨:©‘ø|:©™©\™©ª‘ø|ª^ª\^ªñª‘ø|ñª7«\7«Ϋ‘ø|Ϋè«]諬^¬g¬‘ø|g¬§¬0Ÿ§¬Q­]Q­^­[^­&®0Ÿ&®6®]6®C®[C® ¯0Ÿ ¯9¯]9¯_¯‘ø|_¯o¯]o¯|¯[|¯D°0ŸD°°\°!±‘ø|!±l±\l±ÿ±‘ø|ÿ±J²\J²ݲ‘ø|Ĉđø|aŗ鑸|hêV‘ø|ã…‘ø|[)[PP[Š[‘ø{ç[Å\‘ø{9hti ‘€|”0)ÿŸÎij ‘€|”0)ÿŸÁ†‡ ‘€|”0)ÿŸP•`• ‘€|”0)ÿŸzšðš ‘€|”0)ÿŸŒð ‘€|”0)ÿŸÕž9Ÿ ‘€|”0)ÿŸ w  ‘€|”0)ÿŸì¢V£ ‘€|”0)ÿŸø°y± ‘€|”0)ÿŸà²ƒ³ ‘€|”0)ÿŸÿ»q¼ ‘€|”0)ÿŸK½f½ ‘€|”0)ÿŸyÅÆ ‘€|”0)ÿŸ·ÆÇ ‘€|”0)ÿŸôúõ‘È{ÿõYö‘È{‘ö÷‘È{8÷Uù‘È{ù^ú‘È{¸úû‘È{Rû—û‘È{ìûKü‘È{†üàü‘È{ýuý‘È{°ýÇý‘È{OþTþ‘È{äþ÷þ‘È{rÿwÿ‘È{Z‘È{’ì‘È{$~‘È{¹Ì‘È{,Å‘È{3^‘È{ª½‘È{H‘È{”Ù‘È{]‘È{˜ê‘È{%ƒ‘È{ c’g0Ÿ’gºgUºgÆgPÆgti‘à{tiÎi0ŸÎij‘à{Ól7p0ŸWrNvVWvxVyyØ{0ŸØ{ä{V[|Ÿ|Vß|O€0Ÿo€Á†0ŸÁ†‡‘à{‡š0Ÿš¤P¤¬‘à{¬Ð0ŸÐß‘à{!¨0Ÿ¨¿‘à{4’P•0ŸP•`•‘à{`•™0Ÿ™â™‘à{zš¡›‘à{9œ$‘à{Œ=ž‘à{ÕžƒŸ‘à{ Ä ‘à{T¡ì¢0Ÿì¢ £‘à{Ûªíª0Ÿg«‘«Uø°ñ‘à{à²ͳ‘à{Œ´˜´U˜´š´Yš´¥´‘{»ÿ»Vÿ»»¼‘à{K½f½‘à{tÅyÅVyÅOÆ‘à{·ÆeÇ‘à{þ#þ‘à{#þ+þVVjåŒåYŒå åV åÔ周{ÔåméVmécꑨ{hêwêVRï;ò‘¨{@ò¼ò‘¨{ÁòIó‘¨{NóŒö‘¨{‘ö3÷‘¨{8÷ø‘¨{øúVúú‘¨{ú3úV3ú³ú‘¨{¸úÐúVÐúMû‘¨{RûjûVjûçû‘¨{ìûüVüü‘¨{†üºýVºýJþ‘¨{Oþßþ‘¨{äþmÿ‘¨{rÿûÿ‘¨{‘¨{’‘¨{$´‘¨{¹'‘¨{,.‘¨{3¥‘¨{ª‘¨{‘¨{”‘¨{“‘¨{˜ ‘¨{%¶‘¨{»° ‘¨{µ æ ‘¨{ë m ‘¨{r ô ‘¨{ù € ‘¨{…  ‘¨{ • ‘¨{𠑍{œ‘¨{¡!‘¨{&¦‘¨{«(‘¨{-~‘¨{ÐP‘¨{U둨{ð‡‘¨{Œ&‘¨{+Á‘¨{ÆY‘¨{^‘¨{ ‘¨{¼/‘¨{4Ä‘¨{ÉQ‘¨{VÞ‘¨{ãJ‘¨{ c’g0Ÿ’g[h\[hkhPkhti‘ð|tiÎi0ŸÎij‘ð|Ól7p0ŸWrx‘ð|yyØ{0ŸØ{ä{‘ð|[|Ÿ|‘ð|ß|O€0Ÿo€Á†0ŸÁ†‡‘ð|‡š0Ÿš¬\¬Ð0ŸÐß\!¨0Ÿ¨¿\4’P•0ŸP•U•PU•`•‘ð|`•™0Ÿ™}™\}™zšPzšðš‘ð|ðš<›\<›9œP9œ¡œ\¡œŒ‘ð|ŒØ\ØÕžPÕžT¡‘ð|T¡ì¢0Ÿì¢0¤‘ð|Ûªíª0Ÿg«3¬\3¬ã°‘À{ø°S²‘ð|g²v²‘À{à²5´‘ð|Œ´¥´\ìµm¶\m¶v¶‘À{×¹º\º»‘À{»f½‘ð|f½ݽ‘À{¿¾ö¿‘À{tÅõÇ‘ð|õÇÈ\ÔJÕ‘À{ÙÖØ‘À{1ØlØ\lØbÙ‘À{þ#þ\#þ+þ‘ð|+þ±ÿ‘À{Âÿé‘À{ú*‘À{;v\vn‘À{‘ð|cŠ‘À{›Ã‘À{ õ‘À{Êr ‘À{ *‘À{4*¶*‘À{R+á+‘À{},•-‘À{«-º.‘À{Ð.ã/‘À{ù/1‘À{*162‘À{L2X3‘À{n3~4‘À{”4,5‘À{È5f6‘À{ 7±7‘À{M8á8‘À{}9Ï:‘À{k;#<‘À{¿<ô=‘À{ >º?‘À{V@õ@‘À{‘A8B‘À{ÔBôC‘À{ D˜D‘À{4EHF‘À{^FTG‘À{ÄJ6K‘À{ÝO_P‘À{1QVR‘À{lRR‘À{4”b•‘À{•±–‘À{Ζm—‘À{?˜Ø‘À{œ™š‘À{››àœ‘À{ùœ'ž‘À{DžrŸ‘À{Ÿ½ ‘À{Ú S¡‘À{5¢]£‘À{ø½,¿‘À{B¿sÀ‘À{‰ÀûÀ‘À{ÍÁû‘À{ÃçÑÀ{¹Ä¨Å‘À{zÆÇ‘À{ÚÇÉ‘À{*ÉRÊ‘À{hÊÞÊ‘À{zŽ‘À{¤Q‘‘À{í‘%”‘À{]É9Ê‘À{OÊ7Ë‘À{MËAÌ‘À{WÌ>Í‘À{ΩΑÀ{{ÏnÑ‘À{„ÑÌÓ‘À{âÓ Õ‘À{#ÕÔÖ‘À{êÖ$Ø‘À{:ØJÙ‘À{`ÙÚ‘À{•Ú­Û‘À{ÃÛ^Ü‘À{úÜÑÝ‘À{çݤޑÀ{ºÞ{ß‘À{‘ßIà‘À{_àâ‘À{âîâ‘À{jå¥å‘À{¥åhê‘ð|hêwêPwêóê‘À{Gëóë‘À{Rïöó‘ð|ô…‘ð| c7p0ŸWrx‘ {yyØ{0ŸØ{ä{‘ {[|Ÿ|‘ {ß|;­0Ÿ;­ã°‘ {ã°»0ŸÂ»ÿ»‘ {ÿ»tÅ0ŸtÅyÅ‘ {yÅ#þ0Ÿ#þ+þ‘ {+þ0Ÿ‘ { 0Ÿ ðG‘ {ðGÝO0ŸÝOR‘ {R4”0Ÿ4”]£‘ {]£ø½0Ÿø½hÊ‘ {hÊz0Ÿz%”‘ {]Éã‘ {wêóë‘ {g!4"Vø½]¾VB¿¿V{Ï”ÏVFГÐVâÓJÔVg!H#0Ÿø½‰À0ŸWÌÀÕ0Ÿjå¬å0Ÿ¬åÔå‘ä}méhê‘ä}hêwê0ŸRﵑä}µ# S# 3 ‘ä}3 K Sµ Ù ‘ä}[ …‘ä}Y#()‘¸{4*F*‘¸{R+g+‘¸{},’,‘¸{«-Â-‘¸{Ð.Õ.‘¸{ù/H0‘¸{*1q1‘¸{L2“2‘¸{n3¹3‘¸{”4ÿ4‘¸{È536‘¸{ 7~7‘¸{M8Z8‘¸{}9—9‘¸{k;y;‘¸{¿<Ç<‘¸{è<í<‘¸{ >“?‘¸{V@Ñ@‘¸{‘AB‘¸{ÔB/C‘¸{ DkD‘¸{4EzE‘¸{^F'G‘¸{zÅ‘¸{¤$‘‘¸{ÀÕÖ‘¸{êÖúÖ‘¸{ ×Yב¸{:؅ؑ¸{`ٮّ¸{•ÚàÚ‘¸{ÃÛ1Ü‘¸{!$Y)‘Ø{4*w*‘Ø{R+Ž+‘Ø{},Ð,‘Ø{«-°-‘Ø{Ð.$/‘Ø{ù/Q0‘Ø{*1}1‘Ø{L2Ÿ2‘Ø{n3Å3‘Ø{”45‘Ø{È5H6‘Ø{ 7“7‘Ø{M8Ã8‘Ø{}9´:‘Ø{k;<‘Ø{¿<;=‘Ø{ >­>‘Ø{Â>¨?‘Ø{V@ã@‘Ø{‘A&B‘Ø{ÔB;C‘Ø{ D}D‘Ø{4EƒE‘Ø{^F9G‘Ø{ÀÕÖ‘Ø{:ؑؑØ{`ٺّØ{•ÚìÚ‘Ø{ÃÛCÜ‘Ø{ c7p0ŸWrx‘{yyØ{0ŸØ{ä{‘{[|Ÿ|‘{ß|»0ŸÂ»ÿ»‘{ÿ»tÅ0ŸtÅyÅ‘{yÅ#þ0Ÿ#þ+þ‘{+þ0Ÿ‘{H#0ŸH#Ž#VŽ#ž#Pž#n)‘È{4*­*‘È{R+Ø+‘È{},å,‘È{«-.‘È{Ð.0/‘È{ù/]0‘È{*1†1‘È{L2¨2‘È{n3Î3‘È{”4#5‘È{È5]6‘È{ 7¨7‘È{M8Ø8‘È{}9Æ:‘È{k;<‘È{¿<D=‘È{ >±?‘È{V@ì@‘È{‘A/B‘È{ÔBDC‘È{ DD‘È{4E˜E‘È{^FKG‘È{ðGМ0Ÿùœz0Ÿz³V³¤‘{¤‘V‘í‘‘{í‘”V”%”‘{]ɦÉV¦ÉOÊ‘{OʘÊV˜ÊMË‘{MË–ËV–ËWÌ‘{WÌÀÕ0ŸÀÕ$Ö‘È{êÖtבÈ{:ؚؑÈ{`ÙÏÙ‘È{•ÚõÚ‘È{ÃÛUÜ‘È{úÜSÝVSÝçÝ‘{çÝ,ÞV,ÞºÞ‘{ºÞßVߑߑ{‘ßÚßVÚß_à‘{_à˜àV˜à3á‘{3áiáViáâ‘{âgâVgâã‘{wê„êV„êGë‘{Gë~ëV~ëóë‘{ c7p0ŸWrx‘˜{yyØ{0ŸØ{ä{‘˜{[|Ÿ|‘˜{ß|»0ŸÂ»ÿ»‘˜{ÿ»tÅ0ŸtÅyÅ‘˜{yÅ#þ0Ÿ#þ+þ‘˜{+þ0Ÿ‘˜{H#0ŸH#Á#SÁ#Ð#PÐ#w:‘˜{k;¬;‘˜{¿<s?‘˜{V@‡@‘˜{‘AñA‘˜{ÔBðG‘˜{ðGМ0Ÿùœz0ŸzžSž¤‘˜{¤æSæí‘‘˜{í‘’S’%”‘˜{]ÉWÌ‘˜{WÌÀÕ0ŸÀÕ ×‘˜{ ×G×SG×㑘{wêó둘{ c7p0ŸWrx‘È|yyØ{0ŸØ{ä{‘È|[|Ÿ|‘È|ß|»0ŸÂ»ÿ»‘È|ÿ»tÅ0ŸtÅyÅ‘È|yÅ#þ0Ÿ#þ+þ‘È|+þ0Ÿ‘È|H#0ŸH#f$‘È||$ðG‘È|ðGМ0Ÿùœz0Ÿz%”‘È|]ÉWÌ‘È|WÌÀÕ0ŸÀÕ`Ù‘È|•Úã‘È|wêóë‘È| c7p0ŸWrx‘À|yyØ{0ŸØ{ä{‘À|[|Ÿ|‘À|ß|»0ŸÂ»ÿ»‘À|ÿ»tÅ0ŸtÅyÅ‘À|yÅ#þ0Ÿ#þ+þ‘À|+þ0Ÿ‘À|H#0ŸH#Ø$‘À|ð$ðG‘À|ðGМ0Ÿùœz0Ÿz%”‘À|]ÉWÌ‘À|WÌÀÕ0ŸÀÕ•Ú‘À|ÃÛã‘À|wêóë‘À| c7p0ŸWrx‘Ð|yyØ{0ŸØ{ä{‘Ð|[|Ÿ|‘Ð|ß|»0ŸÂ»ÿ»‘Ð|ÿ»tÅ0ŸtÅyÅ‘Ð|yÅ#þ0Ÿ#þ+þ‘Ð|+þ0Ÿ‘Ð|H#0ŸH#Û(‘Ð|Û()S)ðG‘Ð|ðGМ0Ÿùœz0Ÿz%”‘Ð|]ÉWÌ‘Ð|WÌÀÕ0ŸÀÕã‘Ð|wêóë‘Ð| c7p0ŸWrx‘°|yyØ{0ŸØ{ä{‘°|[|Ÿ|‘°|ß|»0ŸÂ»ÿ»‘°|ÿ»tÅ0ŸtÅyÅ‘°|yÅ#þ0Ÿ#þ+þ‘°|+þ0Ÿ‘°|М0ŸùœD’0ŸD’H’PH’%”‘°|]ÉOÊ‘°|OÊúÜ0ŸúÜã‘°|wêóë‘°| c7p0ŸWrx‘¸|yyØ{0ŸØ{ä{‘¸|[|Ÿ|‘¸|ß|»0ŸÂ»ÿ»‘¸|ÿ»tÅ0ŸtÅyÅ‘¸|yÅ#þ0Ÿ#þ+þ‘¸|+þ0Ÿ‘¸|М0Ÿùœ)’0Ÿ)’-’P-’ü“Sü“%”‘¸|]ÉgÉSgÉOÊ‘¸|OÊYÊSYÊMË‘¸|MËúÜ0ŸúÜ&ÝS&ÝçÝ‘¸|çÝùÝSùݺޑ¸|ºÞÄÞSÄÞ‘ß‘¸|‘ß›ßS›ß_à‘¸|_àwàSwà3ᑸ|3áHáSHá⑸|â(âS(â㑸|wêêSêG둸|GëQëSQëó둸| c7p0ŸWrx‘ø{yyØ{0ŸØ{ä{‘ø{[|Ÿ|‘ø{ß|»0ŸÂ»ÿ»‘ø{ÿ»tÅ0ŸtÅyÅ‘ø{yÅ#þ0Ÿ#þ+þ‘ø{+þ0Ÿ‘ø{М0Ÿùœ_’0Ÿ_’p’Pp’%”‘ø{%”^•]^•i•Pi•Ì•‘è{Ä<Ä‘è{aŬőè{&ÆGÆ‘è{GÆ]Ç]]ÇÎÇ‘ø{ÎÇqÈ]qÈ(É‘ø{(É]É]]ÉúÜ0ŸúÜã‘ø{ã”å]”åhê‘ø{hêwê]wêóë‘ø{óë‘ì]‘ì1í‘ø{1íðí]ðíÆî‘ø{ÆîRï]Rï…‘ø{Cð ‘ä}3 Œ‘ä} c7p0ŸWrx‘à{yyØ{0ŸØ{ä{‘à{[|Ÿ|‘à{ß|»0ŸÂ»ÿ»‘à{ÿ»tÅ0ŸtÅyÅ‘à{yÅ#þ0Ÿ#þ+þ‘à{+þ0Ÿ‘à{…0Ÿ c7p0ŸWruwŸvßwwyyØ{0ŸØ{ä{w[|Ÿ|wß|»0ŸÂ»ÿ»wÿ»tÅ0ŸyÅ#þ0Ÿ#þ+þw+þ0Ÿw¬å0Ÿ¬åÉåVÉåÔåPméáéVáéþéSþéhêwhêRï0ŸRï­ñV­ñÕñSÕñ@òw@òMòVMòXòPXòÁòwÁòÎòVÎòÙòPÙòNówNóËó_Ëó# ‘Ð}# 3 _3 µ ‘Ð}µ Ù _[ -‘Ð}-f_fÐPÐÝVÝèPèUwUpVpŽSŽðwð V *S*ŒwŒ®V®^+w+MVM¡^¡ÆwÆèVè'^'^w^kVk ^ ;V;ZSZ¼w¼É^ÉÞVÞéPéVwVcVcnPnãwãV…^ c7p0ŸWrx‘˜|yyØ{0ŸØ{ä{‘˜|[|Ÿ|‘˜|ß|»0ŸÂ»ÿ»‘˜|ÿ»tÅ0ŸtÅyÅ‘˜|yÅ#þ0Ÿ#þ+þ‘˜|+þ0Ÿ‘˜|М0ŸùœÜ’0ŸÜ’%”‘˜|]ÉúÜ0ŸúÜ_à‘˜|_àã0Ÿwêó둘| c7p0ŸWrx‘ |yyØ{0ŸØ{ä{‘ |[|Ÿ|‘ |ß|»0ŸÂ»ÿ»‘ |ÿ»tÅ0ŸtÅyÅ‘ |yÅ#þ0Ÿ#þ+þ‘ |+þ0Ÿ‘ |М0ŸùœÜ’0ŸÜ’%”‘ |]ÉúÜ0ŸúÜ_à‘ |_àã0Ÿwêóë‘ | c7p0ŸWrx‘¨|yyØ{0ŸØ{ä{‘¨|[|Ÿ|‘¨|ß|»0ŸÂ»ÿ»‘¨|ÿ»tÅ0ŸtÅyÅ‘¨|yÅ#þ0Ÿ#þ+þ‘¨|+þ0Ÿ‘¨|М0ŸùœÜ’0ŸÜ’ã’Pã’%”‘¨|]ÉúÜ0ŸúÜ_à‘¨|_àã0Ÿwêó둨| c7p0ŸWrx‘è{yyØ{0ŸØ{ä{‘è{[|Ÿ|‘è{ß|»0ŸÂ»ÿ»‘è{ÿ»tÅ0ŸtÅyÅ‘è{yÅ#þ0Ÿ#þ+þ‘è{+þ0Ÿ‘è{%”0Ÿ%” •V •Ì•‘à{Ĉđà{aÅïÅ‘à{&ÆØÆ‘à{Ç)ÇV)ÇÎÇ‘è{ÎÇÈVÈ(É‘è{(É4ÉV4É]É‘è{]Éã0ŸãräVräÃä‘è{ÃäåVåjå‘è{jåyåVyåwê‘è{wêóë0ŸóëíVí1í‘è{1íwíVwí‰î‘è{‰îïVï…‘è{ c7p0ŸWrx‘ð{yyØ{0ŸØ{ä{‘ð{[|Ÿ|‘ð{ß|»0ŸÂ»ÿ»‘ð{ÿ»tÅ0ŸtÅyÅ‘ð{yÅ#þ0Ÿ#þ+þ‘ð{+þ0Ÿ‘ð{%”0Ÿ%”6•S6•Ì•‘Ð{ÄzÄ‘Ð{aŵőÐ{&ƣƑÐ{Ç.ÇS.ÇÎÇ‘ð{ÎÇüÇSüÇ(É‘ð{(ÉSÉSSÉ]É‘ð{]Éã0Ÿã>äS>äÃä‘ð{ÃäâäSâäjå‘ð{jå–åS–åhê‘ð{hêjêSjêwê‘ð{wêóë0ŸóëíSí1í‘ð{1ítíStí‰î‘ð{‰îÐîSÐî…‘ð{ c7p0ŸWrx‘€|yyØ{0ŸØ{ä{‘€|[|Ÿ|‘€|ß|»0ŸÂ»ÿ»‘€|ÿ»tÅ0ŸtÅyÅ‘€|yÅ#þ0Ÿ#þ+þ‘€|+þ0Ÿ‘€|%”0Ÿ%”Ì•‘€|Ì•ü•\ü•S–_S–¨–\¨–•—‘€|]˜ž³‘€|¢·Å·‘€|帘»‘€|ç¼i¾‘€|i¾§¾\§¾¿‘€|¿3¿\3¿Ô¿‘€|Ô¿ð¿\ð¿5À_5À|À‘€||À^Á_^ÁÁ‘€|ÁðÁ_ðÁp‘€|p¾Â_¾ÂDÑ€|DÃÃ_ÃÉÃQÉÃÄ\Ĉđ€|ˆÄÄÄ\ÄÄ]É‘€|]Éã0Ÿãwê‘€|wêóë0Ÿóë…‘€| c7p0ŸWrx‘ˆ|yyØ{0ŸØ{ä{‘ˆ|[|Ÿ|‘ˆ|ß|»0ŸÂ»ÿ»‘ˆ|ÿ»tÅ0ŸtÅyÅ‘ˆ|yÅ#þ0Ÿ#þ+þ‘ˆ|+þ0Ÿ‘ˆ|%”0Ÿ%”Ì•‘ˆ|[—"˜Vr˜$™V$™º™‘ˆ|º™šVš¢š‘ˆ|¢š%›V%›ݲ‘ˆ|ݲç²V粞³‘ˆ|¶5¶V–¶ŶVŶW·‘ˆ|W·p·V¢·Ñ·VÛ·¸V¸å¸‘ˆ|å¸7¹Vô¹ºVºÁº‘ˆ|˜»ç¼‘ˆ|Ĉđˆ|aÅ]É‘ˆ|]Éã0Ÿãwꑈ|wêóë0Ÿóë…‘ˆ| c7p0ŸyyØ{0Ÿß|»0Ÿÿ»tÅ0ŸyÅ#þ0Ÿ+þ0Ÿ%”0Ÿ%›4›‘ð|4›K›PK›9¯‘|_¯ݲ‘|]Éã0Ÿwêóë0ŸFøÔøSÔøÜø|ŸÜøùSù.ù|ŸùúSú@úS@úlú|Ÿ¸úÚúSÚúæú|ŸRûbûSbû„û|ŸìûüSüü|Ÿ†üžüSžü¸ü|Ÿý5ýS5ýMý|Ÿ c’g0ŸtiÎi0Ÿ/j7jv3$p"7j;j_¯j»jP»jßj_›kµkwµk¾kYÓl7p0ŸyyØ{0Ÿß|O€0Ÿo€Á†0Ÿ‡š0Ÿ¬Ð0Ÿ!¨0ŸÊÓ v3$s"#Ó× v3$s"#4’P•0Ÿ`•™0ŸT¡ì¢0ŸÖ©ЪYÛªíª0Ÿô´ìµY¤·“¸]â¸×¹YdÀXÁ]¹Á½Â]ÃÄ]pÄtÅ]9È}ÉY¨ÉìÊYMËQÌ]‰ÌÑÍYþÍxÎYƒÏÎÐY4Ñ8Ñw÷ÒÔY¢ÕÙÖY ÝÞY_ßJàwJà»àY/á)âYvâ¥ãY3åµåY`æ•çYÐçéYéué_1ê^êY“êÞëY#ìPíYÈíÂîYïBðY‹ð¶ñYòóYYó„ôY¹ôòõY\ö`÷YáùÛúYûiüYÜüæýYþþw¬%Y7c]HBY·±Y"  Y‘ ‹ Y¯ ù Yf `Y“¾Yû-]ÆâYG|Y›ëY]WY ÔY‹jwjãYZ‘Y» YNHRI]ÀIÄJ_¶LžMwžMoOY7SFTY­[ç[YM\Q]Y¨]¬^YÊ^_YL_ˆ_Yí_ñ`Y(aNbY‰b¯cYêceY@e{fY¢fÝgYhCiY¥i©jYùjlY4lmYÑmínY=oYpY¿pÃqYr/sY‘s›tYÆtvY*vƒwYÓwïxYyYzYˆzÃ{Yì{h|YÍ|×}Y~3YìY[n‚Yº‚ăY„#…Y|…††Yè†ò‡YXˆb‰YȉÌŠYñŠ+‹YP‹©ŒYÉŒ'ŽYoŽsŽwÓŽÕŽwþŽAwUY£ÝYâ!]É‘w‘_‘__‘·’YØ’ÓwÓ4”Y̦ö§Y¬¨ì©Ydª^«Yu«´«Y૬YQ¬m­YÉ­ЮY(¯,°Yˆ°Œ±Yñ±õ²YZ³a´YÜ´ÖµYN¶H·Yp·¯·Yß·5¹Ye¹¸ºY» »wŸ»×»wî»-¼YD¼ƒ¼Yé¼ø½YàXáYxáÃâYãäYeäoåYÄåÎæY&ç0èYè—éYÝéóêYºëêìYíEîYlîŸïYÆïñY)ñiòYòÔóYøó?õY´õ®öYÛö+øY]ø¤ùYÖùûYYû„üYOý.þw.þ§þYÖþ%YÅ¿Y…gwgØYN YĦw¦Y‰Y¿ YY ` ]À å Y ;Y©áY83Y\…Yª×Y(YzY8aY²Y×Y-_YˆºYõY:c Yñ '"YD"}#YÎ#Ø$Y%.&Yƒ&~'YÏ'Ð(Y!)"*YK*t+YÏ+Ê,Y¡-œ.YÓ.ô/YO0J1Y¥1£2Y½2ø3YO4M5Y¨5£6Yo7p8YÅ8Ï9Y#:-;YJ;ƒ<Y¾<Ú=Y+>5?Y†?@Yá@âAYB4CYD!EY;ExFYÉFÓGY0H7IY”I›JYôJûKYLLVMYN OYxO‚PYßPãQ]8RBSYyS§TYUV]VQV]¢V©W]ýWYYZYdZYÄZÈ[Y \§]Y^ _Yh_o`YÐ`×aY,b0c]tc‹dYWe^f]õfüg]Yh]i]ziÈjY%k)l]}l‡mYØmßn] o7pYåpéq]:r>s]³s·t] uvYsvzwY3x=yYšyžz]°zÜz]9{=|]Ž|˜}Yé}ð~]DN€Y¡€«Y ‚ƒYçƒî„YX…R†Y¯†¶‡Yˆ‰Y’‰–Š]b‹iŒ]ºŒÁ]Ž"]cžf ‘Ð~Ÿ““Èžf²fP““Ȳf’g‘°}““È’g¸“ ‘Ð~Ÿ““ȸ“Å“P““ÈÅ“Œ˜ ‘Ð~Ÿ““ÈŒ˜™‘°}““È™… ‘Ð~Ÿ““È cWr0ŸWrEv\EvWvPWvx\xæº0Ÿæºÿ»Sÿ»tÅ0ŸtÅxÅPxÅyÅ\yÅ#þ0Ÿ#þ+þS+þ0ŸSææ0ŸææðæPðæúæSúæ…0Ÿ cYc0ŸÔcÝd0ŸÝdîdPîd%e]%eGe0ŸGe]eP]eŒe]Œeh0ŸhhPh9hV9hUh0ŸUhkhPkhxh0ŸxhŽhPŽhtiVtiŸi0Ÿ¯iÎi0ŸÎijVjjPjÅj\Åj$kV$k[m0Ÿ¤mÇm]ÇmÔmPÔmßm]n'n0Ÿ'n?n]_n«n0Ÿyyz0Ÿzz]zCz0ŸØ{ä{][|Ÿ|]ß|ð|0Ÿ‚~O€0ŸO€o€\o€§ƒ0Ÿ§ƒA…PA…Á†0ŸÁ†‡V‡/‡0Ÿ/‡Öˆ]ÖˆlŠPlŠš]šÐ0ŸÐÔPÔßVßë\ë!]!¨0Ÿ¨¿V¿þ\þ4’]4’P•0ŸP•U•PU•`•‘ð|`•zš0ŸzšðšVðšóšPóšýšV9œMœVMœŒ]ŒP¨ž‘ð|Õž P   V  T¡]ì¢ü¢Vü¢0¤]0¤ý¤0Ÿý¤7¥V7¥ü¦0Ÿü¦§P§~§V~§ͧ0ŸÍ§ݧPݧŸ©VŸ©Ъ]ЪÖª\ÖªÛªVÛª9«0Ÿ9«g«Vg«W®0ŸW®g®Pg®Û®]Û®“°0Ÿ“°¯°P¯°ã°]ã°"±V"±S²]S²£²0Ÿ£²²²V²²à²0Ÿà²³V³5´]5´D´0ŸD´b´Vb´¥´0Ÿ¥´¾´V¾´ìµ]ìµL·0ŸL·P·PP·[·V[·“¸0Ÿ“¸¬¸V¬¸×¹]×¹ÿ»0Ÿÿ» ¼V ¼f½]f½tÅ0ŸyņÅV†Å·Æ]·ÆÄÆVÄÆõÇ]õÇÈ0ŸÈÈPÈ-ÈV}ÉQÌ0ŸQ̉ÌV‰ÌÑÍ]ÑÍNÏ0ŸNσÏVƒÏÎÐ]ÎÐÚÐ0ŸÚÐãÐVãÐgÕ0ŸgÕÕVÕÙÖ]ÙÖxÙ0ŸxÙŠÙVÔÙÚ0ŸÚ ÚP ÚýÜVýÜÞ]ÞlÞVlÞ”Þ\£ÞàÞVôÞßVß»à])âvâVvâ¥ã]¥ãäVä½å0Ÿ½åÛåVÛåæåXðåôåXôå#摸{#æ`æV`æ•ç]•çÀçVÀçé]é0éV0é^ê]^ê“êV“êÞë]Þë#ìV#ìPí]PíxíVxíÂî]ÂîïVïBð]BððVð¶ñ]¶ñöñVöñó]óYóVYó„ô]„ô¾ôV¾ôòõ]òõ"öV"ö`÷]`÷­ùV­ùÛú]ÛúûVûiü]iü™üV™üæý]æýÃ0ŸÃòVòB]BaVa±]±ÕVÕ ] D VD ‹ ]‹ ¯ V¯ ù ]ù  V `]`V¾]¾ÜVÜz0Ÿz¶‘¸{âðXðû‘¸{ûGVG|]|›V›ë]ëðPð VW V Ô]ÔVã]ãV]GVG‘]‘³V³D]DÊ0ŸÊì]ì"0Ÿ"@]@EPE ] r!0Ÿr!‹!P‹!½!]½!Ë!0ŸË!â!Pâ!4"]4"^&0Ÿ^&i&Pi&ï&Sï&S'0ŸS'`'P`'ý'Sý'«-0Ÿ«-î-Sî-Ð.]Ð./S/ù/]ù/0S0*1]*1/1P/1N1SL2È50ŸÈ5ú5Sú5 7] 7J7SJ7M8]M8~8S~8}9]}9¹9S¹9k;]k;n;Pn;;S;¿<]¿<1>0Ÿ1>_>S_>Î>0ŸÎ>×>S×>L0ŸLMLVMLO]O¸OP¸O•T0Ÿ•TòT\òT,U0Ÿ,U7UP7U0V\ÝVPW0ŸPWiWPiWˆW\ˆWžW0ŸžW®WP®WþW\þW X0Ÿ X4XP4XáX\áXoY0ŸoY~YP~YZ\Zñ`0Ÿñ`a\aNb]Nbvb\vb¯c]¯c×c\×ce]eePe@e\{f©j0Ÿ©jùj\ùjl]l{l\{lm]m¼m\¼mín]ín(o\(oYp]Yp^pP^pˆp\Ãqþq\þq/s]/sjs\js›t]›t tP tÆt\v}v\}vƒw]ƒw¾w\¾wïx]ïxôxPôxy\Yzh|0Ÿ×}ì}\ì}3]3O\OhXhq‘À|~‚X‚§‘À|§·\·º€‘À|R\Rn‚]n‚¥‚\¥‚ă]ăûƒ\ûƒ#…]#…^…\^…††]††Á†\Á†ò‡]ò‡1ˆ\1ˆb‰]b‰g‰Pg‰‘‰\ÌŠ+‹0Ÿ+‹£‹\£‹©Œ]©Œ!\!'Ž]'Ž_‘0Ÿ_‘4”]4”Hš0ŸHš­›]­›М0ŸùœÚ 0ŸÚ 5¢]5¢?¢P?¢]£]]£Í£0ŸÍ£,¤V,¤f¤0Ÿf¤u¤Pu¤K¥Vÿ¥Ÿ¦0ŸŸ¦ɦVɦö§]ö§¨V¨,¨Q,¨5¨‘°|B¨F¨QF¨t¨‘°|쩬0Ÿ¬ù¬‘°|m­¤­V¤­Ю]Ю÷®V÷®,°],°F°VF°Œ±]Œ±¦±V¦±õ²]õ²³V³a´]a´{´V{´Öµ]ÖµÛµPÛµðµVH·¯·0Ÿ¯·ß·Vß·5¹]5¹e¹Ve¹¸º]¸ºø½0Ÿø½B¿]B¿G¿PG¿‰À]‰ÀëË0ŸëËüËPüË-ÍV-Í´Í0Ÿ´ÍÄÍPÄÍdÎVdÎ!Ï0Ÿ!Ï6ÏP6ÏtÏVtφÏ0Ÿ†Ï–ÏP–Ï¿ÏV¿ÏÐ0ŸÐ“ÐP“ÐÔÑVÔÑ[Ò0Ÿ[ÒkÒPkÒ+ÛV+Û_Û0Ÿ_ÛiÛPiÛàVàXá]XáxáVxáÃâ]ÃâäâVäâä]ä7äV7äoå]oååVåÎæ]ÎæìæVìæ0è]0èTèVTè—é]—éÕéVÕéóê]óêÌëVÌëêì]êì(íV(íEî]Eî†îV†îŸï]ŸïàïVàïñ]ñ>ñV>ñiò]iòòVòÔó]ÔóøóVøó?õ]?õ^õV^õ®ö]®öÛöVÛö+ø]+ø]øV]ø¤ù]¤ùÖùVÖùû]ûYûVYû„ü]„üºüVºü§þ]§þËþVËþ%]%DVDU]UyVy¿]¿AVAØ]ØNVN]EVE‰]‰¿V¿ ]  P  V` ƒ ‘Ð{ƒ ¤ V¤ å ]å  V ;];TVT…_…©V©á]á_3]3YVY…]…ªVª×]×V(](QVQz]z5V5a]a™V™²]²×V×]*V*_]_|V|º]ºåVå]7V7c ]c ñ Vñ '"]'"D"VD"}#]}#—#V—#Ø$]Ø$ù$Vù$.&].&R&VR&~']~'¡'V¡'Ð(]Ð(ê(Vê("*]"*H*VH*t+]t+˜+V˜+Ê,]Ê,g-Vg-œ.]œ.Ø.VØ.ô/]ô/0V0J1]J1k1Vk1£2]£2½2V½2ø3]ø34V4M5]M5n5Vn5£6]£687V87p8]p8Ž8VŽ8Ï9]Ï9é9Vé9-;]-;J;VJ;ƒ<]ƒ<®<V®<Ú=]Ú=ý=Vý=5?]5?O?VO?@]@³@V³@âA]âABVB4C]4CéCVéC!E]!EKEVKExF]xF›FV›FÓG]ÓGöGVöG7I]7IQIVQI›J]›JÃJVÃJûK]ûKLVLVM]VMßMVßM O] O>OV>O‚P]‚P‡PP‡P™PVãQRVRBS]BSiSViS§T]§T©W0Ÿ©WÌWVÌWY]Y)YV)YdZ]dZZVZÈ[]È[]\V]\§]]§]Ë]VË] _] _._V._o`]o``V`×a]×aÜaPÜaéaV0c]i0Ÿ]iziVziÈj]ÈjÍjPÍjßjV)lLlVLl‡m]‡mŒmPŒmžmVßn·t0Ÿ·tÕtVÕtv]v0vV0vzw]zw˜wV˜wÖw_ÖwùwVùw=y]=yÜz0ŸÜzázPázózV=|‘|_‘|˜}]˜}ð~0Ÿð~VN€]N€p€Vp€«]«ÈVȃ]ƒ¤ƒV¤ƒî„]î„…V…R†]R†u†Vu†¶‡]¶‡Ô‡VÔ‡‰]‰-‰V-‰2‰P2‰=‰V=‰B‰PB‰O‰V–ŠÑ’0ŸÑ’Ü’PÜ’ê’0Ÿê’ü’Pü’:“]:“Ø”0ŸØ”ã”Pã”6•‘à{6•"˜0Ÿ"˜4˜P4˜‡˜V‡˜äš0Ÿäš%›^%›éž‘¸{鞟‘Ø}(ŸŸŸ‘¸{Ÿn ‘Ø}(Ÿn  ‘¸{ L¡‘Ø}(ŸL¡{¡‘¸{{¡.¢‘Ø}(Ÿ.¢k¢‘¸{k¢£‘Ø}(Ÿ£L£‘¸{L£÷£‘Ø}(Ÿ÷£0¤‘¸{0¤Ѥ‘Ø}(ŸÑ¤¥‘¸{¥«¥‘Ø}(Ÿ«¥ç¥‘¸{祉¦‘Ø}(Ÿ‰¦Ʀ‘¸{Ʀu§‘Ø}(Ÿu§®§‘¸{®§N¨‘Ø}(ŸN¨‹¨‘¸{‹¨:©‘Ø}(Ÿ:©i©‘¸{i©ª‘Ø}(ŸªBª‘¸{Bªñª‘Ø}(Ÿñª-«‘¸{-«Ϋ‘Ø}(ŸÎ« ¬‘¸{ ¬§¬‘Ø}(Ÿ§¬p­‘¸{p­&®‘Ø}(Ÿ&®U®‘¸{U® ¯‘Ø}(Ÿ ¯9¯‘¸{9¯_¯0Ÿ_¯ޝ‘¸{ޝD°‘Ø}(ŸD°s°‘¸{s°!±‘Ø}(Ÿ!±P±‘¸{P±ÿ±‘Ø}(Ÿÿ±.²‘¸{.²ݲ‘Ø}(ŸÝ²ž³0Ÿž³ȳVȳ„´]„´–´V–´Í´PÍ´x·0Ÿx·¢·V¢·Ù·0ŸÙ·Û·VÛ·“À0Ÿ“À±ÀP±ÀÏÀ]ÏÀÁ0ŸÁpÂ]pÂsÂPsÂDÃ]DÃÇ0ŸÇÄÇ‘à{ÎÇÉ‘à{(É]ÉP]É{Ï0Ÿ{ÏÐ]ÐFÐ0ŸFÐKÐPKЄÑ]„ÑŸÒ0ŸŸÒ#Õ]#ÕçÝ0ŸçÝ‘ß]‘ß–ßP–ß_à]_àgàPgà3ᑨ|3á€æ0Ÿ€æ‘æP‘æÝæ]Ýæúæ0ŸúæçPç_ç]_çì0ŸììPìEì‘à{Eìzì0ŸzììTìèí0Ÿèíî‘à{‰î½ï0Ÿ½ïCð]Cð§ð0Ÿ§ð´ðP´ð ñ] ñUñ0ŸUñeñPeñ²ñ_²ñ@ò]@òCòPCò`ò_ÁòNó]Nódó_dó|ó0Ÿ|óËó_ËóÓ‘Ð}Óå0ŸåôPôp]pë 0Ÿë «]«²P²-]-Ð0ŸÐÓPÓU]UŒ0ŸŒ^]^…0Ÿ c©c0ŸÞcÃd0Ÿødde0ŸdetePte–e^–e-f0Ÿ-f>fP>fef^efºg0ŸºgÆgPÆgìg0Ÿhóh0ŸóhiPiti^tii0Ÿ¯iÎi0ŸÎi j^ j3j0Ÿ3j7jv3$p"7j;j_Kj`j0Ÿ`jkjPkjŸj^Ÿjµj0Ÿµj»jP»jßj_ßj k0Ÿ k+kP+kDk^Dk³m0Ÿßm7p0Ÿyyüy0Ÿüyz^zCz0ŸØ{ä{^[|Ÿ|^ß|ð|0Ÿ‚~O€0Ÿ_€o€^o€ü0Ÿ‘ƒœƒPœƒ§ƒ^A…Á†PÁ†ï†^ï† ‡0Ÿ ‡‡P‡/‡^/‡lŠ0ŸlŠŒPŒš^š¤P¤¬‘à{¬Ð0Ÿß!P!Ï0ŸÏÓ v3$s"#Ó× v3$s"#Ü4’^4’q•0Ÿq•ó–^ó–(™0Ÿzšèš0Ÿ9œì¢0Ÿì¢0¤P0¤á¤0Ÿá¤ï¤P拉^¥­¥_­¥Û¥0ŸÛ¥å¥På¥E¦^E¦¿©‘¨{Ъíª0Ÿíª«\«g«‘¨{g«±0ŸS²g²^g²£²0Ÿ£²в_вà²^ಳ0Ÿ5´b´‘¨{b´Œ´^Œ´L·0ŸL·[·‘¨{[·“¸^“¸×¹P×¹XÁ0ŸXÁ]ÁP]Á½Â^½ÂÄ0ŸÄRÄ_RÄtÅ^yÅõÇ^õÇÈ0ŸÈuÈ‘¨{}ÉäÉ‘¨{ìÊQÌ^QÌÊÌ‘¨{ÑÍGΑ¨{NÏÇÏ‘¨{ÎÐZÑ‘¨{¿Ñ÷Ò‘¨{ÔgÕ0ŸgÕÑÕ‘¨{ÙÖxÙ0ŸxÙÛÝ‘¨{ÞÏß‘¨{»à!ᑨ{)âžâ‘¨{¥ã=䑨{Mä½å0Ÿ½å…摨{•çÿ瑨{éué_1ê^êY^ê×ꑨ{ÞëI쑨{Píºí‘¨{Âî;{Bðíð‘¨{¶ñÜò‘¨{ó}ó‘¨{„ôáô‘¨{òõmö‘¨{`÷Óù‘¨{Ûúbû‘¨{iüxü‘¨{xüßü_ßüæý^æýþ‘¨{#þ0Ÿï‘¨{%c^cÃ0ŸÃ:‘¨{B©‘¨{± ‘¨{ ƒ ‘¨{‹ ò ‘¨{ù X ‘¨{`B‘¨{¾Ü‘¨{Üz0Ÿzø‘¨{âl‘¨{|䑨{ëO‘¨{WÄ‘¨{Ôø‘¨{㉑¨{‘3‘¨{ ðG0ŸðGõGPõGRI^RIÑI‘¨{ÄJL0ŸL#M‘¨{NŒN‘¨{oOÝO‘¨{ÝO80Ÿ8—V—·0Ÿ·öVö^h0ŸhrPr»S»‘^_‘Ô‘‘¨{·’H“‘¨{4”]£0Ÿ]£s£Ss£É£0ŸÉ£¤^¤|¤0Ÿ|¤ޤPޤÆ¥^Æ¥Ÿ¦0ŸŸ¦t¨^t¨¬0Ÿ¬a´^a´f´Pf´Öµ^Öµ5¹0Ÿ5¹¸º^¸ºƒ¼0Ÿƒ¼ˆ¼Pˆ¼•¼Sø½ÀË0ŸÀËÂË‘¨{–лБ¨{‹‚‹‘¨{iŒÚŒ‘¨{Á/Ž‘¨{"1‘¨{z…0Ÿ cÃc0ŸÃcÔcPÔc%d\%dqd0Ÿîd{e0Ÿ{eŒePŒeÄe\ÄeÔe0ŸÔeÚePÚeìe0ŸìeòePòef0Ÿ>fUf0ŸUfefPef’gStiŸi\Ÿi¤iP¤i¯i\¯iÎi0ŸÓlèl\èlÇm0Ÿßm7p0Ÿyy¢y0Ÿðyz\zzPzz\CzØ{0ŸØ{ä{‘€{[|Ÿ|‘€{ß|ð|\ð|‚~P¨~Ë~\‡$‡P$‡/‡S/‡Œ0ŸŒšP¬Ð\!¨P4’¬“P¬“Å“Sœ֓0Ÿ`•q•Sq•ó–Pó–—S—Œ˜‘€{Œ˜™ST¡ì¢0Ÿ‘«„¬0Ÿ„¬”¬P”¬¨¬]¨¬–®0Ÿ–®¡®P¡®$¯^$¯i°0Ÿi°v°Pv°¨°^¨°ã°0Ÿg²v²]ìµL·0Ÿ×¹õ¹0Ÿõ¹ ºP º«º^«ºÿ»0Ÿf½¿¾]¿¾ľPľÀ]õÇÈ0ŸÔgÕ0ŸÙÖxÙ0Ÿ#þqþ0Ÿqþ;^;@P@^0ŸcÃ^ '^'»V»Ê‘€{ÊìPìùVù"‘€{"² 0Ÿ² Ü ^Ü L&0ŸL&W&PW&Ë&]Ë&a'0Ÿa'x'Px'ý'‘ø{ý'+(0Ÿ+(s(‘¸}s(¦(0Ÿ¦(´(P´()S))P):)S4*R+0ŸR+y+Sy+},‘¸}},«-0Ÿ«- .‘ø{ .Ð.0ŸÐ.5/‘ø{5/ù/0Ÿù/0P0*1[*1 70Ÿ 7;7];7M8‘€{M8t8]t8}9‘€{}9±9]±9Á9PÁ9`:S`:k;‘€{k;t;]t;š;Pš;¹;S¹;¿<‘€{¿<è<Pè<,>0Ÿ,>_>]_>Ê>0ŸÊ>×>]×>ðG0ŸÄJL0ŸÝOR0Ÿ4”œ™0Ÿœ™•š^•š››‘€{››М^ùœþœPþœDž^Dž5¢0Ÿ5¢]£^ø½Ã0ŸÃ%Ã^%ÃÀË0Ÿz¥’0Ÿ¥’Å’PÅ’Ü’‘ |Ü’“0Ÿ““P“:“^:“H“0ŸH“_“P_“î“]%”d”0Ÿd”¾”^¾” •0ŸX•i•Pi•o•‘è{o• •0Ÿ •ª•Pª•Ì•^Ì•k–Sk–~–0Ÿ~–‹–P‹–¹–^¹– ˜0Ÿ ˜˜P˜r˜‘€|r˜†›0Ÿ†›–›P–›Þ›]Þ›”œ0Ÿ”œ¤œP¤œäœ]äœ0ŸP6]6J0ŸJZPZ‰]‰.ž0Ÿ.ž;žP;žsžSsž·ž0Ÿ·žÔžSÔžŸXŸŸ‘€{Ÿ›ŸP›ŸªŸSªŸn Xn L¡0ŸL¡W¡PW¡\¡]\¡.¢X.¢L¢]L¢Š¢XŠ¢£‘€{£(£P(£-£]-£÷£X÷£u§0Ÿu§§]§ͧXͧN¨‘€{N¨:©0Ÿ:©O©]O©¡©X¡©ª‘€{ªªPª#ª]#ªñªXñª «] «L«XL«Ϋ‘€{Ϋõ«Sõ«&¬X&¬§¬‘€{§¬D°0ŸD°Y°]Y°®°X®°!±‘€{!±,±P,±1±]1±ÿ±Xÿ±ž³0Ÿž³)´‘€|„´‡µ‘€|¶I¶PI¶„¶‘€|–¶x·0Ÿx·¢·‘€|¢·Ù·0ŸÙ·Û·QÛ·¤½0Ÿ¤½»½^»½i¾]i¾€¾^€¾¿]¿¿P¿.¿^Ô¿ ÀS À|ÀU|À(ÁS(ÁÁTÁÄÁSÄÁpÂQp—ÂS—ÂDÃTDÃVÃSVÃhÃPhÃÉÑ€{ÉÃÄSÄ Ä^ ĈÄ]ˆÄ¥ÄS¥Ä¯ÄP¯ÄaÅ‘€{aÅfÅPfÅ€Å^&ÆGÆ‘Ð{GÆLÆPLÆŠÆ‘è{ÇÝÏ0ŸÝÏíÏPíÏFÐ^FЄÑ0Ÿ„ÑŸÒ^ŸÒ¤ÒP¤ÒâÓ^âÓúÜ0ŸúÜÝ]Ý!ÝP!ÝçÝ]çÝÞ^ÞºÞ‘€{ºÞ¿ÞP¿Þ‘ß^‘ß_à0Ÿ_àíà‘ |3á8áP8áâ‘ |âã0Ÿã/ã^/ãDã0ŸDãwãPwã¤ã^¤ãÃä0ŸÃäjå^jåwê0Ÿwêóë]óëEì^Eìnì0Ÿnì®ì^®ì1í]1íèí^èí‰î0Ÿ‰îÆî]Æîxô0Ÿxô‹ôP‹ôõSõ(õp(hõ¹0Ÿ¹ôSô,‘€{,S3‘€{3USUª‘€{ªåSå‘€{?S?”‘€{”¡P¡¶S¶‘¸{…0Ÿdzd‘è| eea©e¹ea¯iÉi‘è|Ólèl‘è|_n«n‘è|yyy‘è|¨~´~b´~Ë~‘è|o€ƒ€‘è|/‡4‡a¬´a crf0Ÿrf’gS’g7p0Ÿyyó{0Ÿ[|¬“0Ÿ¬“Å“SÅ“`•0Ÿ`•q•Sq•—0ŸŒ˜™S™tÅ0ŸyÅs"0Ÿs"ó"‘ˆ{ó"WÌ0ŸWÌÍ‘ˆ{Î#Õ0Ÿ#ÕÀÕ‘ˆ{ÀÕ…0ŸäfúfPŒ˜¬˜PJ§P§PP§Pª‘¸|2¯8¯P8¯t¯]5´b´‘¸|L·[·‘¸|ÈýÈ‘¸|}ÉlÊ‘¸|QÌUÌPUÌÍ‘¸|ÑÍxΑ¸|NÏ~Б¸|gÕYÖ‘¸|xÙEÚ‘¸|‰ÛÛPÛÜ\lÞ³Þ‘¸|³ÞÂÞ\àÞôÞ‘¸|»à©á‘¸|½åE瑸|•ç‡è‘¸|^êbêPbêÒê\ÞëDì\Pí‹í\òõ>ö\zk‘¸|âû‘¸||›‘¸|ëב¸|æ"ý"P²TµTPµT@]‘À{Q]›^‘À{¬^à`‘À{ñ`=b‘À{Nbžc‘À{¯ce‘À{ejf‘À{{fÌg‘À{Ýg2i‘À{Ci˜j‘À{©jl‘À{l£l‘À{mÜn‘À{ínHp‘À{Yp²q‘À{Ãqs‘À{/sŠt‘À{›tðu‘À{v¥v‘À{ƒwÞx‘À{ïxHz‘À{Yz²{‘À{Ã{c|‘À{h|Æ}‘À{×}"‘À{3‘À{]‚‘À{n‚³ƒ‘À{ă…‘À{#…u†‘À{††á‡‘À{ò‡Q‰‘À{b‰»Š‘À{ÌŠË‹‘À{©ŒI‘À{Ζ?˜]?˜C˜PC˜œ™];¤>¤P>¤+§‘¨|ö§+©‘¨|쩪‘¨|^«¢¬‘¨|m­®‘¨|Юk¯‘¨|,°˰‘¨|Œ±4²‘¨|õ² ³‘¨|a´µ‘¨|Öµ‡¶‘¨|H·¯·‘¨|«Ü®ÜP®Ü´Ý‘È{Ÿïð‘È{ñnñ‘È{iòÙò‘È{Ôóaô‘È{?õ´õ‘È{®öD÷‘È{+øÆø‘È{¤ù?ú‘È{_’%”0Ÿý›œPœ¸‘ø|áž ÿŸžÏžVŸ¥ŸVn ˆ VL¡ˆ¡‘ø|.¢x¢‘ø|£c£‘ø|÷£=¤‘ø|Ѥ¥‘ø|«¥â¥‘ø|‰¦ئ‘ø|N¨¨‘ø|:©€©‘ø|ªTª‘ø|ñª(«‘ø|Ϋð«V§¬[­V&®@®V ¯9¯V_¯y¯VWÌwÌPúÜã0Ÿwêóë0Ÿ)ð,ðP,ð‡ð‘à}Ÿ¥P¥# S3 K S[ _ P_  SU+‘à}€­¸­ ÿŸ¸­'®‘¨{'®+®P+®ã°‘¨{ Å‘¨{ÊŠ ‘¨{ 9!‘¨{9!P!PP!4"Vo%ª% ÿŸª%ê%‘°{ê%ï%Pï%5)‘°{4*S*‘°{R+t+‘°{},¬,‘°{«-é-‘°{Ð.ô.‘°{ù/0‘°{*1I1‘°{L2k2‘°{n3s3‘°{”45‘°{È5T6‘°{ 7œ7‘°{M8Ì8‘°{}9½:‘°{k;<‘°{¿<=‘°{ >§>‘°{Â>Ü>‘°{V@s@‘°{s@}@PÔBûB‘°{ D^F ÿŸ|F„F0ŸÝOöO‘¨{öOlR ÿŸ‡RR0Ÿ4”z•‘¨{•É–‘¨{Ζ:˜‘¨{?˜—™‘¨{œ™–›‘¨{››М‘¨{ùœ?ž‘¨{DžŠŸ‘¨{ŸÕ ‘¨{Ú 0¢‘¨{5¢]£‘¨{ø½]¾VB¿¿V‰ÀŽÀPŽÀ‘ÀVÍÁ Ѩ{ôđ¨{¹Ä×Ä‘¨{×ÄàÄPàÄuÆ‘¨{zÆÕÇ‘¨{ÚÇ%É‘¨{“Ë“ ÿŸË“p”‘Ø{p”t”Pt”Ì•‘Ø{ĈđØ{aÅÌÅ‘Ø{&ƵƑØ{ÇbÇ‘Ø{ÎÇéÈ‘Ø{(É]É‘Ø{{Ï”ÏVFГÐVâÓJÔVÿÜÝ0Ÿã&ã‘Ø{&ã/ãP/ã䑨{Ãä周{jå¬å‘Ø{hêwê‘Ø{wêóë ÿŸóë‘í‘Ø{èíJî‘Ø{‰îñî‘Ø{|óËó0ŸËóô‘È{ô»‘€~»^Sš ½ S?S¡¹S&>S«ÃSÃþ‘È{’gºg‘°{ºgti‘°{#ŸÎij‘°{#ŸÁ†‡‘°{#Ÿš¦qŸ¦¬‘°{#ŸÐß‘°{#Ÿ¨¿‘°{#ŸP•`•‘°{#Ÿ™q™‘°{#Ÿzš0›‘°{#Ÿ9œžœ‘°{#ŸŒÌ‘°{#ŸÕžŸ‘°{#Ÿ S ‘°{#Ÿì¢/£‘°{#Ÿg«‘«Q‘«H­‘°{ø°U±‘°{#Ÿg²v²‘°{à²J³‘°{#ŸŒ´š´Qš´¥´‘°{ìµa¶‘°{×¹»‘°{ÿ»M¼‘°{#ŸK½f½‘°{#Ÿf½•½‘°{¿¾ó¾‘°{yÅÏÅ‘°{#Ÿ·Æ÷Æ‘°{#ŸõÇÈ‘°{ÔGÔ‘°{ÙÖב°{1ØiØ‘°{þ#þ‘°{#Ÿ+þ¹þ‘°{Âÿñÿ‘°{ú2‘°{;s‘°{c’‘°{›Ã‘°{ÄJùJ‘°{hʡʑ°{•Ì• ÿŸÌ•—V—5— ÿŸ5—™Sº™ç™S¢š%›Sݲï²Sž³«³S„´¸´S¶:¶S–¶­¶SW·ü·Så¸7¹S7¹ô¹ ÿŸô¹ºSÁº~» ÿŸ~»‚»V‚»˜»0Ÿç¼ù¼V¤½©½Vi¾n¾V¿¿VÔ¿ÀV|ÀÁVÁªÁVpÂxÂVDÃLÃVÉÃÄVÄˆÄ ÿŸˆÄ ÄVaÅ&Æ ÿŸ?ÆGÆ0Ÿ…óËó0ŸËóô‘È{ôôPô»‘€~»^Sš ½ S?S¡¹S&>S«ÃSÃþ‘È{(h9hP9hti‘€|Îij‘€|Á†‡‘€|¨´P´¿‘€|P•`•‘€|zšðš‘€|9œŒPŒð‘€|Õž9Ÿ‘€| w ‘€|ì¢V£‘€|ø°y±‘€|ಃ³‘€|ÿ»q¼‘€|K½f½‘€|yÅÆ‘€|·ÆÇ‘€|zääP¬äpå1Ÿ,ø›øSìúüúPüúûSiüxüSBYS±ÐS 3 SáîP6%F%P„F FP°F½FPÂFËFPR¾R1ŸÑRFT1ŸÝ1Ÿ!)P'¦€¦V^«u«VÀ«Ë«PË«à«VóÞGß\äßïßPïßLà\Îæ&ç\ÈÛÕÛP c•h0Ÿ•h¦hP¦hÒh\ÒhiSiIi0ŸIiSiPSiti\tiÎi0ŸÎiåi^åi j\ jêjSêj÷j0Ÿ÷jkPk$k\$k4k0Ÿ4kDkPDkµk‘ {Ól7p0ŸyyØ{0ŸØ{ä{\[|Ÿ|\ß|O€0ŸO€o€So€Á†0ŸÁ†׆S׆ï†\S‡ß0ŸßùSù!\!¿0Ÿ¿ ‘S ‘4’\4’zš0Ÿzšðš\ðš 0Ÿ T¡PT¡ì¢0Ÿì¢÷¢S÷¢0¤Q0¤[¤‘ {[¤j¤0Ÿj¤€¤P€¤•¤‘{•¤¢¤0Ÿ¢¤µ¤Pµ¤ʤ‘˜{ʤŽ¥0ŸŽ¥£¥P£¥E¦\E¦¦0Ÿ¦Õ¦\Õ¦Ъ0ŸÐªÛªSÛªíª0Ÿíªg«\g«@¬0Ÿ@¬W¬PW¬­\­‹­0Ÿ‹­š­Pš­ã°\ã°ø°Sø°S²\S²\²P\²g²‘ {g²v²\v²…²‘ {…²”²‘{”²£²‘˜{£²²²0Ÿ²²Á²\Á²ŲPŲ5´\5´¥´0Ÿ¥´ìµPìµ[·0Ÿ[·“¸P“¸×¹\×¹º0Ÿº%ºP%º?º\?ºJº0ŸJºiºPiºÒº\Òºÿ»0Ÿÿ»À\ÀÀPÀXÁ‘{XÁ½Â0Ÿ½ÂÂÂPÂÂÄ‘˜{ÄÄPÄtÅ\yÅ·Æ\·ÆõÇPõÇxÎ0ŸNÏÎÐ0ŸÎпÑ\¿ÑØÑ0ŸØÑëÑ\ëÑÒ0ŸÒÒPÒ2Ò\2ÒµÒ0ŸµÒüÒPÔgÕ\gÕÙÖ0ŸÙÖÞÖPÞÖ1Ø\1صÙ0ŸµÙÊÙPÊÙEÚ\EÚÚ0ŸÚ½ÚT½ÚÙÚ‘¸{ÙÚÞ0ŸÞfÞTlÞ³Þ\³ÞàÞ0ŸàÞäÞPäÞôÞ\ôÞß0ŸßFßTFß»à\»àÀàPÀà)â\)â¸ã0Ÿ¸ãÍãTÍãàã0ŸàãíãPíã ä\ äé0ŸééSé^ê\^êBð0ŸBðVðTVðè÷0Ÿè÷ù÷P6øQø0ŸQøcøPcøºø\ºøáø0ŸúøùPù ùT ùù‘¸{ùmù0ŸmùzùPzùÛúTxüõý0Ÿõýþ\þBþ0ŸBþŠþ\ŠþþPþú\úÿPÿ;\;0ŸB\BGPG‹ \‹ ù 0Ÿù `\`|0Ÿ|W\W0Ÿc‘¸{‘ 0Ÿ !\!!0Ÿ!1!P1!g!\g!"0Ÿ"$"P$"H#‘ˆ{H#ˆ#0Ÿˆ#ž#Pž#¤#‘È{¤#»#0Ÿ»#Ð#PÐ#Þ#‘˜{Þ#@$0Ÿ@$Z$PZ$|$_|$Ø$0ŸØ$ê$Pê$%‘À|%‚%0Ÿ‚%Œ%PŒ%T)_T)4*\4*r*_r*R+\R+“+_“+},\},Ë,_Ë,«-\«-û-_û-Ð.\Ð./_/ù/\ù/70_70*1\*1h1_h1L2\L2Š2_Š2n3\n33_3”4\”4Á4_Á4È5\È5õ5_õ5 7\ 7@7_@7M8\M8y8_y8}9\}9®9_®9k;\k;•;_•;¿<\¿<Þ<_Þ<è<\è<&=_&= >\ >§>_§>Â>0ŸÂ>ó>_ó>V@\V@}@_}@ÔB\ÔB C_ C D\ D!D_!D4E\4Eæ0Ÿ>æ^æP^æÌæ\Ìæúæ0ŸúæÄç\ÄçËçPËçŽè\Žè•èP•èüè\üè—é0Ÿ—é¡éP¡éhê\hêwê0ŸwêGë\GëLëPLëóë\ÆîËîPËîýî\ýîRï‘à{Rïhï\hïµï0Ÿµïòï\òï)ô0Ÿ)ô;ôP;ôùô\¥õÿõ0Ÿ‘öa÷0Ÿa÷s÷Ps÷º÷\º÷äþ0Ÿäþ’\’šPš$\$¹0Ÿ¹G\GhRhy‘˜~Ž’R’À‘˜~Àª\ª‘˜~%\%-P-»\»H0ŸHWPW³\³Â0ŸÂÝPÝ’\’ë 0Ÿë … \… Œ PŒ • \• œ Pœ š \š ¡ P¡ \Æ0ŸÆ^\^V0ŸVYPY—\—½‘ø|ã…0Ÿ c¼h0Ÿ¼hìhYìhi‘{iýk0ŸÓl7p0ŸyyØ{0ŸØ{ä{X[||X|Ÿ|‘}ß|ï†0Ÿï†ÿ†Yÿ†‡‘{‡ì¢0Ÿì¢ú£‘{0¤-¥0Ÿ-¥F¥PF¥‡¥Y‡¥£¥‘¨{£¥ë¦0Ÿë¦õ¦Põ¦[§][§a¨0Ÿa¨n¨Pn¨©]©ЪXЪ4«0Ÿ4«g«]g«Á²0ŸÁ²в‘¨{вS´0ŸS´b´]b´l´0Ÿl´‡´P‡´Œ´YŒ´Ä0ŸÄÄ‘¨{yÅìÊ0ŸìÊñÊPQÌ|Ì]|ÌÑÍXÑÍÖÐ0ŸÖÐãÐ]ãÐ÷Ò0ŸÔxÙ0ŸxÙ¥Ù]¥ÙÛ0ŸÛÛPÛšÛ]šÛ¬Û0Ÿ¬Û½ÛP½ÛèÜ]èÜÞXÞFÞ0ŸFÞlÞ]lÞ³Þ0Ÿ³ÞàÞ]àÞôÞ0ŸôÞß]ß)â0Ÿ)âYâ]Yâ¥ãX¥ãÁä0ŸÁäÓäPÓä^å_^åµåX½åCæ]Cæ•çX•ççPç²ç]²çéXé^ê0Ÿ^ê†ê]†êÞëXÞëì]ìPíXPíXíPXíjí]jíÂîXÂîõî]õîBðXBðQð0ŸQð~ð]~ð¶ñX¶ñÛñ]ÛñóXóDó]Dó„ôX„ô©ô]©ôòõXòõö]ö`÷X`÷ø]øjø0Ÿjø|øP|øºø]ºøáø0Ÿáø3ù]3ù_ù\_ùù]ùÛúXÛúxü0Ÿxü€üP€üƒüYƒüæýXæý±0Ÿ±Ë]Ë X $ P$ 6 ]6 ‹ X‹ ù 0Ÿù  ] `X`i\i£_£¾X¾Í\Íz0ŸzÆ]ÆâXâ*]*|X|W0ŸW‹]‹ÔXÔæ]æPL0ŸL3L]3LWLXoOOXOOwO£O]£O¸OX¸OÝOPÝOR0ŸR¤R_¤RÑR0ŸÑRÖRPÖRT‘ø|FT‘T0Ÿ‘TËTSËTMU0ŸMUXUPXUKVSKV_Vp•V×}0Ÿ×}þ}Sþ}3X3ñSñX5S5n‚Xn‚‚S‚ăXăãƒSãƒ#…X#…:…S:…††X†††S†ò‡Xò‡ú‡Pú‡ˆSˆb‰Xb‰©Œ0Ÿ©ŒÎŒSÎŒ'ŽX'Ž10Ÿ@Ñ£0ŸÑ£T¤_T¤Ó¥0ŸÓ¥è¥Pè¥7¦_7¦€¦0Ÿ€¦”¦P”¦Ÿ¦VŸ¦t¨0Ÿt¨¨P¨Á¨_Á¨ì©Xì©ñ©Pñ©ªV^«´«0Ÿ´«ý«_ý«¬X¬H·0ŸH··_·¯·X¯·ú·_ú·5¹X5¹€¹_€¹¸ºX¸ºèÎ0ŸèÎóÎPóÎ!ÏV!Ï<Ï‘¨{<Ï!Ô0Ÿ+ÔÍÕ0ŸÍÕÕÕPÕÕýÕYýÕÖ‘¨{Ö€Ö0Ÿ€ÖœÖPœÖ¾Ö‘¨{¾ÖÕÖ0ŸÕÖãÖPãÖüÖYüÖב¨{-דÙ0ŸÙïÝ0Ÿï݇ޑ˜|‡Þ{ß0Ÿ{ßžßPžß½ß‘¨{½ßXá0ŸXáÅᑨ{ÃâËâPËâÎâYÎâäXä—é0Ÿ—éNꑘ|óês둘|sëƒë0Ÿƒë@쑘|êì~0Ÿ~½Y½È‘¨{×ÛYÛ‘¨{a0Ÿa¼‘¨{²g 0Ÿg  Y – ‘¨{  ¤ Y¤ Ä ‘¨{Ä .&0Ÿ.&”&‘¨{~'t+0Ÿt+Ô+‘¨{Ê,-Y- -‘¨{F-N-PN-Q-YQ-œ.Xô/`0‘¨{J1R1PR1£2X£2ø30Ÿø3c4‘¨{M5R5PR5X5YX5£6X£6ü60Ÿü67P77Y7ƒ<0Ÿƒ<<P<“<Y“<Ú=XÚ=8C0Ÿ8CwCYwC‚C‘¨{‘C•CY•C¼C‘¨{¼C!E0Ÿ!EŒE‘¨{xF[M0Ÿ[M‡MY‡MM‘¨{—M›MY›M±M‘¨{±MBS0ŸBS¨S‘¨{§TÌ[0ŸÌ[ú[Yú[\‘¨{\\Y\3\‘¨{3\§]0Ÿ§]^‘¨{ _lc0Ÿ‹dd0ŸdÊdYÊdÐd‘¨{ÚdÞdYÞdùd‘¨{ùd^f0Ÿ^f¤f‘¨{¤f‡m0Ÿ‡møm‘¨{ßnoP7pup0Ÿup€pP€p”pV”p>s0Ÿ>s^sP^sƒ0ŸƒAƒYAƒLƒ‘¨{[ƒ_ƒY_ƒzƒ‘¨{zƒî„0Ÿî„J…‘¨{R†šŠ0ŸšŠÕŠYÕŠÛŠ‘¨{åŠéŠY銋‘¨{‹10Ÿ1z‘¨{zñô0ŸñôùôPùô“õ]“õÿõ0Ÿÿõ4ö]4ö‘öX‘öz÷0Ÿz÷Œ÷PŒ÷º÷]º÷|ø0Ÿ|øŒøPŒøÈø]ÈøÜø0ŸÜø2ù]2ùùXù”ù0Ÿ”ù£ùP£ùÇù]ÇùÒù0ŸÒùâùPâùú]úú0ŸúRú]Rú¸úX¸úÃúPÃúíú]íúRûXRû‹û]‹ûìûXìû÷ûP÷û!ü]!ü†üX†ü‘üP‘ü¿ü]¿üýXýäþ0Ÿäþÿ]ÿrÿXrÿ£ÿ]£ÿX P 5]5’X’¹0Ÿ¹ÁPÁè]è,X,“0Ÿ“»P»À]Àª0ŸªµPµ^0Ÿ(P(³V³ 0Ÿ 3 V3 š Xš ¬ V¬ X2V2¡X¡«P«°V°&X&…0Ÿ;iti ÿŸåijSjÂjVO€o€V׆ï†SßèV¿ûV礥0Ÿ¥F¥1ŸÍ¥ ¦ ÿŸ ¦Ц‘Ð{Ц¦T¦Š©‘Ð{ЪÓªV ««0Ÿ«g«‘Ð{£²²²0ŸÐ²à²‘Ð{5´b´‘Ð{b´Œ´0ŸL·[·‘Ð{yÅõÇ ÿŸÈ6È‘Ð{}ɥɑÐ{ìÊQÌ0ŸQÌ­Ì‘Ð{ÑÍ-ΑÐ{NϪϑÐ{ÎÐgÑ‘Ð{¿ÑáÑ‘Ð{áÑëÑPëÑaÒ‘Ð{gÕŠÕ‘Ð{xÙØÜ‘Ð{ÞŠß‘Ð{»àûà‘Ð{)ââ‘Ð{¥ã=ä‘Ð{½åwæ‘Ð{•ç»ç‘Ð{^êºê‘Ð{Þë,ì‘Ð{Písí‘Ð{Âîï‘Ð{Bð™ð‘Ð{¶ñäñ‘Ð{óxó‘Ð{„ôÇô‘Ð{òõö‘Ð{`÷rù‘Ð{ÛúEû‘Ð{iüxü‘Ð{xüæý1Ÿæýþ‘Ð{Ø‘Ð{%c ÿŸÃû‘Ð{Bj‘Ð{±¶‘Ð{ ? ‘Ð{‹ á ‘Ð{ù 5 ‘Ð{`¬‘Ð{¾Ü‘Ð{z­‘Ð{â^‘Ð{|Ê‘Ð{ë‘Ð{W¿‘Ð{Ô¶‘Ð{ãB‘Ð{‘ß‘Ð{ðGRI ÿŸRI}I‘Ð{LáL‘Ð{N;N‘Ð{oOÝO‘Ð{V0V0Ÿ×}~0Ÿ~§1Ÿ·1Ÿ_‘ƒ‘‘Ð{·’“‘Ð{!¥K¥0ŸŸ¦B¨0ŸB¨t¨1Ÿ¬m­1ŸÁä‘Ð{äš%›0ŸÎôùô0Ÿ øø0ŸøFøSFø.ù\ùú\úlú\¸úæú\Rû„û\ìûü\†ü¸ü\ýMý\°ýºýS¹Ž0ŸŽÀ1Ÿª1ŸbikiPkiti‘{åij‘{׆{÷¥¦P¦ª‘ | ««0Ÿ«g«‘ |©­¸­P¸­ã°‘¸{в಑ |5´b´‘ |L·[·‘ |yÅ·ÆPÈÈÈ‘ |}É7Ê‘ |QÌLÍ‘ |ÑÍxΑ |NÏIБ |ÎÐTÓ‘ |gÕ$Ö‘ |xÙ[Ý‘ |Þ6à‘ |»àtá‘ |)â ã‘ |¥ã=ä‘ |½åç‘ |•çRè‘ |^êYë‘ |ÞëËì‘ |Pí î‘ |Âî½ï‘ |Bð ñ‘ |¶ñiò‘ |óÿó‘ |„ô=õ‘ |òõ«ö‘ |`÷&ú‘ |Ûúäû‘ |iüxü‘ |æýþ‘ |%‘ |%*P*c‘ |Ñ |Bü‘ |±g ‘ | Ö ‘ |‹ t ‘ |ù « ‘ |`û‘ |¾Ü‘ |z6‘ |â÷‘ ||f‘ |뢑 |WO‘ |ÔV‘ |ãÜ‘ |‘…‘ | °‘¸{Ê‘¸{"t‘¸{ #‘¸{›%ª%Pª%¶%‘Ð{¶%ï%0Ÿ_>—>‘Ð{V@}@0ŸÔB&C‘Ð{ DDPDbD‘Ð{bD4E|#à|F„F0ŸRIJ‘ |LŠM‘ |NêN‘ |oOÝO‘ |ÝOöO‘¸{öOûOPûO&P‘¸{&P1Q|#à‡RR0Ÿ_‘2’‘ |·’¯“‘ |4”9”‘¸{•³•‘¸{Ζ+—‘¸{?˜_˜‘¸{œ™¹™‘¸{ô™š‘¸{Hš_š‘¸{››Ì›‘¸{ùœ‘¸{DžIž‘¸{Ÿ¦Ÿ‘¸{Ú ,¡‘¸{5¢T¢‘¸{ø½¾‘¸{B¿\¿‘¸{‰À¹À‘¸{ÍÁçÁ‘¸{îѸ{¹ÄoÅ‘¸{zÆÏÆ‘¸{ÚÇ È‘¸{Àˮۑ |‰ ‘ | « ‘ |` 0 ‘ |å  ‘ |;\‘ |ᇑ |3Ù‘ |…R‘ |×|‘ |(Α |zµ‘ |a‘ |²‘ |ª‘ |_‘ |º\‘ |·‘ |c ¢!‘ |'"ø"‘ |}##$‘ |Ø$‚%‘ |.&Ò&‘ |~'$(‘ |Ð(v)‘ |"*È*‘ |t+,‘ |Ê,ð-‘ |œ.H/‘ |ô/ž0‘ |J1÷1‘ |£2s3‘ |ø3¡4‘ |M5÷5‘ |£6Ä7‘ |p89‘ |Ï9x:‘ |-;þ;‘ |ƒ<.=‘ |Ú=€>‘ |5?Û?‘ |@6A‘ |âA¯B‘ |4ClD‘ |!EóE‘ |xFG‘ |ÓG‚H‘ |7IæI‘ |›JFK‘ |ûK¡L‘ |VMkN‘ | OÍO‘ |‚P.Q‘ |ãQR‘ |BSòS‘ |§TSU‘ |VôV‘ |©WRX‘ |Y¯Y‘ |dZ[‘ |È[ò\‘ |§]V^‘ | _º_‘ |o`"a‘ |×a{b‘ |0cÌc‘ |‹d©e‘ |^fGg‘ |üg¨h‘ |]iCj‘ |Èjtk‘ |)lÒl‘ |‡m*n‘ |ßnxo‘ |7p4q‘ |éq‰r‘ |>st‘ |·tau‘ |vÅv‘ |zwˆx‘ |=yéy‘ |žzˆ{‘ |=|ã|‘ |˜};~‘ |ð~™‘ |N€ö€‘ |«Z‚‘ |ƒ9„‘ |î„…‘ |R†‡‘ |¶‡iˆ‘ |‰á‰‘ |–Š´‹‘ |iŒ ‘ |ÁmŽ‘ |"z‘ |¼“Ë“PË“%”‘Ð}WÌüÌ‘¸{ÎgΑ¸{{Ï`Б¸{„ѣё¸{ŸÒµÒ‘¸{âÓüÓ‘¸{#ÕÀÕ‘¸{ÿÜÝ0Ÿwê|êP|êGë‘Ð} cýk0ŸÓl7p0ŸyyØ{0Ÿß| §0Ÿ §§P§ §_ §²§0Ÿ²§ƧPƧݧ_ݧí§0Ÿí§ú§Pú§š©_š©Ъ[Ъ>«0Ÿ>«g«_g«5´0Ÿ5´b´_b´L·0ŸL·[·_[·tÅ0ŸyÅÈ0ŸÈIÈ_IÈ}É[}É…ÉP…ɸÉ_¸ÉìÊ[ìÊQÌ0ŸQÌ™Ì_™ÌÑÍ[ÑÍÎ_ÎxÎ[NÏ–Ï_–ÏÎÐ[ÎÐÞÐ0ŸÞÐãÐ_ãÐgÕ0ŸgÕoÕPoÕ·Õ_·ÕÙÖ[ÙÖxÙ0ŸxÙ¥Ù_¥ÙÄÚ0ŸÄÚÙÚPÙÚ@Û_@Û Ü0Ÿ Ü3ÜP3Ü$Ý_$ÝÞ[ÞôÞ0ŸôÞß_ßµå0Ÿ½å[æ_[æ•ç[•çåç_åçé[éVð0ŸVðœð_œð¶ñ[¶ñò_òó[óTó_Tó„ô[„ôŒôPŒôÊô_Êôòõ[òõ`÷0Ÿ`÷Ý÷_Ý÷ù0Ÿùmù_mù`0Ÿ`f_f¾[¾Í_Ír0Ÿz—_—â[âB_B|[|W0ŸW›_›Ô[Ô_&[&9_9ã0Ÿã_P_'P'o_o‘[‘»_»L0ŸL*L_*LMLPML™T0Ÿ™TU_U´V0Ÿ´VÅVPÅVW_W3W0Ÿ3WIWPIW´W_´WVX0ŸVXfXPfX†X_†X‘X0Ÿ‘X¬XP¬XY_Y=Y0Ÿ=YOYPOYZ_Zñ`0Ÿñ`9a_9aNb[Nbšb_šb¯c[¯cûc_ûce[ePe_Pe{f[{fÇf_ÇfÝg[ÝgågPågh_hCi[Ci©j0Ÿ©jk_kl[lOl_Olm[m‰mP‰mæm_æmín[ínRo_RoYp[YpÃq0ŸÃqËqPËq(r_(r/s[/s›t0Ÿ›tÖt_Ötv[vƒw0Ÿƒwèw_èwïx[ïx.y_.yYz[YzazPaz˜z_˜zÃ{[Ã{|_|h|[h|p|Pp|Ú|_Ú|×}[×}ÌŠ0ŸÌŠ‹_‹+‹[+‹y‹_y‹©Œ[©Œ÷Œ_÷Œ'Ž['ŽC¥0ŸC¥K¥P¦0ŸŸ¦§¦P§¦̦X̦ö§[ö§M¨0ŸM¨`¨P`¨t¨_쩬0Ÿ¬*¬P*¬Y¬_Y¬m­Xm­×0Ÿ××P×N×_Nר0ŸØØP؃Ø_ãØýØ0ŸýØ ÙP ÙˆÚ_ˆÚÍÚ0ŸÍÚÕÚPÛKÜ0ŸKÜUÜPUÜÄÜ_ÄÜ_Ý0Ÿ_ÝhÝPh݇Þ_‡Þ—é0Ÿ—éËé_Ëéóê[óê›ë_›ëêì[êìí_íEî[Eî|î_|îŸï[Ÿïãï_ãïñ[ñJñ_Jñiò[iòqòPqò ò_ òÔó[Ôó¤ù0Ÿ¤ùéù_éùû[ûTû_Tû„ü[„üÀü_Àüêü[êü“ý_§þæþ_%UPU×0Ÿ×_0Ÿ%_%ƒ 0Ÿå ê Pê " _" ;[;u0ŸuŠPŠYá0ŸáéPéìYì3X3l_l…[…­_­×[×!_!([(a_az[zH_Ha[at_t²[²Ú_Ú[=_=_[_gPg˜_˜º[J_Jc [c | _| Ñ SÑ ÿ _ÿ '"['"Ø$0ŸØ$à$Pà$%_%.&[.&A&SA&e&_e&~'[~'"*0Ÿ"*[*_[*t+[t+y+Py+›+_›+Ê,[Ê,%-0Ÿ%-A-PA-F-_F-œ.0Ÿœ.¤.P¤.§._§.ô/[ô/ëå0ŸëåýåPýå—æ‘øz—æúæ0ŸúæAç‘øz_çvç‘øzÄç è‘øz)èpè‘øzŽèÞè‘øzüèéPémé[mé®ô0Ÿ®ôÁôPÁôhõ_hõ©÷0Ÿ©÷Í÷PÍ÷ê÷_ê÷/ø0Ÿ/øFøVFø[ø0Ÿ[øuøPuø’ø_’øªù0ŸªùËùPËùèù_èù¸ú0Ÿ¸úÕú_ÕúRû[Rû]ûP]ûoû_oûìû[ìû†ü0Ÿ†ü£ü_£üý[ý&ýP&ý0ý_0ý°ý[°ýOþ0ŸOþiþ_iþäþ[äþïþPïþ ÿ_ ÿrÿ[rÿ¹0Ÿ¹Ñ_Ñ,[,Ú_Ú3[3>P>H_Hª[ªÂ_Â[/0Ÿ/APA³^³á0Ÿá&‘¸}&Y0ŸYjPjµ^µþ0Ÿþ" P# 3 0Ÿ3 : Pµ [ 0Ÿ[ ë ^ë õ Põ  ^ r [r ù 0Ÿù ! ^! … ‘¸}…  0Ÿ D ^D š [š ³ ^³ [&P&B^B¡[¡…0Ÿ c7p0ŸyyØ{0ŸØ{ä{Z[||Z|Ÿ|‘ }ß|½¦0Ÿ½¦ϦPϦ8§^8§Õ¨0ŸÕ¨â¨Pâ¨s©^s©ЪZЪtÅ0ŸyÅxÎ0ŸNÏ´Ñ0Ÿ¿ÑxÙ0ŸxÙ¥Ù^¥ÙÛ0ŸÛ ÛP Û{Û^{ÛÓÛ0ŸÓÛãÛPãÛåÜ^åÜÞZÞBÞ0ŸBÞlÞ^lÞÂÞ0ŸÂÞàÞ^àÞôÞ0ŸôÞß^ß)â0Ÿ)âIâ^Iâ¥ãZ¥ã½å0Ÿ½å#æ^#æ+æP+æ5æ^5æ•çZ•çÞë0ŸÞëæëPæëðë^ðëPíZPíÂî0ŸÂîâî^âîBðZBðMð0ŸMðkð^kð¶ñZ¶ñØñ^ØñóZó1ó^1ó„ôZ„ô™ô^™ôòõZòõ ö^ ö`÷Z`÷Ý÷^Ý÷ù0Ÿùmù^mù0Ÿ˜P˜¢^¢%Z%`0Ÿ`~^~¾Z¾Í^Íz0Ÿz‘^‘âZâ^|Z|W0ŸWx^xÔZÔû^û&Z&0‘øzãP»0Ÿ L0ŸL=L^=LWLZ`LoO0ŸoOOZO O^ O¸OZ¸OÈO^ÈOÝOZÝOë0Ÿë"ëP"ëië‘ |iëƒë0Ÿƒë4ì‘ |êì…0Ÿã¦.§S.§8§0Ÿ{®Ê®_ʮۮ0ŸçÚ6Û\6Û@Û0Ÿû 0Ÿ !SWf0Ÿf«\Ô\9ã0Ÿã \‘©\» 0Ÿ _D»0ŸÊá_ì"0Ÿ"8_C&’&\’&¢&0ŸM8g8\}9’9\ö9k;0Ÿk;q;\š;¿<0Ÿ¿<Â<\LHLS`LoO0ŸO¨OS¸OÍOSHšgš_››­›_CÜŽÜSŽÜŸÜ0ŸûAûS„üµüSýü§þ0Ÿ§þÆþSÖþ%0Ÿ%?SÍ”•^• •0Ÿô—ý—Rý—K˜‘ø{K˜]˜0Ÿž³´‘ø{„´ÿ´‘ø{ÿ´¸µ0Ÿ¶I¶‘ø{I¶–¶0ŸÇCÇ^ÎÇAÈ^AÈ(É0Ÿ(É]É^èí‰î0Ÿm§s§Ps§€ª‘È|¬3¬0Ÿ3¬­‘˜{­.­P¯¯P¯}°Vg²v²‘˜{5´S´‘È|L·[·‘È|f½œ¾‘˜{¿¾È¿‘˜{È-É‘È|}ɜʑÈ|ÑÍxΑÈ|NÏRÏPRϮБÈ|ÔÕ‘˜{gÕ‰Ö‘È|Ùֿב˜{xÙEÚ‘È|kÛqÛPqÛàÛSlÞ³Þ‘È|³ÞÑÞSàÞôÞ‘È|»àÙá‘È|½åuç‘È|•ç·è‘È|^êƒêSÞëõëSPígíSÂîÆîPÆîçîSz›‘È|âû‘È||Ë‘È|ë‘È|H#()‘¸{4*F*‘¸{R+g+‘¸{},’,‘¸{«-Â-‘¸{Ð.Õ.‘¸{ù/H0‘¸{*1q1‘¸{L2“2‘¸{n3¹3‘¸{”4ÿ4‘¸{È536‘¸{ 7~7‘¸{M8Z8‘¸{}9—9‘¸{k;y;‘¸{¿<Ç<‘¸{è<í<‘¸{ >“?‘¸{V@Ñ@‘¸{‘AB‘¸{ÔB/C‘¸{ DkD‘¸{4EzE‘¸{^F'G‘¸{ÄJõK‘˜{×TÚTPÚT8\‘Ø{Q]Ÿ]‘Ø{¬^ÿ^‘Ø{_{_‘Ø{ˆ_á_‘Ø{ñ`a‘Ø{Nb`b‘Ø{¯cÁc‘Ø{e=e‘Ø{{f€f‘Ø{Ýg*h‘Ø{Cii‘Ø{©j®j‘Ø{l'l‘Ø{m“m‘Ø{ínòn‘Ø{Ypªp‘Ø{ÃqÕq‘Ø{/s4s‘Ø{›tºt‘Ø{vzv‘Ø{ƒwˆw‘Ø{ïx@y‘Ø{Yzªz‘Ø{Ã{H|‘Ø{h|‡|‘Ø{×}~‘Ø{3€‘Ø{[‘Ø{n‚·‚‘Ø{ă„‘Ø{#…p…‘Ø{††Ó†‘Ø{ò‡Cˆ‘Ø{b‰³‰‘Ø{ÌŠ ‹‘Ø{4”‚”V•Ñ•VΖ@—V?˜˜Vœ™ ™P ™Ó™Vùœ5VDž’žVŸÝŸV¤¤P¤7§‘ |ö§7©‘ |ì©©ª‘ |^«®¬‘ |m­®‘ |Юw¯‘ |,°×°‘ |Œ±@²‘ |õ²¬³‘ |a´!µ‘ |Öµ“¶‘ |H·°¸‘ |hÊË‘˜{ÒÜØÜPØÜ~Ý]~ݽߑ°|×ßá‘°|Xáâ‘°|Ãâ¥ã‘°|äûä‘°|oåZæ‘°|Îæ¼ç‘°|0è#é‘°|—éƒê‘°|óêuì‘°|êìÐí‘°|Eî4ï‘°|Ÿïð‘°|ñôñ‘°|iòƒò]ƒò_ó‘°|Ôóáó]?õLõ]®öÉö]+ø/øP/øFø]zÅ‘¸{¤$‘‘¸{í‘ ’P ’_’‘¸{_’%”0ŸÊœÍœPÍœ¸‘à}¸á ÿŸá6Ÿ‘ø{Ÿ ‘ø{n à ‘ø{L¡£‘à}N¨Ϋ‘à}ΫM¬‘ø{§¬¯¬‘ø{¶¬î¬P­‘ø{&®‹®‘ø{ ¯9¯‘ø{_¯į‘ø{]É|É‘¸{OÊnÊ‘¸{MËlË‘¸{ÀÕÖ‘¸{êÖôÖ‘¸{ôÖúÖ‘¸{”#Ÿ ×Yב¸{:؅ؑ¸{`ٮّ¸{•ÚàÚ‘¸{ÃÛ1Ü‘¸{úÜã0Ÿwêóë0ŸððPð# ‘Ø}3 Æ‘Ø}§–§P–§hª‘Ð|ç®ê®Pê®ã°‘°{5´D´‘Ð|L·[·‘Ð|ÈÉ‘Ð|}ɄʑÐ|ÑÍÕÍPÕÍxΑÐ|gÕqÖ‘Ð|xÙEÚ‘Ð|NÛTÛPTÛºÛ_lÞ³Þ‘Ð|³ÞàÞ_àÞôÞ‘Ð|»àÁá‘Ð|)â-âP-âqâ_½å]ç‘Ð|•çŸè‘Ð|^ê¦ê_Pí í_Âîï_zƒ‘Ð|âû‘Ð||³‘Ð|ëï‘Ð|UUPU&[‘ |&[)[P)[Å\‘ø{Q]÷]‘ |¬^<`‘ |ñ`™a‘ |Nbúb‘ |¯cdd‘ |eÆe‘ |{f(g‘ |ÝgŽh‘ |Ciôi‘ |©j`k‘ |lül‘ |m8n‘ |ín¤o‘ |Ypq‘ |Ãqzr‘ |/sæs‘ |›tLu‘ |vþv‘ |ƒw:x‘ |ïx¤y‘ |Yz{‘ |Ã{"}‘ |×}t~‘ |3a€‘ |¹‘ |n‚ƒ‘ |ăn„‘ |#…Ñ…‘ |††=‡‘ |ò‡­ˆ‘ |b‰Š‘ |ÌŠ+‹‘ |4”K”‘°{•„•‘°{Ζ[—‘°{?˜±˜‘°{œ™Hš‘°{­›Ä›‘°{ùœ ‘°{Dž[ž‘°{Ÿ”Ÿ‘°{Ú ì ‘°{5¢L¢‘°{ê£í£Pí£å§‘À{ö§Û©‘À{ì©M«‘À{^«\­‘À{m­¿®‘À{Ю°‘À{,°{±‘À{Œ±ä²‘À{õ²P´‘À{a´ŵ‘À{Öµ7·‘À{H·W¸‘À{5¹Ú¹‘À{õÜûÜPûܘÝS˜Ý½ß‘¸|×ßᑸ|Xás⑸|Ãâ™ã‘¸|äï䑸|oåN摸|Îæ°ç‘¸|0è鑸|—éwꑸ|óêi쑸|êìÄ푸|Eî(|Ÿïð‘¸|ñ&ñS&ñèñ‘¸|iò€òSÔóóóS?õVõS®ö²öP²öÓöS˜›P›±‘ä}±¸ ÿŸ¸á^áL¡‘ø}N¨:©‘ä}Ϋˬ‘ø}ˬ­^­ ¯‘ø} ¯¯^¯9¯‘ø}”#Ÿ_¯D°‘ø}×ïÚïPÚïò‘¸{@òHò‘¸{ÁòÉò‘¸{Nóö‘¸{‘ö°ö‘¸{8÷;ù‘¸{ù~ú‘¸{¸úýú‘¸{Rûû‘¸{ìû1ü‘¸{†üµü‘¸{ýJý‘¸{°ýþ‘¸{Oþ”þ‘¸{äþüþ‘¸{rÿ‡ÿ‘¸{‘¸{’Ÿ‘¸{$)‘¸{¹ý‘¸{,둸{3x‘¸{ªî‘¸{b‘¸{”™‘¸{:‘¸{˜¾‘¸{%T‘¸{»# ‘¸{3 ~ ‘¸{µ $ ‘¸{[ ´ ‘¸{ë ú ‘¸{r ~ ‘¸{ù  ‘¸{… ¡ ‘¸{ ! ‘¸{š Ò ‘¸{T‘¸{¡Ö‘¸{&[‘¸{«à‘¸{-ž‘¸{Б¸{U¹‘¸{ðU‘¸{Œå‘¸{+H‘¸{Æã‘¸{ c7p0ŸyyØ{0ŸØ{ä{‘À{[|Ÿ|‘À{ß|tÅ0ŸyÅ<Ü0Ÿ<ÜOÜPOÜÞ‘À{ÞôÞ0ŸôÞß‘À{ßÉå0ŸÉåæåPæåæ‘À{æVð0ŸVðó‘À{ó$óP$ó„ô‘À{„ô`÷0Ÿ`÷Ý÷‘À{Ý÷ù0Ÿùmù‘À{mù`0Ÿ`Í‘À{Íz0Ÿzâ‘À{âæPæû‘À{û8Ô0Ÿ8ÔEÔPEÔ™Ô‘À{™ÔqÕ0ŸqÕƒÕPƒÕBÖ‘À{BÖ^Ö0Ÿ^ÖnÖPnֺבÀ{º×ù×0Ÿù× ØP Ø:ØS:ØSØ0ŸSØaØPaثؑÀ{«ØDÙ0ŸDÙYÙPYÙ%Ú‘À{%ÚCÚ0ŸCÚSÚPSÚˆÚ‘À{ˆÚ•Ú0Ÿ•Ú¥ÚP¥ÚñÚ‘À{ñÚ\Ü0Ÿ\ÜfÜPfÜèÜ^èÜ@Ý0Ÿ@ÝIÝPI݇Þ^‡Þ—é0Ÿ—é¶é^¶éóê‘À{óê¿ë^¿ëêì‘À{êì í^ íEî‘À{Eîdî^dîŸï‘À{ŸïÛï^Ûïñ‘À{ñ!ñ^!ñiò‘À{iòˆò^ˆòÔó‘À{ÔóÞóPÞóëó^ëó?õ‘À{?õ+ø0Ÿ+øXø^Xø¤ù‘À{¤ùÑù^Ñùû‘À{û<û^<û„ü‘À{„ü­ü^­ü§þ‘À{§þÖþPÖþ%‘À{%Û0ŸÛ^0Ÿ%^%å 0Ÿå ‘À{”P”…‘À{…ŠPŠ–‘À{–Sa‘À{a|S|”_”²‘À{²·P·‘À{0ŸÑ ‘À{Ñ Ö PÖ '"‘À{'","P,"4"S4"}#‘À{}#Ø$0ŸØ$è$Sè$£2‘À{£2¨2P¨2¿6‘À{¿67_7p8‘À{p8-;0Ÿ-;2;P2;ƒ<‘À{ƒ<Ó<_Ó<Ú=‘À{Ú=@0Ÿ@âA‘À{âAçAPçA4C‘À{4CžC0ŸžCÁCPÁCÆC‘À{ÆC!E0Ÿ!E&EP&ExF‘À{xF…0Ÿ9©Ъ0ŸŽÒ÷Ò0ŸxÙŠÙ0ŸôÙ4Ú ÿŸ4ÚŽÚ‘¨|ŽÚ’ÚP’ÚOÝ‘¨|ÞlÞ‘¨|Þ”Þ0Ÿ£ÞàÞ‘¨|ôÞ*à‘¨|)â㑨|¥ãÄ㑨|ÄãÍãPÍã=䑨|½åðå0Ÿðå#æ1Ÿ^êM둨|Þë¿ì‘¨|Pí|Âî±ï‘¨|Bðþð‘¨|¶ñ]ò‘¨|óóó‘¨|„ô1õ‘¨|òõŸö‘¨|`÷ú‘¨|ÛúØû‘¨|iüxü‘¨|Ѩ|Bð‘¨|±[ ‘¨| Ê ‘¨|‹ h ‘¨|ù Ÿ ‘¨|`|¾Ü‘¨|zâ1Ÿâû0Ÿ|W ÿŸWC‘¨|ÔJ‘¨|ãБ¨|‘y‘¨|_‘&’‘¨|·’£“‘¨|ÀËÂË0Ÿ{Ì¥Ì0Ÿ]ÍaÍP«[ƒ0Ÿ[ƒŠƒ1Ÿî„R†1Ÿ–ŠåŠ0ŸåŠ‹1Ÿ1z1Ÿ c7p0ŸyyØ{0ŸØ{ä{‘È{[|Ÿ|‘È{ß|[©0Ÿ[©f©Pf©Ъ\ЪtÅ0ŸyÅxÙ0ŸxÙŠÙPŠÙÊÙSÊÙðÚ0ŸðÚûÚPûÚ^ÛS^ÛùÛ0ŸùÛ ÜP ÜàÜSàÜÞ‘È{Þ>Þ0Ÿ>ÞlÞSlÞÑÞ0ŸÑÞßSß»à0Ÿ»àÚàSÚà)â‘È{)âVâSVâ¥ã‘È{¥ãûå0Ÿûå æP æ#æS#æIð0ŸIðxðSxð¶ñ‘È{¶ñÓñSÓñó‘È{ó>óS>ó„ô‘È{„ô¦ôS¦ôòõ‘È{òõöPööSö`÷‘È{`÷~÷S~÷Š÷p Ý÷ù0ŸùmùSmù`0Ÿ`‹S‹¾‘È{¾ÍSÍz0ŸzŒPŒœSœâ‘È{âW0ŸW…S…Ô‘È{ÔSã‘È{ãS‘È{‘0Ÿ‘»P» ‘È{ ”U0Ÿ”U§UP§U•V‘È{•V×}0Ÿ×}#…‘È{#…(…P(…††‘È{††¥0Ÿ¥¥P¥Æ¥‘È{Æ¥Ÿ¦0ŸŸ¦t¨‘È{t¨¬0Ÿ¬m­‘È{m­t­Pt­}­‘È{}­‚­P‚­Ю‘È{Ю¨Ù0Ÿ¨ÙµÙPµÙàÙYàÙÚ‘¨{Ú´Ý0Ÿ´ÝÇÝPÇ݇ޑÈ{‡Þ—é0Ÿ—éEî‘È{EîJîPJîŸï‘È{Ÿï×0Ÿ×>‘¨{(-P-8Y8zXzä0Ÿä P Ya0ŸafPf²‘È{²Èô0ŸÈôÖôPÖôhõVhõåõ0Ÿÿõ“÷0Ÿ“÷¢÷P¢÷º÷Vº÷Ô÷0ŸÔ÷ä÷Pä÷ øV ø>ù^>ùwù‘€{ùú^ú®ú‘€{¸ú û^ û#û‘€{Rû£û^£û½û‘€{ìû=ü^=üWü‘€{†üÛü^Ûüéü‘€{ýpý^pý~ý‘€{°ýºý^ºýÏýVÏýOþ‘È{Oþ\þP\þdþVdþäþ‘È{äþÿVÿrÿ‘È{rÿÿPÿŒÿVŒÿ‘È{¹0Ÿ¹ÙVÙ,‘È{,ÀVÀÍPÍÕVÕ3‘È{3ª0ŸªÊVÊ‘È{õ0ŸõP³‘È{³ 0Ÿ &‘È{&-P-«‘È{«…0ŸÚ(ÚP(ÚÁÝ‘À|ÞlÞ‘À|Þ”Þ0Ÿ£ÞàÞ‘À|ôÞà‘À|)âyã‘À|¥ã=ä‘À|^ê²ë‘À|Þë$í‘À|Pífî‘À|Âîð‘À|Bðcñ‘À|¶ñÂò‘À|óXô‘À|„ô–õ‘À|òõ÷‘À|`÷ú‘À|Ûú=ü‘À|iüxü‘À|Ãæ‘À|BU‘À|±À ‘À| / ‘À|‹ Í ‘À|ù ‘À|`k‘À|¾Ü‘À||P¿‘À|¿ë}#àW¨‘À|Ô¯‘À|ã5‘À|‘Þ‘À|_‘‹’‘À|·’”‘À|xÛ‡ÛP‡Û_à‘Ø{Xá½á‘Ø{Ãâíâ‘Ø{ä@䑨{oåŸå‘Ø{Îæþæ‘Ø{0èè‘Ø{—é©é‘Ø{óê ë‘Ø{êìüì‘Ø{EîWî‘Ø{Ÿï¶ï‘Ø{ññ‘Ø{iòÇò‘Ø{ÔóOô‘Ø{?õ˜õ‘Ø{®ö2÷‘Ø{+ø´ø‘Ø{¤ù-ú‘Ø{û/û‘Ø{„ü›ü‘Ø{§þ¬þ‘Ø{%*‘Ø{UZ‘Ø{¿Õ‘Ø{؇‘Ø{ ‘Ø{W‘Ø{‰¢‘Ø{¢§P§ø‘Ø{ø }#à{ ƒ 0Ÿ±•Ì•]̕Օ^Õ•ü•0ŸS–[–0Ÿ+—5—P5—[—‘ð{7¹<¹P<¹„¹‘ð{„¹ô¹ ‘¸{##à‚»˜»0ŸÔ¿ð¿0ŸÉÃÄ^ÄÄ]Ä*Äpà*ĈÄ}#àˆÄ¼Ä^?ÆGÆ0Ÿ câk0ŸÓl7p0ŸyyØ{0ŸØ{ä{‘°{[|Ÿ|‘°{ß|¬0Ÿ¬3¬P3¬;­‘ {;­H­0ŸH­\­P\­ä­‘°{ä­®0Ÿ®m®_m®”¯0Ÿ”¯œ¯Pœ¯ë¯_ë¯/°0Ÿ/°?°P?°ɰ_ɰg²0Ÿg²v²‘ {v²Šº0ŸŠº—ºP—ºݺ]ݺf½0Ÿf½µ¾‘ {¿¾Ú¿‘ {ÀtÅ0ŸyÅÔ0ŸÔ.Õ‘ {gÕÙÖ0ŸÙָב {1Ø6ØP6ØxÙ‘ {xÙ[Ü0Ÿ[ÜnÜPnܩݑ°|ÞôÞ0ŸôÞß‘°|ßµå0Ÿ½åVð0ŸVðKñ‘°|¶ñ¾ñP¾ñªò‘°|ó`÷0Ÿ`÷Ý÷‘°|Ý÷ù0Ÿùmù‘°|mù+þ0Ÿ+þŠþ]Šþc0ŸchPh›]›`0Ÿ`S‘°|¾Í‘°|ÍZ0Ÿz@0Ÿ@___ ‘°{ Ü _Ü ”!0Ÿ”!ª!Pª!"‘°{""U"a"‘°{a"f$0Ÿf$v$Pv$‘$‘È|‘$°$0Ÿ°$Ì$PÌ$ð$\ð$Þ%0ŸÞ%5&\5&&'0Ÿ&'8'P8'º(\º()0Ÿ)=)\=)4*‘°{4*[*\[*R+‘°{R+|+\|+},‘°{},´,\´,«-‘°{«-ñ-\ñ-Ð.‘°{Ð. /\ /ù/‘°{ù/ 0\ 0*1‘°{*1Q1\Q1L2‘°{L2s2\s2n3‘°{n3x3Px3{3\{3”4‘°{”4è<0Ÿè<=\= >‘°{ >_>\_>o>0Ÿo>y>Py>—>\—>Â>0ŸÂ>ä>\ä>V@‘°{V@j@0Ÿj@}@\}@ÔB‘°{ÔBC\C D‘°{ DÄJ0ŸÄJL‘ {LÝO0ŸÝOR‘°{R®U0Ÿ®UÁUPÁU•V]•VÉY0ŸÉY ZP ZòZ]òZQ]0ŸQ]ñ`]ñ`û`Pû` a] aNb‘°{Nb×}0Ÿ×}ç}]ç}3‘°{3ì]ì‘°{=]=n‚‘°{n‚•‚]•‚ă‘°{ă΃P΃Þƒ]Þƒ#…‘°{#…4”0Ÿ4”X”_X”•‘°{•‰•P‰•ž•_ž•Ζ‘°{Ζ­›0Ÿ­›Ñ›_Ñ›М‘°{ùœ_Dž‘°{Džhž_hžŸ‘°{Ÿ™ŸP™Ÿ³Ÿ_³ŸÚ ‘°{Ú ù _ù 5¢‘°{5¢Y¢_Y¢]£‘°{]£æ¤0Ÿæ¤ù¤Pù¤Æ¥]Æ¥Ÿ¦0ŸŸ¦¿¦]¿¦ö§‘°{ö§t¨]t¨¬0Ÿ¬L¬]L¬m­‘°{m­š­]š­Ю‘°{ЮÚ®Pڮݮ]Ý®,°‘°{,°ø½0Ÿø½ý½Pý½B¿‘°{B¿Ã0ŸÃ9Ã_9ùđ°{¹ÄÎÄ0ŸÎÄàÄ_àÄðÄ0ŸðÄ ÅP Å*É‘°{*É/ÉP/ÉhÊ‘°{hʯˑ {ÀË Ó0Ÿ ÓÓP_Ó­Ó0Ÿ­ÓÉÓPÉÓíÓ‘¨{íÓÔ0ŸÔÔPÔ/ÔX/ÔEÔ‘¨{eÔîÖ0ŸøÖ{Ø0Ÿ{؃ØPƒØ±ØX±ØÓØ‘¨{ÓØÙ0ŸÙ;ÙP;Ù_Ù‘¨{_ÙvÙ0ŸvÙÙPÙ¡ÙX¡ÙµÙ‘¨{ÜÙÐÝ0ŸÐÝëÝPë݇ޑÐ{‡Þ—é0Ÿ—éøé‘Ð{óêsë‘Ð{sëzëPzëïë‘Ð{êìïìPïì4í‘Ð{Eî(0Ÿ(‘¨{z½X½È‘¸{P8X8a‘°{²‘¨{P_‘°{_º0Ÿº*‘¨{P:X:c ‘°{c ­ 0Ÿ­ Ì PÌ Ñ XÑ .&0Ÿ.&3&P3&~'‘È{~'Ï,0ŸÏ,-X- -‘¸{--X-9-‘¸{9-œ.0Ÿœ.á.‘¸{ô/§60Ÿ§6á6Xá6ç6‘¨{ñ6õ6Xõ6 7‘¨{ 7ƒ<0Ÿƒ<ð<‘¨{Ú=âA0ŸâAQB‘¨{4CwCXwC‚C‘¸{ÆCÐCPÐCDXD!E‘°{xFìF‘¨{ÓGÝGPÝG7I‘°{7I›J0ŸûKLPL:LX:LVM‘°{VM¢M0Ÿ¢M¼MP¼MÁMXÁMBS0ŸBSJSPJSMS_MS§T[§TÇ—0ŸÇ—ß—Pß—]˜\]˜Ç›0ŸÇ›Ø›PØ›œVœ6œ0Ÿ6œKœPKœiœViœ}œ0Ÿ}œœPœ»œV»œ0Ÿ0P0xVxLž0ŸLž[žP[žsž\sž·ž0Ÿ·žŸ\ŸŸ‘°{Ÿ£0Ÿ£V£VV£÷£‘°{÷£ ¤P ¤¤V¤Ѥ‘°{Ѥ¥V¥«¥‘°{«¥À¥PÀ¥Ò¥VÒ¥‰¦‘°{‰¦ЦVЦu§‘°{u§ЧPЧœ§Vœ§N¨‘°{N¨:©0Ÿ:©x©Vx©ª‘°{ªLªVLªñª‘°{ñª«P««V«Ϋ‘°{Ϋã«P㫬\¬§¬‘°{§¬ž³0Ÿž³ç³\糄´‘°{„´®´\®´ÿ´‘°{ÿ´¶0Ÿ¶0¶\0¶I¶‘°{I¶–¶0Ÿ–¶¨¶P¨¶ʶ\ʶW·‘°{W·{Ï0Ÿ{Ï Ï‘°{ ÏFÐVFЄё°{„ÑÏÑVÏÑŸÒ‘°{ŸÒèÒVèÒ#Õ‘°{#Õ:Ø0Ÿ:ØDØPDØTØ\TØ`Ù‘°{`ÙeÙPeهّÈ|•Ú¼Ú\¼ÚÃÛ‘°{ÃÛ_ô0Ÿ_ôqôPqôhõ‘°{hõ¹0Ÿ¹‘°{P˜‘°{˜…0Ÿ c7p0ŸyyØ{0ŸØ{ä{‘Ø{[|Ÿ|‘Ø{ß|tÅ0ŸyÅwÜ0ŸwÜ’ÜP’ÜÞ‘Ø{ÞôÞ0ŸôÞûÞPûÞß‘Ø{ßVð0ŸVð^ðP^ð¶ñ‘Ø{¶ñ`÷0Ÿ`÷Ý÷‘Ø{Ý÷ù0Ÿùmù‘Ø{mù`0Ÿ`Í‘Ø{Í'0Ÿ'¿'P¿'Ë(]Ë()0Ÿ)«-]«-µ-Pµ-¸-]¸-Ð.‘Ø{Ð.(V0Ÿ(V0VPËVpW0ŸpW‚WP‚WÄW^ÄW;X0Ÿ;XOXPOXlX^lX|X0Ÿ|XŠXPŠXñX^ñXVY0ŸVYhYPhYZ^Zñ`0Ÿñ`(a^(aNb‘Ø{Nb‰b^‰b¯c‘Ø{¯cêc^êce‘Ø{e{f^{f…fP…fÝg^Ýg©j0Ÿ©j±j^±jl‘Ø{lˆl^ˆlm‘Ø{mÑm^Ñmín‘Ø{ín÷nP÷n=o^=oYp‘Ø{YpÃq0ŸÃqr^r/s‘Ø{/s9sP9ss^s›t‘Ø{›tv^vƒw0ŸƒwwPwÓw^Ówïx‘Ø{ïxh|0Ÿ×}ß}Pß}~V~3^3‰0Ÿ‰¢P¢§V§·0Ÿ·ÂPÂÏ_Ï[¨0Ÿ¨¨P¨j¨‘Ø{j¨¬0Ÿ¬m­‘Ø{m­Ì0ŸÌ¥ÌPîÌ@Ñ0Ÿ@ÑHÑP•шÒ0ŸˆÒœÒPœÒÉÒSÉÒâÒ0ŸâÒðÒPðÒ9Ó‘Ø{9ÓÒÓ0ŸÒÓçÓPçÓ¼Ô‘Ø{¼ÔÚÔ0ŸÚÔêÔPêÔÕ‘Ø{Õ,Õ0Ÿ,Õ<ÕP<ÕñÚ‘Ø{ñÚÜ0ŸÜ/ÜP/ÜŸÜ]ŸÜ~Ý0Ÿ~Ý‘ÝP‘݇Þ]‡Þ—é0Ÿ—é±é]±éóê‘Ø{óê­ë]­ëêì‘Ø{êìí]íEî‘Ø{Eî_î]_îŸï‘Ø{Ÿï¹ï]¹ïñ‘Ø{ñ ñP ññ]ñiò‘Ø{iòû0Ÿû7û]7û„ü‘Ø{„ü£ü]£üýü‘Ø{ýü§þ0Ÿ§þ´þ]´þÖþ‘Ø{Öþ%0Ÿ%2]2U‘Ø{U_P_b]b¿‘Ø{¿å 0Ÿå Ï9‘Ø{Ï9Ô9PÔ95?‘Ø{5?:?P:?PC‘Ø{PCÆC_ÆC!E‘Ø{!E[E_[ExF‘Ø{xF}FP}FÓG‘Ø{ÓGûK0ŸûKÁM‘Ø{ÁMÆMPÆM O‘Ø{ O%OP%O-OS-O‚P‘Ø{‚PãQ0ŸãQðQSðQ§T‘Ø{§TY0ŸdZiZPiZoZYoZÈ[XÈ[\0Ÿ\>\P>\C\YC\§]0Ÿ§]¯]P¯]Î]_Î] _[ _o0Ÿ7pCp0ŸCp_pP_pŠp‘Ø{Šp>s0Ÿ>s^s‘Ø{^s†w0Ÿ†w£wP£wÌw‘Ø{Ìw=|0Ÿ=|˜}‘Ø{˜}N€0Ÿ«°P°¶Y¶ƒXƒfƒ0Ÿfƒ…ƒP…ƒŠƒYŠƒî„0Ÿî„ö„Pö„…_…R†[R†ì”0Ÿì”÷”P÷”K•‘Ð{K•ô•0Ÿô•–_–K–0ŸS–’–0Ÿ’–¡–P¡–¹–_¹–Í–0ŸÍ–ß–Pß–[—_[——0Ÿ—À—RÀ—å—‘ø{å—]˜0Ÿ¡˜­˜P­˜̘Rܘõ˜0Ÿõ˜ÿ˜Pÿ˜É™RÉ™Gš‘ø{¢š½š0Ÿ½šÈšPÈšðš^ðš?›0Ÿ?›K›PK›N›‘|N›j›0Ÿj››P›œ›Sœ›°›0Ÿ°›À›PÀ›î›Sî›Rœ0ŸRœcœPcœªœSªœa0ŸarPr±S±ž0Ÿž'žP'žsž_sž·ž0Ÿ·žŸ_ŸŸ‘Ø{ŸõŸ_õŸn ‘Ø{n { P{ ¹ _¹ L¡‘Ø{L¡£0Ÿ£[£S[£÷£‘Ø{÷£+¤S+¤Ѥ‘Ø{ѤÞ¤PÞ¤ó¤S󤫥‘Ø{«¥u§0Ÿu§©§S©§N¨‘Ø{N¨•¨S•¨:©‘Ø{:©G©PG©\©S\©ª‘Ø{ªΫ0ŸÎ«¬_¬§¬‘Ø{§¬D°0ŸD°Q°PQ°k°Sk°!±‘Ø{!±Z±SZ±ÿ±‘Ø{ÿ± ²P ²&²S&²ݲ‘Ø{ݲâ²Pâ²ü²^ž³ʵ0Ÿ¶–¶0Ÿ–¶(·‘ø{W·œ·R¢·½·0Ÿ½·(¸R(¸å¸‘Ø{司¸0Ÿø¸¹P¹w¹_w¹ô¹‘Ø{ô¹Dº_DºÁº‘Ø{Áº»_»~»‘Ø{~»˜»_˜»M¼RM¼ç¼‘Ø{ç¼ñ¼Pñ¼'½_'½¤½‘Ø{¤½â½_â½i¾‘Ø{i¾¾P¾•¾_•¾¿‘Ø{¿ã¿0Ÿã¿ð¿_ð¿€À0Ÿ€À^Á_^ÁÁ‘€|ÁðÁ_ðÁp‘€|p¾Â_¾ÂDÑ€|DÃÕÃ0ŸÕÃçÃPçÃÄ_ĈÄ0ŸˆÄàÄ_àÄaÅ‘Ø{aÅÇ0ŸÇ†Ç‘Ð{ÎÇàÇ‘Ð{àÇÈPÈì0ŸìEì‘Ð{Eìì0ŸììPì”ô0Ÿ”ô§ôP§ôhõ‘Ø{hõ¹0Ÿ¹‘Ø{%P%”‘Ø{”…0Ÿ c7p0ŸyyØ{0ŸØ{ä{‘ˆ{[|Ÿ|‘ˆ{ß|tÅ0ŸyÅDÒ0ŸDÒXÒPXÒqÒSqÒˆÒ0ŸˆÒ“ÒP“ÒÍÒSÍÒÔ‘ˆ{Ô–Ü0Ÿ–ÜtÝ‘˜|Þ`÷0Ÿ`÷Ý÷‘˜|Ý÷›ø0Ÿ›ø¾øP¾øáøSáøù0Ÿùmù‘˜|mù‹ 0Ÿ‹ ª Sª ù ‘ˆ{ù  P  S `‘ˆ{`‘˜|¾Í‘˜|ÍnU0ŸnU|UP|U•V^•V×}0Ÿ×}~^~3‘ˆ{3Ü^Ü‘ˆ{M^Mn‚‘ˆ{n‚º‚^º‚ă‘ˆ{ă„^„#…‘ˆ{#…s…^s…††‘ˆ{†††P†Ö†^Ö†ò‡‘ˆ{ò‡!¥0Ÿ!¥Æ¥‘˜|Æ¥Ÿ¦0ŸŸ¦C§‘˜|ö§t¨‘˜|t¨¬0Ÿ¬º¬‘˜|m­ÀË0ŸÀËàËSàËFÌ0ŸFÌXÌPXÌ¥ÌSþÌÍ0ŸÍÍPÍPÍSPÍ™Í0Ÿ™Í­ÍP­ÍÊÍSÊÍáÍ0ŸáÍïÍPïÍ.ÎS.ΑÎ0Ÿ‘ΣÎP£ÎLÏSLÏ\Ï0Ÿ\ÏgÏPgÏœÏSœÏÑÏ0ŸÑÏåÏPåÏÐSÐÐ0ŸÐ&ÐP&ÐvÐSvÐéÐ0ŸéÐûÐPûÐHÑS¥ÑµÑ0ŸµÑÄÑPÄÑ÷ÑS÷Ñ@Ò0Ÿ@ÒTÒPTÒqÒSqÒDÓ0ŸDÓYÓPYÓ¡ÓS¡ÓsÔ0ŸsÔ|ÔP|ÔðÔSðÔÕ0ŸÕÕPÕBÕSBÕÖ0ŸÖÖPÖtÖStÖ8×0Ÿ8×H×PH×’×S’×¢×0Ÿ¢×­×P­×â×Sâ׸Ø0Ÿ¸ØÍØPÍØÙSÙçÙ0ŸçÙüÙPüÙYÚSYÚiÚ0ŸiÚxÚPxÚ«ÚS«Ú˜Ý0Ÿ˜Ý«ÝP«ÝkÞSkÞ‡ÞpЇÞ—é0Ÿ—éÐéSÐéóꑈ{óêÄëSÄëê쑈{êì#íS#íE{EîîSîŸï‘ˆ{Ÿï©ïP©ïÃïSÃïñ‘ˆ{ñ?0Ÿ?‚S‚0Ÿ¤S¤á‘ˆ{áþSþ3‘ˆ{3=P=ESE…‘ˆ{…šSš×‘ˆ{×áPáìSì(‘ˆ{(_0Ÿ_wSwº‘ˆ{ºÄPÄÑSÑ‘ˆ{}#0Ÿ}#’#S’#Ø$‘ˆ{Ø$~'0Ÿ~'ˆ'Pˆ''S'Ð(‘ˆ{Ð(å(Så("*‘ˆ{"*,*P,*4*S4*t+‘ˆ{t+£20Ÿ£2¸2S¸2ø3‘ˆ{ø34P4 4S 4M5‘ˆ{M5Ï90ŸÏ9ä9Sä9-;‘ˆ{-;Ú=0ŸÚ=ä=Pä=ì=Sì=5?‘ˆ{5?J?SJ?@‘ˆ{@š@Pš@¢@S¢@âA‘ˆ{âA7I0Ÿ7ILISLI›J‘ˆ{›J¥JP¥J²JS²JûK‘ˆ{ûK‚P0Ÿ‚P”PS”PãQ‘ˆ{ãQ§T0Ÿ§T±TP±T¹TS¹TV‘ˆ{VQV0ŸQVcVScV©W‘ˆ{©W³WP³W»WS»WY‘ˆ{dZ|ZS|ZÈ[‘ˆ{È[á[Sá[ú[Qú[\‘¸{\\Q\C\‘¸{C\X\SX\§]‘ˆ{§]ç]‘¸{ __P__S_o`‘ˆ{o`0c0Ÿ0cBcSBc‹d‘ˆ{‹deSeePeeSe^f‘ˆ{^fnfSnf¤f‘ˆ{¤f¶fS¶füg‘ˆ{üghPhhSh]i‘ˆ{]iÈj0ŸÈjÚjSÚj)l‘ˆ{)l3lP3l;lS;l‡m‘ˆ{‡m™mS™mßn‘ˆ{ßnñnSñn7p‘ˆ{7pUpSUp”p_”p¦pS¦péq‘ˆ{éqóqPóqûqSûq>s‘ˆ{>s^s_^sv0Ÿv+vS+vzw‘ˆ{zwÖwSÖwàwPàwèwSèw=y‘ˆ{=yGyPGyOySOyžz‘ˆ{žzÜz0ŸÜzîzSîz=|‘ˆ{=|T|ST|˜}‘ˆ{˜}ª}Sª}ð~‘ˆ{ð~ú~Pú~SN€‘ˆ{«ÃSш{ƒ(ƒS(ƒAƒQAƒLƒ‘¸{[ƒ_ƒQ_ƒŠƒ‘¸{ŠƒŸƒSŸƒî„‘ˆ{î„.…‘¸{R†\†P\†d†Sd†¶‡‘ˆ{¶‡–Š0Ÿ–Š‹S‹‹P‹#‹S#‹iŒ‘ˆ{iŒ{ŒS{ŒÁ‘ˆ{ÁËPËÓSÓ"‘ˆ{"FSFz‘ˆ{z10Ÿ1hQhy‘~Ž’Q’°‘~°ª0Ÿª‘~…0Ÿ câk0ŸÓl7p0ŸyyØ{0ŸØ{ä{‘¸{[|Ÿ|‘¸{ß|¨®0Ÿ¨®³®P³®H¯SH¯Õ¯0ŸÕ¯å¯På¯E°SE°U°0ŸU°b°Pb°¨°S¨°tÅ0Ÿyŵå0Ÿ½å ù0Ÿ ù>ùP>ùcù‘¸{cù`0Ÿ`¾‘¸{¾ÂPÂÍ‘¸{ÍZ0Ÿz 0Ÿ 'P'»0ŸÊ¶ 0Ÿ¶ Ü SÜ &0Ÿ&/&P/&¢&^¢&'0Ÿ'–'P–'ý'^ý' (0Ÿ ('(P'(Û(^Û()0Ÿ)-)^-)4*‘¸{4*K*^K*R+‘¸{R+l+^l+},‘¸{},„,P„,,^,—,P—,¤,^¤,«-‘¸{«-Ê-^Ê-Ð.‘¸{Ð.Ú.PÚ.â.^â.ù/‘¸{ù/M80ŸM8l8^l8}9‘¸{}9¦9^¦9ö9‘¸{ö9k;0Ÿk;‹;^‹;š;‘¸{š;¿<0Ÿ¿<Ù<^Ù<è<‘¸{è<ò<Pò<ÿ<^ÿ< >‘¸{ >V0ŸV•V‘˜|•VÉX0ŸÉXÛXPÛXYV$Y6YP6YáZSáZQ]0ŸQ]]S]¬^‘¸{¬^Å^SÅ^_‘¸{_/_S/_ˆ_‘¸{ˆ_·_S·_ñ`‘¸{ñ`>aS>aNb‘¸{NbŸbSŸb¯c‘¸{¯cdSde‘¸{e8eS8e{f‘¸{{fšfSšfÝg‘¸{ÝgügSügCi‘¸{CiMiPMiZiSZi©j‘¸{©j¶jP¶jÈjVÈjl^l×}0Ÿ×}Š~‘˜|3§‘˜|§·0Ÿ·m€‘˜|4”0Ÿ4”>”P>”S”SS”•‘¸{•?˜0Ÿ?˜l˜Sl˜œ™‘¸{œ™ÙSÙô™‘¸{ô™ šS šHš‘¸{Hš|šS|š››‘¸{››Ö›SÖ›М‘¸{ùœSDž‘¸{DžNžPNžcžScžŸ‘¸{Ÿ®ŸS®ŸÚ ‘¸{Ú 5¢0Ÿ5¢^¢S^¢]£‘¸{]£—¤0Ÿ—¤©¤P©¤d¥‘¸{Æ¥Ÿ¦0ŸŸ¦t¨‘¸{t¨¬0Ÿ¬õ²‘¸{õ²ú²Pú²a´‘¸{a´ Ã0Ÿ Ã%ÃS%ÃÞ0ŸÞÞPÞ–ÞR–Þ¸Þ‘È{¸Þeß0ŸeßtßPtß•ß_•ßÃâ0ŸÃâã_ã䑸{ääPätä_täo呸{oå0è0Ÿ0èè‘È{—éœéPœéóêRóêPë0ŸPëbëPbësëRsëƒë0ŸƒëˆëPˆëêìRê쨔0Ÿ¨”¸”P¸” •\ •¨–0Ÿ¨–Æ–PÆ–å–\å–—0Ÿ——P—[—\[—Ú]Ú ›\ ›%›]%›&Ÿ‘ð{ŸÞŸ‘ð{n Р‘ð{L¡š¡‘ð{.¢¡¢‘ð{£„£‘ð{÷£O¤‘ð{Ѥ8¥‘ð{«¥þ¥‘ð{‰¦ù¦‘ð{u§ä§‘ð{N¨¾¨‘ð{:©©©‘ð{ªuª‘ð{ñªI«‘ð{Ϋ=¬‘ð{§¬‡­‘ð{&®l®‘ð{ ¯9¯‘ð{_¯¥¯‘ð{D°«°‘ð{!±ƒ±‘ð{ÿ±a²‘ð{ݲ³\³ó]ó„´‘¸{„´Í´]Í´¸µ‘¸{¶¶]¶–¶‘¸{–¶¹]¹|¹\|¹ô¹‘¸{ô¹?º\?ºÁº]Áº˺P˺»\»~»‘¸{~»˜»_˜»ç¼]ç¼,½\,½¤½‘¸{¤½ȽPȽн\нA¾‘¸{i¾¸À0Ÿ¸ÀÉÀPÉÀõÀ\õÀÁ0ŸÁYÁ\YÁÁ‘¸{Á ÁP ÁëÁ\ëÁp‘¸{pÂÇ0ŸÇUÇ\UÇÎÇ‘¸{ÎÇ÷Ç\÷ÇAÈ‘¸{AÈ(É0Ÿ(ÉFÉ\FÉ]É‘¸{]É$æ0Ÿ$æ7æP7æœæSœæºæ‘¸{ºæúæ0ŸúæçSç_瑸{_çkçSkçÄ瑸{ÄçÐçSÐç)葸{)è0èP0è5èS5èŽè‘¸{Žè1í0Ÿ1í;íP;íHí\Híè푸{èí¹ï0Ÿ¹ïðSðòð0ŸòðñPñkñSkñ@ò0Ÿ@òeòSeòÁò‘¸{ÁòÄòPÄòæòSæòNó‘¸{Nóöó0ŸöóùóPùóô‘ð|ô€õ0Ÿ€õõPõÝõSÝõÿõ0Ÿÿõ öP ö!öS!ö‘ö‘¸{‘öÅöSÅö8÷‘¸{8÷H÷0ŸH÷Z÷PZ÷º÷Sº÷äþ0ŸäþÿSÿrÿ‘¸{rÿ™ÿS™ÿ‘¸{"S"’‘¸{’´S´$‘¸{$1P1FSF¹‘¸{¹^0Ÿ^iPi€S€ë 0Ÿë  S r ‘¸{r — S— ù ‘¸{ù  S … ‘¸{… º Sº  ‘¸{ ( P( < S< 𠑏{š +0Ÿ+^S^Æ‘¸{ÆùSù^‘¸{^…0Ÿ–ÜÞ0Ÿ`÷b÷0Ÿù>ù0Ÿ>ùmù1Ÿ`¾1Ÿ¾Í0ŸçÍÎ0ŸÆÎóÎ0Ÿ¤Ï¨ÏPïÝÞ0Ÿ—éEë0ŸEësë1Ÿƒëêì1Ÿßno0Ÿ7pep0Ÿep”p1Ÿ>s^s1Ÿv©w0Ÿ©wÖw1Ÿ=|˜}1Ÿ c¾k0ŸÓl7p0ŸyyØ{0ŸØ{ä{‘Ð{[|Ÿ|‘Ð{ß|d¬0Ÿd¬w¬Pw¬׬^׬„®0Ÿ„®®P®¯V¯}°0Ÿ}°Œ°PŒ°¨°V¨°g²0Ÿg²v²^v²1º0Ÿ1ºCºPCºǺVǺf½0Ÿf½À^ÀtÅ0ŸyÅxÎ0ŸNÏaÒ0ŸaÒqÒPqÒÔ‘Ð{ÔÔPÔgÕ^gÕ¸Ü0Ÿ¸ÜÆÜPÆÜ Ý\ ÝÞ‘Ð{Þµå0Ÿ½å`÷0Ÿ`÷b÷Pb÷ù÷\ù÷}ø0Ÿ}ø”øP”øºø‘¸{ºøúø0Ÿúøù\ùNù0ŸNùYùPYùmùTmùuù\uùÛú‘Ð{ÛúZþ0ŸZþÅþVÅþÂÿ‘Ð{ÂÿÇÿPÇÿýÿVýÿú‘Ð{úc0ŸcžVž›‘Ð{›£V£Ã‘Ð{ñ0Ÿ±»P» ‘Ð{ ù 0Ÿù > ‘¸{`qPq¾T¾Z0Ÿz 0Ÿ !V!»‘Ð{Ê×V×"‘Ð{"@P@® 0Ÿ® Ü VÜ ô!0Ÿ"p&0Ÿp&{&P{&'V'?'0Ÿ?'L'PL'ý'Vý'«-0Ÿ«-.V.Ð.‘Ð{Ð.'/V'/ù/‘Ð{ù/?0V?0*1‘Ð{*1c1Vc1L2‘Ð{L2V2PV2–2V–2n3‘Ð{n3”40Ÿ”4Û4VÛ4È5‘Ð{È56V6 7‘Ð{ 7M7VM7M8‘Ð{M88V8}9‘Ð{}99V9©9P©9¶9V¹96>0Ÿ6>_>V_>Ò>0ŸÒ>×>V×>ÄJ0ŸÄJL^LÊU0ŸÊUÝUPÝU•V‘Ð{•V«Y0Ÿ«YÂYPÂYZ‘Ð{Z+Z0Ÿ+ZFZPFZ[‘Ð{[Q]0ŸQ]ˆ_‘Ð{ˆ__P_˜_‘Ð{˜__P_Nb‘Ð{NbSbPSb¯c‘Ð{¯c×}0Ÿ×}n‚‘Ð{n‚s‚Ps‚ă‘Ð{ă‘0Ÿ_‘ô™0Ÿô™0šV0šHš‘Ð{HššVš››‘Ð{››­›V­›¿›P¿›â›Vâ›М‘Ð{ùœ5¢0Ÿ5¢j¢Vj¢]£‘Ð{]£̤0ŸÌ¤ߤPߤÆ¥‘Ð{Æ¥Ÿ¦0ŸŸ¦t¨‘Ð{t¨¬0Ÿ¬,°‘Ð{,°1°P1°Œ±‘Ð{Œ±Ã0ŸÃ%ÃV%ÃÀË0ŸÀËÌ‘Ð{ÌÓÌ0ŸÓÌèÌPèÌ-Í‘Ð{-Í:Í0Ÿ:ÍJÍPJ͇͑Ð{‡Í;Î0Ÿ;ÎMÎPMÎtÏ‘Ð{tÏîÏ0ŸîÏþÏPþϼБÐ{¼ÐzÑ0ŸzÑÑPÑÔÑ‘Ð{ÔÑáÑ0ŸáÑñÑPñÑ.Ò‘Ð{.ÒÛ0ŸÛÛPÛ®Û‘Ð{®ÛâÛ0ŸâÛ5ÜS5ÜÞ0ŸÞ²ÞP²ÞßSß.ß0Ÿ.ß@ßP@ß•ßS•ß×ß0Ÿ×ß àS àXá‘Ð{XáÃâ0ŸÃâÓâSÓâä‘Ð{ä&äS&äoå‘Ð{oå|åS|åÎæ‘Ð{ÎæÓæPÓæÛæSÛæ0è‘Ð{0è:èP:èOèSOè—é‘Ð{—éU0ŸU‘S‘¿‘Ð{¿S0Ÿ<S<Ø‘Ð{Øì0ŸìþSþ0Ÿ'P'NSN‘Ð{4S4ƒ ‘Ð{ƒ ˆ Pˆ å ‘Ð{å V0ŸVQV‘Ð{QVVVPVVY‘Ð{Y YP YdZ‘Ð{dZ×a0Ÿ×a¨d‘Ð{¨düd\üd^f‘Ð{^f¤f\¤f©fP©füg‘Ð{üg)l0Ÿ)l·t‘Ð{·t¼tP¼tv‘Ð{vžz0ŸžzÜz‘Ð{Üz˜}0Ÿ˜}}P}N€‘Ð{N€S€PS€«‘Ð{«‰0Ÿ‰³Š‘Ð{³Š‹\‹iŒ‘Ð{iŒnŒPnŒÁ‘Ð{Á"0Ÿ"&P&1‘Ð{1u\uz‘Ð{zbž0ŸbžžPž…ž]…ž·ž0Ÿ·žžPžÇž]ÇžŸ[ŸŠÏ0ŸŠÏ›ÏT›ÏБÐ{ПÒ0ŸŸÒâÓ‘Ð{âÓDô0ŸDôVôPVôhõ‘Ð{hõ¹0Ÿ¹˜‘Ð{˜ P %‘Ð{%…0Ÿ°°³°P¿øÂøPŸß¢ßP!ÐSÐ0ŸÑHÑ0ŸÒÒPèÒÓ0Ÿ ÔEÔ0Ÿ¦ÕÕÕ0ŸÛÖ×0ŸY؃Ø0Ÿ|ÙµÙ0Ÿ«ÚÕÚ0ŸOÛ‡Û ÿŸ‡ÛîÛ‘À{îÛòÛPòÛzà‘À{Xáåá‘À{Ãâä‘À{ä^å‘À{o彿‘À{Îæè‘À{0è†é‘À{—é®é‘À{óê¥ë‘À{êìí‘À{Eî\î‘À{Ÿï¾ï‘À{ññ‘À{iò{ò‘À{ÔóÙó‘À{?õö‘À{®öM÷‘À{+øKø‘À{¤ùÄù‘À{û4û‘À{„ü ü‘À{§þ¼þ‘À{%P‘À{U®‘À{¿ð‘À{Øõ‘À{õþPþ¸‘À{ /‘À{x‘À{‰¢‘À{¢`  ÿŸ{ ƒ 0Ÿå e0Ÿe1Ÿá31Ÿ(×0Ÿ×1Ÿa²1Ÿ  0Ÿ  Ñ 1Ÿ.&~'1Ÿt+-0Ÿ-F-1Ÿœ.ô/1ŸM5ñ60Ÿñ671Ÿƒ<Ú=1ŸâA‘C0Ÿ‘CÆC1Ÿ!ExF1ŸûK—M0Ÿ—MÁM1ŸBS§T1ŸdZ\0Ÿ\C\1Ÿ§] _1Ÿ0clc0Ÿ‹dÚd0ŸÚde1Ÿ^f¤f1Ÿøø0Ÿø/øS/ø.ù\ùú\úlú\¸úæú\Rû„û\ìûü\†ü¸ü\ýMý\°ýºýS¾«Í«Pûµ ¶P×¹é¹Pzää p $0)ÿŸ°F½F p $0)ÿŸWØWSìW XS›t­tS vvPv%vSƒwšwSïxySYzkzSÏ{Ú{PÚ{ç{S!) p $0)ÿŸX‘1Ÿ]£ˆ£1Ÿ-¼ø½1Ÿ|óËó1ŸÍõåõVö«öP«ö¸öV8÷“÷V·øÜø_éøóøPóøûø_ùªù_ìûü_V’§V$9VÙ s $‘ä}” $.ÿŸ3 K s $‘ä}” $.ÿŸF¬W¬0ŸW¬ç¬Sg²v²Sf½}½S¿¾ѾSÔ*ÔSÞ#Ð)‘à{4*$+‘à{R+O,‘à{},G-‘à{«-q.‘à{Ð.š/‘à{ù/Ë0‘à{*1è1‘à{L2 3‘à{n304‘à{”4š5‘à{È5Ý6‘à{ 78‘à{M8O9‘à{}9=;‘à{k;‘<‘à{¿<¦=‘à{ >(@‘à{V@cA‘à{‘A¦B‘à{ÔB¦C‘à{ DE‘à{4EúE‘à{^FÂG‘à{ÄJÖJSÀÕ†Ö‘à{êÖïÖ‘à{ôÖ ×‘à{:ØüØ‘à{`Ù1Ú‘à{•ÚWÛ‘à{ÃÛÌÜ‘à{j¬w¬0Ÿw¬´¬Vg²v²Vf½½V¿¾û¾V$Y)‘Ø{4*w*‘Ø{R+Ž+‘Ø{},Ð,‘Ø{«-°-‘Ø{Ð.$/‘Ø{ù/Q0‘Ø{*1}1‘Ø{L2Ÿ2‘Ø{n3Å3‘Ø{”45‘Ø{È5H6‘Ø{ 7“7‘Ø{M8Ã8‘Ø{}9´:‘Ø{k;<‘Ø{¿<;=‘Ø{ >§>‘Ø{§>­>‘Ø{”#ŸÂ>¨?‘Ø{V@ã@‘Ø{‘A&B‘Ø{ÔB;C‘Ø{ D}D‘Ø{4EƒE‘Ø{^F9G‘Ø{ÀÕÖ‘Ø{êÖôÖ‘Ø{:ؑؑØ{`ٺّØ{•ÚìÚ‘Ø{ÃÛCÜ‘Ø{°F½F p $0)ÿŸÌ˜ð˜^Ï™â™Pâ™ô™^¢š½š^Ôåmé0Ÿméhê1ŸRïˆï1ŸÑ…1Ÿ±&´&P´&t'‘ø{ù/×0‘ø{*1ô1‘ø{L23‘ø{n3<4‘ø{”4¦5‘ø{È5é6‘ø{ 7+8‘ø{Ù&ß&Pß&'^ù/0^*1<1^L2c2^n3…3^”4´4^È5Ì5PÌ5à5^ý&'P'']Ð.Ý.]ù/0]*1”4]”4˜4P˜4È5] cýk0ŸÓl7p0ŸyyØ{0ŸØ{ä{‘è|[|Ÿ|‘è|ß|—0ŸŒ˜™0Ÿ™™ %Ÿ™tÅ0Ÿyŵå0Ÿ½å-0ŸzþŽ0ŸþŽA UŸA÷–0Ÿ÷–?˜ hŸ?˜;»0ŸK»Ÿ»0ŸŸ»×» JŸ×»Õ0ŸÕí‘ tŸí‘ÇÌ0ŸÇÌÎ mŸÎ{0Ÿ{ð ÓŸð0ŸŒ ÓŸŒF0ŸF¼ ÑŸ¼0Ÿ… Ο cýk0ŸÓl7p0ŸyyØ{0ŸØ{ä{ °‹Ÿ[|Ÿ| °‹Ÿß|—0ŸŒ˜™0Ÿ™™ °‹Ÿ™tÅ0Ÿyŵå0Ÿ½å-0ŸzþŽ0ŸþŽA °‹ŸA÷–0Ÿ÷–?˜ °‹Ÿ?˜;»0ŸK»Ÿ»0ŸŸ»×» °‹Ÿ×»Õ0ŸÕí‘ °‹Ÿí‘ÇÌ0ŸÇÌÎ °‹ŸÎ{0Ÿ{ð °‹Ÿð0ŸŒ °‹ŸŒF0ŸF¼ °‹Ÿ¼0Ÿ… °‹Ÿ cýk0ŸÓl7p0ŸyyØ{0ŸØ{ä{‘øz[|Ÿ|‘øzß|—0ŸŒ˜™0Ÿ™™ ýŸ™tÅ0Ÿyŵå0Ÿ½å-0ŸzþŽ0ŸþŽA %ŸA÷–0Ÿ÷–?˜ ý&Ÿ?˜;»0ŸK»Ÿ»0ŸŸ»×» 6$Ÿ×»Õ0ŸÕí‘ ®'Ÿí‘ÇÌ0ŸÇÌÎ ‹'ŸÎ{0Ÿ{ð ¹,Ÿð0ŸŒ µ,ŸŒF0ŸF¼ —,Ÿ¼0Ÿ… a,ŸcYc0Ÿèl[m0Ÿn'n0ŸcYc1Ÿèl[m1Ÿn'n1ŸcPcTPcYcwèlùlTùl7mw7m[mTn'nT5cBcPBcPct#hPcUcw##hn'n1Ÿn'nY7m[m1ŸOm[mYèl7m0Ÿèl7m1Ÿèl7mwmmPm7mSm7mwm,mP,m7m]bc©c0Ÿ[m¤m0Ÿßmn0Ÿ?n_n0ŸT¡ì¢0Ÿbc©c1Ÿ[m¤m1Ÿßmn1Ÿ?n_n1ŸT¡ì¢1Ÿbc©cw[m¤mwßmúmw?nWnwT¡*¢wˆc•cP•c¥cw##h?n_n0ŸSn_nXßmn0ŸömnX[m¤m0ŸT¡ì¢0Ÿ[m¤m1ŸT¡ì¢1Ÿ[m¤mwT¡*¢wmm~mP~m¤mST¡ì¢Pmm¤mwT¡*¢wm™mP™m¤m^%dqd0Ÿ¯iÎi0Ÿ_n«n0Ÿyy¢y0Ÿ%dqd1Ÿ¯iÎi1Ÿ_n«n1Ÿyy¢y1Ÿ%dqd‘øz¯iÉi‘øz_n«n‘øzyyy‘øzLdYdPYdmd ‘øz##h¯iÎi1ŸÄiÎiVyy¢y1Ÿ˜y¢yV_n«n0Ÿ_n«n1Ÿ_n«n‘øzpn‚nP‚n«n\pn«n‘øzƒn nP n«nVzdÃd0Ÿ¢yðy0ŸzCz0Ÿ‚~¨~0ŸÛªíª0ŸzdÃd1Ÿ¢yðy1ŸzCz1Ÿ‚~¨~1ŸÛªíª1ŸzdÃd‘øz¢yðy‘øzz;z‘øz‚~ ~‘øz۪誑øz¡d®dP®d¿d ‘øz##h‚~¨~0Ÿœ~¨~XzCz0Ÿ7zCzX¢yðy0ŸÛªíª0Ÿ¢yðy1ŸÛªíª1Ÿ¢yðy‘øz۪誑øzµyÇyPÇyðy\ÛªíªPµyðy‘øz۪誑øzÈyåyPåyðy^ùefSœ֓SffPœϓPϓ֓]rf¦f‘Ø~Ÿ¦f²fU²f³f‘Ø~Ÿ¬“Å“‘Ø~Ÿ`•q•‘Ø~Ÿ­˜™ '&Ÿ­˜™0Ÿ­˜™‘ð{­˜™1Ÿ­˜™LŸ­˜™‘Ø~ŸºgÆgUš¦UÍgìgS™(™SâgìgP™'™P'™(™^[h•h\P•`•\Õž Ÿ\ÊhiSSì¢÷¢S÷¢0¤QÒhi\\ì¢2£\¼jÚjPééP;jŸj]O€o€]ßã]Üö]fjkjPkjŒj^Üë^fjŒj\Üë\fj¥j\_€o€\Üþ\þ4’]kj‡jP‡jŒjpŸÜêP{T­TQ'ŽnŽQ²ŽÅŽQÅŽÒŽ‘ø|#ZŽnŽQÉŽÕŽ3Ÿ2UMU‘À{2U!| ÿŸh|b‰ ÿŸ2U!|0Ÿh|b‰0ŸSUnU‘Ø{SU!| ÿŸh|ò‡ ÿŸSU!|0Ÿh|ò‡0ŸtU”U‘ |tU!| ÿŸh|†† ÿŸtU!|0Ÿh|††0ŸFhXhq‘À|Oš\·Ç\ÝVW_Ã{Ï{_ñVWSÃ{Ï{SWÃ{ ÿŸWÃ{0ŸÄWìW\v v\ØWìWSv vS*Y=Y‘À{*YCi ÿŸ*YCi0ŸCYVY‘Ø{CYÝg ÿŸCYÝg0Ÿ\YoY‘ |\Y{f ÿŸ\Y{f0Ÿ¦Y¯c ÿŸ¦Y¯c0ŸRÄRSFTNTSžS¤R¾R3ŸÝ3Ÿ¤R¾R‘˜{Ý‘˜{¤R¾R‘ø|Ý‘ø|¶R¾RP”Pzšèš\ø°±\ಳ\ÿ»f½\œšèš0Ÿà²5´0Ÿÿ»f½0Ÿœšèš\à²5´\ÿ»f½\¬šèš]à²÷²]ÿ»¼]њؚPØšèš^ÿ»f½^ šèšSà²ü²Sÿ»¼Sø°±\0¤E¦‘Ø|íª«‘Ø|v²²T²à²‘Ø|b´Œ´‘Ø|À"Á‘Ø|XÁ“Á‘Ø|½ÂøÂ‘Ø|ÄJÄ‘Ø|ìÊ'Ë‘Ø|xü­ü‘Ø|%G‘Ø|ðG+H‘Ø|p¤E¦‘à|íª«‘à|…²޲T޲಑à|b´Œ´‘à|XÁ‡Â‘à|½ÂÙÑà|Ä>Å‘à|ìÊÌ‘à|xü°ý‘à|%^‘à|ðGI‘à|¨¤Y¥‘¨{”²²T²²²‘¨{b´Œ´‘¨{XÁÊÁ‘¨{ìÊ^Ë‘¨{xüäü‘¨{ ¥F¥_£²²²_xüßü_ßüæý^¥F¥^£²²²^xü¥ü^Ò-ÒPRIYIP¯¦ã¦ ÿŸã¦ñ¦0Ÿñ¦§1Ÿ§8§2Ÿ% ÿŸû|2ŸLML2ŸML¬L\¬LµLQNcN\oOO\O¸O1Ÿ¸OÝO0Ÿ§&§3ŸL*L3Ÿ§%§PL$LP©LµLQ«g«\ÎÐgÑ\õýþ\«a«QÎÐ3ÑQõýþQþþ|Ñ3ÑQ þþ3ŸÓåæåXâðXðû‘¸{Ûå#æVz¡VâûVîãäPÃÊP±ÚçÚ ÿŸçÚöÚ0ŸöÚÛ1ŸÛ@Û2ŸW2Ÿ\ŠQã1Ÿ‘ ÿŸ‘»0Ÿ»\ Û.Û3ŸÔæ3Ÿ Û-ÛPÔàPsŠQÞfÞTßFßTFß»à\BðVðT_‘Å’TÅ’4”\"ÞfÞQß^ßQBðVðQ_‘Ê’QÊ’×’|Jß^ßQÎ’4”3Ÿ²ÛºÛ ‘¸|”"ŸºÛÓÛ_²ÛÞ ÿŸôÞß ÿŸÞëPí ÿŸVðxü ÿŸBÍ ÿŸ²ÛÞ0ŸôÞß0ŸÞëPí0ŸVðxü0ŸBÍ0ŸÙÛàÛ ‘È|”s"ŸàÛùÛSÙÛÞ ÿŸôÞß ÿŸVðxü ÿŸBÍ ÿŸÙÛÞ0ŸôÞß0ŸVðxü0ŸBÍ0ŸÿÛÜ ‘Ð|”|"ŸÜ Ü\ÿÛÞ ÿŸôÞß ÿŸVðòõ ÿŸ`÷xü ÿŸBÍ ÿŸÿÛÞ0ŸôÞß0ŸVðòõ0Ÿ`÷xü0ŸBÍ0Ÿ*ù_ù\_ùmù]`i\i£_£¾X¾Í\3ù\ù]`†]¾Í]ø,øTÛúçúTçúìú‘¸{ø,øSÛúìúS>øQø‘Ø|>øáø ÿŸB` ÿŸ>øáø0ŸB`0ŸWøjø‘à|Wøáø ÿŸ±` ÿŸWøáø0Ÿ±`0Ÿpø}ø‘Ð}pøáø ÿŸ±  ÿŸ‹ ` ÿŸpøáø0Ÿ± 0Ÿ‹ `0ŸªŠ‹\‹‹‘Ð{1u\uz‘Ð{³Š¶ŠP¶ŠÕŠTÕŠ‹‘Ð{1>‘Ð{ ƒAƒQAƒLƒ‘¸{(ƒ}ƒSî„…SwÖw_=|‘|_‘|˜}]˜wÇwV=|O|VMp”p_>s^s_UpƒpS>sFsSŸdüd\üde‘Ð{^f¤f\¨d«dP«dÊdQÊdõd‘Ð{^f{f‘Ð{Ù[ú[Qú[\‘¸{á[6\S§]º]SiMÁMSBSXSSXSŽS_ŽS§T\qM´M\BSyS\HCÆC_!E[E_[ExF‘Ø{PCSCPSCwCTwC¸C‘Ø{!E;E‘Ø{·67_ƒ<Ó<_Ó<Ú=‘À{¿6Â6PÂ6á6Tá67‘À{ƒ<<‘À{Ý,F-Sœ.·.S·.ä._ä.ô/\å,<-\œ.Ó.\t Ñ S.&A&SA&e&_e&~'[| À _Ä Ñ S.&6&_ŽSa|S|”_”²‘À{–™P™½Q½þ‘À{a‘À{L…_…Vá_3]T~VáöV(DPPÜCÜ ÿŸCÜQÜ0ŸQÜbÜ1ŸbÜŸÜ2ŸûÀü2ŸÀüEý\EýNýQ§þÖþ1ŸÖþ"ÿ\%U0ŸU¿ ÿŸx܆Ü3Ÿ„ü–ü3ŸxÜ…ÜP„üüP7ýNýQ¿S<S<Ø‘Ð{N‘Ð{ÃÿQ„QN³Q³Ã‘Ð{#m„Q·3Ÿ%Ý@Ý‘È{%Ý½ß ÿŸ×ß?õ ÿŸ%ݽß0Ÿ×ß?õ0ŸFÝ_Ý]FÝ½ß ÿŸ×ßÔó ÿŸFݽß0Ÿ×ßÔó0ŸeÝ~ÝSeÝ½ß ÿŸ×ßiò ÿŸeݽß0Ÿ×ßiò0Ÿë/ëX/ë8ë‘À|ëeë\ƒëºë\ÊÞóÞS×ßäßSßÞóÞ\×ßäß\ß½ß ÿŸXá0è ÿŸß½ß0ŸXá0è0Ÿ4ßGß‘°|4ß½ß ÿŸXáÎæ ÿŸ4ß½ß0ŸXáÎæ0ŸMßeß‘¸|Mß½ß ÿŸXáoå ÿŸMß½ß0ŸXáoå0ŸMäz䑈{ÜàUàᑈ{fäzäPÜàP·£ĦSĦö§‘ø|ö§”¨S”¨ì©‘ø|쩪Sª^«‘ø|^«z«Sz«´«‘ø|´«å«S嫬‘ø|¬D¬SD¬m­‘ø|m­Ÿ­SŸ­Ю‘ø|Юò®Sò®,°‘ø|,°N°SN°Œ±‘ø|Œ±®±S®±õ²‘ø|õ²³S³a´‘ø|a´ƒ´Sƒ´Öµ‘ø|ÖµøµSøµH·‘ø|H·u·Su·¯·‘ø|¯·Ú·SÚ·5¹‘ø|5¹`¹S`¹¸º‘ø|¸ºʺSʺ;»‘ø|K»n»‘ø|»£å£Q¸º»QK»^»Q^»k»‘ø|#b»n»3Ÿóº»Ql¤|¤‘À{l¤Öµ ÿŸl¤Öµ0Ÿ‚¤—¤‘ |‚¤a´ ÿŸ‚¤a´0Ÿ¤°¤‘¨|¤õ² ÿŸ¤õ²0Ÿ ¨,¨Q,¨5¨‘°|¨c¨V¬I¬Vÿ¥'¦_´«À«_¦'¦V´«À«V]£Í£V¸ºϺVn»Ž»V×»î»V-¼D¼Vs£ˆ£3Ÿ-¼ƒ¼3Ÿs£ˆ£‘˜{-¼ƒ¼‘˜{s£ˆ£S-¼I¼SI¼ƒ¼‘ø|€£ˆ£P-¼2¼P‚qÓqRÓq6r‘€{_xx‘€{OyyyR†qÓqQÓq6r‘ˆ{_xx‘ˆ{OyyyQŠq6r^_xx^Oyyy^kq¢qò( kq¢qò kq¢qò ~q¢qP¢qÅq‘Ø~ŸÅqÓqUÓqÔq‘Ø~Ÿayyy‘Ø~ŸÔq6r^_xx^Oyay^Ôq6r‘ˆ{_xfxQfxx‘ˆ{OyayQÔq6r‘€{_xfxRfxx‘€{OyayRìqrU_xfxUOyTypÈðq6r]_xx]Oyay0Ÿôq6r\_xx\Oyay0ŸèqrP_xdxPOyayP‘«¾«‘ˆ{ìµúµTúµûµ‘ˆ{ «¾«pÿŸìµúµpÿŸÖ«ó«T󫸭‘¨{g²v²‘¨{f½º¾‘¨{¿¾À‘¨{õÇÈTÈÈ‘¨{ÔbÕ‘¨{ÙÖ,Ø‘¨{1ØsÙ‘¨{ÄJL‘¨{öO,Q‘¨{1QgR‘¨{lRƒR‘¨{*ÉcÊ‘¨{hʻˑ¨{;­?­U?­H­‘€} Å+ÅPÚÇáÇPI®{® ÿŸ{®Š®0ŸŠ®œ®1Ÿœ®Û®2Ÿ '2Ÿ'»^Êì1Ÿì"^"@0Ÿ@  ÿŸHš­›2Ÿ´®®3Ÿ››­›3Ÿ´®Á®P››§›PU»^ Ü _Ã9Ã_9ùđ°{?ÅÚÇ‘°{“ Ö QÃyÃQ?ÅÆQƚƑ°{#eÃyÃQ‘ÆÚÇ3ŸV¯t¯‘˜}V¯t¯‘°{m¯t¯P𝫝‘˜}𝫝V¤¯«¯P믰‘˜}믰]þ¯°PE°U°‘°{E°ã° ÿŸ­›М ÿŸùœŸ ÿŸÚ ]£ ÿŸE°ã°0Ÿ­›М0ŸùœŸ0ŸÚ ]£0Ÿ[°i°V[°ã° ÿŸ­›М ÿŸùœDž ÿŸÚ ]£ ÿŸ[°ã°0Ÿ­›М0ŸùœDž0ŸÚ ]£0Ÿo°}°]o°ã° ÿŸ­›М ÿŸÚ ]£ ÿŸo°ã°0Ÿ­›М0ŸÚ ]£0Ÿÿ¹» ÿŸ+þ; ÿŸcà ÿŸÿ¹»0Ÿ+þ;0ŸcÃ0ŸÂ»ÿ»‘Ø~Ÿ#þ+þ‘Ø~Ÿ‘Ø~Ÿ!!U!!‘€}½!À! v- $ &ŸÀ!Ä!UÄ!Ë! v- $ &Ÿ½!ðG ÿŸz… ÿŸ½!ðG0Ÿz…0Ÿ”ÏFÐV„ÑÏÑVÏÑŸÒ‘°{ŸÒèÒVèÒâÓ‘°{ ÏÂÏTÂÏ"Б°{„ÑŽÑ‘°{ŸÒ©Ò‘°{s"Ú"‘Ø~Ÿó"$#SŽ#Þ#V ×B×VÁ#Þ#S|$M%S„FåFS:Ø^ØS•Ú¹ÚSÃÛïÛSð$ª%] DðG]ÃÛúÜ]%6%‘À|ÃÛÇÛUÇÛÈÛ‘À|"%6%PÃÛÇÛPz>’>PÔBÛBP&C& ÿŸC&R&0ŸR&d&1Ÿd&¢&2ŸM8¹92Ÿ¹9z:Vk;š;1Ÿš;§;V¿<è<0Ÿè< > ÿŸ|&Š&3Ÿ}993Ÿ|&‰&P}9‰9P :z:V >_>\Â>ä>\ä>V@‘°{}@ÔB‘°{>Y>QÂ>8?Q}@¤AQ¤A¶A‘°{#$?8?Q­AÔB3Ÿ,'?'‘ø{,'n3 ÿŸ,'n30ŸE'S'^E'L2 ÿŸE'L20ŸY'a']Y'*1 ÿŸY'*10Ÿt''0Ÿt'ù/ ÿŸt'ù/0ŸÛ()‘Ð|„F°F‘È|½FÁFUÁFÂF‘È| F°FP½FÁFPÜ’ê’Sõ’“Sxã•ãPÃäÊäPš”Í” ÿŸÍ”Þ”0ŸÞ” •1ŸÇÈ1ŸÈÎÈV(É]É0Ÿ1íèí ÿŸèíóíVø”•2ŸÎÇàÇ2Ÿø”•PÎÇÚÇPRÈÎÈVóëEì^nì®ì^®ì1í]‰îÆî]÷ë?ìQnìèìQ‰î³îQ³îÀî}ÔìèìQ·îÆî2Ÿ •É•VÄÄVaÅkÅV&Æ0ÆVGÆQÆV6•Å•SÄÄSaÅsÅS&ÆBÆSGÆYÆS^•±•]aÅ.Æ]èÃÄPˆÄÄPü•K–\ð¿+À\|À¸À\pŸÂ\DÃuÃ\–+–3ŸDÃÉÃ3Ÿ–+–‘è{DÃÉÃ]–+–_DÃÃ_ÃÉÃQ#–+–PDÃGÃPk–~–‘è{„–’–‘è{¹-¹Pô¹û¹P±—ô— ÿŸô—˜0Ÿ˜]˜1Ÿž³Í´1ŸÍ´¸µ]¶I¶0ŸI¶–¶]–¶W· ÿŸ5˜C˜2Ÿ„´–´2Ÿ5˜B˜P„´´P2µFµQFµ”µ]W·œ·RÊ·(¸R(¸å¸‘Ø{˜»M¼RM¼ç¼‘Ø{[·x·Qx·„·rÊ·Í·QÍ·Û·rÛ·K¸Q˜»@¼Q@¼M¼r7¸K¸QD¼ç¼2Ÿ]˜¸˜^õ˜™^r˜è˜_õ˜=™_º™ š_¢š%›_ݲ³_£˜­˜P­˜̘Rº™É™Rəϙ‘ø{¸˜̘^º™Ï™^žž ‘ø|”‘ø}”"ŸžL¡ ÿŸÎ«9¯ ÿŸ_¯D° ÿŸžL¡0ŸÎ«9¯0Ÿ_¯D°0Ÿž.ž ‘ø{”‘à}”"Ÿžn  ÿŸÎ«9¯ ÿŸ_¯D° ÿŸžn 0ŸÎ«9¯0Ÿ_¯D°0Ÿ4ž>ž ‘ä}”v"Ÿ>žEžUEžLž ‘ä}”v"Ÿ4žŸ ÿŸÎ«9¯ ÿŸ_¯D° ÿŸ4žŸ0ŸÎ«9¯0Ÿ_¯D°0Ÿsž²ž^§¬Ǭ^­V­^&®;®^_¯t¯^…žž3Ÿ&® ¯3Ÿ…žž‘°|&® ¯‘°|…žž]&®6®]6®C®[C® ¯0Ÿ•žžP&®.®P­­3Ÿ_¯D°3Ÿ­­‘€}_¯D°‘€}­­]_¯o¯]o¯|¯[|¯D°0Ÿ­­P_¯g¯P?›M›UÍãÑãUÑãÝã‘°|Rï½ï]^V]hïˆï3ŸÑV3Ÿhïˆï‘€}ÑV‘€}hïˆï‘ø|ÑñSñV‘ø|€ïˆïPÑÔPŸïÒïQ^ªQ¼GQGSszªQ4É3Ÿfð‡ð‘˜}fð‡ð‘¸{€ð‡ðP­ðÈð‘˜}­ðÈð‘Ø}ÁðÈðP ñ+ñ‘˜} ñ+ñ‘à}$ñ+ñPNóËóVµ Ù V-aV/ôDô‘¸{/ô% ÿŸ/ô%0ŸJô_ô‘Ø}Jô˜ ÿŸJô˜0Ÿeôxô‘à}eô ÿŸeô0ŸôôU?hRhy‘˜~G¶\ªÒ\¥õÍõS‘ööS¹õÍõV‘ööVN÷a÷‘¸{N÷$ ÿŸN÷$0Ÿg÷z÷‘Ø}g÷’ ÿŸg÷’0Ÿ€÷“÷‘à}€÷ ÿŸ€÷0Ÿ/øEøU’ø·ø]Üøéø]§ø·ø_Üøéø_ëõ‘¸{ë#  ÿŸ3 µ  ÿŸ[ « ÿŸë# 0Ÿ3 µ 0Ÿ[ «0Ÿ‘Ø}#  ÿŸ3 µ  ÿŸ[ & ÿŸ# 0Ÿ3 µ 0Ÿ[ &0Ÿ/‘à}#  ÿŸ3 µ  ÿŸ[ ¡ ÿŸ# 0Ÿ3 µ 0Ÿ[ ¡0Ÿ5H‘ä}5#  ÿŸ3 µ  ÿŸ[  ÿŸ5# 0Ÿ3 µ 0Ÿ[ 0ŸùåæSùåüè ÿŸùåüè0ŸÄUÄ3óUŸPTPoVoùóTŸù_V_ŸóTŸŸ:T:)V)}óTŸ}V!óTŸ!!V!!óTŸ!#!V#!*!óTŸ*!E!VE!S!óTŸS![!V[!`!óTŸ`!u!Vu!è!óTŸè!e"Ve"ñ#óTŸñ#0$V0$¦%óTŸ¦%ö%Vö%Å&óTŸÅ&Œ'VŒ'(óTŸ(Ÿ)VŸ)¨)óTŸ¨)î)Vî)÷)óTŸ÷)*V**óTŸ*c*Vc*û2óTŸû23TPQPùóQŸù\ŸóQŸŸ¼Q¼ä\äè!óQŸè!e"\e"¦%óQŸ¦%ö%\ö%Å&óQŸÅ&“'\“'(óQŸ(Q)\Q)Z)óQŸZ)Ÿ)\Ÿ)¨)óQŸ¨)î)\î)*óQŸ*c*\c*û2óQŸû23QÁP0ŸPx‘Ð~ù_0ŸŸý0Ÿý)‘Ð~}‡‘Ð~!ƒ!‘Ð~è!e"0Ÿñ#%$‘Ð~¦%ö%0ŸÅ&˜'0Ÿ(Q)0ŸQ)U)‘Ð~Z)Ÿ)0Ÿ¨)î)0Ÿ÷) *‘Ð~*c*0Ÿû230ŸÁP0ŸPx‘Ø~ù_0ŸŸý0Ÿý)‘Ø~}‡‘Ø~!ƒ!‘Ø~è!e"0Ÿñ#%$‘Ø~¦%ö%0ŸÅ&˜'0Ÿ(Q)0ŸQ)U)‘Ø~Z)Ÿ)0Ÿ¨)î)0Ÿ÷) *‘Ø~*c*0Ÿû230ŸÁP0ŸPx‘à~ù_0ŸŸý0Ÿý)‘à~}‡‘à~!ƒ!‘à~è!e"0Ÿñ#%$‘à~¦%ö%0ŸÅ&˜'0Ÿ(Q)0ŸQ)U)‘à~Z)Ÿ)0Ÿ¨)î)0Ÿ÷) *‘à~*c*0Ÿû230ŸÁP0ŸPx‘è~ù_0ŸŸý0Ÿý)‘è~}‡‘è~!ƒ!‘è~è!e"0Ÿñ#%$‘è~¦%ö%0ŸÅ&˜'0Ÿ(Q)0ŸQ)U)‘è~Z)Ÿ)0Ÿ¨)î)0Ÿ÷) *‘è~*c*0Ÿû230ŸÁP0ŸPx‘ð~ù_0ŸŸý0Ÿý)‘ð~}‡‘ð~!ƒ!‘ð~è!e"0Ÿñ#%$‘ð~¦%ö%0ŸÅ&˜'0Ÿ(Q)0ŸQ)U)‘ð~Z)Ÿ)0Ÿ¨)î)0Ÿ÷) *‘ð~*c*0Ÿû230ŸÁ‹0Ÿ‹´Zù_0Ÿ8Z8`wŸÈ0ŸÈàZ!ƒ!0Ÿƒ!è!Zè!e"0Ÿñ#Ž$0ŸŽ$¿$Z¿$ï$w¦%ö%0ŸÅ&˜'0Ÿ(Ÿ)0ŸŸ)¨)Z¨)î)0Ÿ÷)c*0Ÿl*Š*wº*Ó*ZÓ*ç*wç*+0Ÿä,ä-0Ÿµ1Ì10Ÿû230Ÿ¡ÙPÙ‘¨~Áj0Ÿj´U´¸‘¨ù{ 0Ÿ¤ Õ UÕ Û ‘¨ã !U!á/0Ÿæ/00Ÿ0Q0UQ030ŸÁÆ0ŸùX0ŸX~ Ÿ~0Ÿ ŸY"0ŸY"e" Ÿe"é%0Ÿé%ö% Ÿö%þ&0Ÿþ& ' Ÿ 'E'0ŸE'R' ŸR'‹'0Ÿ‹'˜' Ÿ˜'¸(0Ÿ¸(Æ( ŸÆ(ÿ(0Ÿÿ( ) Ÿ )E)0ŸE)Q) ŸQ)“)0Ÿ“)Ÿ) ŸŸ)á)0Ÿá)î) Ÿî)U*0ŸU*c* Ÿc*á/0Ÿæ/30ŸÁÆ0ŸùX0ŸX~ °‹Ÿ~0Ÿ °‹ŸY"0ŸY"e" °‹Ÿe"é%0Ÿé%ö% °‹Ÿö%þ&0Ÿþ& ' °‹Ÿ 'E'0ŸE'R' °‹ŸR'‹'0Ÿ‹'˜' °‹Ÿ˜'¸(0Ÿ¸(Æ( °‹ŸÆ(ÿ(0Ÿÿ( ) °‹Ÿ )E)0ŸE)Q) °‹ŸQ)“)0Ÿ“)Ÿ) °‹ŸŸ)á)0Ÿá)î) °‹Ÿî)U*0ŸU*c* °‹Ÿc*á/0Ÿæ/30ŸÁÆ0ŸùX0ŸX_ I/Ÿ_vT~0Ÿ D/ŸY"0ŸY"e" $/Ÿe"é%0Ÿé%ö% /Ÿö%þ&0Ÿþ& ' /Ÿ 'E'0ŸE'R' /ŸR'‹'0Ÿ‹'˜' /Ÿ˜'¸(0Ÿ¸(Æ( /ŸÆ(ÿ(0Ÿÿ( ) /Ÿ )E)0ŸE)Q) /ŸQ)“)0Ÿ“)Ÿ) ü.ŸŸ)á)0Ÿá)î) ÷.Ÿî)U*0ŸU*c* ò.Ÿc*á/0Ÿæ/30Ÿù^~ŸBOPOî^è!e"^¦%ö%^Å&˜'^(Á(^Æ(Q)^Z)Ÿ)^¨)î)^*c*^ù]¤é]è!e"]¦%ö%]Å&˜'](º(]Æ(Q)]Z)Ÿ)]¨)î)]*c*]û23] "Y";Ÿ "Y"<Ÿ "Y"1Ÿ "Y" °”Ÿ "e"<Ÿ "Y" 3}Ÿ¦%é%:Ÿ¦%é%<Ÿ¦%é%1Ÿ¦%é% °”Ÿ¦%ö%<Ÿ¦%é% 3}ŸÅ&þ&9ŸÅ&þ&<ŸÅ&þ&1ŸÅ&þ& °”ŸÅ& '<ŸÅ&þ& 3}Ÿ 'E'8Ÿ 'E'<Ÿ 'E'1Ÿ 'E' °”Ÿ 'R'<Ÿ 'E' 3}ŸR'‹'7ŸR'‹'<ŸR'‹'1ŸR'‹' °”ŸR'˜'<ŸR'‹' 3}Ÿ(¸(6Ÿ(¸(<Ÿ(¸(1Ÿ(¸( °”Ÿ(Æ(<Ÿ(¸( 3}ŸÆ(ÿ(5ŸÆ(ÿ(<ŸÆ(ÿ(1ŸÆ(ÿ( °”ŸÆ( )<ŸÆ(ÿ( 3}Ÿ )E)4Ÿ )E)<Ÿ )E)1Ÿ )E) °”Ÿ )Q)<Ÿ )E) 3}ŸZ)“)3ŸZ)“)<ŸZ)“)1ŸZ)“) °”ŸZ)Ÿ)<ŸZ)“) 3}Ÿ¨)á)2Ÿ¨)á)<Ÿ¨)á)1Ÿ¨)á) °”Ÿ¨)î)<Ÿ¨)á) 3}Ÿ*U*1Ÿ*U*<Ÿ*U* °”Ÿ*c*<Ÿ*U* 3}ŸPx‘ø~ý)‘ø~}‡‘ø~!ƒ!‘ø~ñ#%$‘ø~Q)U)‘ø~÷) *‘ø~PÆ ÿŸ~Ÿ ÿŸýè! ÿŸe"¦% ÿŸö%Å& ÿŸ˜'( ÿŸQ)Z) ÿŸŸ)¨) ÿŸî)* ÿŸc*á/ ÿŸæ/û2 ÿŸPÆ0Ÿ~Ÿ0Ÿýè!0Ÿe"¦%0Ÿö%Å&0Ÿ˜'(0ŸQ)Z)0ŸŸ)¨)0Ÿî)*0Ÿc*á/0Ÿæ/û20ŸjxP )‘ø~#Ÿ}‡‘ø~#Ÿ!ƒ!‘ø~#Ÿ#!%!vŸ%!*!V@!S!PS!`!rp!ƒ!Pˆ P–¦0Ÿñ#%$‘ø~Q)U)‘ø~÷) *‘ø~$%$P÷) *P)GQñ#$0Ÿ$0$ š|Ÿ0$Q$QQ)Z)0Ÿ÷)*0Ÿ** ž|Ÿ)0P0>R>YVñ#0$0Ÿ0$Q$PQ)Z)0Ÿ÷)*0Ÿ**PQ$u$Rä,ï,Rï,-wF-Ê-Rµ1À1RÀ1Ì1wQ$Ž$ ÿŸä,ä- ÿŸµ1Ì1 ÿŸQ$Ž$0Ÿä,ä-0Ÿµ1Ì10Ÿg$u$Pä,ï,rŸï,-w#ŸQ-ä-rŸð,-P--0Ÿo-t-r”Ÿt-y-VŒ-Ÿ-PŸ-§-r·-Ê-P‹´R8RÈàRƒ!è!RŽ$¿$RŸ)¨)Rº*Ó*R‹Æ ÿŸ~Ÿ ÿŸÈ! ÿŸƒ!è! ÿŸe"ñ# ÿŸŽ$¦% ÿŸö%Å& ÿŸ˜'( ÿŸŸ)¨) ÿŸî)÷) ÿŸc*ç* ÿŸ+ä, ÿŸä-á/ ÿŸæ/µ1 ÿŸÌ1û2 ÿŸ‹Æ0Ÿ~Ÿ0ŸÈ!0Ÿƒ!è!0Ÿe"ñ#0ŸŽ$¦%0Ÿö%Å&0Ÿ˜'(0ŸŸ)¨)0Ÿî)÷)0Ÿc*ç*0Ÿ+ä,0Ÿä-á/0Ÿæ/µ10ŸÌ1û20Ÿ¥´P8rŸÈàrŸƒ!è!rŸ›!¯!P¿!Ó!PÓ!Ü!rà!ã!yŸã!è!Y9PPL`0ŸŽ$¿$RŸ)¨)Rº*Ó*R$¿$Pº*Ó*PŽ$»$0Ÿ»$Î$ š|ŸÎ$ï$QŸ)¨)0Ÿl*“*Qº*Ï*0ŸÏ*ç* ž|ŸŽ$Î$0ŸÎ$ï$PŸ)¨)0Ÿl*s*Ps**R*“*Y“*º*‘¨~º*Þ*0ŸÞ*ç*Pï$%Rä-?.Rz.›.R¶.¿.RÀ0Ð0RÐ0ü0w"121R21D1wï$?% ÿŸä-¿. ÿŸÀ0D1 ÿŸï$?%0Ÿä-¿.0ŸÀ0D10Ÿ%%Pï-?.rŸz.¿.rŸÀ0Ð0rŸÐ0ü0w#Ÿ..r”Ÿ..Y0.?.PŠ.›.P¶.¿.rÑ0í0Pé0"10ŸÃìRàðRe"ý"Rö%,&Rî)÷)Rm+‹+RÃÆ ÿŸ~ ÿŸà! ÿŸe"ñ# ÿŸI%¦% ÿŸö%Å& ÿŸ˜'( ÿŸî)÷) ÿŸc*l* ÿŸ+¤+ ÿŸÙ+ä, ÿŸ¿.á/ ÿŸæ/À0 ÿŸD1µ1 ÿŸÌ1û2 ÿŸÃÆ0Ÿ~0Ÿà!0Ÿe"ñ#0ŸI%¦%0Ÿö%Å&0Ÿ˜'(0Ÿî)÷)0Ÿc*l*0Ÿ+¤+0ŸÙ+ä,0Ÿ¿.á/0Ÿæ/À00ŸD1µ10ŸÌ1û20ŸÝìPàðrŸs"ý"rŸñ P " 0Ÿ¡"¤"{Ÿ¤"©"[¼"Ð"PÐ"Ù"ré"ý"Pö%,&Rî)÷)Rm+‹+R&,&Pm+‹+Pö%(&0Ÿ(&@& š|Ÿ@&a&Qî)÷)0Ÿ+<+Qm+‡+0Ÿ‡+¤+ ž|Ÿö%@&0Ÿ@&a&Pî)÷)0Ÿ++P+%+R%+<+[<+m+‘°~m+–+0Ÿ–+¤+Pa&†&Rü.W/Rœ/Æ/RD1Y1RY1Š1wÏ2ä2Rä2û2wa&»& ÿŸü.á/ ÿŸD1µ1 ÿŸÏ2û2 ÿŸa&»&0Ÿü.á/0ŸD1µ10ŸÏ2û20Ÿw&†&P/W/rŸœ/á/rŸD1Y1rŸY1Š1w#Ÿ)/0/r”Ÿ0/5/[H/W/Pœ/¥/rµ/Æ/PZ1{1Pw1µ10ŸûR#‘˜ý"T#RT#_#‘˜Æ#á#Rá#ñ#‘˜I%^%R¢'Þ'Rc*l*R\,€,RûÆ ÿŸ~ ÿŸ{ ! ÿŸý"ñ# ÿŸI%¦% ÿŸ˜'( ÿŸc*l* ÿŸÙ+ , ÿŸ¿.ü. ÿŸæ/À0 ÿŸÌ1Ï2 ÿŸûÆ0Ÿ~0Ÿ{ !0Ÿý"ñ#0ŸI%¦%0Ÿ˜'(0Ÿc*l*0ŸÙ+ ,0Ÿ¿.ü.0Ÿæ/À00ŸÌ1Ï20Ÿ#P #T#rŸT#_#‘˜#ŸÆ#á#rŸá#ñ#‘˜#ŸI%^%rŸ7#9#qŸ9#>#QQ#_#PÆ#Î#rÞ#ñ#P_%%P{%¦%0Ÿ¢'Þ'Rc*l*R\,€,R±'Þ'P\,€,P¢'Ú'0ŸÚ'ù' š|Ÿù'(Qc*l*0ŸÙ+,Q\,|,0Ÿ|, , ž|Ÿ¢'ù'0Ÿù'(wc*l*0ŸÙ+à+Pà+î+Rî+\,w\,Œ,0ŸŒ, ,P(B(Ræ/0RQ0r0RÌ12R252R52j2wš2´2R´2Ï2w(( ÿŸæ/0 ÿŸQ0À0 ÿŸÌ1Ï2 ÿŸ((0Ÿæ/00ŸQ0À00ŸÌ1Ï20Ÿ4(B(Pñ/0rŸQ0r0rŸÌ152rŸ52j2w#Ÿd0r0PÌ1Ñ1r”ŸÑ1Ö1QÖ1Þ1rî12P62[2PW2š20Ÿ4_U~›U>_pÿŸ~›pÿŸj€1Ÿ¤ Ä 1Ÿ0201Ÿj€ c}Ÿ¤ Ä  c}Ÿ020 c}Ÿµ Ä  c}Ÿ€™1Ÿã !1Ÿ20Q01Ÿ€™ Ò}Ÿã ! Ò}Ÿ20Q0 Ò}Ÿõ ! Ò}Ÿ™ÆóUŸ{ ¤ óUŸ™´U´¸‘~™±T±¸‘ˆ~™®Q®¸‘€~™¸[™«Y«¸‘ð}™ÆV{ ¤ V™Æ0Ÿ{ ¤ 0Ÿ™¹0Ÿ¹ÆP{ œ P™Æ0Ÿ{ ¤  Ÿ™Æ0Ÿ{ ¤  °‹Ÿ™Æ0Ÿ{ ¤  e/Ÿ3vX<ŸX1ŸX °”Ÿ_<ŸX 3}Ÿ3Ÿ3UŸ3À<óUŸÀ<=U=KóUŸK!KU3Ÿ3TŸ3³3S³3Ö:óTŸÖ:G;SG;À<óTŸÀ<þ=Sþ=ÉFóTŸÉFùFSùFã>‘ÉFùF0Ÿã>‘˜ÉFùF0Ÿã>‘ ÉFùF0Ÿã>‘¨ÉFùF0Ÿã>‘°ÉFùF0Ÿä>1ŸÑIðI1ŸŸ3¼3 c}Ÿ¯>ä> c}ŸÑIðI c}ŸŸ3¼3‘¯>ã>‘ÑIðI‘½>ã>‘½>ä> c}Ÿ¼3Ö:óUŸ‡;À<óUŸþ=¯>óUŸë>ÉFóUŸùF0Ÿë>ÉF0ŸùF0Ÿë>ÃA0ŸËAÉF0ŸùF0Ÿë>ÉF0ŸùF0Ÿë>ÉF0ŸùF0Ÿë>ÉF0ŸùF77‘à~ŸC±C‘à~ED“D‘à~µDÅD‘à~®EÉE‘à~wJŽJ‘à~e9§:‘à~@•@‘à~ï@ÃA‘à~˜F·F‘à~G#G‘à~óGXH‘à~ŸHðH‘à~6IºI‘à~ðIwJ‘à~¥JÁJ‘à~ÆJûJ‘à~ KK‘à~¼3Ö:0Ÿ‡;Â;0Ÿ!<7<]Ÿ<À<0Ÿþ=2>0Ÿ2>7>]7>¯>0Ÿë>oA0ŸËAÉF0ŸùF0Ÿë>¸A0Ÿ¸AÃAPËAÉF0ŸùF7>P•>¯>S&?G?S44P474\•>¯>P&?G?\404P&?G?P85§::Ÿ ;°;:Ÿ7>X>:Ÿë>&?:ŸG?«?:ŸÀ?Ð?:Ÿ@©@:ŸÇ@ËA:ŸÝAïA:ŸBÉF:ŸùF7^>7†70Ÿ8 90Ÿ 99P9e9^e9Œ90ŸŒ9–9P–9ò9^ò9§:0Ÿ§:Å:^‡; ;0Ÿ ;¥;P¥;°;^°;Â;0ŸŸ<À<0Ÿþ=2>0Ÿ2>7>]7>j>^•>¯>0Ÿë>ÿ>^ÿ>?0Ÿ??P?«?0Ÿ«?À?^À?@0Ÿ@©@^©@Ç@0ŸÇ@à@^à@ä@Pä@ï@^ï@²A0Ÿ²AÃAPÃAËA^ËAÝA0ŸÝAïA^ïADB0ŸDBRBPgB¹C0Ÿ¹CËC^ËCÝC0ŸÝCD^DDPDD^D-D0Ÿ-DED^ED“D0ŸµDÍD0ŸÍDßD^ßDùDPeEŠE^ŠE®E0ŸáEF0ŸFÉF0ŸùF#G0Ÿ#GX>Pë>?\G‹G\ú56P6o6‘ì~À?Ð?‘ì~ý@APAËASB(B‘ì~BÊB‘ì~ìBüB‘ì~|C„CP„CŸC‘ì~ËCÝC‘ì~˜F·FSG#GSËHÏHPÏHðHS6ILIS^I‰ISºIÑI‘ì~ KKS77‘à~.8>8aK9[9aÝAïA‘à~ŸC±C‘à~ED“D‘à~µDÅD‘à~eElEblEŠE‘à~®EÉE‘à~yF}Fa‹GGawJŽJ‘à~ä3â90Ÿâ9ò9Pò9G:_G:§:0Ÿ§:Å:_‡;Ë;0ŸŸ<À<0Ÿþ=j>0Ÿ•>¯>0Ÿë>«?0Ÿ«?À?_À?ÃA0ŸËAÉF0ŸùF0Ÿ2>7>w7>X>0ŸX>j>þŸ•>¯>0Ÿë>«?0Ÿ«?À?wÀ?õ?0Ÿ@ÃA0ŸËAÝC0ŸÝCìCÿŸìC-D0Ÿ-DEDÿŸED“F0Ÿ“F˜Fw˜FÉF0ŸùF0Ÿ2>7> °‹Ÿ7>X>0ŸX>j> °‹Ÿ•>¯>0Ÿë>«?0Ÿ«?À? °‹ŸÀ?õ?0Ÿ@ÃA0ŸËAÝC0ŸÝCìC °‹ŸìC-D0Ÿ-DED °‹ŸED“F0Ÿ“F˜F °‹Ÿ˜FÉF0ŸùF0Ÿ2>7>V7>X>0ŸX>j>V•>¯>0Ÿë>«?0Ÿ«?À?VÀ?õ?0Ÿ@ÃA0ŸËAÝC0ŸÝCìCVìC-D0Ÿ-DEDVED“F0Ÿ“F˜FV˜FÉF0ŸùFX> ÿŸë>&? ÿŸG?«? ÿŸÀ?Ð? ÿŸ@©@ ÿŸÇ@ËA ÿŸÝAïA ÿŸBÉF ÿŸùFX>0Ÿë>&?0ŸG?«?0ŸÀ?Ð?0Ÿ@©@0ŸÇ@ËA0ŸÝAïA0ŸBÉF0ŸùFM>^ˆ5§5pÿŸ7>G>pÿŸ6a60ŸB+B0ŸBÊB0ŸìBC0ŸºIÑI0Ÿ6a61ŸB+B1ŸBÊB1ŸìBC1ŸºIÑI1Ÿ=6J6PJ6]6w##hB‰Bw##hìBC1ŸøBCQB+B1Ÿ$B+BQBÊB0ŸºIÑI0ŸBÊB1ŸºIÑI1ŸB¡BP¡BÊB\ºIÑIP¢B¿BP¿BÊB]o6²60ŸÊBâB0ŸC|C0Ÿ‘6ž6Pž6®6w##hC&Cw##hdC|C0ŸpC|CRÊBâB0ŸÛBâBRCdC0ŸDD0Ÿ-C>CP>CdC^DDP?CYCPYCdC\>7†70ŸŸC¹C0ŸED“D0ŸµDÍD0ŸwJŽJ0Ÿ>7†71ŸŸC¹C1ŸED“D1ŸµDÍD1ŸwJŽJ1Ÿa7n7Pn7‚7 ‘È~##hEDQD ‘È~##hµDÍD1ŸÁDÍDYŸC¹C1Ÿ­C¹CYED“D0ŸwJŽJ0ŸED“D1ŸwJŽJ1ŸXDjDPjD“D\wJŽJPkDˆDPˆD“D^7Ô70Ÿ“D«D0ŸùDeE0Ÿ²7¿7P¿7Ð7 ‘È~##hùDE ‘È~##hHEeE0ŸYEeEQ“D«D0Ÿ¤D«DQùDHE0ŸÉEÒE0Ÿ EEPEHE\ÉEÒEP E=EP=EHE_W8š80Ÿ_?«?0ŸŠE¤E0ŸþEF0ŸŽJ¥J0ŸW8š81Ÿ_?«?1ŸŠE¤E1ŸþEF1ŸŽJ¥J1Ÿu8‚8P‚8–8 ‘Ð~##h_?i? ‘Ð~##hþEF1ŸFFQŠE¤E1ŸE¤EQ_?«?0ŸŽJ¥J0Ÿ_?«?1ŸŽJ¥J1Ÿp?‚?P‚?«?\ŽJ¥JPƒ? ?P ?«?_¨8í80ŸáEôE0ŸFyF0ŸË8Ø8PØ8é8 ‘Ð~##hF%F ‘Ð~##hdFyF0ŸmFyFRáEôE0ŸíEôERFdF0ŸùFG0Ÿ,F>FP>FdF^ùFGP?FYFPYFdF\¬9: ÿŸ:L:\JWJ\hJwJ ÿŸ¥JÁJ\ÆJÍJ ÿŸÍJûJ\:&:PJJPÍJÑJP':5:4ŸÜJîJ4Ÿ':4:PÜJèJPJWJ\@•@^HXH^ŸHËH^‰IºI^ðIJ^$@G@QG@c@~HKHQŸH®HQ®HËH~‰IœIQœI­I~ðIJQHKHQ‰IºI4Ÿÿ>?:Ÿÿ>&? ÿŸG‹G ÿŸÿ>&?0ŸG‹G0Ÿ;;s;@;5Ÿ;@;1Ÿ;@; Ý}Ÿ;G;5Ÿ;@; 3}ŸuKL0ŸMYN0Ÿ7OGX0ŸGXjXPjX‚X‘ˆ}‚XŽX0ŸŽX±XP±XÉX‘ˆ}ÉXÕX0ŸÕXøXPøXY‘ˆ}YY0ŸY?YP?YWY‘ˆ}WYiY0ŸiY„YP„Y—YS—Y©Y0Ÿ©YÄYPÄY×YS×YéY0ŸéYZPZZSZ2Z0Ÿ2ZMZPMZfZSfZ·Z0Ÿ·ZÒZPÒZåZSåZ[0Ÿ[[P[.[S.[Î[0ŸÎ[ß[Pß[é[Yé[ï[‘ˆ}ï[\Y\ \‘ˆ}A\\\0Ÿ\\f\Pf\Œ\YŒ\À\‘ˆ}Ï\]0Ÿ]F]^F]a]0Ÿa]k]Pk]Ë]^Ë]^0Ÿ^@^_@^[^0Ÿ[^e^Pe^¿^_¿^î^0Ÿî^$__$_6_0Ÿ6_J_PJ_g__g_|_0Ÿ|_Œ_PŒ_ü__ü_5`0Ÿ5`E`PE`Aa_Aa¡a0ŸÑaÆb0ŸÆbÖb‘ˆ}êbcY,cMc0ŸMc\c‘ˆ}\c}c0Ÿ}c’c‘ˆ}’cÔc0ŸÔcãc‘ˆ}ãcd0Ÿdd‘ˆ}d:d0Ÿ:dIdPfdŠd‘ˆ}Šd‘dP¶dÎdSÎdÝd‘ˆ}ÝdädP eeSeePDeKePKe•eSše²eS²e¹eP¹eÜeSÜeãePãefSf6f0Ÿ6fNfSNfUfPUffSf—fP—fºfSºfËf_ËfëfYëfüf_üfgYgEg_EgLgYLgSgPSg”g_”g¬gY¬g³gP³gðg_ðgøgY h4h0Ÿ4hAh_AhQh0ŸQh`hP`høh_øhÿhPÿh4i_4iPiYPi`i0Ÿ`ijiPjiˆi_ˆi´i0Ÿ´i×i_×i÷iY÷iIj^IjPjPPjˆj^§j¼k0Ÿ¼kÎk^Îkàk0ŸàkïkPïkl^lNl0ŸNltl^ˆl¯l‘ˆ}¯lÍlYÍlÔlPÔlùlYmmP6m§m0Ÿ§m±mP±mÔmYÔmßm‘ˆ}ßm/n0Ÿ/n[n_[n`nY`nŒn_Œn‘nY‘n×n_×nÞnYÞnånPån;o_;o@oY@olo_lo“oS“ošoPšoÌoSÌoîo0ŸîopPp&p0ŸuKL0ŸLæLVMYN0ŸYN7OV7O@[0Ÿ@[T[PT[l[Vl[|[0Ÿ|[‰[P‰[ï[Vï[^0Ÿ^—^P—^AaVAa_a0Ÿ_a}aV}a¡a0Ÿ¡aÑaVÑaêb0Ÿêb,cV,c•e0Ÿšeºf0ŸºføgV hËhVËhàhPàhøh_øhÆi0ŸÆi÷iV÷im0ŸmmV6m”mV”mßm0ŸßmïmPïm@oV@oÌo0ŸÌoÜoVÜoîoPîop0Ÿp&pVuKL0ŸLMSMYN0ŸYN7OS7O[[0Ÿ[[l[Pl[ \S \“\0Ÿ“\¢\P¢\Ï\SAa_a0Ÿ_a}aS}a¡a0Ÿ¡aÑaSÑaêb0Ÿêb,cS,cId0Ÿfd•e0Ÿ•ešeSšeºf0Ÿ¼j×j0Ÿ×jòjPòjkSkk0Ÿk-kP-kykSyk€kP€k£kSl\>Hv2$àÖ"H~v2$àÖ"~œ \œ § v2$àÖ"WÊUWZ0ŸZÊXgŠ0ŸŠŸ1ŸŸ´2Ÿ´Ê3ŸgqrxŸq´x r"ŸWZ0ŸZÊPíòÔú0òçúBXòúúrˆò û¢¸ò ûÒèò3ûòFû2HòYû”U”šóUŸ”T”šóTŸ”Q”šóQŸ(B b“g“d“BF b“g“h“Fnb“g“uö-tö-Ÿ“n”uö-tö-Ÿ“g“uö-tö-Ÿ“,1e““16e“c““6N e“c“f“NRe“c“uö-qö-Ÿ“RVe“uö-qö-Ÿ“uö-qö-Ÿ“V”*uö-qö-Ÿ“uö-qö-Ÿ“uö-qö-Ÿ“Zfaf”uö-qö-õ-õ-Ÿ^jdj”uö-tö-uö-qö-õ-Ÿnvbv”c¸Èõ-õ-õ-õ-ŸÈÐõ-õ-õ-õ-ŸÐÔõ-qö-õ-õ-ŸÔÜõ-qö-tö-õ-ŸÜèaèÿõ-qö-tö-õ-ŸÄÐõ-õ-õ-õ-ŸÐÔõ-õ-qö-õ-ŸÔØtö-õ-qö-õ-ŸØàtö-õ-qö-tö-Ÿàätö-qö-qö-tö-Ÿäñcñÿtö-qö-qö-tö-ŸÄÈõ-õ-õ-õ-ŸÈØõ-õ-õ-õ-ŸØàõ-tö-õ-õ-Ÿàìõ-tö-õ-qö-Ÿìöböÿõ-tö-õ-qö-Ÿ}””Ÿ” •E•{••ˆ•¥– —`—˜—›Ð› — ——0—£—¦—ršØš¦š¸š»šØš0—C—¦—™&™ršØš›r˜€˜@›i›±—¸—€˜ƒ˜8™P™Øš@›¸—¿—Ø—˜¶˜À˜P™¸™@šrš°œ¿œÅœÐœPp^ŸpŸsŸ¼ŸX  ¡ð¡¢ ¢À¢¡¡"¡Ð¡à¡ð¡¢ ¢À¢ÿ¢¢E¢R¢[¢qPtP…PˆPP“P—PœP¥P³P¶PºPÀPÓPÖPÙP QQQQQ&Q)Q-Q3QFQIQLQ}Q…QˆQ‹Q‘Q™QœQ Q¦Q¼Q¿QÂQóQûQþQRRRR!R'R4R7R:RhRpRsRvR|R„R‡R‹R‘RžR¡R¤RÒRÚRÝRàRæRîRñRõRûRS SSYFYKYNYQYWYdYgYkYqY~YY„Y¨Y«Y³Y¸Y»Y¾YÄYÑYÔYØYÞYëYîYñYZZ$Z)Z,Z/Z9ZNZQZUZcZxZ{Z~Z²ZµZÁZÆZÉZÌZÞZóZöZúZ[[ [#[w[z[†[‹[Ž[‘[«[À[Ã[Ç[å[ò[õ[ø[\\_\k\p\s\v\˜\­\°\´\Ú\ÿ\]]£G£J£M£µ£º£Ä£É£¤@¤º£¿£à£ ¤°¦€§(¨h¨€¨–¨¨º¨Þ¨ý¨©0©ø¥‡¦¨(¨ý¨©m©”©xªªæŽ7ޔެ–¬æ¬%­‚­ˆ­•­×­æ­!®W®c®ð­® ®!®W®c®ñŽ$>Ÿ×ÚÝ 0À¯Ç¯Ë¯Ù¯±0±°|°°‡°Q°|°°‡°ˆ£§É÷±² ²#²%²0²ð²V³8²;²>²t²e³l³p³~³´.´P´h´€´˜´¾´Ë´PµeµH··‡¸¹g¹…¹´¹å¹U··g¹…¹´¹Ë¹µ¢µ·Ð·¹g¹…¹´¹å¹ º·Å·…¹´¹å¹÷¹Å·Ð·÷¹ ºàµE¶¶˜¶· ·Ð·‡¸ ººàµ&¶¶˜¶Ð·‡¸ ºº?ºXºp»ˆ»À»Í»ºêº`»p»¼¼¼^¼€¼ ¼½L½¾f¾`½¾x¾ã¾ˆ½á½x¾ã¾ö¾…¿¿Ò¿à¿À ÀÀÀ]Áö¾R¿¿À¿à¿ÀÀPÀR¿v¿PÀ]Á[À ÀÀÀPÁˆÁ¢ÁËÁòÁøÁûÁüÁþÁÂÂÂÂ(ÂVÂøÁûÁüÁþÁĈÄÐÄìÄ,Å`ÅÆ˜ÆpÅÆ ÆáÈpÅaÆcÆÆ ÆáÈpÅwÅ~ÅQÆ ÆGÇQÇáÈpÅwÅ~ÅŒÅQÇlDžȒȦÅQÆ ÆÐÆ€ÇÜdzÅQÆ ÆÐÆ€ÇÜÇíÅCÆ€ÇÜÇÐÆ-ÇlÇ€ÇÜÇ…È’ÈáÈëÆ-ÇlÇ€Ç\È…ÈÜÇ\È’ÈáÈöÇAÈ’ÈáÈ_ÉnÉ0ÍPÍÊÊJÑXÑFãjã–ãžãÓÓÓӒԚԬԵԌՖամÕÂÕØÕåÕîÕ ÖÖ!Ö*ÖÒÖÜÖçÖúÖ×× ×(×8×A׃׈טצ״׽×Í×Õ×ç×ð×“ØØªØ»ØËØÔØïØùØÙÙÍÙÕÙçÙðÙ£Ú­Ú»ÚÄÚlÛtÛ†ÛÛBÜLÜZÜcÜ ÝÝ%Ý.ÝáÝëÝùÝÞªÞ²ÞÄÞÍހߊߘߡßIàQàcàlà(á2á@áIáúáâââÙâãâñâúâ¢ãªã¼ãÅãbägäwä…ääžä©ä·äÄäÚäåäøäåå'å=åJå`åkå~åŒåå­åÃåÐåæåñåææ#æ3æIæVælæwæŠæ˜æ©æ¹æÏæÜæòæýæçç/ç?çUçbçxçƒç–ç¤çµçÅçÛçèçþç èè*è3è%ÓFÓsÔ‚ÔXÓbÓeÓhÓžÓÆÓ‚ÔŠÔµÔ¿ÔÂÔÅÔóÔ ÕîÕúÕüÕÿÕ*Ö4Ö7Ö:ÖlÖ”Ö½×Å×ð×ú×ýר<ØeØÔØàØâØåØ%Ù/Ù2Ù5ÙqÙ•ÙÁÙÉÙðÙúÙýÙÚ<ÚeڌژښÚÚÄÚÎÚÑÚÔÚÛ4Û`ÛhÛۙۜ۟ÛÛÛÜ+Ü7Ü9Ü<ÜcÜmÜpÜsܯÜÓÜÿÜÝ.Ý8Ý;Ý>ÝzÝ£ÝÊÝÖÝØÝÛÝÞ ÞÞÞNÞrÞžÞ¦ÞÍÞ×ÞÚÞÝÞßBßißußwßzߡ߫߮߱ßíßà=àEàlàvàyà|à¸àáàááá"áIáSáVáYá•á¹áîáöáâ'â*â-âiâ’âÂâÎâÐâÓâúâãã ã Ê0ÊPÍxÍ=ÊaʸÏÐðÐ$ÑÆÏÐÐÐpψώϠϥϧϪϸÏnÊ}ÊͤÍ}ÊŒÊxÍͤÍÀ͌ʙʜʟÊ&Ë.Ë1Ë4˲˺˽ËÀË^ˆË0Ì8Ì:Ì<Ì/ЮЗÒËÒ±è²éêEðJð±ðêlê°îºî½îÀîèîï ïHï@ë”ëHïRïUïXïxïÂï’ìšìì ìþíQîÂïÌïÏïÒïçï'ðGóJóbóÇô@÷€÷Îú@û ü4ü üìü±ýÀý@÷€÷±ýÀýWõ^õdõ|õØùàùãùæù|õ€õ‡õŸõ¸úÎúþ&þMûdûÙýòýZûdûÙýòýãõFö4üJü ý¡ýûýþ&þŠþ›þÙþþõFöûýþ_þƒþ4üJü ý¡ýþþ&þ_þƒþŠþ›þÙþ>ý—ý&þ:þ›þÙþkö”ö€÷÷÷’÷Œûáû`ümüpüsüŠü üìüýýýëö0÷Šþ›þ®÷Søø ø°øÀøÀùØùøùú®÷·÷ß÷øøùúøSøø ø°øÀøÀùØù ÿ/ÿH^ [/ÿ¶àH^`e [«°Ä/ÿ<ÿNÿoàçù0eÂ3/ÿ<ÿNÿoàçù0ež£Â3àçù0‚ž£Â…¶0HÂh3«ºÄÂðhouœðÁ3šºÄouœÁš«öù¡·—›ÆÌ  @(°ü—›Æé  @ùð ø û þ !(@p  ¬ÃMc`oYc`o{æP×Ã-Z¥)Su£–æÃ-P×Z¥)Su£oÍZ)Au£ 2ðøúü# ( / W ³`¥éSlÐ`ÆéSlÐ8ÆéSl/ Q ÉÙ7 F   \ c l  &),H¤Í ï ß(58;P¦z% €    °  8   ¸ zƒªÖ  ¸ Ö% €    °  8 ox¬-6BZ)IoxŽ [o˜ÀxŽ• [ëðo|ŽÂÀÇÙåñ (Xl•ò%qo|ŽÂÀÇÙåñ (Xl•ÎÓò%qÀÇÙåñ (²ÎÓòÂYåñ (XlH`xh%ŒÉÚëÂÏç (Xlñ§É (X Y`xñ0h%Œ§Úëñhz}¡0É%Œ§z}¡ÉÚëg˜H`ò0P qŒÉÚðúò PW]„ 0© qŒðúW]„©ÉÚ5òÐ à @!À!"°#È#è$M'Ó*â*h+r+þ+Ð à "ë"Ÿ$è$ä'(«(ò(ˆ°ë" #@#°#Ø#7$M'ä'ò(ü()`)[*Ó*â*h+K##Ø#7$ë" #M'ä'ò(ü()`)[*Ó*â*h+ë" #M'¦'ò(ü()`)¦'Ê'[*—*¢*Ó*â*=+A+C+Y+h+[**µ*Ó*â*=+A+C+Áé@!ž!È#Ø#7$Ÿ$(«(ü()`)[*r+þ+K!ˆ!È#Ø#7$Ÿ$(m(ü()`)ã)m(‘(ã)***[*r+Ó+×+Ù+ï+þ+ã) *=*[*r+Ó+×+Ù+ùè$þ$À%ü%£ À!"°#È#%À%&M'Ø*â*h+r+*<_ À!Ç!Ù!"%b%Õ&!'*<_ À!Ç!Ù!"%>%C%b%Õ&!'À!Ç!Ù!""%>%C%b%| £ °#È#b% %&Õ&!'M'Ø*â*b%%&&&>&% %c&Õ&!'<'Ø*â*&&>&c&<'M'x,{,Ó,j.P==DèDPEdE_F¯Fx,{,Ó,j.P==D½DÄDèDPEdE_F¯FžD½DÄDèDj.m.p.0=à=€>”>(?0?èDPEGPGj.m.p.0=à=€>”>èD$E+EPEGPGE$E+EPE00 0 1à=0>”>(?ÐEäEK>K00 0 1à=0>”>û>?(?ÐEäEK>KÜ>û>?(?£1@30>€>dEÐEKF_FBIŽI£1@30>€>dE E§EÐEKF_FBIŽIE E§EÐEC3F3K3à4ÀCDäEKFîFGËIJC3F3K3à4ÀCDäE F'FKFîFGËIJF F'FKFæ;õ;WNnN<<K<‹L—Lˆ<®<O*OÔ?1AØABDDÔ?Û?ä? @Û?ä? @/@(D@D/@\@@DXD\@‰@XDpD‰@¶@pDD¶@ã@D(Dã@1AØABQÌQŒZ•Z$[/[¡\§\6]A]LgÅghThŒZ•Z$[/[¡\§\6]A][g‰g````ôiùi jj(jZlÐltmðnht t€vÀvÐvPxéîz‚™‚„ðn®o¨rhtéxy›z&{â{o|y|}}V}Ž}Ó} „„×jk®oàop{p°q7rPxéxo|y|`}…}ø}(~Ô™‚Û‚ p`p°q7r®oàoPxéxo|y|`}…}ø}(~Ô™‚Û‚®oàoPx©xo|y|`}…}ø}(~©xÎxw‚¸¼¾™‚Û‚ aЏ¼¾¨‚Û‚k8k{p°pÐp@q7r¨ry°y}}Ó}ø}~ª~ÔÔ€ƒ ƒÛp q7r¨r{p°py°y}}Ó}ø}~ª~ÔÔ€ƒ ƒ{p°pyqy}}Ó}ø}~ª~qy–yÔ€€²€¶€¹€ƒ ƒÔû0€²€¶€¹€GkqkMqŽq tLuøy‘zV}`}(~~ª~Ó~éÛ‚ƒûƒ „Mqxq«tLuøyQzV}`}(~~ª~Ó~Qzwz~‰º¾ÆÜéÛ‚ƒûƒ „h–º¾ÆÜéÛ‚ƒk¡k¦kÊkLuuÀu€v°yøy&{Ø{…}Ž}Ó~Ô€îz‚ ƒûƒËu(vMv€v°yøyLuu&{Ø{…}Ž}Ó~Ô€îz‚ ƒûƒLuu&{‰{…}Ž}Ó~Ô€‰{­{î1‚E‚z‚ ƒYƒ\ƒ^ƒsƒɃ؃ûƒî‚X‚z‚ ƒYƒ\ƒ^ƒsƒɃäklllÐl×lðl m#m&mpmtmtmŠmvÀvz‚™‚‘m°mxn¯nht“t€vv°mÂm¯nÎnÐv0wÂmÝm0wwÝmýmwøwýmnÎnänøwPx$„)„9„A„T„]…%‰P‰è‰ð‰Š0Š‹°Ž 0ÿšE›€›Ç›ê›0œ?œÉœåœ+žÔžôž:ŸzŸ û©ª%‰P‰‹°ŽÿšE›€›Ç›ê›0œ?œÉœåœ+žÔžôž:ŸzŸ û©ª/…]…ŠŠŠ Š]…‰ð‰Š0Š‹°Ž 0ÿšE›€›Ç›ê›0œ?œÉœåœ+žÔžôž:ŸzŸ ¦¦û©ª>«m™“™+Ay™“™+AO‘Ÿ‘Ø™â™å™è™š*š‚š«šJ’r’“ “““^“†“E›R›T›V›Â¥ì¥ˆª±ª¼ æ ªªª,ª§E§'«*«Ò¢Ý¢{¤ФÉ£ñ£¼¤ɤˤͤ+¤S¤¥¥¥ ¥Ù¡¢áª ««šØš:ŸDŸa«Ÿ«˜¬¨¬­ð­®`®0°`°ްÔ°˜¬¨¬­ð­®`®0°`°ްÔ°Ÿ« ¬0¬˜¬ð­®`®0°`°ްÔ°j±o±±G¬˜¬€® ¯دë¯÷¯0°`°ްÔ°j±o±±X¬˜¬د㯀® ¯÷¯0°`°ްÔ°j±o±±€®‡®Ž®p¯÷¯0°`°ްÔ°j±o±±€®‡®Ž®Ÿ®Ô°ò°o±±º®p¯`°ް±j±È®p¯`°ް±j±¯[¯±j±Û³´ØÆèÆÇÇO³^³¨¿À¿^³b³i³³àÂÃNÅ^Åг¬³pÃ{Ã$´.´3´B´.´3´h´|´´•´¡´µ´?µbµúÅÆuµ—µ%Ç0Ǩ¾žÒÒ/¿X¿òÊúÊüÊÿÊ ÎDÎ]ÎeÎgÎiÎ9¼X¼ÆÕÉÕļì¼êÕòÕôÕöÕ1¹4¹9¹K¹йè¹LÙ[Ùݹè¹LÙ[ÙDºlº1Ø9Ø;Ø=ظÖßÖI×j×l× ×ZÊdÊgÊjÊpÊzÊ}ʀʆʔʗʚÊáÙÀÚÛ(ÛÛèÝÞÈáÍáâÛ(Û ÛôÜŠÞÐÞgßiàsà¹àââdÚŒÚôÜ(ÝHÝÆÝÞŠÞÐÞgßiàsà¹àÈáÍáâSÝ ÝÞŠÞôÜ(ÝÐÞgßiàsà¹àÈáÍáâôÜ(ÝÐÞ)ßiàsà¹àá)ßMßáqá|á¬á°á²áÍáâá[á„á¬á°á²áÜáâÀÚÝÚèÝÞUâXâ)ã°äùÐùùaÐèe³UâXâ)ã°äùÐùù5=aÐèe³5=a°ä´ä¼äPæÐù úpú„úûûaÐ\©°ä´ä¼äPæÐù úpú„úa¥Ð\©~¥ÐPæTæ\æøç úpú„úûÀäIkPæTæ\æøç úpú„úêúòúûÀäIkËúêúòúûyè€è©è¬è²èÇè ÇèËèÒèôèOeÄÞï  1Eû  1E)êgê…ö?A`eqv~„ˆÿ ©õ)êgê…ö+AXem©õ+AXemnêŽêO W Žê’ê™ê±ê=SÇ × pˆ(B}ˆ(Béë1ìú#(,147:=@«µ8ìWìÞæéì¥íâíÍÖØìîöûÿ uŒ£½>Ì>™£½>Ì>–îöîúîï»"Ä"Æ"Ú"Ü"ä"é"í"ð"õ"û"þ"Z#d#)')#<3<V<s<ññvMNNN%NÅNgñuñnN‹N¦M×MÚMàMãMíMýMN NhJ K„J²JÂJÙJ‘E´EÃEáEF+F¢ö"÷—@Ÿ@—H¾HšKK'OP°PÔPâPôPûö ÷âPôP—@Ÿ@[O–O¦O°O³OÕOP!˜!â=÷=3FRFŠF#GôP3QÀFþFG#Gî÷ý÷Û>ç>±IÜIJ)J>JhJÝó\ôsDŸDGHJHmH—H KšK L;L[L}L‹LL5ôCô‹LLTW WlXÑX)[À[€]‰]ø]R^€^°^*`abbëS(TW WlXÑX)[‚[€]‰]ø]R^€^°^‚[§[*`g`q`aa abb*`Q`…`aa agRR WfW Y¸Y\£\Î]×]°^3_aàabGbWbfb WPW+Y¸Y\`\Î]×]°^3_`\„\aŒa–a¾aÁaÃaØaàabGbWbfb)avaža¾aÁaÃaØaàabGbR¤R³RÉRÀYïYåabÐRïRÐUVÏWçW¸YÀYïYZÏWçWïYZïRSVVZcZSSV0VˆWÏWb…b cccYcðl`mn0núlýlm@mbc©c`m¨màmn@n`n»¡¾¡`m¨m»¡¾¡gmjmmm¨m»¡¾¡%dqd°iÐi`n°n€y¨yjnmnpn°nzdÃd¨yðy zHzˆ~°~۪નyðy۪યy²yµyðyÛªàªùefÈ“ГÓ“Ö“rfìf`•x•˜ ™rf³f`•x•­˜´˜̘™²gµgºgÆg °Ígìg ™(™[hkhP•`•ÅhÝhð†‡/£2£ÒhÝhð†‡·jßjéZé]éféréuééé1êMê;jKjP€`€fjŒjàëwTT T©T6ŽsŽxŽŽŽ²ŽÕŽ=ŽsŽxŽ{ŽÕŽþŽ'*2UGUJUMUSUhUkUnUtUŒUU”UAqéöÝVWÃ{Ë{Í{Ï{W-W0W3WÄWìWv v v v*Y7Y:Y=YCYPYSYVY\YiYlYoY˜Y›Y¦Y«Y¤R¾RÃÆ€šèšø° ± ±±à²³ ¼Y¼1½:½K½f½œšèšà²³ ¼Y¼1½:½K½f½ø° ± ±±0¤[¤v²…²p¤•¤…²”²¨¤ʤ”²£²¥¥£²²²¢ü¥ü¥¥£²²²Ò2ÒRIbIlI•I¢IÀI—J³J¯¦8§¬´Áêôû *2?gq•¦L1MUM]MN‘NÁNÉNoOÝO§&§L=LvL©L¬L¿LÕL1MUM]M«g«ÎÐ8Ñ=ÑHÑgÑ¿ÑõýþÑ8Ñ=Ñ@ÑrÑ¿ÑÏåæåÃÆâûÛåæåâûéã äÃÓêþ 5?H1±Ú@ÛWf˜¿ÉíõþÔý-5"9JW„Ž—d€¦".8em Û.ÛÔO~”ªý-5ÞlÞß_ßdߖߣßÊßÔßÝßBðƒðd‘›‘¨‘Ï‘·’Ø’Ý’““C“M“V“-ß_ßdßkß~ߖߣßÊßÔßÝß·’Ø’Ý’ä’÷’““C“M“V“²ÛÍÛÐÛÓÛÙÛóÛöÛùÛÿÛÜÜ Ü&ù>ù˜¾Í3ù>ù¾Íø,øÛúèúêúìú>øKøNøQøWødøgøjø¦ŠÛŠ9KƒLƒ.…3…Œw©wT|W|IpepTs^s›dÐdvf{fÕ[\ç]ì]dMMvSySDC‚C6E>E³6ç6˜< <Ø, -Ð.Ø.p – R&U&ŠÈ|„Heöþ#N'7Zg—š¤§\xÜŸÜAûDûQûxû‚û¦û„üÁýñýùýËþ=ÿIÿSÿ€ÿˆÿDZl|‰²¼Å’®x܆܄üºüý[ýnýqýzýœý¥ýÁýñýùý¿…мÉðSŠ—¸ ÄÉû/P…Š‘¤¼Éð ÄÉÐãû/%Ý:Ý=Ý@ÝFÝYÝ\Ý_ÝeÝxÝ{Ý~Ý ë8ë·ëÄëÊÞóÞ×ßßßáßäß ß#ß&ß.ß4ßAßDßGßMßZß]ßeßMäzäÜáµå½å-‡·£Õ£Ø£á£Ϻ »»»;»n»µå½å-‡» »»»K»n»n»Ÿ»¤»¨»½»À»l¤v¤y¤|¤‚¤¤’¤—¤¤ª¤­¤°¤¨5¨I¬L¬ÿ¥'¦´«¼«¾«À«s£ˆ£^¼a¼kq6r`x€xPy€ykqrq{q¢qrq{q¢qÔqhy€yÔq6r`x€xPyhy‘«¾«ìµûµÍ«Ò«Ö«ó«¥¾¬¾µ¾¿¾ÀÀõÇÈVÕjÕ Ø1ØtØ{ØnÙxÙ»ÂÀá~  E)L)**4*c*j*H+R+«+²+s,},¼,Ã,¡-°-Ú-á-Æ.Õ.ÿ. /ï/ü/(0/0 1*1Y1`1B2Q2{2‚2d3s33¤3Š4”4Ñ4Ø4¾5È56 67 7U7\7C8Z8‰88s9}9k:r:a;‹;Ì;Ó;µ<Þ<==> >g?n?L@V@µ@¼@‡A‘AåAìAÊBÔBCCD D¿J¿Ê¿Ô¿ÜÁãÁfÂ}¯¶Â:Ã^ÃÔÄàÄWÅaÅÅœÅÆ&ÆvÆ}ÆýÆÇ9Ç@ÇÄÇÎÇÄÈËÈÉ2ɜɣÉEÊOÊŽÊ•ÊCËMˌ˓ËMÌWÌÍÍÎÎrÎyÎqÏ{ωÐÐzÑ„ÑÞÒåÒØÓâÓ%Ô,ÔÕ#ÕóÕúÕàÖêÖ8×?×0Ø?ØiØpØVÙ`Ù’Ù™Ù‹Ú•ÚÄÚËÚ¹ÛÃÛÜ ÜðÜúÜ[ÝbÝÝÝçÝ"Þ)Þ°ÞºÞùÞ߇ߑßÐß×ßUà_àqáxáââ]âdâúâãhäoä¹äÃäåå`åjåéæçUçfçºçËçè0è„è•èòèécéméëéòé^êhê³êºê=ëGëcíoíÞíèí"î)îî‰îï ïHïRïÂñÉñ6òMòQòXò·òÎòÒòÙòDóNó4ö;ö‡ö‘ö×öÞö.÷8÷Uù\ùwùùRúYú®úÃúíúôúHû]û‹û’ûâû÷û!ü(ü|ü‘ü¿üÆüý&ýTý[ý¦ýÇýîýõýEþiþ„þ‹þÚþüþÿÿhÿŒÿ£ÿªÿöÿ5<ˆŸÇÎ1Y`¯Ñèï",õü)Hho ÂÖÝ*RYŠ¡ÉÐ !MTŽ¥ÑØ2^e±Ã3 ? « µ Ù å ì ñ Q [ i | á  h ~ ï  { … • ¡  7  ° 2—´2¡·#-UYy~áèKU{‚æð‚Œš®!+9R¼ÆÔíTk«² FN|¼Ã*4T[¿ÉâéLcgnÙãEJ.­@­C­H­Å?ÅÚÇ2È9È<ÈøÈÉI®Û®!»á’N r Hšš››·›´®®››·›U”§» ë ùÃÀÃçÃ?ŃŊŨÅzÆÚÆáÆÇHÆÙùÃÀÃçÃzƧƺÆÚÆáÆÇV¯e¯j¯t¯š¯ž¯¡¯«¯ë¯ù¯ü¯°E°O°R°U°[°c°f°i°ô›ù›|¢¢o°w°z°}°ÿ¹ ººº» ¼#þ+þ“!!!!µ!Å!È!Ë!˜Ï›Ï ÏÈÏs"ó"WÌÍÍ#Í,Í>Í#ÕÃÕ%6%ÃÛÈÛu>—>ÔBCCDCÏCôC&¢&Z8‰88“8˜8á8}9k:r:Ï:‹;Ì;Ó;#<Þ<==D=Ï=ô=|&Š&}9±9 :k:r:z::™:¢:´:½:Ï: >_>Â>>?C?R?W?g?s?º?}@‚@‡@@”@µ@¼@õ@‘A¼AÁAÐAÕAåAñA8B?>?C?R?_?g?s?v??º?‘A¼AÁAÐAÝAåAñAôAÿA8B,'9'<'?'E'M'P'S'Y'a'. .0/5/j'y'|''„F°F½FÂFÜ’ä’ç’ê’õ’ý’““sã¤ãÃäåå*å;å`åš” •Ç9Ç@dzÇÎÇÄÈËÈ É2É]É6ícíoí¨í¹íÞíèí"î)înîø”•ÎÇÈRȚȢȥȰÈÄÈËÈÎÈ×ÈÉóë6í‰îÆî·ìíí6íãÃ%ĈÄÔÄàÄÅ2ÅWÅ–+–^ÊÒßòÃÉÃk–x–{–~– ¾¾Ó¾ؾ„–Œ––’– ¹7¹ô¹3ºDºyº’º·º±—]˜ž³ú³´ ´´i´„´ʵѵõµ¶Ò¶Þ¶·(·M·5˜C˜„´Ç´W·²·Ê·m¸u¸€¸‡¸ʸ˜»­»µ»л×»¼-¼o¼w¼‚¼‰¼̼¸m¸u¸€¸‡¸Џ¸ʸ-¼o¼w¼‚¼‰¼Œ¼Ÿ¼̼£˜̘º™Ê™Ì™Ï™Êážžžžáñ÷žž(ž+ž.žŸŸ¬#¬4žFžIžLždžgžsž…ž…žž@®|®“®›®£®¦®º®îծ箭­y¯µ¯̯Ô¯ܯ߯ó¯ü¯° °4›7›?›N›ÀãÒãÕãÝãhïˆïÞâéñùü%(L›ïÂïÅïÎïåõökž¡«²Ã*4GJT[¿åõözž¡«²¾ÆÉÔ4GJT[gor}¿ ;>FNZbep|¼fðuð}ð‡ð­ð»ð¾ðÈð ñññ+ñ|óó£ó«ó/ô<ô?ôDô«ó»óJôWôZô_ô»óËóeôrôuôxôÙÞÝâHMÊÏ27ýóôôô:yÏÖ¥õÍõ‘ö™ö›ööN÷[÷^÷a÷g÷t÷w÷z÷€÷÷÷“÷’ø·øÜøäøæøéø),/5BEHñåþåææ”™©®Á_bjù —€ !á/æ/0Q03ù  è!h"°%ö%Å&˜'(Q)Z)Ÿ)¨)î)*c*û23Px`€Ð!ƒ!ø#Ž$Q)Z)÷)*ç*+ä,ä-µ1Ì1 )€°!ƒ!)`ø#Ž$Q)Z)÷)*ç*+ä,ä-µ1Ì1)`ø#Q$Q)Z)÷)*ç*+Q$u$ä,0->-Ê-Í-Ï-µ1Ì1ä,-Q-Ê-Í-Ï-‹´‚Ðàƒ!è!Ž$?%Ÿ)¨)l*ç*¨+Ù+ä-Í.À0D1`Ðàƒ!è!Ž$ï$Ÿ)¨)l*ç*¨+Ù+ï$%ä-^.q.›.ž.¡.¶.Í.À01"1D1ï-?.z.›.ž.¡.¶.Í.À01ÃìàY h"#ö%»&î)÷)+¨+©,ä,ü.á/D1µ1Ï2û2à( s"#ö%a&î)÷)+¨+©,ä,a&†&ü.{/“/Æ/É/Ì/D1¦1Ï2û2/W/œ/Æ/É/Ì/D1¦1û## #Æ#ø#I%°%¢'(c*l*Ù+©,Í.ü.æ/0Q0À0Ì1Ï2 #`#Æ#ø#I%°%¢'(c*l*Ù+©,Í.ü.(B(æ/0Q0›0¸0À0Ì12222‹2š2Ï2ñ/0Q0r0Ì12222‹24_—œŸ¡_bj€¨ Ä 020€™Ä Ü è !20Q0Ä Ü õ !™Ð€ ¨ 43Ÿ3à:;À<>ÉFùFÉFùFä>ÑIðI¼3à:;À<>°>ð>ÉFùF°>ð>ÉFùFH>J>M> 666a6B+B€BÐBðBCÆIÉI€BÐBÆIÉIŠBBBÐBÆIÉIo6²6ÐBâB C€C'C*C-ChC>7†7 CÀCHD˜D¸DÐDƒJ†JHD˜DƒJ†JRDUDXD˜DƒJ†J7Ô7˜D«DEhEE E EPEI8N8W8š8`?°?E¤EþEFj?m?p?°?¨8í8áEôEFyF&F)F,FdF¬9X:JwJ¥JÁJÆJûJ::::':5:ÜJîJJ7JH,&^8*&zè)&Ž8(& `,&¼)&Ï-&èÀ(&ûÈ(&x(&!ˆ(&4ð,&N€+& +&£ s+&*X,&DÀ*&V¸*&h°*&z &hó 3J+&dÀ &0Ï`%&àâ&XøH(& @(&0(&/((&C (&W(&o+&ƒ*&˜+&«€(&¾ø+&×È)&êø(& ¨,& ¸,&6 ¨)&[ ø*&‡ ð*&¸ À,&é Ð,&!È,&M!*&u!¸+&¥!@,&¶!˜(&Ê!Ð(&Þ!)&ò!°(&"è(&"0)&%"È+&<"Ð+&S"x*&d"P)&z"X)&"`)&¦"h)&¼"p)&Ò"x)&è"€)&þ"ˆ)&#h*&,# (&>#Ø(&P# )&b#Ð*&{#¸'&#°'&¥#¨'&º#P+&Ì#h+&Þ#¨+&ð#8,&$+&$ +&4$(+&L$,&^$,&p$¨(&‚$à(&”$()&¦$@)&È$˜*&Ú$à*&ð$Ø*&% && m%€&& ³%`&& õ%@&& =&À)&Q& & v&`&<¤&`&#Ô& &$'Ø& 'h & 2'˜ & J' &Z'* &n'[ &'U &”'À&®'@&Í'# &á' & ú'°& (ˆ & ,(x & D(`&b(˜ &t(X & Š(à&=¸( &)è( &ø( &) &),&+)Å &<)Ø & S)ð+&g)“ &y)H & )&¯) &:Ý)¸ &ò)° &*ÿ &*`&KD*ü &T*€&u* & ‰*à&©*O &¼*@&Cê*È & +% &+ù &+`+&3+Ž &E+# &S+ö &c+H+&w+‰ &‰+ &#¶+ø& Ï+ó &ß+8 & õ+( & , & !,€ & 3,h & K,Á &\,Ð&…,&"³, & É, &Ý,°& -¸ & -I &3-ð &C-í &S-ê &c-¨ &x-  &-ç &-X & µ-H & Í-8 & å- &ó-p*&.½ &.ø & -.( & E. & ].P*&r.C &….`&¦. & À.& Ú.˜ &ï.ä &ÿ. &/ˆ &)/= &0À&^0@&€0¨ & —0x &¬0à&%Ù0ÿ &í0ø &1ñ &1ê &)1ã &=1Ü &Q1Õ &e1Î &y1H)&1Ç &£1 &Ã1 &Rñ1 &ÿ1á &2Þ &2 &<L2k &^2µ &o2± &€2À &”2Û &¤2 &²2Ø &Â2Õ &Ò2f &ä2­ &õ2© &3Ò &3 &$3Ï &43Ì &D3a &V31 &i3¥ &z3¡ &‹3 &œ3É &¬3ñÿ¾3ñÿñÿË3ÈôÙ3Èü%ñÿå3&ò3Ðü%û3øÚ4h'&4&04A4Z4e4€4’4¤4°4Á4 '&ø455 15>5K5Y5i5u5‡5à–@5¢5¶5Ç5Ù5æ5 0Kö$ó566-6:6h'&A6Z6l6w6Œ6—6 àz6©6Å6Ø6æ677&777I7Z7j7„7˜7¦7½7Î7å7õ788'8 PrŒ68I8Z8i8|8‘88«8Â8Ú8î8ü8 99+9;9T9c9q99 àyšŠ9œ9àÖ¦9Ã9Ñ9å9 0pè9÷9:7)¸-& :0: €z_H:\:k:x:h'&„:”:®:¹:Ì:Ù:í:ù:;;;(;9;H; \;n;};Ž;£;·;Å;Ô;å;ò;þ;<<-< G<W<f<w<‰<š<¬<¹<È<"ä< @Jê<ü<==.=<=Q=g=s=ƒ=˜=crtstuff.c__JCR_LIST__deregister_tm_clones__do_global_dtors_auxcompleted.7585__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrysurfaces.cpp_ZL29__Pyx_BufFmt_DescribeTypeCharci_ZL25__pyx_bisect_code_objectsP26__Pyx_CodeObjectCacheEntryii_ZL16__Pyx_IterFinishv_ZL26__Pyx_BufFmt_RaiseExpectedP20__Pyx_BufFmt_Context_ZL30__Pyx_BufFmt_TypeCharToPaddingci_ZL32__Pyx_BufFmt_TypeCharToAlignmentci_ZL29__Pyx_BufFmt_ProcessTypeChunkP20__Pyx_BufFmt_Context_ZL21__Pyx_ListComp_AppendP7_objectS0__ZL19__Pyx_PyList_AppendP7_objectS0__ZL19__Pyx_ReleaseBufferP10bufferinfo_ZL26__pyx_ptype_5numpy_ndarray_ZL19__Pyx_PyInt_AddObjCP7_objectS0_li_ZL25__Pyx_PyObject_GetAttrStrP7_objectS0__ZL19__Pyx_PyObject_CallP7_objectS0_S0__ZL18__Pyx_AddTracebackPKciiS0__ZL16__pyx_code_cache_ZL7__pyx_d_ZL17__pyx_empty_tuple_ZL17__pyx_empty_bytes_ZL62__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_append_with_deltasP7_objectiii_ZL28__Pyx_IternextUnpackEndCheckP7_objectl.part.2_ZL25__Pyx_BufFmt_ExpectNumberPPKc_ZL24__Pyx_BufFmt_CheckStringP20__Pyx_BufFmt_ContextPKc_ZL16__Pyx_ImportTypePKcS0_mi.constprop.36_ZL19__Pyx_PyInt_AddCObjP7_objectS0_li.constprop.38_ZL27__Pyx_ParseOptionalKeywordsP7_objectPPS0_S0_S1_lPKc.constprop.41_ZL24__Pyx_PyInt_SubtractObjCP7_objectS0_li.constprop.42_ZL26__Pyx_GetItemInt_List_FastP7_objectlii.constprop.43_ZL24__Pyx_PyFloat_DivideObjCP7_objectS0_di.constprop.45_ZL21__Pyx_PyList_GetSliceP7_objectll.constprop.47_ZL11__Pyx_PrintP7_objectS0_i.constprop.51_ZL26__Pyx__CallUnboundCMethod0P21__Pyx_CachedCFunctionP7_object.constprop.53_ZL29__pyx_umethod_PyList_Type_pop_ZL16__Pyx_PyList_PopP7_object_ZL14__Pyx_TypeTestP7_objectP11_typeobject.isra.6_ZL21__Pyx_GetItemInt_FastP7_objectliii.constprop.44_ZL14__Pyx_PrintOneP7_objectS0_.constprop.46_ZL20__Pyx_GetBuiltinNameP7_object_ZL7__pyx_b_ZL25__Pyx_GetModuleGlobalNameP7_object_ZL23__Pyx_PyObject_GetSliceP7_objectllPS0_S1_S1_iii.constprop.48_ZL12__Pyx_ImportP7_objectS0_i.constprop.37_ZL16__pyx_n_s_import_ZL7__pyx_m_ZL21__Pyx_WriteUnraisablePKciiS0_ii.isra.10.constprop.52_ZL25__Pyx_PyObject_CallOneArgP7_objectS0__ZL18__Pyx_PyInt_As_intP7_object.part.4_ZL18__Pyx_PyInt_As_intP7_object_ZL11__Pyx_RaiseP7_objectS0_S0_S0_.isra.9.constprop.55_ZL21__Pyx_PyObject_AppendP7_objectS0__ZL16__pyx_n_s_append_ZL32__pyx_f_5numpy__util_dtypestringP14_PyArray_DescrPcS1_Pi.isra.18_ZL24__pyx_ptype_5numpy_dtype_ZL14__pyx_tuple__8_ZL26__pyx_builtin_RuntimeError_ZL14__pyx_tuple__9_ZL24__pyx_builtin_ValueError_ZL15__pyx_tuple__10_ZL42__pyx_kp_u_unknown_dtype_code_in_numpy_pxd_ZL15__Pyx_GetBufferP7_objectP10bufferinfoi_ZL14__pyx_tuple__5_ZL14__pyx_tuple__6_ZL9__pyx_k_h_ZL9__pyx_k_O_ZL10__pyx_k_Zg_ZL10__pyx_k_Zd_ZL10__pyx_k_Zf_ZL9__pyx_k_g_ZL9__pyx_k_d_ZL9__pyx_k_f_ZL9__pyx_k_Q_ZL9__pyx_k_b_ZL9__pyx_k_q_ZL9__pyx_k_L_ZL9__pyx_k_l_ZL9__pyx_k_I_ZL9__pyx_k_i_ZL9__pyx_k_H_ZL9__pyx_k_B_ZL14__pyx_tuple__7_ZL26__Pyx_GetBufferAndValidateP10bufferinfoP7_objectP14__Pyx_TypeInfoiiiP22__Pyx_BufFmt_StackElem.constprop.49_ZL40__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t_ZL11__Pyx_zeros_ZL15__Pyx_minusones_ZL54__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_tri_volumeP23tagPyArrayObject_fieldsi.isra.20_ZL15__pyx_n_s_numpy_ZL15__pyx_n_s_isnan_ZL14__pyx_tuple__4_ZL57__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_19tri_volumeP7_objectS0__ZL53__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__tri_areaP23tagPyArrayObject_fieldsiii.isra.22_ZL13__pyx_kp_s__3_ZL29__pyx_kp_s_tri_area_exception_ZL55__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_15tri_areaP7_objectS0__ZL56__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_areaP7_objectS0_S0__ZL19__pyx_n_s_triangles_ZL12__pyx_n_s_lo_ZL12__pyx_n_s_hi_ZZL56__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_17_tri_areaP7_objectS0_S0_E16__pyx_pyargnames_ZL58__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_4process_cellP7_objectiiiS0_P23tagPyArrayObject_fieldsS2_S2_S2_iiS2_i.isra.24_ZL17__pyx_builtin_min_ZL42__pyx_kp_s_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7_ZL34__pyx_kp_s_7f_7f_7f_7f_7f_7f_7f_7f_ZL42__pyx_kp_s_last_obj_distance_to_position_4_ZL43__pyx_kp_s_distance_to_position_4_with_ever_ZL45__pyx_kp_s_distance_to_position_4_with_ever_2_ZL22__pyx_kp_s_last_object_ZL21__pyx_kp_s_position_4_ZL58__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_5process_cellP7_objectS0_S0__ZL11__pyx_n_s_j_ZL11__pyx_n_s_k_ZL17__pyx_n_s_objects_ZL12__pyx_n_s_xs_ZL12__pyx_n_s_ys_ZL12__pyx_n_s_zs_ZL17__pyx_n_s_tridata_ZL15__pyx_n_s_start_ZL21__pyx_n_s_store_areas_ZL15__pyx_n_s_areas_ZL22__pyx_n_s_print_values_ZL11__pyx_n_s_i_ZZL58__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_5process_cellP7_objectS0_S0_E16__pyx_pyargnames_ZL62__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_3contains_surfaceP7_objectS0_S0__ZL63__pyx_v_6neuron_3rxd_10geometry3d_8surfaces_total_surface_tests_ZL14__pyx_float_2__ZL17__pyx_n_s_objdist_ZL12__pyx_n_s_dx_ZL17__pyx_n_s_r_inner_ZL17__pyx_n_s_r_outer_ZL27__pyx_n_s_reject_if_outside_ZL29__pyx_n_s_print_reject_reason_ZZL62__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_3contains_surfaceP7_objectS0_S0_E16__pyx_pyargnames_ZL11__pyx_int_2_ZL56__pyx_v_6neuron_3rxd_10geometry3d_8surfaces_corner_tests_ZL43__pyx_kp_s_would_normally_reject_because_at_ZL23__pyx_kp_s_at_g_g_g_d_g_ZL11__pyx_int_0_ZL71__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_mapP7_objectS0_S0__ZL17__pyx_n_s_the_map_ZL12__pyx_n_s_pt_ZL18__pyx_n_s_neighbor_ZZL71__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_mapP7_objectS0_S0_E16__pyx_pyargnames_ZL52__pyx_f_6neuron_3rxd_10geometry3d_8surfaces_chunkifyP7_objectS0_S0_S0_idi.isra.32_ZL18__pyx_n_s_distance_ZL28__pyx_n_s_graphicsPrimitives_ZL18__pyx_n_s_SkewCone_ZL20__pyx_n_s_overlaps_x_ZL20__pyx_n_s_overlaps_y_ZL20__pyx_n_s_overlaps_z_ZL54__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkifyP7_objectS0_S0__ZL20__pyx_n_s_chunk_size_ZZL54__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_9chunkifyP7_objectS0_S0_E16__pyx_pyargnames_ZL64__pyx_pf_6neuron_3rxd_10geometry3d_8surfaces_6volume_inside_cellP7_objectiiiS0_P23tagPyArrayObject_fieldsS2_S2_.isra.21_ZL15__pyx_n_s_array_ZL27__pyx_n_s_big_number_matrix_ZL43__pyx_kp_s_grr_it_thinks_there_is_surface_w_ZL11__pyx_int_1_ZL17__pyx_builtin_zip_ZL15__pyx_n_s_zeros_ZL12__pyx_tuple__ZL16__pyx_n_s_resize_ZL18__pyx_n_s_refcheck_ZL64__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cellP7_objectS0_S0__ZZL64__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cellP7_objectS0_S0_E16__pyx_pyargnames_ZL77__pyx_f_6neuron_3rxd_10geometry3d_8surfaces__triangulate_surface_given_chunksP7_objectS0_S0_S0_S0_iS0_iiiiS0_i.isra.30_ZL14__pyx_tuple__2_ZL18__pyx_n_s_get_clip_ZL20__pyx_n_s_primitives_ZL17__pyx_builtin_sum_ZL25__pyx_n_s_starting_points_ZL19__pyx_n_s_itertools_ZL17__pyx_n_s_product_ZL15__pyx_int_neg_1_ZL15__pyx_int_neg_2_ZL16__pyx_n_s_bisect_ZL21__pyx_n_s_bisect_left_ZL13__pyx_n_s_xlo_ZL26__pyx_n_s_contains_surface_ZL22__pyx_n_s_process_cell_ZL14__pyx_n_s_size_ZL12__pyx_int_50_ZL22__pyx_n_s_bisect_right_ZL13__pyx_n_s_xhi_ZL19__pyx_builtin_range_ZL13__pyx_n_s_ylo_ZL13__pyx_n_s_yhi_ZL13__pyx_n_s_zlo_ZL13__pyx_n_s_zhi_ZL20__pyx_builtin_xrange_ZL43__pyx_kp_s_item_d_in_grid_d_d_d_contains_pr_ZL30__pyx_kp_s_i_e_global_item_d_r_ZL80__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunksP7_objectS0_S0__ZL28__pyx_n_s_internal_membranes_ZL20__pyx_n_s_chunk_objs_ZL12__pyx_n_s_nx_ZL12__pyx_n_s_ny_ZL12__pyx_n_s_nz_ZZL80__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_13_triangulate_surface_given_chunksP7_objectS0_S0_E16__pyx_pyargnames_ZL66__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surfaceP7_objectS0_S0__ZL20__pyx_n_s_max_chunks_ZZL66__pyx_pw_6neuron_3rxd_10geometry3d_8surfaces_11triangulate_surfaceP7_objectS0_S0_E16__pyx_pyargnames_ZL13__pyx_methods_ZL16__pyx_string_tab_ZL11__pyx_int_4_ZL12__pyx_int_16_ZL14__pyx_int_1000_ZL14__pyx_int_1215_ZL14__pyx_int_9999_ZL18__pyx_int_10000000_ZL14__pyx_n_s_main_ZL15__pyx_n_s_range_ZL13__pyx_n_s_min_ZL13__pyx_n_s_zip_ZL19__pyx_n_s_enumerate_ZL13__pyx_n_s_sum_ZL16__pyx_n_s_xrange_ZL20__pyx_n_s_ValueError_ZL22__pyx_n_s_RuntimeError_ZL31__pyx_kp_s_tri_volume_exception_ZL38__pyx_kp_u_ndarray_is_not_C_contiguous_ZL43__pyx_kp_u_ndarray_is_not_Fortran_contiguou_ZL43__pyx_kp_u_Non_native_byte_order_not_suppor_ZL43__pyx_kp_u_Format_string_allocated_too_shor_ZL45__pyx_kp_u_Format_string_allocated_too_shor_2_ZL34__pyx_n_s_register_on_neighbor_map_ZL42__pyx_kp_s_home_hines_neuron_nrn_share_lib_ZL11__pyx_n_s_d_ZL14__pyx_n_s_zbar_ZL14__pyx_n_s_ybar_ZL14__pyx_n_s_xbar_ZL11__pyx_n_s_z_ZL11__pyx_n_s_y_ZL11__pyx_n_s_x_ZL17__pyx_n_s_has_pos_ZL17__pyx_n_s_has_neg_ZL11__pyx_n_s_p_ZL16__pyx_n_s_value7_ZL16__pyx_n_s_value6_ZL16__pyx_n_s_value5_ZL16__pyx_n_s_value4_ZL16__pyx_n_s_value3_ZL16__pyx_n_s_value2_ZL16__pyx_n_s_value1_ZL16__pyx_n_s_value0_ZL18__pyx_n_s_position_ZL12__pyx_n_s_z1_ZL12__pyx_n_s_y1_ZL12__pyx_n_s_x1_ZL19__pyx_n_s_new_index_ZL15__pyx_tuple__17_ZL15__pyx_tuple__18_ZL15__pyx_tuple__19_ZL12__pyx_n_s_k1_ZL12__pyx_n_s_j1_ZL12__pyx_n_s_i1_ZL14__pyx_n_s_data_ZL18__pyx_n_s_local_zs_ZL18__pyx_n_s_local_ys_ZL18__pyx_n_s_local_xs_ZL12__pyx_n_s_dz_ZL12__pyx_n_s_dy_ZL12__pyx_n_s_z0_ZL12__pyx_n_s_y0_ZL12__pyx_n_s_x0_ZL28__pyx_n_s_volume_inside_cell_ZL12__pyx_n_s_os_ZL16__pyx_n_s_neuron_ZL40__pyx_n_s_neuron_rxd_geometry3d_surfaces_ZL73__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_1_register_on_neighbor_map_ZL64__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_3contains_surface_ZL60__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_5process_cell_ZL66__pyx_mdef_6neuron_3rxd_10geometry3d_8surfaces_7volume_inside_cell_ZL14__pyx_n_s_test_ZL31__pyx_k_7f_7f_7f_7f_7f_7f_7f_7f_ZL40__pyx_k_Format_string_allocated_too_shor_ZL42__pyx_k_Format_string_allocated_too_shor_2_ZL40__pyx_k_Non_native_byte_order_not_suppor_ZL20__pyx_k_RuntimeError_ZL16__pyx_k_SkewCone_ZL18__pyx_k_ValueError_ZL10__pyx_k__3_ZL14__pyx_k_append_ZL13__pyx_k_areas_ZL13__pyx_k_array_ZL20__pyx_k_at_g_g_g_d_g_ZL25__pyx_k_big_number_matrix_ZL14__pyx_k_bisect_ZL19__pyx_k_bisect_left_ZL20__pyx_k_bisect_right_ZL18__pyx_k_chunk_objs_ZL18__pyx_k_chunk_size_ZL24__pyx_k_contains_surface_ZL12__pyx_k_data_ZL16__pyx_k_distance_ZL40__pyx_k_distance_to_position_4_with_ever_ZL42__pyx_k_distance_to_position_4_with_ever_2_ZL10__pyx_k_dx_ZL10__pyx_k_dy_ZL10__pyx_k_dz_ZL13__pyx_n_s_end_ZL11__pyx_k_end_ZL17__pyx_k_enumerate_ZL14__pyx_n_s_file_ZL12__pyx_k_file_ZL16__pyx_k_get_clip_ZL26__pyx_k_graphicsPrimitives_ZL40__pyx_k_grr_it_thinks_there_is_surface_w_ZL15__pyx_k_has_neg_ZL15__pyx_k_has_pos_ZL10__pyx_k_hi_ZL39__pyx_k_home_hines_neuron_nrn_share_lib_ZL10__pyx_k_i1_ZL27__pyx_k_i_e_global_item_d_r_ZL14__pyx_k_import_ZL26__pyx_k_internal_membranes_ZL13__pyx_k_isnan_ZL40__pyx_k_item_d_in_grid_d_d_d_contains_pr_ZL17__pyx_k_itertools_ZL9__pyx_k_j_ZL10__pyx_k_j1_ZL14__pyx_n_s_join_ZL12__pyx_k_join_ZL9__pyx_k_k_ZL10__pyx_k_k1_ZL14__pyx_n_s_keys_ZL12__pyx_k_keys_ZL39__pyx_k_last_obj_distance_to_position_4_ZL19__pyx_k_last_object_ZL10__pyx_k_lo_ZL16__pyx_k_local_xs_ZL16__pyx_k_local_ys_ZL16__pyx_k_local_zs_ZL12__pyx_k_main_ZL18__pyx_k_max_chunks_ZL11__pyx_k_min_ZL35__pyx_k_ndarray_is_not_C_contiguous_ZL40__pyx_k_ndarray_is_not_Fortran_contiguou_ZL16__pyx_k_neighbor_ZL14__pyx_k_neuron_ZL38__pyx_k_neuron_rxd_geometry3d_surfaces_ZL17__pyx_k_new_index_ZL13__pyx_k_numpy_ZL10__pyx_k_nx_ZL10__pyx_k_ny_ZL10__pyx_k_nz_ZL15__pyx_k_objdist_ZL15__pyx_k_objects_ZL10__pyx_k_os_ZL18__pyx_k_overlaps_x_ZL18__pyx_k_overlaps_y_ZL18__pyx_k_overlaps_z_ZL9__pyx_k_p_ZL13__pyx_n_s_pop_ZL11__pyx_k_pop_ZL16__pyx_k_position_ZL18__pyx_k_position_4_ZL18__pyx_k_primitives_ZL15__pyx_n_s_print_ZL13__pyx_k_print_ZL27__pyx_k_print_reject_reason_ZL20__pyx_k_print_values_ZL20__pyx_k_process_cell_ZL15__pyx_k_product_ZL10__pyx_k_pt_ZL15__pyx_k_r_inner_ZL15__pyx_k_r_outer_ZL13__pyx_k_range_ZL16__pyx_k_refcheck_ZL32__pyx_k_register_on_neighbor_map_ZL25__pyx_k_reject_if_outside_ZL14__pyx_k_resize_ZL12__pyx_k_size_ZL13__pyx_k_start_ZL23__pyx_k_starting_points_ZL19__pyx_k_store_areas_ZL11__pyx_k_sum_ZL12__pyx_k_test_ZL15__pyx_k_the_map_ZL26__pyx_k_tri_area_exception_ZL28__pyx_k_tri_volume_exception_ZL17__pyx_k_triangles_ZL15__pyx_k_tridata_ZL39__pyx_k_unknown_dtype_code_in_numpy_pxd_ZL14__pyx_k_value0_ZL14__pyx_k_value1_ZL14__pyx_k_value2_ZL14__pyx_k_value3_ZL14__pyx_k_value4_ZL14__pyx_k_value5_ZL14__pyx_k_value6_ZL14__pyx_k_value7_ZL16__pyx_n_s_values_ZL14__pyx_k_values_ZL26__pyx_k_volume_inside_cell_ZL40__pyx_k_would_normally_reject_because_at_ZL9__pyx_k_x_ZL10__pyx_k_x0_ZL10__pyx_k_x1_ZL39__pyx_k_x_y_z_7f_7f_7f_x1_y1_z1_7f_7f_7_ZL12__pyx_k_xbar_ZL11__pyx_k_xhi_ZL11__pyx_k_xlo_ZL14__pyx_k_xrange_ZL10__pyx_k_xs_ZL9__pyx_k_y_ZL10__pyx_k_y0_ZL10__pyx_k_y1_ZL12__pyx_k_ybar_ZL11__pyx_k_yhi_ZL11__pyx_k_ylo_ZL10__pyx_k_ys_ZL9__pyx_k_z_ZL10__pyx_k_z0_ZL10__pyx_k_z1_ZL12__pyx_k_zbar_ZL13__pyx_k_zeros_ZL11__pyx_k_zhi_ZL11__pyx_k_zip_ZL11__pyx_k_zlo_ZL10__pyx_k_zsmarching_cubes2.cllgramarea.c__FRAME_END____JCR_END____dso_handle_DYNAMIC__GNU_EH_FRAME_HDR__TMC_END___GLOBAL_OFFSET_TABLE_PyObject_SetItemPyUnicodeUCS4_DecodeUTF8PyList_NewPyString_FromStringAndSizePyExc_SystemErrorfree@@GLIBC_2.2.5PyDict_SizePyFile_SoftSpace__pyx_module_is_main_neuron__rxd__geometry3d__surfaces_Py_ZeroStructPyMethod_Type_ITM_deregisterTMCloneTablePyFloat_TypePyTuple_TypePyErr_RestorePyInt_AsSsize_tPyFrame_Newputs@@GLIBC_2.2.5triTablePyCFunction_NewExPyNumber_InPlaceAddPyBuffer_ReleasePy_InitModule4_64PyNumber_AddinitsurfacesPyDict_ContainsPyImport_AddModulePyObject_SetAttrStringPyErr_WarnEx_edataPyErr_NormalizeExceptionPyNumber_MultiplyPyFPE_jbufPyObject_RichComparePyCode_New_finiPyFPE_dummy__stack_chk_fail@@GLIBC_2.4PyExc_RuntimeErrorPyNumber_LongPyErr_GivenExceptionMatchesPyErr_SetStringPyObject_IsInstancePyObject_GetItemPyInt_FromSsize_tPyExc_ValueErrorPyExc_TypeErrorPyString_InternFromStringPySequence_ContainsPyMem_ReallocPyErr_ExceptionMatchesPyTraceBack_Type_PyThreadState_CurrentPyNumber_DividePyOS_snprintfPyTraceBack_HerePyFloat_FromDoublefind_trianglesPyFile_WriteObjectPyLong_AsSsize_tPyDict_GetItemPyFile_WriteString_setjmp@@GLIBC_2.2.5PyErr_ClearPyList_Append_Py_CheckRecursiveCall_Py_CheckRecursionLimitPyString_FromStringPyString_Type__gmon_start__PyTuple_NewPyExc_OverflowErrorPySys_GetObjectPyExc_FloatingPointErrorPyErr_OccurredPyLong_AsLongPyString_SizellgramareaPyString_AsStringedgeTablePyObject_CallFunctionObjArgsPyObject_Sizemalloc@@GLIBC_2.2.5vi_Py_NoneStructPyExc_ZeroDivisionErrorPyFloat_AsDoublePyObject_IsTruellpipedfromoriginvolumePyExc_BaseException_Py_TrueStructPyNumber_Int__bss_startPyLong_AsDouble__printf_chk@@GLIBC_2.3.4PyDict_NewPyObject_GetBuffer_PyString_EqPyString_FromFormatPyDict_NextPyInt_TypePyLong_TypePyDict_KeysPyErr_FetchPyObject_GetIterPyInt_FromLong_Jv_RegisterClassesPyExc_ImportErrorPyDict_SetItemPySequence_TuplePyExc_AttributeErrorPyExc_StopIterationPyObject_CallPyUnicode_TypePyType_IsSubtypePyErr_FormatPySlice_NewPyExc_NameErrorPyModule_GetDictPyFPE_counter_ITM_registerTMCloneTablePyString_FormatPyNumber_IndexPyObject_GetAttrsqrt@@GLIBC_2.2.5PyCFunction_TypePyBaseString_TypePyMem_Malloc_PyString_Join__cxa_finalize@@GLIBC_2.2.5_initPyNumber_SubtractPyUnicodeUCS4_ComparePyTuple_PackPyNumber_PowerPy_GetVersionPyUnicodeUCS4_FormatPyErr_WriteUnraisablePyList_TypePyImport_ImportPyNumber_FloorDividePyDict_Values.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.got.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_rangesÈÈ$.öÿÿoðð°8   ˜ @88q Hÿÿÿoªª"UþÿÿoÐÐ`d00X&nBˆAˆA¸x@J@Js`J`Jà~@P@P ‡`P`P*àzàz “{{ø_ ›øÚøÚ©Ýݼ³¸ü%¸ü¿Àü%ÀüËÈü%ÈüÐÐü%Ðüð‚Àþ%Àþ@Ù&â&h$ è€'&h'8 í0h'4öœ' <(ý>%  / ¢ +0¢8 >> mesh = geometry3d.voxelize(h.allsec()) Full example, using :mod:`pyplot`: >>> s1, s2, s3 = [h.Section() for i in xrange(3)] >>> for sec in [s2, s3]: ignore_return = sec.connect(s1) ... >>> for sec in h.allsec(): ... sec.diam = 1 ... sec.L = 5 ... >>> mesh = geometry3d.voxelize(h.allsec(), dx=.1) >>> for i in xrange(10): ... ignore_return = pyplot.subplot(2, 5, i + 1) ... ignore_return = pyplot.imshow(mesh.values[:, :, i]) ... ignore_return = pyplot.xticks([]) ... ignore_return = pyplot.yticks([]) ... >>> pyplot.show() .. plot:: from neuron import h from matplotlib import pyplot from . import geometry3d s1, s2, s3 = [h.Section() for i in xrange(3)] for sec in [s2, s3]: ignore_return = sec.connect(s1) for sec in h.allsec(): sec.diam = 1 sec.L = 5 mesh = geometry3d.voxelize(h.allsec(), dx=.1) for i in xrange(10): ignore_return = pyplot.subplot(2, 5, i + 1) ignore_return = pyplot.imshow(mesh.values[:, :, i]) ignore_return = pyplot.xticks([]) ignore_return = pyplot.yticks([]) pyplot.show() .. note:: The use of Import3D objects is recommended over lists of sections because the former preserves the soma outline information while the later does not. Up to one soma outline is currently supported. """ objects = ctng.constructive_neuronal_geometry(source, n_soma_step, dx) if xlo is None: xlo = min(obj.xlo for obj in objects) if ylo is None: ylo = min(obj.ylo for obj in objects) if zlo is None: zlo = min(obj.zlo for obj in objects) if xhi is None: xhi = max(obj.xhi for obj in objects) if yhi is None: yhi = max(obj.yhi for obj in objects) if zhi is None: zhi = max(obj.zhi for obj in objects) mesh = scalarField.ScalarField(xlo, xhi, ylo, yhi, zlo, zhi, dx, dtype='B') grid = mesh.values # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks chunk_size = max(10, int((len(mesh.xs) * len(mesh.ys) * len(mesh.zs) / _max_chunks) ** (1 / 3.))) chunk_objs, nx, ny, nz = chunkify(objects, mesh.xs, mesh.ys, mesh.zs, chunk_size, dx) for i, x in enumerate(mesh.xs): chunk_objsa = chunk_objs[i // chunk_size] for j, y in enumerate(mesh.ys): chunk_objsb = chunk_objsa[j // chunk_size] for k, z in enumerate(mesh.zs): grid[i, j, k] = is_inside(x, y, z, chunk_objsb[k // chunk_size]) return mesh # inside the neuron if inside of any of its parts def is_inside(x, y, z, active_objs): return 1 if any(obj(x, y, z) <= 0 for obj in active_objs) else 0 neuron-7.5/share/lib/python/neuron/rxd/geometry3d/voxelize2.py000066400000000000000000000147561323325274500245750ustar00rootroot00000000000000from . import ctng from . import scalarField import numpy from .surfaces import chunkify from . import surfaces from numpy.linalg import norm _max_chunks = 10000000 #TODO: should we expand this to also compute the area between neighboring nodes? def voxelize2(source, dx=0.25, xlo=None, xhi=None, ylo=None, yhi=None, zlo=None, zhi=None, n_soma_step=100): """ Generates a cartesian mesh of the volume of a neuron, together with discretized information on surface areas and volumes. This is more accurate than voxelize, which only checks the center point of a voxel, but it is slower. Parameters ---------- source : :func:`list`, ``nrn.SectionList``, or ``nrn.Import3D`` The geometry to mesh. dx : double, optional Mesh step size. xlo : double, optional Minimum x value. If omitted or None, uses minimum x value in the geometry. xhi : double, optional Maximum x value. If omitted or None, uses maximum x value in the geometry. ylo : double, optional Minimum y value. If omitted or None, uses minimum y value in the geometry. yhi : double, optional Maximum y value. If omitted or None, uses maximum y value in the geometry. zlo : double, optional Minimum z value. If omitted or None, uses minimum z value in the geometry. zhi : double, optional Maximum z value. If omitted or None, uses maximum z value in the geometry. n_soma_step : integer, optional Number of pieces to slice a soma outline into. Returns ------- mesh : :class:`ScalarField` The mesh. Values are scalars, but may be used as True inside the geometry and False outside. surface_areas : :class:`ScalarField` The total surface area passing through the node. volumes : :class:`ScalarField` The volume of the neuron contained in the given node. Examples -------- Basic usage: >>> mesh, surface_areas, volumes = geometry3d.voxelize2(h.allsec()) Full example, using :mod:`pyplot`: >>> s1, s2, s3 = [h.Section() for i in xrange(3)] >>> for sec in [s2, s3]: ignore_return = sec.connect(s1) ... >>> for sec in h.allsec(): ... sec.diam = 1 ... sec.L = 5 ... >>> mesh = geometry3d.voxelize2(h.allsec(), dx=.1)[0] >>> for i in xrange(10): ... ignore_return = pyplot.subplot(2, 5, i + 1) ... ignore_return = pyplot.imshow(mesh.values[:, :, i]) ... ignore_return = pyplot.xticks([]) ... ignore_return = pyplot.yticks([]) ... >>> pyplot.show() .. plot:: from neuron import h from matplotlib import pyplot from . import geometry3d s1, s2, s3 = [h.Section() for i in xrange(3)] for sec in [s2, s3]: ignore_return = sec.connect(s1) for sec in h.allsec(): sec.diam = 1 sec.L = 5 mesh = geometry3d.voxelize2(h.allsec(), dx=.1)[0] for i in xrange(10): ignore_return = pyplot.subplot(2, 5, i + 1) ignore_return = pyplot.imshow(mesh.values[:, :, i]) ignore_return = pyplot.xticks([]) ignore_return = pyplot.yticks([]) pyplot.show() .. note:: The use of Import3D objects is recommended over lists of sections because the former preserves the soma outline information while the later does not. Up to one soma outline is currently supported. """ objects = ctng.constructive_neuronal_geometry(source, n_soma_step, dx) if xlo is None: xlo = min(obj.xlo for obj in objects) - 3 * dx if ylo is None: ylo = min(obj.ylo for obj in objects) - 3 * dx if zlo is None: zlo = min(obj.zlo for obj in objects) - 3 * dx if xhi is None: xhi = max(obj.xhi for obj in objects) + 3 * dx if yhi is None: yhi = max(obj.yhi for obj in objects) + 3 * dx if zhi is None: zhi = max(obj.zhi for obj in objects) + 3 * dx mesh = scalarField.ScalarField(xlo, xhi, ylo, yhi, zlo, zhi, dx, dtype='B') grid = mesh.values xs, ys, zs = mesh.xs, mesh.ys, mesh.zs # use chunks no smaller than 10 voxels across, but aim for max_chunks chunks chunk_size = max(10, int((len(mesh.xs) * len(mesh.ys) * len(mesh.zs) / _max_chunks) ** (1 / 3.))) chunk_objs, nx, ny, nz = chunkify(objects, mesh.xs, mesh.ys, mesh.zs, chunk_size, dx) # this is the crude volumetric approach shared with voxelize for i, x in enumerate(mesh.xs): chunk_objsa = chunk_objs[i // chunk_size] for j, y in enumerate(mesh.ys): chunk_objsb = chunk_objsa[j // chunk_size] for k, z in enumerate(mesh.zs): grid[i, j, k] = is_inside(x, y, z, chunk_objsb[k // chunk_size]) surface_areas = scalarField.ScalarField(xlo, xhi, ylo, yhi, zlo, zhi, dx) sa_grid = surface_areas.values # triangulate the surface triangles = surfaces._triangulate_surface_given_chunks(objects, xs, ys, zs, False, chunk_size, chunk_objs, nx, ny, nz, True, sa_grid) # for each triangle, compute the area. Add it to the appropriate spots in sa_grid # TODO: move this to C? or at least cythonize it? for tdata in triangles.reshape(len(triangles) / 9, 9): v0, v1, v2 = tdata[0 : 3], tdata[3 : 6], tdata[6 : 9] centerx, centery, centerz = (v0 + v1 + v2) / 3 i, j, k = (centerx - xlo) / dx, (centery - ylo) / dx, (centerz - zlo) / dx sa_grid[i, j, k] += 0.5 * norm(numpy.cross(v1 - v0, v2 - v0)) # now ensure that any grid containing surface is included in the voxelization # TODO: change this when supporting multiple non-overlapping regions in one 3d Domain grid[sa_grid.nonzero()] = 1 volumes = scalarField.ScalarField(xlo, xhi, ylo, yhi, zlo, zhi, dx) volume_values = volumes.values # TODO: compute the correct partial volumes for nodes on the boundary # start out with the full volumes for every place that contains volume volume_values[grid.nonzero()] = dx ** 3 # correct the boundary node volumes #surface_nodes = sa_grid.nonzero() #for i, j, k in zip(*surface_nodes): # volume_values[i, j, k] = surfaces.volume_inside_cell(i, j, k, chunk_objs[i // chunk_size][j // chunk_size][k // chunk_size], xs, ys, zs) return mesh, surface_areas, volumes, triangles.reshape(len(triangles) / 9, 9) # inside the neuron if inside of any of its parts def is_inside(x, y, z, active_objs): return 1 if any(obj(x, y, z) <= 0 for obj in active_objs) else 0 neuron-7.5/share/lib/python/neuron/rxd/gui.py000066400000000000000000001455451323325274500213510ustar00rootroot00000000000000from neuron import h, hoc import numpy import neuron from .rxdException import RxDException regions = {} species = {} all_reactions = {} rxd_builder_tab = 1 has_instantiated = False rxd_builder_left = 20 rxd_builder_width = 550 rxd_builder_top = 100 rxd_builder_height = 400 h.load_file('stdlib.hoc') default_region = {'morphology': 'No Sections', 'geometry': 'Inside'} def _instantiate_regions(regions): seclist_names, seclist_map = get_sectionlists() for name, data in zip(list(regions.keys()), list(regions.values())): region_spec = '' seclist = data.get('morphology', 'No Sections') if seclist == 'No Sections': seclist = '[]' elif seclist == 'All Sections': seclist = 'h.allsec()' elif seclist in seclist_map: seclist = 'h.SectionList[%d]' % seclist_map[seclist] else: raise RxDException('Invalid region: %r' % data) geo = data.get('geometry', None) # TODO: do this without if statements in a way that lets geometries register themselves if geo is None: raise RxDException('Missing geometry for region %r' % data) if geo == 'Inside': geo = 'inside' elif geo == 'Fractional Volume': geo = 'FractionalVolume(volume_fraction=%g, surface_fraction=%g, neighbor_areas_fraction=%g)' % (data.get('vf', 1), data.get('sf', 0), data.get('nf', 1)) elif geo == 'Constant 2D Area/Length': geo = 'FixedPerimeter(%g, on_cell_surface=%r)' % (data.get('perim', 1), data.get('onsurf', False)) elif geo == 'Constant 3D Vol/Length': geo = 'FixedCrossSection(%g, surface_area=%g)' % (data.get('carea', 1), data.get('csurf', 0)) elif geo == 'Membrane': geo = 'membrane' elif geo == 'Shell': geo = 'Shell(lo=%g, hi=%g)' % (data.get('lo', 0), data.get('hi', 1)) else: raise RxDException('Unrecognized geometry: %s' % geo) nrn_region = data.get('nrn_region', None) command = '%s = rxd.Region(%s, geometry=rxd.%s, nrn_region=%r)' % (name, seclist, geo, nrn_region) exec(command, globals()) def _instantiate_species(species): for name, data in zip(list(species.keys()), list(species.values())): regions = data.get('regions', []) regions = '[%s]' % ','.join(regions) command = '%s = rxd.Species(%s, d=%g, name="%s", charge=%g)' % (name, regions, data.get('d', 0), name, data.get('charge', 0)) exec(command, globals()) def _construct_side(items): result = [] for item in items: if item[1] == 1: result.append(item[0]) elif item[1] != 0: result.append('%g * %s' % (item[1], item[0])) return ' + '.join(result) def _construct_schema(lhs, rhs): return '%s <> %s' % (_construct_side(lhs), _construct_side(rhs)) def _instantiate_reactions(reactions): for name, data in zip(list(reactions.keys()), list(reactions.values())): reaction_spec = '' if 'type' not in data: raise RxDException('No reaction type for: %r' % data) if 'active' not in data or not data['active']: continue kind = data['type'].lower() if kind == 'rate': reaction_spec = 'Rate(%s, %s)' % (data['species'], data['kf']) elif kind == 'multicompartmentreaction': reaction_spec = 'MultiCompartmentReaction(%s, %s, %s, membrane=%s, custom_dynamics=%r, membrane_flux=%r, scale_by_area=%r)' % (_construct_schema(data['lhs'], data['rhs']), data.get('kf', 0), data.get('kb', 0), data['membrane'], not data.get('massaction', True), data.get('membrane_current', False), data.get('scale_with_area', True)) elif kind == 'reaction': reaction_spec = 'Reaction(%s, %s, %s, custom_dynamics=%r)' % (_construct_schema(data['lhs'], data['rhs']), data.get('kf', 0), data.get('kb', 0), not data.get('massaction', True)) command = '%s = rxd.%s' % (name, reaction_spec) exec(command, globals()) def _instantiate(): global has_instantiated if has_instantiated: h.continue_dialog('Cannot reinstantiate yet.') else: has_instantiated = True exec('from neuron import rxd', globals()) _instantiate_regions(regions) _instantiate_species(species) _instantiate_reactions(all_reactions) def get_sectionlists(): found_sectionlists = {} results = [] result_mapping = {} # start with the HOC names for item in dir(h): if item == 'nseg': continue try: name = h.__getattribute__(item).hname() except: continue if name[:12] != 'SectionList[': continue found_sectionlists[name] = 0 result_mapping[item] = int(name[12:].split(']')[0]) results.append(item) # add Python names, if any # TODO: is there a better place to look besides globals? g = globals() for item, value in zip(list(g.keys()), list(g.values())): if type(value) == hoc.HocObject: try: name = value.hname() except: pass else: if name[:12] == 'SectionList[': found_sectionlists[name] = 0 result_mapping[item] = int(name[12:].split(']')[0]) results.append(item) # sort these results = sorted(results, key=lambda s: s.lower()) # end with the anonymous lists (this probably includes things from cellbuilder) # handle any sectionlists without good hoc names ell = h.List('SectionList') for i in range(int(ell.count())): name = ell.object(i).hname() if name not in found_sectionlists: result_mapping[name] = int(name[12:].split(']')[0]) results.append(name) return results, result_mapping class _PartialSelector: def select(self, name): try: i = self.names.index(name) self.ell.select(i) self.currently_selected = name except: self.ell.select(-1) def selected(self): i = int(self.ell.selected()) if i == -1: return None return self.names[i] def select_action(self, action): self.ell.select_action(action) # this is a way of faking the Singleton pattern def ReactionEditor(): _the_reaction_editor = RxDBuilder()._the_reaction_editor if not _the_reaction_editor.is_mapped: _the_reaction_editor.map() return _the_reaction_editor _the_morphology_pane = None def MorphologyPane(): global _the_morphology_pane if _the_morphology_pane is None: _the_morphology_pane = _MorphologyPane() _the_morphology_pane.map() return _the_morphology_pane def RxDBuilder(left=None, top=None, width=None, height=None, visible=True): global _the_rxd_builder, rxd_builder_left, rxd_builder_width, rxd_builder_height, rxd_builder_top if left is not None: rxd_builder_left = left if top is not None: rxd_builder_top = top if width is not None: rxd_builder_width = width if height is not None: rxd_builder_height = height if _the_rxd_builder is None: _the_rxd_builder = _RxDBuilder() if not _the_rxd_builder.is_mapped and visible: _the_rxd_builder.map() return _the_rxd_builder class FractionalVolumeOptions: def __init__(self): self.set_options({}) h.xpanel('') h.xvalue('Volume Fraction', (self, 'vf')) h.xvalue('Surface Fraction', (self, 'sf')) h.xvalue('Neighbor Fraction', (self, 'nf')) h.xpanel() def get_options(self): return {'vf': self.vf, 'nf': self.nf, 'sf': self.sf} def set_options(self, opt): self.vf = opt.get('vf', 1) self.nf = opt.get('nf', 1) self.sf = opt.get('sf', 1) info = ('Fractional Volume is used to represent regions that are intermixed\n' 'in a nontrivial way.\n' '\n' 'It is likely that in most cases the volume fraction and the\n' 'neighbor fraction will both represent the cross-sectional area\n' 'fraction, and so therefore should be equal. The surface fraction\n' 'is the fraction of the surface area that belongs to this region.\n' 'For example, if this is used to represent the ER, then the\n' 'surface fraction should be zero.') class GeoSelector: text = {1: 'Inside', 2: 'Membrane', 3: 'Fractional Volume', 4: 'Shell', 5: 'Constant 2D Area/Length', 6: 'Constant 3D Vol/Length'} def select_by_name(self, name): click_map = {'Inside': self.click_inside, 'Membrane': self.click_membrane, 'Fractional Volume': self.click_fractional, 'Shell': self.click_shell, 'Constant 2D Area/Length': self.click_constarea, 'Constant 3D Vol/Length': self.click_constvol} click_map.get(name, self.clear_checkboxes)() def clear_checkboxes(self): self.inside_checkbox = 0 self.membrane_checkbox = 0. self.fractional_checkbox = 0. self.shell_checkbox = 0. self.constantarea_checkbox = 0. self.constantvol_checkbox = 0. def __init__(self): self.clear_checkboxes() self.callback = _do_nothing self.option = 1 self.inside_checkbox = 1 h.xpanel('') h.xcheckbox('Inside', (self, 'inside_checkbox'), self.click_inside) h.xcheckbox('Membrane', (self, 'membrane_checkbox'), self.click_membrane) h.xcheckbox('Fractional Volume', (self, 'fractional_checkbox'), self.click_fractional) h.xcheckbox('Shell', (self, 'shell_checkbox'), self.click_shell) h.xcheckbox('Constant 2D Area/Length', (self, 'constantarea_checkbox'), self.click_constarea) h.xcheckbox('Constant 3D Vol/Length', (self, 'constantvol_checkbox'), self.click_constvol) h.xpanel() def click_inside(self): self.clear_checkboxes() self.inside_checkbox = 1 self.option = 1 self.callback() def click_membrane(self): self.clear_checkboxes() self.membrane_checkbox = 1 self.option = 2 self.callback() def click_fractional(self): self.clear_checkboxes() self.fractional_checkbox = 1 self.option = 3 self.callback() def click_shell(self): self.clear_checkboxes() self.shell_checkbox = 1 self.option = 4 self.callback() def click_constarea(self): self.clear_checkboxes() self.constantarea_checkbox = 1 self.option = 5 self.callback() def click_constvol(self): self.clear_checkboxes() self.constantvol_checkbox = 1 self.option = 6 self.callback() class InsideOptions: def __init__(self): h.xpanel('') h.xlabel('No options.') h.xpanel() info = 'The interior of the selected portions of the cell.' def get_options(self): return {} def set_options(self, opt): pass is_boundary = False def is_valid(self): return True class MembraneOptions: def __init__(self): h.xpanel('') h.xlabel('No options.') h.xpanel() info = 'The membrane of the selected portions of the cell.' def get_options(self): return {} def set_options(self, opt): pass is_boundary = True def is_valid(self): return True class ShellOptions: def __init__(self): self.set_options({}) h.xpanel('') h.xvalue('lo', (self, 'lo')) h.xvalue('hi', (self, 'hi')) h.xpanel() info = ('Shells. lo and hi denote fractional distances along the radius,\n' 'with the center of the dendrite as 0 and the surface as 1.') def get_options(self): return {'lo': self.lo, 'hi': self.hi} def set_options(self, opt): self.lo = opt.get('lo', 0) self.hi = opt.get('hi', 1) is_boundary = False def is_valid(self): return True class ConstAreaOptions: def __init__(self): h.xpanel('') h.xlabel('Const area options.') h.xpanel() info = 'A fixed membrane size.' def __init__(self): self.set_options({}) h.xpanel('') h.xvalue('Perimeter', (self, 'perim')) h.xcheckbox('On surface?', (self, 'onsurf')) h.xpanel() def get_options(self): return {'perim': self.perim, 'onsurf': self.onsurf} def set_options(self, opt): self.perim = opt.get('perim', 1) self.onsurf = opt.get('onsurf', 0) is_boundary = True def is_valid(self): return True class ConstVolOptions: # rxd.FixedCrossSection def __init__(self): self.set_options({}) h.xpanel('') h.xvalue('Cross-Sectional Area', (self, 'carea')) h.xvalue('Surface Area/length', (self, 'csurf')) h.xpanel() def get_options(self): return {'csurf': self.csurf, 'carea': self.carea} def set_options(self, opt): self.csurf = opt.get('csurf', 0) self.carea = opt.get('carea', 1) is_boundary = False info = ('Use constant volume only when you want to neglect diameter effects,\n' 'such as for point models. In particular, avoid this geometry when the\n' 'diameter varies.') def is_valid(self): return True class RegionPane: def __init__(self): self.hbox1 = h.HBox(3) self.hbox1.intercept(1) self.vbox1 = h.VBox(3) self.vbox1.intercept(1) self.region_list = RegionList(None) h.xpanel('') h.xbutton('Delete', self.delete) h.xpanel() self.vbox1.intercept(0) self.vbox1.map() self.vbox2 = h.VBox(3) self.vbox2.intercept(1) h.xpanel('') h.xlabel('Name:') h.xpanel() self.vbox2.adjuster(15) self.name_editor = h.TextEditor('', 1, 30) self.name_editor.map() self.nrnregion_selector = NrnRegionSelector() h.xpanel('') h.xlabel('Select Geometry:') h.xpanel() self.hbox2 = h.HBox(3) self.hbox2.intercept(1) self.geoselector = GeoSelector() self.geoselector.callback = self.geo_switched self.deck = h.Deck(3) self.deck.intercept(1) self.option_constructors = [InsideOptions, MembraneOptions, FractionalVolumeOptions, ShellOptions, ConstAreaOptions, ConstVolOptions] self.option_panels = [] for panel in self.option_constructors: v = h.VBox(3) v.intercept(1) self.option_panels.append(panel()) # texteditor persists even if not saved spacer = h.TextEditor('', 1, 30) spacer.readonly(1) spacer.map() h.xpanel('') h.xbutton('Information', self.info) h.xpanel() v.intercept(0) v.map() # vboxes persist even when not saving a reference self.deck.intercept(0) self.deck.flip_to(0) self.deck.map() self.hbox2.intercept(0) self.hbox2.map() h.xpanel('', 1) h.xbutton('Revert', self.update) h.xbutton('Save', self.save) h.xpanel() self.vbox2.intercept(0) self.vbox2.map() self.hbox1.intercept(0) self.hbox1.map() self.update() self.region_list.select_action(self.update) self.region_list.select('(NEW)') self.update() def info(self): h.xpanel('Information on %s' % self.geoselector.text[self.geoselector.option]) option_panel = self.option_panels[self.geoselector.option - 1] for line in option_panel.info.split('\n'): h.xlabel(line) h.xpanel() def geo_switched(self): # called whenever the geometry has been switched geo_type_id = self.geoselector.option - 1 self.deck.flip_to(geo_type_id) region_name = self.region_list.selected() region_info = regions.get(region_name, default_region) self.option_panels[geo_type_id].set_options(region_info) def update(self): # update the names self.region_list.select_action('') selected = self.region_list.selected() region_names = sorted(list(regions.keys()), key=lambda s: s.lower()) region_names = ['(NEW)'] + region_names self.region_list.set_list(region_names) if selected is not None: self.region_list.select(selected) self.update_right_panel() self.region_list.select_action(self.update) def update_right_panel(self): region_name = self.region_list.selected() if region_name is None or region_name == '(NEW)': self.name_editor.text('') else: self.name_editor.text(region_name) region_info = regions.get(region_name, default_region) self.nrnregion_selector.select(region_info.get('nrn_region', None)) self.geoselector.select_by_name(region_info.get('geometry', 'Inside')) def save(self): region_name = self.name_editor.text() if not region_name.strip(): h.continue_dialog('A name is required.') return if region_name in regions: morphology = regions[region_name].get('morphology', 'No Sections') else: morphology = 'No Sections' regions[region_name] = {'morphology': morphology, 'geometry': self.geoselector.text[self.geoselector.option]} geo_type_id = self.geoselector.option - 1 regions[region_name].update(self.option_panels[geo_type_id].get_options()) regions[region_name]['nrn_region'] = self.nrnregion_selector.selected() _the_rxd_builder.update() self.region_list.select(region_name) def delete(self): region_name = self.region_list.selected() if region_name in regions: del regions[region_name] _the_rxd_builder.update() class InstantiatePane: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel('You may want to save your work (File -> Save Session) before') h.xlabel('instantiating, as there is currently no way to make changes') h.xlabel('after the RxD model has been instantiated.') h.xpanel() self.spacer = h.TextEditor('', 1, 30) self.spacer.readonly(1) self.spacer.map() h.xpanel('', 1) h.xlabel('When you are ready, click: ') h.xbutton('Instantiate', _instantiate) h.xpanel() self.vbox.intercept(0) self.vbox.map() class _RxDBuilder: def __init__(self): global rxd_builder_tab self.vbox = h.VBox(3) self.vbox.intercept(1) if rxd_builder_tab not in [1, 2, 3, 4, 5]: rxd_builder_tab = 1 h.xpanel('', 1) h.xradiobutton('Regions ', self.regions, 1 if rxd_builder_tab == 1 else 0) h.xradiobutton('Species ', self.species, 1 if rxd_builder_tab == 2 else 0) h.xradiobutton('Reactions ', self.reactions, 1 if rxd_builder_tab == 3 else 0) h.xradiobutton('Morphology ', self.morphology, 1 if rxd_builder_tab == 4 else 0) h.xradiobutton('Instantiate', self.instantiate, 1 if rxd_builder_tab == 5 else 0) h.xpanel() self.deck = h.Deck() self.deck.intercept(1) self.regionpane = RegionPane() self.speciespane = SpeciesPane() self.reactionpane = ReactionPane() self.morphologypane = MorphologyPane() self.instantiatepane = InstantiatePane() self._the_reaction_editor = _ReactionEditor() self.deck.intercept(0) self.deck.map() self.deck.flip_to(rxd_builder_tab - 1) self.vbox.save(self.save) self.vbox.intercept(0) self.vbox.full_request(1) @property def is_mapped(self): return self.vbox.ismapped() def map(self, name=None, left=None, top=None, width=None, height=None): if self.is_mapped: return if name is None: if rxd_builder_left is None: self.vbox.map('RxD Builder') else: self.vbox.map('RxD Builder', rxd_builder_left, rxd_builder_top, rxd_builder_width, rxd_builder_height) else: self.vbox.map(name, left, top, width, height) def save(self): self.vbox.save('nrnpython("import neuron.rxd.gui")') self.vbox.save('nrnpython("neuron.rxd.gui.regions = %r")' % regions) self.vbox.save('nrnpython("neuron.rxd.gui.species = %r")' % species) self.vbox.save('nrnpython("neuron.rxd.gui.all_reactions = %r")' % all_reactions) self.vbox.save('nrnpython("neuron.rxd.gui.rxd_builder_tab = %r")' % rxd_builder_tab) self.vbox.save('nrnpython("neuron.rxd.gui.has_instantiated = %r")' % has_instantiated) self.vbox.save('nrnpython("from neuron import h")') self.vbox.save('nrnpython("h.ocbox_ = neuron.rxd.gui.RxDBuilder(visible=False)")') if has_instantiated: self.vbox.save('nrnpython("h.ocbox_.instantiate()")') def regions(self): global rxd_builder_tab rxd_builder_tab = 1 self.deck.flip_to(0) def species(self): global rxd_builder_tab rxd_builder_tab = 2 self.deck.flip_to(1) self.vbox.full_request(1) def reactions(self): global rxd_builder_tab rxd_builder_tab = 3 self.deck.flip_to(2) def morphology(self): global rxd_builder_tab rxd_builder_tab = 4 self.deck.flip_to(3) self.morphologypane.update() def instantiate(self): global rxd_builder_tab rxd_builder_tab = 5 self.deck.flip_to(4) #self.instantiatepane.update() def update(self): self.morphologypane.update() self.regionpane.update() self.speciespane.update() self._the_reaction_editor.update() _the_rxd_builder = None class NrnRegionSelector: def __init__(self): h.xpanel('NrnRegionSelector', 1) h.xlabel('Electrophysiology region: ') self.opt1, self.opt2, self.opt3 = 0, 0, 1 h.xcheckbox('(I)nside ', (self, 'opt1'), self._click_inside) h.xcheckbox('(O)utside ', (self, 'opt2'), self._click_outside) h.xcheckbox('Neither', (self, 'opt3'), self._click_neither) h.xpanel() def _click_inside(self): self.opt1, self.opt2, self.opt3 = 1, 0, 0 self.region = 'i' def _click_outside(self): self.opt1, self.opt2, self.opt3 = 0, 1, 0 self.region = 'o' def _click_neither(self): self.opt1, self.opt2, self.opt3 = 0, 0, 1 self.region = None def selected(self): return self.region def select(self, name): if name == 'i': self._click_inside() elif name == 'o': self._click_outside() else: self._click_neither() class SectionListSelector(_PartialSelector): def __init__(self): self.ell = h.List() self.ell.browser('title', 's') self.update() self.ell.select(-1) def update(self, select=None): was_selected = self.selected() self.ell.remove_all() self.names, self.mapping = get_sectionlists() self.names = ['No Sections', 'All Sections'] + self.names for name in self.names: self._append(name) # restore selection if possible if was_selected is None: self.ell.select(-1) else: self.select(was_selected) def _append(self, name): self.ell.append(h.String(name)) class SpeciesSelectorWithRegions(_PartialSelector): def __init__(self, allow_without_region, allow_with_region): self.allow_without_region = allow_without_region self.allow_with_region = allow_with_region self.ell = h.List() self.ell.browser('title', 's') self.update() def update(self): self.ell.remove_all() self.names = [] for s in species: if self.allow_without_region: self.names.append(s) if self.allow_with_region: for r in species[s]['regions']: self.names.append('%s[%s]' % (s, r)) self.names = sorted(self.names, key=lambda s: s.lower()) for name in self.names: self._append(name) def _append(self, name): self.ell.append(h.String(name)) class MembraneSelector(_PartialSelector): def __init__(self): self.ell = h.List() self.ell.browser('title', 's') self.update() def update(self): selected = self.selected() boundary_types = ('Membrane', 'Constant 2D Area/Length') self.ell.remove_all() self.names = [name for name, data in zip(list(regions.keys()), list(regions.values())) if data['geometry'] in boundary_types] self.names = sorted(self.names, key=lambda s: s.lower()) for name in self.names: self._append(name) self.select(selected) def _append(self, name): self.ell.append(h.String(name)) class RegionList(_PartialSelector): def __init__(self, title, names=[]): self.vbox = h.VBox(3) self.vbox.intercept(1) if title is not None: h.xpanel('regionlist') h.xlabel(title) h.xpanel() self.ell = h.List() self.set_list(names) self.ell.browser('title', 's') self.vbox.intercept(0) self.vbox.map() def append(self, name): self.ell.append(h.String(name)) self.names.append(name) def remove(self, name): try: i = self.names.index(name) except ValueError: return self.ell.remove(i) del self.names[i] def set_list(self, names): self.names = [] self.ell.remove_all() for name in names: self.append(name) class _MorphologyPane: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel('Select the morphology corresponding to each region') h.xpanel() self.hbox = h.HBox(3) self.hbox.intercept(1) self.region_list = RegionList(None) self.sectionlist_selector = SectionListSelector() self.sectionlist_selector.select_action(self.change_morphology_association) self.shape_plot = h.Shape() self.shape_plot.show(1) self.hbox.intercept(0) self.hbox.map() self.vbox.intercept(0) def map(self): self.vbox.map('Morphology Pane') def change_morphology_association(self): region_name = self.region_list.selected() morph_name = self.sectionlist_selector.selected() if region_name in regions: regions[region_name]['morphology'] = morph_name if morph_name == 'No Sections': self.shape_plot.color_all(1) elif morph_name == 'All Sections': self.shape_plot.color_all(2) else: self.shape_plot.color_all(1) self.shape_plot.color_list(h.SectionList[self.sectionlist_selector.mapping[morph_name]], 2) def update(self): # update the names self.region_list.select_action('') selected = self.region_list.selected() region_names = sorted(list(regions.keys()), key=lambda s: s.lower()) self.region_list.set_list(region_names) if selected is not None: self.region_list.select(selected) self.update_right_panel() self.region_list.select_action(self.update) self.sectionlist_selector.select_action('') self.sectionlist_selector.update() self.sectionlist_selector.select_action(self.change_morphology_association) self.change_morphology_association() def update_right_panel(self): if self.region_list.selected() is None: if self.region_list.names: self.region_list.select(self.region_list.names[0]) if self.region_list.selected() is not None: region = regions[self.region_list.selected()] self.sectionlist_selector.select(region.get('morphology', 'No Sections')) else: self.sectionlist_selector.select('No Sections') class RegionSelector(): def __init__(self, name): self.name = name selected = species[name]['regions'] self._setup_left_right(selected) self.region_selector = h.HBox(3) self.region_selector.intercept(1) self.left_list = RegionList('Nonselected Regions') self.arrow_col = h.VBox(3) self.arrow_col.intercept(1) self.arrow_panel = h.xpanel('') h.xlabel('') h.xlabel('') self.right_arrow = h.xbutton(">", self._do_right_arrow) self.left_arrow = h.xbutton("<", self._do_left_arrow) h.xlabel('') h.xlabel('') h.xpanel() self.arrow_col.intercept(0) self.arrow_col.map() self.right_list = RegionList('Selected Regions') self.region_selector.intercept(0) self.region_selector.map() self._update_lists() def _update_lists(self): self.left_list.set_list(self.left_list_items) self.right_list.set_list(self.right_list_items) def _update_regions(self): species[self.name]['regions'] = self.right_list.names def _setup_left_right(self, right): left = list(regions.keys()) right = list(right) # only keep those things that belong to the full region names # but don't put anything kept on the left for item in right: if item not in left: right.remove(item) else: left.remove(item) self.left_list_items = left self.right_list_items = right def _do_left_arrow(self): name = self.right_list.selected() if name is None: return self.right_list.remove(name) self.left_list.append(name) self._update_regions() def _do_right_arrow(self): name = self.left_list.selected() if name is None: return self.left_list.remove(name) self.right_list.append(name) self._update_regions() def selected(self): return list(self.right_list.names) class SpeciesLocator: def __init__(self, name): self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel(name) h.xpanel() self.regions_selector = RegionSelector(name) self.vbox.intercept(0) self.vbox.map() self.name = name def regions(self): return self.regions_selector.selected() class SpeciesPanel: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) self.species_locs = {} for i, name in enumerate(species.keys()): if i: h.xpanel('') h.xlabel('') h.xpanel() self.species_locs[name] = SpeciesLocator(name) self.vbox.intercept(0) self.vbox.map() def regions(self): return dict([(name, loc.regions()) for name, loc in zip(list(self.species_locs.keys()), list(self.species_locs.values()))]) class _SpeciesEditor: def __init__(self): self.hbox = h.HBox(3) self.hbox.save('') self.hbox.intercept(1) self.vbox = h.VBox(3) self.vbox.intercept(1) self.ell = h.List() self._set_list() self.ell.browser('', 's') self.ell.select(0) h.xpanel('') h.xbutton('Delete', self._delete) h.xpanel() self.vbox.intercept(0) self.vbox.map() self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel('Name') h.xpanel() self.vbox.adjuster(15) self.name_editor = h.TextEditor('', 1, 30) self.name_editor.map() self._set_values('', 0, 0) h.xpanel('') h.xvalue('Charge', (self, 'charge')) h.xvalue('Diff Const', (self, 'd')) h.xpanel() h.xpanel('', 1) h.xbutton('Revert', self._revert) h.xbutton('Save', self._save) h.xpanel() self.vbox.intercept(0) self.vbox.map() self.hbox.intercept(0) self.ell.select_action(self._new_or_display, 1) def _new_or_display(self): if self.selected() is None: self._set_values('', 0, 0) else: self._revert() def _set_values(self, name, charge, diff): self.charge = charge self.d = diff self.name_editor.text(name) def _revert(self): name = self.selected() if name is not None: data = species[name] self._set_values(name, data['charge'], data['d']) else: h.continue_dialog('Nothing to revert to') def _save(self): name = self.name_editor.text() if not name: h.continue_dialog('Must enter a name to save') else: if name in species: regions = species[name]['regions'] else: regions = [] species[name] = {'charge': self.charge, 'd': self.d, 'regions': regions} self._set_list() self._select(name) def _delete(self): name = self.selected() if name is not None: del species[name] self._set_list() else: h.continue_dialog('Nothing to delete') self._new_or_display() def _set_list(self, do_update=True): self.ell.remove_all() self.append('(NEW)') self._names = list(species.keys()) self._names.sort() for name in self._names: self.append(name) if do_update: try: species_pane_update() except NameError: pass def append(self, name): self.ell.append(h.String(name)) def _select(self, name): self.ell.select(1 + self._names.index(name)) def selected(self): item = int(self.ell.selected()) if item == -1 or item == 0: return None return self._names[item - 1] @property def is_mapped(self): return self.hbox.ismapped() def map(self): self.hbox.map('Species Editor') _the_species_editor = _SpeciesEditor() # this is a way of faking the Singleton pattern def SpeciesEditor(): if not _the_species_editor.is_mapped: _the_species_editor.map() _the_species_editor._set_list(do_update=False) # select (NEW) _the_species_editor.ell.select(0) class _SpeciesPane: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel('Edit Species and Select Regions for Each Species') h.xbutton('Species Editor', SpeciesEditor) h.xpanel() self.deck = h.Deck() self.deck.intercept(1) self.speciespanel = SpeciesPanel() self.deck.intercept(0) self.deck.map() self.deck.flip_to(0) self.vbox.intercept(0) def _update_panel(self): self.deck.remove_last() self.deck.intercept(1) self.speciespanel = SpeciesPanel() self.deck.intercept(0) self.deck.flip_to(0) def update(self): self._update_panel() @property def is_mapped(self): return self.vbox.ismapped() def map(self): self.vbox.map('Species Pane') _the_species_pane = _SpeciesPane() # this is a way of faking the Singleton pattern def SpeciesPane(): _the_species_pane = _SpeciesPane() _the_species_pane.map() return _the_species_pane def species_pane_update(): global _the_rxd_builder # print 'species_pane_update' if _the_rxd_builder: deck = _the_rxd_builder.deck # print deck.hname() deck.remove(1) deck.intercept(1) _the_rxd_builder.speciespane = SpeciesPane() deck.intercept(0) deck.move_last(1) deck.flip_to(rxd_builder_tab - 1) class SpeciesMultiSelector: def __init__(self, selector, allow_with_region=False, allow_without_region=True): self.selector = selector self.vbox = h.VBox(3) self.vbox.intercept(1) self.ell = h.List() self.names = [] if allow_without_region: self.names += list(species.keys()) if allow_with_region: for s in list(species.keys()): for r in species[s]['regions']: self.names.append('%s[%s]' % (s, r)) self.names.sort() for name in self.names: self.ell.append(h.String(name)) self.ell.browser('title', 's') self.data = numpy.zeros(1) h.xpanel('') h.xpvalue('Multiplicity', neuron.numpy_element_ref(self.data, 0)) h.xpanel() h.xpanel('', 1) h.xbutton('Cancel', self._cancel) h.xbutton('Accept', self._accept) h.xpanel() self.vbox.intercept(0) self.vbox.map('Species MultiSelector') def _accept(self): i = int(self.ell.selected()) mult = self.data[0] if i == -1 or mult <= 0: h.continue_dialog('Must select a Species with positive multiplicity') return self.selector.add(self.names[i], mult) self.vbox.unmap() def _cancel(self): self.vbox.unmap() class LRHSSelector(_PartialSelector): def __init__(self, allow_without_region=True, allow_with_region=False): self.allow_without_region = allow_without_region self.allow_with_region = allow_with_region self.vbox = h.VBox(3) self.vbox.intercept(1) self.names = [] self.ell = h.List() self._update_list() self.species = [] self.mults = [] self.ell.browser('', 's') h.xpanel('', 1) h.xbutton('Add', self._add) h.xbutton('Remove', self._remove) h.xpanel() self.vbox.intercept(0) self.vbox.map('L/RHS Selector') def add(self, name, mult): self.species.append(name) if mult == int(mult): mult = int(mult) self.mults.append(mult) self.names.append('%g * %s' % (mult, name)) self._update_list() def _add(self): SpeciesMultiSelector(self, allow_with_region=self.allow_with_region, allow_without_region=self.allow_without_region) def _update_list(self): self.ell.remove_all() for name in self.names: self._append(name) def _append(self, name): self.ell.append(h.String(name)) def _remove(self): self.remove(self.selected()) def remove(self, name): try: i = self.names.index(name) except ValueError: return self.ell.remove(i) del self.names[i] del self.species[i] del self.mults[i] self._update_list() def update(self, data): self.species = [] self.mults = [] self.names = [] if data: for name, mult in data: self.add(name, mult) else: self.ell.remove_all() def selection(self): return [(name, mult) for name, mult in zip(self.names, self.mults)] class SpecificRateEditor: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) self.selector = SpeciesSelectorWithRegions(True, True) h.xpanel('') h.xlabel('Production Rate [units: mM/ms]:') h.xpanel() self.vbox.adjuster(15) self.kf_editor = h.TextEditor('0', 1, 30) self.kf_editor.map() self.vbox.intercept(0) self.vbox.map() def update(self, data): self.kf_editor.text(data['kf']) self.selector.update() self.selector.select(data.get('species', '')) def get_options(self): return {'type': 'rate', 'kf': self.kf_editor.text(), 'species': self.selector.selected()} def _do_nothing(): pass class SpecificReactionEditor: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) self.hbox = h.HBox(3) self.hbox.intercept(1) self.lhs_selector = LRHSSelector() h.xpanel('') h.xlabel('') h.xlabel('') h.xbutton('kf -->', _do_nothing) h.xbutton('<-- kb', _do_nothing) h.xpanel() self.rhs_selector = LRHSSelector() self.hbox.intercept(0) self.hbox.map('Specific Reaction Editor') h.xpanel('') h.xlabel('kf:') h.xpanel() self.vbox.adjuster(15) self.kf_editor = h.TextEditor('0', 1, 30) self.kf_editor.map() h.xpanel('') h.xlabel('kb:') h.xpanel() self.vbox.adjuster(15) self.kb_editor = h.TextEditor('0', 1, 30) self.kb_editor.map() self.is_massaction = True h.xpanel('') h.xcheckbox('Mass Action', (self, 'is_massaction')) h.xpanel() self.vbox.intercept(0) self.vbox.map() def update(self, data): self.is_massaction = data.get('massaction', False) self.kf_editor.text(data['kf']) self.kb_editor.text(str(data.get('kb', '0'))) self.lhs_selector.update(data.get('lhs', [])) self.rhs_selector.update(data.get('rhs', [])) def get_options(self): return {'type': 'reaction', 'kf': self.kf_editor.text(), 'kb': self.kb_editor.text(), 'lhs': self.lhs_selector.selection(), 'rhs': self.rhs_selector.selection()} class SpecificMultiCompartmentReactionEditor: def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) self.hbox = h.HBox(3) self.hbox.intercept(1) self.lhs_selector = LRHSSelector(allow_with_region=True, allow_without_region=False) h.xpanel('') h.xlabel('') h.xlabel('') h.xbutton('kf -->', _do_nothing) h.xbutton('<-- kb', _do_nothing) h.xpanel() self.rhs_selector = LRHSSelector() self.hbox.intercept(0) self.hbox.map('Specific Reaction Editor') h.xpanel('') h.xlabel('kf:') h.xpanel() self.vbox.adjuster(15) self.kf_editor = h.TextEditor('0', 1, 30) self.kf_editor.map() h.xpanel('') h.xlabel('kb:') h.xpanel() self.vbox.adjuster(15) self.kb_editor = h.TextEditor('0', 1, 30) self.kb_editor.map() h.xpanel('') h.xlabel('Select the Boundary:') h.xpanel() self.membrane_selector = MembraneSelector() self.is_massaction = True self.membrane_current = False self.scale_with_area = True h.xpanel('') h.xcheckbox('Mass Action', (self, 'is_massaction')) h.xcheckbox('Induces Membrane Current', (self, 'membrane_current')) h.xcheckbox('Scales With Membrane Area', (self, 'scale_with_area')) h.xpanel() self.vbox.intercept(0) self.vbox.map() def get_options(self): return {'type': 'multicompartmentreaction', 'kf': self.kf_editor.text(), 'kb': self.kb_editor.text(), 'lhs': self.lhs_selector.selection(), 'rhs': self.rhs_selector.selection(), 'membrane': self.membrane_selector.selected()} def update(self, data): self.membrane_selector.update() self.is_massaction = data.get('massaction', False) self.kf_editor.text(data['kf']) self.kb_editor.text(str(data.get('kb', '0'))) self.lhs_selector.update(data.get('lhs', [])) self.rhs_selector.update(data.get('rhs', [])) self.scale_with_area = data.get('scale_with_area', True) self.membrane_current = data.get('membrane_current', False) self.membrane_selector.select(data.get('membrane', None)) class ReactionPanelRight: def __init__(self): self.data = {'type': 'reaction', 'kf': '0', 'kb': '0', 'massaction': True, 'lhs': [], 'rhs': []} self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel('Name:') h.xpanel() self.vbox.adjuster(15) self.name_editor = h.TextEditor('', 1, 30) self.name_editor.map() self.opt1 = 0 self.opt2 = 1 self.opt3 = 0 h.xpanel('', 1) h.xcheckbox('ODE ', (self, 'opt1'), self._select_rate) h.xcheckbox('Reaction ', (self, 'opt2'), self._select_reaction) h.xcheckbox('MultiCompartmentReaction ', (self, 'opt3'), self._select_multicompartmentreaction) h.xpanel() self.deck = h.Deck() self.deck.intercept(1) self.rate_editor = SpecificRateEditor() self.reaction_editor = SpecificReactionEditor() self.multicompartmentreaction_editor = SpecificMultiCompartmentReactionEditor() self.deck.intercept(0) self.deck.map() self.deck.flip_to(1) self.current_editor = self.reaction_editor h.xpanel('', 1) h.xbutton('Revert', self._revert) h.xbutton('Save', self._save) h.xpanel() self.vbox.intercept(0) self.vbox.map() def _save(self): name = self.name_editor.text() if not name: h.continue_dialog('Must enter a name to save') else: reaction = self.current_editor.get_options() if name in all_reactions: reaction['active'] = all_reactions[name]['active'] else: reaction['active'] = False all_reactions[name] = reaction _the_rxd_builder.update() _the_rxd_builder._the_reaction_editor._select(name) _the_rxd_builder._the_reaction_editor._update_view() def _revert(self): _the_rxd_builder._the_reaction_editor._update_view() def _select_rate(self): self.opt1, self.opt2, self.opt3 = 1, 0, 0 self.deck.flip_to(0) self.rate_editor.update(self.data) self.current_editor = self.rate_editor def _select_reaction(self): self.deck.flip_to(1) self.opt1, self.opt2, self.opt3 = 0, 1, 0 self.reaction_editor.update(self.data) self.current_editor = self.reaction_editor def _select_multicompartmentreaction(self): self.deck.flip_to(2) self.opt1, self.opt2, self.opt3 = 0, 0, 1 self.multicompartmentreaction_editor.update(self.data) self.current_editor = self.multicompartmentreaction_editor def update(self, name, data): if name is None: name = '' self.name_editor.text(name) self.data = data kind = data['type'] if kind == 'rate': self._select_rate() elif kind == 'reaction': self._select_reaction() elif kind == 'multicompartmentreaction': self._select_multicompartmentreaction() def update2(self): self.multicompartmentreaction.update() class _ReactionPane(object): def __init__(self): self.vbox = h.VBox(3) self.vbox.intercept(1) h.xpanel('') h.xlabel('Edit and Enable Reactions') h.xbutton('Reaction Editor', ReactionEditor) h.xpanel() self.deck = h.Deck() self.deck.intercept(1) h.xpanel('') h.xpanel() self.deck.intercept(0) self.deck.map() self.deck.flip_to(0) self.vbox.intercept(0) self._update_panel() def _update_panel(self): self.deck.remove_last() self.deck.intercept(1) self.reaction_names = sorted(list(all_reactions.keys()), key=lambda s: s.lower()) for i, name in enumerate(self.reaction_names): self.__setattr__('include_list%d' % i, 1 if all_reactions[name]['active'] else 0) h.xpanel('') if self.reaction_names: for i, name in enumerate(self.reaction_names): h.xcheckbox(name, (self, 'include_list%d' % i), self._update_active_reactions) else: h.xlabel('*** No reactions defined yet ***') h.xpanel() self.deck.intercept(0) self.deck.flip_to(0) def _update_active_reactions(self): for i, name in enumerate(self.reaction_names): all_reactions[name]['active'] = True if self.__getattribute__('include_list%d' % i) else False @property def is_mapped(self): return self.vbox.ismapped() def map(self): self.vbox.map('Reaction Pane') _the_reaction_pane = _ReactionPane() # this is a way of faking the Singleton pattern def ReactionPane(): if not _the_reaction_pane.is_mapped: _the_reaction_pane.map() class _ReactionEditor: def __init__(self): self.hbox = h.HBox(3) self.hbox.save('') self.hbox.intercept(1) self.vbox = h.VBox(3) self.vbox.intercept(1) self.ell = h.List() self._set_list() self.ell.browser('', 's') self.ell.select(0) h.xpanel('') h.xbutton('Delete', self._delete) h.xpanel() self.vbox.intercept(0) self.vbox.map() self.right_panel = ReactionPanelRight() self.hbox.intercept(0) self.ell.select_action(self._update_view) self.hbox.full_request(1) def update(self): self._set_list() self._update_view() def _update_view(self): name = self.selected() if name is None: data = {'type': 'reaction', 'kf': '0', 'kb': '0', 'massaction': True, 'lhs': [], 'rhs': []} else: data = all_reactions[name] self.right_panel.update(name, data) def _select(self, name): self.ell.select(1 + self._names.index(name)) def selected(self): item = int(self.ell.selected()) if item == -1 or item == 0: return None return self._names[item - 1] def _delete(self): try: del all_reactions[self.selected()] except: pass self._set_list() @property def is_mapped(self): return self.hbox.ismapped() def map(self): self.hbox.map('Reaction Editor') def _set_list(self): selected = self.selected() self.ell.remove_all() self._append('(NEW)') self._names = sorted(list(all_reactions.keys()), key=lambda s: s.lower()) for name in self._names: self._append(name) try: species_pane_update() except NameError: pass try: _the_reaction_pane._update_panel() except NameError: pass if selected in self._names: self._select(selected) else: self.ell.select(0) def _append(self, name): self.ell.append(h.String(name)) neuron-7.5/share/lib/python/neuron/rxd/initializer.py000066400000000000000000000034761323325274500231040ustar00rootroot00000000000000import itertools # TODO: monkey-patch everything that requires an init so only even attempts once def _do_ion_register(): from . import species for obj in species._all_species: obj = obj() if obj is not None: obj._ion_register() has_initialized = False def _do_init(): global has_initialized if has_initialized: return from . import species, region, rxd if len(species._all_species) > 0: has_initialized = True # TODO: clean this up so not repetitive; can't do it super cleanly because of the multiple phases of species for obj in region._all_regions: obj = obj() if obj is not None: obj._do_init() # NOTE: for species, must do all _do_init2s (1D alloc) before _do_init3s (3D alloc) to keep nodes arranged nicely for obj in species._all_species: obj = obj() if obj is not None: obj._do_init1() for obj in species._all_species: obj = obj() if obj is not None: obj._do_init2() for obj in species._all_species: obj = obj() if obj is not None: obj._do_init3() for obj in species._all_species: obj = obj() if obj is not None: obj._do_init4() for obj in rxd._all_reactions: obj = obj() if obj is not None: obj._do_init() rxd._init() def is_initialized(): return has_initialized def assert_initialized(msg=''): from . import species if not has_initialized and len(species._all_species) > 0: if len(msg): msg = ': ' + msg from .rxdException import RxDException raise RxDException('invalid operation; rxd module not initialized' + msg) neuron-7.5/share/lib/python/neuron/rxd/morphology.py000066400000000000000000000104201323325274500227430ustar00rootroot00000000000000from neuron import h import itertools # aliases to avoid repeatedly doing multiple hash-table lookups _h_section_ref = h.SectionRef _h_allsec = h.allsec _h_parent_connection = h.parent_connection _h_section_orientation = h.section_orientation _itertools_combinations = itertools.combinations def parent(sec): """Return the parent of sec or None if sec is a root""" sref = _h_section_ref(sec=sec) if sref.has_trueparent(): return sref.trueparent().sec elif sref.has_parent(): temp = sref.parent().sec # check if temp owns the connection point if _h_section_ref(sec=temp).has_parent() and _h_parent_connection(sec=temp) == _h_section_orientation(sec=temp): # connection point belongs to temp's ancestor return parent(temp) return temp else: return None def parent_loc(sec, trueparent): """Return the position on the (true) parent where sec is connected Note that _h_section_orientation(sec=sec) is which end of the section is connected. """ # TODO: would I ever have a parent but not a trueparent (or vice versa) sref = _h_section_ref(sec=sec) parent = sref.parent().sec while parent != trueparent: sec, parent = parent, _h_section_ref(sec=sec).parent().sec return _h_parent_connection(sec=sec) class MorphologyDB: """ MorphologyDB preserves the Neuron morphology at the time it was created. Subsequent changes will be ignored. """ def __init__(self): """Create a MorphologyDB with the current NEURON morphology""" self._children = dict([(sec,[]) for sec in _h_allsec() ]) self._parents = {} self._connection_pts = {} self._roots = [] for sec in _h_allsec(): parent_sec = parent(sec) if parent_sec is not None: self._children[parent_sec].append(sec) pt = (parent_sec, parent_loc(sec, parent_sec)) local_pt = (sec, _h_section_orientation(sec=sec)) if pt in self._connection_pts: self._connection_pts[pt].append(local_pt) else: self._connection_pts[pt] = [pt, local_pt] else: self._roots.append(sec) self._parents[sec] = parent_sec @property def roots(self): return self._roots def parent(self, sec): """Return the (true)parent section of sec""" return self._parents[sec] def children(self, sec): """Return a list of the children of sec""" return list(self._children[sec]) def nchild(self, sec): """Return the number of children of sec""" return len(self._children[sec]) def connections(self, secs): """Return a list of pairwise connections within secs""" result = [] for pts in list(self._connection_pts.values()): for pt1, pt2 in _itertools_combinations(pts, 2): if pt1[0] in secs and pt2[0] in secs: result.append([pt1, pt2]) return result def main(): # create 13 sections: s[0] -- s[12] s = [h.Section(name='s[%d]' % i) for i in range(13)] """ Create the tree s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 """ for p, c in [[0, 1], [0, 2], [0, 3], [1, 4], [4, 7], [3, 5], [3, 6], [5, 8], [5, 9], [6, 10]]: s[c].connect(s[p]) """ and now s11 and s12, connected at the 0 ends """ s[11].connect(s[12](0)) # have NEURON print the topology h.topology() # now try it our way morph = MorphologyDB() for sec in s: print(sec.name() + ':') print(' children:', ', '.join(child.name() for child in morph.children(sec))) print(' parent:', morph.parent(sec).name() if morph.parent(sec) is not None else 'None') conns = morph.connections([s[i] for i in [2, 3, 4, 5, 6, 7, 9, 10, 11, 12]]) for p1, p2 in conns: print('%s(%g) %s(%g)' % (p1[0].name(), p1[1], p2[0].name(), p2[1])) print() print() print('roots:', morph.roots) return 0 if __name__ == '__main__': import sys sys.exit(main()) neuron-7.5/share/lib/python/neuron/rxd/multiCompartmentReaction.py000066400000000000000000000256771323325274500256210ustar00rootroot00000000000000import weakref from . import rxdmath, rxd, node, species, region, initializer import numpy from .generalizedReaction import GeneralizedReaction, molecules_per_mM_um3, get_scheme_rate1_rate2_regions_custom_dynamics_mass_action from neuron import h import itertools from .rxdException import RxDException FARADAY = h.FARADAY def _ref_list_with_mult(obj): result = [] for i, p in zip(list(obj.keys()), list(obj.values())): w = weakref.ref(i) result += [w] * p return result class MultiCompartmentReaction(GeneralizedReaction): def __init__(self, *args, **kwargs): """Specify a reaction spanning multiple regions to be added to the system. Use this for, for example, pumps and channels, or interactions between species living in a volume (e.g. the cytosol) and species on a membrane (e.g. the plasma membrane). For each species/state/parameter, you must specify what region you are referring to, as it could be present in multiple regions. You must also specify a `membrane` or a `border` (these are treated as synonyms) that separates the regions involved in your reaction. This is necessary because the default behavior is to scale the reaction rate by the border area, as would be expected if one of the species involved is a pump that is binding to a species in the volume. If this is not the desired behavior, pass the keyword argument `scale_by_area=False`. Pass in `membrane_flux=True` if the reaction produces a current across the plasma membrane that should affect the membrane potential. Unlike Reaction objects, the base units for the rates are in terms of molecules per square micron per ms. .. seealso:: :class:`neuron.rxd.Reaction` """ # parse the arguments shared with rxd.Reaction scheme, rate_f, rate_b, regions, custom_dynamics, mass_action = ( get_scheme_rate1_rate2_regions_custom_dynamics_mass_action(args, kwargs) ) # additional keyword arguments membrane_flux = kwargs.get('membrane_flux', False) membrane = kwargs.get('membrane') border = kwargs.get('border') scale_by_area = kwargs.get('scale_by_area', True) if border is not None and membrane is not None: raise Exception('cannot specify both border and membrane; they are synoyms') if border is not None: membrane = border # TODO: verify schemes use weakrefs self._scheme = scheme self._scale_by_area = scale_by_area self._original_rate_f = rate_f self._original_rate_b = rate_b if custom_dynamics is not None and mass_action is not None: raise RxDException('Cannot specify both custom_dynamics and mass_action.') elif custom_dynamics is None and mass_action is None: custom_dynamics = False elif custom_dynamics is None and mass_action is not None: custom_dynamics = not mass_action self._custom_dynamics = custom_dynamics self._trans_membrane = True if membrane_flux not in (True, False): raise RxDException('membrane_flux must be either True or False') if membrane is None: raise RxDException('MultiCompartmentReaction requires a membrane parameter') if membrane_flux and region._sim_dimension != 1: raise RxDException('membrane_flux not supported except in 1D') self._membrane_flux = membrane_flux if not isinstance(scheme, rxdmath._Reaction): raise RxDException('%r not a recognized reaction scheme' % self._scheme) self._dir = scheme._dir if not membrane._geometry.is_area(): raise RxDException('must specify a membrane not a volume for the boundary') self._regions = [membrane] rxd._register_reaction(self) # initialize self if the rest of rxd is already initialized if initializer.is_initialized(): self._do_init() self._update_indices() def _do_init(self): self._update_rates() def _update_rates(self): lhs = self._scheme._lhs._items rhs = self._scheme._rhs._items rate_f = self._original_rate_f rate_b = self._original_rate_b if not self._custom_dynamics: for k, v in zip(list(lhs.keys()), list(lhs.values())): if v == 1: rate_f = rate_f * k else: rate_f = rate_f * k ** v if rate_b is not None: if self._dir in ('<', '>'): raise RxDException('unidirectional Reaction can have only one rate constant') if not self._custom_dynamics: for k, v in zip(list(rhs.keys()), list(rhs.values())): if v == 1: rate_b = rate_b * k else: rate_b = rate_b * k ** v rate = rate_f - rate_b self._sources = _ref_list_with_mult(lhs) self._dests = _ref_list_with_mult(rhs) elif self._dir == '<>': raise RxDException('bidirectional Reaction needs two rate constants') elif self._dir == '>': rate = rate_f self._sources = _ref_list_with_mult(lhs) self._dests = _ref_list_with_mult(rhs) elif self._dir == '<': self._sources = _ref_list_with_mult(rhs) self._dests = _ref_list_with_mult(lhs) rate = rate_f else: raise RxDException('unrecognized direction; should never happen') self._rate, self._involved_species = rxdmath._compile(rate) self._changing_species = list(set(self._sources + self._dests)) if not all(isinstance(s(), species.SpeciesOnRegion) for s in self._involved_species): raise RxDException('must specify region for all involved species') @property def f_rate(self): return self._original_rate_f @property def b_rate(self): return self._original_rate_b @f_rate.setter def f_rate(self, value): if self._dir not in ('<>', '>'): raise RxDException('no forward reaction in reaction scheme') self._original_rate_f = value self._update_rates() @b_rate.setter def b_rate(self, value): if self._dir not in ('<>', '<'): raise RxDException('no backward reaction in reaction scheme') self._original_rate_b = value self._update_rates() def __repr__(self): return 'MultiCompartmentReaction(%r, %r, rate_b=%r, membrane=%r, custom_dynamics=%r, membrane_flux=%r, scale_by_area=%r)' % (self._scheme, self._original_rate_f, self._original_rate_b, self._regions[0], self._custom_dynamics, self._membrane_flux, self._scale_by_area) def _do_memb_scales(self, cur_map): if not self._scale_by_area: areas = numpy.ones(len(areas)) else: # TODO: simplify this expression areas = numpy.array(itertools.chain.from_iterable([list(self._regions[0]._geometry.volumes1d(sec) for sec in self._regions[0].secs)])) neuron_areas = [] for sec in self._regions[0].secs: neuron_areas += [h.area((i + 0.5) / sec.nseg, sec=sec) for i in range(sec.nseg)] neuron_areas = numpy.array(neuron_areas) # area_ratios is usually a vector of 1s area_ratios = areas / neuron_areas # still needs to be multiplied by the valence of each molecule self._memb_scales = -area_ratios * FARADAY / (10000 * molecules_per_mM_um3) #print area_ratios #print self._memb_scales #import sys #sys.exit() # since self._memb_scales is only used to compute currents as seen by the rest of NEURON, # we only use NEURON's areas #self._memb_scales = volume * molecules_per_mM_um3 / areas if self._membrane_flux: # TODO: don't assume/require always inside/outside on one side... # if no nrn_region specified, then (make so that) no contribution # to membrane flux source_regions = [s()._region()._nrn_region for s in self._sources] dest_regions = [d()._region()._nrn_region for d in self._dests] if 'i' in source_regions and 'o' not in source_regions and 'i' not in dest_regions: inside = -1 #'source' elif 'o' in source_regions and 'i' not in source_regions and 'o' not in dest_regions: inside = 1 # 'dest' elif 'i' in dest_regions and 'o' not in dest_regions and 'i' not in source_regions: inside = 1 # 'dest' elif 'o' in dest_regions and 'i' not in dest_regions and 'o' not in source_regions: inside = -1 # 'source' else: raise RxDException('unable to identify which side of reaction is inside (hope to remove the need for this') # dereference the species to get the true species if it's actually a SpeciesOnRegion sources = [s()._species() for s in self._sources] dests = [d()._species() for d in self._dests] if self._membrane_flux: if any(s in dests for s in sources) or any(d in sources for d in dests): # TODO: remove this limitation raise RxDException('current fluxes do not yet support same species on both sides of reaction') # TODO: make so don't need multiplicity (just do in one pass) # TODO: this needs changed when I switch to allowing multiple sides on the left/right (e.g. simplified Na/K exchanger) self._cur_charges = tuple([-inside * s.charge for s in sources if s.name is not None] + [inside * s.charge for s in dests if s.name is not None]) self._net_charges = sum(self._cur_charges) self._cur_ptrs = [] self._cur_mapped = [] for sec in self._regions[0].secs: for i in range(sec.nseg): local_ptrs = [] local_mapped = [] for sp in itertools.chain(self._sources, self._dests): spname = sp()._species().name if spname is not None: name = '_ref_i%s' % (spname) seg = sec((i + 0.5) / sec.nseg) local_ptrs.append(seg.__getattribute__(name)) uberlocal_map = [None, None] if spname + 'i' in cur_map: uberlocal_map[0] = cur_map[spname + 'i'][seg] if spname + 'o' in cur_map: uberlocal_map[1] = cur_map[spname + 'o'][seg] local_mapped.append(uberlocal_map) self._cur_ptrs.append(tuple(local_ptrs)) self._cur_mapped.append(tuple(local_mapped)) neuron-7.5/share/lib/python/neuron/rxd/node.py000066400000000000000000000507341323325274500215050ustar00rootroot00000000000000import neuron from neuron import h, nrn, hoc from . import region from . import rxdsection import numpy import weakref from .rxdException import RxDException import warnings import collections # data storage _volumes = numpy.array([]) _surface_area = numpy.array([]) _diffs = numpy.array([]) _states = numpy.array([]) _node_fluxes = {'indices': [], 'type': [], 'source': [], 'scale': []} _has_node_fluxes = False # node data types _concentration_node = 0 _molecule_node = 1 def _apply_node_fluxes(dy): # TODO: what if the nodes go away because a section is destroyed? if _has_node_fluxes: # TODO: be smarter. Use PtrVector when possible. Handle constants efficiently. for index, t, source, scale in zip(_node_fluxes['indices'], _node_fluxes['type'], _node_fluxes['source'], _node_fluxes['scale']): if t == 1: delta = source[0] elif t == 2: delta = source() elif t == 3: delta = source else: raise RxDException('Unknown flux source type. Users should never see this.') # TODO: check this... make sure scale shouldn't be divided by volume dy[index] += delta / scale / _volumes[index] def _get_data(): return (_volumes, _surface_area, _diffs) def _get_states(): return _states def _allocate(num): """allocate storage for num more nodes, return the starting index Note: no guarantee is made of preserving previous _ref """ start_index = len(_volumes) total = start_index + num _volumes.resize(total, refcheck=False) _surface_area.resize(total, refcheck=False) _diffs.resize(total, refcheck=False) _states.resize(total, refcheck=False) return start_index _numpy_element_ref = neuron.numpy_element_ref class Node(object): def satisfies(self, condition): """Tests if a Node satisfies a given condition. If a nrn.Section object or RxDSection is provided, returns True if the Node lies in the section; else False. If a Region object is provided, returns True if the Node lies in the Region; else False. If a number between 0 and 1 is provided, returns True if the normalized position lies within the Node; else False. """ if isinstance(condition, nrn.Section) or isinstance(condition, rxdsection.RxDSection): return self._in_sec(condition) elif isinstance(condition, region.Region): return self.region == condition elif isinstance(condition, nrn.Segment): return self.segment == condition raise RxDException('selector %r not supported for this node type' % condition) @property def _ref_concentration(self): """Returns a HOC reference to the Node's concentration (The node must store concentration data. Use _ref_molecules for nodes storing molecule counts.) """ # this points to rxd array only, will not change legacy concentration if self._data_type == _concentration_node: return self._ref_value else: raise RxDException('_ref_concentration only available for concentration nodes') @property def _ref_molecules(self): """Returns a HOC reference to the Node's concentration (The node must store concentration data. Use _ref_molecules for nodes storing molecule counts.) """ # this points to rxd array only, will not change legacy concentration if self._data_type == _molecule_node: return self._ref_value else: raise RxDException('_ref_molecules only available for molecule count nodes') @property def d(self): """Gets the diffusion rate within the compartment.""" return _diffs[self._index] @d.setter def d(self, value): """Sets the diffusion rate within the compartment.""" from . import rxd # TODO: make invalidation work so don't need to redo the setup each time #rxd._invalidate_matrices() _diffs[self._index] = value rxd._setup_matrices() @property def concentration(self): """Gets the concentration at the Node.""" # TODO: don't use an if statement here... put the if statement at node # construction and change the actual function that is pointed to if self._data_type == _concentration_node: return self.value else: # TODO: make this return a concentration instead of an error raise RxDException('concentration property not yet supported for non-concentration nodes') @concentration.setter def concentration(self, value): """Sets the concentration at the Node""" # TODO: don't use an if statement here... put the if statement at node # construction and change the actual function that is pointed to if self._data_type == _concentration_node: self.value = value else: # TODO: make this set a concentration instead of raise an error raise RxDException('concentration property not yet supported for non-concentration nodes') @property def molecules(self): """Gets the molecule count at the Node.""" # TODO: don't use an if statement here... put the if statement at node # construction and change the actual function that is pointed to if self._data_type == _molecule_node: return self.value else: # TODO: make this return a molecule count instead of an error raise RxDException('molecules property not yet supported for non-concentration nodes') @molecules.setter def molecules(self, value): """Sets the molecule count at the Node""" # TODO: don't use an if statement here... put the if statement at node # construction and change the actual function that is pointed to if self._data_type == _molecule_node: self.value = value else: # TODO: make this set a molecule count instead of raise an error raise RxDException('molecules property not yet supported for non-concentration nodes') @property def value(self): """Gets the value associated with this Node.""" return _states[self._index] @value.setter def value(self, v): """Sets the value associated with this Node. For Species nodes belonging to a deterministic simulation, this is a concentration. For Species nodes belonging to a stochastic simulation, this is the molecule count. """ _states[self._index] = v @property def _ref_value(self): """Returns a HOC reference to the Node's value""" return _numpy_element_ref(_states, self._index) def include_flux(self, *args, **kwargs): """Include a flux contribution to a specific node. The flux can be described as a HOC reference, a point process and a property, a Python function, or something that evaluates to a constant Python float. Supported units: molecule/ms mol/ms mmol/ms == millimol/ms == mol/s Examples: node.include_flux(mglur, 'ip3flux') # default units: molecule/ms node.include_flux(mglur, 'ip3flux', units='mol/ms') # units: moles/ms node.include_flux(mglur._ref_ip3flux, units='molecule/ms') node.include_flux(lambda: mglur.ip3flux) node.include_flux(lambda: math.sin(h.t)) node.include_flux(47) Warning: Flux denotes a change in *mass* not a change in concentration. For example, a metabotropic synapse produces a certain amount of substance when activated. The corresponding effect on the node's concentration depends on the volume of the node. (This scaling is handled automatically by NEURON's rxd module.) """ global _has_node_fluxes if len(args) not in (1, 2): raise RxDException('node.include_flux takes only one or two arguments') if 'units' in kwargs: units = kwargs.pop('units') else: units = 'molecule/ms' if len(kwargs): raise RxDException('Unknown keyword arguments: %r' % list(kwargs.keys())) # take the value, divide by scale to get mM um^3 # once this is done, we need to divide by volume to get mM # TODO: is division still slower than multiplication? Switch to mult. if units == 'molecule/ms': scale = 602214.129 elif units == 'mol/ms': # You have: mol # You want: (millimol/L) * um^3 # * 1e+18 # / 1e-18 scale = 1e-18 elif units in ('mmol/ms', 'millimol/ms', 'mol/s'): # You have: millimol # You want: (millimol/L)*um^3 # * 1e+15 # / 1e-15 scale = 1e-15 else: raise RxDException('unknown unit: %r' % units) if len(args) == 1 and isinstance(args[0], hoc.HocObject): source = args[0] flux_type = 1 try: # just a test access source[0] except: raise RxDException('HocObject must be a pointer') elif len(args) == 1 and isinstance(args[0], collections.Callable): flux_type = 2 source = args[0] elif len(args) == 2: flux_type = 1 try: source = args[0].__getattribute__('_ref_' + args[1]) except: raise RxDException('Invalid two parameter form') # TODO: figure out a units checking solution that works # source_units = h.units(source) # if source_units and source_units != units: # warnings.warn('Possible units conflict. NEURON says %r, but specified as %r.' % (source_units, units)) else: success = False if len(args) == 1: try: f = float(args[0]) source = f flux_type = 3 success = True except: pass if not success: raise RxDException('unsupported flux form') _node_fluxes['indices'].append(self._index) _node_fluxes['type'].append(flux_type) _node_fluxes['source'].append(source) _node_fluxes['scale'].append(scale) _has_node_fluxes = True _h_n3d = h.n3d _h_x3d = h.x3d _h_y3d = h.y3d _h_z3d = h.z3d _h_arc3d = h.arc3d class Node1D(Node): def __init__(self, sec, i, location, data_type=_concentration_node): """n = Node1D(sec, i, location) Description: Constructs a Node object. These encapsulate multiple properties of a given reaction-diffusion compartment -- volume, surface area, concentration, etc... -- but this association is provided only as a convenience to the user; all the data exists independently of the Node object. These objects are typically constructed by the reaction-diffusion code and provided to the user. Parameters: sec -- the RxDSection containing the Node i -- the offset into the RxDSection's data location -- the location of the compartment within the section. For @aSection1D objects, this is the normalized position 0 <= x <= 1 """ self._sec = sec self._location = location self._index = i + sec._offset self._loc3d = None self._data_type = data_type def _update_loc3d(self): sec = self._sec length = sec.L normalized_arc3d = [_h_arc3d(i, sec=sec._sec) / length for i in range(int(_h_n3d(sec=sec._sec)))] x3d = [_h_x3d(i, sec=sec._sec) for i in range(int(_h_n3d(sec=sec._sec)))] y3d = [_h_y3d(i, sec=sec._sec) for i in range(int(_h_n3d(sec=sec._sec)))] z3d = [_h_z3d(i, sec=sec._sec) for i in range(int(_h_n3d(sec=sec._sec)))] loc1d = self._location self._loc3d = (numpy.interp(loc1d, normalized_arc3d, x3d), numpy.interp(loc1d, normalized_arc3d, y3d), numpy.interp(loc1d, normalized_arc3d, z3d)) def satisfies(self, condition): """Tests if a Node satisfies a given condition. If a nrn.Section object or RxDSection is provided, returns True if the Node lies in the section; else False. If a Region object is provided, returns True if the Node lies in the Region; else False. If a number between 0 and 1 is provided, returns True if the normalized position lies within the Node; else False. """ if isinstance(condition, nrn.Section) or isinstance(condition, rxdsection.RxDSection): return self._in_sec(condition) elif isinstance(condition, region.Region): return self.region == condition elif isinstance(condition, nrn.Segment): return self.segment == condition try: if 0 <= condition <= 1: dx = 1. / self._sec.nseg check_index = int(condition * self._sec.nseg) if check_index >= self._sec.nseg: # if here, then at the 1 end check_index = self._sec.nseg - 1 # self_index should be unique (no repeats due to roundoff error) because the inside should always be 0.5 over an integer self_index = int(self._location * self._sec.nseg) return check_index == self_index except: raise RxDException('unrecognized node condition: %r' % condition) @property def x3d(self): """x coordinate""" if self._loc3d is None: self._update_loc3d() return self._loc3d[0] @property def y3d(self): """y coordinate""" if self._loc3d is None: self._update_loc3d() return self._loc3d[1] @property def z3d(self): """z coordinate""" if self._loc3d is None: self._update_loc3d() return self._loc3d[2] @property def volume(self): """The volume of the compartment in cubic microns. Read only.""" from . import rxd rxd._update_node_data() return _volumes[self._index] @property def segment(self): return self._sec._sec(self.x) @property def surface_area(self): """The surface area of the compartment in square microns. This is the area (if any) of the compartment that lies on the plasma membrane and therefore is the area used to determine the contribution of currents (e.g. ina) from mod files or kschan to the compartment's concentration. Read only. """ from . import rxd rxd._update_node_data() return _surface_area[self._index] @property def x(self): """The normalized position of the center of the compartment. Read only.""" # TODO: will probably want to change this to be more generic for higher dimensions return self._location @property def region(self): """The region containing the compartment.""" return self._sec._region @property def sec(self): """The RxDSection containing the compartment.""" return self._sec def _in_sec(self, sec): return sec == self.sec or sec == self.sec._sec @property def species(self): """The Species whose concentration is recorded at this Node.""" return self._sec._species() class Node3D(Node): def __init__(self, index, i, j, k, r, seg, speciesref, data_type=_concentration_node): """ Parameters ---------- index : int the offset into the global rxd data i : int the x coordinate in the region's matrix j : int the y coordinate in the region's matrix k : int the z coordinate in the region's matrix r : rxd.Region the region that contains this node seg : nrn.Segment the segment containing this node """ self._index = index self._i = i self._j = j self._k = k # TODO: store region as a weakref! (weakref.proxy?) self._r = r self._seg = seg self._speciesref = speciesref self._data_type = data_type @property def surface_area(self): """The surface area of the compartment in square microns. This is the area (if any) of the compartment that lies on the plasma membrane and therefore is the area used to determine the contribution of currents (e.g. ina) from mod files or kschan to the compartment's concentration. Read only. """ # TODO: should I have the commented out line? #rxd._update_node_data() return _surface_area[self._index] def satisfies(self, condition): """Tests if a Node satisfies a given condition. If a nrn.Section object or RxDSection is provided, returns True if the Node lies in the section; else False. If a Region object is provided, returns True if the Node lies in the Region; else False. If a number between 0 and 1 is provided, returns True if the normalized position lies within the Node; else False. """ if isinstance(condition, nrn.Section) or isinstance(condition, rxdsection.RxDSection): return self._in_sec(condition) elif isinstance(condition, region.Region): return self.region == condition elif isinstance(condition, nrn.Segment): return self.segment == condition position_type = False try: if 0 <= condition <= 1: position_type = True except: raise RxDException('unrecognized node condition: %r' % condition) if position_type: # TODO: the trouble here is that you can't do this super-directly based on x # the way to do this is to find the minimum and maximum x values contained in the grid # the extra difficulty with that is to handle boundary cases correctly # (to test, consider a section 1 node wide by 15 discretized pieces long, access at 1./15, 2./15, etc...) raise RxDException('selecting nodes by normalized position not yet supported for 3D nodes; see comments in source about how to fix this') @property def x3d(self): # TODO: need to modify this to work with 1d return self._r._mesh.xs[self._i] @property def y3d(self): # TODO: need to modify this to work with 1d return self._r._mesh.ys[self._j] @property def z3d(self): # TODO: need to modify this to work with 1d return self._r._mesh.zs[self._k] @property def x(self): # TODO: can we make this more accurate? return self._seg.x @property def segment(self): return self._seg def _in_sec(self, sec): return sec == self.sec @property def sec(self): if self._seg is None: return None return self._seg.sec @property def volume(self): return _volumes[self._index] @property def region(self): """The region containing the compartment.""" return self._r @property def species(self): """The Species whose concentration is recorded at this Node.""" return self._speciesref() @property def value(self): """Gets the value associated with this Node.""" from . import rxd if rxd._external_solver is not None: _states[self._index] = rxd._external_solver.value(self) return _states[self._index] @value.setter def value(self, v): """Sets the value associated with this Node. For Species nodes belonging to a deterministic simulation, this is a concentration. For Species nodes belonging to a stochastic simulation, this is the molecule count. """ from . import rxd _states[self._index] = v if rxd._external_solver is not None: rxd._external_solver.update_value(self) neuron-7.5/share/lib/python/neuron/rxd/nodelist.py000066400000000000000000000107521323325274500223750ustar00rootroot00000000000000from .rxdException import RxDException class NodeList(list): def __init__(self, items): """Constructs a NodeList from items, a python iterable containing Node objects.""" list.__init__(self, items) def __call__(self, restriction): """returns a sub-NodeList consisting of nodes satisfying restriction""" return NodeList([i for i in self if i.satisfies(restriction)]) @property def value(self): # TODO: change this when not everything is a concentration return self.concentration @value.setter def value(self, v): # TODO: change this when not everything is a concentration self.concentration = v @property def concentration(self): """Returns the concentration of the Node objects in the NodeList as an iterable.""" return [node.concentration for node in self] @concentration.setter def concentration(self, value): """Sets the concentration of the Node objects to either a constant or values based on an iterable.""" if hasattr(value, '__len__'): if len(value) == len(self): for node, val in zip(self, value): node.concentration = val return else: raise RxDException('concentration must either be a scalar or an iterable of the same length as the NodeList') for node in self: node.concentration = value @property def diff(self): """Returns the diffusion constant of the Node objects in the NodeList as an iterable.""" return [node.diff for node in self] @diff.setter def diff(self, value): """Sets the diffusion constant of the Node objects to either a constant or values based on an iterable.""" if hasattr(value, '__len__'): if len(value) == len(self): for node, val in zip(self, value): node.diff = val return else: raise RxDException('diff must either be a scalar or an iterable of the same length as the NodeList') for node in self: node.diff = value def value_to_grid(self): """Returns a regular grid with the values of the 3d nodes in the list. The grid is a copy only. Grid points not belonging to the object are assigned a value of NaN. Nodes that are not 3d will be ignored. If there are no 3d nodes, returns a 0x0x0 numpy array. Warning: Currently only supports nodelists over 1 region. """ import numpy from .node import Node3D # identify regions involved regions = set() for node in self: if isinstance(node, Node3D): regions.add(node.region) # default result that falls through if no regions result = numpy.zeros((0, 0, 0)) if len(regions) > 1: # TODO: the reason for this restriction is the need to make sure # the mesh lines up raise RxDException('value_to_grid currently only supports 1 region') for r in regions: # TODO: if allowing multiple regions, need to change this result = numpy.empty(r._mesh.shape) result.fill(numpy.nan) for node in self: if isinstance(node, Node3D): # TODO: if allowing multiple regions, adjust i, j, k as needed result[node._i, node._j, node._k] = node.value return result @property def volume(self): """An iterable of the volumes of the Node objects in the NodeList. Read only.""" return [node.volume for node in self] @property def surface_area(self): """An iterable of the surface areas of the Node objects in the NodeList. Read only.""" return [node.surface_area for node in self] @property def region(self): """An iterable of the Region objects corresponding to the Node objects in the NodeList. Read only.""" return [node.region for node in self] @property def species(self): """An iterable of the Species objects corresponding to the Node objects in the NodeList. Read only.""" return [node.species for node in self] @property def x(self): """An iterable of the normalized positions of the Node objects in the NodeList. Read only.""" return [node.x for node in self] neuron-7.5/share/lib/python/neuron/rxd/options.py000066400000000000000000000022611323325274500222430ustar00rootroot00000000000000from .rxdException import RxDException try: import scipy except: raise RxDException("NEURON's rxd module requires scipy") import warnings import re # only default to using reaction contribution to Jacobian if scipy more recent than 0.10.0 # if the version format has changed, then we assume it is a recent version of scipy scipy_number_parts = re.match(r'(\d*)\.(\d*)\.(\d*)', scipy.__version__) if scipy_number_parts: scipy_version = [int(v) for v in scipy_number_parts.groups()] if scipy_number_parts is None or scipy_version[0] > 0 or scipy_version[1] > 10 or (scipy_version[1] == 10 and scipy_version[2] >= 1): use_reaction_contribution_to_jacobian = True """Should we use the reaction contribution to the Jacobian? probably yes if cvode""" else: warnings.warn('scipy < 0.10.1 found; setting rxd.options.use_reaction_contribution_to_jacobian = False to avoid a memory leak in scipy.sparse.linalg.factorized') use_reaction_contribution_to_jacobian = False # the number of electrophysiology fixed steps per rxd step # WARNING: setting this to anything other than 1 is probably a very bad # idea, numerically speaking, at least for nwo fixed_step_factor = 1 neuron-7.5/share/lib/python/neuron/rxd/plugins.py000066400000000000000000000220661323325274500222360ustar00rootroot00000000000000"""plugins.py Functions for allowing solver plugins/overrides. """ from .rxdException import RxDException from . import rxd from . import options from . import species from . import node from . import section1d class SolverPlugin: def __init__(self): _initialize(self) """Interface for solver plugins.""" def init(self, species_list, reactions_list): """Perform any needed initialization. This function may be called multiple times. Subsequent calls purge all data and restart the solver de novo. """ self._species = [] self._reactions = [] self._values = [] # NOTE: to use shared memory, simply set # self._values = neuron.rxd.node._states # and define self._index appropriately # # NOTE: when not using shared memory, self._values should be an object # that transfers data only on demand self._set_species(species_list) self._set_reactions(reactions_list) self._set_values() def _set_values(self): """update self._values if necessary""" def _set_species(self, species_list): """Set the species to be used. They should be stored internally with weakrefs. The plugin will likely need this information for at least five reasons: 1. knowing how many species there are 2. being able to identify the indices corresponding to a given node 3. grabbing the mesh 4. transferring states to/from the solver 5. diffusion rates This function raises an RxDException if the plugin does not support the species options. """ import weakref # TODO: use a callback to automatically invalidate the plugin state # if a species is destroyed self._species = [weakref.proxy(s) for s in species_list] self._set_mesh() def _set_reactions(self, reactions_list): """Store the reactions. Invokes self._process_reactions to do any necessary preprocessing. """ import weakref # TODO: use a callback to automatically invalidate the plugin state # if a reaction is destroyed self._reactions = [weakref.proxy(s) for s in reactions_list] self._process_reactions() def _process_reactions(self): """Do any necessary preprocessing of the reactions.""" def _set_mesh(self): """Use self._species to define a mesh.""" def _index(self, node): """Return the index of a node in the plugin's internal storage.""" def value(self, node): """Return the value (concentration or mass) associated with the node.""" return self._values_from_indices([self._index(node)]) def _values_from_indices(self, indices): """Return a vector of values associated with a vector of indices.""" import numpy return numpy.asarray(self._values)[indices] def advance(self, dt): """Advance the solver by dt. By default, the solver will use its local copy of state variables. This behavior can be overriden by explicitly calling transfer_states_to_solver at the beginning of the advance function and calling transfer_states_to_neuron at the end. These two function calls allow pointers to concentrations to work at the expense of increased run-time. """ def supported_sim(self): """Returns True if this simulation is supported; else False""" return False def set_rate_of_change(self, nodes, rates_of_change): """Sets steady influx to nodes.""" import numpy self._roc = numpy.zeros(len(self._values)) for node, r in zip(nodes, rates_of_change): self._roc[self._index(node)] += r def transfer_states_from_neuron(self): """Transfers all state variables to the solver.""" # NOTE: the default approach described below is general but consequently # inefficient; plugin developers should override this function for species in self._species: try: for node in species.nodes: self._values[self._index(node)] = node.value except ReferenceError: pass def transfer_states_to_neuron(self, which=None): """Transfers state variables from the solver to NEURON. If which is None, transfer all states; otherwise, transfer at least the requested states. If the type of which is not supported, transfer all states. """ # NOTE: the default approach described below is general but consequently # inefficient; plugin developers should override this function for species in self._species: try: for node in species.nodes: node.value = self._values[self._index(node)] except ReferenceError: pass class SharedMemorySolverPlugin(SolverPlugin): def _set_values(self): self._values = node._states def transfer_states_from_neuron(self): """no need to transfer states since shared memory""" def transfer_states_to_neuron(self): """no need to transfer states since shared memory""" def _index(self, node): """shared memory, so trivial index mapping""" return node._index def store_simple_3d_mesh(plugin): mesh = None for s in plugin._species: if s._dimension != 3: raise RxDException('This plugin only supports 3D simulations') if len(s._regions) != 1: raise RxDException('This plugin only supports 1 region') if mesh is None: mesh = s._regions[0]._mesh if mesh != s._regions[0]._mesh: raise RxDException('This plugin requires a unique mesh') plugin._mesh = mesh._values plugin._dx = mesh._dx def _cvode_error(*args, **kwargs): raise RxDException("Variable step method not supported for external plugin solvers.") def set_solver(plugin_solver_object=None): """Set or remove a plugin solver for reaction-diffusion dynamics. If plugin_solver_object is None, removes any plugin solver. Otherwise: The plugin_solver_object must support the rxd.SolverPlugin interface, although it need subclass it. NOTE: External solver support currently requires the model to be simulated in three dimensions. 1D branching behavior is undefined. NOTE: For now, only fixed step advances are supported. NOTE: Correct pointer access to read/write state variables is not guaranteed in general, but can be obtained by having the advance method sync state values from neuron at the beginning and to neuron at the end. """ if plugin_solver_object is None: _default_solver() else: change_currents = lambda rhs: None change_conductance = None rxd._setup = rxd._orig_setup rxd._currents = change_currents rxd._ode_count = _cvode_error rxd._ode_reinit = _invalidate_plugin rxd._ode_fun = _cvode_error rxd._ode_solve = _cvode_error rxd._fixed_step_solve = lambda dt: _fixed_step_advance(dt, plugin_solver_object) rxd._ode_jacobian = _cvode_error rxd._external_solver = plugin_solver_object _invalidate_plugin() def _invalidate_plugin(): rxd._external_solver_initialized = False def _initialize(solver): all_species = [s() for s in list(species._defined_species.values()) if s() is not None] all_reactions = [r() for r in rxd._all_reactions if r() is not None] solver.init(all_species, all_reactions) # TODO: transfer information about the reactions if not solver.supported_sim(): raise RxDException('Selected plugin solver does not support the current simulation.') solver.transfer_states_from_neuron() rxd._external_solver_initialized = True def _fixed_step_advance(dt, solver): if not rxd._external_solver_initialized: _initialize(solver) import warnings warnings.warn('Plugin support for membrane currents not yet implemented.') solver.set_rate_of_change([], []) # do the advance solver.advance(dt) # TODO: only collect values that are must-sync solver.transfer_states_to_neuron() # transfer any 1D states to the legacy grid section1d._transfer_to_legacy() # TODO: transfer any 3D states to the legacy grid def _default_solver(): """Restore the default solver.""" rxd._setup = rxd._orig_setup rxd._currents = rxd._orig_currents rxd._ode_count = rxd._orig_ode_count rxd._ode_reinit = rxd._orig_ode_reinit rxd._ode_fun = rxd._orig_ode_fun rxd._ode_solve = rxd._orig_ode_solve rxd._fixed_step_solve = rxd._orig_fixed_step_solve rxd._ode_jacobian = _orig_ode_jacobian rxd._external_solver = None rxd._external_solver_initialized = False neuron-7.5/share/lib/python/neuron/rxd/rangevar.py000066400000000000000000000024321323325274500223550ustar00rootroot00000000000000import numpy from neuron import h _h_vector = h.Vector _numpy_zeros = numpy.zeros _h_ptrvector = h.PtrVector def _donothing(): pass class RangeVar: def __init__(self, name): self._name = name self._ptr_vector = None def _init_ptr_vectors(self, nodes): # TODO: make sure this gets changed everytime there is a structurechange event # or everytime the nodes change ptrs = [] locs = [] ptrs_append = ptrs.append locs_append = locs.append name = self._name for node in nodes: seg = node.segment ptrs_append(seg.__getattribute__('_ref_%s' % name)) # TODO: is this the right index? or do I need to change things to # account for the zero-volume nodes? locs_append(node._index) self._locs = numpy.array(locs) pv = _h_ptrvector(len(ptrs)) pv.ptr_update_callback(_donothing) pv_pset = pv.pset for i, ptr in enumerate(ptrs): pv_pset(i, ptr) self._pv = pv def _rangevar_vec(self): pv = self._pv result = _numpy_zeros(pv.size()) vec = _h_vector(pv.size()) pv.gather(vec) vec.to_python(result) return result neuron-7.5/share/lib/python/neuron/rxd/rate.py000066400000000000000000000137421323325274500215110ustar00rootroot00000000000000from .rxdException import RxDException import weakref from . import species, rxdmath, rxd, initializer import numpy from .rangevar import RangeVar import itertools from .generalizedReaction import GeneralizedReaction class Rate(GeneralizedReaction): """Declare a contribution to the rate of change of a species or other state variable. Example: constant_production = rxd.Rate(protein, k) If this was the only contribution to protein dynamics and there was no diffusion, the above would be equivalent to: dprotein/dt = k If there are multiple rxd.Rate objects (or an rxd.Reaction, etc) acting on the same species, then their effects are summed. """ def __init__(self, species, rate, regions=None, membrane_flux=False): """create a rate of change for a species on a given region or set of regions if regions is None, then does it on all regions""" self._species = weakref.ref(species) self._original_rate = rate if not hasattr(regions, '__len__'): regions = [regions] self._regions = regions self._membrane_flux = membrane_flux if membrane_flux not in (True, False): raise RxDException('membrane_flux must be either True or False') if membrane_flux and regions is None: # TODO: rename regions to region? raise RxDException('if membrane_flux then must specify the (unique) membrane regions') self._trans_membrane = False rxd._register_reaction(self) # be careful, this could keep states alive self._original_rate = rate # initialize self if the rest of rxd is already initialized if initializer.is_initialized(): self._do_init() def _do_init(self): rate = self._original_rate if not isinstance(rate, RangeVar): self._rate, self._involved_species = rxdmath._compile(rate) else: self._involved_species = [weakref.ref(species)] self._update_indices() def __repr__(self): if len(self._regions) != 1 or self._regions[0] is not None: regions_short = '[' + ', '.join(r._short_repr() for r in self._regions) + ']' return 'Rate(%s, %s, regions=%s, membrane_flux=%r)' % (self._species()._short_repr(), self._original_rate._short_repr(), regions_short, self._membrane_flux) else: return 'Rate(%s, %s, membrane_flux=%r)' % (self._species()._short_repr(), self._original_rate._short_repr(), self._membrane_flux) def _rate_from_rangevar(self, *args): return self._original_rate._rangevar_vec() def _update_indices(self): # this is called anytime the geometry changes as well as at init # TODO: is the above statement true? self._indices_dict = {} # locate the regions containing all species (including the one that changes) if self._species(): active_regions = [r for r in self._regions if self._species().indices(r)] else: active_regions = [] for sptr in self._involved_species: s = sptr() if s: for r in self._regions: if r in active_regions and not s.indices(r): del active_regions[active_regions.index(r)] else: active_regions = [] if isinstance(self._original_rate, RangeVar): nodes = [] for sptr in self._involved_species: s = sptr() for r in active_regions: if r is None: nodes += s.nodes else: nodes += s[r].nodes self._original_rate._init_ptr_vectors(nodes) self._mult = [1] self._mult_extended = self._mult self._indices = [self._original_rate._locs] self._rate = self._rate_from_rangevar self._get_args = lambda ignore: [] # this indicates no contribution to the jacobian self._jac_rows = [] self._jac_cols = [] else: # this is called anytime the geometry changes as well as at init # TODO: is the above statement true? self._indices_dict = {} # locate the regions containing all species (including the one that changes) if self._species(): active_regions = [r for r in self._regions if self._species().indices(r)] else: active_regions = [] for sptr in self._involved_species: s = sptr() if s: for r in self._regions: if r in active_regions and not s.indices(r): del active_regions[active_regions.index(r)] else: active_regions = [] # store the indices for sptr in self._involved_species: s = sptr() self._indices_dict[s] = list(itertools.chain.from_iterable([s.indices(r) for r in active_regions])) self._indices = [list(itertools.chain.from_iterable([self._species().indices(r) for r in active_regions]))] self._mult = [1] self._update_jac_cache() def _do_memb_scales(self): # TODO: does anyone still call this? # TODO: update self._memb_scales (this is just a dummy value to make things run) self._memb_scales = 1 def _get_memb_flux(self, states): if self._membrane_flux: raise RxDException('membrane flux due to rxd.Rate objects not yet supported') # TODO: refactor the inside of _evaluate so can construct args in a separate function and just get self._rate() result rates = self._evaluate(states)[2] return self._memb_scales * rates else: return [] neuron-7.5/share/lib/python/neuron/rxd/reaction.py000066400000000000000000000142671323325274500223650ustar00rootroot00000000000000import weakref from . import species, rxdmath, rxd, node, initializer import numpy import copy from .generalizedReaction import GeneralizedReaction, ref_list_with_mult, get_scheme_rate1_rate2_regions_custom_dynamics_mass_action from .rxdException import RxDException class Reaction(GeneralizedReaction): def __init__(self, *args, **kwargs): """Specify a reaction to be added to the system. Examples: For 2 * H + O > H2O in a mass action reaction at rate k: r = rxd.Reaction(2 * H + O, H2O, k) To constrain the reaction to a specified list of regions, say to just the extracellular space (ext) and the cytosol (cyt), use the regions keyword, e.g. r = rxd.Reaction(2 * H + O, H2O, k, regions=[ext, cyt]) For a bi-directional reaction, specify a backward reaction rate. e.g. if kf is the forward rate and kb is the backward rate, then: r = rxd.Reaction(2 * H + O, H2O, kf, kb) To use dynamics other than mass-action, add that mass_action=False flag and put the full formula instead of a mass-action rate for kf (and kb). E.g. Michaelis-Menten degradation r = rxd.Reaction( dimer, decomposed, dimer / (k + diamer), mass_action=False ) """ # parse the arguments scheme, rate1, rate2, regions, custom_dynamics, mass_action = ( get_scheme_rate1_rate2_regions_custom_dynamics_mass_action(args, kwargs) ) # TODO: verify schemes use weakrefs self._scheme = scheme if custom_dynamics is not None and mass_action is not None: raise RxDException('Cannot specify both custom_dynamics and mass_action.') elif custom_dynamics is None and mass_action is None: custom_dynamics = False elif custom_dynamics is None and mass_action is not None: custom_dynamics = not mass_action self._custom_dynamics = custom_dynamics if scheme._dir == '<': rate_f, rate_b = 0, rate1 if rate2 is not None: raise RxDException('unidirectional Reaction can have only one rate constant') elif scheme._dir == '<>': rate_f, rate_b = rate1, rate2 if rate2 is None: raise RxDException('bidirectional Reaction needs two rate constants') elif scheme._dir == '>': rate_f, rate_b = rate1, 0 if rate2 is not None: raise RxDException('unidirectional Reaction can have only one rate constant') else: raise RxDException('unknown reaction scheme direction: %r' % scheme._dir) self._original_rate_f = rate_f self._original_rate_b = rate_b self._membrane_flux = False self._dir = scheme._dir self._custom_dynamics = custom_dynamics self._trans_membrane = False if not hasattr(regions, '__len__'): regions = [regions] self._regions = regions rxd._register_reaction(self) # initialize self if the rest of rxd is already initialized if initializer.is_initialized(): self._do_init() self._update_indices() def _do_init(self): self._update_rates() def _update_rates(self): lhs = self._scheme._lhs._items rhs = self._scheme._rhs._items if self._dir == '<': # TODO: remove this limitation (probably means doing with rate_b what done with rate_f and making sure _sources and _dests are correct raise RxDException('pure reverse reaction currently not supported; reformulate as a forward reaction') rate_f = copy.copy(self._original_rate_f) rate_b = copy.copy(self._original_rate_b) if not self._custom_dynamics: for k, v in zip(list(lhs.keys()), list(lhs.values())): if v == 1: rate_f *= k else: rate_f *= k ** v if self._dir == '<>': for k, v in zip(list(rhs.keys()), list(rhs.values())): if v == 1: rate_b *= k else: rate_b *= k ** v rate = rate_f - rate_b self._sources = ref_list_with_mult(lhs) self._dests = ref_list_with_mult(rhs) self._rate, self._involved_species = rxdmath._compile(rate) trans_membrane = any(isinstance(s(), species.SpeciesOnRegion) for s in self._involved_species) if trans_membrane: raise RxDException('Reaction does not support multi-compartment dynamics. Use MultiCompartmentReaction.') @property def f_rate(self): """Get or set the forward reaction rate""" return self._original_rate_f @property def b_rate(self): """Get or set the backward reaction rate""" return self._original_rate_b @f_rate.setter def f_rate(self, value): if self._dir not in ('<>', '>'): raise RxDException('no forward reaction in reaction scheme') self._original_rate_f = value self._update_rates() @b_rate.setter def b_rate(self, value): if self._dir not in ('<>', '<'): raise RxDException('no backward reaction in reaction scheme') self._original_rate_b = value self._update_rates() def __repr__(self): if len(self._regions) != 1 or self._regions[0] is not None: regions_short = '[' + ', '.join(r._short_repr() for r in self._regions) + ']' return 'Reaction(%s, %s, rate_b=%s, regions=%s, custom_dynamics=%r)' % (self._scheme._short_repr(), self._original_rate_f._short_repr(), self._original_rate_b._short_repr(), regions_short, self._custom_dynamics) else: return 'Reaction(%s, %s, rate_b=%s, custom_dynamics=%r)' % (self._scheme._short_repr(), self._original_rate_f._short_repr(), self._original_rate_b._short_repr(), self._custom_dynamics) def _do_memb_scales(self): # nothing to do since NEVER a membrane flux pass neuron-7.5/share/lib/python/neuron/rxd/region.py000066400000000000000000000316321323325274500220370ustar00rootroot00000000000000from .rxdException import RxDException from neuron import h try: from . import geometry3d, dimension3 except: pass import copy import itertools import numpy from . import geometry as geo import weakref from . import initializer import warnings _all_regions = [] _region_count = 0 def _sort_secs(secs): # sort the sections root_secs = h.SectionList() root_secs.allroots() all_sorted = h.SectionList() for root in root_secs: all_sorted.wholetree(sec=root) secs_names = dict([(sec.hoc_internal_name(),sec) for sec in secs]) for sec in secs: if h.section_orientation(sec=sec): raise RxDException('still need to deal with backwards sections') return [secs_names[sec.hoc_internal_name()] for sec in all_sorted if sec.hoc_internal_name() in secs_names] class Region(object): """Declare a conceptual region of the neuron. Examples: Cytosol, ER, extracellular space """ def __repr__(self): # Note: this used to print out dimension, but that's now on a per-segment basis # TODO: remove the note when that is fully true self._dx = None return 'Region(..., nrn_region=%r, geometry=%r, dx=%r, name=%r)' % (self.nrn_region, self._geometry, self._dx, self._name) def _short_repr(self): if self._name is not None: return 'Region(<%r>)' % self._name else: return self.__repr__() def _do_init(self): global _region_count del self._allow_setting from . import rxd # parameters that were defined in old init # TODO: remove need for this bit nrn_region = self.nrn_region # TODO: self.dx needs to be removed... eventually that should be on a per-section basis # right now, it has to be consistent but this is unenforced if self.dx is None: self.dx = 0.25 dx = self.dx self._secs1d = [] self._secs3d = [] dims = rxd._dimensions for sec in self._secs: dim = dims[sec] if dim == 1: self._secs1d.append(sec) elif dim == 3: self._secs3d.append(sec) else: raise RxDException('unknown dimension: %r in section %r' % (dim, sec.name())) # TODO: I used to not sort secs in 3D if hasattr(self._secs, 'sections'); figure out why self._secs = _sort_secs(self._secs) self._secs1d = _sort_secs(self._secs1d) if self._secs3d and not(hasattr(self._geometry, 'volumes3d')): raise RxDException('selected geometry (%r) does not support 3d mode' % self._geometry) self._id = _region_count _region_count += 1 if self._secs3d: if nrn_region == 'o': raise RxDException('3d simulations do not support nrn_region="o" yet') self._mesh, sa, vol, self._tri = self._geometry.volumes3d(self._secs3d, dx=dx) sa_values = sa.values vol_values = vol.values self._objs = {} # TODO: handle soma outlines correctly if not hasattr(self.secs, 'sections'): for sec in self._secs3d: # NOTE: previously used centroids_by_segment instead # but that did bad things with spines self._objs.update(dimension3.objects_by_segment(sec)) mesh_values = self._mesh.values xs, ys, zs = mesh_values.nonzero() mesh_xs, mesh_ys, mesh_zs = self._mesh._xs, self._mesh._ys, self._mesh._zs segs = [] on_surface = [] nodes_by_seg = {} surface_nodes_by_seg = {} # process surface area info self._sa = numpy.array([sa_values[x, y, z] for x, y, z in zip(xs, ys, zs)]) on_surface = self._sa != 0 # volumes self._vol = numpy.array([vol_values[x, y, z] for x, y, z in zip(xs, ys, zs)]) # map each node to a segment for x, y, z, is_surf in zip(xs, ys, zs, on_surface): # compute distances to all objects to figure out which one # is closest # TODO: be smarter about this: use the chunkification code # from geometry3d closest = None closest_dist = float('inf') myx, myy, myz = mesh_xs[x], mesh_ys[y], mesh_zs[z] for s, obs in zip(list(self._objs.keys()), list(self._objs.values())): for o in obs: # _distance is like distance except ignores end plates # when inside dist = o._distance(myx, myy, myz) if dist < closest_dist: closest = s closest_dist = dist seg = closest segs.append(seg) # TODO: predeclare these so don't have to check each time # TODO: don't use segments; use internal names to avoid keeping sections alive if seg not in nodes_by_seg: nodes_by_seg[seg] = [] surface_nodes_by_seg[seg] = [] nodes_by_seg[seg].append(len(segs) - 1) if is_surf: surface_nodes_by_seg[seg].append(len(segs) - 1) # NOTE: This stuff is for 3D part only self._surface_nodes_by_seg = surface_nodes_by_seg self._nodes_by_seg = nodes_by_seg self._on_surface = on_surface self._xs = xs self._ys = ys self._zs = zs # TODO: don't do this! This might keep the section alive! self._segs = segs self._dx = self.dx def _indices_from_sec_x(self, sec, position): # TODO: the assert is here because the diameter is not computed correctly # unless it coincides with a 3d point, which we only know to exist at the # endpoints and because the section does not proceed linearly between # the endpoints (in general)... which affects the computation of the # normal vector as well assert(position in (0, 1)) # NOTE: some care is necessary in constructing normal vector... must be # based on end frusta, not on vector between end points if position == 0: x = h.x3d(0, sec=sec) y = h.y3d(0, sec=sec) z = h.z3d(0, sec=sec) nx = h.x3d(1, sec=sec) - x ny = h.y3d(1, sec=sec) - y nz = h.z3d(1, sec=sec) - z elif position == 1: n = int(h.n3d(sec=sec)) x = h.x3d(n - 1, sec=sec) y = h.y3d(n - 1, sec=sec) z = h.z3d(n - 1, sec=sec) # NOTE: sign of the normal is irrelevant nx = x - h.x3d(n - 2, sec=sec) ny = y - h.y3d(n - 2, sec=sec) nz = z - h.z3d(n - 2, sec=sec) else: raise RxDException('should never get here') # x, y, z = x * x1 + (1 - x) * x0, x * y1 + (1 - x) * y0, x * z1 + (1 - x) * z1 r = sec(position).diam * 0.5 plane_of_disc = geometry3d.graphicsPrimitives.Plane(x, y, z, nx, ny, nz) potential_coordinates = [] mesh = self._mesh xs, ys, zs = mesh._xs, mesh._ys, mesh._zs xlo, ylo, zlo = xs[0], ys[0], zs[0] # locate the indices of the cube containing the sphere containing the disc # TODO: write this more efficiently i_indices = [i for i, a in enumerate(xs) if abs(a - x) < r] j_indices = [i for i, a in enumerate(ys) if abs(a - y) < r] k_indices = [i for i, a in enumerate(zs) if abs(a - z) < r] sphere_indices = [(i, j, k) for i, j, k in itertools.product(i_indices, j_indices, k_indices) if (xs[i] - x) ** 2 + (ys[j] - y) ** 2 + (zs[k] - z) ** 2 < r ** 2] dx2 = self.dx * 0.5 dx = self.dx disc_indices = [] for i, j, k in sphere_indices: # a, b, c = xs[i], ys[j], zs[k] # TODO: no need to compute all; can stop when some True and some False # on_side1 = [plane_of_disc.distance(x, y, z) >= 0 for x, y, z in itertools.product([a - dx2, a + dx2], [b - dx2, b + dx2], [c - dx2, c + dx2])] # NOTE: the expression is structured this way to make sure it tests the exact same corner coordinates for corners shared by multiple voxels and that there are no round-off issues (an earlier attempt had round-off issues that resulted in double-thick discs when the frustum ended exactly on a grid plane) on_side1 = [plane_of_disc.distance(x, y, z) >= 0 for x, y, z in itertools.product([(xlo + (i - 1) * dx) + dx2, (xlo + i * dx) + dx2], [(ylo + (j - 1) * dx) + dx2, (ylo + j * dx) + dx2], [(zlo + (k - 1) * dx) + dx2, (zlo + k * dx) + dx2])] # need both sides to have at least one corner if any(on_side1) and not all(on_side1): # if we're here, then we've found a point on the disc. disc_indices.append((i, j, k)) return disc_indices def __init__(self, secs=None, nrn_region=None, geometry=None, dimension=None, dx=None, name=None): """ In NEURON 7.4+, secs is optional at initial region declaration, but it must be specified before the reaction-diffusion model is instantiated. .. note:: dimension and dx will be deprecated in a future version """ self._allow_setting = True self.secs = secs self.nrn_region = nrn_region self.geometry = geometry if dimension is not None: warnings.warn('dimension argument was a development feature only; use set_solve_type instead... the current version sets all the sections to your requested dimension, but this will override any previous settings') import neuron neuron.rxd.set_solve_type(secs, dimension=dimension) self._name = name self.dx = dx _all_regions.append(weakref.ref(self)) # initialize self if the rest of rxd is already initialized if initializer.is_initialized(): self._do_init() @property def nrn_region(self): """Get or set the classic NEURON region associated with this object. There are three possible values: * `'i'` -- just inside the plasma membrane * `'o'` -- just outside the plasma membrane * `None` -- none of the above .. note:: Setting only supported in NEURON 7.4+, and then only before the reaction-diffusion model is instantiated. """ return self._nrn_region @nrn_region.setter def nrn_region(self, value): if hasattr(self, '_allow_setting'): if value not in (None, 'i', 'o'): raise RxDException('nrn_region must be one of: None, "i", "o"') else: self._nrn_region = value else: raise RxDException('Cannot set nrn_region now; model already instantiated') @property def geometry(self): """Get or set the geometry associated with this region. Setting the geometry to `None` will cause it to default to `rxd.geometry.inside`. .. note:: New in NEURON 7.4+. Setting allowed only before the reaction-diffusion model is instantiated. """ return self._geometry @geometry.setter def geometry(self, value): if hasattr(self, '_allow_setting'): if value is None: value = geo.inside self._geometry = value else: raise RxDException('Cannot set geometry now; model already instantiated') @property def name(self): """Get or set the Region's name. .. note:: New in NEURON 7.4+. """ return self._name @name.setter def name(self, value): self._name = value @property def _semi_compile(self): return 'r%d' % self._id @property def secs(self): """Get or set the sections associated with this region. The sections may be expressed as a NEURON SectionList or as any Python iterable of sections. Note: The return value is a copy of the internal section list; modifying it will not change the Region. .. note:: Setting is new in NEURON 7.4+ and allowed only before the reaction-diffusion model is instantiated. """ if hasattr(self._secs, '__len__'): return list(self._secs) else: return [self._secs] @secs.setter def secs(self, value): if hasattr(self, '_allow_setting'): self._secs = value else: raise RxDException('Cannot set secs now; model already instantiated') neuron-7.5/share/lib/python/neuron/rxd/rxd.py000066400000000000000000001062201323325274500213450ustar00rootroot00000000000000import neuron from neuron import h, nrn from . import species, node, section1d, region, morphology from .nodelist import NodeList import weakref import numpy import scipy.sparse import scipy.sparse.linalg import ctypes import atexit from . import options from .rxdException import RxDException from . import initializer import collections # aliases to avoid repeatedly doing multiple hash-table lookups _numpy_array = numpy.array _numpy_zeros = numpy.zeros _scipy_sparse_linalg_bicgstab = scipy.sparse.linalg.bicgstab _scipy_sparse_eye = scipy.sparse.eye _scipy_sparse_linalg_spsolve = scipy.sparse.linalg.spsolve _scipy_sparse_dok_matrix = scipy.sparse.dok_matrix _scipy_sparse_linalg_factorized = scipy.sparse.linalg.factorized _scipy_sparse_coo_matrix = scipy.sparse.coo_matrix _species_get_all_species = species._get_all_species _node_get_states = node._get_states _section1d_transfer_to_legacy = section1d._transfer_to_legacy _ctypes_c_int = ctypes.c_int _weakref_ref = weakref.ref _external_solver = None _external_solver_initialized = False def byeworld(): # needed to prevent a seg-fault error at shudown in at least some # combinations of NEURON and Python, which I think is due to objects # getting deleted out-of-order global _react_matrix_solver try: del _react_matrix_solver except NameError: # if it already didn't exist, that's fine pass atexit.register(byeworld) # Faraday's constant (store to reduce number of lookups) FARADAY = h.FARADAY # converting from mM um^3 to molecules # = 6.02214129e23 * 1000. / 1.e18 / 1000 # = avogadro * (L / m^3) * (m^3 / um^3) * (mM / M) # value for avogardro's constant from NIST webpage, accessed 25 April 2012: # http://physics.nist.gov/cgi-bin/cuu/Value?na _conversion_factor = 602214.129 _cvode_object = h.CVode() last_diam_change_cnt = None last_structure_change_cnt = None _linmodadd = None _linmodadd_c = None _diffusion_matrix = None _curr_scales = None _curr_ptrs = None _curr_indices = None _all_reactions = [] _zero_volume_indices = [] _nonzero_volume_indices = [] _double_ptr = ctypes.POINTER(ctypes.c_double) _int_ptr = ctypes.POINTER(_ctypes_c_int) nrn_tree_solve = neuron.nrn_dll_sym('nrn_tree_solve') nrn_tree_solve.restype = None _dptr = _double_ptr _dimensions = collections.defaultdict(lambda: 1) _default_dx = 0.25 _default_method = 'deterministic' def set_solve_type(domain=None, dimension=None, dx=None, nsubseg=None, method=None): """Specify the numerical discretization and solver options. domain -- a section or Python iterable of sections""" setting_default = False if domain is None: domain = h.allsec() setting_default = True elif isinstance(domain, nrn.Section): domain = [domain] # NOTE: These attributes are set on a per-nrn.Section basis; they cannot # assume Section1D objects exist because they might be specified before # those objects are created # domain is now always an iterable (or invalid) if method is not None: raise RxDException('using set_solve_type to specify method is not yet implemented') if dimension is not None: if dimension not in (1, 3): raise RxDException('invalid option to set_solve_type: dimension must be 1 or 3') factory = lambda: dimension if setting_default: _dimensions.default_factory = factory for sec in domain: _dimensions[sec] = dimension if dx is not None: raise RxDException('using set_solve_type to specify dx is not yet implemented') if nsubseg is not None: raise RxDException('using set_solve_type to specify nsubseg is not yet implemented') def _unregister_reaction(r): global _all_reactions for i, r2 in enumerate(_all_reactions): if r2() == r: del _all_reactions[i] break def _register_reaction(r): # TODO: should we search to make sure that (a weakref to) r hasn't already been added? global _all_reactions, _external_solver_initialized _all_reactions.append(_weakref_ref(r)) _external_solver_initialized = False def _after_advance(): global last_diam_change_cnt last_diam_change_cnt = _diam_change_count.value def re_init(): """reinitializes all rxd concentrations to match HOC values, updates matrices""" global _external_solver_initialized h.define_shape() if not species._has_3d: # TODO: if we do have 3D, make sure that we do the necessary parts of this # update current pointers section1d._purge_cptrs() for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._register_cptrs() # update matrix equations _setup_matrices() for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s.re_init() # TODO: is this safe? _cvode_object.re_init() _external_solver_initialized = False def _invalidate_matrices(): # TODO: make a separate variable for this? global last_structure_change_cnt, _diffusion_matrix, _external_solver_initialized _diffusion_matrix = None last_structure_change_cnt = None _external_solver_initialized = False _rxd_offset = None def _atolscale(y): real_index_lookup = {item: index for index, item in enumerate(_nonzero_volume_indices)} for sr in list(_species_get_all_species().values()): s = sr() if s is not None: shifted_i = [real_index_lookup[i] + _rxd_offset for i in s.indices() if i in real_index_lookup] y[shifted_i] *= s._atolscale def _ode_count(offset): global last_structure_change_cnt global _rxd_offset initializer._do_init() _rxd_offset = offset if _diffusion_matrix is None or last_structure_change_cnt != _structure_change_count.value: _setup_matrices() last_structure_change_cnt = _structure_change_count.value return len(_nonzero_volume_indices) def _ode_reinit(y): y[_rxd_offset : _rxd_offset + len(_nonzero_volume_indices)] = _node_get_states()[_nonzero_volume_indices] def _ode_fun(t, y, ydot): initializer.assert_initialized() lo = _rxd_offset hi = lo + len(_nonzero_volume_indices) if lo == hi: return states = _node_get_states() states[_nonzero_volume_indices] = y[lo : hi] # need to fill in the zero volume states with the correct concentration # this assumes that states at the zero volume indices is zero (although that # assumption could be easily removed) #matrix = _scipy_sparse_dok_matrix((len(_zero_volume_indices), len(states))) """ for i, row in enumerate(_zero_volume_indices): d = _diffusion_matrix[row, row] if d: nzj = _diffusion_matrix[row].nonzero()[1] print 'nzj:', nzj for j in nzj: matrix[i, j] = -_diffusion_matrix[row, j] / d states[_zero_volume_indices] = matrix * states """ if len(_zero_volume_indices): states[_zero_volume_indices] = _mat_for_zero_volume_nodes * states """ for i in _zero_volume_indices: v = _diffusion_matrix[i] * states d = _diffusion_matrix[i, i] if d: states[i] = -v / d """ # TODO: make this so that the section1d parts use cptrs (can't do this directly for 3D because sum, but could maybe move that into the C) # the old way: _section1d_transfer_to_legacy() for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._transfer_to_legacy() if ydot is not None: # diffusion_matrix = - jacobian ydot[lo : hi] = (_rxd_reaction(states) - _diffusion_matrix * states)[_nonzero_volume_indices] states[_zero_volume_indices] = 0 def _ode_solve(dt, t, b, y): initializer.assert_initialized() if _diffusion_matrix is None: _setup_matrices() lo = _rxd_offset hi = lo + len(_nonzero_volume_indices) n = len(_node_get_states()) # TODO: this will need changed when can have both 1D and 3D if species._has_3d: if species._has_1d: raise Exception('development issue: cvode currently does not support hybrid simulations (fix by shifting for zero volume indices)') # NOTE: only working on the rxd part rxd_b = b[lo : hi] # TODO: make sure can handle both 1D and 3D m = eye_minus_dt_J(n, dt) # removed diagonal preconditioner since tests showed no improvement in convergence result, info = _scipy_sparse_linalg_bicgstab(m, dt * rxd_b) assert(info == 0) b[lo : hi] = _react_matrix_solver(result) else: # 1D only; use Hines solver full_b = numpy.zeros(n) full_b[_nonzero_volume_indices] = b[lo : hi] b[lo : hi] = _react_matrix_solver(_diffusion_matrix_solve(dt, full_b))[_nonzero_volume_indices] # the following version computes the reaction matrix each time #full_y = numpy.zeros(n) #full_y[_nonzero_volume_indices] = y[lo : hi] #b[lo : hi] = _reaction_matrix_solve(dt, full_y, _diffusion_matrix_solve(dt, full_b))[_nonzero_volume_indices] # this line doesn't include the reaction contributions to the Jacobian #b[lo : hi] = _diffusion_matrix_solve(dt, full_b)[_nonzero_volume_indices] _rxd_induced_currents = None def _currents(rhs): initializer._do_init() # setup membrane fluxes from our stuff # TODO: cache the memb_cur_ptrs, memb_cur_charges, memb_net_charges, memb_cur_mapped # because won't change very often global _rxd_induced_currents # need this; think it's because of initialization of mod files if _curr_indices is None: return # TODO: change so that this is only called when there are in fact currents _rxd_induced_currents = _numpy_zeros(len(_curr_indices)) rxd_memb_flux = [] memb_cur_ptrs = [] memb_cur_charges = [] memb_net_charges = [] memb_cur_mapped = [] for rptr in _all_reactions: r = rptr() if r and r._membrane_flux: # NOTE: memb_flux contains any scaling we need new_fluxes = r._get_memb_flux(_node_get_states()) rxd_memb_flux += list(new_fluxes) memb_cur_ptrs += r._cur_ptrs memb_cur_mapped += r._cur_mapped memb_cur_charges += [r._cur_charges] * len(new_fluxes) memb_net_charges += [r._net_charges] * len(new_fluxes) # TODO: is this in any way dimension dependent? if rxd_memb_flux: # TODO: remove the asserts when this is verified to work assert(len(rxd_memb_flux) == len(_cur_node_indices)) assert(len(rxd_memb_flux) == len(memb_cur_ptrs)) assert(len(rxd_memb_flux) == len(memb_cur_charges)) assert(len(rxd_memb_flux) == len(memb_net_charges)) for flux, cur_ptrs, cur_charges, net_charge, i, cur_maps in zip(rxd_memb_flux, memb_cur_ptrs, memb_cur_charges, memb_net_charges, _cur_node_indices, memb_cur_mapped): rhs[i] -= net_charge * flux #print net_charge * flux #import sys #sys.exit() # TODO: remove this assert when more thoroughly tested assert(len(cur_ptrs) == len(cur_maps)) for ptr, charge, cur_map_i in zip(cur_ptrs, cur_charges, cur_maps): # this has the opposite sign of the above because positive # currents lower the membrane potential cur = charge * flux ptr[0] += cur for sign, c in zip([-1, 1], cur_maps): if c is not None: _rxd_induced_currents[c] += sign * cur _last_m = None _last_preconditioner = None _fixed_step_count = 0 from scipy.sparse.linalg import spilu as _spilu from scipy.sparse.linalg import LinearOperator as _LinearOperator from scipy.sparse import csc_matrix def eye_minus_dt_J(n, dt): """correctly computes I - dt J as needed for the lhs of an advance. The difficulty here is that the _euler_matrix also contains conservation equations. These are preserved unchanged (i.e. no +1). This reads two globals: _euler_matrix and _zero_volume_indices. n is the length of the state vector (including the conservation nodes). """ m = _scipy_sparse_eye(n, n) - dt * _euler_matrix # correct to account for algebraic conservation nodes which don't get the +1 for i in _zero_volume_indices: m[i, i] -= 1 return m def _fixed_step_solve(raw_dt): initializer._do_init() global pinverse, _fixed_step_count global _last_m, _last_dt, _last_preconditioner if species._species_count == 0: return # allow for skipping certain fixed steps # warning: this risks numerical errors! fixed_step_factor = options.fixed_step_factor _fixed_step_count += 1 if _fixed_step_count % fixed_step_factor: return dt = fixed_step_factor * raw_dt # TODO: this probably shouldn't be here if _diffusion_matrix is None and _euler_matrix is None: _setup_matrices() states = _node_get_states()[:] b = _rxd_reaction(states) - _diffusion_matrix * states if not species._has_3d: # use Hines solver since 1D only states[:] += _reaction_matrix_solve(dt, states, _diffusion_matrix_solve(dt, dt * b)) # clear the zero-volume "nodes" states[_zero_volume_indices] = 0 # TODO: refactor so this isn't in section1d... probably belongs in node _section1d_transfer_to_legacy() _last_preconditioner = None else: # TODO: this looks to be semi-implicit method because it doesn't take into account the reaction contribution to the Jacobian; do we care? # the actual advance via implicit euler n = len(states) if _last_dt != dt or _last_preconditioner is None: _last_m = eye_minus_dt_J(n, dt) _last_preconditioner = _LinearOperator((n, n), _spilu(csc_matrix(_last_m)).solve) _last_dt = dt # removed diagonal preconditioner since tests showed no improvement in convergence result, info = _scipy_sparse_linalg_bicgstab(_last_m, dt * b, M=_last_preconditioner) assert(info == 0) states[:] += result # clear the zero-volume "nodes" states[_zero_volume_indices] = 0 for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._transfer_to_legacy() def _rxd_reaction(states): # TODO: this probably shouldn't be here # TODO: this was included in the 3d, probably shouldn't be there either # TODO: if its None and there is 3D... should we do anything special? if _diffusion_matrix is None and not species._has_3d: _setup_matrices() b = _numpy_zeros(len(states)) if _curr_ptr_vector is not None: _curr_ptr_vector.gather(_curr_ptr_storage_nrn) b[_curr_indices] = _curr_scales * (_curr_ptr_storage + _rxd_induced_currents) #b[_curr_indices] = _curr_scales * [ptr[0] for ptr in _curr_ptrs] # TODO: store weak references to the r._evaluate in addition to r so no # repeated lookups for rptr in _all_reactions: r = rptr() if r: indices, mult, rate = r._evaluate(states) # we split this in parts to allow for multiplicities and to allow stochastic to make the same changes in different places for i, m in zip(indices, mult): b[i] += m * rate node._apply_node_fluxes(b) return b _last_preconditioner_dt = 0 _last_dt = None _last_m = None _diffusion_d = None _diffusion_a = None _diffusion_b = None _diffusion_p = None _c_diagonal = None _cur_node_indices = None _diffusion_a_ptr, _diffusion_b_ptr, _diffusion_p_ptr = None, None, None def _diffusion_matrix_solve(dt, rhs): # only get here if already initialized global _last_dt global _diffusion_a_ptr, _diffusion_d, _diffusion_b_ptr, _diffusion_p_ptr, _c_diagonal if _diffusion_matrix is None: return numpy.array([]) n = len(rhs) if _last_dt != dt: global _c_diagonal, _diffusion_a_base, _diffusion_b_base, _diffusion_d_base global _diffusion_a, _diffusion_b, _diffusion_p _last_dt = dt # clear _c_diagonal and _last_dt to trigger a recalculation if _c_diagonal is None: _diffusion_d_base = _numpy_array(_diffusion_matrix.diagonal()) _diffusion_a_base = _numpy_zeros(n) _diffusion_b_base = _numpy_zeros(n) # TODO: the int32 bit may be machine specific _diffusion_p = _numpy_array([-1] * n, dtype=numpy.int32) for j in range(n): col = _diffusion_matrix[:, j] col_nonzero = col.nonzero() for i in col_nonzero[0]: if i < j: _diffusion_p[j] = i assert(_diffusion_a_base[j] == 0) _diffusion_a_base[j] = col[i, 0] _diffusion_b_base[j] = _diffusion_matrix[j, i] _c_diagonal = _linmodadd_c.diagonal() _diffusion_d = _c_diagonal + dt * _diffusion_d_base _diffusion_b = dt * _diffusion_b_base _diffusion_a = dt * _diffusion_a_base _diffusion_a_ptr = _diffusion_a.ctypes.data_as(_double_ptr) _diffusion_b_ptr = _diffusion_b.ctypes.data_as(_double_ptr) _diffusion_p_ptr = _diffusion_p.ctypes.data_as(_int_ptr) result = _numpy_array(rhs) d = _numpy_array(_diffusion_d) d_ptr = d.ctypes.data_as(_double_ptr) result_ptr = result.ctypes.data_as(_double_ptr) nrn_tree_solve(_diffusion_a_ptr, d_ptr, _diffusion_b_ptr, result_ptr, _diffusion_p_ptr, _ctypes_c_int(n)) return result def _get_jac(dt, states): # only get here if already initialized # now handle the reaction contribution to the Jacobian # this works as long as (I - dt(Jdiff + Jreact)) \approx (I - dtJreact)(I - dtJdiff) count = 0 n = len(states) rows = list(range(n)) cols = list(range(n)) data = [1] * n for rptr in _all_reactions: r = rptr() if r: # TODO: store weakrefs to r._jacobian_entries as well as r # this will reduce lookup time r_rows, r_cols, r_data = r._jacobian_entries(states, multiply=-dt) # TODO: can we predict the length of rows etc in advance so we # don't need to grow them? rows += r_rows cols += r_cols data += r_data count += 1 if count > 0 and n > 0: return scipy.sparse.coo_matrix((data, (rows, cols)), shape=(n, n)) return None def _reaction_matrix_solve(dt, states, rhs): if not options.use_reaction_contribution_to_jacobian: return rhs jac = _get_jac(dt, states) if jac is not None: jac = jac.tocsr() """ print 'states:', list(states) print 'jacobian (_solve):' m = jac.todense() for i in xrange(m.shape[0]): for j in xrange(m.shape[1]): print ('%15g' % m[i, j]), print """ #result, info = scipy.sparse.linalg.bicgstab(jac, rhs) #assert(info == 0) result = _scipy_sparse_linalg_spsolve(jac, rhs) else: result = rhs return result _react_matrix_solver = None def _reaction_matrix_setup(dt, unexpanded_states): global _react_matrix_solver if not options.use_reaction_contribution_to_jacobian: _react_matrix_solver = lambda x: x return states = numpy.zeros(len(node._get_states())) states[_nonzero_volume_indices] = unexpanded_states jac = _get_jac(dt, states) if jac is not None: jac = jac.tocsc() """ print 'jacobian (_reaction_matrix_setup):' m = jac.todense() for i in xrange(m.shape[0]): for j in xrange(m.shape[1]): print ('%15g' % m[i, j]), print """ #result, info = scipy.sparse.linalg.bicgstab(jac, rhs) #assert(info == 0) _react_matrix_solver = _scipy_sparse_linalg_factorized(jac) else: _react_matrix_solver = lambda x: x def _setup(): initializer._do_init() # TODO: this is when I should resetup matrices (structure changed event) global _last_dt, _external_solver_initialized _last_dt = None _external_solver_initialized = False def _conductance(d): pass def _ode_jacobian(dt, t, ypred, fpred): #print '_ode_jacobian: dt = %g, last_dt = %r' % (dt, _last_dt) lo = _rxd_offset hi = lo + len(_nonzero_volume_indices) _reaction_matrix_setup(dt, ypred[lo : hi]) _orig_setup = _setup _orig_currents = _currents _orig_ode_count = _ode_count _orig_ode_reinit = _ode_reinit _orig_ode_fun = _ode_fun _orig_ode_solve = _ode_solve _orig_fixed_step_solve = _fixed_step_solve _orig_ode_jacobian = _ode_jacobian # wrapper functions allow swapping in experimental alternatives def _w_ode_jacobian(dt, t, ypred, fpred): return _ode_jacobian(dt, t, ypred, fpred) #def _w_conductance(d): return _conductance(d) _w_conductance = None def _w_setup(): return _setup() def _w_currents(rhs): return _currents(rhs) def _w_ode_count(offset): return _ode_count(offset) def _w_ode_reinit(y): return _ode_reinit(y) def _w_ode_fun(t, y, ydot): return _ode_fun(t, y, ydot) def _w_ode_solve(dt, t, b, y): return _ode_solve(dt, t, b, y) def _w_fixed_step_solve(raw_dt): return _fixed_step_solve(raw_dt) def _w_atolscale(y): return _atolscale(y) _callbacks = [_w_setup, None, _w_currents, _w_conductance, _w_fixed_step_solve, _w_ode_count, _w_ode_reinit, _w_ode_fun, _w_ode_solve, _w_ode_jacobian, _w_atolscale] _curr_ptr_vector = None _curr_ptr_storage = None _curr_ptr_storage_nrn = None pinverse = None _cur_map = None _h_ptrvector = h.PtrVector _h_vector = h.Vector _structure_change_count = neuron.nrn_dll_sym('structure_change_cnt', _ctypes_c_int) _diam_change_count = neuron.nrn_dll_sym('diam_change_cnt', _ctypes_c_int) def _donothing(): pass def _update_node_data(force=False): global last_diam_change_cnt, last_structure_change_cnt, _curr_indices, _curr_scales, _curr_ptrs, _cur_map global _curr_ptr_vector, _curr_ptr_storage, _curr_ptr_storage_nrn if last_diam_change_cnt != _diam_change_count.value or _structure_change_count.value != last_structure_change_cnt or force: _cur_map = {} last_diam_change_cnt = _diam_change_count.value last_structure_change_cnt = _structure_change_count.value #if not species._has_3d: # TODO: merge this with the 3d/hybrid case? for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._update_node_data() for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._update_region_indices() #end#if for rptr in _all_reactions: r = rptr() if r is not None: r._update_indices() _curr_indices = [] _curr_scales = [] _curr_ptrs = [] for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._setup_currents(_curr_indices, _curr_scales, _curr_ptrs, _cur_map) num = len(_curr_ptrs) if num: _curr_ptr_vector = _h_ptrvector(num) _curr_ptr_vector.ptr_update_callback(_donothing) for i, ptr in enumerate(_curr_ptrs): _curr_ptr_vector.pset(i, ptr) _curr_ptr_storage_nrn = _h_vector(num) _curr_ptr_storage = _curr_ptr_storage_nrn.as_numpy() else: _curr_ptr_vector = None _curr_scales = _numpy_array(_curr_scales) _euler_matrix = None # TODO: make sure this does the right thing when the diffusion constant changes between two neighboring nodes def _setup_matrices(): global _linmodadd, _linmodadd_c, _diffusion_matrix, _linmodadd_b, _last_dt, _c_diagonal, _euler_matrix global _cur_node_indices global _zero_volume_indices, _nonzero_volume_indices # TODO: this sometimes seems to get called twice. Figure out why and fix, if possible. n = len(_node_get_states()) if species._has_3d: _euler_matrix = _scipy_sparse_dok_matrix((n, n), dtype=float) for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._setup_matrices3d(_euler_matrix) _diffusion_matrix = -_euler_matrix _euler_matrix = _euler_matrix.tocsr() _update_node_data(True) # NOTE: if we also have 1D, this will be replaced with the correct values below _zero_volume_indices = [] _nonzero_volume_indices = list(range(len(_node_get_states()))) if species._has_1d: n = species._1d_submatrix_n() # TODO: initialization is slow. track down why _last_dt = None _c_diagonal = None for sr in list(_species_get_all_species().values()): s = sr() if s is not None: s._assign_parents() _update_node_data(True) # remove old linearmodeladdition _linmodadd = None _linmodadd_cur = None if n: # create sparse matrix for C in cy'+gy=b _linmodadd_c = _scipy_sparse_dok_matrix((n, n)) # most entries are 1 except those corresponding to the 0 and 1 ends # create the matrix G if not species._has_3d: # if we have both, then put the 1D stuff into the matrix that already exists for 3D _diffusion_matrix = _scipy_sparse_dok_matrix((n, n)) for sr in list(_species_get_all_species().values()): s = sr() if s is not None: #print '_diffusion_matrix.shape = %r, n = %r, species._has_3d = %r' % (_diffusion_matrix.shape, n, species._has_3d) s._setup_diffusion_matrix(_diffusion_matrix) s._setup_c_matrix(_linmodadd_c) # modify C for cases where no diffusive coupling of 0, 1 ends # TODO: is there a better way to handle no diffusion? for i in range(n): if not _diffusion_matrix[i, i]: _linmodadd_c[i, i] = 1 # and the vector b _linmodadd_b = _h_vector(n) # setup for induced membrane currents _cur_node_indices = [] for rptr in _all_reactions: r = rptr() if r is not None: r._setup_membrane_fluxes(_cur_node_indices, _cur_map) #_cvode_object.re_init() _linmodadd_c = _linmodadd_c.tocsr() if species._has_3d: _euler_matrix = -_diffusion_matrix volumes = node._get_data()[0] _zero_volume_indices = numpy.where(volumes == 0)[0] _nonzero_volume_indices = volumes.nonzero()[0] if species._has_1d and species._has_3d: # TODO: add connections to matrix; for now: find them hybrid_neighbors = collections.defaultdict(lambda: []) hybrid_diams = {} dxs = set() for sr in list(_species_get_all_species().values()): s = sr() if s is not None: if s._nodes and s._secs: # have both 1D and 3D, so find the neighbors # for each of the 3D sections, find the parent sections for r in s._regions: dxs.add(r._dx) for sec in r._secs3d: parent_sec = morphology.parent(sec) # are any of these a match with a 1d section? if s._has_region_section(r, parent_sec): # this section has a 1d section that is a parent index1d, indices3d = _get_node_indices(s, r, sec, h.section_orientation(sec=sec), parent_sec, h.parent_connection(sec=sec)) hybrid_neighbors[index1d] += indices3d hybrid_diams[index1d] = parent_sec(h.parent_connection(sec=sec)).diam else: for sec1d in r._secs1d: parent_1d = morphology.parent(sec1d) if parent_1d == sec: # it is the parent of a 1d section index1d, indices3d = _get_node_indices(s, r, sec, h.parent_connection(sec=sec1d), sec1d, h.section_orientation(sec=sec1d)) hybrid_neighbors[index1d] += indices3d hybrid_diams[index1d] = sec1d(h.section_orientation(sec=sec1d)).diam break elif parent_1d == parent_sec: # it connects to the parent of a 1d section index1d, indices3d = _get_node_indices(s, r, sec, h.section_orientation(sec=sec), sec1d, h.section_orientation(sec=sec1d)) hybrid_neighbors[index1d] += indices3d hybrid_diams[index1d] = sec1d(h.section_orientation(sec=sec1d)).diam break if len(dxs) > 1: raise RxDException('currently require a unique value for dx') dx = dxs.pop() diffs = node._diffs n = len(_node_get_states()) # TODO: validate that we're doing the right thing at boundaries for index1d in list(hybrid_neighbors.keys()): neighbors3d = set(hybrid_neighbors[index1d]) # NOTE: splitting the connection area equally across all the connecting nodes area = (numpy.pi * 0.25 * hybrid_diams[index1d] ** 2) / len(neighbors3d) for i in neighbors3d: d = diffs[i] vol = node._volumes[i] rate = d * area / (vol * dx / 2.) # make the connections on the 3d side _euler_matrix[i, i] -= rate _euler_matrix[i, index1d] += rate # make the connections on the 1d side (scale by vol because conserving mass not volume) _euler_matrix[index1d, index1d] -= rate * vol _euler_matrix[index1d, i] += rate * vol #print 'index1d row sum:', sum(_euler_matrix[index1d, j] for j in xrange(n)) #print 'index1d col sum:', sum(_euler_matrix[j, index1d] for j in xrange(n)) # we do this last because of performance issues with changing sparsity of csr matrices if _diffusion_matrix is not None: _diffusion_matrix = _diffusion_matrix.tocsr() if _euler_matrix is not None: _euler_matrix = _euler_matrix.tocsr() if species._has_1d: if species._has_3d: _diffusion_matrix = -_euler_matrix n = species._1d_submatrix_n() if n: matrix = _diffusion_matrix[_zero_volume_indices].tocsr() indptr = matrix.indptr matrixdata = matrix.data count = len(_zero_volume_indices) for row, i in enumerate(_zero_volume_indices): d = _diffusion_matrix[i, i] if d: matrixdata[indptr[row] : indptr[row + 1]] /= -d matrix[row, i] = 0 else: matrixdata[indptr[row] : indptr[row + 1]] = 0 global _mat_for_zero_volume_nodes _mat_for_zero_volume_nodes = matrix # TODO: _mat_for_zero_volume_nodes is used for CVode. # Figure out if/how it has to be changed for hybrid 1D/3D sims (probably just augment with identity? or change how its used to avoid multiplying by I) """ if pt1 in indices: ileft = indices[pt1] dleft = (d + diffs[ileft]) * 0.5 left = dleft * areal / (vol * dx) euler_matrix[index, ileft] += left euler_matrix[index, index] -= left if pt2 in indices: iright = indices[pt2] dright = (d + diffs[iright]) * 0.5 right = dright * arear / (vol * dx) euler_matrix[index, iright] += right euler_matrix[index, index] -= right """ def _get_node_indices(species, region, sec3d, x3d, sec1d, x1d): # TODO: remove need for this assumption assert(x1d in (0, 1)) disc_indices = region._indices_from_sec_x(sec3d, x3d) #print '%r(%g) connects to the 1d section %r(%g)' % (sec3d, x3d, sec1d, x1d) #print 'disc indices: %r' % disc_indices indices3d = [] for node in species._nodes: if node._r == region: for i, j, k in disc_indices: if node._i == i and node._j == j and node._k == k: indices3d.append(node._index) #print 'found node %d with coordinates (%g, %g, %g)' % (node._index, node.x3d, node.y3d, node.z3d) # discard duplicates... # TODO: really, need to figure out all the 3d nodes connecting to a given 1d endpoint, then unique that indices3d = list(set(indices3d)) #print '3d matrix indices: %r' % indices3d # TODO: remove the need for this assertion if x1d == h.section_orientation(sec=sec1d): # TODO: make this whole thing more efficient # the parent node is the nonzero index on the first row before the diagonal first_row = min([node._index for node in species.nodes(region)(sec1d)]) for j in range(first_row): if _euler_matrix[first_row, j] != 0: index_1d = j break else: raise RxDException('should never get here; could not find parent') elif x1d == 1 - h.section_orientation(sec=sec1d): # the ending zero-volume node is the one after the last node # TODO: make this more efficient index_1d = max([node._index for node in species.nodes(region)(sec1d)]) + 1 else: raise RxDException('should never get here; _get_node_indices apparently only partly converted to allow connecting to 1d in middle') #print '1d index is %d' % index_1d return index_1d, indices3d def _init(): initializer._do_init() # TODO: check about the 0 0: result += '+' if c == -1: result += '-(%s)' % short_i elif c != 1: result += '%d*(%s)' % (c, short_i) elif c == 1: result += i if not result: result = '0' return result def __repr__(self): from . import species items = [] counts = [] for item, count in zip(list(self._items.keys()), list(self._items.values())): if count: if isinstance(item, species._SpeciesMathable): items.append(str(item)) counts.append(count) else: items.append(repr(item)) counts.append(count) result = '' for i, c in zip(items, counts): if result and c > 0: result += '+' if c == -1: result += '-(%s)' % i elif c != 1: result += '%d*(%s)' % (c, i) elif c == 1: result += i if not result: result = '0' return result @property def _semi_compile(self): items = [] counts = [] items_append = items.append counts_append = counts.append for item, count in zip(list(self._items.keys()), list(self._items.values())): if count: try: items_append(item._semi_compile) except AttributeError: items_append('%s' % item) counts_append(count) result = '' for i, c in zip(items, counts): if result and c > 0: result += '+' if c == -1: result += '-(%s)' % i elif c != 1: result += '%d*(%s)' % (c, i) elif c == 1: result += i if not result: result = '0' return result def _involved_species(self, the_dict): for item, count in zip(list(self._items.keys()), list(self._items.values())): if count: try: item._involved_species(the_dict) except AttributeError: pass def _do_mul(self, other): if isinstance(other, int): items = dict(self._items) for i in items: items[i] *= other return _Arithmeticed(items, self._valid_reaction_term) else: other = _ensure_arithmeticed(other) return _Arithmeticed(_Product(self, other), False) def __mul__(self, other): return self._do_mul(other) def __rmul__(self, other): return self._do_mul(other) def __abs__(self): return _Arithmeticed(_Function(self, 'numpy.abs', 'abs'), valid_reaction_term=False) def __pos__(self): return self def __neg__(self): return _Arithmeticed(_Function(self, 'rxdmath._neg', '-'), valid_reaction_term=False) def __div__(self, other): other = _ensure_arithmeticed(other) return _Arithmeticed(_Quotient(self, other), False) def __rdiv__(self, other): other = _ensure_arithmeticed(other) return other / self def __truediv__(self, other): other = _ensure_arithmeticed(other) return _Arithmeticed(_Quotient(self, other), False) def __rtruediv__(self, other): other = _ensure_arithmeticed(other) return other / self def __pow__(self, other): return pow(self, other) def __ne__(self, other): other = _ensure_arithmeticed(other) _validate_reaction_terms(self, other) return _Reaction(self, other, '<>') def __gt__(self, other): other = _ensure_arithmeticed(other) _validate_reaction_terms(self, other) return _Reaction(self, other, '>') def __lt__(self, other): other = _ensure_arithmeticed(other) _validate_reaction_terms(self, other) return _Reaction(self, other, '<') def __add__(self, other): other = _ensure_arithmeticed(other) new_items = dict(self._items) for oitem in other._items: if oitem not in new_items: new_items[oitem] = other._items[oitem] else: new_items[oitem] += other._items[oitem] return _Arithmeticed(new_items, self._valid_reaction_term and other._valid_reaction_term) def __radd__(self, other): return self + other def __sub__(self, other): other = _ensure_arithmeticed(other) new_items = dict(self._items) for oitem in other._items: if oitem not in new_items: new_items[oitem] = -other._items[oitem] else: new_items[oitem] -= other._items[oitem] return _Arithmeticed(new_items, False) def __rsub__(self, other): other = _ensure_arithmeticed(other) return other.__sub__(self) neuron-7.5/share/lib/python/neuron/rxd/rxdsection.py000066400000000000000000000023411323325274500227310ustar00rootroot00000000000000from neuron import h class RxDSection: """parent class of all Section types""" def name(self): """The name of the section, as defined by HOC.""" return self._sec.name() @property def region(self): """The Region containing the RxDSection.""" return self._region @property def nseg(self): """The number of segments in the NEURON section. In some implementations, this might be different than the number of nodes in the section. """ return self._nseg @property def nrn_region(self): """The HOC region, if any. 'i' if the corresponding Region maps to HOC's internal concentration 'o' if it maps to HOC's external concentration None otherwise. """ return self._region.nrn_region @property def species(self): """The Species object stores on this RxDSection.""" return self._species() @property def section_orientation(self): """The HOC section orientation.""" return h.section_orientation(sec=self._sec) @property def L(self): """The length of the section in microns.""" return self._sec.L neuron-7.5/share/lib/python/neuron/rxd/section1d.py000066400000000000000000000215561323325274500224510ustar00rootroot00000000000000import weakref from neuron import h from . import node, rxdsection, nodelist, morphology import numpy from .rxdException import RxDException # all concentration ptrs and indices _all_cptrs = [] _all_cindices = [] _c_ptr_vector = None _c_ptr_vector_storage_nrn = None _c_ptr_vector_storage = None _last_c_ptr_length = None def _donothing(): pass def _purge_cptrs(): """purges all cptr information""" global _all_cptrs, _all_cindices, _c_ptr_vector, _last_c_ptr_length global _c_ptr_vector_storage, _c_ptr_vector_storage_nrn _all_cptrs = [] _all_cindices = [] _c_ptr_vector = None _c_ptr_vector_storage_nrn = None _c_ptr_vector_storage = None _last_c_ptr_length = None def _transfer_to_legacy(): global _c_ptr_vector, _c_ptr_vector_storage, _c_ptr_vector_storage_nrn global _last_c_ptr_length size = len(_all_cptrs) if _last_c_ptr_length != size: if size: _c_ptr_vector = h.PtrVector(size) _c_ptr_vector.ptr_update_callback(_donothing) for i, ptr in enumerate(_all_cptrs): _c_ptr_vector.pset(i, ptr) _c_ptr_vector_storage_nrn = h.Vector(size) _c_ptr_vector_storage = _c_ptr_vector_storage_nrn.as_numpy() else: _c_ptr_vector = None _last_c_ptr_length = size if size: _c_ptr_vector_storage[:] = node._get_states()[_all_cindices] _c_ptr_vector.scatter(_c_ptr_vector_storage_nrn) class Section1D(rxdsection.RxDSection): def __init__(self, species, sec, diff, r): self._species = weakref.ref(species) self._diff = diff self._sec = sec self._concentration_ptrs = None self._offset = node._allocate(sec.nseg + 1) self._nseg = sec.nseg self._region = r # NOTE: you must do _init_diffusion_rates after assigning parents def _init_diffusion_rates(self): # call only after roots are set node._diffs[self._offset : self._offset + self.nseg] = self._diff def _update_node_data(self): volumes, surface_area, diffs = node._get_data() geo = self._region._geometry volumes[self._offset : self._offset + self.nseg] = geo.volumes1d(self) surface_area[self._offset : self._offset + self.nseg] = geo.surface_areas1d(self) self._neighbor_areas = geo.neighbor_areas1d(self) @property def indices(self): return list(range(self._offset, self._offset + self.nseg)) def _setup_currents(self, indices, scales, ptrs, cur_map): from . import rxd if self.nrn_region is not None and self.species.name is not None and self.species.charge != 0: ion_curr = '_ref_i%s' % self.species.name indices.extend(self.indices) volumes, surface_area, diffs = node._get_data() # TODO: this implicitly assumes that o and i border the membrane # different signs depending on if an outward current decreases the region's concentration or increases it if self.nrn_region == 'i': sign = -1 elif self.nrn_region == 'o': sign = 1 else: raise RxDException('bad nrn_region for setting up currents (should never get here)') scales.extend(sign * surface_area[self.indices] * 10000. / (self.species.charge * rxd.FARADAY * volumes[self.indices])) for i in range(self.nseg): cur_map[self.species.name + self.nrn_region][self._sec((i + 0.5) / self.nseg)] = len(ptrs) + i ptrs.extend([self._sec((i + 0.5) / self.nseg).__getattribute__(ion_curr) for i in range(self.nseg)]) @property def nodes(self): dx = self.L / self.nseg return nodelist.NodeList([node.Node1D(self, i, ((i + 0.5) * dx) / self.L) for i in range(self.nseg)]) def _transfer_to_legacy(self): states = node._get_states() if self._concentration_ptrs is not None: for i, ptr in zip(range(self._offset, self._offset + self.nseg), self._concentration_ptrs): ptr[0] = states[i] def _register_cptrs(self): global _all_cptrs, _all_cindices if self.nrn_region is not None and self.species.name is not None: ion = '_ref_' + self.species.name + self.nrn_region nseg = self.nseg for i in range(nseg): x = (i + 0.5) / nseg _all_cptrs.append(self._sec(x).__getattribute__(ion)) _all_cindices.append(self._offset + i) self._concentration_ptrs = _all_cptrs[-nseg :] else: self._concentration_ptrs = [] def _setup_diffusion_matrix(self, g): _volumes, _surface_area, _diffs = node._get_data() offset = self._offset dx = self.L / self.nseg #print 'volumes:', _volumes #print 'areas:', self._neighbor_areas for i in range(self.nseg): io = i + offset if i > 0: il = io - 1 else: parent, parenti = self._parent il = parent._offset + parenti # second order accuracy needs diffusion constants halfway # between nodes, which we approx by averaging # TODO: is this the best way to handle boundary nodes? if i > 0: d_l = (_diffs[io] + _diffs[io - 1]) / 2. else: d_l = _diffs[io] if i < self.nseg - 1: d_r = (_diffs[io] + _diffs[io + 1]) / 2. else: d_r = _diffs[io] rate_l = d_l * self._neighbor_areas[i] / (_volumes[io] * dx) if i == 0: # on left edge, only half distance # TODO: verify this is the right thing to do rate_l *= 2 rate_r = d_r * self._neighbor_areas[i + 1] / (_volumes[io] * dx) if i == self.nseg - 1: # on right edge, only half distance # TODO: verify this is the right thing to do rate_r *= 2 # TODO: does this try/except add overhead? remove try: g[io, io] += rate_r + rate_l g[io, io + 1] -= rate_r g[io, il] -= rate_l except IndexError: print('indexerror: g.shape = %r, io = %r, il = %r, len(node._states) = %r' % (g.shape, io, il, len(node._states))) raise # TODO: verify that these are correct if i == 0: # for 0 volume nodes, must conserve MASS not concentration scale = _volumes[io] / _volumes[il] if _volumes[il] else _volumes[io] g[il, il] += rate_l * scale g[il, io] -= rate_l * scale if i == self.nseg - 1: ir = io + 1 # for 0 volume nodes, must conserve MASS not concentration # I suspect ir always points to a 0 volume node, but # good to be safe scale = _volumes[io] / _volumes[ir] if _volumes[ir] else _volumes[io] g[ir, ir] += rate_r * scale g[ir, io] -= rate_r * scale def _import_concentration(self, init): """imports concentration from NEURON; else 0s it if not in NEURON""" states = node._get_states() if self.nrn_region is not None and self.species.name is not None: for i, ptr in zip(range(self._offset, self._offset + self.nseg), self._concentration_ptrs): states[i] = ptr[0] elif init: # TODO: think about if this is the desired behavior for i in range(self.nseg): states[i + self._offset] = 0 def _assign_parents(self, root_id, missing, root_children): # assign parents and root nodes parent_sec = morphology.parent(self._sec) if parent_sec is None or not self._species()._has_region_section(self._region, parent_sec): if parent_sec is None: pt = (self._region, None) else: pt = (self._region, parent_sec) if parent_sec is None or pt not in missing: missing[pt] = root_id root_id += 1 root_children.append([]) local_root = missing[pt] # TODO: which way do I want to do the first entry here? #self._parent = (self, local_root) self._parent = (self.species, local_root) root_children[local_root].append(self) else: # TODO: this is inefficient since checking the list twice for _region, parent_sec combo # but doesn't matter much since only done at setup parent_section = self.species._region_section(self._region, parent_sec) self._parent = (parent_section, int(parent_sec.nseg * morphology.parent_loc(self._sec, parent_sec))) #print 'parent:', self._parent return root_id neuron-7.5/share/lib/python/neuron/rxd/species.py000066400000000000000000000743241323325274500222140ustar00rootroot00000000000000from .rxdmath import _Arithmeticed import weakref from .section1d import Section1D from neuron import h, nrn from . import node, nodelist, rxdmath, region import numpy import warnings import itertools from .rxdException import RxDException from . import initializer import collections # The difference here is that defined species only exists after rxd initialization _all_species = [] _defined_species = {} def _get_all_species(): return _defined_species _species_count = 0 _has_1d = False _has_3d = False def _1d_submatrix_n(): if not _has_1d: return 0 elif not _has_3d: return len(node._states) else: return numpy.min([sp()._indices3d() for sp in list(_get_all_species().values()) if sp() is not None]) class _SpeciesMathable(object): # support arithmeticing def __neg__(self): return -1 * _Arithmeticed(self) def __Pos__(self): return _Arithmeticed(self) def __pow__(self, other): return _Arithmeticed(self) ** other def __add__(self, other): return _Arithmeticed(self) + other def __sub__(self, other): return _Arithmeticed(self) - other def __mul__(self, other): return _Arithmeticed(self) * other def __div__(self, other): return _Arithmeticed(self) / other def __radd__(self, other): return _Arithmeticed(other) + self def __rmul__(self, other): return _Arithmeticed(self) * other def __rdiv__(self, other): return _Arithmeticed(other) / self def __rsub__(self, other): return _Arithmeticed(other) - self def __abs__(self): return abs(_Arithmeticed(self)) def _evaluate(self, location): return _Arithmeticed(self)._evaluate(location) def __ne__(self, other): other = rxdmath._ensure_arithmeticed(other) self2 = rxdmath._ensure_arithmeticed(self) rxdmath._validate_reaction_terms(self2, other) return rxdmath._Reaction(self2, other, '<>') def __gt__(self, other): other = rxdmath._ensure_arithmeticed(other) self2 = rxdmath._ensure_arithmeticed(self) rxdmath._validate_reaction_terms(self2, other) return rxdmath._Reaction(self2, other, '>') def __lt__(self, other): other = rxdmath._ensure_arithmeticed(other) self2 = rxdmath._ensure_arithmeticed(self) rxdmath._validate_reaction_terms(self2, other) return rxdmath._Reaction(self2, other, '<') @property def _semi_compile(self): return 'species%d' % (self._id) def _involved_species(self, the_dict): the_dict[self._semi_compile] = weakref.ref(self) @property def d(self): """diffusion constant. write-only""" raise RxDException('diffusion constant is write-only') @d.setter def d(self, value): from . import rxd if hasattr(self, '_allow_setting'): self._d = value else: _volumes, _surface_area, _diffs = node._get_data() _diffs[self.indices()] = value rxd._setup_matrices() class SpeciesOnRegion(_SpeciesMathable): def __init__(self, species, region): """The restriction of a Species to a Region.""" global _species_count self._species = weakref.ref(species) self._region = weakref.ref(region) self._id = _species_count _species_count += 1 def __eq__(self, other): """test for equality. Two SpeciesOnRegion objects are equal if they refer to the same species on the same region and both the species and the region still exist. """ return (self._species() == other._species()) and (self._region() == other._region()) and (self._species() is not None) and (self._region() is not None) def __hash__(self): # TODO: replace this to reduce collision risk; how much of a problme is that? return 1000 * (hash(self._species()) % 1000) + (hash(self._region()) % 1000) def __repr__(self): return '%r[%r]' % (self._species(), self._region()) def _short_repr(self): return '%r[%r]' % (self._species()._short_repr(), self._region()._short_repr()) def indices(self, r=None): """If no Region is specified or if r is the Region specified in the constructor, returns a list of the indices of state variables corresponding to the Species when restricted to the Region defined in the constructor. If r is a different Region, then returns the empty list. """ #if r is not None and r != self._region(): # raise RxDException('attempt to access indices on the wrong region') # TODO: add a mechanism to catch if not right region (but beware of reactions crossing regions) if self._species() is None or self._region() is None: return [] return self._species().indices(self._region()) def __getitem__(self, r): """Return a reference to those members of this species lying on the specific region @varregion. The resulting object is a SpeciesOnRegion. This is useful for defining reaction schemes for MultiCompartmentReaction. This is provided to allow use of SpeciesOnRegion where Species would normally go. If the regions match, self is returned; otherwise an empty SpeciesOnRegion. """ if r == self._region(): return self else: return SpeciesOnRegion(self._species, None) @property def states(self): """A vector of all the states corresponding to this species""" all_states = node._get_states() return [all_states[i] for i in numpy.sort(self.indices())] @property def nodes(self): """A NodeList of the Node objects containing concentration data for the given Species and Region. The code node_list = ca[cyt].nodes is more efficient than the otherwise equivalent node_list = ca.nodes(cyt) because the former only creates the Node objects belonging to the restriction ca[cyt] whereas the second option constructs all Node objects belonging to the Species ca and then culls the list to only include those also belonging to the Region cyt. """ initializer._do_init() return nodelist.NodeList(itertools.chain.from_iterable([s.nodes for s in self._species()._secs if s._region == self._region()])) @property def concentration(self): """An iterable of the current concentrations.""" return self.nodes.concentration @concentration.setter def concentration(self, value): """Sets all Node objects in the restriction to the specified concentration value. This is equivalent to s.nodes.concentration = value""" self.nodes.concentration = value # 3d matrix stuff def _setup_matrices_process_neighbors(pt1, pt2, indices, euler_matrix, index, diffs, vol, areal, arear, dx): # TODO: validate this before release! is ignoring reflective boundaries the right thing to do? # (make sure that any changes here also work with boundaries that aren't really reflective, but have a 1d section attached) d = diffs[index] if pt1 in indices: ileft = indices[pt1] dleft = (d + diffs[ileft]) * 0.5 left = dleft * areal / (vol * dx) euler_matrix[index, ileft] += left euler_matrix[index, index] -= left if pt2 in indices: iright = indices[pt2] dright = (d + diffs[iright]) * 0.5 right = dright * arear / (vol * dx) euler_matrix[index, iright] += right euler_matrix[index, index] -= right # TODO: make sure that we can make this work where things diffuse across the # boundary between two regions... for the tree solver, this is complicated # because need the sections in a sorted order # ... but this is also weird syntactically, because how should it know # that two regions (e.g. apical and other_dendrites) are connected? class Species(_SpeciesMathable): def __init__(self, regions=None, d=0, name=None, charge=0, initial=None, atolscale=1): """s = rxd.Species(regions, d = 0, name = None, charge = 0, initial = None, atolscale=1) Declare a species. Parameters: regions -- a Region or list of Region objects containing the species d -- the diffusion constant of the species (optional; default is 0, i.e. non-diffusing) name -- the name of the Species; used for syncing with HOC (optional; default is none) charge -- the charge of the Species (optional; default is 0) initial -- the initial concentration or None (if None, then imports from HOC if the species is defined at finitialize, else 0) atolscale -- scale factor for absolute tolerance in variable step integrations Note: charge must match the charges specified in NMODL files for the same ion, if any. You probably want to adjust atolscale for species present at low concentrations (e.g. calcium). """ import neuron import ctypes from . import rxd # if there is a species, then rxd is being used, so we should register # this function may be safely called many times rxd._do_nbs_register() # TODO: check if "name" already defined elsewhere (if non-None) # if so, make sure other fields consistent, expand regions as appropriate self._allow_setting = True self.regions = regions self.d = d self.name = name self.charge = charge self.initial = initial self._atolscale = atolscale _all_species.append(weakref.ref(self)) # declare an update to the structure of the model (the number of differential equations has changed) neuron.nrn_dll_sym('structure_change_cnt', ctypes.c_int).value += 1 # initialize self if the rest of rxd is already initialized if initializer.is_initialized(): if _has_3d: if isinstance(regions, region.Region) and not regions._secs1d: pass elif hasattr(regions, '__len__') and all(not r._secs1d for r in regions): pass else: # TODO: remove this limitation # one strategy would be to just redo the whole thing; what are the implications of that? # (pointers would be invalid; anything else?) raise RxDException('Currently cannot add species containing 1D after 3D species defined and initialized. To work-around: reorder species definition.') self._do_init() def _do_init(self): self._do_init1() self._do_init2() self._do_init3() self._do_init4() self._do_init5() def _do_init1(self): from . import rxd # TODO: if a list of sections is passed in, make that one region # _species_count is used to create a unique _real_name for the species global _species_count regions = self._regions self._real_name = self._name initial = self.initial charge = self._charge # invalidate any old initialization of external solvers rxd._external_solver_initialized = False # TODO: check about the 0)' % self._name else: return self.__repr__() def __str__(self): if self._name is None: return self.__repr__() return str(self._name) neuron-7.5/share/lib/python/neuron/sections.py000066400000000000000000000047031323325274500216050ustar00rootroot00000000000000""" Extensions of the nrn.Section class. $Id:$ """ import neuron from neuron import nrn import sys import io class ExtendedSection(nrn.Section): def __init__(self, name=None): nrn.Section.__init__(self) self.hoc_name = nrn.Section.name(self) if name: self._name = name else: self._name = self.hoc_name self.mechanisms = set() def __getattr__(self, name): if name in self.mechanisms: return AllSegments(self, name) else: return self.__getattribute__(name) def insert(self, mech_name): self.mechanisms.add(mech_name) return nrn.Section.insert(self, mech_name) def _get_name(self): return self._name def _set_name(self, name): assert isinstance(name, str) self._name = name name = property(fget=_get_name, fset=_set_name) def psection(self): if self.name != self.hoc_name: sys.stdout.write("%s: " % self.name) neuron.psection(self) class AllSegments(object): """Allows setting membrane properties for all segments in a section at once, without having to explicitly iterate over all segments. Example usage: >>> soma = neuron.sections.ExtendedSection() >>> soma.nseg = 3 >>> soma.insert('pas') >>> type(soma.pas) >>> soma.pas.e = -72 >>> soma.pas.e [-72.0, -72.0, -72.0] >>> soma(0.5).pas.e -72.0 """ def __init__(self, sec, mech_name): self.sec = sec self.mech_name = mech_name def __setattr__(self, name, value): success = False for seg in self.sec: if hasattr(seg, self.mech_name): mech = getattr(seg, self.mech_name) if hasattr(mech, name): mech.name = value success = True if not success: try: object.__setattr__(self, name, value) except AttributeError: raise AttributeError('%s mechanism has no attribute %s' % (self.mech_name, name)) def __getattr__(self, name): try: return self.__getattribute__(name) except AttributeError: return [getattr(getattr(seg, self.mech_name), name) for seg in self.sec if hasattr(seg, self.mech_name)] neuron-7.5/share/lib/python/neuron/tests/000077500000000000000000000000001323325274500205425ustar00rootroot00000000000000neuron-7.5/share/lib/python/neuron/tests/__init__.py000066400000000000000000000000731323325274500226530ustar00rootroot00000000000000from neuron.tests import test_all suite = test_all.suite neuron-7.5/share/lib/python/neuron/tests/_subclass.py000066400000000000000000000006401323325274500230720ustar00rootroot00000000000000from neuron import * h(''' begintemplate A public x, s, o, xa, oa, f, p strdef s objref o, oa[2] double xa[3] proc init() { \ x = $1 \ } func f() { return $1*xa[$2] } proc p() { x += 1 } endtemplate A ''') class A1(hclass(h.A)) : def __init__(self, arg) : # note, arg used by h.A #self.bp = hoc.HocObject.baseattr(self, 'p') self.bp = self.baseattr('p') def p(self) : self.bp() return self.x neuron-7.5/share/lib/python/neuron/tests/test_all.py000066400000000000000000000010101323325274500227130ustar00rootroot00000000000000""" Collection of all unittests for the neuron module $Id$ """ # import your specific test here # and add it to the "suite" function below from neuron.tests import test_vector, test_neuron import unittest def suite(): suite = unittest.TestSuite() suite.addTest(test_vector.suite()) suite.addTest(test_neuron.suite()) # add additional test cases here return suite if __name__ == "__main__": # unittest.main() runner = unittest.TextTestRunner(verbosity=2) runner.run(suite()) neuron-7.5/share/lib/python/neuron/tests/test_neuron.py000066400000000000000000000045271323325274500234710ustar00rootroot00000000000000""" UnitTests of the python interface to the neuron class. Items declared in neuron/__init__.py $Id$ """ import unittest import neuron from neuron import h class NeuronTestCase(unittest.TestCase): """Tests of neuron""" def testHClass(self): """Test subclass of hoc class.""" from ._subclass import A1 a = A1(5) assert a.x == 5.0 assert a.p() == 6.0 b = A1(4) a.s = 'one' b.s = 'two' assert a.s == 'one' assert b.s == 'two' assert h.A[0].s == 'one' assert a.p() == 7.0 assert b.p() == 5.0 a.a = 2 b.a = 3 assert a.a == 2 assert b.a == 3 assert h.List('A').count() == 2 a = 1 b = 1 assert h.List('A').count() == 0 def testpsection(self): """Test neuron.psection(Section)""" s = h.Section(name='soma') neuron.psection(s) def testABI(self): """Test use of some Py_LIMITED_API for python3.""" # Py_nb_bool assert True if h else False assert False if h.List else True l = h.List() assert True if h.List else False assert False if l else True v = h.Vector(1) l.append(v) assert True if l else False # Py_sq_length assert len(l) == 1 # Py_sq_item assert l[0] == v # Py_sq_ass_item v.x[0] = 5 assert v.x[0] == 5 def testExtendedSection(self): """test prsection (modified print statement)""" from neuron.sections import ExtendedSection s = ExtendedSection(name="test") s.psection() def testRxDexistence(self): """test import rxd and geometry3d if scipy""" a = 1 try: import scipy except: print ("scipy not available") else: try: from neuron import rxd from neuron.rxd import geometry print("has_geometry3d is " + str(geometry.has_geometry3d)) except: print("'from neuron import rxd' failed") a = 0 assert a == 1 def suite(): suite = unittest.makeSuite(NeuronTestCase,'test') return suite if __name__ == "__main__": # unittest.main() runner = unittest.TextTestRunner(verbosity=2) runner.run(suite()) neuron-7.5/share/lib/python/neuron/tests/test_vector.py000066400000000000000000000052611323325274500234610ustar00rootroot00000000000000""" UnitTests of the python interface to the hoc.Vector class. $Id$ """ import unittest from neuron import h class Bench(object): def __init__(self,g,l): self.g = g self.l = l def __call__(self,cmd,repeat=5): from time import time t = 0 for i in range(repeat): t1 = time() exec(cmd, self.g, self.l) t2 = time() t += t2-t1 print ('Executed "%s". Elapsed = %f s' % (cmd,t/repeat)) class VectorTestCase(unittest.TestCase): """Tests of the hoc.Vector""" def testEndian(self): """Test that Vector.__array_interface__ returns the proper byteorder (endian)""" endian_map = {'little':'<','big':'>'} import sys sys_endian = endian_map[sys.byteorder] v = h.Vector(10) assert sys_endian == v.__array_interface__['typestr'][0] def testBytesize(self): """Test that Vector.__array_interface__ returns the proper bytesize (of a double)""" try: import numpy v = h.Vector(10) a = numpy.array([],dtype=float) assert a.__array_interface__['typestr'] == v.__array_interface__['typestr'] except: pass def testPerformance(self): """Test performance of Vector<->list,array""" try: import numpy bench = Bench(globals(),locals()) print ("\n") bench('l = range(1000000)') bench('v = h.Vector(l)') print ("inplace:") bench('v.from_python(l)') bench('a = numpy.array(v)') print ("inplace:") bench('v.to_python(a)') bench('v2 = h.Vector(a)') print ("inplace:") bench('v2.from_python(a)') bench('l2 = list(v2)') print ("inplace:") bench('v.to_python(l2)') bench('v2 = h.Vector(a[::-1])') bench('a2 = numpy.array(v2)') except: pass def testNumpyInteraction(self): """Testing numpy.array <=> hoc.Vector interaction""" try: import numpy from numpy import alltrue, array a = numpy.random.normal(size=10000) #b = numpy.random.normal(size=10000) v = h.Vector(a) a1 = array(v) assert alltrue(a==a1), 'numpy array "a" not equal to array(Vector(a))' v = h.Vector(a[::-1]) assert alltrue(array(v)[::-1] == a), 'Vector(a) malfuctions when a is a sliced array' # inplace operations # todo except: pass def suite(): suite = unittest.makeSuite(VectorTestCase,'test') return suite if __name__ == "__main__": # unittest.main() runner = unittest.TextTestRunner(verbosity=2) runner.run(suite()) neuron-7.5/share/lib/shape.cm1000077500000000000000000000003671323325274500162640ustar00rootroot0000000000000095 0 95 111 0 111 127 0 143 143 0 127 159 0 111 175 0 95 191 0 79 207 0 63 207 31 47 223 47 47 239 63 31 255 79 15 255 95 7 255 111 0 255 127 0 255 143 0 255 159 0 255 175 0 255 191 0 255 207 0 255 223 0 255 239 0 255 247 0 255 255 0 255 255 255 neuron-7.5/share/lib/shape.cm2000077500000000000000000000002021323325274500162510ustar00rootroot00000000000000111 0 111 143 0 127 175 0 95 207 0 63 223 47 47 255 79 15 255 111 0 255 143 0 255 175 0 255 207 0 255 239 0 255 255 0 255 255 200 neuron-7.5/src/000077500000000000000000000000001323325274500134705ustar00rootroot00000000000000neuron-7.5/src/Makefile.am000077500000000000000000000046351323325274500155370ustar00rootroot00000000000000## Subdirectories must be specified in the order they have to be compiled. ## A library is produced from _each_ subdirectory. This is because automake ## (version 1.4) doesn't yet work well with source files in multiple ## directories. ## ## The order of compilation is important in some cases. Directories are ## searched in the order they are specified. READLINE_SUBDIRS = readline MEMACS_SUBDIRS = memacs if BUILD_MINGW NMODL_SUBDIRS = modlunit nmodl else NMODL_SUBDIRS = modlunit nmodl endif NRNOC_SUBDIRS = sparse sparse13 scopmath Random123 nrnmpi oc nrnoc NRNIV_SUBDIRS = sundials mesch gnu ivoc nrncvode parallel nrniv IVOS_SUBDIRS = ivos NRNJAVA_SUBDIRS = nrnjava NRNPYTHON_SUBDIRS = nrnpython if NMODL_BUILD nmodlbuild = $(NMODL_SUBDIRS) else nmodlbuild = endif if BUILD_MEMACS memacsbuild = $(MEMACS_SUBDIRS) else memacsbuild = endif if BUILD_READLINE readlinebuild = $(READLINE_SUBDIRS) else readlinebuild = endif if BUILD_NRNIV nrnivbuild = $(NRNIV_SUBDIRS) else nrnivbuild = endif if BUILD_IVOS ivosbuild = $(IVOS_SUBDIRS) else ivosbuild = endif if BUILD_NRNJAVA nrnjavabuild = $(NRNJAVA_SUBDIRS) else nrnjavabuild = endif if BUILD_NRNPYTHON nrnpythonbuild = $(NRNPYTHON_SUBDIRS) endif if BUILD_NEURONMUSIC neuronmusicbuild = neuronmusic else neuronmusicbuild = endif if BUILD_CYGWIN mos2nrnbuild = else if BUILD_MINGW mos2nrnbuild = else mos2nrnbuild = uxnrnbbs endif endif if BUILD_6229 build_6229 = ni_pci_6229 else build_6229 = endif if NMODL_ONLY SUBDIRS = $(nmodlbuild) else if NRNPYTHON_ONLY SUBDIRS = $(nrnpythonbuild) mswin else SUBDIRS = $(readlinebuild) $(memacsbuild) $(nmodlbuild) $(NRNOC_SUBDIRS) \ $(nrnjavabuild) $(ivosbuild) $(nrnpythonbuild) \ $(build_6229) $(nrnivbuild) $(mos2nrnbuild) $(neuronmusicbuild) \ mac mswin endif endif DIST_SUBDIRS = $(MEMACS_SUBDIRS) $(READLINE_SUBDIRS) $(NMODL_SUBDIRS) $(NRNOC_SUBDIRS) \ $(NRNJAVA_SUBDIRS) $(NRNIV_SUBDIRS) $(IVOS_SUBDIRS) \ $(NRNPYTHON_SUBDIRS) mswin uxnrnbbs mac ni_pci_6229 neuronmusic dist-hook: $(npydir) for subdir in $(npydir) ; do \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ done if NRNPYTHON_ONLY else install-exec-hook: echo "enter install-exec-hook in nrn/src/Makefile.am" if BUILD_NRNMPI_DYNAMIC cd nrnmpi ; \ NEED_RTLD_GLOBAL='-L$(libdir) -loc -lnrniv' ; \ export NEED_RTLD_GLOBAL ; \ $(RM) *.la ; \ $(MAKE) -e install endif echo "leave install-exec-hook in nrn/src/Makefile.am" endif neuron-7.5/src/Makefile.in000066400000000000000000000612071323325274500155430ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ READLINE_SUBDIRS = readline MEMACS_SUBDIRS = memacs @BUILD_MINGW_FALSE@NMODL_SUBDIRS = modlunit nmodl @BUILD_MINGW_TRUE@NMODL_SUBDIRS = modlunit nmodl NRNOC_SUBDIRS = sparse sparse13 scopmath Random123 nrnmpi oc nrnoc NRNIV_SUBDIRS = sundials mesch gnu ivoc nrncvode parallel nrniv IVOS_SUBDIRS = ivos NRNJAVA_SUBDIRS = nrnjava NRNPYTHON_SUBDIRS = nrnpython @NMODL_BUILD_FALSE@nmodlbuild = @NMODL_BUILD_TRUE@nmodlbuild = $(NMODL_SUBDIRS) @BUILD_MEMACS_FALSE@memacsbuild = @BUILD_MEMACS_TRUE@memacsbuild = $(MEMACS_SUBDIRS) @BUILD_READLINE_FALSE@readlinebuild = @BUILD_READLINE_TRUE@readlinebuild = $(READLINE_SUBDIRS) @BUILD_NRNIV_FALSE@nrnivbuild = @BUILD_NRNIV_TRUE@nrnivbuild = $(NRNIV_SUBDIRS) @BUILD_IVOS_FALSE@ivosbuild = @BUILD_IVOS_TRUE@ivosbuild = $(IVOS_SUBDIRS) @BUILD_NRNJAVA_FALSE@nrnjavabuild = @BUILD_NRNJAVA_TRUE@nrnjavabuild = $(NRNJAVA_SUBDIRS) @BUILD_NRNPYTHON_TRUE@nrnpythonbuild = $(NRNPYTHON_SUBDIRS) @BUILD_NEURONMUSIC_FALSE@neuronmusicbuild = @BUILD_NEURONMUSIC_TRUE@neuronmusicbuild = neuronmusic @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@mos2nrnbuild = uxnrnbbs @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@mos2nrnbuild = @BUILD_CYGWIN_TRUE@mos2nrnbuild = @BUILD_6229_FALSE@build_6229 = @BUILD_6229_TRUE@build_6229 = ni_pci_6229 @NMODL_ONLY_FALSE@@NRNPYTHON_ONLY_FALSE@SUBDIRS = $(readlinebuild) $(memacsbuild) $(nmodlbuild) $(NRNOC_SUBDIRS) \ @NMODL_ONLY_FALSE@@NRNPYTHON_ONLY_FALSE@ $(nrnjavabuild) $(ivosbuild) $(nrnpythonbuild) \ @NMODL_ONLY_FALSE@@NRNPYTHON_ONLY_FALSE@ $(build_6229) $(nrnivbuild) $(mos2nrnbuild) $(neuronmusicbuild) \ @NMODL_ONLY_FALSE@@NRNPYTHON_ONLY_FALSE@ mac mswin @NMODL_ONLY_FALSE@@NRNPYTHON_ONLY_TRUE@SUBDIRS = $(nrnpythonbuild) mswin @NMODL_ONLY_TRUE@SUBDIRS = $(nmodlbuild) DIST_SUBDIRS = $(MEMACS_SUBDIRS) $(READLINE_SUBDIRS) $(NMODL_SUBDIRS) $(NRNOC_SUBDIRS) \ $(NRNJAVA_SUBDIRS) $(NRNIV_SUBDIRS) $(IVOS_SUBDIRS) \ $(NRNPYTHON_SUBDIRS) mswin uxnrnbbs mac ni_pci_6229 neuronmusic all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @NRNPYTHON_ONLY_TRUE@install-exec-hook: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-exec-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile dist-hook: $(npydir) for subdir in $(npydir) ; do \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ done @NRNPYTHON_ONLY_FALSE@install-exec-hook: @NRNPYTHON_ONLY_FALSE@ echo "enter install-exec-hook in nrn/src/Makefile.am" @BUILD_NRNMPI_DYNAMIC_TRUE@@NRNPYTHON_ONLY_FALSE@ cd nrnmpi ; \ @BUILD_NRNMPI_DYNAMIC_TRUE@@NRNPYTHON_ONLY_FALSE@ NEED_RTLD_GLOBAL='-L$(libdir) -loc -lnrniv' ; \ @BUILD_NRNMPI_DYNAMIC_TRUE@@NRNPYTHON_ONLY_FALSE@ export NEED_RTLD_GLOBAL ; \ @BUILD_NRNMPI_DYNAMIC_TRUE@@NRNPYTHON_ONLY_FALSE@ $(RM) *.la ; \ @BUILD_NRNMPI_DYNAMIC_TRUE@@NRNPYTHON_ONLY_FALSE@ $(MAKE) -e install @NRNPYTHON_ONLY_FALSE@ echo "leave install-exec-hook in nrn/src/Makefile.am" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/Random123/000077500000000000000000000000001323325274500151365ustar00rootroot00000000000000neuron-7.5/src/Random123/Makefile.am000066400000000000000000000007551323325274500172010ustar00rootroot00000000000000# Just copy the .h files into the distribution tar file EXTRA_DIST = aes.h array.h ars.h philox.h threefry.h \ features/compilerfeatures.h features/gccfeatures.h \ features/iccfeatures.h features/llvmfeatures.h features/msvcfeatures.h \ features/nvccfeatures.h features/open64features.h \ features/openclfeatures.h features/sse.h features/sunprofeatures.h \ features/xlcfeatures.h features/pgccfeatures.h \ features/clangfeatures.h features/crayfeatures.h \ features/fujitsufeatures.h neuron-7.5/src/Random123/Makefile.in000066400000000000000000000401431323325274500172050ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/Random123 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ # Just copy the .h files into the distribution tar file EXTRA_DIST = aes.h array.h ars.h philox.h threefry.h \ features/compilerfeatures.h features/gccfeatures.h \ features/iccfeatures.h features/llvmfeatures.h features/msvcfeatures.h \ features/nvccfeatures.h features/open64features.h \ features/openclfeatures.h features/sse.h features/sunprofeatures.h \ features/xlcfeatures.h features/pgccfeatures.h \ features/clangfeatures.h features/crayfeatures.h \ features/fujitsufeatures.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Random123/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Random123/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/Random123/aes.h000066400000000000000000000273221323325274500160650ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __Random123_aes_dot_hpp__ #define __Random123_aes_dot_hpp__ #include "features/compilerfeatures.h" #include "array.h" /* Implement a bona fide AES block cipher. It's minimally // checked against the test vector in FIPS-197 in ut_aes.cpp. */ #if R123_USE_AES_NI /** @ingroup AESNI */ typedef struct r123array1xm128i aesni1xm128i_ctr_t; /** @ingroup AESNI */ typedef struct r123array1xm128i aesni1xm128i_ukey_t; /** @ingroup AESNI */ typedef struct r123array4x32 aesni4x32_ukey_t; /** @ingroup AESNI */ enum r123_enum_aesni1xm128i { aesni1xm128i_rounds = 10 }; /** \cond HIDDEN_FROM_DOXYGEN */ R123_STATIC_INLINE __m128i AES_128_ASSIST (__m128i temp1, __m128i temp2) { __m128i temp3; temp2 = _mm_shuffle_epi32 (temp2 ,0xff); temp3 = _mm_slli_si128 (temp1, 0x4); temp1 = _mm_xor_si128 (temp1, temp3); temp3 = _mm_slli_si128 (temp3, 0x4); temp1 = _mm_xor_si128 (temp1, temp3); temp3 = _mm_slli_si128 (temp3, 0x4); temp1 = _mm_xor_si128 (temp1, temp3); temp1 = _mm_xor_si128 (temp1, temp2); return temp1; } R123_STATIC_INLINE void aesni1xm128iexpand(aesni1xm128i_ukey_t uk, __m128i ret[11]) { __m128i rkey = uk.v[0].m; __m128i tmp2; ret[0] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x1); rkey = AES_128_ASSIST(rkey, tmp2); ret[1] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x2); rkey = AES_128_ASSIST(rkey, tmp2); ret[2] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x4); rkey = AES_128_ASSIST(rkey, tmp2); ret[3] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x8); rkey = AES_128_ASSIST(rkey, tmp2); ret[4] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x10); rkey = AES_128_ASSIST(rkey, tmp2); ret[5] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x20); rkey = AES_128_ASSIST(rkey, tmp2); ret[6] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x40); rkey = AES_128_ASSIST(rkey, tmp2); ret[7] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x80); rkey = AES_128_ASSIST(rkey, tmp2); ret[8] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x1b); rkey = AES_128_ASSIST(rkey, tmp2); ret[9] = rkey; tmp2 = _mm_aeskeygenassist_si128(rkey, 0x36); rkey = AES_128_ASSIST(rkey, tmp2); ret[10] = rkey; } /** \endcond */ #ifdef __cplusplus /** @ingroup AESNI */ struct aesni1xm128i_key_t{ __m128i k[11]; aesni1xm128i_key_t(){ aesni1xm128i_ukey_t uk; uk.v[0].m = _mm_setzero_si128(); aesni1xm128iexpand(uk, k); } aesni1xm128i_key_t(const aesni1xm128i_ukey_t& uk){ aesni1xm128iexpand(uk, k); } aesni1xm128i_key_t(const aesni4x32_ukey_t& uk){ aesni1xm128i_ukey_t uk128; uk128.v[0].m = _mm_set_epi32(uk.v[3], uk.v[2], uk.v[1], uk.v[0]); aesni1xm128iexpand(uk128, k); } aesni1xm128i_key_t& operator=(const aesni1xm128i_ukey_t& uk){ aesni1xm128iexpand(uk, k); return *this; } aesni1xm128i_key_t& operator=(const aesni4x32_ukey_t& uk){ aesni1xm128i_ukey_t uk128; uk128.v[0].m = _mm_set_epi32(uk.v[3], uk.v[2], uk.v[1], uk.v[0]); aesni1xm128iexpand(uk128, k); return *this; } }; #else typedef struct { __m128i k[11]; }aesni1xm128i_key_t; /** @ingroup AESNI */ R123_STATIC_INLINE aesni1xm128i_key_t aesni1xm128ikeyinit(aesni1xm128i_ukey_t uk){ aesni1xm128i_key_t ret; aesni1xm128iexpand(uk, ret.k); return ret; } #endif /** @ingroup AESNI */ R123_STATIC_INLINE aesni1xm128i_ctr_t aesni1xm128i(aesni1xm128i_ctr_t in, aesni1xm128i_key_t k) { __m128i x = _mm_xor_si128(k.k[0], in.v[0].m); x = _mm_aesenc_si128(x, k.k[1]); x = _mm_aesenc_si128(x, k.k[2]); x = _mm_aesenc_si128(x, k.k[3]); x = _mm_aesenc_si128(x, k.k[4]); x = _mm_aesenc_si128(x, k.k[5]); x = _mm_aesenc_si128(x, k.k[6]); x = _mm_aesenc_si128(x, k.k[7]); x = _mm_aesenc_si128(x, k.k[8]); x = _mm_aesenc_si128(x, k.k[9]); x = _mm_aesenclast_si128(x, k.k[10]); { aesni1xm128i_ctr_t ret; ret.v[0].m = x; return ret; } } /** @ingroup AESNI */ R123_STATIC_INLINE aesni1xm128i_ctr_t aesni1xm128i_R(unsigned R, aesni1xm128i_ctr_t in, aesni1xm128i_key_t k){ R123_ASSERT(R==10); return aesni1xm128i(in, k); } /** @ingroup AESNI */ typedef struct r123array4x32 aesni4x32_ctr_t; /** @ingroup AESNI */ typedef aesni1xm128i_key_t aesni4x32_key_t; /** @ingroup AESNI */ enum r123_enum_aesni4x32 { aesni4x32_rounds = 10 }; /** @ingroup AESNI */ R123_STATIC_INLINE aesni4x32_key_t aesni4x32keyinit(aesni4x32_ukey_t uk){ aesni1xm128i_ukey_t uk128; aesni4x32_key_t ret; uk128.v[0].m = _mm_set_epi32(uk.v[3], uk.v[2], uk.v[1], uk.v[0]); aesni1xm128iexpand(uk128, ret.k); return ret; } /** @ingroup AESNI */ /** The aesni4x32_R function provides a C API to the @ref AESNI "AESNI" CBRNG, allowing the number of rounds to be specified explicitly **/ R123_STATIC_INLINE aesni4x32_ctr_t aesni4x32_R(unsigned int Nrounds, aesni4x32_ctr_t c, aesni4x32_key_t k){ aesni1xm128i_ctr_t c128; c128.v[0].m = _mm_set_epi32(c.v[3], c.v[2], c.v[1], c.v[0]); c128 = aesni1xm128i_R(Nrounds, c128, k); _mm_storeu_si128((__m128i*)&c.v[0], c128.v[0].m); return c; } #define aesni4x32_rounds aesni1xm128i_rounds /** The aesni4x32 macro provides a C API to the @ref AESNI "AESNI" CBRNG, uses the default number of rounds i.e. \c aesni4x32_rounds **/ /** @ingroup AESNI */ #define aesni4x32(c,k) aesni4x32_R(aesni4x32_rounds, c, k) #ifdef __cplusplus namespace r123{ /** @defgroup AESNI ARS and AESNI Classes and Typedefs The ARS4x32, ARS1xm128i, AESNI4x32 and AESNI1xm128i classes export the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. ARS1xm128i and AESNI1xm128i are based on the AES block cipher and rely on the AES-NI hardware instructions available on some some new (2011) CPUs. The ARS1xm128i CBRNG and the use of AES for random number generation are described in Parallel Random Numbers: As Easy as 1, 2, 3 . Although it uses some cryptographic primitives, ARS1xm128i uses a cryptographically weak key schedule and is \b not suitable for cryptographic use. @class AESNI1xm128i @ingroup AESNI AESNI exports the member functions, typedefs and operator overloads required by a @ref CBRNG class. AESNI1xm128i uses the crypotgraphic AES round function, including the cryptographic key schedule. In contrast to the other CBRNGs in the Random123 library, the AESNI1xm128i_R::key_type is opaque and is \b not identical to the AESNI1xm128i_R::ukey_type. Creating a key_type, using either the constructor or assignment operator, is significantly more time-consuming than running the bijection (hundreds of clock cycles vs. tens of clock cycles). AESNI1xm128i is only available when the feature-test macro R123_USE_AES_NI is true, which should occur only when the compiler is configured to generate AES-NI instructions (or when defaults are overridden by compile-time, compiler-command-line options). As of September 2011, the authors know of no statistical flaws with AESNI1xm128i. It would be an event of major cryptographic note if any such flaws were ever found. */ struct AESNI1xm128i{ typedef aesni1xm128i_ctr_t ctr_type; typedef aesni1xm128i_ukey_t ukey_type; typedef aesni1xm128i_key_t key_type; static const unsigned int rounds=10; ctr_type operator()(ctr_type ctr, key_type key) const{ return aesni1xm128i(ctr, key); } }; /* @class AESNI4x32 */ struct AESNI4x32{ typedef aesni4x32_ctr_t ctr_type; typedef aesni4x32_ukey_t ukey_type; typedef aesni4x32_key_t key_type; static const unsigned int rounds=10; ctr_type operator()(ctr_type ctr, key_type key) const{ return aesni4x32(ctr, key); } }; /** @ingroup AESNI @class AESNI1xm128i_R AESNI1xm128i_R is provided for completeness, but is only instantiable with ROUNDS=10, in which case it is identical to AESNI1xm128i */ template struct AESNI1xm128i_R : public AESNI1xm128i{ R123_STATIC_ASSERT(ROUNDS==10, "AESNI1xm128i_R is only valid with R=10"); }; /** @class AESNI4x32_R **/ template struct AESNI4x32_R : public AESNI4x32{ R123_STATIC_ASSERT(ROUNDS==10, "AESNI4x32_R is only valid with R=10"); }; } // namespace r123 #endif /* __cplusplus */ #endif /* R123_USE_AES_NI */ #if R123_USE_AES_OPENSSL #include typedef struct r123array16x8 aesopenssl16x8_ctr_t; typedef struct r123array16x8 aesopenssl16x8_ukey_t; #ifdef __cplusplus struct aesopenssl16x8_key_t{ AES_KEY k; aesopenssl16x8_key_t(){ aesopenssl16x8_ukey_t ukey={{}}; AES_set_encrypt_key((const unsigned char *)&ukey.v[0], 128, &k); } aesopenssl16x8_key_t(const aesopenssl16x8_ukey_t& ukey){ AES_set_encrypt_key((const unsigned char *)&ukey.v[0], 128, &k); } aesopenssl16x8_key_t& operator=(const aesopenssl16x8_ukey_t& ukey){ AES_set_encrypt_key((const unsigned char *)&ukey.v[0], 128, &k); return *this; } }; #else typedef struct aesopenssl16x8_key_t{ AES_KEY k; }aesopenssl16x8_key_t; R123_STATIC_INLINE struct aesopenssl16x8_key_t aesopenssl16x8keyinit(aesopenssl16x8_ukey_t uk){ aesopenssl16x8_key_t ret; AES_set_encrypt_key((const unsigned char *)&uk.v[0], 128, &ret.k); return ret; } #endif R123_STATIC_INLINE R123_FORCE_INLINE(aesopenssl16x8_ctr_t aesopenssl16x8_R(aesopenssl16x8_ctr_t ctr, aesopenssl16x8_key_t key)); R123_STATIC_INLINE aesopenssl16x8_ctr_t aesopenssl16x8_R(aesopenssl16x8_ctr_t ctr, aesopenssl16x8_key_t key){ aesopenssl16x8_ctr_t ret; AES_encrypt((const unsigned char*)&ctr.v[0], (unsigned char *)&ret.v[0], &key.k); return ret; } #define aesopenssl16x8_rounds aesni4x32_rounds #define aesopenssl16x8(c,k) aesopenssl16x8_R(aesopenssl16x8_rounds) #ifdef __cplusplus namespace r123{ struct AESOpenSSL16x8{ typedef aesopenssl16x8_ctr_t ctr_type; typedef aesopenssl16x8_key_t key_type; typedef aesopenssl16x8_ukey_t ukey_type; static const unsigned int rounds=10; ctr_type operator()(const ctr_type& in, const key_type& k){ ctr_type out; AES_encrypt((const unsigned char *)&in[0], (unsigned char *)&out[0], &k.k); return out; } }; } // namespace r123 #endif /* __cplusplus */ #endif /* R123_USE_AES_OPENSSL */ #endif neuron-7.5/src/Random123/array.h000066400000000000000000000413441323325274500164330ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _r123array_dot_h__ #define _r123array_dot_h__ #include "features/compilerfeatures.h" #include "features/sse.h" #ifndef __cplusplus #define CXXMETHODS(_N, W, T) #define CXXOVERLOADS(_N, W, T) #else #include #include #include #include #include #include /** @defgroup arrayNxW The r123arrayNxW classes Each of the r123arrayNxW is a fixed size array of N W-bit unsigned integers. It is functionally equivalent to the C++0x std::array, but does not require C++0x features or libraries. In addition to meeting most of the requirements of a Container, it also has a member function, incr(), which increments the zero-th element and carrys overflows into higher indexed elements. Thus, by using incr(), sequences of up to 2^(N*W) distinct values can be produced. If SSE is supported by the compiler, then the class r123array1xm128i is also defined, in which the data member is an array of one r123128i object. @cond HIDDEN_FROM_DOXYGEN */ template inline R123_CUDA_DEVICE value_type assemble_from_u32(uint32_t *p32){ value_type v=0; for(size_t i=0; i<(3+sizeof(value_type))/4; ++i) v |= ((value_type)(*p32++)) << (32*i); return v; } // Work-alike methods and typedefs modeled on std::array: #define CXXMETHODS(_N, W, T) \ typedef T value_type; \ typedef T* iterator; \ typedef const T* const_iterator; \ typedef value_type& reference; \ typedef const value_type& const_reference; \ typedef size_t size_type; \ typedef ptrdiff_t difference_type; \ typedef T* pointer; \ typedef const T* const_pointer; \ typedef std::reverse_iterator reverse_iterator; \ typedef std::reverse_iterator const_reverse_iterator; \ /* Boost.array has static_size. C++11 specializes tuple_size */ \ enum {static_size = _N}; \ R123_CUDA_DEVICE reference operator[](size_type i){return v[i];} \ R123_CUDA_DEVICE const_reference operator[](size_type i) const {return v[i];} \ R123_CUDA_DEVICE reference at(size_type i){ if(i >= _N) R123_THROW(std::out_of_range("array index out of range")); return (*this)[i]; } \ R123_CUDA_DEVICE const_reference at(size_type i) const { if(i >= _N) R123_THROW(std::out_of_range("array index out of range")); return (*this)[i]; } \ R123_CUDA_DEVICE size_type size() const { return _N; } \ R123_CUDA_DEVICE size_type max_size() const { return _N; } \ R123_CUDA_DEVICE bool empty() const { return _N==0; }; \ R123_CUDA_DEVICE iterator begin() { return &v[0]; } \ R123_CUDA_DEVICE iterator end() { return &v[_N]; } \ R123_CUDA_DEVICE const_iterator begin() const { return &v[0]; } \ R123_CUDA_DEVICE const_iterator end() const { return &v[_N]; } \ R123_CUDA_DEVICE const_iterator cbegin() const { return &v[0]; } \ R123_CUDA_DEVICE const_iterator cend() const { return &v[_N]; } \ R123_CUDA_DEVICE reverse_iterator rbegin(){ return reverse_iterator(end()); } \ R123_CUDA_DEVICE const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } \ R123_CUDA_DEVICE reverse_iterator rend(){ return reverse_iterator(begin()); } \ R123_CUDA_DEVICE const_reverse_iterator rend() const{ return const_reverse_iterator(begin()); } \ R123_CUDA_DEVICE const_reverse_iterator crbegin() const{ return const_reverse_iterator(cend()); } \ R123_CUDA_DEVICE const_reverse_iterator crend() const{ return const_reverse_iterator(cbegin()); } \ R123_CUDA_DEVICE pointer data(){ return &v[0]; } \ R123_CUDA_DEVICE const_pointer data() const{ return &v[0]; } \ R123_CUDA_DEVICE reference front(){ return v[0]; } \ R123_CUDA_DEVICE const_reference front() const{ return v[0]; } \ R123_CUDA_DEVICE reference back(){ return v[_N-1]; } \ R123_CUDA_DEVICE const_reference back() const{ return v[_N-1]; } \ R123_CUDA_DEVICE bool operator==(const r123array##_N##x##W& rhs) const{ \ /* CUDA3 does not have std::equal */ \ for (size_t i = 0; i < _N; ++i) \ if (v[i] != rhs.v[i]) return false; \ return true; \ } \ R123_CUDA_DEVICE bool operator!=(const r123array##_N##x##W& rhs) const{ return !(*this == rhs); } \ /* CUDA3 does not have std::fill_n */ \ R123_CUDA_DEVICE void fill(const value_type& val){ for (size_t i = 0; i < _N; ++i) v[i] = val; } \ R123_CUDA_DEVICE void swap(r123array##_N##x##W& rhs){ \ /* CUDA3 does not have std::swap_ranges */ \ for (size_t i = 0; i < _N; ++i) { \ T tmp = v[i]; \ v[i] = rhs.v[i]; \ rhs.v[i] = tmp; \ } \ } \ R123_CUDA_DEVICE r123array##_N##x##W& incr(R123_ULONG_LONG n=1){ \ /* This test is tricky because we're trying to avoid spurious \ complaints about illegal shifts, yet still be compile-time \ evaulated. */ \ if(sizeof(T)>((sizeof(T)3?3:0] is to silence \ a spurious error from icpc \ */ \ ++v[_N>1?1:0]; \ if(_N==2 || R123_BUILTIN_EXPECT(!!v[_N>1?1:0], 1)) return *this; \ ++v[_N>2?2:0]; \ if(_N==3 || R123_BUILTIN_EXPECT(!!v[_N>2?2:0], 1)) return *this; \ ++v[_N>3?3:0]; \ for(size_t i=4; i<_N; ++i){ \ if( R123_BUILTIN_EXPECT(!!v[i-1], 1) ) return *this; \ ++v[i]; \ } \ return *this; \ } \ /* seed(SeedSeq) would be a constructor if having a constructor */ \ /* didn't cause headaches with defaults */ \ template \ R123_CUDA_DEVICE static r123array##_N##x##W seed(SeedSeq &ss){ \ r123array##_N##x##W ret; \ const size_t Ngen = _N*((3+sizeof(value_type))/4); \ uint32_t u32[Ngen]; \ uint32_t *p32 = &u32[0]; \ ss.generate(&u32[0], &u32[Ngen]); \ for(size_t i=0; i<_N; ++i){ \ ret.v[i] = assemble_from_u32(p32); \ p32 += (3+sizeof(value_type))/4; \ } \ return ret; \ } \ protected: \ R123_CUDA_DEVICE r123array##_N##x##W& incr_carefully(R123_ULONG_LONG n){ \ /* n may be greater than the maximum value of a single value_type */ \ value_type vtn; \ vtn = n; \ v[0] += n; \ const unsigned rshift = 8* ((sizeof(n)>sizeof(value_type))? sizeof(value_type) : 0); \ for(size_t i=1; i<_N; ++i){ \ if(rshift){ \ n >>= rshift; \ }else{ \ n=0; \ } \ if( v[i-1] < vtn ) \ ++n; \ if( n==0 ) break; \ vtn = n; \ v[i] += n; \ } \ return *this; \ } \ // There are several tricky considerations for the insertion and extraction // operators: // - we would like to be able to print r123array16x8 as a sequence of 16 integers, // not as 16 bytes. // - we would like to be able to print r123array1xm128i. // - we do not want an int conversion operator in r123m128i because it causes // lots of ambiguity problems with automatic promotions. // Solution: r123arrayinsertable and r123arrayextractable template struct r123arrayinsertable{ const T& v; r123arrayinsertable(const T& t_) : v(t_) {} friend std::ostream& operator<<(std::ostream& os, const r123arrayinsertable& t){ return os << t.v; } }; template<> struct r123arrayinsertable{ const uint8_t& v; r123arrayinsertable(const uint8_t& t_) : v(t_) {} friend std::ostream& operator<<(std::ostream& os, const r123arrayinsertable& t){ return os << (int)t.v; } }; template struct r123arrayextractable{ T& v; r123arrayextractable(T& t_) : v(t_) {} friend std::istream& operator>>(std::istream& is, r123arrayextractable& t){ return is >> t.v; } }; template<> struct r123arrayextractable{ uint8_t& v; r123arrayextractable(uint8_t& t_) : v(t_) {} friend std::istream& operator>>(std::istream& is, r123arrayextractable& t){ int i; is >> i; t.v = i; return is; } }; #define CXXOVERLOADS(_N, W, T) \ \ inline std::ostream& operator<<(std::ostream& os, const r123array##_N##x##W& a){ \ os << r123arrayinsertable(a.v[0]); \ for(size_t i=1; i<_N; ++i) \ os << " " << r123arrayinsertable(a.v[i]); \ return os; \ } \ \ inline std::istream& operator>>(std::istream& is, r123array##_N##x##W& a){ \ for(size_t i=0; i<_N; ++i){ \ r123arrayextractable x(a.v[i]); \ is >> x; \ } \ return is; \ } \ \ namespace r123{ \ typedef r123array##_N##x##W Array##_N##x##W; \ } #endif /* __cplusplus */ /* _r123array_tpl expands to a declaration of struct r123arrayNxW. In C, it's nothing more than a struct containing an array of N objects of type T. In C++ it's the same, but endowed with an assortment of member functions, typedefs and friends. In C++, r123arrayNxW looks a lot like std::array, has most of the capabilities of a container, and satisfies the requirements outlined in compat/Engine.hpp for counter and key types. ArrayNxW, in the r123 namespace is a typedef equivalent to r123arrayNxW. */ #define _r123array_tpl(_N, W, T) \ /** @ingroup arrayNxW */ \ /** @see arrayNxW */ \ struct r123array##_N##x##W{ \ T v[_N]; \ CXXMETHODS(_N, W, T) \ }; \ \ CXXOVERLOADS(_N, W, T) /** @endcond */ _r123array_tpl(1, 32, uint32_t) /* r123array1x32 */ _r123array_tpl(2, 32, uint32_t) /* r123array2x32 */ _r123array_tpl(4, 32, uint32_t) /* r123array4x32 */ _r123array_tpl(8, 32, uint32_t) /* r123array8x32 */ _r123array_tpl(1, 64, uint64_t) /* r123array1x64 */ _r123array_tpl(2, 64, uint64_t) /* r123array2x64 */ _r123array_tpl(4, 64, uint64_t) /* r123array4x64 */ _r123array_tpl(16, 8, uint8_t) /* r123array16x8 for ARSsw, AESsw */ #if R123_USE_SSE _r123array_tpl(1, m128i, r123m128i) /* r123array1x128i for ARSni, AESni */ #endif /* In C++, it's natural to use sizeof(a::value_type), but in C it's pretty convoluted to figure out the width of the value_type of an r123arrayNxW: */ #define R123_W(a) (8*sizeof(((a *)0)->v[0])) /** @namespace r123 Most of the Random123 C++ API is contained in the r123 namespace. */ #endif neuron-7.5/src/Random123/ars.h000066400000000000000000000156331323325274500161040ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __Random123_ars_dot_hpp__ #define __Random123_ars_dot_hpp__ #include "features/compilerfeatures.h" #include "array.h" #if R123_USE_AES_NI #ifndef ARS1xm128i_DEFAULT_ROUNDS #define ARS1xm128i_DEFAULT_ROUNDS 7 #endif /** @ingroup AESNI */ enum r123_enum_ars1xm128i {ars1xm128i_rounds = ARS1xm128i_DEFAULT_ROUNDS}; /* ARS1xm128i with Weyl keys. Fast, and Crush-resistant, but NOT CRYPTO. */ /** @ingroup AESNI */ typedef struct r123array1xm128i ars1xm128i_ctr_t; /** @ingroup AESNI */ typedef struct r123array1xm128i ars1xm128i_key_t; /** @ingroup AESNI */ typedef struct r123array1xm128i ars1xm128i_ukey_t; /** @ingroup AESNI */ R123_STATIC_INLINE ars1xm128i_key_t ars1xm128ikeyinit(ars1xm128i_ukey_t uk) { return uk; } /** @ingroup AESNI */ R123_STATIC_INLINE ars1xm128i_ctr_t ars1xm128i_R(unsigned int Nrounds, ars1xm128i_ctr_t in, ars1xm128i_key_t k){ __m128i kweyl = _mm_set_epi64x(R123_64BIT(0xBB67AE8584CAA73B), /* sqrt(3) - 1.0 */ R123_64BIT(0x9E3779B97F4A7C15)); /* golden ratio */ /* N.B. the aesenc instructions do the xor *after* // so if we want to follow the AES pattern, we // have to do the initial xor explicitly */ __m128i kk = k.v[0].m; __m128i v = _mm_xor_si128(in.v[0].m, kk); ars1xm128i_ctr_t ret; R123_ASSERT(Nrounds<=10); if( Nrounds>1 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>2 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>3 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>4 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>5 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>6 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>7 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>8 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } if( Nrounds>9 ){ kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenc_si128(v, kk); } kk = _mm_add_epi64(kk, kweyl); v = _mm_aesenclast_si128(v, kk); ret.v[0].m = v; return ret; } /** @def ars1xm128i @ingroup AESNI The ars1mx128i macro provides a C API interface to the @ref AESNI "ARS" CBRNG with the default number of rounds i.e. \c ars1xm128i_rounds **/ #define ars1xm128i(c,k) ars1xm128i_R(ars1xm128i_rounds, c, k) /** @ingroup AESNI */ typedef struct r123array4x32 ars4x32_ctr_t; /** @ingroup AESNI */ typedef struct r123array4x32 ars4x32_key_t; /** @ingroup AESNI */ typedef struct r123array4x32 ars4x32_ukey_t; /** @ingroup AESNI */ enum r123_enum_ars4x32 {ars4x32_rounds = ARS1xm128i_DEFAULT_ROUNDS}; /** @ingroup AESNI */ R123_STATIC_INLINE ars4x32_key_t ars4x32keyinit(ars4x32_ukey_t uk) { return uk; } /** @ingroup AESNI */ R123_STATIC_INLINE ars4x32_ctr_t ars4x32_R(unsigned int Nrounds, ars4x32_ctr_t c, ars4x32_key_t k){ ars1xm128i_ctr_t c128; ars1xm128i_key_t k128; c128.v[0].m = _mm_set_epi32(c.v[3], c.v[2], c.v[1], c.v[0]); k128.v[0].m = _mm_set_epi32(k.v[3], k.v[2], k.v[1], k.v[0]); c128 = ars1xm128i_R(Nrounds, c128, k128); _mm_storeu_si128((__m128i*)&c.v[0], c128.v[0].m); return c; } /** @def ars4x32 @ingroup AESNI The ars4x32 macro provides a C API interface to the @ref AESNI "ARS" CBRNG with the default number of rounds i.e. \c ars4x32_rounds **/ #define ars4x32(c,k) ars4x32_R(ars4x32_rounds, c, k) #ifdef __cplusplus namespace r123{ /** @ingroup AESNI ARS1xm128i_R exports the member functions, typedefs and operator overloads required by a @ref CBRNG class. ARS1xm128i uses the crypotgraphic AES round function, but a @b non-cryptographc key schedule to save time and space. ARS1xm128i is only available when the feature-test macro R123_USE_AES_NI is true, which should occur only when the compiler is configured to generate AES-NI instructions (or when defaults are overridden by compile-time, compiler-command-line options). The template argument, ROUNDS, is the number of times the ARS round functions will be applied. As of September 2011, the authors know of no statistical flaws with ROUNDS=5 or more. @class ARS1xm128i_R */ template struct ARS1xm128i_R{ typedef ars1xm128i_ctr_t ctr_type; typedef ars1xm128i_key_t key_type; typedef ars1xm128i_key_t ukey_type; static const unsigned int rounds=ROUNDS; R123_FORCE_INLINE(ctr_type operator()(ctr_type ctr, key_type key) const){ return ars1xm128i_R(ROUNDS, ctr, key); } }; /** @class ARS4x32_R @ingroup AESNI */ template struct ARS4x32_R{ typedef ars4x32_ctr_t ctr_type; typedef ars4x32_key_t key_type; typedef ars4x32_key_t ukey_type; static const unsigned int rounds=ROUNDS; R123_FORCE_INLINE(ctr_type operator()(ctr_type ctr, key_type key) const){ return ars4x32_R(ROUNDS, ctr, key); } }; /** @ingroup AESNI @class ARS1xm128i_R ARS1xm128i is equivalent to ARS1xm128i_R<7>. With 7 rounds, the ARS1xm128i CBRNG has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. */ typedef ARS1xm128i_R ARS1xm128i; typedef ARS4x32_R ARS4x32; } // namespace r123 #endif /* __cplusplus */ #endif /* R123_USE_AES_NI */ #endif neuron-7.5/src/Random123/features/000077500000000000000000000000001323325274500167545ustar00rootroot00000000000000neuron-7.5/src/Random123/features/clangfeatures.h000066400000000000000000000051551323325274500217560ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __clangfeatures_dot_hpp #define __clangfeatures_dot_hpp #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H ((defined(__x86_64__)||defined(__i386__))) #endif #ifndef R123_USE_CXX11_UNRESTRICTED_UNIONS #define R123_USE_CXX11_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions) #endif #ifndef R123_USE_CXX11_STATIC_ASSERT #define R123_USE_CXX11_STATIC_ASSERT __has_feature(cxx_static_assert) #endif #ifndef R123_USE_CXX11_CONSTEXPR #define R123_USE_CXX11_CONSTEXPR __has_feature(cxx_constexpr) #endif #ifndef R123_USE_CXX11_EXPLICIT_CONVERSIONS #define R123_USE_CXX11_EXPLICIT_CONVERSIONS __has_feature(cxx_explicit_conversions) #endif // With clang-3.0, the apparently simpler: // #define R123_USE_CXX11_RANDOM __has_include() // dumps core. #ifndef R123_USE_CXX11_RANDOM #if __cplusplus>=201103L && __has_include() #define R123_USE_CXX11_RANDOM 1 #else #define R123_USE_CXX11_RANDOM 0 #endif #endif #ifndef R123_USE_CXX11_TYPE_TRAITS #if __cplusplus>=201103L && __has_include() #define R123_USE_CXX11_TYPE_TRAITS 1 #else #define R123_USE_CXX11_TYPE_TRAITS 0 #endif #endif #include "gccfeatures.h" #endif neuron-7.5/src/Random123/features/compilerfeatures.h000066400000000000000000000254311323325274500225030ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @page porting Preprocessor symbols for porting Random123 to different platforms. The Random123 library is portable across C, C++, CUDA, OpenCL environments, and multiple operating systems (Linux, Windows 7, Mac OS X, FreeBSD, Solaris). This level of portability requires the abstraction of some features and idioms that are either not standardized (e.g., asm statments), or for which different vendors have their own standards (e.g., SSE intrinsics) or for which vendors simply refuse to conform to well-established standards (e.g., ). Random123/features/compilerfeatures.h conditionally includes a compiler-or-OS-specific Random123/featires/XXXfeatures.h file which defines appropriate values for the preprocessor symbols which can be used with a specific compiler or OS. Those symbols will then be used by other header files and source files in the Random123 library (and may be used by applications) to control what actually gets presented to the compiler. Most of the symbols are boolean valued. In general, they will \b always be defined with value either 1 or 0, so do \b NOT use \#ifdef. Use \#if R123_USE_SOMETHING instead. Library users can override any value by defining the pp-symbol with a compiler option, e.g., cc -DR123_USE_MULHILO64_C99 will use a strictly c99 version of the full-width 64x64->128-bit multiplication function, even if it would be disabled by default. All boolean-valued pre-processor symbols in Random123/features/compilerfeatures.h start with the prefix R123_USE_ @verbatim AES_NI AES_OPENSSL SSE4_2 SSE4_1 SSE STD_RANDOM GNU_UINT128 ASM_GNU ASM_MSASM CPUID_MSVC CXX11_RANDOM CXX11_TYPE_TRAITS CXX11_STATIC_ASSERT CXX11_CONSTEXPR CXX11_UNRESTRICTED_UNIONS CXX11_EXPLICIT_CONVERSIONS CXX11_LONG_LONG CXX11 X86INTRIN_H IA32INTRIN_H XMMINTRIN_H EMMINTRIN_H SMMINTRIN_H WMMINTRIN_H INTRIN_H MULHILO32_ASM MULHILO64_ASM MULHILO64_MSVC_INTRIN MULHILO64_CUDA_INTRIN MULHILO64_OPENCL_INTRIN MULHILO64_C99 U01_DOUBLE @endverbatim Most have obvious meanings. Some non-obvious ones: AES_NI and AES_OPENSSL are not mutually exclusive. You can have one, both or neither. GNU_UINT128 says that it's safe to use __uint128_t, but it does not require its use. In particular, it should be used in mulhilo only if MULHILO64_ASM is unset. If the XXXINTRIN_H macros are true, then one should @code #include @endcode to gain accesss to compiler intrinsics. The CXX11_SOME_FEATURE macros allow the code to use specific features of the C++11 language and library. The catchall In the absence of a specific CXX11_SOME_FEATURE, the feature is controlled by the catch-all R123_USE_CXX11 macro. U01_DOUBLE defaults on, and can be turned off (set to 0) if one does not want the utility functions that convert to double (i.e. u01_*_53()), e.g. on OpenCL without the cl_khr_fp64 extension. There are a number of invariants that are always true. Application code may choose to rely on these:
  • ASM_GNU and ASM_MASM are mutually exclusive
  • The "higher" SSE values imply the lower ones.
There are also non-boolean valued symbols:
  • R123_STATIC_INLINE - According to both C99 and GNU99, the 'static inline' declaration allows the compiler to not emit code if the function is not used. Note that the semantics of 'inline', 'static' and 'extern' in gcc have changed over time and are subject to modification by command line options, e.g., -std=gnu89, -fgnu-inline. Nevertheless, it appears that the meaning of 'static inline' has not changed over time and (with a little luck) the use of 'static inline' here will be portable between versions of gcc and to other C99 compilers. See: http://gcc.gnu.org/onlinedocs/gcc/Inline.html http://www.greenend.org.uk/rjk/2003/03/inline.html
  • R123_FORCE_INLINE(decl) - which expands to 'decl', adorned with the compiler-specific embellishments to strongly encourage that the declared function be inlined. If there is no such compiler-specific magic, it should expand to decl, unadorned.
  • R123_CUDA_DEVICE - which expands to __device__ (or something else with sufficiently similar semantics) when CUDA is in use, and expands to nothing in other cases.
  • R123_ASSERT(x) - which expands to assert(x), or maybe to nothing at all if we're in an environment so feature-poor that you can't even call assert (I'm looking at you, CUDA and OpenCL), or even include assert.h safely (OpenCL).
  • R123_STATIC_ASSERT(expr,msg) - which expands to static_assert(expr,msg), or to an expression that will raise a compile-time exception if expr is not true.
  • R123_ULONG_LONG - which expands to a declaration of the longest available unsigned integer.
  • R123_64BIT(x) - expands to something equivalent to UINT64_C(x) from , even in environments where is not available, e.g., MSVC and OpenCL.
  • R123_BUILTIN_EXPECT(expr,likely_value) - expands to something with the semantics of gcc's __builtin_expect(expr,likely_value). If the environment has nothing like __builtin_expect, it should expand to just expr.
\cond HIDDEN_FROM_DOXYGEN */ /* N.B. When something is added to the list of features, it should be added to each of the *features.h files, AND to examples/ut_features.cpp. */ /* N.B. most other compilers (icc, nvcc, open64, llvm) will also define __GNUC__, so order matters. */ #if defined(__OPENCL_VERSION__) && __OPENCL_VERSION__ > 0 #include "openclfeatures.h" #elif defined(__CUDACC__) #include "nvccfeatures.h" #elif defined(__ICC) #include "iccfeatures.h" #elif defined(__xlC__) #include "xlcfeatures.h" #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #include "sunprofeatures.h" #elif defined(__OPEN64__) #include "open64features.h" #elif defined(__clang__) #include "clangfeatures.h" #elif defined(_CRAYC) #include "crayfeatures.h" #elif defined(__GNUC__) #include "gccfeatures.h" #elif defined(__FCC_VERSION) || defined(__FUJITSU) #include "fujitsufeatures.h" #elif defined(__PGI) #include "pgccfeatures.h" #elif defined(_MSC_FULL_VER) #include "msvcfeatures.h" #else #error "Can't identify compiler. You'll need to add a new xxfeatures.hpp" { /* maybe an unbalanced brace will terminate the compilation */ #endif #ifndef R123_USE_CXX11 #define R123_USE_CXX11 (__cplusplus >= 201103L) #endif #ifndef R123_USE_CXX11_UNRESTRICTED_UNIONS #define R123_USE_CXX11_UNRESTRICTED_UNIONS R123_USE_CXX11 #endif #ifndef R123_USE_CXX11_STATIC_ASSERT #define R123_USE_CXX11_STATIC_ASSERT R123_USE_CXX11 #endif #ifndef R123_USE_CXX11_CONSTEXPR #define R123_USE_CXX11_CONSTEXPR R123_USE_CXX11 #endif #ifndef R123_USE_CXX11_EXPLICIT_CONVERSIONS #define R123_USE_CXX11_EXPLICIT_CONVERSIONS R123_USE_CXX11 #endif #ifndef R123_USE_CXX11_RANDOM #define R123_USE_CXX11_RANDOM R123_USE_CXX11 #endif #ifndef R123_USE_CXX11_TYPE_TRAITS #define R123_USE_CXX11_TYPE_TRAITS R123_USE_CXX11 #endif #ifndef R123_USE_CXX11_LONG_LONG #define R123_USE_CXX11_LONG_LONG R123_USE_CXX11 #endif #ifndef R123_USE_MULHILO64_C99 #define R123_USE_MULHILO64_C99 0 #endif #ifndef R123_USE_MULHILO64_MULHI_INTRIN #define R123_USE_MULHILO64_MULHI_INTRIN 0 #endif #ifndef R123_USE_MULHILO32_MULHI_INTRIN #define R123_USE_MULHILO32_MULHI_INTRIN 0 #endif #ifndef R123_STATIC_ASSERT #if R123_USE_CXX11_STATIC_ASSERT #define R123_STATIC_ASSERT(expr, msg) static_assert(expr, msg) #else /* if msg always_looked_like_this, we could paste it into the name. Worth it? */ #define R123_STATIC_ASSERT(expr, msg) typedef char static_assertion[(!!(expr))*2-1] #endif #endif #ifndef R123_CONSTEXPR #if R123_USE_CXX11_CONSTEXPR #define R123_CONSTEXPR constexpr #else #define R123_CONSTEXPR #endif #endif #ifndef R123_USE_PHILOX_64BIT #define R123_USE_PHILOX_64BIT (R123_USE_MULHILO64_ASM || R123_USE_MULHILO64_MSVC_INTRIN || R123_USE_MULHILO64_CUDA_INTRIN || R123_USE_GNU_UINT128 || R123_USE_MULHILO64_C99 || R123_USE_MULHILO64_OPENCL_INTRIN || R123_USE_MULHILO64_MULHI_INTRIN) #endif #ifndef R123_ULONG_LONG #if defined(__cplusplus) && !R123_USE_CXX11_LONG_LONG /* C++98 doesn't have long long. It doesn't have uint64_t either, but we will have typedef'ed uint64_t to something in the xxxfeatures.h. With luck, it won't elicit complaints from -pedantic. Cross your fingers... */ #define R123_ULONG_LONG uint64_t #else #define R123_ULONG_LONG unsigned long long #endif #endif /* UINT64_C should have been #defined by XXXfeatures.h, either by #include or through compiler-dependent hacks */ #ifndef R123_64BIT #define R123_64BIT(x) UINT64_C(x) #endif #ifndef R123_THROW #define R123_THROW(x) throw (x) #endif /* * Windows.h (and perhaps other "well-meaning" code define min and * max, so there's a high chance that our definition of min, max * methods or use of std::numeric_limits min and max will cause * complaints in any program that happened to include Windows.h or * suchlike first. We use the null macro below in our own header * files definition or use of min, max to defensively preclude * this problem. It may not be enough; one might need to #define * NOMINMAX before including Windows.h or compile with -DNOMINMAX. */ #define R123_NO_MACRO_SUBST /** \endcond */ neuron-7.5/src/Random123/features/crayfeatures.h000066400000000000000000000046241323325274500216300ustar00rootroot00000000000000/* Copyright (c) 2014 EPFL-BBP, All rights reserved. THIS SOFTWARE IS PROVIDED BY THE BLUE BRAIN PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE BLUE BRAIN PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Note: Minimum/Initial version derived from openclfeatures.h to work with cray compiler. */ #ifndef __crayfeatures_dot_hpp #define __crayfeatures_dot_hpp #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static __inline__ #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) expr #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 0 #endif #ifndef R123_USE_INTRIN_H #define R123_USE_INTRIN_H 0 #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 0 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_MULHI_INTRIN #define R123_USE_MULHILO64_MULHI_INTRIN (defined(__powerpc64__)) #endif #ifndef R123_MULHILO64_MULHI_INTRIN #define R123_MULHILO64_MULHI_INTRIN __mulhdu #endif #ifndef R123_USE_MULHILO32_MULHI_INTRIN #define R123_USE_MULHILO32_MULHI_INTRIN 0 #endif #ifndef R123_MULHILO32_MULHI_INTRIN #define R123_MULHILO32_MULHI_INTRIN __mulhwu #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif #endif neuron-7.5/src/Random123/features/fujitsufeatures.h000066400000000000000000000032101323325274500223510ustar00rootroot00000000000000/* Note: Minimum/Initial version derived from openclfeatures.h to work with cray compiler. */ #ifndef __crayfeatures_dot_hpp #define __crayfeatures_dot_hpp #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static __inline #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) expr #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 0 #endif #ifndef R123_USE_INTRIN_H #define R123_USE_INTRIN_H 0 #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 0 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_MULHI_INTRIN #define R123_USE_MULHILO64_MULHI_INTRIN (defined(__powerpc64__)) #endif #ifndef R123_MULHILO64_MULHI_INTRIN #define R123_MULHILO64_MULHI_INTRIN __mulhdu #endif #ifndef R123_USE_MULHILO32_MULHI_INTRIN #define R123_USE_MULHILO32_MULHI_INTRIN 0 #endif #ifndef R123_MULHILO32_MULHI_INTRIN #define R123_MULHILO32_MULHI_INTRIN __mulhwu #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif #endif neuron-7.5/src/Random123/features/gccfeatures.h000066400000000000000000000163651323325274500214330ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __gccfeatures_dot_hpp #define __gccfeatures_dot_hpp #define R123_GNUC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) #if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) # error "This code has only been tested on x86 and powerpc platforms." #include { /* maybe an unbalanced brace will terminate the compilation */ /* Feel free to try the Random123 library on other architectures by changing the conditions that reach this error, but you should consider it a porting exercise and expect to encounter bugs and deficiencies. Please let the authors know of any successes (or failures). */ #endif #ifdef __powerpc__ #include #endif #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static __inline__ #endif #ifndef R123_FORCE_INLINE #if R123_GNUC_VERSION >= 40000 #define R123_FORCE_INLINE(decl) decl __attribute__((always_inline)) #else #define R123_FORCE_INLINE(decl) decl #endif #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) __builtin_expect(expr,likely) #endif /* According to the C++0x standard, we should be able to test the numeric value of __cplusplus == 199701L for C++98, __cplusplus == 201103L for C++0x But gcc has had an open bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773 since early 2001, which was finally fixed in 4.7 (early 2012). For earlier versions, the only way to detect whether --std=c++0x was requested on the command line is to look at the __GCC_EXPERIMENTAL_CXX0X__ pp-symbol. */ #define GNU_CXX11 (__cplusplus>=201103L || (R123_GNUC_VERSION<40700 && defined(__GCC_EXPERIMENTAL_CXX0X__) )) #ifndef R123_USE_CXX11_UNRESTRICTED_UNIONS #define R123_USE_CXX11_UNRESTRICTED_UNIONS ((R123_GNUC_VERSION >= 40600) && GNU_CXX11) #endif #ifndef R123_USE_CXX11_STATIC_ASSERT #define R123_USE_CXX11_STATIC_ASSERT ((R123_GNUC_VERSION >= 40300) && GNU_CXX11) #endif #ifndef R123_USE_CXX11_CONSTEXPR #define R123_USE_CXX11_CONSTEXPR ((R123_GNUC_VERSION >= 40600) && GNU_CXX11) #endif #ifndef R123_USE_CXX11_EXPLICIT_CONVERSIONS #define R123_USE_CXX11_EXPLICIT_CONVERSIONS ((R123_GNUC_VERSION >= 40500) && GNU_CXX11) #endif #ifndef R123_USE_CXX11_RANDOM #define R123_USE_CXX11_RANDOM ((R123_GNUC_VERSION>=40500) && GNU_CXX11) #endif #ifndef R123_USE_CXX11_TYPE_TRAITS #define R123_USE_CXX11_TYPE_TRAITS ((R123_GNUC_VERSION>=40400) && GNU_CXX11) #endif #ifndef R123_USE_AES_NI #ifdef __AES__ #define R123_USE_AES_NI 1 #else #define R123_USE_AES_NI 0 #endif #endif #ifndef R123_USE_SSE4_2 #ifdef __SSE4_2__ #define R123_USE_SSE4_2 1 #else #define R123_USE_SSE4_2 0 #endif #endif #ifndef R123_USE_SSE4_1 #ifdef __SSE4_1__ #define R123_USE_SSE4_1 1 #else #define R123_USE_SSE4_1 0 #endif #endif #ifndef R123_USE_SSE /* There's no point in trying to compile SSE code in Random123 unless SSE2 is available. */ #ifdef __SSE2__ #define R123_USE_SSE 1 #else #define R123_USE_SSE 0 #endif #endif #ifndef R123_USE_AES_OPENSSL /* There isn't really a good way to tell at compile time whether openssl is available. Without a pre-compilation configure-like tool, it's less error-prone to guess that it isn't available. Add -DR123_USE_AES_OPENSSL=1 and any necessary LDFLAGS or LDLIBS to play with openssl */ #define R123_USE_AES_OPENSSL 0 #endif #ifndef R123_USE_GNU_UINT128 #ifdef __x86_64__ #define R123_USE_GNU_UINT128 1 #else #define R123_USE_GNU_UINT128 0 #endif #endif #ifndef R123_USE_ASM_GNU #define R123_USE_ASM_GNU (defined(__x86_64__)||defined(__i386__)) #endif #ifndef R123_USE_CPUID_MSVC #define R123_USE_CPUID_MSVC 0 #endif #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H ((defined(__x86_64__)||defined(__i386__)) && R123_GNUC_VERSION >= 40402) #endif #ifndef R123_USE_IA32INTRIN_H #define R123_USE_IA32INTRIN_H 0 #endif #ifndef R123_USE_XMMINTRIN_H #define R123_USE_XMMINTRIN_H 0 #endif #ifndef R123_USE_EMMINTRIN_H /* gcc -m64 on Solaris 10 defines __SSE2__ but doesn't have emmintrin.h in the include search path. This is so broken that I refuse to try to work around it. If this affects you, figure out where your emmintrin.h lives and add an appropriate -I to your CPPFLAGS. Or add -DR123_USE_SSE=0. */ #define R123_USE_EMMINTRIN_H (R123_USE_SSE && (R123_GNUC_VERSION < 40402)) #endif #ifndef R123_USE_SMMINTRIN_H #define R123_USE_SMMINTRIN_H ((R123_USE_SSE4_1 || R123_USE_SSE4_2) && (R123_GNUC_VERSION < 40402)) #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 0 #endif #ifndef R123_USE_INTRIN_H #define R123_USE_INTRIN_H 0 #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 0 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_MULHI_INTRIN #define R123_USE_MULHILO64_MULHI_INTRIN (defined(__powerpc64__)) #endif #ifndef R123_MULHILO64_MULHI_INTRIN #define R123_MULHILO64_MULHI_INTRIN __mulhdu #endif #ifndef R123_USE_MULHILO32_MULHI_INTRIN #define R123_USE_MULHILO32_MULHI_INTRIN 0 #endif #ifndef R123_MULHILO32_MULHI_INTRIN #define R123_MULHILO32_MULHI_INTRIN __mulhwu #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif /* If you add something, it must go in all the other XXfeatures.hpp and in ../ut_features.cpp */ #endif neuron-7.5/src/Random123/features/iccfeatures.h000066400000000000000000000135171323325274500214310ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __icpcfeatures_dot_hpp #define __icpcfeatures_dot_hpp // icc relies on gcc libraries and other toolchain components. #define R123_GNUC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) #if !defined(__x86_64__) && !defined(__i386__) # error "This code has only been tested on x86 platforms." { // maybe an unbalanced brace will terminate the compilation // You are invited to try Easy123 on other architectures, by changing // the conditions that reach this error, but you should consider it a // porting exercise and expect to encounter bugs and deficiencies. // Please let the authors know of any successes (or failures). #endif #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static inline #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl __attribute__((always_inline)) #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) __builtin_expect(expr,likely) #endif // The basic idiom is: // #ifndef R123_SOMETHING // #if some condition // #define R123_SOMETHING 1 // #else // #define R123_SOMETHING 0 // #endif // #endif // This idiom allows an external user to override any decision // in this file with a command-line -DR123_SOMETHING=1 or -DR123_SOMETHINE=0 // An alternative idiom is: // #ifndef R123_SOMETHING // #define R123_SOMETHING (some boolean expression) // #endif // where the boolean expression might contain previously-defined R123_SOMETHING_ELSE // pp-symbols. #ifndef R123_USE_SSE4_2 #ifdef __SSE4_2__ #define R123_USE_SSE4_2 1 #else #define R123_USE_SSE4_2 0 #endif #endif #ifndef R123_USE_SSE4_1 #ifdef __SSE4_1__ #define R123_USE_SSE4_1 1 #else #define R123_USE_SSE4_1 0 #endif #endif #ifndef R123_USE_SSE #ifdef __SSE2__ #define R123_USE_SSE 1 #else #define R123_USE_SSE 0 #endif #endif #ifndef R123_USE_AES_NI // Unlike gcc, icc (version 12) does not pre-define an __AES__ // pp-symbol when -maes or -xHost is on the command line. This feels // like a defect in icc (it defines __SSE4_2__ in analogous // circumstances), but until Intel fixes it, we're better off erring // on the side of caution and not generating instructions that are // going to raise SIGILL when executed. To get the AES-NI // instructions with icc, the caller must puts something like // -DR123_USE_AES_NI=1 or -D__AES__ on the command line. FWIW, the // AES-NI Whitepaper by Gueron says that icc has supported AES-NI from // 11.1 onwards. // #define R123_USE_AES_NI ((__ICC>=1101) && defined(__AES__)) #endif #ifndef R123_USE_AES_OPENSSL /* There isn't really a good way to tell at compile time whether openssl is available. Without a pre-compilation configure-like tool, it's less error-prone to guess that it isn't available. Add -DR123_USE_AES_OPENSSL=1 and any necessary LDFLAGS or LDLIBS to play with openssl */ #define R123_USE_AES_OPENSSL 0 #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_ASM_GNU #define R123_USE_ASM_GNU 1 #endif #ifndef R123_USE_CPUID_MSVC #define R123_USE_CPUID_MSVC 0 #endif #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H 0 #endif #ifndef R123_USE_IA32INTRIN_H #define R123_USE_IA32INTRIN_H 1 #endif #ifndef R123_USE_XMMINTRIN_H #define R123_USE_XMMINTRIN_H 0 #endif #ifndef R123_USE_EMMINTRIN_H #define R123_USE_EMMINTRIN_H 1 #endif #ifndef R123_USE_SMMINTRIN_H #define R123_USE_SMMINTRIN_H 1 #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 1 #endif #ifndef R123_USE_INTRIN_H #define R123_USE_INTRIN_H 0 #endif #ifndef R123_USE_MULHILO16_ASM #define R123_USE_MULHILO16_ASM 0 #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 1 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif // If you add something, it must go in all the other XXfeatures.hpp // and in ../ut_features.cpp #endif neuron-7.5/src/Random123/features/llvmfeatures.h000066400000000000000000000032251323325274500216400ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __llvmfeatures_dot_hpp #define __llvmfeatures_dot_hpp /* The gcc features seem to work, but this is a placeholder in case they don't. */ #include "gccfeatures.h" #endif neuron-7.5/src/Random123/features/msvcfeatures.h000066400000000000000000000117141323325274500216400ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __msvcfeatures_dot_hpp #define __msvcfeatures_dot_hpp //#if _MSVC_FULL_VER <= 15 //#error "We've only tested MSVC_FULL_VER==15." //#endif #if !defined(_M_IX86) && !defined(_M_X64) # error "This code has only been tested on x86 platforms." { // maybe an unbalanced brace will terminate the compilation // You are invited to try Random123 on other architectures, by changing // the conditions that reach this error, but you should consider it a // porting exercise and expect to encounter bugs and deficiencies. // Please let the authors know of any successes (or failures). #endif #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static __inline #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) _forceinline decl #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) expr #endif // The basic idiom is: // #ifndef R123_SOMETHING // #if some condition // #define R123_SOMETHING 1 // #else // #define R123_SOMETHING 0 // #endif // #endif // This idiom allows an external user to override any decision // in this file with a command-line -DR123_SOMETHING=1 or -DR123_SOMETHINE=0 // An alternative idiom is: // #ifndef R123_SOMETHING // #define R123_SOMETHING (some boolean expression) // #endif // where the boolean expression might contain previously-defined R123_SOMETHING_ELSE // pp-symbols. #ifndef R123_USE_AES_NI #if defined(_M_X64) #define R123_USE_AES_NI 1 #else #define R123_USE_AES_NI 0 #endif #endif #ifndef R123_USE_SSE4_2 #if defined(_M_X64) #define R123_USE_SSE4_2 1 #else #define R123_USE_SSE4_2 0 #endif #endif #ifndef R123_USE_SSE4_1 #if defined(_M_X64) #define R123_USE_SSE4_1 1 #else #define R123_USE_SSE4_1 0 #endif #endif #ifndef R123_USE_SSE #define R123_USE_SSE 1 #endif #ifndef R123_USE_AES_OPENSSL #define R123_USE_AES_OPENSSL 0 #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_ASM_GNU #define R123_USE_ASM_GNU 0 #endif #ifndef R123_USE_CPUID_MSVC #define R123_USE_CPUID_MSVC 1 #endif #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H 0 #endif #ifndef R123_USE_IA32INTRIN_H #define R123_USE_IA32INTRIN_H 0 #endif #ifndef R123_USE_XMMINTRIN_H #define R123_USE_XMMINTRIN_H 0 #endif #ifndef R123_USE_EMMINTRIN_H #define R123_USE_EMMINTRIN_H 1 #endif #ifndef R123_USE_SMMINTRIN_H #define R123_USE_SMMINTRIN_H 1 #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 1 #endif #ifndef R123_USE_INTRIN_H #define R123_USE_INTRIN_H 1 #endif #ifndef R123_USE_MULHILO16_ASM #define R123_USE_MULHILO16_ASM 0 #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 0 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #if defined(_M_X64) #define R123_USE_MULHILO64_MSVC_INTRIN 1 #else #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif #pragma warning(disable:4244) #pragma warning(disable:4996) // If you add something, it must go in all the other XXfeatures.hpp // and in ../ut_features.cpp #endif neuron-7.5/src/Random123/features/nvccfeatures.h000066400000000000000000000071171323325274500216230ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __r123_nvcc_features_dot_h__ #define __r123_nvcc_features_dot_h__ #if !defined(CUDART_VERSION) #error "why are we in nvccfeatures.h if CUDART_VERSION is not defined" #endif #if CUDART_VERSION < 4010 #error "CUDA versions earlier than 4.1 produce incorrect results for some templated functions in namespaces. Random123 isunsupported. See comments in nvccfeatures.h" // This test was added in Random123-1.08 (August, 2013) because we // discovered that Ftype(maxTvalue()) with Ftype=double and // T=uint64_t in examples/uniform.hpp produces -1 for CUDA4.0 and // earlier. We can't be sure this bug doesn't also affect invocations // of other templated functions, e.g., essentially all of Random123. // Thus, we no longer trust CUDA versions earlier than 4.1 even though // we had previously tested and timed Random123 with CUDA 3.x and 4.0. // If you feel lucky or desperate, you can change #error to #warning, but // please take extra care to be sure that you are getting correct // results. #endif // nvcc falls through to gcc or msvc. So first define // a couple of things and then include either gccfeatures.h // or msvcfeatures.h #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE __device__ #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 1 #endif #ifndef R123_ASSERT #define R123_ASSERT(x) if((x)) ; else asm("trap;") #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) expr #endif #ifndef R123_USE_AES_NI #define R123_USE_AES_NI 0 #endif #ifndef R123_USE_SSE4_2 #define R123_USE_SSE4_2 0 #endif #ifndef R123_USE_SSE4_1 #define R123_USE_SSE4_1 0 #endif #ifndef R123_USE_SSE #define R123_USE_SSE 0 #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_ULONG_LONG // uint64_t, which is what we'd get without this, is // not the same as unsigned long long #define R123_ULONG_LONG unsigned long long #endif #ifndef R123_THROW // No exceptions in CUDA, at least upto 4.0 #define R123_THROW(x) R123_ASSERT(0) #endif #if defined(__GNUC__) #include "gccfeatures.h" #elif defined(_MSC_FULL_VER) #include "msvcfeatures.h" #endif #endif neuron-7.5/src/Random123/features/open64features.h000066400000000000000000000037271323325274500220100ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __open64features_dot_hpp #define __open64features_dot_hpp /* The gcc features are mostly right. We just override a few and then include gccfeatures.h */ /* Open64 4.2.3 and 4.2.4 accept the __uint128_t code without complaint but produce incorrect code for 64-bit philox. The MULHILO64_ASM seems to work fine */ #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 1 #endif #include "gccfeatures.h" #endif neuron-7.5/src/Random123/features/openclfeatures.h000066400000000000000000000053521323325274500221510ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __openclfeatures_dot_hpp #define __openclfeatures_dot_hpp #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE inline #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl __attribute__((always_inline)) #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #define R123_ASSERT(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) expr #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 0 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 1 #endif #ifndef R123_USE_AES_NI #define R123_USE_AES_NI 0 #endif // XXX ATI APP SDK 2.4 clBuildProgram SEGVs if one uses uint64_t instead of // ulong to mul_hi. And gets lots of complaints from stdint.h // on some machines. // But these typedefs mean we cannot include stdint.h with // these headers? Do we need R123_64T, R123_32T, R123_8T? typedef ulong uint64_t; typedef uint uint32_t; typedef uchar uint8_t; #define UINT64_C(x) ((ulong)(x##UL)) #endif neuron-7.5/src/Random123/features/pgccfeatures.h000066400000000000000000000134331323325274500216040ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (c) 2013, Los Alamos National Security, LLC All rights reserved. Copyright 2013. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL. */ #ifndef __pgccfeatures_dot_hpp #define __pgccfeatures_dot_hpp #if !defined(__x86_64__) && !defined(__i386__) # error "This code has only been tested on x86 platforms." #include { /* maybe an unbalanced brace will terminate the compilation */ /* Feel free to try the Random123 library on other architectures by changing the conditions that reach this error, but you should consider it a porting exercise and expect to encounter bugs and deficiencies. Please let the authors know of any successes (or failures). */ #endif #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static inline #endif /* Found this example in PGI's emmintrin.h. */ #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl __attribute__((__always_inline__)) #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) (expr) #endif /* PGI through 13.2 doesn't appear to support AES-NI. */ #ifndef R123_USE_AES_NI #define R123_USE_AES_NI 0 #endif /* PGI through 13.2 appears to support MMX, SSE, SSE3, SSE3, SSSE3, SSE4a, and ABM, but not SSE4.1 or SSE4.2. */ #ifndef R123_USE_SSE4_2 #define R123_USE_SSE4_2 0 #endif #ifndef R123_USE_SSE4_1 #define R123_USE_SSE4_1 0 #endif #ifndef R123_USE_SSE /* There's no point in trying to compile SSE code in Random123 unless SSE2 is available. */ #ifdef __SSE2__ #define R123_USE_SSE 1 #else #define R123_USE_SSE 0 #endif #endif #ifndef R123_USE_AES_OPENSSL /* There isn't really a good way to tell at compile time whether openssl is available. Without a pre-compilation configure-like tool, it's less error-prone to guess that it isn't available. Add -DR123_USE_AES_OPENSSL=1 and any necessary LDFLAGS or LDLIBS to play with openssl */ #define R123_USE_AES_OPENSSL 0 #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_ASM_GNU #define R123_USE_ASM_GNU 1 #endif #ifndef R123_USE_CPUID_MSVC #define R123_USE_CPUID_MSVC 0 #endif #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H 0 #endif #ifndef R123_USE_IA32INTRIN_H #define R123_USE_IA32INTRIN_H 0 #endif /* emmintrin.h from PGI #includes xmmintrin.h but then complains at link time about undefined references to _mm_castsi128_ps(__m128i). Why? */ #ifndef R123_USE_XMMINTRIN_H #define R123_USE_XMMINTRIN_H 1 #endif #ifndef R123_USE_EMMINTRIN_H #define R123_USE_EMMINTRIN_H 1 #endif #ifndef R123_USE_SMMINTRIN_H #define R123_USE_SMMINTRIN_H 0 #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 0 #endif #ifndef R123_USE_INTRIN_H #ifdef __ABM__ #define R123_USE_INTRIN_H 1 #else #define R123_USE_INTRIN_H 0 #endif #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_MULHI_INTRIN #define R123_USE_MULHILO64_MULHI_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 1 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif /* If you add something, it must go in all the other XXfeatures.hpp and in ../ut_features.cpp */ #endif neuron-7.5/src/Random123/features/sse.h000066400000000000000000000234241323325274500177240ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _Random123_sse_dot_h__ #define _Random123_sse_dot_h__ #if R123_USE_SSE #if R123_USE_X86INTRIN_H #include #endif #if R123_USE_IA32INTRIN_H #include #endif #if R123_USE_XMMINTRIN_H #include #endif #if R123_USE_EMMINTRIN_H #include #endif #if R123_USE_SMMINTRIN_H #include #endif #if R123_USE_WMMINTRIN_H #include #endif #if R123_USE_INTRIN_H #include #endif #ifdef __cplusplus #include #include #include #endif #if R123_USE_ASM_GNU /* bit25 of CX tells us whether AES is enabled. */ R123_STATIC_INLINE int haveAESNI(){ unsigned int eax, ebx, ecx, edx; __asm__ __volatile__ ("cpuid": "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (1)); return (ecx>>25) & 1; } #elif R123_USE_CPUID_MSVC R123_STATIC_INLINE int haveAESNI(){ int CPUInfo[4]; __cpuid(CPUInfo, 1); return (CPUInfo[2]>>25)&1; } #else /* R123_USE_CPUID_??? */ #warning "No R123_USE_CPUID_XXX method chosen. haveAESNI will always return false" R123_STATIC_INLINE int haveAESNI(){ return 0; } #endif /* R123_USE_ASM_GNU || R123_USE_CPUID_MSVC */ // There is a lot of annoying and inexplicable variation in the // SSE intrinsics available in different compilation environments. // The details seem to depend on the compiler, the version and // the target architecture. Rather than insisting on // R123_USE_feature tests for each of these in each of the // compilerfeatures.h files we just keep the complexity localized // to here... #if (defined(__ICC) && __ICC<1210) || (defined(_MSC_VER) && !defined(_WIN64)) /* Is there an intrinsic to assemble an __m128i from two 64-bit words? If not, use the 4x32-bit intrisic instead. N.B. It looks like Intel added _mm_set_epi64x to icc version 12.1 in Jan 2012. */ R123_STATIC_INLINE __m128i _mm_set_epi64x(uint64_t v1, uint64_t v0){ union{ uint64_t u64; uint32_t u32[2]; } u1, u0; u1.u64 = v1; u0.u64 = v0; return _mm_set_epi32(u1.u32[1], u1.u32[0], u0.u32[1], u0.u32[0]); } #endif /* _mm_extract_lo64 abstracts the task of extracting the low 64-bit word from an __m128i. The _mm_cvtsi128_si64 intrinsic does the job on 64-bit platforms. Unfortunately, both MSVC and Open64 fail assertions in ut_M128.cpp and ut_carray.cpp when we use the _mm_cvtsi128_si64 intrinsic. (See https://bugs.open64.net/show_bug.cgi?id=873 for the Open64 bug). On 32-bit platforms, there's no MOVQ, so there's no intrinsic. Finally, even if the intrinsic exists, it may be spelled with or without the 'x'. */ #if !defined(__x86_64__) || defined(_MSC_VER) || defined(__OPEN64__) R123_STATIC_INLINE uint64_t _mm_extract_lo64(__m128i si){ union{ uint64_t u64[2]; __m128i m; }u; _mm_store_si128(&u.m, si); return u.u64[0]; } #elif defined(__llvm__) || defined(__ICC) R123_STATIC_INLINE uint64_t _mm_extract_lo64(__m128i si){ return (uint64_t)_mm_cvtsi128_si64(si); } #else /* GNUC, others */ /* FWIW, gcc's emmintrin.h has had the 'x' spelling since at least gcc-3.4.4. The no-'x' spelling showed up around 4.2. */ R123_STATIC_INLINE uint64_t _mm_extract_lo64(__m128i si){ return (uint64_t)_mm_cvtsi128_si64x(si); } #endif #if defined(__GNUC__) && __GNUC__ < 4 /* the cast builtins showed up in gcc4. */ R123_STATIC_INLINE __m128 _mm_castsi128_ps(__m128i si){ return (__m128)si; } #endif #ifdef __cplusplus struct r123m128i{ __m128i m; #if R123_USE_CXX11_UNRESTRICTED_UNIONS // C++98 forbids a union member from having *any* constructors. // C++11 relaxes this, and allows union members to have constructors // as long as there is a "trivial" default construtor. So in C++11 // we can provide a r123m128i constructor with an __m128i argument, and still // have the default (and hence trivial) default constructor. r123m128i() = default; r123m128i(__m128i _m): m(_m){} #endif r123m128i& operator=(const __m128i& rhs){ m=rhs; return *this;} r123m128i& operator=(R123_ULONG_LONG n){ m = _mm_set_epi64x(0, n); return *this;} #if R123_USE_CXX11_EXPLICIT_CONVERSIONS // With C++0x we can attach explicit to the bool conversion operator // to disambiguate undesired promotions. For g++, this works // only in 4.5 and above. explicit operator bool() const {return _bool();} #else // Pre-C++0x, we have to do something else. Google for the "safe bool" // idiom for other ideas... operator const void*() const{return _bool()?this:0;} #endif operator __m128i() const {return m;} private: #if R123_USE_SSE4_1 bool _bool() const{ return !_mm_testz_si128(m,m); } #else bool _bool() const{ return 0xf != _mm_movemask_ps(_mm_castsi128_ps(_mm_cmpeq_epi32(m, _mm_setzero_si128()))); } #endif }; R123_STATIC_INLINE r123m128i& operator++(r123m128i& v){ __m128i& c = v.m; __m128i zeroone = _mm_set_epi64x(R123_64BIT(0), R123_64BIT(1)); c = _mm_add_epi64(c, zeroone); //return c; #if R123_USE_SSE4_1 __m128i zerofff = _mm_set_epi64x(0, ~(R123_64BIT(0))); if( R123_BUILTIN_EXPECT(_mm_testz_si128(c,zerofff), 0) ){ __m128i onezero = _mm_set_epi64x(R123_64BIT(1), R123_64BIT(0)); c = _mm_add_epi64(c, onezero); } #else unsigned mask = _mm_movemask_ps( _mm_castsi128_ps(_mm_cmpeq_epi32(c, _mm_setzero_si128()))); // The low two bits of mask are 11 iff the low 64 bits of // c are zero. if( R123_BUILTIN_EXPECT((mask&0x3) == 0x3, 0) ){ __m128i onezero = _mm_set_epi64x(1,0); c = _mm_add_epi64(c, onezero); } #endif return v; } R123_STATIC_INLINE r123m128i& operator+=(r123m128i& lhs, R123_ULONG_LONG n){ __m128i c = lhs.m; __m128i incr128 = _mm_set_epi64x(0, n); c = _mm_add_epi64(c, incr128); // return c; // NO CARRY! int64_t lo64 = _mm_extract_lo64(c); if((uint64_t)lo64 < n) c = _mm_add_epi64(c, _mm_set_epi64x(1,0)); lhs.m = c; return lhs; } // We need this one because it's present, but never used in r123array1xm128i::incr R123_STATIC_INLINE bool operator<=(R123_ULONG_LONG, const r123m128i &){ throw std::runtime_error("operator<=(unsigned long long, r123m128i) is unimplemented.");} // The comparisons aren't implemented, but if we leave them out, and // somebody writes, e.g., M1 < M2, the compiler will do an implicit // conversion through void*. Sigh... R123_STATIC_INLINE bool operator<(const r123m128i&, const r123m128i&){ throw std::runtime_error("operator<(r123m128i, r123m128i) is unimplemented.");} R123_STATIC_INLINE bool operator<=(const r123m128i&, const r123m128i&){ throw std::runtime_error("operator<=(r123m128i, r123m128i) is unimplemented.");} R123_STATIC_INLINE bool operator>(const r123m128i&, const r123m128i&){ throw std::runtime_error("operator>(r123m128i, r123m128i) is unimplemented.");} R123_STATIC_INLINE bool operator>=(const r123m128i&, const r123m128i&){ throw std::runtime_error("operator>=(r123m128i, r123m128i) is unimplemented.");} R123_STATIC_INLINE bool operator==(const r123m128i &lhs, const r123m128i &rhs){ return 0xf==_mm_movemask_ps(_mm_castsi128_ps(_mm_cmpeq_epi32(lhs, rhs))); } R123_STATIC_INLINE bool operator!=(const r123m128i &lhs, const r123m128i &rhs){ return !(lhs==rhs);} R123_STATIC_INLINE bool operator==(R123_ULONG_LONG lhs, const r123m128i &rhs){ r123m128i LHS; LHS.m=_mm_set_epi64x(0, lhs); return LHS == rhs; } R123_STATIC_INLINE bool operator!=(R123_ULONG_LONG lhs, const r123m128i &rhs){ return !(lhs==rhs);} R123_STATIC_INLINE std::ostream& operator<<(std::ostream& os, const r123m128i& m){ union{ uint64_t u64[2]; __m128i m; }u; _mm_storeu_si128(&u.m, m.m); return os << u.u64[0] << " " << u.u64[1]; } R123_STATIC_INLINE std::istream& operator>>(std::istream& is, r123m128i& m){ uint64_t u64[2]; is >> u64[0] >> u64[1]; m.m = _mm_set_epi64x(u64[1], u64[0]); return is; } template inline T assemble_from_u32(uint32_t *p32); // forward declaration template <> inline r123m128i assemble_from_u32(uint32_t *p32){ r123m128i ret; ret.m = _mm_set_epi32(p32[3], p32[2], p32[1], p32[0]); return ret; } #else typedef struct { __m128i m; } r123m128i; #endif /* __cplusplus */ #else /* !R123_USE_SSE */ R123_STATIC_INLINE int haveAESNI(){ return 0; } #endif /* R123_USE_SSE */ #endif /* _Random123_sse_dot_h__ */ neuron-7.5/src/Random123/features/sunprofeatures.h000066400000000000000000000102761323325274500222200ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __sunprofeatures_dot_hpp #define __sunprofeatures_dot_hpp #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static inline #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) expr #endif // The basic idiom is: // #ifndef R123_SOMETHING // #if some condition // #define R123_SOMETHING 1 // #else // #define R123_SOMETHING 0 // #endif // #endif // This idiom allows an external user to override any decision // in this file with a command-line -DR123_SOMETHING=1 or -DR123_SOMETHINE=0 // An alternative idiom is: // #ifndef R123_SOMETHING // #define R123_SOMETHING (some boolean expression) // #endif // where the boolean expression might contain previously-defined R123_SOMETHING_ELSE // pp-symbols. #ifndef R123_USE_AES_NI #define R123_USE_AES_NI 0 #endif #ifndef R123_USE_SSE4_2 #define R123_USE_SSE4_2 0 #endif #ifndef R123_USE_SSE4_1 #define R123_USE_SSE4_1 0 #endif #ifndef R123_USE_SSE #define R123_USE_SSE 0 #endif #ifndef R123_USE_AES_OPENSSL #define R123_USE_AES_OPENSSL 0 #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_ASM_GNU #define R123_USE_ASM_GNU 0 #endif #ifndef R123_USE_CPUID_MSVC #define R123_USE_CPUID_MSVC 0 #endif #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H 0 #endif #ifndef R123_USE_IA32INTRIN_H #define R123_USE_IA32INTRIN_H 0 #endif #ifndef R123_USE_XMMINTRIN_H #define R123_USE_XMMINTRIN_H 0 #endif #ifndef R123_USE_EMMINTRIN_H #define R123_USE_EMMINTRIN_H 0 #endif #ifndef R123_USE_SMMINTRIN_H #define R123_USE_SMMINTRIN_H 0 #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 0 #endif #ifndef R123_USE_INTRIN_H #define R123_USE_INTRIN_H 0 #endif #ifndef R123_USE_MULHILO16_ASM #define R123_USE_MULHILO16_ASM 0 #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM 0 #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef R123_USE_PHILOX_64BIT #define R123_USE_PHILOX_64BIT 0 #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif // If you add something, it must go in all the other XXfeatures.hpp // and in ../ut_features.cpp #endif neuron-7.5/src/Random123/features/xlcfeatures.h000066400000000000000000000137431323325274500214620ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (c) 2013, Los Alamos National Security, LLC All rights reserved. Copyright 2013. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL. */ #ifndef __xlcfeatures_dot_hpp #define __xlcfeatures_dot_hpp #if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) # error "This code has only been tested on x86 and PowerPC platforms." #include { /* maybe an unbalanced brace will terminate the compilation */ /* Feel free to try the Random123 library on other architectures by changing the conditions that reach this error, but you should consider it a porting exercise and expect to encounter bugs and deficiencies. Please let the authors know of any successes (or failures). */ #endif #ifdef __cplusplus /* builtins are automatically available to xlc. To use them with xlc++, one must include builtins.h. c.f http://publib.boulder.ibm.com/infocenter/cellcomp/v101v121/index.jsp?topic=/com.ibm.xlcpp101.cell.doc/compiler_ref/compiler_builtins.html */ #include #endif #ifndef R123_STATIC_INLINE #define R123_STATIC_INLINE static inline #endif #ifndef R123_FORCE_INLINE #define R123_FORCE_INLINE(decl) decl __attribute__((__always_inline__)) #endif #ifndef R123_CUDA_DEVICE #define R123_CUDA_DEVICE #endif #ifndef R123_ASSERT #include #define R123_ASSERT(x) assert(x) #endif #ifndef R123_BUILTIN_EXPECT #define R123_BUILTIN_EXPECT(expr,likely) __builtin_expect(expr,likely) #endif #ifndef R123_USE_AES_NI #define R123_USE_AES_NI 0 #endif #ifndef R123_USE_SSE4_2 #define R123_USE_SSE4_2 0 #endif #ifndef R123_USE_SSE4_1 #define R123_USE_SSE4_1 0 #endif #ifndef R123_USE_SSE #define R123_USE_SSE 0 #endif #ifndef R123_USE_AES_OPENSSL /* There isn't really a good way to tell at compile time whether openssl is available. Without a pre-compilation configure-like tool, it's less error-prone to guess that it isn't available. Add -DR123_USE_AES_OPENSSL=1 and any necessary LDFLAGS or LDLIBS to play with openssl */ #define R123_USE_AES_OPENSSL 0 #endif #ifndef R123_USE_GNU_UINT128 #define R123_USE_GNU_UINT128 0 #endif #ifndef R123_USE_ASM_GNU #define R123_USE_ASM_GNU 1 #endif #ifndef R123_USE_CPUID_MSVC #define R123_USE_CPUID_MSVC 0 #endif #ifndef R123_USE_X86INTRIN_H #define R123_USE_X86INTRIN_H 0 #endif #ifndef R123_USE_IA32INTRIN_H #define R123_USE_IA32INTRIN_H 0 #endif #ifndef R123_USE_XMMINTRIN_H #define R123_USE_XMMINTRIN_H 0 #endif #ifndef R123_USE_EMMINTRIN_H #define R123_USE_EMMINTRIN_H 0 #endif #ifndef R123_USE_SMMINTRIN_H #define R123_USE_SMMINTRIN_H 0 #endif #ifndef R123_USE_WMMINTRIN_H #define R123_USE_WMMINTRIN_H 0 #endif #ifndef R123_USE_INTRIN_H #ifdef __ABM__ #define R123_USE_INTRIN_H 1 #else #define R123_USE_INTRIN_H 0 #endif #endif #ifndef R123_USE_MULHILO32_ASM #define R123_USE_MULHILO32_ASM 0 #endif #ifndef R123_USE_MULHILO64_MULHI_INTRIN #define R123_USE_MULHILO64_MULHI_INTRIN (defined(__powerpc64__)) #endif #ifndef R123_MULHILO64_MULHI_INTRIN #define R123_MULHILO64_MULHI_INTRIN __mulhdu #endif #ifndef R123_USE_MULHILO32_MULHI_INTRIN #define R123_USE_MULHILO32_MULHI_INTRIN 0 #endif #ifndef R123_MULHILO32_MULHI_INTRIN #define R123_MULHILO32_MULHI_INTRIN __mulhwu #endif #ifndef R123_USE_MULHILO64_ASM #define R123_USE_MULHILO64_ASM (defined(__powerpc64__) && !(R123_USE_MULHILO64_MULHI_INTRIN)) #endif #ifndef R123_USE_MULHILO64_MSVC_INTRIN #define R123_USE_MULHILO64_MSVC_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_CUDA_INTRIN #define R123_USE_MULHILO64_CUDA_INTRIN 0 #endif #ifndef R123_USE_MULHILO64_OPENCL_INTRIN #define R123_USE_MULHILO64_OPENCL_INTRIN 0 #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #include #ifndef UINT64_C #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include #endif /* If you add something, it must go in all the other XXfeatures.hpp and in ../ut_features.cpp */ #endif neuron-7.5/src/Random123/philox.h000066400000000000000000000523671323325274500166270ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _philox_dot_h_ #define _philox_dot_h_ /** \cond HIDDEN_FROM_DOXYGEN */ #include "features/compilerfeatures.h" #include "array.h" /* // Macros _Foo_tpl are code generation 'templates' They define // inline functions with names obtained by mangling Foo and the // macro arguments. E.g., // _mulhilo_tpl(32, uint32_t, uint64_t) // expands to a definition of: // mulhilo32(uint32_t, uint32_t, uint32_t *, uint32_t *) // We then 'instantiate the template' to define // several different functions, e.g., // mulhilo32 // mulhilo64 // These functions will be visible to user code, and may // also be used later in subsequent templates and definitions. // A template for mulhilo using a temporary of twice the word-width. // Gcc figures out that this can be reduced to a single 'mul' instruction, // despite the apparent use of double-wide variables, shifts, etc. It's // obviously not guaranteed that all compilers will be that smart, so // other implementations might be preferable, e.g., using an intrinsic // or an asm block. On the other hand, for 32-bit multiplies, // this *is* perfectly standard C99 - any C99 compiler should // understand it and produce correct code. For 64-bit multiplies, // it's only usable if the compiler recognizes that it can do // arithmetic on a 128-bit type. That happens to be true for gcc on // x86-64, and powerpc64 but not much else. */ #define _mulhilo_dword_tpl(W, Word, Dword) \ R123_CUDA_DEVICE R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word* hip){ \ Dword product = ((Dword)a)*((Dword)b); \ *hip = product>>W; \ return (Word)product; \ } /* // A template for mulhilo using gnu-style asm syntax. // INSN can be "mulw", "mull" or "mulq". // FIXME - porting to other architectures, we'll need still-more conditional // branching here. Note that intrinsics are usually preferable. */ #ifdef __powerpc__ #define _mulhilo_asm_tpl(W, Word, INSN) \ R123_STATIC_INLINE Word mulhilo##W(Word ax, Word b, Word *hip){ \ Word dx = 0; \ __asm__("\n\t" \ INSN " %0,%1,%2\n\t" \ : "=r"(dx) \ : "r"(b), "r"(ax) \ ); \ *hip = dx; \ return ax*b; \ } #else #define _mulhilo_asm_tpl(W, Word, INSN) \ R123_STATIC_INLINE Word mulhilo##W(Word ax, Word b, Word *hip){ \ Word dx; \ __asm__("\n\t" \ INSN " %2\n\t" \ : "=a"(ax), "=d"(dx) \ : "r"(b), "0"(ax) \ ); \ *hip = dx; \ return ax; \ } #endif /* __powerpc__ */ /* // A template for mulhilo using MSVC-style intrinsics // For example,_umul128 is an msvc intrinsic, c.f. // http://msdn.microsoft.com/en-us/library/3dayytw9.aspx */ #define _mulhilo_msvc_intrin_tpl(W, Word, INTRIN) \ R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word* hip){ \ return INTRIN(a, b, hip); \ } /* N.B. This really should be called _mulhilo_mulhi_intrin. It just happens that CUDA was the first time we used the idiom. */ #define _mulhilo_cuda_intrin_tpl(W, Word, INTRIN) \ R123_CUDA_DEVICE R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word* hip){ \ *hip = INTRIN(a, b); \ return a*b; \ } /* // A template for mulhilo using only word-size operations and // C99 operators (no adc, no mulhi). It // requires four multiplies and a dozen or so shifts, adds // and tests. It's not clear what this is good for, other than // completeness. On 32-bit platforms, it could be used to // implement philoxNx64, but on such platforms both the philoxNx32 // and the threefryNx64 cbrngs are going to have much better // performance. It is enabled below by R123_USE_MULHILO64_C99, // but that is currently (Sep 2011) not set by any of the // features/XXfeatures.h headers. It can, of course, be // set with a compile-time -D option. */ #define _mulhilo_c99_tpl(W, Word) \ R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word *hip){ \ const unsigned WHALF = W/2; \ const Word LOMASK = ((((Word)1)<>WHALF; \ Word alo = a& LOMASK; \ Word bhi = b>>WHALF; \ Word blo = b& LOMASK; \ \ Word ahbl = ahi*blo; \ Word albh = alo*bhi; \ \ Word ahbl_albh = ((ahbl&LOMASK) + (albh&LOMASK)); \ Word hi = ahi*bhi + (ahbl>>WHALF) + (albh>>WHALF); \ hi += ahbl_albh >> WHALF; /* carry from the sum of lo(ahbl) + lo(albh) ) */ \ /* carry from the sum with alo*blo */ \ hi += ((lo >> WHALF) < (ahbl_albh&LOMASK)); \ *hip = hi; \ return lo; \ } /* // A template for mulhilo on a platform that can't do it // We could put a C version here, but is it better to run *VERY* // slowly or to just stop and force the user to find another CBRNG? */ #define _mulhilo_fail_tpl(W, Word) \ R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word *hip){ \ R123_STATIC_ASSERT(0, "mulhilo" #W " is not implemented on this machine\n"); \ } /* // N.B. There's an MSVC intrinsic called _emul, // which *might* compile into better code than // _mulhilo_dword_tpl */ #if R123_USE_MULHILO32_ASM #ifdef __powerpc__ _mulhilo_asm_tpl(32, uint32_t, "mulhwu") #else _mulhilo_asm_tpl(32, uint32_t, "mull") #endif /* __powerpc__ */ #else _mulhilo_dword_tpl(32, uint32_t, uint64_t) #endif #if R123_USE_PHILOX_64BIT #if R123_USE_MULHILO64_ASM #ifdef __powerpc64__ _mulhilo_asm_tpl(64, uint64_t, "mulhdu") #else _mulhilo_asm_tpl(64, uint64_t, "mulq") #endif /* __powerpc64__ */ #elif R123_USE_MULHILO64_MSVC_INTRIN _mulhilo_msvc_intrin_tpl(64, uint64_t, _umul128) #elif R123_USE_MULHILO64_CUDA_INTRIN _mulhilo_cuda_intrin_tpl(64, uint64_t, __umul64hi) #elif R123_USE_MULHILO64_OPENCL_INTRIN _mulhilo_cuda_intrin_tpl(64, uint64_t, mul_hi) #elif R123_USE_MULHILO64_MULHI_INTRIN _mulhilo_cuda_intrin_tpl(64, uint64_t, R123_MULHILO64_MULHI_INTRIN) #elif R123_USE_GNU_UINT128 _mulhilo_dword_tpl(64, uint64_t, __uint128_t) #elif R123_USE_MULHILO64_C99 _mulhilo_c99_tpl(64, uint64_t) #else _mulhilo_fail_tpl(64, uint64_t) #endif #endif /* // The multipliers and Weyl constants are "hard coded". // To change them, you can #define them with different // values before #include-ing this file. // This isn't terribly elegant, but it works for C as // well as C++. A nice C++-only solution would be to // use template parameters in the style of */ #ifndef PHILOX_M2x64_0 #define PHILOX_M2x64_0 R123_64BIT(0xD2B74407B1CE6E93) #endif #ifndef PHILOX_M4x64_0 #define PHILOX_M4x64_0 R123_64BIT(0xD2E7470EE14C6C93) #endif #ifndef PHILOX_M4x64_1 #define PHILOX_M4x64_1 R123_64BIT(0xCA5A826395121157) #endif #ifndef PHILOX_M2x32_0 #define PHILOX_M2x32_0 ((uint32_t)0xd256d193) #endif #ifndef PHILOX_M4x32_0 #define PHILOX_M4x32_0 ((uint32_t)0xD2511F53) #endif #ifndef PHILOX_M4x32_1 #define PHILOX_M4x32_1 ((uint32_t)0xCD9E8D57) #endif #ifndef PHILOX_W64_0 #define PHILOX_W64_0 R123_64BIT(0x9E3779B97F4A7C15) /* golden ratio */ #endif #ifndef PHILOX_W64_1 #define PHILOX_W64_1 R123_64BIT(0xBB67AE8584CAA73B) /* sqrt(3)-1 */ #endif #ifndef PHILOX_W32_0 #define PHILOX_W32_0 ((uint32_t)0x9E3779B9) #endif #ifndef PHILOX_W32_1 #define PHILOX_W32_1 ((uint32_t)0xBB67AE85) #endif #ifndef PHILOX2x32_DEFAULT_ROUNDS #define PHILOX2x32_DEFAULT_ROUNDS 10 #endif #ifndef PHILOX2x64_DEFAULT_ROUNDS #define PHILOX2x64_DEFAULT_ROUNDS 10 #endif #ifndef PHILOX4x32_DEFAULT_ROUNDS #define PHILOX4x32_DEFAULT_ROUNDS 10 #endif #ifndef PHILOX4x64_DEFAULT_ROUNDS #define PHILOX4x64_DEFAULT_ROUNDS 10 #endif /* The ignored fourth argument allows us to instantiate the same macro regardless of N. */ #define _philox2xWround_tpl(W, T) \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(struct r123array2x##W _philox2x##W##round(struct r123array2x##W ctr, struct r123array1x##W key)); \ R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array2x##W _philox2x##W##round(struct r123array2x##W ctr, struct r123array1x##W key){ \ T hi; \ T lo = mulhilo##W(PHILOX_M2x##W##_0, ctr.v[0], &hi); \ struct r123array2x##W out = {{hi^key.v[0]^ctr.v[1], lo}}; \ return out; \ } #define _philox2xWbumpkey_tpl(W) \ R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array1x##W _philox2x##W##bumpkey( struct r123array1x##W key) { \ key.v[0] += PHILOX_W##W##_0; \ return key; \ } #define _philox4xWround_tpl(W, T) \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(struct r123array4x##W _philox4x##W##round(struct r123array4x##W ctr, struct r123array2x##W key)); \ R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array4x##W _philox4x##W##round(struct r123array4x##W ctr, struct r123array2x##W key){ \ T hi0; \ T hi1; \ T lo0 = mulhilo##W(PHILOX_M4x##W##_0, ctr.v[0], &hi0); \ T lo1 = mulhilo##W(PHILOX_M4x##W##_1, ctr.v[2], &hi1); \ struct r123array4x##W out = {{hi1^ctr.v[1]^key.v[0], lo1, \ hi0^ctr.v[3]^key.v[1], lo0}}; \ return out; \ } #define _philox4xWbumpkey_tpl(W) \ R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array2x##W _philox4x##W##bumpkey( struct r123array2x##W key) { \ key.v[0] += PHILOX_W##W##_0; \ key.v[1] += PHILOX_W##W##_1; \ return key; \ } #define _philoxNxW_tpl(N, Nhalf, W, T) \ /** @ingroup PhiloxNxW */ \ enum r123_enum_philox##N##x##W { philox##N##x##W##_rounds = PHILOX##N##x##W##_DEFAULT_ROUNDS }; \ typedef struct r123array##N##x##W philox##N##x##W##_ctr_t; \ typedef struct r123array##Nhalf##x##W philox##N##x##W##_key_t; \ typedef struct r123array##Nhalf##x##W philox##N##x##W##_ukey_t; \ R123_CUDA_DEVICE R123_STATIC_INLINE philox##N##x##W##_key_t philox##N##x##W##keyinit(philox##N##x##W##_ukey_t uk) { return uk; } \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(philox##N##x##W##_ctr_t philox##N##x##W##_R(unsigned int R, philox##N##x##W##_ctr_t ctr, philox##N##x##W##_key_t key)); \ R123_CUDA_DEVICE R123_STATIC_INLINE philox##N##x##W##_ctr_t philox##N##x##W##_R(unsigned int R, philox##N##x##W##_ctr_t ctr, philox##N##x##W##_key_t key) { \ R123_ASSERT(R<=16); \ if(R>0){ ctr = _philox##N##x##W##round(ctr, key); } \ if(R>1){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>2){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>3){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>4){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>5){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>6){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>7){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>8){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>9){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>10){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>11){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>12){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>13){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>14){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ if(R>15){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \ return ctr; \ } _philox2xWbumpkey_tpl(32) _philox4xWbumpkey_tpl(32) _philox2xWround_tpl(32, uint32_t) /* philo2x32round */ _philox4xWround_tpl(32, uint32_t) /* philo4x32round */ /** \endcond */ _philoxNxW_tpl(2, 1, 32, uint32_t) /* philox2x32bijection */ _philoxNxW_tpl(4, 2, 32, uint32_t) /* philox4x32bijection */ #if R123_USE_PHILOX_64BIT /** \cond HIDDEN_FROM_DOXYGEN */ _philox2xWbumpkey_tpl(64) _philox4xWbumpkey_tpl(64) _philox2xWround_tpl(64, uint64_t) /* philo2x64round */ _philox4xWround_tpl(64, uint64_t) /* philo4x64round */ /** \endcond */ _philoxNxW_tpl(2, 1, 64, uint64_t) /* philox2x64bijection */ _philoxNxW_tpl(4, 2, 64, uint64_t) /* philox4x64bijection */ #endif /* R123_USE_PHILOX_64BIT */ #define philox2x32(c,k) philox2x32_R(philox2x32_rounds, c, k) #define philox4x32(c,k) philox4x32_R(philox4x32_rounds, c, k) #if R123_USE_PHILOX_64BIT #define philox2x64(c,k) philox2x64_R(philox2x64_rounds, c, k) #define philox4x64(c,k) philox4x64_R(philox4x64_rounds, c, k) #endif /* R123_USE_PHILOX_64BIT */ #ifdef __cplusplus #include /** \cond HIDDEN_FROM_DOXYGEN */ #define _PhiloxNxW_base_tpl(CType, KType, N, W) \ namespace r123{ \ template \ struct Philox##N##x##W##_R{ \ typedef CType ctr_type; \ typedef KType key_type; \ typedef KType ukey_type; \ static const unsigned int rounds=ROUNDS; \ inline R123_CUDA_DEVICE R123_FORCE_INLINE(ctr_type operator()(ctr_type ctr, key_type key) const){ \ R123_STATIC_ASSERT(ROUNDS<=16, "philox is only unrolled up to 16 rounds\n"); \ return philox##N##x##W##_R(ROUNDS, ctr, key); \ } \ }; \ typedef Philox##N##x##W##_R Philox##N##x##W; \ } // namespace r123 /** \endcond */ _PhiloxNxW_base_tpl(r123array2x32, r123array1x32, 2, 32) // Philox2x32_R _PhiloxNxW_base_tpl(r123array4x32, r123array2x32, 4, 32) // Philox4x32_R #if R123_USE_PHILOX_64BIT _PhiloxNxW_base_tpl(r123array2x64, r123array1x64, 2, 64) // Philox2x64_R _PhiloxNxW_base_tpl(r123array4x64, r123array2x64, 4, 64) // Philox4x64_R #endif /* The _tpl macros don't quite work to do string-pasting inside comments. so we just write out the boilerplate documentation four times... */ /** @defgroup PhiloxNxW Philox Classes and Typedefs The PhiloxNxW classes export the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. As described in Parallel Random Numbers: As Easy as 1, 2, 3 . The Philox family of counter-based RNGs use integer multiplication, xor and permutation of W-bit words to scramble its N-word input key. Philox is a mnemonic for Product HI LO Xor). @class r123::Philox2x32_R @ingroup PhiloxNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Philox round function will be applied. As of November 2011, the authors know of no statistical flaws with ROUNDS=6 or more for Philox2x32. @typedef r123::Philox2x32 @ingroup PhiloxNxW Philox2x32 is equivalent to Philox2x32_R<10>. With 10 rounds, Philox2x32 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. @class r123::Philox2x64_R @ingroup PhiloxNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Philox round function will be applied. As of September 2011, the authors know of no statistical flaws with ROUNDS=6 or more for Philox2x64. @typedef r123::Philox2x64 @ingroup PhiloxNxW Philox2x64 is equivalent to Philox2x64_R<10>. With 10 rounds, Philox2x64 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. @class r123::Philox4x32_R @ingroup PhiloxNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Philox round function will be applied. In November 2011, the authors recorded some suspicious p-values (approximately 1.e-7) from some very long (longer than the default BigCrush length) SimpPoker tests. Despite the fact that even longer tests reverted to "passing" p-values, a cloud remains over Philox4x32 with 7 rounds. The authors know of no statistical flaws with ROUNDS=8 or more for Philox4x32. @typedef r123::Philox4x32 @ingroup PhiloxNxW Philox4x32 is equivalent to Philox4x32_R<10>. With 10 rounds, Philox4x32 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. @class r123::Philox4x64_R @ingroup PhiloxNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Philox round function will be applied. As of September 2011, the authors know of no statistical flaws with ROUNDS=7 or more for Philox4x64. @typedef r123::Philox4x64 @ingroup PhiloxNxW Philox4x64 is equivalent to Philox4x64_R<10>. With 10 rounds, Philox4x64 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. */ #endif /* __cplusplus */ #endif /* _philox_dot_h_ */ neuron-7.5/src/Random123/threefry.h000066400000000000000000001526661323325274500171570ustar00rootroot00000000000000/* Copyright 2010-2011, D. E. Shaw Research. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _threefry_dot_h_ #define _threefry_dot_h_ #include "features/compilerfeatures.h" #include "array.h" /** \cond HIDDEN_FROM_DOXYGEN */ /* Significant parts of this file were copied from from: Skein_FinalRnd/ReferenceImplementation/skein.h Skein_FinalRnd/ReferenceImplementation/skein_block.c in http://csrc.nist.gov/groups/ST/hash/sha-3/Round3/documents/Skein_FinalRnd.zip This file has been modified so that it may no longer perform its originally intended function. If you're looking for a Skein or Threefish source code, please consult the original file. The original file had the following header: ************************************************************************** ** ** Interface declarations and internal definitions for Skein hashing. ** ** Source code author: Doug Whiting, 2008. ** ** This algorithm and source code is released to the public domain. ** *************************************************************************** */ /* See comment at the top of philox.h for the macro pre-process strategy. */ /* Rotation constants: */ enum r123_enum_threefry64x4 { /* These are the R_256 constants from the Threefish reference sources with names changed to R_64x4... */ R_64x4_0_0=14, R_64x4_0_1=16, R_64x4_1_0=52, R_64x4_1_1=57, R_64x4_2_0=23, R_64x4_2_1=40, R_64x4_3_0= 5, R_64x4_3_1=37, R_64x4_4_0=25, R_64x4_4_1=33, R_64x4_5_0=46, R_64x4_5_1=12, R_64x4_6_0=58, R_64x4_6_1=22, R_64x4_7_0=32, R_64x4_7_1=32 }; enum r123_enum_threefry64x2 { /* // Output from skein_rot_search: (srs64_B64-X1000) // Random seed = 1. BlockSize = 128 bits. sampleCnt = 1024. rounds = 8, minHW_or=57 // Start: Tue Mar 1 10:07:48 2011 // rMin = 0.136. #0325[*15] [CRC=455A682F. hw_OR=64. cnt=16384. blkSize= 128].format */ R_64x2_0_0=16, R_64x2_1_0=42, R_64x2_2_0=12, R_64x2_3_0=31, R_64x2_4_0=16, R_64x2_5_0=32, R_64x2_6_0=24, R_64x2_7_0=21 /* 4 rounds: minHW = 4 [ 4 4 4 4 ] // 5 rounds: minHW = 8 [ 8 8 8 8 ] // 6 rounds: minHW = 16 [ 16 16 16 16 ] // 7 rounds: minHW = 32 [ 32 32 32 32 ] // 8 rounds: minHW = 64 [ 64 64 64 64 ] // 9 rounds: minHW = 64 [ 64 64 64 64 ] //10 rounds: minHW = 64 [ 64 64 64 64 ] //11 rounds: minHW = 64 [ 64 64 64 64 ] */ }; enum r123_enum_threefry32x4 { /* Output from skein_rot_search: (srs-B128-X5000.out) // Random seed = 1. BlockSize = 64 bits. sampleCnt = 1024. rounds = 8, minHW_or=28 // Start: Mon Aug 24 22:41:36 2009 // ... // rMin = 0.472. #0A4B[*33] [CRC=DD1ECE0F. hw_OR=31. cnt=16384. blkSize= 128].format */ R_32x4_0_0=10, R_32x4_0_1=26, R_32x4_1_0=11, R_32x4_1_1=21, R_32x4_2_0=13, R_32x4_2_1=27, R_32x4_3_0=23, R_32x4_3_1= 5, R_32x4_4_0= 6, R_32x4_4_1=20, R_32x4_5_0=17, R_32x4_5_1=11, R_32x4_6_0=25, R_32x4_6_1=10, R_32x4_7_0=18, R_32x4_7_1=20 /* 4 rounds: minHW = 3 [ 3 3 3 3 ] // 5 rounds: minHW = 7 [ 7 7 7 7 ] // 6 rounds: minHW = 12 [ 13 12 13 12 ] // 7 rounds: minHW = 22 [ 22 23 22 23 ] // 8 rounds: minHW = 31 [ 31 31 31 31 ] // 9 rounds: minHW = 32 [ 32 32 32 32 ] //10 rounds: minHW = 32 [ 32 32 32 32 ] //11 rounds: minHW = 32 [ 32 32 32 32 ] */ }; enum r123_enum_threefry32x2 { /* Output from skein_rot_search (srs32x2-X5000.out) // Random seed = 1. BlockSize = 64 bits. sampleCnt = 1024. rounds = 8, minHW_or=28 // Start: Tue Jul 12 11:11:33 2011 // rMin = 0.334. #0206[*07] [CRC=1D9765C0. hw_OR=32. cnt=16384. blkSize= 64].format */ R_32x2_0_0=13, R_32x2_1_0=15, R_32x2_2_0=26, R_32x2_3_0= 6, R_32x2_4_0=17, R_32x2_5_0=29, R_32x2_6_0=16, R_32x2_7_0=24 /* 4 rounds: minHW = 4 [ 4 4 4 4 ] // 5 rounds: minHW = 6 [ 6 8 6 8 ] // 6 rounds: minHW = 9 [ 9 12 9 12 ] // 7 rounds: minHW = 16 [ 16 24 16 24 ] // 8 rounds: minHW = 32 [ 32 32 32 32 ] // 9 rounds: minHW = 32 [ 32 32 32 32 ] //10 rounds: minHW = 32 [ 32 32 32 32 ] //11 rounds: minHW = 32 [ 32 32 32 32 ] */ }; enum r123_enum_threefry_wcnt { WCNT2=2, WCNT4=4 }; R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(uint64_t RotL_64(uint64_t x, unsigned int N)); R123_CUDA_DEVICE R123_STATIC_INLINE uint64_t RotL_64(uint64_t x, unsigned int N) { return (x << (N & 63)) | (x >> ((64-N) & 63)); } R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(uint32_t RotL_32(uint32_t x, unsigned int N)); R123_CUDA_DEVICE R123_STATIC_INLINE uint32_t RotL_32(uint32_t x, unsigned int N) { return (x << (N & 31)) | (x >> ((32-N) & 31)); } #define SKEIN_MK_64(hi32,lo32) ((lo32) + (((uint64_t) (hi32)) << 32)) #define SKEIN_KS_PARITY64 SKEIN_MK_64(0x1BD11BDA,0xA9FC1A22) #define SKEIN_KS_PARITY32 0x1BD11BDA #ifndef THREEFRY2x32_DEFAULT_ROUNDS #define THREEFRY2x32_DEFAULT_ROUNDS 20 #endif #ifndef THREEFRY2x64_DEFAULT_ROUNDS #define THREEFRY2x64_DEFAULT_ROUNDS 20 #endif #ifndef THREEFRY4x32_DEFAULT_ROUNDS #define THREEFRY4x32_DEFAULT_ROUNDS 20 #endif #ifndef THREEFRY4x64_DEFAULT_ROUNDS #define THREEFRY4x64_DEFAULT_ROUNDS 20 #endif #define _threefry2x_tpl(W) \ typedef struct r123array2x##W threefry2x##W##_ctr_t; \ typedef struct r123array2x##W threefry2x##W##_key_t; \ typedef struct r123array2x##W threefry2x##W##_ukey_t; \ R123_CUDA_DEVICE R123_STATIC_INLINE threefry2x##W##_key_t threefry2x##W##keyinit(threefry2x##W##_ukey_t uk) { return uk; } \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(threefry2x##W##_ctr_t threefry2x##W##_R(unsigned int Nrounds, threefry2x##W##_ctr_t in, threefry2x##W##_key_t k)); \ R123_CUDA_DEVICE R123_STATIC_INLINE \ threefry2x##W##_ctr_t threefry2x##W##_R(unsigned int Nrounds, threefry2x##W##_ctr_t in, threefry2x##W##_key_t k){ \ threefry2x##W##_ctr_t X; \ uint##W##_t ks[2+1]; \ int i; /* avoid size_t to avoid need for stddef.h */ \ R123_ASSERT(Nrounds<=32); \ ks[2] = SKEIN_KS_PARITY##W; \ for (i=0;i < 2; i++) \ { \ ks[i] = k.v[i]; \ X.v[i] = in.v[i]; \ ks[2] ^= k.v[i]; \ } \ \ /* Insert initial key before round 0 */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; \ \ if(Nrounds>0){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_0_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>1){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_1_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>2){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_2_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>3){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_3_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>3){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; \ X.v[1] += 1; /* X.v[2-1] += r */ \ } \ if(Nrounds>4){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_4_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>5){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_5_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>6){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_6_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>7){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_7_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>7){ \ /* InjectKey(r=2) */ \ X.v[0] += ks[2]; X.v[1] += ks[0]; \ X.v[1] += 2; \ } \ if(Nrounds>8){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_0_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>9){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_1_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>10){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_2_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>11){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_3_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>11){ \ /* InjectKey(r=3) */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; \ X.v[1] += 3; \ } \ if(Nrounds>12){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_4_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>13){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_5_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>14){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_6_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>15){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_7_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>15){ \ /* InjectKey(r=4) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; \ X.v[1] += 4; \ } \ if(Nrounds>16){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_0_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>17){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_1_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>18){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_2_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>19){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_3_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>19){ \ /* InjectKey(r=5) */ \ X.v[0] += ks[2]; X.v[1] += ks[0]; \ X.v[1] += 5; \ } \ if(Nrounds>20){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_4_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>21){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_5_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>22){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_6_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>23){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_7_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>23){ \ /* InjectKey(r=6) */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; \ X.v[1] += 6; \ } \ if(Nrounds>24){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_0_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>25){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_1_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>26){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_2_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>27){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_3_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>27){ \ /* InjectKey(r=7) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; \ X.v[1] += 7; \ } \ if(Nrounds>28){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_4_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>29){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_5_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>30){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_6_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>31){ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x2_7_0); X.v[1] ^= X.v[0]; } \ if(Nrounds>31){ \ /* InjectKey(r=8) */ \ X.v[0] += ks[2]; X.v[1] += ks[0]; \ X.v[1] += 8; \ } \ return X; \ } \ /** @ingroup ThreefryNxW */ \ enum r123_enum_threefry2x##W { threefry2x##W##_rounds = THREEFRY2x##W##_DEFAULT_ROUNDS }; \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(threefry2x##W##_ctr_t threefry2x##W(threefry2x##W##_ctr_t in, threefry2x##W##_key_t k)); \ R123_CUDA_DEVICE R123_STATIC_INLINE \ threefry2x##W##_ctr_t threefry2x##W(threefry2x##W##_ctr_t in, threefry2x##W##_key_t k){ \ return threefry2x##W##_R(threefry2x##W##_rounds, in, k); \ } #define _threefry4x_tpl(W) \ typedef struct r123array4x##W threefry4x##W##_ctr_t; \ typedef struct r123array4x##W threefry4x##W##_key_t; \ typedef struct r123array4x##W threefry4x##W##_ukey_t; \ R123_CUDA_DEVICE R123_STATIC_INLINE threefry4x##W##_key_t threefry4x##W##keyinit(threefry4x##W##_ukey_t uk) { return uk; } \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(threefry4x##W##_ctr_t threefry4x##W##_R(unsigned int Nrounds, threefry4x##W##_ctr_t in, threefry4x##W##_key_t k)); \ R123_CUDA_DEVICE R123_STATIC_INLINE \ threefry4x##W##_ctr_t threefry4x##W##_R(unsigned int Nrounds, threefry4x##W##_ctr_t in, threefry4x##W##_key_t k){ \ threefry4x##W##_ctr_t X; \ uint##W##_t ks[4+1]; \ int i; /* avoid size_t to avoid need for stddef.h */ \ R123_ASSERT(Nrounds<=72); \ ks[4] = SKEIN_KS_PARITY##W; \ for (i=0;i < 4; i++) \ { \ ks[i] = k.v[i]; \ X.v[i] = in.v[i]; \ ks[4] ^= k.v[i]; \ } \ \ /* Insert initial key before round 0 */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; X.v[2] += ks[2]; X.v[3] += ks[3]; \ \ if(Nrounds>0){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>1){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>2){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>3){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>3){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; X.v[2] += ks[3]; X.v[3] += ks[4]; \ X.v[4-1] += 1; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>4){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>5){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>6){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>7){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>7){ \ /* InjectKey(r=2) */ \ X.v[0] += ks[2]; X.v[1] += ks[3]; X.v[2] += ks[4]; X.v[3] += ks[0]; \ X.v[4-1] += 2; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>8){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>9){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>10){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>11){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>11){ \ /* InjectKey(r=3) */ \ X.v[0] += ks[3]; X.v[1] += ks[4]; X.v[2] += ks[0]; X.v[3] += ks[1]; \ X.v[4-1] += 3; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>12){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>13){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>14){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>15){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>15){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[4]; X.v[1] += ks[0]; X.v[2] += ks[1]; X.v[3] += ks[2]; \ X.v[4-1] += 4; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>16){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>17){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>18){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>19){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>19){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; X.v[2] += ks[2]; X.v[3] += ks[3]; \ X.v[4-1] += 5; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>20){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>21){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>22){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>23){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>23){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; X.v[2] += ks[3]; X.v[3] += ks[4]; \ X.v[4-1] += 6; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>24){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>25){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>26){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>27){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>27){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[2]; X.v[1] += ks[3]; X.v[2] += ks[4]; X.v[3] += ks[0]; \ X.v[4-1] += 7; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>28){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>29){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>30){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>31){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>31){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[3]; X.v[1] += ks[4]; X.v[2] += ks[0]; X.v[3] += ks[1]; \ X.v[4-1] += 8; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>32){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>33){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>34){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>35){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>35){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[4]; X.v[1] += ks[0]; X.v[2] += ks[1]; X.v[3] += ks[2]; \ X.v[4-1] += 9; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>36){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>37){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>38){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>39){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>39){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; X.v[2] += ks[2]; X.v[3] += ks[3]; \ X.v[4-1] += 10; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>40){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>41){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>42){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>43){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>43){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; X.v[2] += ks[3]; X.v[3] += ks[4]; \ X.v[4-1] += 11; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>44){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>45){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>46){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>47){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>47){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[2]; X.v[1] += ks[3]; X.v[2] += ks[4]; X.v[3] += ks[0]; \ X.v[4-1] += 12; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>48){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>49){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>50){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>51){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>51){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[3]; X.v[1] += ks[4]; X.v[2] += ks[0]; X.v[3] += ks[1]; \ X.v[4-1] += 13; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>52){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>53){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>54){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>55){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>55){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[4]; X.v[1] += ks[0]; X.v[2] += ks[1]; X.v[3] += ks[2]; \ X.v[4-1] += 14; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>56){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>57){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>58){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>59){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>59){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[0]; X.v[1] += ks[1]; X.v[2] += ks[2]; X.v[3] += ks[3]; \ X.v[4-1] += 15; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>60){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>61){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>62){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>63){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>63){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[1]; X.v[1] += ks[2]; X.v[2] += ks[3]; X.v[3] += ks[4]; \ X.v[4-1] += 16; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>64){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_0_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_0_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>65){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_1_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_1_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>66){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_2_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_2_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>67){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_3_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_3_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>67){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[2]; X.v[1] += ks[3]; X.v[2] += ks[4]; X.v[3] += ks[0]; \ X.v[4-1] += 17; /* X.v[WCNT4-1] += r */ \ } \ \ if(Nrounds>68){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_4_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_4_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>69){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_5_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_5_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>70){ \ X.v[0] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_6_0); X.v[1] ^= X.v[0]; \ X.v[2] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_6_1); X.v[3] ^= X.v[2]; \ } \ if(Nrounds>71){ \ X.v[0] += X.v[3]; X.v[3] = RotL_##W(X.v[3],R_##W##x4_7_0); X.v[3] ^= X.v[0]; \ X.v[2] += X.v[1]; X.v[1] = RotL_##W(X.v[1],R_##W##x4_7_1); X.v[1] ^= X.v[2]; \ } \ if(Nrounds>71){ \ /* InjectKey(r=1) */ \ X.v[0] += ks[3]; X.v[1] += ks[4]; X.v[2] += ks[0]; X.v[3] += ks[1]; \ X.v[4-1] += 18; /* X.v[WCNT4-1] += r */ \ } \ \ return X; \ } \ /** @ingroup ThreefryNxW */ \ enum r123_enum_threefry4x##W { threefry4x##W##_rounds = THREEFRY4x##W##_DEFAULT_ROUNDS }; \ R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(threefry4x##W##_ctr_t threefry4x##W(threefry4x##W##_ctr_t in, threefry4x##W##_key_t k)); \ R123_CUDA_DEVICE R123_STATIC_INLINE \ threefry4x##W##_ctr_t threefry4x##W(threefry4x##W##_ctr_t in, threefry4x##W##_key_t k){ \ return threefry4x##W##_R(threefry4x##W##_rounds, in, k); \ } /** \endcond */ _threefry2x_tpl(64) _threefry2x_tpl(32) _threefry4x_tpl(64) _threefry4x_tpl(32) /* gcc4.5 and 4.6 seem to optimize a macro-ized threefryNxW better than a static inline function. Why? */ #define threefry2x32(c,k) threefry2x32_R(threefry2x32_rounds, c, k) #define threefry4x32(c,k) threefry4x32_R(threefry4x32_rounds, c, k) #define threefry2x64(c,k) threefry2x64_R(threefry2x64_rounds, c, k) #define threefry4x64(c,k) threefry4x64_R(threefry4x64_rounds, c, k) #ifdef __cplusplus /** \cond HIDDEN_FROM_DOXYGEN */ #define _threefryNxWclass_tpl(NxW) \ namespace r123{ \ template \ struct Threefry##NxW##_R{ \ typedef threefry##NxW##_ctr_t ctr_type; \ typedef threefry##NxW##_key_t key_type; \ typedef threefry##NxW##_key_t ukey_type; \ static const unsigned int rounds=R; \ inline R123_CUDA_DEVICE R123_FORCE_INLINE(ctr_type operator()(ctr_type ctr, key_type key)){ \ R123_STATIC_ASSERT(R<=72, "threefry is only unrolled up to 72 rounds\n"); \ return threefry##NxW##_R(R, ctr, key); \ } \ }; \ typedef Threefry##NxW##_R Threefry##NxW; \ } // namespace r123 /** \endcond */ _threefryNxWclass_tpl(2x32) _threefryNxWclass_tpl(4x32) _threefryNxWclass_tpl(2x64) _threefryNxWclass_tpl(4x64) /* The _tpl macros don't quite work to do string-pasting inside comments. so we just write out the boilerplate documentation four times... */ /** @defgroup ThreefryNxW Threefry Classes and Typedefs The ThreefryNxW classes export the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. As described in Parallel Random Numbers: As Easy as 1, 2, 3 , the Threefry family is closely related to the Threefish block cipher from Skein Hash Function. Threefry is \b not suitable for cryptographic use. Threefry uses integer addition, bitwise rotation, xor and permutation of words to randomize its output. @class r123::Threefry2x32_R @ingroup ThreefryNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Threefry round function will be applied. As of September 2011, the authors know of no statistical flaws with ROUNDS=13 or more for Threefry2x32. @typedef r123::Threefry2x32 @ingroup ThreefryNxW Threefry2x32 is equivalent to Threefry2x32_R<20>. With 20 rounds, Threefry2x32 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. @class r123::Threefry2x64_R @ingroup ThreefryNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Threefry round function will be applied. In November 2011, the authors discovered that 13 rounds of Threefry2x64 sequenced by strided, interleaved key and counter increments failed a very long (longer than the default BigCrush length) WeightDistrub test. At the same time, it was confirmed that 14 rounds passes much longer tests (up to 5x10^12 samples) of a similar nature. The authors know of no statistical flaws with ROUNDS=14 or more for Threefry2x64. @typedef r123::Threefry2x64 @ingroup ThreefryNxW Threefry2x64 is equivalent to Threefry2x64_R<20>. With 20 rounds, Threefry2x64 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. @class r123::Threefry4x32_R @ingroup ThreefryNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Threefry round function will be applied. As of September 2011, the authors know of no statistical flaws with ROUNDS=12 or more for Threefry4x32. @typedef r123::Threefry4x32 @ingroup ThreefryNxW Threefry4x32 is equivalent to Threefry4x32_R<20>. With 20 rounds, Threefry4x32 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. @class r123::Threefry4x64_R @ingroup ThreefryNxW exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class. The template argument, ROUNDS, is the number of times the Threefry round function will be applied. As of September 2011, the authors know of no statistical flaws with ROUNDS=12 or more for Threefry4x64. @typedef r123::Threefry4x64 @ingroup ThreefryNxW Threefry4x64 is equivalent to Threefry4x64_R<20>. With 20 rounds, Threefry4x64 has a considerable safety margin over the minimum number of rounds with no known statistical flaws, but still has excellent performance. */ #endif #endif neuron-7.5/src/gnu/000077500000000000000000000000001323325274500142615ustar00rootroot00000000000000neuron-7.5/src/gnu/ACG.cpp000077500000000000000000000221721323325274500153660ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1989 Free Software Foundation This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #ifdef __GNUG__ #pragma implementation #endif #include #include // // This is an extension of the older implementation of Algorithm M // which I previously supplied. The main difference between this // version and the old code are: // // + Andres searched high & low for good constants for // the LCG. // // + theres more bit chopping going on. // // The following contains his comments. // // agn@UNH.CS.CMU.EDU sez.. // // The generator below is based on 2 well known // methods: Linear Congruential (LCGs) and Additive // Congruential generators (ACGs). // // The LCG produces the longest possible sequence // of 32 bit random numbers, each being unique in // that sequence (it has only 32 bits of state). // It suffers from 2 problems: a) Independence // isnt great, that is the (n+1)th number is // somewhat related to the preceding one, unlike // flipping a coin where knowing the past outcomes // dont help to predict the next result. b) // Taking parts of a LCG generated number can be // quite non-random: for example, looking at only // the least significant byte gives a permuted // 8-bit counter (that has a period length of only // 256). The advantage of an LCA is that it is // perfectly uniform when run for the entire period // length (and very uniform for smaller sequences // too, if the parameters are chosen carefully). // // ACGs have extremly long period lengths and // provide good independence. Unfortunately, // uniformity isnt not too great. Furthermore, I // didnt find any theoretically analysis of ACGs // that addresses uniformity. // // The RNG given below will return numbers // generated by an LCA that are permuted under // control of a ACG. 2 permutations take place: the // 4 bytes of one LCG generated number are // subjected to one of 16 permutations selected by // 4 bits of the ACG. The permutation a such that // byte of the result may come from each byte of // the LCG number. This effectively destroys the // structure within a word. Finally, the sequence // of such numbers is permuted within a range of // 256 numbers. This greatly improves independence. // // // Algorithm M as describes in Knuths "Art of Computer Programming", // Vol 2. 1969 // is used with a linear congruential generator (to get a good uniform // distribution) that is permuted with a Fibonacci additive congruential // generator to get good independence. // // Bit, byte, and word distributions were extensively tested and pass // Chi-squared test near perfect scores (>7E8 numbers tested, Uniformity // assumption holds with probability > 0.999) // // Run-up tests for on 7E8 numbers confirm independence with // probability > 0.97. // // Plotting random points in 2d reveals no apparent structure. // // Autocorrelation on sequences of 5E5 numbers (A(i) = SUM X(n)*X(n-i), // i=1..512) // results in no obvious structure (A(i) ~ const). // // Except for speed and memory requirements, this generator outperforms // random() for all tests. (random() scored rather low on uniformity tests, // while independence test differences were less dramatic). // // AGN would like to.. // thanks to M.Mauldin, H.Walker, J.Saxe and M.Molloy for inspiration & help. // // And I would (DGC) would like to thank Donald Kunth for AGN for letting me // use his extensions in this implementation. // // // Part of the table on page 28 of Knuth, vol II. This allows us // to adjust the size of the table at the expense of shorter sequences. // static int randomStateTable[][3] = { {3,7,16}, {4,9, 32}, {3,10, 32}, {1,11, 32}, {1,15,64}, {3,17,128}, {7,18,128}, {3,20,128}, {2,21, 128}, {1,22, 128}, {5,23, 128}, {3,25, 128}, {2,29, 128}, {3,31, 128}, {13,33, 256}, {2,35, 256}, {11,36, 256}, {14,39,256}, {3,41,256}, {9,49,256}, {3,52,256}, {24,55,256}, {7,57, 256}, {19,58,256}, {38,89,512}, {17,95,512}, {6,97,512}, {11,98,512}, {-1,-1,-1} }; // // spatial permutation table // RANDOM_PERM_SIZE must be a power of two // #define RANDOM_PERM_SIZE 64 uint32_t randomPermutations[RANDOM_PERM_SIZE] = { 0xffffffff, 0x00000000, 0x00000000, 0x00000000, // 3210 0x0000ffff, 0x00ff0000, 0x00000000, 0xff000000, // 2310 0xff0000ff, 0x0000ff00, 0x00000000, 0x00ff0000, // 3120 0x00ff00ff, 0x00000000, 0xff00ff00, 0x00000000, // 1230 0xffff0000, 0x000000ff, 0x00000000, 0x0000ff00, // 3201 0x00000000, 0x00ff00ff, 0x00000000, 0xff00ff00, // 2301 0xff000000, 0x00000000, 0x000000ff, 0x00ffff00, // 3102 0x00000000, 0x00000000, 0x00000000, 0xffffffff, // 2103 0xff00ff00, 0x00000000, 0x00ff00ff, 0x00000000, // 3012 0x0000ff00, 0x00000000, 0x00ff0000, 0xff0000ff, // 2013 0x00000000, 0x00000000, 0xffffffff, 0x00000000, // 1032 0x00000000, 0x0000ff00, 0xffff0000, 0x000000ff, // 1023 0x00000000, 0xffffffff, 0x00000000, 0x00000000, // 0321 0x00ffff00, 0xff000000, 0x00000000, 0x000000ff, // 0213 0x00000000, 0xff000000, 0x0000ffff, 0x00ff0000, // 0132 0x00000000, 0xff00ff00, 0x00000000, 0x00ff00ff // 0123 }; // // SEED_TABLE_SIZE must be a power of 2 // #define SEED_TABLE_SIZE 32 static uint32_t seedTable[SEED_TABLE_SIZE] = { 0xbdcc47e5, 0x54aea45d, 0xec0df859, 0xda84637b, 0xc8c6cb4f, 0x35574b01, 0x28260b7d, 0x0d07fdbf, 0x9faaeeb0, 0x613dd169, 0x5ce2d818, 0x85b9e706, 0xab2469db, 0xda02b0dc, 0x45c60d6e, 0xffe49d10, 0x7224fea3, 0xf9684fc9, 0xfc7ee074, 0x326ce92a, 0x366d13b5, 0x17aaa731, 0xeb83a675, 0x7781cb32, 0x4ec7c92d, 0x7f187521, 0x2cf346b4, 0xad13310f, 0xb89cff2b, 0x12164de1, 0xa865168d, 0x32b56cdf }; // // The LCG used to scramble the ACG // // // LC-parameter selection follows recommendations in // "Handbook of Mathematical Functions" by Abramowitz & Stegun 10th, edi. // // LC_A = 251^2, ~= sqrt(2^32) = 66049 // LC_C = result of a long trial & error series = 3907864577 // static const uint32_t LC_A = 66049; static const uint32_t LC_C = 3907864577U; static inline uint32_t LCG(uint32_t x) { return( x * LC_A + LC_C ); } ACG::ACG(uint32_t seed, int size) { register int l; initialSeed = seed; // // Determine the size of the state table // for (l = 0; randomStateTable[l][0] != -1 && randomStateTable[l][1] < size; l++); if (randomStateTable[l][1] == -1) { l--; } initialTableEntry = l; stateSize = randomStateTable[ initialTableEntry ][ 1 ]; auxSize = randomStateTable[ initialTableEntry ][ 2 ]; // // Allocate the state table & the auxillary table in a single malloc // state = new uint32_t[stateSize + auxSize]; auxState = &state[stateSize]; reset(); } // // Initialize the state // void ACG::reset() { register uint32_t u; if (initialSeed < SEED_TABLE_SIZE) { u = seedTable[ initialSeed ]; } else { u = initialSeed ^ seedTable[ initialSeed & (SEED_TABLE_SIZE-1) ]; } j = randomStateTable[ initialTableEntry ][ 0 ] - 1; k = randomStateTable[ initialTableEntry ][ 1 ] - 1; register int i; for(i = 0; i < stateSize; i++) { state[i] = u = LCG(u); } for (i = 0; i < auxSize; i++) { auxState[i] = u = LCG(u); } k = u % stateSize; int tailBehind = (stateSize - randomStateTable[ initialTableEntry ][ 0 ]); j = k - tailBehind; if (j < 0) { j += stateSize; } lcgRecurr = u; assert(sizeof(double) == 2 * sizeof(int32_t)); } ACG::~ACG() { if (state) delete [] state; state = 0; // don't delete auxState, it's really an alias for state. } // // Returns 32 bits of random information. // uint32_t ACG::asLong() { uint32_t result = state[k] + state[j]; state[k] = result; j = (j <= 0) ? (stateSize-1) : (j-1); k = (k <= 0) ? (stateSize-1) : (k-1); short int auxIndex = (result >> 24) & (auxSize - 1); register uint32_t auxACG = auxState[auxIndex]; auxState[auxIndex] = lcgRecurr = LCG(lcgRecurr); // // 3c is a magic number. We are doing four masks here, so we // do not want to run off the end of the permutation table. // This insures that we have always got four entries left. // register uint32_t *perm = & randomPermutations[result & 0x3c]; result = *(perm++) & auxACG; result |= *(perm++) & ((auxACG << 24) | ((auxACG >> 8)& 0xffffff)); result |= *(perm++) & ((auxACG << 16) | ((auxACG >> 16) & 0xffff)); result |= *(perm++) & ((auxACG << 8) | ((auxACG >> 24) & 0xff)); return(result); } neuron-7.5/src/gnu/ACG.h000077500000000000000000000041461323325274500150340ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _ACG_h #define _ACG_h 1 #include #include #ifdef __GNUG__ //#pragma interface #endif // // Additive number generator. This method is presented in Volume II // of The Art of Computer Programming by Knuth. I've coded the algorithm // and have added the extensions by Andres Nowatzyk of CMU to randomize // the result of algorithm M a bit by using an LCG & a spatial // permutation table. // // The version presented uses the same constants for the LCG that Andres // uses (chosen by trial & error). The spatial permutation table is // the same size (it's based on word size). This is for 32-bit words. // // The ``auxillary table'' used by the LCG table varies in size, and // is chosen to be the the smallest power of two which is larger than // twice the size of the state table. // class ACG : public RNG { uint32_t initialSeed; // used to reset generator int initialTableEntry; uint32_t *state; uint32_t *auxState; short stateSize; short auxSize; uint32_t lcgRecurr; short j; short k; protected: public: ACG(uint32_t seed = 0, int size = 55); virtual ~ACG(); // // Return a long-words word of random bits // virtual uint32_t asLong(); virtual void reset(); }; #endif neuron-7.5/src/gnu/Binomial.cpp000077500000000000000000000021611323325274500165220ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double Binomial::operator()() { int s = 0; for (int i = 0; i < pN; i++) { if (pGenerator -> asDouble() < pU) { s++; } } return(double(s)); } neuron-7.5/src/gnu/Binomial.h000077500000000000000000000030141323325274500161650ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Binomial_h #ifdef __GNUG__ //#pragma interface #endif #define _Binomial_h 1 #include class Binomial: public Random { protected: int pN; double pU; public: Binomial(int n, double u, RNG *gen); int n(); int n(int xn); double u(); double u(int xu); virtual double operator()(); }; inline Binomial::Binomial(int n, double u, RNG *gen) : Random(gen){ pN = n; pU = u; } inline int Binomial::n() { return pN; } inline int Binomial::n(int xn) { int tmp = pN; pN = xn; return tmp; } inline double Binomial::u() { return pU; } inline double Binomial::u(int xu) { double tmp = pU; pU = xu; return tmp; } #endif neuron-7.5/src/gnu/Complex.cpp000077500000000000000000000145661323325274500164130ustar00rootroot00000000000000#include <../../nrnconf.h> #include /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include #undef myfabs #if MAC #if __GNUC__ < 4 #define myfabs std::fabs #else #define myfabs ::fabs #endif #else #define myfabs fabs #endif // error handling extern "C" { extern void hoc_execerror(const char*, const char*); } void default_Complex_error_handler(const char* msg) { cerr << "Fatal Complex arithmetic error. " << msg << "\n"; // hoc_execerror("Complex arithmetic error.", msg); // exit(1); } one_arg_error_handler_t Complex_error_handler = default_Complex_error_handler; one_arg_error_handler_t set_Complex_error_handler(one_arg_error_handler_t f) { one_arg_error_handler_t old = Complex_error_handler; Complex_error_handler = f; return old; } void Complex::error(const char* msg) const { (*Complex_error_handler)(msg); } /* from romine@xagsun.epm.ornl.gov */ Complex /* const */ operator / (const Complex& x, const Complex& y) { double den = myfabs(y.real()) + myfabs(y.imag()); if (den == 0.0) x.error ("Attempted division by zero."); double xrden = x.real() / den; double xiden = x.imag() / den; double yrden = y.real() / den; double yiden = y.imag() / den; double nrm = yrden * yrden + yiden * yiden; return Complex((xrden * yrden + xiden * yiden) / nrm, (xiden * yrden - xrden * yiden) / nrm); } Complex& Complex::operator /= (const Complex& y) { double den = myfabs(y.real()) + myfabs(y.imag()); if (den == 0.0) error ("Attempted division by zero."); double xrden = re / den; double xiden = im / den; double yrden = y.real() / den; double yiden = y.imag() / den; double nrm = yrden * yrden + yiden * yiden; re = (xrden * yrden + xiden * yiden) / nrm; im = (xiden * yrden - xrden * yiden) / nrm; return *this; } Complex /* const */ operator / (double x, const Complex& y) { double den = norm(y); if (den == 0.0) y.error ("Attempted division by zero."); return Complex((x * y.real()) / den, -(x * y.imag()) / den); } Complex /* const */ operator / (const Complex& x, double y) { if (y == 0.0) x.error ("Attempted division by zero."); return Complex(x.real() / y, x.imag() / y); } Complex& Complex::operator /= (double y) { if (y == 0.0) error ("Attempted division by zero."); re /= y; im /= y; return *this; } Complex /* const */ exp(const Complex& x) { double r = exp(x.real()); return Complex(r * cos(x.imag()), r * sin(x.imag())); } Complex /* const */ cosh(const Complex& x) { return Complex(cos(x.imag()) * cosh(x.real()), sin(x.imag()) * sinh(x.real())); } Complex /* const */ sinh(const Complex& x) { return Complex(cos(x.imag()) * sinh(x.real()), sin(x.imag()) * cosh(x.real())); } Complex /* const */ cos(const Complex& x) { return Complex(cos(x.real()) * cosh(x.imag()), -sin(x.real()) * sinh(x.imag())); } Complex /* const */ sin(const Complex& x) { return Complex(sin(x.real()) * cosh(x.imag()), cos(x.real()) * sinh(x.imag())); } Complex /* const */ log(const Complex& x) { double h = hypot(x.real(), x.imag()); if (h <= 0.0) x.error("attempted log of zero magnitude number."); return Complex(log(h), atan2(x.imag(), x.real())); } // Corrections based on reports from: thc@cs.brown.edu & saito@sdr.slb.com Complex /* const */ pow(const Complex& x, const Complex& p) { double h = hypot(x.real(), x.imag()); if (h <= 0.0) x.error("attempted power of zero magnitude number."); double a = atan2(x.imag(), x.real()); double lr = pow(h, p.real()); double li = p.real() * a; if (p.imag() != 0.0) { lr /= exp(p.imag() * a); li += p.imag() * log(h); } return Complex(lr * cos(li), lr * sin(li)); } Complex /* const */ pow(const Complex& x, double p) { double h = hypot(x.real(), x.imag()); if (h <= 0.0) x.error("attempted power of zero magnitude number."); double lr = pow(h, p); double a = atan2(x.imag(), x.real()); double li = p * a; return Complex(lr * cos(li), lr * sin(li)); } Complex /* const */ sqrt(const Complex& x) { if (x.real() == 0.0 && x.imag() == 0.0) return Complex(0.0, 0.0); else { double s = sqrt((myfabs(x.real()) + hypot(x.real(), x.imag())) * 0.5); double d = (x.imag() / s) * 0.5; if (x.real() > 0.0) return Complex(s, d); else if (x.imag() >= 0.0) return Complex(d, s); else return Complex(-d, -s); } } Complex /* const */ pow(const Complex& x, int p) { if (p == 0) return Complex(1.0, 0.0); else if (x == 0.0) return Complex(0.0, 0.0); else { Complex res(1.0, 0.0); Complex b = x; if (p < 0) { p = -p; b = 1.0 / b; } for(;;) { if (p & 1) res *= b; if ((p >>= 1) == 0) return res; else b *= b; } } } ostream& operator << (ostream& s, const Complex& x) { return s << "(" << x.real() << ", " << x.imag() << ")" ; } #if 1 || defined(__MWERKS__) #define _OLD_STREAMS #endif istream& operator >> (istream& s, Complex& x) { #ifdef _OLD_STREAMS if (!s.good()) { return s; } #else if (!s.ipfx(0)) { s.clear(ios::failbit|s.rdstate()); // Redundant if using GNU iostreams. return s; } #endif double r, i; char ch, ws; s >> ws; s.get(ch); if (ch == '(') { s >> r; s >> ws; s.get(ch); if (ch == ',') { s >> i; s >> ws; s .get(ch); } else i = 0; if (ch != ')') s.clear(ios::failbit); } else { s.putback(ch); s >> r; i = 0; } x = Complex(r, i); return s; } neuron-7.5/src/gnu/Complex.h000077500000000000000000000154311323325274500160500ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Complex_h #ifdef __GNUG__ //#pragma interface #endif #define _Complex_h 1 #include #include #if 0 && MAC #undef HUGE_VAL #include #endif class Complex { #ifdef __ATT_complex__ public: #else protected: #endif double re; double im; public: double real() const; double imag() const; Complex(); Complex(const Complex& y); Complex(double r, double i=0); ~Complex(); Complex& operator = (const Complex& y); Complex& operator += (const Complex& y); Complex& operator += (double y); Complex& operator -= (const Complex& y); Complex& operator -= (double y); Complex& operator *= (const Complex& y); Complex& operator *= (double y); Complex& operator /= (const Complex& y); Complex& operator /= (double y); void error(const char* msg) const; }; // non-inline functions Complex operator / (const Complex& x, const Complex& y); Complex operator / (const Complex& x, double y); Complex operator / (double x, const Complex& y); Complex cos(const Complex& x); Complex sin(const Complex& x); Complex cosh(const Complex& x); Complex sinh(const Complex& x); Complex exp(const Complex& x); Complex log(const Complex& x); Complex pow(const Complex& x, int p); Complex pow(const Complex& x, const Complex& p); Complex pow(const Complex& x, double y); Complex sqrt(const Complex& x); istream& operator >> (istream& s, Complex& x); ostream& operator << (ostream& s, const Complex& x); // other functions defined as inlines // Sunpro CC 4 complains about the following being both extern and inline #if !defined(__SUNPRO_CC) int operator == (const Complex& x, const Complex& y); int operator == (const Complex& x, double y); int operator != (const Complex& x, const Complex& y); int operator != (const Complex& x, double y); Complex operator - (const Complex& x); Complex conj(const Complex& x); Complex operator + (const Complex& x, const Complex& y); Complex operator + (const Complex& x, double y); Complex operator + (double x, const Complex& y); Complex operator - (const Complex& x, const Complex& y); Complex operator - (const Complex& x, double y); Complex operator - (double x, const Complex& y); Complex operator * (const Complex& x, const Complex& y); Complex operator * (const Complex& x, double y); Complex operator * (double x, const Complex& y); double real(const Complex& x); double imag(const Complex& x); double abs(const Complex& x); double norm(const Complex& x); double arg(const Complex& x); Complex polar(double r, double t = 0.0); #endif // inline members inline double Complex::real() const { return re; } inline double Complex::imag() const { return im; } inline Complex::Complex() {} inline Complex::Complex(const Complex& y) :re(y.real()), im(y.imag()) {} inline Complex::Complex(double r, double i) :re(r), im(i) {} inline Complex::~Complex() {} inline Complex& Complex::operator = (const Complex& y) { re = y.real(); im = y.imag(); return *this; } inline Complex& Complex::operator += (const Complex& y) { re += y.real(); im += y.imag(); return *this; } inline Complex& Complex::operator += (double y) { re += y; return *this; } inline Complex& Complex::operator -= (const Complex& y) { re -= y.real(); im -= y.imag(); return *this; } inline Complex& Complex::operator -= (double y) { re -= y; return *this; } inline Complex& Complex::operator *= (const Complex& y) { double r = re * y.real() - im * y.imag(); im = re * y.imag() + im * y.real(); re = r; return *this; } inline Complex& Complex::operator *= (double y) { re *= y; im *= y; return *this; } // functions inline int operator == (const Complex& x, const Complex& y) { return x.real() == y.real() && x.imag() == y.imag(); } inline int operator == (const Complex& x, double y) { return x.imag() == 0.0 && x.real() == y; } inline int operator != (const Complex& x, const Complex& y) { return x.real() != y.real() || x.imag() != y.imag(); } inline int operator != (const Complex& x, double y) { return x.imag() != 0.0 || x.real() != y; } inline Complex operator - (const Complex& x) { return Complex(-x.real(), -x.imag()); } inline Complex conj(const Complex& x) { return Complex(x.real(), -x.imag()); } inline Complex operator + (const Complex& x, const Complex& y) { return Complex(x.real() + y.real(), x.imag() + y.imag()); } inline Complex operator + (const Complex& x, double y) { return Complex(x.real() + y, x.imag()); } inline Complex operator + (double x, const Complex& y) { return Complex(x + y.real(), y.imag()); } inline Complex operator - (const Complex& x, const Complex& y) { return Complex(x.real() - y.real(), x.imag() - y.imag()); } inline Complex operator - (const Complex& x, double y) { return Complex(x.real() - y, x.imag()); } inline Complex operator - (double x, const Complex& y) { return Complex(x - y.real(), -y.imag()); } inline Complex operator * (const Complex& x, const Complex& y) { return Complex(x.real() * y.real() - x.imag() * y.imag(), x.real() * y.imag() + x.imag() * y.real()); } inline Complex operator * (const Complex& x, double y) { return Complex(x.real() * y, x.imag() * y); } inline Complex operator * (double x, const Complex& y) { return Complex(x * y.real(), x * y.imag()); } inline double real(const Complex& x) { return x.real(); } inline double imag(const Complex& x) { return x.imag(); } inline double abs(const Complex& x) { return hypot(x.real(), x.imag()); } inline double norm(const Complex& x) { return (x.real() * x.real() + x.imag() * x.imag()); } inline double arg(const Complex& x) { return atan2(x.imag(), x.real()); } inline Complex polar(double r, double t) { return Complex(r * cos(t), r * sin(t)); } #endif neuron-7.5/src/gnu/DiscUnif.cpp000077500000000000000000000021261323325274500164750ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double DiscreteUniform::operator()() { long tmp = long(floor(delta * pGenerator -> asDouble())); return( double(pLow + tmp) ); } neuron-7.5/src/gnu/DiscUnif.h000077500000000000000000000035061323325274500161450ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _DiscreteUniform_h #ifdef __GNUG__ //#pragma interface #endif #define _DiscreteUniform_h 1 #include // // The interval [lo..hi) // class DiscreteUniform: public Random { long pLow; long pHigh; double delta; public: DiscreteUniform(long low, long high, RNG *gen); long low(); long low(long x); long high(); long high(long x); virtual double operator()(); }; inline DiscreteUniform::DiscreteUniform(long low, long high, RNG *gen) : Random(gen) { pLow = (low < high) ? low : high; pHigh = (low < high) ? high : low; delta = (pHigh - pLow) + 1; } inline long DiscreteUniform::low() { return pLow; } inline long DiscreteUniform::low(long x) { long tmp = pLow; pLow = x; delta = (pHigh - pLow) + 1; return tmp; } inline long DiscreteUniform::high() { return pHigh; } inline long DiscreteUniform::high(long x) { long tmp = pHigh; pHigh = x; delta = (pHigh - pLow) + 1; return tmp; } #endif neuron-7.5/src/gnu/Erlang.cpp000077500000000000000000000021471323325274500162040ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double Erlang::operator()() { double prod = 1.0; for (int i = 0; i < k; i++) { prod *= pGenerator -> asDouble(); } return(-log(prod)/a); } neuron-7.5/src/gnu/Erlang.h000077500000000000000000000035451323325274500156540ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Erlang_h #ifdef __GNUG__ //#pragma interface #endif #define _Erlang_h 1 #include class Erlang: public Random { protected: double pMean; double pVariance; int k; double a; void setState(); public: Erlang(double mean, double variance, RNG *gen); double mean(); double mean(double x); double variance(); double variance(double x); virtual double operator()(); }; inline void Erlang::setState() { k = int( (pMean * pMean ) / pVariance + 0.5 ); k = (k > 0) ? k : 1; a = k / pMean; } inline Erlang::Erlang(double mean, double variance, RNG *gen) : Random(gen) { pMean = mean; pVariance = variance; setState(); } inline double Erlang::mean() { return pMean; } inline double Erlang::mean(double x) { double tmp = pMean; pMean = x; setState(); return tmp; }; inline double Erlang::variance() { return pVariance; } inline double Erlang::variance(double x) { double tmp = pVariance; pVariance = x; setState(); return tmp; } #endif neuron-7.5/src/gnu/Geom.cpp000077500000000000000000000021371323325274500156620ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double Geometric::operator()() { int samples; for (samples = 1; pGenerator -> asDouble() < pMean; samples++); return((double) samples); } neuron-7.5/src/gnu/Geom.h000077500000000000000000000026151323325274500153300ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Geometric_h #ifdef __GNUG__ //#pragma interface #endif #define _Geometric_h #include class Geometric: public Random { protected: double pMean; public: Geometric(double mean, RNG *gen); double mean(); double mean(double x); virtual double operator()(); }; inline Geometric::Geometric(double mean, RNG *gen) : Random(gen) { pMean = mean; } inline double Geometric::mean() { return pMean; } inline double Geometric::mean(double x) { double tmp = pMean; pMean = x; return tmp; } #endif neuron-7.5/src/gnu/HypGeom.cpp000077500000000000000000000021731323325274500163430ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double HyperGeometric::operator()() { double d = (pGenerator -> asDouble() > pP) ? (1.0 - pP) : (pP); return(-pMean * log(pGenerator -> asDouble()) / (2.0 * d) ); } neuron-7.5/src/gnu/HypGeom.h000077500000000000000000000036641323325274500160160ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _HyperGeometric_h #ifdef __GNUG__ //#pragma interface #endif #define _HyperGeometric_h #include class HyperGeometric: public Random { protected: double pMean; double pVariance; double pP; void setState(); public: HyperGeometric(double mean, double variance, RNG *gen); double mean(); double mean(double x); double variance(); double variance(double x); virtual double operator()(); }; inline void HyperGeometric::setState() { double z = pVariance / (pMean * pMean); pP = 0.5 * (1.0 - sqrt((z - 1.0) / ( z + 1.0 ))); } inline HyperGeometric::HyperGeometric(double mean, double variance, RNG *gen) : Random(gen) { pMean = mean; pVariance = variance; setState(); } inline double HyperGeometric::mean() { return pMean; }; inline double HyperGeometric::mean(double x) { double t = pMean; pMean = x; setState(); return t; } inline double HyperGeometric::variance() { return pVariance; } inline double HyperGeometric::variance(double x) { double t = pVariance; pVariance = x; setState(); return t; } #endif neuron-7.5/src/gnu/LogNorm.cpp000077500000000000000000000022731323325274500163510ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include #include #ifndef M_E #define M_E 2.71828182845904523536 #endif // // See Simulation, Modelling & Analysis by Law & Kelton, pp260 // // double LogNormal::operator()() { return( pow(M_E, this->Normal::operator()() ) ); } neuron-7.5/src/gnu/LogNorm.h000077500000000000000000000040641323325274500160160ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _LogNormal_h #ifdef __GNUG__ //#pragma interface #endif #define _LogNormal_h #include class LogNormal: public Normal { protected: double logMean; double logVariance; void setState(); public: LogNormal(double mean, double variance, RNG *gen); double mean(); double mean(double x); double variance(); double variance(double x); virtual double operator()(); }; inline void LogNormal::setState() { double m2 = logMean * logMean; pMean = log(m2 / sqrt(logVariance + m2) ); // from ch@heike.informatik.uni-dortmund.de: // (was pVariance = log((sqrt(logVariance + m2)/m2 )); ) pStdDev = sqrt(log((logVariance + m2)/m2 )); } inline LogNormal::LogNormal(double mean, double variance, RNG *gen) : Normal(mean, variance, gen) { logMean = mean; logVariance = variance; setState(); } inline double LogNormal::mean() { return logMean; } inline double LogNormal::mean(double x) { double t=logMean; logMean = x; setState(); return t; } inline double LogNormal::variance() { return logVariance; } inline double LogNormal::variance(double x) { double t=logVariance; logVariance = x; setState(); return t; } #endif neuron-7.5/src/gnu/MLCG.cpp000077500000000000000000000066761323325274500155310ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1989 Free Software Foundation This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include // // SEED_TABLE_SIZE must be a power of 2 // #define SEED_TABLE_SIZE 32 static int32_t seedTable[SEED_TABLE_SIZE] = { /* 0xbdcc47e5 */ -1110685723, /* 0x54aea45d */ 1420731485, /* 0xec0df859 */ -334628775, /* 0xda84637b */ -628857989, /* 0xc8c6cb4f */ -926495921, /* 0x35574b01 */ 894913281, /* 0x28260b7d */ 673581949, /* 0x0d07fdbf */ 218627519, /* 0x9faaeeb0 */ -1616187728, /* 0x613dd169 */ 1631441257, /* 0x5ce2d818 */ 1558370328, /* 0x85b9e706 */ -2051414266, /* 0xab2469db */ -1423676965, /* 0xda02b0dc */ -637357860, /* 0x45c60d6e */ 1170607470, /* 0xffe49d10 */ -1794800, /* 0x7224fea3 */ 1915027107, /* 0xf9684fc9 */ -110604343, /* 0xfc7ee074 */ -58793868, /* 0x326ce92a */ 845998378, /* 0x366d13b5 */ 913118133, /* 0x17aaa731 */ 397059889, /* 0xeb83a675 */ -343693707, /* 0x7781cb32 */ 2004994866, /* 0x4ec7c92d */ 1321716013, /* 0x7f187521 */ 2132309281, /* 0x2cf346b4 */ 754140852, /* 0xad13310f */ -1391251185, /* 0xb89cff2b */ -1197670613, /* 0x12164de1 */ 303451617, /* 0xa865168d */ -1469770099, /* 0x32b56cdf */ 850750687 }; MLCG::MLCG(int32_t seed1, int32_t seed2) { initialSeedOne = seed1; initialSeedTwo = seed2; reset(); } void MLCG::reset() { int32_t seed1 = initialSeedOne; int32_t seed2 = initialSeedTwo; // Most people pick stupid seed numbers that do not have enough // bits. In this case, if they pick a small seed number, we // map that to a specific seed. if (seed1 < 0) { seed1 = (seed1 + 2147483561); seed1 = (seed1 < 0) ? -seed1 : seed1; } if (seed2 < 0) { seed2 = (seed2 + 2147483561); seed2 = (seed2 < 0) ? -seed2 : seed2; } if (seed1 > -1 && seed1 < SEED_TABLE_SIZE) { seedOne = seedTable[seed1]; } else { seedOne = seed1 ^ seedTable[seed1 & (SEED_TABLE_SIZE-1)]; } if (seed2 > -1 && seed2 < SEED_TABLE_SIZE) { seedTwo = seedTable[seed2]; } else { seedTwo = seed2 ^ seedTable[ seed2 & (SEED_TABLE_SIZE-1) ]; } seedOne = (seedOne % 2147483561) + 1; seedTwo = (seedTwo % 2147483397) + 1; } uint32_t MLCG::asLong() { int32_t k = seedOne % 53668; seedOne = 40014 * (seedOne-k * 53668) - k * 12211; if (seedOne < 0) { seedOne += 2147483563; } k = seedTwo % 52774; seedTwo = 40692 * (seedTwo - k * 52774) - k * 3791; if (seedTwo < 0) { seedTwo += 2147483399; } int32_t z = seedOne - seedTwo; if (z < 1) { z += 2147483562; } return( (unsigned long) z); } neuron-7.5/src/gnu/MLCG.h000077500000000000000000000035321323325274500151620ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _MLCG_h #define _MLCG_h 1 #ifdef __GNUG__ //#pragma interface #endif #include #include // // Multiplicative Linear Conguential Generator // class MLCG : public RNG { int32_t initialSeedOne; int32_t initialSeedTwo; int32_t seedOne; int32_t seedTwo; protected: public: MLCG(int32_t seed1 = 0, int32_t seed2 = 1); // // Return a long-words word of random bits // virtual uint32_t asLong(); virtual void reset(); int32_t seed1(); void seed1(int32_t); int32_t seed2(); void seed2(int32_t); void reseed(int32_t, int32_t); }; inline int32_t MLCG::seed1() { return(seedOne); } inline void MLCG::seed1(int32_t s) { initialSeedOne = s; reset(); } inline int32_t MLCG::seed2() { return(seedTwo); } inline void MLCG::seed2(int32_t s) { initialSeedTwo = s; reset(); } inline void MLCG::reseed(int32_t s1, int32_t s2) { initialSeedOne = s1; initialSeedTwo = s2; reset(); } #endif neuron-7.5/src/gnu/Makefile.am000077500000000000000000000021331323325274500163170ustar00rootroot00000000000000## This file makes one library out of all of the GNU libg++ pieces that we ## use. It used to be split into a couple of different libraries but I ## combined it because I can't see any reason to multiply entities ## unnecessarily. ## The library that we install. I picked this name so it's not likely to ## conflict with anything anyone else installs. lib_LTLIBRARIES = libneuron_gnu.la ##change from stream.h to ivstream.h means we have to specify the ##interviews install location includes = @IV_INCLUDE@ AM_CPPFLAGS = $(includes) AM_CXXFLAGS = @MINGW_CFLAG@ libneuron_gnu_la_SOURCES = ACG.cpp Binomial.cpp Complex.cpp DiscUnif.cpp \ Erlang.cpp Geom.cpp HypGeom.cpp LogNorm.cpp MLCG.cpp NegExp.cpp \ Normal.cpp Poisson.cpp RNG.cpp Random.cpp RndInt.cpp SmplHist.cpp \ SmplStat.cpp Uniform.cpp Weibull.cpp builtin.cpp d_avec.cpp d_vec.cpp noinst_HEADERS = ACG.h Binomial.h Complex.h DiscUnif.h Erlang.h \ Geom.h HypGeom.h LogNorm.h MLCG.h NegExp.h Normal.h Poisson.h RNG.h \ Random.h RndInt.h SmplHist.h SmplStat.h Uniform.h Weibull.h \ neuron_gnu_builtin.h d_avec.h d_defs.h d_vec.h neuron_gnu_std.h neuron-7.5/src/gnu/Makefile.in000066400000000000000000000640211323325274500163310ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/gnu ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libneuron_gnu_la_LIBADD = am_libneuron_gnu_la_OBJECTS = ACG.lo Binomial.lo Complex.lo \ DiscUnif.lo Erlang.lo Geom.lo HypGeom.lo LogNorm.lo MLCG.lo \ NegExp.lo Normal.lo Poisson.lo RNG.lo Random.lo RndInt.lo \ SmplHist.lo SmplStat.lo Uniform.lo Weibull.lo builtin.lo \ d_avec.lo d_vec.lo libneuron_gnu_la_OBJECTS = $(am_libneuron_gnu_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libneuron_gnu_la_SOURCES) DIST_SOURCES = $(libneuron_gnu_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libneuron_gnu.la includes = @IV_INCLUDE@ AM_CPPFLAGS = $(includes) AM_CXXFLAGS = @MINGW_CFLAG@ libneuron_gnu_la_SOURCES = ACG.cpp Binomial.cpp Complex.cpp DiscUnif.cpp \ Erlang.cpp Geom.cpp HypGeom.cpp LogNorm.cpp MLCG.cpp NegExp.cpp \ Normal.cpp Poisson.cpp RNG.cpp Random.cpp RndInt.cpp SmplHist.cpp \ SmplStat.cpp Uniform.cpp Weibull.cpp builtin.cpp d_avec.cpp d_vec.cpp noinst_HEADERS = ACG.h Binomial.h Complex.h DiscUnif.h Erlang.h \ Geom.h HypGeom.h LogNorm.h MLCG.h NegExp.h Normal.h Poisson.h RNG.h \ Random.h RndInt.h SmplHist.h SmplStat.h Uniform.h Weibull.h \ neuron_gnu_builtin.h d_avec.h d_defs.h d_vec.h neuron_gnu_std.h all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gnu/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/gnu/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libneuron_gnu.la: $(libneuron_gnu_la_OBJECTS) $(libneuron_gnu_la_DEPENDENCIES) $(EXTRA_libneuron_gnu_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libneuron_gnu_la_OBJECTS) $(libneuron_gnu_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Binomial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Complex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DiscUnif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Erlang.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Geom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HypGeom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LogNorm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MLCG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NegExp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Normal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Poisson.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RNG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RndInt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SmplHist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SmplStat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Uniform.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Weibull.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d_avec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d_vec.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/gnu/NegExp.cpp000077500000000000000000000020471323325274500161610ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double NegativeExpntl::operator()() { return(-pMean * log(pGenerator -> asDouble())); } neuron-7.5/src/gnu/NegExp.h000077500000000000000000000027461323325274500156340ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _NegativeExpntl_h #ifdef __GNUG__ //#pragma interface #endif #define _NegativeExpntl_h 1 // // Negative Exponential Random Numbers // // #include class NegativeExpntl: public Random { protected: double pMean; public: NegativeExpntl(double xmean, RNG *gen); double mean(); double mean(double x); virtual double operator()(); }; inline NegativeExpntl::NegativeExpntl(double xmean, RNG *gen) : Random(gen) { pMean = xmean; } inline double NegativeExpntl::mean() { return pMean; } inline double NegativeExpntl::mean(double x) { double t = pMean; pMean = x; return t; } #endif neuron-7.5/src/gnu/Normal.cpp000077500000000000000000000033071323325274500162230ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include // // See Simulation, Modelling & Analysis by Law & Kelton, pp259 // // This is the ``polar'' method. // double Normal::operator()() { if (haveCachedNormal == 1) { haveCachedNormal = 0; return(cachedNormal * pStdDev + pMean ); } else { for(;;) { double u1 = pGenerator -> asDouble(); double u2 = pGenerator -> asDouble(); double v1 = 2 * u1 - 1; double v2 = 2 * u2 - 1; double w = (v1 * v1) + (v2 * v2); // // We actually generate two IID normal distribution variables. // We cache the one & return the other. // if (w <= 1) { double y = sqrt( (-2 * log(w)) / w); double x1 = v1 * y; double x2 = v2 * y; haveCachedNormal = 1; cachedNormal = x2; return(x1 * pStdDev + pMean); } } } } neuron-7.5/src/gnu/Normal.h000077500000000000000000000034601323325274500156700ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Normal_h #ifdef __GNUG__ //#pragma interface #endif #define _Normal_h #include class Normal: public Random { char haveCachedNormal; double cachedNormal; protected: double pMean; double pVariance; double pStdDev; public: Normal(double xmean, double xvariance, RNG *gen); double mean(); double mean(double x); double variance(); double variance(double x); virtual double operator()(); }; inline Normal::Normal(double xmean, double xvariance, RNG *gen) : Random(gen) { pMean = xmean; pVariance = xvariance; pStdDev = sqrt(pVariance); haveCachedNormal = 0; } inline double Normal::mean() { return pMean; }; inline double Normal::mean(double x) { double t=pMean; pMean = x; return t; } inline double Normal::variance() { return pVariance; } inline double Normal::variance(double x) { double t=pVariance; pVariance = x; pStdDev = sqrt(pVariance); return t; }; #endif neuron-7.5/src/gnu/Poisson.cpp000077500000000000000000000022551323325274500164260ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double Poisson::operator()() { double bound = exp(-1.0 * pMean); int count = 0; for (double product = 1.0; product >= bound; product *= pGenerator -> asDouble()) { count++; } return(count - 1); } neuron-7.5/src/gnu/Poisson.h000077500000000000000000000025721323325274500160750ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Poisson_h #ifdef __GNUG__ //#pragma interface #endif #define _Poisson_h #include class Poisson: public Random { protected: double pMean; public: Poisson(double mean, RNG *gen); double mean(); double mean(double x); virtual double operator()(); }; inline Poisson::Poisson(double mean, RNG *gen) : Random(gen) { pMean = mean; } inline double Poisson::mean() { return pMean; } inline double Poisson::mean(double x) { double t = pMean; pMean = x; return t; } #endif neuron-7.5/src/gnu/RNG.cpp000077500000000000000000000073721323325274500154270ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1989 Free Software Foundation This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include // These two static fields get initialized by RNG::RNG(). PrivateRNGSingleType RNG::singleMantissa; PrivateRNGDoubleType RNG::doubleMantissa; // // The scale constant is 2^-31. It is used to scale a 31 bit // long to a double. // //static const double randomDoubleScaleConstant = 4.656612873077392578125e-10; //static const float randomFloatScaleConstant = 4.656612873077392578125e-10; static char initialized = 0; RNG::~RNG(){} RNG::RNG() { if (!initialized) { assert (sizeof(double) == 2 * sizeof(uint32_t)); // // The following is a hack that I attribute to // Andres Nowatzyk at CMU. The intent of the loop // is to form the smallest number 0 <= x < 1.0, // which is then used as a mask for two longwords. // this gives us a fast way way to produce double // precision numbers from longwords. // // I know that this works for IEEE and VAX floating // point representations. // // A further complication is that gnu C will blow // the following loop, unless compiled with -ffloat-store, // because it uses extended representations for some of // of the comparisons. Thus, we have the following hack. // If we could specify #pragma optimize, we wouldn't need this. // PrivateRNGDoubleType t; PrivateRNGSingleType s; #if _IEEE == 1 || defined(linux) t.d = 1.5; if ( t.u[1] == 0 ) { // sun word order? t.u[0] = 0x3fffffff; t.u[1] = 0xffffffff; } else { t.u[0] = 0xffffffff; // encore word order? t.u[1] = 0x3fffffff; } s.u = 0x3fffffff; #else volatile double x = 1.0; // volatile needed when fp hardware used, // and has greater precision than memory doubles double y = 0.5; do { // find largest fp-number < 2.0 t.d = x; x += y; y *= 0.5; } while (x != t.d && x < 2.0); volatile float xx = 1.0; // volatile needed when fp hardware used, // and has greater precision than memory floats float yy = 0.5; do { // find largest fp-number < 2.0 s.s = xx; xx += yy; yy *= 0.5; } while (xx != s.s && xx < 2.0); #endif // set doubleMantissa to 1 for each doubleMantissa bit doubleMantissa.d = 1.0; doubleMantissa.u[0] ^= t.u[0]; doubleMantissa.u[1] ^= t.u[1]; // set singleMantissa to 1 for each singleMantissa bit singleMantissa.s = 1.0; singleMantissa.u ^= s.u; initialized = 1; } } float RNG::asFloat() { PrivateRNGSingleType result; result.s = 1.0; result.u |= (asLong() & singleMantissa.u); result.s -= 1.0; assert( result.s < 1.0 && result.s >= 0); return( result.s ); } double RNG::asDouble() { PrivateRNGDoubleType result; result.d = 1.0; result.u[0] |= (asLong() & doubleMantissa.u[0]); result.u[1] |= (asLong() & doubleMantissa.u[1]); result.d -= 1.0; assert( result.d < 1.0 && result.d >= 0); return( result.d ); } neuron-7.5/src/gnu/RNG.h000077500000000000000000000041341323325274500150650ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _RNG_h #define _RNG_h 1 #ifdef __GNUG__ //#pragma interface #endif /* * int32_t and uint32_t have been defined by the configure procedure. Just * use these in place of the ones that libg++ used to provide. */ #if defined(HAVE_INTTYPES_H) #include #elif defined(HAVE_SYS_TYPES_H) #include #elif defined(HAVE__G_CONFIG_H) #include <_G_config.h> typedef _G_int32_t int32_t; typedef _G_uint32_t uint32_t; #endif #include #include union PrivateRNGSingleType { // used to access floats as unsigneds float s; uint32_t u; }; union PrivateRNGDoubleType { // used to access doubles as unsigneds double d; uint32_t u[2]; }; // // Base class for Random Number Generators. See ACG and MLCG for instances. // class RNG { static PrivateRNGSingleType singleMantissa; // mantissa bit vector static PrivateRNGDoubleType doubleMantissa; // mantissa bit vector public: RNG(); virtual ~RNG(); // // Return a long-words word of random bits // virtual uint32_t asLong() = 0; virtual void reset() = 0; // // Return random bits converted to either a float or a double // virtual float asFloat(); virtual double asDouble(); }; #endif neuron-7.5/src/gnu/Random.cpp000077500000000000000000000001351323325274500162070ustar00rootroot00000000000000#include <../../nrnconf.h> #ifdef __GNUG__ #pragma implementation #endif #include neuron-7.5/src/gnu/Random.h000077500000000000000000000026341323325274500156620ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Random_h #define _Random_h 1 #ifdef __GNUG__ //#pragma interface #endif #include #if MAC #define Random gnu_Random #endif #include class Random { protected: RNG *pGenerator; public: Random(RNG *generator); virtual ~Random() {} virtual double operator()() = 0; RNG *generator(); void generator(RNG *p); }; inline Random::Random(RNG *gen) { pGenerator = gen; } inline RNG *Random::generator() { return(pGenerator); } inline void Random::generator(RNG *p) { pGenerator = p; } #endif neuron-7.5/src/gnu/RndInt.cpp000077500000000000000000000001351323325274500161650ustar00rootroot00000000000000#include <../../nrnconf.h> #ifdef __GNUG__ #pragma implementation #endif #include neuron-7.5/src/gnu/RndInt.h000077500000000000000000000106061323325274500156360ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1990 Free Software Foundation adapted from a submission from John Reidl GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the GNU CC General Public License for full details. Everyone is granted permission to copy, modify and redistribute GNU CC, but only under the conditions described in the GNU CC General Public License. A copy of this license is supposed to have been given to you along with GNU CC so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _RandomInteger_h #ifdef __GNUG__ //#pragma interface #endif #define _RandomInteger_h 1 // RandomInteger uses a random number generator to generate an integer // in a specified range. By default the range is 0..1. Since in my // experience random numbers are often needed for a wide variety of // ranges in the same program, this generator accepts a new low or high value // as an argument to the asLong and operator() methods to temporarily // override stored values #include #include class RandomInteger { protected: RNG *pGenerator; long pLow; long pHigh; long _asLong(long, long); public: RandomInteger(long low, long high, RNG *gen); RandomInteger(long high, RNG *gen); RandomInteger(RNG *gen); // read params long low() const; long high() const; RNG* generator() const; // change params long low(long x); long high(long x); RNG* generator(RNG *gen); // get a random number long asLong(); long operator()(); // synonym for asLong int asInt(); // (possibly) truncate as int // override params for one shot long asLong(long high); long asLong(long low, long high); long operator () (long high); // synonyms long operator () (long low, long high); }; inline RandomInteger::RandomInteger(long low, long high, RNG *gen) : pLow((low < high) ? low : high), pHigh((low < high) ? high : low), pGenerator(gen) {} inline RandomInteger::RandomInteger(long high, RNG *gen) : pLow((0 < high) ? 0 : high), pHigh((0 < high) ? high : 0), pGenerator(gen) {} inline RandomInteger::RandomInteger(RNG *gen) : pLow(0), pHigh(1), pGenerator(gen) {} inline RNG* RandomInteger::generator() const { return pGenerator;} inline long RandomInteger::low() const { return pLow; } inline long RandomInteger::high() const { return pHigh; } inline RNG* RandomInteger::generator(RNG *gen) { RNG *tmp = pGenerator; pGenerator = gen; return tmp; } inline long RandomInteger::low(long x) { long tmp = pLow; pLow = x; return tmp; } inline long RandomInteger:: high(long x) { long tmp = pHigh; pHigh = x; return tmp; } inline long RandomInteger:: _asLong(long low, long high) { return (pGenerator->asLong() % (high-low+1)) + low; } inline long RandomInteger:: asLong() { return _asLong(pLow, pHigh); } inline long RandomInteger:: asLong(long high) { return _asLong(pLow, high); } inline long RandomInteger:: asLong(long low, long high) { return _asLong(low, high); } inline long RandomInteger:: operator () () { return _asLong(pLow, pHigh); } inline long RandomInteger:: operator () (long high) { return _asLong(pLow, high); } inline long RandomInteger:: operator () (long low, long high) { return _asLong(low, high); } inline int RandomInteger:: asInt() { return int(asLong()); } #endif neuron-7.5/src/gnu/SmplHist.cpp000077500000000000000000000052451323325274500165410ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include #ifndef HUGE_VAL #ifdef HUGE #define HUGE_VAL HUGE #else #include #define HUGE_VAL DBL_MAX #endif #endif const int SampleHistogramMinimum = -2; const int SampleHistogramMaximum = -1; SampleHistogram::SampleHistogram(double low, double high, double width) { if (high < low) { double t = high; high = low; low = t; } if (width == -1) { width = (high - low) / 10; } howManyBuckets = int((high - low) / width) + 2; bucketCount = new int[howManyBuckets]; bucketLimit = new double[howManyBuckets]; double lim = low; for (int i = 0; i < howManyBuckets; i++) { bucketCount[i] = 0; bucketLimit[i] = lim; lim += width; } bucketLimit[howManyBuckets-1] = HUGE_VAL; /* from math.h */ } SampleHistogram::~SampleHistogram() { if (howManyBuckets > 0) { delete bucketCount; delete bucketLimit; } } void SampleHistogram::operator+=(double value) { int i; for (i = 0; i < howManyBuckets; i++) { if (value < bucketLimit[i]) break; } bucketCount[i]++; this->SampleStatistic::operator+=(value); } int SampleHistogram::similarSamples(double d) { int i; for (i = 0; i < howManyBuckets; i++) { if (d < bucketLimit[i]) return(bucketCount[i]); } return(0); } void SampleHistogram::printBuckets(ostream& s) { for(int i = 0; i < howManyBuckets; i++) { if (bucketLimit[i] >= HUGE_VAL) { s << "< max : " << bucketCount[i] << "\n"; } else { s << "< " << bucketLimit[i] << " : " << bucketCount[i] << "\n"; } } } void SampleHistogram::reset() { this->SampleStatistic::reset(); if (howManyBuckets > 0) { for (register int i = 0; i < howManyBuckets; i++) { bucketCount[i] = 0; } } } neuron-7.5/src/gnu/SmplHist.h000077500000000000000000000036611323325274500162060ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SampleHistogram_h #ifdef __GNUG__ //#pragma interface #endif #define SampleHistogram_h 1 #include #include extern const int SampleHistogramMinimum; extern const int SampleHistogramMaximum; class SampleHistogram : public SampleStatistic { protected: short howManyBuckets; int *bucketCount; double *bucketLimit; public: SampleHistogram(double low, double hi, double bucketWidth = -1.0); ~SampleHistogram(); virtual void reset(); virtual void operator+=(double); int similarSamples(double); int buckets(); double bucketThreshold(int i); int inBucket(int i); void printBuckets(ostream&); }; inline int SampleHistogram:: buckets() { return(howManyBuckets); }; inline double SampleHistogram:: bucketThreshold(int i) { if (i < 0 || i >= howManyBuckets) error("invalid bucket access"); return(bucketLimit[i]); } inline int SampleHistogram:: inBucket(int i) { if (i < 0 || i >= howManyBuckets) error("invalid bucket access"); return(bucketCount[i]); } #endif neuron-7.5/src/gnu/SmplStat.cpp000077500000000000000000000072171323325274500165460ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include #include #ifndef HUGE_VAL #ifdef HUGE #define HUGE_VAL HUGE #else #include #define HUGE_VAL DBL_MAX #endif #endif // error handling void default_SampleStatistic_error_handler(const char* msg) { cerr << "Fatal SampleStatistic error. " << msg << "\n"; exit(1); } one_arg_error_handler_t SampleStatistic_error_handler = default_SampleStatistic_error_handler; one_arg_error_handler_t set_SampleStatistic_error_handler(one_arg_error_handler_t f) { one_arg_error_handler_t old = SampleStatistic_error_handler; SampleStatistic_error_handler = f; return old; } void SampleStatistic::error(const char* msg) { (*SampleStatistic_error_handler)(msg); } // t-distribution: given p-value and degrees of freedom, return t-value // adapted from Peizer & Pratt JASA, vol63, p1416 double tval(double p, int df) { double t; int positive = p >= 0.5; p = (positive)? 1.0 - p : p; if (p <= 0.0 || df <= 0) t = HUGE_VAL; else if (p == 0.5) t = 0.0; else if (df == 1) t = 1.0 / tan((p + p) * 1.57079633); else if (df == 2) t = sqrt(1.0 / ((p + p) * (1.0 - p)) - 2.0); else { double ddf = df; double a = sqrt(log(1.0 / (p * p))); double aa = a * a; a = a - ((2.515517 + (0.802853 * a) + (0.010328 * aa)) / (1.0 + (1.432788 * a) + (0.189269 * aa) + (0.001308 * aa * a))); t = ddf - 0.666666667 + 1.0 / (10.0 * ddf); t = sqrt(ddf * (exp(a * a * (ddf - 0.833333333) / (t * t)) - 1.0)); } return (positive)? t : -t; } void SampleStatistic::reset() { n = 0; x = x2 = 0.0; maxValue = -HUGE_VAL; minValue = HUGE_VAL; } void SampleStatistic::operator+=(double value) { n += 1; x += value; x2 += (value * value); if ( minValue > value) minValue = value; if ( maxValue < value) maxValue = value; } double SampleStatistic::mean() { if ( n > 0) { return (x / n); } else { return ( 0.0 ); } } double SampleStatistic::var() { if ( n > 1) { return(( x2 - ((x * x) / n)) / ( n - 1)); } else { return ( 0.0 ); } } double SampleStatistic::stdDev() { if ( n <= 0 || this -> var() <= 0) { return(0); } else { return( (double) sqrt( var() ) ); } } double SampleStatistic::confidence(int interval) { int df = n - 1; if (df <= 0) return HUGE_VAL; double t = tval(double(100 + interval) * 0.005, df); if (t == HUGE_VAL) return t; else return (t * stdDev()) / sqrt(double(n)); } double SampleStatistic::confidence(double p_value) { int df = n - 1; if (df <= 0) return HUGE_VAL; double t = tval((1.0 + p_value) * 0.5, df); if (t == HUGE_VAL) return t; else return (t * stdDev()) / sqrt(double(n)); } neuron-7.5/src/gnu/SmplStat.h000077500000000000000000000037531323325274500162140ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SampleStatistic_h #ifdef __GNUG__ //#pragma interface #endif #define SampleStatistic_h 1 #include class SampleStatistic { protected: int n; double x; double x2; double minValue, maxValue; public : SampleStatistic(); virtual ~SampleStatistic(); virtual void reset(); virtual void operator+=(double); int samples(); double mean(); double stdDev(); double var(); double min(); double max(); double confidence(int p_percentage); double confidence(double p_value); void error(const char* msg); }; // error handlers extern void default_SampleStatistic_error_handler(const char*); extern one_arg_error_handler_t SampleStatistic_error_handler; extern one_arg_error_handler_t set_SampleStatistic_error_handler(one_arg_error_handler_t f); inline SampleStatistic:: SampleStatistic(){ reset();} inline int SampleStatistic:: samples() {return(n);} inline double SampleStatistic:: min() {return(minValue);} inline double SampleStatistic:: max() {return(maxValue);} inline SampleStatistic::~SampleStatistic() {} #endif neuron-7.5/src/gnu/Uniform.cpp000077500000000000000000000020431323325274500164060ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include double Uniform::operator()() { return( pLow + delta * pGenerator -> asDouble() ); } neuron-7.5/src/gnu/Uniform.h000077500000000000000000000034141323325274500160560ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Uniform_h #ifdef __GNUG__ //#pragma interface #endif #define _Uniform_h 1 #include // // The interval [lo..hi] // class Uniform: public Random { double pLow; double pHigh; double delta; public: Uniform(double low, double high, RNG *gen); double low(); double low(double x); double high(); double high(double x); virtual double operator()(); }; inline Uniform::Uniform(double low, double high, RNG *gen) : Random(gen) { pLow = (low < high) ? low : high; pHigh = (low < high) ? high : low; delta = pHigh - pLow; } inline double Uniform::low() { return pLow; } inline double Uniform::low(double x) { double tmp = pLow; pLow = x; delta = pHigh - pLow; return tmp; } inline double Uniform::high() { return pHigh; } inline double Uniform::high(double x) { double tmp = pHigh; pHigh = x; delta = pHigh - pLow; return tmp; } #endif neuron-7.5/src/gnu/Weibull.cpp000077500000000000000000000022461323325274500163770ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include // // See Simulation, Modelling & Analysis by Law & Kelton, pp259 // // This is the ``polar'' method. // double Weibull::operator()() { return( pow(pBeta * ( - log(1 - pGenerator -> asDouble()) ), pInvAlpha) ); } neuron-7.5/src/gnu/Weibull.h000077500000000000000000000034271323325274500160460ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Dirk Grunwald (grunwald@cs.uiuc.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _Weibull_h #ifdef __GNUG__ //#pragma interface #endif #define _Weibull_h #include class Weibull: public Random { protected: double pAlpha; double pInvAlpha; double pBeta; void setState(); public: Weibull(double alpha, double beta, RNG *gen); double alpha(); double alpha(double x); double beta(); double beta(double x); virtual double operator()(); }; inline void Weibull::setState() { pInvAlpha = 1.0 / pAlpha; } inline Weibull::Weibull(double alpha, double beta, RNG *gen) : Random(gen) { pAlpha = alpha; pBeta = beta; setState(); } inline double Weibull::alpha() { return pAlpha; } inline double Weibull::alpha(double x) { double tmp = pAlpha; pAlpha = x; setState(); return tmp; } inline double Weibull::beta() { return pBeta; }; inline double Weibull::beta(double x) { double tmp = pBeta; pBeta = x; return tmp; }; #endif neuron-7.5/src/gnu/builtin.cpp000077500000000000000000000001511323325274500164330ustar00rootroot00000000000000#include <../../nrnconf.h> #ifdef __GNUG__ #pragma implementation #endif #include neuron-7.5/src/gnu/d_avec.cpp000077500000000000000000000214651323325274500162210ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include "d_avec.h" /* The following brought to you by the department of redundancy department */ doubleAVec& doubleAVec::operator = (doubleAVec& v) { if (len != 0 && len != v.capacity()) error("nonconformant vectors."); if (len == 0) s = new double [space = len = v.capacity()]; if (s != v.vec()) { for (int i = 0; i < len; ++i) s[i] = v.vec()[i]; } return *this; } doubleAVec& doubleAVec::operator = (double f) { for (int i = 0; i < len; ++i) s[i] = f; return *this; } doubleAVec& concat(doubleAVec & a, doubleAVec & b) { int newl = a.capacity() + b.capacity(); doubleAVec* news = new doubleAVec(newl); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); while (t < top) *p++ = *t++; top = &(b.vec()[b.capacity()]); t = b.vec(); while (t < top) *p++ = *t++; return *news; } doubleAVec& combine(doubleCombiner f, doubleAVec& a, doubleAVec& b) { int newl = (a.capacity() < b.capacity())? a.capacity() : b.capacity(); doubleAVec* news = new doubleAVec(newl); double* p = news->s; double* top = &(a.vec()[newl]); double* t = a.vec(); double* u = b.vec(); while (t < top) *p++ = (*f)(*t++, *u++); return *news; } doubleAVec& reverse(doubleAVec& a) { doubleAVec* news = new doubleAVec(a.capacity()); if (a.capacity() != 0) { double* lo = news->s; double* hi = &(news->s[a.capacity() - 1]); while (lo < hi) { double tmp = *lo; *lo++ = *hi; *hi-- = tmp; } } return *news; } doubleAVec& mymap(doubleMapper f, doubleAVec& a) { doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); while(t < top) *p++ = (*f)(*t++); return *news; } doubleAVec& doubleAVec::at(int from, int n) { int to; if (n < 0) { n = len - from; to = len - 1; } else to = from + n - 1; if ((unsigned)from > (unsigned)to) range_error(); doubleAVec* news = new doubleAVec(n); double* p = news->s; double* t = &(s[from]); double* top = &(s[to]); while (t <= top) *p++ = *t++; return *news; } doubleAVec& merge(doubleAVec & a, doubleAVec & b, doubleComparator f) { int newl = a.capacity() + b.capacity(); doubleAVec* news = new doubleAVec(newl); double* p = news->s; double* topa = &(a.vec()[a.capacity()]); double* as = a.vec(); double* topb = &(b.vec()[b.capacity()]); double* bs = b.vec(); for (;;) { if (as >= topa) { while (bs < topb) *p++ = *bs++; break; } else if (bs >= topb) { while (as < topa) *p++ = *as++; break; } else if ((*f)(*as, *bs) <= 0) *p++ = *as++; else *p++ = *bs++; } return *news; } doubleAVec& operator + (doubleAVec& a, doubleAVec& b) { a.check_len(b.capacity()); doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); double* u = b.vec(); while (t < top) *p++ = *t++ + *u++; return *news; } doubleAVec& operator - (doubleAVec& a, doubleAVec& b) { a.check_len(b.capacity()); doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); double* u = b.vec(); while (t < top) *p++ = *t++ - *u++; return *news; } doubleAVec& product(doubleAVec& a, doubleAVec& b) { a.check_len(b.capacity()); doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); double* u = b.vec(); while (t < top) *p++ = *t++ * *u++; return *news; } doubleAVec& quotient(doubleAVec& a, doubleAVec& b) { a.check_len(b.capacity()); doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); double* u = b.vec(); while (t < top) *p++ = *t++ / *u++; return *news; } doubleAVec& operator + (doubleAVec& a, double b) { doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); while (t < top) *p++ = *t++ + b; return *news; } doubleAVec& operator - (doubleAVec& a, double b) { doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); while (t < top) *p++ = *t++ - b; return *news; } doubleAVec& operator * (doubleAVec& a, double b) { doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); while (t < top) *p++ = *t++ * b; return *news; } doubleAVec& operator / (doubleAVec& a, double b) { doubleAVec* news = new doubleAVec(a.capacity()); double* p = news->s; double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); while (t < top) *p++ = *t++ / b; return *news; } doubleAVec& doubleAVec::operator - () { doubleAVec* news = new doubleAVec(len); double* p = news->s; double* top = &(s[len]); double* t = s; while (t < top) *p++ = -(*t++); return *news; } doubleAVec& doubleAVec::operator += (doubleAVec& b) { check_len(b.capacity()); double* u = b.vec(); double* top = &(s[len]); double* t = s; while (t < top) *t++ += *u++; return *this; } doubleAVec& doubleAVec::operator -= (doubleAVec& b) { check_len(b.capacity()); double* u = b.vec(); double* top = &(s[len]); double* t = s; while (t < top) *t++ -= *u++; return *this; } doubleAVec& doubleAVec::product(doubleAVec& b) { check_len(b.capacity()); double* u = b.vec(); double* top = &(s[len]); double* t = s; while (t < top) *t++ *= *u++; return *this; } doubleAVec& doubleAVec::quotient(doubleAVec& b) { check_len(b.capacity()); double* u = b.vec(); double* top = &(s[len]); double* t = s; while (t < top) *t++ /= *u++; return *this; } doubleAVec& doubleAVec::operator += (double b) { double* top = &(s[len]); double* t = s; while (t < top) *t++ += b; return *this; } doubleAVec& doubleAVec::operator -= (double b) { double* top = &(s[len]); double* t = s; while (t < top) *t++ -= b; return *this; } doubleAVec& doubleAVec::operator *= (double b) { double* top = &(s[len]); double* t = s; while (t < top) *t++ *= b; return *this; } doubleAVec& doubleAVec::operator /= (double b) { double* top = &(s[len]); double* t = s; while (t < top) *t++ /= b; return *this; } double doubleAVec::max() { if (len == 0) return 0; double* top = &(s[len]); double* t = s; double res = *t++; for (; t < top; ++t) if (*t > res) res = *t; return res; } int doubleAVec::max_index() { if (len == 0) return -1; int ind = 0; for (int i = 1; i < len; ++i) if (s[i] > s[ind]) ind = i; return ind; } double doubleAVec::min() { if (len == 0) return 0; double* top = &(s[len]); double* t = s; double res = *t++; for (; t < top; ++t) if (*t < res) res = *t; return res; } int doubleAVec::min_index() { if (len == 0) return -1; int ind = 0; for (int i = 1; i < len; ++i) if (s[i] < s[ind]) ind = i; return ind; } double doubleAVec::sum() { double res = 0; double* top = &(s[len]); double* t = s; while (t < top) res += *t++; return res; } double doubleAVec::sumsq() { double res = 0; double* top = &(s[len]); double* t = s; for (; t < top; ++t) res += *t * *t; return res; } double doubleAVec::mean() { return sum()/len; } double doubleAVec::var() { double res = 0; double* top = &(s[len]); double* t = s; double m = mean(); for (; t < top; ++t) res += (*t - m) * (*t - m); return res/(len-1); } double doubleAVec::stdDev() { return sqrt(var()); } double operator * (doubleAVec& a, doubleAVec& b) { a.check_len(b.capacity()); double* top = &(a.vec()[a.capacity()]); double* t = a.vec(); double* u = b.vec(); double res = 0; while (t < top) res += *t++ * *u++; return res; } neuron-7.5/src/gnu/d_avec.h000077500000000000000000000077571323325274500156760ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Modifed by ZFM vec() made public var(), stdDev(), mean() added */ #ifndef _doubleAVec_h #ifdef __GNUG__ //#pragma interface #endif #define _doubleAVec_h 1 #include "d_vec.h" class doubleAVec : public doubleVec { protected: void check_len(int l); doubleAVec(int l, double* d); public: double* vec(); doubleAVec (); doubleAVec (int l); doubleAVec (int l, double fill_value); doubleAVec (doubleAVec&); ~doubleAVec (); doubleAVec& operator = (doubleAVec& a); doubleAVec& operator = (double fill_value); // vector by scalar -> vector operations friend doubleAVec& operator + (doubleAVec& a, double b); friend doubleAVec& operator - (doubleAVec& a, double b); friend doubleAVec& operator * (doubleAVec& a, double b); friend doubleAVec& operator / (doubleAVec& a, double b); doubleAVec& operator += (double b); doubleAVec& operator -= (double b); doubleAVec& operator *= (double b); doubleAVec& operator /= (double b); // vector by vector -> vector operations friend doubleAVec& operator + (doubleAVec& a, doubleAVec& b); friend doubleAVec& operator - (doubleAVec& a, doubleAVec& b); doubleAVec& operator += (doubleAVec& b); doubleAVec& operator -= (doubleAVec& b); doubleAVec& operator - (); friend doubleAVec& product(doubleAVec& a, doubleAVec& b); doubleAVec& product(doubleAVec& b); friend doubleAVec& quotient(doubleAVec& a, doubleAVec& b); doubleAVec& quotient(doubleAVec& b); // vector -> scalar operations friend double operator * (doubleAVec& a, doubleAVec& b); #undef min #undef max double sum(); double min(); double max(); double sumsq(); double var(); double mean(); double stdDev(); // indexing int min_index(); int max_index(); // redundant but necesssary friend doubleAVec& concat(doubleAVec& a, doubleAVec& b); friend doubleAVec& mymap(doubleMapper f, doubleAVec& a); friend doubleAVec& merge(doubleAVec& a, doubleAVec& b, doubleComparator f); friend doubleAVec& combine(doubleCombiner f, doubleAVec& a, doubleAVec& b); friend doubleAVec& reverse(doubleAVec& a); doubleAVec& at(int from = 0, int n = -1); }; inline doubleAVec::doubleAVec() {} inline doubleAVec::doubleAVec(int l) :doubleVec(l) {} inline doubleAVec::doubleAVec(int l, double fill_value) : doubleVec (l, fill_value) {} inline doubleAVec::doubleAVec(doubleAVec& v) :doubleVec(v) {} inline doubleAVec::doubleAVec(int l, double* d) :doubleVec(l, d) {} inline doubleAVec::~doubleAVec() {} inline double* doubleAVec::vec() { return s; } inline void doubleAVec::check_len(int l) { if (l != len) error("nonconformant vectors."); } #endif neuron-7.5/src/gnu/d_defs.h000077500000000000000000000033511323325274500156630ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _doubledefs_h #define _doubledefs_h 1 // equality operator #ifndef doubleEQ #define doubleEQ(a, b) ((a) == (b)) #endif // less-than-or-equal #ifndef doubleLE #define doubleLE(a, b) ((a) <= (b)) #endif // comparison : less-than -> < 0; equal -> 0; greater-than -> > 0 #ifndef doubleCMP #define doubleCMP(a, b) ( ((a) <= (b))? (((a) == (b))? 0 : -1) : 1 ) #endif // hash function #ifndef doubleHASH extern unsigned int hash(double ); #define doubleHASH(x) hash(x) #endif // initial capacity for structures requiring one #ifndef DEFAULT_INITIAL_CAPACITY #define DEFAULT_INITIAL_CAPACITY 100 #endif // HASHTABLE_TOO_CROWDED(COUNT, SIZE) is true iff a hash table with COUNT // elements and SIZE slots is too full, and should be resized. // This is so if available space is less than 1/8. #define HASHTABLE_TOO_CROWDED(COUNT, SIZE) ((SIZE) - ((SIZE) >> 3) <= (COUNT)) #endif neuron-7.5/src/gnu/d_vec.cpp000077500000000000000000000330421323325274500160520ustar00rootroot00000000000000#include <../../nrnconf.h> // This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef __GNUG__ #pragma implementation #endif #include #include #include #include "d_vec.h" //Machintosh definition for vector != #ifdef MAC int operator != (doubleVec& a, doubleVec& b) { return !(a == b); } #endif // error handling extern "C" {extern void hoc_execerror(const char*, const char*);} void default_doubleVec_error_handler(const char* msg) { #if 1 hoc_execerror("Vector error:", msg); #else cerr << "Fatal doubleVec error. " << msg << "\n"; exit(1); #endif } one_arg_error_handler_t doubleVec_error_handler = default_doubleVec_error_handler; one_arg_error_handler_t set_doubleVec_error_handler(one_arg_error_handler_t f) { one_arg_error_handler_t old = doubleVec_error_handler; doubleVec_error_handler = f; return old; } void doubleVec::error(const char* msg) { (*doubleVec_error_handler)(msg); } void doubleVec::range_error() { (*doubleVec_error_handler)("Index out of range."); } doubleVec::doubleVec(doubleVec& v) { s = new double [space = len = v.len]; double* top = &(s[len]); double* t = s; double* u = v.s; while (t < top) *t++ = *u++; } doubleVec::doubleVec(int l, double fill_value) { s = new double [space = len = l]; double* top = &(s[len]); double* t = s; while (t < top) *t++ = fill_value; } doubleVec& doubleVec::operator = (doubleVec& v) { if (this != &v) { delete [] s; s = new double [space = len = v.len]; double* top = &(s[len]); double* t = s; double* u = v.s; while (t < top) *t++ = *u++; } return *this; } void doubleVec::apply(doubleProcedure f) { double* top = &(s[len]); double* t = s; while (t < top) (*f)(*t++); } #if 0 As you mentioned, resizing vectors is an expensive process involving allocate new space, copy, release old space. Of course this is entirely appropriate for most usage but not when vectors are used to represent streams where the size repeatedly runs from 0 to some indeterminate number. In this case we want them to be able to grow and shrink efficiently. My proposal is to manage storage a bit differently. The result will be that vectors behave exactly as now (capacity() equals the protected variable len) but the memory allocation is decoupled from this number and this space tends to grow in moderate sized chunks but never gets released until the entire vector object is destructed. This means that a resize merely changes len as long as len < space. #endif // can't just realloc since there may be need for constructors/destructors void doubleVec::resize(int newl) { if (newl > space) { double* news = new double [newl]; double* p = news; int minl = (len < newl)? len : newl; double* top = &(s[minl]); double* t = s; while (t < top) *p++ = *t++; delete [] s; s = news; space = newl; } len = newl; } doubleVec& concat(doubleVec & a, doubleVec & b) { int newl = a.len + b.len; doubleVec* news = new doubleVec(newl); double* p = news->s; double* top = &(a.s[a.len]); double* t = a.s; while (t < top) *p++ = *t++; top = &(b.s[b.len]); t = b.s; while (t < top) *p++ = *t++; return *news; } doubleVec& combine(doubleCombiner f, doubleVec& a, doubleVec& b) { int newl = (a.len < b.len)? a.len : b.len; doubleVec* news = new doubleVec(newl); double* p = news->s; double* top = &(a.s[newl]); double* t = a.s; double* u = b.s; while (t < top) *p++ = (*f)(*t++, *u++); return *news; } double doubleVec::reduce(doubleCombiner f, double base) { double r = base; double* top = &(s[len]); double* t = s; while (t < top) r = (*f)(r, *t++); return r; } doubleVec& reverse(doubleVec& a) { doubleVec* news = new doubleVec(a.len); if (a.len != 0) { double* lo = news->s; double* hi = &(news->s[a.len - 1]); while (lo < hi) { double tmp = *lo; *lo++ = *hi; *hi-- = tmp; } } return *news; } void doubleVec::reverse() { if (len != 0) { double* lo = s; double* hi = &(s[len - 1]); while (lo < hi) { double tmp = *lo; *lo++ = *hi; *hi-- = tmp; } } } int doubleVec::index(double targ) { for (int i = 0; i < len; ++i) if (doubleEQ(targ, s[i])) return i; return -1; } doubleVec& mymap(doubleMapper f, doubleVec& a) { doubleVec* news = new doubleVec(a.len); double* p = news->s; double* top = &(a.s[a.len]); double* t = a.s; while(t < top) *p++ = (*f)(*t++); return *news; } int operator == (doubleVec& a, doubleVec& b) { if (a.len != b.len) return 0; double* top = &(a.s[a.len]); double* t = a.s; double* u = b.s; while (t < top) if (!(doubleEQ(*t++, *u++))) return 0; return 1; } void doubleVec::fill(double val, int from, int n) { int to; if (n < 0) to = len - 1; else to = from + n - 1; if ((unsigned)from > (unsigned)to) range_error(); double* t = &(s[from]); double* top = &(s[to]); while (t <= top) *t++ = val; } doubleVec& doubleVec::at(int from, int n) { int to; if (n < 0) { n = len - from; to = len - 1; } else to = from + n - 1; if ((unsigned)from > (unsigned)to) range_error(); doubleVec* news = new doubleVec(n); double* p = news->s; double* t = &(s[from]); double* top = &(s[to]); while (t <= top) *p++ = *t++; return *news; } doubleVec& merge(doubleVec & a, doubleVec & b, doubleComparator f) { int newl = a.len + b.len; doubleVec* news = new doubleVec(newl); double* p = news->s; double* topa = &(a.s[a.len]); double* as = a.s; double* topb = &(b.s[b.len]); double* bs = b.s; for (;;) { if (as >= topa) { while (bs < topb) *p++ = *bs++; break; } else if (bs >= topb) { while (as < topa) *p++ = *as++; break; } else if ((*f)(*as, *bs) <= 0) *p++ = *as++; else *p++ = *bs++; } return *news; } static int gsort(double*, int, doubleComparator); void doubleVec::sort (doubleComparator compar) { gsort(s, len, compar); } // An adaptation of Schmidt's new quicksort static inline void SWAP(double* A, double* B) { double tmp = *A; *A = *B; *B = tmp; } /* This should be replaced by a standard ANSI macro. */ #define BYTES_PER_WORD 8 #define BYTES_PER_LONG 4 /* The next 4 #defines implement a very fast in-line stack abstraction. */ #define STACK_SIZE (BYTES_PER_WORD * BYTES_PER_LONG) #define PUSH(LOW,HIGH) do {top->lo = LOW;top++->hi = HIGH;} while (0) #define POP(LOW,HIGH) do {LOW = (--top)->lo;HIGH = top->hi;} while (0) #define STACK_NOT_EMPTY (stack < top) /* Discontinue quicksort algorithm when partition gets below this size. This particular magic number was chosen to work best on a Sun 4/260. */ #define MAX_THRESH 4 /* Order size using quicksort. This implementation incorporates four optimizations discussed in Sedgewick: 1. Non-recursive, using an explicit stack of pointer that store the next array partition to sort. To save time, this maximum amount of space required to store an array of MAX_INT is allocated on the stack. Assuming a 32-bit integer, this needs only 32 * sizeof (stack_node) == 136 bits. Pretty cheap, actually. 2. Chose the pivot element using a median-of-three decision tree. This reduces the probability of selecting a bad pivot value and eliminates certain extraneous comparisons. 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving insertion sort to order the MAX_THRESH items within each partition. This is a big win, since insertion sort is faster for small, mostly sorted array segements. 4. The larger of the two sub-partitions is always pushed onto the stack first, with the algorithm then concentrating on the smaller partition. This *guarantees* no more than log (n) stack size is needed! */ static int gsort (double *base_ptr, int total_elems, doubleComparator cmp) { /* Stack node declarations used to store unfulfilled partition obligations. */ struct stack_node { double *lo; double *hi; }; double pivot_buffer; int max_thresh = MAX_THRESH; if (total_elems > MAX_THRESH) { double *lo = base_ptr; double *hi = lo + (total_elems - 1); double *left_ptr; double *right_ptr; stack_node stack[STACK_SIZE]; /* Largest size needed for 32-bit int!!! */ stack_node *top = stack + 1; while (STACK_NOT_EMPTY) { { double *pivot = &pivot_buffer; { /* Select median value from among LO, MID, and HI. Rearrange LO and HI so the three values are sorted. This lowers the probability of picking a pathological pivot value and skips a comparison for both the LEFT_PTR and RIGHT_PTR. */ double *mid = lo + ((hi - lo) >> 1); if ((*cmp) (*mid, *lo) < 0) SWAP (mid, lo); if ((*cmp) (*hi, *mid) < 0) { SWAP (mid, hi); if ((*cmp) (*mid, *lo) < 0) SWAP (mid, lo); } *pivot = *mid; pivot = &pivot_buffer; } left_ptr = lo + 1; right_ptr = hi - 1; /* Here's the famous ``collapse the walls'' section of quicksort. Gotta like those tight inner loops! They are the main reason that this algorithm runs much faster than others. */ do { while ((*cmp) (*left_ptr, *pivot) < 0) left_ptr += 1; while ((*cmp) (*pivot, *right_ptr) < 0) right_ptr -= 1; if (left_ptr < right_ptr) { SWAP (left_ptr, right_ptr); left_ptr += 1; right_ptr -= 1; } else if (left_ptr == right_ptr) { left_ptr += 1; right_ptr -= 1; break; } } while (left_ptr <= right_ptr); } /* Set up pointers for next iteration. First determine whether left and right partitions are below the threshold size. If so, ignore one or both. Otherwise, push the larger partition's bounds on the stack and continue sorting the smaller one. */ if ((right_ptr - lo) <= max_thresh) { if ((hi - left_ptr) <= max_thresh) /* Ignore both small partitions. */ POP (lo, hi); else /* Ignore small left partition. */ lo = left_ptr; } else if ((hi - left_ptr) <= max_thresh) /* Ignore small right partition. */ hi = right_ptr; else if ((right_ptr - lo) > (hi - left_ptr)) /* Push larger left partition indices. */ { PUSH (lo, right_ptr); lo = left_ptr; } else /* Push larger right partition indices. */ { PUSH (left_ptr, hi); hi = right_ptr; } } } /* Once the BASE_PTR array is partially sorted by quicksort the rest is completely sorted using insertion sort, since this is efficient for partitions below MAX_THRESH size. BASE_PTR points to the beginning of the array to sort, and END_PTR points at the very last element in the array (*not* one beyond it!). */ { double *end_ptr = base_ptr + 1 * (total_elems - 1); double *run_ptr; double *tmp_ptr = base_ptr; double *thresh = (end_ptr < (base_ptr + max_thresh))? end_ptr : (base_ptr + max_thresh); /* Find smallest element in first threshold and place it at the array's beginning. This is the smallest array element, and the operation speeds up insertion sort's inner loop. */ for (run_ptr = tmp_ptr + 1; run_ptr <= thresh; run_ptr += 1) if ((*cmp) (*run_ptr, *tmp_ptr) < 0) tmp_ptr = run_ptr; if (tmp_ptr != base_ptr) SWAP (tmp_ptr, base_ptr); /* Insertion sort, running from left-hand-side up to `right-hand-side.' Pretty much straight out of the original GNU qsort routine. */ for (run_ptr = base_ptr + 1; (tmp_ptr = run_ptr += 1) <= end_ptr; ) { while ((*cmp) (*run_ptr, *(tmp_ptr -= 1)) < 0) ; if ((tmp_ptr += 1) != run_ptr) { double *trav; for (trav = run_ptr + 1; --trav >= run_ptr;) { double c = *trav; double *hi, *lo; for (hi = lo = trav; (lo -= 1) >= tmp_ptr; hi = lo) *hi = *lo; *hi = c; } } } } return 1; } neuron-7.5/src/gnu/d_vec.h000077500000000000000000000073051323325274500155220ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _doubleVec_h #ifdef __GNUG__ //#pragma interface #endif #define _doubleVec_h 1 #include #include "d_defs.h" #ifndef _double_typedefs #define _double_typedefs 1 typedef void (*doubleProcedure)(double ); typedef double (*doubleMapper)(double ); typedef double (*doubleCombiner)(double , double ); typedef int (*doublePredicate)(double ); typedef int (*doubleComparator)(double , double ); #endif class doubleVec { protected: int len; int space; //allocated memory size double *s; doubleVec(int l, double* d); public: doubleVec (); doubleVec (int l); doubleVec (int l, double fill_value); doubleVec (doubleVec&); ~doubleVec (); doubleVec & operator = (doubleVec & a); doubleVec& at(int from = 0, int n = -1); int capacity(); void resize(int newlen); double& operator [] (int n); double& elem(int n); friend doubleVec& concat(doubleVec & a, doubleVec & b); friend doubleVec& mymap(doubleMapper f, doubleVec & a); friend doubleVec& merge(doubleVec & a, doubleVec & b, doubleComparator f); friend doubleVec& combine(doubleCombiner f, doubleVec & a, doubleVec & b); friend doubleVec& reverse(doubleVec & a); void reverse(); void sort(doubleComparator f); void fill(double val, int from = 0, int n = -1); void apply(doubleProcedure f); double reduce(doubleCombiner f, double base); int index(double targ); friend int operator == (doubleVec& a, doubleVec& b); friend int operator != (doubleVec& a, doubleVec& b); void error(const char* msg); void range_error(); }; extern void default_doubleVec_error_handler(const char*); extern one_arg_error_handler_t doubleVec_error_handler; extern one_arg_error_handler_t set_doubleVec_error_handler(one_arg_error_handler_t f); inline doubleVec::doubleVec() { len = 0; s = 0; space = 0; } inline doubleVec::doubleVec(int l) { s = new double [space = len = l]; } inline doubleVec::doubleVec(int l, double* d) :len(l), space(l), s(d) {} inline doubleVec::~doubleVec() { delete [] s; } inline double& doubleVec::operator [] (int n) { if ((unsigned)n >= (unsigned)len) range_error(); return s[n]; } inline double& doubleVec::elem(int n) { return s[n]; } inline int doubleVec::capacity() { return len; } #ifndef MAC inline int operator != (doubleVec& a, doubleVec& b) { return !(a == b); } #endif #endif neuron-7.5/src/gnu/neuron_gnu_builtin.h000077500000000000000000000077301323325274500203510ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988, 1992 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* arithmetic, etc. functions on built in types */ #ifndef _builtin_h #ifdef __GNUG__ //#pragma interface #endif #define _builtin_h 1 #include //#include #include #ifdef __GNUG__ #define _VOLATILE_VOID volatile void #else #define _VOLATILE_VOID void #endif typedef void (*one_arg_error_handler_t)(const char*); typedef void (*two_arg_error_handler_t)(const char*, const char*); #define HAVE_GCD 0 #if HAVE_GCD long gcd(long, long); #endif long lg(unsigned long); double pow(double, long); #if !defined(WIN32) && !defined(__MWERKS__) long pow(long, long); #endif double start_timer(); double return_elapsed_time(double last_time = 0.0); char* dtoa(double x, char cvt = 'g', int width = 0, int prec = 6); //char* chr(char ch, int width = 0); //char* str(const char* s, int width = 0); unsigned int hashpjw(const char*); unsigned int multiplicativehash(int); unsigned int foldhash(double); extern _VOLATILE_VOID default_one_arg_error_handler(const char*); extern _VOLATILE_VOID default_two_arg_error_handler(const char*, const char*); extern two_arg_error_handler_t lib_error_handler; extern two_arg_error_handler_t set_lib_error_handler(two_arg_error_handler_t f); // sunpro CC v4 complains about the following being both extern and inline #if !defined(__SUNPRO_CC) #if 0 double abs(double arg); float abs(float arg); long abs(long arg); #endif short abs(short arg); int sign(long arg); int sign(double arg); long sqr(long arg); double sqr(double arg); int even(long arg); int odd(long arg); #if HAVE_GCD long lcm(long x, long y); #endif void (setbit)(long& x, long b); void clearbit(long& x, long b); int testbit(long x, long b); #endif #if !defined(IV) #ifndef __xlC__ #ifndef __OBJECTCENTER__ #ifndef __hpux /* hpux defines this in math.h */ #ifndef ultrix /* ultrix defines this in math.h */ #if 0 && !defined(WIN32) && !defined(__MWERKS__) inline double abs(double arg) { return (arg < 0.0)? -arg : arg; } #endif #endif #endif #endif #if 0 && INLINE_FLOAT_ABS inline float abs(float arg) { return (arg < 0.0)? -arg : arg; } #endif inline short abs(short arg) { return (arg < 0)? -arg : arg; } #if 0 && INLINE_LONG_ABS inline long abs(long arg) { return (arg < 0)? -arg : arg; } #endif #endif // not __xlC__ inline int sign(long arg) { return (arg == 0) ? 0 : ( (arg > 0) ? 1 : -1 ); } inline int sign(double arg) { return (arg == 0.0) ? 0 : ( (arg > 0.0) ? 1 : -1 ); } inline long sqr(long arg) { return arg * arg; } #ifndef __OBJECTCENTER__ #ifndef __hpux /* hpux defines this in math.h */ #ifndef ultrix /* ultrix defines this in math.h */ inline double sqr(double arg) { return arg * arg; } #endif #endif #endif inline int even(long arg) { return !(arg & 1); } inline int odd(long arg) { return (arg & 1); } #if HAVE_GCD inline long lcm(long x, long y) { return x / gcd(x, y) * y; } #endif inline void (setbit)(long& x, long b) { x |= (1 << b); } inline void clearbit(long& x, long b) { x &= ~(1 << b); } inline int testbit(long x, long b) { return ((x & (1 << b)) != 0); } #endif #endif neuron-7.5/src/gnu/neuron_gnu_std.h000077500000000000000000000021751323325274500174730ustar00rootroot00000000000000// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988, 1992 Free Software Foundation written by Doug Lea (dl@rocky.oswego.edu) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _std_h #define _std_h 1 #include #include #include #ifndef WIN32 #include #endif #include #include #include /* extern "C" { int strcasecmp(const char*, const char*); } */ #endif neuron-7.5/src/ivoc/000077500000000000000000000000001323325274500144305ustar00rootroot00000000000000neuron-7.5/src/ivoc/Makefile.am000077500000000000000000000064151323325274500164750ustar00rootroot00000000000000lib_LTLIBRARIES = libivoc.la bin_PROGRAMS = ivoc DEFS = -Dmotif_kit -Dsgi_motif_kit -Dopenlook_kit -Dbw_kit \ -Ddefault_kit=SMFKit -DUSEGNU=1 -DUSEMATRIX # The interviews libraries must be before the X libraries so that if a # vanilla interviews is also installed, we don't use it. IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) nsrc=$(top_srcdir)/src includes = -I$(nsrc)/gnu -I$(nsrc)/mesch -I$(top_builddir)/src/oc -I$(nsrc)/oc -I$(nsrc)/nrnmpi $(IV_INCLUDES) IV_LIBS = @IV_LIBS_LIBTOOL@ IVOS_DIR = @IVOS_DIR@ AM_CXXFLAGS = @MINGW_CFLAG@ $(includes) # sometime multiple definitions are an error nrniv_iv_sources = classreg.cpp datapath.cpp ocjump.cpp symdir.cpp cygwin_sources = ivocwin.cpp x_sources = xdep.cpp field.cpp carbon_sources = ivocmac.cpp if BUILD_NRNMPI_DYNAMIC nrnmpila = else nrnmpila = ../nrnmpi/libnrnmpi.la endif if BUILD_CYGWIN sysdep_sources = $(cygwin_sources) nonsysdep_sources = $(x_sources) $(carbon_sources) ivoc_LDFLAGS = -mwindows -e _mainCRTStartup else if BUILD_MINGW sysdep_sources = $(cygwin_sources) nonsysdep_sources = $(x_sources) $(carbon_sources) ivoc_LDFLAGS = else if BUILD_CARBON sysdep_sources = $(carbon_sources) nonsysdep_sources = $(x_sources) $(cygwin_sources) else sysdep_sources = $(x_sources) nonsysdep_sources = $(cygwin_sources) $(carbon_sources) ivoc_LDFLAGS = endif endif endif libivoc_la_SOURCES = ivoc.cpp xmenu.cpp graph.cpp rubband.cpp grmanip.cpp \ apwindow.cpp pwman.cpp scene.cpp xyview.cpp rect.cpp mymath.cpp \ axis.cpp utility.cpp idraw.cpp symchoos.cpp htlist.cpp \ ocpicker.cpp scenepic.cpp oclist.cpp \ ocbrowsr.cpp objcmd.cpp ocbox.cpp ocfile.cpp hocmark.cpp oc2iv.cpp \ epsprint.cpp ivocvect.cpp ivocrand.cpp \ octimer.cpp ocdeck.cpp bndedval.cpp ochelp.cpp checkpnt.cpp \ graphvec.cpp strfun.cpp ocobserv.cpp fourier.cpp \ cbwidget.cpp matrix.cpp ocmatrix.cpp \ ocpointer.cpp gifimage.cpp ocnoiv1.cpp grglyph.cpp mlinedit.cpp \ $(sysdep_sources) ivocman1.cpp ocptrvector.cpp noinst_HEADERS = apwindow.h axis.h bndedval.h cbwidget.h checkpnt.h \ datapath.h dbrowser.h epsprint.h field.h fourier.h \ graph.h hocmark.h idraw.h ivoc.h ivocconf.h mymath.h htlist.h \ objcmd.h oc2iv.h ocbox.h ocbrowsr.h occlass.h ocdeck.h ocfile.h \ ocglyph.h ocinput.h ocjump.h oclist.h ocmatrix.h ocobserv.h \ ocpicker.h ocpointer.h random1.h rect.h rubband.h scenepic.h \ scenevie.h symchoos.h symdir.h utility.h ivocvect.h xmenu.h \ nrngsl.h nrngsl_hc_radix2.c nrngsl_real_radix2.c \ grglyph.h nrnmutdec.h ocnotify.h ocptrvector.h bimap.hpp ivoc_SOURCES = nrnmain.cpp ivocmain.cpp $(nrniv_iv_sources) ivoc_LDADD = ../oc/nocable.o ../oc/modlreg.o \ ../oc/libocxt.la ../oc/liboc.la \ libivoc.la $(nrnmpila) ../oc/liboc.la \ @MEMACSLIBLA@ ../mesch/libmeschach.la \ ../gnu/libneuron_gnu.la $(IVOS_DIR) \ $(IV_LIBS) @NRN_READLINE_LIBS@ @NRNJAVA_LIBLA@ @PTHREAD_LIBS@ ## We have to play a trick on automake to get it to install the .o files in ## an architecture-dependent subdirectory. (Apparently automake's authors ## never heard of installing .o files.) We pretend to create a separate ## directory (which is really just $(pkglibdir)) and we install the .o files ## by calling them "DATA". ## Argh!!!!! libobjdir = $(libdir) ## The following object files need to be installed: libobj_DATA = nrnmain.o ivocmain.o EXTRA_DIST = macmain.cpp $(nonsysdep_sources) neuron-7.5/src/ivoc/Makefile.in000066400000000000000000001105471323325274500165050ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ivoc$(EXEEXT) subdir = src/ivoc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(libobjdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libivoc_la_LIBADD = am__libivoc_la_SOURCES_DIST = ivoc.cpp xmenu.cpp graph.cpp rubband.cpp \ grmanip.cpp apwindow.cpp pwman.cpp scene.cpp xyview.cpp \ rect.cpp mymath.cpp axis.cpp utility.cpp idraw.cpp \ symchoos.cpp htlist.cpp ocpicker.cpp scenepic.cpp oclist.cpp \ ocbrowsr.cpp objcmd.cpp ocbox.cpp ocfile.cpp hocmark.cpp \ oc2iv.cpp epsprint.cpp ivocvect.cpp ivocrand.cpp octimer.cpp \ ocdeck.cpp bndedval.cpp ochelp.cpp checkpnt.cpp graphvec.cpp \ strfun.cpp ocobserv.cpp fourier.cpp cbwidget.cpp matrix.cpp \ ocmatrix.cpp ocpointer.cpp gifimage.cpp ocnoiv1.cpp \ grglyph.cpp mlinedit.cpp xdep.cpp field.cpp ivocmac.cpp \ ivocwin.cpp ivocman1.cpp ocptrvector.cpp am__objects_1 = xdep.lo field.lo am__objects_2 = ivocmac.lo am__objects_3 = ivocwin.lo @BUILD_CARBON_FALSE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@am__objects_4 = $(am__objects_1) @BUILD_CARBON_TRUE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@am__objects_4 = $(am__objects_2) @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@am__objects_4 = \ @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@ $(am__objects_3) @BUILD_CYGWIN_TRUE@am__objects_4 = $(am__objects_3) am_libivoc_la_OBJECTS = ivoc.lo xmenu.lo graph.lo rubband.lo \ grmanip.lo apwindow.lo pwman.lo scene.lo xyview.lo rect.lo \ mymath.lo axis.lo utility.lo idraw.lo symchoos.lo htlist.lo \ ocpicker.lo scenepic.lo oclist.lo ocbrowsr.lo objcmd.lo \ ocbox.lo ocfile.lo hocmark.lo oc2iv.lo epsprint.lo ivocvect.lo \ ivocrand.lo octimer.lo ocdeck.lo bndedval.lo ochelp.lo \ checkpnt.lo graphvec.lo strfun.lo ocobserv.lo fourier.lo \ cbwidget.lo matrix.lo ocmatrix.lo ocpointer.lo gifimage.lo \ ocnoiv1.lo grglyph.lo mlinedit.lo $(am__objects_4) ivocman1.lo \ ocptrvector.lo libivoc_la_OBJECTS = $(am_libivoc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = PROGRAMS = $(bin_PROGRAMS) am__objects_5 = classreg.$(OBJEXT) datapath.$(OBJEXT) ocjump.$(OBJEXT) \ symdir.$(OBJEXT) am_ivoc_OBJECTS = nrnmain.$(OBJEXT) ivocmain.$(OBJEXT) \ $(am__objects_5) ivoc_OBJECTS = $(am_ivoc_OBJECTS) @BUILD_NRNMPI_DYNAMIC_FALSE@am__DEPENDENCIES_1 = \ @BUILD_NRNMPI_DYNAMIC_FALSE@ ../nrnmpi/libnrnmpi.la am__DEPENDENCIES_2 = ivoc_DEPENDENCIES = ../oc/nocable.o ../oc/modlreg.o ../oc/libocxt.la \ ../oc/liboc.la libivoc.la $(am__DEPENDENCIES_1) ../oc/liboc.la \ ../mesch/libmeschach.la ../gnu/libneuron_gnu.la \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) ivoc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(ivoc_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libivoc_la_SOURCES) $(ivoc_SOURCES) DIST_SOURCES = $(am__libivoc_la_SOURCES_DIST) $(ivoc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(libobj_DATA) HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = -Dmotif_kit -Dsgi_motif_kit -Dopenlook_kit -Dbw_kit \ -Ddefault_kit=SMFKit -DUSEGNU=1 -DUSEMATRIX DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS_LIBTOOL@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libivoc.la # The interviews libraries must be before the X libraries so that if a # vanilla interviews is also installed, we don't use it. IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) nsrc = $(top_srcdir)/src includes = -I$(nsrc)/gnu -I$(nsrc)/mesch -I$(top_builddir)/src/oc -I$(nsrc)/oc -I$(nsrc)/nrnmpi $(IV_INCLUDES) AM_CXXFLAGS = @MINGW_CFLAG@ $(includes) # sometime multiple definitions are an error nrniv_iv_sources = classreg.cpp datapath.cpp ocjump.cpp symdir.cpp cygwin_sources = ivocwin.cpp x_sources = xdep.cpp field.cpp carbon_sources = ivocmac.cpp @BUILD_NRNMPI_DYNAMIC_FALSE@nrnmpila = ../nrnmpi/libnrnmpi.la @BUILD_NRNMPI_DYNAMIC_TRUE@nrnmpila = @BUILD_CARBON_FALSE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@sysdep_sources = $(x_sources) @BUILD_CARBON_TRUE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@sysdep_sources = $(carbon_sources) @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@sysdep_sources = $(cygwin_sources) @BUILD_CYGWIN_TRUE@sysdep_sources = $(cygwin_sources) @BUILD_CARBON_FALSE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@nonsysdep_sources = $(cygwin_sources) $(carbon_sources) @BUILD_CARBON_TRUE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@nonsysdep_sources = $(x_sources) $(cygwin_sources) @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@nonsysdep_sources = $(x_sources) $(carbon_sources) @BUILD_CYGWIN_TRUE@nonsysdep_sources = $(x_sources) $(carbon_sources) @BUILD_CARBON_FALSE@@BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@ivoc_LDFLAGS = @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@ivoc_LDFLAGS = @BUILD_CYGWIN_TRUE@ivoc_LDFLAGS = -mwindows -e _mainCRTStartup libivoc_la_SOURCES = ivoc.cpp xmenu.cpp graph.cpp rubband.cpp grmanip.cpp \ apwindow.cpp pwman.cpp scene.cpp xyview.cpp rect.cpp mymath.cpp \ axis.cpp utility.cpp idraw.cpp symchoos.cpp htlist.cpp \ ocpicker.cpp scenepic.cpp oclist.cpp \ ocbrowsr.cpp objcmd.cpp ocbox.cpp ocfile.cpp hocmark.cpp oc2iv.cpp \ epsprint.cpp ivocvect.cpp ivocrand.cpp \ octimer.cpp ocdeck.cpp bndedval.cpp ochelp.cpp checkpnt.cpp \ graphvec.cpp strfun.cpp ocobserv.cpp fourier.cpp \ cbwidget.cpp matrix.cpp ocmatrix.cpp \ ocpointer.cpp gifimage.cpp ocnoiv1.cpp grglyph.cpp mlinedit.cpp \ $(sysdep_sources) ivocman1.cpp ocptrvector.cpp noinst_HEADERS = apwindow.h axis.h bndedval.h cbwidget.h checkpnt.h \ datapath.h dbrowser.h epsprint.h field.h fourier.h \ graph.h hocmark.h idraw.h ivoc.h ivocconf.h mymath.h htlist.h \ objcmd.h oc2iv.h ocbox.h ocbrowsr.h occlass.h ocdeck.h ocfile.h \ ocglyph.h ocinput.h ocjump.h oclist.h ocmatrix.h ocobserv.h \ ocpicker.h ocpointer.h random1.h rect.h rubband.h scenepic.h \ scenevie.h symchoos.h symdir.h utility.h ivocvect.h xmenu.h \ nrngsl.h nrngsl_hc_radix2.c nrngsl_real_radix2.c \ grglyph.h nrnmutdec.h ocnotify.h ocptrvector.h bimap.hpp ivoc_SOURCES = nrnmain.cpp ivocmain.cpp $(nrniv_iv_sources) ivoc_LDADD = ../oc/nocable.o ../oc/modlreg.o \ ../oc/libocxt.la ../oc/liboc.la \ libivoc.la $(nrnmpila) ../oc/liboc.la \ @MEMACSLIBLA@ ../mesch/libmeschach.la \ ../gnu/libneuron_gnu.la $(IVOS_DIR) \ $(IV_LIBS) @NRN_READLINE_LIBS@ @NRNJAVA_LIBLA@ @PTHREAD_LIBS@ libobjdir = $(libdir) libobj_DATA = nrnmain.o ivocmain.o EXTRA_DIST = macmain.cpp $(nonsysdep_sources) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/ivoc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/ivoc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libivoc.la: $(libivoc_la_OBJECTS) $(libivoc_la_DEPENDENCIES) $(EXTRA_libivoc_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libivoc_la_OBJECTS) $(libivoc_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ivoc$(EXEEXT): $(ivoc_OBJECTS) $(ivoc_DEPENDENCIES) $(EXTRA_ivoc_DEPENDENCIES) @rm -f ivoc$(EXEEXT) $(AM_V_CXXLD)$(ivoc_LINK) $(ivoc_OBJECTS) $(ivoc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apwindow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/axis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bndedval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cbwidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkpnt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classreg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datapath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epsprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fourier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifimage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphvec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grglyph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grmanip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idraw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivoc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivocmac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivocmain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivocman1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivocrand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivocvect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivocwin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlinedit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mymath.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnmain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objcmd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oc2iv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocbrowsr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocdeck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ochelp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocjump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oclist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocmatrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocnoiv1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocobserv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocpicker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocpointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocptrvector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octimer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwman.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rubband.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scene.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scenepic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strfun.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symchoos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmenu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xyview.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libobjDATA: $(libobj_DATA) @$(NORMAL_INSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libobjdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libobjdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libobjdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(libobjdir)" || exit $$?; \ done uninstall-libobjDATA: @$(NORMAL_UNINSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libobjdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libobjdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-libobjDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-libobjDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-libobjDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-libobjDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/ivoc/apwindow.cpp000066400000000000000000000340651323325274500167740ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #ifdef WIN32 #include #endif #include #include #ifdef WIN32 #include #include #else #ifdef MAC #include #include #else #include #include #endif #endif #include #include #include #include #include #include #include #include #include "apwindow.h" #include "ocglyph.h" #include "ivoc.h" #include #include declareActionCallback(PrintableWindow); implementActionCallback(PrintableWindow); extern "C" { extern void single_event_run();} extern void handle_old_focus(); #ifdef WIN32 #include extern "C" { extern int iv_mere_dismiss;} #endif #if MAC extern "C" { extern void ivoc_dismiss_defer();} #endif // just because avoiding virtual resource /*static*/ class DBAction : public Action { public: DBAction(WinDismiss*); virtual ~DBAction(); virtual void diswin(WinDismiss*); virtual void execute(); private: friend class DismissableWindow; WinDismiss* wd_; }; DBAction::DBAction(WinDismiss* wd){ wd_ = wd; Resource::ref(wd_); } DBAction::~DBAction(){ // printf("~DBAction wd_=%p\n", wd_); Resource::unref(wd_); } void DBAction::execute() { if (wd_) { wd_->execute(); } } void DBAction::diswin(WinDismiss* wd) { Resource::ref(wd); Resource::unref(wd_); wd_ = wd; } // WinDismiss WinDismiss::WinDismiss(DismissableWindow* w) { win_ = w;} WinDismiss::~WinDismiss() { // printf("~WinDismiss %p win_=%p\n", this, win_); } DismissableWindow* WinDismiss::win_defer_; DismissableWindow* WinDismiss::win_defer_longer_; void WinDismiss::execute() { if (Oc::helpmode()) { Oc::help("Dismiss GUI"); return; } //printf("WinDismiss:: execute win_defer_=%p win_=%p\n", win_defer_,win_); if (win_) {win_->unmap();} #if MAC #else Session::instance()->quit(); #endif dismiss_defer(); win_defer_ = win_; win_ = NULL; } // the win_defer_longer_ mechanism is a hack to both avoid changing InterViews and to // prevent the deletion of the window during receive processing (A close // event from the window manager). The problem // is that if the window is deleted, then during the Event::handle phase, // the event will still access the window to figure out the target. // Unfortunately, the dismiss_defer mechanism was broken because of the // multiple times it was called (from within Oc::notify()). It is no longer // known what problem that fixed so it is dangerous to remove it from there // For this reason we avoid deleting the window while inside WinDismiss::event bool WinDismiss::event(Event&) { win_defer_longer_ = win_; execute(); // but maybe it is not supposed to be dismissed if (!win_) { dismiss_defer(); win_defer_ = win_defer_longer_; win_defer_longer_ = NULL; } return true; } void ivoc_dismiss_defer() { WinDismiss::dismiss_defer(); } void WinDismiss::dismiss_defer() { /* purify complains when window is deleted during handling of event that occurred in the window. So we defer the deletion */ if (win_defer_ && win_defer_ != win_defer_longer_) { //printf("WinDismiss::dismiss_defer %p %p\n", win_defer_, win_defer_longer_); DismissableWindow* w = win_defer_; //prevents BadDrawable X Errors win_defer_ = NULL; delete w; } } // DismissableWindow bool DismissableWindow::is_transient_; PrintableWindow* PrintableWindow::leader_; #ifdef WIN32 DismissableWindow::DismissableWindow(Glyph* g, bool force_menubar) : TransientWindow( new Background( LayoutKit::instance()->vbox(2), WidgetKit::instance()->background() ) ) #else DismissableWindow::DismissableWindow(Glyph* g, bool force_menubar) : TransientWindow( LayoutKit::instance()->vbox(2)) #endif { glyph_ = g; Resource::ref(g); #ifdef WIN32 PolyGlyph* pg = (PolyGlyph*)((MonoGlyph*)Window::glyph())->body(); #else PolyGlyph* pg = (PolyGlyph*)Window::glyph(); #endif wd_ = new WinDismiss(this); wd_->ref(); wm_delete(wd_); dbutton_ = NULL; Style* style = Session::instance()->style(); String str("Close"); #if MAC if (0) { #else if ((style->find_attribute("dismiss_button", str) && str != "off") || force_menubar) { #endif if (!PrintableWindow::leader()) { style->find_attribute("pwm_dismiss_button", str); } dbutton_ = new DBAction(wd_); Resource::ref(dbutton_); menubar_ = WidgetKit::instance()->menubar(); Resource::ref(menubar_); pg->append(menubar_); MenuItem* mi = append_menubar(str.string()); mi->action(dbutton_); }else{ menubar_ = NULL; } if (style->find_attribute("use_transient_windows", str) && str == "yes") { is_transient_ = true; } pg->append(g); } DismissableWindow::~DismissableWindow(){ // printf("~DismissableWindow %p\n", this); Resource::unref(glyph_); Resource::unref(wd_); Resource::unref(dbutton_); Resource::unref(menubar_); single_event_run(); } MenuItem* DismissableWindow::append_menubar(const char* name) { MenuItem* mi; if (menubar_) { mi = WidgetKit::instance()->menubar_item( LayoutKit::instance()->r_margin( WidgetKit::instance()->fancy_label(name), 0.0, fil, 0.0)); menubar_ ->append_item(mi); return mi; } return NULL; } void DismissableWindow::dismiss() { // unmap(); // delete this; wd_->execute(); } const char* DismissableWindow::name() const { String v; if (!style()->find_attribute("name", v)) { v = Session::instance()->name(); } //printf("DismissableWindow::name %s\n", v.string()); return v.string(); } #if defined(MINGW) extern "C" { static const char* s_; static void setwindowtext(void* v) { HWND hw = (HWND)v; SetWindowText(hw, s_); } } #endif void DismissableWindow::name(const char* s) { #ifdef WIN32 HWND hw = Window::rep()->msWindow(); if (hw) { #if defined(MINGW) if (!nrn_is_gui_thread()) { s_ = s; nrn_gui_exec(setwindowtext, hw); }else #endif { SetWindowText(hw, s); } }else #endif #if MAC Str255 st; strncpy((char*)&st[1], s, 254); st[0] = strlen(s); WindowPtr theWin = Window::rep()->macWindow(); if (theWin) { SetWTitle(theWin, st); } #endif if (style()) { style()->attribute("name", s); set_props(); //replaces following two statements // rep()->wm_name(this); // rep()->do_set(this, &ManagedWindowRep::set_name); //printf("DismissableWindow::name set to %s\n", name()); }else{ style(new Style(Session::instance()->style())); style()->attribute("name", s); } } void DismissableWindow::replace_dismiss_action(WinDismiss* wd) { Resource::ref(wd); Resource::unref(wd_); wd_ = wd; wm_delete(wd_); if (dbutton_) { ((DBAction*)dbutton_)->diswin(wd_); } } void DismissableWindow::configure() { if (is_transient()) { TransientWindow::configure(); }else{ TopLevelWindow::configure(); } } void DismissableWindow::set_attributes() { if (is_transient()) { TransientWindow::set_attributes(); }else{ TopLevelWindow::set_attributes(); } } //PrintableWindow PrintableWindow::PrintableWindow(OcGlyph* g) : DismissableWindow(g) { //printf("PrintableWindow %p\n", this); xplace_ = false; g->window(this); if (intercept_) { intercept_->box_append(g); mappable_ = false; }else{ if (!leader_) { leader_ = this; }else{ MenuItem* mi = append_menubar("Hide"); if (mi) { mi->action(new ActionCallback(PrintableWindow)(this,&PrintableWindow::hide)); } } PrintableWindowManager::current()->append(this); mappable_ = true; } type_ = ""; }; PrintableWindow::~PrintableWindow(){ //printf("~PrintableWindow %p\n", this); ((OcGlyph*)glyph())->window(NULL); if (leader_ == this) { leader_ = NULL; // mswin deletes everthing on quit } PrintableWindowManager::current()->remove(this); } Coord PrintableWindow::left_pw() const { return Window::left();} Coord PrintableWindow::bottom_pw() const { return Window::bottom();} Coord PrintableWindow::width_pw() const { return Window::width();} Coord PrintableWindow::height_pw() const { return Window::height();} void PrintableWindow::request_on_resize(bool b) { ((Window*)this)->rep()->request_on_resize_ = b; } Coord PrintableWindow::save_left() const { #if 0 Coord decor = 0.; if (style()) { style()->find_attribute("pwm_win_left_decor", decor); } return Window::left() - decor; #else return Coord(xleft()); #endif } Coord PrintableWindow::save_bottom() const { #if 0 Coord decor = 0.; if (style()) { style()->find_attribute("pwm_win_top_decor", decor); } return Window::bottom() + decor; #else return Coord(xtop()); #endif } Glyph* PrintableWindow::print_glyph() { return glyph(); } #if MAC && carbon // Apparently the collapse item does not send an event to the application. // Would like to do this only for PrintableWindows but this handler must be // removed whenever theMacWindow is destroyed ( can unbind without deleteing he // PrintableWindow static EventTypeSpec myCollapseTypeSpec[] = { {kEventClassWindow, kEventWindowClickCollapseRgn} }; static OSStatus MyHandleCollapse(EventHandlerCallRef, EventRef, void*); static OSStatus MyHandleCollapse(EventHandlerCallRef, EventRef, void* v) { PrintableWindow* w = (PrintableWindow*)v; if (PrintableWindow::leader() != w) { w->unmap(); }else { return eventNotHandledErr; } return noErr; } #endif void PrintableWindow::map() { if (mappable_) { DismissableWindow::map(); #if MAC // just can't transform between top and bottom and also take into account decorations. if (xplace_) { xmove(xleft_, xtop_); } #if carbon // it's bound due to the map and according to my checking it will not become // unbound til window deletion EventHandlerUPP myHandleCollapse = NewEventHandlerUPP((EventHandlerProcPtr)MyHandleCollapse); InstallWindowEventHandler(Window::rep()->macWindow(), myHandleCollapse, 1, myCollapseTypeSpec, (void*)this, NULL); #endif #endif single_event_run(); notify(); }else{ delete this; } } void PrintableWindow::unmap() { handle_old_focus(); if (is_mapped()) { //printf("unmap %p xleft=%d xtop=%d\n", this, xleft(), xtop()); xplace_ = true; xleft_ = xleft(); xtop_ = xtop(); DismissableWindow::unmap(); } notify(); } OcGlyphContainer* PrintableWindow::intercept_ = NULL; OcGlyphContainer* PrintableWindow::intercept(OcGlyphContainer* b) { OcGlyphContainer* i = intercept_; Resource::ref(b); Resource::unref(i) ; intercept_ = b; return i; } #ifdef WIN32 void virtual_window_top(); bool iv_user_keydown(long w) { if (w == 0x70) { //F1 virtual_window_top(); } return false; } bool PrintableWindow::receive(const Event& e) { if (e.rep()->messageOf() == WM_WINDOWPOSCHANGED) { reconfigured(); notify(); } return DismissableWindow::receive(e); } #else #if MAC bool PrintableWindow::receive(const Event& e) { reconfigured(); notify(); return(false); } #else bool PrintableWindow::receive(const Event& e) { DismissableWindow::receive(e); if (e.type() == Event::other_event) { XEvent& xe = e.rep()->xevent_; switch(xe.type) { case ConfigureNotify: reconfigured(); notify(); break; case MapNotify: if (xplace_) { if (xtop() != xtop_ || xleft() != xleft_) { //printf("MapNotify move %p (%d, %d) to (%d, %d)\n", this, xleft(), xtop(), xleft_, xtop_); xmove(xleft_, xtop_); } } map_notify(); notify(); break; case UnmapNotify: //printf("UnMapNotify %p xleft=%d xtop=%d\n", this, xleft(), xtop()); //having trouble with remapping after a "hide" that the left and top are // set to incorrect values. i.e.the symptom is that xleft() and xtop() are // wrong by the time we get this event. //xplace_ = true; //xleft_ = xleft(); //xtop_ = xtop(); unmap_notify(); notify(); break; case EnterNotify: // printf("EnterNotify\n"); Oc::helpmode(this); break; } } return false; } #endif #endif void PrintableWindow::type(const char* s) { type_ = s; } const char* PrintableWindow::type() const { return type_.string(); } // StandardWindow StandardWindow::StandardWindow( Glyph* main, Glyph* info, Menu* m, Glyph* l, Glyph* r ) : PrintableWindow( new OcGlyph(new Background( LayoutKit::instance()->variable_span(LayoutKit::instance()->vbox( info, m, LayoutKit::instance()->variable_span(LayoutKit::instance()->hbox( l, LayoutKit::instance()->variable_span(LayoutKit::instance()->vbox( WidgetKit::instance()->inset_frame( LayoutKit::instance()->variable_span( main ) ) )), r )) )), WidgetKit::instance()->background() ) )) { m_ = m; can_ = main; info_ = info; l_ = l; r_ = r; Resource::ref(m_); Resource::ref(can_); Resource::ref(info_); Resource::ref(l_); Resource::ref(r_); } StandardWindow::~StandardWindow() { // printf("~StandardWindow\n"); Resource::unref(m_); Resource::unref(can_); Resource::unref(info_); Resource::unref(l_); Resource::unref(r_); } Glyph* StandardWindow::canvas_glyph() { return can_; } Menu* StandardWindow::menubar() { return m_; } Glyph* StandardWindow::info() { return info_; } Glyph* StandardWindow::lbox() { return l_; } Glyph* StandardWindow::rbox() { return r_; } OcGlyph::OcGlyph(Glyph* body) : MonoGlyph(body) { w_ = NULL; parents_ = 0; def_w_ = -1; def_h_ = -1; d_ = NULL; session_priority_ = 1; } OcGlyph::~OcGlyph() { // printf("~OcGlyph\n"); } void OcGlyph::def_size(Coord& w, Coord& h)const { if (def_w_ > 0) { w = def_w_; h = def_h_; } } void OcGlyph::save(ostream&) { printf("OcGlyph::save (not implemented for relevant class)\n"); } bool OcGlyph::has_window() { return (w_ != NULL); } PrintableWindow* OcGlyph::window() { return w_;} void OcGlyph::window(PrintableWindow* w) { w_ = w; parents(w_ != NULL);} PrintableWindow* OcGlyph::make_window(Coord left, Coord top, Coord w, Coord h) { new PrintableWindow(this); #if 0 if (has_window()) { printf("%s %g %g\n", window()->name(), window()->width(), window()->height()); } #endif def_w_ = w; def_h_ = h; if (left >= 0) { w_->xplace((int)left, (int)top); // w_->place(left, bottom); } return w_; } void OcGlyph::parents(bool b) { if (b) { ++parents_; }else{ --parents_; } if (parents_ <= 0) { no_parents(); parents_ = 0; } } void OcGlyph::no_parents() {} #endif neuron-7.5/src/ivoc/apwindow.h000066400000000000000000000076461323325274500164460ustar00rootroot00000000000000#ifndef dismiswin_h #define dismiswin_h #include #include #include #include #include #include class Menu; class MenuItem; class OcGlyph; class DismissableWindow; class TopLevelWindow; class OcGlyphContainer; class PolyGlyph; // action for dismissing class WinDismiss : public Handler { //dismiss a Window public: WinDismiss(DismissableWindow*); virtual ~WinDismiss(); virtual void execute(); //this can be replaced virtual bool event(Event&); static void dismiss_defer(); protected: DismissableWindow* win_; private: static DismissableWindow* win_defer_; static DismissableWindow* win_defer_longer_; }; // Can be dismissed by window manager without quitting. // The style determines dynamically if this is transient or toplevel class DismissableWindow : public TransientWindow { public: DismissableWindow(Glyph*, bool force_menubar = false); virtual ~DismissableWindow(); virtual void dismiss(); virtual const char* name() const; virtual void name(const char*); virtual void replace_dismiss_action(WinDismiss*); virtual Glyph* glyph() const {return glyph_;} virtual void configure(); virtual void set_attributes(); MenuItem* append_menubar(const char*); // return NULL if no dismiss menubar static bool is_transient() { return is_transient_; } private: Glyph* glyph_; WinDismiss* wd_; Action* dbutton_; static bool is_transient_; Menu* menubar_; }; // If you want to place a screen window onto a piece of paper class PrintableWindow : public DismissableWindow , public Observable { public: PrintableWindow(OcGlyph*); virtual ~PrintableWindow(); virtual void map(); virtual void unmap(); virtual void hide(); virtual bool receive(const Event&); virtual void reconfigured(); // The glyph the user actually wants printed virtual Glyph* print_glyph(); // for size of what actually gets printed virtual Coord left_pw() const; virtual Coord bottom_pw() const; virtual Coord width_pw() const; virtual Coord height_pw() const; void type(const char*); const char* type() const; static OcGlyphContainer* intercept(OcGlyphContainer*); // instead of window put in a box virtual void map_notify(); virtual void unmap_notify() {}; virtual Coord save_left() const; // offset by window decoration virtual Coord save_bottom() const; // see nrn.defaults int xleft() const; int xtop() const; void xplace(int left, int top); // in x display pixel coords void xmove(int left, int top); void request_on_resize(bool); static PrintableWindow* leader() { return leader_; } static void leader(PrintableWindow* w) { leader_ = w; } protected: virtual void default_geometry(); private: CopyString type_; static OcGlyphContainer* intercept_; bool mappable_; bool xplace_; int xleft_; int xtop_; static PrintableWindow* leader_; }; // canvas with hbox and menubar at top and left and right vboxes // the main glyph area resizes according to the window size. class StandardWindow : public PrintableWindow { public: StandardWindow( Glyph* main, Glyph* info=NULL, Menu* m=NULL, Glyph* l=NULL, Glyph* r=NULL ); virtual ~StandardWindow(); Menu* menubar(); Glyph* canvas_glyph(); Glyph* info(); Glyph* lbox(); Glyph* rbox(); private: Menu* m_; Glyph* can_; Glyph* info_, *l_, *r_; }; class PWMImpl; class JavaWindow; class PrintableWindowManager : public Observer { public: PrintableWindowManager(); virtual ~PrintableWindowManager(); void psfilter(const char* filename); void xplace(int, int, bool map = true); static PrintableWindowManager* current(); void append(PrintableWindow*); void remove(PrintableWindow*); void reconfigured(PrintableWindow*); void append(JavaWindow*); void remove(JavaWindow*); void reconfigured(JavaWindow*); void doprint(); virtual void update(Observable*); virtual void disconnect(Observable*); public: PWMImpl* pwmi_; private: static PrintableWindowManager* current_; }; #endif neuron-7.5/src/ivoc/axis.cpp000066400000000000000000000266771323325274500161220ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include "scenevie.h" #include "mymath.h" #include "axis.h" #include "rect.h" #include "graph.h" #include "idraw.h" /*static*/ class GAxisItem : public GraphItem { public: GAxisItem(Glyph* g) : GraphItem(g){} virtual ~GAxisItem(){}; virtual void save(ostream&, Coord, Coord){} virtual void erase(Scene* s, GlyphIndex i, int type) { if (type & GraphItem::ERASE_AXIS) { s->remove(i); } } }; Axis::Axis(Scene* s, DimensionName d) { s_ = s; d_ = d; set_range(); location(); init(min_, max_, pos_, ntic_); } Axis::Axis(Scene* s, DimensionName d, Coord x1, Coord x2) { s_ = s; d_ = d; min_ = x1; max_ = x2; location(); MyMath::round_range_down(x1, x2, amin_, amax_, ntic_); init(float(amin_), float(amax_), pos_, ntic_); } Axis::Axis(Scene* s, DimensionName d, Coord x1, Coord x2, Coord pos, int ntic, int nminor, int invert, bool number) { s_ = s; d_ = d; init(x1, x2, pos, ntic, nminor, invert, number); } void Axis::init(Coord x1, Coord x2, Coord pos, int ntic, int nminor, int invert, bool number) { min_ = x1; max_ = x2; pos_ = pos; ntic_ = ntic; nminor_ = nminor; invert_ = invert; number_ = number; amin_ = x1; amax_ = x2; s_->attach(this); install(); } Axis::~Axis() { s_->detach(this); // printf("~Axis\n"); } void Axis::size(float& min, float& max) { min = float(amin_); max = float(amax_); } void Axis::save(ostream& o) { char buf[256]; int c; if (d_ == Dimension_X) { c = 'x'; }else{ c = 'y'; } sprintf(buf, "save_window_.%caxis(%g,%g,%g,%d,%d,%d,%d)", c, amin_, amax_, pos_, ntic_, nminor_, invert_, number_); o << buf << endl; } void Axis::update(Observable*) { } bool Axis::set_range() { Coord x1, x2; if (d_ == Dimension_X) { x1 = s_->x1(); x2 = s_->x2(); }else{ x1 = s_->y1(); x2 = s_->y2(); } min_ = x1; max_ = x2; MyMath::round_range(x1, x2, amin_, amax_, ntic_); return true; } void Axis::location() { Coord x1, y1, x2, y2; XYView* v = XYView::current_pick_view(); if (v && v->scene() == s_) { v->zin(x1, y1, x2, y2); }else{ x1 = s_->x1(); x2 = s_->x2(); y1 = s_->y1(); y2 = s_->y2(); } if (d_ == Dimension_X) { if (y1 > 0) { pos_ = y1; }else if (y2 < 0) { pos_ = y2; }else{ pos_ = 0; } }else{ if (x1 > 0) { pos_ = x1; }else if (x2 < 0) { pos_ = x2; }else{ pos_ = 0; } } } #if 1 //Zach Mainen improvements void Axis::install() { int i,j; GlyphIndex gi; Line* tic = NULL; Coord x, y; char str[20]; float tic_space; float y_align, x_align; Line* minor_tic = NULL; Coord l_minor = 5.; Coord length = 10.; if (invert_ == 1) { l_minor *= -1.; length *= -1.; } char pform[10]; int addprec; double s = (amax_ - amin_)/float(ntic_); while (s < 1) s *= 10.; if (s == 1 || s == 2) addprec = 0; else addprec = 1; double logstep = - log10((amax_ - amin_)/float(ntic_)); if (d_ == Dimension_X) { if (logstep >= 0 && logstep <= 5) { sprintf(pform,"%%0.%.0ff",logstep+addprec); } else { sprintf(pform,"%%g"); } y = pos_; s_->append(new GAxisItem(new Line(amax_ - amin_, 0))); gi = s_->count() - 1; s_->move(gi, amin_, y); tic = new Line(0,length); tic->ref(); minor_tic = new Line(0,l_minor); minor_tic->ref(); tic_space = (amax_ - amin_)/float(ntic_); for (i=0; i <= ntic_; ++i) { x = amin_ + i*tic_space; if (Math::abs(x) < 1e-10) { x = 0.; } if (invert_ >= 0) { s_->append_fixed(new GAxisItem(tic)); gi = s_->count() - 1; s_->move(gi, x, y); } if (number_) { /* if (i==0) x_align = 0.; else if (i==ntic_) x_align = .9; else x_align = 0.5; */ x_align = 0.5; if (invert_ == 1) y_align = -0.3; else y_align = 1.5; sprintf(str, pform, x); s_->append_fixed(new GAxisItem( new GLabel(str, Appear::default_color(), true, 1, x_align, y_align))); gi = s_->count() - 1; s_->move(gi, x, y); } if (i < ntic_ && invert_ >= 0) { for (j=0;jappend_fixed(new GAxisItem(minor_tic)); gi = s_->count() - 1; s_->move(gi, x, y); } } } }else{ if (logstep >= 0 && logstep <= 5) { sprintf(pform," %%0.%.0ff ",logstep+1); } else { sprintf(pform," %%g "); } x = pos_; s_->append(new GAxisItem(new Line(0, amax_ - amin_))); gi = s_->count() - 1; s_->move(gi, x, amin_); tic = new Line(length,0); tic->ref(); minor_tic = new Line(l_minor,0); minor_tic->ref(); tic_space = (amax_ - amin_)/float(ntic_); for (i=0; i <= ntic_; ++i) { y = amin_ + i*tic_space; if (invert_ >= 0) { s_->append_fixed(new GAxisItem(tic)); gi = s_->count() - 1; s_->move(gi, x, y); } if (number_) { sprintf(str, pform, y); y_align = 0.5; //if (i==0) y_align = 0.; //else if (i==ntic_) y_align = .66; //else y_align = 0.33; if (invert_ == 1) x_align = 0; else x_align = 1.3; s_->append_fixed(new GAxisItem( new GLabel(str, Appear::default_color(), true, 1, x_align, y_align))); gi = s_->count() - 1; s_->move(gi, x, y); } if (i < ntic_ && invert_ >= 0) { for (j=0;jappend_fixed(new GAxisItem(minor_tic)); gi = s_->count() - 1; s_->move(gi, x, y); } } } } Resource::unref(tic); Resource::unref(minor_tic); } #else void Axis::install() { int i; GlyphIndex gi; Coord length = 10; Line* tic = NULL; Coord x, y; char str[20]; if (d_ == Dimension_X) { y = pos_; s_->append(new GAxisItem(new Line(amax_ - amin_, 0))); gi = s_->count() - 1; s_->move(gi, amin_, y); tic = new Line(0,length); tic->ref(); for (i=0; i <= ntic_; ++i) { x = amin_ + i*(amax_ - amin_)/float(ntic_); if (Math::abs(x) < 1e-10) { x = 0.; } s_->append_fixed(new GAxisItem(tic)); gi = s_->count() - 1; s_->move(gi, x, y); sprintf(str, "%g", x); s_->append_fixed(new GAxisItem( new GLabel(str, Appear::default_color(), true, 1, .5, 1.1))); gi = s_->count() - 1; s_->move(gi, x, y); } }else{ x = pos_; s_->append(new GAxisItem(new Line(0, amax_ - amin_))); gi = s_->count() - 1; s_->move(gi, x, amin_); tic = new Line(length, 0); tic->ref(); for (i=0; i <= ntic_; ++i) { y = amin_ + i*(amax_ - amin_)/float(ntic_); s_->append_fixed(new GAxisItem(tic)); gi = s_->count() - 1; s_->move(gi, x, y); sprintf(str, "%g", y); s_->append_fixed(new GAxisItem( new GLabel(str, Appear::default_color(), true, 1, 1, .5))); gi = s_->count() - 1; s_->move(gi, x, y); } } Resource::unref(tic); } #endif BoxBackground::BoxBackground() : Background(NULL, Scene::default_background()) { } BoxBackground::~BoxBackground() {} void BoxBackground::draw(Canvas* c, const Allocation& a) const { Background::draw(c, a); draw_help(c, a); } void BoxBackground::print(Printer* c, const Allocation& a) const { Background::print(c, a); draw_help(c, a); } #define IDLINE(x1,y1,x2,y2,color,br) \ c->line(x1,y1,x2,y2,color,br); \ IfIdraw(line(c, x1, y1,x2,y2,color,br)); void BoxBackground::draw_help(Canvas* c, const Allocation&) const { //printf("BoxBackground::draw\n"); const Color* color = Scene::default_foreground(); Coord x1, y1, x2, y2; double d1, d2; int xtic, ytic; XYView& v = *XYView::current_draw_view(); v.zin(x1, y1, x2, y2); MyMath::round_range_down(x1, x2, d1, d2, xtic); x1 = d1; x2 = d2; MyMath::round_range_down(y1, y2, d1, d2, ytic); y1 = d1; y2 = d2; const Transformer& tr = v.s2o(); c->push_transform(); c->transform(tr); IfIdraw(pict(tr)); Coord l,r,b,t; tr.inverse_transform(x1, y1, l, b); tr.inverse_transform(x2, y2, r, t); const Brush* br = Appear::default_brush(); c->rect(l, b, r, t, color, br); IfIdraw(rect(c, l, b, r, t, color, br, false)); const Coord tic = 10; Coord x, y; Coord dtic = (r-l)/xtic; Coord dx = (x2 - x1)/xtic; int i; for (i=0; i <= xtic; ++i) { x = l + i*dtic; if (i > 0 && i < xtic) { IDLINE(x, b, x, b + tic, color, br); IDLINE(x, t, x, t - tic, color, br); } tic_label(x, b-5, x1+i*dx, .5, 1, c); } dtic = (t - b)/ytic; dx = (y2 - y1)/ytic; for (i=0; i <= ytic; ++i) { y = b + i*dtic; if (i > 0 && i < ytic) { IDLINE(l, y , l+tic, y, color, br); IDLINE(r, y, r-tic, y, color, br); } tic_label(l-5, y, y1+i*dx, 1, .5, c); } c->clip_rect(l, b, r, t); c->pop_transform(); IfIdraw(end()); } void BoxBackground::tic_label( Coord x1, Coord y1, Coord val, float xa, float ya, Canvas* c) const { char buf[20]; sprintf(buf, "%g", val); Glyph* g = new Label(buf, WidgetKit::instance()->font(), Appear::default_color()); g->ref(); Requisition req; g->request(req); Allocation a; a.x_allotment().origin(x1 - xa*req.x_requirement().natural()); a.y_allotment().origin(y1 - ya*req.y_requirement().natural()); g->draw(c, a); g->unref(); if (OcIdraw::idraw_stream) { Transformer t; t.translate(a.x(), a.y()); OcIdraw::text(c, buf, t, NULL, Appear::default_color()); } } AxisBackground::AxisBackground() : Background(NULL, Scene::default_background()) { } AxisBackground::~AxisBackground() {} void AxisBackground::draw(Canvas* c, const Allocation& a) const { Background::draw(c, a); draw_help(c, a); } void AxisBackground::print(Printer* c, const Allocation& a) const { Background::print(c, a); draw_help(c, a); } void AxisBackground::draw_help(Canvas* c, const Allocation&) const { //printf("AxisBackground::draw\n"); const Color* color = Scene::default_foreground(); Coord x1, y1, x2, y2; double d1, d2; int xtic, ytic; XYView& v = *XYView::current_draw_view(); v.zin(x1, y1, x2, y2); MyMath::round_range_down(x1, x2, d1, d2, xtic); x1 = d1; x2 = d2; MyMath::round_range_down(y1, y2, d1, d2, ytic); y1 = d1; y2 = d2; const Transformer& tr = v.s2o(); c->push_transform(); c->transform(tr); IfIdraw(pict(tr)); Coord l,r,b,t; tr.inverse_transform(x1, y1, l, b); tr.inverse_transform(x2, y2, r, t); Coord xorg, yorg, xo, yo; if (MyMath::inside(0, x1, x2)) { xorg = 0; }else{ xorg = x1; } if (MyMath::inside(0, y1, y2)) { yorg = 0; }else{ yorg = y1; } tr.inverse_transform(xorg, yorg, xo, yo); const Brush* br = Appear::default_brush(); IDLINE(l, yo, r, yo, color, br); IDLINE(xo, b, xo, t, color, br); const Coord tic = 10; Coord x, y; Coord dtic = (r-l)/xtic; Coord dx = (x2 - x1)/xtic; int i; for (i=0; i <= xtic; ++i) { x = l + i*dtic; IDLINE(x, yo, x, yo + tic, color, br); tic_label(x, yo-5, x1+i*dx, .5, 1, c); } dtic = (t - b)/ytic; dx = (y2 - y1)/ytic; for (i=0; i <= ytic; ++i) { y = b + i*dtic; IDLINE(xo, y , xo+tic, y, color, br); tic_label(xo-5, y, y1+i*dx, 1, .5, c); } c->pop_transform(); IfIdraw(end()); } void AxisBackground::tic_label( Coord x1, Coord y1, Coord val, float xa, float ya, Canvas* c) const { char buf[20]; sprintf(buf, "%g", val); Glyph* g = new Label(buf, WidgetKit::instance()->font(),Appear::default_color()); g->ref(); Requisition req; g->request(req); Allocation a; a.x_allotment().origin(x1 - xa*req.x_requirement().natural()); a.y_allotment().origin(y1 - ya*req.y_requirement().natural()); g->draw(c, a); g->unref(); if (OcIdraw::idraw_stream) { Transformer t; t.translate(a.x(), a.y()); OcIdraw::text(c, buf, t, NULL, Appear::default_color()); } } #endif neuron-7.5/src/ivoc/axis.h000066400000000000000000000030131323325274500155420ustar00rootroot00000000000000#ifndef axis_h #define axis_h #include #include class Scene; class Axis : public Glyph, public Observer { public: Axis(Scene*, DimensionName); Axis(Scene*, DimensionName, Coord x1, Coord x2); Axis(Scene*, DimensionName, Coord x1, Coord x2, Coord pos, int ntic = 1, int nminor = 0, int invert=0, bool number=true); virtual ~Axis(); virtual void save(ostream&); virtual void update(Observable*); virtual void size(float&,float&); private: void init(Coord x1, Coord x2, Coord pos=0., int ntic = 1, int nminor = 0, int invert=0, bool number=true); bool set_range(); void install(); void location(); private: Scene* s_; Coord min_, max_; DimensionName d_; double amin_, amax_; int ntic_, nminor_; int invert_; bool number_; Coord pos_; }; class BoxBackground : public Background { public: BoxBackground(); virtual ~BoxBackground(); virtual void draw(Canvas*, const Allocation&) const; virtual void print(Printer*, const Allocation&) const; private: void draw_help(Canvas*, const Allocation&) const; void tic_label(Coord x, Coord y, Coord val, float x_align, float y_align, Canvas*) const; }; class AxisBackground : public Background { public: AxisBackground(); virtual ~AxisBackground(); virtual void draw(Canvas*, const Allocation&) const; virtual void print(Printer*, const Allocation&) const; private: void draw_help(Canvas*, const Allocation&) const; void tic_label(Coord x, Coord y, Coord val, float x_align, float y_align, Canvas*) const; }; #endif neuron-7.5/src/ivoc/bimap.hpp000066400000000000000000000045701323325274500162370ustar00rootroot00000000000000// // bimap.hpp // bimap // // Created by Ewart Timothee on 16/06/16. // #ifndef bimap_h #define bimap_h #include namespace nrn{ namespace tool{ template struct bimap { typedef std::multimap pd2ob_map; typedef std::multimap ob2pd_map; void insert(T const&, O const&); bool find(T const& p, size_t n, T&, O&); bool find(T const& p, T&, O&); void obremove(O const&); void remove(T const&, O const& ); pd2ob_map pd2ob; ob2pd_map ob2pd; }; //free function for remove, generic also no need to duplicate template void remove_from(typename T::key_type const& a, typename T::mapped_type const& b, T &m){ std::pair itp = m.equal_range(a); for (typename T::iterator it = itp.first; it != itp.second;) { typename T::iterator it2(it); ++it; if (it2->second == b) { m.erase(it2); } } } template void bimap::insert(T const& pd, O const& ob) { pd2ob.insert(std::pair(pd, ob)); ob2pd.insert(std::pair(ob, pd)); } template void bimap::obremove(O const& ob) { std::pair itp = ob2pd.equal_range(ob); for (typename ob2pd_map::iterator it = itp.first; it != itp.second; ++it) { T const& pd = it->second; remove_from(pd, ob, pd2ob); } ob2pd.erase(itp.first, itp.second); } template void bimap::remove(T const& pd, O const& ob) { remove_from(pd, ob, pd2ob); remove_from(ob, pd, ob2pd); } template bool bimap::find(T const& p, size_t n, T& pret, O& obret) { bool result = false; typename pd2ob_map::iterator it = pd2ob.upper_bound(p + n); if (it != pd2ob.begin()) { --it; if ((it->first >= p) && (it->first < p + n)) { result = true; pret = it->first; obret = it->second; } } return result; } template bool bimap::find(T const& p, T& pret, O& obret) { bool result = false; typename pd2ob_map::iterator it = pd2ob.find(p); if (it != pd2ob.end()) { result = true; pret = it->first; obret = it->second; } return result; } } // name space tool } // end namespace nrn #endif /* bimap_h */ neuron-7.5/src/ivoc/bndedval.cpp000077500000000000000000000031661323325274500167240ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include "bndedval.h" #include BoundedValue::BoundedValue() { scroll_incr_ = 0.0; page_incr_ = 0.0; } BoundedValue::BoundedValue(Coord lower, Coord upper) { lower_ = lower; span_ = upper - lower; scroll_incr_ = span_ * 0.04; page_incr_ = span_ * 0.4; curvalue_ = (lower + upper) * 0.5; } BoundedValue::~BoundedValue() { } void BoundedValue::lower_bound(Coord c) { lower_ = c; } void BoundedValue::upper_bound(Coord c) { span_ = c - lower_; } void BoundedValue::current_value(Coord value) { curvalue_ = value; constrain(Dimension_X, curvalue_); notify(Dimension_X); notify(Dimension_Y); } void BoundedValue::scroll_incr(Coord c) { scroll_incr_ = c; } void BoundedValue::page_incr(Coord c) { page_incr_ = c; } #define access_function(name,value) \ Coord BoundedValue::name(DimensionName) const { \ return value; \ } access_function(lower,lower_) access_function(upper,lower_ + span_) access_function(length,span_) access_function(cur_lower,curvalue_) access_function(cur_upper,curvalue_) access_function(cur_length,0) void BoundedValue::scroll_to(DimensionName d, Coord position) { Coord p = position; constrain(d, p); if (p != curvalue_) { curvalue_ = p; notify(Dimension_X); notify(Dimension_Y); } } #define scroll_function(name,expr) \ void BoundedValue::name(DimensionName d) { \ scroll_to(d, curvalue_ + expr); \ } scroll_function(scroll_forward,+scroll_incr_) scroll_function(scroll_backward,-scroll_incr_) scroll_function(page_forward,+page_incr_) scroll_function(page_backward,-page_incr_) #endif neuron-7.5/src/ivoc/bndedval.h000077500000000000000000000020741323325274500163660ustar00rootroot00000000000000#ifndef bounded_value_h #define bounded_value_h #include class BoundedValue : public Adjustable { protected: BoundedValue(); public: BoundedValue(Coord lower, Coord upper); virtual ~BoundedValue(); virtual void lower_bound(Coord); virtual void upper_bound(Coord); virtual void current_value(Coord); virtual void scroll_incr(Coord); virtual void page_incr(Coord); virtual Coord lower(DimensionName) const; virtual Coord upper(DimensionName) const; virtual Coord length(DimensionName) const; virtual Coord cur_lower(DimensionName) const; virtual Coord cur_upper(DimensionName) const; virtual Coord cur_length(DimensionName) const; virtual void scroll_to(DimensionName, Coord position); virtual void scroll_forward(DimensionName); virtual void scroll_backward(DimensionName); virtual void page_forward(DimensionName); virtual void page_backward(DimensionName); private: Coord curvalue_; Coord lower_; Coord span_; Coord scroll_incr_; Coord page_incr_; }; #endif neuron-7.5/src/ivoc/cbwidget.cpp000077500000000000000000000044431323325274500167340ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include "apwindow.h" #include "graph.h" #include "cbwidget.h" #include "rect.h" #include "scenepic.h" ColorBrushWidget::ColorBrushWidget(Graph* g) { g_ = g; Resource::ref(g_); g->attach(this); } ColorBrushWidget::~ColorBrushWidget() { //printf("~ColorBrushWidget\n"); g_->detach(this); Resource::unref(g_); } void ColorBrushWidget::execute() { GlyphIndex i, cnt; cnt = cb_->count(); for (i=0; i < cnt; ++i) { Button* b = (Button*)((MonoGlyph*)cb_->component(i))->body(); if (b->state()->test(TelltaleState::is_chosen)) { g_->color(int(i)); break; } } cnt = bb_->count(); for (i=0; i < cnt; ++i) { Button* b = (Button*)((MonoGlyph*)bb_->component(i))->body(); if (b->state()->test(TelltaleState::is_chosen)) { g_->brush(int(i)); break; } } } void ColorBrushWidget::map() { int i; long colorsize=10, brushsize=10; WidgetKit& wk = *WidgetKit::instance(); LayoutKit& lk = *LayoutKit::instance(); wk.style()->find_attribute("CBWidget_ncolor", colorsize); wk.style()->find_attribute("CBWidget_nbrush", brushsize); cb_ = lk.vbox(colorsize); bb_ = lk.vbox(brushsize); Glyph* g = lk.hflexible(lk.hbox(cb_, bb_)) ; TelltaleGroup* ttg1 = new TelltaleGroup(); TelltaleGroup* ttg2 = new TelltaleGroup(); for (i=0; i < colorsize; ++i) { cb_->append(lk.margin(wk.radio_button(ttg1, new Line(50, 0, colors->color(i), brushes->brush(4)), this ), 2) ); } for (i=0; i < brushsize; ++i) { bb_->append(lk.margin(wk.radio_button(ttg2, new Line(50, 0, colors->color(1), brushes->brush(i)), this ), 2) ); } DismissableWindow* w = new DismissableWindow(new Background(g, wk.background())); w_ = w; DismissableWindow* p = ScenePicker::last_window(); if (p) { w->transient_for(p); w->place(p->left(), p->bottom()); } w->map(); } void ColorBrushWidget::start(Graph* g) { ColorBrushWidget* cb = new ColorBrushWidget(g); cb->map(); } void ColorBrushWidget::update(Observable*) { if (g_->tool() != Scene::CHANGECOLOR) { //printf("dismiss window of ColorBrushWidget\n"); w_->dismiss(); } } #endif neuron-7.5/src/ivoc/cbwidget.h000077500000000000000000000006201323325274500163720ustar00rootroot00000000000000#ifndef cbwidget_h #define cbwidget_h #include class Graph; class ColorBrushWidget : public Action , public Observer { public: static void start(Graph*); virtual ~ColorBrushWidget(); void execute(); virtual void update(Observable*); private: ColorBrushWidget(Graph*); void map(); private: Graph* g_; PolyGlyph* cb_; PolyGlyph* bb_; DismissableWindow* w_; }; #endif neuron-7.5/src/ivoc/checkpnt.cpp000066400000000000000000000675331323325274500167510ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file /* strategy: symbols hoc_built_in_symlist hoc_top_level_symlist symlists for each template object data linked-function pointers procedures symbol pointers and linked function pointers used here nrnoc mostly data but also pointers in the dparam. because of setpointer (eg, pre-synaptic potential, these can be pointers to any object data or nrnoc data. bottom line: extremely important to have generic method for pointers to any location of an allocated block. two pass: allocate all blocks make pointer map fill pointers two kinds of pointers ownership -- responsible for allocating the space observer map key address size type This was my initial thought. The incremental implementation has evolved considerably with many ad hoc aspects and false starts. assume usage of compatible executeable. This means the same hoc_built_in_symlist for writing and reading the checkpoint. For now we save this symlist in the checkpoint and on reading check to make sure it is the same as the one in memory. If so I think we have prima facie evidence that the instruction list is consistent. ie add() -inst_table-> int ---> int -hoc_inst[]-> add(). the hoc_inst[] contains the signature of an instruction that tells what (if anything)is expected on the execution list. All other built-in functions are accessed through their symbols. In fact all symbols are transmitted via sym -stable_-> int -----> int -symplist[]-> sym Here is the format of the checkpoint file (no leading blanks in file): total number of symbols hoc_built-in-symlist (in recursive symbol and table format) hoc_top_level_symlist (in recursive symbol and table format) instructions for all FUNC/PROC symbols -1 Objectdata (VAR with NOTUSER subtype, OBJECTVAR, STRING) and local data -1 ivoc,nrnoc, nrniv stuff (to be implemented) The recursive symbol and table format is symtable size symbolinteger type subtype symbolname if the symbol is of a type that itself has a symbol table then we recurse instructions for all ... is a -1 terminated list of symbolinteger size instructionintegers mingled with signature info consisting of symbolinteger, integer, etc Objectdata etc is -1 terminated list of symbolinteger data depending on type. eg for VAR && NOTUSER it is arrayinfo values for all elements in the array and for OBJECTVAR it is arrayinfo Objectdata recursion for all elements in the array objectref to the objects for all elements in the array */ #ifndef MAC #define HAVE_XDR 0 #include #include #include "oc2iv.h" #include "ocfunc.h" #if HAVE_XDR #include #endif #include "checkpnt.h" extern "C" { #include "redef.h" #include "hoclist.h" #include "parse.h" #include "code.h" #include "equation.h" int hoc_readcheckpoint(char*); extern int hoc_resize_toplevel(int); } static struct HocInst { Pfrv pi; const char* signature; } hoc_inst_[] = { 0, 0, //0 nopop, 0, eval, 0, add, 0, hoc_sub, 0, mul, 0, hoc_div, 0, negate, 0, power, 0, assign, 0, bltin, "s", // requires change varpush, "s", //10 constpush, "s", pushzero, 0, print, 0, varread, "s", prexpr, 0, prstr,0, gt, 0, lt, 0, eq, 0, //20 ge, 0, le, 0, ne, 0, hoc_and, 0, hoc_or, 0, hoc_not, 0, ifcode, "iii", forcode, "iii", shortfor, "ii", call, "si", //30 arg, "i", argassign, "i", funcret, 0, procret, 0, hoc_stringarg, "i", hoc_push_string, "s", Break, 0, Continue, 0, Stop, 0, assstr, 0, //40 hoc_evalpointer, 0, hoc_newline, 0, hoc_delete_symbol, "s", hoc_cyclic, 0, hoc_parallel_begin, 0, hoc_parallel_end, 0, dep_make, 0, eqn_name, 0, eqn_init, 0, eqn_lhs, 0, //50 eqn_rhs, 0, hoc_objectvar, "s", hoc_object_component, "siis", hoc_object_eval, 0, hoc_object_asgn, 0, hoc_objvardecl, "si", hoc_cmp_otype, "i", hoc_newobj, "si", hoc_asgn_obj_to_str, 0, hoc_known_type, "i", //60 hoc_push_string, "s", hoc_objectarg, "i", hoc_ob_pointer, 0, connectsection, 0, simpleconnectsection, 0, connectpointer, "s", add_section, "si", range_const, "s", range_interpolate, "s", range_interpolate_single, "s", //70 rangevareval, "s", rangepoint, "s", sec_access, "s", ob_sec_access, 0, mech_access, "s", for_segment, "ii", sec_access_push, "s", sec_access_pop, 0, forall_section, "ii", hoc_ifsec, "ii", //80 hoc_ifseclist, "ii", forall_sectionlist, "ii", connect_point_process_pointer, 0, nrn_cppp, 0, rangevarevalpointer, "s", sec_access_object, 0, mech_uninsert, "s", hoc_arayinstal, "i", 0, 0 }; #define VPfri void* declareTable(InstTable, VPfri, short) implementTable(InstTable, VPfri, short) static InstTable* inst_table_; declareTable(Symbols, Symbol*, int) implementTable(Symbols, Symbol*, int) declareTable(Objects, Object*, int) implementTable(Objects, Object*, int) class PortablePointer { public: PortablePointer(); PortablePointer(void* address, int type, unsigned long size = 1); virtual ~PortablePointer(); void set(void* address, int type, unsigned long size = 1); void size(unsigned long s) { size_ = s;} unsigned long size() { return size_;} void* address() { return address_;} int type() { return type_;} private: void* address_; int type_; unsigned long size_; }; PortablePointer::PortablePointer() { address_ = NULL; type_ = 0; size_ = 0; } PortablePointer::PortablePointer(void* address, int type, unsigned long s) { set(address, type, s); } void PortablePointer::set(void* address, int type, unsigned long s) { address_ = address; type_ = type; size_ = s; } PortablePointer::~PortablePointer() { } declareList(PPList,PortablePointer) implementList(PPList,PortablePointer) class OcCheckpoint { public: OcCheckpoint(); virtual ~OcCheckpoint(); bool write(const char*); private: friend class Checkpoint; bool pass1(); bool pass2(); bool make_sym_table(); bool build_map(); PortablePointer* find(void*); bool func(Symbol*); bool sym_count(Symbol*); bool sym_table_install(Symbol*); bool sym_out(Symbol*); bool sym_instructions(Symbol*); bool sym_values(Symbol*); bool objects(Symbol*); bool symlist(Symlist*); bool symbol(Symbol*); bool proc(Proc*); bool instlist(unsigned long, Inst*); bool datum(Datum*); bool ctemplate(Symbol*); bool object(); bool objectdata(Objectdata*); long arrayinfo(Symbol* s, Objectdata*); bool xdr(int&); bool xdr(long&); bool xdr(char*&, int); bool xdr(short&); bool xdr(unsigned int&); bool xdr(unsigned long&); bool xdr(double&); bool xdr(Object*&); private: int cnt_; int nobj_; Objects* otable_; PPList* ppl_; bool (OcCheckpoint::* func_)(Symbol*); Symbols* stable_; #if HAVE_XDR XDR xdrs_; #endif Objectdata* objectdata_; }; class OcReadChkPnt { public: OcReadChkPnt(); virtual ~OcReadChkPnt(); bool read(); private: friend class Checkpoint; bool symbols(); bool symtable(); bool symbol(); bool instructions(); bool objects(); bool objectdata(); long arrayinfo(Symbol* s, Objectdata*); bool get(int&); bool get(long&); bool get(char*&); bool get(double&); bool get(Object*&); private: bool lookup_; int builtin_size_; int lineno_; int id_; int nsym_; Symbol** psym_; long nobj_; Object** pobj_; Symlist* symtable_; }; static bool out_; static FILE* f_; static OcCheckpoint* cp_; static OcReadChkPnt* rdckpt_; static Checkpoint* ckpt_; Checkpoint* Checkpoint::instance() { if (!ckpt_) { ckpt_ = new Checkpoint(); } return ckpt_; } Checkpoint::Checkpoint() { } Checkpoint::~Checkpoint() { } bool Checkpoint::out() { return out_; } bool Checkpoint::xdr(long& i) { if (out()) { return cp_->xdr(i); }else{ return rdckpt_->get(i); } } bool Checkpoint::xdr(Object*& o) { if (out()) { return cp_->xdr(o); }else{ return rdckpt_->get(o); } } #else extern "C"{ void hoc_checkpoint(); int hoc_readcheckpoint(char*); void hoc_ret(); void hoc_pushx(double); } #endif //from top of file void hoc_checkpoint() { #ifndef MAC if (! cp_) { cp_ = new OcCheckpoint(); } bool b; b = cp_->write(gargstr(1)); hoc_ret(); hoc_pushx(double(b)); #else hoc_ret(); hoc_pushx(0.); #endif } int hoc_readcheckpoint(char* fname) { #ifndef MAC f_ = fopen(fname, "r"); if (!f_) { return 0; } char buf[256]; if (fgets(buf, 256, f_) == 0) { printf("checkpoint read from file %s failed.\n", fname); return 2; } if (strcmp(buf, "NEURON Checkpoint\n") != 0) { fclose(f_); return 0; } rdckpt_ = new OcReadChkPnt(); bool b; b = rdckpt_->read(); int rval = 1; if (!b) { printf("checkpoint read from file %s failed.\n", fname); rval = 2; } delete rdckpt_; rdckpt_ = NULL; return rval; #else return 0; #endif } #ifndef MAC OcCheckpoint::OcCheckpoint() { ppl_ = NULL; func_ = NULL; stable_ = NULL; otable_ = NULL; if (!inst_table_) { short i; for(i=1; hoc_inst_[i].pi; ++i) { ; } inst_table_ = new InstTable(2*i); for (i = 1; hoc_inst_[i].pi; ++i) { inst_table_->insert((VPfri)hoc_inst_[i].pi, i); } } } OcCheckpoint::~OcCheckpoint() { if (ppl_) { delete ppl_; } if (stable_) { delete stable_; } if (otable_) { delete otable_; } } #if HAVE_XDR #define USEXDR 1 #else #define USEXDR 0 #endif #undef DEBUG #if USEXDR #define DEBUG if(0) fprintf #else #define DEBUG fprintf #endif bool OcCheckpoint::write(const char* fname) { bool b; int i; out_ = 1; f_ = fopen(fname, "w"); if (!f_) { return false; } fprintf(f_, "NEURON Checkpoint\n"); #if USEXDR xdrstdio_create(&xdrs_, f_, XDR_ENCODE); #endif b = make_sym_table(); func_ = &OcCheckpoint::sym_out; b = (b && pass1()); func_ = &OcCheckpoint::sym_instructions; b = (b && pass1()); i = -1; b = (b && xdr(i)); //printf("nobj_ = %d\n", nobj_); b = b && object(); func_ = &OcCheckpoint::sym_values; objectdata_ = hoc_top_level_data; int size = hoc_resize_toplevel(0); b = b && xdr(size); i = 0; b = b && xdr(i); b = b && pass1(); i = -1; b = (b && xdr(i)); #if USEXDR xdr_destroy(&xdrs_); #endif fclose(f_); return b; } bool OcCheckpoint::make_sym_table() { bool b; cnt_ = 1; nobj_ = 0; func_ = &OcCheckpoint::sym_count; b = pass1(); if (!b) { printf("make_sym_table failed on first pass1\n"); } DEBUG(f_, "#symbols=%d\n", cnt_); b = (b && xdr(cnt_)); if (stable_) { delete stable_; } stable_ = new Symbols(2*cnt_); cnt_ = 1; func_ = &OcCheckpoint::sym_table_install; if (!b) { printf("make_sym_table failed before second pass1\n"); } b = (b && pass1()); if (!b) { printf("make_sym_table failed on second pass1\n"); } func_ = NULL; return b; } bool OcCheckpoint::sym_count(Symbol* s) { ++cnt_; if (s->type == TEMPLATE) { nobj_ += s->u.ctemplate->count; } return true; } bool OcCheckpoint::sym_table_install(Symbol* s) { stable_->insert(s, cnt_); ++cnt_; return true; } bool OcCheckpoint::sym_out(Symbol* s) { int val; stable_->find(val, s); DEBUG(f_, "%d %s %d %d\n", val, s->name, s->type, s->subtype); int l1 = strlen(s->name); bool b = xdr(val) && xdr(s->name, l1) && xdr(s->type) && xdr(s->subtype) && xdr(s->cpublic) && xdr(s->s_varn) && xdr(s->defined_on_the_fly) ; switch (s->type) { case VAR: if (s->subtype == NOTUSER) { b = b && xdr(s->u.oboff); } arrayinfo(s, NULL); break; case STRING: case OBJECTVAR: b = b && xdr(s->u.oboff); arrayinfo(s, NULL); break; case TEMPLATE: { cTemplate* t = s->u.ctemplate; if (!t->constructor) { b = b && xdr(t->dataspace_size) && xdr(t->id) ; } break; } case NUMBER: b = b && xdr(*s->u.pnum); break; case CSTRING: b = b && xdr(s->u.cstr, strlen(s->u.cstr)); break; } if (!b) { printf("failed in sym_table_install\n"); } return b; } bool OcCheckpoint::pass1() { return symlist(hoc_built_in_symlist) && symlist(hoc_top_level_symlist); } bool OcCheckpoint::pass2() { return false; } bool OcCheckpoint::build_map() { return false; } PortablePointer* find(void*) { return NULL; } bool OcCheckpoint::func(Symbol* s) { if (func_) { return (this->*func_)(s); } return true; } bool OcCheckpoint::symlist(Symlist* sl){ if (func_ == &OcCheckpoint::sym_out) { int i = 0; if (sl) for (Symbol* s = sl->first; s; s = s->next) { ++i; } DEBUG(f_, "symboltable size %d\n", i); if (!xdr(i)) { return false; } } if (sl) for (Symbol* s = sl->first; s; s = s->next) { if (!symbol(s)) { printf("symlist failed\n"); return false; } } return true; } bool OcCheckpoint::symbol(Symbol* s) { if (!func(s)) { return false; } bool b = true; switch (s->type) { case TEMPLATE: b = ctemplate(s); break; case FUNCTION: case PROCEDURE: b = symlist(s->u.u_proc->list); break; } if (!b) printf("symbol failed\n"); return b; } bool OcCheckpoint::sym_instructions(Symbol* s) { Proc* p = s->u.u_proc; if (s->type == FUNCTION || s->type == PROCEDURE) { int val; if (!stable_->find(val, s)) { printf("couldn't find %s in table\n", s->name); return false; } if (p->size) { DEBUG(f_, "instructions for %d |%s|\n", val, s->name); DEBUG(f_, "size %lu\n", p->size); bool b = xdr(val) && xdr(p->size); if (!b) { printf("failed in sym_intructions\n"); return false; } b = instlist(p->size, p->defn.in); if (!b) { printf("instlist failed for %s\n", s->name); } return b; } } return true; } bool OcCheckpoint::instlist(unsigned long size, Inst* in) { for (unsigned long i = 0; i < size; ++i) { short val; int sval; if (in[i].in == STOP) { DEBUG(f_, " STOP\n"); val = 0; if (!xdr(val)) { printf("instlist failed 1\n"); return false; } continue; } if (inst_table_->find(val, (VPfri)in[i].pf)) { DEBUG(f_, " %d\n", val); if (!xdr(val)) { printf("instlist failed 2\n"); return false; } const char* s = hoc_inst_[val].signature; for (int j=0; s && s[j]; ++j) { ++i; switch (s[j]) { case 's': if (in[i].sym) { if (!stable_->find(sval, in[i].sym)) { printf("couldn't find |%s| in table at instruction index %ld\n", in[i].sym->name, i); return false; } //DEBUG(f_, " %d |%s|\n", sval, in[i].sym->name); if (!xdr(sval)) { printf("instlist failed 3\n"); return false; } }else{ DEBUG(f_, " 0 SYMBOL0\n"); sval = 0; if (!xdr(sval)) { printf("instlist failed 4\n"); return false; } } break; case 'i': DEBUG(f_, " %i\n", in[i].i); if (!xdr(in[i].i)) { printf("instlist failed 5\n"); return false; } break; } } }else{ printf("OcCheckpoint::instlist failed at i = %lu\n", i); return false; } } return true; } bool OcCheckpoint::datum(Datum*) { return false; } bool OcCheckpoint::ctemplate(Symbol* s) { cTemplate* t = s->u.ctemplate; if (func_ == &OcCheckpoint::sym_values) { Objectdata* saveod = objectdata_; int ti; bool b; b = stable_->find(ti, s); DEBUG(f_, "%d %d %s\n", ti, t->count, s->name); b = b && xdr(ti); // b = b && xdr(t->count); hoc_Item* q; ITERATE(q, t->olist) { Object* ob = OBJ(q); int oid; b = b && otable_->find(oid, ob); b = b && xdr(oid); if (t->constructor) { if (t->checkpoint) { b = b && (t->checkpoint)(&ob->u.this_pointer); }else{ printf("No checkpoint available for %s\n", hoc_object_name(ob)); b = false; } }else{ objectdata_ = ob->u.dataspace; b = b && symlist(t->symtable); } if (!b) { break; } } objectdata_ = saveod; return b; }else{ return symlist(t->symtable); } } bool OcCheckpoint::object() { bool b; int i; if (otable_) { delete otable_; } b = xdr(nobj_); otable_ = new Objects(2*nobj_ + 1); nobj_ = 0; func_ = &OcCheckpoint::objects; b = pass1(); i = -1; b = b && xdr(i); return b; } bool OcCheckpoint::objects(Symbol* s) { bool b = true; if (s->type == TEMPLATE) { int sid; b = b && stable_->find(sid, s); b = b && xdr(sid); cTemplate* t = s->u.ctemplate; #undef init if (t->init) { b = b && stable_->find(sid, t->init); }else{ sid = 0; } b = b && xdr(sid); b = b && xdr(t->index) && xdr(t->count) && xdr(t->id); hoc_Item* q; ITERATE(q, t->olist) { Object* ob = OBJ(q); ++nobj_; otable_->insert(ob, nobj_); // 0 is null object b = b && xdr(nobj_) && xdr(ob->refcount) && xdr(ob->index); } } return b; } bool OcCheckpoint::objectdata(Objectdata*) { return false; } #undef sub long OcCheckpoint::arrayinfo(Symbol* s, Objectdata* od) { Arrayinfo* ao; Arrayinfo* as; as = s->arayinfo; if (od) { ao = od[s->u.oboff + 1].arayinfo; }else{ ao = as; } long n = long(hoc_total_array_data(s, od)); if (!as) { // not an array DEBUG(f_, "0\n"); int i = 0; xdr(i); }else if (od && as == ao) { // same as original DEBUG(f_, "-1\n"); int i = -1; xdr(i); }else{ int v = ao->a_varn ? 1 : 0; DEBUG(f_, "%d %d %d", ao->nsub, ao->refcount, v); if (v) { printf("checkpoint of equation array vars not implemented: %s\n", s->name); return -1; } xdr(ao->nsub); // xdr(ao->refcount); // xdr(v); for (int i = 0; i < ao->nsub; ++i) { DEBUG(f_, " %d", ao->sub[i]); xdr(ao->sub[i]); } DEBUG(f_, "\n"); } return n; } bool OcCheckpoint::proc(Proc*) { return false; } bool OcCheckpoint::sym_values(Symbol* s) { int sp; bool b; stable_->find(sp, s); if ((s->type == VAR && s->subtype == NOTUSER) || s->type == OBJECTVAR || s->type == STRING || s->type == SECTION) { DEBUG(f_, "%d %s\n", sp, s->name); b = xdr(sp); long n = arrayinfo(s, objectdata_); if (n == -1) { return false; } // DEBUG(f_, " %ld\n", n); // b = b && xdr(n); for (long i = 0; i < n; ++i) { Objectdata od = objectdata_[s->u.oboff]; if (s->type == VAR) { double d = od.pval[i]; DEBUG(f_, " %g\n", d); b = b && xdr(d); }else if (s->type == OBJECTVAR) { Object* ob = od.pobj[i]; if (ob == NULL) { DEBUG(f_, " 0\n"); int i = 0; b = b && xdr(i); }else{ #if 0 int t; stable_->find(t, ob->ctemplate->sym); DEBUG(f_, " %d %d %s\n", t, ob->index, ob->ctemplate->sym->name); b = b && xdr(t); b = b && xdr(ob->index); #else int oid; b = b && otable_->find(oid, ob); b = b && xdr(oid); #endif } }else if (s->type == STRING) { char* cp = od.ppstr[i]; DEBUG(f_, " |%s|\n", cp); b = b && xdr(cp, strlen(cp)); // }else if (s->type == SECTION) { } } } return true; } #if USEXDR && 0 bool OcCheckpoint::xdr(int& i) { return xdr_int(&xdrs_, &i); } bool OcCheckpoint::xdr(char*& i, int size){ return xdr_string(&xdrs_, &i, size); } bool OcCheckpoint::xdr(short& i){ return xdr_short(&xdrs_, &i); } bool OcCheckpoint::xdr(unsigned int& i){ return xdr_u_int(&xdrs_, &i); } bool OcCheckpoint::xdr(unsigned long& i){ return xdr_u_long(&xdrs_, &i); } #else bool OcCheckpoint::xdr(int& i) { fprintf(f_, "%d\n", i); return true; } bool OcCheckpoint::xdr(long& i) { fprintf(f_, "%ld\n", i); return true; } bool OcCheckpoint::xdr(char*& s, int){ fprintf(f_, "%s\n", s); return true; } bool OcCheckpoint::xdr(short& i){ int j = i; fprintf(f_, "%d\n", j); return true; } bool OcCheckpoint::xdr(unsigned int& i){ int j = i; fprintf(f_, "%d\n", j); return true; } bool OcCheckpoint::xdr(unsigned long& i){ long j = i; fprintf(f_, "%ld\n", j); return true; } bool OcCheckpoint::xdr(double& i){ fprintf(f_, "%g\n", i); return true; } #endif bool OcCheckpoint::xdr(Object*& o) { int i; bool b; b = otable_->find(i, o); b = b && xdr(i); return b; } #undef Chk #define Chk(arg1,arg2) if (!(arg1)) { printf("%s line %d\n", arg2, lineno_); return false;} #undef Get #define Get(arg) if (!get(arg)) { return false; } OcReadChkPnt::OcReadChkPnt() { builtin_size_ = hoc_resize_toplevel(0); } OcReadChkPnt::~OcReadChkPnt() { delete [] psym_; delete [] pobj_; } bool OcReadChkPnt::read() { int size; out_ = 0; lineno_ = 1; id_ = 1; Chk(symbols(), "OcReadChkPnt::symbols() read failure"); printf("finished with symbols at lineno = %d\n", lineno_); Chk(instructions(), "OcReadChkPnt::instructions() read failure"); printf("finished with instructions at lineno = %d\n", lineno_); Chk(objects(), "OcReadChkPnt::objects() read failure"); printf("finished with objects at lineno = %d\n", lineno_); Get(size); if (size != hoc_resize_toplevel(size - builtin_size_)) { printf("top_level_data not right size\n"); return false; } Chk(objectdata(), "OcReadChkPnt::objectdata() read failure"); printf("finished with objectdata at lineno = %d\n", lineno_); return true; } bool OcReadChkPnt::symbols() { Get(nsym_); psym_ = new Symbol*[nsym_]; for (int i=0; i < nsym_; ++i) { psym_[i] = 0; } lookup_ = true; symtable_ = hoc_built_in_symlist; Chk(symtable(), "built_in_symlist failure"); lookup_ = false; symtable_ = hoc_top_level_symlist; if (symtable_->first != NULL) { printf("Some user symbols are already defined at the top level\n"); return false; } Chk(symtable(), "top_level_symlist failure"); return true; } bool OcReadChkPnt::symtable() { int size; Get(size); for (int i = 0; i < size; ++i) { Chk(symbol(), "symbol read failure"); } return true; } bool OcReadChkPnt::symbol() { int id, type, subtype, i; char buf[2048], *name = buf; Get(id); if (id != id_) { printf("expected symbol id = %d but file id was %d\n", id_, id); return false; } ++id_; Get(name); Get(type); Get(subtype); Symbol* sym; if (lookup_) { sym = hoc_table_lookup(name, symtable_); if (!sym || sym->type != type || sym->subtype != subtype) { printf("%s not a built-in\n", name); return false; } }else{ sym = hoc_install(name, (type == VAR)? UNDEF : type, 0.0, &symtable_); sym->type = type; sym->subtype = subtype; } psym_[id] = sym; Get(i); sym->cpublic = i; Get(i); sym->s_varn = i; Get(i); sym->defined_on_the_fly = i; switch (type) { case VAR: { if (subtype == NOTUSER) { Get(i); if (lookup_ && i != sym->u.oboff) { printf("bad u.oboff field for built-in VAR\n"); return false; }else{ sym->u.oboff = i; } } arrayinfo(sym, NULL); } break; case OBJECTVAR: case STRING: Get(i); sym->u.oboff = i; arrayinfo(sym, NULL); break; case CSTRING: sym->u.cstr = NULL; Get(sym->u.cstr); break; case NUMBER: sym->u.pnum = new double; Get(*sym->u.pnum); break; case TEMPLATE: { cTemplate* t; int dsize, id; Symlist* slsave = symtable_; if (!lookup_) { Get(dsize); Get(id); t = new cTemplate; sym->u.ctemplate = t; t->sym = sym; t->dataspace_size = dsize; t->constructor = 0; t->destructor = 0; t->steer = 0; t->id = id; symtable_ = NULL; Chk(symtable(), ""); t->symtable = symtable_; }else{ // these don't have a dataspace t = sym->u.ctemplate; symtable_ = t->symtable; Chk(symtable(), ""); } symtable_ = slsave; } break; case FUNCTION: case PROCEDURE: { Symlist* slsave = symtable_; symtable_ = sym->u.u_proc->list; Chk(symtable(), ""); sym->u.u_proc->list = symtable_; symtable_ = slsave; } break; } return true; } bool OcReadChkPnt::instructions() { int sid, size, i, iid; Symbol* sym; const char* signature; for (;;) { Get(sid); if (sid == -1) { break; } sym = psym_[sid]; if (!sym || (sym->type != FUNCTION && sym->type != PROCEDURE)) { printf("not a PROC or FUNC\n"); return false; } Get(size); sym->u.u_proc->size = size; Inst* lin; sym->u.u_proc->defn.in = lin = new Inst[size]; for (i=0; i < size;) { Get(iid); lin[i++].pf = hoc_inst_[iid].pi; signature = hoc_inst_[iid].signature; if (signature) for(const char* cp = signature; *cp; ++cp) { Get(iid); switch (*cp) { case 's': lin[i++].sym = psym_[iid]; break; case 'i': lin[i++].i = iid; break; } } } } return true; } bool OcReadChkPnt::objects() { int sid; long i, n, iob = 0; Symbol* sym; Get(nobj_); pobj_ = new Object*[nobj_ + 1]; pobj_[0] = NULL; for (;;) { Get(sid); if (sid == -1) { break; } sym = psym_[sid]; if (sym->type != TEMPLATE) { printf("not a template\n"); return false; } cTemplate* t = sym->u.ctemplate; Get(sid); #undef init t->init = psym_[sid]; Get(t->index); Get(n); t->count = int(n); if (t->constructor && !t->checkpoint && t->count > 0) { printf("Objects for a built-in template without checkpoint: %s\n", sym->name); return false; } t->olist = hoc_l_newlist(); Get(t->id); for (i=0; i < n; ++i) { int fiob; // not really needed Get(fiob); Object* pob = new Object; pobj_[++iob] = pob; if (fiob != iob) { printf("object indexes out of sync\n"); } pob->itm_me = hoc_l_lappendobj(t->olist, pob); pob->ctemplate = t; Get(pob->refcount); Get(pob->index); if (t->constructor) { //have to set this up later pob->u.this_pointer = NULL; }else{ pob->u.dataspace = new Objectdata[t->dataspace_size]; } } } if (iob != nobj_) { printf("objects read != objects expected\n"); return false; } return true; } bool OcReadChkPnt::objectdata() { int sid; long n, i; Symbol* sym; double d; int oid; Objectdata* od, *odp; Get(oid); if (oid == 0) { od = hoc_top_level_data; }else if (oid == -1) { return true; }else{ od = pobj_[oid]->u.dataspace; } for (;;) { Get(sid); if (sid == -1) { break; } sym = psym_[sid]; switch (sym->type) { case VAR: n = arrayinfo(sym, od); #if 0 Get(i); //not necessary but if present don't forget others if (i != n) { printf("inconsistent array size %d %d\n", i, n); returnf false; } #endif odp = od + sym->u.oboff; if (od != hoc_top_level_data || builtin_size_ <= sym->u.oboff) { odp->pval = new double[n]; } for (i = 0; i < n; ++i) { Get(d); odp->pval[i] = d; } break; case OBJECTVAR: n = arrayinfo(sym, od); odp = od + sym->u.oboff; odp->pobj = new Object*[n]; for (i = 0; i < n; ++i) { int iob; Get(iob); odp->pobj[i] = pobj_[iob]; } break; case STRING: n = arrayinfo(sym, od); od[sym->u.oboff].ppstr = new char*[n]; for (i=0; i < n; ++i) { od[sym->u.oboff].ppstr[i] = NULL; Get(od[sym->u.oboff].ppstr[i]); } break; case TEMPLATE: { cTemplate* t = sym->u.ctemplate; if (t->constructor) { for (long j = 0; j < t->count; ++j) { int iob; Object* ob; Get(iob); ob = pobj_[iob]; if (!(*t->checkpoint)(&ob->u.this_pointer)) { printf("failed reading data for %s\n", hoc_object_name(ob)); return false; } } }else{ for (long j = 0; j < t->count; ++j) { objectdata(); } } } break; default: return false; } } return true; } long OcReadChkPnt::arrayinfo(Symbol* s, Objectdata* od) { int nsub; Get(nsub); if (lookup_) { int i; for (i=0; i < nsub; ++i) { Get(i); } } Arrayinfo** ap; if (od == NULL) { ap = &s->arayinfo; }else{ ap = &od[s->u.oboff + 1].arayinfo; } if (nsub == 0) { *ap = NULL; return 1; } if (nsub == -1) { *ap = s->arayinfo; if (*ap) { (*ap)->refcount++; } return long(hoc_total_array_data(s, NULL)); } Arrayinfo* a = (Arrayinfo*)hoc_Emalloc(sizeof(Arrayinfo) + nsub*sizeof(int)); if (!a) { return -1; } *ap = a; a->refcount = 1; a->a_varn = NULL; a->nsub = nsub; long n = 1; for (int i = 0; i < nsub; ++i) { int sub; Get(sub); a->sub[i] = sub; n *= sub; } return n; } bool OcReadChkPnt::get(int& i) { ++lineno_; char buf[200]; if (!fgets(buf, 200, f_) ||(sscanf(buf, "%d", &i) != 1)) { printf("error reading integer at line %d\n", lineno_); return false; } return true; } bool OcReadChkPnt::get(double& i) { ++lineno_; char buf[200]; if (!fgets(buf, 200, f_) ||(sscanf(buf, "%lf", &i) != 1)) { printf("error reading double at line %d\n", lineno_); return false; } return true; } bool OcReadChkPnt::get(long& i) { int j; Get(j); i = j; return true; } bool OcReadChkPnt::get(char*& s) { ++lineno_; if (s) { if (!fgets(s, 2048, f_)) { printf("error reading string at line %d\n", lineno_); return false; } s[strlen(s)-1] = '\0'; }else{ char buf[256]; if (!fgets(buf, 256, f_)) { printf("error reading string at line %d\n", lineno_); return false; } buf[strlen(buf)-1] = '\0'; s = new char[strlen(buf) + 1]; strcpy(s, buf); } return true; } bool OcReadChkPnt::get(Object*& o) { long i; Get(i); o = pobj_[i]; return true; } #endif #endif neuron-7.5/src/ivoc/checkpnt.h000066400000000000000000000004751323325274500164060ustar00rootroot00000000000000#ifndef checkpoint_h #define checkpoint_h #define CKPT(arg1,arg2) if (!arg1.xdr(arg2)) { return false;} class Checkpoint { public: Checkpoint(); virtual ~Checkpoint(); static Checkpoint* instance(); bool out(); // true means to file, false means from file bool xdr(long&); bool xdr(Object*&); }; #endif neuron-7.5/src/ivoc/classreg.cpp000077500000000000000000000026451323325274500167510ustar00rootroot00000000000000#include <../../nrnconf.h> // interface c++ class to oc #if defined(__GO32__) #define HAVE_IV 0 #define OC_CLASSES "nrnclass.h" #endif #include #include #include #include "classreg.h" #ifndef OC_CLASSES #define OC_CLASSES "occlass.h" #endif #define EXTERNS 1 extern void #include OC_CLASSES ; #undef EXTERNS static void (*register_classes[])() = { #include OC_CLASSES ,0 }; extern "C" { void hoc_class_registration(void) { for (int i=0; register_classes[i]; i++) { (*register_classes[i])(); } } } /*-----------------------------------------------------*/ #if 0 //example //the class /*static*/ class A { public: A(); ~A(); void f1(char* s); double f2(double x); private: double x_; }; A::A() { printf("A::A\n"); x_=1; } A::~A() { printf("A::~A\n"); } void A::f1(char* s) { printf("A::f1(\"%s\")\n", s);} double A::f2(double x) { double a = x_; x_=x; return a; } //the interface static void* A_constructor(Object*) { printf("A::constructor\n"); return (void*) new A; } static void A_destructor(void* v) { delete (A*)v; } static double A_f1(void* v) { ((A*)v)->f1(gargstr(1)); return(0.); } static double A_f2(void* v) { double x = ((A*)v)->f2(*getarg(1)); return(x); } // class registration to oc static Member_func A_member_func[] = { "f1", A_f1, "f2", A_f2, 0, 0 }; void A_reg() { class2oc("A", A_constructor, A_destructor, A_member_func); } #endif neuron-7.5/src/ivoc/datapath.cpp000066400000000000000000000302661323325274500167310ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include "hoclist.h" #if HAVE_IV #include "graph.h" #endif #include "datapath.h" #include "ivocvect.h" #if !defined(CABLE) // really belongs in vector.c but this is convenient since it will be // present in ivoc but not in nrniv void nrn_vecsim_add(void*, bool) {printf("nrn_vecsym_add implemented in nrniv\n");} void nrn_vecsim_remove(void*) {printf("nrn_vecsym_remove implemented in nrniv\n");} #if HAVE_IV void graphLineRecDeleted(GraphLine*){} void Graph::simgraph(){} #endif // another hack so ivoc will have these names which nrniv gets elsewhere extern "C" { int bbs_poll_; void bbs_done(){} void bbs_handle(){} void nrnbbs_context_wait(){} } #ifdef WIN32 extern "C" { void* dll_lookup(struct DLL*, const char*){return NULL;} struct DLL* dll_load(const char*){return NULL;} } #endif #endif extern "C" { #if CABLE #include "nrnoc2iv.h" #include "membfunc.h" #else #include "oc2iv.h" #endif #include "parse.h" extern Symlist* hoc_built_in_symlist; extern Symlist* hoc_top_level_symlist; extern Objectdata* hoc_top_level_data; } /*static*/ class PathValue { public: PathValue(); ~PathValue(); CopyString* path; Symbol* sym; double original; char* str; }; PathValue::PathValue() { path = NULL; str = NULL; sym = NULL; } PathValue::~PathValue() { if (path) { delete path; } } declareTable(PathTable, void*, PathValue*); implementTable(PathTable, void*, PathValue*); declarePtrList(StringList, char); implementPtrList(StringList, char); class HocDataPathImpl { private: friend class HocDataPaths; HocDataPathImpl(int, int); ~HocDataPathImpl(); void search(); void found(double*, const char*, Symbol*); void found(char**, const char*, Symbol*); PathValue* found_v(void*, const char*, Symbol*); void search(Objectdata*, Symlist*); void search_vectors(); #if CABLE void search_pysec(); void search(Section*); void search(Node*, double x); void search(Point_process*, Symbol*); void search(Prop*, double x); #endif private: PathTable* table_; StringList strlist_; int size_, count_, found_so_far_; int pathstyle_; }; #define sentinal 123456789.e15 static Symbol* sym_vec, *sym_v, *sym_vext, *sym_rallbranch, *sym_L, *sym_Ra; HocDataPaths::HocDataPaths(int size, int pathstyle) { if (!sym_vec) { sym_vec = hoc_table_lookup("Vector", hoc_built_in_symlist); #if CABLE sym_v = hoc_table_lookup("v", hoc_built_in_symlist); sym_vext = hoc_table_lookup("vext", hoc_built_in_symlist); sym_rallbranch = hoc_table_lookup("rallbranch", hoc_built_in_symlist); sym_L = hoc_table_lookup("L", hoc_built_in_symlist); sym_Ra = hoc_table_lookup("Ra", hoc_built_in_symlist); #endif } impl_ = new HocDataPathImpl(size, pathstyle); } HocDataPaths::~HocDataPaths() { delete impl_; } int HocDataPaths::style() { return impl_->pathstyle_; } void HocDataPaths::append(double* pd) { // printf("HocDataPaths::append\n"); PathValue* pv; if (pd && !impl_->table_->find(pv, (void*)pd)) { impl_->table_->insert((void*)pd, new PathValue); ++impl_->count_; } } void HocDataPaths::search() { // printf("HocDataPaths::search\n"); impl_->search(); if (impl_->count_ > impl_->found_so_far_) { // printf("HocDataPaths:: didn't find paths to all the pointers\n"); // this has proved to be too often a false alarm since most panels are // in boxes controlled by objects which have no reference but are // deleted when the window is closed } } String* HocDataPaths::retrieve(double* pd) { assert(impl_->pathstyle_ != 2); // printf("HocDataPaths::retrieve\n"); PathValue* pv; if (impl_->table_->find(pv, (void*)pd)) { return pv->path; }else{ return NULL; } } Symbol* HocDataPaths::retrieve_sym(double* pd) { // printf("HocDataPaths::retrieve\n"); PathValue* pv; if (impl_->table_->find(pv, (void*)pd)) { return pv->sym; }else{ return NULL; } } void HocDataPaths::append(char** pd) { // printf("HocDataPaths::append\n"); PathValue* pv; if (*pd && !impl_->table_->find(pv, (void*)pd)) { pv = new PathValue; pv->str = *pd; impl_->table_->insert((void*)pd, pv); ++impl_->count_; } } String* HocDataPaths::retrieve(char** pd) { // printf("HocDataPaths::retrieve\n"); PathValue* pv; if (impl_->table_->find(pv, (void*)pd)) { return pv->path; }else{ return NULL; } } /*------------------------------*/ HocDataPathImpl::HocDataPathImpl(int size, int pathstyle) { pathstyle_ = pathstyle; table_ = new PathTable(size); size_ = size; count_ = 0; found_so_far_ = 0; } HocDataPathImpl::~HocDataPathImpl() { for (TableIterator(PathTable) i(*table_); i.more(); i.next()) { PathValue* pv = i.cur_value(); delete pv; } delete table_; } void HocDataPathImpl::search() { found_so_far_ = 0; if (table_) { for (TableIterator(PathTable) i(*table_); i.more(); i.next()) { PathValue* pv = i.cur_value(); if (pv->str) { char** pstr = (char**)i.cur_key(); *pstr = NULL; }else{ double* pd = (double*)i.cur_key(); pv->original = *pd; *pd = sentinal; } } } if (pathstyle_ > 0) { search(hoc_top_level_data, hoc_built_in_symlist); search(hoc_top_level_data, hoc_top_level_symlist); }else{ search(hoc_top_level_data, hoc_top_level_symlist); search(hoc_top_level_data, hoc_built_in_symlist); } #if CABLE if (found_so_far_ < count_) { search_pysec(); } #endif if (found_so_far_ < count_) { search_vectors(); } if (table_) { for (TableIterator(PathTable) i(*table_); i.more(); i.next()) { PathValue* pv = i.cur_value(); if (pv->str) { char** pstr = (char**)i.cur_key(); *pstr = pv->str; }else{ double* pd = (double*)i.cur_key(); *pd = pv->original; } } } } PathValue* HocDataPathImpl::found_v(void* v, const char* buf, Symbol* sym) { PathValue* pv; if (pathstyle_ != 2) { char path[500]; CopyString cs(""); long i, cnt; int len = 0; cnt = strlist_.count(); for (i=0; i< cnt; ++i) { sprintf(path, "%s%s.", cs.string(), strlist_.item(i)); cs = path; } sprintf(path, "%s%s", cs.string(), buf); if (!table_->find(pv, v)) { hoc_warning("table lookup failed for pointer for-", path); return NULL; } if (!pv->path) { pv->path = new CopyString(path); pv->sym = sym; ++found_so_far_; } //printf("HocDataPathImpl::found %s\n", path); }else{ if (!table_->find(pv, v)) { hoc_warning("table lookup failed for pointer for-", sym->name); return NULL; } if (!pv->sym) { pv->sym = sym; ++found_so_far_; } } return pv; } void HocDataPathImpl::found(double* pd, const char* buf, Symbol* sym) { PathValue* pv = found_v((void*)pd, buf, sym); if (pv) { *pd = pv->original; } } void HocDataPathImpl::found(char** pstr, const char* buf, Symbol* sym) { PathValue* pv = found_v((void*)pstr, buf,sym); if (pv) { *pstr = pv->str; }else{ hoc_assign_str(pstr, "couldn't find"); } } void HocDataPathImpl::search(Objectdata* od, Symlist* sl) { Symbol* sym; int i, total; char buf[200]; CopyString cs(""); if (sl) for (sym = sl->first; sym; sym = sym->next) { if (sym->cpublic != 2) { switch (sym->type) { case VAR: { double* pd; if (sym->subtype == NOTUSER) { pd = object_pval(sym, od); total = hoc_total_array_data(sym, od); }else if (sym->subtype == USERDOUBLE) { pd = sym->u.pval; total = 1; }else{ break; } for (i=0; i < total; ++i) { if (pd[i] == sentinal) { sprintf(buf, "%s%s", sym->name, hoc_araystr(sym, i, od)); cs = buf; found(pd + i, cs.string(), sym); } } } break; case STRING: { char** pstr = object_pstr(sym, od); if (*pstr == NULL) { sprintf(buf, "%s", sym->name); cs = buf; found(pstr, cs.string(), sym); } } break; case OBJECTVAR: { if (pathstyle_ > 0) { break; } Object** obp = object_pobj(sym, od); total = hoc_total_array_data(sym, od); for (i=0; i < total; ++i) if (obp[i] && ! obp[i]->recurse) { cTemplate* t = (obp[i])->ctemplate; if (!t->constructor) { // not the this pointer if (obp[i]->u.dataspace != od) { sprintf(buf, "%s%s", sym->name, hoc_araystr(sym, i, od)); cs = buf; strlist_.append((char*)cs.string()); obp[i]->recurse = 1; search(obp[i]->u.dataspace, obp[i]->ctemplate->symtable); obp[i]->recurse = 0; strlist_.remove(strlist_.count()-1); } }else{ /* point processes */ #if CABLE if (t->is_point_) { sprintf(buf, "%s%s", sym->name, hoc_araystr(sym, i, od)); cs = buf; strlist_.append((char*)cs.string()); search((Point_process*)obp[i]->u.this_pointer, sym); strlist_.remove(strlist_.count()-1); } #endif /* seclists, object lists */ } } } break; #if CABLE case SECTION: { total = hoc_total_array_data(sym, od); for (i=0; i < total; ++i) { hoc_Item** pitm = object_psecitm(sym, od); if (pitm[i]) { sprintf(buf, "%s%s", sym->name, hoc_araystr(sym, i, od)); cs = buf; strlist_.append((char*)cs.string()); search(hocSEC(pitm[i])); strlist_.remove(strlist_.count()-1); } } } break; #endif case TEMPLATE: { cTemplate* t = sym->u.ctemplate; hoc_Item* q; ITERATE (q, t->olist) { Object* obj = OBJ(q); sprintf(buf, "%s[%d]", sym->name, obj->index); cs = buf; strlist_.append((char*)cs.string()); if (!t->constructor) { search(obj->u.dataspace, t->symtable); }else{ #if CABLE if (t->is_point_) { search((Point_process*)obj->u.this_pointer, sym); } #endif } strlist_.remove(strlist_.count()-1); } } break; } } } } void HocDataPathImpl::search_vectors() { int i, cnt; char buf[200]; CopyString cs(""); cTemplate* t = sym_vec->u.ctemplate; hoc_Item* q; ITERATE (q, t->olist) { Object* obj = OBJ(q); sprintf(buf, "%s[%d]", sym_vec->name, obj->index); cs = buf; strlist_.append((char*)cs.string()); Vect* vec = (Vect*)obj->u.this_pointer; int size = vec->capacity(); double* pd = vector_vec(vec); for (i=0; i < size; ++i) { if (pd[i] == sentinal) { sprintf(buf, "x[%d]", i); found(pd + i, buf, sym_vec); } } strlist_.remove(strlist_.count()-1); } } #if CABLE void HocDataPathImpl::search_pysec() { CopyString cs(""); hoc_Item* qsec; ForAllSections(sec) if (sec->prop && sec->prop->dparam[PROP_PY_INDEX]._pvoid) { cs = secname(sec); strlist_.append((char*)cs.string()); search(sec); strlist_.remove(strlist_.count()-1); } } } void HocDataPathImpl::search(Section* sec) { if (sec->prop->dparam[2].val == sentinal) { found(&sec->prop->dparam[2].val, "L", sym_L); } if (sec->prop->dparam[4].val == sentinal) { found(&sec->prop->dparam[4].val, "rallbranch", sym_rallbranch); } if (sec->prop->dparam[7].val == sentinal) { found(&sec->prop->dparam[7].val, "Ra", sym_Ra); } if (!sec->parentsec && sec->parentnode) { search(sec->parentnode, sec->prop->dparam[1].val); } for (int i = 0; i < sec->nnode; ++i) { search(sec->pnode[i], nrn_arc_position(sec, sec->pnode[i])); } } void HocDataPathImpl::search(Node* nd, double x) { char buf[100]; int i, cnt; CopyString cs(""); if (NODEV(nd) == sentinal) { sprintf(buf, "v(%g)", x); found(&NODEV(nd), buf, sym_v); } #if EXTRACELLULAR if (nd->extnode) { int i; for (i=0; i < nlayer; ++i) { if (nd->extnode->v[i] == sentinal) { if (i == 0) { sprintf(buf, "vext(%g)", x); }else{ sprintf(buf, "vext[%d](%g)", i, x); } found(&(nd->extnode->v[i]), buf, sym_vext); } } } #endif Prop* p; for (p = nd->prop; p; p = p->next) { if (!memb_func[p->type].is_point) { search(p, x); } } } void HocDataPathImpl::search(Point_process* pp, Symbol*) { if (pp->prop) { search(pp->prop, -1); } } void HocDataPathImpl::search(Prop* prop, double x) { char buf[200]; int type = prop->type; Symbol* sym = memb_func[type].sym; Symbol* psym; double* pd; int i, imax, k=0, ir, kmax = sym->s_varn; for (k=0; k < kmax; ++k) { psym = sym->u.ppsym[k]; if (psym->subtype == NRNPOINTER) { continue; } ir = psym->u.rng.index; if (memb_func[type].hoc_mech) { pd = prop->ob->u.dataspace[ir].pval; }else{ pd = prop->param + ir; } imax = hoc_total_array_data(psym, 0); for (i=0; i < imax; ++i) { if (pd[i] == sentinal) { if (x < 0) { sprintf(buf, "%s%s", psym->name, hoc_araystr(psym, i, 0)); }else{ sprintf(buf, "%s%s(%g)", psym->name, hoc_araystr(psym, i, 0), x); } found(pd + i, buf, psym); } } } } #endif neuron-7.5/src/ivoc/datapath.h000077500000000000000000000007341323325274500163760ustar00rootroot00000000000000/* given a set of double*, find the executable hoc varnames */ struct Symbol; class String; class HocDataPathImpl; class HocDataPaths { public: // 0 objref style, 1 object id style, 2 symbol style HocDataPaths(int = 1000, int pathstyle = 0); virtual ~HocDataPaths(); void append(double*); void append(char**); void search(); String* retrieve(double*); String* retrieve(char**); Symbol* retrieve_sym(double*); int style(); private: HocDataPathImpl* impl_; }; neuron-7.5/src/ivoc/dbrowser.h000077500000000000000000000036531323325274500164420ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * DocBrowser -- browse a directory */ #ifndef dbrowser_h #define dbrowser_h #include class Adjustable; class DocBrowserImpl; class WidgetKit; class Word; class DocBrowser : public Browser { public: DocBrowser(TBScrollBox*, WidgetKit*); virtual ~DocBrowser(); virtual void press(const Event&); virtual void drag(const Event&); virtual void release(const Event&); virtual void keystroke(const Event&); virtual InputHandler* focus_in(); virtual void focus_out(); virtual void select(GlyphIndex); virtual Adjustable* adjustable() const; virtual void refresh(); virtual void select_word_action(Action*); virtual Word* select_word(); private: DocBrowserImpl* impl_; }; #endif neuron-7.5/src/ivoc/epsprint.cpp000077500000000000000000000024501323325274500170040ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include "epsprint.h" // ps_prolog copied from InterViews's printer.c static const char* ps_prolog= "\ save 20 dict begin\n\ \n\ /sf { % scale /fontName => - (set current font)\n\ {findfont} stopped {pop /Courier findfont} if\n\ exch scalefont setfont\n\ } def\n\ \n\ /ws {\n\ 4 index 6 4 roll moveto sub\n\ 2 index stringwidth pop sub\n\ exch div 0 8#40 4 3 roll\n\ widthshow\n\ } def\n\ \n\ /as {\n\ 4 index 6 4 roll moveto sub\n\ 2 index stringwidth pop sub\n\ exch div 0 3 2 roll\n\ ashow\n\ } def\n\ \n\ "; EPSPrinter::EPSPrinter(ostream* o) : Printer(o) {} EPSPrinter::~EPSPrinter(){} void EPSPrinter::eps_prolog(ostream& out, Coord width, Coord height, const char* creator) { int bbw = int(width); int bbh = int(height); // need to describe it as EPSF = "encapsulated postscript" out << "%!PS-Adobe-2.0 EPSF-1.2\n"; out << "%%Creator: " << creator << "\n"; out << "%%Pages: atend\n"; // adding a bounding box makes this "encapsulated" // bbw and bbh are the width and height of the bounding box 1/72 of an inch out << "%%BoundingBox: 0 0 " << bbw << " " << bbh << "\n"; out << "%%EndComments\n"; out << ps_prolog; out << "%%EndProlog\n"; } #endif neuron-7.5/src/ivoc/epsprint.h000077500000000000000000000005241323325274500164510ustar00rootroot00000000000000#ifndef epsprinter_h #define epsprinter_h #ifdef CYGWIN #ifndef WIN32 #define WIN32 1 #endif #endif #include class EPSPrinter : public Printer { public: EPSPrinter(ostream*); virtual ~EPSPrinter(); virtual void eps_prolog(ostream&, Coord width, Coord height, const char* creator = "InterViews"); }; #endif neuron-7.5/src/ivoc/field.cpp000066400000000000000000000314321323325274500162220ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file /* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * FieldSEditor -- simple editor for text fields */ #include #include //#include #include "field.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class FieldStringSEditor : public StringEditor { public: FieldStringSEditor( ButtonState* bs, const char* sample, WidgetKit*, Style* ); virtual ~FieldStringSEditor(); virtual void print(Printer*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); void press(const Event&); void drag(const Event&); void release(const Event&); bool keystroke(const Event&); void cursor_on(); void cursor_off(); void focus_in(); void focus_out(); void cut(SelectionManager*); void paste(SelectionManager*); void Select(int pos); void Select(int left, int right); void selection(int& start, int& index); protected: virtual void Reconfig(); private: WidgetKit* kit_; Style* style_; int start_; int index_; int origin_; int width_; void do_select(Event&); void do_grab_scroll(Event&); void do_rate_scroll(Event&); }; declareSelectionCallback(FieldStringSEditor) implementSelectionCallback(FieldStringSEditor) FieldStringSEditor::FieldStringSEditor( ButtonState* bs, const char* sample, WidgetKit* kit, Style* style ) : StringEditor(bs, sample) { kit_ = kit; style_ = style; Resource::ref(style); delete input; input = NULL; start_ = index_ = -1; } FieldStringSEditor::~FieldStringSEditor() { Resource::unref(style_); } void FieldStringSEditor::Select(int pos) { start_ = index_ = pos; StringEditor::Select(pos); } void FieldStringSEditor::Select(int left, int right) { start_ = left; index_ = right; StringEditor::Select(left, right); } void FieldStringSEditor::selection(int& start, int& index) { start = start_; index = index_; } void FieldStringSEditor::print(Printer* p, const Allocation& a) const { const Font* f = output->GetFont(); const Color* fg = output->GetFgColor(); FontBoundingBox b; f->font_bbox(b); Coord x = a.left(), y = a.bottom() + b.font_descent(); FieldStringSEditor* e = (FieldStringSEditor*)this; for (const char* s = e->Text(); *s != '\0'; s++) { Coord w = f->width(*s); p->character(f, *s, w, fg, x, y); x += w; } } void FieldStringSEditor::pick( Canvas*, const Allocation& a, int depth, Hit& h ) { const Event* ep = h.event(); if (ep != NULL && h.left() < a.right() && h.right() >= a.left() && h.bottom() < a.top() && h.top() >= a.bottom() ) { h.target(depth, this, 0); } } void FieldStringSEditor::press(const Event& event) { Event e; display->Draw(output, canvas); switch (event.pointer_button()) { case Event::left: case Event::middle: case Event::right: origin_ = display->Left(0, 0); width_ = display->Width(); Poll(e); start_ = display->LineIndex(0, e.x); do_select(e); break; #if 0 case Event::middle: do_grab_scroll(e); break; case Event::right: do_rate_scroll(e); break; #endif } } void FieldStringSEditor::drag(const Event&) { Event e; // I have no idea why the event.pointer_button() is 0. Poll(e); // if (e.leftmouse) { do_select(e); } } void FieldStringSEditor::release(const Event& event) { Event e; switch (event.pointer_button()) { case Event::left: case Event::middle: case Event::right: { Poll(e); do_select(e); SelectionManager* s = e.display()->primary_selection(); s->own( new SelectionCallback(FieldStringSEditor)(this, &FieldStringSEditor::cut) ); } break; } } void FieldStringSEditor::do_select(Event& e) { if (e.x < 0) { origin_ = Math::min(0, origin_ - e.x); } else if (e.x > xmax) { origin_ = Math::max( xmax - width_, origin_ - (e.x - xmax) ); } display->Scroll(0, origin_, ymax); index_ = display->LineIndex(0, e.x); DoSelect(start_, index_); } void FieldStringSEditor::do_grab_scroll(Event& e) { Window* w = canvas->window(); Cursor* c = w->cursor(); w->cursor(kit_->hand_cursor()); int origin = display->Left(0, 0); int width = display->Width(); Poll(e); int x = e.x; do { origin += e.x - x; origin = Math::min( 0, Math::max(Math::min(0, xmax - width), origin) ); display->Scroll(0, origin, ymax); x = e.x; Poll(e); } while (e.middlemouse); w->cursor(c); } void FieldStringSEditor::do_rate_scroll(Event& e) { Window* w = canvas->window(); Cursor* c = w->cursor(); WidgetKit& kit = *kit_; Cursor* left = kit.lfast_cursor(); Cursor* right = kit.rfast_cursor(); int origin = display->Left(0, 0); int width = display->Width(); Poll(e); int x = e.x; do { origin += x - e.x; origin = Math::min( 0, Math::max(Math::min(0, xmax - width), origin) ); display->Scroll(0, origin, ymax); if (e.x - x < 0) { w->cursor(left); } else { w->cursor(right); } Poll(e); } while (e.rightmouse); w->cursor(c); } bool FieldStringSEditor::keystroke(const Event& e) { char c; return e.mapkey(&c, 1) != 0 && HandleChar(c) && c == '\t'; } void FieldStringSEditor::cursor_on() { if (canvas != NULL) { display->CaretStyle(BarCaret); } } void FieldStringSEditor::cursor_off() { if (canvas != NULL) { display->CaretStyle(NoCaret); } } void FieldStringSEditor::focus_in() { } void FieldStringSEditor::focus_out() { } void FieldStringSEditor::cut(SelectionManager* s) { // s->put_value(Text() + start_, index_ - start_); int st = Math::min(start_, index_); int i = Math::max(index_, start_); s->put_value(Text() + st, i - st); } void FieldStringSEditor::paste(SelectionManager*) { /* unimplemented */ } void FieldStringSEditor::Reconfig() { kit_->push_style(); kit_->style(style_); Painter* p = new Painter(output); p->SetColors(kit_->foreground(), kit_->background()); p->SetFont(kit_->font()); Resource::unref(output); output = p; StringEditor::Reconfig(); kit_->pop_style(); } class FieldSButton : public ButtonState { public: FieldSButton(FieldSEditor*, FieldSEditorAction*); virtual ~FieldSButton(); virtual void Notify(); private: FieldSEditor* editor_; FieldSEditorAction* action_; }; class FieldSEditorImpl { private: friend class FieldSEditor; WidgetKit* kit_; FieldStringSEditor* editor_; FieldSButton* bs_; String text_; bool cursor_is_on_; IOHandler* blink_handler_; long flash_rate_; void build(FieldSEditor*, const char*, FieldSEditorAction*); void blink_cursor(long, long); void stop_blinking(); }; declareIOCallback(FieldSEditorImpl) implementIOCallback(FieldSEditorImpl) FieldSEditor::FieldSEditor( const String& sample, WidgetKit* kit, Style* s, FieldSEditorAction* action ) : InputHandler(NULL, s) { impl_ = new FieldSEditorImpl; impl_->kit_ = kit; NullTerminatedString ns(sample); impl_->build(this, ns.string(), action); } FieldSEditor::~FieldSEditor() { FieldSEditorImpl* i = impl_; i->stop_blinking(); Resource::unref(i->editor_); Resource::unref(i->bs_); delete i->blink_handler_; delete i; } void FieldSEditor::undraw() { FieldSEditorImpl& f = *impl_; f.stop_blinking(); InputHandler::undraw(); } void FieldSEditor::press(const Event& e) { impl_->editor_->press(e); } void FieldSEditor::drag(const Event& e) { impl_->editor_->drag(e); } void FieldSEditor::release(const Event& e) { impl_->editor_->release(e); } void FieldSEditor::keystroke(const Event& e) { FieldSEditorImpl& f = *impl_; if (f.editor_->keystroke(e)) { select(text()->length()); next_focus(); } } InputHandler* FieldSEditor::focus_in() { FieldSEditorImpl& f = *impl_; f.blink_cursor(0, 0); f.editor_->focus_in(); return InputHandler::focus_in(); } void FieldSEditor::focus_out() { FieldSEditorImpl& f = *impl_; f.stop_blinking(); f.editor_->cursor_off(); f.editor_->focus_out(); InputHandler::focus_out(); } void FieldSEditor::field(const char* str) { impl_->editor_->Message(str); } void FieldSEditor::field(const String& s) { NullTerminatedString ns(s); impl_->editor_->Message(ns.string()); } void FieldSEditor::select(int pos) { impl_->editor_->Select(pos); } void FieldSEditor::select(int l, int r) { impl_->editor_->Select(l, r); } void FieldSEditor::selection(int& start, int& index) const { impl_->editor_->selection(start, index); } void FieldSEditor::edit() { impl_->editor_->Edit(); } void FieldSEditor::edit(const char* str, int left, int right) { impl_->editor_->Edit(str, left, right); } void FieldSEditor::edit(const String& str, int left, int right) { NullTerminatedString ns(str); impl_->editor_->Edit(ns.string(), left, right); } const String* FieldSEditor::text() const { impl_->text_ = String(impl_->editor_->Text()); return &impl_->text_; } /** class FieldSEditorImpl **/ void FieldSEditorImpl::build( FieldSEditor* e, const char* str, FieldSEditorAction* a ) { WidgetKit& kit = *kit_; kit.begin_style("FieldEditor"); Style* s = kit.style(); bs_ = new FieldSButton(e, a); editor_ = new FieldStringSEditor(bs_, str, kit_, s); Glyph* g = editor_; if (s->value_is_on("beveled")) { g = kit.inset_frame( new Background( LayoutKit::instance()->h_margin(editor_, 2.0), kit.background() ) ); } e->body(g); cursor_is_on_ = false; blink_handler_ = new IOCallback(FieldSEditorImpl)( this, &FieldSEditorImpl::blink_cursor ); float sec = 0.5; s->find_attribute("cursorFlashRate", sec); flash_rate_ = long(sec * 1000000); kit.end_style(); } void FieldSEditorImpl::blink_cursor(long, long) { if (cursor_is_on_) { editor_->cursor_off(); cursor_is_on_ = false; } else { editor_->cursor_on(); cursor_is_on_ = true; } if (flash_rate_ > 10) { Dispatcher::instance().startTimer(0, flash_rate_, blink_handler_); } } void FieldSEditorImpl::stop_blinking() { Dispatcher::instance().stopTimer(blink_handler_); editor_->cursor_off(); cursor_is_on_ = false; } /** class FieldSButton **/ FieldSButton::FieldSButton(FieldSEditor* editor, FieldSEditorAction* action) { editor_ = editor; action_ = action; Resource::ref(action_); } FieldSButton::~FieldSButton() { Resource::unref(action_); } /* * We need to reset the button state's value so that we'll get * notified again. If we call SetValue, then it will call * Notify again! Alas, we must access the protected value member (sigh). */ void FieldSButton::Notify() { int v; GetValue(v); value = 0; if (action_ != NULL) { switch (v) { case '\r': action_->accept(editor_); break; case /* ^G */ '\007': case /* Esc */ '\033': action_->cancel(editor_); break; default: break; } } } /** class FieldSEditorAction **/ FieldSEditorAction::FieldSEditorAction() { } FieldSEditorAction::~FieldSEditorAction() { } void FieldSEditorAction::accept(FieldSEditor*) { } void FieldSEditorAction::cancel(FieldSEditor*) { } #endif neuron-7.5/src/ivoc/field.h000066400000000000000000000101151323325274500156620ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * FieldSEditor -- simple editor for text fields */ #ifndef ivlook_sfield_h #define ivlook_sfield_h #include #include class FieldSEditor; class FieldSEditorImpl; class String; class Style; class WidgetKit; class FieldSEditorAction : public Resource { protected: FieldSEditorAction(); virtual ~FieldSEditorAction(); public: virtual void accept(FieldSEditor*); virtual void cancel(FieldSEditor*); }; #if defined(__STDC__) || defined(__ANSI_CPP__) #define __FieldSEditorCallback(T) T##_FieldSEditorCallback #define FieldSEditorCallback(T) __FieldSEditorCallback(T) #define __FieldSEditorMemberFunction(T) T##_FieldSEditorMemberFunction #define FieldSEditorMemberFunction(T) __FieldSEditorMemberFunction(T) #else #define __FieldSEditorCallback(T) T/**/_FieldSEditorCallback #define FieldSEditorCallback(T) __FieldSEditorCallback(T) #define __FieldSEditorMemberFunction(T) T/**/_FieldSEditorMemberFunction #define FieldSEditorMemberFunction(T) __FieldSEditorMemberFunction(T) #endif #define declareFieldSEditorCallback(T) \ typedef void (T::*FieldSEditorMemberFunction(T))(FieldSEditor*); \ class FieldSEditorCallback(T) : public FieldSEditorAction { \ public: \ FieldSEditorCallback(T)( \ T*, FieldSEditorMemberFunction(T) accept, \ FieldSEditorMemberFunction(T) cancel \ ); \ virtual ~FieldSEditorCallback(T)(); \ \ virtual void accept(FieldSEditor*); \ virtual void cancel(FieldSEditor*); \ private: \ T* obj_; \ FieldSEditorMemberFunction(T) accept_; \ FieldSEditorMemberFunction(T) cancel_; \ }; #define implementFieldSEditorCallback(T) \ FieldSEditorCallback(T)::FieldSEditorCallback(T)( \ T* obj, FieldSEditorMemberFunction(T) accept, \ FieldSEditorMemberFunction(T) cancel \ ) { \ obj_ = obj; \ accept_ = accept; \ cancel_ = cancel; \ } \ \ FieldSEditorCallback(T)::~FieldSEditorCallback(T)() { } \ \ void FieldSEditorCallback(T)::accept(FieldSEditor* f) { (obj_->*accept_)(f); } \ void FieldSEditorCallback(T)::cancel(FieldSEditor* f) { (obj_->*cancel_)(f); } class FieldSEditor : public InputHandler { public: FieldSEditor( const String& sample, WidgetKit*, Style*, FieldSEditorAction* = NULL ); virtual ~FieldSEditor(); virtual void undraw(); virtual void press(const Event&); virtual void drag(const Event&); virtual void release(const Event&); virtual void keystroke(const Event&); virtual InputHandler* focus_in(); virtual void focus_out(); virtual void field(const char*); virtual void field(const String&); virtual void select(int pos); virtual void select(int left, int right); virtual void selection(int& start, int& index) const; virtual void edit(); virtual void edit(const char*, int left, int right); virtual void edit(const String&, int left, int right); virtual const String* text() const; private: FieldSEditorImpl* impl_; }; #endif neuron-7.5/src/ivoc/fourier.cpp000077500000000000000000000123701323325274500166150ustar00rootroot00000000000000#include <../../nrnconf.h> /* (C) Copr. 1986-92 Numerical Recipes Software #.,. */ /* Algorithms for Fourier Transform Spectral Methods */ #include #include #include #include // to print diagnostic statements // #define DEBUG_SPCTRM // otherwise #undef DEBUG_SPCTRM #undef myfabs #if MAC #if __GNUC__ < 4 #define myfabs std::fabs #else #define myfabs ::fabs #endif #else #define myfabs fabs #endif // Apple LLVM version 5.1 (clang-503.0.38) generates "unsequenced modification warning". // #define SQUARE(a) ((x_=(a)) == 0.0 ? 0.0 : x_*x_) static inline double SQUARE(double a) { return a*a; } extern "C" { void hoc_execerror(const char*, const char*); extern void nrn_exit(int); } #include "nrngsl_real_radix2.c" #include "nrngsl_hc_radix2.c" void nrngsl_realft(double* data, unsigned long n, int direction) { if (direction == 1) { nrngsl_fft_real_radix2_transform(data, 1, n); }else{ nrngsl_fft_halfcomplex_radix2_inverse(data, 1, n); } } /* convlv() -- convolution of a read data set with a response function the respns function must be stored in wrap-around order */ /* frequency domain format copy from gsl fft to NRC fft */ void nrn_gsl2nrc(double* x, double* y, unsigned long n) { unsigned long i, n2; n2 = n/2; y[0] = x[0]; if (n < 2) { return; } y[1] = x[n2]; for (i=1; i < n2; ++i) { y[2*i] = x[i]; y[2*i+1] = -x[n-i]; } } void nrn_nrc2gsl(double* x, double* y, unsigned long n) { double xn, xn2; unsigned long i, n2; n2 = n/2; xn = n; xn2 = .5*xn; y[0] = x[0]*xn2; if (n < 2) { return; } y[n2] = x[1]*xn2; for (i=1; i < n2; ++i) { y[i] = x[2*i]*xn2; y[n-i] = -x[2*i+1]*xn2; } } void nrn_convlv(double* data, unsigned long n, double* respns, unsigned long m, int isign, double* ans) { // data and respns are modified. unsigned long i; double scl, x_; int n2 = n/2; for (i=1;i<=(m-1)/2;i++) { respns[n-i]=respns[m-i]; } for (i=(m+1)/2;i < n-(m-1)/2;i++) { respns[i]=0.0; } nrngsl_realft(data, n, 1); nrngsl_realft(respns, n, 1); ans[0] = data[0]*respns[0]; for (i=1; i < n2; ++i) { if (isign == 1) { ans[i] = data[i]*respns[i] - data[n-i]*respns[n-i]; ans[n-i] = data[i]*respns[n-i] + data[n-i]*respns[i]; } else if (isign == -1) { if ((scl = SQUARE(ans[i-1])+SQUARE(ans[i])) == 0.0) { hoc_execerror("Deconvolving at response zero in nrn_convlv", 0); } scl *= 2.0; ans[i] = (data[i]*respns[i] + data[n-i]*respns[n-i])/scl; ans[i]=(data[i]*respns[n-i] - data[n-i]*respns[i])/scl; } else { hoc_execerror("No meaning for isign in nrn_convlv", 0); } } ans[n2] = data[n2]*respns[n2]; nrngsl_realft(ans, n, -1); } /* correl() -- correlation of two real data sets see http://www.cv.nrao.edu/course/astr534/FourierTransforms.html SF16 */ void nrn_correl(double* x, double* y, unsigned long n, double* z) { nrngsl_realft(x, n, 1); nrngsl_realft(y, n, 1); z[0] = x[0]*y[0]; int n2 = n/2; for (int i=1; i < n2; ++i) { z[i] = x[i]*y[i] + x[n-i]*y[n-i]; // with following sign, produces same result as old NRC code z[n-i] = y[i]*x[n-i] - y[n-i]*x[i]; } z[n2] = x[n2]*y[n2]; nrngsl_realft(z, n, -1); } /* spctrm() -- power spectrum using fourier transforms modified to take array rather than data stream. */ #define WINDOW(j,a,b) (1.0-myfabs((((j)-1)-(a))*(b))) /* Bartlett */ // void nrn_spctrm(double* data, double* p, int m, int k) void nrn_spctrm(double* data, double* psd, int setsize, int numsegpairs) { int j, k, cx, n; double a, ainv, wfac, x_; double *fftv; // 0 is index of first meaningful element of power spectral density for (j=0;j<=setsize-1;j++) psd[j]=0.0; // zero out any prior result // calc factor used to correct for window's effect on psd a = setsize; ainv = 1.0/a; n = 2*setsize; wfac = 0.0; for (j=1;j<=n;j++) wfac += SQUARE(WINDOW(j,a,1/a)); #ifdef DEBUG_SPCTRM printf("setsize %d, numsegpairs %d\n", setsize, numsegpairs); printf("=============\n"); printf("window values\n"); for (j=1;j<=n;j++) printf("%d %f\n", j, WINDOW(j,a,1/a)); printf("initial wfac %f\n", wfac); #endif // storage for a data segment fftv = (double *)malloc((size_t) (n*sizeof(double))); cx = 0; // data index for (k=1;k<=numsegpairs*2;k++) { #ifdef DEBUG_SPCTRM printf("==============\n"); printf("segment %d\n", k); #endif // fill fftv with a segment of data for (j=0; j #if HAVE_IV // to end of file #include #include #include #include #include #include "oc2iv.h" extern "C" { #define byte unsigned char #define True 1 #define False 0 #define DEBUG 0 #define Red pinfo_->r #define Green pinfo_->g #define Blue pinfo_->b typedef struct { Raster* raster; char* comment; byte r[256]; byte g[256]; byte b[256]; } PICINFO; PICINFO* pinfo_; static int LoadGIF(const char* fname, PICINFO*); } // extern "C" Image* gif_image(const char* filename) { Image* image; pinfo_ = new PICINFO; if (LoadGIF(filename, pinfo_)) { image = new Image(pinfo_->raster); } if (pinfo_->comment) free(pinfo_->comment); delete pinfo_; return image; } extern "C" { /* * xvgif.c - GIF loading code for 'xv'. Based strongly on... * * gif2ras.c - Converts from a Compuserve GIF (tm) image to a Sun Raster image. * * Copyright (c) 1988, 1989 by Patrick J. Naughton * * Author: Patrick J. Naughton * naughton@wind.sun.com * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and that * both that copyright notice and this permission notice appear in * supporting documentation. * * This file is provided AS IS with no warranties of any kind. The author * shall have no liability with respect to the infringement of copyrights, * trade secrets or any patents by this file or any part thereof. In no * event will the author be liable for any lost revenue or profits or * other special, indirect and consequential damages. * */ #define NEXTBYTE (*dataptr++) #define NEXTBYTEa (dataptr++) /* avoid 'expression result unused' warnings */ #define EXTENSION 0x21 #define IMAGESEP 0x2c #define TRAILER 0x3b #define INTERLACEMASK 0x40 #define COLORMAPMASK 0x80 #define ISTR_WARNING "LoadGif warning:" #define ISTR_INFO "LoadGif info:" #define SetISTR(a,f,c,d) fprintf(stderr, f, c, d) static FILE *fp; static int BitOffset = 0, /* Bit Offset of next code */ XC = 0, YC = 0, /* Output X and Y coords of current pixel */ Pass = 0, /* Used by output routine if interlaced pic */ OutCount = 0, /* Decompressor output 'stack count' */ RWidth, RHeight, /* screen dimensions */ Width, Height, /* image dimensions */ LeftOfs, TopOfs, /* image offset */ BitsPerPixel, /* Bits per pixel, read from GIF header */ BytesPerScanline, /* bytes per scanline in output raster */ ColorMapSize, /* number of colors */ Background, /* background color */ CodeSize, /* Code size, read from GIF header */ InitCodeSize, /* Starting code size, used during Clear */ Code, /* Value returned by ReadCode */ MaxCode, /* limiting value for current code size */ ClearCode, /* GIF clear code */ EOFCode, /* GIF end-of-information code */ CurCode, OldCode, InCode, /* Decompressor variables */ FirstFree, /* First free code, generated per GIF spec */ FreeCode, /* Decompressor,next free slot in hash table */ FinChar, /* Decompressor variable */ BitMask, /* AND mask for data size */ ReadMask, /* Code AND mask for current code size */ Misc; /* miscellaneous bits (interlace, local cmap)*/ static bool Interlace, HasColormap; static byte *RawGIF; /* The heap array to hold it, raw */ static byte *GRaster; /* The raster data stream, unblocked */ static byte *pic8; /* The hash table used by the decompressor */ static int Prefix[4096]; static int Suffix[4096]; /* An output array used by the decompressor */ static int OutCode[4097]; static int gif89 = 0; static const char *id87 = "GIF87a"; static const char *id89 = "GIF89a"; static int EGApalette[16][3] = { {0,0,0}, {0,0,128}, {0,128,0}, {0,128,128}, {128,0,0}, {128,0,128}, {128,128,0}, {200,200,200}, {100,100,100}, {100,100,255}, {100,255,100}, {100,255,255}, {255,100,100}, {255,100,255}, {255,255,100}, {255,255,255} }; static int readImage(PICINFO*); static int readCode(); static void doInterlace(int); static int gifError(PICINFO*, const char *); static void gifWarning(const char *); static int filesize; static const char *bname; static byte *dataptr; /*****************************/ static int LoadGIF(const char* fname, PICINFO* pinfo) /*****************************/ { /* returns '1' if successful */ register byte ch, ch1, *origptr; register int i, block; int aspect, gotimage; float normaspect; /* initialize variables */ BitOffset = XC = YC = Pass = OutCount = gotimage = 0; RawGIF = GRaster = pic8 = 0; gif89 = 0; pinfo->raster = NULL; pinfo->comment = NULL; bname = fname; fp = fopen(fname,"rb"); if (!fp) return ( gifError(pinfo, "can't open file") ); /* find the size of the file */ fseek(fp, 0L, 2); filesize = ftell(fp); fseek(fp, 0L, 0); /* the +256's are so we can read truncated GIF files without fear of segmentation violation */ if (!(dataptr = RawGIF = (byte *) calloc((size_t) filesize+256, (size_t) 1))) return( gifError(pinfo, "not enough memory to read gif file") ); if (!(GRaster = (byte *) calloc((size_t) filesize+256,(size_t) 1))) return( gifError(pinfo, "not enough memory to read gif file") ); if (fread(dataptr, (size_t) filesize, (size_t) 1, fp) != 1) return( gifError(pinfo, "GIF data read failed") ); origptr = dataptr; if (strncmp((char *) dataptr, id87, (size_t) 6)==0) gif89 = 0; else if (strncmp((char *) dataptr, id89, (size_t) 6)==0) gif89 = 1; else return( gifError(pinfo, "not a GIF file")); dataptr += 6; /* Get variables from the GIF screen descriptor */ ch = NEXTBYTE; RWidth = ch + 0x100 * NEXTBYTE; /* screen dimensions... not used. */ ch = NEXTBYTE; RHeight = ch + 0x100 * NEXTBYTE; ch = NEXTBYTE; HasColormap = ((ch & COLORMAPMASK) ? True : False); BitsPerPixel = (ch & 7) + 1; ColorMapSize = 1 << BitsPerPixel; BitMask = ColorMapSize - 1; Background = NEXTBYTE; /* background color... not used. */ aspect = NEXTBYTE; if (aspect) { if (!gif89) return(gifError(pinfo,"corrupt GIF file (screen descriptor)")); else normaspect = (float) (aspect + 15) / 64.0; /* gif89 aspect ratio */ if (DEBUG) fprintf(stderr,"GIF89 aspect = %f\n", normaspect); } /* Read in global colormap. */ if (HasColormap) for (i=0; ir[i] = NEXTBYTE; pinfo->g[i] = NEXTBYTE; pinfo->b[i] = NEXTBYTE; } else { /* no colormap in GIF file */ /* put std EGA palette (repeated 16 times) into colormap, for lack of anything better to do */ for (i=0; i<256; i++) { pinfo->r[i] = EGApalette[i&15][0]; pinfo->g[i] = EGApalette[i&15][1]; pinfo->b[i] = EGApalette[i&15][2]; } } /* possible things at this point are: * an application extension block * a comment extension block * an (optional) graphic control extension block * followed by either an image * or a plaintext extension */ while (1) { block = NEXTBYTE; if (DEBUG) fprintf(stderr,"LoadGIF: "); if (block == EXTENSION) { /* parse extension blocks */ int i, fn, blocksize, aspnum, aspden; /* read extension block */ fn = NEXTBYTE; if (DEBUG) fprintf(stderr,"GIF extension type 0x%02x\n", fn); if (fn == 'R') { /* GIF87 aspect extension */ int sbsize; blocksize = NEXTBYTE; if (blocksize == 2) { aspnum = NEXTBYTE; aspden = NEXTBYTE; if (aspden>0 && aspnum>0) normaspect = (float) aspnum / (float) aspden; else { normaspect = 1.0; aspnum = aspden = 1; } if (DEBUG) fprintf(stderr,"GIF87 aspect extension: %d:%d = %f\n\n", aspnum, aspden,normaspect); } else { for (i=0; i0) { /* eat any following data subblocks */ for (i=0; i0) { /* build into one un-blocked comment */ cmt = (byte *) malloc((size_t) (cmtlen + 1)); if (!cmt) gifWarning("couldn't malloc space for comments\n"); else { sp = cmt; do { sbsize = (*ptr1++); for (j=0; jcomment) { /* have to strcat onto old comments */ cmt1 = (byte *) malloc(strlen(pinfo->comment) + cmtlen + 2); if (!cmt1) { gifWarning("couldn't malloc space for comments\n"); free(cmt); } else { strcpy((char *) cmt1, (char *) pinfo->comment); strcat((char *) cmt1, (char *) "\n"); strcat((char *) cmt1, (char *) cmt); free(pinfo->comment); free(cmt); pinfo->comment = (char *) cmt1; } } else pinfo->comment = (char *) cmt; } /* if (cmt) */ } /* if cmtlen>0 */ } else if (fn == 0x01) { /* PlainText Extension */ int j,sbsize,ch; int tgLeft, tgTop, tgWidth, tgHeight, cWidth, cHeight, fg, bg; SetISTR(ISTR_INFO, "%s: %s\n", bname, "PlainText extension found in GIF file. Ignored."); sbsize = NEXTBYTE; tgLeft = NEXTBYTE; tgLeft += (NEXTBYTE)<<8; tgTop = NEXTBYTE; tgTop += (NEXTBYTE)<<8; tgWidth = NEXTBYTE; tgWidth += (NEXTBYTE)<<8; tgHeight = NEXTBYTE; tgHeight += (NEXTBYTE)<<8; cWidth = NEXTBYTE; cHeight = NEXTBYTE; fg = NEXTBYTE; bg = NEXTBYTE; i=12; for ( ; i filesize) break; /* EOF */ } while(ch1); } else if (readImage(pinfo)) gotimage = 1; if (DEBUG) fprintf(stderr," at end: dataptr=%ld\n",dataptr-RawGIF); } else if (block == TRAILER) { /* stop reading blocks */ if (DEBUG) fprintf(stderr,"trailer"); break; } else { /* unknown block type */ char str[128]; if (DEBUG) fprintf(stderr,"block type 0x%02x ", block); /* don't mention bad block if file was trunc'd, as it's all bogus */ if ((dataptr - origptr) < filesize) { sprintf(str, "Unknown block type (0x%02x) at offset %ld", block, (dataptr - origptr) - 1); if (!gotimage) return gifError(pinfo, str); else gifWarning(str); } break; } if (DEBUG) fprintf(stderr,"\n"); } free(RawGIF); RawGIF = 0; free(GRaster); GRaster = 0; if (!gotimage) return( gifError(pinfo, "no image data found in GIF file") ); return 1; } /********************************************/ static int readImage(PICINFO* pinfo) { register byte ch, ch1, *ptr1, *picptr; int i, npixels, maxpixels; npixels = maxpixels = 0; /* read in values from the image descriptor */ ch = NEXTBYTE; LeftOfs = ch + 0x100 * NEXTBYTE; ch = NEXTBYTE; TopOfs = ch + 0x100 * NEXTBYTE; ch = NEXTBYTE; Width = ch + 0x100 * NEXTBYTE; ch = NEXTBYTE; Height = ch + 0x100 * NEXTBYTE; Misc = NEXTBYTE; Interlace = ((Misc & INTERLACEMASK) ? True : False); if (!Interlace) Pass = -1; if (Misc & 0x80) { for (i=0; i< 1 << ((Misc&7)+1); i++) { pinfo->r[i] = NEXTBYTE; pinfo->g[i] = NEXTBYTE; pinfo->b[i] = NEXTBYTE; } } if (!HasColormap && !(Misc&0x80)) { /* no global or local colormap */ SetISTR(ISTR_WARNING, "%s: %s\n", bname, "No colormap in this GIF file. Assuming EGA colors."); } /* Start reading the raster data. First we get the intial code size * and compute decompressor constant values, based on this code size. */ CodeSize = NEXTBYTE; ClearCode = (1 << CodeSize); EOFCode = ClearCode + 1; FreeCode = FirstFree = ClearCode + 2; /* The GIF spec has it that the code size is the code size used to * compute the above values is the code size given in the file, but the * code size used in compression/decompression is the code size given in * the file plus one. (thus the ++). */ CodeSize++; InitCodeSize = CodeSize; MaxCode = (1 << CodeSize); ReadMask = MaxCode - 1; /* UNBLOCK: * Read the raster data. Here we just transpose it from the GIF array * to the Raster array, turning it from a series of blocks into one long * data stream, which makes life much easier for readCode(). */ ptr1 = GRaster; do { ch = ch1 = NEXTBYTE; while (ch--) { *ptr1 = NEXTBYTE; ptr1++; } if ((dataptr - RawGIF) > filesize) { SetISTR(ISTR_WARNING,"%s: %s\n", bname, "This GIF file seems to be truncated. Winging it."); break; } } while(ch1); if (DEBUG) { fprintf(stderr,"xv: LoadGIF() - picture is %dx%d, %d bits, %sinterlaced\n", Width, Height, BitsPerPixel, Interlace ? "" : "non-"); } /* Allocate the 'pic' */ maxpixels = Width*Height; // picptr = pic8 = (byte *) malloc((size_t) maxpixels); pinfo->raster = new Raster(Width, Height); if (!pinfo->raster) return( gifError(pinfo, "couldn't malloc 'pic8'") ); /* Decompress the file, continuing until you see the GIF EOF code. * One obvious enhancement is to add checking for corrupt files here. */ Code = readCode(); while (Code != EOFCode) { /* Clear code sets everything back to its initial value, then reads the * immediately subsequent code as uncompressed data. */ if (Code == ClearCode) { CodeSize = InitCodeSize; MaxCode = (1 << CodeSize); ReadMask = MaxCode - 1; FreeCode = FirstFree; Code = readCode(); CurCode = OldCode = Code; FinChar = CurCode & BitMask; doInterlace(FinChar); npixels++; } else { /* If not a clear code, must be data: save same as CurCode and InCode */ /* if we're at maxcode and didn't get a clear, stop loading */ if (FreeCode>=4096) { /* printf("freecode blew up\n"); */ break; } CurCode = InCode = Code; /* If greater or equal to FreeCode, not in the hash table yet; * repeat the last character decoded */ if (CurCode >= FreeCode) { CurCode = OldCode; if (OutCount > 4096) { /* printf("outcount1 blew up\n"); */ break; } OutCode[OutCount++] = FinChar; } /* Unless this code is raw data, pursue the chain pointed to by CurCode * through the hash table to its end; each code in the chain puts its * associated output code on the output queue. */ while (CurCode > BitMask) { if (OutCount > 4096) break; /* corrupt file */ OutCode[OutCount++] = Suffix[CurCode]; CurCode = Prefix[CurCode]; } if (OutCount > 4096) { /* printf("outcount blew up\n"); */ break; } /* The last code in the chain is treated as raw data. */ FinChar = CurCode & BitMask; OutCode[OutCount++] = FinChar; /* Now we put the data out to the Output routine. * It's been stacked LIFO, so deal with it that way... */ /* safety thing: prevent exceeding range of 'pic8' */ if (npixels + OutCount > maxpixels) OutCount = maxpixels-npixels; npixels += OutCount; for (i=OutCount-1; i>=0; i--) doInterlace(OutCode[i]); OutCount = 0; /* Build the hash table on-the-fly. No table is stored in the file. */ Prefix[FreeCode] = OldCode; Suffix[FreeCode] = FinChar; OldCode = InCode; /* Point to the next slot in the table. If we exceed the current * MaxCode value, increment the code size unless it's already 12. If it * is, do nothing: the next code decompressed better be CLEAR */ FreeCode++; if (FreeCode >= MaxCode) { if (CodeSize < 12) { CodeSize++; MaxCode *= 2; ReadMask = (1 << CodeSize) - 1; } } } Code = readCode(); if (npixels >= maxpixels) break; } if (npixels != maxpixels) { SetISTR(ISTR_WARNING,"%s: %s\n", bname, "This GIF file seems to be truncated. Winging it."); // if (!Interlace) /* clear->EOBuffer */ // xvbzero((char *) pic8+npixels, (size_t) (maxpixels-npixels)); } fclose(fp); /* fill in the PICINFO structure */ #if 0 pinfo->pic = pic8; pinfo->w = Width; pinfo->h = Height; pinfo->type = PIC8; pinfo->frmType = F_GIF; pinfo->colType = F_FULLCOLOR; pinfo->normw = pinfo->w; pinfo->normh = pinfo->h; sprintf(pinfo->fullInfo, "GIF%s, %d bit%s per pixel, %sinterlaced. (%d bytes)", (gif89) ? "89" : "87", BitsPerPixel, (BitsPerPixel==1) ? "" : "s", Interlace ? "" : "non-", filesize); sprintf(pinfo->shrtInfo, "%dx%d GIF%s.",Width,Height,(gif89) ? "89" : "87"); /* pinfo.comment gets handled in main LoadGIF() block-reader */ #endif return 1; } /* Fetch the next code from the raster data stream. The codes can be * any length from 3 to 12 bits, packed into 8-bit bytes, so we have to * maintain our location in the Raster array as a BIT Offset. We compute * the byte Offset into the raster array by dividing this by 8, pick up * three bytes, compute the bit Offset into our 24-bit chunk, shift to * bring the desired code to the bottom, then mask it off and return it. */ static int readCode() { int RawCode, ByteOffset; ByteOffset = BitOffset / 8; RawCode = GRaster[ByteOffset] + (GRaster[ByteOffset + 1] << 8); if (CodeSize >= 8) RawCode += ( ((int) GRaster[ByteOffset + 2]) << 16); RawCode >>= (BitOffset % 8); BitOffset += CodeSize; return(RawCode & ReadMask); } /***************************/ static void doInterlace(int Index) { if (YCraster->poke(XC, Height - YC - 1, Red[Index]/256., Green[Index]/256., Blue[Index]/256., 1.); /* Update the X-coordinate, and if it overflows, update the Y-coordinate */ if (++XC == Width) { /* deal with the interlace as described in the GIF * spec. Put the decoded scan line out to the screen if we haven't gone * past the bottom of it */ XC = 0; switch (Pass) { case 0: YC += 8; if (YC >= Height) { Pass++; YC = 4; } break; case 1: YC += 8; if (YC >= Height) { Pass++; YC = 2; } break; case 2: YC += 4; if (YC >= Height) { Pass++; YC = 1; } break; case 3: YC += 2; break; default: ++YC; break; } } } /*****************************/ static int gifError(PICINFO* pinfo, const char* st) { gifWarning(st); if (RawGIF != NULL) free(RawGIF); if (GRaster != NULL) free(GRaster); if (pinfo->raster) pinfo->raster->unref(); if (pinfo->comment) free(pinfo->comment); pinfo->raster = 0; pinfo->comment = (char *) 0; return 0; } /*****************************/ static void gifWarning(const char* st) { // SetISTR(ISTR_WARNING,"%s: %s\n", bname, st); hoc_warning(bname, st); } } // extern "C" #endif neuron-7.5/src/ivoc/graph.cpp000066400000000000000000002221501323325274500162370ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #if HAVE_IV #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern Image* gif_image(const char*); #include #include "apwindow.h" #include "ivoc.h" #include "graph.h" #include "axis.h" #include "hocmark.h" #include "mymath.h" #include "idraw.h" #include "symchoos.h" #include "scenepic.h" #include "oc2iv.h" #include "objcmd.h" #include "ocjump.h" #include "utility.h" #include "cbwidget.h" #include "xmenu.h" #include "ivocvect.h" #endif /* HAVE_IV */ #include "classreg.h" #if HAVE_IV #define Graph_Crosshair_ "Crosshair Graph" #define Graph_Change_label_ "ChangeText Graph" #define Graph_keep_lines_toggle_ "KeepLines Graph" #define Graph_erase_axis_ "AxisType Graph" #define Graph_new_axis_ "NewAxis AxisType Graph" #define Graph_view_axis_ "ViewAxis AxisType Graph" #define Graph_view_box_ "ViewBox AxisType Graph" #define Graph_erase_lines_ "Erase Graph" #define Graph_choose_sym_ "PlotWhat Graph" #define Graph_choose_family_label_ "FamilyLabel Graph" #define Graph_choose_rvp_ "PlotRange Graph" bool GraphItem::is_polyline() { return false; } bool GPolyLineItem::is_polyline() { return true; } bool GraphItem::is_mark() { return false; } /*static*/ class GraphLabelItem : public GraphItem { public: GraphLabelItem(Glyph* g) : GraphItem(g){} virtual ~GraphLabelItem(){}; virtual void save(ostream& o, Coord x, Coord y){ ((GLabel*)body())->save(o, x, y);} virtual void erase(Scene* s, GlyphIndex i, int type) { if ((type & GraphItem::ERASE_LINE) && ((GLabel*)body())->erase_flag()) { s->remove(i); } }; }; /*static*/ class GraphAxisItem : public GraphItem { public: GraphAxisItem(Glyph* g) : GraphItem(g){} virtual ~GraphAxisItem(){}; virtual void save(ostream& o, Coord, Coord){ ((Axis*)body())->save(o);} virtual void erase(Scene* s, GlyphIndex i, int type) { if (type & GraphItem::ERASE_AXIS) { s->remove(i); } } }; /*static*/ class GraphMarkItem : public GraphItem { public: GraphMarkItem(Glyph* g) : GraphItem(g){} virtual ~GraphMarkItem(){}; virtual void erase(Scene* s, GlyphIndex i, int type) { if (type & GraphItem::ERASE_LINE) { s->remove(i); } } virtual bool is_mark() { return true; } }; /*static*/ class VectorLineItem : public GPolyLineItem { public: VectorLineItem(Glyph* g) : GPolyLineItem(g){} virtual ~VectorLineItem(){}; virtual void erase(Scene* s, GlyphIndex i, int type){} virtual bool is_graphVector() { return true; } }; /*static*/ class LineExtension : public Glyph { public: LineExtension(GPolyLine*); virtual ~LineExtension(); void begin(); void extend(); void damage(Graph*); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; DataVec* xd() const { return (DataVec*)gp_->x_data(); } DataVec* yd() const { return (DataVec*)gp_->y_data(); } private: GPolyLine* gp_; int start_; int previous_; }; /*static*/ class NewLabelHandler : public Handler { public: NewLabelHandler(Graph*, Coord, Coord); ~NewLabelHandler(); virtual bool event(Event&); private: Graph* g_; Coord x_, y_; }; NewLabelHandler::NewLabelHandler(Graph* g, Coord x, Coord y) { // printf("NewLabelHandler\n"); g_ = g; x_ = x; y_ = y; } NewLabelHandler::~NewLabelHandler(){ // printf("~NewLabelHandler\n"); } bool NewLabelHandler::event(Event& e) { char buf[200]; buf[0] = '\0'; GLabel* gl = g_->new_proto_label(); gl->ref(); if (Graph::label_chooser("Enter new label", buf, gl, e.pointer_root_x(), e.pointer_root_y())) { if (gl->fixed()) { g_->fixed(gl->scale()); }else{ g_->vfixed(gl->scale()); } if (g_->labeltype() == 2) { XYView::current_pick_view()->s2o().inverse_transform(x_, y_); XYView::current_pick_view()->ratio_view(x_, y_, x_, y_); } g_->label(x_, y_, buf); } gl->unref(); return true; } // Graph registration for oc static void gr_axis(Graph* g, DimensionName d) { IFGUI int ntic = -1; int nminor = 0; int invert = 0; bool number = true; float x1 = 0; float x2 = -1; float pos = 0.; if (!ifarg(2)) { int i=0; if (ifarg(1)) { i = int(chkarg(1,0,3)); } switch (i) { case 0: g->view_axis(); break; case 1: g->erase_axis(); g->axis(Dimension_X, x1, x2, pos, ntic, nminor, invert, number); g->axis(Dimension_Y, x1, x2, pos, ntic, nminor, invert, number); break; case 2: g->view_box(); break; case 3: g->erase_axis(); break; } return; } if (ifarg(3)) { pos = *getarg(3); } if (ifarg(4)) { ntic = int(chkarg(4, -1, 100)); } if (ifarg(2)) { x1 = *getarg(1); x2 = *getarg(2); } if (ifarg(5)) { nminor = int(chkarg(5, 0, 100)); } if (ifarg(6)) { invert = int(chkarg(6,-1,1)); } if (ifarg(7) && !int(chkarg(7, 0, 1))) { number = false; } g->axis(d, x1, x2, pos, ntic, nminor, invert, number); ENDGUI } #endif /* HAVE_IV */ static double gr_xaxis(void* v) { #if HAVE_IV gr_axis((Graph*)v, Dimension_X); return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_yaxis(void* v) { #if HAVE_IV gr_axis((Graph*)v, Dimension_Y); return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_save_name(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; g->name(gargstr(1)); if (ifarg(2) && (chkarg(2,0,1) == 1.) && Oc::save_stream) { char buf[80]; *Oc::save_stream << "{\nsave_window_=" << gargstr(1) << endl; *Oc::save_stream << "save_window_.size(" << g->x1() << "," << g->x2() << "," << g->y1() << "," << g->y2() << ")\n"; long i = Scene::scene_list_index(g); sprintf(buf, "scene_vector_[%ld] = save_window_", i); *Oc::save_stream << buf << endl; g->save_phase2(*Oc::save_stream); g->Scene::mark(true); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } #if HAVE_IV static void move_label(Graph* g, const GLabel* lab, int ioff = 0) { float x, y; if (ifarg(4+ioff) && lab) { x = *getarg(4+ioff); y = *getarg(5+ioff); g->move(g->glyph_index(lab), x, y); } } #endif /* HAVE_IV */ static double gr_family(void* v) { #if HAVE_IV IFGUI if (hoc_is_str_arg(1)) { ((Graph*)v)->family(gargstr(1)); }else{ ((Graph*)v)->family(int(chkarg(1,0,1))); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_menu_action(void* v) { #if HAVE_IV IFGUI HocCommand* hc; if (hoc_is_object_arg(2)) { hc = new HocCommand(*hoc_objgetarg(2)); }else{ hc = new HocCommand(gargstr(2)); } ((Scene*)v)->picker()->add_menu(gargstr(1), new HocCommandAction(hc)); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_menu_tool(void* v) { #if HAVE_IV IFGUI if (hoc_is_object_arg(2)) { // python style HocPanel::paneltool(gargstr(1), NULL, NULL, ((Scene*)v)->picker(), *hoc_objgetarg(2), ifarg(3) ? *hoc_objgetarg(3) : NULL); }else{ HocPanel::paneltool(gargstr(1), gargstr(2), ifarg(3) ? gargstr(3) : NULL, ((Scene*)v)->picker()); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_view_info(void* v) { #if HAVE_IV IFGUI int i; Scene* s = (Scene*)v; XYView* view; if (!ifarg(1)) { view = XYView::current_pick_view(); for (i=0; i < s->view_count(); ++i) { if (s->sceneview(i) == view) { return double(i); } } return -1.; } view = s->sceneview(int(chkarg(1, 0, s->view_count()-1))); float x1,y1,x2,y2; i = int(chkarg(2,1,15)); switch (i) { case 1: // width return view->width(); case 2: // height return view->height(); case 3: // point width view->view_ratio(0., 0., x1, y1); view->view_ratio(1., 1., x2, y2); return x2 - x1; case 4: // point height view->view_ratio(0., 0., x1, y1); view->view_ratio(1., 1., x2, y2); return y2 - y1; case 5: // left return view->left(); case 6: // right return view->right(); case 7: // bottom return view->bottom(); case 8: // top return view->top(); case 9: // model x distance for one point view->view_ratio(0., 0., x1, y1); view->view_ratio(1., 1., x2, y2); if (x2 > x1) { return view->width()/(x2 - x1); }else{ return 1.; } case 10: // model y distance for one point view->view_ratio(0., 0., x1, y1); view->view_ratio(1., 1., x2, y2); if (y2 > y1) { return view->height()/(y2 - y1); }else{ return 1.; } case 11: // relative x location (from x model coord) return (*getarg(3) - view->left())/view->width(); case 12: // relative y location (from y model coord) return (*getarg(3) - view->bottom())/view->height(); case 13: // points from left (from x model coord) x1 = (*getarg(3) - view->left())/view->width(); view->view_ratio(x1, 1., x2, y2); view->view_ratio(0., 1., x1, y1); return x2 - x1; case 14: // points from top (from y model coord) y1 = (*getarg(3) - view->bottom())/view->height(); view->view_ratio(1., y1, x2, y2); view->view_ratio(1., 1., x1, y1); return y1 - y2; case 15: // label height in points //return WidgetKit::instance()->font()->size(); {FontBoundingBox b; WidgetKit::instance()->font()->font_bbox(b); return b.ascent() + b.descent(); } } ENDGUI #endif /* HAVE_IV */ return -1.; } double ivoc_view_size(void* v) { #if HAVE_IV IFGUI int i; Scene* s = (Scene*)v; XYView* view; view = s->sceneview(int(chkarg(1, 0, s->view_count()-1))); view->size(*getarg(2), *getarg(4), *getarg(3), *getarg(5)); view->damage_all(); ENDGUI #endif /* HAVE_IV */ return 0.; } double gr_line_info(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; GlyphIndex i, cnt; double* p; cnt = g->count(); i = (int)chkarg(1, -1, cnt); if (i < 0 || i > cnt-1) { i = -1; } Vect* x = vector_arg(2); for (i += 1; i < cnt; ++i) { GraphItem* gi = (GraphItem*)g->component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); x->resize(5); p = vector_vec(x); p[0] = colors->color(gpl->color()); p[1] = brushes->brush(gpl->brush()); if (gpl->label()) { Coord a, b; x->label(gpl->label()->text()); g->location(g->glyph_index(gpl->label()), a, b); p[2] = a; p[3] = b; p[4] = gpl->label()->fixtype(); } return (double)i; } } ENDGUI #endif /* HAVE_IV */ return -1.; } #if HAVE_IV static void gr_add(void* v, bool var) { IFGUI Graph* g = (Graph*)v; GraphLine* gl; Object* obj = NULL; char* lab = NULL; char* expr = NULL; int ioff = 0; // deal with 0, 1, or 2 optional arguments after first double* pd = NULL; // pointer to varname if second arg is varname string int fixtype = g->labeltype(); // organize args for backward compatibility and the new // addexpr("label, "expr", obj,.... style if (ifarg(2)) { if (var) {// if string or address then variable and 1 was label expr = gargstr(1); if (hoc_is_str_arg(2)) { pd = hoc_val_pointer(gargstr(2)); ioff += 1; }else if (hoc_is_pdouble_arg(2)) { pd = hoc_pgetarg(2); ioff += 1; } }else if (hoc_is_str_arg(2)) { // 1 label, 2 expression lab = gargstr(1); expr = gargstr(2); ioff += 1; if (ifarg(3) && hoc_is_object_arg(3)) { // object context obj = *hoc_objgetarg(3); ioff += 1; } }else if (hoc_is_object_arg(2)) { // 1 expr, 2 object context expr = gargstr(1); obj = *hoc_objgetarg(2); ioff += 1; }else{ expr = gargstr(1); } }else{ expr = gargstr(1); } if (ifarg(3+ioff)) { if (ifarg(6+ioff)) { fixtype = int(chkarg(6+ioff,0,2)); }else if (ifarg(4+ioff)) { // old versions did not have the fixtype and for // backward compatibility it must therefore be // fixed. fixtype = 1; } gl = g->add_var(expr, colors->color(int(*getarg(2+ioff))), brushes->brush(int(*getarg(3+ioff))), var, fixtype, pd, lab, obj); }else{ gl = g->add_var(expr, g->color(), g->brush(), var, fixtype, pd, lab, obj); } move_label(g, gl->label(), ioff); ENDGUI } #endif /* HAVE_IV */ static double gr_addvar(void* v) { #if HAVE_IV gr_add(v, 1); return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_addexpr(void* v) { #if HAVE_IV gr_add(v, 0); return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_addobject(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; Object* obj = *hoc_objgetarg(1); if (is_obj_type(obj, "RangeVarPlot")) { GraphVector* gv = (GraphVector*)obj->u.this_pointer; if (ifarg(3)) { gv->color(colors->color(int(*getarg(2)))); gv->brush(brushes->brush(int(*getarg(3)))); }else{ gv->color(g->color()); gv->brush(g->brush()); } g->append(new VectorLineItem(gv)); GLabel* glab = g->label(gv->name()); gv->label(glab); ((GraphItem*)g->component(g->glyph_index(glab)))->save(false); g->see_range_plot(gv); move_label(g, glab); }else{ hoc_execerror("Don't know how to plot this object type", 0); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_vector(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; int n = int(chkarg(1, 1., 1.e5)); double* x = hoc_pgetarg(2); double* y = hoc_pgetarg(3); GraphVector* gv = new GraphVector(""); if (ifarg(4)) { gv->color(colors->color(int(*getarg(4)))); gv->brush(brushes->brush(int(*getarg(5)))); }else{ gv->color(g->color()); gv->brush(g->brush()); } for (int i=0; i < n; ++i) { gv->add(x[i], y + i); } // GLabel* glab = g->label(gv->name()); // ((GraphItem*)g->component(g->glyph_index(glab)))->save(false); g->append(new GPolyLineItem(gv)); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_xexpr(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; int i = 0; if (ifarg(2)) { i = int(chkarg(2,0,1)); } g->x_expr(gargstr(1), i); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_begin(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->begin(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_plot(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->plot(*getarg(1)); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_simgraph(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->simgraph(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_begin_line(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; int i = 1; char* s = NULL; if (ifarg(i) && hoc_is_str_arg(1)) { s = gargstr(i++); } if (ifarg(i)) { g->begin_line( colors->color(int(*getarg(i))), brushes->brush(int(*getarg(i+1))), s); }else{ g->begin_line(s); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_line(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->line(*getarg(1), *getarg(2)); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_flush(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->flush(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_fast_flush(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->fast_flush(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_erase(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->erase_lines(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_erase_all(void* v) { #if HAVE_IV IFGUI ((Graph*)v)->erase_all(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_gif(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; Glyph* i = gif_image(gargstr(1)); if (i) { Transformer t; if (ifarg(4)) { Coord x = *getarg(4); Coord y = *getarg(5); Requisition r; i->request(r); t.scale(x/r.x_requirement().natural(), y/r.y_requirement().natural()); i = new TransformSetter(i, t); } if (!ifarg(2)) { // resize if smaller than gif Requisition r; i->request(r); if (r.x_requirement().natural() > (g->x2() - g->x1()) || r.y_requirement().natural() > (g->y2() - g->y1())) { g->new_size(0, 0, r.x_requirement().natural(), r.y_requirement().natural()); } } g->append(new GraphItem(i, false, false)); if (ifarg(2)) { g->move(g->count() - 1, *getarg(2), *getarg(3)); } return 1.; } ENDGUI #endif /* HAVE_IV */ return 0.; } double ivoc_gr_size(void* v) { #if HAVE_IV IFGUI Coord x1, y1, x2, y2; Graph* g = (Graph*)v; XYView* view = g->sceneview(0); if (ifarg(2)) { g->new_size(*getarg(1), *getarg(3), *getarg(2), *getarg(4)); } if (hoc_is_pdouble_arg(1)) { g->wholeplot(x1, y1, x2, y2); double *x = hoc_pgetarg(1); x[0] = x1; x[1] = x2; x[2] = y1; x[3] = y2; return 0.; } if (!view) { return 0.; } if (ifarg(2)) { view->zout(x1, y1, x2, y2); view->size(x1, y1, x2, y2); return 1.; }else{ view->zin(x1, y1, x2, y2); double x = 0.; switch (int(chkarg(1, 1., 4.))) { case 1: x = x1; break; case 2: x = x2; break; case 3: x = y1; break; case 4: x = y2; break; } return x; } ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_label(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; if (ifarg(8)) { g->label(*getarg(1), *getarg(2), gargstr(3), int(*getarg(4)), *getarg(5), *getarg(6), *getarg(7), colors->color(int(*getarg(8)))); }else if (ifarg(2)) { char* s = NULL; if (ifarg(3)) { s = gargstr(3); } g->label(*getarg(1), *getarg(2), s); }else{ g->label(gargstr(1)); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_fixed(void* v) { #if HAVE_IV IFGUI float scale = 1; if (ifarg(1)) { scale = chkarg(1, .01, 100); } ((Graph*)v)->fixed(scale); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_vfixed(void* v) { #if HAVE_IV IFGUI float scale = 1; if (ifarg(1)) { scale = chkarg(1, .01, 100); } ((Graph*)v)->vfixed(scale); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_relative(void* v) { #if HAVE_IV IFGUI float scale = 1.; if (ifarg(1)) { scale = chkarg(1, .01, 100.); } ((Graph*)v)->relative(scale); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_align(void* v) { #if HAVE_IV IFGUI float x=0,y=0; if (ifarg(1)) { x = chkarg(1,-10,10); } if (ifarg(2)) { y = chkarg(2,-10,10); } ((Graph*)v)->align(x, y); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_color(void* v) { #if HAVE_IV IFGUI int i=1; if (ifarg(2)) { colors->color(int(chkarg(1,2,ColorPalette::COLOR_SIZE-1)), gargstr(2)); return 1.; } if (ifarg(1)) { i = int(chkarg(1,-1,ColorPalette::COLOR_SIZE-1)); } ((Graph*)v)->color(i); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_brush(void* v) { #if HAVE_IV IFGUI int i=0; if (ifarg(3)) { brushes->brush(int(chkarg(1,1,BrushPalette::BRUSH_SIZE-1)), int(*getarg(2)), float(chkarg(3, 0, 1000))); return 1.; } if (ifarg(1)) { i = int(chkarg(1,-1,20)); } ((Graph*)v)->brush(i); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_view(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; if (ifarg(8)) { Coord x[8]; int i; for (i=0; i < 8; ++i) { x[i] = *getarg(i+1); } XYView* view = new XYView(x[0], x[1], x[2], x[3], g, x[6], x[7] ); Coord x1, x2, y1, y2; view->zout(x1, y1, x2, y2); view->size(x1, y1, x2, y2); //printf("%g %g %g %g\n", view->left(), view->bottom(), view->right(), view->top()); ViewWindow* w = new ViewWindow(view, hoc_object_name(g->hoc_obj_ptr())); w->xplace(int(x[4]), int(x[5])); w->map(); }else if (ifarg(1) && *getarg(1) == 2.) { View* view = new View(g); ViewWindow* w = new ViewWindow(view, hoc_object_name(g->hoc_obj_ptr())); w->map(); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } double ivoc_gr_mark(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; Coord x = *getarg(1); Coord y = *getarg(2); char style = '+'; if (ifarg(3)) { if (hoc_is_str_arg(3)) { style = *gargstr(3); } else { style = char(chkarg(3,0,10)); } } if (!ifarg(4)) { g->mark(x, y, style); }else if (!ifarg(5)) { g->mark(x, y, style, chkarg(4, .1, 100.), g->color(), g->brush()); }else{ g->mark(x, y, style, chkarg(4, .1, 100.), colors->color(int(*getarg(5))), brushes->brush(int(*getarg(6))) ); } ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double gr_view_count(void* v) { #if HAVE_IV int n = 0; IFGUI n = ((Scene*)v)->view_count(); ENDGUI return double(n); #else return 0.; #endif /* HAVE_IV */ } static double gr_unmap(void*v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; g->dismiss(); ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static double gr_set_cross_action(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; bool vector_copy = false; if (ifarg(2)) { vector_copy = int(chkarg(2, 0, 1)); } if (hoc_is_str_arg(1)) { g->set_cross_action(gargstr(1), NULL, vector_copy); }else{ g->set_cross_action(NULL, *hoc_objgetarg(1), vector_copy); } ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static double gr_printfile(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; g->printfile(gargstr(1)); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double exec_menu(void* v) { #if HAVE_IV IFGUI ((Scene*)v)->picker()->exec_item(gargstr(1)); ENDGUI #endif return 0.; } double ivoc_gr_menu_remove(void* v) { #if HAVE_IV IFGUI ((Scene*)v)->picker()->remove_item(gargstr(1)); ENDGUI #endif return 0.; } #if HAVE_IV extern double gr_getline(void*); #endif extern double gr_addglyph(void*); static Member_func gr_members[] = { "plot", gr_plot, "fastflush", gr_fast_flush, "flush", gr_flush, "xaxis", gr_xaxis, "yaxis", gr_yaxis, "addvar", gr_addvar, "addexpr", gr_addexpr, "addobject", gr_addobject, "glyph", gr_addglyph, "vector", gr_vector, "xexpr", gr_xexpr, "begin", gr_begin, "erase", ivoc_gr_erase, "size", ivoc_gr_size, "label", ivoc_gr_label, "fixed", gr_fixed, "vfixed", gr_vfixed, "relative", gr_relative, "align", gr_align, "color", gr_color, "brush", gr_brush, "view", gr_view, "save_name", gr_save_name, "beginline", ivoc_gr_begin_line, "line", ivoc_gr_line, "mark", ivoc_gr_mark, "simgraph", gr_simgraph, "view_count", gr_view_count, "erase_all", ivoc_erase_all, "unmap", gr_unmap, "crosshair_action", gr_set_cross_action, "printfile", gr_printfile, "family", gr_family, "menu_action", ivoc_gr_menu_action, "menu_tool", ivoc_gr_menu_tool, "view_info", ivoc_view_info, "view_size", ivoc_view_size, #if HAVE_IV "getline", gr_getline, #endif "exec_menu", exec_menu, "gif", ivoc_gr_gif, "menu_remove", ivoc_gr_menu_remove, "line_info", gr_line_info, 0,0 }; static void* gr_cons(Object* ho) { #if HAVE_IV Graph* g = NULL; IFGUI int i = 1; if (ifarg(1)) { i = (int)chkarg(1, 0, 1); } g = new Graph(i); g->ref(); g->hoc_obj_ptr(ho); ENDGUI return (void*)g; #else return (void*)0; #endif /* HAVE_IV */ } static void gr_destruct(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; g->dismiss(); Resource::unref(g); ENDGUI #endif /* HAVE_IV */ } void Graph_reg() { //printf("Graph_reg\n"); class2oc("Graph", gr_cons, gr_destruct, gr_members, NULL, NULL, NULL); #if HAVE_IV IFGUI colors = new ColorPalette(); brushes = new BrushPalette(); ENDGUI #endif } #if HAVE_IV static const char* colorname[] = { "white", "black", "red", "blue", "green", "orange", "brown", "violet", "yellow", "gray", 0}; ColorPalette::ColorPalette() { int i; for (i=0; i < COLOR_SIZE && colorname[i]; ++i) { color_palette[i] = NULL; color(i, colorname[i]); } color(0, Scene::default_background()); color(1, Scene::default_foreground()); int j; for (j=0; i < COLOR_SIZE; ++i, ++j) { // color_palette[i] = color_palette[j]; // ZFM fix to allow more colors (COLOR_SIZE > 20) color_palette[i] = color_palette[j%10]; Resource::ref(color_palette[i]); } }; ColorPalette::~ColorPalette() { for (int i=0; i < COLOR_SIZE; ++i) { Resource::unref(color_palette[i]); } } const Color* ColorPalette::color(int i)const { IFGUI if (i < 0) i = 1; i = i%COLOR_SIZE; return color_palette[i]; ENDGUI else return NULL; } const Color* ColorPalette::color(int i, const char* name) { const Color* c = Color::lookup(Session::instance()->default_display(), name); if (c == NULL) { printf("couldn't lookup color \"%s\", you must be missing the\n\ colormap.ini file or else the name isn't in it\n", name); } return color(i, c); } const Color* ColorPalette::color(int i, const Color* c) { if (c) { Resource::ref(c); Resource::unref(color_palette[i]); color_palette[i] = c; } return color_palette[i]; } int ColorPalette::color(const Color* c) const { for (int i=0; i < COLOR_SIZE; ++i) { if (color_palette[i] == c) { return i; } } return 1; } static int brush_pattern[] = { 0x0, 0xcccc, 0xfff0, 0xff00, 0xf000 }; BrushPalette::BrushPalette() { int i; for (i=0; i < BRUSH_SIZE; ++i) { brush_palette[i] = NULL; } i = 0; for (int j=0; j < 5; ++j) { for (int k=0; k < 5; ++k) { if (i < BRUSH_SIZE) { brush(i++, brush_pattern[j], k); } } } } BrushPalette::~BrushPalette() { for (int i=0; i < BRUSH_SIZE; ++i) { Resource::unref(brush_palette[i]); } } const Brush* BrushPalette::brush(int i)const { IFGUI if (i < 0) i = 1; i = i%BRUSH_SIZE; return brush_palette[i]; ENDGUI else return NULL; } const Brush* BrushPalette::brush(int i, int pattern, Coord width) { Brush* b; if (pattern) { b = new Brush(pattern, width); }else{ b = new Brush(width); } Resource::ref(b); Resource::unref(brush_palette[i]); brush_palette[i] = b; return b; } int BrushPalette::brush(const Brush* b) const { for (int i=0; i < BRUSH_SIZE; ++i) { if (brush_palette[i] == b) { return i; } } return 0; } ColorPalette* colors; BrushPalette* brushes; GraphItem::GraphItem(Glyph* g, bool s, bool p) : MonoGlyph(g){ save_ = s; pick_ = p; } GraphItem::~GraphItem(){} void GraphItem::save(ostream&, Coord, Coord) { } void GraphItem::erase(Scene*, GlyphIndex, int) { } void GraphItem::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { if (pick_) { MonoGlyph::pick(c, a, depth, h); } } //Graph implementPtrList(LineList, GraphLine); declareActionCallback(Graph); implementActionCallback(Graph); #define XSCENE 300. #define YSCENE 200. Graph::Graph(bool b) : Scene(0,0,XSCENE,YSCENE) { loc_ = 0; x_expr_ = NULL; x_pval_ = NULL; var_name_ = NULL; rvp_ = NULL; cross_action_ = NULL; vector_copy_ = false; family_on_ = false; family_label_ = NULL; family_cnt_ = 0; current_polyline_ = NULL; label_fixtype_ = 2; label_scale_ = 1.; label_x_align_ = 0; label_y_align_ = 0; label_x_ = 0; label_y_ = 1; label_n_ = 0; picker(); picker()->bind_select((OcHandler*)NULL); MenuItem* mi = picker()->add_radio_menu("Crosshair",(OcHandler*)NULL, CROSSHAIR); mi->state()->set(TelltaleState::is_chosen, true); tool(CROSSHAIR); picker()->add_menu("Plot what?", new ActionCallback(Graph)(this, &Graph::choose_sym)); picker()->add_radio_menu("Pick Vector",(OcHandler*)NULL, PICK); picker()->add_radio_menu("Color/Brush", new ActionCallback(Graph)(this, &Graph::change_prop)); #if 1 WidgetKit& wk = *WidgetKit::instance(); Menu* m = wk.pullright(); picker()->add_menu("View Axis", new ActionCallback(Graph)(this, &Graph::view_axis), m); picker()->add_menu("New Axis", new ActionCallback(Graph)(this, &Graph::new_axis), m); picker()->add_menu("View Box", new ActionCallback(Graph)(this, &Graph::view_box), m); picker()->add_menu("Erase Axis", new ActionCallback(Graph)(this, &Graph::erase_axis), m); mi = K::menu_item("Axis Type"); mi->menu(m); picker()->add_menu(mi); #else picker()->add_menu("New Axis", new ActionCallback(Graph)(this, &Graph::new_axis)); #endif mi = WidgetKit::instance()->check_menu_item("Keep Lines"); mi->action(new ActionCallback(Graph)(this, &Graph::keep_lines_toggle)); keep_lines_toggle_ = mi->state(); keep_lines_toggle_->ref(); picker()->add_menu("Keep Lines", mi); picker()->add_menu("Family Label?", new ActionCallback(Graph)(this, &Graph::family_label_chooser)); picker()->add_menu("Erase", new ActionCallback(Graph)(this, &Graph::erase_lines)); picker()->add_radio_menu("Move Text",(OcHandler*)NULL, Scene::MOVE); picker()->add_radio_menu("Change Text",(OcHandler*)NULL, Graph::CHANGELABEL); picker()->add_radio_menu("Delete", (OcHandler*)NULL, Scene::DELETE); sc_ = NULL; if (!colors) { colors = new ColorPalette(); } if (!brushes) { brushes = new BrushPalette(); } color_ = NULL; color(1); brush_ = NULL; brush(1); x_ = new DataVec(200); x_->ref(); extension_flushed_ = true; symlist_ = NULL; if (b) { XYView* v = new XYView((Scene*)this, XSCENE, YSCENE); Window* w = new ViewWindow(v, "Graph"); w->map(); } long i=3; if (WidgetKit::instance()->style()->find_attribute("graph_axis_default", i)) { switch (i) { case 0: view_axis(); break; case 2: view_box(); break; } } } extern "C" { extern void hoc_free_list(Symlist**); extern double* nrn_recalc_ptr(double*); }; Graph::~Graph() { //printf("~Graph\n"); for (long i=0; i < line_list_.count(); ++i) { Resource::unref(line_list_.item(i)); } Resource::unref(keep_lines_toggle_); Resource::unref(x_); hoc_free_list(&symlist_); Resource::unref(color_); Resource::unref(brush_); Resource::unref(rvp_); Resource::unref(sc_); Resource::unref(current_polyline_); Resource::unref(family_label_); if (var_name_) { delete var_name_; } if (cross_action_) { delete cross_action_; } } void Graph::name(char* s) { if (var_name_) { *var_name_ = s; }else{ var_name_ = new CopyString(s); } } void Graph::help() { switch (tool()) { case CROSSHAIR: Oc::help(Graph_Crosshair_); break; case CHANGELABEL: Oc::help(Graph_Change_label_); break; default: Scene::help(); break; } } void Graph::delete_label(GLabel* glab) { GraphLine* glin = NULL; GlyphIndex i, cnt; cnt = line_list_.count(); for (i = 0; i < cnt; ++i) { if (line_list_.item(i)->label() == glab) { glin = line_list_.item(i); break; } } if (glin) { line_list_.remove(i); glin->unref(); i = glyph_index(glin); remove(i); } if (!glin) { // but possibly a vector line cnt = count(); for (i=0; i < cnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (gpl->label() == glab) { remove(i); break; } } } } i = glyph_index(glab); remove(i); } GLabel* Graph::new_proto_label() const { return new GLabel("", color_, label_fixtype_, label_scale_, label_x_align_, label_y_align_); } bool Graph::change_label(GLabel* glab, const char* text, GLabel* gl) { GlyphIndex i, cnt = line_list_.count(); if (strcmp(glab->text(), text)) { for (i=0; i < cnt; ++i) { if (line_list_.item(i)->label() == glab) { if (! line_list_.item(i)->change_expr(text, &symlist_)) { return false; } } } glab->text(text); } i = glyph_index(glab); if (glab->fixtype() != gl->fixtype()) { if (gl->fixed()) { glab->fixed(gl->scale()); change_to_fixed(i, XYView::current_pick_view()); }else{ glab->vfixed(gl->scale()); change_to_vfixed(i, XYView::current_pick_view()); } } change(i); return true; } void Graph::change_label_color(GLabel* glab) { glab->color(color()); damage(glyph_index(glab)); if (glab->labeled_line()) { glab->labeled_line()->brush(brush()); damage(glyph_index(glab->labeled_line())); } } void Graph::change_line_color(GPolyLine* glin) { glin->color(color()); glin->brush(brush()); damage(glyph_index(glin)); if (glin->label()) { damage(glyph_index(glin->label())); } } GlyphIndex Graph::glyph_index(const Glyph* gl) { GlyphIndex i, cnt = count(); for (i=0; i < cnt; ++i) { Glyph* g = ((GraphItem*)component(i))->body(); if (g == gl) { return i; } } return -1; } ostream* Graph::ascii_; SymChooser* Graph::fsc_; void Graph::ascii(ostream* o) { ascii_ = o; } ostream* Graph::ascii() { return ascii_; } void Graph::draw(Canvas* c, const Allocation& a) const { long i, cnt = line_list_.count(); //if (!extension_flushed_) { Scene::draw(c, a); //} if (extension_flushed_) { for (i = 0; i < cnt; ++i) { line_list_.item(i)->extension()->draw(c, a); } } if (ascii_) { ascii_save(*ascii_); } } void Graph::ascii_save(ostream& o) const { long line, lcnt = line_list_.count(); int i, dcnt; if (lcnt == 0 || !x_ || family_label_) { // tries to print in matrix form is labels and each line the same // size. o << "PolyLines" << endl; if (x_expr_) { o << "x expression: " << x_expr_->name; } if (lcnt) { o << lcnt << " addvar/addexpr lines:"; for (i=0; i < lcnt; ++i) { o << " " << line_list_.item(i)->name(); } o << endl; } lcnt = count(); // check to see if all y_data has same count and a label. // If so print as matrix. (Assumption that all x_data same is // dangerous.) bool matrix_form = true; int col=0; int xcnt = 0; const DataVec* xvec = NULL; for (i=0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (gpl->label() && (xcnt == 0 || gpl->x_data()->count() == xcnt)) { xcnt = gpl->x_data()->count(); xvec = gpl->x_data(); if (gpl->y_data()->count() == xcnt) { ++col; } }else{ matrix_form = false; break; } } } if (matrix_form) { if (x_expr_) { o << x_expr_->name; }else{ o << "x"; } for (i=0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (gpl->y_data()->count() == xcnt) { o << " " << gpl->label()->text(); } } } o << endl; o << xcnt << " rows, " << col+1 << " columns" << endl; int j; for (j=0; j < xcnt; ++j) { o << xvec->get_val(j); for (i=0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (gpl->y_data()->count() == xcnt) { o << "\t" << gpl->y(j); } } } o << endl; } } if (!matrix_form) { o << "Line Manifest:" << endl; for (i = 0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); int j, jcnt; jcnt = gpl->y_data()->count(); if (jcnt && family_label_ && gpl->label()) { o << jcnt << " " << family_label_->text() << "=" << gpl->label()->text() << endl; }else{ o << jcnt << endl; } } } o << "End of Line Manifest" << endl; for (i = 0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); int j, jcnt; jcnt = gpl->y_data()->count(); if (jcnt && family_label_ && gpl->label()) { o << jcnt << " " << family_label_->text() << "=" << gpl->label()->text() << endl; }else{ o << jcnt << endl; } for (j=0; j < jcnt; ++j) { o << gpl->x(j) << "\t" << gpl->y(j) << "\n"; } } } } return; } o << "Graph addvar/addexpr lines" << endl; o << lcnt << " " << x_->count() << endl; if (x_expr_) { o << x_expr_->name; }else{ o << "x"; } for (line=0; line < lcnt; ++line) { o << " " << line_list_.item(line)->name(); } o << endl; dcnt = x_->count(); for (i = 0; i < dcnt; ++i) { o << x_->get_val(i); for (line=0; line < lcnt; ++line) { o << "\t" << line_list_.item(line)->y(i); } o << endl; } // print the remaining unlabeled polylines. i.e. saved with KeepLines lcnt = count(); int n = 0; for (i=0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (!gpl->label()) { ++n; } } } o << n << " unlabeled lines" << endl; for (i=0; i < lcnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (!gpl->label()) { int n = gpl->x_data()->count(); o << n << endl; int j; for (j=0; j < n; ++j) { o << gpl->x(j) << "\t" << gpl->y(j) << endl; } } } } } void Graph::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { #if 1 Scene::pick(c, a, depth, h); if (tool() == CHANGELABEL && !menu_picked() && h.event() && h.event()->type() == Event::down && h.event()->pointer_button() == Event::left && h.count() < 2 ){ h.target(depth, this, 0, new NewLabelHandler(this, h.left(), h.bottom()) ); } #else if (h.event() && h.event()->type() == Event::down) { if (h.event()->pointer_button() == Event::right) { h.target(depth, this, 0, new RubberRect(c, new NewView(this)) ); }else if (h.event()->pointer_button() == Event::middle) { choose_sym(c->window()); }else{ Scene::pick(c, a, depth, h); } }else{ Scene::pick(c, a, depth, h); } #endif } void Graph::new_size(Coord x1, Coord y1, Coord x2, Coord y2) { Scene::new_size(x1, y1, x2, y2); if (label_fixtype_ == 1) { label_x_ = x2 - .2*(x2 - x1); label_y_ = y2 - .1*(y2 - y1); }else if (label_fixtype_ == 2) { label_x_ = .8; label_y_ = .9; } label_n_ = 0; } void Graph::wholeplot(Coord& l, Coord& b, Coord& r, Coord& t) const { GlyphIndex i, cnt; GraphLine* gl; l = b = 1e9; r = t = -1e9; #if 0 cnt = line_list_.count(); if (!cnt) { #endif cnt = count(); for (i=0; i < cnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()){ GPolyLine* gpl = (GPolyLine*)gi->body(); if (gpl->x_data()->count() > 1) { l = Math::min(l, gpl->x_data()->min()); b = Math::min(b, gpl->y_data()->min()); r = Math::max(r, gpl->x_data()->max()); t = Math::max(t, gpl->y_data()->max()); } } if (gi->is_mark()) { Coord x, y; location(i, x, y); l = Math::min(l, x); b = Math::min(b, y); r = Math::max(r, x); t = Math::max(t, y); } } if (l >= r || b >= t) { Coord x1,y1,x2,y2; Scene::wholeplot(x1, y1, x2, y2); if (l >= r) { l = x1; r = x2; } if (b >= t) { b = y1; t = y2; } } if (t > 1e30) { t = 1e30; } if (b < -1e30) { t = -1e30; } return; #if 0 } for (i = 0; i < cnt; ++i) { gl = line_list_.item(i); l = Math::min(l, gl->x_data()->min()); b = Math::min(b, gl->y_data()->min()); r = Math::max(r, gl->x_data()->max()); t = Math::max(t, gl->y_data()->max()); } if (l >= r || b >= t) { Scene::wholeplot(l, b, r, t); } #endif } void Graph::axis(DimensionName d, float x1, float x2, float pos, int ntic, int nminor, int invert, bool number) { //printf("%d %g %g %g %d %d %d %d %g\n", d, x1, x2, pos, ntic, nminor, invert, number); Axis* a; if (x2 < x1) { a = new Axis(this, d); }else if ( ntic < 0) { a = new Axis(this, d, x1, x2); }else{ a = new Axis(this, d, x1, x2, pos, ntic, nminor, invert, number ); } append_fixed(new GraphAxisItem(a)); } void Graph::color(int i) { const Color* color = colors->color(i); Resource::ref(color); Resource::unref(color_); color_ = color; } void Graph::brush(int i) { const Brush* b = brushes->brush(i); Resource::ref(b); Resource::unref(brush_); brush_ = b; } GraphLine* Graph::add_var(const char* expr, const Color* color, const Brush* brush, bool usepointer, int fixtype, double* pd, const char* lab, Object* obj) { GraphLine* gl = new GraphLine(expr, x_, &symlist_, color, brush, usepointer, pd, obj); GLabel* glab; if (lab) { glab = label(lab, fixtype); }else{ glab = label(expr, fixtype); } GlyphIndex i = glyph_index(glab); ((GraphItem*)component(i))->save(false); glab->color(color); gl->label(glab); line_list_.append(gl); gl->ref(); Scene::append(new GPolyLineItem(gl)); return gl; } void Graph::add_polyline(GPolyLine* gp) { Scene::append(new GPolyLineItem(gp)); } void Graph::add_graphVector(GraphVector* gv) { Scene::append(new VectorLineItem(gv)); } void Graph::x_expr(const char* expr, bool usepointer) { Oc oc; x_expr_ = oc.parseExpr(expr, &symlist_); if (!x_expr_) { hoc_execerror(expr, "not an expression"); } if (usepointer) { x_pval_ = hoc_val_pointer(expr); if (!x_pval_) { hoc_execerror(expr, "is invalid left hand side of assignment statement"); } }else{ x_pval_ = 0; } } extern "C" { extern int hoc_execerror_messages; } void Graph::begin() { if (keep_lines_toggle_->test(TelltaleState::is_chosen)) { keep_lines(); family_value(); } long count = line_list_.count(); int hem = hoc_execerror_messages; for (long i=0; i < count; ++i) { GraphLine* gl = line_list_.item(i); gl->erase(); if (family_on_) { ((GPolyLine*)gl)->color(color()); ((GPolyLine*)gl)->brush(brush()); } hoc_execerror_messages = false; if (gl->valid(true) == false) { printf("Graph:: presently invalid expression: %s\n", gl->name()); } } hoc_execerror_messages = hem; x_->erase(); extension_start(); } void Graph::plot(float x) { if (extension_flushed_) { extension_continue(); } if (x_expr_) { if (x_pval_) { x_->add(float(*x_pval_)); }else{ Oc oc; x_->add(oc.runExpr(x_expr_)); } }else{ x_->add(x); } long count = line_list_.count(); for (long i=0; i < count; ++i) { line_list_.item(i)->plot(); } } void Graph::begin_line(const char* s) { begin_line(color_, brush_, s); } void Graph::begin_line(const Color* c, const Brush* b, const char* s) { Resource::unref(current_polyline_); current_polyline_ = new GPolyLine(new DataVec(2), c, b); Resource::ref(current_polyline_); if (s && s[0]) { GLabel* glab = label(s); current_polyline_->label(glab); ((GraphItem*)component(glyph_index(glab)))->save(false); } Scene::append(new GPolyLineItem(current_polyline_)); } void Graph::line(Coord x, Coord y) { if (!current_polyline_) { begin_line(); } current_polyline_->plot(x, y); } void Graph::flush() { extension_start(); long i, cnt = count(); for (i=0; i < cnt; ++i) { modified(i); } // damage_all();//too conservative. plots everything every time } void Graph::fast_flush() { #if 0 long i, cnt = line_list_.count(); for (i=0; i < cnt; ++i) { modified( glyph_index( line_list_.item(i)->extension() ) ); } #else long i, cnt = line_list_.count(); for (i=0; i < cnt; ++i) { line_list_.item(i)->extension()->damage(this); } #endif extension_flushed_ = true; } void Graph::extension_start() { x_->running_start(); long i, cnt = line_list_.count(); for (i = 0; i < cnt; ++i) { line_list_.item(i)->extension_start(); } extension_flushed_ = false; } void Graph::extension_continue() { x_->running_start(); long i, cnt = line_list_.count(); for (i = 0; i < cnt; ++i) { line_list_.item(i)->extension_continue(); } extension_flushed_ = false; } void Graph::mark(Coord x, Coord y, char style, float size, const Color* c, const Brush* b) { HocMark* m = HocMark::instance(style, size, c, b); append_fixed(new GraphMarkItem(m)); move(Scene::count() - 1, x, y); } void Graph::set_cross_action(const char* cp, Object* pyact, bool vector_copy) { if (cross_action_) { delete cross_action_; cross_action_ = NULL; } if (cp && strlen(cp) > 0) { cross_action_ = new HocCommand(cp); }else if (pyact) { cross_action_ = new HocCommand(pyact); } vector_copy_ = vector_copy; } void Graph::cross_action(char c, GPolyLine* gpl, int i) { if (cross_action_) { char buf[256]; if (vector_copy_) { Object* op1 = *(gpl->x_data()->new_vect()); Object* op2 = *(gpl->y_data()->new_vect(gpl->label())); hoc_pushx(double(i)); hoc_pushx(double(c)); hoc_push_object(op1); hoc_push_object(op2); cross_action_->func_call(4); hoc_obj_unref(op1); hoc_obj_unref(op2); }else{ hoc_pushx(double(gpl->x_data()->get_val(i))); hoc_pushx(double(gpl->y_data()->get_val(i))); hoc_pushx(double(c)); cross_action_->func_call(3); } }else{ printf("{x=%g y=%g}\n", gpl->x(i), gpl->y(i)); } } void Graph::cross_action(char c, Coord x, Coord y) { if (cross_action_) { char buf[256]; if (vector_copy_) { }else{ sprintf(buf, "%s(%g, %g, %d)", cross_action_->name(), x, y, c); cross_action_->execute(buf); } }else{ printf("{x=%g y=%g}\n", x, y); } } void Graph::erase() { long count = line_list_.count(); for (long i=0; i < count; ++i) { line_list_.item(i)->erase(); } damage_all(); } void Graph::erase_all() { int i; #if 0 while(count()) { remove(0); } #else for ( i = count()-1; i >= 0; --i) { remove(i); } #endif while (line_list_.count()) { Resource::unref(line_list_.item(0)); line_list_.remove(0); } label_n_ = 0; } void Graph::family_value() { if (family_label_) { char buf[256]; sprintf(buf, "hoc_ac_ = %s\n", family_label_->text()); Oc oc; oc.run(buf); family_val_ = hoc_ac_; } } void Graph::keep_lines_toggle() { if (Oc::helpmode()) { Oc::help(Graph_keep_lines_toggle_); keep_lines_toggle_->set(TelltaleState::is_chosen, !keep_lines_toggle_->test(TelltaleState::is_chosen)); return; } family_value(); if (!keep_lines_toggle_->test(TelltaleState::is_chosen)) { // keep the ones already there keep_lines(); } } void Graph::keep_lines() { char buf[256]; int fi; Coord x, y; GLabel* f = family_label_; if (f) { fi = glyph_index(f); location(fi, x, y); sprintf(buf, "%g", family_val_); } long lcnt = count(); for (long i = lcnt-1; i >= 0; --i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); if (gpl->keepable() && gpl->y_data()->count() > 1) { GPolyLine* g2 = new GPolyLine(new DataVec(gpl->x_data()), new DataVec(gpl->y_data()), gpl->color(), gpl->brush()); if (f) { GLabel* gl = label(x, y, buf, f->fixtype(), f->scale(), 0, family_cnt_, gpl->color()); family_cnt_++; g2->label(gl); ((GraphItem*)component(glyph_index(gl)))->save(false); } Scene::insert(i, new GPolyLineItem(g2)); modified(i); gpl->erase(); } } } flush(); } void Graph::family(bool i) { if (i) { erase_lines(); family_on_ = true; keep_lines_toggle_->set(TelltaleState::is_chosen, true); }else{ family_on_ = false; keep_lines_toggle_->set(TelltaleState::is_chosen, false); long count = line_list_.count(); for (long i=0; i < count; ++i) { GraphLine* gl = line_list_.item(i); gl->color(gl->save_color()); gl->brush(gl->save_brush()); } } } void Graph::family(const char* s) { if (family_label_) { if (s && s[1]) { family_label_->text(s); modified(glyph_index(family_label_)); }else{ remove(glyph_index(family_label_)); family_label_->unref(); family_label_ = NULL; } }else if (s && s[1]) { family_label_ = label(.95, .95, s, 2, 1, 1, 0, color_); family_label_->ref(); ((GraphItem*)component(glyph_index(family_label_)))->save(false); } } void Graph::erase_axis() { if (Oc::helpmode()) { Oc::help(Graph_erase_axis_); return; } GlyphIndex i, cnt; cnt = count(); for (i=cnt-1; i >= 0; --i) { ((GraphItem*)component(i))->erase(this, i, GraphItem::ERASE_AXIS); } Scene::background(); damage_all(); } void Graph::new_axis() { if (Oc::helpmode()) { Oc::help(Graph_new_axis_); return; } XYView* v = XYView::current_pick_view(); erase_axis(); Coord x1, x2, y1, y2; if (v) {v->zin(x1, y1, x2, y2);} Axis* a = new Axis(this, Dimension_X, x1, x2); append_fixed(new GraphAxisItem(a)); a = new Axis(this, Dimension_Y, y1, y2); append_fixed(new GraphAxisItem(a)); } void Graph::view_axis() { if (Oc::helpmode()) { Oc::help(Graph_view_axis_); return; } erase_axis(); Scene::background(new AxisBackground()); damage_all(); } void Graph::view_box() { if (Oc::helpmode()) { Oc::help(Graph_view_box_); return; } erase_axis(); Scene::background(new BoxBackground()); damage_all(); } #if 0 void Graph::spec_axis() { XYView* v = XYView::current_pick_view(); Coord x1, x2, y1, y2; v->zin(x1, y1, x2, y2); bool bx = var_pair_chooser("X-Axis", x1, x2); bool by = var_pair_chooser("Y-Axis", y1, y2); v->size(x1, y1, x2, y2); erase_axis(); if (bx) { Axis* a = new Axis(this, Dimension_X, x1, x2); append_fixed(new GraphAxisItem(a)); } if (by) { Axis* a = new Axis(this, Dimension_Y, y1, y2); append_fixed(new GraphAxisItem(a)); } } #endif void Graph::erase_lines() { if (Oc::helpmode()) { Oc::help(Graph_erase_lines_); return; } // when labels are attached to lines some get erased and some do not // the issue invalid pointers is also a problem (delete when removed // from scene which screws up the GlyphIndex iterators. For this reason // we just unshow all gpolyline labels, // then show the labels for line list and GraphVector then // remove all unshow. GlyphIndex i, cnt = count(); for (i=0; i < cnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_polyline() && !gi->is_graphVector()) { GLabel* gl = ((GPolyLine*)(gi->body()))->label(); if (gl) { gl->erase_flag(true); } } } cnt = line_list_.count(); for (i = 0; i < cnt; ++i) { GraphLine* gl = line_list_.item(i); gl->label()->erase_flag(false); } cnt = count(); for (i=cnt-1; i >= 0; --i) { ((GraphItem*)component(i))->erase(this, i, GraphItem::ERASE_LINE); } cnt = line_list_.count(); for (i = 0; i < cnt; ++i) { GraphLine* gl = line_list_.item(i); Scene::append(new GPolyLineItem(gl)); } erase(); if (family_label_) { family_cnt_ = 0; } } GLabel* Graph::label(float x, float y, const char* s, int fixtype, float scale, float x_align, float y_align, const Color* color) { GLabel* l = new GLabel(s, color, fixtype, scale, x_align, y_align); if (fixtype == 1) { append_fixed(new GraphLabelItem(l)); }else if (fixtype == 2) { append_viewfixed(new GraphLabelItem(l)); }else if (fixtype == 0) { append(new GraphLabelItem(l)); } move(count()-1, x, y); return l; } GLabel* Graph::label(float x, float y, const char* s, float n, int fixtype) { label_x_ = x; label_y_ = y; label_n_ = n; if (!s) { return NULL; } return label(x, y, s, (fixtype != -1) ? fixtype : label_fixtype_, label_scale_, label_x_align_, label_y_align_ + label_n_, color_); } GLabel* Graph::label(const char* s, int fixtype) { label_n_ += 1.; return label(label_x_, label_y_, s, label_n_, fixtype); } void Graph::fixed(float scale) { label_fixtype_ = 1; label_scale_ = scale; } void Graph::vfixed(float scale) { label_fixtype_ = 2; label_scale_ = scale; } void Graph::relative(float fraction) { label_fixtype_ = 0; label_scale_ = fraction; } void Graph::align(float x, float y) { label_x_align_ = x; label_y_align_ = y; } void Graph::see_range_plot(GraphVector* rvp) { if (rvp_) { rvp_->unref(); } rvp_ = rvp; Resource::ref(rvp); } void Graph::save_phase1(ostream& o) { o << "{" << endl; save_class(o, "Graph"); } static Graph* current_save_graph; void Graph::save_phase2(ostream& o) { char buf[256]; if (family_label_) { sprintf(buf, "save_window_.family(\"%s\")", family_label_->text()); o << buf << endl; } if (var_name_) { if ((var_name_->string())[var_name_->length() - 1] == '.') { sprintf(buf, "%sappend(save_window_)", var_name_->string()); }else{ sprintf(buf, "%s = save_window_", var_name_->string()); } o << buf << endl; sprintf(buf, "save_window_.save_name(\"%s\")", var_name_->string()); o << buf << endl; } if (x_expr_) { sprintf(buf, "save_window_.xexpr(\"%s\", %d)", x_expr_->name, x_pval_ ? 1:0); o << buf << endl; } long cnt = count(); current_save_graph = this; for (long i=0; i < cnt; ++i) { GraphItem* g = (GraphItem*)component(i); Coord x, y; location(i, x, y); if (g->save()) { g->save(o, x, y); } } o << "}" << endl; } bool GraphVector::choose_sym(Graph*) { // it is a range variable plot where we get a different result return false; } void Graph::choose_sym() { Oc oc; if (Oc::helpmode()) { if (rvp_) { Oc::help(Graph_choose_rvp_); }else{ Oc::help(Graph_choose_sym_); } } if (rvp_ && rvp_->choose_sym((Graph*)this)) { return; } if (!sc_) { Style* style = new Style(Session::instance()->style()); style->attribute("caption", "Variable to graph"); sc_ = new SymChooser(NULL, WidgetKit::instance(), style); sc_->ref(); } Window* w = NULL; XYView* v = XYView::current_pick_view(); if (!v || v->scene() != (Scene*)this || !v->canvas() || !v->canvas()->window()) { if (view_count() > 0 && sceneview(0)->canvas() && sceneview(0)->canvas()->window()) { w = sceneview(0)->canvas()->window(); } }else{ w = v->canvas()->window(); } while ((w && sc_->post_for_aligned(w, .5, 1.)) || (!w && sc_->post_at(300,300))) { //printf("Graph selected %s\n", sc_->selected()->string()); char buf[256]; double* pd = sc_->selected_var(); if (sc_->selected_vector_count()) { sprintf(buf, "%s", sc_->selected()->string()); GraphVector* gv = new GraphVector(buf); gv->color(color()); gv->brush(brush()); int n = sc_->selected_vector_count(); for (int i=0; i < n; ++i) { gv->add(double(i), pd + i); } GLabel* glab = label(gv->name()); ((GraphItem*)component(glyph_index(glab)))->save(false); gv->label(glab); append(new VectorLineItem(gv)); flush(); break; }else if (pd) { // add_var(sc_->selected()->string(), color(), brush(), 1, 2, pd); add_var(sc_->selected()->string(), color(), brush(), 1, 2); break; }else{ CopyString s(*sc_->selected()); // above required due to bug in mswindows version in which // sc_->selected seems volatile under some kinds of hoc // executions. sprintf(buf, "hoc_ac_ = %s\n", s.string()); if (oc.run(buf) == 0) { add_var(s.string(), color(), brush(), 0, 2); break; } hoc_warning(s.string(), "is not an expression."); } } // sc_->unref(); } void Graph::family_label_chooser() { Oc oc; if (Oc::helpmode()) { Oc::help(Graph_choose_family_label_); } if (!fsc_) { Style* style = new Style(Session::instance()->style()); style->attribute("caption", "Family label variable"); fsc_ = new SymChooser(NULL, WidgetKit::instance(), style); fsc_->ref(); } while (fsc_->post_for_aligned(XYView::current_pick_view()->canvas()->window(), .5, 1.)) { char buf[256]; sprintf(buf, "hoc_ac_ = %s\n", fsc_->selected()->string()); if (oc.run(buf) == 0) { family(fsc_->selected()->string()); break; } hoc_warning(sc_->selected()->string(), "is not an expression."); } } //GraphLine and GPolyLine GraphLine::GraphLine(const char* expr, DataVec* x, Symlist** symlist, const Color* c, const Brush* b, bool usepointer, double* pd, Object* obj) : GPolyLine(x, c, b) { Oc oc; valid_ = true; obj_ = NULL; simgraph_x_sav_ = NULL; if (usepointer) { if (pd) { //char buf[256]; //sprintf(buf, "%s", expr); //expr_ = oc.parseExpr(buf, symlist); expr_ = NULL; pval_ = pd; }else{ expr_ = oc.parseExpr(expr, symlist); pval_ = hoc_val_pointer(expr); if (!pval_) { hoc_execerror(expr, "is invalid left hand side of assignment statement"); } } oc.notify_when_freed(pval_, this); }else{ if (obj) { obj_ = obj; oc.notify_when_freed((void*)obj_, this); ObjectContext objc(obj_); expr_ = oc.parseExpr(expr, symlist); objc.restore(); }else{ expr_ = oc.parseExpr(expr, symlist); } pval_ = 0; } if (!pval_ && !expr_) { hoc_execerror(expr, "not an expression"); } save_color_ = c; Resource::ref(c); save_brush_ = b; Resource::ref(b); extension_ = new LineExtension(this); extension_->ref(); keepable_ = true; } GPolyLine::GPolyLine(DataVec* x, const Color* c, const Brush* b) { init(x, new DataVec(x->size()), c, b); } GPolyLine::GPolyLine(DataVec* x, DataVec* y, const Color* c, const Brush* b) { init(x, y, c, b); } GPolyLine::GPolyLine(GPolyLine* gp) { init(new DataVec(gp->x_data()), new DataVec(gp->y_data()), gp->color(), gp->brush()); } void GPolyLine::init(DataVec* x, DataVec* y, const Color* c, const Brush* b) { keepable_ = false; glabel_ = NULL; x_ = x; x_->ref(); y_ = y; y_->ref(); color_ = NULL; color(c); brush_ = NULL; brush(b); Resource::ref(b); } void GPolyLine::pick_vector() { Object* op1 = *(x_data()->new_vect()); Object* op2 = *(y_data()->new_vect(label())); hoc_obj_set(1, op1); hoc_obj_set(0, op2); hoc_obj_unref(op1); hoc_obj_unref(op2); } extern void graphLineRecDeleted(GraphLine*); GraphLine::~GraphLine() { // expr_ deleted when its symlist is deleted // printf("~GraphLine %s\n", name()); simgraph_activate(false); graphLineRecDeleted(this); Resource::unref(extension_); Oc oc; if (pval_ || obj_) { //printf("~graphline notify disconnect\n"); oc.notify_pointer_disconnect(this); } } void GraphLine::simgraph_activate(bool act_) { if (act_) { if (!simgraph_x_sav_) { simgraph_x_sav_ = x_; x_ = new DataVec(x_->size()); Resource::ref(x_); //printf("simgraph activate %s x_->size = %d\n", name(), x_->size()); } }else{ if (simgraph_x_sav_) { Resource::unref(x_); x_ = simgraph_x_sav_; simgraph_x_sav_ = NULL; //printf("simgraph inactivate %s x_->size = %d\n", name(), x_->size()); } } } void GraphLine::simgraph_init() { x_->erase(); erase(); } void GraphLine::simgraph_continuous(double tt) { x_->add(tt); plot(); } void GraphLine::update(Observable*) { // *pval_ has been freed //printf("GraphLine::update pval_ has been freed\n"); pval_ = NULL; if (obj_) { expr_ = NULL; } obj_ = NULL; } bool GraphLine::change_expr(const char* expr, Symlist** symlist) { Oc oc; if (pval_ || obj_) { printf("Can't change.\n"); return false; } Symbol* sym = oc.parseExpr(expr, symlist); if (sym) { expr_ = sym; if (pval_) { Oc oc; oc.notify_pointer_disconnect(this); pval_ = NULL; } return true; }else{ return false; } } void GPolyLine::label(GLabel* l) { Resource::ref(l); if (l && l->gpl_ && l->gpl_->label()) { l->gpl_->label(NULL); } if (glabel_) { glabel_->gpl_ = NULL; } Resource::unref(glabel_); glabel_ = l; if (glabel_) { glabel_->color(color()); glabel_->gpl_ = (GPolyLine*)this; } } GPolyLine::~GPolyLine() { Resource::unref(color_); Resource::unref(brush_); Resource::unref(x_); Resource::unref(y_); label(NULL); } void GPolyLine::erase_line(Scene* s, GlyphIndex i) { GLabel* gl = label(); s->remove(i); if (gl) { s->remove(s->glyph_index(gl)); } } const char* GraphLine::name() const { Oc oc; if (label()) { return label()->text(); }else if (expr_) { return oc.name(expr_); }else{ return "no name"; } } void GraphLine::extension_start() { extension_->begin(); } void GraphLine::extension_continue() { extension_->extend(); } void GraphLine::save(ostream& o) { char buf[256]; float x, y; if (!label()) { return; } GlyphIndex i = current_save_graph->glyph_index(label()); current_save_graph->location(i, x, y); if (pval_) { sprintf(buf, "save_window_.addvar(\"%s\", %d, %d, %g, %g, %d)", name(), colors->color(color_), brushes->brush(brush_), x, y, label()->fixtype() ); }else{ // following is not exactly correct if the label or object args were // used but it is expected that in that case the graph is // encapsulated in an object and this info is incorrect anyway. // Can revisit later if this is a problem. sprintf(buf, "save_window_.addexpr(\"%s\", %d, %d, %g, %g, %d)", name(), colors->color(color_), brushes->brush(brush_), x, y, label()->fixtype() ); } o << buf << endl; } void GPolyLine::save(ostream&) { } void GPolyLine::label_loc(Coord& x, Coord& y)const { if (label()) { GlyphIndex i = current_save_graph->glyph_index(label()); current_save_graph->location(i, x, y); }else{ x = 0.; y = 0.; } } void GPolyLine::request(Requisition& req)const { //printf("GPolyLine::request\n"); Coord x, span; const float eps = 1e-4; x = x_->min(); span = x_->max() - x + eps; x = (span > 0)? x/span : 0; Requirement rx(span, 0, 0, -x); x = y_->min(); span = y_->max() - x + eps; x = (span > 0)? x/span : 0; Requirement ry(span, 0, 0, -x); req.require_x(rx); req.require_y(ry); } void GPolyLine::allocate(Canvas* c, const Allocation& a, Extension& e) { //printf("GPolyLine::allocate\n"); e.set(c, a); MyMath::extend(e, brush()->width()/2 + 1); } void GPolyLine::draw(Canvas* c, const Allocation& a)const { draw_specific(c, a, 0, y_->count()); } void GPolyLine::draw_specific(Canvas* c, const Allocation&, int begin, int end)const { //printf("GPolyLine::draw %d %g %g\n", y_->count(), a.x(), a.y()); int i, cnt = end; if (cnt - begin < 2) { return; } #if 0 Coord x1, y1, x2, y2; XYView::current_draw_view()->damage_area(x1, y1, x2, y2); #define GPIN(arg) \ MyMath::inside(x_->get_val(arg), y_->get_val(arg), x1, y1, x2, y2) /* this works most of the time in preventing extraneous lines during very large zoom but can fail */ for (i=begin; i > 0; --i) { // begin plotting outside of damage if (!GPIN(i)) { break; } } for (; i < cnt; ++i) { if (GPIN(i)) { if (i > 0) { --i; } break; } } int j; for (j=cnt-1 ; i < j; --j) { if (GPIN(j)) { if (j < cnt-1) { ++j; } break; } } cnt = j + 1; if (cnt - i < 2) { return; } #else i = begin; #endif // xwindows limited to 65000 point polylines and mswindows // limited even more. So split into max 8000 point polylines for drawing // with large fonts on windows 98 there is a 6000 point limit so // change to 4000. If the problem recurs we will need to have a property // option long cnt1; while (i < cnt) { #ifdef WIN32 cnt1 = i + 4000; #else cnt1 = i + 8000; #endif if (cnt1 > cnt - 2) {// the -2 prevents a one point final polyline cnt1 = cnt; } c->new_path(); c->move_to(x_->get_val(i), y_->get_val(i)); for (++i; i < cnt1; ++i) { c->line_to(x_->get_val(i), y_->get_val(i)); } c->stroke(color_, brush_); } IfIdraw(mline(c, cnt, x_->vec(), y_->vec(), color_, brush_)); } void GPolyLine::print(Printer* c, const Allocation&)const { int i, cnt = y_->count(); if (cnt < 2) { return; } #if 1 float xmax,xmin,ymax,ymin; XYView* v = XYView::current_draw_view(); xmax = v->right(); xmin = v->left(); ymax = v->top(); ymin = v->bottom(); /* this works most of the time in preventing extraneous lines during very large zoom but can fail */ for (i=0; i < cnt; ++i) { if (MyMath::inside(x_->get_val(i), y_->get_val(i), xmin, ymin, xmax, ymax)) { if (i > 0) { --i; } break; } } int j; for (j=cnt-1 ; i < j; --j) { if (MyMath::inside(x_->get_val(j), y_->get_val(j), xmin, ymin, xmax, ymax)) { if (j < cnt-1) { ++j; } break; } } cnt = j + 1; if (cnt - i < 2) { return; } #else i=0; #endif const Transformer& t = XYView::current_draw_view()->s2o(); //Scene::view_transform((Canvas*)c, 1, t); //2 would keep fixed width // line even after scaling by Print Window Manager c->new_path(); c->move_to(x_->get_val(i), y_->get_val(i)); #if 0 for (++i; i < cnt; ++i) { c->line_to(x_->get_val(i), y_->get_val(i)); } // some printers can't take very long lines // from alain@helmholtz.sdsc.edu #else char counter=0; for (++i; i < cnt; ++i) { c->line_to(x_->get_val(i), y_->get_val(i)); if(!++counter) { c->push_transform(); c->transform(t); c->stroke(color_, brush_); c->pop_transform(); c->new_path(); c->move_to(x_->get_val(i), y_->get_val(i)); } } #endif c->push_transform(); c->transform(t); c->stroke(color_, brush_); c->pop_transform(); } void GraphLine::plot(){ if ( pval_ ) { y_->add(*pval_); }else{ Oc oc; nrn_hoc_lock(); if (obj_) { ObjectContext obc(obj_); y_->add(oc.runExpr(expr_)); obc.restore(); }else if (valid()) { y_->add(oc.runExpr(expr_)); } nrn_hoc_unlock(); } //printf("GPolyLine::plot(%d) value = %g\n", loc, y_->value(loc)); } bool GraphLine::valid(bool check) { if (check && ! pval_) { Oc oc; valid_ = oc.valid_expr(expr_); } return valid_; } void GPolyLine::plot(Coord x, Coord y) { x_->add(x); y_->add(y); } void GPolyLine::color(const Color* col) { const Color* c = col; if (!c) { c = colors->color(1); } Resource::ref(c); Resource::unref(color_); color_ = c; if (glabel_ && glabel_->color() != color()) { glabel_->color(color()); } } void GPolyLine::brush(const Brush* brush) { const Brush* b = brush; if (!b) { b = brushes->brush(1); } Resource::ref(b); Resource::unref(brush_); brush_ = b; } void GraphLine::save_color(const Color* color) { const Color* c = color; if (!c) { c = colors->color(1); } Resource::ref(c); Resource::unref(color_); save_color_ = c; GPolyLine::color(c); } void GraphLine::save_brush(const Brush* brush) { const Brush* b = brush; if (!b) { b = brushes->brush(1); } Resource::ref(b); Resource::unref(brush_); save_brush_ = b; GPolyLine::brush(b); } //GLabel GLabel::GLabel(const char* s, const Color* color, int fixtype, float size, float x_align, float y_align) { gpl_ = NULL; WidgetKit& kit = *WidgetKit::instance(); label_ = new Label(s, kit.font(), color); label_->ref(); erase_flag_ = false; color_ = color; color_->ref(); text_ = s; if (fixtype == 2) { vfixed(size); }else if (fixtype == 1) { fixed(size); }else{ relative(size); } align(x_align, y_align); } GLabel::~GLabel() { // printf("~GLabel %s\n", text()); Resource::unref(label_); Resource::unref(color_); assert(!labeled_line()); } Glyph* GLabel::clone() const { return new GLabel(text_.string(), color_, fixtype_, scale_, x_align_, y_align_); } void GLabel::save(ostream& o, Coord x, Coord y) { if (labeled_line()) { return; } char buf[256]; sprintf(buf, "save_window_.label(%g, %g, \"%s\", %d, %g, %g, %g, %d)", x, y, text_.string(), fixtype_, scale_, x_align_, y_align_, colors->color(color_) ); o << buf << endl; } void GLabel::fixed(float scale) { fixtype_ = 1; scale_ = scale; } void GLabel::vfixed(float scale) { fixtype_ = 2; scale_ = scale; } void GLabel::relative(float scale) { fixtype_ = 0; scale_ = scale; } void GLabel::align(float x, float y) { x_align_ = x; y_align_ = y; } void GLabel::color(const Color* c) { Resource::unref(label_); WidgetKit& kit = *WidgetKit::instance(); label_ = new Label(text_, kit.font(), c); label_->ref(); Resource::ref(c); Resource::unref(color_); color_ = c; if (gpl_ && gpl_->color() != color()) { gpl_->color(color()); } } void GLabel::text(const char* t) { Resource::unref(label_); WidgetKit& kit = *WidgetKit::instance(); text_ = t; label_ = new Label(text_, kit.font(), color_); label_->ref(); } void GLabel::request(Requisition& req)const { label_->request(req); Requirement& rx = req.x_requirement(); Requirement& ry = req.y_requirement(); rx.natural(rx.natural()*scale_); ry.natural(ry.natural()*scale_); //printf("ry.alignment=%g\n", ry.alignment()); rx.alignment(x_align_); ry.alignment(y_align_ + ry.alignment()); } void GLabel::allocate(Canvas* c, const Allocation& a, Extension& e) { e.set(c, a); } void GLabel::draw(Canvas* c, const Allocation& a1)const { //printf("GLabel::draw\n"); Transformer t; Coord width = a1.x_allotment().span(); Coord height = a1.y_allotment().span(); Coord x = a1.x() - width*x_align_; Coord y = a1.y() - height*y_align_; //printf("x=%g y=%g\n", x, y); Allotment ax(0, width, 0); Allotment ay(0, height, 0); Allocation a2; a2.allot_x(ax); a2.allot_y(ay); //printf("xend = %g, yend=%g\n", a2.right(), a2.top()); c->push_transform(); t.scale(scale_, scale_); t.translate(x, y); c->transform(t); //float a00, a01, a10,a11,a20,a21; //c->transformer().matrix(a00,a01,a10,a11,a20,a21); //printf("transformer %g %g %g %g %g %g\n", a00, a01, a10, a11, a20, a21); label_->draw(c, a2); c->pop_transform(); IfIdraw(text(c, text_.string(), t, NULL, color())); } //DataVec------------------ DataVec::DataVec(int size) { y_ = new float[size]; y_[0] = 0.; size_ = size; count_ = 0; iMinLoc_ = iMaxLoc_ = -1; running_min_loc_ = running_max_loc_ = -1; } DataVec::DataVec(const DataVec* v) { size_ = v->size_; y_ = new float[size_]; count_ = v->count_; y_[0] = 0.; for (int i=0; i < count_; ++i) { y_[i] = v->y_[i]; } iMinLoc_ = v->iMinLoc_; iMaxLoc_ = v->iMaxLoc_; running_min_loc_ = v->running_min_loc_; running_max_loc_ = v->running_max_loc_; } DataVec::~DataVec() { delete [] y_; } void DataVec::running_start() { if (count_) { running_min_loc_ = running_max_loc_ = count_ - 1; }else{ running_min_loc_ = running_max_loc_ = 0; } } void DataVec::add(float x) { if ( count_ == size_) { size_ *= 2; float* y = new float[size_]; for (int i=0; i 1e30) { x = 1e32;}else if (x < -1e32) {x = -1e32;} y_[count_] = x; if (running_min_loc_ >= 0) { if ( x < get_val(running_min_loc_)) { running_min_loc_ = count_; } if ( x > get_val(running_max_loc_)) { running_max_loc_ = count_; } } ++count_; iMinLoc_ = iMaxLoc_ = -1; } float DataVec::max()const {return get_val(loc_max());} float DataVec::min()const {return get_val(loc_min());} float DataVec::running_max() { if (running_max_loc_ < 0) { return max(); }else{ return get_val(running_max_loc_); } } float DataVec::running_min() { if (running_min_loc_ < 0) { return min(); }else{ return get_val(running_min_loc_); } } int DataVec::loc_max()const { DataVec* dv = (DataVec*)this; if (iMaxLoc_ < 0) { int i; float m; for (i=0, dv->iMaxLoc_ = 0, m = y_[i++]; i < count_; i++) { if (m < y_[i]) { m = y_[i]; dv->iMaxLoc_ = i; } } } return iMaxLoc_; } int DataVec::loc_min()const { DataVec* dv = (DataVec*)this; if (iMinLoc_ < 0) { int i; float m; for (i=0, dv->iMinLoc_ = 0, m = y_[i++]; i < count_; i++) { if (m > y_[i]) { m = y_[i]; dv->iMinLoc_ = i; } } } return iMinLoc_; } float DataVec::max(int low, int high) { int imax = loc_max(); if (imax >= low && imax < high) { return get_val(imax); } float m; for (m = y_[low++]; low < high; low++) { if (m < y_[low]) { m = y_[low]; } } return m; } float DataVec::min(int low, int high) { int imin = loc_min(); if (imin >= low && imin < high) { return get_val(imin); } float m; for (m = y_[low++]; low < high; low++) { if (m > y_[low]) { m = y_[low]; } } return m; } void DataVec::erase() { count_ = 0; iMinLoc_ = iMaxLoc_ = -1; running_min_loc_ = running_max_loc_ = -1; } void DataVec::write() { #if 0 cout << get_name() << endl; cout << count_ << endl; for (int i=0; iref(); name_ = name; keepable_ = true; disconnect_defer_ = false; } GraphVector::~GraphVector() { Oc oc; oc.notify_pointer_disconnect(this); dp_->unref(); } const char* GraphVector::name()const { return name_.string(); } void GraphVector::save(ostream&) { } void GraphVector::begin() { dp_->erase(); y_->erase(); x_->erase(); } static double zero; void GraphVector::update(Observable*) { // cant notify_pointer_disconnect from here, it will screw up list disconnect_defer_ = true; begin(); } void GraphVector::add(float x, double* py) { if (disconnect_defer_) { Oc oc; oc.notify_pointer_disconnect(this); disconnect_defer_ = false; } if (dp_->count() == 0 || py != dp_->p(dp_->count()-1) + 1){ Oc oc; oc.notify_when_freed(py, this); } x_->add(x); double* p = &zero; if (py) { p = py; } dp_->add(p); y_->add(float(*p)); } bool GraphVector::trivial() const { for (int i=0; i < dp_->count(); ++i) { if (dp_->p(i) != &zero) { return false; } } return true; } void GraphVector::request(Requisition& req)const { y_->erase(); for (int i=0; i < dp_->count(); ++i) { y_->add(*dp_->p(i)); } GPolyLine::request(req); } //LineExtension LineExtension::LineExtension(GPolyLine* gp) { gp_ = gp; // don't ref since this is referenced by the polyline start_ = previous_ = -1; } LineExtension::~LineExtension(){} void LineExtension::begin() { previous_ = yd()->count() -1; start_ = yd()->count() - 1; yd()->running_start(); } void LineExtension::extend() { previous_ = start_; start_ = yd()->count() - 1; yd()->running_start(); } void LineExtension::request(Requisition& req) const { Coord x, span; Coord x1, x2; const float eps = 1e-4; x1 = xd()->running_min(); x2= xd()->running_max(); span = (x2 - x1); x = (x1); x = (span > 0)? x/span : 0; Requirement rx(span, 0, 0, -x); x1 = yd()->running_min(); x2= yd()->running_max(); span = (x2 - x1)/2; x = (x1); x = (span > 0)? x/span : 0; Requirement ry(span, 0, 0, -x); req.require_x(rx); req.require_y(ry); } void LineExtension::allocate(Canvas* c, const Allocation& a, Extension& e) { e.set(c, a); // MyMath::extend(e, gp_->brush()->width()/2 + 1); } void LineExtension::draw(Canvas* c, const Allocation& a) const { #if 0 if (previous_ >= 0) { gp_->draw_specific(c, a, previous_, xd()->count()); }else #endif if (start_ >= 0) { gp_->draw_specific(c, a, start_, xd()->count()); } } void LineExtension::damage(Graph* g) { g->damage(xd()->running_min(), yd()->running_min(), xd()->running_max(), yd()->running_max() ); } void Graph::change_prop() { picker()->bind_select((OcHandler*)NULL); picker()->set_scene_tool(CHANGECOLOR); ColorBrushWidget::start(this); if (Oc::helpmode()) { help(); } } void Graph::update_ptrs() { if (x_pval_) { x_pval_ = nrn_recalc_ptr(x_pval_); } if (rvp_) { rvp_->update_ptrs(); } GlyphIndex i, cnt = count(); for (i=0; i < cnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_graphVector()) { GraphVector* gv = (GraphVector*)(gi->body()); if (gv) { gv->update_ptrs(); } } } cnt = line_list_.count(); for (i=0; i < line_list_.count(); ++i) { line_list_.item(i)->update_ptrs(); } } void DataPointers::update_ptrs() { int i; for (i=0; i < count_; ++i) { px_[i] = nrn_recalc_ptr(px_[i]); } } void GraphLine::update_ptrs() { if (pval_) { pval_ = nrn_recalc_ptr(pval_); } } void GraphVector::update_ptrs() { if (dp_) { dp_->update_ptrs(); } } #endif /* HAVE_IV */ neuron-7.5/src/ivoc/graph.h000066400000000000000000000264441323325274500157140ustar00rootroot00000000000000#ifndef graph_h #define graph_h #include #include #include #include #include "scenevie.h" class DataVec; class Color; class Brush; struct Symbol; class Symlist; class GraphLine; class GLabel; class GPolyLine; class SymChooser; class Event; class GraphVector; class HocCommand; class LineExtension; class TelltaleState; struct Object; declarePtrList(LineList, GraphLine); //all Glyphs added to Graph must be enclosed in a GraphItem class GraphItem : public MonoGlyph { public: enum { ERASE_LINE=1, ERASE_AXIS }; GraphItem(Glyph* g, bool = true, bool pick = true); virtual ~GraphItem(); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual void save(ostream&, Coord, Coord); virtual void erase(Scene*, GlyphIndex, int erase_type); bool save() { return save_; } void save(bool s) {save_ = s;} virtual bool is_polyline(); virtual bool is_mark(); virtual bool is_fast() { return false;} virtual bool is_graphVector() { return false;} private: bool save_; bool pick_; }; class Graph : public Scene { // Scene of GraphLines labels and polylines public: enum {CROSSHAIR = Scene::EXTRATOOL, CHANGELABEL, PICK, EXTRAGRAPHTOOL}; Graph(bool = true); //true means map a new default view virtual ~Graph(); void axis(DimensionName, float min, float max, float pos = 0., int ntics = -1, int nminor=0, int invert = 0, bool number = true); GraphLine* add_var(const char*, const Color*, const Brush*, bool usepointer, int fixtype = 1, double* p = NULL, const char* lab = NULL, Object* obj = NULL); void x_expr(const char*, bool usepointer); void add_polyline(GPolyLine*); void add_graphVector(GraphVector*); void begin(); void plot(float); void flush(); void fast_flush(); void begin_line(const char* s = NULL); void begin_line(const Color*, const Brush*, const char* s = NULL); void line(Coord x, Coord y); void mark(Coord x, Coord y, char style='+', float size=12, const Color* =NULL, const Brush* =NULL); void erase(); virtual void erase_all(); void erase_lines(); // all GPolylines virtual void delete_label(GLabel*); virtual bool change_label(GLabel*, const char*, GLabel* gl=NULL); virtual void help(); void keep_lines(); void keep_lines_toggle(); void family(bool); void family(const char*); void family_label_chooser(); void new_axis(); void erase_axis(); void view_axis(); void view_box(); void change_prop(); void color(int); void brush(int); const Color* color() const {return color_;} const Brush* brush() const {return brush_;} void set_cross_action(const char*, Object*, bool vectorcopy=false); void cross_action(char, GPolyLine*, int); void cross_action(char, Coord, Coord); void simgraph();// faintly analogous to Vector.record for localstep plotting virtual void draw(Canvas*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual GlyphIndex glyph_index(const Glyph*); virtual void new_size(Coord x1, Coord y1, Coord x2, Coord y2); virtual void wholeplot(Coord &x1, Coord& y1, Coord& x2, Coord& y2)const; //label info GLabel* label(float x, float y, const char* s, int fixtype, float scale, float x_align, float y_align, const Color*); GLabel* label(float x, float y, const char* s, float n=0, int fixtype = -1); GLabel* label(const char* s, int fixtype = -1); GLabel* new_proto_label() const; void fixed(float scale); void vfixed(float scale); void relative(float scale); void align(float x, float y); void choose_sym(); void name(char*); void change_label_color(GLabel*); void change_line_color(GPolyLine*); void update_ptrs(); virtual void save_phase1(ostream&); virtual void save_phase2(ostream&); int labeltype() const { return label_fixtype_; } static bool label_chooser(const char*, char*, GLabel*, Coord x = 400., Coord y = 400.); virtual void see_range_plot(GraphVector*); static void ascii(ostream*); static ostream* ascii(); private: void extension_start(); void extension_continue(); void ascii_save(ostream& o) const; void family_value(); private: Symlist* symlist_; LineList line_list_; int loc_; DataVec* x_; bool extension_flushed_; SymChooser* sc_; static SymChooser* fsc_; CopyString* var_name_; GPolyLine* current_polyline_; const Color* color_; const Brush* brush_; int label_fixtype_; float label_scale_; float label_x_align_, label_y_align_; float label_x_, label_y_, label_n_; TelltaleState* keep_lines_toggle_; bool family_on_; GLabel* family_label_; double family_val_; int family_cnt_; HocCommand* cross_action_; bool vector_copy_; Symbol* x_expr_; double* x_pval_; GraphVector* rvp_; static ostream* ascii_; }; class DataVec :public Resource { // info for single dimension public: DataVec(int size); DataVec(const DataVec*); virtual ~DataVec(); void add(float); float max() const, min() const; float max(int low, int high), min(int, int); int loc_max() const, loc_min() const; void erase(); int count() const { return count_;} void write(); float get_val(int i) const {return y_[i];} //y[(ierase();} virtual void erase_line(Scene*, GlyphIndex); // Erase by menu command void color(const Color*); void brush(const Brush*); const Color* color() const {return color_;} const Brush* brush() const {return brush_;} Coord x(int index) const { return x_->get_val(index); } Coord y(int index) const { return y_->get_val(index); } const DataVec* x_data() const {return x_;} const DataVec* y_data() const {return y_;} GLabel* label() const { return glabel_; } void label(GLabel*); void label_loc(Coord& x, Coord& y)const; // screen coords bool near(Coord, Coord, float, const Transformer&) const; // model coords input but checking relative to screen coords int nearest(Coord, Coord, const Transformer&, int index = -1) const; bool keepable() { return keepable_;} private: void init(DataVec*, DataVec*, const Color*, const Brush*); protected: DataVec* y_; DataVec* x_; const Color* color_; const Brush* brush_; GLabel* glabel_; bool keepable_; }; class GraphLine : public GPolyLine , public Observer { // An oc variable to plot public: GraphLine(const char*, DataVec* x, Symlist**, const Color* = NULL, const Brush* = NULL, bool usepointer=0, double* pd = NULL, Object* obj = NULL); virtual ~GraphLine(); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual void save(ostream&); void plot(); const char* name() const; LineExtension* extension() { return extension_; } void extension_start(); void extension_continue(); const Color* save_color() const { return save_color_;} const Brush* save_brush() const { return save_brush_;} void save_color(const Color*); void save_brush(const Brush*); bool change_expr(const char*, Symlist**); virtual void update(Observable*); bool valid(bool check = false); virtual void erase_line(Scene*, GlyphIndex) {erase();} // Erase by menu command void simgraph_activate(bool); void simgraph_init(); void simgraph_continuous(double); void update_ptrs(); private: Symbol* expr_; double* pval_; LineExtension* extension_; const Color* save_color_; const Brush* save_brush_; bool valid_; Object* obj_; DataVec* simgraph_x_sav_; }; class GraphVector : public GPolyLine , public Observer{ // fixed x and vector of pointers public: GraphVector(const char*, const Color* = NULL, const Brush* = NULL); virtual ~GraphVector(); virtual void request(Requisition&) const; void begin(); void add(float, double*); virtual void save(ostream&); const char* name() const; bool trivial() const; virtual bool choose_sym(Graph*); virtual void update(Observable*); DataPointers* py_data() { return dp_; } void update_ptrs(); private: DataPointers* dp_; CopyString name_; bool disconnect_defer_; }; class GPolyLineItem : public GraphItem { public: GPolyLineItem(Glyph* g) : GraphItem(g){} virtual ~GPolyLineItem(){}; virtual bool is_polyline(); virtual void save(ostream& o, Coord, Coord){ ((GPolyLine*)body())->save(o);} virtual void erase(Scene* s, GlyphIndex i, int type) { if (type & GraphItem::ERASE_LINE) { s->remove(i); } } }; class GLabel : public Glyph { public: GLabel(const char* s, const Color*, int fixtype = 1, float size = 12, float x_align = 0., float y_align = 0.); virtual ~GLabel(); virtual Glyph* clone() const; virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void save(ostream&, Coord, Coord); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); void text(const char*); void fixed(float scale); void vfixed(float scale); void relative(float scale); void align(float x, float y); void color(const Color*); bool fixed() const {return fixtype_ == 1;} float scale() const { return scale_;} const char* text() const { return text_.string();} int fixtype() const {return fixtype_;} float x_align() const {return x_align_;} float y_align() const {return y_align_;} const Color* color() const { return color_;} bool erase_flag() { return erase_flag_; } void erase_flag(bool b) { erase_flag_ = b; } GPolyLine* labeled_line() const { return gpl_; } private: void need(Canvas*, const Allocation&, Extension&)const; friend void GPolyLine::label(GLabel*); private: int fixtype_; float scale_; float x_align_, y_align_; CopyString text_; Glyph* label_; const Color* color_; GPolyLine* gpl_; bool erase_flag_; }; class ColorPalette { public: ColorPalette(); virtual ~ColorPalette(); const Color* color(int)const; const Color* color(int, const char*); const Color* color(int, const Color*); int color(const Color*)const; // enum {COLOR_SIZE = 20}; // ZFM: changed to allow more colors enum {COLOR_SIZE = 100}; private: const Color* color_palette[COLOR_SIZE]; }; class BrushPalette { public: BrushPalette(); virtual ~BrushPalette(); const Brush* brush(int)const; const Brush* brush(int index, int pattern, Coord width); int brush(const Brush*)const; enum {BRUSH_SIZE = 25}; private: const Brush* brush_palette[BRUSH_SIZE]; }; extern ColorPalette* colors; extern BrushPalette* brushes; #endif neuron-7.5/src/ivoc/graphvec.cpp000077500000000000000000000022321323325274500167350ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #define USEGNU 1 #include "graph.h" #if USEGNU #include "oc2iv.h" #include "ivocvect.h" Object** DataVec::new_vect(GLabel* gl) const { int i, cnt; Vect* vec; cnt = count(); vec = new Vect(cnt); for (i=0; i < cnt; ++i) { (*vec)[i] = get_val(i); } if (gl) { vec->label(gl->text()); } Object** obp = vec->temp_objvar(); hoc_obj_ref(*obp); return obp; } double gr_getline(void* v) { Graph* g = (Graph*)v; GlyphIndex i, cnt; cnt = g->count(); i = (int)chkarg(1, -1, cnt); if (i < 0 || i > cnt-1) { i = -1; } Vect* x = vector_arg(2); Vect* y = vector_arg(3); for (i += 1; i < cnt; ++i) { GraphItem* gi = (GraphItem*)g->component(i); if (gi->is_polyline()) { GPolyLine* gpl = (GPolyLine*)gi->body(); long size = gpl->x_data()->count(); x->resize(size); y->resize(size); for (long j=0; j < size; ++j) { x->elem(j) = gpl->x(j); y->elem(j) = gpl->y(j); } if (gpl->label()) { y->label(gpl->label()->text()); } return (double)i; } } return -1.; } #else void DataVec::new_vect(Object**, DataVec*) { hoc_execerror("No Vector class", 0); } #endif #endif neuron-7.5/src/ivoc/grglyph.cpp000077500000000000000000000202221323325274500166110ustar00rootroot00000000000000#include <../../nrnconf.h> // hoc level Glyph implementation for graphing #include #include "classreg.h" #include "oc2iv.h" #if HAVE_IV #include #include #include "grglyph.h" #include "idraw.h" extern Image* gif_image(const char*); #else #include class GrGlyph : public Resource { public: GrGlyph(Object*); virtual ~GrGlyph(); Object** temp_objvar(); private: Object* obj_; }; #endif // HAVE_IV double gr_addglyph(void* v) { #if HAVE_IV IFGUI Graph* g = (Graph*)v; Object* obj = *hoc_objgetarg(1); check_obj_type(obj, "Glyph"); GrGlyph* gl = (GrGlyph*)(obj->u.this_pointer); Coord x = *getarg(2); Coord y = *getarg(3); Coord sx = ifarg(4) ? *getarg(4) : 1.; Coord sy = ifarg(5) ? *getarg(5) : 1.; Coord rot = ifarg(6) ? *getarg(6) : 0.; int fix = ifarg(7) ? int(chkarg(7, 0, 2)) : 0; GrGlyphItem* ggi = new GrGlyphItem(gl, sx, sy, rot); switch(fix) { case 0: g->append(ggi); break; case 1: g->append_fixed(ggi); break; case 2: g->append_viewfixed(ggi); break; } g->move(g->count()-1, x, y); ENDGUI #endif return 0.; } static Object** g_new_path(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->new_path(); ENDGUI #endif return g->temp_objvar(); } static Object** g_move_to(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->move_to(*getarg(1), *getarg(2)); ENDGUI #endif return g->temp_objvar(); } static Object** g_line_to(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->line_to(*getarg(1), *getarg(2)); ENDGUI #endif return g->temp_objvar(); } static Object** g_control_point(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->control_point(*getarg(1), *getarg(2)); ENDGUI #endif return g->temp_objvar(); } static Object** g_curve_to(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->curve_to(*getarg(1), *getarg(2), *getarg(3), *getarg(4), *getarg(5), *getarg(6)); ENDGUI #endif return g->temp_objvar(); } static Object** g_stroke(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI int ci = ifarg(1) ? int(chkarg(1, 0, 10000)) : 1; int bi = ifarg(2) ? int(chkarg(2, 0, 10000)) : 0; g->stroke(ci, bi); ENDGUI #endif return g->temp_objvar(); } static Object** g_close_path(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->close_path(); ENDGUI #endif return g->temp_objvar(); } static Object** g_fill(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI int ci = ifarg(1) ? int(chkarg(1, 0, 10000)) : 1; g->fill(ci); ENDGUI #endif return g->temp_objvar(); } static Object** g_erase(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->erase(); ENDGUI #endif return g->temp_objvar(); } static Object** g_circle(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->circle(*getarg(1), *getarg(2), *getarg(3)); ENDGUI #endif return g->temp_objvar(); } static Object** g_gif(void* v) { GrGlyph* g = (GrGlyph*)v; #if HAVE_IV IFGUI g->gif(gargstr(1)); ENDGUI #endif return g->temp_objvar(); } static Symbol* sggl_; Member_func members[] = { 0, 0 }; Member_ret_obj_func objmembers[] = { "path", g_new_path, "m", g_move_to, "l", g_line_to, "s", g_stroke, "close", g_close_path, "fill", g_fill, "curve", g_curve_to, "cpt", g_control_point, "erase", g_erase, "gif", g_gif, "circle", g_circle, 0, 0 }; static void* cons(Object* o) { GrGlyph* g = new GrGlyph(o); g->ref(); return g; } static void destruct(void* v) { GrGlyph* g = (GrGlyph*)v; g->unref(); } void GrGlyph_reg() { class2oc("Glyph", cons, destruct, members, NULL, objmembers, NULL); sggl_ = hoc_lookup("Glyph"); } GrGlyph::GrGlyph(Object* o) { obj_ = o; #if HAVE_IV IFGUI type_ = new DataVec(10); x_ = new DataVec(10); y_ = new DataVec(10); type_->ref(); x_->ref(); y_->ref(); gif_ = NULL; ENDGUI #endif } GrGlyph::~GrGlyph() { #if HAVE_IV IFGUI type_->unref(); x_->unref(); y_->unref(); Resource::unref(gif_); ENDGUI #endif } Object** GrGlyph::temp_objvar() { GrGlyph* gg = (GrGlyph*)this; Object** po; po = hoc_temp_objptr(gg->obj_); return po; } #if HAVE_IV GrGlyphItem::GrGlyphItem(Glyph* g, float sx, float sy, float angle) : GraphItem(g) { t_.scale(sx, sy); t_.rotate(angle); } GrGlyphItem::~GrGlyphItem() { } void GrGlyphItem::allocate(Canvas* c, const Allocation& a, Extension& e) { e.set(c, a); } void GrGlyphItem::draw(Canvas* c, const Allocation& a) const { c->push_transform(); Transformer t = t_; t.translate(a.x(), a.y()); c->transform(t); IfIdraw(pict(t)); //float m1, m2, m3,m4,m5,m6; //t.matrix(m1,m2,m3,m4,m5,m6); //printf("transformer %g %g %g %g %g %g\n", m1,m2,m3,m4,m5,m6); body()->draw(c, a); c->pop_transform(); IfIdraw(end()); } void GrGlyphItem::print(Printer* c, const Allocation& a) const { draw(c, a); } void GrGlyph::gif(const char* file) { gif_ = gif_image(file); } void GrGlyph::new_path() { type_->add(1); } void GrGlyph::move_to(Coord x, Coord y) { type_->add(2); x_->add(x); y_->add(y); } void GrGlyph::line_to(Coord x, Coord y) { type_->add(3); x_->add(x); y_->add(y); } void GrGlyph::curve_to(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2) { type_->add(4); x_->add(x); y_->add(y); x_->add(x1); y_->add(y1); x_->add(x2); y_->add(y2); } void GrGlyph::close_path() { type_->add(5); } void GrGlyph::circle(Coord x, Coord y, Coord r) { const Coord p0 = 1.00000000 * r; const Coord p1 = 0.89657547 * r; // cos 30 * sqrt(1 + tan 15 * tan 15) const Coord p2 = 0.70710678 * r; // cos 45 const Coord p3 = 0.51763809 * r; // cos 60 * sqrt(1 + tan 15 * tan 15) const Coord p4 = 0.26794919 * r; // tan 15 new_path(); move_to(x+p0, y); curve_to(x+p2, y+p2, x+p0, y+p4, x+p1, y+p3); curve_to(x, y+p0, x+p3, y+p1, x+p4, y+p0); curve_to(x-p2, y+p2, x-p4, y+p0, x-p3, y+p1); curve_to(x-p0, y, x-p1, y + p3, x-p0, y+p4); curve_to(x-p2, y-p2, x-p0, y-p4, x-p1, y-p3); curve_to(x, y-p0, x-p3, y-p1, x-p4, y-p0); curve_to(x+p2, y-p2, x+p4, y-p0, x+p3, y-p1); curve_to(x+p0, y, x+p1, y-p3, x+p0, y-p4); close_path(); } void GrGlyph::stroke(int ci, int bi) { type_->add(6); type_->add(ci); type_->add(bi); } void GrGlyph::fill(int ci) { type_->add(7); type_->add(ci); } void GrGlyph::control_point(Coord x, Coord y) { type_->add(8); x_->add(x); y_->add(y); } void GrGlyph::erase() { type_->erase(); x_->erase(); y_->erase(); if (gif_) { gif_->unref(); gif_ = NULL; } } void GrGlyph::draw(Canvas* c, const Allocation& a) const { int i, j; Coord x, y; if (gif_) { gif_->draw(c, a); } for (i=0, j=0; i < type_->count(); ++i) { switch(int(type_->get_val(i))) { case 1: c->new_path(); IfIdraw(new_path()); break; case 2: x = x_->get_val(j); y = y_->get_val(j); ++j; c->move_to(x, y); IfIdraw(move_to(x, y)); break; case 3: x = x_->get_val(j); y = y_->get_val(j); ++j; c->line_to(x, y); IfIdraw(line_to(x, y)); break; case 4: x = x_->get_val(j); y = y_->get_val(j); c->curve_to(x, y, x_->get_val(j+1), y_->get_val(j+1), x_->get_val(j+2), y_->get_val(j+2)); IfIdraw(curve_to(x, y, x_->get_val(j+1), y_->get_val(j+1), x_->get_val(j+2), y_->get_val(j+2))); j += 3; break; case 5: c->close_path(); IfIdraw(close_path()); break; case 6: x = type_->get_val(++i); y = type_->get_val(++i); c->stroke(colors->color(int(x)), brushes->brush(int(y))); IfIdraw(stroke(c, colors->color(int(x)), brushes->brush(int(y)))); break; case 7: x = type_->get_val(++i); c->fill(colors->color(int(x))); IfIdraw(fill(c, colors->color(int(x)))); break; case 8: x = x_->get_val(j); y = y_->get_val(j); ++j; c->transformer().transform(x, y); //printf("x=%g y=%g\n", x, y); c->push_transform(); Transformer t; c->transformer(t); c->rect(x-2, y-2, x+2, y+2, colors->color(1), brushes->brush(0)); c->pop_transform(); break; } } } void GrGlyph::request(Requisition& r) const { Coord min, max, natural; min = x_->min(); max = x_->max(); natural = max - min; r.x_requirement().natural(natural); if (natural > 0) { r.x_requirement().alignment(-min/natural); } min = y_->min(); max = y_->max(); natural = max - min; r.y_requirement().natural(natural); if (natural > 0) { r.y_requirement().alignment(-min/natural); } if (gif_) { gif_->request(r); } } #endif neuron-7.5/src/ivoc/grglyph.h000077500000000000000000000021021323325274500162530ustar00rootroot00000000000000#ifndef grglyph_h #define grglyph_h #include #include "graph.h" struct Object; class GrGlyph; class GrGlyphItem : public GraphItem { public: GrGlyphItem(Glyph* g, float scalex, float scaley, float rot); virtual ~GrGlyphItem(); virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void print(Printer*, const Allocation&) const; private: Transformer t_; }; class GrGlyph : public Glyph { public: GrGlyph(Object*); virtual ~GrGlyph(); virtual void request(Requisition&) const; virtual void draw(Canvas*, const Allocation&) const; void new_path(); void move_to(Coord, Coord); void line_to(Coord, Coord); void control_point(Coord, Coord); void curve_to(Coord, Coord, Coord, Coord, Coord, Coord); void close_path(); void circle(Coord x, Coord y, Coord r); void stroke(int color, int brush); void fill(int color); void erase(); void gif(const char*); Object** temp_objvar(); private: DataVec* type_; DataVec* x_; DataVec* y_; Object* obj_; Glyph* gif_; }; #endif neuron-7.5/src/ivoc/grmanip.cpp000066400000000000000000000324261323325274500166000ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include "ivoc.h" #include "mymath.h" #include "rubband.h" #include "graph.h" #include "hocmark.h" #include "utility.h" #define LineRubberMarker_event_ "Crosshair Graph" #define DeleteLabelHandler_event_ "Delete Graph" #define ChangeLabelHandler_event_ "ChangeText" #define DeleteLineHandler_event_ "Delete Graph" #define LinePicker_event_ "Pick Graph" #define MoveLabelBand_press_ "MoveText Graph" extern "C" {extern double hoc_cross_x_, hoc_cross_y_;} class LineRubberMarker : public Rubberband { public: LineRubberMarker(GPolyLine*, RubberAction*, Canvas* c=NULL); LineRubberMarker(Coord, Coord, RubberAction*, Canvas* c=NULL); virtual ~LineRubberMarker(); virtual bool event(Event&); virtual void undraw(Coord, Coord); virtual void draw(Coord, Coord); int index() { return index_;} private: GPolyLine* gl_; Label* label_; Coord x_, y_; int index_; #if defined(WIN32)||MAC CopyString def_str_; #endif }; class MoveLabelBand : public Rubberband { public: MoveLabelBand(GLabel*, RubberAction*, Canvas* = NULL); virtual ~MoveLabelBand(); virtual void draw(Coord, Coord); virtual void press(Event&); virtual void release(Event&); private: GLabel* gl_; GLabel* label_; GlyphIndex index_; Allocation a_; Cursor* cursor_; Coord x0_, y0_; }; /*static*/ class DeleteLabelHandler : public Handler { public: DeleteLabelHandler(GLabel*); ~DeleteLabelHandler(); virtual bool event(Event&); private: GLabel* gl_; }; /*static*/ class ChangeLabelHandler : public Handler { public: ChangeLabelHandler(GLabel*); ~ChangeLabelHandler(); virtual bool event(Event&); private: GLabel* gl_; }; /*static*/ class DeleteLineHandler : public Handler { public: DeleteLineHandler(GPolyLine*); ~DeleteLineHandler(); virtual bool event(Event&); private: GPolyLine* gpl_; }; /*static*/ class LinePicker : public Rubberband { public: LinePicker(GPolyLine*); ~LinePicker(); virtual void press(Event&); virtual void release(Event&); private: void common(); private: GPolyLine* gpl_; const Color* c_; }; void GraphLine::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { GPolyLine::pick(c, a, depth, h); } void GPolyLine::pick(Canvas* c, const Allocation&, int depth, Hit& h) { if (h.count() && h.target(depth, 0)) { return;} if (h.event() && h.event()->type() == Event::down && h.event()->pointer_button() == Event::left) { Coord x = h.left(), y = h.bottom(); switch (XYView::current_pick_view()->scene()->tool()) { case Graph::CROSSHAIR: if (near(x, y, 10, c->transformer())) { h.target(depth, this, 0, new LineRubberMarker(this, NULL, c) ); } break; case Scene::DELETE: if (near(x, y, 10, c->transformer())) { h.target(depth, this, 0, new DeleteLineHandler(this) ); } break; case Graph::CHANGECOLOR: if (near(x, y, 10, c->transformer())) { XYView::current_pick_view()->scene()-> change_line_color(this); } break; case Graph::PICK: if (near(x, y, 5, c->transformer())) { h.target(depth, this, 0, new LinePicker(this)); } break; } } } void HocMark::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { if (h.count() && h.target(depth, 0)) { return;} if (h.event() && h.event()->type() == Event::down && h.event()->pointer_button() == Event::left) { Coord x = h.left(), y = h.bottom(); switch (XYView::current_pick_view()->scene()->tool()) { case Graph::CROSSHAIR: h.target(depth, this, 0, new LineRubberMarker(a.x(), a.y(), NULL, c) ); break; } } } bool GPolyLine::near(Coord xcm, Coord ycm, float epsilon, const Transformer& t)const { if (x_->count() <= 0) { return false; } int index = nearest(xcm, ycm, t); Coord xc, yc, x1, x2, y1, y2; x1 = x(index); y1 = y(index); if (index < x_->count() - 1) { x2 = x(index+1); y2 = y(index+1); }else{ x2 = x1; y2 = y1; } //printf("nearest model %g %g to mouse %g %g\n", x1, y1, xcm, ycm); t.transform(xcm, ycm, xc, yc); t.transform(x1, y1); t.transform(x2, y2); //printf("nearest mouse %g %g box %g %g %g %g\n", xc, yc, x1, y1, x2, y2); return MyMath::near_line(xc, yc, x1, y1, x2, y2, epsilon); } int GPolyLine::nearest(Coord x1, Coord y1, const Transformer& t, int index_begin) const { int index, i; int count = x_->count(); Coord x, y, xt, yt; t.transform(x1,y1,x,y); #define Norm2(lval, arg) \ t.transform(x_->get_val(arg), y_->get_val(arg), xt, yt); \ lval = MyMath::norm2(x - xt, y - yt); float dxmin, dx; if (index_begin < 0) { index = 0; Norm2(dxmin, 0); for (i = 1; i < count; ++i) { Norm2(dx, i); if (dx < dxmin) { dxmin = dx; index = i; } } }else{ float dxleft, dxright; i = index = index_begin; Norm2(dxmin, i); dxleft = dxright = dxmin; if (i-1 >= 0) { Norm2(dxleft, i-1); } if (i+1 > count) { Norm2(dxright, i+1); } if (dxright < dxleft) { while (++i < count) { Norm2(dx, i); if (dx < dxmin) { dxmin = dx; index = i; }else{ break; } } }else{ while (--i >= 0) { Norm2(dx, i); if (dx < dxmin) { dxmin = dx; index = i; }else{ break; } } } } return index; } LineRubberMarker::LineRubberMarker(GPolyLine* gl, RubberAction* ra, Canvas* c) : Rubberband(ra, c) { //printf("LineRubberMarker\n"); gl_ = gl; Resource::ref(gl); label_ = NULL; index_ = -1; } LineRubberMarker::LineRubberMarker(Coord x, Coord y, RubberAction* ra, Canvas* c) : Rubberband(ra, c) { //printf("LineRubberMarker\n"); gl_ = NULL; label_ = NULL; index_ = -1; x_ = x; y_ = y; } LineRubberMarker::~LineRubberMarker(){ //printf("~LineRubberMarker\n"); Resource::unref(gl_); Resource::unref(label_); } bool LineRubberMarker::event(Event& e) { if (Oc::helpmode()) { if (e.type() == Event::down) { Oc::help(LineRubberMarker_event_); } return true; } if (e.type() == Event::key) { char buf[2]; if (e.mapkey(buf, 1) > 0) { if (gl_) { ((Graph*)XYView::current_pick_view()->scene())-> cross_action(buf[0], gl_, index_); }else{ ((Graph*)XYView::current_pick_view()->scene())-> cross_action(buf[0], x_, y_); } } return true; }else{ #if defined(WIN32)||MAC if (e.type() == Event::down) { def_str_ = ((DismissableWindow*)canvas()->window())->name(); }else if (e.type() == Event::up) { ((DismissableWindow*)canvas()->window())->name(def_str_.string()); } #endif return Rubberband::event(e); } } void LineRubberMarker::undraw(Coord, Coord) { Coord x, y; transformer().transform(x_, y_, x, y); Canvas* c = canvas(); Transformer identity; c->push_transform(); c->transformer(identity); #if !defined(WIN32)&& !MAC Allocation a; a.allot_x(Allotment(x + 20, 0, 0)); a.allot_y(Allotment(y, 0, 0)); label_->draw(c, a); #endif c->line(x-10, y, x+10, y, Rubberband::color(), Rubberband::brush()); c->line(x, y-10, x, y+10, Rubberband::color(), Rubberband::brush()); c->pop_transform(); } void LineRubberMarker::draw(Coord x, Coord y) { //printf("draw %g %g", x, y); Coord x1, y1; transformer().inverse_transform(x, y, x1, y1); //printf(" model %g %g", x1, y1); if (gl_) { index_ = gl_->nearest(x1, y1, transformer(), index_); x_ = gl_->x(index_); y_ = gl_->y(index_); //printf(" on line %g %g\n", x_, y_); } char s[50]; #if defined(WIN32) || MAC sprintf(s, "crosshair x=%g y=%g", x_, y_); ((DismissableWindow*)canvas()->window())->name(s); #else sprintf(s, "(%g,%g)", x_, y_); Resource::unref(label_); label_ = new Label(s, WidgetKit::instance()->font() , Rubberband::color()); #endif hoc_cross_x_ = x_; hoc_cross_y_ = y_; undraw(0, 0); } void GLabel::pick(Canvas* c, const Allocation&, int depth, Hit& h) { if (h.count() && h.target(depth, 0)) { return;} if (h.event() && h.event()->type() == Event::down && h.event()->pointer_button() == Event::left) { //printf("GLabel picked %s\n", text_.string()); switch (XYView::current_pick_view()->scene()->tool()) { case Scene::MOVE: h.target(depth, this, 0, new MoveLabelBand(this, NULL, c) ); break; case Scene::DELETE: h.target(depth, this, 0, new DeleteLabelHandler(this) ); break; case Scene::CHANGECOLOR: XYView::current_pick_view()->scene()->change_label_color(this); break; case Graph::CHANGELABEL: h.target(depth, this, 0, new ChangeLabelHandler(this) ); } } } DeleteLabelHandler::DeleteLabelHandler(GLabel* gl) { // printf("DeleteLabelHandler\n"); gl_ = gl; } DeleteLabelHandler::~DeleteLabelHandler(){ // printf("~DeleteLabelHandler\n"); } bool DeleteLabelHandler::event(Event& e) { if (Oc::helpmode()) { if (e.type() == Event::down) { Oc::help(DeleteLabelHandler_event_); } return true; } XYView::current_pick_view()->scene()->delete_label(gl_); return true; } ChangeLabelHandler::ChangeLabelHandler(GLabel* gl) { // printf("ChangeLabelHandler\n"); gl_ = gl; } ChangeLabelHandler::~ChangeLabelHandler(){ // printf("~ChangeLabelHandler\n"); } bool ChangeLabelHandler::event(Event& e) { if (Oc::helpmode()) { if (e.type() == Event::down) { Oc::help(ChangeLabelHandler_event_); } return true; } char buf[200]; strcpy(buf, gl_->text()); GLabel* gl = (GLabel*)gl_->clone(); gl->ref(); if (Graph::label_chooser("Modify Label", buf, gl, e.pointer_root_x(), e.pointer_root_y() )) { ((Graph*)(XYView::current_pick_view()->scene()))->change_label(gl_, buf, gl); } gl->unref(); return true; } void Scene::change_label_color(GLabel* gl) { printf("No method for changeing label color %s\n", gl->text()); } void Scene::change_line_color(GPolyLine*) { printf("No method for changeing line color \n"); } void Scene::delete_label(GLabel* gl) { printf("No method for deleting label %s\n", gl->text()); } DeleteLineHandler::DeleteLineHandler(GPolyLine* gpl) { // printf("DeleteLineHandler\n"); gpl_ = gpl; } DeleteLineHandler::~DeleteLineHandler(){ // printf("~DeleteLineHandler\n"); } bool DeleteLineHandler::event(Event& e) { if (Oc::helpmode()) { if (e.type() == Event::down) { Oc::help(DeleteLineHandler_event_); } return true; } Scene* s = XYView::current_pick_view()->scene(); GlyphIndex i = s->glyph_index(gpl_); s->modified(i); s->damage(i); gpl_->erase_line(s, i); return true; } LinePicker::LinePicker(GPolyLine* gpl) : Rubberband(){ // printf("LinePicker\n"); gpl_ = gpl; } LinePicker::~LinePicker(){ // printf("~LinePicker\n"); } void LinePicker::press(Event&) { const Color* c; if (Oc::helpmode()) { Oc::help(LinePicker_event_); return; } c_ = gpl_->color(); c = colors->color(2); if (c == c_) { c = colors->color(3); } gpl_->color(c); gpl_->pick_vector(); common(); } void LinePicker::release(Event&) { gpl_->color(c_); common(); } void LinePicker::common() { Scene* s = XYView::current_pick_view()->scene(); GlyphIndex i = s->glyph_index(gpl_); s->modified(i); s->damage(i); if (gpl_->label() && (i=s->glyph_index(gpl_->label())) >= 0) { s->modified(i); s->damage(i); } } MoveLabelBand::MoveLabelBand(GLabel* gl, RubberAction* ra, Canvas* c) : Rubberband(ra, c) { // printf("MoveLabelBand\n"); gl_ = gl; gl_->ref(); label_ = (GLabel*) gl_->clone(); label_->ref(); label_->color(Rubberband::color()); Graph* gr = (Graph*)XYView::current_pick_view()->scene(); index_ = gr->glyph_index(gl); gr->location(index_, x0_, y0_); if (gl_->fixed()) { transformer().transform(x0_, y0_); }else{ XYView::current_pick_view()->view_ratio(x0_, y0_, x0_, y0_); } // printf("MoveLabelBand label index %d (%g, %g)\n", index_, x0_, y0_); Allotment ax, ay; gr->allotment(index_, Dimension_X, ax); gr->allotment(index_, Dimension_Y, ay); a_.allot_x(ax); a_.allot_y(ay); } MoveLabelBand::~MoveLabelBand() { // printf("~MoveLabelBand\n"); Resource::unref(label_); Resource::unref(gl_); } void MoveLabelBand::press(Event&) { if (Oc::helpmode()) { Oc::help(MoveLabelBand_press_); return; } x0_ -= x_begin(); y0_ -= y_begin(); #if 0 && !defined(WIN32) cursor_ = canvas()->window()->cursor(); canvas()->window()->cursor(noCursor); #endif #if !defined(WIN32) && !MAC undraw(x(), y()); // so initial draw does not make it disappear #endif } void MoveLabelBand::release(Event&) { if (Oc::helpmode()) { return; } Graph* gr = (Graph*)XYView::current_pick_view()->scene(); Coord x1, y1, x2, y2; if (gl_->fixed()) { transformer().inverse_transform(x(), y(), x2, y2); transformer().inverse_transform(x_begin(), y_begin(), x1, y1); }else{ x2 = x(); y2 = y(); x1 = x_begin(); y1 = y_begin(); } gr->location(index_, x0_, y0_); if (gl_->fixed()) { x1 = x0_ + x2 - x1; y1 = y0_ + y2 - y1; }else{ XYView::current_pick_view()->view_ratio(x0_, y0_, x0_, y0_); XYView::current_pick_view()->ratio_view( x0_ + x2 - x1, y0_ + y2 - y1, x1, y1); } //printf("move to %g %g\n", x1, y1); gr->move(index_, x1, y1); #if 0 && !defined(WIN32) canvas()->window()->cursor(cursor_); #endif } void MoveLabelBand::draw(Coord x, Coord y) { if (Oc::helpmode()) { return; } Canvas* c = canvas(); //printf("MoveLabelBand::draw(%g, %g)\n", x, y); a_.x_allotment().origin(x + x0_); a_.y_allotment().origin(y + y0_); #if defined(WIN32) || MAC c->rect(a_.x_allotment().begin(), a_.y_allotment().begin(), a_.x_allotment().end(), a_.y_allotment().end(), Rubberband::color(), Rubberband::brush()); #else label_->draw(c, a_); #endif } #endif neuron-7.5/src/ivoc/hocmark.cpp000066400000000000000000000067351323325274500165730ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include "hocmark.h" #include "oc2iv.h" #include "rect.h" #include "idraw.h" /*static*/ class HocMarkP : public HocMark { public: HocMarkP(char, float, const Color*, const Brush*); virtual ~HocMarkP(); }; HocMark::HocMark(char style, float size, const Color* c, const Brush* b) : PolyGlyph(2) { style_ = style; size_ = size; c_ = c; Resource::ref(c); b_ = b; Resource::ref(b); } HocMark::~HocMark() { Resource::unref(c_); Resource::unref(b_); } void HocMark::request(Requisition& req) const { float size = 1; if (b_) { size = b_->width(); } Requirement rx(size_ + size, 0, 0, .5); Requirement ry(size_ + size, 0, 0, .5); req.require_x(rx); req.require_y(ry); } void HocMark::allocate(Canvas* c, const Allocation& a, Extension& e) { e.set(c, a); } void HocMark::draw(Canvas* c, const Allocation& a) const { IfIdraw(pict()); for (long i = count() - 1; i >= 0; --i) { component(i)->draw(c, a); } IfIdraw(end()); } HocMark* HocMark::instance(char style, float size, const Color* c, const Brush* b) { //printf("HocMark::instance\n"); HocMark* m = search(style, size, c, b); if (!m) { switch (style) { case 0: case '+': m = new HocMarkP(style, size, c, b); break; case 1: case 'o': m = new HocMark(style, size, c, b); m->append(new Circle(size/2, false, c, b)); break; case 2: case 's': m = new HocMark(style, size, c, b); m->append(new Rectangle(size, size, false, c, b)); break; case 3: case 't': m = new HocMark(style, size, c, b); m->append(new Triangle(size, false, c, b)); break; case 4: case 'O': m = new HocMark(style, size, c, b); m->append(new Circle(size/2, true, c, b)); break; case 5: case 'S': m = new HocMark(style, size, c, b); m->append(new Rectangle(size, size, true, c, b)); break; case 6: case 'T': m = new HocMark(style, size, c, b); m->append(new Triangle(size, true, c, b)); break; case 7: case '|': m = new HocMark(style, size, c, b); m->append(new Line(0, size, .5, .5, c, b)); break; case 8: case '-': m = new HocMark(style, size, c, b); m->append(new Line(size, 0, .5, .5, c, b)); break; default : hoc_execerror("implemented styles are + o t s O T S | -; waiting on x *", 0); } add(m); } return m; } void HocMark::add(HocMark* m) { if (!mark_list_) { mark_list_ = new PolyGlyph(); } mark_list_->append(m); most_recent_ = m; } HocMark* HocMark::search(char style, float size, const Color* c, const Brush* b) { HocMark* m; if (!most_recent_) { return NULL; } m = check(style, size, c, b); if (m) { return m; } for (long i = mark_list_->count() - 1; i >= 0; --i) { most_recent_ = (HocMark*)mark_list_->component(i); m = check(style, size, c, b); if (m) { return m; } } return NULL; } HocMark* HocMark::check(char style, float size, const Color* c, const Brush* b) { if ( most_recent_->style_ == style && most_recent_->size_ == size && most_recent_->c_ == c && most_recent_->b_ == b ) { return most_recent_; } return NULL; } HocMark* HocMark::most_recent_; PolyGlyph* HocMark::mark_list_; HocMarkP::HocMarkP(char style, float size, const Color* c, const Brush* b) : HocMark(style, size, c, b) { //printf("new mark +\n"); append(new Line(size, 0, .5, .5, c, b)); append(new Line(0, size, .5, .5, c, b)); } HocMarkP::~HocMarkP(){}; #endif neuron-7.5/src/ivoc/hocmark.h000077500000000000000000000017431323325274500162350ustar00rootroot00000000000000#ifndef hocmark_h #define hocmark_h #undef check #include class Color; class Brush; class HocMark : public PolyGlyph { public: virtual ~HocMark(); static HocMark* instance(char style, float size, const Color*, const Brush*); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; // virtual void print(Printer*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); // virtual void save(ostream&); protected: HocMark(char style, float size, const Color*, const Brush*); protected: float size_; const Color* c_; const Brush* b_; char style_; private: static void add(HocMark*); static HocMark* search(char style, float size, const Color*, const Brush*); static HocMark* check(char style, float size, const Color*, const Brush*); private: static PolyGlyph* mark_list_; static HocMark* most_recent_; }; #endif neuron-7.5/src/ivoc/htlist.cpp000066400000000000000000000053571323325274500164550ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* Based on Unidraw UList but UList changed to HTList (head tail list) for fast insertion, deletion, iteration */ /* * Copyright (c) 1990, 1991 Stanford University * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Stanford not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Stanford makes no representations about * the suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * HTList implementation. */ #include #include #include /*****************************************************************************/ HTList::HTList (void* p) { _next = this; _prev = this; _object = p; } HTList::~HTList () { HTList* next = _next; if (next != this && next != NULL) { Remove(this); delete next; } } void HTList::Append (HTList* e) { _prev->_next = e; e->_prev = _prev; e->_next = this; _prev = e; } void HTList::Prepend (HTList* e) { _next->_prev = e; e->_prev = this; e->_next = _next; _next = e; } void HTList::Remove (HTList* e) { e->_prev->_next = e->_next; e->_next->_prev = e->_prev; e->_prev = e->_next = NULL; } void HTList::Remove() { if (_prev) { _prev->_next = _next; } if (_next) { _next->_prev = _prev; } _prev = _next = NULL; } void HTList::RemoveAll() { while(!IsEmpty()) { Remove(First()); } } void HTList::Delete (void* p) { register HTList* e; e = Find(p); if (e != NULL) { Remove(e); delete e; } } HTList* HTList::Find (void* p) { register HTList* e; for (e = _next; e != this; e = e->_next) { if (e->_object == p) { return e; } } return NULL; } HTList* HTList::operator[] (int count) { HTList* pos = First(); int i; for (i = 1; i < count && pos != End(); ++i) { pos = pos->Next(); } if (i == count) { return pos; } return NULL; } neuron-7.5/src/ivoc/htlist.h000066400000000000000000000043111323325274500161070ustar00rootroot00000000000000/* from Unidraw but UList changed to HTList (head tail list) for fast insertion, deletion, iteration */ /* * Copyright (c) 1990, 1991 Stanford University * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Stanford not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Stanford makes no representations about * the suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * UList - list object. */ #ifndef htlist_h #define htlist_h class HTList { public: HTList(void* = NULL); virtual ~HTList(); bool IsEmpty(); void Append(HTList*); void Prepend(HTList*); void Remove(HTList*); void Remove(); void RemoveAll(); void Delete(void*); HTList* Find(void*); HTList* First(); HTList* Last(); HTList* End(); HTList* Next(); HTList* Prev(); void* vptr(); void* operator()(); HTList* operator[](int count); protected: void* _object; HTList* _next; HTList* _prev; }; inline bool HTList::IsEmpty () { return _next == this; } inline HTList* HTList::First () { return _next; } inline HTList* HTList::Last () { return _prev; } inline HTList* HTList::End () { return this; } inline HTList* HTList::Next () { return _next; } inline HTList* HTList::Prev () { return _prev; } inline void* HTList::operator() () { return _object; } inline void* HTList::vptr() { return _object; } #endif neuron-7.5/src/ivoc/idraw.cpp000066400000000000000000000301411323325274500162410ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include #include #include "scenevie.h" #include "mymath.h" #include "idraw.h" #define out *OcIdraw::idraw_stream extern "C" { extern const char* expand_env_var(const char*); } bool OcIdraw::closed_ = false; bool OcIdraw::curved_ = false; int OcIdraw::ipath_ = 0; int OcIdraw::capacity_ = 0; Coord* OcIdraw::xpath_ = 0; Coord* OcIdraw::ypath_ = 0; void OcIdraw::prologue() { filebuf ibuf; Style* s = Session::instance()->style(); CopyString name; if (!s->find_attribute("pwm_idraw_prologue", name)) { printf("can't find the \"pwm_idraw_prologue\" attribute\n"); printf("will have to prepend the prologue by hand before reading with idraw.\n"); return; } name = expand_env_var(name.string()); #if defined(WIN32) || defined(MAC) if(!ibuf.open(name.string(), ios::in)) { #else if(!ibuf.open(name.string(), IOS_IN)) { #endif printf("can't open the idraw prologue in %s\n", name.string()); return; } out << &ibuf << endl; ibuf.close(); if (!xpath_) { capacity_ = 10; xpath_ = new Coord[capacity_]; ypath_ = new Coord[capacity_]; } } void OcIdraw::epilog() { out << "\ End %I eop\n\ showpage\n\n\ %%Trailer\n\n\ end\ " << endl; } static void transformer(const Transformer& t) { float a00, a01, a10, a11, a20, a21; t.matrix(a00, a01, a10, a11, a20, a21); char buf[200]; sprintf(buf, "[ %g %g %g %g %g %g ] concat", a00, a01, a10, a11, a20, a21); out << buf << endl; } static char* hidepar(const char* s) { static char buf[256]; const char* ps; char* pbuf; for (ps = s, pbuf = buf; *ps; ) { if (*ps == '(' || *ps == ')') { *pbuf++ = '\\'; } *pbuf++ = *ps++; } *pbuf = '\0'; return buf; } static void rgbcolor(const Color* c, ColorIntensity& r, ColorIntensity& g, ColorIntensity& b) { // always use black for default_foreground. if (c == Scene::default_foreground()) { r = 0; g = 0; b = 0; }else{ c->intensities(r,g,b); } } static void common_pict() { out << "\n\ Begin %I Pict\n\ %I b u\n\ %I cfg u\n\ %I cbg u\n\ %I f u\n\ %I p u\ " << endl; } void OcIdraw::pict() { common_pict(); out << "%I t u" << endl; } void OcIdraw::pict(const Transformer& t) { common_pict(); out << "%I t" << endl; transformer(t); } void OcIdraw::end() { out << "End %I eop" << endl; } void OcIdraw::text(Canvas*, const char* s, const Transformer& t, const Font* font, const Color* color) { #if 1 // ZFM tried to allow colors and fonts, but doesn't seem to work // 3/12/95 char buf[100]; ColorIntensity r=0,g=0,b=0; if (color) { rgbcolor(color, r,g,b); } // idraw needs hex sprintf(buf, "%%I cfg %x%x%x\n%f %f %f SetCFg\n", int(r*256),int(g*256),int(b*256), r, g, b); out << "Begin %I Text\n"; out << buf; if (font) { out << "%I f " << font->encoding() << "\n"; out << font->name() << font->size() << "SetF\n"; }else{ out << "\ %I f -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*\n\ Helvetica 12 SetF\n\ "; }; out << "%I t" << endl; #else out << "\n\ Begin %I Text\n\ %I cfg Black\n\ 0 0 0 SetCFg\n\ %I f -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*\n\ Helvetica 12 SetF\n\ %I t\ " << endl; #endif Glyph* l = WidgetKit::instance()->label(s); Requisition req; l->request(req); l->unref(); Requirement& ry = req.y_requirement(); float y = (1. - ry.alignment())*ry.natural(); float x = 0; Transformer tr(t); tr.translate(x, y); transformer(tr); out << "%I\n[" << endl; out << "(" << hidepar(s) << ")" << endl; out << "] Text\nEnd" << endl; } void OcIdraw::mline(Canvas*, int count, const Coord* x, const Coord* y, const Color* color, const Brush* b) { #define cnt_group 200 int ixd[cnt_group], iyd[cnt_group]; int i, size; float xmax = x[0], xmin = x[0], ymax = y[0], ymin = y[0]; #if 0 for (i = 1; i < count; ++i) { if (x[i] > xmax) xmax = x[i]; if (x[i] < xmin) xmin = x[i]; if (y[i] > ymax) ymax = y[i]; if (y[i] < ymin) ymin = y[i]; } #endif XYView* v = XYView::current_draw_view(); xmax = v->right(); xmin = v->left(); ymax = v->top(); ymin = v->bottom(); float scalex, scaley; if (xmax != xmin) { scalex = 10000/(xmax - xmin); }else{ scalex = 1; } if (ymax != ymin) { scaley = 10000/(ymax - ymin); }else{ scaley = 1; } Transformer t; t.translate(-xmin, -ymin); t.scale(scalex, scaley); t.invert(); if (count > cnt_group) { pict(); } for (i = 0; i < count;) { int ixold, iyold; ixold = iyold = -20000; for (; i < count; ++i) { if (MyMath::inside(x[i], y[i], xmin, ymin, xmax, ymax)) { break; } } for (size = 0; i < count;) { float x1, y1; int ix, iy; t.inverse_transform(x[i], y[i], x1, y1); if (x1 > 20000.) x1 = 20000.; if (x1 < -20000.) x1 = -20000.; if (y1 > 20000.) y1 = 20000.; if (y1 < -20000.) y1 = -20000.; ix = int(x1); iy = int(y1); if (ix != ixold || iy != iyold) { ixd[size] = ix; iyd[size] = iy; ++size; } if (size >= cnt_group) { break; } ixold = ix; iyold = iy; ++i; } if (size < 2) { break; } #if 1 out << "\nBegin %I MLine\n"; brush(b); ifill(color, false); out << "%I t" << endl; #else out << "\n\ Begin %I MLine\n\ %I b 65535\n\ 0 0 0 [] 0 SetB\n\ %I cfg Black\n\ 0 0 0 SetCFg\n\ %I cbg White\n\ 1 1 1 SetCBg\n\ none SetP %I p n\n\ %I t\ " << endl; #endif transformer(t); out << "%I " << size << endl; for (int j=0; j < size; ++j ) { out << ixd[j] << " " << iyd[j]<< endl; } out << size << " MLine\n%I 1\nEnd" << endl; } if (count > cnt_group) { end(); } } void OcIdraw::rect(Canvas* c, Coord x1, Coord y1, Coord x2, Coord y2, const Color* color, const Brush* b, bool f) { Coord x[4], y[4]; x[0] = x1; y[0] = y1; x[1] = x2; y[1] = y1; x[2] = x2; y[2] = y2; x[3] = x1; y[3] = y2; polygon(c, 4, x, y, color, b, f); } void OcIdraw::polygon(Canvas*, int count, const Coord* x, const Coord* y, const Color* color, const Brush* b, bool f) { char buf[100]; out << "\nBegin %I Poly\n"; poly(count, x, y, color, b, f); sprintf(buf, "%d Poly\nEnd", count); out << buf << endl; } void OcIdraw::bspl(Canvas*, int count, const Coord* x, const Coord* y, const Color* color, const Brush* b) { char buf[100]; out << "\nBegin %I BSpl\n"; poly(count, x, y, color, b, false); sprintf(buf, "%d BSpl\n%%I 1\nEnd", count); out << buf << endl; } void OcIdraw::cbspl(Canvas*, int count, const Coord* x, const Coord* y, const Color* color, const Brush* b, bool f) { char buf[100]; out << "\nBegin %I CBSpl\n"; poly(count, x, y, color, b, f); sprintf(buf, "%d CBSpl\nEnd", count); out << buf << endl; } void OcIdraw::poly(int count, const Coord* x, const Coord* y, const Color* color, const Brush* b, bool f) { brush(b); ifill(color, f); out << "%I t" << endl; float x1, x2, y1, y2; x1 = MyMath::min(count, x); x2 = MyMath::max(count, x); y1 = MyMath::min(count, y); y2 = MyMath::max(count, y); float scalex, scaley; if (Math::equal(x1, x2, float(.0001))) { scalex = 1; }else{ scalex = (x2 - x1)/10000.; } if (Math::equal(y1, y2, float(.0001))) { scaley = 1; }else{ scaley = (y2 - y1)/10000.; } Transformer t; t.scale(scalex, scaley); t.translate(x1, y1); transformer(t); out << "%I " << count << endl; char buf[100]; for (int i=0; i < count; ++i) { float a, b; t.inverse_transform(x[i], y[i], a, b); sprintf(buf, "%d %d\n", int(a), int(b)); out << buf; } } void OcIdraw::line(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2, const Color* color, const Brush* b) { #if 1 out << "\nBegin %I Line\n"; brush(b); ifill(color, false); out << "%I t" << endl; #else out << "\n\ Begin %I Line\n\ %I b 65535\n\ 0 0 0 [] 0 SetB\n\ %I cfg Black\n\ 0 0 0 SetCFg\n\ %I cbg White\n\ 1 1 1 SetCBg\n\ none SetP %I p n\n\ %I t\ " << endl; #endif float scalex, scaley; if (Math::equal(x1, x2, float(.0001))) { scalex = 1; }else{ scalex = (x2 - x1)/10000; } if (Math::equal(y1, y2, float(.0001))) { scaley = 1; }else{ scaley = (y2 - y1)/10000; } Transformer t; t.scale(scalex, scaley); t.translate(x1, y1); transformer(t); out << "%I"<< endl; float a, bb, x, y; t.inverse_transform(x1, y1, a, bb); t.inverse_transform(x2, y2, x, y); out << int(a) << " " << int(bb) << " " << int(x) << " " << int(y); out << " Line\n%I 1\nEnd" << endl; } void OcIdraw::ellipse(Canvas*, Coord x1, Coord y1, Coord width, Coord height, const Color* color, const Brush* b, bool f) { out << "\nBegin %I Elli\n"; brush(b); ifill(color, f); out << "%I t" << endl; float y = y1; float x = x1; Transformer tr; tr.scale(.01,.01); tr.translate(x, y); transformer(tr); char buf[100]; sprintf(buf, "%%I\n0 0 %d %d Elli\nEnd", int(width*100), int(height*100)); out << buf << endl; } void OcIdraw::brush(const Brush* b) { char buf[100]; Coord w = b?b->width():0; int i, p; p = 0; #if !MAC if(b) for (i=0; i < b->dash_count(); ++i) { int nbit = b->dash_list(i); for (int j = 0; j < nbit; ++j) { p = ((p << 1) | ((i+1)%2)); } } #endif sprintf(buf, "%%I b %d\n%d 0 0 [", p, int(w)); out << buf; #if !MAC if (b) for (i=0; i < b->dash_count(); ++i) { out << b->dash_list(i) << " "; } #endif sprintf(buf, "] 0 SetB"); out << buf << endl; } void OcIdraw::ifill(const Color* color, bool f) { char buf[100]; ColorIntensity r=0,g=0,b=0; if (color) { rgbcolor(color,r,g,b); } // sprintf(buf, "%%I cfg %s\n%d %d %d SetCFg", "Black", 0,0,0); // idraw needs hex sprintf(buf, "%%I cfg %x%x%x\n%f %f %f SetCFg", int(r*256),int(g*256),int(b*256),r,g,b); out << buf << endl; if (f) { // sprintf(buf, "%%I cbg %s\n%d %d %d SetCBg\n%%I p\n1 SetP", // "Black", 0,0,0); sprintf(buf, "%%I cbg %x%x%x\n%f %f %f SetCBg\n%%I p\n1 SetP", int(r*256),int(g*256),int(b*256), r,g,b); }else{ sprintf(buf, "%%I cbg %s\n%d %d %d SetCBg\nnone SetP %%I p n", "White", 1,1,1); } out << buf << endl; } // only implemented for continuous lines, polygons, and curves. // i.e. only one move_to at beginning and cannot mix line_to and curve_to void OcIdraw::new_path() { curved_ = false; closed_ = false; ipath_ = 0; } void OcIdraw::move_to(Coord x, Coord y) { add(x, y); } void OcIdraw::line_to(Coord x, Coord y) { add(x, y); } void OcIdraw::curve_to(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2) { curved_ = true; #if 0 add(x1, y1); add(x2, y2); add(x, y); #else //http://www.timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm rcurve(0, x,y, x1,y1, x2,y2); // first arg is recursion level #endif } void OcIdraw::rcurve(int r, Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2) { if (r < 2) { //split into two bezier Coord m01x = (xpath_[ipath_-1] + x1)/2; Coord m01y = (ypath_[ipath_-1] + y1)/2; Coord m12x = (x1 + x2)/2; Coord m12y = (y1 + y2)/2; Coord m23x = (x2 + x)/2; Coord m23y = (y2 + y)/2; Coord ax = (m01x + m12x)/2; Coord ay = (m01y + m12y)/2; Coord bx = (m12x + m23x)/2; Coord by = (m12y + m23y)/2; Coord cx = (ax + bx)/2; Coord cy = (ay + by)/2; rcurve(r+1, cx,cy, m01x,m01y, ax,ay); rcurve(r+1, x,y, bx,by, m23x,m23y); }else{ add((x1 + x2)/2, (y1 + y2)/2); add(x, y); } } void OcIdraw::close_path() { closed_ = true; if (curved_) { curve_to(xpath_[0], ypath_[0], xpath_[ipath_-1], ypath_[ipath_-1], xpath_[0], ypath_[0]); } } void OcIdraw::stroke(Canvas* can, const Color* c, const Brush* b) { if (closed_) { if (curved_) { cbspl(can, ipath_, xpath_, ypath_, c, b, false); }else{ polygon(can, ipath_, xpath_, ypath_, c, b, false); } }else{ if (curved_) { bspl(can, ipath_, xpath_, ypath_, c, b); }else{ mline(can, ipath_, xpath_, ypath_, c, b); } } } void OcIdraw::fill(Canvas* can, const Color* c) { if (curved_) { cbspl(can, ipath_, xpath_, ypath_, c, NULL, true); }else{ polygon(can, ipath_, xpath_, ypath_, c, NULL, true); } } void OcIdraw::add(Coord a, Coord b) { if (ipath_ >= capacity_) { capacity_ *= 2; Coord* x = new Coord[capacity_]; Coord* y = new Coord[capacity_]; for (int i=0; i < ipath_; ++i) { x[i] = xpath_[i]; y[i] = ypath_[i]; } delete[] xpath_; delete[] ypath_; xpath_ = x; ypath_ = y; } xpath_[ipath_] = a; ypath_[ipath_] = b; ++ipath_; } #endif neuron-7.5/src/ivoc/idraw.h000066400000000000000000000042661323325274500157170ustar00rootroot00000000000000#ifndef ocidraw_h #define ocidraw_h /* Hooks for special processing make use of the request() method in Glyphs. */ #include class Canvas; class Transformer; class Font; class Color; class Brush; class OcIdraw { public: static void prologue(); static void epilog(); static void pict(); static void pict(const Transformer&); static void end(); static void text(Canvas*, const char*, const Transformer&, const Font* f=NULL, const Color* c=NULL); static void mline(Canvas*, int count, const Coord* x, const Coord* y, const Color* c=NULL, const Brush* b=NULL); static void polygon(Canvas*, int count, const Coord* x, const Coord* y, const Color* c=NULL, const Brush* b=NULL, bool fill = false); static void rect(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2, const Color* c=NULL, const Brush* b=NULL, bool fill = false); static void line(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2, const Color* c=NULL, const Brush* b=NULL); static void ellipse(Canvas*, Coord x1, Coord y1, Coord width, Coord height, const Color* c=NULL, const Brush* b= NULL, bool fill = false); static void new_path(); static void move_to(Coord x, Coord y); static void line_to(Coord x, Coord y); static void curve_to(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2); static void close_path(); static void stroke(Canvas*, const Color*, const Brush*); static void fill(Canvas*, const Color*); static void bspl(Canvas*, int count, const Coord* x, const Coord* y, const Color* c=NULL, const Brush* b=NULL); static void cbspl(Canvas*, int count, const Coord* x, const Coord* y, const Color* c=NULL, const Brush* b=NULL, bool fill = false); public: static ostream* idraw_stream; private: static void rcurve(int level, Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2); static void poly(int count, const Coord* x, const Coord* y, const Color* c=NULL, const Brush* b=NULL, bool fill = false); static void add(Coord, Coord); static void brush(const Brush*); static void ifill(const Color*, bool); static bool closed_; static bool curved_; static Coord *xpath_, *ypath_; static int ipath_, capacity_; }; #define IfIdraw(arg) if (OcIdraw::idraw_stream) {OcIdraw::arg;} #endif neuron-7.5/src/ivoc/ivoc.cpp000066400000000000000000000231621323325274500161000ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include "oc2iv.h" #include "ocfunc.h" #if HAVE_IV #include "utility.h" #include "ivoc.h" #endif #include "bimap.hpp" #if USE_PTHREAD static MUTDEC #endif typedef void (*PF)(void*, int); declareList(FList, PF); implementList(FList, PF); static FList* f_list; static nrn::tool::bimap* pvob; static nrn::tool::bimap* pdob; // fast insert, find, and remove of (double*, Observer*) using either as // a key. Use pair of multimap since there can be many observers of the // same double. And perhaps one Observer is watching several double*. Also // the double* being watched is removed when the array (pd*, size) it is // a part of is freed. So the upper_bound property is needed int nrn_err_dialog_active_; extern "C" { void* (*nrnpy_save_thread)(); void (*nrnpy_restore_thread)(void*); void nrn_notify_freed(PF pf) { if (!f_list) { f_list = new FList; } f_list->append(pf); // printf("appended to f_list in ivoc.c\n"); } void nrn_notify_when_void_freed(void* p, Observer* ob) { MUTLOCK if (!pvob) { pvob = new nrn::tool::bimap(); } pvob->insert(p, ob); MUTUNLOCK } void nrn_notify_when_double_freed(double* p, Observer* ob) { MUTLOCK if (!pdob) { pdob = new nrn::tool::bimap(); } pdob->insert(p, ob); MUTUNLOCK } void nrn_notify_pointer_disconnect(Observer* ob) { MUTLOCK if (pvob) { pvob->obremove(ob); } if (pdob) { pdob->obremove(ob); } MUTUNLOCK } void notify_pointer_freed(void* pt) { if (pvob) { MUTLOCK void* pv; Observer* ob; while(pvob->find(pt, pv, ob)) { ob->update(NULL); pvob->remove(pv, ob); } MUTUNLOCK } } void notify_freed(void* p) { if (f_list) { long i, n=f_list->count(); for (i=0; i < n; ++i) { (*f_list->item(i))(p, 1); } } notify_pointer_freed(p); } void notify_freed_val_array(double* p, size_t size) { if (f_list) { long i, n=f_list->count(); for (i=0; i < n; ++i) { (*f_list->item(i))((void*)p, size); } } if (pdob) { double* pp; Observer* ob; while(pdob->find(p, size, pp, ob)) { //printf("notify_freed_val_array %d %ld\n", size, j); ob->update(NULL); pdob->remove(pp, ob); } } } char* cxx_char_alloc(size_t sz) { char* cp = new char[sz]; return cp; } } // end extern "C" #ifndef MINGW // actual implementation in ivocwin.cpp extern "C" {void nrniv_bind_thread(void);} void nrniv_bind_thread() { hoc_pushx(1.); hoc_ret(); } #endif void nrn_err_dialog(const char* mes) { #if HAVE_IV IFGUI if (nrn_err_dialog_active_ && !Session::instance()->done()) { char m[1024]; sprintf(m, "%s (See terminal window)", mes); continue_dialog(m); } ENDGUI #endif } #if HAVE_IV // to end of file #if defined(MINGW) #undef CYGWIN #endif #include #include #include #include #include "xmenu.h" /* * Interface between oc and interviews. * * The normal command driven oc can be simultaneously event driven if * instead of blocking on a terminal read, run_til_stdin() is called. * This runs the interviews event loop until something is typed in the * window from which oc was run. */ extern "C" { extern void hoc_main1_init(const char* pname, const char** env); extern int hoc_oc(const char*); extern int hoc_interviews; extern Symbol* hoc_parse_expr(const char*, Symlist**); extern double hoc_run_expr(Symbol*); extern int hoc_execerror_messages; extern void hoc_ret(); extern void hoc_pushx(double); extern FILE* hoc_fin; extern void ivoc_cleanup(); extern void nrn_shape_update(); extern int bbs_poll_; extern void bbs_handle(); int run_til_stdin(); void single_event_run(); void hoc_notify_iv(); extern int hoc_print_first_instance; void ivoc_style(); } // because NEURON can no longer maintain its own copy of dialogs.cpp // we communicate with the InterViews version through a callback. extern "C" { extern bool (*IVDialog_setAcceptInput)(bool); bool setAcceptInputCallback(bool); bool setAcceptInputCallback(bool b) { Oc oc; return oc.setAcceptInput(b); } } void ivoc_style() { IFGUI if (Session::instance()) { Style* s = Session::instance()->style(); s->remove_attribute(gargstr(1)); s->attribute(gargstr(1), gargstr(2), -5); } #if 0 String s; if (WidgetKit::instance()->style()->find_attribute(gargstr(1)+1, s)) { printf("ivoc_style %s: %s\n", gargstr(1), s.string()); }else{ printf("couldn't find %s\n", gargstr(1)); } #endif ENDGUI hoc_ret(); hoc_pushx(1.); } #if !defined(WIN32) && !defined(MAC) && !defined(CYGWIN) && !defined(carbon) /*static*/ class ReqErr1 : public ReqErr { public: ReqErr1(); virtual void Error(); virtual int count() { return count_;} private: int count_; int r_; }; ReqErr1::ReqErr1() { count_ = 0; r_ = 0; } void ReqErr1::Error() { if (!count_ || code != r_) { if (!r_) { r_ = code; } fprintf(stderr, "X Error of failed request: %s\n", message); if (r_ == code) { fprintf(stderr, "Further messages for error code %d will not be shown\n", r_); } } ++count_; } static ReqErr1* reqerr1; #endif #if MAC static HandleStdin* hsd_; #endif #if defined(WIN32) && !defined(CYGWIN) static HandleStdin* hsd_; extern "C" { void winio_key_press() { hsd_->inputReady(1); } } #endif Oc::Oc() { MUTLOCK ++refcnt_; MUTUNLOCK } bool Oc::helpmode_; Oc::Oc(Session *s, const char* pname, const char** env) { if (session_) return; refcnt_++; session_ = s; IVDialog_setAcceptInput = setAcceptInputCallback; notify_change_ = new Observable(); if (s) { helpmode_ = false; #if (defined(WIN32) && !defined(CYGWIN)) || defined(MAC) hsd_ = handleStdin_ = new HandleStdin; #else #if !defined(CYGWIN) && !defined(carbon) reqerr1 = new ReqErr1; reqerr1->Install(); #endif handleStdin_ = new HandleStdin; Dispatcher::instance().link(0, Dispatcher::ReadMask, handleStdin_); Dispatcher::instance().link(0, Dispatcher::ExceptMask, handleStdin_); #endif hoc_interviews = 1; #if MAC hoc_print_first_instance = 0; #endif String str; if (session_->style()->find_attribute("first_instance_message", str)) { if (str == "on") { hoc_print_first_instance = 1; }else{ hoc_print_first_instance = 0; } } } MUTCONSTRUCT(1) hoc_main1_init(pname, env); } Oc::~Oc() { MUTLOCK if (--refcnt_ == 0) { #if !defined(WIN32) && !defined(MAC) && !defined(CYGWIN) && !defined(carbon) if (reqerr1 && reqerr1->count()) { fprintf(stderr, "total X Errors: %d\n", reqerr1->count()); } #endif } MUTUNLOCK } Session* Oc::getSession() { return session_;} int Oc::run(int argc, const char** argv) { return hoc_main1(argc, argv, 0); } int Oc::run(const char* buf, bool show_err_mes) { hoc_execerror_messages = show_err_mes; return hoc_oc(buf); } Symbol* Oc::parseExpr(const char* expr, Symlist** ps) { return hoc_parse_expr(expr, ps); } double Oc::runExpr(Symbol* sym) { return hoc_run_expr(sym); } const char* Oc::name(Symbol* sym) { return sym->name; } bool Oc::setAcceptInput(bool b) { bool old = handleStdin_->acceptInput_; handleStdin_->acceptInput_ = b; return old; } void Oc::notify_freed(PF pf) { nrn_notify_freed(pf); } void Oc::notify_when_freed(void* p, Observer* ob) { nrn_notify_when_void_freed(p, ob); } void Oc::notify_when_freed(double* p, Observer* ob) { nrn_notify_when_double_freed(p, ob); } void Oc::notify_pointer_disconnect(Observer* ob) { nrn_notify_pointer_disconnect(ob); } HandleStdin::HandleStdin() { stdinSeen_ = false; acceptInput_ = true; } int HandleStdin::inputReady(int fd) { stdinSeen_ = 1; if(fd){;} if (acceptInput_) { Oc::getSession()->quit(); } return 0; } int HandleStdin::exceptionRaised(int fd) { hoc_interviews = 0; if(fd){;} stdinSeen_ = 1; Oc::getSession()->quit(); return 0; } void ivoc_cleanup() { } int run_til_stdin() { Session* session = Oc::getSession(); #if defined(WIN32) || MAC Oc oc; oc.notify(); #endif #if !defined(WIN32) || defined(CYGWIN) Oc::setStdinSeen(false); #endif session->run(); WinDismiss::dismiss_defer(); // in case window was dismissed #if MAC && !defined(carbon) extern Boolean IVOCGoodLine; if(IVOCGoodLine){ return 1; } else { return 0; } #endif #if defined(WIN32) && !defined(CYGWIN) return 0; #else return Oc::getStdinSeen(); //MAC should not reach this point #endif } void single_event_run() { Resource::flush(); Session* session = Oc::getSession(); Event e; // actually run till no more events Oc::setAcceptInput(false); #if MAC extern bool read_if_pending(Event&); while ( !session->done() && read_if_pending(e)) { e.handle(); } #else bool dsav = session->done(); session->unquit(); while (session->pending() && !session->done()) { session->read(e); e.handle(); } if (dsav) { session->quit(); } #endif Oc::setAcceptInput(true);; HocPanel::keep_updated(); #if MAC Session::instance()->screen_update(); #endif WinDismiss::dismiss_defer(); // in case window was dismissed } #ifdef MINGW extern "C" { extern void nrniv_bind_call(void); } #endif void hoc_notify_iv() { IFGUI #ifdef MINGW if (!nrn_is_gui_thread()) { hoc_pushx(0.); hoc_ret(); return; } nrniv_bind_call(); #endif Resource::flush(); Oc oc; oc.notify(); single_event_run(); ENDGUI hoc_pushx(1.); hoc_ret(); } Observable* Oc::notify_change_; void Oc::notify() { // merely a possible change nrn_shape_update(); notifyHocValue(); notify_change_->notify(); if (bbs_poll_ > 0) bbs_handle(); WinDismiss::dismiss_defer(); // in case window was dismissed } void Oc::notify_attach(Observer* o) { notify_change_->attach(o); } void Oc::notify_detach(Observer* o) { notify_change_->detach(o); } #endif neuron-7.5/src/ivoc/ivoc.h000066400000000000000000000040061323325274500155410ustar00rootroot00000000000000#ifndef oc_h #define oc_h #include #include #include #include #include #include extern int nrn_err_dialog_active_; #if defined(MINGW) extern "C" { extern bool nrn_is_gui_thread(); extern void nrn_gui_exec(void (*)(void*), void*); } #endif class Observer; class Observable; class Cursor; struct Object; class HandleStdin: public IOHandler { public: HandleStdin(); virtual int inputReady(int fd); virtual int exceptionRaised(int fd); bool stdinSeen_; bool acceptInput_; }; struct Symbol; struct Symlist; class Oc { public: Oc(); Oc(Session*, const char* pname = NULL, const char** env = NULL); virtual ~Oc(); int run(int argc, const char** argv); int run(const char *, bool show_err_mes = true); Symbol* parseExpr(const char *, Symlist** = NULL); double runExpr(Symbol*); static bool valid_expr(Symbol*); static bool valid_stmt(const char*, Object* ob = NULL); const char* name(Symbol*); void notifyHocValue(); // loops over HocValueBS buttonstates. void notify(); // called on doNotify from oc void notify_attach(Observer*); // add to notify list void notify_detach(Observer*); void notify_freed(void (*pf)(void*, int)); // register a callback func void notify_when_freed(void* p, Observer*); void notify_when_freed(double* p, Observer*); void notify_pointer_disconnect(Observer*); static Session* getSession(); static int getStdinSeen() {return handleStdin_->stdinSeen_;} static void setStdinSeen(bool i) {handleStdin_->stdinSeen_ = i;} static bool setAcceptInput(bool); static bool helpmode() {return helpmode_;} static void helpmode(bool); static void helpmode(Window*); static void help(const char*); static ostream* save_stream; static void cleanup(); private: static int refcnt_; static Session* session_; static HandleStdin* handleStdin_; static bool helpmode_; static Cursor* help_cursor(); static Cursor* help_cursor_; static Observable* notify_change_; }; #endif neuron-7.5/src/ivoc/ivocconf.h000077500000000000000000000001431323325274500164100ustar00rootroot00000000000000#ifndef ivoc_config_h #define ivoc_config_h #if __GNUC__ #define NO_MULT_INHERIT 1 #endif #endif neuron-7.5/src/ivoc/ivocmac.cpp000066400000000000000000000144541323325274500165650ustar00rootroot00000000000000#include <../../nrnconf.h> #if defined(carbon) #include #else #include #endif #include #include "apwindow.h" #include "ivoc.h" #include "rubband.h" #include "symdir.h" #include "oc2iv.h" #include "graph.h" #include #include #include #include #include typedef void (*NrnBBSCallback)(const char*); extern "C"{ #if !defined(carbon) char * mktemp(char *){ return NULL; } #endif bool nrnbbs_connect(){return false;} void nrnbbs_disconnect(){} bool nrnbbs_connected(){return false;} void nrnbbs_post(const char*){} void nrnbbs_post_int(const char*, int){} void nrnbbs_post_string(const char*, const char*){} bool nrnbbs_take(const char*){return false;} bool nrnbbs_take_int(const char*, int*){return false;} bool nrnbbs_take_string(const char*, char*){return false;} bool nrnbbs_look(const char*){return false;} void nrnbbs_exec(const char*){} void nrnbbs_notify(const char*, NrnBBSCallback){} void nrnbbs_wait(bool* pflag = (bool*)0){} #if !carbon bool is_mac_dll(FSSpec*); bool mac_open_dll(const char*, FSSpec*); #endif } #if !carbon bool is_mac_dll(FSSpec* fs) { FInfo finfo; FSpGetFInfo(fs, &finfo); return finfo.fdType == 'shlb'; } extern "C" { extern Symlist *hoc_symlist, *hoc_built_in_symlist; extern OSErr __path2fss(const char* name, FSSpec*); extern void hoc_nrn_load_dll(); } static long fsspec2id(FSSpec* fs) { CInfoPBRec ci; Str255 name; int i; for(i=0; i < 64; ++i) { name[i]= fs->name[i];} ci.hFileInfo.ioCompletion = 0; ci.hFileInfo.ioNamePtr = name; ci.hFileInfo.ioVRefNum = fs->vRefNum; ci.hFileInfo.ioDirID = fs->parID; ci.hFileInfo.ioFDirIndex = 0; OSErr err = PBGetCatInfo(&ci, false); return ci.hFileInfo.ioDirID; } static int ndll; static long dllid[10]; bool mac_open_dll(const char* name, FSSpec* fs) { CFragConnectionID id; Ptr mainaddr; Str255 sname; int j; long fid = fsspec2id(fs); for (j=0; j < ndll; ++j) { if (dllid[j] == fid) { printf("%s DLL already loaded\n", name); return false; } } dllid[ndll] = fid; ndll = (ndll < 10) ? ndll+1 : 10; printf("Loading DLL %s\n", name); #if 1 OSErr myErr = GetDiskFragment(fs, 0, kCFragGoesToEOF, 0, kLoadCFrag, &id, &mainaddr, sname); if (myErr) { sname[sname[0]+1]='\0'; printf ("dll load error %d\n%s\n", myErr, sname+1); return false; } // printf("successfully loaded %s\n", name); // printf("mainaddr=%p\n", mainaddr); mainaddr = NULL; long cnt; myErr = CountSymbols(id, &cnt); // printf("symbols exported = %d\n", cnt); for (long i=0; i < cnt; ++i) { Ptr symaddr; CFragSymbolClass symclass; myErr = GetIndSymbol(id, i, sname, &symaddr, &symclass); sname[sname[0]+1]='\0'; if (strcmp((char*)(sname+1), "main") == 0) { mainaddr = symaddr; } // printf("symbol %d name %s\n", i, sname+1); } // printf("mainaddr=%p\n", mainaddr); #if 1 if (mainaddr) { Symlist* sav = hoc_symlist; hoc_symlist = hoc_built_in_symlist; hoc_built_in_symlist = NULL; (*(Pfri)mainaddr)(); hoc_built_in_symlist = hoc_symlist; hoc_symlist = sav; return true; } #endif #endif return false; } bool mac_load_dll(const char* name) { FSSpec fss; if ((__path2fss(name, &fss) != fnfErr) && is_mac_dll(&fss)) { return mac_open_dll(name, &fss); } return false; } void hoc_nrn_load_dll() { int b = mac_load_dll(expand_env_var(gargstr(1))); ret((double)b); } #endif //!carbon void pwmimpl_redraw(Window* w) { w->rep()->MACpaint(); } void ivoc_bring_to_top(Window* w) { BringToFront(w->rep()->macWindow()); } //--------------------------------------------------------- void Oc::cleanup() { if (help_cursor_) { delete help_cursor_; } } void PrintableWindow::hide() { unmap(); } void PrintableWindow::xmove(int x, int y) { #if carbon MoveWindowStructure(Window::rep()->macWindow(), x, y); #else WindowPtr theWin = Window::rep()->macWindow(); MoveWindow(theWin, (x + 1), (y + 17), true); #endif } int PrintableWindow::xleft() const { WindowRep& w = *Window::rep(); if (w.bound()) { #if carbon Rect r; GetWindowBounds(w.macWindow(), kWindowStructureRgn, &r); return r.left; #else GrafPtr oldPort; GetPort(&oldPort); WindowPtr theWin = w.macWindow(); w.setport(); Point upperLeft; upperLeft.h = theWin->portRect.left; upperLeft.v = theWin->portRect.top; LocalToGlobal(&upperLeft); SetPort(oldPort); return upperLeft.h - 1; #endif }else{ return 0; } } int PrintableWindow::xtop() const { WindowRep& w = *Window::rep(); if (w.bound()) { #if carbon Rect r; GetWindowBounds(w.macWindow(), kWindowStructureRgn, &r); return r.top; #else GrafPtr oldPort; GetPort(&oldPort); WindowPtr theWin = w.macWindow(); w.setport(); Point upperLeft; upperLeft.h = theWin->portRect.left; upperLeft.v = theWin->portRect.top; LocalToGlobal(&upperLeft); SetPort(oldPort); return upperLeft.v - 17; #endif }else{ return 0; } } void PrintableWindow::xplace(int x, int y) { WindowRep& wr = *Window::rep(); //printf("xplace %d %d %d\n", x, y,wr.bound()); if (wr.bound()) { xmove(x, y); }else{ xplace_ = true; #if carbon xleft_ = x; xtop_ = y; #else xleft_ = x + 1; xtop_ = y + 17; #endif } } void PrintableWindow::default_geometry() { DismissableWindow::default_geometry(); // the problem is that at this point the canvas size is not necessarly correct. if (xplace_) { pplace(xleft_, display()->pheight() - xtop_ - canvas()->pheight()); } } // following analogy to MACwindow::MACpaint static CGrafPtr cg_; static GDHandle gd_; void Rubberband::rubber_on(Canvas* c) { // printf("Rubberband::rubber_on\n"); // c->front_buffer(); GetGWorld(&cg_, &gd_); WindowPtr mw = c->window()->rep()->macWindow(); #if carbon SetGWorld(GetWindowPort(mw), GetMainDevice()); #else SetGWorld((CGrafPort*)mw, GetMainDevice()); #endif } void Rubberband::rubber_off(Canvas* c) { // c->back_buffer(); SetGWorld(cg_, gd_); #ifdef MAC // this prevents failure for all future paints ... I am not sure this is what we want c->damage_all(); #endif // printf("Rubberband::rubber_off\n"); } #if !defined(carbon) IOHandler::IOHandler(){} IOHandler::~IOHandler(){} int IOHandler::inputReady(int){return 0;} int IOHandler::outputReady(int){return 0;} int IOHandler::exceptionRaised(int){return 0;} void IOHandler::timerExpired(long, long){} void IOHandler::childStatus(pid_t, int){} #endif neuron-7.5/src/ivoc/ivocmain.cpp000066400000000000000000000467231323325274500167550ustar00rootroot00000000000000#include <../../nrnconf.h> #include <../nrnpython/nrnpython_config.h> extern "C" { long hoc_nframe, hoc_nstack; } #if !HAVE_IV #define Session void extern "C" { int hoc_main1(int, const char**, const char**); void hoc_main1_init(const char*, const char**); } #endif #include #include #if HAVE_UNISTD_H #include #if !defined (__APPLE__) extern char** environ; #else #include #endif #endif #if HAVE_IV #ifdef WIN32 #include void iv_display_scale(float); #endif #include #include #include "ivoc.h" #include "idraw.h" #include #endif #include #include "string.h" #include "oc2iv.h" #include "nrnmpi.h" #include "nrnrt.h" #if defined(carbon) #undef MAC #endif #if MAC || defined(WIN32) #include "njconf.h" #else #include "../nrnjava/njconf.h" #endif #if 1 extern "C" { void pr_profile(); } #define PR_PROFILE pr_profile(); #else #define PR_PROFILE /**/ #endif /*****************************************************************************/ #if HAVE_IV static PropertyData properties[] = { {"*gui", "sgimotif"}, {"*PopupWindow*overlay", "true"}, {"*PopupWindow*saveUnder", "on"}, {"*TransientWindow*saveUnder", "on"}, {"*background", "#ffffff"}, {"*brush_width", "0"}, {"*double_buffered", "on"}, {"*flat", "#aaaaaa"}, #if defined(WIN32)|| defined(CYGWIN) {"*font", "*Arial*bold*--12*"}, {"*MenuBar*font", "*Arial*bold*--12*"}, {"*MenuItem*font", "*Arial*bold*--12*"}, #endif {"*foreground", "#000000"}, {"*synchronous", "off"}, {"*malloc_debug", "on"}, {"*Scene_background", "#ffffff"}, {"*Scene_foreground", "#000000"}, {"*FieldEditor*background", "#ffffff"}, //{"*background", "#cfffff"}, {"*default_brush", "0"}, {"*view_margin", ".25"}, {"*pwm_dismiss_button", "Iconify"}, {"*dismiss_button", "Close"}, {"*use_transient_windows", "yes"}, {"*nrn_library", " $(NEURONHOME)/lib"}, {"*view_pick_epsilon", "2"}, {"*pwm_canvas_height", "120"}, {"*pwm_paper_height", "11"}, {"*pwm_paper_width", "8.5"}, {"*pwm_paper_resolution", ".5"}, {"*pwm_pixel_resolution", "0"}, {"*window_manager_offset_x", "5."}, {"*window_manager_offset_y", "26."}, {"*pwm_print_file_filter", "*.ps"}, {"*pwm_idraw_file_filter", "*.id"}, {"*pwm_ascii_file_filter", "*"}, {"*pwm_save_file_filter", "*.ses"}, {"*pwm_idraw_prologue", "$(NEURONHOME)/lib/prologue.id"}, {"*pwm_postscript_filter", "sed 's;/Adobe-;/;'"}, {"*SlowSlider*autorepeatStart", "0."}, {"*scene_print_border", "1"}, {"*radioScale", ".9"}, {"*stepper_size", "20."}, {"*xvalue_field_size_increase", "10."}, {"*xvalue_format", "%.5g"}, {"*graph_axis_default", "0"}, {"*shape_scale_file", "$(NEURONHOME)/lib/shape.cm2"}, {"*shape_quadedge", "0"}, {"*CBWidget_ncolor", "10"}, {"*CBWidget_nbrush", "10"}, {"*units_on_flag", "on"}, {"*NFRAME", "0"}, // see src/oc/code.c for the default value {"*NSTACK", "0"}, // see src/oc/code.c for the default value {"*Py_NoSiteFlag", "0"}, {"*python", "off"}, {"*nopython", "off"}, {"*err_dialog", "off"}, {"*banner", "on"}, { NULL } }; static OptionDesc options[] = { {"-dismissbutton", "*dismiss_button", OptionValueImplicit, "Close"}, {"-extrapipeinput", "*extrapipeinput", OptionValueNext}, {"-dll", "*nrnmechdll", OptionValueNext}, {"-showwinio", "*showwinio", OptionValueImplicit, "on"}, {"-hidewinio", "*showwinio", OptionValueImplicit, "off"}, {"-isatty", "*isatty", OptionValueImplicit, "1"}, {"-notatty", "*isatty", OptionValueImplicit, "-1"}, {"-neosim", "*neosim", OptionValueImplicit, "on"}, {"-bbs_nhost", "*bbs_nhost", OptionValueNext}, {"-NSTACK", "*NSTACK", OptionValueNext}, {"-NFRAME", "*NFRAME", OptionValueNext}, {"--version", "*print_nrn_version", OptionValueImplicit, "on"}, {"-python", "*python", OptionValueImplicit, "on"}, {"-nopython", "*nopython", OptionValueImplicit, "on"}, {"-Py_NoSiteFlag", "*Py_NoSiteFlag", OptionValueImplicit, "1"}, {"-nobanner", "*banner", OptionValueImplicit, "off"}, #if defined(WIN32) {"-mswin_scale", "*mswin_scale", OptionValueNext}, #endif { NULL } }; #endif // HAVE_IV extern "C" { extern int hoc_obj_run(const char*, Object*); extern int nrn_istty_; extern char* nrn_version(int); extern int nrn_nobanner_; extern void hoc_final_exit(); void ivoc_final_exit(); #if (defined(NRNMECH_DLL_STYLE) || defined(WIN32)) extern const char* nrn_mech_dll; #endif #if defined(USE_PYTHON) int nrn_nopython; extern int use_python_interpreter; extern void (*p_nrnpython_start)(int); #endif } /*****************************************************************************/ //exported initialized data so shared libraries can have assert pure-text #if HAVE_IV int Oc::refcnt_ = 0; Session* Oc::session_ = 0; HandleStdin* Oc::handleStdin_ = 0; ostream* OcIdraw::idraw_stream = 0; #endif /*****************************************************************************/ extern void ivoc_cleanup(); #if OCSMALL static char* ocsmall_argv[] = {0, "difus.hoc"}; #endif #if defined(WIN32) && HAVE_IV extern "C" { extern HWND hCurrWnd; } #endif extern "C" { extern void setneuronhome(const char*); extern const char* neuron_home; int hoc_xopen1(const char* filename, const char* rcs); extern int units_on_flag_; extern double hoc_default_dll_loaded_; extern int hoc_print_first_instance; int nrnpy_nositeflag; } #if !defined(WIN32) && !MAC && !defined(CYGWIN) void setneuronhome(const char*) { neuron_home = getenv("NEURONHOME"); } #endif #if 0 void penv() { int i; for (i=0; environ[i]; ++i) { printf("%p %s\n", environ[i], environ[i]); } } #endif #if MAC #include #include extern bool mac_load_dll(const char*); extern "C" { void mac_open_doc(const char* s) { // only chdir and load dll on the first opendoc static bool done = false; char cs[256]; strncpy(cs, s, 256); char* cp = strrchr(cs, ':'); if (cp && !done) { *cp = '\0'; if (chdir(cs) == 0) { done = true; printf("current directory is \"%s\"\n", cs); if (mac_load_dll("nrnmac.dll")) { hoc_default_dll_loaded_ = 1.; } } } hoc_xopen1(s, 0); } void mac_open_app(){ hoc_xopen1(":lib:hoc:macload.hoc", 0); } } #endif #ifdef MAC #pragma export on #endif extern "C" { int ivocmain(int, const char**, const char**); int (*p_neosim_main)(int, const char**, const char**); extern int nrn_global_argc; extern const char** nrn_global_argv; int always_false; extern int nrn_is_python_extension; } // some things are defined in libraries earlier than they are used so... #include static void force_load() { if (always_false) { nrnisaac_new(); } } #if defined(CYGWIN) // see iv/src/OS/directory.cpp #include static bool isdir(const char* p) { struct stat st; bool b = stat((char*)p, &st) == 0 && S_ISDIR(st.st_mode); //printf("isdir %s returns %d\n", p, b); return b; } #endif #ifdef MAC #pragma export off #endif // in case we are running without IV then get some important args this way static bool nrn_optarg_on(const char* opt, int* argc, char** argv); static char* nrn_optarg(const char* opt, int* argc, char** argv); static int nrn_optargint(const char* opt, int* argc, char** argv, int dflt); static bool nrn_optarg_on(const char* opt, int* pargc, const char** argv) { char* a; int i; for (i=0; i < *pargc; ++i) { if (strcmp(opt, argv[i]) == 0) { *pargc -= 1; for (; i < *pargc; ++i) { argv[i] = argv[i+1]; } // printf("nrn_optarg_on %s return true\n", opt); return true; } } return false; } static const char* nrn_optarg(const char* opt, int* pargc, const char** argv) { const char* a; int i; for (i=0; i < *pargc - 1; ++i) { if (strcmp(opt, argv[i]) == 0) { a = argv[i+1]; *pargc -= 2; for (; i < *pargc; ++i) { argv[i] = argv[i+2]; } // printf("nrn_optarg %s return %s\n", opt, a); return a; } } return 0; } static int nrn_optargint(const char* opt, int* pargc, const char** argv, int dflt) { const char* a; int i; i = dflt; a = nrn_optarg(opt, pargc, argv); if (a) { sscanf(a, "%d", &i); } // printf("nrn_optargint %s return %d\n", opt, i); return i; } #if USENRNJAVA void nrn_InitializeJavaVM(); #endif #if 0 //for debugging void prargs(const char* s, int argc, const char** argv) { int i; printf("%s argc=%d\n", s, argc); for (i=0; i < argc; ++i) { printf(" %d |%s|\n", i, argv[i]); } } #endif // see nrnmain.cpp for the real main() int ivocmain (int argc, const char** argv, const char** env) { // third arg should not be used as it might become invalid // after putenv or setenv. Instead, if necessary use // #include // extern char** environ; int i; // prargs("at beginning", argc, argv); force_load(); nrn_global_argc = argc; nrn_global_argv = new const char*[argc]; for (i = 0; i < argc; ++i) { nrn_global_argv[i] = argv[i]; } if (nrn_optarg_on("-help", &argc, argv) || nrn_optarg_on("-h", &argc, argv)) { printf("nrniv [options] [fileargs]\n\ options:\n\ -dll filename dynamically load the linked mod files.\n\ -h print this help message\n\ -help print this help message\n\ -isatty unbuffered stdout, print prompt when waiting for stdin\n\ -mpi launched by mpirun or mpiexec, in parallel environment\n\ -mswin_scale float scales gui on screen\n\ -music launched as a process of the MUlti SImulator Coordinator\n\ -NSTACK integer size of stack (default 1000)\n\ -NFRAME integer depth of function call nesting (default 200)\n\ -nobanner do not print startup banner\n\ -nogui do not send any gui info to screen\n\ -notatty buffered stdout and no prompt\n\ -python Python is the interpreter\n\ -nopython Do not initialize Python\n\ -Py_NoSiteFlag Set Py_NoSiteFlag=1 before initializing Python\n\ -realtime For hard real-time simulation for dynamic clamp\n\ --version print version info\n\ and all InterViews and X11 options\n\ fileargs: any number of following\n\ - input from stdin til ^D (end of file)\n\ -c \"statement\" execute next statement\n\ filename execute contents of filename\n\ "); exit(0); } if (nrn_optarg_on("--version", &argc, argv)) { printf("%s\n", nrn_version(1)); exit(0); } if (nrn_optarg_on("-nobanner", &argc, argv)) { nrn_nobanner_ = 1; } if (nrn_optarg_on("-Py_NoSiteFlag", &argc, argv)) { nrnpy_nositeflag = 1; } nrnmpi_numprocs = nrn_optargint("-bbs_nhost", &argc, argv, nrnmpi_numprocs); hoc_usegui = 1; if (nrn_optarg_on("-nogui", &argc, argv)) { hoc_usegui = 0; hoc_print_first_instance = 0; } if (nrnmpi_numprocs > 1) { hoc_usegui = 0; hoc_print_first_instance = 0; } #if NRNMPI if (nrnmpi_use) { hoc_usegui = 0; hoc_print_first_instance = 0; } #else // check if user is trying to use -mpi or -p4 when it was not // enabled at build time. If so, issue a warning. int b; b = 0; for (i=0; i < argc; ++i) { if (strncmp("-p4", (argv)[i], 3) == 0) { b = 1; break; } if (strcmp("-mpi", (argv)[i]) == 0) { b = 1; break; } } if (b) { printf("Warning: detected user attempt to enable MPI, but MPI support was disabled at build time.\n"); } #endif #if NRN_MUSIC nrn_optarg_on("-music", &argc, argv); #else if (nrn_optarg_on("-music", &argc, argv)) { printf("Warning: attempt to enable MUSIC but MUSIC support was disabled at build time.\n"); } #endif #if NRN_REALTIME if (nrn_optarg_on("-realtime", &argc, argv)) { nrn_realtime_ = 1; nrn_setscheduler(); } if (nrn_optarg_on("-schedfifo", &argc, argv)) { if (nrn_realtime_ != 1) { nrn_setscheduler(); } } #endif #if !HAVE_IV hoc_usegui = 0; hoc_print_first_instance = 0; #endif int our_argc = argc; const char** our_argv = argv; int exit_status = 0; Session* session = NULL; #if !defined(WIN32)&&!defined(MAC) && !defined(CYGWIN) // Gary Holt's first pass at this was: // // Set the NEURONHOME environment variable. This should override any setting // in the environment, so someone doesn't accidently use data files from an // old version of neuron. // // But I have decided to use the environment variable if it exists neuron_home = getenv("NEURONHOME"); if (!neuron_home) { #if defined(HAVE_PUTENV) // the only reason the following is static is to prevent valgrind // from complaining it is a memory leak. static char* buffer = new char[strlen(NEURON_DATA_DIR) + 12]; sprintf(buffer, "NEURONHOME=%s", NEURON_DATA_DIR); putenv(buffer); neuron_home = NEURON_DATA_DIR; #elif defined(HAVE_SETENV) setenv("NEURONHOME", NEURON_DATA_DIR, 1); neuron_home = NEURON_DATA_DIR; #else #error "I don't know how to set environment variables." // Maybe in this case the user will have to set it by hand. #endif // putenv and setenv may invalidate env but we no longer // use it so following should not be needed #if 0 #if HAVE_UNISTD_H && !defined(__APPLE__) env = environ; #endif #if defined (__APPLE__) env = (*_NSGetEnviron()); #endif #endif } #else // Not unix: neuron_home = getenv("NEURONHOME"); if (!neuron_home) { setneuronhome((argc > 0)?argv[0]:0); } if (!neuron_home) { #if defined(WIN32) && HAVE_IV MessageBox(0, "No NEURONHOME environment variable.", "NEURON Incomplete Installation", MB_OK); #else neuron_home = "."; fprintf(stderr, "Warning: no NEURONHOME environment variable-- setting\ to %s\n", neuron_home); #endif } #endif // !unix. #if HAVE_IV #if OCSMALL our_argc = 2; our_argv = new char*[2]; our_argv[0] = "Neuron"; our_argv[1] = ":lib:hoc:macload.hoc"; session = new Session("NEURON", our_argc, our_argv, options, properties); #else #if MAC our_argc = 1; our_argv = new char*[1]; our_argv[0] = "Neuron"; session = new Session("NEURON", our_argc, our_argv, options, properties); SIOUXSettings.asktosaveonclose = false; #else #if defined(WIN32) || carbon IFGUI session = new Session("NEURON", our_argc, (char**)our_argv, options, properties); ENDGUI #else IFGUI if (getenv("DISPLAY")) { session = new Session("NEURON", our_argc, (char**)our_argv, options, properties); }else{ fprintf(stderr, "Warning: no DISPLAY environment variable.\ \n--No graphics will be displayed.\n"); hoc_usegui = 0; } ENDGUI #endif #endif char* nrn_props; nrn_props = new char[strlen(neuron_home) + 20]; if (session) { sprintf(nrn_props, "%s/%s", neuron_home, "lib/nrn.defaults"); #ifdef WIN32 FILE* f; if ((f = fopen(nrn_props, "r")) != (FILE*)0) { fclose(f); session->style()->load_file(String(nrn_props), -5); }else{ #if defined(CYGWIN) sprintf(nrn_props, "%s/%s", neuron_home, "lib/nrn.def"); #else sprintf(nrn_props, "%s\\%s", neuron_home, "lib\\nrn.def"); #endif if ((f = fopen(nrn_props, "r")) != (FILE*)0) { fclose(f); session->style()->load_file(String(nrn_props), -5); }else{ char buf[256]; sprintf(buf, "Can't load NEURON resources from %s[aults]", nrn_props); printf("%s\n", buf); } } #else session->style()->load_file(String(nrn_props), -5); #endif #if ! MAC char* h = getenv("HOME"); if (h) { sprintf(nrn_props, "%s/%s", h, ".nrn.defaults"); session->style()->load_file(String(nrn_props), -5); } #endif } delete [] nrn_props; #endif /*OCSMALL*/ if (session) { session->style()->find_attribute("NSTACK", hoc_nstack); session->style()->find_attribute("NFRAME", hoc_nframe); IFGUI if (session->style()->value_is_on("err_dialog")) { nrn_err_dialog_active_ = 1; } ENDGUI }else #endif //HAVE_IV { hoc_nstack = nrn_optargint("-NSTACK", &our_argc, our_argv, 0); hoc_nframe = nrn_optargint("-NFRAME", &our_argc, our_argv, 0); } #if defined(USE_PYTHON) #if HAVE_IV nrn_nopython = 0; if (session && session->style()->value_is_on("nopython")) { nrn_nopython = 1; } #endif // if (nrn_optarg_on("-nopython", &our_argc, our_argv)) { // nrn_nopython = 1; // } #endif //USE_PYTHON #if defined(WIN32) && HAVE_IV IFGUI double scale = 1.; int pw = GetSystemMetrics(SM_CXVIRTUALSCREEN); if (pw < 1100) { scale = 1200./double(pw); } session->style()->find_attribute("mswin_scale", scale); iv_display_scale(float(scale)); ENDGUI #endif // just eliminate from arg list nrn_optarg_on("-mpi", &our_argc, our_argv); #if (defined(NRNMECH_DLL_STYLE) || defined(WIN32)) String str; #if HAVE_IV if (session) { if (session->style()->find_attribute("nrnmechdll", str)) { nrn_mech_dll = str.string(); } }else #endif { // if running without IV. nrn_mech_dll = nrn_optarg("-dll", &our_argc, our_argv); // may be duplicated since nrnbbs adds all args to special // which is often a script that adds a -dll arg nrn_optarg("-dll", &our_argc, our_argv); } #if NRNMPI if (nrnmpi_use && !nrn_mech_dll) { // for heterogeneous clusters, mpirun allows different programs // but not different arguments. So the -dll is insufficient. // Therefore we check to see if it makes sense to load // a dll from the usual location. // Actually this is done by default in src/nrnoc/init.c } #endif #endif //NRNMECH_DLL_STYLE #if HAVE_IV if (session) { long i; if (session->style()->find_attribute("isatty", i)) { nrn_istty_ = i; } }else #endif { nrn_istty_ = nrn_optarg_on("-isatty", &our_argc, our_argv); if (nrn_istty_ == 0) { nrn_istty_ = nrn_optarg_on("-notatty", &our_argc, our_argv); if (nrn_istty_ == 1) { nrn_istty_ = -1; } } } #if HAVE_IV if (session && session->style()->value_is_on("units_on_flag")) { units_on_flag_ = 1; }; Oc oc(session, our_argv[0], env); #if defined(WIN32) && !defined(CYGWIN) if (session->style()->find_attribute("showwinio", str) && !session->style()->value_is_on("showwinio") ) { ShowWindow(hCurrWnd, SW_HIDE); hoc_obj_run("pwman_place(100,100)\n", 0); } #endif #else hoc_main1_init(our_argv[0], env); #endif //HAVE_IV #if USENRNJAVA nrn_InitializeJavaVM(); #endif #if OCSMALL if (argc == 1) { ocsmall_argv[0] = our_argv[0]; oc.run(2, ocsmall_argv); }else #endif #if defined(USE_PYTHON) #if HAVE_IV if (session && session->style()->value_is_on("python")) { use_python_interpreter = 1; } #endif if (nrn_optarg_on("-python", &our_argc, our_argv)) { use_python_interpreter = 1; } if (nrn_is_python_extension) { return 0; } #if defined(CYGWIN) && defined(HAVE_SETENV) if (!isdir("/usr/lib/python2.5")) { char* buf = new char[strlen(neuron_home) + 20]; sprintf(buf, "%s/lib/%s", neuron_home, "python2.5"); if (isdir(buf)) { setenv("PYTHONHOME", neuron_home, 0); } delete [] buf; } #endif //printf("p_nrnpython_start = %p\n", p_nrnpython_start); if (p_nrnpython_start) { (*p_nrnpython_start)(1); } if (use_python_interpreter && !p_nrnpython_start) { fprintf(stderr, "Python not available\n"); exit(1); } #endif #if NRN_REALTIME nrn_maintask_init(); #endif #if HAVE_IV oc.run(our_argc, our_argv); #else hoc_main1(our_argc, our_argv, env); #endif #if HAVE_IV if (session && session->style()->value_is_on("neosim")) { if (p_neosim_main) { (*p_neosim_main)(argc, argv, env); }else{ printf("neosim not available.\nModify nrn/src/nrniv/Imakefile and remove nrniv/$CPU/netcvode.o\n"); } } #endif PR_PROFILE #if defined(USE_PYTHON) if (use_python_interpreter) { // process the .py files and an interactive interpreter if (p_nrnpython_start) {(*p_nrnpython_start)(2);} } if (p_nrnpython_start) { (*p_nrnpython_start)(0); } #endif hoc_final_exit(); ivoc_final_exit(); return exit_status; } void ivoc_final_exit() { #if NRNMPI nrnmpi_terminate(); #endif #if NRN_REALTIME nrn_maintask_delete(); #endif } extern "C" { extern void hoc_ret(), hoc_pushx(double); extern double *getarg(int i); extern int ifarg(int); void hoc_single_event_run() { #if HAVE_IV IFGUI void single_event_run(); single_event_run(); ENDGUI #endif hoc_ret(); hoc_pushx(1.); } #if !HAVE_IV int run_til_stdin() {return 1;} void hoc_notify_value(){} #endif } neuron-7.5/src/ivoc/ivocman1.cpp000066400000000000000000000005521323325274500166530ustar00rootroot00000000000000// The problem this hack overcomes is that extending Python requires // ivocmain.cpp in the shared library (compiled with PIC) and that is // fine for normal neuron as well. But there are link problems when // built statically and hence ivocmain.cpp is listed in the // ivoc_SOURCES so that it is sure to be linked early in the process. #include "ivocmain.cpp" neuron-7.5/src/ivoc/ivocrand.cpp000077500000000000000000000326611323325274500167540ustar00rootroot00000000000000#include <../../nrnconf.h> // definition of random number generation from the g++ library #include #include #include "random1.h" #include #include "classreg.h" #include "oc2iv.h" #include "nrnisaac.h" #include #include #include "ocobserv.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if HAVE_IV #include "ivoc.h" #endif #undef dmaxuint #define dmaxuint 4294967295. extern "C" {void nrn_random_play(); } class RandomPlay : public Observer, public Resource { public: RandomPlay(Rand*, double*); virtual ~RandomPlay(); void play(); void list_remove(); virtual void update(Observable*); private: Rand* r_; double* px_; }; declarePtrList(RandomPlayList,RandomPlay) implementPtrList(RandomPlayList, RandomPlay) static RandomPlayList* random_play_list_; extern "C" { double nrn_random_pick(Rand* r); Rand* nrn_random_arg(int); long nrn_get_random_sequence(Rand* r); void nrn_set_random_sequence(Rand* r, long seq); int nrn_random_isran123(Rand* r, uint32_t* id1, uint32_t* id2, uint32_t* id3); #include } class NrnRandom123 : public RNG { public: NrnRandom123(uint32_t id1, uint32_t id2, uint32_t id3 = 0); virtual ~NrnRandom123(); virtual uint32_t asLong() { return nrnran123_ipick(s_); } virtual double asDouble() { return nrnran123_dblpick(s_); } virtual void reset() { nrnran123_setseq(s_, 0, 0); } nrnran123_State* s_; }; NrnRandom123::NrnRandom123(uint32_t id1, uint32_t id2, uint32_t id3) { s_ = nrnran123_newstream3(id1, id2, id3); } NrnRandom123::~NrnRandom123() { nrnran123_deletestream(s_); } // The decision that has to be made is whether each generator instance // should have its own seed or only one seed for all. We choose separate // seed for each but if arg not present or 0 then seed chosen by system. // the addition of ilow > 0 means that value is used for the lowindex // instead of the mcell_ran4_init global 32 bit lowindex. class MCellRan4 : public RNG { public: MCellRan4(uint32_t ihigh = 0, uint32_t ilow = 0); virtual ~MCellRan4(); virtual uint32_t asLong() { return (uint32_t)(ilow_ == 0 ? mcell_iran4(&ihigh_) : nrnRan4int(&ihigh_, ilow_)); } virtual void reset() { ihigh_ = orig_; } virtual double asDouble() { return (ilow_ == 0 ? mcell_ran4a(&ihigh_) : nrnRan4dbl(&ihigh_, ilow_)); } uint32_t ihigh_; uint32_t orig_; uint32_t ilow_; private: static uint32_t cnt_; }; MCellRan4::MCellRan4(uint32_t ihigh, uint32_t ilow) { ++cnt_; ilow_ = ilow; ihigh_ = ihigh; if (ihigh_ == 0) { ihigh_ = cnt_; ihigh_ = (uint32_t)asLong(); } orig_ = ihigh_; } MCellRan4::~MCellRan4() {} uint32_t MCellRan4::cnt_ = 0; class Isaac64 : public RNG { public: Isaac64(uint32_t seed = 0); virtual ~Isaac64(); virtual uint32_t asLong() { return (uint32_t)nrnisaac_uint32_pick(rng_); } virtual void reset() { nrnisaac_init(rng_, seed_); } virtual double asDouble() { return nrnisaac_dbl_pick(rng_); } uint32_t seed() { return seed_; } void seed(uint32_t s) { seed_ = s; reset(); } private: uint32_t seed_; void* rng_; static uint32_t cnt_; }; Isaac64::Isaac64(uint32_t seed) { if (cnt_ == 0) { cnt_ = 0xffffffff; } --cnt_; seed_ = seed; if (seed_ == 0) { seed_ = cnt_; } rng_ = nrnisaac_new(); reset(); } Isaac64::~Isaac64() { nrnisaac_delete(rng_); } uint32_t Isaac64::cnt_ = 0; RandomPlay::RandomPlay(Rand* r, double* px) { //printf("RandomPlay\n"); r_ = r; px_ = px; random_play_list_->append(this); ref(); nrn_notify_when_double_freed(px_, this); nrn_notify_when_void_freed((void*)r->obj_, this); } RandomPlay::~RandomPlay() { //printf("~RandomPlay\n"); } void RandomPlay::play() { //printf("RandomPlay::play\n"); *px_ = (*(r_->rand))(); } void RandomPlay::list_remove() { long i, cnt = random_play_list_->count(); for (i = 0; i < cnt; ++i) { if (random_play_list_->item(i) == (RandomPlay*)this) { //printf("RandomPlay %p removed from list cnt=%d i=%d %p\n", this, cnt, i); random_play_list_->remove(i); unref_deferred(); break; } } } void RandomPlay::update(Observable*) { //printf("RandomPlay::update\n"); nrn_notify_pointer_disconnect(this); list_remove(); } Rand::Rand(unsigned long seed, int size, Object* obj) { //printf("Rand\n"); gen = new ACG(seed,size); rand = new Normal(0.,1.,gen); type_ = 0; obj_ = obj; } Rand::~Rand() { //printf("~Rand\n"); delete gen; delete rand; } // constructor for a random number generator based on the RNG class // from the gnu c++ class library // defaults to the ACG generator (see below) // syntax: // a = new Rand([seed],[size]) static void* r_cons(Object* obj) { unsigned long seed = 0; int size = 55; if (ifarg(1)) seed = long(*getarg(1)); if (ifarg(2)) size = int(chkarg(2,7,98)); Rand* r = new Rand(seed,size, obj); return (void*)r; } // destructor -- called when no longer referenced static void r_destruct(void* r) { delete (Rand*)r; } // Use a variant of the Linear Congruential Generator (algorithm M) // described in Knuth, Art of Computer Programming, Vol. III in // combination with a Fibonacci Additive Congruential Generator. // This is a "very high quality" random number generator, // Default size is 55, giving a size of 1244 bytes to the structure // minimum size is 7 (total 100 bytes), maximum size is 98 (total 2440 bytes) // syntax: // r.ACG([seed],[size]) static double r_ACG(void* r) { Rand* x = (Rand*)r; unsigned long seed = 0; int size = 55; if (ifarg(1)) seed = long(*getarg(1)); if (ifarg(2)) size = int(chkarg(2,7,98)); x->rand->generator(new ACG(seed,size)); x->type_ = 0; delete x->gen; x->gen = x->rand->generator(); return 1.; } // Use a Multiplicative Linear Congruential Generator. Not as high // quality as the ACG, but uses only 8 bytes // syntax: // r.MLCG([seed1],[seed2]) static double r_MLCG(void* r) { Rand* x = (Rand*)r; unsigned long seed1 = 0; unsigned long seed2 = 0; if (ifarg(1)) seed1 = long(*getarg(1)); if (ifarg(2)) seed2 = long(*getarg(2)); x->rand->generator(new MLCG(seed1,seed2)); delete x->gen; x->gen = x->rand->generator(); x->type_ = 1; return 1.; } static double r_MCellRan4(void* r) { Rand* x = (Rand*)r; uint32_t seed1 = 0; uint32_t ilow = 0; if (ifarg(1)) seed1 = (uint32_t)(chkarg(1, 0., dmaxuint)); if (ifarg(2)) ilow = (uint32_t)(chkarg(2, 0., dmaxuint)); MCellRan4* mcr = new MCellRan4(seed1, ilow); x->rand->generator(mcr); delete x->gen; x->gen = x->rand->generator(); x->type_ = 2; return (double)mcr->orig_; } long nrn_get_random_sequence(Rand* r) { assert(r->type_ == 2); MCellRan4* mcr = (MCellRan4*)r->gen; return mcr->ihigh_; } void nrn_set_random_sequence(Rand* r, long seq) { assert(r->type_ == 2); MCellRan4* mcr = (MCellRan4*)r->gen; mcr->ihigh_ = seq; } int nrn_random_isran123(Rand* r, uint32_t* id1, uint32_t* id2, uint32_t* id3) { if (r->type_ == 4) { NrnRandom123* nr = (NrnRandom123*)r->gen; nrnran123_getids3(nr->s_, id1, id2, id3); return 1; } return 0; } static double r_nrnran123(void* r) { Rand* x = (Rand*)r; uint32_t id1 = 0; uint32_t id2 = 0; uint32_t id3 = 0; if (ifarg(1)) id1 = (uint32_t)(chkarg(1, 0., dmaxuint)); if (ifarg(2)) id2 = (uint32_t)(chkarg(2, 0., dmaxuint)); if (ifarg(3)) id3 = (uint32_t)(chkarg(3, 0., dmaxuint)); NrnRandom123* r123 = new NrnRandom123(id1, id2, id3); x->rand->generator(r123); delete x->gen; x->gen = x->rand->generator(); x->type_ = 4; return 0.; } static double r_ran123_globalindex(void* r) { if (ifarg(1)) { uint32_t gix = (uint32_t)chkarg(1, 0., 4294967295.); /* 2^32 - 1 */ nrnran123_set_globalindex(gix); } return (double)nrnran123_get_globalindex(); } static double r_sequence(void* r) { Rand* x = (Rand*)r; if (x->type_ != 2 && x->type_ != 4) { hoc_execerror("Random.seq() can only be used if the random generator was MCellRan4 or Random123", 0); } if (x->type_ == 4) { uint32_t seq; char which; if (ifarg(1)) { double s = chkarg(1, 0., 17179869183.); /* 2^34 - 1 */ seq = (uint32_t)(s/4.); which = char(s - seq*4.); NrnRandom123* nr = (NrnRandom123*)x->gen; nrnran123_setseq(nr->s_, seq, which); } nrnran123_getseq(((NrnRandom123*)x->gen)->s_, &seq, &which); return double(seq)*4. + double(which); } MCellRan4* mcr = (MCellRan4*)x->gen; if (ifarg(1)) { mcr->ihigh_ = (long)(*getarg(1)); } return (double)mcr->ihigh_; } static double r_Isaac64(void* r) { Rand* x = (Rand*)r; uint32_t seed1 = 0; if (ifarg(1)) seed1 = (uint32_t)(*getarg(1)); Isaac64* mcr = new Isaac64(seed1); x->rand->generator(mcr); delete x->gen; x->gen = x->rand->generator(); x->type_ = 3; return (double)mcr->seed(); } // Pick again from the distribution last used // syntax: // r.repick() static double r_repick(void* r) { Rand* x = (Rand*)r; return (*(x->rand))(); } double nrn_random_pick(Rand* r) { if (r) { return (*(r->rand))(); }else{ return .5; } } Rand* nrn_random_arg(int i) { Object* ob = *hoc_objgetarg(i); check_obj_type(ob, "Random"); Rand* r = (Rand*)(ob->u.this_pointer); return r; } // uniform random variable over the open interval [low...high) // syntax: // r.uniform(low,high) static double r_uniform(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); double a2 = *getarg(2); delete x->rand; x->rand = new Uniform(a1, a2, x->gen); return (*(x->rand))(); } // uniform random variable over the closed interval [low...high] // syntax: // r.discunif(low,high) static double r_discunif(void* r) { Rand* x = (Rand*)r; long a1 = long(*getarg(1)); long a2 = long(*getarg(2)); delete x->rand; x->rand = new DiscreteUniform(a1, a2, x->gen); return (*(x->rand))(); } // normal (gaussian) distribution // syntax: // r.normal(mean,variance) static double r_normal(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); double a2 = *getarg(2); delete x->rand; x->rand = new Normal(a1, a2, x->gen); return (*(x->rand))(); } // logarithmic normal distribution // syntax: // r.lognormal(mean) static double r_lognormal(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); double a2 = *getarg(2); delete x->rand; x->rand = new LogNormal(a1, a2, x->gen); return (*(x->rand))(); } // poisson distribution // syntax: // r.poisson(mean) static double r_poisson(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); delete x->rand; x->rand = new Poisson(a1, x->gen); return (*(x->rand))(); } // binomial distribution, which models successfully drawing items from a pool // n is the number items in the pool and p is the probablity of each item // being successfully drawn (n>0, 0<=p<=1) // syntax: // r.binomial(n,p) static double r_binomial(void* r) { Rand* x = (Rand*)r; int a1 = int(chkarg(1, 0, 1e99)); double a2 = chkarg(2, 0, 1); delete x->rand; x->rand = new Binomial(a1, a2, x->gen); return (*(x->rand))(); } // discrete geometric distribution // Given 0<=mean<=1, returns the number of uniform random samples // that were drawn before the sample was larger than mean (always // greater than 0. // syntax: // r.geometric(mean) static double r_geometric(void* r) { Rand* x = (Rand*)r; double a1 = chkarg(1, 0, 1); delete x->rand; x->rand = new Geometric(a1, x->gen); return (*(x->rand))(); } // hypergeometric distribution // syntax: // r.hypergeo(mean,variance) static double r_hypergeo(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); double a2 = *getarg(2); delete x->rand; x->rand = new HyperGeometric(a1, a2, x->gen); return (*(x->rand))(); } // negative exponential distribution // syntax: // r.negexp(mean) static double r_negexp(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); delete x->rand; x->rand = new NegativeExpntl(a1, x->gen); return (*(x->rand))(); } // Erlang distribution // syntax: // r.erlang(mean,variance) static double r_erlang(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); double a2 = *getarg(2); delete x->rand; x->rand = new Erlang(a1, a2, x->gen); return (*(x->rand))(); } // Weibull distribution // syntax: // r.weibull(alpha,beta) static double r_weibull(void* r) { Rand* x = (Rand*)r; double a1 = *getarg(1); double a2 = *getarg(2); delete x->rand; x->rand = new Weibull(a1, a2, x->gen); return (*(x->rand))(); } static double r_play(void* r){ new RandomPlay((Rand*)r, hoc_pgetarg(1)); return 0.; } void nrn_random_play() { long i, cnt = random_play_list_->count(); for (i=0; i < cnt; ++i) { random_play_list_->item(i)->play(); } } static Member_func r_members[] = { "ACG", r_ACG, "MLCG", r_MLCG, "Isaac64", r_Isaac64, "MCellRan4", r_MCellRan4, "Random123", r_nrnran123, "Random123_globalindex", r_ran123_globalindex, "seq", r_sequence, "repick", r_repick, "uniform", r_uniform, "discunif", r_discunif, "normal", r_normal, "lognormal", r_lognormal, "binomial", r_binomial, "poisson", r_poisson, "geometric", r_geometric, "hypergeo", r_hypergeo, "negexp", r_negexp, "erlang", r_erlang, "weibull", r_weibull, "play", r_play, 0, 0 }; void Random_reg() { class2oc("Random", r_cons, r_destruct, r_members, NULL, NULL, NULL); random_play_list_ = new RandomPlayList(); } neuron-7.5/src/ivoc/ivocvect.cpp000066400000000000000000002635041323325274500167700ustar00rootroot00000000000000#include <../../nrnconf.h> #if defined(__GO32__) #define HAVE_IV 0 #endif //#include #include #include #include #include #include #include #include "fourier.h" #if HAVE_IV #include #include #include #include #include #include #include #include #include #include #include //#include #include #else #include #include #endif #if defined(SVR4) extern "C" {extern void exit(int status);}; #endif #include "classreg.h" #if HAVE_IV #include "apwindow.h" #include "ivoc.h" #include "graph.h" #endif #ifndef PI #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #define PI M_PI #endif #define BrainDamaged 0 //The Sun CC compiler but it doesn't hurt to leave it in #if BrainDamaged #define FWrite(arg1,arg2,arg3,arg4) if (fwrite((char*)(arg1),arg2,arg3,arg4) != arg3) { hoc_execerror("fwrite error", 0); } #define FRead(arg1,arg2,arg3,arg4) if (fread((char*)(arg1),arg2,arg3,arg4) != arg3) { hoc_execerror("fread error", 0); } #else #define FWrite(arg1,arg2,arg3,arg4) if (fwrite(arg1,arg2,arg3,arg4) != arg3){} #define FRead(arg1,arg2,arg3,arg4) if (fread(arg1,arg2,arg3,arg4) != arg3) {} #endif static double dmaxint_; // Definitions allow machine independent write and read // note that must include BYTEHEADER at head of routine // The policy is that each machine vwrite binary information in // without swapping, ie. native endian. // On reading, the type is checked to decide whether // byteswapping should be performed #define BYTEHEADER int _II__; char *_IN__; char _OUT__[16]; int BYTESWAP_FLAG=0; #define BYTESWAP(_X__,_TYPE__) \ if (BYTESWAP_FLAG == 1) { \ _IN__ = (char *) &(_X__); \ for (_II__=0;_II__ // definition of random numer generator #include "random1.h" #include // definition of comparison functions #include #if HAVE_IV #include "utility.h" #endif #include "oc2iv.h" #include "parse.h" #include "ocfile.h" extern "C" { extern Object* hoc_thisobject; extern Symlist* hoc_top_level_symlist; extern void nrn_exit(int); IvocVect* (*nrnpy_vec_from_python_p_)(void*); Object** (*nrnpy_vec_to_python_p_)(void*); Object** (*nrnpy_vec_as_numpy_helper_)(int, double*); }; int cmpfcn(double a, double b) { return ((a) <= (b))? (((a) == (b))? 0 : -1) : 1; } // math functions with error checking defined in oc/SRC/math.c extern "C" { extern double hoc_Log(double x), hoc_Log10(double x), hoc_Exp(double x), hoc_Sqrt(double x); extern double hoc_scan(FILE*); } static int narg() { int i=0; while (ifarg(i++)); return i-2; } #define MAX_FIT_PARAMS 20 #define TWO_BYTE_HIGH 65535. #define ONE_BYTE_HIGH 255. #define ONE_BYTE_HALF 128. #define EPSILON 1e-9 extern "C" { extern void notify_freed_val_array(double*, size_t); extern void install_vector_method(const char* name, Pfrd_vp); extern int vector_instance_px(void*, double**); extern int vector_arg_px(int, double**); extern int nrn_mlh_gsort (double* vec, int *base_ptr, int total_elems, doubleComparator cmp); }; IvocVect::IvocVect(Object* o) : ParentVect(){obj_ = o; label_ = NULL; MUTCONSTRUCT(0)} IvocVect::IvocVect(int l, Object* o) : ParentVect(l){obj_ = o; label_ = NULL; MUTCONSTRUCT(0)} IvocVect::IvocVect(int l, double fill_value, Object* o) : ParentVect(l, fill_value){obj_ = o; label_ = NULL; MUTCONSTRUCT(0)} IvocVect::IvocVect(IvocVect& v, Object* o) : ParentVect(v) {obj_ = o; label_ = NULL; MUTCONSTRUCT(0)} IvocVect::~IvocVect(){ MUTDESTRUCT if (label_) { delete [] label_; } notify_freed_val_array(vec(), capacity()); } void IvocVect::label(const char* label) { if (label_) { delete [] label_; label_ = NULL; } if (label) { label_ = new char[strlen(label) + 1]; strcpy(label_, label); } } static const char* nullstr = ""; static const char** v_label(void* v) { Vect* x = (Vect*)v; if (ifarg(1)) { x->label(gargstr(1)); } if (x->label_) { return (const char**)&x->label_; } return &nullstr; } static void same_err(const char* s, Vect* x, Vect* y) { if (x == y) { hoc_execerror(s, " argument needs to be copied first"); } } /* the Vect->at(start, end) function was used in about a dozen places for the purpose of dealing with a subrange of elements. However that function clones the subrange and returns a new Vect. This caused a memory leak and was needlessly inefficient for those functions. To fix both problems for these specific functions we use a special vector which does not have it's own space but merely a pointer and capacity to the right space of the original vector. The usage is restricted to only once at a time, i.e. can't use two subvecs at once and never do anything which affects the memory space. */ static IvocVect* subvec_; // allocated when registered. IvocVect* IvocVect::subvec(int start, int end) { subvec_->len = end - start + 1; subvec_->s = s + start; return subvec_; } void IvocVect::resize(int newlen) { // all that for this long oldcap = capacity(); if (newlen > space) { notify_freed_val_array(vec(), capacity()); } ParentVect::resize(newlen); for (;oldcap < newlen; ++oldcap) { elem(oldcap) = 0.; } } void IvocVect::resize_chunk(int newlen, int extra) { if (newlen > space) { long x = newlen + extra; if (extra == 0) { x = ListImpl_best_new_count(newlen, sizeof(double)); } // printf("resize_chunk %d\n", x); resize(x); } resize(newlen); } #if HAVE_IV /*static*/ class GraphMarkItem : public GraphItem { public: GraphMarkItem(Glyph* g) : GraphItem(g){} virtual ~GraphMarkItem(){}; virtual void erase(Scene* s, GlyphIndex i, int type) { if (type & GraphItem::ERASE_LINE) { s->remove(i); } } }; #endif static void* v_cons(Object* o) { double fill_value = 0.; int n = 0; Vect* vec; if (ifarg(1)) { if (hoc_is_double_arg(1)) { n = int(chkarg(1,0,1e10)); if (ifarg(2)) fill_value = *getarg(2); vec = new Vect(n,fill_value, o); }else{ if (!nrnpy_vec_from_python_p_) { hoc_execerror("Python not available", 0); } vec = (*nrnpy_vec_from_python_p_)(new Vect(0, 0, o)); } }else{ vec = new Vect(0, 0, o); } return vec; } static void v_destruct(void* v) { delete (Vect*)v; } static Symbol* svec_; // extern "C" vector functions used by ocmatrix.dll // can also be used in mod files Vect* vector_new(int n, Object* o){return new Vect(n, o);} Vect* vector_new0(){return new Vect();} Vect* vector_new1(int n){return new Vect(n);} Vect* vector_new2(Vect* v){return new Vect(*v);} void vector_delete(Vect* v){delete v;} int vector_buffer_size(Vect* v){return v->buffer_size();} int vector_capacity(Vect* v){return v->capacity();} void vector_resize(Vect* v, int n){v->resize(n);} Object** vector_temp_objvar(Vect* v){return v->temp_objvar();} double* vector_vec(Vect* v){return v->vec();} Object** vector_pobj(Vect* v){return &v->obj_;} char* vector_get_label(Vect* v) { return v->label_; } void vector_set_label(Vect* v, char* s) { v->label(s); } void vector_append(Vect* v, double x){ long n = v->capacity(); v->resize_chunk(n+1); v->elem(n) = x; } #ifdef WIN32 #if !defined(USEMATRIX) || USEMATRIX == 0 #include "../windll/dll.h" extern "C" {extern char* neuron_home;} void load_ocmatrix() { struct DLL* dll = NULL; char buf[256]; sprintf(buf, "%s\\lib\\ocmatrix.dll", neuron_home); dll = dll_load(buf); if (dll) { Pfri mreg = (Pfri)dll_lookup(dll, "_Matrix_reg"); if (mreg) { (*mreg)(); } }else{ printf("No Matrix class.\n"); } } #endif #endif Object** IvocVect::temp_objvar() { IvocVect* v = (IvocVect*)this; Object** po; if (v->obj_) { po = hoc_temp_objptr(v->obj_); }else{ po = hoc_temp_objvar(svec_, (void*)v); obj_ = *po; } return po; } extern "C" { // bug in cray compiler requires this void install_vector_method(const char* name, double (*f)(void*)) { Symbol* s_meth; if (hoc_table_lookup(name, svec_->u.ctemplate->symtable)) { hoc_execerror(name, " already a method in the Vector class"); } s_meth = hoc_install(name, FUNCTION, 0.0, &svec_->u.ctemplate->symtable); s_meth->u.u_proc->defn.pfd = (Pfrd)f; #define PUBLIC_TYPE 1 s_meth->cpublic = PUBLIC_TYPE; } } int vector_instance_px(void* v, double** px) { Vect* x = (Vect*)v; *px = x->vec(); return x->capacity(); } Vect* vector_arg(int i) { Object* ob = *hoc_objgetarg(i); if (!ob || ob->ctemplate != svec_->u.ctemplate) { check_obj_type(ob, "Vector"); } return (Vect*)(ob->u.this_pointer); } int is_vector_arg(int i) { Object* ob = *hoc_objgetarg(i); if (!ob || ob->ctemplate != svec_->u.ctemplate) { return 0; } return 1; } int vector_arg_px(int i, double** px) { Vect* x = vector_arg(i); *px = x->vec(); return x->capacity(); } extern void nrn_vecsim_add(void*, bool); extern void nrn_vecsim_remove(void*); static int possible_destvec(int arg, Vect*& dest) { if (ifarg(arg) && hoc_is_object_arg(arg)) { dest = vector_arg(arg); return arg+1; }else{ dest = new Vect(); return arg; } } static double v_record(void* v) { nrn_vecsim_add(v, true); return 1.; } static double v_play_remove(void* v) { nrn_vecsim_remove(v); return 1.; } static double v_play(void* v) { nrn_vecsim_add(v, false); return 1.; } static double v_fwrite(void* v) { Vect* vp = (Vect*)v; void* s; int x_max = vp->capacity()-1; int start = 0; int end = x_max; if (ifarg(2)) { start = int(chkarg(2,0,x_max)); end = int(chkarg(3,0,x_max)); } s = (void*)(&vp->elem(start)); const char* x = (const char*)s; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); FILE* fp = f->file(); if (!fp) { return 0.; } int n = end-start+1; BinaryMode(f); return (double)fwrite(x,sizeof(double),n,fp); } static double v_fread(void* v) { Vect* vp = (Vect*)v; void* s = (void*)(vp->vec()); Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); if (ifarg(2)) vp->resize(int(chkarg(2,0,1e10))); int n = vp->capacity(); int type = 4; if (ifarg(3)) { type = int(chkarg(3,1,5)); } FILE* fp = f->file(); if (!fp) { return 0.; } int i; BinaryMode(f) if (n > 0) switch (type) { case 5: // short ints { short *xs = (short *)malloc(n * (unsigned)sizeof(short)); FRead(xs,sizeof(short),n,fp); for (i=0;ielem(i) = double(xs[i]); } free((char *)xs); break; } case 4: // doubles FRead(&(vp->elem(0)),sizeof(double),n,fp); break; case 3: // floats { float *xf = (float *)malloc(n * (unsigned)sizeof(float)); FRead(xf,sizeof(float),n,fp); for (i=0;ielem(i) = double(xf[i]); } free((char *)xf); break; } case 2: // unsigned short ints { unsigned short *xi = (unsigned short *)malloc(n * (unsigned)sizeof(unsigned short)); FRead(xi,sizeof(unsigned short),n,fp); for (i=0;ielem(i) = double(xi[i]); } free((char *)xi); break; } case 1: // char { char *xc = (char *)malloc(n * (unsigned)sizeof(char)); FRead(xc,sizeof(char),n,fp); for (i=0;ielem(i) = double(xc[i]); } free(xc); break; } } return 1; } static double v_vwrite(void* v) { Vect* vp = (Vect*)v; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); FILE* fp = f->file(); if (!fp) { return 0.; } BinaryMode(f) // first, write the size of the vector int n = vp->capacity(); FWrite(&n,sizeof(int),1,fp); // next, write the type of elements int type = 4; if (ifarg(2)) { type = int(chkarg(2,1,5)); } FWrite(&type,sizeof(int),1,fp); // convert the data if necessary int i; void *s; const char* x; double min,r,sf,sub,intermed; switch (type) { case 5: // integers as ints (no scaling) { int* xi = (int *)malloc(n * sizeof(int)); for (i=0;ielem(i)); } FWrite(xi,sizeof(int),n,fp); free((char *)xi); break; } case 4: // doubles (no conversion unless BYTESWAP used and needed) { s = (void*)(&(vp->elem(0))); x = (const char*)s; FWrite(x,sizeof(double),n,fp); break; } case 3: // float (simple automatic type conversion) { float* xf = (float *)malloc(n * (unsigned)sizeof(float)); for (i=0;ielem(i)); } FWrite(xf,sizeof(float),n,fp); free((char *)xf); break; } case 2: // short ints (scale to 16 bits with compression) { min = vp->min(); r = vp->max()- min; if (r > 0) { sf = TWO_BYTE_HIGH/r; } else { sf = 1.; } unsigned short* xi = (unsigned short *)malloc(n * (unsigned)sizeof(unsigned short)); for (i=0;ielem(i)-min)*sf; xi[i] = (unsigned short)intermed; } s = (void*)xi; x = (const char*)s; // store the info needed to reconvert FWrite(&sf,sizeof(double),1,fp); FWrite(&min,sizeof(double),1,fp); // store the actual data FWrite(x,sizeof(unsigned short),n,fp); free((char *)xi); break; } case 1: // char (scale to 8 bits with compression) { sub = ONE_BYTE_HALF; min = vp->min(); r = vp->max()- min; if (r > 0) { sf = ONE_BYTE_HIGH/r; } else { sf = 1.; } char* xc = (char *)malloc(n * (unsigned)sizeof(char)); for (i=0;ielem(i)-min)*sf)-sub); } s = (void*)xc; x = (const char*)s; // store the info needed to reconvert FWrite(&sf,sizeof(double),1,fp); FWrite(&min,sizeof(double),1,fp); FWrite(x,sizeof(char),n,fp); free(xc); break; } } return 1; } static double v_vread(void* v) { Vect* vp = (Vect*)v; void* s = (void*)(vp->vec()); Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); BYTEHEADER FILE* fp = f->file(); if (!fp) { return 0.; } BinaryMode(f) int n; FRead(&n,sizeof(int),1,fp); int type = 0; FRead(&type,sizeof(int),1,fp); // since the type ranges from 1 to 5 (very important that it not be 0) // we can check the type and decide if it needs to be byteswapped if (type < 1 || type > 5) { BYTESWAP_FLAG = 1; }else{ BYTESWAP_FLAG = 0; } BYTESWAP(n,int) BYTESWAP(type,int) if (type < 1 || type > 5) { return 0.;} if (vp->capacity() != n) vp->resize(n); // read as appropriate type and convert to doubles int i; double sf = 1.; double min = 0.; double add; switch (type) { case 5: // ints; no conversion { int *xi = (int *)malloc(n * sizeof(int)); FRead(xi,sizeof(int),n,fp); for (i=0;ielem(i) = double(xi[i]); } free((char *)xi); break; } case 4: // doubles FRead(&(vp->elem(0)),sizeof(double),n,fp); if (BYTESWAP_FLAG == 1) { for (i=0;ielem(i),double) } } break; case 3: // floats { float *xf = (float *)malloc(n * (unsigned)sizeof(float)); FRead(xf,sizeof(float),n,fp); for (i=0;ielem(i) = double(xf[i]); } free((char *)xf); break; } case 2: // unsigned short ints { // convert back to double FRead(&sf,sizeof(double),1,fp); FRead(&min,sizeof(double),1,fp); BYTESWAP(sf,double) BYTESWAP(min,double) unsigned short *xi = (unsigned short *)malloc(n * (unsigned)sizeof(unsigned short)); FRead(xi,sizeof(unsigned short),n,fp); for (i=0;ielem(i) = double(xi[i]/sf +min); } free((char *)xi); break; } case 1: // char { // convert back to double FRead(&sf,sizeof(double),1,fp); FRead(&min,sizeof(double),1,fp); BYTESWAP(sf,double) BYTESWAP(min,double) char *xc = (char *)malloc(n * (unsigned)sizeof(char)); FRead(xc,sizeof(char),n,fp); add = ONE_BYTE_HALF; for (i=0;ielem(i) = double((xc[i]+add)/sf +min); } free(xc); break; } } return 1; } static double v_printf(void *v) { Vect* x = (Vect*)v; int top = x->capacity()-1; int start = 0; int end = top; int next_arg = 1; const char *format = "%g\t"; int print_file = 0; int extra_newline = 1; // when no File OcFile *f; if (ifarg(next_arg) && (hoc_is_object_arg(next_arg))) { Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); f = (OcFile*)(ob->u.this_pointer); format = "%g\n"; next_arg++; print_file = 1; } if (ifarg(next_arg) && (hoc_argtype(next_arg) == STRING)) { format = gargstr(next_arg); next_arg++; extra_newline = 0; } if (ifarg(next_arg)) { start = int(chkarg(next_arg,0,top)); end = int(chkarg(next_arg+1,start,top)); } if (print_file) { for (int i=start;i<=end;i++) { fprintf(f->file(),format,x->elem(i)); } fprintf(f->file(),"\n"); } else { for (int i=start;i<=end;i++) { printf(format,x->elem(i)); if (extra_newline && !((i-start+1)%5)){ printf("\n");} } if(extra_newline) {printf("\n");} } return double(end-start+1); } static double v_scanf(void *v) { Vect* x = (Vect*)v; int n = -1; int c = 1; int nc = 1; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); if (ifarg(4)) { n = int(*getarg(2)); c = int(*getarg(3)); nc = int(*getarg(4)); } else if (ifarg(3)) { c = int(*getarg(2)); nc = int(*getarg(3)); } else if (ifarg(2)) { n = int(*getarg(2)); } if (n >= 0) { x->resize(n); } // start at the right column int i=0; while((n < 0 || ieof()) { // skip unwanted columns before int j; for (j=1;jeof()) hoc_scan(f->file()); } // read data if (!f->eof()) { x->resize_chunk(i+1); x->elem(i) = hoc_scan(f->file()); } // skip unwanted columns after for (j=c;jeof()) hoc_scan(f->file()); } i++; } if (x->capacity() != i) x->resize(i); return double(i); } static double v_scantil(void *v) { Vect* x = (Vect*)v; double val, til; int c = 1; int nc = 1; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); til = *getarg(2); if (ifarg(4)) { c = int(*getarg(3)); nc = int(*getarg(4)); } // start at the right column int i=0; for(;;) { // skip unwanted columns before int j; for (j=1;jfile()) == til) { return double(i); } } // read data val = hoc_scan(f->file()); if (val == til) { break; } x->resize_chunk(i+1); x->elem(i) = val; // skip unwanted columns after for (j=c;jfile()); } i++; } return double(i); } /*ARGSUSED*/ static Object** v_plot(void* v) { Vect* vp = (Vect*)v; #if HAVE_IV IFGUI int i; double* y = vp->vec(); int n = vp->capacity(); Object* ob1 = *hoc_objgetarg(1); check_obj_type(ob1, "Graph"); Graph* g = (Graph*)(ob1->u.this_pointer); GraphVector* gv = new GraphVector(""); if (ifarg(5)) { hoc_execerror("Vector.line:", "too many arguments"); } if (narg() == 3) { gv->color((colors->color(int(*getarg(2))))); gv->brush((brushes->brush(int(*getarg(3))))); } else if (narg() == 4) { gv->color((colors->color(int(*getarg(3))))); gv->brush((brushes->brush(int(*getarg(4))))); } if (narg() == 2 || narg() == 4) { // passed a vector or xinterval and possibly line attributes if (hoc_is_object_arg(2)) { // passed a vector Vect* vp2 = vector_arg(2); n = Math::min(n, vp2->capacity()); for (i=0; i < n; ++i) gv->add(vp2->elem(i), y + i); } else { // passed xinterval double interval = *getarg(2); for (i=0; i < n; ++i) gv->add(i * interval, y + i); } } else { // passed line attributes or nothing for (i=0; i < n; ++i) gv->add(i, y + i); } if (vp->label_) { GLabel* glab = g->label(vp->label_); gv->label(glab); ((GraphItem*)g->component(g->glyph_index(glab)))->save(false); } g->append(new GPolyLineItem(gv)); g->flush(); ENDGUI #endif return vp->temp_objvar(); } static Object** v_ploterr(void* v) { Vect* vp = (Vect*)v; #if HAVE_IV IFGUI int n = vp->capacity(); Object* ob1 = *hoc_objgetarg(1); check_obj_type(ob1, "Graph"); Graph* g = (Graph*)(ob1->u.this_pointer); char style = '-'; double size = 4; if (ifarg(4)) size = chkarg(4,0.1,100.); const ivColor * color = g->color(); const ivBrush * brush = g->brush(); if (ifarg(5)) { color = colors->color(int(*getarg(5))); brush = brushes->brush(int(*getarg(6))); } Vect* vp2 = vector_arg(2); if (vp2->capacity() < n) n = vp2->capacity(); Vect* vp3 = vector_arg(3); if (vp3->capacity() < n) n = vp3->capacity(); for (int i=0; i < n; ++i) { g->begin_line(); g->line(vp2->elem(i),vp->elem(i) - vp3->elem(i)); g->line(vp2->elem(i),vp->elem(i) + vp3->elem(i)); g->mark(vp2->elem(i), vp->elem(i) - vp3->elem(i), style, size, color, brush); g->mark(vp2->elem(i), vp->elem(i) + vp3->elem(i), style, size, color, brush); } g->flush(); ENDGUI #endif return vp->temp_objvar(); } static Object** v_line(void* v) { Vect* vp = (Vect*)v; #if HAVE_IV IFGUI int i; int n = vp->capacity(); Object* ob1 = *hoc_objgetarg(1); check_obj_type(ob1, "Graph"); Graph* g = (Graph*)(ob1->u.this_pointer); char* s = vp->label_; if (ifarg(5)) { hoc_execerror("Vector.line:", "too many arguments"); } if (narg() == 3) { g->begin_line(colors->color(int(*getarg(2))), brushes->brush(int(*getarg(3))), s); } else if (narg() == 4) { g->begin_line(colors->color(int(*getarg(3))), brushes->brush(int(*getarg(4))), s); } else { g->begin_line(s); } if (narg() == 2 || narg() == 4) { // passed a vector or xinterval and possibly line attributes if (hoc_is_object_arg(2)) { // passed a vector Vect* vp2 = vector_arg(2); n = Math::min(n, vp2->capacity()); for (i=0; i < n; ++i) g->line(vp2->elem(i), vp->elem(i)); } else { // passed xinterval double interval = *getarg(2); for (i=0; i < n; ++i) g->line(i * interval, vp->elem(i)); } } else { // passed line attributes or nothing for (i=0; i < n; ++i) g->line(i, vp->elem(i)); } g->flush(); ENDGUI #endif return vp->temp_objvar(); } static Object** v_mark(void* v) { Vect* vp = (Vect*)v; #if HAVE_IV IFGUI int i; int n = vp->capacity(); Object* ob1 = *hoc_objgetarg(1); check_obj_type(ob1, "Graph"); Graph* g = (Graph*)(ob1->u.this_pointer); char style = '+'; if (ifarg(3)) { if (hoc_is_str_arg(3)) { style = *gargstr(3); } else { style = char(chkarg(3,0,10)); } } double size = 12; if (ifarg(4)) size = chkarg(4,0.1,100.); const ivColor * color = g->color(); if (ifarg(5)) color = colors->color(int(*getarg(5))); const ivBrush * brush = g->brush(); if (ifarg(6)) brush = brushes->brush(int(*getarg(6))); if (hoc_is_object_arg(2)) { // passed a vector Vect* vp2 = vector_arg(2); for (i=0; i < n; ++i) { g->mark(vp2->elem(i), vp->elem(i), style, size, color, brush); } } else { // passed xinterval double interval = *getarg(2); for (i=0; i < n; ++i) { g->mark(i*interval, vp->elem(i), style, size, color, brush); } } ENDGUI #endif return vp->temp_objvar(); } static Object** v_histogram(void* v) { Vect* x = (Vect*)v; double low = *getarg(1); double high = chkarg(2,low,1e99); double width = chkarg(3,0,high-low); // SampleHistogram h(low,high,width); int i; // for (i=0; i< x->capacity(); i++) h += x->elem(i); // int n = h.buckets(); // analogous to howManyBuckets in gnu/SamplHist.cpp int n = int(floor((high - low)/width)) + 2; Vect* y = new Vect(n); y->fill(0.); // for (i=0; i< n; i++) y->elem(i) = h.inBucket(i); for (i=0; i < x->capacity(); ++i) { int ind = int(floor((x->elem(i) - low)/width)) + 1; if (ind >= 0 && ind < y->capacity()) { y->elem(ind) += 1.0; } } return y->temp_objvar(); } static Object** v_hist(void* v) { Vect* hv = (Vect*)v; Vect* data = vector_arg(1); same_err("hist", hv, data); double start = *getarg(2); int size = int(*getarg(3)); double step = chkarg(4,1.e-99,1.e99); double high = start+step*size; // SampleHistogram h(start,high,step); // for (int i=0; i< data->capacity(); i++) h += data->elem(i); if (hv->capacity() != size) hv->resize(size); hv->fill(0.); for (int i=0; i< data->capacity(); i++) { int ind = int(floor((data->elem(i)-start)/step)); if (ind >=0 && ind < hv->capacity()) hv->elem(ind) += 1; } // for (i=0; i< size; i++) hv->elem(i) = h.inBucket(i); return hv->temp_objvar(); } static Object** v_sumgauss(void* v) { Vect* x = (Vect*)v; double low = *getarg(1); double high = chkarg(2,low,1e99); double step = chkarg(3,1.e-99,1.e99); double var = chkarg(4,0,1.e99); Vect* w; bool d = false; if (ifarg(5)) { w = vector_arg(5); } else { w = new Vect(x->capacity()); w->fill(1); d = true; } int points = int((high-low)/step + .5); Vect* sum = new Vect(points,0.); double svar = var/(step*step); // 4/28/93 ZFM: corrected bug: replaced svar w/ var in line below double scale = 1./hoc_Sqrt(2.*PI*var); for (int i=0;icapacity();i++) { double xv = int((x->elem(i)-low)/step); for (int j=0; j -20.) sum->elem(j) += hoc_Exp(arg) * scale * w->elem(i); } } if (d) { delete w; } return sum->temp_objvar(); } static Object** v_smhist(void* v) { Vect* v1 = (Vect*)v; Vect* data = vector_arg(1); double start = *getarg(2); int size = int(*getarg(3)); double step = chkarg(4,1.e-99,1.e99); double var = chkarg(5,0,1.e99); int weight,i; Vect *w; if (ifarg(6)) { w = vector_arg(6); weight = 1; } else { weight = 0; } // ready a gaussian to convolve double svar = 2*var/(step*step); double scale = 1/hoc_Sqrt(2.*PI*var); int g2 = int(sqrt(10*svar)); int g = g2*2+1; int n = 1; while(ncapacity();i++) { if (data->elem(i) >= start && data->elem(i) < high) { series[int((data->elem(i)-start)/step)] += w->elem(i); } } } else { for (i=0;icapacity();i++) { if (data->elem(i) >= start && data->elem(i) < high) { series[int((data->elem(i)-start)/step)] += 1.; } } } // ready the answer vector double *ans = (double *)calloc(2*n,(unsigned)sizeof(double)); // convolve nrn_convlv(series,n,gauss,g,1,ans); // put the answer in the vector if (v1->capacity() != size) v1->resize(size); v1->fill(0.,0,size); for (i=0;i EPSILON) v1->elem(i) = ans[i]; free((char*) series); free((char*) gauss); free((char*) ans); return v1->temp_objvar(); } static Object** v_ind(void* v) { Vect* x = (Vect*)v; Vect* y = vector_arg(1); Vect* z = new Vect(); int yv; int ztop = 0; int top = x->capacity(); z->resize(y->capacity()); z->resize(0); for (int i=0;icapacity();i++) { yv = int(y->elem(i)); if ((yv < top) && (yv >= 0)) { z->resize(++ztop); z->elem(ztop-1) = x->elem(yv); } } return z->temp_objvar(); } static double v_size(void* v) { Vect* x = (Vect*)v; return double(x->capacity()); } static double v_buffer_size(void* v) { Vect* x = (Vect*)v; if (ifarg(1)) { int n = (int)chkarg(1, (double)x->capacity(), dmaxint_); x->buffer_size(n); } return x->buffer_size(); } int IvocVect::buffer_size() { return space; } void IvocVect::buffer_size(int n) { double* y = new double[n]; if (len > n) { len = n; } for (int i=0; i < len; ++i) { y[i] = s[i]; } space = n; delete [] s; s = y; } static Object** v_resize(void* v) { Vect* x = (Vect*)v; x->resize(int(chkarg(1,0,dmaxint_))); return x->temp_objvar(); } static Object** v_clear(void* v) { Vect* x = (Vect*)v; x->resize(0); return x->temp_objvar(); } static double v_get(void* v) { Vect* x = (Vect*)v; return x->elem(int(chkarg(1,0,x->capacity()-1))); } static Object** v_set(void* v) { Vect* x = (Vect*)v; x->elem(int(chkarg(1,0,x->capacity()-1))) = *getarg(2); return x->temp_objvar(); } static Object** v_append(void* v) { Vect* x = (Vect*)v; int n,j,i=1; while (ifarg(i)) { if (hoc_argtype(i) == NUMBER) { x->resize_chunk(x->capacity()+1); x->elem(x->capacity()-1) = *getarg(i); } else if (hoc_is_object_arg(i)) { Vect* y = vector_arg(i); same_err("append", x, y); n = x->capacity(); x->resize_chunk(n+y->capacity()); for (j=0;jcapacity();j++) { x->elem(n+j) = y->elem(j); } } i++; } return x->temp_objvar(); } static Object** v_insert(void* v) { // insert all before indx (first arg) Vect* x = (Vect*)v; int n,j,m,i=2; int indx = (int)chkarg(1, 0, x->capacity()); m = x->capacity() - indx; double* z; if (m) { z = new double[m]; for (j=0; j < m; ++j) { z[j] = x->elem(indx + j); } } x->resize(indx); while (ifarg(i)) { if (hoc_argtype(i) == NUMBER) { x->resize_chunk(x->capacity()+1); x->elem(x->capacity()-1) = *getarg(i); } else if (hoc_is_object_arg(i)) { Vect* y = vector_arg(i); same_err("insrt", x, y); n = x->capacity(); x->resize_chunk(n+y->capacity()); for (j=0;jcapacity();j++) { x->elem(n+j) = y->elem(j); } } i++; } if (m) { n = x->capacity(); x->resize(n + m); for (j=0; j < m; ++j) { x->elem(n + j) = z[j]; } delete [] z; } return x->temp_objvar(); } static Object** v_remove(void* v) { Vect* x = (Vect*)v; int i, j, n, start, end; start = (int)chkarg(1, 0, x->capacity()-1); if (ifarg(2)) { end = (int)chkarg(2, start, x->capacity()-1); }else{ end = start; } n = x->capacity(); for (i=start, j=end+1; j < n; ++i, ++j) { x->elem(i) = x->elem(j); } x->resize(i); return x->temp_objvar(); } static double v_contains(void* v) { Vect* x = (Vect*)v; double g = *getarg(1); for (int i=0;icapacity();i++) { if (Math::equal(x->elem(i), g, hoc_epsilon)) return 1.; } return 0.; } static Object** v_copy(void* v) { Vect* y = (Vect*)v; Vect* x = vector_arg(1); int top = x->capacity()-1; int srcstart = 0; int srcend = top; int srcinc = 1; int deststart = 0; int destinc = 1; if (ifarg(2) && hoc_is_object_arg(2)) { Vect* srcind = vector_arg(2); int ns = srcind->capacity(); int nx = x->capacity(); if (ifarg(3)) { Vect* destind = vector_arg(3); if (destind->capacity() < ns) { ns = destind->capacity(); } int ny = y->capacity(); for (int i=0; i < ns; ++i) { int ix = (int) (srcind->elem(i) + hoc_epsilon); int iy = (int) (destind->elem(i) + hoc_epsilon); if (ix >= 0 && iy >= 0 && ix < nx && iy < ny) { y->elem(iy) = x->elem(ix); } } }else{ if (y->capacity() < nx) { nx = y->capacity(); } for (int i=0; i < ns; ++i) { int ii = (int)(srcind->elem(i) + hoc_epsilon); if (ii >= 0 && ii < nx) { y->elem(ii) = x->elem(ii); } } } return y->temp_objvar(); } if (ifarg(2) && !(ifarg(3))) { deststart = int(*getarg(2)); } else { if (ifarg(4)) { deststart = int(*getarg(2)); srcstart = int(chkarg(3,0,top)); srcend = int(chkarg(4,-1,top)); if (ifarg(5)) { destinc = int(chkarg(5, 1, dmaxint_)); srcinc = int(chkarg(6, 1, dmaxint_)); } } else if (ifarg(3)) { srcstart = int(chkarg(2,0,top)); srcend = int(chkarg(3,-1,top)); } } if (srcend == -1) { srcend = top; }else if (srcend < srcstart) { hoc_execerror("Vector.copy: src_end arg smaller than src_start", 0); } int size = (srcend-srcstart)/srcinc; size *= destinc; size += deststart+1; if (y->capacity() < size) { y->resize(size); }else if (y->capacity() > size && !ifarg(2)) { y->resize(size); } int i, j; for (i=srcstart, j=deststart; i<=srcend; i+=srcinc, j+=destinc) { y->elem(j) = x->elem(i); } return y->temp_objvar(); } static Object** v_at(void* v) { Vect* x = (Vect*)v; int top = x->capacity()-1; int start = 0; int end = top; if (ifarg(1)) { start = int(chkarg(1,0,top)); } if (ifarg(2)) { end = int(chkarg(2,start,top)); } int size = end-start+1; Vect* y = new Vect(size); // ZFM: fixed bug -- ielem(i) = x->elem(i+start); return y->temp_objvar(); } #define USE_MLH_GSORT 0 #if !USE_MLH_GSORT typedef struct {double x; int i;} SortIndex; static int sort_index_cmp(const void* a, const void* b) { double x = ((SortIndex*)a)->x; double y = ((SortIndex*)b)->x; if (x > y) return (1); if (x < y) return (-1); return (0); } static Object** v_sortindex(void* v) { // v.index(vsrc, vsrc.sortindex) sorts vsrc into v int i, n; Vect* x = (Vect*)v; n = x->capacity(); Vect* y; possible_destvec(1, y); y->resize(n); SortIndex* si = new SortIndex[n]; for (i=0; i < n; ++i) { si[i].i = i; si[i].x = x->elem(i); } // On BlueGene // qsort apparently can generate errno 38 "Function not implemented" qsort((void*)si, n, sizeof(SortIndex), sort_index_cmp); errno = 0; for (i=0; ielem(i) = (double)si[i].i; delete [] si; return y->temp_objvar(); } #else static Object** v_sortindex(void* v) { // v.index(vsrc, vsrc.sortindex) sorts vsrc into v int i, n; Vect* x = (Vect*)v; n = x->capacity(); Vect* y; possible_destvec(1, y); y->resize(n); int* si = new int[n]; for (i=0; i < n; ++i) { si[i] = i; } nrn_mlh_gsort(vector_vec(x), si, n, cmpfcn); for (i=0; ielem(i) = (double)si[i]; delete [] si; return y->temp_objvar(); } #endif // USE_MLH_GSORT static Object** v_c(void* v) { return v_at(v); } static Object** v_cl(void* v) { Object** r = v_at(v); ((Vect*)((*r)->u.this_pointer))->label(((Vect*)v)->label_); return r; } static Object** v_interpolate(void* v) { Vect* yd = (Vect*)v; Vect* xd = vector_arg(1); Vect* xs = vector_arg(2); Vect* ys; int flag, is, id, nd, ns; double thet; ns = xs->capacity(); nd = xd->capacity(); if (ifarg(3)) { ys = vector_arg(3); flag = 0; }else{ ys = new Vect(*yd); flag = 1; } yd->resize(nd); // before domain for (id = 0; id < nd && xd->elem(id) <= xs->elem(0); ++id) { yd->elem(id) = ys->elem(0); } // in domain for (is = 1; is < ns && id < nd; ++is) { if (xs->elem(is) <= xs->elem(is-1)) { continue; } while (xd->elem(id) <= xs->elem(is)) { thet = (xd->elem(id) - xs->elem(is-1))/(xs->elem(is) - xs->elem(is-1)); yd->elem(id) = (1.-thet)*(ys->elem(is-1)) + thet*(ys->elem(is)); ++id; if (id >= nd) { break; } } } // after domain for (; id < nd; ++id) { yd->elem(id) = ys->elem(ns-1); } if (flag) { delete ys; } return yd->temp_objvar(); } static int possible_srcvec(ParentVect*& src, Vect* dest, int& flag) { if (ifarg(1) && hoc_is_object_arg(1)) { src = vector_arg(1); flag = 0; return 2; }else{ src = new ParentVect(*dest); flag = 1; return 1; } } static Object** v_where(void* v) { Vect* y = (Vect*)v; ParentVect* x; int iarg, flag; iarg = possible_srcvec(x, y, flag); int n = x->capacity(); int m = 0; int i; char* op = gargstr(iarg++); double value = *getarg(iarg++); double value2; y->resize(0); if (!strcmp(op,"==")) { for (i=0; ielem(i), value, hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"!=")) { for (i=0; ielem(i), value, hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,">")) { for (i=0; ielem(i) > value + hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"<")) { for (i=0; ielem(i) < value - hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,">=")) { for (i=0; ielem(i) >= value - hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"<=")) { for (i=0; ielem(i) <= value + hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"()")) { value2 = *getarg(iarg); for (i=0; ielem(i) > value + hoc_epsilon) && (x->elem(i) < value2 - hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"[]")) { value2 = *getarg(iarg); for (i=0; ielem(i) >= value - hoc_epsilon) && (x->elem(i) <= value2 + hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"[)")) { value2 = *getarg(iarg); for (i=0; ielem(i) >= value - hoc_epsilon) && (x->elem(i) < value2 - hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else if (!strcmp(op,"(]")) { value2 = *getarg(iarg); for (i=0; ielem(i) > value + hoc_epsilon) && (x->elem(i) <= value2 + hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = x->elem(i); } } } else { hoc_execerror("Vector","Invalid comparator in .where()\n"); } if (flag) { delete x; } return y->temp_objvar(); } static double v_indwhere(void* v) { Vect* x = (Vect*)v; int i, iarg, m=0; char* op; double value,value2; op = gargstr(1); value = *getarg(2); iarg = 3; int n = x->capacity(); if (!strcmp(op,"==")) { for (i=0; ielem(i), value, hoc_epsilon)) { return i; } } } else if (!strcmp(op,"!=")) { for (i=0; ielem(i), value, hoc_epsilon)) { return i; } } } else if (!strcmp(op,">")) { for (i=0; ielem(i) > value + hoc_epsilon) { return i; } } } else if (!strcmp(op,"<")) { for (i=0; ielem(i) < value - hoc_epsilon) { return i; } } } else if (!strcmp(op,">=")) { for (i=0; ielem(i) >= value - hoc_epsilon) { return i; } } } else if (!strcmp(op,"<=")) { for (i=0; ielem(i) <= value + hoc_epsilon) { return i; } } } else if (!strcmp(op,"()")) { value2 = *getarg(iarg); for (i=0; ielem(i) > value + hoc_epsilon) && (x->elem(i) < value2 - hoc_epsilon)) { return i; } } } else if (!strcmp(op,"[]")) { value2 = *getarg(iarg); for (i=0; ielem(i) >= value - hoc_epsilon) && (x->elem(i) <= value2 + hoc_epsilon)) { return i; } } } else if (!strcmp(op,"[)")) { value2 = *getarg(iarg); for (i=0; ielem(i) >= value - hoc_epsilon) && (x->elem(i) < value2 - hoc_epsilon)) { return i; } } } else if (!strcmp(op,"(]")) { value2 = *getarg(iarg); for (i=0; ielem(i) > value + hoc_epsilon) && (x->elem(i) <= value2 + hoc_epsilon)) { return i; } } } else { hoc_execerror("Vector","Invalid comparator in .indwhere()\n"); } return -1.; } static Object** v_indvwhere(void* v) { Vect* y = (Vect*)v; ParentVect* x; int i, iarg, m=0, flag; char* op; double value,value2; iarg = possible_srcvec(x, y, flag); op = gargstr(iarg++); value = *getarg(iarg++); y->resize(0); int n = x->capacity(); if (!strcmp(op,"==")) { for (i=0; ielem(i), value, hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"!=")) { for (i=0; ielem(i), value, hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,">")) { for (i=0; ielem(i) > value + hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"<")) { for (i=0; ielem(i) < value - hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,">=")) { for (i=0; ielem(i) >= value - hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"<=")) { for (i=0; ielem(i) <= value + hoc_epsilon) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"()")) { value2 = *getarg(iarg); for (i=0; ielem(i) > value + hoc_epsilon) && (x->elem(i) < value2 - hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"[]")) { value2 = *getarg(iarg); for (i=0; ielem(i) >= value - hoc_epsilon) && (x->elem(i) <= value2 + hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"[)")) { value2 = *getarg(iarg); for (i=0; ielem(i) >= value - hoc_epsilon) && (x->elem(i) < value2 - hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else if (!strcmp(op,"(]")) { value2 = *getarg(iarg); for (i=0; ielem(i) > value + hoc_epsilon) && (x->elem(i) <= value2 + hoc_epsilon)) { y->resize_chunk(++m); y->elem(m-1) = i; } } } else { hoc_execerror("Vector","Invalid comparator in .indvwhere()\n"); } if (flag) { delete x; } return y->temp_objvar(); } static Object** v_fill(void* v) { Vect* x = (Vect*)v; int top = x->capacity()-1; int start = 0; int end = top; if (ifarg(2)) { start = int(chkarg(2,0,top)); end = int(chkarg(3,start,top)); } x->fill(*getarg(1),start,end-start+1); return x->temp_objvar(); } static Object** v_indgen(void* v) { Vect* x = (Vect*)v; int n = x->capacity(); double start = 0.; double step = 1.; double end = double(n-1); if (ifarg(1)) { if (ifarg(3)) { start = *getarg(1); end = *getarg(2); step = chkarg(3,Math::min(start-end,end-start),Math::max(start-end,end-start)); double xn = floor((end-start)/step + EPSILON)+1.; if (xn > dmaxint_) { hoc_execerror("size too large", 0); } else if (xn < 0) { hoc_execerror("empty set", 0); } n = int(xn); if (n != x->capacity()) x->resize(n); } else if (ifarg(2)) { start = *getarg(1); step = chkarg(2,-dmaxint_,dmaxint_); } else { step = chkarg(1,-dmaxint_,dmaxint_); } } for (int i=0;ielem(i) = double(i)*step+start; } return x->temp_objvar(); } static Object** v_addrand(void* v) { Vect* x = (Vect*)v; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "Random"); Rand* r = (Rand*)(ob->u.this_pointer); int top = x->capacity()-1; int start = 0; int end = top; if (ifarg(2)) { start = int(chkarg(2,0,top)); end = int(chkarg(3,start,top)); } for (int i=start;i<=end;i++) x->elem(i) += (*(r->rand))(); return x->temp_objvar(); } static Object** v_setrand(void* v) { Vect* x = (Vect*)v; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "Random"); Rand* r = (Rand*)(ob->u.this_pointer); int top = x->capacity()-1; int start = 0; int end = top; if (ifarg(2)) { start = int(chkarg(2,0,top)); end = int(chkarg(3,start,top)); } for (int i=start;i<=end;i++) x->elem(i) = (*(r->rand))(); return x->temp_objvar(); } static Object** v_apply(void* v) { Vect* x = (Vect*)v; char* func = gargstr(1); int top = x->capacity()-1; int start = 0; int end = top; Object* ob; if (ifarg(2)) { start = int(chkarg(2,0,top)); end = int(chkarg(3,start,top)); } Symbol* s = hoc_lookup(func); ob = hoc_thisobject; if (!s) { ob = NULL; s = hoc_table_lookup(func, hoc_top_level_symlist); if (!s) { hoc_execerror(func, " is undefined"); } } for (int i=start; i<=end; i++) { hoc_pushx(x->elem(i)); x->elem(i) = hoc_call_objfunc(s, 1, ob); } return x->temp_objvar(); } static double v_reduce(void* v) { Vect* x = (Vect*)v; double base = 0; int top = x->capacity()-1; int start = 0; int end = top; if (ifarg(3)) { start = int(chkarg(3,0,top)); end = int(chkarg(4,start,top)); } char* func = gargstr(1); if (ifarg(2)) base = *getarg(2); Symbol* s = hoc_lookup(func); if (!s) { hoc_execerror(func, " is undefined"); } for (int i=start; i<=end; i++) { hoc_pushx(x->elem(i)); base += hoc_call_func(s, 1); } return base; } static double v_min(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); return x->subvec(start, end)->min(); } else { return x->min(); } } static double v_min_ind(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); return x->subvec(start, end)->min_index()+start; } else { return x->min_index(); } } static double v_max(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); return x->subvec(start, end)->max(); } else { return x->max(); } } static double v_max_ind(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); return (x->subvec(start,end))->max_index()+start; } else { return x->max_index(); } } static double v_sum(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); return (x->subvec(start,end))->sum(); } else { return x->sum(); } } static double v_sumsq(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); return (x->subvec(start,end))->sumsq(); } else { return x->sumsq(); } } static double v_mean(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); if (end - start < 1) { hoc_execerror("end - start", "must be > 0"); } return (x->subvec(start,end))->mean(); } else { if (x->capacity() < 1) { hoc_execerror("Vector", "must have size > 0"); } return x->mean(); } } static double v_var(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); if (end - start < 1) { hoc_execerror("end - start", "must be > 1"); } return (x->subvec(start,end))->var(); } else { if (x->capacity() < 2) { hoc_execerror("Vector", "must have size > 1"); } return x->var(); } } static double v_stdev(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); if (end - start < 1) { hoc_execerror("end - start", "must be > 1"); } return (x->subvec(start,end))->stdDev(); } else { if (x->capacity() < 2) { hoc_execerror("Vector", "must have size > 1"); } return x->stdDev(); } } static double v_stderr(void* v) { Vect* x = (Vect*)v; int x_max = x->capacity()-1; if (ifarg(1)) { int start = int(chkarg(1,0,x_max)); int end = int(chkarg(2,0,x_max)); if (end - start < 1) { hoc_execerror("end - start", "must be > 1"); } return (x->subvec(start,end))->stdDev()/hoc_Sqrt(double(end-start+1)); } else { if (x->capacity() < 2) { hoc_execerror("Vector", "must have size > 1"); } return x->stdDev()/hoc_Sqrt((double)x_max+1.); } } static double v_meansqerr(void* v1) { Vect* x = (Vect*)v1; Vect* y = vector_arg(1); Vect* w = NULL; if (ifarg(2)) { w = vector_arg(2); } double err = 0.; int size = x->capacity(); if (size > y->capacity() || !size) { hoc_execerror("Vector","Vector argument too small\n"); } else { if (w) { if (size > w->capacity()) { hoc_execerror("Vector","second Vector size too small\n"); } for (int i=0;ielem(i) - y->elem(i); err += diff*diff*w->elem(i); } }else{ for (int i=0;ielem(i) - y->elem(i); err += diff*diff; } } } return err/size; } static double v_dot(void* v1) { Vect* x = (Vect*)v1; Vect* y = vector_arg(1); return (*x) * (*y); } static double v_mag(void* v1) { Vect* x = (Vect*)v1; return hoc_Sqrt(x->sumsq()); } static Object** v_from_double(void* v) { Vect* x = (Vect*)v; int i; int n = (int)*getarg(1); double* px = hoc_pgetarg(2); x->resize(n); for (i=0; i < n; ++i) { x->elem(i) = px[i]; } return x->temp_objvar(); } static Object** v_add(void* v1) { Vect* x = (Vect*)v1; if (hoc_argtype(1) == NUMBER) { (*x) += *getarg(1); } if (hoc_is_object_arg(1)) { Vect* y = vector_arg(1); if (x->capacity() != y->capacity()) { hoc_execerror("Vector","Vector argument to .add() wrong size\n"); } else { (*x) += (*y); } } return x->temp_objvar(); } static Object** v_sub(void* v1) { Vect* x = (Vect*)v1; if (hoc_argtype(1) == NUMBER) { (*x) -= *getarg(1); } if (hoc_is_object_arg(1)) { Vect* y = vector_arg(1); if (x->capacity() != y->capacity()) { hoc_execerror("Vector","Vector argument to .sub() wrong size\n"); } else { (*x) -= (*y); } } return x->temp_objvar(); } static Object** v_mul(void* v1) { Vect* x = (Vect*)v1; if (hoc_argtype(1) == NUMBER) { (*x) *= *getarg(1); } if (hoc_is_object_arg(1)) { Vect* y = vector_arg(1); if (x->capacity() != y->capacity()) { hoc_execerror("Vector","Vector argument to .mult() wrong size\n"); } else { x->product(*y); } } return x->temp_objvar(); } static Object** v_div(void* v1) { Vect* x = (Vect*)v1; if (hoc_argtype(1) == NUMBER) { (*x) /= *getarg(1); } if (hoc_is_object_arg(1)) { Vect* y = vector_arg(1); if (x->capacity() != y->capacity()) { hoc_execerror("Vector","Vector argument to .div() wrong size\n"); } else { x->quotient(*y); } } return x->temp_objvar(); } static double v_scale(void* v1) { Vect* x = (Vect*)v1; double a = *getarg(1); double b = *getarg(2); double sf; double r = x->max()-x->min(); if (r > 0) { sf = (b-a)/r; (*x) -= x->min(); (*x) *= sf; (*x) += a; } else { sf = 0.; } return sf; } static double v_eq(void* v1) { Vect* x = (Vect*)v1; Vect* y = vector_arg(1); int i, n = x->capacity(); if (n != y->capacity()) { return false; } for (i=0; i < n; ++i) { if (!Math::equal(x->elem(i), y->elem(i), hoc_epsilon)) { return false; } } return true; } /*============================================================================= FITTING A MULTIVARIABLE FUNCTION FROM DATA -- SIMPLEX METHOD double simplex( p,n,trial,a,b,c,d ) double *p; vector of dimension n, containing variables int n; number of variables of the function to fit int trial; number of trials of simplex loop trial = 0: do simplex until the minimum pole has found trial > 0: do simplex [trial] times. double a,b,c,d values of contraction/expansion of the simplex; control the rate of the search in multidim variable space must be chosen by trial and error 2.0, 1.4, 0.7, 0.3 -> standard values return most optimized eval value (negative if error occured) A function must be supplied by the user: external function DOUBLE EVAL(double *p); This function evaluates the mean square error between the the data and the multivariable function with the values of variables in vector p. =============================================================================*/ #define SIMPLEX_MAXN 1e+300 #define SIMPLEX_INORM 1.2 /* 1.2: normal, 1.3: extensive search, 1.1: final adjustments */ #define SIMPLEX_ALPHA 2.0 #define SIMPLEX_BETA 1.4 #define SIMPLEX_GAMMA 0.7 #define SIMPLEX_DELTA 0.3 /* values of contraction/expansion of the simplex; control the rate of the search in multidim variable space must be chosen by trial and error 2.0, 1.4, 0.7, 0.3 -> standard values */ static double splx_evl_; static int renew_; static double eval(double *p, int n, Vect *x, Vect *y, char *fcn) { double sq_err = 0.; double guess; int i; double dexp,t,amp1,tau1,amp2,tau2; if (!strcmp(fcn,"exp2")) { if (n < 4) hoc_execerror("Vector",".fit(\"exp2\") requires amp1,tau1,amp2,tau2"); amp1 = p[0]; tau1 = p[1]; amp2 = p[2]; tau2 = p[3]; for (i=0;icapacity();i++) { t = x->elem(i); dexp = amp1*hoc_Exp(-t/tau1) + amp2*hoc_Exp(-t/tau2); guess = dexp - y->elem(i); sq_err += guess * guess; } } else if (!strcmp(fcn,"charging")) { if (n < 4) hoc_execerror("Vector",".fit(\"charging\") requires amp1,tau1,amp2,tau2"); amp1 = p[0]; tau1 = p[1]; amp2 = p[2]; tau2 = p[3]; for (i=0;icapacity();i++) { t = x->elem(i); dexp = amp1*(1-hoc_Exp(-t/tau1)) + amp2*(1-hoc_Exp(-t/tau2)); guess = dexp - y->elem(i); sq_err += guess * guess; } } else if (!strcmp(fcn,"exp1")) { if (n < 2) hoc_execerror("Vector",".fit(\"exp1\") requires amp,tau"); amp1 = p[0]; tau1 = p[1]; for (i=0;icapacity();i++) { t = x->elem(i); dexp = amp1*hoc_Exp(-t/tau1); guess = dexp - y->elem(i); sq_err += guess * guess; } } else if (!strcmp(fcn,"line")) { if (n < 2) hoc_execerror("Vector",".fit(\"line\") requires slope,intercept"); for (i=0;icapacity();i++) { guess = (p[0]*x->elem(i) + p[1]) - y->elem(i); sq_err += guess * guess; } } else if (!strcmp(fcn,"quad")) { if (n < 3) hoc_execerror("Vector",".fit(\"quad\") requires ax^2+bx+c"); for (i=0;icapacity();i++) { guess = (p[0]*x->elem(i)*x->elem(i) + p[1]*x->elem(i) + p[2]) - y->elem(i); sq_err += guess * guess; } } else { for (i=0;icapacity();i++) { // first the independent variable hoc_pushx(x->elem(i)); // then other parameters for (int j=0;jelem(i); sq_err += guess * guess; } } return sq_err/x->capacity(); } static double eval_error(double *p, int n, Vect *x, Vect *y, char *fcn) { double retval; if (renew_ > 3*(n+1)) { retval = eval(p,n,x,y,fcn); if (retval == splx_evl_) return(splx_evl_); else return( SIMPLEX_MAXN ); } else{ retval = eval(p,n,x,y,fcn); if (splx_evl_ > retval) splx_evl_ = retval; return(retval); } } static double simplex(double *p, int n, Vect *x, Vect *y, char* fcn) { int i,j; int emaxp; /* max position */ int eminp; int ptr; double *evortex; /* eval value of votexes */ double *gvortex; /* the vector of gravity */ double *vortex; /* parameter matrix */ double *nvortex; /* new vortex */ double emax; double emin; double fv1; evortex = (double *)calloc(n+1,(unsigned)sizeof(double)); gvortex = (double *)calloc(n, (unsigned)sizeof(double)); vortex = (double *)calloc(n*(n+1),(unsigned)sizeof(double)); nvortex = (double *)calloc(n*4,(unsigned)sizeof(double)); if( 0==evortex || 0==gvortex || 0==vortex || 0==nvortex ){ printf("allocation error in simplex()\n"); nrn_exit(1); } // NEXT:; /* make the initial vortex matrix */ for(i=0;iemax ){ emax=fv1; emaxp=i; } if( fv1 0: do simplex [trial] times. */ // get the data vector Vect* y = (Vect*)v; // get a vector to place the fitted function Vect* fitted = vector_arg(1); if (fitted->capacity() != y->capacity()) fitted->resize(y->capacity()); // get a function to fit char *fcn; fcn = gargstr(2); // get the independent variable Vect* x = vector_arg(3); if (x->capacity() != y->capacity()) { hoc_execerror("Vector","Indep argument to .fit() wrong size\n"); } // get the parameters of the function double * p_ptr[MAX_FIT_PARAMS]; double p[MAX_FIT_PARAMS]; if (ifarg(MAX_FIT_PARAMS)) { hoc_execerror("Vector","Too many parameters to fit()\n"); } int n = 0; while(ifarg(4+n)) { // pointer to parameter p_ptr[n] = hoc_pgetarg(4+n); // parameter value p[n] = *(p_ptr[n]); n++; } double meansqerr = call_simplex(p,n,x,y,fcn,trial); // assign data to pointers where they came from; int i; for(i=0;icapacity();i++) { fitted->elem(i) = p[0]*hoc_Exp(-(x->elem(i)/p[1])) + p[2]*hoc_Exp(-(x->elem(i)/p[3])); } } else if (!strcmp(fcn,"charging")) { for(i=0;icapacity();i++) { fitted->elem(i) = p[0]*(1-hoc_Exp(-(x->elem(i)/p[1]))) + p[2]*(1-hoc_Exp(-(x->elem(i)/p[3]))); } } else if (!strcmp(fcn,"exp1")) { for(i=0;icapacity();i++) { fitted->elem(i) = p[0]*hoc_Exp(-(x->elem(i)/p[1])); } } else if (!strcmp(fcn,"line")) { for(i=0;icapacity();i++) { fitted->elem(i) = p[0]*x->elem(i)+p[1]; } } else if (!strcmp(fcn,"quad")) { for(i=0;icapacity();i++) { fitted->elem(i) = p[0]*x->elem(i)*x->elem(i) + p[1]*x->elem(i) + p[2]; } } else { for(i=0;icapacity();i++) { hoc_pushx(x->elem(i)); for (int j=0;jelem(i) = hoc_call_func(hoc_lookup(fcn), n+1); } } return meansqerr; } // FOURIER analysis static Object** v_correl(void* v) { Vect* v3 = (Vect*)v; Vect* v1; Vect* v2; // first data set v1 = vector_arg(1); // second data set if (ifarg(2)) { v2 = vector_arg(2); } else { v2 = v1; } // make both data sets equal integer power of 2 int v1n = v1->capacity(); int v2n = v2->capacity(); int m = (v1n > v2n) ? v1n : v2n; int n = 1; while(n < m) n*=2; double *d1 = (double *)calloc(n,(unsigned)sizeof(double)); int i; for (i=0;ielem(i); double *d2 = (double *)calloc(n,(unsigned)sizeof(double)); for (i=0;ielem(i); double *ans = (double *)calloc(n,(unsigned)sizeof(double)); nrn_correl(d1, d2, n, ans); if (v3->capacity() != n) v3->resize(n); for (i=0;ielem(i)=ans[i]; free((char *)d1); free((char *)d2); free((char *)ans); return v3->temp_objvar(); } static Object** v_convlv(void* v) { Vect* v3 = (Vect*)v; Vect* v1, *v2; // data set v1 = vector_arg(1); // filter v2 = vector_arg(2); // convolve unless isign is -1, then deconvolve! int isign; if (ifarg(3)) isign = (int)(*getarg(3)); else isign = 1; // make both data sets equal integer power of 2 int v1n = v1->capacity(); int v2n = v2->capacity(); int m = (v1n > v2n) ? v1n : v2n; int n = 1; while(n < m) n*=2; double *data = (double *)calloc(n,(unsigned)sizeof(double)); int i; for (i=0;ielem(i); // assume respns is given in "wrap-around" order, // with countup t=0..t=n/2 followed by countdown t=n..t=n/2 // v2n should be an odd <= n double *respns = (double *)calloc(n,(unsigned)sizeof(double)); for (i=0;ielem(i); double *ans = (double *)calloc(2*n,(unsigned)sizeof(double)); nrn_convlv(data,n,respns,v2n,isign,ans); if (v3->capacity() != n) v3->resize(n); for (i=0;ielem(i)=ans[i]; free((char *)data); free((char *)respns); free((char *)ans); return v3->temp_objvar(); } static Object** v_spctrm(void* v) { Vect* ans = (Vect*)v; // n data pts will be divided into k partitions of size m // the spectrum will have m values from 0 to m/2 cycles/dt. // n = (2*k+1)*m // data set Vect* v1 = vector_arg(1); int dc = v1->capacity(); int mr; if (ifarg(2)) mr = (int)(*getarg(2)); else mr = dc/8; // make sure the length of partitions is integer power of 2 int m = 1; while(melem(i); if (ans->capacity() < m) ans->resize(m); nrn_spctrm(data, &ans->elem(0), m, k); free((char *)data); return ans->temp_objvar(); } static Object** v_filter(void* v) { Vect* v3 = (Vect*)v; Vect* v1; Vect *v2; int iarg = 1; // data set if (hoc_is_object_arg(iarg)) { v1 = vector_arg(iarg++); }else{ v1 = v3; } // filter v2 = vector_arg(iarg); // make both data sets equal integer power of 2 int v1n = v1->capacity(); int v2n = v2->capacity(); int m = (v1n > v2n) ? v1n : v2n; int n = 1; while(n < m) n*=2; double *data = (double *)calloc(n,(unsigned)sizeof(double)); int i; for (i=0;ielem(i); double *filter = (double *)calloc(n,(unsigned)sizeof(double)); for (i=0;ielem(i); double *ans = (double *)calloc(2*n,(unsigned)sizeof(double)); nrngsl_realft(filter,n,1); nrn_convlv(data,n,filter,v2n,1,ans); if (v3->capacity() != n) v3->resize(n); for (i=0;ielem(i)=ans[i]; free((char *)data); free((char *)filter); free((char *)ans); return v3->temp_objvar(); } static Object** v_fft(void* v) { Vect* v3 = (Vect*)v; Vect* v1; int iarg = 1; // data set if (hoc_is_object_arg(iarg)) { v1 = vector_arg(iarg++); }else{ v1 = v3; } // inverse = -1, regular = 1 int inv = 1; if (ifarg(iarg)) inv = int(chkarg(iarg,-1,1)); // make data set integer power of 2 int v1n = v1->capacity(); int n = 1; while(n < v1n) n*=2; double *data = (double *)calloc(n,(unsigned)sizeof(double)); int i; for (i=0;ielem(i); if (v3->capacity() != n) v3->resize(n); if (inv == -1) { nrn_nrc2gsl(data, &v3->elem(0), n); nrngsl_realft(&v3->elem(0), n, -1); }else{ nrngsl_realft(data, n, 1); nrn_gsl2nrc(data, &v3->elem(0), n); } free((char *)data); return v3->temp_objvar(); } static Object** v_spikebin(void* v) { Vect* ans = (Vect*)v; // data set Vect* v1 = vector_arg(1); double thresh = *getarg(2); int bin = 1; if (ifarg(3)) bin = int(chkarg(3,0,1e6)); int n = v1->capacity()/bin; if (ans->capacity() != n) ans->resize(n); ans->fill(0); int firing = 0; int k; for (int i=0; ielem(k) >= thresh && !firing) { firing = 1; ans->elem(i)=1; } else if (firing && v1->elem(k) < thresh) { firing = 0; } } } return ans->temp_objvar(); } static Object** v_rotate(void* v) { Vect* a = (Vect*)v; int wrap = 1; int rev = 0; int n = a->capacity(); int r = int(*getarg(1)); if (ifarg(2)) wrap = 0; if (r>n) r = r%n; if (r<0) { r = n-(Math::abs(r)%n); rev = 1; } if (r > 0) { int rc = n-r; double *hold = (double *)calloc(n,(unsigned)sizeof(double)); int i; if (wrap) { for (i=0;ielem(i); for (i=0;ielem(i+rc); } else { if (rev==0) { for (i=0;ielem(i); for (i=0;ielem(i+rc); for (i=r;ielem(i) = hold[i]; free((char *)hold); } return a->temp_objvar(); } static Object** v_deriv(void* v) { Vect* ans = (Vect*)v; ParentVect* v1; int flag, iarg = 1; // data set iarg = possible_srcvec(v1, ans, flag); int n = v1->capacity(); if (n < 2) { hoc_execerror("Can't take derivative of Vector with less than two points", 0); } if (ans->capacity() != n) ans->resize(n); double dx = 1; if(ifarg(iarg)) dx = *getarg(iarg++); int sym = 2; if(ifarg(iarg)) sym = int(chkarg(iarg++,1,2)); if (sym == 2) { // use symmetrical form -- see NumRcpC p. 187. // at boundaries use single-sided form ans->elem(0) = (v1->elem(1) - v1->elem(0))/dx; ans->elem(n-1) = (v1->elem(n-1) - v1->elem(n-2))/dx; dx = dx*2; for (int i=1;ielem(i) = (v1->elem(i+1) - v1->elem(i-1))/dx; } } else { // use single-sided form ans->resize(n-1); for (int i=0;ielem(i) = (v1->elem(i+1) - v1->elem(i))/dx; } } if (flag) { delete v1; } return ans->temp_objvar(); } static Object** v_integral(void* v) { Vect* ans = (Vect*)v; Vect* v1; int iarg = 1; // data set if (ifarg(iarg) && hoc_is_object_arg(iarg)) { v1 = vector_arg(iarg++); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); double dx = 1.; if(ifarg(iarg)) dx = *getarg(iarg++); ans->elem(0) = v1->elem(0); for (int i=1;ielem(i) = ans->elem(i-1) + v1->elem(i) * dx; } return ans->temp_objvar(); } static double v_trigavg(void* v) { ParentVect* avg = (ParentVect*)((Vect*)v); // continuous data(t) Vect* data = vector_arg(1); // trigger times Vect* trig = vector_arg(2); int n = data->capacity(); int pre = int(chkarg(3,0,n-1)); int post = int(chkarg(4,0,n-1)); int m = pre+post; if (avg->capacity() != m) avg->resize(m); int l = trig->capacity(); int trcount = 0; (*avg) = 0.; for (int i=0;ielem(i)); // throw out events within the window size of the edges if (tr >= pre && tr < n-post) { trcount++; for (int j=-pre;jelem(j+pre) += data->elem(tr+j); } } } (*avg) /= trcount; return trcount; } static Object** v_medfltr(void* v) { Vect* ans = (Vect*)v; ParentVect* v1; int w0, w1, wlen, i, flag, iarg = 1; // data set iarg = possible_srcvec(v1, ans, flag); int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); int points = 3; if (ifarg(iarg)) points = int(chkarg(iarg,1,n/2)); double *res = (double *)calloc(n,(unsigned)sizeof(double)); for (i=0; i= points) ? i-points : 0; w1 = (i < n-points) ? i+points : n-1; wlen = w1-w0; ParentVect window = v1->at(w0,wlen); window.sort(&cmpfcn); res[i] = window[wlen/2]; } if (ans->capacity() != n) ans->resize(n); for (i=0;i elem(i) = res[i]; } delete [] res; if (flag) { delete v1; } return ans->temp_objvar(); } static double v_median(void* v) { Vect* ans = (Vect*)v; int n = ans->capacity(); if (n == 0) { hoc_execerror("Vector", "must have size > 0"); } Vect* sorted = new Vect(*ans); sorted->sort(&cmpfcn); int n2 = n/2; double median; if (2*n2 == n) { median = (sorted->elem(n2-1) + sorted->elem(n2))/2.; }else{ median = sorted->elem(n2); } delete sorted; return median; } static Object** v_sort(void* v) { Vect* ans = (Vect*)v; ans->sort(&cmpfcn); return ans->temp_objvar(); } static Object** v_reverse(void* v) { Vect* ans = (Vect*)v; ans->reverse(); return ans->temp_objvar(); } static Object** v_sin(void* v) { Vect* ans = (Vect*)v; int n = ans->capacity(); double freq = *getarg(1); double phase = *getarg(2); double dx = 1; if(ifarg(3)) dx = *getarg(3); double period = 2*PI/1000*freq*dx; for (int i=0; ielem(i) = sin(period*i+phase); } return ans->temp_objvar(); } static Object** v_log(void* v) { Vect* ans = (Vect*)v; Vect* v1; // data set if (ifarg(1)) { v1 = vector_arg(1); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = log(v1->elem(i)); } return ans->temp_objvar(); } static Object** v_log10(void* v) { Vect* ans = (Vect*)v; Vect* v1; // data set if (ifarg(1)) { v1 = vector_arg(1); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = log10(v1->elem(i)); } return ans->temp_objvar(); } static Object** v_rebin(void* v) { Vect* ans = (Vect*)v; ParentVect* v1; int flag, iarg = 1; // data set iarg = possible_srcvec(v1, ans, flag); int f = int(*getarg(iarg)); int n = v1->capacity()/f; if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = 0.; for (int j=0; jelem(i) += v1->elem(i*f+j); } } if (flag) { delete v1; } return ans->temp_objvar(); } static Object** v_resample(void* v) { Vect* ans = (Vect*)v; // data set Vect* v1 = vector_arg(1); double f = chkarg(2,0,v1->capacity()/2); int n = int(v1->capacity()*f); Vect* temp = new Vect(n); for (int i=0; ielem(i) = v1->elem(int(i/f)); if (ans->capacity() != n) ans->resize(n); *((ParentVect*)ans) = *((ParentVect*)temp); delete temp; return ans->temp_objvar(); } static Object** v_psth(void* v) { Vect* ans = (Vect*)v; // data set Vect* v1 = vector_arg(1); double dt = chkarg(2,0,9e99); double trials = chkarg(3,0,9e99); double size = chkarg(4,0,v1->capacity()/2); int n = int(v1->capacity()); Vect* temp = new Vect(n); for (int i=0; ielem(i); while (integral < size) { if (i+fj < n-1) { fj++; integral += v1->elem(i+fj); } if (i-bj > 0 && integral < size) { bj++; integral += v1->elem(i-bj); } } temp->elem(i) = integral/trials*1000./((fj+bj+1)*dt); } if (ans->capacity() != n) ans->resize(n); *((ParentVect*)ans) = *((ParentVect*)temp); delete temp; return ans->temp_objvar(); } static Object** v_inf(void* x) { Vect* V = (Vect*)x; // data set Vect* stim = vector_arg(1); int n = stim->capacity(); double dt = chkarg(2,1e-99,9e99); double gl = *getarg(3); double el = *getarg(4); double cm = *getarg(5)/dt; double th = *getarg(6); double res = *getarg(7); double refp = 0; if (ifarg(8)) refp = *getarg(8); if (V->capacity() != n) V->resize(n); double i=0,v,ref=0; V->elem(0) = el; for (int t=0;telem(t)-el) + stim->elem(t); v = V->elem(t) + i/cm; if (v >= th && ref <= 0) { V->elem(t+1) = 0; t = t + 1; V->elem(t+1) = res; ref = refp; } else { ref = ref-dt; V->elem(t+1) = v; } } return V->temp_objvar(); } static Object** v_pow(void* v) { Vect* ans = (Vect*)v; Vect* v1; int iarg = 1; // data set if (hoc_is_object_arg(iarg)) { v1 = vector_arg(iarg++); }else{ v1 = ans; } double p = *getarg(iarg); int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); if (p == -1) { for (int i=0; ielem(i) == 0) { hoc_execerror("Vector","Invalid comparator in .where()\n"); } else { ans->elem(i) = 1/v1->elem(i); } } } else if (p == 0) { for (int i=0; ielem(i) = 1; } } else if (p == 0.5) { for (int i=0; ielem(i) = hoc_Sqrt(v1->elem(i)); } } else if (p == 1) { for (int i=0; ielem(i) = v1->elem(i); } } else if (p == 2) { for (int i=0; ielem(i) = v1->elem(i)*v1->elem(i); } } else { for (int i=0; ielem(i) = pow(v1->elem(i),p); } } return ans->temp_objvar(); } static Object** v_sqrt(void* v) { Vect* ans = (Vect*)v; Vect* v1; // data set if (ifarg(1)) { v1 = vector_arg(1); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = hoc_Sqrt(v1->elem(i)); } return ans->temp_objvar(); } static Object** v_abs(void* v) { Vect* ans = (Vect*)v; Vect* v1; // data set if (ifarg(1)) { v1 = vector_arg(1); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = Math::abs(v1->elem(i)); } return ans->temp_objvar(); } static Object** v_floor(void* v) { Vect* ans = (Vect*)v; Vect* v1; // data set if (ifarg(1)) { v1 = vector_arg(1); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = floor(v1->elem(i)); } return ans->temp_objvar(); } static Object** v_tanh(void* v) { Vect* ans = (Vect*)v; Vect* v1; // data set if (ifarg(1)) { v1 = vector_arg(1); }else{ v1 = ans; } int n = v1->capacity(); if (ans->capacity() != n) ans->resize(n); for (int i=0; ielem(i) = tanh(v1->elem(i)); } return ans->temp_objvar(); } static Object** v_index(void* v) { Vect* ans = (Vect*)v; ParentVect* data; Vect* index; bool del = false; if (ifarg(2)) { data = vector_arg(1); index = vector_arg(2); }else{ data = ans; index = vector_arg(1); } if (data == ans) { data = new ParentVect(*data); del = true; } int n = data->capacity(); int m = index->capacity(); if (ans->capacity() != m) ans->resize(m); for (int i=0; ielem(i)); if (j >= 0 && j < n) { ans->elem(i) = data->elem(j); } else { ans->elem(i) = 0.; } } if (del) { delete data; } return ans->temp_objvar(); } Object** v_from_python(void* v) { if (!nrnpy_vec_from_python_p_) { hoc_execerror("Python not available", 0); } Vect* vec = (*nrnpy_vec_from_python_p_)(v); return vec->temp_objvar(); } Object** v_to_python(void* v) { if (!nrnpy_vec_to_python_p_) { hoc_execerror("Python not available", 0); } return (*nrnpy_vec_to_python_p_)(v); } Object** v_as_numpy(void* v) { if (!nrnpy_vec_as_numpy_helper_) { hoc_execerror("Python not available", 0); } Vect* vec = (Vect*)v; // not a copy, shares the data! So do not change the size while // the python numpy array is in use. return (*nrnpy_vec_as_numpy_helper_)(vec->capacity(), vec->vec()); } static Member_func v_members[] = { "x", v_size, // will be changed below "size", v_size, "buffer_size", v_buffer_size, "get", v_get, "reduce", v_reduce, "min", v_min, "max", v_max, "min_ind", v_min_ind, "max_ind", v_max_ind, "sum", v_sum, "sumsq", v_sumsq, "mean", v_mean, "var", v_var, "stdev", v_stdev, "stderr", v_stderr, "meansqerr", v_meansqerr, "mag", v_mag, "contains", v_contains, "median", v_median, "dot", v_dot, "eq", v_eq, "record", v_record, "play", v_play, "play_remove", v_play_remove, "fwrite", v_fwrite, "fread", v_fread, "vwrite", v_vwrite, "vread", v_vread, "printf", v_printf, "scanf", v_scanf, "scantil", v_scantil, "fit", v_fit, "trigavg", v_trigavg, "indwhere", v_indwhere, "scale", v_scale, 0, 0 }; static Member_ret_obj_func v_retobj_members[] = { "c", v_c, "cl", v_cl, "at", v_at, "ind", v_ind, "histogram", v_histogram, "sumgauss", v_sumgauss, "resize", v_resize, "clear", v_clear, "set", v_set, "append", v_append, "copy", v_copy, "insrt", v_insert, "remove", v_remove, "interpolate", v_interpolate, "from_double", v_from_double, "index", v_index, "apply", v_apply, "add", v_add, "sub", v_sub, "mul", v_mul, "div", v_div, "fill", v_fill, "indgen", v_indgen, "addrand", v_addrand, "setrand", v_setrand, "deriv", v_deriv, "integral", v_integral, "sqrt", v_sqrt, "abs", v_abs, "floor", v_floor, "sin", v_sin, "pow", v_pow, "log", v_log, "log10", v_log10, "tanh", v_tanh, "correl", v_correl, "convlv", v_convlv, "spctrm", v_spctrm, "filter", v_filter, "fft", v_fft, "rotate", v_rotate, "smhist", v_smhist, "hist", v_hist, "spikebin", v_spikebin, "rebin", v_rebin, "medfltr", v_medfltr, "sort", v_sort, "sortindex", v_sortindex, "reverse", v_reverse, "resample", v_resample, "psth", v_psth, "inf", v_inf, "index", v_index, "indvwhere", v_indvwhere, "where", v_where, "plot", v_plot, "line", v_line, "mark", v_mark, "ploterr", v_ploterr, "from_python", v_from_python, "to_python", v_to_python, "as_numpy", v_as_numpy, 0,0 }; static Member_ret_str_func v_retstr_members[] = { "label", v_label, 0,0 }; extern "C" { extern int hoc_araypt(Symbol*, int); } int ivoc_vector_size(Object* o) { Vect* vp = (Vect*)o->u.this_pointer; return vp->capacity(); } double* ivoc_vector_ptr(Object* o, int index) { check_obj_type(o, "Vector"); Vect* vp = (Vect*)o->u.this_pointer; return vp->vec() + index; } static void steer_x(void* v) { Vect* vp = (Vect*)v; int index; Symbol* s = hoc_spop(); // if you don't want to test then you could get the index off the stack s->arayinfo->sub[0] = vp->capacity(); index = hoc_araypt(s, SYMBOL); hoc_pushpx(vp->vec() + index); } void Vector_reg() { dmaxint_ = 1073741824.; for(;;) { if (dmaxint_*2. == double(int(dmaxint_*2.))) { dmaxint_ *= 2.; }else{ if (dmaxint_*2. - 1. == double(int(dmaxint_*2. - 1.))) { dmaxint_ = 2.*dmaxint_ - 1.; } break; } } //printf("dmaxint=%30.20g %d\n", dmaxint_, (long)dmaxint_); class2oc("Vector", v_cons, v_destruct, v_members, NULL, v_retobj_members, v_retstr_members); svec_ = hoc_lookup("Vector"); // now make the x variable an actual double Symbol* sv = hoc_lookup("Vector"); Symbol* sx = hoc_table_lookup("x", sv->u.ctemplate->symtable); sx->type = VAR; sx->arayinfo = new Arrayinfo; sx->arayinfo->refcount = 1; sx->arayinfo->a_varn = NULL; sx->arayinfo->nsub = 1; sx->arayinfo->sub[0] = 1; sv->u.ctemplate->steer = steer_x; subvec_ = new Vect(); #if defined(WIN32) && !defined(USEMATRIX) load_ocmatrix(); #endif } // hacked version of gsort from ../gnu/d_vec.cpp // the transformation is that everything that used to be a double* becomes // an int* and cmp(*arg1, *arg2) becomes cmp(vec[*arg1], vec[*arg2]) // I am not sure what to do about the BYTES_PER_WORD // An adaptation of Schmidt's new quicksort static inline void SWAP(int* A, int* B) { int tmp = *A; *A = *B; *B = tmp; } /* This should be replaced by a standard ANSI macro. */ #define BYTES_PER_WORD 8 #define BYTES_PER_LONG 4 /* The next 4 #defines implement a very fast in-line stack abstraction. */ #define STACK_SIZE (BYTES_PER_WORD * BYTES_PER_LONG) #define PUSH(LOW,HIGH) do {top->lo = LOW;top++->hi = HIGH;} while (0) #define POP(LOW,HIGH) do {LOW = (--top)->lo;HIGH = top->hi;} while (0) #define STACK_NOT_EMPTY (stack < top) /* Discontinue quicksort algorithm when partition gets below this size. This particular magic number was chosen to work best on a Sun 4/260. */ #define MAX_THRESH 4 /* Order size using quicksort. This implementation incorporates four optimizations discussed in Sedgewick: 1. Non-recursive, using an explicit stack of pointer that store the next array partition to sort. To save time, this maximum amount of space required to store an array of MAX_INT is allocated on the stack. Assuming a 32-bit integer, this needs only 32 * sizeof (stack_node) == 136 bits. Pretty cheap, actually. 2. Chose the pivot element using a median-of-three decision tree. This reduces the probability of selecting a bad pivot value and eliminates certain extraneous comparisons. 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving insertion sort to order the MAX_THRESH items within each partition. This is a big win, since insertion sort is faster for small, mostly sorted array segements. 4. The larger of the two sub-partitions is always pushed onto the stack first, with the algorithm then concentrating on the smaller partition. This *guarantees* no more than log (n) stack size is needed! */ int nrn_mlh_gsort (double* vec, int *base_ptr, int total_elems, doubleComparator cmp) { /* Stack node declarations used to store unfulfilled partition obligations. */ struct stack_node { int *lo; int *hi; }; int pivot_buffer; int max_thresh = MAX_THRESH; if (total_elems > MAX_THRESH) { int *lo = base_ptr; int *hi = lo + (total_elems - 1); int *left_ptr; int *right_ptr; stack_node stack[STACK_SIZE]; /* Largest size needed for 32-bit int!!! */ stack_node *top = stack + 1; while (STACK_NOT_EMPTY) { { int *pivot = &pivot_buffer; { /* Select median value from among LO, MID, and HI. Rearrange LO and HI so the three values are sorted. This lowers the probability of picking a pathological pivot value and skips a comparison for both the LEFT_PTR and RIGHT_PTR. */ int *mid = lo + ((hi - lo) >> 1); if ((*cmp) (vec[*mid], vec[*lo]) < 0) SWAP (mid, lo); if ((*cmp) (vec[*hi], vec[*mid]) < 0) { SWAP (mid, hi); if ((*cmp) (vec[*mid], vec[*lo]) < 0) SWAP (mid, lo); } *pivot = *mid; pivot = &pivot_buffer; } left_ptr = lo + 1; right_ptr = hi - 1; /* Here's the famous ``collapse the walls'' section of quicksort. Gotta like those tight inner loops! They are the main reason that this algorithm runs much faster than others. */ do { while ((*cmp) (vec[*left_ptr], vec[*pivot]) < 0) left_ptr += 1; while ((*cmp) (vec[*pivot], vec[*right_ptr]) < 0) right_ptr -= 1; if (left_ptr < right_ptr) { SWAP (left_ptr, right_ptr); left_ptr += 1; right_ptr -= 1; } else if (left_ptr == right_ptr) { left_ptr += 1; right_ptr -= 1; break; } } while (left_ptr <= right_ptr); } /* Set up pointers for next iteration. First determine whether left and right partitions are below the threshold size. If so, ignore one or both. Otherwise, push the larger partition's bounds on the stack and continue sorting the smaller one. */ if ((right_ptr - lo) <= max_thresh) { if ((hi - left_ptr) <= max_thresh) /* Ignore both small partitions. */ POP (lo, hi); else /* Ignore small left partition. */ lo = left_ptr; } else if ((hi - left_ptr) <= max_thresh) /* Ignore small right partition. */ hi = right_ptr; else if ((right_ptr - lo) > (hi - left_ptr)) /* Push larger left partition indices. */ { PUSH (lo, right_ptr); lo = left_ptr; } else /* Push larger right partition indices. */ { PUSH (left_ptr, hi); hi = right_ptr; } } } /* Once the BASE_PTR array is partially sorted by quicksort the rest is completely sorted using insertion sort, since this is efficient for partitions below MAX_THRESH size. BASE_PTR points to the beginning of the array to sort, and END_PTR points at the very last element in the array (*not* one beyond it!). */ { int *end_ptr = base_ptr + 1 * (total_elems - 1); int *run_ptr; int *tmp_ptr = base_ptr; int *thresh = (end_ptr < (base_ptr + max_thresh))? end_ptr : (base_ptr + max_thresh); /* Find smallest element in first threshold and place it at the array's beginning. This is the smallest array element, and the operation speeds up insertion sort's inner loop. */ for (run_ptr = tmp_ptr + 1; run_ptr <= thresh; run_ptr += 1) if ((*cmp) (vec[*run_ptr], vec[*tmp_ptr]) < 0) tmp_ptr = run_ptr; if (tmp_ptr != base_ptr) SWAP (tmp_ptr, base_ptr); /* Insertion sort, running from left-hand-side up to `right-hand-side.' Pretty much straight out of the original GNU qsort routine. */ for (run_ptr = base_ptr + 1; (tmp_ptr = run_ptr += 1) <= end_ptr; ) { while ((*cmp) (vec[*run_ptr], vec[*(tmp_ptr -= 1)]) < 0) ; if ((tmp_ptr += 1) != run_ptr) { int *trav; for (trav = run_ptr + 1; --trav >= run_ptr;) { int c = *trav; int *hi, *lo; for (hi = lo = trav; (lo -= 1) >= tmp_ptr; hi = lo) *hi = *lo; *hi = c; } } } } return 1; } neuron-7.5/src/ivoc/ivocvect.h000066400000000000000000000031561323325274500164300ustar00rootroot00000000000000#ifndef ivoc_vector_h #define ivoc_vector_h // definition of vector classes from the gnu c++ class library #include #include #define ParentVect doubleAVec #define Vect IvocVect struct Object; class IvocVect : public ParentVect { public: IvocVect(Object* obj = NULL); IvocVect(int, Object* obj = NULL); IvocVect(int, double, Object* obj = NULL); IvocVect(IvocVect&, Object* obj = NULL); ~IvocVect(); void resize(int); void resize_chunk(int len, int realloc_extra = 0); // volatile, only one at a time, don't do anything // that changes the memory space. IvocVect* subvec(int start, int end); Object** temp_objvar(); int buffer_size(); void buffer_size(int); void label(const char*); #if USE_PTHREAD void mutconstruct(int mkmut) {if (!mut_) MUTCONSTRUCT(mkmut)} #else void mutconstruct(int) {} #endif void lock() {MUTLOCK} void unlock() {MUTUNLOCK} public: //intended as friend static Object** temp_objvar(IvocVect*); Object* obj_; // so far only needed by record and play; not reffed char* label_; MUTDEC }; extern "C" { extern Vect* vector_new(int, Object*); // use this if possible extern Vect* vector_new0(); extern Vect* vector_new1(int); extern Vect* vector_new2(Vect*); extern void vector_delete(Vect*); extern int vector_buffer_size(Vect*); extern int vector_capacity(Vect*); extern void vector_resize(Vect*, int); extern Object** vector_temp_objvar(Vect*); extern double* vector_vec(Vect*); extern Object** vector_pobj(Vect*); extern Vect* vector_arg(int); extern int is_vector_arg(int); extern char* vector_get_label(Vect*); extern void vector_set_label(Vect*, char*); } #endif neuron-7.5/src/ivoc/ivocwin.cpp000066400000000000000000000143021323325274500166120ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV #include #if defined(_MSC_VER) #undef min #undef max #undef near #define near mynear #else #undef near #endif #undef MOVE #undef DELETE #undef IGNORE #define MOVE mlhmove #define DELETE mlhdelete #include #include #include #include #include #include #include "apwindow.h" #include "ivoc.h" #include "rubband.h" #include "symdir.h" #include "oc2iv.h" #undef max #undef min #include "graph.h" #if defined(CYGWIN) // the link step needs liboc after libivoc but liboc refers to some // things in libivoc that wouldn't normally be linked because nothing // refers to them while libivoc is linking. So force them to link here extern "C" { int ivoc_list_look(Object*, Object*, char*, int); void hoc_class_registration(); } static void dummy() { ivoc_list_look(NULL, NULL, NULL, 0); hoc_class_registration(); } #endif int iv_mswin_to_pixel(int); int iv_pixel_to_mswin(int); void pwmimpl_redraw(Window* w) { w->rep()->WMpaint(0, 0); } void ivoc_bring_to_top(Window* w) { BringWindowToTop(w->rep()->msWindow()); } void* mswin_setclip(Canvas* c, int x0, int y0, int x1, int y1) { HRGN clip = CreateRectRgn(x0, y0, x1, y1); SelectClipRgn(((MWcanvas*)c)->hdcOf(), clip); return clip; } void mswin_delete_object(void* v) { DeleteObject((HRGN)v); } //--------------------------------------------------------- extern "C" { void ivoc_win32_cleanup() { Oc::cleanup(); } } void Oc::cleanup() { if (help_cursor_) { delete help_cursor_; } } #if defined(MINGW) static void hidewindow(void* v) { HWND w = (HWND)v; ShowWindow(w, SW_HIDE); } static int gui_thread_xmove_x; static int gui_thread_xmove_y; void gui_thread_xmove(void* v) { PrintableWindow* w = (PrintableWindow*)v; w->xmove(gui_thread_xmove_x, gui_thread_xmove_y); } #endif void PrintableWindow::hide() { if (is_mapped()) { HWND hwnd = Window::rep()->msWindow(); //printf("hide %p\n", this); #if defined(MINGW) if (!nrn_is_gui_thread()) { nrn_gui_exec(hidewindow, hwnd); return; } #endif ShowWindow(hwnd, SW_HIDE); } } void PrintableWindow::xmove(int x, int y) { #if defined(MINGW) if (!nrn_is_gui_thread()) { gui_thread_xmove_x = x; gui_thread_xmove_y = y; nrn_gui_exec(gui_thread_xmove, this); return; } #endif HWND hwnd = Window::rep()->msWindow(); //int width = canvas()->pwidth(); //int height = canvas()->pheight(); RECT r; GetWindowRect(hwnd, &r); MoveWindow(hwnd, iv_pixel_to_mswin(x), iv_pixel_to_mswin(y), r.right - r.left, r.bottom - r.top, TRUE); } int PrintableWindow::xleft() const { WindowRep& w = *Window::rep(); if (w.bound()) { HWND hwnd = w.msWindow(); RECT winRect; GetWindowRect(hwnd, &winRect); return iv_mswin_to_pixel(winRect.left); }else{ return 0; } } int PrintableWindow::xtop() const { WindowRep& w = *Window::rep(); if (w.bound()) { HWND hwnd = w.msWindow(); RECT winRect; GetWindowRect(hwnd, &winRect); return iv_mswin_to_pixel(winRect.top); }else{ return 0; } } void PrintableWindow::xplace(int x, int y) { WindowRep& wr = *Window::rep(); if (wr.bound()) { xmove(x, y); }else{ xplace_ = true; xleft_ = x; xtop_ = y; } } void PrintableWindow::default_geometry() { DismissableWindow::default_geometry(); if (xplace_) { pplace(iv_pixel_to_mswin(xleft_), display()->pheight() - iv_pixel_to_mswin(xtop_) - canvas()->to_pixels(height(),Dimension_Y)); } } #if 0 Object** Graph::new_vect(const DataVec*) { return 0; } #endif //#include "\nrn\src\mswin\winio\debug.h" void Rubberband::rubber_on(Canvas* c) { // DebugEnterMessage("Rubberband::rubber_on\n"); c->front_buffer(); } void Rubberband::rubber_off(Canvas* c) { c->back_buffer(); #ifdef WIN32 // this prevents failure for all future paints c->damage_all(); #endif // DebugExitMessage("Rubberband::rubber_off\n"); } #if 0 double* ivoc_vector_ptr(Object*, int) {return 0;} int ivoc_vector_size(Object*) {return 0;} #endif #ifdef MINGW IOHandler::IOHandler(){} IOHandler::~IOHandler(){} int IOHandler::inputReady(int){return 0;} int IOHandler::outputReady(int){return 0;} int IOHandler::exceptionRaised(int){return 0;} void IOHandler::timerExpired(long, long){} void IOHandler::childStatus(pid_t, int){} #endif // MINGW #ifdef MINGW extern "C" { int stdin_event_ready(); } int stdin_event_ready() { static DWORD main_threadid = -1; if (main_threadid == -1) { main_threadid = GetCurrentThreadId(); return 1; } PostThreadMessage(main_threadid, WM_QUIT, 0, 0); return 1; } #include extern "C" { static int bind_tid_; void nrniv_bind_thread(void); extern int (*iv_bind_enqueue_)(void(*)(void*), void* w); extern void iv_bind_call(void* w, int type); extern void nrnpy_setwindowtext(void*); extern void* (*nrnpy_save_thread)(); extern void (*nrnpy_restore_thread)(void*); static void* w_; static void (*nrn_gui_exec_)(void*); static pthread_mutex_t* mut_; static pthread_cond_t* cond_; bool nrn_is_gui_thread() { if (cond_ && GetCurrentThreadId() != bind_tid_) { return false; } return true; } int iv_bind_enqueue(void(*cb)(void*), void* w) { //printf("iv_bind_enqueue %p thread %d\n", w, GetCurrentThreadId()); if (GetCurrentThreadId() == bind_tid_) { return 0; } nrn_gui_exec(cb, w); return 1; } void nrn_gui_exec(void (*cb)(void*), void* v) { assert(GetCurrentThreadId() != bind_tid_); // wait for the gui thread to handle the operation void* gs = (*nrnpy_save_thread)(); pthread_mutex_lock(mut_); w_ = v; nrn_gui_exec_ = cb; while (w_) { pthread_cond_wait(cond_, mut_); } pthread_mutex_unlock(mut_); (*nrnpy_restore_thread)(gs); } void nrniv_bind_call() { if (!cond_) { return; } void* w; pthread_mutex_lock(mut_); w = w_; if (w_) { w_ = NULL; (*nrn_gui_exec_)(w); pthread_cond_signal(cond_); } pthread_mutex_unlock(mut_); } void nrniv_bind_thread() { IFGUI bind_tid_ = int(*hoc_getarg(1)); //printf("nrniv_bind_thread %d\n", bind_tid_); iv_bind_enqueue_ = iv_bind_enqueue; cond_ = new pthread_cond_t; mut_ = new pthread_mutex_t; pthread_cond_init(cond_, NULL); pthread_mutex_init(mut_, NULL); w_ = NULL; ENDGUI hoc_pushx(1.); hoc_ret(); } } // end of extern "C" #endif // MINGW #endif //HAVE_IV neuron-7.5/src/ivoc/macmain.cpp000077500000000000000000000002031323325274500165370ustar00rootroot00000000000000extern "C" { #pragma import on int ivocmain(int, char**, char**); #pragma import off } int main() { return ivocmain(0, 0, 0); } neuron-7.5/src/ivoc/matrix.cpp000066400000000000000000000363661323325274500164560ustar00rootroot00000000000000#include <../../nrnconf.h> #include "classreg.h" #include #include #include "ocmatrix.h" #include "oc2iv.h" #include "parse.h" #include "ivocvect.h" #define EPS hoc_epsilon static Symbol* smat_; extern "C" { extern double hoc_scan(FILE*); extern FILE* hoc_obj_file_arg(int i); extern Object** hoc_temp_objptr(Object*); #if 0 extern void install_matrix_method(const char* name, double (*)(...)); extern void* matrix_arg(int); extern double* matrix_pelm(void*, int i, int j); extern int matrix_nrow(void*); extern int matrix_ncol(void*); extern int matrix_type(void*); // FULL 1, SPARSE 2, BAND 3 extern MAT* matrix_full(void*); // hoc_execerror if void* not right type extern SPMAT* matrix_sparse(void*); #endif } static void check_domain(int i, int j) { if (i > j || i < 0) { char buf[256]; sprintf(buf, "index=%d max_index=%d\n", i, j); hoc_execerror("Matrix index out of range:", buf); } } static void check_capac(int i, int j) { if (i != j) { hoc_execerror("wrong size for Matrix or Vector operation", 0); } } Matrix* matrix_arg(int i) { Object* ob = *hoc_objgetarg(i); if (!ob || ob->ctemplate != smat_->u.ctemplate) { check_obj_type(ob, "Matrix"); } return (Matrix*)(ob->u.this_pointer); } Object** Matrix::temp_objvar() { Matrix* m = (Matrix*)this; Object** po; if (m->obj_) { po = hoc_temp_objptr(m->obj_); }else{ po = hoc_temp_objvar(smat_, (void*)m); obj_ = *po; } return po; } static double m_nrow(void* v) { Matrix* m = (Matrix*)v; return (double)m->nrow(); } static double m_ncol(void* v) { Matrix* m = (Matrix*)v; return (double)m->ncol(); } static double m_setval(void* v) { Matrix* m = (Matrix*)v; int i, j; double val, *pval; i = (int)chkarg(1, 0, m->nrow()-1); j = (int)chkarg(2, 0, m->ncol()-1); val = *getarg(3); pval =m->mep(i, j); *pval = val; return val; } static double m_getval(void* v) { Matrix* m = (Matrix*)v; int i, j; i = (int)chkarg(1, 0, m->nrow()-1); j = (int)chkarg(2, 0, m->ncol()-1); return m->getval(i, j); } static double m_sprowlen(void* v) { Matrix* m = (Matrix*)v; int i; i = (int)chkarg(1, 0, m->nrow()-1); return double(m->sprowlen(i)); } static double m_spgetrowval(void* v) { Matrix* m = (Matrix*)v; int i, jx, j; double x; i = (int)chkarg(1, 0, m->nrow()-1); jx = (int)chkarg(2, 0, m->sprowlen(i)-1); x = m->spgetrowval(i, jx, &j); if (ifarg(3)) { *hoc_pgetarg(3) = double(j); } return x; } static double m_printf(void* v) { Matrix* m = (Matrix*)v; int i, j, nrow = m->nrow(), ncol = m->ncol(); const char* f1 = " %-8.3g"; const char* f2 = "\n"; if (ifarg(1)) { f1 = gargstr(1); } if (ifarg(2)) { f2 = gargstr(2); } for (i=0; i < nrow; ++i) { for (j=0; j < ncol; ++j) { printf(f1, m->getval(i, j)); } printf("%s", f2); } return 0.; } static double m_fprint(void* v) { Matrix* m = (Matrix*)v; int i, j, nrow = m->nrow(), ncol = m->ncol(); int ia = 1; bool pr_size = true; const char* f1 = " %-8.3g"; const char* f2 = "\n"; if (hoc_is_double_arg(ia)) { pr_size = ((int)chkarg(ia, 0, 1) == 1) ? true : false; ++ia; } FILE* f = hoc_obj_file_arg(ia); if (ifarg(ia+1)) { f1 = gargstr(ia+1); } if (ifarg(ia+2)) { f2 = gargstr(ia+2); } if (pr_size) { fprintf(f, "%d %d\n", nrow, ncol); } for (i=0; i < nrow; ++i) { for (j=0; j < ncol; ++j) { fprintf(f, f1, m->getval(i, j)); } fprintf(f, "%s", f2); } return 0.; } static double m_scanf(void* v) { // file assumed to be an array of numbers. Numbers in rows // are contiguous in the stream. // first two numbers are nrow and ncol unless // arguments 2 and 3 specify them Matrix* m = (Matrix*)v; FILE* f = hoc_obj_file_arg(1); int i, j, nrow, ncol; if (ifarg(2)) { nrow = (int)chkarg(2, 1, 1e9); ncol = (int)chkarg(3, 1, 1e9); }else{ nrow = (int)hoc_scan(f); ncol = (int)hoc_scan(f); } m->resize(nrow, ncol); for (i=0; i < nrow; ++i) for (j=0; j < ncol; ++j) { *(m->mep(i, j)) = hoc_scan(f); } return 0.; } static Object** m_resize(void* v) { Matrix* m = (Matrix*)v; m->resize((int)(chkarg(1, 1., 1e9) + EPS), (int)(chkarg(2, 1., 1e9) + EPS)); return m->temp_objvar(); } static Object** m_mulv(void* v) { Matrix* m = (Matrix*)v; Vect* vin = vector_arg(1); Vect* vout; bool f = false; if (ifarg(2)) { vout = vector_arg(2); }else{ #ifdef WIN32 vout = vector_new1(m->nrow()); #else vout = new Vect(m->nrow()); #endif } if (vin == vout) { f = true; #ifdef WIN32 vin = vector_new2(vin); #else vin = new Vect(*vin); #endif } #ifdef WIN32 check_capac(vector_capacity(vin), m->ncol()); vector_resize(vout, m->nrow()); #else check_capac(vin->capacity(), m->ncol()); vout->resize(m->nrow()); #endif m->mulv(vin, vout); if (f) { #ifdef WIN32 vector_delete(vin); #else delete vin; #endif } #ifdef WIN32 return vector_temp_objvar(vout); #else return vout->temp_objvar(); #endif } static Matrix* get_out_mat(Matrix* mat, int n, int m, int i, const char* mes = NULL); static Matrix* get_out_mat(Matrix* mat, int n, int m, int i, const char* mes) { Matrix* out; if (ifarg(i)) { out = matrix_arg(i); }else{ out = Matrix::instance(n, m, Matrix::MFULL); out->obj_ = NULL; } if (mat == out && mes) { hoc_execerror(mes, " matrix operation cannot be done in place"); } return out; } static Matrix* get_out_mat(Matrix* m, int i , const char* mes = NULL) { return get_out_mat(m, m->nrow(), m->ncol(), i, mes); } static Object** m_add(void* v) { Matrix* m = (Matrix*)v; Matrix *out; out = m; if (ifarg(2)) { out = matrix_arg(2); } m->add(matrix_arg(1), out); return out->temp_objvar(); } static Object** m_bcopy(void* v) { Matrix* m = (Matrix*)v; Matrix* out; int i0, j0, m0, n0, i1, j1, i; i0 = (int)chkarg(1, 0, m->nrow()-1); j0 = (int)chkarg(2, 0, m->ncol()-1); m0 = (int)chkarg(3, 1, m->nrow()-i0); n0 = (int)chkarg(4, 1, m->ncol()-j0); if (ifarg(5) && hoc_is_double_arg(5)) { i1 = (int)chkarg(5, 0, 1e9); j1 = (int)chkarg(6, 0, 1e9); i = 7; }else{ i1 = 0; j1 = 0; i = 5; } out = get_out_mat(m, m0, n0, i); m->bcopy(out, i0, j0, m0, n0, i1, j1); return out->temp_objvar(); } static Object** m_mulm(void* v) { Matrix* m = (Matrix*)v; Matrix* in, *out; in = matrix_arg(1); if (ifarg(2)) { out = matrix_arg(2); }else{ out = Matrix::instance(m->nrow(), in->ncol(), Matrix::MFULL); } if (in == out || m == out) { hoc_execerror("matrix multiplication cannot be done in place", 0); } out->resize(m->nrow(), in->ncol()); check_domain(m->ncol(), in->nrow()); m->mulm(in, out); return out->temp_objvar(); } static Object** m_c(void* v) { Matrix* m = (Matrix*)v; Matrix* out = get_out_mat(m, 1); m->copy(out); return out->temp_objvar(); } static Object** m_transpose(void* v) { Matrix* m = (Matrix*)v; Matrix* out = get_out_mat(m, 1); out->resize(m->ncol(), m->nrow()); m->transpose(out); return out->temp_objvar(); } static Object** m_symmeig(void* v) { Matrix* m = (Matrix*)v; Matrix* out = matrix_arg(1); Object** p; out->resize(m->nrow(), m->ncol()); Vect* vout; #ifdef WIN32 vout = vector_new1(m->nrow()); p = vector_temp_objvar(vout); #else vout = new Vect(m->nrow()); p = vout->temp_objvar(); #endif m->symmeigen(out, vout); return p; } static Object** m_svd(void* vv) { Matrix* m = (Matrix*)vv; Matrix *u=NULL, *v=NULL; if (ifarg(2)) { u = matrix_arg(1); v = matrix_arg(2); u->resize(m->nrow(), m->nrow()); v->resize(m->ncol(), m->ncol()); } Object** p; Vect* d; int dsize = m->nrow() < m->ncol() ? m->nrow() : m->ncol(); #ifdef WIN32 d = vector_new1(dsize); p = vector_temp_objvar(d); #else d = new Vect(dsize); p = d->temp_objvar(); #endif m->svd1(u, v, d); return p; } static Object** m_muls(void* v) { Matrix* m = (Matrix*)v; Matrix *out; out = m; if (ifarg(2)) { out = matrix_arg(2); } // I believe meschach does this for us // if (out != m) { // out->resize(... // } m->muls(*getarg(1), out); return out->temp_objvar(); } static Object** m_getrow(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, 0, m->nrow()-1); Vect* vout; if (ifarg(2)) { vout = vector_arg(2); #ifdef WIN32 vector_resize(vout, m->ncol()); #else vout->resize(m->ncol()); #endif }else{ #ifdef WIN32 vout = vector_new1(m->ncol()); #else vout = new Vect(m->ncol()); #endif } m->getrow(k, vout); #ifdef WIN32 return vector_temp_objvar(vout); #else return vout->temp_objvar(); #endif } static Object** m_getcol(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, 0, m->ncol()-1); Vect* vout; if (ifarg(2)) { vout = vector_arg(2); #ifdef WIN32 vector_resize(vout, m->nrow()); #else vout->resize(m->nrow()); #endif }else{ #ifdef WIN32 vout = vector_new1(m->nrow()); #else vout = new Vect(m->nrow()); #endif } m->getcol(k, vout); #ifdef WIN32 return vector_temp_objvar(vout); #else return vout->temp_objvar(); #endif } static Object** m_setrow(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, 0, m->nrow()-1); if (hoc_is_double_arg(2)) { m->setrow(k, *getarg(2)); }else{ Vect* in = vector_arg(2); #ifdef WIN32 check_domain(vector_capacity(in), m->ncol()); #else check_domain(in->capacity(), m->ncol()); #endif m->setrow(k, in); } return m->temp_objvar(); } static Object** m_setcol(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, 0, m->ncol()-1); if (hoc_is_double_arg(2)) { m->setcol(k, *getarg(2)); }else{ Vect* in = vector_arg(2); #ifdef WIN32 check_domain(vector_capacity(in), m->nrow()); #else check_domain(in->capacity(), m->nrow()); #endif m->setcol(k, in); } return m->temp_objvar(); } static Object** m_setdiag(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, -(m->nrow() - 1), m->ncol()-1); if (hoc_is_double_arg(2)) { m->setdiag(k, *getarg(2)); }else{ Vect* in = vector_arg(2); #ifdef WIN32 check_domain(vector_capacity(in), m->nrow()); #else check_domain(in->capacity(), m->nrow()); #endif m->setdiag(k, in); } return m->temp_objvar(); } static Object** m_getdiag(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, -(m->nrow()-1), m->ncol()-1); Vect* vout; if (ifarg(2)) { vout = vector_arg(2); #ifdef WIN32 vector_resize(vout, m->nrow()); #else vout->resize(m->nrow()); #endif }else{ #ifdef WIN32 vout = vector_new1(m->nrow()); #else vout = new Vect(m->nrow()); #endif } m->getdiag(k, vout); #ifdef WIN32 return vector_temp_objvar(vout); #else return vout->temp_objvar(); #endif } static Object** m_zero(void* v) { Matrix* m = (Matrix*)v; m->zero(); return m->temp_objvar(); } static Object** m_ident(void* v) { Matrix* m = (Matrix*)v; m->ident(); return m->temp_objvar(); } static Object** m_exp(void* v) { Matrix* m = (Matrix*)v; Matrix* out = get_out_mat(m, 1, "exponentiation"); m->exp(out); return out->temp_objvar(); } static Object** m_pow(void* v) { Matrix* m = (Matrix*)v; int k = (int)chkarg(1, 0., 100.); Matrix* out = get_out_mat(m, 2, "raising to a power"); m->pow(k, out); return out->temp_objvar(); } static Object** m_inverse(void* v) { Matrix* m = (Matrix*)v; Matrix* out = get_out_mat(m, 1); m->inverse(out); return out->temp_objvar(); } static double m_det(void* v) { Matrix* m = (Matrix*)v; int e; double a = m->det(&e); double* pe = hoc_pgetarg(1); *pe = double(e); return a; } static Object** m_solv(void* v) { Matrix* m = (Matrix*)v; check_capac(m->nrow(), m->ncol()); Vect* vin = vector_arg(1); #ifdef WIN32 check_capac(vector_capacity(vin), m->ncol()); #else check_capac(vin->capacity(), m->ncol()); #endif Vect* vout = NULL; bool f = false; bool use_lu = false; // args 2 and 3 are optional [vout, use previous LU factorization] // and in either order for (int i=2; i <=3; ++i) { if (ifarg(i)) { if (hoc_is_object_arg(i)) { if (vout) { } vout = vector_arg(i); }else{ use_lu = ((int)(*getarg(i))) ? true : false; } } } if (!vout) { #ifdef WIN32 vout = vector_new1(m->nrow()); #else vout = new Vect(m->nrow()); #endif } #ifdef WIN32 vector_resize(vout, m->ncol()); #else vout->resize(m->ncol()); #endif if (vin == vout) { f = true; #ifdef WIN32 vin = vector_new2(vin); #else vin = new Vect(*vin); #endif } m->solv(vin, vout, use_lu); if (f) { #ifdef WIN32 vector_delete(vin); #else delete vin; #endif } #ifdef WIN32 return vector_temp_objvar(vout); #else return vout->temp_objvar(); #endif } static Object** m_set(void* v) { Matrix* m = (Matrix*)v; int i, j, nrow = m->nrow(), ncol = m->ncol(); int k; for (k=0, i=0; i < nrow; ++i) { for (j=0; j < ncol; ++j) { *(m->mep(i, j)) = *getarg(++k); } } return m->temp_objvar(); } static Object** m_to_vector(void* v) { Matrix* m = (Matrix*)v; Vect* vout; int i, j, k; int nrow = m->nrow(); int ncol = m->ncol(); if (ifarg(1)) { vout = vector_arg(1); vector_resize(vout, nrow*ncol); }else{ vout = vector_new1(nrow*ncol); } k = 0; double* ve = vector_vec(vout); for (j=0; j < ncol; ++j) for (i=0; i < nrow; ++i) { ve[k++] = m->getval(i, j); } return vector_temp_objvar(vout); } static Object** m_from_vector(void* v) { Matrix* m = (Matrix*)v; Vect* vout; int i, j, k; int nrow = m->nrow(); int ncol = m->ncol(); vout = vector_arg(1); check_capac(nrow*ncol, vector_capacity(vout)); k = 0; double* ve = vector_vec(vout); for (j=0; j < ncol; ++j) for (i=0; i < nrow; ++i) { *(m->mep(i, j)) = ve[k++]; } return m->temp_objvar(); } static Member_func m_members[] = { // returns double scalar "x", m_nrow, // will be changed below "nrow", m_nrow, "ncol", m_ncol, "getval", m_getval, "setval", m_setval, "sprowlen", m_sprowlen, "spgetrowval", m_spgetrowval, "det", m_det, "printf", m_printf, "fprint", m_fprint, "scanf", m_scanf, 0, 0 }; static Member_ret_obj_func m_retobj_members[] = { // returns Vector "mulv", m_mulv, "getrow", m_getrow, "getcol", m_getcol, "getdiag", m_getdiag, "solv", m_solv, "symmeig", m_symmeig, "svd", m_svd, // returns Matrix "c", m_c, "add", m_add, "bcopy", m_bcopy, "resize", m_resize, "mulm", m_mulm, "muls", m_muls, "setrow", m_setrow, "setcol", m_setcol, "setdiag", m_setdiag, "zero", m_zero, "ident", m_ident, "exp", m_exp, "pow", m_pow, "inverse", m_inverse, "transpose", m_transpose, "set", m_set, "to_vector", m_to_vector, "from_vector", m_from_vector, 0, 0 }; static void* m_cons(Object* o) { int i=1, j=1, storage_type = Matrix::MFULL; if (ifarg(1)) i = int(chkarg(1, 1, 1e10) + EPS); if (ifarg(2)) j = int(chkarg(2, 1, 1e10) + EPS); if (ifarg(3)) storage_type = int(chkarg(3, 1, 3)); Matrix* m = Matrix::instance(i, j, storage_type); m->obj_ = o; return m; } static void m_destruct(void* v) { // supposed to notify freed val array here. //printf("Matrix deleted\n"); delete (Matrix*)v; } static void steer_x(void* v) { Matrix* m = (Matrix*)v; int i1, i2; Symbol* s = hoc_spop(); i2 = (int)(hoc_xpop() + EPS); i1 = (int)(hoc_xpop() + EPS); check_domain(i1, m->nrow()-1); check_domain(i2, m->ncol()-1); hoc_pushpx(m->mep(i1, i2)); } #if WIN32 && !USEMATRIX extern "C" { void Matrix_reg(); } #endif void Matrix_reg() { class2oc("Matrix", m_cons, m_destruct, m_members, NULL, m_retobj_members, NULL); smat_ = hoc_lookup("Matrix"); // now make the x variable an actual double Symbol* sx = hoc_table_lookup("x", smat_->u.ctemplate->symtable); sx->type = VAR; sx->arayinfo = (Arrayinfo *)hoc_Emalloc(sizeof(Arrayinfo) + 2*sizeof(int)); sx->arayinfo->refcount = 1; sx->arayinfo->a_varn = NULL; sx->arayinfo->nsub = 2; sx->arayinfo->sub[0] = 1; sx->arayinfo->sub[1] = 1; smat_->u.ctemplate->steer = steer_x; } neuron-7.5/src/ivoc/mlinedit.cpp000066400000000000000000000054241323325274500167460ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include "ocglyph.h" #include "classreg.h" #include "oc2iv.h" #include "apwindow.h" class OcText : public Text { public: OcText(unsigned rows = 24, unsigned cols = 80, TextBuffer* buf = NULL); virtual ~OcText(); virtual void keystroke(const Event& event); }; class OcMLineEditor : public OcGlyph { public: OcMLineEditor(unsigned row, unsigned col, const char* buf = NULL); virtual ~OcMLineEditor(); public: OcText* txt_; }; static double map(void* v) { OcMLineEditor* e = (OcMLineEditor*)v; PrintableWindow* w; if (ifarg(3)) { w = e->make_window(float(*getarg(2)), float(*getarg(3)), float(*getarg(4)), float(*getarg(5))); }else{ w = e->make_window(); } if (ifarg(1)) { char* name = gargstr(1); w->name(name); } w->map(); return 0.; } static double readonly(void* v) { OcMLineEditor* e = (OcMLineEditor*)v; if (ifarg(1)) { e->txt_->readOnly(int(chkarg(1, 0, 1))); } return double(e->txt_->readOnly()); } static const char** v_text(void* v) { OcMLineEditor* e = (OcMLineEditor*)v; TextBuffer* tb = e->txt_->editBuffer(); if (ifarg(1)) { e->txt_->reset(); const char* s = gargstr(1); tb->Insert(0, s, strlen(s)); } char** p = hoc_temp_charptr(); *p = (char*)tb->Text(); return (const char**)p; } static Member_func members[] = { "readonly", readonly, "map", map, 0,0 }; static Member_ret_str_func retstr_members[] = { "text", v_text, 0,0 }; static void* cons(Object*) { const char* buf = ""; unsigned row = 5; unsigned col = 30; if (ifarg(1)) { buf = gargstr(1); } if (ifarg(2)) { row = unsigned(chkarg(2, 1, 1000)); col = unsigned(chkarg(3, 1, 1000)); } OcMLineEditor* e = new OcMLineEditor(row, col, buf); e->ref(); return (void*)e; } static void destruct(void* v) { OcMLineEditor* e = (OcMLineEditor*)v; if (e->has_window()) { e->window()->dismiss(); } e->unref(); } void TextEditor_reg() { class2oc("TextEditor", cons, destruct, members, NULL, NULL, retstr_members); } OcMLineEditor::OcMLineEditor(unsigned row, unsigned col, const char* buf) { txt_ = new OcText(row, col, new TextBuffer(buf,strlen(buf),1000)); txt_->ref(); body( new Background( txt_, WidgetKit::instance()->background() ) ); } OcMLineEditor::~OcMLineEditor() { txt_->unref(); } OcText::OcText(unsigned rows, unsigned cols, TextBuffer* buf) : Text(rows, cols, buf) { } OcText::~OcText() {} void OcText::keystroke(const Event& e){ if (readOnly_) { return; } char buffer[8]; // needs to be dynamically adjusted int count = e.mapkey(buffer, 8); if (count <= 0) { return; } Text::keystroke(e); } #endif neuron-7.5/src/ivoc/mymath.cpp000066400000000000000000000166271323325274500164470ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "mymath.h" #include "classreg.h" #include "oc2iv.h" #include #include static double distance_to_line(void*) { return MyMath::distance_to_line(*getarg(1), *getarg(2), *getarg(3), *getarg(4), *getarg(5), *getarg(6)); } static double distance_to_line_segment(void*) { return MyMath::distance_to_line_segment(*getarg(1), *getarg(2), *getarg(3), *getarg(4), *getarg(5), *getarg(6)); } static double inside(void*) { return MyMath::inside(*getarg(1), *getarg(2), *getarg(3), *getarg(4), *getarg(5), *getarg(6)); } extern "C" { int nrn_feround(int); } // return last rounding mode and set to given mode if 1,2,3,4. // order is FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD #if defined(HAVE_FENV_H) && defined(HAVE_FESETROUND) #include static int round_mode[] = {FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD}; #endif int nrn_feround(int mode) { #if defined(HAVE_FENV_H) && defined(HAVE_FESETROUND) int oldmode = fegetround(); int m; if (oldmode == FE_TONEAREST) { oldmode = 2; }else if (oldmode == FE_TOWARDZERO) { oldmode = 3; }else if (oldmode == FE_UPWARD) { oldmode = 4; }else if (oldmode == FE_DOWNWARD) { oldmode = 1; }else{ assert(0); } if (mode > 0 && mode < 5) { assert(fesetround(round_mode[mode-1]) == 0); } return oldmode; #else return 0; #endif } static double feround(void*) { int arg = 0; if (ifarg(1)) { arg = (int)chkarg(1, 0, 4); } return (double) nrn_feround(arg); } static Member_func members[] = { "d2line", distance_to_line, "d2line_seg", distance_to_line_segment, "inside", inside, "feround", feround, 0,0 }; static void* cons(Object*) { return NULL; } static void destruct(void*) { } void GUIMath_reg() { class2oc("GUIMath", cons, destruct, members, NULL, NULL, NULL); } double MyMath::anint(double x) { if (x < 0) { return ceil(x - .5); }else{ return floor(x + .5); } } float MyMath::min(int count, const float* x) { float m=x[0]; for (int i=1; i < count; ++i) { if (m > x[i]) { m = x[i]; } } return m; } float MyMath::max(int count, const float* x) { float m=x[0]; for (int i=1; i < count; ++i) { if (m < x[i]) { m = x[i]; } } return m; } // within epsilon distance from the infinite line bool MyMath::near_line(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon) { //printf("near_line %g %g %g %g %g %g %g\n", x,y,x1,y1,x2,y2,epsilon); if (Math::equal(x, x1, epsilon) && Math::equal(y, y1, epsilon)) { return true; } if (Math::equal(x1, x2, epsilon) && Math::equal(y1, y2, epsilon)) { return false; } Coord d, norm, norm2, dot; Coord dx, dy, dx2, dy2; dx = x - x1; dy = y - y1; dx2 = x2 - x1; dy2 = y2 - y1; //printf("%g %g %g %g\n", dx, dy, dx2, dy2); norm2 = dx2*dx2 + dy2*dy2; norm = dx*dx + dy*dy; dot = dx*dx2 + dy*dy2; d = norm - dot*dot/norm2; //printf("near_line %g\n", d); if (d <= epsilon*epsilon) { return true; }else{ return false; } } float MyMath::distance_to_line(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2 ) { //printf("near_line %g %g %g %g %g %g %g\n", x,y,x1,y1,x2,y2,epsilon); Coord d, norm, norm2, dot; Coord dx, dy, dx2, dy2; dx = x - x1; dy = y - y1; dx2 = x2 - x1; dy2 = y2 - y1; //printf("%g %g %g %g\n", dx, dy, dx2, dy2); norm2 = dx2*dx2 + dy2*dy2; norm = dx*dx + dy*dy; dot = dx*dx2 + dy*dy2; if (norm2 == 0) {norm2 = 1.;} d = norm - dot*dot/norm2; if (d < 0.) { return 0.; } return sqrt(d); } float MyMath::distance_to_line_segment(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2 ) { Coord norm, norm2, dot; Coord dx, dy, dx2, dy2; dx = x - x1; dy = y - y1; dx2 = x2 - x1; dy2 = y2 - y1; norm2 = dx2*dx2 + dy2*dy2; norm = dx*dx + dy*dy; if (norm2 == 0) { return sqrt(norm); } dot = dx*dx2 + dy*dy2; if (dot < 0) { return sqrt(norm); }else if (dot > norm2) { dx = x - x2; dy = y - y2; return sqrt(dx*dx + dy*dy); }else{ dx = norm - dot*dot/norm2; if (dx <= 0) { return 0.; } return sqrt(dx); } } bool MyMath::near_line_segment(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon) { Coord l = x1, b = y1, r = x2, t = y2; MyMath::minmax(l, r); MyMath::minmax(b, t); //printf("near_line_seg inside %d\n",inside(x, y, l-epsilon, b-epsilon, r+epsilon, t+epsilon)); //printf("near_line_seg near_line %d\n", near_line(x, y, l, b, r, t, epsilon)); return MyMath::inside(x, y, l-epsilon, b-epsilon, r+epsilon, t+epsilon) && MyMath::near_line(x, y, x1, y1, x2, y2, epsilon) ; } #if 0 void MyMath::round_range(Coord x1, Coord x2, double& y1, double& y2, int& ntic) { double d = x2 - x1; int e = 0; while (d > 10) { d /= 10.; ++e; } while (d < 10) { d *= 10.; --e; } if (d > 76.) { d = 100.; ntic = 5; }else if (d > 51.) { d = 75.; ntic = 3; }else if (d > 31.) { d = 50.; ntic = 5; }else if (d > 26.) { d = 30.; ntic = 3; }else if (d > 21.) { d = 25.; ntic = 5; }else if (d > 16) { d = 20; ntic = 4; #if 0 }else if (d > 11) { d = 15; ntic = 3; }else{ d = 10.; ntic = 5; } #else }else{ int i = int(d); d = double(i); if (i > 6) { if ((i%2) == 0) { ntic = i/2; }else if ((i%3) == 0) { ntic = i/3; } else { i = i+1; d = double(i); ntic = i/2; } }else{ ntic = i; } } #endif while (e > 0) { d *= 10.; --e; } while (e < 0) { d /= 10.; ++e; } d /= double(ntic); y1 = d*double(int(x1/d - .5)); y2 = d*double(int(x2/d + .5)); ntic = int((y2 - y1)/d + .5); } #else void MyMath::round_range(Coord x1, Coord x2, double& y1, double& y2, int& ntic) { double d = x2 - x1; d = pow(10, floor(log10(d)))/10; y1 = d*MyMath::anint(x1/d); y2 = d*MyMath::anint(x2/d); int i = int((y2 - y1)/d + .5); // 10 < i < 100 //printf("%d %g\n", i, dx); for(;;) { if (i%3 == 0) { ntic = 3; return; }else if (i%4 == 0) { ntic = 4; return; }else if (i%5 == 0) { ntic = 5; return; } y1 -= d; y2 += d; i += 2; } } #endif void MyMath::round_range_down(Coord x1, Coord x2, double& y1, double& y2, int& ntic) { double d = x2 - x1; double e = pow(10, floor(log10(d)))/10; int i = int(d/e + .5); if (i > 20) { y1 = 5*e*ceil(x1/e/5 - .01); y2 = 5*e*floor(x2/e/5 + .01); }else{ y1 = e*ceil(x1/e - .01); y2 = e*floor(x2/e + .01); } i = int((y2 - y1)/e + .5); //printf("%d %g\n", i, e); for(;;) { if (i%3 == 0) { ntic = 3; return; }else if (i%4 == 0) { ntic = 4; return; }else if (i%5 == 0) { ntic = 5; return; } y1 -= e; ++i; } } double MyMath::round(float& x1, float& x2, int direction, int digits) { double d; if (x2 > x1) { d = x2 - x1; }else{ d = Math::abs(x1); } double e = pow(10, floor(log10(d)) + 1 - digits); switch (direction) { case Expand: x1 = e*floor(x1/e); x2 = e*ceil(x2/e); break; case Contract: x1 = e*ceil(x1/e); x2 = e*floor(x2/e); break; case Lower: x1 = e*floor(x1/e); x2 = e*floor(x2/e); break; case Higher: x1 = e*ceil(x1/e); x2 = e*ceil(x2/e); break; } return e; } void MyMath::box(Requisition& req, Coord& x1, Coord& y1, Coord& x2, Coord& y2) { Requirement& rx = req.x_requirement(); x1 = -rx.alignment() * rx.natural(); x2 = x1 + rx.natural(); Requirement& ry = req.y_requirement(); y1 = -ry.alignment() * ry.natural(); y2 = y1 + ry.natural(); } bool MyMath::unit_normal(Coord x, Coord y, Coord* perp) { float d; d = sqrt(x*x + y*y); if (d < 1e-6) { perp[0] = 0.; perp[1] = 1.; return false; } perp[0] = y/d; perp[1] = -x/d; return true; } neuron-7.5/src/ivoc/mymath.h000066400000000000000000000055031323325274500161030ustar00rootroot00000000000000#ifndef mymath_h #define mymath_h #include #include extern "C" { extern int nrn_isdouble(void*, double, double); } class Extension; class MyMath { public: // increase all around in screen coords static void extend(Extension&, Coord); static void extend(Extension&, const Extension&); static void minmax(Coord& min, Coord& max); static bool inside(Coord x, Coord min, Coord max); static float min(int count, const float*); static float max(int count, const float*); static bool inside( Coord x, Coord y, Coord left, Coord bottom, Coord right, Coord top ); // within epsilon distance from the infinite line static bool near_line( Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon ); // within epsilon distance from the line segment static bool near_line_segment( Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon ); // returns distance between point and line segment static float distance_to_line_segment( Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2 ); // returns distance between point and line static float distance_to_line( Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2 ); // returns square norm static float norm2(Coord x, Coord y) { return x*x + y*y; } // unit length vector perpindicular to vector (x, y) static bool unit_normal(Coord x, Coord y, Coord* perp); // returns range extended to nearest 1.5 digit accuracy. // ie. digit is 1, 2, or 5 static void round_range(Coord x1, Coord x2, double& y1, double& y2, int& ntic); static void round_range_down(Coord x1, Coord x2, double& y1, double& y2, int& ntic); enum {Expand, Contract, Higher, Lower}; static double round(float& x1, float& x2, int direction, int digits); static void box(Requisition&, Coord& x1, Coord& y1, Coord& x2, Coord& y2); static double anint(double); /* round toward nearest integer */ static double resolution(double); // 100, 10, .1,... least significant digit static bool lt(double x, double y, double e) { return x < (y-e); } static bool le(double x, double y, double e) { return x <= (y+e); } static bool eq(double x, double y, double e) { return Math::equal(x,y,e);} }; inline void MyMath::extend(Extension& e, const Extension& x) { e.set_xy(NULL, e.left() + x.left(), e.bottom() + x.bottom(), e.right() + x.right(), e.top() + x.top()); } inline void MyMath::extend(Extension& e, Coord x) { e.set_xy(NULL, e.left() - x, e.bottom() - x, e.right() + x, e.top() + x); } inline void MyMath::minmax(Coord& x, Coord& y) { if (y < x) {Coord z = x; x = y; y = z;} } inline bool MyMath::inside(Coord x, Coord x1, Coord x2) { return (x >= x1 && x <= x2); } inline bool MyMath::inside(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2) { return inside(x, x1, x2) && inside(y, y1, y2); } #endif neuron-7.5/src/ivoc/nrngsl.h000066400000000000000000000006411323325274500161050ustar00rootroot00000000000000#ifndef nrngsl_h #define nrngsl_h #define BASE double #define GSL_ERROR(a,b) hoc_execerror(a, "b") #define FUNCTION(a,b) nrn ## a ## _ ## b #define ATOMIC double #define VECTOR(a,stride,i) ((a)[(stride)*(i)]) int FUNCTION(gsl_fft_halfcomplex,radix2_transform) (BASE data[], const size_t stride, const size_t n); #endif neuron-7.5/src/ivoc/nrngsl_hc_radix2.c000066400000000000000000000113351323325274500200250ustar00rootroot00000000000000/* fft/hc_radix2.c * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ int FUNCTION(gsl_fft_halfcomplex,radix2_backward) (BASE data[], const size_t stride, const size_t n) { int status = FUNCTION(gsl_fft_halfcomplex,radix2_transform) (data, stride, n) ; return status ; } int FUNCTION(gsl_fft_halfcomplex,radix2_inverse) (BASE data[], const size_t stride, const size_t n) { int status = FUNCTION(gsl_fft_halfcomplex,radix2_transform) (data, stride, n); if (status) { return status; } /* normalize inverse fft with 1/n */ { const ATOMIC norm = 1.0 / n; size_t i; for (i = 0; i < n; i++) { data[stride*i] *= norm; } } return status; } int FUNCTION(gsl_fft_halfcomplex,radix2_transform) (BASE data[], const size_t stride, const size_t n) { int result ; size_t p, p_1, q; size_t i; size_t logn = 0; int status; if (n == 1) /* identity operation */ { return 0 ; } /* make sure that n is a power of 2 */ result = fft_binary_logn(n) ; if (result == -1) { GSL_ERROR ("n is not a power of 2", GSL_EINVAL); } else { logn = result ; } /* apply fft recursion */ p = n; q = 1 ; p_1 = n/2 ; for (i = 1; i <= logn; i++) { size_t a, b; /* a = 0 */ for (b = 0; b < q; b++) { const ATOMIC z0 = VECTOR(data,stride,b*p); const ATOMIC z1 = VECTOR(data,stride,b*p + p_1); const ATOMIC t0_real = z0 + z1 ; const ATOMIC t1_real = z0 - z1 ; VECTOR(data,stride,b*p) = t0_real; VECTOR(data,stride,b*p + p_1) = t1_real ; } /* a = 1 ... p_{i-1}/2 - 1 */ { ATOMIC w_real = 1.0; ATOMIC w_imag = 0.0; const ATOMIC theta = 2.0 * M_PI / p; const ATOMIC s = sin (theta); const ATOMIC t = sin (theta / 2.0); const ATOMIC s2 = 2.0 * t * t; for (a = 1; a < (p_1)/2; a++) { /* trignometric recurrence for w-> exp(i theta) w */ { const ATOMIC tmp_real = w_real - s * w_imag - s2 * w_real; const ATOMIC tmp_imag = w_imag + s * w_real - s2 * w_imag; w_real = tmp_real; w_imag = tmp_imag; } for (b = 0; b < q; b++) { ATOMIC z0_real = VECTOR(data,stride,b*p + a) ; ATOMIC z0_imag = VECTOR(data,stride,b*p + p - a) ; ATOMIC z1_real = VECTOR(data,stride,b*p + p_1 - a) ; ATOMIC z1_imag = -VECTOR(data,stride,b*p + p_1 + a) ; /* t0 = z0 + z1 */ ATOMIC t0_real = z0_real + z1_real; ATOMIC t0_imag = z0_imag + z1_imag; /* t1 = (z0 - z1) */ ATOMIC t1_real = z0_real - z1_real; ATOMIC t1_imag = z0_imag - z1_imag; VECTOR(data,stride,b*p + a) = t0_real ; VECTOR(data,stride,b*p + p_1 - a) = t0_imag ; VECTOR(data,stride,b*p + p_1 + a) = (w_real * t1_real - w_imag * t1_imag) ; VECTOR(data,stride,b*p + p - a) = (w_real * t1_imag + w_imag * t1_real) ; } } } if (p_1 > 1) { for (b = 0; b < q; b++) { VECTOR(data,stride,b*p + p_1/2) *= 2 ; VECTOR(data,stride,b*p + p_1 + p_1/2) *= -2 ; } } p_1 = p_1 / 2 ; p = p / 2 ; q = q * 2 ; } /* bit reverse the ordering of output data for decimation in frequency algorithm */ status = FUNCTION(fft_real,bitreverse_order)(data, stride, n, logn) ; return 0; } neuron-7.5/src/ivoc/nrngsl_real_radix2.c000066400000000000000000000120031323325274500203470ustar00rootroot00000000000000/* fft/real_radix2.c * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Hines: for greater self-containment */ #include "nrngsl.h" /* from gsl/fft/factorize.c */ static int fft_binary_logn (const size_t n) { size_t ntest ; size_t binary_logn = 0 ; size_t k = 1; while (k < n) { k *= 2; binary_logn++; } ntest = (1 << binary_logn) ; if (n != ntest ) { return -1 ; /* n is not a power of 2 */ } return binary_logn; } /* from gsl/fft/bitreverse.c */ static int FUNCTION(fft_real,bitreverse_order) (BASE data[], const size_t stride, const size_t n, size_t logn) { /* This is the Goldrader bit-reversal algorithm */ size_t i; size_t j = 0; logn = 0 ; /* not needed for this algorithm */ for (i = 0; i < n - 1; i++) { size_t k = n / 2 ; if (i < j) { const BASE tmp = VECTOR(data,stride,i); VECTOR(data,stride,i) = VECTOR(data,stride,j); VECTOR(data,stride,j) = tmp; } while (k <= j) { j = j - k ; k = k / 2 ; } j += k ; } return 0; } /*-----------------------------------------*/ int FUNCTION(gsl_fft_real,radix2_transform) (BASE data[], const size_t stride, const size_t n) { int result ; size_t p, p_1, q; size_t i; size_t logn = 0; int status; if (n == 1) /* identity operation */ { return 0 ; } /* make sure that n is a power of 2 */ result = fft_binary_logn(n) ; if (result == -1) { GSL_ERROR ("n is not a power of 2", GSL_EINVAL); } else { logn = result ; } /* bit reverse the ordering of input data for decimation in time algorithm */ status = FUNCTION(fft_real,bitreverse_order)(data, stride, n, logn) ; /* apply fft recursion */ p = 1; q = n ; for (i = 1; i <= logn; i++) { size_t a, b; p_1 = p ; p = 2 * p ; q = q / 2 ; /* a = 0 */ for (b = 0; b < q; b++) { ATOMIC t0_real = VECTOR(data,stride,b*p) + VECTOR(data,stride,b*p + p_1) ; ATOMIC t1_real = VECTOR(data,stride,b*p) - VECTOR(data,stride,b*p + p_1) ; VECTOR(data,stride,b*p) = t0_real ; VECTOR(data,stride,b*p + p_1) = t1_real ; } /* a = 1 ... p_{i-1}/2 - 1 */ { ATOMIC w_real = 1.0; ATOMIC w_imag = 0.0; const double theta = - 2.0 * M_PI / p; const ATOMIC s = sin (theta); const ATOMIC t = sin (theta / 2.0); const ATOMIC s2 = 2.0 * t * t; for (a = 1; a < (p_1)/2; a++) { /* trignometric recurrence for w-> exp(i theta) w */ { const ATOMIC tmp_real = w_real - s * w_imag - s2 * w_real; const ATOMIC tmp_imag = w_imag + s * w_real - s2 * w_imag; w_real = tmp_real; w_imag = tmp_imag; } for (b = 0; b < q; b++) { ATOMIC z0_real = VECTOR(data,stride,b*p + a) ; ATOMIC z0_imag = VECTOR(data,stride,b*p + p_1 - a) ; ATOMIC z1_real = VECTOR(data,stride,b*p + p_1 + a) ; ATOMIC z1_imag = VECTOR(data,stride,b*p + p - a) ; /* t0 = z0 + w * z1 */ ATOMIC t0_real = z0_real + w_real * z1_real - w_imag * z1_imag; ATOMIC t0_imag = z0_imag + w_real * z1_imag + w_imag * z1_real; /* t1 = z0 - w * z1 */ ATOMIC t1_real = z0_real - w_real * z1_real + w_imag * z1_imag; ATOMIC t1_imag = z0_imag - w_real * z1_imag - w_imag * z1_real; VECTOR(data,stride,b*p + a) = t0_real ; VECTOR(data,stride,b*p + p - a) = t0_imag ; VECTOR(data,stride,b*p + p_1 - a) = t1_real ; VECTOR(data,stride,b*p + p_1 + a) = -t1_imag ; } } } if (p_1 > 1) { for (b = 0; b < q; b++) { /* a = p_{i-1}/2 */ VECTOR(data,stride,b*p + p - p_1/2) *= -1 ; } } } return 0; } neuron-7.5/src/ivoc/nrnmain.cpp000077500000000000000000000050131323325274500166000ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "../nrncvode/nrnneosm.h" #include #include extern "C" { int nrn_isdouble(double*, double, double); int ivocmain(int, char**, char**); extern int nrn_main_launch; #if NRNMPI_DYNAMICLOAD extern void nrnmpi_stubs(); extern char* nrnmpi_load(int is_python); #endif #if BLUEGENE_CHECKPOINT void BGLCheckpointInit(char* chkptDirPath); // note: get the path from the environment variable BGL_CHKPT_DIR_PATH // otherwise from $HOME/checkpoint, otherwise $HOME #endif } int main(int argc, char** argv, char** env) { nrn_isdouble(0,0,0); nrn_main_launch = 1; #if 0 printf("argc=%d\n", argc); for (int i=0; i < argc; ++i) { printf("argv[%d]=|%s|\n", i, argv[i]); } #endif #if NRNMPI #if NRNMPI_DYNAMICLOAD nrnmpi_stubs(); for (int i=0; i < argc; ++i) { if (strcmp("-mpi", argv[i]) == 0) { char* pmes; pmes = nrnmpi_load(0); if (pmes) { printf("%s\n", pmes); exit(1); } break; } } #endif nrnmpi_init(1, &argc, &argv); // may change argc and argv #endif #if BLUEGENE_CHECKPOINT BGLCheckpointInit((char*)0); #endif errno = 0; return ivocmain(argc, argv, env); } #if USENCS extern "C" { void nrn2ncs_outputevent(int, double){} } #endif // moving following to src/oc/ockludge.c since on // Darwin Kernel Version 8.9.1 on apple i686 (and the newest config.guess // thinks it is a i386, but that is a different story) // including mpi.h gives some errors like: // /Users/hines/mpich2-1.0.5p4/instl/include/mpicxx.h:26:2: error: #error // SEEK_SET is #defined but must not be for the C++ binding of MPI" #if 0 && NRNMPI && DARWIN // For DARWIN I do not really know the proper way to avoid // dyld: lazy symbol binding failed: Symbol not found: _MPI_Init // when the MPI functions are all used in the libnrnmpi.dylib // but the libmpi.a is statically linked. Therefore I am forcing // the linking here by listing all the MPI functions being used. #include static void work_around() { MPI_Comm c = MPI_COMM_WORLD; MPI_Init(0, 0); MPI_Comm_rank(c, 0); MPI_Comm_size(c, 0); MPI_Wtime(); MPI_Finalize(); MPI_Unpack(0, 0, 0, 0, 0, 0, c); MPI_Pack(0, 0, 0, 0, 0, 0, c); MPI_Pack_size(0, 0, c, 0); MPI_Send(0,0,0,0,0,c); MPI_Probe(0, 0, c, 0); MPI_Get_count(0, 0, 0); MPI_Recv(0,0,0,0,0,c,0); MPI_Sendrecv(0,0,0,0,0,0,0,0,0,0,c,0); MPI_Iprobe(0,0,c,0,0); MPI_Address(0,0); MPI_Type_struct(0,0,0,0,0); MPI_Type_commit(0); MPI_Allgather(0,0,0,0,0,0,c); MPI_Allgatherv(0,0,0,0,0,0,0,c); MPI_Allreduce(0,0,0,0,0,c); } #endif neuron-7.5/src/ivoc/nrnmutdec.h000066400000000000000000000023041323325274500165770ustar00rootroot00000000000000#ifndef nrnmutdec_h #define nrnmutdec_h #include #if USE_PTHREAD #include #ifdef MINGW #undef DELETE #undef near #endif #define MUTDEC pthread_mutex_t* mut_; #define MUTCONSTRUCTED (mut_ != (pthread_mutex_t*)0) #if defined(__cplusplus) #define MUTCONSTRUCT(mkmut) {if (mkmut) {mut_ = new pthread_mutex_t; pthread_mutex_init(mut_, 0);}else{mut_ = 0;}} #define MUTDESTRUCT {if (mut_){pthread_mutex_destroy(mut_); delete mut_; mut_ = (pthread_mutex_t*)0;}} #else #define MUTCONSTRUCT(mkmut) {if (mkmut) {mut_ = (pthread_mutex_t*)malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mut_, 0);}else{mut_ = 0;}} #define MUTDESTRUCT {if (mut_){pthread_mutex_destroy(mut_); free((char*)mut_); mut_ = (pthread_mutex_t*)0;}} #endif #define MUTLOCK {if (mut_) {pthread_mutex_lock(mut_);}} #define MUTUNLOCK {if (mut_) {pthread_mutex_unlock(mut_);}} /*#define MUTLOCK {if (mut_) {printf("lock %lx\n", mut_); pthread_mutex_lock(mut_);}}*/ /*#define MUTUNLOCK {if (mut_) {printf("unlock %lx\n", mut_); pthread_mutex_unlock(mut_);}}*/ #else #define MUTDEC /**/ #define MUTCONSTRUCTED (0) #define MUTCONSTRUCT(mkmut) /**/ #define MUTDESTRUCT /**/ #define MUTLOCK /**/ #define MUTUNLOCK /**/ #endif #endif neuron-7.5/src/ivoc/objcmd.cpp000066400000000000000000000111271323325274500163740ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV #include #include "ivoc.h" #include "scenevie.h" #include "utility.h" #endif #include #include #include #include "objcmd.h" #include "oc2iv.h" extern "C" { extern Object* hoc_thisobject; int (*nrnpy_hoccommand_exec)(Object*); int (*nrnpy_hoccommand_exec_strret)(Object*, char*, int); void (*nrnpy_cmdtool)(Object*, int type, double x, double y, int kd); double (*nrnpy_func_call)(Object*, int, int*); } HocCommand::HocCommand(const char* cmd) { init(cmd, hoc_thisobject); } HocCommand::HocCommand(const char* cmd, Object* obj) { init(cmd, obj); } HocCommand::HocCommand(Object* pobj) { // must wrap a PyObject method or tuple of (method, arg1, ...) // hold a reference to the wrapped PyObject if (strcmp(pobj->ctemplate->sym->name, "PythonObject") != 0) { hoc_execerror(hoc_object_name(pobj), "not a PythonObject"); } po_ = pobj; hoc_obj_ref(po_); s_ = NULL; obj_ = NULL; } void HocCommand::init(const char* cmd, Object* obj) { s_ = new CopyString(cmd); obj_ = obj; po_ = NULL; if (obj_) { nrn_notify_when_void_freed((void*)obj_, this); } } void HocCommand::update(Observable*) { // obj_ has been freed obj_ = NULL; delete s_; s_ = new CopyString(""); } HocCommand::~HocCommand() { if (obj_) { nrn_notify_pointer_disconnect(this); } if (s_) { delete s_; } if (po_) { hoc_obj_unref(po_); } } void HocCommand::help() { #if HAVE_IV char buf[200]; if (obj_) { sprintf(buf,"%s %s", s_->string(), obj_->ctemplate->sym->name ); }else{ sprintf(buf, "%s", s_->string()); } Oc::help(buf); #endif } const char* ccc = "PythonObject"; const char* HocCommand::name() { if (po_ == NULL) { return s_->string(); }else{ return ccc; } } void HocCommand::audit() { if (!s_) { return; } char buf[256]; if (obj_) { sprintf(buf, "// execute(\"%s\", %p)\n", name(), obj_); }else{ sprintf(buf, "{%s}\n", name()); } hoc_audit_command(buf); } int HocCommand::execute(bool notify) { int err; if (po_) { assert(nrnpy_hoccommand_exec); err = (*nrnpy_hoccommand_exec)(po_); }else{ if (!s_) { return 0; } char buf[256]; sprintf(buf, "{%s}\n", s_->string()); err = hoc_obj_run(buf, obj_); } #if HAVE_IV if (notify) { Oc oc; oc.notify(); } #endif return err; } int HocCommand::exec_strret(char* buf, int size, bool notify) { assert (po_) int err = (*nrnpy_hoccommand_exec_strret)(po_, buf, size); #if HAVE_IV if (notify) { Oc oc; oc.notify(); } #endif return err; } int HocCommand::execute(const char* s, bool notify) { assert(po_ == NULL); char buf[256]; sprintf(buf, "{%s}\n", s); int err = hoc_obj_run(buf, obj_); #if HAVE_IV if (notify) { Oc oc; oc.notify(); } #endif return err; } double HocCommand::func_call(int narg, int* perr) { if (po_) { if (nrnpy_func_call) { return (*nrnpy_func_call)(po_, narg, perr); } *perr = 1; return 0.0; } Symbol* s = NULL; if (obj_ && obj_->ctemplate) { s = hoc_table_lookup(name(), obj_->ctemplate->symtable); } if (!s) { s = hoc_lookup(name()); } if (!s) { hoc_execerror(name(), "is not a symbol in HocCommand::func_call"); } return hoc_call_objfunc(s, narg, obj_); } #if HAVE_IV // to end of file HocCommandAction::HocCommandAction(HocCommand* hc) { hc_ = hc; } HocCommandAction::~HocCommandAction() {delete hc_;} void HocCommandAction::execute() { hc_->execute(); } HocCommandTool::HocCommandTool(HocCommand* hc) : Rubberband() { hc_ = hc; } HocCommandTool::~HocCommandTool() { delete hc_; } bool HocCommandTool::event(Event& e) { char buf[256]; Coord x, y; int kd; #ifdef WIN32 if (e.type() != Event::down && e.type() != Event::up && e.window()->canvas()->any_damage()) { return true; } #endif if (e.type() == Event::down) { handle_old_focus(); Resource::ref(this); e.grab(this); #ifdef WIN32 e.window()->grab_pointer(); #endif } kd = e.control_is_down() + e.shift_is_down()*2 + e.meta_is_down()*4; // transformer().inverse_transform(e.pointer_x(), e.pointer_y(), x, y); // the hoc callback may change the size of the view const Transformer& t = XYView::current_pick_view()->s2o(); t.transform(e.pointer_x(), e.pointer_y(), x, y); //printf("%g %g %g %g\n", e.pointer_x(), e.pointer_y(), x, y); if (e.type() == Event::up) { e.ungrab(this); #ifdef WIN32 e.window()->ungrab_pointer(); #endif } if (hc_->pyobject()) { (*nrnpy_cmdtool)(hc_->pyobject(), e.type(), x, y, kd); Oc oc; oc.notify(); }else{ sprintf(buf, "%s(%d, %g, %g, %d)", hc_->name(), e.type(), x, y, kd); hc_->execute(buf, true); } if (e.type() == Event::up) { Resource::unref(this); } return true; } #endif neuron-7.5/src/ivoc/objcmd.h000066400000000000000000000024421323325274500160410ustar00rootroot00000000000000#ifndef objcmd_h #define objcmd_h #include #include #if HAVE_IV #include #include "rubband.h" #endif struct Object; // command to be executed within scope of object. class HocCommand : public Observer{ public: HocCommand(const char*); HocCommand(const char*, Object*); HocCommand(Object* paction); // Python method call or tuple with args virtual ~HocCommand(); int execute(bool notify = true); int execute(const char*, bool notify = true); int exec_strret(char* buf, int size, bool notify = true); // for python callback returning a string const char* name(); virtual void update(Observable*); virtual void audit(); virtual void help(); double func_call(int narg, int* perr = NULL); //perr used only by pyobject Object* object() { return obj_; } Object* pyobject() { return po_; } private: void init(const char*, Object*); private: Object* obj_; CopyString* s_; Object* po_; }; #if HAVE_IV class HocCommandAction : public Action { public: HocCommandAction(HocCommand*); virtual ~HocCommandAction(); virtual void execute(); private: HocCommand* hc_; }; class HocCommandTool : public Rubberband { public: HocCommandTool(HocCommand*); virtual ~HocCommandTool(); virtual bool event(Event&); HocCommand* hc_; }; #endif #endif neuron-7.5/src/ivoc/oc2iv.cpp000066400000000000000000000033251323325274500161610ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "InterViews/resource.h" #include "oc2iv.h" #include "ocpointer.h" extern "C" { #include "parse.h" extern Symlist* hoc_top_level_symlist; extern Objectdata *hoc_top_level_data; extern Object* hoc_thisobject; extern Symlist* hoc_symlist; } char* Oc2IV::object_str(const char* name, Object* ob) { if (ob && ob->ctemplate->constructor) { if (is_obj_type(ob, "Pointer") && strcmp(name, "s") == 0) { return ((OcPointer*)(ob->u.this_pointer))->s_; } }else{ return *object_pstr(name, ob); } return 0; } char** Oc2IV::object_pstr(const char* name, Object* ob) { Objectdata* od; Symlist* sl; if (ob) { if (ob->ctemplate->constructor) { return NULL; }else{ od = ob->u.dataspace; sl = ob->ctemplate->symtable; } }else{ od = hoc_top_level_data; sl = hoc_top_level_symlist; } Symbol* sym = hoc_table_lookup(name, sl); if (sym && sym->type == STRING) { return ::object_pstr(sym, od); }else{ return 0; } } ParseTopLevel::ParseTopLevel() { restored_ = true; save(); } ParseTopLevel::~ParseTopLevel() { restore(); } void ParseTopLevel::save() { if (restored_ == true) { if (hoc_objectdata == hoc_top_level_data) { obdsav_ = NULL; }else{ obdsav_ = hoc_objectdata; } obsav_ = hoc_thisobject; symsav_ = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = NULL; hoc_symlist = hoc_top_level_symlist; restored_ = false; } } extern "C" { extern int hoc_in_template; } void ParseTopLevel::restore() { if (restored_ == false) { if (obdsav_ || hoc_in_template) { hoc_objectdata = obdsav_; }else{ hoc_objectdata = hoc_top_level_data; } hoc_thisobject = obsav_; hoc_symlist = symsav_; restored_ = true; } } neuron-7.5/src/ivoc/oc2iv.h000066400000000000000000000052761323325274500156350ustar00rootroot00000000000000#ifndef oc2iv_h #define oc2iv_h #include #include // common things in oc that can be used by ivoc #include "hocdec.h" //xmenu #define CChar const char extern void hoc_ivpanel(CChar*, bool h = false); extern void hoc_ivpanelmap(int scroll = -1); extern void hoc_ivbutton(CChar* name, CChar* action, Object* pyact = 0); extern void hoc_ivradiobutton(CChar* name, CChar* action, bool activate = false, Object* pyact = 0); extern void hoc_ivmenu(CChar*, bool add2menubar = false); extern void hoc_ivvarmenu(CChar*, CChar*, bool add2menubar = false, Object* pyvar = NULL); extern void hoc_ivvalue(CChar* name, CChar* variable, bool deflt=false, Object* pyvar = 0); extern void hoc_ivfixedvalue(CChar* name, CChar* variable, bool deflt=false, bool usepointer=false); extern void hoc_ivvalue_keep_updated(CChar* name, CChar* variable, Object* pyvar = 0); extern void hoc_ivpvalue(CChar* name, double*, bool deflt=false, HocSymExtension* extra=NULL); extern void hoc_ivvaluerun(CChar* name, CChar* variable, CChar* action, bool deflt=false, bool canrun=false, bool usepointer=false, Object* pyvar = 0, Object* pyact = 0); extern void hoc_ivvaluerun_ex(CChar* name, CChar* var, double* pvar, Object* pyvar, CChar* action, Object* pyact, bool deflt=false, bool canrun=false, bool usepointer=false, HocSymExtension* extra=NULL); extern void hoc_ivpvaluerun(CChar* name, double*, CChar* action, bool deflt=false, bool canrun=false, HocSymExtension* extra=NULL); extern void hoc_ivlabel(CChar*); extern void hoc_ivvarlabel(char**, Object* pyvar = 0); extern void hoc_ivstatebutton(double*, CChar* name, CChar* action, int style, Object* pyvar = 0, Object* pyact = 0); extern void hoc_ivslider(double*, float low=0, float high=100, float resolution=1, int steps=10, const char* send_cmd=NULL, bool vert=false, bool slow = false, Object* pyvar = 0, Object* pyact = 0); inline double* object_pval(Symbol* sym, Objectdata* od) { return od[sym->u.oboff].pval; } inline char* object_str(Symbol* sym, Objectdata* od) { return *od[sym->u.oboff].ppstr; } inline char** object_pstr(Symbol* sym, Objectdata* od) { return od[sym->u.oboff].ppstr; } inline Object** object_pobj(Symbol* sym, Objectdata* od) { return od[sym->u.oboff].pobj; } inline hoc_Item** object_psecitm(Symbol* sym, Objectdata* od) { return od[sym->u.oboff].psecitm; } class Oc2IV { public: static char** object_pstr(const char* symname, Object* = NULL); static char* object_str(const char* symname, Object* = NULL); }; class Symlist; #ifndef OCMATRIX class ParseTopLevel { public: ParseTopLevel(); virtual ~ParseTopLevel(); void save(); void restore(); private: Objectdata* obdsav_; Object* obsav_; Symlist* symsav_; bool restored_; }; #endif #endif neuron-7.5/src/ivoc/ocbox.cpp000066400000000000000000000422251323325274500162530ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV #include #include #include #include #include #include #include #include #include #include #include #include "ocbox.h" #include "apwindow.h" #include "objcmd.h" #include "ivoc.h" #endif /* HAVE_IV */ #include #include "oc2iv.h" #include "classreg.h" #if HAVE_IV class NrnFixedLayout : public Layout { public: NrnFixedLayout(const DimensionName, Coord span); virtual ~NrnFixedLayout(); virtual void request( GlyphIndex count, const Requisition*, Requisition& result ); virtual void allocate( const Allocation& given, GlyphIndex count, const Requisition*, Allocation* result ); virtual void span(Coord); virtual Coord span() { return span_; } virtual bool vertical() { return dimension_ == Dimension_Y; } private: DimensionName dimension_; Coord span_; }; /*static*/ class OcBoxImpl { public: PolyGlyph* ocglyph_list_; PolyGlyph* box_; Object* oc_ref_; // reference to oc "this" CopyString* save_action_; Object* save_pyact_; int type_; ostream* o_; Object* keep_ref_; CopyString* dis_act_; Object* dis_pyact_; bool dismissing_; Coord next_map_adjust_; PolyGlyph* ba_list_; bool full_request_; }; /*static*/ class BoxAdjust : public InputHandler { public: BoxAdjust(OcBox*, OcBoxImpl*, Glyph*, Coord natural); virtual ~BoxAdjust(); virtual void press(const Event&); virtual void drag(const Event&); virtual void release(const Event&); NrnFixedLayout* fixlay_; OcBox* b_; OcBoxImpl* bi_; Glyph* ga_; // not part of this glyph. Coord pstart_, fstart_; }; /*static*/ class BoxDismiss : public WinDismiss { public: BoxDismiss(DismissableWindow*, String*, OcBox*, Object* pyact=NULL); virtual ~BoxDismiss(); virtual void execute(); private: HocCommand* hc_; OcBox* b_; }; BoxDismiss::BoxDismiss(DismissableWindow* w, String* s, OcBox* b, Object* pyact) : WinDismiss(w) { if (pyact) { hc_ = new HocCommand(pyact); }else{ hc_ = new HocCommand(s->string()); } b_ = b; } BoxDismiss::~BoxDismiss() { delete hc_; } void BoxDismiss::execute() { if (b_->dismissing() == true) { WinDismiss::execute(); }else{ hc_->execute(); } } #endif /* HAVE_IV */ static void* vcons(Object*) { #if HAVE_IV OcBox* b = NULL; int frame = OcBox::INSET; bool scroll = false; if (ifarg(1)) frame = int(chkarg(1,0,3)); if (ifarg(2) && int(chkarg(2,0,1)) == 1) { scroll = true; } b = new OcBox(OcBox::V,frame, scroll); b->ref(); return (void*)b; #else return (void*)0; #endif /* HAVE_IV */ } static void* hcons(Object*) { #if HAVE_IV OcBox* b = NULL; int frame = OcBox::INSET; if (ifarg(1)) frame = int(chkarg(1,0,3)); b = new OcBox(OcBox::H,frame); b->ref(); return (void*)b; #else return (void*)0; #endif /* HAVE_IV */ } static void destruct(void* v) { #if HAVE_IV OcBox* b = (OcBox*)v; IFGUI if (b->has_window()) { b->window()->dismiss(); } ENDGUI b->unref(); #endif /* HAVE_IV */ } static double intercept(void* v) { #if HAVE_IV bool b = int(chkarg(1, 0., 1.)); IFGUI ((OcBox*)v)->intercept(b); ENDGUI return double(b); #else return 0.; #endif /* HAVE_IV */ } static double ses_pri(void* v) { #if HAVE_IV int p = int(chkarg(1, -1000, 10000)); IFGUI ((OcBox*)v)->session_priority(p); ENDGUI return double(p); #else return 0.; #endif /* HAVE_IV */ } static double map(void* v) { #if HAVE_IV IFGUI OcBox* b = (OcBox*)v; PrintableWindow* w; b->premap(); if (ifarg(3)) { w = b->make_window(float(*getarg(2)), float(*getarg(3)), float(*getarg(4)), float(*getarg(5))); }else{ w = b->make_window(); } if (ifarg(1)) { char* name = gargstr(1); w->name(name); } b->dismissing(false); w->map(); if (b->full_request() && b->has_window()) { b->window()->request_on_resize(true); } b->dismiss_action(NULL); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double dialog(void* v) { #if HAVE_IV bool r = false; IFGUI OcBox* b = (OcBox*)v; const char* a = "Accept"; const char* c = "Cancel"; if (ifarg(2)) { a = gargstr(2); } if (ifarg(3)) { c = gargstr(3); } Oc oc; oc.notify(); r = b->dialog(gargstr(1), a, c); ENDGUI return double(r); #else return 0.; #endif /* HAVE_IV */ } static double unmap(void* v) { #if HAVE_IV IFGUI OcBox* b = (OcBox*)v; bool accept = true; if (ifarg(1)) { accept = (bool)chkarg(1, 0, 1); } if (b->dialog_dismiss(accept)) { return 0.; } if (b->has_window()) { b->ref(); b->dismissing(true); b->window()->dismiss(); b->window(NULL); // so we don't come back here again before // printable window destructor called b->unref(); } ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static double ismapped(void* v) { #if HAVE_IV bool b = false; IFGUI b = ((OcBox*)v)->has_window(); ENDGUI return double(b); #else return 0.; #endif /* HAVE_IV */ } static double adjuster(void* v) { #if HAVE_IV IFGUI ((OcBox*)v)->adjuster(chkarg(1, -1., 1e5)); ENDGUI #endif /* HAVE_IV */ return 0.; } static double adjust(void* v) { #if HAVE_IV IFGUI int index = 0; if (ifarg(2)) { index = (int)chkarg(2, 0, 1000); } ((OcBox*)v)->adjust(chkarg(1, -1., 1e5), index); ENDGUI #endif /* HAVE_IV */ return 0.; } static double full_request(void* v) { #if HAVE_IV IFGUI OcBox* b = (OcBox*)v; if (ifarg(1)) { bool x = ((int)chkarg(1, 0, 1) != 0) ? true : false; b->full_request(x); } return (b->full_request() ? 1. : 0.); ENDGUI #endif /* HAVE_IV */ return 0.; } static double b_size(void* v) { #if HAVE_IV IFGUI double* p = hoc_pgetarg(1); // array for at least 4 numbers OcBox* b = (OcBox*)v; if (b->has_window()) { p[0] = b->window()->save_left(); p[1] = b->window()->save_bottom(); p[2] = b->window()->width(); p[3] = b->window()->height(); } ENDGUI #endif return 0.; } extern "C" {const char* pwm_session_filename();} static double save(void* v) { #if HAVE_IV IFGUI OcBox* b = (OcBox*)v; char buf[256]; if (hoc_is_object_arg(1)) { b->save_action(0, *hoc_objgetarg(1)); return 1.; }else if (ifarg(2)) { if (hoc_is_double_arg(2)) { // return save session file name hoc_assign_str(hoc_pgargstr(1), pwm_session_filename()); return 1.; }else{ sprintf(buf, "execute(\"%s\", %s)", gargstr(1), gargstr(2)); } }else { //sprintf(buf, "%s", gargstr(1)); b->save_action(gargstr(1), 0); return 1.0; } b->save_action(buf, 0); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } /* help ref .ref(objectvar) solves the problem of keeping an anonymous hoc object which should be destroyed when the window it manages is dismissed. The box keeps a pointer to the hoc object and the object is referenced when the box has a window and unreferenced when the window is dismissed. */ static double ref(void* v) { #if HAVE_IV OcBox* b = (OcBox*)v; b->keep_ref(*hoc_objgetarg(1)); return 0.; #else Object* ob = *hoc_objgetarg(1); hoc_obj_ref(ob); return 0.; #endif /* HAVE_IV */ } /* help dismiss_action .dismiss_action("action") execute the action when the vbox is dismissed from the screen. */ static double dismiss_action(void* v) { #if HAVE_IV IFGUI OcBox* b = (OcBox*)v; if(hoc_is_object_arg(1)) { b->dismiss_action(0, *hoc_objgetarg(1)); }else{ b->dismiss_action(gargstr(1)); } ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static Member_func members[] = { "intercept", intercept, // #if HAVE_IV ok "adjuster", adjuster, // #if HAVE_IV ok "adjust", adjust, // #if HAVE_IV ok "full_request", full_request, // #if HAVE_IV ok "save", save, // #if HAVE_IV ok "map", map, // #if HAVE_IV ok "unmap", unmap, // #if HAVE_IV ok "ismapped", ismapped, // #if HAVE_IV ok "ref", ref, // #if HAVE_IV ok "dismiss_action", dismiss_action, // #if HAVE_IV ok "dialog", dialog, // #if HAVE_IV ok "priority", ses_pri, "size", b_size, 0, 0 }; void HBox_reg() { class2oc("HBox", hcons, destruct, members, NULL, NULL, NULL); } void VBox_reg() { class2oc("VBox", vcons, destruct, members, NULL, NULL, NULL); } #if HAVE_IV OcGlyphContainer::OcGlyphContainer() :OcGlyph(NULL) { parent_ = NULL; recurse_ = false; } void OcGlyphContainer::request(Requisition& r)const { if (!recurse_) { OcGlyphContainer* t = (OcGlyphContainer*)this; t->recurse_ = true; OcGlyph::request(r); Coord w, h; w = h = -1.; def_size(w, h); if (w != -1.) { r.x_requirement().natural(w); r.y_requirement().natural(h); } t->recurse_ = false; }else{ hoc_execerror("Box or Deck is recursive. The GUI may no longer work correctly.\n", "Exit program and eliminate the recursion"); } } OcBox::OcBox(int type, int frame, bool scroll) : OcGlyphContainer() { ScrollBox* sb; PolyGlyph* box; bi_ = new OcBoxImpl; bi_->full_request_ = false; bi_->dismissing_ = false; bi_->next_map_adjust_ = -1.; bi_->ocglyph_list_ = new PolyGlyph(); bi_->ba_list_ = NULL; Resource::ref(bi_->ocglyph_list_); bi_->box_ = NULL; IFGUI WidgetKit& wk = *WidgetKit::instance(); LayoutKit& lk = *LayoutKit::instance(); if (type == H) { box = bi_->box_ = lk.hbox(3); }else{ if (scroll) { bi_->box_ = sb = lk.vscrollbox(10); box = lk.hbox(sb, lk.hspace(4), wk.vscroll_bar(sb)); }else{ box = bi_->box_ = lk.vbox(3); //((Box*)box)->debug_ = new char[50]; //sprintf(((Box*)box)->debug_, "box%p:", this); //printf("%s\n", ((Box*)box)->debug_); } } Resource::ref(bi_->box_); switch (frame) { case INSET: body( new Background ( wk.inset_frame(lk.variable_span(box)), wk.background() ) ); break; case OUTSET: body( new Background ( wk.outset_frame(lk.variable_span(box)), wk.background() ) ); break; case BRIGHT_INSET: body( new Background ( wk.bright_inset_frame(lk.variable_span(box)), wk.background() ) ); break; case FLAT: body( new Background ( lk.variable_span (box), wk.background() ) ); break; } ENDGUI bi_->type_ = type; bi_->oc_ref_ = NULL; bi_->save_action_ = NULL; bi_->save_pyact_ = NULL; bi_->o_ = NULL; bi_->keep_ref_ = NULL; bi_->dis_act_ = NULL; bi_->dis_pyact_ = NULL; } OcBox::~OcBox() { //printf("~OcBox\n"); GlyphIndex i, cnt = bi_->ocglyph_list_->count(); for (i=0; i < cnt; ++i) { ((OcGlyph*)(bi_->ocglyph_list_->component(i)))->parents(false); } Resource::unref(bi_->ocglyph_list_); Resource::unref(bi_->box_); Resource::unref(bi_->ba_list_); hoc_obj_unref(bi_->oc_ref_); if (bi_->save_action_) { delete bi_->save_action_; } if (bi_->save_pyact_) { hoc_obj_unref(bi_->save_pyact_); } if (bi_->dis_act_) { delete bi_->dis_act_; } if (bi_->dis_pyact_) { hoc_obj_unref(bi_->dis_pyact_); } assert(!bi_->keep_ref_); delete bi_; } bool OcBox::full_request() { return bi_->full_request_; } void OcBox::full_request(bool b) { bi_->full_request_ = b; } bool OcBox::dismissing() { return bi_->dismissing_; } void OcBox::dismissing(bool d) { bi_->dismissing_ = d; } void OcGlyphContainer::intercept(bool b) { if (b) { parent_ = PrintableWindow::intercept(this); }else{ PrintableWindow::intercept(parent_); parent_ = NULL; } } void OcBox::box_append(OcGlyph* g){ WidgetKit& wk = *WidgetKit::instance(); LayoutKit& lk = *LayoutKit::instance(); bi_->ocglyph_list_->append(g); g->parents(true); if (bi_->next_map_adjust_ > 0.) { BoxAdjust* ba = new BoxAdjust(this, bi_, g, bi_->next_map_adjust_); if (!bi_->ba_list_) { bi_->ba_list_ = new PolyGlyph(1); bi_->ba_list_->ref(); } bi_->ba_list_->append(ba); bi_->box_->append(ba->ga_); bi_->box_->append(ba); bi_->next_map_adjust_ = -1.; }else{ if (bi_->type_ == V) { bi_->box_->append(lk.hflexible(lk.vcenter(g, 1.))); }else{ bi_->box_->append(lk.vflexible(lk.vcenter(g, 1.))); } } } void OcBox::premap() { if (bi_->ba_list_) { body(new Patch(body())); } } void OcBox::adjuster(Coord natural) { bi_->next_map_adjust_ = natural; } void OcBox::adjust(Coord natural, int index) { //printf("OcBox::adjust %g %d\n", natural, index); if (bi_->ba_list_ && index < bi_->ba_list_->count()) { BoxAdjust* ba = (BoxAdjust*)bi_->ba_list_->component(index); adjust(natural, ba); } } void OcBox::adjust(Coord natural, BoxAdjust* ba) { ba->fixlay_->span(natural); Box::full_request(true); bi_->box_->modified(0); // ((Patch*)body())->reallocate(); ((Patch*)body())->redraw(); Box::full_request(false); } NrnFixedLayout::NrnFixedLayout(const DimensionName d, Coord span) { dimension_ = d; span_ = span; } NrnFixedLayout::~NrnFixedLayout() { } void NrnFixedLayout::request( GlyphIndex, const Requisition*, Requisition& result ) { Requirement& r = result.requirement(dimension_); r.natural(span_); r.stretch(0.0); r.shrink(0.0); } void NrnFixedLayout::allocate( const Allocation&, GlyphIndex, const Requisition*, Allocation* result ) { Allotment& a = result[0].allotment(dimension_); a.span(span_); } void NrnFixedLayout::span(Coord s) { span_ = s; } BoxAdjust::BoxAdjust(OcBox* b, OcBoxImpl* bi, Glyph* g, Coord natural) : InputHandler(NULL, WidgetKit::instance()->style()) { b_ = b; bi_ = bi; LayoutKit& lk = *LayoutKit::instance(); fixlay_ = new NrnFixedLayout(bi->type_ == OcBox::V ? Dimension_Y : Dimension_X, natural); ga_ = lk.vcenter(g, 1.); if (bi->type_ == OcBox::V) { ga_ = lk.hflexible(ga_); body(lk.vspace(10)); }else{ ga_ = lk.vflexible(ga_); body(lk.hspace(10)); } ga_ = new Placement(ga_, fixlay_); } BoxAdjust::~BoxAdjust() { } void BoxAdjust::press(const Event& e) { if (fixlay_->vertical()) { pstart_ = e.pointer_y(); }else{ pstart_ = e.pointer_x(); } fstart_ = fixlay_->span(); } void BoxAdjust::drag(const Event& e) { Coord d; if (fixlay_->vertical()) { d = e.pointer_y() - pstart_; d = fstart_ - d; }else{ d = e.pointer_x() - pstart_; d = fstart_ + d; } if (d < 10.) { d = 10.; } b_->adjust(d, this); } void BoxAdjust::release(const Event& e) { drag(e); } void OcBox::save_action(const char* creat, Object* pyact) { if (bi_->o_) { // old endl cause great slowness on remote filesystem // with gcc version 3.3 20030226 (prerelease) (SuSE Linux) //*bi_->o_ << creat << endl; *bi_->o_ << creat << "\n"; }else{ if (pyact) { bi_->save_pyact_ = pyact; hoc_obj_ref(pyact); }else{ bi_->save_action_ = new CopyString(creat); } } } void OcBox::dismiss_action(const char* act, Object* pyact) { if (pyact) { hoc_obj_ref(pyact); bi_->dis_pyact_ = pyact; if (bi_->dis_act_) { delete bi_->dis_act_; bi_->dis_act_ = NULL; } }else if (act) { if (bi_->dis_pyact_) { hoc_obj_unref(bi_->dis_pyact_); bi_->dis_pyact_ = NULL; } if (bi_->dis_act_) { *bi_->dis_act_ = act; }else{ bi_->dis_act_ = new CopyString(act); } } if ((bi_->dis_act_ || bi_->dis_pyact_) && has_window()) { window()->replace_dismiss_action( new BoxDismiss(window(), bi_->dis_act_, this, bi_->dis_pyact_)); } } void OcBox::save(ostream& o){ char buf[256]; if (bi_->save_action_ || bi_->save_pyact_) { if (bi_->save_action_ && strcmp(bi_->save_action_->string(), "") == 0) { return; } if (has_window()) { sprintf(buf, "\n//Begin %s", window()->name()); o << buf << endl; } o << "{" << endl; bi_->o_ = &o; if (bi_->save_pyact_) { HocCommand hc(bi_->save_pyact_); hc.execute(); }else{ HocCommand hc(bi_->save_action_->string(), bi_->keep_ref_); hc.execute(); } bi_->o_ = NULL; }else{ if (bi_->type_ == H) { o << "{\nocbox_ = new HBox()" << endl; }else{ o << "{\nocbox_ = new VBox()" << endl; } o << "ocbox_list_.prepend(ocbox_)" << endl; o << "ocbox_.intercept(1)\n}" << endl; long i, cnt = bi_->ocglyph_list_->count(); for (i=0; i < cnt; ++i) { ((OcGlyph*)bi_->ocglyph_list_->component(i))->save(o); } o << "{\nocbox_ = ocbox_list_.object(0)" << endl; o << "ocbox_.intercept(0)" << endl; } if (has_window()) { #if defined(WIN32) const char* cp1; if (strchr(window()->name(), '"')) { cp1 = "Neuron"; }else{ cp1 = window()->name(); } sprintf(buf, "ocbox_.map(\"%s\", %g, %g, %g, %g)\n}", cp1, #else sprintf(buf, "ocbox_.map(\"%s\", %g, %g, %g, %g)\n}", window()->name(), #endif window()->save_left(), window()->save_bottom(), #if MAC window()->canvas()->width(), window()->canvas()->height()); #else window()->width(), window()->height()); #endif o << buf << endl; }else{ o << "ocbox_.map()\n}" << endl; } if (bi_->oc_ref_) { sprintf(buf, "%s = ocbox_", hoc_object_pathname(bi_->oc_ref_)); o << buf << endl; o << "ocbox_list_.remove(0)" << endl; } o << "objref ocbox_" << endl; if (bi_->save_action_ && has_window()) { sprintf(buf, "//End %s\n", window()->name()); o << buf << endl; } } void OcBox::no_parents() { //printf("OcBox::no_parents()\n"); if (bi_->keep_ref_) { //printf("OcBox::no_parents unreffing %s\n", hoc_object_name(bi_->keep_ref_)); hoc_obj_unref(bi_->keep_ref_); bi_->keep_ref_ = NULL; } } void OcBox::keep_ref(Object* ob) { hoc_obj_ref(ob); if (bi_->keep_ref_) { hoc_obj_unref(bi_->keep_ref_); } bi_->keep_ref_ = ob; } Object* OcBox::keep_ref() { return bi_->keep_ref_; } #endif /* HAVE_IV */ neuron-7.5/src/ivoc/ocbox.h000066400000000000000000000015361323325274500157200ustar00rootroot00000000000000#ifndef ocbox_h #define ocbox_h #include "ocglyph.h" #include class OcBoxImpl; class BoxAdjust; struct Object; class OcBox : public OcGlyphContainer { public: enum {H, V}; enum {INSET, OUTSET, BRIGHT_INSET, FLAT}; OcBox(int type, int frame = INSET, bool scroll = false); virtual ~OcBox(); virtual void box_append(OcGlyph*); virtual void save(ostream&); virtual void save_action(const char*, Object*); virtual void adjuster(Coord natural); virtual void adjust(Coord natural, int); virtual void adjust(Coord natural, BoxAdjust*); bool full_request(); void full_request(bool); virtual void premap(); virtual void dismiss_action(const char*, Object* pyact=NULL); virtual void no_parents(); void keep_ref(Object*); Object* keep_ref(); bool dismissing(); void dismissing(bool); private: OcBoxImpl* bi_; }; #endif neuron-7.5/src/ivoc/ocbrowsr.cpp000066400000000000000000000047031323325274500170000ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include "ocbrowsr.h" #include #include "apwindow.h" //-------------------------------------------------------------------- /*static*/ class OcBrowserAccept : public Action { public: OcBrowserAccept(OcBrowser*); virtual ~OcBrowserAccept(); virtual void execute(); private: OcBrowser* sb_; }; OcBrowserAccept::OcBrowserAccept(OcBrowser* sb){sb_ = sb;} OcBrowserAccept::~OcBrowserAccept(){} void OcBrowserAccept::execute(){sb_->accept();} //--------------------------------------------------------- OcBrowser::OcBrowser(Action* accept, Action* cancel) : FileBrowser(WidgetKit::instance(), accept, cancel) {} OcBrowser::OcBrowser() : FileBrowser(WidgetKit::instance(), new OcBrowserAccept(this) ,NULL) {} OcBrowser::~OcBrowser(){} Glyph* OcBrowser::standard_glyph() { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); return lk.hbox( lk.vcenter( // wk.inset_frame( lk.margin( lk.natural_span(this, 100, 100), 5 // ) ), 1.0 ), lk.hspace(4), wk.vscroll_bar(this->adjustable()) ); } void OcBrowser::accept(){}; void OcBrowser::append_item(const char* cname) { WidgetKit& kit = *WidgetKit::instance(); LayoutKit& layout = *LayoutKit::instance(); Glyph* name = kit.label(cname); Glyph* label = new Target( layout.h_margin(name, 3.0, 0.0, 0.0, 15.0, fil, 0.0), TargetPrimitiveHit ); TelltaleState* t = new TelltaleState(TelltaleState::is_enabled); append_selectable(t); append(new ChoiceItem(t, label, kit.bright_inset_frame(label))); } void OcBrowser::change_item(GlyphIndex i, const char* cname) { WidgetKit& kit = *WidgetKit::instance(); LayoutKit& layout = *LayoutKit::instance(); Glyph* name = kit.label(cname); Glyph* label = new Target( layout.h_margin(name, 3.0, 0.0, 0.0, 15.0, fil, 0.0), TargetPrimitiveHit ); TelltaleState* t = new TelltaleState(TelltaleState::is_enabled); replace_selectable(i, t); replace(i, new ChoiceItem(t, label, kit.bright_inset_frame(label))); refresh(); } void OcBrowser::select_and_adjust(GlyphIndex i){ FileBrowser::select(i); #if 0 if (i >= 0) { GlyphIndex j = (i > 3) ? i+3 : i; Adjustable* a = adjustable(); a->scroll_to(Dimension_Y, Coord(count() - j)); } #endif } #endif neuron-7.5/src/ivoc/ocbrowsr.h000077500000000000000000000006261323325274500164500ustar00rootroot00000000000000#ifndef ocbrowser_h #define ocbrowser_h #include class OcBrowser : public FileBrowser { public: OcBrowser(Action* accept, Action* cancel); OcBrowser(); virtual ~OcBrowser(); virtual Glyph* standard_glyph(); virtual void append_item(const char*); virtual void change_item(GlyphIndex, const char*); virtual void accept(); virtual void select_and_adjust(GlyphIndex); }; #endif neuron-7.5/src/ivoc/occlass.h000077500000000000000000000014461323325274500162400ustar00rootroot00000000000000 #if EXTERNS Graph_reg(), HBox_reg(), VBox_reg(), GUIMath_reg(), PWManager_reg(), GrGlyph_reg(), ValueFieldEditor_reg(), #if HAVE_IV TextEditor_reg(), #endif #if !defined(WIN32) || defined(CYGWIN) OcTimer_reg(), #endif OcDeck_reg(), SymChooser_reg(), StringFunctions_reg(), OcList_reg(), Vector_reg(), OcPtrVector_reg(), OcFile_reg(), OcPointer_reg(), #ifdef USEMATRIX Matrix_reg(), #endif Random_reg() #else Graph_reg, HBox_reg, VBox_reg, GUIMath_reg, PWManager_reg, GrGlyph_reg, ValueFieldEditor_reg, #if HAVE_IV TextEditor_reg, #endif #if !defined(WIN32) || defined(CYGWIN) OcTimer_reg, #endif OcDeck_reg, SymChooser_reg, StringFunctions_reg, OcList_reg, Vector_reg, OcPtrVector_reg, OcFile_reg, OcPointer_reg, #ifdef USEMATRIX Matrix_reg, #endif Random_reg #endif neuron-7.5/src/ivoc/ocdeck.cpp000066400000000000000000000155401323325274500163710ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV #include #include #include #include #include #include #include #include #include "ocdeck.h" #include "apwindow.h" #include "oc2iv.h" #endif /* HAVE_IV */ #include "classreg.h" #if HAVE_IV class SpecialPatch : public Patch { public: SpecialPatch(Glyph*); virtual ~SpecialPatch(); virtual void request(Requisition&)const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&)const; }; SpecialPatch::SpecialPatch(Glyph* g) : Patch(g) {} SpecialPatch::~SpecialPatch() {} void SpecialPatch::request(Requisition& req)const { Patch::request(req); } void SpecialPatch::allocate(Canvas* c, const Allocation& a, Extension& e) { #if 0 Allocation aa = a; if (aa.bottom() < 0.) { Allotment& y = aa.y_allotment(); y.span((y.origin() - 0.)/y.alignment()); //printf("allotment %g %g %g %g %g\n", y.origin(), y.span(), y.alignment(), y.begin(), y.end()); //printf("SpecialPatch::allocate a.bottom=%g aa.bottom=%g\n", a.bottom(), aa.bottom()); } Patch::allocate(c, aa, e); #else Patch::allocate(c, a, e); #endif } void SpecialPatch::draw(Canvas* c, const Allocation& a)const { #if 1 Allocation aa = a; if (aa.bottom() < 0.) { Allotment& y = aa.y_allotment(); y.span((y.origin() - 0.)/y.alignment()); } Patch::draw(c, aa); #else Patch::draw(c, a); #endif } /*static*/ class OcDeckImpl { public: PolyGlyph* ocglyph_list_; Deck* deck_; Object* oc_ref_; // reference to oc "this" CopyString* save_action_; }; #endif /* HAVE_IV */ static void* cons(Object*) { #if HAVE_IV OcDeck* b = NULL; IFGUI b = new OcDeck(); b->ref(); ENDGUI return (void*)b; #else return (void*)0; #endif /* HAVE_IV */ } static void destruct(void* v) { #if HAVE_IV IFGUI OcDeck* b = (OcDeck*)v; if (b->has_window()) { b->window()->dismiss(); } b->unref(); ENDGUI #endif /* HAVE_IV */ } static double intercept(void* v) { #if HAVE_IV bool b = int(chkarg(1, 0., 1.)); IFGUI ((OcDeck*)v)->intercept(b); ENDGUI return double(b); #else return 0.; #endif /* HAVE_IV */ } static double map(void* v) { #if HAVE_IV IFGUI OcDeck* b = (OcDeck*)v; PrintableWindow* w; if (ifarg(3)) { w = b->make_window(float(*getarg(2)), float(*getarg(3)), float(*getarg(4)), float(*getarg(5))); }else{ w = b->make_window(); } if (ifarg(1)) { char* name = gargstr(1); w->name(name); } w->map(); ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double unmap(void* v) { #if HAVE_IV IFGUI OcDeck* b = (OcDeck*)v; if (b->has_window()) { b->window()->dismiss(); } ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static double save(void* v) { #if HAVE_IV IFGUI OcDeck* b = (OcDeck*)v; #if 0 int i; Object* o[4]; for (i=0; i < 4; ++i) { if (ifarg(i+1)) { o[i] = *hoc_objgetarg(i+1); }else{ o[i] = NULL; } } b->save_action(gargstr(1), o[0]); #else b->save_action(gargstr(1), 0); #endif ENDGUI return 1.; #else return 0.; #endif /* HAVE_IV */ } static double flip_to(void* v) { #if HAVE_IV int i = -1; IFGUI OcDeck* b = (OcDeck*)v; i = int(chkarg(1, -1, b->count()-1)); b->flip_to(i); ENDGUI return double(i); #else return 0.; #endif /* HAVE_IV */ } static double remove_last(void* v) { #if HAVE_IV IFGUI ((OcDeck*)v)->remove_last(); ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static double remove(void* v) { #if HAVE_IV IFGUI OcDeck* b = (OcDeck*)v; b->remove((int)chkarg(1,0,b->count()-1)); ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static double move_last(void* v) { #if HAVE_IV IFGUI OcDeck* b = (OcDeck*)v; b->move_last((int)chkarg(1,0,b->count()-1)); ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static Member_func members[] = { "flip_to", flip_to, "intercept", intercept, "save", save, "map", map, "unmap", unmap, "remove_last", remove_last, "remove", remove, "move_last", move_last, 0, 0 }; void OcDeck_reg() { class2oc("Deck", cons, destruct, members, NULL, NULL, NULL); } #if HAVE_IV OcDeck::OcDeck() : OcGlyphContainer() { WidgetKit& wk = *WidgetKit::instance(); LayoutKit& lk = *LayoutKit::instance(); bi_ = new OcDeckImpl; bi_->ocglyph_list_ = new PolyGlyph(); bi_->deck_ = new Deck(2); Resource::ref(bi_->ocglyph_list_); Resource::ref(bi_->deck_); body( new SpecialPatch ( new Background ( // wk.inset_frame( lk.flexible( bi_->deck_ // ) ), wk.background() ) ) ); bi_->oc_ref_ = NULL; bi_->save_action_ = NULL; } OcDeck::~OcDeck() { Resource::unref(bi_->ocglyph_list_); Resource::unref(bi_->deck_); if (bi_->oc_ref_) { hoc_dec_refcount(&bi_->oc_ref_); } if (bi_->save_action_) { delete(bi_->save_action_); } delete bi_; } void OcDeck::flip_to(int i) { bi_->deck_->flip_to(GlyphIndex(i)); ((SpecialPatch*)body())->reallocate(); ((SpecialPatch*)body())->redraw(); } void OcDeck::box_append(OcGlyph* g){ WidgetKit& wk = *WidgetKit::instance(); LayoutKit& lk = *LayoutKit::instance(); bi_->ocglyph_list_->append(g); bi_->deck_->append(g); } void OcDeck::remove_last() { GlyphIndex last = bi_->ocglyph_list_->count() - 1; if (last < 0) { return; } if (bi_->deck_->card() == last) { flip_to(-1); } bi_->ocglyph_list_->remove(last); bi_->deck_->remove(last); } void OcDeck::remove(int i) { if (bi_->deck_->card() == i) { flip_to(-1); } bi_->ocglyph_list_->remove(i); bi_->deck_->remove(i); } void OcDeck::move_last(int i) { int last = bi_->ocglyph_list_->count() - 1; if (i == last) { return; } OcGlyph* g = (OcGlyph*)bi_->ocglyph_list_->component(last); bi_->ocglyph_list_->insert(i, g); bi_->deck_->insert(i, g); last = bi_->ocglyph_list_->count() - 1; bi_->ocglyph_list_->remove(last); bi_->deck_->remove(last); } void OcDeck::save_action(const char* creat, Object* o) { bi_->save_action_ = new CopyString(creat); if (o) { bi_->oc_ref_= o; ++bi_->oc_ref_->refcount; } } void OcDeck::save(ostream& o){ char buf[256]; if (bi_->save_action_) { sprintf(buf, "{ocbox_ = %s", bi_->save_action_->string()); o << buf << endl; }else{ o << "{ocbox_ = new Deck()" << endl; o << "ocbox_list_.prepend(ocbox_)" << endl; o << "ocbox_.intercept(1)}" << endl; long i, cnt = bi_->ocglyph_list_->count(); for (i=0; i < cnt; ++i) { ((OcGlyph*)bi_->ocglyph_list_->component(i))->save(o); } o << "{ocbox_ = ocbox_list_.object(0)" << endl; o << "ocbox_list_.remove(0)" << endl; o << "ocbox_.intercept(0)" << endl; } if (has_window()) { sprintf(buf, "ocbox_.map(\"%s\", %g, %g, %g, %g)}", window()->name(), window()->save_left(), window()->save_bottom(), window()->width(), window()->height()); o << buf << endl; }else{ o << "ocbox_.map()}" << endl; } if (bi_->oc_ref_) { sprintf(buf, "%s = ocbox_", hoc_object_pathname(bi_->oc_ref_)); o << buf << endl; } } #endif /* HAVE_IV */ neuron-7.5/src/ivoc/ocdeck.h000077500000000000000000000007561323325274500160440ustar00rootroot00000000000000#ifndef ocdeck_h #define ocdeck_h #include "ocglyph.h" #include class OcDeckImpl; struct Object; class OcDeck : public OcGlyphContainer { public: OcDeck(); virtual ~OcDeck(); virtual void box_append(OcGlyph*); virtual void save(ostream&); virtual void save_action(const char*, Object*); virtual void flip_to(int); virtual void remove_last(); virtual void remove(int); virtual void move_last(int); // make last item the i'th item private: OcDeckImpl* bi_; }; #endif neuron-7.5/src/ivoc/ocfile.cpp000066400000000000000000000233401323325274500163770ustar00rootroot00000000000000#include <../../nrnconf.h> #if defined(__GO32__) #define HAVE_IV 0 #endif #include #include #if MAC || defined(HAVE_UNISTD_H) #include #endif #ifdef WIN32 #include #include #include #endif #include #if HAVE_IV #include "utility.h" #include #include #include #include #endif #include "nrnmpi.h" #include "oc2iv.h" #include "classreg.h" #include "ocfile.h" #include "nrnfilewrap.h" extern char* ivoc_get_temp_file(); static int ivoc_unlink(const char*); int ivoc_unlink(const char* s) { return unlink(s); } extern "C" { #include "hocstr.h" FILE* hoc_obj_file_arg(int i); } FILE* hoc_obj_file_arg(int i) { Object* ob = *hoc_objgetarg(i); check_obj_type(ob, "File"); OcFile* f = (OcFile*)(ob->u.this_pointer); if (!f->is_open()) { hoc_execerror("File not open:", f->get_name()); } return f->file(); } OcFile::OcFile() :filename_(""){ file_ = NULL; fc_ = NULL; #ifdef WIN32 binary_ = false; #endif } OcFile::~OcFile() { #if HAVE_IV Resource::unref(fc_); #endif close(); } static double f_ropen(void* v){ OcFile* f = (OcFile*)v; if (ifarg(1)) { f->set_name(gargstr(1)); } return double(f->open(f->get_name(), "r")); } static double f_wopen(void* v){ OcFile* f = (OcFile*)v; if (ifarg(1)) { f->set_name(gargstr(1)); } return double(f->open(f->get_name(), "w")); } static double f_aopen(void* v){ OcFile* f = (OcFile*)v; if (ifarg(1)) { f->set_name(gargstr(1)); } int err = f->open(f->get_name(), "a"); #if defined(CYGWIN) /* ignore illegal seek */ if (err && errno == 29) { errno = 0; } #endif return double(err); } static double f_printf(void* v){ OcFile* f = (OcFile*)v; char* buf; hoc_sprint1(&buf, 1); f->print(buf); return 0.; } static double f_scanvar(void* v){ OcFile* f = (OcFile*)v; return hoc_scan(f->file()); } static double f_scanstr(void* v){ OcFile* f = (OcFile*)v; char** pbuf = hoc_pgargstr(1); char* buf = hoc_tmpbuf->buf; int i = fscanf(f->file(), "%s", buf); if (i == 1) { hoc_assign_str(pbuf, buf); return double(strlen(buf)); }else{ return -1.; } } static double f_gets(void* v) { OcFile* f = (OcFile*)v; char** pbuf = hoc_pgargstr(1); char* buf; #if USE_NRNFILEWRAP NrnFILEWrap nfw, *fw; nfw.f = f->file(); fw = &nfw; #else FILE* fw = f->file(); #endif if ((buf = fgets_unlimited(hoc_tmpbuf, fw)) != 0) { hoc_assign_str(pbuf, buf); return double(strlen(buf)); }else{ return -1.; } } static double f_mktemp(void* v) { OcFile* f = (OcFile*)v; return double(f->mktemp()); } static double f_unlink(void* v) { OcFile* f = (OcFile*)v; return double(f->unlink()); } static double f_eof(void* v){ OcFile* f = (OcFile*)v; return double(f->eof()); } static double f_is_open(void* v){ OcFile* f = (OcFile*)v; return double(f->is_open()); } static double f_flush(void* v){ OcFile* f = (OcFile*)v; f->flush(); return 1; } static const char** f_get_name(void* v){ OcFile* f = (OcFile*)v; char** ps = hoc_temp_charptr(); *ps = (char*)f->get_name(); if (ifarg(1)) { hoc_assign_str(hoc_pgargstr(1), *ps); } return (const char**)ps; } static const char** f_dir(void* v) { char** ps = hoc_temp_charptr(); OcFile* f = (OcFile*)v; *ps = (char*)f->dir(); return (const char**)ps; } static double f_chooser(void* v){ #if HAVE_IV IFGUI OcFile* f = (OcFile*)v; f->close(); if (!ifarg(1)) { return double(f->file_chooser_popup()); } char *type, *banner, *filter, *bopen, *cancel; banner=filter=bopen=cancel=NULL; const char *path="."; type = gargstr(1); if (ifarg(2)) { banner = gargstr(2); } if (ifarg(3)) { filter = gargstr(3); } if (ifarg(4)) { bopen = gargstr(4); } if (ifarg(5)) { cancel = gargstr(5); } if (ifarg(6)) { path = gargstr(6); } f->file_chooser_style(type, path, banner, filter, bopen, cancel); ENDGUI #endif return 1.; } static double f_close(void* v){ OcFile* f = (OcFile*)v; f->close(); return 0.; } static double f_vwrite(void* v){ OcFile* f = (OcFile*)v; size_t n = 1; if (ifarg(2)) n = long(chkarg(1, 1., 2.e18)); const char* x = (const char*)hoc_pgetarg(ifarg(2)+1); BinaryMode(f) return (double)fwrite(x,sizeof(double),n,f->file()); } static double f_vread(void* v){ OcFile* f = (OcFile*)v; size_t n = 1; if (ifarg(2)) n = int(chkarg(1, 1., 2.e18)); char* x = (char*)hoc_pgetarg(ifarg(2)+1); BinaryMode(f) return (double)fread(x,sizeof(double),n,f->file()); } static double f_seek(void* v){ OcFile* f = (OcFile*)v; long n = 0; int base = 0; if (ifarg(1)) { // no longer check since since many machines have >2GB files n = long (*getarg(1)); } if (ifarg(2)) { base = int(chkarg(2, 0., 2.)); } BinaryMode(f) return (double)fseek(f->file(),n,base); } static double f_tell(void* v){ OcFile* f = (OcFile*)v; BinaryMode(f) return (double)ftell(f->file()); } static void* f_cons(Object*) { OcFile* f = new OcFile(); if (ifarg(1)) { f->set_name(gargstr(1)); } return f; } static void f_destruct(void* v) { delete (OcFile*)v; } Member_func f_members[] = { "ropen", f_ropen, "wopen", f_wopen, "aopen", f_aopen, "printf", f_printf, "scanvar", f_scanvar, "scanstr", f_scanstr, "gets", f_gets, "eof", f_eof, "isopen", f_is_open, "chooser", f_chooser, "close", f_close, "vwrite", f_vwrite, "vread", f_vread, "seek", f_seek, "tell", f_tell, "mktemp", f_mktemp, "unlink", f_unlink, "flush", f_flush, 0, 0 }; static Member_ret_str_func f_retstr_members[] = { "getname", f_get_name, "dir", f_dir, 0,0 }; void OcFile_reg() { class2oc("File", f_cons, f_destruct, f_members, NULL, NULL, f_retstr_members); } void OcFile::close() { if (file_) { fclose(file_); } file_ = NULL; } void OcFile::set_name(const char* s) { close(); if (s != filename_.string()) { filename_ = s; } } #ifdef WIN32 void OcFile::binary_mode() { if (file() && !binary_) { if (ftell(file()) != 0) { hoc_execerror(get_name(), ":can switch to dos binary file mode only at beginning of file.\n\ Use File.seek(0) after opening or use a binary style read/write as first\n\ access to file."); } #if defined(__MWERKS__) //printf("can't switch to binary mode. No setmode\n"); mode_[1] = 'b'; mode_[2] = '\0'; file_ = freopen(filename_.string(), mode_, file()); #else setmode(fileno(file()), O_BINARY); #endif binary_ = true; } } #endif bool OcFile::open(const char* name, const char* type) { set_name(name); #ifdef WIN32 binary_ = false; strcpy(mode_, type); #endif file_ = fopen(expand_env_var(name), type); #if defined(FILE_OPEN_RETRY) && FILE_OPEN_RETRY > 0 int i; for (i=0; !file_ && i < FILE_OPEN_RETRY; ++i) { // retry occasionally needed on BlueGene file_ = fopen(expand_env_var(name), type); } if (i > 0) { if (file_) { printf("%d opened %s after %d retries\n", nrnmpi_myid_world, name, i); }else{ printf("%d open %s failed after %d retries\n", nrnmpi_myid_world, name, i); } } #endif return is_open(); } FILE* OcFile::file() { if (!file_) { hoc_execerror(get_name(), ":file is not open"); } return file_; } bool OcFile::eof() { int c; c = getc(file()); return ungetc(c, file()) == EOF; } bool OcFile::mktemp() { char* s = ivoc_get_temp_file(); if (s) { set_name(s); delete [] s; return true; } return false; } bool OcFile::unlink() { int i = ivoc_unlink(get_name()); return i == 0; } void OcFile::file_chooser_style(const char* type, const char* path, const char* banner, const char* filter, const char* bopen, const char* cancel) { #if HAVE_IV Resource::unref(fc_); Style* style = new Style(Session::instance()->style()); style->ref(); bool nocap = true; if (banner) { if (banner[0]) { style->attribute("caption", banner); nocap = false; } } if (filter) { if (filter[0]) { style->attribute("filter", "true"); style->attribute("filterPattern", filter); } } if (bopen) { if (bopen[0]) { style->attribute("open", bopen); } }else if (type[0] == 'w') { style->attribute("open", "Save"); } if (cancel) { if (cancel[0]) { style->attribute("cancel", cancel); } } if (nocap) switch( type[0] ) { case 'w': style->attribute("caption", "File write"); break; case 'a': style->attribute("caption", "File append"); break; case 'r': style->attribute("caption", "File read"); break; case 'd': style->attribute("caption", "Directory open"); break; case '\0': style->attribute("caption", "File name only"); break; } switch( type[0] ) { case 'w': chooser_type_ = W; break; case 'a': chooser_type_ = A; break; case 'r': chooser_type_ = R; break; case 'd': chooser_type_ = N; style->attribute("choose_directory", "on"); break; case '\0': chooser_type_ = N; break; } fc_ = DialogKit::instance()->file_chooser(path, style); fc_->ref(); style->unref(); #endif } const char* OcFile::dir() { #if HAVE_IV if (fc_) { dirname_ = *fc_->dir(); }else #endif { dirname_ = ""; } return dirname_.string(); } bool OcFile::file_chooser_popup() { #if HAVE_IV bool accept = false; if (!fc_) { hoc_execerror("First call to file_chooser must at least specify r or w", 0); } Display* d = Session::instance()->default_display(); while (fc_->post_at(d->width()/2, d->height()/2)) { switch( chooser_type_ ) { case W: if (ok_to_write(*fc_->selected(), NULL)) { open(fc_->selected()->string(), "w"); accept = true; } break; case A: if (ok_to_write(*fc_->selected(), NULL)) { open(fc_->selected()->string(), "a"); accept = true; } break; case R: #if 1 if (ok_to_read(*fc_->selected(), NULL)) { open(fc_->selected()->string(), "r"); accept = true; } #else accept = true; #endif break; case N: set_name(fc_->selected()->string()); accept = true; } if (accept) { break; } } return accept; #else return false; #endif } neuron-7.5/src/ivoc/ocfile.h000066400000000000000000000021151323325274500160410ustar00rootroot00000000000000#ifndef ocfile_h #define ocfile_h #include class File; class FileChooser; class OcFile { public: OcFile(); virtual ~OcFile(); bool open(const char* filename, const char* type); void set_name(const char* s); const char* get_name() {return filename_.string();} const char* dir(); void close(); void print(const char* s) {fprintf(file(), "%s", s);} FILE* file(); bool is_open() { return file_ ? true : false;} bool eof(); void flush() { if (file_) { fflush(file_); }} bool mktemp(); bool unlink(); void file_chooser_style(const char* type, const char* path, const char* banner=NULL, const char* filter=NULL, const char* accept=NULL, const char* cancel=NULL); bool file_chooser_popup(); #ifdef WIN32 void binary_mode();// sets open file to binary mode once only #endif private: FileChooser* fc_; enum { N, R, W, A}; int chooser_type_; CopyString filename_; CopyString dirname_; FILE* file_; #ifdef WIN32 bool binary_; char mode_[3]; #endif }; #ifdef WIN32 #define BinaryMode(ocfile) ocfile->binary_mode(); #else #define BinaryMode(ocfile) /**/ #endif #endif neuron-7.5/src/ivoc/ocglyph.h000066400000000000000000000023761323325274500162560ustar00rootroot00000000000000#ifndef ocglyph_h #define ocglyph_h #include #include class PrintableWindow; class Dialog; /* A glyph that can be saved and restored using oc classes. Can be mapped in its own window or be part of a tray. */ class OcGlyph : public MonoGlyph { public: OcGlyph(Glyph* body=NULL); virtual ~OcGlyph(); virtual void save(ostream&); virtual bool has_window(); virtual PrintableWindow* window(); virtual void window(PrintableWindow*); virtual PrintableWindow* make_window(Coord left = -1, Coord bottom = -1, Coord width = -1, Coord height = -1); virtual void no_parents(); void parents(bool); virtual bool dialog(const char* label, const char* accept, const char* cancel); bool dialog_dismiss(bool b); virtual void def_size(Coord& w, Coord& h)const; int session_priority() { return session_priority_; } void session_priority(int i) { session_priority_ = i; } private: PrintableWindow* w_; int parents_; Coord def_w_, def_h_; Dialog* d_; int session_priority_; }; class OcGlyphContainer : public OcGlyph { public: OcGlyphContainer(); virtual void intercept(bool); virtual void box_append(OcGlyph*) = 0; virtual void request(Requisition&) const; private: OcGlyphContainer* parent_; bool recurse_; }; #endif neuron-7.5/src/ivoc/ochelp.cpp000066400000000000000000000115071323325274500164120ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file // nrnbbs has been removed. This is no longer working. #include #include #include #include #include #include #include #include "ivoc.h" static FILE* help_pipe; #if MAC && !defined(carbon) #define WIN32 1 #endif #if defined(WIN32) && !defined(CYGWIN) #include "nrnbbs.h" #endif #ifndef WIN32 #define WIN32 #define UNIX 1 //#include "../uxnrnbbs/nrnbbs.h" #endif extern "C" { extern void ivoc_help(const char*); extern const char* hoc_current_xopen(); }; declareList(CopyStringList, CopyString) implementList(CopyStringList, CopyString) static CopyStringList* filequeue; void ivoc_help(const char* s) { #if 1 // printf("online help not currently working\n"); return; #else char buf[256]; strncpy(buf, s+4, 256); char* p; for (p = buf; *p; ++p) { // eliminate trailing newline if (*p == '\n') { *p = '\0'; break; } } for (p = buf; *p; ++p) { // start at first character if (!isspace(*p)) { break; } } // queue up the help files if haven't invoked help if (!help_pipe) { if (!filequeue) { filequeue = new CopyStringList(); } if (strncmp(p, "?0", 2) == 0) { sprintf(buf, "?0 %s", hoc_current_xopen()); String str(buf); filequeue->append(str); return; }else if (strncmp(p, "?1", 2) == 0) { filequeue->append(p); return; } } if (*p) { Oc::help(p); }else{ Oc::help("Help_root"); } #endif } static void readmore() { #if !defined(WIN32) && !defined(MAC) char buf[1024]; char* cmd = "ls $NEURONHOME/doc/help/*.help"; FILE* p = popen(cmd, "r"); if (!p) { printf("couldn't do: %s\n", cmd); return; } while (fgets(buf, 1024, p)) { fprintf(help_pipe, "?0 %s", buf); } #endif } #if !defined(WIN32) && !defined(MAC) void Oc::help(const char* s) { #if 1 printf("online help not currently working\n"); #else if (help_pipe && ferror(help_pipe)) { printf("error on the help pipe, restarting\n\ but will be missing this sessions hoc help text\n"); pclose(help_pipe); help_pipe = NULL; } if (!help_pipe) { printf("Starting the help system\n"); char buf[200]; sprintf(buf, "%s/ochelp", "$NEURONHOME/bin/$CPU"); if ((help_pipe = popen(buf, "w")) == (FILE*)0) { printf("Could not start %s\n", buf); } //printf("help_pipe = %p\n", help_pipe); readmore(); if (filequeue) { for (long i = 0; i < filequeue->count(); ++i) { fprintf(help_pipe, "%s\n", filequeue->item_ref(i).string()); } filequeue->remove_all(); } } if (help_pipe) { //printf("|%s|\n", s); if (strncmp(s, "?0", 2) == 0) { char buf[1024]; sprintf(buf, "?0 %s", hoc_current_xopen()); fprintf(help_pipe, "%s\n", buf); }else{ fprintf(help_pipe, "%s\n", s); } fflush(help_pipe); } #endif } #endif #if defined(WIN32) || defined(MAC) void Oc::help(const char* s) { #if 0 #ifndef CYGWIN static bool ran_ochelp = false; char buf[1024]; nrnbbs_connect(); // benign if already connected if (!nrnbbs_connected()) { printf("Could not connect to nrnbbs service\n"); return; } if (!ran_ochelp && !nrnbbs_look("ochelp running")) { ran_ochelp = true; printf("Starting the help system\n"); nrnbbs_exec("ochelp"); }else if (!nrnbbs_look("ochelp running")) { printf("proper ochelp version not running\n"); return; } #if 1 readmore(); if (filequeue) { for (long i = 0; i < filequeue->count(); ++i) { sprintf(buf, "%s\n", filequeue->item_ref(i).string()); nrnbbs_post_string("ochelp", buf); } filequeue->remove_all(); } #endif if (strncmp(s, "?0", 2) == 0) { sprintf(buf, "?0 %s", hoc_current_xopen()); nrnbbs_post_string("ochelp", buf); }else{ nrnbbs_post_string("ochelp", s); } #endif #endif } #endif void Oc::helpmode(bool b) { helpmode_ = b; } void Oc::helpmode(Window* w) { if (helpmode()) { if (w->cursor() != Oc::help_cursor()) { w->push_cursor(); w->cursor(Oc::help_cursor()); } }else{ if (w->cursor() == Oc::help_cursor()) { w->pop_cursor(); } } } static const CursorPattern question_pat = { 0x0000, 0x0000, 0x0000, 0x7c00, 0xce00, 0x0600, 0x0600, 0x0c00, 0x3000, 0x6000, 0x6000, 0x6000, 0x0000, 0x0000, 0x6000, 0x6000 }; static const CursorPattern question_mask = { // 0x0000, 0x0000, 0x7c00, 0xfe00, 0xff00, 0xcf00, 0x0f00, 0x3e00, // 0x7c00, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000 #if !defined(UNIX) && (defined(WIN32) || defined(MAC)) 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff #else 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00 #endif }; Cursor* Oc::help_cursor_; Cursor* Oc::help_cursor() { if (!Oc::help_cursor_) { help_cursor_ = new Cursor(4, 7, question_pat, question_mask); } return help_cursor_; } #endif neuron-7.5/src/ivoc/ocinput.h000077500000000000000000000045621323325274500162740ustar00rootroot00000000000000#ifndef ocinput_h #define ocinput_h #include #include #include class HandlerList; public StandardInputHandler : public InputHandler { public: StandardInputHandler(Glyph*, Style*); virtual ~StandardInputHandler(); virtual void bind_select(Handler* h) {bind_press(Event::left, h);} virtual void bind_adjust(Handler* h) {bind_press(Event::middle, h);} virtual void bind_menu(Handler* h) {bind_press(Event::right, h);} virtual void move(const Event& e) { mouse(0, e); } virtual void press(const Event& e) { mouse(1, e); } virtual void drag(const Event& e) { mouse(2, e); } virtual void release(const Event& e) { mouse(3, e); } void mouse(int, const Event&); void bind_move(EventButton eb, Handler* h) {bind(0, eb, h);} void bind_press(EventButton eb, Handler* h) {bind(0, eb, h);} void bind_drag(EventButton eb, Handler* h) {bind(0, eb, h);} void bind_release(EventButton eb, Handler* h) {bind(0, eb, h);} void bind(int, EventButton eb, Handler* h) {bind(0, eb, h);} void remove_all(EventButton); private: HandlerList* handlers_[4]; }; /* * Handler denoted by an object and member function to call on the object. * Used the FieldEditorAction as a template */ #if defined(__STDC__) || defined(__ANSI_CPP__) || defined (WIN32) #define __HandlerCallback(T) T##_HandlerCallback #define HandlerCallback(T) __HandlerCallback(T) #define __HandlerMemberFunction(T) T##_HandlerMemberFunction #define HandlerMemberFunction(T) __HandlerMemberFunction(T) #else #define __HandlerCallback(T) T/**/_HandlerCallback #define HandlerCallback(T) __HandlerCallback(T) #define __HandlerMemberFunction(T) T/**/_HandlerMemberFunction #define HandlerMemberFunction(T) __HandlerMemberFunction(T) #endif #define declareHandlerCallback(T) \ typedef void (T::*HandlerMemberFunction(T))(Event&); \ class HandlerCallback(T) : public Handler { \ public: \ HandlerCallback(T)(T*, HandlerMemberFunction(T)); \ virtual ~HandlerCallback(T)(); \ \ virtual void event(Event&); \ private: \ T* obj_; \ HandlerMemberFunction(T) func_; \ }; #define implementHandlerCallback(T) \ HandlerCallback(T)::HandlerCallback(T)( \ T* obj, HandlerMemberFunction(T) func \ ) { \ obj_ = obj; \ func_ = func; \ } \ \ HandlerCallback(T)::~HandlerCallback(T)() { } \ \ void HandlerCallback(T)::event(Event& e) { \ (obj_->*func_)(e); \ } #endif neuron-7.5/src/ivoc/ocjump.cpp000066400000000000000000000135601323325274500164360ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #if CABLE #include "nrnoc2iv.h" #else #include "oc2iv.h" #endif #include "ocjump.h" #include "nrnfilewrap.h" #if HAVE_IV #include "ivoc.h" #endif extern "C" { extern Objectdata* hoc_top_level_data; extern Symlist* hoc_top_level_symlist; extern Symlist* hoc_symlist; extern Object* hoc_thisobject; extern void hoc_execute1(); extern bool hoc_valid_stmt(const char* stmt, Object* ob); extern int hoc_execerror_messages; } static bool valid_stmt1(const char* stmt, Object* ob) { char* s = new char[strlen(stmt)+2]; strcpy(s, stmt); strcat(s, "\n"); OcJump oj; bool val= oj.execute(s, ob); delete [] s; return val; } bool hoc_valid_stmt(const char* stmt, Object* ob) { return valid_stmt1(stmt, ob); } void hoc_execute1() { Object* ob = NULL; int hem = 1, hemold; if (ifarg(2)) { if (hoc_is_object_arg(2)) { ob = *hoc_objgetarg(2); if (ifarg(3)) { hem = (int)chkarg(3, 0., 1.); } }else{ hem = (int)chkarg(2, 0., 1.); } } hemold = hoc_execerror_messages; hoc_execerror_messages = hem; bool b = valid_stmt1(gargstr(1), ob); hoc_execerror_messages = hemold; hoc_ret(); hoc_pushx(double(b)); } // safely? return from an execution even in the presence of an execerror #define OcFrame void class OcJumpImpl { public: OcJumpImpl(); virtual ~OcJumpImpl(); bool execute(Inst* p); bool execute(const char*, Object* ob = NULL); void* fpycall(void*(*f)(void*, void*), void* a, void* b); /* jmpbuf is not portable and I can't figure out how get a pointer to one. therefore hoc_execerror looks at a function pointer and if it's non-NULL (ljmptarget) calls it instead of doing a longjump. That means we are back here and can do an explicit longjump using the begin_ */ static void ljmptarget(); void ljmp(); private: void begin(); void restore(); void finish(); static OcJumpImpl* oji_; private: OcJumpImpl* prev_; jmp_buf begin_; // hoc_oop Object* o1; Objectdata* o2; int* o3; int o4; Symlist* o5; // code Inst* c1; Inst* c2; Datum* c3; OcFrame* c4; int c5; int c6; Inst* c7; OcFrame* c8; Datum* c9; Symlist* c10; Inst* c11; int c12; // input_info char* i1; int i2; int i3; NrnFILEWrap* i4; #if CABLE // cabcode int cc1; int cc2; #endif }; //------------------------------------------------------------------ #if HAVE_IV bool Oc::valid_expr(Symbol* s) { OcJump oj; return oj.execute(s->u.u_proc->defn.in); } bool Oc::valid_stmt(const char* stmt, Object* ob) { return valid_stmt1(stmt, ob); } #endif //------------------------------------------------------------------ OcJump::OcJump() { impl_ = new OcJumpImpl(); } OcJump::~OcJump() { delete impl_; } bool OcJump::execute(Inst* p) { return impl_->execute(p); } bool OcJump::execute(const char* stmt, Object* ob) { return impl_->execute(stmt, ob); } void* OcJump::fpycall(void*(*f)(void*, void*), void* a, void* b) { return impl_->fpycall(f, a, b); } //------------------------------------------------------------------- OcJumpImpl::OcJumpImpl(){} OcJumpImpl::~OcJumpImpl(){} void OcJumpImpl::ljmptarget() { if (oji_) { oji_->ljmp(); } } void OcJumpImpl::ljmp() { longjmp(begin_, 1); } OcJumpImpl* OcJumpImpl::oji_; extern "C" { void hoc_execute(Inst*); } bool OcJumpImpl::execute(Inst* p) { begin(); #if 1 if (setjmp(begin_)) { restore(); finish(); return false; }else #endif { hoc_execute(p); } finish(); return true; } bool OcJumpImpl::execute(const char* stmt, Object* ob) { begin(); #if 1 if (setjmp(begin_)) { restore(); finish(); return false; }else #endif { hoc_obj_run(stmt, ob); } finish(); return true; } void* OcJumpImpl::fpycall(void*(*f)(void*, void*), void* a, void* b) { void* c = 0; begin(); #if 1 if (setjmp(begin_)) { restore(); finish(); return c; }else #endif { c = (*f)(a, b); } finish(); return c; } extern "C" { extern void (*oc_jump_target_)(void); extern int hoc_intset; // extern int hoc_pipeflag; void oc_save_hoc_oop(Object**, Objectdata**, int**, int*, Symlist**); void oc_restore_hoc_oop(Object**, Objectdata**, int**, int*, Symlist**); void oc_save_code(Inst**, Inst**, Datum**, OcFrame**, int*, int*, Inst**, OcFrame**, Datum**, Symlist**, Inst**, int*); void oc_restore_code(Inst**, Inst**, Datum**, OcFrame**, int*, int*, Inst**, OcFrame**, Datum**, Symlist**, Inst**, int*); void oc_save_input_info(char**, int*, int*, NrnFILEWrap**); void oc_restore_input_info(char*, int, int, NrnFILEWrap*); #if CABLE void oc_save_cabcode(int*, int*); void oc_restore_cabcode(int*, int*); #endif } void OcJumpImpl::begin(){ // not complete but it is good for expressions and it can be improved oc_save_hoc_oop(&o1, &o2, &o3, &o4, &o5); oc_save_code(&c1, &c2, &c3, &c4, &c5, &c6, &c7, &c8, &c9, &c10, &c11, &c12); oc_save_input_info(&i1, &i2, &i3, &i4); #if CABLE oc_save_cabcode(&cc1, &cc2); #endif // this may not be portable since it depends on the jmp_buf being // an array of integers. oc_jump_target_ = ljmptarget; prev_ = oji_; oji_ = this; } void OcJumpImpl::restore(){ oc_restore_hoc_oop(&o1, &o2, &o3, &o4, &o5); oc_restore_code(&c1, &c2, &c3, &c4, &c5, &c6, &c7, &c8, &c9, &c10, &c11, &c12); oc_restore_input_info(i1, i2, i3, i4); #if CABLE oc_restore_cabcode(&cc1, &cc2); #endif } void OcJumpImpl::finish(){ if (!prev_) { oc_jump_target_ = NULL; } oji_ = prev_; #if 0 if (hoc_intset) { hoc_execerror("interrupted in OcJump", 0); } #endif } ObjectContext::ObjectContext(Object* obj) { oc_save_hoc_oop(&a1, &a2, &a3, &a4, &a5); hoc_thisobject = obj; if (obj) { hoc_objectdata = obj->u.dataspace; hoc_symlist = obj->ctemplate->symtable; }else{ hoc_objectdata = hoc_top_level_data; hoc_symlist = hoc_top_level_symlist; } restored_ = false; } ObjectContext::~ObjectContext() { if (!restored_) { restore(); } } void ObjectContext::restore() { oc_restore_hoc_oop(&a1, &a2, &a3, &a4, &a5); restored_ = true; } neuron-7.5/src/ivoc/ocjump.h000066400000000000000000000011471323325274500161010ustar00rootroot00000000000000#ifndef ocjump_h #define ocjump_h union Inst; class OcJumpImpl; struct Symlist; struct Object; union Objectdata; class ObjectContext { public: ObjectContext(Object*); virtual ~ObjectContext(); void restore(); private: Object* a1; Objectdata* a2; int* a3; int a4; Symlist* a5; bool restored_; }; class OcJump { public: OcJump(); virtual ~OcJump(); bool execute(Inst* p); bool execute(const char*, Object* ob = NULL); void* fpycall(void*(*)(void*, void*), void*, void*); static void save_context(ObjectContext*); static void restore_context(ObjectContext*); private: OcJumpImpl* impl_; }; #endif neuron-7.5/src/ivoc/oclist.cpp000066400000000000000000000356671323325274500164520ustar00rootroot00000000000000#include <../../nrnconf.h> #if defined(__GO32__) #define HAVE_IV 0 #endif #include #include #include #include "classreg.h" #include "oclist.h" #include "oc2iv.h" #include "hoclist.h" #include "ocobserv.h" #if HAVE_IV #include #include #include "ocglyph.h" #if !MAC #include "checkpnt.h" #endif #include "apwindow.h" #include "ocbrowsr.h" #include "objcmd.h" #endif extern "C" { #include "parse.h" extern Object** hoc_temp_objptr(Object*); extern Symlist* hoc_top_level_symlist; int ivoc_list_count(Object*); Object* ivoc_list_item(Object*, int); } void handle_old_focus(); #if HAVE_IV /*static*/ class OcListBrowser : public OcBrowser { public: OcListBrowser(OcList*, const char* = NULL, Object* pystract=NULL); OcListBrowser(OcList*, char**, const char*); virtual ~OcListBrowser(); virtual void drag(const Event& e); virtual void select(GlyphIndex); virtual void dragselect(GlyphIndex); virtual void reload(); virtual void reload(GlyphIndex); virtual void set_select_action(const char*, bool on_rel = false, Object* pyact=NULL); virtual void set_accept_action(const char*, Object* pyact=NULL); virtual void accept(); virtual void release(const Event&); virtual InputHandler* focus_in(); void load_item(GlyphIndex i); void ocglyph(Window* w); void ocglyph_unmap(); private: void change_name(GlyphIndex); private: OcList* ocl_; HocCommand* select_action_; HocCommand* accept_action_; HocCommand* label_action_; HocCommand* label_pystract_; bool on_release_; char** plabel_; CopyString* items_; OcGlyph* ocg_; bool ignore_; }; #else class OcListBrowser { }; #endif declarePtrList(OcListImpl, Object); implementPtrList(OcListImpl, Object); static Symbol* list_class_sym_; static void chk_list(Object* o) { if(!o || o->ctemplate != list_class_sym_->u.ctemplate) { check_obj_type(o, "List"); } } static double l_append(void* v) { OcList* o = (OcList*)v; Object* ob = *hoc_objgetarg(1); o->append(ob); return o->count(); } void OcList::append(Object* ob) { if (!ob) return; oref(ob); oli_->append(ob); #if HAVE_IV if (b_) { b_->load_item(count()-1); b_->select_and_adjust(count()-1); } #endif } void OcList::oref(Object* ob) { if (!ct_) { ++ob->refcount; } } void OcList::ounref(Object* ob) { if (!ct_) { hoc_dec_refcount(&ob); } } void OcList::update(Observable* o) { ClassObservable* co = (ClassObservable*)o; Object* ob = co->object(); //printf("notify %d %s\n", co->message(), hoc_object_name(ob)); switch (co->message()) { case ClassObservable::Delete : { long i = index(ob); if (i >= 0) { remove(i); } } break; case ClassObservable::Create : append(ob); break; default: #if HAVE_IV if (b_) { long i = index(ob); if (i >= 0) { b_->reload(i); } } #endif break; } } static double l_prepend(void* v) { OcList* o = (OcList*)v; Object* ob = *hoc_objgetarg(1); o->prepend(ob); return o->count(); } void OcList::prepend(Object* ob) { if (!ob) return; oref(ob); oli_->prepend(ob); #if HAVE_IV if (b_) { b_->reload(); } #endif } static double l_insert(void* v) { OcList* o = (OcList*)v; long i = long(chkarg(1,0, o->count())); Object* ob = *hoc_objgetarg(2); o->insert(i, ob); return o->count(); } void OcList::insert(long i, Object* ob) { if (!ob) return; oref(ob); oli_->insert(i, ob); #if HAVE_IV if (b_) { b_->reload(); } #endif } static double l_count(void* v) { OcList* o = (OcList*)v; return o->count(); } long OcList::count() { return oli_->count();} static double l_remove(void* v) { OcList* o = (OcList*)v; long i = long(chkarg(1,0, o->count()-1)); o->remove(i); return o->count(); } void OcList::remove(long i) { Object* ob = oli_->item(i); oli_->remove(i); #if HAVE_IV if (b_) { b_->select(-1); b_->remove_selectable(i); b_->remove(i); b_->refresh(); } #endif ounref(ob); } static double l_index(void* v) { OcList* o = (OcList*)v; Object* ob = *hoc_objgetarg(1); return o->index(ob); } long OcList::index(Object* ob) { long i, cnt = oli_->count(); for (i=0; i < cnt; ++i) { if (oli_->item(i) == ob) { return i; } } return -1; } static Object** l_object(void* v) { OcList* o = (OcList*)v; long i = long(chkarg(1,0, o->count()-1)); return hoc_temp_objptr(o->object(i)); } Object* OcList::object(long i) { return oli_->item(i); } static double l_remove_all(void* v) { OcList* o = (OcList*)v; o->remove_all(); return o->count(); } void OcList::remove_all() { long i, cnt = oli_->count(); for (i = 0; i < cnt; ++i) { Object* ob = oli_->item(i); ounref(ob); } oli_->remove_all(); #if HAVE_IV if (b_) { b_->select(-1); b_->reload(); } #endif } static double l_browser(void* v) { #if HAVE_IV IFGUI char* s = 0; char* i = 0; char** p = 0; OcList* o = (OcList*)v; if (ifarg(1)) { s = gargstr(1); } if (ifarg(3)) { i = gargstr(3); p = hoc_pgargstr(2); o->create_browser(s, p, i); return 1.; } if (ifarg(2)) { if (hoc_is_object_arg(2)) { o->create_browser(s, NULL, *hoc_objgetarg(2)); return 1.; } i = gargstr(2); } o->create_browser(s, i); ENDGUI #endif return 1.; } static double l_select(void* v) { #if HAVE_IV IFGUI OcListBrowser* b = ((OcList*)v)->browser(); long i = (long)(*getarg(1)); if (b) { b->select_and_adjust(i); } ENDGUI #endif return 1.; } static double l_select_action(void* v) { #if HAVE_IV IFGUI OcListBrowser* b = ((OcList*)v)->browser(); if (b) { bool on_rel = false; if (ifarg(2)) { on_rel = (bool)chkarg(2, 0, 1); } if (hoc_is_object_arg(1)) { b->set_select_action(NULL, on_rel, *hoc_objgetarg(1)); }else{ b->set_select_action(gargstr(1), on_rel); } } ENDGUI #endif return 1.; } static double l_selected(void* v) { #if HAVE_IV long i = -1; IFGUI OcListBrowser* b = ((OcList*)v)->browser(); if (b) { i = b->selected(); }else{ i = -1; } ENDGUI return (double)i; #else return 0.; #endif } static double l_accept_action(void* v) { #if HAVE_IV IFGUI OcListBrowser* b = ((OcList*)v)->browser(); if (b) { if (hoc_is_object_arg(1)) { b->set_accept_action(NULL, *hoc_objgetarg(1)); }else{ b->set_accept_action(gargstr(1)); } } ENDGUI #endif return 1.; } static double l_scroll_pos(void* v) { #if HAVE_IV IFGUI OcList* o = (OcList*)v; OcListBrowser* b = o->browser(); if (b) { Adjustable* a = b->adjustable(); if (ifarg(1)) { Coord c = (Coord)chkarg(1, 0, 1e9); c = (double)o->count() - a->cur_length(Dimension_Y) - c; a->scroll_to(Dimension_Y, c); } //printf("%g %g %g %g\n", (double)o->count(), a->cur_lower(Dimension_Y), a->cur_upper(Dimension_Y), a->cur_length(Dimension_Y)); return (double)(o->count()-1) - (double)a->cur_upper(Dimension_Y); } ENDGUI #endif return -1.; } static Member_func l_members[] = { "append", l_append, "prepend", l_prepend, "insrt", l_insert, "remove", l_remove, "remove_all", l_remove_all, "index", l_index, "count", l_count, "browser", l_browser, "selected", l_selected, "select", l_select, "select_action", l_select_action, "accept_action", l_accept_action, "scroll_pos", l_scroll_pos, 0,0 }; static Member_ret_obj_func l_retobj_members[] = { "object", l_object, "o", l_object, 0,0 }; static void* l_cons(Object*) { OcList* o; if (ifarg(1)) { if (hoc_is_str_arg(1)) { o = new OcList(gargstr(1)); }else{ o = new OcList(long(chkarg(1,0,1e8))); } }else{ o = new OcList(); } o->ref(); return (void*)o; } int ivoc_list_count(Object* olist) { chk_list(olist); OcList* list = (OcList*)olist->u.this_pointer; return list->count(); } Object* ivoc_list_item(Object* olist, int i) { chk_list(olist); OcList* list = (OcList*)olist->u.this_pointer; if (i >= 0 && i < list->count()) { return list->object(i); }else{ return 0; } } OcList::OcList(long n) { oli_ = new OcListImpl(n); b_ = NULL; ct_ = NULL; } OcList::OcList(const char* name) { Symbol* s = hoc_lookup(name); if (!s) { s = hoc_table_lookup(name, hoc_top_level_symlist); } if (!s || s->type != TEMPLATE) { hoc_execerror(name, "is not a template name"); } ct_ = s->u.ctemplate; int cnt = ct_->count; cnt = (cnt)?cnt:5; oli_ = new OcListImpl(cnt); b_ = NULL; hoc_Item* q; ITERATE(q, ct_->olist) { append(OBJ(q)); } ClassObservable::Attach(ct_, this); } static void l_destruct(void* v) { OcList* o = (OcList*)v; o->unref(); } OcList::~OcList() { if (ct_) { ClassObservable::Detach(ct_, this); } #if HAVE_IV if (b_) { b_->ocglyph_unmap(); } Resource::unref(b_); #endif b_ = NULL; remove_all(); delete oli_; } static int l_chkpt(void** vp) { #if HAVE_IV && !MAC OcList* o; Checkpoint& chk = *Checkpoint::instance(); if (chk.out()) { long cnt; o = (OcList*)(*vp); cnt = o->count(); CKPT(chk, cnt); for (long i=0; i < cnt; ++i) { Object* item = o->object(i); CKPT(chk, item); } }else{ long cnt; CKPT(chk, cnt); o = new OcList(cnt); o->ref(); for (long i = 0; i < cnt; ++i) { Object* item; CKPT(chk, item); o->append(item); } *vp = (void*)o; } #endif return 1; } void OcList_reg() { //printf("Oclist_reg\n"); class2oc("List", l_cons, l_destruct, l_members, l_chkpt, l_retobj_members, NULL); list_class_sym_ = hoc_lookup("List"); } extern "C" { extern bool hoc_objectpath_impl(Object* ob, Object* oblook, char* path, int depth); extern void hoc_path_prepend(char*, const char*, const char*); int ivoc_list_look(Object* ob, Object* oblook, char* path, int) { if (oblook->ctemplate->constructor == l_cons) { OcList* o = (OcList*)oblook->u.this_pointer; long i, cnt = o->count(); Object* obj; for (i=0; i < cnt; ++i) { obj = o->object(i); #if 0 if (obj && obj != oblook && hoc_objectpath_impl(ob, obj, path, depth) ) { #else if (obj == ob) { #endif char buf[200]; sprintf(buf, "object(%ld)", i); hoc_path_prepend(path, buf, ""); return 1; } } } return 0; } } void OcList::create_browser(const char* name, const char* items, Object* pystract) { #if HAVE_IV if (b_) { b_->ocglyph_unmap(); } Resource::unref(b_); b_ = new OcListBrowser(this, items, pystract); b_->ref(); PrintableWindow* w = new StandardWindow(b_->standard_glyph()); b_->ocglyph(w); if (name) { w->name((char*)name); } w->map(); #endif } void OcList::create_browser(const char* name, char** pstr, const char* action) { #if HAVE_IV if (b_) { b_->ocglyph_unmap(); } Resource::unref(b_); b_ = new OcListBrowser(this, pstr, action); b_->ref(); PrintableWindow* w = new StandardWindow(b_->standard_glyph()); b_->ocglyph(w); if (name) { w->name((char*)name); } w->map(); #endif } OcListBrowser* OcList::browser() { return b_;} //----------------------------------------- #if HAVE_IV OcListBrowser::OcListBrowser(OcList* ocl, const char* items, Object* pystract) : OcBrowser() { ocl_ = ocl; // not reffed because this is reffed by ocl ocg_ = NULL; // do not ref select_action_ = NULL; accept_action_ = NULL; plabel_ = NULL; label_action_ = NULL; label_pystract_ = NULL; if (pystract) { label_pystract_ = new HocCommand(pystract); } on_release_ = false; ignore_ = false; if (items) { items_ = new CopyString(items); }else{ items_ = NULL; } reload(); } OcListBrowser::OcListBrowser(OcList* ocl, char** pstr, const char* action) : OcBrowser() { ocl_ = ocl; ocg_ = NULL; select_action_ = NULL; accept_action_ = NULL; on_release_ = false; ignore_ = false; plabel_ = pstr; items_ = NULL; label_action_ = new HocCommand(action); label_pystract_ = NULL; reload(); } OcListBrowser::~OcListBrowser(){ if (select_action_) { delete select_action_; } if (accept_action_) { delete accept_action_; } if (label_action_) { delete label_action_; } if (label_pystract_) { delete label_pystract_; } if (items_) { delete items_; } } void OcListBrowser::release(const Event& e) { OcBrowser::release(e); if (select_action_ && on_release_) { GlyphIndex i = selected(); handle_old_focus(); hoc_ac_ = double(i); select_action_->execute(); } } InputHandler* OcListBrowser::focus_in() { // works around the problem that the first time a list is used // the InputHandler calls focus in on the press, which then // selects item 0. Perhaps that is necessary for some kind of initialization // but for us with select actions it causes problems. So we temporarily // turn off the select actions during focus in handling. ignore_ = true; InputHandler* ih = OcBrowser::focus_in(); ignore_ = false; return ih; } void OcListBrowser::select(GlyphIndex i) { OcBrowser::select(i); //printf("select %d ignore=%d\n", i, ignore_); if (select_action_ && !on_release_ && !ignore_) { handle_old_focus(); hoc_ac_ = (double)i; select_action_->execute(); } } void OcListBrowser::dragselect(GlyphIndex i) { GlyphIndex old = selected(); OcBrowser::select(i); //printf("select %d old=%d ignore=%d\n", i, old, ignore_); if (old != i && select_action_ && !on_release_ && !ignore_) { handle_old_focus(); hoc_ac_ = (double)i; select_action_->execute(); } } // mostly copied from src/InterViews/browser.cpp void OcListBrowser::drag(const Event& e) { if (inside(e)) { Hit h(&e); repick(0, h); if (h.any()) { dragselect(h.index(0)); return; } } dragselect(-1); } void OcListBrowser::reload() { GlyphIndex i, cnt; cnt = count(); for (i=0; i < cnt; ++i) { remove_selectable(0); remove(0); } cnt = ocl_->count(); for (i=0; i < cnt; ++i) { load_item(i); } refresh(); } void OcListBrowser::reload(GlyphIndex i) { change_name(i); } void OcListBrowser::load_item(GlyphIndex i) { append_item(""); change_name(i); } void OcListBrowser::change_name(GlyphIndex i) { if (label_pystract_) { hoc_ac_ = i; char buf[256]; if (label_pystract_->exec_strret(buf, 256, bool(false))) { change_item(i, buf); }else{ change_item(i, "label error"); } }else if (plabel_) { hoc_ac_ = i; if (label_action_->execute(bool(false)) == 0) { change_item(i, *plabel_); }else{ change_item(i, "label error"); } }else if (items_) { char* pstr = Oc2IV::object_str(items_->string(), ocl_->object(i)); if (pstr) { change_item(i, pstr); }else{ change_item(i, hoc_object_name(ocl_->object(i))); } }else{ change_item(i, hoc_object_name(ocl_->object(i))); } } void OcListBrowser::set_select_action(const char* s, bool on_rel, Object* pyact) { if (select_action_) { delete select_action_; } if (pyact) { select_action_ = new HocCommand(pyact); }else{ select_action_ = new HocCommand(s); } on_release_ = on_rel; } void OcListBrowser::set_accept_action(const char* s, Object* pyact) { if (accept_action_) { delete accept_action_; } if (pyact) { accept_action_ = new HocCommand(pyact); }else{ accept_action_ = new HocCommand(s); } } void OcListBrowser::accept() { if (accept_action_) { long i = selected(); if (i < 0) { return; } handle_old_focus(); hoc_ac_ = (double)i; accept_action_->execute(); } } void OcListBrowser::ocglyph(Window* w) { ocg_ = (OcGlyph*)(w->glyph()); Resource::ref(ocg_); } void OcListBrowser::ocglyph_unmap() { OcGlyph* o = ocg_; ocg_ = NULL; if (o){ if (o->has_window()) { delete o->window(); } Resource::unref(o); } } #endif neuron-7.5/src/ivoc/oclist.h000066400000000000000000000015551323325274500161040ustar00rootroot00000000000000#ifndef oclist_h #define oclist_h #include #include class OcListImpl; struct Object; class OcListBrowser; class cTemplate; class OcList : public Resource, public Observer { public: OcList(long = 5); OcList(const char* template_name); virtual ~OcList(); void append(Object*); void prepend(Object*); void insert(long, Object*); long count(); void remove(long); long index(Object*); Object* object(long); void remove_all(); bool refs_items() { return ct_ == NULL; } void create_browser(const char* name, const char* items=NULL, Object* pystract=NULL); void create_browser(const char* name, char** pstr, const char* action); OcListBrowser* browser(); virtual void update(Observable*); private: void oref(Object*); void ounref(Object*); private: OcListImpl* oli_; OcListBrowser* b_; cTemplate* ct_; }; #endif neuron-7.5/src/ivoc/ocmatrix.cpp000066400000000000000000000255071323325274500167730ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #define v_elem(v,i) (*(vector_vec(v) + i)) #include "ivocvect.h" #include "oc2iv.h" #include #undef error extern "C" { #undef OUT /* /usr/x86_64-w64-mingw32/sys-root/mingw/include/windef.h */ #include "matrix.h" //meschach #include "matrix2.h" #include "sparse.h" #include "sparse2.h" int nrn_matrix_dim(void*, int ); } #include "ocmatrix.h" using std::vector; int nrn_matrix_dim(void* vm, int d) { OcMatrix* m = (OcMatrix*)vm; return d ? m->ncol(): m->nrow(); } static void Vect2VEC(Vect* v1, VEC& v2) { #ifdef WIN32 v2.ve = vector_vec(v1); v2.dim = vector_capacity(v1); v2.max_dim = vector_buffer_size(v1); #else v2.ve = v1->vec(); v2.dim = v1->capacity(); v2.max_dim = v1->buffer_size(); #endif } OcMatrix::OcMatrix(int type) {obj_ = NULL; type_ = type;} OcMatrix::~OcMatrix() {} OcMatrix* OcMatrix::instance(int nrow, int ncol, int type) { switch (type) { default: case MFULL: return new OcFullMatrix(nrow, ncol); case MSPARSE: return new OcSparseMatrix(nrow, ncol); } } void OcMatrix::unimp() { hoc_execerror("Matrix method not implemented for this type matrix", 0); } void OcMatrix::nonzeros(vector& m, vector& n) { m.clear(); n.clear(); for (int i = 0; i < nrow(); i++) { for (int j = 0; j < ncol(); j++) { if (getval(i, j)) { m.push_back(i); n.push_back(j); } } } } void OcSparseMatrix::nonzeros(vector& m, vector& n) { m.clear(); n.clear(); for (int i = 0; i < m_->m; i++) { SPROW* const r = m_->row + i; row_elt* r_elt = r->elt; for (int k = 0; k < r->len; k++) { int j = r_elt[k].col; m.push_back(i); n.push_back(j); } } } OcFullMatrix* OcMatrix::full() { if (type_ != MFULL) {// could clone one maybe hoc_execerror("Matrix is not a FULL matrix (type 1)", 0); } return (OcFullMatrix*)this; } OcFullMatrix::OcFullMatrix(int nrow, int ncol) :OcMatrix(MFULL){ lu_factor_ = NULL; lu_pivot_ = NULL; m_ = m_get(nrow, ncol); } OcFullMatrix::~OcFullMatrix() { if (lu_factor_) { M_FREE(lu_factor_); PX_FREE(lu_pivot_); } M_FREE(m_); } double* OcFullMatrix::mep(int i, int j) { return &m_->me[i][j]; } double OcFullMatrix::getval(int i, int j) { return m_->me[i][j]; } int OcFullMatrix::nrow() { return m_->m; } int OcFullMatrix::ncol() { return m_->n; } void OcFullMatrix::resize(int i, int j) { m_resize(m_, i, j); } void OcFullMatrix::mulv(Vect* vin, Vect* vout) { VEC v1, v2; Vect2VEC(vin, v1); Vect2VEC(vout, v2); mv_mlt(m_, &v1, &v2); } void OcFullMatrix::mulm(Matrix* in, Matrix* out) { m_mlt(m_, in->full()->m_, out->full()->m_); } void OcFullMatrix::muls(double s, Matrix* out) { sm_mlt(s, m_, out->full()->m_); } void OcFullMatrix::add(Matrix* in, Matrix* out) { m_add(m_, in->full()->m_, out->full()->m_); } void OcFullMatrix::copy(Matrix* out) { m_copy(m_, out->full()->m_); } void OcFullMatrix::bcopy(Matrix* out, int i0, int j0, int n0, int m0, int i1, int j1) { m_move(m_, i0, j0, n0, m0, out->full()->m_, i1, j1); } void OcFullMatrix::transpose(Matrix* out) { m_transp(m_, out->full()->m_); } void OcFullMatrix::symmeigen(Matrix* mout, Vect* vout) { VEC v1; Vect2VEC(vout, v1); symmeig(m_, mout->full()->m_, &v1); } void OcFullMatrix::svd1(Matrix* u, Matrix* v, Vect* d) { VEC v1; Vect2VEC(d, v1); svd(m_, u?u->full()->m_:NULL, v?v->full()->m_:NULL, &v1); } void OcFullMatrix::getrow(int k, Vect* out) { VEC v1; Vect2VEC(out, v1); get_row(m_, k, &v1); } void OcFullMatrix::getcol(int k, Vect* out) { VEC v1; Vect2VEC(out, v1); get_col(m_, k, &v1); } void OcFullMatrix::getdiag(int k, Vect* out) { int i, j, row, col; row = nrow(); col = ncol(); if (k >= 0) { for (i=0, j=k; i < row && j < col; ++i, ++j) { #ifdef WIN32 v_elem(out, i) = m_entry(m_, i, j); #else out->elem(i) = m_entry(m_, i, j); #endif } }else{ for (i= -k, j=0; i < row && j < col; ++i, ++j) { #ifdef WIN32 v_elem(out, i) = m_entry(m_, i, j); #else out->elem(i) = m_entry(m_, i, j); #endif } } } void OcFullMatrix::setrow(int k, Vect* in) { VEC v1; Vect2VEC(in, v1); set_row(m_, k, &v1); } void OcFullMatrix::setcol(int k, Vect* in) { VEC v1; Vect2VEC(in, v1); set_col(m_, k, &v1); } void OcFullMatrix::setdiag(int k, Vect* in) { int i, j, row, col; row = nrow(); col = ncol(); if (k >= 0) { for (i=0, j=k; i < row && j < col; ++i, ++j) { #ifdef WIN32 m_set_val(m_, i, j, v_elem(in, i)); #else m_set_val(m_, i, j, in->elem(i)); #endif } }else{ for (i= -k, j=0; i < row && j < col; ++i, ++j) { #ifdef WIN32 m_set_val(m_, i, j, v_elem(in, i)); #else m_set_val(m_, i, j, in->elem(i)); #endif } } } void OcFullMatrix::setrow(int k, double in) { int i, col = ncol(); for (i=0; i < col; ++i) { m_set_val(m_, k, i, in); } } void OcFullMatrix::setcol(int k, double in) { int i, row = nrow(); for (i=0; i < row; ++i) { m_set_val(m_, i, k, in); } } void OcFullMatrix::setdiag(int k, double in) { int i, j, row, col; row = nrow(); col = ncol(); if (k >= 0) { for (i=0, j=k; i < row && j < col; ++i, ++j) { m_set_val(m_, i, j, in); } }else{ for (i= -k, j=0; i < row && j < col; ++i, ++j) { m_set_val(m_, i, j, in); } } } void OcFullMatrix::zero() { m_zero(m_); } void OcFullMatrix::ident() { m_ident(m_); } void OcFullMatrix::exp(Matrix* out) { m_exp(m_, 0., out->full()->m_); } void OcFullMatrix::pow(int i, Matrix* out) { m_pow(m_, i, out->full()->m_); } void OcFullMatrix::inverse(Matrix* out) { m_inverse(m_, out->full()->m_); } void OcFullMatrix::solv(Vect* in, Vect* out, bool use_lu) { bool call_lufac = true; if (!lu_factor_) { lu_factor_ = m_get(nrow(), nrow()); lu_pivot_ = px_get(nrow()); }else if (use_lu && lu_factor_->m == nrow()) { call_lufac = false; } VEC v1, v2; Vect2VEC(in, v1); Vect2VEC(out, v2); if (call_lufac) { m_resize(lu_factor_, nrow(), nrow()); m_copy(m_, lu_factor_); px_resize(lu_pivot_, nrow()); LUfactor(lu_factor_, lu_pivot_); } LUsolve(lu_factor_, lu_pivot_, &v1, &v2); } double OcFullMatrix::det(int* e) { int n = nrow(); MAT* lu = m_get(n, n); PERM* piv = px_get(n); m_copy(m_, lu); LUfactor(lu, piv); #if 0 printf("LU\n"); for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { printf(" %g", lu->me[i][j]); } printf("\t%d\n", piv->pe[i]); } #endif double m = 1.0; *e = 0; for (int i = 0; i < n; ++i) { m *= lu->me[i][i]; if (m == 0.0) { break; } while(Math::abs(m) >= 1e12) { m *= 1e-12; *e += 12; } while(Math::abs(m) < 1e-12) { m *= 1e12; *e -= 12; } } if (m) { while(Math::abs(m) >= 10.0) { m *= 0.1; *e += 1; } while(Math::abs(m) < 1.0) { m *= 10.0; *e -= 1; } } m *= double(px_sign(piv)); M_FREE(lu); PX_FREE(piv); return m; } //-------------------------- OcSparseMatrix::OcSparseMatrix(int nrow, int ncol) : OcMatrix(MSPARSE){ /* sp_get -- get sparse matrix -- len is number of elements available for each row without allocating further memory */ int len = 4; m_ = sp_get(nrow, ncol, len); lu_factor_ = NULL; lu_pivot_ = NULL; } OcSparseMatrix::~OcSparseMatrix() { if (lu_factor_) { SP_FREE(lu_factor_); PX_FREE(lu_pivot_); } SP_FREE(m_); } // returns pointer to sparse element. NULL if it does not exist. double* OcSparseMatrix::pelm(int i, int j) { SPROW* r = m_->row + i; int idx = sprow_idx(r, j); if (idx >= 0) { return &r->elt[idx].val; }else{ return NULL; } } double* OcSparseMatrix::mep(int i, int j) { SPROW* r = m_->row + i; int idx = sprow_idx(r, j); if (idx >= 0) { return &r->elt[idx].val; } // does not exist so create it with a value of 0 sp_set_val(m_, i, j, 0.); // and try again idx = sprow_idx(r, j); return &r->elt[idx].val; } void OcSparseMatrix::zero() { sp_zero(m_); } double OcSparseMatrix::getval(int i, int j) { return sp_get_val(m_, i, j); } int OcSparseMatrix::nrow() { return m_->m; } int OcSparseMatrix::ncol() { return m_->n; } void OcSparseMatrix::mulv(Vect* vin, Vect* vout) { VEC v1, v2; Vect2VEC(vin, v1); Vect2VEC(vout, v2); sp_mv_mlt(m_, &v1, &v2); } void OcSparseMatrix::solv(Vect* in, Vect* out, bool use_lu) { bool call_lufac = true; if (!lu_factor_) { lu_factor_ = sp_get(nrow(), nrow(), 4); lu_pivot_ = px_get(nrow()); }else if (use_lu && lu_factor_->m == nrow()) { call_lufac = false; } VEC v1, v2; Vect2VEC(in, v1); Vect2VEC(out, v2); if (call_lufac) { sp_resize(lu_factor_, nrow(), nrow()); sp_copy2(m_, lu_factor_); px_resize(lu_pivot_, nrow()); spLUfactor(lu_factor_, lu_pivot_, .9); } spLUsolve(lu_factor_, lu_pivot_, &v1, &v2); } void OcSparseMatrix::setrow(int k, Vect* in) { VEC v1; Vect2VEC(in, v1); int i, n = ncol(); double* p; for (i=0; i < n; ++i) { if ((p = pelm(k, i)) != NULL) { #ifdef WIN32 *p = v_elem(in, i); }else if (v_elem(in, i)) { sp_set_val(m_, k, i, v_elem(in, i)); #else *p = in->elem(i); }else if (in->elem(i)) { sp_set_val(m_, k, i, in->elem(i)); #endif } } } void OcSparseMatrix::setcol(int k, Vect* in) { VEC v1; Vect2VEC(in, v1); int i, n = nrow(); double* p; for (i=0; i < n; ++i) { if ((p = pelm(i, k)) != NULL) { #ifdef WIN32 *p = v_elem(in, i); }else if (v_elem(in, i)) { sp_set_val(m_, i, k, v_elem(in, i)); #else *p = in->elem(i); }else if (in->elem(i)) { sp_set_val(m_, i, k, in->elem(i)); #endif } } } void OcSparseMatrix::setdiag(int k, Vect* in) { int i, j, row, col; row = nrow(); col = ncol(); double* p; if (k >= 0) { for (i=0, j=k; i < row && j < col; ++i, ++j) { if ((p = pelm(i, j)) != NULL) { #ifdef WIN32 *p = v_elem(in, i); }else if (v_elem(in, i)) { sp_set_val(m_, i, j, v_elem(in, i)); #else *p = in->elem(i); }else if (in->elem(i)) { sp_set_val(m_, i, j, in->elem(i)); #endif } } }else{ for (i= -k, j=0; i < row && j < col; ++i, ++j) { if ((p = pelm(i, j)) != NULL) { #ifdef WIN32 *p = v_elem(in, i); }else if (v_elem(in, i)) { sp_set_val(m_, i, j, v_elem(in, i)); #else *p = in->elem(i); }else if (in->elem(i)) { sp_set_val(m_, i, j, in->elem(i)); #endif } } } } void OcSparseMatrix::setrow(int k, double in) { int i, col = ncol(); for (i=0; i < col; ++i) { sp_set_val(m_, k, i, in); } } void OcSparseMatrix::setcol(int k, double in) { int i, row = nrow(); for (i=0; i < row; ++i) { sp_set_val(m_, i, k, in); } } void OcSparseMatrix::ident(void) { setdiag(0, 1); } void OcSparseMatrix::setdiag(int k, double in) { int i, j, row, col; row = nrow(); col = ncol(); if (k >= 0) { for (i=0, j=k; i < row && j < col; ++i, ++j) { sp_set_val(m_, i, j, in); } }else{ for (i= -k, j=0; i < row && j < col; ++i, ++j) { sp_set_val(m_, i, j, in); } } } int OcSparseMatrix::sprowlen(int i) { return m_->row[i].len; } double OcSparseMatrix::spgetrowval(int i, int jindx, int* j) { *j = m_->row[i].elt[jindx].col; return m_->row[i].elt[jindx].val; } neuron-7.5/src/ivoc/ocmatrix.h000066400000000000000000000111351323325274500164300ustar00rootroot00000000000000#ifndef ocmatrix_h #define ocmatrix_h #ifndef MATRIXH #define MAT void #define SPMAT void #define PERM void #endif #include using std::vector; struct Object; class IvocVect; class OcFullMatrix; #define Vect IvocVect #define Matrix OcMatrix class OcMatrix { public: enum {MFULL=1, MSPARSE, MBAND}; static OcMatrix* instance(int nrow, int ncol, int type = MFULL); virtual ~OcMatrix(); virtual double* mep(int i, int j) {unimp(); return NULL;} //matrix element pointer inline double& operator() (int i, int j) {return *mep(i, j);}; virtual double getval(int i, int j) { unimp(); return 0.; } virtual int nrow() {unimp(); return 0;} virtual int ncol() {unimp(); return 0;} virtual void resize(int, int) {unimp();} virtual void nonzeros(vector& m, vector& n); OcFullMatrix* full(); inline void mulv(Vect& in, Vect& out) {mulv(&in, &out);}; virtual void mulv(Vect* in, Vect* out){unimp();} virtual void mulm(Matrix* in, Matrix* out){unimp();} virtual void muls(double, Matrix* out){unimp();} virtual void add(Matrix*, Matrix* out){unimp();} virtual void getrow(int, Vect* out){unimp();} virtual void getcol(int, Vect* out){unimp();} virtual void getdiag(int, Vect* out){unimp();} virtual void setrow(int, Vect* in){unimp();} virtual void setcol(int, Vect* in){unimp();} virtual void setdiag(int, Vect* in){unimp();} virtual void setrow(int, double in){unimp();} virtual void setcol(int, double in){unimp();} virtual void setdiag(int, double in){unimp();} virtual void zero(){unimp();} virtual void ident(){unimp();} virtual void exp(Matrix* out){unimp();} virtual void pow(int, Matrix* out){unimp();} virtual void inverse(Matrix* out){unimp();} virtual void solv(Vect* vin, Vect* vout, bool use_lu) {unimp();} virtual void copy(Matrix* out){unimp();} virtual void bcopy(Matrix* mout, int i0, int j0, int n0, int m0, int i1, int j1){unimp();} virtual void transpose(Matrix* out){unimp();} virtual void symmeigen(Matrix* mout, Vect* vout){unimp();} virtual void svd1(Matrix* u, Matrix* v, Vect* d){unimp();} virtual double det(int* e){unimp(); return 0.0;} virtual int sprowlen(int){unimp(); return 0;} virtual double spgetrowval(int i, int jindx, int* j){unimp(); return 0.;} void unimp(); Object** temp_objvar(); protected: OcMatrix(int type); public: Object* obj_; private: int type_; }; extern "C" { extern Matrix* matrix_arg(int); } class OcFullMatrix : public OcMatrix { // type 1 public: OcFullMatrix(int, int); virtual ~OcFullMatrix(); virtual double* mep(int, int); virtual double getval(int i, int j); virtual int nrow(); virtual int ncol(); virtual void resize(int, int); virtual void mulv(Vect* in, Vect* out); virtual void mulm(Matrix* in, Matrix* out); virtual void muls(double, Matrix* out); virtual void add(Matrix*, Matrix* out); virtual void getrow(int, Vect* out); virtual void getcol(int, Vect* out); virtual void getdiag(int, Vect* out); virtual void setrow(int, Vect* in); virtual void setcol(int, Vect* in); virtual void setdiag(int, Vect* in); virtual void setrow(int, double in); virtual void setcol(int, double in); virtual void setdiag(int, double in); virtual void zero(); virtual void ident(); virtual void exp(Matrix* out); virtual void pow(int, Matrix* out); virtual void inverse(Matrix* out); virtual void solv(Vect* vin, Vect* vout, bool use_lu); virtual void copy(Matrix* out); virtual void bcopy(Matrix* mout, int i0, int j0, int n0, int m0, int i1, int j1); virtual void transpose(Matrix* out); virtual void symmeigen(Matrix* mout, Vect* vout); virtual void svd1(Matrix* u, Matrix* v, Vect* d); virtual double det(int* exponent); private: MAT* m_; MAT* lu_factor_; PERM* lu_pivot_; }; class OcSparseMatrix : public OcMatrix { // type 2 public: OcSparseMatrix(int, int); virtual ~OcSparseMatrix(); virtual double* mep(int, int); virtual double* pelm(int, int); // NULL if element does not exist virtual int nrow(); virtual int ncol(); virtual double getval(int, int); virtual void ident(void); virtual void mulv(Vect* in, Vect* out); virtual void solv(Vect* vin, Vect* vout, bool use_lu); virtual void setrow(int, Vect* in); virtual void setcol(int, Vect* in); virtual void setdiag(int, Vect* in); virtual void setrow(int, double in); virtual void setcol(int, double in); virtual void setdiag(int, double in); virtual void nonzeros(vector& m, vector& n); virtual int sprowlen(int); // how many elements in row virtual double spgetrowval(int i, int jindx, int* j); virtual void zero(); private: SPMAT* m_; SPMAT* lu_factor_; PERM* lu_pivot_; }; #ifndef MATRIXH #undef MAT #undef SPMAT #endif #endif neuron-7.5/src/ivoc/ocnoiv1.cpp000077500000000000000000000024751323325274500165250ustar00rootroot00000000000000#include <../../nrnconf.h> #if !HAVE_IV // to end of file // things we DO NOT want extern "C" { #include "hocdec.h" extern void hoc_ret(); extern void hoc_pushx(double); void ivoc_help(const char*){} void ivoc_cleanup() {} int hoc_readcheckpoint(char*){ return 0; } void hoc_notify_iv() {hoc_ret(); hoc_pushx(0.);} void hoc_xpvalue() { hoc_ret(); hoc_pushx(0.);} void hoc_xlabel() { hoc_ret(); hoc_pushx(0.);} void hoc_xbutton() { hoc_ret(); hoc_pushx(0.);} void hoc_xcheckbox() { hoc_ret(); hoc_pushx(0.);} void hoc_xstatebutton() { hoc_ret(); hoc_pushx(0.);} void hoc_xmenu() { hoc_ret(); hoc_pushx(0.);} void hoc_xvalue() { hoc_ret(); hoc_pushx(0.);} void hoc_xpanel() { hoc_ret(); hoc_pushx(0.);} void hoc_xradiobutton() { hoc_ret(); hoc_pushx(0.);} void hoc_xfixedvalue() { hoc_ret(); hoc_pushx(0.);} void hoc_xvarlabel() { hoc_ret(); hoc_pushx(0.);} void hoc_xslider() { hoc_ret(); hoc_pushx(0.);} void hoc_boolean_dialog() { hoc_ret(); hoc_pushx(0.);} void hoc_continue_dialog() { hoc_ret(); hoc_pushx(0.);} void hoc_string_dialog() { hoc_ret(); hoc_pushx(0.);} void hoc_checkpoint() { hoc_ret(); hoc_pushx(0.);} void hoc_pwman_place() { hoc_ret(); hoc_pushx(0.);} void hoc_save_session() { hoc_ret(); hoc_pushx(0.);} void hoc_print_session() { hoc_ret(); hoc_pushx(0.);} void ivoc_style() { hoc_ret(); hoc_pushx(0.);} } #endif neuron-7.5/src/ivoc/ocnotify.h000066400000000000000000000007471323325274500164430ustar00rootroot00000000000000#ifndef ocnotify_h #define ocnotify_h #include #if defined(__cplusplus) extern "C" { #endif void nrn_notify_freed(void (*pf)(void*, int)); void nrn_notify_when_void_freed(void* p, Observer* ob); void nrn_notify_when_double_freed(double* p, Observer* ob); void nrn_notify_pointer_disconnect(Observer* ob); void notify_pointer_freed(void* pt); void notify_freed(void* p); void notify_freed_val_array(double* p, size_t); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/ivoc/ocobserv.cpp000066400000000000000000000032671323325274500167660ustar00rootroot00000000000000#include <../../nrnconf.h> #include "ocobserv.h" #include "oc2iv.h" extern "C" { extern void hoc_obj_disconnect(Object*); } void hoc_obj_disconnect(Object* ob) { delete ((ObjObservable*)ob->observers); ob->observers = NULL; } void hoc_obj_notify(Object* ob) { if (ob->observers) { ((ObjObservable*)ob->observers)->notify(); } } void ObjObservable::Attach(Object* ob, Observer* view) { if (!ob->observers) { ob->observers = (void*)(new ObjObservable(ob)); } ((ObjObservable*)ob->observers)->attach(view); } void ObjObservable::Detach(Object* ob, Observer* view) { if (!ob->observers) { return; } ((ObjObservable*)ob->observers)->detach(view); } ObjObservable::ObjObservable(Object* ob) { ob_ = ob; } ObjObservable::~ObjObservable() { } void hoc_template_notify(Object* ob, int message) { ClassObservable* co = (ClassObservable*)ob->ctemplate->observers; if(co) { co->ob_ = ob; co->message_ = message; co->notify(); } } void ClassObservable::Attach(cTemplate* ct, Observer* view) { if (!ct->observers) { ct->observers = (void*)(new ClassObservable(ct)); } ClassObservable* co = (ClassObservable*)ct->observers; co->attach(view); } void ClassObservable::Detach(cTemplate* ct, Observer* view) { if (!ct->observers) { return; } ClassObservable* co = (ClassObservable*)ct->observers; co->detach(view); if (co->cnt_ <= 0) { delete co; } } ClassObservable::ClassObservable(cTemplate* ct) { ct_ = ct; ob_ = NULL; message_ = 0; cnt_ = 0; } ClassObservable::~ClassObservable() { ct_->observers = NULL; } void ClassObservable::attach(Observer* o) { Observable::attach(o); ++cnt_; } void ClassObservable::detach(Observer* o) { Observable::detach(o); --cnt_; } neuron-7.5/src/ivoc/ocobserv.h000077500000000000000000000024151323325274500164300ustar00rootroot00000000000000#ifndef ocobserve_h #define ocobserve_h #include struct Object; class cTemplate; // For an Observer watching a hoc Object // when the last ref disappears, disconnect is called on the Observer // Some objects may be written so that update gets called on the Observer extern "C" { void hoc_obj_notify(Object* ob); } class ObjObservable : public Observable { public: static void Attach(Object*, Observer*); static void Detach(Object*, Observer*); virtual ~ObjObservable(); Object* object() { return ob_; } private: ObjObservable(Object*); private: Object* ob_; }; // For an Observer watching a cTemplate extern "C" { void hoc_template_notify(Object*, int message); } class ClassObservable : public Observable { public: // only the first two guarantee an update on the Observer enum {Delete, Create, Changed}; static void Attach(cTemplate*, Observer*); static void Detach(cTemplate*, Observer*); virtual ~ClassObservable(); cTemplate* ctemplate() { return ct_; } Object* object() { return ob_;} int message() { return message_;} private: friend void hoc_template_notify(Object*, int); ClassObservable(cTemplate*); void attach(Observer*); void detach(Observer*); private: cTemplate* ct_; Object* ob_; int message_; int cnt_; }; #endif neuron-7.5/src/ivoc/ocpicker.cpp000066400000000000000000000056551323325274500167460ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include "ocpicker.h" #include "rubband.h" /*static*/ class ButtonHandler { public: ButtonHandler(EventButton, OcHandler*); ButtonHandler(EventButton, Rubberband*); ~ButtonHandler(); OcHandler* handler_; Rubberband* rband_; EventButton eb_; }; ButtonHandler::ButtonHandler(EventButton eb, OcHandler* a) { eb_ = eb; handler_ = a; rband_ = NULL; Resource::ref(a); } ButtonHandler::ButtonHandler(EventButton eb, Rubberband* rb) { eb_ = eb; handler_ = NULL; rband_ = rb; Resource::ref(rb); } ButtonHandler::~ButtonHandler() { Resource::unref(handler_); Resource::unref(rband_); } declarePtrList(HandlerList, ButtonHandler); implementPtrList(HandlerList, ButtonHandler); StandardPicker::StandardPicker() { ms_ = unknown; for (int i=0; i < unknown; ++i) { handlers_[i] = new HandlerList(1); } } StandardPicker::~StandardPicker() { for (int i=0; i < unknown; ++i) { long cnt = handlers_[i]->count(); for (long j=0; j < cnt; j++) { delete handlers_[i]->item(j); } delete handlers_[i]; } } bool StandardPicker::pick(Canvas* c, Glyph* glyph, int depth, Hit& h) { if (!h.event()) { return false; } const Event& e = *h.event(); if (e.grabber()) { h.target(depth, glyph, 0, e.grabber()); return true; } event(e); long cnt = handlers_[ms_]->count(); for (long i=0; i < cnt; ++i) { ButtonHandler& b = *handlers_[ms_]->item(i); if (b.eb_ == Event::any || b.eb_ == mb_) { if (b.handler_) { h.target(depth, glyph, 0, b.handler_); }else{ b.rband_->canvas(c); h.target(depth, glyph, 0, b.rband_); } return true; } } return false; } /* from /interviews/input.c */ void StandardPicker::event(const Event& e) { switch (e.type()) { case Event::down: //printf("press\n"); ms_ = press; mb_ = e.pointer_button(); break; case Event::motion: if ((ms_ == drag || ms_ == press) && (e.left_is_down() || e.right_is_down() || e.middle_is_down()) ) { //printf("drag\n"); ms_ = drag; }else{ //printf("motion\n"); ms_ = motion; mb_ = 0; } break; case Event::up: //printf("release\n"); ms_ = release; mb_ = e.pointer_button(); break; } } void StandardPicker::unbind(int m, EventButton eb) { long cnt = handlers_[m]->count(); long i, j; for (i=0, j=0; i < cnt; ++i) { ButtonHandler& b = *handlers_[m]->item(j); if (b.eb_ == Event::any || b.eb_ == eb) { delete handlers_[m]->item(j); handlers_[m]->remove(j); }else{ ++j; } } } void StandardPicker::bind(int m, EventButton eb, OcHandler* h) { unbind(m, eb); if (h) { handlers_[m]->append(new ButtonHandler(eb, h)); } } void StandardPicker::bind_press(EventButton eb, Rubberband* rb) { int m = 1; unbind(m, eb); if (rb) { handlers_[m]->append(new ButtonHandler(eb, rb)); } } void StandardPicker::remove_all(EventButton eb) { for (int m=0; m < unknown; ++m) { unbind(m, eb); } } #endif neuron-7.5/src/ivoc/ocpicker.h000066400000000000000000000051531323325274500164040ustar00rootroot00000000000000#ifndef ocpicker_h #define ocpicker_h #include #include #include #include "rubband.h" class HandlerList; class Canvas; class Allocation; class Hit; /* steer to the right method in response to a mouse action */ class StandardPicker { public: StandardPicker(); virtual ~StandardPicker(); virtual bool pick(Canvas*, Glyph*, int depth, Hit& h); void bind_select(Rubberband* rb) {bind_press(Event::left, rb);} void bind_adjust(Rubberband* rb) {bind_press(Event::middle, rb);} void bind_menu(Rubberband* rb) {bind_press(Event::right, rb);} void bind_press(EventButton eb, Rubberband*); void bind_select(OcHandler* h) {bind_press(Event::left, h);} void bind_adjust(OcHandler* h) {bind_press(Event::middle, h);} void bind_menu(OcHandler* h) {bind_press(Event::right, h);} void bind_move(OcHandler* h) {bind(0, 0, h);} void bind_press(EventButton eb, OcHandler* h) {bind(1, eb, h);} void bind_drag(EventButton eb, OcHandler* h) {bind(2, eb, h);} void bind_release(EventButton eb, OcHandler* h) {bind(3, eb, h);} void bind(int, EventButton eb, OcHandler* h); void unbind(int, EventButton); void remove_all(EventButton); private: void event(const Event&); private: typedef int State; enum {motion, press, drag, release, unknown}; State ms_; EventButton mb_; HandlerList* handlers_[unknown]; }; /* * Handler denoted by an object and member function to call on the object. * Used the FieldEditorAction as a template */ #if defined(__STDC__) || defined(__ANSI_CPP__) #define __HandlerCallback(T) T##_HandlerCallback #define HandlerCallback(T) __HandlerCallback(T) #define __HandlerMemberFunction(T) T##_HandlerMemberFunction #define HandlerMemberFunction(T) __HandlerMemberFunction(T) #else #define __HandlerCallback(T) T/**/_HandlerCallback #define HandlerCallback(T) __HandlerCallback(T) #define __HandlerMemberFunction(T) T/**/_HandlerMemberFunction #define HandlerMemberFunction(T) __HandlerMemberFunction(T) #endif #define declareHandlerCallback(T) \ typedef bool (T::*HandlerMemberFunction(T))(Event&); \ class HandlerCallback(T) : public Handler { \ public: \ HandlerCallback(T)(T*, HandlerMemberFunction(T)); \ virtual ~HandlerCallback(T)(); \ \ virtual bool event(Event&); \ private: \ T* obj_; \ HandlerMemberFunction(T) func_; \ }; #define implementHandlerCallback(T) \ HandlerCallback(T)::HandlerCallback(T)( \ T* obj, HandlerMemberFunction(T) func \ ) { \ obj_ = obj; \ func_ = func; \ } \ \ HandlerCallback(T)::~HandlerCallback(T)() { } \ \ bool HandlerCallback(T)::event(Event& e) { \ return (obj_->*func_)(e); \ } #endif neuron-7.5/src/ivoc/ocpointer.cpp000066400000000000000000000063051323325274500171420ustar00rootroot00000000000000#include <../../nrnconf.h> /* provide a pointer to the interpreter p = new Pointer(string) or p = new Pointer(&var) val = p.val p.val = val &p.val can be an argument Optional second arg can be a statement containing $1 for generalized assignment. It will be executed (and p.val assigned) when p.assign(val) */ #include #include #include #include "classreg.h" #include "oc2iv.h" #include "ocpointer.h" #include "parse.h" #include "ocnotify.h" #if HAVE_IV #include "ivoc.h" #endif extern "C" { extern void hoc_free_list(Symlist**); extern Symbol* hoc_parse_stmt(const char*, Symlist**); extern void hoc_run_stmt(Symbol*); } OcPointer::OcPointer(const char* st, double* d) : Observer() { sti_ = NULL; s_ = new char[strlen(st)+1]; strcpy(s_, st); p_ = d; valid_ = true; nrn_notify_when_double_freed(p_, this); } OcPointer::~OcPointer() { if (sti_) { delete sti_; } delete [] s_; nrn_notify_pointer_disconnect(this); } void OcPointer::update(Observable*) { valid_ = false; } void OcPointer::assign(double x) { assert(valid_); *p_ = x; if (sti_) { sti_->play_one(x); } } static double assign(void* v) { OcPointer* ocp = (OcPointer*)v; if (!ocp->valid_) { hoc_execerror("Pointer points to freed address:", ocp->s_); } ocp->assign(*getarg(1)); return *ocp->p_; } static const char** pname(void* v) { OcPointer* ocp = (OcPointer*)v; return (const char**)&ocp->s_; } static Member_func members[] = { "val", 0, // will be changed below "assign", assign, // will call assign_stmt if it exists 0, 0 }; static Member_ret_str_func s_memb[] = { "s", pname, 0, 0 }; static void* cons(Object*) { double* p; const char* s; if (hoc_is_pdouble_arg(1)) { p = hoc_pgetarg(1); s = "unknown"; }else{ s = gargstr(1); ParseTopLevel ptl; p = hoc_val_pointer(s); } if (!p) { hoc_execerror("Pointer constructor failed", 0); } OcPointer* ocp = new OcPointer(s, p); if (ifarg(2)) { ocp->sti_ = new StmtInfo(gargstr(2)); } return (void*)ocp; } static void destruct(void* v) { delete (OcPointer*)v; } static void steer_val(void* v) { OcPointer* ocp = (OcPointer*)v; hoc_spop(); if (!ocp->valid_) { hoc_execerror("Pointer points to freed address:", ocp->s_); } hoc_pushpx(ocp->p_); } void OcPointer_reg() { class2oc("Pointer", cons, destruct, members, NULL, NULL, s_memb); // now make the val variable an actual double Symbol* sv = hoc_lookup("Pointer"); Symbol* sx = hoc_table_lookup("val", sv->u.ctemplate->symtable); sx->type = VAR; sx->arayinfo = NULL; sv->u.ctemplate->steer = steer_val; } StmtInfo::StmtInfo(const char* s) { stmt_ = new CopyString(s); parse(); } StmtInfo::~StmtInfo() { delete stmt_; hoc_free_list(&symlist_); } void StmtInfo::parse() { char buf[256], *d; const char* s; symlist_ = NULL; ParseTopLevel ptl; bool see_arg = false; for (s=stmt_->string(), d = buf; *s; ++s, ++d) { if (*s == '$' && s[1] == '1') { strcpy(d, "hoc_ac_"); s++; d+=6; see_arg = true; }else{ *d = *s; } } if (!see_arg) { strcpy(d, "=hoc_ac_"); d+=8; } *d = '\0'; symstmt_ = hoc_parse_stmt(buf, &symlist_); } void StmtInfo::play_one(double val) { ParseTopLevel ptl; hoc_ac_ = val; hoc_run_stmt(symstmt_); } neuron-7.5/src/ivoc/ocpointer.h000066400000000000000000000010211323325274500165750ustar00rootroot00000000000000#ifndef ocpointer_h #define ocpointer_h #include #include #include "oc2iv.h" class StmtInfo; class OcPointer : public Observer { public: OcPointer(const char*, double*); virtual ~OcPointer(); virtual void update(Observable*); void assign(double); double* p_; char* s_; StmtInfo* sti_; bool valid_; }; class StmtInfo { public: StmtInfo(const char*); virtual ~StmtInfo(); void play_one(double); void parse(); CopyString* stmt_; Symlist* symlist_; Symbol* symstmt_; }; #endif neuron-7.5/src/ivoc/ocptrvector.cpp000066400000000000000000000066061323325274500175160ustar00rootroot00000000000000#include <../../nrnconf.h> /* construct a vector of pointers to variables and provide fast scatter/gather between Vector and those variables. p = new PtrVector(size) p.pset(i, &varname) val = p.getval(i) p.setval(i, value) p.scatter(Vector) p.gather(Vector) */ #include "classreg.h" #include "oc2iv.h" #include "ocptrvector.h" #include "objcmd.h" #include "ivocvect.h" static double dummy; OcPtrVector::OcPtrVector(int sz) { pd_ = new double*[sz]; size_ = sz; update_cmd_ = NULL; for (int i=0; i < sz; ++i) { pd_[i] = &dummy; } } OcPtrVector::~OcPtrVector() { delete [] pd_; ptr_update_cmd(NULL); } void OcPtrVector::resize(int sz) { if (size_ == sz) { return; } delete [] pd_; pd_ = new double*[sz]; size_ = sz; for (int i=0; i < sz; ++i) { pd_[i] = &dummy; } } void OcPtrVector::ptr_update_cmd(HocCommand* hc) { if (update_cmd_) { delete update_cmd_; update_cmd_ = NULL; } update_cmd_ = hc; } void OcPtrVector::ptr_update() { if (update_cmd_) { update_cmd_->execute(false); }else{ hoc_warning("PtrVector has no ptr_update callback", NULL); } } void OcPtrVector::pset(int i, double* px) { assert (i < size_); pd_[i] = px; } void OcPtrVector::scatter(double* src, int sz) { assert(size_ == sz); for (int i=0; i < sz; ++i) { *pd_[i] = src[i]; } } void OcPtrVector::gather(double* dest, int sz) { assert(size_ == sz); for (int i=0; i < sz; ++i) { dest[i] = *pd_[i]; } } void OcPtrVector::setval(int i, double x) { assert(i < size_); *pd_[i] = x; } double OcPtrVector::getval(int i) { assert(i < size_); return *pd_[i]; } static double resize(void* v) { ((OcPtrVector*)v)->resize((int(chkarg(1, 1., 2e9)))); return double(((OcPtrVector*)v)->size()); } static double get_size(void* v){ return ((OcPtrVector*)v)->size(); } static double pset(void* v){ OcPtrVector* opv = (OcPtrVector*)v; int i = int(chkarg(1, 0., opv->size())); opv->pset(i, hoc_pgetarg(2)); return opv->getval(i); } static double getval(void* v){ OcPtrVector* opv = (OcPtrVector*)v; int i = int(chkarg(1, 0., opv->size())); return opv->getval(i); } static double setval(void* v){ OcPtrVector* opv = (OcPtrVector*)v; int i = int(chkarg(1, 0., opv->size())); opv->setval(i, *hoc_getarg(2)); return opv->getval(i); } static double scatter(void* v){ OcPtrVector* opv = (OcPtrVector*)v; Vect* src = vector_arg(1); opv->scatter(vector_vec(src), vector_capacity(src)); return 0.; } static double gather(void* v){ OcPtrVector* opv = (OcPtrVector*)v; Vect* dest = vector_arg(1); opv->gather(vector_vec(dest), vector_capacity(dest)); return 0.; } static double ptr_update_callback(void* v) { OcPtrVector* opv = (OcPtrVector*)v; HocCommand* hc = NULL; if (ifarg(1) && hoc_is_object_arg(1)) { hc = new HocCommand(*hoc_objgetarg(1)); }else if (ifarg(1)) { Object* o = NULL; if (ifarg(2)) { o = *hoc_objgetarg(2); } hc = new HocCommand(hoc_gargstr(1), o); } opv->ptr_update_cmd(hc); return 0.; } static Member_func members[] = { "size", get_size, "resize", resize, "pset", pset, "setval", setval, "getval", getval, "scatter", scatter, "gather", gather, "ptr_update_callback", ptr_update_callback, 0, 0 }; static void* cons(Object*) { int sz; sz = int(chkarg(1, 1., 2e9)); OcPtrVector* ocpv = new OcPtrVector(sz); return (void*)ocpv; } static void destruct(void* v) { delete (OcPtrVector*)v; } void OcPtrVector_reg() { class2oc("PtrVector", cons, destruct, members, 0, 0, 0); } neuron-7.5/src/ivoc/ocptrvector.h000066400000000000000000000007331323325274500171560ustar00rootroot00000000000000#ifndef ocptrvector_h #define ocptrvector_h #include "oc2iv.h" class HocCommand; class OcPtrVector { public: OcPtrVector(int sz); virtual ~OcPtrVector(); int size() { return size_; } void resize(int); void pset(int i, double*); double getval(int); void setval(int, double); void scatter(double*, int sz); void gather(double*, int sz); void ptr_update_cmd(HocCommand*); void ptr_update(); public: int size_; double** pd_; HocCommand* update_cmd_; }; #endif neuron-7.5/src/ivoc/octimer.cpp000066400000000000000000000071621323325274500166040ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV #include #include #include #include "oc2iv.h" #include "objcmd.h" #endif /* HAVE_IV */ #include "classreg.h" #ifdef MINGW #include #endif #if HAVE_IV #if carbon || defined(MINGW) class OcTimer { #else class OcTimer : public IOHandler { #endif public: OcTimer(const char*); OcTimer(Object*); virtual ~OcTimer(); virtual void timerExpired(long, long); void start(); void stop(); double seconds(); void seconds(double); private: double seconds_; HocCommand* hc_; #if carbon EventLoopTimerRef timer_; #else #ifdef MINGW HANDLE wtimer_; bool stopped_; #else bool stopped_; #endif /* not MINGW */ #endif /*not carbon*/ }; #if carbon static void timer_proc(EventLoopTimerRef, void* v) { ((OcTimer*)v)->timerExpired(0,0); } #endif #ifdef MINGW static void CALLBACK callback(PVOID lpParameter, BOOLEAN TimerOrWaitFired) { ((OcTimer*)lpParameter)->timerExpired(0,0); } #endif #endif /* HAVE_IV */ static double t_seconds(void* v) { #if HAVE_IV OcTimer* t = (OcTimer*)v; if (ifarg(1)) { t->seconds(chkarg(1, 1e-6, 1e6)); } return double(t->seconds()); #else return 0.; #endif /* HAVE_IV */ } static double t_start(void* v) { #if HAVE_IV OcTimer* t = (OcTimer*)v; t->start(); return 0.; #else return 0.; #endif /* HAVE_IV */ } static double t_stop(void* v) { #if HAVE_IV OcTimer* t = (OcTimer*)v; t->stop(); return 0.; #else return 0.; #endif /* HAVE_IV */ } static void* t_cons(Object*) { #if HAVE_IV if (hoc_is_object_arg(1)) { return new OcTimer(*hoc_objgetarg(1)); } else { return new OcTimer(gargstr(1)); } #else return (void*)0; #endif /* HAVE_IV */ } static void t_destruct(void* v) { #if HAVE_IV OcTimer* t = (OcTimer*)v; delete t; #endif /* HAVE_IV */ } Member_func t_members[] = { "seconds", t_seconds, "start", t_start, "end", t_stop, 0, 0 }; void OcTimer_reg() { class2oc("Timer", t_cons, t_destruct, t_members, NULL, NULL, NULL); } #if HAVE_IV OcTimer::OcTimer(const char* cmd) { hc_ = new HocCommand(cmd); seconds_ = .5; #if carbon timer_ = 0; #else #ifdef MINGW wtimer_ = NULL; stopped_ = true; #else stopped_ = true; #endif #endif } OcTimer::OcTimer(Object* cmd) { hc_ = new HocCommand(cmd); seconds_ = .5; #if carbon timer_ = 0; #else #ifdef MINGW wtimer_ = NULL; stopped_ = true; #else stopped_ = true; #endif #endif } OcTimer::~OcTimer() { stop(); delete hc_; } void OcTimer::start() { #if carbon if (timer_) { return; } InstallEventLoopTimer(GetMainEventLoop(), seconds_, seconds_, timer_proc, (void*)this, &timer_); #else #ifdef MINGW stopped_ = false; LARGE_INTEGER nsec100; nsec100.QuadPart = (long long)(-seconds_*10000000.); wtimer_ = CreateWaitableTimer(NULL, TRUE, NULL); while (stopped_ == false) { SetWaitableTimer(wtimer_, &nsec100, 0, NULL, NULL, 0); hc_->execute(); WaitForSingleObject(wtimer_, INFINITE); } CloseHandle(wtimer_); wtimer_ = NULL; #else long s = long(seconds_); long us = long((seconds_ - double(s))*1000000.); stopped_ = false; Dispatcher::instance().startTimer(s, us, this); #endif #endif } void OcTimer::stop() { #if carbon if (timer_) { RemoveEventLoopTimer(timer_); timer_ = 0; } #else #ifdef MINGW stopped_ = true; #else stopped_ = true; Dispatcher::instance().stopTimer(this); #endif #endif } void OcTimer::timerExpired(long, long) { #if carbon #else #ifdef MINGW #else if (!stopped_) { this->start(); } #endif #endif // want it to be part of interval just like on mac hc_->execute(); } double OcTimer::seconds() { return seconds_; } void OcTimer::seconds(double sec) { seconds_ = sec; } #endif /* HAVE_IV */ neuron-7.5/src/ivoc/pwman.cpp000066400000000000000000002537221323325274500162710ustar00rootroot00000000000000#include <../../nrnconf.h> extern char* ivoc_get_temp_file(); #if HAVE_IV #if (MAC && !defined(carbon)) || defined(WIN32) #define MACPRINT 1 #else #define MACPRINT 0 #endif #if defined(WIN32)|| MAC #define SNAPSHOT 0 #else #define SNAPSHOT 1 #endif #define DECO 2 // 1 means default on, 2 off. for Carnvale,Hines book figures #include #include #endif // HAVE_IV #include #include #include "classreg.h" #include "oc2iv.h" #if HAVE_IV #include "utility.h" extern "C" { void single_event_run(); extern char **hoc_strpop(); } #if defined(CYGWIN) #include void iv_display_scale(float); void iv_display_scale(Coord, Coord); // Make if fit into the screen extern "C" {char* hoc_back2forward(char*);} #endif #if defined(WIN32) && !defined(CYGWIN) #include #include "../winio/debug.h" void iv_display_scale(float); void iv_display_scale(Coord, Coord); // Make if fit into the screen #if defined(__MWERKS__) #include extern "C"{ extern char * mktemp(char *); extern int unlink(const char *); } #else //!__MWERKS__ #include #endif // __MWERKS__ #include // there seems to be a bug here in that writing goes to the beginning // but any existing trailing info remains! So be sure to unlink first. #undef IOS_OUT #define IOS_OUT (ios::out) extern "C" {char* hoc_back2forward(char*);} #else //!WIN32 #if MAC && !defined(carbon) #include #include #undef IOS_OUT #define IOS_OUT (ios::out | ios::trunc) extern "C"{ extern char * mktemp(char *); extern int unlink(const char *); } #include extern "C" {extern void debugfile(const char*, ...);} #else //!MAC #include #define Output output #endif //MAC #endif //WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "apwindow.h" #include "scenevie.h" #include "rect.h" #include "ivoc.h" #include "utility.h" #include "ocbox.h" #include "idraw.h" #include "mymath.h" #include "graph.h" #include "oc2iv.h" #include "rubband.h" // PGH begin // static const float Scl = 10.; // static const float pr_scl = 8.; static float Scl; static float pr_scl; static PixelCoord pixres = 0; // PGH end #if SNAPSHOT extern bool (*ivoc_snapshot_)(const Event*); static bool ivoc_snapshot(const Event*); #endif #define PWM_help_ "help" #define PWM_do_print_ "Print PWM" #define PWM_ScreenItem_ "ScreenItem PWM" #define PWM_PaperItem_ "PaperItem PWM" #define PWM_landscape_ "LandPort Other" #define PWM_virt_screen_ "VirtualScreen Other" #define PWM_printer_control_ "SelectPrinter Other" #define PWM_file_control_ "PostScript PrintToFile" #define PWM_idraw_control_ "Idraw PrintToFile" #define PWM_save_control2_ "SaveAll Session" #define PWM_save_control1_ "SaveSelected Session" #define PWM_retrieve_control_ "Retrieve Session" #define PWM_tray_ "Tray Other" #define PWM_ascii_ "Ascii PrintToFile" #define PWM_quit_ "Quit Other" #define pwm_impl PrintableWindowManager::current()->pwmi_ class HocPanel { public: static void save_all(ostream&); }; int inside(Coord x, Coord y, const Allocation& a) { if (x >= a.left() && x <= a.right() && y >= a.bottom() && y <= a.top()) { return true; }else { return false; } } #define DBG 0 void print_alloc(Canvas* c, char* s, const Allocation& a) { #if DBG || 1 printf("%s allocation %g %g %g %g\n", s, a.left(), a.bottom(), a.right(), a.top()); if (c) { Extension e; e.set(c, a); printf(" canvas %g %g %g %g\n", e.left(), e.bottom(), e.right(), e.top()); } #endif } /* static */ class ScreenScene : public Scene { public: ScreenScene(Coord , Coord, Coord, Coord, Glyph* g = NULL); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual Coord mbs() const; }; /* static */ class PaperScene : public Scene { public: PaperScene(Coord , Coord, Coord, Coord, Glyph* g = NULL); virtual Coord mbs() const; }; /* static */ class ScreenSceneHandler : public Handler { public: ScreenSceneHandler(Coord, Coord); virtual bool event(Event&); private: Coord x_, y_; }; extern "C" { extern double (*p_java2nrn_dmeth)(Object* ho, Symbol* method); extern char** (*p_java2nrn_smeth)(Object* ho, Symbol* method); const char* (*p_java2nrn_classname)(Object* ho); bool (*p_java2nrn_identity)(Object* o1, Object* o2); } //just enough info to get a java window represented in the PWM. // The distinction is that window() is NULL for these. /*static*/ class JavaWindow { public: JavaWindow(const char*, Object*); virtual ~JavaWindow(); virtual void map(); virtual void hide(); virtual void move(Coord l, Coord b); virtual void pmove(int l, int t); virtual void presize(int w, int h); virtual int priority(); virtual void save_session(const char* fname, ostream& o); void ref(); void unref(); Coord l(); Coord b(); Coord w(); Coord h(); char* title; int pl, pt, pw, ph; // pixel coords straight from java bool is_mapped, reffing_, closing_; Object* ho; }; class PaperItem; /*static*/ class ScreenItem : public Glyph { public: friend class PaperItem; ScreenItem(PrintableWindow*); ScreenItem(JavaWindow*); ~ScreenItem(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); PrintableWindow* window() { return w_;} JavaWindow* jwindow() {return jw_;} void relabel(GlyphIndex); // void reconfigured(Scene*); PaperItem* paper_item() const {return pi_;} GlyphIndex index() const { return i_;} Object* group_obj_; bool iconify_via_hide_; private: Glyph* label_; GlyphIndex i_; PrintableWindow* w_; JavaWindow* jw_; PaperItem* pi_; }; /*static*/ class PaperItem : public Glyph { public: PaperItem(ScreenItem*); ~PaperItem(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; // virtual void print(Printer*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); void scale(float s) { scale_ = s; } float scale() { return scale_; } ScreenItem* screen_item() const { return si_;} Coord width(); /* width of icon in pixels */ static Coord fsize_; // font height private: #if 1 friend class ScreenItem; #else //I prefer this but the SGI compiler doesn't like it friend ScreenItem::~ScreenItem(); #endif ScreenItem* si_; float scale_; }; /*static*/ class PWMImpl { public: void append_paper(ScreenItem*); void remove_paper(PaperItem*); void unshow_paper(PaperItem*); GlyphIndex paper_index(PaperItem*); PaperScene* paper() { return paper_;} ScreenScene* screen() { return screen_; } void help(); #if SNAPSHOT void snapshot(const Event*); Window* snap_owned(Printer*, Window*); void snap(Printer*, Window*); void snap_cursor(Printer*, const Event*); #endif void do_print0(); void do_print(bool printer, const char* name); void do_print_session(bool also_controller = true); void do_print_session(bool printer, const char* name); void ps_file_print(bool, const char*, bool, bool); void common_print(Printer*, bool, bool); #if DECO void print_deco(Printer*, Allocation& a, const char*); #endif #if MACPRINT void mac_do_print(); MacPrinter* mprinter(); void paperscale(); #endif void select_tool(); EventButton tool(EventButton); void move_tool(); void resize_tool(); void landscape(); void landscape(bool); bool is_landscape() { return landscape_; } void deco(int); void virt_screen(); void tray(); void printer_control(); void file_control(); #if SNAPSHOT void snapshot_control(); #endif bool file_control1(); void idraw_control(); void idraw_write(const char* fname, bool ses_style = false); void ascii_control(); void ascii_write(const char* fname, bool ses_style = false); void quit_control(); void save_selected_control(); void save_all_control(); void save_control(int); void save_session(int, const char*, const char* head = NULL); int save_group(Object*, const char*); void retrieve_control(); float round(float); float round_factor() {return round_factor_;} void map_all(); void unmap_all(); StandardWindow* window(); void window(StandardWindow* w) { w_ = w; } void all_window_bounding_box(Extension&, bool with_screen = true, bool also_controller = true); void view_screen(Coord, Coord); FileChooser* fc_save_; const Color* window_outline_; CopyString cur_ses_name_; #if carbon void all2front(); #endif private: friend class PrintableWindowManager; PWMImpl(ScreenScene*, PaperScene*, Rect*); ~PWMImpl(); GlyphIndex index(void*); void relabel(); GlyphIndex upper_left(); void redraw(Window*); bool none_selected(const char*, const char*)const; void ses_group(ScreenItem* si, ostream& o); int ses_group_first_; void save_begin(ostream&); void save_list(int, ScreenItem**, ostream&); private: StandardWindow* w_; ScreenScene* screen_; PaperScene* paper_; View* pview_; bool landscape_; Rect* prect_; bool use_printer; bool printer_control_accept_; String printer_; FieldDialog* b_printer_; FileChooser* fc_print_; FileChooser* fc_idraw_; FileChooser* fc_ascii_; FileChooser* fc_retrieve_; Coord canvasheight_; float round_factor_; TelltaleState* p_title_; Glyph* left_; //ugh EventButton tool_; const Event* snap_event_; bool print_leader_flag_; #if DECO TelltaleState* p_deco_; #endif Rect* screen_rect_; #if MACPRINT MacPrinter* mprinter_; #endif }; /* static */ class VirtualWindow : public DismissableWindow { public: static void makeVirtualWindow(); static void view(); virtual ~VirtualWindow(); private: VirtualWindow(View*, Glyph*); private: static VirtualWindow* virt_win_; View* view_; }; VirtualWindow* VirtualWindow::virt_win_; #ifdef WIN32 /* static */ class VirtualWindowScale : public Action { public: VirtualWindowScale(float); virtual void execute(); private: float scale_; }; #endif /*static*/ class PaperItem_handler : public Handler { public: enum {resize, move}; PaperItem_handler(int type, Coord x, Coord y, PaperItem*, const Transformer&); virtual ~PaperItem_handler(); virtual bool event(Event&); private: void resize_action(Coord, Coord); void move_action(Coord, Coord); private: void (PaperItem_handler::*action_)(Coord, Coord); Transformer t_; PaperItem* pi_; GlyphIndex index_; }; /*static*/ class ScreenItemHandler : public Handler { public: ScreenItemHandler(Coord x, Coord y, ScreenItem*, const Transformer&); virtual ~ScreenItemHandler(); virtual bool event(Event&); private: void move_action(bool, Coord, Coord); private: Transformer t_; ScreenItem* si_; }; PrintableWindowManager* PrintableWindowManager::current_; /*static*/ class PWMDismiss : public WinDismiss { public: PWMDismiss(DismissableWindow*); virtual ~PWMDismiss(); virtual void execute(); }; PWMDismiss::PWMDismiss(DismissableWindow* w) : WinDismiss(w) {} PWMDismiss::~PWMDismiss() {} void PWMDismiss::execute() { if (!DismissableWindow::is_transient()) { pwm_impl->unmap_all(); }else{ PrintableWindow::leader()->iconify(); } } #else //!HAVE_IV #if defined(CYGWIN) extern "C" {char* hoc_back2forward(char*);} #endif #endif //HAVE_IV static void* pwman_cons(Object*) { void* v = NULL; #if HAVE_IV IFGUI v = (void*)PrintableWindowManager::current(); ENDGUI #endif return v; } static void pwman_destruct(void* v) { } static double pwman_count(void* v) { int cnt = 0; #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; cnt = p->screen()->count(); ENDGUI #endif return double(cnt); } static double pwman_is_mapped(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; int i = (int)chkarg(1, 0, p->screen()->count()-1); ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (si->window()) { return double(si->window()->is_mapped()); }else{ return double(si->jwindow()->is_mapped); } ENDGUI #endif return 0.; } static double pwman_map(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; int i = (int)chkarg(1, 0, p->screen()->count()-1); ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (si->window()) { si->window()->map(); }else{ si->jwindow()->map(); } ENDGUI #endif return 0.; } static double pwman_hide(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; int i = (int)chkarg(1, 0, p->screen()->count()-1); ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (si->window()) { si->window()->hide(); }else{ si->jwindow()->hide(); } ENDGUI #endif return 0.; } static const char** pwman_name(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; int i = (int)chkarg(1, 0, p->screen()->count()-1); ScreenItem* si = (ScreenItem*)p->screen()->component(i); char** ps = hoc_temp_charptr(); if (si->window()) { *ps = (char*)si->window()->name(); }else{ *ps = si->jwindow()->title; } return (const char**) ps; ENDGUI #endif return 0; } static double pwman_close(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; int i = (int)chkarg(1, 0, p->screen()->count()-1); ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (p->window() == si->window()) { p->window(NULL); } si->window()->dismiss(); ENDGUI #endif return 0.; } #if defined(MINGW) static void pwman_iconify1(void* v) { ((PrintableWindow*)v)->dismiss(); } #endif static double pwman_iconify(void* v) { #if HAVE_IV IFGUI PrintableWindow* pw = PrintableWindow::leader(); #if defined(MINGW) if (!nrn_is_gui_thread()) { nrn_gui_exec(pwman_iconify1, pw); return 0.; } #endif pw->dismiss(); ENDGUI #endif return 0.; } static double pwman_deiconify(void* v) { #if HAVE_IV IFGUI PrintableWindow* pw = PrintableWindow::leader(); pw->map(); ENDGUI #endif return 0.; } static double pwman_leader(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; PrintableWindow* pw = PrintableWindow::leader(); int i, cnt = p->screen()->count(); for (i=0; i < cnt; ++i) { ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (si->window() == pw) { return double(i); } } ENDGUI #endif return -1.; } static double pwman_manager(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; PrintableWindow* pw = p->window(); int i, cnt = p->screen()->count(); for (i=0; i < cnt; ++i) { ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (si->window() == pw) { return double(i); } } ENDGUI #endif return -1.; } static double pwman_save(void* v) { int n = 0; #if HAVE_IV IFGUI // if arg2 is an object then save all windows with that group_obj // if arg2 is 1 then save all windows. // if arg2 is 0 then save selected (on paper) windows. PWMImpl* p = PrintableWindowManager::current()->pwmi_; if (ifarg(2)) { if (hoc_is_object_arg(2)) { n = p->save_group(*hoc_objgetarg(2), gargstr(1)); }else{ n = (int)chkarg(2, 0, 1); p->save_session((n?2:0) , gargstr(1), (ifarg(3)? gargstr(3) : NULL)); } } ENDGUI #endif return (double)n; } static Object** pwman_group(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; int i; i = int(chkarg(1, 0, p->screen()->count()-1)); ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (ifarg(2)) { hoc_obj_unref(si->group_obj_); si->group_obj_ = *hoc_objgetarg(2); hoc_obj_ref(si->group_obj_); } return hoc_temp_objptr(si->group_obj_); ENDGUI #endif return hoc_temp_objptr(0); } static double pwman_snap(void* v) { #if HAVE_IV IFGUI #if SNAPSHOT PWMImpl* p = PrintableWindowManager::current()->pwmi_; if (!ifarg(1)) { p->snapshot_control(); } #endif return 1.; ENDGUI #endif return 0; } // position size and show/hide a java window on session retrieve static double pwman_jwindow(void* v) { #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; // arg order is objref, map/hide, x, y, w, h // get java window owner object Object* ho = *hoc_objgetarg(1); // which java window is associated with this. int i, cnt = p->screen()->count(); for (i=0; i < cnt; ++i) { ScreenItem* si = (ScreenItem*)p->screen()->component(i); JavaWindow* jw = si->jwindow(); if (jw && (*p_java2nrn_identity)(jw->ho, ho)) { jw->pmove((int)*getarg(3), (int)*getarg(4)); jw->presize((int)*getarg(5), (int)*getarg(6)); if (chkarg(2,0,1) == 0.) { jw->hide(); } //printf("pwman_jwindow for %d\n", i); return i; } } ENDGUI #endif return -1; } #if defined(MINGW) static double scale_; static void pwman_scale1(void*) { iv_display_scale(scale_); } #endif static double pwman_scale(void*) { double scale = chkarg(1, .01, 100); #if HAVE_IV IFGUI #if defined(WIN32) #if defined(MINGW) if (!nrn_is_gui_thread()) { scale_ = scale; nrn_gui_exec(pwman_scale1, (void*)((intptr_t)1)); return scale; } #endif iv_display_scale(scale); #endif ENDGUI #endif return scale; } static double pwman_window_place(void*){ #if HAVE_IV IFGUI int i; PWMImpl* p = PrintableWindowManager::current()->pwmi_; i = int(chkarg(1, 0, p->screen()->count()-1)); ScreenItem* si = (ScreenItem*)p->screen()->component(i); if (si->window()) { si->window()->xmove(int(*getarg(2)), int(*getarg(3))); }else{ si->jwindow()->pmove(int(*getarg(2)), int(*getarg(3))); } ENDGUI #endif return 1.; } static double pwman_paper_place(void*){ #if HAVE_IV IFGUI // index, show=0 or 1 // index, x, y, scale where x and y in inches from left bottom int i; PWMImpl* p = PrintableWindowManager::current()->pwmi_; i = int(chkarg(1, 0, p->screen()->count()-1)); ScreenItem* si = (ScreenItem*)p->screen()->component(i); p->append_paper(si); PaperItem* pi = si->paper_item(); if (!ifarg(3)) { if ((int(chkarg(2, 0, 1))) == 0) { p->unshow_paper(pi); } }else{ pi->scale(chkarg(4, 1e-4, 1e4)); p->paper()->move(p->paper_index(pi), *getarg(2)/pr_scl, *getarg(3)/pr_scl); } ENDGUI #endif return 1.; } static double pwman_printfile(void*){ #if HAVE_IV IFGUI // first arg is filename // second arg is 0,1,2 refers to postscript, idraw, ascii mode // third arg is 0,1 refers to selected, all PWMImpl* p = PrintableWindowManager::current()->pwmi_; bool ses_style = false; if (ifarg(3)) { ses_style = int(chkarg(3, 0, 1))? true:false; } char* fname = gargstr(1); switch ((int)chkarg(2, 0, 2)) { case 0: p->ps_file_print(false, fname, p->is_landscape(), ses_style); break; case 1: p->idraw_write(fname, ses_style); break; case 2: p->ascii_write(fname, ses_style); break; } ENDGUI #endif return 1.; } static double pwman_landscape(void*){ #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; p->landscape(int(chkarg(1, 0, 1))?true:false); ENDGUI #endif return 1.; } static double pwman_deco(void*){ #if HAVE_IV IFGUI PWMImpl* p = PrintableWindowManager::current()->pwmi_; p->deco(int(chkarg(1, 0, 2))); ENDGUI #endif return 1.; } static Member_func members[] = { "count", pwman_count, "is_mapped", pwman_is_mapped, "map", pwman_map, "hide", pwman_hide, "close", pwman_close, "iconify", pwman_iconify, "deiconify", pwman_deiconify, "leader", pwman_leader, "manager", pwman_manager, "save", pwman_save, "snap", pwman_snap, "jwindow", pwman_jwindow, "scale", pwman_scale, "window_place", pwman_window_place, "paper_place", pwman_paper_place, "printfile", pwman_printfile, "landscape", pwman_landscape, "deco", pwman_deco, 0, 0 }; static Member_ret_obj_func retobj_members[] = { "group", pwman_group, 0, 0 }; static Member_ret_str_func s_memb[] = { "name", pwman_name, 0, 0 }; void PWManager_reg() { class2oc("PWManager", pwman_cons, pwman_destruct, members, NULL, retobj_members, s_memb); } #if HAVE_IV // almost to end of file //PaperItem_handler PaperItem_handler::PaperItem_handler(int type, Coord x, Coord y, PaperItem* pi, const Transformer& t) { //printf("PaperItem_handler\n"); t_ = t; pi_ = pi; Resource::ref(pi); index_ = pwm_impl->paper_index(pi); Coord left, bottom; pwm_impl->paper()->location(index_, left, bottom); t_.invert(); switch (type) { case resize: action_ = &PaperItem_handler::resize_action; break; case move: t_.translate(left - x, bottom - y); action_ = &PaperItem_handler::move_action; break; } } PaperItem_handler::~PaperItem_handler() { //printf("~PaperItem_handler\n"); Resource::unref(pi_); } bool PaperItem_handler::event(Event& e) { //printf("PaperItem_handler::event (%g, %g)\n", e.pointer_x(), e.pointer_y()); switch(e.type()) { case Event::down: e.grab(this); #ifdef WIN32 e.window()->grab_pointer(); #endif (this->*action_)(e.pointer_x(), e.pointer_y()); break; case Event::up: e.ungrab(this); #ifdef WIN32 e.window()->ungrab_pointer(); #endif break; case Event::motion: (this->*action_)(e.pointer_x(), e.pointer_y()); break; } return true; } void PaperItem_handler::move_action(Coord x, Coord y) { //printf("move_action\n"); Coord xs, ys; t_.transform(x, y, xs, ys); xs = pwm_impl->round(xs); ys = pwm_impl->round(ys); pwm_impl->paper()->move(index_, xs, ys); } void PaperItem_handler::resize_action(Coord x, Coord y) { Allotment ax; pwm_impl->paper()->allotment(index_, Dimension_X, ax); Allotment ay; pwm_impl->paper()->allotment(index_, Dimension_Y, ay); Coord xs, ys; t_.transform(x, y, xs, ys); float scl = Math::max((xs - ax.begin())/ax.span(), (ys - ay.begin())/ay.span()); //printf("scl = %g\n", scl); scl = pi_->scale() * scl; scl = (scl > .1) ? scl : .1; Coord w1; w1 = pwm_impl->round(scl*pi_->width()); w1 = Math::max(w1, pwm_impl->round_factor()); scl = w1/pi_->width(); pi_->scale(scl); pwm_impl->paper()->modified(index_); } VirtualWindow::VirtualWindow(View* v, Glyph* g) : DismissableWindow(g, true) { view_ = v; view_->ref(); #ifdef WIN32 if (!style()) { style(new Style(Session::instance()->style())); style()->attribute("nrn_virtual_screen", "0"); } MenuItem* mi = append_menubar("Scale"); WidgetKit& wk = *WidgetKit::instance(); Menu* m = wk.pulldown(); mi->menu(m); mi = K::menu_item("normal"); mi->action(new VirtualWindowScale(1.0)); m->append_item(mi); mi = K::menu_item("see all"); mi->action(new VirtualWindowScale(fil)); m->append_item(mi); mi = K::menu_item("1.2"); mi->action(new VirtualWindowScale(1.2)); m->append_item(mi); mi = K::menu_item("1.5"); mi->action(new VirtualWindowScale(1.5)); m->append_item(mi); mi = K::menu_item("2.0"); mi->action(new VirtualWindowScale(2.0)); m->append_item(mi); #endif } VirtualWindow::~VirtualWindow() { view_->unref(); virt_win_ = NULL; } #if defined(WIN32) || carbon extern void ivoc_bring_to_top(Window*); #endif void VirtualWindow::makeVirtualWindow() { if (!virt_win_) { View* v = new View(pwm_impl->screen()); virt_win_ = new VirtualWindow(v, LayoutKit::instance()->variable_span( new Background( v, WidgetKit::instance()->background()) )); virt_win_->map(); } #ifdef WIN32 ivoc_bring_to_top(virt_win_); #endif } void virtual_window_top() { VirtualWindow::makeVirtualWindow(); } void VirtualWindow::view() { if (virt_win_) { View* v = virt_win_->view_; Scene* s = v->scene(); v->size(s->x1(), s->y1(), s->x2(), s->y2()); virt_win_->canvas()->damage_all(); } } #ifdef WIN32 VirtualWindowScale::VirtualWindowScale(float scale) { scale_ = scale; } void VirtualWindowScale::execute() { float scale = scale_; if (scale_ >= fil/10.) { Extension e; pwm_impl->all_window_bounding_box(e); iv_display_scale(e.right() - e.left(), e.top() - e.bottom()); }else{ iv_display_scale(scale); } } #endif //ScreenItemHandler ScreenItemHandler::ScreenItemHandler(Coord x, Coord y, ScreenItem* si, const Transformer& t) { //printf("ScreenItemHandler\n"); t_ = t; si_ = si; Resource::ref(si); Coord left, bottom; pwm_impl->screen()->location(si_->index(), left, bottom); t_.invert(); t_.translate(left - x, bottom - y); } ScreenItemHandler::~ScreenItemHandler() { //printf("~ScreenItemHandler\n"); Resource::unref(si_); } bool ScreenItemHandler::event(Event& e) { //printf("ScreenItemHandler::event (%g, %g)\n", e.pointer_x(), e.pointer_y()); switch(e.type()) { case Event::down: e.grab(this); #ifdef WIN32 e.window()->grab_pointer(); #endif move_action(false, e.pointer_x(), e.pointer_y()); break; case Event::up: e.ungrab(this); #ifdef WIN32 e.window()->ungrab_pointer(); #endif move_action(true, e.pointer_x(), e.pointer_y()); break; case Event::motion: move_action(false, e.pointer_x(), e.pointer_y()); break; } return true; } void ScreenItemHandler::move_action(bool doit, Coord x, Coord y) { //printf("move_action\n"); Coord xs, ys; t_.transform(x, y, xs, ys); if (doit) { if (si_->window()) { si_->window()->move(xs*Scl, ys*Scl); }else{ si_->jwindow()->move(xs*Scl, ys*Scl); } }else{ pwm_impl->screen()->move(si_->index(), xs, ys); } } ScreenScene::ScreenScene(Coord x1, Coord y1, Coord x2, Coord y2, Glyph* g) : Scene(x1, y1, x2, y2, g) { } void ScreenScene::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { if (pwm_impl->tool(h.event()->pointer_button()) == Event::middle) { if (h.event()->type() == Event::down) { h.target(depth, this, 0, new ScreenSceneHandler(h.left()*Scl, h.bottom()*Scl)); } }else{ Scene::pick(c, a, depth, h); } } Coord ScreenScene::mbs() const { return 0.; } PaperScene::PaperScene(Coord x1, Coord y1, Coord x2, Coord y2, Glyph* g) : Scene(x1, y1, x2, y2, g) { } Coord PaperScene::mbs() const { return 0.; } ScreenSceneHandler::ScreenSceneHandler(Coord x, Coord y) : Handler() { x_ = x; y_ = y; } bool ScreenSceneHandler::event(Event&) { pwm_impl->view_screen(x_, y_); return true; } //PrintableWindowManager declareActionCallback(PWMImpl) implementActionCallback(PWMImpl) PrintableWindowManager* PrintableWindowManager::current() { if (!current_) { current_ = new PrintableWindowManager(); } return current_; } PrintableWindowManager::PrintableWindowManager() { LayoutKit& layout = *LayoutKit::instance(); WidgetKit& kit = *WidgetKit::instance(); PaperItem::fsize_ = kit.font()->size(); current_ = this; Display* d = Session::instance()->default_display(); // PGH begin Coord canvasheight; Style* q = Session::instance()->style(); if (!q->find_attribute("pwm_canvas_height", canvasheight)) { canvasheight = 100.; } const Color* outline_color; String c; Display* dis = Session::instance()->default_display(); if (!q->find_attribute("pwm_screen_outline_color", c) || ( outline_color = Color::lookup(dis, c)) == NULL) { outline_color = Color::lookup(dis, "#ff0000"); } Scl = d->height()/canvasheight; Rect* sr = new Rect(0, 0 ,d->width()/Scl , d->height()/Scl, outline_color); sr->ref(); ScreenScene* screen = new ScreenScene(-5, -2, d->width()/Scl + 5, d->height()/Scl + 2, sr); Coord pageheight; Coord pagewidth; if (!q->find_attribute("pwm_paper_height", pageheight)) { pageheight = 11.; } if (!q->find_attribute("pwm_paper_width", pagewidth)) { pagewidth = 8.5; } Coord wp1; if (pageheight > pagewidth) pr_scl = pageheight/canvasheight; else pr_scl = pagewidth/canvasheight; // width = max(d->width/Scl,pagewidth/prl_scl,pageheight/prl_scl) if (d->width() > d->height()) wp1 = d->width()/Scl; else wp1 = canvasheight; Coord wp = pagewidth/pr_scl; Coord hp = pageheight/pr_scl; Coord max = Math::max(wp,hp); Rect* r = new Rect(0,0,wp,hp, outline_color); // wp1 = wp1*1.2; // Scene* paper = new Scene(-5, -1, hp*1.2, hp+1, r); PaperScene* paper = new PaperScene(-5, -2, Math::max(max,d->width()/Scl), max+2, r); //PGH end pwmi_ = new PWMImpl(screen, paper, r); if (!q->find_attribute("pwm_window_outline_color", c) || ( outline_color = Color::lookup(dis, c)) == NULL) { outline_color = Color::lookup(dis, "#0000ff"); } outline_color->ref(); pwmi_->window_outline_ = outline_color; pwmi_->screen_rect_ = sr; if (!q->find_attribute("pwm_paper_resolution", pwmi_->round_factor_)) { pwmi_->round_factor_ = .25; } pwmi_->canvasheight_ = canvasheight; pwmi_->round_factor_ /= pr_scl; long ltmp; if (q->find_attribute("pwm_pixel_resolution", ltmp)) { pixres = (PixelCoord)ltmp; } PolyGlyph* hb = layout.hbox(6); pwmi_->left_ = hb; pwmi_->left_->ref(); Menu* mbar, *mprint, *mses, *mother; #if 0 #if !MAC if (q->value_is_on("pwm_help")) { vb->append(kit.push_button("Help", new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::help) )); } #endif #endif hb->append(mbar = kit.menubar()); MenuItem* mi; mi = kit.menubar_item("Print"); mbar->append_item(mi); mprint = kit.pulldown(); mi->menu(mprint); mi = kit.menubar_item("Session"); mbar->append_item(mi); mses = kit.pulldown(); mi->menu(mses); #if 0 mi = kit.menubar_item("Other"); mbar->append_item(mi); mother = kit.pulldown(); mi->menu(mother); #endif TelltaleGroup* ttg = new TelltaleGroup(); mi = kit.radio_menu_item(ttg, "select"); mbar->append_item(mi); mi->state()->set(TelltaleState::is_chosen, true); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::select_tool)); mi = kit.radio_menu_item(ttg, "move"); mbar->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::move_tool)); mi = kit.radio_menu_item(ttg, "resize"); mbar->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::resize_tool)); mi = K::menu_item("To Printer"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::do_print0)); #if 1 || !MAC mi = K::menu_item("PostScript"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::file_control)); #if SNAPSHOT mi = K::menu_item("PS snapshot"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::snapshot_control)); #endif #endif mi = K::menu_item("Idraw"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::idraw_control)); mi = K::menu_item("Ascii"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::ascii_control)); #if MAC && !defined(carbon) mi = K::menu_item("Setup Printer"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::paperscale)); #else mi = K::menu_item("Select Printer"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::printer_control)); #endif mi = K::check_menu_item("Window Titles Printed"); mprint->append_item(mi); pwmi_->p_title_ = mi->state(); #if DECO mi = K::check_menu_item("Window Decorations Printed"); mprint->append_item(mi); pwmi_->p_deco_ = mi->state(); // automatically on. comment out otherwise #if DECO == 1 pwmi_->p_deco_->set(TelltaleState::is_chosen, true); #else pwmi_->p_deco_->set(TelltaleState::is_chosen, false); #endif #endif mi = K::menu_item("Retrieve"); mses->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::retrieve_control)); mi = K::menu_item("Save selected"); mses->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::save_selected_control)); mi = K::menu_item("Save all"); mses->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::save_all_control)); mi = K::menu_item("VirtualScreen"); mses->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::virt_screen)); #if 1 || !MAC mi = K::menu_item("Land/Port"); mprint->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::landscape)); #endif mi = K::menu_item("Tray"); mses->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::tray)); #if 0 mi = K::menu_item("Quit"); mother->append_item(mi); mi->action(new ActionCallback(PWMImpl)(pwmi_, &PWMImpl::quit_control)); #endif if (PrintableWindow::leader() == NULL) { pwmi_->window(); OcGlyphContainer* ocg = PrintableWindow::intercept(0); if (PrintableWindow::leader() != pwmi_->w_) { pwmi_->w_->replace_dismiss_action(NULL); } #if OCSMALL pwmi_->w_->xplace(-800, 0); #else #if MAC pwmi_->w_->xplace(0,40); #else pwmi_->w_->xplace(0,0); #endif #endif // pwmi_->w_->map(); PrintableWindow::intercept(ocg); } PrintableWindow::leader()->replace_dismiss_action(new PWMDismiss(PrintableWindow::leader())); } void PWMImpl::select_tool() { tool_ = Event::right; } void PWMImpl::move_tool() { tool_ = Event::left; } void PWMImpl::resize_tool() { tool_ = Event::middle; } EventButton PWMImpl::tool(EventButton b) { if (b == Event::left) { return tool_; } return b; } StandardWindow* PWMImpl::window() { if (w_ == NULL) { LayoutKit& layout = *LayoutKit::instance(); OcGlyphContainer* ocg = PrintableWindow::intercept(0); w_ = new StandardWindow( #if 1 layout.hbox( layout.variable_span(new View(screen_)), layout.variable_span(pview_ = new View(paper_)) ), #else new View(screen_), #endif left_,// really info NULL, NULL, NULL ); PrintableWindow::intercept(ocg); Style* s = new Style(Session::instance()->style()); s->attribute("name", "Print & File Window Manager"); w_->style(s); } return w_; } PrintableWindowManager::~PrintableWindowManager() { // printf("~PrintableWindowManager\n"); delete pwmi_; if (current_ == this) { current_ = NULL; } } extern "C" { void hoc_pwman_place() { #if HAVE_IV IFGUI int x, y; x = int(*getarg(1)); y = int(*getarg(2)); bool m = (ifarg(3) && int(*getarg(3)) == 0) ? false : true; PrintableWindowManager::current()->xplace(x, y, m); ENDGUI #endif hoc_ret(); hoc_pushx(0.); } void hoc_save_session() { #if HAVE_IV IFGUI if (pwm_impl) { pwm_impl->save_session(2, gargstr(1), (ifarg(2) ? gargstr(2) : NULL)); } ENDGUI #endif hoc_ret(); hoc_pushx(0.); } const char* pwm_session_filename() { if (pwm_impl) { return pwm_impl->cur_ses_name_.string(); } return 0; } void hoc_print_session() { #if HAVE_IV IFGUI if (pwm_impl) { if (ifarg(3) && chkarg(3,0,1) == 1.) { pwm_impl->do_print((int)chkarg(1,0,1), gargstr(2)); }else if (ifarg(2)) { pwm_impl->do_print_session((int)chkarg(1,0,1), gargstr(2)); }else{ bool b = ifarg(1) ? (chkarg(1, 0, 1) == 1.) : true; pwm_impl->do_print_session(b); } } ENDGUI #endif hoc_ret(); hoc_pushx(0.); } } void PrintableWindowManager::xplace(int left, int top, bool m) { PrintableWindow* w = pwm_impl->window(); if (!w->is_mapped()) { PrintableWindow* pw = PrintableWindow::leader(); if (pw && pw->is_mapped() && pw != w) { if (w->is_transient()) { w->transient_for(pw); }else{ w->group_leader(pw); } } w->xplace(left, top); } if (m) { w->map(); w->xmove(left, top); }else{ w->hide(); } #if MAC reconfigured(w); #endif } void PrintableWindowManager::update(Observable* o) { PrintableWindow* w = (PrintableWindow*)o; //printf("PrintableWindowManager::update(%p)\n", w); reconfigured(w); #if carbon if (w->leader() == w) { pwmi_->all2front(); } #endif } void PrintableWindowManager::disconnect(Observable* o) { // printf("disconnect %p\n", (PrintableWindow*)o); } void PrintableWindowManager::append(PrintableWindow* w) { //printf("PrintableWindowManager::append(%p)\n", w); if (w == NULL) { return; } w->attach(this); pwmi_->screen_->append(new ScreenItem(w)); pwmi_->relabel(); PrintableWindow* pw = PrintableWindow::leader(); if (pw && pw->is_mapped() && pw != w) { if (w->is_transient()) { w->transient_for(pw); //printf("transient for %p\n", pw); }else{ w->group_leader(pw); //printf("group leader is %p\n", pw); } } } void PrintableWindowManager::append(JavaWindow* w) { //printf("PrintableWindowManager::append(%p)\n", w); if (w == NULL) { return; } pwmi_->screen_->append(new ScreenItem(w)); pwmi_->relabel(); } void PrintableWindowManager::remove(PrintableWindow* w) { //printf("PrintableWindowManager::remove(%p)\n", w); PWMImpl* impl = pwmi_; if (w == impl->window()) { impl->w_ = NULL; } // printf("remove %p\n", w); w->detach(this); Scene* s = impl->screen_; if (s) { GlyphIndex i = impl->index(w); if (i >= 0) s->remove(i); } impl->relabel(); } void PrintableWindowManager::remove(JavaWindow* w) { //printf("PrintableWindowManager::remove(%p)\n", w); PWMImpl* impl = pwmi_; // printf("remove %p\n", w); Scene* s = impl->screen_; if (s) { GlyphIndex i = impl->index(w); if (i >= 0) s->remove(i); } impl->relabel(); } #define PIXROUND(x,y,r) x = int((y + r/2)/r) * r void PrintableWindow::map_notify() { // only if leader if (this == leader()) { PrintableWindowManager::current()->pwmi_->map_all(); } } void PrintableWindow::reconfigured() { if (!pixres) { return; } PixelCoord x, y, x1, y1; x1 = xleft(); y1 = xtop(); PIXROUND(x, x1, pixres); PIXROUND(y, y1, pixres); if (x != x1 || y != y1) { xmove(x, y); } } void ViewWindow::reconfigured() { if (!pixres) { return; } PixelCoord x, y, w, h; w = canvas()->pwidth(); h = canvas()->pheight(); PIXROUND(x, w, pixres); PIXROUND(y, h, pixres); if (x == 0) x = pixres; if (y == 0) y = pixres; if (x != w || y != h) { canvas()->psize(x, y); Window::resize(); } PrintableWindow::reconfigured(); } void PrintableWindowManager::reconfigured(PrintableWindow* w) { PWMImpl* impl = pwmi_; GlyphIndex i = impl->index(w); if (i < 0) return; // mswin after a ShowWindow(hwnd, SW_HIDE); Coord l = w->left_pw(); Coord r = l + w->width_pw(); Coord b = w->bottom_pw(); Coord t = b + w->height_pw(); impl->screen_->move(i, l/Scl, b/Scl); impl->screen_->change(i); impl->screen_->show(i, w->is_mapped()); ScreenItem* si = (ScreenItem*)impl->screen_->component(i); PaperItem* pi = si->paper_item(); if (pi) { impl->paper_->change(impl->paper_index(pi)); } Extension e; impl->all_window_bounding_box(e); impl->screen_->new_size(e.left()/Scl - 5, e.bottom()/Scl - 2, e.right()/Scl + 5, e.top()/Scl + 2); VirtualWindow::view(); #if DBG Coord x, y; impl->screen_->location(i, x, y); printf("reconfigured %d %d %g %g\n", i, impl->screen_->showing(i), x, y); #endif } void PrintableWindowManager::reconfigured(JavaWindow* w) { PWMImpl* impl = pwmi_; //printf("reconfigured %g %g %g %g mapped=%d\n", w->l, w->b, w->w, w->h,w->is_mapped); GlyphIndex i = impl->index(w); if (i < 0) return; // mswin after a ShowWindow(hwnd, SW_HIDE); Coord l = w->l(); Coord r = l + w->w(); Coord b = w->b(); Coord t = b + w->h(); impl->screen_->move(i, l/Scl, b/Scl); impl->screen_->change(i); impl->screen_->show(i, w->is_mapped); ScreenItem* si = (ScreenItem*)impl->screen_->component(i); PaperItem* pi = si->paper_item(); if (pi) { impl->paper_->change(impl->paper_index(pi)); } Extension e; impl->all_window_bounding_box(e); impl->screen_->new_size(e.left()/Scl - 5, e.bottom()/Scl - 2, e.right()/Scl + 5, e.top()/Scl + 2); VirtualWindow::view(); #if DBG Coord x, y; impl->screen_->location(i, x, y); printf("reconfigured %d %d %g %g\n", i, impl->screen_->showing(i), x, y); #endif single_event_run(); } void PrintableWindowManager::doprint() { pwmi_->do_print0(); } void PWMImpl::help() { Oc::helpmode(!Oc::helpmode()); Oc::helpmode(w_); if (Oc::helpmode()) { Oc::help(PWM_help_); } } void PWMImpl::all_window_bounding_box(Extension& e, bool with_screen, bool also_leader) { GlyphIndex i; PrintableWindow* w; Display* d = Session::instance()->default_display(); if (with_screen) { e.set_xy(NULL, 0., 0., d->width(), d->height()); }else{ e.clear(); } PrintableWindow* wl = PrintableWindow::leader(); bool empty = true; for (i=0; i < screen_->count(); i++) { w = ((ScreenItem*)(screen_->component(i)))->window(); if (w && w->is_mapped() && w != wl) { e.merge_xy(NULL, w->left(), w->bottom(), w->left() + w->width(), w->bottom() + w->height()); empty = false; } } w = wl; if (w && w->is_mapped() && (also_leader || empty)) { e.merge_xy(NULL, w->left(), w->bottom(), w->left() + w->width(), w->bottom() + w->height()); print_leader_flag_ = true; }else{ print_leader_flag_ = false; } screen_rect_->width(d->width()/Scl); screen_rect_->height(d->height()/Scl); //printf("all_window_bounding_box %g %g %g %g\n", e.left(), e.bottom(), e.right(), e.top()); } void PWMImpl::view_screen(Coord x, Coord y) { int xp, yp; // printf("view_sceen %g %g\n", x, y); GlyphIndex i; PrintableWindow* w; Display* d = Session::instance()->default_display(); xp = d->to_pixels(-x) + d->pwidth()/2; yp = d->to_pixels(y) - d->pheight()/2; for (i=0; i < screen_->count(); i++) { ScreenItem* si = (ScreenItem*)screen_->component(i); if (si->window()) { w = si->window(); if (w != window()) { w->xmove(w->xleft() + xp, w->xtop() + yp); } }else{ JavaWindow* jw = si->jwindow(); Coord l, b; l = jw->l() + d->to_coord(xp); b = jw->b() - d->to_coord(yp); jw->move(l, b); } } } void PWMImpl::do_print0() { if (Oc::helpmode()) { Oc::help(PWM_do_print_); return; } if (use_printer) { if (none_selected("No windows to print", "Print Anyway")) { return; } #if MAC && !defined(carbon) if (!mprinter_) { continue_dialog("First select SetupPrinter"); }else{ mac_do_print(); } #else if (!b_printer_) { printer_control(); if (!printer_control_accept_) { Resource::unref(b_printer_); b_printer_ = NULL; return; } } CopyString name(b_printer_->text()->string()); do_print(use_printer, name.string()); #endif }else{ if (!fc_print_) { file_control(); return; // file_control calls do_print } do_print(use_printer, fc_print_->selected()->string()); } } void PWMImpl::do_print(bool use_printer, const char* name) { #if MAC && !defined(carbon) if (use_printer) { mac_do_print(); return; } #endif #if defined(WIN32) if (use_printer && strcmp(name, "Windows") == 0) { mac_do_print(); return; } #endif ps_file_print(use_printer, name, landscape_, false); } void PWMImpl::do_print_session(bool also_leader) { // must work for mac, mswin, unix. All windows on screen //scale so on paper bool p = true; #if DECO bool deco = p_deco_->test(TelltaleState::is_chosen); p_deco_->set(TelltaleState::is_chosen, true); #endif #if MACPRINT Extension e; #if defined(WIN32) if (!mprinter()->get()) { return; } #endif all_window_bounding_box(e, false, also_leader); // want 1/2 inch margins float s1 = (mprinter()->width() - 72.)/(e.right() - e.left() + 6.);// with deco float s2 = (mprinter()->height() - 72.)/(e.top() - e.bottom() + 23.);//with deco float sfac = (s1 < s2) ? s1 : s2; float xoff = mprinter()->width()/2/sfac - (e.right() + e.left() + 6.)/2.; float yoff = mprinter()->height()/2/sfac - (e.top() + e.bottom() + 23.)/2.; Transformer t; t.translate(xoff, yoff); #if MAC && !defined(carbon) mprinter()->prolog(); t.scale(sfac, sfac); #else mprinter()->prolog(sfac); #endif mprinter()->push_transform(); mprinter()->transform(t); common_print(mprinter(), false, true); mprinter()->pop_transform(); mprinter()->epilog(); #endif #if (!MAC || DARWIN) && !defined(WIN32) // must be a postscript printer so can use landscape mode if (!b_printer_) { printer_control(); if (!printer_control_accept_) { Resource::unref(b_printer_); b_printer_ = NULL; p = false; } } if (p) { CopyString name(b_printer_->text()->string()); ps_file_print(true, name.string(), true, true); } #endif #if DECO p_deco_->set(TelltaleState::is_chosen, deco); #endif print_leader_flag_ = true; } void PWMImpl::do_print_session(bool use_printer, const char* name) { print_leader_flag_ = true; ps_file_print(use_printer, name, true, true); } void PWMImpl::ps_file_print(bool use_printer, const char* name, bool land_style, bool ses_style) { Style* s = Session::instance()->style(); static char* tmpfile = (char*)0; filebuf obuf; #if MAC && !DARWIN obuf.open(name, IOS_OUT); #else if (!tmpfile) { tmpfile = ivoc_get_temp_file(); } #ifdef WIN32 unlink(tmpfile); #endif obuf.open(tmpfile, IOS_OUT); #endif ostream o(&obuf); Printer* pr = new Printer(&o); pr->prolog(); if (ses_style) { #if DECO bool deco = p_deco_->test(TelltaleState::is_chosen); p_deco_->set(TelltaleState::is_chosen, true); #endif Style* s = Session::instance()->style(); Coord pageheight; Coord pagewidth; if (!s->find_attribute("pwm_paper_height", pageheight)) { pageheight = 11.; } if (!s->find_attribute("pwm_paper_width", pagewidth)) { pagewidth = 8.5; } Extension e; all_window_bounding_box(e, false, true); // want 1/2 inch margins float s1 = (pagewidth*72 - 72.)/(e.right() - e.left() + 6.);// with deco float s2 = (pageheight*72 - 72.)/(e.top() - e.bottom() + 23.);//with deco float sfac = (s1 < s2) ? s1 : s2; float xoff = pagewidth*72/2/sfac - (e.right() + e.left() + 6.)/2.; float yoff = pageheight*72/2/sfac - (e.top() + e.bottom() + 23.)/2.; Transformer t; t.translate(xoff, yoff); t.scale(sfac, sfac); pr->push_transform(); pr->transform(t); common_print(pr, false, ses_style); pr->pop_transform(); #if DECO p_deco_->set(TelltaleState::is_chosen, deco); #endif }else{ common_print(pr, land_style, ses_style); } pr->epilog(); obuf.close(); #if !MAC || DARWIN char buf[200]; String filt("cat"); s->find_attribute("pwm_postscript_filter", filt); if (use_printer) { #ifdef WIN32 sprintf(buf, "%s %s %s", filt.string(), tmpfile, name); #else sprintf(buf, "%s < %s | %s ; rm %s", filt.string(), tmpfile, name, tmpfile); #endif }else{ #ifdef WIN32 sprintf(buf, "%s %s > %s", filt.string(), tmpfile, name); #else sprintf(buf, "%s < %s > %s ; rm %s", filt.string(), tmpfile, name, tmpfile); #endif } //printf("%s\n", buf); nrnignore = system(buf); #ifdef WIN32 unlink(tmpfile); #endif #endif delete pr; //input handlers later crash doing pr->damage() } #ifdef WIN32 extern "C" { extern bool hoc_copyfile(const char*, const char*);} #endif #if MACPRINT void PWMImpl::mac_do_print() { #if defined(WIN32) if (!mprinter()->get()) { return; } #endif mprinter()->prolog(); common_print(mprinter(), landscape_, false); mprinter()->epilog(); } #endif void PWMImpl::common_print(Printer* pr, bool land_style, bool ses_style) { Scene* p; if (ses_style) { p = screen(); }else{ p = paper(); } Style* s = Session::instance()->style(); Coord pageheight; Coord pagewidth; if (!s->find_attribute("pwm_paper_height", pageheight)) { pageheight = 11.; } if (!s->find_attribute("pwm_paper_width", pagewidth)) { pagewidth = 8.5; } pr->resize(0, 0, pagewidth*72, pageheight*72); if (land_style) { Transformer t; t.rotate(-90); //t.translate(0, pageheight*72); if (ses_style) { t.translate(20, pr->height() - 70); }else{ t.translate(0, pr->height()); } pr->transform(t); } GlyphIndex count = p->count(); for (GlyphIndex i=0; i < count; ++i) { if (!p->showing(i)) { continue; } PrintableWindow* pw; float sfac; Transformer t; Coord x, y, x1, y1; if (ses_style) { ScreenItem* pi = (ScreenItem*)p->component(i); pw = pi->window(); if (!pw->is_mapped()) { continue; } // probably the PFWM if (!print_leader_flag_ && pw == PrintableWindow::leader()) { continue; } float sfac = .9*pagewidth*72/pw->display()->height(); sfac=1.; x = pw->left_pw(); y = pw->bottom_pw(); t.translate(x, y); t.scale(sfac, sfac); x1 = (x)*sfac; y1 = (y + pw->height_pw())*sfac; }else{ PaperItem* pi = (PaperItem*)p->component(i); pw = pi->screen_item()->window(); float sfac = pr_scl*72*pi->scale()/Scl; p->location(i, x, y); t.scale(sfac, sfac); t.translate(72*x*pr_scl, 72*y*pr_scl); //t.translate((pr->width() - pagewidth*72)/2, (pr->height() - pageheight*72)/2); x1 = 72*(x)*pr_scl; y1 = 72*(y + pi->width()*pw->height_pw()/pw->width_pw()*pi->scale())*pr_scl; } Requisition req; pw->print_glyph()->request(req); float align_x = req.x_requirement().alignment(); float align_y = req.y_requirement().alignment(); Allotment ax(align_x*pw->width_pw(), pw->width_pw(), align_x); Allotment ay(align_y*pw->height_pw(), pw->height_pw(), align_y); Allocation a; a.allot_x(ax); a.allot_y(ay); pr->push_transform(); pr->transform(t); pr->push_clipping(); pr->clip_rect(0, 0, pw->width_pw(), pw->height_pw()); pw->print_glyph()->print(pr, a); //FieldEditor glyphs crash pr->pop_clipping(); #if DECO if (p_deco_->test(TelltaleState::is_chosen) == true) { print_deco(pr, a, pw->name()); } #endif pr->pop_transform(); // flush the allocation tables for InputHandler glyphs so // no glyphs try to use the Printer after it has been deleted pw->print_glyph()->undraw(); #if !MAC redraw(pw); #endif // print the window titles if ((ses_style || p_title_->test(TelltaleState::is_chosen) == true) #if DECO && p_deco_->test(TelltaleState::is_chosen) == false #endif ) { WidgetKit& wk = *WidgetKit::instance(); Label label(pw->name(), wk.font(), wk.foreground()); Requisition r; label.request(r); Allocation al; Allotment& alx = al.x_allotment(); Allotment& aly = al.y_allotment(); alx.origin(x1); alx.span(r.x_requirement().natural()); aly.origin(y1); aly.span(r.y_requirement().natural()); label.draw(pr, al); } } } #if DECO // for Carnevale, Hines book figures void PWMImpl::print_deco(Printer* pr, Allocation& a, const char* title) { WidgetKit& wk = *WidgetKit::instance(); Coord l,b,r,t,w,h,s,x,y,dx,xx; // attributes static const Color* ctitle; static const Color* ctitlebar; static const Color* coutline; static const Color* bright; static const Color* dark; static const Font* ftitle; static const Brush* br; static int first = 1; w = 3; h = 20; // width of outer deco, height of title bar s = 2; // close button offset from bottom of title bar xx = 10; // x part of close button size if (first) { first = 0; bright = new Color(.9,.9,.9,1.); bright->ref(); dark = new Color(.1,.1,.1,1.); dark->ref(); ctitle = new Color(0.,0.,0.,1.); ctitle->ref(); ctitlebar = new Color(.8,.8,.8,1.); ctitlebar->ref(); coutline = new Color(.7,.7,.7,1.); coutline->ref(); br = new Brush(1); br->ref(); ftitle = wk.font(); ftitle->ref(); } l=a.left(); b=a.bottom(); r=a.right(); t=a.top(); //inside //title bar pr->fill_rect(l, t, r, t+h, ctitlebar); // title Label label(title, ftitle, ctitle); Requisition req; label.request(req); x = req.x_requirement().natural(); y = req.y_requirement().natural(); Allocation al; Coord xo = (l + r)/2 - x/2; xo = (xo < h) ? h : xo; al.allot_x(Allotment(xo, x, 0.)); al.allot_y(Allotment(t+h/2 - y/3, y, 0.)); // clip the title pr->push_clipping(); pr->clip_rect(l+h, t, r, t+h); label.draw(pr, al); pr->pop_clipping(); // outline pr->fill_rect(l,b-w,l-w,t+h+w,coutline); // left pr->fill_rect(r,b-w,r+w,t+h+w,coutline); // right pr->fill_rect(l,b,r,b-w,coutline); // bottom pr->fill_rect(l,t+h,r,t+h+w,coutline); // top pr->rect(l-w,b-w,r+w,t+h+w,dark, br); // outside boundary // close button x = (l + (l+h-s))/2; y = (t+s + t+h)/2; dx = (h-s)/2; pr->rect(x-dx,y-dx,x+dx,y+dx,bright,br); dx = xx/2; pr->line(x-dx,y-dx,x+dx,y+dx, bright,br); // the x pr->line(x-dx,y+dx,x+dx,y-dx, bright,br); // the x } #endif void PrintableWindowManager::psfilter(const char* filename) { static char* tmpfile = (char*)0; if (!tmpfile) { tmpfile = ivoc_get_temp_file(); } Style* s = Session::instance()->style(); char buf[512]; String filt("cat"); if (s->find_attribute("pwm_postscript_filter", filt)) { #if defined(WIN32) && !defined(CYGWIN) if (!hoc_copyfile(filename, tmpfile)) { hoc_warning("CopyFile failed.", "Did not run pwm_postscript_filter"); return; } sprintf(buf, "%s %s > %s", filt.string(), tmpfile, filename); #else sprintf(buf, "cat %s > %s; %s < %s > %s", filename, tmpfile, filt.string(), tmpfile, filename); #endif nrnignore = system(buf); unlink(tmpfile); } } #if defined(WIN32) || MAC void pwmimpl_redraw(Window* pw); #endif void PWMImpl::redraw(Window* pw) { // redraw the canvas so HocValEditor fields show up if (!pw->is_mapped()){ return; } Canvas* c = pw->canvas(); c->damage_all(); #if defined(WIN32) || MAC pwmimpl_redraw(pw); #else Requisition req; Allocation a; Coord xsize = c->width(); Coord ysize = c->height(); pw->glyph()->request(req); Coord ox = xsize*req.x_requirement().alignment(); Coord oy = ysize*req.y_requirement().alignment(); a.allot_x(Allotment(ox, xsize, ox/xsize)); a.allot_y(Allotment(oy, ysize, oy/ysize)); Transformer t1; c->push_transform(); c->transformer(t1); pw->glyph()->draw(c, a); c->pop_transform(); #endif } //ScreenItem ScreenItem::ScreenItem(PrintableWindow* w) { w_ = w; jw_ = NULL; label_ = NULL; pi_ = NULL; i_ = -1; group_obj_ = NULL; iconify_via_hide_ = false; } ScreenItem::ScreenItem(JavaWindow* w) { w_ = NULL; jw_ = w; label_ = NULL; pi_ = NULL; i_ = -1; group_obj_ = NULL; iconify_via_hide_ = false; } ScreenItem::~ScreenItem(){ // printf("~ScreenItem\n"); if (pi_) { pi_->si_ = NULL; if (pwm_impl) { pwm_impl->remove_paper(pi_); } Resource::unref(pi_); pi_ = NULL; } hoc_obj_unref(group_obj_); Resource::unref(label_); } void ScreenItem::relabel(GlyphIndex i) { char buf[10]; sprintf(buf, "%ld", i); i_ = i; Glyph* g = WidgetKit::instance()->label(buf); Resource::ref(g); Resource::unref(label_); label_ = g; } #if 0 void ScreenItem::reconfigured(Scene* s) { Coord l = w_->left_pw(); Coord r = l + w_->width_pw(); Coord b = w_->bottom_pw(); Coord t = b + w_->height_pw(); s->move(i, l/Scl, b/Scl); Coord x, y; s->location(i, x, y); #if DBG printf("reconfigured %d %d %g %g\n", i, s->showing(i), x, y); #endif if (w_->is_mapped()) { impl->w_->canvas()->damage_all(); } } #endif void ScreenItem::request(Requisition& req) const { Coord w, h; if (w_) { w = w_->width_pw()/Scl; h = w_->height_pw()/Scl; }else{ w = jw_->w()/Scl; h = jw_->h()/Scl; } Requirement rx(w+2); Requirement ry(h+2); req.require_x(rx); req.require_y(ry); #if DBG printf("ScreenItem::request %d\n", index()); #endif } void ScreenItem::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.set(c, a); MyMath::extend(ext, 1); #if DBG printf("ScreenItem::allocate %d\n", index()); #endif } void ScreenItem::draw(Canvas* c, const Allocation& a) const { #if DBG printf("ScreenItem::draw %d\n", i_); //print_alloc(c,"draw", a); #endif Coord x = a.x(); Coord y = a.y(); if (w_) { c->rect(x, y, x + (w_->width_pw())/Scl, y + (w_->height_pw())/Scl, pwm_impl->window_outline_, NULL); }else{ c->rect(x, y, x + (jw_->w())/Scl, y + (jw_->h())/Scl, pwm_impl->window_outline_, NULL); } label_->draw(c, a); } void ScreenItem::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { Coord x = h.left(); Coord y = h.bottom(); // if (x >= 0 && x <= w_->width_pw() && y >= 0 && y <= w_->height_pw()) { if (inside(x, y, a)) { h.target(depth, this, 0); if (h.event()->type() == Event::down) { if (Oc::helpmode()) { Oc::help(PWM_ScreenItem_); return; } switch (pwm_impl->tool(h.event()->pointer_button())) { case Event::left: h.target(depth, this, 0, new ScreenItemHandler( x, y, this, c->transformer() ) ); break; case Event:: right: if (w_) { pwm_impl->append_paper(this); } break; } #if DBG printf("ScreenItem::pick %d hit(%g,%g)\n", i_, x, y); print_alloc(NULL, "ScreenItem", a); #endif } } } //PaperItem PaperItem::PaperItem(ScreenItem* s) { scale_ = 1.; si_ = s; s->pi_ = this; ref(); } PaperItem::~PaperItem(){ // printf("~PaperItem\n"); if (si_) { si_->pi_ = NULL; } si_ = NULL; } Coord PaperItem::width() {return si_->w_->width_pw()/Scl;} Coord PaperItem::fsize_; void PaperItem::request(Requisition& req) const { Requirement rx(scale_ * si_->w_->width_pw()/Scl); Requirement ry(Math::max(fsize_, scale_ * si_->w_->height_pw()/Scl)); req.require_x(rx); req.require_y(ry); #if DBG printf("PaperItem::request %d\n", screen_item()->index()); #endif } void PaperItem::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.set(c, a); MyMath::extend(ext, 1); #if DBG printf("PaperItem::allocate %d\n", screen_item()->index()); #endif } void PaperItem::draw(Canvas* c, const Allocation& a) const { #if DBG printf("PaperItem::draw %d\n", si_->i_); #endif Coord x = a.x(); Coord y = a.y(); c->rect(x, y, x + scale_*(si_->w_->width_pw())/Scl, y + scale_*(si_->w_->height_pw())/Scl, pwm_impl->window_outline_, NULL); si_->label_->draw(c, a); } #if 0 void PaperItem::print(Printer* pr, const Allocation& a) const { Coord x = a.x(); Coord y = a.y(); pr->rect(x, y, x + scale_*(si_->w_->width_pw())/Scl, y + scale_*(si_->w_->height_pw())/Scl, blue, NULL); pr->push_transform(); Transformer t(scale_/Scl, 0, 0, scale_/Scl, 0, 0); Allocation b = a; pr->transform(t); si_->w_->glyph()->print(pr, a); pr->pop_transform(); } #endif void PaperItem::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { Coord x = h.left(); Coord y = h.bottom(); if (::inside(x, y, a)) { h.target(depth, this, 0); if (h.event()->type() == Event::down) { if (Oc::helpmode()) { Oc::help(PWM_PaperItem_); return; } switch (pwm_impl->tool(h.event()->pointer_button())) { case Event::left: h.target( depth, this, 0, new PaperItem_handler( PaperItem_handler::move, x, y, this, c->transformer() ) ); break; case Event::middle: h.target( depth, this, 0, new PaperItem_handler( PaperItem_handler::resize, x, y, this, c->transformer() ) ); break; case Event::right: pwm_impl->unshow_paper(this); break; } #if DBG printf("PaperItem::pick %d hit(%g, %g)\n", si_->i_, x, y); #endif } } } //PWMImpl PWMImpl::PWMImpl(ScreenScene* screen, PaperScene* paper, Rect* prect) { screen_ = screen; paper_ = paper; Resource::ref(screen); Resource::ref(paper); w_ = NULL; landscape_ = false; prect_ = prect; printer_ = "lp"; use_printer = true; printer_control_accept_ = true; b_printer_ = NULL; fc_print_ = NULL; fc_idraw_ = NULL; fc_ascii_ = NULL; fc_save_ = NULL; fc_retrieve_ = NULL; p_title_ = NULL; #if MACPRINT mprinter_ = NULL; #endif tool_ = Event::right; } PWMImpl::~PWMImpl() { // printf("~PWMImpl\n"); Resource::unref(screen_); screen_ = NULL; Resource::unref(paper_); paper_ = NULL; Resource::unref(b_printer_); Resource::unref(fc_print_); Resource::unref(fc_idraw_); Resource::unref(fc_ascii_); Resource::unref(fc_save_); Resource::unref(fc_retrieve_); Resource::unref(screen_rect_); #if MACPRINT if (mprinter_) { delete mprinter_; } #endif } #if MACPRINT MacPrinter* PWMImpl::mprinter() { if (!mprinter_) { mprinter_ = new MacPrinter(); } return mprinter_; } #endif #if carbon void PWMImpl::all2front() { int i; PrintableWindow* w; if (screen_) for (i=0; i < screen_->count(); ++i) { ScreenItem* si = (ScreenItem*)(screen_->component(i)); w = si->window(); if (w && w != w->leader() && w->is_mapped()) { ivoc_bring_to_top(w); } } } #endif void PWMImpl::map_all() { GlyphIndex i; PrintableWindow* pw = PrintableWindow::leader(); PrintableWindow* w; if (screen_) for (i=0; i < screen_->count(); i++) { ScreenItem* si = (ScreenItem*)(screen_->component(i)); w = si->window(); if (w) { if (w != pw) { if (si->iconify_via_hide_ == true) { w->map(); } }else{ // w->deiconify(); } }else{ si->jwindow()->map(); } } } void PWMImpl::unmap_all() { GlyphIndex i; PrintableWindow* pw = PrintableWindow::leader(); PrintableWindow* w; if (screen_) for (i=0; i < screen_->count(); i++) { ScreenItem* si = (ScreenItem*)(screen_->component(i)); w = si->window(); if (w) { if (w != pw) { if (screen_->showing(i)) { w->hide(); si->iconify_via_hide_ = true; }else{ si->iconify_via_hide_ = false; } }else{ w->iconify(); } }else{ si->jwindow()->hide(); } } } GlyphIndex PWMImpl::index(void* w) { GlyphIndex i; if (screen_) for (i=0; i < screen_->count(); i++) { ScreenItem* si = (ScreenItem*)screen_->component(i); if (w == (void*)si->window() || w == (void*)si->jwindow()) { return i; } } return -1; } void PWMImpl::relabel() { GlyphIndex i; for (i=0; i < screen_->count(); i++) { ((ScreenItem*)screen_->component(i))->relabel(i); } // if (w_) { // w_->canvas()->damage_all(); // }; } void PWMImpl::append_paper(ScreenItem* si) { PaperItem* pi = si->paper_item(); GlyphIndex i; if (pi) { i = paper_index(pi); paper_->show(i, true); }else{ pi = new PaperItem(si); pi->scale(.9); paper_->append(pi); i = paper_index(pi); Coord x = si->window()->left_pw()/Scl; Coord y = si->window()->bottom_pw()/Scl; x = (x < 0.) ? 0. : x; y = (y < 0.) ? 0. : y; x = (x > paper_->x2()*.8) ? paper_->x2()*.8 : x; y = (y > paper_->y2()*.8) ? paper_->y2()*.8 : y; paper_->move(i, x, y); } paper_->change(i); } void PWMImpl::unshow_paper(PaperItem* pi) { paper_->show(paper_index(pi), false); } void PWMImpl::remove_paper(PaperItem* pi) { GlyphIndex i = paper_index(pi); if (paper_ && i != -1) { paper_->remove(i); } } GlyphIndex PWMImpl::paper_index(PaperItem* pi) { GlyphIndex i; if (paper_) for (i=0; i < paper_->count(); i++) { if (pi == (PaperItem*)paper_->component(i)) { return i; } } return -1; } float PWMImpl::round(float x) { return Math::round(x/round_factor_) * round_factor_; } #if MACPRINT void PWMImpl::paperscale() { mprinter()->setup(); Coord w, h, x; w = mprinter()->width()/72.; x = h = mprinter()->height()/72.; if (w > h) { x = w; } x = x/canvasheight_; prect_->width(w/pr_scl); prect_->height(h/pr_scl); pview_->box_size(-.2, -.2, prect_->width() + .2, prect_->height() + .2); paper_->damage_all(); } #endif void PWMImpl::landscape() { if (Oc::helpmode()) { Oc::help(PWM_landscape_); } Coord w, h; w = prect_->width(); h = prect_->height(); prect_->width(h); prect_->height(w); paper_->damage_all(); landscape_ = !landscape_; } void PWMImpl::landscape(bool b) { if (landscape_ != b) { landscape(); } } void PWMImpl::deco(int i) { p_title_->set(TelltaleState::is_chosen, false); p_deco_->set(TelltaleState::is_chosen, false); if (i == 1) { p_title_->set(TelltaleState::is_chosen, true); }else if (i == 2) { p_deco_->set(TelltaleState::is_chosen, true); } } void PWMImpl::virt_screen() { if (Oc::helpmode()) { Oc::help(PWM_virt_screen_); return; } VirtualWindow::makeVirtualWindow(); } //grabbed from unidraw dialogs.c static const char* DefaultPrintCmd () { #ifdef WIN32 Style* style = Session::instance()->style(); static String str; if (style->find_attribute("printer_command", str)) { ; }else{ str = " > prn"; } return str.string(); #else static char buf[200]; static const char* print_cmd = getenv("PRINT_CMD"); if (print_cmd == NULL) { const char* printer_name = getenv("PRINTER"); if (printer_name == NULL) { sprintf(buf, "lpr"); }else{ sprintf(buf, "lpr -P%s", printer_name); } print_cmd = buf; } return print_cmd; #endif } void PWMImpl::printer_control() { if (Oc::helpmode()) { Oc::help(PWM_printer_control_); } if (!b_printer_) { Style* style = new Style(Session::instance()->style()); style->attribute("caption", "Postscript Printer Command"); b_printer_ = FieldDialog::field_dialog_instance( DefaultPrintCmd(), style); b_printer_->ref(); } use_printer = true; bool b; if (w_ && w_->is_mapped()) { b = b_printer_->post_for(w_); }else{ b = b_printer_->post_at(300, 500); } if (b) { printer_control_accept_ = true; }else{ printer_control_accept_ = false; } } void PWMImpl::quit_control() { if (Oc::helpmode()) { Oc::help(PWM_quit_); return; } if (boolean_dialog("Quit. Are you sure?", "Yes", "No", w_)) { Oc oc; oc.run("quit()\n"); } } #if SNAPSHOT void PWMImpl::snapshot_control() { if (file_control1()) { ivoc_snapshot_ = ivoc_snapshot; } } #endif bool PWMImpl::file_control1() { if (Oc::helpmode()) { Oc::help(PWM_file_control_); } if (!fc_print_) { Style* style = new Style(Session::instance()->style()); String str; if (style->find_attribute("pwm_print_file_filter", str)) { style->attribute("filter", "true"); style->attribute("filterPattern", str); } style->attribute("caption", "Print Postscript to file"); style->attribute("open", "Print to file"); fc_print_ = DialogKit::instance()->file_chooser("./", style); fc_print_->ref(); }else{ fc_print_->reread(); } while (fc_print_->post_for(w_)) { if (ok_to_write(*fc_print_->selected(), w_)) { return true; } } return false; } void PWMImpl::file_control() { if (none_selected("No windows to save", "Save Anyway")) { return; } if (file_control1()) { use_printer = false; do_print0(); use_printer = true; } } #if SNAPSHOT void PWMImpl::snapshot(const Event* e) { snap_event_ = e; filebuf obuf; obuf.open(fc_print_->selected()->string(), IOS_OUT); ostream o(&obuf); Printer* pr = new Printer(&o); pr->prolog(); pr->resize(0,0,1200, 1000); Window* w = e->window(); snap_owned(pr, w); // for (w = e->window(); w; w = snap_owned(w)) { // snap(pr, w); // } snap_cursor(pr, e); pr->epilog(); obuf.close(); delete pr; } void PWMImpl::snap(Printer* pr, Window* w) { Transformer t; t.translate(w->left(), w->bottom()); Requisition req; Glyph* g = w->Window::glyph(); g->request(req); float align_x = req.x_requirement().alignment(); float align_y = req.y_requirement().alignment(); Allotment ax(align_x*w->width(), w->width(), align_x); Allotment ay(align_y*w->width(), w->height(), align_y); Allocation a; a.allot_x(ax); a.allot_y(ay); //printf("left=%g right=%g top=%g bottom=%g\n", a.left(), a.right(), a.top(), a.bottom()); t.translate(a.left(), -a.bottom()); Style* s = w->style(); String str; bool pd = false; if (s && s->find_attribute("name", str)) { pd = true; pr->comment(str.string()); } char buf[256]; if (pd) { sprintf(buf, "BoundingBox: %g %g %g %g", w->left() - 3, w->bottom() - 3, w->left() + w->width() + 3, w->bottom() + w->height() + 20 + 3); pr->comment(buf); sprintf(buf, "\\begin{picture}(%g, %g)", w->width() + 6, w->height() + 23); pr->comment(buf); }else{ sprintf(buf, "BoundingBox: %g %g %g %g", w->left(), w->bottom(), w->left() + w->width(), w->bottom() + w->height()); pr->comment(buf); sprintf(buf, "\\begin{picture}(%g, %g)", w->width(), w->height()); pr->comment(buf); } pr->push_transform(); pr->transform(t); g->print(pr, a); if (pd) { print_deco(pr, a, str.string()); } g->undraw(); pr->pop_transform(); // at this point cursor will be below any pop up windows so must be done last // if (w == snap_event_->window()) { // snap_cursor(pr, snap_event_); // } pr->comment("End BoundingBox"); } void PWMImpl::snap_cursor(Printer* pr, const Event* e) { Rubberband* rb = Rubberband::current(); if (rb && rb->canvas()->window() == e->window()) { pr->comment("Begin Rubberband"); Transformer t1; t1.translate(e->window()->left(), e->window()->bottom()); pr->push_transform(); pr->transform(t1); rb->snapshot(pr); pr->pop_transform(); pr->comment("End Rubberband"); } Coord x, y; x = e->pointer_x(); y = e->pointer_y(); Transformer t; t.rotate(30); t.translate(e->window()->left(), e->window()->bottom()); t.translate(x, y); pr->comment("Begin cursor"); pr->push_transform(); pr->transform(t); pr->new_path(); pr->move_to(0, 0); pr->line_to(8, -14); pr->line_to(2, -12); pr->line_to(2, -20); pr->line_to(-2, -20); pr->line_to(-2, -12); pr->line_to(-8, -14); pr->close_path(); pr->fill(WidgetKit::instance()->foreground()); pr->stroke(WidgetKit::instance()->background(), Appear::default_brush()); pr->pop_transform(); pr->comment("End cursor"); } #endif void PWMImpl::idraw_control() { if (Oc::helpmode()) { Oc::help(PWM_idraw_control_); } if (!fc_idraw_) { Style* style = new Style(Session::instance()->style()); String str; if (style->find_attribute("pwm_idraw_file_filter", str)) { style->attribute("filter", "true"); style->attribute("filterPattern", str); } style->attribute("caption", "Idraw format to file"); style->attribute("open", "Write to file"); fc_idraw_ = DialogKit::instance()->file_chooser("./", style); fc_idraw_->ref(); }else{ fc_idraw_->reread(); } if (none_selected("No windows to save", "Save Anyway")) { return; } while (fc_idraw_->post_for(w_)) { if (ok_to_write(*fc_idraw_->selected(), w_)) { idraw_write(fc_idraw_->selected()->string()); break; } } } void PWMImpl::idraw_write(const char* fname, bool ses_style) { #ifdef WIN32 unlink(fname); #endif filebuf obuf; obuf.open(fname, IOS_OUT); ostream o(&obuf); OcIdraw::idraw_stream = &o; OcIdraw::prologue(); Scene* p = paper(); GlyphIndex count = p->count(); if (ses_style) { for (GlyphIndex i = 0; i < screen()->count(); ++i) { ScreenItem* pi = (ScreenItem*)screen()->component(i); redraw(pi->window()); } }else{ for (GlyphIndex i = 0; i < count; ++i) { if (!p->showing(i)) { continue; } PaperItem* pi = (PaperItem*)p->component(i); redraw(pi->screen_item()->window()); } } OcIdraw::epilog(); obuf.close(); OcIdraw::idraw_stream = NULL; } void PWMImpl::ascii_control() { if (Oc::helpmode()) { Oc::help(PWM_ascii_); } if (!fc_ascii_) { Style* style = new Style(Session::instance()->style()); String str; if (style->find_attribute("pwm_ascii_file_filter", str)) { style->attribute("filter", "true"); style->attribute("filterPattern", str); } style->attribute("caption", "Ascii format to file"); style->attribute("open", "Write to file"); fc_ascii_ = DialogKit::instance()->file_chooser("./", style); fc_ascii_->ref(); }else{ fc_ascii_->reread(); } if (none_selected("No windows to save", "Save Anyway")) { return; } while (fc_ascii_->post_for(w_)) { if (ok_to_write(*fc_ascii_->selected(), w_)) { ascii_write(fc_ascii_->selected()->string()); break; } } } void PWMImpl::ascii_write(const char* fname, bool ses_style) { filebuf obuf; #ifdef WIN32 unlink(fname); #endif obuf.open(fname, IOS_OUT); ostream o(&obuf); Graph::ascii(&o); Scene* p = paper(); GlyphIndex count = p->count(); if (ses_style) { for (GlyphIndex i = 0; i < screen()->count(); ++i) { ScreenItem* pi = (ScreenItem*)screen()->component(i); redraw(pi->window()); } }else{ for (GlyphIndex i = 0; i < count; ++i) { if (!p->showing(i) && !ses_style) { continue; } PaperItem* pi = (PaperItem*)p->component(i); redraw(pi->screen_item()->window()); } } obuf.close(); Graph::ascii(NULL); } ostream* Oc::save_stream; void PWMImpl::save_selected_control() { save_control(1); } void PWMImpl::save_all_control() { save_control(2); } bool PWMImpl::none_selected(const char* title, const char* accept)const{ int i, n=0; if (paper_) for (i=0; i < paper_->count(); ++i) { if (paper_->showing(i)) { ++n; } } if (n == 0) { if (!boolean_dialog(title, accept, "Cancel", w_)) { return true; } } return false; } void PWMImpl::save_control(int mode) { if (Oc::helpmode()) { if (mode == 2) { Oc::help(PWM_save_control2_); }else{ Oc::help(PWM_save_control1_); } } if (!fc_save_) { if (mode == 1) { if (none_selected("No windows to save", "Save Anyway")) { return; } } Style* style = new Style(Session::instance()->style()); String str; if (style->find_attribute("pwm_save_file_filter", str)) { style->attribute("filter", "true"); style->attribute("filterPattern", str); } style->attribute("caption", "Save windows on paper icon to file"); style->attribute("open", "Save to file"); fc_save_ = DialogKit::instance()->file_chooser("./", style); fc_save_->ref(); }else{ fc_save_->reread(); } while (fc_save_->post_for(w_)) { if (ok_to_write(*fc_save_->selected(), w_)) { save_session(mode, fc_save_->selected()->string()); break; } } } int PWMImpl::save_group(Object* ho, const char* filename) { int i; ScreenItem* si; ScreenItem** sivec = NULL; int nwin = 0; if (screen_ && screen_->count()) { sivec = new ScreenItem*[screen_->count()]; for (i=0; i < screen_->count(); i++) { si = (ScreenItem*)(screen_->component(i)); if (si->group_obj_ == ho) { sivec[nwin++] = si; } } } if (nwin > 0) { cur_ses_name_ = filename; filebuf obuf; #ifdef WIN32 unlink(filename); #endif obuf.open(filename, IOS_OUT); ostream o(&obuf); save_begin(o); save_list(nwin, sivec, o); obuf.close(); } if (sivec) { delete [] sivec; } return nwin; } void PWMImpl::save_session(int mode, const char* filename, const char* head) { int nwin = 0; ScreenItem* si; ScreenItem** sivec = NULL; filebuf obuf; cur_ses_name_ = filename; #ifdef WIN32 unlink(filename); #endif obuf.open(filename, IOS_OUT); if (!obuf.is_open()) { hoc_execerror(filename, "is not open for writing"); } ostream o(&obuf); if (head) { o << head << endl; } save_begin(o); PrintableWindow* w; GlyphIndex i; if (mode == 2) { if (screen_ && screen_->count()) { sivec = new ScreenItem*[screen_->count()]; for (i=0; i < screen_->count(); i++) { si = (ScreenItem*)(screen_->component(i)); w = si->window(); if (w) { if (/*w->is_mapped() &&*/ w != PrintableWindow::leader()) { if (w_ != w) { sivec[nwin++] = si; }else{ char buf[100]; sprintf(buf,"{pwman_place(%d,%d,%d)}\n", w->xleft(), w->xtop(), w->is_mapped() ? 1 : 0); o << buf; } } }else if (si->jwindow()){ sivec[nwin++] = si; } } } }else{ if (paper_ && paper_->count()) { sivec = new ScreenItem*[paper_->count()]; for (i=0; i < paper_->count(); i++) { if (paper_->showing(i)) { si = ((PaperItem*)(paper_->component(i)))->screen_item(); w = si->window(); if (w) { if (w_ != w) { sivec[nwin++] = si; }else{ char buf[100]; sprintf(buf,"{pwman_place(%d,%d)}\n", w->xleft(), w->xtop()); o << buf; } }else if (si->jwindow()){ sivec[nwin++] = si; } } } } } save_list(nwin, sivec, o); //sivec deleted here obuf.close(); if (sivec) { delete [] sivec; } } void PWMImpl::save_begin(ostream& o) { Oc::save_stream = &o; Scene::save_all(o); HocPanel::save_all(o); o << "objectvar ocbox_, ocbox_list_, scene_, scene_list_" << endl; o << "{ocbox_list_ = new List() scene_list_ = new List()}" << endl; } void PWMImpl::save_list(int nwin, ScreenItem** sivec, ostream& o) { // save highest first, only a few priorities OcGlyph* ocg; int i, pri, max, working; ses_group_first_ = 1; //printf("will save %d windows\n", nwin); for (working = 10000; working >= 0; working = max) { //printf("working = %d\n", working); max = -1; for (i=0; i < nwin; ++i) { if (sivec[i]->window()) { ocg = (OcGlyph*)sivec[i]->window()->glyph(); pri = ocg->session_priority(); }else{ pri = sivec[i]->jwindow()->priority(); } if (pri == working) { //printf("saving item %d with priority %d\n", i, pri); if (sivec[i]->window()) { ocg->save(o); }else{ sivec[i]->jwindow()->save_session(cur_ses_name_.string(), o); } ses_group(sivec[i], o); } if (pri < working && pri > max) { max = pri; } } } Oc::save_stream = NULL; o << "objectvar scene_vector_[1]\n{doNotify()}" << endl; } void PWMImpl::ses_group(ScreenItem* si, ostream& o) { char buf[512]; char* name; if (si->group_obj_) { name = Oc2IV::object_str("name", si->group_obj_); sprintf(buf, "{WindowMenu[0].ses_gid(%d, %d, %d, \"%s\")}\n", ses_group_first_, si->group_obj_->index, (screen()->showing(si->index()) ? 1 : 0), name); o << buf; ses_group_first_ = 0; } } void PWMImpl::retrieve_control() { if (Oc::helpmode()) { Oc::help(PWM_retrieve_control_); } if (!fc_retrieve_) { Style* style = new Style(Session::instance()->style()); String str; if (style->find_attribute("pwm_save_file_filter", str)) { style->attribute("filter", "true"); style->attribute("filterPattern", str); } style->attribute("caption", "Retrieve windows from file"); style->attribute("open", "Retrieve from file"); fc_retrieve_ = DialogKit::instance()->file_chooser("./", style); fc_retrieve_->ref(); }else{ fc_retrieve_->reread(); } while (fc_retrieve_->post_for(w_)) { if (ok_to_read(*fc_retrieve_->selected(), w_)) { Oc oc; char buf[256]; sprintf(buf, "{load_file(1, \"%s\")}\n", fc_retrieve_->selected()->string()); if( ! oc.run(buf)) { break; } } } } class OcLabelGlyph : public OcGlyph { public: OcLabelGlyph(const char*, OcGlyph*, Glyph*); virtual ~OcLabelGlyph(); virtual void save(ostream&); private: CopyString label_; OcGlyph* og_; }; OcLabelGlyph::OcLabelGlyph(const char* label, OcGlyph* og, Glyph* g){ label_ = label; og_ = og; og_->parents(true); Resource::ref(og_); body(g); } OcLabelGlyph::~OcLabelGlyph(){ og_->parents(false); Resource::unref(og_); } void OcLabelGlyph::save(ostream& o){ char buf[256]; o << "{xpanel(\"\")" << endl; sprintf(buf, "xlabel(\"%s\")", label_.string()); o << buf << endl; o << "xpanel()}" << endl; og_->save(o); } /*static*/ class TrayDismiss : public WinDismiss { public: TrayDismiss(DismissableWindow*); virtual ~TrayDismiss(); virtual void execute(); }; class OcTray : public OcBox { public: OcTray(GlyphIndex cnt); virtual ~OcTray(); virtual PrintableWindow* make_window(Coord = -1, Coord = -1, Coord = -1, Coord = -1); virtual void start_vbox(); virtual void win(PrintableWindow*); virtual void dissolve(Coord, Coord); private: PolyGlyph* pg_; OcBox* v_; float* x_, *y_; }; TrayDismiss::TrayDismiss(DismissableWindow* w) : WinDismiss(w) {} TrayDismiss::~TrayDismiss() {} void TrayDismiss::execute() { if (boolean_dialog("Dismiss or Dissolve into components?", "Dissolve", "Dismiss", win_)) { OcTray* t = (OcTray*)win_->glyph(); t->dissolve(win_->left(), win_->bottom()); } WinDismiss::execute(); } OcTray::OcTray(GlyphIndex cnt) : OcBox(OcBox::H) { x_ = new float[cnt]; y_ = new float[cnt]; pg_ = new PolyGlyph(); pg_->ref(); v_ = NULL; } OcTray::~OcTray() { pg_->unref(); delete [] x_; delete [] y_; } void OcTray::dissolve(Coord left, Coord bottom) { Window* w; Coord l, b; OcGlyph* g; Requisition req; GlyphIndex i, cnt = pg_->count(); for (i=0; i < cnt; ++i) { l = left; b = bottom; g = (OcGlyph*)pg_->component(i); g->request(req); w = g->make_window( l + x_[i] - x_[0], b + y_[i] - y_[0], req.x_requirement().natural(), req.y_requirement().natural() ); w->map(); } } void OcTray::start_vbox() { v_ = new OcBox(OcBox::V); box_append(v_); } void OcTray::win(PrintableWindow* w) { LayoutKit* lk = LayoutKit::instance(); WidgetKit* wk = WidgetKit::instance(); wk->begin_style("_tray_panel"); GlyphIndex n = pg_->count(); pg_->append(w->glyph()); x_[n] = w->left(); y_[n] = w->bottom(); v_->box_append (new OcLabelGlyph( w->name(), (OcGlyph*)w->glyph(), lk->vbox( wk->label(w->name()), lk->fixed(w->glyph(), w->width(), w->height()) ) )); wk->end_style(); } PrintableWindow* OcTray::make_window(Coord left, Coord bottom, Coord width, Coord height) { PrintableWindow* w = OcGlyph::make_window(left, bottom, width, height); w->replace_dismiss_action(new TrayDismiss(w)); w->type("Tray"); w->name("Tray"); return w; } void PWMImpl::tray() { if (Oc::helpmode()) { Oc::help(PWM_tray_); return; } GlyphIndex count; count = paper_->count(); // don't make a tray containing the main manager // build hbox(vbox) of the individual panels long index; Coord minleft = -1000; Coord top = -1000.; OcTray* tray = new OcTray(count); while ( (index = upper_left()) != -1) { PaperItem* pi = (PaperItem*)paper_->component(index); PrintableWindow* w = pi->screen_item()->window(); Coord l,b; l = w->left(); b = w->bottom(); if (minleft < l) { tray->start_vbox(); minleft = l + w->width()/2.; } if (top < 0) { top = b + w->height(); } tray->win(w); paper_->show(index, false); w->dismiss(); } Window* w = tray->make_window(); w->map(); } GlyphIndex PWMImpl::upper_left() { GlyphIndex index = -1; Coord minleft = 1e10; Coord maxbottom = -1e10; GlyphIndex count = paper_->count(); for (GlyphIndex i = 0; i < count; ++i) { PaperItem* pi = (PaperItem*)paper_->component(i); PrintableWindow* w = pi->screen_item()->window(); Coord l, b; if (!paper_->showing(i)) continue; if (w == pwm_impl->w_) { continue; } // paper_->location(i, l, b); // l *= Scl; // b *= Scl; l = w->left(); b = w->bottom(); if (l < minleft - 50.) { index = i; minleft = l; maxbottom = b; }else if (l < minleft + 50.) { if (maxbottom < b) { index = i; minleft = l; maxbottom = b; } } } return index; } #if 0 void PWMImpl::dissolve() { for (long i = 0; i < panelList_.count(); i++) { new HocWin(panelList_.item(i)); } dismiss(); } #endif #if SNAPSHOT bool ivoc_snapshot(const Event* e) { char buf[4]; e->mapkey(buf, 1); if (buf[0] == 'p') { ivoc_snapshot_ = NULL; PWMImpl* p = PrintableWindowManager::current()->pwmi_; p->snapshot(e); return true; } return false; } #if 1 #include #include #include #include declareTable(WindowTable,XWindow,Window*) Window* PWMImpl::snap_owned(Printer* pr, Window* wp) { WindowTable* wt = Session::instance()->default_display()->rep()->wtable_; for (TableIterator(WindowTable) i(*wt); i.more(); i.next()) { Window* w = i.cur_value(); if (w->is_mapped()) { snap(pr, w); } } return NULL; } #endif #endif //SNAPSHOT JavaWindow::JavaWindow(const char* s, Object* o) { //printf("JavaWindow %s %s\n", s, hoc_object_name(o)); title = new char[strlen(s) + 1]; strcpy(title, s); is_mapped = false; pl = pt = 0; pw = ph = 100; ho = o; closing_ = false; reffing_ = false; ref(); } JavaWindow::~JavaWindow() { //printf("~JavaWindow\n"); delete [] title; unref(); } void (*nrnjava_pwm_setwin)(void*, int, int, int); Coord JavaWindow::l() { return Session::instance()->default_display()->to_coord(pl); } Coord JavaWindow::b() { Display* d = Session::instance()->default_display(); return d->to_coord(d->pheight() - (pt + ph)); } Coord JavaWindow::w() { return Session::instance()->default_display()->to_coord(pw); } Coord JavaWindow::h() { return Session::instance()->default_display()->to_coord(ph); } void JavaWindow::map() { (*nrnjava_pwm_setwin)(this, 1, 0, 0); } void JavaWindow::hide() { (*nrnjava_pwm_setwin)(this, 2, 0, 0); } void JavaWindow::move(Coord x, Coord y) { Display* d = Session::instance()->default_display(); int left = d->to_pixels(x); int top = d->pheight() - d->to_pixels(y) - ph; (*nrnjava_pwm_setwin)(this, 3, left, top); } void JavaWindow::pmove(int l, int t) { (*nrnjava_pwm_setwin)(this, 3, l, t); } void JavaWindow::presize(int w, int h) { (*nrnjava_pwm_setwin)(this, 4, w, h); } void JavaWindow::ref() { if (!reffing_) { //printf("JavaWindow ref %s\n", hoc_object_name(ho)); hoc_obj_ref(ho); reffing_ = true; } } void JavaWindow::unref() { if (reffing_) { //printf("JavaWindow unref %s\n", hoc_object_name(ho)); hoc_obj_unref(ho); reffing_ = false; } } int JavaWindow::priority() { // check for save_session method Symbol* s = NULL; if (ho) { s = hoc_table_lookup("hocSessionPriority", ho->ctemplate->symtable); } int i = 1; if (s) { i = (int)((*p_java2nrn_dmeth)(ho, s)); } //printf("%s priority %d\n", hoc_object_name(ho), i); return i; } void JavaWindow::save_session(const char* fname, ostream& o) { // minimum save is, if ho is not NULL, to // load_java and create an object ocbox_ with the noarg constructor, // which is then unreffed. // after creation and before move/resize/hide and // unreffing, if the hoc_save_session // method exists, that is called with the session file name. if (!ho ) { return; } char buf[256]; o << "/*Begin " << title << " */\n"; sprintf(buf, "{load_java(\"%s\", \"%s\")}\n", (*p_java2nrn_classname)(ho), ho->ctemplate->sym->name); o << buf; sprintf(buf, "ocbox_ = new %s()\n", ho->ctemplate->sym->name); o << buf; // check for save_session method Symbol* s = hoc_table_lookup("hocSessionSave", ho->ctemplate->symtable); if (s) { // arguments are the session file name char* b2 = new char[strlen(fname)+1]; strcpy(b2, fname); hoc_pushstr(&b2); char** cpp = (*p_java2nrn_smeth)(ho, s); hoc_strpop(); delete [] b2; //printf("%s.hocSessionSave(\"%s\") returned |%s|\n", hoc_object_name(ho), fname, *cpp); o << *cpp; } sprintf(buf, "{PWManager[0].jwindow(ocbox_, %d, %d, %d, %d, %d)}\n", is_mapped?1:0, pl, pt, pw, ph); o << buf; o << "objref ocbox_\n"; o << "/*End " << title << " */\n"; } void* nrnjava_pwm_listen(const char* s, Object* ho) { JavaWindow* jw = new JavaWindow(s, ho); PrintableWindowManager::current()->append(jw); return jw; } // see src/nrnjava/PWMListener.java for the types void nrnjava_pwm_event(size_t ic, int type, int l, int t, int w, int h) { JavaWindow* jw = (JavaWindow*)ic; PrintableWindowManager* pwm = PrintableWindowManager::current(); if (type >= 3 && type <= 6) { jw->pl = l; jw->pt = t; jw->pw = w; jw->ph = h; } switch(type) { case 1: // windowClosing //printf("windowClosing\n"); jw->closing_ = true; break; case 2: // windowIconified //printf("windowIconified\n"); jw->is_mapped = false; pwm->reconfigured(jw); jw->hide(); break; case 3: // componentHidden //printf("componentHidden\n"); if (jw->closing_) { jw->unref(); pwm->remove(jw); delete jw; }else{ jw->is_mapped = false; pwm->reconfigured(jw); } break; case 4: // componentMoved case 5: // componentResized jw->is_mapped = true; pwm->reconfigured(jw); break; case 6: // componentShown //printf("componentShown\n"); jw->is_mapped = true; pwm->reconfigured(jw); jw->ref(); break; } } #else #include #include #include #include #include #include "oc2iv.h" #endif //HAVE_IV char* ivoc_get_temp_file() { char* tmpfile; #if MAC && !defined(carbon) FSSpec spec; tmpfile = new char[512]; __temp_file_name(tmpfile, &spec); #else const char* tdir = getenv("TEMP"); if (!tdir) { tdir = "/tmp"; } #if defined(WIN32) && defined(__MWERKS__) char tname[L_tmpnam+1]; tmpnam(tname); tmpfile = new char[strlen(tdir) + 1 + strlen(tname) + 1]; sprintf(tmpfile, "%s/%s", tdir, tname); #else tmpfile = new char[strlen(tdir) + 1 + 9 + 1]; sprintf(tmpfile, "%s/nrnXXXXXX", tdir); #if HAVE_MKSTEMP int fd; if ((fd = mkstemp(tmpfile)) == -1) { hoc_execerror("Could not create temporary file:", tmpfile); } close(fd); #else mktemp(tmpfile); #endif #endif #if defined(WIN32) tmpfile = hoc_back2forward(tmpfile); #endif #endif return tmpfile; } neuron-7.5/src/ivoc/random1.h000077500000000000000000000005771323325274500161560ustar00rootroot00000000000000#ifndef random1_h #define random1_h #include "RNG.h" #include "Random.h" struct Object; class Rand { public: Rand(unsigned long seed = 0, int size = 55, Object* obj = NULL); ~Rand(); RNG *gen; Random *rand; int type_; // can do special things with some kinds of RNG // double* looks like random variable that gets changed on every fadvance Object* obj_; }; #endif neuron-7.5/src/ivoc/rect.cpp000066400000000000000000000173001323325274500160720ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include #include #include "scenevie.h" #include "rect.h" #include "mymath.h" #include "idraw.h" #include Appear::Appear(const Color* c, const Brush* b) { color_ = NULL; brush_ = NULL; color(c); brush(b); } Appear::~Appear() { Resource::unref(color_); Resource::unref(brush_); } void Appear::color(const Color* c) { const Color* c1; if (c) { c1 = c; }else{ c1 = default_color(); } Resource::ref(c1); Resource::unref(color_); color_ = c1; } void Appear::brush(const Brush* b) { const Brush* b1; if (b) { b1 = b; }else{ b1 = default_brush(); } Resource::ref(b1); Resource::unref(brush_); brush_ = b1; } const Color* Appear::dc_; const Brush* Appear::db_; const Color* Appear::default_color() { return Scene::default_foreground(); } const Brush* Appear::default_brush() { if (!db_) { Style* s = Session::instance()->style(); Coord b = 0; s->find_attribute("default_brush", b); db_ = new Brush(b); Resource::ref(db_); } return db_; } //Rect Rect::Rect(Coord l, Coord b, Coord w, Coord h, const Color* c, const Brush* br) : Appear(c, br) { left(l); bottom(b); width(w); height(h); } void Rect::request(Requisition& req) const { Requirement rx(width(), 0, 0, left()/width()); Requirement ry(height(), 0, 0, bottom()/height()); req.require_x(rx); req.require_y(ry); } void Rect::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.set(c, a); MyMath::extend(ext, 1); } void Rect::draw(Canvas* c, const Allocation& a) const { Coord x = a.x(); Coord y = a.y(); c->rect(x + left(), y+ bottom(), x + right(), y + top(), color(), brush()); } void Rect::pick(Canvas*, const Allocation&, int depth, Hit& h) { Coord x = h.left(); Coord y = h.bottom(); if (MyMath::inside(x, y, left(), right(), bottom(), top())) { h.target(depth, this, 0); } } //Line Line::Line(Coord dx, Coord dy, const Color* c, const Brush* b) : Appear(c, b) { dx_ = dx; dy_ = dy; x_ = 0; y_ = 0; } Line::Line(Coord dx, Coord dy, float xa, float ya, const Color* c, const Brush* b) : Appear(c, b) { dx_ = dx; dy_ = dy; x_ = -dx_*xa; y_ = -dy_*ya; } Line::~Line(){} void Line::request(Requisition& req) const { Coord dx, dy; dx = (dx_)?dx_:1e-5; dy = (dy_)?dy_:1e-5; Requirement rx(dx, 0, 0, x_/dx); Requirement ry(dy, 0, 0, y_/dy); req.require_x(rx); req.require_y(ry); } void Line::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.set(c, a); MyMath::extend(ext, brush()->width()/2 + 1); } #if 0 void Line::draw(Canvas* c, const Allocation& a) const { Coord x = a.x() + x_; Coord y = a.y() + y_; //printf("line %g %g %g %g\n", x, y, dx_, dy_); c->line(x, y, x + dx_, y + dy_, color(), brush()); IfIdraw(line(c, x, y, x + dx_, y + dy_, color(), brush())); } #else void Line::draw(Canvas* c, const Allocation& a) const { Coord x = a.x() + x_; Coord y = a.y() + y_; //printf("line %g %g %g %g\n", x, y, dx_, dy_); c->new_path(); c->move_to(x, y); c->line_to(x+dx_,y+dy_); // transform the line to get thickness right on printer XYView::current_draw_view()->stroke(c, color(), brush()); IfIdraw(line(c, x, y, x + dx_, y + dy_, color(), brush())); } #endif void Line::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { Coord l=a.x() + x_, b=a.y() + y_, r=a.x()+ x_ + dx_, t=a.y()+ y_ + dy_; Coord x = h.left(); Coord y = h.bottom(); if (MyMath::inside(x,y,l,b,r,t)) { float epsilon = 5; const Transformer& tr = c->transformer(); tr.transform(x,y); tr.transform(l,b); tr.transform(r,t); if (MyMath::near_line(x, y, l, b, r, t, epsilon)) { h.target(depth, this, 0); } } } //Circle Circle::Circle(float radius, bool filled, const Color* c, const Brush* b) :Appear(c, b) { radius_ = radius; filled_ = filled; } Circle::~Circle() {} void Circle::request(Requisition& req) const { Coord w = brush()->width(); Coord diameter = radius_ + radius_ + w + w; Requirement rx(diameter, 0, 0, 0.5); Requirement ry(diameter, 0, 0, 0.5); req.require(Dimension_X, rx); req.require(Dimension_Y, ry); } void Circle::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.merge(c, a); MyMath::extend(ext, brush()->width()/2 + 1); } void Circle::draw(Canvas* c, const Allocation& a) const { const Coord r = radius_, x = a.x(), y = a.y(); const Coord p0 = 1.00000000 * r; const Coord p1 = 0.89657547 * r; // cos 30 * sqrt(1 + tan 15 * tan 15) const Coord p2 = 0.70710678 * r; // cos 45 const Coord p3 = 0.51763809 * r; // cos 60 * sqrt(1 + tan 15 * tan 15) const Coord p4 = 0.26794919 * r; // tan 15 c->new_path(); c->move_to(x+p0, y); c->curve_to(x+p2, y+p2, x+p0, y+p4, x+p1, y+p3); c->curve_to(x, y+p0, x+p3, y+p1, x+p4, y+p0); c->curve_to(x-p2, y+p2, x-p4, y+p0, x-p3, y+p1); c->curve_to(x-p0, y, x-p1, y + p3, x-p0, y+p4); c->curve_to(x-p2, y-p2, x-p0, y-p4, x-p1, y-p3); c->curve_to(x, y-p0, x-p3, y-p1, x-p4, y-p0); c->curve_to(x+p2, y-p2, x+p4, y-p0, x+p3, y-p1); c->curve_to(x+p0, y, x+p1, y-p3, x+p0, y-p4); c->close_path(); if (filled_) { c->fill(color()); }else{ c->stroke(color(), brush()); } IfIdraw(ellipse(c, x, y, r, r, color(), brush(), filled_)); } //Rectangle Rectangle::Rectangle(float height, float width, bool filled, const Color* c, const Brush* b) :Appear(c, b) { height_ = height; width_ = width; filled_ = filled; } Rectangle::~Rectangle() {} void Rectangle::request(Requisition& req) const { Coord w = brush()->width(); Requirement rx(width_ + w + w, 0, 0, 0.5); Requirement ry(height_ + w + w, 0, 0, 0.5); req.require(Dimension_X, rx); req.require(Dimension_Y, ry); } void Rectangle::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.merge(c, a); MyMath::extend(ext, brush()->width()/2 + 1); } void Rectangle::draw(Canvas* c, const Allocation& a) const { const Coord dx = width_/2, dy = height_/2, x = a.x(), y = a.y(); if (filled_) { c->fill_rect(x-dx,y-dy,x+dx,y+dy,color()); } else { c->rect(x-dx,y-dy,x+dx,y+dy,color(),brush()); } IfIdraw(rect(c, x-dx, y-dy, x+dx, y+dy, color(), brush(), filled_)); } //Triangle Triangle::Triangle(float side, bool filled, const Color* c, const Brush* b) :Appear(c, b) { side_ = side/2; filled_ = filled; } Triangle::~Triangle() {} void Triangle::request(Requisition& req) const { Coord w = brush()->width(); Requirement rx(side_ + side_+ w + w, 0, 0, 0.5); Requirement ry((side_ + side_)*1.1547 + w + w, 0, 0, 0.5); req.require(Dimension_X, rx); req.require(Dimension_Y, ry); } void Triangle::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.merge(c, a); MyMath::extend(ext, brush()->width()/2 + 1); } void Triangle::draw(Canvas* c, const Allocation& a) const { const Coord x = a.x(), y = a.y(); const Coord radius = 1.1547*side_; c->new_path(); c->move_to(x, y+radius); c->line_to(x+side_, y-radius); c->line_to(x-side_, y-radius); c->close_path(); if (filled_) { c->fill(color()); } else { c->stroke(color(),brush()); } Coord *xList = new Coord[4]; Coord *yList = new Coord[4]; xList[0] = x; xList[1] = x+side_; xList[2] = x-side_; xList[3] = x; yList[0] = y+radius; yList[1] = y-radius; yList[2] = y-radius; yList[3] = y+radius; IfIdraw(polygon(c, 3, xList, yList, color(), brush(), filled_)); delete [] xList; delete [] yList; } #endif neuron-7.5/src/ivoc/rect.h000066400000000000000000000067751323325274500155550ustar00rootroot00000000000000#ifndef rect_h #define rect_h #undef Rect #define Rect nrn_Rect class Requisition; class Canvas; class Allocation; class Extension; class Hit; class Brush; class Color; class Appear: public Glyph { protected: Appear(const Color* color=NULL, const Brush* brush=NULL); public: virtual ~Appear(); const Color* color() const {return color_;} void color(const Color*); const Brush* brush() const {return brush_;} void brush(const Brush*); static const Color* default_color(); static const Brush* default_brush(); private: const Color* color_; const Brush* brush_; static const Color* dc_; static const Brush* db_; }; #if defined(__MWERKS__) #undef Rect #define Rect ivoc_Rect #endif class Rect : public Appear { public: Rect(Coord left, Coord bottom, Coord width, Coord height, const Color* c = NULL, const Brush* b = NULL); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); Coord left() const, right() const, top() const, bottom() const; Coord width() const, height() const; void left(Coord), bottom(Coord); void width(Coord), height(Coord); private: Coord l_, b_, w_, h_; }; #if defined(__MWERKS__) #undef Line #define Line ivoc_Line #endif class Line : public Appear { public: Line(Coord dx, Coord dy, const Color* color=NULL, const Brush* brush=NULL); Line(Coord dx, Coord dy, float x_align, float y_align, const Color* color=NULL, const Brush* brush=NULL); virtual ~Line(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); private: Coord dx_, dy_; float x_, y_; }; class Circle : public Appear { public: Circle(float radius, bool filled=false, const Color* color=NULL, const Brush* brush=NULL); virtual ~Circle(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; private: float radius_; bool filled_; }; class Triangle : public Appear { public: Triangle(float side, bool filled=false, const Color* color=NULL, const Brush* brush=NULL); virtual ~Triangle(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; private: float side_; bool filled_; }; #if defined(__MWERKS__) #undef Rectangle #define Rectangle ivoc_Rectangle #endif class Rectangle : public Appear { public: Rectangle(float height, float width, bool filled=false, const Color* color=NULL, const Brush* brush=NULL); virtual ~Rectangle(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; private: float height_; float width_; bool filled_; }; inline Coord Rect::left() const { return l_; } inline Coord Rect::right() const { return l_ + w_; } inline Coord Rect::bottom() const { return b_; } inline Coord Rect::top() const { return b_ + h_; } inline Coord Rect::width() const { return w_; } inline Coord Rect::height() const { return h_; } inline void Rect::left(Coord x) { l_ = x; } inline void Rect::bottom(Coord x) { b_ = x;} inline void Rect::width(Coord x) { w_ = (x > 0) ? x : 1.;} inline void Rect::height(Coord x) { h_ = (x > 0) ? x : 1.;} #endif neuron-7.5/src/ivoc/rubband.cpp000066400000000000000000000110351323325274500165510ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include "rubband.h" #include #include RubberAction::RubberAction() { } RubberAction::~RubberAction() {} void RubberAction::execute(Rubberband* rb) { Resource::unref(rb); } void RubberAction::help() { printf("no help for this Rubberband action\n"); } OcHandler::OcHandler() {} OcHandler::~OcHandler() {} void OcHandler::help() { printf("no help for this handler\n"); } Rubberband* Rubberband::current_; Rubberband::Rubberband(RubberAction* ra, Canvas* c) { //printf("Rubberband\n"); canvas(c); ra_ = ra; Resource::ref(ra_); if (!xor_color_) { xor_color_ = new Color(0,0,0,1,Color::Xor); Resource::ref(xor_color_); brush_ = new Brush(0); Resource::ref(brush_); } } Rubberband::~Rubberband() { //printf("~Rubberband\n"); Resource::unref(ra_); } void Rubberband::help() { if (ra_) { ra_->help(); } } void Rubberband::canvas(Canvas* c) { canvas_ = c; if (c) { t_ = c->transformer(); } } const Color* Rubberband::xor_color_; const Color* Rubberband::color() { return xor_color_;} const Brush* Rubberband::brush_; const Brush* Rubberband::brush() { return brush_;} bool Rubberband::event(Event& e) { e_ = &e; EventType type = e.type(); switch (type) { case Event::down: current_ = this; //printf("Rubberband::event down\n"); Resource::ref(this); if (canvas_) { rubber_on(canvas_); } e.grab(this); #ifdef WIN32 e.window()->grab_pointer(); #endif x_ = x_begin_ = e.pointer_x(); y_ = y_begin_ = e.pointer_y(); press(e); draw(x_, y_); break; case Event::motion: undraw(x_, y_); x_ = e.pointer_x(); y_ = e.pointer_y(); drag(e); draw(x_, y_); break; case Event::up: //printf("Rubberband::event up\n"); current_ = NULL; e.ungrab(this); #ifdef WIN32 e.window()->ungrab_pointer(); #endif undraw(x_, y_); if (canvas_) { rubber_off(canvas_); } x_ = e.pointer_x(); y_ = e.pointer_y(); release(e); if (ra_) { ra_->execute(this); } Resource::unref(this); //destroyed here if user never ref'ed it break; } return true; } void Rubberband::draw(Coord, Coord){} void Rubberband::undraw(Coord x, Coord y){ draw(x,y); } void Rubberband::press(Event&){} void Rubberband::drag(Event&){} void Rubberband::release(Event&){} void Rubberband::snapshot(Printer* pr) { Canvas* can = canvas(); canvas(pr); draw(x(), y()); canvas(can); } //RubberRect RubberRect::RubberRect(RubberAction* ra, Canvas* c) : Rubberband(ra, c){} RubberRect::~RubberRect(){} void RubberRect::draw(Coord x, Coord y) { //printf("RubberRect::draw(%g %g)\n", x, y); Coord x1, y1, x2, y2; x1 = Math::min(x, x_begin()); y1 = Math::min(y, y_begin()); x2 = Math::max(x, x_begin()); y2 = Math::max(y, y_begin()); if (x1 < x2 && y1 < y2) { Canvas* c = canvas(); c->push_transform(); Transformer t; c->transformer(t); c->new_path(); c->rect(x1, y1, x2, y2, Rubberband::color(), Rubberband::brush()); //printf("rect %g %g %g %g\n", x1, y1, x2, y2); c->pop_transform(); } } void RubberRect::help() { Rubberband::help(); printf("RubberRect::help\n"); } void RubberRect::get_rect_canvas(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const { x1 = Math::min(x(), x_begin()); y1 = Math::min(y(), y_begin()); x2 = Math::max(x(), x_begin()); y2 = Math::max(y(), y_begin()); } void RubberRect::get_rect(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const { get_rect_canvas(x1,y1,x2,y2); const Transformer& t = transformer(); t.inverse_transform(x1, y1); t.inverse_transform(x2, y2); } //RubberLine RubberLine::RubberLine(RubberAction* ra, Canvas* c) : Rubberband(ra, c){} RubberLine::~RubberLine(){} void RubberLine::help() { Rubberband::help(); printf("RubberRect::help\n"); } void RubberLine::draw(Coord x, Coord y) { //printf("RubberLine::draw(%g %g)\n", x, y); Canvas* c = canvas(); c->push_transform(); Transformer t; c->transformer(t); c->new_path(); c->line(x_begin(), y_begin(), x, y, Rubberband::color(), Rubberband::brush()); c->pop_transform(); } void RubberLine::get_line_canvas(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const { x1 = x_begin(); y1 = y_begin(); x2 = x(); y2 = y(); } void RubberLine::get_line(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const { get_line_canvas(x1,y1,x2,y2); const Transformer& t = transformer(); t.inverse_transform(x1, y1); t.inverse_transform(x2, y2); } #endif neuron-7.5/src/ivoc/rubband.h000066400000000000000000000074011323325274500162200ustar00rootroot00000000000000#ifndef rubberband_h #define rubberband_h #include #include #include #undef Rubberband #undef RubberLine #undef RubberRect class RubberAction; class Rubberband; class Color; class Brush; class Canvas; class Printer; //called on rubberband release event class RubberAction : public Resource { protected: RubberAction(); virtual ~RubberAction(); public: virtual void execute(Rubberband*); virtual void help(); }; class OcHandler : public Handler { public: OcHandler(); virtual ~OcHandler(); virtual void help(); }; class Rubberband : public OcHandler { public: Rubberband(RubberAction* = NULL, Canvas* = NULL); virtual ~Rubberband(); virtual bool event(Event&); Coord x_begin()const, y_begin()const, x()const, y()const; //canvas coords static const Color* color(); static const Brush* brush(); void canvas(Canvas*); Canvas* canvas()const {return canvas_;} const Transformer& transformer()const {return t_;} const Event& event()const {return *e_;} virtual void help(); virtual void snapshot(Printer*); static Rubberband* current() {return current_;} protected: //subclasses manipulate the rubberband glyph virtual void draw(Coord x, Coord y); virtual void undraw(Coord x, Coord y); virtual void press(Event&); virtual void drag(Event&); virtual void release(Event&); void rubber_on(Canvas*); void rubber_off(Canvas*); private: Canvas* canvas_; Transformer t_; Event* e_; RubberAction* ra_; Coord x_begin_, y_begin_, x_, y_; static const Color* xor_color_; static const Brush* brush_; static Rubberband* current_; }; class RubberRect : public Rubberband { public: RubberRect(RubberAction* = NULL, Canvas* = NULL); virtual ~RubberRect(); virtual void draw(Coord, Coord); virtual void get_rect(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const; virtual void get_rect_canvas(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const; virtual void help(); }; class RubberLine : public Rubberband { public: RubberLine(RubberAction* = NULL, Canvas* = NULL); virtual ~RubberLine(); virtual void draw(Coord, Coord); virtual void get_line(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const; virtual void get_line_canvas(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const; virtual void help(); }; inline Coord Rubberband::x() const { return x_; } inline Coord Rubberband::y() const { return y_; } inline Coord Rubberband::x_begin() const { return x_begin_; } inline Coord Rubberband::y_begin() const { return y_begin_; } /* * RubberAction denoted by an object and member function to call on the object. * Used the FieldEditorAction as a template */ #if defined(__STDC__) || defined(__ANSI_CPP__) || defined(WIN32) || MAC #define __RubberCallback(T) T##_RubberCallback #define RubberCallback(T) __RubberCallback(T) #define __RubberMemberFunction(T) T##_RubberMemberFunction #define RubberMemberFunction(T) __RubberMemberFunction(T) #else #define __RubberCallback(T) T/**/_RubberCallback #define RubberCallback(T) __RubberCallback(T) #define __RubberMemberFunction(T) T/**/_RubberMemberFunction #define RubberMemberFunction(T) __RubberMemberFunction(T) #endif #define declareRubberCallback(T) \ typedef void (T::*RubberMemberFunction(T))(Rubberband*); \ class RubberCallback(T) : public RubberAction { \ public: \ RubberCallback(T)(T*, RubberMemberFunction(T)); \ virtual ~RubberCallback(T)(); \ \ virtual void execute(Rubberband*); \ private: \ T* obj_; \ RubberMemberFunction(T) func_; \ }; #define implementRubberCallback(T) \ RubberCallback(T)::RubberCallback(T)( \ T* obj, RubberMemberFunction(T) func \ ) { \ obj_ = obj; \ func_ = func; \ } \ \ RubberCallback(T)::~RubberCallback(T)() { } \ \ void RubberCallback(T)::execute(Rubberband* rb) { \ (obj_->*func_)(rb); \ } #endif neuron-7.5/src/ivoc/scene.cpp000066400000000000000000000603031323325274500162330ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file /* I have shamelessly hacked away at the page implementation to create the Scene class. There really isn't much in common anymore but I happily acknowlege the debt. */ /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Scene - arbitrary placements seen from several views */ #include #include #include #include #include #include #include #include #include #include #include #include "mymath.h" #include "epsprint.h" #include "scenevie.h" #include "scenepic.h" #include "idraw.h" #include "ivoc.h" #define Scene_Move_Text_ "MoveText Graph" #define Scene_ChangeColor_ "ChangeColor Graph" #define Scene_Delete_ "Delete Graph" static const int SceneInfoShowing = 0x01; static const int SceneInfoFixed = 0x02; static const int SceneInfoViewFixed = 0x04; static const int SceneInfoAllocated = 0x08; class SceneInfo { public: SceneInfo(); SceneInfo(Glyph*, Coord x=0, Coord y=0); void pinfo(); Glyph* glyph_; Allocation allocation_; Coord x_; Coord y_; short status_; }; void SceneInfo::pinfo() { Allocation& a = allocation_; printf("allocation %g %g %g %g\n", a.left(), a.bottom(), a.right(), a.top()); } SceneInfo::SceneInfo() { glyph_ = NULL; x_ = 0; y_ = 0; status_ = 0; } SceneInfo::SceneInfo(Glyph* g, Coord x, Coord y) { glyph_ = g; x_ = x; y_ = y; status_ = SceneInfoShowing; } declareList(SceneInfo_List,SceneInfo); implementList(SceneInfo_List,SceneInfo); declarePtrList(XYView_PtrList,XYView); implementPtrList(XYView_PtrList,XYView); declarePtrList(Scene_PtrList,Scene); implementPtrList(Scene_PtrList,Scene); static const float epsilon = 0.001; static Scene_PtrList* scene_list; Coord Scene::mbs_; Coord Scene::mbs() const {return mbs_;} static const Brush* mb_brush_; static const Color* mb_color_; void Scene::check_allocation(GlyphIndex index) { //will not redraw unless allocation is changed //use damage(index) to do a definite redraw on a constant allocation SceneInfo& info = info_->item_ref(index); Requisition s; info.glyph_->request(s); Allocation a_old = info.allocation_; Allocation& a = info.allocation_; Allotment ax = Allotment( info.x_, s.requirement(Dimension_X).natural(), s.requirement(Dimension_X).alignment() ); Allotment ay = Allotment( info.y_, s.requirement(Dimension_Y).natural(), s.requirement(Dimension_Y).alignment() ); a.allot(Dimension_X, ax); a.allot(Dimension_Y, ay); if (info.status_ & SceneInfoAllocated) { if (!a_old.equals(a, epsilon)) { damage(index, a_old); damage(index); } }else{ damage(index); } info.status_ |= SceneInfoAllocated; } void Scene::modified(GlyphIndex index) { //will not redraw unless allocation is changed //use damage(index) to do a definite redraw on a constant allocation SceneInfo& info = info_->item_ref(index); Requisition s; info.glyph_->request(s); Allocation a_old = info.allocation_; Allocation& a = info.allocation_; Allotment ax = Allotment( info.x_, s.requirement(Dimension_X).natural(), s.requirement(Dimension_X).alignment() ); Allotment ay = Allotment( info.y_, s.requirement(Dimension_Y).natural(), s.requirement(Dimension_Y).alignment() ); a.allot(Dimension_X, ax); a.allot(Dimension_Y, ay); //printf("Scene::modified(%d) allocation %g %g %g %g\n", index, a.left(), a.bottom(), a.right(), a.top()); if ((info.status_ & SceneInfoAllocated) && !a_old.equals(a, epsilon)) { //printf("damaged\n"); damage(index, a_old); } damage(index); info.status_ |= SceneInfoAllocated; } static const Color* scene_background_; static const Color* scene_foreground_; const Color* Scene::default_background() { if (!scene_background_) { Style* s = Session::instance()->style(); String c; if (!s->find_attribute("Scene_background", c ) || (scene_background_ = Color::lookup( Session::instance()->default_display(), c)) == NULL) { scene_background_ = Color::lookup( Session::instance()->default_display(), "#ffffff" ); } Resource::ref(scene_background_); } return scene_background_; } const Color* Scene::default_foreground() { if (!scene_foreground_) { Style* s = Session::instance()->style(); String c; if (!s->find_attribute("Scene_foreground", c ) || (scene_foreground_ = Color::lookup( Session::instance()->default_display(), c)) == NULL) { scene_foreground_ = Color::lookup( Session::instance()->default_display(), "#000000" ); } Resource::ref(scene_foreground_); } return scene_foreground_; } Scene::Scene(Coord x1, Coord y1, Coord x2, Coord y2, Glyph* bg) : Glyph() { drawing_fixed_item_ = false; tool_ = NOTOOL; background_ = NULL; background(bg); info_ = new SceneInfo_List(); views_ = new XYView_PtrList(); x1_orig_ = x1; x2_orig_ = x2; y1_orig_ = y1; y2_orig_ = y2; x1_ = x1; x2_ = x2; y1_ = y1; y2_ = y2; if (!scene_list) { scene_list = new Scene_PtrList; } if (mbs_ == 0.) { #if MAC mbs_ = 10.; #endif Session::instance()->style()->find_attribute("scene_menu_box_size", mbs_); if (mbs_ > 0.) { mb_color_ = new Color( ColorIntensity(.5), ColorIntensity(.5), ColorIntensity(.5) ); mb_brush_ = new Brush(1); Resource::ref(mb_color_); Resource::ref(mb_brush_); }else{ mbs_ = -1.; } // printf ("mbs_=%g\n", mbs_); } scene_list->append(this); picker_ = NULL; mark_ = false; hoc_obj_ptr_ = NULL; } void Scene::background(Glyph* bg) { Resource::unref(background_); if (bg) { background_ = bg; }else{ background_ = new Background(NULL, default_background()); } Resource::ref(background_); } int Scene::tool() { return tool_; } void Scene::tool(int t) { tool_ = t; notify(); } void Scene::help() { switch (tool()) { case MOVE: Oc::help(Scene_Move_Text_); break; case DELETE: Oc::help(Scene_Delete_); break; case CHANGECOLOR: Oc::help(Scene_ChangeColor_); break; default: printf("No help for this tool\n"); break; } } XYView* Scene::sceneview(int i) const { if(views_->count()) { return views_->item(i); }else{ return NULL; } } void Scene::new_size(Coord x1, Coord y1, Coord x2, Coord y2) { #if 1 if (x1 == x2) { x1 -= 1.; x2 += 1.;} if (y1 == y2) { y1 -= 1.; y2 += 1.;} x1_ = x1; y1_ = y1; x2_ = x2; y2_ = y2; #endif #if 1 //resize first view if (views_->count()) { XYView* v = views_->item(0); // v->origin(x1, y1); // v->x_span(x2 - x1); // v->y_span(y2 - y1); v->box_size(x1, y1, x2, y2); if (v->canvas()) { v->damage_all(); } } #endif #if 0 //resize all views to correspond to the new size damage_all(); for (long i = 0; i < views_->count(); ++i) { XYView* v = views_->item(i); v->x_span(x2 - x1); v->y_span(y2 - y1); v->origin(x1, y1); } GlyphIndex count = info_->count(); for (i=0; i < count; ++i) { modified(i); } #endif notify(); } Scene::~Scene() { //printf("~Scene\n"); GlyphIndex count = info_->count(); for (GlyphIndex i = 0; i < count; ++i) { SceneInfo& info = info_->item_ref(i); Resource::unref(info.glyph_); } delete info_; info_ = NULL; Resource::unref(background_); if (picker_) { delete picker_; } //only xyview can manipulate this list. when xyview is deleted it //will remove itself from this list. There is no way to delete scene //without first deleteing all the views. assert(views_->count() == 0); #if 0 count = views_->count(); for (i = 0; i < count; ++i) { XYView* view = views_->item(i); Resource::unref(view); } views_->remove_all(); #endif for (long j = 0; j < scene_list->count(); ++j) { if (scene_list->item(j) == this) { scene_list->remove(j); break; } } delete views_; } void Scene::wholeplot(Coord& l, Coord& b, Coord& r, Coord& t) const { l = x1(); b = y1(); r = x2(); t = y2(); } int Scene::view_count() const { return int(views_->count()); } void Scene::append_view(XYView* v) { views_->append(v); // Resource::ref(v); } void Scene::remove_view(XYView* v) { long count = views_->count(); for (long i = 0; i < count; ++i) { if (v == views_->item(i)) { views_->remove(i); break; // Resource::unref(v); } } } void Scene::dismiss() { long count = views_->count(); for (long i = count - 1; i >= 0; --i) { OcViewGlyph* g = views_->item(i)->parent(); if (g && g->has_window()) { g->window()->dismiss(); g->window(NULL); } } } void Scene::damage(GlyphIndex index) { SceneInfo& info = info_->item_ref(index); Allocation& a = info.allocation_; long count = views_->count(); for (long i = 0; i < count; ++i) { //printf("damage view\n"); XYView* view = views_->item(i); view->damage(info.glyph_, a, (info.status_ & SceneInfoFixed) != 0, (info.status_ & SceneInfoViewFixed) != 0 ); } } void Scene::damage(GlyphIndex index, const Allocation& a) { SceneInfo& info = info_->item_ref(index); long count = views_->count(); for (long i = 0; i < count; ++i) { XYView* view = views_->item(i); view->damage(info.glyph_, a, (info.status_ & SceneInfoFixed) != 0, (info.status_ & SceneInfoViewFixed) != 0 ); } } void Scene::damage_all() { for (long i = 0; i < views_->count(); ++i) { XYView* v = views_->item(i); if (v->canvas()) { v->damage_all(); } } } void Scene::damage(Coord x1, Coord y1, Coord x2, Coord y2) { long count = views_->count(); for (long i = 0; i < count; ++i) { XYView* view = views_->item(i); view->damage(x1, y1, x2, y2); } } void Scene::show(GlyphIndex index, bool showing) { SceneInfo& info = info_->item_ref(index); if (((info.status_ & SceneInfoShowing) == SceneInfoShowing) != showing) { //printf("show %d showing=%d want %d\n", index, (info.status_ & SceneInfoHidden) == 0, showing); //info.pinfo(); if (showing) { info.status_ |= SceneInfoShowing; } else { info.status_ &= ~SceneInfoShowing; } modified(index); } } bool Scene::showing(GlyphIndex index) const { return (info_->item_ref(index).status_ & SceneInfoShowing) != 0; } void Scene::move(GlyphIndex index, Coord x, Coord y) { SceneInfo& info = info_->item_ref(index); float x1=info.x_, y1=info.y_; info.x_ = x; info.y_ = y; if (!(info.status_ & SceneInfoAllocated) || x1 != x || y1 != y) { modified(index); } } void Scene::location(GlyphIndex index, Coord& x, Coord& y) const { SceneInfo& info = info_->item_ref(index); x = info.x_; y = info.y_; } GlyphIndex Scene::count() const { return info_->count(); } Glyph* Scene::component(GlyphIndex index) const { return info_->item_ref(index).glyph_; } void Scene::allotment(GlyphIndex index, DimensionName res, Allotment& a) const { a = info_->item_ref(index).allocation_.allotment(res); } void Scene::change(GlyphIndex index) { modified(index); } void Scene::change_to_fixed(GlyphIndex index, XYView* v) { SceneInfo& info = info_->item_ref(index); if (info.status_ & SceneInfoViewFixed) { info.status_ &= ~SceneInfoViewFixed; printf("changed to fixed\n"); v->view_ratio(info.x_, info.y_, info.x_, info.y_); v->s2o().transform(info.x_, info.y_); } info.status_ |= SceneInfoFixed; modified(index); } void Scene::change_to_vfixed(GlyphIndex index, XYView* v) { SceneInfo& info = info_->item_ref(index); if (!(info.status_ & SceneInfoViewFixed)) { info.status_ |= SceneInfoViewFixed; info.status_ |= SceneInfoFixed; printf("changed to vfixed\n"); v->s2o().inverse_transform(info.x_, info.y_); v->ratio_view(info.x_, info.y_, info.x_, info.y_); } modified(index); } void Scene::append(Glyph* glyph) { SceneInfo info(glyph); info_->append(info); Resource::ref(glyph); // modified(info_->count() - 1); } void Scene::append_fixed(Glyph* glyph) { SceneInfo info(glyph); info.status_ |= SceneInfoFixed; info_->append(info); Resource::ref(glyph); // modified(info_->count() - 1); } void Scene::append_viewfixed(Glyph* glyph) { //printf("Scene::append_viewfixed\n"); SceneInfo info(glyph); info.status_ |= SceneInfoFixed | SceneInfoViewFixed; info_->append(info); Resource::ref(glyph); // modified(info_->count() - 1); } void Scene::prepend(Glyph* glyph) { SceneInfo info(glyph); info_->prepend(info); Resource::ref(glyph); // modified(0); } void Scene::insert(GlyphIndex index, Glyph* glyph) { SceneInfo info(glyph); info_->insert(index, info); Resource::ref(glyph); // modified(index); } void Scene::remove(GlyphIndex index) { SceneInfo& info = info_->item_ref(index); damage(index); Resource::unref(info.glyph_); info_->remove(index); } void Scene::replace(GlyphIndex index, Glyph* glyph) { SceneInfo& info = info_->item_ref(index); damage(index); Resource::ref(glyph); Resource::unref(info.glyph_); info.glyph_ = glyph; modified(index); } GlyphIndex Scene::glyph_index(const Glyph* g) { GlyphIndex i, cnt=info_->count();; for (i=0; i < cnt; ++i) { if (info_->item_ref(i).glyph_ == g) { return i; } } return -1; } void Scene::request(Requisition& req) const { //printf("Scene::request\n"); #if 0 if (background_ != NULL) { background_->request(requisition); } #endif Requirement rx(x2() - x1(),0,0,-x1()/(x2() - x1())); Requirement ry(y2() - y1(),0,0,-y1()/(y2() - y1())); req.require_x(rx); req.require_y(ry); } void Scene::allocate(Canvas* c, const Allocation& a, Extension& ext) { //printf("Scene::allocate\n"); GlyphIndex count = info_->count(); for (GlyphIndex index = 0; index < count; ++index) { check_allocation(index); } ext.set(c, a); } #if 0 #include #include void candam(Canvas* c) { const CanvasDamage& cd = c->rep()->damage_; printf("damage %g %g %g %g\n", cd.left, cd.bottom, cd.right, cd.top); const Transformer& t = c->transformer(); Coord x1, y1, x2, y2; t.inverse_transform(cd.left, cd.bottom, x1, y1); t.inverse_transform(cd.right, cd.top, x2, y2); printf(" model %g %g %g %g\n", x1, y1, x2, y2); } #endif void Scene::draw(Canvas* canvas, const Allocation& a) const { //printf("Scene::draw"); //candam(canvas); if (background_ != NULL) { background_->draw(canvas, a); } // the menu selection area if (mbs() > 0.) { Coord l,t; canvas->transformer().transform(a.left(), a.top(), l, t); if (canvas->damaged(l, t-mbs_, l+mbs_, t)) { // printf("draw box at corner (%g, %g)\n", l, t); canvas->push_transform(); Transformer tr; canvas->transformer(tr); canvas->rect(l, t-mbs_, l+mbs_, t, mb_color_, mb_brush_); canvas->pop_transform(); } } GlyphIndex count = info_->count(); bool are_fixed = false; for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if (info.status_ & SceneInfoFixed) { are_fixed = true; }else if (info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation& a = info.allocation_; Extension b; b.set(canvas, a); //printf("%d alloc %g %g %g %g\n", index, a.left(), a.bottom(), a.right(), a.top()); //printf("%d exten %g %g %g %g\n", index, b.left(), b.bottom(), b.right(), b.top()); if (canvas->damaged(b)) { info.glyph_->draw(canvas, a); } } } if (are_fixed) { ((Scene*)this)->drawing_fixed_item_ = true; canvas->push_transform(); //Transformer tv; //view_transform(canvas, 2, tv); const Transformer& tv = XYView::current_draw_view()->s2o(); canvas->transform(tv); IfIdraw(pict(tv)); for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if ((info.status_ & SceneInfoFixed) && info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation a = info.allocation_; Coord x, y; if (!(info.status_ & SceneInfoViewFixed)) { tv.inverse_transform(a.x(), a.y(), x, y); }else{ XYView::current_draw_view()->view_ratio(a.x(), a.y(), x, y); } a.x_allotment().origin(x); a.y_allotment().origin(y); Extension b; b.set(canvas, a); if (canvas->damaged(b)) { info.glyph_->draw(canvas, a); } //printf("%d alloc %g %g %g %g\n", index, a.left(), a.bottom(), a.right(), a.top()); //printf("%d exten %g %g %g %g\n", index, b.left(), b.bottom(), b.right(), b.top()); } } ((Scene*)this)->drawing_fixed_item_ = false; canvas->pop_transform(); IfIdraw(end()); } } void Scene::print(Printer* canvas, const Allocation& a) const { if (background_ != NULL) { background_->print(canvas, a); } GlyphIndex count = info_->count(); bool are_fixed = false; for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if (info.status_ & SceneInfoFixed) { are_fixed = true; }else if (info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation& a = info.allocation_; Extension b; b.set(canvas, a); if (canvas->damaged(b)) { info.glyph_->print(canvas, a); } } } if (are_fixed) { ((Scene*)this)->drawing_fixed_item_ = true; canvas->push_transform(); //Transformer tv; //view_transform(canvas, 2, tv); const Transformer& tv = XYView::current_draw_view()->s2o(); canvas->transform(tv); for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if ((info.status_ & SceneInfoFixed) && info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation a = info.allocation_; Coord x, y; if (!(info.status_ & SceneInfoViewFixed)) { tv.inverse_transform(a.x(), a.y(), x, y); }else{ XYView::current_draw_view()->view_ratio(a.x(), a.y(), x, y); } a.x_allotment().origin(x); a.y_allotment().origin(y); Extension b; b.set(canvas, a); if (canvas->damaged(b)) { info.glyph_->print(canvas, a); } } } ((Scene*)this)->drawing_fixed_item_ = false; canvas->pop_transform(); } } void Scene::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { menu_picked_ = false; if (mbs() > 0. && picker_ && h.event() && h.event()->type() == Event::down) { Coord ax, ay, ex, ey; c->transformer().transform(h.left(), h.top(), ex, ey); c->transformer().transform(a.left(), a.top(), ax, ay); //printf("a=(%g,%g) e=(%g,%g)\n", ax, ay, ex, ey); if (MyMath::inside(ex, ey, ax, ay-mbs_, ax+mbs_, ay)) { picker()->pick_menu(this, depth, h); menu_picked_ = true; return; } } if (picker_ && picker()->pick(c, this, depth, h)) { return; } if (background_ != NULL) { background_->pick(c, a, depth, h); } GlyphIndex count = info_->count(); #if 0 for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if (info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation& a = info.allocation_; if ( h.right() >= a.left() && h.left() < a.right() && h.top() >= a.bottom() && h.bottom() < a.top() ) { h.begin(depth, this, index); info.glyph_->pick(c, a, depth + 1, h); h.end(); } } } #else // pick with some extra epsilon in canvas coords Coord epsx = XYView::current_pick_view()->x_pick_epsilon(); Coord epsy = XYView::current_pick_view()->y_pick_epsilon(); bool are_fixed = false; for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if (info.status_ & SceneInfoFixed) { are_fixed = true; }else if (info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation& a = info.allocation_; if ( h.right() >= a.left() - epsx && h.left() < a.right() + epsx && h.top() >= a.bottom() - epsy && h.bottom() < a.top() + epsy ) { h.begin(depth, this, index); info.glyph_->pick(c, a, depth + 1, h); h.end(); } } } if (are_fixed) { //Transformer tv; //view_transform(c, 2, tv); const Transformer& tv = XYView::current_pick_view()->s2o(); float scx, scy, tmp; tv.matrix(scx,tmp,tmp,scy,tmp,tmp); for (GlyphIndex index = 0; index < count; ++index) { SceneInfo& info = info_->item_ref(index); if ((info.status_ & SceneInfoFixed) && info.glyph_ != NULL && (info.status_ & SceneInfoShowing)) { Allocation a = info.allocation_; Coord l,r,t,b; if (info.status_ & SceneInfoViewFixed) { Coord x, y; XYView::current_pick_view()->view_ratio(a.x(), a.y(), x, y); a.x_allotment().origin(x); a.y_allotment().origin(y); tv.transform(a.left(), a.bottom(), l, b); tv.transform(a.right(), a.top(), r, t); }else{ l = (a.left() - a.x())*scx + a.x(); r = (a.right() - a.x())*scx + a.x(); t = (a.top() - a.y())*scy + a.y(); b = (a.bottom() - a.y())*scy + a.y(); } //printf("%g %g %g %g %g %g %g %g %g %g\n", a.left(), a.bottom(), a.right(), //a.top(), l,r,t,b, h.left(), h.bottom()); if ( h.right() >= l && h.left() < r && h.top() >= b && h.bottom() < t ) { h.begin(depth, this, index); info.glyph_->pick(c, a, depth + 1, h); h.end(); } } } } #endif } long Scene::scene_list_index(Scene* s) { long i, cnt = scene_list->count(); for (i = 0; i < cnt; ++i) { if (s == scene_list->item(i)) { return i; } } return -1; } void Scene::save_all(ostream& o) { char buf[200]; o << "objectvar save_window_, rvp_" << endl; if (!scene_list) { return; } long count = scene_list->count(); if (count) { sprintf(buf, "objectvar scene_vector_[%ld]", count); o << buf << endl; } for (long i = 0; i < count; ++i) { Scene* s = scene_list->item(i); s->mark(false); } } void Scene::save_class(ostream& o, const char* s) { long count = views_->count(); // PrintableWindow* w = (PrintableWindow*)canvas()->window(); o << "save_window_ = new " << s << "(0)" << endl; char buf[256]; Coord left, top, right, bottom; if (view_count()) { sceneview(0)->zin(left, bottom, right, top); }else{ left = x1(); right = x2(); bottom = y1(); top = y2(); } sprintf(buf, "save_window_.size(%g,%g,%g,%g)", left, right, bottom, top); o << buf << endl; } void Scene::save_phase1(ostream&) {} void Scene::save_phase2(ostream&) {} void Scene::printfile(const char* fname) { if (view_count()) { views_->item(0)->printfile(fname); } } void XYView::printfile(const char* fname) { filebuf obuf; if (!obuf.open(fname, IOS_OUT)) { return; } ostream o(&obuf); EPSPrinter* pr = new EPSPrinter(&o); Allocation a; Allotment ax(0, xsize_, 0); Allotment ay(0, ysize_, 0); a.allot_x(ax); a.allot_y(ay); pr->eps_prolog(o, xsize_, ysize_); pr->resize(0, 0, xsize_, ysize_); pr->clip_rect(0, 0, xsize_, ysize_); pr->damage_all(); print(pr, a); pr->epilog(); undraw(); obuf.close(); delete pr; PrintableWindowManager::current()->psfilter(fname); } #endif neuron-7.5/src/ivoc/scenepic.cpp000066400000000000000000000441341323325274500167330ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include "ivoc.h" #include "mymath.h" #include "scenevie.h" #include "scenepic.h" #include "rubband.h" #include "apwindow.h" #include "utility.h" #include "oc2iv.h" #define Scene_SceneMover_ "Translate Scene" #define Scene_SceneZoom_ "ZoomInOut Scene" #define Scene_RoundView_ "RoundView Scene" #define Scene_WholeSceneView_ "WholeScene Scene" #define Scene_WholePlotView_ "View_equal_Plot Scene" #define Scene_ZoomOut10_ "ZoomOut10 Scene" #define Scene_ZoomeIn10_ "ZoomIn10 Scene" #define Scene_SpecView_ "SetView Scene" #define Scene_SizeScene_ "Scene_equal_View Scene" #define Scene_NewView_ "NewView Scene" #define Scene_ShowMenu_ "Scene" #define Scene_ObjectName_ "ObjectName" MenuItem* K::menu_item(const char* name) { Glyph* g = LayoutKit::instance()->r_margin( WidgetKit::instance()->fancy_label(name), 0.0, fil, 0.0 ); return WidgetKit::instance()->menu_item(g); } MenuItem* K::check_menu_item(const char* name) { Glyph* g = LayoutKit::instance()->r_margin( WidgetKit::instance()->fancy_label(name), 0.0, fil, 0.0 ); return WidgetKit::instance()->check_menu_item(g); } MenuItem* K::radio_menu_item(TelltaleGroup* tg, const char* name) { Glyph* g = LayoutKit::instance()->r_margin( WidgetKit::instance()->fancy_label(name), 0.0, fil, 0.0 ); return WidgetKit::instance()->radio_menu_item(tg, g); } /*static*/ class ButtonItemInfo { public: ButtonItemInfo(const char* name, Action*, TelltaleState*, MenuItem* mi = NULL, Menu* m = NULL); virtual ~ButtonItemInfo(); GlyphIndex menu_index(); TelltaleState* s_; CopyString name_; Action* a_; Menu* parent_; MenuItem* mi_; }; ButtonItemInfo::ButtonItemInfo(const char* name, Action* a, TelltaleState* s, MenuItem* mi, Menu* parent) { name_ = name; s_ = s; a_ = a; parent_ = parent; mi_ = mi; } ButtonItemInfo::~ButtonItemInfo(){} GlyphIndex ButtonItemInfo::menu_index() { GlyphIndex i, cnt; if (parent_ && mi_) { cnt = parent_->item_count(); for (i=0; i < cnt; ++i) { if (parent_->item(i) == mi_) { return i; } } } return -1; } declarePtrList(ButtonItemInfoList,ButtonItemInfo) implementPtrList(ButtonItemInfoList,ButtonItemInfo) /*static*/ class SceneMover : public OcHandler { public: SceneMover(); virtual ~SceneMover(); virtual bool event(Event&); virtual void help(); private: Coord x_, y_; XYView* view_; }; /*static*/ class SceneZoom : public OcHandler { public: SceneZoom(); virtual ~SceneZoom(); virtual bool event(Event&); virtual void help(); private: Coord x_, y_, xorg_, yorg_; XYView* view_; }; /*static*/ class NewView : public RubberAction { public: NewView(); virtual ~NewView(); virtual void execute(Rubberband*); virtual void help(); }; /*static*/ class RoundView : public Action { virtual void execute(); }; /*static*/ class WholeSceneView : public Action { virtual void execute(); }; /*static*/ class WholePlotView : public Action { virtual void execute(); }; /*static*/ class SpecView : public Action { virtual void execute(); }; /*static*/ class SizeScene : public Action { virtual void execute(); }; /*static*/ class ZoomOut10: public Action { virtual void execute(); }; /*static*/ class ZoomIn10: public Action { virtual void execute(); }; /*static*/ class SPObjectName: public Action { virtual void execute(); }; /*static*/ class ShowMenu: public Action { public: ShowMenu(Menu*); virtual ~ShowMenu(); virtual void execute(); private: Menu* m_; }; ScenePicker* Scene::picker() { if (!picker_) { WidgetKit& k = *WidgetKit::instance(); picker_ = new ScenePicker(this); SceneZoom* z = new SceneZoom(); SceneMover* m = new SceneMover(); Menu* men = k.pulldown(); MenuItem* mi = K::menu_item("View . . ."); mi->menu(men); picker_->add_menu(mi); picker_->add_menu("View = plot", new WholePlotView(), men); picker_->add_menu("Set View", new SpecView(), men); picker_->add_menu("10% Zoom out", new ZoomOut10(), men); picker_->add_menu("10% Zoom in", new ZoomIn10(), men); picker_->add_radio_menu("NewView", new RubberRect(new NewView()),0 , 0, men); picker_->add_radio_menu("Zoom in/out", z, 0, men); picker_->add_radio_menu("Translate", m, 0, men); picker_->add_menu("Round View", new RoundView(), men); picker_->add_menu("Whole Scene", new WholeSceneView() , men); picker_->add_menu("Scene=View", new SizeScene(), men); picker_->add_menu("Object Name", new SPObjectName(), men); // picker_->add_menu("Show Menu", new ShowMenu(men), men); // picker_->add_menu(k.menu_item("Undo")); // picker_->add_menu(k.menu_item("Redo")); picker_->add_menu(k.menu_item_separator()); picker_->bind_select(z); picker_->bind_adjust(m); } return picker_; } /*static*/ class ScenePickerImpl : public OcHandler { public: ScenePickerImpl(Scene* ); virtual ~ScenePickerImpl(); virtual bool event(Event&); long info_index(const char*); public: friend class ScenePicker; PopupMenu* menu_; Scene* scene_; TelltaleGroup* tg_; CopyString sel_name_; ButtonItemInfoList* bil_; static DismissableWindow* window_; }; void ScenePicker::pick_menu(Glyph* glyph, int depth, Hit& h) { h.target(depth, glyph, 0, spi_); } DismissableWindow* ScenePickerImpl::window_; /*static*/ class RadioSelect: public Action { public: RadioSelect(const char*, Action*, Scene*); virtual ~RadioSelect(); virtual void execute(); private: Action* a_; CopyString name_; Scene* s_; }; /*static*/ class RubberTool: public Action { public: RubberTool(Action* sel, Rubberband*, ScenePicker*, int); virtual ~RubberTool(); virtual void execute(); private: Action* sel_; Rubberband* rb_; ScenePicker* sp_; int tool_; }; /*static*/ class HandlerTool: public Action { public: HandlerTool(OcHandler*, ScenePicker*, int); virtual ~HandlerTool(); virtual void execute(); private: OcHandler* h_; ScenePicker* sp_; int tool_; }; ScenePicker::ScenePicker(Scene* scene) { spi_ = new ScenePickerImpl(scene); spi_->ref(); bind_menu(spi_); } DismissableWindow* ScenePicker::last_window() { return ScenePickerImpl::window_; } ScenePicker::~ScenePicker() { spi_->unref(); } TelltaleGroup* ScenePicker::telltale_group(){return spi_->tg_;} MenuItem* ScenePicker::add_menu(MenuItem* mi, Menu* m) { if (m) { m->append_item(mi); }else{ spi_->menu_->append_item(mi); } return mi; } MenuItem* ScenePicker::add_menu(const char* name, MenuItem* mi, Menu* m) { Menu* mm; if (m) { mm = m; }else{ mm = spi_->menu_->menu(); } mm->append_item(mi); spi_->bil_->append(new ButtonItemInfo(name, mi->action(), mi->state(), mi, mm)); return mi; } MenuItem* ScenePicker::add_menu(const char* name, Action* a, Menu* m) { MenuItem* mi = K::menu_item(name); mi->action(a); return add_menu(name, mi, m); } MenuItem* ScenePicker::add_radio_menu(const char* name, Action* a, Menu* m) { MenuItem* mi = K::radio_menu_item(spi_->tg_, name); mi->action(new RadioSelect(name, a, spi_->scene_)); return add_menu(name, mi, m); } Button* ScenePicker::radio_button(const char* name, Action* a) { Button* mi = WidgetKit::instance()->radio_button(spi_->tg_, name, new RadioSelect(name, a, spi_->scene_)); spi_->bil_->append(new ButtonItemInfo(name, mi->action(), mi->state())); return mi; } MenuItem* ScenePicker::add_radio_menu(const char* name, Rubberband* rb, Action* sel, int tool, Menu* m) { return add_radio_menu(name, new RubberTool(sel, rb, this, tool), m); } Button* ScenePicker::radio_button(const char* name, Rubberband* rb, Action* sel, int tool) { return radio_button(name, new RubberTool(sel, rb, this, tool)); } MenuItem* ScenePicker::add_radio_menu(const char* name, OcHandler* h, int tool, Menu* m) { return add_radio_menu(name, new HandlerTool(h, this, tool), m); } long ScenePickerImpl::info_index(const char* name) { long i, cnt; cnt = bil_->count(); for (i=0; i < cnt; ++i) { ButtonItemInfo* b = bil_->item(i); if (strcmp(b->name_.string(), name) == 0) { return i; } } return -1; } void ScenePicker::exec_item(const char* name) { long i; Scene* s = spi_->scene_; if (s->view_count()) { XYView* v = s->sceneview(0); XYView::current_pick_view(v); if (v->canvas()) { ScenePickerImpl::window_ = (DismissableWindow*)v->canvas()->window(); } }else{ XYView::current_pick_view(NULL); ScenePickerImpl::window_ = NULL; } i = spi_->info_index(name); if (i > -1) { ButtonItemInfo* b = spi_->bil_->item(i); TelltaleState* t = b->s_; bool chosen = t->test(TelltaleState::is_chosen); bool act = !chosen; if (t->test(TelltaleState::is_toggle)) { t->set(TelltaleState::is_chosen, act); act = true; }else if (t->test(TelltaleState::is_choosable)) { t->set(TelltaleState::is_chosen, true); } t->notify(); if (act && b->a_ != NULL) { b->a_->execute(); } } } void ScenePicker::remove_item(const char* name) { long i; i = spi_->info_index(name); if (i > -1) { ButtonItemInfo* b = spi_->bil_->item(i); spi_->bil_->remove(i); GlyphIndex j = b->menu_index(); if (j > -1) { b->parent_->remove_item(j); } // if (b->mi_) { // delete b->mi_; // } delete b; } } void ScenePicker::insert_item(const char* insert, const char* name, MenuItem* mi) { long i; i = spi_->info_index(insert); if (i > -1) { ButtonItemInfo* b = spi_->bil_->item(i); GlyphIndex j = b->menu_index(); if (j > -1) { b->parent_->insert_item(j, mi); spi_->bil_->insert(i, new ButtonItemInfo(name, mi->action(), mi->state(), mi, b->parent_)); } } } void ScenePicker::set_scene_tool(int t) { spi_->scene_->tool(t); } void ScenePicker::help() { spi_->scene_->help(); } void ScenePicker::select_name(const char* name) { spi_->sel_name_ = name; } const char* ScenePicker::select_name() { return spi_->sel_name_.string(); } ScenePickerImpl::ScenePickerImpl(Scene* scene) : sel_name_(""){ menu_ = new PopupMenu(); menu_->ref(); tg_ = new TelltaleGroup(); tg_->ref(); scene_ = scene; // not ref'ed since picker deleted when scene is deleted bil_ = new ButtonItemInfoList(20); } ScenePickerImpl::~ScenePickerImpl() { Resource::unref(menu_); Resource::unref(tg_); for (long i=bil_->count() - 1; i >= 0; --i) { delete bil_->item(i); } delete bil_; } bool ScenePickerImpl::event(Event& e) { //printf("ScenePickerImpl::event\n"); window_ = (DismissableWindow*)e.window(); menu_->event(e); return false; } RubberTool::RubberTool(Action* sel, Rubberband* rb, ScenePicker* sp, int tool) { sel_ = sel; sp_ = sp; rb_ = rb; Resource::ref(rb_); Resource::ref(sel_); tool_ = tool; } RubberTool::~RubberTool() { Resource::unref(rb_); Resource::unref(sel_); } void RubberTool::execute() { sp_->bind_select(rb_); sp_->set_scene_tool(tool_); if (Oc::helpmode()) { rb_->help(); }else if (sel_) { sel_->execute(); } } RadioSelect::RadioSelect(const char* name, Action* a, Scene* s) : name_(name) { a_ = a; Resource::ref(a_); s_ = s; // not referenced } RadioSelect::~RadioSelect() { Resource::unref(a_); } void RadioSelect::execute() { handle_old_focus(); a_->execute(); s_->picker()->select_name(this->name_.string()); for (int i=0; i < s_->view_count(); ++i) { XYView* v = s_->sceneview(i); v->notify(); } } HandlerTool::HandlerTool(OcHandler* h, ScenePicker* sp, int tool) { sp_ = sp; h_ = h; Resource::ref(h_); tool_ = tool; } HandlerTool::~HandlerTool() { Resource::unref(h_); } void HandlerTool::execute() { sp_->bind_select(h_); sp_->set_scene_tool(tool_); if (Oc::helpmode()) { if (h_) { h_->help(); }else{ sp_->help(); } } } SceneMover::SceneMover(){ x_ = 0; y_ = 0; } SceneMover::~SceneMover(){} void SceneMover::help() { Oc::help(Scene_SceneMover_); } bool SceneMover::event(Event& e) { if (Oc::helpmode()) { if (e.type() == Event::down) { help(); } } Coord xold = x_, yold = y_; x_ = e.pointer_x(); y_ = e.pointer_y(); switch(e.type()) { case Event::down: view_ = XYView::current_pick_view(); // view_->rebind(); e.grab(this); #ifdef WIN32 e.window()->grab_pointer(); #endif break; case Event::motion: view_->move_view(x_ - xold, y_ - yold); break; case Event::up: e.ungrab(this); #ifdef WIN32 e.window()->ungrab_pointer(); #endif break; } return true; } SceneZoom::SceneZoom(){ x_ = 0; y_ = 0; xorg_ = 0; yorg_ = 0; } SceneZoom::~SceneZoom(){} void SceneZoom::help() { Oc::help(Scene_SceneZoom_); } bool SceneZoom::event(Event& e) { if (Oc::helpmode()) { if (e.type() == Event::down) { help(); } } Coord xold = x_, yold = y_; x_ = e.pointer_x(); y_ = e.pointer_y(); switch(e.type()) { case Event::down: view_ = XYView::current_pick_view(); // view_->rebind(); e.grab(this); #ifdef WIN32 e.window()->grab_pointer(); #endif xorg_ = x_; yorg_ = y_; break; case Event::motion: xold = (x_ - xold)/50; yold = (y_ - yold)/50; if (xold > .5) xold = .5; if (yold > .5) yold = .5; if (xold < -.5) xold = -.5; if (yold < -.5) yold = -.5; view_->scale_view(xorg_, yorg_, xold, yold); break; case Event::up: e.ungrab(this); #ifdef WIN32 e.window()->ungrab_pointer(); #endif break; } return true; } void RoundView::execute() { if (Oc::helpmode()) { Oc::help(Scene_RoundView_); return; } XYView* v = XYView::current_pick_view(); if (!v) return; Coord x1, y1, x2, y2; v->zin(x1, y1, x2, y2); double d1, d2; int ntic; MyMath::round_range_down(x1, x2, d1, d2, ntic); x1 = d1; x2 = d2; MyMath::round_range_down(y1, y2, d1, d2, ntic); y1 = d1; y2 = d2; v->size(x1, y1, x2, y2); v->zout(x1, y1, x2, y2); v->size(x1, y1, x2, y2); v->damage_all(); } void WholeSceneView::execute() { if (Oc::helpmode()) { Oc::help(Scene_WholeSceneView_); return; } XYView* v = XYView::current_pick_view(); if (!v) return; Scene& s = *v->scene(); v->size(s.x1(), s.y1(), s.x2(), s.y2()); Coord x1, y1, x2, y2; v->zout(x1, y1, x2, y2); v->size(x1, y1, x2, y2); v->damage_all(); } void WholePlotView::execute() { if (Oc::helpmode()) { Oc::help(Scene_WholePlotView_); return; } XYView* v = XYView::current_pick_view(); if (!v) return; Scene& s = *v->scene(); Coord x1, y1, x2, y2; s.wholeplot(x1, y1, x2, y2); MyMath::round(x1, x2, MyMath::Expand, 2); MyMath::round(y1, y2, MyMath::Expand, 2); v->box_size(x1, y1, x2, y2); v->zout(x1, y1, x2, y2); v->box_size(x1, y1, x2, y2); v->damage_all(); } void ZoomOut10::execute() { if (Oc::helpmode()) { Oc::help(Scene_ZoomOut10_); return; } XYView* v = XYView::current_pick_view(); Coord x1, x2, y1, y2; v->zout(x1, y1, x2, y2); v->size(x1, y1, x2, y2); v->damage_all(); } void ZoomIn10::execute() { if (Oc::helpmode()) { Oc::help(Scene_ZoomeIn10_); return; } XYView* v = XYView::current_pick_view(); if (!v) return; Coord x1, x2, y1, y2; v->zin(x1, y1, x2, y2); v->size(x1, y1, x2, y2); v->damage_all(); } void SPObjectName::execute() { if (Oc::helpmode()) { Oc::help(Scene_ObjectName_); } Scene* s = XYView::current_pick_view()->scene(); printf("%s\n", hoc_object_name(s->hoc_obj_ptr())); } void SpecView::execute() { if (Oc::helpmode()) { Oc::help(Scene_SpecView_); } XYView* v = XYView::current_pick_view(); if(!v) return; Coord x1, x2, y1, y2; v->zin(x1, y1, x2, y2); bool bx = var_pair_chooser("X size", x1, x2, v->canvas()->window()); bool by = var_pair_chooser("Y size", y1, y2, v->canvas()->window()); v->size(x1, y1, x2, y2); v->zout(x1, y1, x2, y2); v->size(x1, y1, x2, y2); v->damage_all(); } void SizeScene::execute() { if (Oc::helpmode()) { Oc::help(Scene_SizeScene_); return; } XYView* v = XYView::current_pick_view(); if (!v) return; Coord x1, x2, y1, y2; v->zin(x1, y1, x2, y2); v->scene()->new_size(x1, y1, x2, y2); v->zout(x1, y1, x2, y2); v->size(x1, y1, x2, y2); } NewView::NewView(){} NewView::~NewView(){} void NewView::help() { Oc::help(Scene_NewView_); } void NewView::execute(Rubberband* rb) { if (Oc::helpmode()) { help(); return; } const Event& e = rb->event(); XYView* cv = XYView::current_pick_view(); Coord l, b, r, t; Coord x1,y1, x2, y2; ((RubberRect*)rb)->get_rect_canvas(l, b, r, t); ((RubberRect*)rb)->get_rect(x1, y1, x2, y2); XYView* v = cv->new_view(x1,y1,x2,y2); ViewWindow* w = new ViewWindow(v, ((PrintableWindow*)(cv->canvas()->window()))->type()); w->place(l + e.pointer_root_x() - e.pointer_x(), b + e.pointer_root_y() - e.pointer_y()); w->map(); } ShowMenu::ShowMenu(Menu* m) { m_ = m; m->ref(); } ShowMenu::~ShowMenu() { Resource::unref(m_); } void ShowMenu::execute() { if (Oc::helpmode()) { Oc::help(Scene_ShowMenu_); return; } XYView* v = XYView::current_pick_view(); v->parent()->viewmenu(m_); } // following doesn't work correctly yet void OcViewGlyph::viewmenu(Glyph* m) { printf("OcViewGlyph::viewmenu()\n"); if (!g_) { g_ = body(); Resource::ref(g_); LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); PolyGlyph* hbox = lk.hbox(2); hbox->append(lk.center(m, 0, 1)); hbox->append(lk.center(view(), 0, 1)); body(hbox); printf("add menu\n"); }else{ printf("delete menu\n"); body(g_); Resource::unref(g_); g_ = NULL; } } PopupMenu::PopupMenu() { menu_ = WidgetKit::instance()->pulldown(); menu_->ref(); w_ = NULL; grabbed_ = false; } PopupMenu::~PopupMenu() { Resource::unref(menu_); if (w_) { delete w_; } } bool PopupMenu::event(Event& e) { if (!w_) { w_ = new PopupWindow(menu_); #if MAC w_->place(10000,10000); w_->map(); w_->unmap(); #endif } switch (e.type()) { case Event::down: if (!grabbed_) {Coord l, b; w_->place(e.pointer_root_x(), e.pointer_root_y()); w_->align(.8,.9); #if defined(WIN32) || MAC l = w_->left(); b = w_->bottom(); if (b < 0. || l < 0.) { w_->align(0., 0.); w_->place((l>0.)?l:1., (b>0.)?b:20.); } w_->map(); #else w_->map(); l = w_->left(); b = w_->bottom(); if (b < 0. || l < 0.) { w_->unmap(); w_->align(0., 0.); w_->place((l>0.)?l:1., (b>0.)?b:20.); w_->map(); } #endif e.grab(this); grabbed_ = true; menu_->press(e); } break; case Event::motion: if (grabbed_) { menu_->drag(e); } break; case Event::up: if (grabbed_) { e.ungrab(this); grabbed_ = false; w_->unmap(); menu_->release(e); } break; } return true; } void PopupMenu::append_item(MenuItem* mi) { menu_->append_item(mi); } #endif neuron-7.5/src/ivoc/scenepic.h000066400000000000000000000027461323325274500164030ustar00rootroot00000000000000#ifndef scenepicker_h #define scenepicker_h #include #include "ocpicker.h" /* right button invokes a menu. selected rubberbands and handlers become associated with left button Default menu is new view, zoom, whole scene. Default adjust is translate. Default select is new view. */ class Menu; class Button; class MenuItem; class Action; class ScenePickerImpl; class Scene; class TelltaleGroup; class DismissableWindow; class ScenePicker : public StandardPicker { public: ScenePicker(Scene*); virtual ~ScenePicker(); MenuItem* add_menu(MenuItem*, Menu* = NULL); // not executable from hoc MenuItem* add_radio_menu(const char*, Action*, Menu* = NULL); MenuItem* add_radio_menu(const char*, Rubberband*, Action*, int tool=0, Menu* = NULL); MenuItem* add_radio_menu(const char*, OcHandler*, int tool=0, Menu* = NULL); Button* radio_button(const char*, Action*); Button* radio_button(const char*, Rubberband*, Action*, int tool=0); MenuItem* add_menu(const char*, Action*, Menu* = NULL); MenuItem* add_menu(const char*, MenuItem*, Menu* = NULL); void remove_item(const char*); void insert_item(const char*, const char*, MenuItem*); virtual void pick_menu(Glyph*, int, Hit&); virtual void set_scene_tool(int); TelltaleGroup* telltale_group(); virtual const char* select_name(); virtual void select_name(const char*); virtual void help(); virtual void exec_item(const char*); static DismissableWindow* last_window(); private: ScenePickerImpl* spi_; }; #endif neuron-7.5/src/ivoc/scenevie.h000066400000000000000000000261201323325274500164030ustar00rootroot00000000000000#ifndef sceneview_h #define sceneview_h /* A universe where data is placed is a scene. There can be 0 or many views into a scene. Each view has one canvas. canvas canvas canvas . . . view view view view view scene glyph glyph glyph glyph glyph glyph glyph A scene is very similar to a page in that we have arbitrary placement of glyphs. However, the protocol differs in that the user should call Scene::modified(GlyphIndex) whenever a glyph's allocation needs to be recomputed or its request will change. If you wish merely to redraw the glyph with Scene's stored allocation one can call Scene::damage(GlyphIndex). Notice that all communication with Scene is in terms of Scene coordinates. (If the scene coordinates are changed after construction, there are two coordinate systems. see below) Scene maintains a list of views whose canvas will be damaged whenever the scene changes. This list is maintained during construction and destruction of views. Scene maintains a list of glyphs along with their allocations and placement. Note that when Scene::modified is called, damage is called on both the old (stored by Scene) and new allocation of the glyph. It is sometimes the case that scene coordinates have inappropriate scales for some glyphs such as labels on a plot (even though their placement is still in scene coords). Here we want the labels to have a fixed appearance on the screen regardless of the scene scaling. This is done with append_fixed(). Such glyphs are relative to the scaling of the xyview's parent glyph. (Therefore the PrintWindowManager will scale these, relative to the resizing of the window on the paper icon. See the implementation for how to go further using view_transform()) It is also sometimes the case that we want items positioned relative to the view window. This is done with append_viewfixed(). Such glyphs have a location that is relative to view coordinates. (0,0) is left,bottom and (1,1) is right,top Items added to the list are not displayed until they are moved away from (0,0) or modified() to avoid damageing large portions of the canvas with the common append/move. */ /* The static function XYView* XYView::current_pick_view holds the view of latest pick. From that a glyph in the scene can obtain current scene. */ /* The creator of a scene may use a standard method of input handling by accessing the method picker() which provides a way of associating actions with mouse events. By default the right mouse button pops up a menu with zoom, new view, and whole scene items. The middle button translates the view. The left button defaults to new view. These actions have names which label the print window manager when one enters a view. See ocpicker.h for details. */ /* To put a view into a window with a banner that shows the size in scene coordinates, use ViewWindow(XYView*) */ #include #include #include "apwindow.h" #include "ocglyph.h" #include #undef Scene class Scene; class SceneInfo_List; class SceneInfo; class XYView; class XYView_PtrList; class ScenePicker; class GLabel; class GPolyLine; struct Object; class OcViewGlyph : public OcGlyph { public: OcViewGlyph(XYView*); virtual ~OcViewGlyph(); XYView* view() {return v_;} virtual void save(ostream&); void viewmenu(Glyph*); private: XYView* v_; Glyph* g_; }; // view into a scene; independent scales in x and y direction. // ie. as window resized, view remains same (directions magnified separately) class XYView : public TransformSetter , public Observable{ public: XYView(Scene*, Coord xsize=200, Coord ysize=200); XYView(Coord x1, Coord y1, Coord x_span, Coord y_span, Scene*, Coord xsize=200, Coord ysize=200); virtual ~XYView(); virtual Scene* scene() const; virtual Coord left() const, right() const, top() const, bottom() const; virtual Coord width() const, height() const; virtual void damage(Glyph*, const Allocation&, bool fixed = false, bool viewfixed = false); virtual void damage(Coord x1, Coord y1, Coord x2, Coord y2); virtual void damage_all(); /* damage area in model coords, call from draw */ virtual void damage_area(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const; virtual void set_damage_area(Canvas*); virtual void request(Requisition&)const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual void undraw(); Canvas* canvas(); //transforms canvas from scene to parent glyph coordinates. const Transformer& s2o()const {return scene2viewparent_;} void canvas(Canvas*); void size(Coord x1, Coord y1, Coord x2, Coord y2); void origin(Coord x1, Coord y1); void x_span(Coord); void y_span(Coord); virtual void box_size(Coord x1, Coord y1, Coord x2, Coord y2); static XYView* current_pick_view(); static void current_pick_view(XYView*); static XYView* current_draw_view(); Coord x_pick_epsilon() {return x_pick_epsilon_;} Coord y_pick_epsilon() {return y_pick_epsilon_;} virtual void move_view(Coord dx, Coord dy); // in screen coords. virtual void scale_view(Coord xorg, Coord yorg, float dxscale, float dyscale); // in screen coords. virtual XYView* new_view(Coord x1, Coord y1, Coord x2, Coord y2); void rebind(); // stop the flicker on scale_view and move_view virtual void save(ostream&); OcViewGlyph* parent() { return parent_;} virtual void printfile(const char*); virtual void zout(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const; virtual void zin(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const; Coord view_margin() const {return view_margin_;} virtual void view_ratio(float xratio, float yratio, Coord& x, Coord& y) const; virtual void ratio_view(Coord x, Coord y, float& xratio, float& yratio) const; virtual void stroke(Canvas*, const Color*, const Brush*); protected: virtual void transform( Transformer&, const Allocation&, const Allocation& natural ) const; void scene2view(const Allocation& parent) const; void csize(Coord x0, Coord xsize, Coord y0, Coord ysize) const; // not really const private: void init(Coord x1, Coord y1, Coord x_span, Coord y_span, Scene*, Coord xsize, Coord ysize); void append_view(Scene*); protected: Coord x_pick_epsilon_, y_pick_epsilon_; private: Coord x1_, y1_, x_span_, y_span_; Canvas* canvas_; Transformer scene2viewparent_; Coord xsize_, ysize_, xsize_orig_, ysize_orig_, xc0_, yc0_; friend class OcViewGlyph; OcViewGlyph* parent_; Coord xd1_, xd2_, yd1_, yd2_; static Coord view_margin_; }; // view into a scene; scale in x & y direction is the same and determined // by span in smallest window dimension. Coords are scene coordinates. class View : public XYView { public: View(Scene*); // view of entire scene View(Coord x, Coord y, Coord span, Scene*, Coord xsize = 200, Coord ysize = 200); //x,y is center of view View(Coord left, Coord bottom, Coord x_span, Coord y_span, Scene*, Coord xsize=200, Coord ysize=200); virtual ~View(); virtual Coord x() const, y() const; virtual Coord view_width() const, view_height() const; void origin(Coord x, Coord y); // center virtual void box_size(Coord x1, Coord y1, Coord x2, Coord y2); virtual void move_view(Coord dx, Coord dy); // in screen coords. virtual void scale_view(Coord xorg, Coord yorg, float dxscale, float dyscale); // in screen coords. virtual XYView* new_view(Coord x1, Coord y1, Coord x2, Coord y2); protected: virtual void transform( Transformer&, const Allocation&, const Allocation& natural ) const; private: Coord x_span_, y_span_; }; class Scene : public Glyph , public Observable{ public: Scene(Coord x1, Coord y1, Coord x2, Coord y2, Glyph* background=NULL); virtual ~Scene(); virtual void background(Glyph* bg=NULL); virtual Coord x1() const, y1() const, x2() const, y2() const; virtual void new_size(Coord x1, Coord y1, Coord x2, Coord y2); virtual void wholeplot(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const; virtual int view_count() const; virtual XYView* sceneview(int) const; virtual void dismiss(); // dismiss windows that contain only this scene virtual void printfile(const char*); virtual void modified(GlyphIndex); void move(GlyphIndex, Coord x, Coord y); void location(GlyphIndex, Coord& x, Coord& y)const; void show(GlyphIndex, bool); bool showing(GlyphIndex) const; virtual void damage(GlyphIndex); virtual void damage(Coord x1, Coord y1, Coord x2, Coord y2); virtual void damage_all(); enum {NOTOOL=0, MOVE, DELETE, CHANGECOLOR, EXTRATOOL}; virtual void tool(int); virtual int tool(); virtual void help(); virtual void delete_label(GLabel*); virtual void change_label_color(GLabel*); virtual void change_line_color(GPolyLine*); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void print(Printer*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual void append(Glyph*); virtual void append_fixed(Glyph*); virtual void append_viewfixed(Glyph*); virtual void prepend(Glyph*); virtual void insert(GlyphIndex, Glyph*); virtual void remove(GlyphIndex); virtual void replace(GlyphIndex, Glyph*); virtual void change(GlyphIndex); virtual void change_to_fixed(GlyphIndex, XYView*); virtual void change_to_vfixed(GlyphIndex, XYView*); virtual GlyphIndex count() const; virtual Glyph* component(GlyphIndex) const; virtual void allotment(GlyphIndex, DimensionName, Allotment&) const; virtual GlyphIndex glyph_index(const Glyph*); bool drawing_fixed_item()const { return drawing_fixed_item_;} static void save_all(ostream&); static long scene_list_index(Scene*); bool mark() {return mark_;} void mark(bool m) {mark_ = m;} virtual void save_phase1(ostream&); virtual void save_phase2(ostream&); virtual Coord mbs() const; static const Color* default_background(); static const Color* default_foreground(); ScenePicker* picker(); Object* hoc_obj_ptr() { return hoc_obj_ptr_;} void hoc_obj_ptr(Object* o) { hoc_obj_ptr_ = o;} bool menu_picked() { return menu_picked_;} protected: virtual void save_class(ostream&, const char*); private: #if 1 friend class XYView; #else // I prefer this but the SGI compiler doesn't like it friend void XYView::append_view(Scene*); friend XYView::~XYView(); #endif virtual void damage(GlyphIndex, const Allocation&); void append_view(XYView*); void remove_view(XYView*); void check_allocation(GlyphIndex); private: Coord x1_, y1_, x2_, y2_; SceneInfo_List* info_; XYView_PtrList* views_; Glyph* background_; ScenePicker* picker_; int tool_; bool mark_; static Scene* current_scene_; static Coord mbs_; // menu_box_size (pixels) in left top bool drawing_fixed_item_; Object* hoc_obj_ptr_; bool menu_picked_; Coord x1_orig_, x2_orig_, y1_orig_, y2_orig_; }; class ViewWindow : public PrintableWindow , public Observer { public: ViewWindow(XYView*, const char* name); virtual ~ViewWindow(); virtual void update(Observable*); virtual void reconfigured(); }; inline Coord Scene::x1() const { return x1_; } inline Coord Scene::x2() const { return x2_; } inline Coord Scene::y1() const { return y1_; } inline Coord Scene::y2() const { return y2_; } #endif neuron-7.5/src/ivoc/strfun.cpp000066400000000000000000000203661323325274500164640ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include "classreg.h" #include "oc2iv.h" #include // for alias #include #include #include // for references #include #if HAVE_IV #include #endif extern "C" { extern Objectdata* hoc_top_level_data; extern Symlist* hoc_built_in_symlist; extern int nrn_is_artificial(int); } inline unsigned long key_to_hash(String& s) {return s.hash();} implementTable(SymbolTable, String, Symbol*) static double l_substr(void*) { char* s1 = gargstr(1); char* s2 = gargstr(2); char* p = strstr(s1, s2); if (p) { return double(p - s1); }else{ return -1.; } } static double l_len(void*) { return double(strlen(gargstr(1))); } static double l_head(void*) { String text(gargstr(1)); Regexp r(gargstr(2)); r.Search(text.string(), text.length(), 0, text.length()); int i = r.BeginningOfMatch(); // text.set_to_left(i); doesnt work char** head = hoc_pgargstr(3); if (i > 0) { char* buf = new char[i+1]; strncpy(buf, text.string(), i); buf[i] = '\0'; hoc_assign_str(head, buf); delete [] buf; }else{ hoc_assign_str(head, ""); } return double(i); } static double l_tail(void*) { CopyString text(gargstr(1)); Regexp r(gargstr(2)); r.Search(text.string(), text.length(), 0, text.length()); int i = r.EndOfMatch(); char** tail = hoc_pgargstr(3); if (i >= 0) { hoc_assign_str(tail, text.string() + i); }else{ hoc_assign_str(tail, ""); } return double(i); } static double l_left(void*) { CopyString text(gargstr(1)); CopyString newtext = text.left(int(chkarg(2,0,strlen(gargstr(1))))); hoc_assign_str(hoc_pgargstr(1), newtext.string()); return 1.; } static double l_right(void*) { CopyString text(gargstr(1)); CopyString newtext = text.right(int(chkarg(2,0,strlen(gargstr(1))))); hoc_assign_str(hoc_pgargstr(1), newtext.string()); return 1.; } static double l_is_name(void*) { return hoc_lookup(gargstr(1)) ? 1. : 0.; } extern "C" { extern void hoc_free_symspace(Symbol*); extern Object* hoc_newobj1(Symbol*, int); extern Symlist* hoc_top_level_symlist; extern Symbol* ivoc_alias_lookup(const char* name, Object* ob) { IvocAliases* a = (IvocAliases*)ob->aliases; if (a) { return a->lookup(name); } return NULL; } extern void ivoc_free_alias(Object* ob) { IvocAliases* a = (IvocAliases*)ob->aliases; if (a) delete a; } } static double l_alias(void*) { char* name; Object* ob = *hoc_objgetarg(1); IvocAliases* a = (IvocAliases*)ob->aliases; Symbol* sym; if (!ifarg(2)) { // remove them all if (a) { delete a; } return 0.; } name = gargstr(2); if (!a) { a = new IvocAliases(ob); } sym = a->lookup(name); if (sym) { a->remove(sym); } if (ifarg(3)) { sym = a->install(name); if (hoc_is_object_arg(3)) { sym->u.object_ = *hoc_objgetarg(3); hoc_obj_ref(sym->u.object_); sym->type = OBJECTALIAS; }else{ sym->u.pval = hoc_pgetarg(3); sym->type = VARALIAS; } } return 0.; } static Object** l_alias_list(void*) { // Assumes that a hoc String exists with constructor that takes a strdef Object* ob = *hoc_objgetarg(1); IvocAliases* a = (IvocAliases*)ob->aliases; OcList* list = new OcList(); list->ref(); Symbol* sl = hoc_lookup("List"); Symbol* st = hoc_table_lookup("String", hoc_top_level_symlist); if (!st || st->type != TEMPLATE) { printf("st=%p %s %d\n", st, st?st->name:"NULL", st?st->type:0); hoc_execerror("String is not a template", 0); } Object** po = hoc_temp_objvar(sl, list); (*po)->refcount++; int id = (*po)->index; if (a) { char buf[256]; for (TableIterator(SymbolTable) i(*a->symtab_); i.more(); i.next()) { Symbol* sym = i.cur_value(); hoc_pushstr(&sym->name); Object* sob = hoc_newobj1(st, 1); list->append(sob); --sob->refcount; } } (*po)->refcount--; return po; } // does o refer to ob static int l_ref2(Object* o, Object* ob, int nr) { int i, total; if (!o) { return nr; } if (o->ctemplate->constructor) { return nr; } Symlist* sl = o->ctemplate->symtable; Symbol* s; if (sl) for (s = sl->first; s; s = s->next) { if (s->type == OBJECTVAR && s->cpublic < 2) { total = hoc_total_array_data(s, o->u.dataspace); for (i=0; i < total; ++i) { Object** obp = o->u.dataspace[s->u.oboff].pobj + i; if (*obp == ob) { if (total == 1) { printf(" %s.%s\n", hoc_object_name(o), s->name); }else{ printf(" %s.%s[%d]\n", hoc_object_name(o), s->name, i); } ++nr; } } } } return nr; } // does data refer to ob static int l_ref1(Symlist* sl, Objectdata* data, Object* ob, int nr) { int i, total; Symbol* s; if (sl) for (s = sl->first; s; s = s->next) { if (s->type == OBJECTVAR && s->cpublic < 2) { total = hoc_total_array_data(s, data); for (i=0; i < total; ++i) { Object** obp = data[s->u.oboff].pobj + i; if (*obp == ob) { if (total == 1) { printf(" %s\n", s->name); }else{ printf(" %s[%d]\n", s->name, i); } ++nr; } } } } return nr; } static int l_ref0(Symlist* sl, Object* ob, int nr) { Symbol* s; cTemplate* t; if (sl) for (s = sl->first; s; s = s->next) { if (s->type == TEMPLATE) { t = s->u.ctemplate; hoc_Item* q; ITERATE(q, t->olist) { nr = l_ref2(OBJ(q), ob, nr); } } } return nr; } static int l_ref3(Symbol* s, Object* ob, int nr) { #if HAVE_IV hoc_Item* q; ITERATE(q, s->u.ctemplate->olist) { OcBox* b = (OcBox*)(OBJ(q)->u.this_pointer); if (b->keep_ref() == ob){ printf(" %s.ref\n", hoc_object_name(OBJ(q))); ++nr; } } return nr; #else return 0; #endif } static int l_ref4(Symbol* s, Object* ob, int nr) { hoc_Item* q; long i; ITERATE(q, s->u.ctemplate->olist) { OcList* list = (OcList*)(OBJ(q)->u.this_pointer); if (list->refs_items()) for (i = 0; i < list->count(); ++i) { if (list->object(i) == ob) { printf(" %s.object(%ld)\n", hoc_object_name(OBJ(q)), i); ++nr; } } } return nr; } static double l_ref(void*) { Object* ob = *hoc_objgetarg(1); int nr = ob ? ob->refcount : 0; printf("%s has %d references\n", hoc_object_name(ob), nr); if (nr == 0) { return 0.; } nr = 0; nr = l_ref1(hoc_top_level_symlist, hoc_top_level_data, ob, nr); nr = l_ref0(hoc_top_level_symlist, ob, nr); // any due to boxes nr = l_ref3(hoc_table_lookup("HBox", hoc_built_in_symlist), ob, nr); nr = l_ref3(hoc_table_lookup("VBox", hoc_built_in_symlist), ob, nr); nr = l_ref4(hoc_table_lookup("List", hoc_built_in_symlist), ob, nr); printf(" found %d of them\n", nr); return (double)nr; } static double l_is_point(void*) { Object* ob = *hoc_objgetarg(1); return double(ob ? ob->ctemplate->is_point_ : 0); } static double l_is_artificial(void*) { Object* ob = *hoc_objgetarg(1); int type = ob ? ob->ctemplate->is_point_ : 0; if (type == 0) { return 0.; } return nrn_is_artificial(type) ? type : 0; } static Member_func l_members[] = { "substr", l_substr, "len", l_len, "head", l_head, "tail", l_tail, "right", l_right, "left", l_left, "is_name", l_is_name, "alias", l_alias, "references", l_ref, "is_point_process", l_is_point, "is_artificial", l_is_artificial, 0,0 }; static Member_ret_obj_func l_obj_members[] = { "alias_list", l_alias_list, 0,0 }; static void* l_cons(Object*) { return NULL; } static void l_destruct(void*) { } void StringFunctions_reg() { class2oc("StringFunctions", l_cons, l_destruct, l_members, NULL, l_obj_members, NULL); } IvocAliases::IvocAliases(Object* ob){ ob_ = ob; ob_->aliases = (void*)this; symtab_ = new SymbolTable(20); } IvocAliases::~IvocAliases(){ ob_->aliases = NULL; for (TableIterator(SymbolTable) i(*symtab_); i.more(); i.next()) { Symbol* sym = i.cur_value(); hoc_free_symspace(sym); free(sym->name); free(sym); } delete symtab_; } Symbol* IvocAliases::lookup(const char* name){ String s(name); Symbol* sym; if (!symtab_->find(sym, s)) { sym = NULL; } return sym; } Symbol* IvocAliases::install(const char* name){ Symbol* sp; sp = (Symbol*)emalloc(sizeof(Symbol)); sp->name = (char*)emalloc(strlen(name)+1); strcpy(sp->name, name); sp->type = VARALIAS; sp->cpublic = 0; // cannot be 2 or cannot be freed sp->extra = 0; sp->arayinfo = 0; String s(sp->name); symtab_->insert(s, sp); return sp; } void IvocAliases::remove(Symbol* sym){ hoc_free_symspace(sym); String s(sym->name); symtab_->remove(s); free(sym->name); free(sym); } neuron-7.5/src/ivoc/symchoos.cpp000066400000000000000000000445141323325274500170100ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* hacked by Michael Hines from filechooser.c */ /* * SymChooser -- select a name */ #if HAVE_IV #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "symchoos.h" #include "utility.h" #include "symdir.h" #include "oc2iv.h" #include "parse.h" #endif /* HAVE_IV */ #include "classreg.h" #if HAVE_IV class SymChooserImpl { private: friend class SymChooser; friend class SymBrowserAccept; SymChooserImpl(int nbrowser); ~SymChooserImpl(); String* name_; WidgetKit* kit_; SymChooser* fchooser_; int nbrowser_; int browser_index_; FileBrowser** fbrowser_; FieldEditor* editor_; FieldEditor* filter_; FieldEditor* directory_filter_; int* filter_map_; SymDirectory** dir_; SymChooserAction* action_; const String* selected_; CopyString last_selected_; int last_index_; Style* style_; Action* update_; void init(SymChooser*, Style*, SymChooserAction*); void scfree(); void build(); Menu* makeshowmenu(); void clear(int); void load(int); void show(int); void show_all(); void show_var(); void show_objid(); void show_objref(); void show_sec(); double* selected_var(); int selected_vector_count(); FieldEditor* add_filter( Style*, const char* pattern_attribute, const char* default_pattern, const char* caption_attribute, const char* default_caption, Glyph*, FieldEditorAction* ); bool filtered(const String&, FieldEditor*); void accept_browser(); void accept_browser_index(int); void cancel_browser(); void editor_accept(FieldEditor*); void filter_accept(FieldEditor*); bool chdir(int, int); }; /*static*/ class SymBrowserAccept : public Action { public: SymBrowserAccept(SymChooserImpl*, int); virtual ~SymBrowserAccept(); virtual void execute(); private: SymChooserImpl* sci_; int browser_index_; }; SymBrowserAccept::SymBrowserAccept(SymChooserImpl* sci, int browser_index) { sci_ = sci; browser_index_ = browser_index; } SymBrowserAccept::~SymBrowserAccept(){} void SymBrowserAccept::execute(){ sci_->accept_browser_index(browser_index_); } #endif /* HAVE_IV */ static void* scons(Object*) { #if HAVE_IV SymChooser* sc = NULL; IFGUI const char* caption = "Choose a Variable Name or"; if (ifarg(1)) { caption = gargstr(1); } Style* style = new Style(Session::instance()->style()); style->attribute("caption", caption); if (ifarg(2)) { Symbol* sym = hoc_lookup(gargstr(2)); int type = RANGEVAR; if (sym) { type = sym->type; } sc = new SymChooser(new SymDirectory(type), WidgetKit::instance(), style, NULL, 1); }else{ sc = new SymChooser(NULL, WidgetKit::instance(), style); } Resource::ref(sc); ENDGUI return (void*)sc; #else return (void*)0; #endif /* HAVE_IV */ } static void sdestruct(void* v) { #if HAVE_IV SymChooser* sc = (SymChooser*)v; Resource::unref(sc); #endif /* HAVE_IV */ } static double srun(void* v) { #if HAVE_IV bool b = false; IFGUI SymChooser* sc = (SymChooser*)v; Display* d = Session::instance()->default_display(); b = sc->post_at_aligned(d->width()/2, d->height()/2, .5, .5); ENDGUI return double(b); #else return 0.; #endif /* HAVE_IV */ } static double text(void* v) { #if HAVE_IV IFGUI SymChooser* sc = (SymChooser*)v; hoc_assign_str(hoc_pgargstr(1), sc->selected()->string()); ENDGUI return 0.; #else return 0.; #endif /* HAVE_IV */ } static Member_func members[] = { "run", srun, "text", text, 0, 0 }; void SymChooser_reg() { class2oc("SymChooser", scons, sdestruct, members, NULL, NULL, NULL); } #if HAVE_IV declareActionCallback(SymChooserImpl) implementActionCallback(SymChooserImpl) declareFieldEditorCallback(SymChooserImpl) implementFieldEditorCallback(SymChooserImpl) #define SHOW_SECTION 1 SymChooser::SymChooser( SymDirectory* dir, WidgetKit* kit, Style* s, SymChooserAction* a, int nbrowser ) : Dialog(NULL, s) { impl_ = new SymChooserImpl(nbrowser); SymChooserImpl& fc = *impl_; if (dir) { fc.dir_[0] = dir; }else{ #if SHOW_SECTION fc.dir_[0] = new SymDirectory(SECTION); #else fc.dir_[0] = new SymDirectory(-1); #endif } Resource::ref(dir); // fc.name_ = new CopyString(dir->name()); fc.kit_ = kit; fc.init(this, s, a); } SymChooser::~SymChooser() { impl_->scfree(); delete impl_; } const String* SymChooser::selected() const { return impl_->selected_; } double* SymChooser::selected_var() { return impl_->selected_var(); } int SymChooser::selected_vector_count() { return impl_->selected_vector_count(); } void SymChooser::reread() { SymChooserImpl& fc = *impl_; #if 0 if (!fc.chdir(fc.dir_->path())) { /* should generate an error message */ } #endif } void SymChooser::dismiss(bool accept) { Dialog::dismiss(accept); SymChooserImpl& fc = *impl_; if (fc.action_ != NULL) { fc.action_->execute(this, accept); } } /** class SymChooserImpl **/ SymChooserImpl::SymChooserImpl(int nbrowser) { nbrowser_ = nbrowser; dir_ = new SymDirectory*[nbrowser]; fbrowser_ = new FileBrowser*[nbrowser]; last_index_ = -1; for (int i=0; i < nbrowser_; ++i) { dir_[i] = NULL; fbrowser_[i] = NULL; } } SymChooserImpl::~SymChooserImpl() { delete [] dir_; delete [] fbrowser_; } void SymChooserImpl::init( SymChooser* chooser, Style* s, SymChooserAction* a ) { fchooser_ = chooser; filter_map_ = NULL; Resource::ref(a); action_ = a; style_ = new Style(s); Resource::ref(style_); style_->alias("FileChooser"); style_->alias("Dialog"); update_ = new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::build ); style_->add_trigger_any(update_); build(); } void SymChooserImpl::scfree() { // delete name_; for (int i=nbrowser_-1; i >= 0; --i) { Resource::unref(dir_[i]); } delete [] filter_map_; Resource::unref(action_); style_->remove_trigger_any(update_); Resource::unref(style_); } void SymChooserImpl::build() { WidgetKit& kit = *kit_; const LayoutKit& layout = *LayoutKit::instance(); Style* s = style_; kit.push_style(); kit.style(s); String caption(""); s->find_attribute("caption", caption); String subcaption("Enter Symbol name:"); s->find_attribute("subcaption", subcaption); String open("Accept"); s->find_attribute("open", open); String close("Cancel"); s->find_attribute("cancel", close); long rows = 10; s->find_attribute("rows", rows); const Font* f = kit.font(); FontBoundingBox bbox; f->font_bbox(bbox); Coord height = rows * (bbox.ascent() + bbox.descent()) + 1.0; Coord width; if (!s->find_attribute("width", width)) { width = 16 * f->width('m') + 3.0; } int i; Action* accept = new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::accept_browser ); Action* cancel = new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::cancel_browser ); editor_ = DialogKit::instance()->field_editor( "", s, new FieldEditorCallback(SymChooserImpl)( this, &SymChooserImpl::editor_accept, NULL ) ); browser_index_ = 0; for (i=0; i < nbrowser_; ++i) { fbrowser_[i] = new FileBrowser(kit_, new SymBrowserAccept(this, i), NULL); } fchooser_->remove_all_input_handlers(); fchooser_->append_input_handler(editor_); for (i=0; i < nbrowser_; ++i) { fchooser_->append_input_handler(fbrowser_[i]); } fchooser_->next_focus(); Glyph* g = layout.vbox(); if (caption.length() > 0) { g->append(layout.r_margin(kit.fancy_label(caption), 5.0, fil, 0.0)); } if (subcaption.length() > 0) { g->append(layout.r_margin(kit.fancy_label(subcaption), 5.0, fil, 0.0)); } g->append(layout.vglue(5.0, 0.0, 2.0)); g->append(editor_); g->append(layout.vglue(5.0, 0.0, 2.0)); g->append(makeshowmenu()); g->append(layout.vglue(15.0, 0.0, 12.0)); PolyGlyph* h = layout.hbox(nbrowser_); Glyph* b; for (i=0; i < nbrowser_; ++i) { b = layout.hbox( layout.vcenter( kit.inset_frame( layout.margin( layout.natural_span(fbrowser_[i], width, height), 1.0 ) ), 1.0 ), layout.hspace(4.0), kit.vscroll_bar(fbrowser_[i]->adjustable()) ); h->append(b); } g->append(h); g->append(layout.vspace(15.0)); if (s->value_is_on("filter")) { FieldEditorAction* action = new FieldEditorCallback(SymChooserImpl)( this, &SymChooserImpl::filter_accept, NULL ); filter_ = add_filter( s, "filterPattern", "", "filterCaption", "Filter:", g, action ); if (s->value_is_on("directoryFilter")) { directory_filter_ = add_filter( s, "directoryFilterPattern", "", "directoryFilterCaption", "Name Filter:", g, action ); } else { directory_filter_ = NULL; } } else { filter_ = NULL; directory_filter_ = NULL; } g->append( layout.hbox( layout.hglue(10.0), layout.vcenter(kit.default_button(open, accept)), layout.hglue(10.0, 0.0, 5.0), layout.vcenter(kit.push_button(close, cancel)), layout.hglue(10.0) ) ); fchooser_->body( layout.vcenter(kit.outset_frame(layout.margin(g, 5.0)), 1.0) ); kit.pop_style(); load(0); } Menu* SymChooserImpl::makeshowmenu() { WidgetKit& k = *WidgetKit::instance(); Menu* mb = k.menubar(); MenuItem* mi = k.menubar_item("Show"); mb->append_item(mi); Menu* mp = k.pulldown(); mi->menu(mp); TelltaleGroup* ttg = new TelltaleGroup(); mi = K::radio_menu_item(ttg, "All"); mi->action(new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::show_all )); mp->append_item(mi); mi->state()->set(TelltaleState::is_chosen, true); mi = K::radio_menu_item(ttg, "Variables"); mi->action(new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::show_var )); mp->append_item(mi); mi = K::radio_menu_item(ttg, "Object refs"); mi->action(new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::show_objref )); mp->append_item(mi); mi = K::radio_menu_item(ttg, "Objects"); mi->action(new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::show_objid )); mp->append_item(mi); mi = K::radio_menu_item(ttg, "Sections"); mi->action(new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::show_sec )); mp->append_item(mi); #if SHOW_SECTION mi->state()->set(TelltaleState::is_chosen, true); #endif return mb; } void SymChooserImpl::show(int i) { Resource::unref(dir_[0]); dir_[0] = new SymDirectory(i); clear(0); load(0); } void SymChooserImpl::show_all() { show(-1); } void SymChooserImpl::show_var() { show(VAR); } void SymChooserImpl::show_objref() { show(OBJECTVAR); } void SymChooserImpl::show_objid() { show(TEMPLATE); } void SymChooserImpl::show_sec() { show(SECTION); } void SymChooserImpl::clear(int bindex) { for (int bi = bindex ; bi < nbrowser_; ++bi) { //printf("clearing %d\n", bi); FileBrowser& b = *fbrowser_[bi]; b.select(-1); GlyphIndex n = b.count(); for (GlyphIndex i = 0; i < n; i++) { b.remove_selectable(0); b.remove(0); } b.refresh(); // b.undraw(); // with this the slider gets changed. albeit the mouse has //to run over it. But the new load doesn't appear til //the mouse runs over it } } void SymChooserImpl::load(int bindex) { SymDirectory& d = *dir_[bindex]; Browser& b = *fbrowser_[bindex]; WidgetKit& kit = *kit_; kit.push_style(); kit.style(style_); const LayoutKit& layout = *LayoutKit::instance(); int dircount = d.count(); delete [] filter_map_; int* index = new int[dircount]; filter_map_ = index; //printf("loading %d\n", bindex); for (int i = 0; i < dircount; i++) { const String& f = d.name(i); bool is_dir = d.is_directory(i); if ((is_dir && filtered(f, directory_filter_)) || (!is_dir && filtered(f, filter_)) ) { Glyph* name = kit.label(f); if (is_dir) { if (d.symbol(i) && d.symbol(i)->type == TEMPLATE) { name = layout.hbox(name, kit.label("_")); }else{ name = layout.hbox(name, kit.label(".")); } } Glyph* label = new Target( layout.h_margin(name, 3.0, 0.0, 0.0, 15.0, fil, 0.0), TargetPrimitiveHit ); TelltaleState* t = new TelltaleState(TelltaleState::is_enabled); b.append_selectable(t); b.append(new ChoiceItem(t, label, kit.bright_inset_frame(label))); *index++ = i; } } // the order of the following two statements is important for carbon // to avoid a premature browser request which ends up showing an // empty list. fbrowser_[bindex]->refresh(); editor_->field(d.path()); kit.pop_style(); } FieldEditor* SymChooserImpl::add_filter( Style* s, const char* pattern_attribute, const char* default_pattern, const char* caption_attribute, const char* default_caption, Glyph* body, FieldEditorAction* action ) { String pattern(default_pattern); s->find_attribute(pattern_attribute, pattern); String caption(default_caption); s->find_attribute(caption_attribute, caption); FieldEditor* e = DialogKit::instance()->field_editor(pattern, s, action); fchooser_->append_input_handler(e); WidgetKit& kit = *kit_; LayoutKit& layout = *LayoutKit::instance(); body->append( layout.hbox( layout.vcenter(kit.fancy_label(caption), 0.5), layout.hspace(2.0), layout.vcenter(e, 0.5) ) ); body->append(layout.vspace(10.0)); return e; } bool SymChooserImpl::filtered(const String& name, FieldEditor* e) { if (e == NULL) { return true; } const String* s = e->text(); if (s == NULL || s->length() == 0) { return true; } return s == NULL || s->length() == 0 || SymDirectory::match(name, *s); } void SymChooserImpl::accept_browser_index(int bindex) { int i = int(fbrowser_[bindex]->selected()); if (i == -1) { return; } // i = filter_map_[i]; SymDirectory* dir = dir_[bindex]; const String& path = dir->path(); const String& name = dir->name(i); Symbol* sym = dir->symbol(i); int length = path.length() + name.length(); char* tmp = new char[length + 2]; sprintf( tmp, "%.*s%.*s", path.length(), path.string(), name.length(), name.string() ); editor_->field(tmp); last_selected_ = tmp; last_index_ = i; selected_ = editor_->text(); if (dir->is_directory(i)) { if (chdir(bindex, i)) { fchooser_->focus(editor_); } else { /* should generate an error message */ } } else { clear(bindex+1); browser_index_ = bindex; // fchooser_->dismiss(true); } delete [] tmp; } double* SymChooserImpl::selected_var() { if (last_index_ != -1 && strcmp(selected_->string(), last_selected_.string()) == 0) { SymDirectory* dir = dir_[browser_index_]; return dir->variable(last_index_); }else{ return NULL; } } int SymChooserImpl::selected_vector_count() { if (last_index_ != -1 && strcmp(selected_->string(), last_selected_.string()) == 0) { SymDirectory* dir = dir_[browser_index_]; return dir->whole_vector(last_index_); }else{ return 0; } } void SymChooserImpl::accept_browser() { int bi = browser_index_; int i = int(fbrowser_[bi]->selected()); if (i == -1) { editor_accept(editor_); return; } // i = filter_map_[i]; const String& path = dir_[bi]->path(); const String& name = dir_[bi]->name(i); int length = path.length() + name.length(); char* tmp = new char[length + 1]; sprintf( tmp, "%.*s%.*s", path.length(), path.string(), name.length(), name.string() ); //printf("accept_browser %s\n", tmp); editor_->field(tmp); selected_ = editor_->text(); if (dir_[bi]->is_directory(i)) { if (chdir(bi, i)) { fchooser_->focus(editor_); } else { /* should generate an error message */ } } else { fchooser_->dismiss(true); } delete [] tmp; } void SymChooserImpl::cancel_browser() { selected_ = NULL; fchooser_->dismiss(false); } void SymChooserImpl::editor_accept(FieldEditor* e) { int i; int bi = browser_index_; if ((i = dir_[bi]->index(*e->text())) >= 0 ) { if (!chdir(bi, i)) { selected_ = &dir_[bi]->name(i); fchooser_->dismiss(true); } return; }else{ selected_ = e->text(); fchooser_->dismiss(true); } } void SymChooserImpl::filter_accept(FieldEditor*) { clear(0); load(0); } bool SymChooserImpl::chdir(int bindex, int index) { if (dir_[bindex]->is_directory(index)) { int bi; SymDirectory* d; if (dir_[bindex]->obj(index)) { d = new SymDirectory(dir_[bindex]->obj(index)); bi = bindex; }else{ d = new SymDirectory( dir_[bindex]->path(), dir_[bindex]->object(), dir_[bindex]->symbol(index), dir_[bindex]->array_index(index)); bi = bindex + 1; if (bi > nbrowser_-1) { bi = nbrowser_-1; // rotate } } Resource::ref(d); browser_index_ = bi; Resource::unref(dir_[bi]); dir_[bi] = d; clear(bi); load(bi); return true; } return false; } /** class SymChooserAction **/ SymChooserAction::SymChooserAction() { } SymChooserAction::~SymChooserAction() { } void SymChooserAction::execute(SymChooser*, bool) { } #endif /* HAVE_IV */ neuron-7.5/src/ivoc/symchoos.h000066400000000000000000000061561323325274500164550ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* hacked by Michael Hines from fchooser.h */ /* * SymChooser -- select a Symbol */ #ifndef symchooser_h #define symchooser_h #include #include #include class SymChooser; class SymChooserImpl; class String; class WidgetKit; class SymDirectory; class SymChooserAction : public Resource { protected: SymChooserAction(); virtual ~SymChooserAction(); public: virtual void execute(SymChooser*, bool accept); }; #if defined(__STDC__) || defined(__ANSI_CPP__) #define SymChooserCallback(T) T##_SymChooserCallback #define SymChooserMemberFunction(T) T##_SymChooserMemberFunction #else #define SymChooserCallback(T) T/**/_SymChooserCallback #define SymChooserMemberFunction(T) T/**/_SymChooserMemberFunction #endif #define declareSymChooserCallback(T) \ typedef void (T::*SymChooserMemberFunction(T))(SymChooser*, bool); \ class SymChooserCallback(T) : public SymChooserAction { \ public: \ SymChooserCallback(T)(T*, SymChooserMemberFunction(T)); \ virtual ~SymChooserCallback(T)(); \ \ virtual void execute(SymChooser*, bool accept); \ private: \ T* obj_; \ SymChooserMemberFunction(T) func_; \ }; #define implementSymChooserCallback(T) \ SymChooserCallback(T)::SymChooserCallback(T)( \ T* obj, SymChooserMemberFunction(T) func \ ) { \ obj_ = obj; \ func_ = func; \ } \ \ SymChooserCallback(T)::~SymChooserCallback(T)() { } \ \ void SymChooserCallback(T)::execute(SymChooser* f, bool accept) { \ (obj_->*func_)(f, accept); \ } class SymChooser : public Dialog { public: SymChooser( SymDirectory*, WidgetKit*, Style*, SymChooserAction* = NULL, int nbrowser = 3 ); virtual ~SymChooser(); virtual const String* selected() const; virtual double* selected_var(); virtual int selected_vector_count(); virtual void reread(); virtual void dismiss(bool); private: SymChooserImpl* impl_; }; #include #endif neuron-7.5/src/ivoc/symdir.cpp000066400000000000000000000326201323325274500164460ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include "ocobserv.h" #if CABLE #include "nrnoc2iv.h" #else #include "oc2iv.h" #endif extern "C" { #if CABLE #include "membfunc.h" extern double* point_process_pointer(Point_process*, Symbol*, int); #endif #include "parse.h" #include "hoclist.h" extern Symlist* hoc_symlist; extern Objectdata* hoc_top_level_data; extern Symlist* hoc_built_in_symlist, *hoc_top_level_symlist; extern int hoc_array_index(Symbol*, Objectdata*); } #include "string.h" #include "symdir.h" const char* concat(const char* s1, const char* s2) { static char* tmp = 0; int l1 = strlen(s1); int l2 = strlen(s2); if (tmp) { delete [] tmp; } tmp = new char[l1 + l2 + 1]; sprintf(tmp, "%s%s", s1, s2); return (const char*)tmp; } class SymbolItem { public: SymbolItem(const char*, int whole_array = 0); SymbolItem(Symbol*, Objectdata*, int index = 0, int whole_array=0); SymbolItem(Object*); ~SymbolItem(); Symbol* symbol() const {return symbol_;} Object* object() const {return ob_;} void no_object(); const String& name() const { return name_;} bool is_directory() const; int array_index() const { return index_;} int whole_vector(); private: CopyString name_; Symbol* symbol_; int index_; Object* ob_; int whole_array_; }; declarePtrList(SymbolList, SymbolItem); implementPtrList(SymbolList, SymbolItem); class SymDirectoryImpl : public Observer { public: void disconnect(Observable*); // watching an object void update(Observable*); // watching a template private: friend class SymDirectory; #if CABLE Section* sec_; #endif Object* obj_; cTemplate* t_; SymbolList symbol_list_; CopyString path_; void load(int type); void load(int type, Symlist*); // void load(Symbol*); void load_section(); void load_object(); void load_aliases(); void load_template(); void load_sectionlist(); #if CABLE void load_mechanism(Prop*, int, const char*); #endif void append(Symbol* sym, Objectdata* od, Object* o = NULL); void append(Object*); void un_append(Object*); void make_pathname(const char*, const char*, const char*, int s = '.'); void sort(); }; static int compare_entries(const void* k1, const void* k2) { SymbolItem* e1 = *((SymbolItem**)k1); SymbolItem* e2 = *((SymbolItem**)k2); int i = strcmp(e1->name().string(), e2->name().string()); if (i == 0) { if (e1->array_index() > e2->array_index()) { i = 1; }else{ i = -1; } } return i; }; void SymDirectoryImpl::sort() { long cnt, i; cnt = symbol_list_.count(); SymbolItem** slist = new SymbolItem*[cnt]; for (i=0; i < cnt; ++i) { slist[i] = symbol_list_.item(i); } qsort(slist, cnt, sizeof(SymbolItem*), compare_entries); symbol_list_.remove_all(); for (i=0; i < cnt; ++i) { symbol_list_.append(slist[i]); } delete [] slist; } //SymDirectory SymDirectory::SymDirectory(const String& parent_path, Object* parent_obj, Symbol* sym, int array_index, int) { impl_ = new SymDirectoryImpl(); #if CABLE impl_->sec_ = NULL; #endif impl_->obj_= NULL; impl_->t_ = NULL; Objectdata* obd; if (parent_obj) { obd = parent_obj->u.dataspace; }else{ // obd = hoc_objectdata; obd = hoc_top_level_data; } int suffix = '.'; if (sym->type == TEMPLATE) { suffix = '_'; } impl_->make_pathname(parent_path.string(), sym->name, hoc_araystr(sym, array_index, obd), suffix); switch(sym->type) { #if CABLE case SECTION: if (object_psecitm(sym, obd)[array_index]) { impl_->sec_ = hocSEC(object_psecitm(sym, obd)[array_index]); section_ref(impl_->sec_); impl_->load_section(); } break; #endif case OBJECTVAR: impl_->obj_ = object_pobj(sym, obd)[array_index]; if(impl_->obj_) { ObjObservable::Attach(impl_->obj_, impl_); impl_->load_object(); } break; case TEMPLATE: impl_->t_ = sym->u.ctemplate; ClassObservable::Attach(impl_->t_, impl_); impl_->load_template(); break; case OBJECTALIAS: impl_->obj_ = sym->u.object_; if(impl_->obj_) { ObjObservable::Attach(impl_->obj_, impl_); impl_->load_object(); } break; default: hoc_execerror("Don't know how to make a directory out of", path().string()); break; } impl_->sort(); } SymDirectory::SymDirectory(Object* ob) { impl_ = new SymDirectoryImpl(); #if CABLE impl_->sec_ = NULL; #endif impl_->obj_= ob; impl_->t_ = NULL; int suffix = '.'; impl_->make_pathname("", hoc_object_name(ob), "", '.'); ObjObservable::Attach(impl_->obj_, impl_); impl_->load_object(); impl_->sort(); } SymDirectory::SymDirectory(int type) { ParseTopLevel ptl; ptl.save(); impl_ = new SymDirectoryImpl(); #if CABLE impl_->sec_ = NULL; #endif impl_->obj_ = NULL; impl_->t_ = NULL; impl_->path_ = ""; impl_->load(type); impl_->sort(); ptl.restore(); } SymDirectory::~SymDirectory() { long cnt = count(); for (long i=0; i < cnt; ++i) { delete impl_->symbol_list_.item(i); } impl_->symbol_list_.remove_all(); if (impl_->obj_) { ObjObservable::Detach(impl_->obj_, impl_); } if(impl_->t_) { ClassObservable::Detach(impl_->t_, impl_); } #if CABLE if (impl_->sec_) { section_unref(impl_->sec_); } #endif delete impl_; } void SymDirectoryImpl::disconnect(Observable*) { long cnt = symbol_list_.count(); for (long i=0; i < cnt; ++i) { delete symbol_list_.item(i); } symbol_list_.remove_all(); obj_ = NULL; } void SymDirectoryImpl::update(Observable* obs) { if (t_) { // watching a template ClassObservable* co = (ClassObservable*)obs; Object* ob = co->object(); switch (co->message()) { case ClassObservable::Delete: un_append(ob); break; case ClassObservable::Create: append(ob); break; } } } double* SymDirectory::variable(int index) { Object* ob = object(); Symbol* sym = symbol(index); //printf("::variable index=%d sym=%s ob=%s\n", index, sym?sym->name:"SYM0",hoc_object_name(ob)); if (sym) switch(sym->type) { case VAR: if (ob && ob->ctemplate->constructor) { extern double* ivoc_vector_ptr(Object*, int); if (is_obj_type(ob, "Vector")) { return ivoc_vector_ptr(ob, index); }else{ return NULL; } }else{ Objectdata* od; if (ob) { od = ob->u.dataspace; }else if (sym->subtype == USERDOUBLE) { return sym->u.pval + array_index(index); }else{ od = hoc_objectdata; } return od[sym->u.oboff].pval + array_index(index); } #if CABLE case RANGEVAR: if (ob && ob->ctemplate->is_point_) { return point_process_pointer((Point_process*)ob->u.this_pointer, sym, array_index(index)); } break; #endif }else{ char buf[256], *cp; sprintf(buf, "%s%s", path().string(), name(index).string()); if (whole_vector(index)){ // rangevar case for [all] // replace [all] with [0] cp = strstr(buf, "[all]"); assert(cp); *(++cp) = '0'; for (++cp; cp[2]; ++cp) { *cp = cp[2]; } *cp = '\0'; } return hoc_val_pointer(buf); } return NULL; } int SymDirectory::whole_vector(int index) { return impl_->symbol_list_.item(index)->whole_vector(); } const String& SymDirectory::path()const { return impl_->path_; } int SymDirectory::count() const { return impl_->symbol_list_.count(); } const String& SymDirectory::name(int index) const { return impl_->symbol_list_.item(index)->name(); } int SymDirectory::array_index(int i) const { return impl_->symbol_list_.item(i)->array_index(); } int SymDirectory::index(const String& name) const { long cnt = count(); for (long i=0; i < cnt; ++i) { if (name == impl_->symbol_list_.item(i)->name()) { return i; } } return -1; } void SymDirectory::whole_name(int index, CopyString& s) const { const String& s1 = impl_->path_; const String& s2 = name(index); // char* tmp = new char[s1.length() + s2.length() + 1]; // sprintf(tmp, "%.*%s%.*%s", s1.length(), s1.string(), s2.length(), s2.string()); // s = tmp; s = concat(s1.string(), s2.string()); } bool SymDirectory::is_directory(int index) const { return impl_->symbol_list_.item(index)->is_directory(); } bool SymDirectory::match(const String&, const String&) { return true; } Symbol* SymDirectory::symbol(int index) const { return impl_->symbol_list_.item(index)->symbol(); } Object* SymDirectory::object() const { return impl_->obj_; } Object* SymDirectory::obj(int index) { return impl_->symbol_list_.item(index)->object(); } //SymbolItem SymbolItem::SymbolItem(const char* n, int whole_array) { symbol_ = NULL; index_ = 0; ob_ = NULL; name_ = n; whole_array_ = whole_array; } SymbolItem::SymbolItem(Symbol* sym, Objectdata* od, int index, int whole_array) { symbol_ = sym; ob_ = NULL; whole_array_ = whole_array; if (ISARRAY(sym)) { if (whole_array_) { name_ = concat(sym->name, "[all]"); }else{ if (od) { name_ = concat(sym->name, hoc_araystr(sym, index, od)); }else{ char buf[50]; sprintf(buf, "[%d]", index); name_ = concat(sym->name, buf); } } }else{ name_ = sym->name; } index_ = index; } int SymbolItem::whole_vector() { return whole_array_; } SymbolItem::SymbolItem(Object* ob) { symbol_ = NULL; index_ = 0; ob_ = ob; char buf[10]; sprintf(buf, "%d", ob->index); name_ = buf; } void SymbolItem::no_object() { ob_ = NULL; name_ = "Deleted"; } SymbolItem::~SymbolItem() {} bool SymbolItem::is_directory() const { if (symbol_) switch (symbol_->type) { case SECTION: case OBJECTVAR: case TEMPLATE: case OBJECTALIAS: // case SECTIONLIST: // case MECHANISM: return true; } if (ob_) { return true; } return false; } void SymDirectoryImpl::make_pathname(const char* parent, const char* name, const char* index, int suffix) { char buf[200]; sprintf(buf, "%s%s%s%c", parent, name, index, suffix); path_ = buf; } void SymDirectoryImpl::load(int type) { switch(type) { case TEMPLATE: load(type, hoc_built_in_symlist); load(type, hoc_top_level_symlist); break; #if CABLE case RANGEVAR: load(type, hoc_built_in_symlist); break; #endif default: load(type, hoc_symlist); if (hoc_symlist != hoc_built_in_symlist) { Objectdata* sav = hoc_objectdata; hoc_objectdata = NULL; load(type, hoc_built_in_symlist); hoc_objectdata = sav; } if (hoc_symlist != hoc_top_level_symlist) { load(type, hoc_top_level_symlist); } } } void SymDirectoryImpl::load(int type, Symlist* sl) { Symbol* sym; for (sym = sl->first; sym; sym = sym->next) { if (type == -1) { switch(sym->type) { case SECTION: case OBJECTVAR: case VAR: case TEMPLATE: append(sym, hoc_objectdata); } }else if (sym->type == type) { append(sym, hoc_objectdata); } } } void SymDirectoryImpl::load_object() { Symlist* sl = obj_->ctemplate->symtable; Objectdata* od; if (obj_->ctemplate->constructor) { od = NULL; }else{ od = obj_->u.dataspace; } if (obj_->aliases) { load_aliases(); } if (sl) for (Symbol* s = sl->first; s; s = s->next) { if (s->cpublic) { append(s, od, obj_); } } } void SymDirectoryImpl::load_aliases() { IvocAliases* a = (IvocAliases*)obj_->aliases; if (!a) return; for (TableIterator(SymbolTable) i(*a->symtab_); i.more(); i.next()) { Symbol* s = i.cur_value(); append(s, NULL, obj_); } } void SymDirectoryImpl::load_template() { hoc_Item* q; ITERATE(q, t_->olist) { append(OBJ(q)); } } void SymDirectoryImpl::load_section() { #if CABLE char xarg[20]; char buf[100]; Section* sec = sec_; int n = sec->nnode; int i=0; double x = nrn_arc_position(sec, sec->pnode[0]); sprintf(xarg, "( %g )", x); sprintf(buf, "v%s", xarg); symbol_list_.append(new SymbolItem(buf)); nrn_pushsec(sec); Node* nd = sec->pnode[i]; for (Prop* p = nd->prop; p; p = p->next) { load_mechanism(p, 0, xarg); } nrn_popsec(); #endif } void SymDirectoryImpl::load_sectionlist() { #if CABLE && 0 List* sl = od[sym->u.oboff].plist[hoc_array_index(sym, od)]; Item* qsym; ForAllSections(sec) Prop* p = sec->prop; symbol_list_.append(new SymbolItem( p->dparam[0].sym, p->dparam[6].obj, prop->dparam[5].i)); } #endif } #if CABLE void SymDirectoryImpl::load_mechanism(Prop* p, int type, const char* xarg) { NrnProperty np(p); if (np.is_point()) { return; } char buf[200]; for (Symbol* sym = np.first_var(); np.more_var(); sym = np.next_var()) { if (np.var_type(sym) == type || type == 0) { if (ISARRAY(sym)) { int n = hoc_total_array_data(sym, 0); if (n > 5) { sprintf(buf, "%s[all]%s", sym->name, xarg); symbol_list_.append(new SymbolItem(buf, n)); } sprintf(buf, "%s[%d]%s", sym->name, 0, xarg); symbol_list_.append(new SymbolItem(buf)); sprintf(buf, "%s[%d]%s", sym->name, n-1, xarg); symbol_list_.append(new SymbolItem(buf)); }else{ sprintf(buf, "%s%s", sym->name, xarg); symbol_list_.append(new SymbolItem(buf)); } } } } #endif void SymDirectoryImpl::append(Symbol* sym, Objectdata* od, Object* o) { if (ISARRAY(sym)) { int i, n=1; if (od) { n = hoc_total_array_data(sym, od); }else{ //Vector if (is_obj_type(o, "Vector")) { extern int ivoc_vector_size(Object*); n = ivoc_vector_size(o); } } if (n > 5 && sym->type == VAR) { symbol_list_.append(new SymbolItem(sym, od, 0, n)); } for (i=0; i < n; ++i) { symbol_list_.append(new SymbolItem(sym, od, i)); if (i > 5) { break; } } if (i < n-1) { symbol_list_.append(new SymbolItem(sym, od, n-1)); } }else{ symbol_list_.append(new SymbolItem(sym, od, 0)); } } void SymDirectoryImpl::append(Object* ob) { symbol_list_.append(new SymbolItem(ob)); } void SymDirectoryImpl::un_append(Object* ob) { long i, cnt = symbol_list_.count(); for (i=0; i < cnt; ++i) { if (symbol_list_.item(i)->object() == ob) { symbol_list_.item(i)->no_object(); break; } } } neuron-7.5/src/ivoc/symdir.h000066400000000000000000000025341323325274500161140ustar00rootroot00000000000000#ifndef symdir_h #define symdir_h #include #include #include struct Object; class SymDirectoryImpl; struct Symbol; declareTable(SymbolTable, String, Symbol*) class IvocAliases { public: IvocAliases(Object*); virtual ~IvocAliases(); Symbol* lookup(const char*); Symbol* install(const char*); void remove(Symbol*); int count(); Symbol* symbol(int); Object* ob_; // not referenced SymbolTable* symtab_; }; /* List of Symbols considered as a directory */ class SymDirectory : public Resource { public: SymDirectory(const String& parent_path, Object* parent_object, Symbol*, int array_index=0, int node_index=0); SymDirectory(Object*); SymDirectory(int type); virtual ~SymDirectory(); virtual const String& path() const; virtual int count() const; virtual const String& name(int index) const; virtual int index(const String&) const; virtual void whole_name(int index, CopyString&) const; virtual bool is_directory(int index) const; virtual double* variable(int index); virtual int whole_vector(int index); static bool match(const String& name, const String& pattern); Symbol* symbol(int index) const; int array_index(int index) const; Object* object() const; // the parent_object Object* obj(int index); // non-NULL if SymbolItem is an object private: SymDirectoryImpl* impl_; }; #endif neuron-7.5/src/ivoc/utility.cpp000066400000000000000000000231201323325274500166350ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define Input IOS_IN #define Output IOS_OUT #define Append IOS_APP|IOS_OUT #include "graph.h" #include "utility.h" #include "oc2iv.h" bool oc_post_dialog(Dialog* d, Coord x, Coord y) { if (x != 400. || y != 400.) { return d->post_at_aligned(x, y, .5,.5); }else{ Display* dis = Session::instance()->default_display(); return d->post_at_aligned(dis->width()/2, dis->height()/2, .5,.5); } } bool ok_to_write(const String& s, Window* w) { return ok_to_write(s.string(), w);} bool ok_to_read(const String& s, Window* w) { return ok_to_read(s.string(), w);} class OcGlyphDialog : public Dialog { public: OcGlyphDialog(Glyph*, Style*); virtual ~OcGlyphDialog(); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); }; /*static*/ class DialogAction : public Action { public: DialogAction(Dialog*, bool); virtual ~DialogAction(); virtual void execute() { d_->dismiss(accept_); } private: Dialog* d_; bool accept_; }; DialogAction::DialogAction(Dialog* d, bool accept) { accept_ = accept; d_ = d; } DialogAction::~DialogAction(){ //printf("~DialogAction\n"); } bool boolean_dialog(const char* label, const char* accept, const char* cancel, Window* w, Coord x, Coord y) { WidgetKit& k = *WidgetKit::instance(); LayoutKit& l = *LayoutKit::instance(); PolyGlyph* vbox = l.vbox(); bool ok; Dialog* d = new Dialog( k.outset_frame(l.margin(vbox, 5)), Session::instance()->style() ); d->ref(); vbox->append(l.hcenter(k.inset_frame(l.margin(k.label(label), 10)))); vbox->append( l.hcenter( l.hbox( k.push_button(accept, new DialogAction(d, true)), l.hspace(10), k.push_button(cancel, new DialogAction(d, false)) ) ) ); if (w) { ok = d->post_for(w); }else{ ok = oc_post_dialog(d, x, y); } d->unref(); return ok; } void continue_dialog(const char* label, Window* w, Coord x, Coord y) { WidgetKit& k = *WidgetKit::instance(); LayoutKit& l = *LayoutKit::instance(); PolyGlyph* vbox = l.vbox(); Dialog* d = new Dialog( k.outset_frame(l.margin(vbox, 5)), Session::instance()->style() ); d->ref(); vbox->append(l.hcenter(k.inset_frame(l.margin(k.label(label), 10)))); vbox->append( l.hcenter( k.push_button("Continue", new DialogAction(d, true)) ) ); if (w) { d->post_for(w); }else{ oc_post_dialog(d, x, y); } d->unref(); } static bool ok_if_already_exists(const char* s, Window* w) { char buf[256]; sprintf(buf, "%s already exists: Write?", s); return boolean_dialog(buf, "Go Ahead", "Don't", w); } static void open_fail(const char* s, Window* w, const char* io) { char buf[256]; sprintf(buf, "Couldn't open %s for %sing", s, io); continue_dialog(buf, w); } bool ok_to_write(const char* s, Window* w) { filebuf obuf; if (obuf.open(s, Input)) { obuf.close(); if (!ok_if_already_exists(s, w)) { errno = 0; return false; } } if (obuf.open(s, Append)) { obuf.close(); }else{ open_fail(s, w, "writ"); errno = 0; return false; } errno = 0; return true; } bool ok_to_read(const char* s, Window* w) { filebuf obuf; if (obuf.open(s, Input)) { obuf.close(); errno = 0; return true; }else{ open_fail(s, w, "read"); errno = 0; return false; } } bool var_pair_chooser(const char* caption, float& x, float& y, Window* w, Coord x2, Coord y2) { char buf[200]; float x1=x, y1=y; for (;;) { sprintf(buf, "%g %g", x, y); if (str_chooser(caption, buf, w, x2, y2)) { if (sscanf(buf, "%f%f", &x1, &y1) == 2) { x = x1; y = y1; return true; }else{ continue_dialog("Invalid entry: Enter pair of numbers separated by space.", w); } }else{ return false; } } } bool str_chooser(const char* caption, char* buf, Window* w, Coord x, Coord y) { WidgetKit& k = *WidgetKit::instance(); LayoutKit& l = *LayoutKit::instance(); Style* style = new Style(k.style()); style->attribute("caption", caption); bool ok; FieldDialog* d = FieldDialog::field_dialog_instance(buf, style); d->ref(); if (w) { ok = d->post_for(w); }else{ ok = oc_post_dialog(d, x,y); } if (ok) { strcpy(buf, d->text()->string()); } d->unref(); return ok; } declareFieldEditorCallback(FieldDialog); implementFieldEditorCallback(FieldDialog); FieldDialog::FieldDialog(Glyph* g, Style* s): Dialog(g, s) { } FieldDialog::~FieldDialog() { Resource::unref(fe_); } bool FieldDialog::run() { fe_->select(0, fe_->text()->length()); return Dialog::run(); } void FieldDialog::dismiss(bool accept) { if (accept) { s_ = *fe_->text(); }else{ fe_->field(s_); } Dialog::dismiss(accept); } FieldDialog* FieldDialog::field_dialog_instance(const char* str, Style* style, Glyph* extra) { Glyph* g; WidgetKit& widgets = *WidgetKit::instance(); DialogKit& dialogs = *DialogKit::instance(); LayoutKit& layout = *LayoutKit::instance(); String caption(""); String accept("Accept"); String cancel("Cancel"); style->find_attribute("caption", caption); style->find_attribute("accept", accept); style->find_attribute("cancel", cancel); PolyGlyph* hb = layout.hbox(5); PolyGlyph* vb = layout.vbox(5); g = widgets.inset_frame( layout.margin( layout.flexible(vb, fil, 0), 10.0 ) ); FieldDialog* fd = new FieldDialog(g, style); FieldEditor* fe = dialogs.field_editor(str, style, new FieldEditorCallback(FieldDialog)( fd, &FieldDialog::accept, &FieldDialog::cancel ) ); fd->fe_ = fe; Resource::ref(fe); fd->s_ = *fe->text(); vb->append(layout.flexible(widgets.label(caption))); vb->append(layout.vglue(10)); vb->append(fd->fe_); if (extra) { vb->append(layout.vglue(10)); vb->append(extra); } vb->append(layout.vglue(10)); vb->append(hb); hb->append(layout.hglue(20, fil, 20)); hb->append(widgets.default_button(accept, new DialogAction(fd, true))); hb->append(layout.hglue(5)); hb->append(widgets.push_button(cancel, new DialogAction(fd, false))); hb->append(layout.hglue(20, fil, 20)); return fd; } void FieldDialog::accept(FieldEditor*) { dismiss(true); } void FieldDialog::cancel(FieldEditor*) { dismiss(false); } extern "C" { void hoc_boolean_dialog() { bool b = false; IFGUI if (ifarg(3)) { b = boolean_dialog(gargstr(1), gargstr(2), gargstr(3)); }else{ b = boolean_dialog(gargstr(1), "Yes", "No"); } ENDGUI hoc_ret(); hoc_pushx(double(b)); } void hoc_continue_dialog() { IFGUI continue_dialog(gargstr(1)); ENDGUI hoc_ret(); hoc_pushx(1.); } void hoc_string_dialog() { bool b = false; IFGUI char buf[256]; sprintf(buf, "%s", gargstr(2)); b = str_chooser(gargstr(1), buf); if (b) { hoc_assign_str(hoc_pgargstr(2), buf); } ENDGUI hoc_ret(); hoc_pushx(double(b)); } } /*static*/ class LabelChooserAction : public Action { public: LabelChooserAction(GLabel*); virtual ~LabelChooserAction(); void state(TelltaleState*); virtual void execute(); private: TelltaleState* ts_; GLabel* gl_; }; bool Graph::label_chooser(const char* caption, char* buf, GLabel* gl, Coord x, Coord y) { WidgetKit& k = *WidgetKit::instance(); LayoutKit& l = *LayoutKit::instance(); Style* style = new Style(k.style()); style->attribute("caption", caption); bool ok; LabelChooserAction* lca = new LabelChooserAction(gl); Button* b = k.check_box("vfixed", lca); lca->state(b->state()); FieldDialog* d = FieldDialog::field_dialog_instance(buf, style, b); d->ref(); ok = oc_post_dialog(d, x, y); if (ok) { strcpy(buf, d->text()->string()); } d->unref(); return ok; } LabelChooserAction::LabelChooserAction(GLabel* gl) { gl_ = gl; gl->ref(); ts_ = NULL; } LabelChooserAction::~LabelChooserAction() { gl_->unref(); ts_->unref(); } void LabelChooserAction::state(TelltaleState* t) { t->ref(); ts_ = t; if (gl_->fixed()) { ts_->set(TelltaleState::is_chosen, false); }else{ ts_->set(TelltaleState::is_chosen, true); } } void LabelChooserAction::execute() { if (ts_->test(TelltaleState::is_chosen)) { if (gl_->fixed()) { gl_->vfixed(gl_->scale()); } }else{ if (!gl_->fixed()) { gl_->fixed(gl_->scale()); } } } bool OcGlyph::dialog_dismiss(bool accept) { if (d_) { d_->dismiss(accept); return true; } return false; } bool OcGlyph::dialog(const char* label, const char* accept, const char* cancel) { WidgetKit& k = *WidgetKit::instance(); LayoutKit& l = *LayoutKit::instance(); PolyGlyph* vbox = l.vbox(); bool ok; d_ = new OcGlyphDialog( k.outset_frame(l.margin(vbox, 5)), Session::instance()->style() ); d_->ref(); vbox->append(l.hcenter(l.hflexible(l.margin(k.label(label), 10), fil, 0))); vbox->append(l.hcenter(this)); vbox->append( l.hcenter( l.hflexible( l.hbox( k.push_button(accept, new DialogAction(d_, true)), l.hspace(10), k.push_button(cancel, new DialogAction(d_, false)) ) ,fil, 0 ) ) ); handle_old_focus(); ok = oc_post_dialog(d_, 400., 400.); handle_old_focus(); d_->unref(); d_ = NULL; return ok; } OcGlyphDialog::OcGlyphDialog(Glyph* g, Style* s) : Dialog(g, s) {} OcGlyphDialog::~OcGlyphDialog() {} void OcGlyphDialog::pick(Canvas* c, const Allocation& a, int depth, Hit& h){ const Event* e = h.event(); EventType t = (e == NULL) ? Event::undefined : e->type(); switch (t) { case Event::key: if (e && inside(*e)) { body()->pick(c, a, depth + 1, h); } break; default: Dialog::pick(c, a, depth, h); } } #endif neuron-7.5/src/ivoc/utility.h000066400000000000000000000034631323325274500163120ustar00rootroot00000000000000#ifndef utility_h #define utility_h #include #include #include #include #undef PopupMenu class Window; class FieldEditor; class Menu; class Event; class MenuItem; class PopupWindow; class TelltaleGroup; class FieldDialog : public Dialog { public: static FieldDialog* field_dialog_instance(const char*, Style*, Glyph* extra = NULL); virtual ~FieldDialog(); virtual void dismiss(bool accept); const String* text() const {return fe_->text();} virtual void keystroke(const Event& e) {fe_->keystroke(e);} virtual void accept(FieldEditor*); virtual void cancel(FieldEditor*); virtual bool run(); private: FieldDialog(Glyph*, Style*); FieldEditor* fe_; CopyString s_; }; bool ok_to_write(const String&, Window* w=NULL); bool ok_to_write(const char*, Window* w=NULL); bool ok_to_read(const String&, Window* w=NULL); bool ok_to_read(const char*, Window* w=NULL); bool boolean_dialog(const char* label, const char* accept, const char* cancel, Window* w=NULL, Coord x=400., Coord y=400.); void continue_dialog(const char* label, Window* w=NULL, Coord x=400., Coord y=400.); bool str_chooser(const char*, char*, Window* w=NULL, Coord x = 400., Coord y = 400.); bool var_pair_chooser(const char*, float& x, float& y, Window* w=NULL, Coord x1=400., Coord y1=400.); class PopupMenu : public Handler { public: PopupMenu(); virtual ~PopupMenu(); virtual bool event(Event&); void append_item(MenuItem*); Menu* menu() { return menu_; } private: Menu* menu_; PopupWindow* w_; bool grabbed_; }; // makes sure menuitem width is size of menu width class K { public: static MenuItem* menu_item(const char*); static MenuItem* radio_menu_item(TelltaleGroup*, const char*); static MenuItem* check_menu_item(const char*); }; void handle_old_focus(); #endif neuron-7.5/src/ivoc/xdep.cpp000066400000000000000000000121711323325274500160760ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include "rubband.h" #include "scenevie.h" #include "apwindow.h" void get_position(XDisplay* dpy, XWindow window, int* rx, int* ry); static bool r_unbound; void Rubberband::rubber_on(Canvas* c) { if (c->rep()->copybuffer_ == CanvasRep::unbound) { r_unbound = true; return; } c->rep()->unbind(); c->rep()->bind(0); } void Rubberband::rubber_off(Canvas* c) { if (r_unbound == true) { r_unbound = false; return; } c->rep()->unbind(); c->rep()->bind(1); c->damage_all(); } void XYView::rebind(){ canvas()->rep()->unbind(); canvas()->rep()->bind(1); } //----------------------------------- void PrintableWindow::hide() { if (bound()) { if (is_mapped()) { xplace(xleft(), xtop()); //printf("hide %p %d %d\n", this, xleft_, xtop_); WindowRep& w = *((Window*)this)->rep(); XWithdrawWindow(display()->rep()->display_, w.xwindow_, display()->rep()->screen_); } } } int PrintableWindow::xleft() const { int x, y; if (bound()) { WindowRep& w = *((Window*)this)->rep(); get_position(display()->rep()->display_, w.xwindow_, &x, &y); }else if (xplace_) { x = xleft_; }else{ x = 0; } return x; } int PrintableWindow::xtop() const { int x, y; if (bound()) { WindowRep& w = *((Window*)this)->rep(); get_position(display()->rep()->display_, w.xwindow_, &x, &y); }else if (xplace_) { y = xtop_; }else{ y = 0; } return y; } void PrintableWindow::xplace(int left, int top) { xplace_ = true; xleft_ = left; xtop_ = top; } #if 1 static int xoff = -999, yoff = -999; void PrintableWindow::xmove(int left1, int top) { const Display& d = *display(); WindowRep& w = *((Window*)this)->rep(); Style* q = Session::instance()->style(); Coord WMOffsetX, WMOffsetY; if (xoff == -999 && yoff == -999) { if (!q->find_attribute("window_manager_offset_x", WMOffsetX)) { WMOffsetX = 5.; } if (!q->find_attribute("window_manager_offset_y", WMOffsetY)) { WMOffsetY = 26.; } xoff = (int)WMOffsetX; yoff = (int)WMOffsetY; } xoff = yoff = 0; //printf("%p xmove(%d,%d) XMoveWindow(%d,%d)\n", this,left1, top, left1+xoff, top+yoff); XMoveWindow(d.rep()->display_, w.xwindow_, left1+xoff, top+yoff); } #else static Bool WaitForEvent(XDisplay *dpy, XEvent *event, char *type) { return (Bool)(event->type == (int)type); } void PrintableWindow::xmove(int left1, int top) { const Display& d = *display(); XEvent event; int x = 0, y = 0; static int xoff = 0, yoff = 0; WindowRep& w = *((Window*)this)->rep(); get_position(d.rep()->display_, w.xwindow_, &x, &y); for (int i= 0; (left1 != x || top != y) && i < 10; i++) { XMoveWindow(d.rep()->display_, w.xwindow_, left1+xoff, top+yoff); XPeekIfEvent(d.rep()->display_, &event, WaitForEvent, (char *)ConfigureNotify); get_position(d.rep()->display_, w.xwindow_, &x, &y); if (left1 != x || top != y) { XIfEvent(d.rep()->display_, &event, WaitForEvent, (char *)ConfigureNotify); xoff = left1 - x; yoff = top - y; } printf("x=%d y=%d, left1=%d top=%d xoff = %d yoff = %d\n", x, y, left1, top, xoff, yoff); } } #endif void PrintableWindow::default_geometry() { WindowRep& w = *Window::rep(); const Display& d = *w.display_; w.glyph_->request(w.shape_); Coord width = w.shape_.requirement(Dimension_X).natural(); Coord height = w.shape_.requirement(Dimension_Y).natural(); ((OcGlyph*)glyph())->def_size(width, height); w.canvas_->size(width, height); if (xplace_) { w.placed_ = true; w.left_ = d.to_coord(xleft_); w.bottom_ = d.to_coord(d.pheight() - xtop_ - w.canvas_->pheight()); } w.xpos_ = d.to_pixels(w.left_); w.ypos_ = d.pheight() - d.to_pixels(w.bottom_) - w.canvas_->pheight(); if (w.aligned_) { w.xpos_ -= d.to_pixels(w.xalign_ * width); w.ypos_ += d.to_pixels(w.yalign_ * height); } if (w.placed_) { Display& d = *w.display_; PixelCoord l = w.xpos_, b = w.ypos_; PixelCoord pw = d.to_pixels(width), ph = d.to_pixels(height); l = (l < d.pwidth() - pw) ? l : d.pwidth() - pw; b = (b < d.pheight() - ph) ? b : d.pheight() - ph; l = (l > 0) ? l : 0; b = (b > 0) ? b : 0; w.xpos_ = l; w.ypos_ = b; } } //--------------------------- #if 0 #include #include #include #include #include #include #include #endif void get_position(XDisplay* dpy, XWindow window, int* rx, int* ry) { XWindowAttributes win_attributes; XWindow junkwin; if (!XGetWindowAttributes(dpy, window, &win_attributes)) { fprintf(stderr, "Can't get window attributes."); exit(1); } (void) XTranslateCoordinates (dpy, window, win_attributes.root, -win_attributes.x, -win_attributes.y, rx, ry, &junkwin); //printf("get_position %p %d %d\n", window, *rx, *ry); //if (xoff != -999) { // *rx -= xoff; // *ry -= yoff; //} } #endif neuron-7.5/src/ivoc/xmenu.cpp000066400000000000000000002062631323325274500163010ustar00rootroot00000000000000 #include <../../nrnconf.h> #include #include "oc2iv.h" #include "classreg.h" extern "C" { double (*nrnpy_guigetval)(Object*); void (*nrnpy_guisetval)(Object*, double); int (*nrnpy_guigetstr)(Object*, char**); } #if HAVE_IV // to end of file except for a few small fragments. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mymath.h" #include "xmenu.h" #include "datapath.h" #include "ivoc.h" #include "bndedval.h" #include "objcmd.h" #include "parse.h" #include "utility.h" #include "scenepic.h" // The problem this overcomes is that the pick of an input handler normally // succeeds for a keystroke only if the mouse is over one of the child // handlers. We want it to succeed whenever it is inside the panel. class PanelInputHandler : public InputHandler { public: PanelInputHandler(Glyph*, Style*); virtual ~PanelInputHandler(); virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual void focus(InputHandler*); static bool has_old_focus() { bool old = sema_; sema_ = false; return old; } static void handle_old_focus(); private: static InputHandler* focus_; static bool sema_; }; void handle_old_focus() { PanelInputHandler::handle_old_focus(); } InputHandler* PanelInputHandler::focus_ = NULL; bool PanelInputHandler::sema_ = false; PanelInputHandler::PanelInputHandler(Glyph* g, Style* s) : InputHandler(g, s){ } PanelInputHandler::~PanelInputHandler(){ } void PanelInputHandler::pick(Canvas* c, const Allocation& a, int depth, Hit& h){ const Event* e = h.event(); if (focus_ && e && e->type() == Event::key && focus_->handler()) { h.target(depth, this, 0, focus_->handler()); }else{ InputHandler::pick(c, a, depth, h); } } void PanelInputHandler::focus(InputHandler* h){ if (focus_ && focus_ != h) { if (h) { sema_ = true; } InputHandler* f = focus_; focus_ = NULL; f->focus_out(); } focus_ = h; InputHandler::focus(h); } void PanelInputHandler::handle_old_focus() { if (focus_) { //printf("handle_old_focus %p\n", focus_); sema_ = true; InputHandler* f = focus_; focus_ = NULL; f->focus_out(); } } class ValEdLabel : public MonoGlyph { public: ValEdLabel(Glyph*); virtual ~ValEdLabel(); virtual void draw(Canvas*, const Allocation&)const; void state(bool); void tts(TelltaleState*); private: static const Color* color_; bool state_; TelltaleState* tts_; }; const Color* ValEdLabel::color_; ValEdLabel::ValEdLabel(Glyph* g) : MonoGlyph(g) { state_ = false; if (!color_) { color_ = Color::lookup(Session::instance()->default_display(), "yellow"); Resource::ref(color_); } tts_ = NULL; } ValEdLabel::~ValEdLabel() { } void ValEdLabel::draw(Canvas* c, const Allocation& a)const { if (state_) { c->fill_rect(a.left(), a.bottom(), a.right(), a.top(), color_); } MonoGlyph::draw(c, a); } void ValEdLabel::state(bool s) { if (state_ != s) { state_ = s; tts_->notify(); } } void ValEdLabel::tts(TelltaleState* t) { tts_ = t; // not reffed } static void hoc_ivpanelPlace(Coord,Coord,int scroll = -1); static String* xvalue_format; #define Editor_Default "DefaultValueEditor" #define Editor_Stepper "DefaultValueEditor" extern "C" { extern int units_on_flag_; extern Symbol* hoc_get_symbol(const char*); extern Symbol* hoc_get_last_pointer_symbol(); extern double* nrn_recalc_ptr(double*); void hoc_notify_value() { Oc oc; oc.notify(); } void hoc_xpanel() { IFGUI if (ifarg(1) && hoc_is_str_arg(1)) { // begin spec bool h = false; if (ifarg(2)) { h = (int)chkarg(2, 0, 1) ? true : false; } hoc_ivpanel(gargstr(1), h); }else{ // map int scroll = -1; // leave up to panel_scroll attribute if (ifarg(2)) { if (ifarg(3)) { scroll = (int)chkarg(3, -1, 1); } hoc_ivpanelPlace((Coord)*getarg(1),(Coord) *getarg(2), scroll); }else{ if (ifarg(1)) { scroll = (int)chkarg(1, -1, 1); } hoc_ivpanelmap(scroll); } } ENDGUI hoc_ret(); hoc_pushx(0.); } void hoc_xmenu() { IFGUI bool add2menubar = false; char* mk = NULL; Object* pyact = NULL; int i = 2; if (ifarg(i)) { if (hoc_is_str_arg(i)) { mk = gargstr(i); ++i; }else if (hoc_is_object_arg(i)) { pyact = *hoc_objgetarg(i); ++i; } if (ifarg(i)) { add2menubar = int(chkarg(i, 0,1)); } } if (ifarg(1)) { if (mk || pyact) { hoc_ivvarmenu(gargstr(1), mk, add2menubar, pyact); }else{ hoc_ivmenu(gargstr(1), add2menubar); } }else{ hoc_ivmenu((char *)0); } ENDGUI hoc_ret(); hoc_pushx(0.); } void hoc_xbutton() { IFGUI char *s1; s1 = gargstr(1); if (ifarg(2)) { if (hoc_is_object_arg(2)) { hoc_ivbutton(s1, NULL, *hoc_objgetarg(2)); }else{ hoc_ivbutton(s1, gargstr(2)); } }else{ hoc_ivbutton(s1, s1); } ENDGUI hoc_ret(); hoc_pushx(0.); } /* xstatebutton("prompt",&var [,"action"]) like xbutton, but var is set to 0 or 1 depending to match the telltale state of the button */ void hoc_xstatebutton() { IFGUI char *s1, *s2 = (char *)0; s1 = gargstr(1); if (hoc_is_object_arg(2)) { hoc_ivstatebutton(NULL, s1, NULL, HocStateButton::PALETTE, *hoc_objgetarg(2), ifarg(3) ? *hoc_objgetarg(3):NULL); }else{ if (ifarg(3)) { s2 = gargstr(3); } hoc_ivstatebutton(hoc_pgetarg(2), s1, s2, HocStateButton::PALETTE); } ENDGUI hoc_ret(); hoc_pushx(0.); } /* xcheckbox("prompt",&var [,"action"]) like xbutton, but var is set to 0 or 1 depending to match the telltale state of the button */ void hoc_xcheckbox() { IFGUI char *s1, *s2 = (char *)0; s1 = gargstr(1); if (hoc_is_object_arg(2)) { hoc_ivstatebutton(NULL, s1, NULL, HocStateButton::CHECKBOX, *hoc_objgetarg(2), ifarg(3) ? *hoc_objgetarg(3) : 0); }else{ if (ifarg(3)) { s2 = gargstr(3); } hoc_ivstatebutton(hoc_pgetarg(2),s1, s2, HocStateButton::CHECKBOX); } ENDGUI hoc_ret(); hoc_pushx(0.); } void hoc_xradiobutton() { IFGUI char *s1, *s2 = (char *)0; Object* po = NULL; bool activate = false; s1 = gargstr(1); if (ifarg(2)) { if (hoc_is_object_arg(2)) { po = *hoc_objgetarg(2); }else{ s2 = gargstr(2); } if (ifarg(3)) { activate = (chkarg(3, 0, 1) != 0.); } }else{ s2 = s1; } if (po) { hoc_ivradiobutton(s1, NULL, activate, po); }else{ hoc_ivradiobutton(s1, s2, activate); } ENDGUI hoc_ret(); hoc_pushx(0.); } static void hoc_xvalue_helper() { IFGUI //prompt, variable, deflt,action,canrun,usepointer char *s1, *s2, *s3; double* ptr2 = NULL; /*allow variable arg2 to be double* */ Object* pyvar = NULL; Object* pyact = NULL; s2 = s3 = NULL; s1 = gargstr(1); if (ifarg(2)) { if (hoc_is_object_arg(2)) { pyvar = *hoc_objgetarg(2); }else if (hoc_is_pdouble_arg(2)) { ptr2 = hoc_pgetarg(2); }else{ s2 = gargstr(2); } }else{ s2 = s1; } bool deflt = false; if (ifarg(3) && *getarg(3)) { if (*getarg(3) == 2.) { if (pyvar) { hoc_ivvalue_keep_updated(s1, NULL, pyvar); }else{ hoc_ivvalue_keep_updated(s1, s2); } return; } deflt=true; } bool canRun=false, usepointer=false; if (ifarg(4)) { if (hoc_is_object_arg(4)) { pyact = *hoc_objgetarg(4); }else{ s3 = gargstr(4); } if (ifarg(5) && *getarg(5)) { canRun=true; } if (ifarg(6) && *getarg(6)) { usepointer=true; } } hoc_ivvaluerun_ex(s1, s2,ptr2,pyvar, s3,pyact, deflt, canRun, usepointer); ENDGUI } void hoc_xfixedvalue() { IFGUI //prompt, variable, deflt,action,canrun,usepointer char *s1, *s2; s1 = gargstr(1); if (ifarg(2)) { s2 = gargstr(2); }else{ s2 = s1; } bool deflt = false; if (ifarg(3) && *getarg(3)) { deflt=true; } bool usepointer = false; if (ifarg(4) && *getarg(4)) { usepointer = true; } hoc_ivfixedvalue(s1, s2, deflt, usepointer); ENDGUI hoc_ret(); hoc_pushx(0.); } static void hoc_xpvalue_helper() { IFGUI //prompt,variable,deflt,action,canrun char *s1, *s3; double* pd; HocSymExtension* extra = NULL; Symbol* sym; s1 = gargstr(1); if (ifarg(2)) { pd = hoc_pgetarg(2); sym = hoc_get_last_pointer_symbol(); }else{ pd = hoc_val_pointer(s1); sym = hoc_get_symbol(s1); } if (sym) { extra = sym->extra; } bool deflt = false; if (ifarg(3) && *getarg(3)) { deflt=true; } if (ifarg(4)) { s3 = gargstr(4); bool canRun=false; if (ifarg(5) && *getarg(5)) { canRun=true; } hoc_ivpvaluerun(s1,pd,s3,deflt,canRun, extra); }else{ hoc_ivpvalue(s1, pd, deflt, extra); } ENDGUI } void hoc_xvalue() { hoc_xvalue_helper(); hoc_ret(); hoc_pushx(0.); } void hoc_xpvalue() { hoc_xpvalue_helper(); hoc_ret(); hoc_pushx(0.); } void hoc_xlabel() { IFGUI char* s1; s1 = gargstr(1); hoc_ivlabel(s1); ENDGUI hoc_ret(); hoc_pushx(0.); } void hoc_xvarlabel() { IFGUI if (hoc_is_object_arg(1)) { hoc_ivvarlabel(NULL, *hoc_objgetarg(1)); }else{ hoc_ivvarlabel(hoc_pgargstr(1)); } ENDGUI hoc_ret(); hoc_pushx(0.); } // ZFM modified to add vertical vs. horizontal void hoc_xslider() { IFGUI float low=0, high=100; float resolution=1; int nsteps = 10; char* send = NULL; Object* pysend = NULL; double* pval = NULL; Object* pyvar = NULL; bool vert = 0; if (ifarg(3)) { low = *getarg(2); high = *getarg(3); resolution = (high - low)/100.; } int iarg = 4; if (ifarg(iarg)) { if (hoc_is_str_arg(iarg)) { send = gargstr(4); ++iarg; }else if (hoc_is_object_arg(iarg)) { pysend = *hoc_objgetarg(iarg); ++iarg; } } if (ifarg(iarg)) { vert = int(chkarg(iarg,0,1)); } bool slow = false; if (ifarg(++iarg)) { slow = int(chkarg(iarg, 0, 1)); } if (hoc_is_object_arg(1)) { pyvar = *hoc_objgetarg(1); }else{ pval = hoc_pgetarg(1); } hoc_ivslider(pval, low, high, resolution, nsteps, send, vert, slow, pyvar, pysend); ENDGUI hoc_ret(); hoc_pushx(0.); } } /* end extern "C" */ class HocButton : public Button { public: HocButton(const char*, Glyph*, Style*, TelltaleState*, Action*); virtual ~HocButton(); static HocButton* instance(const char*, Action*); virtual void print(Printer*, const Allocation&) const; private: Glyph* l_; }; HocButton::HocButton(const char* text, Glyph* g, Style* s, TelltaleState* t, Action* a) : Button(g, s, t, a){ l_ = WidgetKit::instance()->label(text); l_->ref(); } HocButton::~HocButton() { Resource::unref(l_); } HocButton* HocButton::instance(const char* s, Action* a) { Button* b = WidgetKit::instance()->push_button(s, a); b->ref(); HocButton* hb = new HocButton( s, b->body(), b->style(), b->state(), b->action() ); b->unref(); return hb; } void HocButton::print(Printer* pr, const Allocation& a) const { l_->print(pr, a); } implementPtrList(HocPanelList, HocPanel); static HocPanelList* hoc_panel_list; static HocPanel* curHocPanel; static HocValEditor* last_fe_constructed_; static void checkOpenPanel() { if (!curHocPanel) { hoc_execerror("No panel is open", NULL); } } declarePtrList(HocMenuList,HocMenu) implementPtrList(HocMenuList,HocMenu) /*static*/ class MenuStack { public: bool isEmpty() { return l_.count() == 0; } void push(HocMenu* m); void pop() {if (l_.count()) {l_.item(0)->unref(); l_.remove(0); }} Menu* top() {return (l_.count()) ? l_.item(0)->menu() : NULL; } HocItem* hoc_item() {return (l_.count()) ? l_.item(0) : NULL; } void clean(); private: HocMenuList l_; }; void MenuStack::push(HocMenu* m) { m->ref(); l_.prepend(m); } void MenuStack::clean() { for (long i = 0; i < l_.count(); i++) { l_.item(i)->unref(); } l_.remove_all(); } static MenuStack* menuStack; static Menu* hocmenubar; class OcTelltaleGroup : public TelltaleGroup { public: OcTelltaleGroup(); virtual ~OcTelltaleGroup(); virtual void update(TelltaleState*); virtual void remove(TelltaleState*); virtual void restore(); private: TelltaleState* previous_; TelltaleState* current_; }; OcTelltaleGroup::OcTelltaleGroup() { previous_ = NULL; current_ = NULL; } OcTelltaleGroup::~OcTelltaleGroup() { } void OcTelltaleGroup::update(TelltaleState* t) { if (t != current_ && t->test(TelltaleState::is_chosen)) { previous_ = current_; current_ = t; } TelltaleGroup::update(t); } void OcTelltaleGroup::remove(TelltaleState* t) { if (previous_ == t) { previous_ = NULL; } if (current_ == t) { current_ = NULL; } TelltaleGroup::remove(t); } void OcTelltaleGroup::restore() { if (previous_) { previous_->set(TelltaleState::is_chosen, true); }else if (current_){ TelltaleGroup::update(current_); current_->set(TelltaleState::is_chosen, false); current_ = NULL; } } class HocRadioAction : public HocAction { public: HocRadioAction(const char* action, OcTelltaleGroup*, Object* pyact = NULL); virtual ~HocRadioAction(); virtual void help(); private: OcTelltaleGroup* tg_; }; HocRadioAction::HocRadioAction(const char* action, OcTelltaleGroup* tg, Object* pyact) : HocAction(action, pyact) { tg_ = tg; Resource::ref(tg_); } HocRadioAction::~HocRadioAction() { Resource::unref(tg_); } void HocRadioAction::help() { tg_->restore(); HocAction::help(); } /*static*/ class HocRadio { public: HocRadio(); virtual ~HocRadio(); OcTelltaleGroup* group() { return g_; } void start(); void stop(); private: OcTelltaleGroup* g_; }; HocRadio::HocRadio() { g_ = NULL; } HocRadio::~HocRadio() {Resource::unref(g_);} void HocRadio::start() { Resource::unref(g_); g_ = new OcTelltaleGroup(); g_->ref(); } void HocRadio::stop() { Resource::unref(g_); g_ = NULL; } static HocRadio* hoc_radio; void hoc_ivpanel(const char* name, bool h) { if (!hoc_radio) { hoc_radio = new HocRadio(); } if (curHocPanel) { fprintf(stderr, "%s not closed\n", curHocPanel->getName()); if (menuStack) { menuStack->clean(); } curHocPanel->unref(); curHocPanel = NULL; hoc_execerror("Didn't close the previous panel", NULL); }else{ curHocPanel = new HocPanel(name, h); curHocPanel->ref(); } hoc_radio->stop(); } void hoc_ivpanelmap(int scroll) { checkOpenPanel(); curHocPanel->map_window(scroll); curHocPanel->unref(); curHocPanel = NULL; if (menuStack && !menuStack->isEmpty()) { fprintf(stderr, "%s menu not closed\n", menuStack->hoc_item()->getStr()); menuStack->clean(); hoc_execerror("A menu is still open", 0); } hoc_radio->stop(); } void hoc_ivpanelPlace(Coord left, Coord bottom, int scroll) { checkOpenPanel(); curHocPanel->left_ = left; curHocPanel->bottom_ = bottom; hoc_ivpanelmap(scroll); } void hoc_ivbutton(const char* name, const char* action, Object* pyact) { checkOpenPanel(); hoc_radio->stop(); if (menuStack && ! menuStack->isEmpty()) { menuStack->top()->append_item(curHocPanel->menuItem(name, action, false, pyact)); }else{ curHocPanel->pushButton(name, action, false, pyact); } } void hoc_ivstatebutton(double* pd, const char* name, const char* action, int style, Object* pyvar, Object* pyact) { checkOpenPanel(); hoc_radio->stop(); if (menuStack && ! menuStack->isEmpty()) { menuStack->top()->append_item(curHocPanel->menuStateItem(pd, name, action, pyvar, pyact)); }else{ curHocPanel->stateButton(pd, name, action, style, pyvar, pyact); } } void hoc_ivradiobutton(const char* name, const char* action, bool activate, Object* pyact) { checkOpenPanel(); if (!hoc_radio->group()) { hoc_radio->start(); } if (menuStack && ! menuStack->isEmpty()) { menuStack->top()->append_item(curHocPanel->menuItem(name, action, activate, pyact)); }else{ curHocPanel->pushButton(name, action, activate, pyact); } } void hoc_ivmenu(const char* name, bool add2menubar) { if (!menuStack) { menuStack = new MenuStack(); } checkOpenPanel(); hoc_radio->stop(); if (name) { HocMenu* m = curHocPanel->menu(name, add2menubar); menuStack->push(m); }else{ curHocPanel->itemAppend("xmenu()"); menuStack->pop(); } } void hoc_ivvarmenu(const char* name, const char* action, bool add2menubar, Object* pyvar) { if (!menuStack) { menuStack = new MenuStack(); } checkOpenPanel(); hoc_radio->stop(); HocMenu* m = curHocPanel->menu(name, add2menubar); HocMenuAction* hma = new HocMenuAction(action, pyvar, m); m->item()->action(hma); } void hoc_ivvalue_keep_updated(const char* name, const char* variable, Object* pyvar) { checkOpenPanel(); hoc_radio->stop(); Symbol* s = hoc_get_symbol(variable); curHocPanel->valueEd(name, variable, NULL, false, hoc_val_pointer(variable), false, true, (s?s->extra:NULL), pyvar); } void hoc_ivvalue(const char* name, const char* variable, bool deflt, Object* pyvar) { hoc_ivvaluerun( name, variable, NULL, deflt, false, false); } void hoc_ivfixedvalue(const char* name, const char* variable, bool deflt, bool usepointer) { hoc_ivvaluerun(name, variable, NULL, deflt, false, usepointer); } void hoc_ivpvalue(const char* name, double* pd, bool deflt, HocSymExtension* extra) { hoc_ivpvaluerun( name, pd, 0, deflt, false, extra); } void hoc_ivvaluerun(const char* name, const char* variable, const char* action, bool deflt, bool canRun, bool usepointer, Object* pyvar, Object* pyact) { hoc_ivvaluerun_ex(name, variable, NULL, pyvar, action, pyact, deflt, canRun, usepointer); } void hoc_ivvaluerun_ex(CChar* name, CChar* variable, double* pvar, Object* pyvar, CChar* action, Object* pyact, bool deflt, bool canrun, bool usepointer, HocSymExtension* extra) { checkOpenPanel(); hoc_radio->stop(); Symbol* s = NULL; if (!pvar && !pyvar) { s = hoc_get_symbol(variable); if (usepointer) { pvar = hoc_val_pointer(variable); } } HocSymExtension* xtra = extra; if (!xtra) { s ? s->extra : NULL; } curHocPanel->valueEd(name, variable, action, canrun, pvar, deflt, false, xtra, pyvar, pyact); } void hoc_ivpvaluerun(const char* name, double* pd, const char* action, bool deflt, bool canRun, HocSymExtension* extra){ checkOpenPanel(); hoc_radio->stop(); curHocPanel->valueEd(name, 0, action, canRun, pd, deflt, false, extra); } void hoc_ivlabel(const char* s) { checkOpenPanel(); hoc_radio->stop(); curHocPanel->label(s); } void hoc_ivvarlabel(char** s, Object* pyvar) { checkOpenPanel(); hoc_radio->stop(); curHocPanel->var_label(s, pyvar); } // ZFM added vert void hoc_ivslider(double* pd, float low, float high, float resolution, int nsteps, const char* s, bool vert, bool slow, Object* pyvar, Object* pyact) { checkOpenPanel(); curHocPanel->slider(pd, low, high, resolution, nsteps, s, vert, slow, pyvar, pyact); } static char* hideQuote(const char* s) { static char buf[200]; const char* cp1; char* cp2; cp2 = buf; if (s) for (cp1=s; *cp1; cp1++, cp2++) { if (*cp1 == '"') { *cp2++ = '\\'; } *cp2 = *cp1; } *cp2 = '\0'; return buf; } static void saveMenuFile() { } void HocPanel::save_all(ostream&) { if (!hoc_panel_list) return; long i, cnt; HocDataPaths* data_paths = new HocDataPaths(); cnt = hoc_panel_list->count(); if (hoc_panel_list) for (i = 0; i < cnt; ++i) { hoc_panel_list->item(i)->data_path(data_paths, true); } data_paths->search(); if (hoc_panel_list) for (i = 0; i < cnt; ++i) { hoc_panel_list->item(i)->data_path(data_paths, false); } delete data_paths; } void HocPanel::update_ptrs() { if (!hoc_panel_list) return; int i, j; for (i=0; i < hoc_panel_list->count(); ++i) { HocUpdateItemList& ul = hoc_panel_list->item(i)->elist_; for (j=0; j < ul.count(); ++j) { ul.item(j)->update_ptrs(); } } } #if MAC void HocPanel::mac_menubar() { int i = 1; int mindex = 0; printf("menubar 0 %s\n", getName()); mac_menubar(mindex, i, 0); } void HocPanel::mac_menubar(int& mindex, int& i, int m) { int mr; int mi = 0; while (i < ilist_.count()) { mr = ilist_.item(i)->mac_menubar(mindex, m, mi); ++i; ++mi; if (mr > m) { mac_menubar(mindex, i, mr); }else if (mr < m) { return; } } return; } #endif void HocPanel::map_window(int scroll) { // switch to scrollbox if too many items static GlyphIndex maxcnt = -1; if (1 || maxcnt == -1) { maxcnt = 12; Style* s = WidgetKit::instance()->style(); s->find_attribute("panel_scroll", maxcnt); } if ((scroll == -1 && box_->count() > maxcnt) || scroll == 1) { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); ScrollBox* vsb = lk.vscrollbox(box_->count()); while(box_->count()) { vsb->append(box_->component(0)); box_->remove(0); } box_->append( lk.hbox( vsb, lk.hspace(4), wk.vscroll_bar(vsb) ) ); } PrintableWindow* w = OcGlyph::make_window(left_, bottom_); w->style(new Style(WidgetKit::instance()->style())); w->style()->attribute("name", getName()); w->map(); } //HocPanel implementPtrList(HocUpdateItemList,HocUpdateItem); implementPtrList(HocItemList,HocItem); static void var_freed(void* pd, int size) { if (hoc_panel_list) for (long i = hoc_panel_list->count() - 1; i >= 0; --i) { hoc_panel_list->item(i)->check_valid_pointers(pd, size); } } HocPanel::HocPanel(const char* name, bool h) : OcGlyph(NULL) { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); horizontal_ = h; hocmenubar = NULL; if (h) { box_ = lk.hbox(); }else{ box_ = lk.vbox(); } box_->ref(); body(ih_ = new PanelInputHandler( new Background( new Border( lk.margin( lk.hflexible(box_, fil, 0), 3 ), wk.foreground() ), wk.background() ) , wk.style()) ); if (!hoc_panel_list) { hoc_panel_list = new HocPanelList; Oc oc; oc.notify_freed(var_freed); } hoc_panel_list->append(this); item_append(new HocItem(name)); left_ = -1000.; bottom_ = -1000.; errno = 0; } HocPanel::~HocPanel() { long i; box_->unref(); for (i = 0; i < ilist_.count(); i++) { ilist_.item(i)->HocItem::unref(); } for (i = 0; i < elist_.count(); i++) { elist_.item(i)->HocItem::unref(); } for (i=0; i < hoc_panel_list->count(); ++i) { if (hoc_panel_list->item(i) == this) { hoc_panel_list->remove(i); break; } } ilist_.remove_all(); elist_.remove_all(); // printf("~HocPanel\n"); } //HocUpdateItem HocUpdateItem::HocUpdateItem(const char* name, HocItem* hi) : HocItem(name, hi) {} HocUpdateItem::~HocUpdateItem() { HocPanel::keep_updated(this, false); } void HocUpdateItem::update_hoc_item() {} void HocUpdateItem::check_pointer(void*, int) {}void HocUpdateItem::data_path(HocDataPaths*, bool) {} // ones that get updated on every doEvents() HocUpdateItemList* HocPanel::update_list_; void HocPanel::keep_updated() { static int cnt = 0; if (update_list_ && (++cnt%10 == 0)) { long i, cnt = update_list_->count(); if (cnt) for(i=0; i < cnt; ++i) { update_list_->item(i)->update_hoc_item(); } } } void HocPanel::keep_updated(HocUpdateItem* hui, bool add) { if (!update_list_) { update_list_ = new HocUpdateItemList(); } if (add) { update_list_->append(hui); }else{ for (long i=0; i < update_list_->count(); ++i) { if (update_list_->item(i) == hui) { update_list_->remove(i); break; } } } } void HocPanel::paneltool(const char* name, const char* proc, const char* selact, ScenePicker* sp, Object* pycallback, Object* pyselact) { HocCommand* hc = pycallback ? new HocCommand(pycallback) : new HocCommand(proc); HocCommandTool* hct = new HocCommandTool(hc); HocAction* ha = NULL; if (selact || pyselact) { ha = new HocAction(selact, pyselact); } if (curHocPanel && (!menuStack || menuStack->isEmpty())) { Button* b = sp->radio_button(name, hct, ha); curHocPanel->box()->append(b); }else{ sp->add_radio_menu(gargstr(1), hct, ha); } } void HocPanel::itemAppend(const char* str) { item_append(new HocItem(str)); } PolyGlyph* HocPanel::box() { // return (PolyGlyph*)(((MonoGlyph*)body())->body()); return box_; } const char* HocPanel::getName() { return ilist_.item(0)->getStr(); } HocItem* HocPanel::hoc_item() { return ilist_.item(0); } void HocPanel::pushButton(const char* name, const char* action, bool activate, Object* pyact) { if (hoc_radio->group()) { HocRadioAction* a = new HocRadioAction(action, hoc_radio->group(), pyact); Button* b = WidgetKit::instance()->radio_button(hoc_radio->group(), name, a); box()->append(b); item_append(new HocRadioButton(name, a, hoc_item())); if (activate) { TelltaleState* tts = b->state(); tts->set(TelltaleState::is_chosen, true); hoc_radio->group()->update(tts); } }else{ HocAction* a = new HocAction(action, pyact); box()->append(WidgetKit::instance()->push_button(name, a)); item_append(new HocPushButton(name, a, hoc_item())); } } HocPushButton::HocPushButton(const char* name, HocAction* a, HocItem* hi) : HocItem(name, hi) { a_ = a; Resource::ref(a); a->hoc_item(this); } HocPushButton::~HocPushButton() { Resource::unref(a_); } void HocPushButton::write(ostream& o) { char buf[200]; sprintf(buf, "xbutton(\"%s\",\"%s\")", getStr(), hideQuote(a_->name())); o << buf << endl; } #if MAC int HocPushButton::mac_menubar(int&, int m, int mi) { printf("button item %d in menu %d \"%s\", \"%s\"\n", mi, m, getStr(), hideQuote(a_->name())); return m; } #endif HocRadioButton::HocRadioButton(const char* name, HocRadioAction* a, HocItem* hi) : HocItem(name, hi) { a_ = a; Resource::ref(a); a->hoc_item(this); } HocRadioButton::~HocRadioButton() { Resource::unref(a_); } void HocRadioButton::write(ostream& o) { char buf[200]; sprintf(buf, "xradiobutton(\"%s\",\"%s\")", getStr(), hideQuote(a_->name())); o << buf << endl; } #if MAC int HocRadioButton::mac_menubar(int&, int m, int mi) { printf("radio item %d in menu %d \"%s\", \"%s\"\n", mi, m, getStr(), hideQuote(a_->name())); return m; } #endif void HocPanel::label(const char* name) { box()->append( LayoutKit::instance()->margin( WidgetKit::instance()->label(name), 3 ) ); item_append(new HocLabel(name)); } void HocPanel::var_label(char** name, Object* pyvar) { HocVarLabel* l = new HocVarLabel(name, box(), pyvar); item_append(l); elist_.append(l); l->ref(); } // ZFM added vert void HocPanel::slider(double* pd, float low, float high, float resolution, int nsteps, const char* send, bool vert, bool slow, Object* pyvar, Object* pysend) { OcSlider* s = new OcSlider(pd, low, high, resolution, nsteps, send, vert, slow, pyvar, pysend); LayoutKit* lk = LayoutKit::instance(); WidgetKit* wk = WidgetKit::instance(); if (slow) { wk->begin_style("SlowSlider"); } if (vert) { box()->append( lk->hflexible( WidgetKit::instance()->vscroll_bar(s->adjustable()) ) ); } else { box()->append( lk->hflexible( WidgetKit::instance()->hscroll_bar(s->adjustable()) ) ); } if (slow) { wk->end_style(); } item_append(s); elist_.append(s); s->ref(); } HocMenu* HocPanel::menu(const char* name, bool add2menubar) { WidgetKit* wk = WidgetKit::instance(); Menu* m = wk->pulldown(); MenuItem* mi; HocMenu* hm; if (menuStack->isEmpty()) { Menu* m0; if (!add2menubar) { hocmenubar = NULL; } if (hocmenubar) { m0 = hocmenubar; }else{ m0 = wk->menubar(); hocmenubar = m0; LayoutKit* lk = LayoutKit::instance(); box()->append(lk->hbox(m0,lk->hglue())); } mi = wk->menubar_item(name); m0->append_item(mi); hm = new HocMenu(name, m, mi, hoc_item(), add2menubar); }else{ mi = K::menu_item(name); menuStack->top()->append_item(mi); hm = new HocMenu(name, m, mi, menuStack->hoc_item()); } item_append(hm); mi->menu(m); return hm; } MenuItem* HocPanel::menuItem(const char* name, const char* act, bool activate, Object* pyact) { MenuItem* mi; if (hoc_radio->group()) { HocRadioAction* a = new HocRadioAction(act, hoc_radio->group(), pyact); mi = K::radio_menu_item(hoc_radio->group(), name); mi->action(a); item_append(new HocRadioButton(name, a, menuStack->hoc_item())); if (activate) { TelltaleState* tts = mi->state(); tts->set(TelltaleState::is_chosen, true); hoc_radio->group()->update(tts); } }else{ HocAction* a = new HocAction(act, pyact); mi = K::menu_item(name); mi->action(a); item_append(new HocPushButton(name, a, menuStack->hoc_item())); } return mi; } HocMenu::HocMenu(const char* name, Menu* m, MenuItem* mi, HocItem* hi, bool add2menubar) : HocItem(name, hi) { menu_ = m; mi_ = mi; add2menubar_ = add2menubar; m->ref(); } HocMenu::~HocMenu() { menu_->unref(); } void HocMenu::write(ostream& o) { char buf[200]; sprintf(buf, "xmenu(\"%s\", %d)", getStr(), add2menubar_); o << buf << endl; } #if MAC int HocMenu::mac_menubar(int& mindex, int m, int mi) { ++mindex; printf("menu %d is item %d in %d %s\n", mindex, mi, m, getStr()); return mindex; } #endif static Coord xvalue_field_size; void HocPanel::valueEd(const char* prompt, Object* pyvar, Object* pyact, bool canrun, bool deflt, bool keep_updated) { valueEd(prompt, NULL, NULL, canrun, NULL, deflt, keep_updated, NULL, pyvar, pyact); } void HocPanel::valueEd(const char* name, const char* variable, const char* action, bool canrun, double* pd, bool deflt, bool keep_updated, HocSymExtension* extra, Object* pyvar, Object* pyact) { HocValAction* act; if (pyact || action) { act = new HocValAction(action, pyact); }else{ act = new HocValAction(""); } ValEdLabel* vel; float* limits = 0; if (extra && extra->parmlimits) { limits = extra->parmlimits; } if (extra && extra->units && units_on_flag_) { char nu[256]; sprintf(nu, "%s (%s)", name, extra->units); vel = new ValEdLabel(WidgetKit::instance()->label(nu)); }else{ vel = new ValEdLabel(WidgetKit::instance()->label(name)); } Button* prompt; if (canrun) { prompt = WidgetKit::instance()->default_button(vel, act); }else{ prompt = WidgetKit::instance()->push_button(vel, act); } vel->tts(prompt->state()); HocValEditor* fe; Button* def; if (deflt) { HocDefaultValEditor* dve = new HocDefaultValEditor( name, variable, vel, act, pd, canrun, hoc_item(), pyvar); def = dve->checkbox(); fe = dve; }else if (keep_updated) { fe = new HocValEditorKeepUpdated(name, variable, vel, act, pd, hoc_item(), pyvar); }else{ fe = new HocValEditor(name, variable, vel, act, pd, canrun, hoc_item(), pyvar); } ih_->append_input_handler(fe->field_editor()); elist_.append(fe); fe->ref(); act->setFieldSEditor(fe); //so button can change the editor LayoutKit* lk = LayoutKit::instance(); // from mike_neubig_ivoc_xmenu float fct; Style* s = WidgetKit::instance()->style(); if(!s->find_attribute("stepper_size", fct)){ fct = 20; } if (deflt) { box()->append(lk->hbox( lk->vcenter(prompt), lk->vcenter(def), lk->vcenter(lk->h_fixed_span(fe->field_editor(), xvalue_field_size)), lk->vcenter(lk->fixed(fe->stepper(), (int) fct, (int) fct )) )); }else{ box()->append(lk->hbox( prompt, lk->h_fixed_span(fe->field_editor(), xvalue_field_size), (fe->stepper()? lk->fixed(fe->stepper(), int(fct), int(fct)) : NULL) )); } item_append(fe); if (limits) { fe->setlimits(limits); } last_fe_constructed_ = fe; } void HocPanel::save(ostream& o) { o << "{" << endl; write(o); o << "}" << endl; } void HocPanel::write(ostream& o) { Oc oc; char buf[200]; long i; // o << "xpanel(\"" << getName() << "\")" << endl; sprintf(buf, "xpanel(\"%s\", %d)", getName(), horizontal_); o << buf << endl; for (i = 1; i < ilist_.count(); i++) { ilist_.item(i)->write(o); } if (has_window()) { sprintf(buf, "xpanel(%g,%g)", window()->save_left(), window()->save_bottom()); o << buf << endl; }else{ o << "xpanel()" << endl; } } void HocPanel::item_append(HocItem* hi) { hi->ref(); ilist_.append(hi); } //HocItem HocItem::HocItem(const char* str, HocItem* hi) : str_(str){ help_parent_ = hi; } HocItem::~HocItem() { // printf("~HocItem %s\n", str_.string()); } void HocItem::write(ostream& o) { o << str_.string() << endl; } #if MAC int HocItem::mac_menubar(int&, int m, int mi) { if (strcmp(getStr(), "xmenu()") == 0) { printf("end menu %d\n", m); return -1; }else{ printf("invalid menuitem %s\n", getStr()); } return m; } #endif const char* HocItem::getStr() { return str_.string(); } void HocItem::help_parent(HocItem* hi) { help_parent_ = hi; //not reffed } void HocItem::help(const char* child) { const char* c1; char buf[200], *c2 = buf; char path[512]; for (c1 = getStr(); *c1; ++c1) { if (isalnum(*c1)) { *c2++ = *c1; } } *c2 = '\0'; if (child) { sprintf(path, "%s %s", child, buf); }else{ strcpy(path, buf); } if (help_parent_) { help_parent_->help(path); }else{ Oc::help(path); } } //HocLabel HocLabel::HocLabel(const char* s) : HocItem(s) {} HocLabel::~HocLabel() {} void HocLabel::write(ostream& o) { char buf[200]; sprintf(buf, "xlabel(\"%s\")", hideQuote(getStr())); o << buf << endl; } #if 0 extern "C" { extern void purify_watch_rw_4(char**); } #endif //HocVarLabel HocVarLabel::HocVarLabel(char** cpp, PolyGlyph* pg, Object* pyvar) : HocUpdateItem("") { //purify_watch_rw_4(cpp); pyvar_ = pyvar; cpp_ = cpp; cp_ = NULL; if (pyvar_) { hoc_obj_ref(pyvar_); (*nrnpy_guigetstr)(pyvar_, &cp_); }else{ cp_ = *cpp_; } variable_ = NULL; p_ = new Patch(LayoutKit::instance()->margin( WidgetKit::instance()->label(cp_), 3 )); p_->ref(); pg->append(p_); } HocVarLabel::~HocVarLabel(){ p_->unref(); if (variable_) { delete variable_; } if (pyvar_) { hoc_obj_unref(pyvar_); if (cp_) { delete [] cp_; } } } void HocVarLabel::write(ostream& o) { if (variable_ && cpp_) { char buf[256]; sprintf(buf, "xvarlabel(%s)", variable_->string()); o << buf << endl; }else{ o << "xlabel(\"\")" << endl; } } void HocVarLabel::update_hoc_item() { if (pyvar_) { if ((*nrnpy_guigetstr)(pyvar_, &cp_)){ p_->body( LayoutKit::instance()->margin( WidgetKit::instance()->label(cp_), 3 ) ); p_->redraw(); p_->reallocate(); p_->redraw(); } }else if (cpp_) { //printf("update %s\n", cp_); if (*cpp_ != cp_) { cp_ = *cpp_; //printf("replacing with %s\n", cp_); p_->body( LayoutKit::instance()->margin( WidgetKit::instance()->label(cp_), 3 ) ); p_->redraw(); p_->reallocate(); p_->redraw(); } }else if (cp_) { cp_ = 0; //printf("HocVarLabel::update() freed\n"); p_->body( LayoutKit::instance()->margin( WidgetKit::instance()->label("Free'd"), 3 ) ); p_->redraw(); p_->reallocate(); p_->redraw(); } } HocMenuAction::HocMenuAction(const char* action, Object* pyact, HocMenu* hm) : HocAction(action, pyact) { hm_ = hm; hp_ = NULL; } HocMenuAction::~HocMenuAction(){ Resource::unref(hp_); } void HocMenuAction::execute() { while (hm_->menu()->item_count()) { hm_->menu()->remove_item(0); } Resource::unref(hp_); hp_ = NULL; hoc_ivpanel(""); menuStack->push(hm_); HocAction::execute(); menuStack->pop(); checkOpenPanel(); hp_ = curHocPanel; curHocPanel = NULL; hm_->item()->menu(hm_->menu()); } //HocAction HocAction::HocAction(const char* action, Object* pyact){ hi_ = NULL; if (pyact) { action_ = new HocCommand(pyact); }else if (action && action[0] != '\0') { action_ = new HocCommand(action); }else{ action_ = NULL; } } HocAction::~HocAction() { if (action_) { delete action_; } } void HocAction::hoc_item(HocItem* hi) { hi_ = hi; } void HocAction::execute() { if (Oc::helpmode()) { help(); return; } PanelInputHandler::handle_old_focus(); if (action_) { action_->audit(); action_->execute(); }else{ Oc oc; oc.notify(); } } void HocAction::help() { if (hi_) { hi_->help(); } } const char* HocAction::name() const { if (action_) { return action_->name(); }else{ return ""; } } #if UseFieldEditor declareFieldEditorCallback(HocValAction) implementFieldEditorCallback(HocValAction) #else declareFieldSEditorCallback(HocValAction); implementFieldSEditorCallback(HocValAction); #endif //HocValAction HocValAction::HocValAction(const char* action, Object* pyact) : HocAction(action, pyact){ fe_ = NULL; #if UseFieldEditor fea_ = new FieldEditorCallback(HocValAction)( #else fea_ = new FieldSEditorCallback(HocValAction)( #endif this, &HocValAction::accept, NULL); fea_->ref(); } HocValAction::~HocValAction() { //printf("~HocValAction\n"); fea_->unref(); } void HocValAction::setFieldSEditor(HocValEditor* fe) { fe_ = fe; //but not referenced since this action is referenced by fe } void HocValAction::accept(FieldSEditor*) { if (fe_->active()) { fe_->field_editor()->parent()->focus(NULL); }else{ fe_->evalField(); } fe_->audit(); HocAction::execute(); } void HocValAction::execute() { if (Oc::helpmode()) { fe_->help(); return; } accept(fe_->field_editor()); } class HocDefaultCheckbox : public Button { public: HocDefaultCheckbox(HocDefaultValEditor*, Glyph*, Style*, TelltaleState*, Action*); virtual ~HocDefaultCheckbox(); static HocDefaultCheckbox* instance(HocDefaultValEditor*); virtual void release(const Event&); private: HocDefaultValEditor* dve_; }; HocDefaultCheckbox::HocDefaultCheckbox(HocDefaultValEditor* dve, Glyph* g, Style* s, TelltaleState* t, Action* a) : Button(g, s, t, a) { dve_ = dve; } HocDefaultCheckbox::~HocDefaultCheckbox() { } HocDefaultCheckbox* HocDefaultCheckbox::instance(HocDefaultValEditor* dve) { Glyph* g; TelltaleState* t; WidgetKit& k = *WidgetKit::instance(); Style* s; k.begin_style("ToggleButton", "Button"); t = new TelltaleState( TelltaleState::is_enabled | TelltaleState::is_toggle ); g = k.check_box_look(NULL, t); s = k.style(); HocDefaultCheckbox* cb = new HocDefaultCheckbox(dve, g, s, t, NULL); k.end_style(); return cb; } void HocDefaultCheckbox::release(const Event& e) { if (Oc::helpmode()) { Button::release(e); } if (e.pointer_button() == Event::right) { dve_->def_change(e.pointer_root_x(), e.pointer_root_y()); } Button::release(e); } declareActionCallback(HocDefaultValEditor); implementActionCallback(HocDefaultValEditor); //HocDefaultValEditor HocDefaultValEditor::HocDefaultValEditor(const char* name, const char* variable, ValEdLabel* prompt, HocValAction* a, double* pd, bool canrun, HocItem* hi, Object* pyvar) : HocValEditor(name, variable, prompt, a, pd, canrun, hi, pyvar) { checkbox_ = HocDefaultCheckbox::instance(this); checkbox_->ref(); checkbox_->action(new ActionCallback(HocDefaultValEditor) (this, &HocDefaultValEditor::def_action)); evalField(); deflt_ = most_recent_ = get_val(); vs_ = HocValStepper::instance(this); Resource::ref(vs_); } HocDefaultValEditor::~HocDefaultValEditor() { checkbox_->unref(); vs_->unref(); } void HocDefaultValEditor::def_change(float x0, float y0) { evalField(); double x = get_val(); if (x != deflt_) { char form[200], buf[200]; sprintf(form, "Permanently replace default value %s with %s", xvalue_format->string(), xvalue_format->string()); sprintf(buf, form, deflt_, x); if (boolean_dialog(buf, "Replace", "Cancel", NULL, x0, y0)) { deflt_ = x; most_recent_ = x; } } } void HocDefaultValEditor::updateField() { HocValEditor::updateField(); TelltaleState* t = checkbox_->state(); // printf("telltale flag %x\n", t->flags()); bool same = (hoc_ac_ == deflt_); bool chosen = t->test(TelltaleState::is_chosen); if (same && chosen) { t->set(TelltaleState::is_chosen, false); }else if (!same) { most_recent_ = hoc_ac_; if (!chosen) { t->set(TelltaleState::is_chosen, true); } } } void HocDefaultValEditor::deflt(double d) { deflt_ = d; } void HocDefaultValEditor::def_action() { if (Oc::helpmode()) { checkbox_->state()->set(TelltaleState::is_chosen, !checkbox_->state()->test(TelltaleState::is_chosen)); Oc::help(Editor_Default); return; } bool chosen = checkbox_->state()->test(TelltaleState::is_chosen); if (chosen) { if (most_recent_ != deflt_) { set_val(most_recent_); } }else{ double x = get_val(); if (deflt_ != x) { most_recent_ = x; set_val(deflt_); } } // Oc oc; // oc.notifyHocValue(); updateField(); exec_action(); } //HocValEditorKeepUpdated HocValEditorKeepUpdated::HocValEditorKeepUpdated(const char* name , const char* variable, ValEdLabel* prompt, HocValAction* act, double* pd, HocItem* hi, Object* pyvar) :HocValEditor(name, variable, prompt, act, pd, false, hi, pyvar) { // printf("~HocValEditorKeepUpdated\n"); HocPanel::keep_updated(this, true); } HocValEditorKeepUpdated::~HocValEditorKeepUpdated() { // printf("~HocValEditorKeepUpdated\n"); HocPanel::keep_updated(this, false); } //HocEditorForItem g++ doesn't do multiple inheritance of same base classes. HocEditorForItem::HocEditorForItem(HocValEditor* he, HocValAction* a) : FieldSEditor("", WidgetKit::instance(), Session::instance()->style(), a->fea()) { hve_ = he; #ifdef WIN32 FieldSEditor::focus_out(); #endif // hve_->ref(); } HocEditorForItem::~HocEditorForItem() { // hve_->unref(); } static void set_format() { static Coord len; if (!xvalue_format) { xvalue_format = new String("%.5g"); WidgetKit::instance()->style()->find_attribute("xvalue_format", *xvalue_format); char buf[100]; sprintf(buf, xvalue_format->string(), -8.888888888888888e-18); Glyph* g = WidgetKit::instance()->label(buf); g->ref(); Requisition r; g->request(r); // mike_neubig_ivoc_xmenu float fct; Style* s = WidgetKit::instance()->style(); if(!s->find_attribute("xvalue_field_size_increase", fct)){ fct = 10; } xvalue_field_size = r.x_requirement().natural() + fct; g->unref(); } } double MyMath::resolution(double x) { if (!xvalue_format) { set_format(); } char buf[100]; sprintf(buf, xvalue_format->string(), Math::abs(x)); char* cp; char* least = NULL; for (cp = buf; *cp; ++cp) { if (isdigit(*cp)) { least = cp; break; } } for (; *cp; ++cp) { if (*cp >= '1' && *cp <= '9') { *cp = '0'; least = cp; } if (isalpha(*cp)) { break; } } assert(least); *least = '1'; double y; sscanf(buf, "%lf", &y); return y; } //HocValEditor HocValEditor::HocValEditor(const char* name, const char* variable, ValEdLabel* prompt, HocValAction* a, double* pd, bool canrun, HocItem* hi, Object* pyvar) : HocUpdateItem(name, hi) { if (!xvalue_format) { set_format(); } action_ = a; fe_ = new HocEditorForItem(this, a); fe_->ref(); Resource::ref(a); prompt_ = prompt; prompt->ref(); canrun_ = canrun; active_ = false; domain_limits_ = NULL; variable_ = NULL; pyvar_ = pyvar; pval_ = NULL; if (pd) { pval_ = pd; } if (pyvar) { hoc_obj_ref(pyvar); }else if (variable) { variable_ = new CopyString(variable); Symbol* sym = hoc_get_symbol(variable); if (sym && sym->extra) { domain_limits_ = sym->extra->parmlimits; } } HocValEditor::updateField(); fe_->focus_out(); } HocValEditor::~HocValEditor() { //printf("~HocValEditor\n"); if (variable_) { delete variable_; } if (pyvar_) { hoc_obj_unref(pyvar_); } Resource::unref(action_); Resource::unref(prompt_); fe_->unref(); } void HocValEditor::setlimits(float* limits) { domain_limits_ = limits; } void HocValEditor::update_hoc_item() { updateField(); } void HocValEditor::exec_action() { if (action_) { action_->execute(); }else{ Oc oc; oc.notify(); } } void HocValEditor::print(Printer* p, const Allocation& a) const { // printf("HocvalEditor::print\n"); Glyph* l = WidgetKit::instance()->label(*fe_->text()); l->ref(); l->print(p, a); l->unref(); } void HocValEditor::set_val(double x) { char buf[200]; if (pyvar_) { (*nrnpy_guisetval)(pyvar_, x); return; } hoc_ac_ = x; Oc oc; if (pval_) { *pval_ = hoc_ac_; }else if (variable_){ sprintf(buf, "%s = hoc_ac_\n", variable_->string()); oc.run(buf); } } double HocValEditor::get_val() { char buf[200]; if (pyvar_) { return (*nrnpy_guigetval)(pyvar_); }else if (pval_) { return *pval_; }else if (variable_) { Oc oc; sprintf(buf, "hoc_ac_ = %s\n", variable_->string()); oc.run(buf); return hoc_ac_; }else{ return 0.; } } double HocValEditor::domain_limits(double val) { return check_domain_limits(domain_limits_, val); } void HocValEditor::evalField() { char buf[200]; Oc oc; sprintf(buf, "hoc_ac_ = %s\n", fe_->text()->string()); oc.run(buf); hoc_ac_ = domain_limits(hoc_ac_); set_val(hoc_ac_); //prompt_->state()->set(TelltaleState::is_active, false); prompt_->state(false); } void HocValEditor::audit() { char buf[200]; if (pyvar_) { return; }else if (variable_) { sprintf(buf, "%s = %s\n", variable_->string(), fe_->text()->string()); }else if (pval_){ sprintf(buf, "// %p pointer set to %s\n", pval_, fe_->text()->string()); } hoc_audit_command(buf); } void HocValEditor::updateField() { if (active_) return; char buf[200]; if (pyvar_) { hoc_ac_ = get_val(); sprintf(buf, xvalue_format->string(), hoc_ac_); }else if (pval_) { sprintf(buf, xvalue_format->string(), *pval_); hoc_ac_ = *pval_; }else if (variable_) { Oc oc; sprintf(buf, "hoc_ac_ = %s\n", variable_->string()); if (oc.run(buf, 0)) { strcpy(buf, "Doesn't exist"); }else{ sprintf(buf, xvalue_format->string(), hoc_ac_); } }else{ sprintf(buf, "Free'd"); } if (strcmp(buf, fe_->text()->string()) != 0) { fe_->field(buf); } } void HocValEditor::write(ostream& o) { char buf[200]; Oc oc; if (variable_){ sprintf(buf, "hoc_ac_ = %s\n", variable_->string()); oc.run(buf); sprintf(buf, "%s = %g", variable_->string(), hoc_ac_); }else if (pval_) { sprintf(buf, "/* don't know the hoc path to %g", *pval_); return; }else{ sprintf(buf, "/* variable freed */"); return; } o << buf << endl; int usepointer; if (pval_) { usepointer=1; }else{ usepointer=0; } sprintf(buf, "xvalue(\"%s\",\"%s\", %d,\"%s\", %d, %d )", getStr(), variable_->string(), hoc_default_val_editor(), hideQuote(action_->name()), (int)canrun_, usepointer); o << buf << endl; } const char* HocValEditor::variable() const { if (variable_) { return variable_->string(); }else{ return NULL; } } void HocValEditorKeepUpdated::write(ostream& o) { char buf[200]; Oc oc; sprintf(buf, "hoc_ac_ = %s\n", variable()); oc.run(buf); sprintf(buf, "%s = %g", variable(), hoc_ac_); o << buf << endl; sprintf(buf, "xvalue(\"%s\",\"%s\", 2 )", getStr(), variable()); o << buf << endl; } void HocEditorForItem::keystroke(const Event& e) { bool unfocus = false; if (!hve_->active_) { return; } if (Oc::helpmode()) { hve_->help(); return; } char buf[2]; if (e.mapkey(buf, 1) > 0) switch (buf[0]) { case '\n': case '\r': unfocus = true; break; case '\033': hve_->active_ = false; hve_->updateField(); hve_->active_ = true; parent()->focus(NULL); return; case '\007': hve_->active_ = false; hve_->updateField(); hve_->active_ = true; return; default: break; } FieldSEditor::keystroke(e); if (unfocus) { parent()->focus(NULL); } } class HocEditorTempData { public: void init(const Event&); int sn(const Event&); #if 0 Coord x_, y_; Coord xd_, yd_; #endif int sn_; int index_; EventButton b_; }; static HocEditorTempData etd; void HocEditorTempData::init(const Event& e) { #if 0 x_ = e.pointer_x(); y_ = e.pointer_y(); xd_ = 1.; yd_ = 1.; #endif b_ = e.pointer_button(); if (b_ == Event::right) { sn_ = -1; }else{ sn_ = 1; } } int HocEditorTempData::sn(const Event&) { #if 0 float xnew = e.pointer_x(); float ynew = e.pointer_y(); #undef RES #define RES 3 if (Math::equal(x_, xnew, float(RES)) && Math::equal(y_, ynew, float(RES))) { return 0; } sn_ = ( ((xnew - x_)*xd_ + (ynew - y_)*yd_ >= 0.)) ? sn_ : -sn_; xd_ = xnew - x_; yd_ = ynew - y_; x_ = xnew; y_ = ynew; #endif return sn_; } void HocEditorForItem::press(const Event& e) { if (Oc::helpmode()) { hve_->help(); return; } // if (!hve_->active_) { // focus_in(); // } FieldSEditor::press(e); #if !UseFieldEditor int start; FieldSEditor::selection(start, index_); etd.init(e); #endif } void HocEditorForItem::drag(const Event& e) { #ifdef WIN32 FieldSEditor::drag(e); #else if (etd.b_ == Event::left) { FieldSEditor::drag(e); }else{ val_inc(e); } #endif } void HocEditorForItem::val_inc(const Event& e) { int index = index_; int i, sn; i = index; sn = etd.sn(e); if (sn == 0) { return; } const char* s = text()->string(); char abuf[100]; char* buf = abuf+1; strcpy(buf, s); if (i == strlen(buf)) { buf[i] = '0'; buf[i+1] = '\0'; } while( i >= 0 ) { if (isdigit(buf[i])) { buf[i] = (((buf[i] - '0') + sn + 100)%10) + '0'; if (sn == 1 && buf[i] != '0') { break; }else if (sn == -1 && buf[i] != '9') { break; } } --i; } if (i < 0) { if (buf[0] == '-') { if (sn == 1) { buf[0] = '1'; abuf[0] = '-'; buf = abuf; ++index_; }else{ strcpy(buf, s); } }else{ if (sn == 1) { abuf[0] = '1'; buf = abuf; ++index_; }else{ strcpy(buf, s); } } } field(buf); } void HocEditorForItem::release(const Event& e) { FieldSEditor::release(e); } InputHandler* HocEditorForItem::focus_in() { //printf("HocEditorForItem::focus_in()\n"); if (Oc::helpmode()) { return NULL; } if (!hve_->active_) { //hve_->prompt_->state()->set(TelltaleState::is_active, true); hve_->prompt_->state(true); hve_->active_ = true; return FieldSEditor::focus_in(); }else{ return InputHandler::focus_in(); } } void HocEditorForItem::focus_out() { if (hve_->active_) { hve_->active_ = false; //hve_->prompt_->state()->set(TelltaleState::is_active, false); hve_->prompt_->state(false); hve_->evalField(); } FieldSEditor::focus_out(); if (PanelInputHandler::has_old_focus()) { //printf("old focus out %p\n", (InputHandler*)this); hve_->exec_action(); } } void Oc::notifyHocValue() { //static int j=0; //printf("notifyHocValue %d\n", ++j); ParseTopLevel ptl; ptl.save(); if (hoc_panel_list) for (long i = hoc_panel_list->count() - 1; i >= 0; --i) { hoc_panel_list->item(i)->notifyHocValue(); } ptl.restore(); } void HocPanel::notifyHocValue() { for (long i = elist_.count() - 1; i >= 0; --i) { elist_.item(i)->update_hoc_item(); } } void HocPanel::check_valid_pointers(void* v, int size) { for (long i = elist_.count() - 1; i >= 0; --i) { elist_.item(i)->check_pointer(v, size); } } void HocValEditor::check_pointer(void* v, int size) { if (pval_) { double* pd = (double*)v; if (size == 1) { if (pd != pval_) return; }else{ if (pval_ < pd || pval_ >= pd + size) return; } pval_ = 0; } } void HocVarLabel::check_pointer(void* v, int) { char** cpp = (char**)v; if (cpp_ == cpp) { cpp_ = 0; } } void HocPanel::data_path(HocDataPaths* hdp, bool append) { for (long i = elist_.count() - 1; i >= 0; --i) { elist_.item(i)->data_path(hdp, append); } } void HocValEditor::data_path(HocDataPaths* hdp, bool append) { if (!variable_) { if (append) { hdp->append(pval_); }else{ String* s = hdp->retrieve(pval_); if (s) { variable_ = new CopyString(s->string()); } } } } void HocVarLabel::data_path(HocDataPaths* hdp, bool append) { if (cpp_ && !variable_) { if (append) { hdp->append(cpp_); }else{ String* s = hdp->retrieve(cpp_); if (s) { variable_ = new CopyString(s->string()); } } } } class StepperMenuAction : public Action { public: StepperMenuAction(bool, double); virtual ~StepperMenuAction(); virtual void execute(); private: double x_; bool geometric_; }; class StepperMenu : public PopupMenu { public: StepperMenu(); virtual ~StepperMenu(); void stepper(HocValStepper* vs) { vs_ = vs;} HocValStepper* stepper() { return vs_; } virtual bool event(Event&); void active(bool b) { active_ = b;} bool active() { return active_;} private: bool active_; HocValStepper* vs_; }; StepperMenu* HocValStepper::menu_; StepperMenuAction::StepperMenuAction(bool b, double x) { x_ = x; geometric_ = b; } StepperMenuAction::~StepperMenuAction() { } void StepperMenuAction::execute() { HocValStepper::menu()->stepper()->default_inc(geometric_, x_); } StepperMenu::StepperMenu() { WidgetKit& k = *WidgetKit::instance(); char buf[50]; active_ = false; vs_ = NULL; MenuItem* m; m = K::menu_item("Res"); m->action(new StepperMenuAction(false, 0)); append_item(m); m = K::menu_item("*10"); m->action(new StepperMenuAction(true, 10)); append_item(m); m = K::menu_item("*10^.1"); m->action(new StepperMenuAction(true, pow(10., .1))); append_item(m); m = K::menu_item("*e"); m->action(new StepperMenuAction(true, exp(1.))); append_item(m); m = K::menu_item("*e^.1"); m->action(new StepperMenuAction(true, exp(.1))); append_item(m); m = K::menu_item("*2"); m->action(new StepperMenuAction(true, 2)); append_item(m); m = K::menu_item("*2^.1"); m->action(new StepperMenuAction(true, pow(2., .1))); append_item(m); for (double x = 1000 ; x > .0005; x /= 10.) { sprintf(buf, "+%g", x); m = K::menu_item(buf); m->action(new StepperMenuAction(false, x)); append_item(m); } } StepperMenu::~StepperMenu() { } bool StepperMenu::event(Event& e) { PopupMenu::event(e); if (e.type() == Event::up) { vs_->menu_up(e); } return true; } /* static */ class NrnUpDown : public Glyph { public: static NrnUpDown* instance(); virtual ~NrnUpDown(); virtual void request(Requisition&) const; virtual void draw(Canvas*, const Allocation&) const; private: NrnUpDown(const Color*); static NrnUpDown* instance_; const Color* color_; }; NrnUpDown* NrnUpDown::instance_; NrnUpDown::NrnUpDown(const Color* c) : Glyph() { color_ = c; Resource::ref(c); } NrnUpDown::~NrnUpDown() { Resource::unref(color_); } NrnUpDown* NrnUpDown::instance() { if (!instance_) { instance_ = new NrnUpDown(WidgetKit::instance()->foreground()); instance_->ref(); } return instance_; } #if 1 void NrnUpDown::request(Requisition& r) const { Requirement x(10); Requirement y(20); r.require_x(x); r.require_y(y); } #endif void NrnUpDown::draw(Canvas* c, const Allocation& a) const { Coord x1 = a.left(); Coord y1 = a.bottom(); Coord x2 = a.right(); Coord y2 = a.top(); //printf("draw %g %g %g %g\n", x1, y1, x2, y2); Coord x = (x1 + x2)*.5; Coord y = (y1 + y2)*.5; c->new_path(); c->move_to(x1, y+1); c->line_to(x, y2); c->line_to(x2, y+1); c->close_path(); c->fill(color_); #if 1 c->new_path(); c->move_to(x1, y-1); c->line_to(x, y1); c->line_to(x2, y-1); c->close_path(); c->fill(color_); #endif } static Glyph* up_down_mover_look(TelltaleState* t) { return WidgetKit::instance()->push_button_look(NrnUpDown::instance(), t); } HocValStepper* HocValStepper::instance(HocValEditor* ve) { Glyph* g; TelltaleState* t; WidgetKit& k = *WidgetKit::instance(); Style* s; k.begin_style("UpMover", "Button"); t = new TelltaleState(TelltaleState::is_enabled); g = up_down_mover_look(t); // g = k.up_mover_look(t); s = k.style(); HocValStepper* vs = new HocValStepper(ve, g, s, t); k.end_style(); return vs; } HocValStepper::HocValStepper(HocValEditor* ve, Glyph* g, Style* s, TelltaleState* t) : Stepper(g, s, t) { if (!menu_) { menu_ = new StepperMenu(); menu_->ref(); } hve_ = ve; default_inc_ = MyMath::resolution(hve_->get_val()); geometric_ = false; } HocValStepper::~HocValStepper() { } void HocValStepper::press(const Event& e) { steps_ = 0; inc_ = default_inc_; menu_->active(false); if (Oc::helpmode()) { return; } switch (e.pointer_button()) { case Event::left : case Event::middle : { const Allocation& a = allocation(); if (e.pointer_y() < (a.bottom() + a.top())*.5) { if (geometric_) { inc_ = 1./default_inc_; }else{ inc_ *= -1; } } menu_->stepper(this); Stepper::press(e); break; } case Event::right : { menu_->active(true); menu_->stepper(this); Event e1(e); menu_->event(e1); } break; } } void HocValStepper::default_inc(bool g, double x) { if (x == 0.) { default_inc_ = MyMath::resolution(hve_->get_val()); geometric_ = false; }else{ default_inc_ = x; geometric_ = g; } } void HocValStepper::release(const Event& e) { if (Oc::helpmode()) { Oc::help(Editor_Stepper); return; } if (menu_->active()) { menu_->active(false); Button::release(e); return; } Stepper::release(e); Oc oc; hve_->exec_action(); oc.notify(); } void HocValStepper::menu_up(Event& e) { menu_->active(true); #ifdef WIN32 handler()->event(e); #else e.unread(); #endif } void HocValStepper::adjust() { double x, y; x = hve_->get_val(); if (geometric_) { y = x * inc_; }else{ y = x + inc_; } y = hve_->domain_limits(y); if ( steps_ > 0 && x*y <= 0.) { y = 0.; inc_ = 0.; } hve_->set_val(y); hve_->updateField(); if (!geometric_ && ((++steps_)%20) == 0) { inc_ *= 10.; } } void HocValStepper::left() { inc_ = default_inc_; } void HocValStepper::middle() { inc_ = default_inc_; } void HocValStepper::right() { } //OcSlider // ZFM added vert_ OcSlider::OcSlider(double* pd, float low, float high, float resolution, int nsteps, const char* send, bool vert, bool slow, Object* pyvar, Object* pysend) : HocUpdateItem("") { resolution_ = resolution; variable_ = NULL; pval_ = pd; pyvar_ = pyvar; if (pyvar_) { hoc_obj_ref(pyvar_); } vert_ = vert; slow_ = slow; bv_ = new BoundedValue(low, high); bv_->scroll_incr((high - low)/nsteps); if (send) { send_ = new HocCommand(send); }else if (pysend) { send_ = new HocCommand(pysend); }else{ send_ = NULL; } bv_->attach(Dimension_X, this); scrolling_ = false; } OcSlider::~OcSlider() { if (send_) { delete send_; } delete bv_; if (variable_) { delete variable_; } if (pyvar_) { hoc_obj_unref(pyvar_); } } Adjustable* OcSlider::adjustable() { return bv_; } static double last_send; void OcSlider::update(Observable*) { double x = slider_val(); if (pval_) { *pval_ = x; }else if (pyvar_) { (*nrnpy_guisetval)(pyvar_, x); }else{ return; } if (!scrolling_) { scrolling_ = true; while (Coord(x) != last_send) { audit(); last_send = Coord(x); if (send_) { send_->execute(); }else{ Oc oc; oc.notify(); } } scrolling_ = false; } } void OcSlider::audit() { char buf[200]; if (variable_) { sprintf(buf, "%s = %g\n", variable_->string(), *pval_); }else if (pval_){ sprintf(buf, "// %p pointer set to %g\n", pval_, *pval_); } hoc_audit_command(buf); if (send_) { send_->audit(); } } double OcSlider::slider_val() { double x = double(bv_->cur_lower(Dimension_X)); x = MyMath::anint(x/resolution_); x = x*resolution_; if (x > bv_->upper(Dimension_X) - resolution_/2.) x = bv_->upper(Dimension_X); if (x < bv_->lower(Dimension_X) + resolution_/2.) x = bv_->lower(Dimension_X); return x; } void OcSlider::update_hoc_item() { Coord x = 0.; if (pyvar_) { x = Coord((*nrnpy_guigetval)(pyvar_)); }else if (pval_) { x = Coord(*pval_); }else{ return; } if (x != bv_->cur_lower(Dimension_X)) { bool old = scrolling_; scrolling_ = true; bv_->scroll_to(Dimension_X, x); scrolling_ = old; } } void OcSlider::check_pointer(void* v, int size) { if (pval_) { double* pd = (double*)v; if (size == 1) { if (pd != pval_) return; }else{ if (pval_ < pd || pval_ >= pd + size) return; } pval_ = 0; } } void OcSlider::data_path(HocDataPaths* hdp, bool append) { if (!variable_ && pval_) { if (append) { hdp->append(pval_); }else{ String* s = hdp->retrieve(pval_); if (s) { variable_ = new CopyString(s->string()); } } } } void OcSlider::write(ostream& o) { if (variable_) { char buf[256]; if (send_) { sprintf(buf, "xslider(&%s, %g, %g, \"%s\", %d, %d)", variable_->string(), bv_->lower(Dimension_X), bv_->upper(Dimension_X), hideQuote(send_->name()), vert_, slow_ ); }else{ sprintf(buf, "xslider(&%s, %g, %g, %d, %d)", variable_->string(), bv_->lower(Dimension_X), bv_->upper(Dimension_X), vert_, slow_ ); } o << buf << endl; } } // Button with state void HocPanel::stateButton(double* pd, const char* name, const char* action, int style, Object* pyvar, Object* pyact) { HocAction* act = new HocAction(action, pyact); Button* button; if (style == HocStateButton::PALETTE) { button = WidgetKit::instance()->palette_button(name,act); } else { button = WidgetKit::instance()->check_box(name,act); } box()->append(button); HocStateButton* hsb = new HocStateButton(pd,name,button,act,style,hoc_item(), pyvar); item_append(hsb); elist_.append(hsb); hsb->ref(); } declareActionCallback(HocStateButton); implementActionCallback(HocStateButton); HocStateButton::HocStateButton(double* pd, const char* text, Button* button, HocAction* action, int style, HocItem* hi, Object* pyvar) : HocUpdateItem("", hi) { style_ = style; pval_ = pd; pyvar_ = pyvar; if (pyvar_) { hoc_obj_ref(pyvar_); } variable_ = NULL; name_ = new CopyString(text); action_ = action; action->hoc_item(this); Resource::ref(action_); b_ = button; // b_->ref(); // mutually reffed so don't b_->action(new ActionCallback(HocStateButton) (this, &HocStateButton::button_action)); } HocStateButton::~HocStateButton() { if (variable_) delete variable_; if (pyvar_) { hoc_obj_unref(pyvar_); } delete name_; Resource::unref(action_); // only come here when b is being deleted // Resource::unref(b_); // delete b_; } void HocStateButton::print(Printer* pr, const Allocation& a) const { Glyph* l = WidgetKit::instance()->label(name_->string()); l->ref(); l->print(pr, a); l->unref(); } bool HocStateButton::chosen() { return b_->state()->test(TelltaleState::is_chosen); } void HocStateButton::button_action() { if(Oc::helpmode()) { help(); b_->state()->set(TelltaleState::is_chosen, !chosen()); return; } if (pval_) { TelltaleState* t = b_->state(); if (chosen() != bool(*pval_)) { *pval_ = double(chosen()); } } if (pyvar_) { TelltaleState* t = b_->state(); if (chosen() != bool((*nrnpy_guigetval)(pyvar_))) { (*nrnpy_guisetval)(pyvar_, double(chosen())); } } if (action_) { action_->execute(); } else { Oc oc; oc.notify(); } } // set state of button to match variable void HocStateButton::update_hoc_item() { double x = 0.; if (pyvar_) { x = nrnpy_guigetval(pyvar_); }else if (pval_) { x = *pval_; } if (x) { b_->state()->set(TelltaleState::is_chosen, true); } else { b_->state()->set(TelltaleState::is_chosen, false); } } void HocStateButton::check_pointer(void* v, int size) { if (pval_) { double* pd = (double*)v; if (size == 1) { if (pd != pval_) return; }else{ if (pval_ < pd || pval_ >= pd + size) return; } pval_ = 0; } } void HocStateButton::data_path(HocDataPaths* hdp, bool append) { if (!variable_ && pval_) { if (append) { hdp->append(pval_); }else{ String* s = hdp->retrieve(pval_); if (s) { variable_ = new CopyString(s->string()); } } } } void HocStateButton::write(ostream& o) { if (variable_) { char buf[256]; if (style_ == PALETTE) { sprintf(buf, "xstatebutton(\"%s\",&%s,\"%s\")", name_->string(), variable_->string(), hideQuote(action_->name()) ); } else { sprintf(buf, "xcheckbox(\"%s\",&%s,\"%s\")", name_->string(), variable_->string(), hideQuote(action_->name()) ); } o << buf << endl; } } // menu item with state MenuItem* HocPanel::menuStateItem(double* pd, const char* name, const char* action, Object* pyvar, Object* pyact) { MenuItem* mi = WidgetKit::instance()->check_menu_item(name); HocAction* act = new HocAction(action, pyact); HocStateMenuItem* hsb = new HocStateMenuItem(pd,name,mi,act,hoc_item(), pyvar); item_append(hsb); elist_.append(hsb); hsb->ref(); return mi; } declareActionCallback(HocStateMenuItem); implementActionCallback(HocStateMenuItem); HocStateMenuItem::HocStateMenuItem(double* pd, const char* text, MenuItem* mi, HocAction* action, HocItem* hi, Object* pyvar) : HocUpdateItem("", hi) { pval_ = pd; pyvar_ = pyvar; if (pyvar_) { hoc_obj_ref(pyvar_); } variable_ = NULL; name_ = new CopyString(text); action_ = action; action->hoc_item(this); Resource::ref(action_); b_ = mi; // Resource::ref(b_); b_->action(new ActionCallback(HocStateMenuItem) (this, &HocStateMenuItem::button_action)); } HocStateMenuItem::~HocStateMenuItem() { if (variable_) delete variable_; delete name_; if (pyvar_) { hoc_obj_unref(pyvar_); } Resource::unref(action_); // Resource::unref(b_); // delete b_; } void HocStateMenuItem::print(Printer* pr, const Allocation& a) const { Glyph* l = WidgetKit::instance()->label(name_->string()); l->ref(); l->print(pr, a); l->unref(); } bool HocStateMenuItem::chosen() { return b_->state()->test(TelltaleState::is_chosen); } void HocStateMenuItem::button_action() { if(Oc::helpmode()) { help(); b_->state()->set(TelltaleState::is_chosen, !chosen()); return; } if (pval_) { TelltaleState* t = b_->state(); if (chosen() != bool(*pval_)) { *pval_ = double(chosen()); } } if (pyvar_) { TelltaleState* t = b_->state(); if (chosen() != bool((*nrnpy_guigetval)(pyvar_))) { (*nrnpy_guisetval)(pyvar_, double(chosen())); } } if (action_) { action_->execute(); } else { Oc oc; oc.notify(); } } // set state of button to match variable void HocStateMenuItem::update_hoc_item() { double x = 0.; if (pyvar_) { x = nrnpy_guigetval(pyvar_); }else if (pval_) { x = *pval_; } if (x) { b_->state()->set(TelltaleState::is_chosen, true); } else { b_->state()->set(TelltaleState::is_chosen, false); } } void HocStateMenuItem::check_pointer(void* v, int size) { if (pval_) { double* pd = (double*)v; if (size == 1) { if (pd != pval_) return; }else{ if (pval_ < pd || pval_ >= pd + size) return; } pval_ = 0; } } void HocStateMenuItem::data_path(HocDataPaths* hdp, bool append) { if (!variable_ && pval_) { if (append) { hdp->append(pval_); }else{ String* s = hdp->retrieve(pval_); if (s) { variable_ = new CopyString(s->string()); } } } } void HocStateMenuItem::write(ostream& o) { if (variable_) { char buf[256]; sprintf(buf, "xcheckbox(\"%s\",&%s,\"%s\")", name_->string(), variable_->string(), hideQuote(action_->name()) ); o << buf << endl; } } #endif //HAVE_IV static void* vfe_cons(Object*) { #if HAVE_IV IFGUI if (!ifarg(2) || hoc_is_str_arg(2)) { hoc_xvalue_helper(); }else{ hoc_xpvalue_helper(); } HocValEditor* fe = last_fe_constructed_; Resource::ref(fe); return (void*)fe; ENDGUI #endif return 0; } static void vfe_destruct(void* v) { #if HAVE_IV IFGUI HocValEditor* fe = (HocValEditor*)v; Resource::unref(fe); ENDGUI #endif } static double vfe_default(void* v) { double x = 0.; #if HAVE_IV IFGUI if (((HocValEditor*)v)->hoc_default_val_editor()) { HocDefaultValEditor* dfe = (HocDefaultValEditor*)v; dfe->deflt(x = dfe->get_val()); } ENDGUI #endif return x; } static Member_func vfe_members[] = { "default", vfe_default, 0, 0 }; void ValueFieldEditor_reg() { class2oc("ValueFieldEditor", vfe_cons, vfe_destruct, vfe_members, NULL, NULL, NULL); } #if HAVE_IV void HocValEditor::update_ptrs() { update_ptrs_helper(&pval_); } void OcSlider::update_ptrs() { update_ptrs_helper(&pval_); } void HocStateButton::update_ptrs() { update_ptrs_helper(&pval_); } void HocStateMenuItem::update_ptrs() { update_ptrs_helper(&pval_); } void HocUpdateItem::update_ptrs_helper(double** p) { if (*p) { double* pd = nrn_recalc_ptr(*p); *p = pd; } } #endif neuron-7.5/src/ivoc/xmenu.h000066400000000000000000000270541323325274500157450ustar00rootroot00000000000000#ifndef xmenu_h #define xmenu_h #include #include #include #include #include #include #include #include #if defined(WIN32) || defined(MAC) || defined(CYGWIN) #define UseFieldEditor 1 #else #define UseFieldEditor 0 // Use the FieldSEditor #endif #if UseFieldEditor #include #define FieldSEditor FieldEditor #else #include "field.h" #endif #include "ocglyph.h" #include "apwindow.h" #include "ivocconf.h" class HocPanel; // panel is a vbox with menus, buttons, value editors, etc. class HocMenu; // popup menu panel item class HocAction; // button/menuItem action class HocValEditor; // field editor with button class HocValAction; // knows what to do when value editor or associated button pressed. class HocItem; // for printing class HocDataPaths; class HocCommand; class HocVarLabel; class HocUpdateItem; class Patch; class BoundedValue; class HocRadioAction; class StepperMenu; class ValEdLabel; class ScenePicker; struct HocSymExtension; declarePtrList(HocUpdateItemList, HocUpdateItem) declarePtrList(HocItemList, HocItem) declarePtrList(HocPanelList, HocPanel) class HocPanel : public OcGlyph { public: HocPanel(const char* name, bool horizontal=false); virtual ~HocPanel(); virtual void map_window(int scroll = -1); // -1 leave up to panel_scroll attribute void pushButton(const char* name, const char* action, bool activate = false, Object* pyact = 0); void stateButton(double *pd, const char* name, const char* action, int style, Object* pyvar = NULL, Object* pyact = NULL); HocMenu* menu(const char* name, bool add2menubar = false); MenuItem* menuItem(const char* name, const char* action, bool activate = false, Object* pyact = 0); MenuItem* menuStateItem(double *pd, const char* name, const char* action, Object* pyvar = NULL, Object* pyact = NULL); void valueEd(const char* prompt, const char* variable, const char* action=0, bool canrun=false, double* pd=NULL, bool deflt=false, bool keep_updated=false, HocSymExtension* extra=NULL, Object* pyvar=NULL, Object* pyact=NULL); void valueEd(const char* prompt, Object* pyvar, Object* pyact=0, bool canrun=false, bool deflt=false, bool keep_updated=false); // ZFM added vert void slider(double*, float low = 0, float high = 100, float resolution = 1, int steps = 10, const char* send_cmd = NULL, bool vert = false, bool slow = false, Object* pyvar=NULL, Object* pysend=NULL); virtual void write(ostream&); virtual void save(ostream&); virtual HocItem* hoc_item(); void label(const char*); void var_label(char**, Object* pyvar = NULL); PolyGlyph* box(); const char* getName(); void itemAppend(const char*); void notifyHocValue(); void check_valid_pointers(void*, int); Coord left_, bottom_; // write by makeTray read by dissolve static void save_all(ostream&); void data_path(HocDataPaths*, bool); void item_append(HocItem*); #if MAC void mac_menubar(); void mac_menubar(int&, int&, int); // recurse per menu through list #endif static void keep_updated(); static void keep_updated(HocUpdateItem*, bool); static void paneltool(const char* name, const char* procname, const char* action, ScenePicker*, Object* pycallback = NULL, Object* pyselact = NULL); static void update_ptrs(); private: PolyGlyph* box_; HocUpdateItemList elist_; HocItemList ilist_; static HocUpdateItemList* update_list_; bool horizontal_; InputHandler* ih_; }; class HocItem : public Resource { public: HocItem(const char*, HocItem* parent = NULL); virtual ~HocItem(); virtual void write(ostream&); const char* getStr(); virtual void help(const char* childpath = NULL); virtual void help_parent(HocItem*); #if MAC virtual int mac_menubar(int&, int, int); #endif private: CopyString str_; HocItem* help_parent_; }; class HocPushButton : public HocItem { public: HocPushButton(const char*, HocAction*, HocItem* parent = NULL); virtual ~HocPushButton(); virtual void write(ostream&); #if MAC virtual int mac_menubar(int&, int, int); #endif private: HocAction* a_; }; class HocRadioButton : public HocItem { public: HocRadioButton(const char*, HocRadioAction*, HocItem* parent = NULL); virtual ~HocRadioButton(); virtual void write(ostream&); #if MAC virtual int mac_menubar(int&, int, int); #endif private: HocRadioAction* a_; }; class HocMenu : public HocItem { public: HocMenu(const char*, Menu*, MenuItem*, HocItem* parent = NULL, bool add2menubar = false); virtual ~HocMenu(); virtual void write(ostream&); virtual Menu* menu() { return menu_;} virtual MenuItem* item() { return mi_; } #if MAC virtual int mac_menubar(int&, int, int); #endif private: MenuItem* mi_; Menu* menu_; bool add2menubar_; }; class HocUpdateItem : public HocItem { public: HocUpdateItem(const char*, HocItem* parent = NULL); virtual ~HocUpdateItem(); virtual void update_hoc_item(); virtual void check_pointer(void*, int vector_size); virtual void data_path(HocDataPaths*, bool); virtual void update_ptrs(){} void update_ptrs_helper(double**); }; class HocLabel : public HocItem { public: HocLabel(const char*); virtual ~HocLabel(); virtual void write(ostream&); }; class HocVarLabel : public HocUpdateItem { public: HocVarLabel(char**, PolyGlyph*, Object* pyvar = NULL); virtual ~HocVarLabel(); virtual void write(ostream&); virtual void update_hoc_item(); virtual void check_pointer(void*, int); virtual void data_path(HocDataPaths*, bool); private: Patch* p_; char** cpp_; char* cp_; CopyString* variable_; Object* pyvar_; }; class HocAction : public Action { public: HocAction(const char* action, Object* pyact = NULL); virtual ~HocAction(); virtual void execute(); const char* name() const; virtual void help(); void hoc_item(HocItem*); private: HocCommand* action_; HocItem* hi_; }; class HocMenuAction : public HocAction { public: HocMenuAction(const char* action, Object* pyact, HocMenu*); virtual ~HocMenuAction(); virtual void execute(); private: HocMenu* hm_; HocPanel* hp_; // a temporary. hm_ is not part of this panel }; class HocEditorForItem : public FieldSEditor { public: HocEditorForItem(HocValEditor*, HocValAction*); virtual ~HocEditorForItem(); virtual void keystroke(const Event&); virtual void press(const Event&); virtual void drag(const Event&); virtual void release(const Event&); virtual void val_inc(const Event&); virtual InputHandler* focus_in(); virtual void focus_out(); private: HocValEditor* hve_; Coord y_; int index_; EventButton b_; }; class HocValStepper : public Stepper { public: static HocValStepper* instance(HocValEditor*); HocValStepper(HocValEditor*, Glyph*, Style*, TelltaleState*); virtual ~HocValStepper(); virtual void press(const Event&); virtual void release(const Event&); virtual void menu_up(Event&); void default_inc(bool, double); double default_inc(); static StepperMenu* menu() { return menu_;} protected: virtual void adjust(); private: void left(); void middle(); void right(); private: bool geometric_; int steps_; float default_inc_; float inc_; HocValEditor* hve_; static StepperMenu* menu_; }; class HocValEditor : public HocUpdateItem { public: HocValEditor(const char* name, const char* variable, ValEdLabel*, HocValAction*, double* pd=0, bool canrun=false, HocItem* parent = NULL, Object* pvar = NULL); virtual ~HocValEditor(); FieldSEditor* field_editor() { return fe_; } virtual Stepper* stepper() { return NULL; } virtual void update_hoc_item(); void evalField(); void audit(); virtual void updateField(); virtual void write(ostream&); virtual void data_path(HocDataPaths*, bool); virtual void check_pointer(void*, int); virtual void print(Printer*, const Allocation&)const; virtual int hoc_default_val_editor() {return 0;} void set_val(double); double get_val(); virtual void exec_action(); const char* variable() const; virtual void setlimits(float*); virtual double domain_limits(double); bool active() { return active_;} virtual void update_ptrs(); private: friend class HocEditorForItem; friend class HocValStepper; HocEditorForItem* fe_; bool active_; bool canrun_; HocAction* action_; CopyString* variable_; double* pval_; ValEdLabel* prompt_; float* domain_limits_; Object* pyvar_; }; class HocDefaultValEditor : public HocValEditor { public: HocDefaultValEditor(const char* name, const char* variable, ValEdLabel*, HocValAction*, double* pd=0, bool canrun=false, HocItem* parent = NULL, Object* pyvar=NULL); virtual ~HocDefaultValEditor(); virtual Stepper* stepper() { return vs_; } virtual void updateField(); virtual int hoc_default_val_editor() {return 1;} void deflt(double); void def_action(); void def_change(float, float); Button* checkbox() { return checkbox_; } private: Button* checkbox_; // not your normal checkbox. see xmenu.c double deflt_; double most_recent_; HocValStepper* vs_; }; class HocValEditorKeepUpdated : public HocValEditor { public: HocValEditorKeepUpdated(const char* name, const char* variable, ValEdLabel*, HocValAction*, double*, HocItem* parent = NULL, Object* pyvar=NULL); virtual ~HocValEditorKeepUpdated(); virtual void write(ostream&); }; class HocValAction : public HocAction { public: HocValAction(const char* action, Object* pyact = 0); HocValAction(Object* pyaction); virtual ~HocValAction(); void accept(FieldSEditor*); void execute(); void setFieldSEditor(HocValEditor*); #if UseFieldEditor FieldEditorAction* fea(){return fea_;} #else FieldSEditorAction* fea(){return fea_;} #endif private: HocValEditor* fe_; #if UseFieldEditor FieldEditorAction* fea_; #else FieldSEditorAction* fea_; #endif }; // ZFM added vert_ class OcSlider : public HocUpdateItem, public Observer { public: OcSlider(double*, float low, float high, float resolution, int nsteps, const char* send_cmd, bool vert, bool slow = false, Object* pyvar=NULL, Object* pysend=NULL); virtual ~OcSlider(); virtual void write(ostream&); Adjustable* adjustable(); virtual void update(Observable*); virtual void update_hoc_item(); virtual void check_pointer(void*, int vector_size); virtual void data_path(HocDataPaths*, bool); virtual double slider_val(); virtual void update_ptrs(); private: void audit(); private: float resolution_; BoundedValue* bv_; HocCommand* send_; double *pval_; Object* pyvar_; CopyString* variable_; bool scrolling_; bool vert_; bool slow_; }; class HocStateButton : public HocUpdateItem, public Observer { public: HocStateButton(double*, const char*, Button*, HocAction*, int, HocItem* parent = NULL, Object* pyvar = NULL); virtual ~HocStateButton(); virtual void write(ostream&); bool chosen(); void button_action(); virtual void update_hoc_item(); virtual void check_pointer(void*, int); virtual void data_path(HocDataPaths*, bool); virtual void print(Printer*, const Allocation&) const; virtual void update_ptrs(); enum { CHECKBOX,PALETTE }; private: int style_; CopyString* variable_; CopyString* name_; double* pval_; Object* pyvar_; Button* b_; HocAction* action_; }; class HocStateMenuItem : public HocUpdateItem, public Observer { public: HocStateMenuItem(double*, const char*, MenuItem*, HocAction*, HocItem* parent = NULL, Object* pyvar = NULL); virtual ~HocStateMenuItem(); virtual void write(ostream&); bool chosen(); void button_action(); virtual void update_hoc_item(); virtual void check_pointer(void*, int); virtual void data_path(HocDataPaths*, bool); virtual void print(Printer*, const Allocation&) const; virtual void update_ptrs(); private: CopyString* variable_; CopyString* name_; double* pval_; Object* pyvar_; MenuItem* b_; HocAction* action_; }; #endif neuron-7.5/src/ivoc/xyview.cpp000066400000000000000000000466371323325274500165070ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mymath.h" #include "apwindow.h" #include "ocglyph.h" #include "scenevie.h" #include "scenepic.h" #include "rubband.h" #include "idraw.h" // XYView /*static*/ class XYView_helper : public MonoGlyph { public: XYView_helper(Scene*, XYView*); virtual ~XYView_helper(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void print(Printer*, const Allocation&) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); public: Transformer t_; private: XYView* v_; friend XYView* XYView::current_pick_view(); friend XYView* XYView::current_draw_view(); friend void XYView::current_pick_view(XYView*); static XYView* current_pick_view_; static XYView* current_draw_view_; }; void XYView::current_pick_view(XYView* v) { XYView_helper::current_pick_view_ = v; } void print_t(const char* s, const Transformer& t){ float a00, a01, a10, a11, a20, a21; t.matrix(a00, a01, a10, a11, a20, a21); printf("%s transform %g %g %g %g %g %g\n", s, a00, a01, a10, a11, a20, a21); } XYView_helper::XYView_helper(Scene* s, XYView* v) : MonoGlyph(s) { v_ = v; } void XYView_helper::request(Requisition& req) const { Requirement rx(v_->width(), 0, 0, -v_->left()/v_->width()); Requirement ry(v_->height(), 0, 0, -v_->bottom()/v_->height()); req.require_x(rx); req.require_y(ry); } void XYView_helper::allocate(Canvas* c, const Allocation& a, Extension& ext) { t_ = c->transformer(); //print_t("XYView_helper::allocate", t_); body()->allocate(c, a, ext); } void XYView_helper::draw(Canvas* c, const Allocation& a) const { current_draw_view_ = v_; ((XYView_helper*)this)->t_ = c->transformer(); //print_t("XYView_helper::draw", c->transformer()); v_->set_damage_area(c); #if 0 IfIdraw(pict(t_)); #else if (OcIdraw::idraw_stream) { Transformer tr(t_); tr.translate(3*72, 4*72); OcIdraw::pict(tr); } #endif c->push_clipping(); c->clip_rect(v_->left(), v_->bottom(), v_->right(), v_->top()); body()->draw(c, a); c->pop_clipping(); IfIdraw(end()); } void XYView_helper::print(Printer* c, const Allocation&) const { current_draw_view_ = v_; c->push_clipping(); c->clip_rect(v_->left(), v_->bottom(), v_->right(), v_->top()); char buf[100]; float x, b; v_->s2o().matrix(x, b, b, b, b, b); sprintf(buf, "\n%g setlinewidth", x); c->comment(buf); // when printfile started printing at the level of the xyview // the allocation was incorrect and was used by the background // that was ok when the background was white... // set the allocation the same as the clipping Allocation a1; Allotment ax(v_->left(), v_->width(), 0); Allotment ay(v_->bottom(), v_->height(), 0); a1.allot_x(ax); a1.allot_y(ay); body()->print(c, a1); c->pop_clipping(); } void XYView_helper::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { if (MyMath::inside(h.left(), h.bottom(), v_->left(), v_->bottom(), v_->right(), v_->top())) { if (h.event()->grabber()) { // fixes a bug but I dont know why #if 1 //The above fix broke the handling of keystrokes for crosshairs and Rotate3D //It was needed so that buttons would appear normal when moving quickly from // a button through a box to a scene. Now we put in the right handler in //case event was a keystroke. if (h.event()->type() == Event::key) { h.target(depth, this, 0, h.event()->grabber()); } #endif return; } current_pick_view_ = v_; MonoGlyph::pick(c, a, depth, h); if (h.event()->type() == Event::down) { #if 0 printf("XYView_helper hit (%g, %g) event (%g, %g)\n", h.left(), h.bottom(), h.event()->pointer_x(), h.event()->pointer_y()); printf(" allocation lb=(%g, %g), rt=(%g,%g)\n", a.left(), a.bottom(), a.right(), a.top()); #endif } } } static Coord pick_epsilon; static void set_pick_epsilon() { pick_epsilon = 2; } XYView::XYView(Scene* s, Coord xsize, Coord ysize) : TransformSetter(new XYView_helper(s, this)) { init(s->x1(), s->y1(), s->x2() - s->x1(), s->y2() - s->y1(), s, xsize, ysize); } XYView::XYView(Coord x1, Coord y1, Coord xs, Coord ys, Scene* s, Coord xsize, Coord ysize) : TransformSetter(new XYView_helper(s, this)) { init(x1, y1, xs, ys, s, xsize, ysize); } void XYView::init(Coord x1, Coord y1, Coord xs, Coord ys, Scene* s, Coord xsize, Coord ysize) { set_pick_epsilon(); xsize_orig_ = xsize; ysize_orig_ = ysize; csize(0., xsize, 0., ysize); origin(x1, y1); x_span(xs); y_span(ys); canvas(NULL); parent_ = NULL; //not reffed append_view(s); #if 0 if (view_margin_ == fil) { Style* style = Session::instance()->style(); if (!style->find_attribute("view_margin", view_margin_)) { view_margin_ = 0; } view_margin_ *= 72; } #endif } Coord XYView::view_margin_ = fil; XYView_helper::~XYView_helper() { if (v_ == current_pick_view_) { current_pick_view_ = NULL; } if (v_ == current_draw_view_) { current_draw_view_ = NULL; } } XYView::~XYView() { // printf("~XYView\n"); scene()->remove_view(this); } // should only be accessed by a method that traces its call from the pick XYView* XYView::current_pick_view() { // printf("current pick view %p\n", XYView_helper::current_pick_view_); return XYView_helper::current_pick_view_; } XYView* XYView_helper::current_pick_view_; // should only be accessed by a method that traces its call from the draw // or print XYView* XYView::current_draw_view() { // printf("current draw view %p\n", XYView_helper::current_draw_view_); return XYView_helper::current_draw_view_; } XYView* XYView_helper::current_draw_view_; void XYView::append_view(Scene* s) { s->append_view(this); } void XYView::canvas(Canvas* c) { canvas_ = c; } void XYView::stroke(Canvas* c, const Color* color, const Brush* brush) { if (scene()->drawing_fixed_item()) { c->stroke(color, brush); }else{ c->push_transform(); c->transform(s2o()); c->stroke(color, brush); c->pop_transform(); } } Canvas* XYView::canvas() { return canvas_; } void XYView::undraw() { canvas_ = NULL; TransformSetter::undraw(); } void XYView::damage(Glyph* g, const Allocation& a, bool fixed, bool vf) { if (canvas_) { Extension e; canvas_->push_transform(); canvas_->transformer(((XYView_helper*)body())->t_); if (fixed) { Coord x, y; canvas_->transform(s2o()); if (vf) { view_ratio(a.x(), a.y(), x, y); }else{ s2o().inverse_transform(a.x(), a.y(), x, y); } Allocation a_fix = a; a_fix.x_allotment().origin(x); a_fix.y_allotment().origin(y); g->allocate(canvas_, a_fix, e); }else{ g->allocate(canvas_, a, e); } //printf("damage extension %g %g %g %g\n", e.left(), e.bottom(), e.right(), e.top()); //print_t("XYView::damage", canvas_->transformer()); canvas_->pop_transform(); canvas_->damage(e); } } void XYView::damage_all() { if (canvas_) { canvas_->damage(xc0_, yc0_, xc0_ + xsize_, yc0_ + ysize_); } } void XYView::damage(Coord x1, Coord y1, Coord x2, Coord y2) { if (canvas_) { Transformer& t = ((XYView_helper*)body())->t_; Coord tx1, ty1, tx2, ty2; t.transform(x1, y1, tx1, ty1); t.transform(x2, y2, tx2, ty2); const float off = canvas_->to_coord(1); tx1 = Math::max(tx1-off, Coord(0)); ty1 = Math::max(ty1-off, Coord(0)); tx2 = Math::min(tx2+off, canvas_->width()); ty2 = Math::min(ty2+off, canvas_->height()); canvas_->damage(tx1, ty1, tx2, ty2); } } void XYView::set_damage_area(Canvas* c) { Extension e; c->restrict_damage(0.,0., c->width(), c->height()); c->damage_area(e); const float off = c->to_coord(1); c->transformer().inverse_transform(e.left()-off, e.bottom()-off, xd1_, yd1_); c->transformer().inverse_transform(e.right()+off, e.top()+off, xd2_, yd2_); } void XYView::damage_area(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const { x1 = xd1_; y1 = yd1_; x2 = xd2_; y2 = yd2_; } void XYView::request(Requisition& req) const { TransformSetter::request(req); Requirement rx(xsize_orig_); Requirement ry(ysize_orig_); req.require_x(rx); req.require_y(ry); } void XYView::allocate(Canvas* c, const Allocation& a, Extension& ext) { #if defined(WIN32) || defined(CYGWIN) if (a.y_allotment().span() <= 0. || a.x_allotment().span() <= 0.) { // a bug in mswindows iconify return; } #endif if (canvas_ == NULL) { canvas_ = c; } c->push_transform(); TransformSetter::allocate(c, a, ext); c->pop_transform(); } void XYView::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { canvas_ = c; c->push_transform(); if (h.event()->type() == Event::down) { #if 0 printf("XYView hit (%g, %g) event (%g, %g)\n", h.left(), h.bottom(), h.event()->pointer_x(), h.event()->pointer_y()); #endif } TransformSetter::pick(c, a, depth, h); c->pop_transform(); } Scene* XYView::scene() const { return (Scene*)(((XYView_helper*)body())->body()); } Coord XYView::left() const { return x1_; } Coord XYView::right() const { return x1_ + x_span_; } Coord XYView::bottom() const { return y1_; } Coord XYView::top() const { return y1_ + y_span_; } Coord XYView::width() const { return x_span_; } Coord XYView::height() const { return y_span_; } void XYView::view_ratio(float xrat, float yrat, Coord& x, Coord& y) const { x = xrat*xsize_ + xc0_; y = yrat*ysize_ + yc0_; } void XYView::ratio_view(Coord x, Coord y, float& xrat, float& yrat) const { xrat = (x - xc0_)/xsize_; yrat = (y - yc0_)/ysize_; } void XYView::size(Coord x1, Coord y1, Coord x2, Coord y2) { x1_ = Math::min(x1, x2); y1_ = Math::min(y1, y2); x_span_ = Math::abs(x2 - x1); y_span_ = Math::abs(y2 - y1); notify(); } void XYView::origin(Coord x1, Coord y1) { x1_ = x1; y1_ = y1; notify(); } void XYView::csize(Coord x0, Coord x, Coord y0, Coord y) const { XYView* v = (XYView*)this; v->xsize_ = x; v->ysize_ = y; v->xc0_ = x0; v->yc0_ = y0; } void XYView::box_size(Coord x1, Coord y1, Coord x2, Coord y2) { size(x1, y1, x2, y2); } void XYView::x_span(Coord x) { x_span_ = (x > 0) ? x : 1.; notify();} void XYView::y_span(Coord x) { y_span_ = (x > 0) ? x : 1.; notify();} void XYView::zout(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const { Coord dx, dy; x1 = left(); x2 = right(); y1 = bottom(); y2 = top(); dx = .1*(x2 - x1); dy = .1*(y2 - y1); x1 -= dx; x2 += dx; y1 -= dy; y2 += dy; } void XYView::zin(Coord& x1, Coord& y1, Coord& x2, Coord& y2) const { Coord dx, dy; x1 = left(); x2 = right(); y1 = bottom(); y2 = top(); dx = .1/1.2*(x2 - x1); dy = .1/1.2*(y2 - y1); x1 += dx; x2 -= dx; y1 += dy; y2 -= dy; } void XYView::save(ostream& o) { PrintableWindow* w; if (!canvas_) { if (!parent() || !parent()->has_window()) { return; } w = parent()->window(); }else{ w = (PrintableWindow*)canvas()->window(); } char buf[256]; Coord x1, y1, x2, y2; zin(x1, y1, x2, y2); sprintf(buf, "{save_window_.view(%g, %g, %g, %g, %g, %g, %g, %g)}", x1, y1, x2 - x1, y2 - y1, w->save_left(), w->save_bottom(), xsize_, ysize_ ); o << buf << endl; } void XYView::scene2view(const Allocation& a) const{ float m00 = width()/a.x_allotment().span(); float m11 = height()/a.y_allotment().span(); //takes a canvas transformation from scene to parent glyph coordinates // transforms vectors from original to xyview XYView* xyv = (XYView*)this; xyv->scene2viewparent_ = Transformer( m00, 0, 0, m11, left() - a.left()*m00, bottom() - a.bottom()*m11 ); //print_t("scene2view", scene2viewparent_); } void XYView::transform( Transformer& t, const Allocation& a, const Allocation& n ) const { #if 0 Allotment ax, ay; if (view_margin()) { const Allotment& alx = a.x_allotment(); ax.span(alx.span() - 2*view_margin()); ax.origin(alx.begin() + view_margin()); ax.alignment(0); const Allotment& aly = a.y_allotment(); ay.span(aly.span() - 2*view_margin()); ay.origin(aly.begin() + view_margin()); ay.alignment(0); }else{ ax = a.x_allotment(); ay = a.y_allotment(); } Allocation al; al.allot_x(ax); al.allot_y(ay); scene2view(al); #else scene2view(a); const Allotment& ax = a.x_allotment(); const Allotment& ay = a.y_allotment(); #endif const Allotment& nx = n.x_allotment(); const Allotment& ny = n.y_allotment(); XYView* v = (XYView*)this; csize(ax.begin(), ax.span(), ay.begin(), ay.span()); float sx = xsize_/width(); float sy = ysize_/height(); XYView* xv = (XYView*)this; xv->x_pick_epsilon_ = pick_epsilon/sx; xv->y_pick_epsilon_ = pick_epsilon/sy; t.translate( -left(), -bottom()); t.scale(sx, sy); t.translate(ax.begin(), ay.begin()); #if 0 printf("XYView::transform ax origin=%g span=%g alignment=%g begin=%g\n", ax.origin(), ax.span(), ax.alignment(), ax.begin()); printf("XYView::transform ay origin=%g span=%g alignment=%g begin=%g %g\n", ay.origin(), ay.span(), ay.alignment(), ay.begin(), ay.end()); printf("XYView::transform natx origin=%g span=%g alignment=%g begin=%g\n", nx.origin(), nx.span(), nx.alignment(), nx.begin()); printf("XYView::transform naty origin=%g span=%g alignment=%g begin=%g %g\n", ny.origin(), ny.span(), ny.alignment(), ny.begin(), ny.end()); #endif } //View View::View(Scene* s) : XYView(s, s->x2() - s->x1(), s->y2() - s->y1()) { x_span_ = XYView::width(); y_span_ = XYView::height(); } View::View(Coord x, Coord y, Coord span, Scene* s, Coord xsize, Coord ysize) : XYView(x - span/2., y - (ysize/xsize)*span/2., span, span, s, xsize, ysize) { x_span_ = XYView::width(); y_span_ = XYView::height(); } View::View(Coord x1, Coord y1, Coord xs, Coord ys, Scene* s, Coord xsize, Coord ysize) : XYView(x1, y1, xs, ys, s, xsize, ysize) { x_span_ = XYView::width(); y_span_ = XYView::height(); } View::~View(){} void View::origin(Coord x, Coord y) { XYView::origin(x - XYView::width()/2., y - XYView::height()/2.); } void View::box_size(Coord x1, Coord y1, Coord x2, Coord y2) { Coord w = x2 - x1; Coord h = y2 - y1; Coord magx = w/x_span_; Coord magy = h/y_span_; if (magx > magy) { x_span_ *= magx; y_span_ *= magx; }else{ x_span_ *= magy; y_span_ *= magy; } x_span(x_span_); y_span(y_span_); origin((x1+x2)/2, (y1+y2)/2); } Coord View::x() const {return left() + XYView::width()/2.;} Coord View::y() const {return bottom() + XYView::height()/2.;} Coord View::view_width()const {return x_span_;} Coord View::view_height()const {return y_span_;} void View::transform( Transformer& t, const Allocation& a, const Allocation& ) const { scene2view(a); const Allotment& ax = a.x_allotment(); const Allotment& ay = a.y_allotment(); csize(ax.begin(), ax.span(), ay.begin(), ay.span()); float sx = ax.span()/XYView::width(); float sy = ay.span()/XYView::height(); // if (sx > sy) sx = sy; t.translate( -x(), -y()); t.scale(sx, sx); View* v = (View*)this; v->x_pick_epsilon_ = pick_epsilon/sx; v->y_pick_epsilon_ = pick_epsilon/sx; t.translate((ax.begin() + ax.end())/2,(ay.begin() + ay.end())/2); //printf("\nx origin=%g span=%g alignment=%g begin=%g end=%g\n", ax.origin(), ax.span(), ax.alignment(), ax.begin(), ax.end()); //printf("\ny origin=%g span=%g alignment=%g begin=%g end=%g\n", ay.origin(), ay.span(), ay.alignment(), ay.begin(), ay.end()); Coord x1,y1; t.transform(x() - x_span_/2, y() - y_span_/2, x1, y1); if (!Math::equal(ax.begin(), x1, 1) || !Math::equal(ay.begin(), y1, 1)) { t.inverse_transform(ax.begin(), ay.begin(), x1, y1); v->x_span_ = 2*(x() - x1); v->y_span_ = 2*(y() - y1); v->size(x1,y1,x1+v->x_span_, y1+v->y_span_); } } void XYView::move_view(Coord dx1, Coord dy1) { // printf("move by %g %g \n", dx1, dy1); Coord x0, x1, y0, y1; Coord dx = Math::abs(dx1); Coord dy = Math::abs(dy1); if (dx < .9*dy) { dx = 0.; dy = dy1; }else if (dy < .9*dx) { dx = dx1; dy = 0.; }else{ dx = dx1; dy = dy1; } s2o().transform(0, 0, x0, y0); s2o().transform(dx, dy, x1, y1); x0 = x0 - x1 + left(); y0 = y0 - y1 + bottom(); x1 = x0 + width(); y1 = y0 + height(); #if 1 if (dx > 0) { MyMath::round(x0, x1, MyMath::Higher, 4); }else{ MyMath::round(x0, x1, MyMath::Lower, 4); } if (dy > 0) { MyMath::round(y0, y1, MyMath::Higher, 4); }else{ MyMath::round(y0, y1, MyMath::Lower, 4); } #endif XYView::origin(x0, y0); damage_all(); } void View::move_view(Coord dx, Coord dy) { XYView::move_view(dx, dy); } void XYView::scale_view(Coord xorg, Coord yorg, float dxscl, float dyscl) { Coord x0, y0, l, b, r, t; Coord dx = Math::abs(dxscl); Coord dy = Math::abs(dyscl); if (dx < .9*dy) { dx = 0.; dy = dyscl; }else if (dy < .9*dx) { dx = dxscl; dy = 0.; }else{ dx = dxscl; dy = dyscl; } s2o().transform(xorg, yorg, x0, y0); //printf("org %g %g %g %g\n", xorg, yorg, x0, y0); l = -(left()-x0)*dx + left(); b = -(bottom()-y0)*dy + bottom(); r = -(right()-x0)*dx + right(); t = -(top()-y0)*dy + top(); #if 1 if (dxscl > 1) { MyMath::round(l, r, MyMath::Expand, 4); }else{ MyMath::round(l, r, MyMath::Contract, 4); } if (dyscl > 1) { MyMath::round(b, t, MyMath::Expand, 4); }else{ MyMath::round(b, t, MyMath::Contract, 4); } #endif size(l, b, r, t); damage_all(); } void View::scale_view(Coord xorg, Coord yorg, float dxscl, float) { XYView::scale_view(xorg, yorg, dxscl, dxscl); } XYView* XYView::new_view(Coord x1, Coord y1, Coord x2, Coord y2) { Coord l,b,r,t; s2o().inverse_transform(x1,y1,l,b); s2o().inverse_transform(x2,y2,r,t); return new XYView( x1, y1, x2-x1, y2-y1, scene(), r-l, t-b); } XYView* View::new_view(Coord x1, Coord y1, Coord x2, Coord y2) { Coord l,b,r,t; s2o().inverse_transform(x1,y1,l,b); s2o().inverse_transform(x2,y2,r,t); return new View( (x1+x2)/2, (y1+y2)/2, x2-x1, scene(), r-l, t-b); } /*static*/ class NPInsetFrame : public MonoGlyph { public: NPInsetFrame(Glyph*); virtual ~NPInsetFrame(); virtual void print(Printer*, const Allocation&) const; }; NPInsetFrame::NPInsetFrame(Glyph* g) : MonoGlyph(WidgetKit::instance()->inset_frame(g)) {} NPInsetFrame::~NPInsetFrame(){} void NPInsetFrame::print(Printer* p, const Allocation& a) const { Style* s = WidgetKit::instance()->style(); long i=1; s->find_attribute("scene_print_border", i); //printf("NPInsetFrame %ld\n", i); if (i) { body()->print(p, a); }else{ ((MonoGlyph*)body())->body()->print(p, a); } } OcViewGlyph::OcViewGlyph(XYView* v) : OcGlyph ( new Background ( // WidgetKit::instance()->inset_frame( new NPInsetFrame( LayoutKit::instance()->variable_span( v ) ), WidgetKit::instance()->background() ) ) { v_ = v; g_ = NULL; v_->ref(); assert(v_->parent() == NULL); v_->parent_ = this; }; OcViewGlyph::~OcViewGlyph() { v_->parent_ = NULL; v_->unref(); Resource::unref(g_); } void OcViewGlyph::save(ostream& o) { Scene* s = v_->scene(); char buf[256]; long i = Scene::scene_list_index(s); if (!s->mark()) { s->save_phase1(o); sprintf(buf, "scene_vector_[%ld] = save_window_", i); }else{ sprintf(buf, "save_window_ = scene_vector_[%ld]", i); } o << buf << endl; v_->save(o); if (!s->mark()) { s->save_phase2(o); s->mark(true); } } ViewWindow::ViewWindow(XYView* v, const char* name) : PrintableWindow(new OcViewGlyph(v)) { if (name) { type(name); } v->attach(this); update(v); } ViewWindow::~ViewWindow() { OcViewGlyph* g = (OcViewGlyph*)glyph(); g->view()->detach(this); } void ViewWindow::update(Observable* o) { char s[200]; XYView* v = (XYView*)o; sprintf(s, "%s %s x %g : %g y %g : %g", type(), v->scene()->picker()->select_name(), v->left(), v->right(), v->bottom(), v->top()); name(s); } #endif neuron-7.5/src/ivos/000077500000000000000000000000001323325274500144505ustar00rootroot00000000000000neuron-7.5/src/ivos/InterViews/000077500000000000000000000000001323325274500165475ustar00rootroot00000000000000neuron-7.5/src/ivos/InterViews/Makefile.am000077500000000000000000000003111323325274500206010ustar00rootroot00000000000000#all these files are copies of the iv-12 files EXTRA_DIST = \ _defines.h \ _enter.h \ _leave.h \ _names.h \ _undefs.h \ coord.h \ enter-scope.h \ geometry.h\ iv.h \ observe.h \ regexp.h \ resource.h neuron-7.5/src/ivos/InterViews/Makefile.in000066400000000000000000000375201323325274500206230ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ #all these files are copies of the iv-12 files VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ivos/InterViews ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = \ _defines.h \ _enter.h \ _leave.h \ _names.h \ _undefs.h \ coord.h \ enter-scope.h \ geometry.h\ iv.h \ observe.h \ regexp.h \ resource.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/ivos/InterViews/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/ivos/InterViews/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/ivos/InterViews/_defines.h000077500000000000000000000317701323325274500205070ustar00rootroot00000000000000#define inch _lib_iv(inch) #define inches _lib_iv(inches) #define cm _lib_iv(cm) #define mm _lib_iv(mm) #define point _lib_iv(point) #define points _lib_iv(points) #define RasterRect _lib_iv(RasterRect) #if !MAC #define Point _lib_iv(Point) #endif #define Line _lib_iv(Line) #define Ellipse _lib_iv(Ellipse) #define MultiLine _lib_iv(MultiLine) #define Polygon _lib_iv(Polygon) #define ClosedBSpline _lib_iv(ClosedBSpline) #define Alignment _lib_iv(Alignment) #define ColorIntensity _lib_iv(ColorIntensity) #define ColorOp _lib_iv(ColorOp) #define Coord _lib_iv(Coord) #define EventType _lib_iv(EventType) #define EventButton _lib_iv(EventButton) #define GlyphBreakType _lib_iv(GlyphBreakType) #define GlyphIndex _lib_iv(GlyphIndex) #define IntCoord _lib_iv(IntCoord) #define PixelCoord _lib_iv(PixelCoord) #define Selection _lib_iv(Selection) #define Action _lib_iv(Action) #define ActiveHandler _lib_iv(ActiveHandler) #define Adjustable _lib_iv(Adjustable) #define Adjuster _lib_iv(Adjuster) #define Aggregate _lib_iv(Aggregate) #define AggregateInfo_List _lib_iv(AggregateInfo_List) #define Align _lib_iv(Align) #define Allocation _lib_iv(Allocation) #define AllocationInfo _lib_iv(AllocationInfo) #define AllocationTable _lib_iv(AllocationTable) #define AllocationTableImpl _lib_iv(AllocationTableImpl) #define Allotment _lib_iv(Allotment) #define ApplicationWindow _lib_iv(ApplicationWindow) #define ArrayCompositor _lib_iv(ArrayCompositor) #define ArrowSubclassName _lib_iv(ArrowSubclassName) #define BMPRaster _lib_iv(BMPRaster) #define Background _lib_iv(Background) #define Banner _lib_iv(Banner) #define Bevel _lib_iv(Bevel) #define BevelFrame _lib_iv(BevelFrame) #define Bitmap _lib_iv(Bitmap) #define BitmapRep _lib_iv(BitmapRep) #define Border _lib_iv(Border) #define BorderFrame _lib_iv(BorderFrame) #define Box _lib_iv(Box) #define BoxCanonical _lib_iv(BoxCanonical) #define BoxElement _lib_iv(BoxElement) #define BoxImpl _lib_iv(BoxImpl) #define Break _lib_iv(Break) #define Break_List _lib_iv(Break_List) #define Browser _lib_iv(Browser) #define BrowserList _lib_iv(BrowserList) #define Brush _lib_iv(Brush) #define BrushImpl _lib_iv(BrushImpl) #define BrushRep _lib_iv(BrushRep) #define Button _lib_iv(Button) #define ButtonList _lib_iv(ButtonList) #define ButtonState _lib_iv(ButtonState) #define Canvas _lib_iv(Canvas) #define CanvasDamage _lib_iv(CanvasDamage) #define CanvasRep _lib_iv(CanvasRep) #define Card _lib_iv(Card) #define CenterLayout _lib_iv(CenterLayout) #define Character _lib_iv(Character) #define CheckBox _lib_iv(CheckBox) #define ChoiceItem _lib_iv(ChoiceItem) #define ClippingStack _lib_iv(ClippingStack) #define Color _lib_iv(Color) #define ColorImpl _lib_iv(ColorImpl) #define ColorRep _lib_iv(ColorRep) #define ColorTable _lib_iv(ColorTable) #define CompletionEditor _lib_iv(CompletionEditor) #define Composition _lib_iv(Composition) #define CompositionComponent_List _lib_iv(CompositionComponent_List) #define Compositor _lib_iv(Compositor) #define Control _lib_iv(Control) #define ControlState _lib_iv(ControlState) #define CoordinateSpace _lib_iv(CoordinateSpace) #define Cursor _lib_iv(Cursor) #define CursorRep _lib_iv(CursorRep) #define CursorRepBitmap _lib_iv(CursorRepBitmap) #define CursorRepData _lib_iv(CursorRepData) #define CursorRepFont _lib_iv(CursorRepFont) #define CursorRepXFont _lib_iv(CursorRepXFont) #define DamageList _lib_iv(DamageList) #define DebugGlyph _lib_iv(DebugGlyph) #define Deck _lib_iv(Deck) #define Dialog _lib_iv(Dialog) #define DialogKit _lib_iv(DialogKit) #define DialogKitImpl _lib_iv(DialogKitImpl) #define Display _lib_iv(Display) #define DisplayRep _lib_iv(DisplayRep) #define DownMover _lib_iv(DownMover) #define Drag _lib_iv(Drag) #define DragRep _lib_iv(DragRep) #define DragZone _lib_iv(DragZone) #define DragZoneRep _lib_iv(DragZoneRep) #define DragZoneSink _lib_iv(DragZoneSink) #define DragZoneSinkHandler _lib_iv(DragZoneSinkHandler) #define Enlarger _lib_iv(Enlarger) #define Event _lib_iv(Event) #define EventRep _lib_iv(EventRep) #define Extension _lib_iv(Extension) #define FBDirectory _lib_iv(FBDirectory) #define FieldEditor _lib_iv(FieldEditor) #define FieldEditorAction _lib_iv(FieldEditorAction) #define FieldEditorImpl _lib_iv(FieldEditorImpl) #define FileBrowser _lib_iv(FileBrowser) #define FileBrowserImpl _lib_iv(FileBrowserImpl) #define FileChooser _lib_iv(FileChooser) #define FileChooserAction _lib_iv(FileChooserAction) #define FileChooserImpl _lib_iv(FileChooserImpl) #define FixedLayout _lib_iv(FixedLayout) #define Font _lib_iv(Font) #define FontBoundingBox _lib_iv(FontBoundingBox) #define FontFamily _lib_iv(FontFamily) #define FontFamilyImpl _lib_iv(FontFamilyImpl) #define FontFamilyRep _lib_iv(FontFamilyRep) #define FontImpl _lib_iv(FontImpl) #define FontRep _lib_iv(FontRep) #define Frame _lib_iv(Frame) #define GLContext _lib_iv(GLContext) #define GLContextImpl _lib_iv(GLContextImpl) #define GLWindow _lib_iv(GLWindow) #define Glue _lib_iv(Glue) #define Glyph _lib_iv(Glyph) #define GrabList _lib_iv(GrabList) #define Group _lib_iv(Group) #define GrowingBSpline _lib_iv(GrowingBSpline) #define GrowingClosedBSpline _lib_iv(GrowingClosedBSpline) #define GrowingMultiLine _lib_iv(GrowingMultiLine) #define GrowingPolygon _lib_iv(GrowingPolygon) #define GrowingVertices _lib_iv(GrowingVertices) #define HBorder _lib_iv(HBorder) #define HBox _lib_iv(HBox) #define HGlue _lib_iv(HGlue) #define HRule _lib_iv(HRule) #define HScrollBar _lib_iv(HScrollBar) #define HScroller _lib_iv(HScroller) #define Handler _lib_iv(Handler) #define Hit _lib_iv(Hit) #define HitImpl _lib_iv(HitImpl) #define IconWindow _lib_iv(IconWindow) #define Image _lib_iv(Image) #define InputHandler _lib_iv(InputHandler) #define InputHandlerImpl _lib_iv(InputHandlerImpl) #define Interactor _lib_iv(Interactor) #define InteractorHandler _lib_iv(InteractorHandler) #define InteractorWindow _lib_iv(InteractorWindow) #define KnownFonts _lib_iv(KnownFonts) #define LRComposition _lib_iv(LRComposition) #define LRMarker _lib_iv(LRMarker) #define Label _lib_iv(Label) #define Layout _lib_iv(Layout) #define LayoutKit _lib_iv(LayoutKit) #define LeftMover _lib_iv(LeftMover) #define MFDialogKit _lib_iv(MFDialogKit) #define MFKit _lib_iv(MFKit) #define MFKitImpl _lib_iv(MFKitImpl) #define MWkit _lib_iv(MWkit) #define MWkitImpl _lib_iv(MWkitImpl) #define Macro _lib_iv(Macro) #define MacroActionList _lib_iv(MacroActionList) #define ManagedWindow _lib_iv(ManagedWindow) #define ManagedWindowHintInfo _lib_iv(ManagedWindowHintInfo) #define ManagedWindowRep _lib_iv(ManagedWindowRep) #define MarginFrame _lib_iv(MarginFrame) #define MarginLayout _lib_iv(MarginLayout) #define MatchEditor _lib_iv(MatchEditor) #define Menu _lib_iv(Menu) #define MenuBar _lib_iv(MenuBar) #define MenuImpl _lib_iv(MenuImpl) #define MenuItem _lib_iv(MenuItem) #define Message _lib_iv(Message) #define MonoGlyph _lib_iv(MonoGlyph) #define MonoKit _lib_iv(MonoKit) #define MonoKitImpl _lib_iv(MonoKitImpl) #define MonoScene _lib_iv(MonoScene) #define Mover _lib_iv(Mover) #define NaturalLayout _lib_iv(NaturalLayout) #define OLDialogKit _lib_iv(OLDialogKit) #define OLKit _lib_iv(OLKit) #define OLKitImpl _lib_iv(OLKitImpl) #define Observable _lib_iv(Observable) #define Observer _lib_iv(Observer) #define ObserverList _lib_iv(ObserverList) #define OptionDesc _lib_iv(OptionDesc) #define PSFont _lib_iv(PSFont) #define PSFontImpl _lib_iv(PSFontImpl) #define Page _lib_iv(Page) #define PageInfo_List _lib_iv(PageInfo_List) #define Painter _lib_iv(Painter) #define PainterRep _lib_iv(PainterRep) #define Panner _lib_iv(Panner) #define Patch _lib_iv(Patch) #define PathRenderInfo _lib_iv(PathRenderInfo) #define Pattern _lib_iv(Pattern) #define PatternRep _lib_iv(PatternRep) #define Perspective _lib_iv(Perspective) #define Placement _lib_iv(Placement) #define PolyGlyph _lib_iv(PolyGlyph) #define PolyGlyphImpl _lib_iv(PolyGlyphImpl) #define PopupMenu _lib_iv(PopupMenu) #define PopupWindow _lib_iv(PopupWindow) #define Printer _lib_iv(Printer) #define PrinterRep _lib_iv(PrinterRep) #define PropertyData _lib_iv(PropertyData) #define PulldownMenu _lib_iv(PulldownMenu) #define PullrightMenu _lib_iv(PullrightMenu) #define PushButton _lib_iv(PushButton) #define RGBTable _lib_iv(RGBTable) #define RadioButton _lib_iv(RadioButton) #define Raster _lib_iv(Raster) #define RasterRep _lib_iv(RasterRep) #define Reducer _lib_iv(Reducer) #define Regexp _lib_iv(Regexp) #define ReqErr _lib_iv(ReqErr) #define Requirement _lib_iv(Requirement) #define Requisition _lib_iv(Requisition) #define Resource _lib_iv(Resource) #define RightMover _lib_iv(RightMover) #define RotatingLine _lib_iv(RotatingLine) #define RotatingLineList _lib_iv(RotatingLineList) #define RotatingRect _lib_iv(RotatingRect) #define RubberAxis _lib_iv(RubberAxis) #define RubberCircle _lib_iv(RubberCircle) #define RubberClosedSpline _lib_iv(RubberClosedSpline) #define RubberEllipse _lib_iv(RubberEllipse) #define RubberGroup _lib_iv(RubberGroup) #define RubberHandles _lib_iv(RubberHandles) #define RubberLine _lib_iv(RubberLine) #define RubberList _lib_iv(RubberList) #define RubberPointList _lib_iv(RubberPointList) #define RubberRect _lib_iv(RubberRect) #define RubberSpline _lib_iv(RubberSpline) #define RubberSquare _lib_iv(RubberSquare) #define RubberVertex _lib_iv(RubberVertex) #define Rubberband _lib_iv(Rubberband) #define Rule _lib_iv(Rule) #define SMFKit _lib_iv(SMFKit) #define SMFKitImpl _lib_iv(SMFKitImpl) #define ScalingLine _lib_iv(ScalingLine) #define ScalingLineList _lib_iv(ScalingLineList) #define ScalingRect _lib_iv(ScalingRect) #define Scene _lib_iv(Scene) #define ScrollBar _lib_iv(ScrollBar) #define ScrollBox _lib_iv(ScrollBox) #define Scroller _lib_iv(Scroller) #define SelectionHandler _lib_iv(SelectionHandler) #define SelectionList _lib_iv(SelectionList) #define SelectionManager _lib_iv(SelectionManager) #define SelectionManagerRep _lib_iv(SelectionManagerRep) #define Sensor _lib_iv(Sensor) #define Session _lib_iv(Session) #define SessionRep _lib_iv(SessionRep) #define Shadow _lib_iv(Shadow) #define ShadowFrame _lib_iv(ShadowFrame) #define Shape _lib_iv(Shape) #define ShowFrame _lib_iv(ShowFrame) #define SimpleCompositor _lib_iv(SimpleCompositor) #define Slider _lib_iv(Slider) #define SliderImpl _lib_iv(SliderImpl) #define SlidingEllipse _lib_iv(SlidingEllipse) #define SlidingLine _lib_iv(SlidingLine) #define SlidingLineList _lib_iv(SlidingLineList) #define SlidingPointList _lib_iv(SlidingPointList) #define SlidingRect _lib_iv(SlidingRect) #define Stencil _lib_iv(Stencil) #define Stepper _lib_iv(Stepper) #define StepperSubclassName _lib_iv(StepperSubclassName) #define StretchingRect _lib_iv(StretchingRect) #define StringBrowser _lib_iv(StringBrowser) #define StringChooser _lib_iv(StringChooser) #define StringEditor _lib_iv(StringEditor) #define Style _lib_iv(Style) #define StyleRep _lib_iv(StyleRep) #define Subject _lib_iv(Subject) #define SubjectRep _lib_iv(SubjectRep) #define Superpose _lib_iv(Superpose) #define TBComposition _lib_iv(TBComposition) #define TBScrollBox _lib_iv(TBScrollBox) #define TBScrollBoxImpl _lib_iv(TBScrollBoxImpl) #define TGlue _lib_iv(TGlue) #define TIFFRaster _lib_iv(TIFFRaster) #define TSolver _lib_iv(TSolver) #define Target _lib_iv(Target) #define TeXCompositor _lib_iv(TeXCompositor) #define Telltale _lib_iv(Telltale) #define TelltaleGroup _lib_iv(TelltaleGroup) #define TelltaleState _lib_iv(TelltaleState) #define Text _lib_iv(Text) #define TextAnnotation _lib_iv(TextAnnotation) #define TextBuffer _lib_iv(TextBuffer) #define TextButton _lib_iv(TextButton) #define TextDisplay _lib_iv(TextDisplay) #define TextEditor _lib_iv(TextEditor) #define TextLine _lib_iv(TextLine) #define TextLineAdjuster _lib_iv(TextLineAdjuster) #define TextLocation _lib_iv(TextLocation) #define TextRegion _lib_iv(TextRegion) #define TextRenderInfo _lib_iv(TextRenderInfo) #define Tile _lib_iv(Tile) #define TileFirstAligned _lib_iv(TileFirstAligned) #define TileReversed _lib_iv(TileReversed) #define TileReversedFirstAligned _lib_iv(TileReversedFirstAligned) #define TitleFrame _lib_iv(TitleFrame) #define TopLevelWindow _lib_iv(TopLevelWindow) #define TransformFitter _lib_iv(TransformFitter) #define TransformSetter _lib_iv(TransformSetter) #define Transformer _lib_iv(Transformer) #define TransformerStack _lib_iv(TransformerStack) #define TransientWindow _lib_iv(TransientWindow) #define Tray _lib_iv(Tray) #define TrayElement _lib_iv(TrayElement) #define UpMover _lib_iv(UpMover) #define VBorder _lib_iv(VBorder) #define VBox _lib_iv(VBox) #define VGlue _lib_iv(VGlue) #define VRule _lib_iv(VRule) #define VScrollBar _lib_iv(VScrollBar) #define VScroller _lib_iv(VScroller) #define VariableLayout _lib_iv(VariableLayout) #define ViewList _lib_iv(ViewList) #define Viewport _lib_iv(Viewport) #define WidgetKit _lib_iv(WidgetKit) #define WidgetKitImpl _lib_iv(WidgetKitImpl) #define Window _lib_iv(Window) #define WindowCursorStack _lib_iv(WindowCursorStack) #define WindowRep _lib_iv(WindowRep) #define WindowTable _lib_iv(WindowTable) #define WindowVisual _lib_iv(WindowVisual) #define World _lib_iv(World) #define XDrag _lib_iv(XDrag) #define XSlider _lib_iv(XSlider) #define XYMarker _lib_iv(XYMarker) #define XYSlider _lib_iv(XYSlider) #define YSlider _lib_iv(YSlider) #define Zoomer _lib_iv(Zoomer) neuron-7.5/src/ivos/InterViews/_enter.h000077500000000000000000000025431323325274500202030ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef iv__current_h #define iv__current_h #ifdef iv__2_6_h #undef iv__2_6_h #ifndef MAKEDEPEND #include #endif #endif #endif neuron-7.5/src/ivos/InterViews/_leave.h000077500000000000000000000025451323325274500201640ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifdef iv__current_h #ifdef iv2_6_compatible #undef iv__current_h #define iv__2_6_h #ifndef MAKEDEPEND #include #endif #endif #endif neuron-7.5/src/ivos/InterViews/_names.h000077500000000000000000000053621323325274500201730ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Use current by default for ambiguous names. */ #undef Adjuster #undef Border #undef Box #undef Button #undef PushButton #undef RadioButton #undef Center #undef Coord #undef Deck #undef Dialog #undef FileBrowser #undef FileChooser #undef Glue #undef HGlue #undef VGlue #undef Menu #undef MenuBar #undef MenuItem #undef Mover #undef UpMover #undef DownMover #undef LeftMover #undef RightMover #undef Panner #undef Scroller #undef HScroller #undef VScroller #undef ScrollBar #undef HScrollBar #undef VScrollBar #undef Slider #define Adjuster _lib_iv(Adjuster) #define Border _lib_iv(Border) #define Box _lib_iv(Box) #define Button _lib_iv(Button) #define PushButton _lib_iv(PushButton) #define RadioButton _lib_iv(RadioButton) #define Center _lib_iv(Center) #define Coord _lib_iv(Coord) #define Deck _lib_iv(Deck) #define Dialog _lib_iv(Dialog) #define FileBrowser _lib_iv(FileBrowser) #define FileChooser _lib_iv(FileChooser) #define Glue _lib_iv(Glue) #define HGlue _lib_iv(HGlue) #define VGlue _lib_iv(VGlue) #define Menu _lib_iv(Menu) #define MenuBar _lib_iv(MenuBar) #define MenuItem _lib_iv(MenuItem) #define Mover _lib_iv(Mover) #define UpMover _lib_iv(UpMover) #define DownMover _lib_iv(DownMover) #define LeftMover _lib_iv(LeftMover) #define RightMover _lib_iv(RightMover) #define Panner _lib_iv(Panner) #define Scroller _lib_iv(Scroller) #define HScroller _lib_iv(HScroller) #define VScroller _lib_iv(VScroller) #define ScrollBar _lib_iv(ScrollBar) #define HScrollBar _lib_iv(HScrollBar) #define VScrollBar _lib_iv(VScrollBar) #define Slider _lib_iv(Slider) neuron-7.5/src/ivos/InterViews/_undefs.h000077500000000000000000000140031323325274500203440ustar00rootroot00000000000000#undef inch #undef inches #undef cm #undef mm #undef point #undef points #undef RasterRect #if !MAC #undef Point #endif #undef Line #undef Ellipse #undef MultiLine #undef Polygon #undef ClosedBSpline #undef Alignment #undef ColorIntensity #undef ColorOp #undef Coord #undef EventType #undef EventButton #undef GlyphBreakType #undef GlyphIndex #undef IntCoord #undef PixelCoord #undef Selection #undef Action #undef ActiveHandler #undef Adjustable #undef Adjuster #undef Aggregate #undef AggregateInfo_List #undef Align #undef Allocation #undef AllocationInfo #undef AllocationTable #undef AllocationTableImpl #undef Allotment #undef ApplicationWindow #undef ArrayCompositor #undef ArrowSubclassName #undef BMPRaster #undef Background #undef Banner #undef Bevel #undef BevelFrame #undef Bitmap #undef BitmapRep #undef Border #undef BorderFrame #undef Box #undef BoxCanonical #undef BoxElement #undef BoxImpl #undef Break #undef Break_List #undef Browser #undef BrowserList #undef Brush #undef BrushImpl #undef BrushRep #undef Button #undef ButtonList #undef ButtonState #undef Canvas #undef CanvasDamage #undef CanvasRep #undef Card #undef CenterLayout #undef Character #undef CheckBox #undef ChoiceItem #undef ClippingStack #undef Color #undef ColorImpl #undef ColorRep #undef ColorTable #undef CompletionEditor #undef Composition #undef CompositionComponent_List #undef Compositor #undef Control #undef ControlState #undef CoordinateSpace #undef Cursor #undef CursorRep #undef CursorRepBitmap #undef CursorRepData #undef CursorRepFont #undef CursorRepXFont #undef DamageList #undef DebugGlyph #undef Deck #undef Dialog #undef DialogKit #undef DialogKitImpl #undef Display #undef DisplayRep #undef DownMover #undef Drag #undef DragRep #undef DragZone #undef DragZoneRep #undef DragZoneSink #undef DragZoneSinkHandler #undef Enlarger #undef Event #undef EventRep #undef Extension #undef FBDirectory #undef FieldEditor #undef FieldEditorAction #undef FieldEditorImpl #undef FileBrowser #undef FileBrowserImpl #undef FileChooser #undef FileChooserAction #undef FileChooserImpl #undef FixedLayout #undef Font #undef FontBoundingBox #undef FontFamily #undef FontFamilyImpl #undef FontFamilyRep #undef FontImpl #undef FontRep #undef Frame #undef GLContext #undef GLContextImpl #undef GLWindow #undef Glue #undef Glyph #undef GrabList #undef Group #undef GrowingBSpline #undef GrowingClosedBSpline #undef GrowingMultiLine #undef GrowingPolygon #undef GrowingVertices #undef HBorder #undef HBox #undef HGlue #undef HRule #undef HScrollBar #undef HScroller #undef Handler #undef Hit #undef HitImpl #undef IconWindow #undef Image #undef InputHandler #undef InputHandlerImpl #undef Interactor #undef InteractorHandler #undef InteractorWindow #undef KnownFonts #undef LRComposition #undef LRMarker #undef Label #undef Layout #undef LayoutKit #undef LeftMover #undef MFDialogKit #undef MFKit #undef MFKitImpl #undef MWkit #undef MWkitImpl #undef Macro #undef MacroActionList #undef ManagedWindow #undef ManagedWindowHintInfo #undef ManagedWindowRep #undef MarginFrame #undef MarginLayout #undef MatchEditor #undef Menu #undef MenuBar #undef MenuImpl #undef MenuItem #undef Message #undef MonoGlyph #undef MonoKit #undef MonoKitImpl #undef MonoScene #undef Mover #undef NaturalLayout #undef OLDialogKit #undef OLKit #undef OLKitImpl #undef Observable #undef Observer #undef ObserverList #undef OptionDesc #undef PSFont #undef PSFontImpl #undef Page #undef PageInfo_List #undef Painter #undef PainterRep #undef Panner #undef Patch #undef PathRenderInfo #undef Pattern #undef PatternRep #undef Perspective #undef Placement #undef PolyGlyph #undef PolyGlyphImpl #undef PopupMenu #undef PopupWindow #undef Printer #undef PrinterRep #undef PropertyData #undef PulldownMenu #undef PullrightMenu #undef PushButton #undef RGBTable #undef RadioButton #undef Raster #undef RasterRep #undef Reducer #undef Regexp #undef ReqErr #undef Requirement #undef Requisition #undef Resource #undef RightMover #undef RotatingLine #undef RotatingLineList #undef RotatingRect #undef RubberAxis #undef RubberCircle #undef RubberClosedSpline #undef RubberEllipse #undef RubberGroup #undef RubberHandles #undef RubberLine #undef RubberList #undef RubberPointList #undef RubberRect #undef RubberSpline #undef RubberSquare #undef RubberVertex #undef Rubberband #undef Rule #undef SMFKit #undef SMFKitImpl #undef ScalingLine #undef ScalingLineList #undef ScalingRect #undef Scene #undef ScrollBar #undef ScrollBox #undef Scroller #undef SelectionHandler #undef SelectionList #undef SelectionManager #undef SelectionManagerRep #undef Sensor #undef Session #undef SessionRep #undef Shadow #undef ShadowFrame #undef Shape #undef ShowFrame #undef SimpleCompositor #undef Slider #undef SliderImpl #undef SlidingEllipse #undef SlidingLine #undef SlidingLineList #undef SlidingPointList #undef SlidingRect #undef Stencil #undef Stepper #undef StepperSubclassName #undef StretchingRect #undef StringBrowser #undef StringChooser #undef StringEditor #undef Style #undef StyleRep #undef Subject #undef SubjectRep #undef Superpose #undef TBComposition #undef TBScrollBox #undef TBScrollBoxImpl #undef TGlue #undef TIFFRaster #undef TSolver #undef Target #undef TeXCompositor #undef Telltale #undef TelltaleGroup #undef TelltaleState #undef Text #undef TextAnnotation #undef TextBuffer #undef TextButton #undef TextDisplay #undef TextEditor #undef TextLine #undef TextLineAdjuster #undef TextLocation #undef TextRegion #undef TextRenderInfo #undef Tile #undef TileFirstAligned #undef TileReversed #undef TileReversedFirstAligned #undef TitleFrame #undef TopLevelWindow #undef TransformFitter #undef TransformSetter #undef Transformer #undef TransformerStack #undef TransientWindow #undef Tray #undef TrayElement #undef UpMover #undef VBorder #undef VBox #undef VGlue #undef VRule #undef VScrollBar #undef VScroller #undef VariableLayout #undef ViewList #undef Viewport #undef WidgetKit #undef WidgetKitImpl #undef Window #undef WindowCursorStack #undef WindowRep #undef WindowTable #undef WindowVisual #undef World #undef XDrag #undef XSlider #undef XYMarker #undef XYSlider #undef YSlider #undef Zoomer neuron-7.5/src/ivos/InterViews/coord.h000077500000000000000000000032731323325274500200360ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Coordinates for graphics allocation and rendering. */ #ifndef iv_coord_h #define iv_coord_h #include typedef float _lib_iv(Coord); typedef int _lib_iv(IntCoord); typedef int _lib_iv(PixelCoord); /* * Should be a static const float, but some compilers don't * do a very good job on that. */ #define fil 10e6 /* * Old definitions */ typedef int _lib_iv2_6(Coord); extern double inch, inches, cm, mm, point, points; static const int pixels = 1; #endif neuron-7.5/src/ivos/InterViews/enter-scope.h000066400000000000000000000031701323325274500211450ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef iv__scope_h #define iv__scope_h #include #ifndef MAKEDEPEND #include #include #ifdef iv2_6_compatible #include #endif #ifndef iv_os__scope_h /* * Use OS bool and String definitions. */ #include #include #define String _lib_os(String) #define u_char _lib_os(u_char) #endif #endif #endif neuron-7.5/src/ivos/InterViews/geometry.h000066400000000000000000000207511323325274500205600ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef iv_geometry_h #define iv_geometry_h #if MAC #undef require #endif #include #include /* * Can't make DimensionName an enum because we want to be able * to iterate from 0 to number_of_dimensions. Alas, * C++ does not allow arithmetic on enums. */ typedef unsigned int DimensionName; enum { Dimension_X = 0, Dimension_Y, Dimension_Z, Dimension_Undefined }; class CoordinateSpace { public: enum { x = 0, y, z, dimensions }; #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif }; class Requirement { public: Requirement(); Requirement(Coord natural); Requirement(Coord natural, Coord stretch, Coord shrink, float alignment); Requirement( Coord natural_lead, Coord max_lead, Coord min_lead, Coord natural_trail, Coord max_trail, Coord min_trail ); bool equals(const Requirement&, float epsilon) const; bool defined() const; void natural(Coord); Coord natural() const; void stretch(Coord); Coord stretch() const; void shrink(Coord); Coord shrink() const; void alignment(float); float alignment() const; private: Coord natural_; Coord stretch_; Coord shrink_; float alignment_; #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif }; class Requisition { public: Requisition(); Requisition(const Requisition&); void penalty(int); int penalty() const; bool equals(const Requisition&, float epsilon) const; void require(DimensionName, const Requirement&); void require_x(const Requirement&); void require_y(const Requirement&); const Requirement& requirement(DimensionName) const; const Requirement& x_requirement() const; const Requirement& y_requirement() const; Requirement& requirement(DimensionName); Requirement& x_requirement(); Requirement& y_requirement(); private: int penalty_; Requirement x_; Requirement y_; #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif }; class Allotment { public: Allotment(); Allotment(Coord origin, Coord span, float alignment); bool equals(const Allotment&, float epsilon) const; void origin(Coord); void offset(Coord); Coord origin() const; void span(Coord); Coord span() const; void alignment(float); float alignment() const; Coord begin() const; Coord end() const; private: Coord origin_; Coord span_; float alignment_; #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif }; class Allocation { public: Allocation(); Allocation(const Allocation&); bool equals(const Allocation&, float epsilon) const; void allot(DimensionName, const Allotment&); void allot_x(const Allotment&); void allot_y(const Allotment&); Allotment& allotment(DimensionName); const Allotment& allotment(DimensionName) const; Allotment& x_allotment(); Allotment& y_allotment(); const Allotment& x_allotment() const; const Allotment& y_allotment() const; Coord x() const; Coord y() const; Coord left() const; Coord right() const; Coord bottom() const; Coord top() const; private: Allotment x_; Allotment y_; #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif }; class Canvas; class Extension { public: Extension(); Extension(const Extension&); void operator =(const Extension&); static void transform_xy( Canvas*, Coord& left, Coord& bottom, Coord& right, Coord& top ); void set(Canvas*, const Allocation&); void set_xy(Canvas*, Coord left, Coord bottom, Coord right, Coord top); void clear(); void merge(const Extension&); void merge(Canvas*, const Allocation&); void merge_xy(Canvas*, Coord left, Coord bottom, Coord right, Coord top); Coord left() const; Coord bottom() const; Coord right() const; Coord top() const; private: Coord x_begin_; Coord x_end_; Coord y_begin_; Coord y_end_; #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif }; inline Requirement::Requirement() { natural_ = -fil; stretch_ = 0; shrink_ = 0; alignment_ = 0; } inline Requirement::Requirement(Coord natural) { natural_ = natural; stretch_ = 0; shrink_ = 0; alignment_ = 0; } inline Requirement::Requirement( Coord natural, Coord stretch, Coord shrink, float alignment ) { natural_ = natural; stretch_ = stretch; shrink_ = shrink; alignment_ = alignment; } inline bool Requirement::defined() const { return natural_ != -fil; } inline void Requirement::natural(Coord c) { natural_ = c; } inline Coord Requirement::natural() const { return natural_; } inline void Requirement::stretch(Coord c) { stretch_ = c; } inline Coord Requirement::stretch() const { return stretch_; } inline void Requirement::shrink(Coord c) { shrink_ = c; } inline Coord Requirement::shrink() const { return shrink_; } inline void Requirement::alignment(float a) { alignment_ = a; } inline float Requirement::alignment() const { return alignment_; } inline int Requisition::penalty() const { return penalty_; } inline void Requisition::penalty(int penalty) { penalty_ = penalty; } inline void Requisition::require_x(const Requirement& r) { x_ = r; } inline void Requisition::require_y(const Requirement& r) { y_ = r; } inline const Requirement& Requisition::x_requirement() const { return x_; } inline const Requirement& Requisition::y_requirement() const { return y_; } inline Requirement& Requisition::x_requirement() { return x_; } inline Requirement& Requisition::y_requirement() { return y_; } inline Allotment::Allotment() { origin_ = 0; span_ = 0; alignment_ = 0; } inline Allotment::Allotment(Coord origin, Coord span, float alignment) { origin_ = origin; span_ = span; alignment_ = alignment; } inline void Allotment::origin(Coord o) { origin_ = o; } inline void Allotment::offset(Coord o) { origin_ += o; } inline Coord Allotment::origin() const { return origin_; } inline void Allotment::span(Coord c) { span_ = c; } inline Coord Allotment::span() const { return span_; } inline void Allotment::alignment(float a) { alignment_ = a; } inline float Allotment::alignment() const { return alignment_; } inline Coord Allotment::begin() const { return origin_ - Coord(alignment_ * span_); } inline Coord Allotment::end() const { return origin_ - Coord(alignment_ * span_) + span_; } inline void Allocation::allot_x(const Allotment& a) { x_ = a; } inline void Allocation::allot_y(const Allotment& a) { y_ = a; } inline Allotment& Allocation::x_allotment() { return x_; } inline Allotment& Allocation::y_allotment() { return y_; } inline const Allotment& Allocation::x_allotment() const { return x_; } inline const Allotment& Allocation::y_allotment() const { return y_; } inline Coord Allocation::x() const { return x_.origin(); } inline Coord Allocation::y() const { return y_.origin(); } inline Coord Allocation::left() const { return x_.begin(); } inline Coord Allocation::right() const { return x_.end(); } inline Coord Allocation::bottom() const { return y_.begin(); } inline Coord Allocation::top() const { return y_.end(); } inline Coord Extension::left() const { return x_begin_; } inline Coord Extension::bottom() const { return y_begin_; } inline Coord Extension::right() const { return x_end_; } inline Coord Extension::top() const { return y_end_; } #include #endif neuron-7.5/src/ivos/InterViews/iv.h000077500000000000000000000027101323325274500173410ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef _lib_iv_h #define _lib_iv_h #if 1 || defined(__STDC__) || defined(__ANSI_CPP__) #define _lib_iv(name) iv##name #define _lib_iv2_6(name) iv2_6_##name #else #define _lib_iv(name) iv/**/name #define _lib_iv2_6(name) iv2_6_/**/name #endif #endif neuron-7.5/src/ivos/InterViews/observe.h000077500000000000000000000034231323325274500203720ustar00rootroot00000000000000/* * Copyright (c) 1992 Stanford University * Copyright (c) 1992 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Observable - object to observe */ #ifndef iv_observe_h #define iv_observe_h #include #include class Observer; class ObserverList; class Observable { public: Observable(); virtual ~Observable(); virtual void attach(Observer*); virtual void detach(Observer*); virtual void notify(); private: ObserverList* observers_; }; class Observer { protected: Observer(); public: virtual ~Observer(); virtual void update(Observable*); virtual void disconnect(Observable*); }; #include #endif neuron-7.5/src/ivos/InterViews/regexp.h000077500000000000000000000047361323325274500202270ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Regexp - regular expression searching */ #ifndef iv_regexp_h #define iv_regexp_h #include /* * These definitions are from Henry Spencers public-domain regular * expression matching routines. * * Definitions etc. for regexp(3) routines. * * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], * not the System V one. */ #define NSUBEXP 10 struct regexp { char *startp[NSUBEXP]; char *endp[NSUBEXP]; char *textStart; char regstart; /* Internal use only. */ char reganch; /* Internal use only. */ char *regmust; /* Internal use only. */ int regmlen; /* Internal use only. */ char program[1]; /* Unwarranted chumminess with compiler. */ }; /* * The first byte of the regexp internal "program" is actually this magic * number; the start node begins in the second byte. */ #define REGEXP_MAGIC 0234 class Regexp { public: Regexp(const char*); Regexp(const char*, int length); ~Regexp(); const char* pattern() const; int Search(const char* text, int length, int index, int range); int Match(const char* text, int length, int index); int BeginningOfMatch(int subexp = 0); int EndOfMatch(int subexp = 0); private: char* pattern_; regexp* c_pattern; }; #endif neuron-7.5/src/ivos/InterViews/resource.h000066400000000000000000000041741323325274500205550ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Resources are shared objects. */ #ifndef iv_resource_h #define iv_resource_h #include class Resource { public: Resource(); virtual ~Resource(); virtual void ref() const; virtual void unref() const; virtual void unref_deferred() const; virtual void cleanup(); /* nops for nil pointers */ static void ref(const Resource*); static void unref(const Resource*); static void unref_deferred(const Resource*); /* postpone unref deletes */ static bool defer(bool); static void flush(); /* for backward compatibility */ virtual void Reference() const { ref(); } virtual void Unreference() const { unref(); } private: unsigned refcount_; private: /* prohibit default assignment */ Resource& operator =(const Resource&); }; /* * For backward compatibility */ static inline void Unref(const Resource* r) { Resource::unref(r); } #endif neuron-7.5/src/ivos/Makefile.am000077500000000000000000000003531323325274500165100ustar00rootroot00000000000000lib_LTLIBRARIES = libivos.la libivos_la_SOURCES = file.cpp listimpl.cpp math.cpp memory.cpp \ string.cpp ustring.cpp \ observe.cpp regexp.cpp resource.cpp SUBDIRS = InterViews OS AM_CXXFLAGS = @MINGW_CFLAG@ EXTRA_DIST = ivstrm.h neuron-7.5/src/ivos/Makefile.in000066400000000000000000000720261323325274500165240ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ivos ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libivos_la_LIBADD = am_libivos_la_OBJECTS = file.lo listimpl.lo math.lo memory.lo \ string.lo ustring.lo observe.lo regexp.lo resource.lo libivos_la_OBJECTS = $(am_libivos_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libivos_la_SOURCES) DIST_SOURCES = $(libivos_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)ivstream.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ivstream.h.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libivos.la libivos_la_SOURCES = file.cpp listimpl.cpp math.cpp memory.cpp \ string.cpp ustring.cpp \ observe.cpp regexp.cpp resource.cpp SUBDIRS = InterViews OS AM_CXXFLAGS = @MINGW_CFLAG@ EXTRA_DIST = ivstrm.h all: ivstream.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/ivos/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/ivos/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): ivstream.h: stamp-h12 @test -f $@ || rm -f stamp-h12 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h12 stamp-h12: $(srcdir)/ivstream.h.in $(top_builddir)/config.status @rm -f stamp-h12 cd $(top_builddir) && $(SHELL) ./config.status src/ivos/ivstream.h distclean-hdr: -rm -f ivstream.h stamp-h12 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libivos.la: $(libivos_la_OBJECTS) $(libivos_la_DEPENDENCIES) $(EXTRA_libivos_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libivos_la_OBJECTS) $(libivos_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listimpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/observe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ustring.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) ivstream.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/ivos/OS/000077500000000000000000000000001323325274500147715ustar00rootroot00000000000000neuron-7.5/src/ivos/OS/Makefile.am000077500000000000000000000003641323325274500170330ustar00rootroot00000000000000# all these .h files are copies of the iv-12 files EXTRA_DIST = \ _defines.h \ _undefs.h \ directory.h \ enter-scope.h \ file.h \ host.h \ leave-scope.h \ list.h \ math.h \ memory.h \ os.h \ string.h \ table.h \ table2.h \ types.h \ ustring.h neuron-7.5/src/ivos/OS/Makefile.in000066400000000000000000000375441323325274500170530ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # all these .h files are copies of the iv-12 files VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ivos/OS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = \ _defines.h \ _undefs.h \ directory.h \ enter-scope.h \ file.h \ host.h \ leave-scope.h \ list.h \ math.h \ memory.h \ os.h \ string.h \ table.h \ table2.h \ types.h \ ustring.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/ivos/OS/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/ivos/OS/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/ivos/OS/_defines.h000077500000000000000000000014441323325274500167240ustar00rootroot00000000000000#define u_char _lib_os(u_char) #define CopyString _lib_os(CopyString) #define Directory _lib_os(Directory) #define DirectoryImpl _lib_os(DirectoryImpl) #define File _lib_os(File) #define FileInfo _lib_os(FileInfo) #define Host _lib_os(Host) #define InputFile _lib_os(InputFile) #define List _lib_os(List) #define Math _lib_os(Math) #define Memory _lib_os(Memory) #define NullTerminatedString _lib_os(NullTerminatedString) #define OutputFile _lib_os(OutputFile) #define PtrList _lib_os(PtrList) #define StdInput _lib_os(StdInput) #define StdOutput _lib_os(StdOutput) #define String _lib_os(String) #define Table _lib_os(Table) #define Table2 _lib_os(Table2) #define UniqueString _lib_os(UniqueString) #define UniqueStringPool _lib_os(UniqueStringPool) #define UniqueStringTable _lib_os(UniqueStringTable) neuron-7.5/src/ivos/OS/_undefs.h000077500000000000000000000005611323325274500165720ustar00rootroot00000000000000#undef u_char #undef CopyString #undef Directory #undef DirectoryImpl #undef File #undef FileInfo #undef Host #undef InputFile #undef List #undef Math #undef Memory #undef NullTerminatedString #undef OutputFile #undef PtrList #undef StdInput #undef StdOutput #undef String #undef Table #undef Table2 #undef UniqueString #undef UniqueStringPool #undef UniqueStringTable neuron-7.5/src/ivos/OS/directory.h000066400000000000000000000036651323325274500171600ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_directory_h #define os_directory_h #include class DirectoryImpl; class String; class Directory { protected: Directory(); public: virtual ~Directory(); static Directory* current(); static Directory* open(const String&); virtual void close(); virtual const String* path() const; virtual int count() const; virtual const String* name(int index) const; virtual int index(const String&) const; virtual bool is_directory(int index) const; static String* canonical(const String&); static bool match(const String& name, const String& pattern); private: DirectoryImpl* impl_; private: /* not allowed */ Directory(const Directory&); void operator =(const Directory&); }; #endif neuron-7.5/src/ivos/OS/enter-scope.h000077500000000000000000000027011323325274500173710ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef iv_os__scope_h #define iv_os__scope_h #include #undef String #undef u_char #include #ifndef nil #define nil 0 #endif #ifndef iv_os_u_char #define iv_os_u_char typedef unsigned char u_char; #endif #endif neuron-7.5/src/ivos/OS/file.h000077500000000000000000000040541323325274500160670ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_file_h #define os_file_h #include #undef _GLIBCXX_ATOMIC_BUILTINS #undef _GLIBCXX_USE_INT128 class FileInfo; class String; class File { protected: File(FileInfo*); public: virtual ~File(); virtual const String* name() const; virtual long length() const; virtual void close(); virtual void limit(unsigned int buffersize); protected: FileInfo* rep() const; private: FileInfo* rep_; private: /* not allowed */ void operator =(const File&); }; class InputFile : public File { protected: InputFile(FileInfo*); public: virtual ~InputFile(); static InputFile* open(const String& name); virtual int read(const char*& start); }; class StdInput : public InputFile { public: StdInput(); virtual ~StdInput(); virtual long length() const; virtual int read(const char*& start); }; #endif neuron-7.5/src/ivos/OS/host.h000077500000000000000000000025321323325274500161240ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_host_h #define os_host_h #include class Host { public: static const char* name(); private: static char name_[100]; }; #endif neuron-7.5/src/ivos/OS/leave-scope.h000077500000000000000000000024311323325274500173500ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifdef iv_os__scope_h #undef iv_os__scope_h #include #endif neuron-7.5/src/ivos/OS/list.h000066400000000000000000000210751323325274500161220ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Generic list implemented as dynamic array */ #ifndef os_list_h #define os_list_h #include extern void ListImpl_range_error(long index); extern long ListImpl_best_new_count(long count, unsigned int size, unsigned int m = 1); #if 1 || defined(__STDC__) || defined(__ANSI_CPP__) #define __ListItr(List) List##_Iterator #define ListItr(List) __ListItr(List) #define __ListUpdater(List) List##_Updater #define ListUpdater(List) __ListUpdater(List) #else #define __ListItr(List) List/**/_Iterator #define ListItr(List) __ListItr(List) #define __ListUpdater(List) List/**/_Updater #define ListUpdater(List) __ListUpdater(List) #endif #define declareList(List,T) \ class List { \ public: \ List(long size = 0); \ ~List(); \ \ long count() const; \ T item(long index) const; \ T& item_ref(long index) const; \ \ void prepend(const T&); \ void append(const T&); \ void insert(long index, const T&); \ void remove(long index); \ void remove_all(); \ private: \ T* items_; \ long size_; \ long count_; \ long free_; \ }; \ \ inline long List::count() const { return count_; } \ \ inline T List::item(long index) const { \ if (index < 0 || index >= count_) { \ ListImpl_range_error(index); \ } \ long i = index < free_ ? index : index + size_ - count_; \ return items_[i]; \ } \ inline T& List::item_ref(long index) const { \ if (index < 0 || index >= count_) { \ ListImpl_range_error(index); \ } \ long i = index < free_ ? index : index + size_ - count_; \ return items_[i]; \ } \ \ inline void List::append(const T& item) { insert(count_, item); } \ inline void List::prepend(const T& item) { insert(0, item); } \ \ class ListItr(List) { \ public: \ ListItr(List)(const List&); \ \ bool more() const; \ T cur() const; \ T& cur_ref() const; \ void next(); \ private: \ const List* list_; \ long cur_; \ }; \ \ inline bool ListItr(List)::more() const { return cur_ < list_->count(); } \ inline T ListItr(List)::cur() const { return list_->item(cur_); } \ inline T& ListItr(List)::cur_ref() const { \ return list_->item_ref(cur_); \ } \ inline void ListItr(List)::next() { ++cur_; } \ \ class ListUpdater(List) { \ public: \ ListUpdater(List)(List&); \ \ bool more() const; \ T cur() const; \ T& cur_ref() const; \ void remove_cur(); \ void next(); \ private: \ List* list_; \ long cur_; \ }; \ \ inline bool ListUpdater(List)::more() const { \ return cur_ < list_->count(); \ } \ inline T ListUpdater(List)::cur() const { return list_->item(cur_); } \ inline T& ListUpdater(List)::cur_ref() const { \ return list_->item_ref(cur_); \ } \ inline void ListUpdater(List)::remove_cur() { list_->remove(cur_); } \ inline void ListUpdater(List)::next() { ++cur_; } /* * Lists of pointers * * Don't ask me to explain the AnyPtr nonsense. C++ compilers * have a hard time deciding between (const void*)& and const (void*&). * Typedefs help, though still keep me guessing. */ typedef void* __AnyPtr; declareList(__AnyPtrList,__AnyPtr) #define declarePtrList(PtrList,T) \ class PtrList { \ public: \ PtrList(long size = 0); \ \ long count() const; \ T* item(long index) const; \ \ void prepend(T*); \ void append(T*); \ void insert(long index, T*); \ void remove(long index); \ void remove_all(); \ private: \ __AnyPtrList impl_; \ }; \ \ inline PtrList::PtrList(long size) : impl_(size) { } \ inline long PtrList::count() const { return impl_.count(); } \ inline T* PtrList::item(long index) const { return (T*)impl_.item(index); } \ inline void PtrList::append(T* item) { insert(impl_.count(), item); } \ inline void PtrList::prepend(T* item) { insert(0, item); } \ inline void PtrList::remove(long index) { impl_.remove(index); } \ inline void PtrList::remove_all() { impl_.remove_all(); } \ \ class ListItr(PtrList) { \ public: \ ListItr(PtrList)(const PtrList&); \ \ bool more() const; \ T* cur() const; \ void next(); \ private: \ const PtrList* list_; \ long cur_; \ }; \ \ inline bool ListItr(PtrList)::more() const { \ return cur_ < list_->count(); \ } \ inline T* ListItr(PtrList)::cur() const { return list_->item(cur_); } \ inline void ListItr(PtrList)::next() { ++cur_; } \ \ class ListUpdater(PtrList) { \ public: \ ListUpdater(PtrList)(PtrList&); \ \ bool more() const; \ T* cur() const; \ void remove_cur(); \ void next(); \ private: \ PtrList* list_; \ long cur_; \ }; \ \ inline bool ListUpdater(PtrList)::more() const { \ return cur_ < list_->count(); \ } \ inline T* ListUpdater(PtrList)::cur() const { return list_->item(cur_); } \ inline void ListUpdater(PtrList)::remove_cur() { list_->remove(cur_); } \ inline void ListUpdater(PtrList)::next() { ++cur_; } /* * List implementation */ #define implementList(List,T) \ List::List(long size) { \ if (size > 0) { \ size_ = ListImpl_best_new_count(size, sizeof(T)); \ items_ = new T[size_]; \ } else { \ size_ = 0; \ items_ = 0; \ } \ count_ = 0; \ free_ = 0; \ } \ \ List::~List() { \ delete [] items_; \ } \ \ void List::insert(long index, const T& item) { \ if (count_ == size_) { \ long size = ListImpl_best_new_count(size_ + 1, sizeof(T), 2); \ T* items = new T[size]; \ if (items_ != 0) { \ register long i; \ for (i = 0; i < free_; ++i) { \ items[i] = items_[i]; \ } \ for (i = 0; i < count_ - free_; ++i) { \ items[free_ + size - count_ + i] = \ items_[free_ + size_ - count_ + i]; \ } \ delete [] items_; \ } \ items_ = items; \ size_ = size; \ } \ if (index >= 0 && index <= count_) { \ if (index < free_) { \ for (register long i = free_ - index - 1; i >= 0; --i) { \ items_[index + size_ - count_ + i] = items_[index + i]; \ } \ } else if (index > free_) { \ for (register long i = 0; i < index - free_; ++i) { \ items_[free_ + i] = items_[free_ + size_ - count_ + i]; \ } \ } \ free_ = index + 1; \ count_ += 1; \ items_[index] = item; \ } \ } \ \ void List::remove(long index) { \ if (index >= 0 && index <= count_) { \ if (index < free_) { \ for (register long i = free_ - index - 2; i >= 0; --i) { \ items_[size_ - count_ + index + 1 + i] = \ items_[index + 1 + i]; \ } \ } else if (index > free_) { \ for (register long i = 0; i < index - free_; ++i) { \ items_[free_ + i] = items_[free_ + size_ - count_ + i]; \ } \ } \ free_ = index; \ count_ -= 1; \ } \ } \ \ void List::remove_all() { \ count_ = 0; \ free_ = 0; \ } \ \ ListItr(List)::ListItr(List)(const List& list) { \ list_ = &list; \ cur_ = 0; \ } \ \ ListUpdater(List)::ListUpdater(List)(List& list) { \ list_ = &list; \ cur_ = 0; \ } #define implementPtrList(PtrList,T) \ void PtrList::insert(long index, T* item) { \ const __AnyPtr p = item; \ impl_.insert(index, p); \ } \ ListItr(PtrList)::ListItr(PtrList)(const PtrList& list) { \ list_ = &list; \ cur_ = 0; \ } \ \ ListUpdater(PtrList)::ListUpdater(PtrList)(PtrList& list) { \ list_ = &list; \ cur_ = 0; \ } #endif neuron-7.5/src/ivos/OS/math.h000066400000000000000000000065761323325274500161110ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_math_h #define os_math_h #ifdef WIN32 #ifdef max #undef max #endif #ifdef min #undef min #endif #endif #include /* * Common math operations on built-in types. */ #define declare_binary_minmax(Type) \ static Type min(Type a, Type b); \ static Type max(Type a, Type b) #define implement_binary_minmax(Type) \ inline Type Math::min(Type a, Type b) { return a < b ? a : b; } \ inline Type Math::max(Type a, Type b) { return a > b ? a : b; } #define declare_4_minmax(Type) \ static Type min(Type a, Type b, Type c, Type d); \ static Type max(Type a, Type b, Type c, Type d) /* * Compiler isn't smart enough to figure out how to do a 4-way min inline * with single nested if-then-else. */ #define implement_4_minmax(Type) \ inline Type Math::min(Type a, Type b, Type c, Type d) { \ Type r1 = min(a, b), r2 = min(c, d); \ return min(r1, r2); \ } \ \ inline Type Math::max(Type a, Type b, Type c, Type d) { \ Type r1 = max(a, b), r2 = max(c, d); \ return max(r1, r2); \ } class Math { public: declare_binary_minmax(int); declare_binary_minmax(unsigned); declare_binary_minmax(long); declare_binary_minmax(unsigned long); declare_binary_minmax(float); declare_binary_minmax(double); declare_4_minmax(int); declare_4_minmax(float); declare_4_minmax(double); static int abs(int); static long abs(long); static double abs(double); static int round(float); static int round(double); static bool equal(float x, float y, float e); static bool equal(double x, double y, double e); }; implement_binary_minmax(int) implement_binary_minmax(unsigned) implement_binary_minmax(long) implement_binary_minmax(unsigned long) implement_binary_minmax(float) implement_binary_minmax(double) implement_4_minmax(int) implement_4_minmax(float) implement_4_minmax(double) inline int Math::round(float x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); } inline int Math::round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); } inline bool Math::equal(float x, float y, float e) { return x - y < e && y - x < e; } inline bool Math::equal(double x, double y, double e) { return x - y < e && y - x < e; } #endif neuron-7.5/src/ivos/OS/memory.h000077500000000000000000000027341323325274500164630ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_memory_h #define os_memory_h #include class Memory { public: static void copy(const void* from, void* to, unsigned int nbytes); static int compare(const void*, const void*, unsigned int nbytes); static void zero(void*, unsigned int nbytes); }; #endif neuron-7.5/src/ivos/OS/os.h000077500000000000000000000025421323325274500155710ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef _lib_os_h #define _lib_os_h #if 1 || defined(__STDC__) || defined(__ANSI_CPP__) #define _lib_os(name) os##name #else #define _lib_os(name) os/**/name #endif #endif neuron-7.5/src/ivos/OS/string.h000066400000000000000000000115041323325274500164510ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_string_h #define os_string_h /* * String - simple (non-copying) string class */ #include class String { public: #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif String(); String(const char*); String(const char*, int length); String(const String&); virtual ~String(); const char* string() const; int length() const; virtual unsigned long hash() const; virtual String& operator =(const String&); virtual String& operator =(const char*); virtual bool operator ==(const String&) const; virtual bool operator ==(const char*) const; virtual bool operator !=(const String&) const; virtual bool operator !=(const char*) const; virtual bool operator >(const String&) const; virtual bool operator >(const char*) const; virtual bool operator >=(const String&) const; virtual bool operator >=(const char*) const; virtual bool operator <(const String&) const; virtual bool operator <(const char*) const; virtual bool operator <=(const String&) const; virtual bool operator <=(const char*) const; virtual bool case_insensitive_equal(const String&) const; virtual bool case_insensitive_equal(const char*) const; u_char operator [](int index) const; virtual String substr(int start, int length) const; String left(int length) const; String right(int start) const; virtual void set_to_substr(int start, int length); void set_to_left(int length); void set_to_right(int start); virtual int search(int start, u_char) const; int index(u_char) const; int rindex(u_char) const; virtual bool convert(int&) const; virtual bool convert(long&) const; virtual bool convert(float&) const; virtual bool convert(double&) const; virtual bool null_terminated() const; protected: virtual void set_value(const char*); virtual void set_value(const char*, int); private: const char* data_; int length_; }; class CopyString : public String { public: #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif CopyString(); CopyString(const char*); CopyString(const char*, int length); CopyString(const String&); CopyString(const CopyString&); virtual ~CopyString(); virtual String& operator =(const CopyString&); virtual String& operator =(const String&); virtual String& operator =(const char*); virtual bool null_terminated() const; protected: virtual void set_value(const char*); virtual void set_value(const char*, int); private: void strfree(); }; class NullTerminatedString : public String { public: #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif NullTerminatedString(); NullTerminatedString(const String&); NullTerminatedString(const NullTerminatedString&); virtual ~NullTerminatedString(); virtual String& operator =(const String&); virtual String& operator =(const char*); virtual bool null_terminated() const; private: bool allocated_; void assign(const String&); void strfree(); }; inline const char* String::string() const { return data_; } inline int String::length() const { return length_; } inline u_char String::operator [](int index) const { return ((u_char*)data_)[index]; } inline String String::left(int length) const { return substr(0, length); } inline String String::right(int start) const { return substr(start, -1); } inline void String::set_to_left(int length) { set_to_substr(0, length); } inline void String::set_to_right(int start) { set_to_substr(start, -1); } inline int String::index(u_char c) const { return search(0, c); } inline int String::rindex(u_char c) const { return search(-1, c); } #endif neuron-7.5/src/ivos/OS/table.h000066400000000000000000000134501323325274500162340ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Generic object association table. */ #ifndef os_table_h #define os_table_h #include #if 1 || defined(__STDC__) || defined(__ANSI_CPP__) #define __TableEntry(Table) Table##_Entry #define TableEntry(Table) __TableEntry(Table) #define __TableIterator(Table) Table##_Iterator #define TableIterator(Table) __TableIterator(Table) #else #define __TableEntry(Table) Table/**/_Entry #define TableEntry(Table) __TableEntry(Table) #define __TableIterator(Table) Table/**/_Iterator #define TableIterator(Table) __TableIterator(Table) #endif #define declareTable(Table,Key,Value) \ struct TableEntry(Table); \ \ class Table { \ public: \ Table(int); \ ~Table(); \ \ void insert(Key, Value); \ bool find(Value&, Key); \ bool find_and_remove(Value&, Key); \ void remove(Key); \ private: \ friend class TableIterator(Table); \ \ int size_; \ TableEntry(Table)** first_; \ TableEntry(Table)** last_; \ \ TableEntry(Table)*& probe(Key); \ }; \ \ struct TableEntry(Table) { \ private: \ friend class Table; \ friend class TableIterator(Table); \ \ Key key_; \ Value value_; \ TableEntry(Table)* chain_; \ }; \ \ class TableIterator(Table) { \ public: \ TableIterator(Table)(Table&); \ \ Key& cur_key(); \ Value& cur_value(); \ bool more(); \ bool next(); \ private: \ TableEntry(Table)* cur_; \ TableEntry(Table)** entry_; \ TableEntry(Table)** last_; \ }; \ \ inline Key& TableIterator(Table)::cur_key() { return cur_->key_; } \ inline Value& TableIterator(Table)::cur_value() { return cur_->value_; } \ inline bool TableIterator(Table)::more() { return entry_ <= last_; } /* * Predefined hash functions */ #ifndef os_table2_h inline unsigned long key_to_hash(long k) { return (unsigned long)k; } #if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ > __SIZEOF_LONG__ inline unsigned long key_to_hash(const void* k) { return (unsigned long)((unsigned long long)k); } #else inline unsigned long key_to_hash(const void* k) { return (unsigned long)k; } #endif #endif /* * Table implementation */ #define implementTable(Table,Key,Value) \ Table::Table(int n) { \ for (size_ = 32; size_ < n; size_ <<= 1); \ first_ = new TableEntry(Table)*[size_]; \ --size_; \ last_ = &first_[size_]; \ for (register TableEntry(Table)** e = first_; e <= last_; e++) { \ *e = nil; \ } \ } \ \ Table::~Table() { \ for (register TableEntry(Table)** e = first_; e <= last_; e++) { \ TableEntry(Table)* t = *e; \ for (register TableEntry(Table)* i = t; i; i = t) { \ t = i->chain_; \ delete i; \ } \ } \ delete [] first_; \ } \ \ inline TableEntry(Table)*& Table::probe(Key i) { \ return first_[key_to_hash(i) & size_]; \ } \ \ void Table::insert(Key k, Value v) { \ register TableEntry(Table)* e = new TableEntry(Table); \ e->key_ = k; \ e->value_ = v; \ register TableEntry(Table)** a = &probe(k); \ e->chain_ = *a; \ *a = e; \ } \ \ bool Table::find(Value& v, Key k) { \ for (register TableEntry(Table)* e = probe(k); e != nil; e = e->chain_) { \ if (e->key_ == k) { \ v = e->value_; \ return true; \ } \ } \ return false; \ } \ \ bool Table::find_and_remove(Value& v, Key k) { \ TableEntry(Table)** a = &probe(k); \ register TableEntry(Table)* e = *a; \ if (e != nil) { \ if (e->key_ == k) { \ v = e->value_; \ *a = e->chain_; \ delete e; \ return true; \ } else { \ register TableEntry(Table)* prev; \ do { \ prev = e; \ e = e->chain_; \ } while (e != nil && e->key_ != k); \ if (e != nil) { \ v = e->value_; \ prev->chain_ = e->chain_; \ delete e; \ return true; \ } \ } \ } \ return false; \ } \ \ void Table::remove(Key k) { \ TableEntry(Table)** a = &probe(k); \ register TableEntry(Table)* e = *a; \ if (e != nil) { \ if (e->key_ == k) { \ *a = e->chain_; \ delete e; \ } else { \ register TableEntry(Table)* prev; \ do { \ prev = e; \ e = e->chain_; \ } while (e != nil && e->key_ != k); \ if (e != nil) { \ prev->chain_ = e->chain_; \ delete e; \ } \ } \ } \ } \ \ TableIterator(Table)::TableIterator(Table)(Table& t) { \ last_ = t.last_; \ for (entry_ = t.first_; entry_ <= last_; entry_++) { \ cur_ = *entry_; \ if (cur_ != nil) { \ break; \ } \ } \ } \ \ bool TableIterator(Table)::next() { \ cur_ = cur_->chain_; \ if (cur_ != nil) { \ return true; \ } \ for (++entry_; entry_ <= last_; entry_++) { \ cur_ = *entry_; \ if (cur_ != nil) { \ return true; \ } \ } \ return false; \ } #endif neuron-7.5/src/ivos/OS/table2.h000066400000000000000000000124031323325274500163130ustar00rootroot00000000000000/* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Object association table with 2 keys. */ #ifndef os_table2_h #define os_table2_h #include #if defined(__STDC__) || defined(__ANSI_CPP__) #define __Table2Entry(Table2) Table2##_Entry #define Table2Entry(Table2) __Table2Entry(Table2) #define __Table2Iterator(Table2) Table2##_Iterator #define Table2Iterator(Table2) __Table2Iterator(Table2) #else #define __Table2Entry(Table2) Table2/**/_Entry #define Table2Entry(Table2) __Table2Entry(Table2) #define __Table2Iterator(Table2) Table2/**/_Iterator #define Table2Iterator(Table2) __Table2Iterator(Table2) #endif #define declareTable2(Table2,Key1,Key2,Value) \ struct Table2Entry(Table2); \ \ class Table2 { \ public: \ Table2(int); \ ~Table2(); \ \ void insert(Key1, Key2, Value); \ bool find(Value&, Key1, Key2); \ void remove(Key1, Key2); \ private: \ friend class Table2Iterator(Table2); \ \ int size_; \ Table2Entry(Table2)** first_; \ Table2Entry(Table2)** last_; \ \ Table2Entry(Table2)*& probe(Key1, Key2); \ }; \ \ struct Table2Entry(Table2) { \ private: \ friend class Table2; \ friend class Table2Iterator(Table2); \ \ Key1 key1_; \ Key2 key2_; \ Value value_; \ Table2Entry(Table2)* chain_; \ }; \ \ class Table2Iterator(Table2) { \ public: \ Table2Iterator(Table2)(Table2&); \ \ Key1& cur_key1(); \ Key2& cur_key2(); \ Value& cur_value(); \ bool more(); \ bool next(); \ private: \ Table2Entry(Table2)* cur_; \ Table2Entry(Table2)** entry_; \ Table2Entry(Table2)** last_; \ }; \ \ inline Key1& Table2Iterator(Table2)::cur_key1() { return cur_->key1_; } \ inline Key2& Table2Iterator(Table2)::cur_key2() { return cur_->key2_; } \ inline Value& Table2Iterator(Table2)::cur_value() { return cur_->value_; } \ inline bool Table2Iterator(Table2)::more() { return entry_ <= last_; } /* * Predefined hash functions */ #ifndef os_table_h inline unsigned long key_to_hash(long k) { return (unsigned long)k; } inline unsigned long key_to_hash(const void* k) { return (unsigned long)k; } #endif /* * Table2 implementation */ #define implementTable2(Table2,Key1,Key2,Value) \ Table2::Table2(int n) { \ for (size_ = 32; size_ < n; size_ <<= 1); \ first_ = new Table2Entry(Table2)*[size_]; \ --size_; \ last_ = &first_[size_]; \ for (register Table2Entry(Table2)** e = first_; e <= last_; e++) { \ *e = nil; \ } \ } \ \ Table2::~Table2() { \ delete [] first_; \ } \ \ inline Table2Entry(Table2)*& Table2::probe(Key1 k1, Key2 k2) { \ return first_[(key_to_hash(k1) ^ key_to_hash(k2)) & size_]; \ } \ \ void Table2::insert(Key1 k1, Key2 k2, Value v) { \ register Table2Entry(Table2)* e = new Table2Entry(Table2); \ e->key1_ = k1; \ e->key2_ = k2; \ e->value_ = v; \ register Table2Entry(Table2)** a = &probe(k1, k2); \ e->chain_ = *a; \ *a = e; \ } \ \ bool Table2::find(Value& v, Key1 k1, Key2 k2) { \ for ( \ register Table2Entry(Table2)* e = probe(k1, k2); \ e != nil; \ e = e->chain_ \ ) { \ if (e->key1_ == k1 && e->key2_ == k2) { \ v = e->value_; \ return true; \ } \ } \ return false; \ } \ \ void Table2::remove(Key1 k1, Key2 k2) { \ Table2Entry(Table2)** a = &probe(k1, k2); \ register Table2Entry(Table2)* e = *a; \ if (e != nil) { \ if (e->key1_ == k1 && e->key2_ == k2) { \ *a = e->chain_; \ delete e; \ } else { \ register Table2Entry(Table2)* prev; \ do { \ prev = e; \ e = e->chain_; \ } while (e != nil && (e->key1_ != k1 || e->key2_ != k2)); \ if (e != nil) { \ prev->chain_ = e->chain_; \ delete e; \ } \ } \ } \ } \ \ Table2Iterator(Table2)::Table2Iterator(Table2)(Table2& t) { \ last_ = t.last_; \ for (entry_ = t.first_; entry_ <= last_; entry_++) { \ cur_ = *entry_; \ if (cur_ != nil) { \ break; \ } \ } \ } \ \ bool Table2Iterator(Table2)::next() { \ cur_ = cur_->chain_; \ if (cur_ != nil) { \ return true; \ } \ for (++entry_; entry_ <= last_; entry_++) { \ cur_ = *entry_; \ if (cur_ != nil) { \ return true; \ } \ } \ return false; \ } #endif neuron-7.5/src/ivos/OS/types.h000077500000000000000000000024471323325274500163200ustar00rootroot00000000000000/* * Copyright (c) 1992 Stanford University * Copyright (c) 1992 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_types_h #define os_types_h #include #if !MAC #include #endif #endif neuron-7.5/src/ivos/OS/ustring.h000066400000000000000000000036761323325274500166510ustar00rootroot00000000000000/* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef os_ustring_h #define os_ustring_h /* * UniqueString - unique string using hash table */ #include class UniqueStringPool; class UniqueStringTable; class UniqueString : public String { public: #ifdef _DELTA_EXTENSIONS #pragma __static_class #endif UniqueString(); UniqueString(const char*); UniqueString(const char*, int length); UniqueString(const String&); UniqueString(const UniqueString&); virtual ~UniqueString(); virtual unsigned long hash() const; virtual bool operator ==(const String&) const; virtual bool operator ==(const char*) const; virtual bool null_terminated() const; private: static UniqueStringTable* table_; static UniqueStringPool* pool_; void init(const String&); }; #endif neuron-7.5/src/ivos/file.cpp000077500000000000000000000157611323325274500161100ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif #if carbon #undef MAC #endif /* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ // ======================================================================= // // 1.5 // 1999/07/05 15:34:58 // // Windows 3.1/NT InterViews Port // Copyright (c) 1993 Tim Prinzing // // Permission to use, copy, modify, distribute, and sell this software and // its documentation for any purpose is hereby granted without fee, provided // that (i) the above copyright notice and this permission notice appear in // all copies of the software and related documentation, and (ii) the name of // Tim Prinzing may not be used in any advertising or publicity relating to // the software without the specific, prior written permission of Tim Prinzing. // // THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, // EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY // WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. // // IN NO EVENT SHALL Tim Prinzing BE LIABLE FOR ANY SPECIAL, INCIDENTAL, // INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER // RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE // POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // // ======================================================================= #include #include #include #include #include #include #ifndef MAC #include #endif #ifdef HAVE_SYS_MMAN_H extern "C" { #include } #endif #ifdef WIN16 #define WIN32 #endif #ifdef WIN32 #include #endif #ifdef CYGWIN extern "C" { // These are the POSIX definitions. Hopefully they won't conflict. extern int _close(int); extern int _read(int, void*, unsigned int); } #endif #if !defined(__GNUC__) || !defined (WIN32) && !defined (MAC) /* no standard place for these */ // Yes there is. Posix says read and close are in unistd.h. #ifdef HAVE_UNISTD_H #include #else extern "C" { // These are the POSIX definitions. Hopefully they won't conflict. extern int close(int); extern int read(int, void*, unsigned int); } #endif //#if defined(SGI) //#endif //#if defined(sun) && !defined(__SYSENT_H) // extern int read(int, void*, unsigned int); //#endif //#if defined(AIXV3) // extern int read(int, char*, unsigned int); //#endif //#if defined(apollo) // extern long read(int, void*, unsigned int); //#endif //#if defined(__DECCXX) // extern int read(int, void*, unsigned int); //#endif //} #endif /* WIN32 */ class FileInfo { #ifndef MAC public: CopyString* name_; int fd_; char* map_; struct stat info_; off_t pos_; char* buf_; unsigned int limit_; FileInfo(CopyString*, int fd); #endif }; #ifndef MAC FileInfo::FileInfo(CopyString* s, int fd) { name_ = s; fd_ = fd; pos_ = 0; limit_ = 0; map_ = nil; buf_ = nil; } #endif File::File(FileInfo* i) { assert(i != nil); rep_ = i; } File::~File() { close(); #ifndef MAC delete rep_->name_; delete rep_; #endif } const String* File::name() const { #ifndef MAC return rep_->name_; #else return nil; #endif } long File::length() const { #ifndef MAC return rep_->info_.st_size; #else return 0; #endif } void File::close() { #ifndef MAC FileInfo* i = rep_; if (i->fd_ >= 0) { if (i->map_ != nil) { #ifdef HAVE_SYS_MMAN_H // #if defined(SGI) || defined(__alpha) munmap(i->map_, int(i->info_.st_size)); #endif } if (i->buf_ != nil) { delete [] i->buf_; } #ifdef WIN32 _close(i->fd_); #else ::close(i->fd_); #endif i->fd_ = -1; } #endif } void File::limit(unsigned int buffersize) { #ifndef MAC rep_->limit_ = buffersize; #endif } FileInfo* File::rep() const { #ifndef MAC return rep_; #else return nil; #endif } /* class InputFile */ InputFile::InputFile(FileInfo* i) : File(i) { } InputFile::~InputFile() { } InputFile* InputFile::open(const String& name) { CopyString* s = new CopyString(name); #ifndef MAC #if defined(WIN32) && !defined(__MWERKS__) && !defined(CYGWIN) int fd = _open((char*)s->string(), O_RDONLY); #else /* cast to workaround DEC C++ prototype bug */ int fd = ::open((char*)s->string(), O_RDONLY); #endif if (fd < 0) { delete s; return nil; } FileInfo* i = new FileInfo(s, fd); if (fstat(fd, &i->info_) < 0) { delete s; delete i; return nil; } return new InputFile(i); #else return nil; #endif } int InputFile::read(const char*& start) { #ifndef MAC FileInfo* i = rep(); int len = (int)(i->info_.st_size); if (i->pos_ >= len) { return 0; } if (i->limit_ != 0 && len > i->limit_) { len = (int)(i->limit_); } #if HAVE_SYS_MMAN_H // #if defined(SGI) || defined(__alpha) i->map_ = (char*)mmap(0, len, PROT_READ, MAP_PRIVATE, i->fd_, i->pos_); if ((long)(i->map_) == -1) { return -1; } start = i->map_; #else if (i->buf_ == nil) { i->buf_ = new char[len]; } start = i->buf_; #ifdef WIN32 len = _read(i->fd_, i->buf_, len); #else len = ::read(i->fd_, i->buf_, len); #endif /* WIN32 */ #endif i->pos_ += len; return len; #else return 0; #endif } /* class StdInput */ #if !MAC StdInput::StdInput() : InputFile(new FileInfo(new CopyString("-stdin"), 0)) { } #endif StdInput::~StdInput() { } long StdInput::length() const { return -1; } int StdInput::read(const char*& start) { #ifndef MAC FileInfo* i = rep(); if (i->buf_ == nil) { if (i->limit_ == 0) { i->limit_ = BUFSIZ; } i->buf_ = new char[i->limit_]; } #ifdef WIN32 int nbytes = _read(i->fd_, (char*)i->buf_, i->limit_); #else int nbytes = ::read(i->fd_, (char*)i->buf_, i->limit_); #endif /* WIN32 */ if (nbytes > 0) { start = (const char*)(i->buf_); } return nbytes; #else return 0; #endif } neuron-7.5/src/ivos/ivstream.h.in000077500000000000000000000003261323325274500170640ustar00rootroot00000000000000#ifndef ivstream_h #define ivstream_h /* The standard is */ #undef HAVE_SSTREAM /* Define if the openmodes output,append,input are not defined */ #undef NO_OUTPUT_OPENMODE #include #endif neuron-7.5/src/ivos/ivstrm.h000077500000000000000000000034321323325274500161520ustar00rootroot00000000000000#ifndef ivstrm_h #define ivstrm_h /* prevent subsequent inclusion of ivstream if this didnt come from there since it defines things already possibly defined in config.h */ #ifndef ivstream_h #define ivstream_h #endif #if defined(HAVE_SSTREAM) /* the current standard. Note that one of the arms below is obsolete */ /* this was introduced to avoid the g++ 3.2 warning (and to get more up to date) /usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. */ #include #include #include #define IOS_OUT std::ios::out #define IOS_IN std::ios::in #define IOS_APP std::ios::app using namespace std; #else /* do not have sstream */ /* introduced for macos since stream.h does not exist. also takes care of the declaration of output and input with regard to streams Note: the above standard certainly obsoletes the NO_OUTPUT_OPENMODE stuff. So macos now handled by the HAVE_SSTREAM case. */ #if defined(HAVE_STREAM_H) #include #else #define _STREAM_COMPAT #include #endif // for some compilers stream.h is insufficient // following for gcc-3.0.1 #if defined(NO_OUTPUT_OPENMODE) #include // for filebuf #include // for ends #define IOS_OUT std::ios_base::out #define IOS_IN std::ios_base::in #define IOS_APP std::ios_base::app #else #define IOS_OUT output #define IOS_IN input #define IOS_APP append #endif #endif /* do not have sstream */ #endif neuron-7.5/src/ivos/listimpl.cpp000077500000000000000000000042251323325274500170170ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../config.h> #endif /* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Support routines for lists. */ #include #include #include implementList(__AnyPtrList,__AnyPtr) static long ListImpl_best_new_sizes[] = { 48, 112, 240, 496, 1008, 2032, 4080, 8176, 16368, 32752, 65520, 131056, 262128, 524272, 1048560, 2097136, 4194288, 8388592, 16777200, 33554416, 67108848, 134217712, 268435440, 536870896, 1073741808, 2147483632 }; long ListImpl_best_new_count(long count, unsigned int size, unsigned int m) { for (int i = 0; i < sizeof(ListImpl_best_new_sizes)/sizeof(long); i++) { if (count * size < ListImpl_best_new_sizes[i]) { return ListImpl_best_new_sizes[i] / size; } } return count*m; } void ListImpl_range_error(long i) { #if defined(WIN32) || MAC printf("internal error: list index %ld out of range\n", i); #else fprintf(stderr, "internal error: list index %ld out of range\n", i); #endif abort(); } neuron-7.5/src/ivos/math.cpp000077500000000000000000000035451323325274500161170ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include #include #include /* would that these lived in a standard place ... */ #if defined(IVOS_FABS) #define myfabs IVOS_FABS #else extern "C" { extern int abs(int); extern double fabs(double); } #define myfabs ::fabs #endif int Math::abs(int x) { return ::abs(x); } long Math::abs(long x) { return x >= 0 ? x : -x; } double Math::abs(double x) { return myfabs(x); } #include Extension::Extension() {} void Extension::set_xy(Canvas*, Coord left, Coord bottom, Coord right, Coord top) { x_begin_ = left; y_begin_ = bottom; x_end_ = right; y_end_ = top; } neuron-7.5/src/ivos/memory.cpp000077500000000000000000000036151323325274500164740ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include #if defined(WIN32) || MAC #define STDC_HEADERS 1 #else #include #endif #include void Memory::copy(const void* from, void* to, unsigned int nbytes) { #if MAC BlockMove(from, to, nbytes); #elif defined(STDC_HEADERS) // ANSI C memmove and memset: memmove(to, from, size_t(nbytes)); #elif defined(HAVE_BCOPY) bcopy(from, to, nbytes); #else #error "Neither bcopy nor mmove is defined." #endif } int Memory::compare(const void* b1, const void* b2, unsigned int nbytes) { return memcmp(b1, b2, nbytes) != 0; } void Memory::zero(void* b, unsigned int nbytes) { memset(b, 0, size_t(nbytes)); } neuron-7.5/src/ivos/observe.cpp000077500000000000000000000045711323325274500166330ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1992 Stanford University * Copyright (c) 1992 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Observable - object to observe */ #include #include declarePtrList(ObserverList,Observer) implementPtrList(ObserverList,Observer) Observable::Observable() { observers_ = nil; } Observable::~Observable() { ObserverList* list = observers_; if (list != nil) { for (ListItr(ObserverList) i(*list); i.more(); i.next()) { i.cur()->disconnect(this); } delete list; } } void Observable::attach(Observer* o) { ObserverList* list = observers_; if (list == nil) { list = new ObserverList(5); observers_ = list; } list->append(o); } void Observable::detach(Observer* o) { ObserverList* list = observers_; if (list != nil) { for (ListUpdater(ObserverList) i(*list); i.more(); i.next()) { if (i.cur() == o) { i.remove_cur(); break; } } } } void Observable::notify() { ObserverList* list = observers_; if (list != nil) { for (ListItr(ObserverList) i(*list); i.more(); i.next()) { i.cur()->update(this); } } } Observer::Observer() { } Observer::~Observer() { } void Observer::update(Observable*) { } void Observer::disconnect(Observable*) { } neuron-7.5/src/ivos/regexp.cpp000066400000000000000000000730751323325274500164620ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Regexp - regular expression searching */ #include #include #include /* * This version is based on the Henry Spencers public domain reimplementation * of the regular expression matching subroutines. They are included as * static subroutines after the externally accessible routines. */ /* * Forward declarations for regcomp()'s friends. */ static regexp* regcomp(const char* exp); static char* reg(int paren, int* flagp); static char* regbranch(int* flagp); static char* regpiece(int* flagp); static char* regatom(int* flagp); static char* regnode(char op); static char* regnext(register char* p); static void regc(char b); static void reginsert(char op, char* opnd); static void regtail(char* p, char* val); static void regoptail(char* p, char* val); static void regerror(const char* s); static int regexec(register regexp* prog, register char* string); static int regtry(regexp* prog, char* string); static int regmatch(char* prog); static int regrepeat(char* p); inline char * FindNewline(char* s) { return strchr(s, '\n'); } inline char * NextLine(char* s) { char* newstart; if ((newstart = FindNewline(s)) != nil) newstart++; return newstart; } Regexp::Regexp (const char* pat) { int length = strlen(pat); pattern_ = new char[length+1]; strncpy(pattern_, pat, length); pattern_[length] = '\0'; c_pattern = regcomp(pattern_); if (!c_pattern) { delete [] pattern_; pattern_ = nil; } } Regexp::Regexp (const char* pat, int length) { pattern_ = new char[length+1]; strncpy(pattern_, pat, length); pattern_[length] = '\0'; c_pattern = regcomp(pattern_); if (!c_pattern) { delete [] pattern_; pattern_ = nil; } } Regexp::~Regexp () { if (pattern_) { delete [] pattern_; } if (c_pattern) { delete [] (char*)c_pattern; } } const char* Regexp::pattern() const { return pattern_; } int Regexp::Search (const char* text, int length, int index, int range) { bool forwardSearch; bool frontAnchored; bool endAnchored; char* searchStart; char* searchLimit; char* endOfLine = nil; char* lastMatch = nil; char csave; /* * A small sanity check. Otherwise length is unused in this function. * This is really what the logic embedded in the old version of this * routine enforced. */ if (index + range > length) { range = length - index; if (range < 0) return -1; } if (c_pattern == nil) { return -1; } c_pattern->startp[0] = nil; if (range < 0) { forwardSearch = false; searchLimit = (char *) text + index; searchStart = (char *) searchLimit + range; /* range is negative */ } else { forwardSearch = true; searchStart = (char *) text + index; searchLimit = (char *) searchStart + range; } /* Mark end of text string so search will stop */ char save = *searchLimit; *searchLimit = '\0'; frontAnchored = pattern_[0] == '^'; endAnchored = pattern_[strlen(pattern_)-1] == '$'; if (frontAnchored && (searchStart != text || searchStart[-1] == '\n')) { searchStart = NextLine(searchStart); } while (searchStart && searchStart < searchLimit) { int result; if (endAnchored && (endOfLine = FindNewline(searchStart)) != nil) { csave = *endOfLine; *endOfLine = '\0'; } result = regexec(c_pattern, searchStart); if (endOfLine) *endOfLine = csave; if (result) { /* Found a match */ if (forwardSearch) break; /* Done */ else { lastMatch = c_pattern->startp[0]; searchStart = c_pattern->endp[0]; if (frontAnchored) searchStart = NextLine(searchStart); continue; } } /* Did not find a match */ if (frontAnchored || endAnchored) searchStart = NextLine(searchStart); else break; } if (!forwardSearch && lastMatch) { if (endAnchored && (endOfLine = FindNewline(lastMatch)) != nil) { csave = *endOfLine; *endOfLine = '\0'; } (void) regexec(c_pattern, lastMatch); /* Refill startp and endp */ if (endOfLine) *endOfLine = csave; } *searchLimit = save; c_pattern->textStart = (char *) text; return c_pattern->startp[0] - c_pattern->textStart; } int Regexp::Match (const char* text, int length, int index) { if (c_pattern == nil) return -1; c_pattern->startp[0] = nil; char save = *(text+length); *(char*)(text+length) = '\0'; c_pattern->textStart = (char *) text; (void) regexec(c_pattern, (char *) text + index); *(char*)(text+length) = save; if (c_pattern->startp[0] != nil) return c_pattern->endp[0] - c_pattern->startp[0]; else return -1; } int Regexp::BeginningOfMatch (int subexp) { if (subexp < 0 || subexp > NSUBEXP || c_pattern == nil || c_pattern->startp[0] == nil) return -1; return c_pattern->startp[subexp] - c_pattern->textStart; } int Regexp::EndOfMatch (int subexp) { if (subexp < 0 || subexp > NSUBEXP || c_pattern == nil || c_pattern->startp[0] == nil) return -1; return c_pattern->endp[subexp] - c_pattern->textStart; } /* * regcomp and regexec * * Copyright (c) 1986 by University of Toronto. * Written by Henry Spencer. Not derived from licensed software. * * Permission is granted to anyone to use this software for any * purpose on any computer system, and to redistribute it freely, * subject to the following restrictions: * * 1. The author is not responsible for the consequences of use of * this software, no matter how awful, even if they arise * from defects in it. * * 2. The origin of this software must not be misrepresented, either * by explicit claim or by omission. * * 3. Altered versions must be plainly marked as such, and must not * be misrepresented as being the original software. * * Beware that some of this code is subtly aware of the way operator * precedence is structured in regular expressions. Serious changes in * regular-expression syntax might require a total rethink. */ /* * The "internal use only" fields in regexp.h are present to pass info from * compile to execute that permits the execute phase to run lots faster on * simple cases. They are: * * regstart char that must begin a match; '\0' if none obvious * reganch is the match anchored (at beginning-of-line only)? * regmust string (pointer into program) that match must include, or nil * regmlen length of regmust string * * Regstart and reganch permit very fast decisions on suitable starting points * for a match, cutting down the work a lot. Regmust permits fast rejection * of lines that cannot possibly match. The regmust tests are costly enough * that regcomp() supplies a regmust only if the r.e. contains something * potentially expensive (at present, the only such thing detected is * or + * at the start of the r.e., which can involve a lot of backup). Regmlen is * supplied because the test in regexec() needs it and regcomp() is computing * it anyway. */ /* * Structure for regexp "program". This is essentially a linear encoding * of a nondeterministic finite-state machine (aka syntax charts or * "railroad normal form" in parsing technology). Each node is an opcode * plus a "next" pointer, possibly plus an operand. "Next" pointers of * all nodes except BRANCH implement concatenation; a "next" pointer with * a BRANCH on both ends of it is connecting two alternatives. (Here we * have one of the subtle syntax dependencies: an individual BRANCH (as * opposed to a collection of them) is never concatenated with anything * because of operator precedence.) The operand of some types of node is * a literal string; for others, it is a node leading into a sub-FSM. In * particular, the operand of a BRANCH node is the first node of the branch. * (NB this is *not* a tree structure: the tail of the branch connects * to the thing following the set of BRANCHes.) The opcodes are: */ /* definition number opnd? meaning */ #define END 0 /* no End of program. */ #define BOL 1 /* no Match "" at beginning of line. */ #define EOL 2 /* no Match "" at end of line. */ #define ANY 3 /* no Match any one character. */ #define ANYOF 4 /* str Match any character in this string. */ #define ANYBUT 5 /* str Match any character not in this string. */ #define BRANCH 6 /* node Match this alternative, or the next... */ #define BACK 7 /* no Match "", "next" ptr points backward. */ #define EXACTLY 8 /* str Match this string. */ #define NOTHING 9 /* no Match empty string. */ #define STAR 10 /* node Match this (simple) thing 0 or more times. */ #define PLUS 11 /* node Match this (simple) thing 1 or more times. */ #define OPEN 20 /* no Mark this point in input as start of #n. */ /* OPEN+1 is number 1, etc. */ #define CLOSE 30 /* no Analogous to OPEN. */ /* * Opcode notes: * * BRANCH The set of branches constituting a single choice are hooked * together with their "next" pointers, since precedence prevents * anything being concatenated to any individual branch. The * "next" pointer of the last BRANCH in a choice points to the * thing following the whole choice. This is also where the * final "next" pointer of each individual branch points; each * branch starts with the operand node of a BRANCH node. * * BACK Normal "next" pointers all implicitly point forward; BACK * exists to make loop structures possible. * * STAR,PLUS '?', and complex '*' and '+', are implemented as circular * BRANCH structures using BACK. Simple cases (one character * per match) are implemented with STAR and PLUS for speed * and to minimize recursive plunges. * * OPEN,CLOSE ...are numbered at compile time. */ /* * A node is one char of opcode followed by two chars of "next" pointer. * "Next" pointers are stored as two 8-bit pieces, high order first. The * value is a positive offset from the opcode of the node containing it. * An operand, if any, simply follows the node. (Note that much of the * code generation knows about this implicit relationship.) * * Using two bytes for the "next" pointer is vast overkill for most things, * but allows patterns to get big without disasters. */ #define OP(p) (*(p)) #define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) #define OPERAND(p) ((p) + 3) /* * Utility definitions. */ #ifndef RE_CHARBITS #define RE_CHARBITS 0xff #endif #define UCHARAT(p) ((int)*(p)&RE_CHARBITS) #define FAIL(m) { regerror(m); return(nil); } #define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') #define META "^$.[()|?+*\\" /* * Flags to be passed up and down. */ #define HASWIDTH 01 /* Known never to match null string. */ #define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */ #define SPSTART 04 /* Starts with * or +. */ #define WORST 0 /* Worst case. */ /* * Global work variables for regcomp(). */ static const char *regparse; /* Input-scan pointer. */ static int regnpar; /* () count. */ static char regdummy; static char *regcode; /* Code-emit pointer; ®dummy = don't. */ static long regsize; /* Code size. */ /* - regcomp - compile a regular expression into internal code * * We can't allocate space until we know how big the compiled form will be, * but we can't compile it (and thus know how big it is) until we've got a * place to put the code. So we cheat: we compile it twice, once with code * generation turned off and size counting turned on, and once "for real". * This also means that we don't allocate space until we are sure that the * thing really will compile successfully, and we never have to move the * code and thus invalidate pointers into it. (Note that it has to be in * one piece because free() must be able to free it all.) * * Beware that the optimization-preparation code in here knows about some * of the structure of the compiled regexp. */ static regexp * regcomp(const char* exp) { register regexp *r; register char *scan; register char *longest; register int len; int flags; if (exp == nil) FAIL("nil argument"); /* First pass: determine size, legality. */ regparse = exp; regnpar = 1; regsize = 0L; regcode = ®dummy; regc(REGEXP_MAGIC); if (reg(0, &flags) == nil) return(nil); /* Small enough for pointer-storage convention? */ if (regsize >= 32767L) /* Probably could be 65535L. */ FAIL("regexp too big"); /* Allocate space. */ r = (regexp *) new char[sizeof(regexp) + (unsigned)regsize]; /* Second pass: emit code. */ regparse = exp; regnpar = 1; regcode = r->program; regc(REGEXP_MAGIC); if (reg(0, &flags) == nil) { delete [] (char*)r; return(nil); } /* Dig out information for optimizations. */ r->regstart = '\0'; /* Worst-case defaults. */ r->reganch = 0; r->regmust = nil; r->regmlen = 0; scan = r->program+1; /* First BRANCH. */ if (OP(regnext(scan)) == END) { /* Only one top-level choice. */ scan = OPERAND(scan); /* Starting-point info. */ if (OP(scan) == EXACTLY) r->regstart = *OPERAND(scan); else if (OP(scan) == BOL) r->reganch++; /* * If there's something expensive in the r.e., find the * longest literal string that must appear and make it the * regmust. Resolve ties in favor of later strings, since * the regstart check works with the beginning of the r.e. * and avoiding duplication strengthens checking. Not a * strong reason, but sufficient in the absence of others. */ if (flags&SPSTART) { longest = nil; len = 0; for (; scan != nil; scan = regnext(scan)) if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) { longest = OPERAND(scan); len = strlen(OPERAND(scan)); } r->regmust = longest; r->regmlen = len; } } return(r); } /* - reg - regular expression, i.e. main body or parenthesized thing * * Caller must absorb opening parenthesis. * * Combining parenthesis handling with the base level of regular expression * is a trifle forced, but the need to tie the tails of the branches to what * follows makes it hard to avoid. */ static char * reg(int paren, int* flagp) { register char *ret; register char *br; register char *ender; register int parno; int flags; *flagp = HASWIDTH; /* Tentatively. */ /* Make an OPEN node, if parenthesized. */ if (paren) { if (regnpar >= NSUBEXP) FAIL("too many ()"); parno = regnpar; regnpar++; ret = regnode(OPEN+parno); } else ret = nil; /* Pick up the branches, linking them together. */ br = regbranch(&flags); if (br == nil) return(nil); if (ret != nil) regtail(ret, br); /* OPEN -> first. */ else ret = br; if (!(flags&HASWIDTH)) *flagp &= ~HASWIDTH; *flagp |= flags&SPSTART; while (*regparse == '|') { regparse++; br = regbranch(&flags); if (br == nil) return(nil); regtail(ret, br); /* BRANCH -> BRANCH. */ if (!(flags&HASWIDTH)) *flagp &= ~HASWIDTH; *flagp |= flags&SPSTART; } /* Make a closing node, and hook it on the end. */ ender = regnode((paren) ? CLOSE+parno : END); regtail(ret, ender); /* Hook the tails of the branches to the closing node. */ for (br = ret; br != nil; br = regnext(br)) regoptail(br, ender); /* Check for proper termination. */ if (paren && *regparse++ != ')') { FAIL("unmatched ()"); } else if (!paren && *regparse != '\0') { if (*regparse == ')') { FAIL("unmatched ()"); } else FAIL("junk on end"); /* "Can't happen". */ /* NOTREACHED */ } return(ret); } /* - regbranch - one alternative of an | operator * * Implements the concatenation operator. */ static char * regbranch(int* flagp) { register char *ret; register char *chain; register char *latest; int flags; *flagp = WORST; /* Tentatively. */ ret = regnode(BRANCH); chain = nil; while (*regparse != '\0' && *regparse != '|') { if (*regparse == '\\' && regparse[1] == ')') { regparse++; break; } latest = regpiece(&flags); if (latest == nil) return(nil); *flagp |= flags&HASWIDTH; if (chain == nil) /* First piece. */ *flagp |= flags&SPSTART; else regtail(chain, latest); chain = latest; } if (chain == nil) /* Loop ran zero times. */ (void) regnode(NOTHING); return(ret); } /* - regpiece - something followed by possible [*+?] * * Note that the branching code sequences used for ? and the general cases * of * and + are somewhat optimized: they use the same NOTHING node as * both the endmarker for their branch list and the body of the last branch. * It might seem that this node could be dispensed with entirely, but the * endmarker role is not redundant. */ static char * regpiece(int* flagp) { register char *ret; register char op; register char *next; int flags; ret = regatom(&flags); if (ret == nil) return(nil); op = *regparse; if (!ISMULT(op)) { *flagp = flags; return(ret); } if (!(flags&HASWIDTH) && op != '?') FAIL("*+ operand could be empty"); *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH); if (op == '*' && (flags&SIMPLE)) reginsert(STAR, ret); else if (op == '*') { /* Emit x* as (x&|), where & means "self". */ reginsert(BRANCH, ret); /* Either x */ regoptail(ret, regnode(BACK)); /* and loop */ regoptail(ret, ret); /* back */ regtail(ret, regnode(BRANCH)); /* or */ regtail(ret, regnode(NOTHING)); /* null. */ } else if (op == '+' && (flags&SIMPLE)) reginsert(PLUS, ret); else if (op == '+') { /* Emit x+ as x(&|), where & means "self". */ next = regnode(BRANCH); /* Either */ regtail(ret, next); regtail(regnode(BACK), ret); /* loop back */ regtail(next, regnode(BRANCH)); /* or */ regtail(ret, regnode(NOTHING)); /* null. */ } else if (op == '?') { /* Emit x? as (x|) */ reginsert(BRANCH, ret); /* Either x */ regtail(ret, regnode(BRANCH)); /* or */ next = regnode(NOTHING); /* null. */ regtail(ret, next); regoptail(ret, next); } regparse++; if (ISMULT(*regparse)) FAIL("nested *?+"); return(ret); } /* - regatom - the lowest level * * Optimization: gobbles an entire sequence of ordinary characters so that * it can turn them into a single node, which is smaller to store and * faster to run. Backslashed characters are exceptions, each becoming a * separate node; the code is simpler that way and it's not worth fixing. */ static char * regatom(int* flagp) { register char *ret; int flags; *flagp = WORST; /* Tentatively. */ switch (*regparse++) { case '^': ret = regnode(BOL); break; case '$': ret = regnode(EOL); break; case '.': ret = regnode(ANY); *flagp |= HASWIDTH|SIMPLE; break; case '[': { register int classbeg; register int classend; if (*regparse == '^') { /* Complement of range. */ ret = regnode(ANYBUT); regparse++; } else ret = regnode(ANYOF); if (*regparse == ']' || *regparse == '-') regc(*regparse++); while (*regparse != '\0' && *regparse != ']') { if (*regparse == '-') { regparse++; if (*regparse == ']' || *regparse == '\0') regc('-'); else { classbeg = UCHARAT(regparse-2)+1; classend = UCHARAT(regparse); if (classbeg > classend+1) FAIL("invalid [] range"); for (; classbeg <= classend; classbeg++) regc(classbeg); regparse++; } } else regc(*regparse++); } regc('\0'); if (*regparse != ']') FAIL("unmatched []"); regparse++; *flagp |= HASWIDTH|SIMPLE; } break; case '\0': case '|': FAIL("internal urp"); /* Supposed to be caught earlier. */ break; case '?': case '+': case '*': FAIL("?+* follows nothing"); break; case '\\': if (*regparse == '\0') FAIL("trailing \\"); if (*regparse == '(') { regparse++; ret = reg(1, &flags); if (ret == nil) return(nil); *flagp |= flags&(HASWIDTH|SPSTART); } else { ret = regnode(EXACTLY); regc(*regparse++); regc('\0'); *flagp |= HASWIDTH|SIMPLE; } break; default: { register int len; register char ender; regparse--; len = strcspn(regparse, META); if (len <= 0) FAIL("internal disaster"); ender = *(regparse+len); if (len > 1 && ISMULT(ender)) len--; /* Back off clear of ?+* operand. */ *flagp |= HASWIDTH; if (len == 1) *flagp |= SIMPLE; ret = regnode(EXACTLY); while (len > 0) { regc(*regparse++); len--; } regc('\0'); } break; } return(ret); } /* - regnode - emit a node */ static char * /* Location. */ regnode(char op) { register char *ret; register char *ptr; ret = regcode; if (ret == ®dummy) { regsize += 3; return(ret); } ptr = ret; *ptr++ = op; *ptr++ = '\0'; /* Null "next" pointer. */ *ptr++ = '\0'; regcode = ptr; return(ret); } /* - regc - emit (if appropriate) a byte of code */ static void regc(char b) { if (regcode != ®dummy) *regcode++ = b; else regsize++; } /* - reginsert - insert an operator in front of already-emitted operand * * Means relocating the operand. */ static void reginsert(char op, char* opnd) { register char *src; register char *dst; register char *place; if (regcode == ®dummy) { regsize += 3; return; } src = regcode; regcode += 3; dst = regcode; while (src > opnd) *--dst = *--src; place = opnd; /* Op node, where operand used to be. */ *place++ = op; *place++ = '\0'; *place++ = '\0'; } /* - regtail - set the next-pointer at the end of a node chain */ static void regtail(char* p, char* val) { register char *scan; register char *temp; register int offset; if (p == ®dummy) return; /* Find last node. */ scan = p; for (;;) { temp = regnext(scan); if (temp == nil) break; scan = temp; } if (OP(scan) == BACK) offset = scan - val; else offset = val - scan; *(scan+1) = (offset>>8)&0377; *(scan+2) = offset&0377; } /* - regoptail - regtail on operand of first argument; nop if operandless */ static void regoptail(char* p, char* val) { /* "Operandless" and "op != BRANCH" are synonymous in practice. */ if (p == nil || p == ®dummy || OP(p) != BRANCH) return; regtail(OPERAND(p), val); } /* * regexec and friends */ /* * Global work variables for regexec(). */ static char *reginput; /* String-input pointer. */ static char *regbol; /* Beginning of input, for ^ check. */ static char **regstartp; /* Pointer to startp array. */ static char **regendp; /* Ditto for endp. */ /* - regexec - match a regexp against a string */ static int regexec(register regexp* prog, register char* string) { register char *s; /* Be paranoid... */ if (prog == nil || string == nil) { regerror("nil parameter"); return(0); } /* Check validity of program. */ if (UCHARAT(prog->program) != REGEXP_MAGIC) { regerror("corrupted program"); return(0); } /* If there is a "must appear" string, look for it. */ if (prog->regmust != nil) { s = string; while ((s = strchr(s, prog->regmust[0])) != nil) { if (strncmp(s, prog->regmust, prog->regmlen) == 0) break; /* Found it. */ s++; } if (s == nil) /* Not present. */ return(0); } /* Mark beginning of line for ^ . */ regbol = string; /* Simplest case: anchored match need be tried only once. */ if (prog->reganch) return(regtry(prog, string)); /* Messy cases: unanchored match. */ s = string; if (prog->regstart != '\0') /* We know what char it must start with. */ while ((s = strchr(s, prog->regstart)) != nil) { if (regtry(prog, s)) return(1); s++; } else /* We don't -- general case. */ do { if (regtry(prog, s)) return(1); } while (*s++ != '\0'); /* Failure. */ return(0); } /* - regtry - try match at specific point */ static int /* 0 failure, 1 success */ regtry(regexp* prog, char* string) { register int i; register char **sp; register char **ep; reginput = string; regstartp = prog->startp; regendp = prog->endp; sp = prog->startp; ep = prog->endp; for (i = NSUBEXP; i > 0; i--) { *sp++ = nil; *ep++ = nil; } if (regmatch(prog->program + 1)) { prog->startp[0] = string; prog->endp[0] = reginput; return(1); } else return(0); } /* - regmatch - main matching routine * * Conceptually the strategy is simple: check to see whether the current * node matches, call self recursively to see whether the rest matches, * and then act accordingly. In practice we make some effort to avoid * recursion, in particular by going through "ordinary" nodes (that don't * need to know whether the rest of the match failed) by a loop instead of * by recursion. */ static int /* 0 failure, 1 success */ regmatch(char* prog) { register char *scan; /* Current node. */ char *next; /* Next node. */ scan = prog; while (scan != nil) { next = regnext(scan); switch (OP(scan)) { case BOL: if (reginput != regbol) return(0); break; case EOL: if (*reginput != '\0') return(0); break; case ANY: if (*reginput == '\0') return(0); reginput++; break; case EXACTLY: { register int len; register char *opnd; opnd = OPERAND(scan); /* Inline the first character, for speed. */ if (*opnd != *reginput) return(0); len = strlen(opnd); if (len > 1 && strncmp(opnd, reginput, len) != 0) return(0); reginput += len; } break; case ANYOF: if (*reginput == '\0') return(0); if (strchr(OPERAND(scan), *reginput) == nil) return(0); reginput++; break; case ANYBUT: if (*reginput == '\0') return(0); if (strchr(OPERAND(scan), *reginput) != nil) return(0); reginput++; break; case NOTHING: break; case BACK: break; case OPEN+1: case OPEN+2: case OPEN+3: case OPEN+4: case OPEN+5: case OPEN+6: case OPEN+7: case OPEN+8: case OPEN+9: { register int no; register char *save; no = OP(scan) - OPEN; save = reginput; if (regmatch(next)) { /* * Don't set startp if some later * invocation of the same parentheses * already has. */ if (regstartp[no] == nil) regstartp[no] = save; return(1); } else return(0); } break; case CLOSE+1: case CLOSE+2: case CLOSE+3: case CLOSE+4: case CLOSE+5: case CLOSE+6: case CLOSE+7: case CLOSE+8: case CLOSE+9: { register int no; register char *save; no = OP(scan) - CLOSE; save = reginput; if (regmatch(next)) { /* * Don't set endp if some later * invocation of the same parentheses * already has. */ if (regendp[no] == nil) regendp[no] = save; return(1); } else return(0); } break; case BRANCH: { register char *save; if (OP(next) != BRANCH) /* No choice. */ next = OPERAND(scan); /* Avoid recursion. */ else { do { save = reginput; if (regmatch(OPERAND(scan))) return(1); reginput = save; scan = regnext(scan); } while (scan != nil && OP(scan) == BRANCH); return(0); /* NOTREACHED */ } } break; case STAR: case PLUS: { register char nextch; register int no; register char *save; register int min; /* * Lookahead to avoid useless match attempts * when we know what character comes next. */ nextch = '\0'; if (OP(next) == EXACTLY) nextch = *OPERAND(next); min = (OP(scan) == STAR) ? 0 : 1; save = reginput; no = regrepeat(OPERAND(scan)); while (no >= min) { /* If it could work, try it. */ if (nextch == '\0' || *reginput == nextch) if (regmatch(next)) return(1); /* Couldn't or didn't -- back up. */ no--; reginput = save + no; } return(0); } break; case END: return(1); /* Success! */ default: regerror("memory corruption"); return(0); } scan = next; } /* * We get here only if there's trouble -- normally "case END" is * the terminating point. */ regerror("corrupted pointers"); return(0); } /* - regrepeat - repeatedly match something simple, report how many */ static int regrepeat(char* p) { register int count = 0; register char *scan; register char *opnd; scan = reginput; opnd = OPERAND(p); switch (OP(p)) { case ANY: count = strlen(scan); scan += count; break; case EXACTLY: while (*opnd == *scan) { count++; scan++; } break; case ANYOF: while (*scan != '\0' && strchr(opnd, *scan) != nil) { count++; scan++; } break; case ANYBUT: while (*scan != '\0' && strchr(opnd, *scan) == nil) { count++; scan++; } break; default: /* Oh dear. Called inappropriately. */ regerror("internal foulup"); count = 0; /* Best compromise. */ break; } reginput = scan; return(count); } /* - regnext - dig the "next" pointer out of a node */ static char * regnext(register char* p) { register int offset; if (p == ®dummy) return(nil); offset = NEXT(p); if (offset == 0) return(nil); if (OP(p) == BACK) return(p-offset); else return(p+offset); } static void regerror(const char* s) { cerr << "regexp: " << s << "\n"; } neuron-7.5/src/ivos/resource.cpp000066400000000000000000000061041323325274500170040ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include #include declarePtrList(ResourceList,Resource) implementPtrList(ResourceList,Resource) class ResourceImpl { friend class Resource; static bool deferred_; static ResourceList* deletes_; }; bool ResourceImpl::deferred_ = false; ResourceList* ResourceImpl::deletes_; Resource::Resource() { refcount_ = 0; } Resource::~Resource() { } void Resource::ref() const { Resource* r = (Resource*)this; r->refcount_ += 1; } void Resource::unref() const { Resource* r = (Resource*)this; if (r->refcount_ != 0) { r->refcount_ -= 1; } if (r->refcount_ == 0) { r->cleanup(); delete r; } } void Resource::unref_deferred() const { Resource* r = (Resource*)this; if (r->refcount_ != 0) { r->refcount_ -= 1; } if (r->refcount_ == 0) { r->cleanup(); if (ResourceImpl::deferred_) { if (ResourceImpl::deletes_ == nil) { ResourceImpl::deletes_ = new ResourceList; } ResourceImpl::deletes_->append(r); } else { delete r; } } } void Resource::cleanup() { } void Resource::ref(const Resource* r) { if (r != nil) { r->ref(); } } void Resource::unref(const Resource* r) { if (r != nil) { r->unref(); } } void Resource::unref_deferred(const Resource* r) { if (r != nil) { r->unref_deferred(); } } bool Resource::defer(bool b) { bool previous = ResourceImpl::deferred_; if (b != previous) { flush(); ResourceImpl::deferred_ = b; } return previous; } void Resource::flush() { ResourceList* list = ResourceImpl::deletes_; if (list != nil) { bool previous = ResourceImpl::deferred_; ResourceImpl::deferred_ = false; for (ListItr(ResourceList) i(*list); i.more(); i.next()) { Resource* r = i.cur(); delete r; } list->remove_all(); ResourceImpl::deferred_ = previous; } } neuron-7.5/src/ivos/string.cpp000066400000000000000000000223501323325274500164640ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include #include #include #include /* * Just to be sure ... */ /* fails on mac osx extern "C" { #if !MAC #ifndef tolower extern int tolower(int); #endif #ifndef toupper extern int toupper(int); #endif #endif extern long int strtol(const char*, char**, int); extern double strtod(const char*, char**); } */ String::String() { data_ = nil; length_ = 0; } String::String(const char* s) { data_ = s; length_ = strlen(s); } String::String(const char* s, int n) { data_ = s; length_ = n; } String::String(const String& s) { data_ = s.data_; length_ = s.length_; } String::~String() { } unsigned long String::hash() const { const char* p; unsigned long v = 0; if (length_ == -1) { for (p = data_; *p != '\0'; p++) { v = (v << 1) ^ (*p); } String* s = (String*)this; s->length_ = p - data_; } else { const char* q = &data_[length_]; for (p = data_; p < q; p++) { v = (v << 1) ^ (*p); } } unsigned long t = v >> 10; t ^= (t >> 10); return v ^ t; } String& String::operator =(const String& s) { data_ = s.data_; length_ = s.length_; return *this; } String& String::operator =(const char* s) { data_ = s; length_ = strlen(s); return *this; } bool String::operator ==(const String& s) const { return (length_ == s.length_) && (strncmp(data_, s.data_, length_) == 0); } bool String::operator ==(const char* s) const { return (strncmp(data_, s, length_) == 0) && (s[length_] == '\0'); } bool String::operator !=(const String& s) const { return (length_ != s.length_) || (strncmp(data_, s.data_, length_) != 0); } bool String::operator !=(const char* s) const { return (strncmp(data_, s, length_) != 0) || (s[length_] != '\0'); } bool String::operator >(const String& s) const { return strncmp(data_, s.data_, length_) > 0; } bool String::operator >(const char* s) const { return strncmp(data_, s, length_) > 0; } bool String::operator >=(const String& s) const { return strncmp(data_, s.data_, length_) >= 0; } bool String::operator >=(const char* s) const { return strncmp(data_, s, length_) >= 0; } bool String::operator <(const String& s) const { return strncmp(data_, s.data_, length_) < 0; } bool String::operator <(const char* s) const { return strncmp(data_, s, length_) < 0; } bool String::operator <=(const String& s) const { return strncmp(data_, s.data_, length_) <= 0; } bool String::operator <=(const char* s) const { return strncmp(data_, s, length_) <= 0; } bool String::case_insensitive_equal(const String& s) const { if (length() != s.length()) { return false; } const char* p = string(); const char* p2 = s.string(); const char* q = p + length(); for (; p < q; p++, p2++) { int c1 = *p; int c2 = *p2; if (c1 != c2 && tolower(c1) != tolower(c2)) { return false; } } return true; } bool String::case_insensitive_equal(const char* s) const { return case_insensitive_equal(String(s)); } /* * A negative value for start initializes the position at the end * of the string before indexing. Any negative length makes * the substring extend to the end of the string. */ String String::substr(int start, int length) const { if (start >= length_ || start < -length_) { /* should raise exception */ return String(""); } int pos = (start >= 0) ? start : (length_ + start); if (pos + length > length_) { /* should raise exception */ return String(""); } int len = (length >= 0) ? length : (length_ - pos); return String(data_ + pos, len); } void String::set_to_substr(int start, int length) { if (start > length_ || start < -length_) { /* should raise exception */ return; } int pos = (start >= 0) ? start : (length_ + start); if (pos + length > length_) { /* should raise exception */ return; } int len = (length >= 0) ? length : (length_ - pos); data_ += pos; length_ = len; } bool String::null_terminated() const { return false; } void String::set_value(const char* s) { data_ = s; length_ = strlen(s); } void String::set_value(const char* s, int len) { data_ = s; length_ = len; } /* * A negative value for start initializes the position to the end * of the string before indexing and searches right-to-left. */ int String::search(int start, u_char c) const { if (start >= length_ || start < -length_) { /* should raise exception */ return -1; } if (start >= 0) { const char* end = data_ + length_; for (const char* p = data_ + start; p < end; p++) { if (*p == c) { return p - data_; } } } else { for (const char* p = data_ + length_ + start; p >= data_; p--) { if (*p == c) { return p - data_; } } } return -1; } /* * Convert a string to binary value. */ bool String::convert(int& value) const { NullTerminatedString s(*this); const char* str = s.string(); char* ptr; value = (int)strtol(str, &ptr, 0); return ptr != str; } bool String::convert(long& value) const { NullTerminatedString s(*this); const char* str = s.string(); char* ptr; value = strtol(str, &ptr, 0); return ptr != str; } bool String::convert(float& value) const { NullTerminatedString s(*this); const char* str = s.string(); char* ptr; value = (float)strtod(str, &ptr); return ptr != str; } bool String::convert(double& value) const { NullTerminatedString s(*this); const char* str = s.string(); char* ptr; value = strtod(str, &ptr); return ptr != str; } /* class CopyString */ CopyString::CopyString() : String() { } CopyString::CopyString(const char* s) : String() { set_value(s); } CopyString::CopyString(const char* s, int length) : String() { set_value(s, length); } CopyString::CopyString(const String& s) : String() { set_value(s.string(), s.length()); } CopyString::CopyString(const CopyString& s) : String() { set_value(s.string(), s.length()); } CopyString::~CopyString() { strfree(); } String& CopyString::operator =(const CopyString& s) { strfree(); set_value(s.string(), s.length()); return *this; } String& CopyString::operator =(const String& s) { strfree(); set_value(s.string(), s.length()); return *this; } String& CopyString::operator =(const char* s) { strfree(); set_value(s); return *this; } bool CopyString::null_terminated() const { return true; } void CopyString::set_value(const char* s) { set_value(s, strlen(s)); } /* * Guarantee null-terminated string for compatibility with printf et al. */ void CopyString::set_value(const char* s, int len) { char* ns = new char[len + 1]; ns[len] = '\0'; String::set_value(strncpy(ns, s, len), len); } void CopyString::strfree() { char* s = (char*)(string()); delete [] s; } /* * class NullTerminatedString */ NullTerminatedString::NullTerminatedString() : String() { allocated_ = false; } NullTerminatedString::NullTerminatedString(const String& s) : String() { assign(s); } NullTerminatedString::NullTerminatedString( const NullTerminatedString& s ) : String() { allocated_ = false; String::set_value(s.string(), s.length()); } NullTerminatedString::~NullTerminatedString() { strfree(); } String& NullTerminatedString::operator =(const String& s) { strfree(); assign(s); return *this; } String& NullTerminatedString::operator =(const char* s) { strfree(); allocated_ = false; String::set_value(s, strlen(s)); return *this; } bool NullTerminatedString::null_terminated() const { return true; } void NullTerminatedString::assign(const String& s) { if (s.null_terminated()) { allocated_ = false; String::set_value(s.string(), s.length()); } else { allocated_ = true; int len = s.length(); char* ns = new char[len + 1]; ns[len] = '\0'; String::set_value(strncpy(ns, s.string(), len), len); } } void NullTerminatedString::strfree() { if (allocated_) { char* s = (char*)(string()); delete [] s; allocated_ = false; } } neuron-7.5/src/ivos/ustring.cpp000066400000000000000000000105671323325274500166600ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include #include #include /* * UniqueString uses a table for matching strings and a string pool * for storing the string data. A pool is presumably more efficient * than malloc/new, but individual strings cannot be deallocated. */ inline unsigned long key_to_hash(String& s) { return s.hash(); } declareTable(UniqueStringTable,String,String) implementTable(UniqueStringTable,String,String) static const unsigned strpoolsize = 800; class UniqueStringPool { public: UniqueStringPool(unsigned poolsize = strpoolsize); ~UniqueStringPool(); char* add(const char*, unsigned); private: char* data; unsigned size; unsigned cur; UniqueStringPool* prev; }; UniqueStringTable* UniqueString::table_; UniqueStringPool* UniqueString::pool_; UniqueString::UniqueString() : String() { } UniqueString::UniqueString(const char* s) : String() { init(String(s)); } UniqueString::UniqueString(const char* s, int n) : String() { init(String(s, n)); } UniqueString::UniqueString(const String& s) : String() { init(s); } UniqueString::UniqueString(const UniqueString& s) : String(s) { } UniqueString::~UniqueString() { } void UniqueString::init(const String& s) { if (table_ == nil) { table_ = new UniqueStringTable(256); } if (!table_->find(*this, s)) { if (pool_ == nil) { pool_ = new UniqueStringPool; } int n = s.length(); set_value(pool_->add(s.string(), n), n); table_->insert(*this, *this); } } /* * UniqueString's have a unique data pointer, so we can just use * that for a hash value. */ unsigned long UniqueString::hash() const { return key_to_hash(string()); } bool UniqueString::operator ==(const String& s) const { return string() == s.string() && length() == s.length(); } bool UniqueString::operator ==(const char* s) const { return String::operator ==(s); } bool UniqueString::null_terminated() const { return false; } /* * UniqueStringPool implementation. */ UniqueStringPool::UniqueStringPool(unsigned poolsize) { data = new char[poolsize]; size = poolsize; cur = 0; prev = nil; } /* * Tail-recursive deletion to walk the list back to the head * of the pool. */ UniqueStringPool::~UniqueStringPool() { delete [] data; delete prev; } /* * Add a string of a given length to the pool. If it won't fit, * create a copy of the current pool and allocate space for a new one. * * No null-padding is implied, so if you want that you must include * the null in the length. */ char* UniqueStringPool::add(const char* str, unsigned len) { if (len > strpoolsize) { UniqueStringPool* s = new UniqueStringPool(len); strncpy(s->data, str, len); s->cur = len; s->prev = prev; prev = s; return s->data; } unsigned index = cur; unsigned newcur = index + len; if (newcur > size) { UniqueStringPool* s = new UniqueStringPool; char* newdata = s->data; s->data = data; s->size = size; s->cur = cur; s->prev = prev; data = newdata; prev = s; index = 0; newcur = len; } char* r = &data[index]; strncpy(r, str, len); cur = newcur; return r; } neuron-7.5/src/mac/000077500000000000000000000000001323325274500142305ustar00rootroot00000000000000neuron-7.5/src/mac/Makefile.am000077500000000000000000000025521323325274500162730ustar00rootroot00000000000000# This makefile copiessome .c and .h files into # the distribution tar file and installs the mac osx launch scripts S = modlunit.sh mknrndll.sh nrngui.sh neurondemo.sh idraw.sh mos2nrn.sh launch_scripts = macnrn.term $(S) EXTRA_DIST = maccmd.c njconf.h nrnneosm.h bbsconf.h macnrn.h nrnconf.h \ njvmstub.c nrncarbon.h \ $(launch_scripts) launch_inst.sh \ modlunit.info mknrndll.info nrngui.info neurondemo.info idraw.info mos2nrn.info \ modlunit.icns mknrndll.icns nrngui.icns neurondemo.icns idraw.icns mos2nrn.icns \ mkdmg.sh after-install.sh launch.c mac2uxarg.c host_cpu = @host_cpu@ if MAC_DARWIN carbon = @enable_carbon@ bin_SCRIPTS = $(launch_scripts) install: install-am if UniversalMacBinary $(CC) -arch ppc -o aoutppc -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon $(CC) -arch i386 -o aouti386 -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon lipo aouti386 aoutppc -create -output a.out else gcc -g -arch i386 -Dncpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon endif carbon=$(carbon) sh $(srcdir)/launch_inst.sh "$(host_cpu)" "$(DESTDIR)$(prefix)" "$(srcdir)" for i in $(S) ; do \ sed "s/^CPU.*/CPU=\"$(host_cpu)\"/" < $(DESTDIR)$(bindir)/$$i > temp; \ mv temp $(DESTDIR)$(bindir)/$$i; \ chmod 755 $(DESTDIR)$(bindir)/$$i; \ done endif neuron-7.5/src/mac/Makefile.in000066400000000000000000000505661323325274500163110ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This makefile copiessome .c and .h files into # the distribution tar file and installs the mac osx launch scripts VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mac ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = macdist.pkgproj postinstall.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/macdist.pkgproj.in \ $(srcdir)/postinstall.sh.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ S = modlunit.sh mknrndll.sh nrngui.sh neurondemo.sh idraw.sh mos2nrn.sh launch_scripts = macnrn.term $(S) EXTRA_DIST = maccmd.c njconf.h nrnneosm.h bbsconf.h macnrn.h nrnconf.h \ njvmstub.c nrncarbon.h \ $(launch_scripts) launch_inst.sh \ modlunit.info mknrndll.info nrngui.info neurondemo.info idraw.info mos2nrn.info \ modlunit.icns mknrndll.icns nrngui.icns neurondemo.icns idraw.icns mos2nrn.icns \ mkdmg.sh after-install.sh launch.c mac2uxarg.c @MAC_DARWIN_TRUE@carbon = @enable_carbon@ @MAC_DARWIN_TRUE@bin_SCRIPTS = $(launch_scripts) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mac/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mac/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): macdist.pkgproj: $(top_builddir)/config.status $(srcdir)/macdist.pkgproj.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ postinstall.sh: $(top_builddir)/config.status $(srcdir)/postinstall.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done @MAC_DARWIN_FALSE@install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-binSCRIPTS .PRECIOUS: Makefile @MAC_DARWIN_TRUE@install: install-am @MAC_DARWIN_TRUE@@UniversalMacBinary_TRUE@ $(CC) -arch ppc -o aoutppc -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon @MAC_DARWIN_TRUE@@UniversalMacBinary_TRUE@ $(CC) -arch i386 -o aouti386 -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon @MAC_DARWIN_TRUE@@UniversalMacBinary_TRUE@ lipo aouti386 aoutppc -create -output a.out @MAC_DARWIN_TRUE@@UniversalMacBinary_FALSE@ gcc -g -arch i386 -Dncpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon @MAC_DARWIN_TRUE@ carbon=$(carbon) sh $(srcdir)/launch_inst.sh "$(host_cpu)" "$(DESTDIR)$(prefix)" "$(srcdir)" @MAC_DARWIN_TRUE@ for i in $(S) ; do \ @MAC_DARWIN_TRUE@ sed "s/^CPU.*/CPU=\"$(host_cpu)\"/" < $(DESTDIR)$(bindir)/$$i > temp; \ @MAC_DARWIN_TRUE@ mv temp $(DESTDIR)$(bindir)/$$i; \ @MAC_DARWIN_TRUE@ chmod 755 $(DESTDIR)$(bindir)/$$i; \ @MAC_DARWIN_TRUE@ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mac/after-install.sh000077500000000000000000000061011323325274500173320ustar00rootroot00000000000000#!/bin/sh if test "$1" = "" ; then echo "afer-install needs a host_cpu argument" exit fi if test "$2" = "" ; then echo "after-install needs a installation directory argument" exit fi CPU=$1 prefix=$2 srcdir=$3 ivlibdir=$4 export CPU NSRC="$3" export NSRC NVER="`sh $srcdir/nrnversion.sh`" NDIR="NEURON-$NVER" export NDIR N="$prefix" IV=`echo "$prefix"|sed 's/nrn$/iv/'` # activate macnrn.term and the app bundles osascript -e 'tell application "Finder"'\ -e 'activate'\ -e 'make new Finder window'\ -e 'set target of Finder window 1 to folder "'$NDIR'" of folder "Applications" of startup disk'\ -e 'set target of Finder window 1 to folder "bin" of folder "'${CPU}'" of folder "nrn" of folder "'$NDIR'" of folder "Applications" of startup disk'\ -e 'end tell' #strip the dylibs cd ${N}/${CPU}/lib for i in *.dylib ; do if test ! -L $i ; then strip -x $i fi done #remove irrelevant executables cd ${N}/${CPU}/bin rm -f hoc_e ivoc mos2nrn nrnoc oc # and strip the others for i in memacs modlunit nocmodl nrniv ; do strip -x $i done if test "$carbon" = "yes" ; then strip -x nrniv.app/Contents/MacOS/nrniv fi # force rebuild of the neurondemo and clean it up DEMO="${N}/share/nrn/demo" rm -f -r ${DEMO}/neuron ${DEMO}/release/${CPU} ./neurondemo << here quit() here if cd ${N}/share/nrn/demo/release/${CPU} ; then rm -f *.o *.c *.lo *.mod cd .libs rm -f *.o for i in *.so ; do if test ! -L $i ; then strip -x $i fi done # make the -dll position independent cd ../../.. sed '/\-dll/s,\-dll "/App.*/share/nrn,-dll "${NRNHOME}/share/nrn,' neuron > ntmp mv ntmp neuron chmod 755 neuron fi # only after an iv installation if test -d "$ivlibdir" ; then cd "${ivlibdir}" for i in *.dylib ; do if test ! -L $i ; then strip -x $i fi done cd ../bin rm -f iclass idemo if test "$carbon" != "yes" ; then strip -x idraw fi fi vv=`sw_vers -productVersion|sed 's/.*\.\(.*\)\..*/\1/'` #if test $vv -gt 6 ; then if false ; then # change nrniv install_name for dylibs so nrniv,etc works at any location ff="$N/$CPU/bin/nrniv" f=`otool -L "$N/$CPU/bin/nrniv" | sed -n "s,.*$N/$CPU/lib/\(.*dylib\).*,\ -change $N/$CPU/lib/\1 @executable_path/../lib/\1,p"` install_name_tool $f "$ff" f=`otool -L $N/$CPU/bin/nrniv | sed -n "s,.*$IV/$CPU/lib/\(.*dylib\).*,\ -change $IV/$CPU/lib/\1 @executable_path/../../../iv/$CPU/lib/\1,p"` install_name_tool $f "$ff" #idraw ff="$IV/$CPU/bin/idraw" if test -f "$ff" ; then f=`otool -L $IV/$CPU/bin/idraw | sed -n "s,.*$IV/$CPU/lib/\(.*dylib\).*,\ -change $IV/$CPU/lib/\1 @executable_path/../lib/\1,p"` install_name_tool $f "$ff" fi #this one needs to be done from nrnivmodl, same as all the libnrnmech.so if false ; then ff="$N/share/nrn/demo/release/x86_64/.libs/libnrnmech.so" f=`otool -L $ff | sed -n "s,.*$N/$CPU/lib/\(.*dylib\).*,\ -change $N/$CPU/lib/\1 @executable_path/../lib/\1,p"` install_name_tool $f $ff fi # neurondemo for libnrnmech.so needs to follow the install location. f=/tmp/neuron$$ sed ' s,..NRNHOME./share/nrn/demo,@executable_path/../../share/nrn/demo, ' $N/share/nrn/demo/neuron > $f chmod 755 $f mv $f $N/share/nrn/demo/neuron fi neuron-7.5/src/mac/bbsconf.h000077500000000000000000000006551323325274500160260ustar00rootroot00000000000000#ifndef H_bbsconfig_included #define H_bbsconfig_included 1 /* following are relevant to src/parallel implmentation of ParallelContext */ /* Define if PVM available */ #undef HAVE_PVM3_H /* Set to 1 if the standard template library exists */ #undef HAVE_STL /* Set to 1 if SIGPOLL is a possible signal */ #undef HAVE_SIGPOLL /* Set to 1 if can use the new PVM functions */ #undef HAVE_PKMESG #endif /* H_config_included */ neuron-7.5/src/mac/idraw.icns000077500000000000000000000645241323325274500162320ustar00rootroot00000000000000icnsiTics#His32,¡þ„ÿ…þÿö¾º»»¸Îÿ„þÿÞGÿ„þÿÞ JÿþÿÿþÿÞ IÿÿÖÜÿ€þ ÿßNÿÿãæÿ€þÿùØÖâÿÿìðÿþ‚ÿ÷üþÿçóÿ€þÿÎð€ÿ¼ÝÿÿãøþþÿÿòÂØçèáèæáãäÿþÿõãëþüè©€ÿûöíöÿÿÛÓÿ€þúþÿÈãÿþÿÿ‡þÿÿŽþƒþÿÿ‰þÿÿÕèÿ‡þÿù´µÿƒþ ÿÿÖ’•Á¼»¸Îÿþÿõ­°× GÿþÿÑÑÿß Jÿþÿÿþþ€ÿÞ IÿÿÖÜÿ€þ ÿßNÿÿãæÿ€þÿùØÖâÿÿìðÿþ‚ÿ÷üþÿçóÿ€þÿÎð€ÿ¼ÝÿÿãøþþÿÿòÂØçèáèæáãäÿþÿõãëþüè©€ÿûöíöÿÿÛÓÿ€þúþÿÈãÿþÿÿ‡þÿÿŽþƒþÿÿ‰þÿÿÕèÿ‡þÿø­­÷ÿ…þÿÿÕšÕÿÿ…þÿõ­¬øƒÿ‚þÿÑÑ…ÿ þþÿÿþþÿÿþþƒÿþÿÖÜÿ‚þƒÿþÿãæÿ†þÿÿþÿìðÿþ ÿÿþþÿñøÿÿçóÿ€þÿÎð€ÿ¼ÝÿÿãøþþÿÿòÂØçèáèæáãäÿþÿõãëþüè©€ÿûöíöÿÿÛÓÿ€þúþÿÈãÿþÿÿ‡þÿÿŽþs8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#il32þêþÿ›þÿšþÿÿšþŠÿŽþÿÿ¹2†:2†ÿ‹þÿÿþÿ£ˆ^ÿŠþÿ€þÿ¥ˆbÿ‰þÿþÿ¥ˆbÿŽþÿ¥ˆbÿþÿÿˆþÿ¥ˆbÿ€þÿîÎü‡þÿ¥ˆbÿ€þÿºEñÿ†þÿ¥ˆbÿ€þÿï¹ÿ‡þÿ£ˆ_ÿþöÆÿ‡þÿ细½ºÖÿþöÃÿˆþŠÿþÿïÉÿ’þÿƒþÿáÔÿ’þüý‚þÿãÓÿ‡þÿÿ„þÿþE£ÿþÿÛÛÿ†þÿÄfùÿ‚þÿÿ«Õÿÿ€þÿÈðÿ†þÿÈmú‚ÿýçÍËÆÑì€ÿùÄÿ…þÿúÔÅÊÃÄÌ×íÕÂÏéûüåËÂÍÖ·æÿ„þ ÿñÉáüÿûôìÛ˜Ò€ÿþþÿÿüêáôÿ„þÿíÉöÿ€þÿÿõ)¼ÿ„þÿÿþÿÿþÿóc·ÿÿƒþýëøÿ†þÿlÿ€þÿøÚÿ…þÿÿ‡þÿ¶ ÿþ€ÿ’þýÿÿàþªþÿÿšþÿæÛÿ—þÿÿ²AÀÿ–þÿîjYßÿ•þÿÿ²Cœÿÿ•þÿíiZâˆÿ‹þÿÿ±C£¿7†:2†ÿ‰þÿíiXßÿ£ˆ^ÿˆþÿ²C›€ÿ¥ˆbÿ‡þÿ¸Vßÿÿþÿ¥ˆbÿ‡þÿóþÿ€þÿ¥ˆbÿþÿÿ‚þÿÿþÿ¥ˆbÿ€þÿîÎü‡þÿ¥ˆbÿ€þÿºEñÿ†þÿ¥ˆbÿ€þÿï¹ÿ‡þÿ£ˆ_ÿþöÆÿ‡þÿ细½ºÖÿþöÃÿˆþŠÿþÿïÉÿ’þÿƒþÿáÔÿ’þüý‚þÿãÓÿ‡þÿÿ„þÿþE£ÿþÿÛÛÿ†þÿÄfùÿ‚þÿÿ«Õÿÿ€þÿÈðÿ†þÿÈmú‚ÿýçÍËÆÑì€ÿùÄÿ…þÿúÔÅÊÃÄÌ×íÕÂÏéûüåËÂÍÖ·æÿ„þ ÿñÉáüÿûôìÛ˜Ò€ÿþþÿÿüêáôÿ„þÿíÉöÿ€þÿÿõ)¼ÿ„þÿÿþÿÿþÿóc·ÿÿƒþýëøÿ†þÿlÿ€þÿøÚÿ…þÿÿ‡þÿ¶ ÿþ€ÿ’þýÿÿàþªþÿÿšþÿæÛÿ—þÿÿ²AÀÿ–þÿîjYßÿ•þÿÿ±C›ÿÿ•þÿíiYßÿÿ”þÿÿ±C›ÿÿþ‡ÿŠþÿíiXß‹ÿ‰þÿ²C›ÿÿþþ‰ÿˆþÿ¸Vßÿÿ€þ‰ÿˆþÿóþÿ‚þ‰ÿ‚þÿÿ‚þÿÿƒþ‰ÿþÿîÎü‰þ‰ÿþÿºEñÿˆþ‰ÿþÿï¹ÿ‰þ‰ÿ‚þöÆÿšþöÃÿ™þÿïÉÿ’þÿƒþÿáÔÿ’þüý‚þÿãÓÿ‡þÿÿ„þÿþE£ÿþÿÛÛÿ†þÿÄfùÿ‚þÿÿ«Õÿÿ€þÿÈðÿ†þÿÈmú‚ÿýçÍËÆÑì€ÿùÄÿ…þÿúÔÅÊÃÄÌ×íÕÂÏéûüåËÂÍÖ·æÿ„þ ÿñÉáüÿûôìÛ˜Ò€ÿþþÿÿüêáôÿ„þÿíÉöÿ€þÿÿõ)¼ÿ„þÿÿþÿÿþÿóc·ÿÿƒþýëøÿ†þÿlÿ€þÿøÚÿ…þÿÿ‡þÿ¶ ÿþ€ÿ’þýÿÿàþl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#H  ih32yÿþÏþÿªþ€ÿ©þÿÿ©þ€ÿ©þÿÿªþ‘ÿ—þ€ÿ˨Œ¬¨Ôÿ•þÿþþÿZŽwÿ“þÿÿ€þÿ`Ž|ÿ’þÿÿþÿ`Ž|ÿþÿÿƒþÿ`Ž|ÿþÿ…þÿ`Ž|ÿ˜þÿ`Ž|ÿ˜þÿ`Ž|ÿ˜þÿ`Ž|ÿ„þ€ÿŽþÿ`Ž|ÿƒþÿË2ƒÿþÿ`Ž|ÿƒþÿ¼Btÿþÿ`Ž|ÿƒþÿþŸãÿþÿ`Ž|ÿ„þÿ©ñÿþÿYŽvÿ„þÿ¨ïÿþÿÄœŒ œÎÿ„þÿ¨ïÿŽþÿý„þÿ¨îÿ©þü¨øÿ¨þÿî§ÿ©þÿï§ÿþ€ÿ†þÿï§ÿŽþÿÿ‰þÿÙB‡ÿ…þÿì©ÿŽþüý‰þÿÉQÿ…þÿÈÉÿŒþÿà'_ÿˆþÿøÙêÿ…þÿ±ãÿŒþÿÞMÿ†þ ÿÿöàÀ·Ûûÿÿþÿø¤ÿŒþÿÿ÷Úßñ‚ÿþÿÿ÷Ô°¦´Ùà·£´ÛûÿÄÏÿ‹þÿì´¦¬«©¦¥­ÌÎõ弤¾å‚ÿ þß·¥©Êͪ˜ÿŠþÿÿͪßý€ÿòóéÅÄ®º×€ÿƒþÿÿüìÇÅéûÿ‰þÿû·ÉÿÿþÿûeoÿÿˆþÿˆþýÿÿûµÙÿ†þÿð ùÿŒþý€ÿ„þÿ´£·çÿˆþûÑÔýþÿ¸ƒáÿƒþÿW»ÿŠþÿÿŽþÿV¸ÿƒþÿÁ‘åÿþÿÁ”åÿ„þ€ÿŸþ€ÿÿþïþñþÿÿªþÿøàÿ§þÿÿØ4pÿ¦þÿþ ]çÿ¤þÿÿÕ>±ÿÿ¤þÿÿ‹ Yïÿ¤þÿÿØ:­ÿÿ¤þÿÿ cöŽÿ”þÿÿÙ9³Ó¬«‹¬¨Ôÿ’þÿþ^ëÿZŽwÿþÿÿÖ>²€ÿ`Ž|ÿþ ÿÿŒ Zïÿÿþÿ`Ž|ÿŽþÿ×<®ÿÿ€þÿ`Ž|ÿþÿÈ [íÿ‚þÿ`Ž|ÿþÿÙ®ÿÿƒþÿ`Ž|ÿŽþÿÿ…þÿ`Ž|ÿ˜þÿ`Ž|ÿ„þ€ÿŽþÿ`Ž|ÿƒþÿË2ƒÿþÿ`Ž|ÿƒþÿ¼Btÿþÿ`Ž|ÿƒþÿþŸãÿþÿ`Ž|ÿ„þÿ©ñÿþÿYŽvÿ„þÿ¨ïÿþÿÄœŒ œÎÿ„þÿ¨ïÿŽþÿý„þÿ¨îÿ©þü¨øÿ¨þÿî§ÿ©þÿï§ÿþ€ÿ†þÿï§ÿŽþÿÿ‰þÿÙB‡ÿ…þÿì©ÿŽþüý‰þÿÉQÿ…þÿÈÉÿŒþÿà'_ÿˆþÿøÙêÿ…þÿ±ãÿŒþÿÞMÿ†þ ÿÿöàÀ·Ûûÿÿþÿø¤ÿŒþÿÿ÷Úßñ‚ÿþÿÿ÷Ô°¦´Ùà·£´ÛûÿÄÏÿ‹þÿì´¦¬«©¦¥­ÌÎõ弤¾å‚ÿ þß·¥©Êͪ˜ÿŠþÿÿͪßý€ÿòóéÅÄ®º×€ÿƒþÿÿüìÇÅéûÿ‰þÿû·ÉÿÿþÿûeoÿÿˆþÿˆþýÿÿûµÙÿ†þÿð ùÿŒþý€ÿ„þÿ´£·çÿˆþûÑÔýþÿ¸ƒáÿƒþÿW»ÿŠþÿÿŽþÿV¸ÿƒþÿÁ‘åÿþÿÁ”åÿ„þ€ÿŸþ€ÿÿþïþñþÿÿªþÿøàÿ§þÿÿØ4pÿ¦þÿþ ]çÿ¤þÿÿÕ>±ÿÿ¤þÿÿ‹ Yïÿ¤þÿÿØ:­ÿÿ¤þÿÿ ]ìÿ¤þÿÿÙ9¯ÿÿ¤þÿþ^ë‘ÿ‘þÿÿÖ>²ÿÿþÿþ ÿÿŒ Zïÿÿþþÿþÿ×<®ÿÿþÿŽþÿÈ [íÿƒþÿŽþÿÙ®ÿÿ„þÿþÿÿ†þÿšþÿ…þ€ÿþÿ„þÿË2ƒÿŽþÿ„þÿ¼BtÿŽþÿ„þÿþŸãÿŽþÿ…þÿ©ñÿŽþÿ…þÿ¨ïÿ©þÿ¨ïÿ©þÿ¨îÿ©þü¨øÿ¨þÿî§ÿ©þÿï§ÿþ€ÿ†þÿï§ÿŽþÿÿ‰þÿÙB‡ÿ…þÿì©ÿŽþüý‰þÿÉQÿ…þÿÈÉÿŒþÿà'_ÿˆþÿøÙêÿ…þÿ±ãÿŒþÿÞMÿ†þ ÿÿöàÀ·Ûûÿÿþÿø¤ÿŒþÿÿ÷Úßñ‚ÿþÿÿ÷Ô°¦´Ùà·£´ÛûÿÄÏÿ‹þÿì´¦¬«©¦¥­ÌÎõ弤¾å‚ÿ þß·¥©Êͪ˜ÿŠþÿÿͪßý€ÿòóéÅÄ®º×€ÿƒþÿÿüìÇÅéûÿ‰þÿû·ÉÿÿþÿûeoÿÿˆþÿˆþýÿÿûµÙÿ†þÿð ùÿŒþý€ÿ„þÿ´£·çÿˆþûÑÔýþÿ¸ƒáÿƒþÿW»ÿŠþÿÿŽþÿV¸ÿƒþÿÁ‘åÿþÿÁ”åÿ„þ€ÿŸþ€ÿÿþïþh8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿit32ñÿþÿþÿþÿþÿþÿþÿþÿþÿþ£þÿûþÿÿùþ‚ÿ÷þ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿöþƒÿöþ‚ÿ‚þ®Àþƒÿƒþ®¿þ‚ÿ…þ®½þƒÿ†þ®¼þ‚ÿˆþ®ºþƒÿ‰þ®¹þ‚ÿ‹þ®·þƒÿŒþ®¶þ‚ÿŽþ®´þƒÿþ®³þ‚ÿ‘þ®±þƒÿ’þ®°þ‚ÿ”þ®¯þ‚ÿ•þ®¯þ€ÿ—þ®°þÿ˜þ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®–þ‚®þ®–þ‚®þ®–þÿ®þ®–þÿ®þ®–þÿ®þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þüþüþüþüþüþüþûþüþüþüþüþüþüþüþüþüþØþ‚œþØþ‚œþØþ‚›þÙþ‚›þÙþ‚›þ®þ‚Æþ®þ‚Åþ¯þ‚Åþ¯þ‚Åþ¯þ‚¤þ‚˜þØþ‚þ€•þÕþ€‰þ€‘þÓþ€þ€Žþ°þ†”þ€•þ€Šþ®þ€†þ…Šþ›þƒþ¬þ‘þƒþ€¡þƒ®þ™þÚþûþûþþ‚Õþžþ‚Ôþ þ‚Óþ¡þ‚Òþ¢þ‚ÑþöþÿÛþ‚”þ€ÿÜþ‚”þÿÜþ‚”þ‚Üþ‚”þ‚Üþ‚ÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþéþÿþÿþÿþÿþÿþÿþÿþÿþÿþ£þûþùþ‚÷þ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚‚þ®Àþƒƒþ®¿þ‚…þ®½þƒ†þ®¼þ‚ˆþ®ºþƒ‰þ®¹þ‚‹þ®·þƒŒþ®¶þ‚Žþ®´þƒþ®³þ‚‘þ®±þƒ’þ®°þ‚”þ®¯þ‚•þ®¯þ€—þ®°þ˜þ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®Ìþ®–þ‚®þ®–þ‚®þ®–þÿ®þ®–þÿ®þ®–þÿ®þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þ°þ®˜þüþüþüþüþüþüþûþüþüþüþüþüþüþüþüþüþØþ‚œþØþ‚œþØþ‚›þÙþ‚›þÙþ‚›þ®þ‚Æþ®þ‚Åþ¯þ‚Åþ¯þ‚Åþ¯þ‚¤þ‚˜þØþ‚þ€•þÕþ€‰þ€‘þÓþ€þ€Žþ°þ†”þ€•þ€Šþ®þ€†þ…Šþ›þƒþ¬þ‘þƒþ€¡þƒ®þ™þÚþûþûþþ‚Õþžþ‚Ôþ þ‚Óþ¡þ‚Òþ¢þ‚ÑþöþÿÛþ‚”þ€ÿÜþ‚”þÿÜþ‚”þ‚Üþ‚”þ‚Üþ‚ÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþéþÿþÿþÿþÿþÿþÿþÿþÿþÿþ£þûþùþ‚÷þ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚öþƒöþ‚‚þ®ÿÀþƒƒþ®ÿ¿þ‚…þ®ÿ½þƒ†þ®ÿ¼þ‚ˆþ®ÿºþƒ‰þ®ÿ¹þ‚‹þ®ÿ·þƒŒþ®ÿ¶þ‚Žþ®ÿ´þƒþ®ÿ³þ‚‘þ®ÿ±þƒ’þ®ÿ°þ‚”þ®ÿ¯þ‚•þ®ÿ¯þ€—þ®ÿ°þ˜þ®ÿÌþ®ÿÌþ®ÿÌþ®ÿÌþ®ÿÌþ®ÿÌþ®ÿÌþ®ÿÌþ®ÿ–þ‚®þ®ÿ–þ‚®þ®ÿ–þÿ®þ®ÿ–þÿ®þ®ÿ–þÿ®þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þ°þ®ÿ˜þüþüþüþüþüþüþûþüþüþüþüþüþüþüþüþüþØþ‚œþØþ‚œþØþ‚›þÙþ‚›þÙþ‚›þ®þ‚Æþ®þ‚Åþ¯þ‚Åþ¯þ‚Åþ¯þ‚¤þ‚˜þØþ‚þ€•þÕþ€‰þ€‘þÓþ€þ€Žþ°þ†”þ€•þ€Šþ®þ€†þ…Šþ›þƒþ¬þ‘þƒþ€¡þƒ®þ™þÚþûþûþþ‚Õþžþ‚Ôþ þ‚Óþ¡þ‚Òþ¢þ‚ÑþöþÿÛþ‚”þ€ÿÜþ‚”þÿÜþ‚”þ‚Üþ‚”þ‚Üþ‚ÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþéþt8mk@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿneuron-7.5/src/mac/idraw.info000077500000000000000000000016171323325274500162230ustar00rootroot00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions * CFBundleTypeOSTypes **** CFBundleTypeRole Viewer CFBundleIdentifier edu.yale.neuron.idraw CFBundleExecutable a.out CFBundleIconFile idraw CFBundleSignature IDRW CFBundlePackageType APPL LSPrefersCarbon neuron-7.5/src/mac/idraw.sh000077500000000000000000000002331323325274500156730ustar00rootroot00000000000000#!/bin/sh # Mac os x intermediate between applescript and idraw echo -e "\033]0;idraw\007" IDRAW="${NRNHOME}/../iv/${CPU}/bin/idraw" cd "${IDRAW}" "$@" neuron-7.5/src/mac/launch.c000077500000000000000000000033331323325274500156530ustar00rootroot00000000000000/* Generic launcher for starting from the macnrn.term file */ /* This replaces the osacompile -o nrngui.app prototype_applescript.txt since I cannot get it to work with 10.2 */ #include <../../nrnconf.h> #include #include #include #include extern char* mac_args(); FILE* f; #define FNAME ".nrn_as2sh" static char fname[1024]; static char* home; static char* instdir; static char* myname; static void mkfile(char* farg); int main(int argc, char** argv) { char* termcmd; char* cp; char cwd[1024]; char* farg; home = getenv("HOME"); instdir = (char*)malloc(strlen(argv[0])); strcpy(instdir, argv[0]); cp = strstr(instdir, ".app/Contents/MacOS/a.out"); *cp='\0'; for (myname=instdir+strlen(instdir)-1; *myname != '/'; --myname) { ; } *myname = '\0'; ++myname; getcwd(cwd, 1024); farg = mac_args(); mkfile(farg); termcmd = (char*)malloc(strlen(instdir) + 100); sprintf(termcmd, "/usr/bin/open \"%s/nrn/%s/bin/macnrn.term\"", instdir, ncpu); system(termcmd); return 0; } void mkfile(char* farg) { sprintf(fname, "%s/%s", home, FNAME); f = fopen(fname, "w"); fprintf(f, "#!/bin/sh\n"); fprintf(f, "NRNHOME=\"%s/nrn\"\n", instdir); fprintf(f, "NEURONHOME=\"${NRNHOME}/share/nrn\"\n"); fprintf(f, "CPU=%s\n", ncpu); fprintf(f, "NRNBIN=\"${NRNHOME}/%s/bin/\"\n", ncpu); fprintf(f, "PATH=\"${NRNHOME}/%s/bin:${PATH}\"\n", ncpu); fprintf(f, "export NRNHOME\n"); fprintf(f, "export NEURONHOME\n"); fprintf(f, "export NRNBIN\n"); fprintf(f, "export PATH\n"); fprintf(f, "export CPU\n"); #if carbon fprintf(f, "nrncarbon=yes\n"); fprintf(f, "export nrncarbon\n"); #endif fprintf(f, "cd \"${NRNHOME}/%s/bin\"\n", ncpu); fprintf(f, "./%s.sh%s\n", myname, farg); fclose(f); } neuron-7.5/src/mac/launch_inst.sh000077500000000000000000000023731323325274500171030ustar00rootroot00000000000000#!/bin/sh # this script creates the app bundles so the Finder will allow # drag and drop, double clicking of apps, and double clicking of # hoc files. if test "$1" = "" ; then echo "launch_inst needs 3 arguments" exit else cpu=$1 IDIR="$2/.." srcdir="$3" objdir=`pwd` fi bindir="$2/${cpu}/bin" # Note: .icns files are created by putting something on the screen, e.g # with neurondemo or with idraw, and using # /Applications/Utilities/Grab to "Capture/Selection" some area of the # screen and then copy into the clipboard. Then we paste into # /Developer/Applications/Utilities/"Icon Composer" and save here. # the following creates an app bundle. mkapp() { name=$1 contents=${IDIR}/${name}.app/Contents rm -f -r ${IDIR}/${name}.app mkdir ${IDIR}/${name}.app mkdir ${contents} mkdir ${contents}/Resources mkdir ${contents}/MacOS cp ${name}.icns ${contents}/Resources cp ${name}.info ${contents}/Info.plist cp ${objdir}/a.out ${contents}/MacOS } cd ${srcdir} if test "$carbon" = "yes" ; then rm -r -f $bindir/nrniv.app mkapp nrniv mv ${IDIR}/nrniv.app $bindir rm $bindir/nrniv.app/Contents/MacOS/a.out cp $bindir/nrniv $bindir/nrniv.app/Contents/MacOS else mkapp idraw fi mkapp nrngui mkapp mknrndll mkapp modlunit mkapp neurondemo mkapp mos2nrn neuron-7.5/src/mac/mac2uxarg.c000077500000000000000000000202571323325274500162760ustar00rootroot00000000000000/* char* mac_args() returns a unix style double quote encapsulated, space separated full pathname arg list. If the number is greater than 0 then the string begins with a space. */ #include #include #include #include extern char* mac_args(); /* test program */ #if 0 FILE* f; #define FNAME "temp" char fname[1024]; char* home; int main(int argc, char** argv) { int i; char* farg; farg = mac_args(); home = getenv("HOME"); sprintf(fname, "%s/%s", home, FNAME); f = fopen(fname, "w"); for (i=0; i < argc; ++i) { fprintf(f, "%s\n", argv[i]); } fprintf(f, "%s\n", farg); fclose(f); return 0; } #endif #define diag printf static char* farg; static void mac_open_doc(const char*); static void mac_open_app(); static void install_handlers(); static char* fullname(const FSSpec* file); char* mac_args() { farg = (char*)malloc(10); farg[0] = '\0'; install_handlers(); RunApplicationEventLoop(); return farg; } static void mac_open_doc(const char* s){ char* buf; buf = (char*)malloc(strlen(s) + strlen(farg) + 10); sprintf(buf, "%s \"%s\"", farg, s); free(farg); farg = buf; } static void mac_open_app() { QuitApplicationEventLoop(); } // all the following copied from session.c /****************************************************************/ /* Purpose..: Create a full path name for a FSSpec file */ /* Input....: FSSpec */ /* Returns..: String[255] Ptr */ /* Jijun 5/30/97 */ /****************************************************************/ static char* fullname(const FSSpec *file){ short refNum; CInfoPBRec myPB; char prePath[256]; static char fullPath[512]; OSErr err; Str255 dirName; char * s; fullPath[0]='\0'; myPB.dirInfo.ioVRefNum = file->vRefNum; myPB.dirInfo.ioDrParID = file->parID; myPB.dirInfo.ioFDirIndex= -1; myPB.dirInfo.ioNamePtr = dirName; do { myPB.dirInfo.ioDrDirID = myPB.dirInfo.ioDrParID; err = PBGetCatInfoSync(&myPB); //debugfile("\nerror after PBGetCatInfoSync: %ld", err); if (err) { return nil; } else { dirName[dirName[0]+1]='\0'; if (myPB.dirInfo.ioDrDirID > fsRtDirID) { strcpy(prePath, (char*)&dirName[1]); }else{ strcpy(prePath, ""); } strcat(prePath, "/"); strcat(prePath, fullPath); strcpy(fullPath, prePath); //debugfile("\nfullPath= %s", fullPath); //debugfile("\nmyPB.dirInfo.ioDrDirID= %ld", myPB.dirInfo.ioDrDirID); } } while (myPB.dirInfo.ioDrDirID > fsRtDirID); s=fullPath; return s; } #if TARGET_API_MAC_CARBON /* cw6 required unsigned long */ static pascal OSErr MyHandleQuit (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) { QuitApplicationEventLoop(); // RemoveConsole(); return noErr; } #endif /****************************************************************/ /* Purpose..: Handling Open Application AppleEvent */ /* Input....: theAppleEvent, reply, handleRefcon */ /* Returns..: OSErr */ /* Jijun 5/29/97 reference: Interapplication (4-15) */ /****************************************************************/ #if TARGET_API_MAC_CARBON /* cw6 required unsigned long */ static pascal OSErr MyHandleOApp (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) { #else static pascal OSErr MyHandleOApp (const AppleEvent *theAppleEvent, const AppleEvent *reply, long handlerRefcon) { #endif AEDescList docList; //debugfile("\nWe are in MyHandleOApp"); //debugfile("\ntheAppleEvent Descriptor type: %ld", theAppleEvent.descriptorType); //debugfile("\ntheAppleEvent Descriptor handle*: %ld", *(theAppleEvent.dataHandle)); //debugfile("\ntheAppleEvent Descriptor handle**: %ld", **(theAppleEvent.dataHandle)); //debugfile("\nreply Descriptor type: %ld", reply.descriptorType); //debugfile("\nhandlerRefcon: %ld", handlerRefcon); mac_open_app(); //OSErr myErr=AEGetParamDesc(&theAppleEvent, keyDirectObject, typeAEList, &docList); //debugfile("\nerror after AEGetParamDesc: %ld", myErr); return (0); } /****************************************************************/ /* Purpose..: Handling Open Documents AppleEvent */ /* Input....: theAppleEvent, reply, handleRefcon */ /* Returns..: OSErr */ /* Jijun 5/28/97 reference: Interapplication (4-15) */ /****************************************************************/ #if TARGET_API_MAC_CARBON static pascal OSErr MyHandleODoc (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) { #else static pascal OSErr MyHandleODoc (const AppleEvent *theAppleEvent, const AppleEvent *reply, long handlerRefcon) { #endif //void MyHandleODoc (AppleEvent &theAppleEvent, AppleEvent &reply, long handlerRefcon) { FSSpec myFSS; AEDescList docList; long itemInList; AEKeyword keywd; DescType returnedType; Size actualSize; OSErr ingoreErr; //debugfile("\n\nWe are in MyHandleODoc"); //debugfile("\ntheAppleEvent Descriptor type: %ld", theAppleEvent.descriptorType); //debugfile("\ntheAppleEvent Descriptor handle*: %ld", *(theAppleEvent.dataHandle)); //debugfile("\ntheAppleEvent Descriptor handle**: %ld", **(theAppleEvent.dataHandle)); //debugfile("\nreply Descriptor type: %ld", reply.descriptorType); //debugfile("\nhandlerRefcon: %ld", handlerRefcon); // get the direct parameter--a descriptor list-- and put it into docList OSErr myErr=AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, &docList); //debugfile("\nerror after AEGetParamDesc: %ld", myErr); if (myErr) { return myErr; } else { // check for missing required parameters //myErr = MyGotRequiredParams(theAppleEvent); if (myErr) { return myErr; } else { // count the number of descriptor records int the list myErr = AECountItems(&docList, &itemInList); //debugfile("\nerror after AECountItems: %ld", myErr); //debugfile("\nitemInList: %ld", itemInList); if (myErr) { return myErr; } else { // get each descriptor record from list, coerce the returned data to an FSSpec record, // and open the associated file long index; for (index=1; index<=itemInList; index++) { myErr = AEGetNthPtr(&docList, index, typeFSS, &keywd, &returnedType, &myFSS, sizeof(myFSS), &actualSize); //debugfile("\nerror after AEGetNthPtr: %ld", myErr); if (myErr) { return myErr; } else { char* s=fullname(&myFSS); myFSS.name[myFSS.name[0]+1]='\0'; strcat(s,(char*)&myFSS.name[1]); //debugfile("\nMyOpenFile is %s", s); mac_open_doc(s); //hoc_xopen1(s, 0); //myErr=FSpDelete(&myFSS); } // noerr for AEGetNthPtr } // for loop } // noerr for AECountItems } // noerr for MyGotRequiredParams ingoreErr=AEDisposeDesc(&docList); //debugfile("\nerror after AEDisposeDesc: %ld", ingoreErr); } // noerr for AEGetParamDesc QuitApplicationEventLoop(); return myErr; } static void install_handlers() { AEEventHandlerUPP myHandleODoc; // add by jijun 5/28/97 for handle open doc AEEventHandlerUPP myHandleOApp; // add by jijun 5/29/97 for handle open app AEEventHandlerUPP handler; OSErr error; long handleRefcon; #if TARGET_API_MAC_CARBON InitCursor(); #endif // add by jijun 5/28/97 for handle open doc //debugfile("\nWe will begin install AppleEvent handler"); AEGetEventHandler(kCoreEventClass, kAEOpenDocuments, &handler, &handleRefcon, FALSE); //debugfile("\nDoc handleRefcon:%ld", handleRefcon); AEGetEventHandler(kCoreEventClass, kAEOpenApplication, &handler, &handleRefcon, FALSE); //debugfile("\nApp handleRefcon:%ld", handleRefcon); #if TARGET_API_MAC_CARBON AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP(&MyHandleQuit), 0, FALSE); myHandleOApp=NewAEEventHandlerUPP(&MyHandleOApp); myHandleODoc=NewAEEventHandlerUPP(&MyHandleODoc); #else myHandleOApp=NewAEEventHandlerProc(MyHandleOApp); myHandleODoc=NewAEEventHandlerProc(MyHandleODoc); #endif error=AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, myHandleOApp, 0, FALSE); //debugfile("\nerror=%ld", error); if (!error) { //debugfile("\nNo error in install open application handler"); error=AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, myHandleODoc, 0, FALSE); //debugfile("\nerror=%ld", error); } } neuron-7.5/src/mac/maccmd.c000077500000000000000000000212201323325274500156200ustar00rootroot00000000000000#include #include #include static int opened; static char fin[1024]; short SIOUXHandleOneEvent(EventRecord *); static void mac_open_doc(const char*); static void mac_open_app(); static void install_handlers(); static char* fullname(const FSSpec* file); mac_cmdline(int* pargc, char*** pargv) { static char* argv[2]; opened = 0; install_handlers(); while(!opened) { SIOUXHandleOneEvent(nil); } *pargc = 2; *pargv = argv; argv[0] = "modlunit"; argv[1] = fin; } static void mac_open_doc(const char* s){ strncpy(fin, s, 1024); opened = 1; } static void mac_open_app() { #if TARGET_API_MAC_CARBON char* s; OSStatus err; NavReplyRecord reply; err = NavChooseFile(NULL, &reply, NULL, NULL, NULL, NULL, NULL, NULL); if (err == noErr && reply.validRecord) { AEKeyword key; DescType type; Size size; FSSpec fs; err = AEGetNthPtr(&(reply.selection), 1, typeFSS, &key, &type, &fs, sizeof(fs), &size); if (err == noErr) { s = fullname(&fs); fs.name[fs.name[0]+1]='\0'; strcat(s,(char*)&fs.name[1]); /*printf("fullname: %s\n", s);*/ strncpy(fin, s, 1024); opened = 1; } } if (err != noErr) { diag("Usage: Drag a .mod file onto the application icon.\n", "Or Open a file with a .mod suffix.\nDo a File/Quit and try again"); } #else char* s; struct StandardFileReply reply; StandardGetFile(0, -1, 0, &reply); if (reply.sfGood && !reply.sfIsFolder && !reply.sfIsVolume) { s = fullname(&reply.sfFile); reply.sfFile.name[reply.sfFile.name[0]+1]='\0'; strcat(s,(char*)&reply.sfFile.name[1]); /*printf("fullname: %s\n", s);*/ strncpy(fin, s, 1024); opened = 1; }else{ diag("Usage: Drag a .mod file onto the application icon.\n", "Or Open a file with a .mod suffix.\nDo a File/Quit and try again"); } #endif } // all the following copied from session.c /****************************************************************/ /* Purpose..: Create a full path name for a FSSpec file */ /* Input....: FSSpec */ /* Returns..: String[255] Ptr */ /* Jijun 5/30/97 */ /****************************************************************/ static char* fullname(const FSSpec *file){ short refNum; CInfoPBRec myPB; char prePath[256]; static char fullPath[512]; OSErr err; Str255 dirName; char * s; fullPath[0]='\0'; myPB.dirInfo.ioVRefNum = file->vRefNum; myPB.dirInfo.ioDrParID = file->parID; myPB.dirInfo.ioFDirIndex= -1; myPB.dirInfo.ioNamePtr = dirName; do { myPB.dirInfo.ioDrDirID = myPB.dirInfo.ioDrParID; err = PBGetCatInfoSync(&myPB); //debugfile("\nerror after PBGetCatInfoSync: %ld", err); if (err) { return nil; } else { dirName[dirName[0]+1]='\0'; strcpy(prePath, (char*)&dirName[1]); strcat(prePath, ":"); strcat(prePath, fullPath); strcpy(fullPath, prePath); //debugfile("\nfullPath= %s", fullPath); //debugfile("\nmyPB.dirInfo.ioDrDirID= %ld", myPB.dirInfo.ioDrDirID); } } while (myPB.dirInfo.ioDrDirID > fsRtDirID); s=fullPath; return s; } #if TARGET_API_MAC_CARBON /* cw6 required unsigned long */ static pascal OSErr MyHandleQuit (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) { QuitApplicationEventLoop(); RemoveConsole(); return noErr; } #endif /****************************************************************/ /* Purpose..: Handling Open Application AppleEvent */ /* Input....: theAppleEvent, reply, handleRefcon */ /* Returns..: OSErr */ /* Jijun 5/29/97 reference: Interapplication (4-15) */ /****************************************************************/ #if TARGET_API_MAC_CARBON /* cw6 required unsigned long */ static pascal OSErr MyHandleOApp (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) { #else static pascal OSErr MyHandleOApp (const AppleEvent *theAppleEvent, const AppleEvent *reply, long handlerRefcon) { #endif AEDescList docList; //debugfile("\nWe are in MyHandleOApp"); //debugfile("\ntheAppleEvent Descriptor type: %ld", theAppleEvent.descriptorType); //debugfile("\ntheAppleEvent Descriptor handle*: %ld", *(theAppleEvent.dataHandle)); //debugfile("\ntheAppleEvent Descriptor handle**: %ld", **(theAppleEvent.dataHandle)); //debugfile("\nreply Descriptor type: %ld", reply.descriptorType); //debugfile("\nhandlerRefcon: %ld", handlerRefcon); mac_open_app(); //OSErr myErr=AEGetParamDesc(&theAppleEvent, keyDirectObject, typeAEList, &docList); //debugfile("\nerror after AEGetParamDesc: %ld", myErr); return (0); } /****************************************************************/ /* Purpose..: Handling Open Documents AppleEvent */ /* Input....: theAppleEvent, reply, handleRefcon */ /* Returns..: OSErr */ /* Jijun 5/28/97 reference: Interapplication (4-15) */ /****************************************************************/ #if TARGET_API_MAC_CARBON static pascal OSErr MyHandleODoc (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) { #else static pascal OSErr MyHandleODoc (const AppleEvent *theAppleEvent, const AppleEvent *reply, long handlerRefcon) { #endif //void MyHandleODoc (AppleEvent &theAppleEvent, AppleEvent &reply, long handlerRefcon) { FSSpec myFSS; AEDescList docList; long itemInList; AEKeyword keywd; DescType returnedType; Size actualSize; OSErr ingoreErr; //debugfile("\n\nWe are in MyHandleODoc"); //debugfile("\ntheAppleEvent Descriptor type: %ld", theAppleEvent.descriptorType); //debugfile("\ntheAppleEvent Descriptor handle*: %ld", *(theAppleEvent.dataHandle)); //debugfile("\ntheAppleEvent Descriptor handle**: %ld", **(theAppleEvent.dataHandle)); //debugfile("\nreply Descriptor type: %ld", reply.descriptorType); //debugfile("\nhandlerRefcon: %ld", handlerRefcon); // get the direct parameter--a descriptor list-- and put it into docList OSErr myErr=AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, &docList); //debugfile("\nerror after AEGetParamDesc: %ld", myErr); if (myErr) { return myErr; } else { // check for missing required parameters //myErr = MyGotRequiredParams(theAppleEvent); if (myErr) { return myErr; } else { // count the number of descriptor records int the list myErr = AECountItems(&docList, &itemInList); //debugfile("\nerror after AECountItems: %ld", myErr); //debugfile("\nitemInList: %ld", itemInList); if (myErr) { return myErr; } else { // get each descriptor record from list, coerce the returned data to an FSSpec record, // and open the associated file long index; for (index=1; index<=itemInList; index++) { myErr = AEGetNthPtr(&docList, index, typeFSS, &keywd, &returnedType, &myFSS, sizeof(myFSS), &actualSize); //debugfile("\nerror after AEGetNthPtr: %ld", myErr); if (myErr) { return myErr; } else { char* s=fullname(&myFSS); myFSS.name[myFSS.name[0]+1]='\0'; strcat(s,(char*)&myFSS.name[1]); //debugfile("\nMyOpenFile is %s", s); mac_open_doc(s); //hoc_xopen1(s, 0); //myErr=FSpDelete(&myFSS); } // noerr for AEGetNthPtr } // for loop } // noerr for AECountItems } // noerr for MyGotRequiredParams ingoreErr=AEDisposeDesc(&docList); //debugfile("\nerror after AEDisposeDesc: %ld", ingoreErr); } // noerr for AEGetParamDesc return myErr; } static void install_handlers() { AEEventHandlerUPP myHandleODoc; // add by jijun 5/28/97 for handle open doc AEEventHandlerUPP myHandleOApp; // add by jijun 5/29/97 for handle open app AEEventHandlerUPP handler; OSErr error; long handleRefcon; #if TARGET_API_MAC_CARBON InitCursor(); #endif // add by jijun 5/28/97 for handle open doc //debugfile("\nWe will begin install AppleEvent handler"); AEGetEventHandler(kCoreEventClass, kAEOpenDocuments, &handler, &handleRefcon, FALSE); //debugfile("\nDoc handleRefcon:%ld", handleRefcon); AEGetEventHandler(kCoreEventClass, kAEOpenApplication, &handler, &handleRefcon, FALSE); //debugfile("\nApp handleRefcon:%ld", handleRefcon); #if TARGET_API_MAC_CARBON AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP(&MyHandleQuit), 0, FALSE); myHandleOApp=NewAEEventHandlerUPP(&MyHandleOApp); myHandleODoc=NewAEEventHandlerUPP(&MyHandleODoc); #else myHandleOApp=NewAEEventHandlerProc(MyHandleOApp); myHandleODoc=NewAEEventHandlerProc(MyHandleODoc); #endif error=AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, myHandleOApp, 0, FALSE); //debugfile("\nerror=%ld", error); if (!error) { //debugfile("\nNo error in install open application handler"); error=AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, myHandleODoc, 0, FALSE); //debugfile("\nerror=%ld", error); } } neuron-7.5/src/mac/macdist.pkgproj.in000077500000000000000000000407031323325274500176660ustar00rootroot00000000000000 PROJECT PACKAGE_FILES DEFAULT_INSTALL_LOCATION / HIERARCHY CHILDREN CHILDREN CHILDREN GID 80 PATH /Applications/NEURON-@PACKAGE_VERSION@ PATH_TYPE 0 PERMISSIONS 493 TYPE 3 UID 0 GID 80 PATH Applications PATH_TYPE 0 PERMISSIONS 509 TYPE 1 UID 0 CHILDREN CHILDREN GID 80 PATH Application Support PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Automator PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Documentation PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Extensions PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Filesystems PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Frameworks PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Input Methods PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Internet Plug-Ins PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH LaunchAgents PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH LaunchDaemons PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH PreferencePanes PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Preferences PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 80 PATH Printers PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH PrivilegedHelperTools PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH QuickLook PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH QuickTime PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Screen Savers PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Scripts PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Services PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN GID 0 PATH Widgets PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 GID 0 PATH Library PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 CHILDREN CHILDREN GID 0 PATH Shared PATH_TYPE 0 PERMISSIONS 1023 TYPE 1 UID 0 GID 80 PATH Users PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 GID 0 PATH / PATH_TYPE 0 PERMISSIONS 493 TYPE 1 UID 0 PAYLOAD_TYPE 0 VERSION 4 PACKAGE_SCRIPTS POSTINSTALL_PATH PATH @abs_top_builddir@/src/mac/postinstall.sh PATH_TYPE 0 RESOURCES PACKAGE_SETTINGS AUTHENTICATION 1 CONCLUSION_ACTION 0 IDENTIFIER edu.yale.neuron.pkg.NEURON-@PACKAGE_VERSION@ OVERWRITE_PERMISSIONS VERSION 7.4 PROJECT_COMMENTS NOTES PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7 IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250 ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjE0MDQuMTMiPgo8c3R5bGUg dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5 Pgo8L2JvZHk+CjwvaHRtbD4K PROJECT_SETTINGS BUILD_PATH PATH build PATH_TYPE 1 EXCLUDED_FILES PATTERNS_ARRAY REGULAR_EXPRESSION STRING .DS_Store TYPE 0 PROTECTED PROXY_NAME Remove .DS_Store files PROXY_TOOLTIP Remove ".DS_Store" files created by the Finder. STATE PATTERNS_ARRAY REGULAR_EXPRESSION STRING .pbdevelopment TYPE 0 PROTECTED PROXY_NAME Remove .pbdevelopment files PROXY_TOOLTIP Remove ".pbdevelopment" files created by ProjectBuilder or Xcode. STATE PATTERNS_ARRAY REGULAR_EXPRESSION STRING CVS TYPE 1 REGULAR_EXPRESSION STRING .cvsignore TYPE 0 REGULAR_EXPRESSION STRING .cvspass TYPE 0 REGULAR_EXPRESSION STRING .svn TYPE 1 REGULAR_EXPRESSION STRING .git TYPE 1 REGULAR_EXPRESSION STRING .gitignore TYPE 0 PROTECTED PROXY_NAME Remove SCM metadata PROXY_TOOLTIP Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems. STATE PATTERNS_ARRAY REGULAR_EXPRESSION STRING classes.nib TYPE 0 REGULAR_EXPRESSION STRING designable.db TYPE 0 REGULAR_EXPRESSION STRING info.nib TYPE 0 PROTECTED PROXY_NAME Optimize nib files PROXY_TOOLTIP Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles. STATE PATTERNS_ARRAY REGULAR_EXPRESSION STRING Resources Disabled TYPE 1 PROTECTED PROXY_NAME Remove Resources Disabled folders PROXY_TOOLTIP Remove "Resources Disabled" folders. STATE SEPARATOR NAME NEURON-@PACKAGE_VERSION@ TYPE 1 VERSION 2 neuron-7.5/src/mac/macnrn.h000077500000000000000000000007461323325274500156710ustar00rootroot00000000000000#pragma precompile_target "neuron_def.h" /*#define v mlhv*/ #define MSL_USE_PRECOMPILED_HEADERS 1 #define HAVE_LIMITS_H 1 #include #include #include #include #include #pragma once off /*#undef v*/ #define SYSV 1 #define MAC 1 #define motif_kit #define sgi_motif_kit #define default_kit SMFKit #define HOC 1 #define CABLE 1 #define OOP 1 #define OC_CLASSES "nrnclass.h" #define USECVODE 1 #define CVODE 1 #define USEMATRIX 1 neuron-7.5/src/mac/macnrn.term000077500000000000000000000052031323325274500164020ustar00rootroot00000000000000 WindowSettings AutoFocus YES Autowrap YES Backwrap YES Bell YES BlinkCursor NO CleanCommands rlogin;telnet;ssh;slogin Columns 80 CursorShape 0 CustomTitle Terminal DeleteKeySendsBackspace NO DisableAnsiColors NO DoubleBold YES DoubleColumnsForDoubleWide NO DoubleWideChars YES ExecutionString cd ; clear; cp .nrn_as2sh /tmp/nrn_as2sh$$; sh /tmp/nrn_as2sh$$;rm -f /tmp/nrn_as2sh$$ ; exit FontAntialiasing NO FontHeightSpacing 1 FontWidthSpacing 1 IsMiniaturized NO MacTermFunctionKeys NO Meta -1 NSFixedPitchFont Monaco NSFixedPitchFontSize 10 Rows 24 SaveLines 10000 ScrollRegionCompat NO ScrollRows 0 Scrollback YES Shell sh ShellExitAction 0 StrictEmulation NO StringEncoding 4 TerminalOpaqueness 1 TextColors 0.000 0.000 0.000 1.000 1.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 1.000 1.000 0.000 0.000 0.000 0.666 0.666 0.666 0.333 0.333 0.333 TitleBits 3 Translate YES UseCtrlVEscapes NO VisualBell NO WinLocULY 829 WinLocX 363 WinLocY 0 WindowCloseAction 1 IsMiniaturized NO neuron-7.5/src/mac/mkdmg.sh000077500000000000000000000003661323325274500156730ustar00rootroot00000000000000#!/bin/sh if test "$1" = "" ; then NVER=`$HOME/neuron/nrn/nrnversion.sh` NDIR=NEURON-$NVER else NDIR="$1" fi cd $HOME rm -r -f tmpdmg mkdir tmpdmg cp -R /Applications/$NDIR tmpdmg hdiutil create -srcfolder tmpdmg -volname $NDIR -ov $NDIR.dmg neuron-7.5/src/mac/mknrndll.icns000077500000000000000000001073231323325274500167400ustar00rootroot00000000000000icnsŽÓics#His32…ÿ#××ÿãÌÅÉßýÿöÑâÿÿïíµ´·êòëÕÇæþÝáÿdzÇÅÍÓÿüÅê€ÿï줭üýƒÿÀ÷€ÿÝרû„ÿæÖ€ÿÇô†ÿù·€ÿÃûÿÿìÂùÿ é©ÌÿÿÃ÷ë»·ãÿ ñ˜•»ÿÿÐÖ³Ôƒÿ ùƹòÿÿó¾ÿÿþƒÿÈìÿ ×ÉкÓÿÑÊÑÚ΃ÿÓ—¢¦éñØ·Ï…ÿ骲ÇÊî†ÿ˜‘äàáßÙî…ÿÐâØÍÏÏÅã€ÿ‰ÿ÷ƒÿ Ö×ÿãÌÅÉáéàüÕâ€ÿí´´·êòìÓ–æê»äÿÅÒô¿ÌÓ€ÿ ¿ÅŠÃÿÿïèÃüþý€ÿûõ»¤ß€ÿÝ×ÿòÈß×úÁ€ÿ<ÇóÿÎÕÜÞ®µ·ûå®ÛÿÿÃûÿÒνéöûøøÂš“ÿÿÃ÷êÁ¼ÌÞݰÍÿæ¦åÿÿÐÖ³Øâ¥ÿÊÍçÿí€ÿ ó¾ÿÿ÷úÿ½ÑîÿÄëÿ ×ÉлÔÿÓÉÐÚ΃ÿÓ—¢¦éñÙ·Ï…ÿ骲ÇÊî†ÿ˜‘äàáßÙî…ÿÐâØÍÏÏÅã€ÿ‰ÿ÷†ÿ ãÌÅÉáéàüÕâÿÿíÿñÀµêòìÓ–æê»äÿÇ³ÅÆ÷Ý€ÿ ¿ÅŠÃÿÿï줬‚ÿûõ»¤ß€ÿÝר€ÿòÈß×úÁ€ÿLÇôÿÏÕÜÞ®µ·ûå®ÛÿÿÃûÿÒνéöûøúÉ›—ÿÿÃ÷êÁ¼ÌÞݰÏ÷›—ÀÿÿÐÖ³Øâ¥ÿÊÍèûƹòÿÿó¾ÿÿ÷üÿ½ÑîÿÈìÿ ׯ´•»ÿÓÉÐÚ΃ÿÓ€vpÚóÙ·Ï…ÿ뜨ÈÊî†ÿ˜’æááßÙî…ÿÐâØÍÏÏÅã€ÿs8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#il32’Ãÿð¯é‚ÿåÊ»·ÃÛù„ÿØÛÿ÷„ÿ5wÿÿì¡~ˆ¢®­£™Ù‚ÿœž’¢€ÿ þõÿÿá»Ð­¹ïƒÿüÑ’²ê€ÿîøÏìÿ ©ÐÿÿóT‰ÿ•φÿÖwÍ…ÿ ³¸Û•ÕõzÖÃɷ·ÿõ€Í„ÿ ¨oˆø›gßÿÿ¶ä‰ÿú©ßƒÿ þøõÿžtÌôÿÿüŠÿç{ý…ÿÞ†ï$–Žÿ®«…ÿ‘ÑÿÔÇŽÿù ùƒÿóƒ“ÿžÅƒÿΡ“ÿË™ƒÿ­½“ÿä~ú‚ÿ¡Ñ…ÿøÖþ‡ÿì¬l±ëÿ˜ÓƒÿùÏŠõ‡ÿºã‰îÿ¤Ìÿýò ‰»ùˆÿ¹ÜˆÿÞÿ¶¯€ÿ¼}§ãˆÿñ]JcZ~ ÿÛ‹ÿΦ‚žÙŠÿüº²ªœëã‚ÿ|÷ÕŽ×ýŽÿ‰à„ÿ¯²ÿíÿâ„…ÿø{ôÿ‰Ñ†ÿÅÿÿ÷ÿÖÃÿ øìÿÿæøÿÿ·—ˆÿ ¥ó›Î©¹ÀÿÿÆ®¦ÒfÀÿ̓þ‰ÿž‹¤™š×¬ÿÿ俱ܲ꿂÷‹ÿ·†—°±Ÿ»Á‚ÿí‘•üÿ 蔈¨Ÿ¡ÿüìÆŽƒÏ‘ÿ w {x†€‰žÕ‘ÿ󵎀ÿ÷õû”ÿá1ØÏúÿýþûúïçõÿüÿð(—í–¤ˆš¦‰ˆ|~ÌÿôÄÿýæßÇßÚÒàÚÜÒÒóƒÿµÿÙØ‰ÿð¯é‚ÿåÊ»·ÃÛù€ÿŸîÿÿØÛÿ÷„ÿ5wÿÿì¡~ˆ¢®­£™áÇÈ€ÿŸ’¢„ÿá»Ð­¹ïƒÿüÓ†Qé€ÿëíÐì…ÿóT‰ÿ•Ï…ÿ½°|Íÿ×5¿ÿ ³¶ßÿÿîzÖÃɷ΄ÿ}Gÿö†À‚Xèÿ ¨o…üÿÖÿÿ¶ä…ÿ’ªÿÿÞ8 ¹¿ÿþøõÿ¡ÍÿüˆÿÙ{²ˆÿíüƒÿß‚ÿÔ­æÉ³§½üƒÿ‘чÿ ûöóøÿþíÿÿÎ¥TåƒÿóƒˆÿÑ•Œ´ÏÁ¦ÿœÈƒÿΡ…ÿ õáüÎ¥Æk¨ÿЛƒÿ­½ÿ»Kª£¦«öÓ±ÍàÒÅ©ÿñÐÕ¾oØ®ÿ¡ÑÿµkßþüÝÿÿøÿúÿ꾨z_†€ÿ˜Óƒÿ úÏŒíÓÿêýýúÿÀéŠóƒÿ¤Ìÿ ý󠉻ü¡Þÿ™ü˜sÿÀÕ†ýÖÿ¶¯€ÿ ¼}§åÿ»Éÿÿ™ù‹kÿõk¹üÿ Û‹ÿΦ‚žÙÿí…±€ÿ™øÛÀ‚ÿ¾¦„ÿ |÷ÕŽ×ýÿÿ« æ€ÿšøÖº‚ÿ‡à„ÿ¯²ÿíÿãï€ÿç*ÅÛºÿâ„…ÿø{ôˆÿ‡ï×Àÿ‰Ñ†ÿÅÿÿ÷ÿÖÃÿ ùîÿùÞùÿÿ·—ˆÿ ¥ó›Î©¹ÀÿÿƯ¦ÓgÀÿ̓þ‰ÿž‹¤™š×¬ÿÿ俱ܲ꿂÷‹ÿ·†—°±Ÿ»Á‚ÿí‘•üÿ 蔈¨Ÿ¡ÿüìÆŽƒÏ‘ÿ w {x†€‰žÕ‘ÿ󵎀ÿ÷õû”ÿá1ØÏúÿýþûúïçõÿüÿð(—í–¤ˆš¦‰ˆ|~ÌÿôÄÿýæßÇßÚÒàÚÜÒÒóƒÿµÿÙØ‘ÿåÊ»·ÃÛù€ÿŸîÿÿØÛÿ÷ˆÿ ì¡~ˆ¢®­£™áÇÈ€ÿŸ’¢€ÿþõ‚ÿ§¹ïƒÿüÓ†Qé€ÿëíÐìÿ ©Ðÿÿîž¾ÿ•Ï…ÿ½°|Íÿ×5¿ÿ ³¸Û•ÕõzÒÿÿ³Î„ÿ}Gÿö†À‚Xèÿ¨oˆø›g߉ÿ’ªÿÿÞ8 ¹¿ÿþøõÿžtÌô‹ÿÙ{²ˆÿíüƒÿÞ†ï$–ŠÿÔ­æÉ³§½üƒÿ‘ÑÿÔÇ„ÿ ûöóøÿþíÿÿÎ¥TåƒÿóƒˆÿÑ•Œ´ÏÁ¦ÿœÈƒÿΡ…ÿ õáüÎ¥Æk¨ÿЛƒÿ­½ÿ»Kª£¦«öÓ±ÍàÒÅ©ÿñÐÕ¾oØ®ÿ¡ÑÿµkßþüÝÿÿøÿúÿ꾨z_†€ÿ˜Óƒÿ úÏŒíÓÿêýýúÿÂéŠóƒÿ¤Ìÿ ý󠉻ü¡Þÿ™ü˜sÿ¹ÜˆÿÞÿ¶¯€ÿ¼}§åÿ»Éÿÿ™ù‹kÿÿñ]JcZ~ ÿ Û‹ÿΦ‚žÙÿí…±€ÿ ™øÛÀÿÿüº²ªœëã‚ÿ |÷ÕŽ×ýÿÿ« æ€ÿšøÖº‚ÿ‰à„ÿ¯²ÿíÿãï€ÿç*ÅÛºÿâ„…ÿø{ôˆÿ‡ï×Àÿ‰Ñ†ÿÅÿÅ©ÿ ùîÿùÞùÿÿ·—ˆÿ ¦ò4Áz:–™ÿÿƯ¦ÓgÀÿ̓þ‰ÿžŒleJè_pÿÿ俱ܲ꿂÷‹ÿ¶}oT£˜‚ÿí‘•üÿ ç—gŽd\ÿüìÆŽƒÏ‘ÿ w¢’€}…€‰žÕ‘ÿ󵎀ÿ÷õû”ÿá1ØÏúÿýþûúïçõÿüÿð(—í–¤ˆš¦‰ˆ|~ÌÿôÄÿýæßÇßÚÒàÚÜÒÒóƒÿl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#Hih32Éÿÿÿÿªÿþ÷ƒÿþ¤ÿת¤¹¼¿²¬Ú¤ÿçÃÁªÂŶ±éÉÿûŸÔÿàÀ¯§°ÆêƒÿÚÈ÷éíð”ÿnsÿü¶ˆ—¶ËËĬ’’Îÿ¾©’“‹‘ûÿåîÿýßž‹²Õ„ÿ è· éÿÿüÿðùêç‚ÿý‰ÿ ûñéšïÿÁu¶ð|ö…ÿ܃؄ÿäÛÿéÈÀûÙú†ÿ éoŒË£µšÿرçù†ÿòšï‚ÿú›Ä§‘·ÐÉi“¾¢”š—Ø€ÿ ùÕ¿õÒLïÿÿåüˆÿöù‚ÿ¥´Œ¹ÿÿÛ €”™‚‹Å„ÿÍIºŒÿ¿¦‚ÿýüýþ€ÿþýú€þýþƒÿÏŸÿ­ºÿ£õ–ÿ›ßÿ¼¹•ÿúþÿã–•ÿç—‘ÿë{é”ÿÛ£„ÿøºæ†ÿ ñ¸¶Þÿõíÿ÷æ‚ÿô‡ÿÚ¢ƒÿÏŽç†ÿØÜ–í¾ÿËj”¬§œÒœ¤°“•¥¢—¥‚ÿæ—€ÿìÍ´…͇ÿ䘢ÊâîóÓÈåÚÎêÑÖÛàËÛɫقÿù‰ÿóÕ…z²ôˆÿ¦G†e §¹þ’ÿ”âÔ‰µîŒÿ¼À–ÿÏ¢ÿÔŽÿ‰ð—ÿŒèŽÿ¦˜ÿÜ‹ÿÿøÿÆè€ÿ úïÿúèþÿì„ø™ÿ¹ŸçœÍ’¬³îÿÒ©«Àlô÷‡à›ÿ·‚¥š­ÂéÿïÍÈâÏ܆ÙÿÑŽˆ¾Ÿ²¨ó€ÿð­éŸÿ ùµgz˜}ÊÊ´’‹Ç¢ÿÝ è¾­¦«Ãå£ÿÇ0¦ý©ÿÅ¡¸¯·µÄ®«§“­Âùžÿ â¹ÿçί¿Ç¶Â¾®É¤ÿóéàñóññ¦ÿ·”ˆžœ–ö¦ÿýþû€üÿÿÿÿÿÿ‘ÿÿÿÿÿªÿþ÷ƒÿþ¤ÿת¤¹¼¿²¬Ú¤ÿçÃÁªÂź±éªÿÉ›ÿûŸÔÿàÀ¯§°ÆêÿÿÓ¾ÿÿÚÈ÷éíð”ÿnsÿü¶ˆ—¶ËËĬ’“É«€ÿÄ®‘“‹‘û“ÿýßž‹²Õ„ÿ ôtvîÿýÎ×óùêç‚ÿý‰ÿûïþ€ÿÂu¶ð|öƒÿ¼¨áƒßç/¼ÿäÛÿéÈÀûÙú†ÿ éo‡àÿÄ–ÿرçùƒÿF—ÿù|o‰Ä€ÿú›Ä§‘·ÐÉi“¾¢”š—Ø€ÿùÕ¿ðç§€ÿåüƒÿýãÿÿÉyˆóàÿ¥´Œ¹ÿÿÛ €”™‚‹Å„ÿŠã‹ÿ¾¿Á®Ñ÷€ÿýüýþ€ÿþýú€þýþƒÿÏŸ‡ÿ ýûþÿüäÿß´`Í–ÿ›ß†ÿ è–ÁÖ³Úÿÿü®¼•ÿúþÿ þÿõßëä£Ág•Ñ€ÿꘕÿç—ÿ‹T±°·åìµÜéߺÜÿÌ´g¾p¡’ÿÛ£€ÿþįÿüÂëÿþ‚ÿ þßÈ–wžpÃ÷íÿ÷æ‚ÿô‡ÿÚ¢ƒÿ ÏŽÚÁÿÏþÚì€ÿÕß—ïÃÿËj”¬§œÒœ¤°“•¥¢—¥‚ÿæ—€ÿ ìÍ´…Ðÿ«äÿŸùM€ÿë´‚×úÿôÓÈåÚÎêÑÖÛàËÛɫقÿù‰ÿóÕ…z²õø®Ûÿÿ¢úªÍÿÎ{Ü•ÿ ”âÔ‰µîÿÿP{€ÿ¨ÿÀÝÿ·¾–ÿÏ¢ÿÔ€ÿ ú°èÿÿòRÜÂÛÿ‰ð—ÿŒè†ÿüsìÀ߀ÿ¦˜ÿÜ‹ÿÿøÿÆè€ÿ ûîÿíâÿÿì„ø™ÿ¹ŸçœÍ’¬³îÿÒª«Ámô÷‡à›ÿ·‚¥š­ÂéÿïÍÈâÏ܆ÙÿÑŽˆ¾Ÿ²¨ó€ÿð­éŸÿ ùµgz˜}ÊÊ´’‹Ç¢ÿÝ è¾­¦«Ãå£ÿÇ0¦ý©ÿÅ¡¸¯·µÄ®«§“­Âùžÿ â¹ÿçί¿Ç¶Â¾®É¤ÿóéàñóññ¦ÿ·”ˆžœ–ö¦ÿýþû€üÿÿÿÿÿÿ‘ÿÿÿÿÿªÿþ÷ƒÿþ¤ÿת¤¹¼¿²¬Ú¤ÿçÃÁªÂź±éªÿÉ¢ÿàÀ¯§°ÆêÿÿÓ¾ÿÿÚÈ÷éíð—ÿ û¶ˆ—¶ËËĬ’“É«€ÿÄ®‘“‹‘ûÿåî€ÿ䊱Մÿ ôtvîÿýÎ×óùêç‚ÿý‰ÿ ûñéšïÿ» ûî{öƒÿ¼¨áƒßç/¼ÿäÛÿéÈÀûÙú†ÿ éoŒË£µ›ÿÿûèøƒÿF—ÿù|o‰Ä€ÿú›Ä§‘·ÐÉi“¾¢”š—Ø€ÿùÕ¿õÒLï‡ÿýãÿÿÉyˆóàÿ¥´Œ¹ÿÿÛ €”™‚‹Å„ÿÍIº‰ÿ¾¿Á®Ñ÷€ÿýüýþ€ÿþýú€þýþƒÿÏŸÿ­º„ÿ ýûþÿüäÿß´`Í–ÿ›ß†ÿ è–ÁÖ³Úÿÿü®¼•ÿúþÿ þÿõßëä£Ág•Ñ€ÿꘕÿç—ÿ‹T±°·åìµÜéߺÜÿÌ´g¾p¡’ÿÛ£€ÿþįÿüÂëÿþ‚ÿ þßÈ–wžpÃ÷íÿ÷æ‚ÿô‡ÿÚ¢ƒÿ ÏŽÚÁÿÏþÚì€ÿÜà—ðÅÿËj”¬§œÒœ¤°“•¥¢—¥‚ÿæ—€ÿ%ìÍ´…Ðÿ«äÿŸùMÿÿ䘢ÊâîóÓÈåÚÎêÑÖÛàËÛɫقÿù‰ÿóÕ…z²õø®Ûÿÿ¢úªÍÿÿ¦G†e §¹þ’ÿ ”âÔ‰µîÿÿP{€ÿ¨ÿÀÝÿ¼À–ÿÏ¢ÿÔ€ÿ ú°èÿÿòRÜÂÛÿ‰ð—ÿŒè†ÿüsìÀ߀ÿ¦˜ÿÜ‹ÿ©â€ÿ ûîÿíâÿÿì„ø™ÿ¹ Þ8Ñ<ŠpîÿÒª«Ámô÷‡à›ÿ¸€ƒF„·UðÿïÍÈâÏ܆ÙÿÒ”q¬.›Pô€ÿð­éŸÿ ù¸htPËË´’‹Ç¢ÿÝ è¾²¦«Ãå£ÿÇ0¦ý©ÿÅ¡¸¯·µÄ®«§“­Âùžÿ â¹ÿçί¿Ç¶Â¾®É¤ÿóéàñóññ¦ÿ·”ˆžœ–ö¦ÿýþû€üÿÿÿÿÿÿ‘ÿh8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿit32*3ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‡ÿüÕºÞÅŠÿüÔÖþæÿàŠšŒb«Ú±±Üª±ÛÇžÈЦ̤§ýæÿØŠþ÷»_€ˆ€_’wv“ermf‹‰®ýæÿãŽv~ª€a Ž˜Ž¡ˆ_R‚«ýæÿþâ¨ÇéÑáɱ·ÙÜÚØÞ×ßÖÀÕÝáÿÿÿÿÿÿÅÿõö”ÿþþ–ÿþýûÆÿ¬›Ýðøþ‰ÿûöïëæåÞØÜäçêïõúþÿöÜÏîýÿþþýÿýÿþýþºÿ»#v²õ†ÿöìä™x^=>3'/;?Rq˜¿ÞîøþŒÿÔx]£ÝóêäÚâÚìéÞäù¹ÿö*fùƒÿüðÞ¥c@!%Dfˆ–•”’{\@-"9k­ßðüŠÿЄƒ¡~¶si^]‰smiÔþ¹ÿu Âüþ€ÿ ýîË|0M½èø…ÿ þøçÁM+<{ÓòüˆÿÑ~¡ã|l¹~«Šf³Êû¹ÿÀiÁSËüÿþòÏw,1yËþŽÿøÔE7Œáûý†ÿݽïÿºz›Ì§Ä°nk•è²ÿüøƒÿûúÿÈPÓ÷àŠ0?›îþÿû‘ÿî…eŸÃÞú‘ÿ¥Úý³ÿå¬ó†ÿ È\§I'…ñþïáæÝ’ÿü÷ªB]ÂöÿþŒÿþý¤ÿÚ3ˆó…ÿ õhDÙÿÿøµn|¿”ÿûÄS=£ïþÿþèÖõŸÿþÿÖ/‰óƒÿ ñ•igÖüÿø¯yø–ÿÜv5ƒåý’ÿùõý‚ÿ÷úøZºùÿÿ€ùû˜ÿ ãïöìÿÿÖ/‰óÿ ðw¢ù¹_Ðøø´ae¹—ÿö9wâþÿó¼ŸÖù€ÿ ÷ªÅë͘¢ôÿûµÇ¼Ó‚ÿþ’ÿYo¼ŽïãúÖ/‰óÿÿów¯ÿÿù¸U¿ô϶͖˜ÿû¦B‚éÿ'û”OHGÙ÷åçÀANÈÃãþÿÚšPéûïêúáõáöìÝîÿðßèú‡ÿY>~z}NÑÿ×0‰óöŠ»ÿù¸]ÁøœÿýªI“õþÿ'ÚTÀù–ÝÐE6¹„¢Ü\kÃùÿŸ¸SŠHà’sõJ–LÄ`4gø|3OÖ‡ÿj­tœP¯ÿÿÖ0œ¬ƒÿù·KÀÿùÓ´Çìÿ'Ë^ÍþîûÏ„4‚êøýÛÎçýÿÛ!þO‰*ÝZÿ’,•,ÏKv€Ð‡ÿšî„˜‰pЀÿÞ.‰…ÿùÇ«Ÿÿ¬XŸõŒÿ êfœ¾gÛc>yð„ÿÜýNŠ9²c^ÿ¦˜œ-qWÖœyB·‡ÿüÿþýüúþ€ÿÞ50‚åÿõþ¦ÿâsSÀþŒÿ ¤ZLkíœg\‹ò„ÿáCýh¥ƒM>€öa“[ÍfVtø‚TC»ÿ÷]3ÏfÚ¬÷§ÿÊVtèŒÿ ûÖÌóÿòÉÕÞû„ÿ÷ÍþØèñÅÑÞíÌÿÑïë½êÿõÉÏüÿ¹¶ÿìXN×§ÿùœL¢ùÄÿ ð=Vüÿè{‹¨ÿãm_ÖÄÿ ¦Íÿÿ½[/O÷¨ÿªMŸþÂÿóC_ÿöÍmã¨ÿà‹”õÂÿ» Äÿö÷¨ÿþÞ™ÙþÁÿj?ý²ÿÖ]¨öÀÿñ%•³ÿóƒwäÀÿ¿Ú´ÿ©GÍþ¿ÿ‹0û´ÿÄ/²ù¾ÿüPdµÿç?›ò¾ÿÿúT€è¾ÿ༵ÿýieÕý½ÿÍÛ´ÿóÖmP›Íìü»ÿ¸ð”ÿôÜú™ÿ Þ¥šs@Š›•×ûºÿ¥ó’ÿû暄Ҙÿ ò¨”ߢCËï©–ä‚ÿõéùíý€ÿñößçýŠÿî÷™ÿ!õŽÿ ùãúÏ£–T™ô—ÿ ÒŒºÿ¤=Æÿæs¬çü€ÿ)Ò~È«åâöÿÁ´ ˜äãîýÿøâøíóèþàú±¹îùÞöúæçÿðãöøÞö‹ÿóŽÿ ò¸åŒ‘ao£¼ò—ÿ ¹’Øÿ¢?Æÿù‚Øü€ÿ)ºB|n±Š²ê˜sµ®Î™ëþ¾”°Ð²Ö͈p•ʇ§à“Ø Š¾³Ž½‹ÿ²ðÿ öÓ¤ zn¸Ìüü—ÿ ¸—Þÿ˜DÍÿÿ¹¯íÿ)¶zbL‡ao¾¨qÑ¿µxCÔý{mkÎ1£…·„Ž\“gTÆf{žjrif‘‹ÿ¾ê‹ÿ üô¡“£n•™ºøšÿ ÉÆÿ…GÏÿÿòðüÿ)ó›h’u‡³Ø«´†aÛýz˜Ám±°˜ÅÊ‹—zoМ°¬tk“™o®‹ÿÒ Í‡ÿ ùÏìòÐÇtvu–Êõšÿ ñı˜£ëqX×þÕðƒÿ)éãèÍѽÓà÷îÁÌæÃ¿òÿæ¿äÓ××ëÂáÝëÕÖ»ËîÛáå‹[Æê¹ã‹ÿ韆ÿ ïÀ{™¨ªŠ°}ˆÛñ˜ÿþíĈFh˜r‚G_·§s¹€ÖÕîüÿþÿлöŽÿú/s…ÿ ÍÇ\bZ†ydÒÂäšÿúÊe-cL6?fH@iuutxÃö¶ÿfCûÿ øËໞAwv¢Š£êœÿûÜœW":…¢ˆ'vžŸ¢ ŸŸž¢Ôù¶ÿ¡߀ÿ 훊‡Æz…z¹ÉèõŸÿ ùך ãÿºMÍþ¿ÿÔª€ÿ æS»‘‰š ¬ë÷£ÿ÷ñùøŒjàÀÿøAYüÿÿø‡°¼`åÇôû§ÿßg–ñÁÿš߀ÿÖk€¥ÿþ©ÿ·PÄýÁÿç$Œÿ²®ôªÿïVâÃÿz,ì€ÿý¬ÿÇW€øÃÿí-~¯ÿévZÍÅÿœÄ®ÿ¯J’÷ÅÿïMLü¬ÿÓ^bØÇÿÁŒ‰ÿüæñœÿìƒP³úÇÿ÷›À‡ÿö§iäˆÿúìø‚ÿøçíúƒÿú¢E‘óÉÿò_4Ô€ÿ ûÏ’¸ÿúÇoLJ†ÿüð„ÿ ò¶~—ãøøýñÆvƒºùÿþ·MyäËÿßFCèÿýÜ¢†½ûÉTÉ‹{æz«ý‚ÿ ÞÊÉŠšà½¯R_ ÷ÿÁWlÕþÌÿÓ;Já÷°r囃üÙ¦e}É–˜ÆsÆ‚ÿ ÚˆÙÁ¦{o×ã´‚‚—ñ€ÿÉYbÎûÎÿËEEÚØ\wiž‚x’ÄÝÛeÄ‚ÿî©|‰že|̾ºbs³úÿü¸RbÇúÏÿýÕPH·È›·”ŠÈz®ÿõÆwrñ‚ÿýìÖßæ×ßòèîÓÙïÿó¦HkÏøÒÿ×g8Šãì–tÙj¯Ùp®ÓæñóŽÿÛ|D|ÖûÔÿÛ6[ÀÔ{m’Úy¼³zò¿v‹ß‹ÿð«NHžæüÕÿþí½h8k²ÌçìmÅÌ`Çgȧ‹ùˆÿ÷µfBp¾ðÙÿüÛM=rÁé³g|­ÖXÆ¡yû†ÿñºu>`©ãùÛÿþòÒ W7Lt‹¾ñõ´i~σÿ úäÀS3T§ÚôßÿþôÇ?9U9B\~”‚•ÄÓÑÀ°ƒiA3Gq¥Õõâÿú½ŸèΘlT7)$#"'$(:Qr¤Åâñúäÿñ}2ëÿýõïéå×ËÄÂÇÉÔãéïöüåÿúÿçAþƒÿþüû€üýéÿï}’.Ó÷ÿëS ŸÜöÿ îdUðÈ¿Ä÷‹ÿøãñÿÿþÝÿ%ðv&·ôŸF‡ÐâãÕôÞÕî÷ØÓãÕ×Úݸ·š˜±áÙïéÞò×ÿ%ô“4ÀøþãrÔ‚–h“xu”Æe‰ˆfZhs”“cco‡nžå×ÿ%ø®PÛúÿÿìpÙ|¿‰sf€¬}Êvzx—€¨gŠ¡ŽŒqu_ƒ‡¯ü×ÿúÅZÞý€ÿó¤å®Ø–z–¯Í¯Ý‹±Á³Í ¶Å¯¥©¦·»ÏØÿüâÞþÿþõýöûòïôöùöüòñ÷ø÷úô÷úöôöõò÷øùÙÿüýŽÿþùÿ÷ÓËõÿýÓš¿¥«¦Ð›Æ³§æÉ—ò¥Þéÿú²e›jlit{ksdŸ•s¦xqª÷èÿúÀ—¹j{Švqrlr¨¤nur¶øéÿþüý÷÷ÿýüõùöõýúôúúõûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ”ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‡ÿüÕºÞÅŠÿüÔÖþæÿàŠšŒb«Ú±±Üª±ÛÇžÈЦ̤§ýæÿØŠþ÷»_€ˆ€_’wv“ermf‹‰®ýæÿãŽv~ª€a Ž˜Ž¡ˆ_R‚«ýæÿþâ¨ÇéÑáɱ·ÙÜÚØÞ×ßÖÀÕÝáÿÿôÿöÈÑþùÿÅo§Ïÿõö”ÿþþŒÿõ’~áƒÿþýûÆÿ¬›Ýðøþ‰ÿûöïëæåÞØÜäçêïõúþ„ÿýÉv©„ÿöÜÏîýÿþþýÿýÿþýþºÿ»#v²õ†ÿöìä™x^=>3'/;?Rq˜¿Þîøþÿ㇜ö„ÿÔx]£ÝóêäÚâÚìéÞäù¹ÿö*fùƒÿüðÞ¥c@!%Dfˆ–•”’{\@-"9k­ßðüÿü¦yÍ…ÿЄƒ¡~¶si^]‰smiÔþ¹ÿu Âüþ€ÿ ýîË|0M½èø…ÿþøçÁM+<{ÓòØvšþ…ÿÑ~¡ã|l¹~«Šf³Êû¹ÿÀiÁSËüÿþòÏw,1yËþŽÿøÔE8‡„{Õ†ÿݽïÿºz›Ì§Ä°nk•èºÿûúÿÈPÓ÷àŠ0?›îþÿû‘ÿîˆ0tàú†ÿýöû…ÿ¥Úý¿ÿ È\§I'…ñþïáæÝ’ÿãx75_Âö‚ÿüóêÔ¥Ùû„ÿþŒÿþý°ÿ õhDÙÿÿøµn|¿’ÿ´t¼ÈS=£ïþ€ÿç˜N!%¼ú“ÿþèÖõŸÿþ‹ÿ ñ•igÖüÿø¯yøÿûíæˆ—øÿÜv5ƒåýÿÿë|zèŠÿùõý‚ÿ÷úøZºùÿÿ€ùû˜ÿãïöì‡ÿ ðw¢ù¹_Ðøø´ae¹ÿã~Nr΀ÿ ö9wâþûá’@$¼û‰ÿó¼ŸÖù€ÿ ÷ªÅë͘¢ôÿûµÇ¼Ó‚ÿþ’ÿYo¼Žïäúƒÿów¯ÿÿù¸U¿ô϶͖ÿÖE=¸ù€ÿ û¦BƒãÊ_Q¤‹Ðûˆÿ'û”OHGÙ÷åçÀANÈÃãþÿÚšPéûïêúáõáöìÝîÿðßèú‡ÿY>~z}NÒ‚ÿõŠ»ÿù¸]Áø’ÿ×F(Žíÿ ý«FOA'Rah¡Üû‡ÿ'ÚTÀù–ÝÐE6¹„¢Ü\kÃùÿŸ¸SŠHà’sõJ–LÄ`4gø|3OÖ‡ÿj­tœP¯‚ÿœ¬ƒÿù·KÀ’ÿ×K7Çüƒÿ ôˆGºïÕ•W·ö‡ÿ'Ë^ÍþîûÏ„4‚êøýÛÎçýÿÛ!þO‰*ÝZÿ’,•,ÏKv€Ð‡ÿšî„˜‰pЀÿýÜi™…ÿùÇ«’ÿå°áƒÿ øÞŽ[XU£õýñ£Èö‡ÿ êfœ¾gÛc>yð„ÿÜýNŠ9²c^ÿ¦˜œ-qWÖœyB·‡ÿüÿþýüúþ€ÿØVÏþÿþ„ÿ øÊt,nÌxSÀþÿÿúþˆÿ ¤ZLkíœg\‹ò„ÿáCýh¥ƒM>€öa“[ÍfVtø‚TC»ÿ÷^-â¥ÿõLj„¢ôÊVtèÿÿØíþ‡ÿ ûÖÌóÿòÉÕÞû„ÿ÷ÍþØèñÅÑÞíÌÿÑïë½êÿõÉÏüÿ¹¶¤ÿþï·z§ó·§ðùœL¢ùû“ÎûÀÿð=Vü¤ÿóªf¢óÿ¾Ðþãm`ÖÛyÑþÀÿ¦Í¥ÿ癦óÿÿ쥜Üö¨Kž¬îÀÿóC_¦ÿûúýÿ癇¹­N9œêÁÿ» Øÿûíçùüìæöÿûìëùƒÿê­zxW4ÊþÁÿj?ý˜ÿꟓßÍŽ~³õþýû礼߅ÿüüÔ\©öÀÿñ%•™ÿØ^wÌaVXNÒðÇÃê’]‡ÿó„wäÀÿ¿Ú™ÿÙj›¼Réè­ÓÅO>¿¬oÈÿ©GÍþ¿ÿ‹0û™ÿÙi•³TõõÝâ¶xP¨ªnÈÿÄ/²ù¾ÿüPdŠÿýñýÿþøôäÙÙðÿÿÙi˜Çb·¬v½’VUªªnÈÿç?›ò€ÿüþ¹ÿÿ üÖ˜ØñèáÕ˸°€gzÏÿÿØf“ñªQY¡ï§lw¼§kÈÿúUè€ÿÔØòþ·ÿ༇ÿ"þóÊU a£”„feiuvŽÏöÿÿÜmóøÞßüÿ÷ÝßìškÈ€ÿþðã€â ããä]^ÆääãkVœÑö¶ÿÍÛ‡ÿ ùÀQhŸ¯Ü÷ýƒÿð²šÞ…ÿç€ÿö¸ƒƒ‚‚ƒyq7*hsx‚;SÔþµÿ¸ð‡ÿúËœ‚NfõƒÿôÜú€ÿþŒÿþÿÿùѱµ³³–_je2€zW”P0\˜ãþµÿ¥óŠÿòËÁôÿû暄Ҙÿòªšâ¢EËò®šŒ¥Öùÿþõéùíý€ÿñößçýŠÿî÷™ÿ!õÿýùãúÏ£–T™ôÿõÝü“ÿ ÒŒºÿ¤=Æÿçsãü€ÿ)Ò~È«åâöÿÁ´ ˜äãîýÿøâøíóèþàú±¹îùÞöúæçÿðãöøÞö‹ÿóŽÿò¸åŒ‘ao£¼òûÿÿòÌä€ÿúêõˆÿ ¹’Øÿ¢?Æÿù…Ùü€ÿ)ºB|n±Š²ê˜sµ®Î™ëþ¾”°Ð²Ö͈p•ʇ§à“Ø Š¾³Ž½‹ÿ²ðÿ öÓ¤ zn¸Ìüí©}È€ÿÙv¿ÿÿþÜȈÿ ¸–Þÿ˜DÍÿÿ¹¯íÿ)¶zbL‡ao¾¨qÑ¿µxCÔý{mkÎ1£…·„Ž\“gTÆf{žjrif‘‹ÿ¾ê‹ÿüô¡“£n•™ºøÿô±h¼ÿ ÏT·ÿÿô¡„ï‡ÿ Ë‘Åÿ…GÏÿÿòðüÿ)ó›h’u‡³Ø«´†aÛýz˜Ám±°˜ÅÊ‹—zoМ°¬tk“™o®‹ÿÒ Í‡ÿ ùÏìòÐÇtvu–Êõ€ÿÔi÷ÿ ÐX·ÿÿØNAÁþ†ÿ í¡éqW×ýÒêþ‚ÿ)éãèÍѽÓà÷îÁÌæÃ¿òÿæ¿äÓ××ëÂáÝëÕÖ»ËîÛáå‹[Æê¹ã‹ÿ韆ÿ ïÀ{™¨ªŠ°}ˆÛñ€ÿíˆá‚ÿ ÐX·ÿùÀ@D¬ù‡ÿ Ò‘“Ig·¯’Üþ’ÿþÿлöŽÿú/s…ÿ ÍÇ\bZ†ydÒÂäÿì–Žàƒÿ ÐX·ÿùÞ¢R“Üú‡ÿùΔ?c†‘»ñ¼ÿfCûÿøËໞAwv¢Š£êÿÿþööóeÞ„ÿÐX·€ÿÞ{À‹ÿÒI‘¼àú½ÿ¡߀ÿ 훊‡Æz…z¹Éèõ€ÿù× Fµ…ÿÐX·€ÿÝv¿‹ÿºNÍþ¿ÿÔª€ÿ æS»‘‰š ¬ë÷‚ÿñz6wù…ÿÐX·€ÿÝx¿ŠÿøŒjàÀÿøAYüÿÿø‡°¼`åÇôûƒÿéG yù…ÿÐX·€ÿÞy¿Šÿßg–ñÁÿš߀ÿÖk€¥ÿþ„ÿþÛ'&Yù…ÿÐYº€ÿÝv¿Šÿ·PÄýÁÿç$Œÿ²®ô†ÿüÑr¦Öö„ÿ ü߉;ÎÿÿÝv¿‰ÿïVâÃÿz,ì€ÿýˆÿýêã‡ÿ ûÃ5 2¢ÿÿÞy¿‰ÿÇW€øÃÿí-~šÿ âlHãÿÿÝw¿ˆÿévZÍÅÿœÄ™ÿ úº;™ýÿÿÛq½ˆÿ¯J’÷ÅÿïMLü™ÿè¬Ý€ÿàˆÌ‡ÿÓ^bØÇÿÁŒ‰ÿüæñŠÿüóú€ÿøäó†ÿìƒP³úÇÿ÷›À‡ÿö§iäˆÿúìø‚ÿøçíúƒÿú¢E‘óÉÿò_4Ô€ÿ ûÏ’¸ÿúÇoLJ†ÿüð„ÿ ò¶~—ãøøýñÆvƒºùÿþ·MyäËÿßFCèÿýÜ¢†½ûÉTÉ‹{æz«ý‚ÿ ÞÊÉŠšà½¯R_ ÷ÿÁWlÕþÌÿÓ;Já÷°r囃üÙ¦e}É–˜ÆsÆ‚ÿ ÚˆÙÁ¦{o×ã´‚‚—ñ€ÿÉYbÎûÎÿËEEÚØ\wiž‚x’ÄÝÛeÄ‚ÿî©|‰že|̾ºbs³úÿü¸RbÇúÏÿýÕPH·È›·”ŠÈz®ÿõÆwrñ‚ÿýìÖßæ×ßòèîÓÙïÿó¦HkÏøÒÿ×g8Šãì–tÙj¯Ùp®ÓæñóŽÿÛ|D|ÖûÔÿÛ6[ÀÔ{m’Úy¼³zò¿v‹ß‹ÿð«NHžæüÕÿþí½h8k²ÌçìmÅÌ`Çgȧ‹ùˆÿ÷µfBp¾ðÙÿüÛM=rÁé³g|­ÖXÆ¡yû†ÿñºu>`©ãùÛÿþòÒ W7Lt‹¾ñõ´i~σÿ úäÀS3T§ÚôßÿþôÇ?9U9B\~”‚•ÄÓÑÀ°ƒiA3Gq¥Õõâÿú½ŸèΘlT7)$#"'$(:Qr¤Åâñúäÿñ}2ëÿýõïéå×ËÄÂÇÉÔãéïöüåÿúÿçAþƒÿþüû€üýéÿï}’.Ó÷ÿëS ŸÜöÿ îdUðÈ¿Ä÷‹ÿøãñÿÿþÝÿ%ðv&·ôŸF‡ÐâãÕôÞÕî÷ØÓãÕ×Úݸ·š˜±áÙïéÞò×ÿ%ô“4ÀøþãrÔ‚–h“xu”Æe‰ˆfZhs”“cco‡nžå×ÿ%ø®PÛúÿÿìpÙ|¿‰sf€¬}Êvzx—€¨gŠ¡ŽŒqu_ƒ‡¯ü×ÿúÅZÞý€ÿó¤å®Ø–z–¯Í¯Ý‹±Á³Í ¶Å¯¥©¦·»ÏØÿüâÞþÿþõýöûòïôöùöüòñ÷ø÷úô÷úöôöõò÷øùÙÿüýŽÿþùÿ÷ÓËõÿýÓš¿¥«¦Ð›Æ³§æÉ—ò¥Þéÿú²e›jlit{ksdŸ•s¦xqª÷èÿúÀ—¹j{Švqrlr¨¤nur¶øéÿþüý÷÷ÿýüõùöõýúôúúõûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ”ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‡ÿüÕºÞÅŠÿüÔÖþæÿàŠšŒb«Ú±±Üª±ÛÇžÈЦ̤§ýæÿØŠþ÷»_€ˆ€_’wv“ermf‹‰®ýæÿãŽv~ª€a Ž˜Ž¡ˆ_R‚«ýæÿþâ¨ÇéÑáɱ·ÙÜÚØÞ×ßÖÀÕÝáÿÿôÿöÈÑþùÿÅo§èÿþþŒÿõ’~áƒÿþýûØÿûöïëæåÞØÜäçêïõúþ„ÿýÉv©„ÿöÜÏîýÿþþýÿýÿþýþÉÿöìä™x^=>3'/;?Rq˜¿Þîøþÿ㇜ö„ÿÔx]£ÝóêäÚâÚìéÞäùÅÿüðÞ¥c@!%Dfˆ–•”’{\@-"9k­ßðüÿü¦yÍ…ÿЄƒ¡~¶si^]‰smiÔþÂÿ ýîË|0M½èø…ÿþøçÁM+<{ÓòØvšþ…ÿÑ~¡ã|l¹~«Šf³ÊûÀÿþòÏw,1yËþŽÿøÔE8‡„{Õ†ÿݽïÿºz›Ì§Ä°nk•è²ÿüø‰ÿ üߊ0?›îþÿû‘ÿîˆ0tàú†ÿýöû…ÿ¥Úý³ÿå¬ó‡ÿ ö×I&…ñþïáæÝ’ÿãx75_Âö‚ÿüóêÔ¥Ùû„ÿþŒÿþý¤ÿÚ3ˆó…ÿ õ¬¯€Ôÿÿøµn|¿’ÿ´t¼ÈS=£ïþ€ÿç˜N!%¼ú“ÿþèÖõŸÿþÿÖ/‰óƒÿñ•"«ÿø¯yøÿûíæˆ—øÿÜv5ƒåýÿÿë|zèŠÿùõý‚ÿ÷úøZºùÿÿ€ùû˜ÿ ãïöìÿÿÖ/‰óÿðw£‚ÿø´ae¹ÿã~Nr΀ÿ ö9wâþûá’@$¼û‰ÿó¼ŸÖù€ÿ ÷ªÅë͘¢ôÿûµÇ¼Ó‚ÿþ’ÿYo¼ŽïãúÖ/‰óÿÿów¯ƒÿú϶͖ÿÖE=¸ù€ÿ û¦BƒãÊ_Q¤‹Ðûˆÿ'û”OHGÙ÷åçÀANÈÃãþÿÚšPéûïêúáõáöìÝîÿðßèú‡ÿY>~z}NÑÿ×0‰óöŠ»›ÿ×F(Žíÿ ý«FOA'Rah¡Üû‡ÿ'ÚTÀù–ÝÐE6¹„¢Ü\kÃùÿŸ¸SŠHà’sõJ–LÄ`4gø|3OÖ‡ÿj­tœP¯ÿÿÖ0œ¬œÿ×K7Çüƒÿ ôˆGºïÕ•W·ö‡ÿ'Ë^ÍþîûÏ„4‚êøýÛÎçýÿÛ!þO‰*ÝZÿ’,•,ÏKv€Ð‡ÿšî„˜‰pЀÿÞ.‰ÿå°áƒÿ øÞŽ[XU£õýñ£Èö‡ÿ êfœ¾gÛc>yð„ÿÜýNŠ9²c^ÿ¦˜œ-qWÖœyB·‡ÿüÿþýüúþ€ÿÞ50‚åÿõþ™ÿþ„ÿ øÊt,nÌxSÀþÿÿúþˆÿ ¤ZLkíœg\‹ò„ÿáCýh¥ƒM>€öa“[ÍfVtø‚TC»ÿ÷]3ÏfÚ¬÷ ÿõLj„¢ôÊVtèÿÿØíþ‡ÿ ûÖÌóÿòÉÕÞû„ÿ÷ÍþØèñÅÑÞíÌÿÑïë½êÿõÉÏüÿ¹¶ÿìXNמÿþï·z§ó·§ðùœL¢ùû“ÎûÀÿ ð=Vüÿè{‹žÿóªf¢óÿ¾Ðþãm`ÖÛyÑþÀÿ ¦Íÿÿ½[/O÷ÿ癦óÿÿ쥜Üö¨Kž¬îÀÿóC_ÿöÍmãÿûúýÿ癇¹­N9œêÁÿ» Äÿö÷ÿûíçùüìæöÿûìëùƒÿê­zxW4ÊþÁÿj?ý˜ÿꟓßÍŽ~³õþýû礼߅ÿüüÔ\©öÀÿñ%•™ÿØ^wÌaVXNÒðÇÃê’]‡ÿó„wäÀÿ¿Ú™ÿÙj›¼Réè­ÓÅO>¿¬oÈÿ©GÍþ¿ÿ‹0û™ÿÙi•³TõõÝâ¶xP¨ªnÈÿÄ/²ù¾ÿüPdŠÿýñýÿþøôäÙÙðÿÿÙi˜Çb·¬v½’VUªªnÈÿç?›ò€ÿüþ¹ÿÿ üÖ˜ØñèáÕ˸°€gzÏÿÿØf“ñªQY¡ï§lw¼§kÈÿúUè€ÿÔØòþ·ÿ༇ÿ"þóÊU a£”„feiuvŽÏöÿÿÜmóøÞßüÿ÷ÝßìškÈ€ÿþðã€â ããä]^ÆääãkVœÑö¶ÿÍÛ‡ÿ ùÀQhŸ¯Ü÷ýƒÿð²šÞ…ÿç€ÿö¸ƒƒ‚‚ƒyq7*hsx‚;SÔþµÿ¸ð‡ÿúËœ‚NfõƒÿôÜú€ÿþŒÿþÿÿùѱµ³³–_je2€zW”P0\˜ãþµÿ¥óŠÿòËÁôÿû暄Ҙÿòªšâ¢EËò®šŒ¥Öùÿþõéùíý€ÿñößçýŠÿî÷™ÿ!õÿýùãúÏ£–T™ôÿõÝü“ÿ ÒŒºÿ¤=Æÿçsãü€ÿ)Ò~È«åâöÿÁ´ ˜äãîýÿøâøíóèþàú±¹îùÞöúæçÿðãöøÞö‹ÿóŽÿò¸åŒ‘ao£¼òûÿÿòÌä€ÿúêõˆÿ ¹’Øÿ¢?Æÿù…Ùü€ÿ)ºB|n±Š²ê˜sµ®Î™ëþ¾”°Ð²Ö͈p•ʇ§à“Ø Š¾³Ž½‹ÿ²ðÿ öÓ¤ zn¸Ìüí©}È€ÿÙv¿ÿÿþÜȈÿ ¸—Þÿ˜DÍÿÿ¹¯íÿ)¶zbL‡ao¾¨qÑ¿µxCÔý{mkÎ1£…·„Ž\“gTÆf{žjrif‘‹ÿ¾ê‹ÿüô¡“£n•™ºøÿô±h¼ÿ ÏT·ÿÿô¡„ï‡ÿ ÉÆÿ…GÏÿÿòðüÿ)ó›h’u‡³Ø«´†aÛýz˜Ám±°˜ÅÊ‹—zoМ°¬tk“™o®‹ÿÒ Í‡ÿ ùÏìòÐÇtvu–Êõ€ÿÔi÷ÿ ÐX·ÿÿØNAÁþ„ÿ ñı˜£ëqX×þÕðƒÿ)éãèÍѽÓà÷îÁÌæÃ¿òÿæ¿äÓ××ëÂáÝëÕÖ»ËîÛáå‹[Æê¹ã‹ÿ韆ÿ ïÀ{™¨ªŠ°}ˆÛñ€ÿíˆá‚ÿ ÐX·ÿùÀ@D¬ùÿþíĈFh˜r‚G_·§s¹€ÖÕîüÿþÿлöŽÿú/s…ÿ ÍÇ\bZ†ydÒÂäÿì–Žàƒÿ ÐX·ÿùÞ¢R“ÜúÿúÊe-cL6?fH@iuutxÃö¶ÿfCûÿøËໞAwv¢Š£êÿÿþööóeÞ„ÿÐX·€ÿÞ{ÀƒÿûÜœW":…¢ˆ'vžŸ¢ ŸŸž¢Ôù¶ÿ¡߀ÿ 훊‡Æz…z¹Éèõ€ÿù× Fµ…ÿÐX·€ÿÝv¿…ÿ ùך ãÿºMÍþ¿ÿÔª€ÿ æS»‘‰š ¬ë÷‚ÿñz6wù…ÿÐX·€ÿÝx¿‡ÿ÷ñùøŒjàÀÿøAYüÿÿø‡°¼`åÇôûƒÿéG yù…ÿÐX·€ÿÞy¿Šÿßg–ñÁÿš߀ÿÖk€¥ÿþ„ÿþÛ'&Yù…ÿÐYº€ÿÝv¿Šÿ·PÄýÁÿç$Œÿ²®ô†ÿüÑr¦Öö„ÿ ü߉;ÎÿÿÝv¿‰ÿïVâÃÿz,ì€ÿýˆÿýêã‡ÿ ûÃ5 2¢ÿÿÞy¿‰ÿÇW€øÃÿí-~šÿ âlHãÿÿÝw¿ˆÿévZÍÅÿœÄ™ÿ úº;™ýÿÿÛq½ˆÿ¯J’÷ÅÿïMLü™ÿè¬Ý€ÿàˆÌ‡ÿÓ^bØÇÿÁŒ‰ÿýêôŠÿüóú€ÿøäó†ÿìƒP³úÇÿ÷›À‡ÿö¡Bjçˆÿúìø‚ÿøçíúƒÿú¢E‘óÉÿò_4Ô€ÿ ûÒ”»ÿûÄ!‹ÿþô„ÿ ò¶~—ãøøýñÆvƒºùÿþ·MyäËÿßFCèÿýÔA8ÀüÇ ~æ{S¦þ‚ÿ ÞÊÉŠšà½¯R_ ÷ÿÁWlÕþÌÿÓ;Jáøª‡üàœ1YËŒ2Ì‚ÿ ÚˆÙÁ¦{o×ã´‚‚—ñ€ÿÉYbÎûÎÿËEEÚ×2#¢qK‰ÅÜðˆÊ‚ÿî©|‰že|̾ºbs³úÿü¸RbÇúÏÿýÕPH·Å±Œ*¶ÿøÈV2ó‚ÿýìÖßæ×ßòèîÓÙïÿó¦HkÏøÒÿ×g8Œåï‘·Øi]®ÐçõöŽÿÛ|D|ÖûÔÿÛ6[ÀÓc0ÝXbö»Vtß‹ÿð«NHžæüÕÿþí½h8k²ÊèêF:Ë6~úˆÿ÷µfBp¾ðÙÿüÛM>rÀéª3B¢×'lý†ÿñºu>`©ãùÛÿþòÒ W7Luнñö«7Y΃ÿ úäÀS3T§ÚôßÿþôÇ?9U9B\~“•ÄÓÑÀ°ƒiA3Gq¥Õõâÿú½ŸèΘlT7)$#"'$(:Qr¤Åâñúäÿñ}2ëÿýõïéå×ËÄÂÇÉÔãéïöüåÿúÿçAþƒÿþüû€üýéÿï}’.Ó÷ÿëS ŸÜöÿ îdUðÈ¿Ä÷‹ÿøãñÿÿþÝÿ%ðv&·ôŸF‡ÐâãÕôÞÕî÷ØÓãÕ×Úݸ·š˜±áÙïéÞò×ÿ%ô“4ÀøþãrÔ‚–h“xu”Æe‰ˆfZhs”“cco‡nžå×ÿ%ø®PÛúÿÿìpÙ|¿‰sf€¬}Êvzx—€¨gŠ¡ŽŒqu_ƒ‡¯ü×ÿúÅZÞý€ÿó¤å®Ø–z–¯Í¯Ý‹±Á³Í ¶Å¯¥©¦·»ÏØÿüâÞþÿþõýöûòïôöùöüòñ÷ø÷úô÷úöôöõò÷øùÙÿüýŽÿþùÿ÷ÓËõÿýÓš¿¥«¦Ð›Æ³§æÉ—ò¥Þéÿú²e›jlit{ksdŸ•s¦xqª÷èÿúÀ—¹j{Švqrlr¨¤nur¶øéÿþüý÷÷ÿýüõùöõýúôúúõûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ”ÿt8mk@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿneuron-7.5/src/mac/mknrndll.info000077500000000000000000000016611323325274500167350ustar00rootroot00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions nrnzip * CFBundleTypeOSTypes **** CFBundleTypeRole Viewer CFBundleIdentifier edu.yale.neuron.mknrndll CFBundleExecutable a.out CFBundleIconFile mknrndll CFBundleSignature NRN5 CFBundlePackageType APPL LSPrefersCarbon neuron-7.5/src/mac/mknrndll.sh000077500000000000000000000007471323325274500164200ustar00rootroot00000000000000#!/bin/sh # Mac os x intermediate between applescript and nrnivmodl echo -e "\033]0;mknrndll\007" NRNIVMODL="nrnivmodl" if test "x$1" != x ; then if test -f "$1" ; then dname=`dirname "$1"` cd "${dname}" files="" while test $# -gt 0 ; do files="$files "`basename "$1"` shift done ${NRNIVMODL} $files else cd "$1" shift ${NRNIVMODL} "$@" fi else echo "drag a folder or set of mod files onto the mknrndll script" fi echo "Press 'return' key to close" read a neuron-7.5/src/mac/modlunit.icns000077500000000000000000000720611323325274500167520ustar00rootroot00000000000000icnst1ics#Hÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿis32µüŒþüŒþüŒþüŒþüŒþüþûñ€þïäùâïð€þLüÿÖ¾äè켊×}¿±õþþüÿ‚¯x™~’aÑŠÈÿþüÿv²b~v€“‘pΉ¿ÿþüÿ¾¯ÓÚÖÑÞèÕå›ìÿþüþôæþýýüüþüúã€þüþþÿ…þÿ€þüŒþüŒþüŒþüŒþüŒþüŒþüŒþüŒþüŒþüþûñ€þïäùâïð€þLüÿÖ¾äè켊×}¿±õþþüÿ‚¯x™~’aÑŠÈÿþüÿv²b~v€“‘pΉ¿ÿþüÿ¾¯ÓÚÖÑÞèÕå›ìÿþüþôæþýýüüþüúã€þüþþÿ…þÿ€þüŒþüŒþüŒþüŒþüŒþüŒþüŒþüŒþüŒþüþûñ€þïäùâïð€þLüÿÖ¾äè켊×}¿±õþþüÿ‚¯x™~’aÑŠÈÿþüÿv²b~v€“‘pΉ¿ÿþüÿ¾¯ÓÚÖÑÞèÕå›ìÿþüþôæþýýüüþüúã€þüþþÿ…þÿ€þüŒþüŒþüŒþüŒþs8mkþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#il32DÿþÿþÞþðäýƒþ úâÍÕõýëÒÍîñä‡þÿœšÿƒþ ò—7MÝÿ«<<ÈÎ{ö…þýæ,¹ÞÖìßîòÜ÷»G1Ê÷–!NëäF¹ÿ„þÿy%õš1v{h˜l¯»€J•Ä›>Uëÿƒ.ÿ„þÿ_üÅ v%™w|¹•lfx¹RUëÿÿ„þÿbþÔ®§5͆}»Ÿ¦;<ÑYVëÿÿ„þÿ^ù³ŒŸ+¯c’ÀUyÒH=Ýþÿ„þÿ¬/ö©€šÅ‡­»Š’Í¿áÖÔü{iÿ„þýò<ŸíéêôéíôèçéôôûõêèõÓ<Ðÿ…þÿ¿±ÿŒþÿÖ¡ú‡þúðýþ÷ñýÿþÿþ¾þÿþÿþÞþðäýƒþ úâÍÕõýëÒÍîñä‡þÿœšÿƒþ ò—7MÝÿ«<<ÈÎ{ö…þýæ,¹ÞÖìßîòÜ÷»G1Ê÷–!NëäF¹ÿ„þÿy%õš1v{h˜l¯»€J•Ä›>Uëÿƒ.ÿ„þÿ_üÅ v%™w|¹•lfx¹RUëÿÿ„þÿbþÔ®§5͆}»Ÿ¦;<ÑYVëÿÿ„þÿ^ù³ŒŸ+¯c’ÀUyÒH=Ýþÿ„þÿ¬/ö©€šÅ‡­»Š’Í¿áÖÔü{iÿ„þýò<ŸíéêôéíôèçéôôûõêèõÓ<Ðÿ…þÿ¿±ÿŒþÿÖ¡ú‡þúðýþ÷ñýÿþÿþ¾þÿþÿþÞþðäýƒþ úâÍÕõýëÒÍîñä‡þÿœšÿƒþ ò—7MÝÿ«<<ÈÎ{ö…þýæ,¹ÞÖìßîòÜ÷»G1Ê÷–!NëäF¹ÿ„þÿy%õš1v{h˜l¯»€J•Ä›>Uëÿƒ.ÿ„þÿ_üÅ v%™w|¹•lfx¹RUëÿÿ„þÿbþÔ®§5͆}»Ÿ¦;<ÑYVëÿÿ„þÿ^ù³ŒŸ+¯c’ÀUyÒH=Ýþÿ„þÿ¬/ö©€šÅ‡­»Š’Í¿áÖÔü{iÿ„þýò<ŸíéêôéíôèçéôôûõêèõÓ<Ðÿ…þÿ¿±ÿŒþÿÖ¡ú‡þúðýþ÷ñýÿþÿþ¾þl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#Hih32´ÿþÿþÿþÿþÿþÎþÿÿþý€ÿý‚ÿœþÿÓèÿ€þ ÿÒÇÿÌÑÑñÿ›þûXÞÿþ€ÿ ãkÿ{â›ÿšþÿ¦aÜ0{fhèo5Ý'ïí3ôÿýõôö•þÿ—Qÿ#º$»&ÉŽPZÄ(íê!ðÿð}vŠûÿ“þÿ–Pÿ Ð$Ò"Ä“±%âêëïÿñ‰ƒ•ü”þÿ³dÚH¦e¥iqoç¾ÅE¾íBø‚ÿ–þÿ_܉ÿ¡ÿ˜þÿÿþÿêðÿþƒÿþ€ÿÆú‚ÿ„þÿÿŠþÿ Ô‚ÿüc«Lèh•ÿZïöFOÿ¢ÿê„ÿçÿˆþ$ÿè[ÜÇÝÞéÞçä ë~gç‚ÿš}(í•ÀnnÿÙÊöÑ×ОŠÿˆþ$ÿ¢Mñq8‚=ÂÕ)ì‚nÙá\Ú%ñI‡KjÓ‘FªOh[Î,ÿˆþ$ÿ¤Gÿ/Ñ.Ñ,×/×*ï„kÿ*·‰ö$ÿl’n”RORº]ÿÉ.ÿˆþ$ÿ Iù²%³$¡¤ÏhQÝTÃÕ ßNq/Q1¹Ó<|ÿÌ(ÿˆþ$ÿÚ]ݛ±´ ¢¢žÇ¯ªÊž©ÿϚ˩¬ð¯ôž®ì¡±ÿ¯wÿ‰þÿˆÑŒÿþ‹ÿ~ÜÿŠþÿýœþÿÿþÿþÿþÿþÿþúþÿþÿþÿþÿþÿþÎþÿÿþý€ÿý‚ÿœþÿÓèÿ€þ ÿÒÇÿÌÑÑñÿ›þûXÞÿþ€ÿ ãkÿ{â›ÿšþÿ¦aÜ0{fhèo5Ý'ïí3ôÿýõôö•þÿ—Qÿ#º$»&ÉŽPZÄ(íê!ðÿð}vŠûÿ“þÿ–Pÿ Ð$Ò"Ä“±%âêëïÿñ‰ƒ•ü”þÿ³dÚH¦e¥iqoç¾ÅE¾íBø‚ÿ–þÿ_܉ÿ¡ÿ˜þÿÿþÿêðÿþƒÿþ€ÿÆú‚ÿ„þÿÿŠþÿ Ô‚ÿüc«Lèh•ÿZïöFOÿ¢ÿê„ÿçÿˆþ$ÿè[ÜÇÝÞéÞçä ë~gç‚ÿš}(í•ÀnnÿÙÊöÑ×ОŠÿˆþ$ÿ¢Mñq8‚=ÂÕ)ì‚nÙá\Ú%ñI‡KjÓ‘FªOh[Î,ÿˆþ$ÿ¤Gÿ/Ñ.Ñ,×/×*ï„kÿ*·‰ö$ÿl’n”RORº]ÿÉ.ÿˆþ$ÿ Iù²%³$¡¤ÏhQÝTÃÕ ßNq/Q1¹Ó<|ÿÌ(ÿˆþ$ÿÚ]ݛ±´ ¢¢žÇ¯ªÊž©ÿϚ˩¬ð¯ôž®ì¡±ÿ¯wÿ‰þÿˆÑŒÿþ‹ÿ~ÜÿŠþÿýœþÿÿþÿþÿþÿþÿþúþÿþÿþÿþÿþÿþÎþÿÿþý€ÿý‚ÿœþÿÓèÿ€þ ÿÒÇÿÌÑÑñÿ›þûXÞÿþ€ÿ ãkÿ{â›ÿšþÿ¦aÜ0{fhèo5Ý'ïí3ôÿýõôö•þÿ—Qÿ#º$»&ÉŽPZÄ(íê!ðÿð}vŠûÿ“þÿ–Pÿ Ð$Ò"Ä“±%âêëïÿñ‰ƒ•ü”þÿ³dÚH¦e¥iqoç¾ÅE¾íBø‚ÿ–þÿ_܉ÿ¡ÿ˜þÿÿþÿêðÿþƒÿþ€ÿÆú‚ÿ„þÿÿŠþÿ Ô‚ÿüc«Lèh•ÿZïöFOÿ¢ÿê„ÿçÿˆþ$ÿè[ÜÇÝÞéÞçä ë~gç‚ÿš}(í•ÀnnÿÙÊöÑ×ОŠÿˆþ$ÿ¢Mñq8‚=ÂÕ)ì‚nÙá\Ú%ñI‡KjÓ‘FªOh[Î,ÿˆþ$ÿ¤Gÿ/Ñ.Ñ,×/×*ï„kÿ*·‰ö$ÿl’n”RORº]ÿÉ.ÿˆþ$ÿ Iù²%³$¡¤ÏhQÝTÃÕ ßNq/Q1¹Ó<|ÿÌ(ÿˆþ$ÿÚ]ݛ±´ ¢¢žÇ¯ªÊž©ÿϚ˩¬ð¯ôž®ì¡±ÿ¯wÿ‰þÿˆÑŒÿþ‹ÿ~ÜÿŠþÿýœþÿÿþÿþÿþÿþÿþúþh8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿit32ÄÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÅþ¿Žþ??‚þ‚¿þþ¿ÔþŸ`ŽþŸ`€?‚þÞþþ`ŸÓþ?þ¿€?‚þþ?Óþ??þ¿€?‚þ‚þ??Òþ?þþW€ ÆÆÆþþW€þ ¿ß7þþÆß7‚þ?Ñþ ?þþŸ```€þþ¿þ?þþ¿þ?‚þ?Ñþ?€þ¿Wþþ?þþ¿þ?þç¯þ?‚þ?…þ…ßÁþ?€þ¿¿þþ?þþ?þþ¿þ?þ??þþ?‚þ?…þ…Áþ?€þ¿¿þþ?þþ?þþ¿þÏ??þþ?‚þ?…þ…¿Áþ?€þ¿¿þþ?þþ?þþ¿þþ¿€?þþ?‚þ?…þ…¿Áþ?€þ¿¿þþ?þþ?þþ¿þþ¿€?þþ?‚þ?…þ…Áþ?€þ¿¿þþ?þþ?þþ¿þ¿€þ?‚þ?Ñþ%?þþŸ``Ÿþþ?`Þþþ¿þþÞ€þ?Ñþ?þþWWþþW„ÆþþÆþþ‚Æ€þ?Òþ??£þ??Óþ?¡þ?ÓþŸ`¡þ`ŸÔþ¿¡þ¿ÿþùþ?ÎËþ¿îþ¿¿Ïþ¿þþπþî¿¿îþî¿¿¿þ¿¿Ï—þÏϦþ¿þ?þþþ¿€?€þ¿¿þ¿‚þ?—þ??¤þ¿¿þ?þþ?þ?€þ¿¿þ¿þ?þ?€þ¿’þ?£þ¿ÞþŸþþ?þ?€þÞÞ€þŸ`þ?þŸþþŸ`’þŸ`¢þç¨þþö€ß çþßßçþþçßßþþö€ßçþþ?þ?þþç€ßö€þ ?þ?þþö€ßçþß7ßö€þç€ßöþþßßçþßþþ¿ßö þ?þþ¿€ ?þ?þþ?þþ¿€?þþ?þ?þþ?€¿€þ ??þþ?þþ¿€?þ‚¿€þ?€¿þþ?þþþ¿¿ þ?þþößß7¯¨Æöß?þþ?þ9?þþ稿þþ?þþ?þþöß?þß7ßöþþ¯ßßWþß7ß7þþ¿¿ þ?þþ?Þ¿¿þþ?þþ?þ?€þ ¿¿þþ`Ÿþþ?þ!?þþ?þþÞ¿þþ?þþ?þŸþþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿þþ¿€þ?þ?þþ?þþ¿¿þþ?þþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿þþ¿€þ?þ ?þþ?þþ¿„?þþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿Î?¿€þ?þ ?þþ?þo0¿Ïþþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿¿?΀þ?þ?þþ?¿_0ÏþþÏÏþþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿¿‚þ?þ?þþ?€¿¿€ ?þþ??þþ?ƒþ¿¿ þ.?þþÆþ?Æ¿ÆÆþWþ!ÆÆþ稿ö߯çþÆþ¿¿ þŸ`þþÞ‚þŸ€ÞÞ‹ÞÞ‚þŸƒþ‚ÞÞ‚þþÞÞþþ‚Þþþ‚Þþ¿Þ¡þ¿ßöÐþ稣þ¿¿Ðþ?£þöß¿Ðþ?7ߥþÞÐþŸŸÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþºþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÅþ¿Žþ??‚þ‚¿þþ¿ÔþŸ`ŽþŸ`€?‚þÞþþ`ŸÓþ?þ¿€?‚þþ?Óþ??þ¿€?‚þ‚þ??Òþ?þþW€ ÆÆÆþþW€þ ¿ß7þþÆß7‚þ?Ñþ ?þþŸ```€þþ¿þ?þþ¿þ?‚þ?Ñþ?€þ¿Wþþ?þþ¿þ?þç¯þ?‚þ?…þ…ßÁþ?€þ¿¿þþ?þþ?þþ¿þ?þ??þþ?‚þ?…þ…Áþ?€þ¿¿þþ?þþ?þþ¿þÏ??þþ?‚þ?…þ…¿Áþ?€þ¿¿þþ?þþ?þþ¿þþ¿€?þþ?‚þ?…þ…¿Áþ?€þ¿¿þþ?þþ?þþ¿þþ¿€?þþ?‚þ?…þ…Áþ?€þ¿¿þþ?þþ?þþ¿þ¿€þ?‚þ?Ñþ%?þþŸ``Ÿþþ?`Þþþ¿þþÞ€þ?Ñþ?þþWWþþW„ÆþþÆþþ‚Æ€þ?Òþ??£þ??Óþ?¡þ?ÓþŸ`¡þ`ŸÔþ¿¡þ¿ÿþùþ?ÎËþ¿îþ¿¿Ïþ¿þþπþî¿¿îþî¿¿¿þ¿¿Ï—þÏϦþ¿þ?þþþ¿€?€þ¿¿þ¿‚þ?—þ??¤þ¿¿þ?þþ?þ?€þ¿¿þ¿þ?þ?€þ¿’þ?£þ¿ÞþŸþþ?þ?€þÞÞ€þŸ`þ?þŸþþŸ`’þŸ`¢þç¨þþö€ß çþßßçþþçßßþþö€ßçþþ?þ?þþç€ßö€þ ?þ?þþö€ßçþß7ßö€þç€ßöþþßßçþßþþ¿ßö þ?þþ¿€ ?þ?þþ?þþ¿€?þþ?þ?þþ?€¿€þ ??þþ?þþ¿€?þ‚¿€þ?€¿þþ?þþþ¿¿ þ?þþößß7¯¨Æöß?þþ?þ9?þþ稿þþ?þþ?þþöß?þß7ßöþþ¯ßßWþß7ß7þþ¿¿ þ?þþ?Þ¿¿þþ?þþ?þ?€þ ¿¿þþ`Ÿþþ?þ!?þþ?þþÞ¿þþ?þþ?þŸþþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿þþ¿€þ?þ?þþ?þþ¿¿þþ?þþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿þþ¿€þ?þ ?þþ?þþ¿„?þþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿Î?¿€þ?þ ?þþ?þo0¿Ïþþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿¿?΀þ?þ?þþ?¿_0ÏþþÏÏþþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿¿‚þ?þ?þþ?€¿¿€ ?þþ??þþ?ƒþ¿¿ þ.?þþÆþ?Æ¿ÆÆþWþ!ÆÆþ稿ö߯çþÆþ¿¿ þŸ`þþÞ‚þŸ€ÞÞ‹ÞÞ‚þŸƒþ‚ÞÞ‚þþÞÞþþ‚Þþþ‚Þþ¿Þ¡þ¿ßöÐþ稣þ¿¿Ðþ?£þöß¿Ðþ?7ߥþÞÐþŸŸÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþºþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÅþ¿Žþ??‚þ‚¿þþ¿ÔþŸ`ŽþŸ`€?‚þÞþþ`ŸÓþ?þ¿€?‚þþ?Óþ??þ¿€?‚þ‚þ??Òþ?þþW€ ÆÆÆþþW€þ ¿ß7þþÆß7‚þ?Ñþ ?þþŸ```€þþ¿þ?þþ¿þ?‚þ?Ñþ?€þ¿Wþþ?þþ¿þ?þç¯þ?‚þ?…þ…ßÁþ?€þ¿¿þþ?þþ?þþ¿þ?þ??þþ?‚þ?…þ…Áþ?€þ¿¿þþ?þþ?þþ¿þÏ??þþ?‚þ?…þ…¿Áþ?€þ¿¿þþ?þþ?þþ¿þþ¿€?þþ?‚þ?…þ…¿Áþ?€þ¿¿þþ?þþ?þþ¿þþ¿€?þþ?‚þ?…þ…Áþ?€þ¿¿þþ?þþ?þþ¿þ¿€þ?‚þ?Ñþ%?þþŸ``Ÿþþ?`Þþþ¿þþÞ€þ?Ñþ?þþWWþþW„ÆþþÆþþ‚Æ€þ?Òþ??£þ??Óþ?¡þ?ÓþŸ`¡þ`ŸÔþ¿¡þ¿ÿþùþ?ÎËþ¿îþ¿¿Ïþ¿þþπþî¿¿îþî¿¿¿þ¿¿Ï—þÏϦþ¿þ?þþþ¿€?€þ¿¿þ¿‚þ?—þ??¤þ¿¿þ?þþ?þ?€þ¿¿þ¿þ?þ?€þ¿’þ?£þ¿ÞþŸþþ?þ?€þÞÞ€þŸ`þ?þŸþþŸ`’þŸ`¢þç¨þþö€ß çþßßçþþçßßþþö€ßçþþ?þ?þþç€ßö€þ ?þ?þþö€ßçþß7ßö€þç€ßöþþßßçþßþþ¿ßö þ?þþ¿€ ?þ?þþ?þþ¿€?þþ?þ?þþ?€¿€þ ??þþ?þþ¿€?þ‚¿€þ?€¿þþ?þþþ¿¿ þ?þþößß7¯¨Æöß?þþ?þ9?þþ稿þþ?þþ?þþöß?þß7ßöþþ¯ßßWþß7ß7þþ¿¿ þ?þþ?Þ¿¿þþ?þþ?þ?€þ ¿¿þþ`Ÿþþ?þ!?þþ?þþÞ¿þþ?þþ?þŸþþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿þþ¿€þ?þ?þþ?þþ¿¿þþ?þþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿þþ¿€þ?þ ?þþ?þþ¿„?þþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿Î?¿€þ?þ ?þþ?þo0¿Ïþþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿¿?΀þ?þ?þþ?¿_0ÏþþÏÏþþ?ƒþ¿¿ þ?þ?þþ?þþ¿¿þþ?þþ?þ?€þ¿¿¿‚þ?þ?þþ?€¿¿€ ?þþ??þþ?ƒþ¿¿ þ.?þþÆþ?Æ¿ÆÆþWþ!ÆÆþ稿ö߯çþÆþ¿¿ þŸ`þþÞ‚þŸ€ÞÞ‹ÞÞ‚þŸƒþ‚ÞÞ‚þþÞÞþþ‚Þþþ‚Þþ¿Þ¡þ¿ßöÐþ稣þ¿¿Ðþ?£þöß¿Ðþ?7ߥþÞÐþŸŸÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþºþt8mk@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿneuron-7.5/src/mac/modlunit.info000077500000000000000000000016561323325274500167530ustar00rootroot00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions mod * CFBundleTypeOSTypes **** CFBundleTypeRole Viewer CFBundleIdentifier edu.yale.neuron.modlunit CFBundleExecutable a.out CFBundleIconFile modlunit CFBundleSignature NRN6 CFBundlePackageType APPL LSPrefersCarbon neuron-7.5/src/mac/modlunit.sh000077500000000000000000000007261323325274500164270ustar00rootroot00000000000000#!/bin/sh # Mac os x intermediate between applescript and modlunit echo -e "\033]0;modlunit\007" MODLUNIT="modlunit" if test "x$1" != x ; then for i in "$@" ; do if test -f "$i" ; then cd `dirname "$i"` arg1=`basename "$i"` ${MODLUNIT} "$i" else cd "$i" for j in *.mod ; do ${MODLUNIT} "$j" done fi done else echo "drag a folder or set of mod files onto the modlunit script" ${MODLUNIT} fi echo "Press 'return' key to close" read a neuron-7.5/src/mac/mos2nrn.icns000077500000000000000000000702521323325274500165150ustar00rootroot00000000000000icnspªics#Hÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿis326üŒþüŒþüþýƒÿüÿþÿ€þ2üþú£¨ÆÄ¼Ä®·–Äÿþþüþû—ƒ}t}–Ÿ¤†³ÿþþüþüöôòꛦéôî÷ÿþþüþþ€ÿèPfò€ÿ€þüþÿÙ5HäƒþüþÿÙ4Hãƒþüþþ€ÿû±»ÿ€þ2üþùÀ̵ÀÃ»ËÆ¼Õýþþüþúš‹Ÿ˜›ŸœÿþþüþúêåÖÛÜÝÞÝêìÿþþüþþ‡ÿ€þüŒþüŒþüŒþüŒþüþýƒÿüÿþÿ€þ2üþú£¨ÆÄ¼Ä®·–Äÿþþüþû—ƒ}t}–Ÿ¤†³ÿþþüþüöôòꛦéôî÷ÿþþüþþ€ÿèPfò€ÿ€þüþÿÙ5HäƒþüþÿÙ4Hãƒþüþþ€ÿû±»ÿ€þ2üþùÀ̵ÀÃ»ËÆ¼Õýþþüþúš‹Ÿ˜›ŸœÿþþüþúêåÖÛÜÝÞÝêìÿþþüþþ‡ÿ€þüŒþüŒþüŒþüŒþüþýƒÿüÿþÿ€þ2üþú£¨ÆÄ¼Ä®·–Äÿþþüþû—ƒ}t}–Ÿ¤†³ÿþþüþüöôòꛦéôî÷ÿþþüþþ€ÿèPfò€ÿ€þüþÿÙ5HäƒþüþÿÙ4Hãƒþüþþ€ÿû±»ÿ€þ2üþùÀ̵ÀÃ»ËÆ¼Õýþþüþúš‹Ÿ˜›ŸœÿþþüþúêåÖÛÜÝÞÝêìÿþþüþþ‡ÿ€þüŒþüŒþs8mkþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#€€il32ÿþþÿþþÿþÿþÿÿþþÿÿ‰þ úüþþùþþýüýþ€üøõüúø÷ˆþÿÌTé{‡ÿÿõ»µÿà¡Çzƒ«Áq‚¾ÿ†þÿæR q‹˜‹Ÿo¤š‘Ï„ÕÀdt©ÿ†þÿà‰M“|ouL‚P\ˆˆÐ‚Ó½wžÿ†þÿǧ³ž‚…›ƒu†®”»}ƒ±ÃrÃÿ‡þüûÿýýþüÿûéØÚíüüùþüûúÿþï_ý—þî^Œý—þî^ý—þðaÿ–þè…&¶÷•þ÷« +Õÿ–þèQ €ù˜þ§'PÐþÿÿþƒÿê™®ÿþþÿþÿ‡þÿøýþóõñð÷ööõóöÿÿðùùýþôü†þÿÊ_ì’˜vŸ‡¸‰zoÓ¯–ޝ^å–ôÿ…þÿãl‘·±dº¾ˆÚ¡ŒƒÂ{Öš—oެ‡þÿÛ¶h_·„ÅÐhVÃ}Ö˜“ÅkXÿ†þÿȲó¢­t‘¬|§§¡ž­˜˜¸³ï§ÿ‡þ ýýÿÿþþýÿÿþ€ÿþÿûþÿýÿÿÿþÁþÿþþÿþþÿþÿþÿÿþþÿÿ‰þ úüþþùþþýüýþ€üøõüúø÷ˆþÿÌTé{‡ÿÿõ»µÿà¡Çzƒ«Áq‚¾ÿ†þÿæR q‹˜‹Ÿo¤š‘Ï„ÕÀdt©ÿ†þÿà‰M“|ouL‚P\ˆˆÐ‚Ó½wžÿ†þÿǧ³ž‚…›ƒu†®”»}ƒ±ÃrÃÿ‡þüûÿýýþüÿûéØÚíüüùþüûúÿþï_ý—þî^Œý—þî^ý—þðaÿ–þè…&¶÷•þ÷« +Õÿ–þèQ €ù˜þ§'PÐþÿÿþƒÿê™®ÿþþÿþÿ‡þÿøýþóõñð÷ööõóöÿÿðùùýþôü†þÿÊ_ì’˜vŸ‡¸‰zoÓ¯–ޝ^å–ôÿ…þÿãl‘·±dº¾ˆÚ¡ŒƒÂ{Öš—oެ‡þÿÛ¶h_·„ÅÐhVÃ}Ö˜“ÅkXÿ†þÿȲó¢­t‘¬|§§¡ž­˜˜¸³ï§ÿ‡þ ýýÿÿþþýÿÿþ€ÿþÿûþÿýÿÿÿþÁþÿþþÿþþÿþÿþÿÿþþÿÿ‰þ úüþþùþþýüýþ€üøõüúø÷ˆþÿÌTé{‡ÿÿõ»µÿà¡Çzƒ«Áq‚¾ÿ†þÿæR q‹˜‹Ÿo¤š‘Ï„ÕÀdt©ÿ†þÿà‰M“|ouL‚P\ˆˆÐ‚Ó½wžÿ†þÿǧ³ž‚…›ƒu†®”»}ƒ±ÃrÃÿ‡þüûÿýýþüÿûéØÚíüüùþüûúÿþï_ý—þî^Œý—þî^ý—þðaÿ–þè…&¶÷•þ÷« +Õÿ–þèQ €ù˜þ§'PÐþÿÿþƒÿê™®ÿþþÿþÿ‡þÿøýþóõñð÷ööõóöÿÿðùùýþôü†þÿÊ_ì’˜vŸ‡¸‰zoÓ¯–ޝ^å–ôÿ…þÿãl‘·±dº¾ˆÚ¡ŒƒÂ{Öš—oެ‡þÿÛ¶h_·„ÅÐhVÃ}Ö˜“ÅkXÿ†þÿȲó¢­t‘¬|§§¡ž­˜˜¸³ï§ÿ‡þ ýýÿÿþþýÿÿþ€ÿþÿûþÿýÿÿÿþÁþl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#H€€€€€€€ÀÀ€€€€€€€€ÀÀ€ih32 &ÿþÿþÿþþþ€ÿþÿÿƒþÿÿ€þ…ÿý‚ÿŒþ!ÿ÷c:ëÿQIçýûÿÿîH§ÿûþÃ;éÖ=sm¡ú<‚_ÒÿŒþ ÿ€ Íð$HüÖÊïò×=‰øÏã÷Ùÿ!Ãí2ÍÑñY}ÿŒþ ÿ™Zl²mPÞCmuŠe1²|Kí Úÿ(Äÿ9¬Ú–B±ÿŒþ ÿ–“7ˆžQ±?Ï1A°fp'–$ß!Úÿ'Åÿ7°ØáVŒÿŒþ ÿ‰Ü; L·A½>N¢dk”³äÖú&¿ê<ÌÏ!î^€ÿ‹þ!ÿød»ºâ{NÕlk¥¹f‘vo\¬À:­ÜBvk£ÿA†cÕÿŒþýøùýýùùÿüõÿÿöýðåææçùùûúööÿÿùúóúÿŽþÿþÿþþÿþþÿÿ«osruïÿþ€ÿ€þÿÿœþÿc€âÿ¥þÿi€ãÿ¥þÿi€ãÿ¥þÿi€ãÿ£þýþÿl€éÿ¤þÑ®J€¡´õ¢þÿ¸.€)^õÿ¢þçB‚›ÿ£þÿ¹ Vñ¥þøj€%Åÿ¥þÿí7ÿ§þÿ¿Uî©þùp¿ÿšþ€ÿý‰ÿåö€ÿþÿþƒÿýŠþ"ÿø”¸ÿÖ’ÎŒ—™¬¹…ÞŞƊ˜ŠèÿÿŸ— ÿ·–ùö“Ëÿ‹þ!ýo(ïånî.£Ô~µ(ïÅ„Ü$¼Kzÿ“uÕr›Á²ütÒÿ‹þ!ÿhlõ€ÿ,~‡èÊ"ÿÖ•öíj{ÿ+Àþº4ÏjRçŽãÿ‹þ!ÿÒ-hÿ-„ˆïË%ÿ×–øT@ïÿ&ÇÿÀ/˪z;tçÿ‹þ!ÿ“çÄYÿ-Åñ„ÈÿÏŽý"®ÿ/·ÿ²8Ñ©ðHðÿŠþ"ÿûX²ûªmåuyCì+kZ½Å º·«ÅP–OÊ›mÿâMëÿ‹þ ûÍãÿøæðÉÎÌÕþÛÊÑøåÆäùÎßûÕÌÖûÝÒýþäùþûýþüûûýþþûüþýüýþýüþýúýþüüþþÿÿþÿþÿþ°þÿþÿþÿþþþ€ÿþÿÿƒþÿÿ€þ…ÿý‚ÿŒþ!ÿ÷c:ëÿQIçýûÿÿîH§ÿûþÃ;éÖ=sm¡ú<‚_ÒÿŒþ ÿ€ Íð$HüÖÊïò×=‰øÏã÷Ùÿ!Ãí2ÍÑñY}ÿŒþ ÿ™Zl²mPÞCmuŠe1²|Kí Úÿ(Äÿ9¬Ú–B±ÿŒþ ÿ–“7ˆžQ±?Ï1A°fp'–$ß!Úÿ'Åÿ7°ØáVŒÿŒþ ÿ‰Ü; L·A½>N¢dk”³äÖú&¿ê<ÌÏ!î^€ÿ‹þ!ÿød»ºâ{NÕlk¥¹f‘vo\¬À:­ÜBvk£ÿA†cÕÿŒþýøùýýùùÿüõÿÿöýðåææçùùûúööÿÿùúóúÿŽþÿþÿþþÿþþÿÿ«osruïÿþ€ÿ€þÿÿœþÿc€âÿ¥þÿi€ãÿ¥þÿi€ãÿ¥þÿi€ãÿ£þýþÿl€éÿ¤þÑ®J€¡´õ¢þÿ¸.€)^õÿ¢þçB‚›ÿ£þÿ¹ Vñ¥þøj€%Åÿ¥þÿí7ÿ§þÿ¿Uî©þùp¿ÿšþ€ÿý‰ÿåö€ÿþÿþƒÿýŠþ"ÿø”¸ÿÖ’ÎŒ—™¬¹…ÞŞƊ˜ŠèÿÿŸ— ÿ·–ùö“Ëÿ‹þ!ýo(ïånî.£Ô~µ(ïÅ„Ü$¼Kzÿ“uÕr›Á²ütÒÿ‹þ!ÿhlõ€ÿ,~‡èÊ"ÿÖ•öíj{ÿ+Àþº4ÏjRçŽãÿ‹þ!ÿÒ-hÿ-„ˆïË%ÿ×–øT@ïÿ&ÇÿÀ/˪z;tçÿ‹þ!ÿ“çÄYÿ-Åñ„ÈÿÏŽý"®ÿ/·ÿ²8Ñ©ðHðÿŠþ"ÿûX²ûªmåuyCì+kZ½Å º·«ÅP–OÊ›mÿâMëÿ‹þ ûÍãÿøæðÉÎÌÕþÛÊÑøåÆäùÎßûÕÌÖûÝÒýþäùþûýþüûûýþþûüþýüýþýüþýúýþüüþþÿÿþÿþÿþ°þÿþÿþÿþþþ€ÿþÿÿƒþÿÿ€þ…ÿý‚ÿŒþ!ÿ÷c:ëÿQIçýûÿÿîH§ÿûþÃ;éÖ=sm¡ú<‚_ÒÿŒþ ÿ€ Íð$HüÖÊïò×=‰øÏã÷Ùÿ!Ãí2ÍÑñY}ÿŒþ ÿ™Zl²mPÞCmuŠe1²|Kí Úÿ(Äÿ9¬Ú–B±ÿŒþ ÿ–“7ˆžQ±?Ï1A°fp'–$ß!Úÿ'Åÿ7°ØáVŒÿŒþ ÿ‰Ü; L·A½>N¢dk”³äÖú&¿ê<ÌÏ!î^€ÿ‹þ!ÿød»ºâ{NÕlk¥¹f‘vo\¬À:­ÜBvk£ÿA†cÕÿŒþýøùýýùùÿüõÿÿöýðåææçùùûúööÿÿùúóúÿŽþÿþÿþþÿþþÿÿ«osruïÿþ€ÿ€þÿÿœþÿc€âÿ¥þÿi€ãÿ¥þÿi€ãÿ¥þÿi€ãÿ£þýþÿl€éÿ¤þÑ®J€¡´õ¢þÿ¸.€)^õÿ¢þçB‚›ÿ£þÿ¹ Vñ¥þøj€%Åÿ¥þÿí7ÿ§þÿ¿Uî©þùp¿ÿšþ€ÿý‰ÿåö€ÿþÿþƒÿýŠþ"ÿø”¸ÿÖ’ÎŒ—™¬¹…ÞŞƊ˜ŠèÿÿŸ— ÿ·–ùö“Ëÿ‹þ!ýo(ïånî.£Ô~µ(ïÅ„Ü$¼Kzÿ“uÕr›Á²ütÒÿ‹þ!ÿhlõ€ÿ,~‡èÊ"ÿÖ•öíj{ÿ+Àþº4ÏjRçŽãÿ‹þ!ÿÒ-hÿ-„ˆïË%ÿ×–øT@ïÿ&ÇÿÀ/˪z;tçÿ‹þ!ÿ“çÄYÿ-Åñ„ÈÿÏŽý"®ÿ/·ÿ²8Ñ©ðHðÿŠþ"ÿûX²ûªmåuyCì+kZ½Å º·«ÅP–OÊ›mÿâMëÿ‹þ ûÍãÿøæðÉÎÌÕþÛÊÑøåÆäùÎßûÕÌÖûÝÒýþäùþûýþüûûýþþûüþýüýþýüþýúýþüüþþÿÿþÿþÿþ°þh8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿit32‹ÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþ×þþˆþ€…þ€€þ„þ„Äþ€þ€Šþ†þþ€þþ€þÃþ€þ€Šþ†þþþ€þ€þÃþ þþþþ€þ€þ‚€þ€€þþþ€þ€þÃþ#þþþþþþþþþþþþþþþþþþþ€þƒÄþ#þþþþþþþþþþþþþþþþþþ€þ€þÃþþþ€þþþþþþþþþþƒþþþþ€þ€þÃþþþ€þþþþþþþþþþƒþþþ€þ€þÃþ€þ€þþþþþþþþþ€þþþþþ€þþ€þÂþ€þþþþþþ€þ€þþþþþþ„þ„ÿþÿþÿþ×þ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ðþŽíþŒîþŒïþŠñþˆòþˆóþ†õþ„öþ„÷þ‚ùþ€úþ€ûþÿþÿþÿþØþ€þ€þ…þþþ€þ„ƒþ‚€þ€þ€Áþ€þ€þþþþþ€þþþ€þ€þ€þ€þÂþ€þ€þþþþþ€þ€þ€þ‚þþþ€þÂþþ€þ€þþþþþ€þ€þ€þ‚þþþþ€þÂþþþþþ€þ‚þþ€þþþþ‚þ þþþþþþÂþþþ€þ€þþþþþ€þ‚‚þ‚þþþþþ€þÂþ€þ€þþþþþ€þþ€þ‚þþþ€þÂþþ€€þþþþþ€þþþ€€þ‚þþþþ€Âþ‚þ€þ€þþþ€þþ€þ€þ€€þ€þ€þ‚þÁþ€‚þþþ…€þ‚€þ€þ€€þ‚€þ€‚þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÑþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþ×þþˆþ€…þ€€þ„þ„Äþ€þ€Šþ†þþ€þþ€þÃþ€þ€Šþ†þþþ€þ€þÃþ þþþþ€þ€þ‚€þ€€þþþ€þ€þÃþ#þþþþþþþþþþþþþþþþþþþ€þƒÄþ#þþþþþþþþþþþþþþþþþþ€þ€þÃþþþ€þþþþþþþþþþƒþþþþ€þ€þÃþþþ€þþþþþþþþþþƒþþþ€þ€þÃþ€þ€þþþþþþþþþ€þþþþþ€þþ€þÂþ€þþþþþþ€þ€þþþþþþ„þ„ÿþÿþÿþ×þ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ðþŽíþŒîþŒïþŠñþˆòþˆóþ†õþ„öþ„÷þ‚ùþ€úþ€ûþÿþÿþÿþØþ€þ€þ…þþþ€þ„ƒþ‚€þ€þ€Áþ€þ€þþþþþ€þþþ€þ€þ€þ€þÂþ€þ€þþþþþ€þ€þ€þ‚þþþ€þÂþþ€þ€þþþþþ€þ€þ€þ‚þþþþ€þÂþþþþþ€þ‚þþ€þþþþ‚þ þþþþþþÂþþþ€þ€þþþþþ€þ‚‚þ‚þþþþþ€þÂþ€þ€þþþþþ€þþ€þ‚þþþ€þÂþþ€€þþþþþ€þþþ€€þ‚þþþþ€Âþ‚þ€þ€þþþ€þþ€þ€þ€€þ€þ€þ‚þÁþ€‚þþþ…€þ‚€þ€þ€€þ‚€þ€‚þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÑþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþ×þþˆþ€…þ€€þ„þ„Äþ€þ€Šþ†þþ€þþ€þÃþ€þ€Šþ†þþþ€þ€þÃþ þþþþ€þ€þ‚€þ€€þþþ€þ€þÃþ#þþþþþþþþþþþþþþþþþþþ€þƒÄþ#þþþþþþþþþþþþþþþþþþ€þ€þÃþþþ€þþþþþþþþþþƒþþþþ€þ€þÃþþþ€þþþþþþþþþþƒþþþ€þ€þÃþ€þ€þþþþþþþþþ€þþþþþ€þþ€þÂþ€þþþþþþ€þ€þþþþþþ„þ„ÿþÿþÿþ×þ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ôþ†ðþŽíþŒîþŒïþŠñþˆòþˆóþ†õþ„öþ„÷þ‚ùþ€úþ€ûþÿþÿþÿþØþ€þ€þ…þþþ€þ„ƒþ‚€þ€þ€Áþ€þ€þþþþþ€þþþ€þ€þ€þ€þÂþ€þ€þþþþþ€þ€þ€þ‚þþþ€þÂþþ€þ€þþþþþ€þ€þ€þ‚þþþþ€þÂþþþþþ€þ‚þþ€þþþþ‚þ þþþþþþÂþþþ€þ€þþþþþ€þ‚‚þ‚þþþþþ€þÂþ€þ€þþþþþ€þþ€þ‚þþþ€þÂþþ€€þþþþþ€þþþ€€þ‚þþþþ€Âþ‚þ€þ€þþþ€þþ€þ€þ€€þ€þ€þ‚þÁþ€‚þþþ…€þ‚€þ€þ€€þ‚€þ€‚þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÿþÑþt8mk@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿneuron-7.5/src/mac/mos2nrn.info000077500000000000000000000016231323325274500165100ustar00rootroot00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions * CFBundleTypeOSTypes **** CFBundleTypeRole Viewer CFBundleIdentifier edu.yale.neuron.mos2nrn CFBundleExecutable a.out CFBundleIconFile mos2nrn CFBundleSignature NRN8 CFBundlePackageType APPL LSPrefersCarbon neuron-7.5/src/mac/mos2nrn.sh000077500000000000000000000007461323325274500161740ustar00rootroot00000000000000#!/bin/sh # Mac os x intermediate between applescript and mos2nrn echo -e "\033]0;NEURON launched from browser\007" if test "$1" = "" ; then echo "The purpose of mos2nrn is to unzip, build, and launch models downloaded from the ModelDB model database at http://senselab.med.yale.edu." echo "Drop a nrnzip (or zip) file containing a NEURON model onto mos2nrn." echo "Press the return key to exit." read a exit 0 fi MOS2NRN="mos2nrn2.sh" "${MOS2NRN}" "$1" "/tmp/mos2nrn".$$ "0" neuron-7.5/src/mac/neurondemo.icns000077500000000000000000000672641323325274500173030ustar00rootroot00000000000000icnsn´ics#His32’ƒþÿÄðÿ‰þÿËôÿŠþÿÿšþ€ÿýû…þÿûÿâdåÈôÿ„þÿç̦]ËÛçûƒþ ÿúÒÆevÇÿþÿÿ쾟€ÿ±ÊÞ“þÿÿì‚þÿï•þÿÒ¹ÿ€þÿ–þÿ½®ÿšþÿ¡êÿ™þÿò·ðÿ™þÿä­õÿ™þÿº»ÿ™þýÿóÿ›þÿæþŠþÿç„ÿ™þÿê‚÷ÿ˜þÿèŽÿ™þÿÒ±ÿ™þÿÕ¿ÿ™þÿÕ¾ÿ™þÿÕ¾ÿ™þÿÕ¾ÿ™þÿÕ¾ÿþþÿÿ•þÿáÈÿþÿ÷îÿþ ÿþþÿðniñÿÿƒÌÿþúó€ÿt£ÿ¨‰ÿþÿùÅ™ÐùžËïŠ÷ÿÿýŽþ ÿÿ¸–³²Y²ÿ›ïÿÕ΀ÿŠþÿüÕ—±Ú…‚¼Ð~'f˜žÙÿŠþÿòÕÏ‘NW$1†~ŠÃÖîÿ‹þÿ j6l= §ñðû€ÿŽþÿ÷Ptë¤UmB7¥«æÿþ ÿñÿÿt¢í̓>vÇÿþÿÿ쾟€ÿ±ÊÞ“þÿÿì‚þÿï•þÿÒ¹ÿ€þÿ–þÿ½®ÿšþÿ¡êÿ™þÿò·ðÿ™þÿä­õÿ™þÿº»ÿ™þýÿóÿ›þÿæþŠþÿç„ÿ™þÿê‚÷ÿ˜þÿèŽÿ™þÿÒ±ÿ™þÿÕ¿ÿ™þÿÕ¾ÿ™þÿÕ¾ÿ™þÿÕ¾ÿ™þÿÕ¾ÿþþÿÿ•þÿÓºÿþÿ÷îÿþÿ€þÿéÝÿþÿƒÌÿþúó€ÿþÿÿýÿ¨‰ÿþÿùÅ™ÐóÿÿøÿèŠ÷ÿÿýŽþ ÿÿ¸–²±tÉÿœïÿÕ΀ÿŠþÿüÕ—±Ú…~Œ¼Ð~'f˜žÙÿŠþÿòÕÏ‘NW$1†~ŠÃÖîÿ‹þÿ j6l= §ñðû€ÿŽþÿ÷Ptë¤UmB7¥«æÿþ ÿñÿÿt¢í̓>vÇÿþÿÿ쾟€ÿ±ÊÞ“þÿÿì‚þÿï•þÿÒ¹ÿ€þÿ–þÿ½®ÿšþÿ¡êÿ™þÿò·ðÿ™þÿä­õÿ™þÿº»ÿ™þýÿóÿ›þÿæþl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#Hih32È”þÿªþåÀÛªþÿͼíþÿ¨þý¸Ž˜¡î§þüÌ”Œ£î¨þÄ[Y´ø¨þÏnh¼ù¨þؘˆÆý¨þÅ¡Ôý¨þ¶¨Ý©þÞ­¨ê¨þϵ¹¨ê¨þÜÓÕÖü¨þÜÍÁЩþݽÇç©þ஽ð©þסɪþ䡽ªþê¯ÄªþÖ¨ÒªþÚ°ÕªþæÔî«þÿ«þóïû©þÌN'¦ÿ¨þ¿?–ÿ¨þûÄ«ãþÿ¨þÿÿþÿüúý©þÿ·×ú¢þ úüÿÿþþÿá®é¢þ ýÞ¨ØõÿÿùÂáþÿ þýúúé«‚àÝÏøÉÜúÿžþùЙ§¶[L†­ŒAV™Ñ÷žþ ÿûêš{M S¼ÓÝï÷¡þ ÿÎxdZ'G«ÁÞùÿ¢þ ɞϸ`hS8a¯ñ¢þ ÿÿçž“×õ¬’¼ð¤þ÷íÃÌÿÿðÊê¥þÿáÉôþÿÿ§þÿ×Õø©þÿó³èªþÿáÓôªþÿÍàú©þÿ÷¬Þªþÿòõ«þÿÿîþ”þÿªþåÀÛªþÿͼíþÿ¨þý¸Ž˜¡î§þüÌ”Œ£î¨þÄ[Y´ø¨þÏnh¼ù¨þؘˆÆý¨þÅ¡Ôý¨þ¶¨Ý©þÞ­¨ê¨þϵ¹¨ê¨þÜÓÕÖü¨þÜÍÁЩþݽÇç©þ஽ð©þסɪþ䡽ªþê¯ÄªþÖ¨Òªþ֪ܲþÔ½èªþÝÓö©þÿÔÅñ©þÍM&¥ÿ¨þ¾?—ÿ¨þý¶–Þþÿ¨þßÖöÿüúý¦þÛÏôÿ·×ú¢þ úüÿÿÛÏôá®é¢þ ýÞ¨ØõßÔïÃáþÿ þýúúé«…|¶×ÐøÉÜúÿžþùЙ§¶\Bƒ­ŒAV™Ñ÷žþ ÿûêš{N S¼ÓÝï÷¡þ ÿÎxdZ'G«ÁÞùÿ¢þ ɞϸ`hS8a¯ñ¢þ ÿÿçž“×õ¬’¼ð¤þ÷íÃÌÿÿðÊê¥þÿáÉôþÿÿ§þÿ×Õø©þÿó³èªþÿáÓôªþÿÍàú©þÿ÷¬Þªþÿòõ«þÿÿîþ”þÿªþåÀÛªþÿͼíþÿ¨þý¸Ž˜¡î§þüÌ”Œ£î¨þÄ[Y´ø¨þÏnh¼ù¨þؘˆÆý¨þÅ¡Ôý¨þ¶¨Ý©þÞ­¨ê¨þϵ¹¨ê¨þÜÓÕÖü¨þÜÍÁЩþݽÇç©þ஽ð©þסɪþ䡽ªþê¯ÄªþÖ¨Òªþ֪ܲþÔ½èªþÜÑõªþÞÓõªþýüý«þÿ«þîèúþÿ¨þÚÎóÿüúý¦þÛÏôÿ·×ú¢þ úüÿÿÛÏôá®é¢þ ýÞ¨ØõßÔïÃáþÿ þýúúé«…|¶×ÐøÉÜúÿžþùЙ§¶\Bƒ­ŒAV™Ñ÷žþ ÿûêš{N S¼ÓÝï÷¡þ ÿÎxdZ'G«ÁÞùÿ¢þ ɞϸ`hS8a¯ñ¢þ ÿÿçž“×õ¬’¼ð¤þ÷íÃÌÿÿðÊê¥þÿáÉôþÿÿ§þÿ×Õø©þÿó³èªþÿáÓôªþÿÍàú©þÿ÷¬Þªþÿòõ«þÿÿîþh8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿit32Ãÿþ´þýþÿÿúþÚ±×úþÉJUÕøþýþÌL]ÝþýøþÄEeäùþÿµ…Ïÿÿþþÿòþ ÿŸÖÞöûÞÚêíüòþ Á…D&¡òˆeÄûôþñ”#ƒôóþú²;€qñóþ ù±:qñôþð”#‚ôõþÏl TÅúõþî̉Th½ûõþýþþêÒÞõþýøþÿüþÿ…þýÿÿñþÿ…þÿÝÂïðþÿ„þýÿ‡mÜðþÿ„þÿÚ@šòðþÿƒþÿáZVÔýäþÿˆþÿƒþÿ½^ºøäþ÷èÿÿý…þÿƒþèQoâåþÞ‹Äíÿÿ„þÿþÿê‚UÅ÷åþõµMf¿€ÿ‚þÿþÿ­W¼öçþ ð¯gJ*}è÷æ–Öõ€ÿÞXV·Üèú€ÿýÖþ&ûËaZM…mÄÍÿò׉& kÄW»ÿÿøÐÈY2\Y=H¨¿¼ÊóÖþ&ýïйp_^q{£«¦‹;(LU/O— «A- F!EkpmŒæÙþ#úñììëÑI?ƒ”e 50jirˆ……†…ÖìëëïúÞþûÑL!!œüæ–Öõ€ÿÞXV·Üèú€ÿýÖþ&ûËaZM…mÄÍÿò׉& YÆW»ÿÿøÐÈY2\Y=H¨¿¼ÊóÖþ&ýïйp_^q{£«¦‹;(LU/O— «A- F!EkpmŒæÙþ#úñììëÑI?ƒ”e 50jirˆ……†…ÖìëëïúÞþûÑL!!œüæ–Öõ€ÿÞXV·Üèú€ÿýÖþ&ûËaZM…mÄÍÿò׉& YÆW»ÿÿøÐÈY2\Y=H¨¿¼ÊóÖþ&ýïйp_^q{£«¦‹;(LU/O— «A- F!EkpmŒæÙþ#úñììëÑI?ƒ”e 50jirˆ……†…ÖìëëïúÞþûÑ CFBundleInfoDictionaryVersion 6.0 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions * CFBundleTypeOSTypes **** CFBundleTypeRole Viewer CFBundleIdentifier edu.yale.neuron.neurondemo CFBundleExecutable a.out CFBundleIconFile neurondemo CFBundleSignature NRN7 CFBundlePackageType APPL LSPrefersCarbon neuron-7.5/src/mac/neurondemo.sh000077500000000000000000000007701323325274500167460ustar00rootroot00000000000000#!/bin/sh # Mac os x intermediate between applescript and neurondemo echo -e "\033]0;neurondemo\007" NRNGUI="neurondemo" source set_nrnpyenv.sh if test "x$1" != x ; then if test -f "$1" ; then dname=`dirname "$1"` cd "${dname}" arg1=`basename "$1"` shift ${NRNGUI} "$arg1" "$@" nex=$? else cd "$1" shift ${NRNGUI} "$@" nex=$? fi else cd ${NRNGUI} nex=$? fi if test "${nex}" != "0" ; then echo "${NRNGUI} exit status was ${nex}" echo "Press return key to exit" read a fi neuron-7.5/src/mac/njconf.h000077500000000000000000000000251323325274500156560ustar00rootroot00000000000000#define USENRNJAVA 1 neuron-7.5/src/mac/njvmstub.c000077500000000000000000000005711323325274500162520ustar00rootroot00000000000000#include #pragma export on jint nrn2_GetDefaultJavaVMInitArgs(void* args); jint nrn2_CreateJavaVM(JavaVM **pvm, JNIEnv **penv, void *args); #pragma export off jint nrn2_GetDefaultJavaVMInitArgs(void* args) { return JNI_GetDefaultJavaVMInitArgs(args); } jint nrn2_CreateJavaVM(JavaVM **pvm, JNIEnv **penv, void *args){ return JNI_CreateJavaVM(pvm, penv, args); } neuron-7.5/src/mac/nrncarbon.h000077500000000000000000000007201323325274500163650ustar00rootroot00000000000000#include /*#define v mlhv*/ #define HAVE_LIMITS_H 1 #include #include #include #include #pragma once off /*#undef v*/ #define SYSV 1 #define MAC 1 #define motif_kit #define sgi_motif_kit #define default_kit SMFKit #define HOC 1 #define CABLE 1 #define OOP 1 #define OC_CLASSES "nrnclass.h" #define USECVODE 1 #define CVODE 1 #define USEMATRIX 1 #define HAVE_UNISTD_H 1 #define carbon 1 #undef check neuron-7.5/src/mac/nrnconf.h000077500000000000000000000003001323325274500160400ustar00rootroot00000000000000#define u_int unsigned int #define int32_t long #define u_int32_t unsigned long #define HAVE_POSIX_SIGNALS #define RETSIGTYPE void #define HAVE_IV 1 #define USEBBS 1 #define yyoverflow printf neuron-7.5/src/mac/nrngui.icns000077500000000000000000001022561323325274500164210ustar00rootroot00000000000000icns„®ics#His32)þÿÿŠþÿöùŠþÿãöÿ‰þÿçûÿ‰þÿçûÿ‰þ ÿåøýüýüýýüýü€ýCþÿÝêñîôîññíôîññôÿÿÛïñíóéññèóêïðîÿÿÌøûòÿçûøæÿèôøãÿÿÙôþûþöýüöþøüüöþÿåùŠþÿçûŠþÿçúŠþÿä÷ŠþÿóøÿŠþÿÿŠþþÿÿŠþÿöùÿÿˆþÿãû‘Îÿ‡þÿèñ‘œô‡þÿéå­ËºÿþXÿôôÿþÿç×­ÿžëÿýüýüðïýþÿãÀ¯úçõñíôîòóôÿÿá¶»òò ÇóèóêïðîÿÿÕ«ÔõÿÑ¥æèÿèôøãÿÿÆŒ÷üþùÚ¢÷þøüüöþÿ­½ÿ€þü³Îÿ‚þÿ°äÿþó—õÿþÿÞ÷‚þ ÿÍ‘¦¦¤äÿÿä÷ƒþ ÿøòóòûþÿóøÿƒþÿ€þÿÿŠþþÿÿŠþÿöùÿÿˆþÿãû‘Îÿ‡þÿèñ‘œô‡þÿéå­ËºÿþXÿôôÿþÿç×­ÿžëÿýüýüðïýþÿãÀ¯úçõñíôîòóôÿÿá¶»òò ÇóèóêïðîÿÿÕ«ÔõÿÑ¥æèÿèôøãÿÿÆŒ÷üþùÚ¢÷þøüüöþÿ­½ÿ€þü³Îÿ‚þÿ°äÿþó—õÿþÿÞ÷‚þ ÿÍ‘¦¦¤äÿÿä÷ƒþ ÿøòóòûþÿóøÿƒþÿ€þÿÿŠþs8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#il32 ¿þÿýšþÿãÃúÿ˜þÿÚçÿþÿÿ–þÿÛçÿþ€ÿ•þÿÛçÿþÿþÿ•þÿÛçÿþÿþþÿ”þÿÛçÿþÿþþÿ”þÿÛèÿþÿ€þÿ“þÿÛåÿþÿ€þÿ“þÿÙØÿƒþÿ’þÿØÄø÷÷ôïø÷÷öìø÷÷øìö÷÷øïô€÷óô€þÿÙÍ€àÔÉáßßÝÃàßßàÃÜßßáÉÔàßàÒãÿþþÿÜÜñ€ðï†ðïðï‚ðûÿþþÿÒå€ÿúù€ÿùñ€ÿýðý€ÿû÷€ÿòõ€þý²Í€ÿêáÿþÿíÓýÿÿøËïÿþÿØØÿþÿÍßÿþþü ¾€ÿ,è×ÿþÿàÇýÿÿõ¹æÿþþÁÅÿþÿÂÍÿþþÿÈÞÿþþúõþþÿñæýþÿûæù€þ òðþþÿîëÿþþÿØÑý…þüþþÿþü†þýþÿÙÑŠþÿŒþÿÛãÿ‰þÿÿ‹þÿÛèÿŠþÿ‹þÿÛçÿ‹þÿŠþÿÛçÿ‹þÿŠþÿÛçÿŒþ†ÿþÿÛçÿ™þÿÛêÿ™þÿÝÄûÿ™þüòý›þÿ¹þ¿þÿýþþÿÿ–þÿãÃúÿðñÿ•þÿÚçÿÿp'îÿ”þÿÛçÿÿRQdÿ”þ ÿÛçÿîDóY°ÿ“þ ÿÛçÿÎOÿÀOõÿ‹þÿƒþ ÿÛçÿÂ^ÿÿe¡ÿŠþøóû‚þ ÿÛèÿÀ]ÿÿÊJöÿˆþÿå¿ôÿþ ÿÛåÿžuÿþÿo™ÿˆþÿöÍÿ‚þ ÿÙØÿ‡‘ÿþÿÐNçÿˆþÿÿƒþÿØÄúj¨õïøøuˆìø÷÷øìö÷÷øïô€÷óô€þ-ÿÙÍê\ ÜÉáâÆ<£äßßàÃÜßßáÉÔàßàÒãÿþþÿÜÜõQ¼óïððö§[é€ðïðï‚ð ûÿþþÿÒå÷Gèúù€ÿôb ÿÿýðý€ÿû÷€ÿòõ€þRý²ÎìEúêáÿþÿô¦ZÎÿøËïÿþÿØØÿþÿÍßÿþþü ÃÏTÿè×ÿþÿàÌ jèø¹æÿþþÁÅÿþÿÂÍÿþþÿÈ슆ÿúõþþÿñçù‹iýæù€þòðþþÿîëÿþþÿتEÌÿƒþüþê\±ý†þýþÿË/’÷†þÿÂSíÿŠþÿÁCìˆþø}‰ÿŠþÿÀ^ÿˆþÿëEÙÿ‰þÿœpÿŠþ’qÿÿˆþÿ¼·ÿ‰þÿïKµþ„ÿþÿÛæÿŠþÿÉ8Nfe csóÿþþÿÛçÿ‹þÿî̓ËÐúÿþþÿÛêÿŒþ†ÿþÿÝÄûÿ™þüòý›þÿ¹þ¿þÿýþþÿÿ–þÿãÃúÿðñÿ•þÿÚçÿÿp'îÿ”þÿÛçÿÿRQdÿ”þ ÿÛçÿîDóY°ÿ“þ ÿÛçÿÎOÿÀOõÿ‹þÿƒþ ÿÛçÿÂ^ÿÿe¡ÿŠþøóû‚þ ÿÛèÿÀ]ÿÿÊJöÿˆþÿå¿ôÿþ ÿÛåÿžuÿþÿo™ÿˆþÿöÍÿ‚þ ÿÙØÿ‡‘ÿþÿÐNçÿˆþÿÿƒþÿØÄúj¨õïøøuˆìø÷÷øìö÷÷øïô€÷óô€þ-ÿÙÍê\ ÜÉáâÆ<£äßßàÃÜßßáÉÔàßàÒãÿþþÿÜÜõQ¼óïððö§[é€ðïðï‚ð ûÿþþÿÒå÷Gèúù€ÿôb ÿÿýðý€ÿû÷€ÿòõ€þRý²ÎìEúêáÿþÿô¦ZÎÿøËïÿþÿØØÿþÿÍßÿþþü ÃÏTÿè×ÿþÿàÌ jèø¹æÿþþÁÅÿþÿÂÍÿþþÿÈ슆ÿúõþþÿñçù‹iýæù€þòðþþÿîëÿþþÿتEÌÿƒþüþê\±ý†þýþÿË/’÷†þÿÂSíÿŠþÿÁCìˆþø}‰ÿŠþÿÀ^ÿˆþÿëEÙÿ‰þÿœpÿŠþ’qÿÿˆþÿ¼·ÿ‰þÿïKµþ„ÿþÿÛæÿŠþÿÉ8Nfe csóÿþþÿÛçÿ‹þÿî̓ËÐúÿþþÿÛêÿŒþ†ÿþÿÝÄûÿ™þüòý›þÿ¹þl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#Hih32 zÿþŽþ€ÿªþùÉÒ©þÿä§æ©þÿãÄÿþÿÿ£þÿãÂÿ€þÿ¢þÿãÂÿ€þÿþþÿ¢þÿãÂÿ€þÿþþÿÿ¡þÿãÂÿ€þÿ€þÿ¡þÿãÂÿ€þÿ€þÿÿ þÿãÂÿ€þÿþÿ þÿãÂÿ€þÿþÿÿŸþÿãÂÿ€þÿ‚þÿŸþÿãÃÿþþÿÿ‚þÿÿ“þÿ‡þÿä¿ûþþÿÿƒþÿžþÿä¨çþþÿÿ„þÿþ ÿä¡Ùþþÿþþú÷þÿþùøƒþøùƒþ÷úƒþõú‚þÿä½î‚íÙÊîíîÔÏîíîÏÔîíîÊÙ‚íîÈêÿþ ÿæ›ÉÄÄÅÄŶ­ÆÄƳ°ÅÄŰ²ÅÄÆ­¶ÅÄÆ®îÿþÿã½ú‚÷øøƒ÷øøƒ÷øøƒ÷øø‚÷öùƒþÿääÿƒþ ÿݽÿþþÿþþûüƒþóøƒþòù„þ÷‚þüïõþÿú·›û€ÿþÿÖÞÿ€þ ÿöÍÏþÿþþÿôÊÑ‚þÿæÆÿ€þÿà¾åÿ€þÿð¡„ó€ÿþÿÈÆÿþöÄÆþÿ€þóÅ«þÿòµ›ý€þÿÓ¥Ôÿ€þ ÿð¢ƒòÿÿþþÿÜÉÿ€þ ÿó¸ÞþÿÿþÿóÍ«þÿ춘ú€þÿÞ¶½ÿþüÀ£ýþÿ€þñêÿ€þ ÿôÇÝþþÿÿþùÓÝÿþüóÝýþõÒáÿþÿàÁ€ÿþýƒþõ÷€þÿþþöú„þý‚þýõü‚þÿä²ðÿþÿ•þÿåÙþÿÿ”þÿä¼ô‘þÿ”þÿãÃÿ‘þÿÿ“þÿãÂÿ’þÿ“þÿãÂÿ“þÿ’þÿäÂÿ“þÿ’þÿäÂÿ“þÿÿ‘þÿãÂÿ”þÿÿþÿãÂÿ•þ‹ÿƒþÿãÂÿ©þÿãÂÿ©þÿãÂÿ©þÿâ»ÿ©þÿò¦Àªþ€ÿÿþµþÿþŽþ€ÿªþùÉÒ€þ€ÿ£þ ÿä§æþþÿÙ­ëÿ¢þ ÿãÄÿþþÿZÿÿ¡þ ÿãÂÿþþÿJ €ÿ¡þ ÿãÂÿþþÿ(’²Òÿ þ ÿãÂÿþÿÞ ºÿPFùÿŸþ ÿãÂÿþÿ¿ àÿÐ ºÿŸþÿãÂÿþÿŽ%ûÿÿc3óÿžþÿãÂÿþÿ+€ÿäžÿ’þûüù†þÿãÂÿþÿ)ÿÿþÿr+õ‘þÿÜÜÉÿ…þÿãÂÿþÿ‡-ÿÿþÿ×ÿþÿè¨Ãÿ…þÿãÃÿþÿK[ÿÿþþÿ€$ìÿþÿ´çÿ…þÿä¿ûþÿ9zÿ€þÿØ"ýþÿþÿ†þÿä¨çÿ÷$Œÿþÿ’áÿ›þÿä¡Ùÿè Áÿú÷þþÿê-{òùƒþøùƒþ÷úƒþõú‚þ ÿä½îîÛ ¼ïÙÊî€íš¤ÔîíîÏÔîíîÊÙ‚íîÈêÿþÿæ›ÉƲ —ʶ­ÆÄÄÅÅ6*°ÆÄŰ²ÅÄÆ­¶ÅÄÆ®îÿþ ÿã½úøÇ Íúøø÷üÌ™ù‚÷øøƒ÷øø‚÷öùƒþÿäÃÿÿ¡î…ÿý/Ø“ÿƒþ ÿݽÿÿo<ýÿûü‚þÿà7fùþòù„þ÷‚þüïõþ ÿú·›ûÿS[ÿÿÖÞÿ€þÿöÔ†%¥€ÿôÊÑ‚þÿæÆÿ€þÿà¾åÿ€þ ÿð¡„óÿFdÿÿÈÆÿþ öÅÆ-ÔÿþóÅ«þÿòµ›ý€þÿÓ¥Ôÿ€þ ÿð¢ƒôì•ÿÿÜÉÿ€þ ÿó¸âêB_æÿóÍ«þÿ춘ú€þÿÞ¶½ÿþ üÀ£þÁ âÿþñêÿ€þ ÿôÇÝÿÛ)OüúÓÝÿþüóÝýþõÒáÿþ ÿßÃÿx,ùÿþþýƒþ õ÷þþº¥ÿöú„þý‚þýõü‚þÿç§½ ƒÿ‹þú~'èÿ“þÿë5):Ùÿ‹þÿæ'{ÿ“þÿì SÒûþÿ¥Äÿ’þÿìŸÿþòZCöÿ‘þÿí¾ÿþÿÙ §ÿ‘þÿé½ÿþýx$òÿþÿ¹ ÞÿþÿãœÿþÿÁ0õÿ‘þýz"ëÿÿþ†ÿ„þÿâ­ÿ’þÿï1UÀóˆÿƒþÿãÂÿ“þÿÒ"1D…B;~ÿ‚þÿãÂÿ”þÿ㘇†‚¬ÿ‚þÿãÂÿ•þ‹ÿƒþÿãÂÿ©þÿâ»ÿ©þÿò¦Àªþ€ÿÿþµþÿþŽþ€ÿªþùÉÒ€þ€ÿ£þ ÿä§æþþÿÙ­ëÿ¢þ ÿãÄÿþþÿZÿÿ¡þ ÿãÂÿþþÿJ €ÿ¡þ ÿãÂÿþþÿ(’²Òÿ þ ÿãÂÿþÿÞ ºÿPFùÿŸþ ÿãÂÿþÿ¿ àÿÐ ºÿŸþÿãÂÿþÿŽ%ûÿÿc3óÿžþÿãÂÿþÿ+€ÿäžÿ’þûüù†þÿãÂÿþÿ)ÿÿþÿr+õ‘þÿÜÜÉÿ…þÿãÂÿþÿ‡-ÿÿþÿ×ÿþÿè¨Ãÿ…þÿãÃÿþÿK[ÿÿþþÿ€$ìÿþÿ´çÿ…þÿä¿ûþÿ9zÿ€þÿØ"ýþÿþÿ†þÿä¨çÿ÷$Œÿþÿ’áÿ›þÿä¡Ùÿè Áÿú÷þþÿê-{òùƒþøùƒþ÷úƒþõú‚þ ÿä½îîÛ ¼ïÙÊî€íš¤ÔîíîÏÔîíîÊÙ‚íîÈêÿþÿæ›ÉƲ —ʶ­ÆÄÄÅÅ6*°ÆÄŰ²ÅÄÆ­¶ÅÄÆ®îÿþ ÿã½úøÇ Íúøø÷üÌ™ù‚÷øøƒ÷øø‚÷öùƒþÿäÃÿÿ¡î…ÿý/Ø“ÿƒþ ÿݽÿÿo<ýÿûü‚þÿà7fùþòù„þ÷‚þüïõþ ÿú·›ûÿS[ÿÿÖÞÿ€þÿöÔ†%¥€ÿôÊÑ‚þÿæÆÿ€þÿà¾åÿ€þ ÿð¡„óÿFdÿÿÈÆÿþ öÅÆ-ÔÿþóÅ«þÿòµ›ý€þÿÓ¥Ôÿ€þ ÿð¢ƒôì•ÿÿÜÉÿ€þ ÿó¸âêB_æÿóÍ«þÿ춘ú€þÿÞ¶½ÿþ üÀ£þÁ âÿþñêÿ€þ ÿôÇÝÿÛ)OüúÓÝÿþüóÝýþõÒáÿþ ÿßÃÿx,ùÿþþýƒþ õ÷þþº¥ÿöú„þý‚þýõü‚þÿç§½ ƒÿ‹þú~'èÿ“þÿë5):Ùÿ‹þÿæ'{ÿ“þÿì SÒûþÿ¥Äÿ’þÿìŸÿþòZCöÿ‘þÿí¾ÿþÿÙ §ÿ‘þÿé½ÿþýx$òÿþÿ¹ ÞÿþÿãœÿþÿÁ0õÿ‘þýz"ëÿÿþ†ÿ„þÿâ­ÿ’þÿï1UÀóˆÿƒþÿãÂÿ“þÿÒ"1D…B;~ÿ‚þÿãÂÿ”þÿ㘇†‚¬ÿ‚þÿãÂÿ•þ‹ÿƒþÿãÂÿ©þÿâ»ÿ©þÿò¦Àªþ€ÿÿþµþh8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿit32 ?ÿþÿþÿþÿþÿþÿþÿþÿþóþ€ÿþÿÿöþÿïØøÿæÜÿôþ ÿ÷]žêo`¾ÿþ€ÿìþ ÿÕ¡ÿç¯Åÿ‡ÿ€þÿ~N•ÿëþ ÿÚ”Ÿïº¾öŒÿ€þÿ~ëóÿëþ ÿàI¤—¶¾öŒÿ€þÿ‡îþ ÿØ•ÿ°¿÷Œÿ€þÿ‡ýíþ ÿە󎶰àŽÿ€þÿ‡ý‹þ€ÿÝþÿœPÅÿ}Zâÿ€þÿ‡ý‹þÿÝþ€ÿþ€ÿþÿ‡ýŠþÿ€þÿÿçþÿ‡ýŠþÿþÿçþÿ‡ý‰þÿÿ‚þÿæþÿ‡ý‰þÿƒþÿæþÿ‡ý‰þÿ„þÿåþÿ‡ý‰þÿ„þÿÿäþÿ‡ý‰þÿ…þÿäþÿ‡ý‰þÿ…þÿÿãþÿ‡ý‰þÿ†þÿãþÿ‡ý‰þÿ†þÿÿâþÿ‡ý‰þÿ‡þÿâþÿ‡ýˆþÿÿ‡þÿÿáþÿ‡ýˆþÿÿˆþÿáþÿ‡ýˆþÿÿˆþÿÿàþÿ‡ýˆþÿÿ‰þÿàþÿ‡ýˆþÿÿ‰þÿÿßþÿ‡ýˆþÿÿŠþÿÿÞþÿ‡ýˆþÿŒþÿÞþÿ‡ýˆþÿŒþÿÞþÿ‡ýˆþÿþÿºþÿŸþÿ‡ýˆþÿþÿºþÿŸþÿ‡ýˆþÿŽþÿÜþÿ‡ýˆþÿŽþÿÜþÿ‡ýˆþÿþÿÛþÿ‡ýˆþÿþÿÛþÿ‡ýˆþÿþÿÿÓþúø‚þÿ‡ýˆþÿþÿÎþýñÖûúÌÁðþÿˆýˆþÿþÿÿÍþÿÆcüÛƒ„³ÿ€þÿÔåý†þÿ‘þÿÍþÿ×nÿ³Ãý‰ÿ€þÿfv®ÿ…þÿ“þÿÌþýÿü¶¾öŒÿ€þÿ‚ëóÿ…þÿ“þÿÍþÿŠü¶¾öŒÿ€þÿ‡þÿ†þÿ”þÿÌþÿ‰û·»óŒÿ€þÿ‡ý‡þÿ…þý‹þÿ‚þý¥þý‘þýˆþÿúÊ¥Á¡ÿ€þÿ‡ý‡þÿ„þûâŒþÿ€þõåþïêþéðþäö‡þÿÀùý›çÿ€þÿˆý‡þÿƒþÿó“ÿ‹þÿÿþÿß ÿŽþÿȶÿŽþÿ±ÍÿŽþÿáÿ‡þÿþþ€ÿþÿƒêëâ‚ìëÐíŽë츤íŽëí ½ìŽëíŽàÿ‘þÿp¢†¥¦„¥¦žgªŒ¥¦¦§’oªŽ¥¨†{ªŽ¥ªx‰¨Ž¥ªsèÿ‘þÿr¦†©ª…©ª­Ž©ªª«­©«¬©¬«©¨²ùÿ‘þÿˆþåÿ’þÿ‡ý†þÿšþÿÒþÿ‡ý†þÿšþÿÒþÿ‡ý†þÿšþÿÿÑþÿ‡ý†þÿ›þÿÑþÿ‡ý†þÿ›þÿÿÐþÿ‡‡þÿœþÿÐþ¿Vâ…þÿÿ…þâÊþò­°õÿÿŒþ駸ûþù¬ïþû¬§±úþÿâ”Y¥ÿ„þÿ…þÿ¤ƒÿþÿ½œÄÿÿ‹þÿ¬¦—ÖÿþÿÊpÙÿ‹þÿós¨²úþÿÇ«†ÿ„þÿ…þÿ¿ÿþÿÀÿþÿŠþÿ¸ì®¿ÿŒþÿ÷›™Òÿ‹þÿîæõÿþÿȬ‡ÿ„þÿ…þÿöÿŽþöÛªñþþÿÿŠþõÁ‡ÕÿŒþÿÇÁ«Òÿ‹þÿö}»ýþÿȬ‡ÿ„þÿ…þÿðŒÿþÿðªÝþÿ‰þÿöÑšÌÿŒþÿ¢l°ÿŒþü·ŽðÿŽþÿÇ­…ÿ„þÿ…þÿð‹ÿþÿ½½ÿÿ€þÿÿˆþÿ»þÀµÿþ±«f®ÿ‹þÿõÄÿ‘çÿŽþÿà“[¡ÿ„þÿ…þÿñ’ÿþÿš“¦Ýÿ€þÿÿ‡þÿ©¨–Õÿþýÿ¦ÒÿŒþö”¤“óþü»Sß„þÿÿ†þøËþÍŸ¢Ü‚þÿÿ‡þ壴ùþÖêþÿΟÊÿ’þ……þÿ›þýúúüƒþÿˆþúü¥þùý’þÿ‡ý„þÿ¥þÿÿÈþÿ‡ý„þÿ¦þÿÈþÿ‡ý„þÿ¦þÿÿÇþÿ‡ýƒþÿÿ§þÿÿÆþÿ‡ýƒþÿ©þÿÆþÿ‡ýƒþÿªþÿÅþÿ‡ýƒþÿªþÿ»þ‚ÿ‚þÿ‡ý‚þÿ¬þÿÿ¸þÿÕêó²Õÿþÿ‡þÿ€þÿÿ­þÿ·þÿìx»³˜”êÿ€þÿƒîõÿþÿÿ¯þÿ´þ ÿþÿ¨¯’æ Òÿ€þÿfu­€ÿ°þÿ²þ ÿùñùî£È°ÿ§Ïÿ€þÿÓå´þÿ±þ ÿÐrĦ˜š‘ÿ¦Ïÿ€þÿˆýÿ´þÿÿ±þ ðÒ칑s|ÿ§Íÿ€þÿ‡ýÿµþÿ³þ ýòã¶£—Ä’Ûÿ€þÿ‡ýÿµþÿµþÿáÔÕŽ¬÷þÿ‡þÿ¶þÿµþüüýð÷ýþÿ‡þÿ¶þÿÿ¾þÿ‡¹þÿ¾þÿ‡¹þÿÿ½þÿ‡ºþÿ½þÿ‡ºþÿÿ¼þÿ‡»þÿ¼þÿ‡»þÿÿ»þÿ‡¼þÿ»þÿ‡¼þÿÿºþÿ‡½þÿºþÿ‡¾þÿ¹þÿ‡¾þÿÿ¸þÿ‡ý¾þÿ¸þÿ‡ý¾þÿÿ·þÿ‡ý¿þÿÿ¶þÿ‡ýÀþÿ¶þÿ‡ýÁþ‚ÿšþÿ“þÿ‡ýÃþžÿ“þÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýîþ€ÿþ€ÿ‚þÿ‡ýîþü«¹ÿî¡Ìÿþÿ‡îþ ÿ°‰ƒÏ‚æÿ€þÿîõÿëþ ÿŽøÑ©ŽÿªÌÿ€þÿ{L”ÿéþ úòÿ“ãÀ­ÿ¦Ïÿþ€ÿéþ ÿÁF¨ñ_<­‘ÿ¦Ïÿñþ€ÿ¿ÿÓªÿ¨Íÿóþ ÿªšÁ–¹ŒÝÿóþÿö‡šÿâz³ÿõþ€ÿþ€ÿýÿþÿþÿþÿþèþÿþÿþÿþÿþÿþÿþÿþÿþóþ€ÿþÿÿöþÿïØøÿæÜÿôþ ÿ÷]žêo`¾ÿþ€ÿìþ ÿÕ¡ÿç¯Åÿ‡ÿ€þÿ~N•ÿëþ ÿÚ”Ÿïº¾öŒÿ€þÿ~ëóÿëþ ÿàI¤—¶¾öŒÿ€þÿ‡ŒþÿÿÝþ ÿØ•ÿ°¿÷Œÿ€þÿ‡ýŠþÿòìÿÜþ ÿە󎶰àŽÿ€þÿ‡ýŠþÿzzýÿÛþÿœPÅÿ}Zâÿ€þÿ‡ý‰þÿÂI7üÿÛþ€ÿþ€ÿþÿ‡ýˆþÿôuÿÇuÿæþÿ‡ýˆþ ÿè%öÿÿ¿ÿåþÿ‡ýˆþ ÿžùÿþÿyõÿäþÿ‡ýˆþ ÿkyÿþþÿùÄÿäþÿ‡ýˆþÿr„ÿ€þÿf$ùÿãþÿ‡ý‡þÿÿS€ÿ€þÿù!iÿãþÿ‡ý‡þÿìÍÿþÿСüâþÿ‡ý‡þÿì,õÿ‚þÿ“Üÿáþÿ‡ý‡þÿí*ðÿ‚þÿÿ=ƒýáþÿ‡ý‡þÿê*ðÿƒþÿ”äÿàþÿ‡ý‡þÿ®!òÿƒþÿû1“áþÿ‡ý‡þÿxfÿ…þÿ„(íÿßþÿ‡ý‡þÿ|wÿ…þÿõ&£ÿßþÿ‡ý‡þÿ|uÿ†þÿu3óÿÞþÿ‡ý‡þÿ|uÿ†þÿíªøºþóþöûþÿ‡ýˆþ_yÿ‡þÿk·ÿ¸þý™ÿ²×ÿœþÿ‡ý†þÿô¸ÿ‡þÿçQJü¸þýˆø¡Õÿœþÿ‡ý†þÿó,ìÿˆþÿÍÞÿ·þÿ­Ã”ûÿœþÿ‡ý†þÿó*çÿ‰þÿ4ޏþÿ»©•ÿþÿ‡ý†þÿó*çÿ‰þÿ¡çÿ¶þÿóOÂÿþÿ‡ý†þÿó)çÿ‰þÿÿ*¸þÿ—æÿþÿ‡ý†þÿÞ!éÿŠþÿ‘ðÿ·þÿÿžþÿ‡ý†þÿ<ùÿŠþÿù-™ÿÚþÿ‡ý†þÿ‰mÿŒþÿ‘ ñÿÙþÿ‡ý†þÿŠhÿŒþÿó&¦ÿÙþÿ‡ý†þÿŠhÿŒþÿÿ‚)êÿÑþúø‚þÿ‡ý†þÿ‹hÿþÿë%ñÌþýñÖûúÌÁðþÿˆý†þÿ„gÿþÿÿƒ²ÿËþÿÆcüÛƒ„³ÿ€þÿÔåý…þR{ÿŽþÿÿeXôËþÿ×nÿ³Ãý‰ÿ€þÿfv®ÿƒþÿù#ÅÿþÿƾÿÊþýÿü¶¾öŒÿ€þÿ‚ëóÿƒþÿù.âÿþÿYf÷ËþÿŠü¶¾öŒÿ€þÿ‡þÿ„þÿà:çÿþÿºÊÿÊþÿ‰û·»óŒÿ€þÿ‡ý…þÿžXÿ„þýŠþÿLt÷€þý¥þý‘þýˆþÿúÊ¥Á¡ÿ€þÿ‡ý…þÿ’ZÿƒþûâŠþÿ®½ÿþõåþïêþéðþäö‡þÿÀùý›çÿ€þÿˆý…þÿdlÿ‚þÿó“ÿ‰þÿÿiKúÿß ÿŽþÿȶÿŽþÿ±ÍÿŽþÿáÿ‡þÿþþ€ÿþÿƒê†ë'©ìƒëâ‚ì‹ëºÄðÏíŽë츤íŽëí ½ìŽëíŽàÿ‘þÿp¢…¥¦"¨‚¥¦žgªŠ¥¦¢*;•oªŽ¥¨†{ªŽ¥ªx‰¨Ž¥ªsèÿ‘þÿr¦…©ª"«ƒ©ª­Œ©ª°/*«¬©«¬©¬«©¨²ùÿ‘þÿˆþ†ÿ5Ø—ÿÑ.¨½ÿ’þÿ‡ý…þ÷*Òÿ–þÿx?òÑþÿ‡ý„þÿË#ãÿ–þÿÑ)’ÿÐþÿ‡ý„þÿ¦>ùÿ–þÿÿ—(ÔÐþÿ‡ý„þÿ¦Sÿ˜þÿó<{ÿÏþÿ‡ý„þÿ©Pÿ™þÿ¡*ÈÿÎþÿ‡…þÿŒOÿ™þÿëSHºÿÍþ¿Vâ„þÿM‚ÿ„þâÊþò¬°ÉRNÿ‹þ駸ûþù¬ïþû¬§±úþÿâ”Y¥ÿƒþÿ4¿ÿƒþÿ¤ƒÿþÿ½œÉÎÀÿ‰þÿ¬¦—ÖÿþÿÊpÙÿ‹þÿós¨²úþÿÇ«†ÿƒþÿ:Éÿƒþÿ¿ÿþ ÿÀî¸Áüf@äÿˆþÿ¸ì®¿ÿŒþÿ÷›™Òÿ‹þÿîæõÿþÿȬ‡ÿ‚þÿñ*ÉÿƒþÿöÿŽþ öÛªñþÛ6uùÿˆþõÁ‡ÕÿŒþÿÇÁ«Òÿ‹þÿö}»ýþÿȬ‡ÿ‚þÿÊ$ãÿƒþÿðŒÿþ ÿðªÝþþÿ²Ûÿ‡þÿöÑšÌÿŒþÿ¢l°ÿŒþü·ŽðÿŽþÿÇ­…ÿ‚þÿ´=…þÿð‹ÿþ ÿ½½ÿÿþþüxÿ¸þÿÕÏÿ¹þÿ?»ÿ¹þüC`ÿ¹þÿ@½ÿ¹þÿʨÿ¸þÿ@¼ÿ¹þýû‹Üÿ·þÿ?ºÿ»þóEvÿ·þÿpéÿ»þÿžêÿ¶þÿ‡ý¼þÿõ:Yÿÿµþÿˆý½þÿÑTøÿÿ³þÿ‡ý¾þü¤f£éÿý’þÿ‡ý¾þýÿÑ/tî—æî•ÿ’þÿ‡ýÀþÿþÞ\\šÿ’þÿ‡ýÂþ€ÿʶ—¹¸½ý“þÿ‡ýÅþœÿ“þÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýîþ€ÿþ€ÿ‚þÿ‡ýîþü«¹ÿî¡Ìÿþÿ‡îþ ÿ°‰ƒÏ‚æÿ€þÿîõÿëþ ÿŽøÑ©ŽÿªÌÿ€þÿ{L”ÿéþ úòÿ“ãÀ­ÿ¦Ïÿþ€ÿéþ ÿÁF¨ñ_<­‘ÿ¦Ïÿñþ€ÿ¿ÿÓªÿ¨Íÿóþ ÿªšÁ–¹ŒÝÿóþÿö‡šÿâz³ÿõþ€ÿþ€ÿýÿþÿþÿþÿþèþÿþÿþÿþÿþÿþÿþÿþÿþóþ€ÿþÿÿöþÿïØøÿæÜÿôþ ÿ÷]žêo`¾ÿþ€ÿìþ ÿÕ¡ÿç¯Åÿ‡ÿ€þÿ~N•ÿëþ ÿÚ”Ÿïº¾öŒÿ€þÿ~ëóÿëþ ÿàI¤—¶¾öŒÿ€þÿ‡ŒþÿÿÝþ ÿØ•ÿ°¿÷Œÿ€þÿ‡ýŠþÿòìÿÜþ ÿە󎶰àŽÿ€þÿ‡ýŠþÿzzýÿÛþÿœPÅÿ}Zâÿ€þÿ‡ý‰þÿÂI7üÿÛþ€ÿþ€ÿþÿ‡ýˆþÿôuÿÇuÿæþÿ‡ýˆþ ÿè%öÿÿ¿ÿåþÿ‡ýˆþ ÿžùÿþÿyõÿäþÿ‡ýˆþ ÿkyÿþþÿùÄÿäþÿ‡ýˆþÿr„ÿ€þÿf$ùÿãþÿ‡ý‡þÿÿS€ÿ€þÿù!iÿãþÿ‡ý‡þÿìÍÿþÿСüâþÿ‡ý‡þÿì,õÿ‚þÿ“Üÿáþÿ‡ý‡þÿí*ðÿ‚þÿÿ=ƒýáþÿ‡ý‡þÿê*ðÿƒþÿ”äÿàþÿ‡ý‡þÿ®!òÿƒþÿû1“áþÿ‡ý‡þÿxfÿ…þÿ„(íÿßþÿ‡ý‡þÿ|wÿ…þÿõ&£ÿßþÿ‡ý‡þÿ|uÿ†þÿu3óÿÞþÿ‡ý‡þÿ|uÿ†þÿíªøºþóþöûþÿ‡ýˆþ_yÿ‡þÿk·ÿ¸þý™ÿ²×ÿœþÿ‡ý†þÿô¸ÿ‡þÿçQJü¸þýˆø¡Õÿœþÿ‡ý†þÿó,ìÿˆþÿÍÞÿ·þÿ­Ã”ûÿœþÿ‡ý†þÿó*çÿ‰þÿ4ޏþÿ»©•ÿþÿ‡ý†þÿó*çÿ‰þÿ¡çÿ¶þÿóOÂÿþÿ‡ý†þÿó)çÿ‰þÿÿ*¸þÿ—æÿþÿ‡ý†þÿÞ!éÿŠþÿ‘ðÿ·þÿÿžþÿ‡ý†þÿ<ùÿŠþÿù-™ÿÚþÿ‡ý†þÿ‰mÿŒþÿ‘ ñÿÙþÿ‡ý†þÿŠhÿŒþÿó&¦ÿÙþÿ‡ý†þÿŠhÿŒþÿÿ‚)êÿÑþúø‚þÿ‡ý†þÿ‹hÿþÿë%ñÌþýñÖûúÌÁðþÿˆý†þÿ„gÿþÿÿƒ²ÿËþÿÆcüÛƒ„³ÿ€þÿÔåý…þR{ÿŽþÿÿeXôËþÿ×nÿ³Ãý‰ÿ€þÿfv®ÿƒþÿù#ÅÿþÿƾÿÊþýÿü¶¾öŒÿ€þÿ‚ëóÿƒþÿù.âÿþÿYf÷ËþÿŠü¶¾öŒÿ€þÿ‡þÿ„þÿà:çÿþÿºÊÿÊþÿ‰û·»óŒÿ€þÿ‡ý…þÿžXÿ„þýŠþÿLt÷€þý¥þý‘þýˆþÿúÊ¥Á¡ÿ€þÿ‡ý…þÿ’ZÿƒþûâŠþÿ®½ÿþõåþïêþéðþäö‡þÿÀùý›çÿ€þÿˆý…þÿdlÿ‚þÿó“ÿ‰þÿÿiKúÿß ÿŽþÿȶÿŽþÿ±ÍÿŽþÿáÿ‡þÿþþ€ÿþÿƒê†ë'©ìƒëâ‚ì‹ëºÄðÏíŽë츤íŽëí ½ìŽëíŽàÿ‘þÿp¢…¥¦"¨‚¥¦žgªŠ¥¦¢*;•oªŽ¥¨†{ªŽ¥ªx‰¨Ž¥ªsèÿ‘þÿr¦…©ª"«ƒ©ª­Œ©ª°/*«¬©«¬©¬«©¨²ùÿ‘þÿˆþ†ÿ5Ø—ÿÑ.¨½ÿ’þÿ‡ý…þ÷*Òÿ–þÿx?òÑþÿ‡ý„þÿË#ãÿ–þÿÑ)’ÿÐþÿ‡ý„þÿ¦>ùÿ–þÿÿ—(ÔÐþÿ‡ý„þÿ¦Sÿ˜þÿó<{ÿÏþÿ‡ý„þÿ©Pÿ™þÿ¡*ÈÿÎþÿ‡…þÿŒOÿ™þÿëSHºÿÍþ¿Vâ„þÿM‚ÿ„þâÊþò¬°ÉRNÿ‹þ駸ûþù¬ïþû¬§±úþÿâ”Y¥ÿƒþÿ4¿ÿƒþÿ¤ƒÿþÿ½œÉÎÀÿ‰þÿ¬¦—ÖÿþÿÊpÙÿ‹þÿós¨²úþÿÇ«†ÿƒþÿ:Éÿƒþÿ¿ÿþ ÿÀî¸Áüf@äÿˆþÿ¸ì®¿ÿŒþÿ÷›™Òÿ‹þÿîæõÿþÿȬ‡ÿ‚þÿñ*ÉÿƒþÿöÿŽþ öÛªñþÛ6uùÿˆþõÁ‡ÕÿŒþÿÇÁ«Òÿ‹þÿö}»ýþÿȬ‡ÿ‚þÿÊ$ãÿƒþÿðŒÿþ ÿðªÝþþÿ²Ûÿ‡þÿöÑšÌÿŒþÿ¢l°ÿŒþü·ŽðÿŽþÿÇ­…ÿ‚þÿ´=…þÿð‹ÿþ ÿ½½ÿÿþþüxÿ¸þÿÕÏÿ¹þÿ?»ÿ¹þüC`ÿ¹þÿ@½ÿ¹þÿʨÿ¸þÿ@¼ÿ¹þýû‹Üÿ·þÿ?ºÿ»þóEvÿ·þÿpéÿ»þÿžêÿ¶þÿ‡ý¼þÿõ:Yÿÿµþÿˆý½þÿÑTøÿÿ³þÿ‡ý¾þü¤f£éÿý’þÿ‡ý¾þýÿÑ/tî—æî•ÿ’þÿ‡ýÀþÿþÞ\\šÿ’þÿ‡ýÂþ€ÿʶ—¹¸½ý“þÿ‡ýÅþœÿ“þÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýúþÿ‡ýîþ€ÿþ€ÿ‚þÿ‡ýîþü«¹ÿî¡Ìÿþÿ‡îþ ÿ°‰ƒÏ‚æÿ€þÿîõÿëþ ÿŽøÑ©ŽÿªÌÿ€þÿ{L”ÿéþ úòÿ“ãÀ­ÿ¦Ïÿþ€ÿéþ ÿÁF¨ñ_<­‘ÿ¦Ïÿñþ€ÿ¿ÿÓªÿ¨Íÿóþ ÿªšÁ–¹ŒÝÿóþÿö‡šÿâz³ÿõþ€ÿþ€ÿýÿþÿþÿþÿþèþt8mk@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿneuron-7.5/src/mac/nrngui.info000077500000000000000000000017341323325274500164170ustar00rootroot00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions hoc ses nrc * CFBundleTypeOSTypes **** CFBundleTypeRole Viewer CFBundleIdentifier edu.yale.neuron.nrngui CFBundleExecutable a.out CFBundleIconFile nrngui CFBundleSignature NRN4 CFBundlePackageType APPL LSPrefersCarbon neuron-7.5/src/mac/nrngui.sh000077500000000000000000000007461323325274500161000ustar00rootroot00000000000000#!/bin/sh # Mac os x intermediate between applescript and nrngui echo -e "\033]0;nrngui\007" NRNGUI="nrngui" source set_nrnpyenv.sh if test "x$1" != x ; then if test -f "$1" ; then dname=`dirname "$1"` cd "${dname}" arg1=`basename "$1"` shift ${NRNGUI} "$arg1" "$@" nex=$? else cd "$1" shift ${NRNGUI} "$@" nex=$? fi else cd ${NRNGUI} nex=$? fi if test "${nex}" != "0" ; then echo "nrngui exit status was $nex" echo "Press return key to exit" read a fi neuron-7.5/src/mac/nrnneosm.h000077500000000000000000000002041323325274500162370ustar00rootroot00000000000000/* src/nrncvode/nrnneosm.h. Generated automatically by configure. */ /* define to 1 if allowing NEOSIM */ /* #undef USENEOSIM */ neuron-7.5/src/mac/postinstall.sh.in000066400000000000000000000060341323325274500175500ustar00rootroot00000000000000#!/bin/bash echo "" > /tmp/temp.tmp #Use .bashrc if it exists, otherwise .bash_profile b=.bashrc if test ! -f "$HOME/$b" ; then b=.bash_profile fi bp=$HOME/$b idir=/Applications/NEURON-@PACKAGE_VERSION@ # if cannot find nrniv, then perhaps modify PATH echo "PATH=$PATH" >> /tmp/temp.tmp # can nrniv be found in the users path? if test -f "$bp" ; then (source $bp ; echo "srcpath $PATH" >> /tmp/temp.tmp ; echo `which nrniv` >> /tmp/temp.tmp ; which nrniv) a=$? echo "a=$a" >> /tmp/temp.tmp if test "$a" = "0" ; then addpath=no else addpath=yes fi echo "PATH=$PATH" >> /tmp/temp.tmp echo "in source addpath=$addpath" >> /tmp/temp.tmp else addpath=yes fi echo "PATH=$PATH" >> /tmp/temp.tmp echo "addpath=$addpath" >> /tmp/temp.tmp if test "$addpath" = "yes" ; then a=`osascript -e 'tell app "Installer" to display dialog " Modify PATH to allow launching nrniv from Terminal? ... will append a line to $HOME/'$b' " buttons {"No", "Yes"} default button 1'` echo "a=$a" >> /tmp/temp.tmp if test "$a" = "button returned:Yes" ; then addpath=yes else addpath=no fi fi echo "addpath=$addpath" >> /tmp/temp.tmp if test "$addpath" = "yes" ; then if test ! -f "$bp" ; then echo '#!bin/bash' > "$bp" fi echo "export PATH=$idir/nrn/x86_64/bin:\$PATH #added by NEURON installer" >> "$bp" chown $USER "$bp" fi if true && test "$addpath" = "yes" ; then # Python environment addpyenv=no a=`osascript -e 'tell app "Installer" to display dialog " Modify $HOME/'$b' to allow NEURON + Python ... will set some Python related environment variables. " buttons {"No", "Yes"} default button 1'` echo "a=$a" >> /tmp/temp.tmp if test "$a" = "button returned:Yes" ; then addpyenv=yes else addpyenv=no fi if test "$addpyenv" = "yes" ; then echo "export PYTHONPATH=$idir/nrn/lib/python #added by NEURON installer" >> "$bp" tmpfile=/tmp/$$.tmp (source $bp ; echo "srcpath $PATH" >> /tmp/temp.tmp ; $idir/nrn/x86_64/bin/nrnpyenv.sh |sed -n 's/\(^export.*\)/\1 #added by NEURON installer/p' > $tmpfile) sed '/PYTHONPATH/d' $tmpfile >> "$bp" rm -f $tmpfile fi chown $USER "$bp" fi if true ; then # notice that Command Line Tools and XQuartz also need to be installed. osascript -e 'tell app "Installer" to display dialog "NEURON @PACKAGE_VERSION@ was successfully installed, but ... Mod files cannot be linked into NEURON unless Command Line Tools is installed, and NEURON cannot launch unless XQuartz is installed. If either or both are not installed, you will be asked if you wish to install them. You may wish to install XQuartz last as it requires logging out at the end. (After closing this dialog, you can close the NEURON installer). " buttons {"Continue"}' fi # install command line tools? if gcc -v ; then true else true fi #single click button action for x11 when entering a window #focus follows mouse sudo -u $USER defaults write org.macosforge.xquartz.X11 wm_ffm -bool true echo "defaults write" >> /tmp/temp.tmp # install XQuartz? if /usr/X11/bin/xauth version ; then true else true fi neuron-7.5/src/memacs/000077500000000000000000000000001323325274500147355ustar00rootroot00000000000000neuron-7.5/src/memacs/Makefile.am000077500000000000000000000012721323325274500167760ustar00rootroot00000000000000## The list of programs that we compile. bin_PROGRAMS = memacs memacs_SOURCES = main.c memacs_LDADD = libmemacs.la ## Libraries that we make from this directory: lib_LTLIBRARIES = libmemacs.la libmemacs_la_LIBADD = @TERMCAP_LIB@ libmemacs_la_CFLAGS = @TERMCAP_CFLAGS@ libmemacs_la_SOURCES = ansi.c basic.c bind.c buffer.c display.c file.c \ fileio.c line.c lock.c main1.c random.c region.c \ search.c spawn.c tcap.c termio.c window.c word.c ## The list of header files that also have to go into the distribution. noinst_HEADERS = ebind.h edef.h efunc.h epath.h estruct.h redef.h intfunc.h ## Extra stuff that should be put in a distribution but doesn't get ## compiled. EXTRA_DIST = ibm.c neuron-7.5/src/memacs/Makefile.in000066400000000000000000001350431323325274500170100ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = memacs$(EXEEXT) subdir = src/memacs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" LTLIBRARIES = $(lib_LTLIBRARIES) libmemacs_la_DEPENDENCIES = am_libmemacs_la_OBJECTS = libmemacs_la-ansi.lo libmemacs_la-basic.lo \ libmemacs_la-bind.lo libmemacs_la-buffer.lo \ libmemacs_la-display.lo libmemacs_la-file.lo \ libmemacs_la-fileio.lo libmemacs_la-line.lo \ libmemacs_la-lock.lo libmemacs_la-main1.lo \ libmemacs_la-random.lo libmemacs_la-region.lo \ libmemacs_la-search.lo libmemacs_la-spawn.lo \ libmemacs_la-tcap.lo libmemacs_la-termio.lo \ libmemacs_la-window.lo libmemacs_la-word.lo libmemacs_la_OBJECTS = $(am_libmemacs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libmemacs_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmemacs_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) am_memacs_OBJECTS = main.$(OBJEXT) memacs_OBJECTS = $(am_memacs_OBJECTS) memacs_DEPENDENCIES = libmemacs.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmemacs_la_SOURCES) $(memacs_SOURCES) DIST_SOURCES = $(libmemacs_la_SOURCES) $(memacs_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ memacs_SOURCES = main.c memacs_LDADD = libmemacs.la lib_LTLIBRARIES = libmemacs.la libmemacs_la_LIBADD = @TERMCAP_LIB@ libmemacs_la_CFLAGS = @TERMCAP_CFLAGS@ libmemacs_la_SOURCES = ansi.c basic.c bind.c buffer.c display.c file.c \ fileio.c line.c lock.c main1.c random.c region.c \ search.c spawn.c tcap.c termio.c window.c word.c noinst_HEADERS = ebind.h edef.h efunc.h epath.h estruct.h redef.h intfunc.h EXTRA_DIST = ibm.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/memacs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/memacs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmemacs.la: $(libmemacs_la_OBJECTS) $(libmemacs_la_DEPENDENCIES) $(EXTRA_libmemacs_la_DEPENDENCIES) $(AM_V_CCLD)$(libmemacs_la_LINK) -rpath $(libdir) $(libmemacs_la_OBJECTS) $(libmemacs_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list memacs$(EXEEXT): $(memacs_OBJECTS) $(memacs_DEPENDENCIES) $(EXTRA_memacs_DEPENDENCIES) @rm -f memacs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(memacs_OBJECTS) $(memacs_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-ansi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-basic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-bind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-fileio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-main1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-region.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-search.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-spawn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-tcap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-termio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-window.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmemacs_la-word.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libmemacs_la-ansi.lo: ansi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-ansi.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-ansi.Tpo -c -o libmemacs_la-ansi.lo `test -f 'ansi.c' || echo '$(srcdir)/'`ansi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-ansi.Tpo $(DEPDIR)/libmemacs_la-ansi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ansi.c' object='libmemacs_la-ansi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-ansi.lo `test -f 'ansi.c' || echo '$(srcdir)/'`ansi.c libmemacs_la-basic.lo: basic.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-basic.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-basic.Tpo -c -o libmemacs_la-basic.lo `test -f 'basic.c' || echo '$(srcdir)/'`basic.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-basic.Tpo $(DEPDIR)/libmemacs_la-basic.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='basic.c' object='libmemacs_la-basic.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-basic.lo `test -f 'basic.c' || echo '$(srcdir)/'`basic.c libmemacs_la-bind.lo: bind.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-bind.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-bind.Tpo -c -o libmemacs_la-bind.lo `test -f 'bind.c' || echo '$(srcdir)/'`bind.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-bind.Tpo $(DEPDIR)/libmemacs_la-bind.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bind.c' object='libmemacs_la-bind.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-bind.lo `test -f 'bind.c' || echo '$(srcdir)/'`bind.c libmemacs_la-buffer.lo: buffer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-buffer.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-buffer.Tpo -c -o libmemacs_la-buffer.lo `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-buffer.Tpo $(DEPDIR)/libmemacs_la-buffer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='buffer.c' object='libmemacs_la-buffer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-buffer.lo `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c libmemacs_la-display.lo: display.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-display.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-display.Tpo -c -o libmemacs_la-display.lo `test -f 'display.c' || echo '$(srcdir)/'`display.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-display.Tpo $(DEPDIR)/libmemacs_la-display.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='display.c' object='libmemacs_la-display.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-display.lo `test -f 'display.c' || echo '$(srcdir)/'`display.c libmemacs_la-file.lo: file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-file.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-file.Tpo -c -o libmemacs_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-file.Tpo $(DEPDIR)/libmemacs_la-file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file.c' object='libmemacs_la-file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c libmemacs_la-fileio.lo: fileio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-fileio.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-fileio.Tpo -c -o libmemacs_la-fileio.lo `test -f 'fileio.c' || echo '$(srcdir)/'`fileio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-fileio.Tpo $(DEPDIR)/libmemacs_la-fileio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fileio.c' object='libmemacs_la-fileio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-fileio.lo `test -f 'fileio.c' || echo '$(srcdir)/'`fileio.c libmemacs_la-line.lo: line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-line.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-line.Tpo -c -o libmemacs_la-line.lo `test -f 'line.c' || echo '$(srcdir)/'`line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-line.Tpo $(DEPDIR)/libmemacs_la-line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='line.c' object='libmemacs_la-line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-line.lo `test -f 'line.c' || echo '$(srcdir)/'`line.c libmemacs_la-lock.lo: lock.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-lock.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-lock.Tpo -c -o libmemacs_la-lock.lo `test -f 'lock.c' || echo '$(srcdir)/'`lock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-lock.Tpo $(DEPDIR)/libmemacs_la-lock.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lock.c' object='libmemacs_la-lock.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-lock.lo `test -f 'lock.c' || echo '$(srcdir)/'`lock.c libmemacs_la-main1.lo: main1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-main1.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-main1.Tpo -c -o libmemacs_la-main1.lo `test -f 'main1.c' || echo '$(srcdir)/'`main1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-main1.Tpo $(DEPDIR)/libmemacs_la-main1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main1.c' object='libmemacs_la-main1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-main1.lo `test -f 'main1.c' || echo '$(srcdir)/'`main1.c libmemacs_la-random.lo: random.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-random.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-random.Tpo -c -o libmemacs_la-random.lo `test -f 'random.c' || echo '$(srcdir)/'`random.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-random.Tpo $(DEPDIR)/libmemacs_la-random.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='random.c' object='libmemacs_la-random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-random.lo `test -f 'random.c' || echo '$(srcdir)/'`random.c libmemacs_la-region.lo: region.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-region.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-region.Tpo -c -o libmemacs_la-region.lo `test -f 'region.c' || echo '$(srcdir)/'`region.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-region.Tpo $(DEPDIR)/libmemacs_la-region.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='region.c' object='libmemacs_la-region.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-region.lo `test -f 'region.c' || echo '$(srcdir)/'`region.c libmemacs_la-search.lo: search.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-search.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-search.Tpo -c -o libmemacs_la-search.lo `test -f 'search.c' || echo '$(srcdir)/'`search.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-search.Tpo $(DEPDIR)/libmemacs_la-search.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='search.c' object='libmemacs_la-search.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-search.lo `test -f 'search.c' || echo '$(srcdir)/'`search.c libmemacs_la-spawn.lo: spawn.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-spawn.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-spawn.Tpo -c -o libmemacs_la-spawn.lo `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-spawn.Tpo $(DEPDIR)/libmemacs_la-spawn.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn.c' object='libmemacs_la-spawn.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-spawn.lo `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c libmemacs_la-tcap.lo: tcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-tcap.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-tcap.Tpo -c -o libmemacs_la-tcap.lo `test -f 'tcap.c' || echo '$(srcdir)/'`tcap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-tcap.Tpo $(DEPDIR)/libmemacs_la-tcap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tcap.c' object='libmemacs_la-tcap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-tcap.lo `test -f 'tcap.c' || echo '$(srcdir)/'`tcap.c libmemacs_la-termio.lo: termio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-termio.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-termio.Tpo -c -o libmemacs_la-termio.lo `test -f 'termio.c' || echo '$(srcdir)/'`termio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-termio.Tpo $(DEPDIR)/libmemacs_la-termio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='termio.c' object='libmemacs_la-termio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-termio.lo `test -f 'termio.c' || echo '$(srcdir)/'`termio.c libmemacs_la-window.lo: window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-window.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-window.Tpo -c -o libmemacs_la-window.lo `test -f 'window.c' || echo '$(srcdir)/'`window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-window.Tpo $(DEPDIR)/libmemacs_la-window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window.c' object='libmemacs_la-window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-window.lo `test -f 'window.c' || echo '$(srcdir)/'`window.c libmemacs_la-word.lo: word.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -MT libmemacs_la-word.lo -MD -MP -MF $(DEPDIR)/libmemacs_la-word.Tpo -c -o libmemacs_la-word.lo `test -f 'word.c' || echo '$(srcdir)/'`word.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmemacs_la-word.Tpo $(DEPDIR)/libmemacs_la-word.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='word.c' object='libmemacs_la-word.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemacs_la_CFLAGS) $(CFLAGS) -c -o libmemacs_la-word.lo `test -f 'word.c' || echo '$(srcdir)/'`word.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/memacs/ansi.c000077500000000000000000000061501323325274500160400ustar00rootroot00000000000000#include <../../nrnconf.h> /*LINTLIBRARY*/ /* /local/src/master/nrn/src/memacs/ansi.c,v 1.1.1.1 1994/10/12 17:21:23 hines Exp */ /* ansi.c,v * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.2 89/07/10 10:24:51 mlh * LINT free * * Revision 1.1 89/07/08 15:35:54 mlh * Initial revision * */ /* * The routines in this file provide support for ANSI style terminals * over a serial line. The serial I/O services are provided by routines in * "termio.c". It compiles into nothing if not an ANSI device. */ #define termdef 1 /* don't define "term" external */ #include #include "estruct.h" #include "edef.h" #if ANSI #if AMIGA #define NROW 23 /* Screen size. */ #define NCOL 77 /* Edit if you want to. */ #else #define NROW 25 /* Screen size. */ #define NCOL 80 /* Edit if you want to. */ #endif #define MARGIN 8 /* size of minimim margin and */ #define SCRSIZ 64 /* scroll size for extended lines */ #define BEL 0x07 /* BEL character. */ #define ESC 0x1B /* ESC character. */ extern int ttopen(); /* Forward references. */ extern int ttgetc(); extern int ttputc(); extern int ttflush(); extern int ttclose(); extern int ansimove(); extern int ansieeol(); extern int ansieeop(); extern int ansibeep(); extern int ansiopen(); extern int ansirev(); /* * Standard terminal interface dispatch table. Most of the fields point into * "termio" code. */ TERM term = { NROW-1, NCOL, MARGIN, SCRSIZ, ansiopen, ttclose, ttgetc, ttputc, ttflush, ansimove, ansieeol, ansieeop, ansibeep, ansirev }; int ansimove(row, col) { ttputc(ESC); ttputc('['); ansiparm(row+1); ttputc(';'); ansiparm(col+1); ttputc('H'); return 0; } int ansieeol() { ttputc(ESC); ttputc('['); ttputc('K'); return 0; } int ansieeop() { ttputc(ESC); ttputc('['); ttputc('J'); return 0; } int ansirev(state) /* change reverse video state */ int state; /* TRUE = reverse, FALSE = normal */ { ttputc(ESC); ttputc('['); ttputc(state ? '7': '0'); ttputc('m'); return 0; } int ansibeep() { ttputc(BEL); ttflush(); return 0; } int ansiparm(n) register int n; { register int q; q = n/10; if (q != 0) ansiparm(q); ttputc((n%10) + '0'); return 0; } int ansiopen() { #if V7 register char *cp; char *getenv(); if ((cp = getenv("TERM")) == NULL) { puts("Shell variable TERM not defined!"); exit(1); } if (strcmp(cp, "vt100") != 0) { puts("Terminal type not 'vt100'!"); exit(1); } #endif revexist = TRUE; ttopen(); return 0; } #endif neuron-7.5/src/memacs/basic.c000077500000000000000000000275651323325274500162040ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/basic.c,v 1.1.1.1 1994/10/12 17:21:23 hines Exp */ /* basic.c,v * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.2 89/07/09 12:17:34 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:01 mlh * Initial revision * */ /* * The routines in this file move the cursor around on the screen. They * compute a new value for the cursor, then adjust ".". The display code * always updates the cursor location, so only moves between lines, or * functions that adjust the top line in the window and invalidate the * framing, are hard. */ #include #include "estruct.h" #include "edef.h" /* * Move the cursor to the * beginning of the current line. * Trivial. */ int gotobol(f, n) int f, n; { LINTUSE(f) LINTUSE(n) curwp->w_doto = 0; return (TRUE); } /* * Move the cursor backwards by "n" characters. If "n" is less than zero call * "forwchar" to actually do the move. Otherwise compute the new cursor * location. Error if you try and move out of the buffer. Set the flag if the * line pointer for dot changes. */ int backchar(f, n) register int n; int f; { register LINE *lp; LINTUSE(f) LINTUSE(n) if (n < 0) return (forwchar(f, -n)); while (n--) { if (curwp->w_doto == 0) { if ((lp=lback(curwp->w_dotp)) == curbp->b_linep) return (FALSE); curwp->w_dotp = lp; curwp->w_doto = llength(lp); curwp->w_flag |= WFMOVE; } else curwp->w_doto--; } return (TRUE); } /* * Move the cursor to the end of the current line. Trivial. No errors. */ int gotoeol(f, n) int f, n; { LINTUSE(f) LINTUSE(n) curwp->w_doto = llength(curwp->w_dotp); return (TRUE); } /* * Move the cursor forwwards by "n" characters. If "n" is less than zero call * "backchar" to actually do the move. Otherwise compute the new cursor * location, and move ".". Error if you try and move off the end of the * buffer. Set the flag if the line pointer for dot changes. */ int forwchar(f, n) register int n; int f; { if (n < 0) return (backchar(f, -n)); while (n--) { if (curwp->w_doto == llength(curwp->w_dotp)) { if (curwp->w_dotp == curbp->b_linep) return (FALSE); curwp->w_dotp = lforw(curwp->w_dotp); curwp->w_doto = 0; curwp->w_flag |= WFMOVE; } else curwp->w_doto++; } return (TRUE); } int gotoline(f, n) /* move to a particular line. argument (n) must be a positive integer for this to actually do anything */ int f, n; { if (n < 1) /* if a bogus argument...then leave */ return(FALSE); /* first, we go to the start of the buffer */ curwp->w_dotp = lforw(curbp->b_linep); curwp->w_doto = 0; return(forwline(f, n-1)); } /* * Goto the beginning of the buffer. Massive adjustment of dot. This is * considered to be hard motion; it really isn't if the original value of dot * is the same as the new value of dot. Normally bound to "M-<". */ int gotobob(f, n) int f, n; { LINTUSE(f) LINTUSE(n) curwp->w_dotp = lforw(curbp->b_linep); curwp->w_doto = 0; curwp->w_flag |= WFHARD; return (TRUE); } /* * Move to the end of the buffer. Dot is always put at the end of the file * (ZJ). The standard screen code does most of the hard parts of update. * Bound to "M->". */ int gotoeob(f, n) int f, n; { LINTUSE(f) LINTUSE(n) curwp->w_dotp = curbp->b_linep; curwp->w_doto = 0; curwp->w_flag |= WFHARD; return (TRUE); } /* * Move forward by full lines. If the number of lines to move is less than * zero, call the backward line function to actually do it. The last command * controls how the goal column is set. Bound to "C-N". No errors are * possible. */ int forwline(f, n) int f, n; { register LINE *dlp; if (n < 0) return (backline(f, -n)); if ((lastflag&CFCPCN) == 0) /* Reset goal if last */ curgoal = getccol(FALSE); /* not C-P or C-N */ thisflag |= CFCPCN; dlp = curwp->w_dotp; while (n-- && dlp!=curbp->b_linep) dlp = lforw(dlp); curwp->w_dotp = dlp; curwp->w_doto = getgoal(dlp); curwp->w_flag |= WFMOVE; return (TRUE); } /* * This function is like "forwline", but goes backwards. The scheme is exactly * the same. Check for arguments that are less than zero and call your * alternate. Figure out the new line and call "movedot" to perform the * motion. No errors are possible. Bound to "C-P". */ int backline(f, n) int f, n; { register LINE *dlp; if (n < 0) return (forwline(f, -n)); if ((lastflag&CFCPCN) == 0) /* Reset goal if the */ curgoal = getccol(FALSE); /* last isn't C-P, C-N */ thisflag |= CFCPCN; dlp = curwp->w_dotp; while (n-- && lback(dlp)!=curbp->b_linep) dlp = lback(dlp); curwp->w_dotp = dlp; curwp->w_doto = getgoal(dlp); curwp->w_flag |= WFMOVE; return (TRUE); } int gotobop(f, n) /* go back to the begining of the current paragraph here we look for a or or combination to delimit the begining of a paragraph */ int f, n; /* default Flag & Numeric argument */ { register int suc; /* success of last backchar */ if (n < 0) /* the other way...*/ return(gotoeop(f, -n)); while (n-- > 0) { /* for each one asked for */ /* first scan back until we are in a word */ suc = backchar(FALSE, 1); while (!inword() && suc) suc = backchar(FALSE, 1); curwp->w_doto = 0; /* and go to the B-O-Line */ /* and scan back until we hit a or or a */ while (lback(curwp->w_dotp) != curbp->b_linep) if (llength(curwp->w_dotp) != 0 && lgetc(curwp->w_dotp, curwp->w_doto) != TAB && lgetc(curwp->w_dotp, curwp->w_doto) != ' ') curwp->w_dotp = lback(curwp->w_dotp); else break; /* and then forward until we are in a word */ suc = forwchar(FALSE, 1); while (suc && !inword()) suc = forwchar(FALSE, 1); } curwp->w_flag |= WFMOVE; /* force screen update */ return TRUE; } int gotoeop(f, n) /* go forword to the end of the current paragraph here we look for a or or combination to delimit the begining of a paragraph */ int f, n; /* default Flag & Numeric argument */ { register int suc; /* success of last backchar */ if (n < 0) /* the other way...*/ return(gotobop(f, -n)); while (n-- > 0) { /* for each one asked for */ /* first scan forward until we are in a word */ suc = forwchar(FALSE, 1); while (!inword() && suc) suc = forwchar(FALSE, 1); curwp->w_doto = 0; /* and go to the B-O-Line */ if (suc) /* of next line if not at EOF */ curwp->w_dotp = lforw(curwp->w_dotp); /* and scan forword until we hit a or or a */ while (curwp->w_dotp != curbp->b_linep) { if (llength(curwp->w_dotp) != 0 && lgetc(curwp->w_dotp, curwp->w_doto) != TAB && lgetc(curwp->w_dotp, curwp->w_doto) != ' ') curwp->w_dotp = lforw(curwp->w_dotp); else break; } /* and then backward until we are in a word */ suc = backchar(FALSE, 1); while (suc && !inword()) { suc = backchar(FALSE, 1); } curwp->w_doto = llength(curwp->w_dotp); /* and to the EOL */ } curwp->w_flag |= WFMOVE; /* force screen update */ return TRUE; } /* * This routine, given a pointer to a LINE, and the current cursor goal * column, return the best choice for the offset. The offset is returned. * Used by "C-N" and "C-P". */ int getgoal(dlp) register LINE *dlp; { register int c; register int col; register int newcol; register int dbo; col = 0; dbo = 0; while (dbo != llength(dlp)) { c = lgetc(dlp, dbo); newcol = col; if (c == '\t') #if TRUETAB newcol += tabsize - (newcol)%tabsize - 1; #else newcol |= 0x07; #endif else if (c<0x20 || c==0x7F) ++newcol; ++newcol; if (newcol > curgoal) break; col = newcol; ++dbo; } return (dbo); } /* * Scroll forward by a specified number of lines, or by a full page if no * argument. Bound to "C-V". The "2" in the arithmetic on the window size is * the overlap; this value is the default overlap value in ITS EMACS. Because * this zaps the top line in the display window, we have to do a hard update. */ int forwpage(f, n) register int n; int f; { register LINE *lp; if (f == FALSE) { n = curwp->w_ntrows - 2; /* Default scroll. */ if (n <= 0) /* Forget the overlap */ n = 1; /* if tiny window. */ } else if (n < 0) return (backpage(f, -n)); #if CVMVAS else /* Convert from pages */ n *= curwp->w_ntrows; /* to lines. */ #endif lp = curwp->w_linep; while (n-- && lp!=curbp->b_linep) lp = lforw(lp); curwp->w_linep = lp; curwp->w_dotp = lp; curwp->w_doto = 0; curwp->w_flag |= WFHARD; return (TRUE); } /* * This command is like "forwpage", but it goes backwards. The "2", like * above, is the overlap between the two windows. The value is from the ITS * EMACS manual. Bound to "M-V". We do a hard update for exactly the same * reason. */ int backpage(f, n) register int n; int f; { register LINE *lp; if (f == FALSE) { n = curwp->w_ntrows - 2; /* Default scroll. */ if (n <= 0) /* Don't blow up if the */ n = 1; /* window is tiny. */ } else if (n < 0) return (forwpage(f, -n)); #if CVMVAS else /* Convert from pages */ n *= curwp->w_ntrows; /* to lines. */ #endif lp = curwp->w_linep; while (n-- && lback(lp)!=curbp->b_linep) lp = lback(lp); curwp->w_linep = lp; curwp->w_dotp = lp; curwp->w_doto = 0; curwp->w_flag |= WFHARD; return (TRUE); } /* * Set the mark in the current window to the value of "." in the window. No * errors are possible. Bound to "M-.". */ int setmark(f, n) int f, n; { LINTUSE(f) LINTUSE(n) curwp->w_markp = curwp->w_dotp; curwp->w_marko = curwp->w_doto; mlwrite("[Mark set]"); return (TRUE); } /* * Swap the values of "." and "mark" in the current window. This is pretty * easy, bacause all of the hard work gets done by the standard routine * that moves the mark about. The only possible error is "no mark". Bound to * "C-X C-X". */ int swapmark(f, n) int f, n; { register LINE *odotp; register int odoto; LINTUSE(f) LINTUSE(n) if (curwp->w_markp == NULL) { mlwrite("No mark in this window"); return (FALSE); } odotp = curwp->w_dotp; odoto = curwp->w_doto; curwp->w_dotp = curwp->w_markp; curwp->w_doto = curwp->w_marko; curwp->w_markp = odotp; curwp->w_marko = odoto; curwp->w_flag |= WFMOVE; return (TRUE); } neuron-7.5/src/memacs/bind.c000077500000000000000000000474001323325274500160250ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/bind.c,v 1.1.1.1 1994/10/12 17:21:23 hines Exp */ /* bind.c,v * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.3 89/07/10 10:25:05 mlh * LINT free * * Revision 1.2 89/07/09 12:18:23 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:06 mlh * Initial revision * */ /* This file is for functions having to do with key bindings, descriptions, help commands, and command line execution. written 11-feb-86 by Daniel Lawrence */ #include #include "estruct.h" #include "edef.h" #include "epath.h" int deskey(f, n) /* describe the command for a certain key */ int f, n; { register int c; /* command character to describe */ register char *ptr; /* string pointer to scan output strings */ register KEYTAB *ktp; /* pointer into the command table */ register int found; /* matched command flag */ register NBIND *nptr; /* pointer into the name binding table */ char outseq[80]; /* output buffer for command sequence */ LINTUSE(f) LINTUSE(n) /* prompt the user to type us a key to describe */ mlwrite(": describe-key "); /* get the command sequence to describe */ c = getckey(); /* get a command sequence */ /* change it to something we can print as well */ cmdstr(c, &outseq[0]); /* and dump it out */ ptr = &outseq[0]; while (*ptr) (*term.t_putchar)(*ptr++); (*term.t_putchar)(' '); /* space it out */ /* find the right ->function */ ktp = &keytab[0]; found = FALSE; while (ktp->k_fp != NULL) { if (ktp->k_code == c) { found = TRUE; break; } ++ktp; } if (!found) Strcpy(outseq,"Not Bound"); else { /* match it against the name binding table */ nptr = &names[0]; Strcpy(outseq,"[Bad binding]"); while (nptr->n_func != NULL) { if (nptr->n_func == ktp->k_fp) { Strcpy(outseq, nptr->n_name); break; } ++nptr; } } /* output the command sequence */ ptr = &outseq[0]; while (*ptr) (*term.t_putchar)(*ptr++); return TRUE; } int cmdstr(c, seq) /* change a key command to a string we can print out */ int c; /* sequence to translate */ char *seq; /* destination string for sequence */ { char *ptr; /* pointer into current position in sequence */ ptr = seq; /* apply meta sequence if needed */ if (c & META) { *ptr++ = 'M'; *ptr++ = '-'; } /* apply ^X sequence if needed */ if (c & CTLX) { *ptr++ = '^'; *ptr++ = 'X'; } /* apply SPEC sequence if needed */ if (c & SPEC) { *ptr++ = 'F'; *ptr++ = 'N'; } /* apply control sequence if needed */ if (c & CTRL) { *ptr++ = '^'; } c = c & 255; /* strip the prefixes */ /* and output the final sequence */ *ptr++ = c; *ptr = 0; /* terminate the string */ return TRUE; } int help(f, n) /* give me some help!!!! bring up a fake buffer and read the help file into it with view mode */ int f, n; { register int status; /* status of I/O operations */ register WINDOW *wp; /* scnaning pointer to windows */ register int i; /* index into help file names */ char fname[NSTRING]; /* buffer to construct file name in */ LINTUSE(f) LINTUSE(n) /* search through the list of help files */ for (i=2; i < NPNAMES; i++) { Strcpy(fname, pathname[i]); Strcat(fname, pathname[1]); status = ffropen(fname); if (status == FIOSUC) break; } if (status == FIOFNF) { mlwrite("[Help file is not online]"); return(FALSE); } IGNORE(ffclose()); /* close the file to prepare for to read it in */ /* split the current window to make room for the help stuff */ if (splitwind(FALSE, 1) == FALSE) return(FALSE); /* and read the stuff in */ if (getfile(fname, FALSE) == FALSE) return(FALSE); /* make this window in VIEW mode, update all mode lines */ curwp->w_bufp->b_mode |= MDVIEW; wp = wheadp; while (wp != NULL) { wp->w_flag |= WFMODE; wp = wp->w_wndp; } return(TRUE); } int (*fncmatch(fname))() /* match fname to a function in the names table and return any match or NULL if none */ char *fname; /* name to attempt to match */ { register NBIND *ffp; /* pointer to entry in name binding table */ /* scan through the table, returning any match */ ffp = &names[0]; while (ffp->n_func != NULL) { if (strcmp(fname, ffp->n_name) == 0) return(ffp->n_func); ++ffp; } return(NULL); } /* bindtokey: add a new key to the key binding table */ int bindtokey(f, n) int f, n; /* command arguments [IGNORED] */ { register int c; /* command key to bind */ register int (*kfunc)(); /* ptr to the requexted function to bind to */ register char *ptr; /* ptr to dump out input key string */ register KEYTAB *ktp; /* pointer into the command table */ register int found; /* matched command flag */ char outseq[80]; /* output buffer for keystroke sequence */ int (*getname())(); LINTUSE(f) LINTUSE(n) /* prompt the user to type in a key to bind */ mlwrite(": bind-to-key "); /* get the function name to bind it to */ kfunc = getname(); if (kfunc == NULL) { mlwrite("[No such function]"); return(FALSE); } (*term.t_putchar)(' '); /* space it out */ (*term.t_flush)(); /* get the command sequence to bind */ c = getckey(); /* get a command sequence */ /* change it to something we can print as well */ cmdstr(c, &outseq[0]); /* and dump it out */ ptr = &outseq[0]; while (*ptr) (*term.t_putchar)(*ptr++); /* search the table to see if it exists */ ktp = &keytab[0]; found = FALSE; while (ktp->k_fp != NULL) { if (ktp->k_code == c) { found = TRUE; break; } ++ktp; } if (found) { /* it exists, just change it then */ ktp->k_fp = kfunc; } else { /* otherwise we need to add it to the end */ /* if we run out of binding room, bitch */ if (ktp >= &keytab[NBINDS]) { mlwrite("Binding table FULL!"); return(FALSE); } ktp->k_code = c; /* add keycode */ ktp->k_fp = kfunc; /* and the function pointer */ ++ktp; /* and make sure the next is null */ ktp->k_code = 0; ktp->k_fp = NULL; } return(TRUE); } /* unbindkey: delete a key from the key binding table */ int unbindkey(f, n) int f, n; /* command arguments [IGNORED] */ { register int c; /* command key to unbind */ register char *ptr; /* ptr to dump out input key string */ register KEYTAB *ktp; /* pointer into the command table */ register KEYTAB *sktp; /* saved pointer into the command table */ register int found; /* matched command flag */ char outseq[80]; /* output buffer for keystroke sequence */ LINTUSE(f) LINTUSE(n) /* prompt the user to type in a key to unbind */ mlwrite(": unbind-key "); /* get the command sequence to unbind */ c = getckey(); /* get a command sequence */ /* change it to something we can print as well */ cmdstr(c, &outseq[0]); /* and dump it out */ ptr = &outseq[0]; while (*ptr) (*term.t_putchar)(*ptr++); /* search the table to see if the key exists */ ktp = &keytab[0]; found = FALSE; while (ktp->k_fp != NULL) { if (ktp->k_code == c) { found = TRUE; break; } ++ktp; } /* if it isn't bound, bitch */ if (!found) { mlwrite("[Key not bound]"); return(FALSE); } /* save the pointer and scan to the end of the table */ sktp = ktp; while (ktp->k_fp != NULL) ++ktp; --ktp; /* backup to the last legit entry */ /* copy the last entry to the current one */ sktp->k_code = ktp->k_code; sktp->k_fp = ktp->k_fp; /* null out the last one */ ktp->k_code = 0; ktp->k_fp = NULL; return(TRUE); } /* namedcmd: execute a named command even if it is not bound */ int namedcmd(f, n) int f, n; /* command arguments [passed through to command executed] */ { register int (*kfunc)(); /* ptr to the requexted function to bind to */ int (*getname())(); /* prompt the user to type a named command */ mlwrite(": "); /* and now get the function name to execute */ kfunc = getname(); if (kfunc == NULL) { mlwrite("[No such function]"); return(FALSE); } /* and then execute the command */ return((*kfunc)(f, n)); } int desbind(f, n) /* describe bindings bring up a fake buffer and list the key bindings into it with view mode */ int f, n; { register WINDOW *wp; /* scnaning pointer to windows */ register KEYTAB *ktp; /* pointer into the command table */ register NBIND *nptr; /* pointer into the name binding table */ register BUFFER *bp; /* buffer to put binding list into */ char *strp; /* pointer int string to send */ int cpos; /* current position to use in outseq */ char outseq[80]; /* output buffer for keystroke sequence */ LINTUSE(f) LINTUSE(n) /* split the current window to make room for the binding list */ if (splitwind(FALSE, 1) == FALSE) return(FALSE); /* and get a buffer for it */ bp = bfind("Binding list", TRUE, 0); if (bp == NULL || bclear(bp) == FALSE) { mlwrite("Can not display binding list"); return(FALSE); } /* let us know this is in progress */ mlwrite("[Building buffer list]"); /* disconect the current buffer */ if (--curbp->b_nwnd == 0) { /* Last use. */ curbp->b_dotp = curwp->w_dotp; curbp->b_doto = curwp->w_doto; curbp->b_markp = curwp->w_markp; curbp->b_marko = curwp->w_marko; } /* connect the current window to this buffer */ curbp = bp; /* make this buffer current in current window */ bp->b_mode = 0; /* no modes active in binding list */ bp->b_nwnd++; /* mark us as more in use */ wp = curwp; wp->w_bufp = bp; wp->w_linep = bp->b_linep; wp->w_flag = WFHARD|WFFORCE|WFHARD; wp->w_dotp = bp->b_dotp; wp->w_doto = bp->b_doto; wp->w_markp = NULL; wp->w_marko = 0; /* build the contents of this window, inserting it line by line */ nptr = &names[0]; while (nptr->n_func != NULL) { /* add in the command name */ Strcpy(outseq, nptr->n_name); cpos = strlen(outseq); /* search down any keys bound to this */ ktp = &keytab[0]; while (ktp->k_fp != NULL) { if (ktp->k_fp == nptr->n_func) { /* padd out some spaces */ while (cpos < 25) outseq[cpos++] = ' '; /* add in the command sequence */ cmdstr(ktp->k_code, &outseq[cpos]); while (outseq[cpos] != 0) ++cpos; /* and add it as a line into the buffer */ strp = &outseq[0]; while (*strp != 0) {IGNORE(linsert(1, *strp++));} IGNORE(lnewline()); cpos = 0; /* and clear the line */ } ++ktp; } /* if no key was bound, we need to dump it anyway */ if (cpos > 0) { outseq[cpos] = 0; strp = &outseq[0]; while (*strp != 0) {IGNORE(linsert(1, *strp++));} IGNORE(lnewline()); } /* and on to the next name */ ++nptr; } curwp->w_bufp->b_mode |= MDVIEW;/* put this buffer view mode */ curbp->b_flag &= ~BFCHG; /* don't flag this as a change */ wp->w_dotp = lforw(bp->b_linep);/* back to the begining */ wp->w_doto = 0; wp = wheadp; /* and update ALL mode lines */ while (wp != NULL) { wp->w_flag |= WFMODE; wp = wp->w_wndp; } mlwrite(""); /* clear the mode line */ return(TRUE); } /* execcmd: Execute a command line command to be typed in by the user */ int execcmd(f, n) int f, n; /* default Flag and Numeric argument */ { register int status; /* status return */ char cmdstr[NSTRING]; /* string holding command to execute */ LINTUSE(f) LINTUSE(n) /* get the line wanted */ if ((status = mlreply(": ", cmdstr, NSTRING)) != TRUE) return(status); return(docmd(cmdstr)); } /* docmd: take a passed string as a command line and translate it to be executed as a command. This function will be used by execute-command-line and by all source and startup files. format of the command line is: {# arg} {} */ int docmd(cline) char *cline; /* command line to execute */ { register char *cp; /* pointer to current position in command */ register char *tp; /* pointer to current position in token */ register int f; /* default argument flag */ register int n; /* numeric repeat value */ register int sign; /* sign of numeric argument */ register int (*fnc)(); /* function to execute */ register int status; /* return status of function */ register int oldcle; /* old contents of clexec flag */ char token[NSTRING]; /* next token off of command line */ int (*fncmatch())(); char *gettok(); /* first set up the default command values */ f = FALSE; n = 1; cp = cline; /* start at the begining of the line */ cp = gettok(cp, token); /* and grab the first token */ /* check for and process numeric leadin argument */ if ((token[0] >= '0' && token[0] <= '9') || token[0] == '-') { f = TRUE; n = 0; tp = &token[0]; /* check for a sign! */ sign = 1; if (*tp == '-') { ++tp; sign = -1; } /* calc up the digits in the token string */ while(*tp) { if (*tp >= '0' && *tp <= '9') n = n * 10 + *tp - '0'; ++tp; } n *= sign; /* adjust for the sign */ /* and now get the command to execute */ cp = gettok(cp, token); /* grab the next token */ } /* and match the token to see if it exists */ if ((fnc = fncmatch(token)) == NULL) { mlwrite("[No such Function]"); return(FALSE); } /* save the arguments and go execute the command */ Strcpy(sarg, cp); /* save the rest */ oldcle = clexec; /* save old clexec flag */ clexec = TRUE; /* in cline execution */ status = (*fnc)(f, n); /* call the function */ clexec = oldcle; /* restore clexec flag */ return(status); } /* gettok: chop a token off a string return a pointer past the token */ char *gettok(src, tok) char *src, *tok; /* source string, destination token */ { /* first scan past any whitespace in the source string */ while (*src == ' ' || *src == '\t') ++src; /* if quoted, go till next quote */ if (*src == '"') { ++src; /* past the quote */ while (*src != 0 && *src != '"') *tok++ = *src++; ++src; /* past the last quote */ *tok = 0; /* terminate token and return */ return(src); } /* copy until we find the end or whitespace */ while (*src != 0 && *src != ' ' && *src != '\t') *tok++ = *src++; /* terminate tok and return */ *tok = 0; return(src); } /* nxtarg: grab the next token out of sarg, return it, and chop it of sarg */ int nxtarg(tok) char *tok; /* buffer to put token into */ { char *newsarg; /* pointer to new begining of sarg */ char *gettok(); newsarg = gettok(sarg, tok); /* grab the token */ Strcpy(sarg, newsarg); /* and chop it of sarg */ return(TRUE); } int getckey() /* get a command key sequence from the keyboard */ { register int c; /* character fetched */ register char *tp; /* pointer into the token */ char tok[NSTRING]; /* command incoming */ /* check to see if we are executing a command line */ if (clexec) { IGNORE(nxtarg(tok)); /* get the next token */ /* parse it up */ tp = &tok[0]; c = 0; /* first, the META prefix */ if (*tp == 'M' && *(tp+1) == '-') { c = META; tp += 2; } /* next the function prefix */ if (*tp == 'F' && *(tp+1) == 'N') { c |= SPEC; tp += 2; } /* control-x as well... */ if (*tp == '^' && *(tp+1) == 'X') { c |= CTLX; tp += 2; } /* a control char? */ if (*tp == '^' && *(tp+1) != 0) { c |= CTRL; ++tp; } /* make sure we are not lower case */ if (c >= 'a' && c <= 'z') c -= 32; /* the final sequence... */ c |= *tp; return(c); } /* or the normal way */ c = getkey(); /* get a command sequence */ if (c == (CTRL|'X')) /* get control-x sequence */ c = CTLX | getctl(); return(c); } /* execbuf: Execute the contents of a named buffer */ int execbuf(f, n) int f, n; /* default flag and numeric arg */ { register BUFFER *bp; /* ptr to buffer to execute */ register int status; /* status return */ char bufn[NBUFN]; /* name of buffer to execute */ LINTUSE(f) /* find out what buffer the user wants to execute */ if ((status = mlreply("Execute buffer: ", bufn, NBUFN)) != TRUE) return(status); /* find the pointer to that buffer */ if ((bp=bfind(bufn, TRUE, 0)) == NULL) return(FALSE); /* and now execute it as asked */ while (n-- > 0) if ((status = dobuf(bp)) != TRUE) return(status); return(TRUE); } /* dobuf: execute the contents of the buffer pointed to by the passed BP */ int dobuf(bp) BUFFER *bp; /* buffer to execute */ { register int status; /* status return */ register LINE *lp; /* pointer to line to execute */ register LINE *hlp; /* pointer to line header */ register int linlen; /* length of line to execute */ register WINDOW *wp; /* ptr to windows to scan */ char eline[NSTRING]; /* text of line to execute */ /* starting at the beginning of the buffer */ hlp = bp->b_linep; lp = hlp->l_fp; while (lp != hlp) { /* calculate the line length and make a local copy */ linlen = lp->l_used; if (linlen > NSTRING - 1) linlen = NSTRING - 1; Strncpy(eline, lp->l_text, linlen); eline[linlen] = 0; /* make sure it ends */ /* if it is not a comment, execute it */ if (eline[0] != ';' && eline[0] != 0) { status = docmd(eline); if (status != TRUE) { /* a command error */ /* look if buffer is showing */ wp = wheadp; while (wp != NULL) { if (wp->w_bufp == bp) { /* and point it */ wp->w_dotp = lp; wp->w_doto = 0; wp->w_flag |= WFHARD; } wp = wp->w_wndp; } /* in any case set the buffer . */ bp->b_dotp = lp; bp->b_doto = 0; return(status); } } lp = lp->l_fp; /* on to the next line */ } return(TRUE); } int execfile(f, n) /* execute a series of commands in a file */ int f, n; /* default flag and numeric arg to pass on to file */ { register int status; /* return status of name query */ /* mlh found bug *fname[NSTRING] */ char fname[NSTRING]; /* name of file to execute */ LINTUSE(f) if ((status = mlreply("File to execute: ", fname, NSTRING -1)) != TRUE) return(status); /* otherwise, execute it */ while (n-- > 0) if ((status=dofile(fname)) != TRUE) return(status); return(TRUE); } /* dofile: yank a file into a buffer and execute it if there are no errors, delete the buffer on exit */ int dofile(fname) char *fname; /* file name to execute */ { register BUFFER *bp; /* buffer to place file to exeute */ register BUFFER *cb; /* temp to hold current buf while we read */ register int status; /* results of various calls */ char bname[NBUFN]; /* name of buffer */ makename(bname, fname); /* derive the name of the buffer */ if ((bp = bfind(bname, TRUE, 0)) == NULL) /* get the needed buffer */ return(FALSE); bp->b_mode = MDVIEW; /* mark the buffer as read only */ cb = curbp; /* save the old buffer */ curbp = bp; /* make this one current */ /* and try to read in the file to execute */ if ((status = readin(fname, FALSE)) != TRUE) { curbp = cb; /* restore the current buffer */ return(status); } /* go execute it! */ curbp = cb; /* restore the current buffer */ if ((status = dobuf(bp)) != TRUE) return(status); /* if not displayed, remove the now unneeded buffer and exit */ if (bp->b_nwnd == 0) {IGNORE(zotbuf(bp));} return(TRUE); } /* execute the startup file */ int startup() { register int status; /* status of I/O operations */ register int i; /* index into help file names */ char fname[NSTRING]; /* buffer to construct file name in */ #if (MSDOS & (LATTICE | MSC)) | V7 char *homedir; /* pointer to your home directory */ char *getenv(); /* get the HOME from the environment */ if ((homedir = getenv("HOME")) != NULL) { /* build the file name */ Strcpy(fname, homedir); Strcat(fname, "/"); Strcat(fname, pathname[0]); /* and test it */ status = ffropen(fname); if (status == FIOSUC) { IGNORE(ffclose()); return(dofile(fname)); } } #endif /* search through the list of startup files */ for (i=2; i < NPNAMES; i++) { Strcpy(fname, pathname[i]); Strcat(fname, pathname[0]); status = ffropen(fname); if (status == FIOSUC) break; } /* if it isn't around, don't sweat it */ if (status == FIOFNF) return(TRUE); IGNORE(ffclose()); /* close the file to prepare for to read it in */ return(dofile(fname)); } neuron-7.5/src/memacs/buffer.c000077500000000000000000000414451323325274500163650ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/buffer.c,v 1.2 1994/10/25 17:21:28 hines Exp */ /* buffer.c,v * Revision 1.2 1994/10/25 17:21:28 hines * bsearch and atoi conflict with names in djg libraries * * Revision 1.1.1.1 1994/10/12 17:21:24 hines * NEURON 3.0 distribution * * Revision 1.4 91/08/22 12:33:06 hines * works with turboc * * Revision 1.3 89/07/10 10:25:14 mlh * LINT free * * Revision 1.2 89/07/09 12:18:30 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:11 mlh * Initial revision * */ /* * Buffer management. * Some of the functions are internal, * and some are actually attached to user * keys. Like everyone else, they set hints * for the display system. */ #include #include "estruct.h" #include "edef.h" /* * Attach a buffer to a window. The * values of dot and mark come from the buffer * if the use count is 0. Otherwise, they come * from some other window. */ int usebuffer(f, n) int f, n; { register BUFFER *bp; register int s; char bufn[NBUFN]; LINTUSE(f) LINTUSE(n) if ((s=mlreply("Use buffer: ", bufn, NBUFN)) != TRUE) return (s); if ((bp=bfind(bufn, TRUE, 0)) == NULL) return (FALSE); return(swbuffer(bp)); } int nextbuffer(f, n) /* switch to the next buffer in the buffer list */ int f, n; { register BUFFER *bp; LINTUSE(f) LINTUSE(n) bp = curbp->b_bufp; /* cycle through the buffers to find an eligable one */ while (bp == NULL || bp->b_flag & BFTEMP) { if (bp == NULL) bp = bheadp; else bp = bp->b_bufp; } return(swbuffer(bp)); } int swbuffer(bp) /* make buffer BP current */ BUFFER *bp; { register WINDOW *wp; if (--curbp->b_nwnd == 0) { /* Last use. */ curbp->b_dotp = curwp->w_dotp; curbp->b_doto = curwp->w_doto; curbp->b_markp = curwp->w_markp; curbp->b_marko = curwp->w_marko; } curbp = bp; /* Switch. */ if (curbp->b_active != TRUE) { /* buffer not active yet*/ /* read it in and activate it */ IGNORE(readin(curbp->b_fname, TRUE)); curbp->b_dotp = lforw(curbp->b_linep); curbp->b_doto = 0; curbp->b_active = TRUE; } curwp->w_bufp = bp; curwp->w_linep = bp->b_linep; /* For macros, ignored. */ curwp->w_flag |= WFMODE|WFFORCE|WFHARD; /* Quite nasty. */ if (bp->b_nwnd++ == 0) { /* First use. */ curwp->w_dotp = bp->b_dotp; curwp->w_doto = bp->b_doto; curwp->w_markp = bp->b_markp; curwp->w_marko = bp->b_marko; return (TRUE); } wp = wheadp; /* Look for old. */ while (wp != NULL) { if (wp!=curwp && wp->w_bufp==bp) { curwp->w_dotp = wp->w_dotp; curwp->w_doto = wp->w_doto; curwp->w_markp = wp->w_markp; curwp->w_marko = wp->w_marko; break; } wp = wp->w_wndp; } return (TRUE); } /* * Dispose of a buffer, by name. * Ask for the name. Look it up (don't get too * upset if it isn't there at all!). Get quite upset * if the buffer is being displayed. Clear the buffer (ask * if the buffer has been changed). Then free the header * line and the buffer header. Bound to "C-X K". */ int killbuffer(f, n) int f, n; { register BUFFER *bp; register int s; char bufn[NBUFN]; LINTUSE(f) LINTUSE(n) if ((s=mlreply("Kill buffer: ", bufn, NBUFN)) != TRUE) return(s); if ((bp=bfind(bufn, FALSE, 0)) == NULL) /* Easy if unknown. */ return (TRUE); return(zotbuf(bp)); } int zotbuf(bp) /* kill the buffer pointed to by bp */ register BUFFER *bp; { register BUFFER *bp1; register BUFFER *bp2; register int s; if (bp->b_nwnd != 0) { /* Error if on screen. */ mlwrite("Buffer is being displayed"); return (FALSE); } if ((s=bclear(bp)) != TRUE) /* Blow text away. */ return (s); free((char *) bp->b_linep); /* Release header line. */ bp1 = NULL; /* Find the header. */ bp2 = bheadp; while (bp2 != bp) { bp1 = bp2; bp2 = bp2->b_bufp; } bp2 = bp2->b_bufp; /* Next one in chain. */ if (bp1 == NULL) /* Unlink it. */ bheadp = bp2; else bp1->b_bufp = bp2; free((char *) bp); /* Release buffer block */ return (TRUE); } int namebuffer(f,n) /* Rename the current buffer */ int f, n; /* default Flag & Numeric arg */ { register BUFFER *bp; /* pointer to scan through all buffers */ char bufn[NBUFN]; /* buffer to hold buffer name */ LINTUSE(f) LINTUSE(n) /* prompt for and get the new buffer name */ ask: if (mlreply("Change buffer name to: ", bufn, NBUFN) != TRUE) return(FALSE); /* and check for duplicates */ bp = bheadp; while (bp != NULL) { if (bp != curbp) { /* if the names the same */ if (strcmp(bufn, bp->b_bname) == 0) goto ask; /* try again */ } bp = bp->b_bufp; /* onward */ } Strcpy(curbp->b_bname, bufn); /* copy buffer name to structure */ curwp->w_flag |= WFMODE; /* make mode line replot */ mlerase(); return TRUE; } /* * List all of the active * buffers. First update the special * buffer that holds the list. Next make * sure at least 1 window is displaying the * buffer list, splitting the screen if this * is what it takes. Lastly, repaint all of * the windows that are displaying the * list. Bound to "C-X C-B". */ int listbuffers(f, n) int f, n; { register WINDOW *wp; register BUFFER *bp; register int s; LINTUSE(f) LINTUSE(n) if ((s=makelist()) != TRUE) return (s); if (blistp->b_nwnd == 0) { /* Not on screen yet. */ if ((wp=wpopup()) == NULL) return (FALSE); bp = wp->w_bufp; if (--bp->b_nwnd == 0) { bp->b_dotp = wp->w_dotp; bp->b_doto = wp->w_doto; bp->b_markp = wp->w_markp; bp->b_marko = wp->w_marko; } wp->w_bufp = blistp; ++blistp->b_nwnd; } wp = wheadp; while (wp != NULL) { if (wp->w_bufp == blistp) { wp->w_linep = lforw(blistp->b_linep); wp->w_dotp = lforw(blistp->b_linep); wp->w_doto = 0; wp->w_markp = NULL; wp->w_marko = 0; wp->w_flag |= WFMODE|WFHARD; } wp = wp->w_wndp; } return (TRUE); } /* * This routine rebuilds the * text in the special secret buffer * that holds the buffer list. It is called * by the list buffers command. Return TRUE * if everything works. Return FALSE if there * is an error (if there is no memory). */ int makelist() { register char *cp1; register char *cp2; register int c; register BUFFER *bp; register LINE *lp; register int nbytes; register int s; register int i; char b[6+1]; char line[128]; blistp->b_flag &= ~BFCHG; /* Don't complain! */ if ((s=bclear(blistp)) != TRUE) /* Blow old text away */ return (s); Strcpy(blistp->b_fname, ""); if (addline("AC MODES Size Buffer File") == FALSE || addline("-- ----- ---- ------ ----") == FALSE) return (FALSE); bp = bheadp; /* For all buffers */ /* build line to report global mode settings */ cp1 = &line[0]; *cp1++ = ' '; *cp1++ = ' '; *cp1++ = ' '; /* output the mode codes */ for (i = 0; i < NUMMODES; i++) if (gmode & (1 << i)) *cp1++ = modecode[i]; else *cp1++ = '.'; Strcpy(cp1, " Global Modes"); if (addline(line) == FALSE) return(FALSE); /* output the list of buffers */ while (bp != NULL) { if ((bp->b_flag&BFTEMP) != 0) { /* Skip magic ones. */ bp = bp->b_bufp; continue; } cp1 = &line[0]; /* Start at left edge */ /* output status of ACTIVE flag (has the file been read in? */ if (bp->b_active == TRUE) /* "@" if activated */ *cp1++ = '@'; else *cp1++ = ' '; /* output status of changed flag */ if ((bp->b_flag&BFCHG) != 0) /* "*" if changed */ *cp1++ = '*'; else *cp1++ = ' '; *cp1++ = ' '; /* Gap. */ /* output the mode codes */ for (i = 0; i < NUMMODES; i++) { if (bp->b_mode & (1 << i)) *cp1++ = modecode[i]; else *cp1++ = '.'; } *cp1++ = ' '; /* Gap. */ nbytes = 0; /* Count bytes in buf. */ lp = lforw(bp->b_linep); while (lp != bp->b_linep) { nbytes += llength(lp)+1; lp = lforw(lp); } emacs_itoa(b, 6, nbytes); /* 6 digit buffer size. */ cp2 = &b[0]; while ((c = *cp2++) != 0) *cp1++ = c; *cp1++ = ' '; /* Gap. */ cp2 = &bp->b_bname[0]; /* Buffer name */ while ((c = *cp2++) != 0) *cp1++ = c; cp2 = &bp->b_fname[0]; /* File name */ if (*cp2 != 0) { while (cp1 < &line[2+1+5+1+6+1+NBUFN]) *cp1++ = ' '; while ((c = *cp2++) != 0) { if (cp1 < &line[128-1]) *cp1++ = c; } } *cp1 = 0; /* Add to the buffer. */ if (addline(line) == FALSE) return (FALSE); bp = bp->b_bufp; } return (TRUE); /* All done */ } int emacs_itoa(buf, width, num) register char buf[]; register int width; register int num; { buf[width] = 0; /* End of string. */ while (num >= 10) { /* Conditional digits. */ buf[--width] = (num%10) + '0'; num /= 10; } buf[--width] = num + '0'; /* Always 1 digit. */ while (width != 0) /* Pad with blanks. */ buf[--width] = ' '; return TRUE; } /* * The argument "text" points to * a string. Append this line to the * buffer list buffer. Handcraft the EOL * on the end. Return TRUE if it worked and * FALSE if you ran out of room. */ int addline(text) char *text; { register LINE *lp; register int i; register int ntext; ntext = strlen(text); if ((lp=lalloc(ntext)) == NULL) return (FALSE); for (i=0; ib_linep->l_bp->l_fp = lp; /* Hook onto the end */ lp->l_bp = blistp->b_linep->l_bp; blistp->b_linep->l_bp = lp; lp->l_fp = blistp->b_linep; if (blistp->b_dotp == blistp->b_linep) /* If "." is at the end */ blistp->b_dotp = lp; /* move it to new line */ return (TRUE); } /* * Look through the list of * buffers. Return TRUE if there * are any changed buffers. Buffers * that hold magic internal stuff are * not considered; who cares if the * list of buffer names is hacked. * Return FALSE if no buffers * have been changed. */ int anycb() { register BUFFER *bp; bp = bheadp; while (bp != NULL) { if ((bp->b_flag&BFTEMP)==0 && (bp->b_flag&BFCHG)!=0) return (TRUE); bp = bp->b_bufp; } return (FALSE); } #if MLH /* buffer names have a prefix of the form "(nnn) " which is the buffer * number. One can identify a buffer from either its number or name */ static int nextnum; static int bufname_match(pattern, string) char *pattern, *string; { char *bufnum, *bufname, *cp, buf[NBUFN]; strncpy(buf, string, NBUFN); buf[NBUFN-1] = '\0'; for (cp=buf; cp < &buf[NBUFN]; cp++){ if (*cp == ')') break; } if (cp >= &buf[NBUFN]) { /*old style-- buffer name has no number*/ bufnum = buf; bufname = buf; } else { *cp = '\0'; /* every name should have a prefix */ bufname = cp + 2; bufnum = buf+1; } return (strcmp(pattern, bufnum) == 0 || strcmp(pattern, bufname) == 0); } #endif /*MLH*/ /* * Find a buffer, by name. Return a pointer * to the BUFFER structure associated with it. If * the named buffer is found, but is a TEMP buffer (like * the buffer list) conplain. If the buffer is not found * and the "cflag" is TRUE, create it. The "bflag" is * the settings for the flags in in buffer. */ BUFFER *bfind(bname, cflag, bflag) register char *bname; int cflag, bflag; { register BUFFER *bp; register BUFFER *sb; /* buffer to insert after */ register LINE *lp; bp = bheadp; while (bp != NULL) { #if MLH if (bufname_match(bname, bp->b_bname)) { #else if (strcmp(bname, bp->b_bname) == 0) { #endif /*MLH*/ if ((bp->b_flag&BFTEMP) != 0) { mlwrite("Cannot select builtin buffer"); return (NULL); } return (bp); } bp = bp->b_bufp; } if (cflag != FALSE) { if ((bp=(BUFFER *)malloc(sizeof(BUFFER))) == NULL) return (NULL); if ((lp=lalloc(0)) == NULL) { free((char *) bp); return (NULL); } /* find the place in the list to insert this buffer */ if (bheadp == NULL || strcmp(bheadp->b_bname, bname) > 0) { /* insert at the begining */ bp->b_bufp = bheadp; bheadp = bp; } else { sb = bheadp; while (sb->b_bufp != NULL) { if (strcmp(sb->b_bufp->b_bname, bname) > 0) break; sb = sb->b_bufp; } /* and insert it */ bp->b_bufp = sb->b_bufp; sb->b_bufp = bp; } /* and set up the other buffer fields */ bp->b_active = TRUE; bp->b_dotp = lp; bp->b_doto = 0; bp->b_markp = NULL; bp->b_marko = 0; bp->b_flag = bflag; bp->b_mode = gmode; bp->b_nwnd = 0; bp->b_linep = lp; Strcpy(bp->b_fname, ""); #if MLH {char name[NBUFN + 10]; Sprintf(name, "(%d) %s", nextnum++, bname); Strncpy(bp->b_bname, name,NBUFN); bp->b_bname[NBUFN-1] = '\0'; } #else Strcpy(bp->b_bname, bname); #endif /*MLH*/ lp->l_fp = lp; lp->l_bp = lp; } return (bp); } /* * This routine blows away all of the text * in a buffer. If the buffer is marked as changed * then we ask if it is ok to blow it away; this is * to save the user the grief of losing text. The * window chain is nearly always wrong if this gets * called; the caller must arrange for the updates * that are required. Return TRUE if everything * looks good. */ int bclear(bp) register BUFFER *bp; { register LINE *lp; register int s; if ((bp->b_flag&BFTEMP) == 0 /* Not scratch buffer. */ && (bp->b_flag&BFCHG) != 0 /* Something changed */ && (s=mlyesno("Discard changes")) != TRUE) return (s); bp->b_flag &= ~BFCHG; /* Not changed */ while ((lp=lforw(bp->b_linep)) != bp->b_linep) lfree(lp); bp->b_dotp = bp->b_linep; /* Fix "." */ bp->b_doto = 0; bp->b_markp = NULL; /* Invalidate "mark" */ bp->b_marko = 0; return (TRUE); } neuron-7.5/src/memacs/display.c000077500000000000000000001011561323325274500165550ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/display.c,v 1.2 1995/04/03 13:56:38 hines Exp */ /* display.c,v * Revision 1.2 1995/04/03 13:56:38 hines * Port to MSWindows * * Revision 1.1.1.1 1994/10/12 17:21:24 hines * NEURON 3.0 distribution * * Revision 1.5 91/08/22 12:33:38 hines * works with turboc * * Revision 1.4 91/08/13 16:33:50 hines * vtinit can be called more than once. * * Revision 1.3 89/07/10 10:25:19 mlh * LINT free * * Revision 1.2 89/07/09 12:18:35 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:17 mlh * Initial revision * */ /* * The functions in this file handle redisplay. There are two halves, the * ones that update the virtual display screen, and the ones that make the * physical display screen the same as the virtual display screen. These * functions use hints that are left in the windows by the commands. * */ #include #include "estruct.h" #include "edef.h" #define WFDEBUG 0 /* Window flag debug. */ typedef struct VIDEO { short v_flag; /* Flags */ char v_text[1]; /* Screen data. */ } VIDEO; #define VFCHG 0x0001 /* Changed flag */ #define VFEXT 0x0002 /* extended (beyond column 80) */ #define VFREV 0x0004 /* reverse video status */ #define VFREQ 0x0008 /* reverse video request */ int vtrow = 0; /* Row location of SW cursor */ int vtcol = 0; /* Column location of SW cursor */ int ttrow = HUGE; /* Row location of HW cursor */ int ttcol = HUGE; /* Column location of HW cursor */ int lbound = 0; /* leftmost column of current line being displayed */ VIDEO **vscreen; /* Virtual screen. */ VIDEO **pscreen; /* Physical screen. */ /* * Initialize the data structures used by the display code. The edge vectors * used to access the screens are set up. The operating system's terminal I/O * channel is set up. All the other things get initialized at compile time. * The original window has "WFCHG" set, so that it will get completely * redrawn on the first call to "update". */ int vtinit() { register int i; register VIDEO *vp; static int nrow, ncol; (*term.t_open)(); if (nrow == term.t_nrow && ncol == term.t_ncol) { return TRUE; } (*term.t_rev)(FALSE); if (vscreen) { for (i=0; iv_flag = VFCHG; vscreen[i] = vp; vp = (VIDEO *) malloc((unsigned)(sizeof(VIDEO)+term.t_ncol)); if (vp == NULL) exit(1); vp->v_flag = VFCHG; pscreen[i] = vp; } if (nrow) { WINDOW *wp; for (wp = wheadp; wp; wp = wp->w_wndp) { wp->w_ntrows = term.t_nrow - 1; wp->w_toprow = 0; wp->w_flag |= WFFORCE|WFMODE|WFHARD; } } nrow = term.t_nrow; ncol = term.t_ncol; return TRUE; } /* * Clean up the virtual terminal system, in anticipation for a return to the * operating system. Move down to the last line and clear it out (the next * system prompt will be written in the line). Shut down the channel to the * terminal. */ int vttidy() { mlerase(); movecursor(term.t_nrow, 0); (*term.t_close)(); return TRUE; } /* * Set the virtual cursor to the specified row and column on the virtual * screen. There is no checking for nonsense values; this might be a good * idea during the early stages. */ int vtmove(row, col) int row, col; { vtrow = row; vtcol = col; return TRUE; } /* * Write a character to the virtual screen. The virtual row and column are * updated. If the line is too long put a "$" in the last column. This routine * only puts printing characters into the virtual terminal buffers. Only * column overflow is checked. */ int vtputc(c) int c; { register VIDEO *vp; vp = vscreen[vtrow]; if (vtcol >= term.t_ncol) { vtcol = (vtcol + 0x07) & ~0x07; vp->v_text[term.t_ncol - 1] = '$'; } else if (c == '\t') { do { vtputc(' '); } #if TRUETAB while ((vtcol%tabsize) != 0); #else while ((vtcol&0x07) != 0); #endif } else if (c < 0x20 || c == 0x7F) { vtputc('^'); vtputc(c ^ 0x40); } else vp->v_text[vtcol++] = c; return TRUE; } /* put a character to the virtual screen in an extended line. If we are not yet on left edge, don't print it yet. check for overflow on the right margin */ int vtpute(c) int c; { register VIDEO *vp; vp = vscreen[vtrow]; if (vtcol >= term.t_ncol) { vtcol = (vtcol + 0x07) & ~0x07; vp->v_text[term.t_ncol - 1] = '$'; } else if (c == '\t') { do { vtpute(' '); } #if TRUETAB while (((vtcol + lbound)%tabsize) != 0); #else while (((vtcol + lbound)&0x07) != 0); #endif } else if (c < 0x20 || c == 0x7F) { vtpute('^'); vtpute(c ^ 0x40); } else { if (vtcol >= 0) vp->v_text[vtcol] = c; ++vtcol; } return TRUE; } /* * Erase from the end of the software cursor to the end of the line on which * the software cursor is located. */ int vteeol() { register VIDEO *vp; vp = vscreen[vtrow]; while (vtcol < term.t_ncol) vp->v_text[vtcol++] = ' '; return TRUE; } /* * Make sure that the display is right. This is a three part process. First, * scan through all of the windows looking for dirty ones. Check the framing, * and refresh the screen. Second, make sure that "currow" and "curcol" are * correct for the current window. Third, make the virtual and physical * screens the same. */ int update() { register LINE *lp; register WINDOW *wp; register VIDEO *vp1; register VIDEO *vp2; register int i; register int j; register int c; #if TYPEAH if (typahead()) return(TRUE); #endif /* update the reverse video flags for any mode lines out there */ for (i = 0; i < term.t_nrow; ++i) vscreen[i]->v_flag &= ~VFREQ; #if REVSTA wp = wheadp; while (wp != NULL) { vscreen[wp->w_toprow+wp->w_ntrows]->v_flag |= VFREQ; wp = wp->w_wndp; } #endif wp = wheadp; while (wp != NULL) { /* Look at any window with update flags set on. */ if (wp->w_flag != 0) { /* If not force reframe, check the framing. */ if ((wp->w_flag & WFFORCE) == 0) { lp = wp->w_linep; for (i = 0; i < wp->w_ntrows; ++i) { if (lp == wp->w_dotp) goto out; if (lp == wp->w_bufp->b_linep) break; lp = lforw(lp); } } /* Not acceptable, better compute a new value for the line at the * top of the window. Then set the "WFHARD" flag to force full * redraw. */ i = wp->w_force; if (i > 0) { --i; if (i >= wp->w_ntrows) i = wp->w_ntrows-1; } else if (i < 0) { i += wp->w_ntrows; if (i < 0) i = 0; } else i = wp->w_ntrows/2; lp = wp->w_dotp; while (i != 0 && lback(lp) != wp->w_bufp->b_linep) { --i; lp = lback(lp); } wp->w_linep = lp; wp->w_flag |= WFHARD; /* Force full. */ out: /* Try to use reduced update. Mode line update has its own special * flag. The fast update is used if the only thing to do is within * the line editing. */ lp = wp->w_linep; i = wp->w_toprow; if ((wp->w_flag & ~WFMODE) == WFEDIT) { while (lp != wp->w_dotp) { ++i; lp = lforw(lp); } vscreen[i]->v_flag |= VFCHG; vtmove(i, 0); for (j = 0; j < llength(lp); ++j) vtputc(lgetc(lp, j)); vteeol(); } else if ((wp->w_flag & (WFEDIT | WFHARD)) != 0) { while (i < wp->w_toprow+wp->w_ntrows) { vscreen[i]->v_flag |= VFCHG; vtmove(i, 0); /* if line has been changed */ if (lp != wp->w_bufp->b_linep) { for (j = 0; j < llength(lp); ++j) vtputc(lgetc(lp, j)); lp = lforw(lp); } vteeol(); ++i; } } #if ~WFDEBUG if ((wp->w_flag&WFMODE) != 0) modeline(wp); wp->w_flag = 0; wp->w_force = 0; #endif } #if WFDEBUG modeline(wp); wp->w_flag = 0; wp->w_force = 0; #endif /* and onward to the next window */ wp = wp->w_wndp; } /* Always recompute the row and column number of the hardware cursor. This * is the only update for simple moves. */ lp = curwp->w_linep; currow = curwp->w_toprow; while (lp != curwp->w_dotp) { ++currow; lp = lforw(lp); } curcol = 0; i = 0; while (i < curwp->w_doto) { c = lgetc(lp, i++); if (c == '\t') #if TRUETAB curcol += tabsize - curcol%tabsize - 1; #else curcol |= 0x07; #endif else if (c < 0x20 || c == 0x7F) ++curcol; ++curcol; } if (curcol >= term.t_ncol - 1) { /* extended line. */ /* flag we are extended and changed */ vscreen[currow]->v_flag |= VFEXT | VFCHG; updext(); /* and output extended line */ } else lbound = 0; /* not extended line */ /* make sure no lines need to be de-extended because the cursor is no longer on them */ wp = wheadp; while (wp != NULL) { lp = wp->w_linep; i = wp->w_toprow; while (i < wp->w_toprow + wp->w_ntrows) { if (vscreen[i]->v_flag & VFEXT) { /* always flag extended lines as changed */ vscreen[i]->v_flag |= VFCHG; if ((wp != curwp) || (lp != wp->w_dotp) || (curcol < term.t_ncol - 1)) { vtmove(i, 0); for (j = 0; j < llength(lp); ++j) vtputc(lgetc(lp, j)); vteeol(); /* this line no longer is extended */ vscreen[i]->v_flag &= ~VFEXT; } } lp = lforw(lp); ++i; } /* and onward to the next window */ wp = wp->w_wndp; } /* Special hacking if the screen is garbage. Clear the hardware screen, * and update your copy to agree with it. Set all the virtual screen * change bits, to force a full update. */ if (sgarbf != FALSE) { for (i = 0; i < term.t_nrow; ++i) { vscreen[i]->v_flag |= VFCHG; vp1 = pscreen[i]; for (j = 0; j < term.t_ncol; ++j) vp1->v_text[j] = ' '; } movecursor(0, 0); /* Erase the screen. */ (*term.t_eeop)(); sgarbf = FALSE; /* Erase-page clears */ mpresf = FALSE; /* the message area. */ } /* Make sure that the physical and virtual displays agree. Unlike before, * the "updateline" code is only called with a line that has been updated * for sure. */ for (i = 0; i < term.t_nrow; ++i) { vp1 = vscreen[i]; /* for each line that needs to be updated, or that needs its reverse video status changed, call the line updater */ j = vp1->v_flag; if (((j & VFCHG) != 0) || (((j & VFREV) == 0) != ((j & VFREQ) == 0))) { #if TYPEAH if (typahead()) return(TRUE); #endif vp2 = pscreen[i]; IGNORE(updateline(i, &vp1->v_text[0], &vp2->v_text[0], &vp1->v_flag)); } } /* Finally, update the hardware cursor and flush out buffers. */ movecursor(currow, curcol - lbound); (*term.t_flush)(); return TRUE; } /* updext: update the extended line which the cursor is currently on at a column greater than the terminal width. The line will be scrolled right or left to let the user see where the cursor is */ int updext() { register int rcursor; /* real cursor location */ register LINE *lp; /* pointer to current line */ register int j; /* index into line */ /* calculate what column the real cursor will end up in */ rcursor = ((curcol - term.t_ncol) % term.t_scrsiz) + term.t_margin; lbound = curcol - rcursor + 1; /* scan through the line outputing characters to the virtual screen */ /* once we reach the left edge */ vtmove(currow, -lbound); /* start scanning offscreen */ lp = curwp->w_dotp; /* line to output */ for (j=0; jv_text[0] = '$'; return TRUE; } /* * Update a single line. This does not know how to use insert or delete * character sequences; we are using VT52 functionality. Update the physical * row and column variables. It does try an exploit erase to end of line. The * RAINBOW version of this routine uses fast video. */ int updateline(row, vline, pline, flags) int row; char vline[]; /* what we want it to end up as */ char pline[]; /* what it looks like now */ short *flags; /* and how we want it that way */ { #if RAINBOW register char *cp1; register char *cp2; register int nch; /* since we don't know how to make the rainbow do this, turn it off */ flags &= (~VFREV & ~VFREQ); cp1 = &vline[0]; /* Use fast video. */ cp2 = &pline[0]; putline(row+1, 1, cp1); nch = term.t_ncol; do { *cp2 = *cp1; ++cp2; ++cp1; } while (--nch); *flags &= ~VFCHG; #else register char *cp1; register char *cp2; register char *cp3; register char *cp4; register char *cp5; register int nbflag; /* non-blanks to the right flag? */ int rev; /* reverse video flag */ int req; /* reverse video request flag */ /* set up pointers to virtual and physical lines */ cp1 = &vline[0]; cp2 = &pline[0]; #if REVSTA /* if we need to change the reverse video status of the current line, we need to re-write the entire line */ rev = *flags & VFREV; req = *flags & VFREQ; if (rev != req) { movecursor(row, 0); /* Go to start of line. */ (*term.t_rev)(req != FALSE); /* set rev video if needed */ /* scan through the line and dump it to the screen and the virtual screen array */ cp3 = &vline[term.t_ncol]; while (cp1 < cp3) { (*term.t_putchar)(*cp1); ++ttcol; *cp2++ = *cp1++; } (*term.t_rev)(FALSE); /* turn rev video off */ /* update the needed flags */ *flags &= ~VFCHG; if (req) *flags |= VFREV; else *flags &= ~VFREV; return(TRUE); } #endif /* advance past any common chars at the left */ while (cp1 != &vline[term.t_ncol] && cp1[0] == cp2[0]) { ++cp1; ++cp2; } /* This can still happen, even though we only call this routine on changed * lines. A hard update is always done when a line splits, a massive * change is done, or a buffer is displayed twice. This optimizes out most * of the excess updating. A lot of computes are used, but these tend to * be hard operations that do a lot of update, so I don't really care. */ /* if both lines are the same, no update needs to be done */ if (cp1 == &vline[term.t_ncol]) { *flags &= ~VFCHG; /* flag this line is changed */ return(TRUE); } /* find out if there is a match on the right */ nbflag = FALSE; cp3 = &vline[term.t_ncol]; cp4 = &pline[term.t_ncol]; while (cp3[-1] == cp4[-1]) { --cp3; --cp4; if (cp3[0] != ' ') /* Note if any nonblank */ nbflag = TRUE; /* in right match. */ } cp5 = cp3; if (nbflag == FALSE && eolexist == TRUE) { /* Erase to EOL ? */ while (cp5!=cp1 && cp5[-1]==' ') --cp5; if (cp3-cp5 <= 3) /* Use only if erase is */ cp5 = cp3; /* fewer characters. */ } movecursor(row, cp1-&vline[0]); /* Go to start of line. */ while (cp1 != cp5) { /* Ordinary. */ (*term.t_putchar)(*cp1); ++ttcol; *cp2++ = *cp1++; } if (cp5 != cp3) { /* Erase. */ (*term.t_eeol)(); while (cp1 != cp3) *cp2++ = *cp1++; } *flags &= ~VFCHG; /* flag this line is changed */ #endif return TRUE; } /* * Redisplay the mode line for the window pointed to by the "wp". This is the * only routine that has any idea of how the modeline is formatted. You can * change the modeline format by hacking at this routine. Called by "update" * any time there is a dirty window. */ int modeline(wp) WINDOW *wp; { register char *cp; register int c; register int n; /* cursor position count */ register BUFFER *bp; register int i; /* loop index */ register int lchar; /* character to draw line in buffer with */ register int firstm; /* is this the first mode? */ char tline[NLINE]; /* buffer for part of mode line */ n = wp->w_toprow+wp->w_ntrows; /* Location. */ vscreen[n]->v_flag |= VFCHG; /* Redraw next time. */ vtmove(n, 0); /* Seek to right line. */ if (wp == curwp) /* mark the current buffer */ lchar = '='; else #if REVSTA & (BENTHAK == 0) if (revexist) lchar = ' '; else #endif lchar = '-'; vtputc(lchar); bp = wp->w_bufp; if ((bp->b_flag&BFCHG) != 0) /* "*" if changed. */ vtputc('*'); else vtputc(lchar); n = 2; #if (MLH == 1) Strcpy(tline, " MicroEMACS 3.6M1.1 ("); /* Buffer name. */ #else Strcpy(tline, " MicroEMACS 3.6B1.1 ("); /* Buffer name. */ #endif /*MLH*/ /* display the modes */ firstm = TRUE; for (i = 0; i < NUMMODES; i++) /* add in the mode flags */ if (wp->w_bufp->b_mode & (1 << i)) { if (firstm != TRUE) Strcat(tline, " "); firstm = FALSE; Strcat(tline, modename[i]); } Strcat(tline,") "); cp = &tline[0]; while ((c = *cp++) != 0) { vtputc(c); ++n; } vtputc(lchar); vtputc(lchar); vtputc(' '); n += 3; cp = &bp->b_bname[0]; while ((c = *cp++) != 0) { vtputc(c); ++n; } vtputc(' '); vtputc(lchar); vtputc(lchar); n += 3; if (bp->b_fname[0] != 0) /* File name. */ { vtputc(' '); ++n; cp = "File: "; while ((c = *cp++) != 0) { vtputc(c); ++n; } cp = &bp->b_fname[0]; while ((c = *cp++) != 0) { vtputc(c); ++n; } vtputc(' '); ++n; } #if WFDEBUG vtputc(lchar); vtputc((wp->w_flag&WFMODE)!=0 ? 'M' : lchar); vtputc((wp->w_flag&WFHARD)!=0 ? 'H' : lchar); vtputc((wp->w_flag&WFEDIT)!=0 ? 'E' : lchar); vtputc((wp->w_flag&WFMOVE)!=0 ? 'V' : lchar); vtputc((wp->w_flag&WFFORCE)!=0 ? 'F' : lchar); n += 6; #endif while (n < term.t_ncol) /* Pad to full width. */ { vtputc(lchar); ++n; } return TRUE; } int upmode() /* update all the mode lines */ { register WINDOW *wp; wp = wheadp; while (wp != NULL) { wp->w_flag |= WFMODE; wp = wp->w_wndp; } return TRUE; } /* * Send a command to the terminal to move the hardware cursor to row "row" * and column "col". The row and column arguments are origin 0. Optimize out * random calls. Update "ttrow" and "ttcol". */ int movecursor(row, col) int row, col; { if (row!=ttrow || col!=ttcol) { ttrow = row; ttcol = col; (*term.t_move)(row, col); } return TRUE; } /* * Erase the message line. This is a special routine because the message line * is not considered to be part of the virtual screen. It always works * immediately; the terminal buffer is flushed via a call to the flusher. */ int mlerase() { int i; movecursor(term.t_nrow, 0); if (eolexist == TRUE) (*term.t_eeol)(); else { for (i = 0; i < term.t_ncol - 1; i++) (*term.t_putchar)(' '); movecursor(term.t_nrow, 1); /* force the move! */ movecursor(term.t_nrow, 0); } (*term.t_flush)(); mpresf = FALSE; return TRUE; } /* * Ask a yes or no question in the message line. Return either TRUE, FALSE, or * ABORT. The ABORT status is returned if the user bumps out of the question * with a ^G. Used any time a confirmation is required. */ int mlyesno(prompt) char *prompt; { char c; /* input character */ char buf[NPAT]; /* prompt to user */ for (;;) { /* build and prompt the user */ Strcpy(buf, prompt); Strcat(buf, " [y/n]? "); mlwrite(buf); /* get the responce */ c = (*term.t_getchar)(); if (c == BELL) /* Bail out! */ return(ABORT); if (c=='y' || c=='Y') return(TRUE); if (c=='n' || c=='N') return(FALSE); } } /* * Write a prompt into the message line, then read back a response. Keep * track of the physical position of the cursor. If we are in a keyboard * macro throw the prompt away, and return the remembered response. This * lets macros run at full speed. The reply is always terminated by a carriage * return. Handle erase, kill, and abort keys. */ int mlreply(prompt, buf, nbuf) char *prompt; char *buf; int nbuf; { return(mlreplyt(prompt,buf,nbuf,'\n')); } /* A more generalized prompt/reply function allowing the caller to specify the proper terminator. If the terminator is not a return ('\n') it will echo as "" */ int mlreplyt(prompt, buf, nbuf, eolchar) char *prompt; char *buf; char eolchar; int nbuf; { register int cpos; register int i; register int c; cpos = 0; if (kbdmop != NULL) { while ((c = *kbdmop++) != '\0') buf[cpos++] = c; buf[cpos] = 0; if (buf[0] == 0) return(FALSE); return(TRUE); } /* check to see if we are executing a command line */ if (clexec) { IGNORE(nxtarg(buf)); return(TRUE); } mlwrite(prompt); for (;;) { /* get a character from the user. if it is a , change it to a */ c = (*term.t_getchar)(); if (c == 0x0d) c = '\n'; if (c == eolchar) { buf[cpos++] = 0; if (kbdmip != NULL) { if (kbdmip+cpos > &kbdm[NKBDM-3]) { IGNORE(ctrlg(FALSE, 0)); (*term.t_flush)(); return(ABORT); } for (i=0; i for */ (*term.t_putchar)('<'); (*term.t_putchar)('N'); (*term.t_putchar)('L'); (*term.t_putchar)('>'); ttcol += 3; } ++ttcol; (*term.t_flush)(); } } } return TRUE; } /* * Write a message into the message line. Keep track of the physical cursor * position. A small class of printf like format items is handled. Assumes the * stack grows down; this assumption is made by the "++" in the argument scan * loop. Set the "message line" flag TRUE. */ /*VARARGS1*/ int mlwrite(fmt, arg) char *fmt; int arg; { register int c; register char *ap; if (eolexist == FALSE) { mlerase(); (*term.t_flush)(); } movecursor(term.t_nrow, 0); ap = (char *) &arg; while ((c = *fmt++) != 0) { if (c != '%') { (*term.t_putchar)(c); ++ttcol; } else { c = *fmt++; switch (c) { case 'd': mlputi(*(int *)ap, 10); ap += sizeof(int); break; case 'o': mlputi(*(int *)ap, 8); ap += sizeof(int); break; case 'x': mlputi(*(int *)ap, 16); ap += sizeof(int); break; case 'D': mlputli(*(long *)ap, 10); ap += sizeof(long); break; case 's': mlputs(*(char **)ap); ap += sizeof(char *); break; default: (*term.t_putchar)(c); ++ttcol; } } } if (eolexist == TRUE) (*term.t_eeol)(); (*term.t_flush)(); mpresf = TRUE; return TRUE; } /* * Write out a string. Update the physical cursor position. This assumes that * the characters in the string all have width "1"; if this is not the case * things will get screwed up a little. */ int mlputs(s) char *s; { register int c; while ((c = *s++) != 0) { (*term.t_putchar)(c); ++ttcol; } return TRUE; } /* * Write out an integer, in the specified radix. Update the physical cursor * position. This will not handle any negative numbers; maybe it should. */ int mlputi(i, r) int i, r; { register int q; static char hexdigits[] = "0123456789ABCDEF"; if (i < 0) { i = -i; (*term.t_putchar)('-'); } q = i/r; if (q != 0) mlputi(q, r); (*term.t_putchar)(hexdigits[i%r]); ++ttcol; return TRUE; } /* * do the same except as a long integer. */ int mlputli(l, r) long l; int r; { register long q; if (l < 0) { l = -l; (*term.t_putchar)('-'); } q = l/r; if (q != 0) mlputli(q, r); (*term.t_putchar)((int)(l%r)+'0'); ++ttcol; return TRUE; } #if RAINBOW int putline(row, col, buf) int row, col; char buf[]; { int n; n = strlen(buf); if (col + n - 1 > term.t_ncol) n = term.t_ncol - col + 1; Put_Data(row, col, n, buf); return TRUE; } #endif /* get a command name from the command line. Command completion means that pressing a will attempt to complete an unfinished command name if it is unique. */ int (*getname())() { register int cpos; /* current column on screen output */ register int c; register char *sp; /* pointer to string for output */ register NBIND *ffp; /* first ptr to entry in name binding table */ register NBIND *cffp; /* current ptr to entry in name binding table */ register NBIND *lffp; /* last ptr to entry in name binding table */ char buf[NSTRING]; /* buffer to hold tentative command name */ int (*fncmatch())(); /* starting at the begining of the string buffer */ cpos = 0; /* if we are executing a keyboard macro, fill our buffer from there, and attempt a straight match */ if (kbdmop != NULL) { while ((c = *kbdmop++) != '\0') buf[cpos++] = c; buf[cpos] = 0; /* return the result of a match */ return(fncmatch(&buf[0])); } /* if we are executing a command line get the next arg and match it */ if (clexec) { IGNORE(nxtarg(buf)); return(fncmatch(&buf[0])); } /* build a name string from the keyboard */ while (TRUE) { c = (*term.t_getchar)(); /* if we are at the end, just match it */ if (c == 0x0d) { buf[cpos] = 0; /* save keyboard macro string if needed */ if (kbdtext(&buf[0]) == ABORT) return( (int (*)()) NULL); /* and match it off */ return(fncmatch(&buf[0])); } else if (c == 0x07) { /* Bell, abort */ (*term.t_putchar)('^'); (*term.t_putchar)('G'); ttcol += 2; IGNORE(ctrlg(FALSE, 0)); (*term.t_flush)(); return( (int (*)()) NULL); } else if (c == 0x7F || c == 0x08) { /* rubout/erase */ if (cpos != 0) { (*term.t_putchar)('\b'); (*term.t_putchar)(' '); (*term.t_putchar)('\b'); --ttcol; --cpos; (*term.t_flush)(); } } else if (c == 0x15) { /* C-U, kill */ while (cpos != 0) { (*term.t_putchar)('\b'); (*term.t_putchar)(' '); (*term.t_putchar)('\b'); --cpos; --ttcol; } (*term.t_flush)(); } else if (c == ' ') { /* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */ /* attempt a completion */ buf[cpos] = 0; /* terminate it for us */ ffp = &names[0]; /* scan for matches */ while (ffp->n_func != NULL) { if (strncmp(buf, ffp->n_name, strlen(buf)) == 0) { /* a possible match! More than one? */ if ((ffp + 1)->n_func == NULL || (strncmp(buf, (ffp+1)->n_name, strlen(buf)) != 0)) { /* no...we match, print it */ sp = ffp->n_name + cpos; while (*sp) (*term.t_putchar)(*sp++); (*term.t_flush)(); return(ffp->n_func); } else { /* << << << << << << << << << << << << << << << << << */ /* try for a partial match against the list */ /* first scan down until we no longer match the current input */ lffp = (ffp + 1); while ((lffp+1)->n_func != NULL) { if (strncmp(buf, (lffp+1)->n_name, strlen(buf)) != 0) break; ++lffp; } /* and now, attempt to partial complete the string, char at a time */ while (TRUE) { /* add the next char in */ buf[cpos] = ffp->n_name[cpos]; /* scan through the candidates */ cffp = ffp + 1; while (cffp <= lffp) { if (cffp->n_name[cpos] != buf[cpos]) goto onward; ++cffp; } /* add the character */ (*term.t_putchar)(buf[cpos++]); } /* << << << << << << << << << << << << << << << << << */ } } ++ffp; } /* no match.....beep and onward */ (*term.t_beep)(); onward:; (*term.t_flush)(); /* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */ } else { if (cpos < NSTRING-1 && c > ' ') { buf[cpos++] = c; (*term.t_putchar)(c); } ++ttcol; (*term.t_flush)(); } } } int kbdtext(buf) /* add this text string to the current keyboard macro definition */ char *buf; /* text to add to keyboard macro */ { /* if we are defining a keyboard macro, save it */ if (kbdmip != NULL) { if (kbdmip+strlen(buf) > &kbdm[NKBDM-4]) { IGNORE(ctrlg(FALSE, 0)); (*term.t_flush)(); return(ABORT); } /* copy string in and null terminate it */ while (*buf) *kbdmip++ = *buf++; *kbdmip++ = 0; } return(TRUE); } neuron-7.5/src/memacs/ebind.h000077500000000000000000000165331323325274500162020ustar00rootroot00000000000000/* /local/src/master/nrn/src/memacs/ebind.h,v 1.3 1999/10/15 10:54:02 hines Exp */ /* ebind.h,v * Revision 1.3 1999/10/15 10:54:02 hines * NEOSIM simple interface for testing * * Revision 1.2 1999/10/12 14:21:13 hines * bind delgmod to META|CTRL|J since ^M often translated to newline prior * to getting to memacs * * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.2 91/12/31 09:08:55 hines * ^J treated as newline instead of just linefeed. This allows text selections * from other windows to be inserted without extra accumulating space before * each line. * * Revision 1.1 89/07/08 15:37:37 mlh * Initial revision * */ /* EBIND: Initial default key to function bindings for MicroEMACS 3.2 written by Dave G. Conroy modified by Steve Wilhite, George Jones greatly modified by Daniel Lawrence */ /* * Command table. * This table is *roughly* in ASCII order, left to right across the * characters of the command. This expains the funny location of the * control-X commands. */ KEYTAB keytab[NBINDS] = { #if V7 {CTRL|'@', setmark}, /*Might conflict with function keys*/ #endif {CTRL|'A', gotobol}, {CTRL|'B', backchar}, /* Is this a good idea? */ {CTRL|'C', quickexit}, /* write modified buffers */ {CTRL|'D', forwdel}, {CTRL|'E', gotoeol}, {CTRL|'F', forwchar}, {CTRL|'G', ctrlg}, {CTRL|'H', backdel}, {CTRL|'I', tab}, {CTRL|'J', newline}, {CTRL|'K', killtext}, {CTRL|'L', refresh}, {CTRL|'M', newline}, {CTRL|'N', forwline}, {CTRL|'O', openline}, {CTRL|'P', backline}, {CTRL|'Q', quote}, {CTRL|'R', backsearch}, {CTRL|'S', forwsearch}, {CTRL|'T', twiddle}, {CTRL|'V', forwpage}, {CTRL|'W', killregion}, {CTRL|'Y', yank}, {CTRL|'Z', mvdnwind}, {CTRL|'_', spawncli}, {CTLX|CTRL|'B', listbuffers}, {CTLX|CTRL|'C', quit}, /* Hard quit. */ {CTLX|CTRL|'F', filefind}, {CTLX|CTRL|'I', insfile}, {CTLX|CTRL|'L', lowerregion}, {CTLX|CTRL|'M', delmode}, {CTLX|CTRL|'J', delmode}, {CTLX|CTRL|'N', mvdnwind}, /* Non-std (std: next error)*/ {CTLX|CTRL|'O', deblank}, {CTLX|CTRL|'P', mvupwind}, {CTLX|CTRL|'R', fileread}, {CTLX|CTRL|'S', filesave}, {CTLX|CTRL|'U', upperregion}, {CTLX|CTRL|'V', viewfile}, {CTLX|CTRL|'W', filewrite}, {CTLX|CTRL|'X', swapmark}, {CTLX|CTRL|'Z', shrinkwind}, {CTLX|'?', deskey}, {CTLX|'!', spawn}, /* Run 1 command. */ {CTLX|'=', showcpos}, {CTLX|'(', ctlxlp}, {CTLX|')', ctlxrp}, {CTLX|'^', enlargewind}, {CTLX|'1', onlywind}, {CTLX|'2', splitwind}, {CTLX|'B', usebuffer}, {CTLX|'C', spawncli}, /* Run CLI in subjob. */ #if V7 & BSD {CTLX|'D', bktoshell}, /* suspend emacs */ #endif {CTLX|'E', ctlxe}, {CTLX|'F', setfillcol}, {CTLX|'K', killbuffer}, {CTLX|'M', setmode}, {CTLX|'N', nextwind}, {CTLX|'O', nextwind}, {CTLX|'P', prevwind}, {CTLX|'S', filesave}, {CTLX|'X', nextbuffer}, {CTLX|'Z', enlargewind}, {META|CTRL|'H', delbword}, {META|CTRL|'K', unbindkey}, {META|CTRL|'L', reposition}, {META|CTRL|'M', delgmode}, {META|CTRL|'J', delgmode}, {META|CTRL|'N', namebuffer}, {META|CTRL|'R', qreplace}, {META|CTRL|'V', scrnextdw}, {META|CTRL|'W', killpara}, /* Non-std (std: del region to end of internal buffer) */ {META|CTRL|'Z', scrnextup}, {META|' ', setmark}, {META|'?', help}, {META|'!', reposition}, /* {META|'.', setmark}, Non-std (std: end of wind) */ {META|'>', gotoeob}, {META|'<', gotobob}, {META|'B', backword}, {META|'C', capword}, {META|'D', delfword}, {META|'F', forwword}, {META|'G', gotoline}, {META|'J', fillpara}, {META|'K', bindtokey}, /*Non-std (std: kill2endof-sent)*/ {META|'L', lowerword}, {META|'M', setgmode}, /* Non-std (std: next non-blank)*/ {META|'N', gotoeop}, {META|'P', gotobop}, {META|'Q', qreplace}, {META|'R', sreplace}, #if V7 & BSD {META|'S', bktoshell}, #endif {META|'U', upperword}, {META|'V', backpage}, {META|'W', copyregion}, {META|'X', namedcmd}, {META|'Z', mvupwind}, {META|'[', gotobop}, {META|']', gotoeop}, {META|0x7F, delbword}, #if MSDOS & (HP150 == 0) {SPEC|CTRL|'_', forwhunt}, {SPEC|CTRL|'S', backhunt}, {SPEC|71, gotobob}, {SPEC|72, backline}, {SPEC|73, backpage}, {SPEC|75, backchar}, {SPEC|77, forwchar}, {SPEC|79, gotoeob}, {SPEC|80, forwline}, {SPEC|81, forwpage}, {SPEC|82, insspace}, {SPEC|83, forwdel}, {SPEC|115, backword}, {SPEC|116, forwword}, {SPEC|132, gotobop}, {SPEC|118, gotoeop}, #endif #if HP150 {SPEC|32, backline}, {SPEC|33, forwline}, {SPEC|35, backchar}, {SPEC|34, forwchar}, {SPEC|44, gotobob}, {SPEC|46, forwpage}, {SPEC|47, backpage}, {SPEC|82, nextwind}, {SPEC|68, openline}, {SPEC|69, killtext}, {SPEC|65, forwdel}, {SPEC|64, ctlxe}, {SPEC|67, refresh}, {SPEC|66, reposition}, {SPEC|83, help}, {SPEC|81, deskey}, #endif #if AMIGA {SPEC|'?', help}, {SPEC|'A', backline}, {SPEC|'B', forwline}, {SPEC|'C', forwchar}, {SPEC|'D', backchar}, {SPEC|'T', backpage}, {SPEC|'S', forwpage}, {SPEC|'a', backword}, {SPEC|'`', forwword}, #endif {0x7F, backdel}, {0, NULL} }; #if RAINBOW #include "rainbow.h" /* * Mapping table from the LK201 function keys to the internal EMACS character. */ int lk_map[][2] = { Up_Key, CTRL+'P', Down_Key, CTRL+'N', Left_Key, CTRL+'B', Right_Key, CTRL+'F', Shift+Left_Key, META+'B', Shift+Right_Key, META+'F', Control+Left_Key, CTRL+'A', Control+Right_Key, CTRL+'E', Prev_Scr_Key, META+'V', Next_Scr_Key, CTRL+'V', Shift+Up_Key, META+'<', Shift+Down_Key, META+'>', Cancel_Key, CTRL+'G', Find_Key, CTRL+'S', Shift+Find_Key, CTRL+'R', Insert_Key, CTRL+'Y', Options_Key, CTRL+'D', Shift+Options_Key, META+'D', Remove_Key, CTRL+'W', Shift+Remove_Key, META+'W', Select_Key, CTRL+'@', Shift+Select_Key, CTLX+CTRL+'X', Interrupt_Key, CTRL+'U', Keypad_PF2, META+'L', Keypad_PF3, META+'C', Keypad_PF4, META+'U', Shift+Keypad_PF2, CTLX+CTRL+'L', Shift+Keypad_PF4, CTLX+CTRL+'U', Keypad_1, CTLX+'1', Keypad_2, CTLX+'2', Do_Key, CTLX+'E', Keypad_4, CTLX+CTRL+'B', Keypad_5, CTLX+'B', Keypad_6, CTLX+'K', Resume_Key, META+'!', Control+Next_Scr_Key, CTLX+'N', Control+Prev_Scr_Key, CTLX+'P', Control+Up_Key, CTLX+CTRL+'P', Control+Down_Key, CTLX+CTRL+'N', Help_Key, CTLX+'=', Shift+Do_Key, CTLX+'(', Control+Do_Key, CTLX+')', Keypad_0, CTLX+'Z', Shift+Keypad_0, CTLX+CTRL+'Z', Main_Scr_Key, CTRL+'C', Keypad_Enter, CTLX+'!', Exit_Key, CTLX+CTRL+'C', Shift+Exit_Key, CTRL+'Z' }; #define lk_map_size (sizeof(lk_map)/2) #endif neuron-7.5/src/memacs/edef.h000077500000000000000000000141531323325274500160200ustar00rootroot00000000000000/* /local/src/master/nrn/src/memacs/edef.h,v 1.2 1997/08/27 20:33:06 hines Exp */ /* edef.h,v * Revision 1.2 1997/08/27 20:33:06 hines * memacs code now compiled into memacs.dll for mswindows in order to * allow nrndisk2.zip to fit on one diskette. * * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.7 93/02/11 17:07:18 hines * to work on NeXT * * Revision 1.6 93/02/03 09:18:26 hines * make slightly more generic * * Revision 1.5 91/08/22 16:58:57 hines * for distribution to work on RS6000 * * Revision 1.4 91/08/22 12:33:43 hines * works with turboc * * Revision 1.3 89/07/10 10:25:29 mlh * LINT free * * Revision 1.2 89/07/09 12:18:42 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:37:41 mlh * Initial revision * */ /* EDEF: Global variable definitions for MicroEMACS 3.2 written by Dave G. Conroy modified by Steve Wilhite, George Jones greatly modified by Daniel Lawrence */ #include "redef.h" /*mlh 2/29/87 add emacs_ prefix to all public variables*/ #include #include #if 0 #ifndef NeXT #if __TURBOC__ #include #else #include #endif #endif #endif #ifdef maindef /* for MAIN.C */ /* initialized global definitions */ int fillcol = 72; /* Current fill column */ int tabsize = 8; /* Tab size */ int kbdm[NKBDM] = {CTLX|')'}; /* Macro */ char pat[NPAT]; /* Search pattern */ char rpat[NPAT]; /* replacement pattern */ char sarg[NSTRING] = ""; /* string argument for line exec*/ int eolexist = TRUE; /* does clear to EOL exist */ int revexist = FALSE; /* does reverse video exist? */ char *modename[] = { /* name of modes */ "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER"}; char modecode[] = "WCSEVO"; /* letters to represent modes */ int gmode = 0; /* global editor mode */ int sgarbf = TRUE; /* TRUE if screen is garbage */ int mpresf = FALSE; /* TRUE if message in last line */ int clexec = FALSE; /* command line execution flag */ /* uninitialized global definitions */ int currow; /* Cursor row */ int curcol; /* Cursor column */ int thisflag; /* Flags, this command */ int lastflag; /* Flags, last command */ int curgoal; /* Goal for C-P, C-N */ #ifdef MEMACS_DLL extern WINDOW *curwp; /* Current window */ extern BUFFER *curbp; /* Current buffer */ #else WINDOW *curwp; /* Current window */ BUFFER *curbp; /* Current buffer */ #endif WINDOW *wheadp; /* Head of list of windows */ BUFFER *bheadp; /* Head of list of buffers */ BUFFER *blistp; /* Buffer for C-X C-B */ int *kbdmip; /* Input pointer for above */ int *kbdmop; /* Output pointer for above */ BUFFER *bfind(); /* Lookup a buffer by name */ WINDOW *wpopup(); /* Pop up window creation */ LINE *lalloc(); /* Allocate a line */ #else /* for all the other .C files */ /* initialized global external declarations */ extern int fillcol; /* Fill column */ extern int tabsize; /* Tab size */ extern int kbdm[]; /* Holds kayboard macro data */ extern char pat[]; /* Search pattern */ extern char rpat[]; /* Replacement pattern */ extern char sarg[]; /* string argument for line exec*/ extern int eolexist; /* does clear to EOL exist? */ extern int revexist; /* does reverse video exist? */ extern char *modename[]; /* text names of modes */ extern char modecode[]; /* letters to represent modes */ extern KEYTAB keytab[]; /* key bind to functions table */ extern NBIND names[]; /* name to function table */ extern int gmode; /* global editor mode */ extern int sgarbf; /* State of screen unknown */ extern int mpresf; /* Stuff in message line */ extern int clexec; /* command line execution flag */ /* initialized global external declarations */ extern int currow; /* Cursor row */ extern int curcol; /* Cursor column */ extern int thisflag; /* Flags, this command */ extern int lastflag; /* Flags, last command */ extern int curgoal; /* Goal for C-P, C-N */ extern WINDOW *curwp; /* Current window */ extern BUFFER *curbp; /* Current buffer */ extern WINDOW *wheadp; /* Head of list of windows */ extern BUFFER *bheadp; /* Head of list of buffers */ extern BUFFER *blistp; /* Buffer for C-X C-B */ extern int *kbdmip; /* Input pointer for above */ extern int *kbdmop; /* Output pointer for above */ extern BUFFER *bfind(); /* Lookup a buffer by name */ extern WINDOW *wpopup(); /* Pop up window creation */ extern LINE *lalloc(); /* Allocate a line */ #endif /* terminal table defined only in TERM.C */ #ifndef termdef extern TERM term; /* Terminal information. */ #endif #include "intfunc.h" #if LINT #define IGNORE(arg) {if (arg);} #define LINTUSE(arg) {if (arg);} char *cplint; #define Strcat cplint = strcat #define Strncat cplint = strncat #define Strcpy cplint = strcpy #define Strncpy cplint = strncpy #define Sprintf cplint = sprintf #else #define IGNORE(arg) arg #define LINTUSE(arg) #define Strcat strcat #define Strncat strncat #define Strcpy strcpy #define Strncpy strncpy #define Sprintf sprintf #endif neuron-7.5/src/memacs/efunc.h000077500000000000000000000262001323325274500162110ustar00rootroot00000000000000/* /local/src/master/nrn/src/memacs/efunc.h,v 1.1.1.1 1994/10/12 17:21:23 hines Exp */ /* efunc.h,v * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.1 89/07/08 15:37:45 mlh * Initial revision * */ /* EFUNC.H: MicroEMACS function declarations and names This file list all the C code functions used by MicroEMACS and the names to use to bind keys to them. To add functions, declare it here in both the extern function list and the name binding table. Update History: Daniel Lawrence 29-jan-86 - separeted out external declarations to a separate .h file - built original name to function binding table 30-jan-86 - added command declarations for Fill Paragraph command 11-feb-86 - added declaration for help and describe key commands 13-feb-86 - added declarations for view-file command 15-feb-86 - added declataitons for insert file command 17-feb-86 - added declarations for scroll next window up/down 20-feb-86 - expanded binding table to make room for new bindings 24-feb-86 - added declarations for bind-to-key and unbind-key execute named command and describe bindings 26-feb-86 - added declarations for execute command - changed name of "visit-file" to "find-file" - added declaration for execute-buffer command 27-feb-86 - added declarations for execute-file command 3-apr-86 - added declarations for next-buffer command 5-apr-86 - added declarations for kill-paragraph command 8-apr-86 - added declarations for add/delete global mode 8-apr-86 - added declarations for insert space command */ /* External function declarations */ extern int ctrlg(); /* Abort out of things */ extern int quit(); /* Quit */ extern int ctlxlp(); /* Begin macro */ extern int ctlxrp(); /* End macro */ extern int ctlxe(); /* Execute macro */ extern int fileread(); /* Get a file, read only */ extern int filefind(); /* Get a file, read write */ extern int filewrite(); /* Write a file */ extern int filesave(); /* Save current file */ extern int filename(); /* Adjust file name */ extern int getccol(); /* Get current column */ extern int gotobol(); /* Move to start of line */ extern int forwchar(); /* Move forward by characters */ extern int gotoeol(); /* Move to end of line */ extern int backchar(); /* Move backward by characters */ extern int forwline(); /* Move forward by lines */ extern int backline(); /* Move backward by lines */ extern int forwpage(); /* Move forward by pages */ extern int backpage(); /* Move backward by pages */ extern int gotobob(); /* Move to start of buffer */ extern int gotoeob(); /* Move to end of buffer */ extern int setfillcol(); /* Set fill column. */ extern int setmark(); /* Set mark */ extern int swapmark(); /* Swap "." and mark */ extern int forwsearch(); /* Search forward */ extern int backsearch(); /* Search backwards */ extern int sreplace(); /* search and replace */ extern int qreplace(); /* search and replace w/query */ extern int showcpos(); /* Show the cursor position */ extern int nextwind(); /* Move to the next window */ extern int prevwind(); /* Move to the previous window */ extern int onlywind(); /* Make current window only one */ extern int splitwind(); /* Split current window */ extern int mvdnwind(); /* Move window down */ extern int mvupwind(); /* Move window up */ extern int enlargewind(); /* Enlarge display window. */ extern int shrinkwind(); /* Shrink window. */ extern int listbuffers(); /* Display list of buffers */ extern int usebuffer(); /* Switch a window to a buffer */ extern int killbuffer(); /* Make a buffer go away. */ extern int reposition(); /* Reposition window */ extern int refresh(); /* Refresh the screen */ extern int twiddle(); /* Twiddle characters */ extern int tab(); /* Insert tab */ extern int newline(); /* Insert CR-LF */ extern int indent(); /* Insert CR-LF, then indent */ extern int openline(); /* Open up a blank line */ extern int deblank(); /* Delete blank lines */ extern int quote(); /* Insert literal */ extern int backword(); /* Backup by words */ extern int forwword(); /* Advance by words */ extern int forwdel(); /* Forward delete */ extern int backdel(); /* Backward delete */ extern int killtext(); /* Kill forward */ extern int yank(); /* Yank back from killbuffer. */ extern int upperword(); /* Upper case word. */ extern int lowerword(); /* Lower case word. */ extern int upperregion(); /* Upper case region. */ extern int lowerregion(); /* Lower case region. */ extern int capword(); /* Initial capitalize word. */ extern int delfword(); /* Delete forward word. */ extern int delbword(); /* Delete backward word. */ extern int killregion(); /* Kill region. */ extern int copyregion(); /* Copy region to kill buffer. */ extern int spawncli(); /* Run CLI in a subjob. */ extern int spawn(); /* Run a command in a subjob. */ extern int quickexit(); /* low keystroke style exit. */ extern int setmode(); /* set an editor mode */ extern int delmode(); /* delete a mode */ extern int gotoline(); /* go to a numbered line */ extern int namebuffer(); /* rename the current buffer */ extern int gotobop(); /* go to begining/paragraph */ extern int gotoeop(); /* go to end/paragraph */ extern int fillpara(); /* fill current paragraph */ extern int help(); /* get the help file here */ extern int deskey(); /* describe a key's binding */ extern int viewfile(); /* find a file in view mode */ extern int insfile(); /* insert a file */ extern int scrnextup(); /* scroll next window back */ extern int scrnextdw(); /* scroll next window down */ extern int bindtokey(); /* bind a function to a key */ extern int unbindkey(); /* unbind a key's function */ extern int namedcmd(); /* execute named command */ extern int desbind(); /* describe bindings */ extern int execcmd(); /* execute a command line */ extern int execbuf(); /* exec commands from a buffer */ extern int execfile(); /* exec commands from a file */ extern int nextbuffer(); /* switch to the next buffer */ extern int killpara(); /* kill the current paragraph */ extern int setgmode(); /* set a global mode */ extern int delgmode(); /* delete a global mode */ extern int insspace(); /* insert a space forword */ extern int forwhunt(); /* hunt forward for next match */ extern int backhunt(); /* hunt backwards for next match*/ #if V7 & BSD extern int bktoshell(); /* suspend emacs to parent shell*/ extern int rtfrmshell(); /* return from a suspended state*/ #endif /* Name to function binding table This table gives the names of all the bindable functions end their C function address. These are used for the bind-to-key function. */ NBIND names[] = { {"add-mode", setmode}, {"add-global-mode", setgmode}, {"backward-character", backchar}, {"begin-macro", ctlxlp}, {"begining-of-file", gotobob}, {"begining-of-line", gotobol}, {"bind-to-key", bindtokey}, {"buffer-position", showcpos}, {"case-region-lower", lowerregion}, {"case-region-upper", upperregion}, {"case-word-capitalize", capword}, {"case-word-lower", lowerword}, {"case-word-upper", upperword}, {"change-file-name", filename}, {"clear-and-redraw", refresh}, {"copy-region", copyregion}, {"delete-blank-lines", deblank}, {"delete-buffer", killbuffer}, {"delete-mode", delmode}, {"delete-global-mode", delgmode}, {"delete-next-character", forwdel}, {"delete-next-word", delfword}, {"delete-other-windows", onlywind}, {"delete-previous-character", backdel}, {"delete-previous-word", delbword}, {"describe-bindings", desbind}, {"describe-key", deskey}, {"end-macro", ctlxrp}, {"end-of-file", gotoeob}, {"end-of-line", gotoeol}, {"exchange-point-and-mark", swapmark}, {"execute-buffer", execbuf}, {"execute-command-line", execcmd}, {"execute-file", execfile}, {"execute-macro", ctlxe}, {"execute-named-command", namedcmd}, {"exit-emacs", quit}, {"fill-paragraph", fillpara}, {"find-file", filefind}, {"forward-character", forwchar}, {"goto-line", gotoline}, {"grow-window", enlargewind}, {"handle-tab", tab}, {"hunt-forward", forwhunt}, {"hunt-backward", backhunt}, {"help", help}, {"i-shell", spawncli}, {"insert-file", insfile}, {"insert-space", insspace}, {"kill-paragraph", killpara}, {"kill-region", killregion}, {"kill-to-end-of-line", killtext}, {"list-buffers", listbuffers}, {"move-window-down", mvdnwind}, {"move-window-up", mvupwind}, {"name-buffer", namebuffer}, {"newline", newline}, {"newline-and-indent", indent}, {"next-buffer", nextbuffer}, {"next-line", forwline}, {"next-page", forwpage}, {"next-paragraph", gotoeop}, {"next-window", nextwind}, {"next-word", forwword}, {"open-line", openline}, {"previous-line", backline}, {"previous-page", backpage}, {"previous-paragraph", gotobop}, {"previous-window", prevwind}, {"previous-word", backword}, {"query-replace-string", qreplace}, {"quick-exit", quickexit}, {"quote-character", quote}, {"read-file", fileread}, {"redraw-display", reposition}, {"replace-string", sreplace}, {"save-file", filesave}, {"scroll-next-up", scrnextup}, {"scroll-next-down", scrnextdw}, {"search-forward", forwsearch}, {"search-reverse", backsearch}, {"select-buffer", usebuffer}, {"set-fill-column", setfillcol}, {"set-mark", setmark}, {"shell-command", spawn}, {"shrink-window", shrinkwind}, {"split-current-window", splitwind}, #if V7 & BSD {"suspend-emacs", bktoshell}, #endif {"transpose-characters", twiddle}, {"unbind-key", unbindkey}, {"view-file", viewfile}, {"write-file", filewrite}, {"yank", yank}, {"", NULL} }; neuron-7.5/src/memacs/epath.h000077500000000000000000000014761323325274500162220ustar00rootroot00000000000000/* /local/src/master/nrn/src/memacs/epath.h,v 1.1.1.1 1994/10/12 17:21:23 hines Exp */ /* epath.h,v * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.1 89/07/08 15:37:48 mlh * Initial revision * */ /* PATH: This file contains certain info needed to locate the MicroEMACS files on a system dependant basis. */ /* possible names and paths of help files under different OSs */ char *pathname[] = { #if AMIGA ".emacsrc", "emacs.hlp", "", ":c/", ":t/" #endif #if MSDOS "emacs.rc", "emacs.hlp", "", "\\lib\\", "\\mail\\lib\\", "\\", "\\bin\\" #endif #if V7 ".emacsrc", "emacs.hlp", "/usr/local/lib/memacs36b1/", "" #endif #if VMS "emacs.rc", "emacs.hlp", "", "sys$sysdevice:[vmstools]" #endif }; #define NPNAMES (sizeof(pathname)/sizeof(char *)) neuron-7.5/src/memacs/estruct.h000077500000000000000000000323031323325274500166030ustar00rootroot00000000000000/* /local/src/master/nrn/src/memacs/estruct.h,v 1.4 1997/08/27 20:33:07 hines Exp */ /* estruct.h,v * Revision 1.4 1997/08/27 20:33:07 hines * memacs code now compiled into memacs.dll for mswindows in order to * allow nrndisk2.zip to fit on one diskette. * * Revision 1.3 1997/03/13 14:17:41 hines * Merge Macintosh changes. NEURON sources compile with Codewarrior 11. * No readline or microemacs for mac. * * Revision 1.2 1996/10/17 16:31:44 hines * trivial #define change for memacs for compiling under solaris2.5 cc * * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.7 1993/11/09 13:43:48 hines * port to djg dos extender for running under go32 * * Revision 1.6 1993/10/18 13:20:23 hines * some machines already define CTRL so we undef it first. * * Revision 1.5 92/10/24 11:25:08 hines * no such thing as #elif for some compilers * * Revision 1.4 92/08/12 08:15:09 hines * sejnowski changes to allow compiling on ncube using EXPRESS c libraries. * it allows compilation of neuron but doesn't actually work. * * Revision 1.3 92/01/20 13:49:21 hines * allow porting to ibmpc * * Revision 1.2 91/08/13 11:19:23 hines * BSD and SYSV are defined in the makefile * * Revision 1.1 89/07/08 15:37:52 mlh * Initial revision * */ /* ESTRUCT: Structure and preprocesser defined for MicroEMACS 3.6 written by Dave G. Conroy modified by Steve Wilhite, George Jones greatly modified by Daniel Lawrence */ #undef LATTICE /* don't use their definitions...use ours */ #undef MSDOS #undef CPM #define MLH 1 /* personal functionality desired by michael hines */ /* Machine/OS definitions */ #define AMIGA 0 /* AmigaDOS */ #define ST520 0 /* ST520, TOS */ #if defined(__MWERKS__) || defined(__TURBOC__) || __GO32__ #define MSDOS 1 /* MS-DOS */ #else #define V7 1 /* V7 UN*X or Coherent or BSD4.2*/ #endif #if !defined(BSD) #define BSD 0 /* also needed for BSD 4.2 */ #endif #if !defined(SYSV) #define SYSV 0 /* V7 and SYSV for System V */ #else #undef SYSV #undef BSD #define SYSV 1 #define BSD 0 #endif #define VMS 0 /* VAX/VMS */ #define CPM 0 /* CP/M-86 */ /* Compiler definitions */ #define MWC86 0 /* marc williams compiler */ #define LATTICE 0 /* either lattice compiler */ #define LAT2 0 /* Lattice 2.15 */ #define LAT3 0 /* Lattice 3.0 */ #define AZTEC 0 /* Aztec C 3.20e */ #define MSC 0 /* Microsoft C V3 */ /* Terminal Output definitions */ #if defined(__TURBOC__) || __GO32__ #define ANSI 0 /* ansi escape sequences */ #else #if defined(EXPRESS) #define ANSI 1 #define TERMCAP 0 #else #define TERMCAP 1 /* Use TERMCAP */ #endif #endif #define HP150 0 /* HP150 screen driver */ #define VMSVT 0 /* various VMS terminal entries */ #define VT52 0 /* VT52 terminal (Zenith). */ #define VT100 0 /* Handle VT100 style keypad. */ #define LK201 0 /* Handle LK201 style keypad. */ #define RAINBOW 0 /* Use Rainbow fast video. */ /* Configuration options */ #define CVMVAS 1 /* arguments to page forward/back in pages */ #define NFWORD 1 /* forward word jumps to begining of word */ #define CLRMSG 0 /* space clears the message line with no insert */ #define TYPEAH 0/*mlh*/ /* type ahead causes update to be skipped */ #define FILOCK 0 /* file locking under unix BSD 4.2 */ #define REVSTA 1 /* Status line appears in reverse video */ #define BENTHAK 1 /* Various Bennett preferences */ #define TRUETAB 1 /* Tabstops affect display, not insert spaces */ /* System dependant library redefinitions */ #if MSDOS & AZTEC #undef fputc #undef fgetc #define fputc aputc #define fgetc agetc #endif /* internal constants */ #define NBINDS 200 /* max # of bound keys */ #define NFILEN 1024 /* # of bytes, file name */ #define NBUFN 16 /* # of bytes, buffer name */ #if 0 #define NLINE 256 /* # of bytes, line */ #else #define NLINE 16384 /* # of bytes, line */ #endif #define NSTRING 256 /* # of bytes, string buffers */ #define NKBDM 256 /* # of strokes, keyboard macro */ #define NPAT 80 /* # of bytes, pattern */ #define HUGE 1000 /* Huge number */ #define NLOCKS 100 /* max # of file locks active */ #define AGRAVE 0x60 /* M- prefix, Grave (LK201) */ #define METACH 0x1B /* M- prefix, Control-[, ESC */ #define CTMECH 0x1C /* C-M- prefix, Control-\ */ #define EXITCH 0x1D /* Exit level, Control-] */ #define CTRLCH 0x1E /* C- prefix, Control-^ */ #define HELPCH 0x1F /* Help key, Control-_ */ #undef CTRL #define CTRL 0x0100 /* Control flag, or'ed in */ #define META 0x0200 /* Meta flag, or'ed in */ #define CTLX 0x0400 /* ^X flag, or'ed in */ #define SPEC 0x0800 /* special key (function keys) */ #define FALSE 0 /* False, no, bad, etc. */ #define TRUE 1 /* True, yes, good, etc. */ #define ABORT 2 /* Death, ^G, abort, etc. */ #define FIOSUC 0 /* File I/O, success. */ #define FIOFNF 1 /* File I/O, file not found. */ #define FIOEOF 2 /* File I/O, end of file. */ #define FIOERR 3 /* File I/O, error. */ #define FIOLNG 4 /*line longer than allowed len */ #define CFCPCN 0x0001 /* Last command was C-P, C-N */ #define CFKILL 0x0002 /* Last command was a kill */ #define BELL 0x07 /* a bell character */ #define TAB 0x09 /* a tab character */ /* * There is a window structure allocated for every active display window. The * windows are kept in a big list, in top to bottom screen order, with the * listhead at "wheadp". Each window contains its own values of dot and mark. * The flag field contains some bits that are set by commands to guide * redisplay; although this is a bit of a compromise in terms of decoupling, * the full blown redisplay is just too expensive to run for every input * character. */ typedef struct WINDOW { struct WINDOW *w_wndp; /* Next window */ struct BUFFER *w_bufp; /* Buffer displayed in window */ struct LINE *w_linep; /* Top line in the window */ struct LINE *w_dotp; /* Line containing "." */ struct LINE *w_markp; /* Line containing "mark" */ int w_doto; /* Byte offset for "." */ int w_marko; /* Byte offset for "mark" */ char w_toprow; /* Origin 0 top row of window */ char w_ntrows; /* # of rows of text in window */ char w_force; /* If NZ, forcing row. */ char w_flag; /* Flags. */ } WINDOW; #define WFFORCE 0x01 /* Window needs forced reframe */ #define WFMOVE 0x02 /* Movement from line to line */ #define WFEDIT 0x04 /* Editing within a line */ #define WFHARD 0x08 /* Better to a full display */ #define WFMODE 0x10 /* Update mode line. */ /* * Text is kept in buffers. A buffer header, described below, exists for every * buffer in the system. The buffers are kept in a big list, so that commands * that search for a buffer by name can find the buffer header. There is a * safe store for the dot and mark in the header, but this is only valid if * the buffer is not being displayed (that is, if "b_nwnd" is 0). The text for * the buffer is kept in a circularly linked list of lines, with a pointer to * the header line in "b_linep". * Buffers may be "Inactive" which means the files accosiated with them * have not been read in yet. These get read in at "use buffer" time. */ typedef struct BUFFER { struct BUFFER *b_bufp; /* Link to next BUFFER */ struct LINE *b_dotp; /* Link to "." LINE structure */ struct LINE *b_markp; /* The same as the above two, */ struct LINE *b_linep; /* Link to the header LINE */ int b_doto; /* Offset of "." in above LINE */ int b_marko; /* but for the "mark" */ char b_active; /* window activated flag */ char b_nwnd; /* Count of windows on buffer */ char b_flag; /* Flags */ char b_mode; /* editor mode of this buffer */ char b_fname[NFILEN]; /* File name */ char b_bname[NBUFN]; /* Buffer name */ } BUFFER; #define BFTEMP 0x01 /* Internal temporary buffer */ #define BFCHG 0x02 /* Changed since last write */ /* mode flags */ #define NUMMODES 6 /* # of defined modes */ #define MDWRAP 0x0001 /* word wrap */ #define MDCMOD 0x0002 /* C indentation and fence match*/ #define MDSPELL 0x0004 /* spell error parcing */ #define MDEXACT 0x0008 /* Exact matching for searches */ #define MDVIEW 0x0010 /* read-only buffer */ #define MDOVER 0x0020 /* overwrite mode */ /* * The starting position of a region, and the size of the region in * characters, is kept in a region structure. Used by the region commands. */ typedef struct { struct LINE *r_linep; /* Origin LINE address. */ int r_offset; /* Origin LINE offset. */ int r_size; /* Length in characters. */ } REGION; /* * All text is kept in circularly linked lists of "LINE" structures. These * begin at the header line (which is the blank line beyond the end of the * buffer). This line is pointed to by the "BUFFER". Each line contains a the * number of bytes in the line (the "used" size), the size of the text array, * and the text. The end of line is not stored as a byte; it's implied. Future * additions will include update hints, and a list of marks into the line. */ typedef struct LINE { struct LINE *l_fp; /* Link to the next line */ struct LINE *l_bp; /* Link to the previous line */ int l_size; /* Allocated size */ int l_used; /* Used size */ char l_text[1]; /* A bunch of characters. */ } LINE; #define lforw(lp) ((lp)->l_fp) #define lback(lp) ((lp)->l_bp) #define lgetc(lp, n) ((lp)->l_text[(n)]&0xFF) #define lputc(lp, n, c) ((lp)->l_text[(n)]=(c)) #define llength(lp) ((lp)->l_used) /* * The editor communicates with the display using a high level interface. A * "TERM" structure holds useful variables, and indirect pointers to routines * that do useful operations. The low level get and put routines are here too. * This lets a terminal, in addition to having non standard commands, have * funny get and put character code too. The calls might get changed to * "termp->t_field" style in the future, to make it possible to run more than * one terminal type. */ typedef struct { int t_nrow; /* Number of rows. */ int t_ncol; /* Number of columns. */ int t_margin; /* min margin for extended lines*/ int t_scrsiz; /* size of scroll region " */ int (*t_open)(); /* Open terminal at the start. */ int (*t_close)(); /* Close terminal at end. */ int (*t_getchar)(); /* Get character from keyboard. */ int (*t_putchar)(); /* Put character to display. */ int (*t_flush)(); /* Flush output buffers. */ int (*t_move)(); /* Move the cursor, origin 0. */ int (*t_eeol)(); /* Erase to end of line. */ int (*t_eeop)(); /* Erase to end of page. */ int (*t_beep)(); /* Beep. */ int (*t_rev)(); /* set reverse video state */ } TERM; /* structure for the table of initial key bindings */ typedef struct { int k_code; /* Key code */ int (*k_fp)(); /* Routine to handle it */ } KEYTAB; /* structure for the name binding table */ typedef struct { char *n_name; /* name of function key */ int (*n_func)(); /* function name is bound to */ } NBIND; neuron-7.5/src/memacs/file.c000077500000000000000000000421641323325274500160320ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/file.c,v 1.1.1.1 1994/10/12 17:21:24 hines Exp */ /* file.c,v * Revision 1.1.1.1 1994/10/12 17:21:24 hines * NEURON 3.0 distribution * * Revision 1.4 1993/11/04 15:54:28 hines * port to solaris2 (no more warnings) * * Revision 1.3 1989/07/10 10:25:32 mlh * LINT free * * Revision 1.2 89/07/09 12:18:45 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:22 mlh * Initial revision * */ /* * The routines in this file * handle the reading and writing of * disk files. All of details about the * reading and writing of the disk are * in "fileio.c". */ #include #include "estruct.h" #include "edef.h" /* * Read a file into the current * buffer. This is really easy; all you do it * find the name of the file, and call the standard * "read a file into the current buffer" code. * Bound to "C-X C-R". */ int fileread(f, n) int f, n; { register int s; char fname[NFILEN]; LINTUSE(f) LINTUSE(n) #if MLH /* Default on reply is to re-read buffer file name */ if ((s=mlreply("Read file: ", fname, NFILEN)) == ABORT) return (s); if (fname[0] == '\0') { if (curbp->b_fname[0] == '\0') { return (s); } Strcpy(fname, curbp->b_fname); } #else if ((s=mlreply("Read file: ", fname, NFILEN)) != TRUE) return (s); #endif /*MLH*/ return(readin(fname, TRUE)); } /* * Insert a file into the current * buffer. This is really easy; all you do it * find the name of the file, and call the standard * "insert a file into the current buffer" code. * Bound to "C-X C-I". */ int insfile(f, n) int f, n; { register int s; char fname[NFILEN]; LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if ((s=mlreply("Insert file: ", fname, NFILEN)) != TRUE) return(s); return(ifile(fname)); } /* * Select a file for editing. * Look around to see if you can find the * fine in another buffer; if you can find it * just switch to the buffer. If you cannot find * the file, create a new buffer, read in the * text, and switch to the new buffer. * Bound to C-X C-F. */ int filefind(f, n) int f, n; { char fname[NFILEN]; /* file user wishes to find */ register int s; /* status return */ LINTUSE(f) LINTUSE(n) if ((s=mlreply("Find file: ", fname, NFILEN)) != TRUE) return(s); return(getfile(fname, TRUE)); } int viewfile(f, n) /* visit a file in VIEW mode */ int f, n; { char fname[NFILEN]; /* file user wishes to find */ register int s; /* status return */ register WINDOW *wp; /* scan for windows that need updating */ LINTUSE(f) LINTUSE(n) if ((s=mlreply("View file: ", fname, NFILEN)) != TRUE) return (s); s = getfile(fname, FALSE); if (s) { /* if we succeed, put it in view mode */ curwp->w_bufp->b_mode |= MDVIEW; /* scan through and update mode lines of all windows */ wp = wheadp; while (wp != NULL) { wp->w_flag |= WFMODE; wp = wp->w_wndp; } } return(s); } int getfile(fname, lockfl) char fname[]; /* file name to find */ int lockfl; /* check the file for locks? */ { register BUFFER *bp; register LINE *lp; register int i; register int s; char bname[NBUFN]; /* buffer name to put file */ for (bp=bheadp; bp!=NULL; bp=bp->b_bufp) { if ((bp->b_flag&BFTEMP)==0 && strcmp(bp->b_fname, fname)==0) { IGNORE(swbuffer(bp)); lp = curwp->w_dotp; i = curwp->w_ntrows/2; while (i-- && lback(lp)!=curbp->b_linep) lp = lback(lp); curwp->w_linep = lp; curwp->w_flag |= WFMODE|WFHARD; mlwrite("[Old buffer]"); return (TRUE); } } makename(bname, fname); /* New buffer name. */ while ((bp=bfind(bname, FALSE, 0)) != NULL) { s = mlreply("Buffer name: ", bname, NBUFN); if (s == ABORT) /* ^G to just quit */ return (s); if (s == FALSE) { /* CR to clobber it */ makename(bname, fname); break; } } if (bp==NULL && (bp=bfind(bname, TRUE, 0))==NULL) { mlwrite("Cannot create buffer"); return (FALSE); } if (--curbp->b_nwnd == 0) { /* Undisplay. */ curbp->b_dotp = curwp->w_dotp; curbp->b_doto = curwp->w_doto; curbp->b_markp = curwp->w_markp; curbp->b_marko = curwp->w_marko; } curbp = bp; /* Switch to it. */ curwp->w_bufp = bp; curbp->b_nwnd++; return(readin(fname, lockfl)); /* Read it in. */ } /* * Read file "fname" into the current * buffer, blowing away any text found there. Called * by both the read and find commands. Return the final * status of the read. Also called by the mainline, * to read in a file specified on the command line as * an argument. If the filename ends in a ".c", CMODE is * set for the current buffer. */ int readin(fname, lockfl) char fname[]; /* name of file to read */ int lockfl; /* check for file locks? */ { register LINE *lp1; register LINE *lp2; register int i; register WINDOW *wp; register BUFFER *bp; register int s; register int nbytes; register int nline; register char *sptr; /* pointer into filename string */ int lflag; /* any lines longer than allowed? */ char line[NLINE]; LINTUSE(lockfl) #if FILOCK if (lockfl && lockchk(fname) == ABORT) return(ABORT); #endif bp = curbp; /* Cheap. */ if ((s=bclear(bp)) != TRUE) /* Might be old. */ return (s); bp->b_flag &= ~(BFTEMP|BFCHG); if ((int)strlen(fname) > 1) { /* check if a 'C' file */ sptr = fname + strlen(fname) - 2; if (*sptr == '.' && (*(sptr + 1) == 'c' || *(sptr + 1) == 'h')) bp->b_mode |= MDCMOD; else bp->b_mode |= MDWRAP; } Strcpy(bp->b_fname, fname); if ((s=ffropen(fname)) == FIOERR) /* Hard file open. */ goto out; if (s == FIOFNF) { /* File not found. */ mlwrite("[New file]"); goto out; } mlwrite("[Reading file]"); nline = 0; lflag = FALSE; while ((s=ffgetline(line, NLINE)) == FIOSUC || s == FIOLNG) { if (s == FIOLNG) lflag = TRUE; nbytes = strlen(line); if ((lp1=lalloc(nbytes)) == NULL) { s = FIOERR; /* Keep message on the */ break; /* display. */ } lp2 = lback(curbp->b_linep); lp2->l_fp = lp1; lp1->l_fp = curbp->b_linep; lp1->l_bp = lp2; curbp->b_linep->l_bp = lp1; for (i=0; iw_wndp) { if (wp->w_bufp == curbp) { wp->w_linep = lforw(curbp->b_linep); wp->w_dotp = lforw(curbp->b_linep); wp->w_doto = 0; wp->w_markp = NULL; wp->w_marko = 0; wp->w_flag |= WFMODE|WFHARD; } } if (s == FIOERR || s == FIOFNF) /* False if error. */ return(FALSE); return (TRUE); } /* * Take a file name, and from it * fabricate a buffer name. This routine knows * about the syntax of file names on the target system. * I suppose that this information could be put in * a better place than a line of code. */ int makename(bname, fname) char bname[]; char fname[]; { register char *cp1; register char *cp2; cp1 = &fname[0]; while (*cp1 != 0) ++cp1; #if AMIGA while (cp1!=&fname[0] && cp1[-1]!=':' && cp1[-1]!='/') --cp1; #endif #if VMS while (cp1!=&fname[0] && cp1[-1]!=':' && cp1[-1]!=']') --cp1; #endif #if CPM while (cp1!=&fname[0] && cp1[-1]!=':') --cp1; #endif #if MSDOS while (cp1!=&fname[0] && cp1[-1]!=':' && cp1[-1]!='\\'&&cp1[-1]!='/') --cp1; #endif #if V7 while (cp1!=&fname[0] && cp1[-1]!='/') --cp1; #endif cp2 = &bname[0]; while (cp2!=&bname[NBUFN-1] && *cp1!=0 && *cp1!=';') *cp2++ = *cp1++; *cp2 = 0; return TRUE; } /* * Ask for a file name, and write the * contents of the current buffer to that file. * Update the remembered file name and clear the * buffer changed flag. This handling of file names * is different from the earlier versions, and * is more compatable with Gosling EMACS than * with ITS EMACS. Bound to "C-X C-W". */ int filewrite(f, n) int f, n; { register WINDOW *wp; register int s; char fname[NFILEN]; LINTUSE(f) LINTUSE(n) #if MLH /* Default on reply is to write buffer file name */ if ((s=mlreply("Write file: ", fname, NFILEN)) == ABORT) return (s); if (fname[0] == '\0') { if (curbp->b_fname[0] == '\0') { return (s); } Strcpy(fname, curbp->b_fname); } #else if ((s=mlreply("Write file: ", fname, NFILEN)) != TRUE) return (s); #endif /*MLH*/ if ((s=writeout(fname)) == TRUE) { Strcpy(curbp->b_fname, fname); curbp->b_flag &= ~BFCHG; wp = wheadp; /* Update mode lines. */ while (wp != NULL) { if (wp->w_bufp == curbp) wp->w_flag |= WFMODE; wp = wp->w_wndp; } } return (s); } /* * Save the contents of the current * buffer in its associatd file. No nothing * if nothing has changed (this may be a bug, not a * feature). Error if there is no remembered file * name for the buffer. Bound to "C-X C-S". May * get called by "C-Z". */ int filesave(f, n) int f, n; { register WINDOW *wp; register int s; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if ((curbp->b_flag&BFCHG) == 0) /* Return, no changes. */ return (TRUE); if (curbp->b_fname[0] == 0) { /* Must have a name. */ #if MLH return filewrite(f, n); /* ask for one if it doesn't */ #else mlwrite("No file name"); return (FALSE); #endif /*MLH*/ } if ((s=writeout(curbp->b_fname)) == TRUE) { curbp->b_flag &= ~BFCHG; wp = wheadp; /* Update mode lines. */ while (wp != NULL) { if (wp->w_bufp == curbp) wp->w_flag |= WFMODE; wp = wp->w_wndp; } } return (s); } /* * This function performs the details of file * writing. Uses the file management routines in the * "fileio.c" package. The number of lines written is * displayed. Sadly, it looks inside a LINE; provide * a macro for this. Most of the grief is error * checking of some sort. */ int writeout(fn) char *fn; { register int s; register LINE *lp; register int nline; if ((s=ffwopen(fn)) != FIOSUC) /* Open writes message. */ return (FALSE); mlwrite("[Writing..]"); /* tell us were writing */ lp = lforw(curbp->b_linep); /* First line. */ nline = 0; /* Number of lines. */ while (lp != curbp->b_linep) { if ((s=ffputline(&lp->l_text[0], llength(lp))) != FIOSUC) break; ++nline; lp = lforw(lp); } if (s == FIOSUC) { /* No write error. */ IGNORE(s = ffclose()); if (s == FIOSUC) { /* No close error. */ if (nline == 1) mlwrite("[Wrote 1 line]"); else mlwrite("[Wrote %d lines]", nline); } } else /* Ignore close error */ {IGNORE(ffclose());} /* if a write error. */ if (s != FIOSUC) /* Some sort of error. */ return (FALSE); return (TRUE); } /* * The command allows the user * to modify the file name associated with * the current buffer. It is like the "f" command * in UNIX "ed". The operation is simple; just zap * the name in the BUFFER structure, and mark the windows * as needing an update. You can type a blank line at the * prompt if you wish. */ int filename(f, n) int f, n; { register WINDOW *wp; register int s; char fname[NFILEN]; LINTUSE(f) LINTUSE(n) if ((s=mlreply("Name: ", fname, NFILEN)) == ABORT) return (s); if (s == FALSE) Strcpy(curbp->b_fname, ""); else Strcpy(curbp->b_fname, fname); wp = wheadp; /* Update mode lines. */ while (wp != NULL) { if (wp->w_bufp == curbp) wp->w_flag |= WFMODE; wp = wp->w_wndp; } curbp->b_mode &= ~MDVIEW; /* no longer read only mode */ return (TRUE); } /* * Insert file "fname" into the current * buffer, Called by insert file command. Return the final * status of the read. */ int ifile(fname) char fname[]; { register LINE *lp0; register LINE *lp1; register LINE *lp2; register int i; register BUFFER *bp; register int s; register int nbytes; register int nline; int lflag; /* any lines longer than allowed? */ char line[NLINE]; bp = curbp; /* Cheap. */ bp->b_flag |= BFCHG; /* we have changed */ bp->b_flag &= ~BFTEMP; /* and are not temporary*/ if ((s=ffropen(fname)) == FIOERR) /* Hard file open. */ goto out; if (s == FIOFNF) { /* File not found. */ mlwrite("[No such file]"); return(FALSE); } mlwrite("[Inserting file]"); /* back up a line and save the mark here */ curwp->w_dotp = lback(curwp->w_dotp); curwp->w_doto = 0; curwp->w_markp = curwp->w_dotp; curwp->w_marko = 0; nline = 0; lflag = FALSE; while ((s=ffgetline(line, NLINE)) == FIOSUC || s == FIOLNG) { if (s == FIOLNG) lflag = TRUE; nbytes = strlen(line); if ((lp1=lalloc(nbytes)) == NULL) { s = FIOERR; /* Keep message on the */ break; /* display. */ } lp0 = curwp->w_dotp; /* line previous to insert */ lp2 = lp0->l_fp; /* line after insert */ /* re-link new line between lp0 and lp2 */ lp2->l_bp = lp1; lp0->l_fp = lp1; lp1->l_bp = lp0; lp1->l_fp = lp2; /* and advance and write out the current line */ curwp->w_dotp = lp1; for (i=0; iw_markp = lforw(curwp->w_markp); if (s == FIOEOF) { /* Don't zap message! */ if (nline == 1) mlwrite("[Inserted 1 line]"); else mlwrite("[Inserted %d lines]", nline); } if (lflag) mlwrite("[Inserted %d line(s), Long lines wrapped]",nline); out: /* advance to the next line and mark the window for changes */ curwp->w_dotp = lforw(curwp->w_dotp); curwp->w_flag |= WFHARD; /* copy window parameters back to the buffer structure */ curbp->b_dotp = curwp->w_dotp; curbp->b_doto = curwp->w_doto; curbp->b_markp = curwp->w_markp; curbp->b_marko = curwp->w_marko; if (s == FIOERR) /* False if error. */ return (FALSE); return (TRUE); } neuron-7.5/src/memacs/fileio.c000077500000000000000000000064661323325274500163670ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/fileio.c,v 1.1.1.1 1994/10/12 17:21:24 hines Exp */ /* fileio.c,v * Revision 1.1.1.1 1994/10/12 17:21:24 hines * NEURON 3.0 distribution * * Revision 1.2 89/07/10 10:25:37 mlh * LINT free * * Revision 1.1 89/07/08 15:36:25 mlh * Initial revision * */ /* * The routines in this file read and write ASCII files from the disk. All of * the knowledge about files are here. A better message writing scheme should * be used. */ #include #include "estruct.h" #include "edef.h" FILE *ffp; /* File pointer, all functions. */ /* * Open a file for reading. */ int ffropen(fn) char *fn; { if ((ffp=fopen(fn, "r")) == NULL) return (FIOFNF); return (FIOSUC); } /* * Open a file for writing. Return TRUE if all is well, and FALSE on error * (cannot create). */ int ffwopen(fn) char *fn; { #if VMS register int fd; if ((fd=creat(fn, 0666, "rfm=var", "rat=cr")) < 0 || (ffp=fdopen(fd, "w")) == NULL) { #else if ((ffp=fopen(fn, "w")) == NULL) { #endif mlwrite("Cannot open file for writing"); return (FIOERR); } return (FIOSUC); } /* * Close a file. Should look at the status in all systems. */ int ffclose() { #if MSDOS IGNORE(fputc(26, ffp)); /* add a ^Z at the end of the file */ #endif #if V7 | (MSDOS & (LATTICE | MSC)) if (fclose(ffp) != FALSE) { mlwrite("Error closing file"); return(FIOERR); } return(FIOSUC); #else fclose(ffp); return (FIOSUC); #endif } /* * Write a line to the already opened file. The "buf" points to the buffer, * and the "nbuf" is its length, less the free newline. Return the status. * Check only at the newline. */ int ffputline(buf, nbuf) char buf[]; int nbuf; { register int i; for (i = 0; i < nbuf; ++i) IGNORE(fputc(buf[i]&0xFF, ffp)); IGNORE(fputc('\n', ffp)); if (ferror(ffp)) { mlwrite("Write I/O error"); return (FIOERR); } return (FIOSUC); } /* * Read a line from a file, and store the bytes in the supplied buffer. The * "nbuf" is the length of the buffer. Complain about long lines and lines * at the end of the file that don't have a newline present. Check for I/O * errors too. Return status. */ int ffgetline(buf, nbuf) register char buf[]; int nbuf; { register int c; register int i; i = 0; while ((c = fgetc(ffp)) != EOF && c != '\n') { if (i >= nbuf-2) { buf[nbuf - 2] = c; /* store last char read */ buf[nbuf - 1] = 0; /* and terminate it */ mlwrite("File has long line"); return (FIOLNG); } buf[i++] = c; } if (c == EOF) { if (ferror(ffp)) { mlwrite("File read error"); return (FIOERR); } if (i != 0) { mlwrite("File has funny line at EOF"); return (FIOERR); } return (FIOEOF); } buf[i] = 0; return (FIOSUC); } neuron-7.5/src/memacs/ibm.c000077500000000000000000000131321323325274500156530ustar00rootroot00000000000000#include <../../nrnconf.h> /* Copyright 1987,1988- Michael Hines, Neurobiology Dept., DUMC, NC * * REVISION HISTORY: * * 11-88 This file was fixed so that the memacs editor would work with the editing keys. Made use of dos function call 7 which returns the extended ASCII codes for the editing keys. * */ /*mlh /7/20/87 ================================================== ibm.c ================================================== */ /* * The routines in this file provide support for PC compatible terminals * The serial I/O services are provided by routines in * "termio.c". It compiles into nothing if not an IBM device. */ #define termdef 1 #include #include "estruct.h" #include "edef.h" #if _Windows || MSDOS #if _Windows #undef IGNORE #include #include static HWND hwnd; #undef IGNORE #define IGNORE(arg) arg #else #include /* works with microsoft c */ #endif #if __GO32__ #ifndef _Windows #include #endif #else #ifndef _Windows #include #endif #endif #ifdef _Windows #define NROW 16 /* Screen size. */ #define NCOL 50 /* Edit if you want to. */ #else #define NROW 25 /* Screen size. */ #define NCOL 80 /* Edit if you want to. */ #endif #define MARGIN 8 #define SCRSIZ 64 #define BEL 0x07 /* BEL character. */ #define ESC 0x1B /* ESC character. */ extern int ttopen(); /* Forward references. */ static int ibmgetc(); static int ibmputc(); static int ibmflush(); #ifdef _Windows static int ibmclose(); #else extern int ttclose(); #endif static int ibmmove(); static int ibmeeol(); static int ibmeeop(); static int ibmbeep(); static int ibmrev(); static int ibmopen(); #ifdef MEMACS_DLL /* Most of memacs not part of neuron.exe but in a dll */ /* This is the interface to the dll. This file is part of neuron.exe */ #include "../windll/dll.h" extern char* neuron_home; typedef int (*Pfri)(); static Pfri main_, vtinit_, refresh_, ttputc_, ttflush_, quit_; BUFFER* emacs_curbp; WINDOW* emacs_curwp; static int load_memacs() { struct DLL* dll; char buf[256]; sprintf(buf, "%s\\lib\\memacs.dll", neuron_home); dll = dll_load(buf); if (dll) { main_ = (Pfri)dll_lookup(dll, "_emacs_main"); vtinit_ = (Pfri)dll_lookup(dll, "_emacs_vtinit"); refresh_ = (Pfri)dll_lookup(dll, "_emacs_refresh"); ttputc_ = (Pfri)dll_lookup(dll, "_emacs_ttputc"); ttflush_ = (Pfri)dll_lookup(dll, "_emacs_ttflush"); quit_ = (Pfri)dll_lookup(dll, "_emacs_quit"); return 1; }else{ return 0; } } int emacs_main(argc, argv) int argc; char** argv; { static int first = 1; if (first) { first = 0; if (!load_memacs()) hoc_execerror("Couldn't load $NEURONHOME/lib/memacs.dll", (char*)0); } if (main_) { (*main_)(argc, argv); } return 0; } int emacs_vtinit() { if (vtinit_) { (*vtinit_)(); } return 0; } int emacs_refresh(f, n) int f, n; { if (refresh_) { (*refresh_)(f, n); } return 0; } int emacs_ttputc(c) int c; { if (ttputc_) { (*ttputc_)(c); } return 0; } int emacs_ttflush() { if (ttflush_) { (*ttflush_)(); } return 0; } int emacs_quit(f, n) int f, n; { if (quit_) { (*quit_)(); } return 0; } #endif /* * Standard terminal interface dispatch table. Most of the fields point into * "termio" code. */ TERM term = { NROW-1, NCOL, MARGIN, SCRSIZ, ibmopen, #ifdef _Windows ibmclose, #else ttclose, #endif ibmgetc, ibmputc, ibmflush, ibmmove, ibmeeol, ibmeeop, ibmbeep, ibmrev }; static int ibmmove(row, col) { #ifndef _Windows union REGS regs; regs.h.ah = 0x02; regs.h.bh = 0; regs.h.dh = row; regs.h.dl = col; int86(0x10, ®s, ®s); #else em_goto(hwnd, row, col); #endif return 0; } static ibmeeol() { #ifdef _Windows em_clr_eol(hwnd); #else union REGS regs; regs.h.ah = 0x03; regs.h.bh = 0; int86(0x10, ®s, ®s); regs.h.ah = 6; regs.h.al = 0; regs.h.bh = 7; regs.h.ch = regs.h.dh; regs.h.cl = regs.h.dl; regs.h.dl = NCOL - 1; int86(0x10, ®s, ®s); #endif } #ifdef _Windows int clreol() {printf("clreol\n"); return 0;} #endif static int ibmeeop() { #ifdef _Windows em_clear(hwnd); #else union REGS regs; regs.h.ah = 6; regs.h.al = 0; regs.h.bh = 7; regs.h.ch = 0; regs.h.cl = 0; regs.h.dh = NROW - 1; regs.h.dl = NCOL - 1; int86(0x10, ®s, ®s); ibmmove(0, 0); #endif return 0; } static int ibmgetc() { #ifdef _Windows return getch(); #else union REGS regs; regs.h.ah = 7; intdos(®s,®s); return (int)regs.h.al; #endif } #ifdef _Windows int getch() { return fgetchar(); return 0;} #endif static int ibmputc(c) { #if 1 #ifdef _Windows em_putchar(hwnd, c); #else cprintf("%c",c); #endif #else union REGS regs; regs.h.ah = 14; regs.h.bl = 7; regs.h.al = c; int86(0x10, ®s, ®s); #endif return 0; } static ibmflush() { } static int ttputc(int a) { ibmputc(a); return 0; } static int ibmbeep() { ttputc(BEL); ibmflush(); return 0; } static int ibmparm(n) register int n; { register int q; q = n/10; if (q != 0) ibmparm(q); ttputc((n%10) + '0'); return 0; } #endif int ibmopen() { #ifndef _Windows textmode(3); textcolor(2); #endif ttopen(); return 0; } #ifdef _Windows void destroy_func(HWND hwnd) { winio_onclose(hwnd, 0); quit(0,0); winio_onclose(hwnd, destroy_func); } int ttopen() { int row, col; hwnd = winio_current(); winio_setecho(hwnd, FALSE); em_open(hwnd, destroy_func); em_size(hwnd, &row, &col); term.t_nrow = row; term.t_ncol = col; term.t_nrow; return 0; } int ibmclose() { em_close(hwnd, destroy_func); return 0; } #endif static int ibmrev(state) /* change reverse video state */ int state; /* TRUE = reverse, FALSE = normal */ { /*ANSI ttputc(ESC); ttputc('['); ttputc(state ? '7': '0'); ttputc('m'); */ return 0; } neuron-7.5/src/memacs/intfunc.h000066400000000000000000000121501323325274500165530ustar00rootroot00000000000000extern int emacs_addline(); extern int emacs_adjustmode(); extern int emacs_amg_flush(); extern int emacs_anycb(); extern int emacs_backchar(); extern int emacs_backdel(); extern int emacs_backhunt(); extern int emacs_backline(); extern int emacs_backpage(); extern int emacs_backsearch(); extern int emacs_backword(); extern int emacs_bclear(); extern int emacs_bindtokey(); extern int emacs_bktoshell(); extern int emacs_capword(); extern int emacs_cinsert(); extern int emacs_clreol(); extern int emacs_cmdstr(); extern int emacs_copyregion(); extern int emacs_ctlxe(); extern int emacs_ctlxlp(); extern int emacs_ctlxrp(); extern int emacs_ctrlg(); extern int emacs_deblank(); extern int emacs_delbword(); extern int emacs_delfword(); extern int emacs_delgmode(); extern int emacs_delmode(); extern int emacs_desbind(); extern int emacs_deskey(); extern int emacs_dobuf(); extern int emacs_docmd(); extern int emacs_dofile(); extern int emacs_edinit(); extern int emacs_bsearch(); /*extern int emacs_exit();*/ extern int emacs_itoa(); extern int emacs_enlargewind(); extern int emacs_eq(); extern int emacs_execbuf(); extern int emacs_execcmd(); extern int emacs_execfile(); extern int emacs_execute(); extern int emacs_expandp(); extern int emacs_ffclose(); extern int emacs_ffgetline(); extern int emacs_ffputline(); extern int emacs_ffropen(); extern int emacs_ffwopen(); extern int emacs_filefind(); extern int emacs_filename(); extern int emacs_fileread(); extern int emacs_filesave(); extern int emacs_filewrite(); extern int emacs_fillpara(); extern int emacs_forscan(); extern int emacs_forwchar(); extern int emacs_forwdel(); extern int emacs_forwhunt(); extern int emacs_forwline(); extern int emacs_forwpage(); extern int emacs_forwsearch(); extern int emacs_forwword(); extern int emacs_getccol(); extern int emacs_getch(); extern int emacs_getckey(); extern int emacs_getctl(); extern int emacs_getfile(); extern int emacs_getgoal(); extern int emacs_getkey(); extern int emacs_getregion(); extern int emacs_gotobob(); extern int emacs_gotobol(); extern int emacs_gotobop(); extern int emacs_gotoeob(); extern int emacs_gotoeol(); extern int emacs_gotoeop(); extern int emacs_gotoline(); extern int emacs_hello(); extern int emacs_ifile(); extern int emacs_indent(); extern int emacs_insbrace(); extern int emacs_insfile(); extern int emacs_inspound(); extern int emacs_insspace(); extern int emacs_inword(); extern int emacs_kbdtext(); extern int emacs_kdelete(); extern int emacs_killbuffer(); extern int emacs_killpara(); extern int emacs_killregion(); extern int emacs_killtext(); extern int emacs_kinsert(); extern int emacs_kremove(); extern int emacs_lchange(); extern int emacs_lckerror(); extern int emacs_lckhello(); extern int emacs_ldelete(); extern int emacs_ldelnewline(); extern int emacs_lfree(); extern int emacs_linsert(); extern int emacs_listbuffers(); extern int emacs_lnewline(); extern int emacs_lock(); extern int emacs_lockchk(); extern int emacs_lockrel(); extern int emacs_lowerregion(); extern int emacs_lowerword(); extern int emacs_makelist(); extern int emacs_makename(); extern int emacs_mlerase(); extern int emacs_mlputi(); extern int emacs_mlputli(); extern int emacs_mlputs(); extern int emacs_mlreply(); extern int emacs_mlreplyt(); extern int emacs_mlwrite(); extern int emacs_mlyesno(); extern int emacs_modeline(); extern int emacs_movecursor(); extern int emacs_mvdnwind(); extern int emacs_mvupwind(); extern int emacs_namebuffer(); extern int emacs_namedcmd(); extern int emacs_newline(); extern int emacs_nextbuffer(); extern int emacs_nextwind(); extern int emacs_nxtarg(); extern int emacs_onlywind(); extern int emacs_openline(); extern int emacs_prevwind(); extern int emacs_putline(); extern int emacs_qreplace(); extern int emacs_quickexit(); extern int emacs_quit(); extern int emacs_quote(); extern int emacs_rdonly(); extern int emacs_readin(); extern int emacs_readpattern(); extern int emacs_refresh(); extern int emacs_replaces(); extern int emacs_reposition(); extern int emacs_rtfrmshell(); extern int emacs_scrnextdw(); extern int emacs_scrnextup(); extern int emacs_setfillcol(); extern int emacs_setgmode(); extern int emacs_setmark(); extern int emacs_setmode(); extern int emacs_showcpos(); extern int emacs_shrinkwind(); extern int emacs_spawn(); extern int emacs_spawncli(); extern int emacs_splitwind(); extern int emacs_sreplace(); extern int emacs_startup(); extern int emacs_swapmark(); extern int emacs_swbuffer(); extern int emacs_sys(); extern int emacs_tab(); extern int emacs_ttclose(); extern int emacs_ttopen(); extern int emacs_twiddle(); extern int emacs_typahead(); extern int emacs_unbindkey(); extern int emacs_unlock(); extern int emacs_update(); extern int emacs_updateline(); extern int emacs_updext(); extern int emacs_upmode(); extern int emacs_upperregion(); extern int emacs_upperword(); extern int emacs_usebuffer(); extern int emacs_viewfile(); extern int emacs_vteeol(); extern int emacs_vtinit(); extern int emacs_vtmove(); extern int emacs_vtputc(); extern int emacs_vtpute(); extern int emacs_vttidy(); extern int emacs_wrapword(); extern int emacs_writeout(); extern int emacs_yank(); extern int emacs_zotbuf(); neuron-7.5/src/memacs/line.c000077500000000000000000000461651323325274500160470ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/line.c,v 1.1.1.1 1994/10/12 17:21:24 hines Exp */ /* line.c,v * Revision 1.1.1.1 1994/10/12 17:21:24 hines * NEURON 3.0 distribution * * Revision 1.4 93/03/15 16:20:31 hines * declaration of realloc comes from malloc.h * * Revision 1.3 91/08/22 12:33:46 hines * works with turboc * * Revision 1.2 89/07/10 10:25:40 mlh * LINT free * * Revision 1.1 89/07/08 15:36:32 mlh * Initial revision * */ /* * The functions in this file are a general set of line management utilities. * They are the only routines that touch the text. They also touch the buffer * and window structures, to make sure that the necessary updating gets done. * There are routines in this file that handle the kill buffer too. It isn't * here for any good reason. * * Note that this code only updates the dot and mark values in the window list. * Since all the code acts on the current window, the buffer that we are * editing must be being displayed, which means that "b_nwnd" is non zero, * which means that the dot and mark values in the buffer headers are nonsense. */ #include #include "estruct.h" #include "edef.h" #define NBLOCK 16 /* Line block chunk size */ #define KBLOCK 1024 /* Kill buffer block size */ char *kbufp = NULL; /* Kill buffer data */ unsigned kused = 0; /* # of bytes used in KB */ unsigned ksize = 0; /* # of bytes allocated in KB */ /* * This routine allocates a block of memory large enough to hold a LINE * containing "used" characters. The block is always rounded up a bit. Return * a pointer to the new block, or NULL if there isn't any memory left. Print a * message in the message line if no space. */ LINE *lalloc(used) register int used; { register LINE *lp; register int size; size = (used+NBLOCK-1) & ~(NBLOCK-1); if (size == 0) /* Assume that an empty */ size = NBLOCK; /* line is for type-in. */ if ((lp = (LINE *) malloc((unsigned)(sizeof(LINE)+size))) == NULL) { mlwrite("Cannot allocate %d bytes", size); return (NULL); } lp->l_size = size; lp->l_used = used; return (lp); } /* * Delete line "lp". Fix all of the links that might point at it (they are * moved to offset 0 of the next line. Unlink the line from whatever buffer it * might be in. Release the memory. The buffers are updated too; the magic * conditions described in the above comments don't hold here. */ int lfree(lp) register LINE *lp; { register BUFFER *bp; register WINDOW *wp; wp = wheadp; while (wp != NULL) { if (wp->w_linep == lp) wp->w_linep = lp->l_fp; if (wp->w_dotp == lp) { wp->w_dotp = lp->l_fp; wp->w_doto = 0; } if (wp->w_markp == lp) { wp->w_markp = lp->l_fp; wp->w_marko = 0; } wp = wp->w_wndp; } bp = bheadp; while (bp != NULL) { if (bp->b_nwnd == 0) { if (bp->b_dotp == lp) { bp->b_dotp = lp->l_fp; bp->b_doto = 0; } if (bp->b_markp == lp) { bp->b_markp = lp->l_fp; bp->b_marko = 0; } } bp = bp->b_bufp; } lp->l_bp->l_fp = lp->l_fp; lp->l_fp->l_bp = lp->l_bp; free((char *) lp); return TRUE; } /* * This routine gets called when a character is changed in place in the current * buffer. It updates all of the required flags in the buffer and window * system. The flag used is passed as an argument; if the buffer is being * displayed in more than 1 window we change EDIT t HARD. Set MODE if the * mode line needs to be updated (the "*" has to be set). */ int lchange(flag) register int flag; { register WINDOW *wp; if (curbp->b_nwnd != 1) /* Ensure hard. */ flag = WFHARD; if ((curbp->b_flag&BFCHG) == 0) { /* First change, so */ flag |= WFMODE; /* update mode lines. */ curbp->b_flag |= BFCHG; } wp = wheadp; while (wp != NULL) { if (wp->w_bufp == curbp) wp->w_flag |= flag; wp = wp->w_wndp; } return TRUE; } int insspace(f, n) /* insert spaces forward into text */ int f, n; /* default flag and numeric argument */ { IGNORE(linsert(n, ' ')); IGNORE(backchar(f, n)); return TRUE; } /* * Insert "n" copies of the character "c" at the current location of dot. In * the easy case all that happens is the text is stored in the line. In the * hard case, the line has to be reallocated. When the window list is updated, * take special care; I screwed it up once. You always update dot in the * current window. You update mark, and a dot in another window, if it is * greater than the place where you did the insert. Return TRUE if all is * well, and FALSE on errors. */ int linsert(n, c) int n, c; { register char *cp1; register char *cp2; register LINE *lp1; register LINE *lp2; register LINE *lp3; register int doto; register int i; register WINDOW *wp; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ lchange(WFEDIT); lp1 = curwp->w_dotp; /* Current line */ if (lp1 == curbp->b_linep) { /* At the end: special */ if (curwp->w_doto != 0) { mlwrite("bug: linsert"); return (FALSE); } if ((lp2=lalloc(n)) == NULL) /* Allocate new line */ return (FALSE); lp3 = lp1->l_bp; /* Previous line */ lp3->l_fp = lp2; /* Link in */ lp2->l_fp = lp1; lp1->l_bp = lp2; lp2->l_bp = lp3; for (i=0; il_text[i] = c; curwp->w_dotp = lp2; curwp->w_doto = n; return (TRUE); } doto = curwp->w_doto; /* Save for later. */ if (lp1->l_used+n > lp1->l_size) { /* Hard: reallocate */ if ((lp2=lalloc(lp1->l_used+n)) == NULL) return (FALSE); cp1 = &lp1->l_text[0]; cp2 = &lp2->l_text[0]; while (cp1 != &lp1->l_text[doto]) *cp2++ = *cp1++; cp2 += n; while (cp1 != &lp1->l_text[lp1->l_used]) *cp2++ = *cp1++; lp1->l_bp->l_fp = lp2; lp2->l_fp = lp1->l_fp; lp1->l_fp->l_bp = lp2; lp2->l_bp = lp1->l_bp; free((char *) lp1); } else { /* Easy: in place */ lp2 = lp1; /* Pretend new line */ lp2->l_used += n; cp2 = &lp1->l_text[lp1->l_used]; cp1 = cp2-n; while (cp1 != &lp1->l_text[doto]) *--cp2 = *--cp1; } for (i=0; il_text[doto+i] = c; wp = wheadp; /* Update windows */ while (wp != NULL) { if (wp->w_linep == lp1) wp->w_linep = lp2; if (wp->w_dotp == lp1) { wp->w_dotp = lp2; if (wp==curwp || wp->w_doto>doto) wp->w_doto += n; } if (wp->w_markp == lp1) { wp->w_markp = lp2; if (wp->w_marko > doto) wp->w_marko += n; } wp = wp->w_wndp; } return (TRUE); } /* * Insert a newline into the buffer at the current location of dot in the * current window. The funny ass-backwards way it does things is not a botch; * it just makes the last line in the file not a special case. Return TRUE if * everything works out and FALSE on error (memory allocation failure). The * update of dot and mark is a bit easier then in the above case, because the * split forces more updating. */ int lnewline() { register char *cp1; register char *cp2; register LINE *lp1; register LINE *lp2; register int doto; register WINDOW *wp; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ lchange(WFHARD); lp1 = curwp->w_dotp; /* Get the address and */ doto = curwp->w_doto; /* offset of "." */ if ((lp2=lalloc(doto)) == NULL) /* New first half line */ return (FALSE); cp1 = &lp1->l_text[0]; /* Shuffle text around */ cp2 = &lp2->l_text[0]; while (cp1 != &lp1->l_text[doto]) *cp2++ = *cp1++; cp2 = &lp1->l_text[0]; while (cp1 != &lp1->l_text[lp1->l_used]) *cp2++ = *cp1++; lp1->l_used -= doto; lp2->l_bp = lp1->l_bp; lp1->l_bp = lp2; lp2->l_bp->l_fp = lp2; lp2->l_fp = lp1; wp = wheadp; /* Windows */ while (wp != NULL) { if (wp->w_linep == lp1) wp->w_linep = lp2; if (wp->w_dotp == lp1) { if (wp->w_doto < doto) wp->w_dotp = lp2; else wp->w_doto -= doto; } if (wp->w_markp == lp1) { if (wp->w_marko < doto) wp->w_markp = lp2; else wp->w_marko -= doto; } wp = wp->w_wndp; } return (TRUE); } /* * This function deletes "n" bytes, starting at dot. It understands how do deal * with end of lines, etc. It returns TRUE if all of the characters were * deleted, and FALSE if they were not (because dot ran into the end of the * buffer. The "kflag" is TRUE if the text should be put in the kill buffer. */ int ldelete(n, kflag) int n, kflag; { register char *cp1; register char *cp2; register LINE *dotp; register int doto; register int chunk; register WINDOW *wp; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ while (n != 0) { dotp = curwp->w_dotp; doto = curwp->w_doto; if (dotp == curbp->b_linep) /* Hit end of buffer. */ return (FALSE); chunk = dotp->l_used-doto; /* Size of chunk. */ if (chunk > n) chunk = n; if (chunk == 0) { /* End of line, merge. */ lchange(WFHARD); if (ldelnewline() == FALSE || (kflag!=FALSE && kinsert('\n')==FALSE)) return (FALSE); --n; continue; } lchange(WFEDIT); cp1 = &dotp->l_text[doto]; /* Scrunch text. */ cp2 = cp1 + chunk; if (kflag != FALSE) { /* Kill? */ while (cp1 != cp2) { if (kinsert(*cp1) == FALSE) return (FALSE); ++cp1; } cp1 = &dotp->l_text[doto]; } while (cp2 != &dotp->l_text[dotp->l_used]) *cp1++ = *cp2++; dotp->l_used -= chunk; wp = wheadp; /* Fix windows */ while (wp != NULL) { if (wp->w_dotp==dotp && wp->w_doto>=doto) { wp->w_doto -= chunk; if (wp->w_doto < doto) wp->w_doto = doto; } if (wp->w_markp==dotp && wp->w_marko>=doto) { wp->w_marko -= chunk; if (wp->w_marko < doto) wp->w_marko = doto; } wp = wp->w_wndp; } n -= chunk; } return (TRUE); } /* * Delete a newline. Join the current line with the next line. If the next line * is the magic header line always return TRUE; merging the last line with the * header line can be thought of as always being a successful operation, even * if nothing is done, and this makes the kill buffer work "right". Easy cases * can be done by shuffling data around. Hard cases require that lines be moved * about in memory. Return FALSE on error and TRUE if all looks ok. Called by * "ldelete" only. */ int ldelnewline() { register char *cp1; register char *cp2; register LINE *lp1; register LINE *lp2; register LINE *lp3; register WINDOW *wp; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ lp1 = curwp->w_dotp; lp2 = lp1->l_fp; if (lp2 == curbp->b_linep) { /* At the buffer end. */ if (lp1->l_used == 0) /* Blank line. */ lfree(lp1); return (TRUE); } if (lp2->l_used <= lp1->l_size-lp1->l_used) { cp1 = &lp1->l_text[lp1->l_used]; cp2 = &lp2->l_text[0]; while (cp2 != &lp2->l_text[lp2->l_used]) *cp1++ = *cp2++; wp = wheadp; while (wp != NULL) { if (wp->w_linep == lp2) wp->w_linep = lp1; if (wp->w_dotp == lp2) { wp->w_dotp = lp1; wp->w_doto += lp1->l_used; } if (wp->w_markp == lp2) { wp->w_markp = lp1; wp->w_marko += lp1->l_used; } wp = wp->w_wndp; } lp1->l_used += lp2->l_used; lp1->l_fp = lp2->l_fp; lp2->l_fp->l_bp = lp1; free((char *) lp2); return (TRUE); } if ((lp3=lalloc(lp1->l_used+lp2->l_used)) == NULL) return (FALSE); cp1 = &lp1->l_text[0]; cp2 = &lp3->l_text[0]; while (cp1 != &lp1->l_text[lp1->l_used]) *cp2++ = *cp1++; cp1 = &lp2->l_text[0]; while (cp1 != &lp2->l_text[lp2->l_used]) *cp2++ = *cp1++; lp1->l_bp->l_fp = lp3; lp3->l_fp = lp2->l_fp; lp2->l_fp->l_bp = lp3; lp3->l_bp = lp1->l_bp; wp = wheadp; while (wp != NULL) { if (wp->w_linep==lp1 || wp->w_linep==lp2) wp->w_linep = lp3; if (wp->w_dotp == lp1) wp->w_dotp = lp3; else if (wp->w_dotp == lp2) { wp->w_dotp = lp3; wp->w_doto += lp1->l_used; } if (wp->w_markp == lp1) wp->w_markp = lp3; else if (wp->w_markp == lp2) { wp->w_markp = lp3; wp->w_marko += lp1->l_used; } wp = wp->w_wndp; } free((char *) lp1); free((char *) lp2); return (TRUE); } /* * Delete all of the text saved in the kill buffer. Called by commands when a * new kill context is being created. The kill buffer array is released, just * in case the buffer has grown to immense size. No errors. */ int kdelete() { if (kbufp != NULL) { free((char *) kbufp); kbufp = NULL; kused = 0; ksize = 0; } return TRUE; } /* * Insert a character to the kill buffer, enlarging the buffer if there isn't * any room. Always grow the buffer in chunks, on the assumption that if you * put something in the kill buffer you are going to put more stuff there too * later. Return TRUE if all is well, and FALSE on errors. */ int kinsert(c) int c; { register char *nbufp; if (kused == ksize) { if (ksize == 0) /* first time through? */ nbufp = (char *)malloc(KBLOCK); /* alloc the first block */ else /* or re allocate a bigger block */ nbufp = (char *)realloc(kbufp, ksize+KBLOCK); if (nbufp == NULL) /* abort if it fails */ return(FALSE); kbufp = nbufp; /* point our global at it */ ksize += KBLOCK; /* and adjust the size */ } kbufp[kused++] = c; return (TRUE); } /* * This function gets characters from the kill buffer. If the character index * "n" is off the end, it returns "-1". This lets the caller just scan along * until it gets a "-1" back. */ int kremove(n) int n; { if (n >= kused) return (-1); else return (kbufp[n] & 0xFF); } #if LATTICE /* we need to have the following functions to manage memory that don't exist under Lattice */ char *realloc(ptr, size) /* re-allocate a memory chunk to a different size, copying what can by copied */ char *ptr; /* pointer to the original block */ unsigned size; /* # of bytes needed in new block */ { char *newptr; /* pointer to new block */ unsigned csize; /* size of area to copy from old buffer to new */ newptr = (char *)malloc(size); /* get the new block */ if (newptr == NULL) /* if malloc fails....*/ return(NULL); csize = ksize; /******THIS IS A CHEAT SINCE WE CAN NOT GET AT THE SIZE OF THE MALLOCED BLOCK!! DO NOT USE THIS FUNCTION GENERICALLY!!!*/ if (csize > size) /* we need to copy some stuff from */ csize = size; /* the old buffer to the new */ movmem(ptr, newptr, csize); /* copy the availible bytes */ free(ptr); /* dump the old buffer */ return(newptr); /* and return the new */ } #endif neuron-7.5/src/memacs/lock.c000077500000000000000000000075641323325274500160500ustar00rootroot00000000000000#include <../../nrnconf.h> /*LINTLIBRARY*/ /* /local/src/master/nrn/src/memacs/lock.c,v 1.1.1.1 1994/10/12 17:21:24 hines Exp */ /* lock.c,v * Revision 1.1.1.1 1994/10/12 17:21:24 hines * NEURON 3.0 distribution * * Revision 1.2 89/07/10 10:25:45 mlh * LINT free * * Revision 1.1 89/07/08 15:36:38 mlh * Initial revision * */ /* LOCK: File locking command routines for MicroEMACS written by Daniel Lawrence */ #include #include "estruct.h" #include "edef.h" #if FILOCK #if V7 & BSD #include extern int sys_nerr; /* number of system error messages defined */ extern char *sys_errlist[]; /* list of message texts */ extern int errno; /* current error */ char *lname[NLOCKS]; /* names of all locked files */ int numlocks; /* # of current locks active */ /* lockchk: check a file for locking and add it to the list */ int lockchk(fname) char *fname; /* file to check for a lock */ { register int i; /* loop indexes */ register int status; /* return status */ char *undolock(); /* check to see if that file is already locked here */ if (numlocks > 0) for (i=0; i < numlocks; ++i) if (strcmp(fname, lname[i]) == 0) return(TRUE); /* if we have a full locking table, bitch and leave */ if (numlocks == NLOCKS) { mlwrite("LOCK ERROR: Lock table full"); return(ABORT); } /* next, try to lock it */ status = lock(fname); if (status == ABORT) /* file is locked, no override */ return(ABORT); if (status == FALSE) /* locked, overriden, dont add to table */ return(TRUE); /* we have now locked it, add it to our table */ lname[++numlocks - 1] = (char *)malloc(strlen(fname) + 1); if (lname[numlocks - 1] == NULL) { /* malloc failure */ undolock(fname); /* free the lock */ mlwrite("Cannot lock, out of memory"); --numlocks; return(ABORT); } /* everthing is cool, add it to the table */ Strcpy(lname[numlocks-1], fname); return(TRUE); } /* lockrel: release all the file locks so others may edit */ int lockrel() { register int i; /* loop index */ register int status; /* status of locks */ register int s; /* status of one unlock */ status = TRUE; if (numlocks > 0) for (i=0; i < numlocks; ++i) { if ((s = unlock(lname[i])) != TRUE) status = s; free(lname[i]); } numlocks = 0; return(status); } /* lock: Check and lock a file from access by others returns TRUE = files was not locked and now is FALSE = file was locked and overridden ABORT = file was locked, abort command */ int lock(fname) char *fname; /* file name to lock */ { register char *locker; /* lock error message */ register int status; /* return status */ char msg[NSTRING]; /* message string */ char *dolock(); /* attempt to lock the file */ locker = dolock(fname); if (locker == NULL) /* we win */ return(TRUE); /* file failed...abort */ if (strncmp(locker, "LOCK", 4) == 0) { lckerror(locker); return(ABORT); } /* someone else has it....override? */ Strcpy(msg, "File in use by "); Strcat(msg, locker); Strcat(msg, ", overide?"); status = mlyesno(msg); /* ask them */ if (status == TRUE) return(FALSE); else return(ABORT); } /* unlock: Unlock a file this only warns the user if it fails */ int unlock(fname) char *fname; /* file to unlock */ { register char *locker; /* undolock return string */ char *undolock(); /* unclock and return */ locker = undolock(fname); if (locker == NULL) return(TRUE); /* report the error and come back */ lckerror(locker); return(FALSE); } int lckerror(errstr) /* report a lock error */ char *errstr; /* lock error string to print out */ { char obuf[NSTRING]; /* output buffer for error message */ Strcpy(obuf, errstr); Strcat(obuf, " - "); if (errno < sys_nerr) Strcat(obuf, sys_errlist[errno]); else Strcat(obuf, "[can not get system error message]"); mlwrite(obuf); } #endif #else int lckhello() /* dummy function */ { return TRUE; } #endif neuron-7.5/src/memacs/main.c000077500000000000000000000011371323325274500160320ustar00rootroot00000000000000#include <../../nrnconf.h> /*mlh 7/20/87 dummy main routine to allow emacs to be embedded *in larger programs. This is used for stand alone emacs. *See main1.c for the real start */ /* #if defined(_Windows) && !defined(__MWERKS__) #define main winio_main #endif */ #include extern int emacs_main(); int main(argc, argv) int argc; char **argv; { emacs_main(argc, argv); return 0; } /* #ifdef _Windows void set_intset(){} #endif */ #if defined(__MWERKS__) void set_intset(){} void hoc_quit(){winio_closeall();} #endif int emacs_exit(status) int status; { exit(status); return 0; } neuron-7.5/src/memacs/main1.c000077500000000000000000000622741323325274500161240ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/main1.c,v 1.2 1995/04/03 13:56:47 hines Exp */ /* main1.c,v * Revision 1.2 1995/04/03 13:56:47 hines * Port to MSWindows * * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.5 92/08/12 08:16:40 hines * sejnowski changes to allow compiling on ncube using EXPRESS c libraries. * it allows compilation of neuron but doesn't actually work. * * Revision 1.4 91/08/22 12:33:48 hines * works with turboc * * Revision 1.3 89/07/10 10:25:49 mlh * LINT free * * Revision 1.2 89/07/09 12:18:50 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:48 mlh * Initial revision * */ /* * This program is in public domain; written by Dave G. Conroy. * This file contains the main driving routine, and some keyboard processing * code, for the MicroEMACS screen editor. * * REVISION HISTORY: * * 1.0 Steve Wilhite, 30-Nov-85 * - Removed the old LK201 and VT100 logic. Added code to support the * DEC Rainbow keyboard (which is a LK201 layout) using the the Level * 1 Console In ROM INT. See "rainbow.h" for the function key defs * Steve Wilhite, 1-Dec-85 * - massive cleanup on code in display.c and search.c * * 2.0 George Jones, 12-Dec-85 * - Ported to Amiga. * * 3.0 Daniel Lawrence, 29-Dec-85 * - rebound keys/added new fast buffered I/O for AMIGA * - added META- repeat commands * - added reposition default to center screen (yeah!) * - changed exit with modified buffers message * - made filesave tell us what it is doing * - changed search string entry to terminate with * so we can use in search/replace strings * - updated version number in mode line to 3.0 * 12-Jan-86 * - Added code to reconize the Search/replace functions * - Added code to perform search/replace & query functions * 14-Jan-86 * - moved search logic to separate function in search.c * - added replace and query replace functions * - separated out control key expansions to be used by others in search.c * 15-Jan-86 * - changed "visiting" to finding * - changed yes/no responces to not need return * - cleaned up various messages * 16-jan-86 * - fixed spurious spawn message in MSDOS * - added ^X-S synonime to save command * - moved escape to shell to ^X-C * 21-jan-86 * - added code to suspend shell under BSD * 22-jan-86 * - added function key support (SPEC) under MSDOS * - Abort now prints [Aborted] on message line * 23-jan-86 * - Added modes and commends to set/unset them * 24-jan-86 * - Added Goto Line command * - added Rename Buffer command * 28-jan-86 * - added goto begining and end of paragraph commands (META-P/META-N) * - re-wrote kdelete to use realloc. gained MUCH speed here when * doing large wipes both on UNIX and MSDOS. Changed kill buffer * allocation block size from 256 bytes to 1 k * 29-jan-86 * - moved extern function declarations to efunc.h * - made name[] name binding table * 30-jan-86 * - fixed Previous/Next paragraph command not to wrap around EOF * - added Fill Paragraph command (META-Q) * 4-feb-86 * - added code to properly display long lines, scrolling them right * to left * 5-feb-85 * - rewrote code to right/left scroll...much better * - added shifted arror keys on IBMPC * 6-feb-85 * - add option to allow forword-word to jump to begining of * next word instead of end of current one. This is different from * other emacs' but can be configured off in estruct.h * - added VIEW mode to allow a buffer to be read only * (-v switch on command line will activate this) * - changed quick exit to write out ALL changed buffers!!! * MAKE SURE YOU KNOW THIS WHEN META-Zing * 10-feb-86 * - added handling of lines longer than allowed on file read in * (they wrap on additional lines) * - made having space clear the message line and NOT insert itself * a configuration option in ed.h * 11-feb-86 * - added Describe-command and Help commands. * 13-feb-86 * - added View file command (^X ^V) and finished HELP command * 14-feb-86 * - added option to let main loop skip update if type ahead commands * are queued up * 16-feb-86 * - added Insert File command * 17-feb-86 * - added scroll next window up/down commands * 18-feb-86 * - added CMODE indentation * - re-arranged header files to standerdize extern and global * definitions * - changed version number to 3.2 * - added numeric arguments to search, reverse search and * search and replace * 24-feb-86 * - added Bind To Key function (^C for now) to allow the user * to change his command keys * - added Unbind key function (M-^C for now) * - added execute named command to execute unbound commands (M-X) * - added describe bindings command (not bound) * - changed version number to 3.3 * 25-feb-86 * - scrapped CERROR mode (too many compilers) * - added EXACT mode for case sensitive searchers * 26-feb-86 * - added command completion on execute named command and * all routined grabbing a command name * - adding execute-command-line command and its support functions * (in preporation for sourcing files) * - added Execute Buffer command * 27-feb-86 * - added execute(source) file command and added code to automatically * execute emacs.rc (or .emacsrc on UNIX) before initial read in * - changed version number to 3.4 * 4-mar-86 * - changed word delete to be consistant with word move (it gets * rid of the inter word space now) This is configurable with the * NFWORD symbol in estruct.h * - added B_ACTIVE entry to the buffer table. Let emacs read multiple * file names from the command line and only read them in as needed * 5-mar-85 * - rewrote command line parser to get rid of my patchy code * - changed version number to 3.5 * 1-apr-86 * - added support for Aztec C 3.20e under MSDOS * - fixed bug in mlwrite on ADM3's and thier ilk under V7 * - added insertion of pounds in column one under CMODE * - changed version number to 3.6 * 3-apr-86 * - added next-buffer command (^X-X) * 5-apr-86 * - added kill paragraph command (M-^W) * - changed fill-paragraph to leave 2 spaces after a period at the * end of a word. * - added OVERWRITE mode * 7-apr-86 * - fixed overwrite mode to handle tabs * 8-apr-86 * - added add/delete global mode (M & ^M) commands * 9-apr-86 * - added insert space command * - moved bindings around ^C insert space * M-K bind-to-key * INSERT insert space * DELETE forwdel * - added hunt forward and hunt reverse commands * 10-apr-86 * - fixed bug in DOBUF with non-terminated command string * 15-apr-86 * - fixed tab expansion bug in DISPLAY which hung the AMIGA * (send in by Dawn Banks) * - fixed curcol problen if forwline/backline during keyboard * macro execution (sent in by Ernst Christen) * - added AMIGA function/cursor key support * - fixed nonterminating replacement bug * - fixed word wrapping problems * 16-apr-86 * - updated documentation and froze development for 3.6 net release * 3.6B - Bennett Todd's additional hacks * 22-may-86 * - ported to System V * 28-may-86 * - applied patches from the net to port to MSC 3.0 * - rearranged default keyboard bindings to more closely conform with * the proposed standard EMACS default key bindings (from net.emacs) * - added the BENTHAK define for my personal preferences -- including * retaining '-' characters in the mode line of inactive windows even * when REVSTA is active * - added the TRUETAB define for tabsets affecting only display, as * opposed to inserting spaces * - changed the version number in the mode line to 3.6B1.0 * 7-july-86 * - made terminal initialization get screen size (lines, columns) from * termcap, instead of assuming 24 x 80, when termcap is used. * - changed version number to 3.6B1.1 * 3.6M1.1 - Michael Hines additional hacks invoked when MLH == 1 * 29-feb-88 * - added a main and exit stub so emacs can be embedded in larger programs. * all public names are redefined with emacs_ prefix using redef.h * so there is less possibility of global name conflicts. * 2-mar-88 * - modified quickexit to be friendly. Now it asks whether to save buffers. * 23-march-88 * - version changed to 3.6M1.1 * - buffers given numbers and can change buffers by giving the number * - On fileread, return just re-reads buffer. * - On filewrite, return saves file in buffer. * - On filesave, calls filewrite if no file name. * - ^X and ESC- prompts displayed */ #include /* make global definitions not external */ #define maindef #include "estruct.h" /* global structures and defines */ #include "edef.h" /* global definitions */ #include "efunc.h" /* function declarations and name table */ #include "ebind.h" /* default key bindings */ #if VMS #include #define GOOD (SS$_NORMAL) #endif #if EXPRESS /* ncube requires an exit(0) upon program completion */ #define exit(c1) exit(0) #endif #ifndef GOOD #define GOOD 0 #endif static int vquick = 0; /*mlh 3/2/88 flag for very quick exit (expect to return)*/ int emacs_main(argc, argv) /*mlh 2/29/88 can be embedded in larger program*/ int argc; char *argv[]; { register int c; register int f; register int n; register int mflag; register BUFFER *bp; register int ffile; /* first file flag */ register int carg; /* current arg to scan */ int basec; /* c stripped of meta character */ int viewflag; /* are we starting in view mode? */ char bname[NBUFN]; /* buffer name of file to read */ /*mlh 3/1/88 take care of calling from within larger program */ if (strcmp(argv[0], "embedded") == 0) { vquick = 1; /* very quick exit */ } if (argc < 0) { /* reentered */ if (argv[0][0] == ('Z'&037)) { /* exiting also from larger program*/ vquick = 0; update(); IGNORE(quickexit(0, 1)); } goto loop; } /* initialize the editor and process the startup file */ Strcpy(bname, "main"); /* default buffer name */ vtinit(); /* Displays. */ edinit(bname); /* Buffers, windows. */ IGNORE(startup()); /* execute .emacsrc if there */ viewflag = FALSE; ffile = TRUE; /* no file to edit yet */ update(); /* let the user know we are here */ /* scan through the command line and get the files to edit */ for (carg = 1; carg < argc; ++carg) { /* if its a switch, process it */ if (argv[carg][0] == '-') { switch (argv[carg][1]) { case 'v': /* -v for View File */ case 'V': viewflag = TRUE; break; case 'e': /* -e for Edit file */ case 'E': viewflag = FALSE; break; default: /* unknown switch */ /* ignore this for now */ break; } } else { /* process a file name */ /* set up a buffer for this file */ makename(bname, argv[carg]); /* if this is the first file, read it in */ if (ffile) { bp = curbp; makename(bname, argv[carg]); #if MLH /* first file in is buffer 0 */ Strcpy(bp->b_bname, "(0) "); Strncat(bp->b_bname, bname, NBUFN); #else Strcpy(bp->b_bname, bname); #endif /*MLH*/ Strcpy(bp->b_fname, argv[carg]); if (readin(argv[carg], (viewflag==FALSE)) == ABORT) { Strcpy(bp->b_bname, "main"); Strcpy(bp->b_fname, ""); } bp->b_dotp = bp->b_linep; bp->b_doto = 0; ffile = FALSE; } else { /* set this to inactive */ bp = bfind(bname, TRUE, 0); Strcpy(bp->b_fname, argv[carg]); bp->b_active = FALSE; } /* set the view mode appropriatly */ if (viewflag) bp->b_mode |= MDVIEW; } } /* setup to process commands */ lastflag = 0; /* Fake last flags. */ curbp->b_mode = curbp->b_mode | gmode; /* and set default modes*/ curwp->w_flag |= WFMODE; /* and force an update */ loop: update(); /* Fix up the screen */ c = getkey(); if (mpresf != FALSE) { mlerase(); update(); #if CLRMSG if (c == ' ') /* ITS EMACS does this */ goto loop; #endif } f = FALSE; n = 1; /* do META-# processing if needed */ basec = c & ~META; /* strip meta char off if there */ if ((c & META) && ((basec >= '0' && basec <= '9') || basec == '-')) { f = TRUE; /* there is a # arg */ n = 0; /* start with a zero default */ mflag = 1; /* current minus flag */ c = basec; /* strip the META */ while ((c >= '0' && c <= '9') || (c == '-')) { if (c == '-') { /* already hit a minus or digit? */ if ((mflag == -1) || (n != 0)) break; mflag = -1; } else { n = n * 10 + (c - '0'); } if ((n == 0) && (mflag == -1)) /* lonely - */ mlwrite("Arg:"); else mlwrite("Arg: %d",n * mflag); c = getkey(); /* get the next key */ } n = n * mflag; /* figure in the sign */ } /* do ^U repeat argument processing */ if (c == (CTRL|'U')) { /* ^U, start argument */ f = TRUE; n = 4; /* with argument of 4 */ mflag = 0; /* that can be discarded. */ mlwrite("Arg: 4"); while ((c=getkey()) >='0' && (c<='9' || c==(CTRL|'U') || c=='-')){ if (c == (CTRL|'U')) n = n*4; /* * If dash, and start of argument string, set arg. * to -1. Otherwise, insert it. */ else if (c == '-') { if (mflag) break; n = 0; mflag = -1; } /* * If first digit entered, replace previous argument * with digit and set sign. Otherwise, append to arg. */ else { if (!mflag) { n = 0; mflag = 1; } n = 10*n + c - '0'; } mlwrite("Arg: %d", (mflag >=0) ? n : (n ? -n : -1)); } /* * Make arguments preceded by a minus sign negative and change * the special argument "^U -" to an effective "^U -1". */ if (mflag == -1) { if (n == 0) n++; n = -n; } } if (c == (CTRL|'X')) { #if MLH mlwrite("^X:"); /* ^X prompt */ c = CTLX | getctl(); mlerase(); #else c = CTLX | getctl(); #endif /*MLH*/ } if (kbdmip != NULL) { /* Save macro strokes. */ if (c!=(CTLX|')') && kbdmip>&kbdm[NKBDM-6]) { IGNORE(ctrlg(FALSE, 0)); goto loop; } if (f != FALSE) { *kbdmip++ = (CTRL|'U'); *kbdmip++ = n; } *kbdmip++ = c; } IGNORE(execute(c, f, n)); /* Do it. */ goto loop; } /* * Initialize all of the buffers and windows. The buffer name is passed down * as an argument, because the main routine may have been told to read in a * file by default, and we want the buffer name to be right. */ int edinit(bname) char bname[]; { register BUFFER *bp; register WINDOW *wp; bp = bfind(bname, TRUE, 0); /* First buffer */ blistp = bfind("[List]", TRUE, BFTEMP); /* Buffer list buffer */ wp = (WINDOW *) malloc(sizeof(WINDOW)); /* First window */ if (bp==NULL || wp==NULL || blistp==NULL) exit(1); curbp = bp; /* Make this current */ wheadp = wp; curwp = wp; wp->w_wndp = NULL; /* Initialize window */ wp->w_bufp = bp; bp->b_nwnd = 1; /* Displayed. */ wp->w_linep = bp->b_linep; wp->w_dotp = bp->b_linep; wp->w_doto = 0; wp->w_markp = NULL; wp->w_marko = 0; wp->w_toprow = 0; wp->w_ntrows = term.t_nrow-1; /* "-1" for mode line. */ wp->w_force = 0; wp->w_flag = WFMODE|WFHARD; /* Full. */ return 0; } /* * This is the general command execution routine. It handles the fake binding * of all the keys to "self-insert". It also clears out the "thisflag" word, * and arranges to move it to the "lastflag", so that the next command can * look at it. Return the status of command. */ int execute(c, f, n) int c, f, n; { register KEYTAB *ktp; register int status; ktp = &keytab[0]; /* Look in key table. */ while (ktp->k_fp != NULL) { if (ktp->k_code == c) { thisflag = 0; status = (*ktp->k_fp)(f, n); lastflag = thisflag; return (status); } ++ktp; } /* * If a space was typed, fill column is defined, the argument is non- * negative, wrap mode is enabled, and we are now past fill column, * and we are not read-only, perform word wrap. */ if (c == ' ' && (curwp->w_bufp->b_mode & MDWRAP) && fillcol > 0 && n >= 0 && getccol(FALSE) > fillcol && (curwp->w_bufp->b_mode & MDVIEW) == FALSE) {IGNORE(wrapword(0));} if ((c>=0x20 && c<=0x7E) /* Self inserting. */ || (c>=0xA0 && c<=0xFE)) { if (n <= 0) { /* Fenceposts. */ lastflag = 0; return (n<0 ? FALSE : TRUE); } thisflag = 0; /* For the future. */ /* if we are in overwrite mode, not at eol, and next char is not a tab or we are at a tab stop, delete a char forword */ if (curwp->w_bufp->b_mode & MDOVER && curwp->w_doto < curwp->w_dotp->l_used && (lgetc(curwp->w_dotp, curwp->w_doto) != '\t' || (curwp->w_doto) % tabsize == tabsize-1)) {IGNORE(ldelete(1, FALSE));} /* do the appropriate insertion */ if (c == '}' && (curbp->b_mode & MDCMOD) != 0) status = insbrace(n, c); else if (c == '#' && (curbp->b_mode & MDCMOD) != 0) status = inspound(); else status = linsert(n, c); lastflag = thisflag; return (status); } mlwrite("\007[Key not bound]"); /* complain */ lastflag = 0; /* Fake last flags. */ return (FALSE); } /* * Read in a key. * Do the standard keyboard preprocessing. Convert the keys to the internal * character set. */ int getkey() { int c; #if AMIGA int d; #endif c = (*term.t_getchar)(); #if RAINBOW if (c & Function_Key) { int i; for (i = 0; i < lk_map_size; i++) if (c == lk_map[i][0]) return lk_map[i][1]; } else if (c == Shift + 015) return CTRL | 'J'; else if (c == Shift + 0x7F) return META | 0x7F; #endif #if MSDOS if (c == 0) { /* Apply SPEC prefix */ c = getkey(); return(SPEC | c); } #endif #if AMIGA /* apply SPEC prefix */ if ((unsigned)c == 155) { c = (*term.t_getchar)(); /* first try to see if it is a cursor key */ if ((c >= 'A' && c <= 'D') || c == 'S' || c == 'T') return(SPEC | c); /* next, a 2 char sequence */ d = (*term.t_getchar)(); if (d == '~') return(SPEC | c); /* decode a 3 char sequence */ c = d + 32; /* if a shifted function key, eat the tilde */ if (d >= '0' && d <= '9') d = (*term.t_getchar)(); return(SPEC | c); } #endif if (c == METACH) { /* Apply M- prefix */ #if MLH mlwrite("M-:"); c = getctl(); mlerase(); #else c = getctl(); #endif /*MLH*/ return (META | c); } if (c>=0x00 && c<=0x1F) /* C0 control -> C- */ c = CTRL | (c+'@'); return (c); } /* * Get a key. * Apply control modifications to the read key. */ int getctl() { register int c; c = (*term.t_getchar)(); if (c>='a' && c<='z') /* Force to upper */ c -= 0x20; if (c>=0x00 && c<=0x1F) /* C0 control -> C- */ c = CTRL | (c+'@'); return (c); } /* * Fancy quit command, as implemented by Norm. If the any buffer has * changed do a write on that buffer and exit emacs, otherwise simply exit. */ /* mlh 7/24/87 change to friendly method which asks about each buffer * in turn. * We do a very quick exit if vquick is non zero */ int quickexit(f, n) int f, n; { #if (MLH == 0) register BUFFER *bp; /* scanning pointer to buffers */ bp = bheadp; while (bp != NULL) { if ((bp->b_flag&BFCHG) != 0 /* Changed. */ && (bp->b_flag&BFTEMP) == 0) { /* Real. */ curbp = bp; /* make that buffer cur */ mlwrite("[Saving %s]",bp->b_fname); filesave(f, n); } bp = bp->b_bufp; /* on to the next buffer */ } IGNORE(quit(f, n)); /* conditionally quit */ #else char mes[128]; BUFFER *bp; BUFFER *btemp; if (vquick == 0){ for (bp = bheadp; bp; bp = bp->b_bufp) { if ((bp->b_flag&BFCHG) != 0 /* Changed. */ && (bp->b_flag&BFTEMP) == 0){ /* Real. */ Sprintf(mes, "Buffer %s -> file %s, write?", bp->b_bname, bp->b_fname); mes[50] = '\0'; /*buf in mlyesno only 64*/ switch (mlyesno(mes)) { case TRUE: btemp = curbp; curbp = bp; if(filesave(f, n) != TRUE) { return ABORT; } curbp = btemp; break; case ABORT: return(ABORT); case FALSE: break; } } } } IGNORE(quit(TRUE, n)); /* definitely quit */ #endif /*MLH*/ return TRUE; } /* * Quit command. If an argument, always quit. Otherwise confirm if a buffer * has been changed and not written out. Normally bound to "C-X C-C". */ int quit(f, n) int f, n; { register int s; LINTUSE(n) if (f != FALSE /* Argument forces it. */ || anycb() == FALSE /* All buffers clean. */ /* User says it's OK. */ || (s=mlyesno("Modified buffers exist. Leave anyway")) == TRUE) { #if FILOCK if (lockrel() != TRUE) { (*term.t_putchar)('\n'); (*term.t_putchar)('\r'); (*term.t_close)(); exit(1); } #endif vttidy(); exit(GOOD); } mlwrite(""); return (s); } /* * Begin a keyboard macro. * Error if not at the top level in keyboard processing. Set up variables and * return. */ int ctlxlp(f, n) int f, n; { LINTUSE(f) LINTUSE(n) if (kbdmip!=NULL || kbdmop!=NULL) { mlwrite("Not now"); return (FALSE); } mlwrite("[Start macro]"); kbdmip = &kbdm[0]; return (TRUE); } /* * End keyboard macro. Check for the same limit conditions as the above * routine. Set up the variables and return to the caller. */ int ctlxrp(f, n) int f, n; { LINTUSE(f) LINTUSE(n) if (kbdmip == NULL) { mlwrite("Not now"); return (FALSE); } mlwrite("[End macro]"); kbdmip = NULL; return (TRUE); } /* * Execute a macro. * The command argument is the number of times to loop. Quit as soon as a * command gets an error. Return TRUE if all ok, else FALSE. */ int ctlxe(f, n) int f, n; { register int c; register int af; register int an; register int s; LINTUSE(f) if (kbdmip!=NULL || kbdmop!=NULL) { mlwrite("Not now"); return (FALSE); } if (n <= 0) return (TRUE); do { kbdmop = &kbdm[0]; do { af = FALSE; an = 1; if ((c = *kbdmop++) == (CTRL|'U')) { af = TRUE; an = *kbdmop++; c = *kbdmop++; } s = TRUE; } while (c!=(CTLX|')') && (s=execute(c, af, an))==TRUE); kbdmop = NULL; } while (s==TRUE && --n); return (s); } /* * Abort. * Beep the beeper. Kill off any keyboard macro, etc., that is in progress. * Sometimes called as a routine, to do general aborting of stuff. */ int ctrlg(f, n) int f, n; { LINTUSE(f) LINTUSE(n) (*term.t_beep)(); if (kbdmip != NULL) { kbdm[0] = (CTLX|')'); kbdmip = NULL; } mlwrite("[Aborted]"); return (ABORT); } /* tell the user that this command is illegal while we are in VIEW (read-only) mode */ int rdonly() { (*term.t_beep)(); mlwrite("[Key illegal in VIEW mode]"); return(FALSE); } neuron-7.5/src/memacs/random.c000077500000000000000000000447511323325274500163770ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/random.c,v 1.1.1.1 1994/10/12 17:21:25 hines Exp */ /* random.c,v * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.4 92/08/12 08:23:36 hines * saber free except for ARGSUSED which should be suppressed everywhere * * Revision 1.3 89/07/10 10:25:55 mlh * LINT free * * Revision 1.2 89/07/09 12:18:56 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:53 mlh * Initial revision * */ /* * This file contains the command processing functions for a number of random * commands. There is no functional grouping here, for sure. */ #include #include "estruct.h" #include "edef.h" /* * Set fill column to n. */ int setfillcol(f, n) int f, n; { LINTUSE(f) fillcol = n; mlwrite("[Fill column is %d]",n); return(TRUE); } /* * Display the current position of the cursor, in origin 1 X-Y coordinates, * the character that is under the cursor (in octal), and the fraction of the * text that is before the cursor. The displayed column is not the current * column, but the column that would be used on an infinite width display. * Normally this is bound to "C-X =". */ int showcpos(f, n) int f, n; { register LINE *clp; register long nch; register int cbo; register long nbc; register int cac; register int ratio; register int col; register int nline; char buf[200]; LINTUSE(f) LINTUSE(n) nline = 0; clp = lforw(curbp->b_linep); /* Grovel the data. */ cbo = 0; nch = 0; for (;;) { if (clp==curwp->w_dotp && cbo==curwp->w_doto) { nbc = nch; if (cbo == llength(clp)) cac = '\n'; else cac = lgetc(clp, cbo); } if (cbo == llength(clp)) { if (clp == curbp->b_linep) break; clp = lforw(clp); cbo = 0; } else ++cbo; ++nch; } for (clp = curbp->b_linep; clp != curwp->w_dotp; clp = lforw(clp)){ ++nline; } col = getccol(FALSE); /* Get real column. */ ratio = 0; /* Ratio before dot. */ if (nch != 0) ratio = (100L*nbc) / nch; sprintf(buf, "line=%d X=%d Y=%d CH=0x%x .=%ld (%d%% of %ld)", nline, col+1, currow+1, cac, nbc, ratio, nch); mlwrite(buf); return (TRUE); } /* * Return current column. Stop at first non-blank given TRUE argument. */ int getccol(bflg) int bflg; { register int c, i, col; col = 0; for (i=0; iw_doto; ++i) { c = lgetc(curwp->w_dotp, i); if (c!=' ' && c!='\t' && bflg) break; if (c == '\t') #if TRUETAB col += tabsize - col%tabsize - 1; #else col |= 0x07; #endif else if (c<0x20 || c==0x7F) ++col; ++col; } return(col); } /* * Twiddle the two characters on either side of dot. If dot is at the end of * the line twiddle the two characters before it. Return with an error if dot * is at the beginning of line; it seems to be a bit pointless to make this * work. This fixes up a very common typo with a single stroke. Normally bound * to "C-T". This always works within a line, so "WFEDIT" is good enough. */ int twiddle(f, n) int f, n; { register LINE *dotp; register int doto; register int cl; register int cr; LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ dotp = curwp->w_dotp; doto = curwp->w_doto; if (doto==llength(dotp) && --doto<0) return (FALSE); cr = lgetc(dotp, doto); if (--doto < 0) return (FALSE); cl = lgetc(dotp, doto); lputc(dotp, doto+0, cr); lputc(dotp, doto+1, cl); lchange(WFEDIT); return (TRUE); } /* * Quote the next character, and insert it into the buffer. All the characters * are taken literally, with the exception of the newline, which always has * its line splitting meaning. The character is always read, even if it is * inserted 0 times, for regularity. Bound to "C-Q" */ int quote(f, n) int f, n; { register int s; register int c; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ c = (*term.t_getchar)(); if (n < 0) return (FALSE); if (n == 0) return (TRUE); if (c == '\n') { do { s = lnewline(); } while (s==TRUE && --n); return (s); } return (linsert(n, c)); } #if TRUETAB /* * Set tab size if given non-default argument (n <> 1). Otherwise, insert a * tab into file. */ int tab(f, n) int f, n; { LINTUSE(f) if (n < 0) return (FALSE); if (n == 0 || n > 1) { tabsize = n; return(TRUE); } return(linsert(1, '\t')); } #else /* * Set tab size if given non-default argument (n <> 1). Otherwise, insert a * tab into file. If given argument, n, of zero, change to true tabs. * If n > 1, simulate tab stop every n-characters using spaces. This has to be * done in this slightly funny way because the tab (in ASCII) has been turned * into "C-I" (in 10 bit code) already. Bound to "C-I". */ int tab(f, n) int f, n; { if (n < 0) return (FALSE); if (n == 0 || n > 1) { tabsize = n; return(TRUE); } if (! tabsize) return(linsert(1, '\t')); return(linsert(tabsize - (getccol(FALSE) % tabsize), ' ')); } #endif /* * Open up some blank space. The basic plan is to insert a bunch of newlines, * and then back up over them. Everything is done by the subcommand * procerssors. They even handle the looping. Normally this is bound to "C-O". */ int openline(f, n) int f, n; { register int i; register int s; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); if (n == 0) return (TRUE); i = n; /* Insert newlines. */ do { s = lnewline(); } while (s==TRUE && --i); if (s == TRUE) /* Then back up overtop */ s = backchar(f, n); /* of them all. */ return (s); } /* * Insert a newline. Bound to "C-M". If we are in CMODE, do automatic * indentation as specified. */ int newline(f, n) int f, n; { register int s; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); /* if we are in C mode and this is a default */ if (n == 1 && (curbp->b_mode & MDCMOD) && curwp->w_dotp != curbp->b_linep) return(cinsert()); /* insert some lines */ while (n--) { if ((s=lnewline()) != TRUE) return (s); } return (TRUE); } int cinsert() /* insert a newline and indentation for C */ { register char *cptr; /* string pointer into text to copy */ register int tptr; /* index to scan into line */ register int bracef; /* was there a brace at the end of line? */ register int i; char ichar[NSTRING]; /* buffer to hold indent of last line */ /* grab a pointer to text to copy indentation from */ cptr = &curwp->w_dotp->l_text[0]; /* check for a brace */ tptr = curwp->w_doto - 1; bracef = (cptr[tptr] == '{'); /* save the indent of the previous line */ i = 0; while ((i < tptr) && (cptr[i] == ' ' || cptr[i] == '\t') && (i < NSTRING - 1)) { ichar[i] = cptr[i]; ++i; } ichar[i] = 0; /* terminate it */ /* put in the newline */ if (lnewline() == FALSE) return(FALSE); /* and the saved indentation */ i = 0; while (ichar[i]) IGNORE(linsert(1, ichar[i++])); /* and one more tab for a brace */ if (bracef) {IGNORE(tab(FALSE, 1));} return(TRUE); } int insbrace(n, c) /* insert a brace into the text here...we are in CMODE */ int n; /* repeat count */ int c; /* brace to insert (always { for now) */ { register int ch; /* last character before input */ register int i; register int target; /* column brace should go after */ /* if we are at the begining of the line, no go */ if (curwp->w_doto == 0) return(linsert(n,c)); /* scan to see if all space before this is white space */ for (i = curwp->w_doto - 1; i >= 0; --i) { ch = lgetc(curwp->w_dotp, i); if (ch != ' ' && ch != '\t') return(linsert(n, c)); } /* delete back first */ target = getccol(FALSE); /* calc where we will delete to */ target -= 1; #if TRUETAB target -= target % tabsize; #else target -= target % (tabsize == 0 ? 8 : tabsize); #endif while (getccol(FALSE) > target) {IGNORE(backdel(FALSE, 1));} /* and insert the required brace(s) */ return(linsert(n, c)); } int inspound() /* insert a # into the text here...we are in CMODE */ { register int ch; /* last character before input */ register int i; /* if we are at the begining of the line, no go */ if (curwp->w_doto == 0) return(linsert(1,'#')); /* scan to see if all space before this is white space */ for (i = curwp->w_doto - 1; i >= 0; --i) { ch = lgetc(curwp->w_dotp, i); if (ch != ' ' && ch != '\t') return(linsert(1, '#')); } /* delete back first */ while (getccol(FALSE) > 1) {IGNORE(backdel(FALSE, 1));} /* and insert the required pound */ return(linsert(1, '#')); } /* * Delete blank lines around dot. What this command does depends if dot is * sitting on a blank line. If dot is sitting on a blank line, this command * deletes all the blank lines above and below the current line. If it is * sitting on a non blank line then it deletes all of the blank lines after * the line. Normally this command is bound to "C-X C-O". Any argument is * ignored. */ int deblank(f, n) int f, n; { register LINE *lp1; register LINE *lp2; register int nld; LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ lp1 = curwp->w_dotp; while (llength(lp1)==0 && (lp2=lback(lp1))!=curbp->b_linep) lp1 = lp2; lp2 = lp1; nld = 0; while ((lp2=lforw(lp2))!=curbp->b_linep && llength(lp2)==0) ++nld; if (nld == 0) return (TRUE); curwp->w_dotp = lforw(lp1); curwp->w_doto = 0; return (ldelete(nld, FALSE)); } /* * Insert a newline, then enough tabs and spaces to duplicate the indentation * of the previous line. Assumes tabs are every eight characters. Quite simple. * Figure out the indentation of the current line. Insert a newline by calling * the standard routine. Insert the indentation by inserting the right number * of tabs and spaces. Return TRUE if all ok. Return FALSE if one of the * subcomands failed. Normally bound to "C-J". */ int indent(f, n) int f, n; { register int nicol; register int c; register int i; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); while (n--) { nicol = 0; for (i=0; iw_dotp); ++i) { c = lgetc(curwp->w_dotp, i); if (c!=' ' && c!='\t') break; if (c == '\t') #if TRUETAB nicol += tabsize - nicol%tabsize - 1; #else nicol |= 0x07; #endif ++nicol; } if (lnewline() == FALSE || ((i=nicol/tabsize)!=0 && linsert(i, '\t')==FALSE) || ((i=nicol%tabsize)!=0 && linsert(i, ' ')==FALSE)) return (FALSE); } return (TRUE); } /* * Delete forward. This is real easy, because the basic delete routine does * all of the work. Watches for negative arguments, and does the right thing. * If any argument is present, it kills rather than deletes, to prevent loss * of text if typed with a big argument. Normally bound to "C-D". */ int forwdel(f, n) int f, n; { if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (backdel(f, -n)); if (f != FALSE) { /* Really a kill. */ if ((lastflag&CFKILL) == 0) kdelete(); thisflag |= CFKILL; } return (ldelete(n, f)); } /* * Delete backwards. This is quite easy too, because it's all done with other * functions. Just move the cursor back, and delete forwards. Like delete * forward, this actually does a kill if presented with an argument. Bound to * both "RUBOUT" and "C-H". */ int backdel(f, n) int f, n; { register int s; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (forwdel(f, -n)); if (f != FALSE) { /* Really a kill. */ if ((lastflag&CFKILL) == 0) kdelete(); thisflag |= CFKILL; } if ((s=backchar(f, n)) == TRUE) s = ldelete(n, f); return (s); } /* * Kill text. If called without an argument, it kills from dot to the end of * the line, unless it is at the end of the line, when it kills the newline. * If called with an argument of 0, it kills from the start of the line to dot. * If called with a positive argument, it kills from dot forward over that * number of newlines. If called with a negative argument it kills backwards * that number of newlines. Normally bound to "C-K". */ int killtext(f, n) int f, n; { register int chunk; register LINE *nextp; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if ((lastflag&CFKILL) == 0) /* Clear kill buffer if */ kdelete(); /* last wasn't a kill. */ thisflag |= CFKILL; if (f == FALSE) { chunk = llength(curwp->w_dotp)-curwp->w_doto; if (chunk == 0) chunk = 1; } else if (n == 0) { chunk = curwp->w_doto; curwp->w_doto = 0; } else if (n > 0) { chunk = llength(curwp->w_dotp)-curwp->w_doto+1; nextp = lforw(curwp->w_dotp); while (--n) { if (nextp == curbp->b_linep) return (FALSE); chunk += llength(nextp)+1; nextp = lforw(nextp); } } else { mlwrite("neg kill"); return (FALSE); } return (ldelete(chunk, TRUE)); } /* * Yank text back from the kill buffer. This is really easy. All of the work * ms done by the standard insert routines. All you do is run the loop, and * check for errors. Bound to "C-Y". */ int yank(f, n) int f, n; { register int c; register int i; extern unsigned kused; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); while (n--) { i = 0; while ((c=kremove(i)) >= 0) { if (c == '\n') { if (lnewline() == FALSE) return (FALSE); } else { if (linsert(1, c) == FALSE) return (FALSE); } ++i; } } return (TRUE); } int setmode(f, n) /* prompt and set an editor mode */ int f, n; /* default and argument */ { LINTUSE(f) LINTUSE(n) IGNORE(adjustmode(TRUE, FALSE)); return (TRUE); } int delmode(f, n) /* prompt and delete an editor mode */ int f, n; /* default and argument */ { LINTUSE(f) LINTUSE(n) IGNORE(adjustmode(FALSE, FALSE)); return (TRUE); } int setgmode(f, n) /* prompt and set a global editor mode */ int f, n; /* default and argument */ { LINTUSE(f) LINTUSE(n) IGNORE(adjustmode(TRUE, TRUE)); return (TRUE); } int delgmode(f, n) /* prompt and delete a global editor mode */ int f, n; /* default and argument */ { LINTUSE(f) LINTUSE(n) IGNORE(adjustmode(FALSE, TRUE)); return (TRUE); } int adjustmode(kind, global) /* change the editor mode status */ int kind; /* true = set, false = delete */ int global; /* true = global flag, false = current buffer flag */ { register char *scan; /* scanning pointer to convert prompt */ register int i; /* loop index */ char prompt[50]; /* string to prompt user with */ char cbuf[NPAT]; /* buffer to recieve mode name into */ /* build the proper prompt string */ if (global) Strcpy(prompt,"Global mode to "); else Strcpy(prompt,"Mode to "); if (kind == TRUE) Strcat(prompt, "add: "); else Strcat(prompt, "delete: "); /* prompt the user and get an answer */ IGNORE(mlreply(prompt, cbuf, NPAT - 1)); /*mlh really IGNORE */ /* make it uppercase */ scan = cbuf; while (*scan != 0) { if (*scan >= 'a' && *scan <= 'z') *scan = *scan - 32; scan++; } /* test it against the modes we know */ for (i=0; i < NUMMODES; i++) { if (strcmp(cbuf, modename[i]) == 0) { /* finding a match, we process it */ if (kind == TRUE) if (global) gmode |= (1 << i); else curwp->w_bufp->b_mode |= (1 << i); else if (global) gmode &= ~(1 << i); else curwp->w_bufp->b_mode &= ~(1 << i); /* display new mode line */ if (global == 0) upmode(); mlerase(); /* erase the junk */ return(TRUE); } } mlwrite("No such mode!"); return(FALSE); } neuron-7.5/src/memacs/redef.h000077500000000000000000000171511323325274500162030ustar00rootroot00000000000000/* /local/src/master/nrn/src/memacs/redef.h,v 1.2 1994/10/25 17:21:31 hines Exp */ /* redef.h,v * Revision 1.2 1994/10/25 17:21:31 hines * bsearch and atoi conflict with names in djg libraries * * Revision 1.1.1.1 1994/10/12 17:21:23 hines * NEURON 3.0 distribution * * Revision 1.1 89/07/08 15:37:56 mlh * Initial revision * */ /*Publics by module*/ #define exit emacs_exit /*ANSI size = 250*/ #define ansibeep emacs_ansibeep #define ansieeol emacs_ansieeol #define ansieeop emacs_ansieeop #define ansimove emacs_ansimove #define ansiopen emacs_ansiopen #define ansiparm emacs_ansiparm #define ansirev emacs_ansirev #define term emacs_term /*BASIC size = 1743*/ #define backchar emacs_backchar #define backline emacs_backline #define backpage emacs_backpage #define forwchar emacs_forwchar #define forwline emacs_forwline #define forwpage emacs_forwpage #define getgoal emacs_getgoal #define gotobob emacs_gotobob #define gotobol emacs_gotobol #define gotobop emacs_gotobop #define gotoeob emacs_gotoeob #define gotoeol emacs_gotoeol #define gotoeop emacs_gotoeop #define gotoline emacs_gotoline #define setmark emacs_setmark #define swapmark emacs_swapmark /*BIND size = 3039*/ #define bindtokey emacs_bindtokey #define cmdstr emacs_cmdstr #define desbind emacs_desbind #define deskey emacs_deskey #define dobuf emacs_dobuf #define docmd emacs_docmd #define dofile emacs_dofile #define execbuf emacs_execbuf #define execcmd emacs_execcmd #define execfile emacs_execfile #define fncmatch emacs_fncmatch #define getckey emacs_getckey #define gettok emacs_gettok #define help emacs_help #define namedcmd emacs_namedcmd #define nxtarg emacs_nxtarg #define pathname emacs_pathname #define startup emacs_startup #define unbindkey emacs_unbindkey /*BUFFER size = 2274*/ #define addline emacs_addline #define anycb emacs_anycb #define bclear emacs_bclear #define bfind emacs_bfind /*#define itoa emacs_itoa*/ #define killbuffer emacs_killbuffer #define listbuffers emacs_listbuffers #define makelist emacs_makelist #define namebuffer emacs_namebuffer #define nextbuffer emacs_nextbuffer #define swbuffer emacs_swbuffer #define usebuffer emacs_usebuffer #define zotbuf emacs_zotbuf /*DISPLAY size = 4830*/ #define getname emacs_getname #define kbdtext emacs_kbdtext #define lbound emacs_lbound #define mlerase emacs_mlerase #define mlputi emacs_mlputi #define mlputli emacs_mlputli #define mlputs emacs_mlputs #define mlreply emacs_mlreply #define mlreplyt emacs_mlreplyt #define mlwrite emacs_mlwrite #define mlyesno emacs_mlyesno #define modeline emacs_modeline #define movecursor emacs_movecursor #define pscreen emacs_pscreen #define ttcol emacs_ttcol #define ttrow emacs_ttrow #define update emacs_update #define updateline emacs_updateline #define updext emacs_updext #define upmode emacs_upmode #define vscreen emacs_vscreen #define vtcol emacs_vtcol #define vteeol emacs_vteeol #define vtinit emacs_vtinit #define vtmove emacs_vtmove #define vtputc emacs_vtputc #define vtpute emacs_vtpute #define vtrow emacs_vtrow #define vttidy emacs_vttidy /*FILE size = 2602*/ #define filefind emacs_filefind #define filename emacs_filename #define fileread emacs_fileread #define filesave emacs_filesave #define filewrite emacs_filewrite #define getfile emacs_getfile #define ifile emacs_ifile #define insfile emacs_insfile #define makename emacs_makename #define readin emacs_readin #define viewfile emacs_viewfile #define writeout emacs_writeout /*FILEIO size = 464*/ #define ffclose emacs_ffclose #define ffgetline emacs_ffgetline #define ffp emacs_ffp #define ffputline emacs_ffputline #define ffropen emacs_ffropen #define ffwopen emacs_ffwopen /*LINE size = 2250*/ #define insspace emacs_insspace #define kbufp emacs_kbufp #define kdelete emacs_kdelete #define kinsert emacs_kinsert #define kremove emacs_kremove #define ksize emacs_ksize #define kused emacs_kused #define lalloc emacs_lalloc #define lchange emacs_lchange #define ldelete emacs_ldelete #define ldelnewline emacs_ldelnewline #define lfree emacs_lfree #define linsert emacs_linsert #define lnewline emacs_lnewline /*LOCK size = 1*/ #define lckhello emacs_lckhello /*MAIN1 size = 5711*/ #define bheadp emacs_bheadp #define blistp emacs_blistp #define clexec emacs_clexec #define ctlxe emacs_ctlxe #define ctlxlp emacs_ctlxlp #define ctlxrp emacs_ctlxrp #define ctrlg emacs_ctrlg #define curbp emacs_curbp #define curcol emacs_curcol #define curgoal emacs_curgoal #define currow emacs_currow #define curwp emacs_curwp #define edinit emacs_edinit #define eolexist emacs_eolexist #define execute emacs_execute #define fillcol emacs_fillcol #define getctl emacs_getctl #define getkey emacs_getkey #define gmode emacs_gmode #define kbdm emacs_kbdm #define kbdmip emacs_kbdmip #define kbdmop emacs_kbdmop #define keytab emacs_keytab #define lastflag emacs_lastflag #define modecode emacs_modecode #define modename emacs_modename #define mpresf emacs_mpresf #define names emacs_names #define pat emacs_pat #define quickexit emacs_quickexit #define quit emacs_quit #define rdonly emacs_rdonly #define revexist emacs_revexist #define rpat emacs_rpat #define sarg emacs_sarg #define sgarbf emacs_sgarbf #define tabsize emacs_tabsize #define thisflag emacs_thisflag #define wheadp emacs_wheadp /*RANDOM size = 2549*/ #define adjustmode emacs_adjustmode #define backdel emacs_backdel #define cinsert emacs_cinsert #define deblank emacs_deblank #define delgmode emacs_delgmode #define delmode emacs_delmode #define forwdel emacs_forwdel #define getccol emacs_getccol #define indent emacs_indent #define insbrace emacs_insbrace #define inspound emacs_inspound #define killtext emacs_killtext #define newline emacs_newline #define openline emacs_openline #define quote emacs_quote #define setfillcol emacs_setfillcol #define setgmode emacs_setgmode #define setmode emacs_setmode #define showcpos emacs_showcpos #define tab emacs_tab #define twiddle emacs_twiddle #define yank emacs_yank /*REGION size = 926*/ #define copyregion emacs_copyregion #define getregion emacs_getregion #define killregion emacs_killregion #define lowerregion emacs_lowerregion #define upperregion emacs_upperregion /*SEARCH size = 2288*/ #define backhunt emacs_backhunt #define backsearch emacs_backsearch /*#define bsearch emacs_bsearch*/ #define eq emacs_eq #define expandp emacs_expandp #define forscan emacs_forscan #define forwhunt emacs_forwhunt #define forwsearch emacs_forwsearch #define qreplace emacs_qreplace #define readpattern emacs_readpattern #define replaces emacs_replaces #define sreplace emacs_sreplace /*SPAWN size = 162*/ #define spawn emacs_spawn #define spawncli emacs_spawncli /*TCAP size = 1*/ #define hello emacs_hello /*TERMIO size = 172*/ #define nxtchar emacs_nxtchar #define rg emacs_rg #define ttclose emacs_ttclose #define ttflush emacs_ttflush #define ttgetc emacs_ttgetc #define ttopen emacs_ttopen #define ttputc emacs_ttputc #define typahead emacs_typahead /*WINDOW size = 1803*/ #define enlargewind emacs_enlargewind #define mvdnwind emacs_mvdnwind #define mvupwind emacs_mvupwind #define nextwind emacs_nextwind #define onlywind emacs_onlywind #define prevwind emacs_prevwind #define refresh emacs_refresh #define reposition emacs_reposition #define scrnextdw emacs_scrnextdw #define scrnextup emacs_scrnextup #define shrinkwind emacs_shrinkwind #define splitwind emacs_splitwind #define wpopup emacs_wpopup /*WORD size = 2008*/ #define backword emacs_backword #define capword emacs_capword #define delbword emacs_delbword #define delfword emacs_delfword #define fillpara emacs_fillpara #define forwword emacs_forwword #define inword emacs_inword #define killpara emacs_killpara #define lowerword emacs_lowerword #define upperword emacs_upperword #define wrapword emacs_wrapword neuron-7.5/src/memacs/region.c000077500000000000000000000164561323325274500164030ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/region.c,v 1.1.1.1 1994/10/12 17:21:25 hines Exp */ /* region.c,v * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.2 89/07/09 12:19:01 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:36:57 mlh * Initial revision * */ /* * The routines in this file * deal with the region, that magic space * between "." and mark. Some functions are * commands. Some functions are just for * internal use. */ #include #include "estruct.h" #include "edef.h" /* * Kill the region. Ask "getregion" * to figure out the bounds of the region. * Move "." to the start, and kill the characters. * Bound to "C-W". */ int killregion(f, n) int f, n; { register int s; REGION region; LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if ((s=getregion(®ion)) != TRUE) return (s); if ((lastflag&CFKILL) == 0) /* This is a kill type */ kdelete(); /* command, so do magic */ thisflag |= CFKILL; /* kill buffer stuff. */ curwp->w_dotp = region.r_linep; curwp->w_doto = region.r_offset; return (ldelete(region.r_size, TRUE)); } /* * Copy all of the characters in the * region to the kill buffer. Don't move dot * at all. This is a bit like a kill region followed * by a yank. Bound to "M-W". */ int copyregion(f, n) int f, n; { register LINE *linep; register int loffs; register int s; REGION region; LINTUSE(f) LINTUSE(n) if ((s=getregion(®ion)) != TRUE) return (s); if ((lastflag&CFKILL) == 0) /* Kill type command. */ kdelete(); thisflag |= CFKILL; linep = region.r_linep; /* Current line. */ loffs = region.r_offset; /* Current offset. */ while (region.r_size--) { if (loffs == llength(linep)) { /* End of line. */ if ((s=kinsert('\n')) != TRUE) return (s); linep = lforw(linep); loffs = 0; } else { /* Middle of line. */ if ((s=kinsert(lgetc(linep, loffs))) != TRUE) return (s); ++loffs; } } return (TRUE); } /* * Lower case region. Zap all of the upper * case characters in the region to lower case. Use * the region code to set the limits. Scan the buffer, * doing the changes. Call "lchange" to ensure that * redisplay is done in all buffers. Bound to * "C-X C-L". */ int lowerregion(f, n) int f, n; { register LINE *linep; register int loffs; register int c; register int s; REGION region; LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if ((s=getregion(®ion)) != TRUE) return (s); lchange(WFHARD); linep = region.r_linep; loffs = region.r_offset; while (region.r_size--) { if (loffs == llength(linep)) { linep = lforw(linep); loffs = 0; } else { c = lgetc(linep, loffs); if (c>='A' && c<='Z') lputc(linep, loffs, c+'a'-'A'); ++loffs; } } return (TRUE); } /* * Upper case region. Zap all of the lower * case characters in the region to upper case. Use * the region code to set the limits. Scan the buffer, * doing the changes. Call "lchange" to ensure that * redisplay is done in all buffers. Bound to * "C-X C-L". */ int upperregion(f, n) int f, n; { register LINE *linep; register int loffs; register int c; register int s; REGION region; LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if ((s=getregion(®ion)) != TRUE) return (s); lchange(WFHARD); linep = region.r_linep; loffs = region.r_offset; while (region.r_size--) { if (loffs == llength(linep)) { linep = lforw(linep); loffs = 0; } else { c = lgetc(linep, loffs); if (c>='a' && c<='z') lputc(linep, loffs, c-'a'+'A'); ++loffs; } } return (TRUE); } /* * This routine figures out the * bounds of the region in the current window, and * fills in the fields of the "REGION" structure pointed * to by "rp". Because the dot and mark are usually very * close together, we scan outward from dot looking for * mark. This should save time. Return a standard code. * Callers of this routine should be prepared to get * an "ABORT" status; we might make this have the * conform thing later. */ int getregion(rp) register REGION *rp; { register LINE *flp; register LINE *blp; int fsize; register int bsize; if (curwp->w_markp == NULL) { mlwrite("No mark set in this window"); return (FALSE); } if (curwp->w_dotp == curwp->w_markp) { rp->r_linep = curwp->w_dotp; if (curwp->w_doto < curwp->w_marko) { rp->r_offset = curwp->w_doto; rp->r_size = curwp->w_marko-curwp->w_doto; } else { rp->r_offset = curwp->w_marko; rp->r_size = curwp->w_doto-curwp->w_marko; } return (TRUE); } blp = curwp->w_dotp; bsize = curwp->w_doto; flp = curwp->w_dotp; fsize = llength(flp)-curwp->w_doto+1; while (flp!=curbp->b_linep || lback(blp)!=curbp->b_linep) { if (flp != curbp->b_linep) { flp = lforw(flp); if (flp == curwp->w_markp) { rp->r_linep = curwp->w_dotp; rp->r_offset = curwp->w_doto; rp->r_size = fsize+curwp->w_marko; return (TRUE); } fsize += llength(flp)+1; } if (lback(blp) != curbp->b_linep) { blp = lback(blp); bsize += llength(blp)+1; if (blp == curwp->w_markp) { rp->r_linep = blp; rp->r_offset = curwp->w_marko; rp->r_size = bsize - curwp->w_marko; return (TRUE); } } } mlwrite("Bug: lost mark"); return (FALSE); } neuron-7.5/src/memacs/search.c000077500000000000000000000324101323325274500163510ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/search.c,v 1.2 1994/10/25 17:21:33 hines Exp */ /* search.c,v * Revision 1.2 1994/10/25 17:21:33 hines * bsearch and atoi conflict with names in djg libraries * * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.4 92/08/12 08:24:11 hines * saber free except for ARGSUSED which should be suppressed everywhere * * Revision 1.3 89/07/10 10:26:00 mlh * LINT free * * Revision 1.2 89/07/09 12:19:05 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:37:01 mlh * Initial revision * */ /* * The functions in this file implement commands that search in the forward * and backward directions. There are no special characters in the search * strings. Probably should have a regular expression search, or something * like that. * */ #include #include "estruct.h" #include "edef.h" /* * Search forward. Get a search string from the user, and search, beginning at * ".", for the string. If found, reset the "." to be just after the match * string, and [perhaps] repaint the display. Bound to "C-S". */ /* string search input parameters */ #define PTBEG 1 /* leave the point at the begining on search */ #define PTEND 2 /* leave the point at the end on search */ int forwsearch(f, n) int f, n; { register int status; /* resolve the repeat count */ if (n == 0) n = 1; if (n < 1) /* search backwards */ return(backsearch(f, -n)); /* ask the user for the text of a pattern */ if ((status = readpattern("Search")) != TRUE) return(status); /* search for the pattern */ while (n-- > 0) { if ((status = forscan(&pat[0],PTEND)) == FALSE) break; } /* and complain if not there */ if (status == FALSE) mlwrite("Not found"); return(status); } int forwhunt(f, n) int f, n; { register int status; /* resolve the repeat count */ if (n == 0) n = 1; if (n < 1) /* search backwards */ return(backhunt(f, -n)); /* Make sure a pattern exists */ if (pat[0] == 0) { mlwrite("No pattern set"); return(FALSE); } /* search for the pattern */ while (n-- > 0) { if ((status = forscan(&pat[0],PTEND)) == FALSE) break; } /* and complain if not there */ if (status == FALSE) mlwrite("Not found"); return(status); } /* * Reverse search. Get a search string from the user, and search, starting at * "." and proceeding toward the front of the buffer. If found "." is left * pointing at the first character of the pattern [the last character that was * matched]. Bound to "C-R". */ int backsearch(f, n) int f, n; { register int s; /* resolve null and negative arguments */ if (n == 0) n = 1; if (n < 1) return(forwsearch(f, -n)); /* get a pattern to search */ if ((s = readpattern("Reverse search")) != TRUE) return(s); /* and go search for it */ return emacs_bsearch(f,n); } int backhunt(f, n) /* hunt backward for the last search string entered */ int f, n; { /* resolve null and negative arguments */ if (n == 0) n = 1; if (n < 1) return(forwhunt(f, -n)); /* Make sure a pattern exists */ if (pat[0] == 0) { mlwrite("No pattern set"); return(FALSE); } /* and go search for it */ return emacs_bsearch(f,n); } int emacs_bsearch(f, n) int f, n; { register LINE *clp; register int cbo; register LINE *tlp; register int tbo; register int c; register char *epp; register char *pp; LINTUSE(f) /* find a pointer to the end of the pattern */ for (epp = &pat[0]; epp[1] != 0; ++epp) /*EMPTY*/ ; /* make local copies of the starting location */ clp = curwp->w_dotp; cbo = curwp->w_doto; while (n-- > 0) { for (;;) { /* if we are at the begining of the line, wrap back around */ if (cbo == 0) { clp = lback(clp); if (clp == curbp->b_linep) { mlwrite("Not found"); return(FALSE); } cbo = llength(clp)+1; } /* fake the at the end of a line */ if (--cbo == llength(clp)) c = '\n'; else c = lgetc(clp, cbo); /* check for a match against the end of the pattern */ if (eq(c, *epp) != FALSE) { tlp = clp; tbo = cbo; pp = epp; /* scanning backwards through the rest of the pattern looking for a match */ while (pp != &pat[0]) { /* wrap across a line break */ if (tbo == 0) { tlp = lback(tlp); if (tlp == curbp->b_linep) goto fail; tbo = llength(tlp)+1; } /* fake the */ if (--tbo == llength(tlp)) c = '\n'; else c = lgetc(tlp, tbo); if (eq(c, *--pp) == FALSE) goto fail; } /* A Match! reset the current cursor */ curwp->w_dotp = tlp; curwp->w_doto = tbo; curwp->w_flag |= WFMOVE; goto next; } fail:; } next:; } return(TRUE); } /* * Compare two characters. The "bc" comes from the buffer. It has it's case * folded out. The "pc" is from the pattern. */ int eq(bc, pc) int bc; int pc; { if ((curwp->w_bufp->b_mode & MDEXACT) == 0) { if (bc>='a' && bc<='z') bc -= 0x20; if (pc>='a' && pc<='z') pc -= 0x20; } if (bc == pc) return(TRUE); return(FALSE); } /* * Read a pattern. Stash it in the external variable "pat". The "pat" is not * updated if the user types in an empty line. If the user typed an empty line, * and there is no old pattern, it is an error. Display the old pattern, in the * style of Jeff Lomicka. There is some do-it-yourself control expansion. * change to using to delemit the end-of-pattern to allow s in * the search string. */ int readpattern(prompt) char *prompt; { register int s; char tpat[NPAT+20]; Strcpy(tpat, prompt); /* copy prompt to output string */ Strcat(tpat, " ["); /* build new prompt string */ IGNORE(expandp(&pat[0], &tpat[strlen(tpat)], NPAT/2)); /* add old pattern */ Strcat(tpat, "]: "); s = mlreplyt(tpat, tpat, NPAT, 27); /* Read pattern */ if (s == TRUE) /* Specified */ Strcpy(pat, tpat); else if (s == FALSE && pat[0] != 0) /* CR, but old one */ s = TRUE; return(s); } int sreplace(f, n) /* Search and replace (ESC-R) */ int f; /* default flag */ int n; /* # of repetitions wanted */ { return(replaces(FALSE, f, n)); } int qreplace(f, n) /* search and replace with query (ESC-CTRL-R) */ int f; /* default flag */ int n; /* # of repetitions wanted */ { return(replaces(TRUE, f, n)); } /* replaces: search for a string and replace it with another string. query might be enabled (according to kind). */ int replaces(kind, f, n) int kind; /* Query enabled flag */ int f; /* default flag */ int n; /* # of repetitions wanted */ { register int i; /* loop index */ register int s; /* success flag on pattern inputs */ register int slength, rlength; /* length of search and replace strings */ register int numsub; /* number of substitutions */ register int nummatch; /* number of found matches */ int nlflag; /* last char of search string a ? */ int nlrepl; /* was a replace done on the last line? */ char tmpc; /* temporary character */ char c; /* input char for query */ char tpat[NPAT]; /* temporary to hold search pattern */ LINE *origline; /* original "." position */ int origoff; /* and offset (for . query option) */ if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ /* check for negative repititions */ if (f && n < 0) return(FALSE); /* ask the user for the text of a pattern */ if ((s = readpattern( (kind == FALSE ? "Replace" : "Query replace"))) != TRUE) return(s); Strcpy(&tpat[0], &pat[0]); /* salt it away */ /* ask for the replacement string */ Strcpy(&pat[0], &rpat[0]); /* set up default string */ if ((s = readpattern("with")) == ABORT) return(s); /* move everything to the right place and length them */ Strcpy(&rpat[0], &pat[0]); Strcpy(&pat[0], &tpat[0]); slength = strlen(&pat[0]); rlength = strlen(&rpat[0]); /* set up flags so we can make sure not to do a recursive replace on the last line */ nlflag = (pat[slength - 1] == '\n'); nlrepl = FALSE; /* build query replace question string */ Strcpy(tpat, "Replace '"); IGNORE(expandp(&pat[0], &tpat[strlen(tpat)], NPAT/3)); Strcat(tpat, "' with '"); IGNORE(expandp(&rpat[0], &tpat[strlen(tpat)], NPAT/3)); Strcat(tpat, "'? "); /* save original . position */ origline = curwp->w_dotp; origoff = curwp->w_doto; /* scan through the file */ numsub = 0; nummatch = 0; while ((f == FALSE || n > nummatch) && (nlflag == FALSE || nlrepl == FALSE)) { /* search for the pattern */ if (forscan(&pat[0],PTBEG) != TRUE) break; /* all done */ ++nummatch; /* increment # of matches */ /* check if we are on the last line */ nlrepl = (lforw(curwp->w_dotp) == curwp->w_bufp->b_linep); /* check for query */ if (kind) { /* get the query */ mlwrite(&tpat[0], &pat[0], &rpat[0]); qprompt: update(); /* show the proposed place to change */ c = (*term.t_getchar)(); /* and input */ mlwrite(""); /* and clear it */ /* and respond appropriately */ switch (c) { case 'y': /* yes, substitute */ case ' ': break; case 'n': /* no, onword */ IGNORE(forwchar(FALSE, 1)); continue; case '!': /* yes/stop asking */ kind = FALSE; break; case '.': /* abort! and return */ /* restore old position */ curwp->w_dotp = origline; curwp->w_doto = origoff; curwp->w_flag |= WFMOVE; case BELL: /* abort! and stay */ mlwrite("Aborted!"); return(FALSE); default: /* bitch and beep */ (*term.t_beep)(); case '?': /* help me */ mlwrite("(Y)es, (N)o, (!)Do the rest, (^G)Abort, (.)Abort back, (?)Help: "); goto qprompt; } } /* delete the sucker */ if (ldelete(slength, FALSE) != TRUE) { /* error while deleting */ mlwrite("ERROR while deleteing"); return(FALSE); } /* and insert its replacement */ for (i=0; i */ char *patrn; /* string to scan for */ int leavep; /* place to leave point PTBEG = begining of match PTEND = at end of match */ { register LINE *curline; /* current line during scan */ register int curoff; /* position within current line */ register LINE *lastline; /* last line position during scan */ register int lastoff; /* position within last line */ register int c; /* character at current position */ register LINE *matchline; /* current line during matching */ register int matchoff; /* position in matching line */ register char *patptr; /* pointer into pattern */ /* setup local scan pointers to global "." */ curline = curwp->w_dotp; curoff = curwp->w_doto; /* scan each character until we hit the head link record */ while (curline != curbp->b_linep) { /* save the current position in case we need to restore it on a match */ lastline = curline; lastoff = curoff; /* get the current character resolving EOLs */ if (curoff == llength(curline)) { /* if at EOL */ curline = lforw(curline); /* skip to next line */ curoff = 0; c = '\n'; /* and return a */ } else c = lgetc(curline, curoff++); /* get the char */ /* test it against first char in pattern */ if (eq(c, patrn[0]) != FALSE) { /* if we find it..*/ /* setup match pointers */ matchline = curline; matchoff = curoff; patptr = &patrn[0]; /* scan through patrn for a match */ while (*++patptr != 0) { /* advance all the pointers */ if (matchoff == llength(matchline)) { /* advance past EOL */ matchline = lforw(matchline); matchoff = 0; c = '\n'; } else c = lgetc(matchline, matchoff++); /* and test it against the pattern */ if (eq(*patptr, c) == FALSE) goto fail; } /* A SUCCESSFULL MATCH!!! */ /* reset the global "." pointers */ if (leavep == PTEND) { /* at end of string */ curwp->w_dotp = matchline; curwp->w_doto = matchoff; } else { /* at begining of string */ curwp->w_dotp = lastline; curwp->w_doto = lastoff; } curwp->w_flag |= WFMOVE; /* flag that we have moved */ return(TRUE); } fail:; /* continue to search */ } /* we could not find a match */ return(FALSE); } /* expandp: expand control key sequences for output */ int expandp(srcstr, deststr, maxlength) char *srcstr; /* string to expand */ char *deststr; /* destination of expanded string */ int maxlength; /* maximum chars in destination */ { char c; /* current char to translate */ /* scan through the string */ while ((c = *srcstr++) != 0) { if (c == '\n') { /* its an EOL */ *deststr++ = '<'; *deststr++ = 'N'; *deststr++ = 'L'; *deststr++ = '>'; maxlength -= 4; } else if (c < 0x20 || c == 0x7f) { /* control character */ *deststr++ = '^'; *deststr++ = c ^ 0x40; maxlength -= 2; } else if (c == '%') { *deststr++ = '%'; *deststr++ = '%'; maxlength -= 2; } else { /* any other character */ *deststr++ = c; maxlength--; } /* check for maxlength */ if (maxlength < 4) { *deststr++ = '$'; *deststr = '\0'; return(FALSE); } } *deststr = '\0'; return(TRUE); } neuron-7.5/src/memacs/spawn.c000077500000000000000000000220441323325274500162360ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/spawn.c,v 1.2 1995/04/03 13:56:50 hines Exp */ /* spawn.c,v * Revision 1.2 1995/04/03 13:56:50 hines * Port to MSWindows * * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.6 92/08/12 08:24:13 hines * saber free except for ARGSUSED which should be suppressed everywhere * * Revision 1.5 92/08/12 08:16:49 hines * sejnowski changes to allow compiling on ncube using EXPRESS c libraries. * it allows compilation of neuron but doesn't actually work. * * Revision 1.4 89/07/10 11:04:20 mlh * lint free * * * Revision 1.3 89/07/10 10:26:03 mlh * LINT free * * Revision 1.2 89/07/09 12:19:09 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:37:05 mlh * Initial revision * */ /* * The routines in this file are called to create a subjob running a command * interpreter. This code is a big fat nothing on CP/M-86. You lose. */ #include #include #include "estruct.h" #include "edef.h" #undef IGNORE #define IGNORE(arg) if (arg) {;} #if AMIGA #define NEW 1006 #endif #if VMS #define EFN 0 /* Event flag. */ #include /* Random headers. */ #include #include #include extern int oldmode[]; /* In "termio.c" */ extern int newmode[]; /* In "termio.c" */ extern short iochan; /* In "termio.c" */ #endif #if MSDOS & LATTICE #include #undef CPM #endif #if MSDOS & MSC #include #include #endif #if V7 #if EXPRESS #define SIGTSTP 18 #else #include #endif extern int vttidy(); #endif /* * Create a subjob with a copy of the command intrepreter in it. When the * command interpreter exits, mark the screen as garbage so that you do a full * repaint. Bound to "^X C". The message at the start in VMS puts out a newline. * Under some (unknown) condition, you don't get one free when DCL starts up. */ int spawncli(f, n) int f, n; { #if AMIGA long newcli; newcli = Open("CON:1/1/639/199/MicroEmacs Subprocess", NEW); mlwrite("[Starting new CLI]"); sgarbf = TRUE; Execute("", newcli, 0); Close(newcli); return(TRUE); #endif #if V7 register char *cp; char *getenv(); #endif #if VMS movecursor(term.t_nrow, 0); /* In last line. */ mlputs("[Starting DCL]\r\n"); (*term.t_flush)(); /* Ignore "ttcol". */ sgarbf = TRUE; return (sys(NULL)); /* NULL => DCL. */ #endif #if CPM mlwrite("Not in CP/M-86"); #endif #if MSDOS & MSC movecursor(term.t_nrow, 0); /* Seek to last line. */ (*term.t_flush)(); spawnlp(P_WAIT,"command",NULL); sgarbf = TRUE; return(TRUE); #endif #if MSDOS & AZTEC movecursor(term.t_nrow, 0); /* Seek to last line. */ (*term.t_flush)(); #if defined(_Windows) && !defined(WIN32) #else IGNORE(system("command.com")); #endif sgarbf = TRUE; return(TRUE); #endif #if MSDOS & LATTICE movecursor(term.t_nrow, 0); /* Seek to last line. */ (*term.t_flush)(); sys("\\command.com", ""); /* Run CLI. */ sgarbf = TRUE; return(TRUE); #endif LINTUSE(f) LINTUSE(n) #if V7 movecursor(term.t_nrow, 0); /* Seek to last line. */ (*term.t_flush)(); ttclose(); /* stty to old settings */ if ((cp = getenv("SHELL")) != NULL && *cp != '\0') {IGNORE(system(cp));} else #if BSD {IGNORE(system("exec /bin/csh"));} #else {IGNORE(system("exec /bin/sh"));} #endif sgarbf = TRUE; #if !defined(__MINGW32__) sleep(2); #endif ttopen(); return(TRUE); #endif } #if V7 & BSD int bktoshell() /* suspend MicroEMACS and wait to wake up */ { int pid; vttidy(); pid = getpid(); IGNORE(kill(pid,SIGTSTP)); return 0; } int rtfrmshell() { ttopen(); curwp->w_flag = WFHARD; IGNORE(refresh(TRUE, 0)); return 0; } #endif /* * Run a one-liner in a subjob. When the command returns, wait for a single * character to be typed, then mark the screen as garbage so a full repaint is * done. Bound to "C-X !". */ int spawn(f, n) int f, n; { register int s; char line[NLINE]; LINTUSE(f) LINTUSE(n) #if AMIGA long newcli; newcli = Open("CON:1/1/639/199/MicroEmacs Subprocess", NEW); if ((s=mlreply("CLI command: ", line, NLINE)) != TRUE) return (s); Execute(line,0,newcli); Close(newcli); (*term.t_getchar)(); /* Pause. */ sgarbf = TRUE; return(TRUE); #endif #if VMS if ((s=mlreply("DCL command: ", line, NLINE)) != TRUE) return (s); (*term.t_putchar)('\n'); /* Already have '\r' */ (*term.t_flush)(); s = sys(line); /* Run the command. */ mlputs("\r\n\n[End]"); /* Pause. */ (*term.t_flush)(); (*term.t_getchar)(); sgarbf = TRUE; return (s); #endif #if CPM mlwrite("Not in CP/M-86"); return (FALSE); #endif #if MSDOS if ((s=mlreply("MS-DOS command: ", line, NLINE)) != TRUE) return (s); #if MSC spawnlp(P_WAIT,line,NULL); #else #if defined(_Windows) && !defined(WIN32) #else {IGNORE(system(line));} #endif #endif mlputs("\r\n\n[End]"); /* Pause. */ (*term.t_getchar)(); /* Pause. */ sgarbf = TRUE; return (TRUE); #endif #if V7 if ((s=mlreply("! ", line, NLINE)) != TRUE) return (s); (*term.t_putchar)('\n'); /* Already have '\r' */ (*term.t_flush)(); ttclose(); /* stty to old modes */ IGNORE(system(line)); #if !defined(__MINGW32__) sleep(2); #endif ttopen(); mlputs("[End]"); /* Pause. */ (*term.t_flush)(); while ((s = (*term.t_getchar)()) != '\r' && s != ' ') /*EMPTY*/ ; sgarbf = TRUE; return (TRUE); #endif } #if VMS /* * Run a command. The "cmd" is a pointer to a command string, or NULL if you * want to run a copy of DCL in the subjob (this is how the standard routine * LIB$SPAWN works. You have to do wierd stuff with the terminal on the way in * and the way out, because DCL does not want the channel to be in raw mode. */ int sys(cmd) register char *cmd; { struct dsc$descriptor cdsc; struct dsc$descriptor *cdscp; long status; long substatus; long iosb[2]; status = SYS$QIOW(EFN, iochan, IO$_SETMODE, iosb, 0, 0, oldmode, sizeof(oldmode), 0, 0, 0, 0); if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL) return (FALSE); cdscp = NULL; /* Assume DCL. */ if (cmd != NULL) { /* Build descriptor. */ cdsc.dsc$a_pointer = cmd; cdsc.dsc$w_length = strlen(cmd); cdsc.dsc$b_dtype = DSC$K_DTYPE_T; cdsc.dsc$b_class = DSC$K_CLASS_S; cdscp = &cdsc; } status = LIB$SPAWN(cdscp, 0, 0, 0, 0, 0, &substatus, 0, 0, 0); if (status != SS$_NORMAL) substatus = status; status = SYS$QIOW(EFN, iochan, IO$_SETMODE, iosb, 0, 0, newmode, sizeof(newmode), 0, 0, 0, 0); if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL) return (FALSE); if ((substatus&STS$M_SUCCESS) == 0) /* Command failed. */ return (FALSE); return (TRUE); } #endif #if ~AZTEC & ~MSC & MSDOS /* * This routine, once again by Bob McNamara, is a C translation of the "system" * routine in the MWC-86 run time library. It differs from the "system" routine * in that it does not unconditionally append the string ".exe" to the end of * the command name. We needed to do this because we want to be able to spawn * off "command.com". We really do not understand what it does, but if you don't * do it exactly "malloc" starts doing very very strange things. */ int sys(cmd, tail) char *cmd; char *tail; { #if MWC_86 register unsigned n; extern char *__end; n = __end + 15; n >>= 4; n = ((n + dsreg() + 16) & 0xFFF0) + 16; return(execall(cmd, tail, n)); #endif #if LATTICE return forklp(cmd, tail, NULL); #endif #if MSC return spawnlp(P_WAIT, cmd, tail, NULL); #endif } #endif neuron-7.5/src/memacs/tcap.c000077500000000000000000000067071323325274500160450ustar00rootroot00000000000000#include <../../nrnconf.h> /*LINTLIBRARY*/ /* /local/src/master/nrn/src/memacs/tcap.c,v 1.1.1.1 1994/10/12 17:21:25 hines Exp */ /* tcap.c,v * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.2 89/07/10 10:26:06 mlh * LINT free * * Revision 1.1 89/07/08 15:37:09 mlh * Initial revision * */ /* tcap: Unix V5, V7 and BS4.2 Termcap video driver for MicroEMACS */ #define termdef 1 /* don't define "term" external */ #include #include "estruct.h" #include "edef.h" #if TERMCAP #define NROW 24 #define NCOL 80 #define MARGIN 8 #define SCRSIZ 64 #define BEL 0x07 #define ESC 0x1B extern int tgetnum(); extern int tgetent(); extern int tputs(); static int putpad(); static int putnpad(); extern int ttopen(); extern int ttgetc(); extern int ttputc(); extern int ttflush(); extern int ttclose(); extern int tcapmove(); extern int tcapeeol(); extern int tcapeeop(); extern int tcapbeep(); extern int tcaprev(); extern int tcapopen(); extern int tput(); extern char *tgoto(); #define TCAPSLEN 315 char tcapbuf[TCAPSLEN]; static char *UP, PC, *CM, *CE, *CL, *SO, *SE; static int LI, CO; /*mlh short ospeed;*/ TERM term = { NROW-1, NCOL, MARGIN, SCRSIZ, tcapopen, ttclose, ttgetc, ttputc, ttflush, tcapmove, tcapeeol, tcapeeop, tcapbeep, tcaprev }; int tcapopen() { char *getenv(); char *t, *p, *tgetstr(); char tcbuf[1024]; char *tv_stype; char err_str[72]; if ((tv_stype = getenv("TERM")) == NULL) { puts("Environment variable TERM not defined!"); exit(1); } if((tgetent(tcbuf, tv_stype)) != 1) { Sprintf(err_str, "Unknown terminal type %s!", tv_stype); puts(err_str); exit(1); } p = tcapbuf; t = tgetstr("pc", &p); if(t) PC = *t; CL = tgetstr("cl", &p); CM = tgetstr("cm", &p); CE = tgetstr("ce", &p); UP = tgetstr("up", &p); SE = tgetstr("se", &p); SO = tgetstr("so", &p); if ((CO=tgetnum("co")) != -1) term.t_ncol = CO; if ((LI=tgetnum("li")) != -1) term.t_nrow = LI-1; if (SO != NULL) revexist = TRUE; if(CL == NULL || CM == NULL || UP == NULL) { puts("Incomplete termcap entry\n"); exit(1); } if (CE == NULL) /* will we be able to use clear to EOL? */ eolexist = FALSE; if (p >= &tcapbuf[TCAPSLEN]) { puts("Terminal description too big!\n"); exit(1); } ttopen(); return 0; } int tcapmove(row, col) register int row, col; { putpad(tgoto(CM, col, row)); return 0; } int tcapeeol() { putpad(CE); return 0; } int tcapeeop() { putpad(CL); return 0; } int tcaprev(state) /* change reverse video status */ int state; /* FALSE = normal video, TRUE = reverse video */ { if (state) { if (SO != NULL) putpad(SO); } else { if (SE != NULL) putpad(SE); } return 0; } int tcapbeep() { ttputc(BEL); return 0; } static int putpad(str) char *str; { tputs(str, 1, ttputc); return 0; } static int putnpad(str, n) char *str; int n; { tputs(str, n, ttputc); return 0; } #else int hello() { return 0; } #endif /*TERMCAP*/ neuron-7.5/src/memacs/termio.c000077500000000000000000000344551323325274500164160ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/termio.c,v 1.1.1.1 1994/10/12 17:21:25 hines Exp */ /* termio.c,v * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.7 1993/11/04 15:54:28 hines * port to solaris2 (no more warnings) * * Revision 1.6 1993/02/15 08:47:06 hines * linux * * Revision 1.5 92/08/12 08:16:51 hines * sejnowski changes to allow compiling on ncube using EXPRESS c libraries. * it allows compilation of neuron but doesn't actually work. * * Revision 1.4 92/02/21 14:39:30 hines * Calls InterViews event loop before blocking on input when * termio.c compiled with -DINTERVIEWS=1 * * Revision 1.3 89/07/10 11:04:35 mlh * lint free * * * Revision 1.2 89/07/10 10:26:09 mlh * LINT free * * Revision 1.1 89/07/08 15:37:16 mlh * Initial revision * */ /* * The functions in this file negotiate with the operating system for * characters, and write characters in a barely buffered fashion on the display. * All operating systems. */ #include #include "estruct.h" /* termios.h will sometimes define CTRL and we want to avoid macro redefined warning */ #undef CTRL #include "edef.h" #if AMIGA #define NEW 1006 #define AMG_MAXBUF 1024 static long terminal; static char scrn_tmp[AMG_MAXBUF+1]; static int scrn_tmp_p = 0; #endif #if VMS #include #include #include #include #include #define NIBUF 128 /* Input buffer size */ #define NOBUF 1024 /* MM says bug buffers win! */ #define EFN 0 /* Event flag */ char obuf[NOBUF]; /* Output buffer */ int nobuf; /* # of bytes in above */ char ibuf[NIBUF]; /* Input buffer */ int nibuf; /* # of bytes in above */ int ibufi; /* Read index */ int oldmode[2]; /* Old TTY mode bits */ int newmode[2]; /* New TTY mode bits */ short iochan; /* TTY I/O channel */ #endif #if CPM #include #endif #if MSDOS & (LATTICE | MSC) #undef LATTICE #undef CPM #include #undef CPM union REGS rg; /* cpu register for use of DOS calls */ int nxtchar = -1; /* character held from type ahead */ #endif #if MSDOS & AZTEC struct regs { /* cpu register for use of DOS calls */ int ax, bx, cx, dx, si, di, ds, es; } rg; int nxtchar = -1; /* character held from type ahead */ #endif #if RAINBOW #include "rainbow.h" #endif #if V7 && !defined(__MINGW32__) && !HAVE_TERMIO_H /* (SYSV == 0) & (LINUX == 0)*/ #undef CTRL #include /* for stty/gtty functions */ #include struct sgttyb ostate; /* saved tty state */ struct sgttyb nstate; /* values for editor mode */ struct tchars otchars; /* Saved terminal special character set */ struct tchars ntchars = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /* A lot of nothing */ #ifndef HAVE_STTY /* os x 4 and gcc 4.0.0 do define this */ #if !defined(stty) #define stty(a,b) ioctl(a,TIOCSETP,b) #define gtty(a,b) ioctl(a,TIOCGETP,b) #endif #endif #if BSD #include /* to get at the typeahead */ extern int rtfrmshell(); /* return from suspended shell */ #define TBUFSIZ 128 /*mlh char tobuf[TBUFSIZ];*/ /* terminal output buffer */ #endif #endif #ifdef HAVE_TERMIO_H /* #if SYSV | LINUX*/ #include struct termio ostate; /* saved tty state */ struct termio nstate; /* new tty state */ #endif #if EXPRESS /* ioctl erroneously defined in /express/include/sys/expname.h */ #undef ioctl #endif /* * This function is called once to set up the terminal device streams. * On VMS, it translates TT until it finds the terminal, then assigns * a channel to it and sets it raw. On CPM it is a no-op. */ int ttopen() { #if AMIGA terminal = Open("RAW:1/1/639/199/MicroEMACS 3.6/Amiga", NEW); #endif #if VMS struct dsc$descriptor idsc; struct dsc$descriptor odsc; char oname[40]; int iosb[2]; int status; odsc.dsc$a_pointer = "TT"; odsc.dsc$w_length = strlen(odsc.dsc$a_pointer); odsc.dsc$b_dtype = DSC$K_DTYPE_T; odsc.dsc$b_class = DSC$K_CLASS_S; idsc.dsc$b_dtype = DSC$K_DTYPE_T; idsc.dsc$b_class = DSC$K_CLASS_S; do { idsc.dsc$a_pointer = odsc.dsc$a_pointer; idsc.dsc$w_length = odsc.dsc$w_length; odsc.dsc$a_pointer = &oname[0]; odsc.dsc$w_length = sizeof(oname); status = LIB$SYS_TRNLOG(&idsc, &odsc.dsc$w_length, &odsc); if (status!=SS$_NORMAL && status!=SS$_NOTRAN) exit(status); if (oname[0] == 0x1B) { odsc.dsc$a_pointer += 4; odsc.dsc$w_length -= 4; } } while (status == SS$_NORMAL); status = SYS$ASSIGN(&odsc, &iochan, 0, 0); if (status != SS$_NORMAL) exit(status); status = SYS$QIOW(EFN, iochan, IO$_SENSEMODE, iosb, 0, 0, oldmode, sizeof(oldmode), 0, 0, 0, 0); if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL) exit(status); newmode[0] = oldmode[0]; newmode[1] = oldmode[1] | TT$M_PASSALL | TT$M_NOECHO; status = SYS$QIOW(EFN, iochan, IO$_SETMODE, iosb, 0, 0, newmode, sizeof(newmode), 0, 0, 0, 0); if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL) exit(status); #endif #if CPM #endif #if MSDOS & (HP150 == 0) & (LATTICE | MSC) /* kill the ctrl-break interupt */ rg.h.ah = 0x33; /* control-break check dos call */ rg.h.al = 1; /* set the current state */ rg.h.dl = 0; /* set it OFF */ intdos(&rg, &rg); /* go for it! */ #endif #if V7 & !defined(__MINGW32__) & !HAVE_TERMIO_H /* (SYSV == 0) & (LINUX == 0)*/ IGNORE(gtty(0, &ostate)); /* save old state */ IGNORE(gtty(0, &nstate)); /* get base of new state */ nstate.sg_flags |= RAW; nstate.sg_flags &= ~(ECHO|CRMOD); /* no echo for now... */ IGNORE(stty(0, &nstate)); /* set mode */ IGNORE(ioctl(0, TIOCGETC, &otchars)); /* Save old characters */ IGNORE(ioctl(0, TIOCSETC, &ntchars)); /* Place new character into K */ #if BSD /* provide a smaller terminal output buffer so that the type ahead detection works better (more often) */ /* setbuffer(stdout, &tobuf[0], TBUFSIZ);*/ IGNORE(signal(SIGTSTP,SIG_DFL)); /* set signals so that we can */ IGNORE(signal(SIGCONT,rtfrmshell)); /* suspend & restart emacs */ #endif #endif #if HAVE_TERMIO_H /* SYSV | LINUX*/ IGNORE(ioctl(0, TCGETA, &ostate)); /* snarf copy of old state */ IGNORE(ioctl(0, TCGETA, &nstate)); /* and another to hack on */ nstate.c_iflag &= ~(BRKINT | INPCK | IXON | IXOFF | IXANY); nstate.c_lflag &= ~(ISIG | ICANON | ECHO); nstate.c_cc[4]=1; nstate.c_cc[5]=1; IGNORE(ioctl(0, TCSETA, &nstate)); #endif return 0; } /* * This function gets called just before we go back home to the command * interpreter. On VMS it puts the terminal back in a reasonable state. * Another no-operation on CPM. */ int ttclose(void) { #if AMIGA amg_flush(); Close(terminal); #endif #if VMS int status; int iosb[1]; ttflush(); status = SYS$QIOW(EFN, iochan, IO$_SETMODE, iosb, 0, 0, oldmode, sizeof(oldmode), 0, 0, 0, 0); if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL) exit(status); status = SYS$DASSGN(iochan); if (status != SS$_NORMAL) exit(status); #endif #if CPM #endif #if MSDOS & (HP150 == 0) & (LATTICE | MSC) /* restore the ctrl-break interupt */ rg.h.ah = 0x33; /* control-break check dos call */ rg.h.al = 1; /* set the current state */ rg.h.dl = 1; /* set it ON */ intdos(&rg, &rg); /* go for it! */ #endif #if V7 && !defined(__MINGW32__) && !HAVE_TERMIO_H /* (SYSV == 0) & (LINUX == 0)*/ IGNORE(stty(0, &ostate)); IGNORE(ioctl(0, TIOCSETC, &otchars)); /* Place old character into K */ #endif #if HAVE_TERMIO_H /* SYSV | LINUX */ IGNORE(ioctl(0, TCSETA, &ostate)); #endif return 0; } /* * Write a character to the display. On VMS, terminal output is buffered, and * we just put the characters in the big array, after checking for overflow. * On CPM terminal I/O unbuffered, so we just write the byte out. Ditto on * MS-DOS (use the very very raw console output routine). */ int ttputc(char c) { #if AMIGA scrn_tmp[scrn_tmp_p++] = c; if(scrn_tmp_p>=AMG_MAXBUF) amg_flush(); #endif #if VMS if (nobuf >= NOBUF) ttflush(); obuf[nobuf++] = c; #endif #if CPM bios(BCONOUT, c, 0); #endif #if MSDOS & MWC86 dosb(CONDIO, c, 0); #endif #if MSDOS & (LATTICE | MSC) bdos(6, c, 0); #endif #if MSDOS & AZTEC bdos(6, c, 0); #endif #if RAINBOW Put_Char(c); /* fast video */ #endif #if V7 IGNORE(fputc(c, stdout)); #endif return 0; } #if AMIGA int amg_flush(void) { if(scrn_tmp_p) Write(terminal,scrn_tmp,scrn_tmp_p); scrn_tmp_p = 0; return 0; } #endif /* * Flush terminal buffer. Does real work where the terminal output is buffered * up. A no-operation on systems where byte at a time terminal I/O is done. */ int ttflush(void) { #if AMIGA amg_flush(); #endif #if VMS int status; int iosb[2]; status = SS$_NORMAL; if (nobuf != 0) { status = SYS$QIOW(EFN, iochan, IO$_WRITELBLK|IO$M_NOFORMAT, iosb, 0, 0, obuf, nobuf, 0, 0, 0, 0); if (status == SS$_NORMAL) status = iosb[0] & 0xFFFF; nobuf = 0; } return (status); #endif #if CPM #endif #if MSDOS #endif #if V7 IGNORE(fflush(stdout)); #endif return 0; } /* * Read a character from the terminal, performing no editing and doing no echo * at all. More complex in VMS that almost anyplace else, which figures. Very * simple on CPM, because the system can do exactly what you want. */ int ttgetc(void) { #if AMIGA char ch; amg_flush(); Read(terminal, &ch, 1); return(255 & (int)ch); #endif #if VMS int status; int iosb[2]; int term[2]; while (ibufi >= nibuf) { ibufi = 0; term[0] = 0; term[1] = 0; status = SYS$QIOW(EFN, iochan, IO$_READLBLK|IO$M_TIMED, iosb, 0, 0, ibuf, NIBUF, 0, term, 0, 0); if (status != SS$_NORMAL) exit(status); status = iosb[0] & 0xFFFF; if (status!=SS$_NORMAL && status!=SS$_TIMEOUT) exit(status); nibuf = (iosb[0]>>16) + (iosb[1]>>16); if (nibuf == 0) { status = SYS$QIOW(EFN, iochan, IO$_READLBLK, iosb, 0, 0, ibuf, 1, 0, term, 0, 0); if (status != SS$_NORMAL || (status = (iosb[0]&0xFFFF)) != SS$_NORMAL) exit(status); nibuf = (iosb[0]>>16) + (iosb[1]>>16); } } return (ibuf[ibufi++] & 0xFF); /* Allow multinational */ #endif #if CPM return (biosb(BCONIN, 0, 0)); #endif #if RAINBOW int Ch; while ((Ch = Read_Keyboard()) < 0); if ((Ch & Function_Key) == 0) if (!((Ch & 0xFF) == 015 || (Ch & 0xFF) == 0177)) Ch &= 0xFF; return Ch; #endif #if MSDOS & MWC86 return (dosb(CONRAW, 0, 0)); #endif #if MSDOS & (LATTICE | MSC) int c; /* character read */ int flags; /* cpu flags after dos call */ /* if a char already is ready, return it */ if (nxtchar >= 0) { c = nxtchar; nxtchar = -1; return(c); } /* call the dos to get a char */ rg.h.ah = 7; /* dos Direct Console I/O call */ intdos(&rg, &rg); c = rg.h.al; /* grab the char */ return(c & 255); #endif #if MSDOS & AZTEC int c; /* character read */ int flags; /* cpu flags after dos call */ /* if a char already is ready, return it */ if (nxtchar >= 0) { c = nxtchar; nxtchar = -1; return(c); } /* call the dos to get a char until one is there */ flags = 255; while ((flags & 64) != 0) { /* while we don't yet have a char */ rg.ax = 1536; /* dos Direct Console I/O call */ rg.dx = 255; /* console input */ flags = sysint(33, &rg, &rg); c = rg.ax & 255; /* grab the char */ } return(c); #endif #if V7 #if INTERVIEWS {extern int hoc_interviews; int run_til_stdin(); if (hoc_interviews) { run_til_stdin(); } } #endif /*INTERVIEWS*/ #if 0 && defined(__MINGW32__) return getch(); #else return(127 & fgetc(stdin)); #endif #endif } #if TYPEAH /* typahead: Check to see if any characters are already in the keyboard buffer */ int typahead(void) { #if MSDOS int c; /* character read */ int flags; /* cpu flags from dos call */ #if MSC if (kbhit() != 0) return(TRUE); else return(FALSE); #endif #if LATTICE if (nxtchar >= 0) return(TRUE); rg.h.ah = 6; /* Direct Console I/O call */ rg.h.dl = 255; /* does console input */ flags = intdos(&rg, &rg); c = rg.h.al; /* grab the character */ /* no character pending */ if ((flags & 64) != 0) return(FALSE); /* save the character and return true */ nxtchar = c; return(TRUE); #endif #if AZTEC if (nxtchar >= 0) return(TRUE); rg.ax = 1536; /* Direct Console I/O call */ rg.dx = 255; /* does console input */ flags = sysint(33, &rg, &rg); c = rg.ax & 255; /* grab the character */ /* no character pending */ if ((flags & 64) != 0) return(FALSE); /* save the character and return true */ nxtchar = c; return(TRUE); #endif #endif #if V7 & BSD int x; /* holds # of pending chars */ return((ioctl(0,FIONREAD,&x) < 0) ? 0 : x); #endif return(FALSE); } #endif neuron-7.5/src/memacs/window.c000077500000000000000000000311341323325274500164150ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/window.c,v 1.1.1.1 1994/10/12 17:21:25 hines Exp */ /* window.c,v * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.4 91/08/22 12:33:50 hines * works with turboc * * Revision 1.3 89/07/10 10:26:12 mlh * LINT free * * Revision 1.2 89/07/09 12:19:13 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:37:29 mlh * Initial revision * */ /* * Window management. Some of the functions are internal, and some are * attached to keys that the user actually types. */ #include #include "estruct.h" #include "edef.h" /* * Reposition dot in the current window to line "n". If the argument is * positive, it is that line. If it is negative it is that line from the * bottom. If it is 0 the window is centered (this is what the standard * redisplay code does). With no argument it defaults to 1. Bound to M-!. * Because of the default, it works like in Gosling. */ int reposition(f, n) int f, n; { if (f == FALSE) /* default to 0 to center screen */ n = 0; curwp->w_force = n; curwp->w_flag |= WFFORCE; return (TRUE); } /* * Refresh the screen. With no argument, it just does the refresh. With an * argument it recenters "." in the current window. Bound to "C-L". */ int refresh(f, n) int f, n; { LINTUSE(n) if (f == FALSE) sgarbf = TRUE; else { curwp->w_force = 0; /* Center dot. */ curwp->w_flag |= WFFORCE; } return (TRUE); } /* * The command make the next window (next => down the screen) the current * window. There are no real errors, although the command does nothing if * there is only 1 window on the screen. Bound to "C-X C-N". */ int nextwind(f, n) int f, n; { register WINDOW *wp; LINTUSE(f) LINTUSE(n) if ((wp = curwp->w_wndp) == NULL) wp = wheadp; curwp = wp; curbp = wp->w_bufp; upmode(); return (TRUE); } /* * This command makes the previous window (previous => up the screen) the * current window. There arn't any errors, although the command does not do a * lot if there is 1 window. */ int prevwind(f, n) int f, n; { register WINDOW *wp1; register WINDOW *wp2; LINTUSE(f) LINTUSE(n) wp1 = wheadp; wp2 = curwp; if (wp1 == wp2) wp2 = NULL; while (wp1->w_wndp != wp2) wp1 = wp1->w_wndp; curwp = wp1; curbp = wp1->w_bufp; upmode(); return (TRUE); } /* * This command moves the current window down by "arg" lines. Recompute the * top line in the window. The move up and move down code is almost completely * the same; most of the work has to do with reframing the window, and picking * a new dot. We share the code by having "move down" just be an interface to * "move up". Magic. Bound to "C-X C-N". */ int mvdnwind(f, n) int f, n; { return (mvupwind(f, -n)); } /* * Move the current window up by "arg" lines. Recompute the new top line of * the window. Look to see if "." is still on the screen. If it is, you win. * If it isn't, then move "." to center it in the new framing of the window * (this command does not really move "."; it moves the frame). Bound to * "C-X C-P". */ int mvupwind(f, n) int f, n; { register LINE *lp; register int i; LINTUSE(f) lp = curwp->w_linep; if (n < 0) { while (n++ && lp!=curbp->b_linep) lp = lforw(lp); } else { while (n-- && lback(lp)!=curbp->b_linep) lp = lback(lp); } curwp->w_linep = lp; curwp->w_flag |= WFHARD; /* Mode line is OK. */ for (i = 0; i < curwp->w_ntrows; ++i) { if (lp == curwp->w_dotp) return (TRUE); if (lp == curbp->b_linep) break; lp = lforw(lp); } lp = curwp->w_linep; i = curwp->w_ntrows/2; while (i-- && lp != curbp->b_linep) lp = lforw(lp); curwp->w_dotp = lp; curwp->w_doto = 0; return (TRUE); } /* * This command makes the current window the only window on the screen. Bound * to "C-X 1". Try to set the framing so that "." does not have to move on the * display. Some care has to be taken to keep the values of dot and mark in * the buffer structures right if the distruction of a window makes a buffer * become undisplayed. */ int onlywind(f, n) int f, n; { register WINDOW *wp; register LINE *lp; register int i; LINTUSE(f) LINTUSE(n) while (wheadp != curwp) { wp = wheadp; wheadp = wp->w_wndp; if (--wp->w_bufp->b_nwnd == 0) { wp->w_bufp->b_dotp = wp->w_dotp; wp->w_bufp->b_doto = wp->w_doto; wp->w_bufp->b_markp = wp->w_markp; wp->w_bufp->b_marko = wp->w_marko; } free((char *) wp); } while (curwp->w_wndp != NULL) { wp = curwp->w_wndp; curwp->w_wndp = wp->w_wndp; if (--wp->w_bufp->b_nwnd == 0) { wp->w_bufp->b_dotp = wp->w_dotp; wp->w_bufp->b_doto = wp->w_doto; wp->w_bufp->b_markp = wp->w_markp; wp->w_bufp->b_marko = wp->w_marko; } free((char *) wp); } lp = curwp->w_linep; i = curwp->w_toprow; while (i!=0 && lback(lp)!=curbp->b_linep) { --i; lp = lback(lp); } curwp->w_toprow = 0; curwp->w_ntrows = term.t_nrow-1; curwp->w_linep = lp; curwp->w_flag |= WFMODE|WFHARD; return (TRUE); } /* * Split the current window. A window smaller than 3 lines cannot be split. * The only other error that is possible is a "malloc" failure allocating the * structure for the new window. Bound to "C-X 2". */ int splitwind(f, n) int f, n; { register WINDOW *wp; register LINE *lp; register int ntru; register int ntrl; register int ntrd; register WINDOW *wp1; register WINDOW *wp2; LINTUSE(f) LINTUSE(n) if (curwp->w_ntrows < 3) { mlwrite("Cannot split a %d line window", curwp->w_ntrows); return (FALSE); } if ((wp = (WINDOW *) malloc(sizeof(WINDOW))) == NULL) { mlwrite("Cannot allocate WINDOW block"); return (FALSE); } ++curbp->b_nwnd; /* Displayed twice. */ wp->w_bufp = curbp; wp->w_dotp = curwp->w_dotp; wp->w_doto = curwp->w_doto; wp->w_markp = curwp->w_markp; wp->w_marko = curwp->w_marko; wp->w_flag = 0; wp->w_force = 0; ntru = (curwp->w_ntrows-1) / 2; /* Upper size */ ntrl = (curwp->w_ntrows-1) - ntru; /* Lower size */ lp = curwp->w_linep; ntrd = 0; while (lp != curwp->w_dotp) { ++ntrd; lp = lforw(lp); } lp = curwp->w_linep; if (ntrd <= ntru) { /* Old is upper window. */ if (ntrd == ntru) /* Hit mode line. */ lp = lforw(lp); curwp->w_ntrows = ntru; wp->w_wndp = curwp->w_wndp; curwp->w_wndp = wp; wp->w_toprow = curwp->w_toprow+ntru+1; wp->w_ntrows = ntrl; } else { /* Old is lower window */ wp1 = NULL; wp2 = wheadp; while (wp2 != curwp) { wp1 = wp2; wp2 = wp2->w_wndp; } if (wp1 == NULL) wheadp = wp; else wp1->w_wndp = wp; wp->w_wndp = curwp; wp->w_toprow = curwp->w_toprow; wp->w_ntrows = ntru; ++ntru; /* Mode line. */ curwp->w_toprow += ntru; curwp->w_ntrows = ntrl; while (ntru--) lp = lforw(lp); } curwp->w_linep = lp; /* Adjust the top lines */ wp->w_linep = lp; /* if necessary. */ curwp->w_flag |= WFMODE|WFHARD; wp->w_flag |= WFMODE|WFHARD; return (TRUE); } /* * Enlarge the current window. Find the window that loses space. Make sure it * is big enough. If so, hack the window descriptions, and ask redisplay to do * all the hard work. You don't just set "force reframe" because dot would * move. Bound to "C-X Z". */ int enlargewind(f, n) int f, n; { register WINDOW *adjwp; register LINE *lp; register int i; if (n < 0) return (shrinkwind(f, -n)); if (wheadp->w_wndp == NULL) { mlwrite("Only one window"); return (FALSE); } if ((adjwp=curwp->w_wndp) == NULL) { adjwp = wheadp; while (adjwp->w_wndp != curwp) adjwp = adjwp->w_wndp; } if (adjwp->w_ntrows <= n) { mlwrite("Impossible change"); return (FALSE); } if (curwp->w_wndp == adjwp) { /* Shrink below. */ lp = adjwp->w_linep; for (i=0; iw_bufp->b_linep; ++i) lp = lforw(lp); adjwp->w_linep = lp; adjwp->w_toprow += n; } else { /* Shrink above. */ lp = curwp->w_linep; for (i=0; ib_linep; ++i) lp = lback(lp); curwp->w_linep = lp; curwp->w_toprow -= n; } curwp->w_ntrows += n; adjwp->w_ntrows -= n; curwp->w_flag |= WFMODE|WFHARD; adjwp->w_flag |= WFMODE|WFHARD; return (TRUE); } /* * Shrink the current window. Find the window that gains space. Hack at the * window descriptions. Ask the redisplay to do all the hard work. Bound to * "C-X C-Z". */ int shrinkwind(f, n) int f, n; { register WINDOW *adjwp; register LINE *lp; register int i; if (n < 0) return (enlargewind(f, -n)); if (wheadp->w_wndp == NULL) { mlwrite("Only one window"); return (FALSE); } if ((adjwp=curwp->w_wndp) == NULL) { adjwp = wheadp; while (adjwp->w_wndp != curwp) adjwp = adjwp->w_wndp; } if (curwp->w_ntrows <= n) { mlwrite("Impossible change"); return (FALSE); } if (curwp->w_wndp == adjwp) { /* Grow below. */ lp = adjwp->w_linep; for (i=0; iw_bufp->b_linep; ++i) lp = lback(lp); adjwp->w_linep = lp; adjwp->w_toprow -= n; } else { /* Grow above. */ lp = curwp->w_linep; for (i=0; ib_linep; ++i) lp = lforw(lp); curwp->w_linep = lp; curwp->w_toprow += n; } curwp->w_ntrows -= n; adjwp->w_ntrows += n; curwp->w_flag |= WFMODE|WFHARD; adjwp->w_flag |= WFMODE|WFHARD; return (TRUE); } /* * Pick a window for a pop-up. Split the screen if there is only one window. * Pick the uppermost window that isn't the current window. An LRU algorithm * might be better. Return a pointer, or NULL on error. */ WINDOW *wpopup() { register WINDOW *wp; if (wheadp->w_wndp == NULL /* Only 1 window */ && splitwind(FALSE, 0) == FALSE) /* and it won't split */ return (NULL); wp = wheadp; /* Find window to use */ while (wp!=NULL && wp==curwp) wp = wp->w_wndp; return (wp); } int scrnextup(f, n) /* scroll the next window up (back) a page */ int f, n; { IGNORE(nextwind(FALSE, 1)); IGNORE(backpage(f, n)); IGNORE(prevwind(FALSE, 1)); return TRUE; } int scrnextdw(f, n) /* scroll the next window down (forward) a page */ int f, n; { IGNORE(nextwind(FALSE, 1)); IGNORE(forwpage(f, n)); IGNORE(prevwind(FALSE, 1)); return TRUE; } neuron-7.5/src/memacs/word.c000077500000000000000000000331011323325274500160550ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/memacs/word.c,v 1.1.1.1 1994/10/12 17:21:25 hines Exp */ /* word.c,v * Revision 1.1.1.1 1994/10/12 17:21:25 hines * NEURON 3.0 distribution * * Revision 1.3 89/07/10 10:26:16 mlh * LINT free * * Revision 1.2 89/07/09 12:19:17 mlh * lint pass1 now ok * * Revision 1.1 89/07/08 15:37:34 mlh * Initial revision * */ /* * The routines in this file implement commands that work word at a time. * There are all sorts of word mode commands. If I do any sentence and/or * paragraph mode commands, they are likely to be put in this file. */ #include #include "estruct.h" #include "edef.h" /* Word wrap on n-spaces. Back-over whatever precedes the point on the current * line and stop on the first word-break or the beginning of the line. If we * reach the beginning of the line, jump back to the end of the word and start * a new line. Otherwise, break the line at the word-break, eat it, and jump * back to the end of the word. * Returns TRUE on success, FALSE on errors. */ int wrapword(n) int n; { register int cnt; /* size of word wrapped to next line */ LINTUSE(n) /* backup from the 1 char */ if (!backchar(0, 1)) return(FALSE); /* back up until we aren't in a word, make sure there is a break in the line */ cnt = 0; while (inword()) { cnt++; if (!backchar(0, 1)) return(FALSE); } /* delete the forward space */ if (!forwdel(0, 1)) return(FALSE); /* put in a end of line */ if (!newline(0, 1)) return(FALSE); /* and past the first word */ while (cnt-- > 0) { if (forwchar(FALSE, 1) == FALSE) return(FALSE); } return(TRUE); } /* * Move the cursor backward by "n" words. All of the details of motion are * performed by the "backchar" and "forwchar" routines. Error if you try to * move beyond the buffers. */ int backword(f, n) int f, n; { if (n < 0) return (forwword(f, -n)); if (backchar(FALSE, 1) == FALSE) return (FALSE); while (n--) { while (inword() == FALSE) { if (backchar(FALSE, 1) == FALSE) return (FALSE); } while (inword() != FALSE) { if (backchar(FALSE, 1) == FALSE) return (FALSE); } } return (forwchar(FALSE, 1)); } /* * Move the cursor forward by the specified number of words. All of the motion * is done by "forwchar". Error if you try and move beyond the buffer's end. */ int forwword(f, n) int f, n; { if (n < 0) return (backword(f, -n)); while (n--) { #if NFWORD while (inword() != FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); } #endif while (inword() == FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); } #if NFWORD == 0 while (inword() != FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); } #endif } return(TRUE); } /* * Move the cursor forward by the specified number of words. As you move, * convert any characters to upper case. Error if you try and move beyond the * end of the buffer. Bound to "M-U". */ int upperword(f, n) int f, n; { register int c; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); while (n--) { while (inword() == FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); } while (inword() != FALSE) { c = lgetc(curwp->w_dotp, curwp->w_doto); if (c>='a' && c<='z') { c -= 'a'-'A'; lputc(curwp->w_dotp, curwp->w_doto, c); lchange(WFHARD); } if (forwchar(FALSE, 1) == FALSE) return (FALSE); } } return (TRUE); } /* * Move the cursor forward by the specified number of words. As you move * convert characters to lower case. Error if you try and move over the end of * the buffer. Bound to "M-L". */ int lowerword(f, n) int f, n; { register int c; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); while (n--) { while (inword() == FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); } while (inword() != FALSE) { c = lgetc(curwp->w_dotp, curwp->w_doto); if (c>='A' && c<='Z') { c += 'a'-'A'; lputc(curwp->w_dotp, curwp->w_doto, c); lchange(WFHARD); } if (forwchar(FALSE, 1) == FALSE) return (FALSE); } } return (TRUE); } /* * Move the cursor forward by the specified number of words. As you move * convert the first character of the word to upper case, and subsequent * characters to lower case. Error if you try and move past the end of the * buffer. Bound to "M-C". */ int capword(f, n) int f, n; { register int c; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); while (n--) { while (inword() == FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); } if (inword() != FALSE) { c = lgetc(curwp->w_dotp, curwp->w_doto); if (c>='a' && c<='z') { c -= 'a'-'A'; lputc(curwp->w_dotp, curwp->w_doto, c); lchange(WFHARD); } if (forwchar(FALSE, 1) == FALSE) return (FALSE); while (inword() != FALSE) { c = lgetc(curwp->w_dotp, curwp->w_doto); if (c>='A' && c<='Z') { c += 'a'-'A'; lputc(curwp->w_dotp, curwp->w_doto, c); lchange(WFHARD); } if (forwchar(FALSE, 1) == FALSE) return (FALSE); } } } return (TRUE); } /* * Kill forward by "n" words. Remember the location of dot. Move forward by * the right number of words. Put dot back where it was and issue the kill * command for the right number of characters. Bound to "M-D". */ int delfword(f, n) int f, n; { register int size; register LINE *dotp; register int doto; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); dotp = curwp->w_dotp; doto = curwp->w_doto; size = 0; while (n--) { #if NFWORD while (inword() != FALSE) { if (forwchar(FALSE,1) == FALSE) return(FALSE); ++size; } #endif while (inword() == FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); ++size; } #if NFWORD == 0 while (inword() != FALSE) { if (forwchar(FALSE, 1) == FALSE) return (FALSE); ++size; } #endif } curwp->w_dotp = dotp; curwp->w_doto = doto; return (ldelete(size, TRUE)); } /* * Kill backwards by "n" words. Move backwards by the desired number of words, * counting the characters. When dot is finally moved to its resting place, * fire off the kill command. Bound to "M-Rubout" and to "M-Backspace". */ int delbword(f, n) int f, n; { register int size; LINTUSE(f) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (n < 0) return (FALSE); if (backchar(FALSE, 1) == FALSE) return (FALSE); size = 0; while (n--) { while (inword() == FALSE) { if (backchar(FALSE, 1) == FALSE) return (FALSE); ++size; } while (inword() != FALSE) { if (backchar(FALSE, 1) == FALSE) return (FALSE); ++size; } } if (forwchar(FALSE, 1) == FALSE) return (FALSE); return (ldelete(size, TRUE)); } /* * Return TRUE if the character at dot is a character that is considered to be * part of a word. The word character list is hard coded. Should be setable. */ int inword() { register int c; if (curwp->w_doto == llength(curwp->w_dotp)) return (FALSE); c = lgetc(curwp->w_dotp, curwp->w_doto); if (c>='a' && c<='z') return (TRUE); if (c>='A' && c<='Z') return (TRUE); if (c>='0' && c<='9') return (TRUE); if (c=='$' || c=='_') /* For identifiers */ return (TRUE); return (FALSE); } int fillpara(f, n) /* Fill the current paragraph according to the current fill column */ int f, n; /* deFault flag and Numeric argument */ { register int c; /* current char durring scan */ register int wordlen; /* length of current word */ register int clength; /* position on line during fill */ register int i; /* index during word copy */ register int newlength; /* tentative new line length */ register int eopflag; /* Are we at the End-Of-Paragraph? */ register int firstflag; /* first word? (needs no space) */ register LINE *eopline; /* pointer to line just past EOP */ register int dotflag; /* was the last char a period? */ char wbuf[NSTRING]; /* buffer for current word */ LINTUSE(f) LINTUSE(n) if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ if (fillcol == 0) { /* no fill column set */ mlwrite("No fill column set"); return(FALSE); } /* record the pointer to the line just past the EOP */ IGNORE(gotoeop(FALSE, 1)); eopline = lforw(curwp->w_dotp); /* and back top the begining of the paragraph */ IGNORE(gotobop(FALSE, 1)); /* initialize various info */ clength = curwp->w_doto; if (clength && curwp->w_dotp->l_text[0] == TAB) #if TRUETAB clength = tabsize; #else clength = 8; #endif wordlen = 0; dotflag = FALSE; /* scan through lines, filling words */ firstflag = TRUE; eopflag = FALSE; while (!eopflag) { /* get the next character in the paragraph */ if (curwp->w_doto == llength(curwp->w_dotp)) { c = ' '; if (lforw(curwp->w_dotp) == eopline) eopflag = TRUE; } else c = lgetc(curwp->w_dotp, curwp->w_doto); /* and then delete it */ IGNORE(ldelete(1, FALSE)); /* if not a separator, just add it in */ if (c != ' ' && c != ' ') { dotflag = (c == '.'); /* was it a dot */ if (wordlen < NSTRING - 1) wbuf[wordlen++] = c; } else if (wordlen) { /* at a word break with a word waiting */ /* calculate tantitive new length with word added */ newlength = clength + 1 + wordlen; if (newlength <= fillcol) { /* add word to current line */ if (!firstflag) { IGNORE(linsert(1, ' ')); /* the space */ ++clength; } firstflag = FALSE; } else { /* start a new line */ IGNORE(lnewline()); clength = 0; } /* and add the word in in either case */ for (i=0; iw_markp = curwp->w_dotp; curwp->w_marko = curwp->w_doto; /* go to the begining of the paragraph */ IGNORE(gotobop(FALSE, 1)); curwp->w_doto = 0; /* force us to the begining of line */ /* and delete it */ if ((status = killregion(FALSE, 1)) != TRUE) return(status); /* and clean up the 2 extra lines */ IGNORE(ldelete(2, TRUE)); } return(TRUE); } neuron-7.5/src/mesch/000077500000000000000000000000001323325274500145675ustar00rootroot00000000000000neuron-7.5/src/mesch/Makefile.am000077500000000000000000000015321323325274500166270ustar00rootroot00000000000000## The library that we make: lib_LTLIBRARIES = libmeschach.la AM_CFLAGS = @MINGW_CFLAG@ libmeschach_la_SOURCES = arnoldi.c bdfactor.c bkpfacto.c chfactor.c \ conjgrad.c copy.c dmacheps.c err.c extras.c fft.c givens.c hessen.c \ hsehldr.c init.c iter0.c iternsym.c itersym.c ivecop.c lanczos.c \ lufactor.c machine.c matlab.c matop.c matrixio.c meminfo.c memory.c \ memstat.c mfunc.c norm.c otherio.c pxop.c qrfactor.c schur.c \ solve.c sparse.c sparseio.c spbkp.c spchfctr.c splufctr.c sprow.c \ spswap.c submat.c svd.c symmeig.c update.c vecop.c version.c \ zcopy.c zfunc.c zgivens.c zhessen.c zhsehldr.c zlufctr.c zmachine.c \ zmatio.c zmatlab.c zmatop.c zmemory.c znorm.c zqrfctr.c zschur.c \ zsolve.c zvecop.c noinst_HEADERS = err.h iter.h machine.h matlab.h matrix.h matrix2.h \ meminfo.h oldnames.h sparse.h sparse2.h zmatrix.h zmatrix2.h neuron-7.5/src/mesch/Makefile.in000066400000000000000000000725521323325274500166470ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mesch ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libmeschach_la_LIBADD = am_libmeschach_la_OBJECTS = arnoldi.lo bdfactor.lo bkpfacto.lo \ chfactor.lo conjgrad.lo copy.lo dmacheps.lo err.lo extras.lo \ fft.lo givens.lo hessen.lo hsehldr.lo init.lo iter0.lo \ iternsym.lo itersym.lo ivecop.lo lanczos.lo lufactor.lo \ machine.lo matlab.lo matop.lo matrixio.lo meminfo.lo memory.lo \ memstat.lo mfunc.lo norm.lo otherio.lo pxop.lo qrfactor.lo \ schur.lo solve.lo sparse.lo sparseio.lo spbkp.lo spchfctr.lo \ splufctr.lo sprow.lo spswap.lo submat.lo svd.lo symmeig.lo \ update.lo vecop.lo version.lo zcopy.lo zfunc.lo zgivens.lo \ zhessen.lo zhsehldr.lo zlufctr.lo zmachine.lo zmatio.lo \ zmatlab.lo zmatop.lo zmemory.lo znorm.lo zqrfctr.lo zschur.lo \ zsolve.lo zvecop.lo libmeschach_la_OBJECTS = $(am_libmeschach_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmeschach_la_SOURCES) DIST_SOURCES = $(libmeschach_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libmeschach.la AM_CFLAGS = @MINGW_CFLAG@ libmeschach_la_SOURCES = arnoldi.c bdfactor.c bkpfacto.c chfactor.c \ conjgrad.c copy.c dmacheps.c err.c extras.c fft.c givens.c hessen.c \ hsehldr.c init.c iter0.c iternsym.c itersym.c ivecop.c lanczos.c \ lufactor.c machine.c matlab.c matop.c matrixio.c meminfo.c memory.c \ memstat.c mfunc.c norm.c otherio.c pxop.c qrfactor.c schur.c \ solve.c sparse.c sparseio.c spbkp.c spchfctr.c splufctr.c sprow.c \ spswap.c submat.c svd.c symmeig.c update.c vecop.c version.c \ zcopy.c zfunc.c zgivens.c zhessen.c zhsehldr.c zlufctr.c zmachine.c \ zmatio.c zmatlab.c zmatop.c zmemory.c znorm.c zqrfctr.c zschur.c \ zsolve.c zvecop.c noinst_HEADERS = err.h iter.h machine.h matlab.h matrix.h matrix2.h \ meminfo.h oldnames.h sparse.h sparse2.h zmatrix.h zmatrix2.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mesch/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mesch/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmeschach.la: $(libmeschach_la_OBJECTS) $(libmeschach_la_DEPENDENCIES) $(EXTRA_libmeschach_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libmeschach_la_OBJECTS) $(libmeschach_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arnoldi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bdfactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bkpfacto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chfactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conjgrad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmacheps.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extras.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/givens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hessen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsehldr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iter0.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iternsym.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itersym.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivecop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lanczos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lufactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matlab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrixio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meminfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memstat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otherio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pxop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrfactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schur.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparseio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spbkp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spchfctr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splufctr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sprow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spswap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/submat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmeig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vecop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zcopy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgivens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhessen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zhsehldr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zlufctr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmachine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmatio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmatlab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmatop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmemory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/znorm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zqrfctr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zschur.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsolve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zvecop.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mesch/arnoldi.c000077500000000000000000000114021323325274500163640ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Arnoldi method for finding eigenvalues of large non-symmetric matrices */ #include #include #include "matrix.h" #include "matrix2.h" #include "sparse.h" static char rcsid[] = "arnoldi.c,v 1.1 1997/12/04 17:55:13 hines Exp"; /* arnoldi -- an implementation of the Arnoldi method */ MAT *arnoldi(A,A_param,x0,m,h_rem,Q,H) VEC *(*A)(); void *A_param; VEC *x0; int m; Real *h_rem; MAT *Q, *H; { static VEC *v=VNULL, *u=VNULL, *r=VNULL, *s=VNULL, *tmp=VNULL; int i; Real h_val; if ( ! A || ! Q || ! x0 ) error(E_NULL,"arnoldi"); if ( m <= 0 ) error(E_BOUNDS,"arnoldi"); if ( Q->n != x0->dim || Q->m != m ) error(E_SIZES,"arnoldi"); m_zero(Q); H = m_resize(H,m,m); m_zero(H); u = v_resize(u,x0->dim); v = v_resize(v,x0->dim); r = v_resize(r,m); s = v_resize(s,m); tmp = v_resize(tmp,x0->dim); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(v,TYPE_VEC); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(s,TYPE_VEC); MEM_STAT_REG(tmp,TYPE_VEC); sv_mlt(1.0/v_norm2(x0),x0,v); for ( i = 0; i < m; i++ ) { set_row(Q,i,v); u = (*A)(A_param,v,u); r = mv_mlt(Q,u,r); tmp = vm_mlt(Q,r,tmp); v_sub(u,tmp,u); h_val = v_norm2(u); /* if u == 0 then we have an exact subspace */ if ( h_val == 0.0 ) { *h_rem = h_val; return H; } /* iterative refinement -- ensures near orthogonality */ do { s = mv_mlt(Q,u,s); tmp = vm_mlt(Q,s,tmp); v_sub(u,tmp,u); v_add(r,s,r); } while ( v_norm2(s) > 0.1*(h_val = v_norm2(u)) ); /* now that u is nearly orthogonal to Q, update H */ set_col(H,i,r); if ( i == m-1 ) { *h_rem = h_val; continue; } /* H->me[i+1][i] = h_val; */ m_set_val(H,i+1,i,h_val); sv_mlt(1.0/h_val,u,v); } return H; } /* sp_arnoldi -- uses arnoldi() with an explicit representation of A */ MAT *sp_arnoldi(A,x0,m,h_rem,Q,H) SPMAT *A; VEC *x0; int m; Real *h_rem; MAT *Q, *H; { return arnoldi(sp_mv_mlt,A,x0,m,h_rem,Q,H); } /* gmres -- generalised minimum residual algorithm of Saad & Schultz SIAM J. Sci. Stat. Comp. v.7, pp.856--869 (1986) -- y is overwritten with the solution */ VEC *gmres(A,A_param,m,Q,R,b,tol,x) VEC *(*A)(); void *A_param; VEC *b, *x; int m; MAT *Q, *R; double tol; { static VEC *v=VNULL, *u=VNULL, *r=VNULL, *tmp=VNULL, *rhs=VNULL; static VEC *diag=VNULL, *beta=VNULL; int i; Real h_val, norm_b; if ( ! A || ! Q || ! b || ! R ) error(E_NULL,"gmres"); if ( m <= 0 ) error(E_BOUNDS,"gmres"); if ( Q->n != b->dim || Q->m != m ) error(E_SIZES,"gmres"); x = v_copy(b,x); m_zero(Q); R = m_resize(R,m+1,m); m_zero(R); u = v_resize(u,x->dim); v = v_resize(v,x->dim); tmp = v_resize(tmp,x->dim); rhs = v_resize(rhs,m+1); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(v,TYPE_VEC); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(tmp,TYPE_VEC); MEM_STAT_REG(rhs,TYPE_VEC); norm_b = v_norm2(x); if ( norm_b == 0.0 ) error(E_RANGE,"gmres"); sv_mlt(1.0/norm_b,x,v); for ( i = 0; i < m; i++ ) { set_row(Q,i,v); tracecatch(u = (*A)(A_param,v,u),"gmres"); r = mv_mlt(Q,u,r); tmp = vm_mlt(Q,r,tmp); v_sub(u,tmp,u); h_val = v_norm2(u); set_col(R,i,r); R->me[i+1][i] = h_val; sv_mlt(1.0/h_val,u,v); } /* use i x i submatrix of R */ R = m_resize(R,i+1,i); rhs = v_resize(rhs,i+1); v_zero(rhs); rhs->ve[0] = norm_b; tmp = v_resize(tmp,i); diag = v_resize(diag,i+1); beta = v_resize(beta,i+1); MEM_STAT_REG(beta,TYPE_VEC); MEM_STAT_REG(diag,TYPE_VEC); QRfactor(R,diag /* ,beta */); tmp = QRsolve(R,diag, /* beta, */ rhs,tmp); v_resize(tmp,m); vm_mlt(Q,tmp,x); return x; } neuron-7.5/src/mesch/bdfactor.c000077500000000000000000000342301323325274500165240ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Band matrix factorisation routines */ /* bdfactor.c 18/11/93 */ static char rcsid[] = "$Id: "; #include #include "matrix2.h" #include /* generate band matrix for a matrix with n columns, lb subdiagonals and ub superdiagonals; Way of saving a band of a matrix: first we save subdiagonals (from 0 to lb-1); then main diagonal (in the lb row) and then superdiagonals (from lb+1 to lb+ub) in such a way that the elements which were previously in one column are now also in one column */ BAND *bd_get(lb,ub,n) int lb, ub, n; { BAND *A; if (lb < 0 || ub < 0 || n <= 0) error(E_NEG,"bd_get"); if ((A = NEW(BAND)) == (BAND *)NULL) error(E_MEM,"bd_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_BAND,0,sizeof(BAND)); mem_numvar(TYPE_BAND,1); } lb = A->lb = min(n-1,lb); ub = A->ub = min(n-1,ub); A->mat = m_get(lb+ub+1,n); return A; } int bd_free(A) BAND *A; { if ( A == (BAND *)NULL || A->lb < 0 || A->ub < 0 ) /* don't trust it */ return (-1); if (A->mat) m_free(A->mat); if (mem_info_is_on()) { mem_bytes(TYPE_BAND,sizeof(BAND),0); mem_numvar(TYPE_BAND,-1); } free((char *)A); return 0; } /* resize band matrix */ BAND *bd_resize(A,new_lb,new_ub,new_n) BAND *A; int new_lb,new_ub,new_n; { int lb,ub,i,j,l,shift,umin; Real **Av; if (new_lb < 0 || new_ub < 0 || new_n <= 0) error(E_NEG,"bd_resize"); if ( ! A ) return bd_get(new_lb,new_ub,new_n); if ( A->lb+A->ub+1 > A->mat->m ) error(E_INTERN,"bd_resize"); if ( A->lb == new_lb && A->ub == new_ub && A->mat->n == new_n ) return A; lb = A->lb; ub = A->ub; Av = A->mat->me; umin = min(ub,new_ub); /* ensure that unused triangles at edges are zero'd */ for ( i = 0; i < lb; i++ ) for ( j = A->mat->n - lb + i; j < A->mat->n; j++ ) Av[i][j] = 0.0; for ( i = lb+1,l=1; l <= umin; i++,l++ ) for ( j = 0; j < l; j++ ) Av[i][j] = 0.0; new_lb = A->lb = min(new_lb,new_n-1); new_ub = A->ub = min(new_ub,new_n-1); A->mat = m_resize(A->mat,new_lb+new_ub+1,new_n); Av = A->mat->me; /* if new_lb != lb then move the rows to get the main diag in the new_lb row */ if (new_lb > lb) { shift = new_lb-lb; for (i=lb+umin, l=i+shift; i >= 0; i--,l--) MEM_COPY(Av[i],Av[l],new_n*sizeof(Real)); for (l=shift-1; l >= 0; l--) __zero__(Av[l],new_n); } else if (new_lb < lb) { shift = lb - new_lb; for (i=shift, l=0; i <= lb+umin; i++,l++) MEM_COPY(Av[i],Av[l],new_n*sizeof(Real)); for (i=lb+umin+1; i <= new_lb+new_ub; i++) __zero__(Av[i],new_n); } return A; } BAND *bd_copy(A,B) BAND *A,*B; { int lb,ub,i,j,n; if ( !A ) error(E_NULL,"bd_copy"); if (A == B) return B; n = A->mat->n; if ( !B ) B = bd_get(A->lb,A->ub,n); else if (B->lb != A->lb || B->ub != A->ub || B->mat->n != n ) B = bd_resize(B,A->lb,A->ub,n); if (A->mat == B->mat) return B; ub = B->ub = A->ub; lb = B->lb = A->lb; for ( i=0, j=n-lb; i <= lb; i++, j++ ) MEM_COPY(A->mat->me[i],B->mat->me[i],j*sizeof(Real)); for ( i=lb+1, j=1; i <= lb+ub; i++, j++ ) MEM_COPY(A->mat->me[i]+j,B->mat->me[i]+j,(n - j)*sizeof(Real)); return B; } /* copy band matrix to a square matrix */ MAT *band2mat(bA,A) BAND *bA; MAT *A; { int i,j,l,n,n1; int lb, ub; Real **bmat; if ( !bA || !A) error(E_NULL,"band2mat"); if ( bA->mat == A ) error(E_INSITU,"band2mat"); ub = bA->ub; lb = bA->lb; n = bA->mat->n; n1 = n-1; bmat = bA->mat->me; A = m_resize(A,n,n); m_zero(A); for (j=0; j < n; j++) for (i=min(n1,j+lb),l=lb+j-i; i >= max(0,j-ub); i--,l++) A->me[i][j] = bmat[l][j]; return A; } /* copy a square matrix to a band matrix with lb subdiagonals and ub superdiagonals */ BAND *mat2band(A,lb,ub,bA) BAND *bA; MAT *A; int lb, ub; { int i, j, l, n1; Real **bmat; if (! A || ! bA) error(E_NULL,"mat2band"); if (ub < 0 || lb < 0) error(E_SIZES,"mat2band"); if (bA->mat == A) error(E_INSITU,"mat2band"); n1 = A->n-1; lb = min(n1,lb); ub = min(n1,ub); bA = bd_resize(bA,lb,ub,n1+1); bmat = bA->mat->me; for (j=0; j <= n1; j++) for (i=min(n1,j+lb),l=lb+j-i; i >= max(0,j-ub); i--,l++) bmat[l][j] = A->me[i][j]; return bA; } /* transposition of matrix in; out - matrix after transposition; can be done in situ */ BAND *bd_transp(in,out) BAND *in, *out; { int i, j, jj, l, k, lb, ub, lub, n, n1; int in_situ; Real **in_v, **out_v; if ( in == (BAND *)NULL || in->mat == (MAT *)NULL ) error(E_NULL,"bd_transp"); lb = in->lb; ub = in->ub; lub = lb+ub; n = in->mat->n; n1 = n-1; in_situ = ( in == out ); if ( ! in_situ ) out = bd_resize(out,ub,lb,n); else { /* only need to swap lb and ub fields */ out->lb = ub; out->ub = lb; } in_v = in->mat->me; if (! in_situ) { int sh_in,sh_out; out_v = out->mat->me; for (i=0, l=lub, k=lb-i; i <= lub; i++,l--,k--) { sh_in = max(-k,0); sh_out = max(k,0); MEM_COPY(&(in_v[i][sh_in]),&(out_v[l][sh_out]), (n-sh_in-sh_out)*sizeof(Real)); /********************************** for (j=n1-sh_out, jj=n1-sh_in; j >= sh_in; j--,jj--) { out_v[l][jj] = in_v[i][j]; } **********************************/ } } else if (ub == lb) { Real tmp; for (i=0, l=lub, k=lb-i; i < lb; i++,l--,k--) { for (j=n1-k, jj=n1; j >= 0; j--,jj--) { tmp = in_v[l][jj]; in_v[l][jj] = in_v[i][j]; in_v[i][j] = tmp; } } } else if (ub > lb) { /* hence i-ub <= 0 & l-lb >= 0 */ int p,pp,lbi; for (i=0, l=lub; i < (lub+1)/2; i++,l--) { lbi = lb-i; for (j=l-lb, jj=0, p=max(-lbi,0), pp = max(l-ub,0); j <= n1; j++,jj++,p++,pp++) { in_v[l][pp] = in_v[i][p]; in_v[i][jj] = in_v[l][j]; } for ( ; p <= n1-max(lbi,0); p++,pp++) in_v[l][pp] = in_v[i][p]; } if (lub%2 == 0) { /* shift only */ i = lub/2; for (j=max(i-lb,0), jj=0; jj <= n1-ub+i; j++,jj++) in_v[i][jj] = in_v[i][j]; } } else { /* ub < lb, hence ub-l <= 0 & lb-i >= 0 */ int p,pp,ubi; for (i=0, l=lub; i < (lub+1)/2; i++,l--) { ubi = i-ub; for (j=n1-max(lb-l,0), jj=n1-max(-ubi,0), p=n1-lb+i, pp=n1; p >= 0; j--, jj--, pp--, p--) { in_v[i][jj] = in_v[l][j]; in_v[l][pp] = in_v[i][p]; } for ( ; jj >= max(ubi,0); j--, jj--) in_v[i][jj] = in_v[l][j]; } if (lub%2 == 0) { /* shift only */ i = lub/2; for (j=n1-lb+i, jj=n1-max(ub-i,0); j >= 0; j--, jj--) in_v[i][jj] = in_v[i][j]; } } return out; } /* bdLUfactor -- gaussian elimination with partial pivoting -- on entry, the matrix A in band storage with elements in rows 0 to lb+ub; The jth column of A is stored in the jth column of band A (bA) as follows: bA->mat->me[lb+j-i][j] = A->me[i][j] for max(0,j-lb) <= i <= min(A->n-1,j+ub); -- on exit: U is stored as an upper triangular matrix with lb+ub superdiagonals in rows lb to 2*lb+ub, and the matrix L is stored in rows 0 to lb-1. Matrix U is permuted, whereas L is not permuted !!! Therefore we save some memory. */ BAND *bdLUfactor(bA,pivot) BAND *bA; PERM *pivot; { int i, j, k, l, n, n1, lb, ub, lub, k_end, k_lub; int i_max, shift; Real **bA_v; Real max1, temp; if ( bA==(BAND *)NULL || pivot==(PERM *)NULL ) error(E_NULL,"bdLUfactor"); lb = bA->lb; ub = bA->ub; lub = lb+ub; n = bA->mat->n; n1 = n-1; lub = lb+ub; if ( pivot->size != n ) error(E_SIZES,"bdLUfactor"); /* initialise pivot with identity permutation */ for ( i=0; i < n; i++ ) pivot->pe[i] = i; /* extend band matrix */ /* extended part is filled with zeros */ bA = bd_resize(bA,lb,min(n1,lub),n); bA_v = bA->mat->me; /* main loop */ for ( k=0; k < n1; k++ ) { k_end = max(0,lb+k-n1); k_lub = min(k+lub,n1); /* find the best pivot row */ max1 = 0.0; i_max = -1; for ( i=lb; i >= k_end; i-- ) { temp = fabs(bA_v[i][k]); if ( temp > max1 ) { max1 = temp; i_max = i; } } /* if no pivot then ignore column k... */ if ( i_max == -1 ) continue; /* do we pivot ? */ if ( i_max != lb ) /* yes we do... */ { /* save transposition using non-shifted indices */ shift = lb-i_max; px_transp(pivot,k+shift,k); for ( i=lb, j=k; j <= k_lub; i++,j++ ) { temp = bA_v[i][j]; bA_v[i][j] = bA_v[i-shift][j]; bA_v[i-shift][j] = temp; } } /* row operations */ for ( i=lb-1; i >= k_end; i-- ) { temp = bA_v[i][k] /= bA_v[lb][k]; shift = lb-i; for ( j=k+1,l=i+1; j <= k_lub; l++,j++ ) bA_v[l][j] -= temp*bA_v[l+shift][j]; } } return bA; } /* bdLUsolve -- given an LU factorisation in bA, solve bA*x=b */ /* pivot is changed upon return */ VEC *bdLUsolve(bA,pivot,b,x) BAND *bA; PERM *pivot; VEC *b,*x; { int i,j,l,n,n1,pi,lb,ub,jmin, maxj; Real c; Real **bA_v; if ( bA==(BAND *)NULL || b==(VEC *)NULL || pivot==(PERM *)NULL ) error(E_NULL,"bdLUsolve"); if ( bA->mat->n != b->dim || bA->mat->n != pivot->size) error(E_SIZES,"bdLUsolve"); lb = bA->lb; ub = bA->ub; n = b->dim; n1 = n-1; bA_v = bA->mat->me; x = v_resize(x,b->dim); px_vec(pivot,b,x); /* solve Lx = b; implicit diagonal = 1 L is not permuted, therefore it must be permuted now */ px_inv(pivot,pivot); for (j=0; j < n; j++) { jmin = j+1; c = x->ve[j]; maxj = max(0,j+lb-n1); for (i=jmin,l=lb-1; l >= maxj; i++,l--) { if ( (pi = pivot->pe[i]) < jmin) pi = pivot->pe[i] = pivot->pe[pi]; x->ve[pi] -= bA_v[l][j]*c; } } /* solve Ux = b; explicit diagonal */ x->ve[n1] /= bA_v[lb][n1]; for (i=n-2; i >= 0; i--) { c = x->ve[i]; for (j=min(n1,i+ub), l=lb+j-i; j > i; j--,l--) c -= bA_v[l][j]*x->ve[j]; x->ve[i] = c/bA_v[lb][i]; } return (x); } /* LDLfactor -- L.D.L' factorisation of A in-situ; A is a band matrix it works using only lower bandwidth & main diagonal so it is possible to set A->ub = 0 */ BAND *bdLDLfactor(A) BAND *A; { int i,j,k,n,n1,lb,ki,jk,ji,lbkm,lbkp; Real **Av; Real c, cc; if ( ! A ) error(E_NULL,"bdLDLfactor"); if (A->lb == 0) return A; lb = A->lb; n = A->mat->n; n1 = n-1; Av = A->mat->me; for (k=0; k < n; k++) { lbkm = lb-k; lbkp = lb+k; /* matrix D */ c = Av[lb][k]; for (j=max(0,-lbkm), jk=lbkm+j; j < k; j++, jk++) { cc = Av[jk][j]; c -= Av[lb][j]*cc*cc; } if (c == 0.0) error(E_SING,"bdLDLfactor"); Av[lb][k] = c; /* matrix L */ for (i=min(n1,lbkp), ki=lbkp-i; i > k; i--,ki++) { c = Av[ki][k]; for (j=max(0,i-lb), ji=lb+j-i, jk=lbkm+j; j < k; j++, ji++, jk++) c -= Av[lb][j]*Av[ji][j]*Av[jk][j]; Av[ki][k] = c/Av[lb][k]; } } return A; } /* solve A*x = b, where A is factorized by Choleski LDL^T factorization */ VEC *bdLDLsolve(A,b,x) BAND *A; VEC *b, *x; { int i,j,l,n,n1,lb,ilb; Real **Av, *Avlb; Real c; if ( ! A || ! b ) error(E_NULL,"bdLDLsolve"); if ( A->mat->n != b->dim ) error(E_SIZES,"bdLDLsolve"); n = A->mat->n; n1 = n-1; x = v_resize(x,n); lb = A->lb; Av = A->mat->me; Avlb = Av[lb]; /* solve L*y = b */ x->ve[0] = b->ve[0]; for (i=1; i < n; i++) { ilb = i-lb; c = b->ve[i]; for (j=max(0,ilb), l=j-ilb; j < i; j++,l++) c -= Av[l][j]*x->ve[j]; x->ve[i] = c; } /* solve D*z = y */ for (i=0; i < n; i++) x->ve[i] /= Avlb[i]; /* solve L^T*x = z */ for (i=n-2; i >= 0; i--) { ilb = i+lb; c = x->ve[i]; for (j=min(n1,ilb), l=ilb-j; j > i; j--,l++) c -= Av[l][i]*x->ve[j]; x->ve[i] = c; } return x; } /* ****************************************************** This function is a contribution from Ruediger Franke. His e-mail addres is: Ruediger.Franke@rz.tu-ilmenau.de ****************************************************** */ /* bd_mv_mlt -- * computes out = A * x * may not work in situ (x != out) */ VEC *bd_mv_mlt(A, x, out) BAND *A; VEC *x, *out; { int i, j, j_end, k; int start_idx, end_idx; int n, m, lb, ub; Real **A_me; Real *x_ve; Real sum; if (!A || !x) error(E_NULL,"bd_mv_mlt"); if (x->dim != A->mat->n) error(E_SIZES,"bd_mv_mlt"); if (!out || out->dim != A->mat->n) out = v_resize(out, A->mat->n); if (out == x) error(E_INSITU,"bd_mv_mlt"); n = A->mat->n; m = A->mat->m; lb = A->lb; ub = A->ub; A_me = A->mat->me; start_idx = lb; end_idx = m + n-1 - ub; for (i=0; ive + k; sum = 0.0; for (; j < j_end; j++, k++) sum += A_me[j][k] * *x_ve++; out->ve[i] = sum; } return out; } neuron-7.5/src/mesch/bkpfacto.c000077500000000000000000000204301323325274500165260ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. */ static char rcsid[] = "bkpfacto.c,v 1.1 1997/12/04 17:55:14 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include #define btos(x) ((x) ? "TRUE" : "FALSE") /* Most matrix factorisation routines are in-situ unless otherwise specified */ #define alpha 0.6403882032022076 /* = (1+sqrt(17))/8 */ /* sqr -- returns square of x -- utility function */ double sqr(x) double x; { return x*x; } /* interchange -- a row/column swap routine */ static void interchange(A,i,j) MAT *A; /* assumed != NULL & also SQUARE */ int i, j; /* assumed in range */ { Real **A_me, tmp; int k, n; A_me = A->me; n = A->n; if ( i == j ) return; if ( i > j ) { k = i; i = j; j = k; } for ( k = 0; k < i; k++ ) { /* tmp = A_me[k][i]; */ tmp = m_entry(A,k,i); /* A_me[k][i] = A_me[k][j]; */ m_set_val(A,k,i,m_entry(A,k,j)); /* A_me[k][j] = tmp; */ m_set_val(A,k,j,tmp); } for ( k = j+1; k < n; k++ ) { /* tmp = A_me[j][k]; */ tmp = m_entry(A,j,k); /* A_me[j][k] = A_me[i][k]; */ m_set_val(A,j,k,m_entry(A,i,k)); /* A_me[i][k] = tmp; */ m_set_val(A,i,k,tmp); } for ( k = i+1; k < j; k++ ) { /* tmp = A_me[k][j]; */ tmp = m_entry(A,k,j); /* A_me[k][j] = A_me[i][k]; */ m_set_val(A,k,j,m_entry(A,i,k)); /* A_me[i][k] = tmp; */ m_set_val(A,i,k,tmp); } /* tmp = A_me[i][i]; */ tmp = m_entry(A,i,i); /* A_me[i][i] = A_me[j][j]; */ m_set_val(A,i,i,m_entry(A,j,j)); /* A_me[j][j] = tmp; */ m_set_val(A,j,j,tmp); } /* BKPfactor -- Bunch-Kaufman-Parlett factorisation of A in-situ -- A is factored into the form P'AP = MDM' where P is a permutation matrix, M lower triangular and D is block diagonal with blocks of size 1 or 2 -- P is stored in pivot; blocks[i]==i iff D[i][i] is a block */ MAT *BKPfactor(A,pivot,blocks) MAT *A; PERM *pivot, *blocks; { int i, j, k, n, onebyone, r; Real **A_me, aii, aip1, aip1i, lambda, sigma, tmp; Real det, s, t; if ( ! A || ! pivot || ! blocks ) error(E_NULL,"BKPfactor"); if ( A->m != A->n ) error(E_SQUARE,"BKPfactor"); if ( A->m != pivot->size || pivot->size != blocks->size ) error(E_SIZES,"BKPfactor"); n = A->n; A_me = A->me; px_ident(pivot); px_ident(blocks); for ( i = 0; i < n; i = onebyone ? i+1 : i+2 ) { /* printf("# Stage: %d\n",i); */ aii = fabs(m_entry(A,i,i)); lambda = 0.0; r = (i+1 < n) ? i+1 : i; for ( k = i+1; k < n; k++ ) { tmp = fabs(m_entry(A,i,k)); if ( tmp >= lambda ) { lambda = tmp; r = k; } } /* printf("# lambda = %g, r = %d\n", lambda, r); */ /* printf("# |A[%d][%d]| = %g\n",r,r,fabs(m_entry(A,r,r))); */ /* determine if 1x1 or 2x2 block, and do pivoting if needed */ if ( aii >= alpha*lambda ) { onebyone = TRUE; goto dopivot; } /* compute sigma */ sigma = 0.0; for ( k = i; k < n; k++ ) { if ( k == r ) continue; tmp = ( k > r ) ? fabs(m_entry(A,r,k)) : fabs(m_entry(A,k,r)); if ( tmp > sigma ) sigma = tmp; } if ( aii*sigma >= alpha*sqr(lambda) ) onebyone = TRUE; else if ( fabs(m_entry(A,r,r)) >= alpha*sigma ) { /* printf("# Swapping rows/cols %d and %d\n",i,r); */ interchange(A,i,r); px_transp(pivot,i,r); onebyone = TRUE; } else { /* printf("# Swapping rows/cols %d and %d\n",i+1,r); */ interchange(A,i+1,r); px_transp(pivot,i+1,r); px_transp(blocks,i,i+1); onebyone = FALSE; } /* printf("onebyone = %s\n",btos(onebyone)); */ /* printf("# Matrix so far (@checkpoint A) =\n"); */ /* m_output(A); */ /* printf("# pivot =\n"); px_output(pivot); */ /* printf("# blocks =\n"); px_output(blocks); */ dopivot: if ( onebyone ) { /* do one by one block */ if ( m_entry(A,i,i) != 0.0 ) { aii = m_entry(A,i,i); for ( j = i+1; j < n; j++ ) { tmp = m_entry(A,i,j)/aii; for ( k = j; k < n; k++ ) m_sub_val(A,j,k,tmp*m_entry(A,i,k)); m_set_val(A,i,j,tmp); } } } else /* onebyone == FALSE */ { /* do two by two block */ det = m_entry(A,i,i)*m_entry(A,i+1,i+1)-sqr(m_entry(A,i,i+1)); /* Must have det < 0 */ /* printf("# det = %g\n",det); */ aip1i = m_entry(A,i,i+1)/det; aii = m_entry(A,i,i)/det; aip1 = m_entry(A,i+1,i+1)/det; for ( j = i+2; j < n; j++ ) { s = - aip1i*m_entry(A,i+1,j) + aip1*m_entry(A,i,j); t = - aip1i*m_entry(A,i,j) + aii*m_entry(A,i+1,j); for ( k = j; k < n; k++ ) m_sub_val(A,j,k,m_entry(A,i,k)*s + m_entry(A,i+1,k)*t); m_set_val(A,i,j,s); m_set_val(A,i+1,j,t); } } /* printf("# Matrix so far (@checkpoint B) =\n"); */ /* m_output(A); */ /* printf("# pivot =\n"); px_output(pivot); */ /* printf("# blocks =\n"); px_output(blocks); */ } /* set lower triangular half */ for ( i = 0; i < A->m; i++ ) for ( j = 0; j < i; j++ ) m_set_val(A,i,j,m_entry(A,j,i)); return A; } /* BKPsolve -- solves A.x = b where A has been factored a la BKPfactor() -- returns x, which is created if NULL */ VEC *BKPsolve(A,pivot,block,b,x) MAT *A; PERM *pivot, *block; VEC *b, *x; { static VEC *tmp=VNULL; /* dummy storage needed */ int i, j, n, onebyone; Real **A_me, a11, a12, a22, b1, b2, det, sum, *tmp_ve, tmp_diag; if ( ! A || ! pivot || ! block || ! b ) error(E_NULL,"BKPsolve"); if ( A->m != A->n ) error(E_SQUARE,"BKPsolve"); n = A->n; if ( b->dim != n || pivot->size != n || block->size != n ) error(E_SIZES,"BKPsolve"); x = v_resize(x,n); tmp = v_resize(tmp,n); MEM_STAT_REG(tmp,TYPE_VEC); A_me = A->me; tmp_ve = tmp->ve; px_vec(pivot,b,tmp); /* solve for lower triangular part */ for ( i = 0; i < n; i++ ) { sum = v_entry(tmp,i); if ( block->pe[i] < i ) for ( j = 0; j < i-1; j++ ) sum -= m_entry(A,i,j)*v_entry(tmp,j); else for ( j = 0; j < i; j++ ) sum -= m_entry(A,i,j)*v_entry(tmp,j); v_set_val(tmp,i,sum); } /* printf("# BKPsolve: solving L part: tmp =\n"); v_output(tmp); */ /* solve for diagonal part */ for ( i = 0; i < n; i = onebyone ? i+1 : i+2 ) { onebyone = ( block->pe[i] == i ); if ( onebyone ) { tmp_diag = m_entry(A,i,i); if ( tmp_diag == 0.0 ) error(E_SING,"BKPsolve"); /* tmp_ve[i] /= tmp_diag; */ v_set_val(tmp,i,v_entry(tmp,i) / tmp_diag); } else { a11 = m_entry(A,i,i); a22 = m_entry(A,i+1,i+1); a12 = m_entry(A,i+1,i); b1 = v_entry(tmp,i); b2 = v_entry(tmp,i+1); det = a11*a22-a12*a12; /* < 0 : see BKPfactor() */ if ( det == 0.0 ) error(E_SING,"BKPsolve"); det = 1/det; v_set_val(tmp,i,det*(a22*b1-a12*b2)); v_set_val(tmp,i+1,det*(a11*b2-a12*b1)); } } /* printf("# BKPsolve: solving D part: tmp =\n"); v_output(tmp); */ /* solve for transpose of lower traingular part */ for ( i = n-1; i >= 0; i-- ) { /* use symmetry of factored form to get stride 1 */ sum = v_entry(tmp,i); if ( block->pe[i] > i ) for ( j = i+2; j < n; j++ ) sum -= m_entry(A,i,j)*v_entry(tmp,j); else for ( j = i+1; j < n; j++ ) sum -= m_entry(A,i,j)*v_entry(tmp,j); v_set_val(tmp,i,sum); } /* printf("# BKPsolve: solving L^T part: tmp =\n");v_output(tmp); */ /* and do final permutation */ x = pxinv_vec(pivot,tmp,x); return x; } neuron-7.5/src/mesch/chfactor.c000077500000000000000000000116641323325274500165370ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. */ /* CHfactor.c 1.2 11/25/87 */ static char rcsid[] = "chfactor.c,v 1.1 1997/12/04 17:55:15 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include /* Most matrix factorisation routines are in-situ unless otherwise specified */ /* CHfactor -- Cholesky L.L' factorisation of A in-situ */ MAT *CHfactor(A) MAT *A; { u_int i, j, k, n; Real **A_ent, *A_piv, *A_row, sum, tmp; if ( A==(MAT *)NULL ) error(E_NULL,"CHfactor"); if ( A->m != A->n ) error(E_SQUARE,"CHfactor"); n = A->n; A_ent = A->me; for ( k=0; km != A->n || A->n != b->dim ) error(E_SIZES,"CHsolve"); x = v_resize(x,b->dim); Lsolve(A,b,x,0.0); Usolve(A,x,x,0.0); return (x); } /* LDLfactor -- L.D.L' factorisation of A in-situ */ MAT *LDLfactor(A) MAT *A; { u_int i, k, n, p; Real **A_ent; Real d, sum; static VEC *r = VNULL; if ( ! A ) error(E_NULL,"LDLfactor"); if ( A->m != A->n ) error(E_SQUARE,"LDLfactor"); n = A->n; A_ent = A->me; r = v_resize(r,n); MEM_STAT_REG(r,TYPE_VEC); for ( k = 0; k < n; k++ ) { sum = 0.0; for ( p = 0; p < k; p++ ) { r->ve[p] = A_ent[p][p]*A_ent[k][p]; sum += r->ve[p]*A_ent[k][p]; } d = A_ent[k][k] -= sum; if ( d == 0.0 ) error(E_SING,"LDLfactor"); for ( i = k+1; i < n; i++ ) { sum = __ip__(A_ent[i],r->ve,(int)k); /**************************************** sum = 0.0; for ( p = 0; p < k; p++ ) sum += A_ent[i][p]*r->ve[p]; ****************************************/ A_ent[i][k] = (A_ent[i][k] - sum)/d; } } return A; } VEC *LDLsolve(LDL,b,x) MAT *LDL; VEC *b, *x; { if ( ! LDL || ! b ) error(E_NULL,"LDLsolve"); if ( LDL->m != LDL->n ) error(E_SQUARE,"LDLsolve"); if ( LDL->m != b->dim ) error(E_SIZES,"LDLsolve"); x = v_resize(x,b->dim); Lsolve(LDL,b,x,1.0); Dsolve(LDL,x,x); LTsolve(LDL,x,x,1.0); return x; } /* MCHfactor -- Modified Cholesky L.L' factorisation of A in-situ */ MAT *MCHfactor(A,tol) MAT *A; double tol; { u_int i, j, k, n; Real **A_ent, *A_piv, *A_row, sum, tmp; if ( A==(MAT *)NULL ) error(E_NULL,"MCHfactor"); if ( A->m != A->n ) error(E_SQUARE,"MCHfactor"); if ( tol <= 0.0 ) error(E_RANGE,"MCHfactor"); n = A->n; A_ent = A->me; for ( k=0; k /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Conjugate gradient routines file Uses sparse matrix input & sparse Cholesky factorisation in pccg(). All the following routines use routines to define a matrix rather than use any explicit representation (with the exeception of the pccg() pre-conditioner) The matrix A is defined by VEC *(*A)(void *params, VEC *x, VEC *y) where y = A.x on exit, and y is returned. The params argument is intended to make it easier to re-use & modify such routines. If we have a sparse matrix data structure SPMAT *A_mat; then these can be used by passing sp_mv_mlt as the function, and A_mat as the param. */ #include #include #include "matrix.h" #include "sparse.h" static char rcsid[] = "conjgrad.c,v 1.1 1997/12/04 17:55:16 hines Exp"; /* #define MAX_ITER 10000 */ static int max_iter = 10000; int cg_num_iters; /* matrix-as-routine type definition */ /* #ifdef ANSI_C */ /* typedef VEC *(*MTX_FN)(void *params, VEC *x, VEC *out); */ /* #else */ typedef VEC *(*MTX_FN)(); /* #endif */ #ifdef ANSI_C VEC *spCHsolve(SPMAT *,VEC *,VEC *); #else VEC *spCHsolve(); #endif /* cg_set_maxiter -- sets maximum number of iterations if numiter > 1 -- just returns current max_iter otherwise -- returns old maximum */ int cg_set_maxiter(numiter) int numiter; { int temp; if ( numiter < 2 ) return max_iter; temp = max_iter; max_iter = numiter; return temp; } /* pccg -- solves A.x = b using pre-conditioner M (assumed factored a la spCHfctr()) -- results are stored in x (if x != NULL), which is returned */ VEC *pccg(A,A_params,M_inv,M_params,b,eps,x) MTX_FN A, M_inv; VEC *b, *x; double eps; void *A_params, *M_params; { VEC *r = VNULL, *p = VNULL, *q = VNULL, *z = VNULL; int k; Real alpha, beta, ip, old_ip, norm_b; if ( ! A || ! b ) error(E_NULL,"pccg"); if ( x == b ) error(E_INSITU,"pccg"); x = v_resize(x,b->dim); if ( eps <= 0.0 ) eps = MACHEPS; r = v_get(b->dim); p = v_get(b->dim); q = v_get(b->dim); z = v_get(b->dim); norm_b = v_norm2(b); v_zero(x); r = v_copy(b,r); old_ip = 0.0; for ( k = 0; ; k++ ) { if ( v_norm2(r) < eps*norm_b ) break; if ( k > max_iter ) error(E_ITER,"pccg"); if ( M_inv ) (*M_inv)(M_params,r,z); else v_copy(r,z); /* M == identity */ ip = in_prod(z,r); if ( k ) /* if ( k > 0 ) ... */ { beta = ip/old_ip; p = v_mltadd(z,p,beta,p); } else /* if ( k == 0 ) ... */ { beta = 0.0; p = v_copy(z,p); old_ip = 0.0; } q = (*A)(A_params,p,q); alpha = ip/in_prod(p,q); x = v_mltadd(x,p,alpha,x); r = v_mltadd(r,q,-alpha,r); old_ip = ip; } cg_num_iters = k; V_FREE(p); V_FREE(q); V_FREE(r); V_FREE(z); return x; } /* sp_pccg -- a simple interface to pccg() which uses sparse matrix data structures -- assumes that LLT contains the Cholesky factorisation of the actual pre-conditioner */ VEC *sp_pccg(A,LLT,b,eps,x) SPMAT *A, *LLT; VEC *b, *x; double eps; { return pccg(sp_mv_mlt,A,spCHsolve,LLT,b,eps,x); } /* Routines for performing the CGS (Conjugate Gradient Squared) algorithm of P. Sonneveld: "CGS, a fast Lanczos-type solver for nonsymmetric linear systems", SIAM J. Sci. & Stat. Comp. v. 10, pp. 36--52 */ /* cgs -- uses CGS to compute a solution x to A.x=b -- the matrix A is not passed explicitly, rather a routine A is passed where A(x,Ax,params) computes Ax = A.x -- the computed solution is passed */ VEC *cgs(A,A_params,b,r0,tol,x) MTX_FN A; VEC *x, *b; VEC *r0; /* tilde r0 parameter -- should be random??? */ double tol; /* error tolerance used */ void *A_params; { VEC *p, *q, *r, *u, *v, *tmp1, *tmp2; Real alpha, beta, norm_b, rho, old_rho, sigma; int iter; if ( ! A || ! x || ! b || ! r0 ) error(E_NULL,"cgs"); if ( x->dim != b->dim || r0->dim != x->dim ) error(E_SIZES,"cgs"); if ( tol <= 0.0 ) tol = MACHEPS; p = v_get(x->dim); q = v_get(x->dim); r = v_get(x->dim); u = v_get(x->dim); v = v_get(x->dim); tmp1 = v_get(x->dim); tmp2 = v_get(x->dim); norm_b = v_norm2(b); (*A)(A_params,x,tmp1); v_sub(b,tmp1,r); v_zero(p); v_zero(q); old_rho = 1.0; iter = 0; while ( v_norm2(r) > tol*norm_b ) { if ( ++iter > max_iter ) break; /* error(E_ITER,"cgs"); */ rho = in_prod(r0,r); if ( old_rho == 0.0 ) error(E_SING,"cgs"); beta = rho/old_rho; v_mltadd(r,q,beta,u); v_mltadd(q,p,beta,tmp1); v_mltadd(u,tmp1,beta,p); (*A)(A_params,p,v); sigma = in_prod(r0,v); if ( sigma == 0.0 ) error(E_SING,"cgs"); alpha = rho/sigma; v_mltadd(u,v,-alpha,q); v_add(u,q,tmp1); (*A)(A_params,tmp1,tmp2); v_mltadd(r,tmp2,-alpha,r); v_mltadd(x,tmp1,alpha,x); old_rho = rho; } cg_num_iters = iter; V_FREE(p); V_FREE(q); V_FREE(r); V_FREE(u); V_FREE(v); V_FREE(tmp1); V_FREE(tmp2); return x; } /* sp_cgs -- simple interface for SPMAT data structures */ VEC *sp_cgs(A,b,r0,tol,x) SPMAT *A; VEC *b, *r0, *x; double tol; { return cgs(sp_mv_mlt,A,b,r0,tol,x); } /* Routine for performing LSQR -- the least squares QR algorithm of Paige and Saunders: "LSQR: an algorithm for sparse linear equations and sparse least squares", ACM Trans. Math. Soft., v. 8 pp. 43--71 (1982) */ /* lsqr -- sparse CG-like least squares routine: -- finds min_x ||A.x-b||_2 using A defined through A & AT -- returns x (if x != NULL) */ VEC *lsqr(A,AT,A_params,b,tol,x) MTX_FN A, AT; /* AT is A transposed */ VEC *x, *b; double tol; /* error tolerance used */ void *A_params; { VEC *u, *v, *w, *tmp; Real alpha, beta, norm_b, phi, phi_bar, rho, rho_bar, rho_max, theta; Real s, c; /* for Givens' rotations */ int iter, m, n; if ( ! b || ! x ) error(E_NULL,"lsqr"); if ( tol <= 0.0 ) tol = MACHEPS; m = b->dim; n = x->dim; u = v_get((u_int)m); v = v_get((u_int)n); w = v_get((u_int)n); tmp = v_get((u_int)n); norm_b = v_norm2(b); v_zero(x); beta = v_norm2(b); if ( beta == 0.0 ) return x; sv_mlt(1.0/beta,b,u); tracecatch((*AT)(A_params,u,v),"lsqr"); alpha = v_norm2(v); if ( alpha == 0.0 ) return x; sv_mlt(1.0/alpha,v,v); v_copy(v,w); phi_bar = beta; rho_bar = alpha; rho_max = 1.0; iter = 0; do { if ( ++iter > max_iter ) error(E_ITER,"lsqr"); tmp = v_resize(tmp,m); tracecatch((*A) (A_params,v,tmp),"lsqr"); v_mltadd(tmp,u,-alpha,u); beta = v_norm2(u); sv_mlt(1.0/beta,u,u); tmp = v_resize(tmp,n); tracecatch((*AT)(A_params,u,tmp),"lsqr"); v_mltadd(tmp,v,-beta,v); alpha = v_norm2(v); sv_mlt(1.0/alpha,v,v); rho = sqrt(rho_bar*rho_bar+beta*beta); if ( rho > rho_max ) rho_max = rho; c = rho_bar/rho; s = beta/rho; theta = s*alpha; rho_bar = -c*alpha; phi = c*phi_bar; phi_bar = s*phi_bar; /* update x & w */ if ( rho == 0.0 ) error(E_SING,"lsqr"); v_mltadd(x,w,phi/rho,x); v_mltadd(v,w,-theta/rho,w); } while ( fabs(phi_bar*alpha*c) > tol*norm_b/rho_max ); cg_num_iters = iter; V_FREE(tmp); V_FREE(u); V_FREE(v); V_FREE(w); return x; } /* sp_lsqr -- simple interface for SPMAT data structures */ VEC *sp_lsqr(A,b,tol,x) SPMAT *A; VEC *b, *x; double tol; { return lsqr(sp_mv_mlt,sp_vm_mlt,A,b,tol,x); } neuron-7.5/src/mesch/copy.c000077500000000000000000000126601323325274500157150ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ static char rcsid[] = "copy.c,v 1.1 1997/12/04 17:55:17 hines Exp"; #include #include "matrix.h" /* _m_copy -- copies matrix into new area */ MAT *_m_copy(in,out,i0,j0) MAT *in,*out; u_int i0,j0; { u_int i /* ,j */; if ( in==MNULL ) error(E_NULL,"_m_copy"); if ( in==out ) return (out); if ( out==MNULL || out->m < in->m || out->n < in->n ) out = m_resize(out,in->m,in->n); for ( i=i0; i < in->m; i++ ) MEM_COPY(&(in->me[i][j0]),&(out->me[i][j0]), (in->n - j0)*sizeof(Real)); /* for ( j=j0; j < in->n; j++ ) out->me[i][j] = in->me[i][j]; */ return (out); } /* _v_copy -- copies vector into new area */ VEC *_v_copy(in,out,i0) VEC *in,*out; u_int i0; { /* u_int i,j; */ if ( in==VNULL ) error(E_NULL,"_v_copy"); if ( in==out ) return (out); if ( out==VNULL || out->dim < in->dim ) out = v_resize(out,in->dim); MEM_COPY(&(in->ve[i0]),&(out->ve[i0]),(in->dim - i0)*sizeof(Real)); /* for ( i=i0; i < in->dim; i++ ) out->ve[i] = in->ve[i]; */ return (out); } /* px_copy -- copies permutation 'in' to 'out' */ PERM *px_copy(in,out) PERM *in,*out; { /* int i; */ if ( in == PNULL ) error(E_NULL,"px_copy"); if ( in == out ) return out; if ( out == PNULL || out->size != in->size ) out = px_resize(out,in->size); MEM_COPY(in->pe,out->pe,in->size*sizeof(u_int)); /* for ( i = 0; i < in->size; i++ ) out->pe[i] = in->pe[i]; */ return out; } /* The .._move() routines are for moving blocks of memory around within Meschach data structures and for re-arranging matrices, vectors etc. */ /* m_move -- copies selected pieces of a matrix -- moves the m0 x n0 submatrix with top-left cor-ordinates (i0,j0) to the corresponding submatrix of out with top-left co-ordinates (i1,j1) -- out is resized (& created) if necessary */ MAT *m_move(in,i0,j0,m0,n0,out,i1,j1) MAT *in, *out; int i0, j0, m0, n0, i1, j1; { int i; if ( ! in ) error(E_NULL,"m_move"); if ( i0 < 0 || j0 < 0 || i1 < 0 || j1 < 0 || m0 < 0 || n0 < 0 || i0+m0 > in->m || j0+n0 > in->n ) error(E_BOUNDS,"m_move"); if ( ! out ) out = m_resize(out,i1+m0,j1+n0); else if ( i1+m0 > out->m || j1+n0 > out->n ) out = m_resize(out,max(out->m,i1+m0),max(out->n,j1+n0)); for ( i = 0; i < m0; i++ ) MEM_COPY(&(in->me[i0+i][j0]),&(out->me[i1+i][j1]), n0*sizeof(Real)); return out; } /* v_move -- copies selected pieces of a vector -- moves the length dim0 subvector with initial index i0 to the corresponding subvector of out with initial index i1 -- out is resized if necessary */ VEC *v_move(in,i0,dim0,out,i1) VEC *in, *out; int i0, dim0, i1; { if ( ! in ) error(E_NULL,"v_move"); if ( i0 < 0 || dim0 < 0 || i1 < 0 || i0+dim0 > in->dim ) error(E_BOUNDS,"v_move"); if ( (! out) || i1+dim0 > out->dim ) out = v_resize(out,i1+dim0); MEM_COPY(&(in->ve[i0]),&(out->ve[i1]),dim0*sizeof(Real)); return out; } /* mv_move -- copies selected piece of matrix to a vector -- moves the m0 x n0 submatrix with top-left co-ordinate (i0,j0) to the subvector with initial index i1 (and length m0*n0) -- rows are copied contiguously -- out is resized if necessary */ VEC *mv_move(in,i0,j0,m0,n0,out,i1) MAT *in; VEC *out; int i0, j0, m0, n0, i1; { int dim1, i; if ( ! in ) error(E_NULL,"mv_move"); if ( i0 < 0 || j0 < 0 || m0 < 0 || n0 < 0 || i1 < 0 || i0+m0 > in->m || j0+n0 > in->n ) error(E_BOUNDS,"mv_move"); dim1 = m0*n0; if ( (! out) || i1+dim1 > out->dim ) out = v_resize(out,i1+dim1); for ( i = 0; i < m0; i++ ) MEM_COPY(&(in->me[i0+i][j0]),&(out->ve[i1+i*n0]),n0*sizeof(Real)); return out; } /* vm_move -- copies selected piece of vector to a matrix -- moves the subvector with initial index i0 and length m1*n1 to the m1 x n1 submatrix with top-left co-ordinate (i1,j1) -- copying is done by rows -- out is resized if necessary */ MAT *vm_move(in,i0,out,i1,j1,m1,n1) VEC *in; MAT *out; int i0, i1, j1, m1, n1; { int dim0, i; if ( ! in ) error(E_NULL,"vm_move"); if ( i0 < 0 || i1 < 0 || j1 < 0 || m1 < 0 || n1 < 0 || i0+m1*n1 > in->dim ) error(E_BOUNDS,"vm_move"); if ( ! out ) out = m_resize(out,i1+m1,j1+n1); else out = m_resize(out,max(i1+m1,out->m),max(j1+n1,out->n)); dim0 = m1*n1; for ( i = 0; i < m1; i++ ) MEM_COPY(&(in->ve[i0+i*n1]),&(out->me[i1+i][j1]),n1*sizeof(Real)); return out; } neuron-7.5/src/mesch/dmacheps.c000077500000000000000000000026471323325274500165330ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ #include double dclean(x) double x; { static double y; y = x; return y; /* prevents optimisation */ } int main() { static double deps, deps1, dtmp; deps = 1.0; while ( dclean(1.0+deps) > 1.0 ) deps = 0.5*deps; printf("%g\n", 2.0*deps); return 0; } neuron-7.5/src/mesch/err.c000077500000000000000000000235561323325274500155410ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File with basic error-handling operations Based on previous version on Zilog System 8000 setret() etc. Ported to Pyramid 9810 late 1987 */ static char rcsid[] = "err.c,v 1.1 1997/12/04 17:55:19 hines Exp"; #include #include #include #include "err.h" #if defined(__MWERKS__) #define isascii isprint #undef SYSV #endif #ifdef SYSV /* AT&T System V */ #include #else /* something else -- assume BSD or ANSI C */ #include #endif #ifndef FALSE #define FALSE 0 #define TRUE 1 #endif #define EF_EXIT 0 #define EF_ABORT 1 #define EF_JUMP 2 #define EF_SILENT 3 /* The only error caught in this file! */ #define E_SIGNAL 16 static char *err_mesg[] = { "unknown error", /* 0 */ "sizes of objects don't match", /* 1 */ "index out of bounds", /* 2 */ "can't allocate memory", /* 3 */ "singular matrix", /* 4 */ "matrix not positive definite", /* 5 */ "incorrect format input", /* 6 */ "bad input file/device", /* 7 */ "NULL objects passed", /* 8 */ "matrix not square", /* 9 */ "object out of range", /* 10 */ "can't do operation in situ for non-square matrix", /* 11 */ "can't do operation in situ", /* 12 */ "excessive number of iterations", /* 13 */ "convergence criterion failed", /* 14 */ "bad starting value", /* 15 */ "floating exception", /* 16 */ "internal inconsistency (data structure)",/* 17 */ "unexpected end-of-file", /* 18 */ "shared vectors (cannot release them)", /* 19 */ "negative argument", /* 20 */ "cannot overwrite object", /* 21 */ "breakdown in iterative method" /* 22 */ }; #define MAXERR (sizeof(err_mesg)/sizeof(char *)) static char *warn_mesg[] = { "unknown warning", /* 0 */ "wrong type number (use macro TYPE_*)", /* 1 */ "no corresponding mem_stat_mark", /* 2 */ "computed norm of a residual is less than 0", /* 3 */ "resizing a shared vector" /* 4 */ }; #define MAXWARN (sizeof(warn_mesg)/sizeof(char *)) #define MAX_ERRS 100 jmp_buf restart; /* array of pointers to lists of errors */ typedef struct { char **listp; /* pointer to a list of errors */ unsigned len; /* length of the list */ unsigned warn; /* =FALSE - errors, =TRUE - warnings */ } Err_list; static Err_list err_list[ERR_LIST_MAX_LEN] = { {err_mesg,MAXERR,FALSE}, /* basic errors list */ {warn_mesg,MAXWARN,TRUE} /* basic warnings list */ }; static int err_list_end = 2; /* number of elements in err_list */ /* attach a new list of errors pointed by err_ptr or change a previous one; list_len is the number of elements in the list; list_num is the list number; warn == FALSE - errors (stop the program), warn == TRUE - warnings (continue the program); Note: lists numbered 0 and 1 are attached automatically, you do not need to do it */ int err_list_attach(list_num, list_len,err_ptr,warn) int list_num, list_len, warn; char **err_ptr; { if (list_num < 0 || list_len <= 0 || err_ptr == (char **)NULL) return -1; if (list_num >= ERR_LIST_MAX_LEN) { fprintf(stderr,"\n file \"%s\": %s %s\n", "err.c","increase the value of ERR_LIST_MAX_LEN", "in matrix.h and zmatdef.h"); if ( ! isatty(fileno(stdout)) ) fprintf(stderr,"\n file \"%s\": %s %s\n", "err.c","increase the value of ERR_LIST_MAX_LEN", "in matrix.h and zmatdef.h"); printf("Exiting program\n"); exit(0); } if (err_list[list_num].listp != (char **)NULL && err_list[list_num].listp != err_ptr) free((char *)err_list[list_num].listp); err_list[list_num].listp = err_ptr; err_list[list_num].len = list_len; err_list[list_num].warn = warn; err_list_end = list_num+1; return list_num; } /* release the error list numbered list_num */ int err_list_free(list_num) int list_num; { if (list_num < 0 || list_num >= err_list_end) return -1; if (err_list[list_num].listp != (char **)NULL) { err_list[list_num].listp = (char **)NULL; err_list[list_num].len = 0; err_list[list_num].warn = 0; } return 0; } /* check if list_num is attached; return FALSE if not; return TRUE if yes */ int err_is_list_attached(list_num) int list_num; { if (list_num < 0 || list_num >= err_list_end) return FALSE; if (err_list[list_num].listp != (char **)NULL) return TRUE; return FALSE; } /* other local variables */ static int err_flag = EF_EXIT, num_errs = 0, cnt_errs = 1; /* set_err_flag -- sets err_flag -- returns old err_flag */ int set_err_flag(flag) int flag; { int tmp; tmp = err_flag; err_flag = flag; return tmp; } /* count_errs -- sets cnt_errs (TRUE/FALSE) & returns old value */ int count_errs(flag) int flag; { int tmp; tmp = cnt_errs; cnt_errs = flag; return tmp; } /* ev_err -- reports error (err_num) in file "file" at line "line_num" and returns to user error handler; list_num is an error list number (0 is the basic list pointed by err_mesg, 1 is the basic list of warnings) */ int ev_err(file,err_num,line_num,fn_name,list_num) char *file, *fn_name; int err_num, line_num,list_num; { int num; if ( err_num < 0 ) err_num = 0; if (list_num < 0 || list_num >= err_list_end || err_list[list_num].listp == (char **)NULL) { fprintf(stderr, "\n Not (properly) attached list of errors: list_num = %d\n", list_num); fprintf(stderr," Call \"err_list_attach\" in your program\n"); if ( ! isatty(fileno(stdout)) ) { fprintf(stderr, "\n Not (properly) attached list of errors: list_num = %d\n", list_num); fprintf(stderr," Call \"err_list_attach\" in your program\n"); } printf("\nExiting program\n"); exit(0); } num = err_num; if ( num >= err_list[list_num].len ) num = 0; if ( cnt_errs && ++num_errs >= MAX_ERRS ) /* too many errors */ { fprintf(stderr,"\n\"%s\", line %d: %s in function %s()\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); if ( ! isatty(fileno(stdout)) ) fprintf(stdout,"\n\"%s\", line %d: %s in function %s()\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); printf("Sorry, too many errors: %d\n",num_errs); printf("Exiting program\n"); exit(0); } if ( err_list[list_num].warn ) switch ( err_flag ) { case EF_SILENT: break; default: fprintf(stderr,"\n\"%s\", line %d: %s in function %s()\n\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); if ( ! isatty(fileno(stdout)) ) fprintf(stdout,"\n\"%s\", line %d: %s in function %s()\n\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); break; } else switch ( err_flag ) { case EF_SILENT: longjmp(restart,(err_num==0)? -1 : err_num); break; case EF_ABORT: fprintf(stderr,"\n\"%s\", line %d: %s in function %s()\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); if ( ! isatty(fileno(stdout)) ) fprintf(stdout,"\n\"%s\", line %d: %s in function %s()\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); abort(); break; case EF_JUMP: fprintf(stderr,"\n\"%s\", line %d: %s in function %s()\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); if ( ! isatty(fileno(stdout)) ) fprintf(stdout,"\n\"%s\", line %d: %s in function %s()\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); longjmp(restart,(err_num==0)? -1 : err_num); break; default: fprintf(stderr,"\n\"%s\", line %d: %s in function %s()\n\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); if ( ! isatty(fileno(stdout)) ) fprintf(stdout,"\n\"%s\", line %d: %s in function %s()\n\n", file,line_num,err_list[list_num].listp[num], isascii(*fn_name) ? fn_name : "???"); break; } /* ensure exit if fall through */ if ( ! err_list[list_num].warn ) { #ifdef NEURON hoc_execerror("meschach library error", (char*)0); #else exit(0); #endif } return 0; } /* float_error -- catches floating arithmetic signals */ static void float_error(num) int num; { signal(SIGFPE,float_error); /* fprintf(stderr,"SIGFPE: signal #%d\n",num); */ /* fprintf(stderr,"errno = %d\n",errno); */ ev_err("???.c",E_SIGNAL,0,"???",0); } /* catch_signal -- sets up float_error() to catch SIGFPE's */ void catch_FPE() { signal(SIGFPE,float_error); } neuron-7.5/src/mesch/err.h000077500000000000000000000131051323325274500155330ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* err.h 28/09/1993 */ /* RCS id: err.h,v 1.1 1997/11/03 16:15:48 hines Exp */ #ifndef ERRHEADER #define ERRHEADER #include #include "machine.h" /* Error recovery */ extern jmp_buf restart; /* max. # of error lists */ #define ERR_LIST_MAX_LEN 10 /* main error functions */ #ifndef ANSI_C extern int ev_err(); /* main error handler */ extern int set_err_flag(); /* for different ways of handling errors, returns old value */ extern int count_errs(); /* to avoid "too many errors" */ extern int err_list_attach(); /* for attaching a list of errors */ extern int err_is_list_attached(); /* checking if a list is attached */ extern int err_list_free(); /* freeing a list of errors */ #else /* ANSI_C */ extern int ev_err(char *,int,int,char *,int); /* main error handler */ extern int set_err_flag(int flag); /* for different ways of handling errors, returns old value */ extern int count_errs(int true_false); /* to avoid "too many errors" */ extern int err_list_attach(int list_num, int list_len, char **err_ptr,int warn); /* for attaching a list of errors */ extern int err_is_list_attached(int list_num); /* checking if a list is attached */ extern int err_list_free(int list_num); /* freeing a list of errors */ #endif /* error(E_TYPE,"myfunc") raises error type E_TYPE for function my_func() */ #define error(err_num,fn_name) ev_err(__FILE__,err_num,__LINE__,fn_name,0) /* warning(WARN_TYPE,"myfunc") raises warning type WARN_TYPE for function my_func() */ #define warning(err_num,fn_name) ev_err(__FILE__,err_num,__LINE__,fn_name,1) /* error flags */ #define EF_EXIT 0 /* exit on error */ #define EF_ABORT 1 /* abort (dump core) on error */ #define EF_JUMP 2 /* jump on error */ #define EF_SILENT 3 /* jump, but don't print message */ #define ERREXIT() set_err_flag(EF_EXIT) #define ERRABORT() set_err_flag(EF_ABORT) /* don't print message */ #define SILENTERR() if ( ! setjmp(restart) ) set_err_flag(EF_SILENT) /* return here on error */ #define ON_ERROR() if ( ! setjmp(restart) ) set_err_flag(EF_JUMP) /* error types */ #define E_UNKNOWN 0 #define E_SIZES 1 #define E_BOUNDS 2 #define E_MEM 3 #define E_SING 4 #define E_POSDEF 5 #define E_FORMAT 6 #define E_INPUT 7 #define E_NULL 8 #define E_SQUARE 9 #define E_RANGE 10 #define E_INSITU2 11 #define E_INSITU 12 #define E_ITER 13 #define E_CONV 14 #define E_START 15 #define E_SIGNAL 16 #define E_INTERN 17 #define E_EOF 18 #define E_SHARED_VECS 19 #define E_NEG 20 #define E_OVERWRITE 21 #define E_BREAKDOWN 22 /* warning types */ #define WARN_UNKNOWN 0 #define WARN_WRONG_TYPE 1 #define WARN_NO_MARK 2 #define WARN_RES_LESS_0 3 #define WARN_SHARED_VEC 4 /* error catching macros */ /* execute err_part if error errnum is raised while executing ok_part */ #define catch(errnum,ok_part,err_part) \ { jmp_buf _save; int _err_num, _old_flag; \ _old_flag = set_err_flag(EF_SILENT); \ MEM_COPY(restart,_save,sizeof(jmp_buf)); \ if ( (_err_num=setjmp(restart)) == 0 ) \ { ok_part; \ set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); } \ else if ( _err_num == errnum ) \ { set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); \ err_part; } \ else { set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); \ error(_err_num,"catch"); \ } \ } /* execute err_part if any error raised while executing ok_part */ #define catchall(ok_part,err_part) \ { jmp_buf _save; int _err_num, _old_flag; \ _old_flag = set_err_flag(EF_SILENT); \ MEM_COPY(restart,_save,sizeof(jmp_buf)); \ if ( (_err_num=setjmp(restart)) == 0 ) \ { ok_part; \ set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); } \ else \ { set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); \ err_part; } \ } /* print message if error raised while executing ok_part, then re-raise error to trace calls */ #define tracecatch(ok_part,function) \ { jmp_buf _save; int _err_num, _old_flag; \ _old_flag = set_err_flag(EF_JUMP); \ MEM_COPY(restart,_save,sizeof(jmp_buf)); \ if ( (_err_num=setjmp(restart)) == 0 ) \ { ok_part; \ set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); } \ else \ { set_err_flag(_old_flag); \ MEM_COPY(_save,restart,sizeof(jmp_buf)); \ error(_err_num,function); } \ } #endif /* ERRHEADER */ neuron-7.5/src/mesch/extras.c000077500000000000000000000253161323325274500162530ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Memory port routines: MEM_COPY and MEM_ZERO */ /* For BSD 4.[23] environments: using bcopy() and bzero() */ #include "machine.h" #ifndef MEM_COPY void MEM_COPY(from,to,len) char *from, *to; int len; { int i; if ( from < to ) { for ( i = 0; i < len; i++ ) *to++ = *from++; } else { from += len; to += len; for ( i = 0; i < len; i++ ) *(--to) = *(--from); } } #endif #ifndef MEM_ZERO void MEM_ZERO(ptr,len) char *ptr; int len; { int i; for ( i = 0; i < len; i++ ) *(ptr++) = '\0'; } #endif /* This file contains versions of something approximating the well-known BLAS routines in C, suitable for Meschach (hence the `m'). These are "vanilla" implementations, at least with some consideration of the effects of caching and paging, and maybe some loop unrolling for register-rich machines */ /* Organisation of matrices: it is assumed that matrices are represented by Real **'s. To keep flexibility, there is also an "initial column" parameter j0, so that the actual elements used are A[0][j0], A[0][j0+1], ..., A[0][j0+n-1] A[1][j0], A[1][j0+1], ..., A[1][j0+n-1] .. .. ... .. A[m-1][j0], A[m-1][j0+1], ..., A[m-1][j0+n-1] */ static char rcsid[] = "$Id: extras.c,v 1.4 1995/06/08 15:13:15 des Exp $"; #include #define REGISTER_RICH 1 /* mblar-1 routines */ /* Mscale -- sets x <- alpha.x */ void Mscale(len,alpha,x) int len; double alpha; Real *x; { register int i; for ( i = 0; i < len; i++ ) x[i] *= alpha; } /* Mswap -- swaps x and y */ void Mswap(len,x,y) int len; Real *x, *y; { register int i; register Real tmp; for ( i = 0; i < len; i++ ) { tmp = x[i]; x[i] = y[i]; y[i] = tmp; } } /* Mcopy -- copies x to y */ void Mcopy(len,x,y) int len; Real *x, *y; { register int i; for ( i = 0; i < len; i++ ) y[i] = x[i]; } /* Maxpy -- y <- y + alpha.x */ void Maxpy(len,alpha,x,y) int len; double alpha; Real *x, *y; { register int i, len4; /**************************************** for ( i = 0; i < len; i++ ) y[i] += alpha*x[i]; ****************************************/ #ifdef REGISTER_RICH len4 = len / 4; len = len % 4; for ( i = 0; i < len4; i++ ) { y[4*i] += alpha*x[4*i]; y[4*i+1] += alpha*x[4*i+1]; y[4*i+2] += alpha*x[4*i+2]; y[4*i+3] += alpha*x[4*i+3]; } x += 4*len4; y += 4*len4; #endif for ( i = 0; i < len; i++ ) y[i] += alpha*x[i]; } /* Mdot -- returns x'.y */ double Mdot(len,x,y) int len; Real *x, *y; { register int i, len4; register Real sum; #ifndef REGISTER_RICH sum = 0.0; #endif #ifdef REGISTER_RICH register Real sum0, sum1, sum2, sum3; sum0 = sum1 = sum2 = sum3 = 0.0; len4 = len / 4; len = len % 4; for ( i = 0; i < len4; i++ ) { sum0 += x[4*i ]*y[4*i ]; sum1 += x[4*i+1]*y[4*i+1]; sum2 += x[4*i+2]*y[4*i+2]; sum3 += x[4*i+3]*y[4*i+3]; } sum = sum0 + sum1 + sum2 + sum3; x += 4*len4; y += 4*len4; #endif for ( i = 0; i < len; i++ ) sum += x[i]*y[i]; return sum; } #ifndef ABS #define ABS(x) ((x) >= 0 ? (x) : -(x)) #endif /* Mnorminf -- returns ||x||_inf */ double Mnorminf(len,x) int len; Real *x; { register int i; register Real tmp, max_val; max_val = 0.0; for ( i = 0; i < len; i++ ) { tmp = ABS(x[i]); if ( max_val < tmp ) max_val = tmp; } return max_val; } /* Mnorm1 -- returns ||x||_1 */ double Mnorm1(len,x) int len; Real *x; { register int i; register Real sum; sum = 0.0; for ( i = 0; i < len; i++ ) sum += ABS(x[i]); return sum; } /* Mnorm2 -- returns ||x||_2 */ double Mnorm2(len,x) int len; Real *x; { register int i; register Real norm, invnorm, sum, tmp; norm = Mnorminf(len,x); if ( norm == 0.0 ) return 0.0; invnorm = 1.0/norm; sum = 0.0; for ( i = 0; i < len; i++ ) { tmp = x[i]*invnorm; sum += tmp*tmp; } return sum/invnorm; } /* mblar-2 routines */ /* Mmv -- y <- alpha.A.x + beta.y */ void Mmv(m,n,alpha,A,j0,x,beta,y) int m, n, j0; double alpha, beta; Real **A, *x, *y; { register int i, j, m4, n4; register Real sum0, sum1, sum2, sum3, tmp0, tmp1, tmp2, tmp3; register Real *dp0, *dp1, *dp2, *dp3; /**************************************** for ( i = 0; i < m; i++ ) y[i] += alpha*Mdot(n,&(A[i][j0]),x); ****************************************/ m4 = n4 = 0; #ifdef REGISTER_RICH m4 = m / 4; m = m % 4; n4 = n / 4; n = n % 4; for ( i = 0; i < m4; i++ ) { sum0 = sum1 = sum2 = sum3 = 0.0; dp0 = &(A[4*i ][j0]); dp1 = &(A[4*i+1][j0]); dp2 = &(A[4*i+2][j0]); dp3 = &(A[4*i+3][j0]); for ( j = 0; j < n4; j++ ) { tmp0 = x[4*j ]; tmp1 = x[4*j+1]; tmp2 = x[4*j+2]; tmp3 = x[4*j+3]; sum0 = sum0 + dp0[j]*tmp0 + dp0[j+1]*tmp1 + dp0[j+2]*tmp2 + dp0[j+3]*tmp3; sum1 = sum1 + dp1[j]*tmp0 + dp1[j+1]*tmp1 + dp1[j+2]*tmp2 + dp1[j+3]*tmp3; sum2 = sum2 + dp2[j]*tmp0 + dp2[j+1]*tmp1 + dp2[j+2]*tmp2 + dp2[j+3]*tmp3; sum3 = sum3 + dp3[j]*tmp0 + dp3[j+1]*tmp2 + dp3[j+2]*tmp2 + dp3[j+3]*tmp3; } for ( j = 0; j < n; j++ ) { sum0 += dp0[4*n4+j]*x[4*n4+j]; sum1 += dp1[4*n4+j]*x[4*n4+j]; sum2 += dp2[4*n4+j]*x[4*n4+j]; sum3 += dp3[4*n4+j]*x[4*n4+j]; } y[4*i ] = beta*y[4*i ] + alpha*sum0; y[4*i+1] = beta*y[4*i+1] + alpha*sum1; y[4*i+2] = beta*y[4*i+2] + alpha*sum2; y[4*i+3] = beta*y[4*i+3] + alpha*sum3; } #endif for ( i = 0; i < m; i++ ) y[4*m4+i] = beta*y[i] + alpha*Mdot(4*n4+n,&(A[4*m4+i][j0]),x); } /* Mvm -- y <- alpha.A^T.x + beta.y */ void Mvm(m,n,alpha,A,j0,x,beta,y) int m, n, j0; double alpha, beta; Real **A, *x, *y; { register int i, j, m4, n2; register Real *Aref; register Real tmp; #ifdef REGISTER_RICH register Real *Aref0, *Aref1; register Real tmp0, tmp1; register Real yval0, yval1, yval2, yval3; #endif if ( beta != 1.0 ) Mscale(m,beta,y); /**************************************** for ( j = 0; j < n; j++ ) Maxpy(m,alpha*x[j],&(A[j][j0]),y); ****************************************/ m4 = n2 = 0; m4 = m / 4; m = m % 4; #ifdef REGISTER_RICH n2 = n / 2; n = n % 2; for ( j = 0; j < n2; j++ ) { tmp0 = alpha*x[2*j]; tmp1 = alpha*x[2*j+1]; Aref0 = &(A[2*j ][j0]); Aref1 = &(A[2*j+1][j0]); for ( i = 0; i < m4; i++ ) { yval0 = y[4*i ] + tmp0*Aref0[4*i ]; yval1 = y[4*i+1] + tmp0*Aref0[4*i+1]; yval2 = y[4*i+2] + tmp0*Aref0[4*i+2]; yval3 = y[4*i+3] + tmp0*Aref0[4*i+3]; y[4*i ] = yval0 + tmp1*Aref1[4*i ]; y[4*i+1] = yval1 + tmp1*Aref1[4*i+1]; y[4*i+2] = yval2 + tmp1*Aref1[4*i+2]; y[4*i+3] = yval3 + tmp1*Aref1[4*i+3]; } y += 4*m4; Aref0 += 4*m4; Aref1 += 4*m4; for ( i = 0; i < m; i++ ) y[i] += tmp0*Aref0[i] + tmp1*Aref1[i]; } #endif for ( j = 0; j < n; j++ ) { tmp = alpha*x[2*n2+j]; Aref = &(A[2*n2+j][j0]); for ( i = 0; i < m4; i++ ) { y[4*i ] += tmp*Aref[4*i ]; y[4*i+1] += tmp*Aref[4*i+1]; y[4*i+2] += tmp*Aref[4*i+2]; y[4*i+3] += tmp*Aref[4*i+3]; } y += 4*m4; Aref += 4*m4; for ( i = 0; i < m; i++ ) y[i] += tmp*Aref[i]; } } /* Mupdate -- A <- A + alpha.x.y^T */ void Mupdate(m,n,alpha,x,y,A,j0) int m, n, j0; double alpha; Real **A, *x, *y; { register int i, j, n4; register Real *Aref; register Real tmp; /**************************************** for ( i = 0; i < m; i++ ) Maxpy(n,alpha*x[i],y,&(A[i][j0])); ****************************************/ n4 = n / 4; n = n % 4; for ( i = 0; i < m; i++ ) { tmp = alpha*x[i]; Aref = &(A[i][j0]); for ( j = 0; j < n4; j++ ) { Aref[4*j ] += tmp*y[4*j ]; Aref[4*j+1] += tmp*y[4*j+1]; Aref[4*j+2] += tmp*y[4*j+2]; Aref[4*j+3] += tmp*y[4*j+3]; } Aref += 4*n4; y += 4*n4; for ( j = 0; j < n; j++ ) Aref[j] += tmp*y[j]; } } /* mblar-3 routines */ /* Mmm -- C <- C + alpha.A.B */ void Mmm(m,n,p,alpha,A,Aj0,B,Bj0,C,Cj0) int m, n, p; /* C is m x n */ double alpha; Real **A, **B, **C; int Aj0, Bj0, Cj0; { register int i, j, k; /* register Real tmp, sum; */ /**************************************** for ( i = 0; i < m; i++ ) for ( k = 0; k < p; k++ ) Maxpy(n,alpha*A[i][Aj0+k],&(B[k][Bj0]),&(C[i][Cj0])); ****************************************/ for ( i = 0; i < m; i++ ) Mvm(p,n,alpha,B,Bj0,&(A[i][Aj0]),1.0,&(C[i][Cj0])); } /* Mmtrm -- C <- C + alpha.A^T.B */ void Mmtrm(m,n,p,alpha,A,Aj0,B,Bj0,C,Cj0) int m, n, p; /* C is m x n */ double alpha; Real **A, **B, **C; int Aj0, Bj0, Cj0; { register int i, j, k; /**************************************** for ( i = 0; i < m; i++ ) for ( k = 0; k < p; k++ ) Maxpy(n,alpha*A[k][Aj0+i],&(B[k][Bj0]),&(C[i][Cj0])); ****************************************/ for ( k = 0; k < p; k++ ) Mupdate(m,n,alpha,&(A[k][Aj0]),&(B[k][Bj0]),C,Cj0); } /* Mmmtr -- C <- C + alpha.A.B^T */ void Mmmtr(m,n,p,alpha,A,Aj0,B,Bj0,C,Cj0) int m, n, p; /* C is m x n */ double alpha; Real **A, **B, **C; int Aj0, Bj0, Cj0; { register int i, j, k; /**************************************** for ( i = 0; i < m; i++ ) for ( j = 0; j < n; j++ ) C[i][Cj0+j] += alpha*Mdot(p,&(A[i][Aj0]),&(B[j][Bj0])); ****************************************/ for ( i = 0; i < m; i++ ) Mmv(n,p,alpha,B,Bj0,&(A[i][Aj0]),1.0,&(C[i][Cj0])); } /* Mmtrmtr -- C <- C + alpha.A^T.B^T */ void Mmtrmtr(m,n,p,alpha,A,Aj0,B,Bj0,C,Cj0) int m, n, p; /* C is m x n */ double alpha; Real **A, **B, **C; int Aj0, Bj0, Cj0; { register int i, j, k; for ( i = 0; i < m; i++ ) for ( j = 0; j < n; j++ ) for ( k = 0; k < p; k++ ) C[i][Cj0+j] += A[i][Aj0+k]*B[k][Bj0+j]; } neuron-7.5/src/mesch/fft.c000077500000000000000000000075121323325274500155220ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Fast Fourier Transform routine Loosely based on the Fortran routine in Rabiner & Gold's "Digital Signal Processing" */ static char rcsid[] = "fft.c,v 1.1 1997/12/04 17:55:20 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include /* fft -- d.i.t. fast Fourier transform -- radix-2 FFT only -- vector extended to a power of 2 */ void fft(x_re,x_im) VEC *x_re, *x_im; { int i, ip, j, k, li, n, length; Real *xr, *xi; Real theta, pi = 3.1415926535897932384; Real w_re, w_im, u_re, u_im, t_re, t_im; Real tmp, tmpr, tmpi; if ( ! x_re || ! x_im ) error(E_NULL,"fft"); if ( x_re->dim != x_im->dim ) error(E_SIZES,"fft"); n = 1; while ( x_re->dim > n ) n *= 2; x_re = v_resize(x_re,n); x_im = v_resize(x_im,n); printf("# fft: x_re =\n"); v_output(x_re); printf("# fft: x_im =\n"); v_output(x_im); xr = x_re->ve; xi = x_im->ve; /* Decimation in time (DIT) algorithm */ j = 0; for ( i = 0; i < n-1; i++ ) { if ( i < j ) { tmp = xr[i]; xr[i] = xr[j]; xr[j] = tmp; tmp = xi[i]; xi[i] = xi[j]; xi[j] = tmp; } k = n / 2; while ( k <= j ) { j -= k; k /= 2; } j += k; } /* Actual FFT */ for ( li = 1; li < n; li *= 2 ) { length = 2*li; theta = pi/li; u_re = 1.0; u_im = 0.0; if ( li == 1 ) { w_re = -1.0; w_im = 0.0; } else if ( li == 2 ) { w_re = 0.0; w_im = 1.0; } else { w_re = cos(theta); w_im = sin(theta); } for ( j = 0; j < li; j++ ) { for ( i = j; i < n; i += length ) { ip = i + li; /* step 1 */ t_re = xr[ip]*u_re - xi[ip]*u_im; t_im = xr[ip]*u_im + xi[ip]*u_re; /* step 2 */ xr[ip] = xr[i] - t_re; xi[ip] = xi[i] - t_im; /* step 3 */ xr[i] += t_re; xi[i] += t_im; } tmpr = u_re*w_re - u_im*w_im; tmpi = u_im*w_re + u_re*w_im; u_re = tmpr; u_im = tmpi; } } } /* ifft -- inverse FFT using the same interface as fft() */ void ifft(x_re,x_im) VEC *x_re, *x_im; { /* we just use complex conjugates */ sv_mlt(-1.0,x_im,x_im); fft(x_re,x_im); sv_mlt( 1.0/((double)(x_re->dim)),x_re,x_re); } neuron-7.5/src/mesch/givens.c000077500000000000000000000072011323325274500162310ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Files for matrix computations Givens operations file. Contains routines for calculating and applying givens rotations for/to vectors and also to matrices by row and by column. */ /* givens.c 1.2 11/25/87 */ static char rcsid[] = "givens.c,v 1.1 1997/12/04 17:55:22 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include /* givens -- returns c,s parameters for Givens rotation to eliminate y in the vector [ x y ]' */ void givens(x,y,c,s) double x,y; Real *c,*s; { Real norm; norm = sqrt(x*x+y*y); if ( norm == 0.0 ) { *c = 1.0; *s = 0.0; } /* identity */ else { *c = x/norm; *s = y/norm; } } /* rot_vec -- apply Givens rotation to x's i & k components */ VEC *rot_vec(x,i,k,c,s,out) VEC *x,*out; u_int i,k; double c,s; { Real temp; if ( x==VNULL ) error(E_NULL,"rot_vec"); if ( i >= x->dim || k >= x->dim ) error(E_RANGE,"rot_vec"); out = v_copy(x,out); /* temp = c*out->ve[i] + s*out->ve[k]; */ temp = c*v_entry(out,i) + s*v_entry(out,k); /* out->ve[k] = -s*out->ve[i] + c*out->ve[k]; */ v_set_val(out,k,-s*v_entry(out,i)+c*v_entry(out,k)); /* out->ve[i] = temp; */ v_set_val(out,i,temp); return (out); } /* rot_rows -- premultiply mat by givens rotation described by c,s */ MAT *rot_rows(mat,i,k,c,s,out) MAT *mat,*out; u_int i,k; double c,s; { u_int j; Real temp; if ( mat==(MAT *)NULL ) error(E_NULL,"rot_rows"); if ( i >= mat->m || k >= mat->m ) error(E_RANGE,"rot_rows"); if ( mat != out ) out = m_copy(mat,m_resize(out,mat->m,mat->n)); for ( j=0; jn; j++ ) { /* temp = c*out->me[i][j] + s*out->me[k][j]; */ temp = c*m_entry(out,i,j) + s*m_entry(out,k,j); /* out->me[k][j] = -s*out->me[i][j] + c*out->me[k][j]; */ m_set_val(out,k,j, -s*m_entry(out,i,j) + c*m_entry(out,k,j)); /* out->me[i][j] = temp; */ m_set_val(out,i,j, temp); } return (out); } /* rot_cols -- postmultiply mat by givens rotation described by c,s */ MAT *rot_cols(mat,i,k,c,s,out) MAT *mat,*out; u_int i,k; double c,s; { u_int j; Real temp; if ( mat==(MAT *)NULL ) error(E_NULL,"rot_cols"); if ( i >= mat->n || k >= mat->n ) error(E_RANGE,"rot_cols"); if ( mat != out ) out = m_copy(mat,m_resize(out,mat->m,mat->n)); for ( j=0; jm; j++ ) { /* temp = c*out->me[j][i] + s*out->me[j][k]; */ temp = c*m_entry(out,j,i) + s*m_entry(out,j,k); /* out->me[j][k] = -s*out->me[j][i] + c*out->me[j][k]; */ m_set_val(out,j,k, -s*m_entry(out,j,i) + c*m_entry(out,j,k)); /* out->me[j][i] = temp; */ m_set_val(out,j,i,temp); } return (out); } neuron-7.5/src/mesch/hessen.c000077500000000000000000000077651323325274500162420ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for determining Hessenberg factorisations. */ static char rcsid[] = "hessen.c,v 1.1 1997/12/04 17:55:23 hines Exp"; #include #include "matrix.h" #include "matrix2.h" /* Hfactor -- compute Hessenberg factorisation in compact form. -- factorisation performed in situ -- for details of the compact form see QRfactor.c and matrix2.doc */ MAT *Hfactor(A, diag, beta) MAT *A; VEC *diag, *beta; { static VEC *tmp1 = VNULL; int k, limit; if ( ! A || ! diag || ! beta ) error(E_NULL,"Hfactor"); if ( diag->dim < A->m - 1 || beta->dim < A->m - 1 ) error(E_SIZES,"Hfactor"); if ( A->m != A->n ) error(E_SQUARE,"Hfactor"); limit = A->m - 1; tmp1 = v_resize(tmp1,A->m); MEM_STAT_REG(tmp1,TYPE_VEC); for ( k = 0; k < limit; k++ ) { get_col(A,(u_int)k,tmp1); /* printf("the %d'th column = "); v_output(tmp1); */ hhvec(tmp1,k+1,&beta->ve[k],tmp1,&A->me[k+1][k]); /* diag->ve[k] = tmp1->ve[k+1]; */ v_set_val(diag,k,v_entry(tmp1,k+1)); /* printf("H/h vector = "); v_output(tmp1); */ /* printf("from the %d'th entry\n",k+1); */ /* printf("beta = %g\n",beta->ve[k]); */ /* hhtrcols(A,k+1,k+1,tmp1,beta->ve[k]); */ /* hhtrrows(A,0 ,k+1,tmp1,beta->ve[k]); */ hhtrcols(A,k+1,k+1,tmp1,v_entry(beta,k)); hhtrrows(A,0 ,k+1,tmp1,v_entry(beta,k)); /* printf("A = "); m_output(A); */ } return (A); } /* makeHQ -- construct the Hessenberg orthogonalising matrix Q; -- i.e. Hess M = Q.M.Q' */ MAT *makeHQ(H, diag, beta, Qout) MAT *H, *Qout; VEC *diag, *beta; { int i, j, limit; static VEC *tmp1 = VNULL, *tmp2 = VNULL; if ( H==(MAT *)NULL || diag==(VEC *)NULL || beta==(VEC *)NULL ) error(E_NULL,"makeHQ"); limit = H->m - 1; if ( diag->dim < limit || beta->dim < limit ) error(E_SIZES,"makeHQ"); if ( H->m != H->n ) error(E_SQUARE,"makeHQ"); Qout = m_resize(Qout,H->m,H->m); tmp1 = v_resize(tmp1,H->m); tmp2 = v_resize(tmp2,H->m); MEM_STAT_REG(tmp1,TYPE_VEC); MEM_STAT_REG(tmp2,TYPE_VEC); for ( i = 0; i < H->m; i++ ) { /* tmp1 = i'th basis vector */ for ( j = 0; j < H->m; j++ ) /* tmp1->ve[j] = 0.0; */ v_set_val(tmp1,j,0.0); /* tmp1->ve[i] = 1.0; */ v_set_val(tmp1,i,1.0); /* apply H/h transforms in reverse order */ for ( j = limit-1; j >= 0; j-- ) { get_col(H,(u_int)j,tmp2); /* tmp2->ve[j+1] = diag->ve[j]; */ v_set_val(tmp2,j+1,v_entry(diag,j)); hhtrvec(tmp2,beta->ve[j],j+1,tmp1,tmp1); } /* insert into Qout */ set_col(Qout,(u_int)i,tmp1); } return (Qout); } /* makeH -- construct actual Hessenberg matrix */ MAT *makeH(H,Hout) MAT *H, *Hout; { int i, j, limit; if ( H==(MAT *)NULL ) error(E_NULL,"makeH"); if ( H->m != H->n ) error(E_SQUARE,"makeH"); Hout = m_resize(Hout,H->m,H->m); Hout = m_copy(H,Hout); limit = H->m; for ( i = 1; i < limit; i++ ) for ( j = 0; j < i-1; j++ ) /* Hout->me[i][j] = 0.0;*/ m_set_val(Hout,i,j,0.0); return (Hout); } neuron-7.5/src/mesch/hsehldr.c000077500000000000000000000112251323325274500163700ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Files for matrix computations Householder transformation file. Contains routines for calculating householder transformations, applying them to vectors and matrices by both row & column. */ /* hsehldr.c 1.3 10/8/87 */ static char rcsid[] = "hsehldr.c,v 1.1 1997/12/04 17:55:24 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include /* hhvec -- calulates Householder vector to eliminate all entries after the i0 entry of the vector vec. It is returned as out. May be in-situ */ VEC *hhvec(vec,i0,beta,out,newval) VEC *vec,*out; u_int i0; Real *beta,*newval; { Real norm; out = _v_copy(vec,out,i0); norm = sqrt(_in_prod(out,out,i0)); if ( norm <= 0.0 ) { *beta = 0.0; return (out); } *beta = 1.0/(norm * (norm+fabs(out->ve[i0]))); if ( out->ve[i0] > 0.0 ) *newval = -norm; else *newval = norm; out->ve[i0] -= *newval; return (out); } /* hhtrvec -- apply Householder transformation to vector -- may be in-situ */ VEC *hhtrvec(hh,beta,i0,in,out) VEC *hh,*in,*out; /* hh = Householder vector */ u_int i0; double beta; { Real scale; /* u_int i; */ if ( hh==(VEC *)NULL || in==(VEC *)NULL ) error(E_NULL,"hhtrvec"); if ( in->dim != hh->dim ) error(E_SIZES,"hhtrvec"); if ( i0 > in->dim ) error(E_BOUNDS,"hhtrvec"); scale = beta*_in_prod(hh,in,i0); out = v_copy(in,out); __mltadd__(&(out->ve[i0]),&(hh->ve[i0]),-scale,(int)(in->dim-i0)); /************************************************************ for ( i=i0; idim; i++ ) out->ve[i] = in->ve[i] - scale*hh->ve[i]; ************************************************************/ return (out); } /* hhtrrows -- transform a matrix by a Householder vector by rows starting at row i0 from column j0 -- in-situ */ MAT *hhtrrows(M,i0,j0,hh,beta) MAT *M; u_int i0, j0; VEC *hh; double beta; { Real ip, scale; int i /*, j */; if ( M==(MAT *)NULL || hh==(VEC *)NULL ) error(E_NULL,"hhtrrows"); if ( M->n != hh->dim ) error(E_RANGE,"hhtrrows"); if ( i0 > M->m || j0 > M->n ) error(E_BOUNDS,"hhtrrows"); if ( beta == 0.0 ) return (M); /* for each row ... */ for ( i = i0; i < M->m; i++ ) { /* compute inner product */ ip = __ip__(&(M->me[i][j0]),&(hh->ve[j0]),(int)(M->n-j0)); /************************************************** ip = 0.0; for ( j = j0; j < M->n; j++ ) ip += M->me[i][j]*hh->ve[j]; **************************************************/ scale = beta*ip; if ( scale == 0.0 ) continue; /* do operation */ __mltadd__(&(M->me[i][j0]),&(hh->ve[j0]),-scale, (int)(M->n-j0)); /************************************************** for ( j = j0; j < M->n; j++ ) M->me[i][j] -= scale*hh->ve[j]; **************************************************/ } return (M); } /* hhtrcols -- transform a matrix by a Householder vector by columns starting at row i0 from column j0 -- in-situ */ MAT *hhtrcols(M,i0,j0,hh,beta) MAT *M; u_int i0, j0; VEC *hh; double beta; { /* Real ip, scale; */ int i /*, k */; static VEC *w = VNULL; if ( M==(MAT *)NULL || hh==(VEC *)NULL ) error(E_NULL,"hhtrcols"); if ( M->m != hh->dim ) error(E_SIZES,"hhtrcols"); if ( i0 > M->m || j0 > M->n ) error(E_BOUNDS,"hhtrcols"); if ( beta == 0.0 ) return (M); w = v_resize(w,M->n); MEM_STAT_REG(w,TYPE_VEC); v_zero(w); for ( i = i0; i < M->m; i++ ) if ( hh->ve[i] != 0.0 ) __mltadd__(&(w->ve[j0]),&(M->me[i][j0]),hh->ve[i], (int)(M->n-j0)); for ( i = i0; i < M->m; i++ ) if ( hh->ve[i] != 0.0 ) __mltadd__(&(M->me[i][j0]),&(w->ve[j0]),-beta*hh->ve[i], (int)(M->n-j0)); return (M); } neuron-7.5/src/mesch/init.c000077500000000000000000000134271323325274500157100ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This is a file of routines for zero-ing, and initialising vectors, matrices and permutations. This is to be included in the matrix.a library */ static char rcsid[] = "init.c,v 1.1 1997/12/04 17:55:25 hines Exp"; #include #include "matrix.h" /* v_zero -- zero the vector x */ VEC *v_zero(x) VEC *x; { if ( x == VNULL ) error(E_NULL,"v_zero"); __zero__(x->ve,x->dim); /* for ( i = 0; i < x->dim; i++ ) x->ve[i] = 0.0; */ return x; } /* iv_zero -- zero the vector ix */ IVEC *iv_zero(ix) IVEC *ix; { int i; if ( ix == IVNULL ) error(E_NULL,"iv_zero"); for ( i = 0; i < ix->dim; i++ ) ix->ive[i] = 0; return ix; } /* m_zero -- zero the matrix A */ MAT *m_zero(A) MAT *A; { int i, A_m, A_n; Real **A_me; if ( A == MNULL ) error(E_NULL,"m_zero"); A_m = A->m; A_n = A->n; A_me = A->me; for ( i = 0; i < A_m; i++ ) __zero__(A_me[i],A_n); /* for ( j = 0; j < A_n; j++ ) A_me[i][j] = 0.0; */ return A; } /* mat_id -- set A to being closest to identity matrix as possible -- i.e. A[i][j] == 1 if i == j and 0 otherwise */ MAT *m_ident(A) MAT *A; { int i, size; if ( A == MNULL ) error(E_NULL,"m_ident"); m_zero(A); size = min(A->m,A->n); for ( i = 0; i < size; i++ ) A->me[i][i] = 1.0; return A; } /* px_ident -- set px to identity permutation */ PERM *px_ident(px) PERM *px; { int i, px_size; u_int *px_pe; if ( px == PNULL ) error(E_NULL,"px_ident"); px_size = px->size; px_pe = px->pe; for ( i = 0; i < px_size; i++ ) px_pe[i] = i; return px; } /* Pseudo random number generator data structures */ /* Knuth's lagged Fibonacci-based generator: See "Seminumerical Algorithms: The Art of Computer Programming" sections 3.2-3.3 */ #ifdef ANSI_C #ifndef LONG_MAX #include #endif #endif #ifdef LONG_MAX #define MODULUS LONG_MAX #else #define MODULUS 1000000000L /* assuming long's at least 32 bits long */ #endif #define MZ 0L static long mrand_list[56]; static int started = FALSE; static int inext = 0, inextp = 31; /* mrand -- pseudo-random number generator */ #ifdef ANSI_C double mrand(void) #else double mrand() #endif { long lval; static Real factor = 1.0/((Real)MODULUS); if ( ! started ) smrand(3127); inext = (inext >= 54) ? 0 : inext+1; inextp = (inextp >= 54) ? 0 : inextp+1; lval = mrand_list[inext]-mrand_list[inextp]; if ( lval < 0L ) lval += MODULUS; mrand_list[inext] = lval; return (double)lval*factor; } /* mrandlist -- fills the array a[] with len random numbers */ void mrandlist(a, len) Real a[]; int len; { int i; long lval; static Real factor = 1.0/((Real)MODULUS); if ( ! started ) smrand(3127); for ( i = 0; i < len; i++ ) { inext = (inext >= 54) ? 0 : inext+1; inextp = (inextp >= 54) ? 0 : inextp+1; lval = mrand_list[inext]-mrand_list[inextp]; if ( lval < 0L ) lval += MODULUS; mrand_list[inext] = lval; a[i] = (Real)lval*factor; } } /* smrand -- set seed for mrand() */ void smrand(seed) int seed; { int i; mrand_list[0] = (123413*seed) % MODULUS; for ( i = 1; i < 55; i++ ) mrand_list[i] = (123413*mrand_list[i-1]) % MODULUS; started = TRUE; /* run mrand() through the list sufficient times to thoroughly randomise the array */ for ( i = 0; i < 55*55; i++ ) mrand(); } #undef MODULUS #undef MZ #undef FAC /* v_rand -- initialises x to be a random vector, components independently & uniformly ditributed between 0 and 1 */ VEC *v_rand(x) VEC *x; { /* int i; */ if ( ! x ) error(E_NULL,"v_rand"); /* for ( i = 0; i < x->dim; i++ ) */ /* x->ve[i] = rand()/((Real)MAX_RAND); */ /* x->ve[i] = mrand(); */ mrandlist(x->ve,x->dim); return x; } /* m_rand -- initialises A to be a random vector, components independently & uniformly distributed between 0 and 1 */ MAT *m_rand(A) MAT *A; { int i /* , j */; if ( ! A ) error(E_NULL,"m_rand"); for ( i = 0; i < A->m; i++ ) /* for ( j = 0; j < A->n; j++ ) */ /* A->me[i][j] = rand()/((Real)MAX_RAND); */ /* A->me[i][j] = mrand(); */ mrandlist(A->me[i],A->n); return A; } /* v_ones -- fills x with one's */ VEC *v_ones(x) VEC *x; { int i; if ( ! x ) error(E_NULL,"v_ones"); for ( i = 0; i < x->dim; i++ ) x->ve[i] = 1.0; return x; } /* m_ones -- fills matrix with one's */ MAT *m_ones(A) MAT *A; { int i, j; if ( ! A ) error(E_NULL,"m_ones"); for ( i = 0; i < A->m; i++ ) for ( j = 0; j < A->n; j++ ) A->me[i][j] = 1.0; return A; } /* v_count -- initialises x so that x->ve[i] == i */ VEC *v_count(x) VEC *x; { int i; if ( ! x ) error(E_NULL,"v_count"); for ( i = 0; i < x->dim; i++ ) x->ve[i] = (Real)i; return x; } neuron-7.5/src/mesch/iter.h000077500000000000000000000153721323325274500157160ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* iter.h 14/09/93 */ /* Structures for iterative methods */ #ifndef ITERHH #define ITERHH /* RCS id: iter.h,v 1.1 1997/11/03 16:15:49 hines Exp */ #include "sparse.h" /* basic structure for iterative methods */ /* type Fun_Ax for functions to get y = A*x */ #ifdef ANSI_C typedef VEC *(*Fun_Ax)(void *,VEC *,VEC *); #else typedef VEC *(*Fun_Ax)(); #endif /* type ITER */ typedef struct Iter_data { int shared_x; /* if TRUE then x is shared and it will not be free'd */ int shared_b; /* if TRUE then b is shared and it will not be free'd */ unsigned k; /* no. of direction (search) vectors; =0 - none */ int limit; /* upper bound on the no. of iter. steps */ int steps; /* no. of iter. steps done */ Real eps; /* accuracy required */ VEC *x; /* input: initial guess; output: approximate solution */ VEC *b; /* right hand side of the equation A*x = b */ Fun_Ax Ax; /* function computing y = A*x */ void *A_par; /* parameters for Ax */ Fun_Ax ATx; /* function computing y = A^T*x; T = transpose */ void *AT_par; /* parameters for ATx */ Fun_Ax Bx; /* function computing y = B*x; B - preconditioner */ void *B_par; /* parameters for Bx */ #ifdef ANSI_C #ifdef PROTOTYPES_IN_STRUCT void (*info)(struct Iter_data *, double, VEC *,VEC *); /* function giving some information for a user; nres - a norm of a residual res */ int (*stop_crit)(struct Iter_data *, double, VEC *,VEC *); /* stopping criterion: nres - a norm of res; res - residual; if returned value == TRUE then stop; if returned value == FALSE then continue; */ #else void (*info)(); int (*stop_crit)(); #endif /* PROTOTYPES_IN_STRUCT */ #else void (*info)(); /* function giving some information for a user */ int (*stop_crit)(); /* stopping criterion: if returned value == TRUE then stop; if returned value == FALSE then continue; */ #endif /* ANSI_C */ Real init_res; /* the norm of the initial residual */ } ITER; #define INULL (ITER *)NULL /* type Fun_info */ #ifdef ANSI_C typedef void (*Fun_info)(ITER *, double, VEC *,VEC *); #else typedef void (*Fun_info)(); #endif /* type Fun_stp_crt */ #ifdef ANSI_C typedef int (*Fun_stp_crt)(ITER *, double, VEC *,VEC *); #else typedef int (*Fun_stp_crt)(); #endif /* macros */ /* default values */ #define ITER_LIMIT_DEF 1000 #define ITER_EPS_DEF 1e-6 /* other macros */ /* set ip->Ax=fun and ip->A_par=fun_par */ #define iter_Ax(ip,fun,fun_par) \ (ip->Ax=(Fun_Ax)(fun),ip->A_par=(void *)(fun_par),0) #define iter_ATx(ip,fun,fun_par) \ (ip->ATx=(Fun_Ax)(fun),ip->AT_par=(void *)(fun_par),0) #define iter_Bx(ip,fun,fun_par) \ (ip->Bx=(Fun_Ax)(fun),ip->B_par=(void *)(fun_par),0) /* save free macro */ #define ITER_FREE(ip) (iter_free(ip), (ip)=(ITER *)NULL) /* prototypes from iter0.c */ #ifdef ANSI_C /* standard information */ void iter_std_info(ITER *ip,double nres,VEC *res,VEC *Bres); /* standard stopping criterion */ int iter_std_stop_crit(ITER *ip, double nres, VEC *res,VEC *Bres); /* get, resize and free ITER variable */ ITER *iter_get(int lenb, int lenx); ITER *iter_resize(ITER *ip,int lenb,int lenx); int iter_free(ITER *ip); void iter_dump(FILE *fp,ITER *ip); /* copy ip1 to ip2 copying also elements of x and b */ ITER *iter_copy(ITER *ip1, ITER *ip2); /* copy ip1 to ip2 without copying elements of x and b */ ITER *iter_copy2(ITER *ip1,ITER *ip2); /* functions for generating sparse matrices with random elements */ SPMAT *iter_gen_sym(int n, int nrow); SPMAT *iter_gen_nonsym(int m,int n,int nrow,double diag); SPMAT *iter_gen_nonsym_posdef(int n,int nrow); #else void iter_std_info(); int iter_std_stop_crit(); ITER *iter_get(); int iter_free(); ITER *iter_resize(); void iter_dump(); ITER *iter_copy(); ITER *iter_copy2(); SPMAT *iter_gen_sym(); SPMAT *iter_gen_nonsym(); SPMAT *iter_gen_nonsym_posdef(); #endif /* prototypes from iter.c */ /* different iterative procedures */ #ifdef ANSI_C VEC *iter_cg(ITER *ip); VEC *iter_cg1(ITER *ip); VEC *iter_spcg(SPMAT *A,SPMAT *LLT,VEC *b,double eps,VEC *x,int limit, int *steps); VEC *iter_cgs(ITER *ip,VEC *r0); VEC *iter_spcgs(SPMAT *A,SPMAT *B,VEC *b,VEC *r0,double eps,VEC *x, int limit, int *steps); VEC *iter_lsqr(ITER *ip); VEC *iter_splsqr(SPMAT *A,VEC *b,double tol,VEC *x, int limit,int *steps); VEC *iter_gmres(ITER *ip); VEC *iter_spgmres(SPMAT *A,SPMAT *B,VEC *b,double tol,VEC *x,int k, int limit, int *steps); MAT *iter_arnoldi_iref(ITER *ip,Real *h,MAT *Q,MAT *H); MAT *iter_arnoldi(ITER *ip,Real *h,MAT *Q,MAT *H); MAT *iter_sparnoldi(SPMAT *A,VEC *x0,int k,Real *h,MAT *Q,MAT *H); VEC *iter_mgcr(ITER *ip); VEC *iter_spmgcr(SPMAT *A,SPMAT *B,VEC *b,double tol,VEC *x,int k, int limit, int *steps); void iter_lanczos(ITER *ip,VEC *a,VEC *b,Real *beta2,MAT *Q); void iter_splanczos(SPMAT *A,int m,VEC *x0,VEC *a,VEC *b,Real *beta2, MAT *Q); VEC *iter_lanczos2(ITER *ip,VEC *evals,VEC *err_est); VEC *iter_splanczos2(SPMAT *A,int m,VEC *x0,VEC *evals,VEC *err_est); VEC *iter_cgne(ITER *ip); VEC *iter_spcgne(SPMAT *A,SPMAT *B,VEC *b,double eps,VEC *x, int limit,int *steps); #else VEC *iter_cg(); VEC *iter_cg1(); VEC *iter_spcg(); VEC *iter_cgs(); VEC *iter_spcgs(); VEC *iter_lsqr(); VEC *iter_splsqr(); VEC *iter_gmres(); VEC *iter_spgmres(); MAT *iter_arnoldi_iref(); MAT *iter_arnoldi(); MAT *iter_sparnoldi(); VEC *iter_mgcr(); VEC *iter_spmgcr(); void iter_lanczos(); void iter_splanczos(); VEC *iter_lanczos2(); VEC *iter_splanczos2(); VEC *iter_cgne(); VEC *iter_spcgne(); #endif #endif /* ITERHH */ neuron-7.5/src/mesch/iter0.c000077500000000000000000000212141323325274500157610ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* iter0.c 14/09/93 */ /* ITERATIVE METHODS - service functions */ /* functions for creating and releasing ITER structures; for memory information; for getting some values from an ITER variable; for changing values in an ITER variable; see also iter.c */ #include #include "iter.h" #include static char rcsid[] = "iter0.c,v 1.1 1997/12/04 17:55:26 hines Exp"; /* standard functions */ /* standard information */ void iter_std_info(ip,nres,res,Bres) ITER *ip; double nres; VEC *res, *Bres; { if (nres >= 0.0) printf(" %d. residual = %g\n",ip->steps,nres); else printf(" %d. residual = %g (WARNING !!! should be >= 0) \n", ip->steps,nres); } /* standard stopping criterion */ int iter_std_stop_crit(ip, nres, res, Bres) ITER *ip; double nres; VEC *res, *Bres; { /* standard stopping criterium */ if (nres <= ip->init_res*ip->eps) return TRUE; return FALSE; } /* iter_get - create a new structure pointing to ITER */ ITER *iter_get(lenb, lenx) int lenb, lenx; { ITER *ip; if ((ip = NEW(ITER)) == (ITER *) NULL) error(E_MEM,"iter_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_ITER,0,sizeof(ITER)); mem_numvar(TYPE_ITER,1); } /* default values */ ip->shared_x = FALSE; ip->shared_b = FALSE; ip->k = 0; ip->limit = ITER_LIMIT_DEF; ip->eps = ITER_EPS_DEF; ip->steps = 0; if (lenb > 0) ip->b = v_get(lenb); else ip->b = (VEC *)NULL; if (lenx > 0) ip->x = v_get(lenx); else ip->x = (VEC *)NULL; ip->Ax = (Fun_Ax) NULL; ip->A_par = NULL; ip->ATx = (Fun_Ax) NULL; ip->AT_par = NULL; ip->Bx = (Fun_Ax) NULL; ip->B_par = NULL; ip->info = iter_std_info; ip->stop_crit = iter_std_stop_crit; ip->init_res = 0.0; return ip; } /* iter_free - release memory */ int iter_free(ip) ITER *ip; { if (ip == (ITER *)NULL) return -1; if (mem_info_is_on()) { mem_bytes(TYPE_ITER,sizeof(ITER),0); mem_numvar(TYPE_ITER,-1); } if ( !ip->shared_x && ip->x != NULL ) v_free(ip->x); if ( !ip->shared_b && ip->b != NULL ) v_free(ip->b); free((char *)ip); return 0; } ITER *iter_resize(ip,new_lenb,new_lenx) ITER *ip; int new_lenb, new_lenx; { VEC *old; if ( ip == (ITER *) NULL) error(E_NULL,"iter_resize"); old = ip->x; ip->x = v_resize(ip->x,new_lenx); if ( ip->shared_x && old != ip->x ) warning(WARN_SHARED_VEC,"iter_resize"); old = ip->b; ip->b = v_resize(ip->b,new_lenb); if ( ip->shared_b && old != ip->b ) warning(WARN_SHARED_VEC,"iter_resize"); return ip; } /* print out ip structure - for diagnostic purposes mainly */ void iter_dump(fp,ip) ITER *ip; FILE *fp; { if (ip == NULL) { fprintf(fp," ITER structure: NULL\n"); return; } fprintf(fp,"\n ITER structure:\n"); fprintf(fp," ip->shared_x = %s, ip->shared_b = %s\n", (ip->shared_x ? "TRUE" : "FALSE"), (ip->shared_b ? "TRUE" : "FALSE") ); fprintf(fp," ip->k = %d, ip->limit = %d, ip->steps = %d, ip->eps = %g\n", ip->k,ip->limit,ip->steps,ip->eps); fprintf(fp," ip->x = 0x%p, ip->b = 0x%p\n",ip->x,ip->b); fprintf(fp," ip->Ax = 0x%p, ip->A_par = 0x%p\n",ip->Ax,ip->A_par); fprintf(fp," ip->ATx = 0x%p, ip->AT_par = 0x%p\n",ip->ATx,ip->AT_par); fprintf(fp," ip->Bx = 0x%p, ip->B_par = 0x%p\n",ip->Bx,ip->B_par); fprintf(fp," ip->info = 0x%p, ip->stop_crit = 0x%p, ip->init_res = %g\n", ip->info,ip->stop_crit,ip->init_res); fprintf(fp,"\n"); } /* copy the structure ip1 to ip2 preserving vectors x and b of ip2 (vectors x and b in ip2 are the same before and after iter_copy2) if ip2 == NULL then a new structure is created with x and b being NULL and other members are taken from ip1 */ ITER *iter_copy2(ip1,ip2) ITER *ip1, *ip2; { VEC *x, *b; int shx, shb; if (ip1 == (ITER *)NULL) error(E_NULL,"iter_copy2"); if (ip2 == (ITER *)NULL) { if ((ip2 = NEW(ITER)) == (ITER *) NULL) error(E_MEM,"iter_copy2"); else if (mem_info_is_on()) { mem_bytes(TYPE_ITER,0,sizeof(ITER)); mem_numvar(TYPE_ITER,1); } ip2->x = ip2->b = NULL; ip2->shared_x = ip2->shared_x = FALSE; } x = ip2->x; b = ip2->b; shb = ip2->shared_b; shx = ip2->shared_x; MEM_COPY(ip1,ip2,sizeof(ITER)); ip2->x = x; ip2->b = b; ip2->shared_x = shx; ip2->shared_b = shb; return ip2; } /* copy the structure ip1 to ip2 copying also the vectors x and b */ ITER *iter_copy(ip1,ip2) ITER *ip1, *ip2; { VEC *x, *b; if (ip1 == (ITER *)NULL) error(E_NULL,"iter_copy"); if (ip2 == (ITER *)NULL) { if ((ip2 = NEW(ITER)) == (ITER *) NULL) error(E_MEM,"iter_copy2"); else if (mem_info_is_on()) { mem_bytes(TYPE_ITER,0,sizeof(ITER)); mem_numvar(TYPE_ITER,1); } } x = ip2->x; b = ip2->b; MEM_COPY(ip1,ip2,sizeof(ITER)); if (ip1->x) ip2->x = v_copy(ip1->x,x); if (ip1->b) ip2->b = v_copy(ip1->b,b); ip2->shared_x = ip2->shared_b = FALSE; return ip2; } /*** functions to generate sparse matrices with random entries ***/ /* iter_gen_sym -- generate symmetric positive definite n x n matrix, nrow - number of nonzero entries in a row */ SPMAT *iter_gen_sym(n,nrow) int n, nrow; { SPMAT *A; VEC *u; Real s1; int i, j, k, k_max; if (nrow <= 1) nrow = 2; /* nrow should be even */ if ((nrow & 1)) nrow -= 1; A = sp_get(n,n,nrow); u = v_get(A->m); v_zero(u); for ( i = 0; i < A->m; i++ ) { k_max = ((rand() >> 8) % (nrow/2)); for ( k = 0; k <= k_max; k++ ) { j = (rand() >> 8) % A->n; s1 = mrand(); sp_set_val(A,i,j,s1); sp_set_val(A,j,i,s1); u->ve[i] += fabs(s1); u->ve[j] += fabs(s1); } } /* ensure that A is positive definite */ for ( i = 0; i < A->m; i++ ) sp_set_val(A,i,i,u->ve[i] + 1.0); V_FREE(u); return A; } /* iter_gen_nonsym -- generate non-symmetric m x n sparse matrix, m >= n nrow - number of entries in a row; diag - number which is put in diagonal entries and then permuted (if diag is zero then 1.0 is there) */ SPMAT *iter_gen_nonsym(m,n,nrow,diag) int m, n, nrow; double diag; { SPMAT *A; PERM *px; int i, j, k, k_max; Real s1; if (nrow <= 1) nrow = 2; if (diag == 0.0) diag = 1.0; A = sp_get(m,n,nrow); px = px_get(n); for ( i = 0; i < A->m; i++ ) { k_max = (rand() >> 8) % (nrow-1); for ( k = 0; k <= k_max; k++ ) { j = (rand() >> 8) % A->n; s1 = mrand(); sp_set_val(A,i,j,-s1); } } /* to make it likely that A is nonsingular, use pivot... */ for ( i = 0; i < 2*A->n; i++ ) { j = (rand() >> 8) % A->n; k = (rand() >> 8) % A->n; px_transp(px,j,k); } for ( i = 0; i < A->n; i++ ) sp_set_val(A,i,px->pe[i],diag); PX_FREE(px); return A; } /* iter_gen_nonsym -- generate non-symmetric positive definite n x n sparse matrix; nrow - number of entries in a row */ SPMAT *iter_gen_nonsym_posdef(n,nrow) int n, nrow; { SPMAT *A; PERM *px; VEC *u; int i, j, k, k_max; Real s1; if (nrow <= 1) nrow = 2; A = sp_get(n,n,nrow); px = px_get(n); u = v_get(A->m); v_zero(u); for ( i = 0; i < A->m; i++ ) { k_max = (rand() >> 8) % (nrow-1); for ( k = 0; k <= k_max; k++ ) { j = (rand() >> 8) % A->n; s1 = mrand(); sp_set_val(A,i,j,-s1); u->ve[i] += fabs(s1); } } /* ensure that A is positive definite */ for ( i = 0; i < A->m; i++ ) sp_set_val(A,i,i,u->ve[i] + 1.0); PX_FREE(px); V_FREE(u); return A; } neuron-7.5/src/mesch/iternsym.c000077500000000000000000000745471323325274500166310ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* iter.c 17/09/93 */ /* ITERATIVE METHODS - implementation of several iterative methods; see also iter0.c */ #include #include "matrix.h" #include "matrix2.h" #include "sparse.h" #include "iter.h" #include static char rcsid[] = "iternsym.c,v 1.1 1997/12/04 17:55:27 hines Exp"; #ifdef ANSI_C VEC *spCHsolve(SPMAT *,VEC *,VEC *); #else VEC *spCHsolve(); #endif /* iter_cgs -- uses CGS to compute a solution x to A.x=b */ VEC *iter_cgs(ip,r0) ITER *ip; VEC *r0; { static VEC *p = VNULL, *q = VNULL, *r = VNULL, *u = VNULL; static VEC *v = VNULL, *z = VNULL; VEC *tmp; Real alpha, beta, nres, rho, old_rho, sigma, inner; if (ip == INULL) error(E_NULL,"iter_cgs"); if (!ip->Ax || !ip->b || !r0) error(E_NULL,"iter_cgs"); if ( ip->x == ip->b ) error(E_INSITU,"iter_cgs"); if (!ip->stop_crit) error(E_NULL,"iter_cgs"); if ( r0->dim != ip->b->dim ) error(E_SIZES,"iter_cgs"); if ( ip->eps <= 0.0 ) ip->eps = MACHEPS; p = v_resize(p,ip->b->dim); q = v_resize(q,ip->b->dim); r = v_resize(r,ip->b->dim); u = v_resize(u,ip->b->dim); v = v_resize(v,ip->b->dim); MEM_STAT_REG(p,TYPE_VEC); MEM_STAT_REG(q,TYPE_VEC); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(v,TYPE_VEC); if (ip->Bx) { z = v_resize(z,ip->b->dim); MEM_STAT_REG(z,TYPE_VEC); } if (ip->x != VNULL) { if (ip->x->dim != ip->b->dim) error(E_SIZES,"iter_cgs"); ip->Ax(ip->A_par,ip->x,v); /* v = A*x */ if (ip->Bx) { v_sub(ip->b,v,v); /* v = b - A*x */ (ip->Bx)(ip->B_par,v,r); /* r = B*(b-A*x) */ } else v_sub(ip->b,v,r); /* r = b-A*x */ } else { /* ip->x == 0 */ ip->x = v_get(ip->b->dim); /* x == 0 */ ip->shared_x = FALSE; if (ip->Bx) (ip->Bx)(ip->B_par,ip->b,r); /* r = B*b */ else v_copy(ip->b,r); /* r = b */ } v_zero(p); v_zero(q); old_rho = 1.0; for (ip->steps = 0; ip->steps <= ip->limit; ip->steps++) { inner = in_prod(r,r); nres = sqrt(fabs(inner)); if (ip->steps == 0) ip->init_res = nres; if (ip->info) ip->info(ip,nres,r,VNULL); if ( ip->stop_crit(ip,nres,r,VNULL) ) break; rho = in_prod(r0,r); if ( old_rho == 0.0 ) error(E_BREAKDOWN,"iter_cgs"); beta = rho/old_rho; v_mltadd(r,q,beta,u); v_mltadd(q,p,beta,v); v_mltadd(u,v,beta,p); (ip->Ax)(ip->A_par,p,q); if (ip->Bx) { (ip->Bx)(ip->B_par,q,z); tmp = z; } else tmp = q; sigma = in_prod(r0,tmp); if ( sigma == 0.0 ) error(E_BREAKDOWN,"iter_cgs"); alpha = rho/sigma; v_mltadd(u,tmp,-alpha,q); v_add(u,q,v); (ip->Ax)(ip->A_par,v,u); if (ip->Bx) { (ip->Bx)(ip->B_par,u,z); tmp = z; } else tmp = u; v_mltadd(r,tmp,-alpha,r); v_mltadd(ip->x,v,alpha,ip->x); old_rho = rho; } return ip->x; } /* iter_spcgs -- simple interface for SPMAT data structures use always as follows: x = iter_spcgs(A,B,b,r0,tol,x,limit,steps); or x = iter_spcgs(A,B,b,r0,tol,VNULL,limit,steps); In the second case the solution vector is created. If B is not NULL then it is a preconditioner. */ VEC *iter_spcgs(A,B,b,r0,tol,x,limit,steps) SPMAT *A, *B; VEC *b, *r0, *x; double tol; int *steps,limit; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; if (B) { ip->Bx = (Fun_Ax) sp_mv_mlt; ip->B_par = (void *) B; } else { ip->Bx = (Fun_Ax) NULL; ip->B_par = NULL; } ip->info = (Fun_info) NULL; ip->limit = limit; ip->b = b; ip->eps = tol; ip->x = x; iter_cgs(ip,r0); x = ip->x; if (steps) *steps = ip->steps; ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return x; } /* Routine for performing LSQR -- the least squares QR algorithm of Paige and Saunders: "LSQR: an algorithm for sparse linear equations and sparse least squares", ACM Trans. Math. Soft., v. 8 pp. 43--71 (1982) */ /* lsqr -- sparse CG-like least squares routine: -- finds min_x ||A.x-b||_2 using A defined through A & AT -- returns x (if x != NULL) */ VEC *iter_lsqr(ip) ITER *ip; { static VEC *u = VNULL, *v = VNULL, *w = VNULL, *tmp = VNULL; Real alpha, beta, phi, phi_bar; Real rho, rho_bar, rho_max, theta, nres; Real s, c; /* for Givens' rotations */ int m, n; if ( ! ip || ! ip->b || !ip->Ax || !ip->ATx ) error(E_NULL,"iter_lsqr"); if ( ip->x == ip->b ) error(E_INSITU,"iter_lsqr"); if (!ip->stop_crit || !ip->x) error(E_NULL,"iter_lsqr"); if ( ip->eps <= 0.0 ) ip->eps = MACHEPS; m = ip->b->dim; n = ip->x->dim; u = v_resize(u,(u_int)m); v = v_resize(v,(u_int)n); w = v_resize(w,(u_int)n); tmp = v_resize(tmp,(u_int)n); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(v,TYPE_VEC); MEM_STAT_REG(w,TYPE_VEC); MEM_STAT_REG(tmp,TYPE_VEC); if (ip->x != VNULL) { ip->Ax(ip->A_par,ip->x,u); /* u = A*x */ v_sub(ip->b,u,u); /* u = b-A*x */ } else { /* ip->x == 0 */ ip->x = v_get(ip->b->dim); ip->shared_x = FALSE; v_copy(ip->b,u); /* u = b */ } beta = v_norm2(u); if ( beta == 0.0 ) return ip->x; sv_mlt(1.0/beta,u,u); (ip->ATx)(ip->AT_par,u,v); alpha = v_norm2(v); if ( alpha == 0.0 ) return ip->x; sv_mlt(1.0/alpha,v,v); v_copy(v,w); phi_bar = beta; rho_bar = alpha; rho_max = 1.0; for (ip->steps = 0; ip->steps <= ip->limit; ip->steps++) { tmp = v_resize(tmp,m); (ip->Ax)(ip->A_par,v,tmp); v_mltadd(tmp,u,-alpha,u); beta = v_norm2(u); sv_mlt(1.0/beta,u,u); tmp = v_resize(tmp,n); (ip->ATx)(ip->AT_par,u,tmp); v_mltadd(tmp,v,-beta,v); alpha = v_norm2(v); sv_mlt(1.0/alpha,v,v); rho = sqrt(rho_bar*rho_bar+beta*beta); if ( rho > rho_max ) rho_max = rho; c = rho_bar/rho; s = beta/rho; theta = s*alpha; rho_bar = -c*alpha; phi = c*phi_bar; phi_bar = s*phi_bar; /* update ip->x & w */ if ( rho == 0.0 ) error(E_BREAKDOWN,"iter_lsqr"); v_mltadd(ip->x,w,phi/rho,ip->x); v_mltadd(v,w,-theta/rho,w); nres = fabs(phi_bar*alpha*c)*rho_max; if (ip->info) ip->info(ip,nres,w,VNULL); if (ip->steps == 0) ip->init_res = nres; if ( ip->stop_crit(ip,nres,w,VNULL) ) break; } return ip->x; } /* iter_splsqr -- simple interface for SPMAT data structures */ VEC *iter_splsqr(A,b,tol,x,limit,steps) SPMAT *A; VEC *b, *x; double tol; int *steps,limit; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; ip->ATx = (Fun_Ax) sp_vm_mlt; ip->AT_par = (void *) A; ip->Bx = (Fun_Ax) NULL; ip->B_par = NULL; ip->info = (Fun_info) NULL; ip->limit = limit; ip->b = b; ip->eps = tol; ip->x = x; iter_lsqr(ip); x = ip->x; if (steps) *steps = ip->steps; ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return x; } /* iter_arnoldi -- an implementation of the Arnoldi method; iterative refinement is applied. */ MAT *iter_arnoldi_iref(ip,h_rem,Q,H) ITER *ip; Real *h_rem; MAT *Q, *H; { static VEC *u=VNULL, *r=VNULL, *s=VNULL, *tmp=VNULL; VEC v; /* auxiliary vector */ int i,j; Real h_val, c; if (ip == INULL) error(E_NULL,"iter_arnoldi_iref"); if ( ! ip->Ax || ! Q || ! ip->x ) error(E_NULL,"iter_arnoldi_iref"); if ( ip->k <= 0 ) error(E_BOUNDS,"iter_arnoldi_iref"); if ( Q->n != ip->x->dim || Q->m != ip->k ) error(E_SIZES,"iter_arnoldi_iref"); m_zero(Q); H = m_resize(H,ip->k,ip->k); m_zero(H); u = v_resize(u,ip->x->dim); r = v_resize(r,ip->k); s = v_resize(s,ip->k); tmp = v_resize(tmp,ip->x->dim); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(s,TYPE_VEC); MEM_STAT_REG(tmp,TYPE_VEC); v.dim = v.max_dim = ip->x->dim; c = v_norm2(ip->x); if ( c <= 0.0) return H; else { v.ve = Q->me[0]; sv_mlt(1.0/c,ip->x,&v); } v_zero(r); v_zero(s); for ( i = 0; i < ip->k; i++ ) { v.ve = Q->me[i]; u = (ip->Ax)(ip->A_par,&v,u); for (j = 0; j <= i; j++) { v.ve = Q->me[j]; /* modified Gram-Schmidt */ r->ve[j] = in_prod(&v,u); v_mltadd(u,&v,-r->ve[j],u); } h_val = v_norm2(u); /* if u == 0 then we have an exact subspace */ if ( h_val <= 0.0 ) { *h_rem = h_val; return H; } /* iterative refinement -- ensures near orthogonality */ do { v_zero(tmp); for (j = 0; j <= i; j++) { v.ve = Q->me[j]; s->ve[j] = in_prod(&v,u); v_mltadd(tmp,&v,s->ve[j],tmp); } v_sub(u,tmp,u); v_add(r,s,r); } while ( v_norm2(s) > 0.1*(h_val = v_norm2(u)) ); /* now that u is nearly orthogonal to Q, update H */ set_col(H,i,r); /* check once again if h_val is zero */ if ( h_val <= 0.0 ) { *h_rem = h_val; return H; } if ( i == ip->k-1 ) { *h_rem = h_val; continue; } /* H->me[i+1][i] = h_val; */ m_set_val(H,i+1,i,h_val); v.ve = Q->me[i+1]; sv_mlt(1.0/h_val,u,&v); } return H; } /* iter_arnoldi -- an implementation of the Arnoldi method; modified Gram-Schmidt algorithm */ MAT *iter_arnoldi(ip,h_rem,Q,H) ITER *ip; Real *h_rem; MAT *Q, *H; { static VEC *u=VNULL, *r=VNULL; VEC v; /* auxiliary vector */ int i,j; Real h_val, c; if (ip == INULL) error(E_NULL,"iter_arnoldi"); if ( ! ip->Ax || ! Q || ! ip->x ) error(E_NULL,"iter_arnoldi"); if ( ip->k <= 0 ) error(E_BOUNDS,"iter_arnoldi"); if ( Q->n != ip->x->dim || Q->m != ip->k ) error(E_SIZES,"iter_arnoldi"); m_zero(Q); H = m_resize(H,ip->k,ip->k); m_zero(H); u = v_resize(u,ip->x->dim); r = v_resize(r,ip->k); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(r,TYPE_VEC); v.dim = v.max_dim = ip->x->dim; c = v_norm2(ip->x); if ( c <= 0.0) return H; else { v.ve = Q->me[0]; sv_mlt(1.0/c,ip->x,&v); } v_zero(r); for ( i = 0; i < ip->k; i++ ) { v.ve = Q->me[i]; u = (ip->Ax)(ip->A_par,&v,u); for (j = 0; j <= i; j++) { v.ve = Q->me[j]; /* modified Gram-Schmidt */ r->ve[j] = in_prod(&v,u); v_mltadd(u,&v,-r->ve[j],u); } h_val = v_norm2(u); /* if u == 0 then we have an exact subspace */ if ( h_val <= 0.0 ) { *h_rem = h_val; return H; } set_col(H,i,r); if ( i == ip->k-1 ) { *h_rem = h_val; continue; } /* H->me[i+1][i] = h_val; */ m_set_val(H,i+1,i,h_val); v.ve = Q->me[i+1]; sv_mlt(1.0/h_val,u,&v); } return H; } /* iter_sparnoldi -- uses arnoldi() with an explicit representation of A */ MAT *iter_sparnoldi(A,x0,m,h_rem,Q,H) SPMAT *A; VEC *x0; int m; Real *h_rem; MAT *Q, *H; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; ip->x = x0; ip->k = m; iter_arnoldi_iref(ip,h_rem,Q,H); ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return H; } /* for testing gmres */ static void test_gmres(ip,i,Q,R,givc,givs,h_val) ITER *ip; int i; MAT *Q, *R; VEC *givc, *givs; double h_val; { VEC vt, vt1; static MAT *Q1, *R1; int j; /* test Q*A*Q^T = R */ Q = m_resize(Q,i+1,ip->b->dim); Q1 = m_resize(Q1,i+1,ip->b->dim); R1 = m_resize(R1,i+1,i+1); MEM_STAT_REG(Q1,TYPE_MAT); MEM_STAT_REG(R1,TYPE_MAT); vt.dim = vt.max_dim = ip->b->dim; vt1.dim = vt1.max_dim = ip->b->dim; for (j=0; j <= i; j++) { vt.ve = Q->me[j]; vt1.ve = Q1->me[j]; ip->Ax(ip->A_par,&vt,&vt1); } mmtr_mlt(Q,Q1,R1); R1 = m_resize(R1,i+2,i+1); for (j=0; j < i; j++) R1->me[i+1][j] = 0.0; R1->me[i+1][i] = h_val; for (j = 0; j <= i; j++) { rot_rows(R1,j,j+1,givc->ve[j],givs->ve[j],R1); } R1 = m_resize(R1,i+1,i+1); m_sub(R,R1,R1); /* if (m_norm_inf(R1) > MACHEPS*ip->b->dim) */ printf(" %d. ||Q*A*Q^T - H|| = %g [cf. MACHEPS = %g]\n", ip->steps,m_norm_inf(R1),MACHEPS); /* check Q*Q^T = I */ Q = m_resize(Q,i+1,ip->b->dim); mmtr_mlt(Q,Q,R1); for (j=0; j <= i; j++) R1->me[j][j] -= 1.0; if (m_norm_inf(R1) > MACHEPS*ip->b->dim) printf(" ! m_norm_inf(Q*Q^T) = %g\n",m_norm_inf(R1)); } /* gmres -- generalised minimum residual algorithm of Saad & Schultz SIAM J. Sci. Stat. Comp. v.7, pp.856--869 (1986) */ VEC *iter_gmres(ip) ITER *ip; { static VEC *u=VNULL, *r=VNULL, *rhs = VNULL; static VEC *givs=VNULL, *givc=VNULL, *z = VNULL; static MAT *Q = MNULL, *R = MNULL; VEC *rr, v, v1; /* additional pointers (not real vectors) */ int i,j, done; Real nres; /* Real last_h; */ if (ip == INULL) error(E_NULL,"iter_gmres"); if ( ! ip->Ax || ! ip->b ) error(E_NULL,"iter_gmres"); if ( ! ip->stop_crit ) error(E_NULL,"iter_gmres"); if ( ip->k <= 0 ) error(E_BOUNDS,"iter_gmres"); if (ip->x != VNULL && ip->x->dim != ip->b->dim) error(E_SIZES,"iter_gmres"); if (ip->eps <= 0.0) ip->eps = MACHEPS; r = v_resize(r,ip->k+1); u = v_resize(u,ip->b->dim); rhs = v_resize(rhs,ip->k+1); givs = v_resize(givs,ip->k); /* Givens rotations */ givc = v_resize(givc,ip->k); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(u,TYPE_VEC); MEM_STAT_REG(rhs,TYPE_VEC); MEM_STAT_REG(givs,TYPE_VEC); MEM_STAT_REG(givc,TYPE_VEC); R = m_resize(R,ip->k+1,ip->k); Q = m_resize(Q,ip->k,ip->b->dim); MEM_STAT_REG(R,TYPE_MAT); MEM_STAT_REG(Q,TYPE_MAT); if (ip->x == VNULL) { /* ip->x == 0 */ ip->x = v_get(ip->b->dim); ip->shared_x = FALSE; } v.dim = v.max_dim = ip->b->dim; /* v and v1 are pointers to rows */ v1.dim = v1.max_dim = ip->b->dim; /* of matrix Q */ if (ip->Bx != (Fun_Ax)NULL) { /* if precondition is defined */ z = v_resize(z,ip->b->dim); MEM_STAT_REG(z,TYPE_VEC); } done = FALSE; for (ip->steps = 0; ip->steps < ip->limit; ) { /* restart */ ip->Ax(ip->A_par,ip->x,u); /* u = A*x */ v_sub(ip->b,u,u); /* u = b - A*x */ rr = u; /* rr is a pointer only */ if (ip->Bx) { (ip->Bx)(ip->B_par,u,z); /* tmp = B*(b-A*x) */ rr = z; } nres = v_norm2(rr); if (ip->steps == 0) { if (ip->info) ip->info(ip,nres,VNULL,VNULL); ip->init_res = nres; } if ( nres == 0.0 ) { done = TRUE; break; } v.ve = Q->me[0]; sv_mlt(1.0/nres,rr,&v); v_zero(r); v_zero(rhs); rhs->ve[0] = nres; for ( i = 0; i < ip->k && ip->steps < ip->limit; i++ ) { ip->steps++; v.ve = Q->me[i]; (ip->Ax)(ip->A_par,&v,u); rr = u; if (ip->Bx) { (ip->Bx)(ip->B_par,u,z); rr = z; } if (i < ip->k - 1) { v1.ve = Q->me[i+1]; v_copy(rr,&v1); for (j = 0; j <= i; j++) { v.ve = Q->me[j]; /* r->ve[j] = in_prod(&v,rr); */ /* modified Gram-Schmidt algorithm */ r->ve[j] = in_prod(&v,&v1); v_mltadd(&v1,&v,-r->ve[j],&v1); } r->ve[i+1] = nres = v_norm2(&v1); if (nres <= MACHEPS*ip->init_res) { for (j = 0; j < i; j++) rot_vec(r,j,j+1,givc->ve[j],givs->ve[j],r); set_col(R,i,r); done = TRUE; break; } sv_mlt(1.0/nres,&v1,&v1); } else { /* i == ip->k - 1 */ /* Q->me[ip->k] need not be computed */ for (j = 0; j <= i; j++) { v.ve = Q->me[j]; r->ve[j] = in_prod(&v,rr); } nres = in_prod(rr,rr) - in_prod(r,r); if (sqrt(fabs(nres)) <= MACHEPS*ip->init_res) { for (j = 0; j < i; j++) rot_vec(r,j,j+1,givc->ve[j],givs->ve[j],r); set_col(R,i,r); done = TRUE; break; } if (nres < 0.0) { /* do restart */ i--; ip->steps--; break; } r->ve[i+1] = sqrt(nres); } /* QR update */ /* last_h = r->ve[i+1]; */ /* for test only */ for (j = 0; j < i; j++) rot_vec(r,j,j+1,givc->ve[j],givs->ve[j],r); givens(r->ve[i],r->ve[i+1],&givc->ve[i],&givs->ve[i]); rot_vec(r,i,i+1,givc->ve[i],givs->ve[i],r); rot_vec(rhs,i,i+1,givc->ve[i],givs->ve[i],rhs); set_col(R,i,r); nres = fabs((double) rhs->ve[i+1]); if (ip->info) ip->info(ip,nres,VNULL,VNULL); if ( ip->stop_crit(ip,nres,VNULL,VNULL) ) { done = TRUE; break; } } /* use ixi submatrix of R */ if (i >= ip->k) i = ip->k - 1; R = m_resize(R,i+1,i+1); rhs = v_resize(rhs,i+1); /* test only */ /* test_gmres(ip,i,Q,R,givc,givs,last_h); */ Usolve(R,rhs,rhs,0.0); /* solve a system: R*x = rhs */ /* new approximation */ for (j = 0; j <= i; j++) { v.ve = Q->me[j]; v_mltadd(ip->x,&v,rhs->ve[j],ip->x); } if (done) break; /* back to old dimensions */ rhs = v_resize(rhs,ip->k+1); R = m_resize(R,ip->k+1,ip->k); } return ip->x; } /* iter_spgmres - a simple interface to iter_gmres */ VEC *iter_spgmres(A,B,b,tol,x,k,limit,steps) SPMAT *A, *B; VEC *b, *x; double tol; int *steps,k,limit; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; if (B) { ip->Bx = (Fun_Ax) sp_mv_mlt; ip->B_par = (void *) B; } else { ip->Bx = (Fun_Ax) NULL; ip->B_par = NULL; } ip->k = k; ip->limit = limit; ip->info = (Fun_info) NULL; ip->b = b; ip->eps = tol; ip->x = x; iter_gmres(ip); x = ip->x; if (steps) *steps = ip->steps; ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return x; } /* for testing mgcr */ static void test_mgcr(ip,i,Q,R) ITER *ip; int i; MAT *Q, *R; { VEC vt, vt1; static MAT *R1; static VEC *r, *r1; VEC *rr; int k,j; Real sm; /* check Q*Q^T = I */ vt.dim = vt.max_dim = ip->b->dim; vt1.dim = vt1.max_dim = ip->b->dim; Q = m_resize(Q,i+1,ip->b->dim); R1 = m_resize(R1,i+1,i+1); r = v_resize(r,ip->b->dim); r1 = v_resize(r1,ip->b->dim); MEM_STAT_REG(R1,TYPE_MAT); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(r1,TYPE_VEC); m_zero(R1); for (k=1; k <= i; k++) for (j=1; j <= i; j++) { vt.ve = Q->me[k]; vt1.ve = Q->me[j]; R1->me[k][j] = in_prod(&vt,&vt1); } for (j=1; j <= i; j++) R1->me[j][j] -= 1.0; if (m_norm_inf(R1) > MACHEPS*ip->b->dim) printf(" ! (mgcr:) m_norm_inf(Q*Q^T) = %g\n",m_norm_inf(R1)); /* check (r_i,Ap_j) = 0 for j <= i */ ip->Ax(ip->A_par,ip->x,r); v_sub(ip->b,r,r); rr = r; if (ip->Bx) { ip->Bx(ip->B_par,r,r1); rr = r1; } printf(" ||r|| = %g\n",v_norm2(rr)); sm = 0.0; for (j = 1; j <= i; j++) { vt.ve = Q->me[j]; sm = max(sm,in_prod(&vt,rr)); } if (sm >= MACHEPS*ip->b->dim) printf(" ! (mgcr:) max_j (r,Ap_j) = %g\n",sm); } /* iter_mgcr -- modified generalized conjugate residual algorithm; fast version of GCR; */ VEC *iter_mgcr(ip) ITER *ip; { static VEC *As, *beta, *alpha, *z; static MAT *N, *H; VEC *rr, v, s; /* additional pointer and structures */ Real nres; /* norm of a residual */ Real dd; /* coefficient d_i */ int i,j; int done; /* if TRUE then stop the iterative process */ int dim; /* dimension of the problem */ /* ip cannot be NULL */ if (ip == INULL) error(E_NULL,"mgcr"); /* Ax, b and stopping criterion must be given */ if (! ip->Ax || ! ip->b || ! ip->stop_crit) error(E_NULL,"mgcr"); /* at least one direction vector must exist */ if ( ip->k <= 0) error(E_BOUNDS,"mgcr"); /* if the vector x is given then b and x must have the same dimension */ if ( ip->x && ip->x->dim != ip->b->dim) error(E_SIZES,"mgcr"); if (ip->eps <= 0.0) ip->eps = MACHEPS; dim = ip->b->dim; As = v_resize(As,dim); alpha = v_resize(alpha,ip->k); beta = v_resize(beta,ip->k); MEM_STAT_REG(As,TYPE_VEC); MEM_STAT_REG(alpha,TYPE_VEC); MEM_STAT_REG(beta,TYPE_VEC); H = m_resize(H,ip->k,ip->k); N = m_resize(N,ip->k,dim); MEM_STAT_REG(H,TYPE_MAT); MEM_STAT_REG(N,TYPE_MAT); /* if a preconditioner is defined */ if (ip->Bx) { z = v_resize(z,dim); MEM_STAT_REG(z,TYPE_VEC); } /* if x is NULL then it is assumed that x has entries with value zero */ if ( ! ip->x ) { ip->x = v_get(ip->b->dim); ip->shared_x = FALSE; } /* v and s are additional pointers to rows of N */ /* they must have the same dimension as rows of N */ v.dim = v.max_dim = s.dim = s.max_dim = dim; done = FALSE; for (ip->steps = 0; ip->steps < ip->limit; ) { (*ip->Ax)(ip->A_par,ip->x,As); /* As = A*x */ v_sub(ip->b,As,As); /* As = b - A*x */ rr = As; /* rr is an additional pointer */ /* if a preconditioner is defined */ if (ip->Bx) { (*ip->Bx)(ip->B_par,As,z); /* z = B*(b-A*x) */ rr = z; } /* norm of the residual */ nres = v_norm2(rr); dd = nres; /* dd = ||r_i|| */ /* check if the norm of the residual is zero */ if (ip->steps == 0) { /* information for a user */ if (ip->info) (*ip->info)(ip,nres,As,rr); ip->init_res = fabs(nres); } if (nres == 0.0) { /* iterative process is finished */ done = TRUE; break; } /* save this residual in the first row of N */ v.ve = N->me[0]; v_copy(rr,&v); for (i = 0; i < ip->k && ip->steps < ip->limit; i++) { ip->steps++; v.ve = N->me[i]; /* pointer to a row of N (=s_i) */ /* note that we must use here &v, not v */ (*ip->Ax)(ip->A_par,&v,As); rr = As; /* As = A*s_i */ if (ip->Bx) { (*ip->Bx)(ip->B_par,As,z); /* z = B*A*s_i */ rr = z; } if (i < ip->k - 1) { s.ve = N->me[i+1]; /* pointer to a row of N (=s_{i+1}) */ v_copy(rr,&s); /* s_{i+1} = B*A*s_i */ for (j = 0; j <= i-1; j++) { v.ve = N->me[j+1]; /* pointer to a row of N (=s_{j+1}) */ /* beta->ve[j] = in_prod(&v,rr); */ /* beta_{j,i} */ /* modified Gram-Schmidt algorithm */ beta->ve[j] = in_prod(&v,&s); /* beta_{j,i} */ /* s_{i+1} -= beta_{j,i}*s_{j+1} */ v_mltadd(&s,&v,- beta->ve[j],&s); } /* beta_{i,i} = ||s_{i+1}||_2 */ beta->ve[i] = nres = v_norm2(&s); if ( nres <= MACHEPS*ip->init_res) { /* s_{i+1} == 0 */ i--; done = TRUE; break; } sv_mlt(1.0/nres,&s,&s); /* normalize s_{i+1} */ v.ve = N->me[0]; alpha->ve[i] = in_prod(&v,&s); /* alpha_i = (s_0 , s_{i+1}) */ } else { for (j = 0; j <= i-1; j++) { v.ve = N->me[j+1]; /* pointer to a row of N (=s_{j+1}) */ beta->ve[j] = in_prod(&v,rr); /* beta_{j,i} */ } nres = in_prod(rr,rr); /* rr = B*A*s_{k-1} */ for (j = 0; j <= i-1; j++) nres -= beta->ve[j]*beta->ve[j]; if (sqrt(fabs(nres)) <= MACHEPS*ip->init_res) { /* s_k is zero */ i--; done = TRUE; break; } if (nres < 0.0) { /* do restart */ i--; ip->steps--; break; } beta->ve[i] = sqrt(nres); /* beta_{k-1,k-1} */ v.ve = N->me[0]; alpha->ve[i] = in_prod(&v,rr); for (j = 0; j <= i-1; j++) alpha->ve[i] -= beta->ve[j]*alpha->ve[j]; alpha->ve[i] /= beta->ve[i]; /* alpha_{k-1} */ } set_col(H,i,beta); /* other method of computing dd */ /* if (fabs((double)alpha->ve[i]) > dd) { nres = - dd*dd + alpha->ve[i]*alpha->ve[i]; nres = sqrt((double) nres); if (ip->info) (*ip->info)(ip,-nres,VNULL,VNULL); break; } */ /* to avoid overflow/underflow in computing dd */ /* dd *= cos(asin((double)(alpha->ve[i]/dd))); */ nres = alpha->ve[i]/dd; if (fabs(nres-1.0) <= MACHEPS*ip->init_res) dd = 0.0; else { nres = 1.0 - nres*nres; if (nres < 0.0) { nres = sqrt((double) -nres); if (ip->info) (*ip->info)(ip,-dd*nres,VNULL,VNULL); break; } dd *= sqrt((double) nres); } if (ip->info) (*ip->info)(ip,dd,VNULL,VNULL); if ( ip->stop_crit(ip,dd,VNULL,VNULL) ) { /* stopping criterion is satisfied */ done = TRUE; break; } } /* end of for */ if (i >= ip->k) i = ip->k - 1; /* use (i+1) by (i+1) submatrix of H */ H = m_resize(H,i+1,i+1); alpha = v_resize(alpha,i+1); Usolve(H,alpha,alpha,0.0); /* c_i is saved in alpha */ for (j = 0; j <= i; j++) { v.ve = N->me[j]; v_mltadd(ip->x,&v,alpha->ve[j],ip->x); } if (done) break; /* stop the iterative process */ alpha = v_resize(alpha,ip->k); H = m_resize(H,ip->k,ip->k); } /* end of while */ return ip->x; /* return the solution */ } /* iter_spmgcr - a simple interface to iter_mgcr */ /* no preconditioner */ VEC *iter_spmgcr(A,B,b,tol,x,k,limit,steps) SPMAT *A, *B; VEC *b, *x; double tol; int *steps,k,limit; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; if (B) { ip->Bx = (Fun_Ax) sp_mv_mlt; ip->B_par = (void *) B; } else { ip->Bx = (Fun_Ax) NULL; ip->B_par = NULL; } ip->k = k; ip->limit = limit; ip->info = (Fun_info) NULL; ip->b = b; ip->eps = tol; ip->x = x; iter_mgcr(ip); x = ip->x; if (steps) *steps = ip->steps; ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return x; } /* Conjugate gradients method for a normal equation a preconditioner B must be symmetric !! */ VEC *iter_cgne(ip) ITER *ip; { static VEC *r = VNULL, *p = VNULL, *q = VNULL, *z = VNULL; Real alpha, beta, inner, old_inner, nres; VEC *rr1; /* pointer only */ if (ip == INULL) error(E_NULL,"iter_cgne"); if (!ip->Ax || ! ip->ATx || !ip->b) error(E_NULL,"iter_cgne"); if ( ip->x == ip->b ) error(E_INSITU,"iter_cgne"); if (!ip->stop_crit) error(E_NULL,"iter_cgne"); if ( ip->eps <= 0.0 ) ip->eps = MACHEPS; r = v_resize(r,ip->b->dim); p = v_resize(p,ip->b->dim); q = v_resize(q,ip->b->dim); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(p,TYPE_VEC); MEM_STAT_REG(q,TYPE_VEC); z = v_resize(z,ip->b->dim); MEM_STAT_REG(z,TYPE_VEC); if (ip->x) { if (ip->x->dim != ip->b->dim) error(E_SIZES,"iter_cgne"); ip->Ax(ip->A_par,ip->x,p); /* p = A*x */ v_sub(ip->b,p,z); /* z = b - A*x */ } else { /* ip->x == 0 */ ip->x = v_get(ip->b->dim); ip->shared_x = FALSE; v_copy(ip->b,z); } rr1 = z; if (ip->Bx) { (ip->Bx)(ip->B_par,rr1,p); rr1 = p; } (ip->ATx)(ip->AT_par,rr1,r); /* r = A^T*B*(b-A*x) */ old_inner = 0.0; for ( ip->steps = 0; ip->steps <= ip->limit; ip->steps++ ) { rr1 = r; if ( ip->Bx ) { (ip->Bx)(ip->B_par,r,z); /* rr = B*r */ rr1 = z; } inner = in_prod(r,rr1); nres = sqrt(fabs(inner)); if (ip->info) ip->info(ip,nres,r,rr1); if (ip->steps == 0) ip->init_res = nres; if ( ip->stop_crit(ip,nres,r,rr1) ) break; if ( ip->steps ) /* if ( ip->steps > 0 ) ... */ { beta = inner/old_inner; p = v_mltadd(rr1,p,beta,p); } else /* if ( ip->steps == 0 ) ... */ { beta = 0.0; p = v_copy(rr1,p); old_inner = 0.0; } (ip->Ax)(ip->A_par,p,q); /* q = A*p */ if (ip->Bx) { (ip->Bx)(ip->B_par,q,z); (ip->ATx)(ip->AT_par,z,q); rr1 = q; /* q = A^T*B*A*p */ } else { (ip->ATx)(ip->AT_par,q,z); /* z = A^T*A*p */ rr1 = z; } alpha = inner/in_prod(rr1,p); v_mltadd(ip->x,p,alpha,ip->x); v_mltadd(r,rr1,-alpha,r); old_inner = inner; } return ip->x; } /* iter_spcgne -- a simple interface to iter_cgne() which uses sparse matrix data structures -- assumes that B contains an actual preconditioner (or NULL) use always as follows: x = iter_spcgne(A,B,b,eps,x,limit,steps); or x = iter_spcgne(A,B,b,eps,VNULL,limit,steps); In the second case the solution vector is created. */ VEC *iter_spcgne(A,B,b,eps,x,limit,steps) SPMAT *A, *B; VEC *b, *x; double eps; int *steps, limit; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *)A; ip->ATx = (Fun_Ax) sp_vm_mlt; ip->AT_par = (void *)A; if (B) { ip->Bx = (Fun_Ax) sp_mv_mlt; ip->B_par = (void *)B; } else { ip->Bx = (Fun_Ax) NULL; ip->B_par = NULL; } ip->info = (Fun_info) NULL; ip->b = b; ip->eps = eps; ip->limit = limit; ip->x = x; iter_cgne(ip); x = ip->x; if (steps) *steps = ip->steps; ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return x; } neuron-7.5/src/mesch/itersym.c000077500000000000000000000333501323325274500164360ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* itersym.c 17/09/93 */ /* ITERATIVE METHODS - implementation of several iterative methods; see also iter0.c */ #include #include "matrix.h" #include "matrix2.h" #include "sparse.h" #include "iter.h" #include static char rcsid[] = "itersym.c,v 1.1 1997/12/04 17:55:29 hines Exp"; #ifdef ANSI_C VEC *spCHsolve(SPMAT *,VEC *,VEC *); VEC *trieig(VEC *,VEC *,MAT *); #else VEC *spCHsolve(); VEC *trieig(); #endif /* iter_spcg -- a simple interface to iter_cg() which uses sparse matrix data structures -- assumes that LLT contains the Cholesky factorisation of the actual preconditioner; use always as follows: x = iter_spcg(A,LLT,b,eps,x,limit,steps); or x = iter_spcg(A,LLT,b,eps,VNULL,limit,steps); In the second case the solution vector is created. */ VEC *iter_spcg(A,LLT,b,eps,x,limit,steps) SPMAT *A, *LLT; VEC *b, *x; double eps; int *steps, limit; { ITER *ip; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *)A; ip->Bx = (Fun_Ax) spCHsolve; ip->B_par = (void *)LLT; ip->info = (Fun_info) NULL; ip->b = b; ip->eps = eps; ip->limit = limit; ip->x = x; iter_cg(ip); x = ip->x; if (steps) *steps = ip->steps; ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return x; } /* Conjugate gradients method; */ VEC *iter_cg(ip) ITER *ip; { static VEC *r = VNULL, *p = VNULL, *q = VNULL, *z = VNULL; Real alpha, beta, inner, old_inner, nres; VEC *rr; /* rr == r or rr == z */ if (ip == INULL) error(E_NULL,"iter_cg"); if (!ip->Ax || !ip->b) error(E_NULL,"iter_cg"); if ( ip->x == ip->b ) error(E_INSITU,"iter_cg"); if (!ip->stop_crit) error(E_NULL,"iter_cg"); if ( ip->eps <= 0.0 ) ip->eps = MACHEPS; r = v_resize(r,ip->b->dim); p = v_resize(p,ip->b->dim); q = v_resize(q,ip->b->dim); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(p,TYPE_VEC); MEM_STAT_REG(q,TYPE_VEC); if (ip->Bx != (Fun_Ax)NULL) { z = v_resize(z,ip->b->dim); MEM_STAT_REG(z,TYPE_VEC); rr = z; } else rr = r; if (ip->x != VNULL) { if (ip->x->dim != ip->b->dim) error(E_SIZES,"iter_cg"); ip->Ax(ip->A_par,ip->x,p); /* p = A*x */ v_sub(ip->b,p,r); /* r = b - A*x */ } else { /* ip->x == 0 */ ip->x = v_get(ip->b->dim); ip->shared_x = FALSE; v_copy(ip->b,r); } old_inner = 0.0; for ( ip->steps = 0; ip->steps <= ip->limit; ip->steps++ ) { if ( ip->Bx ) (ip->Bx)(ip->B_par,r,rr); /* rr = B*r */ inner = in_prod(rr,r); nres = sqrt(fabs(inner)); if (ip->info) ip->info(ip,nres,r,rr); if (ip->steps == 0) ip->init_res = nres; if ( ip->stop_crit(ip,nres,r,rr) ) break; if ( ip->steps ) /* if ( ip->steps > 0 ) ... */ { beta = inner/old_inner; p = v_mltadd(rr,p,beta,p); } else /* if ( ip->steps == 0 ) ... */ { beta = 0.0; p = v_copy(rr,p); old_inner = 0.0; } (ip->Ax)(ip->A_par,p,q); /* q = A*p */ alpha = in_prod(p,q); if (sqrt(fabs(alpha)) <= MACHEPS*ip->init_res) error(E_BREAKDOWN,"iter_cg"); alpha = inner/alpha; v_mltadd(ip->x,p,alpha,ip->x); v_mltadd(r,q,-alpha,r); old_inner = inner; } return ip->x; } /* iter_lanczos -- raw lanczos algorithm -- no re-orthogonalisation -- creates T matrix of size == m, but no larger than before beta_k == 0 -- uses passed routine to do matrix-vector multiplies */ void iter_lanczos(ip,a,b,beta2,Q) ITER *ip; VEC *a, *b; Real *beta2; MAT *Q; { int j; static VEC *v = VNULL, *w = VNULL, *tmp = VNULL; Real alpha, beta, c; if ( ! ip ) error(E_NULL,"iter_lanczos"); if ( ! ip->Ax || ! ip->x || ! a || ! b ) error(E_NULL,"iter_lanczos"); if ( ip->k <= 0 ) error(E_BOUNDS,"iter_lanczos"); if ( Q && ( Q->n < ip->x->dim || Q->m < ip->k ) ) error(E_SIZES,"iter_lanczos"); a = v_resize(a,(u_int)ip->k); b = v_resize(b,(u_int)(ip->k-1)); v = v_resize(v,ip->x->dim); w = v_resize(w,ip->x->dim); tmp = v_resize(tmp,ip->x->dim); MEM_STAT_REG(v,TYPE_VEC); MEM_STAT_REG(w,TYPE_VEC); MEM_STAT_REG(tmp,TYPE_VEC); beta = 1.0; v_zero(a); v_zero(b); if (Q) m_zero(Q); /* normalise x as w */ c = v_norm2(ip->x); if (c <= MACHEPS) { /* ip->x == 0 */ *beta2 = 0.0; return; } else sv_mlt(1.0/c,ip->x,w); (ip->Ax)(ip->A_par,w,v); for ( j = 0; j < ip->k; j++ ) { /* store w in Q if Q not NULL */ if ( Q ) set_row(Q,j,w); alpha = in_prod(w,v); a->ve[j] = alpha; v_mltadd(v,w,-alpha,v); beta = v_norm2(v); if ( beta == 0.0 ) { *beta2 = 0.0; return; } if ( j < ip->k-1 ) b->ve[j] = beta; v_copy(w,tmp); sv_mlt(1/beta,v,w); sv_mlt(-beta,tmp,v); (ip->Ax)(ip->A_par,w,tmp); v_add(v,tmp,v); } *beta2 = beta; } /* iter_splanczos -- version that uses sparse matrix data structure */ void iter_splanczos(A,m,x0,a,b,beta2,Q) SPMAT *A; int m; VEC *x0, *a, *b; Real *beta2; MAT *Q; { ITER *ip; ip = iter_get(0,0); ip->shared_x = ip->shared_b = TRUE; ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; ip->x = x0; ip->k = m; iter_lanczos(ip,a,b,beta2,Q); iter_free(ip); /* release only ITER structure */ } #ifndef MAC extern double frexp(), ldexp(); #endif /* product -- returns the product of a long list of numbers -- answer stored in mant (mantissa) and expt (exponent) */ static double product(a,offset,expt) VEC *a; double offset; int *expt; { Real mant, tmp_fctr; int i, tmp_expt; if ( ! a ) error(E_NULL,"product"); mant = 1.0; *expt = 0; if ( offset == 0.0 ) for ( i = 0; i < a->dim; i++ ) { mant *= frexp(a->ve[i],&tmp_expt); *expt += tmp_expt; if ( ! (i % 10) ) { mant = frexp(mant,&tmp_expt); *expt += tmp_expt; } } else for ( i = 0; i < a->dim; i++ ) { tmp_fctr = a->ve[i] - offset; tmp_fctr += (tmp_fctr > 0.0 ) ? -MACHEPS*offset : MACHEPS*offset; mant *= frexp(tmp_fctr,&tmp_expt); *expt += tmp_expt; if ( ! (i % 10) ) { mant = frexp(mant,&tmp_expt); *expt += tmp_expt; } } mant = frexp(mant,&tmp_expt); *expt += tmp_expt; return mant; } /* product2 -- returns the product of a long list of numbers -- answer stored in mant (mantissa) and expt (exponent) */ static double product2(a,k,expt) VEC *a; int k; /* entry of a to leave out */ int *expt; { Real mant, mu, tmp_fctr; int i, tmp_expt; if ( ! a ) error(E_NULL,"product2"); if ( k < 0 || k >= a->dim ) error(E_BOUNDS,"product2"); mant = 1.0; *expt = 0; mu = a->ve[k]; for ( i = 0; i < a->dim; i++ ) { if ( i == k ) continue; tmp_fctr = a->ve[i] - mu; tmp_fctr += ( tmp_fctr > 0.0 ) ? -MACHEPS*mu : MACHEPS*mu; mant *= frexp(tmp_fctr,&tmp_expt); *expt += tmp_expt; if ( ! (i % 10) ) { mant = frexp(mant,&tmp_expt); *expt += tmp_expt; } } mant = frexp(mant,&tmp_expt); *expt += tmp_expt; return mant; } /* dbl_cmp -- comparison function to pass to qsort() */ static int dbl_cmp(x,y) Real *x, *y; { Real tmp; tmp = *x - *y; return (tmp > 0 ? 1 : tmp < 0 ? -1: 0); } /* iter_lanczos2 -- lanczos + error estimate for every e-val -- uses Cullum & Willoughby approach, Sparse Matrix Proc. 1978 -- returns multiple e-vals where multiple e-vals may not exist -- returns evals vector */ VEC *iter_lanczos2(ip,evals,err_est) ITER *ip; /* ITER structure */ VEC *evals; /* eigenvalue vector */ VEC *err_est; /* error estimates of eigenvalues */ { VEC *a; static VEC *b=VNULL, *a2=VNULL, *b2=VNULL; Real beta, pb_mant, det_mant, det_mant1, det_mant2; int i, pb_expt, det_expt, det_expt1, det_expt2; if ( ! ip ) error(E_NULL,"iter_lanczos2"); if ( ! ip->Ax || ! ip->x ) error(E_NULL,"iter_lanczos2"); if ( ip->k <= 0 ) error(E_RANGE,"iter_lanczos2"); a = evals; a = v_resize(a,(u_int)ip->k); b = v_resize(b,(u_int)(ip->k-1)); MEM_STAT_REG(b,TYPE_VEC); iter_lanczos(ip,a,b,&beta,MNULL); /* printf("# beta =%g\n",beta); */ pb_mant = 0.0; if ( err_est ) { pb_mant = product(b,(double)0.0,&pb_expt); /* printf("# pb_mant = %g, pb_expt = %d\n",pb_mant, pb_expt); */ } /* printf("# diags =\n"); v_output(a); */ /* printf("# off diags =\n"); v_output(b); */ a2 = v_resize(a2,a->dim - 1); b2 = v_resize(b2,b->dim - 1); MEM_STAT_REG(a2,TYPE_VEC); MEM_STAT_REG(b2,TYPE_VEC); for ( i = 0; i < a2->dim - 1; i++ ) { a2->ve[i] = a->ve[i+1]; b2->ve[i] = b->ve[i+1]; } a2->ve[a2->dim-1] = a->ve[a2->dim]; trieig(a,b,MNULL); /* sort evals as a courtesy */ qsort((void *)(a->ve),(int)(a->dim),sizeof(Real),(int (*)())dbl_cmp); /* error estimates */ if ( err_est ) { err_est = v_resize(err_est,(u_int)ip->k); trieig(a2,b2,MNULL); /* printf("# a =\n"); v_output(a); */ /* printf("# a2 =\n"); v_output(a2); */ for ( i = 0; i < a->dim; i++ ) { det_mant1 = product2(a,i,&det_expt1); det_mant2 = product(a2,(double)a->ve[i],&det_expt2); /* printf("# det_mant1=%g, det_expt1=%d\n", det_mant1,det_expt1); */ /* printf("# det_mant2=%g, det_expt2=%d\n", det_mant2,det_expt2); */ if ( det_mant1 == 0.0 ) { /* multiple e-val of T */ err_est->ve[i] = 0.0; continue; } else if ( det_mant2 == 0.0 ) { err_est->ve[i] = HUGE; continue; } if ( (det_expt1 + det_expt2) % 2 ) /* if odd... */ det_mant = sqrt(2.0*fabs(det_mant1*det_mant2)); else /* if even... */ det_mant = sqrt(fabs(det_mant1*det_mant2)); det_expt = (det_expt1+det_expt2)/2; err_est->ve[i] = fabs(beta* ldexp(pb_mant/det_mant,pb_expt-det_expt)); } } return a; } /* iter_splanczos2 -- version of iter_lanczos2() that uses sparse matrix data structure */ VEC *iter_splanczos2(A,m,x0,evals,err_est) SPMAT *A; int m; VEC *x0; /* initial vector */ VEC *evals; /* eigenvalue vector */ VEC *err_est; /* error estimates of eigenvalues */ { ITER *ip; VEC *a; ip = iter_get(0,0); ip->Ax = (Fun_Ax) sp_mv_mlt; ip->A_par = (void *) A; ip->x = x0; ip->k = m; a = iter_lanczos2(ip,evals,err_est); ip->shared_x = ip->shared_b = TRUE; iter_free(ip); /* release only ITER structure */ return a; } /* Conjugate gradient method Another variant - mainly for testing */ VEC *iter_cg1(ip) ITER *ip; { static VEC *r = VNULL, *p = VNULL, *q = VNULL, *z = VNULL; Real alpha; double inner,nres; VEC *rr; /* rr == r or rr == z */ if (ip == INULL) error(E_NULL,"iter_cg"); if (!ip->Ax || !ip->b) error(E_NULL,"iter_cg"); if ( ip->x == ip->b ) error(E_INSITU,"iter_cg"); if (!ip->stop_crit) error(E_NULL,"iter_cg"); if ( ip->eps <= 0.0 ) ip->eps = MACHEPS; r = v_resize(r,ip->b->dim); p = v_resize(p,ip->b->dim); q = v_resize(q,ip->b->dim); MEM_STAT_REG(r,TYPE_VEC); MEM_STAT_REG(p,TYPE_VEC); MEM_STAT_REG(q,TYPE_VEC); if (ip->Bx != (Fun_Ax)NULL) { z = v_resize(z,ip->b->dim); MEM_STAT_REG(z,TYPE_VEC); rr = z; } else rr = r; if (ip->x != VNULL) { if (ip->x->dim != ip->b->dim) error(E_SIZES,"iter_cg"); ip->Ax(ip->A_par,ip->x,p); /* p = A*x */ v_sub(ip->b,p,r); /* r = b - A*x */ } else { /* ip->x == 0 */ ip->x = v_get(ip->b->dim); ip->shared_x = FALSE; v_copy(ip->b,r); } if (ip->Bx) (ip->Bx)(ip->B_par,r,p); else v_copy(r,p); inner = in_prod(p,r); nres = sqrt(fabs(inner)); if (ip->info) ip->info(ip,nres,r,p); if ( nres == 0.0) return ip->x; for ( ip->steps = 0; ip->steps <= ip->limit; ip->steps++ ) { ip->Ax(ip->A_par,p,q); inner = in_prod(q,p); if (sqrt(fabs(inner)) <= MACHEPS*ip->init_res) error(E_BREAKDOWN,"iter_cg1"); alpha = in_prod(p,r)/inner; v_mltadd(ip->x,p,alpha,ip->x); v_mltadd(r,q,-alpha,r); rr = r; if (ip->Bx) { ip->Bx(ip->B_par,r,z); rr = z; } nres = in_prod(r,rr); if (nres < 0.0) { warning(WARN_RES_LESS_0,"iter_cg"); break; } nres = sqrt(fabs(nres)); if (ip->info) ip->info(ip,nres,r,z); if (ip->steps == 0) ip->init_res = nres; if ( ip->stop_crit(ip,nres,r,z) ) break; alpha = -in_prod(rr,q)/inner; v_mltadd(rr,p,alpha,p); } return ip->x; } neuron-7.5/src/mesch/ivecop.c000077500000000000000000000231551323325274500162310ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* ivecop.c */ #include #include "matrix.h" static char rcsid[] = "ivecop.c,v 1.1 1997/12/04 17:55:30 hines Exp"; static char line[MAXLINE]; /* iv_get -- get integer vector -- see also memory.c */ IVEC *iv_get(dim) int dim; { IVEC *iv; /* u_int i; */ if (dim < 0) error(E_NEG,"iv_get"); if ((iv=NEW(IVEC)) == IVNULL ) error(E_MEM,"iv_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_IVEC,0,sizeof(IVEC)); mem_numvar(TYPE_IVEC,1); } iv->dim = iv->max_dim = dim; if ((iv->ive = NEW_A(dim,int)) == (int *)NULL ) error(E_MEM,"iv_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_IVEC,0,dim*sizeof(int)); } return (iv); } /* iv_free -- returns iv & asoociated memory back to memory heap */ int iv_free(iv) IVEC *iv; { if ( iv==IVNULL || iv->dim > MAXDIM ) /* don't trust it */ return (-1); if ( iv->ive == (int *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_IVEC,sizeof(IVEC),0); mem_numvar(TYPE_IVEC,-1); } free((char *)iv); } else { if (mem_info_is_on()) { mem_bytes(TYPE_IVEC,sizeof(IVEC)+iv->max_dim*sizeof(int),0); mem_numvar(TYPE_IVEC,-1); } free((char *)iv->ive); free((char *)iv); } return (0); } /* iv_resize -- returns the IVEC with dimension new_dim -- iv is set to the zero vector */ IVEC *iv_resize(iv,new_dim) IVEC *iv; int new_dim; { int i; if (new_dim < 0) error(E_NEG,"iv_resize"); if ( ! iv ) return iv_get(new_dim); if (new_dim == iv->dim) return iv; if ( new_dim > iv->max_dim ) { if (mem_info_is_on()) { mem_bytes(TYPE_IVEC,iv->max_dim*sizeof(int), new_dim*sizeof(int)); } iv->ive = RENEW(iv->ive,new_dim,int); if ( ! iv->ive ) error(E_MEM,"iv_resize"); iv->max_dim = new_dim; } if ( iv->dim <= new_dim ) for ( i = iv->dim; i < new_dim; i++ ) iv->ive[i] = 0; iv->dim = new_dim; return iv; } /* iv_copy -- copy integer vector in to out -- out created/resized if necessary */ IVEC *iv_copy(in,out) IVEC *in, *out; { int i; if ( ! in ) error(E_NULL,"iv_copy"); out = iv_resize(out,in->dim); for ( i = 0; i < in->dim; i++ ) out->ive[i] = in->ive[i]; return out; } /* iv_move -- move selected pieces of an IVEC -- moves the length dim0 subvector with initial index i0 to the corresponding subvector of out with initial index i1 -- out is resized if necessary */ IVEC *iv_move(in,i0,dim0,out,i1) IVEC *in, *out; int i0, dim0, i1; { if ( ! in ) error(E_NULL,"iv_move"); if ( i0 < 0 || dim0 < 0 || i1 < 0 || i0+dim0 > in->dim ) error(E_BOUNDS,"iv_move"); if ( (! out) || i1+dim0 > out->dim ) out = iv_resize(out,i1+dim0); MEM_COPY(&(in->ive[i0]),&(out->ive[i1]),dim0*sizeof(int)); return out; } /* iv_add -- integer vector addition -- may be in-situ */ IVEC *iv_add(iv1,iv2,out) IVEC *iv1,*iv2,*out; { u_int i; int *out_ive, *iv1_ive, *iv2_ive; if ( iv1==IVNULL || iv2==IVNULL ) error(E_NULL,"iv_add"); if ( iv1->dim != iv2->dim ) error(E_SIZES,"iv_add"); if ( out==IVNULL || out->dim != iv1->dim ) out = iv_resize(out,iv1->dim); out_ive = out->ive; iv1_ive = iv1->ive; iv2_ive = iv2->ive; for ( i = 0; i < iv1->dim; i++ ) out_ive[i] = iv1_ive[i] + iv2_ive[i]; return (out); } /* iv_sub -- integer vector addition -- may be in-situ */ IVEC *iv_sub(iv1,iv2,out) IVEC *iv1,*iv2,*out; { u_int i; int *out_ive, *iv1_ive, *iv2_ive; if ( iv1==IVNULL || iv2==IVNULL ) error(E_NULL,"iv_sub"); if ( iv1->dim != iv2->dim ) error(E_SIZES,"iv_sub"); if ( out==IVNULL || out->dim != iv1->dim ) out = iv_resize(out,iv1->dim); out_ive = out->ive; iv1_ive = iv1->ive; iv2_ive = iv2->ive; for ( i = 0; i < iv1->dim; i++ ) out_ive[i] = iv1_ive[i] - iv2_ive[i]; return (out); } /* iv_foutput -- print a representation of iv on stream fp */ void iv_foutput(fp,iv) FILE *fp; IVEC *iv; { int i; fprintf(fp,"IntVector: "); if ( iv == IVNULL ) { fprintf(fp,"**** NULL ****\n"); return; } fprintf(fp,"dim: %d\n",iv->dim); for ( i = 0; i < iv->dim; i++ ) { if ( (i+1) % 8 ) fprintf(fp,"%8d ",iv->ive[i]); else fprintf(fp,"%8d\n",iv->ive[i]); } if ( i % 8 ) fprintf(fp,"\n"); } /* iv_finput -- input integer vector from stream fp */ IVEC *iv_finput(fp,x) FILE *fp; IVEC *x; { IVEC *iiv_finput(),*biv_finput(); if ( isatty(fileno(fp)) ) return iiv_finput(fp,x); else return biv_finput(fp,x); } /* iiv_finput -- interactive input of IVEC iv */ IVEC *iiv_finput(fp,iv) FILE *fp; IVEC *iv; { u_int i,dim,dynamic; /* dynamic set if memory allocated here */ /* get dimension */ if ( iv != (IVEC *)NULL && iv->dimdim; dynamic = FALSE; } else { dynamic = TRUE; do { fprintf(stderr,"IntVector: dim: "); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"iiv_finput"); } while ( sscanf(line,"%u",&dim)<1 || dim>MAXDIM ); iv = iv_get(dim); } /* input elements */ for ( i=0; iive[i]); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"iiv_finput"); if ( (*line == 'b' || *line == 'B') && i > 0 ) { i--; dynamic = FALSE; goto redo; } if ( (*line == 'f' || *line == 'F') && i < dim-1 ) { i++; dynamic = FALSE; goto redo; } } while ( *line=='\0' || sscanf(line,"%d",&iv->ive[i]) < 1 ); return (iv); } /* biv_finput -- batch-file input of IVEC iv */ IVEC *biv_finput(fp,iv) FILE *fp; IVEC *iv; { u_int i,dim; int io_code; /* get dimension */ skipjunk(fp); if ((io_code=fscanf(fp," IntVector: dim:%u",&dim)) < 1 || dim>MAXDIM ) error(io_code==EOF ? 7 : 6,"biv_finput"); /* allocate memory if necessary */ if ( iv==(IVEC *)NULL || iv->dimive[i])) < 1 ) error(io_code==EOF ? 7 : 6,"biv_finput"); return (iv); } /* iv_dump -- dumps all the contents of IVEC iv onto stream fp */ void iv_dump(fp,iv) FILE*fp; IVEC*iv; { int i; fprintf(fp,"IntVector: "); if ( ! iv ) { fprintf(fp,"**** NULL ****\n"); return; } fprintf(fp,"dim: %d, max_dim: %d\n",iv->dim,iv->max_dim); fprintf(fp,"ive @ 0x%p\n", iv->ive); for ( i = 0; i < iv->max_dim; i++ ) { if ( (i+1) % 8 ) fprintf(fp,"%8d ",iv->ive[i]); else fprintf(fp,"%8d\n",iv->ive[i]); } if ( i % 8 ) fprintf(fp,"\n"); } #define MAX_STACK 60 /* iv_sort -- sorts vector x, and generates permutation that gives the order of the components; x = [1.3, 3.7, 0.5] -> [0.5, 1.3, 3.7] and the permutation is order = [2, 0, 1]. -- if order is NULL on entry then it is ignored -- the sorted vector x is returned */ IVEC *iv_sort(x, order) IVEC *x; PERM *order; { int *x_ive, tmp, v; /* int *order_pe; */ int dim, i, j, l, r, tmp_i; int stack[MAX_STACK], sp; if ( ! x ) error(E_NULL,"v_sort"); if ( order != PNULL && order->size != x->dim ) order = px_resize(order, x->dim); x_ive = x->ive; dim = x->dim; if ( order != PNULL ) px_ident(order); if ( dim <= 1 ) return x; /* using quicksort algorithm in Sedgewick, "Algorithms in C", Ch. 9, pp. 118--122 (1990) */ sp = 0; l = 0; r = dim-1; v = x_ive[0]; for ( ; ; ) { while ( r > l ) { /* "i = partition(x_ive,l,r);" */ v = x_ive[r]; i = l-1; j = r; for ( ; ; ) { while ( x_ive[++i] < v ) ; --j; while ( x_ive[j] > v && j != 0 ) --j; if ( i >= j ) break; tmp = x_ive[i]; x_ive[i] = x_ive[j]; x_ive[j] = tmp; if ( order != PNULL ) { tmp_i = order->pe[i]; order->pe[i] = order->pe[j]; order->pe[j] = tmp_i; } } tmp = x_ive[i]; x_ive[i] = x_ive[r]; x_ive[r] = tmp; if ( order != PNULL ) { tmp_i = order->pe[i]; order->pe[i] = order->pe[r]; order->pe[r] = tmp_i; } if ( i-l > r-i ) { stack[sp++] = l; stack[sp++] = i-1; l = i+1; } else { stack[sp++] = i+1; stack[sp++] = r; r = i-1; } } /* recursion elimination */ if ( sp == 0 ) break; r = stack[--sp]; l = stack[--sp]; } return x; } neuron-7.5/src/mesch/lanczos.c000077500000000000000000000171341323325274500164150ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing Lanczos type routines for finding eigenvalues of large, sparse, symmetic matrices */ #include #include #include "matrix.h" #include "sparse.h" static char rcsid[] = "lanczos.c,v 1.1 1997/12/04 17:55:31 hines Exp"; #ifdef ANSI_C extern VEC *trieig(VEC *,VEC *,MAT *); #else extern VEC *trieig(); #endif /* lanczos -- raw lanczos algorithm -- no re-orthogonalisation -- creates T matrix of size == m, but no larger than before beta_k == 0 -- uses passed routine to do matrix-vector multiplies */ void lanczos(A_fn,A_params,m,x0,a,b,beta2,Q) VEC *(*A_fn)(); /* VEC *(*A_fn)(void *A_params,VEC *in, VEC *out) */ void *A_params; int m; VEC *x0, *a, *b; Real *beta2; MAT *Q; { int j; VEC *v, *w, *tmp; Real alpha, beta; if ( ! A_fn || ! x0 || ! a || ! b ) error(E_NULL,"lanczos"); if ( m <= 0 ) error(E_BOUNDS,"lanczos"); if ( Q && ( Q->m < x0->dim || Q->n < m ) ) error(E_SIZES,"lanczos"); a = v_resize(a,(u_int)m); b = v_resize(b,(u_int)(m-1)); v = v_get(x0->dim); w = v_get(x0->dim); tmp = v_get(x0->dim); beta = 1.0; /* normalise x0 as w */ sv_mlt(1.0/v_norm2(x0),x0,w); (*A_fn)(A_params,w,v); for ( j = 0; j < m; j++ ) { /* store w in Q if Q not NULL */ if ( Q ) set_col(Q,j,w); alpha = in_prod(w,v); a->ve[j] = alpha; v_mltadd(v,w,-alpha,v); beta = v_norm2(v); if ( beta == 0.0 ) { v_resize(a,(u_int)j+1); v_resize(b,(u_int)j); *beta2 = 0.0; if ( Q ) Q = m_resize(Q,Q->m,j+1); return; } if ( j < m-1 ) b->ve[j] = beta; v_copy(w,tmp); sv_mlt(1/beta,v,w); sv_mlt(-beta,tmp,v); (*A_fn)(A_params,w,tmp); v_add(v,tmp,v); } *beta2 = beta; V_FREE(v); V_FREE(w); V_FREE(tmp); } #ifndef MAC extern double frexp(), ldexp(); #endif /* product -- returns the product of a long list of numbers -- answer stored in mant (mantissa) and expt (exponent) */ static double product(a,offset,expt) VEC *a; double offset; int *expt; { Real mant, tmp_fctr; int i, tmp_expt; if ( ! a ) error(E_NULL,"product"); mant = 1.0; *expt = 0; if ( offset == 0.0 ) for ( i = 0; i < a->dim; i++ ) { mant *= frexp(a->ve[i],&tmp_expt); *expt += tmp_expt; if ( ! (i % 10) ) { mant = frexp(mant,&tmp_expt); *expt += tmp_expt; } } else for ( i = 0; i < a->dim; i++ ) { tmp_fctr = a->ve[i] - offset; tmp_fctr += (tmp_fctr > 0.0 ) ? -MACHEPS*offset : MACHEPS*offset; mant *= frexp(tmp_fctr,&tmp_expt); *expt += tmp_expt; if ( ! (i % 10) ) { mant = frexp(mant,&tmp_expt); *expt += tmp_expt; } } mant = frexp(mant,&tmp_expt); *expt += tmp_expt; return mant; } /* product2 -- returns the product of a long list of numbers -- answer stored in mant (mantissa) and expt (exponent) */ static double product2(a,k,expt) VEC *a; int k; /* entry of a to leave out */ int *expt; { Real mant, mu, tmp_fctr; int i, tmp_expt; if ( ! a ) error(E_NULL,"product2"); if ( k < 0 || k >= a->dim ) error(E_BOUNDS,"product2"); mant = 1.0; *expt = 0; mu = a->ve[k]; for ( i = 0; i < a->dim; i++ ) { if ( i == k ) continue; tmp_fctr = a->ve[i] - mu; tmp_fctr += ( tmp_fctr > 0.0 ) ? -MACHEPS*mu : MACHEPS*mu; mant *= frexp(tmp_fctr,&tmp_expt); *expt += tmp_expt; if ( ! (i % 10) ) { mant = frexp(mant,&tmp_expt); *expt += tmp_expt; } } mant = frexp(mant,&tmp_expt); *expt += tmp_expt; return mant; } /* dbl_cmp -- comparison function to pass to qsort() */ static int dbl_cmp(x,y) Real *x, *y; { Real tmp; tmp = *x - *y; return (tmp > 0 ? 1 : tmp < 0 ? -1: 0); } /* lanczos2 -- lanczos + error estimate for every e-val -- uses Cullum & Willoughby approach, Sparse Matrix Proc. 1978 -- returns multiple e-vals where multiple e-vals may not exist -- returns evals vector */ VEC *lanczos2(A_fn,A_params,m,x0,evals,err_est) VEC *(*A_fn)(); void *A_params; int m; VEC *x0; /* initial vector */ VEC *evals; /* eigenvalue vector */ VEC *err_est; /* error estimates of eigenvalues */ { VEC *a; static VEC *b=VNULL, *a2=VNULL, *b2=VNULL; Real beta, pb_mant, det_mant, det_mant1, det_mant2; int i, pb_expt, det_expt, det_expt1, det_expt2; if ( ! A_fn || ! x0 ) error(E_NULL,"lanczos2"); if ( m <= 0 ) error(E_RANGE,"lanczos2"); a = evals; a = v_resize(a,(u_int)m); b = v_resize(b,(u_int)(m-1)); MEM_STAT_REG(b,TYPE_VEC); lanczos(A_fn,A_params,m,x0,a,b,&beta,MNULL); /* printf("# beta =%g\n",beta); */ pb_mant = 0.0; if ( err_est ) { pb_mant = product(b,(double)0.0,&pb_expt); /* printf("# pb_mant = %g, pb_expt = %d\n",pb_mant, pb_expt); */ } /* printf("# diags =\n"); out_vec(a); */ /* printf("# off diags =\n"); out_vec(b); */ a2 = v_resize(a2,a->dim - 1); b2 = v_resize(b2,b->dim - 1); MEM_STAT_REG(a2,TYPE_VEC); MEM_STAT_REG(b2,TYPE_VEC); for ( i = 0; i < a2->dim - 1; i++ ) { a2->ve[i] = a->ve[i+1]; b2->ve[i] = b->ve[i+1]; } a2->ve[a2->dim-1] = a->ve[a2->dim]; trieig(a,b,MNULL); /* sort evals as a courtesy */ qsort((void *)(a->ve),(int)(a->dim),sizeof(Real),(int (*)())dbl_cmp); /* error estimates */ if ( err_est ) { err_est = v_resize(err_est,(u_int)m); trieig(a2,b2,MNULL); /* printf("# a =\n"); out_vec(a); */ /* printf("# a2 =\n"); out_vec(a2); */ for ( i = 0; i < a->dim; i++ ) { det_mant1 = product2(a,i,&det_expt1); det_mant2 = product(a2,(double)a->ve[i],&det_expt2); /* printf("# det_mant1=%g, det_expt1=%d\n", det_mant1,det_expt1); */ /* printf("# det_mant2=%g, det_expt2=%d\n", det_mant2,det_expt2); */ if ( det_mant1 == 0.0 ) { /* multiple e-val of T */ err_est->ve[i] = 0.0; continue; } else if ( det_mant2 == 0.0 ) { err_est->ve[i] = HUGE; continue; } if ( (det_expt1 + det_expt2) % 2 ) /* if odd... */ det_mant = sqrt(2.0*fabs(det_mant1*det_mant2)); else /* if even... */ det_mant = sqrt(fabs(det_mant1*det_mant2)); det_expt = (det_expt1+det_expt2)/2; err_est->ve[i] = fabs(beta* ldexp(pb_mant/det_mant,pb_expt-det_expt)); } } return a; } /* sp_lanczos -- version that uses sparse matrix data structure */ void sp_lanczos(A,m,x0,a,b,beta2,Q) SPMAT *A; int m; VEC *x0, *a, *b; Real *beta2; MAT *Q; { lanczos(sp_mv_mlt,A,m,x0,a,b,beta2,Q); } /* sp_lanczos2 -- version of lanczos2() that uses sparse matrix data structure */ VEC *sp_lanczos2(A,m,x0,evals,err_est) SPMAT *A; int m; VEC *x0; /* initial vector */ VEC *evals; /* eigenvalue vector */ VEC *err_est; /* error estimates of eigenvalues */ { return lanczos2(sp_mv_mlt,A,m,x0,evals,err_est); } neuron-7.5/src/mesch/lufactor.c000077500000000000000000000153761323325274500165710ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. */ /* LUfactor.c 1.5 11/25/87 */ static char rcsid[] = "lufactor.c,v 1.1 1997/12/04 17:55:32 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include /* Most matrix factorisation routines are in-situ unless otherwise specified */ /* LUfactor -- gaussian elimination with scaled partial pivoting -- Note: returns LU matrix which is A */ MAT *LUfactor(A,pivot) MAT *A; PERM *pivot; { u_int i, j, k, k_max, m, n; int i_max; Real **A_v, *A_piv, *A_row; Real max1, temp, tiny; static VEC *scale = VNULL; if ( A==(MAT *)NULL || pivot==(PERM *)NULL ) error(E_NULL,"LUfactor"); if ( pivot->size != A->m ) error(E_SIZES,"LUfactor"); m = A->m; n = A->n; scale = v_resize(scale,A->m); MEM_STAT_REG(scale,TYPE_VEC); A_v = A->me; tiny = 10.0/HUGE_VAL; /* initialise pivot with identity permutation */ for ( i=0; ipe[i] = i; /* set scale parameters */ for ( i=0; ive[i] = max1; } /* main loop */ k_max = min(m,n)-1; for ( k=0; kve[i]) >= tiny*fabs(A_v[i][k]) ) { temp = fabs(A_v[i][k])/scale->ve[i]; if ( temp > max1 ) { max1 = temp; i_max = i; } } /* if no pivot then ignore column k... */ if ( i_max == -1 ) { /* set pivot entry A[k][k] exactly to zero, rather than just "small" */ A_v[k][k] = 0.0; continue; } /* do we pivot ? */ if ( i_max != k ) /* yes we do... */ { px_transp(pivot,i_max,k); for ( j=0; jm != A->n || A->n != b->dim ) error(E_SIZES,"LUsolve"); x = v_resize(x,b->dim); px_vec(pivot,b,x); /* x := P.b */ Lsolve(A,x,x,1.0); /* implicit diagonal = 1 */ Usolve(A,x,x,0.0); /* explicit diagonal */ return (x); } /* LUTsolve -- given an LU factorisation in A, solve A^T.x=b */ VEC *LUTsolve(LU,pivot,b,x) MAT *LU; PERM *pivot; VEC *b,*x; { if ( ! LU || ! b || ! pivot ) error(E_NULL,"LUTsolve"); if ( LU->m != LU->n || LU->n != b->dim ) error(E_SIZES,"LUTsolve"); x = v_copy(b,x); UTsolve(LU,x,x,0.0); /* explicit diagonal */ LTsolve(LU,x,x,1.0); /* implicit diagonal = 1 */ pxinv_vec(pivot,x,x); /* x := P^T.tmp */ return (x); } /* m_inverse -- returns inverse of A, provided A is not too rank deficient -- uses LU factorisation */ MAT *m_inverse(A,out) MAT *A, *out; { int i; static VEC *tmp = VNULL, *tmp2 = VNULL; static MAT *A_cp = MNULL; static PERM *pivot = PNULL; if ( ! A ) error(E_NULL,"m_inverse"); if ( A->m != A->n ) error(E_SQUARE,"m_inverse"); if ( ! out || out->m < A->m || out->n < A->n ) out = m_resize(out,A->m,A->n); A_cp = m_resize(A_cp,A->m,A->n); A_cp = m_copy(A,A_cp); tmp = v_resize(tmp,A->m); tmp2 = v_resize(tmp2,A->m); pivot = px_resize(pivot,A->m); MEM_STAT_REG(A_cp,TYPE_MAT); MEM_STAT_REG(tmp, TYPE_VEC); MEM_STAT_REG(tmp2,TYPE_VEC); MEM_STAT_REG(pivot,TYPE_PERM); tracecatch(LUfactor(A_cp,pivot),"m_inverse"); for ( i = 0; i < A->n; i++ ) { v_zero(tmp); tmp->ve[i] = 1.0; tracecatch(LUsolve(A_cp,pivot,tmp,tmp2),"m_inverse"); set_col(out,i,tmp2); } return out; } /* LUcondest -- returns an estimate of the condition number of LU given the LU factorisation in compact form */ double LUcondest(LU,pivot) MAT *LU; PERM *pivot; { static VEC *y = VNULL, *z = VNULL; Real cond_est=0.0, L_norm, U_norm, sum, tiny; int i, j, n; if ( ! LU || ! pivot ) error(E_NULL,"LUcondest"); if ( LU->m != LU->n ) error(E_SQUARE,"LUcondest"); if ( LU->n != pivot->size ) error(E_SIZES,"LUcondest"); tiny = 10.0/HUGE_VAL; n = LU->n; y = v_resize(y,n); z = v_resize(z,n); MEM_STAT_REG(y,TYPE_VEC); MEM_STAT_REG(z,TYPE_VEC); for ( i = 0; i < n; i++ ) { sum = 0.0; for ( j = 0; j < i; j++ ) sum -= LU->me[j][i]*y->ve[j]; sum -= (sum < 0.0) ? 1.0 : -1.0; if ( fabs(LU->me[i][i]) <= tiny*fabs(sum) ) return HUGE_VAL; y->ve[i] = sum / LU->me[i][i]; } catch(E_SING, LTsolve(LU,y,y,1.0); LUsolve(LU,pivot,y,z); , return HUGE_VAL); /* now estimate norm of A (even though it is not directly available) */ /* actually computes ||L||_inf.||U||_inf */ U_norm = 0.0; for ( i = 0; i < n; i++ ) { sum = 0.0; for ( j = i; j < n; j++ ) sum += fabs(LU->me[i][j]); if ( sum > U_norm ) U_norm = sum; } L_norm = 0.0; for ( i = 0; i < n; i++ ) { sum = 1.0; for ( j = 0; j < i; j++ ) sum += fabs(LU->me[i][j]); if ( sum > L_norm ) L_norm = sum; } tracecatch(cond_est = U_norm*L_norm*v_norm_inf(z)/v_norm_inf(y), "LUcondest"); return cond_est; } neuron-7.5/src/mesch/machine.c000077500000000000000000000071531323325274500163500ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains basic routines which are used by the functions in meschach.a etc. These are the routines that should be modified in order to take full advantage of specialised architectures (pipelining, vector processors etc). */ static char *rcsid = "machine.c,v 1.1 1997/12/04 17:55:33 hines Exp"; #include "machine.h" /* __ip__ -- inner product */ double __ip__(dp1,dp2,len) register Real *dp1, *dp2; int len; { #ifdef VUNROLL register int len4; register Real sum1, sum2, sum3; #endif register int i; register Real sum; sum = 0.0; #ifdef VUNROLL sum1 = sum2 = sum3 = 0.0; len4 = len / 4; len = len % 4; for ( i = 0; i < len4; i++ ) { sum += dp1[4*i]*dp2[4*i]; sum1 += dp1[4*i+1]*dp2[4*i+1]; sum2 += dp1[4*i+2]*dp2[4*i+2]; sum3 += dp1[4*i+3]*dp2[4*i+3]; } sum += sum1 + sum2 + sum3; dp1 += 4*len4; dp2 += 4*len4; #endif for ( i = 0; i < len; i++ ) sum += dp1[i]*dp2[i]; return sum; } /* __mltadd__ -- scalar multiply and add c.f. v_mltadd() */ void __mltadd__(dp1,dp2,s,len) register Real *dp1, *dp2; register double s; register int len; { register int i; #ifdef VUNROLL register int len4; len4 = len / 4; len = len % 4; for ( i = 0; i < len4; i++ ) { dp1[4*i] += s*dp2[4*i]; dp1[4*i+1] += s*dp2[4*i+1]; dp1[4*i+2] += s*dp2[4*i+2]; dp1[4*i+3] += s*dp2[4*i+3]; } dp1 += 4*len4; dp2 += 4*len4; #endif for ( i = 0; i < len; i++ ) dp1[i] += s*dp2[i]; } /* __smlt__ scalar multiply array c.f. sv_mlt() */ void __smlt__(dp,s,out,len) register Real *dp, *out; register double s; register int len; { register int i; for ( i = 0; i < len; i++ ) out[i] = s*dp[i]; } /* __add__ -- add arrays c.f. v_add() */ void __add__(dp1,dp2,out,len) register Real *dp1, *dp2, *out; register int len; { register int i; for ( i = 0; i < len; i++ ) out[i] = dp1[i] + dp2[i]; } /* __sub__ -- subtract arrays c.f. v_sub() */ void __sub__(dp1,dp2,out,len) register Real *dp1, *dp2, *out; register int len; { register int i; for ( i = 0; i < len; i++ ) out[i] = dp1[i] - dp2[i]; } /* __zero__ -- zeros an array of floating point numbers */ void __zero__(dp,len) register Real *dp; register int len; { #ifdef CHAR0ISDBL0 /* if a floating point zero is equivalent to a string of nulls */ MEM_ZERO((char *)dp,len*sizeof(Real)); #else /* else, need to zero the array entry by entry */ int i; for ( i = 0; i < len; i++ ) dp[i] = 0.0; #endif } neuron-7.5/src/mesch/machine.h000077500000000000000000000123641323325274500163550ustar00rootroot00000000000000/* * This file has been hacked from the machine.h files supplied from the * original meschach distribution. It's now a generic file that works on * all machines. * * This file used to define a bunch of HAVE_xyz macros. This is all handled * now in config.h. */ /* machine.h. Generated automatically by configure. */ /* Any machine specific stuff goes here */ /* Add details necessary for your own installation here! */ /* RCS id: machine.h,v 1.3 1998/08/31 19:47:38 hines Exp */ /* This is for use with "configure" -- if you are not using configure then use machine.van for the "vanilla" version of machine.h */ /* Note special macros: ANSI_C (ANSI C syntax) SEGMENTED (segmented memory machine e.g. MS-DOS) MALLOCDECL (declared if malloc() etc have been declared) */ #ifndef _MACHINE_H #define _MACHINE_H 1 #include #include <../../nrnconf.h> #if defined(HAVE_STDINT_H) #include #endif #if !defined(HUGE) && defined(HUGE_VAL) #define HUGE HUGE_VAL #endif typedef uint32_t u_int; /* #undef const */ /* #undef MALLOCDECL */ #define NOT_SEGMENTED 1 #define CHAR0ISDBL0 1 #define HAVE_PROTOTYPES 1 /* #undef HAVE_PROTOTYPES_IN_STRUCT */ /* for inclusion into C++ files */ #ifdef __cplusplus #define ANSI_C 1 #ifndef HAVE_PROTOTYPES #define HAVE_PROTOTYPES 1 #endif #ifndef HAVE_PROTOTYPES_IN_STRUCT #define HAVE_PROTOTYPES_IN_STRUCT 1 #endif #endif /* __cplusplus */ /* example usage: VEC *PROTO(v_get,(int dim)); */ #ifdef HAVE_PROTOTYPES #define PROTO(name,args) name args #else #define PROTO(name,args) name() #endif /* HAVE_PROTOTYPES */ #ifdef HAVE_PROTOTYPES_IN_STRUCT /* PROTO_() is to be used instead of PROTO() in struct's and typedef's */ #define PROTO_(name,args) name args #else #define PROTO_(name,args) name() #endif /* HAVE_PROTOTYPES_IN_STRUCT */ /* for basic or larger versions */ #define COMPLEX 1 #define SPARSE 1 /* for loop unrolling */ /* #undef VUNROLL */ /* #undef MUNROLL */ /* for segmented memory */ #ifndef NOT_SEGMENTED #define SEGMENTED #endif /* An AIX machine had incompatible prototypes between malloc.h and stdlib.h so prefer stdlib.h if it exists */ #ifdef HAVE_STDLIB_H #include #else /* if the system has malloc.h */ #ifdef HAVE_MALLOC_H #define MALLOCDECL 1 #include #endif #endif /* any compiler should have this header */ /* if not, change it */ #include /* Check for ANSI C memmove and memset */ #if defined(STDC_HEADERS) || defined(WIN32) /* standard copy & zero functions */ #define MEM_COPY(from,to,size) memmove((to),(from),(size)) #define MEM_ZERO(where,size) memset((where),'\0',(size)) #ifndef ANSI_C #define ANSI_C 1 #endif #endif /* standard headers */ #ifdef ANSI_C #include #include #include #include #endif /* if have bcopy & bzero and no alternatives yet known, use them */ #ifdef HAVE_BCOPY #ifndef MEM_COPY /* nonstandard copy function */ #define MEM_COPY(from,to,size) bcopy((char *)(from),(char *)(to),(int)(size)) #endif #endif #ifdef HAVE_BZERO #ifndef MEM_ZERO /* nonstandard zero function */ #define MEM_ZERO(where,size) bzero((char *)(where),(int)(size)) #endif #endif /* if the system has complex.h */ #if 0 #ifdef HAVE_COMPLEX_H #include #endif /* I've commented this out because it causes problems when run through a C++ compiler. complex.h is part of the C++ standard library but does something completely different. */ #endif /* If prototypes are available & ANSI_C not yet defined, then define it, but don't include any header files as the proper ANSI C headers aren't here */ #ifdef HAVE_PROTOTYPES #ifndef ANSI_C #define ANSI_C 1 #endif #endif /* floating point precision */ /* you can choose single, double or long double (if available) precision */ #define FLOAT 1 #define DOUBLE 2 #define LONG_DOUBLE 3 /* #undef REAL_FLT */ /* #undef REAL_DBL */ /* if nothing is defined, choose double precision */ #ifndef REAL_DBL #ifndef REAL_FLT #define REAL_DBL 1 #endif #endif /* single precision */ #ifdef REAL_FLT #define Real float #define LongReal float #define REAL FLOAT #define LONGREAL FLOAT #endif /* double precision */ #ifdef REAL_DBL #define Real double #define LongReal double #define REAL DOUBLE #define LONGREAL DOUBLE #endif /* machine epsilon or unit roundoff error */ /* This is correct on most IEEE Real precision systems */ #ifdef DBL_EPSILON #if REAL == DOUBLE #define MACHEPS DBL_EPSILON #elif REAL == FLOAT #define MACHEPS FLT_EPSILON #elif REAL == LONGDOUBLE #define MACHEPS LDBL_EPSILON #endif #endif #define F_MACHEPS 1.19209e-07 #define D_MACHEPS 2.22045e-16 #ifndef MACHEPS #if REAL == DOUBLE #define MACHEPS D_MACHEPS #elif REAL == FLOAT #define MACHEPS F_MACHEPS #elif REAL == LONGDOUBLE #define MACHEPS D_MACHEPS #endif #endif /* #undef M_MACHEPS */ /******************** #ifdef DBL_EPSILON #define MACHEPS DBL_EPSILON #endif #ifdef M_MACHEPS #ifndef MACHEPS #define MACHEPS M_MACHEPS #endif #endif ********************/ #define M_MAX_INT 2147483647 #ifdef M_MAX_INT #ifndef MAX_RAND #define MAX_RAND ((double)(M_MAX_INT)) /* This isn't true on a lot of older unix systems. */ #endif #endif /* for non-ANSI systems */ #ifndef HUGE_VAL #define HUGE_VAL HUGE #else #ifndef HUGE #define HUGE HUGE_VAL #endif #endif #if HAVE_UNISTD_H #include #endif #endif neuron-7.5/src/mesch/matlab.c000077500000000000000000000125651323325274500162070ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains routines for import/exporting data to/from MATLAB. The main routines are: MAT *m_save(FILE *fp,MAT *A,char *name) VEC *v_save(FILE *fp,VEC *x,char *name) MAT *m_load(FILE *fp,char **name) */ #include #include "matrix.h" #include "matlab.h" static char rcsid[] = "matlab.c,v 1.1 1997/12/04 17:55:34 hines Exp"; /* m_save -- save matrix in ".mat" file for MATLAB -- returns matrix to be saved */ MAT *m_save(fp,A,name) FILE *fp; MAT *A; char *name; { int i; matlab mat; if ( ! A ) error(E_NULL,"m_save"); mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; mat.m = A->m; mat.n = A->n; mat.imag = FALSE; mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1; /* write header */ fwrite(&mat,sizeof(matlab),1,fp); /* write name */ if ( name == (char *)NULL ) fwrite("",sizeof(char),1,fp); else fwrite(name,sizeof(char),(int)(mat.namlen),fp); /* write actual data */ #if ORDER == ROW_ORDER for ( i = 0; i < A->m; i++ ) fwrite(A->me[i],sizeof(Real),(int)(A->n),fp); #else /* column major order: ORDER == COL_ORDER */ for ( j = 0; j < A->n; j++ ) for ( i = 0; i < A->m; i++ ) fwrite(&(A->me[i][j]),sizeof(Real),1,fp); #endif return A; } /* v_save -- save vector in ".mat" file for MATLAB -- saves it as a row vector -- returns vector to be saved */ VEC *v_save(fp,x,name) FILE *fp; VEC *x; char *name; { matlab mat; if ( ! x ) error(E_NULL,"v_save"); mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; mat.m = x->dim; mat.n = 1; mat.imag = FALSE; mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1; /* write header */ fwrite(&mat,sizeof(matlab),1,fp); /* write name */ if ( name == (char *)NULL ) fwrite("",sizeof(char),1,fp); else fwrite(name,sizeof(char),(int)(mat.namlen),fp); /* write actual data */ fwrite(x->ve,sizeof(Real),(int)(x->dim),fp); return x; } /* d_save -- save double in ".mat" file for MATLAB -- saves it as a row vector -- returns vector to be saved */ double d_save(fp,x,name) FILE *fp; double x; char *name; { matlab mat; Real x1 = x; mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; mat.m = 1; mat.n = 1; mat.imag = FALSE; mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1; /* write header */ fwrite(&mat,sizeof(matlab),1,fp); /* write name */ if ( name == (char *)NULL ) fwrite("",sizeof(char),1,fp); else fwrite(name,sizeof(char),(int)(mat.namlen),fp); /* write actual data */ fwrite(&x1,sizeof(Real),1,fp); return x; } /* m_load -- loads in a ".mat" file variable as produced by MATLAB -- matrix returned; imaginary parts ignored */ MAT *m_load(fp,name) FILE *fp; char **name; { MAT *A; int i; int m_flag, o_flag, p_flag, t_flag; float f_temp; Real d_temp; matlab mat; if ( fread(&mat,sizeof(matlab),1,fp) != 1 ) error(E_FORMAT,"m_load"); if ( mat.type >= 10000 ) /* don't load a sparse matrix! */ error(E_FORMAT,"m_load"); m_flag = (mat.type/1000) % 10; o_flag = (mat.type/100) % 10; p_flag = (mat.type/10) % 10; t_flag = (mat.type) % 10; if ( m_flag != MACH_ID ) error(E_FORMAT,"m_load"); if ( t_flag != 0 ) error(E_FORMAT,"m_load"); if ( p_flag != DOUBLE_PREC && p_flag != SINGLE_PREC ) error(E_FORMAT,"m_load"); *name = (char *)malloc((unsigned)(mat.namlen)+1); if ( fread(*name,sizeof(char),(unsigned)(mat.namlen),fp) == 0 ) error(E_FORMAT,"m_load"); A = m_get((unsigned)(mat.m),(unsigned)(mat.n)); for ( i = 0; i < A->m*A->n; i++ ) { if ( p_flag == DOUBLE_PREC ) { if (fread(&d_temp,sizeof(double),1,fp) != 1) { error(E_INPUT, "m_load"); } } else { if (fread(&f_temp,sizeof(float),1,fp) != 1) { error(E_INPUT, "m_load"); } d_temp = f_temp; } if ( o_flag == ROW_ORDER ) { A->me[i / A->n][i % A->n] = d_temp; } else if ( o_flag == COL_ORDER ) { A->me[i % A->m][i / A->m] = d_temp; } else { error(E_FORMAT,"m_load"); } } if ( mat.imag ) /* skip imaginary part */ for ( i = 0; i < A->m*A->n; i++ ) { if ( p_flag == DOUBLE_PREC ) { if (fread(&d_temp,sizeof(double),1,fp) != 1) { error(E_INPUT, "m_load"); } } else { if (fread(&f_temp,sizeof(float),1,fp) != 1) { error(E_INPUT, "m_load"); } } } return A; } neuron-7.5/src/mesch/matlab.h000077500000000000000000000057171323325274500162150ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* matlab.h -- Header file for matlab.c, spmatlab.c and zmatlab.c for save/load formats */ #ifndef MATLAB_DEF #define MATLAB_DEF /* structure required by MATLAB */ typedef struct { long type; /* matrix type */ long m; /* # rows */ long n; /* # cols */ long imag; /* is complex? */ long namlen; /* length of variable name */ } matlab; /* macros for matrix storage type */ #define INTEL 0 /* for 80x87 format */ #define PC INTEL #define MOTOROLA 1 /* 6888x format */ #define SUN MOTOROLA #define APOLLO MOTOROLA #undef MAC #define MAC MOTOROLA #define VAX_D 2 #define VAX_G 3 #define COL_ORDER 0 #define ROW_ORDER 1 #define DOUBLE_PREC 0 /* double precision */ #define SINGLE_PREC 1 /* single precision */ #define INT_32 2 /* 32 bit integers (signed) */ #define INT_16 3 /* 16 bit integers (signed) */ #define INT_16u 4 /* 16 bit integers (unsigned) */ /* end of macros for matrix storage type */ #ifndef MACH_ID #define MACH_ID MOTOROLA #endif #define ORDER ROW_ORDER #if REAL == DOUBLE #define PRECISION DOUBLE_PREC #elif REAL == FLOAT #define PRECISION SINGLE_PREC #endif /* prototypes */ #ifdef ANSI_C MAT *m_save(FILE *,MAT *,char *); MAT *m_load(FILE *,char **); VEC *v_save(FILE *,VEC *,char *); double d_save(FILE *,double,char *); #else extern MAT *m_save(), *m_load(); extern VEC *v_save(); extern double d_save(); #endif /* complex variant */ #ifdef COMPLEX #include "zmatrix.h" #ifdef ANSI_C extern ZMAT *zm_save(FILE *fp,ZMAT *A,char *name); extern ZVEC *zv_save(FILE *fp,ZVEC *x,char *name); extern complex z_save(FILE *fp,complex z,char *name); extern ZMAT *zm_load(FILE *fp,char **name); #else extern ZMAT *zm_save(); extern ZVEC *zv_save(); extern complex z_save(); extern ZMAT *zm_load(); #endif #endif #endif neuron-7.5/src/mesch/matop.c000077500000000000000000000275061323325274500160700ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* matop.c 1.3 11/25/87 */ #include #include "matrix.h" static char rcsid[] = "matop.c,v 1.1 1997/12/04 17:55:35 hines Exp"; /* m_add -- matrix addition -- may be in-situ */ MAT *m_add(mat1,mat2,out) MAT *mat1,*mat2,*out; { u_int m,n,i; if ( mat1==(MAT *)NULL || mat2==(MAT *)NULL ) error(E_NULL,"m_add"); if ( mat1->m != mat2->m || mat1->n != mat2->n ) error(E_SIZES,"m_add"); if ( out==(MAT *)NULL || out->m != mat1->m || out->n != mat1->n ) out = m_resize(out,mat1->m,mat1->n); m = mat1->m; n = mat1->n; for ( i=0; ime[i],mat2->me[i],out->me[i],(int)n); /************************************************** for ( j=0; jme[i][j] = mat1->me[i][j]+mat2->me[i][j]; **************************************************/ } return (out); } /* m_sub -- matrix subtraction -- may be in-situ */ MAT *m_sub(mat1,mat2,out) MAT *mat1,*mat2,*out; { u_int m,n,i; if ( mat1==(MAT *)NULL || mat2==(MAT *)NULL ) error(E_NULL,"m_sub"); if ( mat1->m != mat2->m || mat1->n != mat2->n ) error(E_SIZES,"m_sub"); if ( out==(MAT *)NULL || out->m != mat1->m || out->n != mat1->n ) out = m_resize(out,mat1->m,mat1->n); m = mat1->m; n = mat1->n; for ( i=0; ime[i],mat2->me[i],out->me[i],(int)n); /************************************************** for ( j=0; jme[i][j] = mat1->me[i][j]-mat2->me[i][j]; **************************************************/ } return (out); } /* m_mlt -- matrix-matrix multiplication */ MAT *m_mlt(A,B,OUT) MAT *A,*B,*OUT; { u_int i, /* j, */ k, m, n, p; Real **A_v, **B_v /*, *B_row, *OUT_row, sum, tmp */; if ( A==(MAT *)NULL || B==(MAT *)NULL ) error(E_NULL,"m_mlt"); if ( A->n != B->m ) error(E_SIZES,"m_mlt"); if ( A == OUT || B == OUT ) error(E_INSITU,"m_mlt"); m = A->m; n = A->n; p = B->n; A_v = A->me; B_v = B->me; if ( OUT==(MAT *)NULL || OUT->m != A->m || OUT->n != B->n ) OUT = m_resize(OUT,A->m,B->n); /**************************************************************** for ( i=0; ime[i][j] = sum; } ****************************************************************/ m_zero(OUT); for ( i=0; ime[i],B_v[k],A_v[i][k],(int)p); /************************************************** B_row = B_v[k]; OUT_row = OUT->me[i]; for ( j=0; jn != B->n ) error(E_SIZES,"mmtr_mlt"); if ( ! OUT || OUT->m != A->m || OUT->n != B->m ) OUT = m_resize(OUT,A->m,B->m); limit = A->n; for ( i = 0; i < A->m; i++ ) for ( j = 0; j < B->m; j++ ) { OUT->me[i][j] = __ip__(A->me[i],B->me[j],(int)limit); /************************************************** sum = 0.0; A_row = A->me[i]; B_row = B->me[j]; for ( k = 0; k < limit; k++ ) sum += (*A_row++)*(*B_row++); OUT->me[i][j] = sum; **************************************************/ } return OUT; } /* mtrm_mlt -- matrix transposed-matrix multiplication -- A^T.B is returned, result stored in OUT */ MAT *mtrm_mlt(A,B,OUT) MAT *A, *B, *OUT; { int i, k, limit; /* Real *B_row, *OUT_row, multiplier; */ if ( ! A || ! B ) error(E_NULL,"mmtr_mlt"); if ( A == OUT || B == OUT ) error(E_INSITU,"mtrm_mlt"); if ( A->m != B->m ) error(E_SIZES,"mmtr_mlt"); if ( ! OUT || OUT->m != A->n || OUT->n != B->n ) OUT = m_resize(OUT,A->n,B->n); limit = B->n; m_zero(OUT); for ( k = 0; k < A->m; k++ ) for ( i = 0; i < A->n; i++ ) { if ( A->me[k][i] != 0.0 ) __mltadd__(OUT->me[i],B->me[k],A->me[k][i],(int)limit); /************************************************** multiplier = A->me[k][i]; OUT_row = OUT->me[i]; B_row = B->me[k]; for ( j = 0; j < limit; j++ ) *(OUT_row++) += multiplier*(*B_row++); **************************************************/ } return OUT; } /* mv_mlt -- matrix-vector multiplication -- Note: b is treated as a column vector */ VEC *mv_mlt(A,b,out) MAT *A; VEC *b,*out; { u_int i, m, n; Real **A_v, *b_v /*, *A_row */; /* register Real sum; */ if ( A==(MAT *)NULL || b==(VEC *)NULL ) error(E_NULL,"mv_mlt"); if ( A->n != b->dim ) error(E_SIZES,"mv_mlt"); if ( b == out ) error(E_INSITU,"mv_mlt"); if ( out == (VEC *)NULL || out->dim != A->m ) out = v_resize(out,A->m); m = A->m; n = A->n; A_v = A->me; b_v = b->ve; for ( i=0; ive[i] = __ip__(A_v[i],b_v,(int)n); /************************************************** A_row = A_v[i]; b_v = b->ve; for ( j=0; jve[i] = sum; **************************************************/ } return out; } /* sm_mlt -- scalar-matrix multiply -- may be in-situ */ MAT *sm_mlt(scalar,matrix,out) double scalar; MAT *matrix,*out; { u_int m,n,i; if ( matrix==(MAT *)NULL ) error(E_NULL,"sm_mlt"); if ( out==(MAT *)NULL || out->m != matrix->m || out->n != matrix->n ) out = m_resize(out,matrix->m,matrix->n); m = matrix->m; n = matrix->n; for ( i=0; ime[i],(double)scalar,out->me[i],(int)n); /************************************************** for ( j=0; jme[i][j] = scalar*matrix->me[i][j]; **************************************************/ return (out); } /* vm_mlt -- vector-matrix multiplication -- Note: b is treated as a row vector */ VEC *vm_mlt(A,b,out) MAT *A; VEC *b,*out; { u_int j,m,n; /* Real sum,**A_v,*b_v; */ if ( A==(MAT *)NULL || b==(VEC *)NULL ) error(E_NULL,"vm_mlt"); if ( A->m != b->dim ) error(E_SIZES,"vm_mlt"); if ( b == out ) error(E_INSITU,"vm_mlt"); if ( out == (VEC *)NULL || out->dim != A->n ) out = v_resize(out,A->n); m = A->m; n = A->n; v_zero(out); for ( j = 0; j < m; j++ ) if ( b->ve[j] != 0.0 ) __mltadd__(out->ve,A->me[j],b->ve[j],(int)n); /************************************************** A_v = A->me; b_v = b->ve; for ( j=0; jve[j] = sum; } **************************************************/ return out; } /* m_transp -- transpose matrix */ MAT *m_transp(in,out) MAT *in, *out; { int i, j; int in_situ; Real tmp; if ( in == (MAT *)NULL ) error(E_NULL,"m_transp"); if ( in == out && in->n != in->m ) error(E_INSITU2,"m_transp"); in_situ = ( in == out ); if ( out == (MAT *)NULL || out->m != in->n || out->n != in->m ) out = m_resize(out,in->n,in->m); if ( ! in_situ ) for ( i = 0; i < in->m; i++ ) for ( j = 0; j < in->n; j++ ) out->me[j][i] = in->me[i][j]; else for ( i = 1; i < in->m; i++ ) for ( j = 0; j < i; j++ ) { tmp = in->me[i][j]; in->me[i][j] = in->me[j][i]; in->me[j][i] = tmp; } return out; } /* swap_rows -- swaps rows i and j of matrix A upto column lim */ MAT *swap_rows(A,i,j,lo,hi) MAT *A; int i, j, lo, hi; { int k; Real **A_me, tmp; if ( ! A ) error(E_NULL,"swap_rows"); if ( i < 0 || j < 0 || i >= A->m || j >= A->m ) error(E_SIZES,"swap_rows"); lo = max(0,lo); hi = min(hi,A->n-1); A_me = A->me; for ( k = lo; k <= hi; k++ ) { tmp = A_me[k][i]; A_me[k][i] = A_me[k][j]; A_me[k][j] = tmp; } return A; } /* swap_cols -- swap columns i and j of matrix A upto row lim */ MAT *swap_cols(A,i,j,lo,hi) MAT *A; int i, j, lo, hi; { int k; Real **A_me, tmp; if ( ! A ) error(E_NULL,"swap_cols"); if ( i < 0 || j < 0 || i >= A->n || j >= A->n ) error(E_SIZES,"swap_cols"); lo = max(0,lo); hi = min(hi,A->m-1); A_me = A->me; for ( k = lo; k <= hi; k++ ) { tmp = A_me[i][k]; A_me[i][k] = A_me[j][k]; A_me[j][k] = tmp; } return A; } /* ms_mltadd -- matrix-scalar multiply and add -- may be in situ -- returns out == A1 + s*A2 */ MAT *ms_mltadd(A1,A2,s,out) MAT *A1, *A2, *out; double s; { /* register Real *A1_e, *A2_e, *out_e; */ /* register int j; */ int i, m, n; if ( ! A1 || ! A2 ) error(E_NULL,"ms_mltadd"); if ( A1->m != A2->m || A1->n != A2->n ) error(E_SIZES,"ms_mltadd"); if ( out != A1 && out != A2 ) out = m_resize(out,A1->m,A1->n); if ( s == 0.0 ) return m_copy(A1,out); if ( s == 1.0 ) return m_add(A1,A2,out); tracecatch(out = m_copy(A1,out),"ms_mltadd"); m = A1->m; n = A1->n; for ( i = 0; i < m; i++ ) { __mltadd__(out->me[i],A2->me[i],s,(int)n); /************************************************** A1_e = A1->me[i]; A2_e = A2->me[i]; out_e = out->me[i]; for ( j = 0; j < n; j++ ) out_e[j] = A1_e[j] + s*A2_e[j]; **************************************************/ } return out; } /* mv_mltadd -- matrix-vector multiply and add -- may not be in situ -- returns out == v1 + alpha*A*v2 */ VEC *mv_mltadd(v1,v2,A,alpha,out) VEC *v1, *v2, *out; MAT *A; double alpha; { /* register int j; */ int i, m, n; Real *v2_ve, *out_ve; if ( ! v1 || ! v2 || ! A ) error(E_NULL,"mv_mltadd"); if ( out == v2 ) error(E_INSITU,"mv_mltadd"); if ( v1->dim != A->m || v2->dim != A->n ) error(E_SIZES,"mv_mltadd"); tracecatch(out = v_copy(v1,out),"mv_mltadd"); v2_ve = v2->ve; out_ve = out->ve; m = A->m; n = A->n; if ( alpha == 0.0 ) return out; for ( i = 0; i < m; i++ ) { out_ve[i] += alpha*__ip__(A->me[i],v2_ve,(int)n); /************************************************** A_e = A->me[i]; sum = 0.0; for ( j = 0; j < n; j++ ) sum += A_e[j]*v2_ve[j]; out_ve[i] = v1->ve[i] + alpha*sum; **************************************************/ } return out; } /* vm_mltadd -- vector-matrix multiply and add -- may not be in situ -- returns out' == v1' + v2'*A */ VEC *vm_mltadd(v1,v2,A,alpha,out) VEC *v1, *v2, *out; MAT *A; double alpha; { int /* i, */ j, m, n; Real tmp, /* *A_e, */ *out_ve; if ( ! v1 || ! v2 || ! A ) error(E_NULL,"vm_mltadd"); if ( v2 == out ) error(E_INSITU,"vm_mltadd"); if ( v1->dim != A->n || A->m != v2->dim ) error(E_SIZES,"vm_mltadd"); tracecatch(out = v_copy(v1,out),"vm_mltadd"); out_ve = out->ve; m = A->m; n = A->n; for ( j = 0; j < m; j++ ) { tmp = v2->ve[j]*alpha; if ( tmp != 0.0 ) __mltadd__(out_ve,A->me[j],tmp,(int)n); /************************************************** A_e = A->me[j]; for ( i = 0; i < n; i++ ) out_ve[i] += A_e[i]*tmp; **************************************************/ } return out; } neuron-7.5/src/mesch/matrix.h000077500000000000000000000464121323325274500162560ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** *************************************************************************** Date Author Modification 18 Feb 2000 Gary Holt Removed definition of u_int since it's now handled in config.h. Was causing compilation warnings unnecessarily. */ /* Type definitions for general purpose maths package */ #ifndef MATRIXH /* RCS id: $Id: matrix.h 616 2004-04-24 21:28:33Z hines $ */ #define MATRIXH #include "machine.h" #include "err.h" #include "meminfo.h" #define m_move mesch_m_move #define OUT mesch_out #if defined(__MWERKS__) && !defined(_MSC_VER) #include #else #include #endif /* unsigned integer type */ /* This is no longer needed; it's defined in config.h if the compiler hasn't * defined it already. */ /* #ifndef U_INT_DEF */ /* typedef unsigned int u_int; */ /* #define U_INT_DEF */ /* #endif */ /* vector definition */ typedef struct { u_int dim, max_dim; Real *ve; } VEC; /* matrix definition */ typedef struct { u_int m, n; u_int max_m, max_n, max_size; Real **me,*base; /* base is base of alloc'd mem */ } MAT; /* band matrix definition */ typedef struct { MAT *mat; /* matrix */ int lb,ub; /* lower and upper bandwidth */ } BAND; /* permutation definition */ typedef struct { u_int size, max_size, *pe; } PERM; /* integer vector definition */ typedef struct { u_int dim, max_dim; int *ive; } IVEC; #if 1 #include #else #ifndef MALLOCDECL #ifndef ANSI_C extern char *malloc(), *calloc(), *realloc(); #else extern void *malloc(size_t), *calloc(size_t,size_t), *realloc(void *,size_t); #endif #endif #endif #ifndef ANSI_C extern void m_version(); #else void m_version( void ); #endif #ifndef ANSI_C /* allocate one object of given type */ #define NEW(type) ((type *)calloc(1,sizeof(type))) /* allocate num objects of given type */ #define NEW_A(num,type) ((type *)calloc((unsigned)(num),sizeof(type))) /* re-allocate arry to have num objects of the given type */ #define RENEW(var,num,type) \ ((var)=(type *)((var) ? \ realloc((char *)(var),(unsigned)(num)*sizeof(type)) : \ calloc((unsigned)(num),sizeof(type)))) #define MEMCOPY(from,to,n_items,type) \ MEM_COPY((char *)(from),(char *)(to),(unsigned)(n_items)*sizeof(type)) #else /* allocate one object of given type */ #define NEW(type) ((type *)calloc((size_t)1,(size_t)sizeof(type))) /* allocate num objects of given type */ #define NEW_A(num,type) ((type *)calloc((size_t)(num),(size_t)sizeof(type))) /* re-allocate arry to have num objects of the given type */ #define RENEW(var,num,type) \ ((var)=(type *)((var) ? \ realloc((char *)(var),(size_t)((num)*sizeof(type))) : \ calloc((size_t)(num),(size_t)sizeof(type)))) #define MEMCOPY(from,to,n_items,type) \ MEM_COPY((char *)(from),(char *)(to),(unsigned)(n_items)*sizeof(type)) #endif /* type independent min and max operations */ #ifndef max #define max(a,b) ((a) > (b) ? (a) : (b)) #endif #ifndef min #define min(a,b) ((a) > (b) ? (b) : (a)) #endif #undef TRUE #define TRUE 1 #undef FALSE #define FALSE 0 /* for input routines */ #define MAXLINE 81 /* Dynamic memory allocation */ /* Should use M_FREE/V_FREE/PX_FREE in programs instead of m/v/px_free() as this is considerably safer -- also provides a simple type check ! */ #ifndef ANSI_C extern VEC *v_get(), *v_resize(); extern MAT *m_get(), *m_resize(); extern PERM *px_get(), *px_resize(); extern IVEC *iv_get(), *iv_resize(); extern int m_free(),v_free(); extern int px_free(); extern int iv_free(); extern BAND *bd_get(), *bd_resize(); extern int bd_free(); #else /* get/resize vector to given dimension */ extern VEC *v_get(int), *v_resize(VEC *,int); /* get/resize matrix to be m x n */ extern MAT *m_get(int,int), *m_resize(MAT *,int,int); /* get/resize permutation to have the given size */ extern PERM *px_get(int), *px_resize(PERM *,int); /* get/resize an integer vector to given dimension */ extern IVEC *iv_get(int), *iv_resize(IVEC *,int); /* get/resize a band matrix to given dimension */ extern BAND *bd_get(int,int,int), *bd_resize(BAND *,int,int,int); /* free (de-allocate) (band) matrices, vectors, permutations and integer vectors */ extern int iv_free(IVEC *); extern int m_free(MAT *),v_free(VEC *),px_free(PERM *); extern int bd_free(BAND *); #endif /* MACROS */ /* macros that also check types and sets pointers to NULL */ #define M_FREE(mat) ( m_free(mat), (mat)=(MAT *)NULL ) #define V_FREE(vec) ( v_free(vec), (vec)=(VEC *)NULL ) #define PX_FREE(px) ( px_free(px), (px)=(PERM *)NULL ) #define IV_FREE(iv) ( iv_free(iv), (iv)=(IVEC *)NULL ) #define MAXDIM 2001 /* Entry level access to data structures */ #ifdef DEBUG /* returns x[i] */ #define v_entry(x,i) (((i) < 0 || (i) >= (x)->dim) ? \ error(E_BOUNDS,"v_entry"), 0.0 : (x)->ve[i] ) /* x[i] <- val */ #define v_set_val(x,i,val) ((x)->ve[i] = ((i) < 0 || (i) >= (x)->dim) ? \ error(E_BOUNDS,"v_set_val"), 0.0 : (val)) /* x[i] <- x[i] + val */ #define v_add_val(x,i,val) ((x)->ve[i] += ((i) < 0 || (i) >= (x)->dim) ? \ error(E_BOUNDS,"v_add_val"), 0.0 : (val)) /* x[i] <- x[i] - val */ #define v_sub_val(x,i,val) ((x)->ve[i] -= ((i) < 0 || (i) >= (x)->dim) ? \ error(E_BOUNDS,"v_sub_val"), 0.0 : (val)) /* returns A[i][j] */ #define m_entry(A,i,j) (((i) < 0 || (i) >= (A)->m || \ (j) < 0 || (j) >= (A)->n) ? \ error(E_BOUNDS,"m_entry"), 0.0 : (A)->me[i][j] ) /* A[i][j] <- val */ #define m_set_val(A,i,j,val) ((A)->me[i][j] = ((i) < 0 || (i) >= (A)->m || \ (j) < 0 || (j) >= (A)->n) ? \ error(E_BOUNDS,"m_set_val"), 0.0 : (val) ) /* A[i][j] <- A[i][j] + val */ #define m_add_val(A,i,j,val) ((A)->me[i][j] += ((i) < 0 || (i) >= (A)->m || \ (j) < 0 || (j) >= (A)->n) ? \ error(E_BOUNDS,"m_add_val"), 0.0 : (val) ) /* A[i][j] <- A[i][j] - val */ #define m_sub_val(A,i,j,val) ((A)->me[i][j] -= ((i) < 0 || (i) >= (A)->m || \ (j) < 0 || (j) >= (A)->n) ? \ error(E_BOUNDS,"m_sub_val"), 0.0 : (val) ) #else /* returns x[i] */ #define v_entry(x,i) ((x)->ve[i]) /* x[i] <- val */ #define v_set_val(x,i,val) ((x)->ve[i] = (val)) /* x[i] <- x[i] + val */ #define v_add_val(x,i,val) ((x)->ve[i] += (val)) /* x[i] <- x[i] - val */ #define v_sub_val(x,i,val) ((x)->ve[i] -= (val)) /* returns A[i][j] */ #define m_entry(A,i,j) ((A)->me[i][j]) /* A[i][j] <- val */ #define m_set_val(A,i,j,val) ((A)->me[i][j] = (val) ) /* A[i][j] <- A[i][j] + val */ #define m_add_val(A,i,j,val) ((A)->me[i][j] += (val) ) /* A[i][j] <- A[i][j] - val */ #define m_sub_val(A,i,j,val) ((A)->me[i][j] -= (val) ) #endif /* I/O routines */ #ifndef ANSI_C extern void v_foutput(),m_foutput(),px_foutput(); extern void iv_foutput(); extern VEC *v_finput(); extern MAT *m_finput(); extern PERM *px_finput(); extern IVEC *iv_finput(); extern int fy_or_n(), fin_int(), yn_dflt(), skipjunk(); extern double fin_double(); #else /* print x on file fp */ void v_foutput(FILE *fp,VEC *x), /* print A on file fp */ m_foutput(FILE *fp,MAT *A), /* print px on file fp */ px_foutput(FILE *fp,PERM *px); /* print ix on file fp */ void iv_foutput(FILE *fp,IVEC *ix); /* Note: if out is NULL, then returned object is newly allocated; Also: if out is not NULL, then that size is assumed */ /* read in vector from fp */ VEC *v_finput(FILE *fp,VEC *out); /* read in matrix from fp */ MAT *m_finput(FILE *fp,MAT *out); /* read in permutation from fp */ PERM *px_finput(FILE *fp,PERM *out); /* read in int vector from fp */ IVEC *iv_finput(FILE *fp,IVEC *out); /* fy_or_n -- yes-or-no to question in string s -- question written to stderr, input from fp -- if fp is NOT a tty then return y_n_dflt */ int fy_or_n(FILE *fp,char *s); /* yn_dflt -- sets the value of y_n_dflt to val */ int yn_dflt(int val); /* fin_int -- return integer read from file/stream fp -- prompt s on stderr if fp is a tty -- check that x lies between low and high: re-prompt if fp is a tty, error exit otherwise -- ignore check if low > high */ int fin_int(FILE *fp,char *s,int low,int high); /* fin_double -- return double read from file/stream fp -- prompt s on stderr if fp is a tty -- check that x lies between low and high: re-prompt if fp is a tty, error exit otherwise -- ignore check if low > high */ double fin_double(FILE *fp,char *s,double low,double high); /* it skips white spaces and strings of the form #....\n Here .... is a comment string */ int skipjunk(FILE *fp); #endif /* MACROS */ /* macros to use stdout and stdin instead of explicit fp */ #define v_output(vec) v_foutput(stdout,vec) #define v_input(vec) v_finput(stdin,vec) #define m_output(mat) m_foutput(stdout,mat) #define m_input(mat) m_finput(stdin,mat) #define px_output(px) px_foutput(stdout,px) #define px_input(px) px_finput(stdin,px) #define iv_output(iv) iv_foutput(stdout,iv) #define iv_input(iv) iv_finput(stdin,iv) /* general purpose input routine; skips comments # ... \n */ #define finput(fp,prompt,fmt,var) \ ( ( isatty(fileno(fp)) ? fprintf(stderr,prompt) : skipjunk(fp) ), \ fscanf(fp,fmt,var) ) #define input(prompt,fmt,var) finput(stdin,prompt,fmt,var) #define fprompter(fp,prompt) \ ( isatty(fileno(fp)) ? fprintf(stderr,prompt) : skipjunk(fp) ) #define prompter(prompt) fprompter(stdin,prompt) #define y_or_n(s) fy_or_n(stdin,s) #define in_int(s,lo,hi) fin_int(stdin,s,lo,hi) #define in_double(s,lo,hi) fin_double(stdin,s,lo,hi) /* Copying routines */ #ifndef ANSI_C extern MAT *_m_copy(), *m_move(), *vm_move(); extern VEC *_v_copy(), *v_move(), *mv_move(); extern PERM *px_copy(); extern IVEC *iv_copy(), *iv_move(); extern BAND *bd_copy(); #else /* copy in to out starting at out[i0][j0] */ extern MAT *_m_copy(MAT *in,MAT *out,u_int i0,u_int j0), * m_move(MAT *in, int, int, int, int, MAT *out, int, int), *vm_move(VEC *in, int, MAT *out, int, int, int, int); /* copy in to out starting at out[i0] */ extern VEC *_v_copy(VEC *in,VEC *out,u_int i0), * v_move(VEC *in, int, int, VEC *out, int), *mv_move(MAT *in, int, int, int, int, VEC *out, int); extern PERM *px_copy(PERM *in,PERM *out); extern IVEC *iv_copy(IVEC *in,IVEC *out), *iv_move(IVEC *in, int, int, IVEC *out, int); extern BAND *bd_copy(BAND *in,BAND *out); #endif /* MACROS */ #define m_copy(in,out) _m_copy(in,out,0,0) #define v_copy(in,out) _v_copy(in,out,0) /* Initialisation routines -- to be zero, ones, random or identity */ #ifndef ANSI_C extern VEC *v_zero(), *v_rand(), *v_ones(); extern MAT *m_zero(), *m_ident(), *m_rand(), *m_ones(); extern PERM *px_ident(); extern IVEC *iv_zero(); #else extern VEC *v_zero(VEC *), *v_rand(VEC *), *v_ones(VEC *); extern MAT *m_zero(MAT *), *m_ident(MAT *), *m_rand(MAT *), *m_ones(MAT *); extern PERM *px_ident(PERM *); extern IVEC *iv_zero(IVEC *); #endif /* Basic vector operations */ #ifndef ANSI_C extern VEC *sv_mlt(), *mv_mlt(), *vm_mlt(), *v_add(), *v_sub(), *px_vec(), *pxinv_vec(), *v_mltadd(), *v_map(), *_v_map(), *v_lincomb(), *v_linlist(); extern double v_min(), v_max(), v_sum(); extern VEC *v_star(), *v_slash(), *v_sort(); extern double _in_prod(), __ip__(); extern void __mltadd__(), __add__(), __sub__(), __smlt__(), __zero__(); #else extern VEC *sv_mlt(double,VEC *,VEC *), /* out <- s.x */ *mv_mlt(MAT *,VEC *,VEC *), /* out <- A.x */ *vm_mlt(MAT *,VEC *,VEC *), /* out^T <- x^T.A */ *v_add(VEC *,VEC *,VEC *), /* out <- x + y */ *v_sub(VEC *,VEC *,VEC *), /* out <- x - y */ *px_vec(PERM *,VEC *,VEC *), /* out <- P.x */ *pxinv_vec(PERM *,VEC *,VEC *), /* out <- P^{-1}.x */ *v_mltadd(VEC *,VEC *,double,VEC *), /* out <- x + s.y */ #ifdef PROTOTYPES_IN_STRUCT *v_map(double (*f)(double),VEC *,VEC *), /* out[i] <- f(x[i]) */ *_v_map(double (*f)(void *,double),void *,VEC *,VEC *), #else *v_map(double (*f)(),VEC *,VEC *), /* out[i] <- f(x[i]) */ *_v_map(double (*f)(),void *,VEC *,VEC *), #endif *v_lincomb(int,VEC **,Real *,VEC *), /* out <- sum_i s[i].x[i] */ *v_linlist(VEC *out,VEC *v1,double a1,...); /* out <- s1.x1 + s2.x2 + ... */ /* returns min_j x[j] (== x[i]) */ extern double v_min(VEC *, int *), /* returns max_j x[j] (== x[i]) */ v_max(VEC *, int *), /* returns sum_i x[i] */ v_sum(VEC *); /* Hadamard product: out[i] <- x[i].y[i] */ extern VEC *v_star(VEC *, VEC *, VEC *), /* out[i] <- x[i] / y[i] */ *v_slash(VEC *, VEC *, VEC *), /* sorts x, and sets order so that sorted x[i] = x[order[i]] */ *v_sort(VEC *, PERM *); /* returns inner product starting at component i0 */ extern double _in_prod(VEC *x,VEC *y,u_int i0), /* returns sum_{i=0}^{len-1} x[i].y[i] */ __ip__(Real *,Real *,int); /* see v_mltadd(), v_add(), v_sub() and v_zero() */ extern void __mltadd__(Real *,Real *,double,int), __add__(Real *,Real *,Real *,int), __sub__(Real *,Real *,Real *,int), __smlt__(Real *,double,Real *,int), __zero__(Real *,int); #endif /* MACRO */ /* usual way of computing the inner product */ #define in_prod(a,b) _in_prod(a,b,0) /* Norms */ /* scaled vector norms -- scale == NULL implies unscaled */ #ifndef ANSI_C extern double _v_norm1(), _v_norm2(), _v_norm_inf(), m_norm1(), m_norm_inf(), m_norm_frob(); #else /* returns sum_i |x[i]/scale[i]| */ extern double _v_norm1(VEC *x,VEC *scale), /* returns (scaled) Euclidean norm */ _v_norm2(VEC *x,VEC *scale), /* returns max_i |x[i]/scale[i]| */ _v_norm_inf(VEC *x,VEC *scale); /* unscaled matrix norms */ extern double m_norm1(MAT *A), m_norm_inf(MAT *A), m_norm_frob(MAT *A); #endif /* MACROS */ /* unscaled vector norms */ #define v_norm1(x) _v_norm1(x,VNULL) #define v_norm2(x) _v_norm2(x,VNULL) #define v_norm_inf(x) _v_norm_inf(x,VNULL) /* Basic matrix operations */ #ifndef ANSI_C extern MAT *sm_mlt(), *m_mlt(), *mmtr_mlt(), *mtrm_mlt(), *m_add(), *m_sub(), *sub_mat(), *m_transp(), *ms_mltadd(); extern BAND *bd_transp(); extern MAT *px_rows(), *px_cols(), *swap_rows(), *swap_cols(), *_set_row(), *_set_col(); extern VEC *get_row(), *get_col(), *sub_vec(), *mv_mltadd(), *vm_mltadd(); #else extern MAT *sm_mlt(double s,MAT *A,MAT *out), /* out <- s.A */ *m_mlt(MAT *A,MAT *B,MAT *out), /* out <- A.B */ *mmtr_mlt(MAT *A,MAT *B,MAT *out), /* out <- A.B^T */ *mtrm_mlt(MAT *A,MAT *B,MAT *out), /* out <- A^T.B */ *m_add(MAT *A,MAT *B,MAT *out), /* out <- A + B */ *m_sub(MAT *A,MAT *B,MAT *out), /* out <- A - B */ *sub_mat(MAT *A,u_int,u_int,u_int,u_int,MAT *out), *m_transp(MAT *A,MAT *out), /* out <- A^T */ /* out <- A + s.B */ *ms_mltadd(MAT *A,MAT *B,double s,MAT *out); extern BAND *bd_transp(BAND *in, BAND *out); /* out <- A^T */ extern MAT *px_rows(PERM *px,MAT *A,MAT *out), /* out <- P.A */ *px_cols(PERM *px,MAT *A,MAT *out), /* out <- A.P^T */ *swap_rows(MAT *,int,int,int,int), *swap_cols(MAT *,int,int,int,int), /* A[i][j] <- out[j], j >= j0 */ *_set_col(MAT *A,u_int i,VEC *out,u_int j0), /* A[i][j] <- out[i], i >= i0 */ *_set_row(MAT *A,u_int j,VEC *out,u_int i0); extern VEC *get_row(MAT *,u_int,VEC *), *get_col(MAT *,u_int,VEC *), *sub_vec(VEC *,int,int,VEC *), /* out <- x + s.A.y */ *mv_mltadd(VEC *x,VEC *y,MAT *A,double s,VEC *out), /* out^T <- x^T + s.y^T.A */ *vm_mltadd(VEC *x,VEC *y,MAT *A,double s,VEC *out); #endif /* MACROS */ /* row i of A <- vec */ #define set_row(mat,row,vec) _set_row(mat,row,vec,0) /* col j of A <- vec */ #define set_col(mat,col,vec) _set_col(mat,col,vec,0) /* Basic permutation operations */ #ifndef ANSI_C extern PERM *px_mlt(), *px_inv(), *px_transp(); extern int px_sign(); #else extern PERM *px_mlt(PERM *px1,PERM *px2,PERM *out), /* out <- px1.px2 */ *px_inv(PERM *px,PERM *out), /* out <- px^{-1} */ /* swap px[i] and px[j] */ *px_transp(PERM *px,u_int i,u_int j); /* returns sign(px) = +1 if px product of even # transpositions -1 if ps product of odd # transpositions */ extern int px_sign(PERM *); #endif /* Basic integer vector operations */ #ifndef ANSI_C extern IVEC *iv_add(), *iv_sub(), *iv_sort(); #else extern IVEC *iv_add(IVEC *ix,IVEC *iy,IVEC *out), /* out <- ix + iy */ *iv_sub(IVEC *ix,IVEC *iy,IVEC *out), /* out <- ix - iy */ /* sorts ix & sets order so that sorted ix[i] = old ix[order[i]] */ *iv_sort(IVEC *ix, PERM *order); #endif /* miscellaneous functions */ #ifndef ANSI_C extern double square(), cube(), mrand(); extern void smrand(), mrandlist(); extern void m_dump(), px_dump(), v_dump(), iv_dump(); extern MAT *band2mat(); extern BAND *mat2band(); #else double square(double x), /* returns x^2 */ cube(double x), /* returns x^3 */ mrand(void); /* returns random # in [0,1) */ void smrand(int seed), /* seeds mrand() */ mrandlist(Real *x, int len); /* generates len random numbers */ void m_dump(FILE *fp,MAT *a), px_dump(FILE *,PERM *px), v_dump(FILE *fp,VEC *x), iv_dump(FILE *fp, IVEC *ix); MAT *band2mat(BAND *bA, MAT *A); BAND *mat2band(MAT *A, int lb,int ub, BAND *bA); #endif /* miscellaneous constants */ #define VNULL ((VEC *)NULL) #define MNULL ((MAT *)NULL) #define PNULL ((PERM *)NULL) #define IVNULL ((IVEC *)NULL) #define BDNULL ((BAND *)NULL) /* varying number of arguments */ #ifdef ANSI_C #include /* prototypes */ int v_get_vars(int dim,...); int iv_get_vars(int dim,...); int m_get_vars(int m,int n,...); int px_get_vars(int dim,...); int v_resize_vars(int new_dim,...); int iv_resize_vars(int new_dim,...); int m_resize_vars(int m,int n,...); int px_resize_vars(int new_dim,...); int v_free_vars(VEC **,...); int iv_free_vars(IVEC **,...); int px_free_vars(PERM **,...); int m_free_vars(MAT **,...); #elif VARARGS /* old varargs is used */ #include /* prototypes */ int v_get_vars(); int iv_get_vars(); int m_get_vars(); int px_get_vars(); int v_resize_vars(); int iv_resize_vars(); int m_resize_vars(); int px_resize_vars(); int v_free_vars(); int iv_free_vars(); int px_free_vars(); int m_free_vars(); #endif #endif neuron-7.5/src/mesch/matrix2.h000077500000000000000000000201431323325274500163310ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Header file for ``matrix2.a'' library file */ #ifndef MATRIX2H #define MATRIX2H #include "matrix.h" /* Unless otherwise specified, factorisation routines overwrite the matrix that is being factorised */ #ifndef ANSI_C extern MAT *BKPfactor(), *CHfactor(), *LUfactor(), *QRfactor(), *QRCPfactor(), *LDLfactor(), *Hfactor(), *MCHfactor(), *m_inverse(); extern double LUcondest(), QRcondest(); extern MAT *makeQ(), *makeR(), *makeHQ(), *makeH(); extern MAT *LDLupdate(), *QRupdate(); extern VEC *BKPsolve(), *CHsolve(), *LUsolve(), *_Qsolve(), *QRsolve(), *LDLsolve(), *Usolve(), *Lsolve(), *Dsolve(), *LTsolve(), *UTsolve(), *LUTsolve(), *QRCPsolve(); extern BAND *bdLUfactor(), *bdLDLfactor(); extern VEC *bdLUsolve(), *bdLDLsolve(); extern VEC *hhvec(); extern VEC *hhtrvec(); extern MAT *hhtrrows(); extern MAT *hhtrcols(); extern void givens(); extern VEC *rot_vec(); /* in situ */ extern MAT *rot_rows(); /* in situ */ extern MAT *rot_cols(); /* in situ */ /* eigenvalue routines */ extern VEC *trieig(), *symmeig(); extern MAT *schur(); extern void schur_evals(); extern MAT *schur_vecs(); /* singular value decomposition */ extern VEC *bisvd(), *svd(); /* matrix powers and exponent */ MAT *_m_pow(); MAT *m_pow(); MAT *m_exp(), *_m_exp(); MAT *m_poly(); /* FFT */ void fft(); void ifft(); #else /* forms Bunch-Kaufman-Parlett factorisation for symmetric indefinite matrices */ extern MAT *BKPfactor(MAT *A,PERM *pivot,PERM *blocks), /* Cholesky factorisation of A (symmetric, positive definite) */ *CHfactor(MAT *A), /* LU factorisation of A (with partial pivoting) */ *LUfactor(MAT *A,PERM *pivot), /* QR factorisation of A; need dim(diag) >= # rows of A */ *QRfactor(MAT *A,VEC *diag), /* QR factorisation of A with column pivoting */ *QRCPfactor(MAT *A,VEC *diag,PERM *pivot), /* L.D.L^T factorisation of A */ *LDLfactor(MAT *A), /* Hessenberg factorisation of A -- for schur() */ *Hfactor(MAT *A,VEC *diag1,VEC *diag2), /* modified Cholesky factorisation of A; actually factors A+D, D diagonal with no diagonal entry in the factor < sqrt(tol) */ *MCHfactor(MAT *A,double tol), *m_inverse(MAT *A,MAT *out); /* returns condition estimate for A after LUfactor() */ extern double LUcondest(MAT *A,PERM *pivot), /* returns condition estimate for Q after QRfactor() */ QRcondest(MAT *A); /* Note: The make..() and ..update() routines assume that the factorisation has already been carried out */ /* Qout is the "Q" (orthongonal) matrix from QR factorisation */ extern MAT *makeQ(MAT *A,VEC *diag,MAT *Qout), /* Rout is the "R" (upper triangular) matrix from QR factorisation */ *makeR(MAT *A,MAT *Rout), /* Qout is orthogonal matrix in Hessenberg factorisation */ *makeHQ(MAT *A,VEC *diag1,VEC *diag2,MAT *Qout), /* Hout is the Hessenberg matrix in Hessenberg factorisation */ *makeH(MAT *A,MAT *Hout); /* updates L.D.L^T factorisation for A <- A + alpha.u.u^T */ extern MAT *LDLupdate(MAT *A,VEC *u,double alpha), /* updates QR factorisation for QR <- Q.(R+u.v^T) Note: we need explicit Q & R matrices, from makeQ() and makeR() */ *QRupdate(MAT *Q,MAT *R,VEC *u,VEC *v); /* Solve routines assume that the corresponding factorisation routine has already been applied to the matrix along with auxiliary objects (such as pivot permutations) These solve the system A.x = b, except for LUTsolve and QRTsolve which solve the transposed system A^T.x. = b. If x is NULL on entry, then it is created. */ extern VEC *BKPsolve(MAT *A,PERM *pivot,PERM *blocks,VEC *b,VEC *x), *CHsolve(MAT *A,VEC *b,VEC *x), *LDLsolve(MAT *A,VEC *b,VEC *x), *LUsolve(MAT *A,PERM *pivot,VEC *b,VEC *x), *_Qsolve(MAT *A,VEC *,VEC *,VEC *, VEC *), *QRsolve(MAT *A,VEC *,VEC *b,VEC *x), *QRTsolve(MAT *A,VEC *,VEC *b,VEC *x), /* Triangular equations solve routines; U for upper triangular, L for lower traingular, D for diagonal if diag_val == 0.0 use that values in the matrix */ *Usolve(MAT *A,VEC *b,VEC *x,double diag_val), *Lsolve(MAT *A,VEC *b,VEC *x,double diag_val), *Dsolve(MAT *A,VEC *b,VEC *x), *LTsolve(MAT *A,VEC *b,VEC *x,double diag_val), *UTsolve(MAT *A,VEC *b,VEC *x,double diag_val), *LUTsolve(MAT *A,PERM *,VEC *,VEC *), *QRCPsolve(MAT *QR,VEC *diag,PERM *pivot,VEC *b,VEC *x); extern BAND *bdLUfactor(BAND *A,PERM *pivot), *bdLDLfactor(BAND *A); extern VEC *bdLUsolve(BAND *A,PERM *pivot,VEC *b,VEC *x), *bdLDLsolve(BAND *A,VEC *b,VEC *x); extern VEC *hhvec(VEC *,u_int,Real *,VEC *,Real *); extern VEC *hhtrvec(VEC *,double,u_int,VEC *,VEC *); extern MAT *hhtrrows(MAT *,u_int,u_int,VEC *,double); extern MAT *hhtrcols(MAT *,u_int,u_int,VEC *,double); extern void givens(double,double,Real *,Real *); extern VEC *rot_vec(VEC *,u_int,u_int,double,double,VEC *); /* in situ */ extern MAT *rot_rows(MAT *,u_int,u_int,double,double,MAT *); /* in situ */ extern MAT *rot_cols(MAT *,u_int,u_int,double,double,MAT *); /* in situ */ /* eigenvalue routines */ /* compute eigenvalues of tridiagonal matrix with diagonal entries a[i], super & sub diagonal entries b[i]; eigenvectors stored in Q (if not NULL) */ extern VEC *trieig(VEC *a,VEC *b,MAT *Q), /* sets out to be vector of eigenvectors; eigenvectors stored in Q (if not NULL). A is unchanged */ *symmeig(MAT *A,MAT *Q,VEC *out); /* computes real Schur form = Q^T.A.Q */ extern MAT *schur(MAT *A,MAT *Q); /* computes real and imaginary parts of the eigenvalues of A after schur() */ extern void schur_evals(MAT *A,VEC *re_part,VEC *im_part); /* computes real and imaginary parts of the eigenvectors of A after schur() */ extern MAT *schur_vecs(MAT *T,MAT *Q,MAT *X_re,MAT *X_im); /* singular value decomposition */ /* computes singular values of bi-diagonal matrix with diagonal entries a[i] and superdiagonal entries b[i]; singular vectors stored in U and V (if not NULL) */ VEC *bisvd(VEC *a,VEC *b,MAT *U,MAT *V), /* sets out to be vector of singular values; singular vectors stored in U and V */ *svd(MAT *A,MAT *U,MAT *V,VEC *out); /* matrix powers and exponent */ MAT *_m_pow(MAT *,int,MAT *,MAT *); MAT *m_pow(MAT *,int, MAT *); MAT *m_exp(MAT *,double,MAT *); MAT *_m_exp(MAT *,double,MAT *,int *,int *); MAT *m_poly(MAT *,VEC *,MAT *); /* FFT */ void fft(VEC *,VEC *); void ifft(VEC *,VEC *); #endif #endif neuron-7.5/src/mesch/matrixio.c000077500000000000000000000321551323325274500166000ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* 1.6 matrixio.c 11/25/87 */ #include #include #include "matrix.h" static char rcsid[] = "matrixio.c,v 1.1 1997/12/04 17:55:35 hines Exp"; /* local variables */ static char line[MAXLINE]; /************************************************************************** Input routines **************************************************************************/ /* skipjunk -- skips white spaces and strings of the form #....\n Here .... is a comment string */ int skipjunk(fp) FILE *fp; { int c; for ( ; ; ) /* forever do... */ { /* skip blanks */ do c = getc(fp); while ( isspace(c) ); /* skip comments (if any) */ if ( c == '#' ) /* yes it is a comment (line) */ while ( (c=getc(fp)) != '\n' ) ; else { ungetc(c,fp); break; } } return 0; } MAT *m_finput(fp,a) FILE *fp; MAT *a; { MAT *im_finput(),*bm_finput(); if ( isatty(fileno(fp)) ) return im_finput(fp,a); else return bm_finput(fp,a); } /* im_finput -- interactive input of matrix */ MAT *im_finput(fp,mat) FILE *fp; MAT *mat; { char c; u_int i, j, m, n, dynamic; /* dynamic set to TRUE if memory allocated here */ /* get matrix size */ if ( mat != (MAT *)NULL && mat->mnm; n = mat->n; dynamic = FALSE; } else { dynamic = TRUE; do { fprintf(stderr,"Matrix: rows cols:"); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"im_finput"); } while ( sscanf(line,"%u%u",&m,&n)<2 || m>MAXDIM || n>MAXDIM ); mat = m_get(m,n); } /* input elements */ for ( i=0; ime[i][j]); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"im_finput"); if ( (*line == 'b' || *line == 'B') && j > 0 ) { j--; dynamic = FALSE; goto redo2; } if ( (*line == 'f' || *line == 'F') && j < n-1 ) { j++; dynamic = FALSE; goto redo2; } #if REAL == DOUBLE } while ( *line=='\0' || sscanf(line,"%lf",&mat->me[i][j])<1 ); #elif REAL == FLOAT } while ( *line=='\0' || sscanf(line,"%f",&mat->me[i][j])<1 ); #endif fprintf(stderr,"Continue: "); if(fscanf(fp,"%c",&c) != 1) { error(E_INPUT, "im_finput"); } if ( c == 'n' || c == 'N' ) { dynamic = FALSE; goto redo; } if ( (c == 'b' || c == 'B') /* && i > 0 */ ) { if ( i > 0 ) i--; dynamic = FALSE; goto redo; } } return (mat); } /* bm_finput -- batch-file input of matrix */ MAT *bm_finput(fp,mat) FILE *fp; MAT *mat; { u_int i,j,m,n,dummy; int io_code; /* get dimension */ skipjunk(fp); if ((io_code=fscanf(fp," Matrix: %u by %u",&m,&n)) < 2 || m>MAXDIM || n>MAXDIM ) error(io_code==EOF ? E_EOF : E_FORMAT,"bm_finput"); /* allocate memory if necessary */ if ( mat==(MAT *)NULL ) mat = m_resize(mat,m,n); /* get entries */ for ( i=0; ime[i][j])) < 1 ) #elif REAL == FLOAT if ((io_code=fscanf(fp,"%f",&mat->me[i][j])) < 1 ) #endif error(io_code==EOF ? 7 : 6,"bm_finput"); } return (mat); } PERM *px_finput(fp,px) FILE *fp; PERM *px; { PERM *ipx_finput(),*bpx_finput(); if ( isatty(fileno(fp)) ) return ipx_finput(fp,px); else return bpx_finput(fp,px); } /* ipx_finput -- interactive input of permutation */ PERM *ipx_finput(fp,px) FILE *fp; PERM *px; { u_int i,j,size,dynamic; /* dynamic set if memory allocated here */ u_int entry,ok; /* get permutation size */ if ( px!=(PERM *)NULL && px->sizesize; dynamic = FALSE; } else { dynamic = TRUE; do { fprintf(stderr,"Permutation: size: "); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"ipx_finput"); } while ( sscanf(line,"%u",&size)<1 || size>MAXDIM ); px = px_get(size); } /* get entries */ i = 0; while ( i%u new: ", i,px->pe[i]); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"ipx_finput"); if ( (*line == 'b' || *line == 'B') && i > 0 ) { i--; dynamic = FALSE; goto redo; } } while ( *line=='\0' || sscanf(line,"%u",&entry) < 1 ); /* check entry */ ok = (entry < size); for ( j=0; jpe[j]); if ( ok ) { px->pe[i] = entry; i++; } } return (px); } /* bpx_finput -- batch-file input of permutation */ PERM *bpx_finput(fp,px) FILE *fp; PERM *px; { u_int i,j,size,entry,ok; int io_code; /* get size of permutation */ skipjunk(fp); if ((io_code=fscanf(fp," Permutation: size:%u",&size)) < 1 || size>MAXDIM ) error(io_code==EOF ? 7 : 6,"bpx_finput"); /* allocate memory if necessary */ if ( px==(PERM *)NULL || px->size %u",&entry)) < 1 ) error(io_code==EOF ? 7 : 6,"bpx_finput"); /* check entry */ ok = (entry < size); for ( j=0; jpe[j]); if ( ok ) { px->pe[i] = entry; i++; } else error(E_BOUNDS,"bpx_finput"); } return (px); } VEC *v_finput(fp,x) FILE *fp; VEC *x; { VEC *ifin_vec(),*bfin_vec(); if ( isatty(fileno(fp)) ) return ifin_vec(fp,x); else return bfin_vec(fp,x); } /* ifin_vec -- interactive input of vector */ VEC *ifin_vec(fp,vec) FILE *fp; VEC *vec; { u_int i,dim,dynamic; /* dynamic set if memory allocated here */ /* get vector dimension */ if ( vec != (VEC *)NULL && vec->dimdim; dynamic = FALSE; } else { dynamic = TRUE; do { fprintf(stderr,"Vector: dim: "); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"ifin_vec"); } while ( sscanf(line,"%u",&dim)<1 || dim>MAXDIM ); vec = v_get(dim); } /* input elements */ for ( i=0; ive[i]); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"ifin_vec"); if ( (*line == 'b' || *line == 'B') && i > 0 ) { i--; dynamic = FALSE; goto redo; } if ( (*line == 'f' || *line == 'F') && i < dim-1 ) { i++; dynamic = FALSE; goto redo; } #if REAL == DOUBLE } while ( *line=='\0' || sscanf(line,"%lf",&vec->ve[i]) < 1 ); #elif REAL == FLOAT } while ( *line=='\0' || sscanf(line,"%f",&vec->ve[i]) < 1 ); #endif return (vec); } /* bfin_vec -- batch-file input of vector */ VEC *bfin_vec(fp,vec) FILE *fp; VEC *vec; { u_int i,dim; int io_code; /* get dimension */ skipjunk(fp); if ((io_code=fscanf(fp," Vector: dim:%u",&dim)) < 1 || dim>MAXDIM ) error(io_code==EOF ? 7 : 6,"bfin_vec"); /* allocate memory if necessary */ if ( vec==(VEC *)NULL ) vec = v_resize(vec,dim); /* get entries */ skipjunk(fp); for ( i=0; ive[i])) < 1 ) #elif REAL == FLOAT if ((io_code=fscanf(fp,"%f",&vec->ve[i])) < 1 ) #endif error(io_code==EOF ? 7 : 6,"bfin_vec"); return (vec); } /************************************************************************** Output routines **************************************************************************/ static char *format = "%14.9g "; char *setformat(f_string) char *f_string; { char *old_f_string; old_f_string = format; if ( f_string != (char *)NULL && *f_string != '\0' ) format = f_string; return old_f_string; } void m_foutput(fp,a) FILE *fp; MAT *a; { u_int i, j, tmp; if ( a == (MAT *)NULL ) { fprintf(fp,"Matrix: NULL\n"); return; } fprintf(fp,"Matrix: %d by %d\n",a->m,a->n); if ( a->me == (Real **)NULL ) { fprintf(fp,"NULL\n"); return; } for ( i=0; im; i++ ) /* for each row... */ { fprintf(fp,"row %u: ",i); for ( j=0, tmp=2; jn; j++, tmp++ ) { /* for each col in row... */ fprintf(fp,format,a->me[i][j]); if ( ! (tmp % 5) ) putc('\n',fp); } if ( tmp % 5 != 1 ) putc('\n',fp); } } void px_foutput(fp,px) FILE *fp; PERM *px; { u_int i; if ( px == (PERM *)NULL ) { fprintf(fp,"Permutation: NULL\n"); return; } fprintf(fp,"Permutation: size: %u\n",px->size); if ( px->pe == (u_int *)NULL ) { fprintf(fp,"NULL\n"); return; } for ( i=0; isize; i++ ) if ( ! (i % 8) && i != 0 ) fprintf(fp,"\n %u->%u ",i,px->pe[i]); else fprintf(fp,"%u->%u ",i,px->pe[i]); fprintf(fp,"\n"); } void v_foutput(fp,x) FILE *fp; VEC *x; { u_int i, tmp; if ( x == (VEC *)NULL ) { fprintf(fp,"Vector: NULL\n"); return; } fprintf(fp,"Vector: dim: %d\n",x->dim); if ( x->ve == (Real *)NULL ) { fprintf(fp,"NULL\n"); return; } for ( i=0, tmp=0; idim; i++, tmp++ ) { fprintf(fp,format,x->ve[i]); if ( tmp % 5 == 4 ) putc('\n',fp); } if ( tmp % 5 != 0 ) putc('\n',fp); } void m_dump(fp,a) FILE *fp; MAT *a; { u_int i, j, tmp; if ( a == (MAT *)NULL ) { fprintf(fp,"Matrix: NULL\n"); return; } fprintf(fp,"Matrix: %d by %d @ 0x%p\n",a->m,a->n,a); fprintf(fp,"\tmax_m = %d, max_n = %d, max_size = %d\n", a->max_m, a->max_n, a->max_size); if ( a->me == (Real **)NULL ) { fprintf(fp,"NULL\n"); return; } fprintf(fp,"a->me @ 0x%p\n",(a->me)); fprintf(fp,"a->base @ 0x%p\n",(a->base)); for ( i=0; im; i++ ) /* for each row... */ { fprintf(fp,"row %u: @ 0x%p ",i,(a->me[i])); for ( j=0, tmp=2; jn; j++, tmp++ ) { /* for each col in row... */ fprintf(fp,format,a->me[i][j]); if ( ! (tmp % 5) ) putc('\n',fp); } if ( tmp % 5 != 1 ) putc('\n',fp); } } void px_dump(fp,px) FILE *fp; PERM *px; { u_int i; if ( ! px ) { fprintf(fp,"Permutation: NULL\n"); return; } fprintf(fp,"Permutation: size: %u @ 0x%p\n",px->size,(px)); if ( ! px->pe ) { fprintf(fp,"NULL\n"); return; } fprintf(fp,"px->pe @ 0x%p\n",(px->pe)); for ( i=0; isize; i++ ) fprintf(fp,"%u->%u ",i,px->pe[i]); fprintf(fp,"\n"); } void v_dump(fp,x) FILE *fp; VEC *x; { u_int i, tmp; if ( ! x ) { fprintf(fp,"Vector: NULL\n"); return; } fprintf(fp,"Vector: dim: %d @ 0x%p\n",x->dim,(x)); if ( ! x->ve ) { fprintf(fp,"NULL\n"); return; } fprintf(fp,"x->ve @ 0x%p\n",(x->ve)); for ( i=0, tmp=0; idim; i++, tmp++ ) { fprintf(fp,format,x->ve[i]); if ( tmp % 5 == 4 ) putc('\n',fp); } if ( tmp % 5 != 0 ) putc('\n',fp); } neuron-7.5/src/mesch/meminfo.c000077500000000000000000000217311323325274500163740ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* meminfo.c revised 22/11/93 */ /* contains basic functions, types and arrays to keep track of memory allocation/deallocation */ #include #include "matrix.h" #include "meminfo.h" #ifdef COMPLEX #include "zmatrix.h" #endif #ifdef SPARSE #include "sparse.h" #include "iter.h" #endif static char rcsid[] = "meminfo.c,v 1.1 1997/12/04 17:55:37 hines Exp"; /* this array is defined further in this file */ extern MEM_CONNECT mem_connect[MEM_CONNECT_MAX_LISTS]; /* names of types */ static char *mem_type_names[] = { "MAT", "BAND", "PERM", "VEC", "IVEC" #ifdef SPARSE ,"ITER", "SPROW", "SPMAT" #endif #ifdef COMPLEX ,"ZVEC", "ZMAT" #endif }; #define MEM_NUM_STD_TYPES (sizeof(mem_type_names)/sizeof(mem_type_names[0])) /* local array for keeping track of memory */ static MEM_ARRAY mem_info_sum[MEM_NUM_STD_TYPES]; /* for freeing various types */ static int (*mem_free_funcs[MEM_NUM_STD_TYPES])() = { m_free, bd_free, px_free, v_free, iv_free #ifdef SPARSE ,iter_free, sprow_free, sp_free #endif #ifdef COMPLEX ,zv_free, zm_free #endif }; /* it is a global variable for passing pointers to local arrays defined here */ MEM_CONNECT mem_connect[MEM_CONNECT_MAX_LISTS] = { { mem_type_names, mem_free_funcs, MEM_NUM_STD_TYPES, mem_info_sum } }; /* attach a new list of types */ int mem_attach_list(list, ntypes, type_names, free_funcs, info_sum) int list,ntypes; /* number of a list and number of types there */ char *type_names[]; /* list of names of types */ int (*free_funcs[])(); /* list of releasing functions */ MEM_ARRAY info_sum[]; /* local table */ { if (list < 0 || list >= MEM_CONNECT_MAX_LISTS) return -1; if (type_names == NULL || free_funcs == NULL || info_sum == NULL || ntypes < 0) return -1; /* if a list exists do not overwrite */ if ( mem_connect[list].ntypes != 0 ) error(E_OVERWRITE,"mem_attach_list"); mem_connect[list].ntypes = ntypes; mem_connect[list].type_names = type_names; mem_connect[list].free_funcs = free_funcs; mem_connect[list].info_sum = info_sum; return 0; } /* release a list of types */ int mem_free_vars(list) int list; { if (list < 0 || list >= MEM_CONNECT_MAX_LISTS) return -1; mem_connect[list].ntypes = 0; mem_connect[list].type_names = NULL; mem_connect[list].free_funcs = NULL; mem_connect[list].info_sum = NULL; return 0; } /* check if list is attached */ int mem_is_list_attached(list) int list; { if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return FALSE; if ( mem_connect[list].type_names != NULL && mem_connect[list].free_funcs != NULL && mem_connect[list].info_sum != NULL) return TRUE; else return FALSE; } /* to print out the contents of mem_connect[list] */ void mem_dump_list(fp,list) FILE *fp; int list; { int i; MEM_CONNECT *mlist; if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return; mlist = &mem_connect[list]; fprintf(fp," %15s[%d]:\n","CONTENTS OF mem_connect",list); fprintf(fp," %-7s %-12s %-9s %s\n", "name of", "alloc.", "# alloc.", "address" ); fprintf(fp," %-7s %-12s %-9s %s\n", " type", "bytes", "variables", "of *_free()" ); for (i=0; i < mlist->ntypes; i++) fprintf(fp," %-7s %-12ld %-9d %p\n", mlist->type_names[i], mlist->info_sum[i].bytes, mlist->info_sum[i].numvar, mlist->free_funcs[i] ); fprintf(fp,"\n"); } /*=============================================================*/ /* local variables */ static int mem_switched_on = MEM_SWITCH_ON_DEF; /* on/off */ /* switch on/off memory info */ int mem_info_on(sw) int sw; { int old = mem_switched_on; mem_switched_on = sw; return old; } #ifdef ANSI_C int mem_info_is_on(void) #else int mem_info_is_on() #endif { return mem_switched_on; } /* information about allocated memory */ /* return the number of allocated bytes for type 'type' */ long mem_info_bytes(type,list) int type,list; { if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return 0l; if ( !mem_switched_on || type < 0 || type >= mem_connect[list].ntypes || mem_connect[list].free_funcs[type] == NULL ) return 0l; return mem_connect[list].info_sum[type].bytes; } /* return the number of allocated variables for type 'type' */ int mem_info_numvar(type,list) int type,list; { if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return 0l; if ( !mem_switched_on || type < 0 || type >= mem_connect[list].ntypes || mem_connect[list].free_funcs[type] == NULL ) return 0l; return mem_connect[list].info_sum[type].numvar; } /* print out memory info to the file fp */ void mem_info_file(fp,list) FILE *fp; int list; { unsigned int type; long t = 0l, d; int n = 0, nt = 0; MEM_CONNECT *mlist; if (!mem_switched_on) return; if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return; if (list == 0) fprintf(fp," MEMORY INFORMATION (standard types):\n"); else fprintf(fp," MEMORY INFORMATION (list no. %d):\n",list); mlist = &mem_connect[list]; for (type=0; type < mlist->ntypes; type++) { if (mlist->type_names[type] == NULL ) continue; d = mlist->info_sum[type].bytes; t += d; n = mlist->info_sum[type].numvar; nt += n; fprintf(fp," type %-7s %10ld alloc. byte%c %6d alloc. variable%c\n", mlist->type_names[type], d, (d!=1 ? 's' : ' '), n, (n!=1 ? 's' : ' ')); } fprintf(fp," %-12s %10ld alloc. byte%c %6d alloc. variable%c\n\n", "total:",t, (t!=1 ? 's' : ' '), nt, (nt!=1 ? 's' : ' ')); } /* function for memory information */ /* mem_bytes_list Arguments: type - the number of type; old_size - old size of allocated memory (in bytes); new_size - new size of allocated memory (in bytes); list - list of types */ void mem_bytes_list(type,old_size,new_size,list) int type,list; int old_size,new_size; { MEM_CONNECT *mlist; if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return; mlist = &mem_connect[list]; if ( type < 0 || type >= mlist->ntypes || mlist->free_funcs[type] == NULL ) return; if ( old_size < 0 || new_size < 0 ) error(E_NEG,"mem_bytes_list"); mlist->info_sum[type].bytes += new_size - old_size; /* check if the number of bytes is non-negative */ if ( old_size > 0 ) { if (mlist->info_sum[type].bytes < 0) { fprintf(stderr, "\n WARNING !! memory info: allocated memory is less than 0\n"); fprintf(stderr,"\t TYPE %s \n\n", mlist->type_names[type]); if ( !isatty(fileno(stdout)) ) { fprintf(stdout, "\n WARNING !! memory info: allocated memory is less than 0\n"); fprintf(stdout,"\t TYPE %s \n\n", mlist->type_names[type]); } } } } /* mem_numvar_list Arguments: type - the number of type; num - # of variables allocated (> 0) or deallocated ( < 0) list - list of types */ void mem_numvar_list(type,num,list) int type,list,num; { MEM_CONNECT *mlist; if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return; mlist = &mem_connect[list]; if ( type < 0 || type >= mlist->ntypes || mlist->free_funcs[type] == NULL ) return; mlist->info_sum[type].numvar += num; /* check if the number of variables is non-negative */ if ( num < 0 ) { if (mlist->info_sum[type].numvar < 0) { fprintf(stderr, "\n WARNING !! memory info: allocated # of variables is less than 0\n"); fprintf(stderr,"\t TYPE %s \n\n", mlist->type_names[type]); if ( !isatty(fileno(stdout)) ) { fprintf(stdout, "\n WARNING !! memory info: allocated # of variables is less than 0\n"); fprintf(stdout,"\t TYPE %s \n\n", mlist->type_names[type]); } } } } neuron-7.5/src/mesch/meminfo.h000077500000000000000000000100641323325274500163760ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* meminfo.h 26/08/93 */ /* changed 11/12/93 */ #ifndef MEM_INFOH #define MEM_INFOH /* for hash table in mem_stat.c */ /* Note: the hash size should be a prime, or at very least odd */ #define MEM_HASHSIZE 509 #define MEM_HASHSIZE_FILE "meminfo.h" /* default: memory information is off */ /* set it to 1 if you want it all the time */ #define MEM_SWITCH_ON_DEF 0 /* available standard types */ #define TYPE_NULL (-1) #define TYPE_MAT 0 #define TYPE_BAND 1 #define TYPE_PERM 2 #define TYPE_VEC 3 #define TYPE_IVEC 4 #ifdef SPARSE #define TYPE_ITER 5 #define TYPE_SPROW 6 #define TYPE_SPMAT 7 #endif #ifdef COMPLEX #ifdef SPARSE #define TYPE_ZVEC 8 #define TYPE_ZMAT 9 #else #define TYPE_ZVEC 5 #define TYPE_ZMAT 6 #endif #endif /* structure for memory information */ typedef struct { long bytes; /* # of allocated bytes for each type (summary) */ int numvar; /* # of allocated variables for each type */ } MEM_ARRAY; #ifdef ANSI_C int mem_info_is_on(void); int mem_info_on(int sw); long mem_info_bytes(int type,int list); int mem_info_numvar(int type,int list); void mem_info_file(FILE * fp,int list); void mem_bytes_list(int type,int old_size,int new_size, int list); void mem_numvar_list(int type, int num, int list); int mem_stat_reg_list(void **var,int type,int list); int mem_stat_mark(int mark); int mem_stat_free_list(int mark,int list); int mem_stat_show_mark(void); void mem_stat_dump(FILE *fp,int list); int mem_attach_list(int list,int ntypes,char *type_names[], int (*free_funcs[])(), MEM_ARRAY info_sum[]); int mem_free_vars(int list); int mem_is_list_attached(int list); void mem_dump_list(FILE *fp,int list); int mem_stat_reg_vars(int list,int type,...); #else int mem_info_is_on(); int mem_info_on(); long mem_info_bytes(); int mem_info_numvar(); void mem_info_file(); void mem_bytes_list(); void mem_numvar_list(); int mem_stat_reg_list(); int mem_stat_mark(); int mem_stat_free_list(); int mem_stat_show_mark(); void mem_stat_dump(); int mem_attach_list(); int mem_free_vars(); int mem_is_list_attached(); void mem_dump_list(); int mem_stat_reg_vars(); #endif /* macros */ #define mem_info() mem_info_file(stdout,0) #define mem_stat_reg(var,type) mem_stat_reg_list((void **)var,type,0) #define MEM_STAT_REG(var,type) mem_stat_reg_list((void **)&(var),type,0) #define mem_stat_free(mark) mem_stat_free_list(mark,0) #define mem_bytes(type,old_size,new_size) \ mem_bytes_list(type,old_size,new_size,0) #define mem_numvar(type,num) mem_numvar_list(type,num,0) /* internal type */ typedef struct { char **type_names; /* array of names of types (strings) */ int (**free_funcs)(); /* array of functions for releasing types */ unsigned ntypes; /* max number of types */ MEM_ARRAY *info_sum; /* local array for keeping track of memory */ } MEM_CONNECT; /* max number of lists of types */ #define MEM_CONNECT_MAX_LISTS 5 #endif neuron-7.5/src/mesch/memory.c000077500000000000000000000467731323325274500162670ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* memory.c 1.3 11/25/87 */ #include "matrix.h" static char rcsid[] = "memory.c,v 1.1 1997/12/04 17:55:38 hines Exp"; /* m_get -- gets an mxn matrix (in MAT form) by dynamic memory allocation */ MAT *m_get(m,n) int m,n; { MAT *matrix; int i; if (m < 0 || n < 0) error(E_NEG,"m_get"); if ((matrix=NEW(MAT)) == (MAT *)NULL ) error(E_MEM,"m_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,sizeof(MAT)); mem_numvar(TYPE_MAT,1); } matrix->m = m; matrix->n = matrix->max_n = n; matrix->max_m = m; matrix->max_size = m*n; #ifndef SEGMENTED if ((matrix->base = NEW_A(m*n,Real)) == (Real *)NULL ) { free(matrix); error(E_MEM,"m_get"); } else if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,m*n*sizeof(Real)); } #else matrix->base = (Real *)NULL; #endif if ((matrix->me = (Real **)calloc(m,sizeof(Real *))) == (Real **)NULL ) { free(matrix->base); free(matrix); error(E_MEM,"m_get"); } else if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,m*sizeof(Real *)); } #ifndef SEGMENTED /* set up pointers */ for ( i=0; ime[i] = &(matrix->base[i*n]); #else for ( i = 0; i < m; i++ ) if ( (matrix->me[i]=NEW_A(n,Real)) == (Real *)NULL ) error(E_MEM,"m_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,n*sizeof(Real)); } #endif return (matrix); } /* px_get -- gets a PERM of given 'size' by dynamic memory allocation -- Note: initialized to the identity permutation */ PERM *px_get(size) int size; { PERM *permute; int i; if (size < 0) error(E_NEG,"px_get"); if ((permute=NEW(PERM)) == (PERM *)NULL ) error(E_MEM,"px_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_PERM,0,sizeof(PERM)); mem_numvar(TYPE_PERM,1); } permute->size = permute->max_size = size; if ((permute->pe = NEW_A(size,u_int)) == (u_int *)NULL ) error(E_MEM,"px_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_PERM,0,size*sizeof(u_int)); } for ( i=0; ipe[i] = i; return (permute); } /* v_get -- gets a VEC of dimension 'dim' -- Note: initialized to zero */ VEC *v_get(size) int size; { VEC *vector; if (size < 0) error(E_NEG,"v_get"); if ((vector=NEW(VEC)) == (VEC *)NULL ) error(E_MEM,"v_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_VEC,0,sizeof(VEC)); mem_numvar(TYPE_VEC,1); } vector->dim = vector->max_dim = size; if ((vector->ve=NEW_A(size,Real)) == (Real *)NULL ) { free(vector); error(E_MEM,"v_get"); } else if (mem_info_is_on()) { mem_bytes(TYPE_VEC,0,size*sizeof(Real)); } return (vector); } /* m_free -- returns MAT & asoociated memory back to memory heap */ int m_free(mat) MAT *mat; { #ifdef SEGMENTED int i; #endif if ( mat==(MAT *)NULL || (int)(mat->m) < 0 || (int)(mat->n) < 0 ) /* don't trust it */ return (-1); #ifndef SEGMENTED if ( mat->base != (Real *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_MAT,mat->max_m*mat->max_n*sizeof(Real),0); } free((char *)(mat->base)); } #else for ( i = 0; i < mat->max_m; i++ ) if ( mat->me[i] != (Real *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_MAT,mat->max_n*sizeof(Real),0); } free((char *)(mat->me[i])); } #endif if ( mat->me != (Real **)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_MAT,mat->max_m*sizeof(Real *),0); } free((char *)(mat->me)); } if (mem_info_is_on()) { mem_bytes(TYPE_MAT,sizeof(MAT),0); mem_numvar(TYPE_MAT,-1); } free((char *)mat); return (0); } /* px_free -- returns PERM & asoociated memory back to memory heap */ int px_free(px) PERM *px; { if ( px==(PERM *)NULL || (int)(px->size) < 0 ) /* don't trust it */ return (-1); if ( px->pe == (u_int *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_PERM,sizeof(PERM),0); mem_numvar(TYPE_PERM,-1); } free((char *)px); } else { if (mem_info_is_on()) { mem_bytes(TYPE_PERM,sizeof(PERM)+px->max_size*sizeof(u_int),0); mem_numvar(TYPE_PERM,-1); } free((char *)px->pe); free((char *)px); } return (0); } /* v_free -- returns VEC & asoociated memory back to memory heap */ int v_free(vec) VEC *vec; { if ( vec==(VEC *)NULL || (int)(vec->dim) < 0 ) /* don't trust it */ return (-1); if ( vec->ve == (Real *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_VEC,sizeof(VEC),0); mem_numvar(TYPE_VEC,-1); } free((char *)vec); } else { if (mem_info_is_on()) { mem_bytes(TYPE_VEC,sizeof(VEC)+vec->max_dim*sizeof(Real),0); mem_numvar(TYPE_VEC,-1); } free((char *)vec->ve); free((char *)vec); } return (0); } /* m_resize -- returns the matrix A of size new_m x new_n; A is zeroed -- if A == NULL on entry then the effect is equivalent to m_get() */ MAT *m_resize(A,new_m,new_n) MAT *A; int new_m, new_n; { int i; int new_max_m, new_max_n, new_size, old_m, old_n; if (new_m < 0 || new_n < 0) error(E_NEG,"m_resize"); if ( ! A ) return m_get(new_m,new_n); /* nothing was changed */ if (new_m == A->m && new_n == A->n) return A; old_m = A->m; old_n = A->n; if ( new_m > A->max_m ) { /* re-allocate A->me */ if (mem_info_is_on()) { mem_bytes(TYPE_MAT,A->max_m*sizeof(Real *), new_m*sizeof(Real *)); } A->me = RENEW(A->me,new_m,Real *); if ( ! A->me ) error(E_MEM,"m_resize"); } new_max_m = max(new_m,A->max_m); new_max_n = max(new_n,A->max_n); #ifndef SEGMENTED new_size = new_max_m*new_max_n; if ( new_size > A->max_size ) { /* re-allocate A->base */ if (mem_info_is_on()) { mem_bytes(TYPE_MAT,A->max_m*A->max_n*sizeof(Real), new_size*sizeof(Real)); } A->base = RENEW(A->base,new_size,Real); if ( ! A->base ) error(E_MEM,"m_resize"); A->max_size = new_size; } /* now set up A->me[i] */ for ( i = 0; i < new_m; i++ ) A->me[i] = &(A->base[i*new_n]); /* now shift data in matrix */ if ( old_n > new_n ) { for ( i = 1; i < min(old_m,new_m); i++ ) MEM_COPY((char *)&(A->base[i*old_n]), (char *)&(A->base[i*new_n]), sizeof(Real)*new_n); } else if ( old_n < new_n ) { for ( i = (int)(min(old_m,new_m))-1; i > 0; i-- ) { /* copy & then zero extra space */ MEM_COPY((char *)&(A->base[i*old_n]), (char *)&(A->base[i*new_n]), sizeof(Real)*old_n); __zero__(&(A->base[i*new_n+old_n]),(new_n-old_n)); } __zero__(&(A->base[old_n]),(new_n-old_n)); A->max_n = new_n; } /* zero out the new rows.. */ for ( i = old_m; i < new_m; i++ ) __zero__(&(A->base[i*new_n]),new_n); #else if ( A->max_n < new_n ) { Real *tmp; for ( i = 0; i < A->max_m; i++ ) { if (mem_info_is_on()) { mem_bytes(TYPE_MAT,A->max_n*sizeof(Real), new_max_n*sizeof(Real)); } if ( (tmp = RENEW(A->me[i],new_max_n,Real)) == NULL ) error(E_MEM,"m_resize"); else { A->me[i] = tmp; } } for ( i = A->max_m; i < new_max_m; i++ ) { if ( (tmp = NEW_A(new_max_n,Real)) == NULL ) error(E_MEM,"m_resize"); else { A->me[i] = tmp; if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,new_max_n*sizeof(Real)); } } } } else if ( A->max_m < new_m ) { for ( i = A->max_m; i < new_m; i++ ) if ( (A->me[i] = NEW_A(new_max_n,Real)) == NULL ) error(E_MEM,"m_resize"); else if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,new_max_n*sizeof(Real)); } } if ( old_n < new_n ) { for ( i = 0; i < old_m; i++ ) __zero__(&(A->me[i][old_n]),new_n-old_n); } /* zero out the new rows.. */ for ( i = old_m; i < new_m; i++ ) __zero__(A->me[i],new_n); #endif A->max_m = new_max_m; A->max_n = new_max_n; A->max_size = A->max_m*A->max_n; A->m = new_m; A->n = new_n; return A; } /* px_resize -- returns the permutation px with size new_size -- px is set to the identity permutation */ PERM *px_resize(px,new_size) PERM *px; int new_size; { int i; if (new_size < 0) error(E_NEG,"px_resize"); if ( ! px ) return px_get(new_size); /* nothing is changed */ if (new_size == px->size) return px; if ( new_size > px->max_size ) { if (mem_info_is_on()) { mem_bytes(TYPE_PERM,px->max_size*sizeof(u_int), new_size*sizeof(u_int)); } px->pe = RENEW(px->pe,new_size,u_int); if ( ! px->pe ) error(E_MEM,"px_resize"); px->max_size = new_size; } if ( px->size <= new_size ) /* extend permutation */ for ( i = px->size; i < new_size; i++ ) px->pe[i] = i; else for ( i = 0; i < new_size; i++ ) px->pe[i] = i; px->size = new_size; return px; } /* v_resize -- returns the vector x with dim new_dim -- x is set to the zero vector */ VEC *v_resize(x,new_dim) VEC *x; int new_dim; { if (new_dim < 0) error(E_NEG,"v_resize"); if ( ! x ) return v_get(new_dim); /* nothing is changed */ if (new_dim == x->dim) return x; if ( x->max_dim == 0 ) /* assume that it's from sub_vec */ return v_get(new_dim); if ( new_dim > x->max_dim ) { if (mem_info_is_on()) { mem_bytes(TYPE_VEC,x->max_dim*sizeof(Real), new_dim*sizeof(Real)); } x->ve = RENEW(x->ve,new_dim,Real); if ( ! x->ve ) error(E_MEM,"v_resize"); x->max_dim = new_dim; } if ( new_dim > x->dim ) __zero__(&(x->ve[x->dim]),new_dim - x->dim); x->dim = new_dim; return x; } /* Varying number of arguments */ /* other functions of this type are in sparse.c and zmemory.c */ #ifdef ANSI_C /* To allocate memory to many arguments. The function should be called: v_get_vars(dim,&x,&y,&z,...,NULL); where int dim; VEC *x, *y, *z,...; The last argument should be NULL ! dim is the length of vectors x,y,z,... returned value is equal to the number of allocated variables Other gec_... functions are similar. */ int v_get_vars(int dim,...) { va_list ap; int i=0; VEC **par; va_start(ap, dim); while ((par = va_arg(ap,VEC **))) { /* NULL ends the list*/ *par = v_get(dim); i++; } va_end(ap); return i; } int iv_get_vars(int dim,...) { va_list ap; int i=0; IVEC **par; va_start(ap, dim); while ((par = va_arg(ap,IVEC **))) { /* NULL ends the list*/ *par = iv_get(dim); i++; } va_end(ap); return i; } int m_get_vars(int m,int n,...) { va_list ap; int i=0; MAT **par; va_start(ap, n); while ((par = va_arg(ap,MAT **))) { /* NULL ends the list*/ *par = m_get(m,n); i++; } va_end(ap); return i; } int px_get_vars(int dim,...) { va_list ap; int i=0; PERM **par; va_start(ap, dim); while ((par = va_arg(ap,PERM **))) { /* NULL ends the list*/ *par = px_get(dim); i++; } va_end(ap); return i; } /* To resize memory for many arguments. The function should be called: v_resize_vars(new_dim,&x,&y,&z,...,NULL); where int new_dim; VEC *x, *y, *z,...; The last argument should be NULL ! rdim is the resized length of vectors x,y,z,... returned value is equal to the number of allocated variables. If one of x,y,z,.. arguments is NULL then memory is allocated to this argument. Other *_resize_list() functions are similar. */ int v_resize_vars(int new_dim,...) { va_list ap; int i=0; VEC **par; va_start(ap, new_dim); while ((par = va_arg(ap,VEC **))) { /* NULL ends the list*/ *par = v_resize(*par,new_dim); i++; } va_end(ap); return i; } int iv_resize_vars(int new_dim,...) { va_list ap; int i=0; IVEC **par; va_start(ap, new_dim); while ((par = va_arg(ap,IVEC **))) { /* NULL ends the list*/ *par = iv_resize(*par,new_dim); i++; } va_end(ap); return i; } int m_resize_vars(int m,int n,...) { va_list ap; int i=0; MAT **par; va_start(ap, n); while ((par = va_arg(ap,MAT **))) { /* NULL ends the list*/ *par = m_resize(*par,m,n); i++; } va_end(ap); return i; } int px_resize_vars(int new_dim,...) { va_list ap; int i=0; PERM **par; va_start(ap, new_dim); while ((par = va_arg(ap,PERM **))) { /* NULL ends the list*/ *par = px_resize(*par,new_dim); i++; } va_end(ap); return i; } /* To deallocate memory for many arguments. The function should be called: v_free_vars(&x,&y,&z,...,NULL); where VEC *x, *y, *z,...; The last argument should be NULL ! There must be at least one not NULL argument. returned value is equal to the number of allocated variables. Returned value of x,y,z,.. is VNULL. Other *_free_list() functions are similar. */ int v_free_vars(VEC **pv,...) { va_list ap; int i=1; VEC **par; v_free(*pv); *pv = VNULL; va_start(ap, pv); while ((par = va_arg(ap,VEC **))) { /* NULL ends the list*/ v_free(*par); *par = VNULL; i++; } va_end(ap); return i; } int iv_free_vars(IVEC **ipv,...) { va_list ap; int i=1; IVEC **par; iv_free(*ipv); *ipv = IVNULL; va_start(ap, ipv); while ((par = va_arg(ap,IVEC **))) { /* NULL ends the list*/ iv_free(*par); *par = IVNULL; i++; } va_end(ap); return i; } int px_free_vars(PERM **vpx,...) { va_list ap; int i=1; PERM **par; px_free(*vpx); *vpx = PNULL; va_start(ap, vpx); while ((par = va_arg(ap,PERM **))) { /* NULL ends the list*/ px_free(*par); *par = PNULL; i++; } va_end(ap); return i; } int m_free_vars(MAT **va,...) { va_list ap; int i=1; MAT **par; m_free(*va); *va = MNULL; va_start(ap, va); while ((par = va_arg(ap,MAT **))) { /* NULL ends the list*/ m_free(*par); *par = MNULL; i++; } va_end(ap); return i; } #elif VARARGS /* old varargs is used */ /* To allocate memory to many arguments. The function should be called: v_get_vars(dim,&x,&y,&z,...,VNULL); where int dim; VEC *x, *y, *z,...; The last argument should be VNULL ! dim is the length of vectors x,y,z,... */ int v_get_vars(va_alist) va_dcl { va_list ap; int dim,i=0; VEC **par; va_start(ap); dim = va_arg(ap,int); while (par = va_arg(ap,VEC **)) { /* NULL ends the list*/ *par = v_get(dim); i++; } va_end(ap); return i; } int iv_get_vars(va_alist) va_dcl { va_list ap; int i=0, dim; IVEC **par; va_start(ap); dim = va_arg(ap,int); while (par = va_arg(ap,IVEC **)) { /* NULL ends the list*/ *par = iv_get(dim); i++; } va_end(ap); return i; } int m_get_vars(va_alist) va_dcl { va_list ap; int i=0, n, m; MAT **par; va_start(ap); m = va_arg(ap,int); n = va_arg(ap,int); while (par = va_arg(ap,MAT **)) { /* NULL ends the list*/ *par = m_get(m,n); i++; } va_end(ap); return i; } int px_get_vars(va_alist) va_dcl { va_list ap; int i=0, dim; PERM **par; va_start(ap); dim = va_arg(ap,int); while (par = va_arg(ap,PERM **)) { /* NULL ends the list*/ *par = px_get(dim); i++; } va_end(ap); return i; } /* To resize memory for many arguments. The function should be called: v_resize_vars(new_dim,&x,&y,&z,...,NULL); where int new_dim; VEC *x, *y, *z,...; The last argument should be NULL ! rdim is the resized length of vectors x,y,z,... returned value is equal to the number of allocated variables. If one of x,y,z,.. arguments is NULL then memory is allocated to this argument. Other *_resize_list() functions are similar. */ int v_resize_vars(va_alist) va_dcl { va_list ap; int i=0, new_dim; VEC **par; va_start(ap); new_dim = va_arg(ap,int); while (par = va_arg(ap,VEC **)) { /* NULL ends the list*/ *par = v_resize(*par,new_dim); i++; } va_end(ap); return i; } int iv_resize_vars(va_alist) va_dcl { va_list ap; int i=0, new_dim; IVEC **par; va_start(ap); new_dim = va_arg(ap,int); while (par = va_arg(ap,IVEC **)) { /* NULL ends the list*/ *par = iv_resize(*par,new_dim); i++; } va_end(ap); return i; } int m_resize_vars(va_alist) va_dcl { va_list ap; int i=0, m, n; MAT **par; va_start(ap); m = va_arg(ap,int); n = va_arg(ap,int); while (par = va_arg(ap,MAT **)) { /* NULL ends the list*/ *par = m_resize(*par,m,n); i++; } va_end(ap); return i; } int px_resize_vars(va_alist) va_dcl { va_list ap; int i=0, new_dim; PERM **par; va_start(ap); new_dim = va_arg(ap,int); while (par = va_arg(ap,PERM **)) { /* NULL ends the list*/ *par = px_resize(*par,new_dim); i++; } va_end(ap); return i; } /* To deallocate memory for many arguments. The function should be called: v_free_vars(&x,&y,&z,...,NULL); where VEC *x, *y, *z,...; The last argument should be NULL ! returned value is equal to the number of allocated variables. Returned value of x,y,z,.. is VNULL. Other *_free_list() functions are similar. */ int v_free_vars(va_alist) va_dcl { va_list ap; int i=0; VEC **par; va_start(ap); while (par = va_arg(ap,VEC **)) { /* NULL ends the list*/ v_free(*par); *par = VNULL; i++; } va_end(ap); return i; } int iv_free_vars(va_alist) va_dcl { va_list ap; int i=0; IVEC **par; va_start(ap); while (par = va_arg(ap,IVEC **)) { /* NULL ends the list*/ iv_free(*par); *par = IVNULL; i++; } va_end(ap); return i; } int px_free_vars(va_alist) va_dcl { va_list ap; int i=0; PERM **par; va_start(ap); while (par = va_arg(ap,PERM **)) { /* NULL ends the list*/ px_free(*par); *par = PNULL; i++; } va_end(ap); return i; } int m_free_vars(va_alist) va_dcl { va_list ap; int i=0; MAT **par; va_start(ap); while (par = va_arg(ap,MAT **)) { /* NULL ends the list*/ m_free(*par); *par = MNULL; i++; } va_end(ap); return i; } #endif /* VARARGS */ neuron-7.5/src/mesch/memstat.c000077500000000000000000000207271323325274500164200ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* mem_stat.c 6/09/93 */ /* Deallocation of static arrays */ #include #include "matrix.h" #include "meminfo.h" #ifdef COMPLEX #include "zmatrix.h" #endif #ifdef SPARSE #include "sparse.h" #include "iter.h" #endif static char rcsid[] = "memstat.c,v 1.1 1997/12/04 17:55:39 hines Exp"; /* global variable */ extern MEM_CONNECT mem_connect[MEM_CONNECT_MAX_LISTS]; /* local type */ typedef struct { void **var; /* for &A, where A is a pointer */ int type; /* type of A */ int mark; /* what mark is chosen */ } MEM_STAT_STRUCT; /* local variables */ /* how many marks are used */ static int mem_stat_mark_many = 0; /* current mark */ static int mem_stat_mark_curr = 0; static MEM_STAT_STRUCT mem_stat_var[MEM_HASHSIZE]; /* array of indices (+1) to mem_stat_var */ static unsigned int mem_hash_idx[MEM_HASHSIZE]; /* points to the first unused element in mem_hash_idx */ static unsigned int mem_hash_idx_end = 0; /* hashing function */ static unsigned int mem_hash(ptr) void **ptr; { unsigned long lp = (size_t)ptr; return (lp % MEM_HASHSIZE); } /* look for a place in mem_stat_var */ static int mem_lookup(var) void **var; { int k, j; k = mem_hash(var); if (mem_stat_var[k].var == var) { return -1; } else if (mem_stat_var[k].var == NULL) { return k; } else { /* look for an empty place */ j = k; while (mem_stat_var[j].var != var && j < MEM_HASHSIZE && mem_stat_var[j].var != NULL) j++; if (mem_stat_var[j].var == NULL) return j; else if (mem_stat_var[j].var == var) return -1; else { /* if (j == MEM_HASHSIZE) */ j = 0; while (mem_stat_var[j].var != var && j < k && mem_stat_var[j].var != NULL) j++; if (mem_stat_var[j].var == NULL) return j; else if (mem_stat_var[j].var == var) return -1; else { /* if (j == k) */ fprintf(stderr, "\n WARNING !!! static memory: mem_stat_var is too small\n"); fprintf(stderr, " Increase MEM_HASHSIZE in file: %s (currently = %d)\n\n", MEM_HASHSIZE_FILE, MEM_HASHSIZE); if ( !isatty(fileno(stdout)) ) { fprintf(stdout, "\n WARNING !!! static memory: mem_stat_var is too small\n"); fprintf(stdout, " Increase MEM_HASHSIZE in file: %s (currently = %d)\n\n", MEM_HASHSIZE_FILE, MEM_HASHSIZE); } error(E_MEM,"mem_lookup"); } } } return -1; } /* register static variables; Input arguments: var - variable to be registered, type - type of this variable; list - list of types returned value < 0 --> error, returned value == 0 --> not registered, returned value >= 0 --> registered with this mark; */ int mem_stat_reg_list(var,type,list) void **var; int type,list; { int n; if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS ) return -1; if (mem_stat_mark_curr == 0) return 0; /* not registered */ if (var == NULL) return -1; /* error */ if ( type < 0 || type >= mem_connect[list].ntypes || mem_connect[list].free_funcs[type] == NULL ) { warning(WARN_WRONG_TYPE,"mem_stat_reg_list"); return -1; } if ((n = mem_lookup(var)) >= 0) { mem_stat_var[n].var = var; mem_stat_var[n].mark = mem_stat_mark_curr; mem_stat_var[n].type = type; /* save n+1, not n */ mem_hash_idx[mem_hash_idx_end++] = n+1; } return mem_stat_mark_curr; } /* set a mark; Input argument: mark - positive number denoting a mark; returned: mark if mark > 0, 0 if mark == 0, -1 if mark is negative. */ int mem_stat_mark(mark) int mark; { if (mark < 0) { mem_stat_mark_curr = 0; return -1; /* error */ } else if (mark == 0) { mem_stat_mark_curr = 0; return 0; } mem_stat_mark_curr = mark; mem_stat_mark_many++; return mark; } /* deallocate static variables; Input argument: mark - a positive number denoting the mark; Returned: -1 if mark < 0 (error); 0 if mark == 0; */ int mem_stat_free_list(mark,list) int mark,list; { u_int i,j; int (*free_fn)(); if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS || mem_connect[list].free_funcs == NULL ) return -1; if (mark < 0) { mem_stat_mark_curr = 0; return -1; } else if (mark == 0) { mem_stat_mark_curr = 0; return 0; } if (mem_stat_mark_many <= 0) { warning(WARN_NO_MARK,"mem_stat_free"); return -1; } /* deallocate the marked variables */ for (i=0; i < mem_hash_idx_end; i++) { j = mem_hash_idx[i]; if (j == 0) continue; else { j--; if (mem_stat_var[j].mark == mark) { free_fn = mem_connect[list].free_funcs[mem_stat_var[j].type]; if ( free_fn != NULL ) (*free_fn)(*mem_stat_var[j].var); else warning(WARN_WRONG_TYPE,"mem_stat_free"); *(mem_stat_var[j].var) = NULL; mem_stat_var[j].var = NULL; mem_stat_var[j].mark = 0; mem_hash_idx[i] = 0; } } } while (mem_hash_idx_end > 0 && mem_hash_idx[mem_hash_idx_end-1] == 0) mem_hash_idx_end--; mem_stat_mark_curr = 0; mem_stat_mark_many--; return 0; } /* only for diagnostic purposes */ void mem_stat_dump(fp,list) FILE *fp; int list; { u_int i,j,k=1; if ( list < 0 || list >= MEM_CONNECT_MAX_LISTS || mem_connect[list].free_funcs == NULL ) return; fprintf(fp," Array mem_stat_var (list no. %d):\n",list); for (i=0; i < mem_hash_idx_end; i++) { j = mem_hash_idx[i]; if (j == 0) continue; else { j--; fprintf(fp," %d. var = 0x%p, type = %s, mark = %d\n", k,mem_stat_var[j].var, mem_stat_var[j].type < mem_connect[list].ntypes && mem_connect[list].free_funcs[mem_stat_var[j].type] != NULL ? mem_connect[list].type_names[(int)mem_stat_var[j].type] : "???", mem_stat_var[j].mark); k++; } } fprintf(fp,"\n"); } /* query function about the current mark */ #ifdef ANSI_C int mem_stat_show_mark(void) #else int mem_stat_show_mark() #endif { return mem_stat_mark_curr; } /* Varying number of arguments */ #ifdef ANSI_C /* To allocate memory to many arguments. The function should be called: mem_stat_vars(list,type,&v1,&v2,&v3,...,VNULL); where int list,type; void **v1, **v2, **v3,...; The last argument should be VNULL ! type is the type of variables v1,v2,v3,... (of course they must be of the same type) */ int mem_stat_reg_vars(int list,int type,...) { va_list ap; int i=0; void **par; va_start(ap, type); while ((par = va_arg(ap,void **))) { /* NULL ends the list*/ mem_stat_reg_list(par,type,list); i++; } va_end(ap); return i; } #elif VARARGS /* old varargs is used */ /* To allocate memory to many arguments. The function should be called: mem_stat_vars(list,type,&v1,&v2,&v3,...,VNULL); where int list,type; void **v1, **v2, **v3,...; The last argument should be VNULL ! type is the type of variables v1,v2,v3,... (of course they must be of the same type) */ int mem_stat_reg_vars(va_alist) va_dcl { va_list ap; int type,list,i=0; void **par; va_start(ap); list = va_arg(ap,int); type = va_arg(ap,int); while ((par = va_arg(ap,void **))) { /* NULL ends the list*/ mem_stat_reg_list(par,type,list); i++; } va_end(ap); return i; } #endif neuron-7.5/src/mesch/mfunc.c000077500000000000000000000220231323325274500160450ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains routines for computing functions of matrices especially polynomials and exponential functions Copyright (C) Teresa Leyk and David Stewart, 1993 */ #include #include "matrix.h" #include "matrix2.h" #include static char rcsid[] = "mfunc.c,v 1.1 1997/12/04 17:55:41 hines Exp"; /* _m_pow -- computes integer powers of a square matrix A, A^p -- uses tmp as temporary workspace */ MAT *_m_pow(A, p, tmp, out) MAT *A, *tmp, *out; int p; { int it_cnt, k, max_bit; /* File containing routines for evaluating matrix functions esp. the exponential function */ #define Z(k) (((k) & 1) ? tmp : out) if ( ! A ) error(E_NULL,"_m_pow"); if ( A->m != A->n ) error(E_SQUARE,"_m_pow"); if ( p < 0 ) error(E_NEG,"_m_pow"); out = m_resize(out,A->m,A->n); tmp = m_resize(tmp,A->m,A->n); if ( p == 0 ) m_ident(out); else if ( p > 0 ) { it_cnt = 1; for ( max_bit = 0; ; max_bit++ ) if ( (p >> (max_bit+1)) == 0 ) break; tmp = m_copy(A,tmp); for ( k = 0; k < max_bit; k++ ) { m_mlt(Z(it_cnt),Z(it_cnt),Z(it_cnt+1)); it_cnt++; if ( p & (1 << (max_bit-1)) ) { m_mlt(A,Z(it_cnt),Z(it_cnt+1)); /* m_copy(Z(it_cnt),out); */ it_cnt++; } p <<= 1; } if (it_cnt & 1) out = m_copy(Z(it_cnt),out); } return out; #undef Z } /* m_pow -- computes integer powers of a square matrix A, A^p */ MAT *m_pow(A, p, out) MAT *A, *out; int p; { static MAT *wkspace, *tmp; if ( ! A ) error(E_NULL,"m_pow"); if ( A->m != A->n ) error(E_SQUARE,"m_pow"); wkspace = m_resize(wkspace,A->m,A->n); MEM_STAT_REG(wkspace,TYPE_MAT); if ( p < 0 ) { tmp = m_resize(tmp,A->m,A->n); MEM_STAT_REG(tmp,TYPE_MAT); tracecatch(m_inverse(A,tmp),"m_pow"); return _m_pow(tmp, -p, wkspace, out); } else return _m_pow(A, p, wkspace, out); } /**************************************************/ /* _m_exp -- compute matrix exponential of A and save it in out -- uses Pade approximation followed by repeated squaring -- eps is the tolerance used for the Pade approximation -- A is not changed -- q_out - degree of the Pade approximation (q_out,q_out) -- j_out - the power of 2 for scaling the matrix A such that ||A/2^j_out|| <= 0.5 */ MAT *_m_exp(A,eps,out,q_out,j_out) MAT *A,*out; double eps; int *q_out, *j_out; { static MAT *D = MNULL, *Apow = MNULL, *N = MNULL, *Y = MNULL; static VEC *c1 = VNULL, *tmp = VNULL; VEC y0, y1; /* additional structures */ static PERM *pivot = PNULL; int j, k, l, q, r, s, j2max, t; double inf_norm, eqq, power2, c, sign; if ( ! A ) error(E_SIZES,"_m_exp"); if ( A->m != A->n ) error(E_SIZES,"_m_exp"); if ( A == out ) error(E_INSITU,"_m_exp"); if ( eps < 0.0 ) error(E_RANGE,"_m_exp"); else if (eps == 0.0) eps = MACHEPS; N = m_resize(N,A->m,A->n); D = m_resize(D,A->m,A->n); Apow = m_resize(Apow,A->m,A->n); out = m_resize(out,A->m,A->n); MEM_STAT_REG(N,TYPE_MAT); MEM_STAT_REG(D,TYPE_MAT); MEM_STAT_REG(Apow,TYPE_MAT); /* normalise A to have ||A||_inf <= 1 */ inf_norm = m_norm_inf(A); if (inf_norm <= 0.0) { m_ident(out); *q_out = -1; *j_out = 0; return out; } else { j2max = floor(1+log(inf_norm)/log(2.0)); j2max = max(0, j2max); } power2 = 1.0; for ( k = 1; k <= j2max; k++ ) power2 *= 2; power2 = 1.0/power2; if ( j2max > 0 ) sm_mlt(power2,A,A); /* compute order for polynomial approximation */ eqq = 1.0/6.0; for ( q = 1; eqq > eps; q++ ) eqq /= 16.0*(2.0*q+1.0)*(2.0*q+3.0); /* construct vector of coefficients */ c1 = v_resize(c1,q+1); MEM_STAT_REG(c1,TYPE_VEC); c1->ve[0] = 1.0; for ( k = 1; k <= q; k++ ) c1->ve[k] = c1->ve[k-1]*(q-k+1)/((2*q-k+1)*(double)k); tmp = v_resize(tmp,A->n); MEM_STAT_REG(tmp,TYPE_VEC); s = (int)floor(sqrt((double)q/2.0)); if ( s <= 0 ) s = 1; _m_pow(A,s,out,Apow); r = q/s; Y = m_resize(Y,s,A->n); MEM_STAT_REG(Y,TYPE_MAT); /* y0 and y1 are pointers to rows of Y, N and D */ y0.dim = y0.max_dim = A->n; y1.dim = y1.max_dim = A->n; m_zero(Y); m_zero(N); m_zero(D); for( j = 0; j < A->n; j++ ) { if (j > 0) Y->me[0][j-1] = 0.0; y0.ve = Y->me[0]; y0.ve[j] = 1.0; for ( k = 0; k < s-1; k++ ) { y1.ve = Y->me[k+1]; mv_mlt(A,&y0,&y1); y0.ve = y1.ve; } y0.ve = N->me[j]; y1.ve = D->me[j]; t = s*r; for ( l = 0; l <= q-t; l++ ) { c = c1->ve[t+l]; sign = ((t+l) & 1) ? -1.0 : 1.0; __mltadd__(y0.ve,Y->me[l],c, Y->n); __mltadd__(y1.ve,Y->me[l],c*sign,Y->n); } for (k=1; k <= r; k++) { v_copy(mv_mlt(Apow,&y0,tmp),&y0); v_copy(mv_mlt(Apow,&y1,tmp),&y1); t = s*(r-k); for (l=0; l < s; l++) { c = c1->ve[t+l]; sign = ((t+l) & 1) ? -1.0 : 1.0; __mltadd__(y0.ve,Y->me[l],c, Y->n); __mltadd__(y1.ve,Y->me[l],c*sign,Y->n); } } } pivot = px_resize(pivot,A->m); MEM_STAT_REG(pivot,TYPE_PERM); /* note that N and D are transposed, therefore we use LUTsolve; out is saved row-wise, and must be transposed after this */ LUfactor(D,pivot); for (k=0; k < A->n; k++) { y0.ve = N->me[k]; y1.ve = out->me[k]; LUTsolve(D,pivot,&y0,&y1); } m_transp(out,out); /* Use recursive squaring to turn the normalised exponential to the true exponential */ #define Z(k) ((k) & 1 ? Apow : out) for( k = 1; k <= j2max; k++) m_mlt(Z(k-1),Z(k-1),Z(k)); if (Z(k) == out) m_copy(Apow,out); /* output parameters */ *j_out = j2max; *q_out = q; /* restore the matrix A */ sm_mlt(1.0/power2,A,A); return out; #undef Z } /* simple interface for _m_exp */ MAT *m_exp(A,eps,out) MAT *A,*out; double eps; { int q_out, j_out; return _m_exp(A,eps,out,&q_out,&j_out); } /*--------------------------------*/ /* m_poly -- computes sum_i a[i].A^i, where i=0,1,...dim(a); -- uses C. Van Loan's fast and memory efficient method */ MAT *m_poly(A,a,out) MAT *A,*out; VEC *a; { static MAT *Apow = MNULL, *Y = MNULL; static VEC *tmp; VEC y0, y1; /* additional vectors */ int j, k, l, q, r, s, t; if ( ! A || ! a ) error(E_NULL,"m_poly"); if ( A->m != A->n ) error(E_SIZES,"m_poly"); if ( A == out ) error(E_INSITU,"m_poly"); out = m_resize(out,A->m,A->n); Apow = m_resize(Apow,A->m,A->n); MEM_STAT_REG(Apow,TYPE_MAT); tmp = v_resize(tmp,A->n); MEM_STAT_REG(tmp,TYPE_VEC); q = a->dim - 1; if ( q == 0 ) { m_zero(out); for (j=0; j < out->n; j++) out->me[j][j] = a->ve[0]; return out; } else if ( q == 1) { sm_mlt(a->ve[1],A,out); for (j=0; j < out->n; j++) out->me[j][j] += a->ve[0]; return out; } s = (int)floor(sqrt((double)q/2.0)); if ( s <= 0 ) s = 1; _m_pow(A,s,out,Apow); r = q/s; Y = m_resize(Y,s,A->n); MEM_STAT_REG(Y,TYPE_MAT); /* pointers to rows of Y */ y0.dim = y0.max_dim = A->n; y1.dim = y1.max_dim = A->n; m_zero(Y); m_zero(out); #define Z(k) ((k) & 1 ? tmp : &y0) #define ZZ(k) ((k) & 1 ? tmp->ve : y0.ve) for( j = 0; j < A->n; j++) { if( j > 0 ) Y->me[0][j-1] = 0.0; Y->me[0][j] = 1.0; y0.ve = Y->me[0]; for (k = 0; k < s-1; k++) { y1.ve = Y->me[k+1]; mv_mlt(A,&y0,&y1); y0.ve = y1.ve; } y0.ve = out->me[j]; t = s*r; for ( l = 0; l <= q-t; l++ ) __mltadd__(y0.ve,Y->me[l],a->ve[t+l],Y->n); for (k=1; k <= r; k++) { mv_mlt(Apow,Z(k-1),Z(k)); t = s*(r-k); for (l=0; l < s; l++) __mltadd__(ZZ(k),Y->me[l],a->ve[t+l],Y->n); } if (Z(k) == &y0) v_copy(tmp,&y0); } m_transp(out,out); return out; } neuron-7.5/src/mesch/norm.c000077500000000000000000000101611323325274500157100ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* A collection of functions for computing norms: scaled and unscaled */ static char rcsid[] = "norm.c,v 1.1 1997/12/04 17:55:43 hines Exp"; #include #include "matrix.h" #include /* _v_norm1 -- computes (scaled) 1-norms of vectors */ double _v_norm1(x,scale) VEC *x, *scale; { int i, dim; Real s, sum; if ( x == (VEC *)NULL ) error(E_NULL,"_v_norm1"); dim = x->dim; sum = 0.0; if ( scale == (VEC *)NULL ) for ( i = 0; i < dim; i++ ) sum += fabs(x->ve[i]); else if ( scale->dim < dim ) error(E_SIZES,"_v_norm1"); else for ( i = 0; i < dim; i++ ) { s = scale->ve[i]; sum += ( s== 0.0 ) ? fabs(x->ve[i]) : fabs(x->ve[i]/s); } return sum; } /* square -- returns x^2 */ double square(x) double x; { return x*x; } /* cube -- returns x^3 */ double cube(x) double x; { return x*x*x; } /* _v_norm2 -- computes (scaled) 2-norm (Euclidean norm) of vectors */ double _v_norm2(x,scale) VEC *x, *scale; { int i, dim; Real s, sum; if ( x == (VEC *)NULL ) error(E_NULL,"_v_norm2"); dim = x->dim; sum = 0.0; if ( scale == (VEC *)NULL ) for ( i = 0; i < dim; i++ ) sum += square(x->ve[i]); else if ( scale->dim < dim ) error(E_SIZES,"_v_norm2"); else for ( i = 0; i < dim; i++ ) { s = scale->ve[i]; sum += ( s== 0.0 ) ? square(x->ve[i]) : square(x->ve[i]/s); } return sqrt(sum); } #define max(a,b) ((a) > (b) ? (a) : (b)) /* _v_norm_inf -- computes (scaled) infinity-norm (supremum norm) of vectors */ double _v_norm_inf(x,scale) VEC *x, *scale; { int i, dim; Real s, maxval, tmp; if ( x == (VEC *)NULL ) error(E_NULL,"_v_norm_inf"); dim = x->dim; maxval = 0.0; if ( scale == (VEC *)NULL ) for ( i = 0; i < dim; i++ ) { tmp = fabs(x->ve[i]); maxval = max(maxval,tmp); } else if ( scale->dim < dim ) error(E_SIZES,"_v_norm_inf"); else for ( i = 0; i < dim; i++ ) { s = scale->ve[i]; tmp = ( s== 0.0 ) ? fabs(x->ve[i]) : fabs(x->ve[i]/s); maxval = max(maxval,tmp); } return maxval; } /* m_norm1 -- compute matrix 1-norm -- unscaled */ double m_norm1(A) MAT *A; { int i, j, m, n; Real maxval, sum; if ( A == (MAT *)NULL ) error(E_NULL,"m_norm1"); m = A->m; n = A->n; maxval = 0.0; for ( j = 0; j < n; j++ ) { sum = 0.0; for ( i = 0; i < m; i ++ ) sum += fabs(A->me[i][j]); maxval = max(maxval,sum); } return maxval; } /* m_norm_inf -- compute matrix infinity-norm -- unscaled */ double m_norm_inf(A) MAT *A; { int i, j, m, n; Real maxval, sum; if ( A == (MAT *)NULL ) error(E_NULL,"m_norm_inf"); m = A->m; n = A->n; maxval = 0.0; for ( i = 0; i < m; i++ ) { sum = 0.0; for ( j = 0; j < n; j ++ ) sum += fabs(A->me[i][j]); maxval = max(maxval,sum); } return maxval; } /* m_norm_frob -- compute matrix frobenius-norm -- unscaled */ double m_norm_frob(A) MAT *A; { int i, j, m, n; Real sum; if ( A == (MAT *)NULL ) error(E_NULL,"m_norm_frob"); m = A->m; n = A->n; sum = 0.0; for ( i = 0; i < m; i++ ) for ( j = 0; j < n; j ++ ) sum += square(A->me[i][j]); return sqrt(sum); } neuron-7.5/src/mesch/oldnames.h000077500000000000000000000074151323325274500165540ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* macros for names used in versions 1.0 and 1.1 */ /* 8/11/93 */ #ifndef OLDNAMESH #define OLDNAMESH /* type IVEC */ #define get_ivec iv_get #define freeivec IV_FREE #define cp_ivec iv_copy #define fout_ivec iv_foutput #define out_ivec iv_output #define fin_ivec iv_finput #define in_ivec iv_input #define dump_ivec iv_dump /* type ZVEC */ #define get_zvec zv_get #define freezvec ZV_FREE #define cp_zvec zv_copy #define fout_zvec zv_foutput #define out_zvec zv_output #define fin_zvec zv_finput #define in_zvec zv_input #define zero_zvec zv_zero #define rand_zvec zv_rand #define dump_zvec zv_dump /* type ZMAT */ #define get_zmat zm_get #define freezmat ZM_FREE #define cp_zmat zm_copy #define fout_zmat zm_foutput #define out_zmat zm_output #define fin_zmat zm_finput #define in_zmat zm_input #define zero_zmat zm_zero #define rand_zmat zm_rand #define dump_zmat zm_dump /* types SPMAT */ #define sp_mat SPMAT #define sp_get_mat sp_get #define sp_free_mat sp_free #define sp_cp_mat sp_copy #define sp_cp_mat2 sp_copy2 #define sp_fout_mat sp_foutput #define sp_fout_mat2 sp_foutput2 #define sp_out_mat sp_output #define sp_out_mat2 sp_output2 #define sp_fin_mat sp_finput #define sp_in_mat sp_input #define sp_zero_mat sp_zero #define sp_dump_mat sp_dump /* type SPROW */ #define sp_row SPROW #define sp_get_idx sprow_idx #define row_xpd sprow_xpd #define sp_get_row sprow_get #define row_set_val sprow_set_val #define fout_row sprow_foutput #define _row_mltadd sprow_mltadd #define sp_row_copy sprow_copy #define sp_row_merge sprow_merge #define sp_row_ip sprow_ip #define sp_row_sqr sprow_sqr /* type MAT */ #define get_mat m_get #define freemat M_FREE #define cp_mat m_copy #define fout_mat m_foutput #define out_mat m_output #define fin_mat m_finput #define in_mat m_input #define zero_mat m_zero #define id_mat m_ident #define rand_mat m_rand #define ones_mat m_ones #define dump_mat m_dump /* type VEC */ #define get_vec v_get #define freevec V_FREE #define cp_vec v_copy #define fout_vec v_foutput #define out_vec v_output #define fin_vec v_finput #define in_vec v_input #define zero_vec v_zero #define rand_vec v_rand #define ones_vec v_ones #define dump_vec v_dump /* type PERM */ #define get_perm px_get #define freeperm PX_FREE #define cp_perm px_copy #define fout_perm px_foutput #define out_perm px_output #define fin_perm px_finput #define in_perm px_input #define id_perm px_ident #define px_id px_ident #define trans_px px_transp #define sign_px px_sign #define dump_perm px_dump #endif neuron-7.5/src/mesch/otherio.c000077500000000000000000000102301323325274500164030ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File for doing assorted I/O operations not invlolving MAT/VEC/PERM objects */ static char rcsid[] = "otherio.c,v 1.1 1997/12/04 17:55:44 hines Exp"; #include #include #include "matrix.h" /* scratch area -- enough for a single line */ static char scratch[MAXLINE+1]; /* default value for fy_or_n */ static int y_n_dflt = TRUE; /* fy_or_n -- yes-or-no to question is string s -- question written to stderr, input from fp -- if fp is NOT a tty then return y_n_dflt */ int fy_or_n(fp,s) FILE *fp; char *s; { char *cp; if ( ! isatty(fileno(fp)) ) return y_n_dflt; for ( ; ; ) { fprintf(stderr,"%s (y/n) ? ",s); if ( fgets(scratch,MAXLINE,fp)==NULL ) error(E_INPUT,"fy_or_n"); cp = scratch; while ( isspace(*cp) ) cp++; if ( *cp == 'y' || *cp == 'Y' ) return TRUE; if ( *cp == 'n' || *cp == 'N' ) return FALSE; fprintf(stderr,"Please reply with 'y' or 'Y' for yes "); fprintf(stderr,"and 'n' or 'N' for no.\n"); } } /* yn_dflt -- sets the value of y_n_dflt to val */ int yn_dflt(val) int val; { return y_n_dflt = val; } /* fin_int -- return integer read from file/stream fp -- prompt s on stderr if fp is a tty -- check that x lies between low and high: re-prompt if fp is a tty, error exit otherwise -- ignore check if low > high */ int fin_int(fp,s,low,high) FILE *fp; char *s; int low, high; { int retcode, x; if ( ! isatty(fileno(fp)) ) { skipjunk(fp); if ( (retcode=fscanf(fp,"%d",&x)) == EOF ) error(E_INPUT,"fin_int"); if ( retcode <= 0 ) error(E_FORMAT,"fin_int"); if ( low <= high && ( x < low || x > high ) ) error(E_BOUNDS,"fin_int"); return x; } for ( ; ; ) { fprintf(stderr,"%s: ",s); if ( fgets(scratch,MAXLINE,stdin)==NULL ) error(E_INPUT,"fin_int"); retcode = sscanf(scratch,"%d",&x); if ( ( retcode==1 && low > high ) || ( x >= low && x <= high ) ) return x; fprintf(stderr,"Please type an integer in range [%d,%d].\n", low,high); } } /* fin_double -- return double read from file/stream fp -- prompt s on stderr if fp is a tty -- check that x lies between low and high: re-prompt if fp is a tty, error exit otherwise -- ignore check if low > high */ double fin_double(fp,s,low,high) FILE *fp; char *s; double low, high; { Real retcode, x; if ( ! isatty(fileno(fp)) ) { skipjunk(fp); #if REAL == DOUBLE if ( (retcode=fscanf(fp,"%lf",&x)) == EOF ) #elif REAL == FLOAT if ( (retcode=fscanf(fp,"%f",&x)) == EOF ) #endif error(E_INPUT,"fin_double"); if ( retcode <= 0 ) error(E_FORMAT,"fin_double"); if ( low <= high && ( x < low || x > high ) ) error(E_BOUNDS,"fin_double"); return (double)x; } for ( ; ; ) { fprintf(stderr,"%s: ",s); if ( fgets(scratch,MAXLINE,stdin)==NULL ) error(E_INPUT,"fin_double"); #if REAL == DOUBLE retcode = sscanf(scratch,"%lf",&x); #elif REAL == FLOAT retcode = sscanf(scratch,"%f",&x); #endif if ( ( retcode==1 && low > high ) || ( x >= low && x <= high ) ) return (double)x; fprintf(stderr,"Please type an double in range [%g,%g].\n", low,high); } } neuron-7.5/src/mesch/pxop.c000077500000000000000000000165451323325274500157370ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* pxop.c 1.5 12/03/87 */ #include #include "matrix.h" static char rcsid[] = "pxop.c,v 1.1 1997/12/04 17:55:44 hines Exp"; /********************************************************************** Note: A permutation is often interpreted as a matrix (i.e. a permutation matrix). A permutation px represents a permutation matrix P where P[i][j] == 1 if and only if px->pe[i] == j **********************************************************************/ /* px_inv -- invert permutation -- in situ -- taken from ACM Collected Algorithms #250 */ PERM *px_inv(px,out) PERM *px, *out; { int i, j, k, n, *p; out = px_copy(px, out); n = out->size; p = (int *)(out->pe); for ( n--; n>=0; n-- ) { i = p[n]; if ( i < 0 ) p[n] = -1 - i; else if ( i != n ) { k = n; while (TRUE) { if ( i < 0 || i >= out->size ) error(E_BOUNDS,"px_inv"); j = p[i]; p[i] = -1 - k; if ( j == n ) { p[n] = i; break; } k = i; i = j; } } } return out; } /* px_mlt -- permutation multiplication (composition) */ PERM *px_mlt(px1,px2,out) PERM *px1,*px2,*out; { u_int i,size; if ( px1==(PERM *)NULL || px2==(PERM *)NULL ) error(E_NULL,"px_mlt"); if ( px1->size != px2->size ) error(E_SIZES,"px_mlt"); if ( px1 == out || px2 == out ) error(E_INSITU,"px_mlt"); if ( out==(PERM *)NULL || out->size < px1->size ) out = px_resize(out,px1->size); size = px1->size; for ( i=0; ipe[i] >= size ) error(E_BOUNDS,"px_mlt"); else out->pe[i] = px1->pe[px2->pe[i]]; return out; } /* px_vec -- permute vector */ VEC *px_vec(px,vector,out) PERM *px; VEC *vector,*out; { u_int old_i, i, size, start; Real tmp; if ( px==(PERM *)NULL || vector==(VEC *)NULL ) error(E_NULL,"px_vec"); if ( px->size > vector->dim ) error(E_SIZES,"px_vec"); if ( out==(VEC *)NULL || out->dim < vector->dim ) out = v_resize(out,vector->dim); size = px->size; if ( size == 0 ) return v_copy(vector,out); if ( out != vector ) { for ( i=0; ipe[i] >= size ) error(E_BOUNDS,"px_vec"); else out->ve[i] = vector->ve[px->pe[i]]; } else { /* in situ algorithm */ start = 0; while ( start < size ) { old_i = start; i = px->pe[old_i]; if ( i >= size ) { start++; continue; } tmp = vector->ve[start]; while ( TRUE ) { vector->ve[old_i] = vector->ve[i]; px->pe[old_i] = i+size; old_i = i; i = px->pe[old_i]; if ( i >= size ) break; if ( i == start ) { vector->ve[old_i] = tmp; px->pe[old_i] = i+size; break; } } start++; } for ( i = 0; i < size; i++ ) if ( px->pe[i] < size ) error(E_BOUNDS,"px_vec"); else px->pe[i] = px->pe[i]-size; } return out; } /* pxinv_vec -- apply the inverse of px to x, returning the result in out */ VEC *pxinv_vec(px,x,out) PERM *px; VEC *x, *out; { u_int i, size; if ( ! px || ! x ) error(E_NULL,"pxinv_vec"); if ( px->size > x->dim ) error(E_SIZES,"pxinv_vec"); /* if ( x == out ) error(E_INSITU,"pxinv_vec"); */ if ( ! out || out->dim < x->dim ) out = v_resize(out,x->dim); size = px->size; if ( size == 0 ) return v_copy(x,out); if ( out != x ) { for ( i=0; ipe[i] >= size ) error(E_BOUNDS,"pxinv_vec"); else out->ve[px->pe[i]] = x->ve[i]; } else { /* in situ algorithm --- cheat's way out */ px_inv(px,px); px_vec(px,x,out); px_inv(px,px); } return out; } /* px_transp -- transpose elements of permutation -- Really multiplying a permutation by a transposition */ PERM *px_transp(px,i1,i2) PERM *px; /* permutation to transpose */ u_int i1,i2; /* elements to transpose */ { u_int temp; if ( px==(PERM *)NULL ) error(E_NULL,"px_transp"); if ( i1 < px->size && i2 < px->size ) { temp = px->pe[i1]; px->pe[i1] = px->pe[i2]; px->pe[i2] = temp; } return px; } /* myqsort -- a cheap implementation of Quicksort on integers -- returns number of swaps */ static int myqsort(a,num) int *a, num; { int i, j, tmp, v; int numswaps; numswaps = 0; if ( num <= 1 ) return 0; i = 0; j = num; v = a[0]; for ( ; ; ) { while ( a[++i] < v ) ; while ( a[--j] > v ) ; if ( i >= j ) break; tmp = a[i]; a[i] = a[j]; a[j] = tmp; numswaps++; } tmp = a[0]; a[0] = a[j]; a[j] = tmp; if ( j != 0 ) numswaps++; numswaps += myqsort(&a[0],j); numswaps += myqsort(&a[j+1],num-(j+1)); return numswaps; } /* px_sign -- compute the ``sign'' of a permutation = +/-1 where px is the product of an even/odd # transpositions */ int px_sign(px) PERM *px; { int numtransp; PERM *px2; if ( px==(PERM *)NULL ) error(E_NULL,"px_sign"); px2 = px_copy(px,PNULL); numtransp = myqsort((int*)px2->pe,px2->size); px_free(px2); return ( numtransp % 2 ) ? -1 : 1; } /* px_cols -- permute columns of matrix A; out = A.px' -- May NOT be in situ */ MAT *px_cols(px,A,out) PERM *px; MAT *A, *out; { int i, j, m, n, px_j; Real **A_me, **out_me; #ifdef ANSI_C MAT *m_get(int, int); #else extern MAT *m_get(); #endif if ( ! A || ! px ) error(E_NULL,"px_cols"); if ( px->size != A->n ) error(E_SIZES,"px_cols"); if ( A == out ) error(E_INSITU,"px_cols"); m = A->m; n = A->n; if ( ! out || out->m != m || out->n != n ) out = m_get(m,n); A_me = A->me; out_me = out->me; for ( j = 0; j < n; j++ ) { px_j = px->pe[j]; if ( px_j >= n ) error(E_BOUNDS,"px_cols"); for ( i = 0; i < m; i++ ) out_me[i][px_j] = A_me[i][j]; } return out; } /* px_rows -- permute columns of matrix A; out = px.A -- May NOT be in situ */ MAT *px_rows(px,A,out) PERM *px; MAT *A, *out; { int i, j, m, n, px_i; Real **A_me, **out_me; #ifdef ANSI_C MAT *m_get(int, int); #else extern MAT *m_get(); #endif if ( ! A || ! px ) error(E_NULL,"px_rows"); if ( px->size != A->m ) error(E_SIZES,"px_rows"); if ( A == out ) error(E_INSITU,"px_rows"); m = A->m; n = A->n; if ( ! out || out->m != m || out->n != n ) out = m_get(m,n); A_me = A->me; out_me = out->me; for ( i = 0; i < m; i++ ) { px_i = px->pe[i]; if ( px_i >= m ) error(E_BOUNDS,"px_rows"); for ( j = 0; j < n; j++ ) out_me[i][j] = A_me[px_i][j]; } return out; } neuron-7.5/src/mesch/qrfactor.c000077500000000000000000000321331323325274500165610ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains the routines needed to perform QR factorisation of matrices, as well as Householder transformations. The internal "factored form" of a matrix A is not quite standard. The diagonal of A is replaced by the diagonal of R -- not by the 1st non-zero entries of the Householder vectors. The 1st non-zero entries are held in the diag parameter of QRfactor(). The reason for this non-standard representation is that it enables direct use of the Usolve() function rather than requiring that a seperate function be written just for this case. See, e.g., QRsolve() below for more details. */ static char rcsid[] = "qrfactor.c,v 1.1 1997/12/04 17:55:45 hines Exp"; #include #include "matrix2.h" #include #define sign(x) ((x) > 0.0 ? 1 : ((x) < 0.0 ? -1 : 0 )) extern VEC *Usolve(); /* See matrix2.h */ /* Note: The usual representation of a Householder transformation is taken to be: P = I - beta.u.uT where beta = 2/(uT.u) and u is called the Householder vector */ /* QRfactor -- forms the QR factorisation of A -- factorisation stored in compact form as described above ( not quite standard format ) */ /* MAT *QRfactor(A,diag,beta) */ MAT *QRfactor(A,diag) MAT *A; VEC *diag /* ,*beta */; { u_int k,limit; Real beta; static VEC *tmp1=VNULL; if ( ! A || ! diag ) error(E_NULL,"QRfactor"); limit = min(A->m,A->n); if ( diag->dim < limit ) error(E_SIZES,"QRfactor"); tmp1 = v_resize(tmp1,A->m); MEM_STAT_REG(tmp1,TYPE_VEC); for ( k=0; kve[k],tmp1,&A->me[k][k]); */ hhvec(tmp1,k,&beta,tmp1,&A->me[k][k]); diag->ve[k] = tmp1->ve[k]; /* apply H/holder vector to remaining columns */ /* hhtrcols(A,k,k+1,tmp1,beta->ve[k]); */ hhtrcols(A,k,k+1,tmp1,beta); } return (A); } /* QRCPfactor -- forms the QR factorisation of A with column pivoting -- factorisation stored in compact form as described above ( not quite standard format ) */ /* MAT *QRCPfactor(A,diag,beta,px) */ MAT *QRCPfactor(A,diag,px) MAT *A; VEC *diag /* , *beta */; PERM *px; { u_int i, i_max, j, k, limit; static VEC *gamma=VNULL, *tmp1=VNULL, *tmp2=VNULL; Real beta, maxgamma, sum, tmp; if ( ! A || ! diag || ! px ) error(E_NULL,"QRCPfactor"); limit = min(A->m,A->n); if ( diag->dim < limit || px->size != A->n ) error(E_SIZES,"QRCPfactor"); tmp1 = v_resize(tmp1,A->m); tmp2 = v_resize(tmp2,A->m); gamma = v_resize(gamma,A->n); MEM_STAT_REG(tmp1,TYPE_VEC); MEM_STAT_REG(tmp2,TYPE_VEC); MEM_STAT_REG(gamma,TYPE_VEC); /* initialise gamma and px */ for ( j=0; jn; j++ ) { px->pe[j] = j; sum = 0.0; for ( i=0; im; i++ ) sum += square(A->me[i][j]); gamma->ve[j] = sum; } for ( k=0; kve[k]; for ( i=k+1; in; i++ ) /* Loop invariant:maxgamma=gamma[i_max] >=gamma[l];l=k,...,i-1 */ if ( gamma->ve[i] > maxgamma ) { maxgamma = gamma->ve[i]; i_max = i; } /* swap columns if necessary */ if ( i_max != k ) { /* swap gamma values */ tmp = gamma->ve[k]; gamma->ve[k] = gamma->ve[i_max]; gamma->ve[i_max] = tmp; /* update column permutation */ px_transp(px,k,i_max); /* swap columns of A */ for ( i=0; im; i++ ) { tmp = A->me[i][k]; A->me[i][k] = A->me[i][i_max]; A->me[i][i_max] = tmp; } } /* get H/holder vector for the k-th column */ get_col(A,k,tmp1); /* hhvec(tmp1,k,&beta->ve[k],tmp1,&A->me[k][k]); */ hhvec(tmp1,k,&beta,tmp1,&A->me[k][k]); diag->ve[k] = tmp1->ve[k]; /* apply H/holder vector to remaining columns */ /* hhtrcols(A,k,k+1,tmp1,beta->ve[k]); */ hhtrcols(A,k,k+1,tmp1,beta); /* update gamma values */ for ( j=k+1; jn; j++ ) gamma->ve[j] -= square(A->me[k][j]); } return (A); } /* Qsolve -- solves Qx = b, Q is an orthogonal matrix stored in compact form a la QRfactor() -- may be in-situ */ /* VEC *_Qsolve(QR,diag,beta,b,x,tmp) */ VEC *_Qsolve(QR,diag,b,x,tmp) MAT *QR; VEC *diag /* ,*beta */ , *b, *x, *tmp; { u_int dynamic; int k, limit; Real beta, r_ii, tmp_val; limit = min(QR->m,QR->n); dynamic = FALSE; if ( ! QR || ! diag || ! b ) error(E_NULL,"_Qsolve"); if ( diag->dim < limit || b->dim != QR->m ) error(E_SIZES,"_Qsolve"); x = v_resize(x,QR->m); if ( tmp == VNULL ) dynamic = TRUE; tmp = v_resize(tmp,QR->m); /* apply H/holder transforms in normal order */ x = v_copy(b,x); for ( k = 0 ; k < limit ; k++ ) { get_col(QR,k,tmp); r_ii = fabs(tmp->ve[k]); tmp->ve[k] = diag->ve[k]; tmp_val = (r_ii*fabs(diag->ve[k])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; /* hhtrvec(tmp,beta->ve[k],k,x,x); */ hhtrvec(tmp,beta,k,x,x); } if ( dynamic ) V_FREE(tmp); return (x); } /* makeQ -- constructs orthogonal matrix from Householder vectors stored in compact QR form */ /* MAT *makeQ(QR,diag,beta,Qout) */ MAT *makeQ(QR,diag,Qout) MAT *QR,*Qout; VEC *diag /* , *beta */; { static VEC *tmp1=VNULL,*tmp2=VNULL; u_int i, limit; Real beta, r_ii, tmp_val; int j; limit = min(QR->m,QR->n); if ( ! QR || ! diag ) error(E_NULL,"makeQ"); if ( diag->dim < limit ) error(E_SIZES,"makeQ"); if ( Qout==(MAT *)NULL || Qout->m < QR->m || Qout->n < QR->m ) Qout = m_get(QR->m,QR->m); tmp1 = v_resize(tmp1,QR->m); /* contains basis vec & columns of Q */ tmp2 = v_resize(tmp2,QR->m); /* contains H/holder vectors */ MEM_STAT_REG(tmp1,TYPE_VEC); MEM_STAT_REG(tmp2,TYPE_VEC); for ( i=0; im ; i++ ) { /* get i-th column of Q */ /* set up tmp1 as i-th basis vector */ for ( j=0; jm ; j++ ) tmp1->ve[j] = 0.0; tmp1->ve[i] = 1.0; /* apply H/h transforms in reverse order */ for ( j=limit-1; j>=0; j-- ) { get_col(QR,j,tmp2); r_ii = fabs(tmp2->ve[j]); tmp2->ve[j] = diag->ve[j]; tmp_val = (r_ii*fabs(diag->ve[j])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; /* hhtrvec(tmp2,beta->ve[j],j,tmp1,tmp1); */ hhtrvec(tmp2,beta,j,tmp1,tmp1); } /* insert into Q */ set_col(Qout,i,tmp1); } return (Qout); } /* makeR -- constructs upper triangular matrix from QR (compact form) -- may be in-situ (all it does is zero the lower 1/2) */ MAT *makeR(QR,Rout) MAT *QR,*Rout; { u_int i,j; if ( QR==(MAT *)NULL ) error(E_NULL,"makeR"); Rout = m_copy(QR,Rout); for ( i=1; im; i++ ) for ( j=0; jn && jme[i][j] = 0.0; return (Rout); } /* QRsolve -- solves the system Q.R.x=b where Q & R are stored in compact form -- returns x, which is created if necessary */ /* VEC *QRsolve(QR,diag,beta,b,x) */ VEC *QRsolve(QR,diag,b,x) MAT *QR; VEC *diag /* , *beta */ , *b, *x; { int limit; static VEC *tmp = VNULL; if ( ! QR || ! diag || ! b ) error(E_NULL,"QRsolve"); limit = min(QR->m,QR->n); if ( diag->dim < limit || b->dim != QR->m ) error(E_SIZES,"QRsolve"); tmp = v_resize(tmp,limit); MEM_STAT_REG(tmp,TYPE_VEC); x = v_resize(x,QR->n); _Qsolve(QR,diag,b,x,tmp); x = Usolve(QR,x,x,0.0); v_resize(x,QR->n); return x; } /* QRCPsolve -- solves A.x = b where A is factored by QRCPfactor() -- assumes that A is in the compact factored form */ /* VEC *QRCPsolve(QR,diag,beta,pivot,b,x) */ VEC *QRCPsolve(QR,diag,pivot,b,x) MAT *QR; VEC *diag /* , *beta */; PERM *pivot; VEC *b, *x; { static VEC *tmp=VNULL; if ( ! QR || ! diag || ! pivot || ! b ) error(E_NULL,"QRCPsolve"); if ( (QR->m > diag->dim &&QR->n > diag->dim) || QR->n != pivot->size ) error(E_SIZES,"QRCPsolve"); tmp = QRsolve(QR,diag /* , beta */ ,b,tmp); MEM_STAT_REG(tmp,TYPE_VEC); x = pxinv_vec(pivot,tmp,x); return x; } /* Umlt -- compute out = upper_triang(U).x -- may be in situ */ static VEC *Umlt(U,x,out) MAT *U; VEC *x, *out; { int i, limit; if ( U == MNULL || x == VNULL ) error(E_NULL,"Umlt"); limit = min(U->m,U->n); if ( limit != x->dim ) error(E_SIZES,"Umlt"); if ( out == VNULL || out->dim < limit ) out = v_resize(out,limit); for ( i = 0; i < limit; i++ ) out->ve[i] = __ip__(&(x->ve[i]),&(U->me[i][i]),limit - i); return out; } /* UTmlt -- returns out = upper_triang(U)^T.x */ static VEC *UTmlt(U,x,out) MAT *U; VEC *x, *out; { Real sum; int i, j, limit; if ( U == MNULL || x == VNULL ) error(E_NULL,"UTmlt"); limit = min(U->m,U->n); if ( out == VNULL || out->dim < limit ) out = v_resize(out,limit); for ( i = limit-1; i >= 0; i-- ) { sum = 0.0; for ( j = 0; j <= i; j++ ) sum += U->me[j][i]*x->ve[j]; out->ve[i] = sum; } return out; } /* QRTsolve -- solve A^T.sc = c where the QR factors of A are stored in compact form -- returns sc -- original due to Mike Osborne modified Wed 09th Dec 1992 */ VEC *QRTsolve(A,diag,c,sc) MAT *A; VEC *diag, *c, *sc; { int i, j, k, n, p; Real beta, r_ii, s, tmp_val; if ( ! A || ! diag || ! c ) error(E_NULL,"QRTsolve"); if ( diag->dim < min(A->m,A->n) ) error(E_SIZES,"QRTsolve"); sc = v_resize(sc,A->m); n = sc->dim; p = c->dim; if ( n == p ) k = p-2; else k = p-1; v_zero(sc); sc->ve[0] = c->ve[0]/A->me[0][0]; if ( n == 1) return sc; if ( p > 1) { for ( i = 1; i < p; i++ ) { s = 0.0; for ( j = 0; j < i; j++ ) s += A->me[j][i]*sc->ve[j]; if ( A->me[i][i] == 0.0 ) error(E_SING,"QRTsolve"); sc->ve[i]=(c->ve[i]-s)/A->me[i][i]; } } for (i = k; i >= 0; i--) { s = diag->ve[i]*sc->ve[i]; for ( j = i+1; j < n; j++ ) s += A->me[j][i]*sc->ve[j]; r_ii = fabs(A->me[i][i]); tmp_val = (r_ii*fabs(diag->ve[i])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; tmp_val = beta*s; sc->ve[i] -= tmp_val*diag->ve[i]; for ( j = i+1; j < n; j++ ) sc->ve[j] -= tmp_val*A->me[j][i]; } return sc; } /* QRcondest -- returns an estimate of the 2-norm condition number of the matrix factorised by QRfactor() or QRCPfactor() -- note that as Q does not affect the 2-norm condition number, it is not necessary to pass the diag, beta (or pivot) vectors -- generates a lower bound on the true condition number -- if the matrix is exactly singular, HUGE is returned -- note that QRcondest() is likely to be more reliable for matrices factored using QRCPfactor() */ double QRcondest(QR) MAT *QR; { static VEC *y=VNULL; Real norm1, norm2, sum, tmp1, tmp2; int i, j, limit; if ( QR == MNULL ) error(E_NULL,"QRcondest"); limit = min(QR->m,QR->n); for ( i = 0; i < limit; i++ ) if ( QR->me[i][i] == 0.0 ) return HUGE; y = v_resize(y,limit); MEM_STAT_REG(y,TYPE_VEC); /* use the trick for getting a unit vector y with ||R.y||_inf small from the LU condition estimator */ for ( i = 0; i < limit; i++ ) { sum = 0.0; for ( j = 0; j < i; j++ ) sum -= QR->me[j][i]*y->ve[j]; sum -= (sum < 0.0) ? 1.0 : -1.0; y->ve[i] = sum / QR->me[i][i]; } UTmlt(QR,y,y); /* now apply inverse power method to R^T.R */ for ( i = 0; i < 3; i++ ) { tmp1 = v_norm2(y); sv_mlt(1/tmp1,y,y); UTsolve(QR,y,y,0.0); tmp2 = v_norm2(y); sv_mlt(1/v_norm2(y),y,y); Usolve(QR,y,y,0.0); } /* now compute approximation for ||R^{-1}||_2 */ norm1 = sqrt(tmp1)*sqrt(tmp2); /* now use complementary approach to compute approximation to ||R||_2 */ for ( i = limit-1; i >= 0; i-- ) { sum = 0.0; for ( j = i+1; j < limit; j++ ) sum += QR->me[i][j]*y->ve[j]; y->ve[i] = (sum >= 0.0) ? 1.0 : -1.0; y->ve[i] = (QR->me[i][i] >= 0.0) ? y->ve[i] : - y->ve[i]; } /* now apply power method to R^T.R */ for ( i = 0; i < 3; i++ ) { tmp1 = v_norm2(y); sv_mlt(1/tmp1,y,y); Umlt(QR,y,y); tmp2 = v_norm2(y); sv_mlt(1/tmp2,y,y); UTmlt(QR,y,y); } norm2 = sqrt(tmp1)*sqrt(tmp2); /* printf("QRcondest: norm1 = %g, norm2 = %g\n",norm1,norm2); */ return norm1*norm2; } neuron-7.5/src/mesch/schur.c000077500000000000000000000440351323325274500160700ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for computing the Schur decomposition of a real non-symmetric matrix See also: hessen.c */ #include #include "matrix.h" #include "matrix2.h" #include static char rcsid[] = "schur.c,v 1.1 1997/12/04 17:55:46 hines Exp"; #ifndef ANSI_C static void hhldr3(x,y,z,nu1,beta,newval) double x, y, z; Real *nu1, *beta, *newval; #else static void hhldr3(double x, double y, double z, Real *nu1, Real *beta, Real *newval) #endif { Real alpha; if ( x >= 0.0 ) alpha = sqrt(x*x+y*y+z*z); else alpha = -sqrt(x*x+y*y+z*z); *nu1 = x + alpha; *beta = 1.0/(alpha*(*nu1)); *newval = alpha; } #ifndef ANSI_C static void hhldr3cols(A,k,j0,beta,nu1,nu2,nu3) MAT *A; int k, j0; double beta, nu1, nu2, nu3; #else static void hhldr3cols(MAT *A, int k, int j0, double beta, double nu1, double nu2, double nu3) #endif { Real **A_me, ip, prod; int j, n; if ( k < 0 || k+3 > A->m || j0 < 0 ) error(E_BOUNDS,"hhldr3cols"); A_me = A->me; n = A->n; /* printf("hhldr3cols:(l.%d) j0 = %d, k = %d, A at 0x%lx, m = %d, n = %d\n", __LINE__, j0, k, (long)A, A->m, A->n); */ /* printf("hhldr3cols: A (dumped) =\n"); m_dump(stdout,A); */ for ( j = j0; j < n; j++ ) { /***** ip = nu1*A_me[k][j] + nu2*A_me[k+1][j] + nu3*A_me[k+2][j]; prod = ip*beta; A_me[k][j] -= prod*nu1; A_me[k+1][j] -= prod*nu2; A_me[k+2][j] -= prod*nu3; *****/ /* printf("hhldr3cols: j = %d\n", j); */ ip = nu1*m_entry(A,k,j)+nu2*m_entry(A,k+1,j)+nu3*m_entry(A,k+2,j); prod = ip*beta; /***** m_set_val(A,k ,j,m_entry(A,k ,j) - prod*nu1); m_set_val(A,k+1,j,m_entry(A,k+1,j) - prod*nu2); m_set_val(A,k+2,j,m_entry(A,k+2,j) - prod*nu3); *****/ m_add_val(A,k ,j,-prod*nu1); m_add_val(A,k+1,j,-prod*nu2); m_add_val(A,k+2,j,-prod*nu3); } /* printf("hhldr3cols:(l.%d) j0 = %d, k = %d, m = %d, n = %d\n", __LINE__, j0, k, A->m, A->n); */ /* putc('\n',stdout); */ } #ifndef ANSI_C static void hhldr3rows(A,k,i0,beta,nu1,nu2,nu3) MAT *A; int k, i0; double beta, nu1, nu2, nu3; #else static void hhldr3rows(MAT *A, int k, int i0, double beta, double nu1, double nu2, double nu3) #endif { Real **A_me, ip, prod; int i, m; /* printf("hhldr3rows:(l.%d) A at 0x%lx\n", __LINE__, (long)A); */ /* printf("hhldr3rows: k = %d\n", k); */ if ( k < 0 || k+3 > A->n ) error(E_BOUNDS,"hhldr3rows"); A_me = A->me; m = A->m; i0 = min(i0,m-1); for ( i = 0; i <= i0; i++ ) { /**** ip = nu1*A_me[i][k] + nu2*A_me[i][k+1] + nu3*A_me[i][k+2]; prod = ip*beta; A_me[i][k] -= prod*nu1; A_me[i][k+1] -= prod*nu2; A_me[i][k+2] -= prod*nu3; ****/ ip = nu1*m_entry(A,i,k)+nu2*m_entry(A,i,k+1)+nu3*m_entry(A,i,k+2); prod = ip*beta; m_add_val(A,i,k , - prod*nu1); m_add_val(A,i,k+1, - prod*nu2); m_add_val(A,i,k+2, - prod*nu3); } } /* schur -- computes the Schur decomposition of the matrix A in situ -- optionally, gives Q matrix such that Q^T.A.Q is upper triangular -- returns upper triangular Schur matrix */ MAT *schur(A,Q) MAT *A, *Q; { int i, j, iter, k, k_min, k_max, k_tmp, n, split; Real beta2, c, discrim, dummy, nu1, s, t, tmp, x, y, z; Real **A_me; Real sqrt_macheps; static VEC *diag=VNULL, *beta=VNULL; if ( ! A ) error(E_NULL,"schur"); if ( A->m != A->n || ( Q && Q->m != Q->n ) ) error(E_SQUARE,"schur"); if ( Q != MNULL && Q->m != A->m ) error(E_SIZES,"schur"); n = A->n; diag = v_resize(diag,A->n); beta = v_resize(beta,A->n); MEM_STAT_REG(diag,TYPE_VEC); MEM_STAT_REG(beta,TYPE_VEC); /* compute Hessenberg form */ Hfactor(A,diag,beta); /* save Q if necessary */ if ( Q ) Q = makeHQ(A,diag,beta,Q); makeH(A,A); sqrt_macheps = sqrt(MACHEPS); k_min = 0; A_me = A->me; while ( k_min < n ) { Real a00, a01, a10, a11; double scale, t, numer, denom; /* find k_max to suit: submatrix k_min..k_max should be irreducible */ k_max = n-1; for ( k = k_min; k < k_max; k++ ) /* if ( A_me[k+1][k] == 0.0 ) */ if ( m_entry(A,k+1,k) == 0.0 ) { k_max = k; break; } if ( k_max <= k_min ) { k_min = k_max + 1; continue; /* outer loop */ } /* check to see if we have a 2 x 2 block with complex eigenvalues */ if ( k_max == k_min + 1 ) { /* tmp = A_me[k_min][k_min] - A_me[k_max][k_max]; */ a00 = m_entry(A,k_min,k_min); a01 = m_entry(A,k_min,k_max); a10 = m_entry(A,k_max,k_min); a11 = m_entry(A,k_max,k_max); tmp = a00 - a11; /* discrim = tmp*tmp + 4*A_me[k_min][k_max]*A_me[k_max][k_min]; */ discrim = tmp*tmp + 4*a01*a10; if ( discrim < 0.0 ) { /* yes -- e-vals are complex -- put 2 x 2 block in form [a b; c a]; then eigenvalues have real part a & imag part sqrt(|bc|) */ numer = - tmp; denom = ( a01+a10 >= 0.0 ) ? (a01+a10) + sqrt((a01+a10)*(a01+a10)+tmp*tmp) : (a01+a10) - sqrt((a01+a10)*(a01+a10)+tmp*tmp); if ( denom != 0.0 ) { /* t = s/c = numer/denom */ t = numer/denom; scale = c = 1.0/sqrt(1+t*t); s = c*t; } else { c = 1.0; s = 0.0; } rot_cols(A,k_min,k_max,c,s,A); rot_rows(A,k_min,k_max,c,s,A); if ( Q != MNULL ) rot_cols(Q,k_min,k_max,c,s,Q); k_min = k_max + 1; continue; } else /* discrim >= 0; i.e. block has two real eigenvalues */ { /* no -- e-vals are not complex; split 2 x 2 block and continue */ /* s/c = numer/denom */ numer = ( tmp >= 0.0 ) ? - tmp - sqrt(discrim) : - tmp + sqrt(discrim); denom = 2*a01; if ( fabs(numer) < fabs(denom) ) { /* t = s/c = numer/denom */ t = numer/denom; scale = c = 1.0/sqrt(1+t*t); s = c*t; } else if ( numer != 0.0 ) { /* t = c/s = denom/numer */ t = denom/numer; scale = 1.0/sqrt(1+t*t); c = fabs(t)*scale; s = ( t >= 0.0 ) ? scale : -scale; } else /* numer == denom == 0 */ { c = 0.0; s = 1.0; } rot_cols(A,k_min,k_max,c,s,A); rot_rows(A,k_min,k_max,c,s,A); /* A->me[k_max][k_min] = 0.0; */ if ( Q != MNULL ) rot_cols(Q,k_min,k_max,c,s,Q); k_min = k_max + 1; /* go to next block */ continue; } } /* now have r x r block with r >= 2: apply Francis QR step until block splits */ split = FALSE; iter = 0; while ( ! split ) { iter++; /* set up Wilkinson/Francis complex shift */ k_tmp = k_max - 1; a00 = m_entry(A,k_tmp,k_tmp); a01 = m_entry(A,k_tmp,k_max); a10 = m_entry(A,k_max,k_tmp); a11 = m_entry(A,k_max,k_max); /* treat degenerate cases differently -- if there are still no splits after five iterations and the bottom 2 x 2 looks degenerate, force it to split */ if ( iter >= 5 && fabs(a00-a11) < sqrt_macheps*(fabs(a00)+fabs(a11)) && (fabs(a01) < sqrt_macheps*(fabs(a00)+fabs(a11)) || fabs(a10) < sqrt_macheps*(fabs(a00)+fabs(a11))) ) { if ( fabs(a01) < sqrt_macheps*(fabs(a00)+fabs(a11)) ) m_set_val(A,k_tmp,k_max,0.0); if ( fabs(a10) < sqrt_macheps*(fabs(a00)+fabs(a11)) ) { m_set_val(A,k_max,k_tmp,0.0); split = TRUE; continue; } } s = a00 + a11; t = a00*a11 - a01*a10; /* break loop if a 2 x 2 complex block */ if ( k_max == k_min + 1 && s*s < 4.0*t ) { split = TRUE; continue; } /* perturb shift if convergence is slow */ if ( (iter % 10) == 0 ) { s += iter*0.02; t += iter*0.02; } /* set up Householder transformations */ k_tmp = k_min + 1; /******************** x = A_me[k_min][k_min]*A_me[k_min][k_min] + A_me[k_min][k_tmp]*A_me[k_tmp][k_min] - s*A_me[k_min][k_min] + t; y = A_me[k_tmp][k_min]* (A_me[k_min][k_min]+A_me[k_tmp][k_tmp]-s); if ( k_min + 2 <= k_max ) z = A_me[k_tmp][k_min]*A_me[k_min+2][k_tmp]; else z = 0.0; ********************/ a00 = m_entry(A,k_min,k_min); a01 = m_entry(A,k_min,k_tmp); a10 = m_entry(A,k_tmp,k_min); a11 = m_entry(A,k_tmp,k_tmp); /******************** a00 = A->me[k_min][k_min]; a01 = A->me[k_min][k_tmp]; a10 = A->me[k_tmp][k_min]; a11 = A->me[k_tmp][k_tmp]; ********************/ x = a00*a00 + a01*a10 - s*a00 + t; y = a10*(a00+a11-s); if ( k_min + 2 <= k_max ) z = a10* /* m_entry(A,k_min+2,k_tmp) */ A->me[k_min+2][k_tmp]; else z = 0.0; for ( k = k_min; k <= k_max-1; k++ ) { if ( k < k_max - 1 ) { hhldr3(x,y,z,&nu1,&beta2,&dummy); tracecatch(hhldr3cols(A,k,max(k-1,0), beta2,nu1,y,z),"schur"); tracecatch(hhldr3rows(A,k,min(n-1,k+3),beta2,nu1,y,z),"schur"); if ( Q != MNULL ) hhldr3rows(Q,k,n-1,beta2,nu1,y,z); } else { givens(x,y,&c,&s); rot_cols(A,k,k+1,c,s,A); rot_rows(A,k,k+1,c,s,A); if ( Q ) rot_cols(Q,k,k+1,c,s,Q); } /* if ( k >= 2 ) m_set_val(A,k,k-2,0.0); */ /* x = A_me[k+1][k]; */ x = m_entry(A,k+1,k); if ( k <= k_max - 2 ) /* y = A_me[k+2][k];*/ y = m_entry(A,k+2,k); else y = 0.0; if ( k <= k_max - 3 ) /* z = A_me[k+3][k]; */ z = m_entry(A,k+3,k); else z = 0.0; } /* if ( k_min > 0 ) m_set_val(A,k_min,k_min-1,0.0); if ( k_max < n - 1 ) m_set_val(A,k_max+1,k_max,0.0); */ for ( k = k_min; k <= k_max-2; k++ ) { /* zero appropriate sub-diagonals */ m_set_val(A,k+2,k,0.0); if ( k < k_max-2 ) m_set_val(A,k+3,k,0.0); } /* test to see if matrix should split */ for ( k = k_min; k < k_max; k++ ) if ( fabs(A_me[k+1][k]) < MACHEPS* (fabs(A_me[k][k])+fabs(A_me[k+1][k+1])) ) { A_me[k+1][k] = 0.0; split = TRUE; } } } /* polish up A by zeroing strictly lower triangular elements and small sub-diagonal elements */ for ( i = 0; i < A->m; i++ ) for ( j = 0; j < i-1; j++ ) A_me[i][j] = 0.0; for ( i = 0; i < A->m - 1; i++ ) if ( fabs(A_me[i+1][i]) < MACHEPS* (fabs(A_me[i][i])+fabs(A_me[i+1][i+1])) ) A_me[i+1][i] = 0.0; return A; } /* schur_vals -- compute real & imaginary parts of eigenvalues -- assumes T contains a block upper triangular matrix as produced by schur() -- real parts stored in real_pt, imaginary parts in imag_pt */ void schur_evals(T,real_pt,imag_pt) MAT *T; VEC *real_pt, *imag_pt; { int i, n; Real discrim, **T_me; Real diff, sum, tmp; if ( ! T || ! real_pt || ! imag_pt ) error(E_NULL,"schur_evals"); if ( T->m != T->n ) error(E_SQUARE,"schur_evals"); n = T->n; T_me = T->me; real_pt = v_resize(real_pt,(u_int)n); imag_pt = v_resize(imag_pt,(u_int)n); i = 0; while ( i < n ) { if ( i < n-1 && T_me[i+1][i] != 0.0 ) { /* should be a complex eigenvalue */ sum = 0.5*(T_me[i][i]+T_me[i+1][i+1]); diff = 0.5*(T_me[i][i]-T_me[i+1][i+1]); discrim = diff*diff + T_me[i][i+1]*T_me[i+1][i]; if ( discrim < 0.0 ) { /* yes -- complex e-vals */ real_pt->ve[i] = real_pt->ve[i+1] = sum; imag_pt->ve[i] = sqrt(-discrim); imag_pt->ve[i+1] = - imag_pt->ve[i]; } else { /* no -- actually both real */ tmp = sqrt(discrim); real_pt->ve[i] = sum + tmp; real_pt->ve[i+1] = sum - tmp; imag_pt->ve[i] = imag_pt->ve[i+1] = 0.0; } i += 2; } else { /* real eigenvalue */ real_pt->ve[i] = T_me[i][i]; imag_pt->ve[i] = 0.0; i++; } } } /* schur_vecs -- returns eigenvectors computed from the real Schur decomposition of a matrix -- T is the block upper triangular Schur matrix -- Q is the orthognal matrix where A = Q.T.Q^T -- if Q is null, the eigenvectors of T are returned -- X_re is the real part of the matrix of eigenvectors, and X_im is the imaginary part of the matrix. -- X_re is returned */ MAT *schur_vecs(T,Q,X_re,X_im) MAT *T, *Q, *X_re, *X_im; { int i, j, limit; Real t11_re, t11_im, t12, t21, t22_re, t22_im; Real l_re, l_im, det_re, det_im, invdet_re, invdet_im, val1_re, val1_im, val2_re, val2_im, tmp_val1_re, tmp_val1_im, tmp_val2_re, tmp_val2_im, **T_me; Real sum, diff, discrim, magdet, norm, scale; static VEC *tmp1_re=VNULL, *tmp1_im=VNULL, *tmp2_re=VNULL, *tmp2_im=VNULL; if ( ! T || ! X_re ) error(E_NULL,"schur_vecs"); if ( T->m != T->n || X_re->m != X_re->n || ( Q != MNULL && Q->m != Q->n ) || ( X_im != MNULL && X_im->m != X_im->n ) ) error(E_SQUARE,"schur_vecs"); if ( T->m != X_re->m || ( Q != MNULL && T->m != Q->m ) || ( X_im != MNULL && T->m != X_im->m ) ) error(E_SIZES,"schur_vecs"); tmp1_re = v_resize(tmp1_re,T->m); tmp1_im = v_resize(tmp1_im,T->m); tmp2_re = v_resize(tmp2_re,T->m); tmp2_im = v_resize(tmp2_im,T->m); MEM_STAT_REG(tmp1_re,TYPE_VEC); MEM_STAT_REG(tmp1_im,TYPE_VEC); MEM_STAT_REG(tmp2_re,TYPE_VEC); MEM_STAT_REG(tmp2_im,TYPE_VEC); T_me = T->me; i = 0; while ( i < T->m ) { if ( i+1 < T->m && T->me[i+1][i] != 0.0 ) { /* complex eigenvalue */ sum = 0.5*(T_me[i][i]+T_me[i+1][i+1]); diff = 0.5*(T_me[i][i]-T_me[i+1][i+1]); discrim = diff*diff + T_me[i][i+1]*T_me[i+1][i]; l_re = l_im = 0.0; if ( discrim < 0.0 ) { /* yes -- complex e-vals */ l_re = sum; l_im = sqrt(-discrim); } else /* not correct Real Schur form */ error(E_RANGE,"schur_vecs"); } else { l_re = T_me[i][i]; l_im = 0.0; } v_zero(tmp1_im); v_rand(tmp1_re); sv_mlt(MACHEPS,tmp1_re,tmp1_re); /* solve (T-l.I)x = tmp1 */ limit = ( l_im != 0.0 ) ? i+1 : i; /* printf("limit = %d\n",limit); */ for ( j = limit+1; j < T->m; j++ ) tmp1_re->ve[j] = 0.0; j = limit; while ( j >= 0 ) { if ( j > 0 && T->me[j][j-1] != 0.0 ) { /* 2 x 2 diagonal block */ /* printf("checkpoint A\n"); */ val1_re = tmp1_re->ve[j-1] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j-1][j+1]),limit-j); /* printf("checkpoint B\n"); */ val1_im = tmp1_im->ve[j-1] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j-1][j+1]),limit-j); /* printf("checkpoint C\n"); */ val2_re = tmp1_re->ve[j] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint D\n"); */ val2_im = tmp1_im->ve[j] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint E\n"); */ t11_re = T_me[j-1][j-1] - l_re; t11_im = - l_im; t22_re = T_me[j][j] - l_re; t22_im = - l_im; t12 = T_me[j-1][j]; t21 = T_me[j][j-1]; scale = fabs(T_me[j-1][j-1]) + fabs(T_me[j][j]) + fabs(t12) + fabs(t21) + fabs(l_re) + fabs(l_im); det_re = t11_re*t22_re - t11_im*t22_im - t12*t21; det_im = t11_re*t22_im + t11_im*t22_re; magdet = det_re*det_re+det_im*det_im; if ( sqrt(magdet) < MACHEPS*scale ) { det_re = MACHEPS*scale; magdet = det_re*det_re+det_im*det_im; } invdet_re = det_re/magdet; invdet_im = - det_im/magdet; tmp_val1_re = t22_re*val1_re-t22_im*val1_im-t12*val2_re; tmp_val1_im = t22_im*val1_re+t22_re*val1_im-t12*val2_im; tmp_val2_re = t11_re*val2_re-t11_im*val2_im-t21*val1_re; tmp_val2_im = t11_im*val2_re+t11_re*val2_im-t21*val1_im; tmp1_re->ve[j-1] = invdet_re*tmp_val1_re - invdet_im*tmp_val1_im; tmp1_im->ve[j-1] = invdet_im*tmp_val1_re + invdet_re*tmp_val1_im; tmp1_re->ve[j] = invdet_re*tmp_val2_re - invdet_im*tmp_val2_im; tmp1_im->ve[j] = invdet_im*tmp_val2_re + invdet_re*tmp_val2_im; j -= 2; } else { t11_re = T_me[j][j] - l_re; t11_im = - l_im; magdet = t11_re*t11_re + t11_im*t11_im; scale = fabs(T_me[j][j]) + fabs(l_re); if ( sqrt(magdet) < MACHEPS*scale ) { t11_re = MACHEPS*scale; magdet = t11_re*t11_re + t11_im*t11_im; } invdet_re = t11_re/magdet; invdet_im = - t11_im/magdet; /* printf("checkpoint F\n"); */ val1_re = tmp1_re->ve[j] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint G\n"); */ val1_im = tmp1_im->ve[j] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint H\n"); */ tmp1_re->ve[j] = invdet_re*val1_re - invdet_im*val1_im; tmp1_im->ve[j] = invdet_im*val1_re + invdet_re*val1_im; j -= 1; } } norm = v_norm_inf(tmp1_re) + v_norm_inf(tmp1_im); sv_mlt(1/norm,tmp1_re,tmp1_re); if ( l_im != 0.0 ) sv_mlt(1/norm,tmp1_im,tmp1_im); mv_mlt(Q,tmp1_re,tmp2_re); if ( l_im != 0.0 ) mv_mlt(Q,tmp1_im,tmp2_im); if ( l_im != 0.0 ) norm = sqrt(in_prod(tmp2_re,tmp2_re)+in_prod(tmp2_im,tmp2_im)); else norm = v_norm2(tmp2_re); sv_mlt(1/norm,tmp2_re,tmp2_re); if ( l_im != 0.0 ) sv_mlt(1/norm,tmp2_im,tmp2_im); if ( l_im != 0.0 ) { if ( ! X_im ) error(E_NULL,"schur_vecs"); set_col(X_re,i,tmp2_re); set_col(X_im,i,tmp2_im); sv_mlt(-1.0,tmp2_im,tmp2_im); set_col(X_re,i+1,tmp2_re); set_col(X_im,i+1,tmp2_im); i += 2; } else { set_col(X_re,i,tmp2_re); if ( X_im != MNULL ) set_col(X_im,i,tmp1_im); /* zero vector */ i += 1; } } return X_re; } neuron-7.5/src/mesch/solve.c000077500000000000000000000152711323325274500160740ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. */ /* solve.c 1.2 11/25/87 */ static char rcsid[] = "solve.c,v 1.1 1997/12/04 17:55:47 hines Exp"; #include #include "matrix2.h" #include /* Most matrix factorisation routines are in-situ unless otherwise specified */ /* Usolve -- back substitution with optional over-riding diagonal -- can be in-situ but doesn't need to be */ VEC *Usolve(matrix,b,out,diag) MAT *matrix; VEC *b, *out; double diag; { u_int dim /* , j */; int i, i_lim; Real **mat_ent, *mat_row, *b_ent, *out_ent, *out_col, sum, tiny; if ( matrix==(MAT *)NULL || b==(VEC *)NULL ) error(E_NULL,"Usolve"); dim = min(matrix->m,matrix->n); if ( b->dim < dim ) error(E_SIZES,"Usolve"); if ( out==(VEC *)NULL || out->dim < dim ) out = v_resize(out,matrix->n); mat_ent = matrix->me; b_ent = b->ve; out_ent = out->ve; tiny = 10.0/HUGE_VAL; for ( i=dim-1; i>=0; i-- ) if ( b_ent[i] != 0.0 ) break; else out_ent[i] = 0.0; i_lim = i; for ( ; i>=0; i-- ) { sum = b_ent[i]; mat_row = &(mat_ent[i][i+1]); out_col = &(out_ent[i+1]); sum -= __ip__(mat_row,out_col,i_lim-i); /****************************************************** for ( j=i+1; j<=i_lim; j++ ) sum -= mat_ent[i][j]*out_ent[j]; sum -= (*mat_row++)*(*out_col++); ******************************************************/ if ( diag==0.0 ) { if ( fabs(mat_ent[i][i]) <= tiny*fabs(sum) ) error(E_SING,"Usolve"); else out_ent[i] = sum/mat_ent[i][i]; } else out_ent[i] = sum/diag; } return (out); } /* Lsolve -- forward elimination with (optional) default diagonal value */ VEC *Lsolve(matrix,b,out,diag) MAT *matrix; VEC *b,*out; double diag; { u_int dim, i, i_lim /* , j */; Real **mat_ent, *mat_row, *b_ent, *out_ent, *out_col, sum, tiny; if ( matrix==(MAT *)NULL || b==(VEC *)NULL ) error(E_NULL,"Lsolve"); dim = min(matrix->m,matrix->n); if ( b->dim < dim ) error(E_SIZES,"Lsolve"); if ( out==(VEC *)NULL || out->dim < dim ) out = v_resize(out,matrix->n); mat_ent = matrix->me; b_ent = b->ve; out_ent = out->ve; for ( i=0; im,U->n); if ( b->dim < dim ) error(E_SIZES,"UTsolve"); out = v_resize(out,U->n); U_me = U->me; b_ve = b->ve; out_ve = out->ve; tiny = 10.0/HUGE_VAL; for ( i=0; idim); MEM_COPY(&(b_ve[i_lim]),&(out_ve[i_lim]),(dim-i_lim)*sizeof(Real)); } if ( diag == 0.0 ) { for ( ; im,A->n); if ( b->dim < dim ) error(E_SIZES,"Dsolve"); x = v_resize(x,A->n); tiny = 10.0/HUGE_VAL; dim = b->dim; for ( i=0; ime[i][i]) <= tiny*fabs(b->ve[i]) ) error(E_SING,"Dsolve"); else x->ve[i] = b->ve[i]/A->me[i][i]; return (x); } /* LTsolve -- back substitution with optional over-riding diagonal using the LOWER triangular part of matrix -- can be in-situ but doesn't need to be */ VEC *LTsolve(L,b,out,diag) MAT *L; VEC *b, *out; double diag; { u_int dim; int i, i_lim; Real **L_me, *b_ve, *out_ve, tmp, invdiag, tiny; if ( ! L || ! b ) error(E_NULL,"LTsolve"); dim = min(L->m,L->n); if ( b->dim < dim ) error(E_SIZES,"LTsolve"); out = v_resize(out,L->n); L_me = L->me; b_ve = b->ve; out_ve = out->ve; tiny = 10.0/HUGE_VAL; for ( i=dim-1; i>=0; i-- ) if ( b_ve[i] != 0.0 ) break; i_lim = i; if ( b != out ) { __zero__(out_ve,out->dim); MEM_COPY(b_ve,out_ve,(i_lim+1)*sizeof(Real)); } if ( diag == 0.0 ) { for ( ; i>=0; i-- ) { tmp = L_me[i][i]; if ( fabs(tmp) <= tiny*fabs(out_ve[i]) ) error(E_SING,"LTsolve"); out_ve[i] /= tmp; __mltadd__(out_ve,L_me[i],-out_ve[i],i); } } else { invdiag = 1.0/diag; for ( ; i>=0; i-- ) { out_ve[i] *= invdiag; __mltadd__(out_ve,L_me[i],-out_ve[i],i); } } return (out); } neuron-7.5/src/mesch/sparse.c000077500000000000000000000563661323325274500162530ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse matrix package See also: sparse.h, matrix.h */ #include #include #include #include "sparse.h" static char rcsid[] = "sparse.c,v 1.1 1997/12/04 17:55:48 hines Exp"; #define MINROWLEN 10 /* sp_get_val -- returns the (i,j) entry of the sparse matrix A */ double sp_get_val(A,i,j) SPMAT *A; int i, j; { SPROW *r; int idx; if ( A == SMNULL ) error(E_NULL,"sp_get_val"); if ( i < 0 || i >= A->m || j < 0 || j >= A->n ) error(E_SIZES,"sp_get_val"); r = A->row+i; idx = sprow_idx(r,j); if ( idx < 0 ) return 0.0; /* else */ return r->elt[idx].val; } /* sp_set_val -- sets the (i,j) entry of the sparse matrix A */ double sp_set_val(A,i,j,val) SPMAT *A; int i, j; double val; { SPROW *r; int idx, idx2, new_len; if ( A == SMNULL ) error(E_NULL,"sp_set_val"); if ( i < 0 || i >= A->m || j < 0 || j >= A->n ) error(E_SIZES,"sp_set_val"); r = A->row+i; idx = sprow_idx(r,j); /* printf("sp_set_val: idx = %d\n",idx); */ if ( idx >= 0 ) { r->elt[idx].val = val; return val; } /* else */ if ( idx < -1 ) { /* Note: this destroys the column & diag access paths */ A->flag_col = A->flag_diag = FALSE; /* shift & insert new value */ idx = -(idx+2); /* this is the intended insertion index */ if ( r->len >= r->maxlen ) { r->len = r->maxlen; new_len = max(2*r->maxlen+1,5); if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,A->row[i].maxlen*sizeof(row_elt), new_len*sizeof(row_elt)); } r->elt = RENEW(r->elt,new_len,row_elt); if ( ! r->elt ) /* can't allocate */ error(E_MEM,"sp_set_val"); r->maxlen = 2*r->maxlen+1; } for ( idx2 = r->len-1; idx2 >= idx; idx2-- ) MEM_COPY((char *)(&(r->elt[idx2])), (char *)(&(r->elt[idx2+1])),sizeof(row_elt)); /************************************************************ if ( idx < r->len ) MEM_COPY((char *)(&(r->elt[idx])),(char *)(&(r->elt[idx+1])), (r->len-idx)*sizeof(row_elt)); ************************************************************/ r->len++; r->elt[idx].col = j; return r->elt[idx].val = val; } /* else -- idx == -1, error in index/matrix! */ return 0.0; } /* sp_mv_mlt -- sparse matrix/dense vector multiply -- result is in out, which is returned unless out==NULL on entry -- if out==NULL on entry then the result vector is created */ VEC *sp_mv_mlt(A,x,out) SPMAT *A; VEC *x, *out; { int i, j_idx, m, n, max_idx; Real sum, *x_ve; SPROW *r; row_elt *elts; if ( ! A || ! x ) error(E_NULL,"sp_mv_mlt"); if ( x->dim != A->n ) error(E_SIZES,"sp_mv_mlt"); if ( ! out || out->dim < A->m ) out = v_resize(out,A->m); if ( out == x ) error(E_INSITU,"sp_mv_mlt"); m = A->m; n = A->n; x_ve = x->ve; for ( i = 0; i < m; i++ ) { sum = 0.0; r = &(A->row[i]); max_idx = r->len; elts = r->elt; for ( j_idx = 0; j_idx < max_idx; j_idx++, elts++ ) sum += elts->val*x_ve[elts->col]; out->ve[i] = sum; } return out; } /* sp_vm_mlt -- sparse matrix/dense vector multiply from left -- result is in out, which is returned unless out==NULL on entry -- if out==NULL on entry then result vector is created & returned */ VEC *sp_vm_mlt(A,x,out) SPMAT *A; VEC *x, *out; { int i, j_idx, m, n, max_idx; Real tmp, *x_ve, *out_ve; SPROW *r; row_elt *elts; if ( ! A || ! x ) error(E_NULL,"sp_vm_mlt"); if ( x->dim != A->m ) error(E_SIZES,"sp_vm_mlt"); if ( ! out || out->dim < A->n ) out = v_resize(out,A->n); if ( out == x ) error(E_INSITU,"sp_vm_mlt"); m = A->m; n = A->n; v_zero(out); x_ve = x->ve; out_ve = out->ve; for ( i = 0; i < m; i++ ) { r = A->row+i; max_idx = r->len; elts = r->elt; tmp = x_ve[i]; for ( j_idx = 0; j_idx < max_idx; j_idx++, elts++ ) out_ve[elts->col] += elts->val*tmp; } return out; } /* sp_get -- get sparse matrix -- len is number of elements available for each row without allocating further memory */ SPMAT *sp_get(m,n,maxlen) int m, n, maxlen; { SPMAT *A; SPROW *rows; int i; if ( m < 0 || n < 0 ) error(E_NEG,"sp_get"); maxlen = max(maxlen,1); A = NEW(SPMAT); if ( ! A ) /* can't allocate */ error(E_MEM,"sp_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,sizeof(SPMAT)); mem_numvar(TYPE_SPMAT,1); } /* fprintf(stderr,"Have SPMAT structure\n"); */ A->row = rows = NEW_A(m,SPROW); if ( ! A->row ) /* can't allocate */ error(E_MEM,"sp_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,m*sizeof(SPROW)); } /* fprintf(stderr,"Have row structure array\n"); */ A->start_row = NEW_A(n,int); A->start_idx = NEW_A(n,int); if ( ! A->start_row || ! A->start_idx ) /* can't allocate */ error(E_MEM,"sp_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,2*n*sizeof(int)); } for ( i = 0; i < n; i++ ) A->start_row[i] = A->start_idx[i] = -1; /* fprintf(stderr,"Have start_row array\n"); */ A->m = A->max_m = m; A->n = A->max_n = n; for ( i = 0; i < m; i++, rows++ ) { rows->elt = NEW_A(maxlen,row_elt); if ( ! rows->elt ) error(E_MEM,"sp_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,maxlen*sizeof(row_elt)); } /* fprintf(stderr,"Have row %d element array\n",i); */ rows->len = 0; rows->maxlen = maxlen; rows->diag = -1; } return A; } /* sp_free -- frees up the memory for a sparse matrix */ int sp_free(A) SPMAT *A; { SPROW *r; int i; if ( ! A ) return -1; if ( A->start_row != (int *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,A->max_n*sizeof(int),0); } free((char *)(A->start_row)); } if ( A->start_idx != (int *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,A->max_n*sizeof(int),0); } free((char *)(A->start_idx)); } if ( ! A->row ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,sizeof(SPMAT),0); mem_numvar(TYPE_SPMAT,-1); } free((char *)A); return 0; } for ( i = 0; i < A->m; i++ ) { r = &(A->row[i]); if ( r->elt != (row_elt *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,A->row[i].maxlen*sizeof(row_elt),0); } free((char *)(r->elt)); } } if (mem_info_is_on()) { if (A->row) mem_bytes(TYPE_SPMAT,A->max_m*sizeof(SPROW),0); mem_bytes(TYPE_SPMAT,sizeof(SPMAT),0); mem_numvar(TYPE_SPMAT,-1); } free((char *)(A->row)); free((char *)A); return 0; } /* sp_copy -- constructs a copy of a given matrix -- note that the max_len fields (etc) are no larger in the copy than necessary -- result is returned */ SPMAT *sp_copy(A) SPMAT *A; { SPMAT *out; SPROW *row1, *row2; int i; if ( A == SMNULL ) error(E_NULL,"sp_copy"); if ( ! (out=NEW(SPMAT)) ) error(E_MEM,"sp_copy"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,sizeof(SPMAT)); mem_numvar(TYPE_SPMAT,1); } out->m = out->max_m = A->m; out->n = out->max_n = A->n; /* set up rows */ if ( ! (out->row=NEW_A(A->m,SPROW)) ) error(E_MEM,"sp_copy"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,A->m*sizeof(SPROW)); } for ( i = 0; i < A->m; i++ ) { row1 = &(A->row[i]); row2 = &(out->row[i]); if ( ! (row2->elt=NEW_A(max(row1->len,3),row_elt)) ) error(E_MEM,"sp_copy"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,max(row1->len,3)*sizeof(row_elt)); } row2->len = row1->len; row2->maxlen = max(row1->len,3); row2->diag = row1->diag; MEM_COPY((char *)(row1->elt),(char *)(row2->elt), row1->len*sizeof(row_elt)); } /* set up start arrays -- for column access */ if ( ! (out->start_idx=NEW_A(A->n,int)) || ! (out->start_row=NEW_A(A->n,int)) ) error(E_MEM,"sp_copy"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,2*A->n*sizeof(int)); } MEM_COPY((char *)(A->start_idx),(char *)(out->start_idx), A->n*sizeof(int)); MEM_COPY((char *)(A->start_row),(char *)(out->start_row), A->n*sizeof(int)); return out; } /* sp_col_access -- set column access path; i.e. nxt_row, nxt_idx fields -- returns A */ SPMAT *sp_col_access(A) SPMAT *A; { int i, j, j_idx, len, m, n; SPROW *row; row_elt *r_elt; int *start_row, *start_idx; if ( A == SMNULL ) error(E_NULL,"sp_col_access"); m = A->m; n = A->n; /* initialise start_row and start_idx */ start_row = A->start_row; start_idx = A->start_idx; for ( j = 0; j < n; j++ ) { *start_row++ = -1; *start_idx++ = -1; } start_row = A->start_row; start_idx = A->start_idx; /* now work UP the rows, setting nxt_row, nxt_idx fields */ for ( i = m-1; i >= 0; i-- ) { row = &(A->row[i]); r_elt = row->elt; len = row->len; for ( j_idx = 0; j_idx < len; j_idx++, r_elt++ ) { j = r_elt->col; r_elt->nxt_row = start_row[j]; r_elt->nxt_idx = start_idx[j]; start_row[j] = i; start_idx[j] = j_idx; } } A->flag_col = TRUE; return A; } /* sp_diag_access -- set diagonal access path(s) */ SPMAT *sp_diag_access(A) SPMAT *A; { int i, m; SPROW *row; if ( A == SMNULL ) error(E_NULL,"sp_diag_access"); m = A->m; row = A->row; for ( i = 0; i < m; i++, row++ ) row->diag = sprow_idx(row,i); A->flag_diag = TRUE; return A; } /* sp_m2dense -- convert a sparse matrix to a dense one */ MAT *sp_m2dense(A,out) SPMAT *A; MAT *out; { int i, j_idx; SPROW *row; row_elt *elt; if ( ! A ) error(E_NULL,"sp_m2dense"); if ( ! out || out->m < A->m || out->n < A->n ) out = m_get(A->m,A->n); m_zero(out); for ( i = 0; i < A->m; i++ ) { row = &(A->row[i]); elt = row->elt; for ( j_idx = 0; j_idx < row->len; j_idx++, elt++ ) out->me[i][elt->col] = elt->val; } return out; } /* C = A+B, can be in situ */ SPMAT *sp_add(A,B,C) SPMAT *A, *B, *C; { int i, in_situ; SPROW *rc; static SPROW *tmp; if ( ! A || ! B ) error(E_NULL,"sp_add"); if ( A->m != B->m || A->n != B->n ) error(E_SIZES,"sp_add"); if (C == A || C == B) in_situ = TRUE; else in_situ = FALSE; if ( ! C ) C = sp_get(A->m,A->n,5); else { if ( C->m != A->m || C->n != A->n ) error(E_SIZES,"sp_add"); if (!in_situ) sp_zero(C); } if (tmp == (SPROW *)NULL && in_situ) { tmp = sprow_get(MINROWLEN); MEM_STAT_REG(tmp,TYPE_SPROW); } if (in_situ) for (i=0; i < A->m; i++) { rc = &(C->row[i]); sprow_add(&(A->row[i]),&(B->row[i]),0,tmp,TYPE_SPROW); sprow_resize(rc,tmp->len,TYPE_SPMAT); MEM_COPY(tmp->elt,rc->elt,tmp->len*sizeof(row_elt)); rc->len = tmp->len; } else for (i=0; i < A->m; i++) { sprow_add(&(A->row[i]),&(B->row[i]),0,&(C->row[i]),TYPE_SPMAT); } C->flag_col = C->flag_diag = FALSE; return C; } /* C = A-B, cannot be in situ */ SPMAT *sp_sub(A,B,C) SPMAT *A, *B, *C; { int i, in_situ; SPROW *rc; static SPROW *tmp; if ( ! A || ! B ) error(E_NULL,"sp_sub"); if ( A->m != B->m || A->n != B->n ) error(E_SIZES,"sp_sub"); if (C == A || C == B) in_situ = TRUE; else in_situ = FALSE; if ( ! C ) C = sp_get(A->m,A->n,5); else { if ( C->m != A->m || C->n != A->n ) error(E_SIZES,"sp_sub"); if (!in_situ) sp_zero(C); } if (tmp == (SPROW *)NULL && in_situ) { tmp = sprow_get(MINROWLEN); MEM_STAT_REG(tmp,TYPE_SPROW); } if (in_situ) for (i=0; i < A->m; i++) { rc = &(C->row[i]); sprow_sub(&(A->row[i]),&(B->row[i]),0,tmp,TYPE_SPROW); sprow_resize(rc,tmp->len,TYPE_SPMAT); MEM_COPY(tmp->elt,rc->elt,tmp->len*sizeof(row_elt)); rc->len = tmp->len; } else for (i=0; i < A->m; i++) { sprow_sub(&(A->row[i]),&(B->row[i]),0,&(C->row[i]),TYPE_SPMAT); } C->flag_col = C->flag_diag = FALSE; return C; } /* C = A+alpha*B, cannot be in situ */ SPMAT *sp_mltadd(A,B,alpha,C) SPMAT *A, *B, *C; double alpha; { int i, in_situ; SPROW *rc; static SPROW *tmp; if ( ! A || ! B ) error(E_NULL,"sp_mltadd"); if ( A->m != B->m || A->n != B->n ) error(E_SIZES,"sp_mltadd"); if (C == A || C == B) in_situ = TRUE; else in_situ = FALSE; if ( ! C ) C = sp_get(A->m,A->n,5); else { if ( C->m != A->m || C->n != A->n ) error(E_SIZES,"sp_mltadd"); if (!in_situ) sp_zero(C); } if (tmp == (SPROW *)NULL && in_situ) { tmp = sprow_get(MINROWLEN); MEM_STAT_REG(tmp,TYPE_SPROW); } if (in_situ) for (i=0; i < A->m; i++) { rc = &(C->row[i]); sprow_mltadd(&(A->row[i]),&(B->row[i]),alpha,0,tmp,TYPE_SPROW); sprow_resize(rc,tmp->len,TYPE_SPMAT); MEM_COPY(tmp->elt,rc->elt,tmp->len*sizeof(row_elt)); rc->len = tmp->len; } else for (i=0; i < A->m; i++) { sprow_mltadd(&(A->row[i]),&(B->row[i]),alpha,0, &(C->row[i]),TYPE_SPMAT); } C->flag_col = C->flag_diag = FALSE; return C; } /* B = alpha*A, can be in situ */ SPMAT *sp_smlt(A,alpha,B) SPMAT *A, *B; double alpha; { int i; if ( ! A ) error(E_NULL,"sp_smlt"); if ( ! B ) B = sp_get(A->m,A->n,5); else if ( A->m != B->m || A->n != B->n ) error(E_SIZES,"sp_smlt"); for (i=0; i < A->m; i++) { sprow_smlt(&(A->row[i]),alpha,0,&(B->row[i]),TYPE_SPMAT); } return B; } /* sp_zero -- zero all the (represented) elements of a sparse matrix */ SPMAT *sp_zero(A) SPMAT *A; { int i, idx, len; row_elt *elt; if ( ! A ) error(E_NULL,"sp_zero"); for ( i = 0; i < A->m; i++ ) { elt = A->row[i].elt; len = A->row[i].len; for ( idx = 0; idx < len; idx++ ) (*elt++).val = 0.0; } return A; } /* sp_copy2 -- copy sparse matrix (type 2) -- keeps structure of the OUT matrix */ SPMAT *sp_copy2(A,OUT) SPMAT *A, *OUT; { int i /* , idx, len1, len2 */; SPROW *r1, *r2; static SPROW *scratch = (SPROW *)NULL; /* row_elt *e1, *e2; */ if ( ! A ) error(E_NULL,"sp_copy2"); if ( ! OUT ) OUT = sp_get(A->m,A->n,10); if ( ! scratch ) { scratch = sprow_xpd(scratch,MINROWLEN,TYPE_SPROW); MEM_STAT_REG(scratch,TYPE_SPROW); } if ( OUT->m < A->m ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,A->max_m*sizeof(SPROW), A->m*sizeof(SPROW)); } OUT->row = RENEW(OUT->row,A->m,SPROW); if ( ! OUT->row ) error(E_MEM,"sp_copy2"); for ( i = OUT->m; i < A->m; i++ ) { OUT->row[i].elt = NEW_A(MINROWLEN,row_elt); if ( ! OUT->row[i].elt ) error(E_MEM,"sp_copy2"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,MINROWLEN*sizeof(row_elt)); } OUT->row[i].maxlen = MINROWLEN; OUT->row[i].len = 0; } OUT->m = A->m; } OUT->flag_col = OUT->flag_diag = FALSE; /* sp_zero(OUT); */ for ( i = 0; i < A->m; i++ ) { r1 = &(A->row[i]); r2 = &(OUT->row[i]); sprow_copy(r1,r2,scratch,TYPE_SPROW); if ( r2->maxlen < scratch->len ) sprow_xpd(r2,scratch->len,TYPE_SPMAT); MEM_COPY((char *)(scratch->elt),(char *)(r2->elt), scratch->len*sizeof(row_elt)); r2->len = scratch->len; /******************************************************* e1 = r1->elt; e2 = r2->elt; len1 = r1->len; len2 = r2->len; for ( idx = 0; idx < len2; idx++, e2++ ) e2->val = 0.0; for ( idx = 0; idx < len1; idx++, e1++ ) sprow_set_val(r2,e1->col,e1->val); *******************************************************/ } sp_col_access(OUT); return OUT; } /* sp_resize -- resize a sparse matrix -- don't destroying any contents if possible -- returns resized matrix */ SPMAT *sp_resize(A,m,n) SPMAT *A; int m, n; { int i, len; SPROW *r; if (m < 0 || n < 0) error(E_NEG,"sp_resize"); if ( ! A ) return sp_get(m,n,10); if (m == A->m && n == A->n) return A; if ( m <= A->max_m ) { for ( i = A->m; i < m; i++ ) A->row[i].len = 0; A->m = m; } else { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,A->max_m*sizeof(SPROW), m*sizeof(SPROW)); } A->row = RENEW(A->row,(unsigned)m,SPROW); if ( ! A->row ) error(E_MEM,"sp_resize"); for ( i = A->m; i < m; i++ ) { if ( ! (A->row[i].elt = NEW_A(MINROWLEN,row_elt)) ) error(E_MEM,"sp_resize"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,0,MINROWLEN*sizeof(row_elt)); } A->row[i].len = 0; A->row[i].maxlen = MINROWLEN; } A->m = A->max_m = m; } /* update number of rows */ A->n = n; /* do we need to increase the size of start_idx[] and start_row[] ? */ if ( n > A->max_n ) { /* only have to update the start_idx & start_row arrays */ if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT,2*A->max_n*sizeof(int), 2*n*sizeof(int)); } A->start_row = RENEW(A->start_row,(unsigned)n,int); A->start_idx = RENEW(A->start_idx,(unsigned)n,int); if ( ! A->start_row || ! A->start_idx ) error(E_MEM,"sp_resize"); A->max_n = n; /* ...and update max_n */ return A; } if ( n <= A->n ) /* make sure that all rows are truncated just before column n */ for ( i = 0; i < A->m; i++ ) { r = &(A->row[i]); len = sprow_idx(r,n); if ( len < 0 ) len = -(len+2); if ( len < 0 ) error(E_MEM,"sp_resize"); r->len = len; } return A; } /* sp_compact -- removes zeros and near-zeros from a sparse matrix */ SPMAT *sp_compact(A,tol) SPMAT *A; double tol; { int i, idx1, idx2; SPROW *r; row_elt *elt1, *elt2; if ( ! A ) error(E_NULL,"sp_compact"); if ( tol < 0.0 ) error(E_RANGE,"sp_compact"); A->flag_col = A->flag_diag = FALSE; for ( i = 0; i < A->m; i++ ) { r = &(A->row[i]); elt1 = elt2 = r->elt; idx1 = idx2 = 0; while ( idx1 < r->len ) { /* printf("# sp_compact: idx1 = %d, idx2 = %d\n",idx1,idx2); */ if ( fabs(elt1->val) <= tol ) { idx1++; elt1++; continue; } if ( elt1 != elt2 ) MEM_COPY(elt1,elt2,sizeof(row_elt)); idx1++; elt1++; idx2++; elt2++; } r->len = idx2; } return A; } /* varying number of arguments */ #ifdef ANSI_C /* To allocate memory to many arguments. The function should be called: sp_get_vars(m,n,deg,&x,&y,&z,...,NULL); where int m,n,deg; SPMAT *x, *y, *z,...; The last argument should be NULL ! m x n is the dimension of matrices x,y,z,... returned value is equal to the number of allocated variables */ int sp_get_vars(int m,int n,int deg,...) { va_list ap; int i=0; SPMAT **par; va_start(ap, deg); while ((par = va_arg(ap,SPMAT **))) { /* NULL ends the list*/ *par = sp_get(m,n,deg); i++; } va_end(ap); return i; } /* To resize memory for many arguments. The function should be called: sp_resize_vars(m,n,&x,&y,&z,...,NULL); where int m,n; SPMAT *x, *y, *z,...; The last argument should be NULL ! m X n is the resized dimension of matrices x,y,z,... returned value is equal to the number of allocated variables. If one of x,y,z,.. arguments is NULL then memory is allocated to this argument. */ int sp_resize_vars(int m,int n,...) { va_list ap; int i=0; SPMAT **par; va_start(ap, n); while ((par = va_arg(ap,SPMAT **))) { /* NULL ends the list*/ *par = sp_resize(*par,m,n); i++; } va_end(ap); return i; } /* To deallocate memory for many arguments. The function should be called: sp_free_vars(&x,&y,&z,...,NULL); where SPMAT *x, *y, *z,...; The last argument should be NULL ! There must be at least one not NULL argument. returned value is equal to the number of allocated variables. Returned value of x,y,z,.. is VNULL. */ int sp_free_vars(SPMAT **va,...) { va_list ap; int i=1; SPMAT **par; sp_free(*va); *va = (SPMAT *) NULL; va_start(ap, va); while ((par = va_arg(ap,SPMAT **))) { /* NULL ends the list*/ sp_free(*par); *par = (SPMAT *)NULL; i++; } va_end(ap); return i; } #elif VARARGS /* To allocate memory to many arguments. The function should be called: sp_get_vars(m,n,deg,&x,&y,&z,...,NULL); where int m,n,deg; SPMAT *x, *y, *z,...; The last argument should be NULL ! m x n is the dimension of matrices x,y,z,... returned value is equal to the number of allocated variables */ int sp_get_vars(va_alist) va_dcl { va_list ap; int i=0, m, n, deg; SPMAT **par; va_start(ap); m = va_arg(ap,int); n = va_arg(ap,int); deg = va_arg(ap,int); while ((par = va_arg(ap,SPMAT **))) { /* NULL ends the list*/ *par = sp_get(m,n,deg); i++; } va_end(ap); return i; } /* To resize memory for many arguments. The function should be called: sp_resize_vars(m,n,&x,&y,&z,...,NULL); where int m,n; SPMAT *x, *y, *z,...; The last argument should be NULL ! m X n is the resized dimension of matrices x,y,z,... returned value is equal to the number of allocated variables. If one of x,y,z,.. arguments is NULL then memory is allocated to this argument. */ int sp_resize_vars(va_alist) va_dcl { va_list ap; int i=0, m, n; SPMAT **par; va_start(ap); m = va_arg(ap,int); n = va_arg(ap,int); while ((par = va_arg(ap,SPMAT **))) { /* NULL ends the list*/ *par = sp_resize(*par,m,n); i++; } va_end(ap); return i; } /* To deallocate memory for many arguments. The function should be called: sp_free_vars(&x,&y,&z,...,NULL); where SPMAT *x, *y, *z,...; The last argument should be NULL ! There must be at least one not NULL argument. returned value is equal to the number of allocated variables. Returned value of x,y,z,.. is VNULL. */ int sp_free_vars(va_alist) va_dcl { va_list ap; int i=0; SPMAT **par; va_start(ap); while ((par = va_arg(ap,SPMAT **))) { /* NULL ends the list*/ sp_free(*par); *par = (SPMAT *)NULL; i++; } va_end(ap); return i; } #endif neuron-7.5/src/mesch/sparse.h000077500000000000000000000146501323325274500162460ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Header for sparse matrix stuff. Basic sparse routines to be held in sparse.c */ /* RCS id: sparse.h,v 1.1 1997/11/03 16:15:55 hines Exp */ #ifndef SPARSEH #define SPARSEH #include "matrix.h" /* basic sparse types */ typedef struct row_elt { int col, nxt_row, nxt_idx; Real val; } row_elt; typedef struct SPROW { int len, maxlen, diag; row_elt *elt; /* elt[maxlen] */ } SPROW; typedef struct SPMAT { int m, n, max_m, max_n; char flag_col, flag_diag; SPROW *row; /* row[max_m] */ int *start_row; /* start_row[max_n] */ int *start_idx; /* start_idx[max_n] */ } SPMAT; /* Note that the first allocated entry in column j is start_row[j]; This starts the chain down the columns using the nxt_row and nxt_idx fields of each entry in each row. */ /* hines: change pair to mesch_pair so no conflict with c++ standard */ typedef struct mesch_pair { int pos; Real val; } mesch_pair; typedef struct SPVEC { int dim, max_dim; mesch_pair *elt; /* elt[max_dim] */ } SPVEC; #define SMNULL ((SPMAT*)NULL) #define SVNULL ((SPVEC*)NULL) /* Macro for speedup */ #define sprow_idx2(r,c,hint) \ ( ( (hint) >= 0 && (hint) < (r)->len && \ (r)->elt[hint].col == (c)) ? (hint) : sprow_idx((r),(c)) ) /* memory functions */ #ifdef ANSI_C int sp_get_vars(int m,int n,int deg,...); int sp_resize_vars(int m,int n,...); int sp_free_vars(SPMAT **,...); #elif VARARGS int sp_get_vars(); int sp_resize_vars(); int sp_free_vars(); #endif /* Sparse Matrix Operations and Utilities */ #ifndef ANSI_C extern SPMAT *sp_get(), *sp_copy(), *sp_copy2(), *sp_zero(), *sp_resize(), *sp_compact(); extern double sp_get_val(), sp_set_val(); extern VEC *sp_mv_mlt(), *sp_vm_mlt(); extern int sp_free(); /* Access path operations */ extern SPMAT *sp_col_access(); extern SPMAT *sp_diag_access(); extern int chk_col_access(); /* Input/output operations */ extern SPMAT *sp_finput(); extern void sp_foutput(), sp_foutput2(); /* algebraic operations */ extern SPMAT *sp_smlt(), *sp_add(), *sp_sub(), *sp_mltadd(); /* sparse row operations */ extern SPROW *sprow_get(), *sprow_xpd(), *sprow_merge(), *sprow_mltadd(), *sprow_resize(), *sprow_copy(); extern SPROW *sprow_add(), *sprow_sub(), *sprow_smlt(); extern double sprow_set_val(); extern void sprow_foutput(); extern int sprow_idx(), sprow_free(); /* dump */ extern void sp_dump(), sprow_dump(); extern MAT *sp_m2dense(); #else SPMAT *sp_get(int,int,int), *sp_copy(SPMAT *), *sp_copy2(SPMAT *,SPMAT *), *sp_zero(SPMAT *), *sp_resize(SPMAT *,int,int), *sp_compact(SPMAT *,double); double sp_get_val(SPMAT *,int,int), sp_set_val(SPMAT *,int,int,double); VEC *sp_mv_mlt(SPMAT *,VEC *,VEC *), *sp_vm_mlt(SPMAT *,VEC *,VEC *); int sp_free(SPMAT *); /* Access path operations */ SPMAT *sp_col_access(SPMAT *); SPMAT *sp_diag_access(SPMAT *); int chk_col_access(SPMAT *); /* Input/output operations */ SPMAT *sp_finput(FILE *); void sp_foutput(FILE *,SPMAT *), sp_foutput2(FILE *,SPMAT *); /* algebraic operations */ SPMAT *sp_smlt(SPMAT *A,double alpha,SPMAT *B), *sp_add(SPMAT *A,SPMAT *B,SPMAT *C), *sp_sub(SPMAT *A,SPMAT *B,SPMAT *C), *sp_mltadd(SPMAT *A,SPMAT *B,double alpha,SPMAT *C); /* sparse row operations */ SPROW *sprow_get(int), *sprow_xpd(SPROW *r,int n,int type), *sprow_resize(SPROW *r,int n,int type), *sprow_merge(SPROW *,SPROW *,SPROW *,int type), *sprow_copy(SPROW *,SPROW *,SPROW *,int type), *sprow_mltadd(SPROW *,SPROW *,double,int,SPROW *,int type); SPROW *sprow_add(SPROW *r1,SPROW *r2, int j0,SPROW *r_out, int type), *sprow_sub(SPROW *r1,SPROW *r2, int j0,SPROW *r_out, int type), *sprow_smlt(SPROW *r1,double alpha, int j0,SPROW *r_out, int type); double sprow_set_val(SPROW *,int,double); int sprow_free(SPROW *); int sprow_idx(SPROW *,int); void sprow_foutput(FILE *,SPROW *); /* dump */ void sp_dump(FILE *fp, SPMAT *A); void sprow_dump(FILE *fp, SPROW *r); MAT *sp_m2dense(SPMAT *A,MAT *out); #endif /* MACROS */ #define sp_input() sp_finput(stdin) #define sp_output(A) sp_foutput(stdout,(A)) #define sp_output2(A) sp_foutput2(stdout,(A)) #define row_mltadd(r1,r2,alpha,out) sprow_mltadd(r1,r2,alpha,0,out) #define out_row(r) sprow_foutput(stdout,(r)) #define SP_FREE(A) ( sp_free((A)), (A)=(SPMAT *)NULL) /* utility for index computations -- ensures index returned >= 0 */ #define fixindex(idx) ((idx) == -1 ? (error(E_BOUNDS,"fixindex"),0) : \ (idx) < 0 ? -((idx)+2) : (idx)) /* NOT USED */ /* loop over the columns in a row */ /* #define loop_cols(r,e,code) \ do { int _r_idx; row_elt *e; SPROW *_t_row; \ _t_row = (r); e = &(_t_row->elt); \ for ( _r_idx = 0; _r_idx < _t_row->len; _r_idx++, e++ ) \ { code; } } while ( 0 ) */ /* loop over the rows in a column */ /* #define loop_cols(A,col,e,code) \ do { int _r_num, _r_idx, _c; SPROW *_r; row_elt *e; \ if ( ! (A)->flag_col ) sp_col_access((A)); \ col_num = (col); \ if ( col_num < 0 || col_num >= A->n ) \ error(E_BOUNDS,"loop_cols"); \ _r_num = (A)->start_row[_c]; _r_idx = (A)->start_idx[_c]; \ while ( _r_num >= 0 ) { \ _r = &((A)->row[_r_num]); \ _r_idx = sprow_idx2(_r,_c,_r_idx); \ if ( _r_idx < 0 ) continue; \ e = &(_r->elt[_r_idx]); code; \ _r_num = e->nxt_row; _r_idx = e->nxt_idx; \ } } while ( 0 ) */ #endif neuron-7.5/src/mesch/sparse2.h000077500000000000000000000061231323325274500163240ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse matrix factorise/solve header */ /* RCS id: sparse2.h,v 1.1 1997/11/03 16:15:56 hines Exp */ #ifndef SPARSE2H #define SPARSE2H #include "sparse.h" #ifdef ANSI_C SPMAT *spCHfactor(SPMAT *), *spICHfactor(SPMAT *), *spCHsymb(SPMAT *); VEC *spCHsolve(SPMAT *,VEC *,VEC *); SPMAT *spLUfactor(SPMAT *,PERM *,double); SPMAT *spILUfactor(SPMAT *,double); VEC *spLUsolve(SPMAT *,PERM *,VEC *,VEC *), *spLUTsolve(SPMAT *,PERM *,VEC *,VEC *); SPMAT *spBKPfactor(SPMAT *, PERM *, PERM *, double); VEC *spBKPsolve(SPMAT *, PERM *, PERM *, VEC *, VEC *); VEC *pccg(VEC *(*A)(),void *A_par,VEC *(*M_inv)(),void *M_par,VEC *b, double tol,VEC *x); VEC *sp_pccg(SPMAT *,SPMAT *,VEC *,double,VEC *); VEC *cgs(VEC *(*A)(),void *A_par,VEC *b,VEC *r0,double tol,VEC *x); VEC *sp_cgs(SPMAT *,VEC *,VEC *,double,VEC *); VEC *lsqr(VEC *(*A)(),VEC *(*AT)(),void *A_par,VEC *b,double tol,VEC *x); VEC *sp_lsqr(SPMAT *,VEC *,double,VEC *); int cg_set_maxiter(int); void lanczos(VEC *(*A)(),void *A_par,int m,VEC *x0,VEC *a,VEC *b, Real *beta_m1,MAT *Q); void sp_lanczos(SPMAT *,int,VEC *,VEC *,VEC *,Real *,MAT *); VEC *lanczos2(VEC *(*A)(),void *A_par,int m,VEC *x0,VEC *evals, VEC *err_est); VEC *sp_lanczos2(SPMAT *,int,VEC *,VEC *,VEC *); extern void scan_to(SPMAT *,IVEC *,IVEC *,IVEC *,int); extern row_elt *chase_col(SPMAT *,int,int *,int *,int); extern row_elt *chase_past(SPMAT *,int,int *,int *,int); extern row_elt *bump_col(SPMAT *,int,int *,int *); #else extern SPMAT *spCHfactor(), *spICHfactor(), *spCHsymb(); extern VEC *spCHsolve(); extern SPMAT *spLUfactor(); extern SPMAT *spILUfactor(); extern VEC *spLUsolve(), *spLUTsolve(); extern SPMAT *spBKPfactor(); extern VEC *spBKPsolve(); extern VEC *pccg(), *sp_pccg(), *cgs(), *sp_cgs(), *lsqr(), *sp_lsqr(); extern int cg_set_maxiter(); void lanczos(), sp_lanczos(); VEC *lanczos2(), *sp_lanczos2(); extern void scan_to(); extern row_elt *chase_col(); extern row_elt *chase_past(); extern row_elt *bump_col(); #endif #endif neuron-7.5/src/mesch/sparseio.c000077500000000000000000000201061323325274500165620ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file has the routines for sparse matrix input/output It works in conjunction with sparse.c, sparse.h etc */ #include #include "sparse.h" static char rcsid[] = "sparseio.c,v 1.1 1997/12/04 17:55:49 hines Exp"; /* local variables */ static char line[MAXLINE]; /* sp_foutput -- output sparse matrix A to file/stream fp */ void sp_foutput(fp,A) FILE *fp; SPMAT *A; { int i, j_idx, m /* , n */; SPROW *rows; row_elt *elts; fprintf(fp,"SparseMatrix: "); if ( A == SMNULL ) { fprintf(fp,"*** NULL ***\n"); error(E_NULL,"sp_foutput"); return; } fprintf(fp,"%d by %d\n",A->m,A->n); m = A->m; /* n = A->n; */ if ( ! (rows=A->row) ) { fprintf(fp,"*** NULL rows ***\n"); error(E_NULL,"sp_foutput"); return; } for ( i = 0; i < m; i++ ) { fprintf(fp,"row %d: ",i); if ( ! (elts=rows[i].elt) ) { fprintf(fp,"*** NULL element list ***\n"); continue; } for ( j_idx = 0; j_idx < rows[i].len; j_idx++ ) { fprintf(fp,"%d:%-20.15g ",elts[j_idx].col, elts[j_idx].val); if ( j_idx % 3 == 2 && j_idx != rows[i].len-1 ) fprintf(fp,"\n "); } fprintf(fp,"\n"); } fprintf(fp,"#\n"); /* to stop looking beyond for next entry */ } /* sp_foutput2 -- print out sparse matrix **as a dense matrix** -- see output format used in matrix.h etc */ /****************************************************************** void sp_foutput2(fp,A) FILE *fp; SPMAT *A; { int cnt, i, j, j_idx; SPROW *r; row_elt *elt; if ( A == SMNULL ) { fprintf(fp,"Matrix: *** NULL ***\n"); return; } fprintf(fp,"Matrix: %d by %d\n",A->m,A->n); for ( i = 0; i < A->m; i++ ) { fprintf(fp,"row %d:",i); r = &(A->row[i]); elt = r->elt; cnt = j = j_idx = 0; while ( j_idx < r->len || j < A->n ) { if ( j_idx >= r->len ) fprintf(fp,"%14.9g ",0.0); else if ( j < elt[j_idx].col ) fprintf(fp,"%14.9g ",0.0); else fprintf(fp,"%14.9g ",elt[j_idx++].val); if ( cnt++ % 4 == 3 ) fprintf(fp,"\n"); j++; } fprintf(fp,"\n"); } } ******************************************************************/ /* sp_dump -- prints ALL relevant information about the sparse matrix A */ void sp_dump(fp,A) FILE *fp; SPMAT *A; { int i, j, j_idx; SPROW *rows; row_elt *elts; fprintf(fp,"SparseMatrix dump:\n"); if ( ! A ) { fprintf(fp,"*** NULL ***\n"); return; } fprintf(fp,"Matrix at 0x%p\n",A); fprintf(fp,"Dimensions: %d by %d\n",A->m,A->n); fprintf(fp,"MaxDimensions: %d by %d\n",A->max_m,A->max_n); fprintf(fp,"flag_col = %d, flag_diag = %d\n",A->flag_col,A->flag_diag); fprintf(fp,"start_row @ 0x%p:\n",(A->start_row)); for ( j = 0; j < A->n; j++ ) { fprintf(fp,"%d ",A->start_row[j]); if ( j % 10 == 9 ) fprintf(fp,"\n"); } fprintf(fp,"\n"); fprintf(fp,"start_idx @ 0x%p:\n",(A->start_idx)); for ( j = 0; j < A->n; j++ ) { fprintf(fp,"%d ",A->start_idx[j]); if ( j % 10 == 9 ) fprintf(fp,"\n"); } fprintf(fp,"\n"); fprintf(fp,"Rows @ 0x%p:\n", (A->row)); if ( ! A->row ) { fprintf(fp,"*** NULL row ***\n"); return; } rows = A->row; for ( i = 0; i < A->m; i++ ) { fprintf(fp,"row %d: len = %d, maxlen = %d, diag idx = %d\n", i,rows[i].len,rows[i].maxlen,rows[i].diag); fprintf(fp,"element list @ 0x%p\n",(rows[i].elt)); if ( ! rows[i].elt ) { fprintf(fp,"*** NULL element list ***\n"); continue; } elts = rows[i].elt; for ( j_idx = 0; j_idx < rows[i].len; j_idx++, elts++ ) fprintf(fp,"Col: %d, Val: %g, nxt_row = %d, nxt_idx = %d\n", elts->col,elts->val,elts->nxt_row,elts->nxt_idx); fprintf(fp,"\n"); } } #define MAXSCRATCH 100 /* sp_finput -- input sparse matrix from stream/file fp -- uses friendly input routine if fp is a tty -- uses format identical to output format otherwise */ SPMAT *sp_finput(fp) FILE *fp; { int i, len, ret_val; int col, curr_col, m, n, tmp, tty; Real val; SPMAT *A; SPROW *rows; row_elt scratch[MAXSCRATCH]; /* cannot handle >= MAXSCRATCH elements in a row */ for ( i = 0; i < MAXSCRATCH; i++ ) scratch[i].nxt_row = scratch[i].nxt_idx = -1; tty = isatty(fileno(fp)); if ( tty ) { fprintf(stderr,"SparseMatrix: "); do { fprintf(stderr,"input rows cols: "); if ( ! fgets(line,MAXLINE,fp) ) error(E_INPUT,"sp_finput"); } while ( sscanf(line,"%u %u",&m,&n) != 2 ); A = sp_get(m,n,5); rows = A->row; for ( i = 0; i < m; i++ ) { fprintf(stderr,"Row %d:\n",i); fprintf(stderr,"Enter or 'e' to end row\n"); curr_col = -1; for ( len = 0; len < MAXSCRATCH; len++ ) { do { fprintf(stderr,"Entry %d: ",len); if ( ! fgets(line,MAXLINE,fp) ) error(E_INPUT,"sp_finput"); if ( *line == 'e' || *line == 'E' ) break; #if REAL == DOUBLE } while ( sscanf(line,"%u %lf",&col,&val) != 2 || #elif REAL == FLOAT } while ( sscanf(line,"%u %f",&col,&val) != 2 || #endif col >= n || col <= curr_col ); if ( *line == 'e' || *line == 'E' ) break; scratch[len].col = col; scratch[len].val = val; curr_col = col; } /* Note: len = # elements in row */ if ( len > 5 ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPMAT, A->row[i].maxlen*sizeof(row_elt), len*sizeof(row_elt)); } rows[i].elt = (row_elt *)realloc((char *)rows[i].elt, len*sizeof(row_elt)); rows[i].maxlen = len; } MEM_COPY(scratch,rows[i].elt,len*sizeof(row_elt)); rows[i].len = len; rows[i].diag = sprow_idx(&(rows[i]),i); } } else /* not tty */ { ret_val = 0; skipjunk(fp); if (fscanf(fp,"SparseMatrix:") == EOF) { error(E_INPUT, "sp_finput"); } skipjunk(fp); if ( (ret_val=fscanf(fp,"%u by %u",&m,&n)) != 2 ) error((ret_val == EOF) ? E_EOF : E_FORMAT,"sp_finput"); A = sp_get(m,n,5); /* initialise start_row */ for ( i = 0; i < A->n; i++ ) A->start_row[i] = -1; rows = A->row; for ( i = 0; i < m; i++ ) { /* printf("Reading row # %d\n",i); */ rows[i].diag = -1; skipjunk(fp); if ( (ret_val=fscanf(fp,"row %d :",&tmp)) != 1 || tmp != i ) error((ret_val == EOF) ? E_EOF : E_FORMAT, "sp_finput"); curr_col = -1; for ( len = 0; len < MAXSCRATCH; len++ ) { #if REAL == DOUBLE if ( (ret_val=fscanf(fp,"%u : %lf",&col,&val)) != 2 ) #elif REAL == FLOAT if ( (ret_val=fscanf(fp,"%u : %f",&col,&val)) != 2 ) #endif break; if ( col <= curr_col || col >= n ) error(E_FORMAT,"sp_finput"); scratch[len].col = col; scratch[len].val = val; } if ( ret_val == EOF ) error(E_EOF,"sp_finput"); if ( len > rows[i].maxlen ) { rows[i].elt = (row_elt *)realloc((char *)rows[i].elt, len*sizeof(row_elt)); rows[i].maxlen = len; } MEM_COPY(scratch,rows[i].elt,len*sizeof(row_elt)); rows[i].len = len; /* printf("Have read row # %d\n",i); */ rows[i].diag = sprow_idx(&(rows[i]),i); /* printf("Have set diag index for row # %d\n",i); */ } } return A; } neuron-7.5/src/mesch/spbkp.c000077500000000000000000001054061323325274500160630ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse matrix Bunch--Kaufman--Parlett factorisation and solve Radical revision started Thu 05th Nov 1992, 09:36:12 AM to use Karen George's suggestion of leaving the the row elements unordered Radical revision completed Mon 07th Dec 1992, 10:59:57 AM */ static char rcsid[] = "spbkp.c,v 1.1 1997/12/04 17:55:50 hines Exp"; #include #include "sparse2.h" #include #ifdef MALLOCDECL #include #endif #define alpha 0.6403882032022076 /* = (1+sqrt(17))/8 */ #define btos(x) ((x) ? "TRUE" : "FALSE") /* assume no use of sqr() uses side-effects */ #define sqr(x) ((x)*(x)) /* unord_get_idx -- returns index (encoded if entry not allocated) of the element of row r with column j -- uses linear search */ int unord_get_idx(r,j) SPROW *r; int j; { int idx; row_elt *e; if ( ! r || ! r->elt ) error(E_NULL,"unord_get_idx"); for ( idx = 0, e = r->elt; idx < r->len; idx++, e++ ) if ( e->col == j ) break; if ( idx >= r->len ) return -(r->len+2); else return idx; } /* unord_get_val -- returns value of the (i,j) entry of A -- same assumptions as unord_get_idx() */ double unord_get_val(A,i,j) SPMAT *A; int i, j; { SPROW *r; int idx; if ( ! A ) error(E_NULL,"unord_get_val"); if ( i < 0 || i >= A->m || j < 0 || j >= A->n ) error(E_BOUNDS,"unord_get_val"); r = &(A->row[i]); idx = unord_get_idx(r,j); if ( idx < 0 ) return 0.0; else return r->elt[idx].val; } /* bkp_swap_elt -- swaps the (i,j) with the (k,l) entry of sparse matrix -- either or both of the entries may be unallocated */ static SPMAT *bkp_swap_elt(A,i1,j1,idx1,i2,j2,idx2) SPMAT *A; int i1, j1, idx1, i2, j2, idx2; { int tmp_row, tmp_idx; SPROW *r1, *r2; row_elt *e1, *e2; Real tmp; if ( ! A ) error(E_NULL,"bkp_swap_elt"); if ( i1 < 0 || j1 < 0 || i2 < 0 || j2 < 0 || i1 >= A->m || j1 >= A->n || i2 >= A->m || j2 >= A->n ) { error(E_BOUNDS,"bkp_swap_elt"); } if ( i1 == i2 && j1 == j2 ) return A; if ( idx1 < 0 && idx2 < 0 ) /* neither allocated */ return A; r1 = &(A->row[i1]); r2 = &(A->row[i2]); /* if ( idx1 >= r1->len || idx2 >= r2->len ) error(E_BOUNDS,"bkp_swap_elt"); */ if ( idx1 < 0 ) /* assume not allocated */ { idx1 = r1->len; if ( idx1 >= r1->maxlen ) { tracecatch(sprow_xpd(r1,2*r1->maxlen+1,TYPE_SPMAT), "bkp_swap_elt"); } r1->len = idx1+1; r1->elt[idx1].col = j1; r1->elt[idx1].val = 0.0; /* now patch up column access path */ tmp_row = -1; tmp_idx = j1; chase_col(A,j1,&tmp_row,&tmp_idx,i1-1); if ( tmp_row < 0 ) { r1->elt[idx1].nxt_row = A->start_row[j1]; r1->elt[idx1].nxt_idx = A->start_idx[j1]; A->start_row[j1] = i1; A->start_idx[j1] = idx1; } else { row_elt *tmp_e; tmp_e = &(A->row[tmp_row].elt[tmp_idx]); r1->elt[idx1].nxt_row = tmp_e->nxt_row; r1->elt[idx1].nxt_idx = tmp_e->nxt_idx; tmp_e->nxt_row = i1; tmp_e->nxt_idx = idx1; } } else if ( r1->elt[idx1].col != j1 ) error(E_INTERN,"bkp_swap_elt"); if ( idx2 < 0 ) { idx2 = r2->len; if ( idx2 >= r2->maxlen ) { tracecatch(sprow_xpd(r2,2*r2->maxlen+1,TYPE_SPMAT), "bkp_swap_elt"); } r2->len = idx2+1; r2->elt[idx2].col = j2; r2->elt[idx2].val = 0.0; /* now patch up column access path */ tmp_row = -1; tmp_idx = j2; chase_col(A,j2,&tmp_row,&tmp_idx,i2-1); if ( tmp_row < 0 ) { r2->elt[idx2].nxt_row = A->start_row[j2]; r2->elt[idx2].nxt_idx = A->start_idx[j2]; A->start_row[j2] = i2; A->start_idx[j2] = idx2; } else { row_elt *tmp_e; tmp_e = &(A->row[tmp_row].elt[tmp_idx]); r2->elt[idx2].nxt_row = tmp_e->nxt_row; r2->elt[idx2].nxt_idx = tmp_e->nxt_idx; tmp_e->nxt_row = i2; tmp_e->nxt_idx = idx2; } } else if ( r2->elt[idx2].col != j2 ) error(E_INTERN,"bkp_swap_elt"); e1 = &(r1->elt[idx1]); e2 = &(r2->elt[idx2]); tmp = e1->val; e1->val = e2->val; e2->val = tmp; return A; } /* bkp_bump_col -- bumps row and idx to next entry in column j */ row_elt *bkp_bump_col(A, j, row, idx) SPMAT *A; int j, *row, *idx; { SPROW *r; row_elt *e; if ( *row < 0 ) { *row = A->start_row[j]; *idx = A->start_idx[j]; } else { r = &(A->row[*row]); e = &(r->elt[*idx]); if ( e->col != j ) error(E_INTERN,"bkp_bump_col"); *row = e->nxt_row; *idx = e->nxt_idx; } if ( *row < 0 ) return (row_elt *)NULL; else return &(A->row[*row].elt[*idx]); } /* bkp_interchange -- swap rows/cols i and j (symmetric pivot) -- uses just the upper triangular part */ SPMAT *bkp_interchange(A, i1, i2) SPMAT *A; int i1, i2; { int tmp_row, tmp_idx; int row1, row2, idx1, idx2, tmp_row1, tmp_idx1, tmp_row2, tmp_idx2; SPROW *r1, *r2; row_elt *e1, *e2; IVEC *done_list = IVNULL; if ( ! A ) error(E_NULL,"bkp_interchange"); if ( i1 < 0 || i1 >= A->n || i2 < 0 || i2 >= A->n ) error(E_BOUNDS,"bkp_interchange"); if ( A->m != A->n ) error(E_SQUARE,"bkp_interchange"); if ( i1 == i2 ) return A; if ( i1 > i2 ) { tmp_idx = i1; i1 = i2; i2 = tmp_idx; } done_list = iv_resize(done_list,A->n); for ( tmp_idx = 0; tmp_idx < A->n; tmp_idx++ ) done_list->ive[tmp_idx] = FALSE; row1 = -1; idx1 = i1; row2 = -1; idx2 = i2; e1 = bkp_bump_col(A,i1,&row1,&idx1); e2 = bkp_bump_col(A,i2,&row2,&idx2); while ( (row1 >= 0 && row1 < i1) || (row2 >= 0 && row2 < i1) ) /* Note: "row2 < i1" not "row2 < i2" as we must stop before the "knee bend" */ { if ( row1 >= 0 && row1 < i1 && ( row1 < row2 || row2 < 0 ) ) { tmp_row1 = row1; tmp_idx1 = idx1; e1 = bkp_bump_col(A,i1,&tmp_row1,&tmp_idx1); if ( ! done_list->ive[row1] ) { if ( row1 == row2 ) bkp_swap_elt(A,row1,i1,idx1,row1,i2,idx2); else bkp_swap_elt(A,row1,i1,idx1,row1,i2,-1); done_list->ive[row1] = TRUE; } row1 = tmp_row1; idx1 = tmp_idx1; } else if ( row2 >= 0 && row2 < i1 && ( row2 < row1 || row1 < 0 ) ) { tmp_row2 = row2; tmp_idx2 = idx2; e2 = bkp_bump_col(A,i2,&tmp_row2,&tmp_idx2); if ( ! done_list->ive[row2] ) { if ( row1 == row2 ) bkp_swap_elt(A,row2,i1,idx1,row2,i2,idx2); else bkp_swap_elt(A,row2,i1,-1,row2,i2,idx2); done_list->ive[row2] = TRUE; } row2 = tmp_row2; idx2 = tmp_idx2; } else if ( row1 == row2 ) { tmp_row1 = row1; tmp_idx1 = idx1; e1 = bkp_bump_col(A,i1,&tmp_row1,&tmp_idx1); tmp_row2 = row2; tmp_idx2 = idx2; e2 = bkp_bump_col(A,i2,&tmp_row2,&tmp_idx2); if ( ! done_list->ive[row1] ) { bkp_swap_elt(A,row1,i1,idx1,row2,i2,idx2); done_list->ive[row1] = TRUE; } row1 = tmp_row1; idx1 = tmp_idx1; row2 = tmp_row2; idx2 = tmp_idx2; } } /* ensure we are **past** the first knee */ while ( row2 >= 0 && row2 <= i1 ) e2 = bkp_bump_col(A,i2,&row2,&idx2); /* at/after 1st "knee bend" */ r1 = &(A->row[i1]); idx1 = 0; e1 = &(r1->elt[idx1]); while ( row2 >= 0 && row2 < i2 ) { /* used for update of e2 at end of loop */ tmp_row = row2; tmp_idx = idx2; if ( ! done_list->ive[row2] ) { r2 = &(A->row[row2]); bkp_bump_col(A,i2,&tmp_row,&tmp_idx); done_list->ive[row2] = TRUE; tmp_idx1 = unord_get_idx(r1,row2); tracecatch(bkp_swap_elt(A,row2,i2,idx2,i1,row2,tmp_idx1), "bkp_interchange"); } /* update e1 and e2 */ row2 = tmp_row; idx2 = tmp_idx; e2 = ( row2 >= 0 ) ? &(A->row[row2].elt[idx2]) : (row_elt *)NULL; } idx1 = 0; e1 = r1->elt; while ( idx1 < r1->len ) { if ( e1->col >= i2 || e1->col <= i1 ) { idx1++; e1++; continue; } if ( ! done_list->ive[e1->col] ) { tmp_idx2 = unord_get_idx(&(A->row[e1->col]),i2); tracecatch(bkp_swap_elt(A,i1,e1->col,idx1,e1->col,i2,tmp_idx2), "bkp_interchange"); done_list->ive[e1->col] = TRUE; } idx1++; e1++; } /* at/after 2nd "knee bend" */ idx1 = 0; e1 = &(r1->elt[idx1]); r2 = &(A->row[i2]); idx2 = 0; e2 = &(r2->elt[idx2]); while ( idx1 < r1->len ) { if ( e1->col <= i2 ) { idx1++; e1++; continue; } if ( ! done_list->ive[e1->col] ) { tmp_idx2 = unord_get_idx(r2,e1->col); tracecatch(bkp_swap_elt(A,i1,e1->col,idx1,i2,e1->col,tmp_idx2), "bkp_interchange"); done_list->ive[e1->col] = TRUE; } idx1++; e1++; } idx2 = 0; e2 = r2->elt; while ( idx2 < r2->len ) { if ( e2->col <= i2 ) { idx2++; e2++; continue; } if ( ! done_list->ive[e2->col] ) { tmp_idx1 = unord_get_idx(r1,e2->col); tracecatch(bkp_swap_elt(A,i2,e2->col,idx2,i1,e2->col,tmp_idx1), "bkp_interchange"); done_list->ive[e2->col] = TRUE; } idx2++; e2++; } /* now interchange the digonal entries! */ idx1 = unord_get_idx(&(A->row[i1]),i1); idx2 = unord_get_idx(&(A->row[i2]),i2); if ( idx1 >= 0 || idx2 >= 0 ) { tracecatch(bkp_swap_elt(A,i1,i1,idx1,i2,i2,idx2), "bkp_interchange"); } return A; } /* iv_min -- returns minimum of an integer vector -- sets index to the position in iv if index != NULL */ int iv_min(iv,index) IVEC *iv; int *index; { int i, i_min, min_val, tmp; if ( ! iv ) error(E_NULL,"iv_min"); if ( iv->dim <= 0 ) error(E_SIZES,"iv_min"); i_min = 0; min_val = iv->ive[0]; for ( i = 1; i < iv->dim; i++ ) { tmp = iv->ive[i]; if ( tmp < min_val ) { min_val = tmp; i_min = i; } } if ( index != (int *)NULL ) *index = i_min; return min_val; } /* max_row_col -- returns max { |A[j][k]| : k >= i, k != j, k != l } given j using symmetry and only the upper triangular part of A */ static double max_row_col(A,i,j,l) SPMAT *A; int i, j, l; { int row_num, idx; SPROW *r; row_elt *e; Real max_val, tmp; if ( ! A ) error(E_NULL,"max_row_col"); if ( i < 0 || i > A->n || j < 0 || j >= A->n ) error(E_BOUNDS,"max_row_col"); max_val = 0.0; idx = unord_get_idx(&(A->row[i]),j); if ( idx < 0 ) { row_num = -1; idx = j; e = chase_past(A,j,&row_num,&idx,i); } else { row_num = i; e = &(A->row[i].elt[idx]); } while ( row_num >= 0 && row_num < j ) { if ( row_num != l ) { tmp = fabs(e->val); if ( tmp > max_val ) max_val = tmp; } e = bump_col(A,j,&row_num,&idx); } r = &(A->row[j]); for ( idx = 0, e = r->elt; idx < r->len; idx++, e++ ) { if ( e->col > j && e->col != l ) { tmp = fabs(e->val); if ( tmp > max_val ) max_val = tmp; } } return max_val; } /* nonzeros -- counts non-zeros in A */ static int nonzeros(A) SPMAT *A; { int cnt, i; if ( ! A ) return 0; cnt = 0; for ( i = 0; i < A->m; i++ ) cnt += A->row[i].len; return cnt; } /* chk_col_access -- for spBKPfactor() -- checks that column access path is OK */ int chk_col_access(A) SPMAT *A; { int cnt_nz, j, row, idx; SPROW *r; row_elt *e; if ( ! A ) error(E_NULL,"chk_col_access"); /* count nonzeros as we go down columns */ cnt_nz = 0; for ( j = 0; j < A->n; j++ ) { row = A->start_row[j]; idx = A->start_idx[j]; while ( row >= 0 ) { if ( row >= A->m || idx < 0 ) return FALSE; r = &(A->row[row]); if ( idx >= r->len ) return FALSE; e = &(r->elt[idx]); if ( e->nxt_row >= 0 && e->nxt_row <= row ) return FALSE; row = e->nxt_row; idx = e->nxt_idx; cnt_nz++; } } if ( cnt_nz != nonzeros(A) ) return FALSE; else return TRUE; } /* col_cmp -- compare two columns -- for sorting rows using qsort() */ static int col_cmp(e1,e2) row_elt *e1, *e2; { return e1->col - e2->col; } /* spBKPfactor -- sparse Bunch-Kaufman-Parlett factorisation of A in-situ -- A is factored into the form P'AP = MDM' where P is a permutation matrix, M lower triangular and D is block diagonal with blocks of size 1 or 2 -- P is stored in pivot; blocks[i]==i iff D[i][i] is a block */ SPMAT *spBKPfactor(A,pivot,blocks,tol) SPMAT *A; PERM *pivot, *blocks; double tol; { int i, j, k, l, n, onebyone=0, r; int idx, idx1, idx_piv; int row_num; int best_deg=0, best_j, best_l, best_cost, mark_cost, deg, deg_j, deg_l, ignore_deg; int list_idx, list_idx2, old_list_idx; SPROW *row, *r_piv, *r1_piv; row_elt *e, *e1; Real aii, aip1, aip1i; Real det, max_j, max_l, s, t; static IVEC *scan_row = IVNULL, *scan_idx = IVNULL, *col_list = IVNULL, *tmp_iv = IVNULL; static IVEC *deg_list = IVNULL; static IVEC *orig_idx = IVNULL, *orig1_idx = IVNULL; static PERM *order = PNULL; if ( ! A || ! pivot || ! blocks ) error(E_NULL,"spBKPfactor"); if ( A->m != A->n ) error(E_SQUARE,"spBKPfactor"); if ( A->m != pivot->size || pivot->size != blocks->size ) error(E_SIZES,"spBKPfactor"); if ( tol <= 0.0 || tol > 1.0 ) error(E_RANGE,"spBKPfactor"); n = A->n; px_ident(pivot); px_ident(blocks); sp_col_access(A); sp_diag_access(A); ignore_deg = FALSE; deg_list = iv_resize(deg_list,n); order = px_resize(order,n); MEM_STAT_REG(deg_list,TYPE_IVEC); MEM_STAT_REG(order,TYPE_PERM); scan_row = iv_resize(scan_row,5); scan_idx = iv_resize(scan_idx,5); col_list = iv_resize(col_list,5); orig_idx = iv_resize(orig_idx,5); orig_idx = iv_resize(orig1_idx,5); orig_idx = iv_resize(tmp_iv,5); MEM_STAT_REG(scan_row,TYPE_IVEC); MEM_STAT_REG(scan_idx,TYPE_IVEC); MEM_STAT_REG(col_list,TYPE_IVEC); MEM_STAT_REG(orig_idx,TYPE_IVEC); MEM_STAT_REG(orig1_idx,TYPE_IVEC); MEM_STAT_REG(tmp_iv,TYPE_IVEC); for ( i = 0; i < n-1; i = onebyone ? i+1 : i+2 ) { /* now we want to use a Markowitz-style selection rule for determining which rows to swap and whether to use 1x1 or 2x2 pivoting */ /* get list of degrees of nodes */ deg_list = iv_resize(deg_list,n-i); if ( ! ignore_deg ) for ( j = i; j < n; j++ ) deg_list->ive[j-i] = 0; else { for ( j = i; j < n; j++ ) deg_list->ive[j-i] = 1; if ( i < n ) deg_list->ive[0] = 0; } order = px_resize(order,n-i); px_ident(order); if ( ! ignore_deg ) { for ( j = i; j < n; j++ ) { /* idx = sprow_idx(&(A->row[j]),j+1); */ /* idx = fixindex(idx); */ idx = 0; row = &(A->row[j]); e = &(row->elt[idx]); /* deg_list->ive[j-i] += row->len - idx; */ for ( ; idx < row->len; idx++, e++ ) if ( e->col >= i ) deg_list->ive[e->col - i]++; } /* now deg_list[k] == degree of node k+i */ /* now sort them into increasing order */ iv_sort(deg_list,order); /* now deg_list[idx] == degree of node i+order[idx] */ } /* now we can chase through the nodes in order of increasing degree, picking out the ones that satisfy our stability criterion */ list_idx = 0; r = -1; best_j = best_l = -1; for ( deg = 0; deg <= n; deg++ ) { Real ajj, all, ajl; if ( list_idx >= deg_list->dim ) break; /* That's all folks! */ old_list_idx = list_idx; while ( list_idx < deg_list->dim && deg_list->ive[list_idx] <= deg ) { j = i+order->pe[list_idx]; if ( j < i ) continue; /* can we use row/col j for a 1 x 1 pivot? */ /* find max_j = max_{k>=i} {|A[k][j]|,|A[j][k]|} */ ajj = fabs(unord_get_val(A,j,j)); if ( ajj == 0.0 ) { list_idx++; continue; /* can't use this for 1 x 1 pivot */ } max_j = max_row_col(A,i,j,-1); if ( ajj >= tol/* *alpha */ *max_j ) { onebyone = TRUE; best_j = j; best_deg = deg_list->ive[list_idx]; break; } list_idx++; } if ( best_j >= 0 ) break; best_cost = 2*n; /* > any possible Markowitz cost (bound) */ best_j = best_l = -1; list_idx = old_list_idx; while ( list_idx < deg_list->dim && deg_list->ive[list_idx] <= deg ) { j = i+order->pe[list_idx]; ajj = fabs(unord_get_val(A,j,j)); for ( list_idx2 = 0; list_idx2 < list_idx; list_idx2++ ) { deg_j = deg; deg_l = deg_list->ive[list_idx2]; l = i+order->pe[list_idx2]; if ( l < i ) continue; /* try using rows/cols (j,l) for a 2 x 2 pivot block */ all = fabs(unord_get_val(A,l,l)); ajl = ( j > l ) ? fabs(unord_get_val(A,l,j)) : fabs(unord_get_val(A,j,l)); det = fabs(ajj*all - ajl*ajl); if ( det == 0.0 ) continue; max_j = max_row_col(A,i,j,l); max_l = max_row_col(A,i,l,j); if ( tol*(all*max_j+ajl*max_l) < det && tol*(ajl*max_j+ajj*max_l) < det ) { /* acceptably stable 2 x 2 pivot */ /* this is actually an overestimate of the Markowitz cost for choosing (j,l) */ mark_cost = (ajj == 0.0) ? ((all == 0.0) ? deg_j+deg_l : deg_j+2*deg_l) : ((all == 0.0) ? 2*deg_j+deg_l : 2*(deg_j+deg_l)); if ( mark_cost < best_cost ) { onebyone = FALSE; best_cost = mark_cost; best_j = j; best_l = l; best_deg = deg_j; } } } list_idx++; } if ( best_j >= 0 ) break; } if ( best_deg > (int)floor(0.8*(n-i)) ) ignore_deg = TRUE; /* now do actual interchanges */ if ( best_j >= 0 && onebyone ) { bkp_interchange(A,i,best_j); px_transp(pivot,i,best_j); } else if ( best_j >= 0 && best_l >= 0 && ! onebyone ) { if ( best_j == i || best_j == i+1 ) { if ( best_l == i || best_l == i+1 ) { /* no pivoting, but must update blocks permutation */ px_transp(blocks,i,i+1); goto dopivot; } bkp_interchange(A,(best_j == i) ? i+1 : i,best_l); px_transp(pivot,(best_j == i) ? i+1 : i,best_l); } else if ( best_l == i || best_l == i+1 ) { bkp_interchange(A,(best_l == i) ? i+1 : i,best_j); px_transp(pivot,(best_l == i) ? i+1 : i,best_j); } else /* best_j & best_l outside i, i+1 */ { if ( i != best_j ) { bkp_interchange(A,i,best_j); px_transp(pivot,i,best_j); } if ( i+1 != best_l ) { bkp_interchange(A,i+1,best_l); px_transp(pivot,i+1,best_l); } } } else /* can't pivot &/or nothing to pivot */ continue; /* update blocks permutation */ if ( ! onebyone ) px_transp(blocks,i,i+1); dopivot: if ( onebyone ) { int idx_j, idx_k, s_idx, s_idx2; row_elt *e_ij, *e_ik; r_piv = &(A->row[i]); idx_piv = unord_get_idx(r_piv,i); /* if idx_piv < 0 then aii == 0 and no pivoting can be done; -- this means that we should continue to the next iteration */ if ( idx_piv < 0 ) continue; aii = r_piv->elt[idx_piv].val; if ( aii == 0.0 ) continue; /* for ( j = i+1; j < n; j++ ) { ... pivot step ... } */ /* initialise scan_... etc for the 1 x 1 pivot */ scan_row = iv_resize(scan_row,r_piv->len); scan_idx = iv_resize(scan_idx,r_piv->len); col_list = iv_resize(col_list,r_piv->len); orig_idx = iv_resize(orig_idx,r_piv->len); row_num = i; s_idx = idx = 0; e = &(r_piv->elt[idx]); for ( idx = 0; idx < r_piv->len; idx++, e++ ) { if ( e->col < i ) continue; scan_row->ive[s_idx] = i; scan_idx->ive[s_idx] = idx; orig_idx->ive[s_idx] = idx; col_list->ive[s_idx] = e->col; s_idx++; } scan_row = iv_resize(scan_row,s_idx); scan_idx = iv_resize(scan_idx,s_idx); col_list = iv_resize(col_list,s_idx); orig_idx = iv_resize(orig_idx,s_idx); order = px_resize(order,scan_row->dim); px_ident(order); iv_sort(col_list,order); tmp_iv = iv_resize(tmp_iv,scan_row->dim); for ( idx = 0; idx < order->size; idx++ ) tmp_iv->ive[idx] = scan_idx->ive[order->pe[idx]]; iv_copy(tmp_iv,scan_idx); for ( idx = 0; idx < order->size; idx++ ) tmp_iv->ive[idx] = scan_row->ive[order->pe[idx]]; iv_copy(tmp_iv,scan_row); for ( idx = 0; idx < scan_row->dim; idx++ ) tmp_iv->ive[idx] = orig_idx->ive[order->pe[idx]]; iv_copy(tmp_iv,orig_idx); /* now do actual pivot */ /* for ( j = i+1; j < n-1; j++ ) .... */ for ( s_idx = 0; s_idx < scan_row->dim; s_idx++ ) { idx_j = orig_idx->ive[s_idx]; if ( idx_j < 0 ) error(E_INTERN,"spBKPfactor"); e_ij = &(r_piv->elt[idx_j]); j = e_ij->col; if ( j < i+1 ) continue; scan_to(A,scan_row,scan_idx,col_list,j); /* compute multiplier */ t = e_ij->val / aii; /* for ( k = j; k < n; k++ ) { .... update A[j][k] .... } */ /* this is the row in which pivoting is done */ row = &(A->row[j]); for ( s_idx2 = s_idx; s_idx2 < scan_row->dim; s_idx2++ ) { idx_k = orig_idx->ive[s_idx2]; e_ik = &(r_piv->elt[idx_k]); k = e_ik->col; /* k >= j since col_list has been sorted */ if ( scan_row->ive[s_idx2] == j ) { /* no fill-in -- can be done directly */ idx = scan_idx->ive[s_idx2]; /* idx = sprow_idx2(row,k,idx); */ row->elt[idx].val -= t*e_ik->val; } else { /* fill-in -- insert entry & patch column */ int old_row, old_idx; row_elt *old_e, *new_e; old_row = scan_row->ive[s_idx2]; old_idx = scan_idx->ive[s_idx2]; /* old_idx = sprow_idx2(&(A->row[old_row]),k,old_idx); */ if ( old_idx < 0 ) error(E_INTERN,"spBKPfactor"); /* idx = sprow_idx(row,k); */ /* idx = fixindex(idx); */ idx = row->len; /* sprow_set_val(row,k,-t*e_ik->val); */ if ( row->len >= row->maxlen ) { tracecatch(sprow_xpd(row,2*row->maxlen+1,TYPE_SPMAT), "spBKPfactor"); } row->len = idx+1; new_e = &(row->elt[idx]); new_e->val = -t*e_ik->val; new_e->col = k; old_e = &(A->row[old_row].elt[old_idx]); new_e->nxt_row = old_e->nxt_row; new_e->nxt_idx = old_e->nxt_idx; old_e->nxt_row = j; old_e->nxt_idx = idx; } } e_ij->val = t; } } else /* onebyone == FALSE */ { /* do 2 x 2 pivot */ int idx_k, idx1_k, s_idx, s_idx2; int old_col; row_elt *e_tmp; r_piv = &(A->row[i]); idx_piv = unord_get_idx(r_piv,i); aii = aip1i = 0.0; e_tmp = r_piv->elt; for ( idx_piv = 0; idx_piv < r_piv->len; idx_piv++, e_tmp++ ) if ( e_tmp->col == i ) aii = e_tmp->val; else if ( e_tmp->col == i+1 ) aip1i = e_tmp->val; r1_piv = &(A->row[i+1]); e_tmp = r1_piv->elt; aip1 = unord_get_val(A,i+1,i+1); det = aii*aip1 - aip1i*aip1i; /* Must have det < 0 */ if ( aii == 0.0 && aip1i == 0.0 ) { /* error(E_RANGE,"spBKPfactor"); */ onebyone = TRUE; continue; /* cannot pivot */ } if ( det == 0.0 ) { if ( aii != 0.0 ) error(E_RANGE,"spBKPfactor"); onebyone = TRUE; continue; /* cannot pivot */ } aip1i = aip1i/det; aii = aii/det; aip1 = aip1/det; /* initialise scan_... etc for the 2 x 2 pivot */ s_idx = r_piv->len + r1_piv->len; scan_row = iv_resize(scan_row,s_idx); scan_idx = iv_resize(scan_idx,s_idx); col_list = iv_resize(col_list,s_idx); orig_idx = iv_resize(orig_idx,s_idx); orig1_idx = iv_resize(orig1_idx,s_idx); e = r_piv->elt; for ( idx = 0; idx < r_piv->len; idx++, e++ ) { scan_row->ive[idx] = i; scan_idx->ive[idx] = idx; col_list->ive[idx] = e->col; orig_idx->ive[idx] = idx; orig1_idx->ive[idx] = -1; } e = r_piv->elt; e1 = r1_piv->elt; for ( idx = 0; idx < r1_piv->len; idx++, e1++ ) { scan_row->ive[idx+r_piv->len] = i+1; scan_idx->ive[idx+r_piv->len] = idx; col_list->ive[idx+r_piv->len] = e1->col; orig_idx->ive[idx+r_piv->len] = -1; orig1_idx->ive[idx+r_piv->len] = idx; } e1 = r1_piv->elt; order = px_resize(order,scan_row->dim); px_ident(order); iv_sort(col_list,order); tmp_iv = iv_resize(tmp_iv,scan_row->dim); for ( idx = 0; idx < order->size; idx++ ) tmp_iv->ive[idx] = scan_idx->ive[order->pe[idx]]; iv_copy(tmp_iv,scan_idx); for ( idx = 0; idx < order->size; idx++ ) tmp_iv->ive[idx] = scan_row->ive[order->pe[idx]]; iv_copy(tmp_iv,scan_row); for ( idx = 0; idx < scan_row->dim; idx++ ) tmp_iv->ive[idx] = orig_idx->ive[order->pe[idx]]; iv_copy(tmp_iv,orig_idx); for ( idx = 0; idx < scan_row->dim; idx++ ) tmp_iv->ive[idx] = orig1_idx->ive[order->pe[idx]]; iv_copy(tmp_iv,orig1_idx); s_idx = 0; old_col = -1; for ( idx = 0; idx < scan_row->dim; idx++ ) { if ( col_list->ive[idx] == old_col ) { if ( scan_row->ive[idx] == i ) { scan_row->ive[s_idx-1] = scan_row->ive[idx]; scan_idx->ive[s_idx-1] = scan_idx->ive[idx]; col_list->ive[s_idx-1] = col_list->ive[idx]; orig_idx->ive[s_idx-1] = orig_idx->ive[idx]; orig1_idx->ive[s_idx-1] = orig1_idx->ive[idx-1]; } else if ( idx > 0 ) { scan_row->ive[s_idx-1] = scan_row->ive[idx-1]; scan_idx->ive[s_idx-1] = scan_idx->ive[idx-1]; col_list->ive[s_idx-1] = col_list->ive[idx-1]; orig_idx->ive[s_idx-1] = orig_idx->ive[idx-1]; orig1_idx->ive[s_idx-1] = orig1_idx->ive[idx]; } } else { scan_row->ive[s_idx] = scan_row->ive[idx]; scan_idx->ive[s_idx] = scan_idx->ive[idx]; col_list->ive[s_idx] = col_list->ive[idx]; orig_idx->ive[s_idx] = orig_idx->ive[idx]; orig1_idx->ive[s_idx] = orig1_idx->ive[idx]; s_idx++; } old_col = col_list->ive[idx]; } scan_row = iv_resize(scan_row,s_idx); scan_idx = iv_resize(scan_idx,s_idx); col_list = iv_resize(col_list,s_idx); orig_idx = iv_resize(orig_idx,s_idx); orig1_idx = iv_resize(orig1_idx,s_idx); /* for ( j = i+2; j < n; j++ ) { .... row operation .... } */ for ( s_idx = 0; s_idx < scan_row->dim; s_idx++ ) { int idx_piv, idx1_piv; Real aip1j, aij, aik, aip1k; row_elt *e_ik, *e_ip1k; j = col_list->ive[s_idx]; if ( j < i+2 ) continue; tracecatch(scan_to(A,scan_row,scan_idx,col_list,j), "spBKPfactor"); idx_piv = orig_idx->ive[s_idx]; aij = ( idx_piv < 0 ) ? 0.0 : r_piv->elt[idx_piv].val; /* aij = ( s_idx < r_piv->len ) ? r_piv->elt[s_idx].val : 0.0; */ /* aij = sp_get_val(A,i,j); */ idx1_piv = orig1_idx->ive[s_idx]; aip1j = ( idx1_piv < 0 ) ? 0.0 : r1_piv->elt[idx1_piv].val; /* aip1j = ( s_idx < r_piv->len ) ? 0.0 : r1_piv->elt[s_idx-r_piv->len].val; */ /* aip1j = sp_get_val(A,i+1,j); */ s = - aip1i*aip1j + aip1*aij; t = - aip1i*aij + aii*aip1j; /* for ( k = j; k < n; k++ ) { .... update entry .... } */ row = &(A->row[j]); /* set idx_k and idx1_k indices */ s_idx2 = s_idx; k = col_list->ive[s_idx2]; idx_k = orig_idx->ive[s_idx2]; idx1_k = orig1_idx->ive[s_idx2]; while ( s_idx2 < scan_row->dim ) { k = col_list->ive[s_idx2]; idx_k = orig_idx->ive[s_idx2]; idx1_k = orig1_idx->ive[s_idx2]; e_ik = ( idx_k < 0 ) ? (row_elt *)NULL : &(r_piv->elt[idx_k]); e_ip1k = ( idx1_k < 0 ) ? (row_elt *)NULL : &(r1_piv->elt[idx1_k]); aik = ( idx_k >= 0 ) ? e_ik->val : 0.0; aip1k = ( idx1_k >= 0 ) ? e_ip1k->val : 0.0; if ( scan_row->ive[s_idx2] == j ) { /* no fill-in */ row = &(A->row[j]); /* idx = sprow_idx(row,k); */ idx = scan_idx->ive[s_idx2]; if ( idx < 0 ) error(E_INTERN,"spBKPfactor"); row->elt[idx].val -= s*aik + t*aip1k; } else { /* fill-in -- insert entry & patch column */ Real tmp; int old_row, old_idx; row_elt *old_e, *new_e; tmp = - s*aik - t*aip1k; if ( tmp != 0.0 ) { row = &(A->row[j]); old_row = scan_row->ive[s_idx2]; old_idx = scan_idx->ive[s_idx2]; idx = row->len; if ( row->len >= row->maxlen ) { tracecatch(sprow_xpd(row,2*row->maxlen+1, TYPE_SPMAT), "spBKPfactor"); } row->len = idx + 1; /* idx = sprow_idx(row,k); */ new_e = &(row->elt[idx]); new_e->val = tmp; new_e->col = k; if ( old_row < 0 ) error(E_INTERN,"spBKPfactor"); /* old_idx = sprow_idx2(&(A->row[old_row]), k,old_idx); */ old_e = &(A->row[old_row].elt[old_idx]); new_e->nxt_row = old_e->nxt_row; new_e->nxt_idx = old_e->nxt_idx; old_e->nxt_row = j; old_e->nxt_idx = idx; } } /* update idx_k, idx1_k, s_idx2 etc */ s_idx2++; } /* store multipliers -- may involve fill-in (!) */ /* idx = sprow_idx(r_piv,j); */ idx = orig_idx->ive[s_idx]; if ( idx >= 0 ) { r_piv->elt[idx].val = s; } else if ( s != 0.0 ) { int old_row, old_idx; row_elt *new_e, *old_e; old_row = -1; old_idx = j; if ( i > 0 ) { tracecatch(chase_col(A,j,&old_row,&old_idx,i-1), "spBKPfactor"); } /* sprow_set_val(r_piv,j,s); */ idx = r_piv->len; if ( r_piv->len >= r_piv->maxlen ) { tracecatch(sprow_xpd(r_piv,2*r_piv->maxlen+1, TYPE_SPMAT), "spBKPfactor"); } r_piv->len = idx + 1; /* idx = sprow_idx(r_piv,j); */ /* if ( idx < 0 ) error(E_INTERN,"spBKPfactor"); */ new_e = &(r_piv->elt[idx]); new_e->val = s; new_e->col = j; if ( old_row < 0 ) { new_e->nxt_row = A->start_row[j]; new_e->nxt_idx = A->start_idx[j]; A->start_row[j] = i; A->start_idx[j] = idx; } else { /* old_idx = sprow_idx2(&(A->row[old_row]),j,old_idx);*/ if ( old_idx < 0 ) error(E_INTERN,"spBKPfactor"); old_e = &(A->row[old_row].elt[old_idx]); new_e->nxt_row = old_e->nxt_row; new_e->nxt_idx = old_e->nxt_idx; old_e->nxt_row = i; old_e->nxt_idx = idx; } } /* idx1 = sprow_idx(r1_piv,j); */ idx1 = orig1_idx->ive[s_idx]; if ( idx1 >= 0 ) { r1_piv->elt[idx1].val = t; } else if ( t != 0.0 ) { int old_row, old_idx; row_elt *new_e, *old_e; old_row = -1; old_idx = j; tracecatch(chase_col(A,j,&old_row,&old_idx,i), "spBKPfactor"); /* sprow_set_val(r1_piv,j,t); */ idx1 = r1_piv->len; if ( r1_piv->len >= r1_piv->maxlen ) { tracecatch(sprow_xpd(r1_piv,2*r1_piv->maxlen+1, TYPE_SPMAT), "spBKPfactor"); } r1_piv->len = idx1 + 1; /* idx1 = sprow_idx(r1_piv,j); */ /* if ( idx < 0 ) error(E_INTERN,"spBKPfactor"); */ new_e = &(r1_piv->elt[idx1]); new_e->val = t; new_e->col = j; if ( idx1 < 0 ) error(E_INTERN,"spBKPfactor"); new_e = &(r1_piv->elt[idx1]); if ( old_row < 0 ) { new_e->nxt_row = A->start_row[j]; new_e->nxt_idx = A->start_idx[j]; A->start_row[j] = i+1; A->start_idx[j] = idx1; } else { old_idx = sprow_idx2(&(A->row[old_row]),j,old_idx); if ( old_idx < 0 ) error(E_INTERN,"spBKPfactor"); old_e = &(A->row[old_row].elt[old_idx]); new_e->nxt_row = old_e->nxt_row; new_e->nxt_idx = old_e->nxt_idx; old_e->nxt_row = i+1; old_e->nxt_idx = idx1; } } } } } /* now sort the rows arrays */ for ( i = 0; i < A->m; i++ ) qsort(A->row[i].elt,A->row[i].len,sizeof(row_elt),(int(*)())col_cmp); A->flag_col = A->flag_diag = FALSE; return A; } /* spBKPsolve -- solves A.x = b where A has been factored a la BKPfactor() -- returns x, which is created if NULL */ VEC *spBKPsolve(A,pivot,block,b,x) SPMAT *A; PERM *pivot, *block; VEC *b, *x; { static VEC *tmp=VNULL; /* dummy storage needed */ int i /* , j */, n, onebyone; int row_num, idx; Real a11, a12, a22, b1, b2, det, sum, *tmp_ve, tmp_diag; SPROW *r; row_elt *e; if ( ! A || ! pivot || ! block || ! b ) error(E_NULL,"spBKPsolve"); if ( A->m != A->n ) error(E_SQUARE,"spBKPsolve"); n = A->n; if ( b->dim != n || pivot->size != n || block->size != n ) error(E_SIZES,"spBKPsolve"); x = v_resize(x,n); tmp = v_resize(tmp,n); MEM_STAT_REG(tmp,TYPE_VEC); tmp_ve = tmp->ve; if ( ! A->flag_col ) sp_col_access(A); px_vec(pivot,b,tmp); /* printf("# BKPsolve: effect of pivot: tmp =\n"); v_output(tmp); */ /* solve for lower triangular part */ for ( i = 0; i < n; i++ ) { sum = tmp_ve[i]; if ( block->pe[i] < i ) { /* for ( j = 0; j < i-1; j++ ) sum -= A_me[j][i]*tmp_ve[j]; */ row_num = -1; idx = i; e = bump_col(A,i,&row_num,&idx); while ( row_num >= 0 && row_num < i-1 ) { sum -= e->val*tmp_ve[row_num]; e = bump_col(A,i,&row_num,&idx); } } else { /* for ( j = 0; j < i; j++ ) sum -= A_me[j][i]*tmp_ve[j]; */ row_num = -1; idx = i; e = bump_col(A,i,&row_num,&idx); while ( row_num >= 0 && row_num < i ) { sum -= e->val*tmp_ve[row_num]; e = bump_col(A,i,&row_num,&idx); } } tmp_ve[i] = sum; } /* printf("# BKPsolve: solving L part: tmp =\n"); v_output(tmp); */ /* solve for diagonal part */ for ( i = 0; i < n; i = onebyone ? i+1 : i+2 ) { onebyone = ( block->pe[i] == i ); if ( onebyone ) { /* tmp_ve[i] /= A_me[i][i]; */ tmp_diag = sp_get_val(A,i,i); if ( tmp_diag == 0.0 ) error(E_SING,"spBKPsolve"); tmp_ve[i] /= tmp_diag; } else { a11 = sp_get_val(A,i,i); a22 = sp_get_val(A,i+1,i+1); a12 = sp_get_val(A,i,i+1); b1 = tmp_ve[i]; b2 = tmp_ve[i+1]; det = a11*a22-a12*a12; /* < 0 : see BKPfactor() */ if ( det == 0.0 ) error(E_SING,"BKPsolve"); det = 1/det; tmp_ve[i] = det*(a22*b1-a12*b2); tmp_ve[i+1] = det*(a11*b2-a12*b1); } } /* printf("# BKPsolve: solving D part: tmp =\n"); v_output(tmp); */ /* solve for transpose of lower triangular part */ for ( i = n-2; i >= 0; i-- ) { sum = tmp_ve[i]; if ( block->pe[i] > i ) { /* onebyone is false */ /* for ( j = i+2; j < n; j++ ) sum -= A_me[i][j]*tmp_ve[j]; */ if ( i+2 >= n ) continue; r = &(A->row[i]); idx = sprow_idx(r,i+2); idx = fixindex(idx); e = &(r->elt[idx]); for ( ; idx < r->len; idx++, e++ ) sum -= e->val*tmp_ve[e->col]; } else /* onebyone */ { /* for ( j = i+1; j < n; j++ ) sum -= A_me[i][j]*tmp_ve[j]; */ r = &(A->row[i]); idx = sprow_idx(r,i+1); idx = fixindex(idx); e = &(r->elt[idx]); for ( ; idx < r->len; idx++, e++ ) sum -= e->val*tmp_ve[e->col]; } tmp_ve[i] = sum; } /* printf("# BKPsolve: solving L^T part: tmp =\n");v_output(tmp); */ /* and do final permutation */ x = pxinv_vec(pivot,tmp,x); return x; } neuron-7.5/src/mesch/spchfctr.c000077500000000000000000000370271323325274500165630ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse Cholesky factorisation code To be used with sparse.h, sparse.c etc */ static char rcsid[] = "spchfctr.c,v 1.1 1997/12/04 17:55:51 hines Exp"; #include #include "sparse2.h" #include #ifndef MALLOCDECL #ifndef ANSI_C extern char *calloc(), *realloc(); #endif #endif /* sprow_ip -- finds the (partial) inner product of a pair of sparse rows -- uses a "merging" approach & assumes column ordered rows -- row indices for inner product are all < lim */ double sprow_ip(row1, row2, lim) SPROW *row1, *row2; int lim; { int idx1, idx2, len1, len2, tmp; int sprow_idx(); register row_elt *elts1, *elts2; register Real sum; elts1 = row1->elt; elts2 = row2->elt; len1 = row1->len; len2 = row2->len; sum = 0.0; if ( len1 <= 0 || len2 <= 0 ) return 0.0; if ( elts1->col >= lim || elts2->col >= lim ) return 0.0; /* use sprow_idx() to speed up inner product where one row is much longer than the other */ idx1 = idx2 = 0; if ( len1 > 2*len2 ) { idx1 = sprow_idx(row1,elts2->col); idx1 = (idx1 < 0) ? -(idx1+2) : idx1; if ( idx1 < 0 ) error(E_UNKNOWN,"sprow_ip"); len1 -= idx1; } else if ( len2 > 2*len1 ) { idx2 = sprow_idx(row2,elts1->col); idx2 = (idx2 < 0) ? -(idx2+2) : idx2; if ( idx2 < 0 ) error(E_UNKNOWN,"sprow_ip"); len2 -= idx2; } if ( len1 <= 0 || len2 <= 0 ) return 0.0; elts1 = &(elts1[idx1]); elts2 = &(elts2[idx2]); for ( ; ; ) /* forever do... */ { if ( (tmp=elts1->col-elts2->col) < 0 ) { len1--; elts1++; if ( ! len1 || elts1->col >= lim ) break; } else if ( tmp > 0 ) { len2--; elts2++; if ( ! len2 || elts2->col >= lim ) break; } else { sum += elts1->val * elts2->val; len1--; elts1++; len2--; elts2++; if ( ! len1 || ! len2 || elts1->col >= lim || elts2->col >= lim ) break; } } return sum; } /* sprow_sqr -- returns same as sprow_ip(row, row, lim) */ double sprow_sqr(row, lim) SPROW *row; int lim; { register row_elt *elts; int idx, len; register Real sum, tmp; sum = 0.0; elts = row->elt; len = row->len; for ( idx = 0; idx < len; idx++, elts++ ) { if ( elts->col >= lim ) break; tmp = elts->val; sum += tmp*tmp; } return sum; } static int *scan_row = (int *)NULL, *scan_idx = (int *)NULL, *col_list = (int *)NULL; static int scan_len = 0; /* set_scan -- expand scan_row and scan_idx arrays -- return new length */ int set_scan(new_len) int new_len; { if ( new_len <= scan_len ) return scan_len; if ( new_len <= scan_len+5 ) new_len += 5; if ( ! scan_row || ! scan_idx || ! col_list ) { scan_row = (int *)calloc(new_len,sizeof(int)); scan_idx = (int *)calloc(new_len,sizeof(int)); col_list = (int *)calloc(new_len,sizeof(int)); } else { scan_row = (int *)realloc((char *)scan_row,new_len*sizeof(int)); scan_idx = (int *)realloc((char *)scan_idx,new_len*sizeof(int)); col_list = (int *)realloc((char *)col_list,new_len*sizeof(int)); } if ( ! scan_row || ! scan_idx || ! col_list ) error(E_MEM,"set_scan"); return new_len; } /* spCHfactor -- sparse Cholesky factorisation -- only the lower triangular part of A (incl. diagonal) is used */ SPMAT *spCHfactor(A) SPMAT *A; { register int i; int idx, k, m, minim, n, num_scan, diag_idx, tmp1; Real pivot, tmp2; SPROW *r_piv, *r_op; row_elt *elt_piv, *elt_op, *old_elt; if ( A == SMNULL ) error(E_NULL,"spCHfactor"); if ( A->m != A->n ) error(E_SQUARE,"spCHfactor"); /* set up access paths if not already done so */ sp_col_access(A); sp_diag_access(A); /* printf("spCHfactor() -- checkpoint 1\n"); */ m = A->m; n = A->n; for ( k = 0; k < m; k++ ) { r_piv = &(A->row[k]); if ( r_piv->len > scan_len ) set_scan(r_piv->len); elt_piv = r_piv->elt; diag_idx = sprow_idx2(r_piv,k,r_piv->diag); if ( diag_idx < 0 ) error(E_POSDEF,"spCHfactor"); old_elt = &(elt_piv[diag_idx]); for ( i = 0; i < r_piv->len; i++ ) { if ( elt_piv[i].col > k ) break; col_list[i] = elt_piv[i].col; scan_row[i] = elt_piv[i].nxt_row; scan_idx[i] = elt_piv[i].nxt_idx; } /* printf("spCHfactor() -- checkpoint 2\n"); */ num_scan = i; /* number of actual entries in scan_row etc. */ /* printf("num_scan = %d\n",num_scan); */ /* set diagonal entry of Cholesky factor */ tmp2 = elt_piv[diag_idx].val - sprow_sqr(r_piv,k); if ( tmp2 <= 0.0 ) error(E_POSDEF,"spCHfactor"); elt_piv[diag_idx].val = pivot = sqrt(tmp2); /* now set the k-th column of the Cholesky factors */ /* printf("k = %d\n",k); */ for ( ; ; ) /* forever do... */ { /* printf("spCHfactor() -- checkpoint 3\n"); */ /* find next row where something (non-trivial) happens i.e. find min(scan_row) */ /* printf("scan_row: "); */ minim = n; for ( i = 0; i < num_scan; i++ ) { tmp1 = scan_row[i]; /* printf("%d ",tmp1); */ minim = ( tmp1 >= 0 && tmp1 < minim ) ? tmp1 : minim; } /* printf("minim = %d\n",minim); */ /* printf("col_list: "); */ /********************************************************************** for ( i = 0; i < num_scan; i++ ) printf("%d ",col_list[i]); printf("\n"); **********************************************************************/ if ( minim >= n ) break; /* nothing more to do for this column */ r_op = &(A->row[minim]); elt_op = r_op->elt; /* set next entry in column k of Cholesky factors */ idx = sprow_idx2(r_op,k,scan_idx[num_scan-1]); if ( idx < 0 ) { /* fill-in */ sp_set_val(A,minim,k, -sprow_ip(r_piv,r_op,k)/pivot); /* in case a realloc() has occurred... */ elt_op = r_op->elt; /* now set up column access path again */ idx = sprow_idx2(r_op,k,-(idx+2)); tmp1 = old_elt->nxt_row; old_elt->nxt_row = minim; r_op->elt[idx].nxt_row = tmp1; tmp1 = old_elt->nxt_idx; old_elt->nxt_idx = idx; r_op->elt[idx].nxt_idx = tmp1; } else elt_op[idx].val = (elt_op[idx].val - sprow_ip(r_piv,r_op,k))/pivot; /* printf("spCHfactor() -- checkpoint 4\n"); */ /* remember current element in column k for column chain */ idx = sprow_idx2(r_op,k,idx); old_elt = &(r_op->elt[idx]); /* update scan_row */ /* printf("spCHfactor() -- checkpoint 5\n"); */ /* printf("minim = %d\n",minim); */ for ( i = 0; i < num_scan; i++ ) { if ( scan_row[i] != minim ) continue; idx = sprow_idx2(r_op,col_list[i],scan_idx[i]); if ( idx < 0 ) { scan_row[i] = -1; continue; } scan_row[i] = elt_op[idx].nxt_row; scan_idx[i] = elt_op[idx].nxt_idx; /* printf("scan_row[%d] = %d\n",i,scan_row[i]); */ /* printf("scan_idx[%d] = %d\n",i,scan_idx[i]); */ } } /* printf("spCHfactor() -- checkpoint 6\n"); */ /* sp_dump(stdout,A); */ /* printf("\n\n\n"); */ } return A; } /* spCHsolve -- solve L.L^T.out=b where L is a sparse matrix, -- out, b dense vectors -- returns out; operation may be in-situ */ VEC *spCHsolve(L,b,out) SPMAT *L; VEC *b, *out; { int i, j_idx, n, scan_idx, scan_row; SPROW *row; row_elt *elt; Real diag_val, sum, *out_ve; if ( L == SMNULL || b == VNULL ) error(E_NULL,"spCHsolve"); if ( L->m != L->n ) error(E_SQUARE,"spCHsolve"); if ( b->dim != L->m ) error(E_SIZES,"spCHsolve"); if ( ! L->flag_col ) sp_col_access(L); if ( ! L->flag_diag ) sp_diag_access(L); out = v_copy(b,out); out_ve = out->ve; /* forward substitution: solve L.x=b for x */ n = L->n; for ( i = 0; i < n; i++ ) { sum = out_ve[i]; row = &(L->row[i]); elt = row->elt; for ( j_idx = 0; j_idx < row->len; j_idx++, elt++ ) { if ( elt->col >= i ) break; sum -= elt->val*out_ve[elt->col]; } if ( row->diag >= 0 ) out_ve[i] = sum/(row->elt[row->diag].val); else error(E_SING,"spCHsolve"); } /* backward substitution: solve L^T.out = x for out */ for ( i = n-1; i >= 0; i-- ) { sum = out_ve[i]; row = &(L->row[i]); /* Note that row->diag >= 0 by above loop */ elt = &(row->elt[row->diag]); diag_val = elt->val; /* scan down column */ scan_idx = elt->nxt_idx; scan_row = elt->nxt_row; while ( scan_row >= 0 /* && scan_idx >= 0 */ ) { row = &(L->row[scan_row]); elt = &(row->elt[scan_idx]); sum -= elt->val*out_ve[scan_row]; scan_idx = elt->nxt_idx; scan_row = elt->nxt_row; } out_ve[i] = sum/diag_val; } return out; } /* spICHfactor -- sparse Incomplete Cholesky factorisation -- does a Cholesky factorisation assuming NO FILL-IN -- as for spCHfactor(), only the lower triangular part of A is used */ SPMAT *spICHfactor(A) SPMAT *A; { int k, m, n, nxt_row, nxt_idx, diag_idx; Real pivot, tmp2; SPROW *r_piv, *r_op; row_elt *elt_piv, *elt_op; if ( A == SMNULL ) error(E_NULL,"spICHfactor"); if ( A->m != A->n ) error(E_SQUARE,"spICHfactor"); /* set up access paths if not already done so */ if ( ! A->flag_col ) sp_col_access(A); if ( ! A->flag_diag ) sp_diag_access(A); m = A->m; n = A->n; for ( k = 0; k < m; k++ ) { r_piv = &(A->row[k]); diag_idx = r_piv->diag; if ( diag_idx < 0 ) error(E_POSDEF,"spICHfactor"); elt_piv = r_piv->elt; /* set diagonal entry of Cholesky factor */ tmp2 = elt_piv[diag_idx].val - sprow_sqr(r_piv,k); if ( tmp2 <= 0.0 ) error(E_POSDEF,"spICHfactor"); elt_piv[diag_idx].val = pivot = sqrt(tmp2); /* find next row where something (non-trivial) happens */ nxt_row = elt_piv[diag_idx].nxt_row; nxt_idx = elt_piv[diag_idx].nxt_idx; /* now set the k-th column of the Cholesky factors */ while ( nxt_row >= 0 && nxt_idx >= 0 ) { /* nxt_row and nxt_idx give next next row (& index) of the entry to be modified */ r_op = &(A->row[nxt_row]); elt_op = r_op->elt; elt_op[nxt_idx].val = (elt_op[nxt_idx].val - sprow_ip(r_piv,r_op,k))/pivot; nxt_row = elt_op[nxt_idx].nxt_row; nxt_idx = elt_op[nxt_idx].nxt_idx; } } return A; } /* spCHsymb -- symbolic sparse Cholesky factorisation -- does NOT do any floating point arithmetic; just sets up the structure -- only the lower triangular part of A (incl. diagonal) is used */ SPMAT *spCHsymb(A) SPMAT *A; { register int i; int idx, k, m, minim, n, num_scan, diag_idx, tmp1; SPROW *r_piv, *r_op; row_elt *elt_piv, *elt_op, *old_elt; if ( A == SMNULL ) error(E_NULL,"spCHsymb"); if ( A->m != A->n ) error(E_SQUARE,"spCHsymb"); /* set up access paths if not already done so */ if ( ! A->flag_col ) sp_col_access(A); if ( ! A->flag_diag ) sp_diag_access(A); /* printf("spCHsymb() -- checkpoint 1\n"); */ m = A->m; n = A->n; for ( k = 0; k < m; k++ ) { r_piv = &(A->row[k]); if ( r_piv->len > scan_len ) set_scan(r_piv->len); elt_piv = r_piv->elt; diag_idx = sprow_idx2(r_piv,k,r_piv->diag); if ( diag_idx < 0 ) error(E_POSDEF,"spCHsymb"); old_elt = &(elt_piv[diag_idx]); for ( i = 0; i < r_piv->len; i++ ) { if ( elt_piv[i].col > k ) break; col_list[i] = elt_piv[i].col; scan_row[i] = elt_piv[i].nxt_row; scan_idx[i] = elt_piv[i].nxt_idx; } /* printf("spCHsymb() -- checkpoint 2\n"); */ num_scan = i; /* number of actual entries in scan_row etc. */ /* printf("num_scan = %d\n",num_scan); */ /* now set the k-th column of the Cholesky factors */ /* printf("k = %d\n",k); */ for ( ; ; ) /* forever do... */ { /* printf("spCHsymb() -- checkpoint 3\n"); */ /* find next row where something (non-trivial) happens i.e. find min(scan_row) */ minim = n; for ( i = 0; i < num_scan; i++ ) { tmp1 = scan_row[i]; /* printf("%d ",tmp1); */ minim = ( tmp1 >= 0 && tmp1 < minim ) ? tmp1 : minim; } if ( minim >= n ) break; /* nothing more to do for this column */ r_op = &(A->row[minim]); elt_op = r_op->elt; /* set next entry in column k of Cholesky factors */ idx = sprow_idx2(r_op,k,scan_idx[num_scan-1]); if ( idx < 0 ) { /* fill-in */ sp_set_val(A,minim,k,0.0); /* in case a realloc() has occurred... */ elt_op = r_op->elt; /* now set up column access path again */ idx = sprow_idx2(r_op,k,-(idx+2)); tmp1 = old_elt->nxt_row; old_elt->nxt_row = minim; r_op->elt[idx].nxt_row = tmp1; tmp1 = old_elt->nxt_idx; old_elt->nxt_idx = idx; r_op->elt[idx].nxt_idx = tmp1; } /* printf("spCHsymb() -- checkpoint 4\n"); */ /* remember current element in column k for column chain */ idx = sprow_idx2(r_op,k,idx); old_elt = &(r_op->elt[idx]); /* update scan_row */ /* printf("spCHsymb() -- checkpoint 5\n"); */ /* printf("minim = %d\n",minim); */ for ( i = 0; i < num_scan; i++ ) { if ( scan_row[i] != minim ) continue; idx = sprow_idx2(r_op,col_list[i],scan_idx[i]); if ( idx < 0 ) { scan_row[i] = -1; continue; } scan_row[i] = elt_op[idx].nxt_row; scan_idx[i] = elt_op[idx].nxt_idx; /* printf("scan_row[%d] = %d\n",i,scan_row[i]); */ /* printf("scan_idx[%d] = %d\n",i,scan_idx[i]); */ } } /* printf("spCHsymb() -- checkpoint 6\n"); */ } return A; } /* comp_AAT -- compute A.A^T where A is a given sparse matrix */ SPMAT *comp_AAT(A) SPMAT *A; { SPMAT *AAT; SPROW *r, *r2; row_elt *elts, *elts2; int i, idx, idx2, j, m, minim, n, num_scan, tmp1; Real ip; if ( ! A ) error(E_NULL,"comp_AAT"); m = A->m; n = A->n; /* set up column access paths */ if ( ! A->flag_col ) sp_col_access(A); AAT = sp_get(m,m,10); for ( i = 0; i < m; i++ ) { /* initialisation */ r = &(A->row[i]); elts = r->elt; /* set up scan lists for this row */ if ( r->len > scan_len ) set_scan(r->len); for ( j = 0; j < r->len; j++ ) { col_list[j] = elts[j].col; scan_row[j] = elts[j].nxt_row; scan_idx[j] = elts[j].nxt_idx; } num_scan = r->len; /* scan down the rows for next non-zero not associated with a diagonal entry */ for ( ; ; ) { minim = m; for ( idx = 0; idx < num_scan; idx++ ) { tmp1 = scan_row[idx]; minim = ( tmp1 >= 0 && tmp1 < minim ) ? tmp1 : minim; } if ( minim >= m ) break; r2 = &(A->row[minim]); if ( minim > i ) { ip = sprow_ip(r,r2,n); sp_set_val(AAT,minim,i,ip); sp_set_val(AAT,i,minim,ip); } /* update scan entries */ elts2 = r2->elt; for ( idx = 0; idx < num_scan; idx++ ) { if ( scan_row[idx] != minim || scan_idx[idx] < 0 ) continue; idx2 = scan_idx[idx]; scan_row[idx] = elts2[idx2].nxt_row; scan_idx[idx] = elts2[idx2].nxt_idx; } } /* set the diagonal entry */ sp_set_val(AAT,i,i,sprow_sqr(r,n)); } return AAT; } neuron-7.5/src/mesch/splufctr.c000077500000000000000000000251231323325274500166030ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse LU factorisation See also: sparse.[ch] etc for details about sparse matrices */ #include #include "sparse2.h" #include /* Macro for speedup */ /* #define sprow_idx2(r,c,hint) \ ( ( (hint) >= 0 && (r)->elt[hint].col == (c)) ? hint : sprow_idx((r),(c)) ) */ /* spLUfactor -- sparse LU factorisation with pivoting -- uses partial pivoting and Markowitz criterion |a[p][k]| >= alpha * max_i |a[i][k]| -- creates fill-in as needed -- in situ factorisation */ SPMAT *spLUfactor(A,px,alpha) SPMAT *A; PERM *px; double alpha; { int i, best_i, k, idx, len, best_len, m, n; SPROW *r, *r_piv, tmp_row; static SPROW *merge = (SPROW *)NULL; Real max_val, tmp; static VEC *col_vals=VNULL; if ( ! A || ! px ) error(E_NULL,"spLUfctr"); if ( alpha <= 0.0 || alpha > 1.0 ) error(E_RANGE,"alpha in spLUfctr"); if ( px->size <= A->m ) px = px_resize(px,A->m); px_ident(px); col_vals = v_resize(col_vals,A->m); MEM_STAT_REG(col_vals,TYPE_VEC); m = A->m; n = A->n; if ( ! A->flag_col ) sp_col_access(A); if ( ! A->flag_diag ) sp_diag_access(A); A->flag_col = A->flag_diag = FALSE; if ( ! merge ) { merge = sprow_get(20); MEM_STAT_REG(merge,TYPE_SPROW); } for ( k = 0; k < n; k++ ) { /* find pivot row/element for partial pivoting */ /* get first row with a non-zero entry in the k-th column */ max_val = 0.0; for ( i = k; i < m; i++ ) { r = &(A->row[i]); idx = sprow_idx(r,k); if ( idx < 0 ) tmp = 0.0; else tmp = r->elt[idx].val; if ( fabs(tmp) > max_val ) max_val = fabs(tmp); col_vals->ve[i] = tmp; } if ( max_val == 0.0 ) continue; best_len = n+1; /* only if no possibilities */ best_i = -1; for ( i = k; i < m; i++ ) { tmp = fabs(col_vals->ve[i]); if ( tmp == 0.0 ) continue; if ( tmp >= alpha*max_val ) { r = &(A->row[i]); idx = sprow_idx(r,k); len = (r->len) - idx; if ( len < best_len ) { best_len = len; best_i = i; } } } /* swap row #best_i with row #k */ MEM_COPY(&(A->row[best_i]),&tmp_row,sizeof(SPROW)); MEM_COPY(&(A->row[k]),&(A->row[best_i]),sizeof(SPROW)); MEM_COPY(&tmp_row,&(A->row[k]),sizeof(SPROW)); /* swap col_vals entries */ tmp = col_vals->ve[best_i]; col_vals->ve[best_i] = col_vals->ve[k]; col_vals->ve[k] = tmp; px_transp(px,k,best_i); r_piv = &(A->row[k]); for ( i = k+1; i < n; i++ ) { /* compute and set multiplier */ tmp = col_vals->ve[i]/col_vals->ve[k]; if ( tmp != 0.0 ) sp_set_val(A,i,k,tmp); else continue; /* perform row operations */ merge->len = 0; r = &(A->row[i]); sprow_mltadd(r,r_piv,-tmp,k+1,merge,TYPE_SPROW); idx = sprow_idx(r,k+1); if ( idx < 0 ) idx = -(idx+2); /* see if r needs expanding */ if ( r->maxlen < idx + merge->len ) sprow_xpd(r,idx+merge->len,TYPE_SPMAT); r->len = idx+merge->len; MEM_COPY((char *)(merge->elt),(char *)&(r->elt[idx]), merge->len*sizeof(row_elt)); } } return A; } /* spLUsolve -- solve A.x = b using factored matrix A from spLUfactor() -- returns x -- may not be in-situ */ VEC *spLUsolve(A,pivot,b,x) SPMAT *A; PERM *pivot; VEC *b, *x; { int i, idx, len, lim; Real sum, *x_ve; SPROW *r; row_elt *elt; if ( ! A || ! b ) error(E_NULL,"spLUsolve"); if ( (pivot != PNULL && A->m != pivot->size) || A->m != b->dim ) error(E_SIZES,"spLUsolve"); if ( ! x || x->dim != A->n ) x = v_resize(x,A->n); if ( pivot != PNULL ) x = px_vec(pivot,b,x); else x = v_copy(b,x); x_ve = x->ve; lim = min(A->m,A->n); for ( i = 0; i < lim; i++ ) { sum = x_ve[i]; r = &(A->row[i]); len = r->len; elt = r->elt; for ( idx = 0; idx < len && elt->col < i; idx++, elt++ ) sum -= elt->val*x_ve[elt->col]; x_ve[i] = sum; } for ( i = lim-1; i >= 0; i-- ) { sum = x_ve[i]; r = &(A->row[i]); len = r->len; elt = &(r->elt[len-1]); for ( idx = len-1; idx >= 0 && elt->col > i; idx--, elt-- ) sum -= elt->val*x_ve[elt->col]; if ( idx < 0 || elt->col != i || elt->val == 0.0 ) error(E_SING,"spLUsolve"); x_ve[i] = sum/elt->val; } return x; } /* spLUTsolve -- solve A.x = b using factored matrix A from spLUfactor() -- returns x -- may not be in-situ */ VEC *spLUTsolve(A,pivot,b,x) SPMAT *A; PERM *pivot; VEC *b, *x; { int i, idx, lim, rownum; Real sum, *tmp_ve; /* SPROW *r; */ row_elt *elt; static VEC *tmp=VNULL; if ( ! A || ! b ) error(E_NULL,"spLUTsolve"); if ( (pivot != PNULL && A->m != pivot->size) || A->m != b->dim ) error(E_SIZES,"spLUTsolve"); tmp = v_copy(b,tmp); MEM_STAT_REG(tmp,TYPE_VEC); if ( ! A->flag_col ) sp_col_access(A); if ( ! A->flag_diag ) sp_diag_access(A); lim = min(A->m,A->n); tmp_ve = tmp->ve; /* solve U^T.tmp = b */ for ( i = 0; i < lim; i++ ) { sum = tmp_ve[i]; rownum = A->start_row[i]; idx = A->start_idx[i]; if ( rownum < 0 || idx < 0 ) error(E_SING,"spLUTsolve"); while ( rownum < i && rownum >= 0 && idx >= 0 ) { elt = &(A->row[rownum].elt[idx]); sum -= elt->val*tmp_ve[rownum]; rownum = elt->nxt_row; idx = elt->nxt_idx; } if ( rownum != i ) error(E_SING,"spLUTsolve"); elt = &(A->row[rownum].elt[idx]); if ( elt->val == 0.0 ) error(E_SING,"spLUTsolve"); tmp_ve[i] = sum/elt->val; } /* now solve L^T.tmp = (old) tmp */ for ( i = lim-1; i >= 0; i-- ) { sum = tmp_ve[i]; rownum = i; idx = A->row[rownum].diag; if ( idx < 0 ) error(E_NULL,"spLUTsolve"); elt = &(A->row[rownum].elt[idx]); rownum = elt->nxt_row; idx = elt->nxt_idx; while ( rownum < lim && rownum >= 0 && idx >= 0 ) { elt = &(A->row[rownum].elt[idx]); sum -= elt->val*tmp_ve[rownum]; rownum = elt->nxt_row; idx = elt->nxt_idx; } tmp_ve[i] = sum; } if ( pivot != PNULL ) x = pxinv_vec(pivot,tmp,x); else x = v_copy(tmp,x); return x; } /* spILUfactor -- sparse modified incomplete LU factorisation with no pivoting -- all pivot entries are ensured to be >= alpha in magnitude -- setting alpha = 0 gives incomplete LU factorisation -- no fill-in is generated -- in situ factorisation */ SPMAT *spILUfactor(A,alpha) SPMAT *A; double alpha; { int i, k, idx, idx_piv, m, n, old_idx, old_idx_piv; SPROW *r, *r_piv; Real piv_val, tmp; /* printf("spILUfactor: entered\n"); */ if ( ! A ) error(E_NULL,"spILUfactor"); if ( alpha < 0.0 ) error(E_RANGE,"[alpha] in spILUfactor"); m = A->m; n = A->n; sp_diag_access(A); sp_col_access(A); for ( k = 0; k < n; k++ ) { /* printf("spILUfactor(l.%d): checkpoint A: k = %d\n",__LINE__,k); */ /* printf("spILUfactor(l.%d): A =\n", __LINE__); */ /* sp_output(A); */ r_piv = &(A->row[k]); idx_piv = r_piv->diag; if ( idx_piv < 0 ) { sprow_set_val(r_piv,k,alpha); idx_piv = sprow_idx(r_piv,k); } /* printf("spILUfactor: checkpoint B\n"); */ if ( idx_piv < 0 ) error(E_BOUNDS,"spILUfactor"); old_idx_piv = idx_piv; piv_val = r_piv->elt[idx_piv].val; /* printf("spILUfactor: checkpoint C\n"); */ if ( fabs(piv_val) < alpha ) piv_val = ( piv_val < 0.0 ) ? -alpha : alpha; if ( piv_val == 0.0 ) /* alpha == 0.0 too! */ error(E_SING,"spILUfactor"); /* go to next row with a non-zero in this column */ i = r_piv->elt[idx_piv].nxt_row; old_idx = idx = r_piv->elt[idx_piv].nxt_idx; while ( i >= k ) { /* printf("spILUfactor: checkpoint D: i = %d\n",i); */ /* perform row operations */ r = &(A->row[i]); /* idx = sprow_idx(r,k); */ /* printf("spLUfactor(l.%d) i = %d, idx = %d\n", __LINE__, i, idx); */ if ( idx < 0 ) { idx = r->elt[old_idx].nxt_idx; i = r->elt[old_idx].nxt_row; continue; } /* printf("spILUfactor: checkpoint E\n"); */ /* compute and set multiplier */ r->elt[idx].val = tmp = r->elt[idx].val/piv_val; /* printf("spILUfactor: piv_val = %g, multiplier = %g\n", piv_val, tmp); */ /* printf("spLUfactor(l.%d) multiplier = %g\n", __LINE__, tmp); */ if ( tmp == 0.0 ) { idx = r->elt[old_idx].nxt_idx; i = r->elt[old_idx].nxt_row; continue; } /* idx = sprow_idx(r,k+1); */ /* if ( idx < 0 ) idx = -(idx+2); */ idx_piv++; idx++; /* now look beyond the multiplier entry */ /* printf("spILUfactor: checkpoint F: idx = %d, idx_piv = %d\n", idx, idx_piv); */ while ( idx_piv < r_piv->len && idx < r->len ) { /* printf("spILUfactor: checkpoint G: idx = %d, idx_piv = %d\n", idx, idx_piv); */ if ( r_piv->elt[idx_piv].col < r->elt[idx].col ) idx_piv++; else if ( r_piv->elt[idx_piv].col > r->elt[idx].col ) idx++; else /* column numbers match */ { /* printf("spILUfactor(l.%d) subtract %g times the ", __LINE__, tmp); */ /* printf("(%d,%d) entry to the (%d,%d) entry\n", k, r_piv->elt[idx_piv].col, i, r->elt[idx].col); */ r->elt[idx].val -= tmp*r_piv->elt[idx_piv].val; idx++; idx_piv++; } } /* bump to next row with a non-zero in column k */ /* printf("spILUfactor(l.%d) column = %d, row[%d] =\n", __LINE__, r->elt[old_idx].col, i); */ /* sprow_foutput(stdout,r); */ i = r->elt[old_idx].nxt_row; old_idx = idx = r->elt[old_idx].nxt_idx; /* printf("spILUfactor(l.%d) i = %d, idx = %d\n", __LINE__, i, idx); */ /* and restore idx_piv to index of pivot entry */ idx_piv = old_idx_piv; } } /* printf("spILUfactor: exiting\n"); */ return A; } neuron-7.5/src/mesch/sprow.c000077500000000000000000000424221323325274500161140ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse rows package See also: sparse.h, matrix.h */ #include #include #include #include "sparse.h" static char rcsid[] = "sprow.c,v 1.1 1997/12/04 17:55:53 hines Exp"; #define MINROWLEN 10 /* sprow_dump - prints relevant information about the sparse row r */ void sprow_dump(fp,r) FILE *fp; SPROW *r; { int j_idx; row_elt *elts; fprintf(fp,"SparseRow dump:\n"); if ( ! r ) { fprintf(fp,"*** NULL row ***\n"); return; } fprintf(fp,"row: len = %d, maxlen = %d, diag idx = %d\n", r->len,r->maxlen,r->diag); fprintf(fp,"element list @ 0x%p\n",(r->elt)); if ( ! r->elt ) { fprintf(fp,"*** NULL element list ***\n"); return; } elts = r->elt; for ( j_idx = 0; j_idx < r->len; j_idx++, elts++ ) fprintf(fp,"Col: %d, Val: %g, nxt_row = %d, nxt_idx = %d\n", elts->col,elts->val,elts->nxt_row,elts->nxt_idx); fprintf(fp,"\n"); } /* sprow_idx -- get index into row for a given column in a given row -- return -1 on error -- return -(idx+2) where idx is index to insertion point */ int sprow_idx(r,col) SPROW *r; int col; { register int lo, hi, mid; int tmp; register row_elt *r_elt; /******************************************* if ( r == (SPROW *)NULL ) return -1; if ( col < 0 ) return -1; *******************************************/ r_elt = r->elt; if ( r->len <= 0 ) return -2; /* try the hint */ /* if ( hint >= 0 && hint < r->len && r_elt[hint].col == col ) return hint; */ /* otherwise use binary search... */ /* code from K&R Ch. 6, p. 125 */ lo = 0; hi = r->len - 1; mid = lo; while ( lo <= hi ) { mid = (hi + lo)/2; if ( (tmp=r_elt[mid].col-col) > 0 ) hi = mid-1; else if ( tmp < 0 ) lo = mid+1; else /* tmp == 0 */ return mid; } tmp = r_elt[mid].col - col; if ( tmp > 0 ) return -(mid+2); /* insert at mid */ else /* tmp < 0 */ return -(mid+3); /* insert at mid+1 */ } /* sprow_get -- gets, initialises and returns a SPROW structure -- max. length is maxlen */ SPROW *sprow_get(maxlen) int maxlen; { SPROW *r; if ( maxlen < 0 ) error(E_NEG,"sprow_get"); r = NEW(SPROW); if ( ! r ) error(E_MEM,"sprow_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPROW,0,sizeof(SPROW)); mem_numvar(TYPE_SPROW,1); } r->elt = NEW_A(maxlen,row_elt); if ( ! r->elt ) error(E_MEM,"sprow_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_SPROW,0,maxlen*sizeof(row_elt)); } r->len = 0; r->maxlen = maxlen; r->diag = -1; return r; } /* sprow_xpd -- expand row by means of realloc() -- type must be TYPE_SPMAT if r is a row of a SPMAT structure, otherwise it must be TYPE_SPROW -- returns r */ SPROW *sprow_xpd(r,n,type) SPROW *r; int n,type; { int newlen; if ( ! r ) { r = NEW(SPROW); if (! r ) error(E_MEM,"sprow_xpd"); else if ( mem_info_is_on()) { if (type != TYPE_SPMAT && type != TYPE_SPROW) warning(WARN_WRONG_TYPE,"sprow_xpd"); mem_bytes(type,0,sizeof(SPROW)); if (type == TYPE_SPROW) mem_numvar(type,1); } } if ( ! r->elt ) { r->elt = NEW_A((unsigned)n,row_elt); if ( ! r->elt ) error(E_MEM,"sprow_xpd"); else if (mem_info_is_on()) { mem_bytes(type,0,n*sizeof(row_elt)); } r->len = 0; r->maxlen = n; return r; } if ( n <= r->len ) newlen = max(2*r->len + 1,MINROWLEN); else newlen = n; if ( newlen <= r->maxlen ) { MEM_ZERO((char *)(&(r->elt[r->len])), (newlen-r->len)*sizeof(row_elt)); r->len = newlen; } else { if (mem_info_is_on()) { mem_bytes(type,r->maxlen*sizeof(row_elt), newlen*sizeof(row_elt)); } r->elt = RENEW(r->elt,newlen,row_elt); if ( ! r->elt ) error(E_MEM,"sprow_xpd"); r->maxlen = newlen; r->len = newlen; } return r; } /* sprow_resize -- resize a SPROW variable by means of realloc() -- n is a new size -- returns r */ SPROW *sprow_resize(r,n,type) SPROW *r; int n,type; { if (n < 0) error(E_NEG,"sprow_resize"); if ( ! r ) return sprow_get(n); if (n == r->len) return r; if ( ! r->elt ) { r->elt = NEW_A((unsigned)n,row_elt); if ( ! r->elt ) error(E_MEM,"sprow_resize"); else if (mem_info_is_on()) { mem_bytes(type,0,n*sizeof(row_elt)); } r->maxlen = r->len = n; return r; } if ( n <= r->maxlen ) r->len = n; else { if (mem_info_is_on()) { mem_bytes(type,r->maxlen*sizeof(row_elt), n*sizeof(row_elt)); } r->elt = RENEW(r->elt,n,row_elt); if ( ! r->elt ) error(E_MEM,"sprow_resize"); r->maxlen = r->len = n; } return r; } /* release a row of a matrix */ int sprow_free(r) SPROW *r; { if ( ! r ) return -1; if (mem_info_is_on()) { mem_bytes(TYPE_SPROW,sizeof(SPROW),0); mem_numvar(TYPE_SPROW,-1); } if ( r->elt ) { if (mem_info_is_on()) { mem_bytes(TYPE_SPROW,r->maxlen*sizeof(row_elt),0); } free((char *)r->elt); } free((char *)r); return 0; } /* sprow_merge -- merges r1 and r2 into r_out -- cannot be done in-situ -- type must be SPMAT or SPROW depending on whether r_out is a row of a SPMAT structure or a SPROW variable -- returns r_out */ SPROW *sprow_merge(r1,r2,r_out,type) SPROW *r1, *r2, *r_out; int type; { int idx1, idx2, idx_out, len1, len2, len_out; row_elt *elt1, *elt2, *elt_out; if ( ! r1 || ! r2 ) error(E_NULL,"sprow_merge"); if ( ! r_out ) r_out = sprow_get(MINROWLEN); if ( r1 == r_out || r2 == r_out ) error(E_INSITU,"sprow_merge"); /* Initialise */ len1 = r1->len; len2 = r2->len; len_out = r_out->maxlen; idx1 = idx2 = idx_out = 0; elt1 = r1->elt; elt2 = r2->elt; elt_out = r_out->elt; while ( idx1 < len1 || idx2 < len2 ) { if ( idx_out >= len_out ) { /* r_out is too small */ r_out->len = idx_out; r_out = sprow_xpd(r_out,0,type); len_out = r_out->len; elt_out = &(r_out->elt[idx_out]); } if ( idx2 >= len2 || (idx1 < len1 && elt1->col <= elt2->col) ) { elt_out->col = elt1->col; elt_out->val = elt1->val; if ( elt1->col == elt2->col && idx2 < len2 ) { elt2++; idx2++; } elt1++; idx1++; } else { elt_out->col = elt2->col; elt_out->val = elt2->val; elt2++; idx2++; } elt_out++; idx_out++; } r_out->len = idx_out; return r_out; } /* sprow_copy -- copies r1 and r2 into r_out -- cannot be done in-situ -- type must be SPMAT or SPROW depending on whether r_out is a row of a SPMAT structure or a SPROW variable -- returns r_out */ SPROW *sprow_copy(r1,r2,r_out,type) SPROW *r1, *r2, *r_out; int type; { int idx1, idx2, idx_out, len1, len2, len_out; row_elt *elt1, *elt2, *elt_out; if ( ! r1 || ! r2 ) error(E_NULL,"sprow_copy"); if ( ! r_out ) r_out = sprow_get(MINROWLEN); if ( r1 == r_out || r2 == r_out ) error(E_INSITU,"sprow_copy"); /* Initialise */ len1 = r1->len; len2 = r2->len; len_out = r_out->maxlen; idx1 = idx2 = idx_out = 0; elt1 = r1->elt; elt2 = r2->elt; elt_out = r_out->elt; while ( idx1 < len1 || idx2 < len2 ) { while ( idx_out >= len_out ) { /* r_out is too small */ r_out->len = idx_out; r_out = sprow_xpd(r_out,0,type); len_out = r_out->maxlen; elt_out = &(r_out->elt[idx_out]); } if ( idx2 >= len2 || (idx1 < len1 && elt1->col <= elt2->col) ) { elt_out->col = elt1->col; elt_out->val = elt1->val; if ( elt1->col == elt2->col && idx2 < len2 ) { elt2++; idx2++; } elt1++; idx1++; } else { elt_out->col = elt2->col; elt_out->val = 0.0; elt2++; idx2++; } elt_out++; idx_out++; } r_out->len = idx_out; return r_out; } /* sprow_mltadd -- sets r_out <- r1 + alpha.r2 -- cannot be in situ -- only for columns j0, j0+1, ... -- type must be SPMAT or SPROW depending on whether r_out is a row of a SPMAT structure or a SPROW variable -- returns r_out */ SPROW *sprow_mltadd(r1,r2,alpha,j0,r_out,type) SPROW *r1, *r2, *r_out; double alpha; int j0, type; { int idx1, idx2, idx_out, len1, len2, len_out; row_elt *elt1, *elt2, *elt_out; if ( ! r1 || ! r2 ) error(E_NULL,"sprow_mltadd"); if ( r1 == r_out || r2 == r_out ) error(E_INSITU,"sprow_mltadd"); if ( j0 < 0 ) error(E_BOUNDS,"sprow_mltadd"); if ( ! r_out ) r_out = sprow_get(MINROWLEN); /* Initialise */ len1 = r1->len; len2 = r2->len; len_out = r_out->maxlen; /* idx1 = idx2 = idx_out = 0; */ idx1 = sprow_idx(r1,j0); idx2 = sprow_idx(r2,j0); idx_out = sprow_idx(r_out,j0); idx1 = (idx1 < 0) ? -(idx1+2) : idx1; idx2 = (idx2 < 0) ? -(idx2+2) : idx2; idx_out = (idx_out < 0) ? -(idx_out+2) : idx_out; elt1 = &(r1->elt[idx1]); elt2 = &(r2->elt[idx2]); elt_out = &(r_out->elt[idx_out]); while ( idx1 < len1 || idx2 < len2 ) { if ( idx_out >= len_out ) { /* r_out is too small */ r_out->len = idx_out; r_out = sprow_xpd(r_out,0,type); len_out = r_out->maxlen; elt_out = &(r_out->elt[idx_out]); } if ( idx2 >= len2 || (idx1 < len1 && elt1->col <= elt2->col) ) { elt_out->col = elt1->col; elt_out->val = elt1->val; if ( idx2 < len2 && elt1->col == elt2->col ) { elt_out->val += alpha*elt2->val; elt2++; idx2++; } elt1++; idx1++; } else { elt_out->col = elt2->col; elt_out->val = alpha*elt2->val; elt2++; idx2++; } elt_out++; idx_out++; } r_out->len = idx_out; return r_out; } /* sprow_add -- sets r_out <- r1 + r2 -- cannot be in situ -- only for columns j0, j0+1, ... -- type must be SPMAT or SPROW depending on whether r_out is a row of a SPMAT structure or a SPROW variable -- returns r_out */ SPROW *sprow_add(r1,r2,j0,r_out,type) SPROW *r1, *r2, *r_out; int j0, type; { int idx1, idx2, idx_out, len1, len2, len_out; row_elt *elt1, *elt2, *elt_out; if ( ! r1 || ! r2 ) error(E_NULL,"sprow_add"); if ( r1 == r_out || r2 == r_out ) error(E_INSITU,"sprow_add"); if ( j0 < 0 ) error(E_BOUNDS,"sprow_add"); if ( ! r_out ) r_out = sprow_get(MINROWLEN); /* Initialise */ len1 = r1->len; len2 = r2->len; len_out = r_out->maxlen; /* idx1 = idx2 = idx_out = 0; */ idx1 = sprow_idx(r1,j0); idx2 = sprow_idx(r2,j0); idx_out = sprow_idx(r_out,j0); idx1 = (idx1 < 0) ? -(idx1+2) : idx1; idx2 = (idx2 < 0) ? -(idx2+2) : idx2; idx_out = (idx_out < 0) ? -(idx_out+2) : idx_out; elt1 = &(r1->elt[idx1]); elt2 = &(r2->elt[idx2]); elt_out = &(r_out->elt[idx_out]); while ( idx1 < len1 || idx2 < len2 ) { if ( idx_out >= len_out ) { /* r_out is too small */ r_out->len = idx_out; r_out = sprow_xpd(r_out,0,type); len_out = r_out->maxlen; elt_out = &(r_out->elt[idx_out]); } if ( idx2 >= len2 || (idx1 < len1 && elt1->col <= elt2->col) ) { elt_out->col = elt1->col; elt_out->val = elt1->val; if ( idx2 < len2 && elt1->col == elt2->col ) { elt_out->val += elt2->val; elt2++; idx2++; } elt1++; idx1++; } else { elt_out->col = elt2->col; elt_out->val = elt2->val; elt2++; idx2++; } elt_out++; idx_out++; } r_out->len = idx_out; return r_out; } /* sprow_sub -- sets r_out <- r1 - r2 -- cannot be in situ -- only for columns j0, j0+1, ... -- type must be SPMAT or SPROW depending on whether r_out is a row of a SPMAT structure or a SPROW variable -- returns r_out */ SPROW *sprow_sub(r1,r2,j0,r_out,type) SPROW *r1, *r2, *r_out; int j0, type; { int idx1, idx2, idx_out, len1, len2, len_out; row_elt *elt1, *elt2, *elt_out; if ( ! r1 || ! r2 ) error(E_NULL,"sprow_sub"); if ( r1 == r_out || r2 == r_out ) error(E_INSITU,"sprow_sub"); if ( j0 < 0 ) error(E_BOUNDS,"sprow_sub"); if ( ! r_out ) r_out = sprow_get(MINROWLEN); /* Initialise */ len1 = r1->len; len2 = r2->len; len_out = r_out->maxlen; /* idx1 = idx2 = idx_out = 0; */ idx1 = sprow_idx(r1,j0); idx2 = sprow_idx(r2,j0); idx_out = sprow_idx(r_out,j0); idx1 = (idx1 < 0) ? -(idx1+2) : idx1; idx2 = (idx2 < 0) ? -(idx2+2) : idx2; idx_out = (idx_out < 0) ? -(idx_out+2) : idx_out; elt1 = &(r1->elt[idx1]); elt2 = &(r2->elt[idx2]); elt_out = &(r_out->elt[idx_out]); while ( idx1 < len1 || idx2 < len2 ) { if ( idx_out >= len_out ) { /* r_out is too small */ r_out->len = idx_out; r_out = sprow_xpd(r_out,0,type); len_out = r_out->maxlen; elt_out = &(r_out->elt[idx_out]); } if ( idx2 >= len2 || (idx1 < len1 && elt1->col <= elt2->col) ) { elt_out->col = elt1->col; elt_out->val = elt1->val; if ( idx2 < len2 && elt1->col == elt2->col ) { elt_out->val -= elt2->val; elt2++; idx2++; } elt1++; idx1++; } else { elt_out->col = elt2->col; elt_out->val = -elt2->val; elt2++; idx2++; } elt_out++; idx_out++; } r_out->len = idx_out; return r_out; } /* sprow_smlt -- sets r_out <- alpha*r1 -- can be in situ -- only for columns j0, j0+1, ... -- returns r_out */ SPROW *sprow_smlt(r1,alpha,j0,r_out,type) SPROW *r1, *r_out; double alpha; int j0, type; { int idx1, idx_out, len1; row_elt *elt1, *elt_out; if ( ! r1 ) error(E_NULL,"sprow_smlt"); if ( j0 < 0 ) error(E_BOUNDS,"sprow_smlt"); if ( ! r_out ) r_out = sprow_get(MINROWLEN); /* Initialise */ len1 = r1->len; idx1 = sprow_idx(r1,j0); idx_out = sprow_idx(r_out,j0); idx1 = (idx1 < 0) ? -(idx1+2) : idx1; idx_out = (idx_out < 0) ? -(idx_out+2) : idx_out; elt1 = &(r1->elt[idx1]); r_out = sprow_resize(r_out,idx_out+len1-idx1,type); elt_out = &(r_out->elt[idx_out]); for ( ; idx1 < len1; elt1++,elt_out++,idx1++,idx_out++ ) { elt_out->col = elt1->col; elt_out->val = alpha*elt1->val; } r_out->len = idx_out; return r_out; } /* sprow_foutput -- print a representation of r on stream fp */ void sprow_foutput(fp,r) FILE *fp; SPROW *r; { int i, len; row_elt *e; if ( ! r ) { fprintf(fp,"SparseRow: **** NULL ****\n"); return; } len = r->len; fprintf(fp,"SparseRow: length: %d\n",len); for ( i = 0, e = r->elt; i < len; i++, e++ ) fprintf(fp,"Column %d: %g, next row: %d, next index %d\n", e->col, e->val, e->nxt_row, e->nxt_idx); } /* sprow_set_val -- sets the j-th column entry of the sparse row r -- Note: destroys the usual column & row access paths */ double sprow_set_val(r,j,val) SPROW *r; int j; double val; { int idx, idx2, new_len; if ( ! r ) error(E_NULL,"sprow_set_val"); idx = sprow_idx(r,j); if ( idx >= 0 ) { r->elt[idx].val = val; return val; } /* else */ if ( idx < -1 ) { /* shift & insert new value */ idx = -(idx+2); /* this is the intended insertion index */ if ( r->len >= r->maxlen ) { r->len = r->maxlen; new_len = max(2*r->maxlen+1,5); if (mem_info_is_on()) { mem_bytes(TYPE_SPROW,r->maxlen*sizeof(row_elt), new_len*sizeof(row_elt)); } r->elt = RENEW(r->elt,new_len,row_elt); if ( ! r->elt ) /* can't allocate */ error(E_MEM,"sprow_set_val"); r->maxlen = 2*r->maxlen+1; } for ( idx2 = r->len-1; idx2 >= idx; idx2-- ) MEM_COPY((char *)(&(r->elt[idx2])), (char *)(&(r->elt[idx2+1])),sizeof(row_elt)); /************************************************************ if ( idx < r->len ) MEM_COPY((char *)(&(r->elt[idx])),(char *)(&(r->elt[idx+1])), (r->len-idx)*sizeof(row_elt)); ************************************************************/ r->len++; r->elt[idx].col = j; r->elt[idx].nxt_row = -1; r->elt[idx].nxt_idx = -1; return r->elt[idx].val = val; } /* else -- idx == -1, error in index/matrix! */ return 0.0; } neuron-7.5/src/mesch/spswap.c000077500000000000000000000163401323325274500162570ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Sparse matrix swap and permutation routines Modified Mon 09th Nov 1992, 08:50:54 PM to use Karen George's suggestion to use unordered rows */ static char rcsid[] = "spswap.c,v 1.1 1997/12/04 17:55:54 hines Exp"; #include #include "sparse2.h" #include #define btos(x) ((x) ? "TRUE" : "FALSE") /* scan_to -- updates scan (int) vectors to point to the last row in each column with row # <= max_row, if any */ void scan_to(A, scan_row, scan_idx, col_list, max_row) SPMAT *A; IVEC *scan_row, *scan_idx, *col_list; int max_row; { int col, idx, j_idx, row_num; SPROW *r; row_elt *e; if ( ! A || ! scan_row || ! scan_idx || ! col_list ) error(E_NULL,"scan_to"); if ( scan_row->dim != scan_idx->dim || scan_idx->dim != col_list->dim ) error(E_SIZES,"scan_to"); if ( max_row < 0 ) return; if ( ! A->flag_col ) sp_col_access(A); for ( j_idx = 0; j_idx < scan_row->dim; j_idx++ ) { row_num = scan_row->ive[j_idx]; idx = scan_idx->ive[j_idx]; col = col_list->ive[j_idx]; if ( col < 0 || col >= A->n ) error(E_BOUNDS,"scan_to"); if ( row_num < 0 ) { idx = col; continue; } r = &(A->row[row_num]); if ( idx < 0 ) error(E_INTERN,"scan_to"); e = &(r->elt[idx]); if ( e->col != col ) error(E_INTERN,"scan_to"); if ( idx < 0 ) { printf("scan_to: row_num = %d, idx = %d, col = %d\n", row_num, idx, col); error(E_INTERN,"scan_to"); } /* if ( e->nxt_row <= max_row ) chase_col(A, col, &row_num, &idx, max_row); */ while ( e->nxt_row >= 0 && e->nxt_row <= max_row ) { row_num = e->nxt_row; idx = e->nxt_idx; e = &(A->row[row_num].elt[idx]); } /* printf("scan_to: computed j_idx = %d, row_num = %d, idx = %d\n", j_idx, row_num, idx); */ scan_row->ive[j_idx] = row_num; scan_idx->ive[j_idx] = idx; } } /* patch_col -- patches column access paths for fill-in */ void patch_col(A, col, old_row, old_idx, row_num, idx) SPMAT *A; int col, old_row, old_idx, row_num, idx; { SPROW *r; row_elt *e; if ( old_row >= 0 ) { r = &(A->row[old_row]); old_idx = sprow_idx2(r,col,old_idx); e = &(r->elt[old_idx]); e->nxt_row = row_num; e->nxt_idx = idx; } else { A->start_row[col] = row_num; A->start_idx[col] = idx; } } /* chase_col -- chases column access path in column col, starting with row_num and idx, to find last row # in this column <= max_row -- row_num is returned; idx is also set by this routine -- assumes that the column access paths (possibly without the nxt_idx fields) are set up */ row_elt *chase_col(A, col, row_num, idx, max_row) SPMAT *A; int col, *row_num, *idx, max_row; { int old_idx, old_row, tmp_idx, tmp_row; SPROW *r; row_elt *e=0; if ( col < 0 || col >= A->n ) error(E_BOUNDS,"chase_col"); tmp_row = *row_num; if ( tmp_row < 0 ) { if ( A->start_row[col] > max_row ) { tmp_row = -1; tmp_idx = col; return (row_elt *)NULL; } else { tmp_row = A->start_row[col]; tmp_idx = A->start_idx[col]; } } else tmp_idx = *idx; old_row = tmp_row; old_idx = tmp_idx; while ( tmp_row >= 0 && tmp_row < max_row ) { r = &(A->row[tmp_row]); /* tmp_idx = sprow_idx2(r,col,tmp_idx); */ if ( tmp_idx < 0 || tmp_idx >= r->len || r->elt[tmp_idx].col != col ) { #ifdef DEBUG printf("chase_col:error: col = %d, row # = %d, idx = %d\n", col, tmp_row, tmp_idx); printf("chase_col:error: old_row = %d, old_idx = %d\n", old_row, old_idx); printf("chase_col:error: A =\n"); sp_dump(stdout,A); #endif error(E_INTERN,"chase_col"); } e = &(r->elt[tmp_idx]); old_row = tmp_row; old_idx = tmp_idx; tmp_row = e->nxt_row; tmp_idx = e->nxt_idx; } if ( old_row > max_row ) { old_row = -1; old_idx = col; e = (row_elt *)NULL; } else if ( tmp_row <= max_row && tmp_row >= 0 ) { old_row = tmp_row; old_idx = tmp_idx; } *row_num = old_row; if ( old_row >= 0 ) *idx = old_idx; else *idx = col; return e; } /* chase_past -- as for chase_col except that we want the first row whose row # >= min_row; -1 indicates no such row */ row_elt *chase_past(A, col, row_num, idx, min_row) SPMAT *A; int col, *row_num, *idx, min_row; { SPROW *r; row_elt *e; int tmp_idx, tmp_row; tmp_row = *row_num; tmp_idx = *idx; chase_col(A,col,&tmp_row,&tmp_idx,min_row); if ( tmp_row < 0 ) /* use A->start_row[..] etc. */ { if ( A->start_row[col] < 0 ) tmp_row = -1; else { tmp_row = A->start_row[col]; tmp_idx = A->start_idx[col]; } } else if ( tmp_row < min_row ) { r = &(A->row[tmp_row]); if ( tmp_idx < 0 || tmp_idx >= r->len || r->elt[tmp_idx].col != col ) error(E_INTERN,"chase_past"); tmp_row = r->elt[tmp_idx].nxt_row; tmp_idx = r->elt[tmp_idx].nxt_idx; } *row_num = tmp_row; *idx = tmp_idx; if ( tmp_row < 0 ) e = (row_elt *)NULL; else { if ( tmp_idx < 0 || tmp_idx >= A->row[tmp_row].len || A->row[tmp_row].elt[tmp_idx].col != col ) error(E_INTERN,"bump_col"); e = &(A->row[tmp_row].elt[tmp_idx]); } return e; } /* bump_col -- move along to next nonzero entry in column col after row_num -- update row_num and idx */ row_elt *bump_col(A, col, row_num, idx) SPMAT *A; int col, *row_num, *idx; { SPROW *r; row_elt *e; int tmp_row, tmp_idx; tmp_row = *row_num; tmp_idx = *idx; /* printf("bump_col: col = %d, row# = %d, idx = %d\n", col, *row_num, *idx); */ if ( tmp_row < 0 ) { tmp_row = A->start_row[col]; tmp_idx = A->start_idx[col]; } else { r = &(A->row[tmp_row]); if ( tmp_idx < 0 || tmp_idx >= r->len || r->elt[tmp_idx].col != col ) error(E_INTERN,"bump_col"); e = &(r->elt[tmp_idx]); tmp_row = e->nxt_row; tmp_idx = e->nxt_idx; } if ( tmp_row < 0 ) { e = (row_elt *)NULL; tmp_idx = col; } else { if ( tmp_idx < 0 || tmp_idx >= A->row[tmp_row].len || A->row[tmp_row].elt[tmp_idx].col != col ) error(E_INTERN,"bump_col"); e = &(A->row[tmp_row].elt[tmp_idx]); } *row_num = tmp_row; *idx = tmp_idx; return e; } neuron-7.5/src/mesch/submat.c000077500000000000000000000107131323325274500162330ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* 1.2 submat.c 11/25/87 */ #include #include "matrix.h" static char rcsid[] = "submat.c,v 1.1 1997/12/04 17:55:55 hines Exp"; /* get_col -- gets a specified column of a matrix and retruns it as a vector */ VEC *get_col(mat,col,vec) u_int col; MAT *mat; VEC *vec; { u_int i; if ( mat==(MAT *)NULL ) error(E_NULL,"get_col"); if ( col >= mat->n ) error(E_RANGE,"get_col"); if ( vec==(VEC *)NULL || vec->dimm ) vec = v_resize(vec,mat->m); for ( i=0; im; i++ ) vec->ve[i] = mat->me[i][col]; return (vec); } /* get_row -- gets a specified row of a matrix and retruns it as a vector */ VEC *get_row(mat,row,vec) u_int row; MAT *mat; VEC *vec; { u_int i; if ( mat==(MAT *)NULL ) error(E_NULL,"get_row"); if ( row >= mat->m ) error(E_RANGE,"get_row"); if ( vec==(VEC *)NULL || vec->dimn ) vec = v_resize(vec,mat->n); for ( i=0; in; i++ ) vec->ve[i] = mat->me[row][i]; return (vec); } /* _set_col -- sets column of matrix to values given in vec (in situ) */ MAT *_set_col(mat,col,vec,i0) MAT *mat; VEC *vec; u_int col,i0; { u_int i,lim; if ( mat==(MAT *)NULL || vec==(VEC *)NULL ) error(E_NULL,"_set_col"); if ( col >= mat->n ) error(E_RANGE,"_set_col"); lim = min(mat->m,vec->dim); for ( i=i0; ime[i][col] = vec->ve[i]; return (mat); } /* _set_row -- sets row of matrix to values given in vec (in situ) */ MAT *_set_row(mat,row,vec,j0) MAT *mat; VEC *vec; u_int row,j0; { u_int j,lim; if ( mat==(MAT *)NULL || vec==(VEC *)NULL ) error(E_NULL,"_set_row"); if ( row >= mat->m ) error(E_RANGE,"_set_row"); lim = min(mat->n,vec->dim); for ( j=j0; jme[row][j] = vec->ve[j]; return (mat); } /* sub_mat -- returns sub-matrix of old which is formed by the rectangle from (row1,col1) to (row2,col2) -- Note: storage is shared so that altering the "new" matrix will alter the "old" matrix */ MAT *sub_mat(old,row1,col1,row2,col2,new) MAT *old,*new; u_int row1,col1,row2,col2; { u_int i; if ( old==(MAT *)NULL ) error(E_NULL,"sub_mat"); if ( row1 > row2 || col1 > col2 || row2 >= old->m || col2 >= old->n ) error(E_RANGE,"sub_mat"); if ( new==(MAT *)NULL || new->m < row2-row1+1 ) { new = NEW(MAT); new->me = NEW_A(row2-row1+1,Real *); if ( new==(MAT *)NULL || new->me==(Real **)NULL ) error(E_MEM,"sub_mat"); else if (mem_info_is_on()) { mem_bytes(TYPE_MAT,0,sizeof(MAT)+ (row2-row1+1)*sizeof(Real *)); } } new->m = row2-row1+1; new->n = col2-col1+1; new->base = (Real *)NULL; for ( i=0; i < new->m; i++ ) new->me[i] = (old->me[i+row1]) + col1; return (new); } /* sub_vec -- returns sub-vector which is formed by the elements i1 to i2 -- as for sub_mat, storage is shared */ VEC *sub_vec(old,i1,i2,new) VEC *old, *new; int i1, i2; { if ( old == (VEC *)NULL ) error(E_NULL,"sub_vec"); if ( i1 > i2 || old->dim < i2 ) error(E_RANGE,"sub_vec"); if ( new == (VEC *)NULL ) new = NEW(VEC); if ( new == (VEC *)NULL ) error(E_MEM,"sub_vec"); else if (mem_info_is_on()) { mem_bytes(TYPE_VEC,0,sizeof(VEC)); } new->dim = i2 - i1 + 1; new->ve = &(old->ve[i1]); return new; } neuron-7.5/src/mesch/svd.c000077500000000000000000000235021323325274500155340ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for computing the SVD of matrices */ #include #include "matrix.h" #include "matrix2.h" #include static char rcsid[] = "svd.c,v 1.1 1997/12/04 17:55:56 hines Exp"; #define sgn(x) ((x) >= 0 ? 1 : -1) #define MAX_STACK 100 /* fixsvd -- fix minor details about SVD -- make singular values non-negative -- sort singular values in decreasing order -- variables as for bisvd() -- no argument checking */ static void fixsvd(d,U,V) VEC *d; MAT *U, *V; { int i, j, k, l, r, stack[MAX_STACK], sp; Real tmp, v; /* make singular values non-negative */ for ( i = 0; i < d->dim; i++ ) if ( d->ve[i] < 0.0 ) { d->ve[i] = - d->ve[i]; if ( U != MNULL ) for ( j = 0; j < U->m; j++ ) U->me[i][j] = - U->me[i][j]; } /* sort singular values */ /* nonrecursive implementation of quicksort due to R.Sedgewick, "Algorithms in C", p. 122 (1990) */ sp = -1; l = 0; r = d->dim - 1; for ( ; ; ) { while ( r > l ) { /* i = partition(d->ve,l,r) */ v = d->ve[r]; i = l - 1; j = r; for ( ; ; ) { /* inequalities are "backwards" for **decreasing** order */ while ( d->ve[++i] > v ) ; while ( i < j && d->ve[--j] < v ) ; if ( i >= j ) break; /* swap entries in d->ve */ tmp = d->ve[i]; d->ve[i] = d->ve[j]; d->ve[j] = tmp; /* swap rows of U & V as well */ if ( U != MNULL ) for ( k = 0; k < U->n; k++ ) { tmp = U->me[i][k]; U->me[i][k] = U->me[j][k]; U->me[j][k] = tmp; } if ( V != MNULL ) for ( k = 0; k < V->n; k++ ) { tmp = V->me[i][k]; V->me[i][k] = V->me[j][k]; V->me[j][k] = tmp; } } tmp = d->ve[i]; d->ve[i] = d->ve[r]; d->ve[r] = tmp; if ( U != MNULL ) for ( k = 0; k < U->n; k++ ) { tmp = U->me[i][k]; U->me[i][k] = U->me[r][k]; U->me[r][k] = tmp; } if ( V != MNULL ) for ( k = 0; k < V->n; k++ ) { tmp = V->me[i][k]; V->me[i][k] = V->me[r][k]; V->me[r][k] = tmp; } /* end i = partition(...) */ if ( i - l > r - i ) { stack[++sp] = l; stack[++sp] = i-1; l = i+1; } else { stack[++sp] = i+1; stack[++sp] = r; r = i-1; } } if ( sp < 0 ) break; r = stack[sp--]; l = stack[sp--]; } } /* bisvd -- svd of a bidiagonal m x n matrix represented by d (diagonal) and f (super-diagonals) -- returns with d set to the singular values, f zeroed -- if U, V non-NULL, the orthogonal operations are accumulated in U, V; if U, V == I on entry, then SVD == U^T.A.V where A is initial matrix -- returns d on exit */ VEC *bisvd(d,f,U,V) VEC *d, *f; MAT *U, *V; { int i, j, n; int i_min, i_max, split; Real c, s, shift, size, z; Real d_tmp, diff, t11, t12, t22, *d_ve, *f_ve; if ( ! d || ! f ) error(E_NULL,"bisvd"); if ( d->dim != f->dim + 1 ) error(E_SIZES,"bisvd"); n = d->dim; if ( ( U && U->n < n ) || ( V && V->m < n ) ) error(E_SIZES,"bisvd"); if ( ( U && U->m != U->n ) || ( V && V->m != V->n ) ) error(E_SQUARE,"bisvd"); if ( n == 1 ) return d; d_ve = d->ve; f_ve = f->ve; size = v_norm_inf(d) + v_norm_inf(f); i_min = 0; while ( i_min < n ) /* outer while loop */ { /* find i_max to suit; submatrix i_min..i_max should be irreducible */ i_max = n - 1; for ( i = i_min; i < n - 1; i++ ) if ( d_ve[i] == 0.0 || f_ve[i] == 0.0 ) { i_max = i; if ( f_ve[i] != 0.0 ) { /* have to ``chase'' f[i] element out of matrix */ z = f_ve[i]; f_ve[i] = 0.0; for ( j = i; j < n-1 && z != 0.0; j++ ) { givens(d_ve[j+1],z, &c, &s); s = -s; d_ve[j+1] = c*d_ve[j+1] - s*z; if ( j+1 < n-1 ) { z = s*f_ve[j+1]; f_ve[j+1] = c*f_ve[j+1]; } if ( U ) rot_rows(U,i,j+1,c,s,U); } } break; } if ( i_max <= i_min ) { i_min = i_max + 1; continue; } /* printf("bisvd: i_min = %d, i_max = %d\n",i_min,i_max); */ split = FALSE; while ( ! split ) { /* compute shift */ t11 = d_ve[i_max-1]*d_ve[i_max-1] + (i_max > i_min+1 ? f_ve[i_max-2]*f_ve[i_max-2] : 0.0); t12 = d_ve[i_max-1]*f_ve[i_max-1]; t22 = d_ve[i_max]*d_ve[i_max] + f_ve[i_max-1]*f_ve[i_max-1]; /* use e-val of [[t11,t12],[t12,t22]] matrix closest to t22 */ diff = (t11-t22)/2; shift = t22 - t12*t12/(diff + sgn(diff)*sqrt(diff*diff+t12*t12)); /* initial Givens' rotation */ givens(d_ve[i_min]*d_ve[i_min]-shift, d_ve[i_min]*f_ve[i_min], &c, &s); /* do initial Givens' rotations */ d_tmp = c*d_ve[i_min] + s*f_ve[i_min]; f_ve[i_min] = c*f_ve[i_min] - s*d_ve[i_min]; d_ve[i_min] = d_tmp; z = s*d_ve[i_min+1]; d_ve[i_min+1] = c*d_ve[i_min+1]; if ( V ) rot_rows(V,i_min,i_min+1,c,s,V); /* 2nd Givens' rotation */ givens(d_ve[i_min],z, &c, &s); d_ve[i_min] = c*d_ve[i_min] + s*z; d_tmp = c*d_ve[i_min+1] - s*f_ve[i_min]; f_ve[i_min] = s*d_ve[i_min+1] + c*f_ve[i_min]; d_ve[i_min+1] = d_tmp; if ( i_min+1 < i_max ) { z = s*f_ve[i_min+1]; f_ve[i_min+1] = c*f_ve[i_min+1]; } if ( U ) rot_rows(U,i_min,i_min+1,c,s,U); for ( i = i_min+1; i < i_max; i++ ) { /* get Givens' rotation for zeroing z */ givens(f_ve[i-1],z, &c, &s); f_ve[i-1] = c*f_ve[i-1] + s*z; d_tmp = c*d_ve[i] + s*f_ve[i]; f_ve[i] = c*f_ve[i] - s*d_ve[i]; d_ve[i] = d_tmp; z = s*d_ve[i+1]; d_ve[i+1] = c*d_ve[i+1]; if ( V ) rot_rows(V,i,i+1,c,s,V); /* get 2nd Givens' rotation */ givens(d_ve[i],z, &c, &s); d_ve[i] = c*d_ve[i] + s*z; d_tmp = c*d_ve[i+1] - s*f_ve[i]; f_ve[i] = c*f_ve[i] + s*d_ve[i+1]; d_ve[i+1] = d_tmp; if ( i+1 < i_max ) { z = s*f_ve[i+1]; f_ve[i+1] = c*f_ve[i+1]; } if ( U ) rot_rows(U,i,i+1,c,s,U); } /* should matrix be split? */ for ( i = i_min; i < i_max; i++ ) if ( fabs(f_ve[i]) < MACHEPS*(fabs(d_ve[i])+fabs(d_ve[i+1])) ) { split = TRUE; f_ve[i] = 0.0; } else if ( fabs(d_ve[i]) < MACHEPS*size ) { split = TRUE; d_ve[i] = 0.0; } /* printf("bisvd: d =\n"); v_output(d); */ /* printf("bisvd: f = \n"); v_output(f); */ } } fixsvd(d,U,V); return d; } /* bifactor -- perform preliminary factorisation for bisvd -- updates U and/or V, which ever is not NULL */ MAT *bifactor(A,U,V) MAT *A, *U, *V; { int k; static VEC *tmp1=VNULL, *tmp2=VNULL; Real beta; if ( ! A ) error(E_NULL,"bifactor"); if ( ( U && ( U->m != U->n ) ) || ( V && ( V->m != V->n ) ) ) error(E_SQUARE,"bifactor"); if ( ( U && U->m != A->m ) || ( V && V->m != A->n ) ) error(E_SIZES,"bifactor"); tmp1 = v_resize(tmp1,A->m); tmp2 = v_resize(tmp2,A->n); MEM_STAT_REG(tmp1,TYPE_VEC); MEM_STAT_REG(tmp2,TYPE_VEC); if ( A->m >= A->n ) for ( k = 0; k < A->n; k++ ) { get_col(A,k,tmp1); hhvec(tmp1,k,&beta,tmp1,&(A->me[k][k])); hhtrcols(A,k,k+1,tmp1,beta); if ( U ) hhtrcols(U,k,0,tmp1,beta); if ( k+1 >= A->n ) continue; get_row(A,k,tmp2); hhvec(tmp2,k+1,&beta,tmp2,&(A->me[k][k+1])); hhtrrows(A,k+1,k+1,tmp2,beta); if ( V ) hhtrcols(V,k+1,0,tmp2,beta); } else for ( k = 0; k < A->m; k++ ) { get_row(A,k,tmp2); hhvec(tmp2,k,&beta,tmp2,&(A->me[k][k])); hhtrrows(A,k+1,k,tmp2,beta); if ( V ) hhtrcols(V,k,0,tmp2,beta); if ( k+1 >= A->m ) continue; get_col(A,k,tmp1); hhvec(tmp1,k+1,&beta,tmp1,&(A->me[k+1][k])); hhtrcols(A,k+1,k+1,tmp1,beta); if ( U ) hhtrcols(U,k+1,0,tmp1,beta); } return A; } /* svd -- returns vector of singular values in d -- also updates U and/or V, if one or the other is non-NULL -- destroys A */ VEC *svd(A,U,V,d) MAT *A, *U, *V; VEC *d; { static VEC *f=VNULL; int i, limit; MAT *A_tmp; if ( ! A ) error(E_NULL,"svd"); if ( ( U && ( U->m != U->n ) ) || ( V && ( V->m != V->n ) ) ) error(E_SQUARE,"svd"); if ( ( U && U->m != A->m ) || ( V && V->m != A->n ) ) error(E_SIZES,"svd"); A_tmp = m_copy(A,MNULL); if ( U != MNULL ) m_ident(U); if ( V != MNULL ) m_ident(V); limit = min(A_tmp->m,A_tmp->n); d = v_resize(d,limit); if (f == VNULL && limit == 1) { /* some calloc's do not allow 0 size */ f = v_resize(f, limit); } f = v_resize(f,limit-1); MEM_STAT_REG(f,TYPE_VEC); bifactor(A_tmp,U,V); if ( A_tmp->m >= A_tmp->n ) for ( i = 0; i < limit; i++ ) { d->ve[i] = A_tmp->me[i][i]; if ( i+1 < limit ) f->ve[i] = A_tmp->me[i][i+1]; } else for ( i = 0; i < limit; i++ ) { d->ve[i] = A_tmp->me[i][i]; if ( i+1 < limit ) f->ve[i] = A_tmp->me[i+1][i]; } if ( A_tmp->m >= A_tmp->n ) bisvd(d,f,U,V); else bisvd(d,f,V,U); M_FREE(A_tmp); return d; } neuron-7.5/src/mesch/symmeig.c000077500000000000000000000136061323325274500164160ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for symmetric eigenvalue problems */ #include #include "matrix.h" #include "matrix2.h" #include static char rcsid[] = "symmeig.c,v 1.1 1997/12/04 17:55:57 hines Exp"; #define SQRT2 1.4142135623730949 #define sgn(x) ( (x) >= 0 ? 1 : -1 ) /* trieig -- finds eigenvalues of symmetric tridiagonal matrices -- matrix represented by a pair of vectors a (diag entries) and b (sub- & super-diag entries) -- eigenvalues in a on return */ VEC *trieig(a,b,Q) VEC *a, *b; MAT *Q; { int i, i_min, i_max, n, split; Real *a_ve, *b_ve; Real b_sqr, bk, ak1, bk1, ak2, bk2, z; Real c, c2, cs, s, s2, d, mu; if ( ! a || ! b ) error(E_NULL,"trieig"); if ( a->dim != b->dim + 1 || ( Q && Q->m != a->dim ) ) error(E_SIZES,"trieig"); if ( Q && Q->m != Q->n ) error(E_SQUARE,"trieig"); n = a->dim; a_ve = a->ve; b_ve = b->ve; i_min = 0; while ( i_min < n ) /* outer while loop */ { /* find i_max to suit; submatrix i_min..i_max should be irreducible */ i_max = n-1; for ( i = i_min; i < n-1; i++ ) if ( b_ve[i] == 0.0 ) { i_max = i; break; } if ( i_max <= i_min ) { /* printf("# i_min = %d, i_max = %d\n",i_min,i_max); */ i_min = i_max + 1; continue; /* outer while loop */ } /* printf("# i_min = %d, i_max = %d\n",i_min,i_max); */ /* repeatedly perform QR method until matrix splits */ split = FALSE; while ( ! split ) /* inner while loop */ { /* find Wilkinson shift */ d = (a_ve[i_max-1] - a_ve[i_max])/2; b_sqr = b_ve[i_max-1]*b_ve[i_max-1]; mu = a_ve[i_max] - b_sqr/(d + sgn(d)*sqrt(d*d+b_sqr)); /* printf("# Wilkinson shift = %g\n",mu); */ /* initial Givens' rotation */ givens(a_ve[i_min]-mu,b_ve[i_min],&c,&s); s = -s; /* printf("# c = %g, s = %g\n",c,s); */ if ( fabs(c) < SQRT2 ) { c2 = c*c; s2 = 1-c2; } else { s2 = s*s; c2 = 1-s2; } cs = c*s; ak1 = c2*a_ve[i_min]+s2*a_ve[i_min+1]-2*cs*b_ve[i_min]; bk1 = cs*(a_ve[i_min]-a_ve[i_min+1]) + (c2-s2)*b_ve[i_min]; ak2 = s2*a_ve[i_min]+c2*a_ve[i_min+1]+2*cs*b_ve[i_min]; bk2 = ( i_min < i_max-1 ) ? c*b_ve[i_min+1] : 0.0; z = ( i_min < i_max-1 ) ? -s*b_ve[i_min+1] : 0.0; a_ve[i_min] = ak1; a_ve[i_min+1] = ak2; b_ve[i_min] = bk1; if ( i_min < i_max-1 ) b_ve[i_min+1] = bk2; if ( Q ) rot_cols(Q,i_min,i_min+1,c,-s,Q); /* printf("# z = %g\n",z); */ /* printf("# a [temp1] =\n"); v_output(a); */ /* printf("# b [temp1] =\n"); v_output(b); */ for ( i = i_min+1; i < i_max; i++ ) { /* get Givens' rotation for sub-block -- k == i-1 */ givens(b_ve[i-1],z,&c,&s); s = -s; /* printf("# c = %g, s = %g\n",c,s); */ /* perform Givens' rotation on sub-block */ if ( fabs(c) < SQRT2 ) { c2 = c*c; s2 = 1-c2; } else { s2 = s*s; c2 = 1-s2; } cs = c*s; bk = c*b_ve[i-1] - s*z; ak1 = c2*a_ve[i]+s2*a_ve[i+1]-2*cs*b_ve[i]; bk1 = cs*(a_ve[i]-a_ve[i+1]) + (c2-s2)*b_ve[i]; ak2 = s2*a_ve[i]+c2*a_ve[i+1]+2*cs*b_ve[i]; bk2 = ( i+1 < i_max ) ? c*b_ve[i+1] : 0.0; z = ( i+1 < i_max ) ? -s*b_ve[i+1] : 0.0; a_ve[i] = ak1; a_ve[i+1] = ak2; b_ve[i] = bk1; if ( i < i_max-1 ) b_ve[i+1] = bk2; if ( i > i_min ) b_ve[i-1] = bk; if ( Q ) rot_cols(Q,i,i+1,c,-s,Q); /* printf("# a [temp2] =\n"); v_output(a); */ /* printf("# b [temp2] =\n"); v_output(b); */ } /* test to see if matrix should be split */ for ( i = i_min; i < i_max; i++ ) if ( fabs(b_ve[i]) < MACHEPS* (fabs(a_ve[i])+fabs(a_ve[i+1])) ) { b_ve[i] = 0.0; split = TRUE; } /* printf("# a =\n"); v_output(a); */ /* printf("# b =\n"); v_output(b); */ } } return a; } /* symmeig -- computes eigenvalues of a dense symmetric matrix -- A **must** be symmetric on entry -- eigenvalues stored in out -- Q contains orthogonal matrix of eigenvectors -- returns vector of eigenvalues */ VEC *symmeig(A,Q,out) MAT *A, *Q; VEC *out; { int i; static MAT *tmp = MNULL; static VEC *b = VNULL, *diag = VNULL, *beta = VNULL; if ( ! A ) error(E_NULL,"symmeig"); if ( A->m != A->n ) error(E_SQUARE,"symmeig"); if ( ! out || out->dim != A->m ) out = v_resize(out,A->m); tmp = m_resize(tmp,A->m,A->n); tmp = m_copy(A,tmp); b = v_resize(b,A->m - 1); diag = v_resize(diag,(u_int)A->m); beta = v_resize(beta,(u_int)A->m); MEM_STAT_REG(tmp,TYPE_MAT); MEM_STAT_REG(b,TYPE_VEC); MEM_STAT_REG(diag,TYPE_VEC); MEM_STAT_REG(beta,TYPE_VEC); Hfactor(tmp,diag,beta); if ( Q ) makeHQ(tmp,diag,beta,Q); for ( i = 0; i < A->m - 1; i++ ) { out->ve[i] = tmp->me[i][i]; b->ve[i] = tmp->me[i][i+1]; } out->ve[i] = tmp->me[i][i]; trieig(out,b,Q); return out; } neuron-7.5/src/mesch/update.c000077500000000000000000000066071323325274500162310ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. */ /* update.c 1.3 11/25/87 */ static char rcsid[] = "update.c,v 1.1 1997/12/04 17:56:01 hines Exp"; #include #include "matrix.h" #include "matrix2.h" #include /* Most matrix factorisation routines are in-situ unless otherwise specified */ /* LDLupdate -- updates a CHolesky factorisation, replacing LDL' by MD~M' = LDL' + alpha.w.w' Note: w is overwritten Ref: Gill et al Math Comp 28, p516 Algorithm C1 */ MAT *LDLupdate(CHmat,w,alpha) MAT *CHmat; VEC *w; double alpha; { u_int i,j; Real diag,new_diag,beta,p; if ( CHmat==(MAT *)NULL || w==(VEC *)NULL ) error(E_NULL,"LDLupdate"); if ( CHmat->m != CHmat->n || w->dim != CHmat->m ) error(E_SIZES,"LDLupdate"); for ( j=0; j < w->dim; j++ ) { p = w->ve[j]; diag = CHmat->me[j][j]; new_diag = CHmat->me[j][j] = diag + alpha*p*p; if ( new_diag <= 0.0 ) error(E_POSDEF,"LDLupdate"); beta = p*alpha/new_diag; alpha *= diag/new_diag; for ( i=j+1; i < w->dim; i++ ) { w->ve[i] -= p*CHmat->me[i][j]; CHmat->me[i][j] += beta*w->ve[i]; CHmat->me[j][i] = CHmat->me[i][j]; } } return (CHmat); } /* QRupdate -- updates QR factorisation in expanded form (seperate matrices) Finds Q+, R+ s.t. Q+.R+ = Q.(R+u.v') and Q+ orthogonal, R+ upper triang Ref: Golub & van Loan Matrix Computations pp437-443 -- does not update Q if it is NULL */ MAT *QRupdate(Q,R,u,v) MAT *Q,*R; VEC *u,*v; { int i,j,k; Real c,s,temp; if ( ! R || ! u || ! v ) error(E_NULL,"QRupdate"); if ( ( Q && ( Q->m != Q->n || R->m != Q->n ) ) || u->dim != R->m || v->dim != R->n ) error(E_SIZES,"QRupdate"); /* find largest k s.t. u[k] != 0 */ for ( k=R->m-1; k>=0; k-- ) if ( u->ve[k] != 0.0 ) break; /* transform R+u.v' to Hessenberg form */ for ( i=k-1; i>=0; i-- ) { /* get Givens rotation */ givens(u->ve[i],u->ve[i+1],&c,&s); rot_rows(R,i,i+1,c,s,R); if ( Q ) rot_cols(Q,i,i+1,c,s,Q); rot_vec(u,i,i+1,c,s,u); } /* add into R */ temp = u->ve[0]; for ( j=0; jn; j++ ) R->me[0][j] += temp*v->ve[j]; /* transform Hessenberg to upper triangular */ for ( i=0; ime[i][i],R->me[i+1][i],&c,&s); rot_rows(R,i,i+1,c,s,R); if ( Q ) rot_cols(Q,i,i+1,c,s,Q); } return R; } neuron-7.5/src/mesch/vecop.c000077500000000000000000000322201323325274500160510ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* vecop.c 1.3 8/18/87 */ #include #include "matrix.h" static char rcsid[] = "vecop.c,v 1.1 1997/12/04 17:56:02 hines Exp"; /* _in_prod -- inner product of two vectors from i0 downwards */ double _in_prod(a,b,i0) VEC *a,*b; u_int i0; { u_int limit; /* Real *a_v, *b_v; */ /* register Real sum; */ if ( a==(VEC *)NULL || b==(VEC *)NULL ) error(E_NULL,"_in_prod"); limit = min(a->dim,b->dim); if ( i0 > limit ) error(E_BOUNDS,"_in_prod"); return __ip__(&(a->ve[i0]),&(b->ve[i0]),(int)(limit-i0)); /***************************************** a_v = &(a->ve[i0]); b_v = &(b->ve[i0]); for ( i=i0; idim != vector->dim ) out = v_resize(out,vector->dim); if ( scalar == 0.0 ) return v_zero(out); if ( scalar == 1.0 ) return v_copy(vector,out); __smlt__(vector->ve,(double)scalar,out->ve,(int)(vector->dim)); /************************************************** dim = vector->dim; out_ve = out->ve; vec_ve = vector->ve; for ( i=0; ive[i] = scalar*vector->ve[i]; (*out_ve++) = scalar*(*vec_ve++); **************************************************/ return (out); } /* v_add -- vector addition -- may be in-situ */ VEC *v_add(vec1,vec2,out) VEC *vec1,*vec2,*out; { u_int dim; /* Real *out_ve, *vec1_ve, *vec2_ve; */ if ( vec1==(VEC *)NULL || vec2==(VEC *)NULL ) error(E_NULL,"v_add"); if ( vec1->dim != vec2->dim ) error(E_SIZES,"v_add"); if ( out==(VEC *)NULL || out->dim != vec1->dim ) out = v_resize(out,vec1->dim); dim = vec1->dim; __add__(vec1->ve,vec2->ve,out->ve,(int)dim); /************************************************************ out_ve = out->ve; vec1_ve = vec1->ve; vec2_ve = vec2->ve; for ( i=0; ive[i] = vec1->ve[i]+vec2->ve[i]; (*out_ve++) = (*vec1_ve++) + (*vec2_ve++); ************************************************************/ return (out); } /* v_mltadd -- scalar/vector multiplication and addition -- out = v1 + scale.v2 */ VEC *v_mltadd(v1,v2,scale,out) VEC *v1,*v2,*out; double scale; { /* register u_int dim, i; */ /* Real *out_ve, *v1_ve, *v2_ve; */ if ( v1==(VEC *)NULL || v2==(VEC *)NULL ) error(E_NULL,"v_mltadd"); if ( v1->dim != v2->dim ) error(E_SIZES,"v_mltadd"); if ( scale == 0.0 ) return v_copy(v1,out); if ( scale == 1.0 ) return v_add(v1,v2,out); if ( v2 != out ) { tracecatch(out = v_copy(v1,out),"v_mltadd"); /* dim = v1->dim; */ __mltadd__(out->ve,v2->ve,scale,(int)(v1->dim)); } else { tracecatch(out = sv_mlt(scale,v2,out),"v_mltadd"); out = v_add(v1,out,out); } /************************************************************ out_ve = out->ve; v1_ve = v1->ve; v2_ve = v2->ve; for ( i=0; i < dim ; i++ ) out->ve[i] = v1->ve[i] + scale*v2->ve[i]; (*out_ve++) = (*v1_ve++) + scale*(*v2_ve++); ************************************************************/ return (out); } /* v_sub -- vector subtraction -- may be in-situ */ VEC *v_sub(vec1,vec2,out) VEC *vec1,*vec2,*out; { /* u_int i, dim; */ /* Real *out_ve, *vec1_ve, *vec2_ve; */ if ( vec1==(VEC *)NULL || vec2==(VEC *)NULL ) error(E_NULL,"v_sub"); if ( vec1->dim != vec2->dim ) error(E_SIZES,"v_sub"); if ( out==(VEC *)NULL || out->dim != vec1->dim ) out = v_resize(out,vec1->dim); __sub__(vec1->ve,vec2->ve,out->ve,(int)(vec1->dim)); /************************************************************ dim = vec1->dim; out_ve = out->ve; vec1_ve = vec1->ve; vec2_ve = vec2->ve; for ( i=0; ive[i] = vec1->ve[i]-vec2->ve[i]; (*out_ve++) = (*vec1_ve++) - (*vec2_ve++); ************************************************************/ return (out); } /* v_map -- maps function f over components of x: out[i] = f(x[i]) -- _v_map sets out[i] = f(params,x[i]) */ VEC *v_map(f,x,out) #ifdef PROTOTYPES_IN_STRUCT double (*f)(double); #else double (*f)(); #endif VEC *x, *out; { Real *x_ve, *out_ve; int i, dim; if ( ! x || ! f ) error(E_NULL,"v_map"); if ( ! out || out->dim != x->dim ) out = v_resize(out,x->dim); dim = x->dim; x_ve = x->ve; out_ve = out->ve; for ( i = 0; i < dim; i++ ) *out_ve++ = (*f)(*x_ve++); return out; } VEC *_v_map(f,params,x,out) #ifdef PROTOTYPES_IN_STRUCT double (*f)(void *,double); #else double (*f)(); #endif VEC *x, *out; void *params; { Real *x_ve, *out_ve; int i, dim; if ( ! x || ! f ) error(E_NULL,"_v_map"); if ( ! out || out->dim != x->dim ) out = v_resize(out,x->dim); dim = x->dim; x_ve = x->ve; out_ve = out->ve; for ( i = 0; i < dim; i++ ) *out_ve++ = (*f)(params,*x_ve++); return out; } /* v_lincomb -- returns sum_i a[i].v[i], a[i] real, v[i] vectors */ VEC *v_lincomb(n,v,a,out) int n; /* number of a's and v's */ Real a[]; VEC *v[], *out; { int i; if ( ! a || ! v ) error(E_NULL,"v_lincomb"); if ( n <= 0 ) return VNULL; for ( i = 1; i < n; i++ ) if ( out == v[i] ) error(E_INSITU,"v_lincomb"); out = sv_mlt(a[0],v[0],out); for ( i = 1; i < n; i++ ) { if ( ! v[i] ) error(E_NULL,"v_lincomb"); if ( v[i]->dim != out->dim ) error(E_SIZES,"v_lincomb"); out = v_mltadd(out,v[i],a[i],out); } return out; } #ifdef ANSI_C /* v_linlist -- linear combinations taken from a list of arguments; calling: v_linlist(out,v1,a1,v2,a2,...,vn,an,NULL); where vi are vectors (VEC *) and ai are numbers (double) */ VEC *v_linlist(VEC *out,VEC *v1,double a1,...) { va_list ap; VEC *par; double a_par; if ( ! v1 ) return VNULL; va_start(ap, a1); out = sv_mlt(a1,v1,out); while ((par = va_arg(ap,VEC *))) { /* NULL ends the list*/ a_par = va_arg(ap,double); if (a_par == 0.0) continue; if ( out == par ) error(E_INSITU,"v_linlist"); if ( out->dim != par->dim ) error(E_SIZES,"v_linlist"); if (a_par == 1.0) out = v_add(out,par,out); else if (a_par == -1.0) out = v_sub(out,par,out); else out = v_mltadd(out,par,a_par,out); } va_end(ap); return out; } #elif VARARGS /* v_linlist -- linear combinations taken from a list of arguments; calling: v_linlist(out,v1,a1,v2,a2,...,vn,an,NULL); where vi are vectors (VEC *) and ai are numbers (double) */ VEC *v_linlist(va_alist) va_dcl { va_list ap; VEC *par, *out; double a_par; va_start(ap); out = va_arg(ap,VEC *); par = va_arg(ap,VEC *); if ( ! par ) { va_end(ap); return VNULL; } a_par = va_arg(ap,double); out = sv_mlt(a_par,par,out); while ((par = va_arg(ap,VEC *))) { /* NULL ends the list*/ a_par = va_arg(ap,double); if (a_par == 0.0) continue; if ( out == par ) error(E_INSITU,"v_linlist"); if ( out->dim != par->dim ) error(E_SIZES,"v_linlist"); if (a_par == 1.0) out = v_add(out,par,out); else if (a_par == -1.0) out = v_sub(out,par,out); else out = v_mltadd(out,par,a_par,out); } va_end(ap); return out; } #endif /* v_star -- computes componentwise (Hadamard) product of x1 and x2 -- result out is returned */ VEC *v_star(x1, x2, out) VEC *x1, *x2, *out; { int i; if ( ! x1 || ! x2 ) error(E_NULL,"v_star"); if ( x1->dim != x2->dim ) error(E_SIZES,"v_star"); out = v_resize(out,x1->dim); for ( i = 0; i < x1->dim; i++ ) out->ve[i] = x1->ve[i] * x2->ve[i]; return out; } /* v_slash -- computes componentwise ratio of x2 and x1 -- out[i] = x2[i] / x1[i] -- if x1[i] == 0 for some i, then raise E_SING error -- result out is returned */ VEC *v_slash(x1, x2, out) VEC *x1, *x2, *out; { int i; Real tmp; if ( ! x1 || ! x2 ) error(E_NULL,"v_slash"); if ( x1->dim != x2->dim ) error(E_SIZES,"v_slash"); out = v_resize(out,x1->dim); for ( i = 0; i < x1->dim; i++ ) { tmp = x1->ve[i]; if ( tmp == 0.0 ) error(E_SING,"v_slash"); out->ve[i] = x2->ve[i] / tmp; } return out; } /* v_min -- computes minimum component of x, which is returned -- also sets min_idx to the index of this minimum */ double v_min(x, min_idx) VEC *x; int *min_idx; { int i, i_min; Real min_val, tmp; if ( ! x ) error(E_NULL,"v_min"); if ( x->dim <= 0 ) error(E_SIZES,"v_min"); i_min = 0; min_val = x->ve[0]; for ( i = 1; i < x->dim; i++ ) { tmp = x->ve[i]; if ( tmp < min_val ) { min_val = tmp; i_min = i; } } if ( min_idx != NULL ) *min_idx = i_min; return min_val; } /* v_max -- computes maximum component of x, which is returned -- also sets max_idx to the index of this maximum */ double v_max(x, max_idx) VEC *x; int *max_idx; { int i, i_max; Real max_val, tmp; if ( ! x ) error(E_NULL,"v_max"); if ( x->dim <= 0 ) error(E_SIZES,"v_max"); i_max = 0; max_val = x->ve[0]; for ( i = 1; i < x->dim; i++ ) { tmp = x->ve[i]; if ( tmp > max_val ) { max_val = tmp; i_max = i; } } if ( max_idx != NULL ) *max_idx = i_max; return max_val; } #define MAX_STACK 60 /* v_sort -- sorts vector x, and generates permutation that gives the order of the components; x = [1.3, 3.7, 0.5] -> [0.5, 1.3, 3.7] and the permutation is order = [2, 0, 1]. -- if order is NULL on entry then it is ignored -- the sorted vector x is returned */ VEC *v_sort(x, order) VEC *x; PERM *order; { Real *x_ve, tmp, v; /* int *order_pe; */ int dim, i, j, l, r, tmp_i; int stack[MAX_STACK], sp; if ( ! x ) error(E_NULL,"v_sort"); if ( order != PNULL && order->size != x->dim ) order = px_resize(order, x->dim); x_ve = x->ve; dim = x->dim; if ( order != PNULL ) px_ident(order); if ( dim <= 1 ) return x; /* using quicksort algorithm in Sedgewick, "Algorithms in C", Ch. 9, pp. 118--122 (1990) */ sp = 0; l = 0; r = dim-1; v = x_ve[0]; for ( ; ; ) { while ( r > l ) { /* "i = partition(x_ve,l,r);" */ v = x_ve[r]; i = l-1; j = r; for ( ; ; ) { while ( x_ve[++i] < v ) ; while ( x_ve[--j] > v ) ; if ( i >= j ) break; tmp = x_ve[i]; x_ve[i] = x_ve[j]; x_ve[j] = tmp; if ( order != PNULL ) { tmp_i = order->pe[i]; order->pe[i] = order->pe[j]; order->pe[j] = tmp_i; } } tmp = x_ve[i]; x_ve[i] = x_ve[r]; x_ve[r] = tmp; if ( order != PNULL ) { tmp_i = order->pe[i]; order->pe[i] = order->pe[r]; order->pe[r] = tmp_i; } if ( i-l > r-i ) { stack[sp++] = l; stack[sp++] = i-1; l = i+1; } else { stack[sp++] = i+1; stack[sp++] = r; r = i-1; } } /* recursion elimination */ if ( sp == 0 ) break; r = stack[--sp]; l = stack[--sp]; } return x; } /* v_sum -- returns sum of entries of a vector */ double v_sum(x) VEC *x; { int i; Real sum; if ( ! x ) error(E_NULL,"v_sum"); sum = 0.0; for ( i = 0; i < x->dim; i++ ) sum += x->ve[i]; return sum; } /* v_conv -- computes convolution product of two vectors */ VEC *v_conv(x1, x2, out) VEC *x1, *x2, *out; { int i; if ( ! x1 || ! x2 ) error(E_NULL,"v_conv"); if ( x1 == out || x2 == out ) error(E_INSITU,"v_conv"); if ( x1->dim == 0 || x2->dim == 0 ) return out = v_resize(out,0); out = v_resize(out,x1->dim + x2->dim - 1); v_zero(out); for ( i = 0; i < x1->dim; i++ ) __mltadd__(&(out->ve[i]),x2->ve,x1->ve[i],x2->dim); return out; } /* v_pconv -- computes a periodic convolution product -- the period is the dimension of x2 */ VEC *v_pconv(x1, x2, out) VEC *x1, *x2, *out; { int i; if ( ! x1 || ! x2 ) error(E_NULL,"v_pconv"); if ( x1 == out || x2 == out ) error(E_INSITU,"v_pconv"); out = v_resize(out,x2->dim); if ( x2->dim == 0 ) return out; v_zero(out); for ( i = 0; i < x1->dim; i++ ) { __mltadd__(&(out->ve[i]),x2->ve,x1->ve[i],x2->dim - i); if ( i > 0 ) __mltadd__(out->ve,&(x2->ve[x2->dim - i]),x1->ve[i],i); } return out; } neuron-7.5/src/mesch/version.c000077500000000000000000000051571323325274500164330ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Version routine */ /* This routine must be modified whenever modifications are made to Meschach by persons other than the original authors (David E. Stewart & Zbigniew Leyk); when new releases of Meschach are made the version number will also be updated */ #include void m_version() { static char rcsid[] = "version.c,v 1.1 1997/12/04 17:56:03 hines Exp"; printf("Meshach matrix library version 1.2b\n"); printf("RCS id: %s\n",rcsid); printf("Changes since 1.2a:\n"); printf("\t Fixed bug in schur() for 2x2 blocks with real e-vals\n"); printf("\t Fixed bug in schur() reading beyond end of array\n"); printf("\t Fixed some installation bugs\n"); printf("\t Fixed bugs & improved efficiency in spILUfactor()\n"); printf("\t px_inv() doesn't crash inverting non-permutations\n"); /**** List of modifications ****/ /* Example below is for illustration only */ /* printf("Modified by %s, routine(s) %s, file %s on date %s\n", "Joe Bloggs", "m_version", "version.c", "Fri Apr 5 16:00:38 EST 1994"); */ /* printf("Purpose: %s\n", "To update the version number"); */ } /* version.c,v * Revision 1.1 1997/12/04 17:56:03 hines * meschach .c files missing from distribution * * Revision 1.9 1994/03/24 00:04:05 des * Added notes on changes to spILUfactor() and px_inv(). * * Revision 1.8 1994/02/21 04:32:25 des * Set version to 1.2b with bug fixes in schur() and installation. * * Revision 1.7 1994/01/13 05:43:57 des * Version 1.2 update * * */ neuron-7.5/src/mesch/zcopy.c000077500000000000000000000121521323325274500161030ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ static char rcsid[] = "zcopy.c,v 1.1 1997/12/04 17:56:04 hines Exp"; #include #include "zmatrix.h" /* _zm_copy -- copies matrix into new area */ ZMAT *_zm_copy(in,out,i0,j0) ZMAT *in,*out; u_int i0,j0; { u_int i /* ,j */; if ( in==ZMNULL ) error(E_NULL,"_zm_copy"); if ( in==out ) return (out); if ( out==ZMNULL || out->m < in->m || out->n < in->n ) out = zm_resize(out,in->m,in->n); for ( i=i0; i < in->m; i++ ) MEM_COPY(&(in->me[i][j0]),&(out->me[i][j0]), (in->n - j0)*sizeof(complex)); /* for ( j=j0; j < in->n; j++ ) out->me[i][j] = in->me[i][j]; */ return (out); } /* _zv_copy -- copies vector into new area */ ZVEC *_zv_copy(in,out,i0) ZVEC *in,*out; u_int i0; { /* u_int i,j; */ if ( in==ZVNULL ) error(E_NULL,"_zv_copy"); if ( in==out ) return (out); if ( out==ZVNULL || out->dim < in->dim ) out = zv_resize(out,in->dim); MEM_COPY(&(in->ve[i0]),&(out->ve[i0]),(in->dim - i0)*sizeof(complex)); /* for ( i=i0; i < in->dim; i++ ) out->ve[i] = in->ve[i]; */ return (out); } /* The z._move() routines are for moving blocks of memory around within Meschach data structures and for re-arranging matrices, vectors etc. */ /* zm_move -- copies selected pieces of a matrix -- moves the m0 x n0 submatrix with top-left cor-ordinates (i0,j0) to the corresponding submatrix of out with top-left co-ordinates (i1,j1) -- out is resized (& created) if necessary */ ZMAT *zm_move(in,i0,j0,m0,n0,out,i1,j1) ZMAT *in, *out; int i0, j0, m0, n0, i1, j1; { int i; if ( ! in ) error(E_NULL,"zm_move"); if ( i0 < 0 || j0 < 0 || i1 < 0 || j1 < 0 || m0 < 0 || n0 < 0 || i0+m0 > in->m || j0+n0 > in->n ) error(E_BOUNDS,"zm_move"); if ( ! out ) out = zm_resize(out,i1+m0,j1+n0); else if ( i1+m0 > out->m || j1+n0 > out->n ) out = zm_resize(out,max(out->m,i1+m0),max(out->n,j1+n0)); for ( i = 0; i < m0; i++ ) MEM_COPY(&(in->me[i0+i][j0]),&(out->me[i1+i][j1]), n0*sizeof(complex)); return out; } /* zv_move -- copies selected pieces of a vector -- moves the length dim0 subvector with initial index i0 to the corresponding subvector of out with initial index i1 -- out is resized if necessary */ ZVEC *zv_move(in,i0,dim0,out,i1) ZVEC *in, *out; int i0, dim0, i1; { if ( ! in ) error(E_NULL,"zv_move"); if ( i0 < 0 || dim0 < 0 || i1 < 0 || i0+dim0 > in->dim ) error(E_BOUNDS,"zv_move"); if ( (! out) || i1+dim0 > out->dim ) out = zv_resize(out,i1+dim0); MEM_COPY(&(in->ve[i0]),&(out->ve[i1]),dim0*sizeof(complex)); return out; } /* zmv_move -- copies selected piece of matrix to a vector -- moves the m0 x n0 submatrix with top-left co-ordinate (i0,j0) to the subvector with initial index i1 (and length m0*n0) -- rows are copied contiguously -- out is resized if necessary */ ZVEC *zmv_move(in,i0,j0,m0,n0,out,i1) ZMAT *in; ZVEC *out; int i0, j0, m0, n0, i1; { int dim1, i; if ( ! in ) error(E_NULL,"zmv_move"); if ( i0 < 0 || j0 < 0 || m0 < 0 || n0 < 0 || i1 < 0 || i0+m0 > in->m || j0+n0 > in->n ) error(E_BOUNDS,"zmv_move"); dim1 = m0*n0; if ( (! out) || i1+dim1 > out->dim ) out = zv_resize(out,i1+dim1); for ( i = 0; i < m0; i++ ) MEM_COPY(&(in->me[i0+i][j0]),&(out->ve[i1+i*n0]),n0*sizeof(complex)); return out; } /* zvm_move -- copies selected piece of vector to a matrix -- moves the subvector with initial index i0 and length m1*n1 to the m1 x n1 submatrix with top-left co-ordinate (i1,j1) -- copying is done by rows -- out is resized if necessary */ ZMAT *zvm_move(in,i0,out,i1,j1,m1,n1) ZVEC *in; ZMAT *out; int i0, i1, j1, m1, n1; { int dim0, i; if ( ! in ) error(E_NULL,"zvm_move"); if ( i0 < 0 || i1 < 0 || j1 < 0 || m1 < 0 || n1 < 0 || i0+m1*n1 > in->dim ) error(E_BOUNDS,"zvm_move"); if ( ! out ) out = zm_resize(out,i1+m1,j1+n1); else out = zm_resize(out,max(i1+m1,out->m),max(j1+n1,out->n)); dim0 = m1*n1; for ( i = 0; i < m1; i++ ) MEM_COPY(&(in->ve[i0+i*n1]),&(out->me[i1+i][j1]),n1*sizeof(complex)); return out; } neuron-7.5/src/mesch/zfunc.c000077500000000000000000000107421323325274500160670ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Elementary functions for complex numbers -- if not already defined */ #include "zmatrix.h" #include static char rcsid[] = "zfunc.c,v 1.1 1997/12/04 17:56:05 hines Exp"; #ifndef COMPLEX_H #ifndef zmake /* zmake -- create complex number real + i*imag */ complex zmake(real,imag) double real, imag; { complex w; /* == real + i*imag */ w.re = real; w.im = imag; return w; } #endif #ifndef zneg /* zneg -- returns negative of z */ complex zneg(z) complex z; { z.re = - z.re; z.im = - z.im; return z; } #endif #ifndef zabs /* zabs -- returns |z| */ double zabs(z) complex z; { Real x, y, tmp; int x_expt, y_expt; /* Note: we must ensure that overflow does not occur! */ x = ( z.re >= 0.0 ) ? z.re : -z.re; y = ( z.im >= 0.0 ) ? z.im : -z.im; if ( x < y ) { tmp = x; x = y; y = tmp; } if ( x == 0.0 ) /* then y == 0.0 as well */ return 0.0; x = frexp(x,&x_expt); y = frexp(y,&y_expt); y = ldexp(y,y_expt-x_expt); tmp = sqrt(x*x+y*y); return ldexp(tmp,x_expt); } #endif #ifndef zadd /* zadd -- returns z1+z2 */ complex zadd(z1,z2) complex z1, z2; { complex z; z.re = z1.re + z2.re; z.im = z1.im + z2.im; return z; } #endif #ifndef zsub /* zsub -- returns z1-z2 */ complex zsub(z1,z2) complex z1, z2; { complex z; z.re = z1.re - z2.re; z.im = z1.im - z2.im; return z; } #endif #ifndef zmlt /* zmlt -- returns z1*z2 */ complex zmlt(z1,z2) complex z1, z2; { complex z; z.re = z1.re * z2.re - z1.im * z2.im; z.im = z1.re * z2.im + z1.im * z2.re; return z; } #endif #ifndef zinv /* zmlt -- returns 1/z */ complex zinv(z) complex z; { Real x, y, tmp; int x_expt, y_expt; if ( z.re == 0.0 && z.im == 0.0 ) error(E_SING,"zinv"); /* Note: we must ensure that overflow does not occur! */ x = ( z.re >= 0.0 ) ? z.re : -z.re; y = ( z.im >= 0.0 ) ? z.im : -z.im; if ( x < y ) { tmp = x; x = y; y = tmp; } x = frexp(x,&x_expt); y = frexp(y,&y_expt); y = ldexp(y,y_expt-x_expt); tmp = 1.0/(x*x + y*y); z.re = z.re*tmp*ldexp(1.0,-2*x_expt); z.im = -z.im*tmp*ldexp(1.0,-2*x_expt); return z; } #endif #ifndef zdiv /* zdiv -- returns z1/z2 */ complex zdiv(z1,z2) complex z1, z2; { return zmlt(z1,zinv(z2)); } #endif #ifndef zsqrt /* zsqrt -- returns sqrt(z); uses branch with Re sqrt(z) >= 0 */ complex zsqrt(z) complex z; { complex w; /* == sqrt(z) at end */ Real alpha; alpha = sqrt(0.5*(fabs(z.re) + zabs(z))); if (alpha!=0) { if (z.re>=0.0) { w.re = alpha; w.im = z.im / (2.0*alpha); } else { w.re = fabs(z.im)/(2.0*alpha); w.im = ( z.im >= 0 ) ? alpha : - alpha; } } else w.re = w.im = 0.0; return w; } #endif #ifndef zexp /* zexp -- returns exp(z) */ complex zexp(z) complex z; { complex w; /* == exp(z) at end */ Real r; r = exp(z.re); w.re = r*cos(z.im); w.im = r*sin(z.im); return w; } #endif #ifndef zlog /* zlog -- returns log(z); uses principal branch with -pi <= Im log(z) <= pi */ complex zlog(z) complex z; { complex w; /* == log(z) at end */ w.re = log(zabs(z)); w.im = atan2(z.im,z.re); return w; } #endif #ifndef zconj complex zconj(z) complex z; { complex w; /* == conj(z) */ w.re = z.re; w.im = - z.im; return w; } #endif #endif neuron-7.5/src/mesch/zgivens.c000077500000000000000000000114701323325274500164260ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Givens operations file. Contains routines for calculating and applying givens rotations for/to vectors and also to matrices by row and by column. Complex version. */ static char rcsid[] = "$Id: "; #include #include "zmatrix.h" #include "zmatrix2.h" #include /* (Complex) Givens rotation matrix: [ c -s ] [ s* c ] Note that c is real and s is complex */ /* zgivens -- returns c,s parameters for Givens rotation to eliminate y in the **column** vector [ x y ] */ void zgivens(x,y,c,s) complex x,y,*s; Real *c; { Real inv_norm, norm; complex tmp; /* this is a safe way of computing sqrt(|x|^2+|y|^2) */ tmp.re = zabs(x); tmp.im = zabs(y); norm = zabs(tmp); if ( norm == 0.0 ) { *c = 1.0; s->re = s->im = 0.0; } /* identity */ else { inv_norm = 1.0 / tmp.re; /* inv_norm = 1/|x| */ x.re *= inv_norm; x.im *= inv_norm; /* normalise x */ inv_norm = 1.0/norm; /* inv_norm = 1/||[x,y]||2 */ *c = tmp.re * inv_norm; /* now compute - conj(normalised x).y/||[x,y]||2 */ s->re = - inv_norm*(x.re*y.re + x.im*y.im); s->im = inv_norm*(x.re*y.im - x.im*y.re); } } /* rot_zvec -- apply Givens rotation to x's i & k components */ ZVEC *rot_zvec(x,i,k,c,s,out) ZVEC *x,*out; int i,k; double c; complex s; { complex temp1, temp2; if ( x==ZVNULL ) error(E_NULL,"rot_zvec"); if ( i < 0 || i >= x->dim || k < 0 || k >= x->dim ) error(E_RANGE,"rot_zvec"); if ( x != out ) out = zv_copy(x,out); /* temp1 = c*out->ve[i] - s*out->ve[k]; */ temp1.re = c*out->ve[i].re - s.re*out->ve[k].re + s.im*out->ve[k].im; temp1.im = c*out->ve[i].im - s.re*out->ve[k].im - s.im*out->ve[k].re; /* temp2 = c*out->ve[k] + zconj(s)*out->ve[i]; */ temp2.re = c*out->ve[k].re + s.re*out->ve[i].re + s.im*out->ve[i].im; temp2.im = c*out->ve[k].im + s.re*out->ve[i].im - s.im*out->ve[i].re; out->ve[i] = temp1; out->ve[k] = temp2; return (out); } /* zrot_rows -- premultiply mat by givens rotation described by c,s */ ZMAT *zrot_rows(mat,i,k,c,s,out) ZMAT *mat,*out; int i,k; double c; complex s; { u_int j; complex temp1, temp2; if ( mat==ZMNULL ) error(E_NULL,"zrot_rows"); if ( i < 0 || i >= mat->m || k < 0 || k >= mat->m ) error(E_RANGE,"zrot_rows"); if ( mat != out ) out = zm_copy(mat,zm_resize(out,mat->m,mat->n)); /* temp1 = c*out->me[i][j] - s*out->me[k][j]; */ for ( j=0; jn; j++ ) { /* temp1 = c*out->me[i][j] - s*out->me[k][j]; */ temp1.re = c*out->me[i][j].re - s.re*out->me[k][j].re + s.im*out->me[k][j].im; temp1.im = c*out->me[i][j].im - s.re*out->me[k][j].im - s.im*out->me[k][j].re; /* temp2 = c*out->me[k][j] + conj(s)*out->me[i][j]; */ temp2.re = c*out->me[k][j].re + s.re*out->me[i][j].re + s.im*out->me[i][j].im; temp2.im = c*out->me[k][j].im + s.re*out->me[i][j].im - s.im*out->me[i][j].re; out->me[i][j] = temp1; out->me[k][j] = temp2; } return (out); } /* zrot_cols -- postmultiply mat by adjoint Givens rotation described by c,s */ ZMAT *zrot_cols(mat,i,k,c,s,out) ZMAT *mat,*out; int i,k; double c; complex s; { u_int j; complex x, y; if ( mat==ZMNULL ) error(E_NULL,"zrot_cols"); if ( i < 0 || i >= mat->n || k < 0 || k >= mat->n ) error(E_RANGE,"zrot_cols"); if ( mat != out ) out = zm_copy(mat,zm_resize(out,mat->m,mat->n)); for ( j=0; jm; j++ ) { x = out->me[j][i]; y = out->me[j][k]; /* out->me[j][i] = c*x - conj(s)*y; */ out->me[j][i].re = c*x.re - s.re*y.re - s.im*y.im; out->me[j][i].im = c*x.im - s.re*y.im + s.im*y.re; /* out->me[j][k] = c*y + s*x; */ out->me[j][k].re = c*y.re + s.re*x.re - s.im*x.im; out->me[j][k].im = c*y.im + s.re*x.im + s.im*x.re; } return (out); } neuron-7.5/src/mesch/zhessen.c000077500000000000000000000076311323325274500164240ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for determining Hessenberg factorisations. Complex version */ static char rcsid[] = "zhessen.c,v 1.1 1997/12/04 17:56:07 hines Exp"; #include #include "zmatrix.h" #include "zmatrix2.h" /* zHfactor -- compute Hessenberg factorisation in compact form. -- factorisation performed in situ -- for details of the compact form see zQRfactor.c and zmatrix2.doc */ ZMAT *zHfactor(A, diag) ZMAT *A; ZVEC *diag; { static ZVEC *tmp1 = ZVNULL; Real beta; int k, limit; if ( ! A || ! diag ) error(E_NULL,"zHfactor"); if ( diag->dim < A->m - 1 ) error(E_SIZES,"zHfactor"); if ( A->m != A->n ) error(E_SQUARE,"zHfactor"); limit = A->m - 1; tmp1 = zv_resize(tmp1,A->m); MEM_STAT_REG(tmp1,TYPE_ZVEC); for ( k = 0; k < limit; k++ ) { zget_col(A,k,tmp1); zhhvec(tmp1,k+1,&beta,tmp1,&A->me[k+1][k]); diag->ve[k] = tmp1->ve[k+1]; /* printf("zHfactor: k = %d, beta = %g, tmp1 =\n",k,beta); zv_output(tmp1); */ zhhtrcols(A,k+1,k+1,tmp1,beta); zhhtrrows(A,0 ,k+1,tmp1,beta); /* printf("# at stage k = %d, A =\n",k); zm_output(A); */ } return (A); } /* zHQunpack -- unpack the compact representation of H and Q of a Hessenberg factorisation -- if either H or Q is NULL, then it is not unpacked -- it can be in situ with HQ == H -- returns HQ */ ZMAT *zHQunpack(HQ,diag,Q,H) ZMAT *HQ, *Q, *H; ZVEC *diag; { int i, j, limit; Real beta, r_ii, tmp_val; static ZVEC *tmp1 = ZVNULL, *tmp2 = ZVNULL; if ( HQ==ZMNULL || diag==ZVNULL ) error(E_NULL,"zHQunpack"); if ( HQ == Q || H == Q ) error(E_INSITU,"zHQunpack"); limit = HQ->m - 1; if ( diag->dim < limit ) error(E_SIZES,"zHQunpack"); if ( HQ->m != HQ->n ) error(E_SQUARE,"zHQunpack"); if ( Q != ZMNULL ) { Q = zm_resize(Q,HQ->m,HQ->m); tmp1 = zv_resize(tmp1,H->m); tmp2 = zv_resize(tmp2,H->m); MEM_STAT_REG(tmp1,TYPE_ZVEC); MEM_STAT_REG(tmp2,TYPE_ZVEC); for ( i = 0; i < H->m; i++ ) { /* tmp1 = i'th basis vector */ for ( j = 0; j < H->m; j++ ) tmp1->ve[j].re = tmp1->ve[j].im = 0.0; tmp1->ve[i].re = 1.0; /* apply H/h transforms in reverse order */ for ( j = limit-1; j >= 0; j-- ) { zget_col(HQ,j,tmp2); r_ii = zabs(tmp2->ve[j+1]); tmp2->ve[j+1] = diag->ve[j]; tmp_val = (r_ii*zabs(diag->ve[j])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; /* printf("zHQunpack: j = %d, beta = %g, tmp2 =\n", j,beta); zv_output(tmp2); */ zhhtrvec(tmp2,beta,j+1,tmp1,tmp1); } /* insert into Q */ zset_col(Q,i,tmp1); } } if ( H != ZMNULL ) { H = zm_copy(HQ,zm_resize(H,HQ->m,HQ->n)); limit = H->m; for ( i = 1; i < limit; i++ ) for ( j = 0; j < i-1; j++ ) H->me[i][j].re = H->me[i][j].im = 0.0; } return HQ; } neuron-7.5/src/mesch/zhsehldr.c000077500000000000000000000126621323325274500165700ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Files for matrix computations Householder transformation file. Contains routines for calculating householder transformations, applying them to vectors and matrices by both row & column. Complex version */ static char rcsid[] = "zhsehldr.c,v 1.1 1997/12/04 17:56:08 hines Exp"; #include #include "zmatrix.h" #include "zmatrix2.h" #include #define is_zero(z) ((z).re == 0.0 && (z).im == 0.0) /* zhhvec -- calulates Householder vector to eliminate all entries after the i0 entry of the vector vec. It is returned as out. May be in-situ */ ZVEC *zhhvec(vec,i0,beta,out,newval) ZVEC *vec,*out; int i0; Real *beta; complex *newval; { complex tmp; Real norm, abs_val; if ( i0 < 0 || i0 >= vec->dim ) error(E_BOUNDS,"zhhvec"); out = _zv_copy(vec,out,i0); tmp = _zin_prod(out,out,i0,Z_CONJ); if ( tmp.re <= 0.0 ) { *beta = 0.0; *newval = out->ve[i0]; return (out); } norm = sqrt(tmp.re); abs_val = zabs(out->ve[i0]); *beta = 1.0/(norm * (norm+abs_val)); if ( abs_val == 0.0 ) { newval->re = norm; newval->im = 0.0; } else { abs_val = -norm / abs_val; newval->re = abs_val*out->ve[i0].re; newval->im = abs_val*out->ve[i0].im; } abs_val = -norm / abs_val; out->ve[i0].re -= newval->re; out->ve[i0].im -= newval->im; return (out); } /* zhhtrvec -- apply Householder transformation to vector -- may be in-situ */ ZVEC *zhhtrvec(hh,beta,i0,in,out) ZVEC *hh,*in,*out; /* hh = Householder vector */ int i0; double beta; { complex scale, tmp; /* u_int i; */ if ( hh==ZVNULL || in==ZVNULL ) error(E_NULL,"zhhtrvec"); if ( in->dim != hh->dim ) error(E_SIZES,"zhhtrvec"); if ( i0 < 0 || i0 > in->dim ) error(E_BOUNDS,"zhhvec"); tmp = _zin_prod(hh,in,i0,Z_CONJ); scale.re = -beta*tmp.re; scale.im = -beta*tmp.im; out = zv_copy(in,out); __zmltadd__(&(out->ve[i0]),&(hh->ve[i0]),scale, (int)(in->dim-i0),Z_NOCONJ); /************************************************************ for ( i=i0; idim; i++ ) out->ve[i] = in->ve[i] - scale*hh->ve[i]; ************************************************************/ return (out); } /* zhhtrrows -- transform a matrix by a Householder vector by rows starting at row i0 from column j0 -- in-situ */ ZMAT *zhhtrrows(M,i0,j0,hh,beta) ZMAT *M; int i0, j0; ZVEC *hh; double beta; { complex ip, scale; int i /*, j */; if ( M==ZMNULL || hh==ZVNULL ) error(E_NULL,"zhhtrrows"); if ( M->n != hh->dim ) error(E_RANGE,"zhhtrrows"); if ( i0 < 0 || i0 > M->m || j0 < 0 || j0 > M->n ) error(E_BOUNDS,"zhhtrrows"); if ( beta == 0.0 ) return (M); /* for each row ... */ for ( i = i0; i < M->m; i++ ) { /* compute inner product */ ip = __zip__(&(M->me[i][j0]),&(hh->ve[j0]), (int)(M->n-j0),Z_NOCONJ); /************************************************** ip = 0.0; for ( j = j0; j < M->n; j++ ) ip += M->me[i][j]*hh->ve[j]; **************************************************/ scale.re = -beta*ip.re; scale.im = -beta*ip.im; /* if ( scale == 0.0 ) */ if ( is_zero(scale) ) continue; /* do operation */ __zmltadd__(&(M->me[i][j0]),&(hh->ve[j0]),scale, (int)(M->n-j0),Z_CONJ); /************************************************** for ( j = j0; j < M->n; j++ ) M->me[i][j] -= scale*hh->ve[j]; **************************************************/ } return (M); } /* zhhtrcols -- transform a matrix by a Householder vector by columns starting at row i0 from column j0 -- in-situ */ ZMAT *zhhtrcols(M,i0,j0,hh,beta) ZMAT *M; int i0, j0; ZVEC *hh; double beta; { /* Real ip, scale; */ complex scale; int i /*, k */; static ZVEC *w = ZVNULL; if ( M==ZMNULL || hh==ZVNULL ) error(E_NULL,"zhhtrcols"); if ( M->m != hh->dim ) error(E_SIZES,"zhhtrcols"); if ( i0 < 0 || i0 > M->m || j0 < 0 || j0 > M->n ) error(E_BOUNDS,"zhhtrcols"); if ( beta == 0.0 ) return (M); w = zv_resize(w,M->n); MEM_STAT_REG(w,TYPE_ZVEC); zv_zero(w); for ( i = i0; i < M->m; i++ ) /* if ( hh->ve[i] != 0.0 ) */ if ( ! is_zero(hh->ve[i]) ) __zmltadd__(&(w->ve[j0]),&(M->me[i][j0]),hh->ve[i], (int)(M->n-j0),Z_CONJ); for ( i = i0; i < M->m; i++ ) /* if ( hh->ve[i] != 0.0 ) */ if ( ! is_zero(hh->ve[i]) ) { scale.re = -beta*hh->ve[i].re; scale.im = -beta*hh->ve[i].im; __zmltadd__(&(M->me[i][j0]),&(w->ve[j0]),scale, (int)(M->n-j0),Z_CONJ); } return (M); } neuron-7.5/src/mesch/zlufctr.c000077500000000000000000000154021323325274500164310ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. Complex version */ static char rcsid[] = "zlufctr.c,v 1.1 1997/12/04 17:56:09 hines Exp"; #include #include "zmatrix.h" #include "zmatrix2.h" #include #define is_zero(z) ((z).re == 0.0 && (z).im == 0.0) /* Most matrix factorisation routines are in-situ unless otherwise specified */ /* zLUfactor -- Gaussian elimination with scaled partial pivoting -- Note: returns LU matrix which is A */ ZMAT *zLUfactor(A,pivot) ZMAT *A; PERM *pivot; { u_int i, j, k, k_max, m, n; int i_max; Real dtemp, max1; complex **A_v, *A_piv, *A_row, temp; static VEC *scale = VNULL; if ( A==ZMNULL || pivot==PNULL ) error(E_NULL,"zLUfactor"); if ( pivot->size != A->m ) error(E_SIZES,"zLUfactor"); m = A->m; n = A->n; scale = v_resize(scale,A->m); MEM_STAT_REG(scale,TYPE_VEC); A_v = A->me; /* initialise pivot with identity permutation */ for ( i=0; ipe[i] = i; /* set scale parameters */ for ( i=0; ive[i] = max1; } /* main loop */ k_max = min(m,n)-1; for ( k=0; kve[i] > 0.0 ) { dtemp = zabs(A_v[i][k])/scale->ve[i]; if ( dtemp > max1 ) { max1 = dtemp; i_max = i; } } /* if no pivot then ignore column k... */ if ( i_max == -1 ) continue; /* do we pivot ? */ if ( i_max != k ) /* yes we do... */ { px_transp(pivot,i_max,k); for ( j=0; jm != A->n || A->n != b->dim ) error(E_SIZES,"zLUsolve"); x = px_zvec(pivot,b,x); /* x := P.b */ zLsolve(A,x,x,1.0); /* implicit diagonal = 1 */ zUsolve(A,x,x,0.0); /* explicit diagonal */ return (x); } /* zLUAsolve -- given an LU factorisation in A, solve A^*.x=b */ ZVEC *zLUAsolve(LU,pivot,b,x) ZMAT *LU; PERM *pivot; ZVEC *b,*x; { if ( ! LU || ! b || ! pivot ) error(E_NULL,"zLUAsolve"); if ( LU->m != LU->n || LU->n != b->dim ) error(E_SIZES,"zLUAsolve"); x = zv_copy(b,x); zUAsolve(LU,x,x,0.0); /* explicit diagonal */ zLAsolve(LU,x,x,1.0); /* implicit diagonal = 1 */ pxinv_zvec(pivot,x,x); /* x := P^*.x */ return (x); } /* zm_inverse -- returns inverse of A, provided A is not too rank deficient -- uses LU factorisation */ ZMAT *zm_inverse(A,out) ZMAT *A, *out; { int i; ZVEC *tmp, *tmp2; ZMAT *A_cp; PERM *pivot; if ( ! A ) error(E_NULL,"zm_inverse"); if ( A->m != A->n ) error(E_SQUARE,"zm_inverse"); if ( ! out || out->m < A->m || out->n < A->n ) out = zm_resize(out,A->m,A->n); A_cp = zm_copy(A,ZMNULL); tmp = zv_get(A->m); tmp2 = zv_get(A->m); pivot = px_get(A->m); tracecatch(zLUfactor(A_cp,pivot),"zm_inverse"); for ( i = 0; i < A->n; i++ ) { zv_zero(tmp); tmp->ve[i].re = 1.0; tmp->ve[i].im = 0.0; tracecatch(zLUsolve(A_cp,pivot,tmp,tmp2),"m_inverse"); zset_col(out,i,tmp2); } ZM_FREE(A_cp); ZV_FREE(tmp); ZV_FREE(tmp2); PX_FREE(pivot); return out; } /* zLUcondest -- returns an estimate of the condition number of LU given the LU factorisation in compact form */ double zLUcondest(LU,pivot) ZMAT *LU; PERM *pivot; { static ZVEC *y = ZVNULL, *z = ZVNULL; Real cond_est, L_norm, U_norm, norm, sn_inv; complex sum; int i, j, n; if ( ! LU || ! pivot ) error(E_NULL,"zLUcondest"); if ( LU->m != LU->n ) error(E_SQUARE,"zLUcondest"); if ( LU->n != pivot->size ) error(E_SIZES,"zLUcondest"); n = LU->n; y = zv_resize(y,n); z = zv_resize(z,n); MEM_STAT_REG(y,TYPE_ZVEC); MEM_STAT_REG(z,TYPE_ZVEC); cond_est = 0.0; /* should never be returned */ for ( i = 0; i < n; i++ ) { sum.re = 1.0; sum.im = 0.0; for ( j = 0; j < i; j++ ) /* sum -= LU->me[j][i]*y->ve[j]; */ sum = zsub(sum,zmlt(LU->me[j][i],y->ve[j])); /* sum -= (sum < 0.0) ? 1.0 : -1.0; */ sn_inv = 1.0 / zabs(sum); sum.re += sum.re * sn_inv; sum.im += sum.im * sn_inv; if ( is_zero(LU->me[i][i]) ) return HUGE; /* y->ve[i] = sum / LU->me[i][i]; */ y->ve[i] = zdiv(sum,LU->me[i][i]); } zLAsolve(LU,y,y,1.0); zLUsolve(LU,pivot,y,z); /* now estimate norm of A (even though it is not directly available) */ /* actually computes ||L||_inf.||U||_inf */ U_norm = 0.0; for ( i = 0; i < n; i++ ) { norm = 0.0; for ( j = i; j < n; j++ ) norm += zabs(LU->me[i][j]); if ( norm > U_norm ) U_norm = norm; } L_norm = 0.0; for ( i = 0; i < n; i++ ) { norm = 1.0; for ( j = 0; j < i; j++ ) norm += zabs(LU->me[i][j]); if ( norm > L_norm ) L_norm = norm; } tracecatch(cond_est = U_norm*L_norm*zv_norm_inf(z)/zv_norm_inf(y), "LUcondest"); return cond_est; } neuron-7.5/src/mesch/zmachine.c000077500000000000000000000102651323325274500165400ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains basic routines which are used by the functions involving complex vectors. These are the routines that should be modified in order to take full advantage of specialised architectures (pipelining, vector processors etc). */ static char *rcsid = "zmachine.c,v 1.1 1997/12/04 17:56:10 hines Exp"; #include "machine.h" #include "zmatrix.h" #include /* __zconj__ -- complex conjugate */ void __zconj__(zp,len) complex *zp; int len; { int i; for ( i = 0; i < len; i++ ) zp[i].im = - zp[i].im; } /* __zip__ -- inner product -- computes sum_i zp1[i].zp2[i] if flag == 0 sum_i zp1[i]*.zp2[i] if flag != 0 */ complex __zip__(zp1,zp2,len,flag) complex *zp1, *zp2; int flag, len; { complex sum; int i; sum.re = sum.im = 0.0; if ( flag ) { for ( i = 0; i < len; i++ ) { sum.re += zp1[i].re*zp2[i].re + zp1[i].im*zp2[i].im; sum.im += zp1[i].re*zp2[i].im - zp1[i].im*zp2[i].re; } } else { for ( i = 0; i < len; i++ ) { sum.re += zp1[i].re*zp2[i].re - zp1[i].im*zp2[i].im; sum.im += zp1[i].re*zp2[i].im + zp1[i].im*zp2[i].re; } } return sum; } /* __zmltadd__ -- scalar multiply and add i.e. complex saxpy -- computes zp1[i] += s.zp2[i] if flag == 0 -- computes zp1[i] += s.zp2[i]* if flag != 0 */ void __zmltadd__(zp1,zp2,s,len,flag) complex *zp1, *zp2, s; int flag, len; { int i; LongReal t_re, t_im; if ( ! flag ) { for ( i = 0; i < len; i++ ) { t_re = zp1[i].re + s.re*zp2[i].re - s.im*zp2[i].im; t_im = zp1[i].im + s.re*zp2[i].im + s.im*zp2[i].re; zp1[i].re = t_re; zp1[i].im = t_im; } } else { for ( i = 0; i < len; i++ ) { t_re = zp1[i].re + s.re*zp2[i].re + s.im*zp2[i].im; t_im = zp1[i].im - s.re*zp2[i].im + s.im*zp2[i].re; zp1[i].re = t_re; zp1[i].im = t_im; } } } /* __zmlt__ scalar complex multiply array c.f. sv_mlt() */ void __zmlt__(zp,s,out,len) complex *zp, s, *out; register int len; { int i; LongReal t_re, t_im; for ( i = 0; i < len; i++ ) { t_re = s.re*zp[i].re - s.im*zp[i].im; t_im = s.re*zp[i].im + s.im*zp[i].re; out[i].re = t_re; out[i].im = t_im; } } /* __zadd__ -- add complex arrays c.f. v_add() */ void __zadd__(zp1,zp2,out,len) complex *zp1, *zp2, *out; int len; { int i; for ( i = 0; i < len; i++ ) { out[i].re = zp1[i].re + zp2[i].re; out[i].im = zp1[i].im + zp2[i].im; } } /* __zsub__ -- subtract complex arrays c.f. v_sub() */ void __zsub__(zp1,zp2,out,len) complex *zp1, *zp2, *out; int len; { int i; for ( i = 0; i < len; i++ ) { out[i].re = zp1[i].re - zp2[i].re; out[i].im = zp1[i].im - zp2[i].im; } } /* __zzero__ -- zeros an array of complex numbers */ void __zzero__(zp,len) complex *zp; int len; { /* if a Real precision zero is equivalent to a string of nulls */ MEM_ZERO((char *)zp,len*sizeof(complex)); /* else, need to zero the array entry by entry */ /****************************** while ( len-- ) { zp->re = zp->im = 0.0; zp++; } ******************************/ } neuron-7.5/src/mesch/zmatio.c000077500000000000000000000246601323325274500162510ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ #include #include #include "zmatrix.h" static char rcsid[] = "zmatio.c,v 1.1 1997/12/04 17:56:11 hines Exp"; /* local variables */ static char line[MAXLINE]; /************************************************************************** Input routines **************************************************************************/ complex z_finput(fp) FILE *fp; { int io_code; complex z; skipjunk(fp); if ( isatty(fileno(fp)) ) { do { fprintf(stderr,"real and imag parts: "); if ( fgets(line,MAXLINE,fp) == NULL ) error(E_EOF,"z_finput"); #if REAL == DOUBLE io_code = sscanf(line,"%lf%lf",&z.re,&z.im); #elif REAL == FLOAT io_code = sscanf(line,"%f%f",&z.re,&z.im); #endif } while ( io_code != 2 ); } else #if REAL == DOUBLE if ( (io_code=fscanf(fp," (%lf,%lf)",&z.re,&z.im)) < 2 ) #elif REAL == FLOAT if ( (io_code=fscanf(fp," (%f,%f)",&z.re,&z.im)) < 2 ) #endif error((io_code == EOF) ? E_EOF : E_FORMAT,"z_finput"); return z; } ZMAT *zm_finput(fp,a) FILE *fp; ZMAT *a; { ZMAT *izm_finput(),*bzm_finput(); if ( isatty(fileno(fp)) ) return izm_finput(fp,a); else return bzm_finput(fp,a); } /* izm_finput -- interactive input of matrix */ ZMAT *izm_finput(fp,mat) FILE *fp; ZMAT *mat; { char c; u_int i, j, m, n, dynamic; /* dynamic set to TRUE if memory allocated here */ /* get matrix size */ if ( mat != ZMNULL && mat->mnm; n = mat->n; dynamic = FALSE; } else { dynamic = TRUE; do { fprintf(stderr,"ComplexMatrix: rows cols:"); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"izm_finput"); } while ( sscanf(line,"%u%u",&m,&n)<2 || m>MAXDIM || n>MAXDIM ); mat = zm_get(m,n); } /* input elements */ for ( i=0; ime[i][j].re,mat->me[i][j].im); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"izm_finput"); if ( (*line == 'b' || *line == 'B') && j > 0 ) { j--; dynamic = FALSE; goto redo2; } if ( (*line == 'f' || *line == 'F') && j < n-1 ) { j++; dynamic = FALSE; goto redo2; } } while ( *line=='\0' || #if REAL == DOUBLE sscanf(line,"%lf%lf", #elif REAL == FLOAT sscanf(line,"%f%f", #endif &mat->me[i][j].re,&mat->me[i][j].im)<1 ); fprintf(stderr,"Continue: "); if (fscanf(fp,"%c",&c) != 1) { error(E_INPUT, "izm_finput"); } if ( c == 'n' || c == 'N' ) { dynamic = FALSE; goto redo; } if ( (c == 'b' || c == 'B') /* && i > 0 */ ) { if ( i > 0 ) i--; dynamic = FALSE; goto redo; } } return (mat); } /* bzm_finput -- batch-file input of matrix */ ZMAT *bzm_finput(fp,mat) FILE *fp; ZMAT *mat; { u_int i,j,m,n,dummy; int io_code; /* get dimension */ skipjunk(fp); if ((io_code=fscanf(fp," ComplexMatrix: %u by %u",&m,&n)) < 2 || m>MAXDIM || n>MAXDIM ) error(io_code==EOF ? E_EOF : E_FORMAT,"bzm_finput"); /* allocate memory if necessary */ if ( mat==ZMNULL || mat->mnme[i][j].re,&mat->me[i][j].im)) < 2 ) error(io_code==EOF ? E_EOF : E_FORMAT,"bzm_finput"); } } return (mat); } ZVEC *zv_finput(fp,x) FILE *fp; ZVEC *x; { ZVEC *izv_finput(),*bzv_finput(); if ( isatty(fileno(fp)) ) return izv_finput(fp,x); else return bzv_finput(fp,x); } /* izv_finput -- interactive input of vector */ ZVEC *izv_finput(fp,vec) FILE *fp; ZVEC *vec; { u_int i,dim,dynamic; /* dynamic set if memory allocated here */ /* get vector dimension */ if ( vec != ZVNULL && vec->dimdim; dynamic = FALSE; } else { dynamic = TRUE; do { fprintf(stderr,"ComplexVector: dim: "); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"izv_finput"); } while ( sscanf(line,"%u",&dim)<1 || dim>MAXDIM ); vec = zv_get(dim); } /* input elements */ for ( i=0; ive[i].re,vec->ve[i].im); if ( fgets(line,MAXLINE,fp)==NULL ) error(E_INPUT,"izv_finput"); if ( (*line == 'b' || *line == 'B') && i > 0 ) { i--; dynamic = FALSE; goto redo; } if ( (*line == 'f' || *line == 'F') && i < dim-1 ) { i++; dynamic = FALSE; goto redo; } } while ( *line=='\0' || #if REAL == DOUBLE sscanf(line,"%lf%lf", #elif REAL == FLOAT sscanf(line,"%f%f", #endif &vec->ve[i].re,&vec->ve[i].im) < 2 ); return (vec); } /* bzv_finput -- batch-file input of vector */ ZVEC *bzv_finput(fp,vec) FILE *fp; ZVEC *vec; { u_int i,dim; int io_code; /* get dimension */ skipjunk(fp); if ((io_code=fscanf(fp," ComplexVector: dim:%u",&dim)) < 1 || dim>MAXDIM ) error(io_code==EOF ? 7 : 6,"bzv_finput"); /* allocate memory if necessary */ if ( vec==ZVNULL || vec->dimve[i].re,&vec->ve[i].im)) < 2 ) error(io_code==EOF ? 7 : 6,"bzv_finput"); return (vec); } /************************************************************************** Output routines **************************************************************************/ static char *zformat = " (%14.9g, %14.9g) "; char *setzformat(f_string) char *f_string; { char *old_f_string; old_f_string = zformat; if ( f_string != (char *)NULL && *f_string != '\0' ) zformat = f_string; return old_f_string; } void z_foutput(fp,z) FILE *fp; complex z; { fprintf(fp,zformat,z.re,z.im); putc('\n',fp); } void zm_foutput(fp,a) FILE *fp; ZMAT *a; { u_int i, j, tmp; if ( a == ZMNULL ) { fprintf(fp,"ComplexMatrix: NULL\n"); return; } fprintf(fp,"ComplexMatrix: %d by %d\n",a->m,a->n); if ( a->me == (complex **)NULL ) { fprintf(fp,"NULL\n"); return; } for ( i=0; im; i++ ) /* for each row... */ { fprintf(fp,"row %u: ",i); for ( j=0, tmp=1; jn; j++, tmp++ ) { /* for each col in row... */ fprintf(fp,zformat,a->me[i][j].re,a->me[i][j].im); if ( ! (tmp % 2) ) putc('\n',fp); } if ( tmp % 2 != 1 ) putc('\n',fp); } } void zv_foutput(fp,x) FILE *fp; ZVEC *x; { u_int i, tmp; if ( x == ZVNULL ) { fprintf(fp,"ComplexVector: NULL\n"); return; } fprintf(fp,"ComplexVector: dim: %d\n",x->dim); if ( x->ve == (complex *)NULL ) { fprintf(fp,"NULL\n"); return; } for ( i=0, tmp=0; idim; i++, tmp++ ) { fprintf(fp,zformat,x->ve[i].re,x->ve[i].im); if ( (tmp % 2) == 1 ) putc('\n',fp); } if ( (tmp % 2) != 0 ) putc('\n',fp); } void zm_dump(fp,a) FILE *fp; ZMAT *a; { u_int i, j, tmp; if ( a == ZMNULL ) { fprintf(fp,"ComplexMatrix: NULL\n"); return; } fprintf(fp,"ComplexMatrix: %d by %d @ 0x%p\n",a->m,a->n,a); fprintf(fp,"\tmax_m = %d, max_n = %d, max_size = %d\n", a->max_m, a->max_n, a->max_size); if ( a->me == (complex **)NULL ) { fprintf(fp,"NULL\n"); return; } fprintf(fp,"a->me @ 0x%p\n",(a->me)); fprintf(fp,"a->base @ 0x%p\n",(a->base)); for ( i=0; im; i++ ) /* for each row... */ { fprintf(fp,"row %u: @ 0x%p ",i,(a->me[i])); for ( j=0, tmp=1; jn; j++, tmp++ ) { /* for each col in row... */ fprintf(fp,zformat,a->me[i][j].re,a->me[i][j].im); if ( ! (tmp % 2) ) putc('\n',fp); } if ( tmp % 2 != 1 ) putc('\n',fp); } } void zv_dump(fp,x) FILE *fp; ZVEC *x; { u_int i, tmp; if ( ! x ) { fprintf(fp,"ComplexVector: NULL\n"); return; } fprintf(fp,"ComplexVector: dim: %d @ 0x%p\n",x->dim,(x)); if ( ! x->ve ) { fprintf(fp,"NULL\n"); return; } fprintf(fp,"x->ve @ 0x%p\n",(x->ve)); for ( i=0, tmp=0; idim; i++, tmp++ ) { fprintf(fp,zformat,x->ve[i].re,x->ve[i].im); if ( tmp % 2 == 1 ) putc('\n',fp); } if ( tmp % 2 != 0 ) putc('\n',fp); } neuron-7.5/src/mesch/zmatlab.c000077500000000000000000000143051323325274500163730ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains routines for import/exporting complex data to/from MATLAB. The main routines are: ZMAT *zm_save(FILE *fp,ZMAT *A,char *name) ZVEC *zv_save(FILE *fp,ZVEC *x,char *name) complex z_save(FILE *fp,complex z,char *name) ZMAT *zm_load(FILE *fp,char **name) */ #include #include "zmatrix.h" #include "matlab.h" static char rcsid[] = "zmatlab.c,v 1.1 1997/12/04 17:56:11 hines Exp"; /* zm_save -- save matrix in ".mat" file for MATLAB -- returns matrix to be saved */ ZMAT *zm_save(fp,A,name) FILE *fp; ZMAT *A; char *name; { int i, j; matlab mat; if ( ! A ) error(E_NULL,"zm_save"); mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; mat.m = A->m; mat.n = A->n; mat.imag = TRUE; mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1; /* write header */ fwrite(&mat,sizeof(matlab),1,fp); /* write name */ if ( name == (char *)NULL ) fwrite("",sizeof(char),1,fp); else fwrite(name,sizeof(char),(int)(mat.namlen),fp); /* write actual data */ #if ORDER == ROW_ORDER for ( i = 0; i < A->m; i++ ) for ( j = 0; j < A->n; j++ ) fwrite(&(A->me[i][j].re),sizeof(Real),1,fp); for ( i = 0; i < A->m; i++ ) for ( j = 0; j < A->n; j++ ) fwrite(&(A->me[i][j].im),sizeof(Real),1,fp); #else /* column major order: ORDER == COL_ORDER */ for ( j = 0; j < A->n; j++ ) for ( i = 0; i < A->m; i++ ) fwrite(&(A->me[i][j].re),sizeof(Real),1,fp); for ( j = 0; j < A->n; j++ ) for ( i = 0; i < A->m; i++ ) fwrite(&(A->me[i][j].im),sizeof(Real),1,fp); #endif return A; } /* zv_save -- save vector in ".mat" file for MATLAB -- saves it as a row vector -- returns vector to be saved */ ZVEC *zv_save(fp,x,name) FILE *fp; ZVEC *x; char *name; { int i; matlab mat; if ( ! x ) error(E_NULL,"zv_save"); mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; mat.m = x->dim; mat.n = 1; mat.imag = TRUE; mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1; /* write header */ fwrite(&mat,sizeof(matlab),1,fp); /* write name */ if ( name == (char *)NULL ) fwrite("",sizeof(char),1,fp); else fwrite(name,sizeof(char),(int)(mat.namlen),fp); /* write actual data */ for ( i = 0; i < x->dim; i++ ) fwrite(&(x->ve[i].re),sizeof(Real),1,fp); for ( i = 0; i < x->dim; i++ ) fwrite(&(x->ve[i].im),sizeof(Real),1,fp); return x; } /* z_save -- saves complex number in ".mat" file for MATLAB -- returns complex number to be saved */ complex z_save(fp,z,name) FILE *fp; complex z; char *name; { matlab mat; mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; mat.m = 1; mat.n = 1; mat.imag = TRUE; mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1; /* write header */ fwrite(&mat,sizeof(matlab),1,fp); /* write name */ if ( name == (char *)NULL ) fwrite("",sizeof(char),1,fp); else fwrite(name,sizeof(char),(int)(mat.namlen),fp); /* write actual data */ fwrite(&z,sizeof(complex),1,fp); return z; } /* zm_load -- loads in a ".mat" file variable as produced by MATLAB -- matrix returned; imaginary parts ignored */ ZMAT *zm_load(fp,name) FILE *fp; char **name; { ZMAT *A; int i; int m_flag, o_flag, p_flag, t_flag; float f_temp; double d_temp; matlab mat; if ( fread(&mat,sizeof(matlab),1,fp) != 1 ) error(E_FORMAT,"zm_load"); if ( mat.type >= 10000 ) /* don't load a sparse matrix! */ error(E_FORMAT,"zm_load"); m_flag = (mat.type/1000) % 10; o_flag = (mat.type/100) % 10; p_flag = (mat.type/10) % 10; t_flag = (mat.type) % 10; if ( m_flag != MACH_ID ) error(E_FORMAT,"zm_load"); if ( t_flag != 0 ) error(E_FORMAT,"zm_load"); if ( p_flag != DOUBLE_PREC && p_flag != SINGLE_PREC ) error(E_FORMAT,"zm_load"); *name = (char *)malloc((unsigned)(mat.namlen)+1); if ( fread(*name,sizeof(char),(unsigned)(mat.namlen),fp) == 0 ) error(E_FORMAT,"zm_load"); A = zm_get((unsigned)(mat.m),(unsigned)(mat.n)); for ( i = 0; i < A->m*A->n; i++ ) { if ( p_flag == DOUBLE_PREC ) { if (fread(&d_temp,sizeof(double),1,fp) != 1) {error(E_INPUT, "zm_load");} } else { if (fread(&f_temp,sizeof(float),1,fp) != 1) {error(E_INPUT, "zm_load");} d_temp = f_temp; } if ( o_flag == ROW_ORDER ) { A->me[i / A->n][i % A->n].re = d_temp; } else if ( o_flag == COL_ORDER ) { A->me[i % A->m][i / A->m].re = d_temp; } else { error(E_FORMAT,"zm_load"); } } if ( mat.imag ) /* skip imaginary part */ for ( i = 0; i < A->m*A->n; i++ ) { if ( p_flag == DOUBLE_PREC ) { if (fread(&d_temp,sizeof(double),1,fp) != 1) {error(E_INPUT, "zm_load");} } else { if (fread(&f_temp,sizeof(float),1,fp) != 1) {error(E_INPUT, "zm_load");} d_temp = f_temp; } if ( o_flag == ROW_ORDER ) A->me[i / A->n][i % A->n].im = d_temp; else if ( o_flag == COL_ORDER ) A->me[i % A->m][i / A->m].im = d_temp; else error(E_FORMAT,"zm_load"); } return A; } neuron-7.5/src/mesch/zmatop.c000077500000000000000000000357401323325274500162610ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ #include #include "zmatrix.h" static char rcsid[] = "zmatop.c,v 1.1 1997/12/04 17:56:12 hines Exp"; #define is_zero(z) ((z).re == 0.0 && (z).im == 0.0) /* zm_add -- matrix addition -- may be in-situ */ ZMAT *zm_add(mat1,mat2,out) ZMAT *mat1,*mat2,*out; { u_int m,n,i; if ( mat1==ZMNULL || mat2==ZMNULL ) error(E_NULL,"zm_add"); if ( mat1->m != mat2->m || mat1->n != mat2->n ) error(E_SIZES,"zm_add"); if ( out==ZMNULL || out->m != mat1->m || out->n != mat1->n ) out = zm_resize(out,mat1->m,mat1->n); m = mat1->m; n = mat1->n; for ( i=0; ime[i],mat2->me[i],out->me[i],(int)n); /************************************************** for ( j=0; jme[i][j] = mat1->me[i][j]+mat2->me[i][j]; **************************************************/ } return (out); } /* zm_sub -- matrix subtraction -- may be in-situ */ ZMAT *zm_sub(mat1,mat2,out) ZMAT *mat1,*mat2,*out; { u_int m,n,i; if ( mat1==ZMNULL || mat2==ZMNULL ) error(E_NULL,"zm_sub"); if ( mat1->m != mat2->m || mat1->n != mat2->n ) error(E_SIZES,"zm_sub"); if ( out==ZMNULL || out->m != mat1->m || out->n != mat1->n ) out = zm_resize(out,mat1->m,mat1->n); m = mat1->m; n = mat1->n; for ( i=0; ime[i],mat2->me[i],out->me[i],(int)n); /************************************************** for ( j=0; jme[i][j] = mat1->me[i][j]-mat2->me[i][j]; **************************************************/ } return (out); } /* Note: In the following routines, "adjoint" means complex conjugate transpose: A* = conjugate(A^T) */ /* zm_mlt -- matrix-matrix multiplication */ ZMAT *zm_mlt(A,B,OUT) ZMAT *A,*B,*OUT; { u_int i, /* j, */ k, m, n, p; complex **A_v, **B_v /*, *B_row, *OUT_row, sum, tmp */; if ( A==ZMNULL || B==ZMNULL ) error(E_NULL,"zm_mlt"); if ( A->n != B->m ) error(E_SIZES,"zm_mlt"); if ( A == OUT || B == OUT ) error(E_INSITU,"zm_mlt"); m = A->m; n = A->n; p = B->n; A_v = A->me; B_v = B->me; if ( OUT==ZMNULL || OUT->m != A->m || OUT->n != B->n ) OUT = zm_resize(OUT,A->m,B->n); /**************************************************************** for ( i=0; ime[i][j] = sum; } ****************************************************************/ zm_zero(OUT); for ( i=0; ime[i],B_v[k],A_v[i][k],(int)p,Z_NOCONJ); /************************************************** B_row = B_v[k]; OUT_row = OUT->me[i]; for ( j=0; jn != B->n ) error(E_SIZES,"zmma_mlt"); if ( ! OUT || OUT->m != A->m || OUT->n != B->m ) OUT = zm_resize(OUT,A->m,B->m); limit = A->n; for ( i = 0; i < A->m; i++ ) for ( j = 0; j < B->m; j++ ) { OUT->me[i][j] = __zip__(B->me[j],A->me[i],(int)limit,Z_CONJ); /************************************************** sum = 0.0; A_row = A->me[i]; B_row = B->me[j]; for ( k = 0; k < limit; k++ ) sum += (*A_row++)*(*B_row++); OUT->me[i][j] = sum; **************************************************/ } return OUT; } /* zmam_mlt -- matrix adjoint-matrix multiplication -- A*.B is returned, result stored in OUT */ ZMAT *zmam_mlt(A,B,OUT) ZMAT *A, *B, *OUT; { int i, k, limit; /* complex *B_row, *OUT_row, multiplier; */ complex tmp; if ( ! A || ! B ) error(E_NULL,"zmam_mlt"); if ( A == OUT || B == OUT ) error(E_INSITU,"zmam_mlt"); if ( A->m != B->m ) error(E_SIZES,"zmam_mlt"); if ( ! OUT || OUT->m != A->n || OUT->n != B->n ) OUT = zm_resize(OUT,A->n,B->n); limit = B->n; zm_zero(OUT); for ( k = 0; k < A->m; k++ ) for ( i = 0; i < A->n; i++ ) { tmp.re = A->me[k][i].re; tmp.im = - A->me[k][i].im; if ( ! is_zero(tmp) ) __zmltadd__(OUT->me[i],B->me[k],tmp,(int)limit,Z_NOCONJ); } return OUT; } /* zmv_mlt -- matrix-vector multiplication -- Note: b is treated as a column vector */ ZVEC *zmv_mlt(A,b,out) ZMAT *A; ZVEC *b,*out; { u_int i, m, n; complex **A_v, *b_v /*, *A_row */; /* register complex sum; */ if ( A==ZMNULL || b==ZVNULL ) error(E_NULL,"zmv_mlt"); if ( A->n != b->dim ) error(E_SIZES,"zmv_mlt"); if ( b == out ) error(E_INSITU,"zmv_mlt"); if ( out == ZVNULL || out->dim != A->m ) out = zv_resize(out,A->m); m = A->m; n = A->n; A_v = A->me; b_v = b->ve; for ( i=0; ive[i] = __zip__(A_v[i],b_v,(int)n,Z_NOCONJ); /************************************************** A_row = A_v[i]; b_v = b->ve; for ( j=0; jve[i] = sum; **************************************************/ } return out; } /* zsm_mlt -- scalar-matrix multiply -- may be in-situ */ ZMAT *zsm_mlt(scalar,matrix,out) complex scalar; ZMAT *matrix,*out; { u_int m,n,i; if ( matrix==ZMNULL ) error(E_NULL,"zsm_mlt"); if ( out==ZMNULL || out->m != matrix->m || out->n != matrix->n ) out = zm_resize(out,matrix->m,matrix->n); m = matrix->m; n = matrix->n; for ( i=0; ime[i],scalar,out->me[i],(int)n); /************************************************** for ( j=0; jme[i][j] = scalar*matrix->me[i][j]; **************************************************/ return (out); } /* zvm_mlt -- vector adjoint-matrix multiplication */ ZVEC *zvm_mlt(A,b,out) ZMAT *A; ZVEC *b,*out; { u_int j,m,n; /* complex sum,**A_v,*b_v; */ if ( A==ZMNULL || b==ZVNULL ) error(E_NULL,"zvm_mlt"); if ( A->m != b->dim ) error(E_SIZES,"zvm_mlt"); if ( b == out ) error(E_INSITU,"zvm_mlt"); if ( out == ZVNULL || out->dim != A->n ) out = zv_resize(out,A->n); m = A->m; n = A->n; zv_zero(out); for ( j = 0; j < m; j++ ) if ( b->ve[j].re != 0.0 || b->ve[j].im != 0.0 ) __zmltadd__(out->ve,A->me[j],b->ve[j],(int)n,Z_CONJ); /************************************************** A_v = A->me; b_v = b->ve; for ( j=0; jve[j] = sum; } **************************************************/ return out; } /* zm_adjoint -- adjoint matrix */ ZMAT *zm_adjoint(in,out) ZMAT *in, *out; { int i, j; int in_situ; complex tmp; if ( in == ZMNULL ) error(E_NULL,"zm_adjoint"); if ( in == out && in->n != in->m ) error(E_INSITU2,"zm_adjoint"); in_situ = ( in == out ); if ( out == ZMNULL || out->m != in->n || out->n != in->m ) out = zm_resize(out,in->n,in->m); if ( ! in_situ ) { for ( i = 0; i < in->m; i++ ) for ( j = 0; j < in->n; j++ ) { out->me[j][i].re = in->me[i][j].re; out->me[j][i].im = - in->me[i][j].im; } } else { for ( i = 0 ; i < in->m; i++ ) { for ( j = 0; j < i; j++ ) { tmp.re = in->me[i][j].re; tmp.im = in->me[i][j].im; in->me[i][j].re = in->me[j][i].re; in->me[i][j].im = - in->me[j][i].im; in->me[j][i].re = tmp.re; in->me[j][i].im = - tmp.im; } in->me[i][i].im = - in->me[i][i].im; } } return out; } /* zswap_rows -- swaps rows i and j of matrix A upto column lim */ ZMAT *zswap_rows(A,i,j,lo,hi) ZMAT *A; int i, j, lo, hi; { int k; complex **A_me, tmp; if ( ! A ) error(E_NULL,"swap_rows"); if ( i < 0 || j < 0 || i >= A->m || j >= A->m ) error(E_SIZES,"swap_rows"); lo = max(0,lo); hi = min(hi,A->n-1); A_me = A->me; for ( k = lo; k <= hi; k++ ) { tmp = A_me[k][i]; A_me[k][i] = A_me[k][j]; A_me[k][j] = tmp; } return A; } /* zswap_cols -- swap columns i and j of matrix A upto row lim */ ZMAT *zswap_cols(A,i,j,lo,hi) ZMAT *A; int i, j, lo, hi; { int k; complex **A_me, tmp; if ( ! A ) error(E_NULL,"swap_cols"); if ( i < 0 || j < 0 || i >= A->n || j >= A->n ) error(E_SIZES,"swap_cols"); lo = max(0,lo); hi = min(hi,A->m-1); A_me = A->me; for ( k = lo; k <= hi; k++ ) { tmp = A_me[i][k]; A_me[i][k] = A_me[j][k]; A_me[j][k] = tmp; } return A; } /* mz_mltadd -- matrix-scalar multiply and add -- may be in situ -- returns out == A1 + s*A2 */ ZMAT *mz_mltadd(A1,A2,s,out) ZMAT *A1, *A2, *out; complex s; { /* register complex *A1_e, *A2_e, *out_e; */ /* register int j; */ int i, m, n; if ( ! A1 || ! A2 ) error(E_NULL,"mz_mltadd"); if ( A1->m != A2->m || A1->n != A2->n ) error(E_SIZES,"mz_mltadd"); if ( out != A1 && out != A2 ) out = zm_resize(out,A1->m,A1->n); if ( s.re == 0.0 && s.im == 0.0 ) return zm_copy(A1,out); if ( s.re == 1.0 && s.im == 0.0 ) return zm_add(A1,A2,out); out = zm_copy(A1,out); m = A1->m; n = A1->n; for ( i = 0; i < m; i++ ) { __zmltadd__(out->me[i],A2->me[i],s,(int)n,Z_NOCONJ); /************************************************** A1_e = A1->me[i]; A2_e = A2->me[i]; out_e = out->me[i]; for ( j = 0; j < n; j++ ) out_e[j] = A1_e[j] + s*A2_e[j]; **************************************************/ } return out; } /* zmv_mltadd -- matrix-vector multiply and add -- may not be in situ -- returns out == v1 + alpha*A*v2 */ ZVEC *zmv_mltadd(v1,v2,A,alpha,out) ZVEC *v1, *v2, *out; ZMAT *A; complex alpha; { /* register int j; */ int i, m, n; complex tmp, *v2_ve, *out_ve; if ( ! v1 || ! v2 || ! A ) error(E_NULL,"zmv_mltadd"); if ( out == v2 ) error(E_INSITU,"zmv_mltadd"); if ( v1->dim != A->m || v2->dim != A-> n ) error(E_SIZES,"zmv_mltadd"); tracecatch(out = zv_copy(v1,out),"zmv_mltadd"); v2_ve = v2->ve; out_ve = out->ve; m = A->m; n = A->n; if ( alpha.re == 0.0 && alpha.im == 0.0 ) return out; for ( i = 0; i < m; i++ ) { tmp = __zip__(A->me[i],v2_ve,(int)n,Z_NOCONJ); out_ve[i].re += alpha.re*tmp.re - alpha.im*tmp.im; out_ve[i].im += alpha.re*tmp.im + alpha.im*tmp.re; /************************************************** A_e = A->me[i]; sum = 0.0; for ( j = 0; j < n; j++ ) sum += A_e[j]*v2_ve[j]; out_ve[i] = v1->ve[i] + alpha*sum; **************************************************/ } return out; } /* zvm_mltadd -- vector-matrix multiply and add a la zvm_mlt() -- may not be in situ -- returns out == v1 + v2*.A */ ZVEC *zvm_mltadd(v1,v2,A,alpha,out) ZVEC *v1, *v2, *out; ZMAT *A; complex alpha; { int /* i, */ j, m, n; complex tmp, /* *A_e, */ *out_ve; if ( ! v1 || ! v2 || ! A ) error(E_NULL,"zvm_mltadd"); if ( v2 == out ) error(E_INSITU,"zvm_mltadd"); if ( v1->dim != A->n || A->m != v2->dim ) error(E_SIZES,"zvm_mltadd"); tracecatch(out = zv_copy(v1,out),"zvm_mltadd"); out_ve = out->ve; m = A->m; n = A->n; for ( j = 0; j < m; j++ ) { /* tmp = zmlt(v2->ve[j],alpha); */ tmp.re = v2->ve[j].re*alpha.re - v2->ve[j].im*alpha.im; tmp.im = v2->ve[j].re*alpha.im + v2->ve[j].im*alpha.re; if ( tmp.re != 0.0 || tmp.im != 0.0 ) __zmltadd__(out_ve,A->me[j],tmp,(int)n,Z_CONJ); /************************************************** A_e = A->me[j]; for ( i = 0; i < n; i++ ) out_ve[i] += A_e[i]*tmp; **************************************************/ } return out; } /* zget_col -- gets a specified column of a matrix; returned as a vector */ ZVEC *zget_col(mat,col,vec) int col; ZMAT *mat; ZVEC *vec; { u_int i; if ( mat==ZMNULL ) error(E_NULL,"zget_col"); if ( col < 0 || col >= mat->n ) error(E_RANGE,"zget_col"); if ( vec==ZVNULL || vec->dimm ) vec = zv_resize(vec,mat->m); for ( i=0; im; i++ ) vec->ve[i] = mat->me[i][col]; return (vec); } /* zget_row -- gets a specified row of a matrix and retruns it as a vector */ ZVEC *zget_row(mat,row,vec) int row; ZMAT *mat; ZVEC *vec; { int /* i, */ lim; if ( mat==ZMNULL ) error(E_NULL,"zget_row"); if ( row < 0 || row >= mat->m ) error(E_RANGE,"zget_row"); if ( vec==ZVNULL || vec->dimn ) vec = zv_resize(vec,mat->n); lim = min(mat->n,vec->dim); /* for ( i=0; in; i++ ) */ /* vec->ve[i] = mat->me[row][i]; */ MEMCOPY(mat->me[row],vec->ve,lim,complex); return (vec); } /* zset_col -- sets column of matrix to values given in vec (in situ) */ ZMAT *zset_col(mat,col,vec) ZMAT *mat; ZVEC *vec; int col; { u_int i,lim; if ( mat==ZMNULL || vec==ZVNULL ) error(E_NULL,"zset_col"); if ( col < 0 || col >= mat->n ) error(E_RANGE,"zset_col"); lim = min(mat->m,vec->dim); for ( i=0; ime[i][col] = vec->ve[i]; return (mat); } /* zset_row -- sets row of matrix to values given in vec (in situ) */ ZMAT *zset_row(mat,row,vec) ZMAT *mat; ZVEC *vec; int row; { u_int /* j, */ lim; if ( mat==ZMNULL || vec==ZVNULL ) error(E_NULL,"zset_row"); if ( row < 0 || row >= mat->m ) error(E_RANGE,"zset_row"); lim = min(mat->n,vec->dim); /* for ( j=j0; jme[row][j] = vec->ve[j]; */ MEMCOPY(vec->ve,mat->me[row],lim,complex); return (mat); } /* zm_rand -- randomise a complex matrix; uniform in [0,1)+[0,1)*i */ ZMAT *zm_rand(A) ZMAT *A; { int i; if ( ! A ) error(E_NULL,"zm_rand"); for ( i = 0; i < A->m; i++ ) mrandlist((Real *)(A->me[i]),2*A->n); return A; } neuron-7.5/src/mesch/zmatrix.h000077500000000000000000000211161323325274500164420ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Main include file for zmeschach library -- complex vectors and matrices */ #ifndef ZMATRIXH #define ZMATRIXH #include "matrix.h" /* Type definitions for complex vectors and matrices */ /* complex definition */ typedef struct { Real re,im; } complex; /* complex vector definition */ typedef struct { u_int dim, max_dim; complex *ve; } ZVEC; /* complex matrix definition */ typedef struct { u_int m, n; u_int max_m, max_n, max_size; complex *base; /* base is base of alloc'd mem */ complex **me; } ZMAT; #define ZVNULL ((ZVEC *)NULL) #define ZMNULL ((ZMAT *)NULL) #define Z_CONJ 1 #define Z_NOCONJ 0 /* memory functions */ #ifdef ANSI_C int zv_get_vars(int dim,...); int zm_get_vars(int m,int n,...); int zv_resize_vars(int new_dim,...); int zm_resize_vars(int m,int n,...); int zv_free_vars(ZVEC **,...); int zm_free_vars(ZMAT **,...); #elif VARARGS int zv_get_vars(); int zm_get_vars(); int zv_resize_vars(); int zm_resize_vars(); int zv_free_vars(); int zm_free_vars(); #endif #ifdef ANSI_C extern ZMAT *_zm_copy(ZMAT *in,ZMAT *out,u_int i0,u_int j0); extern ZMAT * zm_move(ZMAT *, int, int, int, int, ZMAT *, int, int); extern ZMAT *zvm_move(ZVEC *, int, ZMAT *, int, int, int, int); extern ZVEC *_zv_copy(ZVEC *in,ZVEC *out,u_int i0); extern ZVEC * zv_move(ZVEC *, int, int, ZVEC *, int); extern ZVEC *zmv_move(ZMAT *, int, int, int, int, ZVEC *, int); extern complex z_finput(FILE *fp); extern ZMAT *zm_finput(FILE *fp,ZMAT *a); extern ZVEC *zv_finput(FILE *fp,ZVEC *x); extern ZMAT *zm_add(ZMAT *mat1,ZMAT *mat2,ZMAT *out); extern ZMAT *zm_sub(ZMAT *mat1,ZMAT *mat2,ZMAT *out); extern ZMAT *zm_mlt(ZMAT *A,ZMAT *B,ZMAT *OUT); extern ZMAT *zmma_mlt(ZMAT *A,ZMAT *B,ZMAT *OUT); extern ZMAT *zmam_mlt(ZMAT *A,ZMAT *B,ZMAT *OUT); extern ZVEC *zmv_mlt(ZMAT *A,ZVEC *b,ZVEC *out); extern ZMAT *zsm_mlt(complex scalar,ZMAT *matrix,ZMAT *out); extern ZVEC *zvm_mlt(ZMAT *A,ZVEC *b,ZVEC *out); extern ZMAT *zm_adjoint(ZMAT *in,ZMAT *out); extern ZMAT *zswap_rows(ZMAT *A,int i,int j,int lo,int hi); extern ZMAT *zswap_cols(ZMAT *A,int i,int j,int lo,int hi); extern ZMAT *mz_mltadd(ZMAT *A1,ZMAT *A2,complex s,ZMAT *out); extern ZVEC *zmv_mltadd(ZVEC *v1,ZVEC *v2,ZMAT *A,complex alpha,ZVEC *out); extern ZVEC *zvm_mltadd(ZVEC *v1,ZVEC *v2,ZMAT *A,complex alpha,ZVEC *out); extern ZVEC *zv_zero(ZVEC *x); extern ZMAT *zm_zero(ZMAT *A); extern ZMAT *zm_get(int m,int n); extern ZVEC *zv_get(int dim); extern ZMAT *zm_resize(ZMAT *A,int new_m,int new_n); extern complex _zin_prod(ZVEC *x,ZVEC *y,u_int i0,u_int flag); extern ZVEC *zv_resize(ZVEC *x,int new_dim); extern ZVEC *zv_mlt(complex scalar,ZVEC *vector,ZVEC *out); extern ZVEC *zv_add(ZVEC *vec1,ZVEC *vec2,ZVEC *out); extern ZVEC *zv_mltadd(ZVEC *v1,ZVEC *v2,complex scale,ZVEC *out); extern ZVEC *zv_sub(ZVEC *vec1,ZVEC *vec2,ZVEC *out); #ifdef PROTOTYPES_IN_STRUCT extern ZVEC *zv_map(complex (*f)(),ZVEC *x,ZVEC *out); extern ZVEC *_zv_map(complex (*f)(),void *params,ZVEC *x,ZVEC *out); #else extern ZVEC *zv_map(complex (*f)(complex),ZVEC *x,ZVEC *out); extern ZVEC *_zv_map(complex (*f)(void *,complex),void *params,ZVEC *x,ZVEC *out); #endif extern ZVEC *zv_lincomb(int n,ZVEC *v[],complex a[],ZVEC *out); extern ZVEC *zv_linlist(ZVEC *out,ZVEC *v1,complex a1,...); extern ZVEC *zv_star(ZVEC *x1, ZVEC *x2, ZVEC *out); extern ZVEC *zv_slash(ZVEC *x1, ZVEC *x2, ZVEC *out); extern int zm_free(ZMAT *mat); extern int zv_free(ZVEC *vec); extern ZVEC *zv_rand(ZVEC *x); extern ZMAT *zm_rand(ZMAT *A); extern ZVEC *zget_row(ZMAT *A, int i, ZVEC *out); extern ZVEC *zget_col(ZMAT *A, int j, ZVEC *out); extern ZMAT *zset_row(ZMAT *A, int i, ZVEC *in); extern ZMAT *zset_col(ZMAT *A, int j, ZVEC *in); extern ZVEC *px_zvec(PERM *pi, ZVEC *in, ZVEC *out); extern ZVEC *pxinv_zvec(PERM *pi, ZVEC *in, ZVEC *out); extern void __zconj__(complex zp[], int len); extern complex __zip__(complex zp1[],complex zp2[],int len,int flag); extern void __zmltadd__(complex zp1[],complex zp2[], complex s,int len,int flag); extern void __zmlt__(complex zp[],complex s,complex out[],int len); extern void __zadd__(complex zp1[],complex zp2[],complex out[],int len); extern void __zsub__(complex zp1[],complex zp2[],complex out[],int len); extern void __zzero__(complex zp[],int len); extern void z_foutput(FILE *fp,complex z); extern void zm_foutput(FILE *fp,ZMAT *a); extern void zv_foutput(FILE *fp,ZVEC *x); extern void zm_dump(FILE *fp,ZMAT *a); extern void zv_dump(FILE *fp,ZVEC *x); extern double _zv_norm1(ZVEC *x, VEC *scale); extern double _zv_norm2(ZVEC *x, VEC *scale); extern double _zv_norm_inf(ZVEC *x, VEC *scale); extern double zm_norm1(ZMAT *A); extern double zm_norm_inf(ZMAT *A); extern double zm_norm_frob(ZMAT *A); complex zmake(double real, double imag); double zabs(complex z); complex zadd(complex z1,complex z2); complex zsub(complex z1,complex z2); complex zmlt(complex z1,complex z2); complex zinv(complex z); complex zdiv(complex z1,complex z2); complex zsqrt(complex z); complex zexp(complex z); complex zlog(complex z); complex zconj(complex z); complex zneg(complex z); #else extern ZMAT *_zm_copy(); extern ZVEC *_zv_copy(); extern ZMAT *zm_finput(); extern ZVEC *zv_finput(); extern ZMAT *zm_add(); extern ZMAT *zm_sub(); extern ZMAT *zm_mlt(); extern ZMAT *zmma_mlt(); extern ZMAT *zmam_mlt(); extern ZVEC *zmv_mlt(); extern ZMAT *zsm_mlt(); extern ZVEC *zvm_mlt(); extern ZMAT *zm_adjoint(); extern ZMAT *zswap_rows(); extern ZMAT *zswap_cols(); extern ZMAT *mz_mltadd(); extern ZVEC *zmv_mltadd(); extern ZVEC *zvm_mltadd(); extern ZVEC *zv_zero(); extern ZMAT *zm_zero(); extern ZMAT *zm_get(); extern ZVEC *zv_get(); extern ZMAT *zm_resize(); extern ZVEC *zv_resize(); extern complex _zin_prod(); extern ZVEC *zv_mlt(); extern ZVEC *zv_add(); extern ZVEC *zv_mltadd(); extern ZVEC *zv_sub(); extern ZVEC *zv_map(); extern ZVEC *_zv_map(); extern ZVEC *zv_lincomb(); extern ZVEC *zv_linlist(); extern ZVEC *zv_star(); extern ZVEC *zv_slash(); extern ZVEC *px_zvec(); extern ZVEC *pxinv_zvec(); extern ZVEC *zv_rand(); extern ZMAT *zm_rand(); extern ZVEC *zget_row(); extern ZVEC *zget_col(); extern ZMAT *zset_row(); extern ZMAT *zset_col(); extern int zm_free(); extern int zv_free(); extern void __zconj__(); extern complex __zip__(); extern void __zmltadd__(); extern void __zmlt__(); extern void __zadd__(); extern void __zsub__(); extern void __zzero__(); extern void zm_foutput(); extern void zv_foutput(); extern void zm_dump(); extern void zv_dump(); extern double _zv_norm1(); extern double _zv_norm2(); extern double _zv_norm_inf(); extern double zm_norm1(); extern double zm_norm_inf(); extern double zm_norm_frob(); complex zmake(); double zabs(); complex zadd(); complex zsub(); complex zmlt(); complex zinv(); complex zdiv(); complex zsqrt(); complex zexp(); complex zlog(); complex zconj(); complex zneg(); #endif #define zv_copy(x,y) _zv_copy(x,y,0) #define zm_copy(A,B) _zm_copy(A,B,0,0) #define z_input() z_finput(stdin) #define zv_input(x) zv_finput(stdin,x) #define zm_input(A) zm_finput(stdin,A) #define z_output(z) z_foutput(stdout,z) #define zv_output(x) zv_foutput(stdout,x) #define zm_output(A) zm_foutput(stdout,A) #define ZV_FREE(x) ( zv_free(x), (x) = ZVNULL ) #define ZM_FREE(A) ( zm_free(A), (A) = ZMNULL ) #define zin_prod(x,y) _zin_prod(x,y,0,Z_CONJ) #define zv_norm1(x) _zv_norm1(x,VNULL) #define zv_norm2(x) _zv_norm2(x,VNULL) #define zv_norm_inf(x) _zv_norm_inf(x,VNULL) #endif neuron-7.5/src/mesch/zmatrix2.h000077500000000000000000000100671323325274500165270ustar00rootroot00000000000000 /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* 2nd header file for Meschach's complex routines. This file contains declarations for complex factorisation/solve routines. */ #ifndef ZMATRIX2H #define ZMATRIX2H #include "zmatrix.h" #ifdef ANSI_C extern ZVEC *zUsolve(ZMAT *matrix, ZVEC *b, ZVEC *out, double diag); extern ZVEC *zLsolve(ZMAT *matrix, ZVEC *b, ZVEC *out, double diag); extern ZVEC *zUAsolve(ZMAT *U, ZVEC *b, ZVEC *out, double diag); extern ZVEC *zDsolve(ZMAT *A, ZVEC *b, ZVEC *x); extern ZVEC *zLAsolve(ZMAT *L, ZVEC *b, ZVEC *out, double diag); extern ZVEC *zhhvec(ZVEC *,int,Real *,ZVEC *,complex *); extern ZVEC *zhhtrvec(ZVEC *,double,int,ZVEC *,ZVEC *); extern ZMAT *zhhtrrows(ZMAT *,int,int,ZVEC *,double); extern ZMAT *zhhtrcols(ZMAT *,int,int,ZVEC *,double); extern ZMAT *zHfactor(ZMAT *,ZVEC *); extern ZMAT *zHQunpack(ZMAT *,ZVEC *,ZMAT *,ZMAT *); extern ZMAT *zQRfactor(ZMAT *A, ZVEC *diag); extern ZMAT *zQRCPfactor(ZMAT *A, ZVEC *diag, PERM *px); extern ZVEC *_zQsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x, ZVEC *tmp); extern ZMAT *zmakeQ(ZMAT *QR, ZVEC *diag, ZMAT *Qout); extern ZMAT *zmakeR(ZMAT *QR, ZMAT *Rout); extern ZVEC *zQRsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x); extern ZVEC *zQRAsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x); extern ZVEC *zQRCPsolve(ZMAT *QR,ZVEC *diag,PERM *pivot,ZVEC *b,ZVEC *x); extern ZVEC *zUmlt(ZMAT *U, ZVEC *x, ZVEC *out); extern ZVEC *zUAmlt(ZMAT *U, ZVEC *x, ZVEC *out); extern double zQRcondest(ZMAT *QR); extern ZVEC *zLsolve(ZMAT *, ZVEC *, ZVEC *, double); extern ZMAT *zset_col(ZMAT *, int, ZVEC *); extern ZMAT *zLUfactor(ZMAT *A, PERM *pivot); extern ZVEC *zLUsolve(ZMAT *A, PERM *pivot, ZVEC *b, ZVEC *x); extern ZVEC *zLUAsolve(ZMAT *LU, PERM *pivot, ZVEC *b, ZVEC *x); extern ZMAT *zm_inverse(ZMAT *A, ZMAT *out); extern double zLUcondest(ZMAT *LU, PERM *pivot); extern void zgivens(complex, complex, Real *, complex *); extern ZMAT *zrot_rows(ZMAT *A, int i, int k, double c, complex s, ZMAT *out); extern ZMAT *zrot_cols(ZMAT *A, int i, int k, double c, complex s, ZMAT *out); extern ZVEC *rot_zvec(ZVEC *x, int i, int k, double c, complex s, ZVEC *out); extern ZMAT *zschur(ZMAT *A,ZMAT *Q); /* extern ZMAT *schur_vecs(ZMAT *T,ZMAT *Q,X_re,X_im) */ #else extern ZVEC *zUsolve(), *zLsolve(), *zUAsolve(), *zDsolve(), *zLAsolve(); extern ZVEC *zhhvec(); extern ZVEC *zhhtrvec(); extern ZMAT *zhhtrrows(); extern ZMAT *zhhtrcols(); extern ZMAT *zHfactor(); extern ZMAT *zHQunpack(); extern ZMAT *zQRfactor(), *zQRCPfactor(); extern ZVEC *_zQsolve(); extern ZMAT *zmakeQ(), *zmakeR(); extern ZVEC *zQRsolve(), *zQRAsolve(), *zQRCPsolve(); extern ZVEC *zUmlt(), *zUAmlt(); extern double zQRcondest(); extern ZVEC *zLsolve(); extern ZMAT *zset_col(); extern ZMAT *zLUfactor(); extern ZVEC *zLUsolve(), *zLUAsolve(); extern ZMAT *zm_inverse(); extern double zLUcondest(); extern void zgivens(); extern ZMAT *zrot_rows(), *zrot_cols(); extern ZVEC *rot_zvec(); extern ZMAT *zschur(); /* extern ZMAT *schur_vecs(); */ #endif #endif neuron-7.5/src/mesch/zmemory.c000077500000000000000000000357331323325274500164530ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Memory allocation and de-allocation for complex matrices and vectors */ #include #include "zmatrix.h" static char rcsid[] = "zmemory.c,v 1.1 1997/12/04 17:56:13 hines Exp"; /* zv_zero -- zeros all entries of a complex vector -- uses __zzero__() */ ZVEC *zv_zero(x) ZVEC *x; { if ( ! x ) error(E_NULL,"zv_zero"); __zzero__(x->ve,x->dim); return x; } /* zm_zero -- zeros all entries of a complex matrix -- uses __zzero__() */ ZMAT *zm_zero(A) ZMAT *A; { int i; if ( ! A ) error(E_NULL,"zm_zero"); for ( i = 0; i < A->m; i++ ) __zzero__(A->me[i],A->n); return A; } /* zm_get -- gets an mxn complex matrix (in ZMAT form) */ ZMAT *zm_get(m,n) int m,n; { ZMAT *matrix; u_int i; if (m < 0 || n < 0) error(E_NEG,"zm_get"); if ((matrix=NEW(ZMAT)) == (ZMAT *)NULL ) error(E_MEM,"zm_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,0,sizeof(ZMAT)); mem_numvar(TYPE_ZMAT,1); } matrix->m = m; matrix->n = matrix->max_n = n; matrix->max_m = m; matrix->max_size = m*n; #ifndef SEGMENTED if ((matrix->base = NEW_A(m*n,complex)) == (complex *)NULL ) { free(matrix); error(E_MEM,"zm_get"); } else if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,0,m*n*sizeof(complex)); } #else matrix->base = (complex *)NULL; #endif if ((matrix->me = (complex **)calloc(m,sizeof(complex *))) == (complex **)NULL ) { free(matrix->base); free(matrix); error(E_MEM,"zm_get"); } else if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,0,m*sizeof(complex *)); } #ifndef SEGMENTED /* set up pointers */ for ( i=0; ime[i] = &(matrix->base[i*n]); #else for ( i = 0; i < m; i++ ) if ( (matrix->me[i]=NEW_A(n,complex)) == (complex *)NULL ) error(E_MEM,"zm_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,0,n*sizeof(complex)); } #endif return (matrix); } /* zv_get -- gets a ZVEC of dimension 'dim' -- Note: initialized to zero */ ZVEC *zv_get(size) int size; { ZVEC *vector; if (size < 0) error(E_NEG,"zv_get"); if ((vector=NEW(ZVEC)) == (ZVEC *)NULL ) error(E_MEM,"zv_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_ZVEC,0,sizeof(ZVEC)); mem_numvar(TYPE_ZVEC,1); } vector->dim = vector->max_dim = size; if ((vector->ve=NEW_A(size,complex)) == (complex *)NULL ) { free(vector); error(E_MEM,"zv_get"); } else if (mem_info_is_on()) { mem_bytes(TYPE_ZVEC,0,size*sizeof(complex)); } return (vector); } /* zm_free -- returns ZMAT & asoociated memory back to memory heap */ int zm_free(mat) ZMAT *mat; { #ifdef SEGMENTED int i; #endif if ( mat==(ZMAT *)NULL || (int)(mat->m) < 0 || (int)(mat->n) < 0 ) /* don't trust it */ return (-1); #ifndef SEGMENTED if ( mat->base != (complex *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,mat->max_m*mat->max_n*sizeof(complex),0); } free((char *)(mat->base)); } #else for ( i = 0; i < mat->max_m; i++ ) if ( mat->me[i] != (complex *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,mat->max_n*sizeof(complex),0); } free((char *)(mat->me[i])); } #endif if ( mat->me != (complex **)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,mat->max_m*sizeof(complex *),0); } free((char *)(mat->me)); } if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,sizeof(ZMAT),0); mem_numvar(TYPE_ZMAT,-1); } free((char *)mat); return (0); } /* zv_free -- returns ZVEC & asoociated memory back to memory heap */ int zv_free(vec) ZVEC *vec; { if ( vec==(ZVEC *)NULL || (int)(vec->dim) < 0 ) /* don't trust it */ return (-1); if ( vec->ve == (complex *)NULL ) { if (mem_info_is_on()) { mem_bytes(TYPE_ZVEC,sizeof(ZVEC),0); mem_numvar(TYPE_ZVEC,-1); } free((char *)vec); } else { if (mem_info_is_on()) { mem_bytes(TYPE_ZVEC,vec->max_dim*sizeof(complex)+ sizeof(ZVEC),0); mem_numvar(TYPE_ZVEC,-1); } free((char *)vec->ve); free((char *)vec); } return (0); } /* zm_resize -- returns the matrix A of size new_m x new_n; A is zeroed -- if A == NULL on entry then the effect is equivalent to m_get() */ ZMAT *zm_resize(A,new_m,new_n) ZMAT *A; int new_m, new_n; { u_int i, new_max_m, new_max_n, new_size, old_m, old_n; if (new_m < 0 || new_n < 0) error(E_NEG,"zm_resize"); if ( ! A ) return zm_get(new_m,new_n); if (new_m == A->m && new_n == A->n) return A; old_m = A->m; old_n = A->n; if ( new_m > A->max_m ) { /* re-allocate A->me */ if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,A->max_m*sizeof(complex *), new_m*sizeof(complex *)); } A->me = RENEW(A->me,new_m,complex *); if ( ! A->me ) error(E_MEM,"zm_resize"); } new_max_m = max(new_m,A->max_m); new_max_n = max(new_n,A->max_n); #ifndef SEGMENTED new_size = new_max_m*new_max_n; if ( new_size > A->max_size ) { /* re-allocate A->base */ if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,A->max_m*A->max_n*sizeof(complex), new_size*sizeof(complex)); } A->base = RENEW(A->base,new_size,complex); if ( ! A->base ) error(E_MEM,"zm_resize"); A->max_size = new_size; } /* now set up A->me[i] */ for ( i = 0; i < new_m; i++ ) A->me[i] = &(A->base[i*new_n]); /* now shift data in matrix */ if ( old_n > new_n ) { for ( i = 1; i < min(old_m,new_m); i++ ) MEM_COPY((char *)&(A->base[i*old_n]), (char *)&(A->base[i*new_n]), sizeof(complex)*new_n); } else if ( old_n < new_n ) { for ( i = min(old_m,new_m)-1; i > 0; i-- ) { /* copy & then zero extra space */ MEM_COPY((char *)&(A->base[i*old_n]), (char *)&(A->base[i*new_n]), sizeof(complex)*old_n); __zzero__(&(A->base[i*new_n+old_n]),(new_n-old_n)); } __zzero__(&(A->base[old_n]),(new_n-old_n)); A->max_n = new_n; } /* zero out the new rows.. */ for ( i = old_m; i < new_m; i++ ) __zzero__(&(A->base[i*new_n]),new_n); #else if ( A->max_n < new_n ) { complex *tmp; for ( i = 0; i < A->max_m; i++ ) { if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,A->max_n*sizeof(complex), new_max_n*sizeof(complex)); } if ( (tmp = RENEW(A->me[i],new_max_n,complex)) == NULL ) error(E_MEM,"zm_resize"); else { A->me[i] = tmp; } } for ( i = A->max_m; i < new_max_m; i++ ) { if ( (tmp = NEW_A(new_max_n,complex)) == NULL ) error(E_MEM,"zm_resize"); else { A->me[i] = tmp; if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,0,new_max_n*sizeof(complex)); } } } } else if ( A->max_m < new_m ) { for ( i = A->max_m; i < new_m; i++ ) if ( (A->me[i] = NEW_A(new_max_n,complex)) == NULL ) error(E_MEM,"zm_resize"); else if (mem_info_is_on()) { mem_bytes(TYPE_ZMAT,0,new_max_n*sizeof(complex)); } } if ( old_n < new_n ) { for ( i = 0; i < old_m; i++ ) __zzero__(&(A->me[i][old_n]),new_n-old_n); } /* zero out the new rows.. */ for ( i = old_m; i < new_m; i++ ) __zzero__(A->me[i],new_n); #endif A->max_m = new_max_m; A->max_n = new_max_n; A->max_size = A->max_m*A->max_n; A->m = new_m; A->n = new_n; return A; } /* zv_resize -- returns the (complex) vector x with dim new_dim -- x is set to the zero vector */ ZVEC *zv_resize(x,new_dim) ZVEC *x; int new_dim; { if (new_dim < 0) error(E_NEG,"zv_resize"); if ( ! x ) return zv_get(new_dim); if (new_dim == x->dim) return x; if ( x->max_dim == 0 ) /* assume that it's from sub_zvec */ return zv_get(new_dim); if ( new_dim > x->max_dim ) { if (mem_info_is_on()) { mem_bytes(TYPE_ZVEC,x->max_dim*sizeof(complex), new_dim*sizeof(complex)); } x->ve = RENEW(x->ve,new_dim,complex); if ( ! x->ve ) error(E_MEM,"zv_resize"); x->max_dim = new_dim; } if ( new_dim > x->dim ) __zzero__(&(x->ve[x->dim]),new_dim - x->dim); x->dim = new_dim; return x; } /* varying arguments */ #ifdef ANSI_C #include /* To allocate memory to many arguments. The function should be called: zv_get_vars(dim,&x,&y,&z,...,NULL); where int dim; ZVEC *x, *y, *z,...; The last argument should be NULL ! dim is the length of vectors x,y,z,... returned value is equal to the number of allocated variables Other gec_... functions are similar. */ int zv_get_vars(int dim,...) { va_list ap; int i=0; ZVEC **par; va_start(ap, dim); while ((par = va_arg(ap,ZVEC **))) { /* NULL ends the list*/ *par = zv_get(dim); i++; } va_end(ap); return i; } int zm_get_vars(int m,int n,...) { va_list ap; int i=0; ZMAT **par; va_start(ap, n); while ((par = va_arg(ap,ZMAT **))) { /* NULL ends the list*/ *par = zm_get(m,n); i++; } va_end(ap); return i; } /* To resize memory for many arguments. The function should be called: v_resize_vars(new_dim,&x,&y,&z,...,NULL); where int new_dim; ZVEC *x, *y, *z,...; The last argument should be NULL ! rdim is the resized length of vectors x,y,z,... returned value is equal to the number of allocated variables. If one of x,y,z,.. arguments is NULL then memory is allocated to this argument. Other *_resize_list() functions are similar. */ int zv_resize_vars(int new_dim,...) { va_list ap; int i=0; ZVEC **par; va_start(ap, new_dim); while ((par = va_arg(ap,ZVEC **))) { /* NULL ends the list*/ *par = zv_resize(*par,new_dim); i++; } va_end(ap); return i; } int zm_resize_vars(int m,int n,...) { va_list ap; int i=0; ZMAT **par; va_start(ap, n); while ((par = va_arg(ap,ZMAT **))) { /* NULL ends the list*/ *par = zm_resize(*par,m,n); i++; } va_end(ap); return i; } /* To deallocate memory for many arguments. The function should be called: v_free_vars(&x,&y,&z,...,NULL); where ZVEC *x, *y, *z,...; The last argument should be NULL ! There must be at least one not NULL argument. returned value is equal to the number of allocated variables. Returned value of x,y,z,.. is VNULL. Other *_free_list() functions are similar. */ int zv_free_vars(ZVEC **pv,...) { va_list ap; int i=1; ZVEC **par; zv_free(*pv); *pv = ZVNULL; va_start(ap, pv); while ((par = va_arg(ap,ZVEC **))) { /* NULL ends the list*/ zv_free(*par); *par = ZVNULL; i++; } va_end(ap); return i; } int zm_free_vars(ZMAT **va,...) { va_list ap; int i=1; ZMAT **par; zm_free(*va); *va = ZMNULL; va_start(ap, va); while ((par = va_arg(ap,ZMAT **))) { /* NULL ends the list*/ zm_free(*par); *par = ZMNULL; i++; } va_end(ap); return i; } #elif VARARGS #include /* To allocate memory to many arguments. The function should be called: v_get_vars(dim,&x,&y,&z,...,NULL); where int dim; ZVEC *x, *y, *z,...; The last argument should be NULL ! dim is the length of vectors x,y,z,... returned value is equal to the number of allocated variables Other gec_... functions are similar. */ int zv_get_vars(va_alist) va_dcl { va_list ap; int dim,i=0; ZVEC **par; va_start(ap); dim = va_arg(ap,int); while ((par = va_arg(ap,ZVEC **))) { /* NULL ends the list*/ *par = zv_get(dim); i++; } va_end(ap); return i; } int zm_get_vars(va_alist) va_dcl { va_list ap; int i=0, n, m; ZMAT **par; va_start(ap); m = va_arg(ap,int); n = va_arg(ap,int); while ((par = va_arg(ap,ZMAT **))) { /* NULL ends the list*/ *par = zm_get(m,n); i++; } va_end(ap); return i; } /* To resize memory for many arguments. The function should be called: v_resize_vars(new_dim,&x,&y,&z,...,NULL); where int new_dim; ZVEC *x, *y, *z,...; The last argument should be NULL ! rdim is the resized length of vectors x,y,z,... returned value is equal to the number of allocated variables. If one of x,y,z,.. arguments is NULL then memory is allocated to this argument. Other *_resize_list() functions are similar. */ int zv_resize_vars(va_alist) va_dcl { va_list ap; int i=0, new_dim; ZVEC **par; va_start(ap); new_dim = va_arg(ap,int); while ((par = va_arg(ap,ZVEC **))) { /* NULL ends the list*/ *par = zv_resize(*par,new_dim); i++; } va_end(ap); return i; } int zm_resize_vars(va_alist) va_dcl { va_list ap; int i=0, m, n; ZMAT **par; va_start(ap); m = va_arg(ap,int); n = va_arg(ap,int); while ((par = va_arg(ap,ZMAT **))) { /* NULL ends the list*/ *par = zm_resize(*par,m,n); i++; } va_end(ap); return i; } /* To deallocate memory for many arguments. The function should be called: v_free_vars(&x,&y,&z,...,NULL); where ZVEC *x, *y, *z,...; The last argument should be NULL ! There must be at least one not NULL argument. returned value is equal to the number of allocated variables. Returned value of x,y,z,.. is VNULL. Other *_free_list() functions are similar. */ int zv_free_vars(va_alist) va_dcl { va_list ap; int i=0; ZVEC **par; va_start(ap); while ((par = va_arg(ap,ZVEC **))) { /* NULL ends the list*/ zv_free(*par); *par = ZVNULL; i++; } va_end(ap); return i; } int zm_free_vars(va_alist) va_dcl { va_list ap; int i=0; ZMAT **par; va_start(ap); while ((par = va_arg(ap,ZMAT **))) { /* NULL ends the list*/ zm_free(*par); *par = ZMNULL; i++; } va_end(ap); return i; } #endif neuron-7.5/src/mesch/znorm.c000077500000000000000000000110461323325274500161050ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* A collection of functions for computing norms: scaled and unscaled Complex version */ static char rcsid[] = "znorm.c,v 1.1 1997/12/04 17:56:14 hines Exp"; #include #include "zmatrix.h" #include /* _zv_norm1 -- computes (scaled) 1-norms of vectors */ double _zv_norm1(x,scale) ZVEC *x; VEC *scale; { int i, dim; Real s, sum; if ( x == ZVNULL ) error(E_NULL,"_zv_norm1"); dim = x->dim; sum = 0.0; if ( scale == VNULL ) for ( i = 0; i < dim; i++ ) sum += zabs(x->ve[i]); else if ( scale->dim < dim ) error(E_SIZES,"_zv_norm1"); else for ( i = 0; i < dim; i++ ) { s = scale->ve[i]; sum += ( s== 0.0 ) ? zabs(x->ve[i]) : zabs(x->ve[i])/fabs(s); } return sum; } /* square -- returns x^2 */ /****************************** double square(x) double x; { return x*x; } ******************************/ #define square(x) ((x)*(x)) /* _zv_norm2 -- computes (scaled) 2-norm (Euclidean norm) of vectors */ double _zv_norm2(x,scale) ZVEC *x; VEC *scale; { int i, dim; Real s, sum; if ( x == ZVNULL ) error(E_NULL,"_zv_norm2"); dim = x->dim; sum = 0.0; if ( scale == VNULL ) for ( i = 0; i < dim; i++ ) sum += square(x->ve[i].re) + square(x->ve[i].im); else if ( scale->dim < dim ) error(E_SIZES,"_v_norm2"); else for ( i = 0; i < dim; i++ ) { s = scale->ve[i]; sum += ( s== 0.0 ) ? square(x->ve[i].re) + square(x->ve[i].im) : (square(x->ve[i].re) + square(x->ve[i].im))/square(s); } return sqrt(sum); } #define max(a,b) ((a) > (b) ? (a) : (b)) /* _zv_norm_inf -- computes (scaled) infinity-norm (supremum norm) of vectors */ double _zv_norm_inf(x,scale) ZVEC *x; VEC *scale; { int i, dim; Real s, maxval, tmp; if ( x == ZVNULL ) error(E_NULL,"_zv_norm_inf"); dim = x->dim; maxval = 0.0; if ( scale == VNULL ) for ( i = 0; i < dim; i++ ) { tmp = zabs(x->ve[i]); maxval = max(maxval,tmp); } else if ( scale->dim < dim ) error(E_SIZES,"_zv_norm_inf"); else for ( i = 0; i < dim; i++ ) { s = scale->ve[i]; tmp = ( s == 0.0 ) ? zabs(x->ve[i]) : zabs(x->ve[i])/fabs(s); maxval = max(maxval,tmp); } return maxval; } /* zm_norm1 -- compute matrix 1-norm -- unscaled -- complex version */ double zm_norm1(A) ZMAT *A; { int i, j, m, n; Real maxval, sum; if ( A == ZMNULL ) error(E_NULL,"zm_norm1"); m = A->m; n = A->n; maxval = 0.0; for ( j = 0; j < n; j++ ) { sum = 0.0; for ( i = 0; i < m; i ++ ) sum += zabs(A->me[i][j]); maxval = max(maxval,sum); } return maxval; } /* zm_norm_inf -- compute matrix infinity-norm -- unscaled -- complex version */ double zm_norm_inf(A) ZMAT *A; { int i, j, m, n; Real maxval, sum; if ( A == ZMNULL ) error(E_NULL,"zm_norm_inf"); m = A->m; n = A->n; maxval = 0.0; for ( i = 0; i < m; i++ ) { sum = 0.0; for ( j = 0; j < n; j ++ ) sum += zabs(A->me[i][j]); maxval = max(maxval,sum); } return maxval; } /* zm_norm_frob -- compute matrix frobenius-norm -- unscaled */ double zm_norm_frob(A) ZMAT *A; { int i, j, m, n; Real sum; if ( A == ZMNULL ) error(E_NULL,"zm_norm_frob"); m = A->m; n = A->n; sum = 0.0; for ( i = 0; i < m; i++ ) for ( j = 0; j < n; j ++ ) sum += square(A->me[i][j].re) + square(A->me[i][j].im); return sqrt(sum); } neuron-7.5/src/mesch/zqrfctr.c000077500000000000000000000327521323325274500164420ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* This file contains the routines needed to perform QR factorisation of matrices, as well as Householder transformations. The internal "factored form" of a matrix A is not quite standard. The diagonal of A is replaced by the diagonal of R -- not by the 1st non-zero entries of the Householder vectors. The 1st non-zero entries are held in the diag parameter of QRfactor(). The reason for this non-standard representation is that it enables direct use of the Usolve() function rather than requiring that a seperate function be written just for this case. See, e.g., QRsolve() below for more details. Complex version */ static char rcsid[] = "zqrfctr.c,v 1.1 1997/12/04 17:56:15 hines Exp"; #include #include "zmatrix.h" #include "zmatrix2.h" #include #define is_zero(z) ((z).re == 0.0 && (z).im == 0.0) #define sign(x) ((x) > 0.0 ? 1 : ((x) < 0.0 ? -1 : 0 )) /* Note: The usual representation of a Householder transformation is taken to be: P = I - beta.u.u* where beta = 2/(u*.u) and u is called the Householder vector (u* is the conjugate transposed vector of u */ /* zQRfactor -- forms the QR factorisation of A -- factorisation stored in compact form as described above (not quite standard format) */ ZMAT *zQRfactor(A,diag) ZMAT *A; ZVEC *diag; { u_int k,limit; Real beta; static ZVEC *tmp1=ZVNULL; if ( ! A || ! diag ) error(E_NULL,"zQRfactor"); limit = min(A->m,A->n); if ( diag->dim < limit ) error(E_SIZES,"zQRfactor"); tmp1 = zv_resize(tmp1,A->m); MEM_STAT_REG(tmp1,TYPE_ZVEC); for ( k=0; kve[k],tmp1,&A->me[k][k]); */ zhhvec(tmp1,k,&beta,tmp1,&A->me[k][k]); diag->ve[k] = tmp1->ve[k]; /* apply H/holder vector to remaining columns */ /* hhtrcols(A,k,k+1,tmp1,beta->ve[k]); */ tracecatch(zhhtrcols(A,k,k+1,tmp1,beta),"zQRfactor"); } return (A); } /* zQRCPfactor -- forms the QR factorisation of A with column pivoting -- factorisation stored in compact form as described above ( not quite standard format ) */ ZMAT *zQRCPfactor(A,diag,px) ZMAT *A; ZVEC *diag; PERM *px; { u_int i, i_max, j, k, limit; static ZVEC *tmp1=ZVNULL, *tmp2=ZVNULL; static VEC *gamma=VNULL; Real beta; Real maxgamma, sum, tmp; complex ztmp; if ( ! A || ! diag || ! px ) error(E_NULL,"QRCPfactor"); limit = min(A->m,A->n); if ( diag->dim < limit || px->size != A->n ) error(E_SIZES,"QRCPfactor"); tmp1 = zv_resize(tmp1,A->m); tmp2 = zv_resize(tmp2,A->m); gamma = v_resize(gamma,A->n); MEM_STAT_REG(tmp1,TYPE_ZVEC); MEM_STAT_REG(tmp2,TYPE_ZVEC); MEM_STAT_REG(gamma,TYPE_VEC); /* initialise gamma and px */ for ( j=0; jn; j++ ) { px->pe[j] = j; sum = 0.0; for ( i=0; im; i++ ) sum += square(A->me[i][j].re) + square(A->me[i][j].im); gamma->ve[j] = sum; } for ( k=0; kve[k]; for ( i=k+1; in; i++ ) /* Loop invariant:maxgamma=gamma[i_max] >=gamma[l];l=k,...,i-1 */ if ( gamma->ve[i] > maxgamma ) { maxgamma = gamma->ve[i]; i_max = i; } /* swap columns if necessary */ if ( i_max != k ) { /* swap gamma values */ tmp = gamma->ve[k]; gamma->ve[k] = gamma->ve[i_max]; gamma->ve[i_max] = tmp; /* update column permutation */ px_transp(px,k,i_max); /* swap columns of A */ for ( i=0; im; i++ ) { ztmp = A->me[i][k]; A->me[i][k] = A->me[i][i_max]; A->me[i][i_max] = ztmp; } } /* get H/holder vector for the k-th column */ zget_col(A,k,tmp1); /* hhvec(tmp1,k,&beta->ve[k],tmp1,&A->me[k][k]); */ zhhvec(tmp1,k,&beta,tmp1,&A->me[k][k]); diag->ve[k] = tmp1->ve[k]; /* apply H/holder vector to remaining columns */ /* hhtrcols(A,k,k+1,tmp1,beta->ve[k]); */ zhhtrcols(A,k,k+1,tmp1,beta); /* update gamma values */ for ( j=k+1; jn; j++ ) gamma->ve[j] -= square(A->me[k][j].re)+square(A->me[k][j].im); } return (A); } /* zQsolve -- solves Qx = b, Q is an orthogonal matrix stored in compact form a la QRfactor() -- may be in-situ */ ZVEC *_zQsolve(QR,diag,b,x,tmp) ZMAT *QR; ZVEC *diag, *b, *x, *tmp; { u_int dynamic; int k, limit; Real beta, r_ii, tmp_val; limit = min(QR->m,QR->n); dynamic = FALSE; if ( ! QR || ! diag || ! b ) error(E_NULL,"_zQsolve"); if ( diag->dim < limit || b->dim != QR->m ) error(E_SIZES,"_zQsolve"); x = zv_resize(x,QR->m); if ( tmp == ZVNULL ) dynamic = TRUE; tmp = zv_resize(tmp,QR->m); /* apply H/holder transforms in normal order */ x = zv_copy(b,x); for ( k = 0 ; k < limit ; k++ ) { zget_col(QR,k,tmp); r_ii = zabs(tmp->ve[k]); tmp->ve[k] = diag->ve[k]; tmp_val = (r_ii*zabs(diag->ve[k])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; /* hhtrvec(tmp,beta->ve[k],k,x,x); */ zhhtrvec(tmp,beta,k,x,x); } if ( dynamic ) ZV_FREE(tmp); return (x); } /* zmakeQ -- constructs orthogonal matrix from Householder vectors stored in compact QR form */ ZMAT *zmakeQ(QR,diag,Qout) ZMAT *QR,*Qout; ZVEC *diag; { static ZVEC *tmp1=ZVNULL,*tmp2=ZVNULL; u_int i, limit; Real beta, r_ii, tmp_val; int j; limit = min(QR->m,QR->n); if ( ! QR || ! diag ) error(E_NULL,"zmakeQ"); if ( diag->dim < limit ) error(E_SIZES,"zmakeQ"); Qout = zm_resize(Qout,QR->m,QR->m); tmp1 = zv_resize(tmp1,QR->m); /* contains basis vec & columns of Q */ tmp2 = zv_resize(tmp2,QR->m); /* contains H/holder vectors */ MEM_STAT_REG(tmp1,TYPE_ZVEC); MEM_STAT_REG(tmp2,TYPE_ZVEC); for ( i=0; im ; i++ ) { /* get i-th column of Q */ /* set up tmp1 as i-th basis vector */ for ( j=0; jm ; j++ ) tmp1->ve[j].re = tmp1->ve[j].im = 0.0; tmp1->ve[i].re = 1.0; /* apply H/h transforms in reverse order */ for ( j=limit-1; j>=0; j-- ) { zget_col(QR,j,tmp2); r_ii = zabs(tmp2->ve[j]); tmp2->ve[j] = diag->ve[j]; tmp_val = (r_ii*zabs(diag->ve[j])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; /* hhtrvec(tmp2,beta->ve[j],j,tmp1,tmp1); */ zhhtrvec(tmp2,beta,j,tmp1,tmp1); } /* insert into Q */ zset_col(Qout,i,tmp1); } return (Qout); } /* zmakeR -- constructs upper triangular matrix from QR (compact form) -- may be in-situ (all it does is zero the lower 1/2) */ ZMAT *zmakeR(QR,Rout) ZMAT *QR,*Rout; { u_int i,j; if ( QR==ZMNULL ) error(E_NULL,"zmakeR"); Rout = zm_copy(QR,Rout); for ( i=1; im; i++ ) for ( j=0; jn && jme[i][j].re = Rout->me[i][j].im = 0.0; return (Rout); } /* zQRsolve -- solves the system Q.R.x=b where Q & R are stored in compact form -- returns x, which is created if necessary */ ZVEC *zQRsolve(QR,diag,b,x) ZMAT *QR; ZVEC *diag, *b, *x; { int limit; static ZVEC *tmp = ZVNULL; if ( ! QR || ! diag || ! b ) error(E_NULL,"zQRsolve"); limit = min(QR->m,QR->n); if ( diag->dim < limit || b->dim != QR->m ) error(E_SIZES,"zQRsolve"); tmp = zv_resize(tmp,limit); MEM_STAT_REG(tmp,TYPE_ZVEC); x = zv_resize(x,QR->n); _zQsolve(QR,diag,b,x,tmp); x = zUsolve(QR,x,x,0.0); x = zv_resize(x,QR->n); return x; } /* zQRAsolve -- solves the system (Q.R)*.x = b -- Q & R are stored in compact form -- returns x, which is created if necessary */ ZVEC *zQRAsolve(QR,diag,b,x) ZMAT *QR; ZVEC *diag, *b, *x; { int j, limit; Real beta, r_ii, tmp_val; static ZVEC *tmp = ZVNULL; if ( ! QR || ! diag || ! b ) error(E_NULL,"zQRAsolve"); limit = min(QR->m,QR->n); if ( diag->dim < limit || b->dim != QR->n ) error(E_SIZES,"zQRAsolve"); x = zv_resize(x,QR->m); x = zUAsolve(QR,b,x,0.0); x = zv_resize(x,QR->m); tmp = zv_resize(tmp,x->dim); MEM_STAT_REG(tmp,TYPE_ZVEC); printf("zQRAsolve: tmp->dim = %d, x->dim = %d\n", tmp->dim, x->dim); /* apply H/h transforms in reverse order */ for ( j=limit-1; j>=0; j-- ) { zget_col(QR,j,tmp); tmp = zv_resize(tmp,QR->m); r_ii = zabs(tmp->ve[j]); tmp->ve[j] = diag->ve[j]; tmp_val = (r_ii*zabs(diag->ve[j])); beta = ( tmp_val == 0.0 ) ? 0.0 : 1.0/tmp_val; zhhtrvec(tmp,beta,j,x,x); } return x; } /* zQRCPsolve -- solves A.x = b where A is factored by QRCPfactor() -- assumes that A is in the compact factored form */ ZVEC *zQRCPsolve(QR,diag,pivot,b,x) ZMAT *QR; ZVEC *diag; PERM *pivot; ZVEC *b, *x; { if ( ! QR || ! diag || ! pivot || ! b ) error(E_NULL,"zQRCPsolve"); if ( (QR->m > diag->dim && QR->n > diag->dim) || QR->n != pivot->size ) error(E_SIZES,"zQRCPsolve"); x = zQRsolve(QR,diag,b,x); x = pxinv_zvec(pivot,x,x); return x; } /* zUmlt -- compute out = upper_triang(U).x -- may be in situ */ ZVEC *zUmlt(U,x,out) ZMAT *U; ZVEC *x, *out; { int i, limit; if ( U == ZMNULL || x == ZVNULL ) error(E_NULL,"zUmlt"); limit = min(U->m,U->n); if ( limit != x->dim ) error(E_SIZES,"zUmlt"); if ( out == ZVNULL || out->dim < limit ) out = zv_resize(out,limit); for ( i = 0; i < limit; i++ ) out->ve[i] = __zip__(&(x->ve[i]),&(U->me[i][i]),limit - i,Z_NOCONJ); return out; } /* zUAmlt -- returns out = upper_triang(U)^T.x */ ZVEC *zUAmlt(U,x,out) ZMAT *U; ZVEC *x, *out; { /* complex sum; */ complex tmp; int i, limit; if ( U == ZMNULL || x == ZVNULL ) error(E_NULL,"zUAmlt"); limit = min(U->m,U->n); if ( out == ZVNULL || out->dim < limit ) out = zv_resize(out,limit); for ( i = limit-1; i >= 0; i-- ) { tmp = x->ve[i]; out->ve[i].re = out->ve[i].im = 0.0; __zmltadd__(&(out->ve[i]),&(U->me[i][i]),tmp,limit-i-1,Z_CONJ); } return out; } /* zQRcondest -- returns an estimate of the 2-norm condition number of the matrix factorised by QRfactor() or QRCPfactor() -- note that as Q does not affect the 2-norm condition number, it is not necessary to pass the diag, beta (or pivot) vectors -- generates a lower bound on the true condition number -- if the matrix is exactly singular, HUGE is returned -- note that QRcondest() is likely to be more reliable for matrices factored using QRCPfactor() */ double zQRcondest(QR) ZMAT *QR; { static ZVEC *y=ZVNULL; Real norm, norm1, norm2, tmp1, tmp2; complex sum, tmp; int i, j, limit; if ( QR == ZMNULL ) error(E_NULL,"zQRcondest"); limit = min(QR->m,QR->n); for ( i = 0; i < limit; i++ ) /* if ( QR->me[i][i] == 0.0 ) */ if ( is_zero(QR->me[i][i]) ) return HUGE; y = zv_resize(y,limit); MEM_STAT_REG(y,TYPE_ZVEC); /* use the trick for getting a unit vector y with ||R.y||_inf small from the LU condition estimator */ for ( i = 0; i < limit; i++ ) { sum.re = sum.im = 0.0; for ( j = 0; j < i; j++ ) /* sum -= QR->me[j][i]*y->ve[j]; */ sum = zsub(sum,zmlt(QR->me[j][i],y->ve[j])); /* sum -= (sum < 0.0) ? 1.0 : -1.0; */ norm1 = zabs(sum); if ( norm1 == 0.0 ) sum.re = 1.0; else { sum.re += sum.re / norm1; sum.im += sum.im / norm1; } /* y->ve[i] = sum / QR->me[i][i]; */ y->ve[i] = zdiv(sum,QR->me[i][i]); } zUAmlt(QR,y,y); /* now apply inverse power method to R*.R */ for ( i = 0; i < 3; i++ ) { tmp1 = zv_norm2(y); zv_mlt(zmake(1.0/tmp1,0.0),y,y); zUAsolve(QR,y,y,0.0); tmp2 = zv_norm2(y); zv_mlt(zmake(1.0/tmp2,0.0),y,y); zUsolve(QR,y,y,0.0); } /* now compute approximation for ||R^{-1}||_2 */ norm1 = sqrt(tmp1)*sqrt(tmp2); /* now use complementary approach to compute approximation to ||R||_2 */ for ( i = limit-1; i >= 0; i-- ) { sum.re = sum.im = 0.0; for ( j = i+1; j < limit; j++ ) sum = zadd(sum,zmlt(QR->me[i][j],y->ve[j])); if ( is_zero(QR->me[i][i]) ) return HUGE; tmp = zdiv(sum,QR->me[i][i]); if ( is_zero(tmp) ) { y->ve[i].re = 1.0; y->ve[i].im = 0.0; } else { norm = zabs(tmp); y->ve[i].re = sum.re / norm; y->ve[i].im = sum.im / norm; } /* y->ve[i] = (sum >= 0.0) ? 1.0 : -1.0; */ /* y->ve[i] = (QR->me[i][i] >= 0.0) ? y->ve[i] : - y->ve[i]; */ } /* now apply power method to R*.R */ for ( i = 0; i < 3; i++ ) { tmp1 = zv_norm2(y); zv_mlt(zmake(1.0/tmp1,0.0),y,y); zUmlt(QR,y,y); tmp2 = zv_norm2(y); zv_mlt(zmake(1.0/tmp2,0.0),y,y); zUAmlt(QR,y,y); } norm2 = sqrt(tmp1)*sqrt(tmp2); /* printf("QRcondest: norm1 = %g, norm2 = %g\n",norm1,norm2); */ return norm1*norm2; } neuron-7.5/src/mesch/zschur.c000077500000000000000000000257541323325274500162710ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for computing the Schur decomposition of a complex non-symmetric matrix See also: hessen.c Complex version */ #include #include "zmatrix.h" #include "zmatrix2.h" #include static char rcsid[] = "zschur.c,v 1.1 1997/12/04 17:56:16 hines Exp"; #define is_zero(z) ((z).re == 0.0 && (z).im == 0.0) #define b2s(t_or_f) ((t_or_f) ? "TRUE" : "FALSE") /* zschur -- computes the Schur decomposition of the matrix A in situ -- optionally, gives Q matrix such that Q^*.A.Q is upper triangular -- returns upper triangular Schur matrix */ ZMAT *zschur(A,Q) ZMAT *A, *Q; { int i, j, iter, k, k_min, k_max, k_tmp, n, split; Real c; complex det, discrim, lambda, lambda0, lambda1, s, sum, ztmp; complex x, y; /* for chasing algorithm */ complex **A_me; static ZVEC *diag=ZVNULL; if ( ! A ) error(E_NULL,"zschur"); if ( A->m != A->n || ( Q && Q->m != Q->n ) ) error(E_SQUARE,"zschur"); if ( Q != ZMNULL && Q->m != A->m ) error(E_SIZES,"zschur"); n = A->n; diag = zv_resize(diag,A->n); MEM_STAT_REG(diag,TYPE_ZVEC); /* compute Hessenberg form */ zHfactor(A,diag); /* save Q if necessary, and make A explicitly Hessenberg */ zHQunpack(A,diag,Q,A); k_min = 0; A_me = A->me; while ( k_min < n ) { /* find k_max to suit: submatrix k_min..k_max should be irreducible */ k_max = n-1; for ( k = k_min; k < k_max; k++ ) if ( is_zero(A_me[k+1][k]) ) { k_max = k; break; } if ( k_max <= k_min ) { k_min = k_max + 1; continue; /* outer loop */ } /* now have r x r block with r >= 2: apply Francis QR step until block splits */ split = FALSE; iter = 0; while ( ! split ) { complex a00, a01, a10, a11; iter++; /* set up Wilkinson/Francis complex shift */ /* use the smallest eigenvalue of the bottom 2 x 2 submatrix */ k_tmp = k_max - 1; a00 = A_me[k_tmp][k_tmp]; a01 = A_me[k_tmp][k_max]; a10 = A_me[k_max][k_tmp]; a11 = A_me[k_max][k_max]; ztmp.re = 0.5*(a00.re - a11.re); ztmp.im = 0.5*(a00.im - a11.im); discrim = zsqrt(zadd(zmlt(ztmp,ztmp),zmlt(a01,a10))); sum.re = 0.5*(a00.re + a11.re); sum.im = 0.5*(a00.im + a11.im); lambda0 = zadd(sum,discrim); lambda1 = zsub(sum,discrim); det = zsub(zmlt(a00,a11),zmlt(a01,a10)); if ( is_zero(lambda0) && is_zero(lambda1) ) { lambda.re = lambda.im = 0.0; } else if ( zabs(lambda0) > zabs(lambda1) ) lambda = zdiv(det,lambda0); else lambda = zdiv(det,lambda1); /* perturb shift if convergence is slow */ if ( (iter % 10) == 0 ) { lambda.re += iter*0.02; lambda.im += iter*0.02; } /* set up Householder transformations */ k_tmp = k_min + 1; x = zsub(A->me[k_min][k_min],lambda); y = A->me[k_min+1][k_min]; /* use Givens' rotations to "chase" off-Hessenberg entry */ for ( k = k_min; k <= k_max-1; k++ ) { zgivens(x,y,&c,&s); zrot_cols(A,k,k+1,c,s,A); zrot_rows(A,k,k+1,c,s,A); if ( Q != ZMNULL ) zrot_cols(Q,k,k+1,c,s,Q); /* zero things that should be zero */ if ( k > k_min ) A->me[k+1][k-1].re = A->me[k+1][k-1].im = 0.0; /* get next entry to chase along sub-diagonal */ x = A->me[k+1][k]; if ( k <= k_max - 2 ) y = A->me[k+2][k]; else y.re = y.im = 0.0; } for ( k = k_min; k <= k_max-2; k++ ) { /* zero appropriate sub-diagonals */ A->me[k+2][k].re = A->me[k+2][k].im = 0.0; } /* test to see if matrix should split */ for ( k = k_min; k < k_max; k++ ) if ( zabs(A_me[k+1][k]) < MACHEPS* (zabs(A_me[k][k])+zabs(A_me[k+1][k+1])) ) { A_me[k+1][k].re = A_me[k+1][k].im = 0.0; split = TRUE; } } } /* polish up A by zeroing strictly lower triangular elements and small sub-diagonal elements */ for ( i = 0; i < A->m; i++ ) for ( j = 0; j < i-1; j++ ) A_me[i][j].re = A_me[i][j].im = 0.0; for ( i = 0; i < A->m - 1; i++ ) if ( zabs(A_me[i+1][i]) < MACHEPS* (zabs(A_me[i][i])+zabs(A_me[i+1][i+1])) ) A_me[i+1][i].re = A_me[i+1][i].im = 0.0; return A; } #if 0 /* schur_vecs -- returns eigenvectors computed from the real Schur decomposition of a matrix -- T is the block upper triangular Schur matrix -- Q is the orthognal matrix where A = Q.T.Q^T -- if Q is null, the eigenvectors of T are returned -- X_re is the real part of the matrix of eigenvectors, and X_im is the imaginary part of the matrix. -- X_re is returned */ MAT *schur_vecs(T,Q,X_re,X_im) MAT *T, *Q, *X_re, *X_im; { int i, j, limit; Real t11_re, t11_im, t12, t21, t22_re, t22_im; Real l_re, l_im, det_re, det_im, invdet_re, invdet_im, val1_re, val1_im, val2_re, val2_im, tmp_val1_re, tmp_val1_im, tmp_val2_re, tmp_val2_im, **T_me; Real sum, diff, discrim, magdet, norm, scale; static VEC *tmp1_re=VNULL, *tmp1_im=VNULL, *tmp2_re=VNULL, *tmp2_im=VNULL; if ( ! T || ! X_re ) error(E_NULL,"schur_vecs"); if ( T->m != T->n || X_re->m != X_re->n || ( Q != MNULL && Q->m != Q->n ) || ( X_im != MNULL && X_im->m != X_im->n ) ) error(E_SQUARE,"schur_vecs"); if ( T->m != X_re->m || ( Q != MNULL && T->m != Q->m ) || ( X_im != MNULL && T->m != X_im->m ) ) error(E_SIZES,"schur_vecs"); tmp1_re = v_resize(tmp1_re,T->m); tmp1_im = v_resize(tmp1_im,T->m); tmp2_re = v_resize(tmp2_re,T->m); tmp2_im = v_resize(tmp2_im,T->m); MEM_STAT_REG(tmp1_re,TYPE_VEC); MEM_STAT_REG(tmp1_im,TYPE_VEC); MEM_STAT_REG(tmp2_re,TYPE_VEC); MEM_STAT_REG(tmp2_im,TYPE_VEC); T_me = T->me; i = 0; while ( i < T->m ) { if ( i+1 < T->m && T->me[i+1][i] != 0.0 ) { /* complex eigenvalue */ sum = 0.5*(T_me[i][i]+T_me[i+1][i+1]); diff = 0.5*(T_me[i][i]-T_me[i+1][i+1]); discrim = diff*diff + T_me[i][i+1]*T_me[i+1][i]; l_re = l_im = 0.0; if ( discrim < 0.0 ) { /* yes -- complex e-vals */ l_re = sum; l_im = sqrt(-discrim); } else /* not correct Real Schur form */ error(E_RANGE,"schur_vecs"); } else { l_re = T_me[i][i]; l_im = 0.0; } v_zero(tmp1_im); v_rand(tmp1_re); sv_mlt(MACHEPS,tmp1_re,tmp1_re); /* solve (T-l.I)x = tmp1 */ limit = ( l_im != 0.0 ) ? i+1 : i; /* printf("limit = %d\n",limit); */ for ( j = limit+1; j < T->m; j++ ) tmp1_re->ve[j] = 0.0; j = limit; while ( j >= 0 ) { if ( j > 0 && T->me[j][j-1] != 0.0 ) { /* 2 x 2 diagonal block */ /* printf("checkpoint A\n"); */ val1_re = tmp1_re->ve[j-1] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j-1][j+1]),limit-j); /* printf("checkpoint B\n"); */ val1_im = tmp1_im->ve[j-1] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j-1][j+1]),limit-j); /* printf("checkpoint C\n"); */ val2_re = tmp1_re->ve[j] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint D\n"); */ val2_im = tmp1_im->ve[j] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint E\n"); */ t11_re = T_me[j-1][j-1] - l_re; t11_im = - l_im; t22_re = T_me[j][j] - l_re; t22_im = - l_im; t12 = T_me[j-1][j]; t21 = T_me[j][j-1]; scale = fabs(T_me[j-1][j-1]) + fabs(T_me[j][j]) + fabs(t12) + fabs(t21) + fabs(l_re) + fabs(l_im); det_re = t11_re*t22_re - t11_im*t22_im - t12*t21; det_im = t11_re*t22_im + t11_im*t22_re; magdet = det_re*det_re+det_im*det_im; if ( sqrt(magdet) < MACHEPS*scale ) { det_re = MACHEPS*scale; magdet = det_re*det_re+det_im*det_im; } invdet_re = det_re/magdet; invdet_im = - det_im/magdet; tmp_val1_re = t22_re*val1_re-t22_im*val1_im-t12*val2_re; tmp_val1_im = t22_im*val1_re+t22_re*val1_im-t12*val2_im; tmp_val2_re = t11_re*val2_re-t11_im*val2_im-t21*val1_re; tmp_val2_im = t11_im*val2_re+t11_re*val2_im-t21*val1_im; tmp1_re->ve[j-1] = invdet_re*tmp_val1_re - invdet_im*tmp_val1_im; tmp1_im->ve[j-1] = invdet_im*tmp_val1_re + invdet_re*tmp_val1_im; tmp1_re->ve[j] = invdet_re*tmp_val2_re - invdet_im*tmp_val2_im; tmp1_im->ve[j] = invdet_im*tmp_val2_re + invdet_re*tmp_val2_im; j -= 2; } else { t11_re = T_me[j][j] - l_re; t11_im = - l_im; magdet = t11_re*t11_re + t11_im*t11_im; scale = fabs(T_me[j][j]) + fabs(l_re); if ( sqrt(magdet) < MACHEPS*scale ) { t11_re = MACHEPS*scale; magdet = t11_re*t11_re + t11_im*t11_im; } invdet_re = t11_re/magdet; invdet_im = - t11_im/magdet; /* printf("checkpoint F\n"); */ val1_re = tmp1_re->ve[j] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint G\n"); */ val1_im = tmp1_im->ve[j] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint H\n"); */ tmp1_re->ve[j] = invdet_re*val1_re - invdet_im*val1_im; tmp1_im->ve[j] = invdet_im*val1_re + invdet_re*val1_im; j -= 1; } } norm = v_norm_inf(tmp1_re) + v_norm_inf(tmp1_im); sv_mlt(1/norm,tmp1_re,tmp1_re); if ( l_im != 0.0 ) sv_mlt(1/norm,tmp1_im,tmp1_im); mv_mlt(Q,tmp1_re,tmp2_re); if ( l_im != 0.0 ) mv_mlt(Q,tmp1_im,tmp2_im); if ( l_im != 0.0 ) norm = sqrt(in_prod(tmp2_re,tmp2_re)+in_prod(tmp2_im,tmp2_im)); else norm = v_norm2(tmp2_re); sv_mlt(1/norm,tmp2_re,tmp2_re); if ( l_im != 0.0 ) sv_mlt(1/norm,tmp2_im,tmp2_im); if ( l_im != 0.0 ) { if ( ! X_im ) error(E_NULL,"schur_vecs"); set_col(X_re,i,tmp2_re); set_col(X_im,i,tmp2_im); sv_mlt(-1.0,tmp2_im,tmp2_im); set_col(X_re,i+1,tmp2_re); set_col(X_im,i+1,tmp2_im); i += 2; } else { set_col(X_re,i,tmp2_re); if ( X_im != MNULL ) set_col(X_im,i,tmp1_im); /* zero vector */ i += 1; } } return X_re; } #endif neuron-7.5/src/mesch/zsolve.c000077500000000000000000000166531323325274500162730ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* Matrix factorisation routines to work with the other matrix files. Complex case */ static char rcsid[] = "zsolve.c,v 1.1 1997/12/04 17:56:17 hines Exp"; #include #include "zmatrix2.h" #include #define is_zero(z) ((z).re == 0.0 && (z).im == 0.0 ) /* Most matrix factorisation routines are in-situ unless otherwise specified */ /* zUsolve -- back substitution with optional over-riding diagonal -- can be in-situ but doesn't need to be */ ZVEC *zUsolve(matrix,b,out,diag) ZMAT *matrix; ZVEC *b, *out; double diag; { u_int dim /* , j */; int i, i_lim; complex **mat_ent, *mat_row, *b_ent, *out_ent, *out_col, sum; if ( matrix==ZMNULL || b==ZVNULL ) error(E_NULL,"zUsolve"); dim = min(matrix->m,matrix->n); if ( b->dim < dim ) error(E_SIZES,"zUsolve"); if ( out==ZVNULL || out->dim < dim ) out = zv_resize(out,matrix->n); mat_ent = matrix->me; b_ent = b->ve; out_ent = out->ve; for ( i=dim-1; i>=0; i-- ) if ( ! is_zero(b_ent[i]) ) break; else out_ent[i].re = out_ent[i].im = 0.0; i_lim = i; for ( i = i_lim; i>=0; i-- ) { sum = b_ent[i]; mat_row = &(mat_ent[i][i+1]); out_col = &(out_ent[i+1]); sum = zsub(sum,__zip__(mat_row,out_col,i_lim-i,Z_NOCONJ)); /****************************************************** for ( j=i+1; j<=i_lim; j++ ) sum -= mat_ent[i][j]*out_ent[j]; sum -= (*mat_row++)*(*out_col++); ******************************************************/ if ( diag == 0.0 ) { if ( is_zero(mat_ent[i][i]) ) error(E_SING,"zUsolve"); else /* out_ent[i] = sum/mat_ent[i][i]; */ out_ent[i] = zdiv(sum,mat_ent[i][i]); } else { /* out_ent[i] = sum/diag; */ out_ent[i].re = sum.re / diag; out_ent[i].im = sum.im / diag; } } return (out); } /* zLsolve -- forward elimination with (optional) default diagonal value */ ZVEC *zLsolve(matrix,b,out,diag) ZMAT *matrix; ZVEC *b,*out; double diag; { u_int dim, i, i_lim /* , j */; complex **mat_ent, *mat_row, *b_ent, *out_ent, *out_col, sum; if ( matrix==ZMNULL || b==ZVNULL ) error(E_NULL,"zLsolve"); dim = min(matrix->m,matrix->n); if ( b->dim < dim ) error(E_SIZES,"zLsolve"); if ( out==ZVNULL || out->dim < dim ) out = zv_resize(out,matrix->n); mat_ent = matrix->me; b_ent = b->ve; out_ent = out->ve; for ( i=0; im,U->n); if ( b->dim < dim ) error(E_SIZES,"zUAsolve"); out = zv_resize(out,U->n); U_me = U->me; b_ve = b->ve; out_ve = out->ve; for ( i=0; idim); /* MEM_COPY(&(b_ve[i_lim]),&(out_ve[i_lim]), (dim-i_lim)*sizeof(complex)); */ MEMCOPY(&(b_ve[i_lim]),&(out_ve[i_lim]),dim-i_lim,complex); } if ( diag == 0.0 ) { for ( ; im,A->n); if ( b->dim < dim ) error(E_SIZES,"zDsolve"); x = zv_resize(x,A->n); dim = b->dim; for ( i=0; ime[i][i]) ) error(E_SING,"zDsolve"); else x->ve[i] = zdiv(b->ve[i],A->me[i][i]); return (x); } /* zLAsolve -- back substitution with optional over-riding diagonal using the LOWER triangular part of matrix -- can be in-situ but doesn't need to be */ ZVEC *zLAsolve(L,b,out,diag) ZMAT *L; ZVEC *b, *out; double diag; { u_int dim; int i, i_lim; complex **L_me, *b_ve, *out_ve, tmp; Real invdiag; if ( ! L || ! b ) error(E_NULL,"zLAsolve"); dim = min(L->m,L->n); if ( b->dim < dim ) error(E_SIZES,"zLAsolve"); out = zv_resize(out,L->n); L_me = L->me; b_ve = b->ve; out_ve = out->ve; for ( i=dim-1; i>=0; i-- ) if ( ! is_zero(b_ve[i]) ) break; i_lim = i; if ( b != out ) { __zzero__(out_ve,out->dim); /* MEM_COPY(b_ve,out_ve,(i_lim+1)*sizeof(complex)); */ MEMCOPY(b_ve,out_ve,i_lim+1,complex); } if ( diag == 0.0 ) { for ( ; i>=0; i-- ) { tmp = zconj(L_me[i][i]); if ( is_zero(tmp) ) error(E_SING,"zLAsolve"); out_ve[i] = zdiv(out_ve[i],tmp); tmp.re = - out_ve[i].re; tmp.im = - out_ve[i].im; __zmltadd__(out_ve,L_me[i],tmp,i,Z_CONJ); } } else { invdiag = 1.0/diag; for ( ; i>=0; i-- ) { out_ve[i].re *= invdiag; out_ve[i].im *= invdiag; tmp.re = - out_ve[i].re; tmp.im = - out_ve[i].im; __zmltadd__(out_ve,L_me[i],tmp,i,Z_CONJ); } } return (out); } neuron-7.5/src/mesch/zvecop.c000077500000000000000000000257631323325274500162610ustar00rootroot00000000000000#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ #include #include "matrix.h" #include "zmatrix.h" static char rcsid[] = "zvecop.c,v 1.1 1997/12/04 17:56:19 hines Exp"; /* _zin_prod -- inner product of two vectors from i0 downwards -- flag != 0 means compute sum_i a[i]*.b[i]; -- flag == 0 means compute sum_i a[i].b[i] */ complex _zin_prod(a,b,i0,flag) ZVEC *a,*b; u_int i0, flag; { u_int limit; if ( a==ZVNULL || b==ZVNULL ) error(E_NULL,"_zin_prod"); limit = min(a->dim,b->dim); if ( i0 > limit ) error(E_BOUNDS,"_zin_prod"); return __zip__(&(a->ve[i0]),&(b->ve[i0]),(int)(limit-i0),flag); } /* zv_mlt -- scalar-vector multiply -- may be in-situ */ ZVEC *zv_mlt(scalar,vector,out) complex scalar; ZVEC *vector,*out; { /* u_int dim, i; */ /* complex *out_ve, *vec_ve; */ if ( vector==ZVNULL ) error(E_NULL,"zv_mlt"); if ( out==ZVNULL || out->dim != vector->dim ) out = zv_resize(out,vector->dim); if ( scalar.re == 0.0 && scalar.im == 0.0 ) return zv_zero(out); if ( scalar.re == 1.0 && scalar.im == 0.0 ) return zv_copy(vector,out); __zmlt__(vector->ve,scalar,out->ve,(int)(vector->dim)); return (out); } /* zv_add -- vector addition -- may be in-situ */ ZVEC *zv_add(vec1,vec2,out) ZVEC *vec1,*vec2,*out; { u_int dim; if ( vec1==ZVNULL || vec2==ZVNULL ) error(E_NULL,"zv_add"); if ( vec1->dim != vec2->dim ) error(E_SIZES,"zv_add"); if ( out==ZVNULL || out->dim != vec1->dim ) out = zv_resize(out,vec1->dim); dim = vec1->dim; __zadd__(vec1->ve,vec2->ve,out->ve,(int)dim); return (out); } /* zv_mltadd -- scalar/vector multiplication and addition -- out = v1 + scale.v2 */ ZVEC *zv_mltadd(v1,v2,scale,out) ZVEC *v1,*v2,*out; complex scale; { /* register u_int dim, i; */ /* complex *out_ve, *v1_ve, *v2_ve; */ if ( v1==ZVNULL || v2==ZVNULL ) error(E_NULL,"zv_mltadd"); if ( v1->dim != v2->dim ) error(E_SIZES,"zv_mltadd"); if ( scale.re == 0.0 && scale.im == 0.0 ) return zv_copy(v1,out); if ( scale.re == 1.0 && scale.im == 0.0 ) return zv_add(v1,v2,out); if ( v2 != out ) { tracecatch(out = zv_copy(v1,out),"zv_mltadd"); /* dim = v1->dim; */ __zmltadd__(out->ve,v2->ve,scale,(int)(v1->dim),0); } else { tracecatch(out = zv_mlt(scale,v2,out),"zv_mltadd"); out = zv_add(v1,out,out); } return (out); } /* zv_sub -- vector subtraction -- may be in-situ */ ZVEC *zv_sub(vec1,vec2,out) ZVEC *vec1,*vec2,*out; { /* u_int i, dim; */ /* complex *out_ve, *vec1_ve, *vec2_ve; */ if ( vec1==ZVNULL || vec2==ZVNULL ) error(E_NULL,"zv_sub"); if ( vec1->dim != vec2->dim ) error(E_SIZES,"zv_sub"); if ( out==ZVNULL || out->dim != vec1->dim ) out = zv_resize(out,vec1->dim); __zsub__(vec1->ve,vec2->ve,out->ve,(int)(vec1->dim)); return (out); } /* zv_map -- maps function f over components of x: out[i] = f(x[i]) -- _zv_map sets out[i] = f(x[i],params) */ ZVEC *zv_map(f,x,out) #ifdef PROTOYPES_IN_STRUCT complex (*f)(complex); #else complex (*f)(); #endif ZVEC *x, *out; { complex *x_ve, *out_ve; int i, dim; if ( ! x || ! f ) error(E_NULL,"zv_map"); if ( ! out || out->dim != x->dim ) out = zv_resize(out,x->dim); dim = x->dim; x_ve = x->ve; out_ve = out->ve; for ( i = 0; i < dim; i++ ) out_ve[i] = (*f)(x_ve[i]); return out; } ZVEC *_zv_map(f,params,x,out) #ifdef PROTOTYPES_IN_STRUCT complex (*f)(void *,complex); #else complex (*f)(); #endif ZVEC *x, *out; void *params; { complex *x_ve, *out_ve; int i, dim; if ( ! x || ! f ) error(E_NULL,"_zv_map"); if ( ! out || out->dim != x->dim ) out = zv_resize(out,x->dim); dim = x->dim; x_ve = x->ve; out_ve = out->ve; for ( i = 0; i < dim; i++ ) out_ve[i] = (*f)(params,x_ve[i]); return out; } /* zv_lincomb -- returns sum_i a[i].v[i], a[i] real, v[i] vectors */ ZVEC *zv_lincomb(n,v,a,out) int n; /* number of a's and v's */ complex a[]; ZVEC *v[], *out; { int i; if ( ! a || ! v ) error(E_NULL,"zv_lincomb"); if ( n <= 0 ) return ZVNULL; for ( i = 1; i < n; i++ ) if ( out == v[i] ) error(E_INSITU,"zv_lincomb"); out = zv_mlt(a[0],v[0],out); for ( i = 1; i < n; i++ ) { if ( ! v[i] ) error(E_NULL,"zv_lincomb"); if ( v[i]->dim != out->dim ) error(E_SIZES,"zv_lincomb"); out = zv_mltadd(out,v[i],a[i],out); } return out; } #ifdef ANSI_C /* zv_linlist -- linear combinations taken from a list of arguments; calling: zv_linlist(out,v1,a1,v2,a2,...,vn,an,NULL); where vi are vectors (ZVEC *) and ai are numbers (complex) */ ZVEC *zv_linlist(ZVEC *out,ZVEC *v1,complex a1,...) { va_list ap; ZVEC *par; complex a_par; if ( ! v1 ) return ZVNULL; va_start(ap, a1); out = zv_mlt(a1,v1,out); while ((par = va_arg(ap,ZVEC *))) { /* NULL ends the list*/ a_par = va_arg(ap,complex); if (a_par.re == 0.0 && a_par.im == 0.0) continue; if ( out == par ) error(E_INSITU,"zv_linlist"); if ( out->dim != par->dim ) error(E_SIZES,"zv_linlist"); if (a_par.re == 1.0 && a_par.im == 0.0) out = zv_add(out,par,out); else if (a_par.re == -1.0 && a_par.im == 0.0) out = zv_sub(out,par,out); else out = zv_mltadd(out,par,a_par,out); } va_end(ap); return out; } #elif VARARGS /* zv_linlist -- linear combinations taken from a list of arguments; calling: zv_linlist(out,v1,a1,v2,a2,...,vn,an,NULL); where vi are vectors (ZVEC *) and ai are numbers (complex) */ ZVEC *zv_linlist(va_alist) va_dcl { va_list ap; ZVEC *par, *out; complex a_par; va_start(ap); out = va_arg(ap,ZVEC *); par = va_arg(ap,ZVEC *); if ( ! par ) { va_end(ap); return ZVNULL; } a_par = va_arg(ap,complex); out = zv_mlt(a_par,par,out); while ((par = va_arg(ap,ZVEC *))) { /* NULL ends the list*/ a_par = va_arg(ap,complex); if (a_par.re == 0.0 && a_par.im == 0.0) continue; if ( out == par ) error(E_INSITU,"zv_linlist"); if ( out->dim != par->dim ) error(E_SIZES,"zv_linlist"); if (a_par.re == 1.0 && a_par.im == 0.0) out = zv_add(out,par,out); else if (a_par.re == -1.0 && a_par.im == 0.0) out = zv_sub(out,par,out); else out = zv_mltadd(out,par,a_par,out); } va_end(ap); return out; } #endif /* zv_star -- computes componentwise (Hadamard) product of x1 and x2 -- result out is returned */ ZVEC *zv_star(x1, x2, out) ZVEC *x1, *x2, *out; { int i; Real t_re, t_im; if ( ! x1 || ! x2 ) error(E_NULL,"zv_star"); if ( x1->dim != x2->dim ) error(E_SIZES,"zv_star"); out = zv_resize(out,x1->dim); for ( i = 0; i < x1->dim; i++ ) { /* out->ve[i] = x1->ve[i] * x2->ve[i]; */ t_re = x1->ve[i].re*x2->ve[i].re - x1->ve[i].im*x2->ve[i].im; t_im = x1->ve[i].re*x2->ve[i].im + x1->ve[i].im*x2->ve[i].re; out->ve[i].re = t_re; out->ve[i].im = t_im; } return out; } /* zv_slash -- computes componentwise ratio of x2 and x1 -- out[i] = x2[i] / x1[i] -- if x1[i] == 0 for some i, then raise E_SING error -- result out is returned */ ZVEC *zv_slash(x1, x2, out) ZVEC *x1, *x2, *out; { int i; Real r2, t_re, t_im; complex tmp; if ( ! x1 || ! x2 ) error(E_NULL,"zv_slash"); if ( x1->dim != x2->dim ) error(E_SIZES,"zv_slash"); out = zv_resize(out,x1->dim); for ( i = 0; i < x1->dim; i++ ) { r2 = x1->ve[i].re*x1->ve[i].re + x1->ve[i].im*x1->ve[i].im; if ( r2 == 0.0 ) error(E_SING,"zv_slash"); tmp.re = x1->ve[i].re / r2; tmp.im = - x1->ve[i].im / r2; t_re = tmp.re*x2->ve[i].re - tmp.im*x2->ve[i].im; t_im = tmp.re*x2->ve[i].im - tmp.im*x2->ve[i].re; out->ve[i].re = t_re; out->ve[i].im = t_im; } return out; } /* zv_sum -- returns sum of entries of a vector */ complex zv_sum(x) ZVEC *x; { int i; complex sum; if ( ! x ) error(E_NULL,"zv_sum"); sum.re = sum.im = 0.0; for ( i = 0; i < x->dim; i++ ) { sum.re += x->ve[i].re; sum.im += x->ve[i].im; } return sum; } /* px_zvec -- permute vector */ ZVEC *px_zvec(px,vector,out) PERM *px; ZVEC *vector,*out; { u_int old_i, i, size, start; complex tmp; if ( px==PNULL || vector==ZVNULL ) error(E_NULL,"px_zvec"); if ( px->size > vector->dim ) error(E_SIZES,"px_zvec"); if ( out==ZVNULL || out->dim < vector->dim ) out = zv_resize(out,vector->dim); size = px->size; if ( size == 0 ) return zv_copy(vector,out); if ( out != vector ) { for ( i=0; ipe[i] >= size ) error(E_BOUNDS,"px_vec"); else out->ve[i] = vector->ve[px->pe[i]]; } else { /* in situ algorithm */ start = 0; while ( start < size ) { old_i = start; i = px->pe[old_i]; if ( i >= size ) { start++; continue; } tmp = vector->ve[start]; while ( TRUE ) { vector->ve[old_i] = vector->ve[i]; px->pe[old_i] = i+size; old_i = i; i = px->pe[old_i]; if ( i >= size ) break; if ( i == start ) { vector->ve[old_i] = tmp; px->pe[old_i] = i+size; break; } } start++; } for ( i = 0; i < size; i++ ) if ( px->pe[i] < size ) error(E_BOUNDS,"px_vec"); else px->pe[i] = px->pe[i]-size; } return out; } /* pxinv_zvec -- apply the inverse of px to x, returning the result in out -- may NOT be in situ */ ZVEC *pxinv_zvec(px,x,out) PERM *px; ZVEC *x, *out; { u_int i, size; if ( ! px || ! x ) error(E_NULL,"pxinv_zvec"); if ( px->size > x->dim ) error(E_SIZES,"pxinv_zvec"); if ( ! out || out->dim < x->dim ) out = zv_resize(out,x->dim); size = px->size; if ( size == 0 ) return zv_copy(x,out); if ( out != x ) { for ( i=0; ipe[i] >= size ) error(E_BOUNDS,"pxinv_vec"); else out->ve[px->pe[i]] = x->ve[i]; } else { /* in situ algorithm --- cheat's way out */ px_inv(px,px); px_zvec(px,x,out); px_inv(px,px); } return out; } /* zv_rand -- randomise a complex vector; uniform in [0,1)+[0,1)*i */ ZVEC *zv_rand(x) ZVEC *x; { if ( ! x ) error(E_NULL,"zv_rand"); mrandlist((Real *)(x->ve),2*x->dim); return x; } neuron-7.5/src/modlunit/000077500000000000000000000000001323325274500153235ustar00rootroot00000000000000neuron-7.5/src/modlunit/Makefile.am000077500000000000000000000013511323325274500173620ustar00rootroot00000000000000bin_PROGRAMS = modlunit modlunit_SOURCES = parse1.y lex.l consist.c declare.c init.c io.c \ kinunit.c list.c model.c nrnunit.c passn.c symbol.c units.c \ units1.c version.c ## The list of .h files that are needed in the distribution. noinst_HEADERS = extargs.h extdef.h model.h symbol.h units.h parse1.h \ macmunit.h modlunit.h ## for building a dos version EXTRA_DIST = modlunit.mak carbonmunit.h AM_YFLAGS = -d AM_CPPFLAGS = -DNRNUNIT=1 ## files that depend on the existence of parse1.h ## this allows parallel make -j to work at the beginning when parse1.h ## does not exist and dependencies have not yet been determined consist.o declare.o init.o io.o kinunit.o lex.o list.o model.o \ nrnunit.o passn.o symbol.o units1.o : parse1.h neuron-7.5/src/modlunit/Makefile.in000066400000000000000000000636061323325274500174030ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = modlunit$(EXEEXT) subdir = src/modlunit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_modlunit_OBJECTS = parse1.$(OBJEXT) lex.$(OBJEXT) consist.$(OBJEXT) \ declare.$(OBJEXT) init.$(OBJEXT) io.$(OBJEXT) \ kinunit.$(OBJEXT) list.$(OBJEXT) model.$(OBJEXT) \ nrnunit.$(OBJEXT) passn.$(OBJEXT) symbol.$(OBJEXT) \ units.$(OBJEXT) units1.$(OBJEXT) version.$(OBJEXT) modlunit_OBJECTS = $(am_modlunit_OBJECTS) modlunit_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) AM_V_LEX = $(am__v_LEX_@AM_V@) am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) am__v_LEX_0 = @echo " LEX " $@; am__v_LEX_1 = YLWRAP = $(top_srcdir)/ylwrap @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = SOURCES = $(modlunit_SOURCES) DIST_SOURCES = $(modlunit_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/ylwrap lex.c parse1.c parse1.h DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ modlunit_SOURCES = parse1.y lex.l consist.c declare.c init.c io.c \ kinunit.c list.c model.c nrnunit.c passn.c symbol.c units.c \ units1.c version.c noinst_HEADERS = extargs.h extdef.h model.h symbol.h units.h parse1.h \ macmunit.h modlunit.h EXTRA_DIST = modlunit.mak carbonmunit.h AM_YFLAGS = -d AM_CPPFLAGS = -DNRNUNIT=1 all: all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/modlunit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/modlunit/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list parse1.h: parse1.c @if test ! -f $@; then rm -f parse1.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parse1.c; else :; fi modlunit$(EXEEXT): $(modlunit_OBJECTS) $(modlunit_DEPENDENCIES) $(EXTRA_modlunit_DEPENDENCIES) @rm -f modlunit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(modlunit_OBJECTS) $(modlunit_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/consist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/declare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinunit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnunit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/units.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/units1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f lex.c -rm -f parse1.c -rm -f parse1.h clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile consist.o declare.o init.o io.o kinunit.o lex.o list.o model.o \ nrnunit.o passn.o symbol.o units1.o : parse1.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/modlunit/carbonmunit.h000077500000000000000000000002321323325274500200150ustar00rootroot00000000000000#include #include #include #include #pragma once off #define SYSV 1 #define MAC 1 #define NRNUNIT 1 neuron-7.5/src/modlunit/consist.c000077500000000000000000000035751323325274500171660ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/consist.c,v 1.2 1995/09/05 20:24:01 hines Exp */ /* * Check that names do not have conflicting types. This is done after the * entire file is read in and allows declaring a variable after its use (very * bad style) to work. */ #include "model.h" #include "parse1.h" #include "symbol.h" extern Item **scop_indep; #define con(arg1,arg2,arg3) if (t & (arg2)) if (t & (~(arg2 | arg3))) {\ Fprintf(stderr, "%s is a %s\n",\ s->name, arg1);\ err=1;\ } void consistency() { int tu, err = 0; long t; Symbol *sindep; /* the scop_indep can also be a automatic constant */ sindep = SYM(scop_indep[0]); if (sindep != indepsym && sindep->subtype == (modlunitCONST | INDEP)) { sindep->subtype = INDEP; } SYMITERALL { t = s->subtype; con("KEYWORD", KEYWORD, 0); con("CONSTANT", modlunitCONST, ARRAY); con("INDEPENDENT", INDEP, 0); con("DEPENDENT", DEP, ARRAY); con("STATE", STAT, ARRAY); con("FUNCTION", FUNCT, 0); con("PROCEDURE", PROCED, 0); con("DERIVATIVE", DERF, 0); con(" KINETIC", KINF, 0); con("LINEAR", LINF, 0); con("NONLINEAR", NLINF, 0); con("DISCRETE", DISCF, 0); con("PARTIAL", PARF, 0); con("STEPPED", STEP1, 0); tu = s->usage; if ((tu & DEP) && (tu & FUNCT)) diag(s->name, " used as both variable and function"); if ((t == 0) && tu) Fprintf(stderr, "Warning: %s undefined. (declared within VERBATIM?)\n", s->name); }} if (err) { diag("multiple uses for same variable", (char *) 0); } if (indepsym == SYM0) { diag("Independent variable is not defined", (char *)0); } } /* consist.c,v * Revision 1.2 1995/09/05 20:24:01 hines * paramter arrays and limits syntax is now < a, b > * * Revision 1.1.1.1 1994/10/12 17:22:47 hines * NEURON 3.0 distribution * * Revision 1.1 90/11/13 16:09:24 hines * Initial revision * */ neuron-7.5/src/modlunit/declare.c000077500000000000000000000125441323325274500170770ustar00rootroot00000000000000#include <../../nmodlconf.h> #include #include "model.h" #include "parse1.h" #include "symbol.h" #ifdef HAVE_STRINGS_H #include #endif int declare_level=0; Symbol *indepsym; /* mathematical independent variable */ Item **scop_indep; /* the scop swept information */ char *indepunits = ""; /* subtype of variables using explicit declarations */ static int promote(); static int nprime(); void declare(subtype, q, qa) long subtype; Item *q, *qa; { Symbol *sym; sym = SYM(q); if (!sym->subtype) { /* not previously declared */ sym->subtype = subtype; sym->info = qa; sym->level = declare_level; } else if (declare_level == 0 && sym->level == 0) { diag("Multiple declaration of ", sym->name); } else if (sym->subtype == subtype) { /* lowest level precedence */ if (declare_level < sym->level) { sym->info = qa; sym->level = declare_level; }/*else leave as is. First declaration gets precedence */ } else { /* A few cases can be promoted */ if (subtype&(modlunitCONST|DEP|STAT) && sym->subtype&(modlunitCONST|DEP|STAT)){ if (promote(sym, subtype)) { sym->subtype = subtype; sym->info = qa; sym->level = declare_level; } } else { diag("Multiple inconsistent declarations of ", sym->name); } } declare_array(sym); if (sym->subtype == INDEP && declare_level == 0) { declare_indep(sym); } /*fprintf(stderr, "declared %s with subtype %ld\n", sym->name, sym->subtype);*/ } static int promote(sym, sub) Symbol *sym; long sub; { /*ARGSUSED*/ diag("promotion not programmed yet", (char *)0); return 0; } void declare_indep(sym) Symbol *sym; { Item **qa; qa = ITMA(sym->info); if (!qa[7]) { /* no explicit SWEEP */ if (indepsym) { diag("Only one independent variable can be defined", (char *) 0); } indepsym = sym; if (ITMA(sym->info)[1]) { indepunits = STR(ITMA(sym->info)[1]); } if (!scop_indep) { scop_indep = qa; } }else{ if (scop_indep && scop_indep[7]) { diag("Only one SWEEP declaration is allowed", (char *)0); } scop_indep = qa; } } void define_value(q1, q2) Item *q1, *q2; { Symbol *s; s = SYM(q1); if (s->subtype) { diag(s->name, "already declared"); } if (s->usage) { diag(s->name, "used before DEFINE'ed"); } s->type = DEFINEDVAR; if (q2->itemtype == SYMBOL) { s->u.i = SYM(q2)->u.i; }else{ s->u.i = atoi(STR(q2)); } } /* fix up array info */ void declare_array(s) Symbol *s; { Item *q; if (s->subtype & (modlunitCONST|DEP|STAT)) { q = ITMA(s->info)[2]; if (q) { decdim(s, q); /*fprintf(stderr, "declared array %s[%d]\n", s->name, s->araydim);*/ } } } void decdim(s, q) Symbol *s; Item *q; { s->subtype |= ARRAY; if (q->itemtype == SYMBOL && SYM(q)->type == DEFINEDVAR) { s->araydim = SYM(q)->u.i; }else if (q->itemtype == STRING) { s->araydim = atoi(STR(q)); }else{ /*SUPPRESS 622*/ assert(0); } if (s->araydim < 1) { diag(s->name, " Array index must be > 0"); } } Item * listtype(q) Item *q; { static int i=0; if (i > 1) { diag("internal error inlisttype: First element of LIST is a LIST", (char *)0); } switch (q->itemtype) { case SYMBOL: break; case LIST: i++; q = listtype(car(LST(q))); i--; break; case ITEM: q = listtype(ITM(q)); break; default: diag("internal error in listtype: SYMBOL not first element", (char *)0); } return q; } void declare_implied() { Symbol *sbase, *basestate(); #if NRNUNIT if (!indepsym) { List* save, *qa; Item* name, *units, *from, *to, *with, *num; save = intoken; intoken = newlist(); name = putintoken("t", NAME, 0); units = putintoken("ms", STRING, UNITS); from = putintoken("0", INTEGER, INTEGER); to = putintoken("1", INTEGER, INTEGER); with = putintoken("WITH", NAME, 0); num = putintoken("1", INTEGER, INTEGER); qa = itemarray(8, name, units, from, to, with, num, ITEM0, ITEM0); declare(INDEP, ITMA(qa)[0], qa); intoken = save; } #endif if (!indepsym) { diag("No INDEPENDENT variable has been declared", (char*)0); } SYMITERALL { if (!s->subtype) { sbase = basestate(s); if (s->type == PRIME) { if (!sbase) { diag(s->name, " is used but its corresponding STATE is not declared"); } s->subtype = DEP; if (nprime(s->name) == 1) { Sprintf(buf, "%s/%s", decode_units(sbase), indepunits); }else{ Sprintf(buf, "%s/%s%d", decode_units(sbase), indepunits, nprime(s->name)); } s->u.str = stralloc(buf, (char *)0); } else { if (sbase) { s->subtype = modlunitCONST; s->u.str = stralloc(decode_units(sbase), (char *)0); } } } }} } Symbol * basestate(s) /* base state symbol for state''' or state0 */ Symbol *s; { Symbol *base = SYM0; strcpy(buf, s->name); if (s->type == PRIME) { buf[strlen(buf) - nprime(s->name)] = '\0'; base = lookup(buf); } else if (s->name[strlen(s->name) - 1] == '0') { buf[strlen(buf) - 1] = '\0'; base = lookup(buf); } if (base && !(base->subtype & STAT)) { base = SYM0; } return base; } #if __TURBOC__ || SYSV || VMS || !defined(HAVE_INDEX) || defined(HAVE_STRINGS_H) #undef index #define index strchr #endif static int nprime(s) char *s; { char *cp; cp = index(s, '\''); return strlen(s) - (cp - s); } void install_cfactor(qname, q1, q2) /* declare conversion factor */ Item *qname, *q1, *q2; { declare(CNVFAC, qname, ITEM0); Unit_push(STR(q2)); Unit_push(STR(q1)); unit_div(); SYM(qname)->u.str = stralloc(unit_str(), (char *)0); unit_pop(); } neuron-7.5/src/modlunit/extargs.h000077500000000000000000000003461323325274500171570ustar00rootroot00000000000000"at_time", "", "ms", 0, "state_discontinuity", "", "m9", "m9", 0, "net_send", "", "ms", "m9", 0, "net_event", "", "ms", 0, "net_move", "", "ms", 0, "nrn_ghk", "millicoulombs/cm3", "millivolt", "milli/liter", "milli/liter", "", 0, neuron-7.5/src/modlunit/extdef.h000077500000000000000000000014571323325274500167650ustar00rootroot00000000000000/* /local/src/master/nrn/src/modlunit/extdef.h,v 1.5 1998/07/04 14:08:54 hines Exp */ "first_time", "error", "f_flux", "b_flux", "fabs", "sqrt", "sin", "cos", "tan", "acos", "asin", "atan", "atan2", "sinh", "cosh", "tanh", "floor", "ceil", "fmod", "log10", "log", "pow", "printf", "prterr", "exp", "threshold", "force", "deflate", "expfit", "derivs", "spline", "hyperbol", "revhyperbol", "sigmoid", "revsigmoid", "harmonic", "squarewave", "sawtooth", "revsawtooth", "ramp", "pulse", "perpulse", "step", "perstep", "erf", "exprand", "factorial", "gauss", "normrand", "poisrand", "poisson", "setseed", "scop_random", "boundary", "romberg", "legendre", "invert", "stepforce", "schedule", "set_seed", "nrn_pointing", "state_discontinuity", "net_send", "net_move", "net_event", "nrn_random_play", "at_time", "nrn_ghk", neuron-7.5/src/modlunit/init.c000077500000000000000000000207741323325274500164470ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/init.c,v 1.9 1998/03/25 14:33:55 hines Exp */ #include "model.h" #include "parse1.h" extern int unitonflag; List *initlist, *initfunc, *firstlist, *termfunc, *modelfunc; List *procfunc, *plotlist, *solvelist, *misc; List *syminorder; Symbol *semi, *beginblk, *endblk; List *intoken; char buf[512]; /* volatile temporary buffer */ static struct { /* Keywords */ char *name; short kval; } keywords[] = { "VERBATIM", VERBATIM, "ENDVERBATIM", END_VERBATIM, /* explicit in lex.l */ "COMMENT", COMMENT, "ENDCOMMENT", END_COMMENT, /* explicit in lex.l */ "TITLE", TITLE, "CONSTANT", CONSTANT, "PARAMETER", PARAMETER, "INDEPENDENT", INDEPENDENT, "ASSIGNED", ASSIGNED, "INITIAL", INITIAL1, "TERMINAL", TERMINAL, "DERIVATIVE", DERIVATIVE, "EQUATION", EQUATION, "BREAKPOINT", BREAKPOINT, "CONDUCTANCE", CONDUCTANCE, "SOLVE", SOLVE, "STATE", STATE, "STEPPED", STEPPED, "LINEAR", LINEAR, "NONLINEAR", NONLINEAR, "DISCRETE", DISCRETE, "FUNCTION", FUNCTION1, "FUNCTION_TABLE", FUNCTION_TABLE, "PROCEDURE", PROCEDURE, "PARTIAL", PARTIAL, "DEL2", DEL2, "DEL", DEL, "LOCAL", LOCAL, "METHOD", USING, "STEADYSTATE", USING, "SENS", SENS, "STEP", STEP, "WITH", WITH, "FROM", FROM, "TO", TO, "BY", BY, "if", IF, "else", ELSE, "while", WHILE, "IF", IF, "ELSE", ELSE, "WHILE", WHILE, "START", START1, "DEFINE", DEFINE1, "KINETIC", KINETIC, "CONSERVE", CONSERVE, "PLOT", PLOT, "VS", VS, "LAG", LAG, "RESET", RESET, "MATCH", MATCH, "MODEL_LEVEL", MODEL_LEVEL, /* inserted by merge */ "SWEEP", SWEEP, "FIRST", FIRST, "LAST", LAST, "COMPARTMENT", COMPARTMENT, "LONGITUDINAL_DIFFUSION", LONGDIFUS, "PUTQ", PUTQ, "GETQ", GETQ, "IFERROR", IFERROR, "SOLVEFOR", SOLVEFOR, "UNITS", UNITBLK, "UNITSON", UNITSON, "UNITSOFF", UNITSOFF, "TABLE", TABLE, "DEPEND", DEPEND, "NEURON", NEURON, "SUFFIX", SUFFIX, "POINT_PROCESS", SUFFIX, "ARTIFICIAL_CELL", SUFFIX, "NONSPECIFIC_CURRENT", NONSPECIFIC, "ELECTRODE_CURRENT", ELECTRODE_CURRENT, "USEION", USEION, "READ", READ, "WRITE", WRITE, "RANGE", RANGE, "SECTION", SECTION, "VALENCE", VALENCE, "GLOBAL", GLOBAL, "POINTER", POINTER, "BBCOREPOINTER", POINTER, "EXTERNAL", EXTERNAL, "INCLUDE", INCLUDE1, "CONSTRUCTOR", CONSTRUCTOR, "DESTRUCTOR", DESTRUCTOR, "NET_RECEIVE", NETRECEIVE, "BEFORE", BEFORE, /* before NEURON sets up cy' = f(y,t) */ "AFTER", AFTER, /* after NEURON solves cy' = f(y, t) */ "WATCH", WATCH, "FOR_NETCONS", FOR_NETCONS, "THREADSAFE", THREADSAFE, "PROTECT", PROTECT, 0, 0 }; /* * the following special output tokens are used to make the .c file barely * readable */ static struct { /* special output tokens */ char *name; long subtype; Symbol **p; } special[] = { ";", SEMI, &semi, "{", BEGINBLK, &beginblk, "}", ENDBLK, &endblk, 0, 0, 0 }; static struct { /* numerical methods */ char *name; long subtype; /* All the types that will work with this */ short varstep; } methods[] = { "adams", DERF | KINF, 0, "runge", DERF | KINF, 0, "euler", DERF | KINF, 0, "adeuler", DERF | KINF, 1, "heun", DERF | KINF, 0, "adrunge", DERF | KINF, 1, "newton", NLINF, 0, "simplex", NLINF, 0, "simeq", LINF, 0, "seidel", LINF, 0, "_advance", KINF, 0, "sparse", KINF, 0, "derivimplicit", DERF, 0, /* name hard wired in deriv.c */ "cnexp", DERF, 0, "clsoda", DERF | KINF, 0, /* Tolerance built in to scopgear.c */ "after_cvode", 0, 0, "cvode_t", 0, 0, "cvode_t_v", 0, 0, 0, 0, 0 }; static char *extdef[] = { /* external names that can be used as doubles * without giving an error message */ #include "extdef.h" 0 }; static char *extargs[] = { /* units of args to external functions */ /* format: name, returnunits, arg1unit, arg2unit, ..., 0, */ #include "extargs.h" 0 }; void init() { int i; Symbol *s; symbol_init(); for (i = 0; keywords[i].name; i++) { s = install(keywords[i].name, keywords[i].kval); s->subtype = KEYWORD; } for (i = 0; methods[i].name; i++) { s = install(methods[i].name, METHOD); s->subtype = methods[i].subtype; s->u.i = methods[i].varstep; } for (i = 0; special[i].name; i++) { s = install(special[i].name, SPECIAL); *(special[i].p) = s; s->subtype = special[i].subtype; } for (i = 0; extdef[i]; i++) { s = install(extdef[i], NAME); s->subtype = EXTDEF; } for (i = 0; extargs[i]; ++i) { List* lu; s = lookup(extargs[i++]); assert(s); s->u.str = extargs[i++]; lu = newlist(); while (extargs[i]) { lappendstr(lu, extargs[i]); ++i; } s->info = itemarray(3,ITEM0, ITEM0, lu); } intoken = newlist(); initfunc = newlist(); modelfunc = newlist(); termfunc = newlist(); procfunc = newlist(); initlist = newlist(); firstlist = newlist(); syminorder = newlist(); plotlist = newlist(); solvelist = newlist(); misc = newlist(); } /* init.c,v * Revision 1.9 1998/03/25 14:33:55 hines * Model descriptions of a POINT_PROCESS may contain a * NET_RECEIVE(weight){statementlist} * weight is a reference variable and may be changed within this block. * * Revision 1.8 1998/02/19 20:43:09 hines * modlunit more up to date with respect to nmodl * * Revision 1.7 1997/11/20 21:34:34 hines * can specify external function argument units for modlunit checking * in nrn/src/modlunit/extargs.h * for example at_time must take an argument with units of ms. * Not all useful functions are listed at this time. * * Revision 1.6 1997/11/13 21:45:05 hines * modlunit checks for LONGITUDINAL_DIFFUSION expr { state } * are that expr has the units of micron4/ms, and that there exist a prior * COMPARTMENT statement with a volume expression with units micron3/micron * * Revision 1.5 1997/07/29 20:21:43 hines * mac port of nmodl, modlunit * * Revision 1.4 1997/06/26 20:12:09 hines * modlunit more up to date with respect to allowed external functions. * * Revision 1.3 1995/07/16 13:05:30 hines * FUNCTION_TABLE looks good so far * * Revision 1.2 1995/07/15 12:12:41 hines * CONSTRUCTRO DESTRUCTOR handled * * Revision 1.1.1.1 1994/10/12 17:22:47 hines * NEURON 3.0 distribution * * Revision 1.12 1994/09/26 18:51:06 hines * USEION ... VALENCE real * * Revision 1.11 1994/05/18 18:08:13 hines * INCLUDE "file" * tries originalpath/file ./file MODL_INCLUDEpaths/file * * Revision 1.10 1993/07/08 14:36:28 hines * An alternative to NONSPECIFIC_CURRENT is ELECTRODE_CURRENT * * Revision 1.9 92/06/01 13:25:30 hines * NEURON {EXTERNAL name, name, ...} allowed * * Revision 1.8 92/02/17 12:30:50 hines * constant states with a compartment size didn't have space allocated * to store the compartment size. * * Revision 1.7 91/09/16 16:03:36 hines * NEURON { RANGE SECTION GLOBAL} syntax * * Revision 1.6 91/01/29 07:10:29 hines * POINT_PROCESS keyword allowed * * Revision 1.5 90/12/12 11:33:08 hines * LOCAL vectors allowed. Some more NEURON syntax added * * Revision 1.4 90/11/23 13:43:41 hines * BREAKPOINT PARAMETER * * Revision 1.3 90/11/20 15:30:23 hines * added 4 varieties of unit factors. They are * name = (real) * name = ((unit) -> (unit)) must be conformable * name = (physical_constant) * name = (physical_constant (unit)) must be conformable * * Revision 1.2 90/11/15 13:00:23 hines * function units and number units work. accepts NEURON block * * Revision 1.1 90/11/13 16:10:08 hines * Initial revision * */ neuron-7.5/src/modlunit/io.c000077500000000000000000000203041323325274500161000ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/io.c,v 1.2 1997/11/24 16:19:09 hines Exp */ /* file.mod input routines */ #include #include "model.h" #include #if MAC && TARGET_API_MAC_CARBON #include #endif #undef METHOD #include "parse1.h" Item *lastok; /*should be last token accepted by parser that gives successful reduction */ /* * We painfully constuct our own input buffer so that when user errors occur * we can print the whole line. Often, even this is not enough if the error * is at the end of a line. We also count lines so the user can go right to * the error in most cases */ static int linenum = 0; static char inlinebuf[600], *inlinep = inlinebuf + 30, *ctp = inlinebuf + 30; static int file_stack_empty(); char* Fgets(buf, size, f) char* buf; int size; FILE* f; { char* p = buf; int c, i; for(i=0; i < size; ++ i) { c = getc(f); if (c == EOF || c == 26 || c == 4) { /* ^Z and ^D are end of file */ /* some editors don't put a newline at last line */ if ( p > buf) { ungetc(c, f); c = '\n'; }else{ break; } } if (c == '\r') { int c2 = getc(f); if (c2 != '\n') { ungetc(c2, f); } c = '\n'; } *p++ = c; if (c == '\n') { *p = '\0'; return buf; } } if (i >= size) { buf[size-1] = 0; diag("Line too long:", buf); } return (char*)0; } int Getc() { int c; if (ctp == (char *) 0 || *ctp == '\0') { ctp = Fgets(inlinep, 512, fin); if (ctp) linenum++; } if (ctp == (char *) 0) { ctp = inlinep; *ctp = '\0'; if (file_stack_empty()) { return EOF; }else{ pop_file_stack(); return Getc(); } } c = *ctp++; return c; } int unGetc(c) int c; { if (c == EOF) return c; if (ctp > inlinebuf) { ctp--; *ctp = c; } else { diag("internal error in unGetc", ""); } return c; } char * Gets(buf) char *buf; { char *cp; int c; cp = buf; while ((c = Getc()) != EOF && c != '\n') { *cp++ = c; } if (c == '\n') { *cp++ = c; *cp++ = '\0'; return buf; } else if (c == EOF) { return (char *) 0; } else { diag("internal error in Gets()", ""); } return (char *) 0; } /* two arguments so we can pass a name to construct an error message. */ void diag(s1, s2) char *s1, *s2; { char *cp; Item *q1, *q2, *q; Fprintf(stderr, "%s", s1); if (s2) { Fprintf(stderr, "%s", s2); } if (lex_tok) { /*EMPTY*/ for (q2=lastok; q2->itemtype != NEWLINE && q2 != intoken; q2 = q2->next) { ; } /*EMPTY*/ for (q1=lastok->prev; q1->itemtype != NEWLINE && q1 != intoken; q1 = q1->prev) { ; } if (q2 == intoken) { Fprintf(stderr, " at end of file in file %s\n", finname); }else{ Fprintf(stderr, " at line %d in file %s\n", q2->itemsubtype, finname); } assert (q1 != q2); for (q = q1->next; q != q2; q = q->next) { switch (q->itemtype) { case SYMBOL: Fprintf(stderr, "%s", SYM(q)->name); break; case STRING: Fprintf(stderr, "%s", STR(q)); break; case NEWLINE: Fprintf(stderr, "\n"); break; default: /*SUPPRESS 622*/ assert(0); } if (q == lastok) { Fprintf(stderr, "<>"); } } }else if (fin) { Fprintf(stderr, " at line %d in file %s\n", linenum, finname); Fprintf(stderr, "%s", inlinep); if (ctp >= inlinep) { for (cp = inlinep; cp < ctp - 1; cp++) { if (*cp == '\t') { Fprintf(stderr, "\t"); } else { Fprintf(stderr, " "); } } Fprintf(stderr, "^"); } } Fprintf(stderr, "\n"); #if MAC && TARGET_API_MAC_CARBON SIOUXSettings.autocloseonquit = true; RunApplicationEventLoop(); #endif exit(1); } Symbol *_SYM(q, file, line) Item *q; char *file; int line; { if (!q || q->itemtype != SYMBOL) { internal_error(q, file, line); } return (Symbol *)((q)->element); } char *_STR(q, file, line) Item *q; char *file; int line; { if (!q || q->itemtype != STRING) { internal_error(q, file, line); } return (char *)((q)->element); } Item *_ITM(q, file, line) Item *q; char *file; int line; { if (!q || q->itemtype != ITEM) { internal_error(q, file, line); } return (Item *)((q)->element); } Item **_ITMA(q, file, line) Item *q; char *file; int line; { if (!q || q->itemtype != ITEMARRAY) { internal_error(q, file, line); } return (Item **)((q)->element); } List *_LST(q, file, line) Item *q; char *file; int line; { if (!q || q->itemtype != LIST) { internal_error(q, file, line); } return (List *)((q)->element); } void internal_error(q, file, line) Item *q; char *file; int line; { Fprintf(stderr, "Internal error in file \"%s\", line %d\n", file, line); Fprintf(stderr, "The offending item has the structure:\n"); debugitem(q); exit(1); } typedef struct FileStackItem { char* inlinep; char* ctp; int linenum; FILE* fp; char finname[200]; } FileStackItem; static List* filestack; static int getprefix(prefix, s) char* prefix, *s; { char* cp; strcpy(prefix, s); for (cp = prefix + strlen(prefix); cp+1 != prefix; --cp) { if (*cp == '/') { break; } *cp = '\0'; } return (prefix[0] != '\0'); } static FILE* include_open(fname, err) char* fname; int err; { FILE* f = (FILE*)0; FileStackItem* fsi; char* dirs, *colon; char buf2[200]; if(fname[0] == '/') { /* highest precedence is complete filename */ return fopen(fname, "r"); } fsi = (FileStackItem*)(SYM(filestack->prev)); if (getprefix(buf, fsi->finname)) { strcat(buf, fname); f = fopen(buf, "r"); /* first try in directory of last file */ if (f) { strcpy(fname, buf); return f; } if (err) fprintf(stderr, "Couldn't open: %s\n", buf); } f = fopen(fname, "r"); /* next try current working directory */ if (f) { return f; } sprintf(buf, "../%s", fname); /* Next try next dir up. */ if ((f = fopen(buf, "r")) != NULL) return f; if (err) fprintf(stderr, "Couldn't open: %s\n", fname); /* try all the directories in the environment variable */ /* a colon separated list of directories */ dirs = getenv("MODL_INCLUDE"); if (dirs) { strcpy(buf, dirs); dirs = buf; colon = dirs; for (dirs = colon; *dirs; dirs = colon){ for(; *colon; ++colon) { if (*colon == ':') { *colon = '\0'; ++colon; break; } } strcpy(buf2, dirs); strcat(buf2, "/"); strcat(buf2, fname); f = fopen(buf2, "r"); if (f) { strcpy(fname, buf2); return f; } if (err) fprintf(stderr, "Couldn't open: %s\n", buf2); } } return f; } void include_file(q) Item* q; { char fname[200]; FileStackItem* fsi; if (!filestack) { filestack = newlist(); } strcpy(fname, STR(q) + 1); fname[strlen(fname)-1] = '\0'; fsi = (FileStackItem*)emalloc(sizeof(FileStackItem)); lappendsym(filestack, (Symbol*)fsi); fsi->inlinep = inlinep; fsi->ctp = ctp; fsi->linenum = linenum; fsi->fp = fin; strcpy(fsi->finname, finname); if ((fin = include_open(fname, 0)) == (FILE*)0) { include_open(fname, 1); diag("Couldn't open ", fname); } fprintf(stderr, "INCLUDEing %s\n", fname); strcpy(finname, fname); ctp = (char*)0; linenum = 0; } void pop_file_stack() { FileStackItem* fsi; fsi = (FileStackItem*)(SYM(filestack->prev)); delete(filestack->prev); linenum = fsi->linenum; inlinep = fsi->inlinep; fclose(fin); fin = fsi->fp; strcpy(finname, fsi->finname); free((char*)fsi); } static int file_stack_empty() { if (!filestack) { return 1; } return (filestack->next == filestack); } /* io.c,v * Revision 1.2 1997/11/24 16:19:09 hines * modlunit port to MAC (not complete) * * Revision 1.1.1.1 1994/10/12 17:22:48 hines * NEURON 3.0 distribution * * Revision 1.7 1994/09/20 14:43:18 hines * port to dec alpha * * Revision 1.6 1994/05/23 17:56:02 hines * error in handling MODL_INCLUDE when no file exists * * Revision 1.5 1994/05/18 18:08:13 hines * INCLUDE "file" * tries originalpath/file ./file MODL_INCLUDEpaths/file * * Revision 1.4 1993/02/01 15:15:45 hines * static functions should be declared before use * * Revision 1.3 92/02/17 12:30:55 hines * constant states with a compartment size didn't have space allocated * to store the compartment size. * * Revision 1.2 91/01/07 14:17:06 hines * in kinunit, wrong itemsubtype. Fix lint messages * * Revision 1.1 90/11/13 16:10:17 hines * Initial revision * */ neuron-7.5/src/modlunit/kinunit.c000077500000000000000000000074041323325274500171600ustar00rootroot00000000000000#include <../../nmodlconf.h> #include "model.h" #include "symbol.h" #include "units.h" #include "parse1.h" extern char *indepunits; static List *reactnames; static void set_flux_units(); static void react_unit_err(); void kinunits(type, pass) Item *type; int pass; { struct unit ux1, ux2, ur1, ur2, uflux; Item *q; char *s; if (type->itemsubtype == REACT1) { ucopypop(&ux2); } ucopypop(&ux1); if (type->itemsubtype == REACT1) { ucopypop(&ur2); } ucopypop(&ur1); if (pass == 0) { return; } /* case reaction with no numbers */ /* should check that all states have same units */ Unit_push((char *)0); /* this will go to any units */ ITERATE(q, reactnames) { unit_push(ITM(q)); s = (char *)(ITMA(SYM(ITM(q))->info)[6]); if (s) { Unit_push(s); unit_mul(); } if (unit_diff()) { Fprintf(stderr, "REACTION quantity units for %s is: %s\n", SYM(ITM(q))->name, unit_str()); unit_pop(); Fprintf(stderr, "but the quantity units of the first term is: %s\n", unit_str()); diag("Inconsistent material quantity units\n", "Need a correct COMPARTMENT statement"); } } Unit_push(indepunits); unit_div(); ucopypop(&uflux); set_flux_units(&uflux); if (type->itemsubtype == REACT1 || type->itemsubtype == '-') { ucopypush(&ux1); ucopypush(&uflux); ucopypush(&ur1); unit_div(); if (unit_diff()) { react_unit_err("forward", &uflux); } unit_pop(); } if (type->itemsubtype == REACT1) { ucopypush(&ux2); ucopypush(&uflux); ucopypush(&ur2); unit_div(); if (unit_diff()) { react_unit_err("backward", &uflux); } unit_pop(); } if (type->itemsubtype == LT) { ucopypush(&ux1); ucopypush(&uflux); if (unit_diff()) { Fprintf(stderr, "Flux units are: %s\n", Unit_str(&uflux)); Fprintf(stderr, "But users << flux units are:%s\n", Unit_str(&ux1)); diag("Inconsistent flux units", (char *)0); } unit_pop(); } freelist(&reactnames); } static void set_flux_units(up) struct unit *up; { Symbol *s; Sprintf(buf, "%s", Unit_str(up)); if ((s = lookup("f_flux")) == SYM0) { s = install("f_flux", NAME); } s->u.str = stralloc(buf, (char *)0); if ((s = lookup("b_flux")) == SYM0) { s = install("b_flux", NAME); } s->u.str = stralloc(buf, (char *)0); } static void react_unit_err(s, up) char *s; struct unit *up; { Fprintf(stderr, "Flux units for this reaction: %s\n", Unit_str(up)); ucopypop(up); Fprintf(stderr, "This implies %s rate units: %s\n", s, Unit_str(up)); ucopypop(up); Fprintf(stderr, "But the users %s rate units are: %s\n", s, Unit_str(up)); diag("inconsistent reaction units", (char *)0); } void clear_compartlist() { SYMITER_STAT { ITMA(s->info)[6] = ITEM0; }} } void unit_compartlist(q) Item *q; { char *ustr; ustr = (char *)(ITMA(SYM(q)->info)[6]); if (ustr) { diag(SYM(q)->name, " already in previous COMPARTMENT"); } ITMA(SYM(q)->info)[6] = (Item *) stralloc(unit_str(), (char *)0); } void unit_ldifuslist(q, flag) Item *q; int flag; { char *ustr; unitonflag = flag; ustr = (char *)(ITMA(SYM(q)->info)[6]); if (!ustr) { diag(SYM(q)->name, " not declared in previous COMPARTMENT"); } Unit_push("micron4/ms"); if (!unit_cmp_exact()) { unit_pop(); diag(unit_str(), " : relevant area * diffusion constant must\n be micron2 micron2/ms (1-21 m4/s)"); } unit_pop(); Unit_push("micron2"); Unit_push(ustr); if (!unit_cmp_exact()) { diag(ustr, ": With LONGDITUDINAL_DIFFUSION the compartment \ volume\nmust be measured in micron3/micron (1-12 m2)"); } unit_pop(); unit_pop(); unitonflag = 0; } void consreact_push(q) Item* q; { char* ustr; unit_push(q); if (SYM(q)->info) { ustr = (char *)(ITMA(SYM(q)->info)[6]); if (ustr) { Unit_push(ustr); unit_mul(); } } } void ureactadd(q) Item *q; { if (!reactnames) { reactnames = newlist(); } Lappenditem(reactnames, q); } neuron-7.5/src/modlunit/lex.c000066400000000000000000001552511323325274500162700ustar00rootroot00000000000000 #line 3 "lex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 0 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); #if defined(__GNUC__) && __GNUC__ >= 3 __attribute__((__noreturn__)) #endif static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 35 #define YY_END_OF_BUFFER 36 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[92] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 35, 27, 20, 23, 22, 14, 27, 27, 27, 3, 24, 10, 27, 8, 2, 25, 27, 26, 19, 34, 32, 34, 31, 30, 34, 33, 20, 21, 13, 0, 7, 15, 5, 4, 3, 0, 24, 0, 11, 12, 9, 1, 2, 16, 18, 0, 0, 0, 4, 0, 0, 6, 17, 0, 0, 0, 5, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 29, 0 } ; static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 6, 1, 1, 1, 7, 8, 1, 9, 1, 10, 1, 11, 12, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 1, 15, 16, 17, 14, 1, 18, 19, 20, 21, 22, 23, 23, 23, 24, 23, 23, 23, 25, 26, 27, 23, 23, 28, 23, 29, 23, 30, 23, 23, 23, 23, 1, 1, 1, 1, 31, 1, 23, 23, 23, 23, 32, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 33, 34, 35, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst YY_CHAR yy_meta[37] = { 0, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1 } ; static yyconst flex_uint16_t yy_base[97] = { 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 134, 133, 135, 138, 138, 132, 138, 130, 116, 125, 123, 116, 31, 0, 36, 112, 111, 118, 138, 91, 138, 114, 138, 138, 97, 138, 138, 96, 138, 119, 138, 138, 114, 138, 138, 36, 37, 42, 60, 0, 102, 138, 138, 138, 110, 109, 138, 138, 95, 94, 65, 59, 69, 101, 100, 138, 92, 81, 97, 96, 73, 95, 94, 79, 83, 91, 89, 65, 61, 63, 68, 63, 59, 41, 37, 36, 38, 138, 26, 138, 138, 91, 94, 97, 100, 45 } ; static yyconst flex_int16_t yy_def[97] = { 0, 92, 92, 91, 3, 93, 93, 93, 93, 93, 93, 93, 93, 91, 91, 91, 91, 91, 91, 91, 94, 91, 91, 91, 95, 91, 91, 91, 96, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 94, 91, 91, 91, 91, 91, 91, 95, 91, 91, 91, 91, 91, 96, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 0, 91, 91, 91, 91, 91 } ; static yyconst flex_uint16_t yy_nxt[175] = { 0, 15, 16, 17, 18, 19, 20, 21, 15, 15, 15, 15, 22, 23, 24, 25, 26, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 15, 28, 29, 30, 31, 32, 34, 34, 36, 36, 34, 34, 47, 48, 37, 37, 51, 56, 46, 62, 90, 52, 49, 47, 48, 35, 35, 61, 63, 38, 38, 89, 49, 49, 88, 87, 86, 61, 63, 64, 64, 62, 65, 49, 69, 69, 85, 70, 72, 72, 71, 73, 76, 76, 84, 77, 83, 82, 81, 80, 71, 14, 14, 14, 33, 33, 33, 43, 43, 43, 50, 77, 50, 77, 79, 78, 73, 73, 70, 70, 75, 74, 65, 65, 68, 67, 55, 55, 66, 44, 40, 60, 59, 58, 57, 55, 54, 53, 46, 45, 44, 42, 41, 40, 91, 39, 39, 13, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91 } ; static yyconst flex_int16_t yy_chk[175] = { 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 7, 8, 9, 10, 23, 23, 7, 8, 25, 96, 46, 47, 89, 25, 23, 48, 48, 5, 6, 46, 47, 9, 10, 87, 23, 48, 86, 85, 84, 46, 47, 49, 49, 62, 49, 48, 61, 61, 83, 61, 63, 63, 62, 63, 71, 71, 82, 71, 81, 80, 79, 78, 62, 92, 92, 92, 93, 93, 93, 94, 94, 94, 95, 77, 95, 76, 75, 74, 73, 72, 70, 69, 68, 67, 65, 64, 60, 59, 56, 55, 51, 43, 40, 38, 35, 32, 30, 28, 27, 26, 22, 21, 20, 19, 18, 16, 13, 12, 11, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "../../../nrn/src/modlunit/lex.l" #line 2 "../../../nrn/src/modlunit/lex.l" /* /local/src/master/nrn/src/modlunit/lex.l,v 1.3 1999/05/24 18:44:51 hines Exp */ #undef output #undef unput #ifdef FLEX_SCANNER #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ { \ int c = Getc(); \ result = (c==EOF) ? YY_NULL : (buf[0]=c, 1); \ } #else #undef input #endif #include <../../nmodlconf.h> #include "model.h" #include "parse1.h" static char linebuf[512], *cp; int lexcontext; extern int unput(); extern int unGetc(); extern int Getc(); #define debug(arg1,arg2) /*printf("lex:arg1|%s|\n", arg2);*/ #line 564 "lex.c" #define INITIAL 0 #define O 1 #define to_eocom 2 #define to_par 3 #define to_eoverb 4 #define to_eol 5 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy (void ); int yyget_debug (void ); void yyset_debug (int debug_flag ); YY_EXTRA_TYPE yyget_extra (void ); void yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *yyget_in (void ); void yyset_in (FILE * _in_str ); FILE *yyget_out (void ); void yyset_out (FILE * _out_str ); yy_size_t yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); void yyset_lineno (int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif #ifndef YY_NO_UNPUT static void yyunput (int c,char *buf_ptr ); #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } { #line 34 "../../../nrn/src/modlunit/lex.l" #line 789 "lex.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 92 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 138 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 35 "../../../nrn/src/modlunit/lex.l" { /*PRIME possibly high order*/ yylval.qp = putintoken(yytext, PRIME, 0); return PRIME; } YY_BREAK case 2: YY_RULE_SETUP #line 40 "../../../nrn/src/modlunit/lex.l" { /*NAME*/ Symbol *s; yylval.qp = putintoken(yytext, NAME, 0); s = SYM(yylval.qp); switch (s->type) { case TITLE: BEGIN to_eol; cp = linebuf; break; case COMMENT: BEGIN to_eocom; cp = linebuf; break; case VERBATIM: BEGIN to_eoverb; cp = linebuf; break; } return s->type; } YY_BREAK case 3: YY_RULE_SETUP #line 62 "../../../nrn/src/modlunit/lex.l" { /*INTEGER*/ yylval.qp = putintoken(yytext, INTEGER, INTEGER); /* Numbers are not looked for */ return INTEGER; } YY_BREAK case 4: #line 69 "../../../nrn/src/modlunit/lex.l" case 5: #line 70 "../../../nrn/src/modlunit/lex.l" case 6: YY_RULE_SETUP #line 70 "../../../nrn/src/modlunit/lex.l" { /*REAL*/ yylval.qp = putintoken(yytext, REAL, REAL); /* Numbers are not looked for */ return REAL; } YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP #line 75 "../../../nrn/src/modlunit/lex.l" { /* STRING */ yylval.qp = putintoken(yytext, STRING, STRING); return STRING; /* can't quote \" */ } YY_BREAK case 8: YY_RULE_SETUP #line 81 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, GT); return GT;} YY_BREAK case 9: YY_RULE_SETUP #line 82 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, GE); return GE;} YY_BREAK case 10: YY_RULE_SETUP #line 83 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, LT); return LT;} YY_BREAK case 11: YY_RULE_SETUP #line 84 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, LE); return LE;} YY_BREAK case 12: YY_RULE_SETUP #line 85 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, EQ); return EQ;} YY_BREAK case 13: YY_RULE_SETUP #line 86 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, NE); return NE;} YY_BREAK case 14: YY_RULE_SETUP #line 87 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, NOT); return NOT;} YY_BREAK case 15: YY_RULE_SETUP #line 88 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, AND); return AND;} YY_BREAK case 16: YY_RULE_SETUP #line 89 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, OR); return OR;} YY_BREAK case 17: YY_RULE_SETUP #line 91 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, REACT1); return REACT1;} YY_BREAK case 18: YY_RULE_SETUP #line 93 "../../../nrn/src/modlunit/lex.l" { /* syntactic sugar for equation addition */ yylval.qp = putintoken(yytext, 0, NONLIN1); if (lexcontext == NONLINEAR) return NONLIN1; if (lexcontext == LINEAR){yylval.qp->itemsubtype = LINEAR; return LIN1;} diag("equation addition can't occur in this type of block", (char *)0); } YY_BREAK case 19: YY_RULE_SETUP #line 100 "../../../nrn/src/modlunit/lex.l" { /* syntactic sugar for equations */ yylval.qp = putintoken(yytext, 0, 0); if (lexcontext == PARTIAL) { yylval.qp->itemsubtype = PARTEQN; return PARTEQN; }else if (lexcontext == KINETIC) { yylval.qp->itemsubtype = REACTION; return REACTION; }else{ yylval.qp->itemsubtype = yytext[0]; return yytext[0]; } } YY_BREAK case 20: YY_RULE_SETUP #line 114 "../../../nrn/src/modlunit/lex.l" { putintoken(yytext, SPACE, SPACE);} YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 116 "../../../nrn/src/modlunit/lex.l" { putintoken("\n", NEWLINE, 0);} YY_BREAK case 22: YY_RULE_SETUP #line 117 "../../../nrn/src/modlunit/lex.l" { putintoken("\n", NEWLINE, 0);} YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP #line 118 "../../../nrn/src/modlunit/lex.l" { putintoken(yytext, NEWLINE, 0);} YY_BREAK case 24: YY_RULE_SETUP #line 120 "../../../nrn/src/modlunit/lex.l" { putintoken(yytext, STRING, STUFF);} YY_BREAK case 25: YY_RULE_SETUP #line 122 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken("{", 0, '{'); return yytext[0]; } YY_BREAK case 26: YY_RULE_SETUP #line 123 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken("}", 0, '}'); return yytext[0]; } YY_BREAK case 27: YY_RULE_SETUP #line 124 "../../../nrn/src/modlunit/lex.l" { yylval.qp = putintoken(yytext, 0, yytext[0]); return yytext[0]; } YY_BREAK case 28: YY_RULE_SETUP #line 126 "../../../nrn/src/modlunit/lex.l" { if (cp != linebuf) { *cp = '\0'; putintoken(linebuf, STRING, STUFF); } cp = linebuf; BEGIN O; yylval.qp = putintoken(yytext, NAME, 0); return SYM(yylval.qp)->type; } YY_BREAK case 29: YY_RULE_SETUP #line 137 "../../../nrn/src/modlunit/lex.l" { if (cp != linebuf) { *cp = '\0'; putintoken(linebuf, STRING, STUFF); } cp = linebuf; BEGIN O; yylval.qp = putintoken(yytext, NAME, 0); return SYM(yylval.qp)->type; } YY_BREAK case 30: YY_RULE_SETUP #line 148 "../../../nrn/src/modlunit/lex.l" { *cp = '\0'; yylval.qp = putintoken(linebuf, STRING, UNITS); cp = linebuf; unput(')'); BEGIN O; return UNITS; } YY_BREAK case 31: /* rule 31 can match eol */ YY_RULE_SETUP #line 157 "../../../nrn/src/modlunit/lex.l" { diag("Units not terminated by ')'", (char *)0); } YY_BREAK case 32: /* rule 32 can match eol */ YY_RULE_SETUP #line 161 "../../../nrn/src/modlunit/lex.l" { if (cp != linebuf) { *cp = '\0'; putintoken(linebuf, STRING, STUFF); } cp = linebuf; putintoken(yytext, NEWLINE, 0); } YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP #line 170 "../../../nrn/src/modlunit/lex.l" { *cp = '\0'; yylval.qp = putintoken(linebuf, STRING, TO_EOL); cp = linebuf; BEGIN O; putintoken(yytext, NEWLINE, 0); return TO_EOL; } YY_BREAK case 34: YY_RULE_SETUP #line 179 "../../../nrn/src/modlunit/lex.l" { *cp++ = yytext[0];} YY_BREAK case 35: YY_RULE_SETUP #line 181 "../../../nrn/src/modlunit/lex.l" ECHO; YY_BREAK #line 1112 "lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(O): case YY_STATE_EOF(to_eocom): case YY_STATE_EOF(to_par): case YY_STATE_EOF(to_eoverb): case YY_STATE_EOF(to_eol): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); yy_size_t number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { yy_state_type yy_current_state; char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 92 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { int yy_is_jam; char *yy_cp = (yy_c_buf_p); YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 92 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 91); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT static void yyunput (int c, char * yy_bp ) { char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ yy_size_t number_to_move = (yy_n_chars) + 2; char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ yy_size_t yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param _line_number line number * */ void yyset_lineno (int _line_number ) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str ) { yyin = _in_str ; } void yyset_out (FILE * _out_str ) { yyout = _out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 181 "../../../nrn/src/modlunit/lex.l" void lex_start() { BEGIN O; } void lex_units() { cp = linebuf; BEGIN to_par; } #ifndef FLEX_SCANNER int input() { int c; c = Getc(); if (c == EOF) { c = 0; } return c; } #endif int unput(c) int c; { return unGetc(c); } int output(c) int c; { #if LINT IGNORE(c); #endif diag("internal error: ", "called output"); return 0; } int yywrap() { if (YYSTATE == to_eoverb) { diag("End of file while in VERBATIM mode.\n", "Missing ENDVERBATIM?"); } if (YYSTATE == to_eocom) { diag("End of file while in COMMENT mode.\n", "Missing ENDCOMMENT?"); } return 1; } /* lex.l,v * Revision 1.3 1999/05/24 18:44:51 hines * modlunit lex can be translated by flex * * Revision 1.2 1997/11/05 17:58:02 hines * unix, mac, dos new lines readable on any machine * * Revision 1.1.1.1 1994/10/12 17:22:52 hines * NEURON 3.0 distribution * * Revision 1.3 1994/03/17 15:21:11 hines * ? token same as comment : token * * Revision 1.2 1990/11/13 16:14:06 hines * prototype units checking * * Revision 1.1 90/07/02 09:01:47 hines * Initial revision * */ neuron-7.5/src/modlunit/lex.l000077500000000000000000000121241323325274500162730ustar00rootroot00000000000000%{ /* /local/src/master/nrn/src/modlunit/lex.l,v 1.3 1999/05/24 18:44:51 hines Exp */ #undef output #undef unput #ifdef FLEX_SCANNER #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ { \ int c = Getc(); \ result = (c==EOF) ? YY_NULL : (buf[0]=c, 1); \ } #else #undef input #endif #include <../../nmodlconf.h> #include "model.h" #include "parse1.h" static char linebuf[512], *cp; int lexcontext; extern int unput(); extern int unGetc(); extern int Getc(); #define debug(arg1,arg2) /*printf("lex:arg1|%s|\n", arg2);*/ %} D [0-9] E [Ee][-+]?{D}+ %START O to_eocom to_par to_eoverb to_eol %% [a-zA-Z][a-zA-Z0-9_]*'+ { /*PRIME possibly high order*/ yylval.qp = putintoken(yytext, PRIME, 0); return PRIME; } [a-zA-Z][a-zA-Z0-9_]* { /*NAME*/ Symbol *s; yylval.qp = putintoken(yytext, NAME, 0); s = SYM(yylval.qp); switch (s->type) { case TITLE: BEGIN to_eol; cp = linebuf; break; case COMMENT: BEGIN to_eocom; cp = linebuf; break; case VERBATIM: BEGIN to_eoverb; cp = linebuf; break; } return s->type; } {D}+ { /*INTEGER*/ yylval.qp = putintoken(yytext, INTEGER, INTEGER); /* Numbers are not looked for */ return INTEGER; } {D}+"."{D}*({E})? | {D}*"."{D}+({E})? | {D}+{E} { /*REAL*/ yylval.qp = putintoken(yytext, REAL, REAL); /* Numbers are not looked for */ return REAL; } \"[^\"]*\" { /* STRING */ yylval.qp = putintoken(yytext, STRING, STRING); return STRING; /* can't quote \" */ } \> { yylval.qp = putintoken(yytext, 0, GT); return GT;} \>= { yylval.qp = putintoken(yytext, 0, GE); return GE;} \< { yylval.qp = putintoken(yytext, 0, LT); return LT;} \<= { yylval.qp = putintoken(yytext, 0, LE); return LE;} == { yylval.qp = putintoken(yytext, 0, EQ); return EQ;} != { yylval.qp = putintoken(yytext, 0, NE); return NE;} ! { yylval.qp = putintoken(yytext, 0, NOT); return NOT;} \&\& { yylval.qp = putintoken(yytext, 0, AND); return AND;} \|\| { yylval.qp = putintoken(yytext, 0, OR); return OR;} \<-\> { yylval.qp = putintoken(yytext, 0, REACT1); return REACT1;} \~\+ { /* syntactic sugar for equation addition */ yylval.qp = putintoken(yytext, 0, NONLIN1); if (lexcontext == NONLINEAR) return NONLIN1; if (lexcontext == LINEAR){yylval.qp->itemsubtype = LINEAR; return LIN1;} diag("equation addition can't occur in this type of block", (char *)0); } \~ { /* syntactic sugar for equations */ yylval.qp = putintoken(yytext, 0, 0); if (lexcontext == PARTIAL) { yylval.qp->itemsubtype = PARTEQN; return PARTEQN; }else if (lexcontext == KINETIC) { yylval.qp->itemsubtype = REACTION; return REACTION; }else{ yylval.qp->itemsubtype = yytext[0]; return yytext[0]; } } [ \t]+ { putintoken(yytext, SPACE, SPACE);} \r\n { putintoken("\n", NEWLINE, 0);} \r { putintoken("\n", NEWLINE, 0);} \n { putintoken(yytext, NEWLINE, 0);} [:\?].* { putintoken(yytext, STRING, STUFF);} \{ { yylval.qp = putintoken("{", 0, '{'); return yytext[0]; } \} { yylval.qp = putintoken("}", 0, '}'); return yytext[0]; } . { yylval.qp = putintoken(yytext, 0, yytext[0]); return yytext[0]; } ENDCOMMENT { if (cp != linebuf) { *cp = '\0'; putintoken(linebuf, STRING, STUFF); } cp = linebuf; BEGIN O; yylval.qp = putintoken(yytext, NAME, 0); return SYM(yylval.qp)->type; } ENDVERBATIM { if (cp != linebuf) { *cp = '\0'; putintoken(linebuf, STRING, STUFF); } cp = linebuf; BEGIN O; yylval.qp = putintoken(yytext, NAME, 0); return SYM(yylval.qp)->type; } \) { *cp = '\0'; yylval.qp = putintoken(linebuf, STRING, UNITS); cp = linebuf; unput(')'); BEGIN O; return UNITS; } \n { diag("Units not terminated by ')'", (char *)0); } \n { if (cp != linebuf) { *cp = '\0'; putintoken(linebuf, STRING, STUFF); } cp = linebuf; putintoken(yytext, NEWLINE, 0); } \n { *cp = '\0'; yylval.qp = putintoken(linebuf, STRING, TO_EOL); cp = linebuf; BEGIN O; putintoken(yytext, NEWLINE, 0); return TO_EOL; } . { *cp++ = yytext[0];} %% void lex_start() { BEGIN O; } void lex_units() { cp = linebuf; BEGIN to_par; } #ifndef FLEX_SCANNER int input() { int c; c = Getc(); if (c == EOF) { c = 0; } return c; } #endif int unput(c) int c; { return unGetc(c); } int output(c) int c; { #if LINT IGNORE(c); #endif diag("internal error: ", "called output"); return 0; } int yywrap() { if (YYSTATE == to_eoverb) { diag("End of file while in VERBATIM mode.\n", "Missing ENDVERBATIM?"); } if (YYSTATE == to_eocom) { diag("End of file while in COMMENT mode.\n", "Missing ENDCOMMENT?"); } return 1; } /* lex.l,v * Revision 1.3 1999/05/24 18:44:51 hines * modlunit lex can be translated by flex * * Revision 1.2 1997/11/05 17:58:02 hines * unix, mac, dos new lines readable on any machine * * Revision 1.1.1.1 1994/10/12 17:22:52 hines * NEURON 3.0 distribution * * Revision 1.3 1994/03/17 15:21:11 hines * ? token same as comment : token * * Revision 1.2 1990/11/13 16:14:06 hines * prototype units checking * * Revision 1.1 90/07/02 09:01:47 hines * Initial revision * */ neuron-7.5/src/modlunit/list.c000077500000000000000000000167671323325274500164660ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/list.c,v 1.3 1997/11/24 16:19:10 hines Exp */ /* The following routines support the concept of a list. That is, one can insert at the head of a list or append to the tail of a list with linsert() and lappend(). In addition, one can insert an item before a known item and it will be placed in the proper list. Items point to strings, symbols, etc. Note that more than one item in the same or several lists can point to the same string, symbol. Finally, knowing an item, one can determine the preceding and following items with next() and prev(). Deletion, replacement and moving blocks of items is also supported. */ /* For model, makelist and append have been added */ /* Implementation The list is a doubly linked list. A special item with element 0 is always at the tail of the list and is denoted as the List pointer itself. list->next point to the first item in the list and list->prev points to the last item in the list. i.e. the list is circular Note that in an empty list next and prev points to itself. It is intended that this implementation be hidden from the user via the following function calls. */ #include #include "model.h" #include "parse1.h" #define DEBUG 0 #if DEBUG static int debugtoken=1; #else static int debugtoken=0; #endif static Item * newitem() { return (Item *)emalloc(sizeof(Item)); } List * newlist() { Item *i; i = newitem(); i->prev = i; i->next = i; i->element = (void *)0; i->itemtype = 0; return (List *)i; } void freelist(plist) /*free the list but not the elements*/ List **plist; { Item *i1, *i2; if (!(*plist)) { return; } for (i1 = (*plist)->next; i1 != *plist; i1 = i2) { i2 = i1->next; Free(i1); } Free(*plist); *plist = (List *)0; } static Item * linkitem(item) Item *item; { Item *i; i = newitem(); i->prev = item->prev; i->next = item; item->prev = i; i->prev->next = i; return i; } Item *car(list) List *list; { Item *q = (Item *)list; assert(q && q->itemtype == 0); return next(q); } Item *next(item) Item *item; { assert(item->next->itemtype); /* never return the list item */ return item->next; } Item *prev(item) Item *item; { assert(item->prev->itemtype); /* never return the list item */ return item->prev; } Item * insertstr(item, str) /* insert a copy of the string before item */ /* a copy is made because strings are often assembled into a reusable buffer*/ Item *item; char *str; { Item *i; i = linkitem(item); i->element = (void *)stralloc(str, (char *)0); i->itemtype = STRING; return i; } Item * insertitem(item, itm) /* insert a item pointer before item */ Item *item, *itm; { Item *i; i = linkitem(item); i->element = (void *)itm; i->itemtype = ITEM; return i; } Item * insertsym(item, sym) /* insert a symbol before item */ /* a copy is not made because we need the same symbol in different lists */ Item *item; Symbol *sym; { Item *i; i = linkitem(item); i->element = (void *)sym; i->itemtype = SYMBOL; return i; } Item * linsertstr(list, str) List *list; char *str; { return insertstr(list->next, str); } Item * lappendstr(list, str) List *list; char *str; { return insertstr(list, str); } Item * linsertsym(list, sym) List *list; Symbol *sym; { return insertsym(list->next, sym); } Item * lappendsym(list, sym) List *list; Symbol *sym; { return insertsym(list, sym); } Item * lappenditem(list, item) List *list; Item *item; { return insertitem(list, item); } void delete(item) Item *item; { assert(item->itemtype); /* can't delete list */ item->next->prev = item->prev; item->prev->next = item->next; Free(item); } static long mallocsize=0; static long mallocpieces=0; #if LINT double *emalloc(n) unsigned n; { /* check return from malloc */ assert(0); return (double *)0; } #else char *emalloc(n) unsigned n; { /* check return from malloc */ char *p; p = malloc(n); if (p == (char *)0) { memory_usage(); diag("out of memory", (char *)0); } mallocsize += n; mallocpieces++; return p; } #endif /*LINT*/ void memory_usage() { Fprintf(stderr, "malloc'ed a total of %ld bytes in %ld pieces\n", mallocsize, mallocpieces); } char *stralloc(buf, rel) char *buf,*rel; { /* allocate space, copy buf, and free rel */ char *s; s = (char *)emalloc((unsigned)(strlen(buf) + 1)); Strcpy(s, buf); if (rel) { Free(rel); } return s; } void deltokens(q1, q2) /* delete tokens from q1 to q2 */ Item *q1, *q2; { /* It is a serious error if q2 precedes q1 */ Item *q; for (q = q1; q != q2;) { q = q->next; delete(q->prev); } delete(q2); } void move(q1, q2, q3) /* move q1 to q2 and insert before q3*/ Item *q1, *q2, *q3; { /* it is a serious error if q2 precedes q1 */ assert(q1 && q2); assert(q1->itemtype && q2->itemtype); q1->prev->next = q2->next; /* remove from first list */ q2->next->prev = q1->prev; q1->prev = q3->prev; q3->prev->next = q1; q3->prev = q2; q2->next = q3; } void movelist(q1, q2, s) /* move q1 to q2 from old list to end of list s*/ Item *q1, *q2; List *s; { move(q1, q2, s); } void replacstr(q, s) Item *q; char *s; { q->itemtype = STRING; q->element = (void *)stralloc(s, (char *)0); } Item * putintoken(s, type, toktype) char *s; short type, toktype; { /* make sure a symbol exists for s and append to intoken list */ Symbol *sym; Item *q; static int linenum=0; if (debugtoken) { Fprintf(stderr, "%s|", s); } if (s == (char *)0) diag("internal error"," in putintoken"); switch (type) { case STRING: case REAL: case INTEGER: q = insertstr(intoken, s); q->itemsubtype = toktype; return q; case NEWLINE: q = insertsym(intoken, SYM0); q->itemtype = NEWLINE; q->itemsubtype = ++linenum; return q; default: if ((sym = lookup(s)) == SYM0) { sym = install(s, type); } break; } q = insertsym(intoken, sym); if (toktype) { q->itemsubtype = toktype; }else{ q->itemsubtype = sym->type; } return q; } #if MAC || defined(__TURBOC__) #undef HAVE_STDARG_H #define HAVE_STDARG_H 1 #endif #if HAVE_STDARG_H #include #else #include #endif /* make a list of item pointers: notice that the items themselves remain in whatever list they happen to be in. */ /* usage is q = makelist(n, q1, q2,..., qn); and q is of type LIST and is not in any list */ Item * #if HAVE_STDARG_H makelist(int narg, ...) { #else makelist(va_alist) va_dcl { int narg; #endif va_list ap; int i; List *l; Item *ql,*q; l = newlist(); ql = newitem(); ql->itemtype = LIST; ql->element = (void *)l; #if HAVE_STDARG_H va_start (ap, narg); #else va_start (ap); narg = va_arg(ap, int); #endif for (i=0; iitemtype == LIST); IGNORE(insertitem((Item *)(LST(ql)), q)); } Item * prepend(ql, q) Item *ql, *q; { List *l; assert(ql->itemtype == LIST); l = LST(ql); IGNORE(insertitem((Item *)l->next, q)); return ql; } /* An item which is an array of item pointers. Note where the size of the array is held. */ Item * #if HAVE_STDARG_H itemarray(int narg, ...) { #else itemarray(va_alist) va_dcl { int narg; #endif va_list ap; int i; Item *ql,*q, **qa; ql = newitem(); #if HAVE_STDARG_H va_start (ap, narg); #else va_start (ap); narg = va_arg(ap, int); #endif ql->itemtype = ITEMARRAY; qa = (Item **)emalloc((unsigned)(narg + 1)*sizeof(Item *)); qa++; ql->element = (void *)qa; for (i=0; i #include #include #include #pragma once off #define SYSV 1 #define MAC 1 #define NRNUNIT 1 neuron-7.5/src/modlunit/model.c000077500000000000000000000154441323325274500166020ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/model.c,v 1.6 1998/07/12 13:19:02 hines Exp */ /* * int main(int argc, char *argv[]) --- returns 0 if translation is * successful. Diag will exit with 1 if error. * * ---The overall strategy of the translation consists of three phases. * * 1) read in the whole file as a sequence of tokens, building a parse tree. * The entire file can be printed exactly by printing the intoken list. No * translation is done here but the symbol table is constructed. * 2) Manipulate the blocks. * 3) Output the lists. * * void openfiles(int argc, char *argv[]) parse the argument list, and open * files. Print usage message and exit if no argument * */ /* * In order to interface this process with merge, a second argument is * allowed which gives the complete input filename. The first argument * still gives the prefix of the .c and .var files. */ #include "model.h" #include "parse1.h" extern int yyparse(); FILE * fin, /* input file descriptor for filename.mod */ /* or file2 from the second argument */ *fparout, /* output file descriptor for filename.var */ *fcout; /* output file descriptor for filename.c */ char finname[200]; /* filename.mod or second argument */ Item *parseroot; Item *title; #if LINT char *clint; int ilint; Item *qlint; #endif static char pgm_name[] = "model"; extern char *RCS_version; extern char *RCS_date; static void openfiles(); static void debug_item(); #if MAC #include #endif int main(argc, argv) int argc; char *argv[]; { /* * arg 1 is the prefix to the input file and output .c and .par * files * We first look for a .mrg file and then a .mod file */ #if MAC SIOUXSettings.asktosaveonclose = false; #endif Fprintf(stderr, "%s %s %s\n", pgm_name, RCS_version, RCS_date); init(); /* keywords into symbol table, initialize * lists, etc. */ unit_init(); nrn_unit_init(); #if MAC mac_cmdline(&argc, &argv); #endif openfiles(argc, argv); /* .mrg else .mod, .var, .c */ Fprintf(stderr, "Checking units of %s\n", finname); lex_start(); /* declare all used variables */ parsepass(1); IGNORE(yyparse()); declare_implied(); /* At this point The input file is in the intoken list */ #if 0 printlist(intoken); debug_item((Item *)intoken, 0, fparout); #endif /* give all names their proper units */ /* all variables used consistently (arrays) */ parsepass(2); yyparse(); /* * NAME's can be used in many cases before they were declared and * no checking up to this point has been done to make sure that * names have been used in only one way. * */ consistency(); /* check unit consistency */ parsepass(3); yyparse(); #if MAC printf("Units consistent in %s\n", finname); SIOUXSettings.autocloseonquit = true; #endif #if 0 parout(); /* print .var file. * Also #defines which used to be in defs.h * are printed into .c file at beginning. */ cout(); /* print .c file */ #endif #if 0 IGNORE(fclose(fparout)); IGNORE(fclose(fcout)); memory_usage(); #endif #if LINT { /* for lex */ extern int yytchar, yylineno; extern FILE *yyin; IGNORE(yyin); IGNORE(yytchar); IGNORE(yylineno); IGNORE(yyinput()); yyunput(ilint); yyoutput(ilint); } #endif return 0; } static void openfiles(argc, argv) int argc; char *argv[]; { char *cp, modprefix[200]; if (argc > 1) { sprintf(modprefix, "%s", argv[1]); cp = strstr(modprefix, ".mod"); if (cp) { *cp = '\0'; } } if (argc == 2) { Sprintf(finname, "%s.mrg", modprefix); } else if (argc == 3) { Sprintf(finname, "%s", argv[2]); } else { diag("Usage:", "modl prefixto.mod [inputfile]"); } if ((fin = fopen(finname, "r")) == (FILE *) 0) { Sprintf(finname, "%s.mod", modprefix); if ((fin = fopen(finname, "r")) == (FILE *) 0) { diag("Can't open input file: ", finname); } } } void printlist(list) List *list; { Item *q; ITERATE(q, list) { printitem(q, fcout); } } void printitems(q1, q2) Item *q1, *q2; { Item *q; for (q = q1; q->prev != q2; q = q->next) { printitem(q, stderr); } } void printitem(q, fp) Item *q; FILE *fp; { switch (q->itemtype) { case SYMBOL: Fprintf(fp, "%s", SYM(q)->name); break; case STRING: Fprintf(fp, "%s", STR(q)); break; case NEWLINE: Fprintf(fp, "\n"); break; default: Fprintf(stderr, "\nq->itemtype = %d\n", q->itemtype); diag("printlist handles only a few types of items", (char *)0); break; } fflush(fp); } void debugitem(q) Item *q; { debug_item(q, 0, stderr); } static void debug_item(q, indent, file) Item *q; int indent; FILE *file; { int i; List *list; Item *q1; for (i=0; iitemtype) { case SYMBOL: Fprintf(file, "SYMBOL |%s| %p\n", SYM(q)->name, SYM(q)); break; case STRING: Fprintf(file, "STRING |%s|\n", STR(q)); break; case LIST: Fprintf(file, "LIST\n"); list = LST(q); ITERATE(q1, list) { debug_item(q1, indent+2, file); } break; case 0: list = (List *)q; Fprintf(file, "HEAD/TAIL of list\n"); ITERATE(q1, list) { debug_item(q1, indent, file); } break; case ITEM: Fprintf(file, "ITEM\n"); debug_item(ITM(q), indent+2, file); break; case ITEMARRAY: {Item **qa; int i; long n; qa = ITMA(q); n = (size_t)qa[-1]; Fprintf(file, "ITEMARRAY %ld\n", n); for (i=0; iitemsubtype); break; default: Fprintf(stderr, "\nq->itemtype = %d\n", q->itemtype); diag("unknown itemtype", (char *)0); break; } fflush(file); } /* model.c,v * Revision 1.6 1998/07/12 13:19:02 hines * error when no args to modelunit fixed * * Revision 1.5 1997/12/01 14:51:39 hines * mac port to codewarrior pro2 more complete * * Revision 1.4 1997/11/28 14:57:52 hines * more changes for port to mac of modlunit * * Revision 1.3 1997/11/24 16:19:12 hines * modlunit port to MAC (not complete) * * Revision 1.2 1997/10/20 14:58:07 hines * modlunit file.mod accepted (ie suffix allowed) * * Revision 1.1.1.1 1994/10/12 17:22:49 hines * NEURON 3.0 distribution * * Revision 1.6 1994/05/18 18:08:13 hines * INCLUDE "file" * tries originalpath/file ./file MODL_INCLUDEpaths/file * * Revision 1.5 1993/02/01 15:15:48 hines * static functions should be declared before use * * Revision 1.4 91/02/09 16:39:35 hines * special neuron variables checked for correct units. * * Revision 1.3 91/01/07 14:17:10 hines * in kinunit, wrong itemsubtype. Fix lint messages * * Revision 1.2 90/11/16 07:53:34 hines * take out the .c and .var file * * Revision 1.1 90/11/13 16:10:21 hines * Initial revision * */ neuron-7.5/src/modlunit/model.h000077500000000000000000000203101323325274500165730ustar00rootroot00000000000000/* /local/src/master/nrn/src/modlunit/model.h,v 1.2 1997/11/24 16:19:13 hines Exp */ #include #if 1 #if defined(STDC_HEADERS) || defined(__TURBOC__) || defined(SYSV) || defined(VMS) #include #else #include #endif #endif #include typedef struct Item { short itemtype; short itemsubtype; void *element;/* pointer to the actual item */ struct Item *next; struct Item *prev; } Item; #define ITEM0 (Item *)0 typedef Item List; /* list of mixed items */ #define ITERATE(itm,lst) for (itm = (lst)->next; itm != (lst); itm = itm->next) /*- The symbol structure gives info about tokens. Not all tokens need all elements. Eg. the STRING uses only type and name. Much storage could be saved and much greater clarity could be attained if each type had its own sub stucture. Currently many of the structure elements serve very different purposes depending on the type. The following is a list of the current element usage: type token number from parse1.y subtype see definitions below u.i integration method - flag for variable step equation block - function number for generating variables u.str scop variables - max,min,units for .var file used state variable - temporary flag that it is used in an equation equation block - number of state variables used (# unknowns) in parout.c - the numeric order in the .var file. Generated and used in parout.c for the plotlist. usage a token is used as a variable (DEP) or function (FUNC) Another field, EXPLICIT_DECL, is used to determine if a variable appears in the input file or is automatically created, thus helping to organize the .var file. araydim arrays - dimension discdim discrete variable - dimension varnum state variable - during processing of a block containing equations in which simultaneous equations result; column number of state variable in the matrix. level lowest submodel level number for declarations of this symbol. Used for constants ( in explicit_decl()). The default value is 100. name token name */ typedef struct Symbol { short type; long subtype; Item * info; union { int i; char *str; } u; int used; int usage; int araydim; int discdim; int varnum; /* column number of state variable in * equations */ short level; char *name; } Symbol; #define SYM0 (Symbol *)0 /* * this is convenient way to get the element pointer if you know what type * the item is */ #if DEBUG || 1 extern Symbol *_SYM(); extern char *_STR(); extern Item *_ITM(); extern Item **_ITMA(); /* array of item pointers */ extern List *_LST(); #define SYM(q) _SYM(q,__FILE__,__LINE__) #define STR(q) _STR(q,__FILE__,__LINE__) #define ITM(q) _ITM(q,__FILE__,__LINE__) #define ITMA(q) _ITMA(q,__FILE__,__LINE__) #define LST(q) _LST(q,__FILE__,__LINE__) #else #define SYM(q) ((Symbol *)((q)->element)) #define STR(q) ((char *)((q)->element)) #define ITM(q) ((Item *)((q)->element)) #define ITMA(q) ((Item **)((q)->element)) #define LST(q) ((List *)((q)->element)) #endif /* types not defined in parser */ #define SPECIAL 1 /* itemtype of 0 is used by list implementation */ #define SYMBOL 1 #define ITEM 2 #define LIST 3 #define ITEMARRAY 4 /* * An item type, STRING is also used as an item type * An item type, VERBATIM is also used as an item type which is to be * treated the same as a STRING but with no prepended space on output. */ /* subtypes */ #define KEYWORD 01L #define modlunitCONST 02L #define INDEP 04L #define DEP 010L /* also in usage field */ #define STAT 020L #define ARRAY 040L #define FUNCT 0100L /* also in usage field */ #define PROCED 0200L #define NEGATIVE 0400L #define SEMI 01L /* ";" */ #define BEGINBLK 02L /* "{" */ #define ENDBLK 04L /* "}" */ #define DERF 01000L #define LINF 02000L #define NLINF 04000L #define DISCF 010000L #define STEP1 020000L #define PARF 040000L #define EXTDEF 0100000L #define KINF 0200000L #define LOCL 0400000L #define CNVFAC 01000000L #define UFACTOR 02000000L #define EXPLICIT_DECL 01 /* usage field, variable occurs in input file */ #if LINT extern double *emalloc(); /* lint thinks doubles align with anything*/ #else extern char *emalloc(); /* malloc with out of space checking */ #endif extern char *stralloc(), /* copies string to new space */ *inputline(), /* used only by parser to get title line */ *inputtopar(), /* used only by parser to get units */ *decode_units(), *unit_str(), *Gets(); /* used only in io.c to get string from fin. */ extern List #if HAVE_STDARG_H || MAC *makelist(int narg, ...), *itemarray(int narg, ...), /* item ITEMARRAY, array of item pointers */ #else *makelist(), /* item LIST */ *itemarray(), /* item ITEMARRAY, array of item pointers */ #endif *prepend(), *newlist(), /* begins new empty list */ *inputtext(); /* used by parser to get block text from * VERBATIM and COMMENT */ extern Item *putintoken(), /* construct symbol and store input tokens */ *insertstr(), /* before a known Item */ *insertsym(), *linsertstr(), /* prepend to list */ *lappendstr(), /* append to list */ *linsertsym(), *lappendsym(), *lappenditem(), *listtype(), *next_parstok(), *prev_parstok(), *car(), *next(), *prev(); #include "modlunit.h" /* void functions */ extern Symbol *install(), /* Install token in symbol table */ *lookup(), /* lookup name in symbol table */ *ifnew_constinstall(); /* new .var info only if * not already done. */ extern int unitonflag; extern char finname[], /* the input file prefix */ buf[]; /* general purpose temporary buffer */ extern Item *parseroot, *lex_tok; /* intoken pointer for nonzero parse passes */ extern List *intoken, /* Main list of input tokens */ *initfunc, /* see discussion above */ *modelfunc, *termfunc, *procfunc, *initlist, *firstlist, *plotlist, *misc; /* place to stick isolated items */ extern FILE *fin, /* .mod input file descriptor */ *fparout, /* .var file */ *fcout; /* .c file */ extern Symbol *indepsym, /* The model independent variable */ *semi, /* ';'. When seen on output, causes newline */ *beginblk, /* '{'. Used for rudimentary indentation */ *endblk; /* on output. */ /* the following is to get lint to shut up */ #if LINT #undef assert #define assert(arg) {if (arg) ;} /* so fprintf doesn't give lint */ extern char *clint; extern int ilint; extern Item *qlint; #define Sprintf clint = sprintf #define Fprintf ilint = fprintf #define Fclose ilint = fclose #define Fflush ilint = fflush #define Printf ilint = printf #define Strcpy clint = strcpy #define Strcat clint = strcat #define Insertstr qlint = insertstr #define Insertsym qlint = insertsym #define Linsertsym qlint = linsertsym #define Linsertstr qlint = linsertstr #define Lappendsym qlint = lappendsym #define Lappendstr qlint = lappendstr #define Lappenditem qlint = lappenditem #define IGNORE(arg) {if (arg);} #define Free(arg) free((char *)(arg)) #else #define Sprintf sprintf #define Fprintf fprintf #define Fclose fclose #define Fflush fflush #define Printf printf #define Strcpy strcpy #define Strcat strcat #define Insertstr insertstr #define Insertsym insertsym #define Linsertsym linsertsym #define Linsertstr linsertstr #define Lappendsym lappendsym #define Lappendstr lappendstr #define Lappenditem lappenditem #define IGNORE(arg) arg #define Free(arg) free((void *)(arg)) #endif /* model.h,v * Revision 1.2 1997/11/24 16:19:13 hines * modlunit port to MAC (not complete) * * Revision 1.1.1.1 1994/10/12 17:22:45 hines * NEURON 3.0 distribution * * Revision 1.5 1993/11/04 15:52:23 hines * port to solaris2 (no more warnings) * * Revision 1.4 1991/08/13 10:05:08 hines * to work on rs6000 * * Revision 1.3 90/11/20 15:33:05 hines * added 4 varieties of unit factors. They are * name = (real) * name = ((unit) -> (unit)) must be conformable * name = (physical_constant) * name = (physical_constant (unit)) must be conformable * * Revision 1.2 90/11/15 13:01:17 hines * function units and number units work. accepts NEURON block * * Revision 1.1 90/11/13 16:12:00 hines * Initial revision * */ neuron-7.5/src/modlunit/modlunit.h000066400000000000000000000026151323325274500173330ustar00rootroot00000000000000void consistency(); void declare(); void declare_indep(); void define_value(); void declare_array(); void decdim(); void declare_implied(); void install_cfactor(); void init(); void diag(); void internal_error(); void include_file(); void pop_file_stack(); void kinunits(); void clear_compartlist(); void unit_compartlist(); void unit_ldifuslist(); void consreact_push(); void ureactadd(); void freelist(); void delete(); void deltokens(); void lex_start(); void lex_units(); void move(); void movelist(); void memory_usage(); void replacstr(); void append(); void printlist(); void printitems(); void printitem(); void debugitem(); void nrn_unit_init(); void nrn_unit_chk(); void nrn_list(); void nrn_use(); void parsepass(); void parse_restart(); void pushlocal(); void poplocal(); void install_local(); void ifcnvfac(); void unit_exponent(); void unit_cmp(); void print_unit_expr(); void unit_logic(); void unit_push(); void unit_push_args(); void unit_done_args(); void unit_chk_arg(); void func_unit(); void unit_del(); void unit_pop(); void unit_swap(); void unit_mag_mul(); void punit(); void ucopypop(); void ucopypush(); void Unit_push(); void unit_push_num(); void unitcheck(); void install_units(); void check_num(); void unit_mul(); void unit_div(); void Unit_exponent(); void Unit_cmp(); void dimensionless(); void unit_less(); void unit_stk_clean(); void modl_units(); void unit_init(); void symbol_init(); neuron-7.5/src/modlunit/modlunit.mak000077500000000000000000000006441323325274500176570ustar00rootroot00000000000000cc = gcc BIN = /cygdrive/c/nrn/bin BNAME = $(BIN)/modlunit.exe CFLAGS = -DNRNUNIT=1 -DWIN32=1 -I. OBJ = \ parse1.o \ consist.o \ declare.o \ init.o \ io.o \ kinunit.o \ lex.o \ list.o \ model.o \ nrnunit.o \ passn.o \ symbol.o \ units.o \ units1.o \ version.o .c.o: $(cc) -c $(CFLAGS) $*.c $(BNAME): $(OBJ) $(cc) -o $(BNAME) $(OBJ) -lm units.o: units.c $(cc) -c $(CFLAGS) units.c clean: rm *.o neuron-7.5/src/modlunit/nrnunit.c000077500000000000000000000055111323325274500171710ustar00rootroot00000000000000#include <../../nmodlconf.h> #include "model.h" #include "units.h" #include "parse1.h" #define IONCUR 0 #define IONEREV 1 #define IONIN 2 #define IONOUT 3 static int point_process = 0; static List *current, *concen, *potential; static void unit_chk(); static int iontype(); int breakpoint_local_seen_; int conductance_seen_; void nrn_unit_init() { current = newlist(); concen = newlist(); potential = newlist(); } #if NRNUNIT void nrn_unit_chk() { Item *q; unit_chk("v", "millivolt"); unit_chk("t", "ms"); unit_chk("dt", "ms"); unit_chk("celsius", "degC"); unit_chk("diam", "micron"); unit_chk("area", "micron2"); if (breakpoint_local_seen_ == 0 || conductance_seen_ == 0) { ITERATE(q, current) { if (point_process) { unit_chk(SYM(q)->name, "nanoamp"); }else{ unit_chk(SYM(q)->name, "milliamp/cm2"); } } } ITERATE(q, concen) { unit_chk(SYM(q)->name, "milli/liter"); } ITERATE(q, potential) { unit_chk(SYM(q)->name, "millivolt"); } } static void unit_chk(name, unit) char *name, *unit; { Symbol *s; s = lookup(name); if (s) { Unit_push(decode_units(s)); Unit_push(unit); if (!unit_cmp_exact()) { Sprintf(buf, "%s must have the units, %s, instead of %s.\n", name, unit, decode_units(s)); diag(buf, (char *)0); } unit_pop(); unit_pop(); } } void nrn_list(qtype, qlist) Item *qtype, *qlist; { List **plist; Item *q; switch (SYM(qtype)->type) { case NONSPECIFIC: case ELECTRODE_CURRENT: plist = ¤t; break; case SUFFIX: plist = (List **)0; if (strcmp(SYM(qtype)->name, "POINT_PROCESS") == 0) { point_process = 1; } if (strcmp(SYM(qtype)->name, "ARTIFICIAL_CELL") == 0) { point_process = 1; } break; default: plist = (List **)0; break; } if (plist && qlist) { ITERATE(q, qlist) { Lappendsym(*plist, SYM(q)); } } } void nrn_use(qion, qreadlist, qwritelist) Item *qion, *qreadlist, *qwritelist; { int i; List *l; Item *q; Symbol *ion; ion = SYM(qion); for (i=0; i<2; i++) { if (i == 0) { l = (List *)qreadlist; }else{ l = (List *)qwritelist; } if (l) ITERATE(q, l) { switch (iontype(SYM(q)->name, ion->name)) { case IONCUR: Lappendsym(current, SYM(q)); break; case IONEREV: Lappendsym(potential, SYM(q)); break; case IONIN: case IONOUT: Lappendsym(concen, SYM(q)); break; } } } } static int iontype(s1, s2) /* returns index of variable in ion mechanism */ char *s1, *s2; { Sprintf(buf, "i%s", s2); if (strcmp(buf, s1) == 0) { return IONCUR; } Sprintf(buf, "e%s", s2); if (strcmp(buf, s1) == 0) { return IONEREV; } Sprintf(buf, "%si", s2); if (strcmp(buf, s1) == 0) { return IONIN; } Sprintf(buf, "%so", s2); if (strcmp(buf, s1) == 0) { return IONOUT; } Sprintf(buf, "%s is not a valid ionic variable for %s", s1, s2); diag(buf, (char *)0); return -1; } #endif /*NRNUNIT*/ neuron-7.5/src/modlunit/parse1.c000066400000000000000000004262071323325274500166750ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Copy the first part of user declarations. */ #line 1 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:339 */ /* /local/src/master/nrn/src/modlunit/parse1.y,v 1.11 1999/02/27 21:13:50 hines Exp */ #include <../../nmodlconf.h> #include #include "model.h" /* Constructs a parse tree. No translation is done, ie. on exit printing the intoken list will make an exact copy of the input file. All tokens and productions are of Item type and consist of STRING, SYMBOL, and LIST. SPACE and NEWLINE are in the intoken list but are not yacc tokens. All explicitly declared names are given their subtype and a pointer to their declaration. All "used" names are marked with their usage for later error checking. */ extern Symbol *checklocal(); extern int next_intoken(); extern Item *title; extern int declare_level; extern int parse_pass, restart_pass; extern List *solvelist; extern int conductance_seen_; extern int breakpoint_local_seen_; #define IFP(n) if (parse_pass == n) #define IFR(n) if (restart_pass == n) #define P1 IFP(1) #define P2 IFP(2) #define P3 IFP(3) #define R0 IFR(0) #define R1 IFR(1) static int yylex(); static void yyerror(); #if YYBISON #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyssp; --yyvsp; YYERROR #else #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyps; --yypv; YYERROR #endif extern Item *lastok; /* last token accepted by expr */ static int blocktype; static int unitflagsave; /*must turn off units in restartpass0 in kinetic block */ static List* netreceive_arglist; static List* args; extern int lexcontext; #line 121 "parse1.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { VERBATIM = 258, COMMENT = 259, TITLE = 260, CONSTANT = 261, INDEPENDENT = 262, ASSIGNED = 263, STATE = 264, END_VERBATIM = 265, END_COMMENT = 266, UNITS = 267, BREAKPOINT = 268, PARAMETER = 269, INITIAL1 = 270, DERIVATIVE = 271, SOLVE = 272, USING = 273, WITH = 274, STEPPED = 275, DISCRETE = 276, FROM = 277, TO = 278, BY = 279, WHILE = 280, IF = 281, ELSE = 282, START1 = 283, STEP = 284, SENS = 285, SOLVEFOR = 286, PROCEDURE = 287, PARTIAL = 288, DEL = 289, DEL2 = 290, DEFINE1 = 291, IFERROR = 292, DERFUNC = 293, EQUATION = 294, TERMINAL = 295, LINEAR = 296, NONLINEAR = 297, FUNCTION1 = 298, LOCAL = 299, METHOD = 300, LIN1 = 301, NONLIN1 = 302, PUTQ = 303, GETQ = 304, FUNCTION_TABLE = 305, INCLUDE1 = 306, PROTECT = 307, OR = 308, AND = 309, GT = 310, GE = 311, LT = 312, LE = 313, EQ = 314, NE = 315, NOT = 316, NAME = 317, PRIME = 318, REAL = 319, INTEGER = 320, DEFINEDVAR = 321, KINETIC = 322, CONSERVE = 323, REACTION = 324, REACT1 = 325, COMPARTMENT = 326, LONGDIFUS = 327, PARTEQN = 328, STRING = 329, PLOT = 330, VS = 331, LAG = 332, RESET = 333, MATCH = 334, MODEL_LEVEL = 335, SWEEP = 336, FIRST = 337, LAST = 338, SPACE = 339, NEWLINE = 340, TO_EOL = 341, STUFF = 342, UNITBLK = 343, UNITSON = 344, UNITSOFF = 345, TABLE = 346, DEPEND = 347, NEURON = 348, SUFFIX = 349, NONSPECIFIC = 350, READ = 351, WRITE = 352, USEION = 353, VALENCE = 354, GLOBAL = 355, SECTION = 356, RANGE = 357, POINTER = 358, EXTERNAL = 359, BEFORE = 360, AFTER = 361, ELECTRODE_CURRENT = 362, CONSTRUCTOR = 363, DESTRUCTOR = 364, NETRECEIVE = 365, FOR_NETCONS = 366, WATCH = 367, THREADSAFE = 368, CONDUCTANCE = 369, UNARYMINUS = 370 }; #endif /* Tokens. */ #define VERBATIM 258 #define COMMENT 259 #define TITLE 260 #define CONSTANT 261 #define INDEPENDENT 262 #define ASSIGNED 263 #define STATE 264 #define END_VERBATIM 265 #define END_COMMENT 266 #define UNITS 267 #define BREAKPOINT 268 #define PARAMETER 269 #define INITIAL1 270 #define DERIVATIVE 271 #define SOLVE 272 #define USING 273 #define WITH 274 #define STEPPED 275 #define DISCRETE 276 #define FROM 277 #define TO 278 #define BY 279 #define WHILE 280 #define IF 281 #define ELSE 282 #define START1 283 #define STEP 284 #define SENS 285 #define SOLVEFOR 286 #define PROCEDURE 287 #define PARTIAL 288 #define DEL 289 #define DEL2 290 #define DEFINE1 291 #define IFERROR 292 #define DERFUNC 293 #define EQUATION 294 #define TERMINAL 295 #define LINEAR 296 #define NONLINEAR 297 #define FUNCTION1 298 #define LOCAL 299 #define METHOD 300 #define LIN1 301 #define NONLIN1 302 #define PUTQ 303 #define GETQ 304 #define FUNCTION_TABLE 305 #define INCLUDE1 306 #define PROTECT 307 #define OR 308 #define AND 309 #define GT 310 #define GE 311 #define LT 312 #define LE 313 #define EQ 314 #define NE 315 #define NOT 316 #define NAME 317 #define PRIME 318 #define REAL 319 #define INTEGER 320 #define DEFINEDVAR 321 #define KINETIC 322 #define CONSERVE 323 #define REACTION 324 #define REACT1 325 #define COMPARTMENT 326 #define LONGDIFUS 327 #define PARTEQN 328 #define STRING 329 #define PLOT 330 #define VS 331 #define LAG 332 #define RESET 333 #define MATCH 334 #define MODEL_LEVEL 335 #define SWEEP 336 #define FIRST 337 #define LAST 338 #define SPACE 339 #define NEWLINE 340 #define TO_EOL 341 #define STUFF 342 #define UNITBLK 343 #define UNITSON 344 #define UNITSOFF 345 #define TABLE 346 #define DEPEND 347 #define NEURON 348 #define SUFFIX 349 #define NONSPECIFIC 350 #define READ 351 #define WRITE 352 #define USEION 353 #define VALENCE 354 #define GLOBAL 355 #define SECTION 356 #define RANGE 357 #define POINTER 358 #define EXTERNAL 359 #define BEFORE 360 #define AFTER 361 #define ELECTRODE_CURRENT 362 #define CONSTRUCTOR 363 #define DESTRUCTOR 364 #define NETRECEIVE 365 #define FOR_NETCONS 366 #define WATCH 367 #define THREADSAFE 368 #define CONDUCTANCE 369 #define UNARYMINUS 370 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 56 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:355 */ Item *qp; #line 395 "parse1.c" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ /* Copy the second part of user declarations. */ #line 412 "parse1.c" /* yacc.c:358 */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE # if (defined __GNUC__ \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C # define YY_ATTRIBUTE(Spec) __attribute__(Spec) # else # define YY_ATTRIBUTE(Spec) /* empty */ # endif #endif #ifndef YY_ATTRIBUTE_PURE # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) #endif #ifndef YY_ATTRIBUTE_UNUSED # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 1256 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 133 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 147 /* YYNRULES -- Number of rules. */ #define YYNRULES 348 /* YYNSTATES -- Number of states. */ #define YYNSTATES 677 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 370 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 131, 2, 2, 55, 56, 61, 60, 67, 62, 2, 63, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 66, 2, 2, 64, 2, 2, 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 57, 2, 58, 65, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 53, 2, 54, 68, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 132 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 119, 119, 120, 123, 124, 126, 126, 126, 126, 126, 126, 126, 127, 128, 130, 133, 135, 137, 139, 142, 145, 147, 149, 152, 153, 153, 156, 156, 156, 156, 156, 157, 157, 157, 159, 160, 163, 164, 166, 171, 173, 175, 178, 179, 181, 181, 185, 186, 189, 190, 192, 195, 196, 198, 201, 202, 204, 205, 207, 209, 212, 212, 214, 215, 217, 219, 222, 225, 226, 228, 232, 234, 236, 238, 241, 242, 245, 247, 249, 251, 253, 257, 258, 260, 263, 264, 267, 268, 270, 271, 274, 275, 278, 281, 282, 283, 285, 287, 289, 291, 302, 313, 319, 319, 321, 321, 323, 323, 325, 325, 327, 327, 329, 329, 331, 331, 333, 333, 335, 335, 337, 337, 339, 339, 341, 341, 343, 343, 345, 345, 347, 347, 352, 352, 353, 353, 355, 357, 359, 361, 362, 363, 364, 366, 368, 371, 373, 376, 377, 379, 381, 385, 386, 390, 391, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 422, 434, 441, 448, 455, 463, 471, 473, 474, 475, 476, 477, 478, 479, 481, 482, 488, 489, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 509, 509, 515, 516, 518, 519, 520, 521, 523, 523, 525, 528, 529, 531, 533, 536, 537, 540, 541, 543, 545, 548, 551, 554, 557, 560, 569, 575, 579, 581, 581, 584, 583, 592, 601, 605, 607, 621, 633, 641, 640, 654, 657, 658, 659, 661, 664, 663, 692, 695, 697, 699, 702, 703, 707, 708, 710, 715, 720, 722, 724, 726, 727, 730, 732, 734, 735, 736, 737, 741, 741, 747, 753, 755, 758, 758, 764, 770, 772, 775, 776, 778, 781, 783, 785, 787, 789, 790, 791, 792, 796, 797, 799, 803, 804, 807, 808, 810, 811, 813, 815, 816, 818, 819, 820, 824, 825, 829, 828, 838, 839, 841, 842, 844, 846, 848, 850, 852, 854, 856, 859, 860, 862, 864, 866, 868, 871, 873, 875, 879, 880, 882 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "VERBATIM", "COMMENT", "TITLE", "CONSTANT", "INDEPENDENT", "ASSIGNED", "STATE", "END_VERBATIM", "END_COMMENT", "UNITS", "BREAKPOINT", "PARAMETER", "INITIAL1", "DERIVATIVE", "SOLVE", "USING", "WITH", "STEPPED", "DISCRETE", "FROM", "TO", "BY", "WHILE", "IF", "ELSE", "START1", "STEP", "SENS", "SOLVEFOR", "PROCEDURE", "PARTIAL", "DEL", "DEL2", "DEFINE1", "IFERROR", "DERFUNC", "EQUATION", "TERMINAL", "LINEAR", "NONLINEAR", "FUNCTION1", "LOCAL", "METHOD", "LIN1", "NONLIN1", "PUTQ", "GETQ", "FUNCTION_TABLE", "INCLUDE1", "PROTECT", "'{'", "'}'", "'('", "')'", "'['", "']'", "'@'", "'+'", "'*'", "'-'", "'/'", "'='", "'^'", "':'", "','", "'~'", "OR", "AND", "GT", "GE", "LT", "LE", "EQ", "NE", "NOT", "NAME", "PRIME", "REAL", "INTEGER", "DEFINEDVAR", "KINETIC", "CONSERVE", "REACTION", "REACT1", "COMPARTMENT", "LONGDIFUS", "PARTEQN", "STRING", "PLOT", "VS", "LAG", "RESET", "MATCH", "MODEL_LEVEL", "SWEEP", "FIRST", "LAST", "SPACE", "NEWLINE", "TO_EOL", "STUFF", "UNITBLK", "UNITSON", "UNITSOFF", "TABLE", "DEPEND", "NEURON", "SUFFIX", "NONSPECIFIC", "READ", "WRITE", "USEION", "VALENCE", "GLOBAL", "SECTION", "RANGE", "POINTER", "EXTERNAL", "BEFORE", "AFTER", "ELECTRODE_CURRENT", "CONSTRUCTOR", "DESTRUCTOR", "NETRECEIVE", "FOR_NETCONS", "WATCH", "THREADSAFE", "CONDUCTANCE", "'%'", "UNARYMINUS", "$accept", "top", "all", "all1", "title", "verbatim", "comment", "unitflag", "include1", "define1", "Name", "declare", "$@1", "declare1", "constblk", "constbody", "constasgn", "units", "Units", "$@2", "limits", "tolerance", "stepblk", "stepbdy", "stepped", "numlist", "name", "number", "NUMBER", "integer", "real", "indepblk", "indepbody", "indepdef", "withby", "depblk", "depbody", "depdef", "opstart", "stateblk", "statbody", "plotdecl", "pvlist", "optindex", "unitblk", "unitbody", "unitdef", "factordef", "proc", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "initblk", "constructblk", "destructblk", "bablk", "stmtlist", "conducthint", "locallist", "locallist1", "locoptarray", "stmtlist1", "stmt", "asgn", "varname", "intexpr", "expr", "funccall", "$@20", "exprlist", "exprlist1", "fromstmt", "$@21", "opinc", "whilestmt", "ifstmt", "optelseif", "optelse", "initstmt", "derivblk", "linblk", "nonlinblk", "discretblk", "partialblk", "pareqn", "firstlast", "funcblk", "$@22", "functbl", "arglist", "arglist1", "procedblk", "netrecblk", "$@23", "watchstmt", "watch1", "fornetcon", "$@24", "solveblk", "ifsolerr", "solvefor", "solvefor1", "eqnblk", "terminalblk", "sens", "conserve", "consreact", "compart", "$@25", "compartlist", "longdifus", "$@26", "ldifuslist", "namelist", "kineticblk", "reaction", "react", "lagstmt", "tablestmt", "tablst", "dependlst", "queuestmt", "matchblk", "matchlist", "match", "matchname", "neuronblk", "$@27", "nrnstmt", "optnamelist", "nrnuse", "nrnlist", "valence", YY_NULLPTR }; #endif # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 123, 125, 40, 41, 91, 93, 64, 43, 42, 45, 47, 61, 94, 58, 44, 126, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370 }; # endif #define YYPACT_NINF -547 #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-547))) #define YYTABLE_NINF -323 #define yytable_value_is_error(Yytable_value) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { 831, -547, 39, 888, -547, 43, 90, -15, 93, 121, 134, 235, 251, 254, 59, 76, 112, 85, 124, 284, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 238, 250, 283, 272, 308, 310, 317, 370, 296, 392, 434, 334, 338, 444, 398, 367, 376, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 152, -547, 449, 442, -547, -547, -547, -547, -547, 453, -22, -547, -547, 459, 472, -547, 448, -547, 472, -547, 450, -547, 457, -547, 466, -547, 475, -547, 478, -547, 28, -547, 472, -547, 480, -547, 472, -547, 472, -547, 481, -547, 483, -547, 311, 311, 181, 13, 27, 135, 192, 22, -547, -547, -547, 152, -547, 484, 152, -547, 300, 300, 243, 74, -547, 510, -547, 472, -547, 496, 496, 508, 509, 516, -547, 300, -547, 472, -547, -547, 472, 496, 472, 472, 472, 472, -547, -547, -547, -547, 4, -547, -547, -547, 550, 98, -547, -547, -547, 197, -547, -547, -547, -547, -547, 518, -547, 515, 449, 525, 453, 453, -547, -547, -547, -547, 520, 14, -547, -547, 61, -547, 605, -547, 117, 472, 507, 472, 300, 300, 300, 530, 531, 521, -547, -547, 472, -547, -547, -547, -547, 152, 289, 523, -547, 289, -547, 289, 289, 152, 530, 289, -547, -547, -547, -547, -547, 577, 203, -547, 530, -547, -547, 519, 149, 522, 149, 149, 149, 149, 149, 149, 532, -547, 700, -547, 472, 196, 211, 538, 544, 214, 300, 300, 223, -547, 78, 287, 17, 53, 335, 452, 10, 142, -547, 548, 532, 62, 89, 532, -547, -547, -547, 562, -547, -547, -547, -547, 557, -547, -547, -547, -547, -547, -547, 556, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 546, -547, 569, 570, 572, -547, -547, 300, -547, 571, 355, -547, 530, -547, -547, 289, -547, 610, 611, -547, 579, 565, 118, 573, 583, -547, 47, -547, 530, -547, -547, -547, -547, 574, 260, 574, 574, 574, 574, 574, 574, -547, 575, -547, -547, -547, -547, 1, -547, 580, 78, 78, -547, 575, -547, -547, 584, -547, -547, 78, 78, 78, 530, -547, 1146, -547, -547, 152, -547, 401, -547, 302, -547, 401, -547, 213, 268, 739, 332, 955, -547, 567, 589, 586, -547, 623, 160, 575, 540, -547, 300, -547, 78, -547, 537, 42, 78, 601, -547, 530, 530, 472, 472, 530, 530, -547, 523, 593, 289, 289, 215, 289, -547, 289, -547, 289, -547, 590, -547, -547, 585, 149, 149, 532, 619, 472, -547, 42, 542, 606, 701, 600, 600, -547, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 200, 613, -547, 307, 78, -547, 314, 603, 612, 330, 620, 608, 621, 617, 634, 388, 618, 624, -547, 327, 190, -547, 642, 532, 683, 650, 1024, 629, -547, 42, -547, -547, 343, 1180, -547, -547, -547, -547, -547, -547, 523, -547, 289, 689, 681, 289, 530, 643, -547, -547, 530, -547, -33, -50, -547, 676, -547, 249, 472, 472, -547, 253, 600, 253, 600, 1180, 600, 902, 505, 368, 368, 368, 368, 368, 368, -547, 1180, -25, -547, 42, 401, -547, 1180, 401, -547, 661, 663, 128, 78, -547, 138, 78, -547, 163, 388, -547, -547, 662, 658, -547, 645, -547, -547, 78, 575, 78, -547, 385, -547, 455, -547, 42, 42, 42, 42, 472, -547, 653, -547, 152, 530, 698, 565, -547, -547, 149, 294, -547, -547, -547, 42, -547, -547, -547, 423, 461, -547, -547, 78, 78, 78, 979, -547, -547, 1003, -547, -547, 669, 664, 694, 673, 1045, 476, 472, -547, -547, 358, -547, 358, -547, -547, -547, 681, 565, 289, -547, -50, 385, -547, 298, 707, -547, 1180, -547, 1066, 1087, 1163, 608, 617, 672, 78, 682, -547, 674, 78, -547, 530, -547, 681, -547, -547, 42, -547, 31, -547, -547, -547, 78, 239, 241, 78, 1180, 665, 78, 399, -547, 530, 433, 472, 684, -547, 1108, -547, -547, 1180, 685, 1180, 152, 565, -547, 78, -547, 680, -547, -547, 1129, 666, 472, -547, -547 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { 0, 3, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 324, 5, 6, 11, 12, 13, 14, 8, 9, 24, 27, 31, 28, 29, 30, 32, 33, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 34, 16, 17, 15, 37, 68, 75, 85, 37, 52, 22, 0, 149, 152, 148, 20, 88, 23, 58, 57, 91, 0, 25, 94, 0, 0, 104, 0, 106, 0, 108, 0, 110, 0, 112, 0, 114, 0, 116, 0, 118, 0, 120, 0, 122, 0, 124, 0, 126, 0, 128, 0, 130, 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 21, 0, 150, 0, 0, 89, 0, 0, 0, 0, 326, 154, 137, 0, 276, 271, 271, 0, 0, 0, 258, 251, 277, 0, 138, 139, 0, 271, 0, 0, 0, 0, 134, 136, 42, 35, 43, 38, 72, 67, 0, 0, 69, 81, 74, 82, 76, 84, 86, 36, 51, 0, 53, 0, 152, 0, 91, 91, 26, 102, 93, 45, 0, 0, 95, 96, 0, 154, 0, 237, 0, 0, 272, 0, 251, 251, 251, 43, 0, 252, 240, 241, 0, 140, 142, 141, 143, 0, 0, 47, 44, 0, 70, 0, 0, 0, 43, 0, 153, 151, 92, 90, 87, 0, 0, 98, 0, 342, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 337, 328, 0, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 0, 23, 0, 0, 0, 0, 0, 0, 176, 0, 310, 0, 0, 0, 165, 166, 178, 185, 161, 163, 155, 156, 0, 162, 158, 159, 160, 179, 174, 180, 181, 164, 167, 169, 170, 171, 168, 172, 173, 175, 177, 275, 273, 238, 0, 239, 0, 0, 0, 253, 256, 0, 298, 0, 0, 62, 43, 59, 61, 0, 40, 0, 0, 83, 0, 49, 43, 0, 0, 65, 0, 66, 0, 97, 327, 345, 343, 329, 0, 333, 332, 331, 334, 335, 330, 296, 338, 336, 145, 236, 268, 269, 227, 0, 0, 0, 279, 278, 314, 315, 23, 157, 216, 0, 0, 0, 43, 197, 0, 199, 217, 0, 281, 0, 282, 0, 302, 0, 303, 0, 23, 0, 23, 0, 245, 0, 0, 0, 308, 0, 0, 311, 312, 265, 251, 261, 0, 259, 146, 0, 0, 0, 274, 43, 43, 0, 0, 43, 43, 60, 47, 0, 0, 0, 82, 0, 77, 0, 54, 0, 46, 0, 100, 99, 0, 0, 0, 0, 0, 0, 266, 0, 0, 0, 0, 215, 214, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 283, 0, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 319, 0, 317, 0, 0, 0, 0, 0, 0, 196, 0, 189, 190, 0, 183, 260, 248, 250, 255, 257, 254, 47, 39, 0, 0, 82, 0, 43, 0, 56, 55, 0, 344, 346, 346, 297, 269, 270, 0, 0, 0, 200, 201, 203, 202, 204, 184, 205, 206, 207, 208, 210, 209, 211, 212, 213, 222, 221, 0, 220, 0, 0, 284, 280, 0, 305, 0, 0, 0, 0, 289, 0, 0, 294, 0, 0, 246, 247, 0, 0, 307, 0, 316, 318, 0, 313, 0, 263, 0, 147, 0, 186, 0, 0, 0, 0, 0, 41, 0, 73, 0, 43, 0, 49, 50, 101, 0, 0, 339, 340, 267, 0, 230, 232, 218, 0, 0, 285, 306, 0, 0, 0, 0, 288, 290, 0, 293, 295, 0, 0, 0, 0, 0, 0, 0, 262, 191, 192, 194, 193, 195, 249, 48, 82, 49, 0, 78, 346, 0, 347, 228, 234, 224, 223, 188, 0, 0, 0, 0, 0, 0, 0, 0, 323, 0, 0, 264, 43, 79, 82, 341, 348, 0, 225, 0, 231, 301, 300, 0, 0, 0, 0, 244, 0, 0, 0, 71, 43, 229, 0, 0, 235, 0, 287, 292, 243, 0, 320, 0, 49, 226, 0, 299, 0, 309, 80, 0, 0, 0, 242, 233 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -547, -547, -547, -547, -547, 742, 743, 744, -547, -547, -228, -547, -547, 625, -547, 692, -547, -199, -116, -547, -393, -546, -547, -547, -547, -547, 9, -184, 441, -69, -225, -547, -547, 578, -547, -547, -547, 633, -399, -547, -547, -547, -547, 304, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 641, -80, -547, 626, -547, 582, 591, -547, 512, -150, -391, 5, -139, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, -547, 226, -547, -547, -547, -193, -547, -547, -547, -547, -547, 373, -547, -547, -547, 278, 137, -547, -547, -547, -547, -547, -547, -547, -547, 158, -547, -547, 161, -241, -547, -547, 340, -547, -547, -547, -547, -547, -547, -547, 316, -547, -547, -547, -547, -547, -547, -189, -492 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 2, 3, 23, 24, 269, 270, 271, 28, 29, 77, 30, 131, 31, 32, 115, 160, 212, 213, 226, 315, 411, 33, 120, 175, 321, 272, 311, 312, 326, 361, 34, 116, 165, 566, 35, 117, 169, 219, 36, 118, 37, 79, 128, 38, 132, 187, 188, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 84, 106, 108, 155, 273, 274, 57, 72, 125, 191, 275, 276, 362, 479, 363, 364, 447, 524, 525, 279, 655, 639, 280, 281, 617, 641, 282, 86, 90, 92, 104, 110, 283, 544, 94, 562, 96, 201, 202, 98, 100, 401, 284, 392, 285, 600, 286, 425, 194, 195, 88, 102, 287, 288, 370, 289, 457, 537, 290, 459, 540, 341, 112, 291, 374, 292, 293, 387, 471, 294, 295, 467, 468, 469, 58, 82, 189, 342, 242, 332, 574 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 123, 304, 327, 135, 301, 302, 303, 137, 575, 352, 493, 379, 488, 340, 161, 228, 186, 419, 367, 423, 320, 145, 340, 612, 386, 147, 78, 148, 166, 143, 316, 580, 317, 318, 419, 504, 322, 340, 424, 4, 393, 277, 581, 475, 380, 129, 334, 335, 336, 337, 338, 339, 278, 59, 371, 176, 192, 656, 178, 184, 68, 210, 230, 388, 634, 573, 203, 162, 211, 204, 130, 206, 207, 208, 209, 182, 173, 70, 229, 357, 572, 167, 573, 144, 134, 556, 74, 61, 381, 382, 390, 163, 567, 277, 563, 355, 76, 476, 368, 161, 174, 60, 184, 277, 278, 75, 76, 369, 373, 416, 164, 325, 405, 328, 298, 231, 300, 389, 296, 671, 75, 636, 413, 121, 122, 307, 168, 168, 183, 184, 406, 355, 76, 358, 372, 582, 166, 69, 179, 180, 359, 308, 313, 383, 391, 313, 62, 313, 313, 319, 330, 313, 185, 200, 71, 360, 256, 76, 324, 121, 122, 465, 432, 75, 76, 344, 477, 603, 604, 605, 606, 232, 233, 184, 63, 234, 163, 235, 236, 237, 238, 239, 157, 587, 240, 412, 616, 64, 453, 170, 241, 465, 589, 157, 501, 297, 472, 345, 477, 482, 483, 357, 73, 486, 487, 80, 200, 200, 200, 417, 633, 418, 347, 75, 76, 351, 590, 592, 449, 216, 75, 76, 452, 490, 491, 217, 494, 331, 495, 551, 496, 499, 500, 121, 122, 158, 653, 492, 75, 76, 313, 593, 340, 217, 548, 313, 172, 654, 477, 8, 9, 10, 11, 83, 218, 358, -219, 12, 184, 159, 353, 354, 359, 13, 376, 378, 85, -219, 75, 76, 159, 384, 577, 453, 346, 454, 196, 360, 256, 76, 324, 121, 122, 324, 121, 122, 455, 205, 65, 348, 522, 255, 75, 659, 569, 660, 87, 448, 477, 456, 528, 355, 76, 531, 66, 564, 373, 67, 568, 558, 559, 560, 561, 89, 434, 402, 436, 590, 438, 593, 484, 485, 638, 365, 151, 478, 152, 366, 153, 601, 477, 477, 477, 477, 17, -286, 357, 81, 313, 313, 154, 313, 365, 313, 503, 313, 366, 19, 615, 477, 91, 309, 22, 93, 427, 428, 614, 478, 558, 559, 560, 561, 450, 429, 430, 431, 451, 95, 610, 310, 121, 122, 420, 421, 324, 121, 122, 583, 75, 76, 584, 571, -322, 613, 547, 355, 76, 365, 527, 637, 358, 366, 355, 76, 466, 530, 473, 359, 200, -291, 480, 557, 97, 558, 559, 560, 561, 478, 355, 76, 477, 372, 360, 375, 76, 324, 121, 122, 664, 559, 313, 561, 99, 313, 357, 578, 579, 635, 433, 434, 435, 436, 101, 438, 652, 310, 121, 122, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 523, 357, 665, 103, 529, 478, 105, 433, 434, 435, 436, 107, 438, 324, 121, 122, 439, 440, 441, 442, 443, 444, 445, 446, 466, 109, 358, 355, 76, 111, 607, 224, 225, 359, 542, 543, 113, 478, 478, 478, 478, 558, 559, 560, 561, 609, 114, 631, 360, 256, 76, 324, 121, 122, 124, 358, 478, 126, 127, 602, 133, 618, 359, 558, 559, 560, 561, 620, 632, 558, 559, 560, 561, 134, 136, 193, 138, 360, 377, 76, 324, 121, 122, 139, 433, 434, 435, 436, 588, 438, 313, 591, 140, 439, 440, 441, 442, 443, 444, 445, 446, 141, 15, 598, 142, 599, 146, 149, 657, 150, 177, 197, 198, 433, 434, 435, 436, 478, 438, 199, 214, 221, 299, 666, 441, 442, 443, 444, 445, 446, 220, 223, 227, 184, 619, 305, 306, 323, 621, 622, 623, 349, 676, 670, 314, 329, 505, 350, 333, 385, 433, 434, 435, 436, 244, 438, 5, 6, 75, 439, 440, 441, 442, 443, 444, 445, 446, 394, 245, 395, 246, 396, 397, 398, 399, 247, 400, 403, 248, 249, 648, 407, 408, 250, 651, 409, 410, 415, 414, 419, 422, 366, 426, 461, 462, 464, 470, 658, 463, 474, 661, 251, 252, 663, 391, 253, 134, 254, 489, 497, 506, 498, 502, 438, 433, 434, 435, 436, 526, 438, 672, 255, 532, 439, 440, 441, 442, 443, 444, 445, 446, 256, 76, 533, 536, 535, 538, 257, 258, 541, 259, 260, 261, 539, 545, 550, 262, 263, 264, 244, 546, 5, 6, 552, 553, 555, 565, 217, 20, 21, 265, 424, 570, 245, 585, 246, 586, 596, 595, 611, 247, 597, 608, 248, 249, 626, 627, 628, 250, 629, 266, 267, 640, 268, 647, 649, 650, 667, 673, 669, 215, 662, 675, 25, 26, 27, 251, 252, 404, 171, 253, 134, 343, 156, 181, 507, 119, 222, 190, 433, 434, 435, 436, 356, 438, 594, 255, 481, 439, 440, 441, 442, 443, 444, 445, 446, 256, 76, 576, 243, 645, 549, 257, 258, 646, 259, 260, 261, 0, 0, 458, 262, 263, 264, 534, 0, 0, 433, 434, 435, 436, 0, 438, 20, 21, 265, 439, 440, 441, 442, 443, 444, 445, 446, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266, 267, 0, 268, -4, 1, 0, -4, -4, -4, -4, -4, -4, -4, 0, 0, 0, -4, -4, -4, -4, 0, 0, 0, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, 0, -4, 0, 0, 0, -4, -4, -4, -4, -4, 0, 0, 0, 0, 0, -4, -4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, -107, 12, -103, -105, 0, 0, 0, 13, -123, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, -117, -129, -4, 0, 14, 0, 0, -4, -121, -109, -111, -113, 15, 0, 0, -4, -4, -4, -115, 16, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, -4, -4, -4, 0, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, -131, 440, 441, 442, 443, 444, 445, 446, 17, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460, -133, -135, 0, -125, -127, -119, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 624, 0, 0, 0, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 625, 0, 0, 0, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 554, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 630, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 642, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 643, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 668, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 674, 0, 0, 0, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 433, 434, 435, 436, 437, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 433, 434, 435, 436, 0, 438, 0, 644, 0, 439, 440, 441, 442, 443, 444, 445, 446, 433, 434, 435, 436, 0, 438, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446 }; static const yytype_int16 yycheck[] = { 69, 200, 227, 83, 197, 198, 199, 87, 500, 250, 409, 1, 405, 241, 1, 1, 132, 67, 1, 18, 219, 101, 250, 569, 265, 105, 17, 107, 1, 1, 214, 56, 216, 217, 67, 426, 220, 265, 37, 0, 268, 191, 67, 1, 34, 67, 235, 236, 237, 238, 239, 240, 191, 10, 1, 124, 136, 26, 127, 55, 1, 57, 1, 1, 610, 115, 146, 54, 64, 149, 92, 151, 152, 153, 154, 1, 54, 1, 64, 1, 113, 54, 115, 55, 53, 476, 1, 102, 78, 79, 1, 78, 491, 243, 487, 78, 79, 55, 81, 1, 78, 11, 55, 253, 243, 78, 79, 257, 258, 62, 97, 227, 311, 229, 194, 54, 196, 55, 1, 665, 78, 613, 321, 81, 82, 205, 117, 118, 54, 55, 314, 78, 79, 55, 81, 526, 1, 78, 129, 130, 62, 210, 211, 1, 55, 214, 53, 216, 217, 218, 1, 220, 78, 144, 78, 77, 78, 79, 80, 81, 82, 1, 361, 78, 79, 245, 394, 558, 559, 560, 561, 110, 111, 55, 53, 114, 78, 116, 117, 118, 119, 120, 1, 55, 123, 67, 577, 53, 60, 54, 129, 1, 54, 1, 422, 78, 389, 1, 426, 398, 399, 1, 90, 402, 403, 81, 197, 198, 199, 325, 609, 327, 1, 78, 79, 1, 78, 54, 368, 22, 78, 79, 372, 407, 408, 28, 410, 78, 412, 470, 414, 420, 421, 81, 82, 54, 635, 22, 78, 79, 309, 78, 470, 28, 54, 314, 54, 638, 476, 6, 7, 8, 9, 15, 57, 55, 56, 14, 55, 78, 251, 252, 62, 20, 259, 260, 16, 67, 78, 79, 78, 262, 23, 60, 78, 62, 139, 77, 78, 79, 80, 81, 82, 80, 81, 82, 73, 150, 53, 78, 90, 68, 78, 54, 493, 54, 13, 366, 526, 86, 450, 78, 79, 453, 53, 489, 456, 53, 492, 60, 61, 62, 63, 41, 61, 306, 63, 78, 65, 78, 400, 401, 24, 55, 13, 394, 15, 59, 17, 554, 558, 559, 560, 561, 91, 67, 1, 53, 407, 408, 29, 410, 55, 412, 424, 414, 59, 104, 573, 577, 42, 62, 109, 43, 349, 350, 62, 426, 60, 61, 62, 63, 60, 358, 359, 360, 64, 50, 567, 80, 81, 82, 112, 113, 80, 81, 82, 527, 78, 79, 530, 497, 55, 572, 57, 78, 79, 55, 81, 614, 55, 59, 78, 79, 385, 81, 391, 62, 389, 67, 395, 58, 32, 60, 61, 62, 63, 476, 78, 79, 638, 81, 77, 78, 79, 80, 81, 82, 19, 61, 489, 63, 126, 492, 1, 505, 506, 611, 60, 61, 62, 63, 40, 65, 633, 80, 81, 82, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 1, 653, 21, 451, 526, 124, 60, 61, 62, 63, 125, 65, 80, 81, 82, 69, 70, 71, 72, 73, 74, 75, 76, 467, 33, 55, 78, 79, 83, 562, 179, 180, 62, 98, 99, 121, 558, 559, 560, 561, 60, 61, 62, 63, 566, 122, 23, 77, 78, 79, 80, 81, 82, 57, 55, 577, 67, 57, 56, 53, 90, 62, 60, 61, 62, 63, 58, 600, 60, 61, 62, 63, 53, 78, 31, 78, 77, 78, 79, 80, 81, 82, 78, 60, 61, 62, 63, 535, 65, 611, 538, 78, 69, 70, 71, 72, 73, 74, 75, 76, 78, 44, 550, 78, 552, 78, 78, 640, 78, 78, 55, 55, 60, 61, 62, 63, 638, 65, 55, 22, 58, 67, 655, 71, 72, 73, 74, 75, 76, 64, 58, 64, 55, 581, 56, 67, 12, 585, 586, 587, 55, 674, 664, 73, 78, 56, 55, 78, 53, 60, 61, 62, 63, 1, 65, 3, 4, 78, 69, 70, 71, 72, 73, 74, 75, 76, 57, 15, 64, 17, 67, 78, 56, 56, 22, 56, 58, 25, 26, 627, 23, 23, 30, 631, 58, 73, 56, 67, 67, 67, 59, 64, 78, 57, 24, 108, 644, 64, 114, 647, 48, 49, 650, 55, 52, 53, 54, 67, 71, 56, 78, 45, 65, 60, 61, 62, 63, 57, 65, 667, 68, 71, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 73, 78, 67, 67, 84, 85, 57, 87, 88, 89, 78, 78, 55, 93, 94, 95, 1, 78, 3, 4, 22, 56, 78, 19, 28, 105, 106, 107, 37, 71, 15, 55, 17, 55, 61, 58, 23, 22, 78, 71, 25, 26, 58, 64, 35, 30, 58, 127, 128, 27, 130, 64, 55, 64, 55, 60, 56, 164, 78, 78, 3, 3, 3, 48, 49, 309, 118, 52, 53, 54, 114, 131, 56, 66, 177, 134, 60, 61, 62, 63, 253, 65, 541, 68, 396, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 502, 190, 624, 467, 84, 85, 625, 87, 88, 89, -1, -1, 53, 93, 94, 95, 456, -1, -1, 60, 61, 62, 63, -1, 65, 105, 106, 107, 69, 70, 71, 72, 73, 74, 75, 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 127, 128, -1, 130, 0, 1, -1, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, 13, 14, 15, 16, -1, -1, -1, 20, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, 33, -1, -1, 36, -1, -1, -1, 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, 13, 14, 15, 16, -1, -1, -1, 20, 21, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, 32, 33, 91, -1, 36, -1, -1, 96, 40, 41, 42, 43, 44, -1, -1, 104, 105, 106, 50, 51, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, 122, -1, 124, 125, 126, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 83, 70, 71, 72, 73, 74, 75, 76, 91, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, 121, 122, -1, 124, 125, 126, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 53, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 53, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 56, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 56, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 56, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 56, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 56, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 56, -1, -1, -1, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 60, 61, 62, 63, 64, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, 60, 61, 62, 63, -1, 65, -1, 67, -1, 69, 70, 71, 72, 73, 74, 75, 76, 60, 61, 62, 63, -1, 65, -1, -1, -1, 69, 70, 71, 72, 73, 74, 75, 76 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { 0, 1, 134, 135, 0, 3, 4, 5, 6, 7, 8, 9, 14, 20, 36, 44, 51, 91, 96, 104, 105, 106, 109, 136, 137, 138, 139, 140, 141, 142, 144, 146, 147, 155, 164, 168, 172, 174, 177, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 205, 273, 10, 11, 102, 53, 53, 53, 53, 53, 53, 1, 78, 1, 78, 206, 90, 1, 78, 79, 143, 159, 175, 81, 53, 274, 15, 199, 16, 226, 13, 249, 41, 227, 42, 228, 43, 233, 50, 235, 32, 238, 126, 239, 40, 250, 21, 229, 124, 200, 125, 201, 33, 230, 83, 261, 121, 122, 148, 165, 169, 173, 148, 156, 81, 82, 162, 57, 207, 67, 57, 176, 67, 92, 145, 178, 53, 53, 203, 78, 203, 78, 78, 78, 78, 78, 1, 55, 203, 78, 203, 203, 78, 78, 13, 15, 17, 29, 202, 202, 1, 54, 78, 149, 1, 54, 78, 97, 166, 1, 54, 159, 170, 54, 170, 54, 54, 78, 157, 162, 78, 162, 159, 159, 146, 1, 54, 55, 78, 151, 179, 180, 275, 205, 208, 203, 31, 247, 248, 247, 55, 55, 55, 159, 236, 237, 203, 203, 247, 203, 203, 203, 203, 57, 64, 150, 151, 22, 166, 22, 28, 57, 171, 64, 58, 207, 58, 176, 176, 152, 64, 1, 64, 1, 54, 110, 111, 114, 116, 117, 118, 119, 120, 123, 129, 277, 208, 1, 15, 17, 22, 25, 26, 30, 48, 49, 52, 54, 68, 78, 84, 85, 87, 88, 89, 93, 94, 95, 107, 127, 128, 130, 138, 139, 140, 159, 203, 204, 209, 210, 211, 214, 218, 221, 222, 225, 231, 241, 243, 245, 251, 252, 254, 257, 262, 264, 265, 268, 269, 1, 78, 203, 67, 203, 236, 236, 236, 150, 56, 67, 203, 162, 62, 80, 160, 161, 162, 73, 153, 160, 160, 160, 162, 150, 158, 160, 12, 80, 151, 162, 163, 151, 78, 1, 78, 278, 78, 278, 278, 278, 278, 278, 278, 143, 260, 276, 54, 203, 1, 78, 1, 78, 55, 55, 1, 260, 159, 159, 78, 210, 1, 55, 62, 77, 163, 211, 213, 214, 55, 59, 1, 81, 211, 253, 1, 81, 211, 263, 78, 213, 78, 213, 1, 34, 78, 79, 1, 159, 53, 260, 266, 1, 55, 1, 55, 242, 143, 57, 64, 67, 78, 56, 56, 56, 240, 159, 58, 161, 150, 160, 23, 23, 58, 73, 154, 67, 150, 67, 56, 62, 151, 151, 67, 112, 113, 67, 18, 37, 246, 64, 213, 213, 213, 213, 213, 150, 60, 61, 62, 63, 64, 65, 69, 70, 71, 72, 73, 74, 75, 76, 215, 162, 211, 60, 64, 211, 60, 62, 73, 86, 255, 53, 258, 53, 78, 57, 64, 24, 1, 159, 270, 271, 272, 108, 267, 236, 213, 114, 1, 55, 143, 162, 212, 213, 242, 150, 150, 203, 203, 150, 150, 153, 67, 160, 160, 22, 171, 160, 160, 160, 71, 78, 278, 278, 143, 45, 203, 212, 56, 56, 56, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 90, 213, 216, 217, 57, 81, 211, 213, 81, 211, 71, 73, 263, 67, 78, 256, 67, 78, 259, 57, 98, 99, 232, 78, 78, 57, 54, 271, 55, 260, 22, 56, 56, 78, 212, 58, 60, 61, 62, 63, 234, 153, 160, 19, 167, 171, 160, 150, 71, 151, 113, 115, 279, 279, 246, 23, 203, 203, 56, 67, 212, 211, 211, 55, 55, 55, 213, 54, 78, 213, 54, 78, 232, 58, 61, 78, 213, 213, 244, 163, 56, 212, 212, 212, 212, 203, 71, 162, 150, 23, 154, 278, 62, 163, 212, 223, 90, 213, 58, 213, 213, 213, 53, 53, 58, 64, 35, 58, 56, 23, 203, 171, 154, 160, 279, 163, 24, 220, 27, 224, 56, 56, 67, 256, 259, 64, 213, 55, 64, 213, 150, 171, 212, 219, 26, 203, 213, 54, 54, 213, 78, 213, 19, 150, 203, 55, 56, 56, 162, 154, 213, 60, 56, 78, 203 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { 0, 133, 134, 134, 135, 135, 136, 136, 136, 136, 136, 136, 136, 136, 136, 137, 138, 139, 140, 140, 141, 142, 142, 143, 144, 145, 144, 146, 146, 146, 146, 146, 146, 146, 146, 147, 147, 148, 148, 149, 149, 149, 149, 150, 150, 152, 151, 153, 153, 154, 154, 155, 156, 156, 157, 158, 158, 159, 159, 160, 160, 161, 161, 162, 162, 163, 163, 164, 165, 165, 165, 166, 166, 167, 168, 169, 169, 170, 170, 170, 170, 170, 171, 171, 172, 173, 173, 174, 174, 175, 175, 176, 176, 177, 178, 178, 178, 179, 179, 180, 180, 180, 180, 182, 181, 183, 181, 184, 181, 185, 181, 186, 181, 187, 181, 188, 181, 189, 181, 190, 181, 191, 181, 192, 181, 193, 181, 194, 181, 195, 181, 196, 181, 197, 181, 198, 181, 199, 200, 201, 202, 202, 202, 202, 203, 203, 204, 204, 205, 205, 206, 206, 207, 207, 208, 208, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 210, 210, 211, 211, 211, 211, 212, 212, 212, 212, 212, 212, 212, 212, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 215, 214, 216, 216, 217, 217, 217, 217, 219, 218, 218, 220, 220, 221, 222, 223, 223, 224, 224, 225, 226, 227, 228, 229, 230, 231, 231, 231, 231, 232, 232, 234, 233, 235, 236, 236, 237, 237, 238, 240, 239, 239, 241, 241, 241, 242, 244, 243, 243, 245, 245, 245, 246, 246, 247, 247, 248, 248, 248, 249, 250, 251, 251, 252, 252, 253, 253, 253, 253, 255, 254, 254, 256, 256, 258, 257, 257, 259, 259, 260, 260, 261, 262, 262, 262, 262, 263, 263, 263, 263, 264, 264, 265, 266, 266, 267, 267, 268, 268, 269, 270, 270, 271, 271, 271, 272, 272, 274, 273, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 277, 277, 277, 277, 278, 278, 278, 279, 279, 279 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 2, 1, 1, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 0, 2, 5, 3, 6, 1, 0, 1, 0, 4, 0, 5, 0, 3, 4, 0, 2, 4, 3, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 0, 2, 3, 9, 1, 1, 4, 0, 2, 4, 7, 8, 11, 1, 0, 2, 4, 0, 2, 5, 2, 2, 4, 0, 3, 4, 0, 2, 2, 3, 2, 4, 4, 6, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 3, 0, 3, 2, 2, 2, 2, 2, 2, 2, 3, 4, 2, 4, 2, 2, 2, 4, 0, 3, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 4, 3, 6, 1, 1, 3, 3, 3, 3, 3, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1, 0, 5, 0, 1, 1, 1, 3, 3, 0, 9, 2, 0, 2, 5, 7, 0, 7, 0, 2, 2, 3, 4, 4, 3, 3, 11, 8, 7, 2, 1, 1, 0, 8, 6, 0, 1, 2, 4, 6, 0, 6, 2, 2, 3, 2, 4, 0, 6, 2, 3, 5, 2, 0, 2, 0, 1, 2, 3, 2, 2, 2, 2, 2, 4, 2, 1, 2, 3, 4, 0, 8, 5, 1, 2, 0, 8, 5, 1, 2, 1, 3, 4, 9, 7, 7, 2, 1, 2, 3, 4, 4, 2, 9, 0, 1, 0, 2, 2, 2, 4, 1, 2, 1, 6, 1, 1, 4, 0, 5, 0, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 0, 1, 5, 5, 7, 1, 1, 3, 1, 0, 2, 3 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*----------------------------------------. | Print this symbol's value on YYOUTPUT. | `----------------------------------------*/ static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T yystrlen (const char *yystr) { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: 'yyss': related to states. 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 3: #line 120 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {diag("Illegal block", (char *)0);} #line 2123 "parse1.c" /* yacc.c:1646 */ break; case 4: #line 123 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2129 "parse1.c" /* yacc.c:1646 */ break; case 15: #line 131 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{if (!title) title = (yyvsp[0].qp);}} #line 2135 "parse1.c" /* yacc.c:1646 */ break; case 18: #line 138 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { unitonflag = unitflagsave = 1;} #line 2141 "parse1.c" /* yacc.c:1646 */ break; case 19: #line 140 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {unitonflag = unitflagsave = 0;} #line 2147 "parse1.c" /* yacc.c:1646 */ break; case 20: #line 143 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{include_file((yyvsp[0].qp));}} #line 2153 "parse1.c" /* yacc.c:1646 */ break; case 21: #line 146 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{define_value((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 2159 "parse1.c" /* yacc.c:1646 */ break; case 22: #line 147 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("syntax: DEFINE name integer");} #line 2165 "parse1.c" /* yacc.c:1646 */ break; case 23: #line 150 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyvsp[0].qp)->element = (void *)checklocal(SYM((yyvsp[0].qp)));}} #line 2171 "parse1.c" /* yacc.c:1646 */ break; case 25: #line 153 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {declare_level = atoi(STR((yyvsp[0].qp)));} #line 2177 "parse1.c" /* yacc.c:1646 */ break; case 26: #line 154 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {declare_level = 0;} #line 2183 "parse1.c" /* yacc.c:1646 */ break; case 37: #line 163 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2189 "parse1.c" /* yacc.c:1646 */ break; case 39: #line 170 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-4].qp), (yyvsp[-1].qp), ITEM0, (yyvsp[-2].qp),ITEM0,ITEM0,ITEM0); declare(modlunitCONST, (yyvsp[-4].qp), (yyval.qp));}} #line 2195 "parse1.c" /* yacc.c:1646 */ break; case 40: #line 172 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-2].qp), (yyvsp[-1].qp), ITEM0,ITEM0,ITEM0,ITEM0,ITEM0); declare(modlunitCONST, (yyvsp[-2].qp), (yyval.qp));}} #line 2201 "parse1.c" /* yacc.c:1646 */ break; case 41: #line 174 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-5].qp), (yyvsp[-1].qp), (yyvsp[-3].qp), ITEM0, ITEM0,ITEM0,ITEM0); declare(modlunitCONST, (yyvsp[-5].qp), (yyval.qp));}} #line 2207 "parse1.c" /* yacc.c:1646 */ break; case 42: #line 175 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("name = number");} #line 2213 "parse1.c" /* yacc.c:1646 */ break; case 43: #line 178 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2219 "parse1.c" /* yacc.c:1646 */ break; case 45: #line 181 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{lex_units();}} #line 2225 "parse1.c" /* yacc.c:1646 */ break; case 46: #line 182 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[-1].qp); lastok = (yyvsp[0].qp); P2{unitcheck(STR((yyvsp[-1].qp)));}} #line 2231 "parse1.c" /* yacc.c:1646 */ break; case 47: #line 185 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2237 "parse1.c" /* yacc.c:1646 */ break; case 49: #line 189 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2243 "parse1.c" /* yacc.c:1646 */ break; case 52: #line 195 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2249 "parse1.c" /* yacc.c:1646 */ break; case 54: #line 199 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(3,(yyvsp[-3].qp), (yyvsp[0].qp), (yyvsp[-1].qp)); declare(STEP1, (yyvsp[-3].qp), (yyval.qp));}} #line 2255 "parse1.c" /* yacc.c:1646 */ break; case 57: #line 204 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2261 "parse1.c" /* yacc.c:1646 */ break; case 58: #line 205 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2267 "parse1.c" /* yacc.c:1646 */ break; case 59: #line 208 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2273 "parse1.c" /* yacc.c:1646 */ break; case 60: #line 210 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2279 "parse1.c" /* yacc.c:1646 */ break; case 65: #line 218 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2285 "parse1.c" /* yacc.c:1646 */ break; case 66: #line 220 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2291 "parse1.c" /* yacc.c:1646 */ break; case 68: #line 225 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2297 "parse1.c" /* yacc.c:1646 */ break; case 69: #line 227 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{declare(INDEP, ITMA((yyvsp[0].qp))[0], (yyvsp[0].qp));}} #line 2303 "parse1.c" /* yacc.c:1646 */ break; case 70: #line 229 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ITMA((yyvsp[0].qp))[7] = (yyvsp[-1].qp); declare(INDEP, ITMA((yyvsp[0].qp))[0], (yyvsp[0].qp));}} #line 2309 "parse1.c" /* yacc.c:1646 */ break; case 71: #line 233 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(8, (yyvsp[-8].qp), (yyvsp[0].qp), (yyvsp[-6].qp), (yyvsp[-4].qp), (yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp), ITEM0);}} #line 2315 "parse1.c" /* yacc.c:1646 */ break; case 72: #line 234 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("name FROM number TO number WITH integer");} #line 2321 "parse1.c" /* yacc.c:1646 */ break; case 75: #line 241 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2327 "parse1.c" /* yacc.c:1646 */ break; case 76: #line 243 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{declare(DEP, ITMA((yyvsp[0].qp))[0], (yyvsp[0].qp));}} #line 2333 "parse1.c" /* yacc.c:1646 */ break; case 77: #line 246 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-3].qp), (yyvsp[-1].qp), ITEM0, ITEM0, ITEM0, (yyvsp[-2].qp), ITEM0);}} #line 2339 "parse1.c" /* yacc.c:1646 */ break; case 78: #line 248 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-6].qp), (yyvsp[-1].qp), (yyvsp[-4].qp), ITEM0, ITEM0, (yyvsp[-2].qp), ITEM0);}} #line 2345 "parse1.c" /* yacc.c:1646 */ break; case 79: #line 250 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-7].qp), (yyvsp[-1].qp), ITEM0, (yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-2].qp), ITEM0);}} #line 2351 "parse1.c" /* yacc.c:1646 */ break; case 80: #line 252 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(7, (yyvsp[-10].qp), (yyvsp[-1].qp), (yyvsp[-8].qp), (yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-2].qp), ITEM0);}} #line 2357 "parse1.c" /* yacc.c:1646 */ break; case 81: #line 253 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { diag("name FROM number TO number START number\n", "FROM...TO and START are optional, name can be name[integer]\n");} #line 2365 "parse1.c" /* yacc.c:1646 */ break; case 82: #line 257 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2371 "parse1.c" /* yacc.c:1646 */ break; case 83: #line 258 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2377 "parse1.c" /* yacc.c:1646 */ break; case 85: #line 263 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2383 "parse1.c" /* yacc.c:1646 */ break; case 86: #line 265 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{declare(STAT, ITMA((yyvsp[0].qp))[0], (yyvsp[0].qp));}} #line 2389 "parse1.c" /* yacc.c:1646 */ break; case 88: #line 268 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { myerr("PLOT namelist VS name");} #line 2395 "parse1.c" /* yacc.c:1646 */ break; case 91: #line 274 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = ITEM0;} #line 2401 "parse1.c" /* yacc.c:1646 */ break; case 92: #line 276 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = (yyvsp[-1].qp);} #line 2407 "parse1.c" /* yacc.c:1646 */ break; case 94: #line 281 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2413 "parse1.c" /* yacc.c:1646 */ break; case 97: #line 286 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{install_units(STR((yyvsp[-2].qp)), STR((yyvsp[0].qp)));}} #line 2419 "parse1.c" /* yacc.c:1646 */ break; case 98: #line 287 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Unit definition syntax: (units) = (units)");} #line 2425 "parse1.c" /* yacc.c:1646 */ break; case 99: #line 290 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(3, (yyvsp[-3].qp), (yyvsp[0].qp), (yyvsp[-1].qp)); declare(UFACTOR, (yyvsp[-3].qp), (yyval.qp));}} #line 2431 "parse1.c" /* yacc.c:1646 */ break; case 100: #line 292 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{Item *q; double d, unit_mag(); Unit_push(STR((yyvsp[-1].qp))); Unit_push(STR((yyvsp[0].qp))); unit_div(); dimensionless(); Sprintf(buf, "%g", unit_mag()); (yyval.qp) = itemarray(3, (yyvsp[-3].qp), (yyvsp[0].qp), lappendstr(misc, buf)); /*printf("%s has value %s and units (%s)\n", SYM($1)->name, buf, STR($5));*/ unit_pop(); declare(UFACTOR, (yyvsp[-3].qp), (yyval.qp)); }} #line 2446 "parse1.c" /* yacc.c:1646 */ break; case 101: #line 303 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ Item *q; double unit_mag(); Unit_push(STR((yyvsp[-3].qp))); Unit_push(STR((yyvsp[0].qp))); unit_div(); q = lappendstr(misc, unit_str()); dimensionless(); Sprintf(buf, "%g", 1./unit_mag()); (yyval.qp) = itemarray(3, (yyvsp[-5].qp), lappendstr(misc, buf), q), /*printf("%s has value %s and units (%s)\n", SYM($1)->name, STR(q), buf );*/ unit_pop(); declare(UFACTOR, (yyvsp[-5].qp), (yyval.qp)); }} #line 2461 "parse1.c" /* yacc.c:1646 */ break; case 102: #line 313 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Unit factor syntax: examples:\n\ foot2inch = (foot) -> (inch)\n\ F = 96520 (coulombs)\n\ R = (k-mole) (joule/degC)"); } #line 2471 "parse1.c" /* yacc.c:1646 */ break; case 103: #line 319 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = INITIAL1;} #line 2477 "parse1.c" /* yacc.c:1646 */ break; case 104: #line 320 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2483 "parse1.c" /* yacc.c:1646 */ break; case 105: #line 321 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lexcontext = NONLINEAR; blocktype = DERIVATIVE;} #line 2489 "parse1.c" /* yacc.c:1646 */ break; case 106: #line 322 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2495 "parse1.c" /* yacc.c:1646 */ break; case 107: #line 323 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = BREAKPOINT;} #line 2501 "parse1.c" /* yacc.c:1646 */ break; case 108: #line 324 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2507 "parse1.c" /* yacc.c:1646 */ break; case 109: #line 325 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = LINEAR;} #line 2513 "parse1.c" /* yacc.c:1646 */ break; case 110: #line 326 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2519 "parse1.c" /* yacc.c:1646 */ break; case 111: #line 327 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = NONLINEAR;} #line 2525 "parse1.c" /* yacc.c:1646 */ break; case 112: #line 328 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2531 "parse1.c" /* yacc.c:1646 */ break; case 113: #line 329 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = FUNCTION1;} #line 2537 "parse1.c" /* yacc.c:1646 */ break; case 114: #line 330 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2543 "parse1.c" /* yacc.c:1646 */ break; case 115: #line 331 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = FUNCTION_TABLE;} #line 2549 "parse1.c" /* yacc.c:1646 */ break; case 116: #line 332 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2555 "parse1.c" /* yacc.c:1646 */ break; case 117: #line 333 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = PROCEDURE;} #line 2561 "parse1.c" /* yacc.c:1646 */ break; case 118: #line 334 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2567 "parse1.c" /* yacc.c:1646 */ break; case 119: #line 335 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = PROCEDURE;} #line 2573 "parse1.c" /* yacc.c:1646 */ break; case 120: #line 336 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2579 "parse1.c" /* yacc.c:1646 */ break; case 121: #line 337 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = TERMINAL;} #line 2585 "parse1.c" /* yacc.c:1646 */ break; case 122: #line 338 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2591 "parse1.c" /* yacc.c:1646 */ break; case 123: #line 339 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = DISCRETE;} #line 2597 "parse1.c" /* yacc.c:1646 */ break; case 124: #line 340 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2603 "parse1.c" /* yacc.c:1646 */ break; case 125: #line 341 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = CONSTRUCTOR;} #line 2609 "parse1.c" /* yacc.c:1646 */ break; case 126: #line 342 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2615 "parse1.c" /* yacc.c:1646 */ break; case 127: #line 343 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = DESTRUCTOR;} #line 2621 "parse1.c" /* yacc.c:1646 */ break; case 128: #line 344 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2627 "parse1.c" /* yacc.c:1646 */ break; case 129: #line 345 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = PARTIAL;} #line 2633 "parse1.c" /* yacc.c:1646 */ break; case 130: #line 346 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2639 "parse1.c" /* yacc.c:1646 */ break; case 131: #line 347 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = KINETIC; P3 R0{unitflagsave=unitonflag; unitonflag=0;}} #line 2646 "parse1.c" /* yacc.c:1646 */ break; case 132: #line 350 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp); P3{ R0{unitonflag=unitflagsave;} R1{clear_compartlist();} parse_restart((yyval.qp), 1);}} #line 2653 "parse1.c" /* yacc.c:1646 */ break; case 133: #line 352 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = BEFORE;} #line 2659 "parse1.c" /* yacc.c:1646 */ break; case 134: #line 352 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[-1].qp);} #line 2665 "parse1.c" /* yacc.c:1646 */ break; case 135: #line 353 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {blocktype = AFTER;} #line 2671 "parse1.c" /* yacc.c:1646 */ break; case 136: #line 353 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[-1].qp);} #line 2677 "parse1.c" /* yacc.c:1646 */ break; case 144: #line 367 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[-1].qp);} #line 2683 "parse1.c" /* yacc.c:1646 */ break; case 145: #line 369 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{poplocal();}} #line 2689 "parse1.c" /* yacc.c:1646 */ break; case 146: #line 372 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0; conductance_seen_ = 1;} #line 2695 "parse1.c" /* yacc.c:1646 */ break; case 147: #line 374 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0; conductance_seen_ = 1;} #line 2701 "parse1.c" /* yacc.c:1646 */ break; case 148: #line 376 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { if (blocktype == BREAKPOINT) breakpoint_local_seen_ = 1; } #line 2707 "parse1.c" /* yacc.c:1646 */ break; case 149: #line 377 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illegal LOCAL declaration");} #line 2713 "parse1.c" /* yacc.c:1646 */ break; case 150: #line 380 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{pushlocal((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 2719 "parse1.c" /* yacc.c:1646 */ break; case 151: #line 382 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{install_local((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 2725 "parse1.c" /* yacc.c:1646 */ break; case 152: #line 385 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = ITEM0;} #line 2731 "parse1.c" /* yacc.c:1646 */ break; case 153: #line 387 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[-1].qp);} #line 2737 "parse1.c" /* yacc.c:1646 */ break; case 154: #line 390 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2743 "parse1.c" /* yacc.c:1646 */ break; case 182: #line 420 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illegal statement");} #line 2749 "parse1.c" /* yacc.c:1646 */ break; case 183: #line 423 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P3 { if (SYM((yyvsp[-2].qp))->subtype & LOCL) { SYM((yyvsp[-2].qp))->u.str = stralloc(unit_str(), (char *)0); unit_pop(); }else{ unit_push((yyvsp[-2].qp)); unit_swap(); unit_cmp((yyvsp[-2].qp), (yyvsp[-1].qp), lastok); unit_pop(); } } } #line 2765 "parse1.c" /* yacc.c:1646 */ break; case 184: #line 435 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P3 { unit_cmp((yyvsp[-2].qp), (yyvsp[-1].qp), lastok); unit_pop(); } } #line 2775 "parse1.c" /* yacc.c:1646 */ break; case 185: #line 442 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); P1{SYM((yyvsp[0].qp))->usage |= DEP;} P2{ if (SYM((yyvsp[0].qp))->subtype & ARRAY) { myerr("variable needs an index");} } } #line 2786 "parse1.c" /* yacc.c:1646 */ break; case 186: #line 449 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); P1{SYM((yyvsp[-3].qp))->usage |= DEP;} P2{ if ((SYM((yyvsp[-3].qp))->subtype & ARRAY) == 0) {myerr("variable is not an array");} } } #line 2797 "parse1.c" /* yacc.c:1646 */ break; case 187: #line 456 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); P1{SYM((yyvsp[-2].qp))->usage |= DEP;} P2{ if (SYM((yyvsp[-2].qp))->subtype & ARRAY) { myerr("variable needs an index");} } } #line 2808 "parse1.c" /* yacc.c:1646 */ break; case 188: #line 464 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); P1{SYM((yyvsp[-5].qp))->usage |= DEP;} P2{ if ((SYM((yyvsp[-5].qp))->subtype & ARRAY) == 0) {myerr("variable is not an array");} } } #line 2819 "parse1.c" /* yacc.c:1646 */ break; case 189: #line 472 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); P1{SYM((yyvsp[0].qp))->usage |= DEP;}} #line 2825 "parse1.c" /* yacc.c:1646 */ break; case 190: #line 473 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp);} #line 2831 "parse1.c" /* yacc.c:1646 */ break; case 191: #line 474 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp);} #line 2837 "parse1.c" /* yacc.c:1646 */ break; case 196: #line 479 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illegal integer expression");} #line 2843 "parse1.c" /* yacc.c:1646 */ break; case 197: #line 481 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_push((yyvsp[0].qp));}} #line 2849 "parse1.c" /* yacc.c:1646 */ break; case 198: #line 482 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{if ((yyvsp[0].qp)) { Unit_push(STR((yyvsp[0].qp))); }else{ Unit_push((char *)0); } }} #line 2860 "parse1.c" /* yacc.c:1646 */ break; case 199: #line 488 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_push((yyvsp[0].qp));}} #line 2866 "parse1.c" /* yacc.c:1646 */ break; case 200: #line 489 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp); P3{ifcnvfac((yyvsp[0].qp));} } #line 2874 "parse1.c" /* yacc.c:1646 */ break; case 201: #line 492 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_cmp((yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2880 "parse1.c" /* yacc.c:1646 */ break; case 202: #line 493 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_cmp((yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2886 "parse1.c" /* yacc.c:1646 */ break; case 203: #line 494 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_mul();}} #line 2892 "parse1.c" /* yacc.c:1646 */ break; case 204: #line 495 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_div();}} #line 2898 "parse1.c" /* yacc.c:1646 */ break; case 205: #line 496 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_exponent((yyvsp[0].qp), lastok);}} #line 2904 "parse1.c" /* yacc.c:1646 */ break; case 206: #line 497 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(1, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2910 "parse1.c" /* yacc.c:1646 */ break; case 207: #line 498 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(1, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2916 "parse1.c" /* yacc.c:1646 */ break; case 208: #line 499 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(2, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2922 "parse1.c" /* yacc.c:1646 */ break; case 209: #line 500 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(2, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2928 "parse1.c" /* yacc.c:1646 */ break; case 210: #line 501 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(2, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2934 "parse1.c" /* yacc.c:1646 */ break; case 211: #line 502 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(2, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2940 "parse1.c" /* yacc.c:1646 */ break; case 212: #line 503 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(2, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2946 "parse1.c" /* yacc.c:1646 */ break; case 213: #line 504 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_logic(2, (yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 2952 "parse1.c" /* yacc.c:1646 */ break; case 214: #line 505 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_pop(); Unit_push("");}} #line 2958 "parse1.c" /* yacc.c:1646 */ break; case 216: #line 507 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illegal expression");} #line 2964 "parse1.c" /* yacc.c:1646 */ break; case 217: #line 509 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_push_args((yyvsp[-1].qp));}} #line 2970 "parse1.c" /* yacc.c:1646 */ break; case 218: #line 510 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp); P1{SYM((yyvsp[-4].qp))->usage |= FUNCT;} P3{unit_done_args();} } #line 2978 "parse1.c" /* yacc.c:1646 */ break; case 219: #line 515 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0; } #line 2984 "parse1.c" /* yacc.c:1646 */ break; case 221: #line 518 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_chk_arg((yyvsp[0].qp), lastok);}} #line 2990 "parse1.c" /* yacc.c:1646 */ break; case 223: #line 520 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_chk_arg((yyvsp[0].qp), lastok);}} #line 2996 "parse1.c" /* yacc.c:1646 */ break; case 225: #line 523 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{pushlocal((yyvsp[-5].qp), ITEM0);}} #line 3002 "parse1.c" /* yacc.c:1646 */ break; case 226: #line 524 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(6, (yyvsp[-8].qp), (yyvsp[-7].qp), (yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[0].qp)); poplocal();}} #line 3008 "parse1.c" /* yacc.c:1646 */ break; case 227: #line 525 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { myerr("FROM intvar = intexpr TO intexpr BY intexpr { statements }");} #line 3015 "parse1.c" /* yacc.c:1646 */ break; case 228: #line 528 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3021 "parse1.c" /* yacc.c:1646 */ break; case 230: #line 531 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_pop();}} #line 3027 "parse1.c" /* yacc.c:1646 */ break; case 231: #line 533 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_pop();}} #line 3033 "parse1.c" /* yacc.c:1646 */ break; case 232: #line 536 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3039 "parse1.c" /* yacc.c:1646 */ break; case 233: #line 537 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_pop();}} #line 3045 "parse1.c" /* yacc.c:1646 */ break; case 234: #line 540 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3051 "parse1.c" /* yacc.c:1646 */ break; case 237: #line 546 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(3, (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); declare(DERF, (yyvsp[-1].qp), (yyval.qp));}} #line 3057 "parse1.c" /* yacc.c:1646 */ break; case 238: #line 549 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(4, (yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); declare(LINF, (yyvsp[-2].qp), (yyval.qp));}} #line 3063 "parse1.c" /* yacc.c:1646 */ break; case 239: #line 552 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(4, (yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); declare(NLINF, (yyvsp[-2].qp), (yyval.qp));}} #line 3069 "parse1.c" /* yacc.c:1646 */ break; case 240: #line 555 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(3, (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); declare(DISCF, (yyvsp[-1].qp), (yyval.qp));}} #line 3075 "parse1.c" /* yacc.c:1646 */ break; case 241: #line 558 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(3, (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); declare(PARF, (yyvsp[-1].qp), (yyval.qp));}} #line 3081 "parse1.c" /* yacc.c:1646 */ break; case 242: #line 561 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); P3{ unit_push((yyvsp[-7].qp)); unit_del(2); unit_mul(); unit_push((yyvsp[-3].qp)); unit_mul(); unit_push((yyvsp[0].qp)); unit_cmp((yyvsp[-7].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); unit_push((yyvsp[-9].qp)); unit_swap(); unit_cmp((yyvsp[-9].qp), (yyvsp[-8].qp), (yyvsp[0].qp)); unit_pop(); }} #line 3094 "parse1.c" /* yacc.c:1646 */ break; case 243: #line 570 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{ unit_del(1); unit_push((yyvsp[-5].qp)); unit_mul(); unit_swap(); unit_cmp((yyvsp[-6].qp),(yyvsp[-1].qp),lastok); unit_pop(); }} #line 3104 "parse1.c" /* yacc.c:1646 */ break; case 244: #line 576 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_push((yyvsp[-5].qp)); unit_swap(); unit_cmp((yyvsp[-5].qp),(yyvsp[-1].qp),lastok); unit_pop(); }} #line 3112 "parse1.c" /* yacc.c:1646 */ break; case 245: #line 579 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illeqal partial diffeq");} #line 3118 "parse1.c" /* yacc.c:1646 */ break; case 248: #line 584 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{pushlocal((yyvsp[-4].qp), ITEM0); func_unit((yyvsp[-4].qp), (yyvsp[0].qp));}} #line 3124 "parse1.c" /* yacc.c:1646 */ break; case 249: #line 586 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ declare(FUNCT, (yyvsp[-6].qp), itemarray(3, (yyvsp[-6].qp), (yyvsp[-2].qp), (yyvsp[-4].qp))); poplocal(); poplocal(); SYM((yyvsp[-6].qp))->usage |= FUNCT; } } #line 3134 "parse1.c" /* yacc.c:1646 */ break; case 250: #line 593 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{pushlocal((yyvsp[-4].qp), ITEM0); func_unit((yyvsp[-4].qp), (yyvsp[0].qp));} P1{ declare(FUNCT, (yyvsp[-4].qp), itemarray(3, (yyvsp[-4].qp), (yyvsp[0].qp), (yyvsp[-2].qp))); poplocal(); poplocal(); SYM((yyvsp[-4].qp))->usage |= FUNCT; } } #line 3145 "parse1.c" /* yacc.c:1646 */ break; case 251: #line 601 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0; P1{pushlocal(ITEM0, ITEM0);} if (args) { freelist(&args); } args = newlist(); } #line 3154 "parse1.c" /* yacc.c:1646 */ break; case 253: #line 608 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ if (args) { freelist(&args); } args = newlist(); (yyval.qp) = (Item *)newlist(); pushlocal((yyvsp[-1].qp), ITEM0); Lappendsym(args, checklocal(SYM((yyvsp[-1].qp)))); if ((yyvsp[0].qp)) { checklocal(SYM((yyvsp[-1].qp)))->u.str = STR((yyvsp[0].qp)); Lappendstr((List *)(yyval.qp), STR((yyvsp[0].qp))); }else{ Lappendstr((List *)(yyval.qp), ""); } }} #line 3172 "parse1.c" /* yacc.c:1646 */ break; case 254: #line 622 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ pushlocal((yyvsp[-1].qp), ITEM0); Lappendsym(args, checklocal(SYM((yyvsp[-1].qp)))); if ((yyvsp[0].qp)) { checklocal(SYM((yyvsp[-1].qp)))->u.str = STR((yyvsp[0].qp)); Lappendstr((List *)(yyvsp[-3].qp), STR((yyvsp[0].qp))); }else{ Lappendstr((List *)(yyvsp[-3].qp), ""); } }} #line 3187 "parse1.c" /* yacc.c:1646 */ break; case 255: #line 634 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ declare(PROCED, (yyvsp[-4].qp), itemarray(3, (yyvsp[-4].qp), ITEM0, (yyvsp[-2].qp))); poplocal(); SYM((yyvsp[-4].qp))->usage |= FUNCT; } } #line 3197 "parse1.c" /* yacc.c:1646 */ break; case 256: #line 641 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ List* l; Item* q; if ((yyvsp[-1].qp) == ITEM0) { diag("NET_RECEIVE must have at least one argument", (char*)0); } l = newlist(); q = lappendsym(l, install("flag", NAME)); pushlocal(q, ITEM0); Lappendstr((List *)(yyvsp[-1].qp), ""); netreceive_arglist = args; args = (List*)0; }} #line 3213 "parse1.c" /* yacc.c:1646 */ break; case 257: #line 653 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{poplocal();}} #line 3219 "parse1.c" /* yacc.c:1646 */ break; case 258: #line 654 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { myerr("Illegal NETRECEIVE block");} #line 3225 "parse1.c" /* yacc.c:1646 */ break; case 261: #line 659 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { myerr("Illegal WATCH statement");} #line 3231 "parse1.c" /* yacc.c:1646 */ break; case 263: #line 664 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ Item* q1, *q2; q1 = netreceive_arglist->next; q2 = args->next; while (q1 != netreceive_arglist && q2 != args) { Symbol* s1 = SYM(q1); Symbol* s2 = SYM(q2); if (s1->u.str) { /* s2 must be nil or same */ if (s2->u.str) { if (strcmp(s1->u.str, s2->u.str) != 0) { diag(s1->name, " in FOR_NETCONS arglist does not have same units as corresponding arg in NET_RECEIVE arglist"); } }else{ s2->u.str = s1->u.str; } }else{ /* s2 must be nil */ if (s2->u.str) { diag(s1->name, " in FOR_NETCONS arglist does not have same units as corresponding arg in NET_RECEIVE arglist"); } } /*printf("|%s|%s| |%s|%s|\n", s1->name, s1->u.str, s2->name, s2->u.str);*/ q1 = q1->next; q2 = q2->next; } if (q1 != netreceive_arglist || q2 != args) { diag("NET_RECEIVE and FOR_NETCONS do not have same number of arguments", (char*)0); } }} #line 3263 "parse1.c" /* yacc.c:1646 */ break; case 265: #line 692 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { myerr("Illegal FOR_NETCONS statement");} #line 3269 "parse1.c" /* yacc.c:1646 */ break; case 266: #line 696 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(4, (yyvsp[-2].qp), (yyvsp[-1].qp), ITEM0, (yyvsp[0].qp)); lappenditem(solvelist, (yyval.qp));}} #line 3275 "parse1.c" /* yacc.c:1646 */ break; case 267: #line 698 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = itemarray(4, (yyvsp[-4].qp), (yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp)); lappenditem(solvelist, (yyval.qp));}} #line 3281 "parse1.c" /* yacc.c:1646 */ break; case 268: #line 699 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { myerr("Illegal SOLVE statement");} #line 3287 "parse1.c" /* yacc.c:1646 */ break; case 269: #line 702 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = ITEM0; } #line 3293 "parse1.c" /* yacc.c:1646 */ break; case 270: #line 704 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = (yyvsp[0].qp); } #line 3299 "parse1.c" /* yacc.c:1646 */ break; case 271: #line 707 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3305 "parse1.c" /* yacc.c:1646 */ break; case 273: #line 711 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P2{if(!(SYM((yyvsp[0].qp))->subtype&STAT)){ myerr("Not a STATE");} } } #line 3314 "parse1.c" /* yacc.c:1646 */ break; case 274: #line 716 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P2{if(!(SYM((yyvsp[-1].qp))->subtype&STAT)){ myerr("Not a STATE");} } } #line 3323 "parse1.c" /* yacc.c:1646 */ break; case 275: #line 720 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Syntax: SOLVEFOR name, name, ...");} #line 3329 "parse1.c" /* yacc.c:1646 */ break; case 279: #line 727 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("syntax is SENS var1, var2, var3, etc");} #line 3335 "parse1.c" /* yacc.c:1646 */ break; case 280: #line 731 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_cmp((yyvsp[-2].qp), (yyvsp[-1].qp), lastok);}} #line 3341 "parse1.c" /* yacc.c:1646 */ break; case 281: #line 732 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illegal CONSERVE syntax");} #line 3347 "parse1.c" /* yacc.c:1646 */ break; case 282: #line 734 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{consreact_push((yyvsp[0].qp));}} #line 3353 "parse1.c" /* yacc.c:1646 */ break; case 283: #line 735 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{consreact_push((yyvsp[0].qp));}} #line 3359 "parse1.c" /* yacc.c:1646 */ break; case 284: #line 736 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{consreact_push((yyvsp[0].qp)); unit_cmp((yyvsp[-2].qp),(yyvsp[-1].qp),lastok);}} #line 3365 "parse1.c" /* yacc.c:1646 */ break; case 285: #line 737 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P3{consreact_push((yyvsp[0].qp)); unit_cmp((yyvsp[-3].qp),(yyvsp[-2].qp),lastok);} } #line 3373 "parse1.c" /* yacc.c:1646 */ break; case 286: #line 741 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{pushlocal((yyvsp[0].qp), ITEM0);}} #line 3379 "parse1.c" /* yacc.c:1646 */ break; case 287: #line 742 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{poplocal();} P3{ unit_pop(); } } #line 3389 "parse1.c" /* yacc.c:1646 */ break; case 288: #line 748 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P3{ unit_pop(); } } #line 3398 "parse1.c" /* yacc.c:1646 */ break; case 289: #line 754 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3 R0{unit_compartlist((yyvsp[0].qp));}} #line 3404 "parse1.c" /* yacc.c:1646 */ break; case 290: #line 756 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3 R0{unit_compartlist((yyvsp[0].qp));}} #line 3410 "parse1.c" /* yacc.c:1646 */ break; case 291: #line 758 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{pushlocal((yyvsp[0].qp), ITEM0);}} #line 3416 "parse1.c" /* yacc.c:1646 */ break; case 292: #line 759 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{poplocal();} P3{ unit_pop(); } } #line 3426 "parse1.c" /* yacc.c:1646 */ break; case 293: #line 765 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P3{ unit_pop(); } } #line 3435 "parse1.c" /* yacc.c:1646 */ break; case 294: #line 771 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3 R0{unit_ldifuslist((yyvsp[0].qp), unitflagsave);}} #line 3441 "parse1.c" /* yacc.c:1646 */ break; case 295: #line 773 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3 R0{unit_ldifuslist((yyvsp[0].qp), unitflagsave);}} #line 3447 "parse1.c" /* yacc.c:1646 */ break; case 298: #line 779 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{declare(KINF, (yyvsp[-2].qp), ITEM0);}} #line 3453 "parse1.c" /* yacc.c:1646 */ break; case 299: #line 782 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{kinunits((yyvsp[-6].qp), restart_pass);}} #line 3459 "parse1.c" /* yacc.c:1646 */ break; case 300: #line 784 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{kinunits((yyvsp[-4].qp), restart_pass);}} #line 3465 "parse1.c" /* yacc.c:1646 */ break; case 301: #line 786 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{kinunits((yyvsp[-4].qp), restart_pass);}} #line 3471 "parse1.c" /* yacc.c:1646 */ break; case 302: #line 787 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Illegal reaction syntax");} #line 3477 "parse1.c" /* yacc.c:1646 */ break; case 303: #line 789 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{R1{ureactadd((yyvsp[0].qp));} unit_push((yyvsp[0].qp));}} #line 3483 "parse1.c" /* yacc.c:1646 */ break; case 304: #line 790 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{R1{ureactadd((yyvsp[0].qp));} unit_push((yyvsp[0].qp)); Unit_push((char*)0); unit_exponent((yyvsp[-1].qp),(yyvsp[-1].qp));}} #line 3489 "parse1.c" /* yacc.c:1646 */ break; case 305: #line 791 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{R1{ureactadd((yyvsp[0].qp));}unit_push((yyvsp[0].qp)); unit_mul();}} #line 3495 "parse1.c" /* yacc.c:1646 */ break; case 306: #line 792 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P3{R1{ureactadd((yyvsp[0].qp));}unit_push((yyvsp[0].qp)); Unit_push((char*)0); unit_exponent((yyvsp[-1].qp),(yyvsp[-1].qp)); unit_mul();} } #line 3503 "parse1.c" /* yacc.c:1646 */ break; case 308: #line 797 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("Lag syntax is: LAG name BY const");} #line 3509 "parse1.c" /* yacc.c:1646 */ break; case 309: #line 800 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P3{unit_pop(); unit_pop();}} #line 3515 "parse1.c" /* yacc.c:1646 */ break; case 310: #line 803 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3521 "parse1.c" /* yacc.c:1646 */ break; case 312: #line 807 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3527 "parse1.c" /* yacc.c:1646 */ break; case 321: #line 821 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("MATCH syntax is state0 or state(expr)=expr or\ state[i](expr(i)) = expr(i)");} #line 3534 "parse1.c" /* yacc.c:1646 */ break; case 324: #line 829 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp); #if NRNUNIT P2{nrn_unit_chk();} #endif } #line 3545 "parse1.c" /* yacc.c:1646 */ break; case 325: #line 836 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[-2].qp);} #line 3551 "parse1.c" /* yacc.c:1646 */ break; case 327: #line 840 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 3557 "parse1.c" /* yacc.c:1646 */ break; case 329: #line 843 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp),(yyvsp[0].qp));}} #line 3563 "parse1.c" /* yacc.c:1646 */ break; case 330: #line 845 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp),(yyvsp[0].qp));}} #line 3569 "parse1.c" /* yacc.c:1646 */ break; case 331: #line 847 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 3575 "parse1.c" /* yacc.c:1646 */ break; case 332: #line 849 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 3581 "parse1.c" /* yacc.c:1646 */ break; case 333: #line 851 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 3587 "parse1.c" /* yacc.c:1646 */ break; case 334: #line 853 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 3593 "parse1.c" /* yacc.c:1646 */ break; case 335: #line 855 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ { P1{nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));}} #line 3599 "parse1.c" /* yacc.c:1646 */ break; case 337: #line 859 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = NULL;} #line 3605 "parse1.c" /* yacc.c:1646 */ break; case 339: #line 863 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{nrn_use((yyvsp[-3].qp), (yyvsp[-1].qp), ITEM0);}} #line 3611 "parse1.c" /* yacc.c:1646 */ break; case 340: #line 865 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{nrn_use((yyvsp[-3].qp), ITEM0, (yyvsp[-1].qp));}} #line 3617 "parse1.c" /* yacc.c:1646 */ break; case 341: #line 867 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{nrn_use((yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-1].qp));}} #line 3623 "parse1.c" /* yacc.c:1646 */ break; case 342: #line 869 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("syntax is: USEION ion READ list WRITE list");} #line 3629 "parse1.c" /* yacc.c:1646 */ break; case 343: #line 872 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{(yyval.qp) = (Item *)newlist(); Lappendsym((List *)(yyval.qp), SYM((yyvsp[0].qp)));}} #line 3635 "parse1.c" /* yacc.c:1646 */ break; case 344: #line 874 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {P1{ Lappendsym((List *)(yyvsp[-2].qp), SYM((yyvsp[0].qp)));}} #line 3641 "parse1.c" /* yacc.c:1646 */ break; case 345: #line 876 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {myerr("syntax is: keyword name , name, ..., name");} #line 3647 "parse1.c" /* yacc.c:1646 */ break; case 346: #line 879 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3653 "parse1.c" /* yacc.c:1646 */ break; case 347: #line 881 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 3659 "parse1.c" /* yacc.c:1646 */ break; case 348: #line 883 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 3665 "parse1.c" /* yacc.c:1646 */ break; #line 3669 "parse1.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif return yyresult; } #line 885 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1906 */ /* end of grammar */ static void yyerror(s) /* called for yacc syntax error */ char *s; { Fprintf(stderr, "%s:\n ", s); } static int yylex() {return next_intoken(&(yylval.qp));} #if !NRNUNIT void nrn_list(q1, q2) Item *q1, *q2; { /*ARGSUSED*/ } void nrn_use(q1, q2, q3) Item *q1, *q2, *q3; { /*ARGSUSED*/ } #endif neuron-7.5/src/modlunit/parse1.h000066400000000000000000000145001323325274500166670ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { VERBATIM = 258, COMMENT = 259, TITLE = 260, CONSTANT = 261, INDEPENDENT = 262, ASSIGNED = 263, STATE = 264, END_VERBATIM = 265, END_COMMENT = 266, UNITS = 267, BREAKPOINT = 268, PARAMETER = 269, INITIAL1 = 270, DERIVATIVE = 271, SOLVE = 272, USING = 273, WITH = 274, STEPPED = 275, DISCRETE = 276, FROM = 277, TO = 278, BY = 279, WHILE = 280, IF = 281, ELSE = 282, START1 = 283, STEP = 284, SENS = 285, SOLVEFOR = 286, PROCEDURE = 287, PARTIAL = 288, DEL = 289, DEL2 = 290, DEFINE1 = 291, IFERROR = 292, DERFUNC = 293, EQUATION = 294, TERMINAL = 295, LINEAR = 296, NONLINEAR = 297, FUNCTION1 = 298, LOCAL = 299, METHOD = 300, LIN1 = 301, NONLIN1 = 302, PUTQ = 303, GETQ = 304, FUNCTION_TABLE = 305, INCLUDE1 = 306, PROTECT = 307, OR = 308, AND = 309, GT = 310, GE = 311, LT = 312, LE = 313, EQ = 314, NE = 315, NOT = 316, NAME = 317, PRIME = 318, REAL = 319, INTEGER = 320, DEFINEDVAR = 321, KINETIC = 322, CONSERVE = 323, REACTION = 324, REACT1 = 325, COMPARTMENT = 326, LONGDIFUS = 327, PARTEQN = 328, STRING = 329, PLOT = 330, VS = 331, LAG = 332, RESET = 333, MATCH = 334, MODEL_LEVEL = 335, SWEEP = 336, FIRST = 337, LAST = 338, SPACE = 339, NEWLINE = 340, TO_EOL = 341, STUFF = 342, UNITBLK = 343, UNITSON = 344, UNITSOFF = 345, TABLE = 346, DEPEND = 347, NEURON = 348, SUFFIX = 349, NONSPECIFIC = 350, READ = 351, WRITE = 352, USEION = 353, VALENCE = 354, GLOBAL = 355, SECTION = 356, RANGE = 357, POINTER = 358, EXTERNAL = 359, BEFORE = 360, AFTER = 361, ELECTRODE_CURRENT = 362, CONSTRUCTOR = 363, DESTRUCTOR = 364, NETRECEIVE = 365, FOR_NETCONS = 366, WATCH = 367, THREADSAFE = 368, CONDUCTANCE = 369, UNARYMINUS = 370 }; #endif /* Tokens. */ #define VERBATIM 258 #define COMMENT 259 #define TITLE 260 #define CONSTANT 261 #define INDEPENDENT 262 #define ASSIGNED 263 #define STATE 264 #define END_VERBATIM 265 #define END_COMMENT 266 #define UNITS 267 #define BREAKPOINT 268 #define PARAMETER 269 #define INITIAL1 270 #define DERIVATIVE 271 #define SOLVE 272 #define USING 273 #define WITH 274 #define STEPPED 275 #define DISCRETE 276 #define FROM 277 #define TO 278 #define BY 279 #define WHILE 280 #define IF 281 #define ELSE 282 #define START1 283 #define STEP 284 #define SENS 285 #define SOLVEFOR 286 #define PROCEDURE 287 #define PARTIAL 288 #define DEL 289 #define DEL2 290 #define DEFINE1 291 #define IFERROR 292 #define DERFUNC 293 #define EQUATION 294 #define TERMINAL 295 #define LINEAR 296 #define NONLINEAR 297 #define FUNCTION1 298 #define LOCAL 299 #define METHOD 300 #define LIN1 301 #define NONLIN1 302 #define PUTQ 303 #define GETQ 304 #define FUNCTION_TABLE 305 #define INCLUDE1 306 #define PROTECT 307 #define OR 308 #define AND 309 #define GT 310 #define GE 311 #define LT 312 #define LE 313 #define EQ 314 #define NE 315 #define NOT 316 #define NAME 317 #define PRIME 318 #define REAL 319 #define INTEGER 320 #define DEFINEDVAR 321 #define KINETIC 322 #define CONSERVE 323 #define REACTION 324 #define REACT1 325 #define COMPARTMENT 326 #define LONGDIFUS 327 #define PARTEQN 328 #define STRING 329 #define PLOT 330 #define VS 331 #define LAG 332 #define RESET 333 #define MATCH 334 #define MODEL_LEVEL 335 #define SWEEP 336 #define FIRST 337 #define LAST 338 #define SPACE 339 #define NEWLINE 340 #define TO_EOL 341 #define STUFF 342 #define UNITBLK 343 #define UNITSON 344 #define UNITSOFF 345 #define TABLE 346 #define DEPEND 347 #define NEURON 348 #define SUFFIX 349 #define NONSPECIFIC 350 #define READ 351 #define WRITE 352 #define USEION 353 #define VALENCE 354 #define GLOBAL 355 #define SECTION 356 #define RANGE 357 #define POINTER 358 #define EXTERNAL 359 #define BEFORE 360 #define AFTER 361 #define ELECTRODE_CURRENT 362 #define CONSTRUCTOR 363 #define DESTRUCTOR 364 #define NETRECEIVE 365 #define FOR_NETCONS 366 #define WATCH 367 #define THREADSAFE 368 #define CONDUCTANCE 369 #define UNARYMINUS 370 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 56 "../../../nrn/src/modlunit/parse1.y" /* yacc.c:1909 */ Item *qp; #line 288 "parse1.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ neuron-7.5/src/modlunit/parse1.y000077500000000000000000000566111323325274500167240ustar00rootroot00000000000000%{ /* /local/src/master/nrn/src/modlunit/parse1.y,v 1.11 1999/02/27 21:13:50 hines Exp */ #include <../../nmodlconf.h> #include #include "model.h" /* Constructs a parse tree. No translation is done, ie. on exit printing the intoken list will make an exact copy of the input file. All tokens and productions are of Item type and consist of STRING, SYMBOL, and LIST. SPACE and NEWLINE are in the intoken list but are not yacc tokens. All explicitly declared names are given their subtype and a pointer to their declaration. All "used" names are marked with their usage for later error checking. */ extern Symbol *checklocal(); extern int next_intoken(); extern Item *title; extern int declare_level; extern int parse_pass, restart_pass; extern List *solvelist; extern int conductance_seen_; extern int breakpoint_local_seen_; #define IFP(n) if (parse_pass == n) #define IFR(n) if (restart_pass == n) #define P1 IFP(1) #define P2 IFP(2) #define P3 IFP(3) #define R0 IFR(0) #define R1 IFR(1) static int yylex(); static void yyerror(); #if YYBISON #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyssp; --yyvsp; YYERROR #else #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyps; --yypv; YYERROR #endif extern Item *lastok; /* last token accepted by expr */ static int blocktype; static int unitflagsave; /*must turn off units in restartpass0 in kinetic block */ static List* netreceive_arglist; static List* args; extern int lexcontext; %} %union { Item *qp; } %token VERBATIM COMMENT TITLE CONSTANT INDEPENDENT ASSIGNED STATE %token END_VERBATIM END_COMMENT UNITS BREAKPOINT PARAMETER %token INITIAL1 DERIVATIVE SOLVE USING WITH STEPPED DISCRETE %token FROM TO BY WHILE IF ELSE START1 STEP SENS SOLVEFOR %token PROCEDURE PARTIAL DEL DEL2 DEFINE1 IFERROR %token DERFUNC EQUATION TERMINAL LINEAR NONLINEAR FUNCTION1 LOCAL %token METHOD LIN1 NONLIN1 PUTQ GETQ FUNCTION_TABLE %token INCLUDE1 PROTECT %token '{' '}' '(' ')' '[' ']' '@' '+' '*' '-' '/' '=' '^' ':' ',' %token '~' %token OR AND GT GE LT LE EQ NE NOT %token NAME PRIME REAL INTEGER DEFINEDVAR %token KINETIC CONSERVE REACTION REACT1 COMPARTMENT LONGDIFUS PARTEQN %token STRING PLOT VS LAG RESET MATCH MODEL_LEVEL SWEEP FIRST LAST %token SPACE NEWLINE TO_EOL STUFF %token UNITBLK UNITSON UNITSOFF %token TABLE DEPEND %type top all all1 title verbatim comment define1 declare declare1 %type constblk constbody constasgn units limits tolerance %type stepblk stepbdy stepped %type Name numlist name number NUMBER integer real %type indepblk indepbody indepdef withby %type depblk depbody depdef opstart stateblk statbody discretblk %type plotdecl pvlist optindex proc initblk %type stmtlist stmtlist1 locallist locallist1 locoptarray stmt %type asgn varname intexpr expr funccall exprlist exprlist1 %type fromstmt opinc whilestmt ifstmt optelseif optelse %type tablestmt tablst dependlst %type derivblk linblk nonlinblk %type partialblk pareqn firstlast %type funcblk arglist arglist1 procedblk solveblk ifsolerr functbl %type solvefor1 solvefor netrecblk fornetcon %type watchstmt watch1 %type eqnblk terminalblk sens compartlist ldifuslist longdifus %type conserve compart namelist optnamelist kineticblk reaction react consreact %type lagstmt queuestmt matchblk matchlist match matchname %type unitblk unitflag unitbody unitdef Units factordef include1 /* interface to NEURON */ %token NEURON SUFFIX NONSPECIFIC READ WRITE USEION VALENCE %token GLOBAL SECTION RANGE POINTER EXTERNAL BEFORE AFTER %token ELECTRODE_CURRENT CONSTRUCTOR DESTRUCTOR NETRECEIVE %token FOR_NETCONS WATCH THREADSAFE %type neuronblk nrnuse nrnlist valence constructblk destructblk %type initstmt bablk %token CONDUCTANCE %type conducthint /* precedence in expressions--- low to high */ %left OR %left AND %left GT GE LT LE EQ NE %left '+' '-' /* left associative, same precedence */ %left '*' '/' '%'/* left assoc., higher precedence */ %left UNARYMINUS NOT %right '^' /* exponentiation */ %% top: all |error {diag("Illegal block", (char *)0);} ; all: /*nothing*/ {$$ = ITEM0;} | all all1 ; all1: title | locallist | define1 | declare | proc | verbatim | comment | unitflag | include1 ; title :TITLE TO_EOL {P1{if (!title) title = $2;}} ; verbatim: VERBATIM END_VERBATIM ; comment: COMMENT END_COMMENT ; unitflag: UNITSON { unitonflag = unitflagsave = 1;} | UNITSOFF {unitonflag = unitflagsave = 0;} ; include1: INCLUDE1 STRING {P1{include_file($2);}} ; define1: DEFINE1 NAME integer {P1{define_value($2, $3);}} | DEFINE1 error {myerr("syntax: DEFINE name integer");} ; Name: NAME {P1{$1->element = (void *)checklocal(SYM($1));}} ; declare: declare1 | MODEL_LEVEL INTEGER {declare_level = atoi(STR($2));} declare1 {declare_level = 0;} ; declare1: constblk | indepblk | depblk | stateblk | stepblk | plotdecl | unitblk | neuronblk ; constblk: CONSTANT '{' constbody '}' | PARAMETER '{' constbody '}' ; constbody: /*nothing*/ {$$ = ITEM0;} | constbody constasgn ; constasgn: NAME '=' number units limits /* ugh. 7 slots because constant may appear in COMPARTMENT and the 7th space will contain the compartment size units */ {P1{$$ = itemarray(7, $1, $4, ITEM0, $3,ITEM0,ITEM0,ITEM0); declare(modlunitCONST, $1, $$);}} | NAME units limits {P1{$$ = itemarray(7, $1, $2, ITEM0,ITEM0,ITEM0,ITEM0,ITEM0); declare(modlunitCONST, $1, $$);}} | NAME '[' integer ']' units limits {P1{$$ = itemarray(7, $1, $5, $3, ITEM0, ITEM0,ITEM0,ITEM0); declare(modlunitCONST, $1, $$);}} | error {myerr("name = number");} ; units: /*nothing*/ {$$ = ITEM0;} | Units ; Units: '(' {P1{lex_units();}} UNITS ')' {$$ = $3; lastok = $4; P2{unitcheck(STR($3));}} ; limits: /*nothing*/ {$$ = ITEM0;} | LT number ',' number GT ; tolerance: /*nothing*/ {$$ = ITEM0;} | LT number GT ; stepblk: STEPPED '{' stepbdy '}' ; stepbdy: /*nothing*/ {$$ = ITEM0;} | stepbdy stepped ; stepped: NAME '=' numlist units {P1{$$ = itemarray(3,$1, $4, $3); declare(STEP1, $1, $$);}} ; numlist: number ',' number | numlist ',' number ; name: Name {lastok = $1;} | PRIME {lastok = $1;} ; number: NUMBER {lastok = $1;} | '-' NUMBER {lastok = $2;} ; NUMBER: integer | REAL ; integer: INTEGER | DEFINEDVAR ; real: REAL {lastok = $1;} | integer {lastok = $1;} ; indepblk: INDEPENDENT '{' indepbody '}' ; indepbody: /*nothing*/ {$$ = ITEM0;} | indepbody indepdef {P1{declare(INDEP, ITMA($2)[0], $2);}} | indepbody SWEEP indepdef {P1{ITMA($3)[7] = $2; declare(INDEP, ITMA($3)[0], $3);}} ; indepdef: NAME FROM number TO number withby integer opstart units {P1{$$ = itemarray(8, $1, $9, $3, $5, $6, $7, $8, ITEM0);}} | error {myerr("name FROM number TO number WITH integer");} ; withby: WITH ; depblk: ASSIGNED '{' depbody '}' ; depbody: /*nothing*/ {$$ = ITEM0;} | depbody depdef {P1{declare(DEP, ITMA($2)[0], $2);}} ; depdef: name opstart units tolerance {P1{$$ = itemarray(7, $1, $3, ITEM0, ITEM0, ITEM0, $2, ITEM0);}} | name '[' integer ']' opstart units tolerance {P1{$$ = itemarray(7, $1, $6, $3, ITEM0, ITEM0, $5, ITEM0);}} | name FROM number TO number opstart units tolerance {P1{$$ = itemarray(7, $1, $7, ITEM0, $3, $5, $6, ITEM0);}} | name '[' integer ']' FROM number TO number opstart units tolerance {P1{$$ = itemarray(7, $1, $10, $3, $6, $8, $9, ITEM0);}} | error { diag("name FROM number TO number START number\n", "FROM...TO and START are optional, name can be name[integer]\n");} ; opstart: /*nothing*/ {$$ = ITEM0;} | START1 number {$$ = $2;} ; stateblk: STATE '{' statbody '}' ; statbody: /*nothing*/ {$$ = ITEM0;} | statbody depdef {P1{declare(STAT, ITMA($2)[0], $2);}} ; plotdecl: PLOT pvlist VS name optindex | PLOT error { myerr("PLOT namelist VS name");} ; pvlist: name optindex | pvlist ',' name optindex ; optindex: /*nothing*/ { $$ = ITEM0;} | '[' integer ']' { $$ = $2;} ; unitblk: UNITBLK '{' unitbody '}' ; unitbody: /*nothing*/ {$$ = ITEM0;} | unitbody unitdef | unitbody factordef ; unitdef: Units '=' Units {P1{install_units(STR($1), STR($3));}} | Units error {myerr("Unit definition syntax: (units) = (units)");} ; factordef: NAME '=' real Units {P1{$$ = itemarray(3, $1, $4, $3); declare(UFACTOR, $1, $$);}} | NAME '=' Units Units {P1{Item *q; double d, unit_mag(); Unit_push(STR($3)); Unit_push(STR($4)); unit_div(); dimensionless(); Sprintf(buf, "%g", unit_mag()); $$ = itemarray(3, $1, $4, lappendstr(misc, buf)); /*printf("%s has value %s and units (%s)\n", SYM($1)->name, buf, STR($5));*/ unit_pop(); declare(UFACTOR, $1, $$); }} | NAME '=' Units '-' GT Units {P1{ Item *q; double unit_mag(); Unit_push(STR($3)); Unit_push(STR($6)); unit_div(); q = lappendstr(misc, unit_str()); dimensionless(); Sprintf(buf, "%g", 1./unit_mag()); $$ = itemarray(3, $1, lappendstr(misc, buf), q), /*printf("%s has value %s and units (%s)\n", SYM($1)->name, STR(q), buf );*/ unit_pop(); declare(UFACTOR, $1, $$); }} | error {myerr("Unit factor syntax: examples:\n\ foot2inch = (foot) -> (inch)\n\ F = 96520 (coulombs)\n\ R = (k-mole) (joule/degC)"); } ; proc: {blocktype = INITIAL1;} initblk {$$ = $2;} | {lexcontext = NONLINEAR; blocktype = DERIVATIVE;} derivblk {$$ = $2;} | {blocktype = BREAKPOINT;} eqnblk {$$ = $2;} | {lexcontext = blocktype = LINEAR;} linblk {$$ = $2;} | {lexcontext = blocktype = NONLINEAR;} nonlinblk {$$ = $2;} | {blocktype = FUNCTION1;} funcblk {$$ = $2;} | {blocktype = FUNCTION_TABLE;} functbl {$$ = $2;} | {blocktype = PROCEDURE;} procedblk {$$ = $2;} | {blocktype = PROCEDURE;} netrecblk {$$ = $2;} | {blocktype = TERMINAL;} terminalblk {$$ = $2;} | {blocktype = DISCRETE;} discretblk {$$ = $2;} | {blocktype = CONSTRUCTOR;} constructblk {$$ = $2;} | {blocktype = DESTRUCTOR;} destructblk {$$ = $2;} | {lexcontext = blocktype = PARTIAL;} partialblk {$$ = $2;} | {lexcontext = blocktype = KINETIC; P3 R0{unitflagsave=unitonflag; unitonflag=0;}} kineticblk {$$ = $2; P3{ R0{unitonflag=unitflagsave;} R1{clear_compartlist();} parse_restart($$, 1);}} | {blocktype = BEFORE;} BEFORE bablk {$$ = $2;} | {blocktype = AFTER;} AFTER bablk {$$ = $2;} ; initblk: INITIAL1 stmtlist ; constructblk: CONSTRUCTOR stmtlist ; destructblk: DESTRUCTOR stmtlist ; bablk: BREAKPOINT stmtlist | SOLVE stmtlist | INITIAL1 stmtlist | STEP stmtlist ; stmtlist: '{' stmtlist1 '}' {$$ = $2;} | '{' locallist stmtlist1 '}' {P1{poplocal();}} ; conducthint: CONDUCTANCE Name {$$ = ITEM0; conductance_seen_ = 1;} | CONDUCTANCE Name USEION NAME {$$ = ITEM0; conductance_seen_ = 1;} ; locallist: LOCAL locallist1 { if (blocktype == BREAKPOINT) breakpoint_local_seen_ = 1; } | LOCAL error {myerr("Illegal LOCAL declaration");} ; locallist1: NAME locoptarray {P1{pushlocal($1, $2);}} | locallist1 ',' NAME locoptarray {P1{install_local($3, $4);}} ; locoptarray: /*nothing*/ { $$ = ITEM0;} | '[' integer ']' {$$ = $2;} ; stmtlist1: /*nothing*/ {$$ = ITEM0;} | stmtlist1 stmt ; stmt: asgn | PROTECT asgn | fromstmt | whilestmt | ifstmt | stmtlist | funccall | conducthint | solveblk | verbatim | comment | sens | reaction | conserve | compart | longdifus | lagstmt | tablestmt | pareqn | queuestmt | RESET | matchblk | unitflag | initstmt | watchstmt | fornetcon | error {myerr("Illegal statement");} ; asgn: varname '=' expr { P3 { if (SYM($1)->subtype & LOCL) { SYM($1)->u.str = stralloc(unit_str(), (char *)0); unit_pop(); }else{ unit_push($1); unit_swap(); unit_cmp($1, $2, lastok); unit_pop(); } } } | '~' expr '=' expr { P3 { unit_cmp($2, $3, lastok); unit_pop(); } } ; varname: name {lastok = $1; P1{SYM($1)->usage |= DEP;} P2{ if (SYM($1)->subtype & ARRAY) { myerr("variable needs an index");} } } | name '[' intexpr ']' {lastok = $4; P1{SYM($1)->usage |= DEP;} P2{ if ((SYM($1)->subtype & ARRAY) == 0) {myerr("variable is not an array");} } } | NAME '@' integer {lastok = $3; P1{SYM($1)->usage |= DEP;} P2{ if (SYM($1)->subtype & ARRAY) { myerr("variable needs an index");} } } | NAME '@' integer '[' intexpr ']' {lastok = $6; P1{SYM($1)->usage |= DEP;} P2{ if ((SYM($1)->subtype & ARRAY) == 0) {myerr("variable is not an array");} } } ; intexpr: Name {lastok = $1; P1{SYM($1)->usage |= DEP;}} | integer { lastok = $1;} | '(' intexpr ')' { lastok = $3;} | intexpr '+' intexpr | intexpr '-' intexpr | intexpr '*' intexpr | intexpr '/' intexpr | error {myerr("Illegal integer expression");} ; expr: varname {P3{unit_push($1);}} | real units {P3{if ($2) { Unit_push(STR($2)); }else{ Unit_push((char *)0); } }} | funccall {P3{unit_push($1);}} | '(' expr ')' { lastok = $3; P3{ifcnvfac($3);} } | expr '+' expr {P3{unit_cmp($1, $2, lastok);}} | expr '-' expr {P3{unit_cmp($1, $2, lastok);}} | expr '*' expr {P3{unit_mul();}} | expr '/' expr {P3{unit_div();}} | expr '^' expr {P3{unit_exponent($3, lastok);}} | expr OR expr {P3{unit_logic(1, $1, $2, lastok);}} | expr AND expr {P3{unit_logic(1, $1, $2, lastok);}} | expr GT expr {P3{unit_logic(2, $1, $2, lastok);}} | expr LT expr {P3{unit_logic(2, $1, $2, lastok);}} | expr GE expr {P3{unit_logic(2, $1, $2, lastok);}} | expr LE expr {P3{unit_logic(2, $1, $2, lastok);}} | expr EQ expr {P3{unit_logic(2, $1, $2, lastok);}} | expr NE expr {P3{unit_logic(2, $1, $2, lastok);}} | NOT expr {P3{unit_pop(); Unit_push("");}} | '-' expr %prec UNARYMINUS | error {myerr("Illegal expression");} ; funccall: NAME '(' {P3{unit_push_args($1);}} exprlist ')' { lastok = $5; P1{SYM($1)->usage |= FUNCT;} P3{unit_done_args();} } ; exprlist: /*nothing*/ {$$ = ITEM0; } | exprlist1 ; exprlist1: expr {P3{unit_chk_arg($1, lastok);}} | STRING | exprlist ',' expr {P3{unit_chk_arg($3, lastok);}} | exprlist ',' STRING ; fromstmt: FROM NAME '=' intexpr TO intexpr opinc {P1{pushlocal($2, ITEM0);}} stmtlist {P1{$$ = itemarray(6, $1, $2, $4, $6, $7, $9); poplocal();}} |FROM error { myerr("FROM intvar = intexpr TO intexpr BY intexpr { statements }");} ; opinc: /*nothing*/ {$$ = ITEM0;} | BY intexpr ; whilestmt: WHILE '(' expr ')' stmtlist {P3{unit_pop();}} ; ifstmt: IF '(' expr ')' stmtlist optelseif optelse {P3{unit_pop();}} ; optelseif: /*nothing*/ {$$ = ITEM0;} | optelseif ELSE IF '(' expr ')' stmtlist {P3{unit_pop();}} ; optelse: /*nothing*/ {$$ = ITEM0;} | ELSE stmtlist ; initstmt: INITIAL1 stmtlist ; derivblk: DERIVATIVE NAME stmtlist {P1{$$ = itemarray(3, $1, $2, $3); declare(DERF, $2, $$);}} ; linblk: LINEAR NAME solvefor stmtlist {P1{$$ = itemarray(4, $1, $2, $3, $4); declare(LINF, $2, $$);}} ; nonlinblk: NONLINEAR NAME solvefor stmtlist {P1{$$ = itemarray(4, $1, $2, $3, $4); declare(NLINF, $2, $$);}} ; discretblk: DISCRETE NAME stmtlist {P1{$$ = itemarray(3, $1, $2, $3); declare(DISCF, $2, $$);}} ; partialblk: PARTIAL NAME stmtlist {P1{$$ = itemarray(3, $1, $2, $3); declare(PARF, $2, $$);}} ; pareqn: PARTEQN PRIME '=' NAME '*' DEL2 '(' NAME ')' '+' NAME {lastok = $11; P3{ unit_push($4); unit_del(2); unit_mul(); unit_push($8); unit_mul(); unit_push($11); unit_cmp($4, $10, $11); unit_push($2); unit_swap(); unit_cmp($2, $3, $11); unit_pop(); }} | PARTEQN DEL NAME '[' firstlast ']' '=' expr {P3{ unit_del(1); unit_push($3); unit_mul(); unit_swap(); unit_cmp($2,$7,lastok); unit_pop(); }} | PARTEQN NAME '[' firstlast ']' '=' expr {P3{unit_push($2); unit_swap(); unit_cmp($2,$6,lastok); unit_pop(); }} | PARTEQN error {myerr("Illeqal partial diffeq");} ; firstlast: FIRST | LAST ; funcblk: FUNCTION1 NAME '(' arglist ')' units {P1{pushlocal($2, ITEM0); func_unit($2, $6);}} stmtlist {P1{ declare(FUNCT, $2, itemarray(3, $2, $6, $4)); poplocal(); poplocal(); SYM($2)->usage |= FUNCT; } } ; functbl: FUNCTION_TABLE NAME '(' arglist ')' units {P1{pushlocal($2, ITEM0); func_unit($2, $6);} P1{ declare(FUNCT, $2, itemarray(3, $2, $6, $4)); poplocal(); poplocal(); SYM($2)->usage |= FUNCT; } } ; arglist: /*nothing*/ {$$ = ITEM0; P1{pushlocal(ITEM0, ITEM0);} if (args) { freelist(&args); } args = newlist(); } | arglist1 ; arglist1: name units {P1{ if (args) { freelist(&args); } args = newlist(); $$ = (Item *)newlist(); pushlocal($1, ITEM0); Lappendsym(args, checklocal(SYM($1))); if ($2) { checklocal(SYM($1))->u.str = STR($2); Lappendstr((List *)$$, STR($2)); }else{ Lappendstr((List *)$$, ""); } }} | arglist1 ',' name units {P1{ pushlocal($3, ITEM0); Lappendsym(args, checklocal(SYM($3))); if ($4) { checklocal(SYM($3))->u.str = STR($4); Lappendstr((List *)$1, STR($4)); }else{ Lappendstr((List *)$1, ""); } }} ; procedblk: PROCEDURE NAME '(' arglist ')' stmtlist {P1{ declare(PROCED, $2, itemarray(3, $2, ITEM0, $4)); poplocal(); SYM($2)->usage |= FUNCT; } } ; netrecblk: NETRECEIVE '(' arglist ')' {P1{ List* l; Item* q; if ($3 == ITEM0) { diag("NET_RECEIVE must have at least one argument", (char*)0); } l = newlist(); q = lappendsym(l, install("flag", NAME)); pushlocal(q, ITEM0); Lappendstr((List *)$3, ""); netreceive_arglist = args; args = (List*)0; }} stmtlist { P1{poplocal();}} | NETRECEIVE error { myerr("Illegal NETRECEIVE block");} ; watchstmt: WATCH watch1 | watchstmt ',' watch1 | WATCH error { myerr("Illegal WATCH statement");} ; watch1: '(' expr ')' real ; fornetcon: FOR_NETCONS '(' arglist ')' {P1{ Item* q1, *q2; q1 = netreceive_arglist->next; q2 = args->next; while (q1 != netreceive_arglist && q2 != args) { Symbol* s1 = SYM(q1); Symbol* s2 = SYM(q2); if (s1->u.str) { /* s2 must be nil or same */ if (s2->u.str) { if (strcmp(s1->u.str, s2->u.str) != 0) { diag(s1->name, " in FOR_NETCONS arglist does not have same units as corresponding arg in NET_RECEIVE arglist"); } }else{ s2->u.str = s1->u.str; } }else{ /* s2 must be nil */ if (s2->u.str) { diag(s1->name, " in FOR_NETCONS arglist does not have same units as corresponding arg in NET_RECEIVE arglist"); } } /*printf("|%s|%s| |%s|%s|\n", s1->name, s1->u.str, s2->name, s2->u.str);*/ q1 = q1->next; q2 = q2->next; } if (q1 != netreceive_arglist || q2 != args) { diag("NET_RECEIVE and FOR_NETCONS do not have same number of arguments", (char*)0); } }} stmtlist | FOR_NETCONS error { myerr("Illegal FOR_NETCONS statement");} ; solveblk: SOLVE NAME ifsolerr {P1{$$ = itemarray(4, $1, $2, ITEM0, $3); lappenditem(solvelist, $$);}} | SOLVE NAME USING METHOD ifsolerr {P1{$$ = itemarray(4, $1, $2, $3, $4); lappenditem(solvelist, $$);}} | SOLVE error { myerr("Illegal SOLVE statement");} ; ifsolerr: /*nothing*/ { $$ = ITEM0; } | IFERROR stmtlist { $$ = $2; } ; solvefor: /*nothing*/ {$$ = ITEM0;} | solvefor1 ; solvefor1: SOLVEFOR NAME { P2{if(!(SYM($2)->subtype&STAT)){ myerr("Not a STATE");} } } | solvefor1 ',' NAME { P2{if(!(SYM($2)->subtype&STAT)){ myerr("Not a STATE");} } } | SOLVEFOR error {myerr("Syntax: SOLVEFOR name, name, ...");} ; eqnblk: BREAKPOINT stmtlist ; terminalblk: TERMINAL stmtlist ; sens: SENS namelist |SENS error {myerr("syntax is SENS var1, var2, var3, etc");} ; conserve: CONSERVE consreact '=' expr {P3{unit_cmp($2, $3, lastok);}} | CONSERVE error {myerr("Illegal CONSERVE syntax");} ; consreact:varname {P3{consreact_push($1);}} |INTEGER varname {P3{consreact_push($2);}} |consreact '+' varname {P3{consreact_push($3); unit_cmp($1,$2,lastok);}} |consreact '+' INTEGER varname { P3{consreact_push($4); unit_cmp($1,$2,lastok);} } ; compart: COMPARTMENT NAME {P1{pushlocal($2, ITEM0);}} ',' expr '{' compartlist '}' {P1{poplocal();} P3{ unit_pop(); } } | COMPARTMENT expr '{' compartlist '}' { P3{ unit_pop(); } } ; compartlist: NAME {P3 R0{unit_compartlist($1);}} | compartlist NAME {P3 R0{unit_compartlist($2);}} ; longdifus: LONGDIFUS NAME {P1{pushlocal($2, ITEM0);}} ',' expr '{' ldifuslist '}' {P1{poplocal();} P3{ unit_pop(); } } | LONGDIFUS expr '{' ldifuslist '}' { P3{ unit_pop(); } } ; ldifuslist: NAME {P3 R0{unit_ldifuslist($1, unitflagsave);}} | ldifuslist NAME {P3 R0{unit_ldifuslist($2, unitflagsave);}} ; namelist: Name | namelist ',' Name ; kineticblk: KINETIC NAME solvefor stmtlist {P1{declare(KINF, $2, ITEM0);}} ; reaction: REACTION react REACT1 react '(' expr ',' expr ')' {P3{kinunits($3, restart_pass);}} | REACTION react LT LT '(' expr ')' {P3{kinunits($3, restart_pass);}} | REACTION react '-' GT '(' expr ')' {P3{kinunits($3, restart_pass);}} | REACTION error {myerr("Illegal reaction syntax");} ; react: varname {P3{R1{ureactadd($1);} unit_push($1);}} |INTEGER varname {P3{R1{ureactadd($2);} unit_push($2); Unit_push((char*)0); unit_exponent($1,$1);}} |react '+' varname {P3{R1{ureactadd($3);}unit_push($3); unit_mul();}} |react '+' INTEGER varname { P3{R1{ureactadd($4);}unit_push($4); Unit_push((char*)0); unit_exponent($3,$3); unit_mul();} } ; lagstmt: LAG name BY NAME | LAG error {myerr("Lag syntax is: LAG name BY const");} ; tablestmt: TABLE tablst dependlst FROM expr TO expr WITH integer {P3{unit_pop(); unit_pop();}} ; tablst: /*Nothing*/ {$$ = ITEM0;} | namelist ; dependlst: /*Nothing*/ {$$ = ITEM0;} | DEPEND namelist ; queuestmt: PUTQ name | GETQ name ; matchblk: MATCH '{' matchlist '}' ; matchlist: match | matchlist match ; match: name | matchname '(' expr ')' '=' expr | error {myerr("MATCH syntax is state0 or state(expr)=expr or\ state[i](expr(i)) = expr(i)");} ; matchname: name | name '[' NAME ']' ; neuronblk: NEURON { lastok = $1; #if NRNUNIT P2{nrn_unit_chk();} #endif } '{' nrnstmt '}' {lastok = $3;} ; nrnstmt: /*nothing*/ | nrnstmt SUFFIX NAME { P1{nrn_list($2, $3);}} | nrnstmt nrnuse | nrnstmt NONSPECIFIC nrnlist { P1{nrn_list($2,$3);}} | nrnstmt ELECTRODE_CURRENT nrnlist { P1{nrn_list($2,$3);}} | nrnstmt RANGE nrnlist { P1{nrn_list($2, $3);}} | nrnstmt SECTION nrnlist { P1{nrn_list($2, $3);}} | nrnstmt GLOBAL nrnlist { P1{nrn_list($2, $3);}} | nrnstmt POINTER nrnlist { P1{nrn_list($2, $3);}} | nrnstmt EXTERNAL nrnlist { P1{nrn_list($2, $3);}} | nrnstmt THREADSAFE optnamelist ; optnamelist: /* nothing */ {$$ = NULL;} | namelist ; nrnuse: USEION NAME READ nrnlist valence {P1{nrn_use($2, $4, ITEM0);}} |USEION NAME WRITE nrnlist valence {P1{nrn_use($2, ITEM0, $4);}} |USEION NAME READ nrnlist WRITE nrnlist valence {P1{nrn_use($2, $4, $6);}} | error {myerr("syntax is: USEION ion READ list WRITE list");} ; nrnlist: NAME {P1{$$ = (Item *)newlist(); Lappendsym((List *)$$, SYM($1));}} | nrnlist ',' NAME {P1{ Lappendsym((List *)$1, SYM($3));}} | error {myerr("syntax is: keyword name , name, ..., name");} ; valence: /*nothing*/ {$$ = ITEM0;} | VALENCE real {$$ = $2;} | VALENCE '-' real {$$ = $3;} ; %% /* end of grammar */ static void yyerror(s) /* called for yacc syntax error */ char *s; { Fprintf(stderr, "%s:\n ", s); } static int yylex() {return next_intoken(&(yylval.qp));} #if !NRNUNIT void nrn_list(q1, q2) Item *q1, *q2; { /*ARGSUSED*/ } void nrn_use(q1, q2, q3) Item *q1, *q2, *q3; { /*ARGSUSED*/ } #endif neuron-7.5/src/modlunit/passn.c000077500000000000000000000034661323325274500166270ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/passn.c,v 1.1.1.1 1994/10/12 17:22:50 hines Exp */ /* Returns parse tokens in same order that lexical analyzer did */ #include "model.h" #include "parse1.h" #define DEBUG 0 #if DEBUG static int debugtoken=1; #else static int debugtoken=0; #endif Item *lex_tok; int parse_pass=0; int restart_pass=0; extern int yylex(); void parsepass(n) int n; { unitonflag = 1; parse_pass = n; if (parse_pass != 1) { lex_tok = intoken; } } void parse_restart(q, i) Item *q; int i; { if (i == restart_pass) { restart_pass = 0; return; } restart_pass = i; lex_tok = prev_parstok(q); if (!lex_tok) { lex_tok = intoken; } } int next_intoken(pitem) Item **pitem; { if (parse_pass == 1) { return yylex(); } lex_tok = next_parstok(lex_tok); if (lex_tok) { *pitem = lex_tok; if (debugtoken) { debugitem(*pitem); } return (*pitem)->itemsubtype; } return 0; } Item * next_parstok(intok) Item *intok; { if (!intok) { return ITEM0; } while ((intok = intok->next) != intoken) { /*EMPTY*/ if (intok->itemtype == NEWLINE) { ; }else{ switch (intok->itemsubtype) { case STUFF: case SPACE: break; default: return intok; } } } return ITEM0; } Item * prev_parstok(intok) Item *intok; { if (!intok) { return ITEM0; } while ((intok = intok->prev) != intoken) { /*EMPTY*/ if (intok->itemtype == NEWLINE) { ; }else{ switch (intok->itemsubtype) { case STUFF: case SPACE: break; default: return intok; } } } return ITEM0; } /* passn.c,v * Revision 1.1.1.1 1994/10/12 17:22:50 hines * NEURON 3.0 distribution * * Revision 1.2 91/01/07 14:17:12 hines * in kinunit, wrong itemsubtype. Fix lint messages * * Revision 1.1 90/11/13 16:10:22 hines * Initial revision * */ neuron-7.5/src/modlunit/symbol.c000077500000000000000000000054461323325274500170100ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/symbol.c,v 1.1.1.1 1994/10/12 17:22:50 hines Exp */ #include "model.h" #include "parse1.h" #include "symbol.h" List *symlist[128]; /* symbol table: linked list first char gives which list to use,but*/ List *symlistlist; /* for a stack of local symbol lists */ void symbol_init() { int i; symlistlist = newlist(); for (i=0; i<128; i++) { /* more than we need */ symlist[i] = newlist(); } } Symbol * lookup(s) /* find s in symbol table */ char *s; { Item *sp; ITERATE(sp, symlist[s[0]]) { if (strcmp(SYM(sp)->name, s) == 0) { return SYM(sp); } } return SYM0; /* 0 ==> not found */ } Symbol * checklocal(sym) Symbol *sym; { Item *sp; List *sl; char *s; s = sym->name; /* look in local lists */ ITERATE(sl, symlistlist) ITERATE(sp, (List *)sl->element) { if (strcmp(SYM(sp)->name, s) == 0) { return SYM(sp); } } return sym; } Symbol * install(s, t) /* install s in the list symbol table with type t*/ char *s; int t; { Symbol *sp; List *sl; if (t == STRING) { sl = symlist[0]; }else if (t == -1) { /*install on top local list see below*/ t = NAME; assert(symlistlist->next != symlistlist); sl = (List *)(symlistlist->next->element); }else{ sl = symlist[s[0]]; } sp = (Symbol *) emalloc(sizeof(Symbol)); sp->name = stralloc(s, (char *)0); sp->type = t; sp->subtype = 0; sp->info = ITEM0; sp->u.str = (char *)0; sp->used = 0; sp->usage = 0; sp->araydim = 0; sp->discdim = 0; sp->level = 100; /* larger than any reasonable submodel level */ Linsertsym(sl, sp); /*insert at head of list*/ return sp; } void pushlocal(q1, qdim) Item *q1, *qdim; { Item * q; q = linsertsym(symlistlist, SYM0); /*the type is irrelevant*/ q->element = (void *)newlist(); if (q1) { install_local(q1, qdim); } } void poplocal() { List *sl; Item *i, *j; assert(symlistlist->next != symlistlist); sl = (List *)symlistlist->next->element; for (i = sl->next; i != sl; i = j) { j = i->next; delete(i); } delete(symlistlist->next); } void install_local(q, qdim) Item *q, *qdim; { Symbol *s; s = install(SYM(q)->name, -1); s->subtype = LOCL; if (qdim) { decdim(s, qdim); } } /* symbol.c,v * Revision 1.1.1.1 1994/10/12 17:22:50 hines * NEURON 3.0 distribution * * Revision 1.5 91/01/25 09:31:37 hines * botched last fix * * Revision 1.4 91/01/24 15:25:19 hines * translation error when last token of LOCAL statement was the first token * after the LOCAL statement. Fixed by changing symbols at the parser insteadof the lexical analyser. * * Revision 1.3 90/12/12 11:33:12 hines * LOCAL vectors allowed. Some more NEURON syntax added * * Revision 1.2 90/11/13 16:10:23 hines * *** empty log message *** * * Revision 1.1 90/07/04 09:21:27 hines * Initial revision * */ neuron-7.5/src/modlunit/symbol.h000077500000000000000000000015641323325274500170120ustar00rootroot00000000000000/* /local/src/master/nrn/src/modlunit/symbol.h,v 1.1.1.1 1994/10/12 17:22:46 hines Exp */ extern List *symlist[]; #define SYMITERALL {int i; Item *qs; Symbol *s;\ for (i = 'A'; i <= 'z'; i++)\ ITERATE(qs, symlist[i])\ if ((s = SYM(qs))->type == NAME || s->type == PRIME) #define SYMITER(arg1) {int i; Item *qs; Symbol *s;\ for (i = 'A'; i <= 'z'; i++)\ ITERATE(qs, symlist[i])\ if ((s = SYM(qs))->type == arg1) #define SYMITER_STAT {int i; Item *qs; Symbol *s;\ for (i='A'; i <= 'z'; i++)\ ITERATE(qs, symlist[i])\ if ((s = SYM(qs))->subtype & STAT) #define SYMITER_SUB(arg1) {int i; Item *qs; Symbol *s;\ for (i='A'; i <= 'z'; i++)\ ITERATE(qs, symlist[i])\ if ((s = SYM(qs))->subtype & (arg1)) /* symbol.h,v * Revision 1.1.1.1 1994/10/12 17:22:46 hines * NEURON 3.0 distribution * * Revision 1.1 90/11/13 16:12:02 hines * Initial revision * */ neuron-7.5/src/modlunit/units.c000077500000000000000000000367071323325274500166510ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/units.c,v 1.5 1997/11/24 16:19:13 hines Exp */ /* Mostly from Berkeley */ #include #include #include #include #include "units.h" #include #if defined(CYGWIN) #include "../mswin/extra/d2upath.c" #endif #if defined(WIN32) #include #endif int unitonflag = 1; static int UnitsOn = 0; extern double fabs(); extern void diag(); #define IFUNITS {if (!UnitsOn) return;} #define OUTTOLERANCE(arg1,arg2) (fabs(arg2/arg1 - 1.) > 1.e-5) #define NTAB 601 /* if MODLUNIT environment variable not set then look in the following places*/ #if MAC static char *dfile = ":lib:nrnunits.lib"; #else #if defined(NEURON_DATA_DIR) static char *dfile = NEURON_DATA_DIR"/lib/nrnunits.lib"; #else static char *dfile = "/usr/lib/units"; #endif #endif #if defined(__TURBOC__) || defined(__GO32__) static char *dfilealt = "/nrn/lib/nrnunits.lib"; #else #if MAC static char *dfilealt = "::lib:nrnunits.lib"; #else static char *dfilealt = "../../share/lib/nrnunits.lib"; #endif #endif static char *unames[NDIM]; static double getflt(); static void fperr(); static int lookup(); static struct table *hash(); static void chkfperror(); static void units(); static int pu(); static int convr(); static void init(); static int get(); extern void Unit_push(char*); static struct table { double factor; #if -1 == '\377' char dim[NDIM]; #else signed char dim[NDIM]; #endif char *name; } table[NTAB]; static char names[NTAB*10]; static struct prefix { double factor; char *pname; } prefix[] = { 1e-18, "atto", 1e-15, "femto", 1e-12, "pico", 1e-9, "nano", 1e-6, "micro", 1e-3, "milli", 1e-2, "centi", 1e-1, "deci", 1e1, "deka", 1e2, "hecta", 1e2, "hecto", 1e3, "kilo", 1e6, "mega", 1e6, "meg", 1e9, "giga", 1e12, "tera", 0.0, 0 }; static FILE *inpfile; static int fperrc; static int peekc; static int dumpflg; static char *pc; static int Getc(inp) FILE *inp; { if (inp != stdin) { #if MAC int c = getc(inp); if (c == '\r') { c = '\n';} return c; #else return getc(inp); #endif }else if (pc && *pc) { return (int)(*pc++); }else{ return (int)('\n'); } } #define UNIT_STK_SIZE 20 static struct unit unit_stack[UNIT_STK_SIZE], *usp; static char* neuronhome() { #if defined(WIN32) int i; static char buf[256]; GetModuleFileName(NULL, buf, 256); for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /neuron.exe gone // printf("setneuronhome |%s|\n", buf); for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /bin gone #if defined(CYGWIN) { char* u = hoc_dos2unixpath(buf); strcpy(buf, hoc_dos2unixpath(u)); free(u); } #endif return buf; #else return getenv("NEURONHOME"); #endif } void unit_pop() { IFUNITS assert(usp >= unit_stack); --usp; } void unit_swap() { /*exchange top two elements of stack*/ struct unit *up; int i, j; double d; IFUNITS assert(usp > unit_stack); up = usp -1; d = usp->factor; usp->factor = up->factor; up->factor = d; for (i=0; idim[i]; usp->dim[i] = up->dim[i]; up->dim[i] = j; } } double unit_mag() { /* return unit magnitude that is on stack */ return usp->factor; } void unit_mag_mul(d) double d; { usp->factor *= d; } void punit() { struct unit * i; for (i=usp; i!=unit_stack-1; --i) { printf("%s\n", Unit_str(i)); } } void ucopypop(up) struct unit *up; { int i; for (i=0; idim[i] = usp->dim[i]; } up->factor = usp->factor; up->isnum = usp->isnum; unit_pop(); } void ucopypush(up) struct unit *up; { int i; Unit_push(""); for (i=0; idim[i] = up->dim[i]; } usp->factor = up->factor; usp->isnum = up->isnum; } void Unit_push(string) char *string; { IFUNITS assert(usp < unit_stack + (UNIT_STK_SIZE - 1)); ++usp; pc = string; if (string) { usp->isnum = 0; }else{ pc = ""; usp->isnum = 1; } convr(usp); /*printf("unit_push %s\n", string); units(usp);*/ } void unit_push_num(d) double d; { Unit_push(""); usp->factor = d; } void unitcheck(s) char *s; { Unit_push(s); unit_pop(); } char * unit_str() { /* return top of stack as units string */ if (!UnitsOn) return ""; return Unit_str(usp); } void install_units(s1, s2) /* define s1 as s2 */ char *s1, *s2; { struct table *tp; int i; IFUNITS Unit_push(s2); tp = hash(s1); if (tp->name) { printf("Redefinition of units (%s) to:", s1); units(usp); printf(" is ignored.\nThey remain:"); Unit_push(s1); units(usp); diag("Units redefinition", (char *)0); } tp->name = s1; tp->factor = usp->factor; for (i=0; idim[i] = usp->dim[i]; } unit_pop(); } void check_num() { struct unit * up = usp -1; /*EMPTY*/ if (up->isnum && usp->isnum) { ; } else { up->isnum = 0; } } void unit_mul() { /* multiply next element by top of stack and leave on stack */ struct unit *up; int i; IFUNITS assert(usp > unit_stack); check_num(); up = usp -1; for (i=0; idim[i] += usp->dim[i]; } up->factor *= usp->factor; unit_pop(); } void unit_div() { /* divide next element by top of stack and leave on stack */ struct unit *up; int i; IFUNITS assert(usp > unit_stack); check_num(); up = usp -1; for (i=0; idim[i] -= usp->dim[i]; } up->factor /= usp->factor; unit_pop(); } void Unit_exponent(val) int val; { /* multiply top of stack by val and leave on stack */ int i; double d; IFUNITS assert(usp >= unit_stack); for (i=0; idim[i] *= val; } d = usp->factor; for (i=1; ifactor *= d; } } int unit_cmp_exact() { /* returns 1 if top two units on stack are same */ struct unit *up; int i; {if (!UnitsOn) return 0;} up = usp - 1; if (unitonflag) { if (up->dim[0] == 9 || usp->dim[0] == 9) { return 1; } for (i=0; idim[i] != usp->dim[i]) { chkfperror(); return 0; } } if (OUTTOLERANCE(up->factor, usp->factor)) { chkfperror(); return 0; } } return 1; } /* ARGSUSED */ static void print_unit_expr(i) int i; {} void Unit_cmp() { /*compares top two units on stack. If not conformable then gives error. If not same factor then gives error. */ struct unit *up; int i; IFUNITS assert(usp > unit_stack); up = usp - 1; if (usp->isnum) { unit_pop(); return; } if (up->isnum) { for (i=0; i < NDIM; i++) { up->dim[i] = usp->dim[i]; } up->factor = usp->factor; up->isnum = 0; } if (unitonflag && up->dim[0] != 9 && usp->dim[0] != 9) { for (i=0; idim[i] != usp->dim[i]) { chkfperror(); print_unit_expr(2); fprintf(stderr, "\nunits:"); units(usp); print_unit_expr(1); fprintf(stderr, "\nunits:"); units(up); diag("The units of the previous two expressions are not conformable","\n"); } } if (OUTTOLERANCE(up->factor, usp->factor)) { chkfperror(); fprintf(stderr, "The previous primary expression with units: %s\n\ is missing a conversion factor and should read:\n (%g)*(", Unit_str(usp), usp->factor/up->factor); print_unit_expr(2); diag(")\n", (char *)0); } } unit_pop(); return; } int unit_diff() { /*compares top two units on stack. If not conformable then return 1, if not same factor return 2 if same return 0 */ struct unit *up; int i; if (!UnitsOn) return 0; assert(usp > unit_stack); up = usp - 1; if (up->dim[0] == 9 || usp->dim[0] == 9) { unit_pop(); return 0; } if (usp->isnum) { unit_pop(); return 0; } if (up->isnum) { for (i=0; i < NDIM; i++) { up->dim[i] = usp->dim[i]; } up->factor = usp->factor; up->isnum = 0; } for (i=0; idim[i] != usp->dim[i]) { return 1; } } if (OUTTOLERANCE(up->factor, usp->factor)) { return 2; } unit_pop(); return 0; } static void chkfperror() { if (fperrc) { diag("underflow or overflow in units calculation", (char *)0); } } void dimensionless() { /* ensures top element is dimensionless */ int i; IFUNITS assert(usp >= unit_stack); if (usp->dim[0] == 9) {return;} for (i=0; idim[i] != 0) { units(usp); diag("The previous expression is not dimensionless", (char *)0); } } } void unit_less() { /* ensures top element is dimensionless with factor 1*/ IFUNITS if (unitonflag) { dimensionless(); if (usp->dim[0]!=9 && OUTTOLERANCE(usp->factor,1.0)) { fprintf(stderr, "The previous expression needs the conversion factor (%g)\n", 1./(usp->factor)); diag("", (char *)0); } } unit_pop(); } void unit_stk_clean() { IFUNITS usp = unit_stack - 1; } #if MODL||NMODL||HMODL||SIMSYS extern void unit_init(); void modl_units() { static int first=1; unitonflag = 1; if (first) { unit_init(); first = 0; } } #endif void unit_init() { char* s; char buf[256]; inpfile = (FILE*)0; UnitsOn = 1; s = getenv("MODLUNIT"); if (s) { if ((inpfile = fopen(s, "r")) == (FILE *)0) { diag("Bad MODLUNIT environment variable. Cant open:", s); } } if (!inpfile && (inpfile = fopen(dfile, "r")) == (FILE *)0) { if ((inpfile = fopen(dfilealt, "r")) == (FILE *)0) { s = neuronhome(); if (s) { sprintf(buf, "%s/lib/nrnunits.lib", s); inpfile = fopen(buf, "r"); } } } if (!inpfile) { fprintf(stderr, "Set a MODLUNIT environment variable path to the units table file\n"); fprintf(stderr, "Cant open units table in either of:\n%s\n", buf); diag(dfile, dfilealt); } signal(8, fperr); init(); unit_stk_clean(); } #if 0 void main(argc, argv) char *argv[]; { register i; register char *file; struct unit u1, u2; double f; if(argc>1 && *argv[1]=='-') { argc--; argv++; dumpflg++; } file = dfile; if(argc > 1) file = argv[1]; if ((inpfile = fopen(file, "r")) == NULL) { printf("no table\n"); exit(1); } signal(8, fperr); init(); loop: fperrc = 0; printf("you have: "); if(convr(&u1)) goto loop; if(fperrc) goto fp; loop1: printf("you want: "); if(convr(&u2)) goto loop1; for(i=0; ifactor); {int seee=0; for (ucp=buf; *ucp; ucp++) { if (*ucp == 'e') seee=1; if (seee) *ucp = ucp[1]; } if (seee) ucp--;} f = 0; for(i=0; idim[i], i, f); if(f&1) { *ucp++ = '/'; f = 0; for(i=0; idim[i], i, f); } *ucp = '\0'; return buf; } static int pu(u, i, f) int u, i, f; { if(u > 0) { if(f&2) *ucp++ = '-'; if(unames[i]) { sprintf(ucp,"%s", unames[i]); ucp += strlen(ucp); } else{ sprintf(ucp,"*%c*", i+'a'); ucp += strlen(ucp); } if(u > 1) *ucp++ = (u+'0'); return(2); } if(u < 0) return(1); return(0); } static int convr(up) struct unit *up; { register struct unit *p; register int c; register char *cp; char name[20]; int den, err; p = up; for(c=0; cdim[c] = 0; p->factor = getflt(); if(p->factor == 0.) { p->factor = 1.0; } err = 0; den = 0; cp = name; loop: switch(c=get()) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '-': case '/': case ' ': case '\t': case '\n': if(cp != name) { *cp++ = 0; cp = name; err |= lookup(cp, p, den, c); } if(c == '/') den++; if(c == '\n') return(err); goto loop; } *cp++ = c; goto loop; } static int lookup(name, up, den, c) char *name; struct unit *up; int den, c; { register struct unit *p; register struct table *q; register int i; char *cp1, *cp2; double e; p = up; e = 1.0; loop: q = hash(name); if(q->name) { l1: if(den) { p->factor /= q->factor*e; for(i=0; idim[i] -= q->dim[i]; } else { p->factor *= q->factor*e; for(i=0; idim[i] += q->dim[i]; } if(c >= '2' && c <= '9') { c--; goto l1; } return(0); } for(i=0; (cp1 = prefix[i].pname) != 0; i++) { cp2 = name; while(*cp1 == *cp2++) if(*cp1++ == 0) { cp1--; break; } if(*cp1 == 0) { e *= prefix[i].factor; name = cp2-1; goto loop; } } /*EMPTY*/ for(cp1 = name; *cp1; cp1++); if(cp1 > name+1 && *--cp1 == 's') { *cp1 = 0; goto loop; } fprintf(stderr, "Need declaration in UNITS block of the form:\n\ (%s) (units)\n", name); diag("Cannot recognize the units: ", name); /* printf("cannot recognize %s\n", name);*/ return(1); } static int equal(s1, s2) char *s1, *s2; { register char *c1, *c2; c1 = s1; c2 = s2; while(*c1++ == *c2) if(*c2++ == 0) return(1); return(0); } static void init() { register char *cp; register struct table *tp, *lp; int c, i, f, t; char *np; cp = names; for(i=0; iname = np; lp->factor = 1.0; lp->dim[i] = 1; } lp = hash(""); lp->name = cp-1; lp->factor = 1.0; l0: c = get(); if(c == 0) { #if 0 printf("%d units; %d bytes\n\n", i, cp-names); #endif if(dumpflg) for(tp = table; tp < table+NTAB; tp++) { if(tp->name == 0) continue; printf("%s", tp->name); units((struct unit *)tp); } fclose(inpfile); inpfile = stdin; return; } if(c == '/') { while(c != '\n' && c != 0) c = get(); goto l0; } if(c == '\n') goto l0; np = cp; while(c != ' ' && c != '\t') { *cp++ = c; c = get(); if (c==0) goto l0; if(c == '\n') { *cp++ = 0; tp = hash(np); if(tp->name) goto redef; tp->name = np; tp->factor = lp->factor; for(c=0; cdim[c] = lp->dim[c]; i++; goto l0; } } *cp++ = 0; lp = hash(np); if(lp->name) goto redef; convr((struct unit *)lp); lp->name = np; f = 0; i++; if(lp->factor != 1.0) goto l0; for(c=0; cdim[c]; if(t>1 || (f>0 && t!=0)) goto l0; if(f==0 && t==1) { if(unames[c]) goto l0; f = c+1; } } if(f>0) unames[f-1] = np; goto l0; redef: printf("redefinition %s\n", np); goto l0; } static double getflt() { register int c, i, dp; double d, e; int f; d = 0.; dp = 0; do c = get(); while(c == ' ' || c == '\t'); l1: if(c >= '0' && c <= '9') { d = d*10. + c-'0'; if(dp) dp++; c = get(); goto l1; } if(c == '.') { dp++; c = get(); goto l1; } if(dp) dp--; if(c == '+' || c == '-') { f = 0; if(c == '-') f++; i = 0; c = get(); while(c >= '0' && c <= '9') { i = i*10 + c-'0'; c = get(); } if(f) i = -i; dp -= i; } e = 1.; i = dp; if(i < 0) i = -i; while(i--) e *= 10.; if(dp < 0) d *= e; else d /= e; if(c == '|') return(d/getflt()); peekc = c; return(d); } static int get() { register int c; /*SUPPRESS 560*/ if((c=peekc) != 0) { peekc = 0; return(c); } c = Getc(inpfile); if (c == '\r') { c = Getc(inpfile); } if (c == EOF) { if (inpfile == stdin) { printf("\n"); exit(0); } return(0); } return(c); } static struct table * hash(name) char *name; { register struct table *tp; register char *np; register unsigned h; h = 0; np = name; while(*np) h = h*57 + *np++ - '0'; if( ((int)h)<0) h= -(int)h; h %= NTAB; tp = &table[h]; l0: if(tp->name == 0) return(tp); if(equal(name, tp->name)) return(tp); tp++; if(tp >= table+NTAB) tp = table; goto l0; } static void fperr(sig) int sig; { signal(8, fperr); fperrc++; } neuron-7.5/src/modlunit/units.h000077500000000000000000000003231323325274500166370ustar00rootroot00000000000000#define NDIM 10 struct unit { double factor; #if -1 == '\377' char dim[NDIM]; #else signed char dim[NDIM]; #endif int isnum; }; extern char *Unit_str(); extern int unit_diff(); extern int unit_cmp_exact(); neuron-7.5/src/modlunit/units1.c000077500000000000000000000066601323325274500167250ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/units1.c,v 1.1.1.1 1994/10/12 17:22:51 hines Exp */ /* Just a connection to units.c so that file doesn't need to include modl.h */ #include "model.h" #include "parse1.h" void unit_push(q) Item *q; { Unit_push(decode_units(SYM(q))); } char * decode_units(sym) Symbol *sym; { if (sym->u.str) { return sym->u.str; } if (sym->info && ITMA(sym->info)[1]) { return STR(ITMA(sym->info)[1]); } return ""; } void ifcnvfac(q3) /* '(' expr ')' */ Item *q3; { Item *q1, *q2; double d; q2 = prev_parstok(q3); q1 = prev_parstok(q2); if (q1->itemsubtype == '(') { if(q2->itemsubtype == REAL || q2->itemsubtype == INTEGER) { unit_pop(); sscanf(STR(q2), "%lf", &d); unit_push_num(1./d); }else if (q2->itemsubtype == DEFINEDVAR) { unit_pop(); d = (double) (SYM(q2)->u.i); unit_push_num(1./d); } } } /* x^y y must be dimensionless. If x is dimensionless then y can be any expression. If x has dimensions then y must be a positive integer and the units can be computed */ void unit_exponent(y, lastok) /*x ^ y*/ Item *y, *lastok; { int i; double yval; unit_less(); if ( y == lastok && y->itemsubtype == INTEGER) { i = sscanf(STR(y), "%lf", &yval); assert(i == 1); if (yval - (double)((int)yval)) { unit_less(); Unit_push(""); } else { Unit_exponent((int)yval); } }else{ unit_less(); Unit_push(""); } } static Item *qexpr[3]; void unit_cmp(q1, q2, q3) Item *q1, *q2, *q3; { qexpr[0] = q1; qexpr[1] = q2; qexpr[2] = q3; Unit_cmp(); } void print_unit_expr(i) int i; { if (i==1) { if (qexpr[0]) { printitems(qexpr[0], qexpr[1]->prev); } }else{ if (qexpr[1]) { printitems(qexpr[1]->next, qexpr[2]); } } } void unit_logic(type, q1, q2, q3) int type; Item *q1, *q2, *q3; { /* if type is 1 then it doesn't matter what the top two elements are: the result is dimensionless. If the type is 2 then the top two elements must have the same dimensions and the result is dimensionless. */ if (type == 2) { unit_cmp(q1, q2, q3); }else{ unit_pop(); } unit_pop(); Unit_push(""); } #define NLEVEL 10 /* 10 levels of call! */ static int argnumstk[NLEVEL], pargnum = -1; void unit_push_args(q1) Item *q1; { List *larg; Item *q; Symbol *s; pargnum++; assert(pargnum < NLEVEL); s = SYM(q1); /* push the args with units in reverse order */ if (s->info && (larg = (List *) ITMA(s->info)[2])) { /*declared*/ argnumstk[pargnum] = 0; for (q=larg->prev; q != larg; q = q->prev) { argnumstk[pargnum]++; Unit_push(STR(q)); } }else{ argnumstk[pargnum] = -1; } } void unit_done_args() { if (argnumstk[pargnum] > 0) { diag("too few arguments", (char *)0); } assert(pargnum >= 0); pargnum--; } void unit_chk_arg(q1, q2) Item *q1, *q2; { if (argnumstk[pargnum] > 0) { argnumstk[pargnum]--; unit_cmp(ITEM0, q1->prev, q2); unit_pop(); }else if (argnumstk[pargnum] == 0) { diag("too many arguments", (char *)0); }else{ unit_less(); } } void func_unit(q1, q2) Item *q1, *q2; { Symbol *s, *checklocal(); s = SYM(q1); s = checklocal(s); /* hidden with pushlocal */ s->subtype = DEP; if (q2) { s->u.str = STR(q2); }else{ s->u.str = (char *)0; } } void unit_del(i) /* push 1/delta_x ^ i units */ int i; { Symbol *s; char *cp; s = lookup("delta_x"); if(!s) { diag("delta_x not declared", (char *)0); } cp = decode_units(s); Unit_push(""); while(i--) { Unit_push(cp); unit_div(); } } neuron-7.5/src/modlunit/version.c000077500000000000000000000133471323325274500171670ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/modlunit/version.c,v 1.1.1.1 1994/10/12 17:22:51 hines Exp */ char *RCS_version = "1.1.1.1"; char *RCS_date = "1994/10/12 17:22:51"; /* version.c,v * Revision 1.1.1.1 1994/10/12 17:22:51 hines * NEURON 3.0 distribution * * Revision 1.53 1994/09/26 18:51:06 hines * USEION ... VALENCE real * * Revision 1.52 1994/09/20 14:43:18 hines * port to dec alpha * * Revision 1.51 1994/08/23 15:43:48 hines * if no independent block then t (ms) declared for neuron * * Revision 1.50 1994/08/18 12:09:42 hines * check units of CONSERVE stmt * * Revision 1.49 1994/08/05 13:59:11 hines * NullParameter replaces null arg in Imakefile * * Revision 1.48 1994/07/30 17:12:53 hines * standard check for BISON * * Revision 1.47 1994/06/01 17:31:39 hines * look for gnu version of units.lib in $NEURONHOME/lib/nrnunits.lib * * Revision 1.46 1994/05/23 17:56:02 hines * error in handling MODL_INCLUDE when no file exists * * Revision 1.45 1994/05/18 18:08:13 hines * INCLUDE "file" * tries originalpath/file ./file MODL_INCLUDEpaths/file * * Revision 1.44 1994/03/17 15:21:11 hines * ? token same as comment : token * * Revision 1.43 1993/11/04 15:52:23 hines * port to solaris2 (no more warnings) * * Revision 1.42 1993/07/08 14:36:58 hines * An alternative to NONSPECIFIC_CURRENT is ELECTRODE_CURRENT * * Revision 1.41 93/02/15 08:58:51 hines * linux * * Revision 1.40 93/02/11 17:00:10 hines * now works on NeXT * * Revision 1.39 93/02/01 15:15:52 hines * static functions should be declared before use * * Revision 1.38 92/11/16 14:15:16 hines * small error in Imakefila * * Revision 1.37 92/10/24 11:31:35 hines * when no units table , say what to do. * * Revision 1.36 92/06/01 13:25:52 hines * NEURON {EXTERNAL name, name, ...} allowed * * Revision 1.35 92/05/05 08:30:07 hines * need to link with math library (at least for RS6000) * * Revision 1.34 92/03/09 17:24:18 hines * internal error in handling stoichiometry units. fixed. * * Revision 1.33 92/02/17 12:31:02 hines * constant states with a compartment size didn't have space allocated * to store the compartment size. * * Revision 1.32 92/02/15 21:20:23 hines * if translated by bison use -DBISON=1 * NEURON { POINTER ...} allowed * * Revision 1.31 92/01/28 14:17:29 hines * distribution ready * * Revision 1.30 91/12/27 10:57:25 hines * units for f_flux and b_flux in KINETIC block. * Implemented by turning off units checking on pass 3 of restartpass 0 * and then turning it back on on pass3 of restartpass 1. * * Revision 1.29 91/10/28 08:53:36 hines * Wathey's improvements. Runs on MIPS. Binaries go to bin directory. * * Revision 1.28 91/09/16 16:04:04 hines * NEURON { RANGE SECTION GLOBAL} syntax * * Revision 1.27 91/08/13 10:05:13 hines * to work on rs6000 * * Revision 1.26 91/08/12 11:38:03 hines * more generic makefile. MACHDEF changes if machine dependent definitions * are needed. * * Revision 1.25 91/06/29 08:46:57 hines * more general units factor of form name=(unit) (unit) * slight change to syntax * * Revision 1.24 91/06/25 09:18:15 hines * fix loose ends from last major change to makefile * * Revision 1.23 91/06/25 07:27:49 hines * more generic . remove sun4 isms * * Revision 1.22 91/02/09 16:39:43 hines * special neuron variables checked for correct units. * * Revision 1.21 91/01/29 07:10:50 hines * POINT_PROCESS keyword allowed * * Revision 1.20 91/01/28 17:26:16 hines * works with turboc++ (different varargs method) * * Revision 1.19 91/01/25 14:01:17 hines * forgot to checkin on last fix * * Revision 1.18 91/01/25 09:31:40 hines * botched last fix * * Revision 1.17 91/01/24 15:25:23 hines * translation error when last token of LOCAL statement was the first token * after the LOCAL statement. Fixed by changing symbols at the parser insteadof the lexical analyser. * * Revision 1.16 91/01/24 11:46:24 hines * PROCEDURE argument units were not being saved. * * Revision 1.15 91/01/07 14:31:57 hines * Compartment list is space separated not comma separated * * Revision 1.14 91/01/07 14:17:13 hines * in kinunit, wrong itemsubtype. Fix lint messages * * Revision 1.13 90/12/12 11:33:14 hines * LOCAL vectors allowed. Some more NEURON syntax added * * Revision 1.12 90/12/06 15:25:55 hines * 5 of 7 lint messages in units.c removed * * Revision 1.11 90/11/26 13:20:09 hines * after adding unit_swap, the comparison needs to be reversed. * Now the last expression in on the top of the stack normally. * * Revision 1.10 90/11/26 13:09:54 hines * sometimes need to swap top of units stack. * * Revision 1.9 90/11/23 15:08:40 hines * used by MODL to calculate factors * * Revision 1.8 90/11/23 13:58:16 hines * don't print units init message. * * Revision 1.7 90/11/23 13:44:01 hines * BREAKPOINT PARAMETER * * Revision 1.6 90/11/20 15:40:03 hines * comment out print statements that debug value, units for factordef: * * Revision 1.5 90/11/20 15:33:12 hines * added 4 varieties of unit factors. They are * name = (real) * name = ((unit) -> (unit)) must be conformable * name = (physical_constant) * name = (physical_constant (unit)) must be conformable * * Revision 1.4 90/11/16 14:23:07 hines * units for partial derivative equation. fixed bug in array declarations * get sources from rcs correctly * * Revision 1.3 90/11/16 07:53:48 hines * take out the .c and .var file * * Revision 1.2 90/11/15 13:01:23 hines * function units and number units work. accepts NEURON block * * Revision 1.1 90/11/13 16:10:38 hines * Initial revision * */ neuron-7.5/src/mswin/000077500000000000000000000000001323325274500146255ustar00rootroot00000000000000neuron-7.5/src/mswin/AddToPath.nsh.in000066400000000000000000000064031323325274500175570ustar00rootroot00000000000000 ;-------------------------------------------------------------------- ; Path functions ; ; Based on example from: ; http://nsis.sourceforge.net/Path_Manipulation ; !include "WinMessages.nsh" ; Registry Entry for environment (NT4,2000,XP) ; All users: ;!define Environ 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' ; Current user only: !define Environ 'HKCU "Environment"' ; AddToPath - Appends dir to PATH ; (does not work on Win9x/ME) ; ; Usage: ; Push "dir" ; Call AddToPath Function AddToPath Exch $0 Push $1 Push $2 Push $3 Push $4 ; NSIS ReadRegStr returns empty string on string overflow ; Native calls are used here to check actual length of PATH ; $4 = RegOpenKey(HKEY_CURRENT_USER, "Environment", &$3) System::Call "advapi32::RegOpenKey(i 0x80000001, t'Environment', *i.r3) i.r4" IntCmp $4 0 0 done done ; $4 = RegQueryValueEx($3, "PATH", (DWORD*)0, (DWORD*)0, &$1, ($2=NSIS_MAX_STRLEN, &$2)) ; RegCloseKey($3) System::Call "advapi32::RegQueryValueEx(i $3, t'PATH', i 0, i 0, t.r1, *i ${NSIS_MAX_STRLEN} r2) i.r4" System::Call "advapi32::RegCloseKey(i $3)" IntCmp $4 234 0 +4 +4 ; $4 == ERROR_MORE_DATA DetailPrint "AddToPath: original length $2 > ${NSIS_MAX_STRLEN}" MessageBox MB_OK "PATH not updated, original length $2 > ${NSIS_MAX_STRLEN}" Goto done IntCmp $4 0 +5 ; $4 != NO_ERROR IntCmp $4 2 +3 ; $4 != ERROR_FILE_NOT_FOUND DetailPrint "AddToPath: unexpected error code $4" Goto done StrCpy $1 "" ; Check if already in PATH Push "$1;" Push "$0;" Call StrStr Pop $2 StrCmp $2 "" 0 done Push "$1;" Push "$0\;" Call StrStr Pop $2 StrCmp $2 "" 0 done ; Prevent NSIS string overflow StrLen $2 $0 StrLen $3 $1 IntOp $2 $2 + $3 IntOp $2 $2 + 2 ; $2 = strlen(dir) + strlen(PATH) + sizeof(";") IntCmp $2 ${NSIS_MAX_STRLEN} +4 +4 0 DetailPrint "AddToPath: new length $2 > ${NSIS_MAX_STRLEN}" MessageBox MB_OK "PATH not updated, new length $2 > ${NSIS_MAX_STRLEN}." Goto done ; Append dir to PATH DetailPrint "Add to PATH: $0" StrCpy $2 $1 1 -1 StrCmp $2 ";" 0 +2 StrCpy $1 $1 -1 ; remove trailing ';' StrCmp $1 "" +2 ; no leading ';' StrCpy $0 "$1;$0" WriteRegExpandStr ${Environ} "PATH" $0 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 done: Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 FunctionEnd ; RemoveFromPath - Removes dir from PATH ; ; Usage: ; Push "dir" ; Call RemoveFromPath Function un.RemoveFromPath Exch $0 Push $1 Push $2 Push $3 Push $4 Push $5 Push $6 ReadRegStr $1 ${Environ} "PATH" StrCpy $5 $1 1 -1 StrCmp $5 ";" +2 StrCpy $1 "$1;" ; ensure trailing ';' Push $1 Push "$0;" Call un.StrStr Pop $2 ; pos of our dir StrCmp $2 "" done DetailPrint "Remove from PATH: $0" StrLen $3 "$0;" StrLen $4 $2 StrCpy $5 $1 -$4 ; $5 is now the part before the path to remove StrCpy $6 $2 "" $3 ; $6 is now the part after the path to remove StrCpy $3 "$5$6" StrCpy $5 $3 1 -1 StrCmp $5 ";" 0 +2 StrCpy $3 $3 -1 ; remove trailing ';' WriteRegExpandStr ${Environ} "PATH" $3 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 done: Pop $6 Pop $5 Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 FunctionEnd neuron-7.5/src/mswin/EnvVarUpdate.nsh.in000066400000000000000000000252461323325274500203210ustar00rootroot00000000000000/** * EnvVarUpdate.nsh * : Environmental Variables: append, prepend, and remove entries * * WARNING: If you use StrFunc.nsh header then include it before this file * with all required definitions. This is to avoid conflicts * * Usage: * ${EnvVarUpdate} "ResultVar" "EnvVarName" "Action" "RegLoc" "PathString" * * Credits: * Version 1.0 * * Cal Turney (turnec2) * * Amir Szekely (KiCHiK) and e-circ for developing the forerunners of this * function: AddToPath, un.RemoveFromPath, AddToEnvVar, un.RemoveFromEnvVar, * WriteEnvStr, and un.DeleteEnvStr * * Diego Pedroso (deguix) for StrTok * * Kevin English (kenglish_hi) for StrContains * * Hendri Adriaens (Smile2Me), Diego Pedroso (deguix), and Dan Fuhry * (dandaman32) for StrReplace * * Version 1.1 (compatibility with StrFunc.nsh) * * techtonik * * http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries * */ !ifndef ENVVARUPDATE_FUNCTION !define ENVVARUPDATE_FUNCTION !verbose push !verbose 3 !include "LogicLib.nsh" !include "WinMessages.NSH" !include "StrFunc.nsh" ; ---- Fix for conflict if StrFunc.nsh is already includes in main file ----------------------- !macro _IncludeStrFunction StrFuncName !ifndef ${StrFuncName}_INCLUDED ${${StrFuncName}} !endif !ifndef Un${StrFuncName}_INCLUDED ${Un${StrFuncName}} !endif !define un.${StrFuncName} "${Un${StrFuncName}}" !macroend !insertmacro _IncludeStrFunction StrTok !insertmacro _IncludeStrFunction StrStr !insertmacro _IncludeStrFunction StrRep ; ---------------------------------- Macro Definitions ---------------------------------------- !macro _EnvVarUpdateConstructor ResultVar EnvVarName Action Regloc PathString Push "${EnvVarName}" Push "${Action}" Push "${RegLoc}" Push "${PathString}" Call EnvVarUpdate Pop "${ResultVar}" !macroend !define EnvVarUpdate '!insertmacro "_EnvVarUpdateConstructor"' !macro _unEnvVarUpdateConstructor ResultVar EnvVarName Action Regloc PathString Push "${EnvVarName}" Push "${Action}" Push "${RegLoc}" Push "${PathString}" Call un.EnvVarUpdate Pop "${ResultVar}" !macroend !define un.EnvVarUpdate '!insertmacro "_unEnvVarUpdateConstructor"' ; ---------------------------------- Macro Definitions end------------------------------------- ;----------------------------------- EnvVarUpdate start---------------------------------------- !define hklm_all_users 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !define hkcu_current_user 'HKCU "Environment"' !macro EnvVarUpdate UN Function ${UN}EnvVarUpdate Push $0 Exch 4 Exch $1 Exch 3 Exch $2 Exch 2 Exch $3 Exch Exch $4 Push $5 Push $6 Push $7 Push $8 Push $9 Push $R0 /* After this point: ------------------------- $0 = ResultVar (returned) $1 = EnvVarName (input) $2 = Action (input) $3 = RegLoc (input) $4 = PathString (input) $5 = Orig EnvVar (read from registry) $6 = Len of $0 (temp) $7 = tempstr1 (temp) $8 = Entry counter (temp) $9 = tempstr2 (temp) $R0 = tempChar (temp) */ ; Step 1: Read contents of EnvVarName from RegLoc ; ; Check for empty EnvVarName ${If} $1 == "" SetErrors DetailPrint "ERROR: EnvVarName is blank" Goto EnvVarUpdate_Restore_Vars ${EndIf} ; Check for valid Action ${If} $2 != "A" ${AndIf} $2 != "P" ${AndIf} $2 != "R" SetErrors DetailPrint "ERROR: Invalid Action - must be A, P, or R" Goto EnvVarUpdate_Restore_Vars ${EndIf} ${If} $3 == HKLM ReadRegStr $5 ${hklm_all_users} $1 ; Get EnvVarName from all users into $5 ${ElseIf} $3 == HKCU ReadRegStr $5 ${hkcu_current_user} $1 ; Read EnvVarName from current user into $5 ${Else} SetErrors DetailPrint 'ERROR: Action is [$3] but must be "HKLM" or HKCU"' Goto EnvVarUpdate_Restore_Vars ${EndIf} ; Check for empty PathString ${If} $4 == "" SetErrors DetailPrint "ERROR: PathString is blank" Goto EnvVarUpdate_Restore_Vars ${EndIf} ;;khc - here check if length is going to be greater then max string length ;; and abort if so - also abort if original path empty - may mean ;; it was too long as well- write message to say set it by hand Push $6 Push $7 Push $8 StrLen $7 $4 StrLen $6 $5 IntOp $8 $6 + $7 ;${If} $5 == "" ;${OrIf} $8 >= ${NSIS_MAX_STRLEN} ${If} $8 >= ${NSIS_MAX_STRLEN} SetErrors DetailPrint "Current $1 length ($6) too long to modify in NSIS; set manually if needed" Pop $8 Pop $7 Pop $6 Goto EnvVarUpdate_Restore_Vars ${EndIf} Pop $8 Pop $7 Pop $6 ;;khc ; Make sure we've got some work to do ${If} $5 == "" ${AndIf} $2 == "R" SetErrors DetailPrint "$1 is empty - Nothing to remove" Goto EnvVarUpdate_Restore_Vars ${EndIf} ; Step 2: Scrub EnvVar ; StrCpy $0 $5 ; Copy the contents to $0 ; Remove spaces around semicolons (NOTE: spaces before the 1st entry or ; after the last one are not removed here but instead in Step 3) ${If} $0 != "" ; If EnvVar is not empty ... ${Do} ${${UN}StrStr} $7 $0 " ;" ${If} $7 == "" ${ExitDo} ${EndIf} ${${UN}StrRep} $0 $0 " ;" ";" ; Remove ';' ${Loop} ${Do} ${${UN}StrStr} $7 $0 "; " ${If} $7 == "" ${ExitDo} ${EndIf} ${${UN}StrRep} $0 $0 "; " ";" ; Remove ';' ${Loop} ${Do} ${${UN}StrStr} $7 $0 ";;" ${If} $7 == "" ${ExitDo} ${EndIf} ${${UN}StrRep} $0 $0 ";;" ";" ${Loop} ; Remove a leading or trailing semicolon from EnvVar StrCpy $7 $0 1 0 ${If} $7 == ";" StrCpy $0 $0 "" 1 ; Change ';' to '' ${EndIf} StrLen $6 $0 IntOp $6 $6 - 1 StrCpy $7 $0 1 $6 ${If} $7 == ";" StrCpy $0 $0 $6 ; Change ';' to '' ${EndIf} ; DetailPrint "Scrubbed $1: [$0]" ; Uncomment to debug ${EndIf} /* Step 3. Remove all instances of the target path/string (even if "A" or "P") $6 = bool flag (1 = found and removed PathString) $7 = a string (e.g. path) delimited by semicolon(s) $8 = entry counter starting at 0 $9 = copy of $0 $R0 = tempChar */ ${If} $5 != "" ; If EnvVar is not empty ... StrCpy $9 $0 StrCpy $0 "" StrCpy $8 0 StrCpy $6 0 ${Do} ${${UN}StrTok} $7 $9 ";" $8 "0" ; $7 = next entry, $8 = entry counter ${If} $7 == "" ; If we've run out of entries, ${ExitDo} ; were done ${EndIf} ; ; Remove leading and trailing spaces from this entry (critical step for Action=Remove) ${Do} StrCpy $R0 $7 1 ${If} $R0 != " " ${ExitDo} ${EndIf} StrCpy $7 $7 "" 1 ; Remove leading space ${Loop} ${Do} StrCpy $R0 $7 1 -1 ${If} $R0 != " " ${ExitDo} ${EndIf} StrCpy $7 $7 -1 ; Remove trailing space ${Loop} ${If} $7 == $4 ; If string matches, remove it by not appending it StrCpy $6 1 ; Set 'found' flag ${ElseIf} $7 != $4 ; If string does NOT match ${AndIf} $0 == "" ; and the 1st string being added to $0, StrCpy $0 $7 ; copy it to $0 without a prepended semicolon ${ElseIf} $7 != $4 ; If string does NOT match ${AndIf} $0 != "" ; and this is NOT the 1st string to be added to $0, StrCpy $0 $0;$7 ; append path to $0 with a prepended semicolon ${EndIf} ; IntOp $8 $8 + 1 ; Bump counter ${Loop} ; Check for duplicates until we run out of paths ${EndIf} ; Step 4: Perform the requested Action ; ${If} $2 != "R" ; If Append or Prepend ${If} $6 == 1 ; And if we found the target DetailPrint "Target is already present in $1. It will be removed and" ${EndIf} ${If} $0 == "" ; If EnvVar is (now) empty StrCpy $0 $4 ; just copy PathString to EnvVar ${If} $6 == 0 ; If found flag is either 0 ${OrIf} $6 == "" ; or blank (if EnvVarName is empty) DetailPrint "$1 was empty and has been updated with the target" ${EndIf} ${ElseIf} $2 == "A" ; If Append (and EnvVar is not empty), StrCpy $0 $0;$4 ; append PathString ${If} $6 == 1 DetailPrint "appended to $1" ${Else} DetailPrint "Target was appended to $1" ${EndIf} ${Else} ; If Prepend (and EnvVar is not empty), StrCpy $0 $4;$0 ; prepend PathString ${If} $6 == 1 DetailPrint "prepended to $1" ${Else} DetailPrint "Target was prepended to $1" ${EndIf} ${EndIf} ${Else} ; If Action = Remove ${If} $6 == 1 ; and we found the target DetailPrint "Target was found and removed from $1" ${Else} DetailPrint "Target was NOT found in $1 (nothing to remove)" ${EndIf} ${If} $0 == "" DetailPrint "$1 is now empty" ${EndIf} ${EndIf} ; Step 5: Update the registry at RegLoc with the updated EnvVar and announce the change ; ClearErrors ${If} $3 == HKLM WriteRegExpandStr ${hklm_all_users} $1 $0 ; Write it in all users section ${ElseIf} $3 == HKCU WriteRegExpandStr ${hkcu_current_user} $1 $0 ; Write it to current user section ${EndIf} IfErrors 0 +4 MessageBox MB_OK|MB_ICONEXCLAMATION "Could not write updated $1 to $3" DetailPrint "Could not write updated $1 to $3" Goto EnvVarUpdate_Restore_Vars ; "Export" our change SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 EnvVarUpdate_Restore_Vars: ; ; Restore the user's variables and return ResultVar Pop $R0 Pop $9 Pop $8 Pop $7 Pop $6 Pop $5 Pop $4 Pop $3 Pop $2 Pop $1 Push $0 ; Push my $0 (ResultVar) Exch Pop $0 ; Restore his $0 FunctionEnd !macroend ; EnvVarUpdate UN !insertmacro EnvVarUpdate "" !insertmacro EnvVarUpdate "un." ;----------------------------------- EnvVarUpdate end---------------------------------------- !verbose pop !endif neuron-7.5/src/mswin/Makefile.am000077500000000000000000000010361323325274500166640ustar00rootroot00000000000000SUBDIRS = DIST_SUBDIRS = batch extra rdln windll wnrnbbs bin lib EXTRA_DIST = bbsconf.h njconf.h nrnconf.h nrniv.ico nrniv10.ico nrniv.rc \ nrnneosm.h mwprefix.h nrncygso.sh nrnsetup.nsi AM_CFLAGS = @MINGW_CFLAG@ if BUILD_CYGWIN all-am: nrniv.exe FORCE: nrniv.exe: FORCE IVLIBDIR="$(IV_LIBDIR)" CFLAGS="$(AM_CFLAGS)" LDFLAGS="$(LDFLAGS)" sh -e nrncygso.sh endif if BUILD_MINGW all-am: nrniv.exe FORCE: nrniv.exe: FORCE IVLIBDIR="$(IV_LIBDIR)" CFLAGS="$(AM_CFLAGS)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" sh -e nrncygso.sh endif neuron-7.5/src/mswin/Makefile.in000066400000000000000000000565261323325274500167100ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = nrncygso.sh nrnsetup.nsi nrnsetupmingw.nsi \ EnvVarUpdate.nsh AddToPath.nsh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/AddToPath.nsh.in \ $(srcdir)/EnvVarUpdate.nsh.in $(srcdir)/Makefile.in \ $(srcdir)/nrncygso.sh.in $(srcdir)/nrnsetup.nsi.in \ $(srcdir)/nrnsetupmingw.nsi.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = DIST_SUBDIRS = batch extra rdln windll wnrnbbs bin lib EXTRA_DIST = bbsconf.h njconf.h nrnconf.h nrniv.ico nrniv10.ico nrniv.rc \ nrnneosm.h mwprefix.h nrncygso.sh nrnsetup.nsi AM_CFLAGS = @MINGW_CFLAG@ all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrncygso.sh: $(top_builddir)/config.status $(srcdir)/nrncygso.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrnsetup.nsi: $(top_builddir)/config.status $(srcdir)/nrnsetup.nsi.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrnsetupmingw.nsi: $(top_builddir)/config.status $(srcdir)/nrnsetupmingw.nsi.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ EnvVarUpdate.nsh: $(top_builddir)/config.status $(srcdir)/EnvVarUpdate.nsh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ AddToPath.nsh: $(top_builddir)/config.status $(srcdir)/AddToPath.nsh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @BUILD_CYGWIN_TRUE@all-am: nrniv.exe @BUILD_CYGWIN_TRUE@FORCE: @BUILD_CYGWIN_TRUE@nrniv.exe: FORCE @BUILD_CYGWIN_TRUE@ IVLIBDIR="$(IV_LIBDIR)" CFLAGS="$(AM_CFLAGS)" LDFLAGS="$(LDFLAGS)" sh -e nrncygso.sh @BUILD_MINGW_TRUE@all-am: nrniv.exe @BUILD_MINGW_TRUE@FORCE: @BUILD_MINGW_TRUE@nrniv.exe: FORCE @BUILD_MINGW_TRUE@ IVLIBDIR="$(IV_LIBDIR)" CFLAGS="$(AM_CFLAGS)" LDFLAGS="$(LDFLAGS)" \ @BUILD_MINGW_TRUE@ LIBS="$(LIBS)" sh -e nrncygso.sh # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/batch/000077500000000000000000000000001323325274500157065ustar00rootroot00000000000000neuron-7.5/src/mswin/batch/Makefile.am000077500000000000000000000001421323325274500177420ustar00rootroot00000000000000EXTRA_DIST = mzipall.sh mzipcyg.sh mzipdll.sh mzipfile.sh mzipnrn.sh \ instal.sh instalmingw.sh neuron-7.5/src/mswin/batch/Makefile.in000066400000000000000000000373361323325274500177670ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/batch ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = mzipall.sh mzipcyg.sh mzipdll.sh mzipfile.sh mzipnrn.sh \ instal.sh instalmingw.sh all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/batch/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/batch/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/batch/instal.sh000077500000000000000000000214171323325274500175440ustar00rootroot00000000000000#!/bin/sh # install from the build directories to the mswin destination # uses the classical positions of files if test "$top_srcdir" = "" ; then echo "instal.sh should be executed at top level with make mswin" else S=`cygpath -u -a $top_srcdir | sed 's/\/$//'` export S fi if test "$top_builddir" = "" ; then echo "instal.sh should be executed at top level with make mswin" else B=`cygpath -u -a $top_builddir | sed 's/\/$//'` export B fi if test "$marshal_dir" = "" ; then echo "instal.sh should be executed at top level with make mswin" else mkdir $marshal_dir D="`cygpath -u -a $marshal_dir`"/nrn export D fi if test "$ivbindir" = "" ; then echo "instal.sh should be executed at top level with make mswin" exit 1 fi echo "MSWIN install from $S and $B to $D" set -x if true ; then # false means skip the entire marshaling of nrn rm -r -f $D echo "hello" mkdir $D mkdir $D/bin mkdir $D/lib mkdir $D/tmp # copy and strip the various executables we built cp $B/src/nrniv/mos2nrn.exe $D/bin/mos2nrn.exe strip $D/bin/mos2nrn.exe cp $B/src/nrniv/neuron.exe $D/bin/neuron.exe strip $D/bin/neuron.exe cp $B/src/mswin/nrniv.exe $D/bin/nrniv.exe strip $D/bin/nrniv.exe cp $B/src/mswin/nrniv.dll $D/bin/nrniv.dll strip $D/bin/nrniv.dll cp $B/src/mswin/hocmodule.dll $D/bin/hocmodule.dll strip $D/bin/hocmodule.dll cp $ivbindir/cygIVhines-3.dll $D/bin/cygIVhines-3.dll strip $D/bin/cygIVhines-3.dll if test -f $B/src/nmodl/.libs/nocmodl.exe ; then cp $B/src/nmodl/.libs/nocmodl.exe $D/bin cp $B/src/modlunit/.libs/modlunit.exe $D/bin else cp $B/src/nmodl/nocmodl.exe $D/bin cp $B/src/modlunit/modlunit.exe $D/bin fi strip $D/bin/nocmodl.exe strip $D/bin/modlunit.exe #needed by neuron.exe if test "$host_cpu" = "x86_64" ; then X=/usr/x86_64-w64-mingw32/sys-root/mingw/bin for i in libstdc++-6.dll libgcc_s_seh-1.dll ; do cp $X/$i $D/bin strip $D/bin/$i done else X=/usr/i686-pc-mingw32/sys-root/mingw/bin for i in libstdc++-6.dll libgcc_s_dw2-1.dll ; do cp $X/$i $D/bin strip $D/bin/$i done fi if test "$LTCC" = "" ; then LTCC=gcc fi # copy the essential cygwin programs for i in \ as.exe basename.exe cat.exe cp.exe cmp.exe which.exe \ cpp.exe cygpath.exe diff.exe dirname.exe echo.exe find.exe $LTCC.exe \ grep.exe ld.exe ls.exe make.exe mkdir.exe \ nm.exe rm.exe mv.exe sed.exe bash.exe unzip.exe \ rxvt.exe mintty.exe cygwin-console-helper.exe \ rebase.exe sort.exe cygcheck.exe \ ; do cp /usr/bin/$i $D/bin/$i done # use ash as sh to avoid missing /tmp message when cygwin not installed cp /usr/bin/ash.exe $D/bin/sh.exe # and there is also one in a gcc version specific place cc1=`$CC -print-prog-name=cc1` cp $cc1 $D/bin # in case this is an mpi version distribute the appropriate administrative tools. #nowadays (mpich-3.0.2) mpiinstalled is same as mpichbin if grep '^mpicc=mpicc' $B/src/mswin/nrncygso.sh ; then mpiinstalled=$HOME/mpich2 if test -d $mpiinstalled ; then # want mpd cp /bin/python2.7 $D/bin for i in mpdboot mpdtrace mpdexit mpdallexit mpdcleanup mpd \ mpiexec.mpd mpdman.py mpdlib.py \ mpdroot.exe; do sed '1s/\/usr\/bin\/env //' $mpiinstalled/bin/$i > $D/bin/$i chmod 755 $D/bin/$i done echo 'MPD_SECRETWORD=neuron' > $D/mpd.conf chmod 600 $D/mpd.conf fi # gforker cp $mpiinstalled/bin/mpiexec.exe $D/bin cp $mpiinstalled/lib/libmpich.dll $D/bin # and make the basic tests available for i in test0.hoc test0.py ; do cp $S/src/parallel/$i $D unix2dos $D/$i done fi if true ; then #moved to here to allow figuring out what dlls are needed cd /usr/lib pz=python27.zip pd=python2.7 if test ! -f $pz ; then zip -r $pz $pd zip -d $pz \*/\*.pyo zip -d $pz \*/\*.pyc for i in bsddb email encodings idlelib test ; do zip -d $pz \*/${i}/\* done for i in __init__ aliases ascii ; do zip $pz $pd/encodings/$i.py done fi unzip -d $D/lib -o $pz #to avoid site problem mkdir -p $D/usr/include/python2.7 cp /usr/include/python2.7/pyconfig.h $D/usr/include/python2.7 # crazy but need it here as well and do not really know why. mkdir -p $D/include/python2.7 cp /usr/include/python2.7/pyconfig.h $D/include/python2.7 #if continue to have problems with this then perhaps explicitly set Py_NoSiteFlag fi # figure out which dll's need to be distributed (cd $D/bin rm -f temp.tmp for i in *.exe ; do cygcheck ./$i | sed 's/^ *//' >> temp.tmp done ) # do not forget the ones used by the python dlls # only the python dlls in $D/lib/python2.7 if true ; then # too many, putting duplicates in bin, setup is 13.69MB, only cygcrypto below for i in `find $D/lib/python2.7 -name \*.dll` ; do cygcheck $i | sed 's/^ *//' >> $D/bin/temp.tmp done fi sort $D/bin/temp.tmp | uniq | grep 'cygwin[0-9]*\\bin\\' | sed 's,\\,/,g' > $D/temp2.tmp for i in `cat $D/temp2.tmp` ; do echo $i cp `cygpath -u $i` $D/bin done rm $D/bin/temp.tmp rm $D/bin/temp2.tmp chmod 755 $D/bin/* chmod 755 `find $D/lib -name \*.dll` # and there may be some others we need to do explicitly for i in \ libW11.dll \ ; do cp /usr/bin/$i $D/bin/$i done #mkdir $D/lib/x #cp /usr/share/terminfo/x/xterm $D/lib/x/xterm #as of cygwin 7 it is here mkdir $D/usr mkdir $D/usr/share mkdir $D/usr/share/terminfo mkdir $D/usr/share/terminfo/78 cp /usr/share/terminfo/78/xterm $D/usr/share/terminfo/78/xterm cp $S/src/mswin/*.ico $D/bin cp /usr/lib/default-manifest.o $D/bin if false ; then mkdir $D/mingw mkdir $D/mingw/sys cp /usr/i686-pc-mingw32/include/*.h $D/mingw cp /usr/i686-pc-mingw32/include/sys/*.h $D/mingw/sys ( #some of the above contain merely include_next directives. cd /usr/lib/gcc-lib/i686-pc-mingw32/3.3.1/include cp float.h stdarg.h stddef.h varargs.h $D/mingw ) fi gclib=`$CC -print-libgcc-file-name` gclib=`echo $gclib|sed 's,.*/lib/\(.*\)/[^/].*,\1,'` echo $gclib (cd /usr/lib ; zip -r $D/lib/temp.tmp $gclib -x \*ada\* \*c++\* \*fortran\* \*libobj\* \*libgcj\* \*install-tools\* \*libff\* \*libgomp\* \*libgij\* \*finclude\*) (cd $D/lib ; unzip temp.tmp ; rm temp.tmp ; cd $gclib ; rm -f cc1.exe *obj* *plus* e* j* f* gnat* *ssp* ) mkdir $D/gccinc cp /usr/include/*.h $D/gccinc for i in sys machine cygwin bits ; do mkdir $D/gccinc/$i cp /usr/include/$i/*.h $D/gccinc/$i done mkdir $D/gcclib cp /usr/lib/libcygwin.a $D/gcclib cp /usr/lib/libpthread.a $D/gcclib for i in libuser32.a libkernel32.a libadvapi32.a libshell32.a ; do cp /usr/lib/w32api/$i $D/gcclib done if false ; then mkdir $D/gcc3inc cp /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/*.h $D/gcc3inc cp /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a $D/gcclib fi if test -f "$S/src/nrnjava/neuron.jar" ; then mkdir $D/classes cp $S/src/nrnjava/*.jar $D/classes fi # copy the dos formatted files to the classical positions. # use zip to do the translation from unix to dos format Z=$B/d2ufiles.zip if true ; then cd $S/share rm -f $Z zip -l -r $Z examples lib demo -x \*.svn\* zip -d $Z \*,v \*.svn\* \*.in \*Makefile\* \*.o \*.c \*.dll \*/auditscripts\* unzip -d $D -o $Z rm $Z cd $B/share rm -f $Z zip -l $Z lib/nrn.defaults unzip -d $D -o $Z rm $Z fi if true ; then cd $S rm -f $Z zip -l $Z src/oc/*.h src/nrnoc/*.mod src/nrnoc/*.h src/scopmath/*.h (cd $B ; zip -l $Z src/oc/*.h src/nrnoc/*.mod src/nrnoc/*.h src/scopmath/*.h) unzip -d $D -o $Z rm $Z fi if true ; then cd $S/src/mswin rm -f $Z zip -l $Z notes.txt #do the lib shell scripts in unix format zip $Z bin/mknrndll bin/neurondemo bin/nrngui lib/*.sh lib/*.bsh lib/minttyrc lib/*.sed #do the specified unix bin shell scripts in unix format cd $S zip $Z bin/mkthreadsafe bin/nrnpyenv.sh bin/set_nrnpyenv.sh bin/sortspike unzip -d $D -o $Z rm $Z cd $B/src/mswin rm -f $Z #do the lib shell scripts in unix format zip $Z lib/*.mak unzip -d $D -o $Z rm $Z fi if true ; then cp $D/bin/hocmodule.dll $D/lib/python/neuron/hoc.dll cp $D/bin/mknrndll $D/bin/nrnivmodl fi if true ; then cd $S/src/mswin mv $D/lib/nrn.defaults $D/lib/nrn.def fi cd $D/demo/release export N=$D export PATH="$D/bin:$PATH" sh $D/lib/mknrndl2.sh rm *.o # what the shortcuts should look like #mknrndll icon shortcut # c:\nrn\bin\nrniv.exe c:/nrn/lib/hoc/mknrndll.hoc # start in c: #nrngui icon shortcut # c:\nrn\bin\neuron.exe c:/nrn/lib/hoc/nrngui.hoc # start in c: #neurondemo icon shortcut # c:\nrn\bin\neuron.exe -dll c:/nrn/demo/release/nrnmech.dll demo.hoc # start in c:\nrn\demo fi # end of nrn marshaling if true ; then # false means skip marshaling of html hparent=$S/.. if test -d "$hparent/html" ; then cd $hparent rm html.zip zip -r html.zip html -x \*.svn\* rm -r -f $marshal_dir/html unzip -d $marshal_dir html.zip rm html.zip fi fi # end of html marshaling set +v echo "Will now complete the creation of the installer by launching" echo " $B/src/mswin/nrnsetup.nsi ." echo " The installer will be located in $S/src/mswin/nrnxxsetup.exe" cd $B/src/mswin #c:/Program\ Files/NSIS/makensisw nrnsetup.nsi if test "$host_cpu" = "x86_64" ; then c:/Program\ Files\ \(x86\)/NSIS/makensis nrnsetup.nsi else c:/Program\ Files/NSIS/makensis nrnsetup.nsi fi neuron-7.5/src/mswin/batch/instalmingw.sh000066400000000000000000000152251323325274500206030ustar00rootroot00000000000000#!/bin/sh # install from the build directories to the mswin destination # uses the classical positions of files # must be launched from a mingw terminal if false ; then echo "top_srcdir $top_srcdir" echo "top_builddir $top_builddir" echo "marshal_dir $marshal_dir" echo "ivbindir $ivbindir" echo "host_cpu $host_cpu" echo "CC $CC" exit 0 fi if test "$top_srcdir" = "" ; then echo "instalmingw.sh should be executed at top level with make mswin" else S=`(cd $top_srcdir ; readlink -f .)` export S fi if test "$top_builddir" = "" ; then echo "instalmingw.sh should be executed at top level with make mswin" else B=`(cd $top_builddir ; readlink -f .)` export B fi if test "$marshal_dir" = "" ; then echo "instalmingw.sh should be executed at top level with make mswin" else if test ! -d $marshal_dir ; then mkdir $marshal_dir fi D=`(cd $marshal_dir ; readlink -f .)` if test $host_cpu = x86_64 ; then BIT=64 D=$D/nrn DB=$D/bin else BIT=32 D=$D/nrn DB=$D/bin fi export D export DB fi H=$HOME if test "$host_cpu" = x86_64 ; then SYS=/mingw/x86_64-w64-mingw32 else SYS=/mingw fi if test "$ivbindir" = "" ; then echo "instal.sh should be executed at top level with make mswin" exit 1 fi echo "MSWIN install from $S and $B to $D" set -x if true ; then # false means skip the entire marshaling of nrn MG=$D/mingw rm -r -f $D mkdir $D mkdir $DB mkdir $D/lib mkdir $D/tmp # copy the various executables we built cp $B/src/nrniv/mos2nrn.exe $DB/mos2nrn.exe cp $B/src/nrniv/neuron.exe $DB/neuron.exe cp $B/src/mswin/nrniv.exe $DB/nrniv.exe if test -f $B/src/mswin/nrniv_enthought.exe ; then cp $B/src/mswin/nrniv_enthought.exe $DB/nrniv_enthought.exe cp /e/Python27/Microsoft.VC90.CRT.manifest $DB cp /e/Python27/msvcr90.dll $DB fi cp $B/src/mswin/nrniv.dll $DB/nrniv.dll cp $B/src/mswin/libnrnmpi.dll $DB/libnrnmpi.dll #will move hocmodule to lib/python/neuron/hoc.pyd after lib/python is created cp $B/src/mswin/hocmodule*.dll $DB cp $B/src/mswin/libnrnpython*.dll $DB cp $ivbindir/libIVhines-3.dll $DB/libIVhines-3.dll if test -f $B/src/nmodl/.libs/nocmodl.exe ; then cp $B/src/nmodl/.libs/nocmodl.exe $DB cp $B/src/modlunit/.libs/modlunit.exe $DB else cp $B/src/nmodl/nocmodl.exe $DB cp $B/src/modlunit/modlunit.exe $DB fi if test "$LTCC" = "" ; then LTCC=$CC fi # extract enough mingw stuff so mknrndll will work. #This adds 13MB to the installer. #get rid of this in favor of newer gcc unzip -d $D -o $S/../mingw${BIT}_nrndist.zip cp $S/../pthreadGC2-w64.dll $DB if false ; then # copy some useful tools for i in \ basename, bash cat cp dirname echo find grep ls make mintty mkdir mv \ rebase rm sed sh sort unzip zip \ cygcheck do cp /usr/bin/$i.exe $D/bin done fi cp /usr/bin/cygcheck.exe $D/bin # Determine what msys64 dlls are needed by the bin programs and copy them (cd $DB rm -f temp.tmp for i in *.exe ; do cygcheck ./$i | sed 's/^ *//' >> temp.tmp done ) sort $DB/temp.tmp | uniq | grep 'msys64' | sed 's,\\,/,g' > $DB/temp2.tmp for i in `cat $DB/temp2.tmp` ; do echo $i cp $i $DB done rm $DB/temp.tmp rm $DB/temp2.tmp # reduce size of bin folder (cd $DB ; strip *.exe *.dll) # in case this is an mpi version distribute the appropriate administrative tools. if test "$PARANEURON"="yes" ; then mpiinstalled=/c/ms-mpi # gforker cp $mpiinstalled/bin/mpiexec.exe $DB cp $mpiinstalled/bin/smpd.exe $DB #cp /c/Windows/System32/mpich2mpi.dll $DB #cp $S/../mpich2mpi.dll $DB if test $host_cpu = x86_64 ; then cp $mpiinstalled/lib/x64/msmpi.dll $DB else cp $mpiinstalled/lib/x86/msmpi.dll $DB fi # and make the basic tests available for i in test0.hoc test0.py ; do cp $S/src/parallel/$i $D unix2dos $D/$i done fi if false ; then #to foo one if test -f "$S/src/nrnjava/neuron.jar" ; then mkdir $D/classes cp $S/src/nrnjava/*.jar $D/classes fi fi #foo one cp $S/src/mswin/*.ico $DB # copy the dos formatted files to the classical positions. # use zip to do the translation from unix to dos format Z=$B/d2ufiles.zip if true ; then cd $S/share rm -f $Z zip -l -r $Z examples lib demo -x \*.svn\* zip -d $Z \*,v \*.svn\* \*.in \*Makefile\* \*.o \*.c \*.dll \*/auditscripts\* unzip -d $D -o $Z rm $Z cd $B/share rm -f $Z zip -l $Z lib/nrn.defaults unzip -d $D -o $Z rm $Z for f in $DB/hocmodule*.dll ; do x=`echo $f | sed "s/.*hocmodule\([0-9]*\)\.dll/\1/"` mv $f $D/lib/python/neuron/hoc${x}.pyd done cp $B/share/lib/python/neuron/rxd/geometry3d/*.pyd $D/lib/python/neuron/rxd/geometry3d fi if true ; then cd $S rm -f $Z zip -l $Z src/oc/*.h src/nrnoc/*.mod src/nrnoc/*.h src/scopmath/*.h (cd $B ; zip -l $Z src/oc/*.h src/nrnoc/*.mod src/nrnoc/*.h src/scopmath/*.h) unzip -d $D -o $Z rm $Z fi if true ; then cd $S/src/mswin cp bin/mknrndll bin/neurondemo bin/nrngui $DB rm -f $Z zip -l $Z notes.txt #do the lib shell scripts in unix format zip $Z lib/*.sh lib/*.sed #do the specified unix bin shell scripts in unix format cd $S cp bin/mkthreadsafe bin/nrnpyenv.sh bin/set_nrnpyenv.sh bin/sortspike $DB unzip -d $D -o $Z cd $B/src/mswin rm -f $Z #do the lib shell scripts in unix format zip $Z lib/*.mak unzip -d $D -o $Z rm $Z fi if true ; then cd $S/src/mswin mv $D/lib/nrn.defaults $D/lib/nrn.def fi #fix the path to make cd $D/lib sed 's;\$N/bin/make;make;' mknrndl2.sh > temp mv temp mknrndl2.sh #for neurondemo cd $D/demo/release export N=$D export PATH="$DB:$D/mingw/bin:$PATH" sh $D/lib/mknrndl2.sh rm *.o *.c if test ! -f nrnmech.dll ; then echo 'could not build nrnmech.dll' exit 1; fi # what the shortcuts should look like #mknrndll icon shortcut # c:\nrn\bin\nrniv.exe c:/nrn/lib/hoc/mknrndll.hoc # start in c: #nrngui icon shortcut # c:\nrn\bin\neuron.exe c:/nrn/lib/hoc/nrngui.hoc # start in c: #neurondemo icon shortcut # c:\nrn\bin\neuron.exe -dll c:/nrn/demo/release/nrnmech.dll demo.hoc # start in c:\nrn\demo fi # end of nrn marshaling if true ; then # false means skip marshaling of html hparent=$S/.. if false ; then cd $hparent scp hines@neuron.yale.edu:/home/htdocs/neuron/static/docs/nrnhelp.zip . mkdir html cd html unzip ../nrnhelp.zip fi if test -d "$hparent/html" ; then cd $hparent rm html.zip zip -r html.zip html -x \*.svn\* rm -r -f $marshal_dir/html unzip -d $marshal_dir html.zip rm html.zip fi fi # end of html marshaling set +v echo "Will now complete the creation of the installer by launching" echo " $B/src/mswin/nrnsetup.nsi ." echo " The installer will be located in $S/src/mswin/nrnxxsetup.exe" if true ; then #make the nrnsetup.exe cd $B/src/mswin #c:/Program\ Files/NSIS/makensisw nrnsetup.nsi if test $host_cpu = x86_64 ; then c:/Program\ Files\ \(x86\)/NSIS/makensis nrnsetupmingw.nsi else c:/Program\ Files/NSIS/makensis nrnsetupmingw.nsi fi echo " The installer is located in $S/src/mswin/nrnxxsetup.exe" fi neuron-7.5/src/mswin/batch/mzipall.sh000077500000000000000000000000711323325274500177130ustar00rootroot00000000000000sh mzipnrn.sh sh mzipfile.sh sh mzipdll.sh sh mzipcyg.sh neuron-7.5/src/mswin/batch/mzipcyg.sh000077500000000000000000000007061323325274500177320ustar00rootroot00000000000000cd c:/nrn rm -f nrncyg.zip zip -r nrncyg.zip \ bin/as.exe \ bin/cat.exe \ bin/cc1.exe \ bin/cpp.exe \ bin/cpp0.exe \ bin/cygiconv-2.dll \ bin/cygintl-1.dll \ bin/cygintl-2.dll \ bin/cygncurses6.dll \ bin/cygpath.exe \ bin/cygreadline5.dll \ bin/cygwin1.dll \ bin/echo.exe \ bin/gcc.exe \ bin/grep.exe \ bin/ld.exe \ bin/libW11.dll \ bin/ls.exe \ bin/make.exe \ bin/nm.exe \ bin/rm.exe \ bin/rxvt.exe \ bin/sed.exe \ bin/sh.exe \ bin/unzip.exe \ \ mingw neuron-7.5/src/mswin/batch/mzipdll.sh000077500000000000000000000001631323325274500177200ustar00rootroot00000000000000cd c:/nrn rm -f mknrndll.zip zip mknrndll.zip bin/nocmodl.exe bin/modlunit.exe \ bin/mos2nrn.exe \ lib/libscpmt.a neuron-7.5/src/mswin/batch/mzipfile.sh000077500000000000000000000004711323325274500200660ustar00rootroot00000000000000cd c:/nrn rm -f nrnfiles.zip zip -r nrnfiles.zip lib/*.mak lib/hoc lib/nrn.def \ lib/prologue.id iv lib/*.sh lib/psfilt.sed \ lib/*.cm* lib/cleanup lib/nrnunits.lib \ bin/*.ico examples demo \ src/nrnoc/*.mod lib/helpdict \ src/oc/*.h src/nrnoc/*.h src/scopmath/*.h \ classes/*.jar zip -d nrnfiles.zip \*.o \*.c neuron-7.5/src/mswin/batch/mzipnrn.sh000077500000000000000000000001111323325274500177330ustar00rootroot00000000000000cd c:/nrn rm -f nrn5exe.zip zip nrn5exe.zip bin/neuron.exe bin/nrniv.exe neuron-7.5/src/mswin/bbsconf.h000077500000000000000000000006551323325274500164230ustar00rootroot00000000000000#ifndef H_bbsconfig_included #define H_bbsconfig_included 1 /* following are relevant to src/parallel implmentation of ParallelContext */ /* Define if PVM available */ #undef HAVE_PVM3_H /* Set to 1 if the standard template library exists */ #undef HAVE_STL /* Set to 1 if SIGPOLL is a possible signal */ #undef HAVE_SIGPOLL /* Set to 1 if can use the new PVM functions */ #undef HAVE_PKMESG #endif /* H_config_included */ neuron-7.5/src/mswin/bin/000077500000000000000000000000001323325274500153755ustar00rootroot00000000000000neuron-7.5/src/mswin/bin/Makefile.am000077500000000000000000000002111323325274500174260ustar00rootroot00000000000000EXTRA_DIST = hocxdos.bat instlzp.bat mknrndll.bat single.bat t2.bt \ hocxdos1.bat mkdllbox.bat nrngui.bat t1.bt mknrndll nrnstart.bat neuron-7.5/src/mswin/bin/Makefile.in000066400000000000000000000373751323325274500174610ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = hocxdos.bat instlzp.bat mknrndll.bat single.bat t2.bt \ hocxdos1.bat mkdllbox.bat nrngui.bat t1.bt mknrndll nrnstart.bat all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/bin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/bin/hocxdos.bat000077500000000000000000000001311323325274500175320ustar00rootroot00000000000000set NEURONHOME=%1 set path=%1\bin;%path% %3 %4 %5 %6 %7 %8 %9 > %2 echo 1 > tmpdos1.tmp neuron-7.5/src/mswin/bin/hocxdos1.bat000077500000000000000000000001431323325274500176160ustar00rootroot00000000000000set path=%1\bin set include= set NEURONHOME=%1 set NU=%2 %3 %4 %5 %6 %7 %8 %9 echo 1 > tmpdos1.tmp neuron-7.5/src/mswin/bin/instlzp.bat000077500000000000000000000100001323325274500175620ustar00rootroot00000000000000rem ****************** instlzp.bat ********************** rem rem rem ****** create single, nrngui, and mknrndll.bat ****** rem echo %1\bin\neuron %1\lib\hoc\single.hoc>%1\bin\single.bat echo %1\bin\neuron %1\lib\hoc\nrngui.hoc>%1\bin\nrngui.bat rem echo set include=> %1\bin\t2.bt echo set path=%1\bin>> %1\bin\t2.bt echo set NEURONHOME=%1>> %1\bin\t2.bt %1\bin\d2uenv set NU=%1>> %1\bin\t2.bt copy %1\bin\t2.bt + %1\bin\t1.bt %1\bin\mknrndll.bat rem rem rem *************** create mkdllbox.bat ***************** rem rem make mkdllbox.bat echo @echo off>%1\bin\mkdllbox.bat rem echo PATH %1\bin>>%1\bin\mkdllbox.bat echo set PATH=%1\bin;%%PATH%%>>%1\bin\mkdllbox.bat echo set NEURONHOME=%1>>%1\bin\mkdllbox.bat echo prompt [mknrndll] $P$g>>%1\bin\mkdllbox.bat echo echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿>>%1\bin\mkdllbox.bat echo echo ³ Welcome to the mknrndll DOS box! ³>>%1\bin\mkdllbox.bat echo echo ³ ³>>%1\bin\mkdllbox.bat echo echo ³ Navigate to the directory that contains your mod files, ³>>%1\bin\mkdllbox.bat echo echo ³ then type ³>>%1\bin\mkdllbox.bat echo echo ³ modlunit filename.mod ³>>%1\bin\mkdllbox.bat echo echo ³ to check the units in filename.mod ³>>%1\bin\mkdllbox.bat echo echo ³ or type ³>>%1\bin\mkdllbox.bat echo echo ³ mknrndll ³>>%1\bin\mkdllbox.bat echo echo ³ to create a new nrnmech.dll ³>>%1\bin\mkdllbox.bat echo echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ>>%1\bin\mkdllbox.bat rem cmd.exe is more powerful than command.com, rem so the following line is better for WinNT users rem echo %SystemRoot%\system32\cmd.exe>>%1\bin\mkdllbox.bat rem Win 95/98 users are stuck with command.com and must use the next line echo command.com>>%1\bin\mkdllbox.bat rem rem rem don't bother with this for now-- rem *************** create mkdllbo2.bat ***************** rem rem make mkdllbo2.bat rem echo @echo off>%1\bin\mkdllbo2.bat rem echo rem if this batch file is called from NEURON,>>%1\bin\mkdllbo2.bat rem echo rem $(NEURONHOME) has already been prepended to PATH>>%1\bin\mkdllbo2.bat rem echo rem so the following statement is not needed here>>%1\bin\mkdllbo2.bat rem echo rem set PATH=%1\bin;%%PATH%%>>%1\bin\mkdllbo2.bat rem echo set NEURONHOME=%1>>%1\bin\mkdllbo2.bat rem echo prompt [mknrndll] $P$g>>%1\bin\mkdllbo2.bat rem echo echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿>>%1\bin\mkdllbo2.bat rem echo echo ³ Welcome to the mknrndll DOS box! ³>>%1\bin\mkdllbo2.bat rem echo echo ³ ³>>%1\bin\mkdllbo2.bat rem echo echo ³ COMMAND: ACTION: ³>>%1\bin\mkdllbo2.bat rem echo echo ³ modlunit filename.mod checks units in filename.mod ³>>%1\bin\mkdllbo2.bat rem echo echo ³ mknrndll creates a new nrnmech.dll ³>>%1\bin\mkdllbo2.bat rem echo echo ³ exit closes this DOS box ³>>%1\bin\mkdllbo2.bat rem echo echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ>>%1\bin\mkdllbo2.bat rem cmd.exe is more powerful than command.com, rem so the following line is better for WinNT users rem echo %SystemRoot%\system32\cmd.exe>>%1\bin\mkdllbo2.bat rem Win 95/98 users are stuck with command.com and must use the next line rem echo command.com>>%1\bin\mkdllbo2.bat rem rem rem ******************** clean up *********************** rem del %1\examples\dummy.txt del %1\examples\hmodl\dummy.txt del %1\examples\nmodl\dummy.txt del %1\examples\nrnoc\dummy.txt del %1\src\dummy.txt rem rem rem *********** a nice idea that didn't work ************* rem rem using this batch file to try to hide these files rem can cause sharing violations rem rem attrib +h %1\DeIsL1.isu rem attrib +h %1\_DEISREG.ISR rem attrib +h %1\_ISREG32.DLL neuron-7.5/src/mswin/bin/mkdllbox.bat000077500000000000000000000014511323325274500177050ustar00rootroot00000000000000@echo off set PATH=c:\NRN\bin;%PATH% set NEURONHOME=c:\NRN prompt [mknrndll] $P$g echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ echo ³ Welcome to the mknrndll DOS box! ³ echo ³ ³ echo ³ Navigate to the directory that contains your mod files, ³ echo ³ then type ³ echo ³ modlunit filename.mod ³ echo ³ to check the units in filename.mod ³ echo ³ or type ³ echo ³ mknrndll ³ echo ³ to create a new nrnmech.dll ³ echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ command.com neuron-7.5/src/mswin/bin/mknrndll000077500000000000000000000010171323325274500171430ustar00rootroot00000000000000#!sh rm -f nrnmech.dll cp_if_newer() { base=`basename "$1"` prefix=`echo $base | sed 's/\..*//'` fp="i686cygwin/$prefix" if test ! -f "$fp.c" -o "$1" -nt "$fp.c" ; then cp "$1" "$fp.mod" echo "cp $1 $fp.mod" fi } if test -d "$1" ; then if test ! -d i686cygwin ; then mkdir i686cygwin fi for i in $* ; do for j in `ls $i/*.[Mm][Oo][Dd]` ; do cp_if_newer "$j" done done cd i686cygwin sh $N/lib/mknrndl2.sh if test -f nrnmech.dll ; then mv nrnmech.dll .. fi cd .. else sh $N/lib/mknrndl2.sh $* fi neuron-7.5/src/mswin/bin/mknrndll.bat000077500000000000000000000002351323325274500177110ustar00rootroot00000000000000set include= set path=c:\nrn\bin set NEURONHOME=c:\NRN set NU=c:/NRN set DJGPP=%NEURONHOME%\djg\djgpp.env sh %NU%/lib/mknrndll.sh %1 %2 %3 %4 %5 %6 %7 %8 %9 neuron-7.5/src/mswin/bin/nrngui.bat000077500000000000000000000000551323325274500173720ustar00rootroot00000000000000c:\NRN\bin\neuron c:\NRN\lib\hoc\nrngui.hoc neuron-7.5/src/mswin/bin/nrnstart.bat000066400000000000000000000002231323325274500177350ustar00rootroot00000000000000 set ND=%1 set N=%2 start %ND%\bin\mintty.exe -c %N%/lib/minttyrc %N%/bin/bash --rcfile %N%/lib/nrnstart.bsh %N%/lib/neuron.sh %N% %3 %4 %5 %6 %7 neuron-7.5/src/mswin/bin/single.bat000077500000000000000000000000551323325274500173510ustar00rootroot00000000000000c:\NRN\bin\neuron c:\NRN\lib\hoc\single.hoc neuron-7.5/src/mswin/bin/t1.bt000077500000000000000000000001311323325274500162460ustar00rootroot00000000000000set DJGPP=%NEURONHOME%\djg\djgpp.env sh %NU%/lib/mknrndll.sh %1 %2 %3 %4 %5 %6 %7 %8 %9 neuron-7.5/src/mswin/bin/t2.bt000077500000000000000000000000451323325274500162530ustar00rootroot00000000000000set NEURONHOME=c:\NRN set NU=c:/NRN neuron-7.5/src/mswin/extra/000077500000000000000000000000001323325274500157505ustar00rootroot00000000000000neuron-7.5/src/mswin/extra/Makefile.am000077500000000000000000000002161323325274500200060ustar00rootroot00000000000000EXTRA_DIST = d2uenv.c mos2nrn.cpp rundemo.cpp \ dllhead.cpp splitnrn.c \ bbstest.cpp hel2mos.cpp ms1.cpp winmain.c \ neuron.cpp d2upath.c neuron-7.5/src/mswin/extra/Makefile.in000066400000000000000000000374111323325274500200230ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/extra ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = d2uenv.c mos2nrn.cpp rundemo.cpp \ dllhead.cpp splitnrn.c \ bbstest.cpp hel2mos.cpp ms1.cpp winmain.c \ neuron.cpp d2upath.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/extra/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/extra/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/extra/bbstest.cpp000077500000000000000000000020401323325274500201210ustar00rootroot00000000000000#include #include #include "nrnbbs.h" void cb(const char* s) { printf("callback %s\n", s); char buf[200]; buf[0] = '\0'; int ok = nrnbbs_take_string(s, buf); printf("%d take |%s| |%s|\n", ok, s, buf); } void main() { int i, ok; char buf[256]; MessageBox(NULL, "test", "bbstest", MB_OK); nrnbbs_connect(); nrnbbs_notify("test2", cb); nrnbbs_post("test1"); nrnbbs_post_int("test2", 5); nrnbbs_post_string("test3", "posted string"); printf ("test1 look %d\n", nrnbbs_look("test1")); printf ("test1 look %d\n", nrnbbs_look("test1")); printf ("test1 take %d\n", nrnbbs_take("test1")); printf ("test1 take %d\n", nrnbbs_take("test1")); i=0; ok = nrnbbs_take_int("test2", &i); printf("test2 %d i=%d\n", ok, i); nrnbbs_post("space look"); printf( "space look %d\n", nrnbbs_look("space look")); printf( "space take %d\n", nrnbbs_take("space look")); buf[0] = '\0'; ok = nrnbbs_take_string("test3", buf); printf("test3 %d buf=|%s|\n", ok, buf); printf("Hit Return:\n"); gets(buf); nrnbbs_disconnect(); } neuron-7.5/src/mswin/extra/d2uenv.c000077500000000000000000000005741323325274500173300ustar00rootroot00000000000000#include #include int main(int argc, char** argv) { char *cp1, *cp2; char buf[256]; int i; for (i=1; i < argc; ++i) { if (i > 1) { printf(" "); } for (cp1=argv[i], cp2=buf; *cp1; ++cp1, ++cp2) { if (*cp1 == '\\') { *cp2 = '/'; }else{ *cp2 = *cp1; } } *cp2 = '\0'; printf("%s", buf); } printf("\n", buf); return 0; } neuron-7.5/src/mswin/extra/d2upath.c000066400000000000000000000020741323325274500174660ustar00rootroot00000000000000/* input dos path, output unix (or mingw) path. The output string may range from the same size as the input string up to 11 characters longer. the output string should be freed with free() when no longer needed. */ #include #include #include char* hoc_dos2cygdrivepath(const char* d, int cygdrive) { /* translate x: and x:/ and x:\, to /cygdrive/x/ */ /* and all backslashes to forward slashes */ /* or, for mingw, just backslashes to forward slashes */ char *u; char *cp; int i, j; #if 0 u = new char[strlen(d) + 12]; #else u = (char*)malloc(strlen(d) + 12); assert(u); #endif i = j = 0; if (cygdrive) { if (d[0] && d[1] == ':') { strcpy(u, "/cygdrive/"); i = strlen(u); u[i++] = d[0]; j += 2; u[i++] = '/'; if (d[j] == '/' || d[j] == '\\'){ j++; } } } strcpy(u+i, d+j); for (cp = u+i; *cp; ++cp) { if (*cp == '\\') { *cp = '/'; } } return u; } char* hoc_dos2unixpath(const char* d) { #if defined(__MINGW32__) return hoc_dos2cygdrivepath(d, 0); #else return hoc_dos2cygdrivepath(d, 1); #endif } neuron-7.5/src/mswin/extra/dllhead.cpp000077500000000000000000000004131323325274500200520ustar00rootroot00000000000000#include #pragma argsused BOOL WINAPI DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH : break; case DLL_PROCESS_DETACH : break; } return TRUE; } neuron-7.5/src/mswin/extra/hel2mos.cpp000066400000000000000000000113061323325274500200260ustar00rootroot00000000000000#ifdef WIN32 #include #endif #include #include #include #include #include #include #include "nrnbbs.h" #ifdef WIN32 #include "../winio/debug.h" static void setneuronhome(const char*); #endif extern "C" { void HandleOutput(const char* buf) { } } extern const char* neuronhome(); void start(); void stop(); void send(const char* url); static bool quit_; static void quit(const char* msg) { //printf("hel2mos quit |%s|\n", msg); //DebugMessage("hel2mos quit |%s|\n", msg); if (strcmp(msg, "neuron closed") == 0) { quit_ = true; } } static void help(const char*); static CopyString* shelp; int main(int argc, const char** argv){ #ifdef WIN32 setneuronhome(argv[0]); #endif if (!neuronhome()) { // printf("no NEURONHOME\n"); MessageBox(NULL, "no NEURONHOME environment variable", "OCHELP", MB_OK); return 1; } // printf("started hel2mos\n"); char buf[256]; sprintf(buf, "%s/lib/helpdict", neuronhome()); String sf(buf); InputFile* f = InputFile::open(sf); if (f == nil) { sprintf(buf, "Can't open %s\n", sf.string()); MessageBox (NULL, buf, "OCHELP", MB_OK); return 1; } const char* st; int flen = f->read(st); shelp = new CopyString(st, flen); f->close(); nrnbbs_connect(); nrnbbs_post("ochelp running"); start(); nrnbbs_notify("ochelp", help); #ifdef WIN32 nrnbbs_notify("neuron closed", help); #else nrnbbs_notify("neuron closed", quit); #endif help(""); nrnbbs_wait(&quit_); nrnbbs_take("ochelp running"); stop(); nrnbbs_disconnect(); return 0; } static bool find(const char* key, char* val) { static char buf[256]; sprintf(buf, "^%s ", key); DebugMessage("|%s|\n", buf); Regexp r1(buf); int i = r1.Search(shelp->string(), shelp->length(), 0, shelp->length()); DebugMessage("i=%d\n", i); if (i < 0) { return false; } Regexp r2("neuron/"); i = r2.Search(shelp->string(), shelp->length(), i, shelp->length()); //printf("i=%d\n", i); int j = shelp->search(i, '\n'); //printf("j=%d\n", j); strncpy(val, shelp->string() + i, j-i); val[j-i] = '\0'; return true; } static void help(const char* msg) { //DebugMessage("hel2mos help |%s|\n", msg); if (strcmp(msg, "neuron closed") == 0) { quit_ = true; } char buf[256]; while(nrnbbs_take_string("ochelp", buf)) { if (buf[0] == '?') { //DebugMessage("took ochelp: %s\n", buf); }else{ if (find(buf, buf)) { // printf("%s\n", buf); }else{ sprintf(buf, "contents.html"); } #ifdef WIN32 // DebugMessage("buf=|%s|\n", buf); char buf1[256],buf2[256]; strcpy(buf2,buf); strcpy(buf1, neuronhome()); for (char* cp = buf1; *cp; ++cp) { if (*cp == ':') { *cp = '|'; } if (*cp == '\\') { *cp = '/'; } } sprintf(buf, "file:///%s/html/help/%s", buf1, buf2); #endif send(buf); } } } const char* neuronhome() { const char* n = getenv("NEURONHOME"); if (n) { return n; } return nil; } #if defined(WIN32) static void setneuronhome(const char* p) { // if the program lives in .../bin/mos2nrn.exe // and .../lib exists then use ... as the // NEURONHOME // printf("p=|%s|\n", p); char buf[256]; if (p[0] == '"') { strcpy(buf, p+1); }else{ strcpy(buf, p); } int i, j; for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /neuron.exe gone //printf("setneuronhome |%s|\n", buf); for (j=strlen(buf); j >= 0 && buf[j] != '\\'; --j) {;} buf[j] = '\0'; // /bin gone // but make sure it was bin Bin or BIN -- damn you bill gates //printf("i=%d j=%d buf=|%s|\n",i, j, buf); if (i == j+4 &&(buf[--i] == 'n' || buf[i] == 'N') &&(buf[--i] == 'i' || buf[i] == 'I') &&(buf[--i] == 'b' || buf[i] == 'B') ) { static char buf1[256]; // check for nrn.def or nrn.defaults // if it exists assume valid installation FILE* f; sprintf(buf1, "%s/lib/nrn.def", buf); if ((f = fopen(buf1, "r")) == (FILE*)0) { sprintf(buf1, "%s/lib/nrn.defaults", buf); if ((f = fopen(buf1, "r")) == (FILE*)0) { sprintf(buf1, "%s not valid neuronhome\n", buf); MessageBox(NULL, buf1, "mos2nrn", MB_OK); return; } } fclose(f); sprintf(buf1, "NEURONHOME=%s", buf); putenv(buf1); // arg must be global } } char* nrnhome; #else #include #include #ifndef SVR4 #ifndef SIG_PF #define SIG_PF void (*)(...) #endif #endif static int mosaic_pid_; /* no longer used. 0 is fine */ void start() { signal(SIGHUP, (SIG_PF)quit); } void stop() { } void send(const char* url) { char buf1[512]; int start = 0; while(url[start] == ' ') { ++start; } sprintf(buf1, "%s/bin/hel2mos1.sh \"%s\"", neuronhome(), url+start); //printf("sending |%s|\n", buf1); signal(SIGCHLD, SIG_IGN); system(buf1); signal(SIGCHLD, (SIG_PF)quit); } #endif neuron-7.5/src/mswin/extra/mos2nrn.cpp000077500000000000000000000033521323325274500200600ustar00rootroot00000000000000// this is a copy of neuron.exe but no space handling and calls // mos2nrn.sh #include #include #include #include "d2upath.c" char* nrnhome; char* nh; static void setneuronhome() { int i, j; char buf[256]; GetModuleFileName(NULL, buf, 256); for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /neuron.exe gone for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /bin gone nrnhome = new char[strlen(buf)+1]; strcpy(nrnhome, buf); } static char* argstr(int argc, char** argv) { // put args into single string, each with enclosing "" int i, j, cnt; char* s; char* a; char* u; cnt = 100; for (i=1; i < argc; ++i) { cnt += strlen(argv[i])+20; } s = new char[cnt]; j = 0; for (i=1; i < argc; ++i) { s[j++] = '"'; u = hoc_dos2unixpath(argv[i]); for (a = u; *a; ++a) { s[j++] = *a; } s[j++] = '"'; if (i < argc-1) { s[j++] = ' '; } free(u); } s[j] = '\0'; return s; } int main(int argc, char** argv) { int err; char* buf; char* args; char* msg; char* temp; setneuronhome(); nh = hoc_dos2unixpath(nrnhome); args = argstr(argc, argv); temp = getenv("TEMP"); if (!temp) { temp = "c:/tmp"; } temp = hoc_dos2unixpath(temp); buf = new char[strlen(args) + 3*strlen(nh) + 200 + strlen(temp)]; #if defined(MINGW) if (nh[1] == ':') { nh[1] = nh[0]; nh[0] = '/'; } sprintf(buf, "%s\\mingw\\bin\\bash.exe %s/lib/mos2nrn3.sh %s %s %s", nrnhome, nh, temp, nh, args); #else sprintf(buf, "%s\\bin\\sh %s/lib/mos2nrn.sh %s %s", nrnhome, nh, nh, args); #endif msg = new char[strlen(buf) + 100]; err = WinExec(buf, SW_SHOW); if (err < 32) { sprintf(msg, "Cannot WinExec %s\n", buf); MessageBox(0, msg, "NEURON", MB_OK); } return 0; } neuron-7.5/src/mswin/extra/ms1.cpp000077500000000000000000000041661323325274500171660ustar00rootroot00000000000000#include "../winio/debug.h" #include #include #include #pragma hdrstop #include #include #include extern "C" { extern void HandleOutput(const char*); extern DWORD idInst; /* Instance of app for DDEML */ HCONV hConvExtra; } static HSZ hszService; static HSZ hszTopic; static HSZ hszItem; static HDDEDATA hData; static DWORD dwResult; static WORD wFmt = CF_TEXT; /* Clipboard format */ static char szDDEData[256]; /* Local receive data buffer */ int start() { HandleOutput("hel2mos start-\n"); if (!idInst) { MessageBox(NULL, "idInst is 0", "ochelp start", MB_OK); return 0; } hszService = DdeCreateStringHandle ( idInst, "NETSCAPE", CP_WINANSI ); hszTopic = DdeCreateStringHandle ( idInst, "WWW_OpenURL", CP_WINANSI ); hszItem = DdeCreateStringHandle ( idInst, "NetscapeData", CP_WINANSI ); hConvExtra = DdeConnect ( idInst, hszService, hszTopic, (PCONVCONTEXT) NULL ); if (!hConvExtra) { MessageBox(NULL, "Conversation not established with NETSCAPE", "ochelp start", MB_OK); return 0; } HandleOutput("Conversation established with NETSCAPE\n"); return 1; } void stop() { HandleOutput("hel2mos stop-\n"); if (hConvExtra) { DdeDisconnect ( hConvExtra ); } if (idInst) { DdeFreeStringHandle ( idInst, hszService ); DdeFreeStringHandle ( idInst, hszTopic ); DdeFreeStringHandle ( idInst, hszItem ); } } static void take(HCONV hc, const char* name) { if ( hc != (HCONV)NULL ){ DdeFreeStringHandle(idInst, hszItem); sprintf(szDDEData, "%s,,0xFFFFFFFF,0x0,,", name); hszItem = DdeCreateStringHandle ( idInst, (LPTSTR)szDDEData, CP_WINANSI ); hData = DdeClientTransaction ( NULL, 0, hc, hszItem, wFmt, XTYP_REQUEST, 1000, &dwResult ); if (!hData) { MessageBox(NULL, szDDEData, "WWW_OpenURL failed", MB_OK); } }else{ HandleOutput( "A connection to Netscape via DDE is not established." ); } } void send(const char* url) { // HandleOutput("hel2mos %s\n", url); take(hConvExtra, url); } neuron-7.5/src/mswin/extra/neuron.cpp000077500000000000000000000046571323325274500200010ustar00rootroot00000000000000// this is the wrapper that allows one to create shortcuts and // associate hoc files with neuron.exe without having to consider // the issues regarding shells and the rxvt console. The latter // can be given extra arguments in the lib/neuron.sh file which // finally executes nrniv.exe. Nrniv.exe can be run by itself if // it does not need a console or system("command") #include #include #include #include "d2upath.c" char* nrnhome; char* nh; static void setneuronhome() { int i, j; char buf[256]; GetModuleFileName(NULL, buf, 256); for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /neuron.exe gone for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /bin gone nrnhome = new char[strlen(buf)+1]; strcpy(nrnhome, buf); } static char* argstr(int argc, char** argv) { // put args into single string, escaping spaces in args. int i, j, cnt; char* s; char* a; char* u; cnt = 100; for (i=1; i < argc; ++i) { cnt += strlen(argv[i]) + 20; } s = new char[cnt]; j = 0; for (i=1; i < argc; ++i) { // convert dos to unix path and space to @@ // the latter will be converted back to space in src/oc/hoc.c // cygwin 7 need to convert x: and x:/ and x:\ to // /cygdrive/x/ u = hoc_dos2unixpath(argv[i]); for (a = u; *a; ++a) { if (*a == ' ') { s[j++] = '@'; s[j++] = '@'; }else{ s[j++] = *a; } } if (i < argc-1) { s[j++] = ' '; } free(u); } s[j] = '\0'; return s; } int main(int argc, char** argv) { int err; char* buf; char* args; char* msg; #if !defined(MINGW) ShowWindow(GetConsoleWindow(), SW_HIDE); #endif setneuronhome(); nh = hoc_dos2unixpath(nrnhome); args = argstr(argc, argv); buf = new char[strlen(args) + 6*strlen(nh) + 200]; #if defined(MINGW) //sprintf(buf, "%s\\mingw\\bin\\bash.exe -rcfile %s/lib/nrnstart.bsh -i %s/lib/neuron2.sh nrngui %s", nrnhome, nh, nh, args); if (nh[1] == ':') { nh[1] = nh[0]; nh[0] = '/'; } sprintf(buf, "%s\\mingw\\bin\\bash.exe -i %s/lib/neuron3.sh %s nrngui %s", nrnhome, nh, nh, args); //MessageBox(0, buf, "NEURON", MB_OK); #else sprintf(buf, "%s\\bin\\mintty -c %s/lib/minttyrc %s/bin/bash --rcfile %s/lib/nrnstart.bsh %s/lib/neuron.sh %s %s", nrnhome, nh, nh, nh, nh, nh, args); #endif msg = new char[strlen(buf) + 100]; err = WinExec(buf, SW_SHOW); if (err < 32) { sprintf(msg, "Cannot WinExec %s\n", buf); MessageBox(0, msg, "NEURON", MB_OK); } return 0; } neuron-7.5/src/mswin/extra/rundemo.cpp000077500000000000000000000003201323325274500201230ustar00rootroot00000000000000#include int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { SetCurrentDirectory("\\nrn\\demo"); WinExec("\\nrn\\bin\\neuron.exe -dll release/nrnmech.dll demo.hoc", SW_SHOW); return 0; } neuron-7.5/src/mswin/extra/splitnrn.c000077500000000000000000000016051323325274500177720ustar00rootroot00000000000000/* split a file.zip file into 1MB pieces called file.z1, file.z2 etc */ #include #include #include void main(int argc, char** argv) { long i, j, n, done; FILE* fi, *fo; char* buf; buf = (char*)malloc(1024*16); if (argc != 2) { printf("usage: splitnrn nrndisk2\n"); exit(1); } sprintf(buf, "%s.zip", argv[1]); if ((fi = fopen(buf, "rb")) == (FILE*)0) { printf("can't open %s\n", buf); exit(1); } n=1; done = 0; while (!done) { sprintf(buf, "%s.z%d", argv[1], n); if ((fo = fopen(buf, "wb")) == (FILE*)0) { printf("can't open %s\n", buf); exit(1); } for (j=0; j < 88; ++j) { /* 88*1024*16 = 1441792 */ i = fread(buf, sizeof(char), 1024*16, fi); printf("read %d\n", i); i = fwrite(buf, sizeof(char), i, fo); printf("write %d\n", i); if (i < 1024*16) { done = 1; break; } } ++n; fclose(fo); } } neuron-7.5/src/mswin/extra/winmain.c000077500000000000000000000017011323325274500175600ustar00rootroot00000000000000 #include "windows.h" #include #include extern int main(int argc, char **argv); /* one arg only. go to first space and then all the rest is the arg */ static void msgetarg(int* pargc, char*** pargv) { static char buf[1024]; static char* av[20]; int space, ac; char* p; *pargv = av; strcpy(buf, GetCommandLine()); #if 0 MessageBox(NULL, buf, "msgetarg", MB_OK); #endif space = 0; ac = 0; av[ac++] = buf; #if 0 for (p = buf; *p; ++p) { while (*p && (*p == ' ' || *p == '\t')) { *p++ = '\0'; space = 1; } if (space && *p) { av[ac++] = p; } space = 0; } #else for (p = buf; *p; ++p) { if (*p == ' ' || *p == '\t') { *p++ = '\0'; av[ac++] = p; break; } } #endif *pargc = ac; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int ret; int argc; char** argv; msgetarg(&argc, &argv); ret = main(argc, argv); return ret; } neuron-7.5/src/mswin/lib/000077500000000000000000000000001323325274500153735ustar00rootroot00000000000000neuron-7.5/src/mswin/lib/Makefile.am000077500000000000000000000003151323325274500174310ustar00rootroot00000000000000EXTRA_DIST = mknrndl2.sh mknrndll.sh mos2nrn1.sh mos2nrn1.sh nrnsys1.sh \ mknrndll.mak modlunit.sh nrnsys.sh psfilt.sed neuron.sh neuron2.sh \ neuron3.sh mos2nrn3.sh bshstart.sh minttyrc nrnstart.bsh neuron-7.5/src/mswin/lib/Makefile.in000066400000000000000000000377521323325274500174560ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = mknrndll.mak CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/mknrndll.mak.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = mknrndl2.sh mknrndll.sh mos2nrn1.sh mos2nrn1.sh nrnsys1.sh \ mknrndll.mak modlunit.sh nrnsys.sh psfilt.sed neuron.sh neuron2.sh \ neuron3.sh mos2nrn3.sh bshstart.sh minttyrc nrnstart.bsh all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mknrndll.mak: $(top_builddir)/config.status $(srcdir)/mknrndll.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/lib/bshstart.sh000077500000000000000000000025261323325274500175710ustar00rootroot00000000000000#!/bin/sh N=`pwd` if test -f $N/bin/cygpath ; then PATH=$N/bin cyg=yes else if test -d $N/mingw ; then PATH=$N/mingw/bin:$PATH fi if test -d $N/bin64 ; then PATH=$N/bin64:$PATH else PATH=$N/bin:$PATH fi cyg=no fi export PATH export N MPD_CONF_FILE=$N/mpd.conf export N export PATH export MPD_CONF_FILE #to avoid bash warning, create /tmp if it does not exist if test $cyg = yes ; then if test ! -e /tmp ; then a=`cygpath --mixed /tmp` mkdir -p $a if test -d /tmp ; then echo "Notice: created $a to avoid bash shell warning in future." else echo "Notice: could not create $a , the bash shell warning can be ignored." fi fi fi cd c:/ if test "$cyg" = "no" ; then if test "$PYTHONPATH" != "" ; then #convert dos (';' separated) to posix pathspec # Only needed when nrniv -c "quit()" succeeds which means # set_nrnpyenv.sh below does nothing but the PYTHONPATH still has dos syntax. # Not clear why there must be extra \escapes in second -e expression export PYTHONPATH=`echo "$PYTHONPATH" | sed -e 's,\([A-Za-z]\):,/\1,g' -e 's,\\\\,/,g' -e 's/;/:/g'` fi #PYTHONPATH #source set_nrnpyenv.sh if python -c 'quit()' >& /dev/null ; then eval "`nrnpyenv.sh`" fi export NEURONHOME=$N if test "$PYTHONPATH" = "" ; then export PYTHONPATH=$N/lib/python else export PYTHONPATH=$PYTHONPATH:$N/lib/python fi #PYTHONPATH fi #cyg = no neuron-7.5/src/mswin/lib/minttyrc000066400000000000000000000001431323325274500171650ustar00rootroot00000000000000ForegroundColour=0,0,0 BackgroundColour=255,255,255 CursorColour=0,0,0 BoldAsFont=no FontHeight=10 neuron-7.5/src/mswin/lib/mknrndl2.sh000077500000000000000000000021061323325274500174600ustar00rootroot00000000000000 NEURONHOME=$N M=$N/lib if test $# -gt 0 then files=$* else files=`ls -1 *.[mM][oO][dD]` fi prefixes=`echo $files | sed 's/\.[mM][oO][dD]//g'` #echo "COMPLETE FILE NAMES" #echo $files #echo "TRUNCATED FILE NAMES" #echo $prefixes MODOBJS= if [ `echo "\n"` ] then newline="\n" else newline="\\\\n" fi echo '#include #include "hocdec.h" #define IMPORT extern __declspec(dllimport) IMPORT int nrnmpi_myid, nrn_nobanner_; ' > mod_func.c for i in $prefixes do echo extern void _"$i"_reg"();" >> mod_func.c done echo ' modl_reg(){ //nrn_mswindll_stdio(stdin, stdout, stderr); if (!nrn_nobanner_) if (nrnmpi_myid < 1) { fprintf(stderr, "Additional mechanisms from files'$newline'"); ' >> mod_func.c for i in $files do echo 'fprintf(stderr," '$i'");' >>mod_func.c done echo 'fprintf(stderr, "'$newline'"); }' >>mod_func.c echo -n 'MODOBJFILES=' >$$.tmp for i in $prefixes do echo _"$i"_reg"();" >> mod_func.c echo -n " $i.o" >> $$.tmp done echo "}" >> mod_func.c #echo ' "' >> $$.tmp # cat $$.tmp $N/bin/make -f $M/mknrndll.mak "`cat $$.tmp`" nrnmech.dll rm $$.tmp neuron-7.5/src/mswin/lib/mknrndll.mak000066400000000000000000000025001323325274500177030ustar00rootroot00000000000000#for cygwin need to avoid mpicc, and for x86_64-w64-mingw64 need the full #name of the compiler. #CC = mpicc CC = gcc EXTRA_CYGWIN = -I$N/lib -I$N/$(CC)inc -I$N/$(CC)3inc -L$N/$(CC)lib EXTRA_FLAGS = $(EXTRA_CYGWIN) CFLAGS = \ -DDLL_EXPORT -DPIC \ -I$N/src/scopmath -I$N/src/nrnoc -I$N/src/oc \ $(EXTRA_FLAGS) bin = bin # to handle variations of filename extensions .SUFFIXES: .o .mod .moD .mOd .mOD .Mod .MoD .MOd .MOD .PRECIOUS: %.c %.o : %.mod %.c : %.mod nocmodl $* %.o : %.c $(CC) $(CFLAGS) -c $*.c # additional rules to handle variations of filename extensions %.c : %.moD nocmodl $* %.c : %.mOd nocmodl $* %.c : %.mOD nocmodl $* %.c : %.Mod nocmodl $* %.c : %.MoD nocmodl $* %.c : %.MOd nocmodl $* %.c : %.MOD nocmodl $* %.o : %.moD %.o : %.mOd %.o : %.mOD %.o : %.Mod %.o : %.MoD %.o : %.MOd %.o : %.MOD mod_func.o: mod_func.c $(CC) $(CFLAGS) -c $*.c #nrnmech.dll: mod_func.o $(MODOBJFILES) # ld -d -S -x -r -o nrnmech.dll mod_func.o $(MODOBJFILES) -L$N/lib -lscpmt nrnmech.dll: mod_func.o $(MODOBJFILES) $(CC) $(EXTRA_FLAGS) -shared -o nrnmech.dll mod_func.o $(MODOBJFILES) \ -L$N/$(bin) -lnrniv -lpthread rebase -b 0x64000000 -v nrnmech.dll #nm nrnmech.dll | mkdll -u > nrnmech.h #will give a list of neuron.exe names #required by nrnmech.dll mod_func.o $(MODOBJFILES): $(N)/$(bin)/nrniv.exe neuron-7.5/src/mswin/lib/mknrndll.mak.in000077500000000000000000000026201323325274500203160ustar00rootroot00000000000000#for cygwin need to avoid mpicc, and for x86_64-w64-mingw64 need the full #name of the compiler. @BUILD_MINGW_TRUE@CC = @CC@ @BUILD_MINGW_FALSE@CC = gcc EXTRA_CYGWIN = -I$N/lib -I$N/$(CC)inc -I$N/$(CC)3inc -L$N/$(CC)lib EXTRA_FLAGS = @MINGW_CFLAG@ @EXTRA_CYGWIN_FLAGS@ CFLAGS = \ -DDLL_EXPORT -DPIC \ -I$N/src/scopmath -I$N/src/nrnoc -I$N/src/oc \ $(EXTRA_FLAGS) bin = bin@binsuffix@ # to handle variations of filename extensions .SUFFIXES: .o .mod .moD .mOd .mOD .Mod .MoD .MOd .MOD .PRECIOUS: %.c %.o : %.mod %.c : %.mod nocmodl $* %.o : %.c $(CC) $(CFLAGS) -c $*.c # additional rules to handle variations of filename extensions %.c : %.moD nocmodl $* %.c : %.mOd nocmodl $* %.c : %.mOD nocmodl $* %.c : %.Mod nocmodl $* %.c : %.MoD nocmodl $* %.c : %.MOd nocmodl $* %.c : %.MOD nocmodl $* %.o : %.moD %.o : %.mOd %.o : %.mOD %.o : %.Mod %.o : %.MoD %.o : %.MOd %.o : %.MOD mod_func.o: mod_func.c $(CC) $(CFLAGS) -c $*.c #nrnmech.dll: mod_func.o $(MODOBJFILES) # ld -d -S -x -r -o nrnmech.dll mod_func.o $(MODOBJFILES) -L$N/lib -lscpmt nrnmech.dll: mod_func.o $(MODOBJFILES) $(CC) $(EXTRA_FLAGS) -shared -o nrnmech.dll mod_func.o $(MODOBJFILES) \ -L$N/$(bin) -lnrniv -lpthread @nrnskip_rebase@rebase -b 0x64000000 -v nrnmech.dll #nm nrnmech.dll | mkdll -u > nrnmech.h #will give a list of neuron.exe names #required by nrnmech.dll mod_func.o $(MODOBJFILES): $(N)/$(bin)/nrniv.exe neuron-7.5/src/mswin/lib/mknrndll.sh000077500000000000000000000010211323325274500175450ustar00rootroot00000000000000 if test -f $1/bin/cygpath ; then N="`$1/bin/cygpath -u $1`" PATH=$N/bin else N=$1 if test -d $N/mingw ; then PATH=$N/mingw/bin:$PATH fi if test -d $N/bin64 ; then PATH=$N/bin64:$PATH else PATH=$N/bin:$PATH fi fi export PATH export N NEURONHOME=$N export NEURONHOME rm -f nrnmech.dll sh $N/lib/mknrndl2.sh echo "" if [ -f nrnmech.dll ] ; then echo "nrnmech.dll was built successfully." else echo "There was an error in the process of creating nrnmech.dll" fi echo "Press Return key to exit" read a neuron-7.5/src/mswin/lib/modlunit.sh000077500000000000000000000010701323325274500175630ustar00rootroot00000000000000if test -f $1/bin/cygpath ; then N="`$1/bin/cygpath -u $1`" PATH=$N/bin fname="`cygpath -u $2|sed 's/\.[mM][oO][dD]$/.mod/'`" cyg=yes else N=$1 if test -d $N/mingw ; then PATH=$N/mingw/bin:$PATH fi if test -d $N/bin64 ; then PATH=$N/bin64:$PATH else PATH=$N/bin:$PATH fi fname="`echo $2|sed 's/\.[mM][oO][dD]$/.mod/'`" cyg=no fi export PATH export N NEURONHOME=$N export NEURONHOME if test $cyg = yes ; then if modlunit $fname ; then echo "" else echo "" echo "Press Return key to exit" read a fi #read a else modlunit $fname fi neuron-7.5/src/mswin/lib/mos2nrn1.sh000077500000000000000000000044731323325274500174210ustar00rootroot00000000000000#!/bin/sh #derived from nrn/bin/mos2nrn2.sh.in # mos2nrn2 zipfile NEURONHOME=$N export NEURONHOME if test "$MINGW" = "yes" ; then zipfile="$1" else zipfile=`cygpath -u "$1"` fi current="`pwd`" simdir="$TEMP/$$" askread="yes" doclean() { if test "$a" = "y" ; then echo "removing $simdir" cd $simdir/.. rm -r $simdir else echo " not removing $simdir" fi sleep 2 exit 0 } cleanup() { a=y if test "$askread" = "yes" ; then echo "Clean up by removing directory $simdir ? (n/y):$a" read a fi if test "$a" = "" ; then a=y fi doclean } asklaunch() { a=C if test "$askread" = "yes" ; then echo "[C]lean up by removing directory $simdir, [R]elaunch NEURON, or immediately e[X]it ? (C/R/X):$a" read a fi case "$a" in R|r) a=R;; X|x) a=n;; *) a=y;; esac } if mkdir "$simdir" ; then true else echo "Couldn't mkdir $simdir" read a exit 0 fi # make a file for communication with neuron cp "$zipfile" "$simdir/nrnzip.zip" echo "Changing the current directory to $simdir" cd "$simdir" unzip -n nrnzip.zip for MOSINIT in mosinit.py mosinit.hoc ; do if [ -r $MOSINIT ] ; then first=./$MOSINIT else first=`find . -name $MOSINIT -print |sed -n 1p` fi if [ "$first" ] ; then break fi done if [ -z "$first" ] ; then echo "Missing the mosinit.hoc or mosinit.py file" cleanup fi cd `dirname $first` first=`basename $first` if [ -f moslocal.tmp ] ; then askread="no" fi if [ "$MOSINIT" = "mosinit.hoc" ] ; then moddirs="`sed -n '1s;^//moddir;;p' < $first`" MOSINITARGS="$first" else moddirs="`sed -n '1s;^#moddir;;p' < $first | tr -d '\r'`" MOSINITARGS="-python $first" fi if test "$moddirs" != "" ; then modfiles='yes' mkdir i686cygwin for i in $moddirs ; do cp $i/*.[Mm][Oo][Dd] i686cygwin done cd i686cygwin else modfiles="`ls *.[Mm][Oo][Dd] 2>/dev/null`" fi if test "$modfiles" != "" ; then sh $N/lib/mknrndl2.sh if test -f "nrnmech.dll" ; then echo "nrnmech.dll was built successfully." if test "$moddirs" != "" ; then mv nrnmech.dll .. cd .. fi else echo "There was an error in the process of creating nrnmech.dll" cleanup fi fi a=y if test "$askread" = "yes" ; then echo "Run NEURON? (y/n):" read a fi if [ "$a" != "y" -a "$a" != "" ] ; then cleanup fi a=R while test "$a" = "R" ; do nrniv $MOSINITARGS echo "" asklaunch done doclean neuron-7.5/src/mswin/lib/mos2nrn3.sh000066400000000000000000000005711323325274500174130ustar00rootroot00000000000000#!/bin/bash export TEMP="$1" shift export N="$1" shift export NEURONHOME="$N" export PATH="$N/bin:$N/mingw/bin:$PATH" echo $N echo $PATH source set_nrnpyenv.sh export PYTHONPATH="$PYTHONPATH:$N/lib/python" export MINGW='yes' $N/lib/mos2nrn1.sh "$1" a=$? if test $a -ne 0 ; then echo' mos2nrn.exe exited abnormally. Press the return key to close this window. ' read a fi neuron-7.5/src/mswin/lib/neuron.sh000077500000000000000000000004771323325274500172500ustar00rootroot00000000000000#!/bin/sh N="`$1/bin/cygpath -u $1`" export N export PYTHONHOME=$N shift PATH=$N/bin:/usr/bin:$PATH export PATH SH_PATH=$N/bin/sh export SH_PATH ARG="`cygpath -u $1`" DD=`dirname "$ARG"` FF=`basename "$ARG"` cd $DD nrniv $FF a=$? if test $a -ne 0 ; then echo exit status $a echo Hit return key to exit. read a fi neuron-7.5/src/mswin/lib/neuron2.sh000077500000000000000000000001461323325274500173230ustar00rootroot00000000000000if ! $* ; then echo ' NEURON exited abnormally. Press the return key to close this window ' read a fi neuron-7.5/src/mswin/lib/neuron3.sh000066400000000000000000000003521323325274500173200ustar00rootroot00000000000000export N=$1 shift export NEURONHOME=$N export PATH=$N/bin:$PATH source set_nrnpyenv.sh export PYTHONPATH=$PYTHONPATH:$N/lib/python if ! $* ; then echo ' NEURON exited abnormally. Press the return key to close this window ' read a fi neuron-7.5/src/mswin/lib/nrnstart.bsh000066400000000000000000000001261323325274500177430ustar00rootroot00000000000000#!/bin/bash export N=/cygdrive/c/nrn73 export PATH=$N/bin:$PATH export PYTHONHOME=$N neuron-7.5/src/mswin/lib/nrnsys.sh000077500000000000000000000003121323325274500172620ustar00rootroot00000000000000 #support the system("shell command") under mswin N="`$1/bin/cygpath -u $1`" export N shift PATH=$N/bin:/usr/bin:$PATH export PATH fout="`cygpath -u $1`" shift eval "$*" > $fout echo 1 > tmpdos1.tmp neuron-7.5/src/mswin/lib/nrnsys1.sh000077500000000000000000000003321323325274500173450ustar00rootroot00000000000000 #support the system("shell command") under mswin # a copy of nrnsys.sh but without stdout redirection N="`$1/bin/cygpath -u $1`" export N shift PATH=$N/bin:/usr/bin:$PATH export PATH eval "$*" echo 1 > tmpdos1.tmp neuron-7.5/src/mswin/lib/psfilt.sed000077500000000000000000000001301323325274500173660ustar00rootroot00000000000000/%%EndProlog/a\ 2 setlinejoin s;/Adobe-;/; s;-Oblique;; s;12\(.\)/Arial;10\1/Helvetica; neuron-7.5/src/mswin/mwprefix.h000077500000000000000000000015271323325274500166470ustar00rootroot00000000000000/* auto include file for metrowerks codewarrior for all nrn */ #if __MWERKS__ >= 7 #define _MSL_DIRENT_H #else #include #endif #define HAVE_LIMITS_H 1 #pragma once off #ifndef __WIN32__ #define __WIN32__ 1 #endif #ifndef WIN32 #define WIN32 1 #endif #define _WIN32 #ifndef _Windows #define _Windows 1 #endif #if __cplusplus struct Section; struct Object; struct Symbol; #endif #define motif_kit #define sgi_motif_kit #define printf myprintf #define vprintf myvprintf #define gets mygets #define puts myputs #define fprintf myfprintf #undef small #undef near #define small mysmall #define near mynear #define stricmp _stricmp #define putenv _putenv //#define system mysystem #undef DELETE #undef IGNORE #define CABLE 1 #define HOC 1 #define OOP 1 #define OC_CLASSES "nrnclass.h" #define USECVODE 1 #define CVODE 1 #define USEMATRIX 1 neuron-7.5/src/mswin/njconf.h000077500000000000000000000001071323325274500162540ustar00rootroot00000000000000#undef USENRNJAVA #if defined(__MWERKS__) #define USENRNJAVA 1 #endif neuron-7.5/src/mswin/nrnconf.h000077500000000000000000000012131323325274500164410ustar00rootroot00000000000000#define int32_t long #define u_int32_t unsigned long #define HAVE_LIMITS_H 1 #define HAVE_POSIX_SIGNALS #define RETSIGTYPE void #define HAVE_IV 1 #define USEBBS 1 #define HAVE_STL 1 #define yyoverflow printf #if defined(_MSC_VER) #define __MWERKS__ 1 #define __WIN32__ 1 #define _Windows 1 #undef near #define near mynear #define motif_kit #define sgi_motif_kit #define printf myprintf #define vprintf myvprintf #define gets mygets #define puts myputs #define fprintf myfprintf #undef DELETE #undef IGNORE #define CABLE 1 #define HOC 1 #define OOP 1 #define OC_CLASSES "nrnclass.h" #define USECVODE 1 #define CVODE 1 #define USEMATRIX 1 #endif neuron-7.5/src/mswin/nrncygso.sh000066400000000000000000000150111323325274500170210ustar00rootroot00000000000000#!/bin/sh set -x #mingw='yes' mingw='no' nrnpy='yes' #nrnpy='yes' #nrnpy='no' #nrnjvm='yes' nrnjvm='no' #nrnmpi='yes' NPYVER= #NPYONLY='yes' NPYONLY='no' if test mingw = 'yes' ; then ltlibs= else ltlibs= fi if test "$NPYONLY" = "no" ; then #all the .o files find .. -name \*.o -print | sed ' /\/modlunit\//d /\/nmodl\//d /\/e_editor\//d /\/ivoc\/classreg\.o/d /\/ivoc\/datapath\.o/d /\/ivoc\/nrnmain\.o/d /\/ivoc\/ocjump\.o/d /\/ivoc\/symdir\.o/d /\/ivoc*\/ivocman1\.o/d #/\/nrnpython\/.*\.o/d ##/\/nrnmpi\/.*\.o/d /\/nrnoc\/cprop\.o/d /\/oc*\/code\.o/d /\/oc*\/hoc_init\.o/d /\/oc*\/hoc_oop\.o/d /\/oc*\/hocusr\.o/d /\/oc*\/plt\.o/d /\/oc*\/settext\.o/d /\/oc*\/spinit\.o/d /\/oc*\/spinit1\.o/d /\/oc*\/spinit2\.o/d /\/memacs*\/.*termio\.o/d /\/memacs\/main\.o/d /\/nvkludge\.o/d /\/nocable\.o/d /\/nrnnoiv\.o/d /\/ockludge\.o/d /\/ocnoiv\.o/d /\/ocmain\.o/d /\/inithoc\.o/d ' > temp mpicc=mpicc if test "$mpicc" = "mpicc" ; then mpich=`which $mpicc | sed "s,/bin/.*,,"` echo "mpich=$mpich" #mpich made from mpich-3.0.2 and dlls created by if false ; then ./configure --prefix=$HOME/mpich2 --with-pm=gforker:mpd \ --disable-static --enable-shared --disable-f77 --disable-fc make make install cd $HOME/mpich2/lib mkdir objs cd objs ar -x ../libpmpich.a ar -x ../libmpl.a ar -x ../libmpich.a rm lib_libpmpich_la-comm_split_type.o cd .. gcc -shared -Wl,--out-implib,libmpich.dll.a -o libmpich.dll objs/*.o fi fi obj=`cat temp` fi # NPYONLY no CXX=mpic++ echo IVLIBDIR=\"${IVLIBDIR}\" echo CFLAGS=\"${CFLAGS}\" echo LDFLAGS=\"${LDFLAGS}\" if test "$CFLAGS" != "-mno-cygwin" ; then if test "$mingw" = "no" ; then mpilib=mpich/lib/libmpich.dll.a mpilib="" echo 'make nrniv.dll under cygwin' $CXX -shared $obj \ -L${IVLIBDIR} -lIVhines \ $mpilib \ -lreadline \ $LIBS \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -lgdi32 -lcomdlg32 \ -lncurses -lm \ -o nrniv.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrniv.dll.a if test $nrnpy = 'yes' ; then echo 'make nrnpython27.dll' $CXX -shared ../nrnpython/${ltlibs}/*.o -L. -lnrniv -o nrnpython27.dll \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -L${IVLIBDIR} -lIVhines \ -lreadline \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrnpython27.dll.a echo 'make hocmodule.dll' $CXX -shared \ ../nrnpython/${ltlibs}/inithoc.o \ -L. -lnrniv \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -o hocmodule.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libhocmodule.dll.a LHOCMODULE='-lhocmodule' else # if test $nrnpy = 'yes' LHOCMODULE='' fi # if test $nrnpy = 'yes' echo 'make nrniv.exe' $CXX -g -O2 -mwindows -o nrniv.exe \ ../ivoc/nrnmain.o ../oc/modlreg.o \ -L. -lnrniv \ $LHOCMODULE \ -lncurses \ -L${IVLIBDIR} -lIVhines \ -lstdc++ -lgdi32 -lcomdlg32 \ ${LDFLAGS} \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz fi # mingw = no if test "$mingw" = "yes" ; then if test "$NPYONLY" = "no" ; then echo 'make nrniv.dll for mingw under mingw' $CXX -shared $obj \ -L${IVLIBDIR} -lIVhines \ $LIBS \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -lreadline -ltermcap -lpthread \ -lgdi32 \ -o nrniv.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrniv.dll.a if test $nrnmpi = 'yes' ; then echo 'make libnrnmpi.dll' $CXX -shared ../nrnmpi/${ltlibs}/*.o -L. -lnrniv -o libnrnmpi.dll \ ${LIBS} \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrnmpi.dll.a fi # if test $nrnmpi = 'yes' fi # NPYONLY no if test $nrnpy = 'yes' ; then echo 'make libnrnpython${NPYVER}.dll' $CXX -shared ../nrnpython/${ltlibs}/*.o -L. -lnrniv -o libnrnpython${NPYVER}.dll \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -L${IVLIBDIR} -lIVhines \ -lreadline -lpthread \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrnpython${NPYVER}.dll.a echo "make hocmodule${NPYVER}.dll" $CXX -shared \ ../nrnpython/${ltlibs}/inithoc.o \ -L. -lnrniv -lnrnpython${NPYVER}\ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -o hocmodule${NPYVER}.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libhocmodule${NPYVER}.dll.a LHOCMODULE="-lhocmodule${NPYVER}" else # if test $nrnpy = 'yes' LHOCMODULE='' fi # if test $nrnpy = 'yes' if test "$NPYONLY" = "no" ; then echo 'make nrniv.exe' $CXX -g -O2 -o nrniv.exe \ ../ivoc/nrnmain.o \ -L. -lnrniv \ ${LDFLAGS} #without msvcr90.dll and a manifest, cannot 'import numpy' from enthought. #To allow this, create an alternative executable. manifest=Microsoft.VC90.CRT.manifest if test -f /c/Python27/$manifest ; then cp /c/Python27/$manifest . echo '#include "winuser.h" 1 RT_MANIFEST '$manifest' ' > msvcr.rc windres --input msvcr.rc --output msvcr.o $CXX -g -O2 -o nrniv_enthought.exe \ ../ivoc/nrnmain.o msvcr.o\ -L. -lnrniv \ ${LDFLAGS} fi # enthought manifest fi # NPYONLY no fi # mingw = yes else # if test "$CFLAGS" != "-mno-cygwin" $CXX -shared -mno-cygwin $obj \ $LIBS -lstdc++ \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -o nrniv.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrniv.dll.a $CXX -shared -mno-cygwin \ ../nrnpython/${ltlibs}/inithoc.o \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz \ -L. -lnrniv -lstdc++ \ -o hocmodule.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libhocmodule${NPYVER}.dll.a $CXX -g -O2 -mno-cygwin -e _mainCRTStartup -o nrniv.exe \ ../ivoc/nrnmain.o ../oc/modlreg.o \ -L. -lnrniv -lstdc++ \ ${LDFLAGS} \ -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -L/usr/lib -lz fi # if test "$CFLAGS" != "-mno-cygwin" #mv nrniv.exe c:/nrn61/bin #cd .. #mv hocmodule.dll c:/nrn61/bin neuron-7.5/src/mswin/nrncygso.sh.in000066400000000000000000000147051323325274500174370ustar00rootroot00000000000000#!/bin/sh set -x @BUILD_MINGW_TRUE@mingw='yes' @BUILD_MINGW_FALSE@mingw='no' @BUILD_NRNPYTHON_TRUE@nrnpy='yes' @BUILD_NRNPYTHON_DYNAMIC_TRUE@nrnpy='yes' @BUILD_NRNPYTHON_FALSE@@BUILD_NRNPYTHON_DYNAMIC_FALSE@nrnpy='no' @BUILD_NRNJAVA_TRUE@nrnjvm='yes' @BUILD_NRNJAVA_FALSE@nrnjvm='no' @BUILD_NRNMPI_DYNAMIC_TRUE@nrnmpi='yes' NPYVER=@npy_pyver10@ @NRNPYTHON_ONLY_TRUE@NPYONLY='yes' @NRNPYTHON_ONLY_FALSE@NPYONLY='no' if test mingw = 'yes' ; then ltlibs= else ltlibs= fi if test "$NPYONLY" = "no" ; then #all the .o files find .. -name \*.o -print | sed ' /\/modlunit\//d /\/nmodl\//d /\/e_editor\//d /\/ivoc\/classreg\.o/d /\/ivoc\/datapath\.o/d /\/ivoc\/nrnmain\.o/d /\/ivoc\/ocjump\.o/d /\/ivoc\/symdir\.o/d /\/ivoc*\/ivocman1\.o/d @BUILD_MINGW_TRUE@/\/nrnpython\/.*\.o/d @BUILD_MINGW_TRUE@@BUILD_NRNMPI_DYNAMIC_TRUE@/\/nrnmpi\/.*\.o/d /\/nrnoc\/cprop\.o/d /\/oc*\/code\.o/d /\/oc*\/hoc_init\.o/d /\/oc*\/hoc_oop\.o/d /\/oc*\/hocusr\.o/d /\/oc*\/plt\.o/d /\/oc*\/settext\.o/d /\/oc*\/spinit\.o/d /\/oc*\/spinit1\.o/d /\/oc*\/spinit2\.o/d /\/memacs*\/.*termio\.o/d /\/memacs\/main\.o/d /\/nvkludge\.o/d /\/nocable\.o/d /\/nrnnoiv\.o/d /\/ockludge\.o/d /\/ocnoiv\.o/d /\/ocmain\.o/d /\/inithoc\.o/d ' > temp mpicc=@MPICC@ if test "$mpicc" = "mpicc" ; then mpich=`which $mpicc | sed "s,/bin/.*,,"` echo "mpich=$mpich" #mpich made from mpich-3.0.2 and dlls created by if false ; then ./configure --prefix=$HOME/mpich2 --with-pm=gforker:mpd \ --disable-static --enable-shared --disable-f77 --disable-fc make make install cd $HOME/mpich2/lib mkdir objs cd objs ar -x ../libpmpich.a ar -x ../libmpl.a ar -x ../libmpich.a rm lib_libpmpich_la-comm_split_type.o cd .. gcc -shared -Wl,--out-implib,libmpich.dll.a -o libmpich.dll objs/*.o fi fi obj=`cat temp` fi # NPYONLY no CXX=@CXX@ echo IVLIBDIR=\"${IVLIBDIR}\" echo CFLAGS=\"${CFLAGS}\" echo LDFLAGS=\"${LDFLAGS}\" if test "$CFLAGS" != "-mno-cygwin" ; then if test "$mingw" = "no" ; then mpilib=mpich/lib/libmpich.dll.a mpilib="" echo 'make nrniv.dll under cygwin' $CXX -shared $obj \ -L${IVLIBDIR} -lIVhines \ $mpilib \ -lreadline \ $LIBS \ @NRNPYTHON_PYLIBLINK@ \ -lgdi32 -lcomdlg32 \ -lncurses -lm \ -o nrniv.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrniv.dll.a if test $nrnpy = 'yes' ; then echo 'make nrnpython27.dll' $CXX -shared ../nrnpython/${ltlibs}/*.o -L. -lnrniv -o nrnpython27.dll \ @NRNPYTHON_PYLIBLINK@ \ -L${IVLIBDIR} -lIVhines \ -lreadline \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrnpython27.dll.a echo 'make hocmodule.dll' $CXX -shared \ ../nrnpython/${ltlibs}/inithoc.o \ -L. -lnrniv \ @NRNPYTHON_PYLIBLINK@ \ -o hocmodule.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libhocmodule.dll.a LHOCMODULE='-lhocmodule' else # if test $nrnpy = 'yes' LHOCMODULE='' fi # if test $nrnpy = 'yes' echo 'make nrniv.exe' $CXX -g -O2 -mwindows -o nrniv.exe \ ../ivoc/nrnmain.o ../oc/modlreg.o \ -L. -lnrniv \ $LHOCMODULE \ -lncurses \ -L${IVLIBDIR} -lIVhines \ -lstdc++ -lgdi32 -lcomdlg32 \ ${LDFLAGS} \ @NRNPYTHON_PYLIBLINK@ fi # mingw = no if test "$mingw" = "yes" ; then if test "$NPYONLY" = "no" ; then echo 'make nrniv.dll for mingw under mingw' $CXX -shared $obj \ -L${IVLIBDIR} -lIVhines \ $LIBS \ @NRNPYTHON_PYLIBLINK@ \ -lreadline -ltermcap -lpthread \ -lgdi32 \ -o nrniv.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrniv.dll.a if test $nrnmpi = 'yes' ; then echo 'make libnrnmpi.dll' $CXX -shared ../nrnmpi/${ltlibs}/*.o -L. -lnrniv -o libnrnmpi.dll \ ${LIBS} \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrnmpi.dll.a fi # if test $nrnmpi = 'yes' fi # NPYONLY no if test $nrnpy = 'yes' ; then echo 'make libnrnpython${NPYVER}.dll' $CXX -shared ../nrnpython/${ltlibs}/*.o -L. -lnrniv -o libnrnpython${NPYVER}.dll \ @NRNPYTHON_PYLIBLINK@ \ -L${IVLIBDIR} -lIVhines \ -lreadline -lpthread \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrnpython${NPYVER}.dll.a echo "make hocmodule${NPYVER}.dll" $CXX -shared \ ../nrnpython/${ltlibs}/inithoc.o \ -L. -lnrniv -lnrnpython${NPYVER}\ @NRNPYTHON_PYLIBLINK@ \ -o hocmodule${NPYVER}.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libhocmodule${NPYVER}.dll.a LHOCMODULE="-lhocmodule${NPYVER}" else # if test $nrnpy = 'yes' LHOCMODULE='' fi # if test $nrnpy = 'yes' if test "$NPYONLY" = "no" ; then echo 'make nrniv.exe' $CXX -g -O2 -o nrniv.exe \ ../ivoc/nrnmain.o \ -L. -lnrniv \ ${LDFLAGS} #without msvcr90.dll and a manifest, cannot 'import numpy' from enthought. #To allow this, create an alternative executable. manifest=Microsoft.VC90.CRT.manifest if test -f /c/Python27/$manifest ; then cp /c/Python27/$manifest . echo '#include "winuser.h" 1 RT_MANIFEST '$manifest' ' > msvcr.rc windres --input msvcr.rc --output msvcr.o $CXX -g -O2 -o nrniv_enthought.exe \ ../ivoc/nrnmain.o msvcr.o\ -L. -lnrniv \ ${LDFLAGS} fi # enthought manifest fi # NPYONLY no fi # mingw = yes else # if test "$CFLAGS" != "-mno-cygwin" $CXX -shared -mno-cygwin $obj \ $LIBS -lstdc++ \ @NRNPYTHON_PYLIBLINK@ \ -o nrniv.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libnrniv.dll.a $CXX -shared -mno-cygwin \ ../nrnpython/${ltlibs}/inithoc.o \ @NRNPYTHON_PYLIBLINK@ \ -L. -lnrniv -lstdc++ \ -o hocmodule.dll \ -Wl,--enable-auto-image-base \ ${LDFLAGS} \ -Xlinker --out-implib -Xlinker libhocmodule${NPYVER}.dll.a $CXX -g -O2 -mno-cygwin -e _mainCRTStartup -o nrniv.exe \ ../ivoc/nrnmain.o ../oc/modlreg.o \ -L. -lnrniv -lstdc++ \ ${LDFLAGS} \ @NRNPYTHON_PYLIBLINK@ fi # if test "$CFLAGS" != "-mno-cygwin" #mv nrniv.exe c:/nrn61/bin #cd .. #mv hocmodule.dll c:/nrn61/bin neuron-7.5/src/mswin/nrniv.ico000077500000000000000000000013761323325274500164670ustar00rootroot00000000000000 è( @€€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿ™™™ ™ ™ ™™ ™ ™ ™ ™ ™ ™ ™ ™™ ™ ™ ÿÿÿÿÿüÿ¿ùóÿ¿ûø¿÷ÿƒçÿÿ‡ïÿÿ—ïÿÿ÷ïÿÿóïÿÿûïÿÿûÏÿÿùßÿÿýßÿÿýßÿÿýßÿÿü¿ÿÿþ?ÿÿþÿÿÿÿÿÿÿÿÿÿß·v÷ß7vëÞ·vëÞ·vÝÝ·vÝÛ³6¾×µN¾×¿ÿÿÏ¿ÿÿß¿þÿÿÿÿÿneuron-7.5/src/mswin/nrniv.rc000077500000000000000000000003461323325274500163150ustar00rootroot00000000000000/**************************************************************************** NRNIV.RC produced by Borland Resource Workshop *****************************************************************************/ 1 ICON "nrniv.ico" neuron-7.5/src/mswin/nrniv10.ico000077500000000000000000000013761323325274500166300ustar00rootroot00000000000000 è( @€€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ̼ÌÌÌÌÌÌÌÌÌÌÌÌÌÌ»¼ÌÌÌÌÌÌÌÌÌÌÌÌÌË»»ÌÌÌÌÌÌÌÌÌÌÌÌÌ˼»ÌÌÌÌÌÌÌÌÌÌÌÌÌ»Ì˼»Ì»Ì˼Ì˼ÌÌÌ»Ì˼»¼»¼Ë»ÌË»ÌÌ˼ÌÌ»¼¼¼»Ë˼Ë˼Ì˼ÌÌ»¼»¼Ë»Ì»»Ì»Ì˼ÌÌ˼˼̻ÌÌ»Ì˼»ÌÌÌ˼˼̻ÌÌ»Ì˼»ÌÌÌ˼˼̻ÌÌ»ÌÌ»¼ÌÌÌ˼˼̻ÌÌ»ÌÌ»¼ÌÌÌ˼˼̻ÌÌ»ÌÌ»ÌÌÌÌ˼˼̻ÌÌ»ÌÌÌÌÌÌÌ˼˼̻ÌÌ»ÌÌÌÌÌÌÌ˼˼̻Ì̼ÌÌÌÌÌÌÌ˼˼̻Ì̼ÌÌÌÌÌÌÌ˼˼̼ÌÌÌÌÌÌÌÌÌÌ˼˼ÌÌÌÌÌÌÌÌÌÌÌÿïÿïÿïÿïÿïÿïÿïÿ™Ÿ™Ÿïù™ù™ù™ÿéÿùÿéÿùïÿïŸþŸÿŸþùÿùïùÿéÿïÿžÿŸïŸïŸŸùþùïùïþÿŸþŸïŸþŸŸùïùþùþùþŸïžÿŸéÿéùŸéÿéŸùï™þŸþŸùþù™ùŸïŸùŸéÿ™þùŸ™ï™þÿïþÿïþÿïþÿïþÿïþïïïïïïïïïïïïŸïïïïîþïîþïîþïîù™þïîîîîîîîîîîîîïŸîîîneuron-7.5/src/mswin/nrnneosm.h000077500000000000000000000002041323325274500166340ustar00rootroot00000000000000/* src/nrncvode/nrnneosm.h. Generated automatically by configure. */ /* define to 1 if allowing NEOSIM */ /* #undef USENEOSIM */ neuron-7.5/src/mswin/nrnsetup.nsi000066400000000000000000000320471323325274500172240ustar00rootroot00000000000000; nrnsetup.nsi ; ; This script is based on example2.nsi ; ; It will install the contents of c:/nrn into a directory that the user selects, ; ;Configuration !define Version "7.5" ; The name of the installer Name "NEURON ${Version}" ; The file to write OutFile "nrn${Version}setup.exe" RequestExecutionLevel user SetCompressor bzip2 ; Declaration of user variables var "myCygVer1" var "myCygVer2" var "myCygVer3" var "myCygVer" var "cpCygwin" var "uINSTDIR" ; posix version of $INSTDIR ; The basic program group name !define NEURON "NEURON ${Version}" ; The default directory !define NRN "nrn" ; where to get the files !define MARSHAL "c:\marshalnrn" ; where is cygwin on the host !define CYGWIN "c:\cygwin" ; The default installation directory ;InstallDir $PROGRAMFILES\${NRN} ; Do not want spaces in the installation path InstallDir c:\${NRN} ;HKCU file association requires a subkey of Software\Classes\... !define ASSOCPREFIX "Software\Classes\" ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" Function .onInit ; called when installer is nearly finished initializing. ReadRegStr $R1 HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" StrCmp "$R1" "" ok +1 MessageBox MB_OKCANCEL "${NEURON} already installed at $R1. Press OK to install again." IDOK ok Abort ok: GetDLLVersionLocal "${MARSHAL}\nrn\bin\cygwin1.dll" $R0 $R1 IntOp $R2 $R0 / 0x00010000 IntOp $myCygVer1 $R2 / 1000 IntOp $myCygVer2 $R2 % 1000 IntOp $myCygVer3 $R0 & 0x000FFFF StrCpy $myCygVer "$myCygVer1.$myCygVer2.$myCygVer3" StrCpy $cpCygwin "no" IfFileExists "${CYGWIN}\bin\cygwin1.dll" +1 one GetDllVersion "${CYGWIN}\bin\cygwin1.dll" $R0 $R1 IntOp $R2 $R0 / 0x00010000 IntOp $R3 $R2 / 1000 IntOp $R4 $R2 % 1000 IntOp $R5 $R0 & 0x000FFFF StrCpy $0 "$R3.$R4.$R5" IntCmp $myCygVer1 $R3 +1 meold menew IntCmp $myCygVer2 $R4 +1 meold menew IntCmp $myCygVer3 $R5 one meold menew Goto one meold: StrCpy $cpCygwin "yes" MessageBox MB_OKCANCEL "Already installed cygwin1.dll version $0 is NEWER and will be cused in place of this installer distributed version $myCygVer . If you have trouble running NEURON after installation you will need to upgrade to a more recent version of NEURON. Press OK to continue installing." IDOK one Abort menew: MessageBox MB_OKCANCEL|MB_DEFBUTTON2 "Already installed cygwin1.dll version $0 is OLDER and may be incompatible with this installer distributed version $myCygVer . It is recommended that you upgrade to the most recent version from http://www.cygwin.org. Press OK to continue installing." IDOK one Abort one: FunctionEnd ; The text to prompt the user to enter a directory ComponentText "This will install ${NEURON} on your computer. Select which optional things you want installed." Page components Page directory "" "" stayInDirectory Page instfiles ; Get the install path. It cannot have spaces ; The text to prompt the user to enter a directory DirText "Choose a directory without spaces to install in to (cannot have spaces in the path):" Function stayInDirectory Push "$INSTDIR" Push " " Call StrStr Pop $R0 StrCmp $R0 "" +3 ; if no spaces then go on MessageBox MB_OK "The installation path is not allowed to have spaces." Abort IfFileExists "$INSTDIR\*.*" +1 +3 MessageBox MB_OK "$INSTDIR already exists. Remove it first or choose another path." Abort FunctionEnd ; The primary neuron install Section "${NEURON} (required)" SectionIn 1 RO Push $INSTDIR Call d2u Pop $uINSTDIR ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File /r "${MARSHAL}\nrn\*.*" ; otherwise cannot figure out how to put the installation folder in the file FileOpen $r1 "$INSTDIR\lib\nrnstart.bsh" "w" FileWrite $r1 "#!/bin/bash$\n" FileWrite $r1 "export N=$uINSTDIR$\n" FileWrite $r1 "export PATH=$$N/bin:$$PATH$\n" FileWrite $r1 "export PYTHONHOME=$$N$\n" FileClose $r1 Call cyginst ; Write the installation path into the registry WriteRegStr HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" "DisplayName" "${NEURON} (remove only)" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe" SectionEnd Function cyginst StrCmp $cpCygwin "no" one +1 Rename "$INSTDIR\bin\cygwin1.dll" "$INSTDIR\bin\cygwin1.dist" CopyFiles /SILENT /FILESONLY "${CYGWIN}\bin\cygwin1.dll" "$INSTDIR\bin\cygwin1.dll" 1000 one: FunctionEnd ; optional section Section "Associate .hoc and .nrnzip" ; I am trying to follow the makensis.nsi ; I do not know why we should back up old values WriteRegStr HKCU "${ASSOCPREFIX}.hoc" "" "NEURONFile" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile" "" "NEURON model file" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\shell" "" "open" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\DefaultIcon" "" "$INSTDIR\bin\nrniv10.ico" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\shell\open\command" "" '"$INSTDIR\bin\neuron.exe" "%1"' WriteRegStr HKCU "${ASSOCPREFIX}.nrnzip" "" "NEURONArchive" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive" "" "NEURON model archive" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\shell" "" "open" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\DefaultIcon" "" "$INSTDIR\bin\nrniv.ico" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\shell\open\command" "" '"$INSTDIR\bin\mos2nrn.exe" "%1"' FileOpen $r1 "$INSTDIR\lib\associate.dat" "w" FileWrite $r1 "If $INSTDIR\lib\associate.dat exists then, on uninstall, .hoc and .nrnzip associations will be removed." FileClose $r1 SectionEnd ; optional section Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\${NEURON}" SetOutPath "C:\" ; does not work, ends up as C StrCpy $OUTDIR "C:\" CreateShortCut "$SMPROGRAMS\${NEURON}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\nrngui.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\nrngui_python.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv -python $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\mknrndll.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/mknrndll.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\modlunit.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/modlunit.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\Notes.lnk" "notepad.exe" "$INSTDIR\notes.txt" WriteINIStr "$SMPROGRAMS\${NEURON}\NEURON Home Page.url" "InternetShortcut" "URL" "http://neuron.yale.edu/" SetOutPath "$INSTDIR\demo" CreateShortCut "$SMPROGRAMS\${NEURON}\NEURON Demo.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'cd $uINSTDIR/demo ; nrniv -dll $uINSTDIR/demo/release/nrnmech.dll demo.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 SetOutPath "C:\" CreateShortCut "$SMPROGRAMS\${NEURON}\mintty bash.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i" "$INSTDIR\bin\mintty.exe" 0 FileOpen $r1 "$INSTDIR\lib\smsinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\smsinst.dat exists then, on uninstall, the ${NEURON} Start Menu Shortcuts will be removed." FileClose $r1 SectionEnd ; optional section Section "Desktop ${NEURON} folder with Shortcuts" CreateDirectory "$DESKTOP\${NEURON}" SetOutPath "C:\" ; does not work, ends up as C StrCpy $OUTDIR "C:\" CreateShortCut "$DESKTOP\${NEURON}\nrngui.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\nrngui_python.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv -python $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\mknrndll.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/mknrndll.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\modlunit.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/modlunit.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\Notes.lnk" "notepad.exe" "$INSTDIR\notes.txt" WriteINIStr "$DESKTOP\${NEURON}\NEURON Home Page.url" "InternetShortcut" "URL" "http://neuron.yale.edu/" SetOutPath "$INSTDIR\demo" CreateShortCut "$DESKTOP\${NEURON}\NEURON Demo.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'cd $uINSTDIR/demo ; nrniv -dll $uINSTDIR/demo/release/nrnmech.dll demo.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 SetOutPath "C:\" CreateShortCut "$DESKTOP\${NEURON}\mintty bash.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i" "$INSTDIR\bin\mintty.exe" 0 FileOpen $r1 "$INSTDIR\lib\deskinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\deskinst.dat exists then, on uninstall, the ${NEURON} Desktop folder will be removed." FileClose $r1 SectionEnd ; optional section Section "Documentation" SetOutPath "$INSTDIR" File /nonfatal /r "${MARSHAL}\html" IfFileExists "$INSTDIR\lib\smsinst.dat" +1 next CreateShortCut "$SMPROGRAMS\${NEURON}\Documentation.lnk" "$INSTDIR\html\helpfils.html" next: IfFileExists "$INSTDIR\lib\deskinst.dat" +1 next2 CreateShortCut "$DESKTOP\${NEURON}\Documentation.lnk" "$INSTDIR\html\helpfils.html" next2: SectionEnd ; uninstall stuff UninstallText "This will uninstall ${NEURON}. Hit next to continue." ; special uninstall section. Section "Uninstall" IfFileExists $INSTDIR\bin\neuron.exe skip_confirmation MessageBox MB_YESNO "It does not appear that ${NEURON} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation Abort "Uninstall aborted by user" skip_confirmation: DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" DeleteRegKey HKCU "Software\NEURON_Simulator" ; remove registry keys if we own them IfFileExists "$INSTDIR\lib\associate.dat" +1 asoc DeleteRegKey HKCU "${ASSOCPREFIX}NEURONFile" DeleteRegKey HKCU "${ASSOCPREFIX}NEURONArchive" DeleteRegKey HKCU "${ASSOCPREFIX}.hoc" DeleteRegKey HKCU "${ASSOCPREFIX}.nrnzip" asoc: ; remove directories used. IfFileExists "$INSTDIR\lib\smsinst.dat" +1 one ClearErrors IfFileExists "$SMPROGRAMS\${NEURON}\*.*" +1 one RMDir /r "$SMPROGRAMS\${NEURON}" IfErrors +1 +2 MessageBox MB_OK "$SMPROGRAMS\${NEURON} could not be removed. Perhaps it is in use." one: IfFileExists "$INSTDIR\lib\deskinst.dat" +1 two ClearErrors IfFileExists "$DESKTOP\${NEURON}\*.*" +1 two RMDir /r "$DESKTOP\${NEURON}" IfErrors +1 +2 MessageBox MB_OK "$DESKTOP\${NEURON} could not be removed. Perhaps it is is use." two: ClearErrors RMDir /r "$INSTDIR" IfErrors +1 +2 MessageBox MB_OK "$SMPROGRAMS\${NEURON} could not be removed. Perhaps it is is use." SectionEnd ; needed to determine if there are spaces in InstallDir ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in ; output, top of stack (replaces with the portion of the string remaining) ; modifies no other variables. ; ; Usage: ; Push "this is a long ass string" ; Push "ass" ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") Function StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle Exch ; st=old$R1,haystack Exch $R2 ; st=old$R1,old$R2, $R2=haystack Push $R3 Push $R4 Push $R5 StrLen $R3 $R1 StrCpy $R4 0 ; $R1=needle ; $R2=haystack ; $R3=len(needle) ; $R4=cnt ; $R5=tmp loop: StrCpy $R5 $R2 $R3 $R4 StrCmp $R5 $R1 done StrCmp $R5 "" done IntOp $R4 $R4 + 1 Goto loop done: StrCpy $R1 $R2 "" $R4 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd ; cygwin 7 needs a posix version of InstallDir ; d2u ; input, top of stack = dos path ; output, top of stack = posix path ; modifies no other variables ; ; Usage: ; Push "c:\foo\bar" ; Call d2u ; Pop $R0 ; ($R0 at this point is "/cygdrive/c/foo/bar") Function d2u Exch $R1 ; st=old$R1, $R1 = dospath Push $R2 Push $R3 Push $R4 StrLen $R3 $R1 StrCpy $R4 "/cygdrive/" loop: StrCpy $R2 "$R1" 1 ; first char remaining in R1 StrCmp $R2 "" done StrCpy $R1 "$R1" $R3 1 ; replace with everythin except first char StrCmp $R2 ":" loop ; discard StrCmp $R2 "\" +1 +2 ; only reverse backslash, all others pass through StrCpy $R2 "/" StrCpy $R4 "$R4$R2" ; append char Goto loop done: StrCpy $R1 $R4 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd ; eof neuron-7.5/src/mswin/nrnsetup.nsi.in000066400000000000000000000320651323325274500176310ustar00rootroot00000000000000; nrnsetup.nsi ; ; This script is based on example2.nsi ; ; It will install the contents of c:/nrn into a directory that the user selects, ; ;Configuration !define Version "@PACKAGE_VERSION@" ; The name of the installer Name "NEURON ${Version}" ; The file to write OutFile "nrn${Version}setup.exe" RequestExecutionLevel user SetCompressor bzip2 ; Declaration of user variables var "myCygVer1" var "myCygVer2" var "myCygVer3" var "myCygVer" var "cpCygwin" var "uINSTDIR" ; posix version of $INSTDIR ; The basic program group name !define NEURON "NEURON ${Version}" ; The default directory !define NRN "nrn" ; where to get the files !define MARSHAL "c:\marshalnrn" ; where is cygwin on the host !define CYGWIN "c:\cygwin" ; The default installation directory ;InstallDir $PROGRAMFILES\${NRN} ; Do not want spaces in the installation path InstallDir c:\${NRN} ;HKCU file association requires a subkey of Software\Classes\... !define ASSOCPREFIX "Software\Classes\" ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" Function .onInit ; called when installer is nearly finished initializing. ReadRegStr $R1 HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" StrCmp "$R1" "" ok +1 MessageBox MB_OKCANCEL "${NEURON} already installed at $R1. Press OK to install again." IDOK ok Abort ok: GetDLLVersionLocal "${MARSHAL}\nrn\bin\cygwin1.dll" $R0 $R1 IntOp $R2 $R0 / 0x00010000 IntOp $myCygVer1 $R2 / 1000 IntOp $myCygVer2 $R2 % 1000 IntOp $myCygVer3 $R0 & 0x000FFFF StrCpy $myCygVer "$myCygVer1.$myCygVer2.$myCygVer3" StrCpy $cpCygwin "no" IfFileExists "${CYGWIN}\bin\cygwin1.dll" +1 one GetDllVersion "${CYGWIN}\bin\cygwin1.dll" $R0 $R1 IntOp $R2 $R0 / 0x00010000 IntOp $R3 $R2 / 1000 IntOp $R4 $R2 % 1000 IntOp $R5 $R0 & 0x000FFFF StrCpy $0 "$R3.$R4.$R5" IntCmp $myCygVer1 $R3 +1 meold menew IntCmp $myCygVer2 $R4 +1 meold menew IntCmp $myCygVer3 $R5 one meold menew Goto one meold: StrCpy $cpCygwin "yes" MessageBox MB_OKCANCEL "Already installed cygwin1.dll version $0 is NEWER and will be cused in place of this installer distributed version $myCygVer . If you have trouble running NEURON after installation you will need to upgrade to a more recent version of NEURON. Press OK to continue installing." IDOK one Abort menew: MessageBox MB_OKCANCEL|MB_DEFBUTTON2 "Already installed cygwin1.dll version $0 is OLDER and may be incompatible with this installer distributed version $myCygVer . It is recommended that you upgrade to the most recent version from http://www.cygwin.org. Press OK to continue installing." IDOK one Abort one: FunctionEnd ; The text to prompt the user to enter a directory ComponentText "This will install ${NEURON} on your computer. Select which optional things you want installed." Page components Page directory "" "" stayInDirectory Page instfiles ; Get the install path. It cannot have spaces ; The text to prompt the user to enter a directory DirText "Choose a directory without spaces to install in to (cannot have spaces in the path):" Function stayInDirectory Push "$INSTDIR" Push " " Call StrStr Pop $R0 StrCmp $R0 "" +3 ; if no spaces then go on MessageBox MB_OK "The installation path is not allowed to have spaces." Abort IfFileExists "$INSTDIR\*.*" +1 +3 MessageBox MB_OK "$INSTDIR already exists. Remove it first or choose another path." Abort FunctionEnd ; The primary neuron install Section "${NEURON} (required)" SectionIn 1 RO Push $INSTDIR Call d2u Pop $uINSTDIR ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File /r "${MARSHAL}\nrn\*.*" ; otherwise cannot figure out how to put the installation folder in the file FileOpen $r1 "$INSTDIR\lib\nrnstart.bsh" "w" FileWrite $r1 "#!/bin/bash$\n" FileWrite $r1 "export N=$uINSTDIR$\n" FileWrite $r1 "export PATH=$$N/bin:$$PATH$\n" FileWrite $r1 "export PYTHONHOME=$$N$\n" FileClose $r1 Call cyginst ; Write the installation path into the registry WriteRegStr HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" "DisplayName" "${NEURON} (remove only)" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe" SectionEnd Function cyginst StrCmp $cpCygwin "no" one +1 Rename "$INSTDIR\bin\cygwin1.dll" "$INSTDIR\bin\cygwin1.dist" CopyFiles /SILENT /FILESONLY "${CYGWIN}\bin\cygwin1.dll" "$INSTDIR\bin\cygwin1.dll" 1000 one: FunctionEnd ; optional section Section "Associate .hoc and .nrnzip" ; I am trying to follow the makensis.nsi ; I do not know why we should back up old values WriteRegStr HKCU "${ASSOCPREFIX}.hoc" "" "NEURONFile" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile" "" "NEURON model file" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\shell" "" "open" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\DefaultIcon" "" "$INSTDIR\bin\nrniv10.ico" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\shell\open\command" "" '"$INSTDIR\bin\neuron.exe" "%1"' WriteRegStr HKCU "${ASSOCPREFIX}.nrnzip" "" "NEURONArchive" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive" "" "NEURON model archive" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\shell" "" "open" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\DefaultIcon" "" "$INSTDIR\bin\nrniv.ico" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\shell\open\command" "" '"$INSTDIR\bin\mos2nrn.exe" "%1"' FileOpen $r1 "$INSTDIR\lib\associate.dat" "w" FileWrite $r1 "If $INSTDIR\lib\associate.dat exists then, on uninstall, .hoc and .nrnzip associations will be removed." FileClose $r1 SectionEnd ; optional section Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\${NEURON}" SetOutPath "C:\" ; does not work, ends up as C StrCpy $OUTDIR "C:\" CreateShortCut "$SMPROGRAMS\${NEURON}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\nrngui.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\nrngui_python.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv -python $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\mknrndll.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/mknrndll.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\modlunit.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/modlunit.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\Notes.lnk" "notepad.exe" "$INSTDIR\notes.txt" WriteINIStr "$SMPROGRAMS\${NEURON}\NEURON Home Page.url" "InternetShortcut" "URL" "http://neuron.yale.edu/" SetOutPath "$INSTDIR\demo" CreateShortCut "$SMPROGRAMS\${NEURON}\NEURON Demo.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'cd $uINSTDIR/demo ; nrniv -dll $uINSTDIR/demo/release/nrnmech.dll demo.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 SetOutPath "C:\" CreateShortCut "$SMPROGRAMS\${NEURON}\mintty bash.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i" "$INSTDIR\bin\mintty.exe" 0 FileOpen $r1 "$INSTDIR\lib\smsinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\smsinst.dat exists then, on uninstall, the ${NEURON} Start Menu Shortcuts will be removed." FileClose $r1 SectionEnd ; optional section Section "Desktop ${NEURON} folder with Shortcuts" CreateDirectory "$DESKTOP\${NEURON}" SetOutPath "C:\" ; does not work, ends up as C StrCpy $OUTDIR "C:\" CreateShortCut "$DESKTOP\${NEURON}\nrngui.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\nrngui_python.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'nrniv -python $uINSTDIR/lib/hoc/nrngui.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\mknrndll.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/mknrndll.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\modlunit.lnk" "$INSTDIR\bin\nrniv.exe" "$uINSTDIR/lib/hoc/modlunit.hoc" "$INSTDIR\bin\nmodl2a.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\Notes.lnk" "notepad.exe" "$INSTDIR\notes.txt" WriteINIStr "$DESKTOP\${NEURON}\NEURON Home Page.url" "InternetShortcut" "URL" "http://neuron.yale.edu/" SetOutPath "$INSTDIR\demo" CreateShortCut "$DESKTOP\${NEURON}\NEURON Demo.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i -c 'cd $uINSTDIR/demo ; nrniv -dll $uINSTDIR/demo/release/nrnmech.dll demo.hoc'" "$INSTDIR\bin\nrniv10.ico" 0 SetOutPath "C:\" CreateShortCut "$DESKTOP\${NEURON}\mintty bash.lnk" "$INSTDIR\bin\mintty.exe" "-c $uINSTDIR/lib/minttyrc $uINSTDIR/bin/bash --rcfile $uINSTDIR/lib/nrnstart.bsh -i" "$INSTDIR\bin\mintty.exe" 0 FileOpen $r1 "$INSTDIR\lib\deskinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\deskinst.dat exists then, on uninstall, the ${NEURON} Desktop folder will be removed." FileClose $r1 SectionEnd ; optional section Section "Documentation" SetOutPath "$INSTDIR" File /nonfatal /r "${MARSHAL}\html" IfFileExists "$INSTDIR\lib\smsinst.dat" +1 next CreateShortCut "$SMPROGRAMS\${NEURON}\Documentation.lnk" "$INSTDIR\html\helpfils.html" next: IfFileExists "$INSTDIR\lib\deskinst.dat" +1 next2 CreateShortCut "$DESKTOP\${NEURON}\Documentation.lnk" "$INSTDIR\html\helpfils.html" next2: SectionEnd ; uninstall stuff UninstallText "This will uninstall ${NEURON}. Hit next to continue." ; special uninstall section. Section "Uninstall" IfFileExists $INSTDIR\bin\neuron.exe skip_confirmation MessageBox MB_YESNO "It does not appear that ${NEURON} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation Abort "Uninstall aborted by user" skip_confirmation: DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" DeleteRegKey HKCU "Software\NEURON_Simulator" ; remove registry keys if we own them IfFileExists "$INSTDIR\lib\associate.dat" +1 asoc DeleteRegKey HKCU "${ASSOCPREFIX}NEURONFile" DeleteRegKey HKCU "${ASSOCPREFIX}NEURONArchive" DeleteRegKey HKCU "${ASSOCPREFIX}.hoc" DeleteRegKey HKCU "${ASSOCPREFIX}.nrnzip" asoc: ; remove directories used. IfFileExists "$INSTDIR\lib\smsinst.dat" +1 one ClearErrors IfFileExists "$SMPROGRAMS\${NEURON}\*.*" +1 one RMDir /r "$SMPROGRAMS\${NEURON}" IfErrors +1 +2 MessageBox MB_OK "$SMPROGRAMS\${NEURON} could not be removed. Perhaps it is in use." one: IfFileExists "$INSTDIR\lib\deskinst.dat" +1 two ClearErrors IfFileExists "$DESKTOP\${NEURON}\*.*" +1 two RMDir /r "$DESKTOP\${NEURON}" IfErrors +1 +2 MessageBox MB_OK "$DESKTOP\${NEURON} could not be removed. Perhaps it is is use." two: ClearErrors RMDir /r "$INSTDIR" IfErrors +1 +2 MessageBox MB_OK "$SMPROGRAMS\${NEURON} could not be removed. Perhaps it is is use." SectionEnd ; needed to determine if there are spaces in InstallDir ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in ; output, top of stack (replaces with the portion of the string remaining) ; modifies no other variables. ; ; Usage: ; Push "this is a long ass string" ; Push "ass" ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") Function StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle Exch ; st=old$R1,haystack Exch $R2 ; st=old$R1,old$R2, $R2=haystack Push $R3 Push $R4 Push $R5 StrLen $R3 $R1 StrCpy $R4 0 ; $R1=needle ; $R2=haystack ; $R3=len(needle) ; $R4=cnt ; $R5=tmp loop: StrCpy $R5 $R2 $R3 $R4 StrCmp $R5 $R1 done StrCmp $R5 "" done IntOp $R4 $R4 + 1 Goto loop done: StrCpy $R1 $R2 "" $R4 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd ; cygwin 7 needs a posix version of InstallDir ; d2u ; input, top of stack = dos path ; output, top of stack = posix path ; modifies no other variables ; ; Usage: ; Push "c:\foo\bar" ; Call d2u ; Pop $R0 ; ($R0 at this point is "/cygdrive/c/foo/bar") Function d2u Exch $R1 ; st=old$R1, $R1 = dospath Push $R2 Push $R3 Push $R4 StrLen $R3 $R1 StrCpy $R4 "/cygdrive/" loop: StrCpy $R2 "$R1" 1 ; first char remaining in R1 StrCmp $R2 "" done StrCpy $R1 "$R1" $R3 1 ; replace with everythin except first char StrCmp $R2 ":" loop ; discard StrCmp $R2 "\" +1 +2 ; only reverse backslash, all others pass through StrCpy $R2 "/" StrCpy $R4 "$R4$R2" ; append char Goto loop done: StrCpy $R1 $R4 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd ; eof neuron-7.5/src/mswin/nrnsetupmingw.nsi.in000066400000000000000000000302531323325274500206700ustar00rootroot00000000000000; nrnsetupmingw.nsi ; ; This script is based on nrnsetup.nsi ; ; It will install the contents of c:/nrn into a directory that the user selects, ; ;Configuration !define Version "@PACKAGE_VERSION@" !define binsuffix "@binsuffix@" !define marshaldir "@dos_marshal_dir@" !define cpu "@host_cpu@" ; The name of the installer Name "NEURON ${Version} ${cpu}" ; The file to write OutFile "nrn${Version}setup-${cpu}.exe" RequestExecutionLevel user SetCompressor bzip2 !include "EnvVarUpdate.nsh" !include "AddToPath.nsh" ; Declaration of user variables var "uINSTDIR" ; posix version of $INSTDIR var "launch1" ; help launch nrngui, neurondemo, nrniv, bash from icon var "launch2" var "launch3" ; The basic program group name !define NEURON "NEURON ${Version} ${cpu}" ; The default directory !define NRN "nrn" ; where to get the files !define MARSHAL "${marshaldir}" ; The default installation directory ;InstallDir $PROGRAMFILES\${NRN} ; Do not want spaces in the installation path InstallDir c:\${NRN} ;HKCU file association requires a subkey of Software\Classes\... !define ASSOCPREFIX "Software\Classes\" ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" Function .onInit ; called when installer is nearly finished initializing. ReadRegStr $R1 HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" StrCmp "$R1" "" ok +1 MessageBox MB_OKCANCEL "${NEURON} already installed at $R1. Press OK to install again." IDOK ok Abort ok: FunctionEnd ; The text to prompt the user to enter a directory ComponentText "This will install ${NEURON} on your computer. Select which optional things you want installed." Page directory "" "" stayInDirectory Page components Page instfiles ; Get the install path. It cannot have spaces ; The text to prompt the user to enter a directory DirText "Choose a directory without spaces to install in to (cannot have spaces in the path):" Function stayInDirectory Push "$INSTDIR" Push " " Call StrStr Pop $R0 StrCmp $R0 "" +3 ; if no spaces then go on MessageBox MB_OK "The installation path is not allowed to have spaces." Abort IfFileExists "$INSTDIR\*.*" +1 +3 MessageBox MB_OK "$INSTDIR already exists. Remove it first or choose another path." Abort FunctionEnd ; The primary neuron install Section "${NEURON} (required)" SectionIn 1 RO Push $INSTDIR Call d2u Pop $uINSTDIR StrCpy $launch1 "$INSTDIR\mingw\bin\bash.exe" StrCpy $launch2 "--rcfile $uINSTDIR/lib/bshstart.sh -i" StrCpy $launch3 "$launch2 $uINSTDIR/lib/neuron2.sh" ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File /r "${MARSHAL}\nrn${binsuffix}\*.*" ; Bizarre but needed for launch of enthought canopy to import neuron COPYFILES $INSTDIR\bin\libstdc++-6.dll $INSTDIR\lib\python\neuron ; Write the installation path into the registry WriteRegStr HKCU "Software\NEURON_Simulator\${NRN}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" "DisplayName" "${NEURON} (remove only)" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe" SectionEnd ; optional section Section "Associate .hoc and .nrnzip" ; I am trying to follow the makensis.nsi ; I do not know why we should back up old values WriteRegStr HKCU "${ASSOCPREFIX}.hoc" "" "NEURONFile" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile" "" "NEURON model file" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\shell" "" "open" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\DefaultIcon" "" "$INSTDIR\bin${binsuffix}\nrniv10.ico" WriteRegStr HKCU "${ASSOCPREFIX}NEURONFile\shell\open\command" "" '"$INSTDIR\bin${binsuffix}\neuron.exe" "%1"' WriteRegStr HKCU "${ASSOCPREFIX}.nrnzip" "" "NEURONArchive" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive" "" "NEURON model archive" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\shell" "" "open" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\DefaultIcon" "" "$INSTDIR\bin${binsuffix}\nrniv.ico" WriteRegStr HKCU "${ASSOCPREFIX}NEURONArchive\shell\open\command" "" '"$INSTDIR\bin\mos2nrn.exe" "%1"' FileOpen $r1 "$INSTDIR\lib\associate.dat" "w" FileWrite $r1 "If $INSTDIR\lib\associate.dat exists then, on uninstall, .hoc and .nrnzip associations will be removed." FileClose $r1 SectionEnd ; optional section Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\${NEURON}" SetOutPath "C:\" ; does not work, ends up as C StrCpy $OUTDIR "C:\" CreateShortCut "$SMPROGRAMS\${NEURON}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\mknrndll.lnk" "$INSTDIR\bin${binsuffix}\nrniv.exe" "-nopython $uINSTDIR/lib/hoc/mknrndll.hoc" "$INSTDIR\bin${binsuffix}\nmodl2a.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\modlunit.lnk" "$INSTDIR\bin${binsuffix}\nrniv.exe" "-nopython $uINSTDIR/lib/hoc/modlunit.hoc" "$INSTDIR\bin${binsuffix}\nmodl2a.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\Notes.lnk" "notepad.exe" "$INSTDIR\notes.txt" WriteINIStr "$SMPROGRAMS\${NEURON}\NEURON Home Page.url" "InternetShortcut" "URL" "http://neuron.yale.edu/" SetOutPath "$INSTDIR\demo" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\${NEURON}\bash.lnk" "$launch1" "$launch2" "$INSTDIR\mingw\bin\bash.exe" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\nrngui.lnk" "$launch1" "$launch3 nrngui" "$INSTDIR\bin${binsuffix}\nrniv10.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\NEURON Demo.lnk" "$launch1" "$launch3 neurondemo" "$INSTDIR\bin${binsuffix}\nrniv10.ico" 0 CreateShortCut "$SMPROGRAMS\${NEURON}\nrniv_python.lnk" "$launch1" "$launch3 nrniv -python" "$INSTDIR\bin${binsuffix}\nrniv10.ico" 0 FileOpen $r1 "$INSTDIR\lib\smsinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\smsinst.dat exists then, on uninstall, the ${NEURON} Start Menu Shortcuts will be removed." FileClose $r1 SectionEnd ; optional section Section "Desktop ${NEURON} folder with Shortcuts" CreateDirectory "$DESKTOP\${NEURON}" SetOutPath "C:\" ; does not work, ends up as C StrCpy $OUTDIR "C:\" CreateShortCut "$DESKTOP\${NEURON}\mknrndll.lnk" "$INSTDIR\bin${binsuffix}\nrniv.exe" "-nopython $uINSTDIR/lib/hoc/mknrndll.hoc" "$INSTDIR\bin${binsuffix}\nmodl2a.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\modlunit.lnk" "$INSTDIR\bin${binsuffix}\nrniv.exe" "-nopython $uINSTDIR/lib/hoc/modlunit.hoc" "$INSTDIR\bin${binsuffix}\nmodl2a.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\Notes.lnk" "notepad.exe" "$INSTDIR\notes.txt" WriteINIStr "$DESKTOP\${NEURON}\NEURON Home Page.url" "InternetShortcut" "URL" "http://neuron.yale.edu/" SetOutPath "$INSTDIR\demo" SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\${NEURON}\bash.lnk" "$launch1" "$launch2" "$INSTDIR\mingw\bin\bash.exe" 0 CreateShortCut "$DESKTOP\${NEURON}\nrngui.lnk" "$launch1" "$launch3 nrngui" "$INSTDIR\bin${binsuffix}\nrniv10.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\NEURON Demo.lnk" "$launch1" "$launch3 neurondemo" "$INSTDIR\bin${binsuffix}\nrniv10.ico" 0 CreateShortCut "$DESKTOP\${NEURON}\nrniv_python.lnk" "$launch1" "$launch3 nrniv -python" "$INSTDIR\bin${binsuffix}\nrniv10.ico" 0 FileOpen $r1 "$INSTDIR\lib\deskinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\deskinst.dat exists then, on uninstall, the ${NEURON} Desktop folder will be removed." FileClose $r1 SectionEnd ; optional section ;Section /o "" nrnenvvar ;Section /o "!For all users, Set NEURONHOME and append to PYTHONPATH. This is needed if you wish to launch Python from a terminal other than the bash icon." nrnenvvar Section /o "!Set DOS environment. (Useful if you wish to launch Python from a terminal not started by the bash icon.)" nrnenvvar ${EnvVarUpdate} $0 "NEURONHOME" "A" "HKCU" "$INSTDIR" ${EnvVarUpdate} $0 "PYTHONPATH" "A" "HKCU" "$INSTDIR\lib\python" Push "$INSTDIR\bin" Call AddToPath FileOpen $r1 "$INSTDIR\lib\nrnenvinst.dat" "w" FileWrite $r1 "If $INSTDIR\lib\nrnenvinst.dat exists then, on uninstall, the NEURONHOME and PYTHONPATH environment variables will be removed." FileClose $r1 SectionEnd ;Function .onSelChange ;Function .onMouseOverSection ; SectionSetText ${nrnenvvar} "!For all users, Set NEURONHOME=$INSTDIR and append $INSTDIR\lib\python to PYTHONPATH. This is needed if you wish to launch Python from a terminal other than the bash icon." ;FunctionEnd ; optional section Section /o "Documentation" SetOutPath "$INSTDIR" File /r "${MARSHAL}\html" IfFileExists "$INSTDIR\lib\smsinst.dat" +1 next CreateShortCut "$SMPROGRAMS\${NEURON}\Documentation.lnk" "$INSTDIR\html\helpfils.html" next: IfFileExists "$INSTDIR\lib\deskinst.dat" +1 next2 CreateShortCut "$DESKTOP\${NEURON}\Documentation.lnk" "$INSTDIR\html\helpfils.html" next2: SectionEnd ; uninstall stuff UninstallText "This will uninstall ${NEURON}. Hit next to continue." ; special uninstall section. Section "Uninstall" IfFileExists $INSTDIR\bin${binsuffix}\nrniv.exe skip_confirmation MessageBox MB_YESNO "It does not appear that ${NEURON} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation Abort "Uninstall aborted by user" skip_confirmation: DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NEURON}" DeleteRegKey HKCU "Software\NEURON_Simulator" ; unset the environment variables IfFileExists "$INSTDIR\lib\nrnenvinst.dat" +1 env ${un.EnvVarUpdate} $0 "NEURONHOME" "R" "HKCU" "$INSTDIR" ${un.EnvVarUpdate} $0 "PYTHONPATH" "R" "HKCU" "$INSTDIR\lib\python" Push "$INSTDIR\bin" Call un.RemoveFromPath env: ; remove registry keys if we own them IfFileExists "$INSTDIR\lib\associate.dat" +1 asoc DeleteRegKey HKCU "${ASSOCPREFIX}NEURONFile" DeleteRegKey HKCU "${ASSOCPREFIX}NEURONArchive" DeleteRegKey HKCU "${ASSOCPREFIX}.hoc" DeleteRegKey HKCU "${ASSOCPREFIX}.nrnzip" asoc: ; remove directories used. IfFileExists "$INSTDIR\lib\smsinst.dat" +1 one ClearErrors IfFileExists "$SMPROGRAMS\${NEURON}\*.*" +1 one RMDir /r "$SMPROGRAMS\${NEURON}" IfErrors +1 +2 MessageBox MB_OK "$SMPROGRAMS\${NEURON} could not be removed. Perhaps it is in use." one: IfFileExists "$INSTDIR\lib\deskinst.dat" +1 two ClearErrors IfFileExists "$DESKTOP\${NEURON}\*.*" +1 two RMDir /r "$DESKTOP\${NEURON}" IfErrors +1 +2 MessageBox MB_OK "$DESKTOP\${NEURON} could not be removed. Perhaps it is is use." two: ClearErrors RMDir /r "$INSTDIR" IfErrors +1 +2 MessageBox MB_OK "$SMPROGRAMS\${NEURON} could not be removed. Perhaps it is is use." SectionEnd ; needed to determine if there are spaces in InstallDir ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in ; output, top of stack (replaces with the portion of the string remaining) ; modifies no other variables. ; ; Usage: ; Push "this is a long ass string" ; Push "ass" ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") /* Function StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle Exch ; st=old$R1,haystack Exch $R2 ; st=old$R1,old$R2, $R2=haystack Push $R3 Push $R4 Push $R5 StrLen $R3 $R1 StrCpy $R4 0 ; $R1=needle ; $R2=haystack ; $R3=len(needle) ; $R4=cnt ; $R5=tmp loop: StrCpy $R5 $R2 $R3 $R4 StrCmp $R5 $R1 done StrCmp $R5 "" done IntOp $R4 $R4 + 1 Goto loop done: StrCpy $R1 $R2 "" $R4 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd */ ; nrniv args need forward slashes ; d2u ; input, top of stack = dos path ; output, top of stack = posix path ; modifies no other variables ; ; Usage: ; Push "c:\foo\bar" ; Call d2u ; Pop $R0 ; ($R0 at this point is "c:/foo/bar") Function d2u Exch $R1 ; st=old$R1, $R1 = dospath Push $R2 Push $R3 Push $R4 StrLen $R3 $R1 StrCpy $R4 "" loop: StrCpy $R2 "$R1" 1 ; first char remaining in R1 StrCmp $R2 "" done StrCpy $R1 "$R1" $R3 1 ; replace with everythin except first char StrCmp $R2 "\" +1 +2 ; only reverse backslash, all others pass through StrCpy $R2 "/" StrCpy $R4 "$R4$R2" ; append char Goto loop done: StrCpy $R1 $R4 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd ; eof neuron-7.5/src/mswin/rdln/000077500000000000000000000000001323325274500155645ustar00rootroot00000000000000neuron-7.5/src/mswin/rdln/Makefile.am000077500000000000000000000001701323325274500176210ustar00rootroot00000000000000 EXTRA_DIST = chardefs.h emacs_ke.c funmap.c history.c history.h \ keymaps.c keymaps.h readline.c readline.h sysdep.h neuron-7.5/src/mswin/rdln/Makefile.in000066400000000000000000000373571323325274500176500ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/rdln ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = chardefs.h emacs_ke.c funmap.c history.c history.h \ keymaps.c keymaps.h readline.c readline.h sysdep.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/rdln/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/rdln/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/rdln/chardefs.h000077500000000000000000000026321323325274500175220ustar00rootroot00000000000000/* chardefs.h -- Character definitions for readline. */ #ifndef _CHARDEFS_ #ifndef savestring #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifdef CTRL #undef CTRL #endif /* Some character stuff. */ #define control_character_threshold 0x020 /* smaller than this is control */ #define meta_character_threshold 0x07f /* larger than this is Meta. */ #define control_character_bit 0x40 /* 0x000000, must be off. */ #define meta_character_bit 0x080 /* x0000000, must be on. */ #define CTRL(c) ((c) & (~control_character_bit)) #define META(c) ((c) | meta_character_bit) #define UNMETA(c) ((c) & (~meta_character_bit)) #define UNCTRL(c) to_upper(((c)|control_character_bit)) #define lowercase_p(c) (((c) > ('a' - 1) && (c) < ('z' + 1))) #define uppercase_p(c) (((c) > ('A' - 1) && (c) < ('Z' + 1))) #define pure_alphabetic(c) (lowercase_p(c) || uppercase_p(c)) #ifndef to_upper #define to_upper(c) (lowercase_p(c) ? ((c) - 32) : (c)) #define to_lower(c) (uppercase_p(c) ? ((c) + 32) : (c)) #endif #define CTRL_P(c) ((c) < control_character_threshold) #define META_P(c) ((c) > meta_character_threshold) #define NEWLINE '\n' #define RETURN CTRL('M') #define RUBOUT 0x07f #define TAB '\t' #define ABORT_CHAR CTRL('G') #define PAGE CTRL('L') #define SPACE 0x020 #define ESC CTRL('[') #endif /* _CHARDEFS_ */ neuron-7.5/src/mswin/rdln/emacs_ke.c000077500000000000000000000440151323325274500175060ustar00rootroot00000000000000/* emacs_keymap.c -- the keymap for emacs_mode in readline (). */ /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* An array of function pointers, one for each possible key. If the type byte is ISKMAP, then the pointer is the address of a keymap. */ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { /* Control keys. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, rl_beg_of_line }, /* Control-a */ { ISFUNC, rl_backward }, /* Control-b */ { ISFUNC, (Function *)0x0 }, /* Control-c */ { ISFUNC, rl_delete }, /* Control-d */ { ISFUNC, rl_end_of_line }, /* Control-e */ { ISFUNC, rl_forward }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ { ISFUNC, rl_complete }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, rl_clear_screen }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_get_next_history }, /* Control-n */ { ISFUNC, (Function *)0x0 }, /* Control-o */ { ISFUNC, rl_get_previous_history }, /* Control-p */ { ISFUNC, rl_quoted_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISKMAP, (Function *)emacs_ctlx_keymap }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, (Function *)0x0 }, /* Control-z */ { ISKMAP, (Function *)emacs_meta_keymap }, /* Control-[ */ { ISFUNC, (Function *)0x0 }, /* Control-\ */ { ISFUNC, (Function *)0x0 }, /* Control-] */ { ISFUNC, (Function *)0x0 }, /* Control-^ */ { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_insert }, /* SPACE */ { ISFUNC, rl_insert }, /* ! */ { ISFUNC, rl_insert }, /* " */ { ISFUNC, rl_insert }, /* # */ { ISFUNC, rl_insert }, /* $ */ { ISFUNC, rl_insert }, /* % */ { ISFUNC, rl_insert }, /* & */ { ISFUNC, rl_insert }, /* ' */ { ISFUNC, rl_insert }, /* ( */ { ISFUNC, rl_insert }, /* ) */ { ISFUNC, rl_insert }, /* * */ { ISFUNC, rl_insert }, /* + */ { ISFUNC, rl_insert }, /* , */ { ISFUNC, rl_insert }, /* - */ { ISFUNC, rl_insert }, /* . */ { ISFUNC, rl_insert }, /* / */ /* Regular digits. */ { ISFUNC, rl_insert }, /* 0 */ { ISFUNC, rl_insert }, /* 1 */ { ISFUNC, rl_insert }, /* 2 */ { ISFUNC, rl_insert }, /* 3 */ { ISFUNC, rl_insert }, /* 4 */ { ISFUNC, rl_insert }, /* 5 */ { ISFUNC, rl_insert }, /* 6 */ { ISFUNC, rl_insert }, /* 7 */ { ISFUNC, rl_insert }, /* 8 */ { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ { ISFUNC, rl_insert }, /* : */ { ISFUNC, rl_insert }, /* ; */ { ISFUNC, rl_insert }, /* < */ { ISFUNC, rl_insert }, /* = */ { ISFUNC, rl_insert }, /* > */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_insert }, /* A */ { ISFUNC, rl_insert }, /* B */ { ISFUNC, rl_insert }, /* C */ { ISFUNC, rl_insert }, /* D */ { ISFUNC, rl_insert }, /* E */ { ISFUNC, rl_insert }, /* F */ { ISFUNC, rl_insert }, /* G */ { ISFUNC, rl_insert }, /* H */ { ISFUNC, rl_insert }, /* I */ { ISFUNC, rl_insert }, /* J */ { ISFUNC, rl_insert }, /* K */ { ISFUNC, rl_insert }, /* L */ { ISFUNC, rl_insert }, /* M */ { ISFUNC, rl_insert }, /* N */ { ISFUNC, rl_insert }, /* O */ { ISFUNC, rl_insert }, /* P */ { ISFUNC, rl_insert }, /* Q */ { ISFUNC, rl_insert }, /* R */ { ISFUNC, rl_insert }, /* S */ { ISFUNC, rl_insert }, /* T */ { ISFUNC, rl_insert }, /* U */ { ISFUNC, rl_insert }, /* V */ { ISFUNC, rl_insert }, /* W */ { ISFUNC, rl_insert }, /* X */ { ISFUNC, rl_insert }, /* Y */ { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ { ISFUNC, rl_insert }, /* [ */ { ISFUNC, rl_insert }, /* \ */ { ISFUNC, rl_insert }, /* ] */ { ISFUNC, rl_insert }, /* ^ */ { ISFUNC, rl_insert }, /* _ */ { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_insert }, /* a */ { ISFUNC, rl_insert }, /* b */ { ISFUNC, rl_insert }, /* c */ { ISFUNC, rl_insert }, /* d */ { ISFUNC, rl_insert }, /* e */ { ISFUNC, rl_insert }, /* f */ { ISFUNC, rl_insert }, /* g */ { ISFUNC, rl_insert }, /* h */ { ISFUNC, rl_insert }, /* i */ { ISFUNC, rl_insert }, /* j */ { ISFUNC, rl_insert }, /* k */ { ISFUNC, rl_insert }, /* l */ { ISFUNC, rl_insert }, /* m */ { ISFUNC, rl_insert }, /* n */ { ISFUNC, rl_insert }, /* o */ { ISFUNC, rl_insert }, /* p */ { ISFUNC, rl_insert }, /* q */ { ISFUNC, rl_insert }, /* r */ { ISFUNC, rl_insert }, /* s */ { ISFUNC, rl_insert }, /* t */ { ISFUNC, rl_insert }, /* u */ { ISFUNC, rl_insert }, /* v */ { ISFUNC, rl_insert }, /* w */ { ISFUNC, rl_insert }, /* x */ { ISFUNC, rl_insert }, /* y */ { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ { ISFUNC, rl_insert }, /* { */ { ISFUNC, rl_insert }, /* | */ { ISFUNC, rl_insert }, /* } */ { ISFUNC, rl_insert }, /* ~ */ { ISFUNC, rl_rubout } /* RUBOUT */ }; KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { /* Meta keys. Just like above, but the high bit is set. */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-@ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-a */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-b */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-c */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-d */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-e */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-f */ { ISFUNC, rl_abort }, /* Meta-Control-g */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-h */ { ISFUNC, rl_tab_insert }, /* Meta-Control-i */ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-k */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-l */ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-n */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-o */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-p */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-q */ { ISFUNC, rl_revert_line }, /* Meta-Control-r */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-s */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-t */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-u */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-v */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-w */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-x */ { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-z */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-[ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-\ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-] */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-^ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-_ */ /* The start of printing characters. */ { ISFUNC, (Function *)0x0 }, /* Meta-SPACE */ { ISFUNC, (Function *)0x0 }, /* Meta-! */ { ISFUNC, (Function *)0x0 }, /* Meta-" */ { ISFUNC, (Function *)0x0 }, /* Meta-# */ { ISFUNC, (Function *)0x0 }, /* Meta-$ */ { ISFUNC, (Function *)0x0 }, /* Meta-% */ { ISFUNC, (Function *)0x0 }, /* Meta-& */ { ISFUNC, (Function *)0x0 }, /* Meta-' */ { ISFUNC, (Function *)0x0 }, /* Meta-( */ { ISFUNC, (Function *)0x0 }, /* Meta-) */ { ISFUNC, (Function *)0x0 }, /* Meta-* */ { ISFUNC, (Function *)0x0 }, /* Meta-+ */ { ISFUNC, (Function *)0x0 }, /* Meta-, */ { ISFUNC, rl_digit_argument }, /* Meta-- */ { ISFUNC, (Function *)0x0 }, /* Meta-. */ { ISFUNC, (Function *)0x0 }, /* Meta-/ */ /* Regular digits. */ { ISFUNC, rl_digit_argument }, /* Meta-0 */ { ISFUNC, rl_digit_argument }, /* Meta-1 */ { ISFUNC, rl_digit_argument }, /* Meta-2 */ { ISFUNC, rl_digit_argument }, /* Meta-3 */ { ISFUNC, rl_digit_argument }, /* Meta-4 */ { ISFUNC, rl_digit_argument }, /* Meta-5 */ { ISFUNC, rl_digit_argument }, /* Meta-6 */ { ISFUNC, rl_digit_argument }, /* Meta-7 */ { ISFUNC, rl_digit_argument }, /* Meta-8 */ { ISFUNC, rl_digit_argument }, /* Meta-9 */ /* A little more punctuation. */ { ISFUNC, (Function *)0x0 }, /* Meta-: */ { ISFUNC, (Function *)0x0 }, /* Meta-; */ { ISFUNC, rl_beginning_of_history }, /* Meta-< */ { ISFUNC, (Function *)0x0 }, /* Meta-= */ { ISFUNC, rl_end_of_history }, /* Meta-> */ { ISFUNC, rl_possible_completions }, /* Meta-? */ { ISFUNC, (Function *)0x0 }, /* Meta-@ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* Meta-A */ { ISFUNC, rl_do_lowercase_version }, /* Meta-B */ { ISFUNC, rl_do_lowercase_version }, /* Meta-C */ { ISFUNC, rl_do_lowercase_version }, /* Meta-D */ { ISFUNC, rl_do_lowercase_version }, /* Meta-E */ { ISFUNC, rl_do_lowercase_version }, /* Meta-F */ { ISFUNC, rl_do_lowercase_version }, /* Meta-G */ { ISFUNC, rl_do_lowercase_version }, /* Meta-H */ { ISFUNC, rl_do_lowercase_version }, /* Meta-I */ { ISFUNC, rl_do_lowercase_version }, /* Meta-J */ { ISFUNC, rl_do_lowercase_version }, /* Meta-K */ { ISFUNC, rl_do_lowercase_version }, /* Meta-L */ { ISFUNC, rl_do_lowercase_version }, /* Meta-M */ { ISFUNC, rl_do_lowercase_version }, /* Meta-N */ { ISFUNC, rl_do_lowercase_version }, /* Meta-O */ { ISFUNC, rl_do_lowercase_version }, /* Meta-P */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Q */ { ISFUNC, rl_do_lowercase_version }, /* Meta-R */ { ISFUNC, rl_do_lowercase_version }, /* Meta-S */ { ISFUNC, rl_do_lowercase_version }, /* Meta-T */ { ISFUNC, rl_do_lowercase_version }, /* Meta-U */ { ISFUNC, rl_do_lowercase_version }, /* Meta-V */ { ISFUNC, rl_do_lowercase_version }, /* Meta-W */ { ISFUNC, rl_do_lowercase_version }, /* Meta-X */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Y */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Z */ /* Some more punctuation. */ { ISFUNC, rl_arrow_keys }, /* Meta-[ */ { ISFUNC, (Function *)0x0 }, /* Meta-\ */ { ISFUNC, (Function *)0x0 }, /* Meta-] */ { ISFUNC, (Function *)0x0 }, /* Meta-^ */ { ISFUNC, (Function *)0x0 }, /* Meta-_ */ { ISFUNC, (Function *)0x0 }, /* Meta-` */ /* Lowercase alphabet. */ { ISFUNC, (Function *)0x0 }, /* Meta-a */ { ISFUNC, rl_backward_word }, /* Meta-b */ { ISFUNC, rl_capitalize_word }, /* Meta-c */ { ISFUNC, rl_kill_word }, /* Meta-d */ { ISFUNC, (Function *)0x0 }, /* Meta-e */ { ISFUNC, rl_forward_word }, /* Meta-f */ { ISFUNC, (Function *)0x0 }, /* Meta-g */ { ISFUNC, (Function *)0x0 }, /* Meta-h */ { ISFUNC, (Function *)0x0 }, /* Meta-i */ { ISFUNC, (Function *)0x0 }, /* Meta-j */ { ISFUNC, (Function *)0x0 }, /* Meta-k */ { ISFUNC, rl_downcase_word }, /* Meta-l */ { ISFUNC, (Function *)0x0 }, /* Meta-m */ { ISFUNC, (Function *)0x0 }, /* Meta-n */ { ISFUNC, rl_arrow_keys }, /* Meta-o */ { ISFUNC, (Function *)0x0 }, /* Meta-p */ { ISFUNC, (Function *)0x0 }, /* Meta-q */ { ISFUNC, rl_revert_line }, /* Meta-r */ { ISFUNC, (Function *)0x0 }, /* Meta-s */ { ISFUNC, rl_transpose_words }, /* Meta-t */ { ISFUNC, rl_upcase_word }, /* Meta-u */ { ISFUNC, (Function *)0x0 }, /* Meta-v */ { ISFUNC, (Function *)0x0 }, /* Meta-w */ { ISFUNC, (Function *)0x0 }, /* Meta-x */ { ISFUNC, rl_yank_pop }, /* Meta-y */ { ISFUNC, (Function *)0x0 }, /* Meta-z */ /* Final punctuation. */ { ISFUNC, (Function *)0x0 }, /* Meta-{ */ { ISFUNC, (Function *)0x0 }, /* Meta-| */ { ISFUNC, (Function *)0x0 }, /* Meta-} */ { ISFUNC, (Function *)0x0 }, /* Meta-~ */ { ISFUNC, rl_backward_kill_word } /* Meta-rubout */ }; KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = { /* Control keys. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, (Function *)0x0 }, /* Control-a */ { ISFUNC, (Function *)0x0 }, /* Control-b */ { ISFUNC, (Function *)0x0 }, /* Control-c */ { ISFUNC, (Function *)0x0 }, /* Control-d */ { ISFUNC, (Function *)0x0 }, /* Control-e */ { ISFUNC, (Function *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, (Function *)0x0 }, /* Control-h */ { ISFUNC, (Function *)0x0 }, /* Control-i */ { ISFUNC, (Function *)0x0 }, /* Control-j */ { ISFUNC, (Function *)0x0 }, /* Control-k */ { ISFUNC, (Function *)0x0 }, /* Control-l */ { ISFUNC, (Function *)0x0 }, /* Control-m */ { ISFUNC, (Function *)0x0 }, /* Control-n */ { ISFUNC, (Function *)0x0 }, /* Control-o */ { ISFUNC, (Function *)0x0 }, /* Control-p */ { ISFUNC, (Function *)0x0 }, /* Control-q */ { ISFUNC, rl_re_read_init_file }, /* Control-r */ { ISFUNC, (Function *)0x0 }, /* Control-s */ { ISFUNC, (Function *)0x0 }, /* Control-t */ { ISFUNC, rl_undo_command }, /* Control-u */ { ISFUNC, (Function *)0x0 }, /* Control-v */ { ISFUNC, (Function *)0x0 }, /* Control-w */ { ISFUNC, (Function *)0x0 }, /* Control-x */ { ISFUNC, (Function *)0x0 }, /* Control-y */ { ISFUNC, (Function *)0x0 }, /* Control-z */ { ISFUNC, (Function *)0x0 }, /* Control-[ */ { ISFUNC, (Function *)0x0 }, /* Control-\ */ { ISFUNC, (Function *)0x0 }, /* Control-] */ { ISFUNC, (Function *)0x0 }, /* Control-^ */ { ISFUNC, (Function *)0x0 }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, (Function *)0x0 }, /* SPACE */ { ISFUNC, (Function *)0x0 }, /* ! */ { ISFUNC, (Function *)0x0 }, /* " */ { ISFUNC, (Function *)0x0 }, /* # */ { ISFUNC, (Function *)0x0 }, /* $ */ { ISFUNC, (Function *)0x0 }, /* % */ { ISFUNC, (Function *)0x0 }, /* & */ { ISFUNC, (Function *)0x0 }, /* ' */ { ISFUNC, rl_start_kbd_macro }, /* ( */ { ISFUNC, rl_end_kbd_macro }, /* ) */ { ISFUNC, (Function *)0x0 }, /* * */ { ISFUNC, (Function *)0x0 }, /* + */ { ISFUNC, (Function *)0x0 }, /* , */ { ISFUNC, (Function *)0x0 }, /* - */ { ISFUNC, (Function *)0x0 }, /* . */ { ISFUNC, (Function *)0x0 }, /* / */ /* Regular digits. */ { ISFUNC, (Function *)0x0 }, /* 0 */ { ISFUNC, (Function *)0x0 }, /* 1 */ { ISFUNC, (Function *)0x0 }, /* 2 */ { ISFUNC, (Function *)0x0 }, /* 3 */ { ISFUNC, (Function *)0x0 }, /* 4 */ { ISFUNC, (Function *)0x0 }, /* 5 */ { ISFUNC, (Function *)0x0 }, /* 6 */ { ISFUNC, (Function *)0x0 }, /* 7 */ { ISFUNC, (Function *)0x0 }, /* 8 */ { ISFUNC, (Function *)0x0 }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (Function *)0x0 }, /* : */ { ISFUNC, (Function *)0x0 }, /* ; */ { ISFUNC, (Function *)0x0 }, /* < */ { ISFUNC, (Function *)0x0 }, /* = */ { ISFUNC, (Function *)0x0 }, /* > */ { ISFUNC, (Function *)0x0 }, /* ? */ { ISFUNC, (Function *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* A */ { ISFUNC, rl_do_lowercase_version }, /* B */ { ISFUNC, rl_do_lowercase_version }, /* C */ { ISFUNC, rl_do_lowercase_version }, /* D */ { ISFUNC, rl_do_lowercase_version }, /* E */ { ISFUNC, rl_do_lowercase_version }, /* F */ { ISFUNC, rl_do_lowercase_version }, /* G */ { ISFUNC, rl_do_lowercase_version }, /* H */ { ISFUNC, rl_do_lowercase_version }, /* I */ { ISFUNC, rl_do_lowercase_version }, /* J */ { ISFUNC, rl_do_lowercase_version }, /* K */ { ISFUNC, rl_do_lowercase_version }, /* L */ { ISFUNC, rl_do_lowercase_version }, /* M */ { ISFUNC, rl_do_lowercase_version }, /* N */ { ISFUNC, rl_do_lowercase_version }, /* O */ { ISFUNC, rl_do_lowercase_version }, /* P */ { ISFUNC, rl_do_lowercase_version }, /* Q */ { ISFUNC, rl_do_lowercase_version }, /* R */ { ISFUNC, rl_do_lowercase_version }, /* S */ { ISFUNC, rl_do_lowercase_version }, /* T */ { ISFUNC, rl_do_lowercase_version }, /* U */ { ISFUNC, rl_do_lowercase_version }, /* V */ { ISFUNC, rl_do_lowercase_version }, /* W */ { ISFUNC, rl_do_lowercase_version }, /* X */ { ISFUNC, rl_do_lowercase_version }, /* Y */ { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ { ISFUNC, (Function *)0x0 }, /* [ */ { ISFUNC, (Function *)0x0 }, /* \ */ { ISFUNC, (Function *)0x0 }, /* ] */ { ISFUNC, (Function *)0x0 }, /* ^ */ { ISFUNC, (Function *)0x0 }, /* _ */ { ISFUNC, (Function *)0x0 }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, (Function *)0x0 }, /* a */ { ISFUNC, (Function *)0x0 }, /* b */ { ISFUNC, (Function *)0x0 }, /* c */ { ISFUNC, (Function *)0x0 }, /* d */ { ISFUNC, rl_call_last_kbd_macro }, /* e */ { ISFUNC, (Function *)0x0 }, /* f */ { ISFUNC, (Function *)0x0 }, /* g */ { ISFUNC, (Function *)0x0 }, /* h */ { ISFUNC, (Function *)0x0 }, /* i */ { ISFUNC, (Function *)0x0 }, /* j */ { ISFUNC, (Function *)0x0 }, /* k */ { ISFUNC, (Function *)0x0 }, /* l */ { ISFUNC, (Function *)0x0 }, /* m */ { ISFUNC, (Function *)0x0 }, /* n */ { ISFUNC, (Function *)0x0 }, /* o */ { ISFUNC, (Function *)0x0 }, /* p */ { ISFUNC, (Function *)0x0 }, /* q */ { ISFUNC, (Function *)0x0 }, /* r */ { ISFUNC, (Function *)0x0 }, /* s */ { ISFUNC, (Function *)0x0 }, /* t */ { ISFUNC, (Function *)0x0 }, /* u */ { ISFUNC, (Function *)0x0 }, /* v */ { ISFUNC, (Function *)0x0 }, /* w */ { ISFUNC, (Function *)0x0 }, /* x */ { ISFUNC, (Function *)0x0 }, /* y */ { ISFUNC, (Function *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (Function *)0x0 }, /* { */ { ISFUNC, (Function *)0x0 }, /* | */ { ISFUNC, (Function *)0x0 }, /* } */ { ISFUNC, (Function *)0x0 }, /* ~ */ { ISFUNC, rl_backward_kill_line } /* RUBOUT */ }; neuron-7.5/src/mswin/rdln/funmap.c000077500000000000000000000176641323325274500172370ustar00rootroot00000000000000/* funmap.c -- attach names to functions. */ /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if defined(__MSC_VER) #include <../../nrnconf.h> #endif #ifdef WIN32 #define STATIC_MALLOC #endif /* #define STATIC_MALLOC */ #if !defined (STATIC_MALLOC) extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif /* STATIC_MALLOC */ #include "sysdep.h" #include #include "readline.h" FUNMAP **funmap = (FUNMAP **)NULL; static int funmap_size = 0; static int funmap_entry = 0; /* After initializing the function map, this is the index of the first program specific function. */ int funmap_program_specific_entry_start; static FUNMAP default_funmap[] = { { "abort", rl_abort }, { "accept-line", rl_newline }, { "arrow-key-prefix", rl_arrow_keys }, { "backward-char", rl_backward }, { "backward-delete-char", rl_rubout }, { "backward-kill-line", rl_backward_kill_line }, { "backward-kill-word", rl_backward_kill_word }, { "backward-word", rl_backward_word }, { "beginning-of-history", rl_beginning_of_history }, { "beginning-of-line", rl_beg_of_line }, { "call-last-kbd-macro", rl_call_last_kbd_macro }, { "capitalize-word", rl_capitalize_word }, { "clear-screen", rl_clear_screen }, { "complete", rl_complete }, { "delete-char", rl_delete }, { "digit-argument", rl_digit_argument }, { "do-lowercase-version", rl_do_lowercase_version }, { "downcase-word", rl_downcase_word }, { "dump-functions", rl_dump_functions }, { "end-kbd-macro", rl_end_kbd_macro }, { "end-of-history", rl_end_of_history }, { "end-of-line", rl_end_of_line }, { "forward-char", rl_forward }, { "forward-search-history", rl_forward_search_history }, { "forward-word", rl_forward_word }, { "kill-line", rl_kill_line }, { "kill-word", rl_kill_word }, { "next-history", rl_get_next_history }, { "possible-completions", rl_possible_completions }, { "previous-history", rl_get_previous_history }, { "quoted-insert", rl_quoted_insert }, { "re-read-init-file", rl_re_read_init_file }, { "redraw-current-line", rl_refresh_line}, { "reverse-search-history", rl_reverse_search_history }, { "revert-line", rl_revert_line }, { "self-insert", rl_insert }, { "start-kbd-macro", rl_start_kbd_macro }, { "tab-insert", rl_tab_insert }, { "transpose-chars", rl_transpose_chars }, { "transpose-words", rl_transpose_words }, { "undo", rl_undo_command }, { "universal-argument", rl_universal_argument }, { "unix-line-discard", rl_unix_line_discard }, { "unix-word-rubout", rl_unix_word_rubout }, { "upcase-word", rl_upcase_word }, { "yank", rl_yank }, { "yank-nth-arg", rl_yank_nth_arg }, { "yank-pop", rl_yank_pop }, #if defined (VI_MODE) { "vi-append-eol", rl_vi_append_eol }, { "vi-append-mode", rl_vi_append_mode }, { "vi-arg-digit", rl_vi_arg_digit }, { "vi-bWord", rl_vi_bWord }, { "vi-bracktype", rl_vi_bracktype }, { "vi-bword", rl_vi_bword }, { "vi-change-case", rl_vi_change_case }, { "vi-change-char", rl_vi_change_char }, { "vi-change-to", rl_vi_change_to }, { "vi-char-search", rl_vi_char_search }, { "vi-column", rl_vi_column }, { "vi-comment", rl_vi_comment }, { "vi-complete", rl_vi_complete }, { "vi-delete", rl_vi_delete }, { "vi-delete-to", rl_vi_delete_to }, { "vi-dosearch", rl_vi_dosearch }, { "vi-eWord", rl_vi_eWord }, { "vi-editing-mode", rl_vi_editing_mode }, { "vi-end-word", rl_vi_end_word }, { "vi-eof-maybe", rl_vi_eof_maybe }, { "vi-eword", rl_vi_eword }, { "vi-fWord", rl_vi_fWord }, { "vi-first-print", rl_vi_first_print }, { "vi-fword", rl_vi_fword }, { "vi-insert-beg", rl_vi_insert_beg }, { "vi-insertion-mode", rl_vi_insertion_mode }, { "vi-match", rl_vi_match }, { "vi-movement-mode", rl_vi_movement_mode }, { "vi-next-word", rl_vi_next_word }, { "vi-overstrike", rl_vi_overstrike }, { "vi-overstrike-delete", rl_vi_overstrike_delete }, { "vi-prev-word", rl_vi_prev_word }, { "vi-put", rl_vi_put }, { "vi-replace, ", rl_vi_replace }, { "vi-search", rl_vi_search }, { "vi-search-again", rl_vi_search_again }, { "vi-subst", rl_vi_subst }, { "vi-yank-arg", rl_vi_yank_arg }, { "vi-yank-to", rl_vi_yank_to }, #endif /* VI_MODE */ {(char *)NULL, (Function *)NULL } }; rl_add_funmap_entry (name, function) char *name; Function *function; { if (funmap_entry + 2 >= funmap_size) if (!funmap) funmap = (FUNMAP **)xmalloc ((funmap_size = 80) * sizeof (FUNMAP *)); else funmap = (FUNMAP **)xrealloc (funmap, (funmap_size += 80) * sizeof (FUNMAP *)); funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP)); funmap[funmap_entry]->name = name; funmap[funmap_entry]->function = function; funmap[++funmap_entry] = (FUNMAP *)NULL; } static int funmap_initialized = 0; /* Make the funmap contain all of the default entries. */ rl_initialize_funmap () { register int i; if (funmap_initialized) return; for (i = 0; default_funmap[i].name; i++) rl_add_funmap_entry (default_funmap[i].name, default_funmap[i].function); funmap_initialized = 1; funmap_program_specific_entry_start = i; } /* Stupid comparison routine for qsort () ing strings. */ static int qsort_string_compare (s1, s2) register char **s1, **s2; { return (strcmp (*s1, *s2)); } /* Produce a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings inside. You should free () the array when you done, but not the pointrs. */ char ** rl_funmap_names () { char **result = (char **)NULL; int result_size, result_index; result_size = result_index = 0; /* Make sure that the function map has been initialized. */ rl_initialize_funmap (); for (result_index = 0; funmap[result_index]; result_index++) { if (result_index + 2 > result_size) { if (!result) result = (char **)xmalloc ((result_size = 20) * sizeof (char *)); else result = (char **) xrealloc (result, (result_size += 20) * sizeof (char *)); } result[result_index] = funmap[result_index]->name; result[result_index + 1] = (char *)NULL; } qsort (result, result_index, sizeof (char *), qsort_string_compare); return (result); } /* Things that mean `Control'. */ char *possible_control_prefixes[] = { "Control-", "C-", "CTRL-", (char *)NULL }; char *possible_meta_prefixes[] = { "Meta", "M-", (char *)NULL }; #if defined (STATIC_MALLOC) /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp; if (!pointer) temp = (char *)malloc (bytes); else temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "history: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ neuron-7.5/src/mswin/rdln/history.c000077500000000000000000001170431323325274500174420ustar00rootroot00000000000000/* History.c -- standalone history library */ /* Copyright (C) 1989, 1991 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of routines for managing the text of previously typed lines. The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions you can call. I think I have done that. */ #if defined(__MSC_VER) #include <../../nrnconf.h> #endif #ifdef WIN32 #define NO_INDEX #define rindex strrchr #define STATIC_MALLOC #endif /* Remove these declarations when we have a complete libgnu.a. */ #if !defined (STATIC_MALLOC) extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif #include "sysdep.h" #include #include #include #ifdef WIN32 #define NO_SYS_FILE #endif #ifndef NO_SYS_FILE #include #endif #if defined(_MSC_VER) #include #endif #if defined(_MSC_VER) || !defined(__MWERKS__) #include #endif #include #include "history.h" #ifndef savestring #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifndef digit #define digit(c) ((c) >= '0' && (c) <= '9') #endif #ifndef member #ifdef NO_INDEX #define member(c, s) ((c) ? strchr ((s), (c)) : 0) #else #define member(c, s) ((c) ? index ((s), (c)) : 0) #endif #endif /* **************************************************************** */ /* */ /* History Functions */ /* */ /* **************************************************************** */ /* An array of HIST_ENTRY. This is where we store the history. */ static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL; /* Non-zero means that we have enforced a limit on the amount of history that we save. */ int history_stifled = 0; /* If HISTORY_STIFLED is non-zero, then this is the maximum number of entries to remember. */ int max_input_history; /* The current location of the interactive history pointer. Just makes life easier for outside callers. */ static int history_offset = 0; /* The number of strings currently stored in the input_history list. */ int history_length = 0; /* The current number of slots allocated to the input_history. */ static int history_size = 0; /* The number of slots to increase the_history by. */ #define DEFAULT_HISTORY_GROW_SIZE 50 /* The character that represents the start of a history expansion request. This is usually `!'. */ char history_expansion_char = '!'; /* The character that invokes word substitution if found at the start of a line. This is usually `^'. */ char history_subst_char = '^'; /* During tokenization, if this character is seen as the first character of a word, then it, and all subsequent characters upto a newline are ignored. For a Bourne shell, this should be '#'. Bash special cases the interactive comment character to not be a comment delimiter. */ char history_comment_char = '\0'; /* The list of characters which inhibit the expansion of text if found immediately following history_expansion_char. */ char *history_no_expand_chars = " \t\n\r="; /* The logical `base' of the history array. It defaults to 1. */ int history_base = 1; /* Begin a session in which the history functions might be used. This initializes interactive variables. */ void using_history () { history_offset = history_length; } /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ int history_total_bytes () { register int i, result; result = 0; for (i = 0; the_history && the_history[i]; i++) result += strlen (the_history[i]->line); return (result); } /* Place STRING at the end of the history list. The data field is set to NULL. */ void add_history (string) char *string; { HIST_ENTRY *temp; if (history_stifled && (history_length == max_input_history)) { register int i; /* If the history is stifled, and history_length is zero, and it equals max_input_history, we don't save items. */ if (!history_length) return; /* If there is something in the slot, then remove it. */ if (the_history[0]) { free (the_history[0]->line); free (the_history[0]); } for (i = 0; i < history_length; i++) the_history[i] = the_history[i + 1]; history_base++; } else { if (!history_size) { the_history = (HIST_ENTRY **) xmalloc ((history_size = DEFAULT_HISTORY_GROW_SIZE) * sizeof (HIST_ENTRY *)); history_length = 1; } else { if (history_length == (history_size - 1)) { the_history = (HIST_ENTRY **) xrealloc (the_history, ((history_size += DEFAULT_HISTORY_GROW_SIZE) * sizeof (HIST_ENTRY *))); } history_length++; } } temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); temp->line = savestring (string); temp->data = (char *)NULL; the_history[history_length] = (HIST_ENTRY *)NULL; the_history[history_length - 1] = temp; } /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ HIST_ENTRY * replace_history_entry (which, line, data) int which; char *line; char *data; { HIST_ENTRY *temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); HIST_ENTRY *old_value; if (which >= history_length) return ((HIST_ENTRY *)NULL); old_value = the_history[which]; temp->line = savestring (line); temp->data = data; the_history[which] = temp; return (old_value); } /* Returns the magic number which says what history element we are looking at now. In this implementation, it returns history_offset. */ int where_history () { return (history_offset); } /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If ANCHORED is non-zero, the string must appear at the beginning of a history line, otherwise, the string may appear anywhere in the line. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ #define ANCHORED_SEARCH 1 #define NON_ANCHORED_SEARCH 0 static int history_search_internal (string, direction, anchored) char *string; int direction, anchored; { register int i = history_offset; register int reverse = (direction < 0); register char *line; register int index; int string_len = strlen (string); /* Take care of trivial cases first. */ if (!history_length || ((i == history_length) && !reverse)) return (-1); if (reverse && (i == history_length)) i--; while (1) { /* Search each line in the history list for STRING. */ /* At limit for direction? */ if ((reverse && i < 0) || (!reverse && i == history_length)) return (-1); line = the_history[i]->line; index = strlen (line); /* If STRING is longer than line, no match. */ if (string_len > index) goto next_line; /* Handle anchored searches first. */ if (anchored == ANCHORED_SEARCH) { if (strncmp (string, line, string_len) == 0) { history_offset = i; return (0); } goto next_line; } /* Do substring search. */ if (reverse) { index -= string_len; while (index >= 0) { if (strncmp (string, line + index, string_len) == 0) { history_offset = i; return (index); } index--; } } else { register int limit = index - string_len + 1; index = 0; while (index < limit) { if (strncmp (string, line + index, string_len) == 0) { history_offset = i; return (index); } index++; } } next_line: if (reverse) i--; else i++; } } /* Do a non-anchored search for STRING through the history in DIRECTION. */ int history_search (string, direction) char *string; int direction; { return (history_search_internal (string, direction, NON_ANCHORED_SEARCH)); } /* Do an anchored search for string through the history in DIRECTION. */ int history_search_prefix (string, direction) char *string; int direction; { return (history_search_internal (string, direction, ANCHORED_SEARCH)); } /* Remove history element WHICH from the history. The removed element is returned to you so you can free the line, data, and containing structure. */ HIST_ENTRY * remove_history (which) int which; { HIST_ENTRY *return_value; if (which >= history_length || !history_length) return_value = (HIST_ENTRY *)NULL; else { register int i; return_value = the_history[which]; for (i = which; i < history_length; i++) the_history[i] = the_history[i + 1]; history_length--; } return (return_value); } /* Stifle the history list, remembering only MAX number of lines. */ void stifle_history (max) int max; { if (max < 0) max = 0; if (history_length > max) { register int i, j; /* This loses because we cannot free the data. */ for (i = 0; i < (history_length - max); i++) { free (the_history[i]->line); free (the_history[i]); } history_base = i; for (j = 0, i = history_length - max; j < max; i++, j++) the_history[j] = the_history[i]; the_history[j] = (HIST_ENTRY *)NULL; history_length = j; } history_stifled = 1; max_input_history = max; } /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ int unstifle_history () { int result = max_input_history; if (history_stifled) { result = - result; history_stifled = 0; } return (result); } /* Return the string that should be used in the place of this filename. This only matters when you don't specify the filename to read_history (), or write_history (). */ static char * history_filename (filename) char *filename; { char *return_val = filename ? savestring (filename) : (char *)NULL; if (!return_val) { char *home = (char *)getenv ("HOME"); if (!home) home = "."; return_val = (char *)xmalloc (2 + strlen (home) + strlen (".history")); sprintf (return_val, "%s/.history", home); } return (return_val); } /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history (filename) char *filename; { return (read_history_range (filename, 0, -1)); } /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history_range (filename, from, to) char *filename; int from, to; { register int line_start, line_end; char *input, *buffer = (char *)NULL; int file, current_line; struct stat finfo; input = history_filename (filename); file = open (input, O_RDONLY, 0666); if ((file < 0) || (stat (input, &finfo) == -1)) goto error_and_exit; buffer = (char *)xmalloc (finfo.st_size + 1); if (read (file, buffer, finfo.st_size) != finfo.st_size) error_and_exit: { if (file >= 0) close (file); if (buffer) free (buffer); return (errno); } close (file); /* Set TO to larger than end of file if negative. */ if (to < 0) to = finfo.st_size; /* Start at beginning of file, work to end. */ line_start = line_end = current_line = 0; /* Skip lines until we are at FROM. */ while (line_start < finfo.st_size && current_line < from) { for (line_end = line_start; line_end < finfo.st_size; line_end++) if (buffer[line_end] == '\n') { current_line++; line_start = line_end + 1; if (current_line == from) break; } } /* If there are lines left to gobble, then gobble them now. */ for (line_end = line_start; line_end < finfo.st_size; line_end++) if (buffer[line_end] == '\n') { buffer[line_end] = '\0'; if (buffer[line_start]) add_history (buffer + line_start); current_line++; if (current_line >= to) break; line_start = line_end + 1; } return (0); } /* Truncate the history file FNAME, leaving only LINES trailing lines. If FNAME is NULL, then use ~/.history. */ history_truncate_file (fname, lines) char *fname; register int lines; { register int i; int file; char *buffer = (char *)NULL, *filename; struct stat finfo; filename = history_filename (fname); if (stat (filename, &finfo) == -1) goto truncate_exit; file = open (filename, O_RDONLY, 0666); if (file == -1) goto truncate_exit; buffer = (char *)xmalloc (finfo.st_size + 1); read (file, buffer, finfo.st_size); close (file); /* Count backwards from the end of buffer until we have passed LINES lines. */ for (i = finfo.st_size; lines && i; i--) { if (buffer[i] == '\n') lines--; } /* If there are fewer lines in the file than we want to truncate to, then we are all done. */ if (!i) goto truncate_exit; /* Otherwise, write from the start of this line until the end of the buffer. */ for (--i; i; i--) if (buffer[i] == '\n') { i++; break; } file = open (filename, O_WRONLY | O_TRUNC | O_CREAT, 0666); if (file == -1) goto truncate_exit; write (file, buffer + i, finfo.st_size - i); close (file); truncate_exit: if (buffer) free (buffer); free (filename); } #define HISTORY_APPEND 0 #define HISTORY_OVERWRITE 1 /* Workhorse function for writing history. Writes NELEMENT entries from the history list to FILENAME. OVERWRITE is non-zero if you wish to replace FILENAME with the entries. */ static int history_do_write (filename, nelements, overwrite) char *filename; int nelements, overwrite; { register int i, j; char *output = history_filename (filename); int file, mode; if (overwrite) mode = O_WRONLY | O_CREAT | O_TRUNC; else mode = O_WRONLY | O_APPEND; if ((file = open (output, mode, 0666)) == -1) return (errno); if (nelements > history_length) nelements = history_length; /* Build a buffer of all the lines to write, and write them in one syscall. Suggested by Peter Ho (peter@robosts.oxford.ac.uk). */ { register int j = 0; int buffer_size = 0; char *buffer; /* Calculate the total number of bytes to write. */ for (i = history_length - nelements; i < history_length; i++) buffer_size += 1 + strlen (the_history[i]->line); /* Allocate the buffer, and fill it. */ buffer = (char *)xmalloc (buffer_size); for (i = history_length - nelements; i < history_length; i++) { strcpy (buffer + j, the_history[i]->line); j += strlen (the_history[i]->line); buffer[j++] = '\n'; } write (file, buffer, buffer_size); free (buffer); } close (file); return (0); } /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (nelements, filename) int nelements; char *filename; { return (history_do_write (filename, nelements, HISTORY_APPEND)); } /* Overwrite FILENAME with the current history. If FILENAME is NULL, then write the history list to ~/.history. Values returned are as in read_history ().*/ int write_history (filename) char *filename; { return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); } /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY * current_history () { if ((history_offset == history_length) || !the_history) return ((HIST_ENTRY *)NULL); else return (the_history[history_offset]); } /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry then return a NULL pointer. */ HIST_ENTRY * previous_history () { if (!history_offset) return ((HIST_ENTRY *)NULL); else return (the_history[--history_offset]); } /* Move history_offset forward to the next history entry, and return a pointer to that entry. If there is no next entry then return a NULL pointer. */ HIST_ENTRY * next_history () { if (history_offset == history_length) return ((HIST_ENTRY *)NULL); else return (the_history[++history_offset]); } /* Return the current history array. The caller has to be carefull, since this is the actual array of data, and could be bashed or made corrupt easily. The array is terminated with a NULL pointer. */ HIST_ENTRY ** history_list () { return (the_history); } /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ HIST_ENTRY * history_get (offset) int offset; { int index = offset - history_base; if (index >= history_length || index < 0 || !the_history) return ((HIST_ENTRY *)NULL); return (the_history[index]); } /* Search for STRING in the history list. DIR is < 0 for searching backwards. POS is an absolute index into the history list at which point to begin searching. */ int history_search_pos (string, dir, pos) char *string; int dir, pos; { int ret, old = where_history (); history_set_pos (pos); if (history_search (string, dir) == -1) { history_set_pos (old); return (-1); } ret = where_history (); history_set_pos (old); return ret; } /* Make the current history item be the one at POS, an absolute index. Returns zero if POS is out of range, else non-zero. */ int history_set_pos (pos) int pos; { if (pos > history_length || pos < 0 || !the_history) return (0); history_offset = pos; return (1); } /* **************************************************************** */ /* */ /* History Expansion */ /* */ /* **************************************************************** */ /* Hairy history expansion on text, not tokens. This is of general use, and thus belongs in this library. */ /* The last string searched for in a !?string? search. */ static char *search_string = (char *)NULL; /* Return the event specified at TEXT + OFFSET modifying OFFSET to point to after the event specifier. Just a pointer to the history line is returned; NULL is returned in the event of a bad specifier. You pass STRING with *INDEX equal to the history_expansion_char that begins this specification. DELIMITING_QUOTE is a character that is allowed to end the string specification for what to search for in addition to the normal characters `:', ` ', `\t', `\n', and sometimes `?'. So you might call this function like: line = get_history_event ("!echo:p", &index, 0); */ char * get_history_event (string, caller_index, delimiting_quote) char *string; int *caller_index; int delimiting_quote; { register int i = *caller_index; int which, sign = 1; HIST_ENTRY *entry; /* The event can be specified in a number of ways. !! the previous command !n command line N !-n current command-line minus N !str the most recent command starting with STR !?str[?] the most recent command containing STR All values N are determined via HISTORY_BASE. */ if (string[i] != history_expansion_char) return ((char *)NULL); /* Move on to the specification. */ i++; /* Handle !! case. */ if (string[i] == history_expansion_char) { i++; which = history_base + (history_length - 1); *caller_index = i; goto get_which; } /* Hack case of numeric line specification. */ read_which: if (string[i] == '-') { sign = -1; i++; } if (digit (string[i])) { int start = i; /* Get the extent of the digits. */ for (; digit (string[i]); i++); /* Get the digit value. */ sscanf (string + start, "%d", &which); *caller_index = i; if (sign < 0) which = (history_length + history_base) - which; get_which: if (entry = history_get (which)) return (entry->line); return ((char *)NULL); } /* This must be something to search for. If the spec begins with a '?', then the string may be anywhere on the line. Otherwise, the string must be found at the start of a line. */ { int index; char *temp; int substring_okay = 0; if (string[i] == '?') { substring_okay++; i++; } for (index = i; string[i]; i++) if (whitespace (string[i]) || string[i] == '\n' || string[i] == ':' || (substring_okay && string[i] == '?') || string[i] == delimiting_quote) break; temp = (char *)alloca (1 + (i - index)); strncpy (temp, &string[index], (i - index)); temp[i - index] = '\0'; if (string[i] == '?') i++; *caller_index = i; search_again: index = history_search_internal (temp, -1, substring_okay ? NON_ANCHORED_SEARCH : ANCHORED_SEARCH); if (index < 0) search_lost: { history_offset = history_length; return ((char *)NULL); } if (index == 0) { search_won: entry = current_history (); history_offset = history_length; /* If this was a substring search, then remember the string that we matched for word substitution. */ if (substring_okay) { if (search_string) free (search_string); search_string = savestring (temp); } return (entry->line); } if (history_offset) history_offset--; else goto search_lost; goto search_again; } } /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place -1) If there was an error in expansion. If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ int history_expand (string, output) char *string; char **output; { register int j, l = strlen (string); int i, word_spec_error = 0; int cc, modified = 0; char *word_spec, *event; int starting_index, only_printing = 0, substitute_globally = 0; char *get_history_word_specifier (), *rindex (); /* The output string, and its length. */ int len = 0; char *result = (char *)NULL; /* Used in add_string; */ char *temp, tt[2], tbl[3]; /* Prepare the buffer for printing error messages. */ result = (char *)xmalloc (len = 255); result[0] = tt[1] = tbl[2] = '\0'; tbl[0] = '\\'; tbl[1] = history_expansion_char; /* Grovel the string. Only backslash can quote the history escape character. We also handle arg specifiers. */ /* Before we grovel forever, see if the history_expansion_char appears anywhere within the text. */ /* The quick substitution character is a history expansion all right. That is to say, "^this^that^" is equivalent to "!!:s^this^that^", and in fact, that is the substitution that we do. */ if (string[0] == history_subst_char) { char *format_string = (char *)alloca (10 + strlen (string)); sprintf (format_string, "%c%c:s%s", history_expansion_char, history_expansion_char, string); string = format_string; l += 4; goto grovel; } /* If not quick substitution, still maybe have to do expansion. */ /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ for (i = 0; string[i]; i++) if (string[i] == history_expansion_char) if (!string[i + 1] || member (string[i + 1], history_no_expand_chars)) continue; else goto grovel; free (result); *output = savestring (string); return (0); grovel: for (i = j = 0; i < l; i++) { int tchar = string[i]; if (tchar == history_expansion_char) tchar = -3; switch (tchar) { case '\\': if (string[i + 1] == history_expansion_char) { i++; temp = tbl; goto do_add; } else goto add_char; /* case history_expansion_char: */ case -3: starting_index = i + 1; cc = string[i + 1]; /* If the history_expansion_char is followed by one of the characters in history_no_expand_chars, then it is not a candidate for expansion of any kind. */ if (member (cc, history_no_expand_chars)) goto add_char; /* There is something that is listed as a `word specifier' in csh documentation which means `the expanded text to this point'. That is not a word specifier, it is an event specifier. */ if (cc == '#') goto hack_pound_sign; /* If it is followed by something that starts a word specifier, then !! is implied as the event specifier. */ if (member (cc, ":$*%^")) { char fake_s[3]; int fake_i = 0; i++; fake_s[0] = fake_s[1] = history_expansion_char; fake_s[2] = '\0'; event = get_history_event (fake_s, &fake_i, 0); } else { int quoted_search_delimiter = 0; /* If the character before this `!' is a double or single quote, then this expansion takes place inside of the quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) quoted_search_delimiter = string[i - 1]; event = get_history_event (string, &i, quoted_search_delimiter); } if (!event) event_not_found: { int l = 1 + (i - starting_index); temp = (char *)alloca (1 + l); strncpy (temp, string + starting_index, l); temp[l - 1] = 0; sprintf (result, "%s: %s.", temp, word_spec_error ? "Bad word specifier" : "Event not found"); error_exit: *output = result; return (-1); } /* If a word specifier is found, then do what that requires. */ starting_index = i; word_spec = get_history_word_specifier (string, event, &i); /* There is no such thing as a `malformed word specifier'. However, it is possible for a specifier that has no match. In that case, we complain. */ if (word_spec == (char *)-1) bad_word_spec: { word_spec_error++; goto event_not_found; } /* If no word specifier, than the thing of interest was the event. */ if (!word_spec) temp = event; else { temp = (char *)alloca (1 + strlen (word_spec)); strcpy (temp, word_spec); free (word_spec); } /* Perhaps there are other modifiers involved. Do what they say. */ hack_specials: if (string[i] == ':') { char *tstr; switch (string[i + 1]) { /* :p means make this the last executed line. So we return an error state after adding this line to the history. */ case 'p': only_printing++; goto next_special; /* :t discards all but the last part of the pathname. */ case 't': tstr = rindex (temp, '/'); if (tstr) temp = ++tstr; goto next_special; /* :h discards the last part of a pathname. */ case 'h': tstr = rindex (temp, '/'); if (tstr) *tstr = '\0'; goto next_special; /* :r discards the suffix. */ case 'r': tstr = rindex (temp, '.'); if (tstr) *tstr = '\0'; goto next_special; /* :e discards everything but the suffix. */ case 'e': tstr = rindex (temp, '.'); if (tstr) temp = tstr; goto next_special; /* :s/this/that substitutes `this' for `that'. */ /* :gs/this/that substitutes `this' for `that' globally. */ case 'g': if (string[i + 2] == 's') { i++; substitute_globally = 1; goto substitute; } else case 's': substitute: { char *this, *that, *new_event; int delimiter = 0; int si, l_this, l_that, l_temp = strlen (temp); if (i + 2 < strlen (string)) delimiter = string[i + 2]; if (!delimiter) break; i += 3; /* Get THIS. */ for (si = i; string[si] && string[si] != delimiter; si++); l_this = (si - i); this = (char *)alloca (1 + l_this); strncpy (this, string + i, l_this); this[l_this] = '\0'; i = si; if (string[si]) i++; /* Get THAT. */ for (si = i; string[si] && string[si] != delimiter; si++); l_that = (si - i); that = (char *)alloca (1 + l_that); strncpy (that, string + i, l_that); that[l_that] = '\0'; i = si; if (string[si]) i++; /* Ignore impossible cases. */ if (l_this > l_temp) goto cant_substitute; /* Find the first occurrence of THIS in TEMP. */ si = 0; for (; (si + l_this) <= l_temp; si++) if (strncmp (temp + si, this, l_this) == 0) { new_event = (char *)alloca (1 + (l_that - l_this) + l_temp); strncpy (new_event, temp, si); strncpy (new_event + si, that, l_that); strncpy (new_event + si + l_that, temp + si + l_this, l_temp - (si + l_this)); new_event[(l_that - l_this) + l_temp] = '\0'; temp = new_event; if (substitute_globally) { si += l_that; l_temp = strlen (temp); substitute_globally++; continue; } goto hack_specials; } cant_substitute: if (substitute_globally > 1) { substitute_globally = 0; goto hack_specials; } goto event_not_found; } /* :# is the line so far. Note that we have to alloca () it since RESULT could be realloc ()'ed below in add_string. */ case '#': hack_pound_sign: if (result) { temp = (char *)alloca (1 + strlen (result)); strcpy (temp, result); } else temp = ""; next_special: i += 2; goto hack_specials; } } /* Believe it or not, we have to back the pointer up by one. */ --i; goto add_string; /* A regular character. Just add it to the output string. */ default: add_char: tt[0] = string[i]; temp = tt; goto do_add; add_string: modified++; do_add: j += strlen (temp); while (j > len) result = (char *)xrealloc (result, (len += 255)); strcpy (result + (j - strlen (temp)), temp); } } *output = result; if (only_printing) { add_history (result); return (-1); } return (modified != 0); } /* Return a consed string which is the word specified in SPEC, and found in FROM. NULL is returned if there is no spec. -1 is returned if the word specified cannot be found. CALLER_INDEX is the offset in SPEC to start looking; it is updated to point to just after the last character parsed. */ char * get_history_word_specifier (spec, from, caller_index) char *spec, *from; int *caller_index; { register int i = *caller_index; int first, last; int expecting_word_spec = 0; char *history_arg_extract (); /* The range of words to return doesn't exist yet. */ first = last = 0; /* If we found a colon, then this *must* be a word specification. If it isn't, then it is an error. */ if (spec[i] == ':') i++, expecting_word_spec++; /* Handle special cases first. */ /* `%' is the word last searched for. */ if (spec[i] == '%') { *caller_index = i + 1; if (search_string) return (savestring (search_string)); else return (savestring ("")); } /* `*' matches all of the arguments, but not the command. */ if (spec[i] == '*') { char *star_result; *caller_index = i + 1; star_result = history_arg_extract (1, '$', from); if (!star_result) star_result = savestring (""); return (star_result); } /* `$' is last arg. */ if (spec[i] == '$') { *caller_index = i + 1; return (history_arg_extract ('$', '$', from)); } /* Try to get FIRST and LAST figured out. */ if (spec[i] == '-' || spec[i] == '^') { first = 1; goto get_last; } get_first: if (digit (spec[i]) && expecting_word_spec) { sscanf (spec + i, "%d", &first); for (; digit (spec[i]); i++); } else return ((char *)NULL); get_last: if (spec[i] == '^') { i++; last = 1; goto get_args; } if (spec[i] != '-') { last = first; goto get_args; } i++; if (digit (spec[i])) { sscanf (spec + i, "%d", &last); for (; digit (spec[i]); i++); } else if (spec[i] == '$') { i++; last = '$'; } get_args: { char *result = (char *)NULL; *caller_index = i; if (last >= first) result = history_arg_extract (first, last, from); if (result) return (result); else return ((char *)-1); } } /* Extract the args specified, starting at FIRST, and ending at LAST. The args are taken from STRING. If either FIRST or LAST is < 0, then make that arg count from the right (subtract from the number of tokens, so that FIRST = -1 means the next to last token on the line). */ char * history_arg_extract (first, last, string) int first, last; char *string; { register int i, len; char *result = (char *)NULL; int size = 0, offset = 0; char **history_tokenize (), **list; if (!(list = history_tokenize (string))) return ((char *)NULL); for (len = 0; list[len]; len++); if (last < 0) last = len + last - 1; if (first < 0) first = len + first - 1; if (last == '$') last = len - 1; if (first == '$') first = len - 1; last++; if (first > len || last > len || first < 0 || last < 0) result = ((char *)NULL); else { for (i = first; i < last; i++) { int l = strlen (list[i]); if (!result) result = (char *)xmalloc ((size = (2 + l))); else result = (char *)xrealloc (result, (size += (2 + l))); strcpy (result + offset, list[i]); offset += l; if (i + 1 < last) { strcpy (result + offset, " "); offset++; } } } for (i = 0; i < len; i++) free (list[i]); free (list); return (result); } #define slashify_in_quotes "\\`\"$" /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ char ** history_tokenize (string) char *string; { char **result = (char **)NULL; register int i, start, result_index, size; int len; i = result_index = size = 0; /* Get a token, and stuff it into RESULT. The tokens are split exactly where the shell would split them. */ get_token: /* Skip leading whitespace. */ for (; string[i] && whitespace(string[i]); i++); start = i; if (!string[i] || string[i] == history_comment_char) return (result); if (member (string[i], "()\n")) { i++; goto got_token; } if (member (string[i], "<>;&|")) { int peek = string[i + 1]; if (peek == string[i]) { if (peek == '<') { if (string[1 + 2] == '-') i++; i += 2; goto got_token; } if (member (peek, ">:&|")) { i += 2; goto got_token; } } else { if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || ((peek == '>') && (string[i] == '&'))) { i += 2; goto got_token; } } i++; goto got_token; } /* Get word from string + i; */ { int delimiter = 0; if (member (string[i], "\"'`")) delimiter = string[i++]; for (;string[i]; i++) { if (string[i] == '\\') { if (string[i + 1] == '\n') { i++; continue; } else { if (delimiter != '\'') if ((delimiter != '"') || (member (string[i], slashify_in_quotes))) { i++; continue; } } } if (delimiter && string[i] == delimiter) { delimiter = 0; continue; } if (!delimiter && (member (string[i], " \t\n;&()|<>"))) goto got_token; if (!delimiter && member (string[i], "\"'`")) { delimiter = string[i]; continue; } } got_token: len = i - start; if (result_index + 2 >= size) { if (!size) result = (char **)xmalloc ((size = 10) * (sizeof (char *))); else result = (char **)xrealloc (result, ((size += 10) * (sizeof (char *)))); } result[result_index] = (char *)xmalloc (1 + len); strncpy (result[result_index], string + start, len); result[result_index][len] = '\0'; result_index++; result[result_index] = (char *)NULL; } if (string[i]) goto get_token; return (result); } #if defined (STATIC_MALLOC) /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp; if (!pointer) temp = (char *)xmalloc (bytes); else temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "history: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ /* **************************************************************** */ /* */ /* Test Code */ /* */ /* **************************************************************** */ #ifdef TEST main () { char line[1024], *t; int done = 0; line[0] = 0; while (!done) { fprintf (stdout, "history%% "); t = gets (line); if (!t) strcpy (line, "quit"); if (line[0]) { char *expansion; int result; using_history (); result = history_expand (line, &expansion); strcpy (line, expansion); free (expansion); if (result) fprintf (stderr, "%s\n", line); if (result < 0) continue; add_history (line); } if (strcmp (line, "quit") == 0) done = 1; if (strcmp (line, "save") == 0) write_history (0); if (strcmp (line, "read") == 0) read_history (0); if (strcmp (line, "list") == 0) { register HIST_ENTRY **the_list = history_list (); register int i; if (the_list) for (i = 0; the_list[i]; i++) fprintf (stdout, "%d: %s\n", i + history_base, the_list[i]->line); } if (strncmp (line, "delete", strlen ("delete")) == 0) { int which; if ((sscanf (line + strlen ("delete"), "%d", &which)) == 1) { HIST_ENTRY *entry = remove_history (which); if (!entry) fprintf (stderr, "No such entry %d\n", which); else { free (entry->line); free (entry); } } else { fprintf (stderr, "non-numeric arg given to `delete'\n"); } } } } #endif /* TEST */ /* * Local variables: * compile-command: "gcc -g -DTEST -o history history.c" * end: */ neuron-7.5/src/mswin/rdln/history.h000077500000000000000000000113541323325274500174450ustar00rootroot00000000000000/* History.h -- the names of functions that you can call in history. */ /* The structure used to store a history entry. */ typedef struct _hist_entry { char *line; char *data; } HIST_ENTRY; /* For convenience only. You set this when interpreting history commands. It is the logical offset of the first history element. */ extern int history_base; /* Begin a session in which the history functions might be used. This just initializes the interactive variables. */ extern void using_history (); /* Place STRING at the end of the history list. The associated data field (if any) is set to NULL. */ extern void add_history (); /* Returns the number which says what history element we are now looking at. */ extern int where_history (); /* Set the position in the history list to POS. */ int history_set_pos (); /* Search for STRING in the history list, starting at POS, an absolute index into the list. DIR, if negative, says to search backwards from POS, else forwards. Returns the absolute index of the history element where STRING was found, or -1 otherwise. */ extern int history_search_pos (); /* A reasonably useless function, only here for completeness. WHICH is the magic number that tells us which element to delete. The elements are numbered from 0. */ extern HIST_ENTRY *remove_history (); /* Stifle the history list, remembering only MAX number of entries. */ extern void stifle_history (); /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ extern int unstifle_history (); /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history (); /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history_range (); /* Append the current history to FILENAME. If FILENAME is NULL, then append the history list to ~/.history. Values returned are as in read_history (). */ extern int write_history (); /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (); /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ extern HIST_ENTRY *replace_history_entry (); /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY *current_history (); /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer. */ extern HIST_ENTRY *previous_history (); /* Move history_offset forward to the next item in the input_history, and return the a pointer to that entry. If there is no next entry, return a NULL pointer. */ extern HIST_ENTRY *next_history (); /* Return a NULL terminated array of HIST_ENTRY which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL. */ extern HIST_ENTRY **history_list (); /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ extern int history_search (); /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place -1) If there was an error in expansion. If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ extern int history_expand (); /* Extract a string segment consisting of the FIRST through LAST arguments present in STRING. Arguments are broken up as in the shell. */ extern char *history_arg_extract (); /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ extern int history_total_bytes (); neuron-7.5/src/mswin/rdln/keymaps.c000077500000000000000000000101721323325274500174050ustar00rootroot00000000000000/* keymaps.c -- Functions and keymaps for the GNU Readline library. */ /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if defined(__MSC_VER) #include <../../nrnconf.h> #endif #include "sysdep.h" #include #include "readline.h" #include "keymaps.h" #include "emacs_ke.c" #ifdef VI_MODE #include "vi_keymap.c" #endif /* Remove these declarations when we have a complete libgnu.a. */ #ifdef WIN32 #define STATIC_MALLOC #endif /* #define STATIC_MALLOC */ #if !defined (STATIC_MALLOC) extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif /* STATIC_MALLOC */ /* **************************************************************** */ /* */ /* Functions for manipulating Keymaps. */ /* */ /* **************************************************************** */ /* Return a new, empty keymap. Free it with free() when you are done. */ Keymap rl_make_bare_keymap () { register int i; Keymap keymap = (Keymap)xmalloc (128 * sizeof (KEYMAP_ENTRY)); for (i = 0; i < 128; i++) { keymap[i].type = ISFUNC; keymap[i].function = (Function *)NULL; } for (i = 'A'; i < ('Z' + 1); i++) { keymap[i].type = ISFUNC; keymap[i].function = rl_do_lowercase_version; } return (keymap); } /* Return a new keymap which is a copy of MAP. */ Keymap rl_copy_keymap (map) Keymap map; { register int i; Keymap temp = rl_make_bare_keymap (); for (i = 0; i < 128; i++) { temp[i].type = map[i].type; temp[i].function = map[i].function; } return (temp); } /* Return a new keymap with the printing characters bound to rl_insert, the uppercase Meta characters bound to run their lowercase equivalents, and the Meta digits bound to produce numeric arguments. */ Keymap rl_make_keymap () { extern rl_insert (), rl_rubout (); register int i; Keymap newmap; newmap = rl_make_bare_keymap (); /* All printing characters are self-inserting. */ for (i = ' '; i < 126; i++) newmap[i].function = rl_insert; newmap[TAB].function = rl_insert; newmap[RUBOUT].function = rl_rubout; newmap[CTRL('H')].function = rl_rubout; return (newmap); } /* Free the storage associated with MAP. */ rl_discard_keymap (map) Keymap (map); { int i; if (!map) return; for (i = 0; i < 128; i++) { switch (map[i].type) { case ISFUNC: break; case ISKMAP: rl_discard_keymap ((Keymap)map[i].function); break; case ISMACR: free ((char *)map[i].function); break; } } } #ifdef STATIC_MALLOC /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp; if (!pointer) temp = (char *)malloc (bytes); else temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "readline: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ neuron-7.5/src/mswin/rdln/keymaps.h000077500000000000000000000030011323325274500174030ustar00rootroot00000000000000/* keymaps.h -- Manipulation of readline keymaps. */ #ifndef _KEYMAPS_H_ #define _KEYMAPS_H_ #include "chardefs.h" #ifndef __FUNCTION_DEF typedef int Function (); #define __FUNCTION_DEF #endif /* A keymap contains one entry for each key in the ASCII set. Each entry consists of a type and a pointer. POINTER is the address of a function to run, or the address of a keymap to indirect through. TYPE says which kind of thing POINTER is. */ typedef struct _keymap_entry { char type; Function *function; } KEYMAP_ENTRY; /* I wanted to make the above structure contain a union of: union { Function *function; struct _keymap_entry *keymap; } value; but this made it impossible for me to create a static array. Maybe I need C lessons. */ typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[128]; typedef KEYMAP_ENTRY *Keymap; /* The values that TYPE can have in a keymap entry. */ #define ISFUNC 0 #define ISKMAP 1 #define ISMACR 2 extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap; extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap; /* Return a new, empty keymap. Free it with free() when you are done. */ Keymap rl_make_bare_keymap (); /* Return a new keymap which is a copy of MAP. */ Keymap rl_copy_keymap (); /* Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments. */ Keymap rl_make_keymap (); #endif /* _KEYMAPS_H_ */ neuron-7.5/src/mswin/rdln/readline.c000077500000000000000000004713511323325274500175310ustar00rootroot00000000000000/* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ /* Copyright 1987, 1989, 1991, 1992 Free Software Foundation, Inc. This file contains the Readline Library (the Library), a set of routines for providing Emacs style line input to programs that ask for it. The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Remove these declarations when we have a complete libgnu.a. */ #if defined(__MSC_VER) #include <../../nrnconf.h> #endif #ifdef WIN32 #define STATIC_MALLOC #define rindex strrchr #endif /* #define STATIC_MALLOC */ #if defined(_MSC_VER) || defined(__MWERKS__) #include #include #include #endif /* Caseless strcmp (). */ #if defined(__MWERKS__) static int stricmp (), strnicmp (); #endif #if !defined (STATIC_MALLOC) extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif /* STATIC_MALLOC */ #include "sysdep.h" #include #include #ifdef WIN32 #define NO_SYS_FILE #endif #ifndef NO_SYS_FILE #include #endif #include #if defined (HAVE_UNISTD_H) # include #endif #ifndef WIN32 #define NEW_TTY_DRIVER #endif #define HAVE_BSD_SIGNALS /* #define USE_XON_XOFF */ #if __GO32__ #define GRX 1 #endif #if GRX extern int egagrph; #endif #ifdef __MSDOS__ #undef NEW_TTY_DRIVER #undef HAVE_BSD_SIGNALS #endif /* Some USG machines have BSD signal handling (sigblock, sigsetmask, etc.) */ #if defined (USG) && !defined (hpux) #undef HAVE_BSD_SIGNALS #endif /* System V machines use termio. */ #if !defined (_POSIX_VERSION) # if defined (USG) || defined (hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__H3050R) || defined (__H3050RX) # undef NEW_TTY_DRIVER # define TERMIO_TTY_DRIVER # include # if !defined (TCOON) # define TCOON 1 # endif # endif /* USG || hpux || Xenix || sgi || DUGX */ #endif /* !_POSIX_VERSION */ /* Posix systems use termios and the Posix signal functions. */ #if defined (_POSIX_VERSION) # if !defined (TERMIOS_MISSING) # undef NEW_TTY_DRIVER # define TERMIOS_TTY_DRIVER # include # endif /* !TERMIOS_MISSING */ # define HAVE_POSIX_SIGNALS # if !defined (O_NDELAY) # define O_NDELAY O_NONBLOCK /* Posix-style non-blocking i/o */ # endif /* O_NDELAY */ #endif /* _POSIX_VERSION */ /* Other (BSD) machines use sgtty. */ #if defined (NEW_TTY_DRIVER) #include #endif /* Define _POSIX_VDISABLE if we are not using the `new' tty driver and it is not already defined. It is used both to determine if a special character is disabled and to disable certain special characters. Posix systems should set to 0, USG systems to -1. */ #if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE) # if defined (_POSIX_VERSION) # define _POSIX_VDISABLE 0 # else /* !_POSIX_VERSION */ # define _POSIX_VDISABLE -1 # endif /* !_POSIX_VERSION */ #endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ /* Define some macros for dealing with assorted signalling disciplines. These macros provide a way to use signal blocking and disabling without smothering your code in a pile of #ifdef's. SIGNALS_UNBLOCK; Stop blocking all signals. { SIGNALS_DECLARE_SAVED (name); Declare a variable to save the signal blocking state. ... SIGNALS_BLOCK (SIGSTOP, name); Block a signal, and save the previous state for restoration later. ... SIGNALS_RESTORE (name); Restore previous signals. } */ #ifdef HAVE_POSIX_SIGNALS /* POSIX signals */ #define SIGNALS_UNBLOCK \ do { sigset_t set; \ sigemptyset (&set); \ sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); \ } while (0) #define SIGNALS_DECLARE_SAVED(name) sigset_t name #define SIGNALS_BLOCK(SIG, saved) \ do { sigset_t set; \ sigemptyset (&set); \ sigaddset (&set, SIG); \ sigprocmask (SIG_BLOCK, &set, &saved); \ } while (0) #define SIGNALS_RESTORE(saved) \ sigprocmask (SIG_SETMASK, &saved, (sigset_t *)NULL) #else /* HAVE_POSIX_SIGNALS */ #ifdef HAVE_BSD_SIGNALS /* BSD signals */ #define SIGNALS_UNBLOCK sigsetmask (0) #define SIGNALS_DECLARE_SAVED(name) int name #define SIGNALS_BLOCK(SIG, saved) saved = sigblock (sigmask (SIG)) #define SIGNALS_RESTORE(saved) sigsetmask (saved) #else /* HAVE_BSD_SIGNALS */ /* None of the Above */ #define SIGNALS_UNBLOCK /* nothing */ #define SIGNALS_DECLARE_SAVED(name) /* nothing */ #define SIGNALS_BLOCK(SIG, saved) /* nothing */ #define SIGNALS_RESTORE(saved) /* nothing */ #endif /* HAVE_BSD_SIGNALS */ #endif /* HAVE_POSIX_SIGNALS */ /* End of signal handling definitions. */ #include #include #include /* Posix macro to check file in statbuf for directory-ness. */ #if defined (S_IFDIR) && !defined (S_ISDIR) #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif #if !defined(__MSDOS__) && !defined(WIN32) /* These next are for filename completion. Perhaps this belongs in a different place. */ #include #endif /* __MSDOS__ */ #if defined (USG) && !defined (isc386) && !defined (sgi) struct passwd *getpwuid (), *getpwent (); #endif /* #define HACK_TERMCAP_MOTION */ /* Some standard library routines. */ #include "readline.h" #include "history.h" #ifndef digit #define digit(c) ((c) >= '0' && (c) <= '9') #endif #ifndef isletter #define isletter(c) (((c) >= 'A' && (c) <= 'Z') || ((c) >= 'a' && (c) <= 'z')) #endif #ifndef digit_value #define digit_value(c) ((c) - '0') #endif #ifndef member #define member(c, s) ((c) ? index ((s), (c)) : 0) #endif #ifndef isident #define isident(c) ((isletter(c) || digit(c) || c == '_')) #endif #ifndef exchange #define exchange(x, y) {int temp = x; x = y; y = temp;} #endif #if !defined (rindex) extern char *rindex (); #endif /* rindex */ #if !defined (index) extern char *index (); #endif /* index */ extern char *getenv (); extern char *tilde_expand (); char* tilde_expand() { return savestring("/");} static update_line (); static void output_character_function (); static delete_chars (); static void insert_some_chars (); #if defined (VOID_SIGHANDLER) # define sighandler void #else # define sighandler int #endif /* VOID_SIGHANDLER */ /* This typedef is equivalant to the one for Function; it allows us to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ typedef sighandler SigHandler (); /* If on, then readline handles signals in a way that doesn't screw. */ #ifndef WIN32 #define HANDLE_SIGNALS #endif #if defined(__GO32__) #ifdef RSX #include #else #include #endif #undef HANDLE_SIGNALS #endif /* **************************************************************** */ /* */ /* Line editing input utility */ /* */ /* **************************************************************** */ /* A pointer to the keymap that is currently in use. By default, it is the standard emacs keymap. */ Keymap keymap = emacs_standard_keymap; #define no_mode -1 #define vi_mode 0 #define emacs_mode 1 /* The current style of editing. */ int rl_editing_mode = emacs_mode; /* Non-zero if the previous command was a kill command. */ static int last_command_was_kill = 0; /* The current value of the numeric argument specified by the user. */ int rl_numeric_arg = 1; /* Non-zero if an argument was typed. */ int rl_explicit_arg = 0; /* Temporary value used while generating the argument. */ int rl_arg_sign = 1; /* Non-zero means we have been called at least once before. */ static int rl_initialized = 0; /* If non-zero, this program is running in an EMACS buffer. */ static char *running_in_emacs = (char *)NULL; /* The current offset in the current input line. */ int rl_point; /* Mark in the current input line. */ int rl_mark; /* Length of the current input line. */ int rl_end; /* Make this non-zero to return the current input_line. */ int rl_done; /* The last function executed by readline. */ Function *rl_last_func = (Function *)NULL; /* Top level environment for readline_internal (). */ static jmp_buf readline_top_level; /* The streams we interact with. */ static FILE *in_stream, *out_stream; /* The names of the streams that we do input and output to. */ FILE *rl_instream, *rl_outstream; /* Non-zero means echo characters as they are read. */ int readline_echoing_p = 1; /* Current prompt. */ char *rl_prompt; /* The number of characters read in order to type this complete command. */ int rl_key_sequence_length = 0; /* If non-zero, then this is the address of a function to call just before readline_internal () prints the first prompt. */ Function *rl_startup_hook = (Function *)NULL; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ Function *rl_symbolic_link_hook = (Function *)NULL; /* What we use internally. You should always refer to RL_LINE_BUFFER. */ static char *the_line; /* The character that can generate an EOF. Really read from the terminal driver... just defaulted here. */ static int eof_char = CTRL ('D'); /* Non-zero makes this the next keystroke to read. */ int rl_pending_input = 0; /* Pointer to a useful terminal name. */ char *rl_terminal_name = (char *)NULL; /* Line buffer and maintenence. */ char *rl_line_buffer = (char *)NULL; int rl_line_buffer_len = 0; #define DEFAULT_BUFFER_SIZE 256 /* **************************************************************** */ /* */ /* `Forward' declarations */ /* */ /* **************************************************************** */ /* Non-zero means do not parse any lines other than comments and parser directives. */ static unsigned char parsing_conditionalized_out = 0; /* Non-zero means to save keys that we dispatch on in a kbd macro. */ static int defining_kbd_macro = 0; /* **************************************************************** */ /* */ /* Top Level Functions */ /* */ /* **************************************************************** */ static void rl_prep_terminal (), rl_deprep_terminal (); static void clear_to_eol (), rl_generic_bind (); /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. A return value of NULL means that EOF was encountered. */ char * readline (prompt) char *prompt; { char *readline_internal (); char *value; rl_prompt = prompt; /* If we are at EOF return a NULL string. */ if (rl_pending_input == EOF) { rl_pending_input = 0; return ((char *)NULL); } rl_initialize (); rl_prep_terminal (); #if defined (HANDLE_SIGNALS) rl_set_signals (); #endif value = readline_internal (); rl_deprep_terminal (); #if defined (HANDLE_SIGNALS) rl_clear_signals (); #endif return (value); } /* Read a line of input from the global rl_instream, doing output on the global rl_outstream. If rl_prompt is non-null, then that is our prompt. */ char * readline_internal () { int lastc, c, eof_found; in_stream = rl_instream; out_stream = rl_outstream; lastc = -1; eof_found = 0; if (rl_startup_hook) (*rl_startup_hook) (); if (!readline_echoing_p) { if (rl_prompt) { fprintf (out_stream, "%s", rl_prompt); fflush (out_stream); } } else { rl_on_new_line (); rl_redisplay (); #if defined (VI_MODE) if (rl_editing_mode == vi_mode) rl_vi_insertion_mode (); #endif /* VI_MODE */ } while (!rl_done) { int lk = last_command_was_kill; int code = setjmp (readline_top_level); if (code) rl_redisplay (); if (!rl_pending_input) { /* Then initialize the argument and number of keys read. */ rl_init_argument (); rl_key_sequence_length = 0; } c = rl_read_key (); #ifdef WIN32 if (!winio_exists()) { eof_found = 1; break; } #endif /* EOF typed to a non-blank line is a . */ if (c == EOF && rl_end) c = NEWLINE; /* The character eof_char typed to blank line, and not as the previous character is interpreted as EOF. */ if (((c == eof_char && lastc != c) || c == EOF) && !rl_end) { eof_found = 1; break; } lastc = c; rl_dispatch (c, keymap); /* If there was no change in last_command_was_kill, then no kill has taken place. Note that if input is pending we are reading a prefix command, so nothing has changed yet. */ if (!rl_pending_input) { if (lk == last_command_was_kill) last_command_was_kill = 0; } #if defined (VI_MODE) /* In vi mode, when you exit insert mode, the cursor moves back over the previous character. We explicitly check for that here. */ if (rl_editing_mode == vi_mode && keymap == vi_movement_keymap) rl_vi_check (); #endif /* VI_MODE */ if (!rl_done) rl_redisplay (); } /* Restore the original of this history line, iff the line that we are editing was originally in the history, AND the line has changed. */ { HIST_ENTRY *entry = current_history (); if (entry && rl_undo_list) { char *temp = savestring (the_line); rl_revert_line (); entry = replace_history_entry (where_history (), the_line, (HIST_ENTRY *)NULL); free_history_entry (entry); strcpy (the_line, temp); free (temp); } } /* At any rate, it is highly likely that this line has an undo list. Get rid of it now. */ if (rl_undo_list) free_undo_list (); if (eof_found) return (char *)NULL; else return (savestring (the_line)); } /* **************************************************************** */ /* */ /* Signal Handling */ /* */ /* **************************************************************** */ #if defined (SIGWINCH) static SigHandler *old_sigwinch = (SigHandler *)NULL; static sighandler rl_handle_sigwinch (sig) int sig; { char *term; term = rl_terminal_name; if (readline_echoing_p) { if (!term) term = getenv ("TERM"); if (!term) term = "dumb"; rl_reset_terminal (term); #if defined (NOTDEF) crlf (); rl_forced_update_display (); #endif /* NOTDEF */ } if (old_sigwinch && old_sigwinch != (SigHandler *)SIG_IGN && old_sigwinch != (SigHandler *)SIG_DFL) (*old_sigwinch) (sig); #if !defined (VOID_SIGHANDLER) return (0); #endif /* VOID_SIGHANDLER */ } #endif /* SIGWINCH */ #if defined (HANDLE_SIGNALS) /* Interrupt handling. */ static SigHandler *old_int = (SigHandler *)NULL, *old_tstp = (SigHandler *)NULL, *old_ttou = (SigHandler *)NULL, *old_ttin = (SigHandler *)NULL, *old_cont = (SigHandler *)NULL, *old_alrm = (SigHandler *)NULL; /* Handle an interrupt character. */ static sighandler rl_signal_handler (sig) int sig; { #if !defined (HAVE_BSD_SIGNALS) /* Since the signal will not be blocked while we are in the signal handler, ignore it until rl_clear_signals resets the catcher. */ if (sig == SIGINT) signal (sig, SIG_IGN); #endif /* !HAVE_BSD_SIGNALS */ switch (sig) { case SIGINT: free_undo_list (); rl_clear_message (); rl_init_argument (); #if defined (SIGTSTP) case SIGTSTP: case SIGTTOU: case SIGTTIN: #endif /* SIGTSTP */ case SIGALRM: rl_clean_up_for_exit (); rl_deprep_terminal (); rl_clear_signals (); rl_pending_input = 0; kill (getpid (), sig); SIGNALS_UNBLOCK; rl_prep_terminal (); rl_set_signals (); } #if !defined (VOID_SIGHANDLER) return (0); #endif /* !VOID_SIGHANDLER */ } rl_set_signals () { old_int = (SigHandler *)signal (SIGINT, rl_signal_handler); if (old_int == (SigHandler *)SIG_IGN) signal (SIGINT, SIG_IGN); old_alrm = (SigHandler *)signal (SIGALRM, rl_signal_handler); if (old_alrm == (SigHandler *)SIG_IGN) signal (SIGALRM, SIG_IGN); #if defined (SIGTSTP) old_tstp = (SigHandler *)signal (SIGTSTP, rl_signal_handler); if (old_tstp == (SigHandler *)SIG_IGN) signal (SIGTSTP, SIG_IGN); #endif #if defined (SIGTTOU) old_ttou = (SigHandler *)signal (SIGTTOU, rl_signal_handler); old_ttin = (SigHandler *)signal (SIGTTIN, rl_signal_handler); if (old_tstp == (SigHandler *)SIG_IGN) { signal (SIGTTOU, SIG_IGN); signal (SIGTTIN, SIG_IGN); } #endif #if defined (SIGWINCH) old_sigwinch = (SigHandler *)signal (SIGWINCH, rl_handle_sigwinch); #endif } rl_clear_signals () { signal (SIGINT, old_int); signal (SIGALRM, old_alrm); #if defined (SIGTSTP) signal (SIGTSTP, old_tstp); #endif #if defined (SIGTTOU) signal (SIGTTOU, old_ttou); signal (SIGTTIN, old_ttin); #endif #if defined (SIGWINCH) signal (SIGWINCH, old_sigwinch); #endif } #endif /* HANDLE_SIGNALS */ /* **************************************************************** */ /* */ /* Character Input Buffering */ /* */ /* **************************************************************** */ #if defined (USE_XON_XOFF) /* If the terminal was in xoff state when we got to it, then xon_char contains the character that is supposed to start it again. */ static int xon_char, xoff_state; #endif /* USE_XON_XOFF */ static int pop_index = 0, push_index = 0, ibuffer_len = 511; static unsigned char ibuffer[512]; /* Non-null means it is a pointer to a function to run while waiting for character input. */ Function *rl_event_hook = (Function *)NULL; #define any_typein (push_index != pop_index) /* Add KEY to the buffer of characters to be read. */ rl_stuff_char (key) int key; { if (key == EOF) { key = NEWLINE; rl_pending_input = EOF; } ibuffer[push_index++] = key; if (push_index >= ibuffer_len) push_index = 0; } /* Return the amount of space available in the buffer for stuffing characters. */ int ibuffer_space () { if (pop_index > push_index) return (pop_index - push_index); else return (ibuffer_len - (push_index - pop_index)); } /* Get a key from the buffer of characters to be read. Return the key in KEY. Result is KEY if there was a key, or 0 if there wasn't. */ int rl_get_char (key) int *key; { if (push_index == pop_index) return (0); *key = ibuffer[pop_index++]; if (pop_index >= ibuffer_len) pop_index = 0; return (1); } /* Stuff KEY into the *front* of the input buffer. Returns non-zero if successful, zero if there is no space left in the buffer. */ int rl_unget_char (key) int key; { if (ibuffer_space ()) { pop_index--; if (pop_index < 0) pop_index = ibuffer_len - 1; ibuffer[pop_index] = key; return (1); } return (0); } /* If a character is available to be read, then read it and stuff it into IBUFFER. Otherwise, just return. */ rl_gather_tyi () { #ifdef WIN32 while (kbhit() && ibuffer_space()) { rl_stuff_char(winio_getc()); } #else #if defined(__GO32__) char input; if (isatty(0)) { int i = rl_getc(); if (i != EOF) rl_stuff_char(i); } else if (kbhit() && ibuffer_space()) rl_stuff_char(getkey()); #else int tty = fileno (in_stream); register int tem, result = -1; long chars_avail; char input; #if defined (FIONREAD) result = ioctl (tty, FIONREAD, &chars_avail); #endif if (result == -1) { int flags; flags = fcntl (tty, F_GETFL, 0); fcntl (tty, F_SETFL, (flags | O_NDELAY)); chars_avail = read (tty, &input, 1); fcntl (tty, F_SETFL, flags); if (chars_avail == -1 && errno == EAGAIN) return; } /* If there's nothing available, don't waste time trying to read something. */ if (chars_avail == 0) return; tem = ibuffer_space (); if (chars_avail > tem) chars_avail = tem; /* One cannot read all of the available input. I can only read a single character at a time, or else programs which require input can be thwarted. If the buffer is larger than one character, I lose. Damn! */ if (tem < ibuffer_len) chars_avail = 0; if (result != -1) { while (chars_avail--) rl_stuff_char (rl_getc (in_stream)); } else { if (chars_avail) rl_stuff_char (input); } #endif /* def __GO32__/else */ #endif } static int next_macro_key (); /* Read a key, including pending input. */ int rl_read_key () { int c; rl_key_sequence_length++; if (rl_pending_input) { c = rl_pending_input; rl_pending_input = 0; } else { /* If input is coming from a macro, then use that. */ if (c = next_macro_key ()) return (c); /* If the user has an event function, then call it periodically. */ if (rl_event_hook) { while (rl_event_hook && !rl_get_char (&c)) { (*rl_event_hook) (); if (!winio_rdln_ok()) { printf("%s", rl_prompt); printf("%s", the_line); } rl_gather_tyi (); } } else { if (!rl_get_char (&c)) c = rl_getc (in_stream); } } return (c); } /* I'm beginning to hate the declaration rules for various compilers. */ static void add_macro_char (), with_macro_input (); /* Do the command associated with KEY in MAP. If the associated command is really a keymap, then read another key, and dispatch into that map. */ rl_dispatch (key, map) register int key; Keymap map; { if (defining_kbd_macro) add_macro_char (key); if (key > 127 && key < 256) { if (map[ESC].type == ISKMAP) { map = (Keymap)map[ESC].function; key -= 128; rl_dispatch (key, map); } else ding (); return; } switch (map[key].type) { case ISFUNC: { Function *func = map[key].function; if (func != (Function *)NULL) { /* Special case rl_do_lowercase_version (). */ if (func == rl_do_lowercase_version) { rl_dispatch (to_lower (key), map); return; } (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); /* If we have input pending, then the last command was a prefix command. Don't change the state of rl_last_func. Otherwise, remember the last command executed in this variable. */ if (!rl_pending_input) rl_last_func = map[key].function; } else { rl_abort (); return; } } break; case ISKMAP: if (map[key].function != (Function *)NULL) { int newkey; rl_key_sequence_length++; newkey = rl_read_key (); rl_dispatch (newkey, (Keymap)map[key].function); } else { rl_abort (); return; } break; case ISMACR: if (map[key].function != (Function *)NULL) { char *macro; macro = savestring ((char *)map[key].function); with_macro_input (macro); return; } break; } } /* **************************************************************** */ /* */ /* Hacking Keyboard Macros */ /* */ /* **************************************************************** */ /* The currently executing macro string. If this is non-zero, then it is a malloc ()'ed string where input is coming from. */ static char *executing_macro = (char *)NULL; /* The offset in the above string to the next character to be read. */ static int executing_macro_index = 0; /* The current macro string being built. Characters get stuffed in here by add_macro_char (). */ static char *current_macro = (char *)NULL; /* The size of the buffer allocated to current_macro. */ static int current_macro_size = 0; /* The index at which characters are being added to current_macro. */ static int current_macro_index = 0; /* A structure used to save nested macro strings. It is a linked list of string/index for each saved macro. */ struct saved_macro { struct saved_macro *next; char *string; int index; }; /* The list of saved macros. */ struct saved_macro *macro_list = (struct saved_macro *)NULL; /* Forward declarations of static functions. Thank you C. */ static void push_executing_macro (), pop_executing_macro (); /* This one has to be declared earlier in the file. */ /* static void add_macro_char (); */ /* Set up to read subsequent input from STRING. STRING is free ()'ed when we are done with it. */ static void with_macro_input (string) char *string; { push_executing_macro (); executing_macro = string; executing_macro_index = 0; } /* Return the next character available from a macro, or 0 if there are no macro characters. */ static int next_macro_key () { if (!executing_macro) return (0); if (!executing_macro[executing_macro_index]) { pop_executing_macro (); return (next_macro_key ()); } return (executing_macro[executing_macro_index++]); } /* Save the currently executing macro on a stack of saved macros. */ static void push_executing_macro () { struct saved_macro *saver; saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro)); saver->next = macro_list; saver->index = executing_macro_index; saver->string = executing_macro; macro_list = saver; } /* Discard the current macro, replacing it with the one on the top of the stack of saved macros. */ static void pop_executing_macro () { if (executing_macro) free (executing_macro); executing_macro = (char *)NULL; executing_macro_index = 0; if (macro_list) { struct saved_macro *disposer = macro_list; executing_macro = macro_list->string; executing_macro_index = macro_list->index; macro_list = macro_list->next; free (disposer); } } /* Add a character to the macro being built. */ static void add_macro_char (c) int c; { if (current_macro_index + 1 >= current_macro_size) { if (!current_macro) current_macro = (char *)xmalloc (current_macro_size = 25); else current_macro = (char *)xrealloc (current_macro, current_macro_size += 25); } current_macro[current_macro_index++] = c; current_macro[current_macro_index] = '\0'; } /* Begin defining a keyboard macro. Keystrokes are recorded as they are executed. End the definition with rl_end_kbd_macro (). If a numeric argument was explicitly typed, then append this definition to the end of the existing macro, and start by re-executing the existing macro. */ rl_start_kbd_macro (ignore1, ignore2) int ignore1, ignore2; { if (defining_kbd_macro) rl_abort (); if (rl_explicit_arg) { if (current_macro) with_macro_input (savestring (current_macro)); } else current_macro_index = 0; defining_kbd_macro = 1; } /* Stop defining a keyboard macro. A numeric argument says to execute the macro right now, that many times, counting the definition as the first time. */ rl_end_kbd_macro (count, ignore) int count, ignore; { if (!defining_kbd_macro) rl_abort (); current_macro_index -= (rl_key_sequence_length - 1); current_macro[current_macro_index] = '\0'; defining_kbd_macro = 0; rl_call_last_kbd_macro (--count, 0); } /* Execute the most recently defined keyboard macro. COUNT says how many times to execute it. */ rl_call_last_kbd_macro (count, ignore) int count, ignore; { if (!current_macro) rl_abort (); while (count--) with_macro_input (savestring (current_macro)); } /* **************************************************************** */ /* */ /* Initializations */ /* */ /* **************************************************************** */ /* Initliaze readline (and terminal if not already). */ rl_initialize () { extern char *rl_display_prompt; /* If we have never been called before, initialize the terminal and data structures. */ if (!rl_initialized) { readline_initialize_everything (); rl_initialized++; } /* Initalize the current line information. */ rl_point = rl_end = 0; the_line = rl_line_buffer; the_line[0] = 0; /* We aren't done yet. We haven't even gotten started yet! */ rl_done = 0; /* Tell the history routines what is going on. */ start_using_history (); /* Make the display buffer match the state of the line. */ { extern char *rl_display_prompt; extern int forced_display; rl_on_new_line (); rl_display_prompt = rl_prompt ? rl_prompt : ""; forced_display = 1; } /* No such function typed yet. */ rl_last_func = (Function *)NULL; /* Parsing of key-bindings begins in an enabled state. */ parsing_conditionalized_out = 0; } /* Initialize the entire state of the world. */ readline_initialize_everything () { /* Find out if we are running in Emacs. */ running_in_emacs = getenv ("EMACS"); /* Set up input and output if they aren't already. */ if (!rl_instream) rl_instream = stdin; if (!rl_outstream) rl_outstream = stdout; /* Allocate data structures. */ if (!rl_line_buffer) rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE); /* Initialize the terminal interface. */ init_terminal_io ((char *)NULL); /* Bind tty characters to readline functions. */ readline_default_bindings (); /* Initialize the function names. */ rl_initialize_funmap (); /* Read in the init file. */ rl_read_init_file ((char *)NULL); /* If the completion parser's default word break characters haven't been set yet, then do so now. */ { extern char *rl_completer_word_break_characters; extern char *rl_basic_word_break_characters; if (rl_completer_word_break_characters == (char *)NULL) rl_completer_word_break_characters = rl_basic_word_break_characters; } } /* If this system allows us to look at the values of the regular input editing characters, then bind them to their readline equivalents, iff the characters are not bound to keymaps. */ readline_default_bindings () { #if !defined(__GO32__) && !defined(WIN32) #if defined (NEW_TTY_DRIVER) struct sgttyb ttybuff; int tty = fileno (rl_instream); if (ioctl (tty, TIOCGETP, &ttybuff) != -1) { int erase, kill; erase = ttybuff.sg_erase; kill = ttybuff.sg_kill; if (erase != -1 && keymap[erase].type == ISFUNC) keymap[erase].function = rl_rubout; if (kill != -1 && keymap[kill].type == ISFUNC) keymap[kill].function = rl_unix_line_discard; } #if defined (TIOCGLTC) { struct ltchars lt; if (ioctl (tty, TIOCGLTC, <) != -1) { int erase, nextc; erase = lt.t_werasc; nextc = lt.t_lnextc; if (erase != -1 && keymap[erase].type == ISFUNC) keymap[erase].function = rl_unix_word_rubout; if (nextc != -1 && keymap[nextc].type == ISFUNC) keymap[nextc].function = rl_quoted_insert; } } #endif /* TIOCGLTC */ #else /* not NEW_TTY_DRIVER */ #if defined (TERMIOS_TTY_DRIVER) struct termios ttybuff; #else struct termio ttybuff; #endif /* TERMIOS_TTY_DRIVER */ int tty = fileno (rl_instream); #if defined (TERMIOS_TTY_DRIVER) if (tcgetattr (tty, &ttybuff) != -1) #else if (ioctl (tty, TCGETA, &ttybuff) != -1) #endif /* !TERMIOS_TTY_DRIVER */ { int erase, kill; erase = ttybuff.c_cc[VERASE]; kill = ttybuff.c_cc[VKILL]; if (erase != _POSIX_VDISABLE && keymap[(unsigned char)erase].type == ISFUNC) keymap[(unsigned char)erase].function = rl_rubout; if (kill != _POSIX_VDISABLE && keymap[(unsigned char)kill].type == ISFUNC) keymap[(unsigned char)kill].function = rl_unix_line_discard; #if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) { int nextc; nextc = ttybuff.c_cc[VLNEXT]; if (nextc != _POSIX_VDISABLE && keymap[(unsigned char)nextc].type == ISFUNC) keymap[(unsigned char)nextc].function = rl_quoted_insert; } #endif /* VLNEXT && TERMIOS_TTY_DRIVER */ #if defined (VWERASE) { int werase; werase = ttybuff.c_cc[VWERASE]; if (werase != _POSIX_VDISABLE && keymap[(unsigned char)werase].type == ISFUNC) keymap[(unsigned char)werase].function = rl_unix_word_rubout; } #endif /* VWERASE */ } #endif /* !NEW_TTY_DRIVER */ #endif /* def __GO32__ */ } /* **************************************************************** */ /* */ /* Numeric Arguments */ /* */ /* **************************************************************** */ /* Handle C-u style numeric args, as well as M--, and M-digits. */ /* Add the current digit to the argument in progress. */ rl_digit_argument (ignore, key) int ignore, key; { rl_pending_input = key; rl_digit_loop (); } /* What to do when you abort reading an argument. */ rl_discard_argument () { ding (); rl_clear_message (); rl_init_argument (); } /* Create a default argument. */ rl_init_argument () { rl_numeric_arg = rl_arg_sign = 1; rl_explicit_arg = 0; } /* C-u, universal argument. Multiply the current argument by 4. Read a key. If the key has nothing to do with arguments, then dispatch on it. If the key is the abort character then abort. */ rl_universal_argument () { rl_numeric_arg *= 4; rl_digit_loop (); } rl_digit_loop () { int key, c; while (1) { rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg, 0); key = c = rl_read_key (); if (keymap[c].type == ISFUNC && keymap[c].function == rl_universal_argument) { rl_numeric_arg *= 4; continue; } c = UNMETA (c); if (numeric (c)) { if (rl_explicit_arg) rl_numeric_arg = (rl_numeric_arg * 10) + (c - '0'); else rl_numeric_arg = (c - '0'); rl_explicit_arg = 1; } else { if (c == '-' && !rl_explicit_arg) { rl_numeric_arg = 1; rl_arg_sign = -1; } else { rl_clear_message (); rl_dispatch (key, keymap); return; } } } } /* **************************************************************** */ /* */ /* Display stuff */ /* */ /* **************************************************************** */ /* This is the stuff that is hard for me. I never seem to write good display routines in C. Let's see how I do this time. */ /* (PWP) Well... Good for a simple line updater, but totally ignores the problems of input lines longer than the screen width. update_line and the code that calls it makes a multiple line, automatically wrapping line update. Carefull attention needs to be paid to the vertical position variables. handling of terminals with autowrap on (incl. DEC braindamage) could be improved a bit. Right now I just cheat and decrement screenwidth by one. */ /* Keep two buffers; one which reflects the current contents of the screen, and the other to draw what we think the new contents should be. Then compare the buffers, and make whatever changes to the screen itself that we should. Finally, make the buffer that we just drew into be the one which reflects the current contents of the screen, and place the cursor where it belongs. Commands that want to can fix the display themselves, and then let this function know that the display has been fixed by setting the RL_DISPLAY_FIXED variable. This is good for efficiency. */ /* Termcap variables: */ extern char *term_up, *term_dc, *term_cr; extern int screenheight, screenwidth, terminal_can_insert; /* What YOU turn on when you have handled all redisplay yourself. */ int rl_display_fixed = 0; /* The visible cursor position. If you print some text, adjust this. */ int last_c_pos = 0; int last_v_pos = 0; /* The last left edge of text that was displayed. This is used when doing horizontal scrolling. It shifts in thirds of a screenwidth. */ static int last_lmargin = 0; /* The line display buffers. One is the line currently displayed on the screen. The other is the line about to be displayed. */ static char *visible_line = (char *)NULL; static char *invisible_line = (char *)NULL; /* Number of lines currently on screen minus 1. */ int vis_botlin = 0; /* A buffer for `modeline' messages. */ char msg_buf[128]; /* Non-zero forces the redisplay even if we thought it was unnecessary. */ int forced_display = 0; /* The stuff that gets printed out before the actual text of the line. This is usually pointing to rl_prompt. */ char *rl_display_prompt = (char *)NULL; /* Default and initial buffer size. Can grow. */ static int line_size = 1024; /* Non-zero means to always use horizontal scrolling in line display. */ static int horizontal_scroll_mode = 0; /* Non-zero means to display an asterisk at the starts of history lines which have been modified. */ static int mark_modified_lines = 0; /* Non-zero means to use a visible bell if one is available rather than simply ringing the terminal bell. */ static int prefer_visible_bell = 0; /* I really disagree with this, but my boss (among others) insists that we support compilers that don't work. I don't think we are gaining by doing so; what is the advantage in producing better code if we can't use it? */ /* The following two declarations belong inside the function block, not here. */ static void move_cursor_relative (); static void output_some_chars (); static void output_character_function (); static int compare_strings (); /* Basic redisplay algorithm. */ rl_redisplay () { register int in, out, c, linenum; register char *line = invisible_line; char *prompt_this_line; int c_pos = 0; int inv_botlin = 0; /* Number of lines in newly drawn buffer. */ extern int readline_echoing_p; if (!readline_echoing_p) return; if (!rl_display_prompt) rl_display_prompt = ""; if (!invisible_line) { visible_line = (char *)xmalloc (line_size); invisible_line = (char *)xmalloc (line_size); line = invisible_line; for (in = 0; in < line_size; in++) { visible_line[in] = 0; invisible_line[in] = 1; } rl_on_new_line (); } /* Draw the line into the buffer. */ c_pos = -1; /* Mark the line as modified or not. We only do this for history lines. */ out = 0; if (mark_modified_lines && current_history () && rl_undo_list) { line[out++] = '*'; line[out] = '\0'; } /* If someone thought that the redisplay was handled, but the currently visible line has a different modification state than the one about to become visible, then correct the callers misconception. */ if (visible_line[0] != invisible_line[0]) rl_display_fixed = 0; prompt_this_line = rindex (rl_display_prompt, '\n'); if (!prompt_this_line) prompt_this_line = rl_display_prompt; else { prompt_this_line++; if (forced_display) output_some_chars (rl_display_prompt, prompt_this_line - rl_display_prompt); } strncpy (line + out, prompt_this_line, strlen (prompt_this_line)); out += strlen (prompt_this_line); line[out] = '\0'; for (in = 0; in < rl_end; in++) { c = (unsigned char)the_line[in]; if (out + 1 >= line_size) { line_size *= 2; visible_line = (char *)xrealloc (visible_line, line_size); invisible_line = (char *)xrealloc (invisible_line, line_size); line = invisible_line; } if (in == rl_point) c_pos = out; if (c > 127) { line[out++] = 'M'; line[out++] = '-'; line[out++] = c - 128; } #define DISPLAY_TABS #if defined (DISPLAY_TABS) else if (c == '\t') { register int newout = (out | (int)7) + 1; while (out < newout) line[out++] = ' '; } #endif else if (c < 32) { line[out++] = 'C'; line[out++] = '-'; line[out++] = c + 64; } else if (c == 127) { line[out++] = 'C'; line[out++] = '-'; line[out++] = '?'; } else line[out++] = c; } line[out] = '\0'; if (c_pos < 0) c_pos = out; /* PWP: now is when things get a bit hairy. The visible and invisible line buffers are really multiple lines, which would wrap every (screenwidth - 1) characters. Go through each in turn, finding the changed region and updating it. The line order is top to bottom. */ /* If we can move the cursor up and down, then use multiple lines, otherwise, let long lines display in a single terminal line, and horizontally scroll it. */ if (!horizontal_scroll_mode && term_up && *term_up) { int total_screen_chars = (screenwidth * screenheight); if (!rl_display_fixed || forced_display) { forced_display = 0; /* If we have more than a screenful of material to display, then only display a screenful. We should display the last screen, not the first. I'll fix this in a minute. */ if (out >= total_screen_chars) out = total_screen_chars - 1; /* Number of screen lines to display. */ inv_botlin = out / screenwidth; /* For each line in the buffer, do the updating display. */ for (linenum = 0; linenum <= inv_botlin; linenum++) update_line (linenum > vis_botlin ? "" : &visible_line[linenum * screenwidth], &invisible_line[linenum * screenwidth], linenum); /* We may have deleted some lines. If so, clear the left over blank ones at the bottom out. */ if (vis_botlin > inv_botlin) { char *tt; for (; linenum <= vis_botlin; linenum++) { tt = &visible_line[linenum * screenwidth]; move_vert (linenum); move_cursor_relative (0, tt); clear_to_eol ((linenum == vis_botlin)? strlen (tt) : screenwidth); } } vis_botlin = inv_botlin; /* Move the cursor where it should be. */ move_vert (c_pos / screenwidth); move_cursor_relative (c_pos % screenwidth, &invisible_line[(c_pos / screenwidth) * screenwidth]); } } else /* Do horizontal scrolling. */ { int lmargin; /* Always at top line. */ last_v_pos = 0; /* If the display position of the cursor would be off the edge of the screen, start the display of this line at an offset that leaves the cursor on the screen. */ if (c_pos - last_lmargin > screenwidth - 2) lmargin = (c_pos / (screenwidth / 3) - 2) * (screenwidth / 3); else if (c_pos - last_lmargin < 1) lmargin = ((c_pos - 1) / (screenwidth / 3)) * (screenwidth / 3); else lmargin = last_lmargin; /* If the first character on the screen isn't the first character in the display line, indicate this with a special character. */ if (lmargin > 0) line[lmargin] = '<'; if (lmargin + screenwidth < out) line[lmargin + screenwidth - 1] = '>'; if (!rl_display_fixed || forced_display || lmargin != last_lmargin) { forced_display = 0; update_line (&visible_line[last_lmargin], &invisible_line[lmargin], 0); move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]); last_lmargin = lmargin; } } fflush (out_stream); /* Swap visible and non-visible lines. */ { char *temp = visible_line; visible_line = invisible_line; invisible_line = temp; rl_display_fixed = 0; } } /* PWP: update_line() is based on finding the middle difference of each line on the screen; vis: /old first difference /beginning of line | /old last same /old EOL v v v v old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as new: eddie> Oh, my little buggy says to me, as lurgid as ^ ^ ^ ^ \beginning of line | \new last same \new end of line \new first difference All are character pointers for the sake of speed. Special cases for no differences, as well as for end of line additions must be handeled. Could be made even smarter, but this works well enough */ static update_line (old, new, current_line) register char *old, *new; int current_line; { register char *ofd, *ols, *oe, *nfd, *nls, *ne; int lendiff, wsatend; /* Find first difference. */ for (ofd = old, nfd = new; (ofd - old < screenwidth) && *ofd && (*ofd == *nfd); ofd++, nfd++) ; /* Move to the end of the screen line. */ for (oe = ofd; ((oe - old) < screenwidth) && *oe; oe++); for (ne = nfd; ((ne - new) < screenwidth) && *ne; ne++); /* If no difference, continue to next line. */ if (ofd == oe && nfd == ne) return; wsatend = 1; /* flag for trailing whitespace */ ols = oe - 1; /* find last same */ nls = ne - 1; while ((ols > ofd) && (nls > nfd) && (*ols == *nls)) { if (*ols != ' ') wsatend = 0; ols--; nls--; } if (wsatend) { ols = oe; nls = ne; } else if (*ols != *nls) { if (*ols) /* don't step past the NUL */ ols++; if (*nls) nls++; } move_vert (current_line); move_cursor_relative (ofd - old, old); /* if (len (new) > len (old)) */ lendiff = (nls - nfd) - (ols - ofd); /* Insert (diff(len(old),len(new)) ch */ if (lendiff > 0) { if (terminal_can_insert) { extern char *term_IC; /* Sometimes it is cheaper to print the characters rather than use the terminal's capabilities. */ if ((2 * (ne - nfd)) < lendiff && !term_IC) { output_some_chars (nfd, (ne - nfd)); last_c_pos += (ne - nfd); } else { if (*ols) { insert_some_chars (nfd, lendiff); last_c_pos += lendiff; } else { /* At the end of a line the characters do not have to be "inserted". They can just be placed on the screen. */ output_some_chars (nfd, lendiff); last_c_pos += lendiff; } /* Copy (new) chars to screen from first diff to last match. */ if (((nls - nfd) - lendiff) > 0) { output_some_chars (&nfd[lendiff], ((nls - nfd) - lendiff)); last_c_pos += ((nls - nfd) - lendiff); } } } else { /* cannot insert chars, write to EOL */ output_some_chars (nfd, (ne - nfd)); last_c_pos += (ne - nfd); } } else /* Delete characters from line. */ { /* If possible and inexpensive to use terminal deletion, then do so. */ if (term_dc && (2 * (ne - nfd)) >= (-lendiff)) { if (lendiff) delete_chars (-lendiff); /* delete (diff) characters */ /* Copy (new) chars to screen from first diff to last match */ if ((nls - nfd) > 0) { output_some_chars (nfd, (nls - nfd)); last_c_pos += (nls - nfd); } } /* Otherwise, print over the existing material. */ else { output_some_chars (nfd, (ne - nfd)); last_c_pos += (ne - nfd); clear_to_eol ((oe - old) - (ne - new)); } } } /* (PWP) tell the update routines that we have moved onto a new (empty) line. */ rl_on_new_line () { if (visible_line) visible_line[0] = '\0'; last_c_pos = last_v_pos = 0; vis_botlin = last_lmargin = 0; } /* Actually update the display, period. */ rl_forced_update_display () { if (visible_line) { register char *temp = visible_line; while (*temp) *temp++ = '\0'; } rl_on_new_line (); forced_display++; rl_redisplay (); } /* Move the cursor from last_c_pos to NEW, which are buffer indices. DATA is the contents of the screen line of interest; i.e., where the movement is being done. */ static void move_cursor_relative (new, data) int new; char *data; { #ifdef WIN32 winio_rel_move(new); last_c_pos = new; return; #else register int i; #if GRX if (egagrph) { grx_rel_move(new); last_c_pos = new; return; } #endif /* It may be faster to output a CR, and then move forwards instead of moving backwards. */ if (new + 1 < last_c_pos - new) { #ifdef __MSDOS__ putc('\r', out_stream); #else tputs (term_cr, 1, output_character_function); #endif last_c_pos = 0; } if (last_c_pos == new) return; if (last_c_pos < new) { /* Move the cursor forward. We do it by printing the command to move the cursor forward if there is one, else print that portion of the output buffer again. Which is cheaper? */ /* The above comment is left here for posterity. It is faster to print one character (non-control) than to print a control sequence telling the terminal to move forward one character. That kind of control is for people who don't know what the data is underneath the cursor. */ #if defined (HACK_TERMCAP_MOTION) extern char *term_forward_char; if (term_forward_char) for (i = last_c_pos; i < new; i++) tputs (term_forward_char, 1, output_character_function); else for (i = last_c_pos; i < new; i++) putc (data[i], out_stream); #else for (i = last_c_pos; i < new; i++) putc (data[i], out_stream); #endif /* HACK_TERMCAP_MOTION */ } else backspace (last_c_pos - new); last_c_pos = new; #endif } /* PWP: move the cursor up or down. */ move_vert (to) int to; { #ifdef WIN32 #else void output_character_function (); register int delta, i; if (last_v_pos == to) return; if (to > screenheight) return; #if defined(__GO32__) { int cur_r, cur_c; ScreenGetCursor(&cur_r, &cur_c); ScreenSetCursor(cur_r+to-last_v_pos, cur_c); } #else /* __GO32__ */ if ((delta = to - last_v_pos) > 0) { for (i = 0; i < delta; i++) putc ('\n', out_stream); tputs (term_cr, 1, output_character_function); last_c_pos = 0; } else { /* delta < 0 */ if (term_up && *term_up) for (i = 0; i < -delta; i++) tputs (term_up, 1, output_character_function); } #endif /* __GO32__ */ #endif last_v_pos = to; /* now to is here */ } /* Physically print C on out_stream. This is for functions which know how to optimize the display. */ rl_show_char (c) int c; { if (c > 127) { fprintf (out_stream, "M-"); c -= 128; } #if defined (DISPLAY_TABS) if (c < 32 && c != '\t') #else if (c < 32) #endif { c += 64; } putc (c, out_stream); fflush (out_stream); } #if defined (DISPLAY_TABS) int rl_character_len (c, pos) register int c, pos; { if (c < ' ' || c > 126) { if (c == '\t') return (((pos | (int)7) + 1) - pos); else return (3); } else return (1); } #else int rl_character_len (c) int c; { if (c < ' ' || c > 126) return (3); else return (1); } #endif /* DISPLAY_TAB */ /* How to print things in the "echo-area". The prompt is treated as a mini-modeline. */ rl_message (string, arg1, arg2) char *string; { sprintf (msg_buf, string, arg1, arg2); rl_display_prompt = msg_buf; rl_redisplay (); } /* How to clear things from the "echo-area". */ rl_clear_message () { rl_display_prompt = rl_prompt; rl_redisplay (); } /* **************************************************************** */ /* */ /* Terminal and Termcap */ /* */ /* **************************************************************** */ static char *term_buffer = (char *)NULL; static char *term_string_buffer = (char *)NULL; /* Non-zero means this terminal can't really do anything. */ int dumb_term = 0; /* On Solaris2, sys/types.h brings in sys/reg.h, which screws up the Termcap variable PC, used below. */ #undef PC char PC; char *BC, *UP; /* Some strings to control terminal actions. These are output by tputs (). */ char *term_goto, *term_clreol, *term_cr, *term_clrpag, *term_backspace; int screenwidth, screenheight; /* Non-zero if we determine that the terminal can do character insertion. */ int terminal_can_insert = 0; /* How to insert characters. */ char *term_im, *term_ei, *term_ic, *term_ip, *term_IC; /* How to delete characters. */ char *term_dc, *term_DC; #if defined (HACK_TERMCAP_MOTION) char *term_forward_char; #endif /* HACK_TERMCAP_MOTION */ /* How to go up a line. */ char *term_up; /* A visible bell, if the terminal can be made to flash the screen. */ char *visible_bell; /* Re-initialize the terminal considering that the TERM/TERMCAP variable has changed. */ rl_reset_terminal (terminal_name) char *terminal_name; { init_terminal_io (terminal_name); } init_terminal_io (terminal_name) char *terminal_name; { #ifdef WIN32 winio_size(&screenheight, &screenwidth); #else #if defined(__GO32__) screenwidth = ScreenCols(); screenheight = ScreenRows(); term_cr = "\r"; term_im = term_ei = term_ic = term_IC = (char *)NULL; term_up = term_dc = term_DC = visible_bell = (char *)NULL; #if defined (HACK_TERMCAP_MOTION) term_forward_char = (char *)NULL; #endif terminal_can_insert = 0; return; #else extern char *tgetstr (); char *term, *buffer; #if defined (TIOCGWINSZ) && !defined (TIOCGWINSZ_BROKEN) struct winsize window_size; #endif int tty; term = terminal_name ? terminal_name : getenv ("TERM"); if (!term_string_buffer) term_string_buffer = (char *)xmalloc (2048); if (!term_buffer) term_buffer = (char *)xmalloc (2048); buffer = term_string_buffer; term_clrpag = term_cr = term_clreol = (char *)NULL; if (!term) term = "dumb"; if (tgetent (term_buffer, term) <= 0) { dumb_term = 1; screenwidth = 79; screenheight = 24; term_cr = "\r"; term_im = term_ei = term_ic = term_IC = (char *)NULL; term_up = term_dc = term_DC = visible_bell = (char *)NULL; #if defined (HACK_TERMCAP_MOTION) term_forward_char = (char *)NULL; #endif terminal_can_insert = 0; return; } BC = tgetstr ("pc", &buffer); PC = buffer ? *buffer : 0; term_backspace = tgetstr ("le", &buffer); term_cr = tgetstr ("cr", &buffer); term_clreol = tgetstr ("ce", &buffer); term_clrpag = tgetstr ("cl", &buffer); if (!term_cr) term_cr = "\r"; #if defined (HACK_TERMCAP_MOTION) term_forward_char = tgetstr ("nd", &buffer); #endif /* HACK_TERMCAP_MOTION */ if (rl_instream) tty = fileno (rl_instream); else tty = 0; screenwidth = screenheight = 0; #if defined (TIOCGWINSZ) && !defined (TIOCGWINSZ_BROKEN) if (ioctl (tty, TIOCGWINSZ, &window_size) == 0) { screenwidth = (int) window_size.ws_col; screenheight = (int) window_size.ws_row; } #endif if (screenwidth <= 0 || screenheight <= 0) { screenwidth = tgetnum ("co"); screenheight = tgetnum ("li"); } screenwidth--; if (screenwidth <= 0) screenwidth = 79; if (screenheight <= 0) screenheight = 24; term_im = tgetstr ("im", &buffer); term_ei = tgetstr ("ei", &buffer); term_IC = tgetstr ("IC", &buffer); term_ic = tgetstr ("ic", &buffer); /* "An application program can assume that the terminal can do character insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is provided." But we can't do anything if only `ip' is provided, so... */ terminal_can_insert = (term_IC || term_im || term_ic); term_up = tgetstr ("up", &buffer); term_dc = tgetstr ("dc", &buffer); term_DC = tgetstr ("DC", &buffer); visible_bell = tgetstr ("vb", &buffer); #endif /* !__GO32__ */ #endif } /* A function for the use of tputs () */ static void output_character_function (c) int c; { putc (c, out_stream); } /* Write COUNT characters from STRING to the output stream. */ static void output_some_chars (string, count) char *string; int count; { #ifdef WIN32 winio_output_some_chars(string, count); #else #if GRX if (egagrph) { grx_output_some_chars(string, count); }else #endif { fwrite (string, 1, count, out_stream); } #endif } /* Delete COUNT characters from the display line. */ static delete_chars (count) int count; { #ifdef WIN32 winio_delete_chars(count); #else #if defined(__GO32__) int r, c, w; #if GRX if (egagrph) { grx_delete_chars(count); }else #endif { ScreenGetCursor(&r, &c); w = ScreenCols(); memcpy(ScreenPrimary+r*w+c, ScreenPrimary+r*w+c+count, w-c-count); memset(ScreenPrimary+r*w+w-count, 0, count*2); } #else /* __GO32__ */ if (count > screenwidth) return; if (term_DC && *term_DC) { char *tgoto (), *buffer; buffer = tgoto (term_DC, 0, count); tputs (buffer, 1, output_character_function); } else { if (term_dc && *term_dc) while (count--) tputs (term_dc, 1, output_character_function); } #endif /* __GO32__ */ #endif } /* Insert COUNT characters from STRING to the output stream. */ static void insert_some_chars (string, count) char *string; int count; { #ifdef WIN32 winio_insert_some_chars(string, count); #else #if defined(__GO32__) int r, c, w; #if GRX if (egagrph) { grx_insert_some_chars(string, count); }else #endif { ScreenGetCursor(&r, &c); w = ScreenCols(); memcpy(ScreenPrimary+r*w+c+count, ScreenPrimary+r*w+c, w-c-count); /* Print the text. */ output_some_chars (string, count); } #else /* __GO32__ */ /* If IC is defined, then we do not have to "enter" insert mode. */ if (term_IC) { char *tgoto (), *buffer; buffer = tgoto (term_IC, 0, count); tputs (buffer, 1, output_character_function); output_some_chars (string, count); } else { register int i; /* If we have to turn on insert-mode, then do so. */ if (term_im && *term_im) tputs (term_im, 1, output_character_function); /* If there is a special command for inserting characters, then use that first to open up the space. */ if (term_ic && *term_ic) { for (i = count; i--; ) tputs (term_ic, 1, output_character_function); } /* Print the text. */ output_some_chars (string, count); /* If there is a string to turn off insert mode, we had best use it now. */ if (term_ei && *term_ei) tputs (term_ei, 1, output_character_function); } #endif /* __GO32__ */ #endif } /* Move the cursor back. */ backspace (count) int count; { #ifdef WIN32 winio_backspace(count); #else register int i; #ifndef __GO32__ if (term_backspace) for (i = 0; i < count; i++) tputs (term_backspace, 1, output_character_function); else #endif /* !__GO32__ */ #if GRX if (egagrph) { grx_backspace(count); }else #endif { for (i = 0; i < count; i++) putc ('\b', out_stream); } #endif } /* Move to the start of the next line. */ crlf () { #ifdef WIN32 printf("\n"); #else #if defined (NEW_TTY_DRIVER) tputs (term_cr, 1, output_character_function); #endif /* NEW_TTY_DRIVER */ #if GRX if (egagrph) { grx_output_some_chars("\n", 1); }else #endif { putc ('\n', out_stream); } #endif } /* Clear to the end of the line. COUNT is the minimum number of character spaces to clear, */ static void clear_to_eol (count) int count; { #ifdef WIN32 winio_clear_to_eol(); #else #ifndef __GO32__ if (term_clreol) { tputs (term_clreol, 1, output_character_function); } else #endif /* !__GO32__ */ { register int i; /* Do one more character space. */ count++; #if GRX if (egagrph) { grx_clear_to_eol(); }else #endif { for (i = 0; i < count; i++) putc (' ', out_stream); backspace (count); } } #endif } /* **************************************************************** */ /* */ /* Saving and Restoring the TTY */ /* */ /* **************************************************************** */ /* Non-zero means that the terminal is in a prepped state. */ static int terminal_prepped = 0; #if defined (NEW_TTY_DRIVER) /* Standard flags, including ECHO. */ static int original_tty_flags = 0; /* Local mode flags, like LPASS8. */ static int local_mode_flags = 0; /* Terminal characters. This has C-s and C-q in it. */ static struct tchars original_tchars; /* Local special characters. This has the interrupt characters in it. */ #if defined (TIOCGLTC) static struct ltchars original_ltchars; #endif /* We use this to get and set the tty_flags. */ static struct sgttyb the_ttybuff; /* Put the terminal in CBREAK mode so that we can detect key presses. */ static void rl_prep_terminal () { #if !defined(__GO32__) && !defined(WIN32) int tty = fileno (rl_instream); SIGNALS_DECLARE_SAVED (saved_signals); if (terminal_prepped) return; SIGNALS_BLOCK (SIGINT, saved_signals); /* We always get the latest tty values. Maybe stty changed them. */ ioctl (tty, TIOCGETP, &the_ttybuff); original_tty_flags = the_ttybuff.sg_flags; readline_echoing_p = (original_tty_flags & ECHO); #if defined (TIOCLGET) ioctl (tty, TIOCLGET, &local_mode_flags); #endif #if !defined (ANYP) # define ANYP (EVENP | ODDP) #endif /* If this terminal doesn't care how the 8th bit is used, then we can use it for the meta-key. We check by seeing if BOTH odd and even parity are allowed. */ if (the_ttybuff.sg_flags & ANYP) { #if defined (PASS8) the_ttybuff.sg_flags |= PASS8; #endif /* Hack on local mode flags if we can. */ #if defined (TIOCLGET) && defined (LPASS8) { int flags; flags = local_mode_flags | LPASS8; ioctl (tty, TIOCLSET, &flags); } #endif /* TIOCLGET && LPASS8 */ } #if defined (TIOCGETC) { struct tchars temp; ioctl (tty, TIOCGETC, &original_tchars); temp = original_tchars; #if defined (USE_XON_XOFF) /* Get rid of C-s and C-q. We remember the value of startc (C-q) so that if the terminal is in xoff state, the user can xon it by pressing that character. */ xon_char = temp.t_startc; temp.t_stopc = -1; temp.t_startc = -1; /* If there is an XON character, bind it to restart the output. */ if (xon_char != -1) rl_bind_key (xon_char, rl_restart_output); #endif /* USE_XON_XOFF */ /* If there is an EOF char, bind eof_char to it. */ if (temp.t_eofc != -1) eof_char = temp.t_eofc; #if defined (NO_KILL_INTR) /* Get rid of C-\ and C-c. */ temp.t_intrc = temp.t_quitc = -1; #endif /* NO_KILL_INTR */ ioctl (tty, TIOCSETC, &temp); } #endif /* TIOCGETC */ #if defined (TIOCGLTC) { struct ltchars temp; ioctl (tty, TIOCGLTC, &original_ltchars); temp = original_ltchars; /* Make the interrupt keys go away. Just enough to make people happy. */ temp.t_dsuspc = -1; /* C-y */ temp.t_lnextc = -1; /* C-v */ ioctl (tty, TIOCSLTC, &temp); } #endif /* TIOCGLTC */ the_ttybuff.sg_flags &= ~(ECHO | CRMOD); the_ttybuff.sg_flags |= CBREAK; ioctl (tty, TIOCSETN, &the_ttybuff); terminal_prepped = 1; SIGNALS_RESTORE (saved_signals); #endif /* !__GO32__ */ } /* Restore the terminal to its original state. */ static void rl_deprep_terminal () { #if !defined(__GO32s__) && !defined(WIN32) int tty = fileno (rl_instream); SIGNALS_DECLARE_SAVED (saved_signals); if (!terminal_prepped) return; SIGNALS_BLOCK (SIGINT, saved_signals); the_ttybuff.sg_flags = original_tty_flags; ioctl (tty, TIOCSETN, &the_ttybuff); readline_echoing_p = 1; #if defined (TIOCLGET) ioctl (tty, TIOCLSET, &local_mode_flags); #endif #if defined (TIOCSLTC) ioctl (tty, TIOCSLTC, &original_ltchars); #endif #if defined (TIOCSETC) ioctl (tty, TIOCSETC, &original_tchars); #endif terminal_prepped = 0; SIGNALS_RESTORE (saved_signals); #endif /* !__GO32 */ } #else /* !defined (NEW_TTY_DRIVER) */ #if !defined (VMIN) #define VMIN VEOF #endif #if !defined (VTIME) #define VTIME VEOL #endif #if !defined(__GO32__) && !defined(WIN32) #if defined (TERMIOS_TTY_DRIVER) static struct termios otio; #else static struct termio otio; #endif /* !TERMIOS_TTY_DRIVER */ #endif /* __GO32__ */ static void rl_prep_terminal () { #ifdef WIN32 winio_rdln_on(); #endif #if !defined(__GO32__) && !defined(WIN32) int tty = fileno (rl_instream); #if defined (TERMIOS_TTY_DRIVER) struct termios tio; #else struct termio tio; #endif /* !TERMIOS_TTY_DRIVER */ SIGNALS_DECLARE_SAVED (saved_signals); if (terminal_prepped) return; /* Try to keep this function from being INTerrupted. We can do it on POSIX and systems with BSD-like signal handling. */ SIGNALS_BLOCK (SIGINT, saved_signals); #if defined (TERMIOS_TTY_DRIVER) tcgetattr (tty, &tio); #else ioctl (tty, TCGETA, &tio); #endif /* !TERMIOS_TTY_DRIVER */ otio = tio; readline_echoing_p = (tio.c_lflag & ECHO); tio.c_lflag &= ~(ICANON|ECHO); if (otio.c_cc[VEOF] != _POSIX_VDISABLE) eof_char = otio.c_cc[VEOF]; #if defined (USE_XON_XOFF) #if defined (IXANY) tio.c_iflag &= ~(IXON|IXOFF|IXANY); #else /* `strict' Posix systems do not define IXANY. */ tio.c_iflag &= ~(IXON|IXOFF); #endif /* IXANY */ #endif /* USE_XON_XOFF */ /* Only turn this off if we are using all 8 bits. */ /* |ISTRIP|INPCK */ tio.c_iflag &= ~(ISTRIP | INPCK); /* Make sure we differentiate between CR and NL on input. */ tio.c_iflag &= ~(ICRNL | INLCR); #if !defined (HANDLE_SIGNALS) tio.c_lflag &= ~ISIG; #else tio.c_lflag |= ISIG; #endif tio.c_cc[VMIN] = 1; tio.c_cc[VTIME] = 0; /* Turn off characters that we need on Posix systems with job control, just to be sure. This includes ^Y and ^V. This should not really be necessary. */ #if defined (TERMIOS_TTY_DRIVER) && defined (_POSIX_JOB_CONTROL) #if defined (VLNEXT) tio.c_cc[VLNEXT] = _POSIX_VDISABLE; #endif #if defined (VDSUSP) tio.c_cc[VDSUSP] = _POSIX_VDISABLE; #endif #endif /* POSIX && JOB_CONTROL */ #if defined (TERMIOS_TTY_DRIVER) tcsetattr (tty, TCSADRAIN, &tio); tcflow (tty, TCOON); /* Simulate a ^Q. */ #else ioctl (tty, TCSETAW, &tio); ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ #endif /* !TERMIOS_TTY_DRIVER */ terminal_prepped = 1; SIGNALS_RESTORE (saved_signals); #endif /* !__GO32__ */ } static void rl_deprep_terminal () { #ifdef WIN32 winio_rdln_off(); #endif #if !defined(__GO32__) && !defined(WIN32) int tty = fileno (rl_instream); /* Try to keep this function from being INTerrupted. We can do it on POSIX and systems with BSD-like signal handling. */ SIGNALS_DECLARE_SAVED (saved_signals); if (!terminal_prepped) return; SIGNALS_BLOCK (SIGINT, saved_signals); #if defined (TERMIOS_TTY_DRIVER) tcsetattr (tty, TCSADRAIN, &otio); tcflow (tty, TCOON); /* Simulate a ^Q. */ #else /* TERMIOS_TTY_DRIVER */ ioctl (tty, TCSETAW, &otio); ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ #endif /* !TERMIOS_TTY_DRIVER */ terminal_prepped = 0; SIGNALS_RESTORE (saved_signals); #endif /* !__GO32__ */ } #endif /* NEW_TTY_DRIVER */ /* **************************************************************** */ /* */ /* Utility Functions */ /* */ /* **************************************************************** */ /* Return 0 if C is not a member of the class of characters that belong in words, or 1 if it is. */ int allow_pathname_alphabetic_chars = 0; char *pathname_alphabetic_chars = "/-_=~.#$"; int alphabetic (c) int c; { if (pure_alphabetic (c) || (numeric (c))) return (1); if (allow_pathname_alphabetic_chars) return ((int)rindex (pathname_alphabetic_chars, c)); else return (0); } /* Return non-zero if C is a numeric character. */ int numeric (c) int c; { return (c >= '0' && c <= '9'); } /* Ring the terminal bell. */ int ding () { #ifdef WIN32 printf("\007"); #else if (readline_echoing_p) { #ifndef __GO32__ if (prefer_visible_bell && visible_bell) tputs (visible_bell, 1, output_character_function); else #endif /* !__GO32__ */ { fprintf (stderr, "\007"); fflush (stderr); } } #endif return (-1); } /* How to abort things. */ rl_abort () { ding (); rl_clear_message (); rl_init_argument (); rl_pending_input = 0; defining_kbd_macro = 0; while (executing_macro) pop_executing_macro (); rl_last_func = (Function *)NULL; longjmp (readline_top_level, 1); } /* Return a copy of the string between FROM and TO. FROM is inclusive, TO is not. */ #if defined (sun) /* Yes, that's right, some crufty function in sunview is called rl_copy (). */ static #endif char * rl_copy (from, to) int from, to; { register int length; char *copy; /* Fix it if the caller is confused. */ if (from > to) { int t = from; from = to; to = t; } length = to - from; copy = (char *)xmalloc (1 + length); strncpy (copy, the_line + from, length); copy[length] = '\0'; return (copy); } /* Increase the size of RL_LINE_BUFFER until it has enough space to hold LEN characters. */ void rl_extend_line_buffer (len) int len; { while (len >= rl_line_buffer_len) rl_line_buffer = (char *)xrealloc (rl_line_buffer, rl_line_buffer_len += DEFAULT_BUFFER_SIZE); the_line = rl_line_buffer; } /* **************************************************************** */ /* */ /* Insert and Delete */ /* */ /* **************************************************************** */ /* Insert a string of text into the line at point. This is the only way that you should do insertion. rl_insert () calls this function. */ rl_insert_text (string) char *string; { extern int doing_an_undo; register int i, l = strlen (string); if (rl_end + l >= rl_line_buffer_len) rl_extend_line_buffer (rl_end + l); for (i = rl_end; i >= rl_point; i--) the_line[i + l] = the_line[i]; strncpy (the_line + rl_point, string, l); /* Remember how to undo this if we aren't undoing something. */ if (!doing_an_undo) { /* If possible and desirable, concatenate the undos. */ if ((strlen (string) == 1) && rl_undo_list && (rl_undo_list->what == UNDO_INSERT) && (rl_undo_list->end == rl_point) && (rl_undo_list->end - rl_undo_list->start < 20)) rl_undo_list->end++; else rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); } rl_point += l; rl_end += l; the_line[rl_end] = '\0'; } /* Delete the string between FROM and TO. FROM is inclusive, TO is not. */ rl_delete_text (from, to) int from, to; { extern int doing_an_undo; register char *text; /* Fix it if the caller is confused. */ if (from > to) { int t = from; from = to; to = t; } text = rl_copy (from, to); strncpy (the_line + from, the_line + to, rl_end - to); /* Remember how to undo this delete. */ if (!doing_an_undo) rl_add_undo (UNDO_DELETE, from, to, text); else free (text); rl_end -= (to - from); the_line[rl_end] = '\0'; } /* **************************************************************** */ /* */ /* Readline character functions */ /* */ /* **************************************************************** */ /* This is not a gap editor, just a stupid line input routine. No hair is involved in writing any of the functions, and none should be. */ /* Note that: rl_end is the place in the string that we would place '\0'; i.e., it is always safe to place '\0' there. rl_point is the place in the string where the cursor is. Sometimes this is the same as rl_end. Any command that is called interactively receives two arguments. The first is a count: the numeric arg pased to this command. The second is the key which invoked this command. */ /* **************************************************************** */ /* */ /* Movement Commands */ /* */ /* **************************************************************** */ /* Note that if you `optimize' the display for these functions, you cannot use said functions in other functions which do not do optimizing display. I.e., you will have to update the data base for rl_redisplay, and you might as well let rl_redisplay do that job. */ /* Move forward COUNT characters. */ rl_forward (count) int count; { if (count < 0) rl_backward (-count); else while (count) { #if defined (VI_MODE) if (rl_point == (rl_end - (rl_editing_mode == vi_mode))) #else if (rl_point == rl_end) #endif /* VI_MODE */ { ding (); return; } else rl_point++; --count; } } /* Move backward COUNT characters. */ rl_backward (count) int count; { if (count < 0) rl_forward (-count); else while (count) { if (!rl_point) { ding (); return; } else --rl_point; --count; } } /* Move to the beginning of the line. */ rl_beg_of_line () { rl_point = 0; } /* Move to the end of the line. */ rl_end_of_line () { rl_point = rl_end; } /* Move forward a word. We do what Emacs does. */ rl_forward_word (count) int count; { int c; if (count < 0) { rl_backward_word (-count); return; } while (count) { if (rl_point == rl_end) return; /* If we are not in a word, move forward until we are in one. Then, move forward until we hit a non-alphabetic character. */ c = the_line[rl_point]; if (!alphabetic (c)) { while (++rl_point < rl_end) { c = the_line[rl_point]; if (alphabetic (c)) break; } } if (rl_point == rl_end) return; while (++rl_point < rl_end) { c = the_line[rl_point]; if (!alphabetic (c)) break; } --count; } } /* Move backward a word. We do what Emacs does. */ rl_backward_word (count) int count; { int c; if (count < 0) { rl_forward_word (-count); return; } while (count) { if (!rl_point) return; /* Like rl_forward_word (), except that we look at the characters just before point. */ c = the_line[rl_point - 1]; if (!alphabetic (c)) { while (--rl_point) { c = the_line[rl_point - 1]; if (alphabetic (c)) break; } } while (rl_point) { c = the_line[rl_point - 1]; if (!alphabetic (c)) break; else --rl_point; } --count; } } /* Clear the current line. Numeric argument to C-l does this. */ rl_refresh_line () { #ifdef WIN32 printf("implement rl_refresh_line\n"); #else int curr_line = last_c_pos / screenwidth; extern char *term_clreol; move_vert(curr_line); move_cursor_relative (0, the_line); /* XXX is this right */ #if defined(__GO32__) { int r, c, w; ScreenGetCursor(&r, &c); w = ScreenCols(); memset(ScreenPrimary+r*w+c, 0, (w-c)*2); } #else /* __GO32__ */ if (term_clreol) tputs (term_clreol, 1, output_character_function); #endif /* __GO32__/else */ rl_forced_update_display (); rl_display_fixed = 1; #endif } /* C-l typed to a line without quoting clears the screen, and then reprints the prompt and the current input line. Given a numeric arg, redraw only the current line. */ rl_clear_screen () { #ifdef WIN32 printf("implement rl_clear_screen\n"); #else extern char *term_clrpag; if (rl_explicit_arg) { rl_refresh_line (); return; } #ifndef __GO32__ if (term_clrpag) tputs (term_clrpag, 1, output_character_function); else #endif /* !__GO32__ */ crlf (); rl_forced_update_display (); rl_display_fixed = 1; #endif } rl_arrow_keys (count, c) int count, c; { int ch; ch = rl_read_key (); switch (to_upper (ch)) { case 'A': rl_get_previous_history (count); break; case 'B': rl_get_next_history (count); break; case 'C': rl_forward (count); break; case 'D': rl_backward (count); break; default: ding (); } } /* **************************************************************** */ /* */ /* Text commands */ /* */ /* **************************************************************** */ /* Insert the character C at the current location, moving point forward. */ rl_insert (count, c) int count, c; { register int i; char *string; #ifdef WIN32 char dummy[5]; dummy[0] = 0; #endif if (count <= 0) return; /* If we can optimize, then do it. But don't let people crash readline because of extra large arguments. */ if (count > 1 && count < 1024) { string = (char *)alloca (1 + count); for (i = 0; i < count; i++) string[i] = c; string[i] = '\0'; rl_insert_text (string); return; } if (count > 1024) { int decreaser; string = (char *)alloca (1024 + 1); for (i = 0; i < 1024; i++) string[i] = c; while (count) { decreaser = (count > 1024 ? 1024 : count); string[decreaser] = '\0'; rl_insert_text (string); count -= decreaser; } return; } /* We are inserting a single character. If there is pending input, then make a string of all of the pending characters that are bound to rl_insert, and insert them all. */ if (any_typein) { int key = 0, t; i = 0; string = (char *)alloca (ibuffer_len + 1); string[i++] = c; while ((t = rl_get_char (&key)) && (keymap[key].type == ISFUNC && keymap[key].function == rl_insert)) string[i++] = key; if (t) rl_unget_char (key); string[i] = '\0'; rl_insert_text (string); return; } else { /* Inserting a single character. */ string = (char*)alloca (2); string[1] = '\0'; string[0] = c; rl_insert_text (string); } } /* Insert the next typed character verbatim. */ rl_quoted_insert (count) int count; { int c = rl_read_key (); rl_insert (count, c); } /* Insert a tab character. */ rl_tab_insert (count) int count; { rl_insert (count, '\t'); } /* What to do when a NEWLINE is pressed. We accept the whole line. KEY is the key that invoked this command. I guess it could have meaning in the future. */ rl_newline (count, key) int count, key; { rl_done = 1; #if defined (VI_MODE) { extern int vi_doing_insert; if (vi_doing_insert) { rl_end_undo_group (); vi_doing_insert = 0; } } #endif /* VI_MODE */ if (readline_echoing_p) { move_vert (vis_botlin); vis_botlin = 0; crlf (); #ifndef WIN32 fflush (out_stream); #endif rl_display_fixed++; } } rl_clean_up_for_exit () { if (readline_echoing_p) { move_vert (vis_botlin); vis_botlin = 0; fflush (out_stream); rl_restart_output (); } } /* What to do for some uppercase characters, like meta characters, and some characters appearing in emacs_ctlx_keymap. This function is just a stub, you bind keys to it and the code in rl_dispatch () is special cased. */ rl_do_lowercase_version (ignore1, ignore2) int ignore1, ignore2; { } /* Rubout the character behind point. */ rl_rubout (count) int count; { if (count < 0) { rl_delete (-count); return; } if (!rl_point) { ding (); return; } if (count > 1) { int orig_point = rl_point; rl_backward (count); rl_kill_text (orig_point, rl_point); } else { int c = the_line[--rl_point]; rl_delete_text (rl_point, rl_point + 1); if (rl_point == rl_end && alphabetic (c) && last_c_pos) { backspace (1); #ifndef WIN32 #if GRX if (egagrph) { grx_output_some_chars(" ", 1); }else #endif { putc (' ', out_stream); } backspace (1); #endif last_c_pos--; visible_line[last_c_pos] = '\0'; rl_display_fixed++; } } } /* Delete the character under the cursor. Given a numeric argument, kill that many characters instead. */ rl_delete (count, invoking_key) int count, invoking_key; { if (count < 0) { rl_rubout (-count); return; } if (rl_point == rl_end) { ding (); return; } if (count > 1) { int orig_point = rl_point; rl_forward (count); rl_kill_text (orig_point, rl_point); rl_point = orig_point; } else rl_delete_text (rl_point, rl_point + 1); } /* **************************************************************** */ /* */ /* Kill commands */ /* */ /* **************************************************************** */ /* The next two functions mimic unix line editing behaviour, except they save the deleted text on the kill ring. This is safer than not saving it, and since we have a ring, nobody should get screwed. */ /* This does what C-w does in Unix. We can't prevent people from using behaviour that they expect. */ rl_unix_word_rubout () { if (!rl_point) ding (); else { int orig_point = rl_point; while (rl_point && whitespace (the_line[rl_point - 1])) rl_point--; while (rl_point && !whitespace (the_line[rl_point - 1])) rl_point--; rl_kill_text (rl_point, orig_point); } } /* Here is C-u doing what Unix does. You don't *have* to use these key-bindings. We have a choice of killing the entire line, or killing from where we are to the start of the line. We choose the latter, because if you are a Unix weenie, then you haven't backspaced into the line at all, and if you aren't, then you know what you are doing. */ rl_unix_line_discard () { if (!rl_point) ding (); else { rl_kill_text (rl_point, 0); rl_point = 0; } } /* **************************************************************** */ /* */ /* Commands For Typos */ /* */ /* **************************************************************** */ /* Random and interesting things in here. */ /* **************************************************************** */ /* */ /* Changing Case */ /* */ /* **************************************************************** */ /* The three kinds of things that we know how to do. */ #define UpCase 1 #define DownCase 2 #define CapCase 3 /* Uppercase the word at point. */ rl_upcase_word (count) int count; { rl_change_case (count, UpCase); } /* Lowercase the word at point. */ rl_downcase_word (count) int count; { rl_change_case (count, DownCase); } /* Upcase the first letter, downcase the rest. */ rl_capitalize_word (count) int count; { rl_change_case (count, CapCase); } /* The meaty function. Change the case of COUNT words, performing OP on them. OP is one of UpCase, DownCase, or CapCase. If a negative argument is given, leave point where it started, otherwise, leave it where it moves to. */ rl_change_case (count, op) int count, op; { register int start = rl_point, end; int state = 0; rl_forward_word (count); end = rl_point; if (count < 0) { int temp = start; start = end; end = temp; } /* We are going to modify some text, so let's prepare to undo it. */ rl_modifying (start, end); for (; start < end; start++) { switch (op) { case UpCase: the_line[start] = to_upper (the_line[start]); break; case DownCase: the_line[start] = to_lower (the_line[start]); break; case CapCase: if (state == 0) { the_line[start] = to_upper (the_line[start]); state = 1; } else { the_line[start] = to_lower (the_line[start]); } if (!pure_alphabetic (the_line[start])) state = 0; break; default: abort (); } } rl_point = end; } /* **************************************************************** */ /* */ /* Transposition */ /* */ /* **************************************************************** */ /* Transpose the words at point. */ rl_transpose_words (count) int count; { char *word1, *word2; int w1_beg, w1_end, w2_beg, w2_end; int orig_point = rl_point; if (!count) return; /* Find the two words. */ rl_forward_word (count); w2_end = rl_point; rl_backward_word (1); w2_beg = rl_point; rl_backward_word (count); w1_beg = rl_point; rl_forward_word (1); w1_end = rl_point; /* Do some check to make sure that there really are two words. */ if ((w1_beg == w2_beg) || (w2_beg < w1_end)) { ding (); rl_point = orig_point; return; } /* Get the text of the words. */ word1 = rl_copy (w1_beg, w1_end); word2 = rl_copy (w2_beg, w2_end); /* We are about to do many insertions and deletions. Remember them as one operation. */ rl_begin_undo_group (); /* Do the stuff at word2 first, so that we don't have to worry about word1 moving. */ rl_point = w2_beg; rl_delete_text (w2_beg, w2_end); rl_insert_text (word1); rl_point = w1_beg; rl_delete_text (w1_beg, w1_end); rl_insert_text (word2); /* This is exactly correct since the text before this point has not changed in length. */ rl_point = w2_end; /* I think that does it. */ rl_end_undo_group (); free (word1); free (word2); } /* Transpose the characters at point. If point is at the end of the line, then transpose the characters before point. */ rl_transpose_chars (count) int count; { if (!count) return; if (!rl_point || rl_end < 2) { ding (); return; } while (count) { if (rl_point == rl_end) { int t = the_line[rl_point - 1]; the_line[rl_point - 1] = the_line[rl_point - 2]; the_line[rl_point - 2] = t; } else { int t = the_line[rl_point]; the_line[rl_point] = the_line[rl_point - 1]; the_line[rl_point - 1] = t; if (count < 0 && rl_point) rl_point--; else rl_point++; } if (count < 0) count++; else count--; } } /* **************************************************************** */ /* */ /* Bogus Flow Control */ /* */ /* **************************************************************** */ rl_restart_output (count, key) int count, key; { int fildes = fileno (rl_outstream); #if defined (TIOCSTART) #if defined (apollo) ioctl (&fildes, TIOCSTART, 0); #else ioctl (fildes, TIOCSTART, 0); #endif /* apollo */ #else # if defined (TERMIOS_TTY_DRIVER) tcflow (fildes, TCOON); # else # if defined (TCXONC) ioctl (fildes, TCXONC, TCOON); # endif /* TCXONC */ # endif /* !TERMIOS_TTY_DRIVER */ #endif /* TIOCSTART */ } rl_stop_output (count, key) int count, key; { int fildes = fileno (rl_instream); #if defined (TIOCSTOP) # if defined (apollo) ioctl (&fildes, TIOCSTOP, 0); # else ioctl (fildes, TIOCSTOP, 0); # endif /* apollo */ #else # if defined (TERMIOS_TTY_DRIVER) tcflow (fildes, TCOOFF); # else # if defined (TCXONC) ioctl (fildes, TCXONC, TCOON); # endif /* TCXONC */ # endif /* !TERMIOS_TTY_DRIVER */ #endif /* TIOCSTOP */ } /* **************************************************************** */ /* */ /* Completion matching, from readline's point of view. */ /* */ /* **************************************************************** */ /* Pointer to the generator function for completion_matches (). NULL means to use filename_entry_function (), the default filename completer. */ Function *rl_completion_entry_function = (Function *)NULL; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. START and END are indices in RL_LINE_BUFFER saying what the boundaries of TEXT are. If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ Function *rl_attempted_completion_function = (Function *)NULL; /* Local variable states what happened during the last completion attempt. */ static int completion_changed_buffer = 0; /* Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see completion_matches ()). The default is to do filename completion. */ rl_complete (ignore, invoking_key) int ignore, invoking_key; { if (rl_last_func == rl_complete && !completion_changed_buffer) rl_complete_internal ('?'); else rl_complete_internal (TAB); } /* List the possible completions. See description of rl_complete (). */ rl_possible_completions () { rl_complete_internal ('?'); } /* The user must press "y" or "n". Non-zero return means "y" pressed. */ get_y_or_n () { int c; loop: c = rl_read_key (); if (c == 'y' || c == 'Y') return (1); if (c == 'n' || c == 'N') return (0); if (c == ABORT_CHAR) rl_abort (); ding (); goto loop; } /* Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. */ int rl_completion_query_items = 100; /* The basic list of characters that signal a break between words for the completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ char *rl_completer_word_break_characters = (char *)NULL; /* The list of characters which are used to quote a substring of the command line. Command completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ char *rl_completer_quote_characters = (char *)NULL; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ char *rl_special_prefixes = (char *)NULL; /* If non-zero, then disallow duplicates in the matches. */ int rl_ignore_completion_duplicates = 1; /* Non-zero means that the results of the matches are to be treated as filenames. This is ALWAYS zero on entry, and can only be changed within a completion entry finder function. */ int rl_filename_completion_desired = 0; /* This function, if defined, is called by the completer when real filename completion is done, after all the matching names have been generated. It is passed a (char**) known as matches in the code below. It consists of a NULL-terminated array of pointers to potential matching strings. The 1st element (matches[0]) is the maximal substring that is common to all matches. This function can re-arrange the list of matches as required, but all elements of the array must be free()'d if they are deleted. The main intent of this function is to implement FIGNORE a la SunOS csh. */ Function *rl_ignore_some_completions_function = (Function *)NULL; /* Complete the word at or before point. WHAT_TO_DO says what to do with the completion. `?' means list the possible completions. TAB means do standard completion. `*' means insert all of the possible completions. */ rl_complete_internal (what_to_do) int what_to_do; { char *filename_completion_function (); char **completion_matches (), **matches; Function *our_func; int start, scan, end, delimiter = 0; char *text, *saved_line_buffer; char quote_char = '\0'; char *replacement; if (the_line) saved_line_buffer = savestring (the_line); else saved_line_buffer = (char *)NULL; if (rl_completion_entry_function) our_func = rl_completion_entry_function; else our_func = (int (*)())filename_completion_function; /* Only the completion entry function can change this. */ rl_filename_completion_desired = 0; /* We now look backwards for the start of a filename/variable word. */ end = rl_point; if (rl_point) { if (rl_completer_quote_characters) { /* We have a list of characters which can be used in pairs to quote substrings for completion. Try to find the start of an unclosed quoted substring. FIXME: Doesn't yet handle '\' escapes to hid embedded quotes */ for (scan = 0; scan < end; scan++) { if (quote_char != '\0') { /* Ignore everything until the matching close quote char */ if (the_line[scan] == quote_char) { /* Found matching close quote. Abandon this substring. */ quote_char = '\0'; rl_point = end; } } else if (rindex (rl_completer_quote_characters, the_line[scan])) { /* Found start of a quoted substring. */ quote_char = the_line[scan]; rl_point = scan + 1; } } } if (rl_point == end) { /* We didn't find an unclosed quoted substring upon which to do completion, so use the word break characters to find the substring on which to do completion. */ while (--rl_point && !rindex (rl_completer_word_break_characters, the_line[rl_point])) {;} } /* If we are at a word break, then advance past it. */ if (rindex (rl_completer_word_break_characters, the_line[rl_point])) { /* If the character that caused the word break was a quoting character, then remember it as the delimiter. */ if (rindex ("\"'", the_line[rl_point]) && (end - rl_point) > 1) delimiter = the_line[rl_point]; /* If the character isn't needed to determine something special about what kind of completion to perform, then advance past it. */ if (!rl_special_prefixes || !rindex (rl_special_prefixes, the_line[rl_point])) rl_point++; } } start = rl_point; rl_point = end; text = rl_copy (start, end); /* If the user wants to TRY to complete, but then wants to give up and use the default completion function, they set the variable rl_attempted_completion_function. */ if (rl_attempted_completion_function) { matches = (char **)(*rl_attempted_completion_function) (text, start, end); if (matches) { our_func = (Function *)NULL; goto after_usual_completion; } } matches = completion_matches (text, our_func); after_usual_completion: free (text); if (!matches) ding (); else { register int i; some_matches: /* It seems to me that in all the cases we handle we would like to ignore duplicate possibilities. Scan for the text to insert being identical to the other completions. */ if (rl_ignore_completion_duplicates) { char *lowest_common; int j, newlen = 0; /* Sort the items. */ /* It is safe to sort this array, because the lowest common denominator found in matches[0] will remain in place. */ for (i = 0; matches[i]; i++); qsort (matches, i, sizeof (char *), compare_strings); /* Remember the lowest common denominator for it may be unique. */ lowest_common = savestring (matches[0]); for (i = 0; matches[i + 1]; i++) { if (strcmp (matches[i], matches[i + 1]) == 0) { free (matches[i]); matches[i] = (char *)-1; } else newlen++; } /* We have marked all the dead slots with (char *)-1. Copy all the non-dead entries into a new array. */ { char **temp_array = (char **)malloc ((3 + newlen) * sizeof (char *)); for (i = 1, j = 1; matches[i]; i++) { if (matches[i] != (char *)-1) temp_array[j++] = matches[i]; } temp_array[j] = (char *)NULL; if (matches[0] != (char *)-1) free (matches[0]); free (matches); matches = temp_array; } /* Place the lowest common denominator back in [0]. */ matches[0] = lowest_common; /* If there is one string left, and it is identical to the lowest common denominator, then the LCD is the string to insert. */ if (j == 2 && strcmp (matches[0], matches[1]) == 0) { free (matches[1]); matches[1] = (char *)NULL; } } switch (what_to_do) { case TAB: /* If we are matching filenames, then here is our chance to do clever processing by re-examining the list. Call the ignore function with the array as a parameter. It can munge the array, deleting matches as it desires. */ if (rl_ignore_some_completions_function && our_func == (int (*)())filename_completion_function) (void)(*rl_ignore_some_completions_function)(matches); /* If we are doing completions on quoted substrings, and any matches contain any of the completer word break characters, then auto- matically prepend the substring with a quote character (just pick the first one from the list of such) if it does not already begin with a quote string. FIXME: Need to remove any such automatically inserted quote character when it no longer is necessary, such as if we change the string we are completing on and the new set of matches don't require a quoted substring? */ replacement = matches[0]; if (matches[0] != NULL && rl_completer_quote_characters != NULL && (quote_char == '\0')) { for (i = 1; matches[i] != NULL; i++) { if (strpbrk (matches[i], rl_completer_word_break_characters)) { /* Found an embedded word break character in a potential match, so need to prepend a quote character if we are replacing the completion string. */ replacement = (char *)alloca (strlen (matches[0]) + 2); quote_char = *rl_completer_quote_characters; *replacement = quote_char; strcpy (replacement + 1, matches[0]); break; } } } if (replacement) { rl_delete_text (start, rl_point); rl_point = start; rl_insert_text (replacement); } /* If there are more matches, ring the bell to indicate. If this was the only match, and we are hacking files, check the file to see if it was a directory. If so, add a '/' to the name. If not, and we are at the end of the line, then add a space. */ if (matches[1]) { ding (); /* There are other matches remaining. */ } else { char temp_string[16]; int temp_index = 0; if (quote_char) { temp_string[temp_index++] = quote_char; } temp_string[temp_index++] = delimiter ? delimiter : ' '; temp_string[temp_index++] = '\0'; if (rl_filename_completion_desired) { struct stat finfo; char *filename = tilde_expand (matches[0]); if ((stat (filename, &finfo) == 0) && S_ISDIR (finfo.st_mode)) { if (the_line[rl_point] != '/') rl_insert_text ("/"); } else { if (rl_point == rl_end) rl_insert_text (temp_string); } free (filename); } else { if (rl_point == rl_end) rl_insert_text (temp_string); } } break; case '*': { int i = 1; rl_delete_text (start, rl_point); rl_point = start; rl_begin_undo_group (); if (matches[1]) { while (matches[i]) { rl_insert_text (matches[i++]); rl_insert_text (" "); } } else { rl_insert_text (matches[0]); rl_insert_text (" "); } rl_end_undo_group (); } break; case '?': { int len, count, limit, max = 0; int j, k, l; /* Handle simple case first. What if there is only one answer? */ if (!matches[1]) { char *temp; if (rl_filename_completion_desired) temp = rindex (matches[0], '/'); else temp = (char *)NULL; if (!temp) temp = matches[0]; else temp++; crlf (); fprintf (out_stream, "%s", temp); crlf (); goto restart; } /* There is more than one answer. Find out how many there are, and find out what the maximum printed length of a single entry is. */ for (i = 1; matches[i]; i++) { char *temp = (char *)NULL; /* If we are hacking filenames, then only count the characters after the last slash in the pathname. */ if (rl_filename_completion_desired) temp = rindex (matches[i], '/'); else temp = (char *)NULL; if (!temp) temp = matches[i]; else temp++; if (strlen (temp) > max) max = strlen (temp); } len = i; /* If there are many items, then ask the user if she really wants to see them all. */ if (len >= rl_completion_query_items) { crlf (); fprintf (out_stream, "There are %d possibilities. Do you really", len); crlf (); fprintf (out_stream, "wish to see them all? (y or n)"); fflush (out_stream); if (!get_y_or_n ()) { crlf (); goto restart; } } /* How many items of MAX length can we fit in the screen window? */ max += 2; limit = screenwidth / max; if (limit != 1 && (limit * max == screenwidth)) limit--; /* Avoid a possible floating exception. If max > screenwidth, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) limit = 1; /* How many iterations of the printing loop? */ count = (len + (limit - 1)) / limit; /* Watch out for special case. If LEN is less than LIMIT, then just do the inner printing loop. */ if (len < limit) count = 1; /* Sort the items if they are not already sorted. */ if (!rl_ignore_completion_duplicates) qsort (matches, len, sizeof (char *), compare_strings); /* Print the sorted items, up-and-down alphabetically, like ls might. */ crlf (); for (i = 1; i < count + 1; i++) { for (j = 0, l = i; j < limit; j++) { if (l > len || !matches[l]) { break; } else { char *temp = (char *)NULL; if (rl_filename_completion_desired) temp = rindex (matches[l], '/'); else temp = (char *)NULL; if (!temp) temp = matches[l]; else temp++; fprintf (out_stream, "%s", temp); for (k = 0; k < max - strlen (temp); k++) putc (' ', out_stream); } l += count; } crlf (); } restart: rl_on_new_line (); } break; default: abort (); } for (i = 0; matches[i]; i++) free (matches[i]); free (matches); } /* Check to see if the line has changed through all of this manipulation. */ if (saved_line_buffer) { if (strcmp (the_line, saved_line_buffer) != 0) completion_changed_buffer = 1; else completion_changed_buffer = 0; free (saved_line_buffer); } } /* Stupid comparison routine for qsort () ing strings. */ static int compare_strings (s1, s2) char **s1, **s2; { return (strcmp (*s1, *s2)); } /* A completion function for usernames. TEXT contains a partial username preceded by a random character (usually `~'). */ char * username_completion_function (text, state) int state; char *text; { #if defined(__GO32__) || defined(WIN32) return (char *)NULL; #else /* !__GO32__ */ static char *username = (char *)NULL; static struct passwd *entry; static int namelen, first_char, first_char_loc; if (!state) { if (username) free (username); first_char = *text; if (first_char == '~') first_char_loc = 1; else first_char_loc = 0; username = savestring (&text[first_char_loc]); namelen = strlen (username); setpwent (); } while (entry = getpwent ()) { if (strncmp (username, entry->pw_name, namelen) == 0) break; } if (!entry) { endpwent (); return ((char *)NULL); } else { char *value = (char *)xmalloc (2 + strlen (entry->pw_name)); *value = *text; strcpy (value + first_char_loc, entry->pw_name); if (first_char == '~') rl_filename_completion_desired = 1; return (value); } #endif /* !__GO32__ */ } /* **************************************************************** */ /* */ /* Undo, and Undoing */ /* */ /* **************************************************************** */ /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ int doing_an_undo = 0; /* The current undo list for THE_LINE. */ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; /* Remember how to undo something. Concatenate some undos if that seems right. */ rl_add_undo (what, start, end, text) enum undo_code what; int start, end; char *text; { UNDO_LIST *temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST)); temp->what = what; temp->start = start; temp->end = end; temp->text = text; temp->next = rl_undo_list; rl_undo_list = temp; } /* Free the existing undo list. */ free_undo_list () { while (rl_undo_list) { UNDO_LIST *release = rl_undo_list; rl_undo_list = rl_undo_list->next; if (release->what == UNDO_DELETE) free (release->text); free (release); } } /* Undo the next thing in the list. Return 0 if there is nothing to undo, or non-zero if there was. */ int rl_do_undo () { UNDO_LIST *release; int waiting_for_begin = 0; undo_thing: if (!rl_undo_list) return (0); doing_an_undo = 1; switch (rl_undo_list->what) { /* Undoing deletes means inserting some text. */ case UNDO_DELETE: rl_point = rl_undo_list->start; rl_insert_text (rl_undo_list->text); free (rl_undo_list->text); break; /* Undoing inserts means deleting some text. */ case UNDO_INSERT: rl_delete_text (rl_undo_list->start, rl_undo_list->end); rl_point = rl_undo_list->start; break; /* Undoing an END means undoing everything 'til we get to a BEGIN. */ case UNDO_END: waiting_for_begin++; break; /* Undoing a BEGIN means that we are done with this group. */ case UNDO_BEGIN: if (waiting_for_begin) waiting_for_begin--; else abort (); break; } doing_an_undo = 0; release = rl_undo_list; rl_undo_list = rl_undo_list->next; free (release); if (waiting_for_begin) goto undo_thing; return (1); } /* Begin a group. Subsequent undos are undone as an atomic operation. */ rl_begin_undo_group () { rl_add_undo (UNDO_BEGIN, 0, 0, 0); } /* End an undo group started with rl_begin_undo_group (). */ rl_end_undo_group () { rl_add_undo (UNDO_END, 0, 0, 0); } /* Save an undo entry for the text from START to END. */ rl_modifying (start, end) int start, end; { if (start > end) { int t = start; start = end; end = t; } if (start != end) { char *temp = rl_copy (start, end); rl_begin_undo_group (); rl_add_undo (UNDO_DELETE, start, end, temp); rl_add_undo (UNDO_INSERT, start, end, (char *)NULL); rl_end_undo_group (); } } /* Revert the current line to its previous state. */ rl_revert_line () { if (!rl_undo_list) ding (); else { while (rl_undo_list) rl_do_undo (); } } /* Do some undoing of things that were done. */ rl_undo_command (count) { if (count < 0) return; /* Nothing to do. */ while (count) { if (rl_do_undo ()) { count--; } else { ding (); break; } } } /* **************************************************************** */ /* */ /* History Utilities */ /* */ /* **************************************************************** */ /* We already have a history library, and that is what we use to control the history features of readline. However, this is our local interface to the history mechanism. */ /* While we are editing the history, this is the saved version of the original line. */ HIST_ENTRY *saved_line_for_history = (HIST_ENTRY *)NULL; /* Set the history pointer back to the last entry in the history. */ start_using_history () { using_history (); if (saved_line_for_history) free_history_entry (saved_line_for_history); saved_line_for_history = (HIST_ENTRY *)NULL; } /* Free the contents (and containing structure) of a HIST_ENTRY. */ free_history_entry (entry) HIST_ENTRY *entry; { if (!entry) return; if (entry->line) free (entry->line); free (entry); } /* Perhaps put back the current line if it has changed. */ maybe_replace_line () { HIST_ENTRY *temp = current_history (); /* If the current line has changed, save the changes. */ if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) { temp = replace_history_entry (where_history (), the_line, rl_undo_list); free (temp->line); free (temp); } } /* Put back the saved_line_for_history if there is one. */ maybe_unsave_line () { if (saved_line_for_history) { int line_len; line_len = strlen (saved_line_for_history->line); if (line_len >= rl_line_buffer_len) rl_extend_line_buffer (line_len); strcpy (the_line, saved_line_for_history->line); rl_undo_list = (UNDO_LIST *)saved_line_for_history->data; free_history_entry (saved_line_for_history); saved_line_for_history = (HIST_ENTRY *)NULL; rl_end = rl_point = strlen (the_line); } else ding (); } /* Save the current line in saved_line_for_history. */ maybe_save_line () { if (!saved_line_for_history) { saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); saved_line_for_history->line = savestring (the_line); saved_line_for_history->data = (char *)rl_undo_list; } } /* **************************************************************** */ /* */ /* History Commands */ /* */ /* **************************************************************** */ /* Meta-< goes to the start of the history. */ rl_beginning_of_history () { rl_get_previous_history (1 + where_history ()); } /* Meta-> goes to the end of the history. (The current line). */ rl_end_of_history () { maybe_replace_line (); using_history (); maybe_unsave_line (); } /* Move down to the next history line. */ rl_get_next_history (count) int count; { HIST_ENTRY *temp = (HIST_ENTRY *)NULL; if (count < 0) { rl_get_previous_history (-count); return; } if (!count) return; maybe_replace_line (); while (count) { temp = next_history (); if (!temp) break; --count; } if (!temp) maybe_unsave_line (); else { int line_len; line_len = strlen (temp->line); if (line_len >= rl_line_buffer_len) rl_extend_line_buffer (line_len); strcpy (the_line, temp->line); rl_undo_list = (UNDO_LIST *)temp->data; rl_end = rl_point = strlen (the_line); #if defined (VI_MODE) if (rl_editing_mode == vi_mode) rl_point = 0; #endif /* VI_MODE */ } } /* Get the previous item out of our interactive history, making it the current line. If there is no previous history, just ding. */ rl_get_previous_history (count) int count; { HIST_ENTRY *old_temp = (HIST_ENTRY *)NULL; HIST_ENTRY *temp = (HIST_ENTRY *)NULL; if (count < 0) { rl_get_next_history (-count); return; } if (!count) return; /* If we don't have a line saved, then save this one. */ maybe_save_line (); /* If the current line has changed, save the changes. */ maybe_replace_line (); while (count) { temp = previous_history (); if (!temp) break; else old_temp = temp; --count; } /* If there was a large argument, and we moved back to the start of the history, that is not an error. So use the last value found. */ if (!temp && old_temp) temp = old_temp; if (!temp) ding (); else { int line_len; line_len = strlen (temp->line); if (line_len >= rl_line_buffer_len) rl_extend_line_buffer (line_len); strcpy (the_line, temp->line); rl_undo_list = (UNDO_LIST *)temp->data; rl_end = rl_point = line_len; #if defined (VI_MODE) if (rl_editing_mode == vi_mode) rl_point = 0; #endif /* VI_MODE */ } } /* **************************************************************** */ /* */ /* I-Search and Searching */ /* */ /* **************************************************************** */ /* Search backwards through the history looking for a string which is typed interactively. Start with the current line. */ rl_reverse_search_history (sign, key) int sign; int key; { rl_search_history (-sign, key); } /* Search forwards through the history looking for a string which is typed interactively. Start with the current line. */ rl_forward_search_history (sign, key) int sign; int key; { rl_search_history (sign, key); } /* Display the current state of the search in the echo-area. SEARCH_STRING contains the string that is being searched for, DIRECTION is zero for forward, or 1 for reverse, WHERE is the history list number of the current line. If it is -1, then this line is the starting one. */ rl_display_search (search_string, reverse_p, where) char *search_string; int reverse_p, where; { char *message = (char *)NULL; #ifdef WIN32 char dummy[5]; dummy[0] = 0; #endif message = (char *)alloca (1 + (search_string ? strlen (search_string) : 0) + 30); *message = '\0'; #if defined (NOTDEF) if (where != -1) sprintf (message, "[%d]", where + history_base); #endif /* NOTDEF */ strcat (message, "("); if (reverse_p) strcat (message, "reverse-"); strcat (message, "i-search)`"); if (search_string) strcat (message, search_string); strcat (message, "': "); rl_message (message, 0, 0); rl_redisplay (); } /* Search through the history looking for an interactively typed string. This is analogous to i-search. We start the search in the current line. DIRECTION is which direction to search; >= 0 means forward, < 0 means backwards. */ rl_search_history (direction, invoking_key) int direction; int invoking_key; { /* The string that the user types in to search for. */ char *search_string = (char *)alloca (128); /* The current length of SEARCH_STRING. */ int search_string_index; /* The list of lines to search through. */ char **lines; /* The length of LINES. */ int hlen; /* Where we get LINES from. */ HIST_ENTRY **hlist = history_list (); register int i = 0; int orig_point = rl_point; int orig_line = where_history (); int last_found_line = orig_line; int c, done = 0; /* The line currently being searched. */ char *sline; /* Offset in that line. */ int index; /* Non-zero if we are doing a reverse search. */ int reverse = (direction < 0); /* Create an arrary of pointers to the lines that we want to search. */ maybe_replace_line (); if (hlist) for (i = 0; hlist[i]; i++); /* Allocate space for this many lines, +1 for the current input line, and remember those lines. */ lines = (char **)alloca ((1 + (hlen = i)) * sizeof (char *)); for (i = 0; i < hlen; i++) lines[i] = hlist[i]->line; if (saved_line_for_history) lines[i] = saved_line_for_history->line; else /* So I have to type it in this way instead. */ { char *alloced_line; /* Keep that mips alloca happy. */ alloced_line = (char *)alloca (1 + strlen (the_line)); lines[i] = alloced_line; strcpy (lines[i], &the_line[0]); } hlen++; /* The line where we start the search. */ i = orig_line; /* Initialize search parameters. */ *search_string = '\0'; search_string_index = 0; /* Normalize DIRECTION into 1 or -1. */ if (direction >= 0) direction = 1; else direction = -1; rl_display_search (search_string, reverse, -1); sline = the_line; index = rl_point; while (!done) { c = rl_read_key (); /* Hack C to Do What I Mean. */ { Function *f = (Function *)NULL; if (keymap[c].type == ISFUNC) { f = keymap[c].function; if (f == rl_reverse_search_history) c = reverse ? -1 : -2; else if (f == rl_forward_search_history) c = !reverse ? -1 : -2; } } switch (c) { case ESC: done = 1; continue; /* case invoking_key: */ case -1: goto search_again; /* switch directions */ case -2: direction = -direction; reverse = (direction < 0); goto do_search; case CTRL ('G'): strcpy (the_line, lines[orig_line]); rl_point = orig_point; rl_end = strlen (the_line); rl_clear_message (); return; default: if (c < 32 || c > 126) { rl_execute_next (c); done = 1; continue; } else { search_string[search_string_index++] = c; search_string[search_string_index] = '\0'; goto do_search; search_again: if (!search_string_index) continue; else { if (reverse) --index; else if (index != strlen (sline)) ++index; else ding (); } do_search: while (1) { if (reverse) { while (index >= 0) if (strncmp (search_string, sline + index, search_string_index) == 0) goto string_found; else index--; } else { register int limit = (strlen (sline) - search_string_index) + 1; while (index < limit) { if (strncmp (search_string, sline + index, search_string_index) == 0) goto string_found; index++; } } next_line: i += direction; /* At limit for direction? */ if ((reverse && i < 0) || (!reverse && i == hlen)) goto search_failed; sline = lines[i]; if (reverse) index = strlen (sline); else index = 0; /* If the search string is longer than the current line, no match. */ if (search_string_index > strlen (sline)) goto next_line; /* Start actually searching. */ if (reverse) index -= search_string_index; } search_failed: /* We cannot find the search string. Ding the bell. */ ding (); i = last_found_line; break; string_found: /* We have found the search string. Just display it. But don't actually move there in the history list until the user accepts the location. */ { int line_len; line_len = strlen (lines[i]); if (line_len >= rl_line_buffer_len) rl_extend_line_buffer (line_len); strcpy (the_line, lines[i]); rl_point = index; rl_end = line_len; last_found_line = i; rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i); } } } continue; } /* The searching is over. The user may have found the string that she was looking for, or else she may have exited a failing search. If INDEX is -1, then that shows that the string searched for was not found. We use this to determine where to place rl_point. */ { int now = last_found_line; /* First put back the original state. */ strcpy (the_line, lines[orig_line]); if (now < orig_line) rl_get_previous_history (orig_line - now); else rl_get_next_history (now - orig_line); /* If the index of the "matched" string is less than zero, then the final search string was never matched, so put point somewhere reasonable. */ if (index < 0) index = strlen (the_line); rl_point = index; rl_clear_message (); } } /* Make C be the next command to be executed. */ rl_execute_next (c) int c; { rl_pending_input = c; } /* **************************************************************** */ /* */ /* Killing Mechanism */ /* */ /* **************************************************************** */ /* What we assume for a max number of kills. */ #define DEFAULT_MAX_KILLS 10 /* The real variable to look at to find out when to flush kills. */ int rl_max_kills = DEFAULT_MAX_KILLS; /* Where to store killed text. */ char **rl_kill_ring = (char **)NULL; /* Where we are in the kill ring. */ int rl_kill_index = 0; /* How many slots we have in the kill ring. */ int rl_kill_ring_length = 0; /* How to say that you only want to save a certain amount of kill material. */ rl_set_retained_kills (num) int num; {} /* The way to kill something. This appends or prepends to the last kill, if the last command was a kill command. if FROM is less than TO, then the text is appended, otherwise prepended. If the last command was not a kill command, then a new slot is made for this kill. */ rl_kill_text (from, to) int from, to; { int slot; char *text = rl_copy (from, to); /* Is there anything to kill? */ if (from == to) { free (text); last_command_was_kill++; return; } /* Delete the copied text from the line. */ rl_delete_text (from, to); /* First, find the slot to work with. */ if (!last_command_was_kill) { /* Get a new slot. */ if (!rl_kill_ring) { /* If we don't have any defined, then make one. */ rl_kill_ring = (char **) xmalloc (((rl_kill_ring_length = 1) + 1) * sizeof (char *)); slot = 1; } else { /* We have to add a new slot on the end, unless we have exceeded the max limit for remembering kills. */ slot = rl_kill_ring_length; if (slot == rl_max_kills) { register int i; free (rl_kill_ring[0]); for (i = 0; i < slot; i++) rl_kill_ring[i] = rl_kill_ring[i + 1]; } else { rl_kill_ring = (char **) xrealloc (rl_kill_ring, ((slot = (rl_kill_ring_length += 1)) + 1) * sizeof (char *)); } } slot--; } else { slot = rl_kill_ring_length - 1; } /* If the last command was a kill, prepend or append. */ if (last_command_was_kill && rl_editing_mode != vi_mode) { char *old = rl_kill_ring[slot]; char *new = (char *)xmalloc (1 + strlen (old) + strlen (text)); if (from < to) { strcpy (new, old); strcat (new, text); } else { strcpy (new, text); strcat (new, old); } free (old); free (text); rl_kill_ring[slot] = new; } else { rl_kill_ring[slot] = text; } rl_kill_index = slot; last_command_was_kill++; } /* Now REMEMBER! In order to do prepending or appending correctly, kill commands always make rl_point's original position be the FROM argument, and rl_point's extent be the TO argument. */ /* **************************************************************** */ /* */ /* Killing Commands */ /* */ /* **************************************************************** */ /* Delete the word at point, saving the text in the kill ring. */ rl_kill_word (count) int count; { int orig_point = rl_point; if (count < 0) rl_backward_kill_word (-count); else { rl_forward_word (count); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; } } /* Rubout the word before point, placing it on the kill ring. */ rl_backward_kill_word (count) int count; { int orig_point = rl_point; if (count < 0) rl_kill_word (-count); else { rl_backward_word (count); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); } } /* Kill from here to the end of the line. If DIRECTION is negative, kill back to the line start instead. */ rl_kill_line (direction) int direction; { int orig_point = rl_point; if (direction < 0) rl_backward_kill_line (1); else { rl_end_of_line (); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; } } /* Kill backwards to the start of the line. If DIRECTION is negative, kill forwards to the line end instead. */ rl_backward_kill_line (direction) int direction; { int orig_point = rl_point; if (direction < 0) rl_kill_line (1); else { if (!rl_point) ding (); else { rl_beg_of_line (); rl_kill_text (orig_point, rl_point); } } } /* Yank back the last killed text. This ignores arguments. */ rl_yank () { if (!rl_kill_ring) rl_abort (); rl_insert_text (rl_kill_ring[rl_kill_index]); } /* If the last command was yank, or yank_pop, and the text just before point is identical to the current kill item, then delete that text from the line, rotate the index down, and yank back some other text. */ rl_yank_pop () { int l; if (((rl_last_func != rl_yank_pop) && (rl_last_func != rl_yank)) || !rl_kill_ring) { rl_abort (); } l = strlen (rl_kill_ring[rl_kill_index]); if (((rl_point - l) >= 0) && (strncmp (the_line + (rl_point - l), rl_kill_ring[rl_kill_index], l) == 0)) { rl_delete_text ((rl_point - l), rl_point); rl_point -= l; rl_kill_index--; if (rl_kill_index < 0) rl_kill_index = rl_kill_ring_length - 1; rl_yank (); } else rl_abort (); } /* Yank the COUNTth argument from the previous history line. */ rl_yank_nth_arg (count, ignore) int count; { register HIST_ENTRY *entry = previous_history (); char *arg; if (entry) next_history (); else { ding (); return; } arg = history_arg_extract (count, count, entry->line); if (!arg || !*arg) { ding (); return; } rl_begin_undo_group (); #if defined (VI_MODE) /* Vi mode always inserts a space befoe yanking the argument, and it inserts it right *after* rl_point. */ if (rl_editing_mode == vi_mode) rl_point++; #endif /* VI_MODE */ if (rl_point && the_line[rl_point - 1] != ' ') rl_insert_text (" "); rl_insert_text (arg); free (arg); rl_end_undo_group (); } /* How to toggle back and forth between editing modes. */ rl_vi_editing_mode () { #if defined (VI_MODE) rl_editing_mode = vi_mode; rl_vi_insertion_mode (); #endif /* VI_MODE */ } rl_emacs_editing_mode () { rl_editing_mode = emacs_mode; keymap = emacs_standard_keymap; } /* **************************************************************** */ /* */ /* Completion */ /* */ /* **************************************************************** */ /* Non-zero means that case is not significant in completion. */ int completion_case_fold = 0; /* Return an array of (char *) which is a list of completions for TEXT. If there are no completions, return a NULL pointer. The first entry in the returned array is the substitution for TEXT. The remaining entries are the possible completions. The array is terminated with a NULL pointer. ENTRY_FUNCTION is a function of two args, and returns a (char *). The first argument is TEXT. The second is a state argument; it should be zero on the first call, and non-zero on subsequent calls. It returns a NULL pointer to the caller when there are no more matches. */ char ** completion_matches (text, entry_function) char *text; char *(*entry_function) (); { /* Number of slots in match_list. */ int match_list_size; /* The list of matches. */ char **match_list = (char **)xmalloc (((match_list_size = 10) + 1) * sizeof (char *)); /* Number of matches actually found. */ int matches = 0; /* Temporary string binder. */ char *string; match_list[1] = (char *)NULL; while (string = (*entry_function) (text, matches)) { if (matches + 1 == match_list_size) match_list = (char **)xrealloc (match_list, ((match_list_size += 10) + 1) * sizeof (char *)); match_list[++matches] = string; match_list[matches + 1] = (char *)NULL; } /* If there were any matches, then look through them finding out the lowest common denominator. That then becomes match_list[0]. */ if (matches) { register int i = 1; int low = 100000; /* Count of max-matched characters. */ /* If only one match, just use that. */ if (matches == 1) { match_list[0] = match_list[1]; match_list[1] = (char *)NULL; } else { /* Otherwise, compare each member of the list with the next, finding out where they stop matching. */ while (i < matches) { register int c1, c2, si; if (completion_case_fold) { for (si = 0; (c1 = to_lower(match_list[i][si])) && (c2 = to_lower(match_list[i + 1][si])); si++) if (c1 != c2) break; } else { for (si = 0; (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++) if (c1 != c2) break; } if (low > si) low = si; i++; } match_list[0] = (char *)xmalloc (low + 1); strncpy (match_list[0], match_list[1], low); match_list[0][low] = '\0'; } } else /* There were no matches. */ { free (match_list); match_list = (char **)NULL; } return (match_list); } /* Okay, now we write the entry_function for filename completion. In the general case. Note that completion in the shell is a little different because of all the pathnames that must be followed when looking up the completion for a command. */ char * filename_completion_function (text, state) int state; char *text; { #if !defined(__MWERKS__) && !defined(_MSC_VER) static DIR *directory; static char *filename = (char *)NULL; static char *dirname = (char *)NULL; static char *users_dirname = (char *)NULL; static int filename_len; dirent *entry = (dirent *)NULL; /* If we don't have any state, then do some initialization. */ if (!state) { char *temp; if (dirname) free (dirname); if (filename) free (filename); if (users_dirname) free (users_dirname); filename = savestring (text); if (!*text) text = "."; dirname = savestring (text); temp = rindex (dirname, '/'); if (temp) { strcpy (filename, ++temp); *temp = '\0'; } else strcpy (dirname, "."); /* We aren't done yet. We also support the "~user" syntax. */ /* Save the version of the directory that the user typed. */ users_dirname = savestring (dirname); { char *temp_dirname; temp_dirname = tilde_expand (dirname); free (dirname); dirname = temp_dirname; if (rl_symbolic_link_hook) (*rl_symbolic_link_hook) (&dirname); } directory = opendir (dirname); filename_len = strlen (filename); rl_filename_completion_desired = 1; } /* At this point we should entertain the possibility of hacking wildcarded filenames, like /usr/man/man/te. If the directory name contains globbing characters, then build an array of directories to glob on, and glob on the first one. */ /* Now that we have some state, we can read the directory. */ while (directory && (entry = readdir (directory))) { /* Special case for no filename. All entries except "." and ".." match. */ if (!filename_len) { if ((strcmp (entry->d_name, ".") != 0) && (strcmp (entry->d_name, "..") != 0)) break; } else { /* Otherwise, if these match upto the length of filename, then it is a match. */ if (entry->d_name[0] == filename[0] && /* Quick test */ (strncmp (filename, entry->d_name, filename_len) == 0)) { break; } } } if (!entry) { if (directory) { closedir (directory); directory = (DIR *)NULL; } return (char *)NULL; } else { char *temp; if (dirname && (strcmp (dirname, ".") != 0)) { temp = (char *) xmalloc (1 + strlen (users_dirname) + strlen (entry->d_name)); strcpy (temp, users_dirname); strcat (temp, entry->d_name); } else { temp = (savestring (entry->d_name)); } return (temp); } #endif return 0; } /* **************************************************************** */ /* */ /* Binding keys */ /* */ /* **************************************************************** */ /* rl_add_defun (char *name, Function *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ rl_add_defun (name, function, key) char *name; Function *function; int key; { if (key != -1) rl_bind_key (key, function); rl_add_funmap_entry (name, function); } /* Bind KEY to FUNCTION. Returns non-zero if KEY is out of range. */ int rl_bind_key (key, function) int key; Function *function; { if (key < 0) return (key); if (key > 127 && key < 256) { if (keymap[ESC].type == ISKMAP) { Keymap escmap = (Keymap)keymap[ESC].function; key -= 128; escmap[key].type = ISFUNC; escmap[key].function = function; return (0); } return (key); } keymap[key].type = ISFUNC; keymap[key].function = function; return (0); } /* Bind KEY to FUNCTION in MAP. Returns non-zero in case of invalid KEY. */ int rl_bind_key_in_map (key, function, map) int key; Function *function; Keymap map; { int result; Keymap oldmap = keymap; keymap = map; result = rl_bind_key (key, function); keymap = oldmap; return (result); } /* Make KEY do nothing in the currently selected keymap. Returns non-zero in case of error. */ int rl_unbind_key (key) int key; { return (rl_bind_key (key, (Function *)NULL)); } /* Make KEY do nothing in MAP. Returns non-zero in case of error. */ int rl_unbind_key_in_map (key, map) int key; Keymap map; { return (rl_bind_key_in_map (key, (Function *)NULL, map)); } /* Bind the key sequence represented by the string KEYSEQ to FUNCTION. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ rl_set_key (keyseq, function, map) char *keyseq; Function *function; Keymap map; { rl_generic_bind (ISFUNC, keyseq, function, map); } /* Bind the key sequence represented by the string KEYSEQ to the string of characters MACRO. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ rl_macro_bind (keyseq, macro, map) char *keyseq, *macro; Keymap map; { char *macro_keys; int macro_keys_len; macro_keys = (char *)xmalloc ((2 * strlen (macro)) + 1); if (rl_translate_keyseq (macro, macro_keys, ¯o_keys_len)) { free (macro_keys); return; } rl_generic_bind (ISMACR, keyseq, macro_keys, map); } /* Bind the key sequence represented by the string KEYSEQ to the arbitrary pointer DATA. TYPE says what kind of data is pointed to by DATA, right now this can be a function (ISFUNC), a macro (ISMACR), or a keymap (ISKMAP). This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ static void rl_generic_bind (type, keyseq, data, map) int type; char *keyseq, *data; Keymap map; { char *keys; int keys_len; register int i; /* If no keys to bind to, exit right away. */ if (!keyseq || !*keyseq) { if (type == ISMACR) free (data); return; } keys = (char *)alloca (1 + (2 * strlen (keyseq))); /* Translate the ASCII representation of KEYSEQ into an array of characters. Stuff the characters into ARRAY, and the length of ARRAY into LENGTH. */ if (rl_translate_keyseq (keyseq, keys, &keys_len)) return; /* Bind keys, making new keymaps as necessary. */ for (i = 0; i < keys_len; i++) { if (i + 1 < keys_len) { if (map[keys[i]].type != ISKMAP) { if (map[i].type == ISMACR) free ((char *)map[i].function); map[keys[i]].type = ISKMAP; map[keys[i]].function = (Function *)rl_make_bare_keymap (); } map = (Keymap)map[keys[i]].function; } else { if (map[keys[i]].type == ISMACR) free ((char *)map[keys[i]].function); map[keys[i]].function = (Function *)data; map[keys[i]].type = type; } } } /* Translate the ASCII representation of SEQ, stuffing the values into ARRAY, an array of characters. LEN gets the final length of ARRAY. Return non-zero if there was an error parsing SEQ. */ rl_translate_keyseq (seq, array, len) char *seq, *array; int *len; { register int i, c, l = 0; for (i = 0; c = seq[i]; i++) { if (c == '\\') { c = seq[++i]; if (!c) break; if (((c == 'C' || c == 'M') && seq[i + 1] == '-') || (c == 'e')) { /* Handle special case of backwards define. */ if (strncmp (&seq[i], "C-\\M-", 5) == 0) { array[l++] = ESC; i += 5; array[l++] = CTRL (to_upper (seq[i])); if (!seq[i]) i--; continue; } switch (c) { case 'M': i++; array[l++] = ESC; break; case 'C': i += 2; /* Special hack for C-?... */ if (seq[i] == '?') array[l++] = RUBOUT; else array[l++] = CTRL (to_upper (seq[i])); break; case 'e': array[l++] = ESC; } continue; } } array[l++] = c; } *len = l; array[l] = '\0'; return (0); } /* Return a pointer to the function that STRING represents. If STRING doesn't have a matching function, then a NULL pointer is returned. */ Function * rl_named_function (string) char *string; { register int i; for (i = 0; funmap[i]; i++) if (stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); return ((Function *)NULL); } /* The last key bindings file read. */ #ifdef __MSDOS__ /* Don't know what to do, but this is a guess */ static char *last_readline_init_file = "/INPUTRC"; #else static char *last_readline_init_file = "~/.inputrc"; #endif /* Re-read the current keybindings file. */ rl_re_read_init_file (count, ignore) int count, ignore; { rl_read_init_file ((char *)NULL); } /* Do key bindings from a file. If FILENAME is NULL it defaults to `~/.inputrc'. If the file existed and could be opened and read, 0 is returned, otherwise errno is returned. */ int rl_read_init_file (filename) char *filename; { register int i; char *buffer, *openname, *line, *end; struct stat finfo; int file; /* Default the filename. */ if (!filename) filename = last_readline_init_file; openname = tilde_expand (filename); if (!openname || *openname == '\000') return ENOENT; if ((stat (openname, &finfo) < 0) || (file = open (openname, O_RDONLY, 0666)) < 0) { free (openname); return (errno); } else free (openname); last_readline_init_file = filename; /* Read the file into BUFFER. */ buffer = (char *)xmalloc (finfo.st_size + 1); i = read (file, buffer, finfo.st_size); close (file); if (i != finfo.st_size) return (errno); /* Loop over the lines in the file. Lines that start with `#' are comments; all other lines are commands for readline initialization. */ line = buffer; end = buffer + finfo.st_size; while (line < end) { /* Find the end of this line. */ for (i = 0; line + i != end && line[i] != '\n'; i++); /* Mark end of line. */ line[i] = '\0'; /* If the line is not a comment, then parse it. */ if (*line != '#') rl_parse_and_bind (line); /* Move to the next line. */ line += i + 1; } return (0); } /* **************************************************************** */ /* */ /* Parser Directives */ /* */ /* **************************************************************** */ /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ char *rl_readline_name = "other"; /* Stack of previous values of parsing_conditionalized_out. */ static unsigned char *if_stack = (unsigned char *)NULL; static int if_stack_depth = 0; static int if_stack_size = 0; /* Push parsing_conditionalized_out, and set parser state based on ARGS. */ parser_if (args) char *args; { register int i; /* Push parser state. */ if (if_stack_depth + 1 >= if_stack_size) { if (!if_stack) if_stack = (unsigned char *)xmalloc (if_stack_size = 20); else if_stack = (unsigned char *)xrealloc (if_stack, if_stack_size += 20); } if_stack[if_stack_depth++] = parsing_conditionalized_out; /* If parsing is turned off, then nothing can turn it back on except for finding the matching endif. In that case, return right now. */ if (parsing_conditionalized_out) return; /* Isolate first argument. */ for (i = 0; args[i] && !whitespace (args[i]); i++); if (args[i]) args[i++] = '\0'; /* Handle "if term=foo" and "if mode=emacs" constructs. If this isn't term=foo, or mode=emacs, then check to see if the first word in ARGS is the same as the value stored in rl_readline_name. */ if (rl_terminal_name && strnicmp (args, "term=", 5) == 0) { char *tem, *tname; /* Terminals like "aaa-60" are equivalent to "aaa". */ tname = savestring (rl_terminal_name); tem = rindex (tname, '-'); if (tem) *tem = '\0'; if (stricmp (args + 5, tname) == 0) parsing_conditionalized_out = 0; else parsing_conditionalized_out = 1; free (tname); } #if defined (VI_MODE) else if (strnicmp (args, "mode=", 5) == 0) { int mode; if (stricmp (args + 5, "emacs") == 0) mode = emacs_mode; else if (stricmp (args + 5, "vi") == 0) mode = vi_mode; else mode = no_mode; if (mode == rl_editing_mode) parsing_conditionalized_out = 0; else parsing_conditionalized_out = 1; } #endif /* VI_MODE */ /* Check to see if the first word in ARGS is the same as the value stored in rl_readline_name. */ else if (stricmp (args, rl_readline_name) == 0) parsing_conditionalized_out = 0; else parsing_conditionalized_out = 1; } /* Invert the current parser state if there is anything on the stack. */ parser_else (args) char *args; { register int i; if (!if_stack_depth) { /* Error message? */ return; } /* Check the previous (n - 1) levels of the stack to make sure that we haven't previously turned off parsing. */ for (i = 0; i < if_stack_depth - 1; i++) if (if_stack[i] == 1) return; /* Invert the state of parsing if at top level. */ parsing_conditionalized_out = !parsing_conditionalized_out; } /* Terminate a conditional, popping the value of parsing_conditionalized_out from the stack. */ parser_endif (args) char *args; { if (if_stack_depth) parsing_conditionalized_out = if_stack[--if_stack_depth]; else { /* *** What, no error message? *** */ } } /* Associate textual names with actual functions. */ static struct { char *name; Function *function; } parser_directives [] = { { "if", parser_if }, { "endif", parser_endif }, { "else", parser_else }, { (char *)0x0, (Function *)0x0 } }; /* Handle a parser directive. STATEMENT is the line of the directive without any leading `$'. */ static int handle_parser_directive (statement) char *statement; { register int i; char *directive, *args; /* Isolate the actual directive. */ /* Skip whitespace. */ for (i = 0; whitespace (statement[i]); i++); directive = &statement[i]; for (; statement[i] && !whitespace (statement[i]); i++); if (statement[i]) statement[i++] = '\0'; for (; statement[i] && whitespace (statement[i]); i++); args = &statement[i]; /* Lookup the command, and act on it. */ for (i = 0; parser_directives[i].name; i++) if (stricmp (directive, parser_directives[i].name) == 0) { (*parser_directives[i].function) (args); return (0); } /* *** Should an error message be output? */ return (1); } /* Ugly but working hack for binding prefix meta. */ #define PREFIX_META_HACK static int substring_member_of_array (); /* Read the binding command from STRING and perform it. A key binding command looks like: Keyname: function-name\0, a variable binding command looks like: set variable value. A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark. */ rl_parse_and_bind (string) char *string; { extern char *possible_control_prefixes[], *possible_meta_prefixes[]; char *funname, *kname; register int c; int key, i; while (string && whitespace (*string)) string++; if (!string || !*string || *string == '#') return; /* If this is a parser directive, act on it. */ if (*string == '$') { handle_parser_directive (&string[1]); return; } /* If we are supposed to be skipping parsing right now, then do it. */ if (parsing_conditionalized_out) return; i = 0; /* If this keyname is a complex key expression surrounded by quotes, advance to after the matching close quote. */ if (*string == '"') { for (i = 1; c = string[i]; i++) { if (c == '"' && string[i - 1] != '\\') break; } } /* Advance to the colon (:) or whitespace which separates the two objects. */ for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ ); /* Mark the end of the command (or keyname). */ if (string[i]) string[i++] = '\0'; /* If this is a command to set a variable, then do that. */ if (stricmp (string, "set") == 0) { char *var = string + i; char *value; /* Make VAR point to start of variable name. */ while (*var && whitespace (*var)) var++; /* Make value point to start of value string. */ value = var; while (*value && !whitespace (*value)) value++; if (*value) *value++ = '\0'; while (*value && whitespace (*value)) value++; rl_variable_bind (var, value); return; } /* Skip any whitespace between keyname and funname. */ for (; string[i] && whitespace (string[i]); i++); funname = &string[i]; /* Now isolate funname. For straight function names just look for whitespace, since that will signify the end of the string. But this could be a macro definition. In that case, the string is quoted, so skip to the matching delimiter. */ if (*funname == '\'' || *funname == '"') { int delimiter = string[i++]; for (; c = string[i]; i++) { if (c == delimiter && string[i - 1] != '\\') break; } if (c) i++; } /* Advance to the end of the string. */ for (; string[i] && !whitespace (string[i]); i++); /* No extra whitespace at the end of the string. */ string[i] = '\0'; /* If this is a new-style key-binding, then do the binding with rl_set_key (). Otherwise, let the older code deal with it. */ if (*string == '"') { char *seq = (char *)alloca (1 + strlen (string)); register int j, k = 0; for (j = 1; string[j]; j++) { if (string[j] == '"' && string[j - 1] != '\\') break; seq[k++] = string[j]; } seq[k] = '\0'; /* Binding macro? */ if (*funname == '\'' || *funname == '"') { j = strlen (funname); if (j && funname[j - 1] == *funname) funname[j - 1] = '\0'; rl_macro_bind (seq, &funname[1], keymap); } else rl_set_key (seq, rl_named_function (funname), keymap); return; } /* Get the actual character we want to deal with. */ kname = rindex (string, '-'); if (!kname) kname = string; else kname++; key = glean_key_from_name (kname); /* Add in control and meta bits. */ if (substring_member_of_array (string, possible_control_prefixes)) key = CTRL (to_upper (key)); if (substring_member_of_array (string, possible_meta_prefixes)) key = META (key); /* Temporary. Handle old-style keyname with macro-binding. */ if (*funname == '\'' || *funname == '"') { char seq[2]; int fl = strlen (funname); seq[0] = key; seq[1] = '\0'; if (fl && funname[fl - 1] == *funname) funname[fl - 1] = '\0'; rl_macro_bind (seq, &funname[1], keymap); } #if defined (PREFIX_META_HACK) /* Ugly, but working hack to keep prefix-meta around. */ else if (stricmp (funname, "prefix-meta") == 0) { char seq[2]; seq[0] = key; seq[1] = '\0'; rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, keymap); } #endif /* PREFIX_META_HACK */ else rl_bind_key (key, rl_named_function (funname)); } rl_variable_bind (name, value) char *name, *value; { if (stricmp (name, "editing-mode") == 0) { if (strnicmp (value, "vi", 2) == 0) { #if defined (VI_MODE) keymap = vi_insertion_keymap; rl_editing_mode = vi_mode; #else #if defined (NOTDEF) /* What state is the terminal in? I'll tell you: non-determinate! That means we cannot do any output. */ ding (); #endif /* NOTDEF */ #endif /* VI_MODE */ } else if (strnicmp (value, "emacs", 5) == 0) { keymap = emacs_standard_keymap; rl_editing_mode = emacs_mode; } } else if (stricmp (name, "horizontal-scroll-mode") == 0) { if (!*value || stricmp (value, "On") == 0) horizontal_scroll_mode = 1; else horizontal_scroll_mode = 0; } else if (stricmp (name, "mark-modified-lines") == 0) { if (!*value || stricmp (value, "On") == 0) mark_modified_lines = 1; else mark_modified_lines = 0; } else if (stricmp (name, "prefer-visible-bell") == 0) { if (!*value || stricmp (value, "On") == 0) prefer_visible_bell = 1; else prefer_visible_bell = 0; } else if (stricmp (name, "comment-begin") == 0) { #if defined (VI_MODE) extern char *rl_vi_comment_begin; if (*value) { if (rl_vi_comment_begin) free (rl_vi_comment_begin); rl_vi_comment_begin = savestring (value); } #endif /* VI_MODE */ } } /* Return the character which matches NAME. For example, `Space' returns ' '. */ typedef struct { char *name; int value; } assoc_list; assoc_list name_key_alist[] = { { "DEL", 0x7f }, { "ESC", '\033' }, { "Escape", '\033' }, { "LFD", '\n' }, { "Newline", '\n' }, { "RET", '\r' }, { "Return", '\r' }, { "Rubout", 0x7f }, { "SPC", ' ' }, { "Space", ' ' }, { "Tab", 0x09 }, { (char *)0x0, 0 } }; int glean_key_from_name (name) char *name; { register int i; for (i = 0; name_key_alist[i].name; i++) if (stricmp (name, name_key_alist[i].name) == 0) return (name_key_alist[i].value); return (*name); } /* **************************************************************** */ /* */ /* Key Binding and Function Information */ /* */ /* **************************************************************** */ /* Each of the following functions produces information about the state of keybindings and functions known to Readline. The info is always printed to rl_outstream, and in such a way that it can be read back in (i.e., passed to rl_parse_and_bind (). */ /* Print the names of functions known to Readline. */ void rl_list_funmap_names (ignore) int ignore; { register int i; char **funmap_names; extern char **rl_funmap_names (); funmap_names = rl_funmap_names (); if (!funmap_names) return; for (i = 0; funmap_names[i]; i++) fprintf (rl_outstream, "%s\n", funmap_names[i]); free (funmap_names); } /* Return a NULL terminated array of strings which represent the key sequences that are used to invoke FUNCTION in MAP. */ static char ** invoking_keyseqs_in_map (function, map) Function *function; Keymap map; { register int key; char **result; int result_index, result_size; result = (char **)NULL; result_index = result_size = 0; for (key = 0; key < 128; key++) { switch (map[key].type) { case ISMACR: /* Macros match, if, and only if, the pointers are identical. Thus, they are treated exactly like functions in here. */ case ISFUNC: /* If the function in the keymap is the one we are looking for, then add the current KEY to the list of invoking keys. */ if (map[key].function == function) { char *keyname = (char *)xmalloc (5); if (CTRL_P (key)) sprintf (keyname, "\\C-%c", to_lower (UNCTRL (key))); else if (key == RUBOUT) sprintf (keyname, "\\C-?"); else sprintf (keyname, "%c", key); if (result_index + 2 > result_size) { if (!result) result = (char **) xmalloc ((result_size = 10) * sizeof (char *)); else result = (char **) xrealloc (result, (result_size += 10) * sizeof (char *)); } result[result_index++] = keyname; result[result_index] = (char *)NULL; } break; case ISKMAP: { char **seqs = (char **)NULL; /* Find the list of keyseqs in this map which have FUNCTION as their target. Add the key sequences found to RESULT. */ if (map[key].function) seqs = invoking_keyseqs_in_map (function, (Keymap)map[key].function); if (seqs) { register int i; for (i = 0; seqs[i]; i++) { char *keyname = (char *)xmalloc (6 + strlen (seqs[i])); if (key == ESC) sprintf (keyname, "\\e"); else if (CTRL_P (key)) sprintf (keyname, "\\C-%c", to_lower (UNCTRL (key))); else if (key == RUBOUT) sprintf (keyname, "\\C-?"); else sprintf (keyname, "%c", key); strcat (keyname, seqs[i]); if (result_index + 2 > result_size) { if (!result) result = (char **) xmalloc ((result_size = 10) * sizeof (char *)); else result = (char **) xrealloc (result, (result_size += 10) * sizeof (char *)); } result[result_index++] = keyname; result[result_index] = (char *)NULL; } } } break; } } return (result); } /* Return a NULL terminated array of strings which represent the key sequences that can be used to invoke FUNCTION using the current keymap. */ char ** rl_invoking_keyseqs (function) Function *function; { return (invoking_keyseqs_in_map (function, keymap)); } /* Print all of the current functions and their bindings to rl_outstream. If an explicit argument is given, then print the output in such a way that it can be read back in. */ int rl_dump_functions (count) int count; { void rl_function_dumper (); rl_function_dumper (rl_explicit_arg); rl_on_new_line (); return (0); } /* Print all of the functions and their bindings to rl_outstream. If PRINT_READABLY is non-zero, then print the output in such a way that it can be read back in. */ void rl_function_dumper (print_readably) int print_readably; { register int i; char **rl_funmap_names (), **names; char *name; names = rl_funmap_names (); fprintf (rl_outstream, "\n"); for (i = 0; name = names[i]; i++) { Function *function; char **invokers; function = rl_named_function (name); invokers = invoking_keyseqs_in_map (function, keymap); if (print_readably) { if (!invokers) fprintf (rl_outstream, "# %s (not bound)\n", name); else { register int j; for (j = 0; invokers[j]; j++) { fprintf (rl_outstream, "\"%s\": %s\n", invokers[j], name); free (invokers[j]); } free (invokers); } } else { if (!invokers) fprintf (rl_outstream, "%s is not bound to any keys\n", name); else { register int j; fprintf (rl_outstream, "%s can be found on ", name); for (j = 0; invokers[j] && j < 5; j++) { fprintf (rl_outstream, "\"%s\"%s", invokers[j], invokers[j + 1] ? ", " : ".\n"); } if (j == 5 && invokers[j]) fprintf (rl_outstream, "...\n"); for (j = 0; invokers[j]; j++) free (invokers[j]); free (invokers); } } } } /* **************************************************************** */ /* */ /* String Utility Functions */ /* */ /* **************************************************************** */ static char* strindex(); /* Return non-zero if any members of ARRAY are a substring in STRING. */ static int substring_member_of_array (string, array) char *string, **array; { while (*array) { if (strindex (string, *array)) return (1); array++; } return (0); } /* Whoops, Unix doesn't have strnicmp. */ /* Determine if s2 occurs in s1. If so, return a pointer to the match in s1. The compare is case insensitive. */ static char * strindex (s1, s2) register char *s1, *s2; { register int i, l = strlen (s2); register int len = strlen (s1); for (i = 0; (len - i) >= l; i++) if (strnicmp (&s1[i], s2, l) == 0) return (s1 + i); return ((char *)NULL); } /* **************************************************************** */ /* */ /* USG (System V) Support */ /* */ /* **************************************************************** */ /* When compiling and running in the `Posix' environment, Ultrix does not restart system calls, so this needs to do it. */ int rl_getc (stream) FILE *stream; { #ifdef WIN32 return winio_getc(); #else int result; unsigned char c; #if defined(__GO32__) if (isatty(0)) return (getkey() & 0x7f); #endif /* __GO32__ */ while (1) { result = read (fileno (stream), &c, sizeof (char)); if (result == sizeof (char)) return (c); /* If zero characters are returned, then the file that we are reading from is empty! Return EOF in that case. */ if (result == 0) return (EOF); #ifndef __GO32__ /* If the error that we received was SIGINT, then try again, this is simply an interrupted system call to read (). Otherwise, some error ocurred, also signifying EOF. */ if (errno != EINTR) return (EOF); #endif /* !__GO32__ */ } #endif } #if defined (STATIC_MALLOC) /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp; if (!pointer) temp = (char *)malloc (bytes); else temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "readline: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ /* **************************************************************** */ /* */ /* Testing Readline */ /* */ /* **************************************************************** */ #if defined (TEST) main () { HIST_ENTRY **history_list (); char *temp = (char *)NULL; char *prompt = "readline% "; int done = 0; while (!done) { temp = readline (prompt); /* Test for EOF. */ if (!temp) exit (1); /* If there is anything on the line, print it and remember it. */ if (*temp) { fprintf (stderr, "%s\r\n", temp); add_history (temp); } /* Check for `command' that we handle. */ if (strcmp (temp, "quit") == 0) done = 1; if (strcmp (temp, "list") == 0) { HIST_ENTRY **list = history_list (); register int i; if (list) { for (i = 0; list[i]; i++) { fprintf (stderr, "%d: %s\r\n", i, list[i]->line); free (list[i]->line); } free (list); } } free (temp); } } #endif /* TEST */ /* * Local variables: * compile-command: "gcc -g -traditional -I. -I.. -DTEST -o readline readline.c keymaps.o funmap.o history.o -ltermcap" * end: */ #if defined(__MWERKS__) /* strcmp (), but caseless. */ static int stricmp (string1, string2) char *string1, *string2; { register char ch1, ch2; while (*string1 && *string2) { ch1 = *string1++; ch2 = *string2++; if (to_upper(ch1) != to_upper(ch2)) return (1); } return (*string1 | *string2); } /* Compare at most COUNT characters from string1 to string2. Case doesn't matter. */ static int strnicmp (string1, string2, count) char *string1, *string2; { register char ch1, ch2; while (count) { ch1 = *string1++; ch2 = *string2++; if (to_upper(ch1) == to_upper(ch2)) count--; else break; } return (count); } #endif neuron-7.5/src/mswin/rdln/readline.h000077500000000000000000000207361323325274500175330ustar00rootroot00000000000000/* Readline.h -- the names of functions callable from within readline. */ #if !defined (_READLINE_H_) #define _READLINE_H_ #include "keymaps.h" #if !defined (__FUNCTION_DEF) typedef int Function (); #define __FUNCTION_DEF #endif /* __FUNCTION_DEF */ /* The functions for manipulating the text of the line within readline. Most of these functions are bound to keys by default. */ extern int rl_beg_of_line (), rl_backward (), rl_delete (), rl_end_of_line (), rl_forward (), ding (), rl_backward (), rl_newline (), rl_kill_line (), rl_clear_screen (), rl_get_next_history (), rl_get_previous_history (), rl_quoted_insert (), rl_reverse_search_history (), rl_transpose_chars (), rl_unix_line_discard (), rl_quoted_insert (), rl_unix_word_rubout (), rl_yank (), rl_rubout (), rl_backward_word (), rl_kill_word (), rl_forward_word (), rl_tab_insert (), rl_yank_pop (), rl_yank_nth_arg (), rl_backward_kill_word (), rl_backward_kill_line (), rl_transpose_words (), rl_complete (), rl_possible_completions (), rl_do_lowercase_version (), rl_digit_argument (), rl_universal_argument (), rl_abort (), rl_undo_command (), rl_revert_line (), rl_beginning_of_history (), rl_end_of_history (), rl_forward_search_history (), rl_insert (), rl_upcase_word (), rl_downcase_word (), rl_capitalize_word (), rl_restart_output (), rl_re_read_init_file (), rl_dump_functions (); /* These are *both* defined even when VI_MODE is not. */ extern int rl_vi_editing_mode (), rl_emacs_editing_mode (); #if defined (VI_MODE) /* Things for vi mode. */ extern int rl_vi_movement_mode (), rl_vi_insertion_mode (), rl_vi_arg_digit (), rl_vi_prev_word (), rl_vi_next_word (), rl_vi_char_search (), rl_vi_eof_maybe (), rl_vi_append_mode (), rl_vi_put (), rl_vi_append_eol (), rl_vi_insert_beg (), rl_vi_delete (), rl_vi_comment (), rl_vi_first_print (), rl_vi_fword (), rl_vi_fWord (), rl_vi_bword (), rl_vi_bWord (), rl_vi_eword (), rl_vi_eWord (), rl_vi_end_word (), rl_vi_change_case (), rl_vi_match (), rl_vi_bracktype (), rl_vi_change_char (), rl_vi_yank_arg (), rl_vi_search (), rl_vi_search_again (), rl_vi_dosearch (), rl_vi_subst (), rl_vi_overstrike (), rl_vi_overstrike_delete (), rl_vi_replace(), rl_vi_column (), rl_vi_delete_to (), rl_vi_change_to (), rl_vi_yank_to (), rl_vi_complete (), rl_vi_fetch_history (); #endif /* VI_MODE */ /* Keyboard macro commands. */ extern int rl_start_kbd_macro (), rl_end_kbd_macro (), rl_call_last_kbd_macro (); extern int rl_arrow_keys(), rl_refresh_line (); /* Maintaining the state of undo. We remember individual deletes and inserts on a chain of things to do. */ /* The actions that undo knows how to undo. Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. I.e., the code tells undo what to undo, not how to undo it. */ enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; /* What an element of THE_UNDO_LIST looks like. */ typedef struct undo_list { struct undo_list *next; int start, end; /* Where the change took place. */ char *text; /* The text to insert, if undoing a delete. */ enum undo_code what; /* Delete, Insert, Begin, End. */ } UNDO_LIST; /* The current undo list for RL_LINE_BUFFER. */ extern UNDO_LIST *rl_undo_list; /* The data structure for mapping textual names to code addresses. */ typedef struct { char *name; Function *function; } FUNMAP; extern FUNMAP **funmap; /* **************************************************************** */ /* */ /* Well Published Variables */ /* */ /* **************************************************************** */ /* The name of the calling program. You should initialize this to whatever was in argv[0]. It is used when parsing conditionals. */ extern char *rl_readline_name; /* The line buffer that is in use. */ extern char *rl_line_buffer; /* The location of point, and end. */ extern int rl_point, rl_end; /* The name of the terminal to use. */ extern char *rl_terminal_name; /* The input and output streams. */ extern FILE *rl_instream, *rl_outstream; /* The basic list of characters that signal a break between words for the completer routine. The initial contents of this variable is what breaks words in the shell, i.e. "n\"\\'`@$>". */ extern char *rl_basic_word_break_characters; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ extern char *rl_completer_word_break_characters; /* List of characters which are used to quote a substring of the command line, upon which completion is to be performed for the entire substring. Within quoted substrings, rl_completer_word_break_characters are treated as normal characters, unless they also appear in this list. */ extern char *rl_completer_quote_characters; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ extern char *rl_special_prefixes; /* Pointer to the generator function for completion_matches (). NULL means to use filename_entry_function (), the default filename completer. */ extern Function *rl_completion_entry_function; /* If rl_ignore_some_completions_function is non-NULL it is the address of a function to call after all of the possible matches have been generated, but before the actual completion is done to the input line. The function is called with one argument; a NULL terminated array of (char *). If your function removes any of the elements, they must be free()'ed. */ extern Function *rl_ignore_some_completions_function; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. START and END are indices in RL_LINE_BUFFER saying what the boundaries of TEXT are. If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ extern Function *rl_attempted_completion_function; /* If non-zero, then this is the address of a function to call just before readline_internal () prints the first prompt. */ extern Function *rl_startup_hook; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ extern Function *rl_symbolic_link_hook; /* If non-zero then this is the address of a function you want called while Readline is waiting for character input. */ extern Function *rl_event_hook; /* Non-zero means that modified history lines are preceded with an asterisk. */ extern int rl_show_star; /* **************************************************************** */ /* */ /* Tilde Variables That Can be Externally Set */ /* */ /* **************************************************************** */ /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ extern Function *tilde_expansion_failure_hook; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ extern char **tilde_additional_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `/' and `:'. */ extern char **tilde_additional_suffixes; /* **************************************************************** */ /* */ /* Well Published Functions */ /* */ /* **************************************************************** */ /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ extern char *readline (); /* Return an array of strings which are the result of repeatadly calling FUNC with TEXT. */ extern char **completion_matches (); /* rl_add_defun (char *name, Function *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ extern int rl_add_defun (); #endif /* _READLINE_H_ */ neuron-7.5/src/mswin/rdln/sysdep.h000077500000000000000000000022251323325274500172500ustar00rootroot00000000000000/* System-dependent stuff, for ``normal'' systems */ /* If you think you need to change this file, then you are wrong. In order to avoid a huge ugly mass of nested #ifdefs, you should create a new file just for your system, which contains exactly those #includes and definitions that your system needs, AND NOTHING MORE! Then, add that file to the appropriate place in configure.in, and viola, you are done. sysdep-sunos4.h is a good example of how to do this. */ #ifdef __GNUC__ #define alloca __builtin_alloca #else #if defined (sparc) && defined (sun) #include #endif #ifndef alloca /* May be a macro, with args. */ extern char *alloca (); #endif #endif #if !defined(__MWERKS__) #include /* Needed by dirent.h */ #endif #if defined (USG) && defined (TIOCGWINSZ) #include #if defined (USGr4) || defined (USGr3) #include #endif /* USGr4 */ #endif /* USG && TIOCGWINSZ */ #if !defined(__MWERKS__) &&!defined(_MSC_VER) #include typedef struct dirent dirent; #endif /* SVR4 systems should use rather than . */ #if defined (USGr4) #define _POSIX_VERSION #endif neuron-7.5/src/mswin/windll/000077500000000000000000000000001323325274500161165ustar00rootroot00000000000000neuron-7.5/src/mswin/windll/Makefile.am000077500000000000000000000001121323325274500201470ustar00rootroot00000000000000EXTRA_DIST = coff.h dll.cpp dll.h limits.h nrnmech.h ocmatdll.h nrnmath.h neuron-7.5/src/mswin/windll/Makefile.in000066400000000000000000000373101323325274500201670ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/windll ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = coff.h dll.cpp dll.h limits.h nrnmech.h ocmatdll.h nrnmath.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/windll/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/windll/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/windll/coff.h000077500000000000000000000230711323325274500172120ustar00rootroot00000000000000/*** coff information for Intel 386/486. */ /********************** FILE HEADER **********************/ struct external_filehdr { unsigned short f_magic; /* magic number */ unsigned short f_nscns; /* number of sections */ unsigned long f_timdat; /* time & date stamp */ unsigned long f_symptr; /* file pointer to symtab */ unsigned long f_nsyms; /* number of symtab entries */ unsigned short f_opthdr; /* sizeof(optional hdr) */ unsigned short f_flags; /* flags */ }; /* Bits for f_flags: * F_RELFLG relocation info stripped from file * F_EXEC file is executable (no unresolved external references) * F_LNNO line numbers stripped from file * F_LSYMS local symbols stripped from file * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) */ #define F_RELFLG (0x0001) #define F_EXEC (0x0002) #define F_LNNO (0x0004) #define F_LSYMS (0x0008) #define I386MAGIC 0x14c #define I386AIXMAGIC 0x175 #define I386BADMAG(x) (((x).f_magic!=I386MAGIC) && (x).f_magic!=I386AIXMAGIC) #define FILHDR struct external_filehdr //#define FILHSZ sizeof(FILHDR) #define FILHSZ 20 /********************** AOUT "OPTIONAL HEADER" **********************/ typedef struct { unsigned short magic; /* type of file */ unsigned short vstamp; /* version stamp */ unsigned long tsize; /* text size in bytes, padded to FW bdry*/ unsigned long dsize; /* initialized data " " */ unsigned long bsize; /* uninitialized data " " */ unsigned long entry; /* entry pt. */ unsigned long text_start; /* base of text used for this file */ unsigned long data_start; /* base of data used for this file */ } AOUTHDR; typedef struct gnu_aout { unsigned long info; unsigned long tsize; unsigned long dsize; unsigned long bsize; unsigned long symsize; unsigned long entry; unsigned long txrel; unsigned long dtrel; } GNU_AOUT; #define AOUTSZ (sizeof(AOUTHDR)) #define OMAGIC 0404 /* object files, eg as output */ #define ZMAGIC 0413 /* demand load format, eg normal ld output */ #define STMAGIC 0401 /* target shlib */ #define SHMAGIC 0443 /* host shlib */ /********************** SECTION HEADER **********************/ struct external_scnhdr { char s_name[8]; /* section name */ unsigned long s_paddr; /* physical address, aliased s_nlib */ unsigned long s_vaddr; /* virtual address */ unsigned long s_size; /* section size */ unsigned long s_scnptr; /* file ptr to raw data for section */ unsigned long s_relptr; /* file ptr to relocation */ unsigned long s_lnnoptr; /* file ptr to line numbers */ unsigned short s_nreloc; /* number of relocation entries */ unsigned short s_nlnno; /* number of line number entries*/ unsigned long s_flags; /* flags */ }; #define SCNHDR struct external_scnhdr //#define SCNHSZ sizeof(SCNHDR) #define SCNHSZ 40 /* * names of "special" sections */ #define _TEXT ".text" #define _DATA ".data" #define _BSS ".bss" #define _COMMENT ".comment" #define _LIB ".lib" /* * s_flags "type" */ #define STYP_TEXT (0x0020) /* section contains text only */ #define STYP_DATA (0x0040) /* section contains data only */ #define STYP_BSS (0x0080) /* section contains bss only */ /********************** LINE NUMBERS **********************/ /* 1 line number entry for every "breakpointable" source line in a section. * Line numbers are grouped on a per function basis; first entry in a function * grouping will have l_lnno = 0 and in place of physical address will be the * symbol table index of the function name. */ struct external_lineno { union { unsigned long l_symndx __attribute__((packed)); /* function name symbol index, iff l_lnno == 0 */ unsigned long l_paddr __attribute__((packed)); /* (physical) address of line number */ } l_addr; unsigned short l_lnno; /* line number */ }; #define LINENO struct external_lineno #define LINESZ sizeof(LINENO) /********************** SYMBOLS **********************/ #define E_SYMNMLEN 8 /* # characters in a symbol name */ #define E_FILNMLEN 14 /* # characters in a file name */ #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ struct external_syment { union { char e_name[E_SYMNMLEN]; struct { unsigned long e_zeroes __attribute__((packed)); unsigned long e_offset __attribute__((packed)); } e; } e; unsigned long e_value __attribute__((packed)); short e_scnum; unsigned short e_type; unsigned char e_sclass; unsigned char e_numaux; }; #define N_BTMASK (0xf) #define N_TMASK (0x30) #define N_BTSHFT (4) #define N_TSHIFT (2) union external_auxent { struct { unsigned long x_tagndx __attribute__((packed)); /* str, un, or enum tag indx */ union { struct { unsigned short x_lnno; /* declaration line number */ unsigned short x_size; /* str/union/array size */ } x_lnsz; unsigned long x_fsize __attribute__((packed)); /* size of function */ } x_misc; union { struct { /* if ISFCN, tag, or .bb */ unsigned long x_lnnoptr __attribute__((packed)); /* ptr to fcn line # */ unsigned long x_endndx __attribute__((packed)); /* entry ndx past block end */ } x_fcn; struct { /* if ISARY, up to 4 dimen. */ unsigned short x_dimen[E_DIMNUM]; } x_ary; } x_fcnary; unsigned short x_tvndx; /* tv index */ } x_sym; union { char x_fname[E_FILNMLEN]; struct { unsigned long x_zeroes __attribute__((packed)); unsigned long x_offset __attribute__((packed)); } x_n; } x_file; struct { unsigned long x_scnlen __attribute__((packed)); /* section length */ unsigned short x_nreloc; /* # relocation entries */ unsigned short x_nlinno; /* # line numbers */ } x_scn; struct { unsigned long x_tvfill __attribute__((packed)); /* tv fill value */ unsigned short x_tvlen; /* length of .tv */ unsigned short x_tvran[2]; /* tv range */ } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ }; #define SYMENT struct external_syment //#define SYMESZ sizeof(SYMENT) #define SYMESZ 18 #define AUXENT union external_auxent //#define AUXESZ sizeof(AUXENT) #define AUXESZ 18 # define _ETEXT "etext" /* Relocatable symbols have number of the section in which they are defined, or one of the following: */ #define N_UNDEF ((short)0) /* undefined symbol */ #define N_ABS ((short)-1) /* value of symbol is absolute */ #define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */ #define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */ #define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/ /* * Type of a symbol, in low N bits of the word */ #define T_NULL 0 #define T_VOID 1 /* function argument (only used by compiler) */ #define T_CHAR 2 /* character */ #define T_SHORT 3 /* short integer */ #define T_INT 4 /* integer */ #define T_LONG 5 /* long integer */ #define T_FLOAT 6 /* floating point */ #define T_DOUBLE 7 /* double word */ #define T_STRUCT 8 /* structure */ #define T_UNION 9 /* union */ #define T_ENUM 10 /* enumeration */ #define T_MOE 11 /* member of enumeration*/ #define T_UCHAR 12 /* unsigned character */ #define T_USHORT 13 /* unsigned short */ #define T_UINT 14 /* unsigned integer */ #define T_ULONG 15 /* unsigned long */ #define T_LNGDBL 16 /* long double */ /* * derived types, in n_type */ #define DT_NON (0) /* no derived type */ #define DT_PTR (1) /* pointer */ #define DT_FCN (2) /* function */ #define DT_ARY (3) /* array */ #define BTYPE(x) ((x) & N_BTMASK) #define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT)) #define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT)) #define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT)) #define ISTAG(x) ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG) #define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK)) /********************** STORAGE CLASSES **********************/ /* This used to be defined as -1, but now n_sclass is unsigned. */ #define C_EFCN 0xff /* physical end of function */ #define C_NULL 0 #define C_AUTO 1 /* automatic variable */ #define C_EXT 2 /* external symbol */ #define C_STAT 3 /* static */ #define C_REG 4 /* register variable */ #define C_EXTDEF 5 /* external definition */ #define C_LABEL 6 /* label */ #define C_ULABEL 7 /* undefined label */ #define C_MOS 8 /* member of structure */ #define C_ARG 9 /* function argument */ #define C_STRTAG 10 /* structure tag */ #define C_MOU 11 /* member of union */ #define C_UNTAG 12 /* union tag */ #define C_TPDEF 13 /* type definition */ #define C_USTATIC 14 /* undefined static */ #define C_ENTAG 15 /* enumeration tag */ #define C_MOE 16 /* member of enumeration */ #define C_REGPARM 17 /* register parameter */ #define C_FIELD 18 /* bit field */ #define C_AUTOARG 19 /* auto argument */ #define C_LASTENT 20 /* dummy entry (end of block) */ #define C_BLOCK 100 /* ".bb" or ".eb" */ #define C_FCN 101 /* ".bf" or ".ef" */ #define C_EOS 102 /* end of structure */ #define C_FILE 103 /* file name */ #define C_LINE 104 /* line # reformatted as symbol table entry */ #define C_ALIAS 105 /* duplicate tag */ #define C_HIDDEN 106 /* ext symbol in dmert public lib */ /********************** RELOCATION DIRECTIVES **********************/ struct external_reloc { unsigned long r_vaddr __attribute__((packed)); unsigned long r_symndx __attribute__((packed)); unsigned short r_type; }; #define RELOC struct external_reloc //#define RELSZ sizeof(RELOC) #define RELSZ 10 #define DEFAULT_DATA_SECTION_ALIGNMENT 4 #define DEFAULT_BSS_SECTION_ALIGNMENT 4 #define DEFAULT_TEXT_SECTION_ALIGNMENT 4 /* For new sections we havn't heard of before */ #define DEFAULT_SECTION_ALIGNMENT 4 neuron-7.5/src/mswin/windll/dll.cpp000077500000000000000000000413661323325274500174120ustar00rootroot00000000000000#include <../../nrnconf.h> #if defined(CYGWIN) #define nrnCYGWIN #endif #include #include #include #include #include #include #include #include #define __attribute__(arg) /**/ #include "coff.h" #undef CYGWIN #define CYGWIN 1 #if defined(__MWERKS__)|| defined(_MSC_VER) #undef SYMESZ #define SYMESZ 18 #undef RELSZ #define RELSZ 10 #endif #include "limits.h" #include "dll.h" #if defined(nrnCYGWIN) extern "C" { extern FILE __files[]; // declared in mswinprt.c. FILE* __files does not work here. int _flsbuf(unsigned i, FILE* f) { printf("\n_flsbuf i=%d\n", i); return i; } } #endif char* dllstrdup(const char* s) { char* p = new char[strlen(s) + 1]; strcpy(p, s); return p; } #if defined(__MWERKS__) && !defined(_MSC_VER) extern "C" { #if __MWERKS__ >= 7 FILE __files[]; // would be from file_struc.h except for RC_INVOKED #endif extern int flsbuf(unsigned, FILE*); int _flsbuf(unsigned i, FILE* f) { printf("\n_flsbuf i=%d\n", i); return i; } } #endif #define PRINT 0 #define PRDEBUG printf( //#define PRDEBUGFILE "c:/temp.tmp" #if defined(PRDEBUGFILE) #undef PRDEBUG #define PRDEBUG fprintf(prdebug_, static FILE* prdebug_; #endif typedef void (*CDTOR)(); struct Symtab { Symtab *next, *prev; static Symtab *symtabs; char **name; void **value; int num; int max; Symtab(); ~Symtab(); void add(char *name, void *value); void *get(char *name); static void *lookup(char *name); }; struct dll_s { dll_s *next, *prev; char *loadpath; int valid; static dll_s *top; int load_count; int num_sections; char *bytes; char *dtor_section; int dtor_count; Symtab symtab; CDTOR uninit_func; }; dll_s *dll_s::top = 0; Symtab *Symtab::symtabs = 0; Symtab::Symtab() { next = symtabs; prev = 0; symtabs = this; num = 0; max = 10; name = (char **)malloc(max*sizeof(char *)); value = (void **)malloc(max*sizeof(void *)); } Symtab::~Symtab() { int i; for (i=0; iprev = prev; if (prev) prev->next = next; else symtabs = next; } void Symtab::add(char *Pname, void *Pvalue) { if (num >= max) { max += 10; name = (char **)realloc(name, max * sizeof(char *)); value = (void **)realloc(value, max * sizeof(void *)); } name[num] = dllstrdup(Pname); value[num] = Pvalue; num++; } void *Symtab::get(char *Pname) { int i; for (i=0; inext) { void *v = s->get(Pname); if (v) { return v; } } return 0; } static struct { int val; char *name; } flags[] = { F_RELFLG, "REL", F_EXEC, "EXEC", F_LNNO, "LNNO", F_LSYMS, "LSYMS", 0, 0 }; static struct { int val; char *name; } sflags[] = { STYP_TEXT, "text", STYP_DATA, "data", STYP_BSS, "bss", 0, 0 }; static char *dll_argv0 = 0; static Symtab *local_symtab = 0; static Symtab *common_symtab = 0; static void dll_exitfunc(void) { while (dll_s::top) dll_unload((struct DLL *)dll_s::top); } void dll_register(char *Psymbol, void *Paddress) { if (local_symtab == 0) local_symtab = new Symtab; if (common_symtab == 0) common_symtab = new Symtab; local_symtab->add(Psymbol, Paddress); local_symtab->get(Psymbol); } // following works around the c++ overloading of math functions // eg. want sin(double) not sin(float) static void dll_registerdf1(char* Psymbol, double(*Paddress)(double)) { dll_register(Psymbol, (void*)Paddress); } static void dll_registerdf2(char* Psymbol, double(*Paddress)(double, double)) { dll_register(Psymbol, (void*)Paddress); } #define MKDLL(a,b) extern void b(); #define DFMKDLL(a,b) extern double b(); #define DFMKDLL1(a,b) /**/ #define DFMKDLL2(a,b) /**/ #define DMKDLL(a,b) extern double b; #define IMKDLL(a,b) extern int b; #define MKDLLdec(a,b) /**/ #define MKDLLvpf(a,b) extern void* b(); #define MKDLLvp(a,b) extern void* b; #define MKDLLif(a,b) extern int b(); extern "C" { #include "nrnmath.h" #include "nrnmech.h" #if OCMATRIX #include "ocmatdll.h" #endif } #undef MKDLL #undef DFMKDLL #undef DFMKDLL1 #undef DFMKDLL2 #undef DMKDLL #undef IMKDLL #undef MKDLLdec #undef MKDLLvpf #undef MKDLLvp #undef MKDLLif void dll_init(char *argv0) { // this was causing an unhandled exception on // exit on one machine. I don't believe, but // am not certain, that it is any longer necessary //atexit(dll_exitfunc); if (dll_argv0) free(dll_argv0); else { dll_register("_dll_load", (void*)dll_load); dll_register("_dll_unload", (void*)dll_unload); dll_register("_dll_lookup", (void*)dll_lookup); #define MKDLL(a,b) dll_register(a, (void*)b); #define DFMKDLL(a,b) dll_register(a, (void*)b); #define DFMKDLL1(a,b) dll_registerdf1(a, b); #define DFMKDLL2(a,b) dll_registerdf2(a, b); #define DMKDLL(a,b) dll_register(a, (void*)(&b)); #define IMKDLL(a,b) DMKDLL(a,b) #define MKDLLdec(a,b) MKDLL(a, b) #define MKDLLvpf(a,b) MKDLL(a,b) #define MKDLLif(a,b) MKDLL(a,b) #define MKDLLvp(a,b) DMKDLL(a,b) #include "nrnmath.h" #include "nrnmech.h" #if OCMATRIX #include "ocmatdll.h" #endif #undef MKDLL #undef DFMKDLL #undef DMKDLL #undef IMKDLL #undef MKDLLdec #undef MKDLLvpf #undef MKDLLif } dll_argv0 = dllstrdup(argv0); } char *find_file(char *fn) { #if 0 char *bp, *ep, *pp; static char buf[PATH_MAX]; if (strpbrk(fn, ":\\/")) return fn; // printf("find: try `%s'\n", fn); if (access(fn,0) == 0) return fn; if (dll_argv0) { strcpy(buf, dll_argv0); ep = buf; for (bp=buf; *bp; bp++) if (strchr(":\\/", *bp)) ep = bp+1; strcpy(ep, fn); // printf("find: try `%s'\n", buf); if (access(buf, 0) == 0) return buf; } bp = getenv("PATH"); while (*bp) { pp = buf; while (*bp && *bp != ';') *pp++ = *bp++; *pp++ = '/'; strcpy(pp, fn); // printf("find: try `%s'\n", buf); if (access(buf, 0) == 0) return buf; if (*bp == 0) break; bp++; } // printf("find: default `%s'\n", fn); #endif return fn; } struct DLL *dll_load(char *filename) { #if defined(PRDEBUGFILE) prdebug_ = fopen(PRDEBUGFILE, "wb"); #endif if (dll_argv0 == 0) dll_init(""); dll_s *dll; for (dll=dll_s::top; dll; dll=dll->next) if (strcmp(dll->loadpath, filename) == 0) { dll->load_count ++; return (DLL *)dll; } DLL* d = dll_force_load(filename); #if defined(PRDEBUGFILE) fclose(prdebug_); #endif return d; } struct DLL *dll_force_load(char *filename) { int i, s; int error = 0; int max_bytes = 0; dll_s *dll; char *loadpath = find_file(filename); #if PRINT PRDEBUG "load: `%s'\n", loadpath); #endif FILE *file = fopen(loadpath, "rb"); if (file == 0) { printf("Error: unable to load %s\n", filename); perror("The error was"); return 0; } dll = new dll_s; dll->valid = 0; dll->loadpath = dllstrdup(filename); dll->num_sections = 0; dll->next = dll_s::top; if (dll->next) dll->next->prev = dll; dll_s::top = dll; dll->prev = 0; dll->load_count = 1; dll->dtor_count = 0; dll->uninit_func = 0; CDTOR init_func = 0; FILHDR filhdr; fread(&filhdr, 1, FILHSZ, file); #if PRINT PRDEBUG "file: %s, magic=%#x\n", filename, filhdr.f_magic); #endif if (filhdr.f_magic != 0x14c) { fprintf(stderr, "Not a COFF file\n"); return 0; } #if PRINT PRDEBUG "nscns=%d, nsyms=%d, symptr=%#x\n", filhdr.f_nscns, filhdr.f_nsyms, filhdr.f_symptr); PRDEBUG "flags: "); for (i=0; flags[i].val; i++) if (filhdr.f_flags & flags[i].val) PRDEBUG " %s", flags[i].name); PRDEBUG "\n"); #endif if (filhdr.f_opthdr) fseek(file, filhdr.f_opthdr, 1); SCNHDR *section; section = new SCNHDR[filhdr.f_nscns]; dll->num_sections = filhdr.f_nscns; #if defined(__MWERKS__) || defined(nrnCYGWIN) for (i=0; i < filhdr.f_nscns; ++i) { fread(section+i, 1, SCNHSZ, file); #if PRINT == 2 PRDEBUG "%8s paddr %x vaddr %x size %x scnptr %x relptr %x lnnoptr %x nreloc %x nlnno %x flags %x\n", section[i].s_name, section[i].s_paddr, section[i].s_vaddr, section[i].s_size, section[i].s_scnptr, section[i].s_relptr, section[i].s_lnnoptr, section[i].s_nreloc, section[i].s_nlnno, section[i].s_flags); #endif } #else fread(section, sizeof(SCNHDR), filhdr.f_nscns, file); #endif max_bytes = 0; for (s=0; sbytes = new char[max_bytes]; // there was a problem with the hoc_scdoub and hoc_vdoub terminator 0's not // being set to 0 in all cases. Perhaps cygwin has changed its section zeroing // policy and s_size is back in favor at s_paddr expense. Anyway, the // following at least starts us out with a zero array and the segmentation // violation seen occasionally with NEURONMainMenu/File/WorkingDir // no longer occurs. See the next #if CYGWIN for my earlier hack which // may be obsolete. for (i=0; i < max_bytes; ++i) {dll->bytes[i] = 0;} for (s=0; sbytes + section[s].s_vaddr, section[s].s_size); #endif if (section[s].s_size) { fseek(file, section[s].s_scnptr, 0); fread(dll->bytes+section[s].s_vaddr, 1, section[s].s_size, file); } } else { #if CYGWIN #if PRINT PRDEBUG "section %d zeroed 0x%x bytes at 0x%x\n", s, section[s].s_paddr, dll->bytes+section[s].s_vaddr); PRDEBUG "if not CYGWIN then we would\n"); PRDEBUG "section %d zeroed %d bytes at 0x%x\n", s, section[s].s_size, dll->bytes+section[s].s_vaddr); #endif if (section[s].s_paddr) memset(dll->bytes+section[s].s_vaddr, 0, section[s].s_paddr); } #else #if PRINT PRDEBUG "section %d zeroed %d bytes at 0x%x\n", s, section[s].s_size, dll->bytes+section[s].s_vaddr); #endif if (section[s].s_size) memset(dll->bytes+section[s].s_vaddr, 0, section[s].s_size); } #endif } SYMENT *syment = new SYMENT[filhdr.f_nsyms]; unsigned long *symaddr = new unsigned long [filhdr.f_nsyms]; fseek(file, filhdr.f_symptr, 0); //printf("SYMESZ=%d\n", SYMESZ); #if defined(__MWERKS__) || defined(nrnCYGWIN) for (i=0; i < filhdr.f_nsyms; ++i) { fread(syment+i, 1, SYMESZ, file); } #else fread(syment, filhdr.f_nsyms, SYMESZ, file); #endif unsigned long strsize = 4; fread(&strsize, 1, sizeof(unsigned long), file); //printf("strsize=%ld\n", strsize); char *strings = new char[strsize]; strings[0] = 0; if (strsize > 4) fread(strings+4, strsize-4, 1, file); for (i=0; i 0) { symaddr[i] = syment[i].e_value + (long)(dll->bytes); #if CYGWIN symaddr[i] += section[syment[i].e_scnum-1].s_vaddr; #endif if (syment[i].e_sclass == 2) dll->symtab.add(sname, (void *)symaddr[i]); if (strcmp(sname, "_dll_unloadfunc") == 0) dll->uninit_func = (CDTOR)symaddr[i]; if (strcmp(sname, "_dll_loadfunc") == 0) init_func = (CDTOR)symaddr[i]; } else if (syment[i].e_scnum == N_UNDEF) { if (syment[i].e_value) { void *stv = common_symtab->get(sname); if (stv) symaddr[i] = (long)stv; else { stv = calloc(syment[i].e_value,1); common_symtab->add(sname, stv); symaddr[i] = (long)stv; } } else { symaddr[i] = (long)Symtab::lookup(sname); if (symaddr[i] == 0) { fprintf(stderr, "Undefined symbol %s referenced from %s\n", sname, filename); error = 1; } } } #if PRINT if (syment[i].e_scnum >= 1) scname = section[syment[i].e_scnum-1].s_name; else scname = "N/A"; PRDEBUG "[%2d] 0x%08x %2d %-8.8s %04x %02x %d %s\n", i, symaddr[i], syment[i].e_scnum, scname, syment[i].e_type, syment[i].e_sclass, syment[i].e_numaux, sname); for (int a=0; a' '?ap[b]:' '); printf("\033[1m\n"); #endif } #else i += syment[i].e_numaux; #endif } for (s=0; sbytes + r[i].r_vaddr); long old_value = *ptr; #if PRINT PRDEBUG " [%02d] 0x%08x(0x%08x) %2d 0x%04x 0%02o (was 0x%08x", i, r[i].r_vaddr, ptr, r[i].r_symndx, r[i].r_type, r[i].r_type, old_value); #endif switch (r[i].r_type) { case 0x06: #if !CYGWIN old_value -= syment[r[i].r_symndx].e_value; #endif old_value += symaddr[r[i].r_symndx]; break; case 0x14: if (syment[r[i].r_symndx].e_scnum == 0 || 1) { #if !CYGWIN // old coff format from gcc2.7.2 days old_value -= (long)(dll->bytes); #else // new pe-coff format from gcc2.95.2 old_value = -(long)ptr - 4; #endif old_value += symaddr[r[i].r_symndx]; } break; default: fprintf(stderr, "Error: unexpected relocation type %#x\n", r[i].r_type); error = 1; } *ptr = old_value; #if PRINT PRDEBUG ", now 0x%08x)\n", old_value); if (r[i].r_type == 0x14) { PRDEBUG "pc(0x%08x) + 4 + offset(0x%08x) = external address(0x%08x)\n", (long)ptr, (long)*ptr, (long)*ptr+(long)ptr+4); PRDEBUG "index %2d address 0x%08x\n", r[i].r_symndx, symaddr[r[i].r_symndx]); } if (r[i].r_type == 0x06) { PRDEBUG "e_value=0x%08x\n", syment[r[i].r_symndx].e_value); } #endif } delete [] r; } } for (s=0; sbytes+section[s].s_vaddr); f = (CDTOR)(fv[i]); f(); } } if (strcmp(section[s].s_name, ".dtor") == 0) { dll->dtor_section = dll->bytes + section[s].s_vaddr; dll->dtor_count = section[s].s_size/4; } } if (init_func) init_func(); dll->valid = 1; fclose(file); delete [] syment; delete [] symaddr; delete [] strings; delete [] section; #if (PRINT == 2) for (i=0; i < max_bytes; ++i) { if ((long)(dll->bytes + i)%8 == 0) { PRDEBUG "\n%08x ", (long)(dll->bytes + i)); } PRDEBUG " %02x", dll->bytes[i]&0xff); } PRDEBUG "\n"); PRDEBUG "printf=%08x *printf=%02x\n", (long)printf, *((char*)printf)&0xff); #endif if (error) return 0; return (struct DLL *)dll; } void dll_unload(struct DLL *Pdll) { int i, s; CDTOR f; if (Pdll == 0) return; dll_s *dll = (dll_s *)Pdll; if (--dll->load_count) return; // printf("unload: `%s'\n", dll->loadpath); if (dll->valid) { if (dll->uninit_func) dll->uninit_func(); for (i=0; idtor_count; i++) { void **fv = (void **)(dll->dtor_section); f = (CDTOR)(fv[i]); f(); } } if (dll->next) dll->next->prev = dll->prev; if (dll->prev) dll->prev->next = dll->next; else dll_s::top = dll->next; if (dll->bytes) delete dll->bytes; dll->valid = 0; delete dll; } void *dll_lookup(struct DLL *Pdll, char *name) { dll_s *dll = (dll_s *)Pdll; return dll->symtab.get(name); } neuron-7.5/src/mswin/windll/dll.h000077500000000000000000000004671323325274500170540ustar00rootroot00000000000000#ifdef __cplusplus extern "C" { #endif void dll_init(char *argv0); struct DLL *dll_load(char *filename); struct DLL *dll_force_load(char *filename); void dll_unload(struct DLL *dll); void *dll_lookup(struct DLL *dll, char *symbol); void dll_register(char *symbol, void *address); #ifdef __cplusplus } #endif neuron-7.5/src/mswin/windll/limits.h000077500000000000000000000052501323325274500175750ustar00rootroot00000000000000/* limits.h */ /* Produced by enquire version 4.3, CWI, Amsterdam */ /* Number of bits in a storage unit */ #define CHAR_BIT 8 /* Maximum char */ #define CHAR_MAX 127 /* Minimum char */ #define CHAR_MIN (-128) /* Maximum signed char */ #define SCHAR_MAX 127 /* Minimum signed char */ #define SCHAR_MIN (-128) /* Maximum unsigned char (minimum is always 0) */ #define UCHAR_MAX 255 /* Maximum short */ #define SHRT_MAX 32767 /* Minimum short */ #define SHRT_MIN (-32768) /* Maximum int */ #define INT_MAX 2147483647 /* Minimum int */ #define INT_MIN (-2147483647-1) /* Maximum long */ #define LONG_MAX 2147483647L /* Minimum long */ #define LONG_MIN (-2147483647L-1L) /* Maximum unsigned short (minimum is always 0) */ #define USHRT_MAX 65535 /* Maximum unsigned int (minimum is always 0) */ #define UINT_MAX 4294967295U /* Maximum unsigned long (minimum is always 0) */ #define ULONG_MAX 4294967295UL /* All of these constants can be obtained from sysconf() instead */ #define ARG_MAX 127 /* Max length of arg to exec() */ #define CHILD_MAX 1 /* Max processes per user */ #define CLK_TCK 100 /* Number of clock ticks per second */ #define NGROUPS_MAX 0 /* Max group IDs per process */ #define OPEN_MAX 50 /* Max open files per process */ #define PASS_MAX 8 /* Max bytes in password */ #define _POSIX_STREAM_MAX 8 /* Max open stdio FILEs */ #define TZNAME_MAX 50 /* Max length of timezone name */ /* Not sure why the following should be here, but I guess they are... */ #define BC_BASE_MAX 99 /* Largest ibase and obase for bc */ #define BC_DIM_MAX 2048 /* Max array elements for bc */ #define BC_SCALE_MAX 99 /* Max scale value for bc */ #define COLL_ELEM_MAX 4 /* Max bytes in collation element */ #define EXPR_NEST_MAX 32 /* Max nesting of (...) for expr */ #define LINE_MAX 2048 /* Max length in bytes of input line */ #define PASTE_FILES_MAX 12 /* Max file operands for paste */ #define RE_DUP_MAX 255 /* Max regular expressions permitted */ #define SED_PATTERN_MAX 20480 /* Max size in bytes of sed pattern */ #define SENDTO_MAX 90000 /* Max bytes of message for sendto */ #define SORT_LINE_MAX 20480 /* Max bytes of input line for sort */ /* We use a linked list, so no limit to atexit() funcs */ #define ATEXIT_MAX INT_MAX /* Max atexit() funcs */ /* All of these constants can be obtained from pathconf() instead */ #define LINK_MAX 1 /* Max links to a single file */ #define MAX_CANON 127 /* Max bytes in TTY canonical input */ #define MAX_INPUT 127 /* Max bytes in TTY input queue */ #define NAME_MAX 12 /* Max bytes in a filename */ #define PATH_MAX 80 /* Max bytes in a pathname */ #define PIPE_BUF 0 /* Max bytes for atomic pipe writes */ neuron-7.5/src/mswin/windll/nrnmath.h000077500000000000000000000011721323325274500177420ustar00rootroot00000000000000DFMKDLL1("_acos", acos) //DFMKDLL1("_acosh", acosh) DFMKDLL1("_asin", asin) //DFMKDLL1("_asinh", asinh) DFMKDLL1("_atan", atan) DFMKDLL2("_atan2", atan2) //DFMKDLL1("_atanh", atanh) DFMKDLL1("_ceil", ceil) DFMKDLL1("_cos", cos) DFMKDLL1("_cosh", cosh) DFMKDLL1("_erf", erf) DFMKDLL1("_erfc", erfc) DFMKDLL1("_exp", exp) DFMKDLL1("_fabs", fabs) DFMKDLL1("_floor", floor) DFMKDLL2("_fmod", fmod) //DFMKDLL3("_frexp", frexp) DFMKDLL2("_hypot", hypot) DFMKDLL1("_log", log) DFMKDLL1("_log10", log10) DFMKDLL2("_pow", pow) DFMKDLL1("_sin", sin) DFMKDLL1("_sinh", sinh) DFMKDLL1("_sqrt", sqrt) DFMKDLL1("_tan", tan) DFMKDLL1("_tanh", tanh) neuron-7.5/src/mswin/windll/nrnmech.h000077500000000000000000000226601323325274500177320ustar00rootroot00000000000000DFMKDLL("_chkarg", chkarg) DFMKDLL("_hoc_call_func", hoc_call_func) DFMKDLL("_hoc_call_objfunc", hoc_call_objfunc) DFMKDLL("_hoc_Exp", hoc_Exp) DFMKDLL("_hoc_func_table", hoc_func_table) DFMKDLL("_hoc_xpop", hoc_xpop) DFMKDLL("_node_dist", node_dist) DFMKDLL("_nrn_arc_position", nrn_arc_position) DFMKDLL("_nrn_connection_position", nrn_connection_position) DFMKDLL("_nrn_nernst_coef", nrn_nernst_coef) DFMKDLL("_nrn_netcon_get_delay", nrn_netcon_get_delay) DFMKDLL("_nrn_netcon_get_thresh", nrn_netcon_get_thresh) DFMKDLL("_nrn_random_pick", nrn_random_pick) DFMKDLL("_nrn_section_orientation", nrn_section_orientation) DFMKDLL("_section_length", section_length) DFMKDLL("_topol_distance", topol_distance) DFMKDLL("_nrn_ghk", nrn_ghk) DMKDLL("_celsius", celsius) DMKDLL("_clamp_resist", clamp_resist) DMKDLL("_dt", dt) DMKDLL("_hoc_ac_", hoc_ac_) DMKDLL("_hoc_epsilon", hoc_epsilon) DMKDLL("_minf_hh", minf_hh) DMKDLL("_t", t) IMKDLL("_cvode_active_", cvode_active_) IMKDLL("__ninits", _ninits) IMKDLL("_nrn_cvode_", nrn_cvode_) IMKDLL("_nrn_istty_", nrn_istty_) IMKDLL("_parallel_sub", parallel_sub) IMKDLL("_state_discon_flag_", state_discon_flag_) IMKDLL("_stoprun", stoprun) IMKDLL("_nrnmpi_myid", nrnmpi_myid) IMKDLL("_nrnmpi_numprocs", nrnmpi_numprocs) IMKDLL("_nrn_nobanner_", nrn_nobanner_) IMKDLL("_use_cachevec", use_cachevec) IMKDLL("_use_sparse13", use_sparse13) MKDLL("___eprintf", __assertfail) MKDLL("__cvode_abstol", _cvode_abstol) MKDLL("__modl_cleanup", _modl_cleanup) MKDLL("__modl_set_dt", _modl_set_dt) MKDLL("__nrn_single_react", _nrn_single_react) MKDLL("__singlechan_declare", _singlechan_declare) MKDLLdec("_abort", abort) MKDLL("_add_nrn_has_net_event", add_nrn_has_net_event) MKDLL("_add_nrn_artcell", add_nrn_artcell) MKDLL("_add_nrn_fornetcons", add_nrn_fornetcons) MKDLL("_artcell_net_move", artcell_net_move) MKDLL("_artcell_net_send", artcell_net_send) MKDLL("_at_time", at_time) MKDLL("_class2oc", class2oc) MKDLL("_check_obj_type", check_obj_type) MKDLL("_create_point_process", create_point_process) MKDLL("_destroy_point_process", destroy_point_process) #if !defined(WITHOUT_MEMACS) MKDLL("_emacs_exit", emacs_exit) #endif MKDLL("_get_loc_point_process", get_loc_point_process) MKDLL("_has_loc_point", has_loc_point) MKDLL("_hoc_assign_str", hoc_assign_str) MKDLL("_hoc_dec_refcount", hoc_dec_refcount) MKDLL("_hoc_execerror", hoc_execerror) MKDLL("_hoc_free_list", hoc_free_list) MKDLL("_hoc_malchk", hoc_malchk) MKDLL("_hoc_new_object_asgn", hoc_new_object_asgn) MKDLL("_hoc_obj_ref", hoc_obj_ref) MKDLL("_hoc_obj_set", hoc_obj_set) MKDLL("_hoc_obj_unref", hoc_obj_unref) MKDLL("_hoc_pushobj", hoc_pushobj) MKDLL("_hoc_pushpx", hoc_pushpx) MKDLL("_hoc_pushstr", hoc_pushstr) MKDLL("_hoc_pushx", hoc_pushx) MKDLL("_hoc_quit", hoc_quit) MKDLL("_hoc_reg_ba", hoc_reg_ba) MKDLL("_hoc_reg_singlechan", hoc_reg_singlechan) MKDLL("_hoc_register_cvode", hoc_register_cvode) MKDLL("_hoc_register_dparam_size", hoc_register_dparam_size) MKDLL("_hoc_register_limits", hoc_register_limits) MKDLL("_hoc_register_synonym", hoc_register_synonym) MKDLL("_hoc_register_tolerance", hoc_register_tolerance) MKDLL("_hoc_register_ldifus1", hoc_register_ldifus1) MKDLL("_hoc_register_units", hoc_register_units) MKDLL("_hoc_register_var", hoc_register_var) MKDLL("_hoc_run_stmt", hoc_run_stmt) MKDLL("_hoc_spec_table", hoc_spec_table) MKDLL("_hoc_warning", hoc_warning) MKDLL("_install_vector_method", install_vector_method) MKDLL("_ion_reg", ion_reg) MKDLL("_ivoc_help", ivoc_help) MKDLL("_loc_point_process", loc_point_process) MKDLL("_nrn_net_event", nrn_net_event) MKDLL("_nrn_net_send", nrn_net_send) MKDLL("_nrn_net_move", nrn_net_move) MKDLL("_nrn_netcon_set_delay", nrn_netcon_set_delay) MKDLL("_nrn_netcon_set_thresh", nrn_netcon_set_thresh) MKDLL("_nrn_netcon_weight", nrn_netcon_weight) MKDLL("_nrn_check_conc_write", nrn_check_conc_write) MKDLL("_nrn_clear_mark", nrn_clear_mark) MKDLL("_nrn_complain", nrn_complain) MKDLL("_nrn_fake_fire", nrn_fake_fire) MKDLL("_nrn_get_mechtype", nrn_get_mechtype) MKDLL("_nrn_mlh_gsort", nrn_mlh_gsort) MKDLL("_nrn_mswindll_stdio", nrn_mswindll_stdio) MKDLL("_nrn_popsec", nrn_popsec) MKDLL("_nrn_promote", nrn_promote) MKDLL("_nrn_pushsec", nrn_pushsec) MKDLL("_nrn_rangeconst", nrn_rangeconst) MKDLL("_nrn_writes_conc", nrn_writes_conc) MKDLL("_nrn_wrote_conc", nrn_wrote_conc) MKDLL("__nrn_watch_activate", _nrn_watch_activate) MKDLL("__nrn_free_watch", _nrn_free_watch) MKDLL("__nrn_free_fornetcon", _nrn_free_fornetcon) MKDLL("_pnt_receive", pnt_receive) MKDLL("_pnt_receive_init", pnt_receive_init) MKDLL("_point_register_mech", point_register_mech) MKDLL("_recalc_diam", recalc_diam) MKDLL("_register_destructor", register_destructor) MKDLL("_register_mech", register_mech) MKDLL("_ret", ret) MKDLL("_scop_random", scop_random) MKDLL("_section_list", section_list) MKDLL("_section_ref", section_ref) MKDLL("_section_unref", section_unref) MKDLL("_set_seed", set_seed) MKDLL("_state_discontinuity", state_discontinuity) MKDLL("_v_setup_vectors", v_setup_vectors) MKDLL("_vector_arg_px", vector_arg_px) MKDLL("_vector_instance_px", vector_instance_px) #if defined(__MWERKS__) && !defined(_MSC_VER) MKDLLdec("__flsbuf", _flsbuf) MKDLLdec("__iob", __files) #else #if defined(_MSC_VER) MKDLLdec("__flsbuf", _flsbuf) MKDLLdec("__iob", _iob) #else #if defined(nrnCYGWIN) MKDLLdec("__impure_ptr", _impure_ptr) MKDLLdec("_putchar", putchar) MKDLLdec("__flsbuf", _flsbuf) MKDLLdec("__imp___iob", __files) MKDLLdec("___assert", __assert) MKDLLdec("___getreent", __getreent) #else MKDLLdec("__flsbuf", _fputc) MKDLLdec("__iob", _streams) #endif #endif #endif MKDLLdec("_drand48", drand48) MKDLLdec("_srand48", srand48) MKDLLdec("_fclose", fclose) MKDLLdec("_fflush", fflush) MKDLLdec("_fgetc", fgetc) MKDLLdec("_fgets", fgets) MKDLLdec("_fopen", fopen) #if defined(nrnCYGWIN) MKDLL("_fprintf", ncyg_fprintf) #else MKDLLdec("_fprintf", fprintf) #endif MKDLLdec("_fputc", fputc) MKDLLdec("_fputs", fputs) MKDLLdec("_fread", fread) MKDLLdec("_free", free) MKDLLdec("_fscanf", fscanf) MKDLLdec("_fseek", fseek) MKDLLdec("_ftell", ftell) MKDLLdec("_fwrite", fwrite) MKDLLdec("_malloc", malloc) MKDLLdec("_printf", printf) MKDLLdec("_puts", puts) MKDLLdec("_realloc", realloc) MKDLLdec("_sprintf", sprintf) MKDLLdec("_sscanf", sscanf) MKDLLdec("_strcat", strcat) MKDLLdec("_strcmp", strcmp) MKDLLdec("_strcpy", strcpy) MKDLLdec("_strlen", strlen) MKDLLdec("_strncat", strncat) MKDLLdec("_strncmp", strncmp) MKDLLdec("_strncpy", strncpy) MKDLLdec("_system", system) MKDLLif("_arc0at0", arc0at0) MKDLLif("_hoc_argtype", hoc_argtype) MKDLLif("_hoc_is_double_arg", hoc_is_double_arg) MKDLLif("_hoc_is_object_arg", hoc_is_object_arg) MKDLLif("_hoc_is_pdouble_arg", hoc_is_pdouble_arg) MKDLLif("_hoc_is_str_arg", hoc_is_str_arg) MKDLLif("_hoc_obj_run", hoc_obj_run) MKDLLif("_hoc_total_array_data", hoc_total_array_data) MKDLLif("_ifarg", ifarg) MKDLLif("_is_obj_type", is_obj_type) MKDLLif("_is_point_process", is_point_process) MKDLLif("_ivoc_list_count", ivoc_list_count) MKDLLif("_nrn_exists", nrn_exists) MKDLLif("_nrn_increment_mark", nrn_increment_mark) MKDLLif("__nrn_netcon_args", _nrn_netcon_args) MKDLLif("_nrn_value_mark", nrn_value_mark) MKDLLif("_nrn_vartype", nrn_vartype) #if !defined(WITHOUT_MEMACS) MKDLLvp("_emacs_curbp", emacs_curbp) MKDLLvp("_emacs_curwp", emacs_curwp) MKDLLvp("_emacs_term", emacs_term) #endif MKDLLvp("_hoc_objectdata", hoc_objectdata) MKDLLvp("_nrn_actual_d", nrn_actual_d) MKDLLvp("_nrn_actual_rhs", nrn_actual_rhs) MKDLLvp("_nrn_actual_v", nrn_actual_v) MKDLLvp("_nrn_alloc_node_", nrn_alloc_node_) MKDLLvp("_nrn_point_prop_", nrn_point_prop_) MKDLLvp("_pnt_receive_size", pnt_receive_size) MKDLLvpf("_cable_prop_eval", cable_prop_eval) MKDLLvpf("_chk_access", chk_access) MKDLLvpf("_expand_env_var", expand_env_var) MKDLLvpf("_gargstr", gargstr) MKDLLvpf("_getarg", getarg) MKDLLvpf("_hoc_Ecalloc", hoc_Ecalloc) MKDLLvpf("_hoc_Emalloc", hoc_Emalloc) MKDLLvpf("_hoc_Erealloc", hoc_Erealloc) MKDLLvpf("_hoc_araystr", hoc_araystr) MKDLLvpf("_hoc_getdata_range", hoc_getdata_range) MKDLLvpf("_hoc_install", hoc_install) MKDLLvpf("_hoc_lookup", hoc_lookup) MKDLLvpf("_hoc_obj_file_arg", hoc_obj_file_arg) MKDLLvpf("_hoc_obj_get", hoc_obj_get) MKDLLvpf("_hoc_object_name", hoc_object_name) MKDLLvpf("_hoc_object_pathname", hoc_object_pathname) MKDLLvpf("_hoc_objgetarg", hoc_objgetarg) MKDLLvpf("_hoc_parse_stmt", hoc_parse_stmt) MKDLLvpf("_hoc_pgargstr", hoc_pgargstr) MKDLLvpf("_hoc_pgetarg", hoc_pgetarg) MKDLLvpf("_hoc_pgetarg", hoc_pgetarg) MKDLLvpf("_hoc_pxpop", hoc_pxpop) MKDLLvpf("_hoc_spop", hoc_spop) MKDLLvpf("_hoc_section_pathname", hoc_section_pathname) MKDLLvpf("_hoc_table_lookup", hoc_table_lookup) MKDLLvpf("_hoc_temp_objptr", hoc_temp_objptr) MKDLLvpf("_hoc_temp_objvar", hoc_temp_objvar) MKDLLvpf("_hoc_val_pointer", hoc_val_pointer) MKDLLvpf("_ivoc_list_item", ivoc_list_item) MKDLLvpf("_need_memb", need_memb) MKDLLvpf("_node_exact", node_exact) MKDLLvpf("_nrn_mechanism", nrn_mechanism) MKDLLvpf("_nrn_pointing", nrn_pointing) MKDLLvpf("_nrn_prop_data_alloc", nrn_prop_data_alloc) MKDLLvpf("_nrn_prop_datum_alloc", nrn_prop_datum_alloc) MKDLLvpf("_nrn_random_arg", nrn_random_arg) MKDLLvpf("_nrn_rangepointer", nrn_rangepointer) MKDLLvpf("_nrn_trueparent", nrn_trueparent) MKDLLvpf("_secname", secname) MKDLL("_vector_delete", vector_delete) MKDLLif("_vector_buffer_size", vector_buffer_size) MKDLLif("_vector_capacity", vector_capacity) MKDLL("_vector_resize", vector_resize) MKDLLvpf("_vector_vec", vector_vec) MKDLLvpf("_vector_pobj", vector_pobj) MKDLLvpf("_vector_arg", vector_arg) MKDLLif("_is_vector_arg", is_vector_arg) neuron-7.5/src/mswin/windll/ocmatdll.h000077500000000000000000000024041323325274500200710ustar00rootroot00000000000000MKDLL("_vector_resize",vector_resize) MKDLLdec("_sprintf",sprintf) MKDLLdec("__exit",_exit) MKDLLdec("_exit",exit) DMKDLL("_hoc_epsilon",hoc_epsilon) MKDLL("_vector_delete",vector_delete) MKDLLdec("_rand",rand) MKDLL("_check_obj_type",check_obj_type) MKDLL("_vector_capacity",vector_capacity) MKDLLvpf("_hoc_spop",hoc_spop) MKDLLdec("_memset",memset) MKDLLvpf("_hoc_objgetarg",hoc_objgetarg) MKDLLvpf("_vector_arg",vector_arg) MKDLLdec("_calloc",calloc) MKDLLvpf("_hoc_table_lookup",hoc_table_lookup) DFMKDLL("_vector_vec",vector_vec) MKDLLvpf("_vector_temp_objvar",vector_temp_objvar) MKDLLvpf("_hoc_temp_objptr",hoc_temp_objptr) MKDLLvpf("_vector_new1",vector_new1) MKDLL("_vector_buffer_size",vector_buffer_size) MKDLLvpf("_hoc_is_object_arg",hoc_is_object_arg) MKDLLdec("_sscanf",sscanf) MKDLL("_class2oc",class2oc) DFMKDLL("_hoc_xpop",hoc_xpop) MKDLLdec("_write",write) MKDLL("_hoc_is_double_arg",hoc_is_double_arg) MKDLLdec("_fgets",fgets) MKDLLdec("_memmove",memmove) MKDLLdec("_setjmp",setjmp) MKDLLdec("_longjmp",longjmp) MKDLLvpf("_vector_pobj",vector_pobj) MKDLL("_hoc_pushpx",hoc_pushpx) MKDLLvpf("_vector_new2",vector_new2) MKDLLdec("_fscanf",fscanf) MKDLLvpf("_hoc_temp_objvar",hoc_temp_objvar) MKDLL("_hoc_scan",hoc_scan) MKDLLvpf("_hoc_obj_file_arg",hoc_obj_file_arg) neuron-7.5/src/mswin/wnrnbbs/000077500000000000000000000000001323325274500163005ustar00rootroot00000000000000neuron-7.5/src/mswin/wnrnbbs/Makefile.am000077500000000000000000000001471323325274500203410ustar00rootroot00000000000000EXTRA_DIST = ddeclnt.c ddeclnt.h ddesrvr.c ddesrvr.h \ ddesrvr.ico ddesrvr.rc \ nrnbbs.cpp nrnbbs.h neuron-7.5/src/mswin/wnrnbbs/Makefile.in000066400000000000000000000373501323325274500203550ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/mswin/wnrnbbs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = ddeclnt.c ddeclnt.h ddesrvr.c ddesrvr.h \ ddesrvr.ico ddesrvr.rc \ nrnbbs.cpp nrnbbs.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/mswin/wnrnbbs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/mswin/wnrnbbs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/mswin/wnrnbbs/ddeclnt.c000077500000000000000000000163721323325274500200750ustar00rootroot00000000000000 #define STRICT #include #pragma hdrstop #include #include #include #include #include #include #include "ddeclnt.h" #include "nrnbbs.h" /* The DDE variables */ DWORD idInst = 0L; /* Instance of app for DDEML */ FARPROC lpDdeProc; /* DDE callback function */ HSZ hszService; HSZ hszAdmin; HSZ hszUser; HSZ hszItem; HCONV hConv = (HCONV)NULL; /*Handle of established conversation*/ HCONV hConvAdmin = (HCONV)NULL; HDDEDATA hData; DWORD dwResult; WORD wFmt = CF_TEXT; /* Clipboard format */ char szDDEString[256]; /* Local allocation of data buffer */ char szDDEData[256]; /* Local receive data buffer */ int iClientCount = 0; /* Client to Server message counter*/ char tbuf[5]; /* Temporary, to hold count */ /***********/ static void post(HCONV hc, const char* name); void nrnbbs_post(const char* name) { sprintf(szDDEString, ""); post(hConv, name); } void nrnbbs_post_int(const char* name, int i) { sprintf(szDDEString, "%d", i); post(hConv, name); } void nrnbbs_post_string(const char* name, const char* data) { sprintf(szDDEString, "%s", data); post(hConv, name); } static BOOL take(HCONV hc, const char* name, BOOL look); BOOL nrnbbs_take(const char* name){ return take(hConv, name, 0); } BOOL nrnbbs_look(const char* name){ return take(hConv, name, 1); } BOOL nrnbbs_take_int(const char* name, int* pi) { int ok; ok = nrnbbs_take(name); if (ok) { sscanf(szDDEData+1, "%d", pi); } return ok; } BOOL nrnbbs_take_string(const char* name, char* val) { int ok; ok = nrnbbs_take(name); if (ok) { strcpy(val, szDDEData+1); } return ok; } void nrnbbs_exec(const char* cmd) { WinExec(cmd, SW_SHOW); } //void nrnbbs_callback(NrnBBSCallback f, const char* trigger) { /***************************************************************************/ static NrnBBSCallback cbfunc_; void nrnbbs_notify(const char* name, NrnBBSCallback f) { cbfunc_ = f; DdeFreeStringHandle(idInst, hszItem); hszItem = DdeCreateStringHandle ( idInst, (LPTSTR)name, CP_WINANSI ); hData = DdeClientTransaction ( NULL, 0, hConv, hszItem, wFmt, XTYP_ADVSTART, 1000, &dwResult ); if (!hData) { HandleOutput("notify failed\n"); } } static int started; BOOL nrnbbs_connected() { return (idInst && hConv) ? 1 : 0; } BOOL nrnbbs_connect() { if (!idInst) { lpDdeProc = MakeProcInstance ( (FARPROC) DDECallback, hInst ); if ( DdeInitialize ( (LPDWORD)&idInst, (PFNCALLBACK)lpDdeProc, APPCMD_CLIENTONLY, 0L ) ){ HandleOutput ( "Client DDE initialization failure.\n" ); return ( FALSE ); } hszService = DdeCreateStringHandle ( idInst, "NrnBBS", CP_WINANSI ); hszAdmin = DdeCreateStringHandle ( idInst, "Admin", CP_WINANSI ); hszUser = DdeCreateStringHandle ( idInst, "User", CP_WINANSI ); hszItem = DdeCreateStringHandle ( idInst, "DDEData", CP_WINANSI ); } while ( hConv == (HCONV)NULL ){ hConv = DdeConnect ( idInst, hszService, hszUser, (PCONVCONTEXT) NULL ); if ( hConv == (HCONV)NULL ){ HandleError ( DdeGetLastError ( idInst ) ); HandleOutput ( "Unsuccessful connection.\n" ); if (started++ == 0) { char buf[256]; HandleOutput("Starting NrnBBS server.\n"); // WinExec("nrnbbs", SW_HIDE); sprintf(buf, "%s\\bin\\nrnbbs", getenv("NEURONHOME")); WinExec(buf, SW_MINIMIZE); } if (started < 5) { Sleep(500); HandleOutput("Retrying connection.\n"); }else{ started = 0; return FALSE; } }else{ HandleOutput ( "Successful connection.\n" ); } } return TRUE; } void nrnbbs_disconnect() { if ( hConv != (HCONV)NULL ){ DdeDisconnect ( hConv ); hConv = (HCONV)NULL; if (hConvAdmin != (HCONV)NULL) { DdeDisconnect(hConvAdmin); hConvAdmin = (HCONV)NULL; } HandleOutput ( "Disconnected from server.\n" ); } if (idInst) { DdeFreeStringHandle ( idInst, hszService ); DdeFreeStringHandle ( idInst, hszAdmin ); DdeFreeStringHandle ( idInst, hszUser ); DdeFreeStringHandle ( idInst, hszItem ); FreeProcInstance ( lpDdeProc ); HandleOutput("DdeUninitialize\n"); DdeUninitialize ( idInst ); } } static void post(HCONV hc, const char* name) { if ( hc != (HCONV)NULL ){ DdeFreeStringHandle(idInst, hszItem); hszItem = DdeCreateStringHandle ( idInst, (LPTSTR)name, CP_WINANSI ); hData = DdeCreateDataHandle ( idInst, (LPBYTE) szDDEString, sizeof ( szDDEString ), 0L, hszItem, wFmt, 0 ); if ( hData != (HDDEDATA)NULL ) { hData = DdeClientTransaction ( (LPBYTE)hData, -1, hc, hszItem, wFmt, XTYP_POKE, 1000, &dwResult ); }else{ HandleOutput( "Could not create data handle.\n" ); } }else{ HandleOutput ( "A connection to a DDE Server has not been established.\n" ); } } static BOOL take(HCONV hc, const char* name, BOOL look) { if ( hc != (HCONV)NULL ){ DdeFreeStringHandle(idInst, hszItem); sprintf(szDDEData, "%d%s", look, name); hszItem = DdeCreateStringHandle ( idInst, (LPTSTR)szDDEData, CP_WINANSI ); hData = DdeClientTransaction ( NULL, 0, hc, hszItem, wFmt, XTYP_REQUEST, 1000, &dwResult ); if ( !hData ){ HandleOutput ( "Data not available from server.\n" ); }else{ DdeGetData ( hData, (LPBYTE) szDDEData, 80L, 0L ); if ( szDDEData != NULL ){ int ok; ok = szDDEData[0] - '0'; return ok; }else{ HandleOutput ( "Message from server is null.\n" ); } } }else{ HandleOutput ( "A connection to a DDE Server has not been established.\n" ); } return 0; } void nrnbbs_wait(BOOL* pflag) { MSG msg; BOOL f = FALSE; BOOL* pf; pf = (pflag) ? pflag : &f; while (!(*pf) && nrnbbs_connected()) { f = TRUE; // once only if no arg while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } } /***************************************************************************/ #if defined(__MWERKS__) #undef _export #define _export /**/ #endif #pragma argsused HDDEDATA EXPENTRY _export DDECallback ( WORD wType, WORD wFmt, HCONV hConvX, HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2 ) { switch ( wType ) { case XTYP_DISCONNECT: hConv = (HCONV)NULL; HandleOutput ( "The server forced a disconnect.\n" ); return ( (HDDEDATA) NULL ); case XTYP_ERROR: break; case XTYP_XACT_COMPLETE: // compare transaction identifier, indicate transaction complete break; case XTYP_ADVDATA: if (cbfunc_){ char buf[100]; DdeQueryString(idInst, hsz2, buf, 100, CP_WINANSI); (*cbfunc_)(buf); } } return ( (HDDEDATA) NULL ); } /***************************************************************************/ void HandleError ( DWORD DdeError ) { switch ( DdeError ) { case DMLERR_DLL_NOT_INITIALIZED: HandleOutput ( "DLL not initialized.\n" ); break; case DMLERR_INVALIDPARAMETER: HandleOutput ( "Invalid parameter.\n" ); break; case DMLERR_NO_CONV_ESTABLISHED: HandleOutput( "No conversation established.\n" ); break; case DMLERR_NO_ERROR: HandleOutput ( "No error.\n" ); break; } } neuron-7.5/src/mswin/wnrnbbs/ddeclnt.h000077500000000000000000000017601323325274500200750ustar00rootroot00000000000000/* Borland C++ - (C) Copyright 1992 by Borland International */ /* External References */ extern HANDLE hInst; extern HWND hWnd; /* Resource Defines */ #define ID_DDECLIENT 100 #define ID_DDESERVER 101 /* Menu Selection Defines */ #define IDM_EXIT 100 #define IDM_CONNECT_SERVER 101 #define IDM_DISCONNECT_SERVER 102 #define IDM_ABOUT 103 #define IDM_MSG_TO_SERVER 104 #define IDM_MSG_FROM_SERVER 105 /* Forward References */ LRESULT CALLBACK MainWndProc ( HWND, UINT, WPARAM, LPARAM ); BOOL FAR PASCAL InitApplication ( HANDLE ); BOOL InitInstance ( HANDLE hInstance, int nCmdShow ); BOOL CALLBACK About ( HWND, UINT, WPARAM, LPARAM ); HDDEDATA EXPENTRY DDECallback ( WORD, WORD, HCONV, HSZ, HSZ, HDDEDATA, DWORD, DWORD ); void HandleError ( DWORD ); void HandleOutput ( char * ); neuron-7.5/src/mswin/wnrnbbs/ddesrvr.c000077500000000000000000000251261323325274500201260ustar00rootroot00000000000000/* Borland C++ - (C) Copyright 1994 by Borland International */ /*************************************************************************** Program Name DDESrvr.c Purpose A simple DDE client application, which communicates to a DDE server using the new 3.1 api DDEML calls. To use this program, build DDEClnt and DDESrvr. There are project files for this. ****************************************************************************/ #define STRICT #include #pragma hdrstop #include #include #include #include #include #include "ddesrvr.h" #include "nrnbbs.h" void nrnbbs_server_post(const char* name, const char* value); void nrnbbs_server_take(const char* name, char* value); void nrnbbs_server_admin_post(const char* name, const char* value); void nrnbbs_server_admin_request(const char* name, char* value); void nrnbbs_show_postings(); HANDLE hInst; /* Current instance of application */ HWND hWnd; /* Handle of Main window */ int xScreen; /* Screen metrics */ int yScreen; /* ... */ int yFullScreen; /* ... */ int xFrame; /* ... */ int yMenu; /* ... */ TEXTMETRIC tm; /* Text metrics */ int cxChar; /* Character metrics */ int cyChar; /* ... */ char szScreenText[10][80]; /* Contains 10 lines of display data*/ int cCurrentLine; /* Index into szScreenText */ int cTotalLines; /* Total lines in szScreenText */ /* The DDE variables */ DWORD idInst = 0L; /* Instance of app for DDEML */ FARPROC lpDdeProc; /* DDE callback function */ HSZ hszService; HSZ hszAdmin; HSZ hszUser; HCONV hConvApp = (HCONV)NULL; /*Handle of established conversation*/ char szDDEData[256]; /* Local receive buffer */ char szDDEString[256]; /* Local send buffer */ int iServerCount = 0; /* Send message counter */ char tbuf[100]; /* Temporary buffer for count */ char szAppName[] = "DDEServerApplication"; /***************************************************************************/ #pragma argsused int PASCAL WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow ) { MSG msg; if ( !hPrevInstance ){ /* Other instances of app running? */ if ( !InitApplication ( hInstance ) ){ /* Initialize shared things */ return ( FALSE ); /* Exits if unable to initialize */ } } if ( !InitInstance ( hInstance, nCmdShow ) ) return ( FALSE ); nrnbbs_connect(); while ( GetMessage ( &msg, NULL, 0, 0 ) ) { TranslateMessage ( &msg ); DispatchMessage ( &msg ); } DdeUninitialize ( idInst ); nrnbbs_disconnect(); return ( msg.wParam ); } /***************************************************************************/ BOOL FAR PASCAL InitApplication ( HANDLE hInstance ) { WNDCLASS wc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = MainWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon ( hInstance, "DDEServerIcon" ); wc.hCursor = LoadCursor ( NULL, IDC_ARROW ); wc.hbrBackground = GetStockObject ( WHITE_BRUSH ); wc.lpszMenuName = "DDEServerMenu"; wc.lpszClassName = szAppName; if ( !RegisterClass ( &wc ) ) return ( FALSE ); return ( TRUE ); } /***************************************************************************/ BOOL InitInstance ( HANDLE hInstance, int nCmdShow ) { hInst = hInstance; xScreen = GetSystemMetrics ( SM_CXSCREEN ); yScreen = GetSystemMetrics ( SM_CYSCREEN ); hWnd = CreateWindow ( szAppName, "NrnBBS Server Window", WS_OVERLAPPEDWINDOW, 190, /* These co-ordinates look */ yScreen / 2 - 20, /* good on a VGA monitor */ xScreen - 200, /* running in 640x480. No */ yScreen / 2 - 50, /* combination was tried. */ NULL, NULL, hInstance, NULL ); /* If window could not be created, return "failure" */ if ( !hWnd ) return ( FALSE ); /* Make the window visible; update its client area; and return "success" */ #if 1 ShowWindow ( hWnd, nCmdShow ); /* Show the window */ #else ShowWindow ( hWnd, SW_HIDE ); #endif UpdateWindow ( hWnd ); /* Sends WM_PAINT message */ return ( TRUE ); /* Returns the value from PostQuitMessage */ } /***************************************************************************/ #pragma warn -eff LRESULT CALLBACK _export MainWndProc ( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) { HDC hDC; PAINTSTRUCT ps; DLGPROC dlgProcAbout; int i; int j; int y; switch ( message ) { case WM_CREATE: hDC = GetDC ( hWnd ); GetTextMetrics ( hDC, &tm ); cxChar = tm.tmAveCharWidth; cyChar = tm.tmHeight + tm.tmExternalLeading; ReleaseDC ( hWnd, hDC ); lpDdeProc = MakeProcInstance ( (FARPROC) DDECallback, hInst ); if ( DdeInitialize ( (LPDWORD)&idInst, (PFNCALLBACK)lpDdeProc, APPCLASS_STANDARD, 0L ) ) { HandleOutput ( "DDE initialization failure." ); return ( FALSE ); } else { hszService = DdeCreateStringHandle ( idInst, "NrnBBS", CP_WINANSI ); hszAdmin = DdeCreateStringHandle ( idInst, "Admin", CP_WINANSI ); hszUser = DdeCreateStringHandle ( idInst, "User", CP_WINANSI ); hConvApp = DdeConnect ( idInst, hszService, 0L, (PCONVCONTEXT) NULL ); if ( hConvApp ){ MessageBox(NULL, "NrnBBS server already running", "NrnBBS", MB_OK); DdeDisconnect(hConvApp); hConvApp = 0; DestroyWindow(hWnd); break; } DdeNameService ( idInst, hszService, (HSZ) NULL, DNS_REGISTER ); } cCurrentLine = 0; cTotalLines = 0; break; case WM_COMMAND: switch ( GET_WM_COMMAND_ID(wParam, lParam) ) { case IDM_EXIT: DestroyWindow ( hWnd ); break; case IDM_SHOW_CONNECTIONS: nrnbbs_show_postings(); break; default: return ( DefWindowProc ( hWnd, message, wParam, lParam ) ); } break; case WM_PAINT: hDC = BeginPaint ( hWnd, &ps ); y = 0; for ( i = 0; i < cTotalLines; i ++ ) { if ( cTotalLines == 8 ) j = ( (cCurrentLine + 1 + i) % 9 ); else j = i; TextOut ( hDC, 0, y, (LPSTR)(szScreenText[j]), lstrlen ( szScreenText[j] ) ); y = y + cyChar; } EndPaint ( hWnd, &ps ); break; case WM_DESTROY: if ( hConvApp != (HCONV)NULL ) { DdeDisconnect ( hConvApp ); hConvApp = (HCONV)NULL; } DdeFreeStringHandle ( idInst, hszService ); DdeFreeStringHandle ( idInst, hszAdmin ); DdeFreeStringHandle ( idInst, hszUser ); FreeProcInstance ( lpDdeProc ); PostQuitMessage ( 0 ); break; default: return ( DefWindowProc ( hWnd, message, wParam, lParam ) ); } return ( FALSE ); } #pragma warn .eff /***************************************************************************/ #pragma argsused HDDEDATA EXPENTRY _export DDECallback ( WORD wType, WORD wFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2 ) { switch ( wType ) { case XTYP_CONNECT: if ( hsz2 == hszService ){ return ( (HDDEDATA) TRUE ); }else{ HandleOutput ( "XTYP_CONNECT: hsz2 != hszService" ); return ( (HDDEDATA) FALSE ); } case XTYP_REQUEST: /* hsz1 topic ; hsz2 item */ DdeQueryString(idInst, hsz2, szDDEData, 40, CP_WINANSI); if (hsz1 == hszUser) { nrnbbs_server_take(szDDEData, szDDEString); }else if (hsz1 == hszAdmin) { nrnbbs_server_admin_request(szDDEData, szDDEString); }else{ HandleOutput("Request for invalid Topic."); return ( (HDDEDATA)NULL ); } hData = DdeCreateDataHandle ( idInst, (LPBYTE) szDDEString, sizeof ( szDDEString ), 0L, hsz1, wFmt, 0 ); if ( hData != (HDDEDATA)NULL ){ return ( hData ); }else{ HandleOutput ( "Could not create data handle." ); return ( (HDDEDATA)NULL ); } case XTYP_EXECUTE: break; case XTYP_POKE: /* hsz1 topic; hsz2 item */ DdeGetData ( hData, (LPBYTE) szDDEData, 80L, 0L ); if ( szDDEData != NULL ){ DdeQueryString(idInst, hsz2, szDDEString, 40, CP_WINANSI); if (hsz1 == hszUser) { nrnbbs_server_post(szDDEString, szDDEData); }else if (hsz1 == hszAdmin) { nrnbbs_server_admin_post(szDDEString, szDDEData); }else{ return ( (HDDEDATA) NULL ); } DdePostAdvise(idInst, hsz1, hsz2); return ( (HDDEDATA) DDE_FACK ); } return ( (HDDEDATA) NULL ); case XTYP_CONNECT_CONFIRM: HandleOutput ( "DDE connection confirmed." ); hConvApp = hConv; break; case XTYP_DISCONNECT: hConvApp = (HCONV)NULL; HandleOutput ( "A client has disconnected." ); break; case XTYP_ADVREQ: hData = DdeCreateDataHandle ( idInst, (LPBYTE) szDDEString, // sizeof ( szDDEString ), hsz1, hsz2, wFmt, 0 ); sizeof ( szDDEString ), 0L, hsz2, wFmt, 0 ); if ( hData != (HDDEDATA)NULL ){ return ( hData ); }else{ HandleOutput ( "Could not create data handle." ); return ( (HDDEDATA)NULL ); } case XTYP_ADVSTART: return TRUE; case XTYP_ERROR: break; } return ( (HDDEDATA) NULL ); } /***************************************************************************/ void HandleOutput ( char *szOutputString ) { //DebugMessage("%s\n", szOutputString); strcpy ( szScreenText[cCurrentLine], szOutputString ); cCurrentLine = ( cCurrentLine + 1 ) % 9; if ( cTotalLines < 8 ) cTotalLines++; InvalidateRect ( hWnd, NULL, TRUE ); UpdateWindow ( hWnd ); } neuron-7.5/src/mswin/wnrnbbs/ddesrvr.h000077500000000000000000000015241323325274500201270ustar00rootroot00000000000000/* Borland C++ - (C) Copyright 1992 by Borland International */ /* External References */ extern HANDLE hInst; extern HWND hWnd; /* Resource Defines */ #define ID_DDECLIENT 100 #define ID_DDESERVER 101 /* Menu Selection Defines */ #define IDM_EXIT 100 #define IDM_SHOW_CONNECTIONS 101 #define IDM_ABOUT 103 /* Forward References */ LRESULT CALLBACK MainWndProc ( HWND, UINT, WPARAM, LPARAM ); BOOL FAR PASCAL InitApplication ( HANDLE ); BOOL InitInstance ( HANDLE hInstance, int nCmdShow ); BOOL CALLBACK About ( HWND, UINT, WPARAM, LPARAM ); HDDEDATA EXPENTRY DDECallback ( WORD, WORD, HCONV, HSZ, HSZ, HDDEDATA, DWORD, DWORD ); void HandleOutput ( char * ); neuron-7.5/src/mswin/wnrnbbs/ddesrvr.ico000077500000000000000000000013761323325274500204570ustar00rootroot00000000000000 è( @€¿¿¿¿¿¿¿¿¿ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿˆˆˆˆˆˆˆˆˆˆˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÌÌŒÌÌÌÌÌÌÀ ˆÌÌÌÌÌ»°€ »»ˆ»»»° »»»»»°»°€ˆˆˆˆˆ€»°ˆˆ€€»°€»°€»°€€€€€€ ÌÌÌÌÌÌÌÌÌÀ€ ÌÌÌÌÌÌÌÌÌÀ€ÿÀÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿ€ÿàÿÿÀÿÿÀÿÿÀÿÿøÿ€ÿÿø9ÿø9ÿø9ÿø9ÿÿùÿÿùÿÿùÿÿÿÿÿneuron-7.5/src/mswin/wnrnbbs/ddesrvr.rc000077500000000000000000000017321323325274500203050ustar00rootroot00000000000000/* Borland C++ - (C) Copyright 1992 by Borland International */ #define STRICT #include #include "ddesrvr.h" DDEServerIcon ICON ddesrvr.ico DDEServerMenu MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", IDM_EXIT END MENUITEM "&Show Connections", IDM_SHOW_CONNECTIONS POPUP "\a&Help" BEGIN MENUITEM "&About", IDM_ABOUT END END AboutBox DIALOG 22, 17, 144, 110 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About DDEServer" BEGIN ICON "DDEServerIcon", -1, 8, 85, 0, 0 CTEXT "Microsoft Windows" -1, 0, 8, 144, 8 CTEXT "DDE Server Application" -1, 0, 20, 144, 8 CTEXT "Version 1.0" -1, 0, 40, 144, 8 CTEXT "A Borland Example" -1, 0, 60, 144, 8 DEFPUSHBUTTON "OK" IDOK, 53, 85, 32, 14, WS_GROUP END neuron-7.5/src/mswin/wnrnbbs/nrnbbs.cpp000066400000000000000000000065361323325274500203020ustar00rootroot00000000000000#include #include //#include #include #include #include "nrnbbs.h" //#include "/nrn/src/winio/debug.h" extern "C" { void nrnbbs_server_post(const char* name, const char* value); void nrnbbs_server_take(const char* name, char* value); void nrnbbs_server_admin_post(const char* name, const char* value); void nrnbbs_server_admin_request(const char* name, char* value); void nrnbbs_show_postings(); void HandleOutput ( const char *); } class NrnMessage { public: NrnMessage(const char* name, const char* value); virtual ~NrnMessage(); const String& message(); const char* name(); bool equal(const char*); const char* value(); private: CopyString s_; CopyString value_; }; declarePtrList(NrnMessageList, NrnMessage) implementPtrList(NrnMessageList, NrnMessage) class NrnBBSImpl { public: NrnBBSImpl(); virtual ~NrnBBSImpl(); long lookup(const char*); public: NrnMessageList ml_; }; static NrnBBSImpl* bi_; bool nrnbbs_connect() { if (!bi_) { bi_ = new NrnBBSImpl(); } return true; } void nrnbbs_disconnect() { if (bi_) { delete bi_; bi_ = nil; } } void nrnbbs_server_post(const char* name, const char* value) { NrnMessage* m; m = new NrnMessage(name, value); bi_->ml_.append(m); char buf[256]; sprintf(buf, "%d post |%s| |%s|", bi_->ml_.count(), name, value); HandleOutput(buf); } void nrnbbs_show_postings() { long i; if (bi_->ml_.count() == 0) { HandleOutput("NrnBBS is empty"); } for (i = 0; i < bi_->ml_.count(); ++i) { char buf[256]; NrnMessage* m = bi_->ml_.item(i); sprintf(buf, "%d |%s| |%s|", i+1, m->name(), m->value()); HandleOutput(buf); } } void nrnbbs_server_take(const char* name, char* value) { long i; i = bi_->lookup(name+1); if (i >= 0) { sprintf(value, "1%s", bi_->ml_.item(i)->value()); if (name[0] == '0') { // only look if 1, don't take bi_->ml_.remove(i); char buf[256]; sprintf(buf, "%d take |%s| |%s|", bi_->ml_.count(), name, value); HandleOutput(buf); } #if 1 else{ char buf[256]; sprintf(buf, "%d look |%s| |%s|", bi_->ml_.count(), name, value); HandleOutput(buf); } #endif }else{ sprintf(value, "0"); } } void nrnbbs_server_admin_post(const char* name, const char* value) { NrnMessage* m; m = new NrnMessage(name, value); bi_->ml_.append(m); //DebugMessage("%d post |%s| |%s|\n", bi_->ml_.count(), name, value); } void nrnbbs_server_admin_request(const char* name, char* value) { long i; i = bi_->lookup(name+1); if (i >= 0) { sprintf(value, "1%s", bi_->ml_.item(i)->value()); if (name[0] == '0') { // only look if 1, don't take bi_->ml_.remove(i); //DebugMessage("%d take |%s| |%s|\n", bi_->ml_.count(), name, value); } }else{ sprintf(value, "0"); } } NrnBBSImpl::NrnBBSImpl() { } NrnBBSImpl::~NrnBBSImpl() { long i, cnt = ml_.count(); for (i = 0; i < cnt; ++i) { delete ml_.item(i); } } long NrnBBSImpl::lookup(const char* name) { long i, cnt; cnt = ml_.count(); for (i = 0; i < cnt; ++i) { if (ml_.item(i)->equal(name)) { return i; } } return -1; } NrnMessage::NrnMessage(const char* name, const char* value){ s_ = name; value_ = value; } NrnMessage::~NrnMessage() { } bool NrnMessage::equal(const char* name) { if (strcmp(name, s_.string()) == 0){ return true; }else{ return false; } } const char* NrnMessage::value() { return value_.string(); } const char* NrnMessage::name() { return s_.string(); } neuron-7.5/src/mswin/wnrnbbs/nrnbbs.h000066400000000000000000000014761323325274500177450ustar00rootroot00000000000000#ifndef nrnbbs_h #define nrnbbs_h typedef void (*NrnBBSCallback)(const char*); #if defined(__cplusplus) extern "C" { #endif bool nrnbbs_connect(); void nrnbbs_disconnect(); bool nrnbbs_connected(); void nrnbbs_post(const char*); void nrnbbs_post_int(const char*, int); void nrnbbs_post_string(const char*, const char*); bool nrnbbs_take(const char*); bool nrnbbs_take_int(const char*, int*); bool nrnbbs_take_string(const char*, char*); bool nrnbbs_look(const char*); void nrnbbs_exec(const char*); void nrnbbs_notify(const char*, NrnBBSCallback); // return when *pflag = true or one step wait if no arg void nrnbbs_wait(bool* pflag); /* for debugging and bbs management */ #if 0 void nrnbbs_clean(); void nnrbbs_quit(); int nrnbbs_count(); bool nrnbbs_query(long index); #endif #if defined(__cplusplus) } #endif #endif neuron-7.5/src/neuronmusic/000077500000000000000000000000001323325274500160375ustar00rootroot00000000000000neuron-7.5/src/neuronmusic/Makefile.am000066400000000000000000000011251323325274500200720ustar00rootroot00000000000000 CYTHON = @CYTHON@ PYTHON = @PYTHON@ nmsrc = $(top_srcdir)/src/neuronmusic all: neuronmusic.cpp neuronmusic.cpp: neuronmusic.pyx neuronmusic.pxd nrnmusic.h $(CYTHON) $(nmsrc)/neuronmusic.pyx -o neuronmusic.cpp pkginclude_HEADERS = nrnmusic.h EXTRA_DIST = neuronmusic.cpp neuronmusic.pxd neuronmusic.pyx install-exec-am: neuronmusic.cpp if test ! -f neuronmusic.cpp ; then \ cp $(nmsrc)/neuronmusic.cpp . ; \ fi $(PYTHON) setup.py install --install-lib=@prefix@/share/nrn/lib/python clean-generic: rm -r -f build if test "$(CYTHON)" != "echo" ; then \ rm -f neuronmusic.cpp ; \ fi neuron-7.5/src/neuronmusic/Makefile.in000066400000000000000000000511431323325274500201100ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/neuronmusic ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = setup.py CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/setup.py.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ nmsrc = $(top_srcdir)/src/neuronmusic pkginclude_HEADERS = nrnmusic.h EXTRA_DIST = neuronmusic.cpp neuronmusic.pxd neuronmusic.pyx all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/neuronmusic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/neuronmusic/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile all: neuronmusic.cpp neuronmusic.cpp: neuronmusic.pyx neuronmusic.pxd nrnmusic.h $(CYTHON) $(nmsrc)/neuronmusic.pyx -o neuronmusic.cpp install-exec-am: neuronmusic.cpp if test ! -f neuronmusic.cpp ; then \ cp $(nmsrc)/neuronmusic.cpp . ; \ fi $(PYTHON) setup.py install --install-lib=@prefix@/share/nrn/lib/python clean-generic: rm -r -f build if test "$(CYTHON)" != "echo" ; then \ rm -f neuronmusic.cpp ; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/neuronmusic/neuronmusic.cpp000066400000000000000000003301201323325274500211110ustar00rootroot00000000000000/* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__neuronmusic #define __PYX_HAVE_API__neuronmusic #include "music.hh" #include "nrnmusic.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "neuronmusic.pyx", }; /*--- Type declarations ---*/ struct __pyx_obj_11neuronmusic_EventOutputPort; struct __pyx_obj_11neuronmusic_EventInputPort; /* "neuronmusic.pyx":3 * from neuronmusic cimport * * * cdef class EventOutputPort: # <<<<<<<<<<<<<< * cdef cxx_EventOutputPort* cxx # hold a C++ instance which we're wrapping * */ struct __pyx_obj_11neuronmusic_EventOutputPort { PyObject_HEAD NRNMUSIC::EventOutputPort *cxx; }; /* "neuronmusic.pyx":22 * * * cdef class EventInputPort: # <<<<<<<<<<<<<< * cdef cxx_EventInputPort* cxx # hold a C++ instance which we're wrapping * */ struct __pyx_obj_11neuronmusic_EventInputPort { PyObject_HEAD NRNMUSIC::EventInputPort *cxx; }; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'neuronmusic' */ static PyTypeObject *__pyx_ptype_11neuronmusic_EventOutputPort = 0; static PyTypeObject *__pyx_ptype_11neuronmusic_EventInputPort = 0; static PyObject *__pyx_f_11neuronmusic_wrapEventOutputPort(NRNMUSIC::EventOutputPort *); /*proto*/ static PyObject *__pyx_f_11neuronmusic_wrapEventInputPort(NRNMUSIC::EventInputPort *); /*proto*/ #define __Pyx_MODULE_NAME "neuronmusic" int __pyx_module_is_main_neuronmusic = 0; /* Implementation of 'neuronmusic' */ static char __pyx_k_gi[] = "gi"; static char __pyx_k_gid[] = "gid"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_target[] = "target"; static char __pyx_k_identifier[] = "identifier"; static char __pyx_k_neuronmusic[] = "neuronmusic"; static char __pyx_k_publishEventInput[] = "publishEventInput"; static char __pyx_k_publishEventOutput[] = "publishEventOutput"; static char __pyx_k_home_hines_neuron_nrn_src_neuro[] = "/home/hines/neuron/nrn/src/neuronmusic/neuronmusic.pyx"; static PyObject *__pyx_n_s_gi; static PyObject *__pyx_n_s_gid; static PyObject *__pyx_kp_s_home_hines_neuron_nrn_src_neuro; static PyObject *__pyx_n_s_identifier; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_neuronmusic; static PyObject *__pyx_n_s_publishEventInput; static PyObject *__pyx_n_s_publishEventOutput; static PyObject *__pyx_n_s_target; static PyObject *__pyx_n_s_test; static int __pyx_pf_11neuronmusic_15EventOutputPort___cinit__(struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_self); /* proto */ static void __pyx_pf_11neuronmusic_15EventOutputPort_2__dealloc__(struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_11neuronmusic_15EventOutputPort_4gid2index(struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_self, int __pyx_v_gid, int __pyx_v_gi); /* proto */ static int __pyx_pf_11neuronmusic_14EventInputPort___cinit__(struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_self); /* proto */ static void __pyx_pf_11neuronmusic_14EventInputPort_2__dealloc__(struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_11neuronmusic_14EventInputPort_4index2target(struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_self, int __pyx_v_gi, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_11neuronmusic_publishEventOutput(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_identifier); /* proto */ static PyObject *__pyx_pf_11neuronmusic_2publishEventInput(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_identifier); /* proto */ static PyObject *__pyx_tp_new_11neuronmusic_EventOutputPort(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_11neuronmusic_EventInputPort(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__3; static PyObject *__pyx_codeobj__2; static PyObject *__pyx_codeobj__4; /* "neuronmusic.pyx":6 * cdef cxx_EventOutputPort* cxx # hold a C++ instance which we're wrapping * * def __cinit__ (self): # <<<<<<<<<<<<<< * self.cxx = NULL * */ /* Python wrapper */ static int __pyx_pw_11neuronmusic_15EventOutputPort_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_11neuronmusic_15EventOutputPort_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_11neuronmusic_15EventOutputPort___cinit__(((struct __pyx_obj_11neuronmusic_EventOutputPort *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_11neuronmusic_15EventOutputPort___cinit__(struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "neuronmusic.pyx":7 * * def __cinit__ (self): * self.cxx = NULL # <<<<<<<<<<<<<< * * def __dealloc__ (self): */ __pyx_v_self->cxx = NULL; /* "neuronmusic.pyx":6 * cdef cxx_EventOutputPort* cxx # hold a C++ instance which we're wrapping * * def __cinit__ (self): # <<<<<<<<<<<<<< * self.cxx = NULL * */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":9 * self.cxx = NULL * * def __dealloc__ (self): # <<<<<<<<<<<<<< * del_EventOutputPort (self.cxx) * */ /* Python wrapper */ static void __pyx_pw_11neuronmusic_15EventOutputPort_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_11neuronmusic_15EventOutputPort_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_11neuronmusic_15EventOutputPort_2__dealloc__(((struct __pyx_obj_11neuronmusic_EventOutputPort *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_11neuronmusic_15EventOutputPort_2__dealloc__(struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "neuronmusic.pyx":10 * * def __dealloc__ (self): * del_EventOutputPort (self.cxx) # <<<<<<<<<<<<<< * * def gid2index (self, int gid, int gi): */ delete(__pyx_v_self->cxx); /* "neuronmusic.pyx":9 * self.cxx = NULL * * def __dealloc__ (self): # <<<<<<<<<<<<<< * del_EventOutputPort (self.cxx) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "neuronmusic.pyx":12 * del_EventOutputPort (self.cxx) * * def gid2index (self, int gid, int gi): # <<<<<<<<<<<<<< * if self.cxx != NULL: * self.cxx.gid2index (gid, gi) */ /* Python wrapper */ static PyObject *__pyx_pw_11neuronmusic_15EventOutputPort_5gid2index(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_11neuronmusic_15EventOutputPort_5gid2index(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_gid; int __pyx_v_gi; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("gid2index (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gid,&__pyx_n_s_gi,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gid)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gi)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("gid2index", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gid2index") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_gid = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_gid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_gi = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_gi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("gid2index", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuronmusic.EventOutputPort.gid2index", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11neuronmusic_15EventOutputPort_4gid2index(((struct __pyx_obj_11neuronmusic_EventOutputPort *)__pyx_v_self), __pyx_v_gid, __pyx_v_gi); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11neuronmusic_15EventOutputPort_4gid2index(struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_self, int __pyx_v_gid, int __pyx_v_gi) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("gid2index", 0); /* "neuronmusic.pyx":13 * * def gid2index (self, int gid, int gi): * if self.cxx != NULL: # <<<<<<<<<<<<<< * self.cxx.gid2index (gid, gi) * */ __pyx_t_1 = ((__pyx_v_self->cxx != NULL) != 0); if (__pyx_t_1) { /* "neuronmusic.pyx":14 * def gid2index (self, int gid, int gi): * if self.cxx != NULL: * self.cxx.gid2index (gid, gi) # <<<<<<<<<<<<<< * * cdef wrapEventOutputPort (cxx_EventOutputPort* port): */ __pyx_v_self->cxx->gid2index(__pyx_v_gid, __pyx_v_gi); /* "neuronmusic.pyx":13 * * def gid2index (self, int gid, int gi): * if self.cxx != NULL: # <<<<<<<<<<<<<< * self.cxx.gid2index (gid, gi) * */ } /* "neuronmusic.pyx":12 * del_EventOutputPort (self.cxx) * * def gid2index (self, int gid, int gi): # <<<<<<<<<<<<<< * if self.cxx != NULL: * self.cxx.gid2index (gid, gi) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":16 * self.cxx.gid2index (gid, gi) * * cdef wrapEventOutputPort (cxx_EventOutputPort* port): # <<<<<<<<<<<<<< * cdef EventOutputPort port_ = EventOutputPort () * port_.cxx = port */ static PyObject *__pyx_f_11neuronmusic_wrapEventOutputPort(NRNMUSIC::EventOutputPort *__pyx_v_port) { struct __pyx_obj_11neuronmusic_EventOutputPort *__pyx_v_port_ = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wrapEventOutputPort", 0); /* "neuronmusic.pyx":17 * * cdef wrapEventOutputPort (cxx_EventOutputPort* port): * cdef EventOutputPort port_ = EventOutputPort () # <<<<<<<<<<<<<< * port_.cxx = port * return port_ */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11neuronmusic_EventOutputPort), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_port_ = ((struct __pyx_obj_11neuronmusic_EventOutputPort *)__pyx_t_1); __pyx_t_1 = 0; /* "neuronmusic.pyx":18 * cdef wrapEventOutputPort (cxx_EventOutputPort* port): * cdef EventOutputPort port_ = EventOutputPort () * port_.cxx = port # <<<<<<<<<<<<<< * return port_ * */ __pyx_v_port_->cxx = __pyx_v_port; /* "neuronmusic.pyx":19 * cdef EventOutputPort port_ = EventOutputPort () * port_.cxx = port * return port_ # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_port_)); __pyx_r = ((PyObject *)__pyx_v_port_); goto __pyx_L0; /* "neuronmusic.pyx":16 * self.cxx.gid2index (gid, gi) * * cdef wrapEventOutputPort (cxx_EventOutputPort* port): # <<<<<<<<<<<<<< * cdef EventOutputPort port_ = EventOutputPort () * port_.cxx = port */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuronmusic.wrapEventOutputPort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_port_); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":25 * cdef cxx_EventInputPort* cxx # hold a C++ instance which we're wrapping * * def __cinit__ (self): # <<<<<<<<<<<<<< * self.cxx = NULL * */ /* Python wrapper */ static int __pyx_pw_11neuronmusic_14EventInputPort_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_11neuronmusic_14EventInputPort_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_11neuronmusic_14EventInputPort___cinit__(((struct __pyx_obj_11neuronmusic_EventInputPort *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_11neuronmusic_14EventInputPort___cinit__(struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "neuronmusic.pyx":26 * * def __cinit__ (self): * self.cxx = NULL # <<<<<<<<<<<<<< * * def __dealloc__ (self): */ __pyx_v_self->cxx = NULL; /* "neuronmusic.pyx":25 * cdef cxx_EventInputPort* cxx # hold a C++ instance which we're wrapping * * def __cinit__ (self): # <<<<<<<<<<<<<< * self.cxx = NULL * */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":28 * self.cxx = NULL * * def __dealloc__ (self): # <<<<<<<<<<<<<< * del_EventInputPort (self.cxx) * */ /* Python wrapper */ static void __pyx_pw_11neuronmusic_14EventInputPort_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_11neuronmusic_14EventInputPort_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_11neuronmusic_14EventInputPort_2__dealloc__(((struct __pyx_obj_11neuronmusic_EventInputPort *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_11neuronmusic_14EventInputPort_2__dealloc__(struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "neuronmusic.pyx":29 * * def __dealloc__ (self): * del_EventInputPort (self.cxx) # <<<<<<<<<<<<<< * * def index2target (self, int gi, target): */ delete(__pyx_v_self->cxx); /* "neuronmusic.pyx":28 * self.cxx = NULL * * def __dealloc__ (self): # <<<<<<<<<<<<<< * del_EventInputPort (self.cxx) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "neuronmusic.pyx":31 * del_EventInputPort (self.cxx) * * def index2target (self, int gi, target): # <<<<<<<<<<<<<< * if self.cxx != NULL: * return self.cxx.index2target (gi, target) */ /* Python wrapper */ static PyObject *__pyx_pw_11neuronmusic_14EventInputPort_5index2target(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_11neuronmusic_14EventInputPort_5index2target(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_gi; PyObject *__pyx_v_target = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("index2target (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gi,&__pyx_n_s_target,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gi)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("index2target", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "index2target") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_gi = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_gi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_target = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("index2target", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("neuronmusic.EventInputPort.index2target", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11neuronmusic_14EventInputPort_4index2target(((struct __pyx_obj_11neuronmusic_EventInputPort *)__pyx_v_self), __pyx_v_gi, __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11neuronmusic_14EventInputPort_4index2target(struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_self, int __pyx_v_gi, PyObject *__pyx_v_target) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("index2target", 0); /* "neuronmusic.pyx":32 * * def index2target (self, int gi, target): * if self.cxx != NULL: # <<<<<<<<<<<<<< * return self.cxx.index2target (gi, target) * else: */ __pyx_t_1 = ((__pyx_v_self->cxx != NULL) != 0); if (__pyx_t_1) { /* "neuronmusic.pyx":33 * def index2target (self, int gi, target): * if self.cxx != NULL: * return self.cxx.index2target (gi, target) # <<<<<<<<<<<<<< * else: * return False */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_v_self->cxx->index2target(__pyx_v_gi, __pyx_v_target); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "neuronmusic.pyx":32 * * def index2target (self, int gi, target): * if self.cxx != NULL: # <<<<<<<<<<<<<< * return self.cxx.index2target (gi, target) * else: */ } /* "neuronmusic.pyx":35 * return self.cxx.index2target (gi, target) * else: * return False # <<<<<<<<<<<<<< * * cdef wrapEventInputPort (cxx_EventInputPort* port): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } /* "neuronmusic.pyx":31 * del_EventInputPort (self.cxx) * * def index2target (self, int gi, target): # <<<<<<<<<<<<<< * if self.cxx != NULL: * return self.cxx.index2target (gi, target) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuronmusic.EventInputPort.index2target", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":37 * return False * * cdef wrapEventInputPort (cxx_EventInputPort* port): # <<<<<<<<<<<<<< * cdef EventInputPort port_ = EventInputPort () * port_.cxx = port */ static PyObject *__pyx_f_11neuronmusic_wrapEventInputPort(NRNMUSIC::EventInputPort *__pyx_v_port) { struct __pyx_obj_11neuronmusic_EventInputPort *__pyx_v_port_ = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wrapEventInputPort", 0); /* "neuronmusic.pyx":38 * * cdef wrapEventInputPort (cxx_EventInputPort* port): * cdef EventInputPort port_ = EventInputPort () # <<<<<<<<<<<<<< * port_.cxx = port * return port_ */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11neuronmusic_EventInputPort), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_port_ = ((struct __pyx_obj_11neuronmusic_EventInputPort *)__pyx_t_1); __pyx_t_1 = 0; /* "neuronmusic.pyx":39 * cdef wrapEventInputPort (cxx_EventInputPort* port): * cdef EventInputPort port_ = EventInputPort () * port_.cxx = port # <<<<<<<<<<<<<< * return port_ * */ __pyx_v_port_->cxx = __pyx_v_port; /* "neuronmusic.pyx":40 * cdef EventInputPort port_ = EventInputPort () * port_.cxx = port * return port_ # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_port_)); __pyx_r = ((PyObject *)__pyx_v_port_); goto __pyx_L0; /* "neuronmusic.pyx":37 * return False * * cdef wrapEventInputPort (cxx_EventInputPort* port): # <<<<<<<<<<<<<< * cdef EventInputPort port_ = EventInputPort () * port_.cxx = port */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("neuronmusic.wrapEventInputPort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_port_); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":43 * * * def publishEventOutput (identifier): # <<<<<<<<<<<<<< * return wrapEventOutputPort (cxx_publishEventOutput (identifier)) * */ /* Python wrapper */ static PyObject *__pyx_pw_11neuronmusic_1publishEventOutput(PyObject *__pyx_self, PyObject *__pyx_v_identifier); /*proto*/ static PyMethodDef __pyx_mdef_11neuronmusic_1publishEventOutput = {"publishEventOutput", (PyCFunction)__pyx_pw_11neuronmusic_1publishEventOutput, METH_O, 0}; static PyObject *__pyx_pw_11neuronmusic_1publishEventOutput(PyObject *__pyx_self, PyObject *__pyx_v_identifier) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("publishEventOutput (wrapper)", 0); __pyx_r = __pyx_pf_11neuronmusic_publishEventOutput(__pyx_self, ((PyObject *)__pyx_v_identifier)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11neuronmusic_publishEventOutput(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_identifier) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("publishEventOutput", 0); /* "neuronmusic.pyx":44 * * def publishEventOutput (identifier): * return wrapEventOutputPort (cxx_publishEventOutput (identifier)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_identifier); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_f_11neuronmusic_wrapEventOutputPort(NRNMUSIC::publishEventOutput(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "neuronmusic.pyx":43 * * * def publishEventOutput (identifier): # <<<<<<<<<<<<<< * return wrapEventOutputPort (cxx_publishEventOutput (identifier)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuronmusic.publishEventOutput", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "neuronmusic.pyx":47 * * * def publishEventInput (identifier): # <<<<<<<<<<<<<< * return wrapEventInputPort (cxx_publishEventInput (identifier)) * */ /* Python wrapper */ static PyObject *__pyx_pw_11neuronmusic_3publishEventInput(PyObject *__pyx_self, PyObject *__pyx_v_identifier); /*proto*/ static PyMethodDef __pyx_mdef_11neuronmusic_3publishEventInput = {"publishEventInput", (PyCFunction)__pyx_pw_11neuronmusic_3publishEventInput, METH_O, 0}; static PyObject *__pyx_pw_11neuronmusic_3publishEventInput(PyObject *__pyx_self, PyObject *__pyx_v_identifier) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("publishEventInput (wrapper)", 0); __pyx_r = __pyx_pf_11neuronmusic_2publishEventInput(__pyx_self, ((PyObject *)__pyx_v_identifier)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11neuronmusic_2publishEventInput(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_identifier) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("publishEventInput", 0); /* "neuronmusic.pyx":48 * * def publishEventInput (identifier): * return wrapEventInputPort (cxx_publishEventInput (identifier)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_identifier); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_f_11neuronmusic_wrapEventInputPort(NRNMUSIC::publishEventInput(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "neuronmusic.pyx":47 * * * def publishEventInput (identifier): # <<<<<<<<<<<<<< * return wrapEventInputPort (cxx_publishEventInput (identifier)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("neuronmusic.publishEventInput", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_11neuronmusic_EventOutputPort(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_11neuronmusic_15EventOutputPort_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_11neuronmusic_EventOutputPort(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_11neuronmusic_15EventOutputPort_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_11neuronmusic_EventOutputPort[] = { {"gid2index", (PyCFunction)__pyx_pw_11neuronmusic_15EventOutputPort_5gid2index, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_11neuronmusic_EventOutputPort = { PyVarObject_HEAD_INIT(0, 0) "neuronmusic.EventOutputPort", /*tp_name*/ sizeof(struct __pyx_obj_11neuronmusic_EventOutputPort), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_11neuronmusic_EventOutputPort, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_11neuronmusic_EventOutputPort, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_11neuronmusic_EventOutputPort, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyObject *__pyx_tp_new_11neuronmusic_EventInputPort(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_11neuronmusic_14EventInputPort_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_11neuronmusic_EventInputPort(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_11neuronmusic_14EventInputPort_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_11neuronmusic_EventInputPort[] = { {"index2target", (PyCFunction)__pyx_pw_11neuronmusic_14EventInputPort_5index2target, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_11neuronmusic_EventInputPort = { PyVarObject_HEAD_INIT(0, 0) "neuronmusic.EventInputPort", /*tp_name*/ sizeof(struct __pyx_obj_11neuronmusic_EventInputPort), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_11neuronmusic_EventInputPort, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_11neuronmusic_EventInputPort, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_11neuronmusic_EventInputPort, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "neuronmusic", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_gi, __pyx_k_gi, sizeof(__pyx_k_gi), 0, 0, 1, 1}, {&__pyx_n_s_gid, __pyx_k_gid, sizeof(__pyx_k_gid), 0, 0, 1, 1}, {&__pyx_kp_s_home_hines_neuron_nrn_src_neuro, __pyx_k_home_hines_neuron_nrn_src_neuro, sizeof(__pyx_k_home_hines_neuron_nrn_src_neuro), 0, 0, 1, 0}, {&__pyx_n_s_identifier, __pyx_k_identifier, sizeof(__pyx_k_identifier), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_neuronmusic, __pyx_k_neuronmusic, sizeof(__pyx_k_neuronmusic), 0, 0, 1, 1}, {&__pyx_n_s_publishEventInput, __pyx_k_publishEventInput, sizeof(__pyx_k_publishEventInput), 0, 0, 1, 1}, {&__pyx_n_s_publishEventOutput, __pyx_k_publishEventOutput, sizeof(__pyx_k_publishEventOutput), 0, 0, 1, 1}, {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { return 0; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "neuronmusic.pyx":43 * * * def publishEventOutput (identifier): # <<<<<<<<<<<<<< * return wrapEventOutputPort (cxx_publishEventOutput (identifier)) * */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_identifier); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_src_neuro, __pyx_n_s_publishEventOutput, 43, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "neuronmusic.pyx":47 * * * def publishEventInput (identifier): # <<<<<<<<<<<<<< * return wrapEventInputPort (cxx_publishEventInput (identifier)) * */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_identifier); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_hines_neuron_nrn_src_neuro, __pyx_n_s_publishEventInput, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initneuronmusic(void); /*proto*/ PyMODINIT_FUNC initneuronmusic(void) #else PyMODINIT_FUNC PyInit_neuronmusic(void); /*proto*/ PyMODINIT_FUNC PyInit_neuronmusic(void) #endif { PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_neuronmusic(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("neuronmusic", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_neuronmusic) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "neuronmusic")) { if (unlikely(PyDict_SetItemString(modules, "neuronmusic", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_11neuronmusic_EventOutputPort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_11neuronmusic_EventOutputPort.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "EventOutputPort", (PyObject *)&__pyx_type_11neuronmusic_EventOutputPort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_11neuronmusic_EventOutputPort = &__pyx_type_11neuronmusic_EventOutputPort; if (PyType_Ready(&__pyx_type_11neuronmusic_EventInputPort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_11neuronmusic_EventInputPort.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "EventInputPort", (PyObject *)&__pyx_type_11neuronmusic_EventInputPort) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_11neuronmusic_EventInputPort = &__pyx_type_11neuronmusic_EventInputPort; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "neuronmusic.pyx":43 * * * def publishEventOutput (identifier): # <<<<<<<<<<<<<< * return wrapEventOutputPort (cxx_publishEventOutput (identifier)) * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11neuronmusic_1publishEventOutput, NULL, __pyx_n_s_neuronmusic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_publishEventOutput, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuronmusic.pyx":47 * * * def publishEventInput (identifier): # <<<<<<<<<<<<<< * return wrapEventInputPort (cxx_publishEventInput (identifier)) * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11neuronmusic_3publishEventInput, NULL, __pyx_n_s_neuronmusic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_publishEventInput, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "neuronmusic.pyx":1 * from neuronmusic cimport * # <<<<<<<<<<<<<< * * cdef class EventOutputPort: */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init neuronmusic", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init neuronmusic"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ neuron-7.5/src/neuronmusic/neuronmusic.pxd000066400000000000000000000016071323325274500211270ustar00rootroot00000000000000cdef extern from "music.hh": ctypedef struct cxx_Setup "MUSIC::Setup" cdef extern from "nrnmusic.h": ctypedef struct cxx_EventOutputPort "NRNMUSIC::EventOutputPort": void gid2index (int gid, int gi) cxx_EventOutputPort* new_EventOutputPort "new NRNMUSIC::EventOutputPort" (cxx_Setup* s, char* id) void del_EventOutputPort "delete" (cxx_EventOutputPort* obj) ctypedef struct cxx_EventInputPort "NRNMUSIC::EventInputPort": object index2target (int gi, object target) cxx_EventInputPort* new_EventInputPort "new NRNMUSIC::EventInputPort" (cxx_Setup* s, char* id) void del_EventInputPort "delete" (cxx_EventInputPort* obj) cxx_EventOutputPort* cxx_publishEventOutput "NRNMUSIC::publishEventOutput" (char* identifier) cxx_EventInputPort* cxx_publishEventInput "NRNMUSIC::publishEventInput" (char* identifier) # Local Variables: # mode: python # End: neuron-7.5/src/neuronmusic/neuronmusic.pyx000066400000000000000000000024331323325274500211520ustar00rootroot00000000000000from neuronmusic cimport * cdef class EventOutputPort: cdef cxx_EventOutputPort* cxx # hold a C++ instance which we're wrapping def __cinit__ (self): self.cxx = NULL def __dealloc__ (self): del_EventOutputPort (self.cxx) def gid2index (self, int gid, int gi): if self.cxx != NULL: self.cxx.gid2index (gid, gi) cdef wrapEventOutputPort (cxx_EventOutputPort* port): cdef EventOutputPort port_ = EventOutputPort () port_.cxx = port return port_ cdef class EventInputPort: cdef cxx_EventInputPort* cxx # hold a C++ instance which we're wrapping def __cinit__ (self): self.cxx = NULL def __dealloc__ (self): del_EventInputPort (self.cxx) def index2target (self, int gi, target): if self.cxx != NULL: return self.cxx.index2target (gi, target) else: return False cdef wrapEventInputPort (cxx_EventInputPort* port): cdef EventInputPort port_ = EventInputPort () port_.cxx = port return port_ def publishEventOutput (identifier): return wrapEventOutputPort (cxx_publishEventOutput (identifier)) def publishEventInput (identifier): return wrapEventInputPort (cxx_publishEventInput (identifier)) # Local Variables: # mode: python # End: neuron-7.5/src/neuronmusic/nrnmusic.h000066400000000000000000000017321323325274500200510ustar00rootroot00000000000000#include #if defined(NO_PYTHON_H) typedef struct _object PyObject; #else #include #endif #include class PreSyn; class Gi2PreSynTable; // Interface which nrnmusic.so module (which mdj writes) will use namespace NRNMUSIC { class EventOutputPort : public MUSIC::EventOutputPort { public: EventOutputPort (MUSIC::Setup* s, std::string id) : MUSIC::Port (s, id), MUSIC::EventOutputPort (s, id) { } // Connect a gid to a MUSIC global index in this port void gid2index (int gid, int gi); Gi2PreSynTable* gi_table; }; class EventInputPort : public MUSIC::EventInputPort { public: EventInputPort (MUSIC::Setup* s, std::string id); // Connect a MUSIC global index to a gid in this port PyObject* index2target (int gi, PyObject* target); Gi2PreSynTable* gi_table; }; EventOutputPort* publishEventOutput (std::string identifier); EventInputPort* publishEventInput (std::string identifier); } neuron-7.5/src/neuronmusic/setup.py.in000066400000000000000000000017341323325274500201630ustar00rootroot00000000000000#setup.py for neuronmusic extension from distutils.core import setup, Extension nrn_srcdir = "@NRN_SRCDIR@" instdir = "@prefix@" if nrn_srcdir[0] != '/' : nrn_srcdir = '../../' + nrn_srcdir mpicc_bin = "@CC@" mpicxx_bin = "@CXX@" import os os.environ["CC"]=mpicc_bin os.environ["CXX"]=mpicxx_bin include_dirs = ['@MUSIC_INCDIR@', nrn_srcdir+'/src/neuronmusic', '.'] libdirs = ['@MUSIC_LIBDIR@'] neuronmusic_module = Extension( 'neuronmusic', ['neuronmusic.cpp'], library_dirs = libdirs, libraries = ['music'], runtime_library_dirs = ['@NRN_LIBDIR@', '@IV_LIBDIR@'], extra_objects = ['@NRN_LIBDIR@/libnrniv.so.0', '@IV_LIBDIR@/libIVhines.so.3' \ if len ('@IV_LIBDIR@') else ''], include_dirs = include_dirs ) setup(name="neuronmusic", version="@PACKAGE_VERSION@", description = "NEURON+MUSIC python interface", package_dir = {'':instdir+'/share/nrn/lib/python'}, ext_modules=[neuronmusic_module] ) neuron-7.5/src/ni_pci_6229/000077500000000000000000000000001323325274500154135ustar00rootroot00000000000000neuron-7.5/src/ni_pci_6229/.runinfo000066400000000000000000000001231323325274500170700ustar00rootroot00000000000000latency:lxrt+sem+mbx+msg:/home/hines/neuron/rt/i686/bin/nrngui -realtime test5.hoc neuron-7.5/src/ni_pci_6229/Makefile.am000066400000000000000000000014231323325274500174470ustar00rootroot00000000000000## base = nrn_ni6229 lib_LTLIBRARIES = libni6229.la sources = nrnni.cpp nrn_aiex2.cpp nrn_aoex4.cpp libni6229_la_SOURCES = $(sources) libni6229_la_DEPENDENCIES = $(sources) NIDDK = @NIDDK@ NIA = $(NIDDK)/100a2 NOD = $(NIA)/make/build nsrc=$(top_srcdir)/src IV_INCLUDES = @IV_INCLUDE@ includes = \ -I$(nsrc)/nrniv -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I$(nsrc)/oc \ -I/usr/local/vxipnp/linux/include \ -I$(NIA)/osinterface -I$(NIA)/chipobjects -I$(NIA)/examples \ $(IV_INCLUDES) AM_CPPFLAGS = $(includes) LO = \ $(NOD)/osiBus.o \ $(NOD)/osiUserCode.o \ $(NOD)/scale.o \ $(NOD)/tMSeries.o \ $(NOD)/tTIO.o \ $(NOD)/gpctex1.o \ $(NOD)/common.o \ $(NOD)/ai.o $(NOD)/ao.o libni6229_la_LIBADD = $(LO) noinst_HEADERS = nrndaq.h EXTRA_DIST = notes_niddk run .runinfo test1.hoc test5.hoc neuron-7.5/src/ni_pci_6229/Makefile.in000066400000000000000000000611321323325274500174630ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ni_pci_6229 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__objects_1 = nrnni.lo nrn_aiex2.lo nrn_aoex4.lo am_libni6229_la_OBJECTS = $(am__objects_1) libni6229_la_OBJECTS = $(am_libni6229_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libni6229_la_SOURCES) DIST_SOURCES = $(libni6229_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ base = nrn_ni6229 lib_LTLIBRARIES = libni6229.la sources = nrnni.cpp nrn_aiex2.cpp nrn_aoex4.cpp libni6229_la_SOURCES = $(sources) libni6229_la_DEPENDENCIES = $(sources) NIA = $(NIDDK)/100a2 NOD = $(NIA)/make/build nsrc = $(top_srcdir)/src IV_INCLUDES = @IV_INCLUDE@ includes = \ -I$(nsrc)/nrniv -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I$(nsrc)/oc \ -I/usr/local/vxipnp/linux/include \ -I$(NIA)/osinterface -I$(NIA)/chipobjects -I$(NIA)/examples \ $(IV_INCLUDES) AM_CPPFLAGS = $(includes) LO = \ $(NOD)/osiBus.o \ $(NOD)/osiUserCode.o \ $(NOD)/scale.o \ $(NOD)/tMSeries.o \ $(NOD)/tTIO.o \ $(NOD)/gpctex1.o \ $(NOD)/common.o \ $(NOD)/ai.o $(NOD)/ao.o libni6229_la_LIBADD = $(LO) noinst_HEADERS = nrndaq.h EXTRA_DIST = notes_niddk run .runinfo test1.hoc test5.hoc all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/ni_pci_6229/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/ni_pci_6229/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libni6229.la: $(libni6229_la_OBJECTS) $(libni6229_la_DEPENDENCIES) $(EXTRA_libni6229_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libni6229_la_OBJECTS) $(libni6229_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrn_aiex2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrn_aoex4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnni.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/ni_pci_6229/notes_niddk000066400000000000000000000262541323325274500176500ustar00rootroot00000000000000Driver Development Kit (DDK) http://forums.ni.com/ni/board?board.id=90 ---------------- Knowledge base MH_DDK http://search.ni.com/nisearch/nisearchservlet?nistype=default&ddown=2&filter=%2Btaxonomy:knowledgebase+%2Blanguage:en&q=MH_DDK -------------------- compiling niddk unzip ../nimhddk_linux.zip unzip ../nimseries.zip cd 100a2/osinterface rm -r -f * mv ../../Linux/OSinterface/* . cd ../make #edit line 6 of Makefile to refer to linux.mak make #deal with ../examples/main.cpp:18: error: invalid conversion from const char*' to `u32' This requires knowing the devicePCI_ID for the board. See below #deal with /usr/bin/ld: cannot find -lvisa get rid of that in linux.mak #easy to get rid of warnings. ../osinterface/osiTypes.h:39:1: warning: "NULL" redefined by enclosing with #define NULL ... #endif ------------------- The devicePCI_ID After installing the PCI-6229 and the software /usr/local/bin/nilsdev -a NI PCI-6229: "Dev1" Serial Number: 0x1195482 Bus Type: PCI PCI Bus: 0x2 PCI Device: 0x8 IRQ Level: 0xB Memory Range: 0xFF6FE000-0xFF6FEFFF Memory Range: 0xFF6FD000-0xFF6FDFFF The PCI Bus and PCI Device can be looked for in cat /proc/pci ... Bus 2, device 8, function 0: Class ff00: PCI device 1093:70aa (rev 0). IRQ 11. Master Capable. Latency=64. Non-prefetchable 32 bit memory at 0xff6fe000 [0xff6fefff]. Non-prefetchable 32 bit memory at 0xff6fd000 [0xff6fdfff]. ... Then the devicePCI_ID is 0x109370aa ------------------- The best test is to become root and in this source directory launch with nrngui test5.hoc and use the hardware timed checkbox. This can be done in normal linux. Then, with the rtai patched linux booted, and as root, ./run and use the realtime checkbox see the run script and the .runinfo script in this directory. This runs test5.hoc ------------- Some messages: -------------- http://forums.ni.com/ni/board/message?board.id=90&message.id=301 Re: What is the required order of operations for the M-series DAQ (PCI-6229)? Options Options DiegoF Trusted Active Regular DiegoF Reply 6 of 6 Viewed 208 times 1 rating - 5.0 average Hi Aaron, The calibration constants won't change. These are store when the board is externally calibrated at the factory. Any temperature correction is done by the driver. In DAQmx this is what's called self-calibration. At the moment, MHDDK doesn't have any examples on self-calibration. Regarding your application, it seems that you are trying to do some sort of control loop where you get 1 point from each channel, process (pid or something) and output the response. If that's the case, you don't need to reconfigure the hardware for each point. It's all one big task!. Here's an outline of what you would do for AI and AO: - Put the device in a known state: reset AI, AO - Configure AO for on-demand output. In this mode when you write a value to the DACs it goes out inmediately. - Configure AI for continuous acquisition. Set up a interrupt source to determine when there's data avaliable. You can use the FIFO condition interrupt or the scan clock interrupt. - How you handle the interrupt and where you proccess the data depends on you system. Assuming you process everything in the ISR: - Get the latest sample(s) from the FIFO by emptying it - Process the data point - Write the response to the DAC(s). Output is generated inmediately - Goes on forever... In DAQmx terminology you would be doing a Hardware-Timed Single Point acquisition. If you are using static DIO, just configure the port and use it. It's pretty much independent of AI and AO. For a 1kHz loop is not worth setting up DMA. Most systems can handle that rate easily. You'll probably get less performance trying to determine where the DMA is at. Hope it helps!, Diego. --------------------- control loop - HardwareTimed Single Point Acquisition Options Options neuron Member neuron Reply 1 of 4 Viewed 73 times I was reading the " What is the required order of operations for the M series DAQ (PCI-6229)?" thread and saw a reply which is closely analogous to what I want to do: " - Put the device in a known state: reset AI, AO - Configure AO for on-demand output. In this mode when you write a value to the DACs it goes out inmediately. - Configure AI for continuous acquisition. Set up a interrupt source to determine when there's data avaliable. You can use the FIFO condition interrupt or the scan clock interrupt. - How you handle the interrupt and where you proccess the data depends on you system. Assuming you process everything in the ISR: - Get the latest sample(s) from the FIFO by emptying it - Process the data point - Write the response to the DAC(s). Output is generated inmediately - Goes on forever... In DAQmx terminology you would be doing a Hardware-Timed Single Point acquisition. " I have a PCI-6229 and BNC-2120 and am having difficulty making sense of the 13 thousand line chipobjects/tMSeries.h file. The examples contain a lot of useful idioms but are just a bit too non-parallel to my goal and I wonder if someone has some example code more similar to the following or advice on whether I am being foolishly fastidious. I imagined setting up a continuous pulse stream on the 6229 available on one of the digital output lines. The interval between the rising edges is my time step and the pulse width is wide enough so that the on chip ADC portion of ai was initiated on the rising edge and would not be affected by the on chip DAC ao initiated on the falling edge. The interrupt would occur on the falling edge and by then the computer could read the ai buffer. Some computation would occur which fills the ao buffer ready for transfer atthe next falling edge. I'd also like DI and DO to be synchronized to the rising and falling edges. By the way, before I bought the 6229, I verified that with RTAI linux I could work comfortably with a time step of 0.025 ms (those interrupts came from the computer clock). In practice, I'll be working somewhere between that and 1 ms steps. 01-28-2006 08:14 AM Re: control loop - HardwareTimed Single Point Acquisition Options Options DiegoF Trusted Active Regular DiegoF Reply 2 of 4 Viewed 35 times Check out this post Clocked M-Series DIO. It seems you are trying to do something very similar. The tMSeries class is just a description of the registers available in the device. Each register is an object that manages a soft-copy of the register Each register class defines some methods to read and write to the register as a whole or to the bitfiled of the register. Using the a tMSeries object you don't need to worry about register offsets or shifting bitfields. Diego Re: control loop - HardwareTimed Single Point Acquisition Options Options neuron Member neuron Reply 3 of 4 Viewed 29 times I was partly mistaken about the examples not being parallel to my goals. Beginning with aiex2.cpp, dividing it into several functions, and adding the http://forums.ni.com/ni/board/message?board.id=90&message.id 387 "Clocked M-Series DIO" fragment, have gotten me a fair ways along the path toward a prototype control loop. But I'm having trouble merging in the aoex4.cpp example and I guess need to experiment with that part in isolation. Since the fundamental clock for my control loop is (I'm guessing given by the aiex2 aiTrigger (board, tMSeries::tAI_Trigger_Select::kAI_START1_SelectPulse, tMSeries::tAI_Trigger_Select::kAI_START1_PolarityRising_Edge, tMSeries::tAI_Trigger_Select::kAI_START2_SelectPulse, tMSeries::tAI_Trigger_Select::kAI_START2_PolarityRising_Edge); I am curious, why that pulse does not appear on my BNC block at the "AI CONV CLK" output (PFI 2)? Nevertheless, with the Clocked M-Series DIO example I am able to see a pulse train on P0.0. My main question is how to get the AO triggered by the aiTrigger instead of the aoTrigger (board, tMSeries::tAO_Trigger_Select::kAO_START1_SelectPulse, tMSeries::tAO_Trigger_Select::kAO_START1_PolarityRising_Edge); or do I need to externally trigger from P0.0? 02-01-2006 05:43 PM Reply Reply Re: control loop - HardwareTimed Single Point Acquisition Options Options neuron Member neuron Reply 4 of 4 Viewed 8 times My control loop is working well using the idioms for AO on demand output from aoex2.cpp and AI continuous acquisition from aiex1.cpp. However the interrupt follows the LXRT extension to RTAI example for processor generated periodic interrupts using start_rt_timer(period_); rt_make_hard_real_time(); nrn_fake_step(); // get as much as possible into the cache // saves up to 10 us on the first step rt_task_make_periodic(rtrun_task_, rt_get_time() + period_, period_); rt_task_wait_period(); while (t < tstop_) { t1 = rt_get_cpu_time_ns(); nrn_fixed_step(); // start ai scan, compute, ai read, ao write nrn_rtstep_time_ = (double)(rt_get_cpu_time_ns() - t1); ovrn += rt_task_wait_period(); if (stoprun) { break; } } rt_make_soft_real_time(); stop_rt_timer(); Now I'd like to have the 6229 generate the interrupt and I wonder if anyone can give advice on how to carry out the transformation. There was some mention about using the FIFO condition interrupt or the scan clock interrupt and there are some intriguing lines in http://forums.ni.com/ni/board/message?board.id=90&message.id=287&query.id=4559#M287 but I have to admit to being somewhat at a loss as to how this connects to the rtai api. The only thing I've found that is remotely analogous is http://www.captain.at/programming/rtai/parportintlxrt-magma2.php that gives an example using things like rt_request_irq_task, rt_startup_irq rt_enable_irq, rt_irq_wait, rt_ack_irq,... Is that the avenue I should explore? I should mention that my experiments with AO on demand and AI hardware time acquisition from aiex2.cpp also worked nicely and I expect to use that idiom after I get this interrupt driven. However I was unable to get the AO hardware timed generation from aiex4.cpp to work hardly at all Sometimes it hung in aoArm at while (board->Joint_Status_2.readAO_TMRDACWRs_In_Progress_St ()) { // Wait } and could only get it going again by running the aoex4 example itself, More often no output I was writing appeared at the BNC connector, and when I did see output it was delayed by a dozen or so steps. Obviously I do not know how to manage the fifo. The serious conceptual error, though was using kCDO_Update_Source_SelectAI_Convert to toggle P0.0 and then connecting that to AI CONV CLK and using kAO_START1_SelectAI_START_1 for the trigger and kAO_UPDATE_Source_SelectPFI2 for the aoUpdate. The problem is that the rising edge is every two steps so my output is half the rate I want. Sorry for the long message and my glaring naivety. I suspect that a few minutes from someone with experience will save days of my flailing around. Thanks! Michael neuron-7.5/src/ni_pci_6229/nrn_aiex2.cpp000066400000000000000000000117561323325274500200160ustar00rootroot00000000000000#include <../../nrnconf.h> // based on aiex2.cpp but after some experimentation it ended up mostly // similar to aiex1.cpp and under rtai will use the ai_on_demand_ // // aiex2.cpp -- // // Hardware timed acquisition // #include #include #ifndef ___tMSeries_h___ #include "tMSeries.h" #endif #ifndef ___ai_h___ #include "ai.h" #endif #ifndef ___common_h___ #include "common.h" #endif #ifndef ___scale_h___ #include "scale.h" #endif static tScalingCoefficients* scale; // read eeprom for calibration information void NrnDAQ:: eeprom_read() { const u32 kEepromSize = 1024; //u8 eepromMemory[kEepromSize]; if (!eepromMemory) { eepromMemory = new u8[kEepromSize]; eepromReadMSeries (bus, eepromMemory, kEepromSize); } } void NrnDAQ::ai_reset() { // ---- AI Reset ---- // configureTimebase (board); pllReset (board); analogTriggerReset (board); aiReset (board); aiPersonalize (board,tMSeries::tAI_Output_Control::kAI_CONVERT_Output_SelectActive_High); aiClearFifo (board); // ADC reset only applies to 625x boards // adcReset(board); // ---- End of AI Reset ---- } void NrnDAQ::ai_setup(u32 nchan, double dt) { if (nchan != numberOfAIChannels) { if (numberOfAIChannels) { delete [] ai_pvalue; ai_pvalue = 0; delete [] scale; scale = 0; } numberOfAIChannels = nchan; if (nchan) { ai_pvalue = new double*[nchan]; scale = new tScalingCoefficients[nchan]; u32 i; for (i=0; i < nchan; ++i) { ai_pvalue[i] = 0; } } } tstep = dt; samplePeriodDivisor = u32(20000.*dt); // timebase*step => 20 MHz * dt(ms) printf("ai_setup step=%g samplePeriodDivisor=%d\n", tstep, samplePeriodDivisor); setup_ai_task(); } void NrnDAQ::setup_ai_task() { // ---- Start AI task ---- aiDisarm (board); aiClearConfigurationMemory (board); for (u32 i = 0; i < numberOfAIChannels; i++) { aiConfigureChannel (board, i, // channel number 0, // gain -- check ai.h for allowed values tMSeries::tAI_Config_FIFO_Data::kAI_Config_PolarityBipolar, tMSeries::tAI_Config_FIFO_Data::kAI_Config_Channel_TypeDifferential, (i == numberOfAIChannels-1)?kTrue:kFalse); // last channel? } aiSetFifoRequestMode (board); aiEnvironmentalize (board); aiHardwareGating (board); aiTrigger (board, tMSeries::tAI_Trigger_Select::kAI_START1_SelectPulse, tMSeries::tAI_Trigger_Select::kAI_START1_PolarityRising_Edge, tMSeries::tAI_Trigger_Select::kAI_START2_SelectPulse, tMSeries::tAI_Trigger_Select::kAI_START2_PolarityRising_Edge); aiSampleStop (board, (numberOfAIChannels > 1)?kTrue:kFalse); // multi channel? aiNumberOfSamples (board, 1, // posttrigger samples 0, // pretrigger samples kTrue); // continuous? if (ai_on_demand_) { aiSampleStart (board, 0, 0, tMSeries::tAI_START_STOP_Select::kAI_START_SelectPulse, tMSeries::tAI_START_STOP_Select::kAI_START_PolarityRising_Edge); }else{ aiSampleStart (board, samplePeriodDivisor, 3, tMSeries::tAI_START_STOP_Select::kAI_START_SelectSI_TC, tMSeries::tAI_START_STOP_Select::kAI_START_PolarityRising_Edge); } aiConvert (board, 280, // convert period divisor 3, // convert delay divisor kFalse); // external sample clock? aiClearFifo (board); } void NrnDAQ::ai_start() { setup_ai_task(); dio_toggle_on_ai_convert(); aiArm (board, kTrue); aiStart (board); } void NrnDAQ::ai_record(u32 ichan, double* pvar, double scl, double offset) { assert(ichan < numberOfAIChannels); ai_pvalue[ichan] = pvar; aiGetScalingCoefficients (eepromMemory, 0, 0, ichan, &scale[ichan]); scale[ichan].c[0] += offset*scale[ichan].c[1]; scale[ichan].c[1] *= scl; } void NrnDAQ::ai_scanstart() { if (ai_on_demand_) { aiStartOnDemand (board); } } void NrnDAQ::ai_read() { // ---- Read FIFO ---- i32 value; f32 scaled; u32 n = 0; if (ai_on_demand_) { while ( board->Joint_Status_2.readAI_Scan_In_Progress_St()) { // waiting for scan to complete } } while (n < numberOfAIChannels) { if(!board->AI_Status_1.readAI_FIFO_Empty_St()) { value = board->AI_FIFO_Data.readRegister (); if (ai_pvalue[n]) { aiPolynomialScaler (&value, &scaled, &scale[n]); *(ai_pvalue[n]) = scaled; } //printf ("%e,\n", scaled); n++; } } } void NrnDAQ::ai_stop() { aiDisarm (board); } neuron-7.5/src/ni_pci_6229/nrn_aoex4.cpp000066400000000000000000000117101323325274500200140ustar00rootroot00000000000000#include <../../nrnconf.h> // derived from aoex4.cpp but in practice ends up as aoex2.cpp using the // ON_DEMAND mode. // // aoex4.cpp -- // // multi-channel hardware timed generation // #include #include #ifndef ___tMSeries_h___ #include "tMSeries.h" #endif #ifndef ___ao_h___ #include "ao.h" #endif #ifndef ___common_h___ #include "common.h" #endif #ifndef ___scale_h___ #include "scale.h" #endif #define ON_DEMAND 1 static tScalingCoefficients* scale; static tBoolean _continuous = kFalse; static tBoolean fifoRetransmit = kFalse; static u32 updatePeriodDivisor = 20000000; static u32 _numberOfSamples = 1; void NrnDAQ::ao_reset() { // ---- AO Reset ---- // // done in ai_reset // configureTimebase (board); // pllReset (board); // analogTriggerReset (board); aoReset (board); aoPersonalize (board); aoResetWaveformChannels (board); aoClearFifo (board); // unground AO reference board->AO_Calibration.writeAO_RefGround (kFalse); // ---- End of AO Reset ---- } static void aoFifoModeEmpty(tMSeries* board) { board->Joint_Reset.setAO_Configuration_Start (1); board->Joint_Reset.flush (); board->AO_Mode_2.setAO_FIFO_Retransmit_Enable (fifoRetransmit); board->AO_Mode_2.setAO_FIFO_Mode (tMSeries::tAO_Mode_2::kAO_FIFO_ModeEmpty); board->AO_Mode_2.flush (); board->AO_Personal.setAO_FIFO_Enable (1); board->AO_Personal.flush (); board->Joint_Reset.setAO_Configuration_End (1); board->Joint_Reset.flush (); return; } void NrnDAQ::ao_setup(u32 nchan) { // ---- Write to FIFO ---- if (nchan != numberOfAOChannels) { if (numberOfAOChannels) { delete [] ao_pvalue; ao_pvalue = 0; delete [] scale; scale = 0; } numberOfAOChannels = nchan; if (nchan) { ao_pvalue = new double*[nchan]; scale = new tScalingCoefficients[nchan]; u32 i; for (i=0; i < nchan; ++i) { ao_pvalue[i] = 0; } } } i32 value; // ---- Start AO Task --- u32 i; for (i = 0; i < nchan; ++i) { #if ON_DEMAND aoConfigureDAC (board, i, 0xF, tMSeries::tAO_Config_Bank::kAO_DAC_PolarityBipolar, tMSeries::tAO_Config_Bank::kAO_Update_ModeImmediate); #else aoConfigureDAC (board, i, i, //waveform order tMSeries::tAO_Config_Bank::kAO_DAC_PolarityBipolar, tMSeries::tAO_Config_Bank::kAO_Update_ModeTimed); #endif } aoChannelSelect (board, numberOfAOChannels); #if !ON_DEMAND aoTrigger (board, // tMSeries::tAO_Trigger_Select::kAO_START1_SelectPulse, // tMSeries::tAO_Trigger_Select::kAO_START1_PolarityRising_Edge); tMSeries::tAO_Trigger_Select::kAO_START1_SelectAI_START_1, tMSeries::tAO_Trigger_Select::kAO_START1_PolarityRising_Edge); aoCount (board, _numberOfSamples, numberOfAOChannels, _continuous); aoUpdate (board, // tMSeries::tAO_Mode_1::kAO_UPDATE_Source_SelectUI_TC, tMSeries::tAO_Mode_1::kAO_UPDATE_Source_SelectPFI2, tMSeries::tAO_Mode_1::kAO_UPDATE_Source_PolarityRising_Edge, // updatePeriodDivisor); samplePeriodDivisor); // aoFifoMode (board, fifoRetransmit); aoFifoModeEmpty(board); aoStop (board); #endif } void NrnDAQ::ao_start() { #if !ON_DEMAND // ao_reset(); // ao_setup(1); //board->PFI_Output_Select_1.setPFI0_Output_Select( //tMSeries::tPFI_Output_Select_1::kPFI0_Output_SelectAI_Convert); aoArm (board); aoStart (board); #endif } void NrnDAQ::ao_play(u32 ichan, double* pvar, double scl, double offset) { assert(ichan < numberOfAOChannels); ao_pvalue[ichan] = pvar; aoGetScalingCoefficients (eepromMemory, 0, 0, ichan, &scale[ichan]); scale[ichan].c[0] += offset*scale[ichan].c[1]; scale[ichan].c[1] *= scl; } void NrnDAQ::ao_write() { f32 fval; i32 value; u32 n = 0; while (n < numberOfAOChannels) { if (ao_pvalue[n]) { fval = *ao_pvalue[n]; aoLinearScaler (&value, &fval, &scale[n]); //printf("%d %g\n", value, fval); }else{ value = 0; } #if ON_DEMAND board->DAC_Direct_Data[n].writeRegister (value); #else board->AO_FIFO_Data.writeRegister (value); #endif ++n; } } void NrnDAQ::ao_stop() { #if !ON_DEMAND // ---- Stop ---- aoDisarm (board); // reset the dacs aoConfigureDAC (board, 0, 0xF, tMSeries::tAO_Config_Bank::kAO_DAC_PolarityBipolar, tMSeries::tAO_Config_Bank::kAO_Update_ModeImmediate); aoConfigureDAC (board, 1, 0xF, tMSeries::tAO_Config_Bank::kAO_DAC_PolarityBipolar, tMSeries::tAO_Config_Bank::kAO_Update_ModeImmediate); // cleanup // delete board; // bus->destroyAddressSpace(bar1); return; #endif } neuron-7.5/src/ni_pci_6229/nrndaq.h000066400000000000000000000020051323325274500170440ustar00rootroot00000000000000#ifndef nrndaq_h #define nrndaq_h #include #include #include class NrnDAQ : public Resource { public: NrnDAQ(); virtual ~NrnDAQ(); void nrndaq_init(); void nrndaq_final(); void dio_write(u8); void ai_setup(u32 nchan, double dt); void ai_record(u32 ichan, double* pvar, double scl = 1.0, double offset = 0.0); void ai_start(); void ai_read(); void ai_stop(); void ai_scanstart(); void dio_toggle_on_ai_convert(); void ao_setup(u32 nchan); void ao_play(u32 ichan, double* pvar, double scl = 1.0, double offset = 0.0); void ao_start(); void ao_write(); void ao_stop(); private: void initMite(); void eeprom_read(); void ai_reset(); void setup_ai_task(); void ao_reset(); public: tBoolean ai_on_demand_; private: iBus* bus; tAddressSpace bar1; tMSeries* board; u8* eepromMemory; u32 numberOfAIChannels; double **ai_pvalue; u32 numberOfAOChannels; double **ao_pvalue; double tstep; u32 samplePeriodDivisor; }; extern NrnDAQ* nrndaq_; #endif neuron-7.5/src/ni_pci_6229/nrnni.cpp000066400000000000000000000132001323325274500172370ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include NrnDAQ* nrndaq_; extern "C" { extern double t; void nrn_daq_scanstart(); void nrn_daq_ai(); void nrn_daq_ao(); } /* Control loop. Hardware-Timed Single Point Acquisition. */ void NrnDAQ::nrndaq_init() { if (bus) { return; } // needs the devicePCI_ID which can be found from // nilsdev --verbose // to determine the PCI Bus and PCI Device values. From those look // at cat /proc/pci and from the Bus - device section the // devicePCI_ID is the 8 digit number after PCI device. int devicePCI_ID = 0x109370aa; //printf("trying devicePCI_ID = 0x%x\n", devicePCI_ID); bus = acquireBoard(devicePCI_ID); if (bus == NULL) { hoc_execerror("Could not access PCI device.", 0); return; } // Initialize Mite Chip. initMite(); // read eeprom for calibration information eeprom_read(); // create register map bar1 = bus->createAddressSpace(kPCI_BAR1); board = new tMSeries(bar1); ai_reset(); // ao_reset(); } void NrnDAQ::nrndaq_final() { if (bus) { delete board; bus->destroyAddressSpace(bar1); releaseBoard(bus); bus = nil; } } // based on from niddk/100a2/examples/main.cpp void NrnDAQ::initMite() { tAddressSpace bar0; u32 physicalBar1; //Skip MITE initialization for PCMCIA boards //(which do not have a MITE DMA controller) if(!bus->get(kIsPciPxiBus,0)) return; bar0 = bus->createAddressSpace(kPCI_BAR0); //Get the physical address of the DAQ board physicalBar1 = bus->get(kBusAddressPhysical,kPCI_BAR1); //Tell the MITE to enable BAR1, where the rest of the board's regist bar0.write32(0xC0, (physicalBar1 & 0xffffff00L) | 0x80); bus->destroyAddressSpace(bar0); } static double dio_write(void* v) { u8 value = (u8)chkarg(1, 0, 255); if (nrndaq_) { nrndaq_->dio_write(value); } return double(value); } static double aiset(void* v) { if (nrndaq_) { u32 nchan = (u32)chkarg(1, 0, 16); double tstep = chkarg(2, .025, 10000.); nrndaq_->ai_setup(nchan, tstep); } return 0.; } static double ai_ondemand(void* v) { tBoolean b = kTrue; if (nrndaq_) { if (ifarg(1)) { b = (chkarg(1, 0, 1) != 0.0) ? kTrue : kFalse; nrndaq_->ai_on_demand_ = b; } b = nrndaq_->ai_on_demand_; } return (b == kTrue) ? 1.0 : 0.0; } static double aistart(void* v) { if (nrndaq_) { nrndaq_->ai_start(); } return 0.; } static double airecord(void* v) { if (nrndaq_) { u32 ichan = (u32)chkarg(1, 0, 16); double* pvar = hoc_pgetarg(2); double scl = 1., offset = 0.0; if (ifarg(3)) { scl = chkarg(3, -1e9, 1e9); } if (ifarg(4)) { offset = chkarg(4, -1e9, 1e9); } nrndaq_->ai_record(ichan, pvar, scl, offset); } return 0.; } static double airead(void* v) { if (nrndaq_) { nrndaq_->ai_scanstart(); nrndaq_->ai_read(); } return 0.; } static double aistop(void* v) { if (nrndaq_) { nrndaq_->ai_stop(); } return 0.; } static double finalize(void* v) { if (nrndaq_) { nrndaq_->nrndaq_final(); nrndaq_ = nil; } return 0.; } static double aosetup(void* v) { if (nrndaq_) { u32 nchan = (u32)chkarg(1, 0, 4); nrndaq_->ao_setup(nchan); } return 0.; } static double aoplay(void* v) { if (nrndaq_) { u32 ichan = (u32)chkarg(1, 0, 16); double* pvar = hoc_pgetarg(2); double scl = 1., offset = 0.0; if (ifarg(3)) { scl = chkarg(3, -1e9, 1e9); } if (ifarg(4)) { offset = chkarg(4, -1e9, 1e9); } nrndaq_->ao_play(ichan, pvar, scl, offset); } return 0.; } static double aostart(void* v) { if (nrndaq_) { nrndaq_->ao_start(); } return 0.; } static double aowrite(void* v) { if (nrndaq_) { nrndaq_->ao_write(); } return 0.; } static double aostop(void* v) { if (nrndaq_) { nrndaq_->ao_stop(); } return 0.; } static Member_func members[] = { "dio_write", dio_write, "ai_setup", aiset, "ai_start", aistart, "ai_record", airecord, "ai_read", airead, "ai_stop", aistop, "ai_ondemand", ai_ondemand, "finalize", finalize, "ao_setup", aosetup, "ao_play", aoplay, "ao_start", aostart, "ao_write", aowrite, "ao_stop", aostop, 0,0 }; static void* cons(Object*) { if (!nrndaq_) { nrndaq_ = new NrnDAQ(); nrndaq_->nrndaq_init(); } return nrndaq_; } static void destruct(void* v) { } void NrnDAQ_reg() { class2oc("NrnDAQ", cons, destruct, members); } NrnDAQ::NrnDAQ() { bus = 0; eepromMemory = 0; numberOfAIChannels = 0; numberOfAOChannels = 0; ai_pvalue = 0; ao_pvalue = 0; tstep = 1.; samplePeriodDivisor = 20000; // (1 ms steps) ai_on_demand_ = kTrue; } NrnDAQ::~NrnDAQ() { if (bus) { nrndaq_final(); } if (eepromMemory) { delete [] eepromMemory; } if (ai_pvalue) { delete [] ai_pvalue; } } void NrnDAQ::dio_write(u8 value) { if (bus) { board->DIO_Direction.writeRegister (0xFF); board->Static_Digital_Output.writeRegister(value); } } void NrnDAQ::dio_toggle_on_ai_convert() { board->CDIO_Command.writeCDO_Reset(1); // doesn't matter yet board->CDO_Mode.setCDO_FIFO_Mode(tMSeries::tCDO_Mode::kCDO_FIFO_ModeFIFO_Half_Full); board->CDO_Mode.setCDO_Polarity(tMSeries::tCDO_Mode::kCDO_PolarityRising); board->CDO_Mode.setCDO_Update_Source_Select(tMSeries::tCDO_Mode::kCDO_Update_Source_SelectAI_Convert); board->CDO_Mode.setCDO_Retransmit(kTrue); board->CDO_Mode.flush(); board->CDO_Mask_Enable.writeRegister (0x3); // bits 0 and 1 board->DIO_Direction.writeRegister (0x3); // bits 0 and 1 output board->CDO_FIFO_Data.writeRegister(0x02); board->CDO_FIFO_Data.writeRegister(0x01); board->CDIO_Command.writeCDO_Arm(1); } void nrn_daq_scanstart() { if (nrndaq_) { nrndaq_->ai_scanstart(); } } void nrn_daq_ai() { if (nrndaq_) { nrndaq_->ai_read(); } } void nrn_daq_ao() { if (nrndaq_) { nrndaq_->ao_write(); } } neuron-7.5/src/ni_pci_6229/run000077500000000000000000000000531323325274500161430ustar00rootroot00000000000000/home/hines/rtlinux/realtime/bin/rtai-load neuron-7.5/src/ni_pci_6229/test1.hoc000066400000000000000000000000571323325274500171500ustar00rootroot00000000000000objref nda nda = new NrnDAQ() nda.dio_write(7) neuron-7.5/src/ni_pci_6229/test5.hoc000066400000000000000000000030631323325274500171540ustar00rootroot00000000000000load_file("nrngui.hoc") create soma access soma { L = 10 diam=100/PI/L insert hh } objref stim stim = new IClamp(.5) stim.dur = .1 stim.amp = .3 objref nda, nrt nda = new NrnDAQ() nrt = new RealTime() proc q() { nda.ai_stop() nda.ao_stop() nda.finalize() quit() } objref aivec, aovec, vvec, tvec, rtstep aivec = new Vector(1000) aovec = new Vector(1000) tvec = new Vector(1000) rtstep = new Vector(1000) realtime = 0 ai_hard_timed_ = 1 proc ai_hard_timed() { nda.ai_ondemand(ai_hard_timed_ == 0) if (ai_hard_timed_) { realtime = 0 } } ai_hard_timed() xpanel("NrnDAQ") xbutton("one run", "go()") xbutton("continuous", "stoprun=0 while(stoprun==0) { go() }") xbutton("stop", "stoprun=1") xcheckbox("realtime", &realtime, "ai_hard_timed()") xcheckbox("AI hardware timed", &ai_hard_timed_, "ai_hard_timed()") xbutton("quit", "q()") xpanel() a = 0 aivec.record(&a) soma aovec.record(&v(.5)) tvec.record(&t) rtstep.record(&nrt.steptime) objref g g = new Graph() g.size(0,tstop, -80, 40) dt = .025 nda.ai_setup(1, dt) nda.ao_setup(1) soma nda.ai_record(0, &a, 10) soma nda.ao_play(0,&v(.5), .1) proc go() { stoprun = 0 finitialize(-65) nda.ao_write() nda.ai_start() nda.ai_read() frecord_init() if (realtime) { rtrun() }else{ nrt.softrun(tstop) } nda.ai_stop() g.erase() aivec.line(g, tvec) aovec.line(g, tvec) doNotify() } proc rtrun() {local ovrn ovrn = nrt.run(tstop) printf("maximum step time = %g mean step time = %g\n", rtstep.max, rtstep.mean) if (ovrn) { printf("%d overruns\n", ovrn) stoprun = 1 } } neuron-7.5/src/nmodl/000077500000000000000000000000001323325274500146015ustar00rootroot00000000000000neuron-7.5/src/nmodl/Makefile.am000077500000000000000000000022421323325274500166400ustar00rootroot00000000000000## Makefile for nocmodl. ## Note that hmodl can be built from this directory too, but it requires ## different flags so we don't bother. Automake doesn't like to build things ## that way. bin_PROGRAMS = nocmodl nocmodl_SOURCES = parse1.y diffeq.y lex.l consist.c deriv.c discrete.c \ init.c io.c kinetic.c list.c modl.c nocpout.c noccout.c parsact.c \ netrec_discon.c \ partial.c sens.c simultan.c solve.c symbol.c units.c version.c nsrc=$(top_srcdir)/src includes = -I$(nsrc)/src/modlunit AM_CPPFLAGS = -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1 $(includes) EXTRA_DIST = cout.c lex.c nmodl.mak AM_YFLAGS = -d ## The list of .h files that are needed in the distribution. noinst_HEADERS = extdef.h extdef2.h extdef5.h modl.h symbol.h parse1.h \ difeqdef.h macnmodl.h carbonnmodl.h nmodlfunc.h ## files that depend on the existence of parse1.h or diffeq.h (none do) ## this allows parallel make -j to work at the beginning when those ## do not exist and dependencies have not yet been determined consist.o cout.o deriv.o discrete.o init.o io.o kinetic.o lex.o \ list.o noccout.o nocpout.o parsact.o partial.o sens.o simultan.o \ solve.o symbol.o netrec_discon.o: parse1.h neuron-7.5/src/nmodl/Makefile.in000066400000000000000000000656611323325274500166640ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = nocmodl$(EXEEXT) subdir = src/nmodl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_nocmodl_OBJECTS = parse1.$(OBJEXT) diffeq.$(OBJEXT) lex.$(OBJEXT) \ consist.$(OBJEXT) deriv.$(OBJEXT) discrete.$(OBJEXT) \ init.$(OBJEXT) io.$(OBJEXT) kinetic.$(OBJEXT) list.$(OBJEXT) \ modl.$(OBJEXT) nocpout.$(OBJEXT) noccout.$(OBJEXT) \ parsact.$(OBJEXT) netrec_discon.$(OBJEXT) partial.$(OBJEXT) \ sens.$(OBJEXT) simultan.$(OBJEXT) solve.$(OBJEXT) \ symbol.$(OBJEXT) units.$(OBJEXT) version.$(OBJEXT) nocmodl_OBJECTS = $(am_nocmodl_OBJECTS) nocmodl_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) AM_V_LEX = $(am__v_LEX_@AM_V@) am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) am__v_LEX_0 = @echo " LEX " $@; am__v_LEX_1 = YLWRAP = $(top_srcdir)/ylwrap @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = SOURCES = $(nocmodl_SOURCES) DIST_SOURCES = $(nocmodl_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/ylwrap diffeq.c diffeq.h lex.c parse1.c parse1.h DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ nocmodl_SOURCES = parse1.y diffeq.y lex.l consist.c deriv.c discrete.c \ init.c io.c kinetic.c list.c modl.c nocpout.c noccout.c parsact.c \ netrec_discon.c \ partial.c sens.c simultan.c solve.c symbol.c units.c version.c nsrc = $(top_srcdir)/src includes = -I$(nsrc)/src/modlunit AM_CPPFLAGS = -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1 $(includes) EXTRA_DIST = cout.c lex.c nmodl.mak AM_YFLAGS = -d noinst_HEADERS = extdef.h extdef2.h extdef5.h modl.h symbol.h parse1.h \ difeqdef.h macnmodl.h carbonnmodl.h nmodlfunc.h all: all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nmodl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nmodl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list parse1.h: parse1.c @if test ! -f $@; then rm -f parse1.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parse1.c; else :; fi diffeq.h: diffeq.c @if test ! -f $@; then rm -f diffeq.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) diffeq.c; else :; fi nocmodl$(EXEEXT): $(nocmodl_OBJECTS) $(nocmodl_DEPENDENCIES) $(EXTRA_nocmodl_DEPENDENCIES) @rm -f nocmodl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nocmodl_OBJECTS) $(nocmodl_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/consist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deriv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diffeq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/discrete.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinetic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netrec_discon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noccout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nocpout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsact.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sens.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simultan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/units.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f diffeq.c -rm -f diffeq.h -rm -f lex.c -rm -f parse1.c -rm -f parse1.h clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile consist.o cout.o deriv.o discrete.o init.o io.o kinetic.o lex.o \ list.o noccout.o nocpout.o parsact.o partial.o sens.o simultan.o \ solve.o symbol.o netrec_discon.o: parse1.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nmodl/carbonnmodl.h000077500000000000000000000003151323325274500172520ustar00rootroot00000000000000#include #include #include #include #pragma once off #define SYSV 1 #define MAC 1 #define NMODL 1 #define NOCMODL 1 #define VECTORIZE 1 #define CVODE 1 neuron-7.5/src/nmodl/consist.c000077500000000000000000000041251323325274500164340ustar00rootroot00000000000000#include <../../nmodlconf.h> /* * Check that names do not have conflicting types. This is done after the * entire file is read in and allows declaring a variable after its use (very * bad style) to work in some circumstances. */ #include "modl.h" #include "parse1.h" #include "symbol.h" extern Symbol *scop_indep; extern Symbol *indepsym; #define con(arg1,arg2,arg3) if (t & (arg2)) if (t & (~(arg2 | arg3))) {\ Fprintf(stderr, "%s is a %s\n",\ s->name, arg1);\ err=1;\ } void consistency() { Symbol *s; Item *qs; int i, tu, err = 0; long t; /* the scop_indep can also be a automatic parameter */ if (scop_indep != indepsym && scop_indep->subtype == (PARM | INDEP)) { scop_indep->subtype = INDEP; } SYMITER(NAME) { t = s->subtype; con("KEYWORD", KEYWORD, 0); con("RESERVED WORD", EXTDEF|EXTDEF2|EXTDEF3|EXTDEF4|EXTDEF5, 0); con("CONSTANT", nmodlCONST, 0); con("PARAMETER", PARM, ARRAY); con("ASSIGNED", DEP, ARRAY); con("INDEPENDENT", INDEP, 0); con("STATE", STAT, ARRAY); con("FUNCTION", FUNCT, 0); con("PROCEDURE", PROCED, 0); con("DERIVATIVE", DERF, 0); con(" KINETIC", KINF, 0); con("LINEAR", LINF, 0); con("NONLINEAR", NLINF, 0); con("DISCRETE", DISCF, 0); con("PARTIAL", PARF, 0); con("STEPPED", STEP1, 0); con("CONSTANT UNITS FACTOR", UNITDEF, 0); tu = s->usage; if ((tu & DEP) && (tu & FUNCT)) diag(s->name, " used as both variable and function"); if ((t == 0) && tu) Fprintf(stderr, "Warning: %s undefined. (declared within VERBATIM?)\n", s->name); } if (err) { diag("multiple uses for same variable", (char *) 0); } if (indepsym == SYM0) { diag("Independent variable is not defined", (char *)0); } /* avoid the problem where person inadvertently is using Dstate as a state*/ SYMITER(NAME) { if ((s->subtype & STAT) && (s->name[0] == 'D')) { Symbol* s1 = lookup(s->name + 1); if (s1 && s->type == NAME && (s->subtype & STAT)) { fprintf(stderr, "%s is a STATE so %s is a %s' and", s1->name, s->name, s1->name); diag(" cannot be declared as a STATE\n", (char*)0); } } } } neuron-7.5/src/nmodl/cout.c000077500000000000000000000542161323325274500157320ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/cout.c,v 4.1 1997/08/30 20:45:16 hines Exp */ /* cout.c,v * Revision 4.1 1997/08/30 20:45:16 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:23:39 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:06:04 hines * proper nocmodl version number * * Revision 1.1.1.1 1994/10/12 17:21:34 hines * NEURON 3.0 distribution * * Revision 9.170 93/05/17 11:06:36 hines * PI defined by some so undefing it * * Revision 9.158 93/02/02 10:32:17 hines * create static func before usage * * Revision 9.157 93/02/01 15:17:09 hines * static functions should be declared before use. * inline is keyword for some compilers. * * Revision 9.154 92/11/10 11:52:16 hines * when compiling a translated model on the CRAY (with _CRAY defined as 1) * the check table functions are taken out of the loops. This is * not entirely safe if tables are used (and dependencies have changed) * in direct calls to functions that call functions with tables. It is * reasonably safe for finitialize(), fadvance(), fcurrent(), and * calling the hoc_function itself. * * Revision 9.147 92/09/27 17:45:43 hines * vectorized channel densities with _method3 fill thisnode.GC,EC instead * of rhs,d * * Revision 9.144 92/08/06 09:57:51 hines * put cray pragmas at appropriate places * get rid of initmodel references to saveing t and incrementing ninit * * Revision 9.142 92/08/05 16:22:43 hines * can vectorize hh. need work on tables though. * * Revision 9.140 92/07/27 11:33:06 hines * some bugs fixed. no vectorizing except for SOLVE procedure (and that not done yet) * * Revision 9.139 92/07/27 10:11:21 hines * Can do some limited vectorization. Much remains. Often fails * * Revision 9.133 92/03/19 15:14:20 hines * creates a nrn_initialize function that will be called from finitialize(). * * Revision 9.128 92/02/05 14:47:46 hines * saber warning free * FUNCTION made global for use by other models. #define GLOBFUNC 1 * * Revision 9.122 91/10/28 09:09:24 hines * wathey's improvements. different binary architectures in different * directories. * * Revision 9.92 91/01/03 07:54:43 hines * nparout.c version comment moved to beginning of file * * Revision 9.89 90/12/14 15:43:33 hines * nmodl: point process working with proper current dimensions. tested with * stim.mod and pascab1.hoc * * Revision 9.83 90/12/12 09:01:51 hines * nmodl: nparout allocates the p-array * * Revision 9.73 90/12/04 11:59:50 hines * model version displayed only as comment in generated c file * format of plot lines for scalar in .var file is * name nl vindex pindex 1 nl * for vector with specific index: * name[index] vindex pindex 1 * for vector without index * name[size] vindex pindex size * * Revision 9.72 90/11/30 13:09:35 hines * dcurdv calculated for ionic currents. * * Revision 9.71 90/11/30 08:22:04 hines * modl_set_dt should only be created for time dependent models * * Revision 9.70 90/11/28 15:34:53 hines * much work on case when ion is a state * * Revision 9.61 90/11/23 10:01:14 hines * STEADYSTATE of kinetic and derivative blocks * * Revision 9.53 90/11/13 13:09:08 hines * nmodl: cachan works pretty well. ions generating current works. * * Revision 9.52 90/11/10 15:44:50 hines * nmodl: uses new NEURON { USEION ... format * passive.c works * * Revision 9.46 90/10/30 14:27:25 hines * calc_dt is gone. Not needed because due to scopfit, dt needs to be * calculated at every break point. * _reset no longer used to say that dt has changed. The integrator will * have to check that itself. * * Revision 9.45 90/10/30 13:55:45 hines * derivative blocks (this impacts kinetic and sens as well) now return * _reset which can be set with RESET statement. _reset is static in the * file and set to 0 on entry to a derivative or kinetic block. * * Revision 9.41 90/10/30 08:36:37 hines * saber warning free except for ytab.c and lex.c * * Revision 9.40 90/10/30 08:06:00 hines * nmodl: Passive.mod working with index vectors. No longer copying * doubles. Just copying two pointers. * * Revision 9.35 90/10/15 12:12:53 hines * mistake with checkin * * Revision 9.33 90/10/11 15:44:34 hines * bugs fixed with respect to conversion from pointer vector to index vector. * * Revision 9.32 90/10/08 14:12:15 hines * index vector instead of pointer vector for slist and dlist * * Revision 9.31 90/10/08 11:33:45 hines * simsys prototype * * Revision 9.18 90/08/07 15:35:44 hines * computation of rhs was bad * * Revision 9.16 90/08/02 08:58:02 hines * NMODL can use more than one mechanism. Integrators that use ninits and * reset will not work, though. * * Revision 9.14 90/07/31 17:03:03 hines * NMODL getting close. Compiles but multiple .mod files cause * multiple definitions. * * Revision 9.13 90/07/30 14:36:40 hines * NMODL looks pretty good. Ready to start testing. Have not yet tried * to compile the .c file. * * Revision 9.11 90/07/30 11:50:43 hines * NMODL getting better, almost done * * Revision 9.5 90/07/18 07:58:00 hines * define for arrays now (p + n) instead of &p[n]. This allows the c file * to have arrays that look like a[i] instead of *(a + i). * * Revision 8.9 90/04/03 07:44:29 mlh * for turbo-c defs.h stuff must appear after inclusion of scoplib.h * This is done by now saving defs.h stuff in defs_list and printing * it in cout.c. Note that each item is type VERBATIM so that there * is no prepended space. * * Revision 8.8 90/02/15 10:09:26 mlh * defs.h removed. Those defines now come from parout() * * Revision 8.7 90/01/16 11:05:43 mlh * error checking and cleanup after error and call to abort_run() * * Revision 8.6 89/11/21 07:36:19 mlh * _calc_dt used in scopcore and therefore must be declared even for * time independent models. * * Revision 8.5 89/11/17 16:07:45 mlh * _ninits tells how many times initmodel() is called. Used by * scopmath routines that need to know when to self_initialize. * * Revision 8.4 89/11/17 14:53:57 nfh * Changed modl_version string printed by SCoP to read: "Language version..." * * Revision 8.3 89/11/14 16:37:20 mlh * _reset set to true whenever initmodel is called and whenever _calc_dt * is true * * Revision 8.2 89/10/11 08:42:33 mlh * _reset apparently being declared elsewhere * * Revision 8.1 89/10/11 08:34:19 mlh * generate modl_version string in .c file * declare _reset=1 * * Revision 8.0 89/09/22 17:26:00 nfh * Freezing * * Revision 7.1 89/09/07 07:44:51 mlh * was failing to initialize time after match * many bugs in handling exact for loop of t to the break point * * Revision 7.0 89/08/30 13:31:25 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.0 89/08/14 16:26:11 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.0 89/07/24 17:02:39 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.2 89/07/18 11:54:02 mlh * first_time removed and MODEL_LEVEL used for declaration precedence * * Revision 1.2 89/07/18 11:21:54 mlh * eliminate first_time, etc. * * Revision 1.1 89/07/06 14:47:30 mlh * Initial revision * */ /* print the .c file from the lists */ #include "modl.h" #include "parse1.h" #include "symbol.h" #define P(arg) fputs(arg, fcout) List *procfunc, *initfunc, *modelfunc, *termfunc, *initlist, *firstlist; /* firstlist gets statements that must go before anything else */ #if NMODL List *nrnstate; extern List *currents, *set_ion_variables(), *get_ion_variables(); extern List *begin_dion_stmt(), *end_dion_stmt(); #endif extern Symbol *indepsym; extern List *indeplist; extern List *match_bound; extern List *defs_list; extern char *saveindep; extern char *RCS_version; extern char *RCS_date; char *modelline; #if VECTORIZE extern int vectorize; static List *vectorize_replacements; /* pairs of item pointer, strings */ extern char* cray_pragma(); #endif #if __TURBOC__ || SYSV || VMS #define index strchr #endif static initstates(); static funcdec(); void c_out() { #if NMODL Item *q; extern int point_process; #endif #if VECTORIZE if (vectorize) { vectorize_do_substitute(); c_out_vectorize(); return; } #endif Fprintf(fcout, "/* Created by Language version: %s of %s */\n", RCS_version, RCS_date); #if VECTORIZE P("/* NOT VECTORIZED */\n"); #endif Fflush(fcout); /* things which must go first and most declarations */ #if SIMSYS P("#include \n#include \n#include \"mathlib.h\"\n"); P("#include \"common.h\"\n#include \"softbus.h\"\n"); P("#include \"sbtypes.h\"\n#include \"Solver.h\"\n"); #else P("#include \n#include \n#include \"scoplib.h\"\n"); P("#undef PI\n"); #endif printlist(defs_list); printlist(firstlist); RCS_version[strlen(RCS_version) - 2] = '\0'; RCS_date[strlen(RCS_date) - 11] = '\0'; RCS_version = index(RCS_version, ':') + 2; RCS_date = index(RCS_date, ':') + 2; P("static int _reset;\n"); #if NMODL P("static "); #endif if (modelline) { Fprintf(fcout, "char *modelname = \"%s\";\n\n", modelline); } else { Fprintf(fcout, "char *modelname = \"\";\n\n"); } Fflush(fcout); /* on certain internal errors partial output * is helpful */ P("static int error;\n"); #if NMODL P("static "); #endif P("int _ninits = 0;\n"); P("static int _match_recurse=1;\n"); #if NMODL P("static "); #endif P("_modl_cleanup(){ _match_recurse=1;}\n"); /* * many machinations are required to make the infinite number of * definitions involving _p in defs.h to be invisible to the user */ /* * This one allows scop variables in functions which do not have the * p array as an argument */ #if SIMSYS || HMODL || NMODL #else P("static double *_p;\n\n"); #endif funcdec(); Fflush(fcout); /* * translations of named blocks into functions, procedures, etc. Also * some special declarations used by some blocks */ printlist(procfunc); Fflush(fcout); /* Initialization function must always be present */ #if NMODL P("\nstatic initmodel() {\n int _i; double _save;"); #endif #if SIMSYS || HMODL P("\ninitmodel() {\n int _i; double _save;"); #endif #if (!(SIMSYS || HMODL || NMODL)) P("\ninitmodel(_pp) double _pp[]; {\n int _i; double _save; _p = _pp;"); #endif #if !NMODL P("_initlists();\n"); #endif P("_ninits++;\n"); P(saveindep); /*see solve.c; blank if not a time dependent process*/ P("{\n"); initstates(); printlist(initfunc); if (match_bound) { P("\n_init_match(_save);"); } P("\n}\n}\n"); Fflush(fcout); #if NMODL /* generation of initmodel interface */ #if VECTORIZE P("\nstatic nrn_init(_pp, _ppd, _v) double *_pp, _v; Datum* _ppd; {\n"); P(" _p = _pp; _ppvar = _ppd;\n"); #else P("\nstatic nrn_init(_prop, _v) Prop *_prop; double _v; {\n"); P(" _p = _prop->param; _ppvar = _prop->dparam;\n"); #endif P(" v = _v;\n"); printlist(get_ion_variables(1)); P(" initmodel();\n"); printlist(set_ion_variables(1)); P("}\n"); /* standard modl EQUATION without solve computes current */ P("\nstatic double _nrn_current(_v) double _v;{double _current=0.;v=_v;{"); if (currents->next != currents) { printlist(modelfunc); } ITERATE(q, currents) { Sprintf(buf, " _current += %s;\n", SYM(q)->name); P(buf); } P("\n} return _current;\n}\n"); /* the neuron current also has to compute the dcurrent/dv as well as make sure all currents accumulated properly (currents list) */ #if VECTORIZE P("\nstatic double nrn_cur(_pp, _ppd, _pdiag, _v) double *_pp, *_pdiag, _v; Datum* _ppd; {\n"); #else P("\nstatic double nrn_cur(_prop, _pdiag, _v) Prop *_prop; double *_pdiag, _v;{\n"); #endif if (currents->next != currents) { P(" double _g, _rhs;\n"); #if VECTORIZE P(" _p = _pp; _ppvar = _ppd;\n"); #else P(" _p = _prop->param; _ppvar = _prop->dparam;\n"); #endif printlist(get_ion_variables(0)); P(" _g = _nrn_current(_v + .001);\n"); printlist(begin_dion_stmt()); P(" _rhs = _nrn_current(_v);\n"); printlist(end_dion_stmt(".001")); P(" _g = (_g - _rhs)/.001;\n"); /* set the ion variable values */ printlist(set_ion_variables(0)); if (point_process) { P(" *_pdiag += _g * 1.e2/(_nd_area);\n return (_rhs - _g*_v) * 1.e2/(_nd_area);\n}\n"); }else{ P(" *_pdiag += _g;\n return _rhs - _g*_v;\n}\n"); } }else{ P(" return 0.;\n}\n"); } /* nrnstate list contains the EQUATION solve statement so this advances states by dt */ #if VECTORIZE P("\nstatic nrn_state(_pp, _ppd, _v) double *_pp, _v; Datum* _ppd; {\n"); #else P("\nstatic nrn_state(_prop, _v) Prop *_prop; double _v; {\n"); #endif if (nrnstate || currents->next == currents) { P(" double _break, _save;\n"); #if VECTORIZE P(" _p = _pp; _ppvar = _ppd;\n"); #else P(" _p = _prop->param; _ppvar = _prop->dparam;\n"); #endif P(" _break = t + .5*dt; _save = t; delta_t = dt;\n"); P(" v=_v;\n{\n"); printlist(get_ion_variables(1)); if (nrnstate) { printlist(nrnstate); } if (currents->next == currents) { printlist(modelfunc); } printlist(set_ion_variables(1)); P("\n}"); } P("\n}\n"); #else /* Model function must always be present */ #if SIMSYS P("\nmodel() {\n"); P("double _break, _save;\n{\n"); #else P("\nmodel(_pp, _indepindex) double _pp[]; int _indepindex; {\n"); P("double _break, _save;"); #if HMODL P("\n{\n"); #else P("_p = _pp;\n{\n"); #endif #endif printlist(modelfunc); P("\n}\n}\n"); Fflush(fcout); #endif #if NMODL P("\nstatic terminal(){}\n"); #else /* Terminal function must always be present */ #if SIMSYS || HMODL P("\nterminal() {"); P("\n{\n"); #else P("\nterminal(_pp) double _pp[];{"); P("_p = _pp;\n{\n"); #endif printlist(termfunc); P("\n}\n}\n"); Fflush(fcout); #endif /* initlists() is called once to setup slist and dlist pointers */ #if NMODL || SIMSYS || HMODL P("\nstatic _initlists() {\n"); #else P("\n_initlists() {\n"); #endif P(" int _i; static int _first = 1;\n"); P(" if (!_first) return;\n"); printlist(initlist); P("_first = 0;\n}\n"); } /* * One of the things initmodel() must do is initialize all states to the * value of state0. This generated code goes before any explicit initialize * code written by the user. */ static void initstates() { int i; Item *qs; Symbol *s; SYMITER_STAT { Sprintf(buf, "%s0", s->name); if (lookup(buf)) { /* if no constant associated * with a state such as the * ones automattically * generated by SENS then * there is no initialization * line */ if (s->subtype & ARRAY) { Fprintf(fcout, " for (_i=0; _i<%d; _i++) %s[_i] = %s0;\n", s->araydim, s->name, s->name); } else { Fprintf(fcout, " %s = %s0;\n", s->name, s->name); } } } } /* * here is the only place as of 18-apr-89 where we don't explicitly know the * type of a list element */ void printlist(s) List *s; { Item *q; int newline = 0, indent = 0, i; /* * most of this is merely to decide where newlines and indentation * goes so that the .c file can be read if something goes wrong */ if (!s) { return; } ITERATE(q, s) { if (q->itemtype == SYMBOL) { if (SYM(q)->type == SPECIAL) { switch (SYM(q)->subtype) { case SEMI: newline = 1; break; case BEGINBLK: newline = 1; indent++; break; case ENDBLK: newline = 1; indent--; break; } } Fprintf(fcout, " %s", SYM(q)->name); } else if (q->itemtype == VERBATIM) { Fprintf(fcout, "%s", STR(q)); }else { Fprintf(fcout, " %s", STR(q)); } if (newline) { newline = 0; Fprintf(fcout, "\n"); for (i = 0; i < indent; i++) { Fprintf(fcout, " "); } } } } static void funcdec() { int i; Symbol *s; List *qs; SYMITER(NAME) { /*EMPTY*/ /*maybe*/ if (s->subtype & FUNCT) { #define GLOBFUNCT 1 #if GLOBFUNCT && NMODL #else Fprintf(fcout, "static double %s();\n", s->name); #endif } if (s->subtype & PROCED) { Fprintf(fcout, "static %s();\n", s->name); } } } #if VECTORIZE void c_out_vectorize() { Item *q; extern int point_process; Fprintf(fcout, "/* Created by Language version: %s of %s */\n", RCS_version, RCS_date); Fflush(fcout); /* things which must go first and most declarations */ P("/* VECTORIZED */\n"); P("#include \n#include \n#include \"scoplib.h\"\n"); P("#undef PI\n"); printlist(defs_list); printlist(firstlist); RCS_version[strlen(RCS_version) - 2] = '\0'; RCS_date[strlen(RCS_date) - 11] = '\0'; RCS_version = index(RCS_version, ':') + 2; RCS_date = index(RCS_date, ':') + 2; P("static int _reset;\n"); if (modelline) { Fprintf(fcout, "static char *modelname = \"%s\";\n\n", modelline); } else { Fprintf(fcout, "static char *modelname = \"\";\n\n"); } Fflush(fcout); /* on certain internal errors partial output * is helpful */ P("static int error;\n"); P("static int _ninits = 0;\n"); P("static int _match_recurse=1;\n"); P("static _modl_cleanup(){ _match_recurse=1;}\n"); funcdec(); Fflush(fcout); /* * translations of named blocks into functions, procedures, etc. Also * some special declarations used by some blocks */ printlist(procfunc); Fflush(fcout); /* Initialization function must always be present */ P("\nstatic initmodel(_ix) int _ix; {\n int _i; double _save;"); #if 0 P("_initlists(_ix);\n"); P("_ninits++;\n"); P(saveindep); /*see solve.c; blank if not a time dependent process*/ #endif P("{\n"); initstates(); printlist(initfunc); if (match_bound) { assert(!vectorize); P("\n_init_match(_save);"); } P("\n}\n}\n"); Fflush(fcout); /* generation of initmodel interface */ P("\nstatic nrn_init(_count, _nodes, _data, _pdata)\n"); P(" int _count; Node** _nodes; double** _data; Datum** _pdata;\n"); P("{ int _ix;\n"); P(" _p = _data; _ppvar = _pdata;\n"); check_tables(); P(cray_pragma()); P(" for (_ix = 0; _ix < _count; ++_ix) {\n"); P(" v = _nodes[_ix]->_v;\n"); printlist(get_ion_variables(1)); P(" initmodel(_ix);\n"); printlist(set_ion_variables(1)); P(" }\n"); P("}\n"); /* standard modl EQUATION without solve computes current */ P("\nstatic double _nrn_current(_ix, _v) int _ix; double _v;{\n double _current=0.;v=_v;\n {"); if (currents->next != currents) { printlist(modelfunc); } ITERATE(q, currents) { Sprintf(buf, " _current += %s;\n", SYM(q)->name); P(buf); } P("\n} return _current;\n}\n"); /* the neuron current also has to compute the dcurrent/dv as well as make sure all currents accumulated properly (currents list) */ P("\nstatic double nrn_cur(_count, _nodes, _data, _pdata)\n"); P(" int _count; Node** _nodes; double** _data; Datum** _pdata;\n"); P("{\n"); if (currents->next != currents) { P("int _ix;\n"); P(" _p = _data; _ppvar = _pdata;\n"); check_tables(); P("\n#if METHOD3\n if (_method3) {\n"); /*--- reprduction of normal with minor changes ---*/ P(cray_pragma()); P(" for (_ix = 0; _ix < _count; ++_ix) {\n"); P(" double _g, _rhs, _v;\n"); P(" _v = _nodes[_ix]->_v;\n"); printlist(get_ion_variables(0)); P(" _g = _nrn_current(_ix, _v + .001);\n"); printlist(begin_dion_stmt()); P("\n _rhs = _nrn_current(_ix, _v);\n"); printlist(end_dion_stmt(".001")); P(" _g = (_g - _rhs)/.001;\n"); /* set the ion variable values */ printlist(set_ion_variables(0)); if (point_process) { P(" _nodes[_ix]->_d += _g * 1.e2/(_nd_area);\n"); P(" _nodes[_ix]->_rhs += (_g*_v - _rhs) * 1.e2/(_nd_area);\n"); }else{ P(" _nodes[_ix]->_thisnode._GC += _g;\n"); P(" _nodes[_ix]->_thisnode._EC += (_g*_v - _rhs);\n"); } P(" }\n"); /*-------------*/ P("\n }else\n#endif\n {\n"); /*--- normal ---*/ P(cray_pragma()); P(" for (_ix = 0; _ix < _count; ++_ix) {\n"); P(" double _g, _rhs, _v;\n"); P(" _v = _nodes[_ix]->_v;\n"); printlist(get_ion_variables(0)); P(" _g = _nrn_current(_ix, _v + .001);\n"); printlist(begin_dion_stmt()); P("\n _rhs = _nrn_current(_ix, _v);\n"); printlist(end_dion_stmt(".001")); P(" _g = (_g - _rhs)/.001;\n"); /* set the ion variable values */ printlist(set_ion_variables(0)); if (point_process) { P(" _nodes[_ix]->_d += _g * 1.e2/(_nd_area);\n"); P(" _nodes[_ix]->_rhs += (_g*_v - _rhs) * 1.e2/(_nd_area);\n"); }else{ P(" _nodes[_ix]->_d += _g;\n"); P(" _nodes[_ix]->_rhs += (_g*_v - _rhs);\n"); } P(" }\n"); /*------------*/ P(" }\n"); } P(" return 0.;\n}\n"); /* nrnstate list contains the EQUATION solve statement so this advances states by dt */ P("\nstatic nrn_state(_count, _nodes, _data, _pdata)\n"); P(" int _count; Node** _nodes; double** _data; Datum** _pdata;\n"); P("{\n"); if (nrnstate || currents->next == currents) { P(" int _ix;\n"); P(" double _break, _save;\n"); P(" _p = _data; _ppvar = _pdata;\n"); check_tables(); P(" _break = t + .5*dt; _save = t; delta_t = dt;\n"); P(cray_pragma()); P(" for (_ix = 0; _ix < _count; ++_ix) {\n"); P(" v = _nodes[_ix]->_v;\n"); printlist(get_ion_variables(1)); P(" }\n"); P("\n{\n"); if (nrnstate) { printlist(nrnstate); } P("}\n"); P(cray_pragma()); P(" for (_ix = 0; _ix < _count; ++_ix) {\n"); if (currents->next == currents) { printlist(modelfunc); } printlist(set_ion_variables(1)); P(" }\n"); } P("}\n"); Fflush(fcout); P("\nstatic terminal(){}\n"); /* vectorized: data must have own copies of slist and dlist for now we don't vectorize if slist or dlist exists. Eventually must separate initialization of static things from vectorized things. */ /* initlists() is called once to setup slist and dlist pointers */ P("\nstatic _initlists(){\n"); P(" int _i; static int _first = 1;\n"); P(" if (!_first) return;\n"); printlist(initlist); P("_first = 0;\n}\n"); } void vectorize_substitute(q, str) Item* q; char* str; { if (!vectorize_replacements) { vectorize_replacements = newlist(); } lappenditem(vectorize_replacements, q); lappendstr(vectorize_replacements, str); } void vectorize_do_substitute() { Item *q, *q1; if (vectorize_replacements) { ITERATE(q, vectorize_replacements) { q1 = ITM(q); q = q->next; replacstr(q1, STR(q)); } } } char* cray_pragma() { static char buf[] = "\ \n#if _CRAY\ \n#pragma _CRI ivdep\ \n#endif\ \n"; return buf; } #endif /*VECTORIZE*/ neuron-7.5/src/nmodl/deriv.c000077500000000000000000001011451323325274500160630ustar00rootroot00000000000000#include <../../nmodlconf.h> #include "modl.h" #include "symbol.h" #include #undef METHOD #include "parse1.h" static List *deriv_imp_list; /* list of derivative blocks that were translated in form suitable for the derivimplicit method */ static char Derivimplicit[] = "derivimplicit"; extern Symbol *indepsym; extern List *indeplist; extern int sens_parm, numlist; int dtsav_for_nrn_state; static void copylist(); List* massage_list_; List* netrec_cnexp; #if VECTORIZE extern int vectorize; extern int assert_threadsafe; extern int thread_data_index; extern List* thread_mem_init_list; extern List* thread_cleanup_list; #endif #if CVODE extern char* cvode_deriv(), *cvode_eqnrhs(); extern Item* cvode_cnexp_solve; static void cvode_diffeq(); static List* cvode_diffeq_list, *cvode_eqn; static int cvode_cnexp_possible; #endif void solv_diffeq(qsol, fun, method, numeqn, listnum, steadystate, btype) Item *qsol; Symbol *fun, *method; int numeqn, listnum, steadystate; int btype; { char *maxerr_str, dindepname[256]; char deriv1_advance[256], deriv2_advance[256]; char ssprefix[8]; if (method && strcmp(method->name, "cnexp") == 0) { sprintf(buf, " %s();\n", fun->name); replacstr(qsol, buf); sprintf(buf, " %s(_p, _ppvar, _thread, _nt);\n", fun->name); vectorize_substitute(qsol, buf); return; } if (steadystate) { Strcpy(ssprefix, "_ss_"); }else{ Strcpy(ssprefix, ""); } Sprintf(dindepname, "d%s", indepsym->name); if (fun->subtype & KINF) { /* translate the kinetic equations */ /* can be standard integrator, full matrix advancec, or sparse matrix advance */ /* at this time only sparse and standard exists */ if (method->subtype & DERF) { kinetic_intmethod(fun, method->name); } else { kinetic_implicit(fun, dindepname, method->name); } } save_dt(qsol); if (method->subtype & DERF) { if (method->u.i == 1) { /* variable step method */ maxerr_str = ", maxerr"; IGNORE(ifnew_parminstall("maxerr", "1e-5", "", "")); } else { maxerr_str = ""; } if (deriv_imp_list) { /* make sure deriv block translation matches method */ Item *q; int found=0; ITERATE(q, deriv_imp_list) { if (strcmp(STR(q), fun->name) == 0) { found = 1; } } if ((strcmp(method->name, Derivimplicit) == 0) ^ (found == 1)) { diag("To use the derivimplicit method the SOLVE statement must\ precede the DERIVATIVE block\n", " and all SOLVEs using that block must use the derivimplicit method\n"); } Sprintf(deriv1_advance, "_deriv%d_advance = 1;\n", listnum); Sprintf(deriv2_advance, "_deriv%d_advance = 0;\n", listnum); Sprintf(buf, "static int _deriv%d_advance = 0;\n", listnum); q = linsertstr(procfunc, buf); Sprintf(buf, "\n#define _deriv%d_advance _thread[%d]._i\n\ #define _dith%d %d\n#define _recurse _thread[%d]._i\n#define _newtonspace%d _thread[%d]._pvoid\nextern void* nrn_cons_newtonspace(int);\n\ ", listnum, thread_data_index, listnum, thread_data_index+1, thread_data_index+2, listnum, thread_data_index+3); vectorize_substitute(q, buf); Sprintf(buf, " _thread[_dith%d]._pval = (double*)ecalloc(%d, sizeof(double));\n", listnum, 2*numeqn); lappendstr(thread_mem_init_list, buf); Sprintf(buf, " _newtonspace%d = nrn_cons_newtonspace(%d);\n", listnum, numeqn); lappendstr(thread_mem_init_list, buf); Sprintf(buf, " free((void*)(_thread[_dith%d]._pval));\n", listnum); lappendstr(thread_cleanup_list, buf); Sprintf(buf, " nrn_destroy_newtonspace(_newtonspace%d);\n", listnum); lappendstr(thread_cleanup_list, buf); thread_data_index += 4; }else{ Strcpy(deriv1_advance, ""); Strcpy(deriv2_advance, ""); } Sprintf(buf,"%s %s%s(_ninits, %d, _slist%d, _dlist%d, _p, &%s, %s, %s, &_temp%d%s);\n%s", deriv1_advance, ssprefix, method->name, numeqn, listnum, listnum, indepsym->name, dindepname, fun->name, listnum, maxerr_str, deriv2_advance); }else{ Sprintf(buf, "%s%s(&_sparseobj%d, %d, _slist%d, _dlist%d, _p, &%s, %s, %s\ ,&_coef%d, _linmat%d);\n", ssprefix, method->name, listnum, numeqn, listnum, listnum, indepsym->name, dindepname, fun->name, listnum, listnum); } replacstr(qsol, buf); #if VECTORIZE if (method->subtype & DERF) { /* derivimplicit */ Sprintf(buf,"%s %s%s_thread(%d, _slist%d, _dlist%d, _p, %s, _ppvar, _thread, _nt);\n%s", deriv1_advance, ssprefix, method->name, numeqn, listnum, listnum, fun->name, deriv2_advance); vectorize_substitute(qsol, buf); }else{ /* kinetic */ if (vectorize) { Sprintf(buf, "%s%s_thread(&_thread[_spth%d]._pvoid, %d, _slist%d, _dlist%d, _p, &%s, %s, %s\ , _linmat%d, _ppvar, _thread, _nt);\n", ssprefix, method->name, listnum, numeqn, listnum, listnum, indepsym->name, dindepname, fun->name, listnum); vectorize_substitute(qsol, buf); } #endif } dtsav_for_nrn_state = 1; sprintf(buf," if (secondorder) {\n" " int _i;\n" " for (_i = 0; _i < %d; ++_i) {\n" " _p[_slist%d[_i]] += dt*_p[_dlist%d[_i]];\n" " }}\n", numeqn, listnum, listnum); insertstr(qsol->next, buf); } /* addition of higher order derivatives User appearance: Higher order derivatives are now allowed in DERIVATIVE blocks. The number of primes following a variable is the order of the derivative. For example, y'''' is a 4th order derivative. The highest derivative of a state must appear on the left hand side of the equation. Lower order derivatives of a state (including the state itself) may appear on the right hand side within an arbitrary expression. It makes no sense, in general, to have multiple equations involving the same state on the left hand side. The most common usage will be equations of the form y'' = f(y, y', t) Higher derivatives can be accessed in SCoP as y' Dy y'' D2y y''' D3y etc. Note that all derivatives except the highest derivative are themselves states on an equal footing with y. E.G. they can be used within a MATCH block, they can be explicitly declared within a STATE block (and given START values), and they have associated initial value constants. Initial values default to 0. Here is a complicated example which shows off the syntax (I have no idea if the solution exists). INDEPENDENT {t FROM 0 TO 1 WITH 1} STATE {x y y' START 1 x' START -10 } DERIVATIVE d { x''' = y + 3*x''*y' + sin(x') + exp(x) y'' = cos(x'' + y) - y' MATCH { y0 y(1)=1 x(1)=1 Dx0 x''(1)=0 } EQUATION {SOLVE d} Note that we had to use Dx0 since x'0 is illegal. Also Dx0 has a value of -10. Implementation : In parse1.y we see that asgn: varname '=' expr and that varname gets marked if it is type PRIME. With respect to higher order derivatives, therefore, only the highest order actually used in the equations in that block should be marked. Furthermore these highest primes may or may not be dependent variables and the lesser primes must be created as states. We use a special iterator FORALL which returns each lesser order symbol given a dstate. The implicit equations of the form DD2y = D3y do not have to be constructed and the dependent variables DD2y do not have to be created since the slist and dlist links can carry this information. Thus dlist[D2y] == slist[D3y] causes the integrators to do the right thing without, in fact, doing any arithmetic. We assume that the itegrators either save the *dlist values or update *slist using a loop running from 0 to N. This is why the FORALL interator returns states starting with the base state (so that *slist[i+1] doesn't change until after *dlist[i] is used. (they point to the same value). In the case of a second order equation, the lists are: slist[0] = &y dlist[0] = &Dy slist[1] = &Dy dlist[1] = &D2y With respect to the MATCH process the code which unmarks the PRIMES and marks the corresponding state is inadequate since several states must be marked some of which are PRIME. For this reason we distinguish using a -1 to mark states for later counting. The array problem is solved by using lex to: when a PRIME is seen, check against the base state. If the base state doesn't exist don't worry. If the STATE is an array Then make PRIME an array of the same dimension. depinstall automattically creates a Dstate for each state passed to it as well as a state0 (optional). This is OK since they dissappear if unused. */ #define FORALL(state,dstate) \ for (state = init_forderiv(dstate); state; state = next_forderiv()) /* This returns all states of lower order than dstate in the order of base state first. Will install PRIME if necessary. */ static Symbol *forderiv; /* base state */ static char base_units[256]; /*base state units */ static int indx, maxindx; /* current indx, and indx of dstate */ static Symbol * init_forderiv(prime) Symbol *prime; { char name[256]; double d1, d2; assert(prime->type == PRIME); /*extract maxindx and basename*/ if (isdigit(prime->name[1])) { /* higher than 1 */ if(sscanf(prime->name + 1, "%d%s", &maxindx, name) != 2) { diag("internal error in init_forderiv in init.c", (char *)0); } }else{ maxindx = 1; Strcpy(name, prime->name + 1); } forderiv = lookup(name); if (!forderiv || !(forderiv->subtype & STAT)) { diag(name, " must be declared as a state variable"); } if (forderiv->araydim != prime->araydim) { Sprintf(buf, "%s and %s have different dimensions", forderiv->name, prime->name); diag(buf, (char *)0); } indx = 0; decode_ustr(forderiv, &d1, &d2, base_units); return forderiv; } static char *name_forderiv(i) int i; { static char name[256]; assert(i > 0 && forderiv); if (i > 1) { Sprintf(name, "D%d%s", i, forderiv->name); }else{ Sprintf(name, "D%s", forderiv->name); } return name; } /* Scop can handle 's so we put the prime style names into the .var file. We make use of the tools here to reconstruct the original prime name. */ char *reprime(sym) Symbol *sym; { static char name[256]; int i; char *cp; if (sym->type != PRIME) { Strcpy(name, sym->name); return name; } IGNORE(init_forderiv(sym)); Strcpy(name, forderiv->name); cp = name + strlen(name); for (i=0; i= maxindx) { return SYM0; } name = name_forderiv(indx); if((s = lookup(name)) == SYM0) { s = install(name, PRIME); Sprintf(units, "%s/%s^%d", base_units, STR(indeplist->prev), indx); depinstall(1, s, forderiv->araydim, "0", "1", units, ITEM0, 1, ""); s->usage |= DEP; } if (s->araydim != forderiv->araydim) { diag(s->name, " must have same dimension as associated state"); } if (!(s->subtype & STAT)) {/* Dstate changes to state */ Sprintf(units, "%s/%s^%d", base_units, STR(indeplist->prev), indx); s->subtype &= ~DEP; depinstall(1, s, forderiv->araydim, "0", "1", units, ITEM0, 1, ""); depinstall(1, s, forderiv->araydim, "0", "1", units, ITEM0, 1, ""); s->usage |= DEP; } return s; } /* mixed derivative and nonlinear equations */ /* Implementation: The main requirement is to distinguish between the states which have derivative specifications and the states which are solved for by the nonlinear equations. We do this by having the left hand side derivative saved in a list instead of marking the variables in the used field. See deriv_used(). States seen in the nonlinear equations are marked as usual. To leave only nonlinear states marked we then cast out any lesser state which is marked. (eg if y''=.. then y and y' cannot be states of the nonlinear equation). The former version also made use of state->used = -1 for match purposes. We replace this usage with a list of states of the derivatives. This means that the derivative block with respect to derivative equations no longer uses the used field. To avoid copying the block we (albeit resulting is somewhat poorer efficiency) we allow the block to call newton and pass itself as an argument. A flag tells the block if its call was by newton or by an integrator. My guess is this will still work with match, sens, and array states. */ /* derivative equations (and possibly some nonlinear equations) solved with an implicit method */ /* Implementation: Things are starting to get a little bit out of conceptual control. We make use of the mixed case, except that the number of nonlinear equations may be 0. The substantive change is that now the number of equations is the sum of the derivatives and the nonlinears and the extra equations added into the block are of the form dlist2[++_counte] = Dstate - (state - statesave1[0])/dt; The administrative needs are that newton is called with the total number of equations and that we can match state and statesave. Notice that we already have two sets of slists floating around and one dlist, currently they are the slist and dlist for the derivative state and state' and the slist for the nonlinear states (the corresponding dlist is just the rhs of the equations). Clearly, statesave should be associated with the derivative slist and will be in that order, then the slist for newton will be expanded by not resetting the used field. The biggest conceptual problem is how to generate the code at the time we handle the SOLVE since the actual numbers for the declarations of the newton slists depend on the method. Here, we assume a flag, deriv_implicit, which tells us which code to generate. Whether this means that we must look through the .mod file for all the SOLVE statements or whether all this stuff is saved for calling from the solve handler as in the kinetic block is not specified yet. For now, we demand that the SOLVE statement be seen first if it invokes the derivimplicit method. Otherwise modl generates an error message. */ void add_deriv_imp_list(name) char *name; { if (!deriv_imp_list) { deriv_imp_list = newlist(); } Lappendstr(deriv_imp_list, name); } static List *deriv_used_list; /* left hand side derivatives of diffeqs */ static List *deriv_state_list; /* states of the derivative equations */ void deriv_used(s, q1, q2) /* q1, q2 are begin and end tokens for expression */ Symbol *s; Item* q1, *q2; { if (!deriv_used_list) { deriv_used_list = newlist(); deriv_state_list = newlist(); } Lappendsym(deriv_used_list, s); #if CVODE if (!cvode_diffeq_list) { cvode_diffeq_list = newlist(); } lappendsym(cvode_diffeq_list, s); lappenditem(cvode_diffeq_list, q1); lappenditem(cvode_diffeq_list, q2); #endif } static int matchused = 0; /* set when MATCH seen */ /* args are --- derivblk: DERIVATIVE NAME stmtlist '}' */ void massagederiv(q1, q2, q3, q4, sensused) Item *q1, *q2, *q3, *q4; int sensused; { int count = 0, deriv_implicit, solve_seen; char units[256]; Item *qs, *q, *mixed_eqns(); Symbol *s, *derfun, *state; /* to allow verification that definition after SOLVE */ if (!massage_list_) { massage_list_ = newlist(); } Lappendsym(massage_list_, SYM(q2)); /* all this junk is still in the intoken list */ Sprintf(buf, "static int %s(_threadargsproto_);\n", SYM(q2)->name); Linsertstr(procfunc, buf); replacstr(q1, "\nstatic int"); q = insertstr(q3, "() {_reset=0;\n"); derfun = SYM(q2); vectorize_substitute(q, "(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset=0; int error = 0;\n"); if (derfun->subtype & DERF && derfun->u.i) { diag("DERIVATIVE merging not implemented", (char *)0); } /* check if we are to translate using derivimplicit method */ deriv_implicit = 0; if (deriv_imp_list) ITERATE(q, deriv_imp_list) { if (strcmp(derfun->name, STR(q)) == 0) { deriv_implicit = 1; break; } } numlist++; derfun->u.i = numlist; derfun->subtype |= DERF; if (!deriv_used_list) { diag("No derivative equations in DERIVATIVE block", (char*)0); } ITERATE(qs, deriv_used_list) { s = SYM(qs); if (!(s->subtype & DEP) && !(s->subtype & STAT)) { IGNORE(init_forderiv(s)); Sprintf(units, "%s/%s^%d", base_units, STR(indeplist->prev), maxindx); depinstall(0, s, s->araydim, "0", "1", units, ITEM0, 0, ""); } /* high order: make sure no lesser order is marked, and all lesser orders exist as STAT */ FORALL(state, s) { if (state->type == PRIME) { ITERATE(q, deriv_used_list) if (state == SYM(q)) { diag(state->name, ": Since higher derivative is being used, this state \ is not allowed on the left hand side."); } } Lappendsym(deriv_state_list, state); if (sensused) { add_sens_statelist(state); state->varnum = count; } #if CVODE slist_data(state, count, numlist); #endif if (s->subtype & ARRAY) { int dim = s->araydim; Sprintf(buf, "for(_i=0;_i<%d;_i++){_slist%d[%d+_i] = (%s + _i) - _p;" ,dim, numlist , count, state->name); Lappendstr(initlist, buf); Sprintf(buf, " _dlist%d[%d+_i] = (%s + _i) - _p;}\n" , numlist, count, name_forderiv(indx + 1)); Lappendstr(initlist, buf); count += dim; }else{ Sprintf(buf, "_slist%d[%d] = &(%s) - _p;", numlist, count, state->name); Lappendstr(initlist, buf); Sprintf(buf, " _dlist%d[%d] = &(%s) - _p;\n", numlist, count, name_forderiv(indx + 1)); Lappendstr(initlist, buf); count++; } } } if (count == 0) { diag("DERIVATIVE contains no derivatives", (char *)0); } derfun->used = count; Sprintf(buf, "static int _slist%d[%d], _dlist%d[%d];\n", numlist, count*(1 + 2*sens_parm), numlist, count*(1 + 2*sens_parm)); Linsertstr(procfunc, buf); #if CVODE Lappendstr(procfunc, "\n/*CVODE*/\n"); Sprintf(buf, "static int _ode_spec%d", numlist); Lappendstr(procfunc, buf); {Item* qq = procfunc->prev; copyitems(q1->next, q4, procfunc->prev); vectorize_substitute(qq->next, "(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset = 0;"); vectorize_scan_for_func(qq->next, procfunc); } lappendstr(procfunc, "return _reset;\n}\n"); /* don't emit _ode_matsol if the user has defined cvodematsol */ if (!lookup("cvodematsol")) { Item* qq; Item* qextra = q1->next->next->next->next; Sprintf(buf, "static int _ode_matsol%d", numlist); Lappendstr(procfunc, buf); vectorize_substitute(lappendstr(procfunc, "() {\n"), "(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {\n"); qq = procfunc->next; cvode_cnexp_possible = 1; ITERATE(q, cvode_diffeq_list) { Symbol* s; Item* q1, *q2; s = SYM(q); q = q->next; q1=ITM(q); q = q->next; q2 = ITM(q); #if 1 while (qextra != q1) { /* must first have any intervening statements */ switch (qextra->itemtype) { case STRING: Lappendstr(procfunc, STR(qextra)); break; case SYMBOL: Lappendsym(procfunc, SYM(qextra)); break; } qextra = qextra->next; } #endif cvode_diffeq(s, q1, q2); qextra = q2->next; } Lappendstr(procfunc, ";\n return 0;\n}\n"); vectorize_scan_for_func(qq, procfunc); } Lappendstr(procfunc, "/*END CVODE*/\n"); if (cvode_cnexp_solve && cvode_cnexp_success(q1, q4)) { freelist(&deriv_used_list); freelist(&deriv_state_list); return; } #endif if (deriv_implicit) { Sprintf(buf, "static double _savstate%d[%d], *_temp%d = _savstate%d;\n", numlist, count*(1 + 2*sens_parm), numlist, numlist); q = linsertstr(procfunc, buf); vectorize_substitute(q, ""); }else{ Sprintf(buf, "static double *_temp%d;\n", numlist); Linsertstr(procfunc, buf); } movelist(q1, q4, procfunc); Lappendstr(procfunc, "return _reset;}\n"); if (sensused) sensmassage(DERIVATIVE, q2, numlist); /*among other things the name of q2 is changed. ie a new item */ if (matchused) { matchmassage(count); } /* reset used field for any states that may appear in nonlinear equations which should not be solved for. */ ITERATE(q, deriv_used_list) { SYM(q)->used = 0; } if (deriv_implicit) { Symbol *sp; ITERATE(q, deriv_state_list) { SYM(q)->used = 1; } Sprintf(buf, "{int _id; for(_id=0; _id < %d; _id++) {\n\ if (_deriv%d_advance) {\n", count, numlist); Insertstr(q4, buf); sp = install("D", STRING); sp->araydim = count; /*this breaks SENS*/ q = insertsym(q4, sp); eqnqueue(q); Sprintf(buf, "_p[_dlist%d[_id]] - (_p[_slist%d[_id]] - _savstate%d[_id])/d%s;\n", numlist, numlist, numlist, indepsym->name); Insertstr(q4, buf); Sprintf(buf, "}else{\n_dlist%d[++_counte] = _p[_slist%d[_id]] - _savstate%d[_id];}}}\n", numlist+1, numlist, numlist); Insertstr(q4, buf); }else{ ITERATE(q, deriv_state_list) { SYM(q)->used = 0; } } /* if there are also nonlinear equations, put in the newton call, create the proper lists and fill in the left hand side of each equation. */ q = mixed_eqns(q2, q3, q4); /* numlist now incremented */ if (deriv_implicit) { Sprintf(buf, "{int _id; for(_id=0; _id < %d; _id++) { _savstate%d[_id] = _p[_slist%d[_id]];}}\n", count, derfun->u.i, derfun->u.i); Insertstr(q, buf); } freelist(&deriv_used_list); freelist(&deriv_state_list); } static List *match_init; /* list of states for which initial values are known. */ List *match_bound; /* list of triples or quadruples. First is the state symbol. Second is a string giving the matchtime expression. Third is a string giving the matchtarget expression Fourth is the loop index string if the state is an array*/ /* if non null then cout.c will put proper call at end of initmodel() */ /* note that the number of states in match_init plus the number of states in match_bound must be equal to the number of differential equations */ /* we limit ourselves to one matched boundary problem per model */ void matchinitial(q1) /* name */ Item *q1; { /* must be of form state0. Later we can check if state' is in fact used. Save the state symbol in the initialvalue matchlist */ Symbol *s, *state; s = SYM(q1); if ((s->subtype & (PARM | INDEP)) || !(s->subtype)) { /* possibly used before declared */ if (s->name[strlen(s->name) - 1] == '0') { Strcpy(buf, s->name); buf[strlen(buf) - 1] = '\0'; state = lookup(buf); if((state && (state->subtype & STAT)) || (state->type == PRIME)) { Lappendsym(match_init, state); return; } } } diag(s->name, " must be an initial state parameter"); return; } void matchbound(q1, q2, q3, q4, q5, sindex) /* q1name q2'(' q3')' '=' q4exprq5 */ Item *q1, *q2, *q3, *q4, *q5; Symbol *sindex; { /* q1 must be a state */ Symbol *state; Item *q; List *l; state = SYM(q1); if (!(state->subtype & STAT) && state->type != PRIME) { diag(state->name, " is not a state"); } if ((state->subtype & ARRAY) && !sindex) { diag(state->name, " must have an index for the implicit loop"); } if (!(state->subtype & ARRAY) && sindex) { diag(state->name, " is not an array"); } Lappendsym(match_bound, state); q = lappendsym(match_bound, SYM0); l = newlist(); movelist(q2, q3, l); LST(q) = l; q = lappendsym(match_bound, SYM0); l = newlist(); movelist(q4, q5, l); LST(q) = l; if (sindex) { Lappendstr(match_bound, sindex->name); } } void checkmatch(blocktype) int blocktype; { if (blocktype != DERIVATIVE) { diag("MATCH block can only be in DERIVATIVE block", (char *)0); } matchused = 1; /*communicate with massagederiv*/ if (match_bound || match_init) { diag("Only one MATCH block allowed", (char *)0); } if (!indepsym) { diag("INDEPENDENT variable must be declared before MATCH", " statement"); } match_bound = newlist(); match_init = newlist(); } void matchmassage(nderiv) int nderiv; { int count, nunknown, j; Item *q, *q1, *setup; Symbol *s; List *tmatch, *vmatch; char *imatch; matchused = 0; /* we have a list of states at which the initial values are known and a list of information about state(time) = match with implicit loop index if array. check that the total number of conditions = nderiv. the number of unknown initial conditions is the complement of the states which have known initial conditions ( the number of states in the match_bound list. Note that the complement of match_init states is NOT the list of states in match_bound. We create 1) array of doubles which will receive the values of the found initial conditions. (_found_init) 2) array of doubles which receives the match times 3) array of doubles which receives the match values 4) array of state pointers(state_match). we solve *statematch(matchtime) = matchvalue 5) array of state pointers(state_get). We initialize with *state_get = _found_init 6) since 2, 3, 4 must be sorted according to match times we create pointer arrays to 2 and 3 and pass those. 7) Spec of shoot requires the passing of pointer array to found_init. At this time I don't know how this can be restarted. Initmodel() calls _initmatch() which 1) if first=1 then sets first=0 sets up match times, match values, initializes _found_init, calls shoot(), calls initmodel(), sets first = 1 and exits. 2) if first=0 then put _found_init into states and exit. Call to _initmatch must be the last thing done in initmodel() in case the user desires to give good starting initial values to help shoot(). */ count = 0; ITERATE(q, match_init) { /* these initializations are done automatically by initmodel(), so just remove the state from the deriv_state_list */ s = SYM(q); ITERATE(q1, deriv_state_list) { if (SYM(q1) == s) { delete(q1); break; } } if (!(s->subtype & STAT)) { diag(s->name, " is not a state"); } if (s->subtype & ARRAY) { count += s->araydim; }else{ count++; } } nunknown = nderiv - count; if (nunknown <= 0) { diag("Nothing to match", (char *)0); } /* the ones that are still marked are the ones to solve for */ /* add the boilerplate for _initmatch and save the location where model specific info goes. */ Lappendstr(procfunc, "\n_init_match(_save) double _save;{ int _i;\nif (_match_recurse) {_match_recurse = 0;\n"); Sprintf(buf, "for (_i=0; _i<%d; _i++) _found_init[_i] = _p[_state_get[_i]];\n", nunknown); setup = lappendstr(procfunc, buf); Sprintf(buf, "error=shoot(%d, &(%s) - _p, _pmatch_time, _pmatch_value, _state_match,\ _found_init, _p, &(d%s));\n if(error){abort_run(error);}; %s = _save;", nunknown, indepsym->name, indepsym->name, indepsym->name); /*deltaindep may not be declared yet */ Lappendstr(procfunc, buf); Lappendstr(procfunc,"\n initmodel(_p); _match_recurse = 1;\n}\n"); Sprintf(buf, "for (_i=0; _i<%d; _i++) _p[_state_get[_i]] = _found_init[_i];", nunknown); Lappendstr(procfunc, buf); Lappendstr(procfunc, "\n}\n\n"); /* construct _state_get from the marked states */ j = 0; ITERATE(q, deriv_state_list) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "for (_i=0; _i<%d; _i++) {_state_get[%d+_i] = (%s + _i) - _p;}\n", s->araydim, j, s->name); j += s->araydim; } else { Sprintf(buf, "_state_get[%d] = &(%s) - _p;\n", j, s->name); j++; } Lappendstr(initlist, buf); } /* declare the arrays */ Sprintf(buf, "static int _state_get[%d], _state_match[%d];\n\ static double _match_time[%d], _match_value[%d], _found_init[%d];\n", nunknown, nunknown, nunknown, nunknown, nunknown); Linsertstr(procfunc, buf); Sprintf(buf, "static double *_pmatch_time[%d], *_pmatch_value[%d];\n", nunknown, nunknown); Linsertstr(procfunc, buf); /* create the _state_match stuff */ j = 0; ITERATE(q, match_bound) { s = SYM(q); if (!(s->subtype & STAT)) { diag(s->name, " is not a state"); } tmatch = LST(q = q->next); vmatch = LST(q = q->next); if (s->subtype & ARRAY) { imatch = STR(q = q->next); Sprintf(buf, "for (_i=0; _i<%d; _i++) {_state_match[%d+_i] = (%s + _i) - _p;}\n", s->araydim, j, s->name); Lappendstr(initlist, buf); Sprintf(buf, "{int %s; for (%s=0; %s<%d; %s++) {\n", imatch, imatch, imatch, s->araydim, imatch); Insertstr(setup, buf); Sprintf(buf, "_match_time[%s + %d] = ", imatch, j); Insertstr(setup, buf); copylist(tmatch, setup); Sprintf(buf, ";\n _match_value[%s + %d] = ", imatch, j); Insertstr(setup, buf); copylist(vmatch, setup); Insertstr(setup, ";\n}}\n"); j += s->araydim; count += s->araydim; }else{ Sprintf(buf, "_state_match[%d] = &(%s) - _p;\n", j, s->name); Lappendstr(initlist, buf); Sprintf(buf, "_match_time[%d] = ", j); Insertstr(setup, buf); copylist(tmatch, setup); Sprintf(buf, ";\n _match_value[%d] = ", j); Insertstr(setup, buf); copylist(vmatch, setup); Insertstr(setup, ";\n"); j++; count++; } } /* set up the trivial pointer arrays */ Sprintf(buf, "for(_i=0; _i<%d; _i++) { _pmatch_time[_i] = _match_time + _i;\n", nunknown); Lappendstr(initlist, buf); Lappendstr(initlist, "_pmatch_value[_i] = _match_value + _i;\n }\n"); if (count != nderiv) { Sprintf(buf, "%d equations != %d MATCH specs", nderiv, count); diag(buf, (char *)0); } } static void copylist(l, i) /* copy list l before item i */ List *l; Item *i; { Item *q; ITERATE(q, l) { switch(q->itemtype) { case STRING: Insertstr(i, STR(q)); break; case SYMBOL: Insertsym(i, SYM(q)); break; default: /*SUPPRESS 622*/ assert(0); } } } void copyitems(q1, q2, qdest) /* copy items before item */ Item* q1, *q2, *qdest; { Item* q; for (q = q2; q != q1; q = q->prev) { switch(q->itemtype) { case STRING: case VERBATIM: Linsertstr(qdest, STR(q)); break; case SYMBOL: Linsertsym(qdest, SYM(q)); break; default: /*SUPPRESS 622*/ assert(0); } } } #if CVODE static int cvode_linear_diffeq(ds, s, qbegin, qend) Symbol*ds, *s; Item* qbegin, *qend; { char* c; List* tlst; Item* q; tlst = newlist(); for (q = qbegin; q != qend->next; q = q->next) { switch (q->itemtype) { case SYMBOL: lappendsym(tlst, SYM(q)); break; case STRING: lappendstr(tlst, STR(q)); break; default: cvode_cnexp_possible = 0; return 0; } } cvode_parse(s, tlst); freelist(&tlst); c = cvode_deriv(); if (!cvode_eqn) { cvode_eqn = newlist(); } lappendsym(cvode_eqn, s); lappendstr(cvode_eqn, cvode_deriv()); lappendstr(cvode_eqn, cvode_eqnrhs()); if (c) { lappendstr(procfunc, c); lappendstr(procfunc, "))"); return 1; } cvode_cnexp_possible = 0; return 0; } /* DState symbol, begin, and end of expression */ static void cvode_diffeq(ds, qbegin, qend) Symbol* ds; Item* qbegin, *qend; { /* try first the assumption of linear. If not, then use numerical diff*/ Symbol* s; Item* q; /* get state symbol */ sscanf(ds->name, "D%s", buf); s = lookup(buf); assert(s); /* ds/(1. - dt*( */ Lappendsym(procfunc, ds); Lappendstr(procfunc, " / (1. - dt*("); if (cvode_linear_diffeq(ds, s, qbegin, qend)) { return; } /* ((expr(s+.001))-(expr))/.001; */ Lappendstr(procfunc, "(("); for (q = qbegin; q != qend->next; q = q->next) { switch(q->itemtype) { case STRING: Lappendstr(procfunc, STR(q)); break; case SYMBOL: if (SYM(q) == s) { Lappendstr(procfunc, "("); Lappendsym(procfunc, s); Lappendstr(procfunc, " + .001)"); }else{ Lappendsym(procfunc, SYM(q)); } break; default: assert(0); } } Lappendstr(procfunc, ") - ("); for (q = qbegin; q != qend->next; q = q->next) { switch(q->itemtype) { case STRING: Lappendstr(procfunc, STR(q)); break; case SYMBOL: Lappendsym(procfunc, SYM(q)); break; default: assert(0); } } Lappendstr(procfunc, " )) / .001 ))"); } /* the cnexp method was requested but the symbol in the solve queue was changed to derivimplicit and cvode_cnexp_solve holds a pointer to the solvq item (1st of three). The 0=f(state) equations have already been solved and the rhs for each has been saved. So we know if the translation is possible. */ int cvode_cnexp_success(q1, q2) Item* q1, *q2; { Item* q, *q3, *q4, *qeq; if ( cvode_cnexp_possible) { /* convert Method to nil and the type of the block to PROCEDURE */ SYM(cvode_cnexp_solve->next)->name = stralloc("cnexp", 0); delete(deriv_imp_list->next); /* replace the Dstate = f(state) equations */ qeq = cvode_eqn->next; ITERATE(q, cvode_diffeq_list) { Symbol* s; Item* q1, *q2; char* a, *b; s = SYM(qeq); qeq = qeq->next; a = STR(qeq); qeq = qeq->next; b = STR(qeq); qeq = qeq->next; q = q->next; q1=ITM(q); q = q->next; q2 = ITM(q); if (!netrec_cnexp) { netrec_cnexp = newlist(); } lappendsym(netrec_cnexp, s); if (strcmp(a, "0.0") == 0) { assert(b[strlen(b) - 9] == '/'); b[strlen(b) - 9] = '\0'; sprintf(buf," __primary -= 0.5*dt*( %s )", b); lappendstr(netrec_cnexp, buf); sprintf(buf," %s = %s - dt*(%s)", s->name, s->name, b); }else{ sprintf(buf," __primary += ( 1. - exp( 0.5*dt*( %s ) ) )*( %s - __primary )", a, b ); lappendstr(netrec_cnexp, buf); sprintf(buf," %s = %s + (1. - exp(dt*(%s)))*(%s - %s)", s->name, s->name, a, b, s->name ); } insertstr(q2->next, buf); q2 = q2->next; for(q3=q1->prev->prev; q3 != q2; q3 = q4) { q4 = q3->next; delete(q3); } } lappendstr(procfunc, "static int"); { Item* qq = procfunc->prev; copyitems(q1, q2, procfunc->prev); /* more or less redundant with massagederiv */ vectorize_substitute(qq->next->next, "(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {"); vectorize_scan_for_func(qq->next->next, procfunc); } lappendstr(procfunc, " return 0;\n}\n"); return 1; } fprintf(stderr, "Could not translate using cnexp method; using derivimplicit\n"); return 0; } #endif neuron-7.5/src/nmodl/difeqdef.h000077500000000000000000000023011323325274500165200ustar00rootroot00000000000000 #define yymaxdepth difeq_yymaxdepth #define yyparse difeq_yyparse #define yylex difeq_yylex #define yyerror difeq_yyerror #define yylval difeq_yylval #define yychar difeq_yychar #define yydebug difeq_yydebug #define yypact difeq_yypact #define yyr1 difeq_yyr1 #define yyr2 difeq_yyr2 #define yydef difeq_yydef #define yychk difeq_yychk #define yypgo difeq_yypgo #define yyact difeq_yyact #define yyexca difeq_yyexca #define yyerrflag difeq_yyerrflag #define yynerrs difeq_yynerrs #define yyps difeq_yyps #define yypv difeq_yypv #define yys difeq_yys #define yy_yys difeq_yyyys #define yystate difeq_yystate #define yytmp difeq_yytmp #define yyv difeq_yyv #define yy_yyv difeq_yyyyv #define yyval difeq_yyval #define yylloc difeq_yylloc #define yyreds difeq_yyreds #define yytoks difeq_yytoks #define yylhs difeq_yyyylhs #define yylen difeq_yyyylen #define yydefred difeq_yyyydefred #define yydgoto difeq_yyyydgoto #define yysindex difeq_yyyysindex #define yyrindex difeq_yyyyrindex #define yygindex difeq_yyyygindex #define yytable difeq_yyyytable #define yycheck difeq_yyyycheck neuron-7.5/src/nmodl/diffeq.c000066400000000000000000001544031323325274500162120ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Copy the first part of user declarations. */ #line 1 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:339 */ /* symbolically differentiate an expression with respect to a state and also transform an expression linear in the state into the form a*state + b The only thing that makes this less than elegant is dealing with 0.0 */ #include <../../nmodlconf.h> #include #include "modl.h" #include "difeqdef.h" /* every yy gets changed to diffeq_yy before compiling */ static int yylex(), yyparse(); static void yyerror(); static int d_invalid, eq_invalid; static char lbuf[4][1000]; static Item* qexpr; /* yylex finds tokens here;*/ static Symbol* state; static List* result; #define b1 sprintf(lbuf[0], #define b2 sprintf(lbuf[1], #define b3 sprintf(lbuf[2], #define b4 sprintf(lbuf[3], static void replace(), initbuf(), free4(); static int zero(); static char *expr(), *de(), *a(), *b(); static List* list4(); #line 100 "diffeq.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ #ifndef YY_YY_DIFFEQ_H_INCLUDED # define YY_YY_DIFFEQ_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { ATOM = 258, UNARYMINUS = 259 }; #endif /* Tokens. */ #define ATOM 258 #define UNARYMINUS 259 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 35 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:355 */ char* cp; List* list; /* expression, d(expression)/dstate, a*state, b */ #line 153 "diffeq.c" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_DIFFEQ_H_INCLUDED */ /* Copy the second part of user declarations. */ #line 170 "diffeq.c" /* yacc.c:358 */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE # if (defined __GNUC__ \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C # define YY_ATTRIBUTE(Spec) __attribute__(Spec) # else # define YY_ATTRIBUTE(Spec) /* empty */ # endif #endif #ifndef YY_ATTRIBUTE_PURE # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) #endif #ifndef YY_ATTRIBUTE_UNUSED # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 37 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 12 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 6 /* YYNRULES -- Number of rules. */ #define YYNRULES 16 /* YYNSTATES -- Number of states. */ #define YYNSTATES 27 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 259 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 10, 6, 4, 11, 5, 2, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 8 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 48, 48, 48, 50, 51, 59, 64, 71, 84, 100, 117, 131, 134, 135, 141, 148 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ATOM", "'+'", "'-'", "'*'", "'/'", "UNARYMINUS", "'('", "')'", "','", "$accept", "top", "$@1", "e", "arglist", "arg", YY_NULLPTR }; #endif # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 43, 45, 42, 47, 259, 40, 41, 44 }; # endif #define YYPACT_NINF -11 #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-11))) #define YYTABLE_NINF -1 #define yytable_value_is_error(Yytable_value) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int8 yypact[] = { -11, 5, 24, -11, -1, 24, 24, 30, 24, -11, 18, 24, 24, 24, 24, 30, 10, -11, -11, -5, -5, -11, -11, -11, 24, -11, -11 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 0, 0, 1, 4, 0, 0, 3, 12, 7, 0, 0, 0, 0, 0, 16, 0, 13, 5, 8, 9, 10, 11, 6, 0, 14, 15 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -11, -11, -11, -2, -11, -10 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 2, 15, 16, 17 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 7, 13, 14, 9, 10, 3, 25, 0, 8, 19, 20, 21, 22, 4, 26, 5, 0, 0, 0, 6, 23, 24, 11, 12, 13, 14, 0, 4, 18, 5, 0, 0, 0, 6, 11, 12, 13, 14 }; static const yytype_int8 yycheck[] = { 2, 6, 7, 5, 6, 0, 16, -1, 9, 11, 12, 13, 14, 3, 24, 5, -1, -1, -1, 9, 10, 11, 4, 5, 6, 7, -1, 3, 10, 5, -1, -1, -1, 9, 4, 5, 6, 7 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 13, 14, 0, 3, 5, 9, 15, 9, 15, 15, 4, 5, 6, 7, 15, 16, 17, 10, 15, 15, 15, 15, 10, 11, 17, 17 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 12, 14, 13, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 17 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 1, 3, 4, 2, 3, 3, 3, 3, 0, 1, 2, 3, 1 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*----------------------------------------. | Print this symbol's value on YYOUTPUT. | `----------------------------------------*/ static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T yystrlen (const char *yystr) { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: 'yyss': related to states. 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 48 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ {d_invalid = 0; eq_invalid = 0; } #line 1252 "diffeq.c" /* yacc.c:1646 */ break; case 3: #line 48 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ {result = (yyvsp[0].list);} #line 1258 "diffeq.c" /* yacc.c:1646 */ break; case 4: #line 50 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ {(yyval.list) = (yyvsp[0].list);} #line 1264 "diffeq.c" /* yacc.c:1646 */ break; case 5: #line 51 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[-1].list); initbuf(); b1 "( %s )", expr((yyval.list))); if (!zero(de((yyval.list)))) {b2 "( %s )", de((yyval.list)));} if (!zero(a((yyval.list)))) {b3 "( %s )", a((yyval.list)));} if (!zero(b((yyval.list)))) {b4 "( %s )", b((yyval.list)));} replace((yyval.list)); } #line 1276 "diffeq.c" /* yacc.c:1646 */ break; case 6: #line 59 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[-1].list); initbuf(); b1 "%s ( %s )", expr((yyvsp[-3].list)), expr((yyval.list))); {b4 "%s ( %s )", expr((yyvsp[-3].list)), expr((yyval.list)));} free4((yyvsp[-3].list)); replace((yyval.list)); } #line 1286 "diffeq.c" /* yacc.c:1646 */ break; case 7: #line 64 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[0].list); initbuf(); b1 "- %s", expr((yyval.list))); if (!zero(de((yyval.list)))) {b2 "- %s", de((yyval.list)));} if (!zero(a((yyval.list)))) {b3 "- %s", a((yyval.list)));} if (!zero(b((yyval.list)))) {b4 "- %s", b((yyval.list)));} replace((yyval.list)); } #line 1298 "diffeq.c" /* yacc.c:1646 */ break; case 8: #line 71 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[-2].list); initbuf(); b1 "%s + %s", expr((yyvsp[-2].list)), expr((yyvsp[0].list))); if (!zero(de((yyvsp[-2].list))) && !zero(de((yyvsp[0].list)))) {b2 "%s + %s", de((yyvsp[-2].list)), de((yyvsp[0].list))); }else if (!zero(de((yyvsp[-2].list)))) {b2 "%s", de((yyvsp[-2].list))); }else if (!zero(de((yyvsp[0].list)))) {b2 "%s", de((yyvsp[0].list)));} if (!zero(a((yyvsp[-2].list))) && !zero(a((yyvsp[0].list)))) {b3 "%s + %s", a((yyvsp[-2].list)), a((yyvsp[0].list))); }else if (!zero(a((yyvsp[-2].list)))) {b3 "%s", a((yyvsp[-2].list))); }else if (!zero(a((yyvsp[0].list)))) {b3 "%s", a((yyvsp[0].list)));} if (!zero(b((yyvsp[-2].list))) && !zero(b((yyvsp[0].list)))) {b4 "%s + %s", b((yyvsp[-2].list)), b((yyvsp[0].list))); }else if (!zero(b((yyvsp[-2].list)))) {b4 "%s", b((yyvsp[-2].list))); }else if (!zero(b((yyvsp[0].list)))) {b4 "%s", b((yyvsp[0].list)));} free4((yyvsp[0].list)); replace((yyval.list)); } #line 1316 "diffeq.c" /* yacc.c:1646 */ break; case 9: #line 84 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[-2].list); initbuf(); b1 "%s - %s", expr((yyvsp[-2].list)), expr((yyvsp[0].list))); if (!zero(de((yyvsp[-2].list))) && !zero(de((yyvsp[0].list)))) {b2 "%s - %s", de((yyvsp[-2].list)), de((yyvsp[0].list))); }else if (!zero(de((yyvsp[-2].list)))) {b2 "%s", de((yyvsp[-2].list))); }else if (!zero(de((yyvsp[0].list)))) {b2 "( - %s )", de((yyvsp[0].list)));} if (!zero(a((yyvsp[-2].list))) && !zero(a((yyvsp[0].list)))) {b3 "%s - %s", a((yyvsp[-2].list)), a((yyvsp[0].list))); }else if (!zero(a((yyvsp[-2].list)))) {b3 "%s", a((yyvsp[-2].list))); }else if (!zero(a((yyvsp[0].list)))) {b3 "( - %s )", a((yyvsp[0].list)));} if (!zero(b((yyvsp[-2].list))) && !zero(b((yyvsp[0].list)))) {b4 "%s - %s", b((yyvsp[-2].list)), b((yyvsp[0].list))); }else if (!zero(b((yyvsp[-2].list)))) {b4 "%s", b((yyvsp[-2].list))); }else if (!zero(b((yyvsp[0].list)))) {b4 "( - %s )", b((yyvsp[0].list)));} free4((yyvsp[0].list)); replace((yyval.list)); } #line 1337 "diffeq.c" /* yacc.c:1646 */ break; case 10: #line 100 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[-2].list); initbuf(); b1 "%s * %s", expr((yyvsp[-2].list)), expr((yyvsp[0].list))); if (!zero(de((yyvsp[-2].list))) && !zero(de((yyvsp[0].list)))) { b2 "(( %s )*( %s ) + ( %s )*( %s ))", de((yyvsp[-2].list)), expr((yyvsp[0].list)), expr((yyvsp[-2].list)), de((yyvsp[0].list))); }else if (!zero(de((yyvsp[-2].list)))) {b2 "( %s )*( %s )", de((yyvsp[-2].list)), expr((yyvsp[0].list))); }else if (!zero(de((yyvsp[0].list)))) {b2 "( %s )*( %s )", expr((yyvsp[-2].list)), de((yyvsp[0].list)));} if (!zero(a((yyvsp[-2].list))) && !zero(a((yyvsp[0].list)))) {eq_invalid = 1; }else if (!zero(a((yyvsp[-2].list)))) { if (!zero(b((yyvsp[0].list)))) {b3 "( %s )*( %s )", a((yyvsp[-2].list)),b((yyvsp[0].list)));} }else if (!zero(a((yyvsp[0].list)))) { if (!zero(b((yyvsp[-2].list)))) {b3 "( %s )*( %s )", b((yyvsp[-2].list)),a((yyvsp[0].list)));}} if (!zero(b((yyvsp[-2].list))) && !zero(b((yyvsp[0].list)))) { b4 "( %s )*( %s )", b( (yyvsp[-2].list) ), b( (yyvsp[0].list) ));} free4((yyvsp[0].list)); replace((yyval.list)); } #line 1359 "diffeq.c" /* yacc.c:1646 */ break; case 11: #line 117 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[-2].list); initbuf(); b1 "%s / %s", expr((yyvsp[-2].list)), expr((yyvsp[0].list))); if (!zero(de((yyvsp[0].list)))) { d_invalid = 1; }else if (!zero(de((yyvsp[-2].list)))) { b2 "( %s ) / %s", de((yyvsp[-2].list)), expr((yyvsp[0].list)));} if (!zero(a((yyvsp[0].list)))) { eq_invalid = 1; }else if (!zero(a((yyvsp[-2].list)))) { b3 "( %s ) / %s", a((yyvsp[-2].list)), expr((yyvsp[0].list)));} if (!zero(b((yyvsp[-2].list)))) { b4 "( %s ) / %s", b((yyvsp[-2].list)), expr((yyvsp[0].list)));} free4((yyvsp[0].list)); replace((yyval.list)); } #line 1376 "diffeq.c" /* yacc.c:1646 */ break; case 12: #line 131 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = list4("", "0.0", "0.0", ""); } #line 1384 "diffeq.c" /* yacc.c:1646 */ break; case 13: #line 134 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[0].list); } #line 1390 "diffeq.c" /* yacc.c:1646 */ break; case 14: #line 135 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[0].list); b1 "%s %s", expr((yyvsp[-1].list)), expr((yyvsp[0].list))); b4 "%s %s", expr((yyvsp[-1].list)), expr((yyvsp[0].list))); free4((yyvsp[-1].list)); replace((yyval.list)); } #line 1401 "diffeq.c" /* yacc.c:1646 */ break; case 15: #line 141 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[0].list); b1 "%s , %s", expr((yyvsp[-2].list)), expr((yyvsp[0].list))); b4 "%s , %s", expr((yyvsp[-2].list)), expr((yyvsp[0].list))); free4((yyvsp[-2].list)); replace((yyval.list)); } #line 1412 "diffeq.c" /* yacc.c:1646 */ break; case 16: #line 148 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1646 */ { (yyval.list) = (yyvsp[0].list); initbuf(); b1 "%s", expr((yyvsp[0].list))); if (!zero(de((yyval.list)))) { d_invalid = 1; } if (!zero(de((yyval.list)))) { eq_invalid = 1; } {b4 "%s", expr((yyval.list)));} } #line 1423 "diffeq.c" /* yacc.c:1646 */ break; #line 1427 "diffeq.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif return yyresult; } #line 155 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1906 */ static int zero(cp) char* cp; { return (strcmp(cp, "0.0") == 0) ? 1 : 0; } static char* expr(lst) List* lst; { Item* q = lst->next; return STR(q); } static char* de(lst) List* lst; { Item* q = lst->next->next; return STR(q); } static char* a(lst) List* lst; { Item* q = lst->next->next->next; return STR(q); } static char* b(lst) List* lst; { Item* q = lst->next->next->next->next; return STR(q); } static void replace(lst) List* lst; { int i; Item* q = lst->next; for (i=0; i < 4; ++i) { free(STR(q)); replacstr(q, lbuf[i]); q = q->next; } #if 0 fprintf(stderr, "replace expr|%s| de|%s| a|%s| b|%s|\n", lbuf[0], lbuf[1], lbuf[2], lbuf[3]); #endif } static void initbuf() { int i; for (i=0; i < 4; ++i) { strcpy(lbuf[i], "0.0"); } } static List* list4(s1, s2, s3, s4) char *s1, *s2, *s3, *s4; { List* lst = newlist(); lappendstr(lst, s1); lappendstr(lst, s2); lappendstr(lst, s3); lappendstr(lst, s4); return lst; } static void free4(lst) List* lst; { Item* q; List* ls = lst; ITERATE(q, lst) { free(STR(q)); } freelist(&ls); } static void yyerror(s) char* s; { assert(0); } static void fullname(buf) char* buf; { /* handle case of name [...] with qexpr pointing to final item */ Item* q = qexpr; strcpy(buf, SYM(q)->name); if (q->next->itemtype == SYMBOL && strcmp(SYM(q->next)->name, "[") == 0) { q = q->next; strcat(buf, "["); for (;;) { q = q->next; if (q->itemtype == SYMBOL) { strcat(buf, SYM(q)->name); if (strcmp(SYM(q)->name, "]") == 0) { break; } }else if (q->itemtype == ITEM || q->itemtype == LIST) { assert(0); }else{ /* had better be a STRING */ strcat(buf, STR(q)); } } } qexpr = q; } static int yylex() { Symbol* s; char buf[256]; int rval = 0; if (qexpr->itemtype == 0) { return 0; } switch (qexpr->itemtype) { case SYMBOL: s = SYM(qexpr); if (s == state) { fullname(buf); yylval.list = list4(buf, "1.0", "1.0", "0.0"); rval = ATOM; }else{ switch (s->name[0]) { case '+': case '-': case '*': case '/': case '(': case ')': case ',': rval = s->name[0]; break; default: fullname(buf); yylval.list = list4(buf, "0.0", "0.0", buf); rval = ATOM; break; } } break; default: /* had better be a STRING */ if (strcmp(STR(qexpr), "") == 0) { qexpr = qexpr->next; return yylex(); } yylval.list = list4(STR(qexpr), "0.0", "0.0", STR(qexpr)); rval = ATOM; break; } #if 0 if (rval == ATOM) { fprintf(stderr, "expr|%s| de|%s| a|%s| b|%s|\n", expr(yylval.list), de(yylval.list), a(yylval.list), b(yylval.list)); }else{ fprintf(stderr, "|%s|\n", SYM(qexpr)->name); } #endif qexpr = qexpr->next; return rval; } /*----------- interface to outside world -------------*/ void cvode_parse(s, e) Symbol* s; List* e; { state = s; qexpr = e->next; yyparse(); #if 0 fprintf(stderr, "cvode_parse d_invalid=%d eq_invalid=%d\nexpr|%s|\nde|%s|\na|%s|\nb|%s|\n", d_invalid, eq_invalid, expr(result), de(result), a(result), b(result)); #endif b4 "- ( %s ) / ( %s )", b(result), a(result)); replacstr(result->prev, lbuf[3]); } char* cvode_deriv() { if (result && !d_invalid) { return de(result); }else{ return (char*)0; } } char* cvode_eqnrhs() { if (result && !eq_invalid) { return b(result); }else{ return (char*)0; } } neuron-7.5/src/nmodl/diffeq.h000066400000000000000000000044311323325274500162120ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_YY_DIFFEQ_H_INCLUDED # define YY_YY_DIFFEQ_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { ATOM = 258, UNARYMINUS = 259 }; #endif /* Tokens. */ #define ATOM 258 #define UNARYMINUS 259 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 35 "../../../nrn/src/nmodl/diffeq.y" /* yacc.c:1909 */ char* cp; List* list; /* expression, d(expression)/dstate, a*state, b */ #line 67 "diffeq.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_DIFFEQ_H_INCLUDED */ neuron-7.5/src/nmodl/diffeq.y000077500000000000000000000171041323325274500162370ustar00rootroot00000000000000%{ /* symbolically differentiate an expression with respect to a state and also transform an expression linear in the state into the form a*state + b The only thing that makes this less than elegant is dealing with 0.0 */ #include <../../nmodlconf.h> #include #include "modl.h" #include "difeqdef.h" /* every yy gets changed to diffeq_yy before compiling */ static int yylex(), yyparse(); static void yyerror(); static int d_invalid, eq_invalid; static char lbuf[4][1000]; static Item* qexpr; /* yylex finds tokens here;*/ static Symbol* state; static List* result; #define b1 sprintf(lbuf[0], #define b2 sprintf(lbuf[1], #define b3 sprintf(lbuf[2], #define b4 sprintf(lbuf[3], static void replace(), initbuf(), free4(); static int zero(); static char *expr(), *de(), *a(), *b(); static List* list4(); %} %union { char* cp; List* list; /* expression, d(expression)/dstate, a*state, b */ } %token ATOM %type e arglist arg %left '+' '-' %left '*' '/' %left UNARYMINUS %% top: {d_invalid = 0; eq_invalid = 0; } e {result = $2;} ; e: ATOM {$$ = $1;} | '(' e ')' { $$ = $2; initbuf(); b1 "( %s )", expr($$)); if (!zero(de($$))) {b2 "( %s )", de($$));} if (!zero(a($$))) {b3 "( %s )", a($$));} if (!zero(b($$))) {b4 "( %s )", b($$));} replace($$); } | ATOM '(' arglist ')' { $$ = $3; initbuf(); b1 "%s ( %s )", expr($1), expr($$)); {b4 "%s ( %s )", expr($1), expr($$));} free4($1); replace($$); } | '-' e %prec UNARYMINUS { $$ = $2; initbuf(); b1 "- %s", expr($$)); if (!zero(de($$))) {b2 "- %s", de($$));} if (!zero(a($$))) {b3 "- %s", a($$));} if (!zero(b($$))) {b4 "- %s", b($$));} replace($$); } | e '+' e { $$ = $1; initbuf(); b1 "%s + %s", expr($1), expr($3)); if (!zero(de($1)) && !zero(de($3))) {b2 "%s + %s", de($1), de($3)); }else if (!zero(de($1))) {b2 "%s", de($1)); }else if (!zero(de($3))) {b2 "%s", de($3));} if (!zero(a($1)) && !zero(a($3))) {b3 "%s + %s", a($1), a($3)); }else if (!zero(a($1))) {b3 "%s", a($1)); }else if (!zero(a($3))) {b3 "%s", a($3));} if (!zero(b($1)) && !zero(b($3))) {b4 "%s + %s", b($1), b($3)); }else if (!zero(b($1))) {b4 "%s", b($1)); }else if (!zero(b($3))) {b4 "%s", b($3));} free4($3); replace($$); } | e '-' e { $$ = $1; initbuf(); b1 "%s - %s", expr($1), expr($3)); if (!zero(de($1)) && !zero(de($3))) {b2 "%s - %s", de($1), de($3)); }else if (!zero(de($1))) {b2 "%s", de($1)); }else if (!zero(de($3))) {b2 "( - %s )", de($3));} if (!zero(a($1)) && !zero(a($3))) {b3 "%s - %s", a($1), a($3)); }else if (!zero(a($1))) {b3 "%s", a($1)); }else if (!zero(a($3))) {b3 "( - %s )", a($3));} if (!zero(b($1)) && !zero(b($3))) {b4 "%s - %s", b($1), b($3)); }else if (!zero(b($1))) {b4 "%s", b($1)); }else if (!zero(b($3))) {b4 "( - %s )", b($3));} free4($3); replace($$); } | e '*' e { $$ = $1; initbuf(); b1 "%s * %s", expr($1), expr($3)); if (!zero(de($1)) && !zero(de($3))) { b2 "(( %s )*( %s ) + ( %s )*( %s ))", de($1), expr($3), expr($1), de($3)); }else if (!zero(de($1))) {b2 "( %s )*( %s )", de($1), expr($3)); }else if (!zero(de($3))) {b2 "( %s )*( %s )", expr($1), de($3));} if (!zero(a($1)) && !zero(a($3))) {eq_invalid = 1; }else if (!zero(a($1))) { if (!zero(b($3))) {b3 "( %s )*( %s )", a($1),b($3));} }else if (!zero(a($3))) { if (!zero(b($1))) {b3 "( %s )*( %s )", b($1),a($3));}} if (!zero(b($1)) && !zero(b($3))) { b4 "( %s )*( %s )", b( $1 ), b( $3 ));} free4($3); replace($$); } | e '/' e { $$ = $1; initbuf(); b1 "%s / %s", expr($1), expr($3)); if (!zero(de($3))) { d_invalid = 1; }else if (!zero(de($1))) { b2 "( %s ) / %s", de($1), expr($3));} if (!zero(a($3))) { eq_invalid = 1; }else if (!zero(a($1))) { b3 "( %s ) / %s", a($1), expr($3));} if (!zero(b($1))) { b4 "( %s ) / %s", b($1), expr($3));} free4($3); replace($$); } ; arglist: /*nothing*/ { $$ = list4("", "0.0", "0.0", ""); } | arg { $$ = $1; } | arglist arg { $$ = $2; b1 "%s %s", expr($1), expr($2)); b4 "%s %s", expr($1), expr($2)); free4($1); replace($$); } | arglist ',' arg { $$ = $3; b1 "%s , %s", expr($1), expr($3)); b4 "%s , %s", expr($1), expr($3)); free4($1); replace($$); } ; arg: e { $$ = $1; initbuf(); b1 "%s", expr($1)); if (!zero(de($$))) { d_invalid = 1; } if (!zero(de($$))) { eq_invalid = 1; } {b4 "%s", expr($$));} } ; %% static int zero(cp) char* cp; { return (strcmp(cp, "0.0") == 0) ? 1 : 0; } static char* expr(lst) List* lst; { Item* q = lst->next; return STR(q); } static char* de(lst) List* lst; { Item* q = lst->next->next; return STR(q); } static char* a(lst) List* lst; { Item* q = lst->next->next->next; return STR(q); } static char* b(lst) List* lst; { Item* q = lst->next->next->next->next; return STR(q); } static void replace(lst) List* lst; { int i; Item* q = lst->next; for (i=0; i < 4; ++i) { free(STR(q)); replacstr(q, lbuf[i]); q = q->next; } #if 0 fprintf(stderr, "replace expr|%s| de|%s| a|%s| b|%s|\n", lbuf[0], lbuf[1], lbuf[2], lbuf[3]); #endif } static void initbuf() { int i; for (i=0; i < 4; ++i) { strcpy(lbuf[i], "0.0"); } } static List* list4(s1, s2, s3, s4) char *s1, *s2, *s3, *s4; { List* lst = newlist(); lappendstr(lst, s1); lappendstr(lst, s2); lappendstr(lst, s3); lappendstr(lst, s4); return lst; } static void free4(lst) List* lst; { Item* q; List* ls = lst; ITERATE(q, lst) { free(STR(q)); } freelist(&ls); } static void yyerror(s) char* s; { assert(0); } static void fullname(buf) char* buf; { /* handle case of name [...] with qexpr pointing to final item */ Item* q = qexpr; strcpy(buf, SYM(q)->name); if (q->next->itemtype == SYMBOL && strcmp(SYM(q->next)->name, "[") == 0) { q = q->next; strcat(buf, "["); for (;;) { q = q->next; if (q->itemtype == SYMBOL) { strcat(buf, SYM(q)->name); if (strcmp(SYM(q)->name, "]") == 0) { break; } }else if (q->itemtype == ITEM || q->itemtype == LIST) { assert(0); }else{ /* had better be a STRING */ strcat(buf, STR(q)); } } } qexpr = q; } static int yylex() { Symbol* s; char buf[256]; int rval = 0; if (qexpr->itemtype == 0) { return 0; } switch (qexpr->itemtype) { case SYMBOL: s = SYM(qexpr); if (s == state) { fullname(buf); yylval.list = list4(buf, "1.0", "1.0", "0.0"); rval = ATOM; }else{ switch (s->name[0]) { case '+': case '-': case '*': case '/': case '(': case ')': case ',': rval = s->name[0]; break; default: fullname(buf); yylval.list = list4(buf, "0.0", "0.0", buf); rval = ATOM; break; } } break; default: /* had better be a STRING */ if (strcmp(STR(qexpr), "") == 0) { qexpr = qexpr->next; return yylex(); } yylval.list = list4(STR(qexpr), "0.0", "0.0", STR(qexpr)); rval = ATOM; break; } #if 0 if (rval == ATOM) { fprintf(stderr, "expr|%s| de|%s| a|%s| b|%s|\n", expr(yylval.list), de(yylval.list), a(yylval.list), b(yylval.list)); }else{ fprintf(stderr, "|%s|\n", SYM(qexpr)->name); } #endif qexpr = qexpr->next; return rval; } /*----------- interface to outside world -------------*/ void cvode_parse(s, e) Symbol* s; List* e; { state = s; qexpr = e->next; yyparse(); #if 0 fprintf(stderr, "cvode_parse d_invalid=%d eq_invalid=%d\nexpr|%s|\nde|%s|\na|%s|\nb|%s|\n", d_invalid, eq_invalid, expr(result), de(result), a(result), b(result)); #endif b4 "- ( %s ) / ( %s )", b(result), a(result)); replacstr(result->prev, lbuf[3]); } char* cvode_deriv() { if (result && !d_invalid) { return de(result); }else{ return (char*)0; } } char* cvode_eqnrhs() { if (result && !eq_invalid) { return b(result); }else{ return (char*)0; } } neuron-7.5/src/nmodl/discrete.c000077500000000000000000000102111323325274500165450ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/discrete.c,v 4.1 1997/08/30 20:45:19 hines Exp */ /* discrete.c,v * Revision 4.1 1997/08/30 20:45:19 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:23:42 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:06:07 hines * proper nocmodl version number * * Revision 1.1.1.1 1994/10/12 17:21:35 hines * NEURON 3.0 distribution * * Revision 9.5 90/07/18 07:59:36 hines * define for arrays now (p + n) instead of &p[n]. This allows the c file * to have arrays that look like a[i] instead of *(a + i). * * Revision 8.1 90/01/03 16:13:01 mlh * discrete array variables had their for loops switched. * * Revision 8.0 89/09/22 17:26:05 nfh * Freezing * * Revision 7.0 89/08/30 13:31:32 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.0 89/08/14 16:26:16 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.0 89/07/24 17:02:45 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.3 89/07/21 09:28:14 mlh * Discrete equitions evaluated at time given by independent variable * in the sense that the state on the left hand side refers to state(t) * and explicit dependence on t works naturally. * * Revision 1.3 89/07/21 09:14:08 mlh * Discrete equations evaluated at time given by ndependent variable * in the sense that state on the left hand side refers to state(t) * and explicit dependence on t works naturally. This is done by * incrementing t before calling discrete block and updating the * history at the beginning instead of the end. * * Revision 1.2 89/07/12 13:57:21 mlh * state@1 now refers to fianl value at previous step * state@0 is a syntax error * * Revision 1.1 89/07/06 14:48:27 mlh * Initial revision * */ #include #include "modl.h" #include "parse1.h" #include "symbol.h" void disc_var_seen(q1, q2, q3, array) /*NAME '@' NUMBER --- array flag*/ Item *q1, *q2, *q3; int array; { Symbol *s; int num; num = atoi(STR(q3)); s = SYM(q1); if (num < 1) { diag("Discrete variable must have @index >= 1", (char *)0); } num--; if (!(s->subtype & STAT)) { diag(s->name, " must be a STATE for use as discrete variable"); } if (array && !(s->subtype & ARRAY)) { diag(s->name, " must be a scalar discrete variable"); } if (!array && (s->subtype & ARRAY)) { diag(s->name, " must be an array discrete variable"); } if (s->discdim <= num) { s->discdim = num+1; } Sprintf(buf, "__%s", s->name); replacstr(q1, buf); delete(q2); Sprintf(buf, "[%d]", num); replacstr(q3, buf); } void massagediscblk(q1, q2, q3, q4) /*DISCRETE NAME stmtlist '}'*/ Item *q1, *q2, *q3, *q4; { int i; Symbol *s; Item *qs; replacstr(q1, "int"); Insertstr(q3, "()\n{\n"); Insertstr(q4, "}\n"); SYM(q2)->subtype |= DISCF; SYMITER(NAME) if (s->subtype & STAT && s->used && s->discdim) { if (s->subtype & ARRAY) { Sprintf(buf, "{int _i, _j; for (_j=%d; _j >=0; _j--) {\n\ for (_i=%d; _i>0; _i--) __%s[_i][_j] = __%s[_i-1][_j];\n\ __%s[0][_j] = %s[_j];\n\ }}\n", s->araydim -1, s->discdim -1, s->name, s->name, s->name, s->name); }else{ Sprintf(buf, "{int _i; for (_i=%d; _i>0; _i--) __%s[_i] = __%s[_i-1];\n\ __%s[0] = %s;\n}\n", s->discdim -1, s->name, s->name, s->name, s->name); } Insertstr(q3, buf); s->used = 0; } /*initialization and declaration done elsewhere*/ movelist(q1, q4, procfunc); } void init_disc_vars() { int i; Item *qs; Symbol *s; SYMITER(NAME) if (s->subtype & STAT && s->discdim) { if (s->subtype & ARRAY) { Sprintf(buf, "{int _i, _j; for (_j=%d; _j >=0; _j--) {\n\ for (_i=%d; _i>=0; _i--) __%s[_i][_j] = %s0;}}\n", s->araydim -1, s->discdim -1, s->name, s->name); Linsertstr(initfunc, buf); Sprintf(buf, "static double __%s[%d][%d];\n", s->name, s->discdim, s->araydim); Linsertstr(procfunc, buf); }else{ Sprintf(buf, "{int _i; for (_i=%d; _i>=0; _i--) __%s[_i] = %s0;}\n", s->discdim -1, s->name, s->name); Linsertstr(initfunc, buf); Sprintf(buf, "static double __%s[%d];\n", s->name, s->discdim); Linsertstr(procfunc, buf); } } } neuron-7.5/src/nmodl/extdef.h000077500000000000000000000014541323325274500162400ustar00rootroot00000000000000/* /local/src/master/nrn/src/nmodl/extdef.h,v 4.2 1998/07/04 14:08:32 hines Exp */ "first_time", "error", "f_flux", "b_flux", "fabs", "sqrt", "sin", "cos", "tan", "acos", "asin", "atan", "atan2", "sinh", "cosh", "tanh", "floor", "ceil", "fmod", "log10", "log", "pow", "printf", "prterr", "exp", "threshold", "force", "deflate", "expfit", "derivs", "spline", "hyperbol", "revhyperbol", "sigmoid", "revsigmoid", "harmonic", "squarewave", "sawtooth", "revsawtooth", "ramp", "pulse", "perpulse", "step", "perstep", "erf", "exprand", "factorial", "gauss", "normrand", "poisrand", "poisson", "setseed", "scop_random", "boundary", "romberg", "legendre", "invert", "stepforce", "schedule", "set_seed", "nrn_pointing", "state_discontinuity", "net_send", "net_move", "net_event", "nrn_random_play", "at_time", "nrn_ghk", neuron-7.5/src/nmodl/extdef2.h000077500000000000000000000000421323325274500163120ustar00rootroot00000000000000"romberg", "legendre", "deflate", neuron-7.5/src/nmodl/extdef5.h000077500000000000000000000003341323325274500163210ustar00rootroot00000000000000"force", "deflate", "expfit", "derivs", "spline", "exprand", "gauss", "normrand", "poisrand", "poisson", "setseed", "scop_random", "boundary", "romberg", "invert", "stepforce", "schedule", "set_seed", "nrn_random_play", neuron-7.5/src/nmodl/init.c000077500000000000000000000147341323325274500157240ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/init.c,v 4.5 1998/03/25 14:33:42 hines Exp */ #include "modl.h" #include "parse1.h" extern List *firstlist; extern List *syminorder; Symbol *semi, *beginblk, *endblk; List *intoken; char buf[NRN_BUFSIZE]; /* volatile temporary buffer */ static struct { /* Keywords */ char *name; short kval; } keywords[] = { "VERBATIM", VERBATIM, "COMMENT", COMMENT, "TITLE", MODEL, "CONSTANT", CONSTANT, "PARAMETER", PARAMETER, "INDEPENDENT", INDEPENDENT, "ASSIGNED", DEPENDENT, "INITIAL", INITIAL1, "TERMINAL", TERMINAL, "DERIVATIVE", DERIVATIVE, "EQUATION", EQUATION, "BREAKPOINT", BREAKPOINT, "CONDUCTANCE", CONDUCTANCE, "SOLVE", SOLVE, "STATE", STATE, "STEPPED", STEPPED, "LINEAR", LINEAR, "NONLINEAR", NONLINEAR, "DISCRETE", DISCRETE, "FUNCTION", FUNCTION1, "FUNCTION_TABLE", FUNCTION_TABLE, "PROCEDURE", PROCEDURE, "PARTIAL", PARTIAL, "DEL2", DEL2, "DEL", DEL, "LOCAL", LOCAL, "METHOD", USING, "STEADYSTATE", USING, "SENS", SENS, "STEP", STEP, "WITH", WITH, "FROM", FROM, "FORALL", FORALL1, "TO", TO, "BY", BY, "if", IF, "else", ELSE, "while", WHILE, "START", START1, "DEFINE", DEFINE1, "KINETIC", KINETIC, "CONSERVE", CONSERVE, "PLOT", PLOT, "VS", VS, "LAG", LAG, "RESET", RESET, "MATCH", MATCH, "MODEL_LEVEL", MODEL_LEVEL, /* inserted by merge */ "SWEEP", SWEEP, "FIRST", FIRST, "LAST", LAST, "COMPARTMENT", COMPARTMENT, "LONGITUDINAL_DIFFUSION", LONGDIFUS, "PUTQ", PUTQ, "GETQ", GETQ, "IFERROR", IFERROR, "SOLVEFOR", SOLVEFOR, "UNITS", UNITS, "UNITSON", UNITSON, "UNITSOFF", UNITSOFF, "TABLE", TABLE, "DEPEND", DEPEND, "NEURON", NEURON, "SUFFIX", SUFFIX, "POINT_PROCESS", SUFFIX, "ARTIFICIAL_CELL", SUFFIX, "NONSPECIFIC_CURRENT", NONSPECIFIC, "ELECTRODE_CURRENT", ELECTRODE_CURRENT, "SECTION", SECTION, "RANGE", RANGE, "USEION", USEION, "READ", READ, "WRITE", WRITE, "VALENCE", VALENCE, "CHARGE", VALENCE, "GLOBAL", GLOBAL, "POINTER", POINTER, "BBCOREPOINTER", BBCOREPOINTER, "EXTERNAL", EXTERNAL, "INCLUDE", INCLUDE1, "CONSTRUCTOR", CONSTRUCTOR, "DESTRUCTOR", DESTRUCTOR, "NET_RECEIVE", NETRECEIVE, "BEFORE", BEFORE, /* before NEURON sets up cy' = f(y,t) */ "AFTER", AFTER, /* after NEURON solves cy' = f(y, t) */ "WATCH", WATCH, "FOR_NETCONS", FOR_NETCONS, "THREADSAFE", THREADSAFE, "PROTECT", PROTECT, "MUTEXLOCK", NRNMUTEXLOCK, "MUTEXUNLOCK", NRNMUTEXUNLOCK, 0, 0 }; /* * the following special output tokens are used to make the .c file barely * readable */ static struct { /* special output tokens */ char *name; short subtype; Symbol **p; } special[] = { ";", SEMI, &semi, "{", BEGINBLK, &beginblk, "}", ENDBLK, &endblk, 0, 0, 0 }; static struct { /* numerical methods */ char *name; long subtype; /* All the types that will work with this */ short varstep; } methods[] = { "adams", DERF | KINF, 0, "runge", DERF | KINF, 0, "euler", DERF | KINF, 0, "adeuler", DERF | KINF, 1, "heun", DERF | KINF, 0, "adrunge", DERF | KINF, 1, "gear", DERF | KINF, 1, "newton", NLINF, 0, "simplex", NLINF, 0, "simeq", LINF, 0, "seidel", LINF, 0, "_advance", KINF, 0, "sparse", KINF, 0, "derivimplicit", DERF, 0, /* name hard wired in deriv.c */ "cnexp", DERF, 0, /* see solve.c */ "clsoda", DERF | KINF, 1, /* Tolerance built in to scopgear.c */ "after_cvode", 0, 0, "cvode_t", 0, 0, "cvode_t_v", 0, 0, 0, 0, 0 }; static char *extdef[] = { /* external names that can be used as doubles * without giving an error message */ #include "extdef.h" 0 }; static char *extdef2[] = { /* external function names that can be used * with array and function name arguments */ #include "extdef2.h" 0 }; static char *extdef3[] = { /* function names that get two reset arguments * added */ "threshold", "squarewave", "sawtooth", "revsawtooth", "ramp", "pulse", "perpulse", "step", "perstep", "stepforce", "schedule", 0 }; static char *extdef4[] = { /* functions that need a first arg of NrnThread* */ "at_time", 0 }; static char *extdef5[] = { /* the extdef names that are not threadsafe */ #include "extdef5.h" 0 }; List *constructorfunc, *destructorfunc; void init() { int i; Symbol *s; symbol_init(); for (i = 0; keywords[i].name; i++) { s = install(keywords[i].name, keywords[i].kval); s->subtype = KEYWORD; } for (i = 0; methods[i].name; i++) { s = install(methods[i].name, METHOD); s->subtype = methods[i].subtype; s->u.i = methods[i].varstep; } for (i = 0; special[i].name; i++) { s = install(special[i].name, SPECIAL); *(special[i].p) = s; s->subtype = special[i].subtype; } for (i = 0; extdef[i]; i++) { s = install(extdef[i], NAME); s->subtype = EXTDEF; } for (i = 0; extdef2[i]; i++) { s = install(extdef2[i], NAME); s->subtype = EXTDEF2; } for (i = 0; extdef3[i]; i++) { s = lookup(extdef3[i]); assert(s && (s->subtype & EXTDEF)); s->subtype |= EXTDEF3; } for (i = 0; extdef4[i]; i++) { s = lookup(extdef4[i]); assert(s && (s->subtype & EXTDEF)); s->subtype |= EXTDEF4; } for (i = 0; extdef5[i]; i++) { s = lookup(extdef5[i]); assert(s); s->subtype |= EXTDEF5; } intoken = newlist(); initfunc = newlist(); modelfunc = newlist(); termfunc = newlist(); procfunc = newlist(); initlist = newlist(); firstlist = newlist(); syminorder = newlist(); plotlist = newlist(); constructorfunc = newlist(); destructorfunc = newlist(); #if NMODL nrninit(); #endif } neuron-7.5/src/nmodl/io.c000077500000000000000000000205661323325274500153700ustar00rootroot00000000000000#include <../../nmodlconf.h> /* file.mod input routines */ #include #include "modl.h" #include #if MAC && TARGET_API_MAC_CARBON #include #endif #undef METHOD #include "parse1.h" static int isend(); static void pop_file_stack(); static int file_stack_empty(); int in_comment_; char *inputline() { /* and removes comment, newline, beginning and trailing blanks */ /* used to get the TITLE line */ #if __TURBOC__ || SYSV || VMS || defined(MINGW) #define index strchr #endif char *cp; int i; buf[0] = '\0'; cp = Gets(buf); i = strlen(buf); if (i) buf[i - 1] = '\0'; if ((cp = index(buf, '!')) != (char *) 0) { *cp-- = '\0'; } while (cp >= buf && isspace(*cp)) { *cp-- = '\0'; } /*EMPTY*/ for (cp = buf; *cp != '\0' && isspace(*cp); cp++){ ; } return stralloc(cp, (char *) 0); } static int linenum = 0; void inblock(s) char *s; { /* copy input verbatim to intoken up to END*s * error if we get the whole input */ char *cp; int l; Item *q; l = linenum; for (;;) { cp = Gets(buf); if (cp == (char *) 0) { linenum = l; diag(s, " block goes to end of file"); } if (isend(s, buf)) { break; } q = putintoken(buf, STRING); q->itemtype = VERBATIM; } } static int isend(s, buf) char *s, *buf; { /* if first chars in buf form a keyword return 1 */ char *cp, word[256], *wp, test[256]; int yesno = 0; cp = buf; Sprintf(test, "END%s", s); while (*cp == ' ' || *cp == '\t') cp++; if (isalpha(*cp)) { for (wp = word; isalpha(*cp);) { *wp++ = *cp++; } *wp = '\0'; if (strcmp(test, word) == 0) { yesno = 1; } } return yesno; } /* * We painfully constuct our own input buffer so that when user errors occur * we can print the whole line. Often, even this is not enough if the error * is at the end of a line. We also count lines so the user can go right to * the error in most cases */ static char inlinebuf[2][NRN_BUFSIZE], *inlinep = inlinebuf[0] + 30, *ctp = inlinebuf[0] + 30; static int whichbuf; char* Fgets(buf, size, f) char* buf; int size; FILE* f; { char* p = buf; int c, i; for(i=0; i < size; ++ i) { c = getc(f); if (c == EOF || c == 26 || c == 4) { /* ^Z and ^D are end of file */ /* some editors don't put a newline at last line */ if ( p > buf) { ungetc(c, f); c = '\n'; }else{ break; } } if (c == '\r') { int c2 = getc(f); if (c2 != '\n') { ungetc(c2, f); } c = '\n'; } if (c < 0 || c > 127) { *p++ = '\n'; *p='\0'; if (!in_comment_) { diag("Non-Ascii character in file:", buf); } return buf; } *p++ = c; if (c == '\n') { *p = '\0'; return buf; } } if (i >= size) { buf[size-1] = 0; diag("Line too long:", buf); } return (char*)0; } int Getc() { int c; if (ctp == (char *) 0 || *ctp == '\0') { whichbuf = (whichbuf?0:1); inlinep = inlinebuf[whichbuf] + 30; ctp = Fgets(inlinep, 512, fin); if (ctp) linenum++; } if (ctp == (char *) 0) { ctp = inlinep; *ctp = '\0'; if (file_stack_empty()) { return EOF; }else{ pop_file_stack(); return Getc(); } } c = *ctp++; return c; } int unGetc(c) int c; { if (c == EOF) return c; if (ctp > inlinebuf[whichbuf]) { ctp--; *ctp = c; } else { diag("internal error in unGetc", ""); } return c; } char *Gets(buf) char *buf; { char *cp; int c; cp = buf; while ((c = Getc()) != EOF && c != '\n') { *cp++ = c; } if (c == '\n') { *cp++ = c; *cp++ = '\0'; return buf; } else if (c == EOF) { return (char *) 0; } else { diag("internal error in Gets()", ""); } return (char *) 0; } #if 0 /* not currently used */ void unGets(buf) /* all this because we don't have an ENDBLOCK * keyword */ char *buf; { if (ctp != '\0') { /* can only be called after successful Gets */ Strcpy(inlinep, buf); ctp = inlinep; } else { diag("internal error in unGets()", ""); } } #endif char* current_line() { /* assumes we actually want the previous line */ static char buf[NRN_BUFSIZE]; char* p; sprintf(buf,"at line %d in file %s:\\n%s", linenum-1, finname, inlinebuf[whichbuf?0:1]+30); for (p = buf; *p; ++p) { if (*p == '\n') { *p = '\0'; } if (*p == '"') { *p = '\047'; } } return buf; } /* two arguments so we can pass a name to construct an error message. */ void diag(s1, s2) char *s1, *s2; { char *cp; Fprintf(stderr, "%s", s1); if (s2) { Fprintf(stderr, "%s", s2); } if (fin) { Fprintf(stderr, " at line %d in file %s\n", linenum, finname); Fprintf(stderr, "%s", inlinep); if (ctp >= inlinep) { for (cp = inlinep; cp < ctp - 1; cp++) { if (*cp == '\t') { Fprintf(stderr, "\t"); } else { Fprintf(stderr, " "); } } Fprintf(stderr, "^"); } } Fprintf(stderr, "\n"); #if MAC && TARGET_API_MAC_CARBON SIOUXSettings.autocloseonquit = true; RunApplicationEventLoop(); #endif exit(1); } #if 0 static Symbol *symq[20], **symhead = symq, **symtail = symq; /* * the following is a nonsensical implementation of heirarchical model * building. Disregard. It assumes .mod files can be concatenated to produce * meaningful models. It was this insanity which prompted us to allow use of * variables before declaration */ void enquextern(sym) Symbol *sym; { *symtail++ = sym; } FILE *dequextern() { char fname[256]; FILE *f; Symbol *s; if (symhead >= symtail) return (FILE *) 0; s = *symhead++; Sprintf(fname, "%s.mod", s->name); f = fopen(fname, "r"); if (f == (FILE *) 0) { diag("Can't open", fname); } Fclose(fin); linenum = 0; Strcpy(finname, fname); return f; } #endif typedef struct FileStackItem { char* inlinep; char* ctp; int linenum; FILE* fp; char finname[NRN_BUFSIZE]; } FileStackItem; static List* filestack; static int getprefix(prefix, s) char* prefix, *s; { char* cp; strcpy(prefix, s); for (cp = prefix + strlen(prefix); cp+1 != prefix; --cp) { if (*cp == '/') { break; } *cp = '\0'; } return (prefix[0] != '\0'); } static FILE* include_open(fname, err) char* fname; int err; { FILE* f = (FILE*)0; FileStackItem* fsi; char* dirs, *colon; char buf2[NRN_BUFSIZE]; if(fname[0] == '/') { /* highest precedence is complete filename */ return fopen(fname, "r"); } fsi = (FileStackItem*)(SYM(filestack->prev)); if (getprefix(buf, fsi->finname)) { strcat(buf, fname); f = fopen(buf, "r"); /* first try in directory of last file */ if (f) { strcpy(fname, buf); return f; } if (err) fprintf(stderr, "Couldn't open: %s\n", buf); } f = fopen(fname, "r"); /* next try current working directory */ if (f) { return f; } sprintf(buf, "../%s", fname); /* Next try next dir up. */ if ((f = fopen(buf, "r")) != NULL) return f; if (err) fprintf(stderr, "Couldn't open: %s\n", fname); /* try all the directories in the environment variable */ /* a colon separated list of directories */ dirs = getenv("MODL_INCLUDE"); if (dirs) { strcpy(buf, dirs); dirs = buf; colon = dirs; for (dirs = colon; *dirs; dirs = colon){ for(; *colon; ++colon) { if (*colon == ':') { *colon = '\0'; ++colon; break; } } strcpy(buf2, dirs); strcat(buf2, "/"); strcat(buf2, fname); f = fopen(buf2, "r"); if (f) { strcpy(fname, buf2); return f; } if (err) fprintf(stderr, "Couldn't open: %s\n", buf2); } } return f; } void include_file(q) Item* q; { char fname[NRN_BUFSIZE]; FileStackItem* fsi; if (!filestack) { filestack = newlist(); } strcpy(fname, STR(q) + 1); fname[strlen(fname)-1] = '\0'; fsi = (FileStackItem*)emalloc(sizeof(FileStackItem)); lappendsym(filestack, (Symbol*)fsi); fsi->inlinep = inlinep; fsi->ctp = ctp; fsi->linenum = linenum; fsi->fp = fin; strcpy(fsi->finname, finname); if ((fin = include_open(fname, 0)) == (FILE*)0) { include_open(fname, 1); diag("Couldn't open ", fname); } fprintf(stderr, "INCLUDEing %s\n", fname); strcpy(finname, fname); ctp = (char*)0; linenum = 0; } static void pop_file_stack() { FileStackItem* fsi; fsi = (FileStackItem*)(SYM(filestack->prev)); delete(filestack->prev); linenum = fsi->linenum; inlinep = fsi->inlinep; fclose(fin); fin = fsi->fp; strcpy(finname, fsi->finname); free((char*)fsi); } static int file_stack_empty() { if (!filestack) { return 1; } return (filestack->next == filestack); } neuron-7.5/src/nmodl/kinetic.c000077500000000000000000001241161323325274500164030ustar00rootroot00000000000000#include <../../nmodlconf.h> #define Glass 1 #if Glass /* We have found and corrected an MODL bug. The problem is that if any directive other than a CONSERVE or ~ is used within a KINETIC block the resultant C code is not in the correct order. Here is the C code from a kinetic block: */ #endif /* Sets up derivative form and implicit form*/ #include #include "modl.h" #include "parse1.h" #include "symbol.h" extern int numlist; extern int thread_data_index; extern List* thread_cleanup_list; #if VECTORIZE extern int vectorize; #endif extern Symbol *indepsym; #if CVODE int singlechan_; static int cvode_flag; static void cvode_kin_remove(); static Item* cvode_sbegin, *cvode_send; static List* kin_items_; #define CVODE_FLAG if(cvode_flag) #define NOT_CVODE_FLAG if(!cvode_flag) #else #define CVODE_FLAG if(0) #define NOT_CVODE_FLAG if(1) #endif typedef struct Rterm { struct Rterm *rnext; Symbol *sym; char *str; int num; short isstate; /* 1 if to be solved for */ } Rterm; static Rterm *rterm = (Rterm *)0, *lterm; /*list of reaction terms for a side*/ typedef struct Reaction { struct Reaction *reactnext; Rterm *rterm[2]; /* rterm[0] = null if flux*/ char *krate[2]; /* one of these is null if flux */ Item *position; } Reaction; static Reaction *reactlist = (Reaction *)0; static Reaction *conslist = (Reaction *)0; static List *done_list; /* list of already translated blocks */ static List *done_list1; /* do not emit definitions more than once */ typedef struct Rlist { Reaction *reaction; Symbol *sym; /* the kinetic block symbol */ Item *position; /* where we can initialize lists */ Item *endbrace; /* can insert after all statements */ Symbol **symorder; /* state symbols in varnum order */ char **capacity; /* compartment size expessions in varnum order */ int nsym; /* number of symbols in above vector */ int ncons; /* and the diagonals for conservation are first */ int sens_parm; /* for possible error message later on */ struct Rlist *rlistnext; int slist_decl; } Rlist; static Rlist *rlist = (Rlist *)0; static Rlist *clist = (Rlist *)0; static List *compartlist; /* list of triples with point to info in COMPARTMENT statement. The info is qexpr q'{' q'}' and points to items safely enclosed in a C comment. see massagecompart() and massagekinetic() */ List *ldifuslist; /* analogous to compartment. Specifies diffusion constant times the relevant cross sectional area. The volume/length must be specified in the COMPARTMENT statement */ /* addition of sens statement handling is restricted to the derivative form and follows the way it is done in deriv.c with the following exception-- until the solve statement is dealt with in solve.c we dont know which form we will use for the equations. Therefore we save sensused in the main Rlist and give error message if it is non-zero when implicit is called. Also the sensmassage call in massagekinetic substitutes an intermediate block to be called by the integrator and gives the total number of states including the sens states. This means that the call to kinetic_intmethod gets the new fun with too many states and therefore should rely only on the lists in this routine for its info. */ extern int sens_parm; static int genconservterms(); static int number_states(); static void kinlist(); static void genderivterms(); static void genmatterms(); #define MAXKINBLK 20 static int nstate_[MAXKINBLK]; #if VECTORIZE static char* instance_loop() { extern char* cray_pragma(); static char buf1[NRN_BUFSIZE]; Sprintf(buf1, "\n#ifdef WANT_PRAGMA%s#endif\n _INSTANCE_LOOP {\n", cray_pragma()); return buf1; } #endif static int sparse_declared_[10]; static int sparsedeclared(i) int i; { assert(i < 10); return sparse_declared_[i]++; } char *qconcat(q1, q2) /* return names as single string */ Item *q1, *q2; { char *cp, *ovrfl, *cs, *n; cp = buf; ovrfl = buf+400; while (q1 != q2->next) { assert(cp < ovrfl); *cp++ = ' '; if (q1->itemtype == SYMBOL) { /* dont prepend *( to ARRAYS anymore */ #if 0 if (SYM(q1)->type == NAME && (SYM(q1)->subtype & ARRAY)) { *cp++ = '*'; *cp++ = '('; } #endif n = SYM(q1)->name; } else { n = STR(q1); } for (cs = n; *cs; cs++) { *cp++ = *cs; } q1 = q1->next; } *cp = '\0'; return stralloc(buf, (char *)0); } void reactname(q1, lastok, q2) /* NAME [] INTEGER q2 may be null*/ Item *q1, *lastok, *q2; { /* put on right hand side */ Symbol *s, *s1; Rterm *rnext; rnext = rterm; rterm = (Rterm *)emalloc(sizeof(Rterm)); rterm->rnext = rnext; rterm->isstate = 0; s = SYM(q1); if ((s->subtype & STAT) && in_solvefor(s)) { Sprintf(buf, "D%s", s->name); s1 = lookup(buf); s1->usage |= DEP; s->used++; rterm->isstate = 1; } else if (!(s->subtype & (DEP | nmodlCONST | PARM | INDEP | STEP1 | STAT)) ) { diag(s->name, " must be a STATE, CONSTANT, ASSIGNED, STEPPED, or INDEPENDENT"); } if (q2) { rterm->num = atoi(STR(q2)); }else{ rterm->num = 1; } if (q1 != lastok) { if(!(s->subtype & ARRAY)) { diag("REACTION: MUST be scalar or array", (char *)0); } rterm->str = qconcat(q1->next->next, lastok->prev); /* one too many parentheses since normally a *( is prepended to the name during output in cout.c. Therefore when used to construct a MATELM or RHS extra parentheses must be prepended as in MATELM((...,(.... */ /* this no longer holds, no parentheses are to be prepended */ } else { rterm->str = (char *)0; } rterm->sym = s; } void leftreact() /* current reaction list is for left hand side */ { /* put whole list on left hand side and initialize right hand side */ lterm = rterm; rterm = (Rterm *)0; } void massagereaction(qREACTION, qREACT1, qlpar, qcomma, qrpar) Item *qREACTION, *qREACT1, *qlpar, *qcomma, *qrpar; { Reaction *r1; /*ARGSUSED*/ r1 = reactlist; reactlist = (Reaction *)emalloc(sizeof(Reaction)); reactlist->reactnext = r1; reactlist->rterm[1] = rterm; reactlist->rterm[0] = lterm; reactlist->krate[0] = qconcat(qlpar->next, qcomma->prev); reactlist->krate[1] = qconcat(qcomma->next, qrpar->prev); reactlist->position = qrpar; /*SUPPRESS 440*/ replacstr(qREACTION, "/* ~"); /*SUPPRESS 440*/ Insertstr(qrpar, ")*/\n"); /*SUPPRESS 440*/ replacstr(qrpar, "/*REACTION*/\n"); rterm = (Rterm *)0; } void flux(qREACTION, qdir, qlast) Item *qREACTION, *qdir, *qlast; { Reaction *r1; r1 = reactlist; reactlist = (Reaction *)emalloc(sizeof(Reaction)); reactlist->reactnext = r1; reactlist->rterm[0] = rterm; reactlist->rterm[1] = (Rterm *)0; /*SUPPRESS 440*/ replacstr(qREACTION, "/* ~"); reactlist->position = qlast; if (SYM(qdir)->name[0] == '-') { reactlist->krate[0] = qconcat(qdir->next->next, qlast); reactlist->krate[1] = (char *)0; /*SUPPRESS 440*/ replacstr(qlast, "/*REACTION*/\n"); }else{ if (rterm->rnext || (rterm->num != 1)) { diag("flux equations involve only one state", (char *)0); } reactlist->krate[0] = (char *)0; reactlist->krate[1] = qconcat(qdir->next->next, qlast); #if NOCMODL if (ldifuslist) { /* function of current ? */ Item* q; int isfunc; for (q = qdir->next->next; q != qlast; q = q->next) { Symbol* s; if (q->itemtype == SYMBOL) { s = SYM(q); if (s->nrntype & 02 /*NRNCURIN*/) { Symbol* sr; Item* q1; char* c1, *c2; /* associate dflux/dcur with proper state */ ITERATE(q1, ldifuslist) { sr = SYM(q1); q1 = q1->next->next->next->next->next; if (sr == rterm->sym) { c1 = qconcat(qdir->next->next, q->prev); c2 = qconcat(q->next, qlast); sprintf(buf, "nrn_nernst_coef(_type_%s)*(%s _ion_d%sdv %s)", s->name, c1, s->name, c2); /* dflux/dv */ if (rterm->str) { replacstr(q1, rterm->str); } if (*STR(q1->next) == '\0') { replacstr(q1->next, buf); }else{ diag(sr->name, "gets a flux from more than one current"); } } q1 = q1->next; } } } } } #endif /*SUPPRESS 440*/ replacstr(qlast, "/*FLUX*/\n"); } /*SUPPRESS 440*/ Insertstr(qlast, ")*/\n"); /*SUPPRESS 440*/ rterm = (Rterm *)0; } /* set up derivative form for use with integration methods */ /* a bunch of states may be marked used but not be in the solveforlist we therefore loop through all the rterms and mark only those */ void massagekinetic(q1, q2, q3, q4, sensused) /*KINETIC NAME stmtlist '}'*/ Item *q1, *q2, *q3,*q4; int sensused; { int count = 0, i, order, ncons; Item *q, *qs, *afterbrace; Item* qv; Symbol *s, *fun; Reaction *r1; Rterm *rt; Rlist *r; fun = SYM(q2); if ((fun->subtype & (DERF|KINF)) && fun->u.i) { diag("Merging kinetic blocks not implemented", (char *)0); } fun->subtype |= KINF; numlist++; fun->u.i = numlist; Sprintf(buf, "static int %s();\n", SYM(q2)->name); Linsertstr(procfunc, buf); replacstr(q1, "\nstatic int"); qv = insertstr(q3, "()\n"); #if VECTORIZE if (vectorize) { kin_vect1(q1, q2, q4); vectorize_substitute(qv, "(void* _so, double* _rhs, double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt)\n"); } #endif qv = insertstr(q3, "{_reset=0;\n"); #if VECTORIZE Sprintf(buf, "{int _reset=0;\n"); vectorize_substitute(qv, buf); #endif afterbrace = q3->next; #if Glass /* Make sure that if the next statement was LOCAL xxx, we skip past it to do any of the other declarations. DRB */ if(afterbrace->itemtype==STRING && !strcmp(afterbrace->element.str,"double")){ for(afterbrace = afterbrace->next ; afterbrace->itemtype!=STRING || strcmp(afterbrace->element.str,";\n") ; afterbrace=afterbrace->next); if(afterbrace->itemtype==STRING && !strcmp(afterbrace->element.str,";\n")) afterbrace=afterbrace->next; } #endif qv = insertstr(afterbrace, "double b_flux, f_flux, _term; int _i;\n"); #if 0 && VECTORIZE vectorize_substitute(qv, "int _i;\n"); #endif /* also after these declarations will go initilization statements */ order = 0; /* the varnum and order of the states is such that diagonals of conservation equations must be first. This is done by setting s->used=-1 for all states and then numbering first with respect to the conslist and then the remaining that are still -1 */ /* mark only the isstate states */ SYMITER(NAME) { if ((s->subtype & STAT) && s->used) { s->used = 0; } } for (r1 = conslist; r1; r1 = r1->reactnext) { for (rt = r1->rterm[0]; rt; rt = rt->rnext) { if (rt->isstate) { rt->sym->used = -1; } } } for (r1 = reactlist; r1; r1 = r1->reactnext) { for (rt = r1->rterm[0]; rt; rt = rt->rnext) { if (rt->isstate) { rt->sym->used = -1; } } for (rt = r1->rterm[1]; rt; rt = rt->rnext) { if (rt->isstate) { rt->sym->used = -1; } } } /* diagonals of the conservation relations are first */ for (r1 = conslist; r1; r1 = r1->reactnext) { for (rt = r1->rterm[0]; rt; rt = rt->rnext) { if ((rt->sym->used == -1) && !(rt->sym->subtype & ARRAY)) { rt->sym->varnum = count++; rt->sym->used = ++order; /*first is 1*/ break; } } if (!rt) { diag("Failed to diagonalize the Kinetic matrix", (char *)0); } } ncons = count; /* can't use array as conservation diagonal */ /* others can be in any order */ SYMITER(NAME) { if ((s->subtype & STAT) && s->used == -1) { s->varnum = count; s->used = ++order; /* count and order distinct states */ if (s->subtype & ARRAY) { int dim = s->araydim; count += dim; }else{ count++; } } } if (count == 0) { diag("KINETIC contains no reactions", (char *)0); } fun->used = count; Sprintf(buf, "static int _slist%d[%d], _dlist%d[%d]; static double *_temp%d;\n", numlist, count*(1 + sens_parm), numlist, count*(1 + sens_parm), numlist); Linsertstr(procfunc, buf); insertstr(q4, " } return _reset;\n"); movelist(q1, q4, procfunc); r = (Rlist *)emalloc(sizeof(Rlist)); r->reaction = reactlist; reactlist = (Reaction *)0; r->sens_parm = sens_parm; r->symorder = (Symbol **)emalloc((unsigned)order*sizeof(Symbol *)); r->slist_decl = 0; /*the reason that we can't just keep this info in s->varnum is that more than one block can have the same state with a different varnum */ SYMITER(NAME) { if ((s->subtype & STAT) && s->used) { r->symorder[s->used - 1] = s; if (sensused) { add_sens_statelist(s); } } } r->nsym = order; r->ncons = ncons; r->position = afterbrace; r->endbrace = q4->prev; /* needed for Dstate with COMPARTMENT */ if (sensused) { /* fun now is the interface and fun->used is all the states */ sensmassage(DERIVATIVE, q2, numlist); /* this sets sens_parm to 0 */ } r->sym = fun; r->rlistnext = rlist; rlist = r; r = (Rlist *)emalloc(sizeof(Rlist)); r->reaction = conslist; conslist = (Reaction *)0; r->sym = fun; r->rlistnext = clist; clist = r; /* handle compartlist if any */ rlist->capacity = (char **)emalloc((unsigned)order*sizeof(char *)); for (i=0; icapacity[i] = ""; } if (compartlist) { char buf1[NRN_BUFSIZE]; Item *q, *qexp, *qb, *qend, *q1; ITERATE(q, compartlist) { qexp = ITM(q); q = q->next; qb = ITM(q); q = q->next; qend = ITM(q); for (q1 = qb->next; q1 != qend; q1 = q1->next) { Sprintf(buf1, "(%s)", qconcat(qexp, qb->prev)); rlist->capacity[SYM(q1)->used - 1] = stralloc(buf1, (char *)0); } } freelist(&compartlist); } SYMITER(NAME) { if ((s->subtype & STAT) && s->used) { s->used = 0; } } #if CVODE cvode_sbegin = q3; cvode_send = q4; kin_items_ = newlist(); for (q = cvode_sbegin; q != cvode_send->next; q = q->next) { lappenditem(kin_items_, q); } #endif } #if Glass void fixrlst(rlst) Rlist *rlst; { if(rlst->position->prev->itemtype==STRING && !strcmp(rlst->position->prev->element.str,"error =")) { rlst->position=rlst->position->prev; } } #endif static int ncons; /* the number of conservation equations */ void kinetic_intmethod(fun, meth) Symbol *fun; char* meth; { /*derivative form*/ Reaction *r1; Rlist *rlst, *clst; int i, nstate; cvode_kin_remove(); nstate = number_states(fun, &rlst, &clst); if (ncons) { Fprintf(stderr, "%s method ignores conservation\n", meth); } ncons = 0; Sprintf(buf, "{int _i; for(_i=0;_i<%d;_i++) _p[_dlist%d[_i]] = 0.0;}\n", nstate, fun->u.i); /*goes near beginning of block*/ #if Glass fixrlst(rlst); #endif Insertstr(rlst->position, buf); for (r1=rlst->reaction; r1; r1 = r1->reactnext) { genderivterms(r1, 0, 0); } for (i = 0; i < rlst->nsym; i++) { if (rlst->capacity[i][0]) { if (rlst->symorder[i]->subtype & ARRAY) { Sprintf(buf, "for (_i=0; _i < %d; _i++) { _p[_dlist%d[_i + %d]] /= %s;}\n", rlst->symorder[i]->araydim, fun->u.i, rlst->symorder[i]->varnum, rlst->capacity[i]); Insertstr(rlst->endbrace, buf); }else{ Sprintf(buf, "_p[_dlist%d[%d]] /= %s;\n", fun->u.i, rlst->symorder[i]->varnum, rlst->capacity[i]); Insertstr(rlst->endbrace, buf); } } } kinlist(fun, rlst); } static void genderivterms(r, type, n) Reaction *r; int type; /* 0 derivative, 1 implicit */ int n; /* function number, needed only for implicit */ { Symbol *s; Item *q; Rterm *rt; int i, j; if (r->rterm[1] == (Rterm *)0 && r->krate[1]) { genfluxterm(r, type, n); return; } q = r->position; for (j=0; j<2; j++) { if (j == 0) { Insertstr(q, "f_flux ="); }else{ Insertstr(q, ";\n b_flux ="); } if (r->krate[j]) { Insertstr(q, r->krate[j]); }else{ Insertstr(q, "0."); } for (rt = r->rterm[j]; rt; rt = rt->rnext) { for (i=0; inum; i++) { Insertstr(q, "*"); Insertsym(q, rt->sym); if (rt->str) { Sprintf(buf, "[%s]", rt->str); Insertstr(q, buf); } } } } Insertstr(q, ";\n"); for (j=0; j<2; j++) { for (rt = r->rterm[j]; rt; rt = rt->rnext) { if (!(rt->isstate)) { continue; } Sprintf(buf, "D%s", rt->sym->name); s = lookup(buf); s->usage |= DEP; if (rt->sym->varnum < ncons) continue; /* equation reserved for conservation*/ if (type) { Sprintf(buf, "_RHS%d(", n); Insertstr(q, buf); if (rt->str) { Sprintf(buf, "%d + %s)", rt->sym->varnum, rt->str); } else { Sprintf(buf, "%d)", rt->sym->varnum); } Insertstr(q, buf); }else{ Insertsym(q, s);/*needs processing in cout*/ if (rt->str) { Sprintf(buf, "[%s]", rt->str); Insertstr(q, buf); } } if (j == 0) { Insertstr(q, "-="); }else{ Insertstr(q, "+="); } if (rt->num > 1) { Sprintf(buf, "%d.0 *", rt->num); Insertstr(q, buf); } Insertstr(q, "(f_flux - b_flux);\n"); } } Insertstr(q, "\n"); /* REACTION comment left in */ } void genfluxterm(r, type, n) Reaction *r; int type; int n; { Symbol *s; Rterm *rt; Item *q; q = r->position; rt = r->rterm[0]; if (!(rt->isstate)) { diag(rt->sym->name, " must be (solved) STATE in flux reaction"); } Sprintf(buf, "D%s", rt->sym->name); s = lookup(buf); if (rt->sym->varnum < ncons) diag(rt->sym->name, " is conserved and has a flux"); /* the right hand side */ Insertstr(q, "f_flux = b_flux = 0.;\n"); if (type) { Sprintf(buf, "_RHS%d(", n); Insertstr(q, buf); if (rt->str) { Sprintf(buf, "%d + %s)", rt->sym->varnum, rt->str); } else { Sprintf(buf, "%d)", rt->sym->varnum); } Insertstr(q, buf); }else{ Insertsym(q, s);/*needs processing in cout*/ if (rt->str) { Sprintf(buf, "[%s]", rt->str); Insertstr(q, buf); } } if (r->krate[0]) { Sprintf(buf, " -= (f_flux = (%s) * ", r->krate[0]); Insertstr(q, buf); Insertsym(q, rt->sym); if (rt->str) { Sprintf(buf, "[%s]", rt->str); Insertstr(q, buf); } }else{ Insertstr(q, "+= (b_flux = "); Insertstr(q, r->krate[1]); } Insertstr(q, ");\n"); /* the matrix coefficient */ if (type && r->krate[0]) { Sprintf(buf, " _MATELM%d(", n); Insertstr(q, buf); if (rt->str) { Sprintf(buf, "%d + %s, %d + %s", rt->sym->varnum, rt->str, rt->sym->varnum, rt->str); }else{ Sprintf(buf, "%d, %d)", rt->sym->varnum, rt->sym->varnum); } Insertstr(q, buf); Sprintf(buf, "+= %s;\n", r->krate[0]); Insertstr(q, buf); } } static int linmat; /* 1 if linear */ void kinetic_implicit(fun, dt, mname) Symbol *fun; char *dt, *mname; /* mname is _advance or sparse */ { /*implicit equations _slist are state(t+dt) _dlist are Dstate(t)*/ Item *q; Item* qv; Reaction *r1; Rlist *rlst, *clst; int i, nstate, flag, sparsedec, firsttrans, firsttrans1; firsttrans = 0; /* general declarations done only for NOT_CVODE_FLAG */ firsttrans1 = 0; cvode_kin_remove(); nstate = number_states(fun, &rlst, &clst); CVODE_FLAG { ncons = 0; Sprintf(buf, "static void* _cvsparseobj%d;\n", fun->u.i); q = linsertstr(procfunc, buf); sprintf(buf, "static int _cvspth%d = %d;\n", fun->u.i, thread_data_index++); vectorize_substitute(q, buf); sprintf(buf, " _nrn_destroy_sparseobj_thread(_thread[_cvspth%d]._pvoid);\n", fun->u.i); lappendstr(thread_cleanup_list, buf); }else{ if (!done_list) { done_list = newlist(); done_list1 = newlist(); } firsttrans = 1; /* declare the sparseobj and linflag*/ firsttrans1 = 1; ITERATE(q, done_list) { if (SYM(q) == fun) { firsttrans = 0; /* already declared */ } } ITERATE(q, done_list1) { if (SYM(q) == fun) { firsttrans1 = 0; /* already declared */ } } if (firsttrans1) { Lappendsym(done_list, fun); Lappendsym(done_list1, fun); Sprintf(buf, "static void* _sparseobj%d;\n", fun->u.i); q = linsertstr(procfunc, buf); sprintf(buf, "static int _spth%d = %d;\n", fun->u.i, thread_data_index++); vectorize_substitute(q, buf); sprintf(buf, " _nrn_destroy_sparseobj_thread(_thread[_spth%d]._pvoid);\n", fun->u.i); lappendstr(thread_cleanup_list, buf); } } if (rlst->sens_parm) { diag(" SENS unimplemented for default kinetic integration", " method"); } /*goes near beginning of block. Before first reaction is not adequate since the first reaction may be within a while loop */ #if Glass fixrlst(rlst); #endif CVODE_FLAG { Insertstr(rlst->position, " b_flux = f_flux = 0.;\n"); } Sprintf(buf, "{int _i; double _dt1 = 1.0/%s;\n\ for(_i=%d;_i<%d;_i++){\n", dt, ncons, nstate); Insertstr(rlst->position, buf); qv = insertstr(rlst->position, ""); #if 0 && VECTORIZE vectorize_substitute(qv, instance_loop()); #endif NOT_CVODE_FLAG { Sprintf(buf, "\ _RHS%d(_i) = -_dt1*(_p[_slist%d[_i]] - _p[_dlist%d[_i]]);\n\ _MATELM%d(_i, _i) = _dt1;\n", fun->u.i, fun->u.i, fun->u.i, fun->u.i); qv = insertstr(rlst->position, buf); #if 0 && VECTORIZE Sprintf(buf, "\ _RHS%d(_i) = -_dt1*(_p[_ix][_slist%d[_i]] - _p[_ix][_dlist%d[_i]]);\n\ _MATELM%d(_i, _i) = _dt1;\n", fun->u.i, fun->u.i, fun->u.i, fun->u.i); vectorize_substitute(qv, buf); #endif } CVODE_FLAG { Sprintf(buf, "\ _RHS%d(_i) = _dt1*(_p[_dlist%d[_i]]);\n\ _MATELM%d(_i, _i) = _dt1;\n", fun->u.i, fun->u.i, fun->u.i); qv = insertstr(rlst->position, buf); #if 0 && VECTORIZE Sprintf(buf, "\ _RHS%d(_i) = _dt1*(_p[_ix][_dlist%d[_i]]);\n\ _MATELM%d(_i, _i) = _dt1;\n", fun->u.i, fun->u.i, fun->u.i); vectorize_substitute(qv, buf); #endif } qv = insertstr(rlst->position, ""); #if 0 && VECTORIZE vectorize_substitute(qv, " } /* ILOOPEND */\n"); #endif Sprintf(buf," \n}"); Insertstr(rlst->position, buf); /* Modify to take into account compartment sizes */ /* separate into scalars and vectors */ flag = 0; for (i = ncons; i < rlst->nsym; i++) { if (rlst->capacity[i][0]) { if (!(rlst->symorder[i]->subtype & ARRAY)) { if (! flag) { flag = 1; qv = insertstr(rlst->position, ""); #if 0 && VECTORIZE vectorize_substitute(qv, instance_loop()); #endif } Sprintf(buf, "\n_RHS%d(%d) *= %s", fun->u.i, rlst->symorder[i]->varnum, rlst->capacity[i]); Insertstr(rlst->position, buf); Sprintf(buf, ";\n_MATELM%d(%d, %d) *= %s;", fun->u.i, rlst->symorder[i]->varnum, rlst->symorder[i]->varnum, rlst->capacity[i]); Insertstr(rlst->position, buf); } } } if (flag) { qv = insertstr(rlst->position, ""); #if 0 && VECTORIZE vectorize_substitute(qv, " } /* ILOOPEND */\n"); #endif } for (i = ncons; i < rlst->nsym; i++) { if (rlst->capacity[i][0]) { if (rlst->symorder[i]->subtype & ARRAY) { Sprintf(buf, "\nfor (_i=0; _i < %d; _i++) {\n", rlst->symorder[i]->araydim); Insertstr(rlst->position, buf); qv = insertstr(rlst->position, ""); #if 0 && VECTORIZE vectorize_substitute(qv, instance_loop()); #endif Sprintf(buf," _RHS%d(_i + %d) *= %s", fun->u.i, rlst->symorder[i]->varnum, rlst->capacity[i]); Insertstr(rlst->position, buf); Sprintf(buf, ";\n_MATELM%d(_i + %d, _i + %d) *= %s;", fun->u.i, rlst->symorder[i]->varnum, rlst->symorder[i]->varnum, rlst->capacity[i]); Insertstr(rlst->position, buf); qv = insertstr(rlst->position, ""); #if 0 && VECTORIZE vectorize_substitute(qv, " } /* ILOOPEND */\n"); #endif Insertstr(rlst->position, "}"); } } } /*----------*/ Insertstr(rlst->position, "}\n"); linmat = 1; for (r1=rlst->reaction; r1; r1 = r1->reactnext) { NOT_CVODE_FLAG { genderivterms(r1, 1, fun->u.i); } genmatterms(r1, fun->u.i); } NOT_CVODE_FLAG { /* to end of function */ for (i = 0, r1=clst->reaction; r1; r1 = r1->reactnext) { i = genconservterms(i, r1, fun->u.i, rlst); } if (firsttrans1) { Sprintf(buf, "\n#define _linmat%d %d\n", fun->u.i, linmat); Linsertstr(procfunc, buf); } if (firsttrans) { kinlist(fun, rlst); #if 0 && VECTORIZE if (vectorize) { Sprintf(buf, "static _vector_%s();\n", fun->name); qv = linsertstr(procfunc, ""); vectorize_substitute(qv, buf); } #endif if (strcmp(mname, "_advance") == 0) { /* use for simeq */ Sprintf(buf, "\n#define _RHS%d(arg) _coef%d[arg][%d]\n", fun->u.i, fun->u.i, nstate); Linsertstr(procfunc, buf); Sprintf(buf, "\n#define _MATELM%d(arg1,arg2) _coef%d[arg1][arg2]\n", fun->u.i, fun->u.i); Linsertstr(procfunc, buf); Sprintf(buf, "static double **_coef%d;\n", fun->u.i); Linsertstr(procfunc, buf); } else { /*for sparse matrix solver*/ /* boilerplate for using sparse matrix solver */ Sprintf(buf, "static double *_coef%d;\n", fun->u.i); qv = linsertstr(procfunc, buf); #if VECTORIZE vectorize_substitute(qv, ""); #endif Sprintf(buf, "\n#define _RHS%d(_arg) _coef%d[_arg + 1]\n", fun->u.i, fun->u.i); qv = linsertstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "\n#define _RHS%d(_arg) _rhs[_arg+1]\n", fun->u.i); vectorize_substitute(qv, buf); #endif Sprintf(buf, "\n#define _MATELM%d(_row,_col)\ *(_getelm(_row + 1, _col + 1))\n", fun->u.i); qv = linsertstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "\n#define _MATELM%d(_row,_col) *(_nrn_thread_getelm(_so, _row + 1, _col + 1))\n", fun->u.i); vectorize_substitute(qv, buf); #endif {static int first = 1; if (first) { first = 0; Sprintf(buf,"extern double *_getelm();\n"); qv = linsertstr(procfunc, buf); #if VECTORIZE Sprintf(buf,"extern double *_nrn_thread_getelm();\n"); vectorize_substitute(qv, buf); #endif }} } } } /* end of NOT_CVODE_FLAG */ } static void genmatterms(r, fn) Reaction *r; int fn; /*function number, numlist*/ { Symbol *s, *s1; Item *q; Rterm *rt, *rt1; int i, j, j1, n; if (r->rterm[1] == (Rterm *)0 && r->krate[1]) { return; /* no fluxes go into matrix */ } q = r->position; for (j=0; j < 2; j++) for (rt = r->rterm[j]; rt; rt = rt->rnext) {/*d/dstate*/ s = rt->sym; if (!(rt->isstate)) { continue; } /* construct the term */ Sprintf(buf, "_term = %s", r->krate[j]); Insertstr(q, buf); if (rt->num != 1) { Sprintf(buf, "* %d", rt->num); Insertstr(q, buf); } for (rt1 = r->rterm[j]; rt1; rt1 = rt1->rnext) { n = rt1->num; if (rt == rt1) { n--; } for (i=0; isym); if (rt1->str) { Sprintf(buf, "[%s]", rt1->str); Insertstr(q, buf); } } } Insertstr(q, ";\n"); /* put in each equation (row) */ for (j1=0; j1<2; j1++) for (rt1 = r->rterm[j1]; rt1; rt1=rt1->rnext) { s1 = rt1->sym; if (!(rt1->isstate)) { continue; } if (s1->varnum < ncons) continue; Sprintf(buf, "_MATELM%d(", fn); Insertstr(q, buf); if (rt1->str) { Sprintf(buf, "%d + %s", s1->varnum, rt1->str); Insertstr(q, buf); } else { Sprintf(buf, "%d", s1->varnum); Insertstr(q, buf); } if (rt->str) { Sprintf(buf, ",%d + %s)", s->varnum, rt->str); Insertstr(q, buf); } else { Sprintf(buf, ",%d)", s->varnum); Insertstr(q, buf); } if (j == j1) { Insertstr(q, " +="); }else{ Insertstr(q, " -="); } if (rt1->num != 1) { Sprintf(buf, "%d * ", rt1->num); Insertstr(q, buf); } Insertstr(q, "_term;\n"); } } /* REACTION comment left in */ } void massageconserve(q1, q3, q5) /* CONSERVE react '=' expr */ Item *q1, *q3, *q5; { /* the list of states is in rterm at this time with the first at the end */ Reaction *r1; Item* qv; r1 = conslist; conslist = (Reaction *)emalloc(sizeof(Reaction)); conslist->reactnext = r1; conslist->rterm[0] = rterm; conslist->rterm[1] = (Rterm *)0; conslist->krate[0] = qconcat(q3->next, q5); conslist->krate[1] = (char *)0; /*SUPPRESS 440*/ replacstr(q1, "/*"); qv = insertstr(q1, ""); #if 0 && VECTORIZE vectorize_substitute(qv, instance_loop()); #endif /*SUPPRESS 440*/ Insertstr(q5->next, "*/\n"); /*SUPPRESS 440*/ conslist->position = insertstr(q5->next->next, "/*CONSERVATION*/\n"); #if 0 && VECTORIZE vectorize_substitute(conslist->position, "/*CONSERVATION*/\n\ } /*ILOOPEND*/\n"); #endif rterm = (Rterm *)0; } static int genconservterms(eqnum, r, fn, rlst) Reaction *r; int eqnum, fn; /*function number*/ Rlist *rlst; { Item *q; Rterm *rt, *rtdiag; char eqstr[NRN_BUFSIZE]; q = r->position; /* find the term used for the equation number (important if array)*/ for (rtdiag = (Rterm *)0, rt = r->rterm[0]; rt; rt = rt->rnext) { if (eqnum == rt->sym->varnum) { rtdiag = rt; break; } } assert (rtdiag); if (rtdiag->str) { Sprintf(eqstr, "%d(%d + %s", fn, eqnum, rtdiag->str); eqnum += rtdiag->sym->araydim; /*SUPPRESS 622*/ assert(0); /*could ever work only in specialized circumstances when same conservation eqn used for all elements*/ } else { Sprintf(eqstr, "%d(%d", fn, eqnum); eqnum++; } Sprintf(buf, "_RHS%s) = %s;\n", eqstr, r->krate[0]); Insertstr(q, buf); for (rt = r->rterm[0]; rt; rt = rt->rnext) { char buf1[NRN_BUFSIZE]; if (rlst->capacity[rt->sym->used][0]) { Sprintf(buf1, " * %s", rlst->capacity[rt->sym->used]); } else { buf1[0] = '\0'; } if (!(rt->isstate)) { diag(rt->sym->name, ": only (solved) STATE are allowed in CONSERVE equations."); } if (rt->str) { if(rlst->capacity[rt->sym->used][0]) { Sprintf(buf, "_i = %s;\n", rt->str); Insertstr(q, buf); } Sprintf(buf, "_MATELM%s, %d + %s) = %d%s;\n", eqstr, rt->sym->varnum, rt->str, rt->num, buf1); Insertstr(q, buf); Sprintf(buf, "_RHS%s) -= %s[%s]%s", eqstr, rt->sym->name, rt->str, buf1); }else{ Sprintf(buf, "_MATELM%s, %d) = %d%s;\n", eqstr, rt->sym->varnum, rt->num, buf1); Insertstr(q, buf); Sprintf(buf, "_RHS%s) -= %s%s", eqstr, rt->sym->name, buf1); } Insertstr(q, buf); if (rt->num != 1) { Sprintf(buf, " * %d;\n", rt->num); Insertstr(q, buf); }else { Insertstr(q, ";\n"); } } return eqnum; } static int number_states(fun, prlst, pclst) Symbol *fun; Rlist **prlst, **pclst; { /* reaction list has the symorder and this info is put back in sym->varnum*/ /* also index of symorder goes into sym->used */ Rlist *rlst, *clst; Symbol *s; int i, istate; /*match fun with proper reaction list*/ clst = clist; for (rlst = rlist; rlst && (rlst->sym != fun); rlst = rlst->rlistnext) clst = clst->rlistnext; if (rlst == (Rlist *)0) { diag(fun->name, " doesn't exist"); } *prlst = rlst; *pclst = clst; /* Number the states. */ for (i=0, istate=0; insym; i++) { s = rlst->symorder[i]; s->varnum = istate; s->used = i; /* set back to 0 in kinlist */ if (s->subtype & ARRAY) { istate += s->araydim; }else{ istate++; } } ncons = rlst->ncons; if (fun->u.i >= MAXKINBLK) { diag("too many solve blocks", (char*)0); } nstate_[fun->u.i] = istate; return istate; } static void kinlist(fun, rlst) Symbol *fun; Rlist *rlst; { int i; Symbol *s; Item* qv; if (rlst->slist_decl) { return; } rlst->slist_decl = 1; /* put slist and dlist in initlist */ for (i=0; i < rlst->nsym; i++) { s = rlst->symorder[i]; #if CVODE slist_data(s, s->varnum, fun->u.i); #endif if (s->subtype & ARRAY) { int dim = s->araydim; Sprintf(buf, "for(_i=0;_i<%d;_i++){_slist%d[%d+_i] = (%s + _i) - _p;" ,dim, fun->u.i , s->varnum, s->name); qv = lappendstr(initlist, buf); #if 0 && VECTORIZE if (vectorize){ Sprintf(buf, "for(_i=0;_i<%d;_i++){_slist%d[%d+_i] = (%s + _i) - _p[_ix];" ,dim, fun->u.i , s->varnum, s->name); vectorize_substitute(qv, buf); } #endif Sprintf(buf, " _dlist%d[%d+_i] = (D%s + _i) - _p;}\n" , fun->u.i, s->varnum, s->name); qv = lappendstr(initlist, buf); #if 0 && VECTORIZE if (vectorize){ Sprintf(buf, " _dlist%d[%d+_i] = (D%s + _i) - _p[_ix];}\n" , fun->u.i, s->varnum, s->name); vectorize_substitute(qv, buf); } #endif }else{ Sprintf(buf, "_slist%d[%d] = &(%s) - _p;", fun->u.i, s->varnum, s->name); qv = lappendstr(initlist, buf); #if 0 && VECTORIZE if (vectorize){ Sprintf(buf, "_slist%d[%d] = &(%s) - _p[_ix];", fun->u.i, s->varnum, s->name); vectorize_substitute(qv, buf); } #endif Sprintf(buf, " _dlist%d[%d] = &(D%s) - _p;\n", fun->u.i, s->varnum, s->name); qv = lappendstr(initlist, buf); #if 0 && VECTORIZE if (vectorize){ Sprintf(buf, " _dlist%d[%d] = &(D%s) - _p[_ix];\n", fun->u.i, s->varnum, s->name); vectorize_substitute(qv, buf); } #endif } s->used = 0; } } /* for now we only check CONSERVE and COMPARTMENT */ void check_block(standard, actual, mes) int standard, actual; char *mes; { if (standard != actual) { diag(mes, " not allowed in this kind of block"); } } /* Syntax to take into account compartment size compart: COMPARTMENT NAME ',' expr '{' namelist '}' {massagecompart($4, $5, $7, SYM($2));} | COMPARTMENT expr '{' namelist '}' {massagecompart($2, $3, $5, SYM0);} | COMPARTMENT error {myerr("Correct syntax is: \ COMPARTMENT index, expr { vectorstates }\n\ COMPARTMENT expr { scalarstates }");} ; */ /* implementation We save enough info here so that the rlist built in massagekinetic can point to compartment size expressions which are later used analogously to c*dv/dt and also affect the conservation equations. see Item ** Rlist->capacity[2] any index is replaced by _i. the name list is checked to make sure they are states compartlist is a list of triples of item pointers which holds the info for massagekinetic. */ void massagecompart(qexp, qb1, qb2, indx) Item *qexp, *qb1, *qb2; Symbol *indx; { Item *q, *qs; /* surround the statement with comments so that the expession will benignly exist for later use */ /*SUPPRESS 440*/ Insertstr(qb2->next, "*/\n"); if (indx) { for (q = qexp; q != qb1; q = q->next) { if (q->itemtype == SYMBOL && SYM(q) == indx) { replacstr(q, "_i"); } } /*SUPPRESS 440*/ Insertstr(qexp->prev->prev->prev, "/*"); }else{ /*SUPPRESS 440*/ Insertstr(qexp->prev, "/*"); } for (q = qb1->next; q != qb2; q = qs) { qs = q->next; if (!(SYM(q)->subtype & STAT) && in_solvefor(SYM(q))) { delete(q); #if 0 diag(SYM(q)->name, "must be a (solved) STATE in a COMPARTMENT statement"); #endif } } if (!compartlist) { compartlist = newlist(); } Lappenditem(compartlist, qexp); Lappenditem(compartlist, qb1); Lappenditem(compartlist, qb2); } void massageldifus(qexp, qb1, qb2, indx) Item *qexp, *qb1, *qb2; Symbol *indx; { Item *q, *qs, *q1; Symbol* s, *s2; /* surround the statement with comments so that the expession will benignly exist for later use */ /*SUPPRESS 440*/ Insertstr(qb2->next, "*/\n"); if (indx) { for (q = qexp; q != qb1; q = q->next) { if (q->itemtype == SYMBOL && SYM(q) == indx) { replacstr(q, "_i"); } } /*SUPPRESS 440*/ Insertstr(qexp->prev->prev->prev, "/*"); }else{ /*SUPPRESS 440*/ Insertstr(qexp->prev, "/*"); } if (!ldifuslist) { ldifuslist = newlist(); } for (q = qb1->next; q != qb2; q = qs) { qs = q->next; s = SYM(q); s2 = SYM0; if (!(s->subtype & STAT) && in_solvefor(s)) { delete(q); diag(SYM(q)->name, "must be a (solved) STATE in a LONGITUDINAL_DIFFUSION statement"); } lappendsym(ldifuslist, s); Lappenditem(ldifuslist, qexp); Lappenditem(ldifuslist, qb1); /* store the COMPARTMENT volume expression for this sym */ q1 = compartlist; if (q1) ITERATE(q1, compartlist) { Item *qexp, *qb1, *qb2, *q; qexp = ITM(q1); q1 = q1->next; qb1 = ITM(q1); q1 = q1->next; qb2 = ITM(q1); for (q = qb1; q != qb2; q = q->next) { if (q->itemtype == SYMBOL) { s2 = SYM(q); if (s == s2) break; } } if (s == s2) { lappenditem(ldifuslist, qexp); lappenditem(ldifuslist, qb1); break; } } if (s != s2) { diag(SYM(q)->name, "must be declared in COMPARTMENT"); } lappendstr(ldifuslist, "0"); /* will be flux conc index if any */ lappendstr(ldifuslist, ""); /* will be dflux/dconc if any */ } } static List* kvect; void kin_vect1(q1, q2, q4) Item *q1, *q2, *q4; { if (!kvect) { kvect = newlist(); } Lappenditem(kvect, q1); /* static .. */ Lappenditem(kvect, q2); /* sym */ Lappenditem(kvect, q4); /* } */ } void kin_vect2() { Item *q, *q1, *q2, *q4; return; if (kvect) { ITERATE(q, kvect) { q1 = ITM(q); q = q->next; q2 = ITM(q); q = q->next; q4 = ITM(q); kin_vect3(q1, q2, q4); } } } void kin_vect3(q1, q2, q4) Item *q1, *q2, *q4; { Symbol* fun; Item *q, *first, *last, *insertitem(); fun = SYM(q2); last = insertstr(q4->next, "\n"); first = insertstr(last, "\n/*copy of previous function */\n"); for (q = q1; q != q4->next; q = q->next) { if (q == q2) { Sprintf(buf, "_vector_%s", fun->name); insertstr(last, buf); }else{ insertitem(last, q); } } Sprintf(buf, "\n#undef WANT_PRAGMA\n#define WANT_PRAGMA 1\ \n#undef _INSTANCE_LOOP\n#define _INSTANCE_LOOP \ for (_ix = _base; _ix < _bound; ++_ix) "); insertstr(first, buf); Sprintf(buf, "\n#undef _RHS%d\n#define _RHS%d(arg) \ _coef%d[arg][_ix]\n", fun->u.i, fun->u.i, fun->u.i); insertstr(first, buf); Sprintf(buf, "\n#undef _MATELM%d\n#define _MATELM%d(row,col) \ _jacob%d[(row)*%d + (col)][_ix]\n", fun->u.i, fun->u.i, fun->u.i, nstate_[fun->u.i]); insertstr(first, buf); } static int astmt_state; static Item* astmt_last; void ostmt_start() { astmt_state = 0; } void see_ostmt() { #if 0 && VECTORIZE if (vectorize) { if (astmt_state) { astmt_state = 0; vectorize_substitute(astmt_last, "\n } /*ILOOPEND*/\n"); } } #endif } void see_astmt(q1, q2) Item *q1, *q2; { #if 0 && VECTORIZE Item* q; if (vectorize) { if (!astmt_state) { astmt_state = 1; q = insertstr(q1, ""); vectorize_substitute(q, instance_loop()); } astmt_last = insertstr(q2->next, ""); } #endif } void vectorize_if_else_stmt(blocktype) int blocktype; { #if 0 && VECTORIZE if (blocktype == KINETIC && vectorize) { vectorize = 0; fprintf(stderr, "Notice: Can't vectorize a kinetic block if it contains\n\ an if...else... statement.\n"); } #endif } #if CVODE static void cvode_kin_remove() { Item* q, *q2; #if 0 prn(kin_items_, kin_items_->prev); prn(cvode_sbegin, cvode_send); #endif q2 = cvode_sbegin; ITERATE(q, kin_items_) { while (ITM(q) != q2) { assert(q2 != cvode_send); /* past the list */ q2 = q2->next; delete(q2->prev); } q2 = q2->next; } } void prn(q1,q2) Item *q1, *q2; { Item* qq, *q; for (qq = q1; qq != q2; qq=qq->next) { if (qq->itemtype == ITEM) { fprintf(stderr, "itm "); q = ITM(qq); }else{ q = qq; } switch(q->itemtype) { case STRING: fprintf(stderr, "%p STRING |%s|\n", q, STR(q)); break; case SYMBOL: fprintf(stderr, "%p SYMBOL |%s|\n", q, SYM(q)->name); break; case ITEM: fprintf(stderr, "%p ITEM\n", q); break; default: fprintf(stderr, "%p type %d\n", q, q->itemtype); break; } } } void cvode_kinetic(qsol, fun, numeqn, listnum) Item* qsol; Symbol* fun; int numeqn, listnum; { #if 1 Item* qn; int out; Item* q, *pbeg, *pend, *qnext; /* get a list of the original items so we can keep removing the added ones to get back to the original list. */ if (done_list) for (q = done_list->next; q != done_list; q = qn) { qn = q->next; if (SYM(q) == fun) { delete(q); } } kinetic_intmethod(fun, "NEURON's CVode"); Lappendstr(procfunc, "\n/*CVODE ode begin*/\n"); sprintf(buf, "static int _ode_spec%d() {_reset=0;{\n", fun->u.i); Lappendstr(procfunc, buf); sprintf(buf, "static int _ode_spec%d(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset=0;{\n", fun->u.i); vectorize_substitute(procfunc->prev, buf); copyitems(cvode_sbegin, cvode_send, procfunc->prev); Lappendstr(procfunc, "\n/*CVODE matsol*/\n"); sprintf(buf, "static int _ode_matsol%d() {_reset=0;{\n", fun->u.i); Lappendstr(procfunc, buf); sprintf(buf, "static int _ode_matsol%d(void* _so, double* _rhs, double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset=0;{\n", fun->u.i); vectorize_substitute(procfunc->prev, buf); cvode_flag = 1; kinetic_implicit(fun, "dt", "ZZZ"); cvode_flag = 0; pbeg = procfunc->prev; copyitems(cvode_sbegin, cvode_send, procfunc->prev); pend = procfunc->prev; #if 1 /* remove statements containing f_flux or b_flux */ for (q = pbeg; q != pend; q = qnext) { qnext = q->next; if (q->itemtype == SYMBOL && (strcmp(SYM(q)->name, "f_flux") == 0 || strcmp(SYM(q)->name, "b_flux") == 0 )) { /* find the beginning of the statement */ out = 0; for (;;) { switch(q->itemtype) { case STRING: if (strchr(STR(q), ';')) { out = 1; } break; case SYMBOL: if (SYM(q)->name[0] == ';') { out = 1; } break; } if (out) { break; } q = q->prev; } q = q->next; /* delete the statement */ while (q->itemtype != SYMBOL || SYM(q)->name[0] != ';') { qnext = q->next; delete(q); q = qnext; } qnext = q->next; delete(q); } } #endif Lappendstr(procfunc, "\n/*CVODE end*/\n"); #endif } void single_channel(qsol, fun, numeqn, listnum) Item* qsol; Symbol* fun; int numeqn, listnum; { Rlist *rlst, *clst; int nstate, i; int out; Item* q, *pbeg, *pend, *qnext; Reaction* r1; return; nstate = number_states(fun, &rlst, &clst); for (r1 = rlst->reaction; r1; r1 = r1->reactnext) { if (!r1->rterm[0]) { /* printf("there is a flux\n");*/ return; } if (!r1->rterm[1]) { /* printf("there is a sink\n");*/ return; } for (i=0; i < 2; ++i) { if (r1->rterm[i]->rnext) { /* printf("The scheme is nonlinear\n");*/ return; } if (!r1->rterm[i]->isstate) { /* printf("reaction term is not a STATE\n");*/ return; } } } for (i=0; i < rlst->nsym; ++i) { if (rlst->capacity[i][0] != '\0') { /* printf("there are COMPARTMENT statements\n");*/ return; } } cvode_kin_remove(); for (r1 = rlst->reaction; r1; r1 = r1->reactnext) { for (i=0; i<2; ++i) { sprintf(buf, " _nrn_single_react(%d", r1->rterm[i]->sym->varnum); insertstr(r1->position, buf); if (r1->rterm[i]->str) { sprintf(buf, "+ %s", r1->rterm[i]->str); insertstr(r1->position, buf); } sprintf(buf, ",%d", r1->rterm[(i+1)%2]->sym->varnum); insertstr(r1->position, buf); if (r1->rterm[(i+1)%2]->str) { sprintf(buf, "+ %s", r1->rterm[(i+1)%2]->str); insertstr(r1->position, buf); } sprintf(buf, ", %s);\n", r1->krate[i]); insertstr(r1->position, buf); } } Lappendstr(procfunc, "\n/*Single Channel begin*/\n"); sprintf(buf, "static int _singlechan%d(_v, _pp, _ppd) double _v; double* _pp; Datum* _ppd;{\n\ _p = _pp; _ppvar = _ppd; v = _v; _reset=0;\n{\n", fun->u.i); Lappendstr(procfunc, buf); pbeg = procfunc->prev; copyitems(cvode_sbegin, cvode_send, procfunc->prev); pend = procfunc->prev; #if 1 /* remove statements containing f_flux or b_flux */ for (q = pbeg; q != pend; q = qnext) { qnext = q->next; if (q->itemtype == SYMBOL && (strcmp(SYM(q)->name, "f_flux") == 0 || strcmp(SYM(q)->name, "b_flux") == 0 )) { /* find the beginning of the statement */ out = 0; for (;;) { switch(q->itemtype) { case STRING: if (strchr(STR(q), ';')) { out = 1; } break; case SYMBOL: if (SYM(q)->name[0] == ';') { out = 1; } break; } if (out) { break; } q = q->prev; } q = q->next; /* delete the statement */ while (q->itemtype != SYMBOL || SYM(q)->name[0] != ';') { qnext = q->next; delete(q); q = qnext; } qnext = q->next; delete(q); } } #endif sprintf(buf, "\nstatic _singlechan_declare%d() {\n\ _singlechan_declare(_singlechan%d, _slist%d, %d);\n\ }\n", listnum, listnum, listnum, numeqn); Lappendstr(procfunc, buf); Lappendstr(procfunc, "\n/*Single Channel end*/\n"); cvode_kin_remove(); singlechan_=listnum; } #endif neuron-7.5/src/nmodl/lex.c000066400000000000000000001513321323325274500155420ustar00rootroot00000000000000 #line 3 "lex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 0 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); #if defined(__GNUC__) && __GNUC__ >= 3 __attribute__((__noreturn__)) #endif static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 32 #define YY_END_OF_BUFFER 33 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[67] = { 0, 0, 0, 33, 31, 23, 26, 25, 17, 31, 31, 31, 6, 27, 13, 31, 11, 28, 5, 5, 5, 5, 29, 31, 30, 22, 24, 16, 0, 10, 18, 8, 7, 6, 0, 27, 0, 14, 15, 12, 28, 1, 5, 5, 3, 5, 19, 21, 0, 7, 0, 0, 9, 20, 5, 5, 0, 8, 0, 0, 7, 4, 5, 0, 7, 2, 0 } ; static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 6, 1, 1, 1, 7, 8, 1, 1, 1, 9, 1, 10, 11, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 1, 14, 15, 16, 17, 1, 18, 18, 18, 18, 19, 20, 18, 21, 22, 18, 18, 23, 18, 18, 18, 18, 18, 18, 24, 18, 18, 18, 25, 18, 18, 18, 1, 1, 1, 1, 26, 1, 18, 18, 18, 18, 27, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 28, 29, 30, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst YY_CHAR yy_meta[32] = { 0, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1 } ; static yyconst flex_uint16_t yy_base[71] = { 0, 0, 0, 112, 113, 113, 113, 108, 95, 103, 101, 95, 21, 0, 24, 91, 90, 0, 96, 27, 29, 30, 113, 74, 113, 93, 113, 113, 95, 113, 113, 33, 34, 43, 32, 0, 84, 113, 113, 113, 0, 91, 90, 35, 89, 49, 113, 113, 54, 46, 65, 84, 83, 113, 28, 59, 82, 81, 69, 80, 78, 79, 61, 64, 60, 60, 113, 82, 85, 88, 53 } ; static yyconst flex_int16_t yy_def[71] = { 0, 66, 1, 66, 66, 66, 66, 66, 66, 67, 66, 66, 66, 68, 66, 66, 66, 69, 70, 70, 70, 70, 66, 66, 66, 66, 66, 66, 67, 66, 66, 66, 66, 66, 66, 68, 66, 66, 66, 66, 69, 66, 70, 70, 70, 70, 66, 66, 66, 66, 66, 66, 66, 66, 70, 70, 66, 66, 66, 66, 66, 70, 70, 66, 66, 70, 0, 66, 66, 66, 66 } ; static yyconst flex_uint16_t yy_nxt[145] = { 0, 4, 5, 6, 7, 8, 9, 10, 4, 4, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 18, 20, 18, 18, 21, 4, 18, 22, 23, 24, 25, 32, 33, 36, 41, 41, 41, 41, 37, 34, 51, 51, 41, 52, 31, 49, 61, 34, 44, 43, 45, 48, 50, 32, 33, 42, 41, 49, 54, 48, 50, 34, 56, 56, 58, 57, 41, 41, 41, 34, 55, 64, 58, 59, 59, 64, 60, 63, 63, 65, 64, 62, 28, 28, 28, 35, 41, 35, 40, 60, 40, 60, 57, 57, 52, 52, 41, 41, 41, 53, 29, 47, 46, 41, 39, 38, 31, 30, 29, 27, 26, 66, 3, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 } ; static yyconst flex_int16_t yy_chk[145] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 14, 19, 54, 20, 21, 14, 12, 34, 34, 43, 34, 31, 32, 54, 12, 20, 19, 21, 31, 32, 33, 33, 70, 45, 49, 43, 31, 32, 33, 48, 48, 49, 48, 55, 65, 62, 33, 45, 64, 49, 50, 50, 63, 50, 58, 58, 62, 58, 55, 67, 67, 67, 68, 61, 68, 69, 60, 69, 59, 57, 56, 52, 51, 44, 42, 41, 36, 28, 25, 23, 18, 16, 15, 11, 10, 9, 8, 7, 3, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "../../../nrn/src/nmodl/lex.l" #line 2 "../../../nrn/src/nmodl/lex.l" /* /local/src/master/nrn/src/nmodl/lex.l,v 4.2 1997/11/05 17:59:02 hines Exp */ #include <../../nmodlconf.h> #undef output #undef unput #ifdef FLEX_SCANNER #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ { \ int c = Getc(); \ result = (c==EOF) ? YY_NULL : (buf[0]=c, 1); \ } #else #undef input #endif #include "modl.h" #include "parse1.h" int lexcontext = 0; extern int Getc(); extern int unGetc(); extern int unput(); #define debug(arg1,arg2) /*printf("lex:arg1|%s|\n", arg2);*/ #line 545 "lex.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy (void ); int yyget_debug (void ); void yyset_debug (int debug_flag ); YY_EXTRA_TYPE yyget_extra (void ); void yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *yyget_in (void ); void yyset_in (FILE * _in_str ); FILE *yyget_out (void ); void yyset_out (FILE * _out_str ); yy_size_t yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); void yyset_lineno (int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif #ifndef YY_NO_UNPUT static void yyunput (int c,char *buf_ptr ); #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } { #line 33 "../../../nrn/src/nmodl/lex.l" #line 765 "lex.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 67 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 113 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 34 "../../../nrn/src/nmodl/lex.l" { /*PRIME possibly high order*/ char *cp, buf[256]; int i; Symbol *base; /* count the primes and create SCoP name*/ #if __TURBOC__ || SYSV || VMS || defined(MINGW) #define index strchr #endif cp = index(yytext, '\''); i = strlen(yytext) - (cp - yytext); *cp = '\0'; if (i > 1) { Sprintf(buf, "D%d%s", i, yytext); }else{ Sprintf(buf, "D%s", yytext); } /* determine if really a constant */ if ((i = input()) == '0') { Strcat(buf, "0"); yylval.qp = putintoken(buf, NAME); return NAME; }else{ unput(i); } /*create symbol if needed and store in intoken list*/ yylval.qp = putintoken(buf, PRIME); if (SYM(yylval.qp)->type != PRIME) { diag(yytext, " needed as derivative variable"); #if LINT goto yyfussy; #endif } /* the high order prime might not be explicitly declared at this time. But the base state may be an array. If it is, then make the PRIME an array of the same dimension. */ if ((base = lookup(yytext))) { if (base->subtype & ARRAY) { SYM(yylval.qp)->subtype |= ARRAY; SYM(yylval.qp)->araydim = base->araydim; } } return PRIME; } YY_BREAK case 2: #line 81 "../../../nrn/src/nmodl/lex.l" case 3: #line 82 "../../../nrn/src/nmodl/lex.l" case 4: YY_RULE_SETUP #line 82 "../../../nrn/src/nmodl/lex.l" { /* translate to lower case */ char *cp; for (cp = yytext; *cp; cp++) { *cp += 'a' - 'A'; } yylval.qp = putintoken(yytext, NAME); return SYM(yylval.qp)->type; } YY_BREAK case 5: YY_RULE_SETUP #line 91 "../../../nrn/src/nmodl/lex.l" { /*NAME*/ Symbol *s; yylval.qp = putintoken(yytext, NAME); s = SYM(yylval.qp); if (s->type == PRIME) diag(yytext, " being used as derivative variable"); return s->type; } YY_BREAK case 6: YY_RULE_SETUP #line 101 "../../../nrn/src/nmodl/lex.l" { /*INTEGER*/ yylval.qp = putintoken(yytext, INTEGER); /* Numbers are not looked for */ return INTEGER; } YY_BREAK case 7: #line 108 "../../../nrn/src/nmodl/lex.l" case 8: #line 109 "../../../nrn/src/nmodl/lex.l" case 9: YY_RULE_SETUP #line 109 "../../../nrn/src/nmodl/lex.l" { /*REAL*/ yylval.qp = putintoken(yytext, REAL); /* Numbers are not looked for */ return REAL; } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 114 "../../../nrn/src/nmodl/lex.l" { /* STRING */ yylval.qp = putintoken(yytext, STRING); return STRING; /* can't quote \" */ } YY_BREAK case 11: YY_RULE_SETUP #line 120 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return GT;} YY_BREAK case 12: YY_RULE_SETUP #line 121 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return GE;} YY_BREAK case 13: YY_RULE_SETUP #line 122 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return LT;} YY_BREAK case 14: YY_RULE_SETUP #line 123 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return LE;} YY_BREAK case 15: YY_RULE_SETUP #line 124 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return EQ;} YY_BREAK case 16: YY_RULE_SETUP #line 125 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return NE;} YY_BREAK case 17: YY_RULE_SETUP #line 126 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return NOT;} YY_BREAK case 18: YY_RULE_SETUP #line 127 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return AND;} YY_BREAK case 19: YY_RULE_SETUP #line 128 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return OR;} YY_BREAK case 20: YY_RULE_SETUP #line 130 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return REACT1;} YY_BREAK case 21: YY_RULE_SETUP #line 132 "../../../nrn/src/nmodl/lex.l" { /* syntactic sugar for equation addition */ yylval.qp = putintoken(yytext, 0); if (lexcontext == NONLINEAR) return NONLIN1; if (lexcontext == LINEAR) return LIN1; diag("equation addition can't occur in this type of block", (char *)0); } YY_BREAK case 22: YY_RULE_SETUP #line 139 "../../../nrn/src/nmodl/lex.l" { /* syntactic sugar for equations */ yylval.qp = putintoken(yytext, 0); if (lexcontext == NONLINEAR) return NONLIN1; if (lexcontext == LINEAR) return LIN1; if (lexcontext == PARTIAL) return yytext[0]; if (lexcontext == KINETIC) return REACTION; diag("equations can't occur in this type of block", (char *)0); } YY_BREAK case 23: YY_RULE_SETUP #line 148 "../../../nrn/src/nmodl/lex.l" {/*ignore spacing characters*/;} YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 150 "../../../nrn/src/nmodl/lex.l" {/*ignore newline*/} YY_BREAK case 25: YY_RULE_SETUP #line 151 "../../../nrn/src/nmodl/lex.l" {/*ignore newline*/} YY_BREAK case 26: /* rule 26 can match eol */ YY_RULE_SETUP #line 152 "../../../nrn/src/nmodl/lex.l" {/*ignore newline*/} YY_BREAK case 27: YY_RULE_SETUP #line 154 "../../../nrn/src/nmodl/lex.l" {/*ignore inline comments*/;} YY_BREAK case 28: YY_RULE_SETUP #line 156 "../../../nrn/src/nmodl/lex.l" {/*ignore inline comments*/;} YY_BREAK case 29: YY_RULE_SETUP #line 158 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken("{", 0); return yytext[0]; } YY_BREAK case 30: YY_RULE_SETUP #line 159 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken("}", 0); return yytext[0]; } YY_BREAK case 31: YY_RULE_SETUP #line 160 "../../../nrn/src/nmodl/lex.l" { yylval.qp = putintoken(yytext, 0); return yytext[0]; } YY_BREAK case 32: YY_RULE_SETUP #line 162 "../../../nrn/src/nmodl/lex.l" ECHO; YY_BREAK #line 1054 "lex.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); yy_size_t number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { yy_state_type yy_current_state; char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 67 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { int yy_is_jam; char *yy_cp = (yy_c_buf_p); YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 67 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 66); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT static void yyunput (int c, char * yy_bp ) { char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ yy_size_t number_to_move = (yy_n_chars) + 2; char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ yy_size_t yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param _line_number line number * */ void yyset_lineno (int _line_number ) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str ) { yyin = _in_str ; } void yyset_out (FILE * _out_str ) { yyout = _out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 162 "../../../nrn/src/nmodl/lex.l" #ifndef FLEX_SCANNER int input() { int c; c = Getc(); if (c == EOF) { c = 0; } return c; } #endif int unput(c) int c; { return unGetc(c); } int output(c) int c; { #if LINT IGNORE(c); #endif diag("internal error: ", "called output"); return 0; } int yywrap() { return 1; } char * inputtopar() { /* returns string up to and not including * next closing parenthesis */ /* main usage is to read the units string */ char *cp; int c; cp = buf; while ((c = input()) != ')' && c != '\n' && c != 0) { *cp++ = c; } if (c != ')') diag("Syntax error:", " no closing ')'"); *cp = '\0'; unput(c); return stralloc(buf, (char *) 0); } neuron-7.5/src/nmodl/lex.l000077500000000000000000000107271323325274500155600ustar00rootroot00000000000000%{ /* /local/src/master/nrn/src/nmodl/lex.l,v 4.2 1997/11/05 17:59:02 hines Exp */ #include <../../nmodlconf.h> #undef output #undef unput #ifdef FLEX_SCANNER #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ { \ int c = Getc(); \ result = (c==EOF) ? YY_NULL : (buf[0]=c, 1); \ } #else #undef input #endif #include "modl.h" #include "parse1.h" int lexcontext = 0; extern int Getc(); extern int unGetc(); extern int unput(); #define debug(arg1,arg2) /*printf("lex:arg1|%s|\n", arg2);*/ %} D [0-9] E [Ee][-+]?{D}+ %% [a-zA-Z][a-zA-Z0-9_]*'+ { /*PRIME possibly high order*/ char *cp, buf[256]; int i; Symbol *base; /* count the primes and create SCoP name*/ #if __TURBOC__ || SYSV || VMS || defined(MINGW) #define index strchr #endif cp = index(yytext, '\''); i = strlen(yytext) - (cp - yytext); *cp = '\0'; if (i > 1) { Sprintf(buf, "D%d%s", i, yytext); }else{ Sprintf(buf, "D%s", yytext); } /* determine if really a constant */ if ((i = input()) == '0') { Strcat(buf, "0"); yylval.qp = putintoken(buf, NAME); return NAME; }else{ unput(i); } /*create symbol if needed and store in intoken list*/ yylval.qp = putintoken(buf, PRIME); if (SYM(yylval.qp)->type != PRIME) { diag(yytext, " needed as derivative variable"); #if LINT goto yyfussy; #endif } /* the high order prime might not be explicitly declared at this time. But the base state may be an array. If it is, then make the PRIME an array of the same dimension. */ if ((base = lookup(yytext))) { if (base->subtype & ARRAY) { SYM(yylval.qp)->subtype |= ARRAY; SYM(yylval.qp)->araydim = base->araydim; } } return PRIME; } WHILE | IF | ELSE { /* translate to lower case */ char *cp; for (cp = yytext; *cp; cp++) { *cp += 'a' - 'A'; } yylval.qp = putintoken(yytext, NAME); return SYM(yylval.qp)->type; } [a-zA-Z][a-zA-Z0-9_]* { /*NAME*/ Symbol *s; yylval.qp = putintoken(yytext, NAME); s = SYM(yylval.qp); if (s->type == PRIME) diag(yytext, " being used as derivative variable"); return s->type; } {D}+ { /*INTEGER*/ yylval.qp = putintoken(yytext, INTEGER); /* Numbers are not looked for */ return INTEGER; } {D}+"."{D}*({E})? | {D}*"."{D}+({E})? | {D}+{E} { /*REAL*/ yylval.qp = putintoken(yytext, REAL); /* Numbers are not looked for */ return REAL; } \"[^\"]*\" { /* STRING */ yylval.qp = putintoken(yytext, STRING); return STRING; /* can't quote \" */ } \> { yylval.qp = putintoken(yytext, 0); return GT;} \>= { yylval.qp = putintoken(yytext, 0); return GE;} \< { yylval.qp = putintoken(yytext, 0); return LT;} \<= { yylval.qp = putintoken(yytext, 0); return LE;} == { yylval.qp = putintoken(yytext, 0); return EQ;} != { yylval.qp = putintoken(yytext, 0); return NE;} ! { yylval.qp = putintoken(yytext, 0); return NOT;} \&\& { yylval.qp = putintoken(yytext, 0); return AND;} \|\| { yylval.qp = putintoken(yytext, 0); return OR;} \<-\> { yylval.qp = putintoken(yytext, 0); return REACT1;} \~\+ { /* syntactic sugar for equation addition */ yylval.qp = putintoken(yytext, 0); if (lexcontext == NONLINEAR) return NONLIN1; if (lexcontext == LINEAR) return LIN1; diag("equation addition can't occur in this type of block", (char *)0); } \~ { /* syntactic sugar for equations */ yylval.qp = putintoken(yytext, 0); if (lexcontext == NONLINEAR) return NONLIN1; if (lexcontext == LINEAR) return LIN1; if (lexcontext == PARTIAL) return yytext[0]; if (lexcontext == KINETIC) return REACTION; diag("equations can't occur in this type of block", (char *)0); } [ \t] {/*ignore spacing characters*/;} \r\n {/*ignore newline*/} \r {/*ignore newline*/} \n {/*ignore newline*/} :.* {/*ignore inline comments*/;} \?.* {/*ignore inline comments*/;} \{ { yylval.qp = putintoken("{", 0); return yytext[0]; } \} { yylval.qp = putintoken("}", 0); return yytext[0]; } . { yylval.qp = putintoken(yytext, 0); return yytext[0]; } %% #ifndef FLEX_SCANNER int input() { int c; c = Getc(); if (c == EOF) { c = 0; } return c; } #endif int unput(c) int c; { return unGetc(c); } int output(c) int c; { #if LINT IGNORE(c); #endif diag("internal error: ", "called output"); return 0; } int yywrap() { return 1; } char * inputtopar() { /* returns string up to and not including * next closing parenthesis */ /* main usage is to read the units string */ char *cp; int c; cp = buf; while ((c = input()) != ')' && c != '\n' && c != 0) { *cp++ = c; } if (c != ')') diag("Syntax error:", " no closing ')'"); *cp = '\0'; unput(c); return stralloc(buf, (char *) 0); } neuron-7.5/src/nmodl/list.c000077500000000000000000000156261323325274500157350ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/list.c,v 4.2 1998/01/22 18:50:32 hines Exp */ /* list.c,v * Revision 4.2 1998/01/22 18:50:32 hines * allow stralloc with null string (creates empty string) * * Revision 4.1 1997/08/30 20:45:25 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:23:50 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:06:16 hines * proper nocmodl version number * * Revision 1.1.1.1 1994/10/12 17:21:35 hines * NEURON 3.0 distribution * * Revision 9.159 93/02/11 16:55:37 hines * minor mods for NeXT * * Revision 9.78 90/12/10 16:56:39 hines * TABLE allowed in FUNCTION and PROCEDURE * * Revision 9.76 90/12/07 09:27:14 hines * new list structure that uses unions instead of void *element * * Revision 8.1 89/09/29 16:26:03 mlh * ifdef for VMS and SYSV and some fixing of assert * * Revision 8.0 89/09/22 17:26:18 nfh * Freezing * * Revision 7.1 89/09/05 08:07:12 mlh * lappenditem() for use with lists of items which point to items * ITM(q) analogous to SYM(q) * * Revision 7.0 89/08/30 13:31:47 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.0 89/08/14 16:26:30 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.1 89/08/07 15:34:30 mlh * freelist now takes pointer to list pointer and 0's the list pointer. * Not doing this is a bug for multiple sens blocks, etc. * * Revision 4.0 89/07/24 17:02:57 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.1 89/07/07 16:54:16 mlh * FIRST LAST START in independent SWEEP higher order derivatives * * Revision 1.1 89/07/06 14:49:26 mlh * Initial revision * */ /* The following routines support the concept of a list. That is, one can insert at the head of a list or append to the tail of a list with linsert() and lappend(). In addition, one can insert an item before a known item and it will be placed in the proper list. Items point to strings, symbols, etc. Note that more than one item in the same or several lists can point to the same string, symbol. Finally, knowing an item, one can determine the preceding and following items with next() and prev(). Deletion, replacement and moving blocks of items is also supported. */ /* Implementation The list is a doubly linked list. A special item with element 0 is always at the tail of the list and is denoted as the List pointer itself. list->next point to the first item in the list and list->prev points to the last item in the list. i.e. the list is circular Note that in an empty list next and prev points to itself. It is intended that this implementation be hidden from the user via the following function calls. */ #include #include "modl.h" #include "parse1.h" static Item *newitem() { return (Item *)emalloc(sizeof(Item)); } List *newlist() { Item *i; i = newitem(); i->prev = i; i->next = i; i->element.lst = (List *)0; i->itemtype = 0; return (List *)i; } void freelist(plist) /*free the list but not the elements*/ List **plist; { Item *i1, *i2; if (!(*plist)) { return; } for (i1 = (*plist)->next; i1 != *plist; i1 = i2) { i2 = i1->next; Free(i1); } Free(*plist); *plist = (List *)0; } static Item *linkitem(item) Item *item; { Item *i; i = newitem(); i->prev = item->prev; i->next = item; item->prev = i; i->prev->next = i; return i; } #if 0 /*currently unused*/ Item *next(item) Item *item; { assert(item->next->element.lst); /* never return the list item */ return item->next; } Item *prev(item) Item *item; { assert(item->prev->element.lst); /* never return the list item */ return item->prev; } #endif Item *insertstr(item, str) /* insert a copy of the string before item */ /* a copy is made because strings are often assembled into a reusable buffer*/ Item *item; char *str; { Item *i; i = linkitem(item); i->element.str = stralloc(str, (char *)0); i->itemtype = STRING; return i; } Item *insertitem(item, itm) /* insert a item pointer before item */ Item *item, *itm; { Item *i; i = linkitem(item); i->element.itm = itm; i->itemtype = ITEM; return i; } Item *insertlist(item, lst) /* insert a item pointer before item */ Item *item; List *lst; { Item *i; i = linkitem(item); i->element.lst = lst; i->itemtype = LIST; return i; } Item *insertsym(item, sym) /* insert a symbol before item */ /* a copy is not made because we need the same symbol in different lists */ Item *item; Symbol *sym; { Item *i; i = linkitem(item); i->element.sym = sym; i->itemtype = SYMBOL; return i; } Item *linsertstr(list, str) List *list; char *str; { return insertstr(list->next, str); } Item *lappendstr(list, str) List *list; char *str; { return insertstr(list, str); } Item *linsertsym(list, sym) List *list; Symbol *sym; { return insertsym(list->next, sym); } Item *lappendsym(list, sym) List *list; Symbol *sym; { return insertsym(list, sym); } Item *lappenditem(list, item) List *list; Item *item; { return insertitem(list, item); } Item *lappendlst(list, lst) List *list, *lst; { return insertlist(list, lst); } void delete(item) Item *item; { assert(item->itemtype); /* can't delete list */ item->next->prev = item->prev; item->prev->next = item->next; Free(item); } char *emalloc(n) unsigned n; { /* check return from malloc */ char *p; p = malloc(n); if (p == (char *)0) { diag("out of memory", (char *)0); } return p; } char *stralloc(buf, rel) char *buf,*rel; { /* allocate space, copy buf, and free rel */ char *s; if (buf) { s = emalloc((unsigned)(strlen(buf) + 1)); Strcpy(s, buf); }else{ s = emalloc(1); s[0] = '\0'; } if (rel) { Free(rel); } return s; } void deltokens(q1, q2) /* delete tokens from q1 to q2 */ Item *q1, *q2; { /* It is a serious error if q2 precedes q1 */ Item *q; for (q = q1; q != q2;) { q = q->next; delete(q->prev); } delete(q2); } void move(q1, q2, q3) /* move q1 to q2 and insert before q3*/ Item *q1, *q2, *q3; { /* it is a serious error if q2 precedes q1 */ assert(q1 && q2); assert(q1->itemtype && q2->itemtype); q1->prev->next = q2->next; /* remove from first list */ q2->next->prev = q1->prev; q1->prev = q3->prev; q3->prev->next = q1; q3->prev = q2; q2->next = q3; } void movelist(q1, q2, s) /* move q1 to q2 from old list to end of list s*/ Item *q1, *q2; List *s; { move(q1, q2, s); } void replacstr(q, s) Item *q; char *s; { q->itemtype = STRING; q->element.str = stralloc(s, (char *)0); } Item *putintoken(s, type) char *s; short type; { /* make sure a symbol exists for s and append to intoken list */ Symbol *sym; if (s == (char *)0) diag("internal error"," in putintoken"); switch (type) { case STRING: case REAL: case INTEGER: return insertstr(intoken, s); default: if ((sym = lookup(s)) == SYM0) { sym = install(s, type); } break; } return insertsym(intoken, sym); } neuron-7.5/src/nmodl/macnmodl.h000077500000000000000000000004321323325274500165460ustar00rootroot00000000000000#pragma precompile_target "nmodl_def.h" #define MSL_USE_PRECOMPILED_HEADERS 1 #include #include #include #include #pragma once off #define SYSV 1 #define MAC 1 #define NMODL 1 #define NOCMODL 1 #define VECTORIZE 1 #define CVODE 1 neuron-7.5/src/nmodl/modl.c000077500000000000000000000145171323325274500157130ustar00rootroot00000000000000#include <../../nmodlconf.h> /* * int main(int argc, char *argv[]) --- returns 0 if translation is * successful. Diag will exit with 1 if error. * * ---The overall strategy of the translation consists of three phases. * * 1) read in the whole file as a sequence of tokens, parsing as we go. Most of * the trivial C translation such as appending ';' to statements is performed * in this phase as is the creation of the symbol table. Item lists maintain * the proper token order. Ater a whole block is read in, nontrivial * manipulation may be performed on the entire block. * * 2) Some blocks and statements can be manipulated only after the entire file * has been read in. The solve statement is an example since it can be * analysed only after we know what is the type of the associated block. The * kinetic block is another example whose translation depends on the SOLVE * method and so cannot be processed until the whole input file has been * read. * * 3) Output the lists. * * void openfiles(int argc, char *argv[]) parse the argument list, and open * files. Print usage message and exit if no argument * */ /* * In order to interface this process with merge, a second argument is * allowed which gives the complete input filename. The first argument * still gives the prefix of the .c and .var files. */ /* the first arg may also be a file.mod (containing the .mod suffix)*/ #if MAC #include #endif #if HAVE_STDLIB_H #include #endif #include "modl.h" FILE * fin, /* input file descriptor for filename.mod */ /* or file2 from the second argument */ *fparout, /* output file descriptor for filename.var */ *fcout; /* output file descriptor for filename.c */ #if SIMSYS FILE *fctlout, /* filename.ctl */ *fnumout; /* filename.num */ #endif char *modprefix, prefix_[NRN_BUFSIZE]; /* the first argument */ char finname[NRN_BUFSIZE]; /* filename.mod or second argument */ #if LINT char *clint; int ilint; Item *qlint; #endif extern int yyparse(); #if NMODL && VECTORIZE extern int vectorize; extern int numlist; extern char* nmodl_version_; extern int usederivstatearray; #endif /*SUPPRESS 763*/ static char pgm_name[] = "nmodl"; extern char *RCS_version; extern char *RCS_date; static void openfiles(); int main(argc, argv) int argc; char *argv[]; { /* * arg 1 is the prefix to the input file and output .c and .par * files * We first look for a .mrg file and then a .mod file */ #if NMODL if (argc > 1 && strcmp(argv[1], "--version") == 0) { printf("%s\n", nmodl_version_); exit(0); } #endif #if MAC SIOUXSettings.asktosaveonclose = false; #if !SIMSYS Fprintf(stderr, "%s %s %s\n", pgm_name, RCS_version, RCS_date); #endif #endif modprefix = prefix_; init(); /* keywords into symbol table, initialize * lists, etc. */ #if MAC modl_units(); /* since we will be changing the cwd */ mac_cmdline(&argc, &argv); { char cs[NRN_BUFSIZE], *cp; strncpy(cs, argv[1], NRN_BUFSIZE); cp = strrchr(cs, ':'); if (cp) { *cp = '\0'; if (chdir(cs) == 0) { printf("current directory is \"%s\"\n", cs); strcpy(argv[1], cp+1); } } } #endif openfiles(argc, argv); /* .mrg else .mod, .var, .c */ #if NMODL || HMODL Fprintf(stderr, "Translating %s into %s.c\n", finname, modprefix); #else #if !SIMSYS Fprintf(stderr, "Translating %s into %s.c and %s.var\n", finname, modprefix, modprefix); #endif #endif IGNORE(yyparse()); /* * At this point all blocks are fully processed except the kinetic * block and the solve statements. Even in these cases the * processing doesn't involve syntax since the information is * held in intermediate lists of specific structure. * */ /* * go through the list of solve statements and construct the model() * code */ solvhandler(); netrec_discon(); /* * NAME's can be used in many cases before they were declared and * no checking up to this point has been done to make sure that * names have been used in only one way. * */ consistency(); #if 0 && !_CRAY && NMODL && VECTORIZE /* allowing Kinetic models to be vectorized on cray. So nonzero numlist is no longer adequate for saying we can not */ if (numlist) { vectorize = 0; } #endif chk_thread_safe(); parout(); /* print .var file. * Also #defines which used to be in defs.h * are printed into .c file at beginning. */ c_out(modprefix); /* print .c file */ #if HMODL || NMODL #else IGNORE(fclose(fparout)); #endif #if SIMSYS IGNORE(fclose(fctlout)); IGNORE(fclose(fnumout)); #endif IGNORE(fclose(fcout)); #if NMODL && VECTORIZE if (vectorize) { Fprintf(stderr, "Thread Safe\n"); } if (usederivstatearray) { fprintf(stderr, "Derivatives of STATE array variables are not translated correctly and compile time errors will be generated.\n"); fprintf(stderr, "The %s.c file may be manually edited to fix these errors.\n", modprefix); } #endif #if LINT { /* for lex */ extern int yytchar, yylineno; extern FILE *yyin; IGNORE(yyin); IGNORE(yytchar); IGNORE(yylineno); IGNORE(yyinput()); yyunput(ilint); yyoutput(ilint); } #endif #if MAC printf("Done\n"); SIOUXSettings.autocloseonquit = true; #endif return 0; } static void openfiles(argc, argv) int argc; char *argv[]; { char s[NRN_BUFSIZE]; char *cp; if (argc > 1) { sprintf(modprefix, "%s", argv[1]); cp = strstr(modprefix, ".mod"); if (cp) { *cp = '\0'; } } if (argc == 2) { Sprintf(finname, "%s.mrg", modprefix); } else if (argc == 3) { Sprintf(finname, "%s", argv[2]); } else { diag("Usage:", "modl prefixto.mod [inputfile]"); } if ((fin = fopen(finname, "r")) == (FILE *) 0) { Sprintf(finname, "%s.mod", modprefix); if ((fin = fopen(finname, "r")) == (FILE *) 0) { diag("Can't open input file: ", finname); } } #if HMODL || NMODL #else Sprintf(s, "%s.var", modprefix); if ((fparout = fopen(s, "w")) == (FILE *) 0) { diag("Can't create variable file: ", s); } #endif Sprintf(s, "%s.c", modprefix); if ((fcout = fopen(s, "w")) == (FILE *) 0) { diag("Can't create C file: ", s); } #if SIMSYS Sprintf(s, "%s.ctl", modprefix); if ((fctlout = fopen(s, "w")) == (FILE *) 0) { diag("Can't create variable file: ", s); } Sprintf(s, "%s.num", modprefix); if ((fnumout = fopen(s, "w")) == (FILE *) 0) { diag("Can't create C file: ", s); } #endif } neuron-7.5/src/nmodl/modl.h000077500000000000000000000242241323325274500157140ustar00rootroot00000000000000 #include #if HAVE_STRING_H #include #else #include #endif #include /*- The central data structure throughout modl is the list. Items can be inserted before a known item, inserted at the head of a list, or appended to the tail of a list. Items can be removed from a list. Lists can contain mixed types of items. Often an item which was an input token is edited and replaced by a string. The main types of items are strings and symbols. Lists used are: intoken Everytime the lexical analyser reads an input token it is placed in this list. Much translation to C takes place during parsing and most of that editing is done in this list. After an entire block is processed, the tokens are moved as a group to another list. initfunc main body of initmodel() from INITIAL. Automatic statements of the form state = state0 are constructed here. constructorfunc statements added to tail of allocation function destructorfunc statements executed when POINT_PROCESS destroyed termfunc main body of terminal() from TERMINAL modelfunc main body of model() from EQUATION. SOLVE statements in the equation block get expanded in this list procfunc all remaining blocks get concatenated to this list. It also gets the declarations. By prepending to procfunc, one can guarantee that a declaration precedes usage. initlist automatically generated statements that are to be executed only once are constructed here. Contains setup of slist's and dist's, etc. i.e. setup of indirect pointer lists to state groups. Other lists (not global) but used in several files are: symlist[] symbol table. One list for every beginning ascii character. see symbol.c and symbol.h. See the Symbol structure below. symlistlist for a stack of local symbol lists for LOCAL variables. Local variable 'name' is translated as _lname so that there can be no conflict with the 'p' array. syminorder Maintains order of variable declarations in the input file. Used to get good order in the .var file. firstlist Statements that must appear before anything else in the .c file. The only usage at this time is declaration of LOCAL variables outside of blocks. plotlist variables to be plotted on first entry to scop Other lists used for local or very specific purposes are: indeplist Independent variable info. parmlist parameters in a SENS statement statelist states used in a block containing a SENS statement sensinfo see sens.c senstmt see sens.c solvq Item location and method stored when SOLVE statement occurs. Solve statements are processed after all input is read. eqnq Linear equations assembled using this list. Kinetic.c should be modified to make uniform use of List's instead of special structures for Reaction, Rlist, etc. */ /* For char buffers that might be called on to hold long path names */ /* Note that paths can exceed MAX_PATH from on some systems */ #define NRN_BUFSIZE 8192 #include #if MAX_PATH > NRN_BUFSIZE #undef NRN_BUFSIZE #define NRN_BUFSIZE MAX_PATH #endif typedef struct Item List; /* list of mixed items */ typedef struct Item { short itemtype; union { struct Item *itm; List *lst; char *str; struct Symbol *sym; } element; /* pointer to the actual item */ struct Item *next; struct Item *prev; } Item; #define ITEM0 (Item *)0 #define LIST0 (List *)0 #define ITERATE(itm,lst) for (itm = (lst)->next; itm != (lst); itm = itm->next) /*- The symbol structure gives info about tokens. Not all tokens need all elements. Eg. the STRING uses only type and name. Much storage could be saved and much greater clarity could be attained if each type had its own sub stucture. Currently many of the structure elements serve very different purposes depending on the type. The following is a list of the current element usage: type token number from parse1.y subtype see definitions below u.i integration method - flag for variable step equation block - function number for generating variables u.str scop variables - max,min,units for .var file used state variable - temporary flag that it is used in an equation equation block - number of state variables used (# unknowns) in parout.c - the numeric order in the .var file. Generated and used in parout.c for the plotlist. usage a token is used as a variable (DEP) or function (FUNC) Another field, EXPLICIT_DECL, is used to determine if a variable appears in the input file or is automatically created, thus helping to organize the .var file. araydim arrays - dimension discdim discrete variable - dimension varnum state variable - during processing of a block containing equations in which simultaneous equations result; column number of state variable in the matrix. level lowest submodel level number for declarations of this symbol. Used for parameters ( in explicit_decl()). The default value is 100. name token name */ typedef struct Symbol { short type; long subtype; #if NMODL short nrntype; short assigned_to_; int no_threadargs; /* introduced for FUNCTION_TABLE table_name */ #if CVODE int* slist_info_; /* blunt instrument for retrieving ion concentration slist value */ #endif int ioncount_; /* ppvar index for ions */ #endif union { int i; char *str; } u; int used; int usage; int araydim; int discdim; int varnum; /* column number of state variable in * equations */ short level; char *name; } Symbol; #define SYM0 (Symbol *)0 /* * this is convenient way to get the element pointer if you know what type * the item is */ #define SYM(q) ((q)->element.sym) #define STR(q) ((q)->element.str) #define ITM(q) ((q)->element.itm) #define LST(q) ((q)->element.lst) /* types not defined in parser */ #define SPECIAL 1 #define SYMBOL 1 #define ITEM 2 #define LIST 3 /* * An item type, STRING is also used as an item type * An item type, VERBATIM is also used as an item type which is to be * treated the same as a STRING but with no prepended space on output. */ /* subtypes */ #define KEYWORD 01 #define PARM 02 #define INDEP 04 #define DEP 010 /* also in usage field */ #define STAT 020 #define ARRAY 040 #define FUNCT 0100 /* also in usage field */ #define PROCED 0200 #define NEGATIVE 0400 #define SEMI 01 /* ";" */ #define BEGINBLK 02 /* "{" */ #define ENDBLK 04 /* "}" */ #define DERF 01000 #define KINF 02000 #define NLINF 04000 #define DISCF 010000 #define STEP1 020000 #define PARF 040000 #define EXTDEF 0100000 #define LINF 0200000 #define UNITDEF 0400000L #define EXTDEF2 01000000L /* functions that can take array or function name arguments */ #define nmodlCONST 02000000L /* constants that do not appear in .var file */ #define EXTDEF3 04000000L /* get two extra reset arguments at beginning */ #define INTGER 010000000L /* must be cast to double in expr */ #define EXTDEF4 020000000L /* get extra NrnThread* arg at beginning */ #define EXTDEF5 040000000L /* not threadsafe from the extdef list */ #define EXPLICIT_DECL 01 /* usage field, variable occurs in input file */ extern char *emalloc(), /* malloc with out of space checking */ *stralloc(), /* copies string to new space */ *inputline(), /* used only by parser to get title line */ *inputtopar(), /* used only by parser to get units */ *Gets(); /* used only in io.c to get string from fin. */ #if 0 #if __TURBOC__ || SYSV || NeXT || LINUX #else extern char *sprintf(); #endif #endif extern List *newlist(), /* begins new empty list */ *inputtext(); /* used by parser to get block text from * VERBATIM and COMMENT */ extern Item *putintoken(), /* construct symbol and store input tokens */ *insertstr(), /* before a known Item */ *insertsym(), *linsertstr(), /* prepend to list */ *lappendstr(), /* append to list */ *linsertsym(), *lappendsym(), *lappenditem(), *lappendlst(), *next(), /* not used but should be instead of q->next */ *prev(); extern Symbol *install(), /* Install token in symbol table */ *lookup(), /* lookup name in symbol table */ *copylocal(), /* install LOCAL variable symbol */ *ifnew_parminstall(); /* new .var info only if * not already done. */ #include "nmodlfunc.h" extern char finname[], /* the input file prefix */ buf[]; /* general purpose temporary buffer */ extern List *intoken, /* Main list of input tokens */ *initfunc, /* see discussion above */ *constructorfunc, *destructorfunc, *modelfunc, *termfunc, *procfunc, *initlist, *firstlist, *plotlist; extern FILE *fin, /* .mod input file descriptor */ *fparout, /* .var file */ *fcout; /* .c file */ extern Symbol *semi, /* ';'. When seen on output, causes newline */ *beginblk, /* '{'. Used for rudimentary indentation */ *endblk; /* on output. */ extern void printlist(List*); /* the following is to get lint to shut up */ #if LINT #undef assert #define assert(arg) {if (arg) ;} /* so fprintf doesn't give lint */ extern char *clint; extern int ilint; extern Item *qlint; #define Sprintf clint = sprintf #define Fprintf ilint = fprintf #define Fclose ilint = fclose #define Fflush ilint = fflush #define Printf ilint = printf #define Strcpy clint = strcpy #define Strcat clint = strcat #define Insertstr qlint = insertstr #define Insertsym qlint = insertsym #define Linsertsym qlint = linsertsym #define Linsertstr qlint = linsertstr #define Lappendsym qlint = lappendsym #define Lappendstr qlint = lappendstr #define Lappenditem qlint = lappenditem #define Lappendlst qlint = lappendlst #define IGNORE(arg) {if (arg);} #define Free(arg) free((char *)(arg)) #else #define Sprintf sprintf #define Fprintf fprintf #define Fclose fclose #define Fflush fflush #define Printf printf #define Strcpy strcpy #define Strcat strcat #define Insertstr insertstr #define Insertsym insertsym #define Linsertsym linsertsym #define Linsertstr linsertstr #define Lappendsym lappendsym #define Lappendstr lappendstr #define Lappenditem lappenditem #define Lappendlst lappendlst #define IGNORE(arg) arg #define Free(arg) free((void *)(arg)) #endif neuron-7.5/src/nmodl/netrec_discon.c000066400000000000000000000166541323325274500176000ustar00rootroot00000000000000/* NET_RECEIVE discontinuities for STATE variables are correct for the variable time step method but, for better numerical accuracy, should be adjusted for the fixed step method. That is, for secondorder=2, STATE variable discontinuites should be calculated as the change in state at t+dt/2 instead of the full weight discontinuity at t. For the implicit method secondorder=0, the change in state should also be calculated at t+dt/2. For the vast majority of cases, DERIVATIVE block with METHOD cnexp, the performance cost is minimal and the adjustment factor is just fac = 1 / (1 + rate*dt/2) where rate = ds'/ds. Note that if the choice of cnexp is valid, s' depends only on s and is linear. dt is just replaced by dt/2. Problems with this in general are of 3 kinds. 1) If all parameters of the equations are constant, best performance would be obtained by precalculating the factors. It is possible to generalize this precalculation to linear coupled DERIVATIVE and KINETIC equations. However, precalculation is not valid if the parameters change during a simulation (e.g. voltage sensitive rates are common, though not in synapse models). 2) Sometimes in DERIVATIVE blocks, state independent terms involving functions or several factors use local variable assignment to simplify the cnexp formula. Of course, the local value calculation that provides the value of rate, is not available in the NET_RECEIVE block. Here again, one can imagine voltage sensitive rate functions and also some equations written in linearized uncoupled form so that cnexp can be used. 3) Coupled and or nonlinear equations should properly use a jacobian formulation since a discontinuity of a single state at t may distribute among several states when evaluated at t+dt. At present we do not take advantage of precalculation of factors. The standard case is cnexp with rate computable within the NET_RECEIVE block. I.e rate involves only RANGE variables and no LOCAL variables. Note that rate is already calculated in solve.c and is given in the cnexp_rate list as a string. That has to be parsed to check that it satisfies our requirements for computability in the NET_RECEIVE block Although best performance for the cnexp case is comes from the rate factor, cnexp in general allows s' = a + b*s which requires a different factor if a is nonzero or b is zero. For simplicity, we use the full exponetial expression to evaluate the discontinuity of s(t) at t+dt/2. For the general case, i.e. the standard case is insufficient, we evaluate the dstate/dt vector for DERIVATIVE and KINETIC blocks (ie. via a call to the model instance cvode specfic _ode_spec1 function) at the current state and with a small change to the discontinuous state and use ds'/ds to calculate the relevant change to the several states. The typical case here is A -> B -> 0 where A is discontinuous on receipt of an event. Note that no Jacobian inversion is envisioned so that only dsi/dt that is affected by sj will change si. */ #include <../../nmodlconf.h> #include #include #include "modl.h" #include "parse1.h" extern int vectorize; extern int cvode_not_allowed; extern List* netrec_cnexp; /* STATE symbol and cnexp expr pairs */ static List* info; static void general_discon_adjust(Item* varname, Item* equal, Item* expr, Item* lastok); int netrec_state_count; /* 10*numeqn + listnum */ int netrec_need_v; /* if 1 then need it for the general case */ int netrec_need_thread; /* if 1 then _cvode_sparse_thread needs proper _thread */ /* store statement info */ void netrec_asgn(Item* varname, Item* equal, Item* expr, Item* lastok) { Symbol* sym; sym = SYM(varname); if (sym->type == NAME && sym->subtype & STAT) { /* STATE discontinuity adjusted if fixed step method */ if (!info) { info = newlist(); } lappenditem(info, varname); lappenditem(info, equal); lappenditem(info, expr); lappenditem(info, lastok); } } static void netrec_discon1(Item* varname, Item* equal, Item* expr, Item* lastok) { Item* q; Symbol* sym = SYM(varname); char* cnexp = NULL; int case_cnexp = 1; #if 0 printf("NET_RECEIVE discontinuity for %s\n", sym->name); #endif if (netrec_cnexp) ITERATE(q, netrec_cnexp) { if (SYM(q) == sym) { cnexp = STR(q->next); break; } q = q->next; } if (cnexp) { /* if there is a local variable involved then use the general case */ if (strstr(cnexp, " _l")) { /* interior begin token */ case_cnexp = 0; } }else{ /* if not processed by cnexp then use the general case */ case_cnexp = 0; } #if 0 printf("cnexp is |%s|\n", cnexp ? cnexp : "NULL"); if (cnexp && !case_cnexp) { printf("because of local variable, use the general case\n"); }else if (!cnexp) { printf("because not cnexp, use the general case\n"); } for (q = varname; q != lastok; q = q->next) { debugprintitem(q); } #endif if (case_cnexp) { char* state = items_as_string(varname, equal); char* e = items_as_string(expr, lastok->prev); sprintf(buf, " if (nrn_netrec_state_adjust && !cvode_active_){\n" " /* discon state adjustment for cnexp case (rate uses no local variable) */\n" " double __state = %s;\n" " double __primary = (%s) - __state;\n" " %s;\n" " %s += __primary;\n" " } else {\n", state, e, cnexp, state); insertstr(varname, buf); insertstr(lastok, " }\n"); free(state); free(e); } else { /* the general case */ general_discon_adjust(varname, equal, expr, lastok); } } void netrec_discon() { Item* q; if (info) { ITERATE(q, info) { Item* varname = ITM(q); q = q->next; Item* equal = ITM(q); q = q->next; Item* expr = ITM(q); q = q->next; Item* lastok = ITM(q)->next->next; netrec_discon1(varname, equal, expr, lastok); } } } static void general_discon_adjust(Item* varname, Item* equal, Item* expr, Item* lastok) { int listnum = netrec_state_count%10; int neq = netrec_state_count/10; int i; Symbol* sym = SYM(varname); int sindex; if (cvode_not_allowed) { fprintf(stderr, "Notice: %s discontinuity adjustment not available.\n", sym->name); return; } sindex = slist_search(listnum, sym); #if 0 printf("general_discon_adjust listnum=%d sindex=%d neq=%d\n", listnum, sindex, neq); #endif char* state = items_as_string(varname, equal); char* e = items_as_string(expr, lastok->prev); char* needv; char* needthread; if (netrec_need_v) { needv = strdup(" v = NODEV(_pnt->node);\n"); }else{ needv = strdup(""); } if (netrec_need_thread && vectorize) { needthread = strdup("#if NRN_VECTORIZED\n _thread = _nt->_ml_list[_mechtype]->_thread;\n#endif\n"); }else{ needthread = strdup(""); } sprintf(buf, " if (nrn_netrec_state_adjust && !cvode_active_){\n" " /* discon state adjustment for general derivimplicit and KINETIC case */\n" " int __i, __neq = %d;\n" " double __state = %s;\n" " double __primary_delta = (%s) - __state;\n" " double __dtsav = dt;\n" " for (__i = 0; __i < __neq; ++__i) {\n" " _p[_dlist%d[__i]] = 0.0;\n" " }\n" " _p[_dlist%d[%d]] = __primary_delta;\n" " dt *= 0.5;\n" "%s%s" " _ode_matsol_instance%d(_threadargs_);\n" " dt = __dtsav;\n" " for (__i = 0; __i < __neq; ++__i) {\n" " _p[_slist%d[__i]] += _p[_dlist%d[__i]];\n" " }\n" " } else {\n", neq, state, e, listnum, listnum, sindex, needv, needthread, listnum, listnum, listnum); insertstr(varname, buf); insertstr(lastok, " }\n"); free(state); free(e); free(needv); free(needthread); } neuron-7.5/src/nmodl/nmodl.mak000077500000000000000000000016141323325274500164110ustar00rootroot00000000000000# This is set up to make nocmodl # to make hmodl do a # del *.o # and change the BNAME, CFLAGS, and OBJ def cc = gcc BIN = /cygdrive/c/nrn/bin BNAME = $(BIN)/nocmodl.exe #BNAME = $(BIN)/hmodl.exe NFLAGS = -DNMODL=1 -DNOCMODL=1 -DVECTORIZE=1 -DCVODE=1 -I. HFLAGS = -DHMODL=1 CFLAGS = -DWIN32=1 $(NFLAGS) #CFLAGS = $(HFLAGS) HOBJ = \ cout.o \ hparout.o NOBJ = \ noccout.o \ nocpout.o \ diffeq.o OBJ = \ $(NOBJ) \ parse1.o \ consist.o \ deriv.o \ discrete.o \ init.o \ io.o \ kinetic.o \ lex.o \ list.o \ modl.o \ parsact.o \ partial.o \ sens.o \ simultan.o \ solve.o \ symbol.o \ units.o \ version.o .c.o: $(cc) -c $(CFLAGS) $*.c $(BNAME): $(OBJ) $(cc) -o $(BNAME) $(OBJ) -lm #$(cc) -c $(CFLAGS) -I../modlunit -DNHOME="$(NEURONHOME)" ../modlunit/units.c units.o: ../modlunit/units.c ../modlunit/units.h $(cc) -c $(CFLAGS) -I../modlunit ../modlunit/units.c clean: rm *.o neuron-7.5/src/nmodl/nmodlfunc.h000066400000000000000000000060761323325274500167500ustar00rootroot00000000000000int in_solvefor(); int cvode_cnexp_success(); void cvode_parse(); void Unit_push(); void unit_pop(); void unit_div(); void install_units(); void modl_units(); void vectorize_if_else_stmt(); void consistency(); void c_out(const char* prefix); void printlist(); void c_out_vectorize(); void vectorize_substitute(); void vectorize_do_substitute(); void solv_diffeq(); void add_deriv_imp_list(); void deriv_used(); void massagederiv(); void matchinitial(); void matchbound(); void checkmatch(); void matchmassage(); void copyitems(); void disc_var_seen(); void massagediscblk(); void init_disc_vars(); void init(); void inblock(); void unGets(); void diag(); void enquextern(); void include_file(); void reactname(); void leftreact(); void massagereaction(); void flux(); void massagekinetic(); void fixrlst(); void kinetic_intmethod(); void genfluxterm(); void kinetic_implicit(); void massageconserve(); void check_block(); void massagecompart(); void massageldifus(); void kin_vect1(); void kin_vect2(); void kin_vect3(); void ostmt_start(); void see_astmt(); void see_ostmt(); void prn(); void cvode_kinetic(); void single_channel(); void freelist(); void delete(); void deltokens(); void move(); void movelist(); void replacstr(); void c_out(); void printitem(); void debugprintitem(); void printlist(); void c_out_vectorize(); void vectorize_substitute(); void vectorize_do_substitute(); void nrninit(); void parout(); void warn_ignore(); void ldifusreg(); void decode_ustr(); void units_reg(); void nrn_list(); void bablk(); void nrn_use(); void nrn_var_assigned(); void slist_data(); void out_nt_ml_frag(); void cvode_emit_interface(); void cvode_proced_emit(); void cvode_interface(); void cvode_valid(); void cvode_rw_cur(); void net_receive(); void net_init(); void fornetcon(); void chk_thread_safe(); void threadsafe_seen(); void explicit_decl(); void parm_array_install(); void parminstall(); void steppedinstall(); void indepinstall(); void depinstall(); void statdefault(); void vectorize_scan_for_func(); void defarg(); void lag_stmt(); void queue_stmt(); void add_reset_args(); void add_nrnthread_arg(); void check_tables(); void table_massage(); void hocfunchack(); void hocfunc(); void vectorize_use_func(); void function_table(); void watchstmt(); void threadsafe(); void nrnmutex(); void solv_partial(); void partial_eqn(); void massagepartial(); void partial_bndry(); void sensparm(); void add_sens_statelist(); void sensmassage(); void sens_nonlin_out(); void solv_nonlin(); void solv_lineq(); void eqnqueue(); void massagenonlin(); void init_linblk(); void init_lineq(); void lin_state_term(); void linterm(); void massage_linblk(); void solvequeue(); void solvhandler(); void save_dt(); void symbol_init(); void pushlocal(); void poplocal(); void conductance_hint(int blocktype, Item* q1, Item* q2); void possible_local_current(int blocktype, List* symlist); Symbol* breakpoint_current(Symbol* s); void netrec_asgn(Item* varname, Item* equal, Item* expr, Item* lastok); void netrec_discon(); char* items_as_string(Item* begin, Item* last); /* does not include last */ int slist_search(int listnum, Symbol* s); neuron-7.5/src/nmodl/noccout.c000077500000000000000000000635121323325274500164310ustar00rootroot00000000000000#include <../../nmodlconf.h> /* print the .c file from the lists */ #include "modl.h" #include "parse1.h" #include "symbol.h" #define CACHEVEC 1 extern char* nmodl_version_; #define P(arg) fputs(arg, fcout) List *procfunc, *initfunc, *modelfunc, *termfunc, *initlist, *firstlist; /* firstlist gets statements that must go before anything else */ #if NMODL List *nrnstate; extern List *currents, *set_ion_variables(), *get_ion_variables(); extern List *begin_dion_stmt(), *end_dion_stmt(); extern List* conductance_; static void conductance_cout(); #endif extern Symbol *indepsym; extern List *indeplist; extern List *match_bound; extern List *defs_list; extern char *saveindep; char *modelline; extern int brkpnt_exists; extern int artificial_cell; extern int net_receive_; extern int debugging_; extern int point_process; extern int dtsav_for_nrn_state; #if CVODE extern Symbol* cvode_nrn_cur_solve_; extern Symbol* cvode_nrn_current_solve_; extern List* state_discon_list_; #endif /* VECTORIZE has not been optional for years. We leave the define there but */ /* we no longer update the #else clauses. */ #if VECTORIZE extern int vectorize; static List *vectorize_replacements; /* pairs of item pointer, strings */ extern char* cray_pragma(); extern int electrode_current; /* 1 means we should watch out for extracellular and handle it correctly */ #endif #if __TURBOC__ || SYSV || VMS #define index strchr #endif static void initstates(); static void funcdec(); static void ext_vdef() { if (artificial_cell) { return; } if (electrode_current) { P("#if EXTRACELLULAR\n"); P(" _nd = _ml->_nodelist[_iml];\n"); P(" if (_nd->_extnode) {\n"); P(" _v = NODEV(_nd) +_nd->_extnode->_v[0];\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); #if CACHEVEC == 0 P(" _v = NODEV(_nd);\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" _v = VEC_V(_ni[_iml]);\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" _nd = _ml->_nodelist[_iml];\n"); P(" _v = NODEV(_nd);\n"); P(" }\n"); #endif P(" }\n"); }else{ #if CACHEVEC == 0 P(" _nd = _ml->_nodelist[_iml];\n"); P(" _v = NODEV(_nd);\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" _v = VEC_V(_ni[_iml]);\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" _nd = _ml->_nodelist[_iml];\n"); P(" _v = NODEV(_nd);\n"); P(" }\n"); #endif } } /* when vectorize = 0 */ void c_out(const char* prefix) { #if NMODL Item *q; #endif Fprintf(fcout, "/* Created by Language version: %s */\n", nmodl_version_); Fflush(fcout); #if VECTORIZE if (vectorize) { vectorize_do_substitute(); kin_vect2(); /* heh, heh.. bet you can't guess what this is */ c_out_vectorize(prefix); return; } #endif #if VECTORIZE P("/* NOT VECTORIZED */\n#define NRN_VECTORIZED 0\n"); #endif Fflush(fcout); /* things which must go first and most declarations */ #if SIMSYS P("#include \n#include \n#include \n#include \"mathlib.h\"\n"); P("#include \"common.h\"\n#include \"softbus.h\"\n"); P("#include \"sbtypes.h\"\n#include \"Solver.h\"\n"); #else P("#include \n#include \n#include \n#include \"scoplib_ansi.h\"\n"); P("#undef PI\n"); P("#define nil 0\n"); P("#include \"md1redef.h\"\n"); P("#include \"section.h\"\n"); P("#include \"nrniv_mf.h\"\n"); P("#include \"md2redef.h\"\n"); #endif printlist(defs_list); printlist(firstlist); P("static int _reset;\n"); #if NMODL P("static "); #endif if (modelline) { Fprintf(fcout, "char *modelname = \"%s\";\n\n", modelline); } else { Fprintf(fcout, "char *modelname = \"\";\n\n"); } Fflush(fcout); /* on certain internal errors partial output * is helpful */ P("static int error;\n"); #if NMODL P("static "); #endif P("int _ninits = 0;\n"); P("static int _match_recurse=1;\n"); #if NMODL P("static void "); #endif P("_modl_cleanup(){ _match_recurse=1;}\n"); /* * many machinations are required to make the infinite number of * definitions involving _p in defs.h to be invisible to the user */ /* * This one allows scop variables in functions which do not have the * p array as an argument */ #if SIMSYS || HMODL || NMODL #else P("static double *_p;\n\n"); #endif funcdec(); Fflush(fcout); /* * translations of named blocks into functions, procedures, etc. Also * some special declarations used by some blocks */ printlist(procfunc); Fflush(fcout); /* Initialization function must always be present */ #if NMODL P("\nstatic void initmodel() {\n int _i; double _save;"); #endif #if SIMSYS || HMODL P("\ninitmodel() {\n int _i; double _save;"); #endif #if (!(SIMSYS || HMODL || NMODL)) P("\ninitmodel(_pp) double _pp[]; {\n int _i; double _save; _p = _pp;"); #endif #if !NMODL P("_initlists();\n"); #endif P("_ninits++;\n"); P(saveindep); /*see solve.c; blank if not a time dependent process*/ P("{\n"); initstates(); printlist(initfunc); if (match_bound) { P("\n_init_match(_save);"); } P("\n}\n}\n"); Fflush(fcout); #if NMODL /* generation of initmodel interface */ #if VECTORIZE P("\nstatic void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){\n"); P("Node *_nd; double _v; int* _ni; int _iml, _cntml;\n"); P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n"); #else P("\nstatic nrn_init(_prop, _v) Prop *_prop; double _v; {\n"); P(" _p = _prop->param; _ppvar = _prop->dparam;\n"); #endif if (debugging_ && net_receive_) { P(" _tsav = -1e20;\n"); } if (!artificial_cell) {ext_vdef();} if (!artificial_cell) {P(" v = _v;\n");} printlist(get_ion_variables(1)); P(" initmodel();\n"); printlist(set_ion_variables(2)); #if VECTORIZE P("}}\n"); #else P("}\n"); #endif /* standard modl EQUATION without solve computes current */ P("\nstatic double _nrn_current(double _v){double _current=0.;v=_v;"); #if CVODE if (cvode_nrn_current_solve_) { fprintf(fcout, "if (cvode_active_) { %s(); }\n", cvode_nrn_current_solve_->name); } #endif P("{"); if (currents->next != currents) { printlist(modelfunc); } ITERATE(q, currents) { Sprintf(buf, " _current += %s;\n", SYM(q)->name); P(buf); } P("\n} return _current;\n}\n"); /* For the classic BREAKPOINT block, the neuron current also has to compute the dcurrent/dv as well as make sure all currents accumulated properly (currents list) */ if (brkpnt_exists) { P("\nstatic void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type){\n"); P("Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml;\n"); P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n"); ext_vdef(); if (currents->next != currents) { printlist(get_ion_variables(0)); #if CVODE cvode_rw_cur(buf); P(buf); } if (cvode_nrn_cur_solve_) { fprintf(fcout, "if (cvode_active_) { %s(); }\n", cvode_nrn_cur_solve_->name); } if (currents->next != currents) { #endif P(" _g = _nrn_current(_v + .001);\n"); printlist(begin_dion_stmt()); if (state_discon_list_) { P(" state_discon_flag_ = 1; _rhs = _nrn_current(_v); state_discon_flag_ = 0;\n"); }else{ P(" _rhs = _nrn_current(_v);\n"); } printlist(end_dion_stmt(".001")); P(" _g = (_g - _rhs)/.001;\n"); /* set the ion variable values */ printlist(set_ion_variables(0)); if (point_process) { P(" _g *= 1.e2/(_nd_area);\n"); P(" _rhs *= 1.e2/(_nd_area);\n"); } if (electrode_current) { #if CACHEVEC == 0 P(" NODERHS(_nd) += _rhs;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_RHS(_ni[_iml]) += _rhs;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" NODERHS(_nd) += _rhs;\n"); P(" }\n"); P(" if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_rhs[_ni[_iml]] += _rhs; }\n"); #endif P("#if EXTRACELLULAR\n"); P(" if (_nd->_extnode) {\n"); P(" *_nd->_extnode->_rhs[0] += _rhs;\n"); P(" }\n"); P("#endif\n"); }else{ #if CACHEVEC == 0 P(" NODERHS(_nd) -= _rhs;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_RHS(_ni[_iml]) -= _rhs;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" NODERHS(_nd) -= _rhs;\n"); P(" }\n"); #endif } } P(" \n}}\n"); /* for the classic breakpoint block, nrn_cur computed the conductance, _g, and now the jacobian calculation merely returns that */ P("\nstatic void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type){\n"); P("Node *_nd; int* _ni; int _iml, _cntml;\n"); P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml];\n"); if (electrode_current) { P(" _nd = _ml->_nodelist[_iml];\n"); #if CACHEVEC == 0 P(" NODED(_nd) -= _g;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_D(_ni[_iml]) -= _g;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" NODED(_nd) -= _g;\n"); P(" }\n"); P(" if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_d[_ni[_iml]] -= _g; }\n"); #endif P("#if EXTRACELLULAR\n"); P(" if (_nd->_extnode) {\n"); P(" *_nd->_extnode->_d[0] += _g;\n"); P(" }\n"); P("#endif\n"); }else{ #if CACHEVEC == 0 P(" NODED(_nd) += _g;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_D(_ni[_iml]) += _g;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" _nd = _ml->_nodelist[_iml];\n"); P(" NODED(_nd) += _g;\n"); P(" }\n"); #endif } P(" \n}}\n"); } /* nrnstate list contains the EQUATION solve statement so this advances states by dt */ #if VECTORIZE P("\nstatic void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type){\n"); #else P("\nstatic nrn_state(_prop, _v) Prop *_prop; double _v; {\n"); #endif if (nrnstate || currents->next == currents) { #if VECTORIZE P("Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml;\n"); if (dtsav_for_nrn_state && nrnstate) { P("double _dtsav = dt;\n" "if (secondorder) { dt *= 0.5; }\n"); } P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n"); P(" _nd = _ml->_nodelist[_iml];\n"); ext_vdef(); #else P(" _p = _prop->param; _ppvar = _prop->dparam;\n"); #endif P(" v=_v;\n{\n"); printlist(get_ion_variables(1)); if (nrnstate) { printlist(nrnstate); } if (currents->next == currents) { printlist(modelfunc); } printlist(set_ion_variables(1)); #if VECTORIZE P("}}\n"); #else P("}\n"); #endif if (dtsav_for_nrn_state && nrnstate) { P(" dt = _dtsav;"); } } P("\n}\n"); #else /* Model function must always be present */ #if SIMSYS P("\nmodel() {\n"); P("double _break, _save;\n{\n"); #else P("\nmodel(_pp, _indepindex) double _pp[]; int _indepindex; {\n"); P("double _break, _save;"); #if HMODL P("\n{\n"); #else P("_p = _pp;\n{\n"); #endif #endif printlist(modelfunc); P("\n}\n}\n"); Fflush(fcout); #endif #if NMODL P("\nstatic void terminal(){}\n"); #else /* Terminal function must always be present */ #if SIMSYS || HMODL P("\nterminal() {"); P("\n{\n"); #else P("\nterminal(_pp) double _pp[];{"); P("_p = _pp;\n{\n"); #endif printlist(termfunc); P("\n}\n}\n"); Fflush(fcout); #endif /* initlists() is called once to setup slist and dlist pointers */ #if NMODL || SIMSYS || HMODL P("\nstatic void _initlists() {\n"); #else P("\n_initlists() {\n"); #endif P(" int _i; static int _first = 1;\n"); P(" if (!_first) return;\n"); printlist(initlist); P("_first = 0;\n}\n"); } /* * One of the things initmodel() must do is initialize all states to the * value of state0. This generated code goes before any explicit initialize * code written by the user. */ static void initstates() { int i; Item *qs; Symbol *s; SYMITER_STAT { #if NMODL /* ioni and iono should not have initialization lines */ #define IONCONC 010000 if (s->nrntype & IONCONC) { continue; } #endif Sprintf(buf, "%s0", s->name); if (lookup(buf)) { /* if no constant associated * with a state such as the * ones automattically * generated by SENS then * there is no initialization * line */ if (s->subtype & ARRAY) { Fprintf(fcout, " for (_i=0; _i<%d; _i++) %s[_i] = %s0;\n", s->araydim, s->name, s->name); } else { Fprintf(fcout, " %s = %s0;\n", s->name, s->name); } } } } /* * here is the only place as of 18-apr-89 where we don't explicitly know the * type of a list element */ static int newline, indent; void printitem(q) Item* q; { if (q->itemtype == SYMBOL) { if (SYM(q)->type == SPECIAL) { switch (SYM(q)->subtype) { case SEMI: newline = 1; break; case BEGINBLK: newline = 1; indent++; break; case ENDBLK: newline = 1; indent--; break; } } Fprintf(fcout, " %s", SYM(q)->name); } else if (q->itemtype == VERBATIM) { Fprintf(fcout, "%s", STR(q)); } else if (q->itemtype == ITEM) { printitem(ITM(q)); }else { Fprintf(fcout, " %s", STR(q)); } } void debugprintitem(q) Item* q; { if (q->itemtype == SYMBOL) { printf("SYM %s\n", SYM(q)->name); } else if (q->itemtype == VERBATIM) { printf("VERB %s\n",STR(q)); } else if (q->itemtype == ITEM) { printf("ITM "); debugprintitem(ITM(q)); }else { printf("STR %s\n", STR(q)); } } /* does not include q2 */ char* items_as_string(Item* q1, Item* q2) { Item* q; buf[0] = '\0'; for (q = q1; q != q2; q = q->next) { if (buf[0] != '\0') { strcat(buf, " "); } if (q->itemtype == SYMBOL) { strcat(buf, SYM(q)->name); }else if (q->itemtype == STRING) { strcat(buf, STR(q)); }else{ assert(0); } } return strdup(buf); } void printlist(s) List *s; { Item *q; int i; newline = 0, indent = 0; /* * most of this is merely to decide where newlines and indentation * goes so that the .c file can be read if something goes wrong */ if (!s) { return; } ITERATE(q, s) { printitem(q); if (newline) { newline = 0; Fprintf(fcout, "\n"); for (i = 0; i < indent; i++) { Fprintf(fcout, " "); } } } } static void funcdec() { int i; Symbol *s; List *qs; int j, narg, more; SYMITER(NAME) { more = 0; /*EMPTY*/ /*maybe*/ if (s->subtype & FUNCT) { #define GLOBFUNCT 1 #if GLOBFUNCT && NMODL #else Fprintf(fcout, "static double %s(", s->name); more = 1; #endif } if (s->subtype & PROCED) { Fprintf(fcout, "static int %s(", s->name); more = 1; } if (more) { narg = s->varnum; if (vectorize) { if (narg) { Fprintf(fcout, "_threadargsprotocomma_ "); }else{ Fprintf(fcout, "_threadargsproto_"); } } /*loop over argcount and add ,double */ if (narg > 0) { Fprintf(fcout, "double"); } for (j=1; j < narg; ++j) { Fprintf(fcout, ", double"); } Fprintf(fcout,");\n"); } } } #if VECTORIZE /* when vectorize = 1 */ void c_out_vectorize(const char* prefix) { Item *q; /* things which must go first and most declarations */ P("/* VECTORIZED */\n#define NRN_VECTORIZED 1\n"); P("#include \n#include \n#include \n#include \"scoplib_ansi.h\"\n"); P("#undef PI\n"); P("#define nil 0\n"); P("#include \"md1redef.h\"\n"); P("#include \"section.h\"\n"); P("#include \"nrniv_mf.h\"\n"); P("#include \"md2redef.h\"\n"); printlist(defs_list); printlist(firstlist); P("static int _reset;\n"); if (modelline) { Fprintf(fcout, "static char *modelname = \"%s\";\n\n", modelline); } else { Fprintf(fcout, "static char *modelname = \"\";\n\n"); } Fflush(fcout); /* on certain internal errors partial output * is helpful */ P("static int error;\n"); P("static int _ninits = 0;\n"); P("static int _match_recurse=1;\n"); P("static void _modl_cleanup(){ _match_recurse=1;}\n"); funcdec(); Fflush(fcout); /* * translations of named blocks into functions, procedures, etc. Also * some special declarations used by some blocks */ printlist(procfunc); Fflush(fcout); /* Initialization function must always be present */ P("\nstatic void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {\n int _i; double _save;"); P("{\n"); initstates(); printlist(initfunc); if (match_bound) { assert(!vectorize); P("\n_init_match(_save);"); } P("\n}\n}\n"); Fflush(fcout); /* generation of initmodel interface */ P("\nstatic void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){\n"); P("double* _p; Datum* _ppvar; Datum* _thread;\n"); P("Node *_nd; double _v; int* _ni; int _iml, _cntml;\n"); P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("_thread = _ml->_thread;\n"); /*check_tables();*/ P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n"); check_tables(); if (debugging_ && net_receive_) { P(" _tsav = -1e20;\n"); } if (!artificial_cell) {ext_vdef();} if (!artificial_cell) {P(" v = _v;\n");} printlist(get_ion_variables(1)); P(" initmodel(_p, _ppvar, _thread, _nt);\n"); printlist(set_ion_variables(2)); P("}\n"); P("}\n"); /* standard modl EQUATION without solve computes current */ if (!conductance_) { P("\nstatic double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;"); #if CVODE if (cvode_nrn_current_solve_) { fprintf(fcout, "if (cvode_active_) { %s(_p, _ppvar, _thread, _nt); }\n", cvode_nrn_current_solve_->name); } #endif P("{"); if (currents->next != currents) { printlist(modelfunc); } ITERATE(q, currents) { if (SYM(q) != breakpoint_current(SYM(q))) { diag("current can only be LOCAL in a BREAKPOINT if CONDUCTANCE statements are used. ", SYM(q)->name); } Sprintf(buf, " _current += %s;\n", SYM(q)->name); P(buf); } P("\n} return _current;\n}\n"); } /* For the classic BREAKPOINT block, the neuron current also has to compute the dcurrent/dv as well as make sure all currents accumulated properly (currents list) */ if (brkpnt_exists) { P("\nstatic void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) {\n"); P("double* _p; Datum* _ppvar; Datum* _thread;\n"); P("Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml;\n"); P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("_thread = _ml->_thread;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n"); ext_vdef(); if (currents->next != currents) { printlist(get_ion_variables(0)); #if CVODE cvode_rw_cur(buf); P(buf); } if (cvode_nrn_cur_solve_) { fprintf(fcout, "if (cvode_active_) { %s(_p, _ppvar, _thread, _nt); }\n", cvode_nrn_cur_solve_->name); } if (currents->next != currents) { #endif if (conductance_) { P(" {\n"); conductance_cout(); printlist(set_ion_variables(0)); P(" }\n"); }else{ P(" _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001);\n"); printlist(begin_dion_stmt()); if (state_discon_list_) { P(" state_discon_flag_ = 1; _rhs = _nrn_current(_v); state_discon_flag_ = 0;\n"); }else{ P(" _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v);\n"); } printlist(end_dion_stmt(".001")); P(" _g = (_g - _rhs)/.001;\n"); /* set the ion variable values */ printlist(set_ion_variables(0)); } /* end of not conductance */ if (point_process) { P(" _g *= 1.e2/(_nd_area);\n"); P(" _rhs *= 1.e2/(_nd_area);\n"); } if (electrode_current) { #if CACHEVEC == 0 P(" NODERHS(_nd) += _rhs;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_RHS(_ni[_iml]) += _rhs;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" NODERHS(_nd) += _rhs;\n"); P(" }\n"); P(" if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_rhs[_ni[_iml]] += _rhs; }\n"); #endif P("#if EXTRACELLULAR\n"); P(" if (_nd->_extnode) {\n"); P(" *_nd->_extnode->_rhs[0] += _rhs;\n"); P(" }\n"); P("#endif\n"); }else{ #if CACHEVEC == 0 P(" NODERHS(_nd) -= _rhs;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_RHS(_ni[_iml]) -= _rhs;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" NODERHS(_nd) -= _rhs;\n"); P(" }\n"); #endif } } P(" \n}\n"); P(" \n}\n"); /* for the classic breakpoint block, nrn_cur computed the conductance, _g, and now the jacobian calculation merely returns that */ P("\nstatic void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) {\n"); P("double* _p; Datum* _ppvar; Datum* _thread;\n"); P("Node *_nd; int* _ni; int _iml, _cntml;\n"); P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("_thread = _ml->_thread;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml];\n"); if (electrode_current) { P(" _nd = _ml->_nodelist[_iml];\n"); #if CACHEVEC == 0 P(" NODED(_nd) -= _g;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_D(_ni[_iml]) -= _g;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" NODED(_nd) -= _g;\n"); P(" }\n"); P(" if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_d[_ni[_iml]] -= _g; }\n"); #endif P("#if EXTRACELLULAR\n"); P(" if (_nd->_extnode) {\n"); P(" *_nd->_extnode->_d[0] += _g;\n"); P(" }\n"); P("#endif\n"); }else{ #if CACHEVEC == 0 P(" NODED(_nd) += _g;\n"); #else P("#if CACHEVEC\n"); P(" if (use_cachevec) {\n"); P(" VEC_D(_ni[_iml]) += _g;\n"); P(" }else\n"); P("#endif\n"); P(" {\n"); P(" _nd = _ml->_nodelist[_iml];\n"); P(" NODED(_nd) += _g;\n"); P(" }\n"); #endif } P(" \n}\n"); P(" \n}\n"); } /* nrnstate list contains the EQUATION solve statement so this advances states by dt */ P("\nstatic void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) {\n"); if (nrnstate || currents->next == currents) { P("double* _p; Datum* _ppvar; Datum* _thread;\n"); P("Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml;\n"); if (dtsav_for_nrn_state && nrnstate) { P("double _dtsav = dt;\n" "if (secondorder) { dt *= 0.5; }\n"); } P("#if CACHEVEC\n"); P(" _ni = _ml->_nodeindices;\n"); P("#endif\n"); P("_cntml = _ml->_nodecount;\n"); P("_thread = _ml->_thread;\n"); P("for (_iml = 0; _iml < _cntml; ++_iml) {\n"); P(" _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n"); P(" _nd = _ml->_nodelist[_iml];\n"); ext_vdef(); P(" v=_v;\n{\n"); printlist(get_ion_variables(1)); if (nrnstate) { printlist(nrnstate); } if (currents->next == currents) { printlist(modelfunc); } printlist(set_ion_variables(1)); P("}}\n"); if (dtsav_for_nrn_state && nrnstate) { P(" dt = _dtsav;"); } } P("\n}\n"); P("\nstatic void terminal(){}\n"); /* vectorized: data must have own copies of slist and dlist for now we don't vectorize if slist or dlist exists. Eventually must separate initialization of static things from vectorized things. */ /* initlists() is called once to setup slist and dlist pointers */ P("\nstatic void _initlists(){\n"); P(" double _x; double* _p = &_x;\n"); P(" int _i; static int _first = 1;\n"); P(" if (!_first) return;\n"); printlist(initlist); P("_first = 0;\n}\n"); P("\n#if defined(__cplusplus)\n} /* extern \"C\" */\n#endif\n"); } void vectorize_substitute(q, str) Item* q; char* str; { if (!vectorize_replacements) { vectorize_replacements = newlist(); } lappenditem(vectorize_replacements, q); lappendstr(vectorize_replacements, str); } Item* vectorize_replacement_item(Item* q) { Item* q1; if (vectorize_replacements) { ITERATE(q1, vectorize_replacements) { if (ITM(q1) == q) { return q1->next; } } } return (Item*)0; } void vectorize_do_substitute() { Item *q, *q1; if (vectorize_replacements) { ITERATE(q, vectorize_replacements) { q1 = ITM(q); q = q->next; replacstr(q1, STR(q)); } } } char* cray_pragma() { static char buf[] = "\ \n#if _CRAY\ \n#pragma _CRI ivdep\ \n#endif\ \n"; return buf; } #endif /*VECTORIZE*/ static void conductance_cout() { int i=0; Item* q; List* m; /* replace v with _v */ m = newlist(); ITERATE(q, modelfunc) { if (q->itemtype == SYMBOL) { if (strcmp(SYM(q)->name, "v") == 0) { lappendstr(m, "_v"); }else{ lappendsym(m, SYM(q)); } }else if (q->itemtype == STRING) { lappendstr(m, STR(q)); }else{ diag("modelfunc contains item which is not a SYMBOL or STRING", (char*)0); } } /* eliminate first { */ ITERATE(q, m) { if (q->itemtype == SYMBOL) { if (strcmp(SYM(q)->name, "{") == 0) { delete(q); break; } } } /* eliminate last } */ for (q = m->prev; q != m; q = q->prev) { if (q->itemtype == SYMBOL) { if (strcmp(SYM(q)->name, "}") == 0) { delete(q); break; } } } printlist(m); ITERATE(q, currents) { if (i == 0) { sprintf(buf, " _rhs = %s", breakpoint_current(SYM(q))->name); }else{ sprintf(buf, " + %s", breakpoint_current(SYM(q))->name); } P(buf); i += 1; } if (i > 0) { P(";\n"); } i = 0; ITERATE(q, conductance_) { if (i == 0) { sprintf(buf, " _g = %s", SYM(q)->name); }else{ sprintf(buf, " + %s", SYM(q)->name); } P(buf); i += 1; q = q->next; } if (i > 0) { P(";\n"); } ITERATE(q, conductance_) { if (SYM(q->next)) { sprintf(buf, " _ion_di%sdv += %s", SYM(q->next)->name, SYM(q)->name); P(buf); if (point_process) { P("* 1.e2/(_nd_area)"); } P(";\n"); } q = q->next; } } neuron-7.5/src/nmodl/nocpout.c000077500000000000000000002323761323325274500164540ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/nocpout.c,v 4.1 1997/08/30 20:45:28 hines Exp */ /* nrnversion is a string that is passed via the _mechanism structure as the first arg. It will be interpreted within neuron to determine if that version is compatible with this version. For now try to use something of the form d.d If this is changed then also change nrnoc/init.c */ char* nmodl_version_ = "6.2.0"; /* Point processes are now interfaced to nrnoc via objectvars. Thus, p-array variables and functions accessible to hoc do not have suffixes, and there is a constructor, destructor. Also hoc interface functions always have a void* _vptr arg which is always cast to (Point_process*) and the _p and _ppvar pointers set. This makes the old setdata and create obsolete. */ /* The strategy is to use as much of parout and hparout method as possible. The bulk of the variables is in a p-array. The variables that don't belong in this p-array are indicated by a flag with sym->subtype & NRNNOTP. All other variables have values in that single array but not all those values are available from HOC. Variables accessible to NEURON are variables that appear within GLOBAL, SECTION, and RANGE statements. SECTION variables are not currently implemented. Variables that do not appear in the p-array are: 1)externally declared variables such as celsius, t. 2)parameters and assigned not declared in the NEURON{RANGE list} that are global with respect to sections. 3) variables static to this model, ie. v 4) read only variables like "diam" States always are in the p-array. USEION variables in the p-array have connections to other places and depending on the context may get their value from somewhere else, or add their value to somewhere else, or place their value somewhere else. The cases are: NONSPECIFIC and USEION WRITE i... value added to proper ion current and total current. USEION READ entry value assigned to local copy. USEION WRITE e.. ..o ..i exit value of local copy assigned to pointer.. It is an error for an ionic current or ionic variable to be a STATE. Use another variable as the state, make the ionic variable an ASSIGNED and just assign it at the proper place. Alternatively, if they are STATE's then they should not be READ since their value comes from the p-array itself. POINTER variables are like USEION variables. Unfortunately, it is up to the hoc user to make sure they point to the proper place with a connect statement. At this time we only check for a null pointer. The pointers are kept in the ppvar array. each model creates a setdata_suffix(x) (or setdata_suffix(i)) function which sets up _p and _ppvar for use by functions in the model called directly by hoc. */ /* FUNCTIONS are made external so they are callable from other models */ #define GLOBFUNCT 1 #include "modl.h" #include "parse1.h" #include #include #define GETWD(buf) getcwd(buf, NRN_BUFSIZE) #if VECTORIZE int vectorize = 1; /* the idea is to put all variables into a vector of vectors so there there is no static data. Every function has an implicit argument, underbar ix which tells which set of data _p[ix][...] to use. There are going to have to be limits on the kinds of scopmath functions called since many of them need static data. We can have special versions of the most useful of these. ie sparse.c. Above is obsolete in detail , underbar ix is no longer used. When vectorize = 1 then we believe the code is thread safe and most functions pass around _p, _ppvar, _thread. When vectorize is 0 then we are definitely not thread safe and _p and _ppvar are static. */ #endif #define NRNEXTRN 01 /* t, dt, celsius, etc. */ #define NRNCURIN 02 /* input value used */ #define NRNCUROUT 04 /* added to output value */ #define NRNRANGE 010 #define NRNPRANGEIN 020 #define NRNPRANGEOUT 040 #define NRNGLOBAL 0100 /* same for all sections, defined here */ #define NRNSTATIC 0200 /* v */ #define NRNNOTP 0400 /* doesn't belong in p array */ #define NRNIONFLAG 01000 /* temporary flag to allow READ and WRITE without declaring twice */ #define NRNSECTION 02000 #define NRNPOINTER 04000 #define IONCONC 010000 #define NRNBBCOREPOINTER 020000 #define IONEREV 0 /* Parameter */ #define IONIN 1 #define IONOUT 2 #define IONCUR 3 /* assigned */ #define IONDCUR 4 extern int assert_threadsafe; extern int brkpnt_exists; static char* brkpnt_str_; extern Symbol *indepsym; extern Symbol *scop_indep; extern List *indeplist; extern Symbol *stepsym; extern char *reprime(); extern List *symlist[]; extern List* ldifuslist; extern char finname[]; extern int check_tables_threads(List*); List *syminorder; List *plotlist; List *defs_list; int electrode_current = 0; int thread_data_index = 0; List *thread_cleanup_list; List *thread_mem_init_list; List* toplocal_; extern int protect_; extern int protect_include_; extern List *set_ion_variables(), *get_ion_variables(); extern int netrec_need_v; static int decode_limits(); static int decode_tolerance(); /* NEURON block information */ List *currents; List *useion; List* conductance_; List* breakpoint_local_current_; static List *rangeparm; static List *rangedep; static List *rangestate; static List *nrnpointers; static List* uip; /* void _update_ion_pointer(Datum* _ppvar){...} text */ static char suffix[256]; static char *rsuffix; /* point process range and functions don't have suffix*/ static char *mechname; int point_process; /* 1 if a point process model */ int artificial_cell; /* 1 if also explicitly declared an ARTIFICIAL_CELL */ static int diamdec = 0; /*1 if diam is declared*/ static int areadec = 0; static int use_bbcorepointer = 0; static void defs_h(); static int iontype(); static void nrndeclare(); static void del_range(); static void declare_p(); static int iondef(); static void ion_promote(); static int ppvar_cnt; static List* ppvar_semantics_; static void ppvar_semantics(int, const char*); static int for_netcons_; /* number of FOR_NETCONS statements */ static Item* net_init_q1_; static Item* net_init_q2_; static int ba_index_; /* BEFORE AFTER blocks. See bablk */ static List* ba_list_; #if CVODE List* state_discon_list_; int cvode_not_allowed; static int cvode_emit, cvode_ieq_index; static int cond_index; static int tqitem_index; static int watch_index; static int cvode_index; static List* ion_synonym; extern int singlechan_; int debugging_; int net_receive_; int net_send_seen_; int net_event_seen_; int watch_seen_; /* number of WATCH statements + 1*/ static Item* net_send_delivered_; /* location for if flag is 1 then clear the tqitem_ to allow an error message for net_move */ #endif #define SYMITER(arg) ITERATE(q, syminorder){ \ s = SYM(q); if (s->type == arg) #define SYMLISTITER for (i = 'A'; i <= 'z'; i++)\ ITERATE(q, symlist[i]) #define IFTYPE(arg) if ((s->subtype & arg)\ && ( (s->usage & EXPLICIT_DECL) != automatic) ) /* varcount holds the index into the .var file and is saved in s->used parraycount holds the index into the p array and is saved in s->varnum pvarcount indexes pointers to variables such as ena */ static int varcount, parraycount; void nrninit() { extern int using_default_indep; currents = newlist(); rangeparm = newlist(); rangedep = newlist(); rangestate = newlist(); useion = newlist(); nrnpointers = newlist(); using_default_indep = 0; indepinstall(install("t", NAME), "0", "1", "100", (Item*)0, "ms", 0); using_default_indep = 1; debugging_ = 1; thread_cleanup_list = newlist(); thread_mem_init_list = newlist(); } void parout() { int i, j, ioncount, pointercount, gind, emit_check_table_thread; Item *q, *q1; Symbol *s, *sion; double d1, d2; extern char *modprefix; char *modbase; defs_list = newlist(); /* relates hoc names to c-variables */ if (brkpnt_exists) { brkpnt_str_ = "nrn_cur, nrn_jacob, nrn_state"; }else{ brkpnt_str_ = "0, 0, 0"; #if 1 || defined(__MINGW32__) /* x86_64-w64-mingw32-gcc passed 0 without zeroing the high 32 bits */ /* also cygwin64 gcc 4.8.1, so cast to void* universally */ brkpnt_str_ = "(void*)0, (void*)0, (void*)0"; #endif } for (modbase = modprefix + strlen(modprefix); modbase != modprefix; modbase--) { if (*modbase == '\\' || *modbase == '/') { modbase++; break; } } if (!mechname) { sprintf(suffix,"_%s", modbase); mechname = modbase; } else if (strcmp(mechname, "nothing") == 0) { vectorize = 0; suffix[0] = '\0'; mechname = modbase; }else{ sprintf(suffix, "_%s", mechname); } if (artificial_cell && vectorize && (thread_data_index || toplocal_)) { fprintf(stderr, "Notice: ARTIFICIAL_CELL models that would require thread specific data are not thread safe.\n"); vectorize = 0; } if (point_process) { rsuffix = ""; }else{ rsuffix = suffix; } Lappendstr(defs_list, "\ \n#if METHOD3\nextern int _method3;\n#endif\n\ \n#if !NRNGPU\ \n#undef exp\ \n#define exp hoc_Exp\nextern double hoc_Exp(double);\ \n#endif\n\ "); if (protect_include_) { Lappendstr(defs_list, "\n#include \"nmodlmutex.h\""); } #if 1 /* for easier profiling, give distinct names to otherwise reused static names */ sprintf(buf, "\n\ #define nrn_init _nrn_init_%s\n\ #define _nrn_initial _nrn_initial_%s\n\ #define nrn_cur _nrn_cur_%s\n\ #define _nrn_current _nrn_current_%s\n\ #define nrn_jacob _nrn_jacob_%s\n\ #define nrn_state _nrn_state_%s\n\ #define _net_receive _net_receive_%s\ ", suffix, suffix, suffix, suffix, suffix, suffix, suffix); Lappendstr(defs_list, buf); SYMLISTITER { Symbol* s = SYM(q); /* note that with GLOBFUNCT, FUNCT will be redefined anyway */ if (s->type == NAME && s->subtype & (PROCED | DERF | KINF)) { sprintf(buf, "\n#define %s %s_%s", s->name, s->name, suffix); Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "\n"); #endif /* distinct names for easier profiling */ if (vectorize) { Lappendstr(defs_list, "\n\ #define _threadargscomma_ _p, _ppvar, _thread, _nt,\n\ #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt,\n\ #define _threadargs_ _p, _ppvar, _thread, _nt\n\ #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt\n\ "); }else{ Lappendstr(defs_list, "\n\ #define _threadargscomma_ /**/\n\ #define _threadargsprotocomma_ /**/\n\ #define _threadargs_ /**/\n\ #define _threadargsproto_ /**/\n\ "); } Lappendstr(defs_list, "\ /*SUPPRESS 761*/\n\ /*SUPPRESS 762*/\n\ /*SUPPRESS 763*/\n\ /*SUPPRESS 765*/\n\ "); Lappendstr(defs_list, "extern double *getarg();\n"); #if VECTORIZE if (vectorize) { Sprintf(buf, "/* Thread safe. No static _p or _ppvar. */\n"); }else #endif { Sprintf(buf, "static double *_p; static Datum *_ppvar;\n"); } Lappendstr(defs_list, buf); nrndeclare(); varcount = parraycount = 0; declare_p(); ioncount = iondef(&pointercount); /* first is _nd_area if point process */ Lappendstr(defs_list, "\n#if MAC\n#if !defined(v)\n#define v _mlhv\n#endif\n#if !defined(h)\n#define h _mlhh\n#endif\n#endif\n"); Lappendstr(defs_list, "\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n"); Lappendstr(defs_list, "static int hoc_nrnpointerindex = "); if (pointercount) { q = nrnpointers->next; Sprintf(buf, "%d;\n", SYM(q)->used); }else{ Sprintf(buf, "-1;\n"); } Lappendstr(defs_list, buf); /*above modified to also count and define pointers*/ if (vectorize) { Lappendstr(defs_list, "static Datum* _extcall_thread;\n static Prop* _extcall_prop;\n"); } #if 0 Lappendstr(defs_list, "/* static variables special to NEURON */\n"); SYMLISTITER { if (SYM(q)->nrntype & NRNSTATIC) { Sprintf(buf, "static double %s;\n", SYM(q)->name); Lappendstr(defs_list, buf); } } #endif Lappendstr(defs_list, "/* external NEURON variables */\n"); SYMLISTITER { s = SYM(q); if (s->nrntype & NRNEXTRN) { if (strcmp(s->name, "dt") == 0) { continue; } if (strcmp(s->name, "t") == 0) { continue; } if (s->subtype & ARRAY) { Sprintf(buf, "extern double* %s;\n", s->name); }else{ Sprintf(buf, "extern double %s;\n", s->name); } Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "/* declaration of user functions */\n"); SYMLISTITER { s = SYM(q); if (s->subtype & (FUNCT | PROCED) && s->name[0] != '_') { if (point_process) { Sprintf(buf, "static double _hoc_%s();\n", s->name); }else{ Sprintf(buf, "static void _hoc_%s(void);\n", s->name); } Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "static int _mechtype;\n\ extern void _nrn_cacheloop_reg(int, int);\n\ extern void hoc_register_prop_size(int, int, int);\n\ extern void hoc_register_limits(int, HocParmLimits*);\n\ extern void hoc_register_units(int, HocParmUnits*);\n\ extern void nrn_promote(Prop*, int, int);\n\ extern Memb_func* memb_func;\n\ " ); /**** create special point process functions */ if (point_process) { Lappendstr(defs_list, "extern Prop* nrn_point_prop_;\n"); Lappendstr(defs_list, "static int _pointtype;\n"); Lappendstr(defs_list, "static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process();\n"); Lappendstr(defs_list, "return create_point_process(_pointtype, _ho);\n}\n"); Lappendstr(defs_list, "static void _hoc_destroy_pnt();\n"); Lappendstr(defs_list, "static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process();\n"); Lappendstr(defs_list, "return loc_point_process(_pointtype, _vptr);\n}\n"); Lappendstr(defs_list, "static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point();\n"); Lappendstr(defs_list, "return has_loc_point(_vptr);\n}\n"); Lappendstr(defs_list, "static double _hoc_get_loc_pnt(_vptr)void* _vptr; {\n"); Lappendstr(defs_list, "double get_loc_point_process(); return (get_loc_point_process(_vptr));\n}\n"); } /* function to set up _p and _ppvar */ Lappendstr(defs_list, "extern void _nrn_setdata_reg(int, void(*)(Prop*));\n"); Lappendstr(defs_list, "static void _setdata(Prop* _prop) {\n"); #if VECTORIZE if (vectorize) { Lappendstr(defs_list, "_extcall_prop = _prop;\n"); }else #endif { Lappendstr(defs_list, "_p = _prop->param; _ppvar = _prop->dparam;\n"); } Lappendstr(defs_list, "}\n"); if (point_process) { Lappendstr(defs_list, "static void _hoc_setdata(void* _vptr) { Prop* _prop;\n"); Lappendstr(defs_list, "_prop = ((Point_process*)_vptr)->_prop;\n"); }else{ Lappendstr(defs_list, "static void _hoc_setdata() {\n Prop *_prop, *hoc_getdata_range(int);\n"); Sprintf(buf, "_prop = hoc_getdata_range(_mechtype);\n"); Lappendstr(defs_list, buf); } Lappendstr(defs_list, " _setdata(_prop);\n"); if (point_process) { Lappendstr(defs_list, "}\n"); }else{ Lappendstr(defs_list, "hoc_retpushx(1.);\n}\n"); } /* functions */ Lappendstr(defs_list, "/* connect user functions to hoc names */\n"); Lappendstr(defs_list,"static VoidFunc hoc_intfunc[] = {\n"); if (point_process) { Lappendstr(defs_list,"0,0\n};\n"); Lappendstr(defs_list, "static Member_func _member_func[] = {\n"); Sprintf(buf, "\"loc\", _hoc_loc_pnt,\n"); Lappendstr(defs_list, buf); Sprintf(buf, "\"has_loc\", _hoc_has_loc,\n"); Lappendstr(defs_list, buf); Sprintf(buf, "\"get_loc\", _hoc_get_loc_pnt,\n"); Lappendstr(defs_list, buf); }else{ Sprintf(buf, "\"setdata_%s\", _hoc_setdata,\n", mechname); Lappendstr(defs_list, buf); } SYMLISTITER { s = SYM(q); if ((s->subtype & (FUNCT | PROCED)) && s->name[0] != '_') { Sprintf(buf, "\"%s%s\", _hoc_%s,\n", s->name, rsuffix, s->name); Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "0, 0\n};\n"); #if GLOBFUNCT /* FUNCTION's are now global so callable from other models */ /* change name to namesuffix. This propagates everywhere except to hoc_name*/ /* but don't do it if suffix is empty */ if (suffix[0]) SYMLISTITER { s = SYM(q); if ((s->subtype & FUNCT)) { Sprintf(buf, "#define %s %s%s\n", s->name, s->name, suffix); q1 = Lappendstr(defs_list, buf); q1->itemtype = VERBATIM; } } SYMLISTITER { int j; s = SYM(q); if ((s->subtype & FUNCT)) { Sprintf(buf, "extern double %s(", s->name); Lappendstr(defs_list, buf); if (vectorize && !s->no_threadargs) { if (s->varnum) { Lappendstr(defs_list, "_threadargsprotocomma_"); }else{ Lappendstr(defs_list, "_threadargsproto_"); } } for (j=0; j < s->varnum; ++j) { Lappendstr(defs_list, "double"); if (j+1 < s->varnum) { Lappendstr(defs_list, ","); } } Lappendstr(defs_list, ");\n"); } } #endif emit_check_table_thread = 0; if (vectorize && check_tables_threads(defs_list)) { emit_check_table_thread = 1; } /* per thread top LOCAL */ /* except those that are marked assigned_to_ == 2 stay static double */ if (vectorize && toplocal_) { int cnt; cnt = 0; ITERATE(q, toplocal_) { if (SYM(q)->assigned_to_ != 2) { if (SYM(q)->subtype & ARRAY) { cnt += SYM(q)->araydim; }else{ ++cnt; } } } sprintf(buf, " _thread[%d]._pval = (double*)ecalloc(%d, sizeof(double));\n", thread_data_index, cnt); lappendstr(thread_mem_init_list, buf); sprintf(buf, " free((void*)(_thread[%d]._pval));\n", thread_data_index); lappendstr(thread_cleanup_list, buf); cnt = 0; ITERATE(q, toplocal_) { if (SYM(q)->assigned_to_ != 2) { if (SYM(q)->subtype & ARRAY) { sprintf(buf, "#define %s (_thread[%d]._pval + %d)\n", SYM(q)->name, thread_data_index, cnt); cnt += SYM(q)->araydim; }else{ sprintf(buf, "#define %s _thread[%d]._pval[%d]\n", SYM(q)->name, thread_data_index, cnt); ++cnt; } }else{ /* stay file static */ if (SYM(q)->subtype & ARRAY) { sprintf(buf, "static double %s[%d];\n", SYM(q)->name, SYM(q)->araydim); }else{ sprintf(buf, "static double %s;\n", SYM(q)->name); } } lappendstr(defs_list, buf); } ++thread_data_index; } /* per thread global data */ gind = 0; if (vectorize) SYMLISTITER { s = SYM(q); if (s->nrntype & (NRNGLOBAL) && s->assigned_to_ == 1) { if (s->subtype & ARRAY) { gind += s->araydim; }else{ ++gind; } } } /* double scalars declared internally */ Lappendstr(defs_list, "/* declare global and static user variables */\n"); if (gind) { sprintf(buf, "static int _thread1data_inuse = 0;\nstatic double _thread1data[%d];\n#define _gth %d\n", gind, thread_data_index); Lappendstr(defs_list, buf); sprintf(buf, " if (_thread1data_inuse) {_thread[_gth]._pval = (double*)ecalloc(%d, sizeof(double));\n }else{\n _thread[_gth]._pval = _thread1data; _thread1data_inuse = 1;\n }\n", gind); lappendstr(thread_mem_init_list, buf); lappendstr(thread_cleanup_list, " if (_thread[_gth]._pval == _thread1data) {\n _thread1data_inuse = 0;\n }else{\n free((void*)_thread[_gth]._pval);\n }\n"); ++thread_data_index; } gind = 0; SYMLISTITER { /* globals are now global with respect to C as well as hoc */ s = SYM(q); if (s->nrntype & (NRNGLOBAL)) { if (vectorize && s->assigned_to_ == 1) { if (s->subtype & ARRAY) { sprintf(buf, "#define %s%s (_thread1data + %d)\n\ #define %s (_thread[_gth]._pval + %d)\n", s->name, suffix, gind, s->name, gind); }else{ sprintf(buf, "#define %s%s _thread1data[%d]\n\ #define %s _thread[_gth]._pval[%d]\n", s->name, suffix, gind, s->name, gind); } q1 = Lappendstr(defs_list, buf); q1->itemtype = VERBATIM; if (s->subtype & ARRAY) { gind += s->araydim; }else{ ++gind; } continue; } if (suffix[0]) { Sprintf(buf, "#define %s %s%s\n", s->name, s->name, suffix); q1 = Lappendstr(defs_list, buf); q1->itemtype = VERBATIM; } decode_ustr(s, &d1, &d2, buf); if (s->subtype & ARRAY) { Sprintf(buf, "double %s[%d];\n", s->name, s->araydim); }else{ Sprintf(buf, "double %s = %g;\n", s->name, d1); } Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "/* some parameters have upper and lower limits */\n"); Lappendstr(defs_list, "static HocParmLimits _hoc_parm_limits[] = {\n"); SYMLISTITER { s = SYM(q); if (s->subtype & PARM) { double d1=0., d2=0.; if (decode_limits(s, &d1, &d2)) { if (s->nrntype & NRNGLOBAL || !point_process) { Sprintf(buf, "\"%s%s\", %g, %g,\n", s->name, suffix, d1, d2); }else{ Sprintf(buf, "\"%s\", %g, %g,\n", s->name, d1, d2); } Lappendstr(defs_list, buf); } } } Lappendstr(defs_list, "0,0,0\n};\n"); units_reg(); SYMLISTITER { s = SYM(q); if (s->nrntype & (NRNSTATIC)) { #if VECTORIZE && 0 if (vectorize) { diag("No statics allowed for thread safe models:", s->name); } #endif decode_ustr(s, &d1, &d2, buf); if (s->subtype & ARRAY) { Sprintf(buf, "static double %s[%d];\n", s->name, s->araydim); }else{ Sprintf(buf, "static double %s = %g;\n", s->name, d1); } Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "/* connect global user variables to hoc */\n"); Lappendstr(defs_list,"static DoubScal hoc_scdoub[] = {\n"); ITERATE(q, syminorder) { s = SYM(q); if (s->nrntype & NRNGLOBAL && !(s->subtype & ARRAY)) { Sprintf(buf, "\"%s%s\", &%s%s,\n", s->name, suffix, s->name, suffix); Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "0,0\n};\n"); /* double vectors */ Lappendstr(defs_list,"static DoubVec hoc_vdoub[] = {\n"); ITERATE(q, syminorder) { s = SYM(q); if (s->nrntype & NRNGLOBAL && (s->subtype & ARRAY)) { Sprintf(buf, "\"%s%s\", %s%s, %d,\n", s->name, suffix, s->name, suffix, s->araydim); Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "0,0,0\n};\n"); Lappendstr(defs_list, "static double _sav_indep;\n"); if (ba_index_ > 0) { Lappendstr(defs_list, "static void _ba1()"); for (i=2; i <= ba_index_; ++i) { sprintf(buf, ", _ba%d()", i); Lappendstr(defs_list, buf); } Lappendstr(defs_list, ";\n"); } /******** what normally goes into cabvars.h structures */ /*declaration of the range variables names to HOC */ Lappendstr(defs_list, "static void nrn_alloc(Prop*);\nstatic void nrn_init(_NrnThread*, _Memb_list*, int);\nstatic void nrn_state(_NrnThread*, _Memb_list*, int);\n\ "); if (brkpnt_exists) { Lappendstr(defs_list, "static void nrn_cur(_NrnThread*, _Memb_list*, int);\nstatic void nrn_jacob(_NrnThread*, _Memb_list*, int);\n"); } /* count the number of pointers needed */ ppvar_cnt = ioncount + diamdec + pointercount + areadec; #if CVODE if (net_send_seen_) { tqitem_index = ppvar_cnt; ppvar_semantics(ppvar_cnt, "netsend"); ppvar_cnt++; } if (watch_seen_) { watch_index = ppvar_cnt; for (i=0; i < watch_seen_ ; ++i) { ppvar_semantics(i+ppvar_cnt, "watch"); } ppvar_cnt += watch_seen_; sprintf(buf, "\n#define _watch_array _ppvar + %d", watch_index); Lappendstr(defs_list, buf); Lappendstr(defs_list, "\n"); } if (for_netcons_) { sprintf(buf, "\n#define _fnc_index %d\n", ppvar_cnt); Lappendstr(defs_list, buf); ppvar_semantics(ppvar_cnt, "fornetcon"); ppvar_cnt += 1; } if (point_process) { Lappendstr(defs_list, "static void _hoc_destroy_pnt(_vptr) void* _vptr; {\n"); if (watch_seen_ || for_netcons_) { Lappendstr(defs_list, " Prop* _prop = ((Point_process*)_vptr)->_prop;\n"); } if (watch_seen_) { sprintf(buf, " if (_prop) { _nrn_free_watch(_prop->dparam, %d, %d);}\n", watch_index, watch_seen_); Lappendstr(defs_list, buf); } if (for_netcons_) { sprintf(buf, " if (_prop) { _nrn_free_fornetcon(&(_prop->dparam[_fnc_index]._pvoid));}\n"); Lappendstr(defs_list, buf); } Lappendstr(defs_list, " destroy_point_process(_vptr);\n}\n"); } if (cvode_emit) { cvode_ieq_index = ppvar_cnt; ppvar_semantics(ppvar_cnt, "cvodeieq"); ppvar_cnt++; } cvode_emit_interface(); #endif if (destructorfunc->next != destructorfunc) { if (! point_process) { diag("DESTRUCTOR only permitted for POINT_PROCESS", (char*)0); } Lappendstr(defs_list, "static void _destructor(Prop*);\n"); } if (constructorfunc->next != constructorfunc) { Lappendstr(defs_list, "static void _constructor(Prop*);\n"); } Lappendstr(defs_list, "/* connect range variables in _p that hoc is supposed to know about */\n"); Lappendstr(defs_list, "\ static const char *_mechanism[] = {\n\ "); Sprintf(buf, "\"%s\",\n\"%s\",\n", nmodl_version_, mechname); Lappendstr(defs_list, buf); ITERATE(q, rangeparm) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "\"%s%s[%d]\",\n", s->name, rsuffix, s->araydim); }else{ Sprintf(buf, "\"%s%s\",\n", s->name, rsuffix); } Lappendstr(defs_list, buf); } Lappendstr(defs_list, "0,\n"); ITERATE(q, rangedep) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "\"%s%s[%d]\",\n", s->name, rsuffix, s->araydim); }else{ Sprintf(buf, "\"%s%s\",\n", s->name, rsuffix); } Lappendstr(defs_list, buf); } Lappendstr(defs_list, "0,\n"); ITERATE(q, rangestate) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "\"%s%s[%d]\",\n", s->name, rsuffix, s->araydim); }else{ Sprintf(buf, "\"%s%s\",\n", s->name, rsuffix); } Lappendstr(defs_list, buf); } Lappendstr(defs_list, "0,\n"); /* pointer variable names */ ITERATE(q, nrnpointers) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "\"%s%s[%d]\",\n", s->name, rsuffix, s->araydim); }else{ Sprintf(buf, "\"%s%s\",\n", s->name, rsuffix); } Lappendstr(defs_list, buf); } Lappendstr(defs_list, "0};\n"); /*********Creation of the allocation function*/ if (diamdec) { Lappendstr(defs_list, "static Symbol* _morphology_sym;\n"); } if (areadec) { Lappendstr(defs_list, "extern Node* nrn_alloc_node_;\n"); } ITERATE(q, useion) { sion = SYM(q); Sprintf(buf, "static Symbol* _%s_sym;\n",sion->name); Lappendstr(defs_list, buf); if (ldifuslist) { sprintf(buf, "static int _type_i%s;\n", sion->name); lappendstr(defs_list, buf); } q=q->next->next->next; } Lappendstr(defs_list, "\n\ extern Prop* need_memb(Symbol*);\n\n\ static void nrn_alloc(Prop* _prop) {\n\ Prop *prop_ion;\n\ double *_p; Datum *_ppvar;\n\ "); if (point_process) { Lappendstr(defs_list, " if (nrn_point_prop_) {\n\ _prop->_alloc_seq = nrn_point_prop_->_alloc_seq;\n\ _p = nrn_point_prop_->param;\n\ _ppvar = nrn_point_prop_->dparam;\n }else{\n"); } Sprintf(buf, " _p = nrn_prop_data_alloc(_mechtype, %d, _prop);\n", parraycount); Lappendstr(defs_list, buf); Lappendstr(defs_list, " /*initialize range parameters*/\n"); ITERATE(q, rangeparm) { s = SYM(q); if (s->subtype & ARRAY) { continue; } decode_ustr(s, &d1, &d2, buf); Sprintf(buf, " %s = %g;\n", s->name, d1); Lappendstr(defs_list, buf); } if (point_process) { Lappendstr(defs_list, " }\n"); } Lappendstr(defs_list, "\t_prop->param = _p;\n"); Sprintf(buf, "\t_prop->param_size = %d;\n", parraycount); Lappendstr(defs_list, buf); if (ppvar_cnt) { if (point_process) { Lappendstr(defs_list, " if (!nrn_point_prop_) {\n"); } Sprintf(buf, " _ppvar = nrn_prop_datum_alloc(_mechtype, %d, _prop);\n", ppvar_cnt); Lappendstr(defs_list, buf); if (point_process) { Lappendstr(defs_list," }\n"); } Lappendstr(defs_list, "\t_prop->dparam = _ppvar;\n"); Lappendstr(defs_list,"\t/*connect ionic variables to this model*/\n"); } if (diamdec) { Sprintf(buf, "prop_ion = need_memb(_morphology_sym);\n"); Lappendstr(defs_list, buf); Sprintf(buf, "\t_ppvar[%d]._pval = &prop_ion->param[0]; /* diam */\n", ioncount + pointercount), Lappendstr(defs_list, buf); ppvar_semantics(ioncount + pointercount, "diam"); } if (areadec) { Sprintf(buf, "\t_ppvar[%d]._pval = &nrn_alloc_node_->_area; /* diam */\n", ioncount + pointercount + diamdec), Lappendstr(defs_list, buf); ppvar_semantics(ioncount + pointercount + diamdec, "area"); } if (point_process) { ioncount = 2; }else{ ioncount = 0; } ITERATE(q, useion) { int dcurdef = 0; int need_style = 0; sion = SYM(q); Sprintf(buf, "prop_ion = need_memb(_%s_sym);\n", sion->name); Lappendstr(defs_list, buf); if (ldifuslist) { sprintf(buf, " _type_i%s = prop_ion->_type;\n", sion->name); lappendstr(defs_list, buf); } ion_promote(q); q=q->next; ITERATE(q1, LST(q)) { SYM(q1)->nrntype |= NRNIONFLAG; Sprintf(buf, "\t_ppvar[%d]._pval = &prop_ion->param[%d]; /* %s */\n", ioncount++, iontype(SYM(q1)->name, sion->name), SYM(q1)->name); Lappendstr(defs_list, buf); } q=q->next; ITERATE(q1, LST(q)) { int itype = iontype(SYM(q1)->name, sion->name); if (SYM(q1)->nrntype & NRNIONFLAG) { SYM(q1)->nrntype &= ~NRNIONFLAG; }else{ Sprintf(buf, "\t_ppvar[%d]._pval = &prop_ion->param[%d]; /* %s */\n", ioncount++, itype, SYM(q1)->name); Lappendstr(defs_list, buf); } if (itype == IONCUR) { dcurdef = 1; Sprintf(buf, "\t_ppvar[%d]._pval = &prop_ion->param[%d]; /* _ion_di%sdv */\n", ioncount++, IONDCUR, sion->name); Lappendstr(defs_list, buf); } if (itype == IONIN || itype == IONOUT) { need_style = 1; } } if (need_style) { Sprintf(buf, "\t_ppvar[%d]._pvoid = (void*)(&(prop_ion->dparam[0]._i)); /* iontype for %s */\n", ioncount++, sion->name); Lappendstr(defs_list, buf); } q=q->next; if (!dcurdef && ldifuslist) { Sprintf(buf, "\t_ppvar[%d]._pval = &prop_ion->param[%d]; /* _ion_di%sdv */\n", ioncount++, IONDCUR, sion->name); Lappendstr(defs_list, buf); } } if (constructorfunc->next != constructorfunc) { Lappendstr(defs_list, "if (!nrn_point_prop_) {_constructor(_prop);}\n"); if (vectorize) { Lappendstr(procfunc, "\n\ static void _constructor(Prop* _prop) {\n\ double* _p; Datum* _ppvar; Datum* _thread;\n\ _thread = (Datum*)0;\n\ _p = _prop->param; _ppvar = _prop->dparam;\n\ {\n\ "); }else{ Lappendstr(procfunc, "\n\ static void _constructor(Prop* _prop) {\n\ _p = _prop->param; _ppvar = _prop->dparam;\n\ {\n\ "); } movelist(constructorfunc->next, constructorfunc->prev, procfunc); Lappendstr(procfunc, "\n}\n}\n"); } Lappendstr(defs_list, "\n}\n"); Lappendstr(defs_list, "static void _initlists();\n"); #if CVODE if (cvode_emit) { Lappendstr(defs_list, " /* some states have an absolute tolerance */\n"); Lappendstr(defs_list, "static Symbol** _atollist;\n"); Lappendstr(defs_list, "static HocStateTolerance _hoc_state_tol[] = {\n"); ITERATE(q, rangestate) { double d1; s = SYM(q); if (decode_tolerance(s, &d1)) { if (!point_process) { Sprintf(buf, "\"%s%s\", %g,\n", s->name, suffix, d1); }else{ Sprintf(buf, "\"%s\", %g,\n", s->name, d1); } Lappendstr(defs_list, buf); } } Lappendstr(defs_list, "0,0\n};\n"); } if (singlechan_) { sprintf(buf, "static _singlechan_declare%d();\n", singlechan_); Lappendstr(defs_list, buf); } #endif #if VECTORIZE if (net_send_seen_) { if (!net_receive_) { diag("can't use net_send if there is no NET_RECEIVE block", (char*)0); } sprintf(buf, "\n#define _tqitem &(_ppvar[%d]._pvoid)\n", tqitem_index); Lappendstr(defs_list, buf); if (net_send_delivered_) { insertstr(net_send_delivered_, " if (_lflag == 1. ) {*(_tqitem) = 0;}\n"); } } if (net_receive_) { Lappendstr(defs_list, "static void _net_receive(Point_process*, double*, double);\n"); if (for_netcons_) { Lappendstr(defs_list, "extern int _nrn_netcon_args(void*, double***);\n"); } if (net_init_q1_) { Lappendstr(defs_list, "static void _net_init(Point_process*, double*, double);\n"); } } if (vectorize && thread_mem_init_list->next != thread_mem_init_list) { Lappendstr(defs_list, "static void _thread_mem_init(Datum*);\n"); } if (vectorize && thread_cleanup_list->next != thread_cleanup_list) { Lappendstr(defs_list, "static void _thread_cleanup(Datum*);\n"); } if (uip) { lappendstr(defs_list, "static void _update_ion_pointer(Datum*);\n"); } if (use_bbcorepointer) { lappendstr(defs_list, "static void bbcore_write(double*, int*, int*, int*, _threadargsproto_);\n"); lappendstr(defs_list, "extern void hoc_reg_bbcore_write(int, void(*)(double*, int*, int*, int*, _threadargsproto_));\n"); } Lappendstr(defs_list, "\ extern Symbol* hoc_lookup(const char*);\n\ extern void _nrn_thread_reg(int, int, void(*)(Datum*));\n\ extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int));\n\ extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***);\n\ extern void _cvode_abstol( Symbol**, double*, int);\n\n\ "); Sprintf(buf, "void _%s_reg() {\n\ int _vectorized = %d;\n", modbase, vectorize); Lappendstr(defs_list, buf); q = lappendstr(defs_list, ""); Lappendstr(defs_list, "_initlists();\n"); #else Sprintf(buf, "void _%s_reg() {\n _initlists();\n", modbase); Lappendstr(defs_list, buf); #endif if (suffix[0]) { /* not "nothing" */ ITERATE(q, useion) { Sprintf(buf, "\tion_reg(\"%s\", %s);\n", SYM(q)->name, STR(q->next->next->next)); Lappendstr(defs_list, buf); q = q->next->next->next; } if (diamdec) { Lappendstr(defs_list, "\t_morphology_sym = hoc_lookup(\"morphology\");\n"); } ITERATE(q, useion) { Sprintf(buf, "\t_%s_sym = hoc_lookup(\"%s_ion\");\n", SYM(q)->name, SYM(q)->name); Lappendstr(defs_list, buf); q = q->next->next->next; } #if VECTORIZE if (point_process) { sprintf(buf, "\ _pointtype = point_register_mech(_mechanism,\n\ nrn_alloc,%s, nrn_init,\n\ hoc_nrnpointerindex, %d,\n\ _hoc_create_pnt, _hoc_destroy_pnt, _member_func);\n", brkpnt_str_, vectorize ? 1 + thread_data_index : 0); Lappendstr(defs_list, buf); if (destructorfunc->next != destructorfunc) { Lappendstr(defs_list, " register_destructor(_destructor);\n"); } }else{ sprintf(buf, "\ register_mech(_mechanism, nrn_alloc,%s, nrn_init, hoc_nrnpointerindex, %d);\n", brkpnt_str_, vectorize ? 1 + thread_data_index : 0); Lappendstr(defs_list, buf); } if (vectorize && thread_data_index) { sprintf(buf, " _extcall_thread = (Datum*)ecalloc(%d, sizeof(Datum));\n", thread_data_index); Lappendstr(defs_list, buf); if (thread_mem_init_list->next != thread_mem_init_list) { Lappendstr(defs_list, " _thread_mem_init(_extcall_thread);\n"); if (gind) {Lappendstr(defs_list, " _thread1data_inuse = 0;\n");} } } #endif Lappendstr(defs_list, "_mechtype = nrn_get_mechtype(_mechanism[1]);\n"); lappendstr(defs_list, " _nrn_setdata_reg(_mechtype, _setdata);\n"); if (vectorize && thread_mem_init_list->next != thread_mem_init_list) { lappendstr(defs_list, " _nrn_thread_reg(_mechtype, 1, _thread_mem_init);\n"); } if (vectorize && thread_cleanup_list->next != thread_cleanup_list) { lappendstr(defs_list, " _nrn_thread_reg(_mechtype, 0, _thread_cleanup);\n"); } if (uip) { lappendstr(defs_list, " _nrn_thread_reg(_mechtype, 2, _update_ion_pointer);\n"); } if (emit_check_table_thread) { lappendstr(defs_list, " _nrn_thread_table_reg(_mechtype, _check_table_thread);\n"); } if (use_bbcorepointer) { lappendstr(defs_list, " hoc_reg_bbcore_write(_mechtype, bbcore_write);\n"); } sprintf(buf, " hoc_register_prop_size(_mechtype, %d, %d);\n", parraycount, ppvar_cnt); Lappendstr(defs_list, buf); if (ppvar_semantics_) ITERATE(q, ppvar_semantics_) { sprintf(buf, " hoc_register_dparam_semantics(_mechtype, %d, \"%s\");\n", (int)q->itemtype, q->element.str); Lappendstr(defs_list, buf); } /* Models that write concentration need their INITIAL blocks called before those that read the concentration or reversal potential. */ i = 0; ITERATE(q, useion) { ITERATE(q1, LST(q->next->next)) { int type; type = iontype(SYM(q1)->name, SYM(q)->name); if (type == IONIN || type == IONOUT) { i += 1; } } q = q->next->next->next; } if (i) { Lappendstr(defs_list, "\tnrn_writes_conc(_mechtype, 0);\n"); } #if CVODE if (cvode_emit) { Lappendstr(defs_list,"\ hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol);\n"); Lappendstr(defs_list,"\ hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist);\n"); if (ion_synonym) { Lappendstr(defs_list, " hoc_register_synonym(_mechtype, _ode_synonym);\n"); } }else if (cvode_not_allowed) { Lappendstr(defs_list, "\ hoc_register_cvode(_mechtype, _ode_count, 0, 0, 0);\n"); } if (singlechan_) { sprintf(buf, "hoc_reg_singlechan(_mechtype, _singlechan_declare%d);\n", singlechan_); Lappendstr(defs_list, buf); } #endif if (artificial_cell) { if (brkpnt_exists || !net_receive_ || nrnpointers->next != nrnpointers || useion->next != useion ) { printf( "Notice: ARTIFICIAL_CELL is a synonym for POINT_PROCESS which hints that it\n\ only affects and is affected by discrete events. As such it is not\n\ located in a section and is not associated with an integrator\n" ); } sprintf(buf, "add_nrn_artcell(_mechtype, %d);\n", tqitem_index); Lappendstr(defs_list, buf); } if (net_event_seen_) { Lappendstr(defs_list, "add_nrn_has_net_event(_mechtype);\n"); } if (net_receive_) { Lappendstr(defs_list, "pnt_receive[_mechtype] = _net_receive;\n"); if (net_init_q1_) { Lappendstr(defs_list, "pnt_receive_init[_mechtype] = _net_init;\n"); } sprintf(buf, "pnt_receive_size[_mechtype] = %d;\n", net_receive_); Lappendstr(defs_list, buf); } if (for_netcons_) { sprintf(buf, "add_nrn_fornetcons(_mechtype, _fnc_index);\n"); Lappendstr(defs_list, buf); } q = ba_list_; for (i = 1; i <= ba_index_; ++i) { List* lst; q = q->next; if (electrode_current) { insertstr(ITM(q), " \ #if EXTRACELLULAR\n\ if (_nd->_extnode) {\n\ v = NODEV(_nd) +_nd->_extnode->_v[0];\n\ }else\n\ #endif\n\ {\n\ v = NODEV(_nd);\n\ }\n"); }else{ insertstr(ITM(q), " v = NODEV(_nd);\n"); } lst = get_ion_variables(0); if (lst->next != lst->prev) { move(lst->next, lst->prev, ITM(q)); freelist(lst); } q = q->next; lst = set_ion_variables(0); if (lst->next != lst->prev) { move(lst->next, lst->prev, ITM(q)); freelist(lst); } q = q->next; sprintf(buf, "\thoc_reg_ba(_mechtype, _ba%d, %s);\n", i, STR(q)); Lappendstr(defs_list, buf); } if (ldifuslist) { Lappendstr(defs_list, "\thoc_register_ldifus1(_difusfunc);\n"); Linsertstr(defs_list, "static void _difusfunc(ldifusfunc2_t, _NrnThread*);\n"); } } /* end of not "nothing" */ Lappendstr(defs_list, "\ hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc);\n"); if (GETWD(buf)) { char buf1[NRN_BUFSIZE]; #if defined(MINGW) { char* cp; for (cp = buf; *cp; ++cp) { if (*cp == '\\') { *cp = '/'; } } } #endif sprintf(buf1, "\tivoc_help(\"help ?1 %s %s/%s\\n\");\n", mechname, buf, finname); Lappendstr(defs_list, buf1); } if (suffix[0]) { Lappendstr(defs_list, "hoc_register_limits(_mechtype, _hoc_parm_limits);\n"); Lappendstr(defs_list, "hoc_register_units(_mechtype, _hoc_parm_units);\n"); } Lappendstr(defs_list, "}\n"); /* end of _reg */ if (vectorize && thread_mem_init_list->next != thread_mem_init_list) { Lappendstr(procfunc, "\nstatic void _thread_mem_init(Datum* _thread) {\n"); move(thread_mem_init_list->next, thread_mem_init_list->prev, procfunc); Lappendstr(procfunc, "}\n"); } if (vectorize && thread_cleanup_list->next != thread_cleanup_list) { Lappendstr(procfunc, "\nstatic void _thread_cleanup(Datum* _thread) {\n"); move(thread_cleanup_list->next, thread_cleanup_list->prev, procfunc); Lappendstr(procfunc, "}\n"); } if (uip) { move(uip->next, uip->prev, procfunc); } if (destructorfunc->next != destructorfunc) { if (vectorize) { Lappendstr(procfunc, "\n\ static void _destructor(Prop* _prop) {\n\ double* _p; Datum* _ppvar; Datum* _thread;\n\ _thread = (Datum*)0;\n\ _p = _prop->param; _ppvar = _prop->dparam;\n\ {\n\ "); }else{ Lappendstr(procfunc, "\n\ static void _destructor(Prop* _prop) {\n\ _p = _prop->param; _ppvar = _prop->dparam;\n\ {\n\ "); } movelist(destructorfunc->next, destructorfunc->prev, procfunc); Lappendstr(procfunc, "\n}\n}\n"); } if (ldifuslist) { ldifusreg(); } SYMLISTITER { s = SYM(q); if ((s->subtype & PARM)) { warn_ignore(s); } } } void warn_ignore(s) Symbol* s; { int b; double d1, d2; b = 0; if (s->nrntype & (NRNEXTRN | NRNPRANGEIN | NRNPRANGEOUT)) b = 1; if (strcmp(s->name, "v") == 0) b = 1; decode_ustr(s, &d1, &d2, buf); if (d1 == 0.0) b = 0; if (b) { printf("Warning: Default %g of PARAMETER %s will be ignored and set by NEURON.\n", d1, s->name); } } void ldifusreg() { Item* q, *qdexp, *qb1, *qvexp, *qb2, *q1; char* cfindex, *dfdcur; Symbol* s, *d; int n; /* ldifuslist format: series of symbol qdexp qb1 svexp qb2 indexforflux dflux/dconc */ n = 0; ITERATE(q, ldifuslist) { s = SYM(q); q = q->next; qdexp = ITM(q); q = q->next; qb1 = ITM(q); q = q->next; qvexp = ITM(q); q = q->next; qb2 = ITM(q); q = q->next; cfindex = STR(q); q = q->next; dfdcur = STR(q); ++n; sprintf(buf, "static void* _difspace%d;\nextern double nrn_nernst_coef();\n\ static double _difcoef%d(int _i, double* _p, Datum* _ppvar, double* _pdvol, double* _pdfcdc, Datum* _thread, _NrnThread* _nt) {\n \ *_pdvol = ", n, n); lappendstr(procfunc, buf); for (q1 = qvexp; q1 != qb2; q1 = q1->next) { lappenditem(procfunc, q1); } if (dfdcur[0]) { sprintf(buf, ";\n\ if (_i == %s) {\n *_pdfcdc = %s;\n }else{ *_pdfcdc=0.;}\n", cfindex, dfdcur); }else{ sprintf(buf, "; *_pdfcdc=0.;\n"); } lappendstr(procfunc, buf); lappendstr(procfunc, " return"); for (q1 = qdexp; q1 != qb1; q1 = q1->next) { lappenditem(procfunc, q1); } lappendstr(procfunc, ";\n}\n"); } lappendstr(procfunc, "static void _difusfunc(ldifusfunc2_t _f, _NrnThread* _nt) {int _i;\n"); n = 0; ITERATE(q, ldifuslist) { s = SYM(q); q = q->next; qdexp = ITM(q); q = q->next; qb1 = ITM(q); q = q->next; qvexp = ITM(q); q = q->next; qb2 = ITM(q); q = q->next; cfindex = STR(q); q = q->next; dfdcur = STR(q); ++n; if (s->subtype & ARRAY) { #if MAC sprintf(buf, " for (_i=0; _i < %d; ++_i) mac_difusfunc(_f, _mechtype, _difcoef%d, &_difspace%d, _i, ", s->araydim, n, n); #else sprintf(buf, " for (_i=0; _i < %d; ++_i) (*_f)(_mechtype, _difcoef%d, &_difspace%d, _i, ", s->araydim, n, n); #endif }else{ #if MAC sprintf(buf, " mac_difusfunc(_f,_mechtype, _difcoef%d, &_difspace%d, 0, ", n, n); #else sprintf(buf, " (*_f)(_mechtype, _difcoef%d, &_difspace%d, 0, ", n, n); #endif } lappendstr(procfunc, buf); sprintf(buf, "D%s", s->name); d = lookup(buf); assert(d); if (s->nrntype & IONCONC) { sprintf(buf, "%d, %d", - (s->ioncount_ + 1), d->varnum); }else{ sprintf(buf, "%d, %d", s->varnum, d->varnum); } lappendstr(procfunc, buf); lappendstr(procfunc, ", _nt);\n"); } lappendstr(procfunc, "}\n"); } static int decode_limits(sym, pg1, pg2) Symbol *sym; double *pg1, *pg2; { int i; double d1; if (sym->subtype & PARM) { char* cp; int n; assert(sym->u.str); for (n=0, cp = sym->u.str; *cp; ++cp) { if (*cp == '\n') { ++n; if (n == 3) { ++cp; break; } } } i = sscanf(cp, "%lf %lf\n", pg1, pg2); if (i == 2) { return 1; } } return 0; } static int decode_tolerance(sym, pg1) Symbol *sym; double *pg1; { int i; double d1; if (sym->subtype & STAT) { char* cp; int n; for (n=0, cp = sym->u.str; *cp; ++cp) { if (*cp == '\n') { ++n; if (n == 3) { ++cp; break; } } } i = sscanf(cp, "%lf\n", pg1); if (i == 1) { return 1; } } return 0; } void decode_ustr(sym, pg1, pg2, s) /* decode sym->u.str */ Symbol *sym; char *s; double *pg1, *pg2; { int i, n; char *cp, *cp1; switch (sym->subtype & (INDEP | DEP | STAT | PARM)) { case INDEP: /* but doesnt get all info */ case DEP: case STAT: assert(sym && sym->u.str); if (sym->subtype & ARRAY) { /* see parsact.c */ i = sscanf(sym->u.str, "[%*d]\n%lf%*c%lf", pg1, pg2); }else{ i = sscanf(sym->u.str, "%lf%*c%lf", pg1, pg2); } assert(i == 2); for (n=0, cp = sym->u.str; n < 2;) { if (*cp++ == '\n') { n++; } } for (cp1 = s; *cp != '\n';) { *cp1++ = *cp++; } *cp1 = '\0'; break; case PARM: assert(sym && sym->u.str); if (sym->subtype & ARRAY) { /* see parsact.c */ i = sscanf(sym->u.str, "[%*d]\n%lf\n%s", pg1, s); }else{ i = sscanf(sym->u.str, "%lf\n%s", pg1, s); } if (i == 1) { s[0] = '\0'; i = 2; } assert(i == 2); break; default: diag(sym->name, " does not have a proper declaration"); } if (s[0] == '0') {s[0] = '\0';} } void units_reg() { Symbol* s; Item* q; double d1, d2; char u[NRN_BUFSIZE]; Lappendstr(defs_list, "static HocParmUnits _hoc_parm_units[] = {\n"); ITERATE (q, syminorder) { s = SYM(q); if (s->nrntype & NRNGLOBAL) { decode_ustr(s, &d1, &d2, u); if (u[0]) { sprintf(buf, "\"%s%s\", \"%s\",\n", s->name, suffix, u); lappendstr(defs_list, buf); } } } ITERATE (q, rangeparm) { s = SYM(q); decode_ustr(s, &d1, &d2, u); if (u[0]) { sprintf(buf, "\"%s%s\", \"%s\",\n", s->name, rsuffix, u); lappendstr(defs_list, buf); } } ITERATE (q, rangestate) { s = SYM(q); decode_ustr(s, &d1, &d2, u); if (u[0]) { sprintf(buf, "\"%s%s\", \"%s\",\n", s->name, rsuffix, u); lappendstr(defs_list, buf); } } ITERATE (q, rangedep) { s = SYM(q); decode_ustr(s, &d1, &d2, u); if (u[0]) { sprintf(buf, "\"%s%s\", \"%s\",\n", s->name, rsuffix, u); lappendstr(defs_list, buf); } } ITERATE (q, nrnpointers) { s = SYM(q); decode_ustr(s, &d1, &d2, u); if (u[0]) { sprintf(buf, "\"%s%s\", \"%s\",\n", s->name, rsuffix, u); lappendstr(defs_list, buf); } } Lappendstr(defs_list, "0,0\n};\n"); } static void var_count(s) Symbol *s; { defs_h(s); s->used = varcount++; s->varnum = parraycount; if (s->subtype & ARRAY) { parraycount += s->araydim; }else{ parraycount++; } } static void defs_h(s) Symbol *s; { Item *q; if (s->subtype & ARRAY) { Sprintf(buf, "#define %s (_p + %d)\n", s->name, parraycount); q = lappendstr(defs_list, buf); } else { Sprintf(buf, "#define %s _p[%d]\n", s->name, parraycount); q = lappendstr(defs_list, buf); } q->itemtype = VERBATIM; } void nrn_list(q1, q2) Item *q1, *q2; { List **plist = (List **)0; Item *q; switch (SYM(q1)->type) { case RANGE: plist = (List **)0; for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->nrntype |= NRNRANGE; } break; case SUFFIX: plist = (List **)0; mechname = SYM(q2)->name; if (strcmp(SYM(q1)->name, "POINT_PROCESS") == 0) { point_process = 1; }else if (strcmp(SYM(q1)->name, "ARTIFICIAL_CELL") == 0) { point_process = 1; artificial_cell = 1; } break; case ELECTRODE_CURRENT: electrode_current = 1; case NONSPECIFIC: plist = ¤ts; for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->nrntype |= NRNRANGE; } break; case SECTION: diag("NEURON SECTION variables not implemented", (char *)0); break; case GLOBAL: for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->nrntype |= NRNGLOBAL | NRNNOTP; } plist = (List **)0; break; case EXTERNAL: #if VECTORIZE threadsafe("Use of EXTERNAL is not thread safe."); #endif for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->nrntype |= NRNEXTRN | NRNNOTP; } plist = (List **)0; break; case POINTER: threadsafe("Use of POINTER is not thread safe."); plist = &nrnpointers; for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->nrntype |= NRNNOTP | NRNPOINTER; } break; case BBCOREPOINTER: threadsafe("Use of BBCOREPOINTER is not thread safe."); plist = &nrnpointers; for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->nrntype |= NRNNOTP | NRNBBCOREPOINTER; } use_bbcorepointer = 1; break; } if (plist) { if (!*plist) { *plist = newlist(); } assert (q1 != q2); movelist(q1->next, q2, *plist); } } void bablk(ba, type, q1, q2) int ba, type; Item *q1, *q2; { Item* qb, *qv, *q; qb = insertstr(q1->prev->prev, "/*"); insertstr(q1, "*/\n"); if (!ba_list_) { ba_list_ = newlist(); } sprintf(buf, "static void _ba%d(Node*_nd, double* _pp, Datum* _ppd, Datum* _thread, _NrnThread* _nt) ", ++ba_index_); insertstr(q1, buf); q = q1->next; vectorize_substitute(insertstr(q, ""), "double* _p; Datum* _ppvar;"); qv = insertstr(q, "_p = _pp; _ppvar = _ppd;\n"); movelist(qb, q2, procfunc); ba = (ba == BEFORE) ? 10 : 20; /* BEFORE or AFTER */ ba += (type == BREAKPOINT) ? 1 : 0; ba += (type == SOLVE) ? 2 : 0; ba += (type == INITIAL1) ? 3 : 0; ba += (type == STEP) ? 4 : 0; lappenditem(ba_list_, qv->next); lappenditem(ba_list_, q2); sprintf(buf, "%d", ba); lappendstr(ba_list_, buf); } int ion_declared(Symbol* s) { Item* q; int used = 0; ITERATE(q, useion) { if (SYM(q) == s) { used = 1; } q = q->next->next->next; } return used; } void nrn_use(q1, q2, q3, q4) Item *q1, *q2, *q3, *q4; { int used, i; Item *q, *qr, *qw; List *readlist, *writelist; Symbol *ion; ion = SYM(q1); /* is it already used */ used = ion_declared(SYM(q1)); if (used) { /* READ gets promoted to WRITE */ diag("mergeing of neuron models not supported yet", (char *)0); }else{ /* create all the ionic variables */ Lappendsym(useion, ion); readlist = newlist(); writelist = newlist(); qr = lappendsym(useion, SYM0); qw = lappendsym(useion, SYM0); if (q4) { lappendstr(useion, STR(q4)); }else{ lappendstr(useion, "-10000."); } LST(qr) = readlist; LST(qw) = writelist; if (q2) { Item *qt = q2->next; move(q1->next->next, q2, readlist); if (q3) { move(qt->next, q3, writelist); } }else if (q3) { move(q1->next->next, q3, writelist); } ITERATE(q, readlist) { i = iontype(SYM(q)->name, ion->name); if (i == IONCUR) { SYM(q)->nrntype |= NRNCURIN; }else{ SYM(q)->nrntype |= NRNPRANGEIN; if (i == IONIN || i == IONOUT) { SYM(q)->nrntype |= IONCONC; } } } ITERATE(q, writelist) { i = iontype(SYM(q)->name, ion->name); if (i == IONCUR) { if (!currents) { currents = newlist(); } Lappendsym(currents, SYM(q)); SYM(q)->nrntype |= NRNCUROUT; }else{ SYM(q)->nrntype |= NRNPRANGEOUT; if (i == IONIN || i == IONOUT) { SYM(q)->nrntype |= IONCONC; } } } } } static int iontype(s1, s2) /* returns index of variable in ion mechanism */ char *s1, *s2; { Sprintf(buf, "i%s", s2); if (strcmp(buf, s1) == 0) { return IONCUR; } Sprintf(buf, "e%s", s2); if (strcmp(buf, s1) == 0) { return IONEREV; } Sprintf(buf, "%si", s2); if (strcmp(buf, s1) == 0) { return IONIN; } Sprintf(buf, "%so", s2); if (strcmp(buf, s1) == 0) { return IONOUT; } Sprintf(buf, "%s is not a valid ionic variable for %s", s1, s2); diag(buf, (char *)0); return -1; } static Symbol *ifnew_install(name) char *name; { Symbol *s; if ((s = lookup(name)) == SYM0) { s = install(name, NAME); parminstall(s, "0", "", ""); } return s; } static void nrndeclare() { Symbol *s; Item *q; s=lookup("diam"); if (s) { if (s->nrntype & (NRNRANGE|NRNGLOBAL)) { diag(s->name, " cannot be a RANGE or GLOBAL variable for this mechanism"); } s->nrntype |= NRNNOTP|NRNPRANGEIN; diamdec=1; } s=lookup("area"); if (s) { if (s->nrntype & (NRNRANGE|NRNGLOBAL)) { diag(s->name, " cannot be a RANGE or GLOBAL variable for this mechanism"); } s->nrntype |= NRNNOTP|NRNPRANGEIN; areadec=1; } #if VECTORIZE if (vectorize) { s = ifnew_install("v"); s->nrntype = NRNNOTP; /* this is a lie, it goes in at end specially */ }else #endif { s = ifnew_install("v"); s->nrntype |= NRNSTATIC | NRNNOTP; } s = ifnew_install("t"); s->nrntype |= NRNEXTRN | NRNNOTP; s = ifnew_install("dt"); s->nrntype |= NRNEXTRN | NRNNOTP; vectorize_substitute(lappendstr(defs_list, "\n#define t nrn_threads->_t\n#define dt nrn_threads->_dt\n"), "\n#define t _nt->_t\n#define dt _nt->_dt\n"); s=lookup("usetable"); if (s) { s->nrntype |= NRNGLOBAL | NRNNOTP;} s=lookup("celsius");if(s){s->nrntype |= NRNEXTRN | NRNNOTP;} s=lookup("celcius"); if (s) diag("celcius should be spelled celsius", (char *)0); ITERATE(q, syminorder) { s = SYM(q); if (s->type == NAME || s->type == PRIME) { if (s->subtype & PARM && s->nrntype & NRNRANGE) { Lappendsym(rangeparm, s); } else if (s->subtype & STAT) { s->nrntype |= NRNRANGE; Lappendsym(rangestate, s); } else if (s->subtype & DEP && s->nrntype & NRNRANGE) { Lappendsym(rangedep, s); } if (s != indepsym && !s->nrntype) { if (s->subtype & PARM) { if (s->usage & EXPLICIT_DECL) { s->nrntype |= NRNGLOBAL; s->nrntype |= NRNNOTP; }else{ s->nrntype |= NRNSTATIC; s->nrntype |= NRNNOTP; } } } } } /* some ionic variables don't need duplicates known to hoc */ del_range(rangeparm); del_range(rangestate); del_range(rangedep); } static void del_range(range) List *range; { Item *q, *q1; Symbol *s; for (q = ((Item *)range)->next; q != (Item *)range; q = q1) { q1 = q->next; s = SYM(q); if (s->nrntype & (NRNPRANGEIN | NRNPRANGEOUT)) { delete(q); } } } static void declare_p() { Item *q; Symbol* s; ITERATE(q, syminorder) { SYM(q)->used = -1; } ITERATE(q, rangeparm) { var_count(SYM(q)); } ITERATE(q, rangedep) { var_count(SYM(q)); } ITERATE(q, rangestate) { var_count(SYM(q)); } ITERATE(q, syminorder) { if (!(SYM(q)->nrntype & NRNNOTP) && SYM(q)->used < 0) { var_count(SYM(q)); } } #if VECTORIZE if (vectorize) { s = ifnew_install("v"); var_count(s); } #endif if (brkpnt_exists) { s = ifnew_install("_g"); var_count(s); } if (debugging_ && net_receive_) { s = ifnew_install("_tsav"); var_count(s); } } List *set_ion_variables(block) int block; /* 0 means equation block , 2 means initial block */ { /*ARGSUSED*/ Item *q, *q1, *qconc; char* in; static List *l; l = newlist(); ITERATE(q, useion) { in = SYM(q)->name; q = q->next; q = q->next; qconc = (Item*)0; ITERATE(q1, LST(q)) { if (SYM(q1)->nrntype & NRNCUROUT) { if ( block == 0) { Sprintf(buf, " _ion_%s += %s", SYM(q1)->name, breakpoint_current(SYM(q1))->name); Lappendstr(l, buf); if (point_process) { Sprintf(buf, "* 1.e2/ (_nd_area);\n"); }else{ Sprintf(buf, ";\n"); } }else{ buf[0] = '\0'; } }else{ if (iontype(SYM(q1)->name, in) != IONEREV) { qconc = q1; } Sprintf(buf, " _ion_%s = %s;\n", SYM(q1)->name, SYM(q1)->name); } Lappendstr(l, buf); } q = q->next; /* when INITIAL block is called, if it modifies the concentrations then the reversal potential should be recomputed in case other mechanisms need the true initial value. This would be rare since most initial blocks do not depend on erev. Instead the right value will be present due to fcurrent or cvode f(y). However, this fastidiousness cant hurt. It just makes ion_style in effect always at least for initialization. */ /* sure enough, someone needed to demote the ion_style so that erev is decoupled from concentrations. So we need another variable pointing to the ionstyle */ if (block == 2 && qconc) { int ic = iontype(SYM(qconc)->name, in); if (ic == IONIN) { ic = 1; }else if (ic == IONOUT) { ic = 2; }else{ assert(0); } /* first arg is just for the charge, second is pointer to erev, third ard is the style*/ Sprintf(buf, " nrn_wrote_conc(_%s_sym, (&(_ion_%s)) - %d, _style_%s);\n", in, SYM(qconc)->name, ic, in); Lappendstr(l, buf); } } return l; } List *get_ion_variables(block) int block; /* 0 means equation block */ /* 2 means ode_spec and ode_matsol blocks */ { /*ARGSUSED*/ Item *q, *q1; static List *l; l = newlist(); ITERATE(q, useion) { q = q->next; ITERATE(q1, LST(q)) { if (block == 2 && (SYM(q1)->nrntype & IONCONC) && (SYM(q1)->subtype & STAT)) { continue; } Sprintf(buf, " %s = _ion_%s;\n", SYM(q1)->name, SYM(q1)->name); Lappendstr(l, buf); if (point_process && (SYM(q1)->nrntype & NRNCURIN)) { Fprintf(stderr, "WARNING: Dimensions may be wrong for READ %s with POINT_PROCESS\n", SYM(q1)->name); } } q = q->next; ITERATE(q1, LST(q)) { if (block == 2 && (SYM(q1)->nrntype & IONCONC) && (SYM(q1)->subtype & STAT)) { continue; } if (SYM(q1)->nrntype & IONCONC) { Sprintf(buf, " %s = _ion_%s;\n", SYM(q1)->name, SYM(q1)->name); Lappendstr(l, buf); } if (SYM(q1)->subtype & STAT) { if (SYM(q1)->nrntype & NRNCUROUT) { Fprintf(stderr, "WARNING: WRITE %s with it a STATE may not be translated correctly\n", SYM(q1)->name); } } } q = q->next; } return l; } static int iondef(p_pointercount) int *p_pointercount; { int ioncount, it, need_style; Item *q, *q1, *q2; Symbol *sion; char ionname[256]; ioncount = 0; if (point_process) { ioncount = 2; q = lappendstr(defs_list, "#define _nd_area *_ppvar[0]._pval\n"); q->itemtype = VERBATIM; ppvar_semantics(0, "area"); ppvar_semantics(1, "pntproc"); } ITERATE(q, useion) { int dcurdef = 0; if (!uip) { uip = newlist(); lappendstr(uip, "extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int);\n"); lappendstr(uip, "static void _update_ion_pointer(Datum* _ppvar) {\n"); } need_style = 0; sion = SYM(q); sprintf(ionname, "%s_ion", sion->name); q=q->next; ITERATE(q1, LST(q)) { SYM(q1)->nrntype |= NRNIONFLAG; Sprintf(buf, "#define _ion_%s *_ppvar[%d]._pval\n", SYM(q1)->name, ioncount); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; sprintf(buf, " nrn_update_ion_pointer(_%s_sym, _ppvar, %d, %d);\n", sion->name, ioncount, iontype(SYM(q1)->name, sion->name)); lappendstr(uip, buf); SYM(q1)->ioncount_ = ioncount; ppvar_semantics(ioncount, ionname); ioncount++; } q=q->next; ITERATE(q1, LST(q)) { if (SYM(q1)->nrntype & NRNIONFLAG) { SYM(q1)->nrntype &= ~NRNIONFLAG; }else{ Sprintf(buf, "#define _ion_%s *_ppvar[%d]._pval\n", SYM(q1)->name, ioncount); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; sprintf(buf, " nrn_update_ion_pointer(_%s_sym, _ppvar, %d, %d);\n", sion->name, ioncount, iontype(SYM(q1)->name, sion->name)); lappendstr(uip, buf); SYM(q1)->ioncount_ = ioncount; ppvar_semantics(ioncount, ionname); ioncount++; } it = iontype(SYM(q1)->name, sion->name); if (it == IONCUR) { dcurdef = 1; Sprintf(buf, "#define _ion_di%sdv\t*_ppvar[%d]._pval\n", sion->name, ioncount); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; sprintf(buf, " nrn_update_ion_pointer(_%s_sym, _ppvar, %d, 4);\n", sion->name, ioncount); lappendstr(uip, buf); ppvar_semantics(ioncount, ionname); ioncount++; } if (it == IONIN || it == IONOUT) { /* would have wrote_ion_conc */ need_style = 1; } } if (need_style) { Sprintf(buf, "#define _style_%s\t*((int*)_ppvar[%d]._pvoid)\n", sion->name, ioncount); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; sprintf(buf, "#%s", ionname); ppvar_semantics(ioncount, buf); ioncount++; } q=q->next; if (!dcurdef && ldifuslist) { Sprintf(buf, "#define _ion_di%sdv\t*_ppvar[%d]._pval\n", sion->name, ioncount); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; sprintf(buf, " nrn_update_ion_pointer(_%s_sym, _ppvar, %d, 4);\n", sion->name, ioncount); lappendstr(uip, buf); ppvar_semantics(ioncount, ionname); ioncount++; } } *p_pointercount = 0; ITERATE(q, nrnpointers) { sion = SYM(q); Sprintf(buf, "#define %s *_ppvar[%d]._pval\n", sion->name, ioncount + *p_pointercount); sion->used = ioncount + *p_pointercount; q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; Sprintf(buf, "#define _p_%s _ppvar[%d]._pval\n", sion->name, ioncount + *p_pointercount); sion->used = ioncount + *p_pointercount; q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; if (sion->nrntype & NRNPOINTER) { ppvar_semantics(ioncount + *p_pointercount, "pointer"); }else{ ppvar_semantics(ioncount + *p_pointercount, "bbcorepointer"); } (*p_pointercount)++; } if (diamdec) { /* must be last */ Sprintf(buf, "#define diam *_ppvar[%d]._pval\n", ioncount + *p_pointercount); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; } /* notice that ioncount is not incremented */ if (areadec) { /* must be last, if we add any more the administrative procedures must be redone */ Sprintf(buf, "#define area *_ppvar[%d]._pval\n", ioncount+ *p_pointercount + diamdec); q2 = lappendstr(defs_list, buf); q2->itemtype = VERBATIM; } /* notice that ioncount is not incremented */ if (uip) { lappendstr(uip, "}\n"); } return ioncount; } void ppvar_semantics(int i, const char* name) { Item* q; if (!ppvar_semantics_) { ppvar_semantics_ = newlist(); } q = Lappendstr(ppvar_semantics_, name); q->itemtype = (short)i; } List *begin_dion_stmt() { Item *q, *q1, *qbrak; static List *l; char *strion; l = newlist(); qbrak = lappendstr(l, "\t{"); ITERATE(q, useion) { strion = SYM(q)->name; q = q->next; q = q->next; ITERATE(q1, LST(q)) { if (SYM(q1)->nrntype & NRNCUROUT) { Sprintf(buf, " _di%s = %s;\n", strion, SYM(q1)->name); Lappendstr(l, buf); Sprintf(buf, "double _di%s;\n", strion); Insertstr(qbrak->next, buf); } } q = q->next; } return l; } List *end_dion_stmt(strdel) char *strdel; { Item *q, *q1; static List *l; char *strion; l = newlist(); ITERATE(q, useion) { strion = SYM(q)->name; q = q->next; q = q->next; ITERATE(q1, LST(q)) { if (SYM(q1)->nrntype & NRNCUROUT) { Sprintf(buf, " _ion_di%sdv += (_di%s - %s)/%s", strion, strion, SYM(q1)->name, strdel); Lappendstr(l, buf); if (point_process) { Lappendstr(l, "* 1.e2/ (_nd_area);\n"); }else{ Lappendstr(l, ";\n"); } } } q = q->next; } Lappendstr(l, "\t}\n"); return l; } static void ion_promote(qion) Item* qion; { Item* q; char* in; int conc, rev; int type; conc = 0; rev = 0; in = SYM(qion)->name; ITERATE(q, LST(qion->next)) { /* check READ */ type = iontype(SYM(q)->name, in); if (type == IONIN || type == IONOUT) { conc = 1; } if (type == IONEREV) { rev = 1; } } ITERATE(q, LST(qion->next->next)) { /* promote if WRITE */ type = iontype(SYM(q)->name, in); if (type == IONIN) { Lappendstr(defs_list, "nrn_check_conc_write(_prop, prop_ion, 1);\n"); conc = 3; } if (type == IONOUT) { Lappendstr(defs_list, "nrn_check_conc_write(_prop, prop_ion, 0);\n"); conc = 3; } if (type == IONEREV) { rev = 3; } } if (conc || rev) { Sprintf(buf, "nrn_promote(prop_ion, %d, %d);\n", conc, rev); Lappendstr(defs_list, buf); } } #define NRNFIX(arg) if (strcmp(n, arg) == 0) e=1; void nrn_var_assigned(s) Symbol* s; { int e; char* n; if (s->assigned_to_ == 0) { s->assigned_to_ = 1; } if (protect_) { s->assigned_to_ = 2; } e = 0; n = s->name; NRNFIX("area"); NRNFIX("diam"); NRNFIX("t"); NRNFIX("dt"); NRNFIX("celsius"); if (e) { diag(s->name, " is a special NEURON variable that should not be\n assigned a value\ in a model description file\n"); } } #if CVODE static int cvode_valid_, using_cvode; static int cvode_num_, cvode_neq_; static Symbol* cvode_fun_; void slist_data(s, indx, findx) Symbol* s; int indx, findx; { /* format: number of pairs, followed by findx, indx pairs */ int* pi; int i, n; if (s->slist_info_) { /* i'd use realloc but to avoid portability problems */ /* this probably will never get executed anyway */ n = s->slist_info_[0] + 1; pi = (int*)emalloc((1 + 2*n)*sizeof(int)); for (i=2*(n-1); i > 0; --i) { pi[i] = s->slist_info_[i]; } free(s->slist_info_); s->slist_info_ = pi; pi[0] = n; pi[2*n-1] = findx; pi[2*n] = indx; }else{ s->slist_info_ = pi = (int*)emalloc(3*sizeof(int)); pi[0] = 1; pi[1] = findx; pi[2] = indx; } } int slist_search(n, s) int n; Symbol* s; { int i, *pi; pi = s->slist_info_; if (pi == (int*)0) { diag(s->name, " not really a STATE; Ie. No differential equation for it.\n"); } assert(pi); for (i=0; i < pi[0]; ++i) { if (pi[1+2*i] == n) { return pi[2+2*i]; } } assert(0); return 0; } static void cvode_conc_map() { /* pv index is slist index, ppd index is to the concentration pointer to the ion concentration is eg. &(ion_cai). Unfortunately the slist index has nothing to do with the _p array index. To recover the slist index, an slist_index list was made for every slist which consists of an slist ordered list of state symbols */ /* also must handle case where user WRITE cai but cai is not a STATE since inefficiency occurs due to inability to set eca when states are predicted */ Item* q, *q1, *q2, *q3; int sindex; ITERATE(q, useion) { q = q->next; q = q->next; ITERATE(q1, LST(q)) { if (SYM(q1)->nrntype & IONCONC) { if ((SYM(q1)->subtype & STAT)) { sindex = slist_search(cvode_num_, SYM(q1)); sprintf(buf, "\t_pv[%d] = &(_ion_%s);\n", sindex, SYM(q1)->name); lappendstr(procfunc, buf); }else{ /* not a STATE but WRITE it*/ /*its got to have an assignment in a SOLVE block and that assignment better not depend on intermediate variables that depend on states because we will assign cai using only that statement prior to calling the nernst equation code. */ int b = 0; if (!ion_synonym) { ion_synonym = newlist(); } ITERATE(q2, procfunc) { if (q2->itemtype == SYMBOL && SYM(q2) == SYM(q1)) { q3 = q2->next; if (q3->itemtype == SYMBOL && strcmp(SYM(q3)->name, "=") == 0) { /*printf(" found reference to %s = ...\n", SYM(q2)->name);*/ sprintf(buf, "_ion_%s = ", SYM(q2)->name); lappendstr(ion_synonym, buf); for (q3 = q3->next; q3 != procfunc->prev; q3 = q3->next) { lappenditem(ion_synonym, q3); if (q3->itemtype == SYMBOL && SYM(q3) == semi) { #if 0 if (q3->itemtype == STRING && strchr(STR(q3), ';')) { char* e, *s = stralloc(STR(q3), (char*)0); e = strchr(s, ';'); *e = '\0'; sprintf(buf, "%s;\n", s); printf("|%s||%s||%s|\n",STR(q3), s, buf); lappendstr(ion_synonym, buf); #endif b = 1; break; } } break; } } } if (b == 0) { diag(SYM(q1)->name, " is WRITE but is not a STATE and has no assignment statement"); } } } } q = q->next; } } void out_nt_ml_frag(List* p) { vectorize_substitute(lappendstr(p, " Datum* _thread;\n"), " double* _p; Datum* _ppvar; Datum* _thread;\n"); Lappendstr(p, " Node* _nd; double _v; int _iml, _cntml;\n\ _cntml = _ml->_nodecount;\n\ _thread = _ml->_thread;\n\ for (_iml = 0; _iml < _cntml; ++_iml) {\n\ _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml];\n\ _nd = _ml->_nodelist[_iml];\n\ v = NODEV(_nd);\n\ "); } void cvode_emit_interface() { List* lst; Item* q, *q1; if (cvode_not_allowed) { Lappendstr(defs_list, "\n\ static int _ode_count(int);\n"); sprintf(buf, "\n\ static int _ode_count(int _type){ hoc_execerror(\"%s\", \"cannot be used with CVODE\"); return 0;}\n", mechname); Lappendstr(procfunc, buf); }else if (cvode_emit) { Lappendstr(defs_list, "\n\ static int _ode_count(int);\n\ static void _ode_map(int, double**, double**, double*, Datum*, double*, int);\n\ static void _ode_spec(_NrnThread*, _Memb_list*, int);\n\ static void _ode_matsol(_NrnThread*, _Memb_list*, int);\n\ "); sprintf(buf, "\n\ static int _ode_count(int _type){ return %d;}\n", cvode_neq_); Lappendstr(procfunc, buf); sprintf(buf, "\n#define _cvode_ieq _ppvar[%d]._i\n",cvode_ieq_index); Lappendstr(defs_list, buf); if (cvode_fun_->subtype == PROCED) { cvode_proced_emit(); }else{ Lappendstr(procfunc, "\nstatic void _ode_spec(_NrnThread* _nt, _Memb_list* _ml, int _type) {\n"); out_nt_ml_frag(procfunc); lst = get_ion_variables(1); if (lst->next->itemtype) movelist(lst->next, lst->prev, procfunc); sprintf(buf," _ode_spec%d", cvode_num_); Lappendstr(procfunc, buf); vectorize_substitute(lappendstr(procfunc, "();\n"), "(_p, _ppvar, _thread, _nt);\n"); lst = set_ion_variables(1); if (lst->next->itemtype) movelist(lst->next, lst->prev, procfunc); Lappendstr(procfunc, "}}\n"); Lappendstr(procfunc, "\n\ static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) {"); vectorize_substitute(lappendstr(procfunc, "\n"), "\n\ double* _p; Datum* _ppvar;\n"); sprintf(buf, "\ int _i; _p = _pp; _ppvar = _ppd;\n\ _cvode_ieq = _ieq;\n\ for (_i=0; _i < %d; ++_i) {\n\ _pv[_i] = _pp + _slist%d[_i]; _pvdot[_i] = _pp + _dlist%d[_i];\n\ _cvode_abstol(_atollist, _atol, _i);\n\ }\n", cvode_neq_, cvode_num_, cvode_num_); Lappendstr(procfunc, buf); /* need to take care of case where a state is an ion concentration. Replace the _pp pointer with a pointer to the actual ion model's concentration */ cvode_conc_map(); Lappendstr(procfunc, "}\n"); if (ion_synonym) { Lappendstr(defs_list, "static void _ode_synonym(int, double**, Datum**);\n"); Lappendstr(procfunc, "\ static void _ode_synonym(int _cnt, double** _pp, Datum** _ppd) {"); vectorize_substitute(lappendstr(procfunc, "\n"), "\n\ double* _p; Datum* _ppvar;\n"); Lappendstr(procfunc, "\ int _i; \n\ for (_i=0; _i < _cnt; ++_i) {_p = _pp[_i]; _ppvar = _ppd[_i];\n"); movelist(ion_synonym->next, ion_synonym->prev, procfunc); Lappendstr(procfunc, "}}\n"); } sprintf(buf, "static void _ode_matsol_instance%d(_threadargsproto_);\n", cvode_num_); Lappendstr(defs_list, buf); sprintf(buf, "\nstatic void _ode_matsol_instance%d(_threadargsproto_) {\n", cvode_num_); Lappendstr(procfunc, buf); if (cvode_fun_->subtype == KINF) { int i = cvode_num_; sprintf(buf, "_cvode_sparse(&_cvsparseobj%d, %d, _dlist%d, _p, _ode_matsol%d, &_coef%d);\n", i, cvode_neq_, i, i, i); Lappendstr(procfunc, buf); sprintf(buf, "_cvode_sparse_thread(&_thread[_cvspth%d]._pvoid, %d, _dlist%d, _p, _ode_matsol%d, _ppvar, _thread, _nt);\n", i, cvode_neq_, i, i); vectorize_substitute(procfunc->prev, buf); }else{ sprintf(buf, "_ode_matsol%d", cvode_num_); Lappendstr(procfunc, buf); vectorize_substitute(lappendstr(procfunc, "();\n"), "(_p, _ppvar, _thread, _nt);\n"); } Lappendstr(procfunc, "}\n"); Lappendstr(procfunc, "\nstatic void _ode_matsol(_NrnThread* _nt, _Memb_list* _ml, int _type) {\n"); out_nt_ml_frag(procfunc); lst = get_ion_variables(1); if (lst->next->itemtype) movelist(lst->next, lst->prev, procfunc); sprintf(buf, "_ode_matsol_instance%d(_threadargs_);\n", cvode_num_); Lappendstr(procfunc, buf); Lappendstr(procfunc, "}}\n"); } /* handle the state_discontinuities (obsolete in NET_RECEIVE)*/ if (state_discon_list_) ITERATE(q, state_discon_list_) { Symbol* s; int sindex; q1 = ITM(q); s = SYM(q1); if (q1->itemtype == SYMBOL && (s->subtype & STAT)) { sindex = slist_search(cvode_num_, s); sprintf(buf, "_cvode_ieq + %d, &", sindex); replacstr(q1->prev, buf); } } } } void cvode_proced_emit() { sprintf(buf, "\n\ static void _ode_spec(Node* _nd, double* _pp, Datum* _ppd) {\n\ _p = _pp; _ppvar = _ppd; v = NODEV(_nd);\n\ %s();\n}\n", cvode_fun_->name); Lappendstr(procfunc, buf); sprintf(buf, "\n\ static void _ode_map(int _ieq, double** _pv, doubl** _pvdot, double* _pp){}\n"); Lappendstr(procfunc, buf); Lappendstr(procfunc, "\n\ static void _ode_matsol(Node* _nd, double* _pp, Datum* _ppd){}\n"); } void cvode_interface(fun, num, neq) Symbol* fun; int num, neq; { /* if only one then allowed and emit */ cvode_valid_ = 1; cvode_not_allowed = (using_cvode++) ? 1 : 0; cvode_emit = !cvode_not_allowed; cvode_num_ = num; cvode_neq_ = neq; cvode_fun_ = fun; if (cvode_fun_->subtype == PROCED) { cvode_emit = 0; return; } Sprintf(buf, "\n\ static int _ode_spec%d(_threadargsproto_);\n\ /*static int _ode_matsol%d(_threadargsproto_);*/\n\ ", num, num); Linsertstr(procfunc, buf); } void cvode_valid() { static int once; if (!cvode_valid_ && !once++) { Fprintf(stderr, "Notice: This mechanism cannot be used with CVODE\n"); cvode_not_allowed = 1; } cvode_valid_ = 0; } void cvode_rw_cur(b) char* b; { /* if a current is READ and WRITE then call the correct _ode_spec since it may compute some aspect of the current */ Item* q, *q1; int type; Symbol* sion; b[0] = '\0'; ITERATE(q, useion) { sion = SYM(q); q = q->next; ITERATE (q1, LST(q)) { type = SYM(q1)->nrntype; if ((type & NRNCURIN) && (type & NRNCUROUT)) { if (!cvode_not_allowed && cvode_emit) { if (vectorize) { sprintf(b, "if (_nt->_vcv) { _ode_spec%d(_p, _ppvar, _thread, _nt); }\n", cvode_num_); }else{ sprintf(b, "if (_nt->_vcv) { _ode_spec%d(); }\n", cvode_num_); } return; } } } q = q->next; q = q->next; } } #endif void net_receive(qarg, qp1, qp2, qstmt, qend) Item* qarg, *qp1, *qp2, *qstmt, *qend; { Item* q, *q1; Symbol* s; int i, b; char snew[256]; if (net_receive_) { diag("Only one NET_RECEIVE block allowed", (char*)0); } if (!point_process) { diag("NET_RECEIVE can only exist in a POINT_PROCESS", (char*)0); } net_receive_ = 1; deltokens(qp1, qp2); insertstr(qstmt, "(_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag;"); i = 0; ITERATE(q1, qarg) if (q1->next != qarg) { /* skip last "flag" arg */ s = SYM(q1); sprintf(snew, "_args[%d]", i); ++i; for (q = qstmt; q != qend; q = q->next) { if (q->itemtype == SYMBOL && SYM(q) == s) { replacstr(q, snew); } } } net_send_delivered_ = qstmt; q = insertstr(qstmt, "\n{"); vectorize_substitute(q, "\n{ double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt;\n"); if (watch_seen_) { insertstr(qstmt, " int _watch_rm = 0;\n"); } q = insertstr(qstmt, " _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam;\n"); vectorize_substitute(insertstr(q, ""), " _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt;"); if (debugging_) { if (0) { insertstr(qstmt, " assert(_tsav <= t); _tsav = t;"); }else{ insertstr(qstmt, " if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), \":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay\");}\n _tsav = t;"); } } insertstr(qend, "}"); if (!artificial_cell) { Symbol* ions[10]; int j, nion=0; /* v can be changed in the NET_RECEIVE block since it is called between integrator steps and before a re_init But no need to do so if it is not used. */ Symbol* vsym = lookup("v"); netrec_need_v = 1; for (q = qstmt; q != qend; q = q->next) { if (q->itemtype == SYMBOL && SYM(q) == vsym) { insertstr(qstmt, " v = NODEV(_pnt->node);\n"); insertstr(qend, "\n NODEV(_pnt->node) = v;\n"); netrec_need_v = 0; break; } } /* if an ion concentration is mentioned then we need to get the relevant value on entry and possibly set a value on exit Do not allow mention of reversal potential or current */ for (q = qstmt; q != qend; q = q->next) { if (q->itemtype == SYMBOL && SYM(q)->type == NAME) { s = SYM(q); if ((s->nrntype & (NRNPRANGEIN | NRNPRANGEOUT)) == 0) { continue; } if ((s->nrntype & IONCONC) == 0) { diag(s->name, " :only concentrations can be mentioned in a NET_RECEIVE block"); } /* distinct only */ for (j=0; j < nion; ++j) { if (s == ions[j]) { break; } } if (j == nion) { if (nion >= 10) { diag("too many ions mentioned in NET_RECEIVE block (limit 10", (char*)0); } ions[nion] = s; ++nion; } } } for (j = 0; j < nion; ++j) { sprintf(buf, "%s %s = _ion_%s;\n", (j==0)?"\n":"", ions[j]->name, ions[j]->name); insertstr(qstmt, buf); } for (j = 0; j < nion; ++j) { if (ions[j]->subtype & STAT) { sprintf(buf, "%s _ion_%s = %s;\n", (j==0)?"\n":"", ions[j]->name, ions[j]->name); insertstr(qend, buf); } } } if (i > 0) { net_receive_ = i; } if (net_init_q1_) { movelist(net_init_q1_, net_init_q2_, procfunc); } } void net_init(qinit, qp2) Item* qinit, *qp2; { /* qinit=INITIAL { stmtlist qp2=} */ replacstr(qinit, "\nstatic void _net_init(Point_process* _pnt, double* _args, double _lflag)"); vectorize_substitute(insertstr(qinit->next->next, ""), "\ double* _p = _pnt->_prop->param;\n\ Datum* _ppvar = _pnt->_prop->dparam;\n\ Datum* _thread = (Datum*)0;\n\ _NrnThread* _nt = (_NrnThread*)_pnt->_vnt;\n\ "); if (net_init_q1_) { diag("NET_RECEIVE block can contain only one INITIAL block", (char*)0); } net_init_q1_ = qinit; net_init_q2_ = qp2; } void fornetcon(keyword, par1, args, par2, stmt, qend) Item* keyword, *par1, *args, *par2, *stmt, *qend; { Item* q, *q1; Symbol* s; char snew[256]; int i; /* follows net_receive pretty closely */ ++for_netcons_; deltokens(par1, par2); i = for_netcons_; sprintf(buf, "{int _ifn%d, _nfn%d; double* _fnargs%d, **_fnargslist%d;\n\ \t_nfn%d = _nrn_netcon_args(_ppvar[_fnc_index]._pvoid, &_fnargslist%d);\n\ \tfor (_ifn%d = 0; _ifn%d < _nfn%d; ++_ifn%d) {\n", i,i,i,i,i,i,i,i,i,i); replacstr(keyword, buf); sprintf(buf, "\t _fnargs%d = _fnargslist%d[_ifn%d];\n", i,i,i); insertstr(keyword->next, buf); insertstr(qend->next, "\t}}\n"); i = 0; ITERATE(q1, args) { s = SYM(q1); sprintf(snew, "_fnargs%d[%d]", for_netcons_, i); ++i; for (q = stmt; q != qend; q = q->next) { if (q->itemtype == SYMBOL && SYM(q) == s) { replacstr(q, snew); } } } } void chk_thread_safe() { Symbol* s; int i; Item* q; SYMLISTITER { /* globals are now global with respect to C as well as hoc */ s = SYM(q); if (s->nrntype & (NRNGLOBAL) && s->assigned_to_ == 1) { sprintf(buf, "Assignment to the GLOBAL variable, \"%s\", is not thread safe", s->name); threadsafe(buf); } } } void threadsafe_seen(Item* q1, Item* q2) { Item* q; assert_threadsafe = 1; if (q2) { for (q = q1->next; q != q2->next; q = q->next) { SYM(q)->assigned_to_ = 2; } } } void conductance_hint(int blocktype, Item* q1, Item* q2) { Item* q; if (blocktype != BREAKPOINT) { diag("CONDUCTANCE can only appear in BREAKPOINT block", (char*)0); } if (!conductance_) { conductance_ = newlist(); } lappendsym(conductance_, SYM(q1->next)); if (q2 != q1->next) { Symbol* s = SYM(q2); if (!ion_declared(s)) { diag(s->name, " not declared as USEION in NEURON block"); } lappendsym(conductance_, s); }else{ lappendsym(conductance_, SYM0); } deltokens(q1, q2); } void possible_local_current(int blocktype, List* symlist) { Item* q; Item* q2; if (blocktype != BREAKPOINT) { return; } ITERATE(q, currents) { ITERATE(q2, symlist) { char* n = SYM(q2)->name + 2; /* start after the _l */ if (strcmp(SYM(q)->name, n) == 0) { if (!breakpoint_local_current_) { breakpoint_local_current_ = newlist(); } lappendsym(breakpoint_local_current_, SYM(q)); lappendsym(breakpoint_local_current_, SYM(q2)); } } } } Symbol* breakpoint_current(Symbol* s) { if (breakpoint_local_current_) { Item* q; ITERATE(q, breakpoint_local_current_) { if (SYM(q) == s) { return SYM(q->next); } } } return s; } neuron-7.5/src/nmodl/parsact.c000077500000000000000000001042031323325274500164050ustar00rootroot00000000000000#include <../../nmodlconf.h> /* * some parse actions to reduce size of parse.y the installation routines can * also be used, e.g. in sens to automattically construct variables */ #include #include "modl.h" #include "parse1.h" Symbol *scop_indep; /* independent used by SCoP */ Symbol *indepsym; /* only one independent variable */ Symbol *stepsym; /* one or fewer stepped variables */ List *indeplist; /* FROM TO WITH START UNITS */ extern List *syminorder; /* Order in which variables are output to * .var file */ #if CVODE extern List* state_discon_list_; extern int net_send_seen_; extern int net_event_seen_; extern int watch_seen_; #endif int protect_; int protect_include_; extern Item* vectorize_replacement_item(Item*); extern int artificial_cell; extern int vectorize; extern int assert_threadsafe; static int type_change(); static long previous_subtype; /* subtype at the sym->level */ static char *previous_str; /* u.str on last install */ void explicit_decl(level, q) int level; Item *q; { /* used to be inside parse1.y without the lastvars condition Without the condition it served two purposes. 1) variables explicitly declared were so marked so that they would appear first in the .var file. Unmarked variables appear last. 2) Give error message if a variable was explicitly declared more than once. Now, the merge program produces declaration blocks from submodels with a prepended LAST_VARS keyword. This implies 1) that variables in such blocks should appear last (if they don't appear at the top level) and 2) multiple declarations are not errors. Hence we merely enclose the old code in an if statement The question arises, on multiple declarations, which value does the .var file get. In the current implementation it is the last one seen. If this is not right (and a better method would be keep the value declared closest to the root) then it will be the responsibility of merge to delete multiple declarations. */ /* Solving the multiple declaration problem. merge now gives the level number of the declaration with the root file having level number 0, all its submodels having level number 1, submodels of level 1 submodels having level 2, etc. The rule is that the lowest level declaration is used. If two declarations exist at the same level then it is an error unless their u.str are identical. Since, by the time this routine is called the latest declaration has already been installed, each installation routine saves the previous u.str in a static variable. Also a new field is added to the symbol structure to keep track of its level. At this time we retain the EXPLICIT_DECL field for explicit declarations at the root level. The default level when the symbol is allocated is 100. */ Symbol *sym; sym = SYM(q); if (!level) { /* No multiple declarations at the root level and the symbol is marked explicitly declared */ if (sym->usage & EXPLICIT_DECL) { diag("Multiple declaration of ", sym->name); } sym->usage |= EXPLICIT_DECL; } /* this ensures that declared PRIMES will appear in .var file */ sym->usage |= DEP; if (level >= sym->level) { assert(previous_str); } /* resolve possible type conflicts */ if (type_change(sym, level)) { return; } /* resolve which declaration takes precedence */ if (level < sym->level) { /* new one takes precedence */ sym->level = level; }else if (level > sym->level) { /* old one takes precedence */ sym->u.str = previous_str; }else if (strcmp(sym->u.str, previous_str) != 0) { /* not identical */ diag(sym->name, " has different values at same level"); } } /* restricted type changes are allowed in hierarchical models with each one producing a message. Notice that multiple declarations at level 0 are caught as errors in the function above. */ static int type_change(sym, level) /*return 1 if type change, 0 otherwise*/ Symbol *sym; int level; { long s, d, c; s = sym->subtype & STAT; d = sym->subtype & DEP; c = sym->subtype & PARM; if (s && c) { sym->subtype &= ~c; Fprintf(stderr, "Notice: %s is promoted from a PARAMETER to a STATE\n", sym->name); if (previous_subtype & STAT) { sym->u.str = previous_str; } }else if (s && d) { sym->subtype &= ~d; Fprintf(stderr, "WARNING: %s is promoted from an ASSIGNED to a STATE\n", sym->name); if (previous_subtype & STAT) { sym->u.str = previous_str; } }else if (d && c) { sym->subtype &= ~c; Fprintf(stderr, "Notice: %s is promoted from a PARAMETER to an ASSIGNED\n", sym->name); if (previous_subtype & DEP) { sym->u.str = previous_str; } }else{ return 0; } if (level < sym->level) { sym->level = level; } return 1; } void parm_array_install(n, num, units, limits, index) Symbol *n; char *num, *units, *limits; int index; { char buf[NRN_BUFSIZE]; previous_subtype = n->subtype; previous_str = n->u.str; if (n->u.str == (char *) 0) Lappendsym(syminorder, n); n->subtype |= PARM; n->subtype |= ARRAY; n->araydim = index; Sprintf(buf, "[%d]\n%s\n%s\n%s\n", index, num, units, limits); n->u.str = stralloc(buf, (char *) 0); } void parminstall(n, num, units, limits) Symbol *n; char *num, *units, *limits; { char buf[NRN_BUFSIZE]; previous_subtype = n->subtype; previous_str = n->u.str; if (n->u.str == (char *) 0) Lappendsym(syminorder, n); n->subtype |= PARM; Sprintf(buf, "\n%s\n%s\n%s\n", num, units, limits); n->u.str = stralloc(buf, (char *) 0); } /* often we want to install a parameter by default but only if the user hasn't declared it herself. */ Symbol *ifnew_parminstall(name, num, units, limits) char *name, *num, *units, *limits; { Symbol *s; if ((s = lookup(name)) == SYM0) { s = install(name, NAME); parminstall(s, num, units, limits); } if (!(s->subtype)) { /* can happen when PRIME used in MATCH */ parminstall(s, num, units, limits); } if (!(s->subtype & (PARM | STEP1))) { /* special case is scop_indep can be a PARM but not indepsym */ if (scop_indep == indepsym || s != scop_indep) { diag(s->name, " can't be declared a parameter by default"); } } return s; } void steppedinstall(n, q1, q2, units) Symbol *n; Item *q1, *q2; char *units; { int i; char buf[NRN_BUFSIZE]; static int seestep = 0; previous_subtype = n->subtype; previous_str = n->u.str; if (seestep) { diag("Only one STEPPED variable can be defined", (char *) 0); } seestep = 1; stepsym = n; i = 0; Strcpy(buf, "\n"); Strcat(buf, STR(q1)); while (q1 != q2) { q1 = q1->next; Strcat(buf, SYM(q1)->name); /* , is a symbol */ q1 = q1->next; Strcat(buf, STR(q1)); i++; if (i > 5) { diag("Maximum of 5 steps in a stepped variable", (char *) 0); } } Strcat(buf, "\n"); Strcat(buf, units); Strcat(buf, "\n"); n->subtype |= STEP1; n->u.str = stralloc(buf, (char *) 0); } static char *indepunits = ""; #if NMODL int using_default_indep; #endif void indepinstall(n, from, to, with, qstart, units, scop) Symbol *n; char *from, *to, *with, *units; Item *qstart; /* ITEM0 if not present */ int scop; /*1 if declaring the scop independent*/ { char buf[NRN_BUFSIZE]; /* scop_indep may turn out to be different from indepsym. If this is the case then indepsym will be a constant in the .var file (see parout.c). If they are the same, then u.str gets the info from SCOP. */ if (!scop) { #if NMODL if (using_default_indep) { using_default_indep = 0; if (indepsym != n) { indepsym->subtype &= ~INDEP; parminstall(indepsym, "0", "ms", ""); } indepsym = (Symbol*)0; } #endif if (indepsym) { diag("Only one independent variable can be defined", (char *) 0); } indeplist = newlist(); Lappendstr(indeplist, from); Lappendstr(indeplist, to); Lappendstr(indeplist, with); if (qstart) { Lappendstr(indeplist, STR(qstart)); }else{ Lappendstr(indeplist, from); } Lappendstr(indeplist, units); n->subtype |= INDEP; indepunits = stralloc(units, (char *) 0); if (n != scop_indep) { Sprintf(buf, "\n%s*%s(%s)\n%s\n", from, to, with, units); n->u.str = stralloc(buf, (char *) 0); } indepsym = n; if (!scop_indep) { scop_indep = indepsym; } }else{ n->subtype |= INDEP; Sprintf(buf, "\n%s*%s(%s)\n%s\n", from, to, with, units); n->u.str = stralloc(buf, (char *) 0); scop_indep = n; } } /* * installation of dependent and state variables type 0 -- dependent; 1 -- * state index 0 -- scalar; otherwise -- array qs -- item pointer to START * const string makeconst 0 -- do not make a default constant for state 1 -- * make sure name0 exists For states Dname and name0 are normally created. * However Dname will not appear in the .var file unless it is used -- see * parout.c. */ void depinstall(type, n, index, from, to, units, qs, makeconst, abstol) int type, index, makeconst; Symbol *n; char *from, *to, *units, *abstol; Item *qs; { char buf[NRN_BUFSIZE], *pstr; int c; if (!type && strlen(abstol)>0) { printf("abstol = |%s|\n", abstol); diag(n, "tolerance can be specified only for a STATE"); } pstr = n->u.str; /* make it work even if recursive */ if (n->u.str == (char *) 0) Lappendsym(syminorder, n); if (type) { n->subtype |= STAT; c = ':'; statdefault(n, index, units, qs, makeconst); } else { n->subtype |= DEP; c = ';'; if (qs) { diag("START not legal except in STATE block", (char *) 0); } } if (index) { Sprintf(buf, "[%d]\n%s%c%s\n%s\n%s\n", index, from, c, to, units, abstol); n->araydim = index; n->subtype |= ARRAY; } else { Sprintf(buf, "\n%s%c%s\n%s\n%s\n", from, c, to, units, abstol); } n->u.str = stralloc(buf, (char *) 0); previous_subtype = n->subtype; previous_str = pstr; } void statdefault(n, index, units, qs, makeconst) Symbol *n; int index, makeconst; char *units; Item *qs; { char nam[256], *un; Symbol *s; if (n->type != NAME && n->type != PRIME) { diag(n->name, " can't be a STATE"); } if (makeconst) { Sprintf(nam, "%s0", n->name); s = ifnew_parminstall(nam, "0", units, ""); if (qs) { /*replace with proper default*/ parminstall(s, STR(qs), units, ""); } } Sprintf(nam, "%s/%s", units, indepunits); un = stralloc(nam, (char *) 0); Sprintf(nam, "D%s", n->name); if ((s = lookup(nam)) == SYM0) { /* install the prime as a DEP */ s = install(nam, PRIME); depinstall(0, s, index, "0", "1", un, ITEM0, 0, ""); } } /* the problem is that qpar->next may already have a _p, ..., _nt vectorize_substitute, and qpar->next is often normally "" instead of ')' for the no arg case. */ static int func_arg_examine(Item* qpar, Item* qend) { Item* q; int b = 1; /* real args exist case */ q = qpar->next; if (q->itemtype == SYMBOL && strcmp(SYM(q)->name, ")") == 0) { b = 0; /* definitely no arg */ } if (q->itemtype == STRING && strcmp(STR(q), "") == 0) { if (vectorize_replacement_item(q)) { b = 2; /* _p,..._nt already there */ } else if (q->next->itemtype == SYMBOL && strcmp(SYM(q->next)->name, ")") == 0) { b = 0; /* definitely no arg */ } } return b; } void vectorize_scan_for_func(Item* q1, Item* q2) { Item* q, *qq; int b; return; for (q = q1; q != q2; q = q->next) { if (q->itemtype == SYMBOL) { Symbol* s = SYM(q); if ((s->usage & FUNCT) && !(s->subtype & (EXTDEF))) { if (q->next->itemtype == SYMBOL && strcmp(SYM(q->next)->name, "(") == 0) { int b = func_arg_examine(q->next, q2); if (b == 0) { /* no args */ vectorize_substitute(q->next, "(_p, _ppvar, _thread, _nt"); }else if (b == 1) { /* real args */ vectorize_substitute(q->next, "(_p, _ppvar, _thread, _nt,"); } /* else no _p.._nt already there */ } } } } } void defarg(q1, q2) /* copy arg list and define as doubles */ Item *q1, *q2; { Item *q3, *q; if (q1->next == q2) { #if VECTORIZE vectorize_substitute(insertstr(q2, ""), "_threadargsproto_"); #endif return; } for (q = q1->next; q != q2; q = q->next) { if (strcmp(SYM(q)->name, ",") != 0) { insertstr(q, "double"); } } #if VECTORIZE vectorize_substitute(insertstr(q1->next, ""), "_threadargsprotocomma_"); #endif } void lag_stmt(q1, blocktype) /* LAG name1 BY name2 */ Item *q1; int blocktype; { Symbol *name1, *name2, *lagval; /*ARGSUSED*/ /* parse */ name1 = SYM(q1->next); delete(q1->next); delete(q1->next); name2 = SYM(q1->next); delete(q1->next); name1->usage |= DEP; name2->usage |= DEP; /* check */ if (!indepsym) { diag("INDEPENDENT variable must be declared to process", " the LAG statement"); } if (!(name1->subtype & (DEP | STAT))) { diag(name1->name, " not a STATE or DEPENDENT variable"); } if (!(name2->subtype & (PARM | nmodlCONST))) { diag(name2->name, " not a CONSTANT or PARAMETER"); } Sprintf(buf, "lag_%s_%s", name1->name, name2->name); if (lookup(buf)) { diag(buf, " already in use"); } /* create */ lagval = install(buf, NAME); lagval->usage |= DEP; lagval->subtype |= DEP; if (name1->subtype & ARRAY) { lagval->subtype |= ARRAY; lagval->araydim = name1->araydim; } if (lagval->subtype & ARRAY) { Sprintf(buf, "static double *%s;\n", lagval->name); Linsertstr(procfunc, buf); Sprintf(buf, "%s = lag(%s, %s, %s, %d);\n", lagval->name, name1->name, indepsym->name, name2->name, lagval->araydim); }else{ Sprintf(buf, "static double %s;\n", lagval->name); Linsertstr(procfunc, buf); Sprintf(buf, "%s = *lag(&(%s), %s, %s, 0);\n", lagval->name, name1->name, indepsym->name, name2->name); } replacstr(q1, buf); } void queue_stmt(q1, q2) Item *q1, *q2; { Symbol *s; static int first=1; if (first) { first = 0; Linsertstr(initfunc, "initqueue();\n"); } if (SYM(q1)->type == PUTQ) { replacstr(q1, "enqueue("); }else{ replacstr(q1, "dequeue("); } s = SYM(q2); s->usage |= DEP; if (!(s->subtype)) { diag(s->name, " not declared"); } if (s->subtype & ARRAY) { Sprintf(buf, "%s, %d);\n", s->name, s->araydim); }else{ Sprintf(buf, "&(%s), 1);\n", s->name); } replacstr(q2, buf); } void add_reset_args(q) Item *q; { static int reset_fun_cnt=0; reset_fun_cnt++; Sprintf(buf, "&_reset, &_freset%d,", reset_fun_cnt); Insertstr(q->next, buf); Sprintf(buf, "static double _freset%d;\n", reset_fun_cnt); Lappendstr(firstlist, buf); } void add_nrnthread_arg(q) Item *q; { vectorize_substitute(insertstr(q->next, "nrn_threads,"), "_nt,"); } /* table manipulation */ /* arglist must have exactly one argument tablist contains 1) list of names to be looked up (must be empty if qtype is FUNCTION and nonempty if qtype is PROCEDURE). 2) From expression list 3) To expression list 4) With integer string 5) DEPEND list as list of names The qname does not have a _l if a function. The arg names all have _l prefixes. */ /* checking and creation of table has been moved to separate function called static _check_func. */ /* to allow vectorization the table functions are separated into name robust function. makes sure table is uptodate (calls check_name) _check_name if table not up to date then builds table _f_name analytic _n_name table lookup with no checking if usetable=1 otherwise calls _f_name. */ static List* check_table_statements; static Symbol* last_func_using_table; void check_tables() { /* for threads do this differently */ if (check_table_statements) { fprintf(fcout, "\n#if %d\n", 0); printlist(check_table_statements); fprintf(fcout, "#endif\n"); } } /* this way we can make sure the tables are up to date in the main thread at critical points in the finitialize, nrn_fixed_step, etc. The only requirement is that the function that generates the table not use any except GLOBAL parameters and assigned vars not requiring an initial value, because we are probably going to call this with nonsense _p, _ppvar, and _thread */ static List* check_table_thread_list; int check_tables_threads(List* p) { Item* q; if (check_table_thread_list) { ITERATE(q, check_table_thread_list) { sprintf(buf, "\nstatic void %s(double*, Datum*, Datum*, _NrnThread*);", STR(q)); lappendstr(p, buf); } lappendstr(p, "\nstatic void _check_table_thread(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, int _type) {\n"); ITERATE(q, check_table_thread_list) { sprintf(buf, " %s(_p, _ppvar, _thread, _nt);\n", STR(q)); lappendstr(p, buf); } lappendstr(p, "}\n"); return 1; } return 0; } void table_massage(tablist, qtype, qname, arglist) List *tablist, *arglist; Item *qtype, *qname; { Symbol *fsym, *s, *arg=0; char* fname; List *table, *from, *to, *depend; int type, ntab; Item *q; if (!tablist) { return; } fsym = SYM(qname); last_func_using_table = fsym; fname = fsym->name; table = LST(q = tablist->next); from = LST(q = q->next); to = LST(q = q->next); ntab = atoi(STR(q = q->next)); depend = LST(q = q->next); type = SYM(qtype)->type; ifnew_parminstall("usetable", "1", "", "0 1"); if (!check_table_statements) { check_table_statements = newlist(); } sprintf(buf, "_check_%s();\n", fname); q = lappendstr(check_table_statements, buf); sprintf(buf, "_check_%s(_p, _ppvar, _thread, _nt);\n", fname); vectorize_substitute(q, buf); /*checking*/ if (type == FUNCTION1) { if (table) { diag("TABLE stmt in FUNCTION cannot have a table name list", (char *)0); } table = newlist(); Lappendsym(table, fsym); }else{ if (!table) { diag("TABLE stmt in PROCEDURE must have a table name list", (char *)0); } } if (arglist->next == arglist || arglist->next->next != arglist) { diag("FUNCTION or PROCEDURE containing a TABLE stmt\n", "must have exactly one argument"); }else{ arg = SYM(arglist->next); } if (!depend) { depend = newlist(); } /*translation*/ /* new name for original function */ Sprintf(buf, "_f_%s", fname); SYM(qname) = install(buf, fsym->type); SYM(qname)->subtype = fsym->subtype; SYM(qname)->varnum = fsym->varnum; if (type == FUNCTION1) { fsym->subtype |= FUNCT; Sprintf(buf, "static double _n_%s(double);\n", fname); q = linsertstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "static double _n_%s(_threadargsprotocomma_ double _lv);\n", fname); vectorize_substitute(q, buf); #endif }else{ fsym->subtype |= PROCED; Sprintf(buf, "static void _n_%s(double);\n", fname); q = linsertstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "static void _n_%s(_threadargsprotocomma_ double _lv);\n", fname); vectorize_substitute(q, buf); #endif } fsym->usage |= FUNCT; /* declare communication between func and check_func */ Sprintf(buf, "static double _mfac_%s, _tmin_%s;\n", fname, fname); Lappendstr(procfunc, buf); /* create the check function */ if (!check_table_thread_list) { check_table_thread_list = newlist(); } sprintf(buf, "_check_%s", fname); lappendstr(check_table_thread_list, buf); Sprintf(buf, "static void _check_%s();\n", fname); q = insertstr(procfunc, buf); vectorize_substitute(q, ""); Sprintf(buf, "static void _check_%s() {\n", fname); q = lappendstr(procfunc, buf); Sprintf(buf, "static void _check_%s(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {\n", fname); vectorize_substitute(q, buf); Lappendstr(procfunc, " static int _maktable=1; int _i, _j, _ix = 0;\n"); Lappendstr(procfunc, " double _xi, _tmax;\n"); ITERATE(q, depend) { Sprintf(buf, " static double _sav_%s;\n", SYM(q)->name); Lappendstr(procfunc, buf); } lappendstr(procfunc, " if (!usetable) {return;}\n"); /*allocation*/ ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, " for (_i=0; _i < %d; _i++) {\ _t_%s[_i] = makevector(%d*sizeof(double)); }\n", s->araydim, s->name, ntab+1); }else{ Sprintf(buf, " _t_%s = makevector(%d*sizeof(double));\n", s->name, ntab+1); } Lappendstr(initlist, buf); } /* check dependency */ ITERATE(q, depend) { Sprintf(buf, " if (_sav_%s != %s) { _maktable = 1;}\n", SYM(q)->name, SYM(q)->name); Lappendstr(procfunc, buf); } /* make the table */ Lappendstr(procfunc, " if (_maktable) { double _x, _dx; _maktable=0;\n"); Sprintf(buf, " _tmin_%s = ", fname); Lappendstr(procfunc, buf); move(from->next, from->prev, procfunc); Sprintf(buf, ";\n _tmax = "); Lappendstr(procfunc, buf); move(to->next, to->prev, procfunc); Lappendstr(procfunc, ";\n"); Sprintf(buf," _dx = (_tmax - _tmin_%s)/%d.; _mfac_%s = 1./_dx;\n", fname, ntab, fname); Lappendstr(procfunc, buf); Sprintf(buf," for (_i=0, _x=_tmin_%s; _i < %d; _x += _dx, _i++) {\n", fname, ntab+1); Lappendstr(procfunc, buf); if (type == FUNCTION1) { ITERATE(q, table) { s = SYM(q); Sprintf(buf, " _t_%s[_i] = _f_%s(_x);\n", s->name, fname); Lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, " _t_%s[_i] = _f_%s(_p, _ppvar, _thread, _nt, _x);\n", s->name, fname); vectorize_substitute(procfunc->prev, buf); #endif } }else{ Sprintf(buf, " _f_%s(_x);\n", fname); Lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, " _f_%s(_p, _ppvar, _thread, _nt, _x);\n", fname); vectorize_substitute(procfunc->prev, buf); #endif ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, " for (_j = 0; _j < %d; _j++) { _t_%s[_j][_i] = %s[_j];\n}", s->araydim, s->name, s->name); }else{ Sprintf(buf, " _t_%s[_i] = %s;\n", s->name, s->name); } Lappendstr(procfunc, buf); } } Lappendstr(procfunc, " }\n"); /*closes loop over _i index*/ /* save old dependency values */ ITERATE(q, depend) { s = SYM(q); Sprintf(buf, " _sav_%s = %s;\n", s->name, s->name); Lappendstr(procfunc, buf); } Lappendstr(procfunc, " }\n"); /* closes if(maktable)) */ Lappendstr(procfunc, "}\n\n"); /* create the new function (steers to analytic or table) */ /*declaration*/ if (type == FUNCTION1) { #define GLOBFUNC 1 #if !GLOBFUNC Lappendstr(procfunc, "static int"); #endif Lappendstr(procfunc, "double"); }else{ Lappendstr(procfunc, "static int"); } Sprintf(buf, "%s(double %s){", fname, arg->name); Lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "%s(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double %s) {", fname, arg->name); vectorize_substitute(procfunc->prev, buf); #endif /* check the table */ Sprintf(buf, "_check_%s();\n", fname); q = lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "\n#if 0\n_check_%s(_p, _ppvar, _thread, _nt);\n#endif\n", fname); vectorize_substitute(q, buf); #endif if (type == FUNCTION1) { Lappendstr(procfunc, "return"); } Sprintf(buf, "_n_%s(%s);\n", fname, arg->name); Lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "_n_%s(_p, _ppvar, _thread, _nt, %s);\n", fname, arg->name); vectorize_substitute(procfunc->prev, buf); #endif if (type != FUNCTION1) { Lappendstr(procfunc, "return 0;\n"); } Lappendstr(procfunc, "}\n\n"); /* end of new function */ /* _n_name function for table lookup with no checking */ if (type == FUNCTION1) { Lappendstr(procfunc, "static double"); }else{ Lappendstr(procfunc, "static void"); } Sprintf(buf, "_n_%s(double %s){", fname, arg->name); Lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "_n_%s(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double %s){", fname, arg->name); vectorize_substitute(procfunc->prev, buf); #endif Lappendstr(procfunc, "int _i, _j;\n"); Lappendstr(procfunc, "double _xi, _theta;\n"); /* usetable */ Lappendstr(procfunc, "if (!usetable) {\n"); if (type == FUNCTION1) { Lappendstr(procfunc, "return"); } Sprintf(buf, "_f_%s(%s);", fname, arg->name); Lappendstr(procfunc, buf); #if VECTORIZE Sprintf(buf, "_f_%s(_p, _ppvar, _thread, _nt, %s);", fname, arg->name); vectorize_substitute(procfunc->prev, buf); #endif if (type != FUNCTION1) { Lappendstr(procfunc, "return;"); } Lappendstr(procfunc, "\n}\n"); /* table lookup */ Sprintf(buf, "_xi = _mfac_%s * (%s - _tmin_%s);\n", fname, arg->name, fname); Lappendstr(procfunc, buf); Lappendstr(procfunc, "if (isnan(_xi)) {\n"); if (type == FUNCTION1) { Lappendstr(procfunc, " return _xi; }\n"); }else{ ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, " for (_j = 0; _j < %d; _j++) { %s[_j] = _xi;\n}", s->araydim, s->name); }else{ Sprintf(buf, " %s = _xi;\n", s->name); } Lappendstr(procfunc, buf); } Lappendstr(procfunc, " return;\n }\n"); } Lappendstr(procfunc, "if (_xi <= 0.) {\n"); if (type == FUNCTION1) { Sprintf(buf, "return _t_%s[0];\n", SYM(table->next)->name); Lappendstr(procfunc, buf); }else{ ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "for (_j = 0; _j < %d; _j++) { %s[_j] = _t_%s[_j][0];\n}", s->araydim, s->name, s->name); }else{ Sprintf(buf, "%s = _t_%s[0];\n", s->name, s->name); } Lappendstr(procfunc, buf); } Lappendstr(procfunc, "return;"); } Lappendstr(procfunc, "}\n"); Sprintf(buf, "if (_xi >= %d.) {\n", ntab); Lappendstr(procfunc, buf); if (type == FUNCTION1) { Sprintf(buf, "return _t_%s[%d];\n", SYM(table->next)->name, ntab); Lappendstr(procfunc, buf); }else{ ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "for (_j = 0; _j < %d; _j++) { %s[_j] = _t_%s[_j][%d];\n}", s->araydim, s->name, s->name, ntab); }else{ Sprintf(buf, "%s = _t_%s[%d];\n", s->name, s->name, ntab); } Lappendstr(procfunc, buf); } Lappendstr(procfunc, "return;"); } Lappendstr(procfunc, "}\n"); /* table interpolation */ Lappendstr(procfunc, "_i = (int) _xi;\n"); if (type == FUNCTION1) { s = SYM(table->next); Sprintf(buf, "return _t_%s[_i] + (_xi - (double)_i)*(_t_%s[_i+1] - _t_%s[_i]);\n", s->name, s->name, s->name); Lappendstr(procfunc, buf); }else{ Lappendstr(procfunc, "_theta = _xi - (double)_i;\n"); ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "for (_j = 0; _j < %d; _j++) {double *_t = _t_%s[_j];", s->araydim, s->name); Lappendstr(procfunc, buf); Sprintf(buf, "%s[_j] = _t[_i] + _theta*(_t[_i+1] - _t[_i]);}\n", s->name); }else{ Sprintf(buf, "%s = _t_%s[_i] + _theta*(_t_%s[_i+1] - _t_%s[_i]);\n", s->name, s->name, s->name, s->name); } Lappendstr(procfunc, buf); } } Lappendstr(procfunc, "}\n\n"); /* end of new function */ /* table declaration */ ITERATE(q, table) { s = SYM(q); if (s->subtype & ARRAY) { Sprintf(buf, "static double *_t_%s[%d];\n", s->name, s->araydim); }else{ Sprintf(buf, "static double *_t_%s;\n", s->name); } Lappendstr(firstlist, buf); } /*cleanup*/ freelist(&table); freelist(&depend); freelist(&from); freelist(&to); } #if HMODL || NMODL void hocfunchack(Symbol* n, Item* qpar1, Item* qpar2, int hack) { #if NOCMODL extern int point_process; #endif Item *q; int i; #if VECTORIZE Item* qp=0; #endif if (point_process) { Sprintf(buf, "\nstatic double _hoc_%s(void* _vptr) {\n double _r;\n", n->name); }else{ Sprintf(buf, "\nstatic void _hoc_%s(void) {\n double _r;\n", n->name); } Lappendstr(procfunc, buf); vectorize_substitute(lappendstr(procfunc, ""), "\ double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt;\n\ "); if (point_process) { vectorize_substitute(lappendstr(procfunc, " _hoc_setdata(_vptr);\n"), "\ _p = ((Point_process*)_vptr)->_prop->param;\n\ _ppvar = ((Point_process*)_vptr)->_prop->dparam;\n\ _thread = _extcall_thread;\n\ _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt;\n\ "); }else{ vectorize_substitute(lappendstr(procfunc, ""), "\ if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; }\n\ _thread = _extcall_thread;\n\ _nt = nrn_threads;\n\ "); } #if VECTORIZE if (n == last_func_using_table) { qp = lappendstr(procfunc, ""); sprintf(buf,"\n#if 1\n _check_%s(_p, _ppvar, _thread, _nt);\n#endif\n", n->name); vectorize_substitute(qp, buf); } #endif if (n->subtype & FUNCT) { Lappendstr(procfunc, "_r = "); }else{ Lappendstr(procfunc, "_r = 1.;\n"); } Lappendsym(procfunc, n); lappendstr(procfunc, "("); #if VECTORIZE qp = lappendstr(procfunc, ""); #endif for (i=0; i < n->varnum; ++i) { Sprintf(buf, "*getarg(%d)", i+1); Lappendstr(procfunc, buf); if (i+1 < n->varnum) { Lappendstr(procfunc, ","); } } #if NOCMODL if (point_process) { Lappendstr(procfunc, ");\n return(_r);\n}\n"); }else #endif Lappendstr(procfunc, ");\n hoc_retpushx(_r);\n}\n"); #if VECTORIZE if (i) { vectorize_substitute(qp, "_p, _ppvar, _thread, _nt,"); }else if (!hack) { vectorize_substitute(qp, "_p, _ppvar, _thread, _nt"); } #endif } void hocfunc(n, qpar1, qpar2) /*interface between modl and hoc for proc and func */ Item *qpar1, *qpar2; Symbol *n; { /* Hack prevents FUNCTION_TABLE bug of 'double table_name()' extra args replacing the double in 'double name(...) */ hocfunchack(n, qpar1, qpar2, 0); } #if VECTORIZE /* ARGSUSED */ void vectorize_use_func(qname, qpar1, qexpr, qpar2, blocktype) Item* qname, *qpar1, *qexpr, *qpar2; int blocktype; { Item* q; if (SYM(qname)->subtype & EXTDEF) { if (strcmp(SYM(qname)->name, "nrn_pointing") == 0) { Insertstr(qpar1->next, "&"); }else if (strcmp(SYM(qname)->name, "state_discontinuity") == 0) { #if CVODE if (blocktype == NETRECEIVE) { Item* qeq = NULL; /* convert to state = expr form and process with netrec_discon(...) */ replacstr(qname, ""); replacstr(qpar1, ""); replacstr(qpar2, ""); /* qexpr begins state, expr */ /* find the first , and replace by = */ for (q = qexpr; q != qpar2; q = q->next) { if (q->itemtype == SYMBOL && strcmp(SYM(q)->name, ",") == 0) { qeq = q; replacstr(qeq, "="); break; } } assert(qeq); netrec_asgn(qexpr, qeq, qeq->next, qpar2); }else{ fprintf(stderr, "Notice: Use of state_discontinuity is not thread safe except in a NET_RECEIVE block"); vectorize = 0; if (!state_discon_list_) { state_discon_list_ = newlist(); Linsertstr(procfunc, "extern int state_discon_flag_;\n"); } lappenditem(state_discon_list_, qpar1->next); Insertstr(qpar1->next, "-1, &"); } #endif }else if (strcmp(SYM(qname)->name, "net_send") == 0) { net_send_seen_ = 1; if (artificial_cell) { replacstr(qname, "artcell_net_send"); } Insertstr(qexpr, "t + "); if (blocktype == NETRECEIVE) { Insertstr(qpar1->next, "_tqitem, _args, _pnt,"); }else if (blocktype == INITIAL1){ Insertstr(qpar1->next, "_tqitem, (double*)0, _ppvar[1]._pvoid,"); }else{ diag("net_send allowed only in INITIAL and NET_RECEIVE blocks", (char*)0); } }else if (strcmp(SYM(qname)->name, "net_event") == 0) { net_event_seen_ = 1; if (blocktype == NETRECEIVE) { Insertstr(qpar1->next, "_pnt,"); }else{ diag("net_event", " only allowed in NET_RECEIVE block"); } }else if (strcmp(SYM(qname)->name, "net_move") == 0) { if (artificial_cell) { replacstr(qname, "artcell_net_move"); } if (blocktype == NETRECEIVE) { Insertstr(qpar1->next, "_tqitem, _pnt,"); }else{ diag("net_move", " only allowed in NET_RECEIVE block"); } } return; } #if 1 if (qexpr) { q = insertstr(qpar1->next, "_threadargscomma_"); }else{ q = insertstr(qpar1->next, "_threadargs_"); } #else q = insertstr(qpar1->next, ""); if (qexpr) { vectorize_substitute(q, "_p, _ppvar, _thread, _nt,"); }else{ vectorize_substitute(q, "_p, _ppvar, _thread, _nt"); } #endif } #endif #endif void function_table(s, qpar1, qpar2, qb1, qb2) /* s ( ... ) { ... } */ Symbol* s; Item *qpar1, *qpar2, *qb1, *qb2; { Symbol* t; int i; Item* q, *q1, *q2; for (i=0, q=qpar1->next; q != qpar2; q = q->next) { #if VECTORIZE if (q->itemtype == STRING || SYM(q)->name[0] != '_') { continue; } #endif sprintf(buf, "_arg[%d] = %s;\n", i, SYM(q)->name); insertstr(qb2, buf); ++i; } if (i == 0) { diag("FUNCTION_TABLE declaration must have one or more arguments:", s->name); } sprintf(buf, "double _arg[%d];\n", i); insertstr(qb1->next, buf); sprintf(buf, "return hoc_func_table(_ptable_%s, %d, _arg);\n", s->name, i); insertstr(qb2, buf); insertstr(qb2, "}\n/* "); /* kludge to avoid a bad vectorize_substitute */ insertstr(qb2->next, " */\n"); sprintf(buf, "table_%s", s->name); t = install(buf, NAME); t->subtype |= FUNCT; t->usage |= FUNCT; t->no_threadargs = 1; t->varnum = 0; sprintf(buf,"double %s", t->name); lappendstr(procfunc, buf); q1 = lappendsym(procfunc, SYM(qpar1)); q2 = lappendsym(procfunc, SYM(qpar2)); sprintf(buf,"{\n\thoc_spec_table(&_ptable_%s, %d);\n\treturn 0.;\n}\n", s->name, i); lappendstr(procfunc, buf); sprintf(buf, "\nstatic void* _ptable_%s = (void*)0;\n", s->name); linsertstr(procfunc, buf); hocfunchack(t, q1, q2, 1); } void watchstmt(par1, dir, par2, flag, blocktype )Item *par1, *dir, *par2, *flag; int blocktype; { if (!watch_seen_) { ++watch_seen_; } if (blocktype != NETRECEIVE) { diag("\"WATCH\" statement only allowed in NET_RECEIVE block", (char*)0); } sprintf(buf, "\nstatic double _watch%d_cond(_pnt) Point_process* _pnt; {\n", watch_seen_); lappendstr(procfunc, buf); vectorize_substitute(lappendstr(procfunc, ""),"\tdouble* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt;\n\t_thread= (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt;\n"); sprintf(buf, "\t_p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam;\n\tv = NODEV(_pnt->node);\n return "); lappendstr(procfunc, buf); movelist(par1, par2, procfunc); movelist(dir->next, par2, procfunc); if (SYM(dir)->name[0] == '<') { insertstr(par1, "-("); insertstr(par2->next, ")"); } replacstr(dir, ") - ("); lappendstr(procfunc, ";\n}\n"); sprintf(buf, " _nrn_watch_activate(_watch_array, _watch%d_cond, %d, _pnt, _watch_rm++, %s);\n", watch_seen_, watch_seen_, STR(flag)); replacstr(flag, buf); ++watch_seen_; } void threadsafe(char* s) { if (!assert_threadsafe) { fprintf(stderr, "Notice: %s\n", s); vectorize = 0; } } Item* protect_astmt(Item* q1, Item* q2) { /* PROTECT, ';' */ Item* q; replacstr(q1, "/* PROTECT */_NMODLMUTEXLOCK\n"); q = insertstr(q2->next, "\n _NMODLMUTEXUNLOCK /* end PROTECT */\n"); protect_include_ = 1; return q; } void nrnmutex(int on, Item* q) { /* MUTEXLOCK or MUTEXUNLOCK */ static int toggle = 0; if (on == 1) { if (toggle != 0) { diag("MUTEXLOCK invoked after MUTEXLOCK", (char*)0); } toggle = 1; replacstr(q, "_NMODLMUTEXLOCK\n"); protect_include_ = 1; }else if (on == 0) { if (toggle != 1) { diag("MUTEXUNLOCK invoked with no earlier MUTEXLOCK", (char*)0); } toggle = 0; replacstr(q, "_NMODLMUTEXUNLOCK\n"); protect_include_ = 1; }else{ if (toggle != 0) { diag("MUTEXUNLOCK not invoked after MUTEXLOCK", (char*)0); } toggle = 0; } } neuron-7.5/src/nmodl/parse1.c000066400000000000000000005006071323325274500161500ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Copy the first part of user declarations. */ #line 1 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:339 */ /* /local/src/master/nrn/src/nmodl/parse1.y,v 4.11 1999/03/24 18:34:08 hines Exp */ #include <../../nmodlconf.h> #include "modl.h" #include #if defined(__STDC__) #define sdebug(arg1,arg2) {} #define qdebug(arg1,arg2) {} #else #define sdebug(arg1,arg2) {Fprintf(stderr,"arg1:%s\n", arg2); Fflush(stderr);} #define qdebug(arg1,arg2) {Item *q; Fprintf(stderr,"arg1:");Fflush(stderr);\ for (q=arg2; q->type != 0; q=q->next){\ if (q->type == SYMBOL)\ Fprintf(stderr,"%s\n", SYM(q)->name);\ else if (q->type == STRING)\ Fprintf(stderr,"%s\n", STR(q);\ else\ Fprintf(stderr,"Illegal Item type\n");\ Fflush(stderr);}\ Fprintf(stderr,"\n");Fflush(stderr);} #endif #define ldebug(arg1, arg2) qdebug(arg1, arg2->next) extern int yylex(), yyparse(); static void yyerror(); #if YYBISON #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyssp; --yyvsp; YYERROR #else #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyps; --yypv; YYERROR #endif int brkpnt_exists; int assert_threadsafe; int usederivstatearray; extern int protect_; extern int vectorize; extern int in_comment_; /* allow non-ascii in a COMMENT */ extern char *modelline; extern Item* protect_astmt(Item*, Item*); extern List* toplocal_; static List* toplocal1_; extern List *firstlist; /* NAME symbols in order that they appear in file */ extern int lexcontext; /* ':' can return 3 different tokens */ extern List *solveforlist; /* List of symbols that are actually to be solved for in a block. See in_solvefor() */ static int stateblock; /* 0 if dependent, 1 if state */ static int blocktype; static int saw_verbatim_; /* only print the notice once */ static int inequation; /* inside an equation?*/ static int nstate; /* number of states seen in an expression */ static int leftside; /* inside left hand side of equation? */ static int pstate; /* number of state in a primary expression */ static int tstate; /* number of states in a term */ static Item *lastok; /* last token accepted by expr */ static int sensused; /* a SENS statement occurred in this block */ static Symbol *matchindex; /* local symbol for implied MATCH loop */ static int model_level = 0; /* the model level prepended to declaration blocks by merge */ static int scopindep = 0;/* SCoP independent explicitly declared if 1 */ static int extdef2 = 0; /* flag that says we are in an EXTDEF2 function */ static List *table_list = LIST0; /* table information for TABLE statement */ static int forallindex = 0; /* 0 not in FORALL, -1 just starting, >0 index of arrays used (must all be the same */ static Item* astmt_end_; /* see kinetic.c vectorizing */ static int nr_argcnt_, argcnt_; /* for matching number of args in NET_RECEIVE and FOR_NETCONS */ #line 141 "parse1.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { VERBATIM = 258, COMMENT = 259, MODEL = 260, CONSTANT = 261, INDEPENDENT = 262, DEPENDENT = 263, STATE = 264, INITIAL1 = 265, DERIVATIVE = 266, SOLVE = 267, USING = 268, WITH = 269, STEPPED = 270, DISCRETE = 271, FROM = 272, FORALL1 = 273, TO = 274, BY = 275, WHILE = 276, IF = 277, ELSE = 278, START1 = 279, STEP = 280, SENS = 281, SOLVEFOR = 282, PROCEDURE = 283, PARTIAL = 284, DEL = 285, DEL2 = 286, DEFINE1 = 287, IFERROR = 288, PARAMETER = 289, DERFUNC = 290, EQUATION = 291, TERMINAL = 292, LINEAR = 293, NONLINEAR = 294, FUNCTION1 = 295, LOCAL = 296, METHOD = 297, LIN1 = 298, NONLIN1 = 299, PUTQ = 300, GETQ = 301, TABLE = 302, DEPEND = 303, BREAKPOINT = 304, INCLUDE1 = 305, FUNCTION_TABLE = 306, PROTECT = 307, NRNMUTEXLOCK = 308, NRNMUTEXUNLOCK = 309, OR = 310, AND = 311, GT = 312, LT = 313, LE = 314, EQ = 315, NE = 316, NOT = 317, NAME = 318, PRIME = 319, REAL = 320, INTEGER = 321, DEFINEDVAR = 322, STRING = 323, PLOT = 324, VS = 325, LAG = 326, RESET = 327, MATCH = 328, MODEL_LEVEL = 329, SWEEP = 330, FIRST = 331, LAST = 332, KINETIC = 333, CONSERVE = 334, REACTION = 335, REACT1 = 336, COMPARTMENT = 337, UNITS = 338, UNITSON = 339, UNITSOFF = 340, LONGDIFUS = 341, NEURON = 342, SUFFIX = 343, NONSPECIFIC = 344, READ = 345, WRITE = 346, USEION = 347, VALENCE = 348, THREADSAFE = 349, GLOBAL = 350, SECTION = 351, RANGE = 352, POINTER = 353, BBCOREPOINTER = 354, EXTERNAL = 355, BEFORE = 356, AFTER = 357, WATCH = 358, ELECTRODE_CURRENT = 359, CONSTRUCTOR = 360, DESTRUCTOR = 361, NETRECEIVE = 362, FOR_NETCONS = 363, CONDUCTANCE = 364, GE = 365, UNARYMINUS = 366 }; #endif /* Tokens. */ #define VERBATIM 258 #define COMMENT 259 #define MODEL 260 #define CONSTANT 261 #define INDEPENDENT 262 #define DEPENDENT 263 #define STATE 264 #define INITIAL1 265 #define DERIVATIVE 266 #define SOLVE 267 #define USING 268 #define WITH 269 #define STEPPED 270 #define DISCRETE 271 #define FROM 272 #define FORALL1 273 #define TO 274 #define BY 275 #define WHILE 276 #define IF 277 #define ELSE 278 #define START1 279 #define STEP 280 #define SENS 281 #define SOLVEFOR 282 #define PROCEDURE 283 #define PARTIAL 284 #define DEL 285 #define DEL2 286 #define DEFINE1 287 #define IFERROR 288 #define PARAMETER 289 #define DERFUNC 290 #define EQUATION 291 #define TERMINAL 292 #define LINEAR 293 #define NONLINEAR 294 #define FUNCTION1 295 #define LOCAL 296 #define METHOD 297 #define LIN1 298 #define NONLIN1 299 #define PUTQ 300 #define GETQ 301 #define TABLE 302 #define DEPEND 303 #define BREAKPOINT 304 #define INCLUDE1 305 #define FUNCTION_TABLE 306 #define PROTECT 307 #define NRNMUTEXLOCK 308 #define NRNMUTEXUNLOCK 309 #define OR 310 #define AND 311 #define GT 312 #define LT 313 #define LE 314 #define EQ 315 #define NE 316 #define NOT 317 #define NAME 318 #define PRIME 319 #define REAL 320 #define INTEGER 321 #define DEFINEDVAR 322 #define STRING 323 #define PLOT 324 #define VS 325 #define LAG 326 #define RESET 327 #define MATCH 328 #define MODEL_LEVEL 329 #define SWEEP 330 #define FIRST 331 #define LAST 332 #define KINETIC 333 #define CONSERVE 334 #define REACTION 335 #define REACT1 336 #define COMPARTMENT 337 #define UNITS 338 #define UNITSON 339 #define UNITSOFF 340 #define LONGDIFUS 341 #define NEURON 342 #define SUFFIX 343 #define NONSPECIFIC 344 #define READ 345 #define WRITE 346 #define USEION 347 #define VALENCE 348 #define THREADSAFE 349 #define GLOBAL 350 #define SECTION 351 #define RANGE 352 #define POINTER 353 #define BBCOREPOINTER 354 #define EXTERNAL 355 #define BEFORE 356 #define AFTER 357 #define WATCH 358 #define ELECTRODE_CURRENT 359 #define CONSTRUCTOR 360 #define DESTRUCTOR 361 #define NETRECEIVE 362 #define FOR_NETCONS 363 #define CONDUCTANCE 364 #define GE 365 #define UNARYMINUS 366 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 76 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:355 */ Item *qp; char *str; List *lp; int i; #line 410 "parse1.c" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ /* Copy the second part of user declarations. */ #line 427 "parse1.c" /* yacc.c:358 */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE # if (defined __GNUC__ \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C # define YY_ATTRIBUTE(Spec) __attribute__(Spec) # else # define YY_ATTRIBUTE(Spec) /* empty */ # endif #endif #ifndef YY_ATTRIBUTE_PURE # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) #endif #ifndef YY_ATTRIBUTE_UNUSED # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 1311 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 129 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 166 /* YYNRULES -- Number of rules. */ #define YYNRULES 392 /* YYNSTATES -- Number of states. */ #define YYNSTATES 769 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 366 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 127, 2, 2, 57, 58, 63, 62, 69, 64, 2, 65, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 68, 2, 2, 66, 2, 2, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 59, 2, 60, 67, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, 2, 56, 70, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 133, 133, 134, 136, 137, 138, 151, 152, 153, 153, 156, 155, 161, 170, 177, 178, 181, 185, 187, 196, 198, 204, 204, 204, 204, 204, 205, 205, 205, 205, 207, 209, 210, 214, 218, 220, 225, 227, 228, 230, 230, 234, 235, 238, 239, 245, 247, 248, 251, 255, 256, 258, 259, 261, 262, 269, 269, 271, 272, 274, 275, 281, 283, 284, 286, 286, 291, 296, 298, 300, 300, 302, 303, 306, 310, 316, 320, 326, 330, 331, 334, 335, 340, 340, 342, 347, 349, 357, 361, 362, 365, 365, 367, 367, 368, 368, 369, 369, 370, 370, 371, 371, 372, 372, 373, 373, 374, 374, 375, 375, 376, 376, 377, 377, 378, 378, 379, 379, 380, 380, 381, 381, 382, 382, 384, 387, 390, 393, 393, 394, 397, 399, 403, 402, 412, 414, 429, 444, 445, 448, 449, 449, 451, 453, 454, 455, 456, 457, 458, 459, 460, 470, 472, 473, 474, 475, 476, 477, 478, 480, 481, 482, 486, 487, 488, 489, 490, 491, 492, 495, 498, 498, 502, 502, 505, 509, 533, 542, 549, 564, 587, 590, 594, 602, 603, 604, 605, 606, 607, 608, 610, 611, 612, 613, 614, 615, 616, 617, 618, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 633, 635, 640, 642, 645, 648, 651, 655, 661, 667, 673, 674, 675, 677, 680, 685, 684, 702, 703, 704, 705, 706, 708, 708, 731, 734, 735, 737, 737, 756, 759, 761, 763, 764, 771, 772, 779, 783, 783, 789, 795, 799, 804, 808, 810, 812, 815, 815, 817, 845, 844, 873, 874, 874, 876, 880, 885, 904, 903, 921, 923, 931, 934, 936, 939, 940, 944, 948, 950, 954, 956, 958, 962, 965, 967, 969, 971, 973, 975, 977, 979, 981, 984, 985, 987, 987, 997, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1010, 1011, 1014, 1019, 1021, 1024, 1028, 1028, 1032, 1035, 1034, 1038, 1042, 1041, 1045, 1048, 1049, 1051, 1058, 1058, 1060, 1062, 1064, 1066, 1067, 1068, 1069, 1071, 1073, 1075, 1076, 1078, 1078, 1081, 1082, 1084, 1086, 1093, 1097, 1099, 1104, 1108, 1109, 1110, 1112, 1114, 1116, 1122, 1132, 1141, 1147, 1149, 1150, 1157, 1172, 1175, 1176, 1178, 1180, 1184, 1185, 1188, 1191, 1192, 1194, 1195, 1197, 1199, 1201, 1203, 1205, 1207, 1209, 1211, 1214, 1216, 1218, 1220, 1223, 1224, 1226, 1230, 1231, 1234, 1235, 1237 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "VERBATIM", "COMMENT", "MODEL", "CONSTANT", "INDEPENDENT", "DEPENDENT", "STATE", "INITIAL1", "DERIVATIVE", "SOLVE", "USING", "WITH", "STEPPED", "DISCRETE", "FROM", "FORALL1", "TO", "BY", "WHILE", "IF", "ELSE", "START1", "STEP", "SENS", "SOLVEFOR", "PROCEDURE", "PARTIAL", "DEL", "DEL2", "DEFINE1", "IFERROR", "PARAMETER", "DERFUNC", "EQUATION", "TERMINAL", "LINEAR", "NONLINEAR", "FUNCTION1", "LOCAL", "METHOD", "LIN1", "NONLIN1", "PUTQ", "GETQ", "TABLE", "DEPEND", "BREAKPOINT", "INCLUDE1", "FUNCTION_TABLE", "PROTECT", "NRNMUTEXLOCK", "NRNMUTEXUNLOCK", "'{'", "'}'", "'('", "')'", "'['", "']'", "'@'", "'+'", "'*'", "'-'", "'/'", "'='", "'^'", "':'", "','", "'~'", "OR", "AND", "GT", "LT", "LE", "EQ", "NE", "NOT", "NAME", "PRIME", "REAL", "INTEGER", "DEFINEDVAR", "STRING", "PLOT", "VS", "LAG", "RESET", "MATCH", "MODEL_LEVEL", "SWEEP", "FIRST", "LAST", "KINETIC", "CONSERVE", "REACTION", "REACT1", "COMPARTMENT", "UNITS", "UNITSON", "UNITSOFF", "LONGDIFUS", "NEURON", "SUFFIX", "NONSPECIFIC", "READ", "WRITE", "USEION", "VALENCE", "THREADSAFE", "GLOBAL", "SECTION", "RANGE", "POINTER", "BBCOREPOINTER", "EXTERNAL", "BEFORE", "AFTER", "WATCH", "ELECTRODE_CURRENT", "CONSTRUCTOR", "DESTRUCTOR", "NETRECEIVE", "FOR_NETCONS", "CONDUCTANCE", "GE", "'%'", "UNARYMINUS", "$accept", "top", "all", "$@1", "$@2", "model", "line", "define1", "Name", "declare", "parmblk", "parmbody", "parmasgn", "units", "unit", "@3", "uniton", "limits", "stepblk", "stepbdy", "stepped", "numlist", "name", "number", "NUMBER", "integer", "real", "indepblk", "indepbody", "$@4", "indepdef", "withby", "depblk", "$@5", "depbody", "depdef", "opstart", "abstol", "stateblk", "$@6", "plotdecl", "pvlist", "optindex", "proc", "$@7", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "$@20", "$@21", "$@22", "$@23", "initblk", "constructblk", "destructblk", "stmtlist", "$@24", "conducthint", "locallist", "$@25", "locallist1", "locoptarray", "stmtlist1", "$@26", "ostmt", "astmt", "$@27", "$@28", "asgn", "varname", "intexpr", "expr", "nonlineqn", "lineqn", "leftlinexpr", "linexpr", "primary", "term", "funccall", "$@29", "exprlist", "fromstmt", "$@30", "opinc", "forallstmt", "$@31", "whilestmt", "ifstmt", "optelseif", "optelse", "derivblk", "linblk", "$@32", "nonlinblk", "discretblk", "partialblk", "pareqn", "firstlast", "functableblk", "funcblk", "$@33", "arglist", "$@34", "arglist1", "procedblk", "netrecblk", "$@35", "initstmt", "solveblk", "ifsolerr", "solvefor", "solvefor1", "brkptblk", "terminalblk", "bablk", "watchstmt", "watch1", "watchdir", "fornetcon", "$@36", "aexpr", "sens", "senslist", "conserve", "$@37", "compart", "$@38", "ldifus", "$@39", "namelist", "kineticblk", "reaction", "$@40", "react", "lagstmt", "queuestmt", "matchblk", "$@41", "matchlist", "match", "matchname", "unitblk", "unitbody", "unitdef", "factordef", "constblk", "conststmt", "tablestmt", "tablst", "tablst1", "dependlst", "neuronblk", "nrnstmt", "nrnuse", "nrnlist", "optnrnlist", "valence", YY_NULLPTR }; #endif # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 123, 125, 40, 41, 91, 93, 64, 43, 42, 45, 47, 61, 94, 58, 44, 126, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 37, 366 }; # endif #define YYPACT_NINF -553 #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-553))) #define YYTABLE_NINF -389 #define yytable_value_is_error(Yytable_value) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { 770, -553, 134, 827, -553, -553, -553, -553, -26, -23, -553, -553, 85, 82, 129, 93, 106, 157, 126, 287, -553, -553, 305, 443, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, 309, 331, -553, -553, 210, -553, -553, 176, -553, -553, -553, -553, -553, 346, 137, -553, -553, -553, -553, 407, 415, 391, 446, 464, 488, 510, 417, 513, 538, 527, 465, 450, 453, 521, 459, 470, -28, 29, -553, -553, -3, -553, 65, 508, 533, 541, -553, 239, 239, 241, 237, 1170, 535, -553, 546, -553, 535, -553, 553, -553, 556, -553, 557, -553, 559, -553, 12, -553, 535, -553, 560, -553, 145, -553, 569, -553, 535, -553, 535, -553, 579, -553, 185, 185, -553, 584, -553, -553, 650, -553, -553, 99, 101, -553, 602, -553, -553, -553, 411, -553, 347, -553, 595, 628, 346, 346, -553, -553, -553, -553, 624, 48, -553, -553, -553, 612, 149, 195, 431, 149, 149, 149, 149, 149, 149, 149, -553, 654, 641, 535, 642, 673, 673, 662, 672, -553, 663, 674, 535, -553, 535, 673, 675, 677, 678, -553, 535, 535, 535, 535, -553, -553, 414, 414, 200, -553, -553, 445, -553, -553, 414, 347, 414, 668, -553, -553, -553, 676, 508, -553, -553, -553, 680, 496, -553, 690, -553, -553, -553, 693, -553, 113, 693, -553, 693, 693, 693, 693, 693, 693, 693, -553, -553, -553, 705, -553, 226, -553, 703, 535, 663, 663, 724, 239, -553, 727, 728, 535, -553, -553, 663, 732, 734, 739, 741, 571, -553, 690, -553, -553, 781, -553, 414, 414, 347, 690, -10, 744, 743, 690, 581, -553, -553, -553, -553, -553, 400, -553, 690, -553, 722, 149, 149, 603, 664, -553, -553, -553, 535, 736, 760, 759, 764, -553, 690, 754, -553, -553, 769, 768, -553, -553, -553, -553, -553, -553, 414, 809, -553, 777, 765, 414, -553, 414, 690, 668, 771, 772, -553, -553, -553, -61, 130, -553, -553, -553, 4, 779, 639, -553, 745, -553, 778, 342, 232, -553, 787, -553, -553, 690, 690, 535, -553, 239, -553, 690, 832, 414, 462, 581, -553, -553, -553, 668, -553, 581, 690, 149, 426, -553, -553, 322, -553, 347, 66, -553, -553, -553, 535, 230, 262, 290, 790, 791, 182, 239, 239, 280, -553, -553, -9, 197, -553, -553, 33, 623, 632, 30, 32, 774, -553, 794, -553, -553, -553, -553, -553, -553, -553, -553, -553, 782, -553, -553, -553, -553, -553, -553, -553, -553, -553, 87, -553, 342, -553, 342, 342, 342, 690, -553, 1130, -553, -553, 342, 161, -553, -553, 788, 321, 291, -553, -553, -553, -553, 535, 800, 690, -553, -553, 347, 833, 414, 690, 785, -553, 792, -553, 130, 581, -553, 802, -553, 516, 807, -553, 66, -553, -553, 543, 811, -553, 47, -553, -553, -553, -553, 342, 342, -553, -553, 803, -553, -553, -553, -553, 826, 806, 797, 819, 813, -553, 860, 828, -553, 359, 278, 834, 292, 869, -553, 354, -553, -553, 663, 773, -553, 825, -553, 396, -553, 460, 1166, 935, 817, 817, -553, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 957, 291, 232, 161, 161, 161, 161, 535, 829, -553, -553, 833, 690, 867, 765, -553, -553, -553, -553, -553, 1166, 83, 66, 660, -553, 66, 66, 66, 66, -553, 848, 535, -553, 836, 535, 980, 1000, 396, 774, 877, 774, 841, 413, 816, 824, 220, 192, -553, 835, -553, 835, -553, 354, 354, 690, -553, -553, 519, 846, 837, -553, -553, 359, 840, 844, -553, -553, 458, 817, 458, 817, 1166, 817, 1185, 692, 614, 614, 614, 614, 614, 614, -553, 321, 291, 291, -553, -553, 859, -553, 690, 765, 414, -553, -553, 294, 688, -553, 402, -553, 402, -553, 886, 864, 66, 865, 535, 535, -553, 806, 342, -553, 413, -553, -553, 862, 866, -553, -553, 434, 173, -553, 868, 342, 342, -553, 2, 342, 248, 608, 856, -553, 354, 354, 354, 354, 354, -553, -553, 354, -553, -553, 396, -553, 878, 880, 359, -553, -553, -553, 833, -553, 1166, -553, -553, -553, 333, -553, 882, 883, 317, 888, 884, 918, 872, -553, -553, 342, 1166, 892, -553, -553, 915, -553, -553, 524, 856, 524, 856, 856, 729, 535, -553, 342, 342, 245, 690, 66, -553, -553, 342, 887, 342, 895, 898, 1022, 835, 835, 581, 905, 1045, 1065, 342, 765, 383, 939, 140, 342, 1166, 893, -553, 907, 250, 252, -553, -553, -553, -553, 1147, -553, 66, 535, -5, -553, 889, 1166, 916, 342, -553, -553, 342, 449, 919, 924, 920, -553, 921, 1166, 1087, -553, 342, -553, 906, -553, 1110, -553, 535, 928, -553 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { 0, 3, 0, 11, 1, 13, 14, 18, 0, 0, 70, 83, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 0, 91, 5, 7, 8, 22, 15, 26, 23, 24, 25, 27, 6, 29, 30, 28, 17, 358, 63, 0, 0, 47, 20, 0, 32, 135, 0, 16, 86, 21, 53, 52, 89, 0, 9, 348, 369, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 72, 0, 19, 0, 138, 134, 0, 87, 0, 0, 0, 0, 0, 0, 92, 0, 94, 0, 96, 0, 98, 0, 100, 0, 102, 0, 104, 0, 106, 0, 108, 0, 110, 0, 112, 0, 114, 0, 116, 0, 118, 0, 120, 0, 0, 357, 0, 68, 62, 0, 65, 64, 0, 0, 46, 0, 48, 37, 31, 38, 33, 0, 136, 0, 0, 89, 89, 10, 356, 347, 40, 0, 0, 349, 350, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 371, 128, 0, 0, 0, 277, 277, 0, 0, 270, 263, 0, 0, 253, 0, 277, 0, 0, 0, 288, 0, 0, 0, 0, 122, 124, 0, 0, 0, 78, 71, 79, 73, 84, 0, 0, 0, 44, 39, 58, 59, 0, 138, 90, 88, 85, 0, 0, 352, 0, 370, 387, 385, 372, 384, 0, 389, 380, 376, 374, 375, 377, 378, 379, 373, 140, 140, 125, 0, 282, 0, 248, 278, 0, 263, 263, 0, 0, 283, 0, 0, 0, 126, 127, 263, 0, 0, 0, 0, 0, 57, 38, 54, 56, 0, 66, 0, 0, 0, 38, 38, 0, 0, 38, 0, 35, 139, 137, 41, 60, 0, 61, 0, 351, 0, 0, 0, 141, 141, 247, 281, 279, 0, 0, 0, 0, 0, 268, 38, 264, 251, 252, 0, 0, 286, 285, 287, 284, 55, 359, 0, 0, 80, 0, 81, 0, 49, 0, 38, 44, 0, 0, 354, 353, 386, 390, 390, 212, 211, 171, 21, 179, 0, 143, 0, 170, 0, 0, 0, 175, 0, 280, 250, 38, 38, 0, 265, 0, 324, 38, 0, 0, 79, 0, 74, 51, 50, 44, 34, 0, 0, 0, 0, 381, 382, 0, 226, 0, 0, 169, 151, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 168, 0, 0, 159, 338, 0, 0, 0, 0, 0, 0, 163, 0, 150, 142, 144, 145, 146, 147, 161, 164, 149, 165, 166, 153, 156, 154, 155, 157, 158, 160, 162, 0, 174, 0, 210, 0, 0, 0, 38, 191, 0, 193, 225, 0, 0, 222, 221, 0, 213, 214, 218, 223, 249, 260, 0, 0, 38, 259, 69, 0, 79, 0, 38, 0, 36, 0, 355, 390, 0, 391, 21, 172, 0, 181, 190, 0, 183, 184, 0, 0, 274, 275, 235, 233, 240, 238, 0, 0, 310, 311, 309, 336, 337, 361, 364, 366, 363, 0, 0, 0, 335, 0, 0, 315, 0, 21, 0, 21, 0, 291, 0, 289, 297, 263, 131, 148, 0, 329, 0, 330, 0, 176, 0, 209, 208, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 0, 0, 0, 0, 0, 269, 266, 79, 38, 0, 81, 82, 45, 383, 392, 230, 229, 0, 0, 0, 180, 0, 0, 0, 0, 271, 0, 0, 272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, 0, 319, 0, 308, 0, 0, 38, 298, 300, 0, 0, 0, 290, 331, 0, 0, 0, 325, 194, 195, 197, 196, 198, 177, 199, 200, 201, 202, 203, 205, 206, 207, 204, 224, 178, 216, 217, 219, 220, 0, 267, 38, 81, 0, 75, 227, 0, 0, 185, 186, 188, 187, 189, 275, 0, 0, 0, 0, 0, 312, 367, 0, 365, 0, 257, 258, 0, 0, 334, 344, 342, 0, 340, 0, 0, 0, 322, 0, 0, 0, 0, 307, 299, 0, 0, 0, 0, 0, 293, 294, 0, 295, 132, 0, 332, 0, 0, 0, 261, 67, 76, 79, 232, 231, 182, 273, 276, 0, 239, 0, 0, 0, 0, 0, 0, 0, 339, 341, 0, 314, 0, 318, 323, 0, 321, 301, 302, 304, 303, 305, 306, 0, 0, 333, 0, 0, 0, 38, 0, 241, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 236, 245, 0, 0, 256, 0, 346, 0, 0, 0, 292, 296, 328, 327, 0, 77, 0, 0, 0, 242, 0, 255, 0, 0, 317, 320, 0, 237, 0, 0, 0, 360, 0, 343, 0, 234, 0, 246, 0, 326, 0, 254, 0, 0, 244 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -553, -553, -553, -553, -553, -553, -553, -553, -279, 904, -553, -553, -553, -243, -86, -553, 667, -183, -553, -553, -553, -553, -14, -185, 747, -139, -203, -553, -553, -553, 810, -553, -553, -553, 933, -553, -345, -534, -553, -553, -553, -553, 386, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -97, -553, -553, 849, -553, -553, 795, 783, -553, -553, -553, -553, -553, 652, -25, -442, 102, -553, -553, -553, 478, -415, 36, -240, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, -553, 393, -553, -553, -553, -216, -553, -553, -553, -553, -553, -553, -553, 401, 175, -553, -553, -553, 902, -553, 530, -553, -553, -553, -517, -553, -553, -553, -553, -553, -553, -553, -553, -552, -553, -553, -553, -478, -553, -553, -553, -553, -553, 395, -553, -553, -553, -553, -553, -553, -553, -553, -553, 477, -553, -553, -553, -553, -123, -553, -317 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 2, 3, 90, 23, 24, 38, 25, 53, 26, 27, 83, 140, 204, 205, 213, 28, 272, 29, 81, 136, 267, 328, 258, 259, 278, 419, 30, 78, 195, 131, 440, 31, 41, 132, 199, 266, 351, 32, 42, 33, 55, 87, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 94, 118, 120, 169, 232, 393, 34, 48, 85, 142, 284, 329, 394, 330, 362, 331, 332, 420, 459, 421, 334, 335, 428, 429, 430, 431, 422, 453, 542, 395, 554, 741, 396, 555, 397, 398, 725, 743, 96, 100, 289, 102, 112, 114, 399, 635, 122, 104, 528, 243, 244, 296, 106, 108, 342, 400, 401, 553, 238, 239, 98, 110, 191, 402, 492, 659, 403, 701, 578, 404, 471, 405, 485, 406, 644, 407, 647, 646, 116, 413, 666, 501, 408, 409, 410, 483, 640, 641, 642, 35, 91, 153, 154, 36, 77, 411, 476, 477, 560, 37, 92, 167, 220, 224, 360 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 171, 613, 208, 54, 443, 152, 361, 567, 281, 261, 522, 279, 178, 176, 544, 306, 268, 753, 270, 648, 183, 478, 184, 311, 313, 292, 293, 316, 125, 39, 127, 490, 40, 493, 484, 300, 223, 225, 226, 227, 228, 229, 230, 231, 336, 336, 358, 150, 359, 215, 168, 126, 343, 134, 260, 260, 649, 650, 690, 312, 551, 363, 260, 269, 260, 364, 137, 455, 317, 177, 479, 480, 354, 235, 145, 146, 135, 669, 308, 309, 552, 691, 246, 44, 247, 128, 457, 491, 498, 494, 252, 253, 254, 255, 47, 432, 533, 434, 435, 475, 196, 616, 196, 438, 618, 619, 620, 621, 129, 604, 605, 495, -313, -313, 216, -313, -313, 260, 198, 198, 130, 138, 347, 456, 260, 260, 310, 352, 277, 353, 280, 538, 426, 355, 4, 695, 696, 697, 698, 699, 43, 614, 700, 291, 139, 51, 180, 444, 206, 207, 218, 299, 615, 446, 744, 197, 450, 200, 50, 322, 323, 45, 423, 441, 732, 733, 451, 52, 260, 206, 207, 445, -133, 260, 638, 260, 506, 457, 51, 52, 51, 52, 676, 469, 46, 432, 186, 610, 705, 739, 49, 319, 337, 320, 531, 187, 221, 188, 481, 281, 535, 127, 507, 508, 509, 510, 88, 512, 56, 260, 189, 513, 514, 515, 516, 517, 518, 519, 424, 282, 283, 638, 426, 89, 181, 454, 458, 287, 219, 685, 295, 461, 392, 423, 190, 448, 51, 52, 148, 359, 327, 52, 276, 206, 207, 436, 539, 8, 9, 10, 11, 577, 51, 52, 583, 84, 12, 534, 643, 333, 333, 451, 52, 463, 457, 724, 520, 457, 457, 457, 457, 447, 460, 499, 222, 14, 51, 52, 579, 129, 475, 474, 631, 432, 432, 432, 432, 432, 575, 424, 611, 465, 82, 149, 150, 415, 425, -362, 751, 51, 52, 532, 722, 260, 693, 288, 748, 583, 749, 462, 427, 327, 52, 276, 206, 207, 151, 458, 51, 52, 426, 426, 426, 426, 426, 706, 17, 691, -362, 691, 437, 691, 651, 577, 577, 363, 710, 333, 529, 364, 19, 464, 57, 415, 22, 457, 499, 568, 240, 363, 470, 416, 707, 364, 526, 572, 527, 248, 417, 51, 58, 570, 472, 473, 79, 324, 325, 668, 482, 466, 575, 575, 418, 327, 52, 276, 206, 207, 671, 507, 508, 509, 510, 524, 512, 525, 80, 500, 513, 514, 515, 516, 517, 518, 519, 546, 547, 548, 549, 416, 427, 451, 52, 740, 458, 86, 417, 458, 458, 458, 458, 573, 577, 577, 577, 577, 577, 93, 574, 577, 418, 327, 52, 276, 206, 207, 95, 670, 457, 206, 207, 608, 218, 327, 52, 276, 206, 207, 451, 52, 97, 206, 207, 520, 662, 546, 547, 548, 549, 575, 575, 575, 575, 575, -93, 623, 575, 150, 625, -109, 500, 457, 263, 723, 318, 547, 576, 549, 150, 264, 202, -103, -111, 260, 582, 451, 52, 203, 256, 442, -107, -97, -99, -101, 99, 458, 264, -388, 487, 489, 449, -345, -95, 684, -119, 257, 206, 207, 427, 427, 427, 427, 427, 101, 265, 633, 634, 276, 206, 207, 219, 546, 547, 548, 549, 734, 502, 415, 503, 504, 505, 508, 583, 510, 584, 512, 521, 499, 103, 678, 679, 211, 212, 628, 585, -388, -388, -113, 105, -388, 107, -388, -388, -388, -388, -388, -388, -388, 576, 576, 109, -388, 639, 150, 111, 541, 113, 586, 663, 115, -121, -123, 606, 607, -115, -117, -105, 141, 458, 556, 557, 117, 121, 416, -228, 119, 123, 276, 206, 207, 417, 652, 653, 654, 655, -228, 656, 653, 124, 655, 168, 656, 657, 658, 418, 327, 52, 276, 206, 207, 540, 458, 143, 545, 719, 546, 547, 548, 549, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 144, 415, 170, 639, 576, 576, 576, 576, 576, 172, 415, 576, 173, 174, 702, 175, 179, 366, 500, 367, 368, 752, 754, 324, 325, 182, 369, 193, 370, 257, 206, 207, 326, 371, 372, 185, -129, 373, 374, 276, 206, 207, 375, 694, 194, 201, 767, 652, 653, 654, 655, 209, 656, 507, 508, 509, 510, 416, 512, 327, 52, 376, 377, 378, 417, 210, 416, 214, 217, 379, 380, 168, 15, 417, 234, 236, -173, 237, 418, 486, 52, 276, 206, 207, 324, 325, 381, 418, 488, 52, 276, 206, 207, 326, 672, 617, 241, -130, -262, 546, 547, 548, 549, 382, 383, 384, 242, 245, 249, 680, 250, 385, 251, 273, 386, 275, 20, 21, 387, 271, 327, 52, 688, 689, 150, 673, 692, 546, 547, 548, 549, 507, 508, 509, 510, 388, 512, -173, 286, 281, 389, 390, 515, 516, 517, 518, 519, -4, 1, 290, -4, -4, -4, -4, -4, -4, -4, -4, -4, 294, 297, 298, -4, -4, 718, 301, 715, 302, 652, 653, 654, 655, 303, 656, 304, -4, -4, 307, 321, -4, 315, -4, 720, 721, -4, -4, -4, -4, -4, 726, 314, 728, 338, 339, 340, 520, -4, -4, -4, 341, 344, 738, 345, 346, -2, 348, 745, 5, 6, 7, 8, 9, 10, 11, 349, 365, 350, 356, 412, 12, 433, 414, 357, 439, 467, 468, 757, 496, 497, 758, 51, 523, -4, 530, 264, 536, 13, -4, 14, 764, 364, -4, 537, 543, 550, 15, -4, -4, -4, 558, -4, 559, 561, 562, 16, 563, 564, 565, 580, 491, 566, 512, 609, 612, -4, -4, 569, 622, -4, -4, -4, 630, 636, 507, 508, 509, 510, 632, 512, 624, 637, 660, 513, 514, 515, 516, 517, 518, 519, 17, 664, 645, 667, 661, 18, 665, 552, 675, 677, 682, 656, 571, 687, 19, 20, 21, 683, 22, 507, 508, 509, 510, 703, 512, 704, 708, 709, 513, 514, 515, 516, 517, 518, 519, 716, 711, 713, 712, 714, 729, 727, 507, 508, 509, 510, 730, 512, 520, 735, 742, 513, 514, 515, 516, 517, 518, 519, 717, 755, 746, 747, 756, 759, 761, 507, 508, 509, 510, 760, 512, 762, 768, 765, 513, 514, 515, 516, 517, 518, 519, 587, 147, 520, 391, 507, 508, 509, 510, 603, 512, 305, 274, 262, 513, 514, 515, 516, 517, 518, 519, 133, 452, 602, 285, 233, 520, 507, 508, 509, 510, 674, 512, 681, 192, 581, 513, 514, 515, 516, 517, 518, 519, 686, 629, 0, 626, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 627, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 0, 0, 731, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 736, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 737, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 0, 0, 763, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 766, 0, 0, 520, 507, 508, 509, 510, 0, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 520, 507, 508, 509, 510, 511, 512, 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, 0, 507, 508, 509, 510, 520, 512, 0, 750, 0, 513, 514, 515, 516, 517, 518, 519, 0, 155, 0, 507, 508, 509, 510, 0, 512, 0, 0, 520, 513, 514, 515, 516, 517, 518, 519, 0, 0, 0, 507, 508, 509, 510, 0, 512, 0, 0, 0, 520, 514, 515, 516, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 520, 156, 157, 0, 0, 158, 0, 159, 160, 161, 162, 163, 164, 165, 0, 0, 0, 166, 0, 520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 520 }; static const yytype_int16 yycheck[] = { 97, 535, 141, 17, 349, 91, 323, 485, 69, 194, 425, 214, 109, 1, 456, 258, 201, 22, 203, 571, 117, 30, 119, 266, 267, 241, 242, 270, 56, 55, 1, 1, 55, 1, 1, 251, 159, 160, 161, 162, 163, 164, 165, 166, 284, 285, 107, 57, 109, 1, 55, 79, 295, 56, 193, 194, 573, 574, 56, 69, 13, 57, 201, 202, 203, 61, 1, 1, 271, 57, 79, 80, 315, 170, 88, 89, 79, 611, 263, 264, 33, 79, 179, 1, 181, 56, 365, 57, 1, 57, 187, 188, 189, 190, 1, 335, 441, 340, 341, 378, 1, 543, 1, 346, 546, 547, 548, 549, 79, 524, 525, 390, 79, 80, 66, 82, 83, 256, 132, 133, 91, 56, 307, 57, 263, 264, 265, 312, 214, 314, 216, 448, 335, 316, 0, 652, 653, 654, 655, 656, 55, 58, 659, 240, 79, 79, 1, 350, 82, 83, 1, 248, 69, 356, 14, 56, 359, 56, 1, 282, 283, 79, 1, 348, 716, 717, 79, 80, 307, 82, 83, 354, 79, 312, 1, 314, 419, 456, 79, 80, 79, 80, 624, 1, 55, 425, 1, 532, 666, 723, 84, 277, 289, 279, 437, 10, 1, 12, 1, 69, 443, 1, 62, 63, 64, 65, 69, 67, 82, 348, 25, 71, 72, 73, 74, 75, 76, 77, 57, 106, 107, 1, 425, 86, 79, 364, 365, 1, 79, 56, 244, 1, 329, 1, 49, 358, 79, 80, 1, 109, 79, 80, 81, 82, 83, 342, 449, 6, 7, 8, 9, 491, 79, 80, 62, 79, 15, 442, 66, 284, 285, 79, 80, 1, 543, 707, 126, 546, 547, 548, 549, 357, 369, 412, 79, 34, 79, 80, 494, 79, 559, 1, 561, 523, 524, 525, 526, 527, 491, 57, 533, 1, 82, 56, 57, 1, 64, 17, 740, 79, 80, 440, 57, 442, 56, 79, 56, 62, 56, 79, 335, 79, 80, 81, 82, 83, 79, 456, 79, 80, 523, 524, 525, 526, 527, 670, 85, 79, 48, 79, 344, 79, 575, 573, 574, 57, 19, 362, 435, 61, 99, 79, 55, 1, 103, 624, 485, 69, 173, 57, 375, 57, 19, 61, 63, 1, 65, 182, 64, 79, 55, 69, 376, 377, 55, 43, 44, 610, 382, 79, 573, 574, 78, 79, 80, 81, 82, 83, 84, 62, 63, 64, 65, 62, 67, 64, 55, 412, 71, 72, 73, 74, 75, 76, 77, 62, 63, 64, 65, 57, 425, 79, 80, 20, 543, 59, 64, 546, 547, 548, 549, 57, 652, 653, 654, 655, 656, 10, 64, 659, 78, 79, 80, 81, 82, 83, 11, 612, 707, 82, 83, 528, 1, 79, 80, 81, 82, 83, 79, 80, 49, 82, 83, 126, 583, 62, 63, 64, 65, 652, 653, 654, 655, 656, 11, 552, 659, 57, 555, 16, 485, 740, 17, 706, 64, 63, 491, 65, 57, 24, 59, 28, 29, 612, 499, 79, 80, 66, 64, 17, 37, 38, 39, 40, 38, 624, 24, 56, 386, 387, 64, 57, 49, 59, 51, 81, 82, 83, 523, 524, 525, 526, 527, 39, 59, 92, 93, 81, 82, 83, 79, 62, 63, 64, 65, 718, 414, 1, 416, 417, 418, 63, 62, 65, 64, 67, 424, 666, 40, 626, 627, 145, 146, 558, 74, 104, 105, 94, 28, 108, 123, 110, 111, 112, 113, 114, 115, 116, 573, 574, 37, 120, 566, 57, 16, 453, 29, 97, 583, 94, 117, 118, 526, 527, 121, 122, 123, 59, 707, 467, 468, 121, 51, 57, 58, 122, 117, 81, 82, 83, 64, 62, 63, 64, 65, 69, 67, 63, 118, 65, 55, 67, 73, 74, 78, 79, 80, 81, 82, 83, 84, 740, 69, 60, 701, 62, 63, 64, 65, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 82, 1, 79, 640, 652, 653, 654, 655, 656, 79, 1, 659, 79, 79, 662, 79, 79, 1, 666, 3, 4, 741, 742, 43, 44, 79, 10, 66, 12, 81, 82, 83, 52, 17, 18, 79, 56, 21, 22, 81, 82, 83, 26, 58, 17, 66, 766, 62, 63, 64, 65, 79, 67, 62, 63, 64, 65, 57, 67, 79, 80, 45, 46, 47, 64, 60, 57, 66, 79, 53, 54, 55, 41, 64, 56, 56, 96, 27, 78, 79, 80, 81, 82, 83, 43, 44, 70, 78, 79, 80, 81, 82, 83, 52, 615, 58, 57, 56, 58, 62, 63, 64, 65, 87, 88, 89, 57, 56, 56, 630, 56, 95, 57, 60, 98, 58, 100, 101, 102, 74, 79, 80, 643, 644, 57, 60, 647, 62, 63, 64, 65, 62, 63, 64, 65, 119, 67, 96, 56, 69, 124, 125, 73, 74, 75, 76, 77, 0, 1, 69, 3, 4, 5, 6, 7, 8, 9, 10, 11, 58, 56, 56, 15, 16, 58, 56, 687, 56, 62, 63, 64, 65, 56, 67, 56, 28, 29, 19, 79, 32, 60, 34, 703, 704, 37, 38, 39, 40, 41, 710, 69, 712, 79, 56, 58, 126, 49, 50, 51, 58, 69, 722, 56, 58, 0, 19, 727, 3, 4, 5, 6, 7, 8, 9, 60, 59, 74, 69, 96, 15, 56, 66, 73, 14, 57, 57, 747, 56, 69, 750, 79, 66, 85, 56, 24, 73, 32, 90, 34, 760, 61, 94, 73, 59, 56, 41, 99, 100, 101, 69, 103, 48, 69, 79, 50, 59, 66, 20, 108, 57, 55, 67, 56, 19, 117, 118, 55, 42, 121, 122, 123, 17, 79, 62, 63, 64, 65, 59, 67, 66, 79, 58, 71, 72, 73, 74, 75, 76, 77, 85, 73, 79, 56, 79, 90, 74, 33, 56, 56, 60, 67, 55, 57, 99, 100, 101, 63, 103, 62, 63, 64, 65, 57, 67, 57, 56, 56, 71, 72, 73, 74, 75, 76, 77, 55, 60, 31, 66, 79, 57, 66, 62, 63, 64, 65, 60, 67, 126, 56, 23, 71, 72, 73, 74, 75, 76, 77, 55, 82, 79, 66, 58, 56, 56, 62, 63, 64, 65, 57, 67, 62, 56, 79, 71, 72, 73, 74, 75, 76, 77, 58, 90, 126, 329, 62, 63, 64, 65, 523, 67, 256, 209, 195, 71, 72, 73, 74, 75, 76, 77, 80, 362, 58, 233, 168, 126, 62, 63, 64, 65, 622, 67, 632, 124, 497, 71, 72, 73, 74, 75, 76, 77, 640, 559, -1, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, -1, -1, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, -1, -1, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, 58, -1, -1, 126, 62, 63, 64, 65, -1, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, 126, 62, 63, 64, 65, 66, 67, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, -1, 62, 63, 64, 65, 126, 67, -1, 69, -1, 71, 72, 73, 74, 75, 76, 77, -1, 56, -1, 62, 63, 64, 65, -1, 67, -1, -1, 126, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, 62, 63, 64, 65, -1, 67, -1, -1, -1, 126, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 126, 104, 105, -1, -1, 108, -1, 110, 111, 112, 113, 114, 115, 116, -1, -1, -1, 120, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 126 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { 0, 1, 130, 131, 0, 3, 4, 5, 6, 7, 8, 9, 15, 32, 34, 41, 50, 85, 90, 99, 100, 101, 103, 133, 134, 136, 138, 139, 145, 147, 156, 161, 167, 169, 196, 279, 283, 289, 135, 55, 55, 162, 168, 55, 1, 79, 55, 1, 197, 84, 1, 79, 80, 137, 151, 170, 82, 55, 55, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 284, 157, 55, 55, 148, 82, 140, 79, 198, 59, 171, 69, 86, 132, 280, 290, 10, 190, 11, 228, 49, 250, 38, 229, 39, 231, 40, 237, 28, 242, 123, 243, 37, 251, 16, 232, 29, 233, 94, 268, 121, 191, 122, 192, 51, 236, 117, 118, 56, 79, 1, 56, 79, 91, 159, 163, 163, 56, 79, 149, 1, 56, 79, 141, 59, 199, 69, 82, 151, 151, 138, 1, 56, 57, 79, 143, 281, 282, 56, 104, 105, 108, 110, 111, 112, 113, 114, 115, 116, 120, 291, 55, 193, 79, 193, 79, 79, 79, 79, 1, 57, 193, 79, 1, 79, 79, 193, 193, 79, 1, 10, 12, 25, 49, 252, 252, 66, 17, 158, 1, 56, 151, 164, 56, 66, 59, 66, 142, 143, 82, 83, 154, 79, 60, 171, 171, 144, 66, 1, 66, 79, 1, 79, 292, 1, 79, 292, 293, 292, 292, 292, 292, 292, 292, 292, 194, 196, 56, 193, 56, 27, 248, 249, 248, 57, 57, 239, 240, 56, 193, 193, 248, 56, 56, 57, 193, 193, 193, 193, 64, 81, 152, 153, 154, 152, 159, 17, 24, 59, 165, 150, 152, 154, 152, 74, 146, 60, 199, 58, 81, 143, 154, 155, 143, 69, 106, 107, 200, 200, 56, 1, 79, 230, 69, 193, 239, 239, 58, 151, 241, 56, 56, 193, 239, 56, 56, 56, 56, 153, 142, 19, 152, 152, 154, 142, 69, 142, 69, 60, 142, 155, 64, 143, 143, 79, 292, 292, 43, 44, 52, 79, 151, 201, 203, 205, 206, 207, 210, 211, 216, 193, 79, 56, 58, 58, 244, 142, 69, 56, 58, 152, 19, 60, 74, 166, 152, 152, 142, 146, 69, 73, 107, 109, 294, 294, 204, 57, 61, 59, 1, 3, 4, 10, 12, 17, 18, 21, 22, 26, 45, 46, 47, 53, 54, 70, 87, 88, 89, 95, 98, 102, 119, 124, 125, 145, 193, 195, 202, 219, 222, 224, 225, 234, 245, 246, 253, 256, 259, 261, 263, 265, 272, 273, 274, 285, 96, 269, 66, 1, 57, 64, 78, 155, 207, 209, 216, 1, 57, 64, 155, 207, 212, 213, 214, 215, 216, 56, 142, 142, 193, 151, 142, 14, 160, 152, 17, 165, 155, 146, 155, 143, 292, 64, 155, 79, 206, 217, 154, 1, 57, 137, 154, 208, 193, 1, 79, 1, 79, 1, 79, 57, 57, 1, 207, 260, 151, 151, 1, 137, 286, 287, 30, 79, 80, 1, 151, 275, 1, 262, 79, 209, 79, 209, 1, 57, 254, 1, 57, 137, 56, 69, 1, 154, 207, 271, 209, 209, 209, 209, 142, 62, 63, 64, 65, 66, 67, 71, 72, 73, 74, 75, 76, 77, 126, 209, 214, 66, 62, 64, 63, 65, 238, 193, 56, 142, 154, 165, 152, 142, 73, 73, 294, 155, 84, 209, 218, 59, 208, 60, 62, 63, 64, 65, 56, 13, 33, 247, 220, 223, 209, 209, 69, 48, 288, 69, 79, 59, 66, 20, 55, 271, 69, 55, 69, 55, 1, 57, 64, 155, 207, 216, 258, 239, 108, 254, 207, 62, 64, 74, 97, 58, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 58, 213, 214, 214, 215, 215, 193, 56, 165, 142, 19, 166, 58, 69, 208, 58, 208, 208, 208, 208, 42, 193, 66, 193, 58, 58, 207, 287, 17, 137, 59, 92, 93, 235, 79, 79, 1, 151, 276, 277, 278, 66, 264, 79, 267, 266, 267, 258, 258, 142, 62, 63, 64, 65, 67, 73, 74, 255, 58, 79, 154, 207, 73, 74, 270, 56, 142, 166, 152, 84, 209, 60, 247, 56, 208, 56, 193, 193, 209, 235, 60, 63, 59, 56, 277, 57, 209, 209, 56, 79, 209, 56, 58, 258, 258, 258, 258, 258, 258, 257, 207, 57, 57, 271, 165, 19, 56, 56, 19, 60, 66, 31, 79, 209, 55, 55, 58, 193, 209, 209, 57, 142, 208, 226, 209, 66, 209, 57, 60, 58, 267, 267, 155, 56, 58, 58, 209, 166, 20, 221, 23, 227, 14, 209, 79, 66, 56, 56, 69, 208, 193, 22, 193, 82, 58, 209, 209, 56, 57, 56, 62, 58, 209, 79, 58, 193, 56 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { 0, 129, 130, 130, 131, 131, 131, 131, 131, 132, 131, 133, 131, 131, 131, 131, 131, 134, 135, 136, 136, 137, 138, 138, 138, 138, 138, 138, 138, 138, 138, 139, 140, 140, 141, 141, 141, 141, 142, 142, 144, 143, 145, 145, 146, 146, 147, 148, 148, 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, 154, 155, 155, 156, 157, 157, 158, 157, 159, 159, 160, 162, 161, 163, 163, 164, 164, 164, 164, 164, 165, 165, 166, 166, 168, 167, 169, 169, 170, 170, 171, 171, 173, 172, 174, 172, 175, 172, 176, 172, 177, 172, 178, 172, 179, 172, 180, 172, 181, 172, 182, 172, 183, 172, 184, 172, 185, 172, 186, 172, 187, 172, 188, 172, 189, 172, 190, 191, 192, 194, 193, 193, 195, 195, 197, 196, 196, 198, 198, 199, 199, 200, 201, 200, 200, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 203, 204, 203, 205, 203, 203, 206, 206, 206, 207, 207, 207, 207, 208, 208, 208, 208, 208, 208, 208, 208, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 210, 211, 212, 213, 213, 213, 213, 214, 214, 214, 215, 215, 215, 215, 215, 217, 216, 218, 218, 218, 218, 218, 220, 219, 219, 221, 221, 223, 222, 222, 224, 225, 226, 226, 227, 227, 228, 230, 229, 231, 232, 233, 233, 234, 234, 234, 235, 235, 236, 238, 237, 239, 240, 239, 241, 241, 242, 244, 243, 243, 245, 246, 246, 246, 247, 247, 248, 248, 249, 249, 249, 250, 251, 252, 252, 252, 252, 252, 253, 253, 253, 254, 255, 255, 257, 256, 256, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 259, 259, 260, 260, 262, 261, 261, 264, 263, 263, 266, 265, 265, 267, 267, 268, 270, 269, 269, 269, 269, 271, 271, 271, 271, 272, 272, 273, 273, 275, 274, 276, 276, 277, 277, 277, 278, 278, 279, 280, 280, 280, 281, 281, 282, 282, 282, 282, 283, 284, 284, 285, 285, 286, 286, 287, 287, 288, 288, 289, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 291, 291, 291, 291, 292, 292, 292, 293, 293, 294, 294, 294 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 0, 2, 2, 2, 2, 0, 5, 0, 3, 2, 2, 2, 3, 2, 0, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0, 2, 5, 3, 6, 1, 0, 1, 0, 3, 1, 1, 0, 5, 4, 0, 2, 4, 3, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 0, 2, 0, 4, 9, 1, 1, 0, 5, 0, 2, 4, 7, 8, 11, 1, 0, 2, 0, 3, 0, 5, 5, 2, 2, 4, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 3, 0, 3, 3, 3, 3, 0, 3, 3, 2, 4, 0, 3, 2, 2, 4, 0, 3, 0, 0, 3, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 0, 2, 1, 3, 4, 4, 1, 4, 3, 6, 1, 1, 3, 3, 3, 3, 3, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 2, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 0, 5, 0, 1, 1, 3, 3, 0, 10, 2, 0, 2, 0, 5, 2, 6, 8, 0, 8, 0, 3, 4, 0, 6, 5, 4, 4, 2, 11, 8, 7, 1, 1, 6, 0, 9, 0, 0, 2, 2, 4, 8, 0, 7, 2, 3, 3, 5, 2, 0, 3, 0, 1, 2, 3, 2, 3, 3, 3, 3, 3, 3, 1, 2, 3, 2, 6, 1, 1, 0, 7, 2, 1, 2, 1, 3, 3, 3, 3, 3, 3, 2, 1, 2, 2, 1, 3, 0, 5, 2, 0, 8, 5, 0, 8, 5, 1, 2, 5, 0, 10, 7, 7, 2, 1, 2, 3, 4, 4, 2, 2, 2, 0, 5, 1, 2, 1, 6, 1, 1, 4, 4, 0, 2, 2, 3, 2, 4, 4, 6, 1, 4, 0, 5, 9, 2, 0, 1, 1, 3, 0, 2, 4, 0, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7, 2, 1, 3, 1, 0, 1, 0, 2, 3 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*----------------------------------------. | Print this symbol's value on YYOUTPUT. | `----------------------------------------*/ static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T yystrlen (const char *yystr) { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: 'yyss': related to states. 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 133 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {/*ldebug(top, intoken)*/;} #line 2196 "parse1.c" /* yacc.c:1646 */ break; case 3: #line 134 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {diag("Illegal block", (char *)0);} #line 2202 "parse1.c" /* yacc.c:1646 */ break; case 6: #line 140 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {Item* q; replacstr((yyvsp[0].qp), "static double"); vectorize_substitute((yyvsp[0].qp), "/*Top LOCAL"); vectorize_substitute(lastok->next, "*/\n"); movelist((yyvsp[0].qp), lastok->next, firstlist); if (!toplocal_) {toplocal_ = newlist();} ITERATE(q, toplocal1_) { assert(SYM(q)->name[0] == '_' && SYM(q)->name[1] == 'l'); SYM(q)->name[1] = 'z'; } movelist(toplocal1_->next, toplocal1_->prev, toplocal_); } #line 2218 "parse1.c" /* yacc.c:1646 */ break; case 9: #line 153 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {model_level = atoi(STR((yyvsp[0].qp)));} #line 2224 "parse1.c" /* yacc.c:1646 */ break; case 10: #line 154 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {model_level = 0;} #line 2230 "parse1.c" /* yacc.c:1646 */ break; case 11: #line 156 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (sensused) diag("sensitivity analysis not implemented for", " this block type"); } #line 2239 "parse1.c" /* yacc.c:1646 */ break; case 13: #line 163 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {inblock(SYM((yyvsp[0].qp))->name); replacstr((yyvsp[0].qp), "\n/*VERBATIM*/\n"); if (!assert_threadsafe && !saw_verbatim_) { fprintf(stderr, "Notice: VERBATIM blocks are not thread safe\n"); saw_verbatim_ = 1; vectorize = 0; } movelist((yyvsp[0].qp),intoken->prev, procfunc);} #line 2251 "parse1.c" /* yacc.c:1646 */ break; case 14: #line 172 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { in_comment_ = 1; inblock(SYM((yyvsp[0].qp))->name); deltokens((yyvsp[0].qp), intoken->prev); in_comment_ = 0; } #line 2261 "parse1.c" /* yacc.c:1646 */ break; case 16: #line 179 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {include_file((yyvsp[0].qp));} #line 2267 "parse1.c" /* yacc.c:1646 */ break; case 17: #line 182 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (modelline == NULL) modelline = (yyvsp[0].str); deltokens((yyvsp[-1].qp), intoken->prev);} #line 2274 "parse1.c" /* yacc.c:1646 */ break; case 18: #line 185 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.str) = inputline();} #line 2280 "parse1.c" /* yacc.c:1646 */ break; case 19: #line 190 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Symbol *sp = SYM((yyvsp[-1].qp)); if (sp->subtype) diag(sp->name, " used before DEFINEed"); sp->u.str = STR((yyvsp[0].qp)); sp->type = DEFINEDVAR; deltokens((yyvsp[-2].qp), (yyvsp[0].qp));} #line 2291 "parse1.c" /* yacc.c:1646 */ break; case 20: #line 196 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("syntax: DEFINE name integer");} #line 2297 "parse1.c" /* yacc.c:1646 */ break; case 21: #line 199 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Symbol *checklocal(); SYM((yyvsp[0].qp)) = checklocal(SYM((yyvsp[0].qp))); /* it was a bug when this was done to the lookahead token in lex */ } #line 2306 "parse1.c" /* yacc.c:1646 */ break; case 31: #line 207 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {deltokens((yyvsp[-3].qp), (yyvsp[0].qp));} #line 2312 "parse1.c" /* yacc.c:1646 */ break; case 33: #line 211 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { explicit_decl(model_level, (yyvsp[0].qp));} #line 2318 "parse1.c" /* yacc.c:1646 */ break; case 34: #line 217 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {parminstall(SYM((yyvsp[-4].qp)), STR((yyvsp[-2].qp)), (yyvsp[-1].str), (yyvsp[0].str));} #line 2324 "parse1.c" /* yacc.c:1646 */ break; case 35: #line 219 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {parminstall(SYM((yyvsp[-2].qp)), "0", (yyvsp[-1].str), (yyvsp[0].str));} #line 2330 "parse1.c" /* yacc.c:1646 */ break; case 36: #line 221 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { int i = atoi(STR((yyvsp[-3].qp))); if (i < 1) diag("Array index must be > 0", (char*)0); parm_array_install(SYM((yyvsp[-5].qp)), "0", (yyvsp[-1].str), (yyvsp[0].str), i); } #line 2339 "parse1.c" /* yacc.c:1646 */ break; case 37: #line 225 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {diag("name = number", (char *)0);} #line 2345 "parse1.c" /* yacc.c:1646 */ break; case 38: #line 227 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.str) = stralloc("", (char *)0);} #line 2351 "parse1.c" /* yacc.c:1646 */ break; case 40: #line 230 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.str) = inputtopar();} #line 2357 "parse1.c" /* yacc.c:1646 */ break; case 41: #line 232 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.str) = (yyvsp[-1].str); delete((yyvsp[-2].qp)); delete((yyvsp[0].qp));} #line 2363 "parse1.c" /* yacc.c:1646 */ break; case 42: #line 234 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[0].qp), "");} #line 2369 "parse1.c" /* yacc.c:1646 */ break; case 43: #line 235 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[0].qp), "");} #line 2375 "parse1.c" /* yacc.c:1646 */ break; case 44: #line 238 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.str) = stralloc("", (char*)0);} #line 2381 "parse1.c" /* yacc.c:1646 */ break; case 45: #line 240 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Sprintf(buf, "%s %s", STR((yyvsp[-3].qp)), STR((yyvsp[-1].qp))); (yyval.str) = stralloc(buf, (char*)0); } #line 2390 "parse1.c" /* yacc.c:1646 */ break; case 46: #line 245 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {deltokens((yyvsp[-3].qp), (yyvsp[0].qp));} #line 2396 "parse1.c" /* yacc.c:1646 */ break; case 48: #line 249 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { explicit_decl(model_level, (yyvsp[0].qp)); } #line 2402 "parse1.c" /* yacc.c:1646 */ break; case 49: #line 253 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {steppedinstall(SYM((yyvsp[-3].qp)), (yyvsp[-1].qp), lastok, (yyvsp[0].str));} #line 2408 "parse1.c" /* yacc.c:1646 */ break; case 54: #line 261 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2414 "parse1.c" /* yacc.c:1646 */ break; case 55: #line 264 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Sprintf(buf, "-%s", STR((yyvsp[0].qp))); STR((yyvsp[0].qp)) = stralloc(buf, STR((yyvsp[0].qp))); (yyval.qp) = (yyvsp[0].qp); delete((yyvsp[-1].qp)); lastok = (yyvsp[0].qp); } #line 2423 "parse1.c" /* yacc.c:1646 */ break; case 59: #line 272 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[0].qp), SYM((yyvsp[0].qp))->u.str);} #line 2429 "parse1.c" /* yacc.c:1646 */ break; case 60: #line 274 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 2435 "parse1.c" /* yacc.c:1646 */ break; case 61: #line 276 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {Sprintf(buf, "%s.0", STR((yyvsp[0].qp))); STR((yyvsp[0].qp)) = stralloc(buf, STR((yyvsp[0].qp))); lastok = (yyvsp[0].qp); } #line 2444 "parse1.c" /* yacc.c:1646 */ break; case 62: #line 281 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {deltokens((yyvsp[-3].qp), (yyvsp[0].qp));} #line 2450 "parse1.c" /* yacc.c:1646 */ break; case 64: #line 285 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { explicit_decl(model_level, (yyvsp[0].qp)); } #line 2456 "parse1.c" /* yacc.c:1646 */ break; case 65: #line 286 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {scopindep = 1;} #line 2462 "parse1.c" /* yacc.c:1646 */ break; case 66: #line 287 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { explicit_decl(model_level, (yyvsp[0].qp)); scopindep = 0; } #line 2470 "parse1.c" /* yacc.c:1646 */ break; case 67: #line 293 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {indepinstall(SYM((yyvsp[-8].qp)), STR((yyvsp[-6].qp)), STR((yyvsp[-4].qp)), STR((yyvsp[-2].qp)), (yyvsp[-1].qp), (yyvsp[0].str), scopindep); } #line 2478 "parse1.c" /* yacc.c:1646 */ break; case 68: #line 296 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {diag("name FROM number TO number WITH integer\n", (char *)0);} #line 2484 "parse1.c" /* yacc.c:1646 */ break; case 70: #line 300 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {stateblock = 0;} #line 2490 "parse1.c" /* yacc.c:1646 */ break; case 71: #line 300 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {deltokens((yyvsp[-4].qp), (yyvsp[0].qp));} #line 2496 "parse1.c" /* yacc.c:1646 */ break; case 73: #line 304 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { explicit_decl(model_level, (yyvsp[0].qp));} #line 2502 "parse1.c" /* yacc.c:1646 */ break; case 74: #line 308 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {depinstall(stateblock, SYM((yyvsp[-3].qp)), 0, "0", "1", (yyvsp[-1].str), (yyvsp[-2].qp), 1, (yyvsp[0].str)); } #line 2509 "parse1.c" /* yacc.c:1646 */ break; case 75: #line 311 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {int i = atoi(STR((yyvsp[-4].qp))); if (i < 1) diag("Array index must be > 0", (char *)0); depinstall(stateblock, SYM((yyvsp[-6].qp)), i, "0", "1", (yyvsp[-1].str), (yyvsp[-2].qp), 1, (yyvsp[0].str)); } #line 2519 "parse1.c" /* yacc.c:1646 */ break; case 76: #line 317 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {depinstall(stateblock, SYM((yyvsp[-7].qp)), 0, STR((yyvsp[-5].qp)), STR((yyvsp[-3].qp)), (yyvsp[-1].str), (yyvsp[-2].qp), 1, (yyvsp[0].str)); } #line 2527 "parse1.c" /* yacc.c:1646 */ break; case 77: #line 321 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {int i = atoi(STR((yyvsp[-8].qp))); if (i < 1) diag("Array index must be > 0", (char *)0); depinstall(stateblock, SYM((yyvsp[-10].qp)), i, STR((yyvsp[-5].qp)), STR((yyvsp[-3].qp)), (yyvsp[-1].str), (yyvsp[-2].qp), 1, (yyvsp[0].str)); } #line 2537 "parse1.c" /* yacc.c:1646 */ break; case 78: #line 326 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { diag("name FROM number TO number START number\n", "FROM...TO and START are optional, name can be name[integer]\n");} #line 2545 "parse1.c" /* yacc.c:1646 */ break; case 79: #line 330 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 2551 "parse1.c" /* yacc.c:1646 */ break; case 80: #line 331 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 2557 "parse1.c" /* yacc.c:1646 */ break; case 81: #line 334 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.str) = stralloc("", (char*)0);} #line 2563 "parse1.c" /* yacc.c:1646 */ break; case 82: #line 336 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.str) = stralloc(STR((yyvsp[-1].qp)), (char*)0); } #line 2571 "parse1.c" /* yacc.c:1646 */ break; case 83: #line 340 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {stateblock = 1;} #line 2577 "parse1.c" /* yacc.c:1646 */ break; case 84: #line 340 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {deltokens((yyvsp[-4].qp), (yyvsp[0].qp));} #line 2583 "parse1.c" /* yacc.c:1646 */ break; case 85: #line 344 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Item *q; q = linsertsym(plotlist, SYM((yyvsp[-1].qp))); Insertstr(q->next, (yyvsp[0].str)); } #line 2590 "parse1.c" /* yacc.c:1646 */ break; case 86: #line 347 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { diag("PLOT namelist VS name", (char *)0);} #line 2596 "parse1.c" /* yacc.c:1646 */ break; case 87: #line 350 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (plotlist->next == plotlist) { Lappendsym(plotlist, SYM((yyvsp[-1].qp))); Lappendstr(plotlist, (yyvsp[0].str)); }else{ diag("Only one PLOT declaration allowed", (char *)0); } } #line 2608 "parse1.c" /* yacc.c:1646 */ break; case 88: #line 358 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Lappendsym(plotlist, SYM((yyvsp[-1].qp))); Lappendstr(plotlist, (yyvsp[0].str));} #line 2614 "parse1.c" /* yacc.c:1646 */ break; case 89: #line 361 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.str) = "-1";} #line 2620 "parse1.c" /* yacc.c:1646 */ break; case 90: #line 363 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.str) = STR((yyvsp[-1].qp));} #line 2626 "parse1.c" /* yacc.c:1646 */ break; case 91: #line 365 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = INITIAL1;} #line 2632 "parse1.c" /* yacc.c:1646 */ break; case 93: #line 367 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lexcontext = NONLINEAR; blocktype = DERIVATIVE;} #line 2638 "parse1.c" /* yacc.c:1646 */ break; case 95: #line 368 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = BREAKPOINT;} #line 2644 "parse1.c" /* yacc.c:1646 */ break; case 97: #line 369 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = LINEAR;} #line 2650 "parse1.c" /* yacc.c:1646 */ break; case 99: #line 370 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = NONLINEAR;} #line 2656 "parse1.c" /* yacc.c:1646 */ break; case 101: #line 371 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = FUNCTION1;} #line 2662 "parse1.c" /* yacc.c:1646 */ break; case 103: #line 372 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = PROCEDURE;} #line 2668 "parse1.c" /* yacc.c:1646 */ break; case 105: #line 373 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = NETRECEIVE;} #line 2674 "parse1.c" /* yacc.c:1646 */ break; case 107: #line 374 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = TERMINAL;} #line 2680 "parse1.c" /* yacc.c:1646 */ break; case 109: #line 375 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = DISCRETE;} #line 2686 "parse1.c" /* yacc.c:1646 */ break; case 111: #line 376 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = PARTIAL;} #line 2692 "parse1.c" /* yacc.c:1646 */ break; case 113: #line 377 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lexcontext = blocktype = KINETIC;ostmt_start();} #line 2698 "parse1.c" /* yacc.c:1646 */ break; case 114: #line 377 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {see_ostmt();} #line 2704 "parse1.c" /* yacc.c:1646 */ break; case 115: #line 378 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = CONSTRUCTOR;} #line 2710 "parse1.c" /* yacc.c:1646 */ break; case 117: #line 379 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = DESTRUCTOR;} #line 2716 "parse1.c" /* yacc.c:1646 */ break; case 119: #line 380 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = FUNCTION_TABLE;} #line 2722 "parse1.c" /* yacc.c:1646 */ break; case 121: #line 381 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = BEFORE;} #line 2728 "parse1.c" /* yacc.c:1646 */ break; case 123: #line 382 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {blocktype = AFTER;} #line 2734 "parse1.c" /* yacc.c:1646 */ break; case 125: #line 385 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {movelist((yyvsp[-1].qp), (yyvsp[0].qp), initfunc);} #line 2740 "parse1.c" /* yacc.c:1646 */ break; case 126: #line 388 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {movelist((yyvsp[-1].qp), (yyvsp[0].qp), constructorfunc);} #line 2746 "parse1.c" /* yacc.c:1646 */ break; case 127: #line 391 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {movelist((yyvsp[-1].qp), (yyvsp[0].qp), destructorfunc);} #line 2752 "parse1.c" /* yacc.c:1646 */ break; case 128: #line 393 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal();} #line 2758 "parse1.c" /* yacc.c:1646 */ break; case 129: #line 393 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {poplocal();} #line 2764 "parse1.c" /* yacc.c:1646 */ break; case 130: #line 395 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {poplocal();} #line 2770 "parse1.c" /* yacc.c:1646 */ break; case 131: #line 398 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {conductance_hint(blocktype, (yyvsp[-1].qp), (yyvsp[0].qp));} #line 2776 "parse1.c" /* yacc.c:1646 */ break; case 132: #line 400 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {conductance_hint(blocktype, (yyvsp[-3].qp), (yyvsp[0].qp));} #line 2782 "parse1.c" /* yacc.c:1646 */ break; case 133: #line 403 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (toplocal1_) {freelist(&toplocal1_);} toplocal1_ = newlist(); } #line 2791 "parse1.c" /* yacc.c:1646 */ break; case 134: #line 408 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { replacstr((yyvsp[-2].qp), "double"); Insertstr(lastok->next, ";\n"); possible_local_current(blocktype, toplocal1_); } #line 2800 "parse1.c" /* yacc.c:1646 */ break; case 135: #line 412 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal LOCAL declaration");} #line 2806 "parse1.c" /* yacc.c:1646 */ break; case 136: #line 417 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {int a2; pushlocal(); a2 = SYM((yyvsp[-1].qp))->assigned_to_; /* in case marked threadsafe */ SYM((yyvsp[-1].qp)) = copylocal(SYM((yyvsp[-1].qp))); SYM((yyvsp[-1].qp))->assigned_to_ = a2; lappendsym(toplocal1_, SYM((yyvsp[-1].qp))); if ((yyvsp[0].i)) { SYM((yyvsp[-1].qp))->araydim = (yyvsp[0].i); SYM((yyvsp[-1].qp))->subtype |= ARRAY; }else{ lastok = (yyvsp[-1].qp); } } #line 2823 "parse1.c" /* yacc.c:1646 */ break; case 137: #line 430 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { int a2 = SYM((yyvsp[-1].qp))->assigned_to_; /* in case marked threadsafe */ SYM((yyvsp[-1].qp)) = copylocal(SYM((yyvsp[-1].qp))); SYM((yyvsp[-1].qp))->assigned_to_ = a2; lappendsym(toplocal1_, SYM((yyvsp[-1].qp))); if ((yyvsp[0].i)) { SYM((yyvsp[-1].qp))->araydim = (yyvsp[0].i); SYM((yyvsp[-1].qp))->subtype |= ARRAY; }else{ lastok = (yyvsp[-1].qp); } } #line 2840 "parse1.c" /* yacc.c:1646 */ break; case 138: #line 444 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.i) = 0;} #line 2846 "parse1.c" /* yacc.c:1646 */ break; case 139: #line 446 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.i) = atoi(STR((yyvsp[-1].qp))); lastok = (yyvsp[0].qp);} #line 2852 "parse1.c" /* yacc.c:1646 */ break; case 141: #line 449 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (blocktype == KINETIC) see_ostmt();} #line 2858 "parse1.c" /* yacc.c:1646 */ break; case 142: #line 450 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (blocktype == KINETIC) see_ostmt();} #line 2864 "parse1.c" /* yacc.c:1646 */ break; case 143: #line 451 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (blocktype == KINETIC) { see_astmt((yyvsp[0].qp), astmt_end_); }} #line 2870 "parse1.c" /* yacc.c:1646 */ break; case 151: #line 461 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {inblock(SYM((yyvsp[0].qp))->name); replacstr((yyvsp[0].qp), "\n/*VERBATIM*/\n"); if (!assert_threadsafe && !saw_verbatim_) { fprintf(stderr, "Notice: VERBATIM blocks are not thread safe\n"); saw_verbatim_ = 1; vectorize = 0; } } #line 2883 "parse1.c" /* yacc.c:1646 */ break; case 152: #line 471 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {inblock(SYM((yyvsp[0].qp))->name); deltokens((yyvsp[0].qp), intoken->prev);} #line 2889 "parse1.c" /* yacc.c:1646 */ break; case 154: #line 473 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {check_block(KINETIC, blocktype, "COMPARTMENT");} #line 2895 "parse1.c" /* yacc.c:1646 */ break; case 155: #line 474 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {check_block(KINETIC, blocktype, "LONGDIFUS");} #line 2901 "parse1.c" /* yacc.c:1646 */ break; case 156: #line 475 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {check_block(KINETIC, blocktype, "CONSERVE");} #line 2907 "parse1.c" /* yacc.c:1646 */ break; case 159: #line 479 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { replacstr((yyvsp[0].qp), " _reset = 1;\n"); } #line 2913 "parse1.c" /* yacc.c:1646 */ break; case 162: #line 483 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (blocktype !=FUNCTION1 && blocktype != PROCEDURE) { diag("TABLE valid only for FUNCTION or PROCEDURE", (char *)0); }} #line 2921 "parse1.c" /* yacc.c:1646 */ break; case 167: #line 490 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrnmutex(1,(yyvsp[0].qp)); } #line 2927 "parse1.c" /* yacc.c:1646 */ break; case 168: #line 491 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrnmutex(0,(yyvsp[0].qp)); } #line 2933 "parse1.c" /* yacc.c:1646 */ break; case 169: #line 493 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal statement");} #line 2939 "parse1.c" /* yacc.c:1646 */ break; case 170: #line 497 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {astmt_end_ = insertsym(lastok->next, semi);} #line 2945 "parse1.c" /* yacc.c:1646 */ break; case 171: #line 498 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {protect_ = 1;} #line 2951 "parse1.c" /* yacc.c:1646 */ break; case 172: #line 499 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {protect_ = 0; astmt_end_ = insertsym(lastok->next, semi); astmt_end_ = protect_astmt((yyvsp[-2].qp), astmt_end_); } #line 2959 "parse1.c" /* yacc.c:1646 */ break; case 173: #line 502 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {inequation = 1;} #line 2965 "parse1.c" /* yacc.c:1646 */ break; case 174: #line 502 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = (yyvsp[0].qp); inequation = 0; astmt_end_ = insertstr(lastok->next->next->next, "");} #line 2973 "parse1.c" /* yacc.c:1646 */ break; case 175: #line 506 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {astmt_end_ = insertsym(lastok->next, semi);} #line 2979 "parse1.c" /* yacc.c:1646 */ break; case 176: #line 511 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (blocktype == DERIVATIVE && SYM((yyvsp[-2].qp))->type == PRIME) { /* put Dvar in a derivative used list */ deriv_used(SYM((yyvsp[-2].qp)), (yyvsp[0].qp), lastok); } if (blocktype == DERIVATIVE && (SYM((yyvsp[-2].qp))->subtype & STAT)) { Fprintf(stderr, "WARNING: %s (a STATE) is assigned a value\ in a DERIVATIVE block.\n Multistep integrators (such as Runge) may not\ work correctly.\n", SYM((yyvsp[-2].qp))->name); } if (blocktype == DISCRETE && SYM((yyvsp[-2].qp))->type == NAME && (SYM((yyvsp[-2].qp))->subtype & STAT)) { SYM((yyvsp[-2].qp))->used++; } if (blocktype == NETRECEIVE) { /* STATE discontinuity adjustment */ netrec_asgn((yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp), lastok); } #if NOCMODL nrn_var_assigned(SYM((yyvsp[-2].qp))); #endif } #line 3006 "parse1.c" /* yacc.c:1646 */ break; case 177: #line 535 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { inequation = 0; Insertstr((yyvsp[-2].qp), " -("); replacstr((yyvsp[-1].qp), ") + "); if (nstate == 0) {yyerror("previous equation contains no state variables"); YYERROR;} eqnqueue((yyvsp[-3].qp)); } #line 3018 "parse1.c" /* yacc.c:1646 */ break; case 178: #line 543 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { inequation = 0; delete((yyvsp[-1].qp)); if (nstate == 0) {yyerror("previous equation contains no state variables"); YYERROR;} } #line 3028 "parse1.c" /* yacc.c:1646 */ break; case 179: #line 551 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); if (!extdef2){SYM((yyvsp[0].qp))->usage |= DEP;} if (SYM((yyvsp[0].qp))->subtype & ARRAY && !extdef2) {myerr("variable needs an index");} if (inequation && (SYM((yyvsp[0].qp))->subtype & STAT) && in_solvefor(SYM((yyvsp[0].qp)))) { SYM((yyvsp[0].qp))->used++; nstate++; pstate++; tstate++; } if (SYM((yyvsp[0].qp))->subtype & INTGER) { lastok = insertstr((yyvsp[0].qp)->next, ")"); (yyvsp[0].qp) = insertstr((yyvsp[0].qp), "((double)"); } } #line 3046 "parse1.c" /* yacc.c:1646 */ break; case 180: #line 565 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); if (SYM((yyvsp[-3].qp))->type == PRIME) { usederivstatearray = 1; } SYM((yyvsp[-3].qp))->usage |= DEP; if ((SYM((yyvsp[-3].qp))->subtype & ARRAY) == 0) {myerr("variable is not an array");} if (inequation && (SYM((yyvsp[-3].qp))->subtype & STAT) && in_solvefor(SYM((yyvsp[-3].qp)))) { SYM((yyvsp[-3].qp))->used++; nstate++; pstate++; tstate++; } if (forallindex) { if (forallindex == -1) { forallindex = SYM((yyvsp[-3].qp))->araydim; } if (forallindex != SYM((yyvsp[-3].qp))->araydim) { Sprintf(buf, "%s dimension not same as other dimensions used in FORALL statement", SYM((yyvsp[-3].qp))->name); diag(buf, (char *)0); } } } #line 3073 "parse1.c" /* yacc.c:1646 */ break; case 181: #line 588 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); SYM((yyvsp[-2].qp))->usage |= DEP; disc_var_seen((yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp), 0);} #line 3080 "parse1.c" /* yacc.c:1646 */ break; case 182: #line 591 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); SYM((yyvsp[-5].qp))->usage |= DEP; disc_var_seen((yyvsp[-5].qp), (yyvsp[-4].qp), (yyvsp[-3].qp), ARRAY);} #line 3087 "parse1.c" /* yacc.c:1646 */ break; case 183: #line 595 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); SYM((yyvsp[0].qp))->usage |= DEP; if (!(SYM((yyvsp[0].qp))->subtype & INTGER)) { lastok = insertstr((yyvsp[0].qp)->next, ")"); (yyvsp[0].qp) = insertstr((yyvsp[0].qp), "((int)"); } } #line 3099 "parse1.c" /* yacc.c:1646 */ break; case 184: #line 602 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp);} #line 3105 "parse1.c" /* yacc.c:1646 */ break; case 185: #line 603 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp);} #line 3111 "parse1.c" /* yacc.c:1646 */ break; case 190: #line 608 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal integer expression");} #line 3117 "parse1.c" /* yacc.c:1646 */ break; case 194: #line 613 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 3123 "parse1.c" /* yacc.c:1646 */ break; case 199: #line 619 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = insertstr((yyvsp[-2].qp), "pow("); replacstr((yyvsp[-1].qp), ","); lastok = insertstr(lastok->next, ")"); } #line 3130 "parse1.c" /* yacc.c:1646 */ break; case 200: #line 621 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[-1].qp), " ||");} #line 3136 "parse1.c" /* yacc.c:1646 */ break; case 201: #line 622 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[-1].qp), " &&");} #line 3142 "parse1.c" /* yacc.c:1646 */ break; case 206: #line 627 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[-1].qp), " ==");} #line 3148 "parse1.c" /* yacc.c:1646 */ break; case 207: #line 628 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[-1].qp), " !=");} #line 3154 "parse1.c" /* yacc.c:1646 */ break; case 208: #line 629 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {replacstr((yyvsp[-1].qp), " !");} #line 3160 "parse1.c" /* yacc.c:1646 */ break; case 210: #line 631 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal expression");} #line 3166 "parse1.c" /* yacc.c:1646 */ break; case 211: #line 633 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {inequation = 1; nstate = 0;} #line 3172 "parse1.c" /* yacc.c:1646 */ break; case 212: #line 637 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {inequation = 1; nstate = 0; pstate = 0; tstate = 0; init_lineq((yyvsp[0].qp)); leftside = -1;} #line 3179 "parse1.c" /* yacc.c:1646 */ break; case 213: #line 640 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {leftside = 1;} #line 3185 "parse1.c" /* yacc.c:1646 */ break; case 214: #line 644 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {linterm((yyvsp[0].qp), lastok, pstate, leftside); pstate = 0;} #line 3191 "parse1.c" /* yacc.c:1646 */ break; case 215: #line 646 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {delete((yyvsp[-1].qp)); linterm((yyvsp[0].qp), lastok, pstate, -leftside); pstate = 0;} #line 3198 "parse1.c" /* yacc.c:1646 */ break; case 216: #line 649 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {delete((yyvsp[-1].qp)); linterm((yyvsp[0].qp), lastok, pstate, leftside); pstate = 0;} #line 3205 "parse1.c" /* yacc.c:1646 */ break; case 217: #line 652 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {delete((yyvsp[-1].qp)); linterm((yyvsp[0].qp), lastok, pstate, -leftside); pstate = 0;} #line 3212 "parse1.c" /* yacc.c:1646 */ break; case 218: #line 656 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (tstate == 1) { lin_state_term((yyvsp[0].qp), lastok); } tstate = 0; } #line 3222 "parse1.c" /* yacc.c:1646 */ break; case 219: #line 662 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (tstate == 1) { lin_state_term((yyvsp[0].qp), lastok); } tstate = 0; } #line 3232 "parse1.c" /* yacc.c:1646 */ break; case 220: #line 668 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (tstate) { diag("state ocurs in denominator", (char *)0); } } #line 3241 "parse1.c" /* yacc.c:1646 */ break; case 223: #line 675 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {if (tstate) diag("states not permitted in function calls", (char *)0);} #line 3248 "parse1.c" /* yacc.c:1646 */ break; case 224: #line 677 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { lastok = (yyvsp[0].qp); if (tstate) diag("states not permitted between ", "parentheses");} #line 3256 "parse1.c" /* yacc.c:1646 */ break; case 225: #line 681 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {diag("Some operators are not permitted in linear\n", "expressions unless the terms containing them are\nenclosed in parentheses");} #line 3263 "parse1.c" /* yacc.c:1646 */ break; case 226: #line 685 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (SYM((yyvsp[-1].qp))->subtype & EXTDEF2) { extdef2 = 1;}} #line 3269 "parse1.c" /* yacc.c:1646 */ break; case 227: #line 687 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp); SYM((yyvsp[-4].qp))->usage |= FUNCT; if (SYM((yyvsp[-4].qp))->subtype & EXTDEF2) { extdef2 = 0;} if (SYM((yyvsp[-4].qp))->subtype & EXTDEF3) { add_reset_args((yyvsp[-3].qp));} if (SYM((yyvsp[-4].qp))->subtype & EXTDEF4) { add_nrnthread_arg((yyvsp[-3].qp));} if (SYM((yyvsp[-4].qp))->subtype & EXTDEF5) { if (!assert_threadsafe) { fprintf(stderr, "Notice: %s is not thread safe\n", SYM((yyvsp[-4].qp))->name); vectorize = 0; } } #if VECTORIZE vectorize_use_func((yyvsp[-4].qp),(yyvsp[-3].qp),(yyvsp[-1].qp),(yyvsp[0].qp),blocktype); #endif } #line 3288 "parse1.c" /* yacc.c:1646 */ break; case 228: #line 702 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3294 "parse1.c" /* yacc.c:1646 */ break; case 233: #line 708 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal(); SYM((yyvsp[0].qp)) = copylocal(SYM((yyvsp[0].qp))); SYM((yyvsp[0].qp))->subtype |= INTGER;} #line 3301 "parse1.c" /* yacc.c:1646 */ break; case 234: #line 712 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { replacstr((yyvsp[-9].qp), "{int "); poplocal(); Insertstr((yyvsp[-6].qp), ";for ("); Insertstr((yyvsp[-6].qp), SYM((yyvsp[-8].qp))->name); Insertstr((yyvsp[-4].qp), ";"); Insertstr((yyvsp[-4].qp), SYM((yyvsp[-8].qp))->name); replacstr((yyvsp[-4].qp), "<="); if ((yyvsp[-2].qp)) { Insertstr((yyvsp[-2].qp), ";"); Insertstr((yyvsp[-2].qp), SYM((yyvsp[-8].qp))->name); replacstr((yyvsp[-2].qp), "+="); } else { Insertstr((yyvsp[-1].qp), ";"); Insertstr((yyvsp[-1].qp), SYM((yyvsp[-8].qp))->name); Insertstr((yyvsp[-1].qp), "++"); } Insertstr((yyvsp[-1].qp), ")"); Insertstr((yyvsp[0].qp), "}"); } #line 3325 "parse1.c" /* yacc.c:1646 */ break; case 235: #line 731 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("FROM intvar = intexpr TO intexpr BY intexpr { statements }");} #line 3332 "parse1.c" /* yacc.c:1646 */ break; case 236: #line 734 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 3338 "parse1.c" /* yacc.c:1646 */ break; case 238: #line 737 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal(); SYM((yyvsp[0].qp)) = copylocal(SYM((yyvsp[0].qp))); SYM((yyvsp[0].qp))->subtype |= INTGER; if (forallindex) { diag("Nested FORALL statements not allowed", (char *)0); } forallindex = -1; } #line 3350 "parse1.c" /* yacc.c:1646 */ break; case 239: #line 746 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { replacstr((yyvsp[-4].qp), "{int "); poplocal(); if (forallindex == -1) { diag("FORALL range is undefined since no arrays used", " within the statement"); } Sprintf(buf, "; for (%s=0; %s<%d; %s++)", SYM((yyvsp[-3].qp))->name, SYM((yyvsp[-3].qp))->name, forallindex, SYM((yyvsp[-3].qp))->name); Insertstr((yyvsp[-1].qp), buf); Insertstr((yyvsp[0].qp), "}"); } #line 3365 "parse1.c" /* yacc.c:1646 */ break; case 240: #line 756 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("FORALL intvar { statements }");} #line 3372 "parse1.c" /* yacc.c:1646 */ break; case 244: #line 765 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { #if VECTORIZE vectorize_if_else_stmt(blocktype); #endif } #line 3382 "parse1.c" /* yacc.c:1646 */ break; case 246: #line 773 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { #if VECTORIZE vectorize_if_else_stmt(blocktype); #endif } #line 3392 "parse1.c" /* yacc.c:1646 */ break; case 247: #line 781 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagederiv((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp), sensused); sensused = 0;} #line 3398 "parse1.c" /* yacc.c:1646 */ break; case 248: #line 783 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {init_linblk((yyvsp[-1].qp));} #line 3404 "parse1.c" /* yacc.c:1646 */ break; case 249: #line 785 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massage_linblk((yyvsp[-5].qp), (yyvsp[-4].qp), (yyvsp[-1].qp), (yyvsp[0].qp), sensused); lexcontext = 0; sensused = 0; } #line 3412 "parse1.c" /* yacc.c:1646 */ break; case 250: #line 791 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagenonlin((yyvsp[-4].qp), (yyvsp[-3].qp), (yyvsp[-1].qp), (yyvsp[0].qp), sensused); lexcontext = 0; sensused = 0; } #line 3420 "parse1.c" /* yacc.c:1646 */ break; case 251: #line 797 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagediscblk((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp));} #line 3426 "parse1.c" /* yacc.c:1646 */ break; case 252: #line 801 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagepartial((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); lexcontext = 0; } #line 3434 "parse1.c" /* yacc.c:1646 */ break; case 253: #line 804 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { diag("within the PARTIAL block must occur an equation with the syntax ---\n", "~ V' = F*DEL2(V) + G\n"); } #line 3442 "parse1.c" /* yacc.c:1646 */ break; case 254: #line 809 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {partial_eqn((yyvsp[-9].qp), (yyvsp[-7].qp), (yyvsp[-3].qp), (yyvsp[0].qp));} #line 3448 "parse1.c" /* yacc.c:1646 */ break; case 255: #line 811 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {partial_bndry(0, (yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[0].qp), lastok);} #line 3454 "parse1.c" /* yacc.c:1646 */ break; case 256: #line 813 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {partial_bndry(2, (yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[0].qp), lastok);} #line 3460 "parse1.c" /* yacc.c:1646 */ break; case 259: #line 818 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {Item *b1, *b2; Symbol* s = SYM((yyvsp[-4].qp)); s->varnum = argcnt_; b1 = insertstr((yyvsp[-1].qp)->next, "{\n"); b2 = insertstr(b1->next, "}\n"); #define GLOBFUNCT 1 #if GLOBFUNCT && NMODL replacstr((yyvsp[-5].qp), "\ndouble"); #else replacstr((yyvsp[-5].qp), "\nstatic double"); #endif defarg((yyvsp[-3].qp), (yyvsp[-1].qp)); movelist((yyvsp[-5].qp), b2, procfunc); if (SYM((yyvsp[-4].qp))->subtype & FUNCT) { diag(SYM((yyvsp[-4].qp))->name, " declared as FUNCTION twice"); } SYM((yyvsp[-4].qp))->subtype |= FUNCT; SYM((yyvsp[-4].qp))->usage |= FUNCT; #if HMODL || NMODL hocfunc(s, (yyvsp[-3].qp), (yyvsp[-1].qp)); #endif function_table(s, (yyvsp[-3].qp), (yyvsp[-1].qp), b1, b2); poplocal(); } #line 3490 "parse1.c" /* yacc.c:1646 */ break; case 260: #line 845 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {IGNORE(copylocal(SYM((yyvsp[-4].qp))));} #line 3496 "parse1.c" /* yacc.c:1646 */ break; case 261: #line 849 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Symbol *s = SYM((yyvsp[-7].qp)); s->varnum = argcnt_; table_massage(table_list, (yyvsp[-8].qp), (yyvsp[-7].qp), (yyvsp[-5].lp)); freelist(&table_list); #if GLOBFUNCT && NMODL replacstr((yyvsp[-8].qp), "\ndouble"); #else replacstr((yyvsp[-8].qp), "\nstatic double"); #endif defarg((yyvsp[-6].qp), (yyvsp[-4].qp)); Sprintf(buf, "double _l%s;\n", s->name); Insertstr((yyvsp[-1].qp)->next, buf); Sprintf(buf, "\nreturn _l%s;\n", s->name); Insertstr((yyvsp[0].qp), buf); movelist((yyvsp[-8].qp), (yyvsp[0].qp), procfunc); if (SYM((yyvsp[-7].qp))->subtype & FUNCT) { diag(SYM((yyvsp[-7].qp))->name, " declared as FUNCTION twice"); } SYM((yyvsp[-7].qp))->subtype |= FUNCT; SYM((yyvsp[-7].qp))->usage |= FUNCT; #if HMODL || NMODL hocfunc(s, (yyvsp[-6].qp), (yyvsp[-4].qp)); #endif poplocal(); freelist(&(yyvsp[-5].lp));} #line 3524 "parse1.c" /* yacc.c:1646 */ break; case 262: #line 873 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal(); (yyval.lp) = LIST0; argcnt_ = 0;} #line 3530 "parse1.c" /* yacc.c:1646 */ break; case 263: #line 874 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal();} #line 3536 "parse1.c" /* yacc.c:1646 */ break; case 264: #line 874 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.lp) = (yyvsp[0].lp);} #line 3542 "parse1.c" /* yacc.c:1646 */ break; case 265: #line 877 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {SYM((yyvsp[-1].qp)) = copylocal(SYM((yyvsp[-1].qp))); argcnt_ = 1; (yyval.lp) = newlist(); Lappendsym((yyval.lp), SYM((yyvsp[-1].qp))); } #line 3550 "parse1.c" /* yacc.c:1646 */ break; case 266: #line 881 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {SYM((yyvsp[-1].qp)) = copylocal(SYM((yyvsp[-1].qp))); Lappendsym((yyval.lp), SYM((yyvsp[-1].qp))); ++argcnt_; } #line 3558 "parse1.c" /* yacc.c:1646 */ break; case 267: #line 886 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {Symbol *s = SYM((yyvsp[-6].qp)); s->u.i = 0; /* avoid objectcenter warning if solved */ s->varnum = argcnt_; /* allow proper number of "double" in prototype */ table_massage(table_list, (yyvsp[-7].qp), (yyvsp[-6].qp), (yyvsp[-4].lp)); freelist(&table_list); replacstr((yyvsp[-7].qp), "\nstatic int "); defarg((yyvsp[-5].qp), (yyvsp[-3].qp)); Insertstr((yyvsp[0].qp), " return 0;"); movelist((yyvsp[-7].qp), (yyvsp[0].qp), procfunc); if (SYM((yyvsp[-6].qp))->subtype & PROCED) { diag(SYM((yyvsp[-6].qp))->name, " declared as PROCEDURE twice"); } SYM((yyvsp[-6].qp))->subtype |= PROCED; SYM((yyvsp[-6].qp))->usage |= FUNCT; #if HMODL || NMODL hocfunc(s, (yyvsp[-5].qp), (yyvsp[-3].qp)); #endif poplocal(); freelist(&(yyvsp[-4].lp));} #line 3579 "parse1.c" /* yacc.c:1646 */ break; case 268: #line 904 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nr_argcnt_ = argcnt_; /* add flag arg */ if ((yyvsp[-1].lp) == LIST0) { diag("NET_RECEIVE block"," must have at least one argument"); } Lappendsym((yyvsp[-1].lp), copylocal(install("flag", NAME))); } #line 3592 "parse1.c" /* yacc.c:1646 */ break; case 269: #line 913 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { replacstr((yyvsp[-6].qp), "\nstatic void _net_receive"); movelist((yyvsp[-6].qp), (yyvsp[0].qp), procfunc); #if NMODL net_receive((yyvsp[-4].lp), (yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); #endif poplocal(); freelist(&(yyvsp[-4].lp)); } #line 3605 "parse1.c" /* yacc.c:1646 */ break; case 270: #line 921 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("syntax: NET_RECEIVE ( weight ) {stmtlist}");} #line 3611 "parse1.c" /* yacc.c:1646 */ break; case 271: #line 924 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { check_block(NETRECEIVE, blocktype, "INITIAL"); #if NMODL net_init((yyvsp[-2].qp), (yyvsp[0].qp)); #endif } #line 3622 "parse1.c" /* yacc.c:1646 */ break; case 272: #line 933 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { solvequeue((yyvsp[-1].qp), ITEM0, blocktype, (yyvsp[0].qp)); } #line 3628 "parse1.c" /* yacc.c:1646 */ break; case 273: #line 935 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { solvequeue((yyvsp[-3].qp), (yyvsp[-1].qp), blocktype, (yyvsp[0].qp)); } #line 3634 "parse1.c" /* yacc.c:1646 */ break; case 274: #line 936 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("Illegal SOLVE statement");} #line 3640 "parse1.c" /* yacc.c:1646 */ break; case 275: #line 939 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = ITEM0; } #line 3646 "parse1.c" /* yacc.c:1646 */ break; case 276: #line 941 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = (yyvsp[0].qp); } #line 3652 "parse1.c" /* yacc.c:1646 */ break; case 277: #line 944 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (solveforlist) { freelist(&solveforlist); } } #line 3661 "parse1.c" /* yacc.c:1646 */ break; case 279: #line 951 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { solveforlist = newlist(); Lappendsym(solveforlist, SYM((yyvsp[0].qp))); delete((yyvsp[-1].qp)); delete((yyvsp[0].qp)); } #line 3669 "parse1.c" /* yacc.c:1646 */ break; case 280: #line 955 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Lappendsym(solveforlist, SYM((yyvsp[0].qp))); delete((yyvsp[-1].qp)); delete((yyvsp[0].qp));} #line 3675 "parse1.c" /* yacc.c:1646 */ break; case 281: #line 956 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("Syntax: SOLVEFOR name, name, ...");} #line 3681 "parse1.c" /* yacc.c:1646 */ break; case 282: #line 960 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {brkpnt_exists = 1; movelist((yyvsp[-1].qp), (yyvsp[0].qp), modelfunc);} #line 3687 "parse1.c" /* yacc.c:1646 */ break; case 283: #line 963 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {movelist((yyvsp[-1].qp), (yyvsp[0].qp), termfunc);} #line 3693 "parse1.c" /* yacc.c:1646 */ break; case 284: #line 966 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {bablk(blocktype, BREAKPOINT, (yyvsp[-1].qp), (yyvsp[0].qp));} #line 3699 "parse1.c" /* yacc.c:1646 */ break; case 285: #line 968 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {bablk(blocktype, SOLVE, (yyvsp[-1].qp), (yyvsp[0].qp));} #line 3705 "parse1.c" /* yacc.c:1646 */ break; case 286: #line 970 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {bablk(blocktype, INITIAL1, (yyvsp[-1].qp), (yyvsp[0].qp));} #line 3711 "parse1.c" /* yacc.c:1646 */ break; case 287: #line 972 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {bablk(blocktype, STEP, (yyvsp[-1].qp), (yyvsp[0].qp));} #line 3717 "parse1.c" /* yacc.c:1646 */ break; case 288: #line 973 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("[BEFORE AFTER] [BREAKPOINT SOLVE INITIAL STEP] { stmt }");} #line 3723 "parse1.c" /* yacc.c:1646 */ break; case 289: #line 976 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp); delete((yyvsp[-1].qp));} #line 3729 "parse1.c" /* yacc.c:1646 */ break; case 290: #line 978 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {delete((yyvsp[-1].qp));} #line 3735 "parse1.c" /* yacc.c:1646 */ break; case 291: #line 979 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("WATCH (expr > expr) flag");} #line 3741 "parse1.c" /* yacc.c:1646 */ break; case 292: #line 982 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {watchstmt((yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-1].qp), (yyvsp[0].qp), blocktype); (yyval.qp)=(yyvsp[0].qp);} #line 3747 "parse1.c" /* yacc.c:1646 */ break; case 295: #line 987 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { if (blocktype != NETRECEIVE) { diag("\"FOR_NETCONS\" statement only allowed in NET_RECEIVE block", (char*)0); } if (argcnt_ != nr_argcnt_) { diag("FOR_NETCONS and NET_RECEIVE do not have same number of arguments", (char*)0); } } #line 3760 "parse1.c" /* yacc.c:1646 */ break; case 296: #line 996 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {fornetcon((yyvsp[-6].qp), (yyvsp[-5].qp), (yyvsp[-4].lp), (yyvsp[-3].qp), (yyvsp[-1].qp), (yyvsp[0].qp)); (yyval.qp) = (yyvsp[0].qp); } #line 3766 "parse1.c" /* yacc.c:1646 */ break; case 297: #line 997 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("syntax: FOR_NETCONS(args,like,netreceive) { stmtlist}");} #line 3772 "parse1.c" /* yacc.c:1646 */ break; case 301: #line 1002 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lastok = (yyvsp[0].qp);} #line 3778 "parse1.c" /* yacc.c:1646 */ break; case 306: #line 1008 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { (yyval.qp) = insertstr((yyvsp[-2].qp), "pow("); replacstr((yyvsp[-1].qp), ","); lastok = insertstr(lastok->next, ")"); } #line 3785 "parse1.c" /* yacc.c:1646 */ break; case 308: #line 1011 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal expression");} #line 3791 "parse1.c" /* yacc.c:1646 */ break; case 309: #line 1016 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { sensused = 1; delete((yyvsp[-1].qp)); } #line 3799 "parse1.c" /* yacc.c:1646 */ break; case 310: #line 1019 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("syntax is SENS var1, var2, var3, etc");} #line 3805 "parse1.c" /* yacc.c:1646 */ break; case 311: #line 1023 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { sensparm((yyvsp[0].qp)); delete((yyvsp[0].qp));} #line 3811 "parse1.c" /* yacc.c:1646 */ break; case 312: #line 1025 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { sensparm((yyvsp[0].qp)); deltokens((yyvsp[-1].qp), (yyvsp[0].qp));} #line 3817 "parse1.c" /* yacc.c:1646 */ break; case 313: #line 1028 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {extdef2 = 0; } #line 3823 "parse1.c" /* yacc.c:1646 */ break; case 314: #line 1029 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {/* react originally designed for reactions and is unchanged*/ extdef2 = 0; massageconserve((yyvsp[-4].qp), (yyvsp[-1].qp), lastok);} #line 3831 "parse1.c" /* yacc.c:1646 */ break; case 315: #line 1032 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal CONSERVE syntax");} #line 3837 "parse1.c" /* yacc.c:1646 */ break; case 316: #line 1035 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal(); SYM((yyvsp[-1].qp)) = copylocal(SYM((yyvsp[-1].qp)));} #line 3843 "parse1.c" /* yacc.c:1646 */ break; case 317: #line 1037 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagecompart((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[0].qp), SYM((yyvsp[-6].qp))); poplocal();} #line 3849 "parse1.c" /* yacc.c:1646 */ break; case 318: #line 1039 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagecompart((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[0].qp), SYM0);} #line 3855 "parse1.c" /* yacc.c:1646 */ break; case 319: #line 1042 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {pushlocal(); SYM((yyvsp[-1].qp)) = copylocal(SYM((yyvsp[-1].qp)));} #line 3861 "parse1.c" /* yacc.c:1646 */ break; case 320: #line 1044 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massageldifus((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[0].qp), SYM((yyvsp[-6].qp))); poplocal();} #line 3867 "parse1.c" /* yacc.c:1646 */ break; case 321: #line 1046 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massageldifus((yyvsp[-3].qp), (yyvsp[-2].qp), (yyvsp[0].qp), SYM0);} #line 3873 "parse1.c" /* yacc.c:1646 */ break; case 324: #line 1054 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagekinetic((yyvsp[-4].qp), (yyvsp[-3].qp), (yyvsp[-1].qp), (yyvsp[0].qp), sensused); lexcontext = 0; sensused = 0; } #line 3881 "parse1.c" /* yacc.c:1646 */ break; case 325: #line 1058 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {leftreact();} #line 3887 "parse1.c" /* yacc.c:1646 */ break; case 326: #line 1059 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {massagereaction((yyvsp[-9].qp),(yyvsp[-7].qp),(yyvsp[-4].qp),(yyvsp[-2].qp),(yyvsp[0].qp));} #line 3893 "parse1.c" /* yacc.c:1646 */ break; case 327: #line 1061 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {flux((yyvsp[-6].qp), (yyvsp[-4].qp), (yyvsp[0].qp));} #line 3899 "parse1.c" /* yacc.c:1646 */ break; case 328: #line 1063 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {flux((yyvsp[-6].qp), (yyvsp[-4].qp), (yyvsp[0].qp));} #line 3905 "parse1.c" /* yacc.c:1646 */ break; case 329: #line 1064 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Illegal reaction syntax");} #line 3911 "parse1.c" /* yacc.c:1646 */ break; case 330: #line 1066 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {reactname((yyvsp[0].qp), lastok, ITEM0);} #line 3917 "parse1.c" /* yacc.c:1646 */ break; case 331: #line 1067 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {reactname((yyvsp[0].qp), lastok, (yyvsp[-1].qp));} #line 3923 "parse1.c" /* yacc.c:1646 */ break; case 332: #line 1068 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {reactname((yyvsp[0].qp), lastok, ITEM0);} #line 3929 "parse1.c" /* yacc.c:1646 */ break; case 333: #line 1069 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {reactname((yyvsp[0].qp), lastok, (yyvsp[-1].qp));} #line 3935 "parse1.c" /* yacc.c:1646 */ break; case 334: #line 1072 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {lag_stmt((yyvsp[-3].qp), blocktype);} #line 3941 "parse1.c" /* yacc.c:1646 */ break; case 335: #line 1073 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Lag syntax is: LAG name BY const");} #line 3947 "parse1.c" /* yacc.c:1646 */ break; case 336: #line 1075 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {queue_stmt((yyvsp[-1].qp), (yyvsp[0].qp));} #line 3953 "parse1.c" /* yacc.c:1646 */ break; case 337: #line 1076 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {queue_stmt((yyvsp[-1].qp), (yyvsp[0].qp));} #line 3959 "parse1.c" /* yacc.c:1646 */ break; case 338: #line 1078 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {checkmatch(blocktype);} #line 3965 "parse1.c" /* yacc.c:1646 */ break; case 339: #line 1079 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {deltokens((yyvsp[-4].qp), (yyvsp[0].qp));} #line 3971 "parse1.c" /* yacc.c:1646 */ break; case 342: #line 1085 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {matchinitial((yyvsp[0].qp));} #line 3977 "parse1.c" /* yacc.c:1646 */ break; case 343: #line 1087 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { matchbound((yyvsp[-5].qp), (yyvsp[-4].qp), (yyvsp[-2].qp), (yyvsp[0].qp), lastok, matchindex); if (matchindex) { poplocal(); matchindex = SYM0; } } #line 3988 "parse1.c" /* yacc.c:1646 */ break; case 344: #line 1094 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("MATCH syntax is state0 or state(expr)=expr or\ state[i](expr(i)) = expr(i)");} #line 3995 "parse1.c" /* yacc.c:1646 */ break; case 345: #line 1098 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {matchindex = SYM0;} #line 4001 "parse1.c" /* yacc.c:1646 */ break; case 346: #line 1100 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { pushlocal(); matchindex = copylocal(SYM((yyvsp[-1].qp))); } #line 4009 "parse1.c" /* yacc.c:1646 */ break; case 347: #line 1105 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { deltokens((yyvsp[-3].qp),(yyvsp[0].qp));} #line 4015 "parse1.c" /* yacc.c:1646 */ break; case 348: #line 1108 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {modl_units();} #line 4021 "parse1.c" /* yacc.c:1646 */ break; case 351: #line 1113 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {install_units((yyvsp[-2].str), (yyvsp[0].str));} #line 4027 "parse1.c" /* yacc.c:1646 */ break; case 352: #line 1114 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Unit definition syntax: (units) = (units)");} #line 4033 "parse1.c" /* yacc.c:1646 */ break; case 353: #line 1117 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { SYM((yyvsp[-3].qp))->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %s;\n", SYM((yyvsp[-3].qp))->name, STR((yyvsp[-1].qp))); Lappendstr(firstlist, buf); } #line 4043 "parse1.c" /* yacc.c:1646 */ break; case 354: #line 1123 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {Item *q; double d, unit_mag(); Unit_push((yyvsp[-1].str)); Unit_push((yyvsp[0].str)); unit_div(); SYM((yyvsp[-3].qp))->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %g;\n", SYM((yyvsp[-3].qp))->name, unit_mag()); Lappendstr(firstlist, buf); unit_pop(); } #line 4057 "parse1.c" /* yacc.c:1646 */ break; case 355: #line 1133 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { double unit_mag(); Unit_push((yyvsp[-3].str)); Unit_push((yyvsp[0].str)); unit_div(); SYM((yyvsp[-5].qp))->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %g;\n", SYM((yyvsp[-5].qp))->name, unit_mag()); Lappendstr(firstlist, buf); unit_pop(); } #line 4070 "parse1.c" /* yacc.c:1646 */ break; case 356: #line 1141 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("Unit factor syntax: examples:\n\ foot2inch = (foot) -> (inch)\n\ F = 96520 (coulomb)\n\ R = (k-mole) (joule/degC)"); } #line 4080 "parse1.c" /* yacc.c:1646 */ break; case 359: #line 1151 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { SYM((yyvsp[-3].qp))->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %s;\n", SYM((yyvsp[-3].qp))->name, STR((yyvsp[-1].qp))); Lappendstr(firstlist, buf); } #line 4090 "parse1.c" /* yacc.c:1646 */ break; case 360: #line 1158 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Item *q; if (table_list) { diag("only one TABLE per function", (char *)0); } table_list = newlist(); Lappendlst(table_list, (yyvsp[-7].lp)); q = lappendlst(table_list, newlist()); movelist((yyvsp[-5].qp)->next, (yyvsp[-3].qp)->prev, LST(q)); q = lappendlst(table_list, newlist()); movelist((yyvsp[-3].qp)->next, (yyvsp[-1].qp)->prev, LST(q)); Lappendstr(table_list, STR((yyvsp[0].qp))); Lappendlst(table_list, (yyvsp[-6].lp)); deltokens((yyvsp[-8].qp), (yyvsp[0].qp)); } #line 4109 "parse1.c" /* yacc.c:1646 */ break; case 361: #line 1172 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { myerr("syntax: TABLE [list] [DEPEND list] FROM expr TO expr WITH integer");} #line 4115 "parse1.c" /* yacc.c:1646 */ break; case 362: #line 1175 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.lp) = LIST0;} #line 4121 "parse1.c" /* yacc.c:1646 */ break; case 364: #line 1179 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.lp) = newlist(); Lappendsym((yyval.lp), SYM((yyvsp[0].qp)));} #line 4127 "parse1.c" /* yacc.c:1646 */ break; case 365: #line 1181 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Lappendsym((yyvsp[-2].lp), SYM((yyvsp[0].qp)));} #line 4133 "parse1.c" /* yacc.c:1646 */ break; case 366: #line 1184 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.lp) = LIST0;} #line 4139 "parse1.c" /* yacc.c:1646 */ break; case 367: #line 1186 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.lp) = (yyvsp[0].lp);} #line 4145 "parse1.c" /* yacc.c:1646 */ break; case 368: #line 1189 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { deltokens((yyvsp[-3].qp),(yyvsp[0].qp));} #line 4151 "parse1.c" /* yacc.c:1646 */ break; case 370: #line 1193 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4157 "parse1.c" /* yacc.c:1646 */ break; case 372: #line 1196 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp),(yyvsp[0].qp));} #line 4163 "parse1.c" /* yacc.c:1646 */ break; case 373: #line 1198 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp),(yyvsp[0].qp));} #line 4169 "parse1.c" /* yacc.c:1646 */ break; case 374: #line 1200 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4175 "parse1.c" /* yacc.c:1646 */ break; case 375: #line 1202 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4181 "parse1.c" /* yacc.c:1646 */ break; case 376: #line 1204 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4187 "parse1.c" /* yacc.c:1646 */ break; case 377: #line 1206 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4193 "parse1.c" /* yacc.c:1646 */ break; case 378: #line 1208 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4199 "parse1.c" /* yacc.c:1646 */ break; case 379: #line 1210 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { nrn_list((yyvsp[-1].qp), (yyvsp[0].qp));} #line 4205 "parse1.c" /* yacc.c:1646 */ break; case 380: #line 1212 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { threadsafe_seen((yyvsp[-1].qp), (yyvsp[0].qp)); } #line 4211 "parse1.c" /* yacc.c:1646 */ break; case 381: #line 1215 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {nrn_use((yyvsp[-3].qp), (yyvsp[-1].qp), ITEM0, (yyvsp[0].qp));} #line 4217 "parse1.c" /* yacc.c:1646 */ break; case 382: #line 1217 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {nrn_use((yyvsp[-3].qp), ITEM0, (yyvsp[-1].qp), (yyvsp[0].qp));} #line 4223 "parse1.c" /* yacc.c:1646 */ break; case 383: #line 1219 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {nrn_use((yyvsp[-5].qp), (yyvsp[-3].qp), (yyvsp[-1].qp), (yyvsp[0].qp));} #line 4229 "parse1.c" /* yacc.c:1646 */ break; case 384: #line 1221 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("syntax is: USEION ion READ list WRITE list");} #line 4235 "parse1.c" /* yacc.c:1646 */ break; case 386: #line 1225 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { delete((yyvsp[-1].qp)); (yyval.qp) = (yyvsp[0].qp);} #line 4241 "parse1.c" /* yacc.c:1646 */ break; case 387: #line 1227 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {myerr("syntax is: keyword name , name, ..., name");} #line 4247 "parse1.c" /* yacc.c:1646 */ break; case 388: #line 1230 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = NULL;} #line 4253 "parse1.c" /* yacc.c:1646 */ break; case 390: #line 1234 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = ITEM0;} #line 4259 "parse1.c" /* yacc.c:1646 */ break; case 391: #line 1236 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ {(yyval.qp) = (yyvsp[0].qp);} #line 4265 "parse1.c" /* yacc.c:1646 */ break; case 392: #line 1239 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1646 */ { Sprintf(buf, "-%s", STR((yyvsp[0].qp))); STR((yyvsp[0].qp)) = stralloc(buf, STR((yyvsp[0].qp))); (yyval.qp) = (yyvsp[0].qp); delete((yyvsp[-1].qp)); lastok = (yyvsp[0].qp); } #line 4274 "parse1.c" /* yacc.c:1646 */ break; #line 4278 "parse1.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif return yyresult; } #line 1244 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1906 */ void yyerror(s) /* called for yacc syntax error */ char *s; { Fprintf(stderr, "%s:\n ", s); } #if !NMODL void nrn_list(q1, q2) Item *q1, *q2; { /*ARGSUSED*/ } void nrn_use(q1, q2, q3, q4) Item *q1, *q2, *q3, *q4; { /*ARGSUSED*/ } #endif neuron-7.5/src/nmodl/parse1.h000066400000000000000000000143361323325274500161540ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { VERBATIM = 258, COMMENT = 259, MODEL = 260, CONSTANT = 261, INDEPENDENT = 262, DEPENDENT = 263, STATE = 264, INITIAL1 = 265, DERIVATIVE = 266, SOLVE = 267, USING = 268, WITH = 269, STEPPED = 270, DISCRETE = 271, FROM = 272, FORALL1 = 273, TO = 274, BY = 275, WHILE = 276, IF = 277, ELSE = 278, START1 = 279, STEP = 280, SENS = 281, SOLVEFOR = 282, PROCEDURE = 283, PARTIAL = 284, DEL = 285, DEL2 = 286, DEFINE1 = 287, IFERROR = 288, PARAMETER = 289, DERFUNC = 290, EQUATION = 291, TERMINAL = 292, LINEAR = 293, NONLINEAR = 294, FUNCTION1 = 295, LOCAL = 296, METHOD = 297, LIN1 = 298, NONLIN1 = 299, PUTQ = 300, GETQ = 301, TABLE = 302, DEPEND = 303, BREAKPOINT = 304, INCLUDE1 = 305, FUNCTION_TABLE = 306, PROTECT = 307, NRNMUTEXLOCK = 308, NRNMUTEXUNLOCK = 309, OR = 310, AND = 311, GT = 312, LT = 313, LE = 314, EQ = 315, NE = 316, NOT = 317, NAME = 318, PRIME = 319, REAL = 320, INTEGER = 321, DEFINEDVAR = 322, STRING = 323, PLOT = 324, VS = 325, LAG = 326, RESET = 327, MATCH = 328, MODEL_LEVEL = 329, SWEEP = 330, FIRST = 331, LAST = 332, KINETIC = 333, CONSERVE = 334, REACTION = 335, REACT1 = 336, COMPARTMENT = 337, UNITS = 338, UNITSON = 339, UNITSOFF = 340, LONGDIFUS = 341, NEURON = 342, SUFFIX = 343, NONSPECIFIC = 344, READ = 345, WRITE = 346, USEION = 347, VALENCE = 348, THREADSAFE = 349, GLOBAL = 350, SECTION = 351, RANGE = 352, POINTER = 353, BBCOREPOINTER = 354, EXTERNAL = 355, BEFORE = 356, AFTER = 357, WATCH = 358, ELECTRODE_CURRENT = 359, CONSTRUCTOR = 360, DESTRUCTOR = 361, NETRECEIVE = 362, FOR_NETCONS = 363, CONDUCTANCE = 364, GE = 365, UNARYMINUS = 366 }; #endif /* Tokens. */ #define VERBATIM 258 #define COMMENT 259 #define MODEL 260 #define CONSTANT 261 #define INDEPENDENT 262 #define DEPENDENT 263 #define STATE 264 #define INITIAL1 265 #define DERIVATIVE 266 #define SOLVE 267 #define USING 268 #define WITH 269 #define STEPPED 270 #define DISCRETE 271 #define FROM 272 #define FORALL1 273 #define TO 274 #define BY 275 #define WHILE 276 #define IF 277 #define ELSE 278 #define START1 279 #define STEP 280 #define SENS 281 #define SOLVEFOR 282 #define PROCEDURE 283 #define PARTIAL 284 #define DEL 285 #define DEL2 286 #define DEFINE1 287 #define IFERROR 288 #define PARAMETER 289 #define DERFUNC 290 #define EQUATION 291 #define TERMINAL 292 #define LINEAR 293 #define NONLINEAR 294 #define FUNCTION1 295 #define LOCAL 296 #define METHOD 297 #define LIN1 298 #define NONLIN1 299 #define PUTQ 300 #define GETQ 301 #define TABLE 302 #define DEPEND 303 #define BREAKPOINT 304 #define INCLUDE1 305 #define FUNCTION_TABLE 306 #define PROTECT 307 #define NRNMUTEXLOCK 308 #define NRNMUTEXUNLOCK 309 #define OR 310 #define AND 311 #define GT 312 #define LT 313 #define LE 314 #define EQ 315 #define NE 316 #define NOT 317 #define NAME 318 #define PRIME 319 #define REAL 320 #define INTEGER 321 #define DEFINEDVAR 322 #define STRING 323 #define PLOT 324 #define VS 325 #define LAG 326 #define RESET 327 #define MATCH 328 #define MODEL_LEVEL 329 #define SWEEP 330 #define FIRST 331 #define LAST 332 #define KINETIC 333 #define CONSERVE 334 #define REACTION 335 #define REACT1 336 #define COMPARTMENT 337 #define UNITS 338 #define UNITSON 339 #define UNITSOFF 340 #define LONGDIFUS 341 #define NEURON 342 #define SUFFIX 343 #define NONSPECIFIC 344 #define READ 345 #define WRITE 346 #define USEION 347 #define VALENCE 348 #define THREADSAFE 349 #define GLOBAL 350 #define SECTION 351 #define RANGE 352 #define POINTER 353 #define BBCOREPOINTER 354 #define EXTERNAL 355 #define BEFORE 356 #define AFTER 357 #define WATCH 358 #define ELECTRODE_CURRENT 359 #define CONSTRUCTOR 360 #define DESTRUCTOR 361 #define NETRECEIVE 362 #define FOR_NETCONS 363 #define CONDUCTANCE 364 #define GE 365 #define UNARYMINUS 366 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 76 "../../../nrn/src/nmodl/parse1.y" /* yacc.c:1909 */ Item *qp; char *str; List *lp; int i; #line 283 "parse1.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ neuron-7.5/src/nmodl/parse1.y000077500000000000000000001047541323325274500162040ustar00rootroot00000000000000%{ /* /local/src/master/nrn/src/nmodl/parse1.y,v 4.11 1999/03/24 18:34:08 hines Exp */ #include <../../nmodlconf.h> #include "modl.h" #include #if defined(__STDC__) #define sdebug(arg1,arg2) {} #define qdebug(arg1,arg2) {} #else #define sdebug(arg1,arg2) {Fprintf(stderr,"arg1:%s\n", arg2); Fflush(stderr);} #define qdebug(arg1,arg2) {Item *q; Fprintf(stderr,"arg1:");Fflush(stderr);\ for (q=arg2; q->type != 0; q=q->next){\ if (q->type == SYMBOL)\ Fprintf(stderr,"%s\n", SYM(q)->name);\ else if (q->type == STRING)\ Fprintf(stderr,"%s\n", STR(q);\ else\ Fprintf(stderr,"Illegal Item type\n");\ Fflush(stderr);}\ Fprintf(stderr,"\n");Fflush(stderr);} #endif #define ldebug(arg1, arg2) qdebug(arg1, arg2->next) extern int yylex(), yyparse(); static void yyerror(); #if YYBISON #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyssp; --yyvsp; YYERROR #else #define myerr(arg) static int ierr=0;\ if (!(ierr++))yyerror(arg); --yyps; --yypv; YYERROR #endif int brkpnt_exists; int assert_threadsafe; int usederivstatearray; extern int protect_; extern int vectorize; extern int in_comment_; /* allow non-ascii in a COMMENT */ extern char *modelline; extern Item* protect_astmt(Item*, Item*); extern List* toplocal_; static List* toplocal1_; extern List *firstlist; /* NAME symbols in order that they appear in file */ extern int lexcontext; /* ':' can return 3 different tokens */ extern List *solveforlist; /* List of symbols that are actually to be solved for in a block. See in_solvefor() */ static int stateblock; /* 0 if dependent, 1 if state */ static int blocktype; static int saw_verbatim_; /* only print the notice once */ static int inequation; /* inside an equation?*/ static int nstate; /* number of states seen in an expression */ static int leftside; /* inside left hand side of equation? */ static int pstate; /* number of state in a primary expression */ static int tstate; /* number of states in a term */ static Item *lastok; /* last token accepted by expr */ static int sensused; /* a SENS statement occurred in this block */ static Symbol *matchindex; /* local symbol for implied MATCH loop */ static int model_level = 0; /* the model level prepended to declaration blocks by merge */ static int scopindep = 0;/* SCoP independent explicitly declared if 1 */ static int extdef2 = 0; /* flag that says we are in an EXTDEF2 function */ static List *table_list = LIST0; /* table information for TABLE statement */ static int forallindex = 0; /* 0 not in FORALL, -1 just starting, >0 index of arrays used (must all be the same */ static Item* astmt_end_; /* see kinetic.c vectorizing */ static int nr_argcnt_, argcnt_; /* for matching number of args in NET_RECEIVE and FOR_NETCONS */ %} %union { Item *qp; char *str; List *lp; int i; } %token VERBATIM COMMENT MODEL CONSTANT INDEPENDENT DEPENDENT STATE %token INITIAL1 DERIVATIVE SOLVE USING WITH STEPPED DISCRETE %token FROM FORALL1 TO BY WHILE IF ELSE START1 STEP SENS SOLVEFOR %token PROCEDURE PARTIAL DEL DEL2 DEFINE1 IFERROR PARAMETER %token DERFUNC EQUATION TERMINAL LINEAR NONLINEAR FUNCTION1 LOCAL %token METHOD LIN1 NONLIN1 PUTQ GETQ TABLE DEPEND BREAKPOINT %token INCLUDE1 FUNCTION_TABLE PROTECT NRNMUTEXLOCK NRNMUTEXUNLOCK %token '{' '}' '(' ')' '[' ']' '@' '+' '*' '-' '/' '=' '^' ':' ',' %token '~' %token OR AND GT LT LE EQ NE NOT %token NAME PRIME REAL INTEGER DEFINEDVAR %type Name NUMBER real intexpr integer %token STRING PLOT VS LAG RESET MATCH MODEL_LEVEL SWEEP FIRST LAST %type line model units optindex unit limits abstol %type name number nonlineqn primary term linexpr numlist %type expr aexpr ostmt astmt stmtlist locallist locallist1 %type varname exprlist define1 queuestmt %type asgn fromstmt whilestmt ifstmt solveblk funccall ifsolerr %type opinc opstart senslist sens lagstmt forallstmt %type parmasgn stepped indepdef depdef withby %type declare parmblk indepblk depblk stateblk stepblk %type watchstmt watchdir watch1 fornetcon %type plotdecl constblk %type matchblk matchlist match matchname pareqn firstlast %token KINETIC CONSERVE REACTION REACT1 COMPARTMENT UNITS %token UNITSON UNITSOFF LONGDIFUS %type reaction conserve react compart ldifus namelist unitblk %type solvefor solvefor1 uniton %type tablst tablst1 dependlst arglist arglist1 %type locoptarray /* interface to NEURON */ %token NEURON SUFFIX NONSPECIFIC READ WRITE USEION VALENCE THREADSAFE %token GLOBAL SECTION RANGE POINTER BBCOREPOINTER EXTERNAL BEFORE AFTER WATCH %token ELECTRODE_CURRENT CONSTRUCTOR DESTRUCTOR NETRECEIVE FOR_NETCONS %type neuronblk nrnuse nrnlist optnrnlist valence initstmt bablk %token CONDUCTANCE %type conducthint /* precedence in expressions--- low to high */ %left OR %left AND %left GT GE LT LE EQ NE %left '+' '-' /* left associative, same precedence */ %left '*' '/' '%'/* left assoc., higher precedence */ %left UNARYMINUS NOT %right '^' /* exponentiation */ %% top: all {/*ldebug(top, intoken)*/;} |error {diag("Illegal block", (char *)0);} ; all: /*nothing*/ | all model | all locallist /* move the declarations into firstlist */ {Item* q; replacstr($2, "static double"); vectorize_substitute($2, "/*Top LOCAL"); vectorize_substitute(lastok->next, "*/\n"); movelist($2, lastok->next, firstlist); if (!toplocal_) {toplocal_ = newlist();} ITERATE(q, toplocal1_) { assert(SYM(q)->name[0] == '_' && SYM(q)->name[1] == 'l'); SYM(q)->name[1] = 'z'; } movelist(toplocal1_->next, toplocal1_->prev, toplocal_); } | all define1 | all declare | all MODEL_LEVEL INTEGER {model_level = atoi(STR($3));} declare {model_level = 0;} | all {if (sensused) diag("sensitivity analysis not implemented for", " this block type"); } proc | all VERBATIM /* read everything and move as is to end of procfunc */ {inblock(SYM($2)->name); replacstr($2, "\n/*VERBATIM*/\n"); if (!assert_threadsafe && !saw_verbatim_) { fprintf(stderr, "Notice: VERBATIM blocks are not thread safe\n"); saw_verbatim_ = 1; vectorize = 0; } movelist($2,intoken->prev, procfunc);} | all COMMENT /* read everything and delete */ { in_comment_ = 1; inblock(SYM($2)->name); deltokens($2, intoken->prev); in_comment_ = 0; } | all uniton | all INCLUDE1 STRING {include_file($3);} ; model: MODEL line {if (modelline == NULL) modelline = $2; deltokens($1, intoken->prev);} ; line: {$$ = inputline();} ; define1: DEFINE1 NAME INTEGER /* all subsequent occurences of NAME will be replaced by integer during parseing. See 'integer:' */ { Symbol *sp = SYM($2); if (sp->subtype) diag(sp->name, " used before DEFINEed"); sp->u.str = STR($3); sp->type = DEFINEDVAR; deltokens($1, $3);} | DEFINE1 error {myerr("syntax: DEFINE name integer");} ; Name: NAME { Symbol *checklocal(); SYM($1) = checklocal(SYM($1)); /* it was a bug when this was done to the lookahead token in lex */ } ; declare: parmblk | indepblk | depblk | stateblk | stepblk | plotdecl | neuronblk | unitblk | constblk ; parmblk: PARAMETER '{' parmbody '}' {deltokens($1, $4);} ; parmbody: /*nothing*/ | parmbody parmasgn { explicit_decl(model_level, $2);} /* | parmbody stepped */ /*now has its own block*/ ; parmasgn: NAME '=' number units limits /* install in syminorder and put info in Symbol->u.str Note that usage is EXPLICIT_DECL */ {parminstall(SYM($1), STR($3), $4, $5);} | NAME units limits {parminstall(SYM($1), "0", $2, $3);} | NAME '[' integer ']' units limits { int i = atoi(STR($3)); if (i < 1) diag("Array index must be > 0", (char*)0); parm_array_install(SYM($1), "0", $5, $6, i); } | error {diag("name = number", (char *)0);} ; units: /*nothing*/ {$$ = stralloc("", (char *)0);} | unit ; unit: '(' {$$ = inputtopar();} /*string*/ ')' /*does not include parentheses*/ {$$ = $2; delete($1); delete($3);} ; uniton: UNITSON {replacstr($1, "");} | UNITSOFF {replacstr($1, "");} ; limits: /*nothing*/ {$$ = stralloc("", (char*)0);} | LT real ',' real GT { Sprintf(buf, "%s %s", STR($2), STR($4)); $$ = stralloc(buf, (char*)0); } ; stepblk: STEPPED '{' stepbdy '}' {deltokens($1, $4);} ; stepbdy: /*nothing*/ | stepbdy stepped { explicit_decl(model_level, $2); } ; stepped: NAME '=' numlist units /* install */ {steppedinstall(SYM($1), $3, lastok, $4);} ; numlist: number ',' number | numlist ',' number ; name: Name | PRIME ; number: NUMBER {lastok = $1;} | '-' NUMBER /* replace the string with -string and discard '-'*/ { Sprintf(buf, "-%s", STR($2)); STR($2) = stralloc(buf, STR($2)); $$ = $2; delete($1); lastok = $2; } ; NUMBER: integer | REAL ; integer: INTEGER | DEFINEDVAR {replacstr($1, SYM($1)->u.str);} ; real: REAL {lastok = $1;} | integer /* add a .0 to the string */ {Sprintf(buf, "%s.0", STR($1)); STR($1) = stralloc(buf, STR($1)); lastok = $1; } ; indepblk: INDEPENDENT '{' indepbody '}' {deltokens($1, $4);} ; indepbody: /*nothing*/ | indepbody indepdef { explicit_decl(model_level, $2); } | indepbody SWEEP {scopindep = 1;} indepdef { explicit_decl(model_level, $4); scopindep = 0; } ; indepdef: NAME FROM number TO number withby integer opstart units /*indepinstall()*/ {indepinstall(SYM($1), STR($3), STR($5), STR($7), $8, $9, scopindep); } | error {diag("name FROM number TO number WITH integer\n", (char *)0);} ; withby: WITH ; depblk: DEPENDENT {stateblock = 0;} '{' depbody '}' {deltokens($1, $5);} ; depbody: /*nothing*/ | depbody depdef { explicit_decl(model_level, $2);} ; depdef: name opstart units abstol /*depinstall()*/ {depinstall(stateblock, SYM($1), 0, "0", "1", $3, $2, 1, $4); } | name '[' integer ']' opstart units abstol {int i = atoi(STR($3)); if (i < 1) diag("Array index must be > 0", (char *)0); depinstall(stateblock, SYM($1), i, "0", "1", $6, $5, 1, $7); } | name FROM number TO number opstart units abstol {depinstall(stateblock, SYM($1), 0, STR($3), STR($5), $7, $6, 1, $8); } | name '[' integer ']' FROM number TO number opstart units abstol {int i = atoi(STR($3)); if (i < 1) diag("Array index must be > 0", (char *)0); depinstall(stateblock, SYM($1), i, STR($6), STR($8), $10, $9, 1, $11); } | error { diag("name FROM number TO number START number\n", "FROM...TO and START are optional, name can be name[integer]\n");} ; opstart: /*nothing*/ {$$ = ITEM0;} | START1 number {$$ = $2;} ; abstol: /*nothing*/ { $$ = stralloc("", (char*)0);} | LT real GT { $$ = stralloc(STR($2), (char*)0); } ; stateblk: STATE {stateblock = 1;} '{' depbody '}' {deltokens($1, $5);} ; plotdecl: PLOT pvlist VS name optindex /* construct plotlist. Used in parout.c */ { Item *q; q = linsertsym(plotlist, SYM($4)); Insertstr(q->next, $5); } | PLOT error { diag("PLOT namelist VS name", (char *)0);} ; pvlist: name optindex { if (plotlist->next == plotlist) { Lappendsym(plotlist, SYM($1)); Lappendstr(plotlist, $2); }else{ diag("Only one PLOT declaration allowed", (char *)0); } } | pvlist ',' name optindex { Lappendsym(plotlist, SYM($3)); Lappendstr(plotlist, $4);} ; optindex: /*nothing*/ { $$ = "-1";} | '[' INTEGER ']' { $$ = STR($2);} ; proc: {blocktype = INITIAL1;} initblk /*blocktype set prior to parsing*/ | {lexcontext = NONLINEAR; blocktype = DERIVATIVE;} derivblk | {blocktype = BREAKPOINT;} brkptblk | {lexcontext = blocktype = LINEAR;} linblk | {lexcontext = blocktype = NONLINEAR;} nonlinblk | {blocktype = FUNCTION1;} funcblk | {blocktype = PROCEDURE;} procedblk | {blocktype = NETRECEIVE;} netrecblk | {blocktype = TERMINAL;} terminalblk | {blocktype = DISCRETE;} discretblk | {lexcontext = blocktype = PARTIAL;} partialblk | {lexcontext = blocktype = KINETIC;ostmt_start();} kineticblk {see_ostmt();} | {blocktype = CONSTRUCTOR;} constructblk | {blocktype = DESTRUCTOR;} destructblk | {blocktype = FUNCTION_TABLE;} functableblk | {blocktype = BEFORE;} BEFORE bablk | {blocktype = AFTER;} AFTER bablk ; initblk: INITIAL1 stmtlist '}' {movelist($2, $3, initfunc);} ; constructblk: CONSTRUCTOR stmtlist '}' {movelist($2, $3, constructorfunc);} ; destructblk: DESTRUCTOR stmtlist '}' {movelist($2, $3, destructorfunc);} ; stmtlist: '{' {pushlocal();} stmtlist1 {poplocal();} | '{' locallist stmtlist1 {poplocal();} ; conducthint: CONDUCTANCE Name {conductance_hint(blocktype, $1, $2);} | CONDUCTANCE Name USEION NAME {conductance_hint(blocktype, $1, $4);} ; locallist: LOCAL { if (toplocal1_) {freelist(&toplocal1_);} toplocal1_ = newlist(); } locallist1 { replacstr($1, "double"); Insertstr(lastok->next, ";\n"); possible_local_current(blocktype, toplocal1_); } | LOCAL error {myerr("Illegal LOCAL declaration");} ; locallist1: NAME locoptarray /* locals are placed in a stack of symbol lists and given the prefix _l */ {int a2; pushlocal(); a2 = SYM($1)->assigned_to_; /* in case marked threadsafe */ SYM($1) = copylocal(SYM($1)); SYM($1)->assigned_to_ = a2; lappendsym(toplocal1_, SYM($1)); if ($2) { SYM($1)->araydim = $2; SYM($1)->subtype |= ARRAY; }else{ lastok = $1; } } | locallist1 ',' NAME locoptarray { int a2 = SYM($3)->assigned_to_; /* in case marked threadsafe */ SYM($3) = copylocal(SYM($3)); SYM($3)->assigned_to_ = a2; lappendsym(toplocal1_, SYM($3)); if ($4) { SYM($3)->araydim = $4; SYM($3)->subtype |= ARRAY; }else{ lastok = $3; } } ; locoptarray: /*nothing*/ {$$ = 0;} | '[' integer ']' {$$ = atoi(STR($2)); lastok = $3;} ; stmtlist1: /*nothing*/ | stmtlist1 {if (blocktype == KINETIC) see_ostmt();} ostmt {if (blocktype == KINETIC) see_ostmt();} | stmtlist1 astmt {if (blocktype == KINETIC) { see_astmt($2, astmt_end_); }} ; ostmt: fromstmt | forallstmt | whilestmt | ifstmt | stmtlist '}' | solveblk | conducthint | VERBATIM {inblock(SYM($1)->name); replacstr($1, "\n/*VERBATIM*/\n"); if (!assert_threadsafe && !saw_verbatim_) { fprintf(stderr, "Notice: VERBATIM blocks are not thread safe\n"); saw_verbatim_ = 1; vectorize = 0; } } | COMMENT {inblock(SYM($1)->name); deltokens($1, intoken->prev);} | sens | compart {check_block(KINETIC, blocktype, "COMPARTMENT");} | ldifus {check_block(KINETIC, blocktype, "LONGDIFUS");} | conserve {check_block(KINETIC, blocktype, "CONSERVE");} | lagstmt | queuestmt | RESET { replacstr($1, " _reset = 1;\n"); } | matchblk | pareqn /* 2nd order partial equation and boundary conditions*/ | tablestmt {if (blocktype !=FUNCTION1 && blocktype != PROCEDURE) { diag("TABLE valid only for FUNCTION or PROCEDURE", (char *)0); }} | uniton | initstmt | watchstmt | fornetcon | NRNMUTEXLOCK { nrnmutex(1,$1); } | NRNMUTEXUNLOCK { nrnmutex(0,$1); } | error {myerr("Illegal statement");} ; astmt: asgn /* ';' is added when relevant */ {astmt_end_ = insertsym(lastok->next, semi);} | PROTECT {protect_ = 1;} asgn {protect_ = 0; astmt_end_ = insertsym(lastok->next, semi); astmt_end_ = protect_astmt($1, astmt_end_); } | {inequation = 1;} reaction { $$ = $2; inequation = 0; astmt_end_ = insertstr(lastok->next->next->next, "");} | funccall {astmt_end_ = insertsym(lastok->next, semi);} ; asgn: varname '=' expr /* depending on blocktype, varname may get marked as used. */ { if (blocktype == DERIVATIVE && SYM($1)->type == PRIME) { /* put Dvar in a derivative used list */ deriv_used(SYM($1), $3, lastok); } if (blocktype == DERIVATIVE && (SYM($1)->subtype & STAT)) { Fprintf(stderr, "WARNING: %s (a STATE) is assigned a value\ in a DERIVATIVE block.\n Multistep integrators (such as Runge) may not\ work correctly.\n", SYM($1)->name); } if (blocktype == DISCRETE && SYM($1)->type == NAME && (SYM($1)->subtype & STAT)) { SYM($1)->used++; } if (blocktype == NETRECEIVE) { /* STATE discontinuity adjustment */ netrec_asgn($1, $2, $3, lastok); } #if NOCMODL nrn_var_assigned(SYM($1)); #endif } | nonlineqn expr '=' expr /* put info in equation list */ { inequation = 0; Insertstr($2, " -("); replacstr($3, ") + "); if (nstate == 0) {yyerror("previous equation contains no state variables"); YYERROR;} eqnqueue($1); } | lineqn leftlinexpr '=' linexpr { inequation = 0; delete($3); if (nstate == 0) {yyerror("previous equation contains no state variables"); YYERROR;} } ; varname: name /* much marking depending on context */ {lastok = $1; if (!extdef2){SYM($1)->usage |= DEP;} if (SYM($1)->subtype & ARRAY && !extdef2) {myerr("variable needs an index");} if (inequation && (SYM($1)->subtype & STAT) && in_solvefor(SYM($1))) { SYM($1)->used++; nstate++; pstate++; tstate++; } if (SYM($1)->subtype & INTGER) { lastok = insertstr($1->next, ")"); $1 = insertstr($1, "((double)"); } } | name '[' intexpr ']' {lastok = $4; if (SYM($1)->type == PRIME) { usederivstatearray = 1; } SYM($1)->usage |= DEP; if ((SYM($1)->subtype & ARRAY) == 0) {myerr("variable is not an array");} if (inequation && (SYM($1)->subtype & STAT) && in_solvefor(SYM($1))) { SYM($1)->used++; nstate++; pstate++; tstate++; } if (forallindex) { if (forallindex == -1) { forallindex = SYM($1)->araydim; } if (forallindex != SYM($1)->araydim) { Sprintf(buf, "%s dimension not same as other dimensions used in FORALL statement", SYM($1)->name); diag(buf, (char *)0); } } } | NAME '@' integer {lastok = $3; SYM($1)->usage |= DEP; disc_var_seen($1, $2, $3, 0);} | NAME '@' integer '[' intexpr ']' {lastok = $6; SYM($1)->usage |= DEP; disc_var_seen($1, $2, $3, ARRAY);} ; intexpr: Name {lastok = $1; SYM($1)->usage |= DEP; if (!(SYM($1)->subtype & INTGER)) { lastok = insertstr($1->next, ")"); $1 = insertstr($1, "((int)"); } } | integer { lastok = $1;} | '(' intexpr ')' { lastok = $3;} | intexpr '+' intexpr | intexpr '-' intexpr | intexpr '*' intexpr | intexpr '/' intexpr | error {myerr("Illegal integer expression");} ; expr: varname | real units | funccall | '(' expr ')' {lastok = $3;} | expr '+' expr | expr '-' expr | expr '*' expr | expr '/' expr | expr '^' expr /* converted to pow() */ { $$ = insertstr($1, "pow("); replacstr($2, ","); lastok = insertstr(lastok->next, ")"); } | expr OR expr {replacstr($2, " ||");} | expr AND expr {replacstr($2, " &&");} | expr GT expr | expr LT expr | expr GE expr | expr LE expr | expr EQ expr {replacstr($2, " ==");} | expr NE expr {replacstr($2, " !=");} | NOT expr {replacstr($1, " !");} | '-' expr %prec UNARYMINUS | error {myerr("Illegal expression");} ; nonlineqn: NONLIN1 {inequation = 1; nstate = 0;} ; lineqn: LIN1 /* initialize a bunch of equation info */ {inequation = 1; nstate = 0; pstate = 0; tstate = 0; init_lineq($1); leftside = -1;} ; leftlinexpr: linexpr {leftside = 1;} ; linexpr: primary /* put terms in a list */ {linterm($1, lastok, pstate, leftside); pstate = 0;} | '-' primary {delete($1); linterm($2, lastok, pstate, -leftside); pstate = 0;} | linexpr '+' primary {delete($2); linterm($3, lastok, pstate, leftside); pstate = 0;} | linexpr '-' primary {delete($2); linterm($3, lastok, pstate, -leftside); pstate = 0;} ; primary: term { if (tstate == 1) { lin_state_term($1, lastok); } tstate = 0; } | primary '*' term { if (tstate == 1) { lin_state_term($3, lastok); } tstate = 0; } | primary '/' term { if (tstate) { diag("state ocurs in denominator", (char *)0); } } ; term: varname | real | funccall {if (tstate) diag("states not permitted in function calls", (char *)0);} | '(' expr ')' { lastok = $3; if (tstate) diag("states not permitted between ", "parentheses");} | error {diag("Some operators are not permitted in linear\n", "expressions unless the terms containing them are\nenclosed in parentheses");} ; funccall: NAME '(' { if (SYM($1)->subtype & EXTDEF2) { extdef2 = 1;}} exprlist ')' {lastok = $5; SYM($1)->usage |= FUNCT; if (SYM($1)->subtype & EXTDEF2) { extdef2 = 0;} if (SYM($1)->subtype & EXTDEF3) { add_reset_args($2);} if (SYM($1)->subtype & EXTDEF4) { add_nrnthread_arg($2);} if (SYM($1)->subtype & EXTDEF5) { if (!assert_threadsafe) { fprintf(stderr, "Notice: %s is not thread safe\n", SYM($1)->name); vectorize = 0; } } #if VECTORIZE vectorize_use_func($1,$2,$4,$5,blocktype); #endif } ; exprlist: /*nothing*/{$$ = ITEM0;} | expr | STRING | exprlist ',' expr | exprlist ',' STRING ; fromstmt: FROM NAME {pushlocal(); SYM($2) = copylocal(SYM($2)); SYM($2)->subtype |= INTGER;} '=' intexpr TO intexpr opinc stmtlist '}' /* translate the whole thing using _lNAME as an integer */ { replacstr($1, "{int "); poplocal(); Insertstr($4, ";for ("); Insertstr($4, SYM($2)->name); Insertstr($6, ";"); Insertstr($6, SYM($2)->name); replacstr($6, "<="); if ($8) { Insertstr($8, ";"); Insertstr($8, SYM($2)->name); replacstr($8, "+="); } else { Insertstr($9, ";"); Insertstr($9, SYM($2)->name); Insertstr($9, "++"); } Insertstr($9, ")"); Insertstr($10, "}"); } |FROM error { myerr("FROM intvar = intexpr TO intexpr BY intexpr { statements }");} ; opinc: /*nothing*/ {$$ = ITEM0;} | BY intexpr ; forallstmt: FORALL1 NAME {pushlocal(); SYM($2) = copylocal(SYM($2)); SYM($2)->subtype |= INTGER; if (forallindex) { diag("Nested FORALL statements not allowed", (char *)0); } forallindex = -1; } stmtlist '}' /* translate the whole thing using _lNAME as an integer */ { replacstr($1, "{int "); poplocal(); if (forallindex == -1) { diag("FORALL range is undefined since no arrays used", " within the statement"); } Sprintf(buf, "; for (%s=0; %s<%d; %s++)", SYM($2)->name, SYM($2)->name, forallindex, SYM($2)->name); Insertstr($4, buf); Insertstr($5, "}"); } |FORALL1 error { myerr("FORALL intvar { statements }");} ; whilestmt: WHILE '(' expr ')' stmtlist '}' ; ifstmt: IF '(' expr ')' stmtlist '}' optelseif optelse ; optelseif: /*nothing*/ | optelseif ELSE IF '(' expr ')' stmtlist '}' { #if VECTORIZE vectorize_if_else_stmt(blocktype); #endif } ; optelse: /*nothing*/ | ELSE stmtlist '}' { #if VECTORIZE vectorize_if_else_stmt(blocktype); #endif } ; derivblk: DERIVATIVE NAME stmtlist '}' /* process using massagederiv() */ {massagederiv($1, $2, $3, $4, sensused); sensused = 0;} ; linblk: LINEAR NAME solvefor {init_linblk($2);} stmtlist '}' /*massage_linblk()*/ {massage_linblk($1, $2, $5, $6, sensused); lexcontext = 0; sensused = 0; } ; nonlinblk: NONLINEAR NAME solvefor stmtlist '}' /*massagenonlin()*/ {massagenonlin($1, $2, $4, $5, sensused); lexcontext = 0; sensused = 0; } ; discretblk: DISCRETE NAME stmtlist '}' /*massagediscblk()*/ {massagediscblk($1, $2, $3, $4);} ; partialblk: PARTIAL NAME stmtlist '}' /*massagepartial()*/ {massagepartial($1, $2, $3, $4); lexcontext = 0; } | PARTIAL error { diag("within the PARTIAL block must occur an equation with the syntax ---\n", "~ V' = F*DEL2(V) + G\n"); } ; pareqn: '~' PRIME '=' NAME '*' DEL2 '(' NAME ')' '+' NAME {partial_eqn($2, $4, $8, $11);} | '~' DEL NAME '[' firstlast ']' '=' expr {partial_bndry(0, $3, $5, $8, lastok);} | '~' NAME '[' firstlast ']' '=' expr {partial_bndry(2, $2, $4, $7, lastok);} ; firstlast: FIRST | LAST ; functableblk: FUNCTION_TABLE NAME '(' arglist ')' units {Item *b1, *b2; Symbol* s = SYM($2); s->varnum = argcnt_; b1 = insertstr($5->next, "{\n"); b2 = insertstr(b1->next, "}\n"); #define GLOBFUNCT 1 #if GLOBFUNCT && NMODL replacstr($1, "\ndouble"); #else replacstr($1, "\nstatic double"); #endif defarg($3, $5); movelist($1, b2, procfunc); if (SYM($2)->subtype & FUNCT) { diag(SYM($2)->name, " declared as FUNCTION twice"); } SYM($2)->subtype |= FUNCT; SYM($2)->usage |= FUNCT; #if HMODL || NMODL hocfunc(s, $3, $5); #endif function_table(s, $3, $5, b1, b2); poplocal(); } ; funcblk: FUNCTION1 NAME '(' arglist ')' units {IGNORE(copylocal(SYM($2)));} stmtlist '}' /* boilerplate added to form double function(){...} Note all arguments have prefix _l */ { Symbol *s = SYM($2); s->varnum = argcnt_; table_massage(table_list, $1, $2, $4); freelist(&table_list); #if GLOBFUNCT && NMODL replacstr($1, "\ndouble"); #else replacstr($1, "\nstatic double"); #endif defarg($3, $5); Sprintf(buf, "double _l%s;\n", s->name); Insertstr($8->next, buf); Sprintf(buf, "\nreturn _l%s;\n", s->name); Insertstr($9, buf); movelist($1, $9, procfunc); if (SYM($2)->subtype & FUNCT) { diag(SYM($2)->name, " declared as FUNCTION twice"); } SYM($2)->subtype |= FUNCT; SYM($2)->usage |= FUNCT; #if HMODL || NMODL hocfunc(s, $3, $5); #endif poplocal(); freelist(&$4);} ; arglist: /*nothing*/ {pushlocal(); $$ = LIST0; argcnt_ = 0;} | {pushlocal();} arglist1 {$$ = $2;} ; arglist1: name units {SYM($1) = copylocal(SYM($1)); argcnt_ = 1; $$ = newlist(); Lappendsym($$, SYM($1)); } | arglist1 ',' name units {SYM($3) = copylocal(SYM($3)); Lappendsym($$, SYM($3)); ++argcnt_; } ; procedblk: PROCEDURE NAME '(' arglist ')' units stmtlist '}' {Symbol *s = SYM($2); s->u.i = 0; /* avoid objectcenter warning if solved */ s->varnum = argcnt_; /* allow proper number of "double" in prototype */ table_massage(table_list, $1, $2, $4); freelist(&table_list); replacstr($1, "\nstatic int "); defarg($3, $5); Insertstr($8, " return 0;"); movelist($1, $8, procfunc); if (SYM($2)->subtype & PROCED) { diag(SYM($2)->name, " declared as PROCEDURE twice"); } SYM($2)->subtype |= PROCED; SYM($2)->usage |= FUNCT; #if HMODL || NMODL hocfunc(s, $3, $5); #endif poplocal(); freelist(&$4);} ; netrecblk: NETRECEIVE '(' arglist ')' { nr_argcnt_ = argcnt_; /* add flag arg */ if ($3 == LIST0) { diag("NET_RECEIVE block"," must have at least one argument"); } Lappendsym($3, copylocal(install("flag", NAME))); } stmtlist '}' { replacstr($1, "\nstatic void _net_receive"); movelist($1, $7, procfunc); #if NMODL net_receive($3, $2, $4, $6, $7); #endif poplocal(); freelist(&$3); } | NETRECEIVE error { myerr("syntax: NET_RECEIVE ( weight ) {stmtlist}");} ; initstmt: INITIAL1 stmtlist '}' { check_block(NETRECEIVE, blocktype, "INITIAL"); #if NMODL net_init($1, $3); #endif } ; solveblk: SOLVE NAME ifsolerr /* no processing, merely save in solve list */ { solvequeue($2, ITEM0, blocktype, $3); } | SOLVE NAME USING METHOD ifsolerr { solvequeue($2, $4, blocktype, $5); } | SOLVE error { myerr("Illegal SOLVE statement");} ; ifsolerr: /*nothing*/ { $$ = ITEM0; } | IFERROR stmtlist '}' { $$ = $3; } ; solvefor: /*nothing*/ { if (solveforlist) { freelist(&solveforlist); } } | solvefor1 ; solvefor1: SOLVEFOR NAME { solveforlist = newlist(); Lappendsym(solveforlist, SYM($2)); delete($1); delete($2); } | solvefor1 ',' NAME { Lappendsym(solveforlist, SYM($3)); delete($2); delete($3);} | SOLVEFOR error { myerr("Syntax: SOLVEFOR name, name, ...");} ; brkptblk: BREAKPOINT stmtlist '}' /* move it all to modelfunc */ {brkpnt_exists = 1; movelist($2, $3, modelfunc);} ; terminalblk: TERMINAL stmtlist '}' {movelist($2, $3, termfunc);} ; bablk: BREAKPOINT stmtlist '}' {bablk(blocktype, BREAKPOINT, $2, $3);} | SOLVE stmtlist '}' {bablk(blocktype, SOLVE, $2, $3);} | INITIAL1 stmtlist '}' {bablk(blocktype, INITIAL1, $2, $3);} | STEP stmtlist '}' {bablk(blocktype, STEP, $2, $3);} | error {myerr("[BEFORE AFTER] [BREAKPOINT SOLVE INITIAL STEP] { stmt }");} ; watchstmt: WATCH watch1 {$$ = $2; delete($1);} | watchstmt ',' watch1 {delete($2);} | WATCH error {myerr("WATCH (expr > expr) flag");} ; watch1: '(' aexpr watchdir aexpr ')' real {watchstmt($1, $3, $5, $6, blocktype); $$=$6;} ; watchdir: GT | LT ; fornetcon: FOR_NETCONS '(' arglist ')' { if (blocktype != NETRECEIVE) { diag("\"FOR_NETCONS\" statement only allowed in NET_RECEIVE block", (char*)0); } if (argcnt_ != nr_argcnt_) { diag("FOR_NETCONS and NET_RECEIVE do not have same number of arguments", (char*)0); } } stmtlist '}' {fornetcon($1, $2, $3, $4, $6, $7); $$ = $7; } | FOR_NETCONS error { myerr("syntax: FOR_NETCONS(args,like,netreceive) { stmtlist}");} ; aexpr: varname | real units | funccall | '(' aexpr ')' {lastok = $3;} | aexpr '+' aexpr | aexpr '-' aexpr | aexpr '*' aexpr | aexpr '/' aexpr | aexpr '^' aexpr /* converted to pow() */ { $$ = insertstr($1, "pow("); replacstr($2, ","); lastok = insertstr(lastok->next, ")"); } | '-' aexpr %prec UNARYMINUS | error {myerr("Illegal expression");} ; sens: SENS senslist /* sensused flag is true */ { sensused = 1; delete($1); } |SENS error {myerr("syntax is SENS var1, var2, var3, etc");} ; senslist: varname /* put in list. Used when enclosing block is massaged */ { sensparm($1); delete($1);} | senslist ',' varname { sensparm($3); deltokens($2, $3);} ; conserve: CONSERVE {extdef2 = 0; } react '=' expr {/* react originally designed for reactions and is unchanged*/ extdef2 = 0; massageconserve($1, $4, lastok);} | CONSERVE error {myerr("Illegal CONSERVE syntax");} ; compart: COMPARTMENT NAME ',' {pushlocal(); SYM($2) = copylocal(SYM($2));} expr '{' namelist '}' {massagecompart($5, $6, $8, SYM($2)); poplocal();} | COMPARTMENT expr '{' namelist '}' {massagecompart($2, $3, $5, SYM0);} ; ldifus: LONGDIFUS NAME ',' {pushlocal(); SYM($2) = copylocal(SYM($2));} expr '{' namelist '}' {massageldifus($5, $6, $8, SYM($2)); poplocal();} | LONGDIFUS expr '{' namelist '}' {massageldifus($2, $3, $5, SYM0);} ; namelist: NAME | namelist NAME ; kineticblk: KINETIC NAME solvefor stmtlist '}' /* put all reactions in a list for processing when relevant SOLVE is processed */ {massagekinetic($1, $2, $4, $5, sensused); lexcontext = 0; sensused = 0; } ; reaction: REACTION react REACT1 {leftreact();} react '(' expr ',' expr ')' {massagereaction($1,$3,$6,$8,$10);} | REACTION react LT LT '(' expr ')' {flux($1, $3, $7);} | REACTION react '-' GT '(' expr ')' {flux($1, $3, $7);} | REACTION error {myerr("Illegal reaction syntax");} ; react: varname {reactname($1, lastok, ITEM0);} |integer varname {reactname($2, lastok, $1);} |react '+' varname {reactname($3, lastok, ITEM0);} |react '+' integer varname {reactname($4, lastok, $3);} ; lagstmt: LAG name BY NAME {lag_stmt($1, blocktype);} | LAG error {myerr("Lag syntax is: LAG name BY const");} ; queuestmt: PUTQ name {queue_stmt($1, $2);} | GETQ name {queue_stmt($1, $2);} ; matchblk: MATCH {checkmatch(blocktype);} '{' matchlist '}' {deltokens($1, $5);} ; matchlist: match | matchlist match ; match: name {matchinitial($1);} | matchname '(' expr ')' '=' expr { matchbound($1, $2, $4, $6, lastok, matchindex); if (matchindex) { poplocal(); matchindex = SYM0; } } | error {myerr("MATCH syntax is state0 or state(expr)=expr or\ state[i](expr(i)) = expr(i)");} ; matchname: name {matchindex = SYM0;} | name '[' NAME ']' { pushlocal(); matchindex = copylocal(SYM($3)); } ; unitblk: UNITS '{' unitbody '}' { deltokens($1,$4);} ; unitbody: /*nothing*/ {modl_units();} | unitbody unitdef | unitbody factordef ; unitdef: unit '=' unit {install_units($1, $3);} | unit error {myerr("Unit definition syntax: (units) = (units)");} ; factordef: NAME '=' real unit { SYM($1)->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %s;\n", SYM($1)->name, STR($3)); Lappendstr(firstlist, buf); } | NAME '=' unit unit {Item *q; double d, unit_mag(); Unit_push($3); Unit_push($4); unit_div(); SYM($1)->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %g;\n", SYM($1)->name, unit_mag()); Lappendstr(firstlist, buf); unit_pop(); } | NAME '=' unit '-' GT unit { double unit_mag(); Unit_push($3); Unit_push($6); unit_div(); SYM($1)->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %g;\n", SYM($1)->name, unit_mag()); Lappendstr(firstlist, buf); unit_pop(); } | error {myerr("Unit factor syntax: examples:\n\ foot2inch = (foot) -> (inch)\n\ F = 96520 (coulomb)\n\ R = (k-mole) (joule/degC)"); } ; constblk: CONSTANT '{' conststmt '}' ; conststmt: /*nothing*/ | conststmt NAME '=' number units { SYM($2)->subtype |= nmodlCONST; Sprintf(buf, "static double %s = %s;\n", SYM($2)->name, STR($4)); Lappendstr(firstlist, buf); } ; tablestmt: TABLE tablst dependlst FROM expr TO expr WITH INTEGER { Item *q; if (table_list) { diag("only one TABLE per function", (char *)0); } table_list = newlist(); Lappendlst(table_list, $2); q = lappendlst(table_list, newlist()); movelist($4->next, $6->prev, LST(q)); q = lappendlst(table_list, newlist()); movelist($6->next, $8->prev, LST(q)); Lappendstr(table_list, STR($9)); Lappendlst(table_list, $3); deltokens($1, $9); } | TABLE error { myerr("syntax: TABLE [list] [DEPEND list] FROM expr TO expr WITH integer");} ; tablst: /*Nothing*/ {$$ = LIST0;} | tablst1 ; tablst1: Name {$$ = newlist(); Lappendsym($$, SYM($1));} | tablst1 ',' Name { Lappendsym($1, SYM($3));} ; dependlst: /*NOTHING*/ {$$ = LIST0;} | DEPEND tablst1 {$$ = $2;} ; neuronblk: NEURON '{' nrnstmt '}' { deltokens($1,$4);} ; nrnstmt: /*nothing*/ | nrnstmt SUFFIX NAME { nrn_list($2, $3);} | nrnstmt nrnuse | nrnstmt NONSPECIFIC nrnlist { nrn_list($2,$3);} | nrnstmt ELECTRODE_CURRENT nrnlist { nrn_list($2,$3);} | nrnstmt SECTION nrnlist { nrn_list($2, $3);} | nrnstmt RANGE nrnlist { nrn_list($2, $3);} | nrnstmt GLOBAL nrnlist { nrn_list($2, $3);} | nrnstmt POINTER nrnlist { nrn_list($2, $3);} | nrnstmt BBCOREPOINTER nrnlist { nrn_list($2, $3);} | nrnstmt EXTERNAL nrnlist { nrn_list($2, $3);} | nrnstmt THREADSAFE optnrnlist { threadsafe_seen($2, $3); } ; nrnuse: USEION NAME READ nrnlist valence {nrn_use($2, $4, ITEM0, $5);} |USEION NAME WRITE nrnlist valence {nrn_use($2, ITEM0, $4, $5);} |USEION NAME READ nrnlist WRITE nrnlist valence {nrn_use($2, $4, $6, $7);} |USEION error {myerr("syntax is: USEION ion READ list WRITE list");} ; nrnlist: NAME | nrnlist ',' NAME { delete($2); $$ = $3;} | error {myerr("syntax is: keyword name , name, ..., name");} ; optnrnlist: /*nothing*/ {$$ = NULL;} | nrnlist ; valence: /*nothing*/ {$$ = ITEM0;} | VALENCE real {$$ = $2;} | VALENCE '-' real /* replace the string with -string and discard '-'*/ { Sprintf(buf, "-%s", STR($3)); STR($3) = stralloc(buf, STR($3)); $$ = $3; delete($2); lastok = $3; } ; %% void yyerror(s) /* called for yacc syntax error */ char *s; { Fprintf(stderr, "%s:\n ", s); } #if !NMODL void nrn_list(q1, q2) Item *q1, *q2; { /*ARGSUSED*/ } void nrn_use(q1, q2, q3, q4) Item *q1, *q2, *q3, *q4; { /*ARGSUSED*/ } #endif neuron-7.5/src/nmodl/partial.c000077500000000000000000000166251323325274500164160ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/partial.c,v 4.1 1997/08/30 20:45:33 hines Exp */ /* partial.c,v * Revision 4.1 1997/08/30 20:45:33 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:24:00 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:06:28 hines * proper nocmodl version number * * Revision 1.1.1.1 1994/10/12 17:21:37 hines * NEURON 3.0 distribution * * Revision 9.76 90/12/07 09:27:23 hines * new list structure that uses unions instead of void *element * * Revision 9.67 90/11/27 12:10:07 hines * bug in bnd introduced by change to partial * * Revision 9.66 90/11/27 10:47:26 hines * allow multiple partial equations within a partial block * * Revision 9.58 90/11/20 17:24:15 hines * CONSTANT changed to PARAMETER * CONSTANT now refers to variables that don't get put in .var file * * Revision 9.20 90/08/15 15:16:16 hines * need to pass error value from crank back through the * block called by SOLVE. * * Revision 8.1 90/01/16 11:06:14 mlh * error checking and cleanup after error and call to abort_run() * * Revision 8.0 89/09/22 17:26:54 nfh * Freezing * * Revision 7.0 89/08/30 13:32:29 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.0 89/08/14 16:27:10 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.1 89/07/27 13:27:30 mlh * crank calling sequence sends indepsym as a sentinal value * ugh! * * Revision 4.0 89/07/24 17:03:40 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.3 89/07/18 11:55:16 mlh * first_time removed and MODEL_LEVEL used for declaration precedence * * Revision 1.4 89/07/18 11:22:16 mlh * eliminate first_time, etc. * * Revision 1.3 89/07/11 16:51:58 mlh * remove p array from calling sequence of crank * * Revision 1.2 89/07/07 08:55:01 mlh * START field in INDEPENDENT block * SWEEP keyword replaces SCOP in INDEPENDENT block * FIRST and LAST keywords in PARTIAL block for boundaries rplace index * y'0 etc. allowed for constants * * Revision 1.1 89/07/06 14:50:25 mlh * Initial revision * */ #include "modl.h" #include "parse1.h" #include "symbol.h" extern Symbol *indepsym; /* for partial block communication with solve */ static Symbol *pv[4]; /* DV, F, V, G */ static Item *partialcolon; static List *parinfo; /* DV, F, V, G, ~ with ident */ void solv_partial(qsol, fun) Item *qsol; Symbol *fun; { int i, ident; Item *q; Symbol *dspace; if ((dspace = lookup("delta_x")) == SYM0) { dspace = install("delta_x", NAME); parminstall(dspace, "1", ""); } Sprintf(buf, "%s();\n", fun->name); replacstr(qsol, buf); save_dt(partialcolon); ITERATE(q, parinfo) { for (i=0; i<4; i++) { pv[i] = SYM(q); q = q->next; } partialcolon = ITM(q); ident = q->itemtype; Sprintf(buf, "if (error=crank(%d, %s, %s, %s, delta_%s, %s, %s, _pbound%d, &_parwork%d))return error;\n", pv[2]->araydim, pv[2]->name, pv[1]->name, pv[3]->name, indepsym->name, dspace->name, indepsym->name, ident, ident); replacstr(partialcolon, buf); Sprintf(buf, "static double *_pbound%d[4], _bnd%d_0, _bnd%d_N, *_parwork%d;\n", ident, ident, ident, ident); Linsertstr(procfunc, buf); } } void partial_eqn(q2, q4, q8, q11) /*V' F V G*/ Item *q2, *q4, *q8, *q11; { int i, dim; Item *q; static int ident=1; if (!parinfo) { parinfo = newlist(); } pv[0] = SYM(q2); pv[1] = SYM(q4); pv[2] = SYM(q8); pv[3] = SYM(q11); ITERATE(q, parinfo) { if (SYM(q) == SYM(q2)) { diag("Two partial equations for same state: ", SYM(q8)->name); } q = q->next->next->next->next; } Lappendsym(parinfo, SYM(q2)); Lappendsym(parinfo, SYM(q4)); Lappendsym(parinfo, SYM(q8)); Lappendsym(parinfo, SYM(q11)); q = lappendsym(parinfo, SYM0); ITM(q) = q2->prev; q->itemtype = ident++; dim = pv[2]->araydim; if (!(pv[2]->subtype & STAT)){ diag(pv[2]->name, " is not a STATE"); } if (strcmp(pv[2]->name, pv[0]->name + 1)) { diag(pv[2]->name, "' must be the time derivative"); } for (i=0; i<4; i++) { if (!(pv[i]->subtype & ARRAY) || (pv[i]->araydim != dim)) { diag(pv[i]->name, " dimension differs from STATE var"); } } replacstr(q2->prev, "\n/*where partial call goes*/\n"); partialcolon = q2->prev; deltokens(q2, q11); } static List *bndinfo; /* symbol, expression list with itemtype 0-3 */ static List *bnd[4]; /* for each condition consisting of symbol, list of tokens for expression in the order DEL y[0] DEL y[N] y[0] y[N]*/ void massagepartial(q1, q2, q3, q6) /*PARTIAL NAME stmtlist '}'*/ Item *q1, *q2, *q3, *q6; { int i, ident; Item *q, *qb; Symbol *s; static int seepartial = 0; if (seepartial++) { diag("Only one partial block currently allowed", (char *)0); } if (!pv[0]) { diag( "within the PARTIAL block must occur at least one equation with the syntax ---\n", "~ V' = F*DEL2(V) + G\n"); } if (!bndinfo) { bndinfo = newlist(); } ITERATE(q, parinfo) { for (i=0; i<4; i++) { pv[i] = SYM(q); q = q->next; bnd[i] = (List *)0; } partialcolon = ITM(q); ident = q->itemtype; /*look through bndinfo list to reconstruct bnd*/ ITERATE(qb, bndinfo) { s = SYM(qb); qb = qb->next; if (s == pv[2]) { if (bnd[qb->itemtype]) { diag("Duplicate boundary condition for ", s->name); } bnd[qb->itemtype] = LST(qb); qb->itemtype = -1; /* mark used */ } } /* ensure that there is one condition on each side */ for (i=0; i<2; i++) { if (bnd[i]) { /* Neumann */ if (bnd[i+2]) { /* and also dirichlet */ diag("Neumann and Dirichlet conditions", " specified on same side"); } } else { /* Neumann not specified */ if (!bnd[i+2]) { /* neither is dirichlet */ /* then default Neumann = 0 */ bnd[i] = newlist(); Lappendstr(bnd[i], "0"); } } } /* place the boundary conditions before the call to crank */ /* and set up the pointers */ for (i=0; i<4; i++) { if (bnd[i]) { if (i%2) { Sprintf(buf, "_bnd%d_N = ", ident); Insertstr(partialcolon, buf); Sprintf(buf, "_pbound%d[%d] = &_bnd%d_N;\n", ident, i, ident); }else{ Sprintf(buf, "_bnd%d_0 = ", ident); Insertstr(partialcolon, buf); Sprintf(buf, "_pbound%d[%d] = &_bnd%d_0;\n", ident, i, ident); } Lappendstr(initlist, buf); move(bnd[i]->next, bnd[i]->prev, partialcolon); Insertstr(partialcolon, ";\n"); } } } /* check that all boundary conditions have been used */ ITERATE(qb, bndinfo) { s = SYM(qb); qb = qb->next; if (qb->itemtype != -1) { diag("Boundary condition: No partial equation for ", s->name); } } replacstr(q1, "int"); Insertstr(q3, "()\n"); SYM(q2)->subtype |= PARF; SYM(q2)->u.i = 0; /* not used: but see listnum in solvhandler */ Insertstr(q6, "return 0;\n"); movelist(q1, q6, procfunc); } /* ~ optionalDEL var[index] = expr */ /* type 0 Dirichlet (no DEL), type 1 Neumann (with DEL) */ void partial_bndry(type, qvar, qfirstlast, qexpr, qlast) int type; Item *qvar, *qfirstlast, *qexpr, *qlast; { int indx; Item *q; List *l; if (!bndinfo) { bndinfo = newlist(); } if (SYM(qfirstlast)->type == FIRST) { indx = type; }else{ indx = type + 1; } Lappendsym(bndinfo, SYM(qvar)); q = lappendsym(bndinfo, SYM0); q->itemtype = indx; l = newlist(); LST(q) = l; if (indx < 2) { /* ~ DEL y [N] = */ deltokens(qvar->prev->prev, qexpr->prev); }else{ /* ~ ... = */ deltokens(qvar->prev, qexpr->prev); } movelist(qexpr, qlast, l); } neuron-7.5/src/nmodl/sens.c000077500000000000000000000270211323325274500157220ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/sens.c,v 4.2 1997/11/28 15:11:43 hines Exp */ /* sens.c,v * Revision 4.2 1997/11/28 15:11:43 hines * absolute tolerance for CVODE on a per state basis. * Interface is a spec of absolute tolerance within a .mod file for the * declaration of a STATE as in * state (units) * Within nrniv, one specifies tolerance via * tol = cvode.abstol(&var, tolerance) where var is any variable whose address * can be taken (although only STATEs make use of a tolerance). * The address aspect of the above is misleading since tolerances are the * same for any single name, eg cvode.abstol(&v(.5)) changes tolerances for * ALL membrane potentials globally. The only purpose of the address is * to unambiguously identify the Symbol for the name. Perhaps string spec * such as "TrigKSyn.G" will be incorporated in the future. * when an absolute tolerance is changed, cvode will re-initialize the * tolerances next time Cvode.re_init is called. The tolerance actually * used for a STATE is the minimum between the value specified in the second * arg of cvode.accuracy and the tolerance stored in the Symbol. * * Revision 4.1 1997/08/30 20:45:34 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:24:01 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:06:28 hines * proper nocmodl version number * * Revision 1.2 1995/09/05 17:57:58 hines * allow domain limit in parameter spec. the syntax is of the form * name '=' number units '[' number ',' number ']' * The brackets may be changed to <...> if the syntax for arrays is ambiguous * * Revision 1.1.1.1 1994/10/12 17:21:37 hines * NEURON 3.0 distribution * * Revision 9.76 90/12/07 09:27:25 hines * new list structure that uses unions instead of void *element * * Revision 9.58 90/11/20 17:24:17 hines * CONSTANT changed to PARAMETER * CONSTANT now refers to variables that don't get put in .var file * * Revision 9.45 90/10/30 13:56:56 hines * derivative blocks (this impacts kinetic and sens as well) now return * _reset which can be set with RESET statement. _reset is static in the * file and set to 0 on entry to a derivative or kinetic block. * * Revision 9.32 90/10/08 14:12:55 hines * index vector instead of pointer vector for slist and dlist * * Revision 8.2 90/02/07 10:23:23 mlh * It is important that blocks for derivative and sensitivity also * be declared static before their possible use as arguments to other * functions and that their body also be static to avoid multiple * declaration errors. * * Revision 8.1 90/01/16 11:06:16 mlh * error checking and cleanup after error and call to abort_run() * * Revision 8.0 89/09/22 17:26:57 nfh * Freezing * * Revision 7.0 89/08/30 13:32:33 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.0 89/08/14 16:27:13 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.1 89/08/07 15:35:26 mlh * freelist now takes pointer to list pointer and 0's the list pointer. * Not doing this is a bug for multiple sens blocks, etc. * * Revision 4.0 89/07/24 17:03:43 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.2 89/07/18 11:55:19 mlh * first_time removed and MODEL_LEVEL used for declaration precedence * * Revision 1.2 89/07/18 11:22:19 mlh * eliminate first_time, etc. * * Revision 1.1 89/07/06 14:50:34 mlh * Initial revision * */ #include "modl.h" #include "parse1.h" static List *sensinfo; /* list of pairs: first is the block symbol where the SENS statement appeared. The second is a list of statements which goes after the SOLVE statement. Used for NONLINEAR blocks. So far sensmassage gets control when massageblock is almost finished */ static List *statelist; static List *parmlist; extern Symbol *indepsym; int sens_parm = 0; void sensparm(qparm) Item *qparm; { if (!parmlist) parmlist = newlist(); Lappendsym(parmlist, SYM(qparm)); sens_parm++; } void add_sens_statelist(s) Symbol *s; { if (!statelist) statelist = newlist(); Lappendsym(statelist, s); } void sensmassage(type, qfun, fn) int type, fn; Item *qfun; { /*qfun is the list symbol for the name of the derivative block. It has a count of the number of state variables used. A copy of this symbol is made but with the name S_name and qfun is made to point to the new symbol The old function name is then the name of a new created function which contains the calls to trajecsens followed by a call to S_name to compute the Note that trajecsens itself contains calls to S_name. qfun->sym->used is then multiplied by the (1 + #sens parms used) so that the solve code doesn't need to be changed. The slist needs to be augmented and that is done here also. However since it is declared in solve.c it is necessary to access the number of parameters being used. */ /* extending to nonlinear blocks. Differences: Number of states remains the same. Statements built here but saved for output when SOLVE is translated. No derivative variables constructed. However, the full dlist is constructed since we need the last part for use by EM variables This has gotten much more difficult to understand since the nonlinear method is merged into the code to take advantage of common code. It would be conceptually simpler to merely repeat the whole process in a separate file*/ /* extending to linear blocks. Same as nonlinear except that there is a linearsens call and we must be sure to keep proper state order */ int nstate, i, j, newjac; char sname[256], dname[256]; Item *q, *q1; List *senstmt; /* nonlinear sens statements (saved in sensinfo) */ Symbol *oldfun, *newfun, *s; oldfun = SYM(qfun); Sprintf(buf, "S_%s", oldfun->name); if (lookup(buf)) { diag(buf, " is user defined and cant be used for SENS"); } /*this is a time bomb*/ newfun = install(buf, oldfun->type); newfun->subtype = oldfun->subtype; newfun->u.i = oldfun->u.i; /*the listnum*/ newfun->used = oldfun->used; /*number of states*/ nstate = oldfun->used; if (type == DERIVATIVE) { oldfun->used *= (1 + sens_parm); } /* even derivatives need sensinfo since envelope statements go after the SOLVE for statement */ if (!sensinfo) { sensinfo = newlist(); } Lappendsym(sensinfo, oldfun); /* newton will call oldfun which will merely call newfun */ q = lappendsym(sensinfo, SYM0); /* the second element is a list of statements to be constructed below */ senstmt = newlist(); LST(q) = senstmt; SYM(qfun) = newfun; /* the derivative equations alone are now called newfun->name; oldfun will contain the trajecsens calls */ /* build the oldfun function */ /* In the nonlinear case all statements except call to newfun get sent to senstmt */ /* in the derivative case envelope statements get sent to senstmt */ Sprintf(buf, "\nstatic int %s() {\n", oldfun->name); Lappendstr(procfunc, buf); Sprintf(buf, "\nstatic int %s();\n", newfun->name); Linsertstr(procfunc, buf); newjac = 1; i=1; ITERATE(q, parmlist) { if (type == DERIVATIVE) { Sprintf(buf, "error=trajecsens(%d, _slist%d, _dlist%d,\ _p, &%s, %s, %s, %d, _slist%d+%d, _dlist%d+%d);\n if(error){abort_run(error);}\n", nstate, fn, fn, SYM(q)->name, newfun->name, indepsym->name, newjac, fn, nstate*i, fn, nstate*i); Lappendstr(procfunc, buf); }else if (type == NONLINEAR) { Sprintf(buf, "error=steadysens(%d, _slist%d, _p, &%s, %s,\ _dlist%d, %d, _slist%d+%d);\n if(error){abort_run(error);}\n", nstate, fn, SYM(q)->name, newfun->name, fn, newjac, fn, nstate*i); Lappendstr(senstmt, buf); }else if (type == LINEAR) { Sprintf(buf, "error=linearsens(%d, _slist%d, _p, &%s, %s,\ _coef%d, %d, _slist%d+%d);\n if(error){abort_run(error);}\n", nstate, fn, SYM(q)->name, newfun->name, fn, newjac, fn, nstate*i); Lappendstr(senstmt, buf); } newjac = 0; /* define S_state_parm and DS_state_parm */ ITERATE(q1, statelist) { j = SYM(q1)->varnum; Sprintf(sname, "S_%s_%s", SYM(q1)->name, SYM(q)->name); Sprintf(dname, "D%s", sname); if ((s = lookup(sname)) == SYM0) { s = install(sname, NAME); } if (SYM(q1)->subtype & ARRAY) { depinstall(1, s, SYM(q1)->araydim, "0", "1", "", ITEM0, 0, ""); }else{ depinstall(1, s, 0, "0", "1", "", ITEM0, 0, ""); } s->usage |= DEP; if (type == DERIVATIVE) { s = lookup(dname); assert (s); s->usage |= DEP; /* initialize augmented _slist and _dlist */ if (SYM(q1)->subtype & ARRAY) { Sprintf(buf, "for (_i=0;_i<%d;_i++){\ _slist%d[%d+_i] = (%s + _i) - _p; _dlist%d[%d+_i] = (%s + _i) - _p;}\n", SYM(q1)->araydim, fn, j + nstate*i, sname, fn, j + nstate*i, dname); }else{ Sprintf(buf, "_slist%d[%d] = &(%s) - _p; _dlist%d[%d] = &(%s) - _p;\n", fn, j + nstate*i, sname, fn, j + nstate*i, dname); } }else if (type == NONLINEAR || type == LINEAR) { if (SYM(q1)->subtype & ARRAY) { Sprintf(buf, "for (_i=0;_i<%d;_i++){\ _slist%d[%d+_i] = (%s + _i) - _p;}\n", SYM(q1)->araydim, fn, j + nstate*i, sname); }else{ Sprintf(buf, "_slist%d[%d] = &(%s) - _p;\n", fn, j + nstate*i, sname); } } Lappendstr(initlist, buf); } i++; } /* addition of envelope calls by modifying copy of above code create EP_state_parm, EM_state_parm using a new eplist and emlist respectively. Also create U_parm with default value of .05 if it doesn't already exist as a constant. */ Sprintf(buf, "static int _eplist%d[%d], _emlist%d[%d];\n", fn, nstate*sens_parm, fn, nstate*sens_parm); Linsertstr(procfunc, buf); i = 0; ITERATE(q, parmlist) { Sprintf(buf, "envelope(_p, _slist%d, %d, %s, U_%s,\ _slist%d+%d, _eplist%d + %d, _emlist%d + %d);\n", fn, nstate, SYM(q)->name, SYM(q)->name, fn, nstate*(1 + i), fn, nstate*i, fn, nstate*i); Lappendstr(senstmt, buf); /* define the uncertainty variables */ Sprintf(buf, "U_%s", SYM(q)->name); IGNORE(ifnew_parminstall(buf, "0.05", "", "")); /* define EP_state_parm and EM_state_parm */ ITERATE(q1, statelist) { j = SYM(q1)->varnum; Sprintf(sname, "EP_%s_%s", SYM(q1)->name, SYM(q)->name); Sprintf(dname, "EM_%s_%s", SYM(q1)->name, SYM(q)->name); if ((s = lookup(sname)) == SYM0) { s = install(sname, NAME); } if (SYM(q1)->subtype & ARRAY) { depinstall(0, s, SYM(q1)->araydim, "0", "1", "", ITEM0, 0, ""); }else{ depinstall(0, s, 0, "0", "1", "", ITEM0, 0, ""); } s->usage |= DEP; if ((s = lookup(dname)) == SYM0) { s = install(dname, NAME); } if (SYM(q1)->subtype & ARRAY) { depinstall(0, s, SYM(q1)->araydim, "0", "1", "", ITEM0, 0, ""); }else{ depinstall(0, s, 0, "0", "1", "", ITEM0, 0, ""); } s->usage |= DEP; /* initialize augmented _slist and _dlist */ if (SYM(q1)->subtype & ARRAY) { Sprintf(buf, "for (_i=0;_i<%d;_i++){\ _eplist%d[%d+_i] = (%s + _i) - _p; _emlist%d[%d+_i] = (%s + _i) - _p;}\n", SYM(q1)->araydim, fn, j + nstate*i, sname, fn, j + nstate*i, dname); }else{ Sprintf(buf, "_eplist%d[%d] = &(%s) - _p; _emlist%d[%d] = &(%s) - _p;\n", fn, j + nstate*i, sname, fn, j + nstate*i, dname); } Lappendstr(initlist, buf); } i++; } if (type == DERIVATIVE) { Sprintf(buf, "return %s();\n}\n", newfun->name); }else{ Sprintf(buf, "%s();\n}\n", newfun->name); } Lappendstr(procfunc, buf); freelist(&parmlist); freelist(&statelist); sens_parm = 0; } void sens_nonlin_out(q, fun) Item *q; Symbol *fun; { /* find fun in the sensinfo list and insert its statements before q */ Item *q1, *q2, *q3; if (!sensinfo) return; ITERATE(q1, sensinfo) { q2 = q1->next; if (SYM(q1) == fun) { ITERATE(q3, LST(q2)) { Insertstr(q, STR(q3)); } } q1 = q2; } } neuron-7.5/src/nmodl/simultan.c000077500000000000000000000244561323325274500166170ustar00rootroot00000000000000#include <../../nmodlconf.h> #include "modl.h" #include "parse1.h" #include "symbol.h" extern int sens_parm; extern int numlist; static List *eqnq; static int nonlin_common(); void solv_nonlin(qsol, fun, method, numeqn, listnum) Item *qsol; Symbol *fun, *method; int numeqn, listnum; { Sprintf(buf, "%s(%d,_slist%d, _p, %s, _dlist%d);\n", method->name, numeqn, listnum, fun->name, listnum); replacstr(qsol, buf); /* if sens statement appeared in fun then the steadysens call list, built during the massagenonlin phase gets added after the call to newton */ sens_nonlin_out(qsol->next, fun); } void solv_lineq(qsol, fun, method, numeqn, listnum) Item *qsol; Symbol *fun, *method; int numeqn, listnum; { Sprintf(buf, " 0; %s();\n error = %s(%d, _coef%d, _p, _slist%d);\n", fun->name, method->name, numeqn, listnum, listnum); replacstr(qsol, buf); sens_nonlin_out(qsol->next, fun); } void eqnqueue(q1) Item *q1; { Item *lq; if (!eqnq) { eqnq = newlist(); } lq = lappendsym(eqnq, SYM0); ITM(lq) = q1; return; } static void freeqnqueue() { freelist(&eqnq); } /* args are --- nonlinblk: NONLINEAR NAME stmtlist '}' */ void massagenonlin(q1, q2, q3, q4, sensused) Item *q1, *q2, *q3, *q4; int sensused; { /* declare a special _counte variable to number the equations. before each equation we increment it by 1 during run time. This gives us a current equation number */ Symbol *nonfun; /* all this junk is still in the intoken list */ Sprintf(buf, "static void %s();\n", SYM(q2)->name); Linsertstr(procfunc, buf); replacstr(q1, "\nstatic void"); Insertstr(q3, "()\n"); Insertstr(q3->next, " int _counte = -1;\n"); nonfun = SYM(q2); if ((nonfun->subtype) & NLINF && nonfun->u.i) { diag("NONLINEAR merging not implemented", (char *)0); } numlist++; nonfun->subtype |= NLINF; nonfun->u.i = numlist; nonfun->used = nonlin_common(q4, sensused); movelist(q1, q4, procfunc); if (sensused) { sensmassage(NONLINEAR, q2, numlist); } } static int nonlin_common(q4, sensused) /* used by massagenonlin() and mixed_eqns() */ Item *q4; int sensused; { Item *lq, *qs, *q; int i, counts = 0, counte = 0, using_array; Symbol *s; using_array=0; SYMITER_STAT { if (s->used) { s->varnum = counts; #if CVODE slist_data(s, counts, numlist); #endif if (s->subtype & ARRAY) {int dim = s->araydim; using_array=1; Sprintf(buf, "for(_i=0;_i<%d;_i++){_slist%d[%d+_i] = (%s + _i) - _p;}\n" ,dim, numlist , counts, s->name); counts += dim; }else{ Sprintf(buf, "_slist%d[%d] = &(%s) - _p;\n", numlist, counts, s->name); counts++; } Lappendstr(initlist, buf); s->used = 0; if (sensused) { add_sens_statelist(s); } } } ITERATE(lq, eqnq) { char *eqtype = SYM(ITM(lq))->name; if (strcmp(eqtype, "~+") == 0) { /* add equation to previous */ if (counte == -1) { diag("no previous equation for adding terms", (char *)0); } Sprintf(buf, "_dlist%d[_counte] +=", numlist); } else if (eqtype[0] == 'D') { /* derivative equations using implicit method */ int count_deriv = SYM(ITM(lq))->araydim; Sprintf(buf, "_dlist%d[++_counte] =", numlist); counte += count_deriv; }else{ Sprintf(buf, "_dlist%d[++_counte] =", numlist); counte++; } replacstr(ITM(lq), buf); } if (!using_array) { if(counte != counts) { Sprintf(buf ,"Number of equations, %d, does not equal number, %d", counte, counts); diag(buf, " of states used"); } } else { #if 1 /* can give message when running */ Sprintf(buf, "if(_counte != %d) printf( \"Number of equations, %%d,\ does not equal number of states, %d\", _counte + 1);\n", counts-1, counts); Insertstr(q4, buf); #endif } if (counte == 0) { diag("NONLINEAR contains no equations", (char *)0); } freeqnqueue(); Sprintf(buf, "static int _slist%d[%d]; static double _dlist%d[%d];\n", numlist, counts*(1 + sens_parm), numlist, counts); q = linsertstr(procfunc, buf); Sprintf(buf, "static int _slist%d[%d];\n", numlist, counts*(1 + sens_parm)); vectorize_substitute(q, buf); return counts; } Item *mixed_eqns(q2, q3, q4) /* name, '{', '}' */ Item *q2, *q3, *q4; { int counts; Item *qret; Item* q; if (!eqnq) { return ITEM0; /* no nonlinear algebraic equations */ } /* makes use of old massagenonlin split into the guts and the header stuff */ numlist++; counts = nonlin_common(q4, 0); Insertstr(q4, "}"); q = insertstr(q3, "{ static int _recurse = 0;\n int _counte = -1;\n"); sprintf(buf, "{ double* _savstate%d = _thread[_dith%d]._pval;\n\ double* _dlist%d = _thread[_dith%d]._pval + %d;\n int _counte = -1;\n", numlist-1, numlist-1, numlist, numlist-1, counts); vectorize_substitute(q, buf); Insertstr(q3, "if (!_recurse) {\n _recurse = 1;\n"); Sprintf(buf, "error = newton(%d,_slist%d, _p, %s, _dlist%d);\n", counts, numlist, SYM(q2)->name, numlist); qret = insertstr(q3, buf); Sprintf(buf, "error = nrn_newton_thread(_newtonspace%d, %d,_slist%d, _p, %s, _dlist%d, _ppvar, _thread, _nt);\n", numlist-1, counts, numlist, SYM(q2)->name, numlist); vectorize_substitute(qret, buf); Insertstr(q3, "_recurse = 0; if(error) {abort_run(error);}}\n"); return qret; } /* linear simultaneous equations */ /* declare a _counte variable to dynamically contain the current equation number. This is necessary to allow use of state vectors. It is no longer necessary to count equations here but we do it anyway in case of future move to named equations. It is this change which requires a varnum field in Symbols for states since the arraydim field cannot be messed with anymore. */ static int nlineq = -1; /* actually the current index of the equation */ /* is only good if there are no arrays */ static int using_array; /* 1 if vector state in equations */ static int nstate = 0; static Symbol *linblk; static Symbol *statsym; void init_linblk(q) /* NAME */ Item *q; { using_array = 0; nlineq = -1; nstate = 0; linblk = SYM(q); numlist++; } void init_lineq(q1) /* the colon */ Item *q1; { if (strcmp(SYM(q1)->name, "~+") == 0) { replacstr(q1, ""); }else { nlineq++; /* current index will start at 0 */ replacstr(q1, " ++_counte;\n"); } } static char *indexstr; /* set in lin_state_term, used in linterm */ void lin_state_term(q1, q2) /* term last*/ Item *q1, *q2; { char *qconcat(); /* but puts extra ) at end */ statsym = SYM(q1); replacstr(q1, "1.0"); if (statsym->subtype & ARRAY) { indexstr = qconcat(q1->next->next, q2->prev); deltokens(q1->next, q2->prev); /*can't erase lastok*/ replacstr(q2, ""); } if (statsym->used == 1) { statsym->varnum = nstate; if (statsym->subtype & ARRAY) {int dim = statsym->araydim; using_array=1; Sprintf(buf, "for(_i=0;_i<%d;_i++){_slist%d[%d+_i] = (%s + _i) - _p;}\n" ,dim, numlist , nstate, statsym->name); nstate += dim; }else{ Sprintf(buf, "_slist%d[%d] = &(%s) - _p;\n", numlist, nstate, statsym->name); nstate++; } Lappendstr(initlist, buf); } } void linterm(q1, q2, pstate, sign) /*primary, last ,, */ Item *q1, *q2; int pstate, sign; { char *signstr; if (pstate == 0) { sign *= -1; } if (sign == -1) { signstr = " -= "; } else { signstr = " += "; } if (pstate == 1) { if (statsym->subtype & ARRAY) { Sprintf(buf, "_coef%d[_counte][%d + %s]%s", numlist, statsym->varnum, indexstr, signstr); } else { Sprintf(buf, "_coef%d[_counte][%d]%s", numlist, statsym->varnum, signstr); } Insertstr(q1, buf); } else if (pstate == 0) { Sprintf(buf, "_RHS%d(_counte)%s", numlist, signstr); Insertstr(q1, buf); }else{ diag("more than one state in preceding term", (char *)0); } Insertstr(q2->next, ";\n"); } void massage_linblk(q1, q2, q3, q4, sensused) /* LINEAR NAME stmtlist '}' */ Item *q1, *q2, *q3, *q4; int sensused; { Item *qs; Symbol *s; int i; #if LINT assert(q2); #endif if (++nlineq == 0) { diag(linblk->name, " has no equations"); } Sprintf(buf, "static void %s();\n", SYM(q2)->name); Linsertstr(procfunc, buf); replacstr(q1, "\nstatic void"); Insertstr(q3, "()\n"); Insertstr(q3->next, " int _counte = -1;\n"); linblk->subtype |= LINF; linblk->u.i = numlist; SYMITER(NAME){ if ((s->subtype &STAT) && s->used) { if (sensused) { add_sens_statelist(s); } s->used = 0; } } if (!using_array) { if (nlineq != nstate) { Sprintf(buf,"Number states, %d, unequal to equations, %d in ", nstate, nlineq); diag(buf, linblk->name); } } else { #if 1 /* can give message when running */ Sprintf(buf, "if(_counte != %d) printf( \"Number of equations, %%d,\ does not equal number of states, %d\", _counte + 1);\n", nstate-1, nstate); Insertstr(q4, buf); #endif } linblk->used = nstate; Sprintf(buf, "static int _slist%d[%d];static double **_coef%d;\n", numlist, nstate*(1 + sens_parm), numlist); Linsertstr(procfunc, buf); Sprintf(buf, "\n#define _RHS%d(arg) _coef%d[arg][%d]\n", numlist, numlist, nstate); Linsertstr(procfunc, buf); Sprintf(buf, "if (_first) _coef%d = makematrix(%d, %d);\n", numlist, nstate, nstate+1); Lappendstr(initlist, buf); Sprintf(buf, "zero_matrix(_coef%d, %d, %d);\n{\n", numlist, nstate, nstate+1); Insertstr(q3->next, buf); Insertstr(q4, "\n}\n"); movelist(q1, q4, procfunc); if (sensused) { sensmassage(LINEAR, q2, numlist); } nstate = 0; nlineq = 0; } /* It is sometimes convenient to not use some states in solving equations. We use the SOLVEFOR statement to list the states in LINEAR, NONLINEAR, and KINETIC blocks that are to be treated as states in fact. States not listed are treated in that block as assigned variables. If the SOLVEFOR statement is absent all states are assumed to be in the list. Syntax is: blocktype blockname [SOLVEFOR name, name, ...] { statement } The implementation uses the varname: production that marks the state->used record. The old if statement was if (inequation && (SYM($1)->subtype & STAT)) { then mark states} now we add && in_solvefor() to indicate that it Really should be marked. The hope is that no further change to diagnostics for LINEAR or NONLINEAR will be required. Some more work on KINETIC is required since the checking on whether a name is a STAT is done much later. The solveforlist is freed at the end of each block. */ List *solveforlist = (List *)0; int in_solvefor(s) Symbol *s; { Item *q; if (!solveforlist) { return 1; } ITERATE(q, solveforlist) { if (s == SYM(q)) { return 1; } } return 0; } neuron-7.5/src/nmodl/solve.c000077500000000000000000000357331323325274500161130ustar00rootroot00000000000000#include <../../nmodlconf.h> /* /local/src/master/nrn/src/nmodl/solve.c,v 4.4 1998/08/20 21:07:34 hines Exp */ #include "modl.h" #include "parse1.h" #include "symbol.h" /* make it an error if 2 solve statements are called on a single call to model() */ extern List *indeplist; Symbol *deltaindep = SYM0; extern Symbol *indepsym; extern char* current_line(); extern List *massage_list_; #if NMODL extern List *nrnstate; #if VECTORIZE extern int vectorize; extern char* cray_pragma(); extern int netrec_state_count; extern int netrec_need_thread; #endif #endif #if CVODE Item* cvode_cnexp_solve; Symbol* cvode_nrn_cur_solve_; Symbol* cvode_nrn_current_solve_; #endif static void whileloop(); static void check_ss_consist(); /* Need list of solve statements. We impress the general list structure to handle it. The element is a pointer to an item which is the first item in the statement sequence in another list. */ static List *solvq; /* list of the solve statement locations */ int numlist = 0; /* number of slist's */ void solvequeue(q1, q2, blocktype, qerr) /*solve NAME=q1 [using METHOD=q2]*/ /* q2 = 0 means method wasn't there */ /* qerr in ITEM0 or else the closing brace of an IFERROR stmt */ Item *q1, *q2, *qerr; int blocktype; { /* the solvq list is organized in groups of an item element followed by the method symbol( null if default to be used) */ /* The itemtype field of the first is used to carry the blocktype*/ /* SOLVE and METHOD method are deleted */ /* The list now consists of triples in which the third element is a list containing the complete IFERROR statement. */ Item *lq, *qtemp; List *errstmt; if (!solvq) { solvq = newlist(); } #if NMODL /* if the blocktype is equation then move the solve statement to the nrnstate function. Everything else stays in the model function to be used as the nrncurrent function */ if (blocktype == BREAKPOINT) { if (!nrnstate) { nrnstate = newlist(); } Lappendstr(nrnstate, "{"); if (qerr) { movelist(q1->prev, qerr, nrnstate); }else if (q2) { movelist(q1->prev, q2, nrnstate); }else{ movelist(q1->prev, q1, nrnstate); } Lappendstr(nrnstate, "}"); } /* verify that the block defintion for this SOLVE has not yet been seen */ if (massage_list_) ITERATE(lq, massage_list_) { if (strcmp(SYM(lq)->name, SYM(q1)->name) == 0) { diag("The SOLVE statement must be before the DERIVATIVE block for ", SYM(lq)->name); } } #endif lq = lappendsym(solvq, SYM0); ITM(lq) = q1; lq->itemtype = blocktype; /* handle STEADYSTATE option */ if (q1->next->itemtype == SYMBOL && strcmp("STEADYSTATE", SYM(q1->next)->name) == 0) { lq->itemtype = -blocktype; /* gets put back below */ } if (q2) { qtemp = q2->next; /* The IFERROR location */ Lappendsym(solvq, SYM(q2)); if (strcmp(SYM(q2)->name, "derivimplicit") == 0) { add_deriv_imp_list(SYM(q1)->name); } if (strcmp(SYM(q2)->name, "cnexp") == 0) { SYM(q2)->name = stralloc("derivimplicit", SYM(q2)->name); add_deriv_imp_list(SYM(q1)->name); #if CVODE cvode_cnexp_solve = lq; #endif } delete(q2->prev); delete(q2); }else{ qtemp = q1->next; Lappendsym(solvq, SYM0); } delete(q1->prev); /* handle the error statement */ /* put one in if it isn't already there */ if (qerr == ITEM0) { #if NOCMODL sprintf(buf, "if(error){fprintf(stderr,\"%s\\n\"); nrn_complain(_p); abort_run(error);}\n", current_line()); qtemp = qerr = insertstr(qtemp, buf); #else qtemp = qerr = insertstr(qtemp, "if(error){abort_run(error);}\n"); #endif }else{ replacstr(qtemp, "if (error)"); } errstmt = newlist(); lq = lappendsym(solvq, SYM0); LST(lq) = errstmt; movelist(qtemp, qerr, errstmt); } /* go through the solvq list and construct the proper while loop and calls*/ void solvhandler() { Item *lq, *qsol, *follow; List *errstmt; Symbol *fun, *method; int numeqn, listnum, btype, steadystate; int cvodemethod_; if (!solvq) solvq = newlist(); init_disc_vars(); /*why not here?*/ ITERATE(lq, solvq) { /* remember it goes by 3's */ steadystate=0; btype = lq->itemtype; if (btype < 0) { btype = lq->itemtype = -btype; steadystate = 1; check_ss_consist(lq); } qsol = ITM(lq); lq = lq->next; method = SYM(lq); #if CVODE cvodemethod_ = 0; if (method && strcmp(method->name, "after_cvode") == 0) { method = (Symbol*)0; lq->element.sym = (Symbol*)0; cvodemethod_ = 1; } if (method && strcmp(method->name, "cvode_t") == 0) { method = (Symbol*)0; lq->element.sym = (Symbol*)0; cvodemethod_ = 2; } if (method && strcmp(method->name, "cvode_v") == 0) { method = (Symbol*)0; lq->element.sym = (Symbol*)0; cvodemethod_ = 3; } #endif lq = lq->next; errstmt = LST(lq); /* err stmt handling assumes qsol->next is where it goes. */ fun = SYM(qsol); numeqn = fun->used; listnum =fun->u.i; if (btype == BREAKPOINT && (fun->subtype == DERF || fun->subtype == KINF)) { netrec_state_count = numeqn*10 + listnum; netrec_need_thread = 1; } follow = qsol->next; /* where p[0] gets updated */ /* Check consistency of method and block type */ if (method && !(method->subtype & fun->subtype)) { Sprintf(buf, "Method %s can't be used with Block %s", method->name, fun->name); diag(buf, (char *)0); } switch (fun->subtype) { case DERF: if (method == SYM0) { method = lookup("adrunge"); } if (btype == BREAKPOINT && !steadystate) { /* derivatives recalculated after while loop */ if (strcmp(method->name, "cnexp") != 0 && strcmp(method->name, "derivimplicit") != 0 && strcmp(method->name, "euler") != 0) { fprintf(stderr, "Notice: %s is not thread safe. Complain to Hines\n", method->name); vectorize = 0; Sprintf(buf, " %s();\n", fun->name); Insertstr(follow, buf); } /* envelope calls go after the while loop */ sens_nonlin_out(follow, fun); #if CVODE cvode_interface(fun, listnum, numeqn); #endif } if (btype == BREAKPOINT) whileloop(qsol, (long)DERF, steadystate); solv_diffeq(qsol, fun, method, numeqn, listnum, steadystate, btype); break; case KINF: if (method == SYM0) { method = lookup("_advance"); } if (btype == BREAKPOINT && (method->subtype & DERF)) { #if VECTORIZE fprintf(stderr, "Notice: KINETIC is thread safe only with METHOD sparse. Complain to Hines\n"); vectorize = 0; #endif /* derivatives recalculated after while loop */ Sprintf(buf, " %s();\n", fun->name); Insertstr(follow, buf); /* envelope calls go after the while loop */ sens_nonlin_out(follow, fun); } if (btype == BREAKPOINT) { whileloop(qsol, (long)DERF, steadystate); #if CVODE if (strcmp(method->name, "sparse") == 0) { cvode_interface(fun, listnum, numeqn); cvode_kinetic(qsol, fun, numeqn, listnum); single_channel(qsol, fun, numeqn, listnum); } #endif } solv_diffeq(qsol, fun, method, numeqn, listnum, steadystate, btype); break; case NLINF: #if VECTORIZE fprintf(stderr, "Notice: NONLINEAR is not thread safe.\n"); vectorize = 0; #endif if (method == SYM0) { method = lookup("newton"); } solv_nonlin(qsol, fun, method, numeqn, listnum); break; case LINF: #if VECTORIZE fprintf(stderr, "Notice: LINEAR is not thread safe.\n"); vectorize = 0; #endif if (method == SYM0) { method = lookup("simeq"); } solv_lineq(qsol, fun, method, numeqn, listnum); break; case DISCF: #if VECTORIZE fprintf(stderr, "Notice: DISCRETE is not thread safe.\n"); vectorize = 0; #endif if (btype == BREAKPOINT) whileloop(qsol, (long)DISCRETE, 0); Sprintf(buf, "0; %s += d%s; %s();\n", indepsym->name, indepsym->name, fun->name); replacstr(qsol, buf); break; #if 1 /* really wanted? */ case PROCED: if (btype == BREAKPOINT) { whileloop(qsol, (long)DERF, 0); #if CVODE if (cvodemethod_ == 1) { /*after_cvode*/ cvode_interface(fun, listnum, 0); } if (cvodemethod_ == 2) { /*cvode_t*/ cvode_interface(fun, listnum, 0); insertstr(qsol, "if (!cvode_active_)"); cvode_nrn_cur_solve_ = fun; linsertstr(procfunc, "extern int cvode_active_;\n"); } if (cvodemethod_ == 3) { /*cvode_t_v*/ cvode_interface(fun, listnum, 0); insertstr(qsol, "if (!cvode_active_)"); cvode_nrn_current_solve_ = fun; linsertstr(procfunc, "extern int cvode_active_;\n"); } #endif } Sprintf(buf, " %s();\n", fun->name); replacstr(qsol, buf); #if VECTORIZE Sprintf(buf, "{ %s(_p, _ppvar, _thread, _nt); }\n", fun->name); vectorize_substitute(qsol, buf); #endif break; #endif case PARF: #if VECTORIZE fprintf(stderr, "Notice: PARTIAL is not thread safe.\n"); vectorize = 0; #endif if (btype == BREAKPOINT) whileloop(qsol, (long)DERF, 0); solv_partial(qsol, fun); break; default: diag("Illegal or unimplemented SOLVE type: ", fun->name); break; } #if CVODE if (btype == BREAKPOINT) { cvode_valid(); } #endif /* add the error check */ Insertstr(qsol, "error ="); move(errstmt->next, errstmt->prev, qsol->next); #if VECTORIZE if (errstmt->next == errstmt->prev) { vectorize_substitute(qsol->next, ""); vectorize_substitute(qsol->prev, ""); }else{ fprintf(stderr, "Notice: SOLVE with ERROR is not thread safe.\n"); vectorize = 0; } #endif freelist(&errstmt); /* under all circumstances, on return from model, p[0] = current indepvar */ /* obviously ok if indepvar is original; if it has been changed away from time then _sav_indep will be reset to starting value of original when initmodel is called on every call to model */ #if NMODL #else if (btype == BREAKPOINT) { #if SIMSYS Sprintf(buf, "_sav_indep = %s;\n", indepsym->name); #else Sprintf(buf, "_sav_indep = _p[_indepindex];\n"); #endif Insertstr(follow, buf); } #endif } } void save_dt(q) /* save and restore the value of indepvar */ Item *q; { /*ARGSUSED*/ #if 0 /* integrators no longer increment time */ static int first=1; if (first) { first = 0; Linsertstr(procfunc, "double _savlocal;\n"); } Sprintf(buf, "_savlocal = %s;\n", indepsym->name); Insertstr(q, buf); Sprintf(buf, "%s = _savlocal;\n", indepsym->name); Insertstr(q->next, buf); #endif } char *saveindep = ""; static void whileloop(qsol, type, ss) Item *qsol; long type; int ss; { /* no solve statement except this is allowed to change the indepvar. Time passed to integrators must therefore be saved and restored. */ /* Note that when the user changes the independent variable within Scop, the while loop still uses the original independent variable. In this case 1) _break must be set to the entry value of the original independent variable 2) initmodel() must be called after each entry to model() 3) in initmodel() we are very careful not to destroy the entry value of time-- on exit it has its original value. Note that _sav_indep gets any value of time that is set within initmodel(). */ /* executing more that one for loop in a single call to model() is an error which is trapped in scop */ static int called = 0, firstderf = 1; char *cp=0; switch (type) { case DERF: case DISCRETE: if (firstderf) { /* time dependent process so create a deltastep */ double d[3]; #ifndef NeXT double atof(); #endif int i; Item *q; char sval[256]; Sprintf(buf, "delta_%s", indepsym->name); for (i=0, q=indeplist->next; i<3; i++, q=q->next) { d[i] = atof(STR(q)); } if (type == DERF) { Sprintf(sval, "%g", (d[1]-d[0])/d[2]); }else if (type == DISCRETE) { Sprintf(sval, "1.0"); } deltaindep = ifnew_parminstall(buf, sval, "", ""); firstderf = 0; #if NMODL #else Sprintf(buf, "_modl_set_dt(_dt) double _dt; { %s = _dt;}\n", deltaindep->name); Lappendstr(procfunc, buf); #endif } if (type == DERF) { cp = "dt"; }else if (type == DISCRETE) { cp = "0.0"; } if (ss) { return; } break; default: /*SUPPRESS 622*/ assert(0); } #if NMODL if (strcmp(indepsym->name, "t") != 0) { diag("The independent variable name must be `t'", (char *)0); } #else Sprintf(buf, "_save = _break = %s; %s = _sav_indep;\n", indepsym->name, indepsym->name); Insertstr(qsol, buf); #if !SIMSYS Sprintf(buf, "if (_p + _indepindex != &%s) {initmodel(_pp); %s = _sav_indep;}\n", indepsym->name, indepsym->name); Insertstr(qsol, buf); #endif #endif if (called) { Fprintf(stderr, "Warning: More than one integrating SOLVE statement in an \ BREAKPOINT block.\nThe simulation will be incorrect if more than one is used \ at a time.\n"); } #if NMODL #else Sprintf(buf, "if (%s < _break) {\n",indepsym->name); Insertstr(qsol, buf); /* ensure that there are an integer number of steps / break */ if (type == DERF) { Sprintf(buf, " { int _nstep; double _dt, _y;\n\ _y = _break - %s; _dt = %s;\n", indepsym->name, "dt"); Insertstr(qsol, buf); Insertstr(qsol, "_nstep = (int)(_y/_dt + .9);\n if (_nstep==0) _nstep = 1;\n"); Sprintf(buf, "%s = _y/((double)_nstep);\n", "dt"); Insertstr(qsol, buf); Sprintf(buf, "\n }\n"); Insertstr(qsol, buf); } if (type == DERF) { Sprintf(buf, "_break -= .5* %s;\n", "dt"); Insertstr(qsol, buf); } #endif #if NMODL /* no longer a for loop */ #else Sprintf(buf, "for (; %s < _break; %s += %s) {\n", indepsym->name, indepsym->name, cp); Insertstr(qsol, buf); /* close the while loop; note that integrators have been called */ if (type == DERF) { Sprintf(buf, "\n}}\n %s = _save;\n", indepsym->name); }else if (type == DISCRETE) { Sprintf(buf, "\n}}\n"); } Insertstr(qsol->next,buf); #endif if (!called) { /* fix up initmodel as per 3) above. In cout.c _save is declared */ #if NMODL Sprintf(buf, " _save = %s;\n %s = 0.0;\n", indepsym->name, indepsym->name); saveindep = stralloc(buf, (char *)0); #else Sprintf(buf, "%s0", indepsym->name); IGNORE(ifnew_parminstall(buf, STR(indeplist->prev->prev), STR(indeplist->prev), "")); Sprintf(buf, " _save = %s;\n %s = %s0;\n", indepsym->name, indepsym->name, indepsym->name); saveindep = stralloc(buf, (char *)0); #endif /* Assert no more additions to initfunc involving the value of time */ Sprintf(buf, " _sav_indep = %s; %s = _save;\n", indepsym->name, indepsym->name); Lappendstr(initfunc, buf); #if VECTORIZE vectorize_substitute(initfunc->prev, ""); #endif } called++; } /* steady state consistency means that KINETIC blocks whenever solved must invoke same integrator (default is advance) and DERIVATIVE blocks whenever solved must invoke the derivimplicit method. */ static void check_ss_consist(qchk) Item *qchk; { Item *q; Symbol *fun, *method; ITERATE(q, solvq) { fun = SYM(ITM(q)); if (fun == SYM(qchk)) { method= SYM(q->next); switch (q->itemtype) { case DERF: if (!method || strcmp("derivimplicit", method->name)!=0) { diag("STEADYSTATE requires all SOLVE's of this DERIVATIVE block to use the\n\ `derivimplicit' method:", fun->name); } break; case KINF: if (SYM(qchk->next) != method || (method && strcmp("sparse", method->name) != 0)){ diag("STEADYSTATE requires all SOLVE's of this KINETIC block to use the\n\ same method (`advance' or `sparse'). :", fun->name); } break; default: diag("STEADYSTATE only valid for SOLVEing a KINETIC or DERIVATIVE block:", fun->name); break; } } q = q->next->next; } } neuron-7.5/src/nmodl/symbol.c000077500000000000000000000042641323325274500162630ustar00rootroot00000000000000#include <../../nmodlconf.h> #include "modl.h" #include "parse1.h" #include "symbol.h" List *symlist[128]; /* symbol table: linked list first char gives which list to use,but*/ List *symlistlist; /* for a stack of local symbol lists */ void symbol_init() { int i; symlistlist = newlist(); for (i=0; i<128; i++) { /* more than we need */ symlist[i] = newlist(); } } Symbol *lookup(s) /* find s in symbol table */ char *s; { Item *sp; ITERATE(sp, symlist[s[0]]) { if (strcmp(SYM(sp)->name, s) == 0) { return SYM(sp); } } return SYM0; /* 0 ==> not found */ } Symbol *checklocal(sym) Symbol *sym; { Item *sp; List *sl; char *s; s = sym->name; /* look in local lists */ ITERATE(sl, symlistlist) ITERATE(sp, LST(sl)) { if (strcmp(SYM(sp)->name+2, s) == 0) { /*get past _l*/ return SYM(sp); } } return sym; } Symbol *install(s, t) /* install s in the list symbol table with type t*/ char *s; int t; { Symbol *sp; List *sl; if (t == STRING) { sl = symlist[0]; }else if (t == -1) { /*install on top local list see below*/ t = NAME; assert(symlistlist->next != symlistlist); sl = LST(symlistlist->next); }else{ sl = symlist[s[0]]; } sp = (Symbol *) emalloc(sizeof(Symbol)); sp->name = stralloc(s, (char *)0); sp->type = t; sp->subtype = 0; #if NMODL sp->nrntype = 0; sp->assigned_to_ = 0; sp->no_threadargs = 0; #if CVODE sp->slist_info_ = (int*)0; #endif #endif sp->u.str = (char *)0; sp->used = 0; sp->usage = 0; sp->araydim = 0; sp->discdim = 0; sp->level = 100; /* larger than any reasonable submodel level */ Linsertsym(sl, sp); /*insert at head of list*/ return sp; } void pushlocal() { Item * q; q = linsertsym(symlistlist, SYM0); /*the type is irrelevant*/ LST(q) = newlist(); } void poplocal() /* a lot of storage leakage here for symbols we are guaranteed not to need */ { List *sl; Item *i, *j; assert(symlistlist->next != symlistlist); sl = LST(symlistlist->next); for (i = sl->next; i != sl; i = j) { j = i->next; delete(i); } delete(symlistlist->next); } Symbol *copylocal(s) Symbol *s; { if (s->name[0] == '_') { Sprintf(buf, "%s", s->name); }else{ Sprintf(buf, "_l%s", s->name); } return install(buf, -1); } neuron-7.5/src/nmodl/symbol.h000077500000000000000000000023241323325274500162630ustar00rootroot00000000000000/* /local/src/master/nrn/src/nmodl/symbol.h,v 4.1 1997/08/30 20:45:37 hines Exp */ /* symbol.h,v * Revision 4.1 1997/08/30 20:45:37 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:24:05 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:06:32 hines * proper nocmodl version number * * Revision 1.1.1.1 1994/10/12 17:21:33 hines * NEURON 3.0 distribution * * Revision 8.0 89/09/22 17:27:04 nfh * Freezing * * Revision 7.0 89/08/30 13:32:42 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.0 89/08/14 16:27:21 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.0 89/07/24 17:03:52 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.1 89/07/07 16:55:21 mlh * FIRST LAST START in independent SWEEP higher order derivatives * * Revision 1.1 89/07/06 14:52:48 mlh * Initial revision * */ extern List *symlist[]; #define SYMITER(arg1) for (i = 'A'; i <= 'z'; i++)\ ITERATE(qs, symlist[i])\ if ((s = SYM(qs))->type == arg1) #define SYMITER_STAT for (i='A'; i <= 'z'; i++)\ ITERATE(qs, symlist[i])\ if ((s = SYM(qs))->subtype & STAT) neuron-7.5/src/nmodl/units.c000077500000000000000000000002671323325274500161170ustar00rootroot00000000000000#include <../../nmodlconf.h> /* * Automake doesn't deal well with sources that live in other directories. * This is a quick and dirty workaround. */ #include "../modlunit/units.c" neuron-7.5/src/nmodl/version.c000077500000000000000000001144111323325274500164370ustar00rootroot00000000000000#include <../../nmodlconf.h> /* $Header$ */ /* $Log$ Revision 1.2 2005/10/04 20:55:32 hines The bg1 branch is merged into the Main trunk. That branch contains all the BlueGene specific enhancements and many general Parallel Network simulation enhancements that were useful for efficient simulation on the BlueGene. The bottom line is that a 25000 cell Cortical network eleptogenesis model by Paul Bush, re-written for parallel simulation by Bill Lytton shows linear speedup on up to 2500 cpus on the BlueGene. This model generated approximately 200000 spikes and managed over 100,000,000 NetCons. Revision 1.1.1.1.72.1 2005/09/25 16:59:51 hines A first pass at configure support for cross compiling. Not perfect but much superior to what existed prior to this commit. The problem is that although most of the binaries constructed are executed on the host machine, there are three, hoc_e, modlunit, and nocmodl, that are executed on the build machine. This means potentially different configuration, compilers, and makefile dependency mechanisms. The current solution requires two passes. The first pass is to configure with the --with-nmodl-only option and then make and make install. That pass constructs a nmodlconf.h file which is the dual to nrnconf.h. The second pass should configure with the --without-nmodl option and then make and make install. Note that it is important to properly set CC, CXX, CFLAGS, CXXFLAGS, LIBS and any other thing that is distinct between the configurations. Also note that the BlueGene is special since those variables are set to proper default values for both passes. In this case the nmodl pass should have the configuration options --enable-bluegene --with-nmodl-only and the second pass does NOT need the --without-nmodl option and the single option --enable-bluegene suffices. One can switch to the build configuration without affecting the host and vice versa since .h.in files are not shared. That is helpful as there are no files that have to be recompiled due to the switch. Revision 1.1.1.1 2003/02/11 18:36:08 hines NEURON Simulation environment. Unreleased 5.4 development version. Revision 1.1.1.1 2003/01/01 17:46:33 hines NEURON -- Version 5.4 2002/12/23 from prospero as of 1-1-2003 Revision 1.1.1.1 2002/06/26 16:23:07 hines NEURON 5.3 2002/06/04 * Revision 1.1.1.1 2001/01/01 20:30:34 hines * preparation for general sparse matrix * * Revision 1.2 2000/03/27 14:17:44 hines * All sources now include nrnconf.h instead of config.h so that minor * option changes (eg in src/parallel/bbsconf.h) do not require recompilation * of everything. * * Revision 1.1.1.1 2000/03/09 13:55:34 hines * almost working * * Revision 4.3 1997/11/13 19:53:08 hines * LONGITUDINAL_DIFFUSION area {state} allowed in KINETIC block * same syntax as COMPARTMENT statement. * Units checking not established yet but area should be in um2 and * the COMPARTMENT volume units should be um3/um. * If the longitudinal area is affected by diam then diam should * appear explicitly in the area expression (generally as diam*diam/4 * but perhaps some coordinate systems may have area that scales * linearly with diam). * Longitudinal diffusion works correctly with changing diameter and * rallbranch. It works with cvode but the linear solver for it * is currently equivalent to modified euler. With CVODE and * cvode.jacobian(1) to use a full matrix the approach to steady state * is fast if there are not too many states. It would be nice to * do some approimate tridiagonal system approaches for the built-in * linear solver. * * Revision 4.2 1997/10/20 14:59:33 hines * nocmodl file.mod allowed (ie suffix is allowed) * * Revision 4.1 1997/08/30 20:45:38 hines * cvs problem with branches. Latest nmodl stuff should now be a top level * * Revision 4.0.1.1 1997/08/08 17:24:06 hines * nocmodl version 4.0.1 * * Revision 4.0 1997/08/08 17:22:24 hines * version 4.0 of nocmodl * * Revision 1.4 1997/08/08 17:21:52 hines * version 4.0 of nocmodl * * Revision 1.3 1997/08/08 17:06:34 hines * proper nocmodl version number * * Revision 1.2 1997/08/08 17:03:28 hines * correct nocmodl language version * * Revision 1.1.1.1 1994/10/12 17:21:37 hines * NEURON 3.0 distribution * * Revision 9.194 1994/10/03 17:49:49 hines * more flexibility as to relation of erev and concentrations and their types * * Revision 9.193 1994/09/26 18:37:06 hines * forgot to checkin last time * * Revision 9.192 1994/09/26 18:20:19 hines * USEION ... VALENCE real * required when a model uses an ion other than na, k, ca * USEION ... WRITE cai, cao * promotes cai, cao to STATE * USEION ... READ cai, cao * promotes cai, cao to CONST * * Revision 9.191 1994/09/20 14:45:44 hines * port to dec alpha * * Revision 9.190 1994/09/20 14:44:11 hines * port to dec alpha * * Revision 9.189 1994/08/23 15:45:09 hines * In SOLVE procedure the VERBATIM return 0; is no longer * requires since all procedures have this by default. * In nocmodl, INDEPENDENT no longer required since if doesn't exist then * t (ms) automatically declared. * * Revision 9.188 1994/08/18 12:12:43 hines * properly put pragmas in with if... else stmts. * Dont use pragmas in nonvectorized part of kinetic block * * Revision 9.187 1994/08/05 14:11:14 hines * NullParameter replaces null args in Imakefile * * Revision 9.186 1994/08/04 20:03:55 hines * forgot to remove 1 && from kinetic vectorize testbed * * Revision 9.185 1994/07/30 17:14:21 hines * standard check for bison and changes to kinetic vectorization surrounded * by proper conditional preprocessor directives * * Revision 9.184 1994/07/26 14:04:22 hines * avoid objectcenter warning about retrieving int from pointer when * procedure is solved. The pointer in question is null and the int * is never used. * * Revision 9.183 1994/07/25 20:59:38 hines * wrong number of args in an emission of MATELM in new style. * * Revision 9.182 1994/07/21 13:11:16 hines * allow vectorization of kinetic blocks on cray when using sparse method. * not tested yet * * Revision 9.181 1994/05/23 17:56:52 hines * error in handling MODL_INCLUDE when no file exists * * Revision 9.180 1994/05/18 18:11:56 hines * INCLUDE "file" * tries originalpath/file ./file MODL_INCLUDEpaths/file * * Revision 9.179 1994/05/09 19:10:30 hines * pointprocess.has_loc() returns true if point process located in section * * Revision 9.178 1994/05/02 12:48:35 hines * on abort with NOCMODL call nrn_complain(_p) to tell location where * failure occurred (only SOLVE statement) and print line and .mod file * * Revision 9.177 1994/03/16 20:51:30 hines * use getcwd instead of getwd. More portable * * Revision 9.176 1994/03/08 17:51:05 hines * allow help syntax, ? treated same as : * send the filename and mechname to hoc during registration * * Revision 9.175 1994/02/24 19:25:58 hines * better error message if no declaration and gets caught in decode_ustr * * Revision 9.174 1993/11/04 15:53:20 hines * port to solaris2 (no more warnings) * * Revision 9.173 1993/07/09 17:21:34 hines * fix error in vectorization of solve from last change * * Revision 9.172 93/07/09 16:28:36 hines * point processes now work correctly when they are electrodes and an * extracellular mechananism is present. * vclmp.mod and stim.mod are electrodes * positive electrode current causes depolarization (normal mechanism * current is positive outward) * When ELECTRODE_CURRENT keyword is present then v refers to * vmembrane+vext * Note : no warning is given if there are membrane currents within * the same model. they are also silently treated the same way as * an electrode * * Revision 9.171 93/07/08 14:46:09 hines * Alternative to NONSPECIFIC_CURRENT is ELECTRODE_CURRENT * at this time is identical to old way. Introduced because membrane * mechanisms for electrode currents don't work right because the * current is assumed to pass from the extracellular space to the inside * and thus current injection does not change vext (and it is opposite in * sign to what one would expect). This change is not complete here. Only * the scaffolding is now in place and it has been verified to be identical * to the old way. The change is mostly to non-vectorized models and * now * void nrn_cur(Node*, double*, Datum*) so that the model gets v directly * from the node and changes d and rhs from the node. * * Revision 9.170 93/05/17 11:06:54 hines * PI defined by some so undefing it * * Revision 9.169 93/04/28 10:01:12 hines * local right hand side for sparse. used to be extern modl_rhs now it is * coef... This allows multiple models to use sparse. * * Revision 9.168 93/04/23 11:13:45 hines * model keeps sparse method state in its own static area so sparse * can solve different sets of equations * * Revision 9.167 93/04/21 11:06:10 hines * lineq blocks do not return error number * nocpout point processes dparam element 2 reserved for a pointer to * Point_process * * Revision 9.166 93/03/21 17:47:57 hines * for some reason vectorized models with functions with no args * were begin translated at f(ix_,) * * Revision 9.165 93/02/25 13:25:51 hines * need_memb called with symbol instead of name * * Revision 9.164 93/02/23 14:51:59 hines * compiles with dos * * Revision 9.163 93/02/23 14:48:15 hines * compiles with DOS * * Revision 9.162 93/02/23 14:43:33 hines * works under DOS * * Revision 9.161 93/02/15 08:57:33 hines * linux * * Revision 9.159 93/02/11 16:55:48 hines * minor mods for NeXT * * Revision 9.158 93/02/02 10:32:50 hines * create static func before usage * * Revision 9.157 93/02/01 15:18:19 hines * static functions should be declared before use. * inline is keyword for some compilers. * * Revision 9.156 93/01/23 13:13:57 hines * The NeXT does not like to include files twice so nmodl_redef.h * has been separated into nmodl1_redef.h and nmodl2_redef.h * * Revision 9.155 93/01/05 11:05:46 hines * functions with no suffix still need to be declared * * Revision 9.154 92/11/10 11:56:22 hines * when compiling a translated model on the CRAY (with _CRAY defined as 1) * the check table functions are taken out of the loops. This is * not entirely safe if tables are used (and dependencies have changed) * in direct calls to functions that call functions with tables. It is * reasonably safe for finitialize(), fadvance(), fcurrent(), and * calling the hoc_function itself. * * Revision 9.153 92/10/30 16:06:36 hines * echo proper number of shift/reduce conflicts * * Revision 9.152 92/10/27 09:28:20 hines * all point processes use same steer_point_process in nrnoc/point.c * so there is no need to register a special one. * * Revision 9.151 92/10/24 16:31:43 hines * sets prop->param_size for use in notifying interviews when arrays are freed * * Revision 9.150 92/10/11 15:40:49 hines * forgot to declare _n_func for tables * * Revision 9.149 92/10/09 08:15:13 hines * for nrnoc, change in point process output style. now creates a built * in object for point processes. lives in SUN4nocmod * * Revision 9.148 92/10/05 13:05:03 hines * table functions separated into name(), _check_name(), _f_name(), * and _n_name(). * name() is robust in that it will steer to analytic or table and will * check that the table is uptodate. note _n_name is a table that does * no checking. * * Revision 9.147 92/09/27 17:46:21 hines * vectorized channel densities with _method3 fill thisnode.GC,EC instead * of rhs,d * * Revision 9.146 92/09/25 13:55:18 hines * the includes at beginning of lines must be hidden from the preprocessor * or else some machines will try to include them. * * Revision 9.145 92/08/06 10:13:37 hines * the check table function did not have _ix defined * * Revision 9.144 92/08/06 09:59:17 hines * put cray pragmas at appropriate places * get rid of initmodel references to saveing t and incrementing ninit * * Revision 9.143 92/08/06 09:04:22 hines * table checking and creation moved into separate procedure. still called * everytime function is called. * * Revision 9.142 92/08/05 16:23:18 hines * can vectorize hh. need work on tables though. * * Revision 9.140 92/07/27 11:34:15 hines * some bugs fixed. no vectorizing except for SOLVE procedure (and that not done yet) * * Revision 9.139 92/07/27 10:11:25 hines * Can do some limited vectorization. Much remains. Often fails * * Revision 9.138 92/06/01 12:04:16 hines * NEURON { EXTERNAL name, name, ...} * translates to extern double name; * GLOBAL changed to translate to * #define name name_suffix * extern double name * * Revision 9.137 92/05/05 08:39:51 hines * last addition botched because line put in wrong place * * Revision 9.136 92/05/05 08:33:27 hines * need to link with math library (at least on RS6000) * * Revision 9.135 92/04/15 16:21:35 hines * recursive define problem with GLOBFUNCT when suffix was nothing, fixed * * Revision 9.134 92/03/31 06:51:21 hines * CONSTANT could not be a negative number. Fixed * * Revision 9.133 92/03/19 15:15:18 hines * creates a nrn_initialize function that will be called from finitialize(). * * Revision 9.132 92/02/18 13:25:51 hines * modl_rhs must be extern or else turboc won't connect it with sparse.c * * Revision 9.131 92/02/17 12:53:55 hines * GLOBFUNCT for parsact so table functions declare external instead of * static. * * Revision 9.130 92/02/17 10:25:13 hines * global modl functions declared with suffixes using #define * * Revision 9.129 92/02/15 21:13:08 hines * if bison used compile with -DBISON=1 * * Revision 9.128 92/02/05 14:47:56 hines * saber warning free * FUNCTION made global for use by other models. #define GLOBFUNC 1 * * Revision 9.127 92/02/05 12:32:05 hines * creates setdata_suffix(x) to allow use of data when functions called * from hoc. * * Revision 9.126 92/02/05 08:34:09 hines * NEURON {POINTER ...} allows a model to connect to external variables * #includes in nparout moved to beginning of defslist so crucial fields in * section structures not defined into nonsense. * * Revision 9.125 92/01/28 14:08:00 hines * fix Imakefile * * Revision 9.123 91/12/27 12:29:44 hines * no message when COMPARTMENT does not specify STATE since * it may specify an assigned or parameter. Note that * this statement is irrelevant but it is necessary for modlunit * * Revision 9.122 91/10/28 09:10:19 hines * wathey's improvements. different binary architectures in different * directories. * * Revision 9.121 91/10/01 11:30:13 hines * SUFFIX nothing now really adds nothing (usd to add _) * * Revision 9.120 91/09/16 15:46:15 hines * reorganization of how NEURON variables are declared. * RANGE: definitely range variables, can be param, assigned, or state * GLOBAL: definitely global variables, can be param or assigned * SECTION: not implemented * By default params are global variables. * By default states are range * By default assigned are in p array but not accessible from NEURON * NON-SPECIFIC current not accessible unless specified in RANGE. * * Revision 9.119 91/09/11 11:51:38 hines * extraneous rule in conststmt: removed * * Revision 9.118 91/09/11 11:14:53 hines * bad function number used in multiple kinetic models. * * Revision 9.116 91/08/23 08:30:01 hines * MACHDEP was changed to MACHDEF * * Revision 9.115 91/08/22 17:07:43 hines * for distribution to work on RS6000 * * Revision 9.114 91/08/15 11:18:31 hines * point process calls to point.c in neuron don't use getarg, etc. This * means a change to the calling sequence doesn't necessarily mean a change * to nparout.c * * Revision 9.113 91/08/13 09:17:41 hines * Comments inside strings do not need to be escaped. And they cause warnings * on some machines. * * Revision 9.112 91/08/12 11:35:41 hines * creates a get_loc_suffix(i) function to tell what location and * section of ith index is. * * Revision 9.111 91/08/12 11:34:33 hines * more generic makefile. Change MACHDEF for machine dependent definitions. * * Revision 9.110 91/08/12 09:57:56 hines * set_seed missing in extdef.h * * Revision 9.109 91/07/30 10:22:30 hines * eion, ioni, iono are constants, iion is assigned * * Revision 9.107 91/06/29 08:51:45 hines * left out hparout.o in nmodl.mk * * Revision 9.106 91/06/29 08:45:32 hines * more general units factor and slightly different syntax for conversion * * Revision 9.105 91/06/25 09:02:47 hines * last change broke saber... * * Revision 9.104 91/06/25 08:40:30 hines * makefile fairly generic, no sun4 isms * * Revision 9.103 91/06/25 08:18:48 hines * first attempt at generic makefile, no sun4 isms * * Revision 9.102 91/05/22 13:42:51 hines * last change botched * * Revision 9.101 91/05/22 13:39:24 hines * get modlunit stuff from SRC directory instead of RCS directory. * * Revision 9.100 91/05/06 13:28:01 hines * malloc not properly declared when compiling with turboc * * Revision 9.99 91/04/17 16:15:35 hines * DISCRETE block integrates by delta_indepvar instead of 1.0. * Also delta_indepvar not changed automatically and model() may return * at indepvar at value different from request if break not an integral * value of delta_indepvar. * * Revision 9.98 91/03/18 09:11:45 hines * FORALL i {} loops over all elements of vectors in statements. vector * length must be the same. * * Revision 9.97 91/02/15 13:35:23 hines * allow READ and WRITE of same ionic variable * * Revision 9.96 91/02/08 09:49:26 hines * "nothing" allowed as suffix (auto functions get base filename) * trivial model works since v, t, dt, etc auto created if not declared. * * Revision 9.95 91/01/29 09:16:04 hines * nmodl doesn't create modl_set_dt because multiple mechanisms would make * multiple declarations. * * Revision 9.94 91/01/24 14:00:45 hines * translation error when last token of LOCAL statement was the first token * after the LOCAL statement. Fixed by changing symbols at the parser instead * of the lexical analyser. * * Revision 9.93 91/01/03 08:00:15 hines * some static neuron variables were not declared under some circumstances. * * Revision 9.92 91/01/03 07:55:10 hines * nparout.c version comment moved to beginning of file * * Revision 9.91 91/01/03 07:18:40 hines * stepforce and schedule added to extdef.h * * Revision 9.90 91/01/02 08:00:53 hines * stepforce and schedule added to list of functions which handle * discontinuities. * * Revision 9.89 90/12/14 15:44:24 hines * nmodl: point process working with proper current dimensions. tested with * stim.mod and pascab1.hoc * * Revision 9.88 90/12/14 12:52:35 hines * nmodl: point processes allowed via POINT_PROCESS * * Revision 9.87 90/12/13 11:25:11 hines * calculation of _nstep cast to (int) * * Revision 9.86 90/12/12 18:18:14 hines * FROM index : index is an integer and cast to double wherever it * appears in expressons. It is not cast to int whenever it appears * in intexpr * * Revision 9.85 90/12/12 17:24:04 hines * nmodl: FROM i translates i as double fh.mod works properly * * Revision 9.84 90/12/12 10:06:59 hines * nmodl: GLOBAL allowed in NEURON block * * Revision 9.83 90/12/12 09:02:14 hines * nmodl: nparout allocates the p-array * * Revision 9.82 90/12/12 09:01:29 hines * LOCAL arrays allowed * * Revision 9.81 90/12/12 08:05:47 hines * NMODL: better partition of global and p-array. parameters that are * not explicitly defined become static. * * Revision 9.80 90/12/11 11:23:46 hines * forgot to take care of case where there is no TABLE statement * * Revision 9.79 90/12/11 10:55:29 hines * TABLE works with hocmodl * * Revision 9.78 90/12/10 16:56:48 hines * TABLE allowed in FUNCTION and PROCEDURE * * Revision 9.76 90/12/07 09:27:32 hines * new list structure that uses unions instead of void *element * * Revision 9.75 90/12/05 11:03:38 hines * forgot to add pindex to s->varnum to get index into parray for specific index. * * Revision 9.74 90/12/04 13:08:30 hines * kept calling initmodel from model. Now use hoc_pindepindex * * Revision 9.73 90/12/04 12:00:24 hines * model version displayed only as comment in generated c file * format of plot lines for scalar in .var file is * name nl vindex pindex 1 nl * for vector with specific index: * name[index] vindex pindex 1 * for vector without index * name[size] vindex pindex size * * Revision 9.72 90/11/30 13:10:07 hines * dcurdv calculated for ionic currents. * * Revision 9.71 90/11/30 08:22:24 hines * modl_set_dt should only be created for time dependent models * * Revision 9.70 90/11/28 15:35:18 hines * much work on case when ion is a state * * Revision 9.69 90/11/28 12:54:22 hines * ion variables do not all appear in the hoc name list. * diam understood * * Revision 9.68 90/11/28 09:12:07 hines * location where we are checking for STADYSTATE may not be a SYMBOL * * Revision 9.67 90/11/27 12:10:46 hines * bug in bnd introduced by change to partial * * Revision 9.66 90/11/27 10:47:49 hines * allow multiple partial equations within a partial block * * Revision 9.65 90/11/26 09:14:06 hines * merge didn't recognize units * * Revision 9.64 90/11/26 08:16:14 hines * external functions of type EXTDEF3 get two extra arguments. * The first arg is a pointer to _reset which should be set by the * function upon the occurence of a discontinuity. * The second arg is a pointer to a double which may be used by the * function to store information to help determine if a discontinuity * has occurred. init.c gives a list of these functions. * * Revision 9.63 90/11/23 15:07:22 hines * factor calculation using units.c of model * * Revision 9.62 90/11/23 10:33:18 hines * steadystate in BREAKPOINT block had failed to allocate delta_t * * Revision 9.61 90/11/23 10:01:50 hines * STEADYSTATE of kinetic and derivative blocks * * Revision 9.60 90/11/21 10:47:17 hines * _ninits is first argument in call to integrators * * Revision 9.59 90/11/21 08:41:10 hines * merge allows BREAKPOINT and PARAMETER. makefile merge works * * Revision 9.58 90/11/20 17:24:22 hines * CONSTANT changed to PARAMETER * CONSTANT now refers to variables that don't get put in .var file * * Revision 9.57 90/11/20 16:04:27 hines * EQUATION changed to BREAKPOINT * STEADYSTATE keyword added, EQUATION keyword still exists * * Revision 9.56 90/11/15 16:16:02 hines * unit parentheses for numbers and functions were not being removed. * * Revision 9.55 90/11/15 16:05:23 hines * units definition syntax is (unit) (unit) * * Revision 9.54 90/11/13 15:49:45 hines * allow function definitions and function definition arguments to * have units specifications. Also numbers can have units specifications. * * Revision 9.53 90/11/13 13:10:21 hines * nmodl: cachan works pretty well. ions generating current works. * * Revision 9.52 90/11/10 15:45:00 hines * nmodl: uses new NEURON { USEION ... format * passive.c works * * Revision 9.51 90/11/02 09:12:02 hines * TABLE keyword added. For now it is translated just as FUNCTION * * Revision 9.50 90/11/02 08:31:52 hines * Allow UNITS block and make a units defintion scale factor a static * variable so that it doesn't have to appear in the var file. eg. * UNITS { FARADAY = 96520 (coul) } * * Revision 9.49 90/11/02 07:01:15 hines * works better. Problem is that conditional macros cannot be used * in explicit target. * * Revision 9.48 90/11/02 06:59:36 hines * new way of specifying NEURON info. Keywords are * NEURON SUFFIX CURRENT NEED GET SET * * Revision 9.47 90/11/01 15:21:19 hines * SOLVE procedure allowed. The procedure needs to return an error code * with a VERBATIM statement * * Revision 9.46 90/10/30 14:29:23 hines * calc_dt is gone. Not needed because due to scopfit, dt needs to be * calculated at every break point. * _reset no longer used to say that dt has changed. The integrator will * have to check that itself. * * Revision 9.45 90/10/30 13:56:57 hines * derivative blocks (this impacts kinetic and sens as well) now return * _reset which can be set with RESET statement. _reset is static in the * file and set to 0 on entry to a derivative or kinetic block. * * Revision 9.44 90/10/30 10:25:16 hines * modl: saber warning free except for ytab.c and lex.c * * Revision 9.43 90/10/30 10:21:30 hines * ytab.o was not placed in proper directory * * Revision 9.42 90/10/30 10:01:06 hines * hmodl saber warning free and test.mod works * * Revision 9.41 90/10/30 08:37:13 hines * saber warning free except for ytab.c and lex.c * * Revision 9.40 90/10/30 08:07:07 hines * nmodl: Passive.mod working with index vectors. No longer copying * doubles. Just copying two pointers. * * Revision 9.39 90/10/30 07:32:47 hines * modl, nmodl, hmodl, smodl objects appear in different directories * but sources and archive files come from SRC and RCS respectively * * Revision 9.38 90/10/29 18:30:47 hines * restore after accidental erasure * * Revision 9.37 90/10/15 13:08:40 hines * parout separated into parout for modl, hparout for hmodl nparout for nmodl * * Revision 9.35 90/10/15 12:13:05 hines * mistake with checkin * * Revision 9.34 90/10/15 11:47:09 hines * hmodl: use _p[] * * Revision 9.33 90/10/11 15:45:06 hines * bugs fixed with respect to conversion from pointer vector to index vector. * * Revision 9.32 90/10/08 14:12:58 hines * index vector instead of pointer vector for slist and dlist * * Revision 9.31 90/10/08 11:34:06 hines * simsys prototype * * Revision 9.30 90/09/10 14:12:00 hines * extdef2.h added to makefile and checked in * * Revision 9.29 90/09/10 14:09:18 hines * certain functions specified in extdef2.h can have arguments which are * pointers to functions and pointers to vectors. * * Revision 9.28 90/09/09 17:28:29 hines * merge the summer's work at nbsr into modl * * Revision 9.27 90/09/05 07:08:26 hines * changed spar_rhs to modl_rhs in kinetic.c so that it would not * conflict with hoc sparse matrix. The only externs is sparse.c * are now _getelm sparse modl_rhs * * Revision 9.26 90/08/30 11:29:07 hines * units computations removed and can link with saber-c * * Revision 9.25 90/08/30 11:28:24 hines * units computations removed * * Revision 9.24 90/08/17 08:45:00 hines * mistake on last checkin * * Revision 9.23 90/08/17 08:39:30 hines * no more modltype for double scalars * * Revision 9.22 90/08/17 08:15:02 hines * HMODL change define from HOC to HMODL, ensure all .c files compiled * * Revision 9.21 90/08/17 08:13:46 hines * flux input to array state missing a ) * * Revision 9.20 90/08/15 15:17:03 hines * need to pass error value from crank back through the * block called by SOLVE. * * Revision 9.19 90/08/07 15:36:45 hines * forgot name of mechanism. Also append suffix to all range names * * Revision 9.18 90/08/07 15:36:03 hines * computation of rhs was bad * * Revision 9.17 90/08/07 08:43:58 hines * functions and procedures interfaced to NMODL and HMODL * * Revision 9.16 90/08/02 08:58:49 hines * NMODL can use more than one mechanism. Integrators that use ninits and * reset will not work, though. * * Revision 9.15 90/08/01 07:48:49 hines * repair HOC portion after all the errors introduced by NMODL * * Revision 9.14 90/07/31 17:03:54 hines * NMODL getting close. Compiles but multiple .mod files cause * multiple definitions. * * Revision 9.13 90/07/30 14:37:20 hines * NMODL looks pretty good. Ready to start testing. Have not yet tried * to compile the .c file. * * Revision 9.12 90/07/30 12:38:04 hines * wrong name for ASSIGNED * * Revision 9.11 90/07/30 11:51:18 hines * NMODL getting better, almost done * * Revision 9.10 90/07/27 13:58:11 hines * nmodl handles declarations about right for first pass at this. * * Revision 9.9 90/07/26 09:25:10 hines * beginning interface to NEURON * new keywords are PARAMETER and CURRENT * * Revision 9.8 90/07/26 07:58:45 hines * interface modl to hoc and call the translator hmodl * * Revision 9.7 90/07/21 11:36:18 hines * allow more than one reactant on -> reaction * fix bug where wrong reactant index used in constructing term. * * Revision 9.6 90/07/18 08:15:44 hines * PARAMETER is synonym for CONSTANT * Distinguishing them is necessary for NEURON since PARAMETER's can * vary with position on the neuron. * * Revision 9.5 90/07/18 08:00:21 hines * turn off units. * define for arrays now (p + n) instead of &p[n]. This allows the c file * to have arrays that look like a[i] instead of *(a + i). * * Revision 9.4 90/06/04 08:23:27 mlh * extend exponents from both expressions dimensionless to * allowing exponent to be positive integer. * * Revision 9.3 90/06/01 11:02:07 mlh * checks for conformability of units but does not check for * correct conversion factors. * in x^y, both x and y must be dimensionless * * Revision 9.2 90/05/30 17:01:16 mlh * not working yet, just adding files administratively * * Revision 8.30 90/04/09 08:41:42 mlh * implicit method for derivative blocks (allows mixed equations also). * The solve statement must precede the derivative block * * Revision 8.29 90/04/04 14:15:00 mlh * when multiple sparse models were called, MATELM was defined only * once and getelm was multiply declared. Now fixed. * * Revision 8.28 90/04/03 07:49:12 mlh * typo in previous change. Due to nature of RCS on nbsr, it is unfortunately * necessary to check things back in before testing. * * Revision 8.27 90/04/03 07:47:02 mlh * for turbo-c defs.h stuff must appear after inclusion of scoplib.h * This is done by now saving defs.h stuff in defs_list and printing * it in cout.c. Note that each item is type VERBATIM so that there * is no prepended space. * * Revision 8.26 90/02/15 10:11:54 mlh * defs.h no longer included. #defines come from parraycount during * handling of .var file. Thsi handling must be before putting info * in .c file * * Revision 8.25 90/02/15 08:57:59 mlh * first check for .mrg file and translate if it exists * if not the check for .mor file and translate that. * This is done if there is only one argument. * If two arguments then use first as basename and * second as input file * print message about what it is doing * * Revision 8.24 90/02/07 10:23:27 mlh * It is important that blocks for derivative and sensitivity also * be declared static before their possible use as arguments to other * functions and that their body also be static to avoid multiple * declaration errors. * * Revision 8.23 90/01/29 14:07:37 mlh * simplex is a nonlinear method * * Revision 8.22 90/01/23 16:11:09 mlh * delta_t is calculated for the first two calls after * a call to initmodel(). This is because the breakpoint * interval can change aftera the first call to model(). * The implementation is accomplished by _calc_dt=2 * in initmodel() and _calc_dt-- when _calc_dt is nonzero * in model() * * Revision 8.21 90/01/19 07:38:07 mlh * _modl_cleanup() called by abort_run() * * Revision 8.20 90/01/18 11:46:34 mlh * SOLVEFOR statement added * syntax is * blocktype blockname [SOLVEFOR name, name, ...] {statment} * where blocktype is KINETIC, NONLINEAR, or LINEAR * Only the states in the SOLVEFOR statement are solved * in that block. If the statement is not present then * all states are solved that appear in that block. * * Revision 8.19 90/01/18 08:14:22 mlh * serious error in calculating p-array index for * plot variables in .var file. * Fixed by using symbol->varnum to hold the p-index. * * Revision 8.18 90/01/16 11:06:28 mlh * error checking and cleanup after error and call to abort_run() * * Revision 8.17 90/01/03 16:13:44 mlh * discrete array variables had their for loops switched. * * Revision 8.16 89/12/18 07:58:23 mlh * Fixed problem in .var file in which x-axis array variable's dimension * was 1 too large. * * Revision 8.15 89/12/15 10:11:02 mlh * newton's last arg changed to vector of double pointers. * For nonlinear equations dlist holds the doubles and * pdlist points to them individually. * * Revision 8.14 89/11/21 08:18:46 mlh * More reliable method for ensuring that solve for loop ends up exactly * at the final time value. * * Revision 8.13 89/11/21 07:37:11 mlh * _calc_dt used in scopcore and therefore must be declared even for * time independent models. * * Revision 8.12 89/11/17 16:08:28 mlh * _ninits tells how many times initmodel() is called. Used by * scopmath routines that need to know when to self_initialize. * * Revision 8.11 89/11/17 15:12:43 nfh * Changed modl_version string printed by SCoP to read: "Language version..." * * Revision 8.10 89/11/14 16:38:00 mlh * _reset set to true whenever initmodel is called and whenever _calc_dt * is true * * Revision 8.9 89/11/13 15:17:48 mlh * _called_init changed to _calc_dt and made global so * that scop can cause dt to be recomputed on an * extend run command * * Revision 8.8 89/11/01 10:21:17 mlh * Three changes * consist moved after solvehandler to avoid warning that delta_indep is * >> undeclared. * Warning given if state is assigned a value in a DERIVATIVE block * identical names in nested LOCAL statements declared incorrectly. * >> The problem was fixed by not allowing extra _l prepended to * >> an already local variable. * * Revision 8.7 89/10/30 15:04:34 mlh * error message when no derivative equations in DERIVATIVE block * * Revision 8.6 89/10/27 15:44:25 mlh * initqueue() called in initmodel() when PUTQ or GETQ used. * * Revision 8.5 89/10/25 13:48:15 mlh * PUTQ and GETQ implemented * * Revision 8.4 89/10/25 13:43:47 mlh * Bug with discrete models in that delta_indep is used * Fixed by generating the proper line only when type is DERF * * Revision 8.3 89/10/11 08:43:27 mlh * _reset apparently bein declared elsewhere * * Revision 8.2 89/10/11 08:35:29 mlh * generate modl_version string in .c file * declare _reset=1 * * Revision 8.1 89/09/29 16:26:09 mlh * ifdef for VMS and SYSV and some fixing of assert * * Revision 8.0 89/09/22 17:27:06 nfh * Freezing * * Revision 7.2 89/09/07 07:45:48 mlh * 1) a scop independent variable may be a constant and an independent * 2)was failing to prevent multiple declarations involveing the SWEEP variable * 3) was not initializing time after match * 4) many bugs in handling exact for loop of t to the break point * >> * * * Revision 7.1 89/09/05 08:10:09 mlh * ensure an integer number of steps/break * allow us to deal easily with lists of pointers to item pointers * COMPARTMENT keyword for KINETIC block * * Revision 7.0 89/08/30 13:32:43 nfh * Rev 7 is now Experimental; Rev 6 is Testing * * Revision 6.3 89/08/24 12:08:11 mlh * failed to declare reprime(), make lint free * * Revision 6.2 89/08/23 12:03:22 mlh * kinetic reaction may involve stepped and independent (sweeped) variable * * Revision 6.1 89/08/23 10:32:18 mlh * derivative variables in .var file have names like var' instead of Dvar * * Revision 6.0 89/08/14 16:27:22 nfh * Rev 6.0 is latest of 4.x; now the Experimental version * * Revision 4.8 89/08/12 11:04:13 mlh * In hierarchical models, CONSTANT and ASSIGNED can be promoted to STATE * * Revision 4.7 89/08/11 09:57:29 mlh * simultaneous nonlinear equations allowed in DERIVATIVE block * CONSTANT and ASSIGNED variables can appear as terms in reactions * in a KINETIC block * * Revision 4.6 89/08/07 15:35:37 mlh * freelist now takes pointer to list pointer and 0's the list pointer. * Not doing this is a bug for multiple sens blocks, etc. * * Revision 4.5 89/08/05 11:38:45 mlh * axis units info now in .var file * units for higher order derivatives auto generated * .var syntax for higher order derivative states now a:b * * Revision 4.4 89/08/01 07:35:47 mlh * DEPENDENT keyword changed to ASSIGNED * * Revision 4.3 89/07/31 07:56:26 mlh * Slight problem with error messages. Now missing partial equation in PARTIAL * block says DEL2 instead of DEL * * Revision 4.2 89/07/27 13:28:18 mlh * crank calling sequence sends indepsym as a sentinal value * ugh! * * Revision 4.1 89/07/25 19:22:22 mlh * fixed error in copying string into too small a space in * section handling higher order derivatives. * * Revision 4.0 89/07/24 17:03:53 nfh * Freezing rev 3. Rev 4 is now Experimental * * Revision 3.10 89/07/21 09:28:21 mlh * Discrete equitions evaluated at time given by independent variable * in the sense that the state on the left hand side refers to state(t) * and explicit dependence on t works naturally. * * Revision 3.9 89/07/19 15:05:44 mlh * pass t by value introduces bug, return to version before that. * * Revision 3.8 89/07/18 15:29:14 mlh * integrators now are passed value of time instead of pointer to time * * Revision 3.7 89/07/18 11:55:29 mlh * first_time removed and MODEL_LEVEL used for declaration precedence * * Revision 3.6 89/07/12 16:34:06 mlh * 2nd optional argument gives input file. First arg is prefix to .var * and .c files (and .mod input file if 2nd arg not present). * * Revision 3.5 89/07/12 12:24:03 mlh * state@1 now refers to state value at end of previous step * state@0 is a syntax error * * Revision 3.4 89/07/11 19:32:26 mlh * missing ) from previous checkin * * Revision 3.3 89/07/11 19:30:00 mlh * Bug in which initial condition could not be a STEPPED variable is fixed * * Revision 3.2 89/07/11 16:56:58 mlh * remove p array from calling sequence of crank * * Revision 3.1 89/07/07 16:55:24 mlh * FIRST LAST START in independent SWEEP higher order derivatives * * Revision 1.1 89/07/07 16:25:06 mlh * Initial revision * * Revision 3.1 89/07/07 08:57:37 mlh * major revision * * Revision 1.2 89/07/06 15:35:04 mlh * inteface with version.c * * Revision 1.1 89/07/06 15:27:11 mlh * Initial revision * */ char *RCS_version = "$Revision: 1098 $"; char *RCS_date = "$Date: 2005-10-04 22:55:37 +0200 (Tue, 04 Oct 2005) $"; neuron-7.5/src/nrncvode/000077500000000000000000000000001323325274500153065ustar00rootroot00000000000000neuron-7.5/src/nrncvode/Makefile.am000077500000000000000000000006471323325274500173540ustar00rootroot00000000000000## Nothing gets compiled in this directory, but it must be included in the ## distribution. EXTRA_DIST = cvodeobj.cpp cvodeobj.h cvodestb.cpp \ cvtrset.cpp netcvode.cpp netcvode.h occvode.cpp pool.h tqueue.cpp \ hocevent.cpp \ tqueue.h vrecitem.h nrndaspk.h nrndaspk.cpp netcon.h \ bbtqueue.h bbtqueue.cpp rbtqueue.h rbtqueue.cpp \ sptqueue.h sptqueue.cpp sptree.h spaux.c sptree.c spdaveb.c \ sptbinq.h sptbinq.cpp neuron-7.5/src/nrncvode/Makefile.in000066400000000000000000000445131323325274500173620ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/nrncvode ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)nrnneosm.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/nrnneosm.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = cvodeobj.cpp cvodeobj.h cvodestb.cpp \ cvtrset.cpp netcvode.cpp netcvode.h occvode.cpp pool.h tqueue.cpp \ hocevent.cpp \ tqueue.h vrecitem.h nrndaspk.h nrndaspk.cpp netcon.h \ bbtqueue.h bbtqueue.cpp rbtqueue.h rbtqueue.cpp \ sptqueue.h sptqueue.cpp sptree.h spaux.c sptree.c spdaveb.c \ sptbinq.h sptbinq.cpp all: nrnneosm.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrncvode/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrncvode/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrnneosm.h: stamp-h11 @test -f $@ || rm -f stamp-h11 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h11 stamp-h11: $(srcdir)/nrnneosm.h.in $(top_builddir)/config.status @rm -f stamp-h11 cd $(top_builddir) && $(SHELL) ./config.status src/nrncvode/nrnneosm.h distclean-hdr: -rm -f nrnneosm.h stamp-h11 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile nrnneosm.h installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrncvode/bbtqueue.cpp000066400000000000000000000213251323325274500176310ustar00rootroot00000000000000//balanced binary tree queue implemented by Michael Hines TQItem::TQItem() { left_ = nil; right_ = nil; parent_ = nil; } TQItem::~TQItem() { if (left_) { delete left_; } if (right_) { delete right_; } } static void deleteitem(TQItem* i) { if (i->left_) { deleteitem(i->left_); } if (i->right_) { deleteitem(i->right_); } i->left_ = nil; i->right_ = nil; tpool_->free(i); } bool TQItem::check() { #if DOCHECK if (left_ && left_->t_ > t_) { printf("left %g not <= %g\n", left_->t_, t_); return false; } if (right_ && right_->t_ < t_) { printf("right %g not >= %g\n", right_->t_, t_); return false; } if (parent_) { if (parent_->left_ == this) { if (t_ > parent_->t_) { printf("%g not <= parent %g\n", t_, parent_->t_); return false; } }else if (parent_->right_ == this) { if (t_ < parent_->t_) { printf("%g not >= parent %g\n", t_, parent_->t_); return false; } }else{ printf("this %g is not a child of its parent %g\n", t_, parent_->t_); return false; } } if (w_ != wleft() + wright() + 1) { printf("%g: weight %d inconsistent with left=%d and right=%d\n", t_, w_, wleft(), wright()); return false; } #endif return true; } static void prnt(const TQItem* b, int level) { int i; for (i=0; i < level; ++i) { printf(" "); } printf("%g %c %d\n", b->t_, b->data_?'x':'o', b->w_); } static void chk(TQItem* b, int level) { if (!b->check()) { hoc_execerror("chk failed", errmess_); } } void TQItem::t_iterate(void (*f)(const TQItem*, int), int level) { if (left_) { left_->t_iterate(f, level+1); } f(this, level); if (right_) { right_->t_iterate(f, level+1); } } #if BBTQ == 0 // balanced binary tree implemented by Michael Hines TQueue::TQueue() { if (!tpool_) { tpool_ = new TQItemPool(1000); } root_ = nil; least_ = nil; #if COLLECT_TQueue_STATISTICS nmove = ninsert = nrem = nleast = nbal = ncmplxrem = 0; nfastmove = ncompare = nleastsrch = nfind = nfindsrch = 0; #endif } TQueue::~TQueue() { if (root_) { deleteitem(root_); } } void TQueue::print() { if (root_) { root_->t_iterate(prnt, 0); } } void TQueue::forall_callback(void(*f)(const TQItem*, int)) { if (root_) { root_->t_iterate(f, 0); } } void TQueue::check(const char* mes) { #if DOCHECK errmess_ = mes; if (root_) { root_->t_iterate(chk, 0); } errmess_ = nil; #endif } double TQueue::least_t() { TQItem* b = least(); if (b) { return b->t_; }else{ return 1e15; } } TQItem* TQueue::least() { STAT(nleast) #if !FAST_LEAST || DOCHECK TQItem* b; b = root_; if (b) for (; b->left_; b = b->left_) { STAT(nleastsrch) } #if DOCHECK assert(least_ == b); #else least_ = b; #endif #endif return least_; } void TQueue::new_least() { assert(least_); assert(!least_->left_); TQItem* b = least_->right_; if (b) { for (;b->left_; b = b->left_) {;} least_ = b; }else{ b = least_->parent_; if (b) { assert(b->left_ == least_); least_ = b; }else{ least_ = nil; } } } void TQueue::move_least(double tnew) { TQItem* b = least(); if (b) { move(b, tnew); } } void TQueue::move(TQItem* i, double tnew) { PSTART(1) STAT(nmove) #if 0 // this is a bug // check if it really needs moving STAT(ncompare) double tmin = -1e9, tmax = 1e9; if (i->left_) { tmin = i->left_->t_; }else if (i->parent_ && i->parent_->right_ == i) { tmin = i->parent_->t_; } if (i->right_) { tmax = i->right_->t_; }else if (i->parent_ && i->parent_->left_ == i) { tmax = i->parent_->t_; } if ( tmin <= tnew && tnew < tmax) { // confusing to check equality STAT(nfastmove) i->t_ = tnew; i->check(); PSTOP(1) return; } #endif // the long way remove1(i); insert1(tnew, i); PSTOP(1) } TQItem* TQueue::find(double t) { TQItem* b; STAT(nfind) for (b = root_;b;) { STAT(nfindsrch) STAT(ncompare) if (t == b->t_) { //printf("found %g\n", t); return b; }else if (t < b->t_) { b = b->left_; }else{ b = b->right_; } } printf("couldn't find %g\n", t); return b; } void TQueue::remove(TQItem* i) { PSTART(1) if (i) { remove1(i); deleteitem(i); } PSTOP(1) } void TQueue::remove1(TQItem* i) { STAT(nrem) // merely remove if leaf // if no left, right becomes left of parent // replace i with rightmost on left (say x) // we could just replace i.data with x.data // and remove x. But then, data holding pointer to // x would be invalid. So take the trouble to reset // pointer belonging to x check("begin remove1"); #if FAST_LEAST if (least_ && least_ == i) { new_least(); } #endif TQItem* p = i->parent_; TQItem** child; bool doweight = true; if (p) { //printf("removing with a parent %g\n", i->t_); if (p->left_ == i) { child = &p->left_; }else{ child = &p->right_; } } if (i->left_) { STAT(ncmplxrem); //printf("removing with a left %g\n", i->t_); // replace i with rightmost on left TQItem* x; for (x = i->left_; x->right_; x = x->right_) { ; } if (x == i->left_) { //printf("x == i->left\n"); if (p) { *child = x; }else{ root_ = x; } x->parent_ = i->parent_; x->right_ = i->right_; if (x->right_) { x->right_->parent_ = x; // x->w_ += x->right_->w_; x->w_ = i->w_ - 1; } }else{ remove1(x); doweight = false; if (p) { *child = x; }else{ root_ = x; } x->parent_ = i->parent_; x->right_ = i->right_; x->left_ = i->left_; x->left_->parent_ = x; if (x->right_) { x->right_->parent_ = x; } x->w_ = i->w_; } }else if (i->right_) { //printf("removing with a right but no left %g\n", i->t_); //check(); printf("checked\n"); // no left if (p) { *child = i->right_; (*child)->parent_ = p; }else{ root_ = i->right_; root_->parent_ = nil; } }else{ // a leaf //printf("removing leaf %g\n", i->t_); if (p) { *child = nil; }else{ root_ = nil; } } if (doweight) { while (p) { --p->w_; p = p->parent_; } } i->right_ = nil; i->left_ = nil; i->parent_ = nil; check("end remove1"); } void TQueue::reverse(TQItem* b) { // switch item and parent TQItem* p = b->parent_; if (p) { STAT(nbal) if(p->parent_) { if (!p->parent_->check()) printf("p->parent failed start\n"); } if (!p->check()) printf("p failed at start\n"); if (!b->check()) printf("b failed at start\n"); if (p->parent_) { b->parent_ = p->parent_; if (p->parent_->left_ == p) { p->parent_->left_ = b; }else{ p->parent_->right_ = b; } }else{ assert(root_ == p); b->parent_ = nil; root_ = b; } b->w_ = p->w_; p->parent_ = b; if (p->left_ == b) { p->left_ = b->right_; b->right_ = p; if (p->left_) { p->left_->parent_ = p; } }else{ p->right_ = b->left_; b->left_ = p; if (p->right_) { p->right_->parent_ = p; } } p->w_ = p->wleft() + p->wright() + 1; if(b->parent_) { if (!b->parent_->check()) printf("b->parent failed end\n"); } if (!p->check()) printf("p failed at end\n"); if (!b->check()) printf("b failed at end\n"); } } TQItem* TQueue::insert(double t, void* data) { PSTART(1) // TQItem* i = new TQItem(); TQItem* i = tpool_->alloc(); i->data_ = data; insert1(t, i); PSTOP(1) return i; } void TQueue::insert1(double t, TQItem* i) { check("begin insert1"); #if FAST_LEAST STAT(ncompare) if (!least_ || t < least_->t_) { least_ = i; } #endif TQItem* p = root_; STAT(ninsert) if (p) { for (;;) { STAT(ncompare) if (t < p->t_) { if (p->left_) { p = p->left_; // if (p->unbalanced()) { // reverse(p); // } }else{ p->left_ = i; break; } }else{ if (p->right_) { p = p->right_; // if (p->unbalanced()) { // reverse(p); // } }else{ p->right_ = i; break; } } } }else{ root_ = i; } i->parent_ = p; i->t_ = t; i->w_ = 1; for (p = i->parent_; p; p = p->parent_) { ++p->w_; } for (p = i->parent_; p; ) { if (p->unbalanced()) { reverse(p); }else{ p = p->parent_; } } check("end insert1"); } bool TQItem::unbalanced() { int balance, dbalance; if (parent_) { balance = parent_->wright() - parent_->wleft(); if (parent_->left_ == (TQItem*)this) { if (balance < -(wright() + 1)) { //printf("balance %d to %d\n", balance, balance + 2*(wright()+1)); return true; } }else{ if (balance > wleft() + 1) { //printf("balance %d to %d\n", balance, balance - 2*(wleft()+1)); return true; } } } return false; } void TQueue::statistics() { #if COLLECT_TQueue_STATISTICS printf("insertions=%lu moves=%lu fastmoves=%lu removals=%lu calls to least=%lu\n", ninsert, nmove, nfastmove, nrem, nleast); printf("calls to find=%lu balances=%lu complex removals=%lu\n", nfind, nbal, ncmplxrem); printf("comparisons=%lu leastsearch=%lu findsearch=%lu\n", ncompare, nleastsrch, nfindsrch); #else printf("Turn on COLLECT_TQueue_STATISTICS_ in tqueue.h\n"); #endif } #endif neuron-7.5/src/nrncvode/bbtqueue.h000066400000000000000000000022121323325274500172700ustar00rootroot00000000000000//#ifndef tqueue_h //#define tqueue_h #define COLLECT_TQueue_STATISTICS 1 class TQItem { public: TQItem(); virtual ~TQItem(); bool check(); int wleft() { return (left_?left_->w_:0); } int wright() { return (right_?right_->w_:0); } void t_iterate(void (*)(const TQItem*, int), int); bool unbalanced(); void clear(){} public: void* data_; double t_; TQItem* left_; TQItem* right_; TQItem* parent_; int w_; }; class TQueue { public: TQueue(); virtual ~TQueue(); TQItem* least(); // does not remove from TQueue double least_t(); TQItem* insert(double t, void* data_); TQItem* find(double t); void remove(TQItem*); void move(TQItem*, double tnew); void move_least(double tnew); void print(); void check(const char* errmess); void statistics(); void insert1(double t, TQItem*); void remove1(TQItem*); void forall_callback(void (*)(const TQItem*, int)); private: void reverse(TQItem*); void new_least(); private: TQItem* least_; TQItem* root_; #if COLLECT_TQueue_STATISTICS private: unsigned long ninsert, nrem, nleast, nbal, ncmplxrem; unsigned long ncompare, nleastsrch, nfind, nfindsrch, nmove, nfastmove; #endif }; //#endif neuron-7.5/src/nrncvode/cvodeobj.cpp000066400000000000000000001122461323325274500176130ustar00rootroot00000000000000#include <../../nrnconf.h> // solver interface to CVode #include #include "nrnmpi.h" extern "C" { void cvode_fadvance(); void cvode_finitialize(); extern void (*nrn_multisplit_setup_)(); } #include #include #include "classreg.h" #include "nrnoc2iv.h" #include "datapath.h" #include "cvodeobj.h" #include "netcvode.h" #include "membfunc.h" #include "nrndaspk.h" #include "tqueue.h" #include "mymath.h" #include "htlist.h" #include #include #if USE_PTHREAD static MUTDEC #endif //I have no idea why this is necessary // but it stops codewarrior from complaining // about illegal overloading in math.h // and math.h alone just moves the problem // to these #if MAC #include "d_avec.h" #endif //#include "shared/sundialstypes.h" //#include "shared/nvector_serial.h" #include "cvodes/cvodes.h" #include "cvodes/cvodes_impl.h" #include "cvodes/cvdense.h" #include "cvodes/cvdiag.h" #include "shared/dense.h" #include "ida/ida.h" #include "nonvintblock.h" extern "C" { extern double dt, t; #define nt_dt nrn_threads->_dt #define nt_t nrn_threads->_t extern int diam_changed; extern int secondorder; extern int linmod_extra_eqn_count(); extern int nrn_modeltype(); extern int nrn_use_selfqueue_; extern int use_cachevec; extern void nrn_cachevec(int); extern Point_process* ob2pntproc(Object*); extern void (*nrnthread_v_transfer_)(NrnThread*); extern void (*nrnmpi_v_transfer_)(); extern int cvode_active_; extern NetCvode* net_cvode_instance; extern short* nrn_is_artificial_; extern int structure_change_cnt; extern int diam_change_cnt; #if USENCS extern void nrn2ncs_netcons(); #endif //USENCS #if PARANEURON extern N_Vector N_VNew_Parallel(int comm, long int local_length, long int global_length); extern N_Vector N_VNew_NrnParallelLD(int comm, long int local_length, long int global_length); #endif } extern bool nrn_use_fifo_queue_; #if BBTQ == 5 extern bool nrn_use_bin_queue_; #endif #undef SUCCESS #define SUCCESS CV_SUCCESS // interface to oc static double solve(void* v) { NetCvode* d = (NetCvode*)v; double tstop = -1.; if (ifarg(1)) { tstop = *getarg(1); } tstopunset; int i = d->solve(tstop); tstopunset; if (i != SUCCESS) { hoc_execerror("variable step integrator error", 0); } t = nt_t; dt = nt_dt; return double(i); } static double statistics(void* v) { NetCvode* d = (NetCvode*)v; int i = -1; if (ifarg(1)) { i = (int)chkarg(1, -1, 1e6); } d->statistics(i); return 0.; } static double spikestat(void* v) { NetCvode* d = (NetCvode*)v; d->spike_stat(); return 0; } static double queue_mode(void* v) { #if BBTQ == 3 || BBTQ == 4 if (ifarg(1)) { nrn_use_fifo_queue_ = chkarg(1, 0, 1) ? true : false; } return double(nrn_use_fifo_queue_); #endif #if BBTQ == 5 if (ifarg(1)) { nrn_use_bin_queue_ = chkarg(1, 0, 1) ? true : false; } if (ifarg(2)) { #if NRNMPI nrn_use_selfqueue_ = chkarg(2, 0, 1) ? 1 : 0; #else if (chkarg(2, 0, 1)) { hoc_warning("CVode.queue_mode with second arg == 1 requires", "configuration --with-mpi or related"); } #endif } return double(nrn_use_bin_queue_ + 2*nrn_use_selfqueue_); #endif return 0.; } extern "C" { void nrn_extra_scatter_gather(int direction, int tid); } static double re_init(void* v) { if (cvode_active_) { NetCvode* d = (NetCvode*)v; d->re_init(t); }else{ nrn_extra_scatter_gather(1, 0); } return 0.; } static double rtol(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->rtol(chkarg(1, 0., 1e9)); } return d->rtol(); } static double nrn_atol(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->atol(chkarg(1, 0., 1e9)); d->structure_change(); } return d->atol(); } extern "C" { extern Symbol* hoc_get_last_pointer_symbol(); extern void hoc_symbol_tolerance(Symbol*, double); } static double abstol(void* v) { NetCvode* d = (NetCvode*)v; Symbol* sym; if (hoc_is_str_arg(1)) { sym = d->name2sym(gargstr(1)); }else{ hoc_pgetarg(1); sym = hoc_get_last_pointer_symbol(); if (!sym) { hoc_execerror("Cannot find the symbol associated with the pointer when called from Python", "Use a string instead of pointer argument"); } if (nrn_vartype(sym) != STATE && sym->u.rng.type != VINDEX) { hoc_execerror(sym->name, "is not a STATE"); } } if (ifarg(2)) { hoc_symbol_tolerance(sym, chkarg(2, 1e-30, 1e30)); d->structure_change(); } if (sym->extra && sym->extra->tolerance > 0.) { return sym->extra->tolerance; }else{ return 1.; } } static double active(void* v) { if (ifarg(1)) { cvode_active_ = (int)chkarg(1, 0, 1); if (cvode_active_) { NetCvode* d = (NetCvode*)v; d->re_init(nt_t); } } return cvode_active_; } static double stiff(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->stiff((int)chkarg(1, 0, 2)); } return double(d->stiff()); } static double maxorder(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->maxorder((int)chkarg(1, 0, 5)); } return d->maxorder(); } static double order(void* v) { NetCvode* d = (NetCvode*)v; int i = 0; if (ifarg(1)) { // only thread 0 i = int(chkarg(1, 0, d->p->nlcv_ - 1)); } int o = d->order(i); return double(o); } static double minstep(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->minstep(chkarg(1, 0., 1e9)); } return d->minstep(); } static double maxstep(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->maxstep(chkarg(1, 0., 1e9)); } return d->maxstep(); } static double jacobian(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { d->jacobian((int)chkarg(1, 0, 2)); } return double(d->jacobian()); } static double states(void* v) { NetCvode* d = (NetCvode*)v; d->states(); return 0.; } static double dstates(void* v) { NetCvode* d = (NetCvode*)v; d->dstates(); return 0.; } extern double nrn_hoc2fun(void* v); extern double nrn_hoc2scatter_y(void* v); extern double nrn_hoc2gather_y(void* v); extern double nrn_hoc2fixed_step(void* v); static double error_weights(void* v) { NetCvode* d = (NetCvode*)v; d->error_weights(); return 0.; } static double acor(void* v) { NetCvode* d = (NetCvode*)v; d->acor(); return 0.; } static double statename(void* v) { NetCvode* d = (NetCvode*)v; int i = (int)chkarg(1,0,1e9); int style = 1; if (ifarg(3)) { style = (int)chkarg(3, 0, 2); } hoc_assign_str(hoc_pgargstr(2), d->statename(i, style)); return 0.; } static double use_local_dt(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1, 0, 1); d->localstep(i); } return (double)d->localstep(); } static double use_daspk(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1, 0, 1); if ((i != 0) != d->use_daspk()) { d->use_daspk(i); } } return (double)d->use_daspk(); } static double dae_init_dteps(void* v) { if (ifarg(1)) { Daspk::dteps_ = chkarg(1, 1e-100, 1); } if (ifarg(2)) { Daspk::init_failure_style_ = (int)chkarg(2, 0, 013); } return Daspk::dteps_; } static double use_mxb(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1,0,1); if (use_sparse13 != i) { use_sparse13 = i; recalc_diam(); } } return (double) use_sparse13; } static double cache_efficient(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1,0,1); nrn_cachevec(i); } return (double) use_cachevec; } static double use_long_double(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1,0,1); d->use_long_double_ = i; recalc_diam(); } return (double)d->use_long_double_; } static double condition_order(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1,1,2); d->condition_order(i); } return (double) d->condition_order(); } static double debug_event(void* v) { NetCvode* d = (NetCvode*)v; if (ifarg(1)) { int i = (int)chkarg(1, 0, 10); d->print_event_ = i; } return (double)d->print_event_; } static double n_record(void* v) { NetCvode* d = (NetCvode*)v; d->vecrecord_add(); return 0.; } static double n_remove(void* v) { NetCvode* d = (NetCvode*)v; d->vec_remove(); return 0.; } static double simgraph_remove(void* v) { NetCvode* d = (NetCvode*)v; d->simgraph_remove(); return 0.; } static double state_magnitudes(void* v) { NetCvode* d = (NetCvode*)v; return d->state_magnitudes(); } static double tstop_event(void* v) { NetCvode* d = (NetCvode*)v; double x = *getarg(1); if (!cvode_active_) { // watch out for fixed step roundoff if x // close to n*dt double y = x/nrn_threads->_dt; if (y > 1 && fabs(floor(y + 1e-6) - y) < 1e-6) { //printf("reduce %g to avoid fixed step roundoff\n", x); x -= nrn_threads->_dt/4.; } } if (ifarg(2)) { Object* ppobj = nil; int reinit = 0; if (ifarg(3)) { ppobj = *hoc_objgetarg(3); if (!ppobj || ppobj->ctemplate->is_point_ <= 0 || nrn_is_artificial_[ob2pntproc(ppobj)->prop->type] ){ hoc_execerror(hoc_object_name(ppobj), "is not a POINT_PROCESS"); } reinit = int(chkarg(4, 0, 1)); } if (hoc_is_object_arg(2)) { d->hoc_event(x, nil, ppobj, reinit, *hoc_objgetarg(2)); }else{ d->hoc_event(x, gargstr(2), ppobj, reinit); } }else{ //d->tstop_event(x); d->hoc_event(x, 0, 0, 0); } return x; } static double current_method(void* v) { NetCvode* d = (NetCvode*)v; int modeltype = nrn_modeltype(); int methodtype = secondorder; // 0, 1, or 2 int localtype = 0; if (cvode_active_) { methodtype = 3; if (d->use_daspk()) { methodtype = 4; }else{ localtype = d->localstep(); } } return double( modeltype + 10*use_sparse13 + 100*methodtype + 1000*localtype ); } static double peq(void* v) { NetCvode* d = (NetCvode*)v; d->print_event_queue(); return 1.; } static double event_queue_info(void* v) { NetCvode* d = (NetCvode*)v; d->event_queue_info(); return 1.; } static double store_events(void* v) { NetCvode* d = (NetCvode*)v; d->vec_event_store(); return 1.; } static Object** netconlist(void* v) { NetCvode* d = (NetCvode*)v; return d->netconlist(); } static double ncs_netcons(void* v) { #if USENCS nrn2ncs_netcons(); #endif return 0.; } // for testing when there is actually no pc.transfer or pc.multisplit present // forces the global step to be truly global across processors. static double use_parallel(void* v) { #if PARANEURON // assume single thread and global step NetCvode* d = (NetCvode*)v; assert(d->gcv_); d->gcv_->use_partrans_ = true; d->structure_change(); return 1.0; #else return 0.0; #endif } static double nrn_structure_change_count(void* v) { return double(structure_change_cnt); } static double nrn_diam_change_count(void* v) { return double(diam_change_cnt); } extern "C" { int (*nrnpy_pysame)(Object*, Object*); extern int (*nrnpy_hoccommand_exec)(Object*); } declarePtrList(ExtraScatterList, Object) implementPtrList(ExtraScatterList, Object) static ExtraScatterList* extra_scatterlist[2]; // 0 scatter, 1 gather void nrn_extra_scatter_gather(int direction, int tid) { ExtraScatterList* esl = extra_scatterlist[direction]; if (esl) { nrn_thread_error("extra_scatter_gather not allowed with multiple threads"); for (int i=0; i < esl->count(); ++i) { Object* callable = esl->item(i); if (!(*nrnpy_hoccommand_exec)(callable)) { hoc_execerror("extra_scatter_gather runtime error", 0); } } } } static double extra_scatter_gather(void* v) { int direction = int(chkarg(1, 0, 1)); Object* o = *hoc_objgetarg(2); check_obj_type(o, "PythonObject"); ExtraScatterList* esl = extra_scatterlist[direction]; if (!esl) { esl = new ExtraScatterList(2); extra_scatterlist[direction] = esl; } esl->append(o); hoc_obj_ref(o); return 0.; } static double extra_scatter_gather_remove(void* v) { Object* o = *hoc_objgetarg(1); for (int direction=0; direction < 2; ++direction) { ExtraScatterList* esl = extra_scatterlist[direction]; if (esl) for (int i = esl->count()-1; i >= 0; --i) { Object* o1 = esl->item(i); // if esl exists then python exists if ((*nrnpy_pysame)(o, o1)) { esl->remove(i); hoc_obj_unref(o1); } } } return 0.; } static double use_fast_imem(void* v) { int i = nrn_use_fast_imem; if (ifarg(1)) { nrn_use_fast_imem = int(chkarg(1, 0., 1.)); nrn_fast_imem_alloc(); } return double(i); } static Member_func members[] = { "solve", solve, "atol", nrn_atol, "rtol", rtol, "re_init", re_init, "stiff", stiff, "active", active, "maxorder", maxorder, "minstep", minstep, "maxstep", maxstep, "jacobian", jacobian, "states", states, "dstates", dstates, "error_weights", error_weights, "acor", acor, "statename", statename, "atolscale", abstol, "use_local_dt", use_local_dt, "record", n_record, "record_remove", n_remove, "debug_event", debug_event, "order", order, "use_daspk", use_daspk, "event", tstop_event, "current_method", current_method, "use_mxb", use_mxb, "print_event_queue", peq, "event_queue_info", event_queue_info, "store_events", store_events, "condition_order", condition_order, "dae_init_dteps", dae_init_dteps, "simgraph_remove", simgraph_remove, "state_magnitudes", state_magnitudes, "ncs_netcons", ncs_netcons, "statistics", statistics, "spike_stat", spikestat, "queue_mode", queue_mode, "cache_efficient", cache_efficient, "use_long_double", use_long_double, "use_parallel", use_parallel, "f", nrn_hoc2fun, "yscatter", nrn_hoc2scatter_y, "ygather", nrn_hoc2gather_y, "fixed_step", nrn_hoc2fixed_step, "structure_change_count", nrn_structure_change_count, "diam_change_count", nrn_diam_change_count, "extra_scatter_gather", extra_scatter_gather, "extra_scatter_gather_remove", extra_scatter_gather_remove, "use_fast_imem", use_fast_imem, 0,0 }; static Member_ret_obj_func omembers[] = { "netconlist", netconlist, 0, 0 }; static void* cons(Object*) { #if 0 NetCvode* d; if (net_cvode_instance) { hoc_execerror("Only one CVode instance allowed", 0); }else{ d = new NetCvode(1); net_cvode_instance = d; } active(nil); return (void*) d; #else return (void*)net_cvode_instance; #endif } static void destruct(void* v) { #if 0 NetCvode* d = (NetCvode*)v; cvode_active_ = 0; delete d; #endif } void Cvode_reg() { class2oc("CVode", cons, destruct, members, NULL, omembers, NULL); net_cvode_instance = new NetCvode(1); Daspk::dteps_ = 1e-9; // change with cvode.dae_init_dteps(newval) } /* Functions Called by the CVODE Solver */ static int minit(CVodeMem cv_mem); static int msetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp, N_Vector vtemp2, N_Vector vtemp3); static int msolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur); static int msolve_lvardt(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur); static void mfree(CVodeMem cv_mem); static void f_gvardt(realtype t, N_Vector y, N_Vector ydot, void *f_data); static void f_lvardt(realtype t, N_Vector y, N_Vector ydot, void *f_data); static CVRhsFn pf_; static void* msetup_thread(NrnThread*); static void* msolve_thread(NrnThread*); static void* msolve_thread_part1(NrnThread*); static void* msolve_thread_part2(NrnThread*); static void* msolve_thread_part3(NrnThread*); static void* f_thread(NrnThread*); static void* f_thread_transfer_part1(NrnThread*); static void* f_thread_transfer_part2(NrnThread*); static void* f_thread_ms_part1(NrnThread*); static void* f_thread_ms_part2(NrnThread*); static void* f_thread_ms_part3(NrnThread*); static void* f_thread_ms_part4(NrnThread*); static void* f_thread_ms_part34(NrnThread*); Cvode::Cvode(NetCvode* ncv) { cvode_constructor(); ncv_ = ncv; } Cvode::Cvode() { cvode_constructor(); } void Cvode::cvode_constructor() { nthsizes_ = nil; nth_ = nil; ncv_ = nil; ctd_ = nil; tqitem_ = nil; mem_ = nil; #if NEOSIMorNCS neosim_self_events_ = nil; #endif initialize_ = false; can_retreat_ = false; tstop_begin_ = 0.; tstop_end_ = 0.; use_daspk_ = false; daspk_ = nil; mem_ = nil; y_ = nil; atolnvec_ = nil; maxstate_ = nil; maxacor_ = nil; neq_ = 0; structure_change_ = true; #if PARANEURON use_partrans_ = false; global_neq_ = 0; opmode_ = 0; #endif } double Cvode::gam() { if (mem_) { return ((CVodeMem)mem_)->cv_gamma; }else{ return 1.; } } double Cvode::h() { if (mem_) { return ((CVodeMem)mem_)->cv_h; }else{ return 0.; } } bool Cvode::at_time(double te, NrnThread* nt) { if (initialize_) { //printf("%d at_time initialize te=%g te-t0_=%g next_at_time_=%g\n", nt->id, te, te-t0_, next_at_time_); MUTLOCK if (t0_ < te && te < next_at_time_) { //printf("%d next_at_time_=%g since te-t0_=%15.10g and next_at_time_-te=%g\n", nt->id, te, te-nt->_t, next_at_time_-te); next_at_time_ = te; } MUTUNLOCK if (MyMath::eq(te, t0_, NetCvode::eps(t0_))) { //printf("at_time te=%g t-te=%g return 1\n", te, t - te); return 1; } return 0; } // No at_time event is inside our allowed integration interval. // such an event would be unhandled. It would be an error for // a model description to dynamically compute such an event. // The policy is strict that during at_time // event handling the next at_time event is known so that // the stop time can be set. This could be relaxed // only to the extent that whatever at_time is computed is // beyond the current step. if (nt->_vcv) { if (te <= tstop_ && te > t0_) { printf("te=%g t0_=%g tn_=%g t_=%g t=%g\n", te, t0_, tn_, t_, nt_t); printf("te-t0_=%g tstop_-te=%g\n", te - t0_, tstop_ - te); } assert( te > tstop_ || te <= t0_); } return 0; } void Cvode::set_init_flag() { //printf("set_init_flag t_=%g prior2init_=%d\n", t_, prior2init_); initialize_ = true; if (cvode_active_ && ++prior2init_ == 1) { record_continuous(); } } N_Vector Cvode::nvnew(long int n) { #if PARANEURON if (use_partrans_) { if (net_cvode_instance->use_long_double_) { return N_VNew_NrnParallelLD(0, n, global_neq_); }else{ return N_VNew_Parallel(0, n, global_neq_); } } #endif if (nctd_ > 1) { assert(n == neq_); if (!nthsizes_) { nthsizes_ = new long int[nrn_nthread]; for (int i = 0; i < nrn_nthread; ++i) { nthsizes_[i] = ctd_[i].nvsize_; } } #if 1 int sum = 0; for (int i=0; i < nctd_; ++i) { sum += nthsizes_[i];} assert(sum == neq_); #endif if (net_cvode_instance->use_long_double_) { return N_VNew_NrnThreadLD(n, nctd_, nthsizes_); }else{ return N_VNew_NrnThread(n, nctd_, nthsizes_); } } if (net_cvode_instance->use_long_double_) { return N_VNew_NrnSerialLD(n); }else{ return N_VNew_Serial(n); } } void Cvode::atolvec_alloc(int i) { if (i > 0) { // too bad the machEnv has to be done here but this is // the first and it depends on size // the call chain is init_prepare (frees) -> init_eqn -> here atolnvec_ = nvnew(i); } } Cvode::~Cvode() { #if NEOSIMorNCS if (neosim_self_events_) { delete neosim_self_events_; } #endif if (daspk_) { delete daspk_; } if (y_) { N_VDestroy(y_); } if (atolnvec_) { N_VDestroy(atolnvec_); } if (mem_) { CVodeFree(mem_); } if (maxstate_) { N_VDestroy(maxstate_); N_VDestroy(maxacor_); } if (nthsizes_) { delete [] nthsizes_; } // delete [] iopt_; // delete [] ropt_; } void Cvode::stat_init() { advance_calls_ = interpolate_calls_ = init_calls_ = 0; ts_inits_ = f_calls_ = mxb_calls_ = jac_calls_ = 0; Daspk::first_try_init_failures_ = 0; } void Cvode::init_prepare() { if (init_global()) { if (y_) { N_VDestroy(y_); y_ = nil; } if (mem_) { CVodeFree(mem_); mem_ = nil; } if (atolnvec_) { N_VDestroy(atolnvec_); atolnvec_ = nil; } if (daspk_) { delete daspk_; daspk_ = nil; } init_eqn(); if (neq_ > 0) { y_ = nvnew(neq_); if (use_daspk_) { alloc_daspk(); }else{ alloc_cvode(); } if (maxstate_) { activate_maxstate(false); activate_maxstate(true); } } } } void Cvode::activate_maxstate(bool on) { if (maxstate_) { N_VDestroy(maxstate_); N_VDestroy(maxacor_); maxstate_ = nil; maxacor_ = nil; } if (on && neq_ > 0) { int i; maxstate_ = nvnew(neq_); maxacor_ = nvnew(neq_); N_VConst(0.0, maxstate_); N_VConst(0.0, maxacor_); } } static bool maxstate_b; static Cvode* maxstate_cv; static void* maxstate_thread(NrnThread* nt) { maxstate_cv->maxstate(maxstate_b, nt); return 0; } void Cvode::maxstate(bool b, NrnThread* nt) { if (!maxstate_) { return; } if (!nt) { if (nrn_nthread > 1) { maxstate_cv = this; maxstate_b = b; nrn_multithread_job(maxstate_thread); return; } nt = nrn_threads; } CvodeThreadData& z = ctd_[nt->id]; int i; double x; double* y = n_vector_data(y_, nt->id); double* m = n_vector_data(maxstate_, nt->id); for (i=0; i < z.nvsize_; ++i) { x = Math::abs(y[i]); if (m[i] < x) { m[i] = x; } } if (b) { y = n_vector_data(acorvec(), nt->id); m = n_vector_data(maxacor_, nt->id); for (i=0; i < z.nvsize_; ++i) { x = Math::abs(y[i]); if (m[i] < x) { m[i] = x; } } } } void Cvode::maxstate(double* pd) { int i; NrnThread* nt; if (maxstate_) { FOR_THREADS(nt) { double* m = n_vector_data(maxstate_, nt->id); int n = ctd_[nt->id].nvsize_; int o = ctd_[nt->id].nvoffset_; for (i=0; i < n; ++i) { pd[i+o] = m[i]; } } } } void Cvode::maxacor(double* pd) { int i; NrnThread* nt; if (maxacor_) { FOR_THREADS(nt) { double* m = n_vector_data(maxacor_, nt->id); int n = ctd_[nt->id].nvsize_; int o = ctd_[nt->id].nvoffset_; for (i=0; i < n; ++i) { pd[i+o] = m[i]; } } } } void Cvode::alloc_cvode() { } int Cvode::order() { int i = 0; if (use_daspk_) { if (daspk_->mem_) { IDAGetLastOrder(daspk_->mem_, &i); } }else{ if (mem_) { CVodeGetLastOrder(mem_, &i); } } return i; } void Cvode::maxorder(int maxord) { if (use_daspk_) { if (daspk_->mem_) { IDASetMaxOrd(daspk_->mem_, maxord); } }else{ if (mem_) { CVodeSetMaxOrd(mem_, maxord); } } } void Cvode::minstep(double x) { if (mem_) { if (x > 0.) { CVodeSetMinStep(mem_, x); }else{ // CVodeSetMinStep requires x > 0 but // HMIN_DEFAULT is ZERO in cvodes.c ((CVodeMem)mem_)->cv_hmin = 0.; } } } void Cvode::maxstep(double x) { if (use_daspk_) { if (daspk_->mem_) { IDASetMaxStep(daspk_->mem_, x); } }else{ if (mem_) { CVodeSetMaxStep(mem_, x); } } } void Cvode::free_cvodemem() { if (mem_) { CVodeFree(mem_); mem_ = nil; } } void NetCvode::set_CVRhsFn() { MUTDESTRUCT if (single_) { pf_ = f_gvardt; if (nrn_nthread > 1) { MUTCONSTRUCT(1) } }else{ pf_ = f_lvardt; } } int Cvode::cvode_init(double) { int iter; int err = SUCCESS; // note, a change in stiff_ due to call of stiff() destroys mem_ gather_y(y_); // TODO: this needs changed if want to support more than one thread or local variable timestep nrn_nonvint_block_ode_reinit(neq_, N_VGetArrayPointer(y_), 0); if (mem_) { err = CVodeReInit(mem_, pf_, t0_, y_, CV_SV, &ncv_->rtol_, atolnvec_); CVodeSetFdata(mem_, (void*)this); //printf("CVodeReInit\n"); if (err != SUCCESS){ printf("Cvode %p %s CVReInit error %d\n", this, secname(ctd_[0].v_node_[ctd_[0].rootnodecount_]->sec), err); return err; } }else{ mem_ = CVodeCreate(CV_BDF, ncv_->stiff() ? CV_NEWTON : CV_FUNCTIONAL); if (!mem_){ hoc_execerror ("CVodeCreate error", 0); } CVodeMalloc(mem_, pf_, t0_, y_, CV_SV, &ncv_->rtol_, atolnvec_); CVodeSetFdata(mem_, (void*)this); if (err != SUCCESS){ printf("Cvode %p %s CVodeMalloc error %d\n", this, secname(ctd_[0].v_node_[ctd_[0].rootnodecount_]->sec), err); return err; } maxorder(ncv_->maxorder()); minstep(ncv_->minstep()); maxstep(ncv_->maxstep()); // CVodeSetInitStep(mem_, .01); } matmeth(); ((CVodeMem)mem_)->cv_gamma = 0.; ((CVodeMem)mem_)->cv_h = 0.; // fun called before cvode sets this (though fun does not need it really) //fun(t_, N_VGetArrayPointer(y_), nil); (*pf_)(t_, y_, nil, (void*)this); can_retreat_ = false; return err; } int Cvode::daspk_init(double tout) { return daspk_->init(); } void Cvode::alloc_daspk() { //printf("Cvode::alloc_daspk\n"); daspk_ = new Daspk(this, neq_); // we do our own initialization since it is hard to // figure out which equations are algebraic and which // differential. eg. the no cap nodes can have a // circuit with capacitance connection. Extracellular // nodes may or may not have capacitors to ground. } int Cvode::advance_tn() { int err = SUCCESS; if (neq_ == 0) { t_ += 1e9; if (nth_) { nth_->_t = t_; } else { nt_t = t_; } tn_ = t_; return err; } //printf("%d Cvode::advance_tn enter t_=%.20g t0_=%.20g tstop_=%.20g\n", nrnmpi_myid, t_, t0_, tstop_); if (t_ >= tstop_ - NetCvode::eps(t_)) { //printf("init\n"); ++ts_inits_; tstop_begin_ = tstop_; tstop_end_ = tstop_ + 1.5*NetCvode::eps(tstop_); err = init(tstop_end_); // the above 1.5 is due to the fact that at_time will check // to see if the time is greater but not greater than eps*t0_ // of the at_time for a return of 1. can_retreat_ = false; }else{ ++advance_calls_; // SOLVE after_cvode now interpreted as before cvode since // a step may be abandoned in part by interpolate in response // to events. Now at least the value of t is monotonic if (nth_) { nth_->_t = t_; } else { nt_t = t_; } do_nonode(nth_); #if PARANEURON opmode_ = 1; #endif if (use_daspk_) { err = daspk_advance_tn(); }else{ err = cvode_advance_tn(); } can_retreat_ = true; maxstate(true); } //printf("%d Cvode::advance_tn exit t_=%.20g t0_=%.20g tstop_=%.20g\n", nrnmpi_myid, t_, t0_, tstop_); return err; } int Cvode::solve() { //printf("%d Cvode::solve %p initialize = %d current_time=%g tn=%g\n", nrnmpi_myid, this, initialize_, t_, tn()); int err = SUCCESS; if (initialize_) { if (t_ >= tstop_ - NetCvode::eps(t_)) { ++ts_inits_; tstop_begin_ = tstop_; tstop_end_ = tstop_ + 1.5*NetCvode::eps(tstop_); err = init(tstop_end_); can_retreat_ = false; }else{ err = init(t_); } }else{ err = advance_tn(); } //printf("Cvode::solve exit %p current_time=%g tn=%g\n", this, t_, tn()); return err; } int Cvode::init(double tout) { int err = SUCCESS; ++init_calls_; //printf("%d Cvode_%p::init tout=%g\n", nrnmpi_myid, this, tout); initialize_ = true; t_ = tout; t0_ = t_; tn_ = t_; next_at_time_ = t_ + 1e5; init_prepare(); if (neq_) { #if PARANEURON opmode_ = 3; #endif if (use_daspk_) { err = daspk_init(t_); }else{ err = cvode_init(t_); } } tstop_ = next_at_time_ - NetCvode::eps(next_at_time_); #if PARANEURON if (use_partrans_) { tstop_ = nrnmpi_dbl_allmin(tstop_); } #endif //printf("Cvode::init next_at_time_=%g tstop_=%.15g\n", next_at_time_, tstop_); initialize_ = false; prior2init_ = 0; maxstate(false); return err; } int Cvode::interpolate(double tout) { NrnThread* _nt; if (neq_ == 0) { t_ = tout; if (nth_) { nth_->_t = t_; }else{ FOR_THREADS(_nt) { _nt->_t = t_; } } return SUCCESS; } //printf("Cvode::interpolate t_=%.15g t0_=%.15g tn_=%.15g tstop_=%.15g\n", t_, t0_, tn_, tstop_); if (!can_retreat_) { // but must be within the initialization domain assert (MyMath::le(tout, t_, 2.*NetCvode::eps(t_))); if (nth_) { // lvardt nth_->_t = tout; }else{ FOR_THREADS(_nt) { _nt->_t = tout; // but leave t_ at the initialization point. } } // printf("no interpolation for event in the initialization interval t=%15g t_=%15g\n", nrn_threads->t, t_); return SUCCESS; } if (MyMath::eq(tout, t_, NetCvode::eps(t_))) { t_ = tout; return SUCCESS; } //if (initialize_) { //printf("Cvode_%p::interpolate assert error when initialize_ is true.\n t_=%g tout=%g tout-t_ = %g\n", this, t_, tout, tout-t_); //} assert(initialize_ == false); // or state discontinuity can be lost //printf("interpolate t_=%g tout=%g delta t_-tout=%g\n", t_, tout, t_-tout); #if 1 if (tout < t0_) { // if (tout < t0_ - NetCvode::eps(t0_)) { // t0_ not always == tn_ - h // after a CV_ONESTEP_TSTOP // so allow some fudge before printing error // The fudge case was avoided by returning from the // Cvode::handle_step when a first order condition check // puts an event on the queue equal to t_ printf("Cvode::interpolate assert error t0=%g tout-t0=%g eps*t_=%g\n", t0_, tout-t0_, NetCvode::eps(t_)); // } tout = t0_; } if (tout > tn_) { printf("Cvode::interpolate assert error tn=%g tn-tout=%g eps*t_=%g\n", tn_, tn_-tout, NetCvode::eps(t_)); tout = tn_; } #endif // if there is a problem here it may be due to the at_time skipping interval // since the integration will not go past tstop_ and will take up at tstop+2eps // see the Cvode::advance_tn() implementation assert( tout >= t0() && tout <= tn()); ++interpolate_calls_; #if PARANEURON opmode_ = 2; #endif if (use_daspk_) { return daspk_->interpolate(tout); }else{ return cvode_interpolate(tout); } } int Cvode::cvode_advance_tn() { #if PRINT_EVENT if (net_cvode_instance->print_event_ > 1) { printf("Cvode::cvode_advance_tn %p %d initialize_=%d tstop=%.20g t_=%.20g to ", this, nth_?nth_->id:0, initialize_, tstop_, t_); } #endif CVodeSetStopTime(mem_, tstop_); //printf("cvode_advance_tn begin t0_=%g t_=%g tn_=%g tstop=%g\n", t0_, t_, tn_, tstop_); int err = CVode(mem_, tstop_, y_, &t_, CV_ONE_STEP_TSTOP); #if PRINT_EVENT if (net_cvode_instance->print_event_ > 1) { printf("t_=%.20g\n", t_); } #endif if (err < 0 ) { printf("CVode %p %s advance_tn failed, err=%d.\n", this, secname(ctd_[0].v_node_[ctd_[0].rootnodecount_]->sec), err); (*pf_)(t_, y_, nil, (void*)this); return err; } // this is very bad, performance-wise. However cvode modifies its states // after a call to fun with the proper t. #if 1 (*pf_)(t_, y_, nil, (void*)this); #else NrnThread* _nt; scatter_y(y_); #endif tn_ = ((CVodeMem)mem_)->cv_tn; t0_ = tn_ - ((CVodeMem)mem_)->cv_h; //printf("t=%.15g t_=%.15g tn()=%.15g tstop_=%.15g t0_=%.15g\n", nrn_threads->t, t_, tn(), tstop_, t0_); // printf("t_=%g h=%g q=%d y=%g\n", t_, ((CVodeMem)mem_)->cv_h, ((CVodeMem)mem_)->cv_q, N_VIth(y_,0)); //printf("cvode_advance_tn end t0_=%g t_=%g tn_=%g\n", t0_, t_, tn_); return SUCCESS; } int Cvode::cvode_interpolate(double tout) { #if PRINT_EVENT if (net_cvode_instance->print_event_ > 1) { printf("Cvode::cvode_interpolate %p %d initialize_%d t=%.20g to ", this, nth_?nth_->id:0, initialize_, t_); } #endif // avoid CVode-- tstop = 0.5 is behind current t = 0.5 // is this really necessary anymore. Maybe NORMAL mode ignores tstop CVodeSetStopTime(mem_, tstop_ + tstop_); int err = CVode(mem_, tout, y_, &t_, CV_NORMAL); #if PRINT_EVENT if (net_cvode_instance->print_event_ > 1) { printf("%.20g\n", t_); } #endif if (err < 0) { printf("CVode %p %s interpolate failed, err=%d.\n", this, secname(ctd_[0].v_node_[ctd_[0].rootnodecount_]->sec), err); return err; } (*pf_)(t_, y_, nil, (void*)this); // printf("t_=%g h=%g q=%d y=%g\n", t_, ((CVodeMem)mem_)->cv_h, ((CVodeMem)mem_)->cv_q, N_VIth(y_,0)); return SUCCESS; } int Cvode::daspk_advance_tn() { int flag, err; double tin; //printf("Cvode::solve test stop time t=%.20g tstop-t=%g\n", t, tstop_-t); //printf("in Cvode::solve t_=%g tstop=%g calling daspk_->solve(%g)\n", t_, tstop_, daspk_->tout_); err = daspk_->advance_tn(tstop_); //printf("in Cvode::solve returning from daspk_->solve t_=%g initialize_=%d tstop=%g\n", t_, initialize__, tstop_); if (err < 0) { return err; } return SUCCESS; } N_Vector Cvode::ewtvec() { if (use_daspk_) { return daspk_->ewtvec(); }else{ return ((CVodeMem)mem_)->cv_ewt; } } N_Vector Cvode::acorvec() { if (use_daspk_) { return daspk_->acorvec(); }else{ return ((CVodeMem)mem_)->cv_acor; } } void Cvode::statistics() { #if 1 printf("\nCvode instance %p %s statistics : %d %s states\n", this, secname(ctd_[0].v_node_[ctd_[0].rootnodecount_]->sec), neq_, (use_daspk_ ? "IDA" : "CVode")); printf(" %d advance_tn, %d interpolate, %d init (%d due to at_time)\n", advance_calls_, interpolate_calls_, init_calls_, ts_inits_); printf(" %d function evaluations, %d mx=b solves, %d jacobian setups\n", f_calls_, mxb_calls_, jac_calls_); if (use_daspk_) { daspk_->statistics(); return; } #else printf("\nCVode Statistics.. \n\n"); printf("internal steps = %d\nfunction evaluations = %d\n", iopt_[NST], iopt_[NFE]); printf("newton iterations = %d setups = %d\n nonlinear convergence failures = %d\n\ local error test failures = %ld\n", iopt_[NNI], iopt_[NSETUPS], iopt_[NCFN], iopt_[NETF]); printf("order=%d stepsize=%g\n", iopt_[QU], h()); #endif } void Cvode::matmeth() { switch ( ncv_->jacobian() ) { case 1: CVDense(mem_, neq_); break; case 2: CVDiag(mem_); break; default: ((CVodeMem)mem_)->cv_linit = minit; ((CVodeMem)mem_)->cv_lsetup = msetup; ((CVodeMem)mem_)->cv_setupNonNull = TRUE; // but since our's does not do anything... if (nth_) { // lvardt ((CVodeMem)mem_)->cv_lsolve = msolve_lvardt; }else{ ((CVodeMem)mem_)->cv_lsolve = msolve; } ((CVodeMem)mem_)->cv_lfree = mfree; break; } } static int minit(CVodeMem) { // printf("minit\n"); return CV_NO_FAILURES; } static int msetup(CVodeMem m, int convfail, N_Vector yp, N_Vector fp, booleantype* jcurPtr, N_Vector, N_Vector, N_Vector) { // printf("msetup\n"); *jcurPtr = true; Cvode* cv = (Cvode*)m->cv_f_data; return cv->setup(yp, fp); } static N_Vector msolve_b_; static N_Vector msolve_ycur_; static Cvode* msolve_cv_; static int msolve(CVodeMem m, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur) { // printf("msolve gamma=%g gammap=%g gamrat=%g\n", m->cv_gamma, m->cv_gammap, m->cv_gamrat); // N_VIth(b, 0) /= (1. + m->cv_gamma); // N_VIth(b, 0) /= (1. + m->cv_gammap); // N_VIth(b,0) *= 2./(1. + m->cv_gamrat); msolve_cv_ = (Cvode*)m->cv_f_data; Cvode& cv = *msolve_cv_; ++cv.mxb_calls_; if (cv.ncv_->stiff() == 0) { return 0; } if (cv.gam() == 0.) { return 0; } // i.e. (I - gamma * J)*x = b means x = b msolve_b_ = b; msolve_ycur_ = ycur; if (nrn_multisplit_setup_ && nrn_nthread > 1) { nrn_multithread_job(msolve_thread_part1); nrn_multithread_job(msolve_thread_part2); nrn_multithread_job(msolve_thread_part3); }else{ nrn_multithread_job(msolve_thread); } return 0; } static int msolve_lvardt(CVodeMem m, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur) { Cvode* cv = (Cvode*)m->cv_f_data; ++cv->mxb_calls_; if (cv->ncv_->stiff() == 0) { return 0; } if (cv->gam() == 0.) { return 0; } cv->nth_->_vcv = cv; cv->solvex_thread(cv->n_vector_data(b, 0), cv->n_vector_data(ycur, 0), cv->nth_); cv->nth_->_vcv = 0; return 0; } static void* msolve_thread(NrnThread* nt) { int i = nt->id; Cvode* cv = msolve_cv_; nt->_vcv = cv; cv->solvex_thread(cv->n_vector_data(msolve_b_, i), cv->n_vector_data(msolve_ycur_, i), nt); nt->_vcv = 0; return 0; } static void* msolve_thread_part1(NrnThread* nt) { int i = nt->id; Cvode* cv = msolve_cv_; nt->_vcv = cv; cv->solvex_thread_part1(cv->n_vector_data(msolve_b_, i), nt); return 0; } static void* msolve_thread_part2(NrnThread* nt) { int i = nt->id; Cvode* cv = msolve_cv_; cv->solvex_thread_part2(nt); return 0; } static void* msolve_thread_part3(NrnThread* nt) { int i = nt->id; Cvode* cv = msolve_cv_; cv->solvex_thread_part3(cv->n_vector_data(msolve_b_, i), nt); nt->_vcv = 0; return 0; } static void mfree(CVodeMem) { // printf("mfree\n"); } static realtype f_t_; static N_Vector f_y_; static N_Vector f_ydot_; static Cvode* f_cv_; static void f_gvardt(realtype t, N_Vector y, N_Vector ydot, void *f_data) { //ydot[0] = -y[0]; // N_VIth(ydot, 0) = -N_VIth(y, 0); //printf("f(%g, %p, %p)\n", t, y, ydot); f_cv_ = (Cvode*)f_data; ++f_cv_->f_calls_; f_t_ = t; f_y_ = y; f_ydot_ = ydot; if (nrn_nthread > 1 || nrnmpi_numprocs > 1) { if (nrn_multisplit_setup_) { nrn_multithread_job(f_thread_ms_part1); nrn_multithread_job(f_thread_ms_part2); if (nrnthread_v_transfer_) { nrn_multithread_job(f_thread_ms_part3); if (nrnmpi_v_transfer_) { (*nrnmpi_v_transfer_)(); } nrn_multithread_job(f_thread_ms_part4); }else{ nrn_multithread_job(f_thread_ms_part34); } }else if (nrnthread_v_transfer_) { nrn_multithread_job(f_thread_transfer_part1); if (nrnmpi_v_transfer_) { (*nrnmpi_v_transfer_)(); } nrn_multithread_job(f_thread_transfer_part2); }else{ nrn_multithread_job(f_thread); } }else{ nrn_multithread_job(f_thread); } } static void f_lvardt(realtype t, N_Vector y, N_Vector ydot, void *f_data) { Cvode* cv = (Cvode*)f_data; ++cv->f_calls_; cv->nth_->_vcv = cv; cv->fun_thread(t, cv->n_vector_data(y, 0), cv->n_vector_data(ydot, 0), cv->nth_); cv->nth_->_vcv = 0; } static void* f_thread(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; nt->_vcv = cv; cv->fun_thread(f_t_, cv->n_vector_data(f_y_, i), cv->n_vector_data(f_ydot_, i), nt); nt->_vcv = 0; return 0; } static void* f_thread_transfer_part1(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; nt->_vcv = cv; cv->fun_thread_transfer_part1(f_t_, cv->n_vector_data(f_y_, i), nt); return 0; } static void* f_thread_transfer_part2(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; cv->fun_thread_transfer_part2(cv->n_vector_data(f_ydot_, i), nt); nt->_vcv = 0; return 0; } static void* f_thread_ms_part1(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; nt->_vcv = cv; cv->fun_thread_ms_part1(f_t_, cv->n_vector_data(f_y_, i), nt); return 0; } static void* f_thread_ms_part2(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; cv->fun_thread_ms_part2(nt); return 0; } static void* f_thread_ms_part3(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; cv->fun_thread_ms_part3(nt); return 0; } static void* f_thread_ms_part4(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; cv->fun_thread_ms_part4(cv->n_vector_data(f_ydot_, i), nt); return 0; } static void* f_thread_ms_part34(NrnThread* nt) { int i = nt->id; Cvode* cv = f_cv_; cv->fun_thread_ms_part34(cv->n_vector_data(f_ydot_, i), nt); nt->_vcv = 0; return 0; } neuron-7.5/src/nrncvode/cvodeobj.h000066400000000000000000000147621323325274500172640ustar00rootroot00000000000000#ifndef cvodeobj_h #define cvodeobj_h #include "nrnmpi.h" #include "nrnneosm.h" //#include "shared/nvector_serial.h" #include "shared/nvector.h" #include "membfunc.h" class NetCvode; class Daspk; class TQItem; class TQueue; class PreSynList; struct BAMech; struct NrnThread; class PlayRecList; class PlayRecord; class STEList; class HTList; class CvMembList { public: CvMembList(); virtual ~CvMembList(); CvMembList* next; Memb_list* ml; int index; }; class BAMechList { public: BAMechList(BAMechList** first); BAMechList* next; BAMech* bam; Memb_list* ml; int* indices; // if nil then all in ml int cnt; // number of indices if non nil static void destruct(BAMechList** first); static void alloc(BAMechList* first); }; #define CTD(i) ctd_[((nctd_ > 1) ? (i) : 0)] class CvodeThreadData { public: CvodeThreadData(); virtual ~CvodeThreadData(); void delete_memb_list(CvMembList*); int no_cap_count_; // number of nodes with no capacitance int no_cap_child_count_; Node** no_cap_node_; Node** no_cap_child_; // connected to nodes that have no capacitance CvMembList* cv_memb_list_; CvMembList* cmlcap_; CvMembList* cmlext_; // used only by daspk CvMembList* no_cap_memb_; // used only by cvode, point processes in the no cap nodes BAMechList* before_breakpoint_; BAMechList* after_solve_; BAMechList* before_step_; int rootnodecount_; int v_node_count_; Node** v_node_; Node** v_parent_; PreSynList* psl_th_; // with a threshold HTList* watch_list_; STEList* ste_list_; double** pv_; double** pvdot_; int nvoffset_; // beginning of this threads states int nvsize_; // total number of states for this thread int neq_v_; //for daspk, number of voltage states for this thread int nonvint_offset_; // synonym for neq_v_. Beginning of this threads nonvint variables. int nonvint_extra_offset_; // extra states (probably Python). Not scattered or gathered. PlayRecList* record_; PlayRecList* play_; }; class Cvode { public: Cvode(NetCvode*); Cvode(); virtual ~Cvode(); virtual int handle_step(NetCvode*, double); virtual int init(double t); virtual int advance_tn(); virtual int interpolate(double t); virtual double tn() { return tn_;} // furthest time of advance virtual double t0() { return t0_;} // beginning of last real step void init_prepare(); int solve(); // checks event_flag and init or advance_tn void statistics(); double gam(); double time() const { return t_; } void free_cvodemem(); int order(); void maxorder(int), minstep(double), maxstep(double); public: double tn_, t0_, t_; bool initialize_; bool can_retreat_; // only true after an integration step // statistics void stat_init(); int advance_calls_, interpolate_calls_, init_calls_; int f_calls_, mxb_calls_, jac_calls_, ts_inits_; private: void alloc_cvode(); void alloc_daspk(); int cvode_init(double); int cvode_advance_tn(); int cvode_interpolate(double); int daspk_init(double); int daspk_advance_tn(); int daspk_interpolate(double); public: N_Vector nvnew(long); int setup(N_Vector ypred, N_Vector fpred); int solvex_thread(double* b, double* y, NrnThread* nt); int solvex_thread_part1(double* b, NrnThread* nt); int solvex_thread_part2(NrnThread* nt); int solvex_thread_part3(double* b, NrnThread* nt); void fun_thread(double t, double* y, double* ydot, NrnThread* nt); void fun_thread_transfer_part1(double t, double* y, NrnThread* nt); void fun_thread_transfer_part2(double* ydot, NrnThread* nt); void fun_thread_ms_part1(double t, double* y, NrnThread* nt); void fun_thread_ms_part2(NrnThread* nt); void fun_thread_ms_part3(NrnThread* nt); void fun_thread_ms_part4(double* ydot, NrnThread* nt); void fun_thread_ms_part34(double* ydot, NrnThread* nt); bool at_time(double, NrnThread*); void set_init_flag(); void check_deliver(NrnThread* nt = 0); void evaluate_conditions(NrnThread* nt = 0); void ste_check(); void states(double*); void dstates(double*); void error_weights(double*); void acor(double*); void fill(Cvode* standard); // following 7 crucial for local time step recording, also used by global void delete_prl(); void record_add(PlayRecord*); void record_continuous(); void record_continuous_thread(NrnThread*); void play_add(PlayRecord*); void play_continuous(double t); void play_continuous_thread(double t, NrnThread*); void do_ode(NrnThread*); void do_nonode(NrnThread* nt = 0); double* n_vector_data(N_Vector, int); private: void cvode_constructor(); bool init_global(); void init_eqn(); void daspk_init_eqn(); void matmeth(); void nocap_v(NrnThread*); void nocap_v_part1(NrnThread*); void nocap_v_part2(NrnThread*); void nocap_v_part3(NrnThread*); void solvemem(NrnThread*); void atolvec_alloc(int); double h(); N_Vector ewtvec(); N_Vector acorvec(); void new_no_cap_memb(CvodeThreadData&, NrnThread*); void before_after(BAMechList*, NrnThread*); public: // daspk bool use_daspk_; Daspk* daspk_; int res(double, double*, double*, double*, NrnThread*); int psol(double, double*, double*, double, NrnThread*); void daspk_scatter_y(N_Vector); // daspk solves vi,vx instead of vm,vx void daspk_gather_y(N_Vector); void daspk_scatter_y(double*, int); void daspk_gather_y(double*, int); void scatter_y(double*, int); void gather_y(N_Vector); void gather_y(double*, int); void scatter_ydot(double*, int); void gather_ydot(N_Vector); void gather_ydot(double*, int); public: void activate_maxstate(bool); void maxstate(double*); void maxstate(bool, NrnThread* nt = 0); void maxacor(double*); public: void* mem_; N_Vector y_; N_Vector atolnvec_; N_Vector maxstate_; N_Vector maxacor_; public: bool structure_change_; #if USENEOSIM TQueue* neosim_self_events_; #endif public: CvodeThreadData* ctd_; NrnThread* nth_; // for lvardt int nctd_; long int* nthsizes_; // N_Vector_NrnThread uses this copy of ctd_[i].nvsize_ NetCvode* ncv_; int neq_; int event_flag_; double next_at_time_; double tstop_; double tstop_begin_, tstop_end_; private: void rhs(NrnThread*); void rhs_memb(CvMembList*, NrnThread*); void lhs(NrnThread*); void lhs_memb(CvMembList*, NrnThread*); void triang(NrnThread*); void bksub(NrnThread*); private: // segregation of old vectorized information to per cell info friend class NetCvode; bool is_owner(double*); // for play and record in local step context. bool local_; void daspk_setup1_tree_matrix(); //unused void daspk_setup2_tree_matrix(); //unused TQItem* tqitem_; private: int prior2init_; #if PARANEURON public: bool use_partrans_; int global_neq_; int opmode_; // 1 advance, 2 interpolate, 3 init; for testing #endif // PARANEURON }; #endif neuron-7.5/src/nrncvode/cvodestb.cpp000066400000000000000000000060331323325274500176250ustar00rootroot00000000000000#include <../../nrnconf.h> // solver CVode stub to allow cvode as dll for mswindows version. #include #include "classreg.h" #include "nrnoc2iv.h" #include "datapath.h" #if USECVODE #include "cvodeobj.h" #include "netcvode.h" #else class Cvode; #endif extern "C" { void cvode_fadvance(double); void cvode_finitialize(double t0); void nrncvode_set_t(double); bool at_time(NrnThread*, double); extern double dt, t; #define nt_t nrn_threads->_t #define nt_dt nrn_threads->_dt extern void nrn_random_play(); extern int cvode_active_; extern int nrn_use_daspk_; NetCvode* net_cvode_instance; void deliver_net_events(NrnThread*); void nrn_deliver_events(NrnThread*); void clear_event_queue(); void init_net_events(); void nrn_record_init(); void nrn_play_init(); void fixed_record_continuous(NrnThread* nt); void fixed_play_continuous(NrnThread* nt); void nrn_solver_prepare(); static void check_thresh(NrnThread*); } // for fixed step thread void deliver_net_events(NrnThread* nt) { int i; if (net_cvode_instance) { net_cvode_instance->check_thresh(nt); net_cvode_instance->deliver_net_events(nt); } } // handle events during finitialize() void nrn_deliver_events(NrnThread* nt) { double tsav = nt->_t; if (net_cvode_instance) { net_cvode_instance->deliver_events(tsav, nt); } nt->_t = tsav; } void clear_event_queue() { if (net_cvode_instance) { net_cvode_instance->clear_events(); } } void init_net_events() { if (net_cvode_instance) { net_cvode_instance->init_events(); } } void nrn_record_init() { if (net_cvode_instance) { net_cvode_instance->record_init(); } } void nrn_play_init() { if (net_cvode_instance) { net_cvode_instance->play_init(); } } void fixed_play_continuous(NrnThread* nt) { if (net_cvode_instance) { net_cvode_instance->fixed_play_continuous(nt); } } void fixed_record_continuous(NrnThread* nt) { if (net_cvode_instance) { net_cvode_instance->fixed_record_continuous(nt); } } void nrn_solver_prepare() { if (net_cvode_instance) { net_cvode_instance->solver_prepare(); } } void cvode_fadvance(double tstop) { // tstop = -1 means single step #if USECVODE int err; if (net_cvode_instance) { nrn_random_play(); err = net_cvode_instance->solve(tstop); if (err != 0) { printf("err=%d\n", err); hoc_execerror("variable step integrator error", 0); } t = nt_t; dt = nt_dt; } #endif } void cvode_finitialize(double t0){ #if USECVODE if (net_cvode_instance) { net_cvode_instance->re_init(t0); } #endif } bool at_time(NrnThread* nt, double te) { #if USECVODE if (cvode_active_ && nt->_vcv) { return ((Cvode*)nt->_vcv)->at_time(te, nt); } #endif double x = te - 1e-11; if (x <= nt->_t && x > (nt->_t - nt->_dt)) { return 1; } return 0; } void nrncvode_set_t(double tt) { NetCvode* nc = net_cvode_instance; if (nc->gcv_) { Cvode& cv = *nc->gcv_; cv.tn_ = cv.t_ = cv.t0_ = tt; }else{ for (int i=0; i < nc->pcnt_; ++i) { NetCvodeThreadData& p = nc->p[i]; for (int j=0; j < p.nlcv_; ++j) { Cvode& cv = p.lcv_[j]; cv.tn_ = cv.t_ = cv.t0_ = tt; } } } } neuron-7.5/src/nrncvode/cvtrset.cpp000077500000000000000000000074471323325274500175230ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include "nrnoc2iv.h" #include "cvodeobj.h" #include "nonvintblock.h" typedef int (*Pfridot)(...); extern "C" { #include "membfunc.h" #include "neuron.h" extern int diam_changed; extern int tree_changed; } void Cvode::rhs(NrnThread* _nt) { int i; CvodeThreadData& z = CTD(_nt->id); if (diam_changed) { recalc_diam(); } if (z.v_node_count_ == 0) { return; } for (i = 0; i < z.v_node_count_; ++i) { NODERHS(z.v_node_[i]) = 0.; } if (_nt->_nrn_fast_imem) { double* p = _nt->_nrn_fast_imem->_nrn_sav_rhs; for (i = 0; i < z.v_node_count_; ++i) { Node* nd = z.v_node_[i]; p[nd->v_node_index] = 0; } } rhs_memb(z.cv_memb_list_, _nt); nrn_nonvint_block_current(_nt->end, _nt->_actual_rhs, _nt->id); if (_nt->_nrn_fast_imem) { double* p = _nt->_nrn_fast_imem->_nrn_sav_rhs; for (i = 0; i < z.v_node_count_; ++i) { Node* nd = z.v_node_[i]; p[nd->v_node_index] -= NODERHS(nd); } } /* at this point d contains all the membrane conductances */ /* now the internal axial currents. rhs += ai_j*(vi_j - vi) */ for (i = z.rootnodecount_; i < z.v_node_count_; ++i) { Node* nd = z.v_node_[i]; Node* pnd = z.v_parent_[i]; double dv = NODEV(pnd) - NODEV(nd); /* our connection coefficients are negative so */ NODERHS(nd) -= NODEB(nd)*dv; NODERHS(pnd) += NODEA(nd)*dv; } } void Cvode::rhs_memb(CvMembList* cmlist, NrnThread* _nt) { CvMembList* cml; errno = 0; for (cml = cmlist; cml; cml = cml->next) { Memb_func* mf = memb_func + cml->index; Pfridot s = (Pfridot)mf->current; if (s) { Memb_list* ml = cml->ml; (*s)(_nt, ml, cml->index); if (errno) { if (nrn_errno_check(cml->index)) { hoc_warning("errno set during calculation of currents", (char*)0); } } } } activsynapse_rhs(); activstim_rhs(); activclamp_rhs(); } void Cvode::lhs(NrnThread* _nt) { int i; CvodeThreadData& z = CTD(_nt->id); if (z.v_node_count_ == 0) { return; } for (i = 0; i < z.v_node_count_; ++i) { NODED(z.v_node_[i]) = 0.; } lhs_memb(z.cv_memb_list_, _nt); nrn_nonvint_block_conductance(_nt->end, _nt->_actual_rhs, _nt->id); nrn_cap_jacob(_nt, z.cmlcap_->ml); // _nrn_fast_imem not needed since exact icap added in nrn_div_capacity /* now add the axial currents */ for (i = 0; i < z.v_node_count_; ++i) { NODED(z.v_node_[i]) -= NODEB(z.v_node_[i]); } for (i=z.rootnodecount_; i < z.v_node_count_; ++i) { NODED(z.v_parent_[i]) -= NODEA(z.v_node_[i]); } } void Cvode::lhs_memb(CvMembList* cmlist, NrnThread* _nt) { CvMembList* cml; for (cml = cmlist; cml; cml = cml->next) { Memb_func* mf = memb_func + cml->index; Memb_list* ml = cml->ml; Pfridot s = (Pfridot)mf->jacob; if (s) { Pfridot s = (Pfridot)mf->jacob; (*s)(_nt, ml, cml->index); if (errno) { if (nrn_errno_check(cml->index)) { hoc_warning("errno set during calculation of di/dv", (char*)0); } } } } activsynapse_lhs(); activclamp_lhs(); } /* triangularization of the matrix equations */ void Cvode::triang(NrnThread* _nt) { register Node *nd, *pnd; double p; int i; CvodeThreadData& z = CTD(_nt->id); for (i = z.v_node_count_ - 1; i >= z.rootnodecount_; --i) { nd = z.v_node_[i]; pnd = z.v_parent_[i]; p = NODEA(nd) / NODED(nd); NODED(pnd) -= p * NODEB(nd); NODERHS(pnd) -= p * NODERHS(nd); } } /* back substitution to finish solving the matrix equations */ void Cvode::bksub(NrnThread* _nt) { register Node *nd, *cnd; int i; CvodeThreadData& z = CTD(_nt->id); for (i = 0; i < z.rootnodecount_; ++i) { NODERHS(z.v_node_[i]) /= NODED(z.v_node_[i]); } for (i = z.rootnodecount_; i < z.v_node_count_; ++i) { cnd = z.v_node_[i]; nd = z.v_parent_[i]; NODERHS(cnd) -= NODEB(cnd) * NODERHS(nd); NODERHS(cnd) /= NODED(cnd); } } neuron-7.5/src/nrncvode/hocevent.cpp000077500000000000000000000105341323325274500176330ustar00rootroot00000000000000#include #include #include #include #include extern "C" { extern int cvode_active_; } declarePool(HocEventPool, HocEvent) implementPool(HocEventPool, HocEvent) HocEventPool* HocEvent::hepool_; HocEvent::HocEvent() { stmt_ = nil; ppobj_ = nil; reinit_ = 0; } HocEvent::~HocEvent() { if (stmt_) { delete stmt_; } } void HocEvent::pr(const char* s, double tt, NetCvode* ns) { printf("%s HocEvent %s %.15g\n", s, stmt_ ? stmt_->name() : "", tt); } HocEvent* HocEvent::alloc(const char* stmt, Object* ppobj, int reinit, Object* pyact) { if (!hepool_) { nrn_hoc_lock(); if (!hepool_) { hepool_ = new HocEventPool(100, 1); } nrn_hoc_unlock(); } HocEvent* he = hepool_->alloc(); he->stmt_ = nil; he->ppobj_ = ppobj; he->reinit_ = reinit; if (pyact) { he->stmt_ = new HocCommand(pyact); }else if (stmt) { he->stmt_ = new HocCommand(stmt); } return he; } void HocEvent::hefree() { if (stmt_) { delete stmt_; stmt_ = nil; } hepool_->hpfree(this); } void HocEvent::clear() { if (stmt_) { delete stmt_; stmt_ = nil; } } void HocEvent::deliver(double tt, NetCvode* nc, NrnThread* nt) { extern double t; if (!ppobj_) { nc->allthread_handle(tt, this, nt); return; } if (stmt_) { if (nrn_nthread > 1 || nc->is_local()) { if (!ppobj_) { hoc_execerror("multiple threads and/or local variable time step method require an appropriate POINT_PROCESS arg to CVode.event to safely execute:", stmt_->name()); } Cvode* cv = (Cvode*)ob2pntproc(ppobj_)->nvi_; if (cv && cvode_active_) { nc->local_retreat(tt, cv); if (reinit_) { cv->set_init_flag(); } nt->_t = cv->t_; } nrn_hoc_lock(); t = tt; }else if (cvode_active_ && reinit_) { nc->retreat(tt, nc->gcv_); assert(MyMath::eq(tt, nc->gcv_->t_, NetCvode::eps(tt))); assert(tt == nt->_t); nc->gcv_->set_init_flag(); t = tt; }else{ t = nt_t = tt; } stmt_->execute(false); if (nrn_nthread > 1 || nc->is_local()) { nrn_hoc_unlock(); } } hefree(); } void HocEvent::allthread_handle() { if (stmt_) { stmt_->execute(false); }else{ tstopset; } hefree(); } void HocEvent::pgvts_deliver(double tt, NetCvode* nc) { deliver(tt, nc, nrn_threads); } void HocEvent::reclaim() { if (hepool_) { hepool_->free_all(); } } DiscreteEvent* HocEvent::savestate_save() { // pr("HocEvent::savestate_save", 0, net_cvode_instance); HocEvent* he = new HocEvent(); if (stmt_) { if (stmt_->pyobject()) { he->stmt_ = new HocCommand(stmt_->pyobject()); }else{ he->stmt_ = new HocCommand(stmt_->name(), stmt_->object()); } he->reinit_ = reinit_; he->ppobj_ = ppobj_; } return he; } void HocEvent::savestate_restore(double tt, NetCvode* nc) { // pr("HocEvent::savestate_restore", tt, nc); HocEvent* he = alloc(nil, nil, 0); NrnThread* nt = nrn_threads; if (stmt_) { if (stmt_->pyobject()) { he->stmt_ = new HocCommand(stmt_->pyobject()); }else{ he->stmt_ = new HocCommand(stmt_->name(), stmt_->object()); } he->reinit_ = reinit_; he->ppobj_ = ppobj_; if (ppobj_) { nt = (NrnThread*)ob2pntproc(ppobj_)->_vnt; } } nc->event(tt, he, nt); } DiscreteEvent* HocEvent::savestate_read(FILE* f) { HocEvent* he = new HocEvent(); int have_stmt, have_obj, index; char stmt[256], objname[100], buf[200]; Object* obj = nil; // assert(fscanf(f, "%d %d\n", &have_stmt, &have_obj) == 2); assert(fgets(buf, 200, f)); assert(sscanf(buf, "%d %d\n", &have_stmt, &have_obj) == 2); if (have_stmt) { assert(fgets(stmt, 256, f)); stmt[strlen(stmt)-1] = '\0'; if (have_obj) { // assert(fscanf(f, "%s %d\n", objname, &index) == 1); assert(fgets(buf, 200, f)); assert(sscanf(buf, "%s %d\n", objname, &index) == 1); obj = hoc_name2obj(objname, index); } he->stmt_ = new HocCommand(stmt, obj); } return he; } void HocEvent::savestate_write(FILE* f) { fprintf(f, "%d\n", HocEventType); fprintf(f, "%d %d\n", stmt_ ? 1 : 0, (stmt_ && stmt_->object()) ? 1 : 0); if (stmt_) { fprintf(f, "%s\n", stmt_->name()); if (stmt_->object()) { fprintf(f, "%s %d\n", stmt_->object()->ctemplate->sym->name, stmt_->object()->index); } } } neuron-7.5/src/nrncvode/netcon.h000066400000000000000000000245411323325274500167530ustar00rootroot00000000000000#ifndef netcon_h #define netcon_h #undef check #if MAC #define NetCon nrniv_Dinfo #endif #include #include #include "htlist.h" #include "nrnneosm.h" #include "nrnmpi.h" #if 0 #define STATISTICS(arg) ++arg #else #define STATISTICS(arg) /**/ #endif class PreSyn; class PlayRecord; class Cvode; class TQueue; class TQItem; struct NrnThread; class NetCvode; class HocEventPool; class HocCommand; class SelfEventPPTable; class NetConSaveWeightTable; class NetConSaveIndexTable; class PreSynSaveIndexTable; class STETransition; class IvocVect; class BGP_DMASend; class BGP_DMASend_Phase2; #define DiscreteEventType 0 #define TstopEventType 1 #define NetConType 2 #define SelfEventType 3 #define PreSynType 4 #define HocEventType 5 #define PlayRecordEventType 6 // the above will in turn steer to proper PlayRecord type #define NetParEventType 7 #if DISCRETE_EVENT_OBSERVER class DiscreteEvent : public Observer { #else class DiscreteEvent { #endif public: DiscreteEvent(); virtual ~DiscreteEvent(); virtual void send(double deliverytime, NetCvode*, NrnThread*); virtual void deliver(double t, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); virtual void disconnect(Observable*) {}; virtual int pgvts_op(int& i) { i = 0; return 2; } virtual void pgvts_deliver(double t, NetCvode*); virtual NrnThread* thread(); virtual int type() { return DiscreteEventType; } virtual DiscreteEvent* savestate_save(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); static DiscreteEvent* savestate_read(FILE*); // actions performed over each item in the event queue. virtual void frecord_init(TQItem*) {}; static unsigned long discretevent_send_; static unsigned long discretevent_deliver_; }; class NetCon : public DiscreteEvent { public: NetCon(); NetCon(PreSyn* src, Object* target); virtual ~NetCon(); virtual void send(double sendtime, NetCvode*, NrnThread*); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); virtual int pgvts_op(int& i) { i = 1; return 2; } virtual void pgvts_deliver(double t, NetCvode*); virtual NrnThread* thread(); virtual int type() { return NetConType; } virtual DiscreteEvent* savestate_save(); static DiscreteEvent* savestate_read(FILE*); void chksrc(); void chktar(); void rmsrc(); void replace_src(PreSyn*); virtual void disconnect(Observable*); double delay_; PreSyn* src_; Point_process* target_; double* weight_; Object* obj_; int cnt_; bool active_; static unsigned long netcon_send_active_; static unsigned long netcon_send_inactive_; static unsigned long netcon_deliver_; }; class NetConSave : public DiscreteEvent { public: NetConSave(NetCon*); virtual ~NetConSave(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); NetCon* netcon_; static void invalid(); static NetCon* weight2netcon(double*); static NetCon* index2netcon(long); private: static NetConSaveWeightTable* wtable_; static NetConSaveIndexTable* idxtable_; }; class SelfEvent : public DiscreteEvent { public: SelfEvent(); virtual ~SelfEvent(); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); void clear(){} // called by sepool_->free_all virtual int pgvts_op(int& i) { i = 1; return 2; } virtual void pgvts_deliver(double t, NetCvode*); virtual int type() { return SelfEventType; } virtual DiscreteEvent* savestate_save(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); static DiscreteEvent* savestate_read(FILE*); virtual NrnThread* thread(); double flag_; Point_process* target_; double* weight_; void** movable_; // actually a TQItem** static unsigned long selfevent_send_; static unsigned long selfevent_move_; static unsigned long selfevent_deliver_; static void savestate_free(); private: void call_net_receive(NetCvode*); static Point_process* index2pp(int type, int oindex); static SelfEventPPTable* sepp_; }; declarePtrList(NetConPList, NetCon) class ConditionEvent : public DiscreteEvent { public: // condition detection factored out of PreSyn for re-use ConditionEvent(); virtual ~ConditionEvent(); virtual void check(NrnThread*, double sendtime, double teps = 0.0); virtual double value() { return -1.; } void condition(Cvode*); void abandon_statistics(Cvode*); virtual void asf_err() = 0; double valold_, told_; double valthresh_; // go below this to reset threshold detector. TQItem* qthresh_; bool flag_; // true when below, false when above. static unsigned long init_above_; static unsigned long send_qthresh_; static unsigned long abandon_; static unsigned long eq_abandon_; static unsigned long abandon_init_above_; static unsigned long abandon_init_below_; static unsigned long abandon_above_; static unsigned long abandon_below_; static unsigned long deliver_qthresh_; }; class WatchCondition : public ConditionEvent, public HTList { public: WatchCondition(Point_process*, double(*)(Point_process*)); virtual ~WatchCondition(); virtual double value() { return (*c_)(pnt_); } virtual void send(double, NetCvode*, NrnThread*); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); void activate(double flag); virtual void asf_err(); virtual int pgvts_op(int& i) { i = 1; return 2; } virtual void pgvts_deliver(double t, NetCvode*); virtual NrnThread* thread(); double nrflag_; Point_process* pnt_; double(*c_)(Point_process*); static unsigned long watch_send_; static unsigned long watch_deliver_; }; class STECondition : public WatchCondition { public: STECondition(Point_process*, double(*)(Point_process*) = NULL); virtual ~STECondition(); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pgvts_deliver(double t, NetCvode*); virtual double value(); virtual NrnThread* thread(); STETransition* stet_; }; class PreSyn : public ConditionEvent { public: PreSyn(double* src, Object* osrc, Section* ssrc = nil); virtual ~PreSyn(); virtual void send(double sendtime, NetCvode*, NrnThread*); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); virtual void asf_err(); virtual int pgvts_op(int& i) { i = 0; return 0; } virtual void pgvts_deliver(double t, NetCvode*); virtual NrnThread* thread(); virtual int type() { return PreSynType; } virtual DiscreteEvent* savestate_save(); static DiscreteEvent* savestate_read(FILE*); virtual double value() { return *thvar_ - threshold_; } void update(Observable*); void disconnect(Observable*); void update_ptr(double*); void record_stmt(const char*); void record_stmt(Object*); void record(IvocVect*, IvocVect* idvec = nil, int rec_id = 0); void record(double t); void init(); double mindelay(); void fanout(double, NetCvode*, NrnThread*); // used by bbsavestate NetConPList dil_; double threshold_; double delay_; double* thvar_; Object* osrc_; Section* ssrc_; IvocVect* tvec_; IvocVect* idvec_; HocCommand* stmt_; NrnThread* nt_; hoc_Item* hi_; // in the netcvode psl_ hoc_Item* hi_th_; // in the netcvode psl_th_ long hi_index_; // for SaveState read and write int use_min_delay_; int rec_id_; int output_index_; int gid_; #if NRNMPI unsigned char localgid_; // compressed gid for spike transfer #endif #if NRN_MUSIC void* music_port_; #endif #if BGPDMA union { // A PreSyn cannot be both a source spike generator // and a receiver of off-host spikes. BGP_DMASend* dma_send_; BGP_DMASend_Phase2* dma_send_phase2_; int srchost_; } bgp; #endif static unsigned long presyn_send_mindelay_; static unsigned long presyn_send_direct_; static unsigned long presyn_deliver_netcon_; static unsigned long presyn_deliver_direct_; static unsigned long presyn_deliver_ncsend_; }; class PreSynSave : public DiscreteEvent { public: PreSynSave(PreSyn*); virtual ~PreSynSave(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); PreSyn* presyn_; bool have_qthresh_; static void invalid(); static PreSyn* hindx2presyn(long); private: static PreSynSaveIndexTable* idxtable_; }; class HocEvent : public DiscreteEvent { public: HocEvent(); virtual ~HocEvent(); virtual void pr(const char*, double t, NetCvode*); static HocEvent* alloc(const char* stmt, Object*, int, Object* pyact=nil); void hefree(); void clear(); // called by hepool_->free_all virtual void deliver(double, NetCvode*, NrnThread*); virtual void allthread_handle(); static void reclaim(); virtual int pgvts_op(int& i) { i = 0; return 2; } virtual void pgvts_deliver(double t, NetCvode*); HocCommand* stmt() { return stmt_; } virtual int type() { return HocEventType; } virtual DiscreteEvent* savestate_save(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); static DiscreteEvent* savestate_read(FILE*); static unsigned long hocevent_send_; static unsigned long hocevent_deliver_; private: HocCommand* stmt_; Object* ppobj_; int reinit_; static HocEvent* next_del_; static HocEventPool* hepool_; }; class TstopEvent : public DiscreteEvent { public: TstopEvent(); virtual ~TstopEvent(); virtual void deliver(double t, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); virtual int pgvts_op(int& i) { i = 0; return 2; } virtual void pgvts_deliver(double t, NetCvode*); virtual int type() { return TstopEventType; } virtual DiscreteEvent* savestate_save(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); static DiscreteEvent* savestate_read(FILE*); }; class NetParEvent : public DiscreteEvent { public: NetParEvent(); virtual ~NetParEvent(); virtual void send(double, NetCvode*, NrnThread*); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); virtual int pgvts_op(int& i) { i = 0; return 4; } virtual void pgvts_deliver(double t, NetCvode*); virtual int type() { return NetParEventType; } virtual DiscreteEvent* savestate_save(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); static DiscreteEvent* savestate_read(FILE*); public: double wx_, ws_; // exchange time and "spikes to Presyn" time int ithread_; // for pr() }; extern "C" { extern PreSyn* nrn_gid2outputpresyn(int gid); } #endif neuron-7.5/src/nrncvode/netcvode.cpp000066400000000000000000004773221323325274500176400ustar00rootroot00000000000000#include <../../nrnconf.h> //define to 0 if do not wish use_min_delay_ to ever be 1 #define USE_MIN_DELAY 1 #include #include #include #include #include #include #include #include #include #include #include "classreg.h" #include "nrnoc2iv.h" #include "parse.h" #include "cvodeobj.h" #include "hoclist.h" #include "pool.h" #include "tqueue.h" #include "ocobserv.h" #include "nrnneosm.h" #include "datapath.h" #include "objcmd.h" #include "shared/sundialsmath.h" #include "kssingle.h" #include "ocnotify.h" #if HAVE_IV #include "ivoc.h" #endif #include "oclist.h" #define PROFILE 0 #include "profile.h" #include "ivocvect.h" #include "vrecitem.h" #include "nrnste.h" #include "netcon.h" #include "netcvode.h" #include "htlist.h" typedef void (*ReceiveFunc)(Point_process*, double*, double); #define lvardtloop(i,j) for(i=0; i < nrn_nthread; ++i) for (j=0; j < p[i].nlcv_; ++j) #define NVI_SUCCESS 0 #define PP2NT(pp) ((NrnThread*)((pp)->_vnt)) #define PP2t(pp) (PP2NT(pp)->_t) #define LOCK(m) /**/ #define UNLOCK(m) /**/ // classical and when DiscreteEvent::deliver is already in the right thread // via a future thread instance of NrnNetItem with its own tqe. #define POINT_RECEIVE(type, tar, w, f) (*pnt_receive[type])(tar, w, f) // when global tqe is managed by master thread and the correct thread // needs to be fired to execute the NET_RECEIVE block. //#define POINT_RECEIVE(type, tar, w, f) ns->point_receive(type, tar, w, f) extern "C" { #include "membfunc.h" extern void single_event_run(); extern void setup_topology(), v_setup_vectors(); extern int structure_change_cnt, v_structure_change, tree_changed, nrn_matrix_cnt_; extern int diam_changed; extern int nrn_errno_check(int); extern void nrn_ba(NrnThread*, int); extern int cvode_active_; extern NetCvode* net_cvode_instance; extern cTemplate** nrn_pnt_template_; extern double t, dt; extern void nrn_cvfun(double t, double* y, double* ydot); extern void nrn_cleanup_presyn(PreSyn*); #define nt_dt nrn_threads->_dt #define nt_t nrn_threads->_t extern void nrn_parent_info(Section*); extern Object* nrn_sec2cell(Section*); extern int nrn_sec2cell_equals(Section*, Object*); extern ReceiveFunc* pnt_receive; extern ReceiveFunc* pnt_receive_init; extern short* pnt_receive_size; extern short* nrn_is_artificial_; // should be bool but not using that type in c extern short* nrn_artcell_qindex_; void net_send(void**, double*, Point_process*, double, double); void net_move(void**, Point_process*, double); void artcell_net_send(void**, double*, Point_process*, double, double); void artcell_net_move(void**, Point_process*, double); int nrn_use_selfqueue_; void nrn_pending_selfqueue(double tt, NrnThread*); static void all_pending_selfqueue(double tt); static void* pending_selfqueue(NrnThread*); void net_event(Point_process*, double); void _nrn_watch_activate(Datum*, double (*)(Point_process*), int, Point_process*, int, double); void _nrn_free_watch(Datum*, int, int); extern int hoc_araypt(Symbol*, int); extern int hoc_stacktype(); extern Point_process* ob2pntproc(Object*); void nrn_use_daspk(int); extern int nrn_use_daspk_; int linmod_extra_eqn_count(); extern int nrn_modeltype(); extern Symlist* hoc_built_in_symlist; extern Symlist* hoc_top_level_symlist; extern TQueue* net_cvode_instance_event_queue(NrnThread*); extern hoc_Item* net_cvode_instance_psl(); extern PlayRecList* net_cvode_instance_prl(); extern void nrn_update_ps2nt(); extern void nrn_use_busywait(int); extern double* nrn_recalc_ptr(double*); void* nrn_interthread_enqueue(NrnThread*); extern void (*nrnthread_v_transfer_)(NrnThread*); Object* (*nrnpy_seg_from_sec_x)(Section*, double); #if NRN_MUSIC extern void nrnmusic_injectlist(void*, double); #endif extern int nrn_fornetcon_cnt_; extern int* nrn_fornetcon_index_; extern int* nrn_fornetcon_type_; void _nrn_free_fornetcon(void**); int _nrn_netcon_args(void*, double***); // for use in mod files double nrn_netcon_get_delay(NetCon* nc) { return nc->delay_; } void nrn_netcon_set_delay(NetCon* nc, double d) { nc->delay_ = d; } int nrn_netcon_weight(NetCon* nc, double** pw) { *pw = nc->weight_; return nc->cnt_; } double nrn_event_queue_stats(double* stats) { #if COLLECT_TQueue_STATISTICS net_cvode_instance_event_queue(nrn_threads)->spike_stat(stats); return (stats[0]-stats[2]); #else return -1.; #endif } double nrn_netcon_get_thresh(NetCon* nc) { if (nc->src_) { return nc->src_->threshold_; }else{ return 0; } } void nrn_netcon_set_thresh(NetCon* nc, double th) { if (nc->src_) { nc->src_->threshold_ = th; } } void nrn_netcon_event(NetCon* nc, double td) { nc->chktar(); net_cvode_instance->event(td, nc, PP2NT(nc->target_)); } Point_process* nrn_netcon_target(NetCon* nc) { nc->chktar(); return nc->target_; } int nrn_netcon_info(NetCon* nc, double **pw, Point_process **target, double **th, double **del) { *target=(nc->target_)? nc->target_:(Point_process*)0; *th=(nc->src_)?&(nc->src_->threshold_):(double*)0; *del=&nc->delay_; *pw = nc->weight_; return nc->cnt_; } int nrn_presyn_count(PreSyn* ps) { return ps->dil_.count(); } void* nrn_presyn_netcon(PreSyn* ps, int i) { return ps->dil_.item(i); } #if USENEOSIM void neosim2nrn_advance(void*, void*, double); void neosim2nrn_deliver(void*, void*); void (*p_nrn2neosim_send)(void*, double); static void* neosim_entity_; #endif void ncs2nrn_integrate(double tstop); void nrn_fixed_step(); void nrn_fixed_step_group(int); extern void (*nrn_allthread_handle)(); static void allthread_handle_callback() { net_cvode_instance->allthread_handle(); } #if USENCS // As a subroutine for NCS, NEURON simulates the cells of a subnet // (usually a single cell) and NCS manages whatever intercellular // NetCon connections were specified by the hoc cvode method // Cvode.ncs_netcons(List nc_inlist, List nc_outlist) . The former list // is normally in one to one correspondence with all the synapses. These // NetCon objects have those synapses as targets and nil sources. // The latter list is normally in one to one correspondence with // the cells of the subnet. Those NetCon objects have sources of the form // cell.axon.v(1) and nil targets. // Note that the program that creates the hoc file knows // how to tell NCS that a particular integer corresponds to a particular // NetCon // NCS tells NEURON what time to integrate to. (Using any integration method) // Probably the step size will be the minimum delay between output spike // and its effect on any synapse. // void ncs2nrn_integrate(double tstop); // NCS gives synaptic events to NEURON but tdeliver must be >= t void ncs2nrn_inputevent(int netcon_input_index, double tdeliver); // and NEURON notifies NCS if cell ouputs a spike during integrate extern void nrn2ncs_outputevent(int netcon_output_index, double firetime); // netcon_input_index specifies the NetCon object // in the following list. The hoc file sets this up via cvode.ncs_netcons static NetConPList* ncs2nrn_input_; // the netcon_ouput_index is specified in a NetCon field called // nrn2ncs_output_index_ // helper functions void nrn2ncs_netcons(); #endif #if NRNMPI extern void nrn2ncs_outputevent(int netcon_output_index, double firetime); #endif }; //extern "C" #if BGPDMA extern void bgp_dma_send(PreSyn*, double t); extern int use_bgpdma_; extern void nrnbgp_messager_advance(); #endif #if BGPDMA > 1 extern int use_dcmf_record_replay; #endif bool nrn_use_fifo_queue_; #if BBTQ == 5 bool nrn_use_bin_queue_; #endif #if NRNMPI // for compressed info during spike exchange extern bool nrn_use_localgid_; extern void nrn_outputevent(unsigned char, double); #endif struct ForNetConsInfo { double** argslist; int size; }; static unsigned long deliver_cnt_, net_event_cnt_; unsigned long DiscreteEvent::discretevent_send_; unsigned long DiscreteEvent::discretevent_deliver_; unsigned long NetCon::netcon_send_active_; unsigned long NetCon::netcon_send_inactive_; unsigned long NetCon::netcon_deliver_; unsigned long SelfEvent::selfevent_send_; unsigned long SelfEvent::selfevent_move_; unsigned long SelfEvent::selfevent_deliver_; unsigned long WatchCondition::watch_send_; unsigned long WatchCondition::watch_deliver_; unsigned long ConditionEvent::init_above_; unsigned long ConditionEvent::send_qthresh_; unsigned long ConditionEvent::deliver_qthresh_; unsigned long ConditionEvent::abandon_; unsigned long ConditionEvent::eq_abandon_; unsigned long ConditionEvent::abandon_init_above_; unsigned long ConditionEvent::abandon_init_below_; unsigned long ConditionEvent::abandon_above_; unsigned long ConditionEvent::abandon_below_; unsigned long PreSyn::presyn_send_mindelay_; unsigned long PreSyn::presyn_send_direct_; unsigned long PreSyn::presyn_deliver_netcon_; unsigned long PreSyn::presyn_deliver_direct_; unsigned long PreSyn::presyn_deliver_ncsend_; unsigned long PlayRecordEvent::playrecord_send_; unsigned long PlayRecordEvent::playrecord_deliver_; unsigned long HocEvent::hocevent_send_; unsigned long HocEvent::hocevent_deliver_; unsigned long KSSingle::singleevent_deliver_; unsigned long KSSingle::singleevent_move_; TQueue* net_cvode_instance_event_queue(NrnThread* nt) { return net_cvode_instance->event_queue(nt); } hoc_Item* net_cvode_instance_psl() { return net_cvode_instance->psl_; } PlayRecList* net_cvode_instance_prl() { return net_cvode_instance->playrec_list(); } void nrn_use_daspk(int b) { if (net_cvode_instance) { net_cvode_instance->use_daspk(b == 1); } } double NetCvode::eps_; static Node* node(Object*); Node* node(Object* ob) { return ob2pntproc(ob)->node; } PlayRecordEvent::PlayRecordEvent() {} PlayRecordEvent::~PlayRecordEvent() {} DiscreteEvent* PlayRecordEvent::savestate_save() { PlayRecordEvent* pre = new PlayRecordEvent(); pre->plr_ = plr_; return pre; } void PlayRecordEvent::savestate_restore(double tt, NetCvode* nc) { nc->event(tt, plr_->event(), nrn_threads + plr_->ith_); } void PlayRecordEvent::savestate_write(FILE* f) { fprintf(f, "%d\n", PlayRecordEventType); fprintf(f, "%d %d\n", plr_->type(), net_cvode_instance->playrec_item(plr_)); } DiscreteEvent* PlayRecordEvent::savestate_read(FILE* f) { DiscreteEvent* de = nil; char buf[100]; int type, plr_index; assert(fgets(buf, 100, f)); sscanf(buf, "%d %d\n", &type, &plr_index); PlayRecord* plr = net_cvode_instance->playrec_item(plr_index); assert(plr && plr->type() == type); return plr->event()->savestate_save(); } PlayRecordSave* PlayRecord::savestate_save() { return new PlayRecordSave(this); } PlayRecordSave* PlayRecord::savestate_read(FILE* f) { PlayRecordSave* prs = nil; int type, index; char buf[100]; assert(fgets(buf, 100, f)); assert(sscanf(buf, "%d %d\n", &type, &index) == 2); PlayRecord* plr = net_cvode_instance->playrec_item(index); assert(plr->type() == type); switch (type) { case VecRecordDiscreteType: prs = new VecRecordDiscreteSave(plr); break; case VecRecordDtType: prs = new VecRecordDtSave(plr); break; case VecPlayStepType: prs = new VecPlayStepSave(plr); break; case VecPlayContinuousType: prs = new VecPlayContinuousSave(plr); break; default: // whenever there is no subclass specific data to save prs = new PlayRecordSave(plr); break; } prs->savestate_read(f); return prs; } PlayRecordSave::PlayRecordSave(PlayRecord* plr) { pr_ = plr; prl_index_ = net_cvode_instance->playrec_item(pr_); assert(prl_index_ >= 0); } PlayRecordSave::~PlayRecordSave() { } void PlayRecordSave::check() { assert(pr_ == net_cvode_instance->playrec_item(prl_index_)); } void NetCon::chksrc() { if (!src_) { hoc_execerror(hoc_object_name(obj_), "source is missing"); } } void NetCon::chktar() { if (!target_) { hoc_execerror(hoc_object_name(obj_), "target is missing"); } } void NetCon::disconnect(Observable* o) { Object* ob = ((ObjObservable*)o)->object(); //printf("%s disconnect from ", hoc_object_name(obj_)); if (target_->ob == ob) { //printf("target %s\n", hoc_object_name(target_->ob)); target_ = nil; active_ = 0; } } #if 0 // way of printing dinfo printf("NetCon from %s to ", d->src_->osrc_ ? hoc_object_name(d->src_->osrc_) : secname(d->src_->ssrc_)); printf("%s ", hoc_object_name(d->target_->ob)); printf(" weight index=%d\n", l); #endif implementPtrList(NetConPList, NetCon) class MaxStateItem { public: Symbol* sym_; double max_; double amax_; }; struct InterThreadEvent { DiscreteEvent* de_; double t_; }; declareTable(MaxStateTable, void*, MaxStateItem*) implementTable(MaxStateTable, void*, MaxStateItem*) declarePtrList(PreSynList, PreSyn) implementPtrList(PreSynList, PreSyn) declarePtrList(HTListList, HTList) implementPtrList(HTListList, HTList) declarePtrList(WatchList, WatchCondition) implementPtrList(WatchList, WatchCondition) declareTable(PreSynTable, double*, PreSyn*) implementTable(PreSynTable, double*, PreSyn*) declarePool(SelfEventPool, SelfEvent) implementPool(SelfEventPool, SelfEvent) declarePtrList(TQList, TQItem) implementPtrList(TQList, TQItem) declarePtrList(HocEventList, HocEvent) implementPtrList(HocEventList, HocEvent) // allows marshalling of all items in the event queue that need to be // removed to avoid duplicates due to frecord_init after finitialize static TQList* record_init_items_; static DiscreteEvent* null_event_; static DiscreteEvent* tstop_event_; static PreSyn* unused_presyn; // holds the NetCons with no source static double nc_preloc(void* v) { // user must pop section stack after call NetCon* d = (NetCon*)v; Section* s = nil; if (d->src_) { s = d->src_->ssrc_; } if (s) { nrn_pushsec(s); double* v = d->src_->thvar_; nrn_parent_info(s); // make sure parentnode exists // there is no efficient search for the location of // an arbitrary variable. Search only for v at 0, 1. // Otherwise return .5 . if (v == &NODEV(s->parentnode)) { return 0.; } if (v == &NODEV(s->pnode[s->nnode-1])) { return 1.; } return .5; // perhaps should search for v }else{ return -1.; } } static Object** nc_preseg(void* v) { // user must pop section stack after call NetCon* d = (NetCon*)v; Section* s = NULL; Object* obj = NULL; double x = 0.5; if (d->src_) { s = d->src_->ssrc_; } if (s && nrnpy_seg_from_sec_x) { double* v = d->src_->thvar_; nrn_parent_info(s); // make sure parentnode exists // there is no efficient search for the location of // an arbitrary variable. Search only for v at 0, 1. // Otherwise leave x at .5 . if (v == &NODEV(s->parentnode)) { x = 0.; } if (v == &NODEV(s->pnode[s->nnode-1])) { x = 1.; } // perhaps should search for v obj = (*nrnpy_seg_from_sec_x)(s, x); --obj->refcount; } return hoc_temp_objptr(obj); } static double nc_postloc(void* v) { // user must pop section stack after call NetCon* d = (NetCon*)v; if (d->target_ && d->target_->sec) { nrn_pushsec(d->target_->sec); return nrn_arc_position(d->target_->sec, d->target_->node); }else{ return -1.; } } static Object** nc_postseg(void* v) { // user must pop section stack after call NetCon* d = (NetCon*)v; Object* obj = NULL; if (d->target_ && d->target_->sec && nrnpy_seg_from_sec_x) { double x = nrn_arc_position(d->target_->sec, d->target_->node); obj = (*nrnpy_seg_from_sec_x)(d->target_->sec, x); --obj->refcount; } return hoc_temp_objptr(obj); } static Object** nc_syn(void* v) { NetCon* d = (NetCon*)v; Object* ob = nil; if (d->target_) { ob = d->target_->ob; } return hoc_temp_objptr(ob); } static Object** nc_pre(void* v) { NetCon* d = (NetCon*)v; Object* ob = nil; if (d->src_) { ob = d->src_->osrc_; } return hoc_temp_objptr(ob); } static Object** newoclist(int i, OcList*& o) { Object** po; if (ifarg(i) && hoc_is_object_arg(i)) { po = hoc_objgetarg(i); check_obj_type(*po, "List"); o = (OcList*)((*po)->u.this_pointer); }else{ o = new OcList(); o->ref(); Symbol* sl = hoc_lookup("List"); po = hoc_temp_objvar(sl, o); } return po; } static Object** nc_prelist(void* v) { NetCon* d = (NetCon*)v; OcList* o; Object** po = newoclist(1, o); if (d->src_) { NetConPList& dil = d->src_->dil_; for (int i=0; i < dil.count(); ++i) { if (dil.item(i)->obj_) { o->append(dil.item(i)->obj_); } } } return po; } static Object** nc_synlist(void* v) { NetCon* d = (NetCon*)v; OcList* o; Object** po = newoclist(1, o); hoc_Item* q; if (net_cvode_instance->psl_) ITERATE(q, net_cvode_instance->psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); NetConPList& dil = ps->dil_; for (int i=0; i < dil.count(); ++i) { NetCon* d1 = dil.item(i); if (d1->obj_ && d1->target_ == d->target_) { o->append(d1->obj_); } } } return po; } static Object** nc_postcelllist(void* v) { NetCon* d = (NetCon*)v; OcList* o; Object** po = newoclist(1, o); hoc_Item* q; Object* cell = nil; if (d->target_ && d->target_->sec) { cell = nrn_sec2cell(d->target_->sec); } if (cell && net_cvode_instance->psl_) ITERATE(q, net_cvode_instance->psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); NetConPList& dil = ps->dil_; for (int i=0; i < dil.count(); ++i) { NetCon* d1 = dil.item(i); if (d1->obj_ && d1->target_ && nrn_sec2cell_equals(d1->target_->sec, cell)) { o->append(d1->obj_); } } } return po; } static Object** nc_precelllist(void* v) { NetCon* d = (NetCon*)v; OcList* o; Object** po = newoclist(1, o); hoc_Item* q; Object* cell = nil; if (d->src_ && d->src_->ssrc_) { cell = nrn_sec2cell(d->src_->ssrc_);} if (cell && net_cvode_instance->psl_) ITERATE(q, net_cvode_instance->psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); NetConPList& dil = ps->dil_; for (int i=0; i < dil.count(); ++i) { NetCon* d1 = dil.item(i); if (d1->obj_ && d1->src_ && ps->ssrc_ && nrn_sec2cell_equals(ps->ssrc_, cell)) { o->append(d1->obj_); } } } return po; } static Object** nc_precell(void* v) { NetCon* d = (NetCon*)v; if (d->src_ && d->src_->ssrc_) { return hoc_temp_objptr(nrn_sec2cell(d->src_->ssrc_)); }else{ return hoc_temp_objptr(0); } } static Object** nc_postcell(void* v) { NetCon* d = (NetCon*)v; Object* ob = nil; if (d->target_ && d->target_->sec) { ob = nrn_sec2cell(d->target_->sec); } return hoc_temp_objptr(ob); } static double nc_setpost(void* v) { NetCon* d = (NetCon*)v; Object* otar = nil; if (ifarg(1)) { otar = *hoc_objgetarg(1); } if (otar && !is_point_process(otar)) { hoc_execerror("argument must be a point process or NULLobject",0); } Point_process* tar = nil; if (otar) { tar = ob2pntproc(otar); } if (d->target_ && d->target_ != tar) { #if DISCRETE_EVENT_OBSERVER ObjObservable::Detach(d->target_->ob, d); #endif d->target_ = nil; } int cnt = 1; if (tar) { cnt = pnt_receive_size[tar->prop->type]; d->target_ = tar; #if DISCRETE_EVENT_OBSERVER ObjObservable::Attach(otar, d); #endif }else{ d->active_ = false; } if (d->cnt_ != cnt) { d->cnt_ = cnt; delete [] d->weight_; d->weight_ = new double[d->cnt_]; } return 0.; } static double nc_valid(void* v) { NetCon* d = (NetCon*)v; if (d->src_ && d->target_) { return 1.; } return 0.; } static double nc_active(void* v) { NetCon* d = (NetCon*)v; bool a = d->active_; if (d->target_ && ifarg(1)) { d->active_ = bool(chkarg(1, 0, 1)); } return double(a); } // for threads, revised net_send to use absolute time (in the // mod file we add the thread time when we call it). // And we can no longer check with respect to minimum time in chkarg static double nc_event(void* v) { NetCon* d = (NetCon*)v; double td = chkarg(1, -1e20,1e20); if (d->active_ == 0) { return 0.0; } d->chktar(); NrnThread* nt = PP2NT(d->target_); if (!nt || nt < nrn_threads || nt > (nrn_threads+(nrn_nthread-1))){ //printf("%s.event %s\n", hoc_object_name(d->obj_), "target does not know its thread yet."); return 0.0; } if (ifarg(2)) { double flag = *getarg(2); Point_process* pnt = d->target_; int type = pnt->prop->type; if (!nrn_is_artificial_[type]) { hoc_execerror("Can only send fake self-events to ARTIFICIAL_CELLs",0); } void** pq = (void**)(&pnt->prop->dparam[nrn_artcell_qindex_[type]]._pvoid); net_send(pq, d->weight_, pnt, td, flag); }else{ net_cvode_instance->event(td, d, PP2NT(d->target_)); } return (double)d->active_; } static double nc_record(void* v) { NetCon* d = (NetCon*)v; d->chksrc(); if (ifarg(1)) { if (ifarg(2)) { int recid = d->obj_->index; if (ifarg(3)) { recid = (int)(*getarg(3)); } d->src_->record(vector_arg(1), vector_arg(2), recid); }else if (hoc_is_str_arg(1)) { d->src_->record_stmt(gargstr(1)); }else if (is_vector_arg(1)){ d->src_->record(vector_arg(1)); }else{ d->src_->record_stmt(*hoc_objgetarg(1)); } }else{ d->src_->record((IvocVect*)nil); } return 0; } static double nc_srcgid(void* v) { NetCon* d = (NetCon*)v; if (d->src_) { return (double)d->src_->gid_; } return -1.; } static Object** nc_get_recordvec(void* v) { NetCon* d = (NetCon*)v; Object* ob = nil; if (d->src_ && d->src_->tvec_) { ob = d->src_->tvec_->obj_; } return hoc_temp_objptr(ob); } static double nc_wcnt(void* v) { NetCon* d = (NetCon*)v; return d->cnt_; } static Member_func members[] = { "active", nc_active, "valid", nc_valid, "preloc", nc_preloc, "postloc", nc_postloc, "setpost", nc_setpost, "event", nc_event, "record", nc_record, "srcgid", nc_srcgid, "wcnt", nc_wcnt, "delay", 0, // these four changed below "weight", 0, "threshold", 0, "x", 0, 0, 0 }; static Member_ret_obj_func omembers[] = { "syn", nc_syn, "pre", nc_pre, "precell", nc_precell, "postcell", nc_postcell, "preseg", nc_preseg, "postseg", nc_postseg, "prelist", nc_prelist, "synlist", nc_synlist, "precelllist", nc_precelllist, "postcelllist", nc_postcelllist, "get_recordvec", nc_get_recordvec, 0, 0 }; static void steer_val(void* v) { NetCon* d = (NetCon*)v; Symbol* s = hoc_spop(); if (strcmp(s->name, "delay") == 0) { d->chksrc(); hoc_pushpx(&d->delay_); d->src_->use_min_delay_ = 0; }else if (strcmp(s->name, "weight") == 0) { int index = 0; if (hoc_stacktype() == NUMBER) { s->arayinfo->sub[0] = d->cnt_; index = hoc_araypt(s, SYMBOL); } hoc_pushpx(d->weight_ + index); }else if (strcmp(s->name, "x") == 0) { static double dummy = 0.; d->chksrc(); if (d->src_->thvar_) { hoc_pushpx(d->src_->thvar_); }else{ dummy = 0.; hoc_pushpx(&dummy); } }else if (strcmp(s->name, "threshold") == 0) { d->chksrc(); hoc_pushpx(&d->src_->threshold_); } } static void* cons(Object* o) { NetCon* d; if (!net_cvode_instance) { hoc_execerror("CVode instance must exist", 0); } // source, target, threshold, delay, magnitude Object* osrc = nil, *otar; Section* srcsec = nil; double* psrc = nil; if (hoc_is_object_arg(1)) { osrc = *hoc_objgetarg(1); if (osrc && !is_point_process(osrc)) { hoc_execerror("if arg 1 is an object it must be a point process or NULLObject", 0); } }else{ psrc = hoc_pgetarg(1); srcsec = chk_access(); } otar = *hoc_objgetarg(2); if (otar && !is_point_process(otar)) { hoc_execerror("arg 2 must be a point process or NULLobject", 0); } double thresh = -1.e9; // sentinal value. default is 10 if new PreSyn double delay = 1.; double weight = 0.; if (ifarg(3)) { thresh = *getarg(3); delay = chkarg(4, 0, 1e15); weight = *getarg(5); } d = net_cvode_instance->install_deliver(psrc, srcsec, osrc, otar, thresh, delay, weight); d->obj_ = o; return (void*)d; } static void destruct(void* v) { NetCon* d = (NetCon*)v; delete d; } void NetCon_reg() { class2oc("NetCon", cons, destruct, members, NULL, omembers, NULL); Symbol* nc = hoc_lookup("NetCon"); nc->u.ctemplate->steer = steer_val; Symbol* s; s = hoc_table_lookup("delay", nc->u.ctemplate->symtable); s->type = VAR; s->arayinfo = nil; s = hoc_table_lookup("x", nc->u.ctemplate->symtable); s->type = VAR; s->arayinfo = nil; s = hoc_table_lookup("threshold", nc->u.ctemplate->symtable); s->type = VAR; s->arayinfo = nil; s = hoc_table_lookup("weight", nc->u.ctemplate->symtable); s->type = VAR; s->arayinfo = new Arrayinfo; s->arayinfo->refcount = 1; s->arayinfo->a_varn = nil; s->arayinfo->nsub = 1; s->arayinfo->sub[0] = 1; } static char* escape_bracket(const char* s) { static char* b; const char* p1; char* p2; if (!b) { b = new char[256]; } for (p1 = s, p2 = b; *p1; ++p1, ++p2) { switch (*p1) { case '<': *p2 = '['; break; case '>': *p2 = ']'; break; case '[': case ']': *p2 = '\\'; *(++p2) = *p1; break; default: *p2 = *p1; break; } } *p2 = '\0'; return b; } Object** NetCvode::netconlist() { // interface to cvode.netconlist(precell, postcell, target, [list]) OcList* o; Object** po = newoclist(4, o); Object *opre = nil, *opost = nil, *otar = nil; Regexp* spre = nil, *spost = nil, *star = nil; char* s; int n; if (hoc_is_object_arg(1)) { opre = *hoc_objgetarg(1); }else{ s = gargstr(1); if (s[0] == '\0') { spre = new Regexp(".*"); }else{ spre = new Regexp(escape_bracket(s)); } if(!spre->pattern()) { hoc_execerror(gargstr(1), "not a valid regular expression"); } } if (hoc_is_object_arg(2)) { opost = *hoc_objgetarg(2); }else{ s = gargstr(2); if (s[0] == '\0') { spost = new Regexp(".*"); }else{ spost = new Regexp(escape_bracket(s)); } if(!spost->pattern()) { hoc_execerror(gargstr(2), "not a valid regular expression"); } } if (hoc_is_object_arg(3)) { otar = *hoc_objgetarg(3); }else{ s = gargstr(3); if (s[0] == '\0') { star = new Regexp(".*"); }else{ star = new Regexp(escape_bracket(s)); } if(!star->pattern()) { hoc_execerror(gargstr(3), "not a valid regular expression"); } } bool b; hoc_Item* q; if (psl_) ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); b = false; if (ps->ssrc_) { Object* precell = nrn_sec2cell(ps->ssrc_); if (opre) { if (precell == opre) { b = true; }else{ b = false; } }else{ s = hoc_object_name(precell); n = strlen(s); if (spre->Match(s, n, 0) > 0) { b = true; }else{ b = false; } } }else if (ps->osrc_) { Object* presyn = ps->osrc_; if (opre) { if (presyn == opre) { b = true; }else{ b = false; } }else{ s = hoc_object_name(presyn); n = strlen(s); if (spre->Match(s, n, 0) > 0) { b = true; }else{ b = false; } } } if (b == true) { NetConPList& dil = ps->dil_; for (int i=0; i < dil.count(); ++i) { NetCon* d = dil.item(i); Object* postcell = nil; Object* target = nil; if (d->target_) { Point_process* p = d->target_; target = p->ob; if (p->sec) { postcell = nrn_sec2cell(p->sec); } } if (opost) { if (postcell == opost) { b = true; }else{ b = false; } }else{ s = hoc_object_name(postcell); n = strlen(s); if (spost->Match(s, n, 0) > 0) { b = true; }else{ b = false; } } if (b == true) { if (otar) { if (target == otar) { b = true; }else{ b = false; } }else{ s = hoc_object_name(target); n = strlen(s); if (star->Match(s, n, 0) > 0) { b = true; }else{ b = false; } } if (b == true) { o->append(d->obj_); } } } } } if (spre) delete spre; if (spost) delete spost; if (star) delete star; return po; } #define ITE_SIZE 10 NetCvodeThreadData::NetCvodeThreadData() { tpool_ = new TQItemPool(1000, 1); // tqe_ accessed only by thread i so no locking tqe_ = new TQueue(tpool_, 0); sepool_ = new SelfEventPool(1000,1); selfqueue_ = nil; psl_thr_ = nil; tq_ = nil; lcv_ = nil; ite_size_ = ITE_SIZE; ite_cnt_ = 0; unreffed_event_cnt_ = 0; immediate_deliver_ = -1e100; inter_thread_events_ = new InterThreadEvent[ite_size_]; nlcv_ = 0; MUTCONSTRUCT(1) } NetCvodeThreadData::~NetCvodeThreadData() { delete [] inter_thread_events_; if (psl_thr_) { hoc_l_freelist(&psl_thr_); } if (tq_) { delete tq_; } delete tqe_; delete tpool_; if (selfqueue_) { selfqueue_->remove_all(); delete selfqueue_; } delete sepool_; if (lcv_) { for (int i=0; i < nlcv_; ++i) { net_cvode_instance->delete_list(lcv_ + i); } delete [] lcv_; } MUTDESTRUCT } void NetCvodeThreadData::interthread_send(double td, DiscreteEvent* db, NrnThread* nt) { //bin_event(td, db, nt); MUTLOCK #if PRINT_EVENT if (net_cvode_instance->print_event_) { printf("interthread send td=%.15g DE type=%d thread=%d target=%d %s\n", td, db->type(), nt->id, (db->type() == 2) ? PP2NT(((NetCon*)db)->target_)->id:-1, (db->type() == 2) ? hoc_object_name(((NetCon*)(db))->target_->ob):"?"); } #endif if(ite_cnt_ >= ite_size_) { ite_size_ *= 2; InterThreadEvent* in = new InterThreadEvent[ite_size_]; for (int i=0; i < ite_cnt_; ++i) { in[i].de_ = inter_thread_events_[i].de_; in[i].t_ = inter_thread_events_[i].t_; } delete [] inter_thread_events_; inter_thread_events_ = in; } InterThreadEvent& ite = inter_thread_events_[ite_cnt_++]; ite.de_ = db; ite.t_ = td; // race since each NetCvodeThreadData has its own lock and enqueueing_ // is a NetCvode instance variable. enqueuing_ is not logically // needed but can avoid a nrn_multithread_job call in allthread_least_t // which does nothing if there are no interthread events. //int& b = net_cvode_instance->enqueueing_; //if (!b) { b = 1; } MUTUNLOCK // have decided to lock net_cvode_instance and set it net_cvode_instance->set_enqueueing(); } void NetCvodeThreadData::enqueue(NetCvode* nc, NrnThread* nt) { int i; MUTLOCK for (i = 0; i < ite_cnt_; ++i) { InterThreadEvent& ite = inter_thread_events_[i]; #if PRINT_EVENT if (net_cvode_instance->print_event_) { printf("interthread enqueue td=%.15g DE type=%d thread=%d target=%d %s\n", ite.t_, ite.de_->type(), nt->id, (ite.de_->type() == 2) ? PP2NT(((NetCon*)(ite.de_))->target_)->id:-1, (ite.de_->type() == 2) ? hoc_object_name(((NetCon*)(ite.de_))->target_->ob):"?"); } #endif nc->bin_event(ite.t_, ite.de_, nt); } ite_cnt_ = 0; MUTUNLOCK } NetCvode::NetCvode(bool single) { use_long_double_ = 0; empty_ = true; // no equations (only artificial cells). MUTCONSTRUCT(0); maxorder_ = 5; maxstep_ = 1e9; minstep_ = 0.; rtol_ = 0.; atol_ = 1e-3; jacobian_ = 0; stiff_ = 2; mst_ = nil; condition_order_ = 1; null_event_ = new DiscreteEvent(); tstop_event_ = new TstopEvent(); eps_ = 100.*UNIT_ROUNDOFF; hdp_ = nil; print_event_ = 0; nrn_use_fifo_queue_ = false; single_ = single; nrn_use_daspk_ = false; gcv_ = nil; wl_list_ = new HTListList(); allthread_hocevents_ = new HocEventList(); pcnt_ = 0; p = nil; p_construct(1); // eventually these should not have to be thread safe pst_ = nil; pst_cnt_ = 0; psl_ = nil; // for parallel network simulations hardly any presyns have // a threshold and it can be very inefficient to check the entire // presyn list for thresholds during the fixed step method. // So keep a threshold list. unused_presyn = nil; structure_change_cnt_ = -1; fornetcon_change_cnt_ = -2; matrix_change_cnt_ = -1; playrec_change_cnt_ = 0; alloc_list(); prl_ = new PlayRecList(10); fixed_play_ = new PlayRecList(10); fixed_record_ = new PlayRecList(10); vec_event_store_ = nil; if (!record_init_items_) { record_init_items_ = new TQList(); } // re_init(t); } NetCvode::~NetCvode() { MUTDESTRUCT if (net_cvode_instance == (NetCvode*)this) { net_cvode_instance = nil; } if (hdp_) { hdp_ = nil; } delete_list(); p_construct(0); if (mst_) { // and should also iterate and delete the MaxStateItem delete mst_; } if (psl_) { hoc_Item* q; ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); for (int i = ps->dil_.count() - 1; i >= 0; --i) { NetCon* d = ps->dil_.item(i); d->src_ = nil; delete d; } delete ps; } hoc_l_freelist(&psl_); } if (pst_) { delete pst_; } delete fixed_play_; delete fixed_record_; while(prl_->count()) { delete prl_->item(prl_->count()-1); } delete prl_; unused_presyn = nil; delete wl_list_; delete allthread_hocevents_; } bool NetCvode::localstep(){ return !single_; } bool NetCvode::is_local() { return (cvode_active_ && localstep()); } void NetCvode::localstep(bool b) { // due to possibility of gap junctions and until the complete matrix // is analysed for block structure localstep and daspk are incompatible b = (nrn_modeltype() == 1 ? b : false); // localstep doesn't work yet with DAE's if (!b != single_) { delete_list(); single_ = !b; structure_change_cnt_ = 0; use_sparse13 = 0; nrn_use_daspk_ = false; re_init(nt_t); } } bool NetCvode::use_daspk(){ return (gcv_ != 0) ? gcv_->use_daspk_ : false; } void NetCvode::use_daspk(bool b) { b = (nrn_modeltype() == 2 ? true : b); // not optional if algebraic if (gcv_ && b != gcv_->use_daspk_) { delete_list(); single_ = (b ? true : single_); structure_change_cnt_ = 0; nrn_use_daspk_ = b; //printf("NetCvode::use_daspk nrn_use_daspk=%d\n", nrn_use_daspk_); if (use_sparse13 != nrn_use_daspk_) { use_sparse13 = nrn_use_daspk_; diam_changed = 1; } re_init(nt_t); } } BAMechList::BAMechList(BAMechList** first) { // preserve the list order next = nil; indices = nil; cnt = 0; BAMechList* last; if (*first) { for (last = *first; last->next; last = last->next){} last->next = this; }else{ *first = this; } } void BAMechList::destruct(BAMechList** first) { BAMechList* b, *bn; for (b = *first; b; b = bn) { bn = b->next; if (b->indices) { delete [] b->indices; delete b; } } *first = nil; } CvodeThreadData::CvodeThreadData() { no_cap_count_ = 0; no_cap_child_count_ = 0; no_cap_node_ = nil; no_cap_child_ = nil; cv_memb_list_ = nil; cmlcap_ = nil; cmlext_ = nil; no_cap_memb_ = nil; before_breakpoint_ = nil; after_solve_ = nil; before_step_ = nil; rootnodecount_ = 0; v_node_count_ = 0; v_node_ = nil; v_parent_ = nil; psl_th_ = nil; watch_list_ = nil; ste_list_ = nil; pv_ = nil; pvdot_ = nil; nvoffset_ = 0; nvsize_ = 0; neq_v_ = nonvint_offset_ = 0; nonvint_extra_offset_ = 0; record_ = nil; play_ = nil; } CvodeThreadData::~CvodeThreadData() { if (no_cap_memb_) { delete_memb_list(no_cap_memb_); } if (pv_) { delete [] pv_; delete [] pvdot_; } if (no_cap_node_) { delete [] no_cap_node_; delete [] no_cap_child_; } if (watch_list_) { watch_list_->RemoveAll(); delete watch_list_; } } void NetCvode::delete_list() { int i, j; wl_list_->remove_all(); if (gcv_) { delete_list(gcv_); delete gcv_; gcv_ = nil; } for (i = 0; i < pcnt_; ++i) { NetCvodeThreadData& d = p[i]; if (d.lcv_) { for (j = 0; j < d.nlcv_; ++j) { delete_list(d.lcv_ + j); } delete [] d.lcv_; d.lcv_ = nil; d.nlcv_ = 0; } if (d.tq_) { delete d.tq_; d.tq_ = nil; } } empty_ = true; } void NetCvode::delete_list(Cvode* cvode) { del_cv_memb_list(cvode); Cvode& cv = *cvode; cv.delete_prl(); delete [] cv.ctd_; cv.ctd_ = nil; } void NetCvode::del_cv_memb_list() { if (gcv_) { del_cv_memb_list(gcv_); } for (int i = 0; i < pcnt_; ++i) { NetCvodeThreadData& d = p[i]; for (int j = 0; j < d.nlcv_; ++j) { del_cv_memb_list(d.lcv_ + j); } } } void NetCvode::del_cv_memb_list(Cvode* cvode) { int i, j; if (!cvode) { return; } Cvode& cv = *cvode; for (j=0; j < cv.nctd_; ++j) { CvodeThreadData& z = cv.ctd_[j]; if (z.psl_th_) { z.psl_th_->remove_all(); delete z.psl_th_; z.psl_th_ = nil; } if (cvode != gcv_) { if (z.v_node_) { delete [] z.v_node_; delete [] z.v_parent_; z.v_node_ = nil; z.v_parent_ = nil; } z.delete_memb_list(z.cv_memb_list_); }else{ CvMembList* cml, *cmlnext; for (cml = z.cv_memb_list_; cml; cml = cmlnext) { cmlnext = cml->next; delete cml; } } z.cv_memb_list_ = nil; BAMechList::destruct(&z.before_breakpoint_); BAMechList::destruct(&z.after_solve_); BAMechList::destruct(&z.before_step_); } } CvMembList::CvMembList() { index = -1; ml = new Memb_list; } CvMembList::~CvMembList() { delete ml; } void CvodeThreadData::delete_memb_list(CvMembList* cmlist) { CvMembList* cml, *cmlnext; for (cml = cmlist; cml; cml = cmlnext) { Memb_list* ml = cml->ml; cmlnext = cml->next; delete [] ml->nodelist; #if CACHEVEC if (ml->nodeindices) { delete [] ml->nodeindices; } #endif if (memb_func[cml->index].hoc_mech) { delete [] ml->prop; }else{ delete [] ml->data; delete [] ml->pdata; } delete cml; } } void NetCvode::distribute_dinfo(int* cellnum, int tid) { int i, j; //printf("distribute_dinfo %d\n", pst_cnt_); if (psl_) { hoc_Item* q; ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); //printf("\tPreSyn %s\n", ps->osrc_ ? hoc_object_name(ps->osrc_):secname(ps->ssrc_)); if (ps->thvar_) { // artcells and presyns for gid's not on this cpu have no threshold check NrnThread* nt; Cvode* cvsrc; CvodeThreadData* z; // cvode instances poll which presyns if (single_) { if (ps->osrc_) { nt = (NrnThread*)ob2pntproc(ps->osrc_)->_vnt; }else if (ps->ssrc_) { nt = ps->ssrc_->pnode[0]->_nt; }else{ nt = nrn_threads; } cvsrc = gcv_; z = cvsrc->ctd_ + nt->id; if (!z->psl_th_) { z->psl_th_ = new PreSynList(pst_cnt_); } z->psl_th_->append(ps); }else{ if (ps->osrc_) { j = node(ps->osrc_)->v_node_index; nt = (NrnThread*)ob2pntproc(ps->osrc_)->_vnt; }else if (ps->ssrc_) { j = ps->ssrc_->pnode[0]->v_node_index; nt = ps->ssrc_->pnode[0]->_nt; }else{ j = 0; nt = nrn_threads; } if (tid == nt->id) { cvsrc = p[tid].lcv_ + cellnum[j]; z = cvsrc->ctd_; if (nt == cvsrc->nth_) { if (!z->psl_th_) { z->psl_th_ = new PreSynList(1); } z->psl_th_->append(ps); } } } } } } } void NetCvode::alloc_list() { int i; set_CVRhsFn(); if (single_) { gcv_ = new Cvode(); Cvode& cv = *gcv_; cv.ncv_ = this; cv.nctd_ = nrn_nthread; cv.ctd_ = new CvodeThreadData[cv.nctd_]; }else{ for (int id=0; id < nrn_nthread; ++id) { NrnThread& nt = nrn_threads[id]; NetCvodeThreadData& d = p[id]; d.nlcv_ = nt.ncell; d.lcv_ = new Cvode[d.nlcv_]; d.tq_ = new TQueue(d.tpool_); for (i=0; i < d.nlcv_; ++i) { TQItem* ti = d.tq_->insert(0., d.lcv_+i); d.lcv_[i].tqitem_ = ti; Cvode& cv = d.lcv_[i]; cv.nth_ = &nt; cv.ncv_ = this; cv.nctd_ = 1; cv.ctd_ = new CvodeThreadData[cv.nctd_]; } } } empty_ = false; #if USENEOSIM if (p_nrn2neosim_send) for (i=0; i < nlist_; ++i) { p.lcv_[i].neosim_self_events_ = new TQueue(); } #endif } bool NetCvode::init_global() { int i; CvMembList* cml; if (tree_changed) { setup_topology(); } if (v_structure_change) { v_setup_vectors(); } if (structure_change_cnt_ == structure_change_cnt) { return false; } if (diam_changed) { // need to guarantee that the matrix is allocated recalc_diam(); // for the present method } structure_change_cnt_ = structure_change_cnt; matrix_change_cnt_ = -1; playrec_change_cnt_ = 0; if (hdp_) { delete hdp_; hdp_ = nil; } NrnThread* _nt; if (single_) { if (!gcv_ || gcv_->nctd_ != nrn_nthread) { delete_list(); alloc_list(); } del_cv_memb_list(); Cvode& cv = *gcv_; distribute_dinfo(nil, 0); FOR_THREADS(_nt) { CvodeThreadData& z = cv.ctd_[_nt->id]; z.rootnodecount_ = _nt->ncell; z.v_node_count_ = _nt->end; z.v_node_ = _nt->_v_node; z.v_parent_ = _nt->_v_parent; CvMembList* last = 0; for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { i = tml->index; Memb_func* mf = memb_func + i; Memb_list* ml = tml->ml; if (ml->nodecount && (i == CAP || mf->current || mf->ode_count || mf->ode_matsol || mf->ode_spec || mf->state ) ) { // maintain same order (not reversed) for // singly linked list built below cml = new CvMembList; if (!z.cv_memb_list_) { z.cv_memb_list_ = cml; }else{ last->next = cml; } last = cml; cml->next = nil; cml->index = i; cml->ml->nodecount = ml->nodecount; // assumes cell info grouped contiguously cml->ml->nodelist = ml->nodelist; #if CACHEVEC cml->ml->nodeindices = ml->nodeindices; #endif if (mf->hoc_mech) { cml->ml->prop = ml->prop; }else{ cml->ml->data = ml->data; cml->ml->pdata = ml->pdata; } cml->ml->_thread = ml->_thread; } } fill_global_ba(_nt, BEFORE_BREAKPOINT, &z.before_breakpoint_); fill_global_ba(_nt, AFTER_SOLVE, &z.after_solve_); fill_global_ba(_nt, BEFORE_STEP, &z.before_step_); // Every point process, but not artificial cells, cause at least a retreat. // All point processes, but not artificial cells, // have the global cvode as its nvi field for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { i = tml->index; Memb_func* mf = memb_func + i; if (mf->is_point && !nrn_is_artificial_[i]) { Memb_list* ml = tml->ml; int j; for (j = 0; j < ml->nodecount; ++j) { Point_process* pp; if (mf->hoc_mech) { pp = (Point_process*)ml->prop[j]->dparam[1]._pvoid; }else{ pp = (Point_process*)ml->pdata[j][1]._pvoid; } pp->nvi_ = gcv_; } } } } }else{ // lvardt bool b = false; if (gcv_) { b = true; } if (!b) for (i=0; i < pcnt_; ++i) { if (p[i].nlcv_ != nrn_threads[i].ncell) { b = true; } } if(b) { delete_list(); alloc_list(); } del_cv_memb_list(); // each node has a cell number for (int id = 0; id < nrn_nthread; ++id) { NrnThread* _nt = nrn_threads + id; NetCvodeThreadData& d = p[id]; if (_nt->end == 0) { continue; } int* cellnum = new int[_nt->end]; for (i=0; i < _nt->ncell; ++i) { cellnum[i] = i; } for (i=_nt->ncell; i < _nt->end; ++i) { cellnum[i] = cellnum[_nt->_v_parent[i]->v_node_index]; } for (i=0; i < _nt->ncell; ++i) { d.lcv_[i].ctd_[0].v_node_count_ = 0; } for (i=0; i < _nt->end; ++i) { ++d.lcv_[cellnum[i]].ctd_[0].v_node_count_; } for (i=0; i < _nt->ncell; ++i) { d.lcv_[cellnum[i]].ctd_[0].v_node_ = new Node*[d.lcv_[cellnum[i]].ctd_[0].v_node_count_]; d.lcv_[cellnum[i]].ctd_[0].v_parent_ = new Node*[d.lcv_[cellnum[i]].ctd_[0].v_node_count_]; } for (i=0; i < _nt->ncell; ++i) { d.lcv_[i].ctd_[0].v_node_count_ = 0; d.lcv_[i].ctd_[0].rootnodecount_ = 1; } for (i=0; i < _nt->end; ++i) { d.lcv_[cellnum[i]].ctd_[0].v_node_[d.lcv_[cellnum[i]].ctd_[0].v_node_count_] = _nt->_v_node[i]; d.lcv_[cellnum[i]].ctd_[0].v_parent_[d.lcv_[cellnum[i]].ctd_[0].v_node_count_++] = _nt->_v_parent[i]; } // divide the memb_list info into per cell info // count CvMembList** last = new CvMembList*[_nt->ncell]; for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { i = tml->index; Memb_func* mf = memb_func + i; Memb_list* ml = tml->ml; if (ml->nodecount && (mf->current || mf->ode_count || mf->ode_matsol || mf->ode_spec || mf->state || i == CAP) ) { // maintain same order (not reversed) for // singly linked list built below int j; for (j = 0; j < ml->nodecount; ++j) { int inode = ml->nodelist[j]->v_node_index; Cvode& cv = d.lcv_[cellnum[inode]]; CvodeThreadData& z = cv.ctd_[0]; if (!z.cv_memb_list_) { cml = new CvMembList; cml->next = nil; cml->index = i; cml->ml->nodecount = 0; z.cv_memb_list_ = cml; last[cellnum[inode]] = cml; } if (last[cellnum[inode]]->index == i) { ++last[cellnum[inode]]->ml->nodecount; }else{ cml = new CvMembList; last[cellnum[inode]]->next = cml; cml->next = nil; last[cellnum[inode]] = cml; cml->index = i; cml->ml->nodecount = 1; } } } } delete [] last; // allocate and re-initialize count CvMembList** cvml = new CvMembList*[d.nlcv_]; for (i=0; i < d.nlcv_; ++i) { cvml[i] = d.lcv_[i].ctd_[0].cv_memb_list_; for (cml = cvml[i]; cml; cml = cml->next) { Memb_list* ml = cml->ml; ml->nodelist = new Node*[ml->nodecount]; #if CACHEVEC ml->nodeindices = new int[ml->nodecount]; #endif if (memb_func[cml->index].hoc_mech) { ml->prop = new Prop*[ml->nodecount]; }else{ ml->data = new double*[ml->nodecount]; ml->pdata = new Datum*[ml->nodecount]; } ml->nodecount = 0; } } // fill pointers (and nodecount) // now list order is from 0 to n_memb_func for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { i = tml->index; Memb_func* mf = memb_func + i; Memb_list* ml = tml->ml; if (ml->nodecount && (mf->current || mf->ode_count || mf->ode_matsol || mf->ode_spec || mf->state || i == CAP) ) { int j; for (j = 0; j < ml->nodecount; ++j) { int icell = cellnum[ml->nodelist[j]->v_node_index]; Cvode& cv = d.lcv_[icell]; CvodeThreadData& z = cv.ctd_[0]; if (cvml[icell]->index != i) { cvml[icell] = cvml[icell]->next; assert (cvml[icell] && cvml[icell]->index); } cml = cvml[icell]; cml->ml->nodelist[cml->ml->nodecount] = ml->nodelist[j]; #if CACHEVEC cml->ml->nodeindices[cml->ml->nodecount] = ml->nodeindices[j]; #endif if (mf->hoc_mech) { cml->ml->prop[cml->ml->nodecount] = ml->prop[j]; }else{ cml->ml->data[cml->ml->nodecount] = ml->data[j]; cml->ml->pdata[cml->ml->nodecount] = ml->pdata[j]; } cml->ml->_thread = ml->_thread; ++cml->ml->nodecount; } } } // do the above for the BEFORE/AFTER functions fill_local_ba(cellnum, d); distribute_dinfo(cellnum, id); // If a point process is not an artificial cell, fill its nvi_ field. // artifical cells have no integrator for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { i = tml->index; Memb_func* mf = memb_func + i; if (mf->is_point) { Memb_list* ml = tml->ml; int j; for (j = 0; j < ml->nodecount; ++j) { Point_process* pp; if (mf->hoc_mech) { pp = (Point_process*)ml->prop[j]->dparam[1]._pvoid; }else{ pp = (Point_process*)ml->pdata[j][1]._pvoid; } if (nrn_is_artificial_[i] == 0) { int inode = ml->nodelist[j]->v_node_index; pp->nvi_ = d.lcv_ + cellnum[inode]; }else{ pp->nvi_ = nil; } } } } delete [] cellnum; delete [] cvml; } } return true; } void NetCvode::fill_global_ba(NrnThread* nt, int bat, BAMechList** baml) { NrnThreadBAList* tbl; for (tbl = nt->tbl[bat]; tbl; tbl = tbl->next) { BAMechList* ba = new BAMechList(baml); ba->bam = tbl->bam; ba->ml = tbl->ml; } } void NetCvode::fill_local_ba(int* celnum, NetCvodeThreadData& d) { fill_local_ba_cnt(BEFORE_BREAKPOINT, celnum, d); fill_local_ba_cnt(AFTER_SOLVE, celnum, d); fill_local_ba_cnt(BEFORE_STEP, celnum, d); fill_local_ba_alloc(d); fill_local_ba_indices(BEFORE_BREAKPOINT, celnum, d); fill_local_ba_indices(AFTER_SOLVE, celnum, d); fill_local_ba_indices(BEFORE_STEP, celnum, d); } void NetCvode::fill_local_ba_cnt(int bat, int* celnum, NetCvodeThreadData& d) { BAMech* bam; int i; for (bam = bamech_[bat]; bam; bam = bam->next) { Memb_list* ml = memb_list + bam->type; for (i=0; i < ml->nodecount; ++i) { int inode = ml->nodelist[i]->v_node_index; Cvode* cv = d.lcv_ + celnum[inode]; BAMechList* bl = cvbml(bat, bam, cv); ++bl->cnt; } } } void NetCvode::fill_local_ba_alloc(NetCvodeThreadData& d) { int i; for (i=0; i < d.nlcv_; ++i) { BAMechList::alloc(d.lcv_[i].ctd_[0].before_breakpoint_); BAMechList::alloc(d.lcv_[i].ctd_[0].after_solve_); BAMechList::alloc(d.lcv_[i].ctd_[0].before_step_); } } void NetCvode::fill_local_ba_indices(int bat, int* celnum, NetCvodeThreadData& d) { BAMech* bam; int i; for (bam = bamech_[bat]; bam; bam = bam->next) { Memb_list* ml = memb_list + bam->type; for (i=0; i < ml->nodecount; ++i) { int inode = ml->nodelist[i]->v_node_index; Cvode* cv = d.lcv_ + celnum[inode]; BAMechList* bl = cvbml(bat, bam, cv); bl->indices[bl->cnt] = i; ++bl->cnt; } } } void BAMechList::alloc(BAMechList* first) { BAMechList* ba; for (ba = first; ba; ba = ba->next) { ba->indices = new int[ba->cnt]; ba->cnt = 0; // counts up again in fill_local_ba_indices } } BAMechList* NetCvode::cvbml(int bat, BAMech* bam, Cvode* cv) { BAMechList** pbml; BAMechList* ba; if (bat == BEFORE_BREAKPOINT) { pbml = &cv->ctd_->before_breakpoint_; }else if (bat == AFTER_SOLVE) { pbml = &cv->ctd_->after_solve_; }else{ pbml = &cv->ctd_->before_step_; } if (!*pbml) { ba = new BAMechList(pbml); }else{ for (ba = *pbml; ba; ba = ba->next) { if (ba->bam->type == bam->type) { return ba; } } ba = new BAMechList(pbml); } ba->bam = bam; return ba; } /* The path through NetCvode::solve path is determined by the case dimensions of (single step, integrate to tout) and (no model, global dt, localdt). For threads there is one more constraint--- do not allow t0_ to pass by the minimum interthread netcon delay integration interval barrier without making sure all the interthread events to be delivered before that barrier are on the thread queue. For classical mpi spike exchange this was ensured by a NetParEvent which provided a synchronization barrier. We generalized this to a NetParEvent per thread and a thread barrier but there was a consequent loss of the possibility of sequential threads since in that context a barrier makes no sense (each job must run to completion). Hence the desire to avoid barriers and handle the interval barrier explicity here to make sure NetCvode::enqueue is called frequently enough. (Actually, it is called very frequently since it is called by deliver_events, so it is only required that the interval between the least and greatest integrator t0_ be less than the maximum). Without a thread barrier in NetParEvent, this mostly affects the "integrate to tout" case. But it also affects the single step case in that we are not allowed to handle any events with delivery time > barrier time. Since a microstep does the earliest next thing, we need to check that before the call. Can we deal with multisplit conveniently without a thread barrier. Yes if we split up the process into its three phases of triangularization, reduced tree solve, back substitution. No if we retain a single integration step quantum for the thread. Without barriers, we end up with finer and finer grain nrn_multithread_job. It is sounding more and more reasonable to sacrifice the debugging convenience of sequential threads in favor of allowing thread barriers. ...but... a look at the nrn_fixed_step and nrn_multisplit_solve shows that it would certainly be easy to split into the proper nrn_multithread_job groups since it is already functionally decomposed in that way. And we may want to limit NetParEvent to serve only as interprocessor spike exchange signals for the main thread. ...but... a look at cvode in a multisplit context means there must be one global cvode instance and when f and jacob is called it would divide there and do the scatter gather etc. Of course, with separate cvode instances with multisplit we still have to have a proper Vector library which does the corresponding mpi reduce functions. Conceptually much simpler with barrier and maybe impossible without. If we went with one global cvode it would be possible. And cvode overhead seems independent of number of equations so confining it to the main thread may not be bad. The principle multithread domain we design for below is the few event, multisplit case. That is, there is one cvode instance managed by thread 0 and all events go onto one queue. However, an event is delivered according to its proper delivery thread. Note that the possiblity of 0 delay events is allowed. There is nothing that can be done at the minimum delay integration interval level since each step divides into a dozen or so multithread jobs. Threads and lvardt. Consider the global cv (used to be p.lcv_[0]) as gcv_ which has ctd[nrn_nthread] instances of separate CvodeThreadData and works with multisplit. Now consider the lvardt method (used to be supported by p.lcv_[i]) as NetCvodeThreadData instances of lcv_[i] and of course move tq_ into the NetCvodeThreadData. Then each of the p.lcv_[i] would have Cvode.nctd_ equal 1 in which p.lcv_[i].ctd_[0] is the proper CvodeThreadData. Then Cvode would never look at nrn_nthread to determine the CvodeThreadData but only the Cvode.nctd_. And if Cvode.nctd_ > 1 which would be possible only for gcv_, only then would nt->id be used to get the proper CvodeThreadData. We presume for now that if lvardt is used with nrn_nthread > 1 then the usual minimum delay interval requirements hold for interthread events. Inter-Thread-Events (possibility of 0 delay). The fixed step method is that for each step, the sequence of actions for each thread is: 1) at time tbegin: check thresholds, if source and target on same thread put directly onto queue. If different threads (PreSyn only), do an interthread send which puts the event into the target thread inter_thread_events list. Finally we deliver all events up to tbegin+.5dt, this first transfers all the threads inter-thread-events onto the queue. 2) at time tbegin + .5dt: v(tbegin) -> v(tend) 3) at time tend: integrate states one step using v(tend) 4) deliver events up to but not past tend (first transfers inter-thread-events onto queue). Therefore, a zero-delay inter-thread-event from an artificial cell generated in step 4 may or may not be delivered in the time step it is generated. And zero-delay threshold detection interthread events will be delivered in the time step but either in step 1 or step 4 (ie. beginning or end of the time step). For this reason, if there are zero-delay NetCon, then both the source and target should be on the same thread. In practice we should force them onto thread 0 or at least the source onto the target thread. What about cvode? Global variable time step method. As mentioned above, all events, when global cvode active, go onto the thread 0 event queue (interthread via the thread 0 inter_thread_events list) and from there are delivered in the context of the proper thread for cache efficiency (by means of nrn_onethread_job.) Again, as mentioned, the design side is for few events. With this in mind, there does not seem any impediment to 0 delay events. But note that an event with source and target on thread 2 (e.g. a self event) goes onto the thread 0 inter_thread_events list (in the context of thread 2), then in the context of thread 0 is transferred from the thread 0 inter_thread_events list to the thread 0 queue, then in the context of thread 0, the event is taken off the queue and delivered in the context of thread 2 (by means of nrn_onethread_job). (See why we are thinking few events? A bothersome aspect is that after every event delivery least_t has to enqueue onto the thread 0 queue the nthread inter_thread_events lists. The one queue idea for global variable time step is unsound because of the problem that multiple threads call the queue methods and so cause excessive cache line sharing. And if we avoided this through the use of the inter_thread_events list then consider a 0 delay NetCon event between artificial cells on thread 2 and thread 3. thread 0 in deliver_events_when_threads, least event for thread 2 thread 2 (NET_RECEIVE -> net_send -> PreSyn::send -> p[3].interthead_send thread 0 enqueue onto thread 0 queue all inter_thread_events lists thread 0 least event for thread 3 thread 3 (NET_RECEIVE ...) Actually, there are real problems. E.g ConditionEvent::condition is in the context of some thread and must remove an event on the thread 0 queue. That is a recipe for horrendous cacheline sharing and is the whole reason we designed inter_thread_events in the first place. Also the call to enqueue_thread0() is multiplying alarmingly (every call before least_t()) and the reason for the privileged thread 0 queue has more or less disappeared. Instead we only need an effective reduce to find the minimum of the least_t() in each thread. Expensive but no more expensive than the single queue and without the cache-line shareing. And allows 0 delay events. And keeps a kind of uniformity between fixed step, global cvode, and the future lvardt in that each thread has its own event queue. Far reaching Local variable time step method change. gcv_ if it exists, refers to the global variable time step method and there are nthread CvodeThreadData instances in ctd_. If gcv_ is 0 and !empty_, then each NetCvodeThreadData manages an array of nlcv_ Cvode instances in the lcv_ array. Each Cvode instance has only one ctd_ Thus for global step the CvodeThreadData for a thread is gcv_->ctd_[i] whereas for lvardt it is p[i].lcv_[jcell_in_thread_i].ctd_[0]. */ int NetCvode::solve(double tout) { if (nrn_nthread > 1) { return solve_when_threads(tout); // more or less a copy of below } NrnThread* nt = nrn_threads; int err = NVI_SUCCESS; if (empty_) { if (tout >= 0.) { while (p[0].tqe_->least_t() <= tout && stoprun==0) { deliver_least_event(nt); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } } if (stoprun==0) { nt_t = tout; } } else { if (p[0].tqe_->least()) { nt_t = p[0].tqe_->least_t(); deliver_events(p[0].tqe_->least_t(), nt); }else{ nt_t += 1e6; } if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } } }else if (single_) { if (tout >= 0.) { while (gcv_->t_ < tout || p[0].tqe_->least_t() < tout) { err = global_microstep(); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } } retreat(tout, gcv_); gcv_->record_continuous(); } else { // advance or initialized double tc = gcv_->t_; initialized_ = false; while (gcv_->t_ <= tc && !initialized_) { err = global_microstep(); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } } } }else if (!gcv_) { // lvardt if (tout >= 0.) { time_t rt = time(nil); // int cnt = 0; TQueue* tq = p[0].tq_; TQueue* tqe = p[0].tqe_; NrnThread* nt = nrn_threads; while (tq->least_t() < tout || tqe->least_t() <= tout) { err = local_microstep(nt); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } #if HAVE_IV IFGUI if (rt < time(nil)) { // if (++cnt > 10000) { // cnt = 0; Oc oc; oc.notify(); single_event_run(); rt = time(nil); } ENDGUI #endif } int n = p[0].nlcv_; Cvode* lcv = p[0].lcv_; for (int i=0; i < n; ++i) { local_retreat(tout, lcv + i); lcv[i].record_continuous(); } } else { // an fadvance is not every microstep but // only when all the discontinuities at te take place or // tc increases. TQueue* tq = p[0].tq_; double tc = tq->least_t(); double te = p[0].tqe_->least_t(); while (tq->least_t() <= tc && p[0].tqe_->least_t() <= te){ err = local_microstep(nrn_threads); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } } // But make sure t is not past the least time. // fadvance and local step do not coexist seamlessly. nt_t = tq->least_t(); if (te < nt_t) { nt_t = te; } } }else{ nt_t += 1e9; } return err; } void NetCvode::handle_tstop_event(double tt, NrnThread* nt) { #if 0 // now a HocEvent is used to do this nt->_stop_stepping = 1; if (cvode_active_) { if (gcv_) { retreat(tt, gcv_); gcv_->record_continuous(); }else{ int i, n = p[nt->id].nlcv_; Cvode* lcv = p[nt->id].lcv_; for (i = 0; i < n; ++i) { local_retreat(tt, lcv + i); lcv[i].record_continuous(); } } } #endif } void NetCvode::deliver_least_event(NrnThread* nt) { TQItem* q = p[nt->id].tqe_->least(); DiscreteEvent* de = (DiscreteEvent*)q->data_; double tt = q->t_; p[nt->id].tqe_->remove(q); #if PRINT_EVENT if (print_event_) { de->pr("deliver", tt, this); } #endif STATISTICS(deliver_cnt_); de->deliver(tt, this, nt); } #if BGPDMA > 1 #define RP_COUNT 50 static int rp_count; #endif bool NetCvode::deliver_event(double til, NrnThread* nt) { TQItem* q; if ((q = p[nt->id].tqe_->atomic_dq(til)) != 0) { DiscreteEvent* de = (DiscreteEvent*)q->data_; double tt = q->t_; p[nt->id].tqe_->release(q); #if PRINT_EVENT if (print_event_) { de->pr("deliver", tt, this); } #endif STATISTICS(deliver_cnt_); de->deliver(tt, this, nt); #if BGPDMA > 1 if (use_dcmf_record_replay) if (--rp_count < 0) { nrnbgp_messager_advance(); rp_count = RP_COUNT; } #endif return true; }else{ return false; } } int NetCvode::local_microstep(NrnThread* nt) { int err = NVI_SUCCESS; int i = nt->id; if (p[i].tqe_->least_t() <= p[i].tq_->least_t()) { deliver_least_event(nt); }else{ TQItem* q = p[i].tq_->least(); Cvode* cv = (Cvode*)q->data_; err = cv->handle_step(this, 1e100); p[i].tq_->move_least(cv->t_); } return err; } int NetCvode::global_microstep() { NrnThread* nt = nrn_threads; int err = NVI_SUCCESS; double tt = p[0].tqe_->least_t(); double tdiff = tt - gcv_->t_; if (tdiff <= 0) { // since events do not internally retreat with the // global step, we should already be at the event time // if this is too strict, we could use eps(list_->t_). assert(tdiff == 0.0 || ( gcv_->tstop_begin_ <= tt && tt <= gcv_->tstop_end_)); deliver_events(tt, nt); }else{ err = gcv_->handle_step(this, tt); } if (p[0].tqe_->least_t() < gcv_->t_) { gcv_->interpolate(p[0].tqe_->least_t()); } return err; } int Cvode::handle_step(NetCvode* ns, double te) { int err = NVI_SUCCESS; // first order correct condition evaluation goes here if (ns->condition_order() == 1) { if (ns->gcv_) {// global step for (int i=0; i < nctd_; ++i) { nrn_threads[i]._t = t_; // for global step could be assert } check_deliver(); // done if the check puts a 0 delay event on queue if (nctd_ > 1) { int tid; if (ns->allthread_least_t(tid) <= t_) { return err; } }else{ if (ns->p[0].tqe_->least_t() <= t_) { return err; } } }else{ //lvardt so in a specific thread // for localstep method t is for a different cvode.fun call nth_->_t = t_; check_deliver(nth_); if (ns->p[nth_->id].tqe_->least_t() <= t_) { return err; } } } if (initialize_) { err = init(t_); if (ns->gcv_) { ns->initialized_ = true; } // second order correct condition evaluation goes here if (ns->condition_order() == 2) { evaluate_conditions(nth_); } }else if (te <= tn_) { err = interpolate(te); }else if (t_ < tn_) { err = interpolate(tn_); }else{ record_continuous(); err = advance_tn(); // second order correct condition evaluation goes here if (ns->condition_order() == 2) { evaluate_conditions(nth_); } } return err; } void net_move(void** v, Point_process* pnt, double tt) { if (!(*v)) { hoc_execerror( "No event with flag=1 for net_move in ", hoc_object_name(pnt->ob)); } TQItem* q = (TQItem*)(*v); //printf("net_move tt=%g %s *v=%p\n", tt, hoc_object_name(pnt->ob), *v); if (tt < PP2t(pnt)) { SelfEvent* se = (SelfEvent*)q->data_; char buf[100]; sprintf(buf, "net_move tt-nt_t = %g", tt-PP2t(pnt)); se->pr(buf, tt, net_cvode_instance); assert(0); hoc_execerror("net_move tt < t", 0); } net_cvode_instance->move_event(q, tt, PP2NT(pnt)); } void artcell_net_move(void** v, Point_process* pnt, double tt) { if (nrn_use_selfqueue_) { if (!(*v)) { hoc_execerror( "No event with flag=1 for net_move in ", hoc_object_name(pnt->ob)); } NrnThread* nt = PP2NT(pnt); NetCvodeThreadData& p = net_cvode_instance->p[nt->id]; TQItem* q = (TQItem*)(*v); //printf("artcell_net_move t=%g qt_=%g tt=%g %s *v=%p\n", nt->_t, q->t_, tt, hoc_object_name(pnt->ob), *v); if (tt < nt->_t) { SelfEvent* se = (SelfEvent*)q->data_; char buf[100]; sprintf(buf, "artcell_net_move tt-nt_t = %g", tt - nt->_t); se->pr(buf, tt, net_cvode_instance); hoc_execerror("net_move tt < t", 0); } q->t_ = tt; if (tt < p.immediate_deliver_) { //printf("artcell_net_move_ %s immediate %g %g %g\n", hoc_object_name(pnt->ob), PP2t(pnt), tt, p.immediate_deliver_); SelfEvent* se = (SelfEvent*)q->data_; se->deliver(tt, net_cvode_instance, nt); } }else{ net_move(v, pnt, tt); } } void NetCvode::move_event(TQItem* q, double tnew, NrnThread* nt) { int tid = nt->id; STATISTICS(SelfEvent::selfevent_move_); #if PRINT_EVENT if (print_event_) { SelfEvent* se = (SelfEvent*)q->data_; printf("NetCvode::move_event self event target %s t=%g, old=%g new=%g\n", hoc_object_name(se->target_->ob), nt->_t, q->t_, tnew); } #endif #if USENEOSIM // only self events move if (neosim_entity_){ assert(0); //cvode_instance->neosim_self_events_->move(q, tnew); }else{ p[tid].tqe_->move(q, tnew); } #else p[tid].tqe_->move(q, tnew); #endif } void NetCvode::remove_event(TQItem* q, int tid) { p[tid].tqe_->remove(q); } // for threads, revised net_send to use absolute time (in the // mod file we add the thread time when we call it). void net_send(void** v, double* weight, Point_process* pnt, double td, double flag) { STATISTICS(SelfEvent::selfevent_send_); NrnThread* nt = PP2NT(pnt); NetCvodeThreadData& p = net_cvode_instance->p[nt->id]; SelfEvent* se = p.sepool_->alloc(); se->flag_ = flag; se->target_ = pnt; se->weight_ = weight; se->movable_ = v; // needed for SaveState assert(net_cvode_instance); ++p.unreffed_event_cnt_; if (td < nt->_t) { char buf[100]; sprintf(buf, "net_send td-t = %g", td - nt->_t); se->pr(buf, td, net_cvode_instance); abort(); hoc_execerror("net_send delay < 0", 0); } TQItem* q; #if USENEOSIM if (neosim_entity_) { assert(0); //cvode_instance->neosim_self_events_->insert(td, se); }else{ q = net_cvode_instance->event(td, se, nt); } #else q = net_cvode_instance->event(td, se, nt); #endif if (flag == 1.0) { *v = (void*)q; } //printf("net_send %g %s %g %p\n", td, hoc_object_name(pnt->ob), flag, *v); } void artcell_net_send(void** v, double* weight, Point_process* pnt, double td, double flag) { if (nrn_use_selfqueue_ && flag == 1.0) { STATISTICS(SelfEvent::selfevent_send_); NrnThread* nt = PP2NT(pnt); NetCvodeThreadData& p = net_cvode_instance->p[nt->id]; SelfEvent* se = p.sepool_->alloc(); se->flag_ = flag; se->target_ = pnt; se->weight_ = weight; se->movable_ = v; // needed for SaveState assert(net_cvode_instance); ++p.unreffed_event_cnt_; if (td < nt->_t) { char buf[100]; sprintf(buf, "net_send td-t = %g", td - nt->_t); se->pr(buf, td, net_cvode_instance); hoc_execerror("net_send delay < 0", 0); } TQItem* q; q = p.selfqueue_->insert(se); q->t_ = td; *v = (void*)q; //printf("artcell_net_send %g %s %g %p\n", td, hoc_object_name(pnt->ob), flag, v); if (q->t_ < p.immediate_deliver_) { //printf("artcell_net_send_ %s immediate %g %g %g\n", hoc_object_name(pnt->ob), nt->_t, q->t_, p.immediate_deliver_); SelfEvent* se = (SelfEvent*)q->data_; p.selfqueue_->remove(q); se->deliver(td, net_cvode_instance, nt); } }else{ net_send(v, weight, pnt, td, flag); } } void net_event(Point_process* pnt, double time) { STATISTICS(net_event_cnt_); PreSyn* ps = (PreSyn*)pnt->presyn_; if (ps) { if (time < PP2t(pnt)) { char buf[100]; sprintf(buf, "net_event time-t = %g", time-PP2t(pnt)); ps->pr(buf, time, net_cvode_instance); hoc_execerror("net_event time < t", 0); } #if USENEOSIM if (neosim_entity_) { (*p_nrn2neosim_send)(neosim_entity_, nt_t); }else{ #endif ps->send(time, net_cvode_instance, ps->nt_); #if USENEOSIM } #endif } } void _nrn_watch_activate(Datum* d, double (*c)(Point_process*), int i, Point_process* pnt, int r, double flag) { // printf("_nrn_cond_activate %s flag=%g first return = %g\n", hoc_object_name(pnt->ob), flag, c(pnt)); if (!d->_pvoid) { d->_pvoid = (void*)new WatchList(); } if (!d[i]._pvoid) { d[i]._pvoid = (void*)new WatchCondition(pnt, c); } WatchList* wl = (WatchList*)d->_pvoid; if (r == 0) { int j; for (j=0; j < wl->count(); ++j) { WatchCondition* wc1 = wl->item(j); wc1->Remove(); if (wc1->qthresh_) { // is it on the queue? net_cvode_instance->remove_event(wc1->qthresh_, PP2NT(pnt)->id); wc1->qthresh_ = nil; } } wl->remove_all(); } WatchCondition* wc = (WatchCondition*)d[i]._pvoid; wl->append(wc); wc->activate(flag); } void _nrn_free_watch(Datum* d, int offset, int n) { int i; int nn = offset + n; if (d[offset]._pvoid) { WatchList* wl = (WatchList*)d[offset]._pvoid; delete wl; } for (i=offset+1; i < nn; ++i) { if (d[i]._pvoid) { WatchCondition* wc = (WatchCondition*)d[i]._pvoid; wc->Remove(); delete wc; } } } void NetCvode::vec_event_store() { // not destroyed when vector destroyed. // should resize to 0 or remove before storing, just keeps incrementing if (vec_event_store_) { vec_event_store_ = nil; } if (ifarg(1)) { vec_event_store_ = vector_arg(1); } } #if BBTQ == 3 || BBTQ == 4 TQItem* NetCvode::fifo_event(double td, DiscreteEvent* db) { if (nrn_use_fifo_queue_) { #if PRINT_EVENT if (print_event_) { db->pr("send", td, this); } if (vec_event_store_) { Vect* x = vec_event_store_; int n = x->capacity(); x->resize_chunk(n+2); x->elem(n) = t; x->elem(n+1) = td; } #endif return p[0].tqe_->insert_fifo(td, db); }else{ return p[0].tqe_->insert(td, db); } } #else #define fifo_event event #endif #if BBTQ == 5 TQItem* NetCvode::bin_event(double td, DiscreteEvent* db, NrnThread* nt) { if (nrn_use_bin_queue_) { #if PRINT_EVENT if (print_event_) {db->pr("binq send", td, this);} if (vec_event_store_) { assert(0); Vect* x = vec_event_store_; int n = x->capacity(); x->resize_chunk(n+2); x->elem(n) = nt_t; x->elem(n+1) = td; } #endif return p[nt->id].tqe_->enqueue_bin(td, db); }else{ #if PRINT_EVENT if (print_event_) {db->pr("send", td, this);} #endif return p[nt->id].tqe_->insert(td, db); } } #else #define bin_event event #endif TQItem* NetCvode::event(double td, DiscreteEvent* db, NrnThread* nt) { #if PRINT_EVENT if (print_event_) { db->pr("send", td, this); } if (vec_event_store_) { Vect* x = vec_event_store_; int n = x->capacity(); x->resize_chunk(n+2); x->elem(n) = nt_t; x->elem(n+1) = td; } #endif return p[nt->id].tqe_->insert(td, db); } void NetCvode::null_event(double tt) { assert(0); NrnThread* nt = nrn_threads; if (tt - nt->_t < 0) { return; } #if USENEOSIM if (neosim_entity_) { // ignore for neosim. There is no appropriate cvode_instance // cvode_instance->neosim_self_events_->insert(nt_t + delay, null_event_); }else{ event(tt, null_event_, nt); } #else event(tt, null_event_, nt); #endif } void NetCvode::tstop_event(double tt) { if (tt - nt_t < 0) { return; } #if USENEOSIM if (neosim_entity_) { // ignore for neosim. There is no appropriate cvode_instance // cvode_instance->neosim_self_events_->insert(nt_t + delay, tstop_event_); }else #endif { if (gcv_) { event(tt, tstop_event_, nrn_threads); }else{ NrnThread* nt; FOR_THREADS(nt) { event(tt, tstop_event_, nt); } } } } void NetCvode::hoc_event(double tt, const char* stmt, Object* ppobj, int reinit, Object* pyact) { if (!ppobj && tt - nt_t < 0) { return; } #if USENEOSIM if (neosim_entity_) { // ignore for neosim. There is no appropriate cvode_instance // cvode_instance->neosim_self_events_->insert(nt_t + delay, null_event_); }else #endif { NrnThread* nt = nrn_threads; if (nrn_nthread > 1 && (!cvode_active_ || localstep())) { if (ppobj) { int i = PP2NT(ob2pntproc(ppobj))->id; p[i].interthread_send(tt, HocEvent::alloc(stmt, ppobj, reinit, pyact), nt+i); nrn_interthread_enqueue(nt + i); }else{ HocEvent* he = HocEvent::alloc(stmt, nil, 0, pyact); // put on each queue. The first thread to execute the deliver // for he will set the nrn_allthread_handle // callback which will cause all threads to rejoin at the // end of the current fixed step or, for var step methods, // after all events at this time are delivered. It is up // to the callers of the multithread_job functions // to do the right thing. for (int i=0; i < nrn_nthread; ++i) { p[i].interthread_send(tt, he, nt + i); } nrn_multithread_job(nrn_interthread_enqueue); } }else{ event(tt, HocEvent::alloc(stmt, ppobj, reinit, pyact), nt); } } } void NetCvode::allthread_handle() { nrn_allthread_handle = nil; t = nt_t; while (allthread_hocevents_->count()) { HocEvent* he = allthread_hocevents_->item(0); allthread_hocevents_->remove(0); he->allthread_handle(); } } void NetCvode::allthread_handle(double tt, HocEvent* he, NrnThread* nt) { //printf("allthread_handle tt=%g nt=%d nt_t=%g\n", tt, nt->id, nt->_t); nt->_stop_stepping = 1; if (is_local()) { int i, n = p[nt->id].nlcv_; Cvode* lcv = p[nt->id].lcv_; if (n) for (i = 0; i < n; ++i) { local_retreat(tt, lcv + i); if (!he->stmt()) { lcv[i].record_continuous(); } }else{ nt->_t = tt; } } else if (!he->stmt() && cvode_active_ && gcv_) { assert(MyMath::eq(tt, gcv_->t_, NetCvode::eps(tt))); gcv_->record_continuous(); } if (nt->id == 0) { nrn_allthread_handle = allthread_handle_callback; allthread_hocevents_->append(he); nt->_t = tt; } if (cvode_active_ && gcv_ && nrnmpi_numprocs > 1) { assert(nrn_nthread == 1); return; } // deliver any other events at this time (in particular, a possible NetParEvent) // to guarantee consistency of the NetParEvent for all threads // Otherwise, if some threads do a NetParEvent and others not, then // the interthread enqueue can put an earlier event onto the thread queue // than the last delivered event deliver_events(tt, nt); } #if 0 struct PPArgs { int type; Point_process* pp; double* w; double f; }; static PPArgs* ppargs; static void point_receive_job(NrnThread* nt) { PPArgs* p = ppargs + nt->id; (*pnt_receive[p->type])(p->pp, p->w, p->f); } void NetCvode::point_receive(int type, Point_process* pp, double* w, double f) { // this is the master thread. need to execute the pthread associated // with the pp. int id = PP2NT(pp)->id; if (id == 0) { // execute on this, the master thread (*pnt_receive[type])(pp, w, f); }else{ // marshall the args PPArgs* p = ppargs + id; p->type = type; p->pp = pp; p->w = w; p->f = f; nrn_onethread_job(id, point_receive_job); } // global queue with different threads putting things in // means no guarantee that something goes into the queue // to be delivered earlier than something last extracted. // so return to calling main thread only after the // worker thread is done. Too bad... // this needs to be worked on. Only thread id is executing. nrn_wait_for_threads(); } #endif void NetCvode::clear_events() { int i; deliver_cnt_ = net_event_cnt_ = 0; NetCon::netcon_send_active_ = 0; NetCon::netcon_send_inactive_ = 0; NetCon::netcon_deliver_ = 0; ConditionEvent::init_above_ = 0; ConditionEvent::send_qthresh_ = 0; ConditionEvent::deliver_qthresh_ = 0; ConditionEvent::abandon_ = 0; ConditionEvent::eq_abandon_ = 0; ConditionEvent::abandon_init_above_ = 0; ConditionEvent::abandon_init_below_ = 0; ConditionEvent::abandon_above_ = 0; ConditionEvent::abandon_below_ = 0; PreSyn::presyn_send_mindelay_ = 0; PreSyn::presyn_send_direct_ = 0; PreSyn::presyn_deliver_netcon_ = 0; PreSyn::presyn_deliver_direct_ = 0; PreSyn::presyn_deliver_ncsend_ = 0; SelfEvent::selfevent_send_ = 0; SelfEvent::selfevent_move_ = 0; SelfEvent::selfevent_deliver_ = 0; WatchCondition::watch_send_ = 0; WatchCondition::watch_deliver_ = 0; PlayRecordEvent::playrecord_deliver_ = 0; PlayRecordEvent::playrecord_send_ = 0; HocEvent::hocevent_send_ = 0; HocEvent::hocevent_deliver_ = 0; DiscreteEvent::discretevent_send_ = 0; DiscreteEvent::discretevent_deliver_ = 0; KSSingle::singleevent_deliver_ = 0; KSSingle::singleevent_move_ = 0; // SelfEvents need to be "freed". Other kinds of DiscreteEvents may // already have gone out of existence so the tqe_ may contain many // invalid item data pointers HocEvent::reclaim(); allthread_hocevents_->remove_all(); nrn_allthread_handle = nil; #if USENEOSIM if (p_nrn2neosim_send) for (i=0; i < nlist_; ++i) { TQueue* tq = p.lcv_[i].neosim_self_events_; while(tq->least()) { tq->remove(tq->least());} // and have already been reclaimed by SelfEvent::reclaim() } #endif MUTCONSTRUCT(1) enqueueing_ = 0; for (i=0; i < nrn_nthread; ++i) { NetCvodeThreadData& d = p[i]; delete d.tqe_; d.tqe_ = new TQueue(p[i].tpool_); d.unreffed_event_cnt_ = 0; d.sepool_->free_all(); d.immediate_deliver_ = -1e100; d.ite_cnt_ = 0; if (nrn_use_selfqueue_) { if (!d.selfqueue_) { d.selfqueue_ = new SelfQueue(d.tpool_, 0); }else{ d.selfqueue_->remove_all(); } } #if BBTQ == 5 d.tqe_->nshift_ = -1; d.tqe_->shift_bin(nt_t); #endif } // I don't believe this is needed anymore since cvode not needed // til delivery. if (cvode_active_) { // in case there is a net_send from INITIAL cvode // then this needs to be done before INITIAL blocks are called init_global(); } } void NetCvode::init_events() { hoc_Item* q; int i, j; double fifodelay; #if BBTQ == 5 for (i=0; i < nrn_nthread; ++i) { p[i].tqe_->nshift_ = -1; p[i].tqe_->shift_bin(nt_t); } #endif if (psl_) { ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); ps->init(); ps->flag_ = false; NetConPList& dil = ps->dil_; ps->use_min_delay_ = 0; #if USE_MIN_DELAY // also decide what to do about use_min_delay_ // the rule for now is to use it if all delays are // the same and there are more than 2 #if BBTQ == 3 || BBTQ == 4 // but // if we desire nrn_use_fifo_queue_ then use it // even if just one if (nrn_use_fifo_queue_) { if (dil.count()) { ps->use_min_delay_ = 1; ps->delay_ = dil.item(0)->delay_; fifodelay = ps->delay_; } }else #endif // BBTQ { if (dil.count() > 2) { ps->use_min_delay_ = 1; ps->delay_ = dil.item(0)->delay_; } } #endif // USE_MIN_DELAY for (i=dil.count()-1; i >= 0; --i) { NetCon* d = dil.item(i); if (d->target_) { int type = d->target_->prop->type; if (pnt_receive_init[type]) { (*pnt_receive_init[type])(d->target_, d->weight_, 0); }else{ //not the first for (j = d->cnt_-1; j > 0; --j) { d->weight_[j] = 0.; } } } if (ps->use_min_delay_ && ps->delay_ != d->delay_) { ps->use_min_delay_ = false; } #if BBTQ == 3 || BBTQ == 4 if (nrn_use_fifo_queue_ && d->delay_ != fifodelay) { hoc_warning("Use of the event fifo queue is turned off due to more than one value for NetCon.delay", 0); nrn_use_fifo_queue_ = false; } #endif } } } if (gcv_) { for (int j=0; j < nrn_nthread; ++j) { if (gcv_->ctd_[j].watch_list_) { gcv_->ctd_[j].watch_list_->RemoveAll(); } } }else{ for (int j=0; j < nrn_nthread; ++j) { NetCvodeThreadData& d = p[j]; for (i = 0; i < d.nlcv_; ++i) { if (d.lcv_[i].ctd_[0].watch_list_) { d.lcv_[i].ctd_[0].watch_list_->RemoveAll(); } } } } } double PreSyn::mindelay() { double md = 1e9; int i; for (i=dil_.count()-1; i >= 0; --i) { NetCon* d = dil_.item(i); if (md > d->delay_) { md = d->delay_; } } return md; } void NetCvode::deliver_events(double til, NrnThread* nt) { //printf("deliver_events til %20.15g\n", til); p[nt->id].enqueue(this, nt); while(deliver_event(til, nt)) { ; } } static IvocVect* peqvec; //if not nil then the sorted times on the event queue. static void peq(const TQItem*, int); static void peq(const TQItem* q, int) { if (peqvec) { int n = peqvec->capacity(); peqvec->resize_chunk(n+1); peqvec->elem(n) = q->t_; }else{ DiscreteEvent* d = (DiscreteEvent*)q->data_; d->pr("", q->t_, net_cvode_instance); } } void NetCvode::print_event_queue() { // dangerous since many events can go out of existence after // a simulation and before NetCvode::clear at the next initialization if (ifarg(1)) { peqvec = vector_arg(1); peqvec->resize(0); } p[0].tqe_->forall_callback(peq); peqvec = nil; } static int event_info_type_; static IvocVect* event_info_tvec_; static IvocVect* event_info_flagvec_; static OcList* event_info_list_; // netcon or point_process static void event_info_callback(const TQItem*, int); static void event_info_callback(const TQItem* q, int) { DiscreteEvent* d = (DiscreteEvent*)q->data_; NetCon* nc; PreSyn* ps; SelfEvent* se; int n = event_info_tvec_->capacity(); switch(d->type()) { case NetConType: if (event_info_type_ == NetConType) { nc = (NetCon*)d; event_info_tvec_->resize_chunk(n+1); event_info_tvec_->elem(n) = q->t_; event_info_list_->append(nc->obj_); } break; case SelfEventType: if (event_info_type_ == SelfEventType) { se = (SelfEvent*)d; event_info_tvec_->resize_chunk(n+1); event_info_tvec_->elem(n) = q->t_; event_info_flagvec_->resize_chunk(n+1); event_info_flagvec_->elem(n) = se->flag_; event_info_list_->append(se->target_->ob); } break; case PreSynType: if (event_info_type_ == NetConType) { ps = (PreSyn*)d; for (int i = ps->dil_.count()-1; i >= 0; --i) { nc = ps->dil_.item(i); double td = nc->delay_ - ps->delay_; event_info_tvec_->resize_chunk(n+1); event_info_tvec_->elem(n) = q->t_ + td; event_info_list_->append(nc->obj_); ++n; } } break; } } void NetCvode::event_queue_info() { // dangerous since many events can go out of existence after // a simulation and before NetCvode::clear at the next initialization int i = 1; event_info_type_ = (int)chkarg(i++, 2, 3); event_info_tvec_ = vector_arg(i++); event_info_tvec_->resize(0); if (event_info_type_ == SelfEventType) { event_info_flagvec_ = vector_arg(i++); event_info_flagvec_->resize(0); } Object* o = *hoc_objgetarg(i++); check_obj_type(o, "List"); event_info_list_ = (OcList*)o->u.this_pointer; event_info_list_->remove_all(); p[0].tqe_->forall_callback(event_info_callback); } void DiscreteEvent::send(double tt, NetCvode* ns, NrnThread* nt) { STATISTICS(discretevent_send_); ns->event(tt, this, nt); } void DiscreteEvent::deliver(double tt, NetCvode* ns, NrnThread* nt) { STATISTICS(discretevent_deliver_); } NrnThread* DiscreteEvent::thread() { return nrn_threads; } void DiscreteEvent::pgvts_deliver(double tt, NetCvode* ns) { STATISTICS(discretevent_deliver_); } void DiscreteEvent::pr(const char* s, double tt, NetCvode* ns) { printf("%s DiscreteEvent %.15g\n", s, tt); } void NetCon::send(double tt, NetCvode* ns, NrnThread* nt) { if (active_ && target_) { assert(PP2NT(target_) == nt); STATISTICS(netcon_send_active_); #if BBTQ == 5 ns->bin_event(tt, this, PP2NT(target_)); #else ns->event(tt, this, PP2NT(target_)); #endif }else{ STATISTICS(netcon_send_inactive_); } } void NetCon::deliver(double tt, NetCvode* ns, NrnThread* nt) { assert(target_); if (PP2NT(target_) != nt) { printf("NetCon::deliver nt=%d target=%d\n", nt->id, PP2NT(target_)->id); } assert(PP2NT(target_) == nt); Cvode* cv = (Cvode*)target_->nvi_; int type = target_->prop->type; if (nrn_use_selfqueue_ && nrn_is_artificial_[type]) { TQItem** pq = (TQItem**)(&target_->prop->dparam[nrn_artcell_qindex_[type]]._pvoid); TQItem* q; while ((q = *(pq)) != nil && q->t_ < tt) { double t1 = q->t_; SelfEvent* se = (SelfEvent*)ns->p[nt->id].selfqueue_->remove(q); //printf("%d NetCon::deliver %g , earlier selfevent at %g\n", nrnmpi_myid, tt, q->t_); se->deliver(t1, ns, nt); } } if (cvode_active_ && cv) { ns->local_retreat(tt, cv); cv->set_init_flag(); }else{ // no interpolation necessary for local step method and ARTIFICIAL_CELL nt->_t = tt; } //printf("NetCon::deliver t=%g tt=%g %s\n", t, tt, hoc_object_name(target_->ob)); STATISTICS(netcon_deliver_); POINT_RECEIVE(type, target_, weight_, 0); if (errno) { if (nrn_errno_check(type)) { hoc_warning("errno set during NetCon deliver to NET_RECEIVE", (char*)0); } } } NrnThread* NetCon::thread() { return PP2NT(target_); } void NetCon::pgvts_deliver(double tt, NetCvode* ns) { assert(target_); int type = target_->prop->type; STATISTICS(netcon_deliver_); POINT_RECEIVE(type, target_, weight_, 0); if (errno) { if (nrn_errno_check(type)) { hoc_warning("errno set during NetCon deliver to NET_RECEIVE", (char*)0); } } } void NetCon::pr(const char* s, double tt, NetCvode* ns) { printf("%s %s", s, hoc_object_name(obj_)); if (src_) { printf(" src=%s", src_->osrc_ ? hoc_object_name(src_->osrc_):secname(src_->ssrc_)); }else{ printf(" src=nil"); } printf(" target=%s %.15g\n", (target_?hoc_object_name(target_->ob):"nil"), tt); } void PreSyn::send(double tt, NetCvode* ns, NrnThread* nt) { int i; record(tt); #ifndef USENCS if (use_min_delay_) { STATISTICS(presyn_send_mindelay_); #if BBTQ == 3 || BBTQ == 4 ns->fifo_event(tt+delay_, this); #else #if BBTQ == 5 for (i=0; i < nrn_nthread; ++i) { if (nt->id == i) { ns->bin_event(tt+delay_, this, nt); }else{ ns->p[i].interthread_send(tt+delay_, this, nrn_threads + i); } } #else ns->event(tt+delay_, this); #endif #endif }else{ STATISTICS(presyn_send_direct_); for (int i = dil_.count()-1; i >= 0; --i) { NetCon* d = dil_.item(i); if (d->active_ && d->target_) { NrnThread* n = PP2NT(d->target_); #if BBTQ == 5 if (nt == n) { ns->bin_event(tt + d->delay_, d, n); }else{ ns->p[n->id].interthread_send(tt + d->delay_, d, n); } #else ns->event(tt + d->delay_, d, PP2NT(d->target_)); #endif } } } #endif //ndef USENCS #if USENCS || NRNMPI if (output_index_ >= 0) { #if BGPDMA if (use_bgpdma_) { bgp_dma_send(this, tt); }else{ #endif //BGPDMA #if NRNMPI if (nrn_use_localgid_) { nrn_outputevent(localgid_, tt); }else #endif //NRNMPI nrn2ncs_outputevent(output_index_, tt); #if BGPDMA } #endif //BGPDMA #if NRN_MUSIC if (music_port_) { nrnmusic_injectlist(music_port_, tt); } #endif // NRN_MUSIC } #endif //USENCS || NRNMPI } void PreSyn::deliver(double tt, NetCvode* ns, NrnThread* nt) { if (qthresh_) { // the thread is the one that owns the PreSyn assert(nt == nt_); qthresh_ = nil; //printf("PreSyn::deliver %s condition event tt=%20.15g\n", ssrc_?secname(ssrc_):"", tt); STATISTICS(deliver_qthresh_); send(tt, ns, nt); return; } // the thread is the one that owns the targets int i, n = dil_.count(); STATISTICS(presyn_deliver_netcon_); for (i=0; i < n; ++i) { NetCon* d = dil_.item(i); if (d->active_ && d->target_ && PP2NT(d->target_) == nt) { double dtt = d->delay_ - delay_; if (dtt == 0.) { STATISTICS(presyn_deliver_direct_); STATISTICS(deliver_cnt_); d->deliver(tt, ns, nt); }else if (dtt < 0.) { hoc_execerror("internal error: Source delay is > NetCon delay", 0); }else{ STATISTICS(presyn_deliver_ncsend_); ns->event(tt + dtt, d, nt); } } } } // used by bbsavestate since during restore, some NetCon spikes may // have already been delivered while others need to be delivered in // the future. Not implemented fof qthresh_ case. No statistics. void PreSyn::fanout(double td, NetCvode* ns, NrnThread* nt) { int i, n = dil_.count(); for (i=0; i < n; ++i) { NetCon* d = dil_.item(i); if (d->active_ && d->target_ && PP2NT(d->target_) == nt) { double dtt = d->delay_ - delay_; ns->bin_event(td + dtt, d, nt); } } } NrnThread* PreSyn::thread() { return nt_; } void PreSyn::pgvts_deliver(double tt, NetCvode* ns) { NrnThread* nt = 0; assert(0); if (qthresh_) { qthresh_ = nil; //printf("PreSyn::deliver %s condition event tt=%20.15g\n", ssrc_?secname(ssrc_):"", tt); STATISTICS(deliver_qthresh_); send(tt, ns, nt); return; } int i, n = dil_.count(); STATISTICS(presyn_deliver_netcon_); for (i=0; i < n; ++i) { NetCon* d = dil_.item(i); if (d->active_ && d->target_) { double dtt = d->delay_ - delay_; if (0 && dtt == 0.) { STATISTICS(presyn_deliver_direct_); STATISTICS(deliver_cnt_); d->deliver(tt, ns, nt); }else if (dtt < 0.) { hoc_execerror("internal error: Source delay is > NetCon delay", 0); }else{ STATISTICS(presyn_deliver_ncsend_); ns->event(tt + dtt, d, nt); } } } } void PreSyn::pr(const char* s, double tt, NetCvode* ns) { printf("%s", s); printf(" PreSyn src=%s", osrc_ ? hoc_object_name(osrc_):secname(ssrc_)); printf(" %.15g\n", tt); } SelfEvent::SelfEvent() {} SelfEvent::~SelfEvent() {} DiscreteEvent* SelfEvent::savestate_save() { // pr("savestate_save", 0, net_cvode_instance); SelfEvent* se = new SelfEvent(); se->flag_ = flag_; se->target_ = target_; se->weight_ = weight_; se->movable_ = movable_; return se; } void SelfEvent::savestate_restore(double tt, NetCvode* nc) { // pr("savestate_restore", tt, nc); net_send(movable_, weight_, target_, tt, flag_); } DiscreteEvent* SelfEvent::savestate_read(FILE* f) { SelfEvent* se = new SelfEvent(); char buf[300]; char ppname[200]; int ppindex, ncindex, moff, pptype, iml; double flag; Object* obj; assert(fgets(buf, 300, f)); assert(sscanf(buf, "%s %d %d %d %d %lf\n", ppname, &ppindex, &pptype, &ncindex, &moff, &flag) == 6); #if 0 // use of hoc_name2obj is way too inefficient se->target_ = ob2pntproc(hoc_name2obj(ppname, ppindex)); #else se->target_ = SelfEvent::index2pp(pptype, ppindex); #endif se->weight_ = nil; if (ncindex >= 0) { #if 0 // extremely inefficient. There are a LOT of NetCon. obj = hoc_name2obj("NetCon", ncindex); assert(obj); NetCon* nc = (NetCon*)obj->u.this_pointer; #else NetCon* nc = NetConSave::index2netcon(ncindex); #endif se->weight_ = nc->weight_; } se->flag_ = flag; se->movable_ = nil; if (moff >= 0) { se->movable_ = &(se->target_->prop->dparam[moff]._pvoid); } return se; } // put following here to avoid conflict with gnu vector declareNrnHash(SelfEventPPTable, long, Point_process*) implementNrnHash(SelfEventPPTable, long, Point_process*) SelfEventPPTable* SelfEvent::sepp_; Point_process* SelfEvent::index2pp(int type, int oindex) { // code the type and object index together Point_process* pp; if (!sepp_) { int i; sepp_ = new SelfEventPPTable(211); // should only be the ones that call net_send for (i=0; i < n_memb_func; ++i) if (pnt_receive[i]) { hoc_List* hl = nrn_pnt_template_[i]->olist; hoc_Item* q; ITERATE (q, hl) { Object* o = OBJ(q); pp = ob2pntproc(o); (*sepp_)[i + n_memb_func * o->index] = pp; } } } assert(sepp_->find(type + n_memb_func*oindex, pp)); return pp; } void SelfEvent::savestate_free() { if (sepp_) { delete sepp_; sepp_ = 0; } } void SelfEvent::savestate_write(FILE* f) { fprintf(f, "%d\n", SelfEventType); int moff = -1; if (movable_) { moff = (Datum*)(movable_) - target_->prop->dparam; assert(movable_ == &(target_->prop->dparam[moff]._pvoid)); } int ncindex = -1; // find the NetCon index for weight_ if (weight_) { NetCon* nc = NetConSave::weight2netcon(weight_); assert(nc); ncindex = nc->obj_->index; } fprintf(f, "%s %d %d %d %d %g\n", target_->ob->ctemplate->sym->name, target_->ob->index, target_->prop->type, ncindex, moff, flag_ ); } void SelfEvent::deliver(double tt, NetCvode* ns, NrnThread* nt) { Cvode* cv = (Cvode*)target_->nvi_; int type = target_->prop->type; assert(nt == PP2NT(target_)); if (nrn_use_selfqueue_ && nrn_is_artificial_[type]) { // handle possible earlier flag=1 self event if (flag_ == 1.0) { *movable_ = 0; } TQItem* q; while ((q = (TQItem*)(*movable_)) != 0 && q->t_ <= tt) { //printf("handle earlier %g selfqueue event from within %g SelfEvent::deliver\n", q->t_, tt); double t1 = q->t_; SelfEvent* se = (SelfEvent*)ns->p[nt->id].selfqueue_->remove(q); PP2t(target_) = t1; se->call_net_receive(ns); } } if (cvode_active_ && cv) { ns->local_retreat(tt, cv); cv->set_init_flag(); }else{ PP2t(target_) = tt; } //printf("SelfEvent::deliver t=%g tt=%g %s\n", PP2t(target), tt, hoc_object_name(target_->ob)); call_net_receive(ns); } NrnThread* SelfEvent::thread() { return PP2NT(target_); } void SelfEvent::pgvts_deliver(double tt, NetCvode* ns) { call_net_receive(ns); } void SelfEvent::call_net_receive(NetCvode* ns) { STATISTICS(selfevent_deliver_); POINT_RECEIVE(target_->prop->type, target_, weight_, flag_); if (errno) { if (nrn_errno_check(target_->prop->type)) { hoc_warning("errno set during SelfEvent deliver to NET_RECEIVE", (char*)0); } } NetCvodeThreadData& nctd = ns->p[PP2NT(target_)->id]; --nctd.unreffed_event_cnt_; nctd.sepool_->hpfree(this); } void SelfEvent::pr(const char* s, double tt, NetCvode* ns) { printf("%s", s); printf(" SelfEvent target=%s %.15g flag=%g\n", hoc_object_name(target_->ob), tt, flag_); } void PlayRecordEvent::frecord_init(TQItem* q) { plr_->frecord_init(q); } void PlayRecordEvent::deliver(double tt, NetCvode* ns, NrnThread* nt) { if (plr_->cvode_ && plr_->cvode_->nth_) { assert(nt == plr_->cvode_->nth_); ns->local_retreat(tt, plr_->cvode_); } STATISTICS(playrecord_deliver_); plr_->deliver(tt, ns); } NrnThread* PlayRecordEvent::thread() { return nrn_threads + plr_->ith_; } void PlayRecordEvent::pr(const char* s, double tt, NetCvode* ns) { printf("%s PlayRecordEvent %.15g ", s, tt); plr_->pr(); } // For localstep makes sure all cvode instances are at this time and // makes sure the continuous record records values at this time. TstopEvent::TstopEvent() {} TstopEvent::~TstopEvent() {} void TstopEvent::deliver(double tt, NetCvode* ns, NrnThread* nt) { STATISTICS(discretevent_deliver_); ns->handle_tstop_event(tt, nt); } void TstopEvent::pgvts_deliver(double tt, NetCvode* ns) { assert(0); deliver(tt, ns, 0); } void TstopEvent::pr(const char* s, double tt, NetCvode* ns) { printf("%s TstopEvent %.15g\n", s, tt); } DiscreteEvent* TstopEvent::savestate_save() { // pr("savestate_save", 0, net_cvode_instance); if (this != tstop_event_) { hoc_execerror("TstopEvent::savestate_save:", " is not the tstop_event_"); } return new TstopEvent(); } void TstopEvent::savestate_restore(double tt, NetCvode* nc) { // pr("savestate_restore", tt, nc); printf("tstop_event_ onto queue\n"); nc->tstop_event(tt); } DiscreteEvent* TstopEvent::savestate_read(FILE* f) { return new TstopEvent(); } void TstopEvent::savestate_write(FILE* f) { fprintf(f, "%d\n", TstopEventType); } #include void NetCvode::local_retreat(double t, Cvode* cv) { if (!cvode_active_) { return; } TQueue* tq = p[cv->nth_ ? cv->nth_->id : 0].tq_; if (tq) { #if PRINT_EVENT if (print_event_) { printf("microstep local retreat from %g (cvode_%p is at %g) for event onset=%g\n", cv->tqitem_->t_, cv, cv->t_, t); } #endif cv->interpolate(t); tq->move(cv->tqitem_, t); #if PRINT_EVENT if (print_event_ > 1) { printf("after target solve time for %p is %g , dt=%g\n", cv, cv->time(), nt_dt); } #endif }else{ assert(t == cv->t_ || ( cv->tstop_begin_ <= t && t <= cv->tstop_end_)); } } void NetCvode::retreat(double t, Cvode* cv) { if (!cvode_active_) { return; } TQueue* tq = p[cv->nth_ ? cv->nth_->id : 0].tq_; #if PRINT_EVENT if (print_event_) { printf("microstep retreat from %g (cvode_%p is at %g) for event onset=%g\n", tq ? cv->tqitem_->t_ : cv->t_, cv, cv->t_, t); } #endif cv->interpolate(t); if (tq) { tq->move(cv->tqitem_, t); } #if PRINT_EVENT if (print_event_ > 1) { printf("after target solve time for %p is %g , dt=%g\n", cv, cv->time(), dt); } #endif } #if USENEOSIM bool neosim_deliver_self_events(TQueue* tqe, double til); bool neosim_deliver_self_events(TQueue* tqe, double til) { bool b; TQItem* q; DiscreteEvent* d; b = false; while (tqe->least_t() <= til + .5e-8) { b = true; q = tqe->least(); t = q->t_; d = (DiscreteEvent*)q->data_; assert(d->type() == SelfEventType); tqe->remove(q); d->deliver(t, net_cvode_instance); } } void neosim2nrn_advance(void* e, void* v, double tout) { neosim_entity_ = e; NetCon* d = (NetCon*)v; TQueue* tqe; // now can integrate to tout since it is guaranteed there will // be no further real events to this cell before tout. // but we must handle self events. The implementation is // analogous to the NetCvode::solve with single and tout Cvode* cv = (Cvode*)d->target_->nvi_; // so self event from INITIAL block tqe = cv->neosim_self_events_; // not a bug even if there is no BREAKPOINT block. I.e. // artificial cells will work. t = cv->time(); while (tout > t) { do { cv->check_deliver(); }while (neosim_deliver_self_events(tqe, t)); cv->solve(); } cv->interpolate(tout); cv->check_deliver(); } void neosim2nrn_deliver(void* e, void* v) { neosim_entity_ = e; NetCon* d = (NetCon*)v; Cvode* cv = (Cvode*)d->target_->nvi_; d->deliver(cv->t_, net_cvode_instance); } #endif //parallel global variable time-step int NetCvode::pgvts(double tstop) { int err = NVI_SUCCESS; double tt = nt_t; while (tt < tstop && !stoprun && err == NVI_SUCCESS) { err = pgvts_event(tt); } return err; } // parallel global variable time-step event handling // return is what cvode call to make and the value of tt to make it at // in response to the next global event. We try to do only one // allreduce for a given event. Since all processes have to stay together // with respect to cvode, we have to factor out those calls from the // classical DiscreteEvent::deliver methods. I.e. deliver can only // deliver an event, it cannot interpolate, etc. // Assume events are sparse and handle them one at a time. int NetCvode::pgvts_event(double& tt) { int rank, op, err, init; DiscreteEvent* de; assert(gcv_); de = pgvts_least(tt, op, init); err = pgvts_cvode(tt, op); if (init) { gcv_->set_init_flag(); } if (de) { // handle the event and others just like it de->pgvts_deliver(tt, this); while (p[0].tqe_->least_t() == tt) { TQItem* q = p[0].tqe_->least(); de = (DiscreteEvent*)q->data_; int i1; if (de->pgvts_op(i1) == op && i1 == init) { p[0].tqe_->remove(q); de->pgvts_deliver(tt, this); }else{ break; } } } if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } return err; } DiscreteEvent* NetCvode::pgvts_least(double& tt, int& op, int& init) { DiscreteEvent* de = nil; #if PARANEURON TQItem* q = nil; if (gcv_->initialize_ && p[0].tqe_->least_t() > gcv_->t_) { tt = gcv_->t_; op = 3; init = 0; }else if (gcv_->tn_ < p[0].tqe_->least_t()) { tt = gcv_->tn_; op = 1; init = 0; }else{ // If there are several events at the same time we need the // highest priority (in particular, NetParEvent last). // This is due to the fact that NetParEvent.deliver // handles all the events at that time so there better not // be any after it on the queue. q = p[0].tqe_->least(); if (q) { de = (DiscreteEvent*)q->data_; tt = q->t_; op = de->pgvts_op(init); if (op == 4) { // is there another event at the same time? TQItem* q2 = p[0].tqe_->second_least(tt); if (q2) { q = q2; de = (DiscreteEvent*)q2->data_; op = de->pgvts_op(init); assert(op != 4); //printf("%d Type %d event after NetParEvent with deliver %g and t=%g\n", nrnmpi_myid, de->type(), tt, gcv_->t_); } } }else{ tt = 1e20; op = 1; init = 0; } } double ts = tt; int ops = op; if (nrnmpi_pgvts_least(&tt, &op, &init)) { if (q) { p[0].tqe_->remove(q); } }else if (op == 4) {//NetParEvent need to be done all together p[0].tqe_->remove(q); }else if (ts == tt && q && ops == op) { // safe to do this event as well p[0].tqe_->remove(q); }else{ de = nil; } #endif return de; } int NetCvode::pgvts_cvode(double tt, int op) { int err = NVI_SUCCESS; // this is the only place where we can enter cvode switch (op) { case 1: // advance if (condition_order() == 1) { gcv_->check_deliver(); } gcv_->record_continuous(); err = gcv_->advance_tn(); if (condition_order() == 2) { gcv_->evaluate_conditions(); } break; case 2: // interpolate err = gcv_->interpolate(tt); break; case 3: // initialize err = gcv_->init(tt); initialized_ = true; if (condition_order() == 2) { gcv_->evaluate_conditions(); } break; } return err; } bool NetCvode::use_partrans() { #if PARANEURON if ( gcv_) { return gcv_->use_partrans_; } else { return 0; } #endif return 0; } void ncs2nrn_integrate(double tstop) { double ts; nrn_use_busywait(1); // just a possibility if (cvode_active_) { #if PARANEURON if (net_cvode_instance->use_partrans()) { net_cvode_instance->pgvts(tstop); t = nt_t; dt = nt_dt; }else #endif { net_cvode_instance->solve(tstop); t = nt_t; dt = nt_dt; } }else{ #if 1 int n = (int)((tstop - nt_t)/dt + 1e-9); if (n > 3 && !nrnthread_v_transfer_) { nrn_fixed_step_group(n); }else #endif { #if NRNMPI && !defined(USENCS) ts = tstop - dt; assert(nt_t <= tstop); // It may very well be the case that we do not advance at all while (nt_t <= ts) { #else ts = tstop - .5*dt; while (nt_t < ts) { #endif nrn_fixed_step(); if (stoprun) {break;} } } } // handle all the pending flag=1 self events for (int i=0; i < nrn_nthread; ++i) { assert(nrn_threads[i]._t == nt_t);} all_pending_selfqueue(nt_t); nrn_use_busywait(0); // certainly not } TQueue* NetCvode::event_queue(NrnThread* nt) { return p[nt->id].tqe_; } static double pending_selfqueue_deliver_; static void* pending_selfqueue(NrnThread* nt) { nrn_pending_selfqueue(pending_selfqueue_deliver_, nt); return 0; } void nrn_pending_selfqueue(double tt, NrnThread* nt) { NetCvodeThreadData& nctd = net_cvode_instance->p[nt->id]; double ts = nt->_t; // net_cvode_instance->deliver_events(nctd.immediate_deliver_, nt); SelfQueue* sq = nctd.selfqueue_; TQItem* q1, *q2; nctd.immediate_deliver_ = tt; for (q1 = sq->first(); q1; q1 = q2) { if (q1->t_ <= tt) { SelfEvent* se = (SelfEvent*)q1->data_; //printf("ncs2nrn_integrate %g SelfEvent for %s at %g\n", tstop, hoc_object_name(se->target_->ob), q1->t_); se->deliver(q1->t_, net_cvode_instance, nt); // could it add another self-event?, check before removal q2 = sq->next(q1); sq->remove(q1); }else{ q2 = sq->next(q1); } } assert(nctd.tqe_->least_t() >= tt); nt->_t = ts; nctd.immediate_deliver_ = -1e100; } // only the main thread can calls this static void all_pending_selfqueue(double tt) { if (nrn_use_selfqueue_) { nrn_wait_for_threads(); //for (int i=0; i < nrn_nthread; ++i) { assert(nrn_threads[i]._t == nt_t);} pending_selfqueue_deliver_ = tt; nrn_multithread_job(pending_selfqueue); } } #if USENCS void ncs2nrn_inputevent(int i, double tdeliver) { NrnThread* nt = nrn_threads; net_cvode_instance->event(tdeliver, ncs2nrn_input_->item(i), nt); } // hoc tells us which are the input NetCons and which are the // output NetCons void nrn2ncs_netcons() { int i; Object* o; NetCon* nc; o = *hoc_objgetarg(1); check_obj_type(o, "List"); OcList* list = (OcList*)(o->u.this_pointer); if (ncs2nrn_input_) { for (i=0; i < ncs2nrn_input_->count(); ++i) { hoc_obj_unref(ncs2nrn_input_->item(i)->obj_); } ncs2nrn_input_->remove_all(); }else{ ncs2nrn_input_ = new NetConPList(list->count()); } for (i=0; i < list->count(); ++i) { hoc_obj_ref(list->object(i)); nc = (NetCon*)(list->object(i)->u.this_pointer); ncs2nrn_input_->append(nc); } o = *hoc_objgetarg(2); check_obj_type(o, "List"); list = (OcList*)(o->u.this_pointer); for (i=0; i < list->count(); ++i) { nc = (NetCon*)(list->object(i)->u.this_pointer); assert(nc->src_); nc->src_->output_index_ = i; } } #endif //USENCS void NetCvode::statistics(int i) { int id, j, ii = 0; if (gcv_) { gcv_->statistics(); }else{ lvardtloop(id, j) { if (i < 0 || ii++ == i) { p[id].lcv_[j].statistics(); } } } printf("NetCon active=%lu (not sent)=%lu delivered=%lu\n", NetCon::netcon_send_active_, NetCon::netcon_send_inactive_, NetCon::netcon_deliver_); printf("Condition O2 thresh detect=%lu via init=%lu effective=%lu abandoned=%lu (unnecesarily=%lu init+=%lu init-=%lu above=%lu below=%lu)\n",ConditionEvent::send_qthresh_, ConditionEvent::init_above_, ConditionEvent::deliver_qthresh_, ConditionEvent::abandon_, ConditionEvent::eq_abandon_, ConditionEvent::abandon_init_above_, ConditionEvent::abandon_init_below_, ConditionEvent::abandon_above_, ConditionEvent::abandon_below_); printf("PreSyn send: mindelay=%lu direct=%lu\n", PreSyn::presyn_send_mindelay_, PreSyn::presyn_send_direct_); printf("PreSyn deliver: O2 thresh=%lu NetCon=%lu (send=%lu deliver=%lu)\n", ConditionEvent::deliver_qthresh_, PreSyn::presyn_deliver_netcon_, PreSyn::presyn_deliver_ncsend_, PreSyn::presyn_deliver_direct_); printf("SelfEvent send=%lu move=%lu deliver=%lu\n", SelfEvent::selfevent_send_, SelfEvent::selfevent_move_, SelfEvent::selfevent_deliver_); printf("Watch send=%lu deliver=%lu\n", WatchCondition::watch_send_, WatchCondition::watch_deliver_); printf("PlayRecord send=%lu deliver=%lu\n", PlayRecordEvent::playrecord_send_, PlayRecordEvent::playrecord_deliver_); printf("HocEvent send=%lu deliver=%lu\n", HocEvent::hocevent_send_, HocEvent::hocevent_deliver_); printf("SingleEvent deliver=%lu move=%lu\n", KSSingle::singleevent_deliver_, KSSingle::singleevent_move_); printf("DiscreteEvent send=%lu deliver=%lu\n", DiscreteEvent::discretevent_send_, DiscreteEvent::discretevent_deliver_); printf("%lu total events delivered net_event=%lu\n", deliver_cnt_, net_event_cnt_); printf("Discrete event TQueue\n"); p[0].tqe_->statistics(); if (p[0].tq_) { printf("Variable step integrator TQueue\n"); p[0].tq_->statistics(); } } void NetCvode::spike_stat() { Vect* v = vector_arg(1); v->resize(11); double* d = vector_vec(v); int i, j, n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i,j) { n += p[i].lcv_[j].neq_; } } d[0] = n; Symbol* nc = hoc_lookup("NetCon"); d[1] = nc->u.ctemplate->count; d[2] = deliver_cnt_; d[3] = NetCon::netcon_deliver_; d[4] = PreSyn::presyn_send_mindelay_ + PreSyn::presyn_send_direct_; d[5] = SelfEvent::selfevent_deliver_; d[6] = SelfEvent::selfevent_send_; d[7] = SelfEvent::selfevent_move_; // should do all threads p[0].tqe_->spike_stat(d+8); } void NetCvode::solver_prepare() { int i, j; fornetcon_prepare(); if (nrn_modeltype() == 0) { delete_list(); }else{ init_global(); if (cvode_active_) { if (matrix_change_cnt_ != nrn_matrix_cnt_) { structure_change(); matrix_change_cnt_ = nrn_matrix_cnt_; } if (gcv_) { gcv_->use_daspk_ = nrn_use_daspk_; gcv_->init_prepare(); // since there may be Vector.play events and INITIAL send events // at time 0 before actual initialization of integrators. gcv_->can_retreat_ = false; }else{ lvardtloop(i,j) { Cvode& cv = p[i].lcv_[j]; cv.use_daspk_ = nrn_use_daspk_; cv.init_prepare(); cv.can_retreat_ = false; } } } } if (playrec_change_cnt_ != structure_change_cnt_) { playrec_setup(); } } void NetCvode::re_init(double t) { int i, j, k, l; if (nrn_modeltype() == 0) { if (gcv_) { gcv_->t_ = t; gcv_->tn_ = t; }else{ lvardtloop(i,j) { Cvode& cv = p[i].lcv_[j]; cv.t_ = t; cv.tn_ = t; } } return; } double dtsav = nt_dt; solver_prepare(); if (gcv_) { gcv_->stat_init(); gcv_->init(t); if (condition_order() == 2) { gcv_->evaluate_conditions(); } }else{ lvardtloop(i, j) { Cvode& cv = p[i].lcv_[j]; cv.stat_init(); cv.init(t); cv.tqitem_->t_ = t; if (condition_order() == 2) { cv.evaluate_conditions(); } } } nt_dt = dtsav; } void NetCvode::fornetcon_prepare() { NrnThread* nt; NrnThreadMembList* tml; if (fornetcon_change_cnt_ == structure_change_cnt) { return; } fornetcon_change_cnt_ = structure_change_cnt; if (nrn_fornetcon_cnt_ == 0) { return; } int i, j; // initialize a map from type to dparam index, -1 means no FOR_NETCONS statement int* t2i = new int[n_memb_func]; for (i=0; i < n_memb_func; ++i) { t2i[i] = -1; } // create ForNetConsInfo in all the relevant point processes // and fill in the t2i map. for (i = 0; i < nrn_fornetcon_cnt_; ++i) { int index = nrn_fornetcon_index_[i]; int type = nrn_fornetcon_type_[i]; t2i[type] = index; if (nrn_is_artificial_[type]) { Memb_list* m = memb_list + type; for (j = 0; j < m->nodecount; ++j) { void** v = &(m->pdata[j][index]._pvoid); _nrn_free_fornetcon(v); ForNetConsInfo* fnc = new ForNetConsInfo; *v = fnc; fnc->argslist = 0; fnc->size = 0; } }else{ FOR_THREADS(nt) for(tml = nt->tml; tml; tml = tml->next) if (tml->index == type) { Memb_list* m = tml->ml; for (j = 0; j < m->nodecount; ++j) { void** v = &(m->pdata[j][index]._pvoid); _nrn_free_fornetcon(v); ForNetConsInfo* fnc = new ForNetConsInfo; *v = fnc; fnc->argslist = 0; fnc->size = 0; } } } } // two loops over all netcons. one to count, one to fill in argslist // count hoc_Item* q; if (psl_) ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); NetConPList& dil = ps->dil_; for (int i=0; i < dil.count(); ++i) { NetCon* d1 = dil.item(i); Point_process* pnt = d1->target_; if (pnt && t2i[pnt->prop->type] > -1) { ForNetConsInfo* fnc = (ForNetConsInfo*)pnt->prop->dparam[t2i[pnt->prop->type]]._pvoid; assert(fnc); fnc->size += 1; } } } // allocate argslist space and initialize for another count for (i = 0; i < nrn_fornetcon_cnt_; ++i) { int index = nrn_fornetcon_index_[i]; int type = nrn_fornetcon_type_[i]; if (nrn_is_artificial_[type]) { Memb_list* m = memb_list + type; for (j = 0; j < m->nodecount; ++j) { ForNetConsInfo* fnc = (ForNetConsInfo*)m->pdata[j][index]._pvoid; if (fnc->size > 0) { fnc->argslist = new double*[fnc->size]; fnc->size = 0; } } }else{ FOR_THREADS(nt) for(tml = nt->tml; tml; tml = tml->next) if (tml->index == nrn_fornetcon_type_[i]) { Memb_list* m = tml->ml; for (j = 0; j < m->nodecount; ++j) { ForNetConsInfo* fnc = (ForNetConsInfo*)m->pdata[j][index]._pvoid; if (fnc->size > 0) { fnc->argslist = new double*[fnc->size]; fnc->size = 0; } } } } } // fill in argslist and count again if (psl_) ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); NetConPList& dil = ps->dil_; for (int i=0; i < dil.count(); ++i) { NetCon* d1 = dil.item(i); Point_process* pnt = d1->target_; if (pnt && t2i[pnt->prop->type] > -1) { ForNetConsInfo* fnc = (ForNetConsInfo*)pnt->prop->dparam[t2i[pnt->prop->type]]._pvoid; fnc->argslist[fnc->size] = d1->weight_; fnc->size += 1; } } } delete [] t2i; } int _nrn_netcon_args(void* v, double*** argslist) { ForNetConsInfo* fnc = (ForNetConsInfo*)v; assert(fnc); *argslist = fnc->argslist; return fnc->size; } void _nrn_free_fornetcon(void** v) { ForNetConsInfo* fnc = (ForNetConsInfo*)(*v); if (fnc) { if (fnc->argslist) { delete [] fnc->argslist; } delete fnc; *v = nil; } } extern "C" { void record_init_clear(const TQItem* q, int) { DiscreteEvent* d = (DiscreteEvent*)q->data_; d->frecord_init((TQItem*)q); } }; void NetCvode::record_init() { int i, cnt = prl_->count(); if (cnt) { // there may be some events on the queue descended from // finitialize that need to be removed record_init_items_->remove_all(); p[0].tqe_->forall_callback(record_init_clear); int j, jcnt = record_init_items_->count(); for (j=0; j < jcnt; ++j) { p[0].tqe_->remove(record_init_items_->item(j)); } record_init_items_->remove_all(); } for (i=0; i < cnt; ++i) { prl_->item(i)->record_init(); } } void NetCvode::play_init() { int i, cnt = prl_->count(); for (i=0; i < cnt; ++i) { prl_->item(i)->play_init(); } } int NetCvode::cellindex() { Section* sec = chk_access(); int i, j, ii; if (single_) { return 0; }else{ ii = 0; lvardtloop(i, j) { if (sec == p[i].lcv_[j].ctd_[0].v_node_[p[i].lcv_[j].ctd_[0].rootnodecount_]->sec) { return ii; } ii++; } } hoc_execerror(secname(sec), " is not the root section for any local step cvode instance"); return 0; } void NetCvode::states() { int i, j, k, n; Vect* v = vector_arg(1); if (!cvode_active_){ v->resize(0); return; } double* vp; n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i, j) { n += p[i].lcv_[j].neq_; } } v->resize(n); vp = vector_vec(v); k = 0; if (gcv_) { gcv_->states(vp); }else{ lvardtloop(i, j) { p[i].lcv_[j].states(vp+k); k += p[i].lcv_[j].neq_; } } } void NetCvode::dstates() { int i, j, k, n; Vect* v = vector_arg(1); if (!cvode_active_){ v->resize(0); return; } double* vp; n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i, j) { n += p[i].lcv_[j].neq_; } } v->resize(n); vp = vector_vec(v); k = 0; if (gcv_) { gcv_->dstates(vp); }else{ lvardtloop(i, j) { p[i].lcv_[j].dstates(vp+k); k += p[i].lcv_[j].neq_; } } } void nrn_cvfun(double t, double* y, double* ydot) { NetCvode* d = net_cvode_instance; d->gcv_->fun_thread(t, y, ydot, nrn_threads); } double nrn_hoc2fixed_step(void*) { nrn_fixed_step(); return 0.; } double nrn_hoc2fun(void* v) { NetCvode* d = (NetCvode*)v; double tt = *getarg(1); Vect* s = vector_arg(2); Vect* ds = vector_arg(3); if (!d->gcv_){hoc_execerror("not global variable time step", 0);} if (s->capacity() != d->gcv_->neq_) { hoc_execerror("size of state vector != number of state equations", 0); } if (nrn_nthread > 1) {hoc_execerror("only one thread allowed", 0);} ds->resize(s->capacity()); nrn_cvfun(tt, vector_vec(s), vector_vec(ds)); return 0.; } double nrn_hoc2scatter_y(void* v) { NetCvode* d = (NetCvode*)v; Vect* s = vector_arg(1); if (!d->gcv_){hoc_execerror("not global variable time step", 0);} if (s->capacity() != d->gcv_->neq_) { hoc_execerror("size of state vector != number of state equations", 0); } if (nrn_nthread > 1) {hoc_execerror("only one thread allowed", 0);} d->gcv_->scatter_y(vector_vec(s), 0); return 0.; } double nrn_hoc2gather_y(void* v) { NetCvode* d = (NetCvode*)v; Vect* s = vector_arg(1); if (!d->gcv_){hoc_execerror("not global variable time step", 0);} if (nrn_nthread > 1) {hoc_execerror("only one thread allowed", 0);} s->resize(d->gcv_->neq_); d->gcv_->gather_y(vector_vec(s), 0); return s->capacity(); } void NetCvode::error_weights() { int i, j, k, n; Vect* v = vector_arg(1); if (!cvode_active_){ v->resize(0); return; } double* vp; n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i, j) { n += p[i].lcv_[j].neq_; } } v->resize(n); vp = vector_vec(v); k = 0; if (gcv_) { gcv_->states(vp + j); }else{ lvardtloop(i, j) { p[i].lcv_[j].error_weights(vp+k); k += p[i].lcv_[j].neq_; } } } void NetCvode::acor() { int i, j, k, n; Vect* v = vector_arg(1); if (!cvode_active_){ v->resize(0); return; } double* vp; n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i, j) { n += p[i].lcv_[j].neq_; } } v->resize(n); vp = vector_vec(v); k = 0; if (gcv_) { gcv_->states(vp + j); }else{ lvardtloop(i, j) { p[i].lcv_[j].acor(vp+k); k += p[i].lcv_[j].neq_; } } } const char* NetCvode::statename(int is, int style) { int i, it, j, n, neq; if (!cvode_active_){ hoc_execerror("Cvode is not active", 0); } double** pv; n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i, j) { n += p[i].lcv_[j].neq_; } } if (is >= n) { hoc_execerror("Cvode::statename argument out of range", 0); } if (!hdp_ || hdp_->style() != style) { if (hdp_) { delete hdp_; } hdp_ = new HocDataPaths(2*n, style); if (gcv_) { for (it=0; it < nrn_nthread; ++it){ neq = gcv_->ctd_[it].nvsize_; pv = gcv_->ctd_[it].pv_; for (j=0; j < neq; ++j) { hdp_->append(pv[j]); } } }else{ lvardtloop(it, i) { neq = p[it].lcv_[i].ctd_[0].nvsize_; pv = p[it].lcv_[i].ctd_[0].pv_; for (j=0; j < neq; ++j) { hdp_->append(pv[j]); } } } hdp_->search(); } j = 0; if (gcv_) { for (it=0; it < nrn_nthread; ++it){ CvodeThreadData& z = gcv_->ctd_[it]; if (j + z.nvoffset_ + z.nvsize_ > is) { if (style == 2) { Symbol* sym = hdp_->retrieve_sym(z.pv_[is - j]); assert(sym); return sym2name(sym); }else{ String* s = hdp_->retrieve(z.pv_[is - j]); if (s) { return s->string(); }else{ return "unknown"; } } } j += z.nvsize_; } }else{ lvardtloop(it, i) { if (j + p[it].lcv_[i].neq_ > is) { CvodeThreadData& z = p[it].lcv_[i].ctd_[0]; if (style == 2) { Symbol* sym = hdp_->retrieve_sym(z.pv_[is - j]); assert(sym); return sym2name(sym); }else{ String* s = hdp_->retrieve(z.pv_[is - j]); if (s) { return s->string(); }else{ return "unknown"; } } } j += p[it].lcv_[i].neq_; } } return "unknown"; } const char* NetCvode::sym2name(Symbol* sym) { if (sym->type == RANGEVAR && sym->u.rng.type > 1 && memb_func[sym->u.rng.type].is_point) { static char buf[200]; sprintf(buf, "%s.%s", memb_func[sym->u.rng.type].sym->name, sym->name); return buf; }else{ return sym->name; } } Symbol* NetCvode::name2sym(const char* name) { char* buf = new char[strlen(name)+1]; strcpy(buf, name); char* cp; for (cp = buf; *cp; ++cp) { if (*cp == '.') { *cp = '\0'; ++cp; break; } } Symbol* sym = hoc_table_lookup(buf, hoc_built_in_symlist); if (!sym) { sym = hoc_table_lookup(buf, hoc_top_level_symlist); } if (sym && *cp == '\0' && (sym->type == RANGEVAR || strcmp(sym->name, "Vector") == 0)) { delete [] buf; return sym; }else if (sym && sym->type == TEMPLATE && *cp != '\0') { sym = hoc_table_lookup(cp, sym->u.ctemplate->symtable); if (sym) { delete [] buf; return sym; } } delete [] buf; hoc_execerror(name, "must be in form rangevar or Template.var"); return nil; } void NetCvode::rtol(double x) { rtol_ = x; } void NetCvode::atol(double x) { atol_ = x; } void NetCvode::stiff(int x) { if ((stiff_ == 0) != (x == 0)) { // need to free if change between 0 and nonzero if (gcv_) { gcv_->free_cvodemem(); }else{ int i, j; lvardtloop(i,j) { p[i].lcv_[j].free_cvodemem(); } } } stiff_ = x; } void NetCvode::maxorder(int x) { maxorder_ = x; if (gcv_) { gcv_->maxorder(maxorder_); }else{ int i, j; lvardtloop(i,j) { p[i].lcv_[j].maxorder(maxorder_); } } } int NetCvode::order(int ii) { int o = 0; if (gcv_) { o = gcv_->order(); }else{ int i, j, i2 = 0; lvardtloop(i,j) { if (ii == i2++) { o = p[i].lcv_[j].order(); } } } return o; } void NetCvode::minstep(double x) { minstep_ = x; if (gcv_) { gcv_->minstep(minstep_); }else{ int i, j; lvardtloop(i,j) { p[i].lcv_[j].minstep(minstep_); } } } void NetCvode::maxstep(double x) { maxstep_ = x; if (gcv_) { gcv_->maxstep(maxstep_); }else{ int i, j; lvardtloop(i,j) { p[i].lcv_[j].maxstep(maxstep_); } } } void NetCvode::jacobian(int x) { jacobian_ = x; } void NetCvode::structure_change() { if (gcv_) { gcv_->structure_change_ = true; }else{ int i, j; lvardtloop(i,j) { p[i].lcv_[j].structure_change_ = true; } } } NetCon* NetCvode::install_deliver(double* dsrc, Section* ssrc, Object* osrc, Object* target, double threshold, double delay, double magnitude ) { PreSyn* ps = nil; double* psrc = nil; int i; if (ssrc) { consist_sec_pd("NetCon", ssrc, dsrc); } if (!pst_) { pst_ = new PreSynTable(1000); pst_cnt_ = 0; } if (!psl_) { psl_ = hoc_l_newlist(); } if (osrc) { if (dsrc) { psrc = dsrc; }else{ char buf[256]; if (hoc_table_lookup("x", osrc->ctemplate->symtable)) { sprintf(buf, "%s.x", hoc_object_name(osrc)); psrc = hoc_val_pointer(buf); } } }else{ psrc = dsrc; } if (psrc) { if (!pst_->find(ps, psrc)) { ps = new PreSyn(psrc, osrc, ssrc); ps->hi_ = hoc_l_insertvoid(psl_, ps); pst_->insert(psrc, ps); ++pst_cnt_; } if (threshold != -1e9) { ps->threshold_ = threshold; } }else if (osrc){ Point_process* pnt = ob2pntproc(osrc); if (pnt->presyn_) { ps = (PreSyn*)pnt->presyn_; }else{ ps = new PreSyn(psrc, osrc, ssrc); if (threshold != -1e9) { ps->threshold_ = threshold; } ps->hi_ = hoc_l_insertvoid(psl_, ps); pnt->presyn_ = ps; } }else if (target) { // no source so use the special presyn if (!unused_presyn) { unused_presyn = new PreSyn(nil, nil, nil); unused_presyn->hi_ = hoc_l_insertvoid(psl_, unused_presyn); } ps = unused_presyn; } ps_thread_link(ps); NetCon* d = new NetCon(ps, target); d->delay_ = delay; d->weight_[0] = magnitude; structure_change_cnt_ = 0; return d; } void NetCvode::psl_append(PreSyn* ps) { if (!psl_) { psl_ = hoc_l_newlist(); } ps->hi_ = hoc_l_insertvoid(psl_, ps); } void NetCvode::presyn_disconnect(PreSyn* ps) { if (ps == unused_presyn) { unused_presyn = nil; } if (ps->hi_) { hoc_l_delete(ps->hi_); ps->hi_ = nil; } if (ps->hi_th_) { hoc_l_delete(ps->hi_th_); ps->hi_th_ = nil; } if (ps->thvar_) { --pst_cnt_; pst_->remove(ps->thvar_); ps->thvar_ = nil; } if (gcv_) { for (int it = 0; it < gcv_->nctd_; ++it) { PreSynList* psl = gcv_->ctd_[it].psl_th_; if (psl) for (int j = 0; j < psl->count(); ++j) { if (psl->item(j) == ps) { psl->remove(j); return; } } } }else{ int i, j; lvardtloop(i, j) { PreSynList* psl = p[i].lcv_[j].ctd_[0].psl_th_; if (psl) for (int j = 0; j < psl->count(); ++j) { if (psl->item(j) == ps) { psl->remove(j); return; } } } } } DiscreteEvent::DiscreteEvent() {} DiscreteEvent::~DiscreteEvent() {} DiscreteEvent* DiscreteEvent::savestate_save() { // pr("savestate_save", 0, net_cvode_instance); if (this != null_event_) { pr("savestate_save", 0, net_cvode_instance); hoc_execerror("DiscreteEvent::savestate_save:", " is not the null_event_"); } return new DiscreteEvent(); } void DiscreteEvent::savestate_restore(double tt, NetCvode* nc) { // pr("savestate_restore", tt, nc); printf("null_event_ onto queue\n"); nc->null_event(tt); } DiscreteEvent* DiscreteEvent::savestate_read(FILE* f) { return new DiscreteEvent(); } void DiscreteEvent::savestate_write(FILE* f) { fprintf(f, "%d\n", DiscreteEventType); } NetCon::NetCon() { cnt_ = 0; obj_ = nil; active_ = false; weight_ = nil; NetConSave::invalid(); } NetCon::NetCon(PreSyn* src, Object* target) { NetConSave::invalid(); obj_ = nil; src_ = src; delay_ = 1.0; if (src_) { src_->dil_.append((NetCon*)this); src_->use_min_delay_ = 0; } if (target == nil) { target_ = nil; active_ = false; cnt_ = 1; weight_ = new double[cnt_]; weight_[0] = 0.0; return; } target_ = ob2pntproc(target); active_ = true; #if DISCRETE_EVENT_OBSERVER ObjObservable::Attach(target, this); #endif if (!pnt_receive[target_->prop->type]) { hoc_execerror("No NET_RECEIVE in target PointProcess:", hoc_object_name(target)); } cnt_ = pnt_receive_size[target_->prop->type]; weight_ = nil; if (cnt_) { weight_ = new double[cnt_]; for (int i=0; i < cnt_; ++i) { weight_[i] = 0.0; } } } NetCon::~NetCon() { //printf("~NetCon\n"); NetConSave::invalid(); rmsrc(); if (cnt_) { delete [] weight_; } #if DISCRETE_EVENT_OBSERVER if (target_) { ObjObservable::Detach(target_->ob, this); } #endif } void NetCon::rmsrc() { if (src_) { for (int i=0; i < src_->dil_.count(); ++i) { if (src_->dil_.item(i) == this) { src_->dil_.remove(i); if (src_->dil_.count() == 0 && src_->tvec_ == nil && src_->idvec_ == nil) { #if 1 || NRNMPI if (src_->output_index_ == -1) #endif delete src_; } break; } } } src_ = nil; } void NetCon::replace_src(PreSyn* p) { rmsrc(); src_ = p; if (src_) { src_->dil_.append((NetCon*)this); src_->use_min_delay_ = 0; } } DiscreteEvent* NetCon::savestate_save() { // pr("savestate_save", 0, net_cvode_instance); return new NetConSave(this); } NetConSave::NetConSave(NetCon* netcon) { netcon_ = netcon; } NetConSave::~NetConSave() {} void NetConSave::savestate_restore(double tt, NetCvode* nc) { // netcon_->pr("savestate_restore", tt, nc); NrnThread* nt; if (netcon_ && netcon_->target_) { nt = PP2NT(netcon_->target_); //printf(" on thread %d\n", nt->id); }else{ nt = nrn_threads; } nc->event(tt, netcon_, nt); } DiscreteEvent* NetCon::savestate_read(FILE* f) { int index; char buf[200]; // fscanf(f, "%d\n", &index); assert(fgets(buf, 200, f)); sscanf(buf, "%d\n", &index); NetCon* nc = NetConSave::index2netcon(index); assert(nc); return new NetConSave(nc); } void NetConSave::savestate_write(FILE* f) { fprintf(f, "%d\n", NetConType); fprintf(f, "%d\n", netcon_->obj_->index); } declareTable(NetConSaveWeightTable, void*, NetCon*) implementTable(NetConSaveWeightTable, void*, NetCon*) NetConSaveWeightTable* NetConSave::wtable_; declareTable(NetConSaveIndexTable, long, NetCon*) implementTable(NetConSaveIndexTable, long, NetCon*) NetConSaveIndexTable* NetConSave::idxtable_; void NetConSave::invalid() { if (wtable_) { delete wtable_; wtable_ = nil; } if (idxtable_) { delete idxtable_; idxtable_ = nil; } } NetCon* NetConSave::weight2netcon(double* pd) { NetCon* nc; if (!wtable_) { hoc_Item* q; Symbol* sym = hoc_lookup("NetCon"); wtable_ = new NetConSaveWeightTable(2*sym->u.ctemplate->count); ITERATE (q, sym->u.ctemplate->olist) { Object* obj = OBJ(q); nc = (NetCon*)obj->u.this_pointer; if (nc->weight_) { wtable_->insert(nc->weight_, nc); } } } if (wtable_->find(nc, pd)) { assert(nc->weight_ == pd); return nc; }else{ return nil; } } NetCon* NetConSave::index2netcon(long id) { NetCon* nc; if (!idxtable_) { hoc_Item* q; Symbol* sym = hoc_lookup("NetCon"); idxtable_ = new NetConSaveIndexTable(2*sym->u.ctemplate->count); ITERATE (q, sym->u.ctemplate->olist) { Object* obj = OBJ(q); nc = (NetCon*)obj->u.this_pointer; if (nc->weight_) { idxtable_->insert(obj->index, nc); } } } if (idxtable_->find(nc, id)) { assert(nc->obj_->index == id); return nc; }else{ return nil; } } void nrn_update_ps2nt() { net_cvode_instance->update_ps2nt(); } void NetCvode::ps_thread_link(PreSyn* ps) { if (!ps) { return; } ps->nt_ = nil; if (!v_structure_change) { // PP2NT etc are correct if (ps->osrc_) { ps->nt_ = PP2NT(ob2pntproc(ps->osrc_)); }else if (ps->ssrc_) { ps->nt_ = (NrnThread*)ps->ssrc_->prop->dparam[9]._pvoid; } } if (!ps->nt_) { // premature, reorder_secorder() not called yet return; } if (ps->thvar_) { int i = ps->nt_->id; if (!p[i].psl_thr_) { p[i].psl_thr_ = hoc_l_newlist(); } ps->hi_th_ = hoc_l_insertvoid(p[i].psl_thr_, ps); } } void NetCvode::update_ps2nt() { int i; // first, opportunistically create p[] p_construct(nrn_nthread); // iterate over all threshold PreSyn and fill the NrnThread field hoc_Item* q; for (i=0; i < nrn_nthread; ++i) { if (p[i].psl_thr_) { hoc_l_freelist(&p[i].psl_thr_); } } if (psl_) ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); ps_thread_link(ps); } } void NetCvode::p_construct(int n) { int i; if (pcnt_ != n) { if (p) { delete [] p; p = nil; } if (n > 0) { p = new NetCvodeThreadData[n]; }else{ p = nil; } pcnt_ = n; } for (i=0; i < n; ++i) { p[i].unreffed_event_cnt_ = 0; } } PreSyn::PreSyn(double* src, Object* osrc, Section* ssrc) { // printf("Presyn %x %s\n", (long)this, osrc?hoc_object_name(osrc):"nil"); PreSynSave::invalid(); hi_index_ = -1; hi_th_ = nil; flag_ = false; valthresh_ = 0; thvar_ = src; osrc_ = osrc; ssrc_ = ssrc; threshold_ = 10.; use_min_delay_ = 0; tvec_ = nil; idvec_ = nil; stmt_ = nil; gid_ = -1; nt_ = nil; if (src) { if (osrc) { nt_ = PP2NT(ob2pntproc(osrc)); }else if (ssrc) { nt_ = (NrnThread*)ssrc->prop->dparam[9]._pvoid; } } if (osrc_ && !src) { nt_ = PP2NT(ob2pntproc(osrc)); } #if 1 || USENCS || NRNMPI output_index_ = -1; #endif #if BGPDMA bgp.dma_send_ = 0; #endif #if NRN_MUSIC music_port_ = 0; #endif #if DISCRETE_EVENT_OBSERVER if(thvar_) { nrn_notify_when_double_freed(thvar_, this); }else if (osrc_) { nrn_notify_when_void_freed(osrc_, this); } #endif } PreSyn::~PreSyn() { PreSynSave::invalid(); // printf("~PreSyn %p\n", this); nrn_cleanup_presyn(this); if (stmt_) { delete stmt_; } #if DISCRETE_EVENT_OBSERVER if (tvec_) { ObjObservable::Detach(tvec_->obj_, this); tvec_ = nil; } if (idvec_) { ObjObservable::Detach(idvec_->obj_, this); idvec_ = nil; } #endif if (thvar_ || osrc_) { #if DISCRETE_EVENT_OBSERVER nrn_notify_pointer_disconnect(this); #endif if (!thvar_) { Point_process* pnt = ob2pntproc(osrc_); if (pnt) { pnt->presyn_ = nil; } } } for (int i=0; i < dil_.count(); ++i) { dil_.item(i)->src_ = nil; } net_cvode_instance->presyn_disconnect(this); } DiscreteEvent* PreSyn::savestate_save() { // pr("savestate_save", 0, net_cvode_instance); return new PreSynSave(this); } PreSynSave::PreSynSave(PreSyn* presyn) { presyn_ = presyn; } PreSynSave::~PreSynSave() {} void PreSynSave::savestate_restore(double tt, NetCvode* nc) { // presyn_->pr("savestate_restore", tt, nc); nc->event(tt, presyn_, presyn_->nt_); } DiscreteEvent* PreSyn::savestate_read(FILE* f) { PreSyn* ps = nil; char buf[200]; int index, tid; assert(fgets(buf, 200, f)); assert(sscanf(buf, "%d %d\n", &index, &tid) == 2); ps = PreSynSave::hindx2presyn(index); assert(ps); ps->nt_ = nrn_threads + tid; return new PreSynSave(ps); } void PreSynSave::savestate_write(FILE* f) { fprintf(f, "%d\n", PreSynType); fprintf(f, "%ld %d\n", presyn_->hi_index_, presyn_->nt_?presyn_->nt_->id:0); } declareTable(PreSynSaveIndexTable, long, PreSyn*) implementTable(PreSynSaveIndexTable, long, PreSyn*) PreSynSaveIndexTable* PreSynSave::idxtable_; void PreSynSave::invalid() { if (idxtable_) { delete idxtable_; idxtable_ = nil; } } PreSyn* PreSynSave::hindx2presyn(long id) { PreSyn* ps; if (!idxtable_) { hoc_Item* q; int cnt = 0; ITERATE (q, net_cvode_instance->psl_) { ++cnt; } //printf("%d PreSyn instances\n", cnt); idxtable_ = new PreSynSaveIndexTable(2*cnt); cnt = 0; ITERATE (q, net_cvode_instance->psl_) { ps = (PreSyn*)VOIDITM(q); assert(ps->hi_index_ == cnt); idxtable_->insert(ps->hi_index_, ps); ++cnt; } } if (idxtable_->find(ps, id)) { assert(ps->hi_index_ == id); return ps; }else{ return nil; } } void PreSyn::init() { qthresh_ = nil; if (tvec_) { tvec_->resize(0); } if (idvec_) { idvec_->resize(0); } } void PreSyn::record_stmt(const char* stmt) { if (stmt_) { delete stmt_; stmt_ = nil; } if (strlen(stmt) > 0) { stmt_ = new HocCommand(stmt); } } void PreSyn::record_stmt(Object* pyact) { if (stmt_) { delete stmt_; stmt_ = nil; } if (pyact) { stmt_ = new HocCommand(pyact); } } void PreSyn::record(IvocVect* vec, IvocVect* idvec, int rec_id) { #if DISCRETE_EVENT_OBSERVER if (tvec_) { ObjObservable::Detach(tvec_->obj_, this); } if (idvec_) { ObjObservable::Detach(idvec_->obj_, this); } #endif tvec_ = vec; idvec_ = idvec; rec_id_ = rec_id; #if DISCRETE_EVENT_OBSERVER if (tvec_) { ObjObservable::Attach(tvec_->obj_, this); } if (idvec_) { ObjObservable::Attach(idvec_->obj_, this); tvec_->mutconstruct(1); } #endif } void PreSyn::record(double tt) { int i; if (tvec_) { // need to lock the vector if shared by other PreSyn // since we get here in the thread that manages the // threshold detection (or net_event from NET_RECEIVE). if (idvec_) {tvec_->lock();} i = tvec_->capacity(); tvec_->resize_chunk(i+1); tvec_->elem(i) = tt; if (idvec_) { i = idvec_->capacity(); idvec_->resize_chunk(i+1); idvec_->elem(i) = rec_id_; tvec_->unlock(); } } if (stmt_) { nt_t = tt; stmt_->execute(false); } } void PreSyn::disconnect(Observable* o) { //printf("PreSyn::disconnect %s\n", hoc_object_name(((ObjObservable*)o)->object())); if (tvec_ && tvec_->obj_ == ((ObjObservable*)o)->object()) { tvec_ = nil; } if (idvec_ && idvec_->obj_ == ((ObjObservable*)o)->object()) { idvec_ = nil; } if (dil_.count() == 0 && tvec_ == nil && idvec_ == nil && output_index_ == -1) { delete this; } } void PreSyn::update(Observable* o) { // should be disconnect //printf("PreSyn::update\n"); for (int i = 0; i < dil_.count(); ++i) { #if 0 // osrc_ below is invalid if (dil_.item(i)->obj_) { printf("%s disconnect from ", hoc_object_name(dil_.item(i)->obj_)); printf("source %s\n", osrc_ ? hoc_object_name(osrc_) : secname(ssrc_)); } #endif dil_.item(i)->src_ = nil; } if (tvec_) { #if DISCRETE_EVENT_OBSERVER ObjObservable::Detach(tvec_->obj_, this); #endif tvec_ = nil; } if (idvec_) { #if DISCRETE_EVENT_OBSERVER ObjObservable::Detach(idvec_->obj_, this); #endif idvec_ = nil; } net_cvode_instance->presyn_disconnect(this); thvar_ = nil; osrc_ = nil; delete this; } void PreSyn::update_ptr(double* pd) { #if DISCRETE_EVENT_OBSERVER nrn_notify_pointer_disconnect(this); nrn_notify_when_double_freed(pd, this); #endif thvar_ = pd; } void ConditionEvent::check(NrnThread* nt, double tt, double teps) { if (value() > 0.0) { if (flag_ == false) { flag_ = true; valthresh_ = 0.; #if USENEOSIM if (neosim_entity_) { (*p_nrn2neosim_send)(neosim_entity_, tt); }else{ #endif send(tt + teps, net_cvode_instance, nt); #if USENEOSIM } #endif } }else{ flag_ = false; } } ConditionEvent::ConditionEvent() {qthresh_ = NULL;} ConditionEvent::~ConditionEvent() {} void ConditionEvent::condition(Cvode* cv) { //logic for high order threshold detection //printf("ConditionEvent::condition f=%d t=%20.15g v=%20.15g\n", flag_, t, value()); NrnThread* nt = thread(); if (qthresh_) { // the threshold event has not // been handled. i.e. the cell must have retreated to // a time not later than the threshold time. assert (nt->_t <= qthresh_->t_); abandon_statistics(cv); // abandon the event STATISTICS(abandon_); net_cvode_instance->remove_event(qthresh_, nt->id); qthresh_ = nil; valthresh_ = 0.; flag_ = false; } double val = value(); if (flag_ == false && val >= 0.0) { // above threshold flag_ = true; valthresh_ = 0.; if (cv->t0_ == cv->tn_) { //inited // means immediate threshold event now. // no need for qthresh since there is // no question of abandoning it so instead // of a qthresh it is a send event. STATISTICS(init_above_); send(nt->_t, net_cvode_instance, nt); }else{ // crossed somewhere in the told to t interval STATISTICS(send_qthresh_); // reset the flag_ when the value goes lower than // valold since value() when qthresh_ handled // may in fact be below 0.0 valthresh_ = valold_; double th = -valold_/(val - valold_); th = th*nt->_t + (1. - th)*told_; assert(th >= cv->t0_ && th <= cv->tn_); qthresh_ = net_cvode_instance->event(th, this, nt); } }else if (flag_ == true && valold_ < valthresh_ && val < valthresh_) { // below threshold // previous step crossed in negative direction // and there was not any retreat or initialization // to give spurious crossing. flag_ = false; } valold_ = val; told_ = nt->_t; } double STECondition::value() { double val = stet_->value(); return val; } void ConditionEvent::abandon_statistics(Cvode* cv) { #if 1 //printf("ConditionEvent::condition %s t=%20.15g abandon event at %20.15g\n", ssrc_?secname(ssrc_):"", t, qthresh_->t_); if (nt_t == qthresh_->t_) {// it is not clear whether // this could happen and if it does it may // take fastidiousness to // an extreme STATISTICS(eq_abandon_); printf("abandon when t == qthresh_->t_ = %20.15g\n", nt_t); } if (cv->t0_ == cv->tn_) { // inited if (value() > 0.0) { // above threshold STATISTICS(abandon_init_above_); }else{ STATISTICS(abandon_init_below_); } }else{ if (value() > 0.0) { // above threshold STATISTICS(abandon_above_); }else{ STATISTICS(abandon_below_); } } #endif } WatchCondition::WatchCondition(Point_process* pnt, double(*c)(Point_process*)) : HTList(nil) { pnt_ = pnt; c_ = c; } WatchCondition::~WatchCondition() { //printf("~WatchCondition\n"); Remove(); } // A WatchCondition but with different deliver STECondition::STECondition(Point_process* pnt, double(*c)(Point_process*)) : WatchCondition(pnt, c) { //printf("STECondition\n"); } STECondition::~STECondition() { //printf("~STECondition\n"); } void WatchCondition::activate(double flag) { Cvode* cv = NULL; int id = 0; qthresh_ = nil; flag_ = (value() >= 0.) ? true: false; valthresh_ = 0.; nrflag_ = flag; if (!pnt_) { // possible for StateTransitionEvent // but only if 1 thread and no lvardt assert(nrn_nthread == 1); assert(net_cvode_instance->localstep() == false); cv = net_cvode_instance->gcv_; }else{ cv = (Cvode*)pnt_->nvi_; } assert(cv); id = (cv->nctd_ > 1) ? thread()->id : 0; HTList*& wl = cv->ctd_[id].watch_list_; if (!wl) { wl = new HTList(nil); net_cvode_instance->wl_list_->append(wl); } Remove(); wl->Append(this); } void WatchCondition::asf_err() { fprintf(stderr, "WATCH condition with flag=%g for %s\n", nrflag_, hoc_object_name(pnt_->ob)); } void PreSyn::asf_err() { fprintf(stderr, "PreSyn threshold for %s\n", osrc_ ? hoc_object_name(osrc_):secname(ssrc_)); } void WatchCondition::send(double tt, NetCvode* nc, NrnThread* nt) { qthresh_ = nc->event(tt, this, nt); STATISTICS(watch_send_); } void WatchCondition::deliver(double tt, NetCvode* ns, NrnThread* nt) { if (qthresh_) { qthresh_ = nil; STATISTICS(deliver_qthresh_); } Cvode* cv = (Cvode*)pnt_->nvi_; int type = pnt_->prop->type; if (cvode_active_ && cv) { ns->local_retreat(tt, cv); cv->set_init_flag(); }else{ PP2t(pnt_) = tt; } STATISTICS(watch_deliver_); POINT_RECEIVE(type, pnt_, nil, nrflag_); if (errno) { if (nrn_errno_check(type)) { hoc_warning("errno set during WatchCondition deliver to NET_RECEIVE", (char*)0); } } } void StateTransitionEvent::transition(int src, int dest, double* var1, double* var2, HocCommand* hc ){ STETransition* st = states_[src].add_transition(); st->dest_ = dest; st->var1_ = var1; st->var2_ = var2; st->hc_ = hc; st->ste_ = (StateTransitionEvent*)this; st->stec_ = new STECondition(pnt_, NULL); st->stec_->stet_ = st; if (st->var1_ == &t) { st->var1_is_time_ = true; } } void STETransition::activate() { if (var1_is_time_) { var1_ = &stec_->thread()->_t; } if (stec_->qthresh_) { // is it on the queue net_cvode_instance->remove_event(stec_->qthresh_, stec_->thread()->id); stec_->qthresh_ = NULL; } stec_->activate(0); } void STETransition::deactivate() { if (stec_->qthresh_) { // is it on the queue net_cvode_instance->remove_event(stec_->qthresh_, stec_->thread()->id); stec_->qthresh_ = NULL; } stec_->Remove(); } void STECondition::deliver(double tt, NetCvode* ns, NrnThread* nt) { if (qthresh_) { qthresh_ = nil; STATISTICS(deliver_qthresh_); } if (!pnt_) { assert(nrn_nthread == 1 && ns->localstep() == false); if (cvode_active_) { Cvode* cv = ns->gcv_; ns->local_retreat(tt, cv); cv->set_init_flag(); }else{ nt->_t = tt; } }else{ Cvode* cv = (Cvode*)pnt_->nvi_; if (cvode_active_ && cv) { ns->local_retreat(tt, cv); cv->set_init_flag(); }else{ PP2t(pnt_) = tt; } } STATISTICS(watch_deliver_); t = tt; stet_->event(); } NrnThread* WatchCondition::thread() { return PP2NT(pnt_); } NrnThread* STECondition::thread() { if (pnt_) { return PP2NT(pnt_); }else{ assert(nrn_nthread == 1); return nrn_threads; } } void WatchCondition::pgvts_deliver(double tt, NetCvode* ns) { NrnThread* nt; assert(0); if (qthresh_) { qthresh_ = nil; STATISTICS(deliver_qthresh_); } int type = pnt_->prop->type; STATISTICS(watch_deliver_); POINT_RECEIVE(type, pnt_, nil, nrflag_); if (errno) { if (nrn_errno_check(type)) { hoc_warning("errno set during WatchCondition deliver to NET_RECEIVE", (char*)0); } } } void STECondition::pgvts_deliver(double tt, NetCvode* ns) { NrnThread* nt; assert(0); if (qthresh_) { qthresh_ = nil; STATISTICS(deliver_qthresh_); } int type = pnt_->prop->type; STATISTICS(watch_deliver_); stet_->event(); if (errno) { if (nrn_errno_check(type)) { hoc_warning("errno set during STECondition pgvts_deliver to NET_RECEIVE", (char*)0); } } } void WatchCondition::pr(const char* s, double tt, NetCvode* ns) { printf("%s", s); printf(" WatchCondition %s %.15g flag=%g\n", hoc_object_name(pnt_->ob), tt, nrflag_); } static Cvode* eval_cv; static void* eval_cond(NrnThread* nt) { eval_cv->evaluate_conditions(nt); return 0; } void Cvode::evaluate_conditions(NrnThread* nt) { if (!nt) { if (nrn_nthread > 1) { eval_cv = this; nrn_multithread_job(eval_cond); return; } nt = nrn_threads; } CvodeThreadData& z = CTD(nt->id); int i; if (z.psl_th_) { for (i = z.psl_th_->count()-1; i >= 0; --i) { z.psl_th_->item(i)->condition( this); } } if (z.watch_list_) { for (HTList* item = z.watch_list_->First(); item != z.watch_list_->End(); item = item->Next()) { ((WatchCondition*)item)->condition(this); } } } static void* chk_deliv(NrnThread* nt) { eval_cv->check_deliver(nt); return 0; } void Cvode::check_deliver(NrnThread* nt) { if (!nt) { if (nrn_nthread > 1) { eval_cv = this; nrn_multithread_job(chk_deliv); return; } nt = nrn_threads; } CvodeThreadData& z = CTD(nt->id); int i; if (z.psl_th_) { for (i = z.psl_th_->count()-1; i >= 0; --i) { z.psl_th_->item(i)->check(nt, nt->_t); } } if (z.watch_list_) { for (HTList* item = z.watch_list_->First(); item != z.watch_list_->End(); item = item->Next()) { ((WatchCondition*)item)->check(nt, nt->_t); } } } void NetCvode::fixed_record_continuous(NrnThread* nt) { int i, cnt; nrn_ba(nt, BEFORE_STEP); cnt = fixed_record_->count(); for (i=0; i < cnt; ++i) { // should be made more efficient PlayRecord* pr = fixed_record_->item(i); if (pr->ith_ == nt->id) { pr->continuous(nt->_t); } } } void NetCvode::fixed_play_continuous(NrnThread* nt) { int i, cnt; cnt = fixed_play_->count(); for (i=0; i < cnt; ++i) { PlayRecord* pr = fixed_play_->item(i); if (pr->ith_ == nt->id) { pr->continuous(nt->_t); } } } // factored this out from deliver_net_events so we can // stay in the cache void NetCvode::check_thresh(NrnThread* nt) { // for default method int i; hoc_Item* pth = p[nt->id].psl_thr_; if (pth) { /* only look at ones with a threshold */ hoc_Item* q1; ITERATE(q1, pth) { PreSyn* ps = (PreSyn*)VOIDITM(q1); // only the ones for this thread if (ps->nt_ == nt) { if (ps->thvar_) { ps->check(nt, nt->_t, 1e-10); } } } } for (i=0; i < wl_list_->count(); ++i) { HTList* wl = wl_list_->item(i); for (HTList* item = wl->First(); item != wl->End(); item = item->Next()) { WatchCondition* wc = (WatchCondition*)item; NrnThread* nt1 = wc->pnt_ ? PP2NT(wc->pnt_) : nrn_threads; if (nt1 == nt) { wc->check(nt, nt->_t); } } } } void NetCvode::deliver_net_events(NrnThread* nt) { // for default method TQItem* q; double tm, tt, tsav; #if BGPDMA if (use_bgpdma_) { nrnbgp_messager_advance(); } #endif int tid = nt->id; tsav = nt->_t; tm = nt->_t + 0.5*nt->_dt; #if BBTQ == 5 tryagain: // one of the events on the main queue may be a NetParEvent // which due to dt round off error can result in an event // placed on the bin queue to be delivered now, which // can put 0 delay events on to the main queue. So loop til // no events. The alternative would be to deliver an idt=0 event // immediately but that would very much change the sequence // with respect to what is being done here and it is unclear // how to fix the value of t there. This can be a do while loop // but I do not want to affect the case of not using a bin queue. if (nrn_use_bin_queue_) { while ((q = p[tid].tqe_->dequeue_bin()) != 0) { DiscreteEvent* db = (DiscreteEvent*)q->data_; #if PRINT_EVENT if (print_event_) {db->pr("binq deliver", nt_t, this);} #endif p[tid].tqe_->release(q); db->deliver(nt->_t, this, nt); } // assert(int(tm/nt->_dt)%1000 == p[tid].tqe_->nshift_); } #endif deliver_events(tm, nt); #if BBTQ == 5 if (nrn_use_bin_queue_) { if (p[tid].tqe_->top()) { goto tryagain; } p[tid].tqe_->shift_bin(tm); } #endif nt->_t = tsav; } implementPtrList(PlayRecList,PlayRecord) void NetCvode::playrec_add(PlayRecord* pr) { // called by PlayRecord constructor //printf("NetCvode::playrec_add %p\n", pr); playrec_change_cnt_ = 0; prl_->append(pr); } void NetCvode::playrec_remove(PlayRecord* pr) { // called by PlayRecord destructor //printf("NetCvode::playrec_remove %p\n", pr); playrec_change_cnt_ = 0; int i, cnt = prl_->count(); for (i=0; i < cnt; ++i) { if (prl_->item(i) == pr) { prl_->remove(i); break; } } cnt = fixed_play_->count(); for (i=0; i < cnt; ++i) { if (fixed_play_->item(i) == pr) { fixed_play_->remove(i); break; } } cnt = fixed_record_->count(); for (i=0; i < cnt; ++i) { if (fixed_record_->item(i) == pr) { fixed_record_->remove(i); break; } } } int NetCvode::playrec_item(PlayRecord* pr) { int i, cnt = prl_->count(); for (i=0; i < cnt; ++i) { if (prl_->item(i) == pr) { return i; } } return -1; } PlayRecord* NetCvode::playrec_item(int i) { assert(i < prl_->count()); return prl_->item(i); } PlayRecord* NetCvode::playrec_uses(void* v) { int i, cnt = prl_->count(); for (i=0; i < cnt; ++i) { if (prl_->item(i)->uses(v)) { return prl_->item(i); } } return nil; } PlayRecord::PlayRecord(double* pd, Object* ppobj) { //printf("PlayRecord::PlayRecord %p\n", this); pd_ = pd; cvode_ = nil; ith_ = 0; if (pd_) { nrn_notify_when_double_freed(pd_, this); } ppobj_ = ppobj; if (ppobj_) { ObjObservable::Attach(ppobj_, this); } net_cvode_instance->playrec_add(this); } PlayRecord::~PlayRecord() { //printf("PlayRecord::~PlayRecord %p\n", this); nrn_notify_pointer_disconnect(this); if (ppobj_) { ObjObservable::Detach(ppobj_, this); } net_cvode_instance->playrec_remove(this); } void PlayRecord::update_ptr(double* pd) { nrn_notify_pointer_disconnect(this); nrn_notify_when_double_freed(pd, this); pd_ = pd; } void PlayRecord::disconnect(Observable*) { //printf("PlayRecord::disconnect %ls\n", (long)this); delete this; } void PlayRecord::record_add(Cvode* cv) { cvode_ = cv; if (cv) { cv->record_add(this); } net_cvode_instance->fixed_record_->append(this); } void PlayRecord::play_add(Cvode* cv) { cvode_ = cv; if (cv) { cv->play_add(this); } net_cvode_instance->fixed_play_->append(this); } void PlayRecord::pr() { printf("PlayRecord\n"); } TvecRecord::TvecRecord(Section* sec, IvocVect* t, Object* ppobj) : PlayRecord(&NODEV(sec->pnode[0]), ppobj) { //printf("TvecRecord\n"); t_ = t; ObjObservable::Attach(t_->obj_, this); } TvecRecord::~TvecRecord() { //printf("~TvecRecord\n"); ObjObservable::Detach(t_->obj_, this); } void TvecRecord::disconnect(Observable*) { // printf("%s TvecRecord disconnect\n", hoc_object_name(t_->obj_)); delete this; } void TvecRecord::install(Cvode* cv) { record_add(cv); } void TvecRecord::record_init() { t_->resize(0); } void TvecRecord::continuous(double tt) { int j = t_->capacity(); t_->resize_chunk(j + 1); t_->elem(j) = tt; } YvecRecord::YvecRecord(double* pd, IvocVect* y, Object* ppobj) : PlayRecord(pd, ppobj) { //printf("YvecRecord\n"); y_ = y; ObjObservable::Attach(y_->obj_, this); } YvecRecord::~YvecRecord() { //printf("~YvecRecord\n"); ObjObservable::Detach(y_->obj_, this); } void YvecRecord::disconnect(Observable*) { // printf("%s YvecRecord disconnect\n", hoc_object_name(y_->obj_)); delete this; } void YvecRecord::install(Cvode* cv) { record_add(cv); } void YvecRecord::record_init() { y_->resize(0); } void YvecRecord::continuous(double tt) { int j = y_->capacity(); y_->resize_chunk(j + 1); y_->elem(j) = *pd_; } VecRecordDiscrete::VecRecordDiscrete(double* pd, IvocVect* y, IvocVect* t, Object* ppobj) : PlayRecord(pd, ppobj) { //printf("VecRecordDiscrete\n"); y_ = y; t_ = t; ObjObservable::Attach(y_->obj_, this); ObjObservable::Attach(t_->obj_, this); e_ = new PlayRecordEvent(); e_->plr_ = this; } VecRecordDiscrete::~VecRecordDiscrete() { //printf("~VecRecordDiscrete\n"); ObjObservable::Detach(y_->obj_, this); ObjObservable::Detach(t_->obj_, this); delete e_; } PlayRecordSave* VecRecordDiscrete::savestate_save() { return new VecRecordDiscreteSave(this); } VecRecordDiscreteSave::VecRecordDiscreteSave(PlayRecord* prl) : PlayRecordSave(prl) { cursize_ = ((VecRecordDiscrete*)pr_)->y_->capacity(); } VecRecordDiscreteSave::~VecRecordDiscreteSave() { } void VecRecordDiscreteSave::savestate_restore() { check(); VecRecordDiscrete* vrd = (VecRecordDiscrete*)pr_; vrd->y_->resize(cursize_); assert(cursize_ <= vrd->t_->capacity()); } void VecRecordDiscreteSave::savestate_write(FILE* f) { fprintf(f, "%d\n", cursize_); } void VecRecordDiscreteSave::savestate_read(FILE* f) { char buf[100]; assert(fgets(buf, 100, f)); assert(sscanf(buf, "%d\n", &cursize_) == 1); } void VecRecordDiscrete::disconnect(Observable*) { // printf("%s VecRecordDiscrete disconnect\n", hoc_object_name(y_->obj_)); delete this; } void VecRecordDiscrete::install(Cvode* cv) { record_add(cv); } void VecRecordDiscrete::record_init() { y_->resize(0); if (t_->capacity() > 0) { e_->send(t_->elem(0), net_cvode_instance, nrn_threads); } } void VecRecordDiscrete::frecord_init(TQItem* q) { record_init_items_->append(q); } void VecRecordDiscrete::deliver(double tt, NetCvode* nc) { int j = y_->capacity(); y_->resize_chunk(j + 1); y_->elem(j) = *pd_; assert(Math::equal(t_->elem(j), tt, 1e-8)); if (j+1 < t_->capacity()) { e_->send(t_->elem(j+1), nc, nrn_threads); } } VecRecordDt::VecRecordDt(double* pd, IvocVect* y, double dt, Object* ppobj) : PlayRecord(pd, ppobj) { //printf("VecRecordDt\n"); y_ = y; dt_ = dt; ObjObservable::Attach(y_->obj_, this); e_ = new PlayRecordEvent(); e_->plr_ = this; } VecRecordDt::~VecRecordDt() { //printf("~VecRecordDt\n"); ObjObservable::Detach(y_->obj_, this); delete e_; } PlayRecordSave* VecRecordDt::savestate_save() { return new VecRecordDtSave(this); } VecRecordDtSave::VecRecordDtSave(PlayRecord* prl) : PlayRecordSave(prl) { } VecRecordDtSave::~VecRecordDtSave() { } void VecRecordDtSave::savestate_restore() { check(); } void VecRecordDt::disconnect(Observable*) { // printf("%s VecRecordDt disconnect\n", hoc_object_name(y_->obj_)); delete this; } void VecRecordDt::install(Cvode* cv) { record_add(cv); } void VecRecordDt::record_init() { y_->resize(0); e_->send(0., net_cvode_instance, nrn_threads); } void VecRecordDt::frecord_init(TQItem* q) { record_init_items_->append(q); } void VecRecordDt::deliver(double tt, NetCvode* nc) { int j = y_->capacity(); y_->resize_chunk(j + 1); if (pd_ == &t) { y_->elem(j) = tt; }else{ y_->elem(j) = *pd_; } e_->send(tt + dt_, nc, nrn_threads); } void NetCvode::vecrecord_add() { double* pd = hoc_pgetarg(1); consist_sec_pd("Cvode.record", chk_access(), pd); IvocVect* y = vector_arg(2); IvocVect* t = vector_arg(3); PlayRecord* pr = playrec_uses(y); if (pr) { delete pr; } bool discrete = ( (ifarg(4) && (int)chkarg(4,0,1) == 1) ? true : false); if (discrete) { pr = new VecRecordDiscrete(pd, y, t); }else{ pr = playrec_uses(t); if (pr) { delete pr; } pr = new TvecRecord(chk_access(), t); pr = new YvecRecord(pd, y); } } void NetCvode::vec_remove() { IvocVect* iv = vector_arg(1); PlayRecord* pr; while((pr = playrec_uses(vector_arg(1))) != nil) { delete pr; } } void NetCvode::playrec_setup() { long i, j, iprl, prlc; double* px; prlc = prl_->count(); fixed_record_->remove_all(); fixed_play_->remove_all(); if (gcv_) { gcv_->delete_prl(); }else{ lvardtloop(i, j) { p[i].lcv_[j].delete_prl(); } } for (iprl = 0; iprl < prlc; ++iprl) { PlayRecord* pr = prl_->item(iprl); bool b = false; if (single_) { pr->install(gcv_); b = true; }else{ if (pr->ppobj_ && ob2pntproc(pr->ppobj_)->nvi_) { pr->install((Cvode*)ob2pntproc(pr->ppobj_)->nvi_); b = true; }else{ lvardtloop(i, j) { Cvode& cv= p[i].lcv_[j]; if (cv.is_owner(pr->pd_)) { pr->install(&cv); b = true; break; } } } } if (b == false) { hoc_execerror("We were unable to associate a PlayRecord item with a RANGE variable", nil); } // and need to know the thread owners if (pr->ppobj_) { i = PP2NT(ob2pntproc(pr->ppobj_))->id; }else{ i = owned_by_thread(pr->pd_); } if (i < 0) { hoc_execerror("We were unable to associate a PlayRecord item with a thread", nil); } pr->ith_ = i; } playrec_change_cnt_ = structure_change_cnt_; } bool Cvode::is_owner(double* pd) { // is a pointer to range variable in this cell int in, it; for (it=0; it < nrn_nthread; ++it) { CvodeThreadData& z = CTD(it); for (in=0; in < z.v_node_count_; ++in) { Node* nd = z.v_node_[in]; if (&NODEV(nd) == pd) { return true; } Prop* p; for (p = nd->prop; p; p = p->next) { if (pd >= p->param && pd < (p->param + p->param_size)) { return true; } } if (nd->extnode) { if (pd >= nd->extnode->v && pd < (nd->extnode->v + nlayer)) { return true; } } // will need to check the linear mechanisms when there is a cvode // specific list of them and IDA is allowed for local step method. } if (nth_) { break;} // lvardt } return false; } int NetCvode::owned_by_thread(double* pd) { if (nrn_nthread == 1) { return 0; } int in, it; for (it = 0; it < nrn_nthread; ++it) { NrnThread& nt = nrn_threads[it]; int i1 = 0; int i3 = nt.end; for (in=i1; in < i3; ++in) { Node* nd = nt._v_node[in]; if (&NODEV(nd) == pd) { return it; } Prop* p; for (p = nd->prop; p; p = p->next) { if (pd >= p->param && pd < (p->param + p->param_size)) { return it; } } if (nd->extnode) { if (pd >= nd->extnode->v && pd < (nd->extnode->v + nlayer)) { return it; } } // will need to check the line mechanisms when there is a cvode // specific list of them and IDA is allowed for local step method. } } return -1; } void NetCvode::consist_sec_pd(const char* msg, Section* sec, double* pd) { int in; Node* nd; for (in=-1; in < sec->nnode; ++in) { if (in == -1) { nd = sec->parentnode; // in case &v(0) if (!nd) { continue; } }else{ nd = sec->pnode[in]; } if (&NODEV(nd) == pd) { return; } Prop* p; for (p = nd->prop; p; p = p->next) { if (pd >= p->param && pd < (p->param + p->param_size)) { return; } } if (nd->extnode) { if (pd >= nd->extnode->v && pd < (nd->extnode->v + nlayer)) { return; } } // will need to check the linear mechanisms when there is a cvode // specific list of them and IDA is allowed for local step method. } hoc_execerror(msg, " pointer not associated with currently accessed section\n\ Use section ... (&var(x)...) intead of ...(§ion.var(x)...)\n"); } double NetCvode::state_magnitudes() { int i, j; if (hoc_is_double_arg(1)) { int on = (int)chkarg(1, 0, 2); int i; if (on == 2) { maxstate_analyse(); }else{ if (gcv_) { gcv_->activate_maxstate(on?true:false); }else{ lvardtloop(i, j) { p[i].lcv_[j].activate_maxstate(on?true:false); } } } return 0.; }else if (hoc_is_str_arg(1)) { Symbol* sym = name2sym(gargstr(1)); double dummy; double* pamax = &dummy; if (ifarg(2)) { pamax = hoc_pgetarg(2); } return maxstate_analyse(sym, pamax); }else{ int i, j, n; Vect* v = vector_arg(1); if (!cvode_active_){ v->resize(0); return 0.; } double* vp; double* ms; n = 0; if (gcv_) { n += gcv_->neq_; }else{ lvardtloop(i, j) { n += p[i].lcv_[j].neq_; } } v->resize(n); vp = vector_vec(v); int getacor = 0; if (ifarg(2)) { getacor = (int)chkarg(2, 0, 1); } j = 0; if (gcv_) { if (gcv_->maxstate_) { if (getacor) { gcv_->maxacor(vp); }else{ gcv_->maxstate(vp); } } }else{ lvardtloop(i, j) { Cvode& cv = p[i].lcv_[j]; if (cv.maxstate_) { if (getacor) { cv.maxacor(vp+j); }else{ cv.maxstate(vp+j); } } j += cv.neq_; } } return 0.; } } void NetCvode::maxstate_analyze_1(int it, Cvode& cv, MaxStateItem* msi, CvodeThreadData& z) { int j, n; Symbol* sym; double* ms; double* ma; n = z.nvsize_; ms = cv.n_vector_data(cv.maxstate_, it); ma = cv.n_vector_data(cv.maxacor_, it); for (j=0; j < n; ++j) { sym = hdp_->retrieve_sym(z.pv_[j]); if (!mst_->find(msi, (void*)sym)) { msi = new MaxStateItem(); msi->sym_ = sym; msi->max_ = -1e9; msi->amax_ = -1e9; mst_->insert((void*)sym, msi); } if (msi->max_ < ms[j]) { msi->max_ = ms[j];} if (msi->amax_ < ma[j]) { msi->amax_ = ma[j];} } } void NetCvode::maxstate_analyse() { int i, it, j, n; MaxStateItem* msi; Symbol* sym; if (!mst_) { int n = 0; for (sym = hoc_built_in_symlist->first; sym; sym = sym->next) { ++n; } mst_ = new MaxStateTable(3*n); } {for (TableIterator(MaxStateTable) ti(*mst_); ti.more(); ti.next()) { msi = ti.cur_value(); msi->max_ = -1e9; msi->amax_ = -1e9; }} if (empty_) { return; } statename(0,2); if (gcv_) { for (it=0; it < nrn_nthread; ++it) { maxstate_analyze_1(it, *gcv_, msi, gcv_->ctd_[it]); } }else{ lvardtloop(i, j) { Cvode& cv = p[i].lcv_[j]; maxstate_analyze_1(i, cv, msi, cv.ctd_[0]); } } } double NetCvode::maxstate_analyse(Symbol* sym, double* pamax) { MaxStateItem* msi; if (mst_ && mst_->find(msi, (void*)sym)) { *pamax = msi->amax_; return msi->max_; } *pamax = -1e9; return -1e9; } void NetCvode::recalc_ptrs() { #if CACHEVEC // update PlayRecord pointers to v int i, cnt = prl_->count(); for (i=0; i < cnt; ++i) { PlayRecord* pr = prl_->item(i); if (pr->pd_) { pr->update_ptr(nrn_recalc_ptr(pr->pd_)); } } // update PreSyn pointers to v hoc_Item* q; if (psl_) ITERATE(q, psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); if (ps->thvar_) { double* pd = nrn_recalc_ptr(ps->thvar_); if (pd != ps->thvar_) { pst_->remove(ps->thvar_); pst_->insert(pd, ps); ps->update_ptr(pd); } } } #endif } static double lvardt_tout_; static void* lvardt_integrate(NrnThread* nt) { size_t err = NVI_SUCCESS; int id = nt->id; NetCvode* nc = net_cvode_instance; NetCvodeThreadData& p = nc->p[id]; TQueue* tq = p.tq_; TQueue* tqe = p.tqe_; double tout = lvardt_tout_; nt->_stop_stepping = 0; while (tq->least_t() < tout || tqe->least_t() <= tout) { err = nc->local_microstep(nt); if (nt->_stop_stepping) { nt->_stop_stepping = 0; return (void*)err; } if (err != NVI_SUCCESS || stoprun) { return (void*)err; } } int n = p.nlcv_; Cvode* lcv = p.lcv_; if (n) for (int i=0; i < n; ++i) { nc->retreat(tout, lcv + i); lcv[i].record_continuous(); }else{ nt->_t = tout; } return (void*)err; } int NetCvode::solve_when_threads(double tout) { int err = NVI_SUCCESS; int tid; double til; nrn_use_busywait(1); // just a possibility if (empty_) { if (tout >= 0.) { while (nt_t < tout && !stoprun) { deliver_events_when_threads(tout); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } } if (stoprun==0) { nt_t = tout; } } else { if ((til = allthread_least_t(tid)) < 1e10) { deliver_events_when_threads(til); }else{ nt_t += 1e6; } if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } } }else if (gcv_) { if (tout >= 0.) { while (gcv_->t_ < tout || allthread_least_t(tid) < tout) { err = global_microstep_when_threads(); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } } retreat(tout, gcv_); gcv_->record_continuous(); } else { // advance or initialized double tc = gcv_->t_; initialized_ = false; while (gcv_->t_ <= tc && !initialized_) { err = global_microstep_when_threads(); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } } } }else{ // lvardt if (tout >= 0.) { // Each thread could integrate independently to tout // as long as no thread got more than // a minimum delay interval ahead of any other. // For now just integrate by min delay intervals. lvardt_tout_ = tout; while(nt_t < tout) { nrn_multithread_job(lvardt_integrate); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (err != NVI_SUCCESS || stoprun) { return err; } int tid; allthread_least_t(tid); } }else{ // nthread>1 is more or less purposeless if we mean // that only the least cvode of all threads advances. // (which is required if minimum delay = 0) if (nrn_nthread > 1) { hoc_execerror("Lvardt method from fadvance()", "presently limited to single thread."); } } } nrn_use_busywait(0); t = nt_t; dt = nt_dt; return err; } static void* deliver_for_thread(NrnThread* nt) { NetCvode* nc = net_cvode_instance; NetCvodeThreadData& d = nc->p[nt->id]; TQItem* q = d.tqe_->least(); DiscreteEvent* de = (DiscreteEvent*)q->data_; double tt = q->t_; d.tqe_->remove(q); #if PRINT_EVENT if (nc->print_event_) { de->pr("deliver", tt, nc); } #endif de->deliver(tt, nc, nt); return 0; } void NetCvode::deliver_events_when_threads(double til) { //printf("deliver_events til %20.15g\n", til); int tid; while(allthread_least_t(tid) <= til) { STATISTICS(deliver_cnt_); nrn_onethread_job(tid, deliver_for_thread); if (stoprun || nrn_allthread_handle) { return; } } } int NetCvode::global_microstep_when_threads() { int err = NVI_SUCCESS; int tid; double tt = allthread_least_t(tid); double tdiff = tt - gcv_->t_; if (tdiff <= 0) { // since events do not internally retreat with the // global step, we should already be at the event time // if this is too strict, we could use eps(list_->t_). //if (tdiff != 0.0) { printf("tdiff=%g\n", tdiff); } assert(tdiff == 0.0 || ( gcv_->tstop_begin_ <= tt && tt <= gcv_->tstop_end_)); deliver_events_when_threads(tt); }else{ err = gcv_->handle_step(this, tt); } if ((tt = allthread_least_t(tid)) < gcv_->t_) { gcv_->interpolate(tt); } return err; } void* nrn_interthread_enqueue(NrnThread* nt) { net_cvode_instance->p[nt->id].enqueue(net_cvode_instance, nt); return 0; } void NetCvode::set_enqueueing() { MUTLOCK enqueueing_ = 1; MUTUNLOCK } double NetCvode::allthread_least_t(int& tid) { // reduce (take minimum) of p[i].tqe_->least_t() double tt, min = 1e50; // setting enqueueing_ in interthread_send was a race. Logically it is not // needed. It is not clear if higher performance would result in having // a MUTEX for the NetCvode instance but that is the current implementation // instead of commenting out the enqueuing related lines. if (enqueueing_) { nrn_multithread_job(nrn_interthread_enqueue); enqueueing_ = 0; } for (int id = 0; id < pcnt_; ++id) { tt = p[id].tqe_->least_t(); if (tt < min) { tid = id; min = tt; } } return min; } neuron-7.5/src/nrncvode/netcvode.h000066400000000000000000000145471323325274500173010ustar00rootroot00000000000000#ifndef netcvode_h #define netcvode_h #define PRINT_EVENT 1 #include "mymath.h" #include "tqueue.h" struct NrnThread; class PreSyn; class HocDataPaths; class PreSynTable; class NetCon; class DiscreteEvent; class TQItemPool; class SelfEventPool; class SelfEvent; class hoc_Item; class PlayRecord; class PlayRecList; class IvocVect; class BAMechList; class MaxStateTable; class HTList; class HTListList; class NetCvode; class MaxStateItem; class CvodeThreadData; class HocEvent; class HocEventList; struct BAMech; struct Section; struct InterThreadEvent; class NetCvodeThreadData { public: NetCvodeThreadData(); virtual ~NetCvodeThreadData(); void interthread_send(double, DiscreteEvent*, NrnThread*); void enqueue(NetCvode*, NrnThread*); TQueue* tq_; // for lvardt Cvode* lcv_; // for lvardt TQueue* tqe_; hoc_Item* psl_thr_; //for presyns with fixed step threshold checking SelfEventPool* sepool_; TQItemPool* tpool_; InterThreadEvent* inter_thread_events_; SelfQueue* selfqueue_; MUTDEC int nlcv_; int ite_cnt_; int ite_size_; int unreffed_event_cnt_; double immediate_deliver_; }; class NetCvode { public: NetCvode(bool single=true); virtual ~NetCvode(); int solve(double t); void statistics(int); void spike_stat(); void re_init(double t0 = 0.); int cellindex(); void states(); void dstates(); int fun(double t, double* y, double* ydot); void error_weights(); void acor(); const char* statename(int, int style=1); void localstep(bool); bool localstep(); bool is_local(); void use_daspk(bool); bool use_daspk(); void move_event(TQItem*, double, NrnThread*); void remove_event(TQItem*, int threadid); TQItem* event(double tdeliver, DiscreteEvent*, NrnThread*); #if BBTQ == 3 || BBTQ == 4 TQItem* fifo_event(double tdeliver, DiscreteEvent*, NrnThread*); #endif #if BBTQ == 5 TQItem* bin_event(double tdeliver, DiscreteEvent*, NrnThread*); #endif void send2thread(double, DiscreteEvent*, NrnThread*); void null_event(double); void tstop_event(double); void handle_tstop_event(double, NrnThread* nt); void hoc_event(double, const char* hoc_stmt, Object* ppobj = nil, int reinit = 0, Object* pyact=nil); NetCon* install_deliver(double* psrc, Section* ssrc, Object* osrc, Object* target, double threshold, double delay, double weight ); void presyn_disconnect(PreSyn*); void check_thresh(NrnThread*); void deliver_net_events(NrnThread*); // for default staggered time step method void deliver_events(double til, NrnThread*); // for initialization events void solver_prepare(); void clear_events(); void init_events(); void print_event_queue(); void event_queue_info(); void vec_event_store(); void local_retreat(double, Cvode*); void retreat(double, Cvode*); Object** netconlist(); int owned_by_thread(double*); PlayRecord* playrec_uses(void*); void playrec_add(PlayRecord*); void playrec_remove(PlayRecord*); int playrec_item(PlayRecord*); PlayRecord* playrec_item(int); PlayRecList* playrec_list() { return prl_;} void simgraph_remove(); // fixed step continuous play and record PlayRecList* fixed_play_; PlayRecList* fixed_record_; void vecrecord_add(); // hoc interface functions void vec_remove(); void record_init(); void play_init(); void fixed_record_continuous(NrnThread*); void fixed_play_continuous(NrnThread*); static double eps(double x) { return eps_*Math::abs(x); } int condition_order() { return condition_order_; } void condition_order(int i) { condition_order_ = i; } TQueue* event_queue(NrnThread* nt); void psl_append(PreSyn*); void recalc_ptrs(); public: void rtol(double); double rtol(){return rtol_;} void atol(double); double atol(){return atol_;} double rtol_, atol_; void stiff(int); int stiff(){return stiff_;} // 0 nothing stiff, 1 voltage, 2 mechanisms void maxorder(int); int maxorder(){return maxorder_;} int order(int); void minstep(double); double minstep(){return minstep_;} void maxstep(double); double maxstep(){return maxstep_;} void jacobian(int); int jacobian(){return jacobian_;} void structure_change(); int print_event_; // int nlist() { return nlist_; } // Cvode* list() { return list_; } bool initialized_; // for global step solve. void consist_sec_pd(const char*, Section*, double*); double state_magnitudes(); Symbol* name2sym(const char*); const char* sym2name(Symbol*); int pgvts(double tstop); void update_ps2nt(); void point_receive(int, Point_process*, double*, double); bool deliver_event(double til, NrnThread*); //uses TQueue atomically bool empty_; void delete_list(); void delete_list(Cvode*); //private: public: static double eps_; int local_microstep(NrnThread*); int global_microstep(); void deliver_least_event(NrnThread*); void evaluate_conditions(); int condition_order_; int pgvts_event(double& tt); DiscreteEvent* pgvts_least(double& tt, int& op, int& init); int pgvts_cvode(double tt, int op); bool init_global(); void alloc_list(); void del_cv_memb_list(); void del_cv_memb_list(Cvode*); void distribute_dinfo(int*, int); void playrec_setup(); void fill_global_ba(NrnThread*, int, BAMechList**); void fill_local_ba(int*, NetCvodeThreadData&); void fill_local_ba_cnt(int, int*, NetCvodeThreadData&); void fill_local_ba_alloc(NetCvodeThreadData&); void fill_local_ba_indices(int, int*, NetCvodeThreadData&); BAMechList* cvbml(int, BAMech*, Cvode*); void maxstate_analyse(); void maxstate_analyze_1(int, Cvode&, MaxStateItem*, CvodeThreadData&); void fornetcon_prepare(); int fornetcon_change_cnt_; double maxstate_analyse(Symbol*, double*); void p_construct(int); void ps_thread_link(PreSyn*); MaxStateTable* mst_; private: int maxorder_, jacobian_, stiff_; double maxstep_, minstep_; int structure_change_cnt_; int matrix_change_cnt_; bool single_; PreSynTable* pst_; int pst_cnt_; int playrec_change_cnt_; PlayRecList* prl_; IvocVect* vec_event_store_; HocDataPaths* hdp_; public: Cvode* gcv_; void set_CVRhsFn(); bool use_partrans(); hoc_Item* psl_; //actually a hoc_List HTListList* wl_list_; // for faster deliver_net_events when many cvode int pcnt_; NetCvodeThreadData* p; int enqueueing_; int use_long_double_; public: MUTDEC // only for enqueueing_ so far. void set_enqueueing(); double allthread_least_t(int& tid); int solve_when_threads(double); void deliver_events_when_threads(double); int global_microstep_when_threads(); void allthread_handle(double, HocEvent*, NrnThread*); void allthread_handle(); HocEventList* allthread_hocevents_; }; #endif neuron-7.5/src/nrncvode/nrndaspk.cpp000077500000000000000000000434031323325274500176410ustar00rootroot00000000000000#include <../../nrnconf.h> // differential algebraic system solver interface to DDASPK // DDASPK is translated from fortran with f2c. Hence all args are // call by reference #include #include #include extern "C" { #include "spmatrix.h" } #include "nrnoc2iv.h" #include "cvodeobj.h" #include "nrndaspk.h" #include "netcvode.h" #include "ida/ida.h" #include "ida/ida_impl.h" #include "mymath.h" // the state of the g - d2/dx2 matrix for voltages #define INVALID 0 #define NO_CAP 1 #define SETUP 2 #define FACTORED 3 static int solve_state_; // prototypes double Daspk::dteps_; extern "C" { extern void nrndae_dkres(double*, double*, double*); extern void nrndae_dkpsol(double); extern void nrn_rhs(NrnThread*); extern void nrn_lhs(NrnThread*); extern void nrn_solve(NrnThread*); void nrn_daspk_init_step(double, double, int); // this is private in ida.c but we want to check if our initialization // is good. Unfortunately ewt is set on the first call to solve which // is too late for us. extern booleantype IDAEwtSet(IDAMem IDA_mem, N_Vector ycur); //extern double t, dt; #define nt_dt nrn_threads->_dt #define nt_t nrn_threads->_t static void daspk_nrn_solve(NrnThread* nt) { nrn_solve(nt); } static int res_gvardt( realtype t, N_Vector y, N_Vector yp, N_Vector delta, void* rdata ); static int minit(IDAMem); static int msetup(IDAMem mem, N_Vector y, N_Vector ydot, N_Vector delta, N_Vector tempv1, N_Vector tempv2, N_Vector tempv3 ); static int msolve(IDAMem mem, N_Vector b, N_Vector ycur, N_Vector ypcur, N_Vector deltacur ); static int mfree(IDAMem); } // at least in DARWIN the following is already declared so avoid conflict #define thread_t nrn_thread_t // residual static N_Vector nvec_y; static N_Vector nvec_yp; static N_Vector nvec_delta; static double thread_t; static double thread_cj; static int thread_ier; static Cvode* thread_cv; static void* res_thread(NrnThread* nt) { int i = nt->id; Cvode* cv = thread_cv; int ier = cv->res(thread_t, cv->n_vector_data(nvec_y, i), cv->n_vector_data(nvec_yp, i), cv->n_vector_data(nvec_delta, i), nt); if (ier != 0) { thread_ier = ier; } return 0; } static int res_gvardt( realtype t, N_Vector y, N_Vector yp, N_Vector delta, void* rdata ){ thread_cv = (Cvode*)rdata; nvec_y = y; nvec_yp = yp; nvec_delta = delta; thread_t = t; thread_ier = 0; nrn_multithread_job(res_thread); return thread_ier; } // linear solver specific allocation and initialization static int minit(IDAMem) { return IDA_SUCCESS; } // linear solver preparation for subsequent calls to msolve // approximation to jacobian. Everything necessary for solving P*x = b static int msetup(IDAMem mem, N_Vector y, N_Vector yp, N_Vector, N_Vector, N_Vector, N_Vector ){ Cvode* cv = (Cvode*)mem->ida_rdata; ++cv->jac_calls_; return 0; } /* solve P*x = b */ static void* msolve_thread(NrnThread* nt) { int i = nt->id; Cvode* cv = thread_cv; int ier = cv->psol(thread_t, cv->n_vector_data(nvec_y, i), cv->n_vector_data(nvec_yp, i), thread_cj, nt); if (ier != 0) { thread_ier = ier; } return 0; } static int msolve(IDAMem mem, N_Vector b, N_Vector w, N_Vector ycur, N_Vector, N_Vector){ thread_cv = (Cvode*)mem->ida_rdata; thread_t = mem->ida_tn; nvec_y = ycur; nvec_yp = b; thread_cj = mem->ida_cj; nrn_multithread_job(msolve_thread); return thread_ier; } static int mfree(IDAMem) {return IDA_SUCCESS;} Daspk::Daspk(Cvode* cv, int neq) { // printf("Daspk::Daspk\n"); cv_ = cv; yp_ = cv->nvnew(neq); delta_ = cv->nvnew(neq); parasite_ = cv->nvnew(neq); use_parasite_ = false; spmat_ = nil; mem_ = nil; } Daspk::~Daspk() { // printf("Daspk::~Daspk\n"); N_VDestroy(delta_); N_VDestroy(yp_); if (mem_) { IDAFree((IDAMem)mem_); } } void Daspk::ida_init() { int ier; if (mem_) { ier = IDAReInit(mem_, res_gvardt, cv_->t_, cv_->y_, yp_, IDA_SV, &cv_->ncv_->rtol_, cv_->atolnvec_ ); if (ier < 0) { hoc_execerror("IDAReInit error", 0); } }else{ IDAMem mem = (IDAMem) IDACreate(); if (!mem) { hoc_execerror("IDAMalloc error", 0); } IDASetRdata(mem, cv_); ier = IDAMalloc(mem, res_gvardt, cv_->t_, cv_->y_, yp_, IDA_SV, &cv_->ncv_->rtol_, cv_->atolnvec_ ); mem->ida_linit = minit; mem->ida_lsetup = msetup; mem->ida_lsolve = msolve; mem->ida_lfree = mfree; mem->ida_setupNonNull = false; mem_ = mem; } } void Daspk::info() { } // last two bits, 0 error, 1 warning, 2 apply parasitic // if init_failure_style & 010, then use the original method int Daspk::init_failure_style_; int Daspk::init_try_again_; int Daspk::first_try_init_failures_; static void* do_ode_thread(NrnThread* nt) { int i; Cvode* cv = thread_cv; nt->_t = cv->t_; cv->do_ode(nt); CvodeThreadData& z = cv->ctd_[nt->id]; double* yp = cv->n_vector_data(nvec_yp, nt->id); for (i=z.neq_v_; i < z.nvsize_; ++i) { yp[i] = *(z.pvdot_[i]); } return 0; } static double check(double t, Daspk* ida) { res_gvardt(t, ida->cv_->y_, ida->yp_, ida->delta_, ida->cv_); double norm = N_VWrmsNorm(ida->delta_, ((IDAMem)(ida->mem_))->ida_ewt); printf("ida check t=%.15g norm=%g\n", t, norm); #if 0 for (int i=0; i < ida->cv_->neq_; ++i) { printf(" %3d %22.15g %22.15g %22.15g\n", i, N_VGetArrayPointer(ida->cv_->y_)[i], N_VGetArrayPointer(ida->yp_)[i], N_VGetArrayPointer(ida->delta_)[i]); } #endif return norm; } int Daspk::init() { extern double t; int i; #if 0 printf("Daspk_init t_=%20.12g t-t_=%g t0_-t_=%g\n", cv_->t_, t-cv_->t_, cv_->t0_-cv_->t_); #endif N_VConst(0., yp_); // the new initial condition is based on a dteps_ step backward euler // linear solution with respect to the old state in order to // start the following initial condition calculation with a "valid" // (in a linear system sense) initial state. double tt = cv_->t_; double dtinv = 1./dteps_; if (init_failure_style_ & 010) { cv_->play_continuous(tt); nrn_daspk_init_step(tt, dteps_, 1); nrn_daspk_init_step(tt, dteps_, 1); cv_->daspk_gather_y(yp_); cv_->play_continuous(tt); nrn_daspk_init_step(tt, dteps_, 1); cv_->daspk_gather_y(cv_->y_); N_VLinearSum(dtinv, cv_->y_, -dtinv, yp_, yp_); }else{ #if 0 cv_->play_continuous(tt); nrn_daspk_init_step(tt, dteps_, 1); cv_->daspk_gather_y(cv_->y_); tt = cv_->t_ + dteps_; cv_->play_continuous(tt); nrn_daspk_init_step(tt, dteps_, 1); cv_->daspk_gather_y(yp_); N_VLinearSum(dtinv, yp_, -dtinv, cv_->y_, yp_); cv_->daspk_scatter_y(cv_->y_); #else cv_->play_continuous(tt); nrn_daspk_init_step(tt, dteps_, 1); // first approx to y (and maybe good enough) nrn_daspk_init_step(tt, dteps_, 1); // 2nd approx to y (trouble with 2sramp.hoc) cv_->daspk_gather_y(cv_->y_); tt = cv_->t_ + dteps_; cv_->play_continuous(tt); nrn_daspk_init_step(tt, dteps_, 0); // rhs contains delta y (for v, vext, linmod cv_->gather_ydot(yp_); N_VScale(dtinv, yp_, yp_); #endif } thread_cv = cv_; nvec_yp = yp_; nrn_multithread_job(do_ode_thread); ida_init(); t = cv_->t_; #if 1 // test //printf("test\n"); if (!IDAEwtSet((IDAMem)mem_, cv_->y_)) { hoc_execerror("Bad Ida error weight vector", 0); } use_parasite_ = false; // check(cv_->t_, this); res_gvardt(cv_->t_, cv_->y_, yp_, parasite_, cv_); double norm = N_VWrmsNorm(parasite_, ((IDAMem)mem_)->ida_ewt); //printf("norm=%g at t=%g\n", norm, t); if (norm > 1.) { switch (init_failure_style_ & 03) { case 0: printf("IDA initialization failure, weighted norm of residual=%g\n", norm); return IDA_ERR_FAIL; break; case 1: printf("IDA initialization warning, weighted norm of residual=%g\n", norm); break; case 2: printf("IDA initialization warning, weighted norm of residual=%g\n", norm); use_parasite_ = true; t_parasite_ = nt_t; printf(" subtracting (for next 1e-6 ms): f(y', y, %g)*exp(-1e7*(t-%g))\n", nt_t, nt_t); break; } #if 0 for (i=0; i < cv_->neq_; ++i) { printf(" %d %g %g %g %g\n", i, nt_t, N_VGetArrayPointer(cv_->y_)[i], N_VGetArrayPointer(yp_)[i], N_VGetArrayPointer(delta_)[i]); } #endif if (init_try_again_ < 0) { ++first_try_init_failures_; init_try_again_ += 1; int err = init(); init_try_again_ = 0; return err; } return 0; } #endif return 0; } int Daspk::advance_tn(double tstop) { //printf("Daspk::advance_tn(%g)\n", tstop); double tn = cv_->tn_; IDASetStopTime(mem_, tstop); int ier = IDASolve(mem_, tstop, &cv_->t_, cv_->y_, yp_, IDA_ONE_STEP_TSTOP); if (ier < 0) { //printf("DASPK advance_tn error\n"); return ier; } #if 0 if (ier > 0 && t < cv_->t_) { // interpolation to tstop does not call res. So we have to. cv_->res(cv_->t_, N_VGetArrayPointer(cv_->y_), N_VGetArrayPointer(yp_), N_VGetArrayPointer(delta_)); assert(MyMath::eq(t, cv_->t_, NetCvode::eps(t))); } #else // this is very bad, performance-wise. However ida modifies its states // after a call to fun with the proper t. res_gvardt(cv_->t_, cv_->y_, yp_, delta_, cv_); #endif cv_->t0_ = tn; cv_->tn_ = cv_->t_; //printf("Daspk::advance_tn complete.\n"); return ier; } int Daspk::interpolate(double tt) { //printf("Daspk::interpolate %.15g\n", tt); assert (tt >= cv_->t0_ && tt <= cv_->tn_); IDASetStopTime(mem_, tt); int ier = IDASolve(mem_, tt, &cv_->t_, cv_->y_, yp_, IDA_NORMAL); if (ier < 0) { printf("DASPK interpolate error\n"); return ier; } assert(MyMath::eq(tt, cv_->t_, NetCvode::eps(cv_->t_))); // interpolation does not call res. So we have to. res_gvardt(cv_->t_, cv_->y_, yp_, delta_, cv_); //if(MyMath::eq(t, cv_->t_, NetCvode::eps(cv_->t_))) { //printf("t=%.15g t_=%.15g\n", t, cv_->t_); //} // assert(MyMath::eq(t, cv_->t_, NetCvode::eps(cv_->t_))); return ier; } void Daspk::statistics() { #if 0 printf("rwork size = %d\n", iwork_[18-1]); printf("iwork size = %d\n", iwork_[17-1]); printf("Number of time steps = %d\n", iwork_[11-1]); printf("Number of residual evaluations = %d\n", iwork_[12-1]); printf("Number of Jac evaluations = %d\n", iwork_[13-1]); printf("Number of preconditioner solves = %d\n", iwork_[21-1]); printf("Number of nonlinear iterations = %d\n", iwork_[19-1]); printf("Number of linear iterations = %d\n", iwork_[20-1]); double avlin = double(iwork_[20-1])/double(iwork_[19-1]); printf("Average Krylov subspace dimension = %g\n", avlin); printf("nonlinear conv. failures = %d\n", iwork_[15-1]); printf("linear conv. failures = %d\n", iwork_[16-1]); #endif if (first_try_init_failures_) { printf(" %d First try Initialization failures\n", first_try_init_failures_); } } static void* daspk_scatter_thread(NrnThread* nt) { thread_cv->daspk_scatter_y(thread_cv->n_vector_data(nvec_y, nt->id), nt->id); return 0; } void Cvode::daspk_scatter_y(N_Vector y) { thread_cv = this; nvec_y = y; nrn_multithread_job(daspk_scatter_thread); } void Cvode::daspk_scatter_y(double* y, int tid) { // the dependent variables in daspk are vi,vx,etc // whereas in the node structure we need vm, vx // note that a corresponding transformation for gather_ydot is // not needed since the matrix solve is already with respect to vi,vx // in all cases. (i.e. the solution vector is in the right hand side // and refers to vi, vx. scatter_y(y, tid); // transform the vm+vext to vm CvodeThreadData& z = ctd_[tid]; if (z.cmlext_) { Memb_list* ml = z.cmlext_->ml; int i, n = ml->nodecount; for (i=0; i < n; ++i) { Node* nd = ml->nodelist[i]; NODEV(nd) -= nd->extnode->v[0]; } } } static void* daspk_gather_thread(NrnThread* nt) { thread_cv->daspk_gather_y(thread_cv->n_vector_data(nvec_y, nt->id), nt->id); return 0; } void Cvode::daspk_gather_y(N_Vector y) { thread_cv = this; nvec_y = y; nrn_multithread_job(daspk_gather_thread); } void Cvode::daspk_gather_y(double* y, int tid) { gather_y(y, tid); // transform vm to vm+vext CvodeThreadData& z = ctd_[tid]; if (z.cmlext_) { Memb_list* ml = z.cmlext_->ml; int i, n = ml->nodecount; for (i=0; i < n; ++i) { Node* nd = ml->nodelist[i]; int j = nd->eqn_index_; y[j-1] += y[j]; } } } // for res and psol the equations for c*yp = f(y) are // cast in the form G(t,y,yp) = f(y) - c*yp // So res calculates delta = f(y) - c*yp // and psol solves (c*cj - df/dy)*x = -b // Note that since cvode uses J = 1 - gam*df/dy and // ida uses J = df/dy - cj*df/dyp that is the origin of the use of -b in our // psol and also why all the non-voltage odes are scaled by dt at the // end of it. int Cvode::res(double tt, double* y, double* yprime, double* delta, NrnThread* nt) { CvodeThreadData& z = ctd_[nt->id]; ++f_calls_; static int res_; int i; nt->_t = tt; res_++; #if 0 printf("Cvode::res enter tt=%g\n", tt); for (i=0; i < z.nvsize_; ++i) { printf(" %d %g %g %g\n", i, y[i], yprime[i], delta[i]); } #endif nt->_vcv = this; // some models may need to know this daspk_scatter_y(y, nt->id); // vi, vext, channel states, linmod non-node y. // rhs of cy' = f(y) play_continuous_thread(tt, nt); nrn_rhs(nt); do_ode(nt); // accumulate into delta gather_ydot(delta, nt->id); // now calculate -c*yp. i.e. // cm*vm' + c_linmod*vi' internal current balance // cx*vx' + c_linmod*vx' external current balance // c_linmod*y' non-node linmod states // y' mechanism states // this can be accumulated into delta in several stages // -cm*vm'and -cx*vx for current balance equation delta's // -c_linmod*yp (but note that the node yp yp(vm)+yp(vx)) // subtract yp from mechanism state delta's #if 0 printf("Cvode::res after ode and gather_ydot into delta\n"); for (i=0; i < z.nvsize_; ++i) { printf(" %d %g %g %g\n", i, y[i], yprime[i], delta[i]); } #endif // the cap nodes : see nrnoc/capac.c for location of cm, etc. // these are not in same order as for cvode but are in // spmatrix order mixed with nocap nodes and extracellular // therefore we use the Node.eqn_index to calculate the delta index. // assert(use_sparse13 == true && nlayer <= 1); assert(use_sparse13 == true); if (z.cmlcap_) { Memb_list* ml = z.cmlcap_->ml; int n = ml->nodecount; double* p = NULL; if (nt->_nrn_fast_imem) { p = nt->_nrn_fast_imem->_nrn_sav_rhs; } for (i=0; i < n; ++i) { double* cd = ml->data[i]; Node* nd = ml->nodelist[i]; int j = nd->eqn_index_ - 1; Extnode* nde = nd->extnode; double cdvm; if (nde) { cdvm = 1e-3 * cd[0] * (yprime[j] - yprime[j+1]); delta[j] -= cdvm; delta[j+1] += cdvm; // i_cap cd[1] = cdvm; #if I_MEMBRANE // add i_cap to i_ion which is in sav_g // this will be copied to i_membrane below nde->param[3+3*nlayer] += cdvm; #endif }else{ cdvm = 1e-3 * cd[0] * yprime[j]; delta[j] -= cdvm; cd[1] = cdvm; } if (p) { int i = nd->v_node_index; p[i] += cdvm; p[i] *= NODEAREA(nd) * 0.01; } } } // See nrnoc/excelln.c for location of cx. if (z.cmlext_) { Memb_list* ml = z.cmlext_->ml; int n = ml->nodecount; for (i=0; i < n; ++i) { double* cd = ml->data[i]; Node* nd = ml->nodelist[i]; int j = nd->eqn_index_; #if I_MEMBRANE // i_membrane = sav_rhs --- even for zero area nodes cd[1+3*nlayer] = cd[3+3*nlayer]; #endif #if EXTRACELLULAR == 1 // only works for one layer // otherwise loop over layer, // xc is (pd + 2*(nlayer))[layer] // and deal with yprime[i+layer]-yprime[i+layer+1] delta[j] -= 1e-3 * cd[2] * yprime[j]; #else int k, jj; double x; k = nlayer-1; jj = j+k; delta[jj] -= 1e-3*cd[2*nlayer+k]*(yprime[jj]); for (k=nlayer-2; k >= 0; --k) { // k=0 refers to stuff between layer 0 and 1 // j is for vext[0] jj = j+k; x = 1e-3*cd[2*nlayer+k]*(yprime[jj] - yprime[jj+1]); delta[jj] -= x; delta[jj+1] += x; // last one in iteration is nlayer-1 } #endif } } nrndae_dkres(y, yprime, delta); // the ode's for (i=z.neq_v_; i < z.nvsize_; ++i) { delta[i] -= yprime[i]; } for (i=0; i < z.nvsize_; ++i) { delta[i] *= -1.; } if (daspk_->use_parasite_ && tt - daspk_->t_parasite_ < 1e-6) { double fac = exp(1e7*(daspk_->t_parasite_ - tt)); double* tps = n_vector_data(daspk_->parasite_, nt->id); for (i=0; i < z.nvsize_; ++i) { delta[i] -= tps[i]*fac; } } before_after(z.after_solve_, nt); #if 0 printf("Cvode::res exit res_=%d tt=%20.12g\n", res_, tt); for (i=0; i < z.nvsize_; ++i) { printf(" %d %g %g %g\n", i, y[i], yprime[i], delta[i]); } #endif nt->_vcv = 0; #if 0 double e = 0; for (i=0; i < z.nvsize_; ++i) { e += delta[i]*delta[i]; } printf("Cvode::res %d e=%g t=%.15g\n", res_, e, tt); #endif return 0; } int Cvode::psol(double tt, double* y, double* b, double cj, NrnThread* _nt) { CvodeThreadData& z = ctd_[_nt->id]; ++mxb_calls_; int i; _nt->_t = tt; #if 0 printf("Cvode::psol tt=%g solvestate=%d \n", tt, solve_state_); for (i=0; i < z.nvsize_; ++i) { printf(" %g", b[i]); } printf("\n"); #endif _nt->cj = cj; _nt->_dt = 1./cj; _nt->_vcv = this; daspk_scatter_y(y, _nt->id); // I'm not sure this is necessary. if (solve_state_ == INVALID) { nrn_lhs(_nt); // designed to setup M*[dvm+dvext, dvext, dy] = ... solve_state_ = SETUP; } if (solve_state_ == SETUP) { // if using sparse 13 then should factor solve_state_ = FACTORED; } scatter_ydot(b, _nt->id); #if 0 printf("before nrn_solve matrix cj=%g\n", cj); spPrint((char*)sp13mat_, 1,1,1); printf("before nrn_solve actual_rhs=\n"); for (i=0; i < z.neq_v_; ++i) { printf("%d %g\n", i+1, actual_rhs[i+1]); } #endif daspk_nrn_solve(_nt); // not the cvode one #if 0 //printf("after nrn_solve matrix\n"); //spPrint((char*)sp13mat_, 1,1,1); printf("after nrn_solve actual_rhs=\n"); for (i=0; i < neq_v_; ++i) { printf("%d %g\n", i+1, actual_rhs[i+1]); } #endif solve_state_ = INVALID; // but not if using sparse13 solvemem(_nt); gather_ydot(b, _nt->id); // the ode's of the form m' = (minf - m)/mtau in model descriptions compute // b = b/(1 + dt*mtau) since cvode required J = 1 - gam*df/dy // so we need to scale those results by 1/cj. for (i=z.neq_v_; i < z.nvsize_; ++i) { b[i] *= _nt->_dt; } #if 0 for (i=0; i < z.nvsize_; ++i) { printf(" %g", b[i]); } printf("\n"); #endif _nt->_vcv = 0; return 0; } N_Vector Daspk::ewtvec() { return ((IDAMem)mem_)->ida_ewt; } N_Vector Daspk::acorvec() { return ((IDAMem)mem_)->ida_delta; } neuron-7.5/src/nrncvode/nrndaspk.h000066400000000000000000000014621323325274500173020ustar00rootroot00000000000000#ifndef daspk_h #define daspk_h #include "shared/nvector_serial.h" #include "nvector_nrnthread.h" #include "nvector_nrnthread_ld.h" #include "nvector_nrnserial_ld.h" class Cvode; class Daspk { public: Daspk(Cvode*, int neq); virtual ~Daspk(); int init(); int advance_tn(double tstop); int interpolate(double tout); // has strict precondition void statistics(); N_Vector ewtvec(); N_Vector acorvec(); private: void ida_init(); void info(); public: void* mem_; Cvode* cv_; N_Vector yp_; N_Vector delta_; // use for calling res explicitly N_Vector parasite_; // used when initialization cannot make f(y',y,t) #define VECTORIZE 1 #include #include #include #include "nrnoc2iv.h" #include "nrndaspk.h" #include "cvodeobj.h" #include "netcvode.h" #include "ivocvect.h" #include "vrecitem.h" #include "membfunc.h" #include "nonvintblock.h" typedef int (*Pfridot)(...); extern "C" { extern void setup_topology(), v_setup_vectors(); extern void nrn_mul_capacity(NrnThread*, Memb_list*); extern void nrn_div_capacity(NrnThread*, Memb_list*); extern int diam_changed; extern void recalc_diam(); extern int nrn_errno_check(int); //extern double t, dt; #define nt_dt nrn_threads->_dt #define nt_t nrn_threads->_t extern void long_difus_solve(int, NrnThread*); extern Symlist *hoc_built_in_symlist; #include "spmatrix.h" extern void nrndae_dkmap(double**, double**); extern double* sp13mat; #if 1 || PARANEURON extern void (*nrnthread_v_transfer_)(NrnThread*); extern void (*nrnmpi_v_transfer_)(); #endif extern void (*nrn_multisplit_setup_)(); extern void* nrn_multisplit_triang(NrnThread*); extern void* nrn_multisplit_reduce_solve(NrnThread*); extern void* nrn_multisplit_bksub(NrnThread*); extern void nrn_multisplit_nocap_v(); extern void nrn_multisplit_nocap_v_part1(NrnThread*); extern void nrn_multisplit_nocap_v_part2(NrnThread*); extern void nrn_multisplit_nocap_v_part3(NrnThread*); extern void nrn_multisplit_adjust_rhs(NrnThread*); #if PARANEURON extern void (*nrn_multisplit_solve_)(); #endif }; static Symbol* vsym; // for absolute tolerance #define SETUP 1 #define USED 2 /* CVODE expects dy/dt = f(y) and solve (I - gamma*J)*x = b with approx to J=df/dy. The NEURON fixed step method sets up C*dv/dt = F(v) by first calculating F(v) and storing it on the right hand side of the matrix equation ( see src/nrnoc/treeset.c nrn_rhs() ). It then sets up the left hand side of the matrix equation using nrn_set_cj(1./dt); setup1_tree_matrix(); setup2_tree_matrix(); to form (C/dt - J(F))*dv = F(v) After a nrn_solve() the answer, dv, is stored in the right hand side vector. However, one must be aware of the fact that the cvode state vector y is not the vector y for the fixed step in two ways. 1) the cvode state vector includes ALL states, including channel states. 2) the cvode state vector does NOT include the zero area nodes (since the capacitance for those nodes are 0). Furthermore, cvode cannot work with the extracellular mechanism (both because extracellular capacitance is often 0 and because more than one dv/dt is involved in some of the current balance equations) or LinearMechanism (same reasons). In that case the current balance equations are of the differential algebraic form c*dv/dt = f(v) where c is non-diagonal and may have empty rows. The variable step method for these cases is handled by daspk. */ // determine neq_ and vector of pointers to scatter/gather y // as well as algebraic nodes (no_cap) bool Cvode::init_global() { #if PARANEURON if (!use_partrans_ && nrnmpi_numprocs > 1 && (nrnmpi_v_transfer_ || nrn_multisplit_solve_)) { assert(nrn_nthread == 1); // we lack an NVector class for both // threads and mpi together // could be a lot better. use_partrans_ = true; }else #endif if (!structure_change_) { return false; } if (ctd_[0].cv_memb_list_ == nil) { neq_ = 0; if (use_daspk_) { return true; } if (nrn_nonvint_block_ode_count(0,0)) { return true; } return false; } return true; } void Cvode::init_eqn(){ double vtol; NrnThread* _nt; CvMembList* cml; Memb_list* ml; Memb_func* mf; int i, j, zneq, zneq_v, zneq_cap_v; //printf("Cvode::init_eqn\n"); if (nthsizes_) { delete [] nthsizes_; nthsizes_ = 0; } neq_ = 0; for (int id = 0; id < nctd_; ++id) { CvodeThreadData& z = ctd_[id]; z.cmlcap_ = nil; z.cmlext_ = nil; for (cml = z.cv_memb_list_; cml; cml = cml->next) { if (cml->index == CAP) { z.cmlcap_ = cml; } if (cml->index == EXTRACELL) { z.cmlext_ = cml; } } } if (use_daspk_) { daspk_init_eqn(); return; } FOR_THREADS(_nt) { // for lvardt, this body done only once and for ctd_[0] CvodeThreadData& z = ctd_[_nt->id]; // how many ode's are there? First ones are non-zero capacitance // nodes with non-zero capacitance zneq_cap_v = z.cmlcap_ ? z.cmlcap_->ml->nodecount : 0; zneq = zneq_cap_v; z.neq_v_ = z.nonvint_offset_ = zneq; // now add the membrane mechanism ode's to the count for (cml = z.cv_memb_list_; cml; cml = cml->next) { Pfridot s = (Pfridot)memb_func[cml->index].ode_count; if (s) { zneq += cml->ml->nodecount * (*s)(cml->index); } } z.nonvint_extra_offset_ = zneq; if (z.pv_) { delete [] z.pv_; delete [] z.pvdot_; z.pv_ = 0; z.pvdot_ = 0; } if (z.nonvint_extra_offset_) { z.pv_ = new double*[z.nonvint_extra_offset_]; z.pvdot_ = new double*[z.nonvint_extra_offset_]; } zneq += nrn_nonvint_block_ode_count(zneq, _nt->id); z.nvsize_ = zneq; z.nvoffset_ = neq_; neq_ += zneq; #if 0 printf("%d Cvode::init_eqn id=%d neq_v_=%d #nonvint=%d #nonvint_extra=%d nvsize=%d\n", nrnmpi_myid, _nt->id, z.neq_v_, z.nonvint_extra_offset_ - z.nonvint_offset_, z.nvsize_ - z.nonvint_extra_offset_, z.nvsize_); #endif if (nth_) { break; } //lvardt } #if PARANEURON if (use_partrans_) { global_neq_ = nrnmpi_int_sum_reduce(neq_); //printf("%d global_neq_=%d neq=%d\n", nrnmpi_myid, global_neq_, neq_); } #endif atolvec_alloc(neq_); for (int id = 0; id < nctd_; ++id) { CvodeThreadData& z = ctd_[id]; double* atv = n_vector_data(atolnvec_, id); zneq_cap_v = z.cmlcap_ ? z.cmlcap_->ml->nodecount : 0; zneq = z.nvsize_; zneq_v = zneq_cap_v; for (i=0; i < zneq; ++i) { atv[i] = ncv_->atol(); } vtol = 1.; if (!vsym) { vsym = hoc_table_lookup("v", hoc_built_in_symlist); } if (vsym->extra) { double x; x = vsym->extra->tolerance; if (x != 0 && x < vtol) { vtol = x; } } for (i=0; i < zneq_cap_v; ++i) { atv[i] *= vtol; } // deal with voltage nodes // only cap nodes for cvode for (i=0; i < z.v_node_count_; ++i) { //sentinal values for determining no_cap NODERHS(z.v_node_[i]) = 1.; } for (i=0; i < zneq_cap_v; ++i) { ml = z.cmlcap_->ml; z.pv_[i] = &NODEV(ml->nodelist[i]); z.pvdot_[i] = &(NODERHS(ml->nodelist[i])); *z.pvdot_[i] = 0.; // only ones = 1 are no_cap } // the remainder are no_cap nodes if (z.no_cap_node_) { delete [] z.no_cap_node_; delete [] z.no_cap_child_; } z.no_cap_node_ = new Node*[z.v_node_count_ - zneq_cap_v]; z.no_cap_child_ = new Node*[z.v_node_count_ - zneq_cap_v]; z.no_cap_count_ = 0; j = 0; for (i=0; i < z.v_node_count_; ++i) { if (NODERHS(z.v_node_[i]) > .5) { z.no_cap_node_[z.no_cap_count_++] = z.v_node_[i]; } if (z.v_parent_[i] && NODERHS(z.v_parent_[i]) > .5) { z.no_cap_child_[j++] = z.v_node_[i]; } } z.no_cap_child_count_ = j; // use the sentinal values in NODERHS to construct a new no cap membrane list new_no_cap_memb(z, _nt); // map the membrane mechanism ode state and dstate pointers int ieq = zneq_v; for (cml = z.cv_memb_list_; cml; cml = cml->next) { int n; ml = cml->ml; mf = memb_func + cml->index; Pfridot sc = (Pfridot)mf->ode_count; if (sc && ( (n = (*sc)(cml->index)) > 0)) { Pfridot s = (Pfridot)mf->ode_map; if (mf->hoc_mech) { for (j=0; j < ml->nodecount; ++j) { (*s)(ieq, z.pv_ + ieq, z.pvdot_ + ieq, ml->prop[j], atv + ieq); ieq += n; } }else{ for (j=0; j < ml->nodecount; ++j) { (*s)(ieq, z.pv_ + ieq, z.pvdot_ + ieq, ml->data[j], ml->pdata[j], atv + ieq, cml->index); ieq += n; } } } } nrn_nonvint_block_ode_abstol(z.nvsize_, atv, id); } structure_change_ = false; } void Cvode::new_no_cap_memb(CvodeThreadData& z, NrnThread* _nt) { int i, n; CvMembList* cml, *ncm; Memb_list* ml; z.delete_memb_list(z.no_cap_memb_); z.no_cap_memb_ = nil; for (cml = z.cv_memb_list_; cml; cml = cml->next) { Memb_list* ml = cml->ml; Memb_func* mf = memb_func + cml->index; // only point processes with currents are possibilities if (!mf->is_point || !mf->current) { continue; } // count how many at no cap nodes n = 0; for (i=0; i < ml->nodecount; ++i) { if (NODERHS(ml->nodelist[i]) > .5) { ++n; } } if (n == 0) continue; // keep same order if (z.no_cap_memb_ == nil) { z.no_cap_memb_ = new CvMembList(); ncm = z.no_cap_memb_; }else{ ncm->next = new CvMembList(); ncm = ncm->next; } ncm->next = nil; ncm->index = cml->index; ncm->ml->nodecount = n; // allocate ncm->ml->nodelist = new Node*[n]; #if CACHEVEC ncm->ml->nodeindices = new int[n]; #endif if (mf->hoc_mech) { ncm->ml->prop = new Prop*[n]; }else{ ncm->ml->data = new double*[n]; ncm->ml->pdata = new Datum*[n]; } ncm->ml->_thread = ml->_thread; // can share this // fill n = 0; for (i=0; i < ml->nodecount; ++i) { if (NODERHS(ml->nodelist[i]) > .5) { ncm->ml->nodelist[n] = ml->nodelist[i]; #if CACHEVEC ncm->ml->nodeindices[n] = ml->nodeindices[i]; #endif if (mf->hoc_mech) { ncm->ml->prop[n] = ml->prop[i]; }else{ ncm->ml->data[n] = ml->data[i]; ncm->ml->pdata[n] = ml->pdata[i]; } ++n; } } } } void Cvode::daspk_init_eqn(){ // DASPK equation order is exactly the same order as the // fixed step method for current balance (including // extracellular nodes) and linear mechanism. Remaining ode // equations are same order as for Cvode. Thus, daspk differs from // cvode order primarily in that cap and no-cap nodes are not // distinguished. // note that only one thread is allowed for sparse right now. NrnThread* _nt = nrn_threads; CvodeThreadData& z = ctd_[0]; double vtol; //printf("Cvode::daspk_init_eqn\n"); int i, j, in, ie, k, zneq; // how many equations are there? neq_ = 0; Memb_func* mf; CvMembList* cml; //start with all the equations for the fixed step method. if (use_sparse13 == 0 || diam_changed != 0) { recalc_diam(); } zneq = spGetSize(_nt->_sp13mat, 0); z.neq_v_ = z.nonvint_offset_ = zneq; // now add the membrane mechanism ode's to the count for (cml = z.cv_memb_list_; cml; cml = cml->next) { Pfridot s = (Pfridot)memb_func[cml->index].ode_count; if (s) { zneq += cml->ml->nodecount * (*s)(cml->index); } } z.nonvint_extra_offset_ = zneq; zneq += nrn_nonvint_block_ode_count(zneq, _nt->id); z.nvsize_ = zneq; z.nvoffset_ = neq_; neq_ = z.nvsize_; //printf("Cvode::daspk_init_eqn: neq_v_=%d neq_=%d\n", neq_v_, neq_); if (z.pv_) { delete [] z.pv_; delete [] z.pvdot_; } z.pv_ = new double*[z.nonvint_extra_offset_]; z.pvdot_ = new double*[z.nonvint_extra_offset_]; atolvec_alloc(neq_); double* atv = n_vector_data(atolnvec_, 0); for (i=0; i < neq_; ++i) { atv[i] = ncv_->atol(); } vtol = 1.; if (!vsym) { vsym = hoc_table_lookup("v", hoc_built_in_symlist); } if (vsym->extra) { double x; x = vsym->extra->tolerance; if (x != 0 && x < vtol) { vtol = x; } } // deal with voltage and extracellular and linear circuit nodes // for daspk the order is the same assert(use_sparse13); if (use_sparse13) { for (in = 0; in < _nt->end; ++in) { Node* nd; Extnode* nde; nd = _nt->_v_node[in]; nde = nd->extnode; i = nd->eqn_index_ - 1; // the sparse matrix index starts at 1 z.pv_[i] = &NODEV(nd); z.pvdot_[i] = nd->_rhs; if (nde) { for (ie=0; ie < nlayer; ++ie) { k = i + ie + 1; z.pv_[k] = nde->v + ie; z.pvdot_[k] = nde->_rhs[ie]; } } } nrndae_dkmap(z.pv_, z.pvdot_); for (i=0; i < z.neq_v_; ++i) { atv[i] *= vtol; } } // map the membrane mechanism ode state and dstate pointers int ieq = z.neq_v_; for (cml = z.cv_memb_list_; cml; cml = cml->next) { int n; mf = memb_func + cml->index; Pfridot sc = (Pfridot)mf->ode_count; if (sc && ( (n = (*sc)(cml->index)) > 0)) { Memb_list* ml = cml->ml; Pfridot s = (Pfridot)mf->ode_map; if (mf->hoc_mech) { for (j=0; j < ml->nodecount; ++j) { (*s)(ieq, z.pv_ + ieq, z.pvdot_ + ieq, ml->prop[j], atv + ieq); ieq += n; } }else{ for (j=0; j < ml->nodecount; ++j) { (*s)(ieq, z.pv_ + ieq, z.pvdot_ + ieq, ml->data[j], ml->pdata[j], atv + ieq, cml->index); ieq += n; } } } } structure_change_ = false; } double* Cvode::n_vector_data(N_Vector v, int tid) { if (!v) { return 0; } if (nctd_ > 1) { N_Vector subvec = ((N_Vector*)N_VGetArrayPointer(v))[tid]; return N_VGetArrayPointer(subvec); } return N_VGetArrayPointer(v); } extern "C" { extern void nrn_extra_scatter_gather(int, int); } void Cvode::scatter_y(double* y, int tid){ int i; CvodeThreadData& z = CTD(tid); for (i = 0; i < z.nonvint_extra_offset_; ++i) { *(z.pv_[i]) = y[i]; //printf("%d scatter_y %d %d %g\n", nrnmpi_myid, tid, i, y[i]); } CvMembList* cml; for (cml = z.cv_memb_list_; cml; cml = cml->next) { Memb_func* mf = memb_func + cml->index; if (mf->ode_synonym) { Pfridot s = (Pfridot)mf->ode_synonym; Memb_list* ml = cml->ml; (*s)(ml->nodecount, ml->data, ml->pdata); } } nrn_extra_scatter_gather(0, tid); } static Cvode* gather_cv; static N_Vector gather_vec; static void* gather_y_thread(NrnThread* nt) { Cvode* cv = gather_cv; cv->gather_y(cv->n_vector_data(gather_vec, nt->id), nt->id); return 0; } void Cvode::gather_y(N_Vector y) { if (nth_) { gather_y(N_VGetArrayPointer(y), nth_->id); return; } gather_cv = this; gather_vec = y; nrn_multithread_job(gather_y_thread); } void Cvode::gather_y(double* y, int tid) { int i; CvodeThreadData& z = CTD(tid); nrn_extra_scatter_gather(1, tid); for (i = 0; i < z.nonvint_extra_offset_; ++i) { y[i] = *(z.pv_[i]); //printf("gather_y %d %d %g\n", tid, i, y[i]); } } void Cvode::scatter_ydot(double* ydot, int tid){ int i; CvodeThreadData& z = CTD(tid); for (i = 0; i < z.nonvint_extra_offset_; ++i) { *(z.pvdot_[i]) = ydot[i]; //printf("scatter_ydot %d %d %g\n", tid, i, ydot[i]); } } static void* gather_ydot_thread(NrnThread* nt) { Cvode* cv = gather_cv; cv->gather_ydot(cv->n_vector_data(gather_vec, nt->id), nt->id); return 0; } void Cvode::gather_ydot(N_Vector y) { if (nth_) { gather_ydot(N_VGetArrayPointer(y), nth_->id); return; } gather_cv = this; gather_vec = y; nrn_multithread_job(gather_ydot_thread); } void Cvode::gather_ydot(double* ydot, int tid){ int i; if (ydot){ CvodeThreadData& z = CTD(tid); for (i = 0; i < z.nonvint_extra_offset_; ++i) { ydot[i] = *(z.pvdot_[i]); //printf("%d gather_ydot %d %d %g\n", nrnmpi_myid, tid, i, ydot[i]); } } } int Cvode::setup(N_Vector ypred, N_Vector fpred){ //printf("Cvode::setup\n"); if (nth_) { return 0; } ++jac_calls_; CvodeThreadData& z = CTD(0); double gamsave = nrn_threads->_dt; nrn_threads->_dt = gam(); nrn_nonvint_block_jacobian(z.nvsize_, n_vector_data(ypred,0), n_vector_data(fpred,0), 0); nrn_threads->_dt = gamsave; return 0; } int Cvode::solvex_thread(double* b, double* y, NrnThread* nt){ //printf("Cvode::solvex_thread %d t=%g t_=%g\n", nt->id, nt->t, t_); //printf("Cvode::solvex_thread %d %g\n", nt->id, gam()); //printf("\tenter b\n"); //for (int i=0; i < neq_; ++i) { printf("\t\t%d %g\n", i, b[i]);} int i; CvodeThreadData& z = CTD(nt->id); nt->cj = 1./gam(); nt->_dt = gam(); if (z.nvsize_ == 0) { return 0; } lhs(nt); // special version for cvode. scatter_ydot(b, nt->id); if (z.cmlcap_) nrn_mul_capacity(nt, z.cmlcap_->ml); for (i=0; i < z.no_cap_count_; ++i) { NODERHS(z.no_cap_node_[i]) = 0.; } // solve it #if PARANEURON if (nrn_multisplit_solve_) { (*nrn_multisplit_solve_)(); }else #endif { triang(nt); bksub(nt); } //for (i=0; i < v_node_count; ++i) { // printf("%d rhs %d %g t=%g\n", nrnmpi_myid, i, VEC_RHS(i), t); //} if (ncv_->stiff() == 2) { solvemem(nt); }else{ // bug here should multiply by gam } gather_ydot(b, nt->id); //printf("\texit b\n"); //for (i=0; i < neq_; ++i) { printf("\t\t%d %g\n", i, b[i]);} nrn_nonvint_block_ode_solve(z.nvsize_, b, y, nt->id); return 0; } int Cvode::solvex_thread_part1(double* b, NrnThread* nt){ //printf("Cvode::solvex_thread %d t=%g t_=%g\n", nt->id, nt->t, t_); //printf("Cvode::solvex_thread %d %g\n", nt->id, gam()); //printf("\tenter b\n"); //for (int i=0; i < neq_; ++i) { printf("\t\t%d %g\n", i, b[i]);} int i; CvodeThreadData& z = ctd_[nt->id]; nt->cj = 1./gam(); nt->_dt = gam(); if (z.nvsize_ == 0) { return 0; } lhs(nt); // special version for cvode. scatter_ydot(b, nt->id); if (z.cmlcap_) nrn_mul_capacity(nt, z.cmlcap_->ml); for (i=0; i < z.no_cap_count_; ++i) { NODERHS(z.no_cap_node_[i]) = 0.; } // solve it nrn_multisplit_triang(nt); return 0; } int Cvode::solvex_thread_part2(NrnThread* nt){ nrn_multisplit_reduce_solve(nt); return 0; } int Cvode::solvex_thread_part3(double* b, NrnThread* nt){ nrn_multisplit_bksub(nt); //for (i=0; i < v_node_count; ++i) { // printf("%d rhs %d %g t=%g\n", nrnmpi_myid, i, VEC_RHS(i), t); //} if (ncv_->stiff() == 2) { solvemem(nt); }else{ // bug here should multiply by gam } gather_ydot(b, nt->id); //printf("\texit b\n"); //for (i=0; i < neq_; ++i) { printf("\t\t%d %g\n", i, b[i]);} return 0; } void Cvode::solvemem(NrnThread* nt) { // all the membrane mechanism matrices CvodeThreadData& z = CTD(nt->id); CvMembList* cml; for (cml = z.cv_memb_list_; cml; cml = cml->next) { // probably can start at 6 or hh Memb_func* mf = memb_func + cml->index; if (mf->ode_matsol) { Memb_list* ml = cml->ml; Pfridot s = (Pfridot)mf->ode_matsol; if (mf->hoc_mech) { int j, count; count = ml->nodecount; for (j = 0; j < count; ++j) { Node* nd = ml->nodelist[j]; (*s)(nd, ml->prop[j]); } }else{ (*s)(nt, ml, cml->index); } if (errno) { if (nrn_errno_check(cml->index)) { hoc_warning("errno set during ode jacobian solve", (char*)0); } } } } long_difus_solve(2, nt); } void Cvode::fun_thread(double tt, double* y, double* ydot, NrnThread* nt){ CvodeThreadData& z = CTD(nt->id); fun_thread_transfer_part1(tt, y, nt); nrn_nonvint_block_ode_fun(z.nvsize_, y, ydot, nt->id); fun_thread_transfer_part2(ydot, nt); } void Cvode::fun_thread_transfer_part1(double tt, double* y, NrnThread* nt){ CvodeThreadData& z = CTD(nt->id); nt->_t = tt; // fix this!!! nt->_dt = h(); // really does not belong here but dt is needed for events if (nt->_dt == 0.) { nt->_dt = 1e-8; } //printf("%p fun %d %.15g %g\n", this, neq_, _t, _dt); play_continuous_thread(tt, nt); if (z.nvsize_ == 0) { return; } scatter_y(y, nt->id); #if PARANEURON if (use_partrans_) { nrnmpi_assert_opstep(opmode_, nt->_t); } #endif nocap_v(nt); // vm at nocap nodes consistent with adjacent vm } void Cvode::fun_thread_transfer_part2(double* ydot, NrnThread* nt){ CvodeThreadData& z = CTD(nt->id); if (z.nvsize_ == 0) { return; } #if 1 || PARANEURON if (nrnthread_v_transfer_) { (*nrnthread_v_transfer_)(nt); } #endif before_after(z.before_breakpoint_, nt); rhs(nt); // similar to nrn_rhs in treeset.c #if PARANEURON if (nrn_multisplit_solve_) { // non-zero area nodes need an adjustment nrn_multisplit_adjust_rhs(nt); } #endif do_ode(nt); // divide by cm and compute capacity current if (z.cmlcap_) nrn_div_capacity(nt, z.cmlcap_->ml); if (nt->_nrn_fast_imem) { double* p = nt->_nrn_fast_imem->_nrn_sav_rhs; for (int i = 0; i < z.v_node_count_; ++i) { Node* nd = z.v_node_[i]; p[nd->v_node_index] *= NODEAREA(nd) * 0.01; } } gather_ydot(ydot, nt->id); before_after(z.after_solve_, nt); //for (int i=0; i < z.neq_; ++i) { printf("\t%d %g %g\n", i, y[i], ydot?ydot[i]:-1e99);} } void Cvode::fun_thread_ms_part1(double tt, double* y, NrnThread* nt){ CvodeThreadData& z = ctd_[nt->id]; nt->_t = tt; // fix this!!! nt->_dt = h(); // really does not belong here but dt is needed for events if (nt->_dt == 0.) { nt->_dt = 1e-8; } //printf("%p fun %d %.15g %g\n", this, neq_, _t, _dt); play_continuous_thread(tt, nt); scatter_y(y, nt->id); #if PARANEURON if (use_partrans_) { nrnmpi_assert_opstep(opmode_, nt->_t); } #endif nocap_v_part1(nt); // vm at nocap nodes consistent with adjacent vm } void Cvode::fun_thread_ms_part2(NrnThread* nt){ nocap_v_part2(nt); // vm at nocap nodes consistent with adjacent vm } void Cvode::fun_thread_ms_part34(double* ydot, NrnThread* nt) { fun_thread_ms_part3(nt); fun_thread_ms_part4(ydot, nt); } void Cvode::fun_thread_ms_part3(NrnThread* nt){ nocap_v_part3(nt); // should be by itself in fun_thread_part2_5 if // following is true and a gap is in 0 area node } void Cvode::fun_thread_ms_part4(double* ydot, NrnThread* nt) { #if 1 || PARANEURON if (nrnthread_v_transfer_) { (*nrnthread_v_transfer_)(nt); } #endif CvodeThreadData& z = ctd_[nt->id]; if (z.nvsize_ == 0) { return; } before_after(z.before_breakpoint_, nt); rhs(nt); // similar to nrn_rhs in treeset.c nrn_multisplit_adjust_rhs(nt); do_ode(nt); // divide by cm and compute capacity current nrn_div_capacity(nt, z.cmlcap_->ml); gather_ydot(ydot, nt->id); before_after(z.after_solve_, nt); //for (int i=0; i < z.neq_; ++i) { printf("\t%d %g %g\n", i, y[i], ydot?ydot[i]:-1e99);} } void Cvode::before_after(BAMechList* baml, NrnThread* nt) { BAMechList* ba; int i, j; for (ba = baml; ba; ba = ba->next) { Pfridot f = (Pfridot)ba->bam->f; Memb_list* ml = ba->ml; if (ba->indices) { for (j=0; j < ba->cnt; ++j) { i = ba->indices[j]; (*f)(ml->nodelist[i], ml->data[i], ml->pdata[i], ml->_thread, nt); } }else{ for (i=0; i < ml->nodecount; ++i) { (*f)(ml->nodelist[i], ml->data[i], ml->pdata[i], ml->_thread, nt); } } } } /* v at nodes with capacitance is correct (from scatter v) however v at no-cap nodes is out of date since the values are from the previous call. v would merely be the weighted average of the adjacent v's except for the possibility of membrane currents at branch points. We thus need to calculate both i(v) and di/dv at those zero area nodes so that we can solve the algebraic equation (di/dv + a_j)*vmnew = - i(vmold) + a_j*v_j. The simplest case is no membrane current and root or leaf. In that case vmnew = v_j. The next simplest case is no membrane current. In that case, vm is the weighted sum (via the axial coefficients) of v_j. For now we handle only the general case when there are membrane currents This was done by constructing a list of membrane mechanisms that contribute to the membrane current at the nocap nodes. */ void Cvode::nocap_v(NrnThread* _nt){ int i; CvodeThreadData& z = CTD(_nt->id); for (i = 0; i < z.no_cap_count_; ++i) { // initialize storage Node* nd = z.no_cap_node_[i]; NODED(nd) = 0; NODERHS(nd) = 0; } // compute the i(vmold) and di/dv rhs_memb(z.no_cap_memb_, _nt); lhs_memb(z.no_cap_memb_, _nt); for (i = 0; i < z.no_cap_count_; ++i) {// parent axial current Node* nd = z.no_cap_node_[i]; // following from global v_parent NODERHS(nd) += NODED(nd) * NODEV(nd); Node* pnd = _nt->_v_parent[nd->v_node_index]; if (pnd) { NODERHS(nd) -= NODEB(nd) * NODEV(pnd); NODED(nd) -= NODEB(nd); } } for (i = 0; i < z.no_cap_child_count_; ++i) {// child axial current Node* nd = z.no_cap_child_[i]; // following from global v_parent Node* pnd = _nt->_v_parent[nd->v_node_index]; NODERHS(pnd) -= NODEA(nd) * NODEV(nd); NODED(pnd) -= NODEA(nd); } #if PARANEURON if (nrn_multisplit_solve_) { // add up the multisplit equations nrn_multisplit_nocap_v(); } #endif for (i = 0; i < z.no_cap_count_; ++i) { Node* nd = z.no_cap_node_[i]; NODEV(nd) = NODERHS(nd) / NODED(nd); // printf("%d %d %g v=%g\n", nrnmpi_myid, i, _nt->_t, NODEV(nd)); } // no_cap v's are now consistent with adjacent v's } void Cvode::nocap_v_part1(NrnThread* _nt){ int i; CvodeThreadData& z = ctd_[_nt->id]; for (i = 0; i < z.no_cap_count_; ++i) { // initialize storage Node* nd = z.no_cap_node_[i]; NODED(nd) = 0; NODERHS(nd) = 0; } // compute the i(vmold) and di/dv rhs_memb(z.no_cap_memb_, _nt); lhs_memb(z.no_cap_memb_, _nt); for (i = 0; i < z.no_cap_count_; ++i) {// parent axial current Node* nd = z.no_cap_node_[i]; // following from global v_parent NODERHS(nd) += NODED(nd) * NODEV(nd); Node* pnd = _nt->_v_parent[nd->v_node_index]; if (pnd) { NODERHS(nd) -= NODEB(nd) * NODEV(pnd); NODED(nd) -= NODEB(nd); } } for (i = 0; i < z.no_cap_child_count_; ++i) {// child axial current Node* nd = z.no_cap_child_[i]; // following from global v_parent Node* pnd = _nt->_v_parent[nd->v_node_index]; NODERHS(pnd) -= NODEA(nd) * NODEV(nd); NODED(pnd) -= NODEA(nd); } nrn_multisplit_nocap_v_part1(_nt); } void Cvode::nocap_v_part2(NrnThread* _nt){ nrn_multisplit_nocap_v_part2(_nt); } void Cvode::nocap_v_part3(NrnThread* _nt){ int i; nrn_multisplit_nocap_v_part3(_nt); CvodeThreadData& z = ctd_[_nt->id]; for (i = 0; i < z.no_cap_count_; ++i) { Node* nd = z.no_cap_node_[i]; NODEV(nd) = NODERHS(nd) / NODED(nd); // printf("%d %d %g v=%g\n", nrnmpi_myid, i, t, NODEV(nd)); } // no_cap v's are now consistent with adjacent v's } void Cvode::do_ode(NrnThread* _nt){ // all the membrane mechanism ode's CvodeThreadData& z = CTD(_nt->id); CvMembList* cml; Memb_func* mf; for (cml = z.cv_memb_list_; cml; cml = cml->next) { // probably can start at 6 or hh mf = memb_func + cml->index; if (mf->ode_spec) { Pfridot s = (Pfridot)mf->ode_spec; Memb_list* ml = cml->ml; if (mf->hoc_mech) { int j, count; count = ml->nodecount; for (j = 0; j < count; ++j) { Node* nd = ml->nodelist[j]; (*s)(nd, ml->prop[j]); } }else{ (*s)(_nt, ml, cml->index); } if (errno) { if (nrn_errno_check(cml->index)) { hoc_warning("errno set during ode evaluation", (char*)0); } } } } long_difus_solve(1, _nt); } static Cvode* nonode_cv; static void* nonode_thread(NrnThread* nt) { nonode_cv->do_nonode(nt); return 0; } void Cvode::do_nonode(NrnThread* _nt) { // all the hacked integrators, etc, in SOLVE procedure //almost a verbatim copy of nonvint in fadvance.c if (!_nt) { if (nrn_nthread > 1) { nonode_cv = this; nrn_multithread_job(nonode_thread); return; } _nt = nrn_threads; } CvodeThreadData& z = CTD(_nt->id); CvMembList* cml; for (cml = z.cv_memb_list_; cml; cml = cml->next) { Memb_func* mf = memb_func + cml->index; if (mf->state) { Memb_list* ml = cml->ml; if (!mf->ode_spec){ Pfridot s = (Pfridot)mf->state; (*s)(_nt, ml, cml->index); #if 0 if (errno) { if (nrn_errno_check(cml->index)) { hoc_warning("errno set during calculation of states", (char*)0); } } #endif }else if (mf->singchan_) { Pfridot s = (Pfridot)mf->singchan_; (*s)(_nt, ml, cml->index); } } } } void Cvode::states(double* pd) { int i, id; for (id=0; id < nctd_; ++id) { CvodeThreadData& z = ctd_[id]; double* s = n_vector_data(y_, id); for (i=0; i < z.nvsize_; ++i) { pd[i + z.nvoffset_] = s[i]; } } } void Cvode::dstates(double* pd) { int i, id; for (id=0; id < nctd_; ++id) { CvodeThreadData& z = ctd_[id]; for (i=0; i < z.nvsize_; ++i) { pd[i + z.nvoffset_] = *z.pvdot_[i]; } } } void Cvode::error_weights(double* pd) { int i, id; for (id=0; id < nctd_; ++id) { CvodeThreadData& z = ctd_[id]; double* s = n_vector_data(ewtvec(), id); for (i=0; i < z.nvsize_; ++i) { pd[i + z.nvoffset_] = s[i]; } } } void Cvode::acor(double* pd) { int i, id; NrnThread* nt; for (id=0; id < nctd_; ++id) { CvodeThreadData& z = ctd_[id]; double* s = n_vector_data(acorvec(), id); for (i=0; i < z.nvsize_; ++i) { pd[i + z.nvoffset_] = s[i]; } } } void Cvode::delete_prl() { int i; for (i=0; i < nctd_; ++i) { CvodeThreadData& z = ctd_[i]; if (z.play_) { delete z.play_; } z.play_ = nil; if (z.record_) { delete z.record_; } z.record_ = nil; } } void Cvode::record_add(PlayRecord* pr) { CvodeThreadData& z = CTD(pr->ith_); if (!z.record_) { z.record_ = new PlayRecList(1); } z.record_->append(pr); } void Cvode::record_continuous() { if (nth_) { // lvardt record_continuous_thread(nth_); }else{ for (int i=0; i < nrn_nthread; ++i) { NrnThread* nt = nrn_threads + i; CvodeThreadData& z = ctd_[i]; if (z.before_step_) { before_after(z.before_step_, nt); } if (z.record_) { for (long i=0; i < z.record_->count(); ++i) { z.record_->item(i)->continuous(t_); } } } } } void Cvode::record_continuous_thread(NrnThread* nt) { CvodeThreadData& z = CTD(nt->id); if (z.before_step_) { before_after(z.before_step_, nt); } if (z.record_) { for (long i=0; i < z.record_->count(); ++i) { z.record_->item(i)->continuous(t_); } } } void Cvode::play_add(PlayRecord* pr) { CvodeThreadData& z = CTD(pr->ith_); if (!z.play_) { z.play_ = new PlayRecList(1); } z.play_->append(pr); } void Cvode::play_continuous(double tt) { if (nth_) { // lvardt play_continuous_thread(tt, nth_); }else{ for (int i=0; i < nrn_nthread; ++i) { CvodeThreadData& z = ctd_[i]; if (z.play_) { for (long i=0; i < z.play_->count(); ++i) { z.play_->item(i)->continuous(tt); } } } } } void Cvode::play_continuous_thread(double tt, NrnThread* nt) { CvodeThreadData& z = CTD(nt->id); if (z.play_) { for (long i=0; i < z.play_->count(); ++i) { z.play_->item(i)->continuous(tt); } } } neuron-7.5/src/nrncvode/pool.h000077500000000000000000000051241323325274500164350ustar00rootroot00000000000000#ifndef pool_h #define pool_h // create and manage a vector of objects as a memory pool of those objects // the object must have a void clear() method which takes care of any // data the object contains which should be deleted upon free_all. // clear() is NOT called on free, only on free_all. // the chain of Pool // is only for extra items in a pool_ and no other fields are used. // the pool doubles in size every time a chain Pool is added. // maxget() tells the most number of pool items used at once. #include #define declarePool(Pool,T) \ class Pool { \ public: \ Pool(long count, int mkmut = 0); \ ~Pool(); \ T* alloc(); \ void hpfree(T*); \ int maxget() { return maxget_;} \ void free_all(); \ private: \ void grow(); \ private: \ T** items_; \ T* pool_; \ long pool_size_; \ long count_; \ long get_; \ long put_; \ long nget_; \ long maxget_; \ Pool* chain_; \ MUTDEC \ }; \ \ #define implementPool(Pool,T) \ Pool::Pool(long count, int mkmut) { \ count_ = count; \ pool_ = new T[count_]; \ pool_size_ = count; \ items_ = new T*[count_]; \ {for (long i = 0; i < count_; ++i) items_[i] = pool_ + i;} \ get_ = 0; \ put_ = 0; \ nget_ = 0; \ maxget_ = 0; \ chain_ = 0; \ MUTCONSTRUCT(mkmut) \ } \ \ void Pool::grow() { \ assert(get_ == put_); \ Pool* p = new Pool(count_); \ p->chain_ = chain_; \ chain_ = p; \ long newcnt = 2*count_; \ T** itms = new T*[newcnt]; \ long i, j; \ put_ += count_; \ {for (i = 0; i < get_; ++i) { \ itms[i] = items_[i]; \ }} \ {for (i = get_, j = 0; j < count_; ++i, ++j) { \ itms[i] = p->items_[j]; \ }} \ {for (i = put_, j = get_; j < count_; ++i, ++j) { \ itms[i] = items_[j]; \ }} \ delete [] items_; \ delete [] p->items_; \ p->items_ = 0; \ items_ = itms; \ count_ = newcnt; \ } \ \ Pool::~Pool() { \ {if (chain_) { \ delete chain_; \ }} \ delete [] pool_; \ {if (items_) { \ delete [] items_; \ }} \ MUTDESTRUCT \ } \ \ T* Pool::alloc() { \ MUTLOCK \ {if (nget_ >= count_) { grow(); }} \ T* item = items_[get_]; \ get_ = (get_+1)%count_; \ ++nget_; \ {if (nget_ > maxget_) { maxget_ = nget_; }} \ MUTUNLOCK \ return item; \ } \ \ void Pool::hpfree(T* item) { \ MUTLOCK \ assert(nget_ > 0); \ items_[put_] = item; \ put_ = (put_ + 1)%count_; \ --nget_; \ MUTUNLOCK \ } \ \ void Pool::free_all() { \ MUTLOCK \ Pool* pp; \ long i; \ nget_ = 0; \ get_ = 0; \ put_ = 0; \ {for(pp = this; pp; pp = pp->chain_) { \ for (i=0; i < pp->pool_size_; ++i) { \ items_[put_++] = pp->pool_ + i; \ pp->pool_[i].clear(); \ } \ }} \ assert(put_ == count_); \ put_ = 0; \ MUTUNLOCK \ } \ \ #endif neuron-7.5/src/nrncvode/rbtqueue.cpp000066400000000000000000000313261323325274500176530ustar00rootroot00000000000000// red black tree /* Derived from http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/niemann/s_man.htm Sorting and Searching Algorithms: A Cookbook by Thomas Niemann */ /* The original c code is enclosed in #if 0 and the original functions are given the class name RBTQueue (which is defined as TQueue) whereas my own analogous class methods to the old TQueue have the same name */ /* red-black tree */ #include #include #include #include #if 0 typedef int T; /* type of item to be stored */ #else typedef double T; #endif #define compLT(a,b) (a < b) #define compEQ(a,b) (a == b) #if 0 /* Red-Black tree description */ typedef enum { BLACK, RED } nodeColor; #endif #if 0 typedef struct Node_ { struct Node_ *left; /* left child */ struct Node_ *right; /* right child */ struct Node_ *parent; /* parent */ nodeColor color; /* node color (BLACK, RED) */ T data; /* data stored in node */ } Node; #else #define left left_ #define right right_ #define parent parent_ #define Node TQItem #define data t_ #define color red_ #define BLACK false #define RED true #define root root_ #endif #if 0 #define NIL &sentinel /* all leafs are sentinels */ Node sentinel = { NIL, NIL, 0, BLACK, 0}; Node *root = NIL; /* root of Red-Black tree */ #else #undef NIL #define NIL sentinel static TQItem* sentinel; #endif TQItem::TQItem() { left_ = NIL; right_ = NIL; parent_ = nil; } TQItem::~TQItem() { assert(this != NIL); } static void deleteitem(TQItem* i) { assert(i != NIL); if (i->left_ && i->left != NIL) { deleteitem(i->left_); } if (i->right_ && i->right != NIL) { deleteitem(i->right_); } i->left_ = nil; i->right_ = nil; tpool_->free(i); } bool TQItem::check() { #if DOCHECK #endif return true; } static void prnt(const TQItem* b, int level) { int i; for (i=0; i < level; ++i) { printf(" "); } // printf("%g %c %d\n", b->t_, b->data_?'x':'o', b->red_); printf("%g %c %d Q=%p D=%p\n", b->t_, b->data_?'x':'o', b->red_, b, b->data_); } static void chk(TQItem* b, int level) { if (!b->check()) { hoc_execerror("chk failed", errmess_); } } void TQItem::t_iterate(void (*f)(const TQItem*, int), int level) { if (left_ && left_ != NIL) { left_->t_iterate(f, level+1); } f(this, level); if (right_ && right_ != NIL) { right_->t_iterate(f, level+1); } } TQueue::TQueue() { if (!sentinel) { sentinel = new TQItem(); sentinel->red_ = BLACK; sentinel->t_ = 0.; sentinel->data_ = nil; sentinel->left_ = NIL; sentinel->right_ = NIL; } if (!tpool_) { tpool_ = new TQItemPool(1000); } root_ = NIL; least_ = NIL; #if COLLECT_TQueue_STATISTICS nmove = ninsert = nrem = nleast = nbal = ncmplxrem = 0; nfastmove = ncompare = nleastsrch = nfind = nfindsrch = 0; #endif } TQueue::~TQueue() { if (root_ != NIL) { deleteitem(root_); } } void TQueue::print() { if (root_!= NIL) { root_->t_iterate(prnt, 0); } } void TQueue::forall_callback(void(*f)(const TQItem*, int)) { if (root_ != NIL ) { root_->t_iterate(f, 0); } } void TQueue::check(const char* mes) { #if DOCHECK errmess_ = mes; if (root_ != NIL) { root_->t_iterate(chk, 0); } errmess_ = nil; #endif } double TQueue::least_t() { TQItem* b = least(); if (b) { return b->t_; }else{ return 1e15; } } TQItem* TQueue::least() { STAT(nleast) #if !FAST_LEAST || DOCHECK TQItem* b; b = root_; if (b != NIL) for (; b->left_ != NIL; b = b->left_) { STAT(nleastsrch) } #if DOCHECK assert(least_ == b); #else least_ = b; #endif #endif return least_ != NIL ? least_ : nil ; } void TQueue::new_least() { assert(least_ != NIL); assert(least_->left_ == NIL); TQItem* b = least_->right_; if (b != NIL) { for (;b->left_ != NIL; b = b->left_) {;} least_ = b; }else{ b = least_->parent_; if (b && b != NIL) { assert(b->left_ == least_); least_ = b; }else{ least_ = NIL; } } } void TQueue::move_least(double tnew) { TQItem* b = least(); if (b) { move(b, tnew); } } void TQueue::move(TQItem* i, double tnew) { PSTART(1) STAT(nmove) // the long way deleteNode(i); insertNode(tnew, i); PSTOP(1) } void TQueue::statistics() { #if COLLECT_TQueue_STATISTICS printf("insertions=%lu moves=%lu fastmoves=%lu removals=%lu calls to least=%lu\n", ninsert, nmove, nfastmove, nrem, nleast); printf("calls to find=%lu balances=%lu complex removals=%lu\n", nfind, nbal, ncmplxrem); printf("comparisons=%lu leastsearch=%lu findsearch=%lu\n", ncompare, nleastsrch, nfindsrch); #else printf("Turn on COLLECT_TQueue_STATISTICS_ in tqueue.h\n"); #endif } void RBTQueue::rotateLeft(Node *x) { /************************** * rotate node x to left * **************************/ Node *y = x->right; /* establish x->right link */ x->right = y->left; if (y->left != NIL) y->left->parent = x; /* establish y->parent link */ if (y != NIL) y->parent = x->parent; if (x->parent) { if (x == x->parent->left) x->parent->left = y; else x->parent->right = y; } else { root = y; } /* link x and y */ y->left = x; if (x != NIL) x->parent = y; } void RBTQueue::rotateRight(Node *x) { /**************************** * rotate node x to right * ****************************/ Node *y = x->left; /* establish x->left link */ x->left = y->right; if (y->right != NIL) y->right->parent = x; /* establish y->parent link */ if (y != NIL) y->parent = x->parent; if (x->parent) { if (x == x->parent->right) x->parent->right = y; else x->parent->left = y; } else { root = y; } /* link x and y */ y->right = x; if (x != NIL) x->parent = y; } void RBTQueue::insertFixup(Node *x) { /************************************* * maintain Red-Black tree balance * * after inserting node x * *************************************/ /* check Red-Black properties */ while (x != root && x->parent->color == RED) { /* we have a violation */ if (x->parent == x->parent->parent->left) { Node *y = x->parent->parent->right; if (y->color == RED) { /* uncle is RED */ x->parent->color = BLACK; y->color = BLACK; x->parent->parent->color = RED; x = x->parent->parent; } else { /* uncle is BLACK */ if (x == x->parent->right) { /* make x a left child */ x = x->parent; rotateLeft(x); } /* recolor and rotate */ x->parent->color = BLACK; x->parent->parent->color = RED; rotateRight(x->parent->parent); } } else { /* mirror image of above code */ Node *y = x->parent->parent->left; if (y->color == RED) { /* uncle is RED */ x->parent->color = BLACK; y->color = BLACK; x->parent->parent->color = RED; x = x->parent->parent; } else { /* uncle is BLACK */ if (x == x->parent->left) { x = x->parent; rotateRight(x); } x->parent->color = BLACK; x->parent->parent->color = RED; rotateLeft(x->parent->parent); } } } root->color = BLACK; } Node* RBTQueue::insert(double t, void* d) { TQItem* i = tpool_->alloc(); i->data_ = d; insertNode(t, i); return i; } void RBTQueue::insertNode(T data, Node* x) { //printf("%p::insertNode %g\n", this, data); Node *current, *parent; #if FAST_LEAST STAT(ncompare) if (data < least_t()) { least_ = x; } #endif /*********************************************** * allocate node for data and insert in tree * ***********************************************/ /* find where node belongs */ STAT(ninsert) current = root; parent = 0; while (current != NIL) { #if 0 if (compEQ(data, current->data)) return (current); #endif parent = current; current = compLT(data, current->data) ? current->left : current->right; } /* setup new node */ #if 0 if ((x = malloc (sizeof(*x))) == 0) { printf ("insufficient memory (insertNode)\n"); exit(1); } #endif x->data = data; x->parent = parent; x->left = NIL; x->right = NIL; x->color = RED; /* insert node in tree */ if(parent) { if(compLT(data, parent->data)) parent->left = x; else parent->right = x; } else { root = x; } insertFixup(x); } void RBTQueue::deleteFixup(Node *x) { /************************************* * maintain Red-Black tree balance * * after deleting node x * *************************************/ while (x != root && x->color == BLACK) { if (x == x->parent->left) { Node *w = x->parent->right; if (w->color == RED) { w->color = BLACK; x->parent->color = RED; rotateLeft (x->parent); w = x->parent->right; } if (w->left->color == BLACK && w->right->color == BLACK) { w->color = RED; x = x->parent; } else { if (w->right->color == BLACK) { w->left->color = BLACK; w->color = RED; rotateRight (w); w = x->parent->right; } w->color = x->parent->color; x->parent->color = BLACK; w->right->color = BLACK; rotateLeft (x->parent); x = root; } } else { Node *w = x->parent->left; if (w->color == RED) { w->color = BLACK; x->parent->color = RED; rotateRight (x->parent); w = x->parent->left; } if (w->right->color == BLACK && w->left->color == BLACK) { w->color = RED; x = x->parent; } else { if (w->left->color == BLACK) { w->right->color = BLACK; w->color = RED; rotateLeft (w); w = x->parent->left; } w->color = x->parent->color; x->parent->color = BLACK; w->left->color = BLACK; rotateRight (x->parent); x = root; } } } x->color = BLACK; } void RBTQueue::remove(Node* z) { if (z && z != NIL) { deleteNode(z); tpool_->free(z); } } void RBTQueue::deleteNode(Node *z) { //printf("%p::deleteNode %g\n", this, z->t_); Node *x, *y; STAT(nrem) /***************************** * delete node z from tree * *****************************/ if (z == NIL) return; #if FAST_LEAST if (least_ == z) { new_least(); } #endif if (z->left == NIL || z->right == NIL) { /* y has a NIL node as a child */ y = z; } else { /* find tree successor with a NIL node as a child */ y = z->right; while (y->left != NIL) y = y->left; } /* x is y's only child */ if (y->left != NIL) x = y->left; else x = y->right; /* remove y from the parent chain */ x->parent = y->parent; if (y->parent) if (y == y->parent->left) y->parent->left = x; else y->parent->right = x; else root = x; #if 0 // inadequate. does not preserve association between data and Node* if (y != z) z->data = y->data; #endif if (y->color == BLACK) deleteFixup (x); #if 0 free (y); #else //we need to preserve the association between data and Node* if (y != z) { y->red_ = z->red_; y->parent_ = z->parent_; y->left_ = z->left_; y->right_ = z->right_; if (z->left_ != NIL) { z->left_->parent_ = y; } if (z->right_ != NIL) { z->right_->parent_ = y; } if (z->parent && z->parent_ != NIL) { if (z->parent_->left_ == z) { z->parent_->left_ = y; }else{ z->parent_->right_ = y; } } } #endif } Node* RBTQueue::find(T data) { STAT(nfind); /******************************* * find node containing data * *******************************/ Node *current = root; while(current != NIL) STAT(nfindsrch) STAT(ncompare) if(compEQ(data, current->data)) return (current); else current = compLT (data, current->data) ? current->left : current->right; return(0); } neuron-7.5/src/nrncvode/rbtqueue.h000066400000000000000000000021701323325274500173130ustar00rootroot00000000000000//#ifndef tqueue_h //#define tqueue_h #define COLLECT_TQueue_STATISTICS 1 class TQItem { public: TQItem(); virtual ~TQItem(); bool check(); void t_iterate(void (*)(const TQItem*, int), int); void clear(){} public: void* data_; double t_; TQItem* left_; TQItem* right_; TQItem* parent_; bool red_; }; class TQueue { public: TQueue(); virtual ~TQueue(); TQItem* least(); // does not remove from TQueue double least_t(); TQItem* insert(double t, void* data_); TQItem* find(double t); void remove(TQItem*); void move(TQItem*, double tnew); void move_least(double tnew); void print(); void check(const char* errmess); void statistics(); void forall_callback(void (*)(const TQItem*, int)); private: void insertNode(double t, TQItem*); void deleteNode(TQItem*); void rotateLeft(TQItem*); void rotateRight(TQItem*); void insertFixup(TQItem*); void deleteFixup(TQItem*); void new_least(); private: TQItem* least_; TQItem* root_; #if COLLECT_TQueue_STATISTICS private: unsigned long ninsert, nrem, nleast, nbal, ncmplxrem; unsigned long ncompare, nleastsrch, nfind, nfindsrch, nmove, nfastmove; #endif }; //#endif neuron-7.5/src/nrncvode/spaux.c000077500000000000000000000175441323325274500166300ustar00rootroot00000000000000/* spaux.c: This code implements the following operations on an event-set or priority-queue implemented using splay trees: n = sphead( q ) n is the head item in q (not removed). spdelete( n, q ) n is removed from q. n = spnext( np, q ) n is the successor of np in q. n = spprev( np, q ) n is the predecessor of np in q. spenqbefore( n, np, q ) n becomes the predecessor of np in q. spenqafter( n, np, q ) n becomes the successor of np in q. In the above, n and np are pointers to single items (type SPBLK *); q is an event-set (type SPTREE *), The type definitions for these are taken from file sptree.h. All of these operations rest on basic splay tree operations from file sptree.c. The basic splay tree algorithms were originally presented in: Self Adjusting Binary Trees, by D. D. Sleator and R. E. Tarjan, Proc. ACM SIGACT Symposium on Theory of Computing (Boston, Apr 1983) 235-245. The operations in this package supplement the operations from file splay.h to provide support for operations typically needed on the pending event set in discrete event simulation. See, for example, Introduction to Simula 67, by Gunther Lamprecht, Vieweg & Sohn, Braucschweig, Wiesbaden, 1981. (Chapter 14 contains the relevant discussion.) Simula Begin, by Graham M. Birtwistle, et al, Studentlitteratur, Lund, 1979. (Chapter 9 contains the relevant discussion.) Many of the routines in this package use the splay procedure, for bottom-up splaying of the queue. Consequently, item n in delete and item np in all operations listed above must be in the event-set prior to the call or the results will be unpredictable (eg: chaos will ensue). Note that, in all cases, these operations can be replaced with the corresponding operations formulated for a conventional lexicographically ordered tree. The versions here all use the splay operation to ensure the amortized bounds; this usually leads to a very compact formulation of the operations themselves, but it may slow the average performance. Alternative versions based on simple binary tree operations are provided (commented out) for head, next, and prev, since these are frequently used to traverse the entire data structure, and the cost of traversal is independent of the shape of the structure, so the extra time taken by splay in this context is wasted. This code was written by: Douglas W. Jones with assistance from Srinivas R. Sataluri Translated to C by David Brower, daveb@rtech.uucp Thu Oct 6 12:11:33 PDT 1988 (daveb) Fixed spdeq, which was broken handling one-node trees. I botched the pascal translation of a VAR parameter. Changed interface, so callers must also be corrected to pass the node by address rather than value. Mon Apr 3 15:18:32 PDT 1989 (daveb) Apply fix supplied by Mark Moraes to spdelete(), which dropped core when taking out the last element in a subtree -- that is, when the right subtree was empty and the leftlink was also null, it tried to take out the leftlink's uplink anyway. */ # include "sptree.h" /*---------------- * * sphead() -- return the "lowest" element in the tree. * * returns a reference to the head event in the event-set q, * represented as a splay tree; q->root ends up pointing to the head * event, and the old left branch of q is shortened, as if q had * been splayed about the head element; this is done by dequeueing * the head and then making the resulting queue the right son of * the head returned by spdeq; an alternative is provided which * avoids splaying but just searches for and returns a pointer to * the bottom of the left branch */ SPBLK * sphead( SPTREE* q ) { register SPBLK * x; /* splay version, good amortized bound */ x = spdeq( &q->root ); if( x != NULL ) { x->rightlink = q->root; x->leftlink = NULL; x->uplink = NULL; if( q->root != NULL ) q->root->uplink = x; } q->root = x; /* alternative version, bad amortized bound, but faster on the average */ # if 0 x = q->root; while( x->leftlink != NULL ) x = x->leftlink; # endif return( x ); } /* sphead */ /*---------------- * * spdelete() -- Delete node from a tree. * * n is deleted from q; the resulting splay tree has been splayed * around its new root, which is the successor of n * */ void spdelete( SPBLK* n, SPTREE* q ) { register SPBLK * x; splay( n, q ); x = spdeq( &q->root->rightlink ); if( x == NULL ) /* empty right subtree */ { q->root = q->root->leftlink; if (q->root) q->root->uplink = NULL; } else /* non-empty right subtree */ { x->uplink = NULL; x->leftlink = q->root->leftlink; x->rightlink = q->root->rightlink; if( x->leftlink != NULL ) x->leftlink->uplink = x; if( x->rightlink != NULL ) x->rightlink->uplink = x; q->root = x; } } /* spdelete */ /*---------------- * * spnext() -- return next higer item in the tree, or NULL. * * return the successor of n in q, represented as a splay tree; the * successor becomes the root; two alternate versions are provided, * one which is shorter, but slower, and one which is faster on the * average because it does not do any splaying * */ SPBLK * spnext( SPBLK* n, SPTREE* q ) { register SPBLK * next; register SPBLK * x; /* splay version */ splay( n, q ); x = spdeq( &n->rightlink ); if( x != NULL ) { x->leftlink = n; n->uplink = x; x->rightlink = n->rightlink; n->rightlink = NULL; if( x->rightlink != NULL ) x->rightlink->uplink = x; q->root = x; x->uplink = NULL; } next = x; /* shorter slower version; deleting last "if" undoes the amortized bound */ # if 0 splay( n, q ); x = n->rightlink; if( x != NULL ) while( x->leftlink != NULL ) x = x->leftlink; next = x; if( x != NULL ) splay( x, q ); # endif return( next ); } /* spnext */ /*---------------- * * spprev() -- return previous node in a tree, or NULL. * * return the predecessor of n in q, represented as a splay tree; * the predecessor becomes the root; an alternate version is * provided which is faster on the average because it does not do * any splaying * */ SPBLK * spprev( SPBLK* n, SPTREE* q ) { register SPBLK * prev; register SPBLK * x; /* splay version; note: deleting the last "if" undoes the amortized bound */ splay( n, q ); x = n->leftlink; if( x != NULL ) while( x->rightlink != NULL ) x = x->rightlink; prev = x; if( x != NULL ) splay( x, q ); return( prev ); } /* spprev */ /*---------------- * * spenqbefore() -- insert node before another in a tree. * * returns pointer to n. * * event n is entered in the splay tree q as the immediate * predecessor of n1; in doing so, n1 becomes the root of the tree * with n as its left son * */ SPBLK * spenqbefore( SPBLK* n, SPBLK* n1, SPTREE* q ) { splay( n1, q ); n->key = n1->key; n->leftlink = n1->leftlink; if( n->leftlink != NULL ) n->leftlink->uplink = n; n->rightlink = NULL; n->uplink = n1; n1->leftlink = n; return( n ); } /* spenqbefore */ /*---------------- * * spenqafter() -- enter n after n1 in tree q. * * returns a pointer to n. * * event n is entered in the splay tree q as the immediate * successor of n1; in doing so, n1 becomes the root of the tree * with n as its right son */ SPBLK * spenqafter( SPBLK* n, SPBLK* n1, SPTREE* q ) { splay( n1, q ); n->key = n1->key; n->rightlink = n1->rightlink; if( n->rightlink != NULL ) n->rightlink->uplink = n; n->leftlink = NULL; n->uplink = n1; n1->rightlink = n; return( n ); } /* spenqafter */ neuron-7.5/src/nrncvode/spdaveb.c000077500000000000000000000134201323325274500171010ustar00rootroot00000000000000/* * spdaveb.c -- daveb's new splay tree functions. * * The functions in this file provide an interface that is nearly * the same as the hash library I swiped from mkmf, allowing * replacement of one by the other. Hey, it worked for me! * * splookup() -- given a key, find a node in a tree. * spinstall() -- install an item in the tree, overwriting existing value. * spfhead() -- fast (non-splay) find the first node in a tree. * spftail() -- fast (non-splay) find the last node in a tree. * spscan() -- forward scan tree from the head. * sprscan() -- reverse scan tree from the tail. * spfnext() -- non-splaying next. * spfprev() -- non-splaying prev. * spstats() -- make char string of stats for a tree. * * Written by David Brower, daveb@rtech.uucp 1/88. */ # include "sptree.h" /* USER SUPPLIED! */ /*extern char *emalloc();*/ /*---------------- * * splookup() -- given key, find a node in a tree. * * Splays the found node to the root. */ SPBLK * splookup( double key, SPTREE* q ) { register SPBLK * n; register int Sct; register int c; /* find node in the tree */ n = q->root; c = ++(q->lkpcmps); q->lookups++; // while( n && (Sct = STRCMP( key, n->key ) ) ) while( n && (Sct = key!= n->key ) ) { c++; n = ( Sct < 0 ) ? n->leftlink : n->rightlink; } q->lkpcmps = c; /* reorganize tree around this node */ if( n != NULL ) splay( n, q ); return( n ); } #if 0 /*---------------- * * spinstall() -- install an entry in a tree, overwriting any existing node. * * If the node already exists, replace its contents. * If it does not exist, then allocate a new node and fill it in. */ SPBLK * spinstall( key, data, datb, q ) register char * key; register char * data; register char * datb; register SPTREE *q; { register SPBLK *n; if( NULL == ( n = splookup( key, q ) ) ) { n = (SPBLK *) emalloc( sizeof( *n ) ); n->key = key; n->leftlink = NULL; n->rightlink = NULL; n->uplink = NULL; #if BBTQ != 4 && BBTQ != 5 n->cnt = 0; #endif spenq( n, q ); } n->data = data; n->datb = datb; return( n ); } #endif /*---------------- * * spfhead() -- return the "lowest" element in the tree. * * returns a reference to the head event in the event-set q. * avoids splaying but just searches for and returns a pointer to * the bottom of the left branch. */ SPBLK * spfhead( SPTREE* q ) { register SPBLK * x; if( NULL != ( x = q->root ) ) while( x->leftlink != NULL ) x = x->leftlink; return( x ); } /* spfhead */ /*---------------- * * spftail() -- find the last node in a tree. * * Fast version does not splay result or intermediate steps. */ SPBLK * spftail( SPTREE* q ) { register SPBLK * x; if( NULL != ( x = q->root ) ) while( x->rightlink != NULL ) x = x->rightlink; return( x ); } /* spftail */ /*---------------- * * spscan() -- apply a function to nodes in ascending order. * * if n is given, start at that node, otherwise start from * the head. */ void spscan( void (*f)(const TQItem*, int), SPBLK* n, SPTREE* q ) { register SPBLK * x; for( x = n != NULL ? n : spfhead( q ); x != NULL ; x = spfnext( x ) ) (*f)( x, 0); } /*---------------- * * sprscan() -- apply a function to nodes in descending order. * * if n is given, start at that node, otherwise start from * the tail. */ void sprscan( void (*f)(const TQItem*, int), SPBLK* n, SPTREE* q ) { register SPBLK *x; for( x = n != NULL ? n : spftail( q ); x != NULL ; x = spfprev( x ) ) (*f)( x, 0 ); } /*---------------- * * spfnext() -- fast return next higer item in the tree, or NULL. * * return the successor of n in q, represented as a splay tree. * This is a fast (on average) version that does not splay. */ SPBLK * spfnext( SPBLK* n ) { register SPBLK * next; register SPBLK * x; /* a long version, avoids splaying for fast average, * poor amortized bound */ if( n == NULL ) return( n ); x = n->rightlink; if( x != NULL ) { while( x->leftlink != NULL ) x = x->leftlink; next = x; } else /* x == NULL */ { x = n->uplink; next = NULL; while( x != NULL ) { if( x->leftlink == n ) { next = x; x = NULL; } else { n = x; x = n->uplink; } } } return( next ); } /* spfnext */ /*---------------- * * spfprev() -- return fast previous node in a tree, or NULL. * * return the predecessor of n in q, represented as a splay tree. * This is a fast (on average) version that does not splay. */ SPBLK * spfprev( SPBLK* n ) { register SPBLK * prev; register SPBLK * x; /* a long version, * avoids splaying for fast average, poor amortized bound */ if( n == NULL ) return( n ); x = n->leftlink; if( x != NULL ) { while( x->rightlink != NULL ) x = x->rightlink; prev = x; } else { x = n->uplink; prev = NULL; while( x != NULL ) { if( x->rightlink == n ) { prev = x; x = NULL; } else { n = x; x = n->uplink; } } } return( prev ); } /* spfprev */ const char * spstats( SPTREE* q ) { static char buf[ 128 ]; float llen; float elen; float sloops; if( q == NULL ) return(""); llen = q->lookups ? (float)q->lkpcmps / q->lookups : 0; elen = q->enqs ? (float)q->enqcmps/q->enqs : 0; sloops = q->splays ? (float)q->splayloops/q->splays : 0; sprintf(buf, "f(%d %4.2f) i(%d %4.2f) s(%d %4.2f)", q->lookups, llen, q->enqs, elen, q->splays, sloops ); return (const char*)buf; } neuron-7.5/src/nrncvode/sptbinq.cpp000066400000000000000000000157061323325274500175030ustar00rootroot00000000000000// splay tree + bin queue limited to fixed step method // for event-sets or priority queues // this starts from the sptqueue.cpp file and adds a bin queue /* Derived from David Brower's c translation of pascal code by Douglas Jones. */ /* The original c code is included from this file but note that instead of struct _spblk, we are really using TQItem */ #include #include #include #include #include #define SPBLK TQItem #define leftlink left_ #define rightlink right_ #define uplink parent_ #define cnt cnt_ #define key t_ #include extern "C" { //extern double dt; #define nt_dt nrn_threads->_dt } void (*nrn_binq_enqueue_error_handler)(double, TQItem*); TQItem::TQItem() { left_ = 0; right_ = 0; parent_ = 0; } TQItem::~TQItem() { } bool TQItem::check() { #if DOCHECK #endif return true; } static void prnt(const TQItem* b, int level) { int i; for (i=0; i < level; ++i) { printf(" "); } printf("%g %c %d Q=%p D=%p\n", b->t_, b->data_?'x':'o', b->cnt_, b, b->data_); } static void chk(TQItem* b, int level) { if (!b->check()) { hoc_execerror("chk failed", errmess_); } } TQueue::TQueue(TQItemPool* tp, int mkmut) { MUTCONSTRUCT(mkmut) tpool_ = tp; nshift_ = 0; sptree_ = new SPTREE; spinit(sptree_); binq_ = new BinQ; least_ = 0; #if COLLECT_TQueue_STATISTICS nmove = ninsert = nrem = nleast = nbal = ncmplxrem = 0; nfastmove = ncompare = nleastsrch = nfind = nfindsrch = 0; #endif } TQueue::~TQueue() { SPBLK* q, *q2; while((q = spdeq(&sptree_->root)) != nil) { deleteitem(q); } delete sptree_; for (q = binq_->first(); q; q = q2) { q2 = binq_->next(q); remove(q); } delete binq_; MUTDESTRUCT } void TQueue::deleteitem(TQItem* i) { tpool_->hpfree(i); } void TQueue::print() { MUTLOCK #if FAST_LEAST if (least_) { prnt(least_, 0); } #endif spscan(prnt, nil, sptree_); for (TQItem* q = binq_->first(); q; q = binq_->next(q)) { prnt(q, 0); } MUTUNLOCK } void TQueue::forall_callback(void(*f)(const TQItem*, int)) { MUTLOCK #if FAST_LEAST if (least_) { f(least_, 0); } #endif spscan(f, nil, sptree_); for (TQItem* q = binq_->first(); q; q = binq_->next(q)) { f(q, 0); } MUTUNLOCK } void TQueue::check(const char* mes) { } #if FAST_LEAST // for Parallel Global Variable Timestep method. // Assume not using bin queue. TQItem* TQueue::second_least(double t) { assert(least_); TQItem* b = sphead(sptree_); if (b && b->t_ == t) { return b; } return 0; } #endif void TQueue::move_least(double tnew) { MUTLOCK move_least_nolock(tnew); MUTUNLOCK } void TQueue::move_least_nolock(double tnew) { TQItem* b = least(); if (b) { b->t_ = tnew; TQItem* nl = sphead(sptree_); if (nl) { if (tnew > nl->t_) { least_ = spdeq(&sptree_->root); spenq(b, sptree_); } } } } void TQueue::move(TQItem* i, double tnew) { MUTLOCK STAT(nmove) if (i == least_) { move_least_nolock(tnew); }else if (tnew < least_->t_) { spdelete(i, sptree_); i->t_ = tnew; spenq(least_, sptree_); least_ = i; }else{ spdelete(i, sptree_); i->t_ = tnew; spenq(i, sptree_); } MUTUNLOCK } void TQueue::statistics() { #if COLLECT_TQueue_STATISTICS printf("insertions=%lu moves=%lu removals=%lu calls to least=%lu\n", ninsert, nmove, nrem, nleast); printf("calls to find=%lu\n", nfind); printf("comparisons=%d\n", sptree_->enqcmps); #else printf("Turn on COLLECT_TQueue_STATISTICS_ in tqueue.h\n"); #endif } void TQueue::spike_stat(double* d) { #if COLLECT_TQueue_STATISTICS d[0] = ninsert; d[1] = nmove; d[2] = nrem; //printf("FifoQ spikestat nfenq=%lu nfdeq=%lu nfrem=%lu\n", fifo_->nfenq, fifo_->nfdeq, fifo_->nfrem); #endif } TQItem* TQueue::insert(double t, void* d) { MUTLOCK STAT(ninsert); TQItem* i = tpool_->alloc(); i->data_ = d; i->t_ = t; i->cnt_ = -1; if (t < least_t_nolock()) { if (least()) { spenq(least(), sptree_); } least_ = i; }else{ spenq(i, sptree_); } MUTUNLOCK return i; } TQItem* TQueue::enqueue_bin(double td, void* d) { MUTLOCK STAT(ninsert); TQItem* i = tpool_->alloc(); i->data_ = d; i->t_ = td; binq_->enqueue(td, i); MUTUNLOCK return i; } void TQueue::release(TQItem* q) { // if lockable then the pool is internally handles locking tpool_->hpfree(q); } void TQueue::remove(TQItem* q) { MUTLOCK STAT(nrem); if (q) { if (q == least_) { if (sptree_->root) { least_ = spdeq(&sptree_->root); }else{ least_ = nil; } }else if (q->cnt_ >= 0) { binq_->remove(q); }else{ spdelete(q, sptree_); } tpool_->hpfree(q); } MUTUNLOCK } TQItem* TQueue::atomic_dq(double tt) { TQItem* q = 0; MUTLOCK if (least_ && least_->t_ <= tt) { q = least_; STAT(nrem); if (sptree_->root) { least_ = spdeq(&sptree_->root); }else{ least_ = nil; } } MUTUNLOCK return q; } TQItem* TQueue::find(double t) { TQItem* q; MUTLOCK // search only in the splay tree. if this is a bug then fix it. STAT(nfind) if (t == least_t_nolock()) { q = least(); }else{ q = splookup(t, sptree_); } MUTUNLOCK return(q); } BinQ::BinQ() { nbin_ = 1000; bins_ = new TQItem*[nbin_]; for (int i=0; i < nbin_; ++i) { bins_[i] = 0; } qpt_ = 0; tt_ = 0.; #if COLLECT_TQueue_STATISTICS nfenq = nfdeq = nfrem = 0; #endif } BinQ::~BinQ() { for (int i=0; i < nbin_; ++i) { assert(!bins_[i]); } delete [] bins_; } void BinQ::resize(int size) { //printf("BinQ::resize from %d to %d\n", nbin_, size); int i, j; TQItem* q; assert(size >= nbin_); TQItem** bins = new TQItem*[size]; for (i=nbin_; i < size; ++i) { bins[i] = 0; } for (i=0, j=qpt_; i < nbin_; ++i, ++j) { if (j >= nbin_) { j = 0; } bins[i] = bins_[j]; for (q = bins[i]; q; q = q->left_) { q->cnt_ = i; } } delete [] bins_; bins_ = bins; nbin_ = size; qpt_ = 0; } void BinQ::enqueue(double td, TQItem* q) { int idt = (int)((td - tt_)/nt_dt + 1.e-10); if (idt < 0) { if (nrn_binq_enqueue_error_handler) { (*nrn_binq_enqueue_error_handler)(td, q); return; }else{ assert(idt >= 0); } } if (idt >= nbin_) { resize(idt + 100); } //assert (idt < nbin_); idt += qpt_; if (idt >= nbin_) { idt -= nbin_; } //printf("enqueue idt=%d qpt=%d\n", idt, qpt_); assert (idt < nbin_); q->cnt_ = idt; // only for iteration q->left_ = bins_[idt]; bins_[idt] = q; #if COLLECT_TQueue_STATISTICS ++nfenq; #endif } TQItem* BinQ::dequeue() { TQItem* q = bins_[qpt_]; if (q) { bins_[qpt_] = q->left_; #if COLLECT_TQueue_STATISTICS ++nfdeq; #endif } return q; } TQItem* BinQ::first() { for (int i = 0; i < nbin_; ++i) { if (bins_[i]) { return bins_[i]; } } return 0; } TQItem* BinQ::next(TQItem* q) { if (q->left_) { return q->left_; } for (int i = q->cnt_ + 1; i < nbin_; ++i) { if (bins_[i]) { return bins_[i]; } } return 0; } void BinQ::remove(TQItem* q) { TQItem* q1, *q2; q1 = bins_[q->cnt_]; if (q1 == q) { bins_[q->cnt_] = q->left_; return; } for (q2 = q1->left_; q2; q1 = q2, q2 = q2->left_) { if (q2 == q) { q1->left_ = q->left_; return; } } } #include #include #include neuron-7.5/src/nrncvode/sptbinq.h000066400000000000000000000055141323325274500171440ustar00rootroot00000000000000//#ifndef tqueue_h //#define tqueue_h // bin queue for the fixed step method for NetCons and PreSyns. Splay tree // for others. // fifo for the NetCons and PreSyns with same delay. Splay tree for // others (especially SelfEvents). // note that most methods below assume a TQItem is in the splay tree // For the bin part, only insert_fifo, and remove make sense, // and forall_callback does the splay tree first and then the bin (so // not in time order) // The bin part assumes a fixed step method. #include #define COLLECT_TQueue_STATISTICS 1 struct SPTREE; class TQItemPool; class TQItem { public: TQItem(); virtual ~TQItem(); bool check(); void clear(){}; public: void* data_; double t_; TQItem* left_; TQItem* right_; TQItem* parent_; int cnt_; // reused: -1 means it is in the splay tree, >=0 gives bin }; // helper class for the TQueue (SplayTBinQueue). class BinQ { public: BinQ(); virtual ~BinQ(); void enqueue(double tt, TQItem*); void shift(double tt) { assert(!bins_[qpt_]); tt_ = tt; if (++qpt_ >= nbin_) { qpt_ = 0; }} TQItem* top() { return bins_[qpt_]; } TQItem* dequeue(); double tbin() { return tt_; } // for iteration TQItem* first(); TQItem* next(TQItem*); void remove(TQItem*); void resize(int); #if COLLECT_TQueue_STATISTICS public: int nfenq, nfdeq, nfrem; #endif private: double tt_; // time at beginning of qpt_ interval int nbin_, qpt_; TQItem** bins_; }; class TQueue { public: TQueue(TQItemPool*, int mkmut = 0); virtual ~TQueue(); #if FAST_LEAST TQItem* least() {return least_;} TQItem* second_least(double t); #if USE_PTHREAD double least_t(){double tt; MUTLOCK; if (least_) { tt = least_->t_;}else{tt = 1e15;} MUTUNLOCK; return tt;} #else double least_t(){if (least_) { return least_->t_;}else{return 1e15;}} #endif #else TQItem* least(); // does not remove from TQueue double least_t(); #endif TQItem* atomic_dq(double til); TQItem* insert(double t, void* data); TQItem* enqueue_bin(double t, void* data); TQItem* dequeue_bin() { return binq_->dequeue(); } void shift_bin(double t) { ++nshift_; binq_->shift(t); } double tbin() { return binq_->tbin(); } TQItem* top() { return binq_->top(); } void release(TQItem*); TQItem* find(double t); void remove(TQItem*); void move(TQItem*, double tnew); void move_least(double tnew); void print(); void check(const char* errmess); void statistics(); void spike_stat(double*); void forall_callback(void (*)(const TQItem*, int)); int nshift_; void deleteitem(TQItem*); private: double least_t_nolock(){if (least_) { return least_->t_;}else{return 1e15;}} void move_least_nolock(double tnew); SPTREE* sptree_; BinQ* binq_; TQItem* least_; TQItemPool* tpool_; MUTDEC #if COLLECT_TQueue_STATISTICS unsigned long ninsert, nrem, nleast, nbal, ncmplxrem; unsigned long ncompare, nleastsrch, nfind, nfindsrch, nmove, nfastmove; #endif }; //#endif neuron-7.5/src/nrncvode/sptqueue.cpp000066400000000000000000000075351323325274500176770ustar00rootroot00000000000000// splay tree for event-sets or priority queues /* Derived from David Brower's c translation of pascal code by Douglas Jones. */ /* The original c code is included from this file but note that instead of struct _spblk, we are really using TQItem */ #include #include #include #include #define SPBLK TQItem #define leftlink left_ #define rightlink right_ #define uplink parent_ #define cnt cnt_ #define key t_ #include TQItem::TQItem() { left_ = 0; right_ = 0; parent_ = 0; } TQItem::~TQItem() { } static void deleteitem(TQItem* i) { // only one, semantics changed assert(i); tpool_->hpfree(i); } bool TQItem::check() { #if DOCHECK #endif return true; } static void prnt(const TQItem* b, int level) { int i; for (i=0; i < level; ++i) { printf(" "); } printf("%g %c %d Q=%p D=%p\n", b->t_, b->data_?'x':'o', b->cnt_, b, b->data_); } static void chk(TQItem* b, int level) { if (!b->check()) { hoc_execerror("chk failed", errmess_); } } TQueue::TQueue() { if (!tpool_) { tpool_ = new TQItemPool(1000); } sptree_ = new SPTREE; spinit(sptree_); least_ = 0; #if COLLECT_TQueue_STATISTICS nmove = ninsert = nrem = nleast = nbal = ncmplxrem = 0; nfastmove = ncompare = nleastsrch = nfind = nfindsrch = 0; #endif } TQueue::~TQueue() { SPBLK* q; while((q = spdeq(&sptree_->root)) != nil) { deleteitem(q); } delete sptree_; } void TQueue::print() { #if FAST_LEAST if (least_) { prnt(least_, 0); } #endif spscan(prnt, nil, sptree_); } void TQueue::forall_callback(void(*f)(const TQItem*, int)) { #if FAST_LEAST if (least_) { f(least_, 0); } #endif spscan(f, nil, sptree_); } void TQueue::check(const char* mes) { } #if !FAST_LEAST double TQueue::least_t() { TQItem* b = least(); if (b) { return b->t_; }else{ return 1e15; } } TQItem* TQueue::least() { STAT(nleast) return sphead(sptree_); } #endif #if FAST_LEAST TQItem* TQueue::second_least(double t) { assert(least_); TQItem* b = sphead(sptree_); if (b && b->t_ == t) { return b; } return 0; } #endif void TQueue::move_least(double tnew) { TQItem* b = least(); if (b) { #if FAST_LEAST b->t_ = tnew; TQItem* nl = sphead(sptree_); if (nl) { if (tnew > nl->t_) { least_ = spdeq(&sptree_->root); spenq(b, sptree_); } } #else move(b, tnew); #endif } } void TQueue::move(TQItem* i, double tnew) { STAT(nmove) #if FAST_LEAST if (i == least_) { move_least(tnew); }else if (tnew < least_->t_) { spdelete(i, sptree_); i->t_ = tnew; spenq(least_, sptree_); least_ = i; }else #endif { spdelete(i, sptree_); i->t_ = tnew; spenq(i, sptree_); } } void TQueue::statistics() { #if COLLECT_TQueue_STATISTICS printf("insertions=%lu moves=%lu removals=%lu calls to least=%lu\n", ninsert, nmove, nrem, nleast); printf("calls to find=%lu\n", nfind); printf("comparisons=%lu\n", sptree_->enqcmps); #else printf("Turn on COLLECT_TQueue_STATISTICS_ in tqueue.h\n"); #endif } void TQueue::spike_stat(double* d) { #if COLLECT_TQueue_STATISTICS d[0] = ninsert; d[1] = nmove; d[2] = nrem; #endif } TQItem* TQueue::insert(double t, void* d) { STAT(ninsert); TQItem* i = tpool_->alloc(); i->data_ = d; i->t_ = t; i->cnt_ = 0; #if FAST_LEAST if (t < least_t()) { if (least()) { spenq(least(), sptree_); } least_ = i; }else{ spenq(i, sptree_); } #else spenq(i, sptree_); #endif return i; } void TQueue::remove(TQItem* q) { STAT(nrem); if (q) { #if FAST_LEAST if (q == least_) { if (sptree_->root) { least_ = spdeq(&sptree_->root); }else{ least_ = nil; } }else{ spdelete(q, sptree_); } #else spdelete(q, sptree_); #endif tpool_->hpfree(q); } } TQItem* TQueue::find(double t) { STAT(nfind) #if FAST_LEAST if (t == least_t()) { return least(); } #endif TQItem* q; q = splookup(t, sptree_); return(q); } #include #include #include neuron-7.5/src/nrncvode/sptqueue.h000066400000000000000000000021021323325274500173250ustar00rootroot00000000000000//#ifndef tqueue_h //#define tqueue_h #define COLLECT_TQueue_STATISTICS 1 struct SPTREE; class TQItem { public: TQItem(); virtual ~TQItem(); bool check(); void clear(){}; public: void* data_; double t_; TQItem* left_; TQItem* right_; TQItem* parent_; int cnt_; }; class TQueue { public: TQueue(); virtual ~TQueue(); #if FAST_LEAST TQItem* least() {return least_;} double least_t(){if (least_) { return least_->t_;}else{return 1e15;}} TQItem* second_least(double t); #else TQItem* least(); // does not remove from TQueue double least_t(); #endif TQItem* insert(double t, void* data_); TQItem* find(double t); void remove(TQItem*); void move(TQItem*, double tnew); void move_least(double tnew); void print(); void check(const char* errmess); void statistics(); void spike_stat(double*); void forall_callback(void (*)(const TQItem*, int)); private: SPTREE* sptree_; TQItem* least_; #if COLLECT_TQueue_STATISTICS unsigned long ninsert, nrem, nleast, nbal, ncmplxrem; unsigned long ncompare, nleastsrch, nfind, nfindsrch, nmove, nfastmove; #endif }; //#endif neuron-7.5/src/nrncvode/sptree.c000077500000000000000000000364701323325274500167710ustar00rootroot00000000000000/* * * sptree.c: The following code implements the basic operations on * an event-set or priority-queue implemented using splay trees: * Hines changed to void spinit(SPTREE**) for use with TQueue. * SPTREE *spinit( compare ) Make a new tree * int spempty(); Is tree empty? * SPBLK *spenq( n, q ) Insert n in q after all equal keys. * SPBLK *spdeq( np ) Return first key under *np, removing it. * SPBLK *spenqprior( n, q ) Insert n in q before all equal keys. * void splay( n, q ) n (already in q) becomes the root. * * In the above, n points to an SPBLK type, while q points to an * SPTREE. * * The implementation used here is based on the implementation * which was used in the tests of splay trees reported in: * * An Empirical Comparison of Priority-Queue and Event-Set Implementations, * by Douglas W. Jones, Comm. ACM 29, 4 (Apr. 1986) 300-311. * * The changes made include the addition of the enqprior * operation and the addition of up-links to allow for the splay * operation. The basic splay tree algorithms were originally * presented in: * * Self Adjusting Binary Trees, * by D. D. Sleator and R. E. Tarjan, * Proc. ACM SIGACT Symposium on Theory * of Computing (Boston, Apr 1983) 235-245. * * The enq and enqprior routines use variations on the * top-down splay operation, while the splay routine is bottom-up. * All are coded for speed. * * Written by: * Douglas W. Jones * * Translated to C by: * David Brower, daveb@rtech.uucp * * Thu Oct 6 12:11:33 PDT 1988 (daveb) Fixed spdeq, which was broken * handling one-node trees. I botched the pascal translation of * a VAR parameter. */ # include "sptree.h" /* USER SUPPLIED! */ /*extern char *emalloc();*/ /*---------------- * * spinit() -- initialize an empty splay tree * */ void spinit(SPTREE* q) { q->lookups = 0; q->lkpcmps = 0; q->enqs = 0; q->enqcmps = 0; q->splays = 0; q->splayloops = 0; q->root = NULL; } /*---------------- * * spempty() -- is an event-set represented as a splay tree empty? */ int spempty( SPTREE* q ) { return( q == NULL || q->root == NULL ); } /*---------------- * * spenq() -- insert item in a tree. * * put n in q after all other nodes with the same key; when this is * done, n will be the root of the splay tree representing q, all nodes * in q with keys less than or equal to that of n will be in the * left subtree, all with greater keys will be in the right subtree; * the tree is split into these subtrees from the top down, with rotations * performed along the way to shorten the left branch of the right subtree * and the right branch of the left subtree */ SPBLK * spenq( SPBLK* n, SPTREE* q ) { register SPBLK * left; /* the rightmost node in the left tree */ register SPBLK * right; /* the leftmost node in the right tree */ register SPBLK * next; /* the root of the unsplit part */ register SPBLK * temp; double key; register int Sct; /* Strcmp value */ q->enqs++; n->uplink = NULL; next = q->root; q->root = n; if( next == NULL ) /* trivial enq */ { n->leftlink = NULL; n->rightlink = NULL; } else /* difficult enq */ { key = n->key; left = n; right = n; /* n's left and right children will hold the right and left splayed trees resulting from splitting on n->key; note that the children will be reversed! */ q->enqcmps++; if ( STRCMP( next->key, key ) > 0 ) goto two; one: /* assert next->key <= key */ do /* walk to the right in the left tree */ { temp = next->rightlink; if( temp == NULL ) { left->rightlink = next; next->uplink = left; right->leftlink = NULL; goto done; /* job done, entire tree split */ } q->enqcmps++; if( STRCMP( temp->key, key ) > 0 ) { left->rightlink = next; next->uplink = left; left = next; next = temp; goto two; /* change sides */ } next->rightlink = temp->leftlink; if( temp->leftlink != NULL ) temp->leftlink->uplink = next; left->rightlink = temp; temp->uplink = left; temp->leftlink = next; next->uplink = temp; left = temp; next = temp->rightlink; if( next == NULL ) { right->leftlink = NULL; goto done; /* job done, entire tree split */ } q->enqcmps++; } while( STRCMP( next->key, key ) <= 0 ); /* change sides */ two: /* assert next->key > key */ do /* walk to the left in the right tree */ { temp = next->leftlink; if( temp == NULL ) { right->leftlink = next; next->uplink = right; left->rightlink = NULL; goto done; /* job done, entire tree split */ } q->enqcmps++; if( STRCMP( temp->key, key ) <= 0 ) { right->leftlink = next; next->uplink = right; right = next; next = temp; goto one; /* change sides */ } next->leftlink = temp->rightlink; if( temp->rightlink != NULL ) temp->rightlink->uplink = next; right->leftlink = temp; temp->uplink = right; temp->rightlink = next; next->uplink = temp; right = temp; next = temp->leftlink; if( next == NULL ) { left->rightlink = NULL; goto done; /* job done, entire tree split */ } q->enqcmps++; } while( STRCMP( next->key, key ) > 0 ); /* change sides */ goto one; done: /* split is done, branches of n need reversal */ temp = n->leftlink; n->leftlink = n->rightlink; n->rightlink = temp; } #if BBTQ != 4 && BBTQ != 5 n->cnt++; #endif return( n ); } /* spenq */ /*---------------- * * spdeq() -- return and remove head node from a subtree. * * remove and return the head node from the node set; this deletes * (and returns) the leftmost node from q, replacing it with its right * subtree (if there is one); on the way to the leftmost node, rotations * are performed to shorten the left branch of the tree */ SPBLK * spdeq( SPBLK** np ) /* pointer to a node pointer */ { register SPBLK * deq; /* one to return */ register SPBLK * next; /* the next thing to deal with */ register SPBLK * left; /* the left child of next */ register SPBLK * farleft; /* the left child of left */ register SPBLK * farfarleft; /* the left child of farleft */ if( np == NULL || *np == NULL ) { deq = NULL; } else { next = *np; left = next->leftlink; if( left == NULL ) { deq = next; *np = next->rightlink; if( *np != NULL ) (*np)->uplink = NULL; } else for(;;) /* left is not null */ { /* next is not it, left is not NULL, might be it */ farleft = left->leftlink; if( farleft == NULL ) { deq = left; next->leftlink = left->rightlink; if( left->rightlink != NULL ) left->rightlink->uplink = next; break; } /* next, left are not it, farleft is not NULL, might be it */ farfarleft = farleft->leftlink; if( farfarleft == NULL ) { deq = farleft; left->leftlink = farleft->rightlink; if( farleft->rightlink != NULL ) farleft->rightlink->uplink = left; break; } /* next, left, farleft are not it, rotate */ next->leftlink = farleft; farleft->uplink = next; left->leftlink = farleft->rightlink; if( farleft->rightlink != NULL ) farleft->rightlink->uplink = left; farleft->rightlink = left; left->uplink = farleft; next = farleft; left = farfarleft; } } return( deq ); } /* spdeq */ /*---------------- * * spenqprior() -- insert into tree before other equal keys. * * put n in q before all other nodes with the same key; after this is * done, n will be the root of the splay tree representing q, all nodes in * q with keys less than that of n will be in the left subtree, all with * greater or equal keys will be in the right subtree; the tree is split * into these subtrees from the top down, with rotations performed along * the way to shorten the left branch of the right subtree and the right * branch of the left subtree; the logic of spenqprior is exactly the * same as that of spenq except for a substitution of comparison * operators */ SPBLK * spenqprior( SPBLK* n, SPTREE* q ) { register SPBLK * left; /* the rightmost node in the left tree */ register SPBLK * right; /* the leftmost node in the right tree */ register SPBLK * next; /* the root of unsplit part of tree */ register SPBLK * temp; register int Sct; /* Strcmp value */ double key; n->uplink = NULL; next = q->root; q->root = n; if( next == NULL ) /* trivial enq */ { n->leftlink = NULL; n->rightlink = NULL; } else /* difficult enq */ { key = n->key; left = n; right = n; /* n's left and right children will hold the right and left splayed trees resulting from splitting on n->key; note that the children will be reversed! */ if( STRCMP( next->key, key ) >= 0 ) goto two; one: /* assert next->key < key */ do /* walk to the right in the left tree */ { temp = next->rightlink; if( temp == NULL ) { left->rightlink = next; next->uplink = left; right->leftlink = NULL; goto done; /* job done, entire tree split */ } if( STRCMP( temp->key, key ) >= 0 ) { left->rightlink = next; next->uplink = left; left = next; next = temp; goto two; /* change sides */ } next->rightlink = temp->leftlink; if( temp->leftlink != NULL ) temp->leftlink->uplink = next; left->rightlink = temp; temp->uplink = left; temp->leftlink = next; next->uplink = temp; left = temp; next = temp->rightlink; if( next == NULL ) { right->leftlink = NULL; goto done; /* job done, entire tree split */ } } while( STRCMP( next->key, key ) < 0 ); /* change sides */ two: /* assert next->key >= key */ do /* walk to the left in the right tree */ { temp = next->leftlink; if( temp == NULL ) { right->leftlink = next; next->uplink = right; left->rightlink = NULL; goto done; /* job done, entire tree split */ } if( STRCMP( temp->key, key ) < 0 ) { right->leftlink = next; next->uplink = right; right = next; next = temp; goto one; /* change sides */ } next->leftlink = temp->rightlink; if( temp->rightlink != NULL ) temp->rightlink->uplink = next; right->leftlink = temp; temp->uplink = right; temp->rightlink = next; next->uplink = temp; right = temp; next = temp->leftlink; if( next == NULL ) { left->rightlink = NULL; goto done; /* job done, entire tree split */ } } while( STRCMP( next->key, key ) >= 0 ); /* change sides */ goto one; done: /* split is done, branches of n need reversal */ temp = n->leftlink; n->leftlink = n->rightlink; n->rightlink = temp; } return( n ); } /* spenqprior */ /*---------------- * * splay() -- reorganize the tree. * * the tree is reorganized so that n is the root of the * splay tree representing q; results are unpredictable if n is not * in q to start with; q is split from n up to the old root, with all * nodes to the left of n ending up in the left subtree, and all nodes * to the right of n ending up in the right subtree; the left branch of * the right subtree and the right branch of the left subtree are * shortened in the process * * this code assumes that n is not NULL and is in q; it can sometimes * detect n not in q and complain */ void splay( SPBLK* n, SPTREE* q ) { register SPBLK * up; /* points to the node being dealt with */ register SPBLK * prev; /* a descendent of up, already dealt with */ register SPBLK * upup; /* the parent of up */ register SPBLK * upupup; /* the grandparent of up */ register SPBLK * left; /* the top of left subtree being built */ register SPBLK * right; /* the top of right subtree being built */ #if BBTQ != 4 && BBTQ != 5 n->cnt++; /* bump reference count */ #endif left = n->leftlink; right = n->rightlink; prev = n; up = prev->uplink; q->splays++; while( up != NULL ) { q->splayloops++; /* walk up the tree towards the root, splaying all to the left of n into the left subtree, all to right into the right subtree */ upup = up->uplink; if( up->leftlink == prev ) /* up is to the right of n */ { if( upup != NULL && upup->leftlink == up ) /* rotate */ { upupup = upup->uplink; upup->leftlink = up->rightlink; if( upup->leftlink != NULL ) upup->leftlink->uplink = upup; up->rightlink = upup; upup->uplink = up; if( upupup == NULL ) q->root = up; else if( upupup->leftlink == upup ) upupup->leftlink = up; else upupup->rightlink = up; up->uplink = upupup; upup = upupup; } up->leftlink = right; if( right != NULL ) right->uplink = up; right = up; } else /* up is to the left of n */ { if( upup != NULL && upup->rightlink == up ) /* rotate */ { upupup = upup->uplink; upup->rightlink = up->leftlink; if( upup->rightlink != NULL ) upup->rightlink->uplink = upup; up->leftlink = upup; upup->uplink = up; if( upupup == NULL ) q->root = up; else if( upupup->rightlink == upup ) upupup->rightlink = up; else upupup->leftlink = up; up->uplink = upupup; upup = upupup; } up->rightlink = left; if( left != NULL ) left->uplink = up; left = up; } prev = up; up = upup; } # ifdef DEBUG if( q->root != prev ) { /* fprintf(stderr, " *** bug in splay: n not in q *** " ); */ abort(); } # endif n->leftlink = left; n->rightlink = right; if( left != NULL ) left->uplink = n; if( right != NULL ) right->uplink = n; q->root = n; n->uplink = NULL; } /* splay */ neuron-7.5/src/nrncvode/sptree.h000077500000000000000000000065041323325274500167710ustar00rootroot00000000000000/* ** sptree.h: The following type declarations provide the binary tree ** representation of event-sets or priority queues needed by splay trees ** ** assumes that data and datb will be provided by the application ** to hold all application specific information ** ** assumes that key will be provided by the application, comparable ** with the compare function applied to the addresses of two keys. */ # ifndef SPTREE_H # define SPTREE_H # ifndef NULL # define NULL 0 # endif #if 0 # define STRCMP( a, b ) ( (Sct = *(a) - *(b)) ? Sct : strcmp( (a), (b) ) ) #else #define STRCMP(a, b) (a - b) #endif #if 0 typedef struct _spblk { struct _spblk * leftlink; struct _spblk * rightlink; struct _spblk * uplink; int cnt; char * key; /* formerly time/timetyp */ char * data; /* formerly aux/auxtype */ char * datb; } SPBLK; #endif typedef struct SPTREE { SPBLK * root; /* root node */ /* Statistics, not strictly necessary, but handy for tuning */ int lookups; /* number of splookup()s */ int lkpcmps; /* number of lookup comparisons */ int enqs; /* number of spenq()s */ int enqcmps; /* compares in spenq */ int splays; int splayloops; } SPTREE; #define spinit sptq_spinit #define spempty sptq_spempty #define spenq sptq_spenq #define spdeq sptq_spdeq #define spenqprior sptq_spenqprior #define splay sptq_splay #define sphead sptq_sphead #define spdelete sptq_spdelete #define spnext sptq_spnext #define spprev sptq_spprev #define spenqbefore sptq_spenqbefore #define spenqafter sptq_spenqafter #define splookup sptq_splookup /*#define spinstall sptq_spinstall*/ #define sptail sptq_sptail #define spscan sptq_spscan #define sprscan sptq_sprscan #define spfhead sptq_spfhead #define spfnext sptq_spfnext #define spfprev sptq_spfprev #define spstats sptq_spstats /* sptree.c */ extern void spinit(SPTREE*); /* init tree */ extern int spempty(SPTREE*); /* is tree empty? */ extern SPBLK * spenq(SPBLK*, SPTREE*); /* insert item into the tree */ extern SPBLK * spdeq(SPBLK**); /* return and remove lowest item in subtree */ extern SPBLK * spenqprior(SPBLK*, SPTREE*);/* insert before items with same key */ extern void splay(SPBLK*, SPTREE*); /* reorganize tree */ /* spaux.c */ extern SPBLK * sphead(SPTREE*); /* return first node in tree */ extern void spdelete(SPBLK*, SPTREE*); /* delete node from tree */ extern SPBLK * spnext(SPBLK*, SPTREE*); /* return next node in tree */ extern SPBLK * spprev(SPBLK*, SPTREE*); /* return previous node in tree */ extern SPBLK * spenqbefore(SPBLK*, SPBLK*, SPTREE*); /* enqueue before existing node */ extern SPBLK * spenqafter(SPBLK*, SPBLK*, SPTREE*); /* enqueue after existing node */ /* spdaveb.c */ extern SPBLK * splookup(double, SPTREE*); /* find key in a tree */ /*extern SPBLK * spinstall(double, void*, SPTREE*);*/ /* enter an item, allocating or replacing */ extern SPBLK * sptail(SPTREE*); /* find end of a tree */ extern void spscan(void(*)(const TQItem*, int), SPBLK*, SPTREE*); /* scan forward through tree */ extern void sprscan(void(*)(const TQItem*, int), SPBLK*, SPTREE*); /* reverse scan through tree */ extern SPBLK * spfhead(SPTREE*); /* fast non-splaying head */ extern SPBLK * spfnext(SPBLK*); /* fast non-splaying next */ extern SPBLK * spfprev(SPBLK*); /* fast non-splaying prev */ extern const char* spstats(SPTREE*); # endif neuron-7.5/src/nrncvode/tqueue.cpp000077500000000000000000000053211323325274500173260ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "tqueue.h" #include "pool.h" #include "classreg.h" #include "nrnoc2iv.h" #define PROFILE 0 #include "profile.h" #define DOCHECK 0 #if COLLECT_TQueue_STATISTICS #define STAT(arg) ++arg; #else #define STAT(arg) /**/ #endif static const char* errmess_; static double insert(void* v) { TQueue* q = (TQueue*)v; q->insert(*getarg(1), (void*)1); return 1.; } static double print(void* v) { TQueue* q = (TQueue*)v; q->print(); return 1.; } static double least(void* v) { TQueue* q = (TQueue*)v; TQItem* i = q->least(); double x = -1e9; if (i) { x = i->t_; } return x; } static double rmleast(void* v) { TQueue* q = (TQueue*)v; TQItem* i = q->least(); double x = -1e9; if (i) { x = i->t_; q->remove(i); } return x; } static double mvleast(void* v) { TQueue* q = (TQueue*)v; q->move_least(*getarg(1)); return 1.; } static double remove(void* v) { TQueue* q = (TQueue*)v; q->remove(q->find(*getarg(1))); return 1.; } static double find(void* v) { TQueue* q = (TQueue*)v; TQItem* i = q->find(*getarg(1)); double x = -1e9; if (i) { x = i->t_; q->remove(i); } return x; } static double stats(void* v) { TQueue* q = (TQueue*)v; q->statistics(); return 1.; } static Member_func members[] = { "insrt", insert, "least", least, "move_least", mvleast, "remove_least", rmleast, "remove", remove, "find", find, "stats", stats, "printf", print, 0,0 }; static void* cons(Object*) { assert(0); TQueue* q = new TQueue(0); return (void*)q; } static void destruct(void* v) { TQueue* q = (TQueue*)v; delete q; } void TQueue_reg() { class2oc("TQueue", cons, destruct, members, NULL, NULL, NULL); } //---------------- implementPool(TQItemPool, TQItem) #if BBTQ == 0 #include #endif #if BBTQ == 1 #include #endif #if BBTQ == 2 #include #endif #if BBTQ == 3 #include #endif #if BBTQ == 4 #include #endif #if BBTQ == 5 #include #endif SelfQueue::SelfQueue(TQItemPool* tp, int mkmut) { MUTCONSTRUCT(mkmut) tpool_ = tp; head_ = nil; } SelfQueue::~SelfQueue() { remove_all(); MUTDESTRUCT } TQItem* SelfQueue::insert(void* d) { MUTLOCK TQItem* q = tpool_->alloc(); q->left_ = nil; q->right_ = head_; if (head_) { head_->left_ = q; } head_ = q; q->data_ = d; MUTUNLOCK return q; } void* SelfQueue::remove(TQItem* q) { MUTLOCK if (q->left_) { q->left_->right_ = q->right_; } if (q->right_) { q->right_->left_ = q->left_; } if (q == head_) { head_ = q->right_; } tpool_->hpfree(q); MUTUNLOCK return q->data_; } void SelfQueue::remove_all() { MUTLOCK for (TQItem* q = first(); q; q = next(q)) { tpool_->hpfree(q); } head_ = nil; MUTUNLOCK } neuron-7.5/src/nrncvode/tqueue.h000077500000000000000000000026731323325274500170020ustar00rootroot00000000000000#ifndef tqueue_h #define tqueue_h #undef check #include #include class TQItem; declarePool(TQItemPool, TQItem) // 0 use bbtqueue, 1 use rbtqueue, 2 use sptqueue, 3 use sptfifoq #define BBTQ 5 #define FAST_LEAST 1 #if BBTQ == 0 #include #endif #if BBTQ == 1 #define RBTQueue TQueue #define RBTQItem TQItem #include #endif #if BBTQ == 2 #define SplayTQueue TQueue #define SplayTQItem TQItem #include #endif #if BBTQ == 3 // note: cannot use the fifo queue for parallel simulations since // the received MPI_Allgather buffer is not properly time sorted. #undef FAST_LEAST // required #define FAST_LEAST 1 #define SplayTFifoQueue TQueue #define SplayTFifoQItem TQItem #include #endif #if BBTQ == 4 #undef FAST_LEAST // required #define FAST_LEAST 1 #define Splay2TQueue TQueue #define Splay2TQItem TQItem #include #endif #if BBTQ == 5 #undef FAST_LEAST // required #define FAST_LEAST 1 #define SplayTBinQueue TQueue #define SplayTBinQItem TQItem #include #endif class SelfQueue { // not really a queue but a doubly linked list for fast public: // insertion, deletion, iteration SelfQueue(TQItemPool*, int mkmut = 0); virtual ~SelfQueue(); TQItem* insert(void*); void* remove(TQItem*); void remove_all(); TQItem* first() { return head_; } TQItem* next(TQItem* q) { return q->right_; } private: TQItem* head_; TQItemPool* tpool_; MUTDEC }; #endif neuron-7.5/src/nrncvode/vrecitem.h000066400000000000000000000165351323325274500173070ustar00rootroot00000000000000#ifndef vrecitem_h #define vrecitem_h #include #include #include #include class PlayRecord; class PlayRecordSave; class VecRecordDiscreteSave; class VecPlayStepSave; class VecPlayContinuousSave; class StmtInfo; struct NrnThread; struct Section; // SaveState subtypes for PlayRecordType #define VecRecordDiscreteType 1 #define VecRecordDtType 2 #define VecPlayStepType 3 #define VecPlayContinuousType 4 // used by PlayRecord subclasses that utilize discrete events class PlayRecordEvent : public DiscreteEvent { public: PlayRecordEvent(); virtual ~PlayRecordEvent(); virtual void deliver(double, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); virtual void frecord_init(TQItem* q); virtual NrnThread* thread(); PlayRecord* plr_; static unsigned long playrecord_send_; static unsigned long playrecord_deliver_; virtual DiscreteEvent* savestate_save(); virtual void savestate_restore(double deliverytime, NetCvode*); virtual void savestate_write(FILE*); static DiscreteEvent* savestate_read(FILE*); }; // common interface for Play and Record for all integration methods. class PlayRecord : public Observer { public: PlayRecord(double* pd, Object* ppobj = nil); virtual ~PlayRecord(); virtual void install(Cvode* cv){ cvode_ = cv; } // cvode play or record list? virtual void play_init(){} // called near beginning of finitialize virtual void record_init(){} // called near end of finitialize and frecord_init() virtual void continuous(double t){} // play - every f(y, t) or res(y', y, t); record - advance_tn and initialize flag virtual void deliver(double t, NetCvode*){} // at associated DiscreteEvent virtual PlayRecordEvent* event() { return nil;} virtual void pr(); // print identifying info virtual int type() { return 0; } // install normally calls one of these. Cvode may be nil. void play_add(Cvode*); void record_add(Cvode*); // administration virtual void update_ptr(double*); virtual void disconnect(Observable*); virtual void update(Observable* o) {disconnect(o);} virtual bool uses(void*) { return false; } virtual void frecord_init(TQItem*) {} // for example, subclasses use things that may not go out of existence but wish us // to remove ourselves from the PlayRecord system. e.g Vector.play_remove(). virtual PlayRecordSave* savestate_save(); static PlayRecordSave* savestate_read(FILE*); double* pd_; Object* ppobj_; Cvode* cvode_; int ith_; // The thread index }; declarePtrList(PlayRecList, PlayRecord) class PlayRecordSave { public: PlayRecordSave(PlayRecord*); virtual ~PlayRecordSave(); virtual void savestate_restore(){}; virtual void savestate_write(FILE*){} virtual void savestate_read(FILE*){} void check(); PlayRecord* pr_; int prl_index_; }; class TvecRecord: public PlayRecord { public: TvecRecord(Section*, IvocVect* tvec, Object* ppobj = nil); virtual ~TvecRecord(); virtual void install(Cvode*); virtual void record_init(); virtual void continuous(double t); virtual void disconnect(Observable*); virtual bool uses(void* v) { return (void*)t_ == v; } IvocVect* t_; Section* sec_; }; class YvecRecord : public PlayRecord { public: YvecRecord(double*, IvocVect* y, Object* ppobj = nil); virtual ~YvecRecord(); virtual void install(Cvode*); virtual void record_init(); virtual void continuous(double t); virtual void disconnect(Observable*); virtual bool uses(void* v) { return (void*)y_== v ;} IvocVect* y_; }; class VecRecordDiscrete : public PlayRecord { public: VecRecordDiscrete(double*, IvocVect* y, IvocVect* t, Object* ppobj = nil); virtual ~VecRecordDiscrete(); virtual void install(Cvode*); virtual void record_init(); virtual PlayRecordEvent* event() { return e_;} virtual void deliver(double t, NetCvode*); virtual void disconnect(Observable*); virtual bool uses(void* v) { return (void*)y_== v || (void*)t_ == v;} virtual void frecord_init(TQItem*); virtual int type() { return VecRecordDiscreteType; } virtual PlayRecordSave* savestate_save(); IvocVect* y_; IvocVect* t_; PlayRecordEvent* e_; }; class VecRecordDiscreteSave : public PlayRecordSave { public: VecRecordDiscreteSave(PlayRecord*); virtual ~VecRecordDiscreteSave(); virtual void savestate_restore(); virtual void savestate_write(FILE*); virtual void savestate_read(FILE*); int cursize_; }; class VecRecordDt : public PlayRecord { public: VecRecordDt(double*, IvocVect* y, double dt, Object* ppobj = nil); virtual ~VecRecordDt(); virtual void install(Cvode*); virtual void record_init(); virtual void deliver(double t, NetCvode*); virtual PlayRecordEvent* event() { return e_;} virtual void disconnect(Observable*); virtual bool uses(void* v) { return (void*)y_== v;} virtual void frecord_init(TQItem*); virtual int type() { return VecRecordDtType; } virtual PlayRecordSave* savestate_save(); IvocVect* y_; double dt_; PlayRecordEvent* e_; }; class VecRecordDtSave : public PlayRecordSave { public: VecRecordDtSave(PlayRecord*); virtual ~VecRecordDtSave(); virtual void savestate_restore(); }; class VecPlayStep : public PlayRecord { public: VecPlayStep(double*, IvocVect* y, IvocVect* t, double dt, Object* ppobj = nil); VecPlayStep( const char* s, IvocVect* y, IvocVect* t, double dt, Object* ppobj = nil); void init(IvocVect* y, IvocVect* t, double dt); virtual ~VecPlayStep(); virtual void install(Cvode*); virtual void play_init(); virtual void deliver(double t, NetCvode*); virtual PlayRecordEvent* event() { return e_;} virtual void pr(); virtual void disconnect(Observable*); virtual bool uses(void* v) { return (void*)y_== v || (void*)t_ == v;} virtual int type() { return VecPlayStepType; } virtual PlayRecordSave* savestate_save(); IvocVect* y_; IvocVect* t_; double dt_; int current_index_; PlayRecordEvent* e_; StmtInfo* si_; }; class VecPlayStepSave : public PlayRecordSave { public: VecPlayStepSave(PlayRecord*); virtual ~VecPlayStepSave(); virtual void savestate_restore(); virtual void savestate_write(FILE*); virtual void savestate_read(FILE*); int curindex_; }; class VecPlayContinuous : public PlayRecord { public: VecPlayContinuous(double*, IvocVect* y, IvocVect* t, IvocVect* discon, Object* ppobj = nil); VecPlayContinuous( const char* s, IvocVect* y, IvocVect* t, IvocVect* discon, Object* ppobj = nil); virtual ~VecPlayContinuous(); void init(IvocVect* y, IvocVect* t, IvocVect* tdiscon); virtual void install(Cvode*); virtual void play_init(); virtual void deliver(double t, NetCvode*); virtual PlayRecordEvent* event() { return e_;} virtual void pr(); void continuous(double tt); double interpolate(double tt); double interp(double th, double x0, double x1){ return x0 + (x1 - x0)*th; } void search(double tt); virtual void disconnect(Observable*); virtual bool uses(void* v) { return (void*)y_== v || (void*)t_ == v || (void*)discon_indices_ == v;} virtual int type() { return VecPlayContinuousType; } virtual PlayRecordSave* savestate_save(); IvocVect* y_; IvocVect* t_; IvocVect* discon_indices_; int last_index_; int discon_index_; int ubound_index_; PlayRecordEvent* e_; StmtInfo* si_; }; class VecPlayContinuousSave : public PlayRecordSave { public: VecPlayContinuousSave(PlayRecord*); virtual ~VecPlayContinuousSave(); virtual void savestate_restore(); virtual void savestate_write(FILE*); virtual void savestate_read(FILE*); int last_index_; int discon_index_; int ubound_index_; }; #endif neuron-7.5/src/nrniv/000077500000000000000000000000001323325274500146245ustar00rootroot00000000000000neuron-7.5/src/nrniv/Makefile.am000077500000000000000000000132311323325274500166630ustar00rootroot00000000000000## The list of libraries that we make from this directory. lib_LTLIBRARIES = libnrniv.la ## The list of programs that we make from this directory. bin_PROGRAMS = nrniv nsrc=$(top_srcdir)/src PARSRC = nvector_nrnparallel_ld.c PARINC = nvector_nrnparallel_ld.h if BUILD_PARANEURON PARSRC1 = $(PARSRC) PARINC1 = $(PARINC) else PARSRC1 = PARINC1 = endif EXTRA_DIST = $(PARSRC) $(PARINC) have2want.cpp if BUILD_NRNMPI_DYNAMIC nrnmpila = else nrnmpila = ../nrnmpi/libnrnmpi.la endif if BUILD_CYGWIN nrniv_LDFLAGS = -mwindows -e _mainCRTStartup windll = -I$(nsrc)/mswin/windll cygexe = mos2nrn.exe neuron.exe CXX64WIN = x86_64-w64-mingw32-g++ CXX32WIN = i686-pc-mingw32-g++ mos2nrn.exe: $(nsrc)/mswin/extra/mos2nrn.cpp if test "$(host_cpu)" = "x86_64" ; then \ $(CXX64WIN) -g -O2 -DCYGWIN -o mos2nrn.exe $(nsrc)/mswin/extra/mos2nrn.cpp ;\ else \ $(CXX32WIN) -g -O2 -DCYGWIN -o mos2nrn.exe $(nsrc)/mswin/extra/mos2nrn.cpp ;\ fi neuron.exe: $(nsrc)/mswin/extra/neuron.cpp echo "id ICON \"$(nsrc)/mswin/nrniv10.ico\"" > nrnicon.rc windres nrnicon.rc -O coff -o nrnicon.res if test "$(host_cpu)" = "x86_64" ; then \ $(CXX64WIN) -g -O2 -DCYGWIN -o neuron.exe $(nsrc)/mswin/extra/neuron.cpp nrnicon.res ;\ else \ $(CXX32WIN) -g -O2 -DCYGWIN -o neuron.exe $(nsrc)/mswin/extra/neuron.cpp nrnicon.res ;\ fi else if BUILD_MINGW nrniv_LDFLAGS = windll = -I$(nsrc)/mswin/windll cygexe = mos2nrn.exe neuron.exe mos2nrn.exe: $(nsrc)/mswin/extra/mos2nrn.cpp $(CXX) -g -O2 -DMINGW -o mos2nrn.exe $(nsrc)/mswin/extra/mos2nrn.cpp neuron.exe: $(nsrc)/mswin/extra/neuron.cpp echo "id ICON \"$(nsrc)/mswin/nrniv10.ico\"" > nrnicon.rc windres nrnicon.rc -O coff -o nrnicon.res $(CXX) -g -O2 -DMINGW -o neuron.exe $(nsrc)/mswin/extra/neuron.cpp nrnicon.res else nrniv_LDFLAGS = windll = cygexe = endif endif ## These are all the .c files that need to be compiled to make libnrniv.la. libnrniv_la_SOURCES = nrnmenu.cpp shape.cpp classreg.cpp rotate3d.cpp \ datapath.cpp symdir.cpp spaceplt.cpp shapeplt.cpp ppshape.cpp \ secbrows.cpp ndatclas.cpp impedanc.cpp savstate.cpp hocmech.cpp \ ocjump.cpp vrecord.cpp cvodestb.cpp occvode.cpp \ cvodeobj.cpp cvtrset.cpp tqueue.cpp netcvode.cpp singlech.cpp \ nrndaspk.cpp glinerec.cpp cxprop.cpp \ ocbbs.cpp bbs.cpp bbslocal.cpp bbslsrv.cpp \ bbsrcli.cpp bbsdirect.cpp bbslsrv2.cpp bbssrv.cpp \ linmod.cpp linmod1.cpp cachevec.cpp \ kschan.cpp kssingle.cpp nonlinz.cpp finithnd.cpp nrnste.cpp \ nrnrtime.cpp nvector_nrnthread.c nrnpy.cpp prcellstate.cpp \ nvector_nrnthread_ld.c nvector_nrnserial_ld.c \ $(PARSRC1) bgpmeminfo.c \ netpar.cpp partrans.cpp splitcell.cpp multisplit.cpp \ bbsavestate.cpp nrnbbcore_write.cpp \ nrndae.cpp matrixmap.cpp geometry3d.cpp libnrniv_la_LIBADD = @MUSIC_LIBLA@ # The interviews includes must be before the X includes so that if a # vanilla interviews is also installed, we don't use it. IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) IV_LIBS = @IV_LIBS_LIBTOOL@ IVOS_DIR = @IVOS_DIR@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PVM_LIBS = @PVM_LIBS@ $(PVM_XTRA_LIBS) BBS_LIBS = $(PVM_LIBS) PVM_INCLUDES = @PVM_INCLUDES@ BBS_INCLUDES = -I$(nsrc)/parallel -I$(nsrc)/nrnmpi $(PVM_INCLUDES) -I@MUSIC_INCDIR@ PTHREAD_CC=@PTHREAD_CC@ PTHREAD_CFLAGS=@PTHREAD_CFLAGS@ PTHREAD_LIBS=@PTHREAD_LIBS@ includes = $(windll) -I$(nsrc)/sundials -I$(nsrc)/sundials/shared -I$(nsrc)/nrncvode -I$(nsrc)/sparse13 -I$(nsrc)/gnu -I. -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I$(top_builddir)/src/oc -I$(nsrc)/oc $(IV_INCLUDES) $(BBS_INCLUDES) AM_CPPFLAGS = -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 $(includes) AM_CFLAGS = @MINGW_CFLAG@ $(PTHREAD_CFLAGS) AM_CXXFLAGS = @MINGW_CFLAG@ $(PTHREAD_CFLAGS) if NRNMECH_DLL_STYLE libnrniv_la_LDFLAGS = -export-dynamic else libnrniv_la_LDFLAGS = endif ## Sources that go into nrniv: nrniv_SOURCES = nvkludge.cpp ## Additional libraries and objects that go into nrniv: nrniv_LDADD = ../ivoc/nrnmain.o ../ivoc/ivocmain.o ../oc/modlreg.o \ ../oc/ockludge.o \ ../nrnoc/libnrnoc.la ../oc/liboc.la \ libnrniv.la ../ivoc/libivoc.la ../oc/liboc.la \ $(nrnmpila) \ ../gnu/libneuron_gnu.la \ ../scopmath/libscopmath.la \ ../sparse13/libsparse13.la \ ../sundials/libsundials.la \ @MEMACSLIBLA@ ../mesch/libmeschach.la $(IVOS_DIR) \ $(IV_LIBS) @NRNJAVA_LIBLA@ \ $(BBS_LIBS) @NRNPYTHON_LIBLA@ @MUSIC_LIBLA@ @NRNNI_LIBLA@ \ @NRN_READLINE_LIBS@ @PTHREAD_LIBS@ nrniv_DEPENDENCIES = \ ../ivoc/nrnmain.o ../ivoc/ivocmain.o ../oc/modlreg.o \ ../oc/ockludge.o \ ../nrnoc/libnrnoc.la ../oc/liboc.la \ libnrniv.la ../ivoc/libivoc.la \ $(nrnmpila) \ ../gnu/libneuron_gnu.la \ ../scopmath/libscopmath.la \ ../sparse13/libsparse13.la \ ../sundials/libsundials.la \ @MEMACSLIBLA@ ../mesch/libmeschach.la \ @NRN_READLINE_DEP@ @NRNJAVA_DEP@ @NRNPYTHON_DEP@ @NRNNI_DEP@ \ $(cygexe) ## Header files that must be included in the distribution: noinst_HEADERS = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h ppshape.h \ rot3band.h rotate3d.h secbrows.h shape.h shapeplt.h singlech.h \ linmod.h nrnste.h arraypool.h structpool.h \ kschan.h kssingle.h nonlinz.h nrnhash.h \ nvector_nrnthread_ld.h nvector_nrnserial_ld.h \ $(PARINC1) \ bgpdma.cpp bgpdmasetup.cpp bgpmeminfo.c \ multisplitcontrol.h nvector_nrnthread.h \ bbsavestate.h nrnbbcore_write.h nrnsection_mapping.h\ nrnmusic.cpp nrndae.h matrixmap.h \ structpool.h nrnhash_alt.h ## We have to play a trick on automake to get it to install the .o files in ## an architecture-dependent subdirectory. (Apparently automake's authors ## never heard of installing .o files.) We pretend to create a separate ## directory (which is really just $(pkglibdir)) and we install the .o files ## by calling them "DATA". ## Argh!!!!! libobjdir = $(libdir) ## The following object files need to be installed: libobj_DATA = nvkludge.o neuron-7.5/src/nrniv/Makefile.in000066400000000000000000001230331323325274500166730ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = nrniv$(EXEEXT) subdir = src/nrniv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(libobjdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libnrniv_la_DEPENDENCIES = am__libnrniv_la_SOURCES_DIST = nrnmenu.cpp shape.cpp classreg.cpp \ rotate3d.cpp datapath.cpp symdir.cpp spaceplt.cpp shapeplt.cpp \ ppshape.cpp secbrows.cpp ndatclas.cpp impedanc.cpp \ savstate.cpp hocmech.cpp ocjump.cpp vrecord.cpp cvodestb.cpp \ occvode.cpp cvodeobj.cpp cvtrset.cpp tqueue.cpp netcvode.cpp \ singlech.cpp nrndaspk.cpp glinerec.cpp cxprop.cpp ocbbs.cpp \ bbs.cpp bbslocal.cpp bbslsrv.cpp bbsrcli.cpp bbsdirect.cpp \ bbslsrv2.cpp bbssrv.cpp linmod.cpp linmod1.cpp cachevec.cpp \ kschan.cpp kssingle.cpp nonlinz.cpp finithnd.cpp nrnste.cpp \ nrnrtime.cpp nvector_nrnthread.c nrnpy.cpp prcellstate.cpp \ nvector_nrnthread_ld.c nvector_nrnserial_ld.c \ nvector_nrnparallel_ld.c bgpmeminfo.c netpar.cpp partrans.cpp \ splitcell.cpp multisplit.cpp bbsavestate.cpp \ nrnbbcore_write.cpp nrndae.cpp matrixmap.cpp geometry3d.cpp am__objects_1 = nvector_nrnparallel_ld.lo @BUILD_PARANEURON_TRUE@am__objects_2 = $(am__objects_1) am_libnrniv_la_OBJECTS = nrnmenu.lo shape.lo classreg.lo rotate3d.lo \ datapath.lo symdir.lo spaceplt.lo shapeplt.lo ppshape.lo \ secbrows.lo ndatclas.lo impedanc.lo savstate.lo hocmech.lo \ ocjump.lo vrecord.lo cvodestb.lo occvode.lo cvodeobj.lo \ cvtrset.lo tqueue.lo netcvode.lo singlech.lo nrndaspk.lo \ glinerec.lo cxprop.lo ocbbs.lo bbs.lo bbslocal.lo bbslsrv.lo \ bbsrcli.lo bbsdirect.lo bbslsrv2.lo bbssrv.lo linmod.lo \ linmod1.lo cachevec.lo kschan.lo kssingle.lo nonlinz.lo \ finithnd.lo nrnste.lo nrnrtime.lo nvector_nrnthread.lo \ nrnpy.lo prcellstate.lo nvector_nrnthread_ld.lo \ nvector_nrnserial_ld.lo $(am__objects_2) bgpmeminfo.lo \ netpar.lo partrans.lo splitcell.lo multisplit.lo \ bbsavestate.lo nrnbbcore_write.lo nrndae.lo matrixmap.lo \ geometry3d.lo libnrniv_la_OBJECTS = $(am_libnrniv_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libnrniv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libnrniv_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) am_nrniv_OBJECTS = nvkludge.$(OBJEXT) nrniv_OBJECTS = $(am_nrniv_OBJECTS) @BUILD_NRNMPI_DYNAMIC_FALSE@am__DEPENDENCIES_1 = \ @BUILD_NRNMPI_DYNAMIC_FALSE@ ../nrnmpi/libnrnmpi.la am__DEPENDENCIES_2 = am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) am__DEPENDENCIES_4 = $(am__DEPENDENCIES_3) nrniv_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(nrniv_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libnrniv_la_SOURCES) $(nrniv_SOURCES) DIST_SOURCES = $(am__libnrniv_la_SOURCES_DIST) $(nrniv_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(libobj_DATA) am__noinst_HEADERS_DIST = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h \ ppshape.h rot3band.h rotate3d.h secbrows.h shape.h shapeplt.h \ singlech.h linmod.h nrnste.h arraypool.h structpool.h kschan.h \ kssingle.h nonlinz.h nrnhash.h nvector_nrnthread_ld.h \ nvector_nrnserial_ld.h nvector_nrnparallel_ld.h bgpdma.cpp \ bgpdmasetup.cpp bgpmeminfo.c multisplitcontrol.h \ nvector_nrnthread.h bbsavestate.h nrnbbcore_write.h \ nrnsection_mapping.h nrnmusic.cpp nrndae.h matrixmap.h \ nrnhash_alt.h HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS_LIBTOOL@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ $(PVM_XTRA_LIBS) PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libnrniv.la nsrc = $(top_srcdir)/src PARSRC = nvector_nrnparallel_ld.c PARINC = nvector_nrnparallel_ld.h @BUILD_PARANEURON_FALSE@PARSRC1 = @BUILD_PARANEURON_TRUE@PARSRC1 = $(PARSRC) @BUILD_PARANEURON_FALSE@PARINC1 = @BUILD_PARANEURON_TRUE@PARINC1 = $(PARINC) EXTRA_DIST = $(PARSRC) $(PARINC) have2want.cpp @BUILD_NRNMPI_DYNAMIC_FALSE@nrnmpila = ../nrnmpi/libnrnmpi.la @BUILD_NRNMPI_DYNAMIC_TRUE@nrnmpila = @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@nrniv_LDFLAGS = @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@nrniv_LDFLAGS = @BUILD_CYGWIN_TRUE@nrniv_LDFLAGS = -mwindows -e _mainCRTStartup @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@windll = @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@windll = -I$(nsrc)/mswin/windll @BUILD_CYGWIN_TRUE@windll = -I$(nsrc)/mswin/windll @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@cygexe = @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@cygexe = mos2nrn.exe neuron.exe @BUILD_CYGWIN_TRUE@cygexe = mos2nrn.exe neuron.exe @BUILD_CYGWIN_TRUE@CXX64WIN = x86_64-w64-mingw32-g++ @BUILD_CYGWIN_TRUE@CXX32WIN = i686-pc-mingw32-g++ libnrniv_la_SOURCES = nrnmenu.cpp shape.cpp classreg.cpp rotate3d.cpp \ datapath.cpp symdir.cpp spaceplt.cpp shapeplt.cpp ppshape.cpp \ secbrows.cpp ndatclas.cpp impedanc.cpp savstate.cpp hocmech.cpp \ ocjump.cpp vrecord.cpp cvodestb.cpp occvode.cpp \ cvodeobj.cpp cvtrset.cpp tqueue.cpp netcvode.cpp singlech.cpp \ nrndaspk.cpp glinerec.cpp cxprop.cpp \ ocbbs.cpp bbs.cpp bbslocal.cpp bbslsrv.cpp \ bbsrcli.cpp bbsdirect.cpp bbslsrv2.cpp bbssrv.cpp \ linmod.cpp linmod1.cpp cachevec.cpp \ kschan.cpp kssingle.cpp nonlinz.cpp finithnd.cpp nrnste.cpp \ nrnrtime.cpp nvector_nrnthread.c nrnpy.cpp prcellstate.cpp \ nvector_nrnthread_ld.c nvector_nrnserial_ld.c \ $(PARSRC1) bgpmeminfo.c \ netpar.cpp partrans.cpp splitcell.cpp multisplit.cpp \ bbsavestate.cpp nrnbbcore_write.cpp \ nrndae.cpp matrixmap.cpp geometry3d.cpp libnrniv_la_LIBADD = @MUSIC_LIBLA@ # The interviews includes must be before the X includes so that if a # vanilla interviews is also installed, we don't use it. IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) BBS_LIBS = $(PVM_LIBS) BBS_INCLUDES = -I$(nsrc)/parallel -I$(nsrc)/nrnmpi $(PVM_INCLUDES) -I@MUSIC_INCDIR@ includes = $(windll) -I$(nsrc)/sundials -I$(nsrc)/sundials/shared -I$(nsrc)/nrncvode -I$(nsrc)/sparse13 -I$(nsrc)/gnu -I. -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I$(top_builddir)/src/oc -I$(nsrc)/oc $(IV_INCLUDES) $(BBS_INCLUDES) AM_CPPFLAGS = -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 $(includes) AM_CFLAGS = @MINGW_CFLAG@ $(PTHREAD_CFLAGS) AM_CXXFLAGS = @MINGW_CFLAG@ $(PTHREAD_CFLAGS) @NRNMECH_DLL_STYLE_FALSE@libnrniv_la_LDFLAGS = @NRNMECH_DLL_STYLE_TRUE@libnrniv_la_LDFLAGS = -export-dynamic nrniv_SOURCES = nvkludge.cpp nrniv_LDADD = ../ivoc/nrnmain.o ../ivoc/ivocmain.o ../oc/modlreg.o \ ../oc/ockludge.o \ ../nrnoc/libnrnoc.la ../oc/liboc.la \ libnrniv.la ../ivoc/libivoc.la ../oc/liboc.la \ $(nrnmpila) \ ../gnu/libneuron_gnu.la \ ../scopmath/libscopmath.la \ ../sparse13/libsparse13.la \ ../sundials/libsundials.la \ @MEMACSLIBLA@ ../mesch/libmeschach.la $(IVOS_DIR) \ $(IV_LIBS) @NRNJAVA_LIBLA@ \ $(BBS_LIBS) @NRNPYTHON_LIBLA@ @MUSIC_LIBLA@ @NRNNI_LIBLA@ \ @NRN_READLINE_LIBS@ @PTHREAD_LIBS@ nrniv_DEPENDENCIES = \ ../ivoc/nrnmain.o ../ivoc/ivocmain.o ../oc/modlreg.o \ ../oc/ockludge.o \ ../nrnoc/libnrnoc.la ../oc/liboc.la \ libnrniv.la ../ivoc/libivoc.la \ $(nrnmpila) \ ../gnu/libneuron_gnu.la \ ../scopmath/libscopmath.la \ ../sparse13/libsparse13.la \ ../sundials/libsundials.la \ @MEMACSLIBLA@ ../mesch/libmeschach.la \ @NRN_READLINE_DEP@ @NRNJAVA_DEP@ @NRNPYTHON_DEP@ @NRNNI_DEP@ \ $(cygexe) noinst_HEADERS = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h ppshape.h \ rot3band.h rotate3d.h secbrows.h shape.h shapeplt.h singlech.h \ linmod.h nrnste.h arraypool.h structpool.h \ kschan.h kssingle.h nonlinz.h nrnhash.h \ nvector_nrnthread_ld.h nvector_nrnserial_ld.h \ $(PARINC1) \ bgpdma.cpp bgpdmasetup.cpp bgpmeminfo.c \ multisplitcontrol.h nvector_nrnthread.h \ bbsavestate.h nrnbbcore_write.h nrnsection_mapping.h\ nrnmusic.cpp nrndae.h matrixmap.h \ structpool.h nrnhash_alt.h libobjdir = $(libdir) libobj_DATA = nvkludge.o all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrniv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrniv/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libnrniv.la: $(libnrniv_la_OBJECTS) $(libnrniv_la_DEPENDENCIES) $(EXTRA_libnrniv_la_DEPENDENCIES) $(AM_V_CXXLD)$(libnrniv_la_LINK) -rpath $(libdir) $(libnrniv_la_OBJECTS) $(libnrniv_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list nrniv$(EXEEXT): $(nrniv_OBJECTS) $(nrniv_DEPENDENCIES) $(EXTRA_nrniv_DEPENDENCIES) @rm -f nrniv$(EXEEXT) $(AM_V_CXXLD)$(nrniv_LINK) $(nrniv_OBJECTS) $(nrniv_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbsavestate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbsdirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbslocal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbslsrv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbslsrv2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbsrcli.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbssrv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgpmeminfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cachevec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classreg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvodeobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvodestb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvtrset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cxprop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datapath.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finithnd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geometry3d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glinerec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocmech.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impedanc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kschan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kssingle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linmod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linmod1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrixmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multisplit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndatclas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netcvode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonlinz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnbbcore_write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrndae.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrndaspk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnmenu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnrtime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnste.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector_nrnparallel_ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector_nrnserial_ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector_nrnthread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector_nrnthread_ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvkludge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocbbs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/occvode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocjump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partrans.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppshape.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prcellstate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotate3d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savstate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secbrows.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shapeplt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlech.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spaceplt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splitcell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tqueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vrecord.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libobjDATA: $(libobj_DATA) @$(NORMAL_INSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libobjdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libobjdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libobjdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(libobjdir)" || exit $$?; \ done uninstall-libobjDATA: @$(NORMAL_UNINSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libobjdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libobjdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-libobjDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-libobjDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-libobjDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-libobjDATA .PRECIOUS: Makefile @BUILD_CYGWIN_TRUE@mos2nrn.exe: $(nsrc)/mswin/extra/mos2nrn.cpp @BUILD_CYGWIN_TRUE@ if test "$(host_cpu)" = "x86_64" ; then \ @BUILD_CYGWIN_TRUE@ $(CXX64WIN) -g -O2 -DCYGWIN -o mos2nrn.exe $(nsrc)/mswin/extra/mos2nrn.cpp ;\ @BUILD_CYGWIN_TRUE@ else \ @BUILD_CYGWIN_TRUE@ $(CXX32WIN) -g -O2 -DCYGWIN -o mos2nrn.exe $(nsrc)/mswin/extra/mos2nrn.cpp ;\ @BUILD_CYGWIN_TRUE@ fi @BUILD_CYGWIN_TRUE@neuron.exe: $(nsrc)/mswin/extra/neuron.cpp @BUILD_CYGWIN_TRUE@ echo "id ICON \"$(nsrc)/mswin/nrniv10.ico\"" > nrnicon.rc @BUILD_CYGWIN_TRUE@ windres nrnicon.rc -O coff -o nrnicon.res @BUILD_CYGWIN_TRUE@ if test "$(host_cpu)" = "x86_64" ; then \ @BUILD_CYGWIN_TRUE@ $(CXX64WIN) -g -O2 -DCYGWIN -o neuron.exe $(nsrc)/mswin/extra/neuron.cpp nrnicon.res ;\ @BUILD_CYGWIN_TRUE@ else \ @BUILD_CYGWIN_TRUE@ $(CXX32WIN) -g -O2 -DCYGWIN -o neuron.exe $(nsrc)/mswin/extra/neuron.cpp nrnicon.res ;\ @BUILD_CYGWIN_TRUE@ fi @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@mos2nrn.exe: $(nsrc)/mswin/extra/mos2nrn.cpp @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@ $(CXX) -g -O2 -DMINGW -o mos2nrn.exe $(nsrc)/mswin/extra/mos2nrn.cpp @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@neuron.exe: $(nsrc)/mswin/extra/neuron.cpp @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@ echo "id ICON \"$(nsrc)/mswin/nrniv10.ico\"" > nrnicon.rc @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@ windres nrnicon.rc -O coff -o nrnicon.res @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@ $(CXX) -g -O2 -DMINGW -o neuron.exe $(nsrc)/mswin/extra/neuron.cpp nrnicon.res # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrniv/arraypool.h000077500000000000000000000071411323325274500170130ustar00rootroot00000000000000#ifndef arraypool_h #define arraypool_h // create and manage a vector of arrays as a memory pool of those arrays // the idea is to allow the possibility of some extra cache efficiency // the chain of ArrayPool // is only for extra items in a pool_ and no other fields are used. // The arraypool can be inceased in size by calling grow(ninc) which // will chain a new ArrayPool of that size. Note that threads using // distinct ArrayPool chain items will not have a problem with cache // line sharing. // When the arraypool needs to grow itself then it // doubles in size every time a chain ArrayPool is added. // maxget() tells the most number of arraypool items used at once. // note that grow_(ninc) implicitly assumes all existing space is in use // (i.e. put == get) and hence put ends up as put+ninc. On the other // hand the user callable grow(ninc) assumes NO space is in use, // so also put == get and put is set back to get. #define declareArrayPool(ArrayPool,T) \ class ArrayPool { \ public: \ ArrayPool(long count, long d2); \ ~ArrayPool(); \ T* alloc(); \ void hpfree(T*); \ int maxget() { return maxget_;} \ int size() { return count_;} \ void free_all(); \ T* pool() { return pool_; } \ long get() { return get_; } \ long put() { return put_; } \ long nget() { return nget_; } \ long ntget() { return ntget_; } \ long d2() { return d2_; } \ T* element(long i) { return pool_ + i*d2_; } \ T** items() { return items_; } \ void grow(long ninc); \ ArrayPool* chain() { return chain_; } \ long chain_size() { return pool_size_; } \ private: \ void grow_(long ninc); \ private: \ T** items_; \ T* pool_; \ long pool_size_; \ long count_; \ long get_; \ long put_; \ long nget_; \ long ntget_; \ long maxget_; \ long d2_; \ ArrayPool* chain_; \ ArrayPool* chainlast_; \ }; \ \ #define implementArrayPool(ArrayPool,T) \ ArrayPool::ArrayPool(long count, long d2) { \ count_ = count; \ d2_ = d2; \ pool_ = (T*)nrn_cacheline_calloc((void**)&pool_, count_*d2_, sizeof(T)); \ pool_size_ = count; \ items_ = new T*[count_]; \ for (long i = 0; i < count_; ++i) { \ items_[i] = pool_ + i*d2_; \ } \ get_ = 0; \ put_ = 0; \ nget_ = 0; \ ntget_ = 0; \ maxget_ = 0; \ chain_ = 0; \ chainlast_ = this; \ } \ \ void ArrayPool::grow(long ninc) { \ grow_(ninc); \ put_ = get_; \ } \ \ void ArrayPool::grow_(long ninc) { \ assert(get_ == put_); \ ArrayPool* p = new ArrayPool(ninc, d2_); \ chainlast_->chain_ = p; \ chainlast_ = p; \ long newcnt = count_ + ninc; \ T** itms = new T*[newcnt]; \ long i, j; \ put_ += ninc; \ for (i = 0; i < get_; ++i) { \ itms[i] = items_[i]; \ } \ for (i = get_, j = 0; j < ninc; ++i, ++j) { \ itms[i] = p->items_[j]; \ } \ for (i = put_, j = get_; j < count_; ++i, ++j) { \ itms[i] = items_[j]; \ } \ delete [] items_; \ delete [] p->items_; \ p->items_ = 0; \ items_ = itms; \ count_ = newcnt; \ } \ \ ArrayPool::~ArrayPool() { \ if (chain_) { \ delete chain_; \ } \ free(pool_); \ if (items_) { \ delete [] items_; \ } \ } \ \ T* ArrayPool::alloc() { \ if (nget_ >= count_) { grow_(count_); } \ T* item = items_[get_]; \ get_ = (get_+1)%count_; \ ++nget_; \ ++ntget_; \ if (nget_ > maxget_) { maxget_ = nget_; } \ return item; \ } \ \ void ArrayPool::hpfree(T* item) { \ assert(nget_ > 0); \ items_[put_] = item; \ put_ = (put_ + 1)%count_; \ --nget_; \ } \ \ void ArrayPool::free_all() { \ ArrayPool* pp; \ long i; \ nget_ = 0; \ get_ = 0; \ put_ = 0; \ for(pp = this; pp; pp = pp->chain_) { \ for (i=0; i < pp->pool_size_; ++i) { \ items_[put_++] = pp->pool_ + i*d2_; \ } \ } \ assert(put_ == count_); \ put_ = 0; \ } \ \ #endif neuron-7.5/src/nrniv/bbs.cpp000077500000000000000000000000371323325274500161010ustar00rootroot00000000000000#include "../parallel/bbs.cpp" neuron-7.5/src/nrniv/bbsavestate.cpp000066400000000000000000002220731323325274500176410ustar00rootroot00000000000000#include <../../nrnconf.h> /* The goal is to be able to save state to a file and restore state when the save and restore contexts have different numbers of processors, different distribution of gids, and different splitting. It needs to work efficiently in the context of many GByte file sizes and many thousands of processors. The major assumption is that Point_process order is the same within a Node. It is difficult to assert the correctness of this assumption unless the user defines a global identifier for each Point_process and modifies the BBSaveState implementation to explicitly check that parameter with f->i(ppgid, 1). This has been relaxed a bit to allow point processes to be marked IGNORE which will skip them on save/restore. However, it still holds that the order of the non-ignored point processes must be the same within a Node. When a property is encountered the type is checked. However there is no way to determine if two point processes of the same type are restored in the saved order in a Node. Also note that when a point process is ignored, that also implies that the NetCons for which it is a target are also ignored. Finally, note that a non-ignored point process that is saved cannot be marked IGNORE on restore. Similarly, if a point process is marked IGNORE on save it cannot be non-ignored on restore. The user can mark a point process IGNORE by calling the method bbss.ignore(point_process_object) on all the point processes to be ignored. The internal list of ignored point processes can be cleared by calling bbss.ignore() Because a restore clears the event queue and because one cannot call finitialize from hoc without vitiating the restore, Vector.play will not work unless one calls BBSaveState.vector_play_init() after a restore (similarly frecord() must be called for Vector.record to work. Note that it is necessary that Vector.play use a tvec argument with a first element greater than or equal to the restore time. Because of many unimplemented aspects to the general problem, this implementation is more or less limited to BlueBrain cortical models. There are also conceptual difficulties with the general problem since necessary information is embodied in the Hoc programs. Some model restrictions: 1) "Real" cells must have gids. 2) Artificial cells can have gids. If not they must be directly connected to just one synapse (e.g. NetStim -> NetCon -> synapse). 3) There is only one spike output port per cell and that is associated with a base gid. 4) NetCon.event in Hoc can be used only with NetCon's with a None source. Note: On reading, the only things that need to exist in the file are the gids and sections that are needed and the others are ignored. So subsets of a written model can read the same file. However, again, all the Point_process objects have to exist for each section that were written by the file (unless they they are eplicitly marked IGNORE). We keep together, all the information associated with a section which includes Point_processes and the NetCons, and SelfEvents targeting each Point_process. Sometimes a NetStim stimulus is used to stimulate the PointProcess. For those cases, when the NetCon has no srcid, the source is also associated with the Point_process. Originally, NetCon with an ARTIFICIAL_CELL source were ignored and did not appear in the DEList of the point process. This allowed one to have different numbers of NetStim with NetCon connected locally before a save and restore. Note that outstanding events from these NetCon on the queue were not saved. PreSyn with state are associated with the cell (gid)that contains them. We required PreSyn to be associated with gids. Although that convention had some nice properties (albeit, it involved some extra programming complexity) it has been abandoned because in practice, stimuli such as InhPoissonStim are complex and it is desirable that they continue past a save/restore. We share more or less the same code for counting, writing, and reading by using subclasses of BBSS_IO. The implementation is based on what was learned from a prototype bbsavestate python module which turned out to be too slow. In particular, the association of Point_Process and its list of NetCons and queue SelfEvents needs to be kept in a hash map. NetCon order in the list is assumed to be consistent for writing and reading but srcgids are checked for consistency on reading.(note that is not a guarantee of correctness since it is possible for two NetCons to have the same source and the same target. However the Blue Brain project models at present have a one-to-one correspondence between NetCon and synapse Point_process so even the idea of a list is overdoing it.) We assume only NetCon and SelfEvent queue events need to be saved. Others that are under user control have to be managed by the user since reading will clear the queue (except for an initialized NetParEvent). In particular all cvode.event need to be re-issued. One efficiency we realize is to avoid saving the queue with regard to NetCon events and instead save the gid, spiketime information and re-issue the NetCon.send appropriately if not already delivered. On further thought, the last sentence above needs some clarification. Because of the variation in NetCon.delay, in general some spikes for a given PreSyn have already been delivered and some spikes are still on the queue. Nevertheless, it is only necessary to issue the PreSyn.send with its proper initiation time on the source machine and then do a spike exchange. On the target machine only the NetCon spikes with delivery time >= t need to be re-issued from the PreSyn.send. For this reason all the global NetCon events are resolved into a set of source PreSyn events and associated with the cell portion containing the spike generation site. This is very similar to the problem solved by nrn_fake_fire when helping implement PatternStim and to extend that for use here we only needed an extra mode (fake_out = 2) with a one line change. On the other hand, all the SelfEvents are associated with the cell portion containing the target synapse. So, associated with a Section are the point processes and PreSyn, and associated with point processes are NetCon and SelfEvent To allow Random state to be saved for POINT_PROCESS, if a POINT_PROCESS declares FUNCTION bbsavestate, that function is called when the POINT_PROCESS instance is saved and restored. Also now allow Random state to be saved for a SUFFIX (density mechanism) if it declares FUNCTION bbsavestate. Same interface. The API of FUNCTION bbsavestate has been modified to allow saving/restoring several values. FUNCTION bbsavestate takes two pointers to double arrays, xdir and xval. The first double array, xdir, has length 1 and xdir[0] is -1.0, 0.0, or 1.0 If xdir[0] == -1.0, then replace the xdir[0] with the proper number of elements of xval and return 0.0. If xdir[0] == 0.0, then save double values into the xval array (which will be sized correctly from a previous call with xdir[0] == -1.0). If xdir[0] == 1.0, then the saved double values are in xval and should be restored to their original values. The number of elements saved/restored has to be apriori known by the instance since the size of the xval that was saved is not sent to the instance on restore. For example FUNCTION bbsavestate() { bbsavestate = 0 VERBATIM double *xdir, *xval, *hoc_pgetarg(); xdir = hoc_pgetarg(1); if (*xdir == -1.) { *xdir = 2; return 0.0; } xval = hoc_pgetarg(2); if (*xdir == 0.) { xval[0] = 20.; xval[1] = 21.;} if (*xdir == 1) { printf("%d %d\n", xval[0]==20.0, xval[1] == 21.0); } ENDVERBATIM } When spike compression is used, there are only 256 time slots available for spike exchange time within an integration interval. However, during restore, we are sending the gid spike initiation time which can be earlier than the current integration interval (and therefore may have a negative slot index. To avoid this problem, we must temporarily turn off both spike and gid compression so that PreSyn::send steers to nrn2ncs_outputevent(output_index_, tt) instead of nrn_outputevent(localgid,tt) and so nrn_spike_exchange does a non-compressed exchange. We do not need to worry about bin queueing since it is the delivery time that is enqueueed and that is always in the future. When bin queueing is used, a mechanism is needed to avoid the assertion error in BinQ::enqueue (see nrncvode/sptbinq.cpp) when the enqueued event has a delivery time earlier than the binq current time. One possibility is to turn off bin queueing and force all events on the standard queue to be on binq boundaries. Another possibility is for bbsavestate to take over bin queueing in this situation. The first possibility is simpler but entails a slight loss of performance when dealing with the normally binned events on the standard queue when simulation takes up again. Let's try trapping the assertion error in BinQ::enqueue and executing a callback to bbss_early when needed. */ #include #include #include "ocfile.h" #include "nrnoc2iv.h" #include "classreg.h" #include "ndatclas.h" #include "bbsavestate.h" #include #include #include #include "tqueue.h" #include "netcon.h" #include "vrecitem.h" // on mingw, OUT became defined #undef IN #undef OUT #undef CNT extern bool nrn_use_bin_queue_; extern void (*nrn_binq_enqueue_error_handler)(double, TQItem*); static void bbss_early(double td, TQItem* tq); typedef void (*ReceiveFunc)(Point_process*, double*, double); extern "C" { #include "membfunc.h" extern int section_count; extern void nrn_shape_update(); extern Section* nrn_section_exists(char* name, int index, Object* cell); extern Section** secorder; extern ReceiveFunc* pnt_receive; extern NetCvode* net_cvode_instance; extern TQueue* net_cvode_instance_event_queue(NrnThread*); extern void clear_event_queue(); extern cTemplate** nrn_pnt_template_; extern hoc_Item* net_cvode_instance_psl(); extern PlayRecList* net_cvode_instance_prl(); extern void nrn_netcon_event(NetCon*, double); extern void net_send(void**, double*, Point_process*, double, double); extern double t; typedef void (*PFIO)(int, Object*); extern void nrn_gidout_iter(PFIO); extern short* nrn_is_artificial_; extern void nrn_fake_fire(int gid, double firetime, int fake_out); extern Object* nrn_gid2obj(int gid); extern PreSyn* nrn_gid2presyn(int gid); extern int nrn_gid_exists(int gid); #if NRNMPI extern void nrn_spike_exchange(NrnThread*); extern void nrnmpi_barrier(); extern void nrnmpi_int_alltoallv(int*, int*, int*, int*, int*, int*); extern void nrnmpi_dbl_alltoallv(double*, int*, int*, double*, int*, int*); extern int nrnmpi_int_allmax(int); extern void nrnmpi_int_allgather(int* s, int* r, int n); extern void nrnmpi_int_allgatherv(int* s, int* r, int* n, int* dspl); extern void nrnmpi_dbl_allgatherv(double* s, double* r, int* n, int* dspl); #else static void nrn_spike_exchange(NrnThread*) {} static void nrnmpi_barrier() {} static void nrnmpi_int_alltoallv(int* s, int* scnt, int* sdispl, int* r, int* rcnt, int* rdispl) { for (int i=0; i < scnt[0]; ++i) { r[i] = s[i]; } } static void nrnmpi_dbl_alltoallv(double* s, int* scnt, int* sdispl, double* r, int* rcnt, int* rdispl) { for (int i=0; i < scnt[0]; ++i) { r[i] = s[i]; } } static int nrnmpi_int_allmax(int x) { return x; } static void nrnmpi_int_allgather(int* s, int* r, int n) { for (int i=0; i < n; ++i) { r[i] = s[i]; } } static void nrnmpi_int_allgatherv(int* s, int* r, int* n, int* dspl) { for (int i=0; i < n[0]; ++i) { r[i] = s[i]; } } static void nrnmpi_dbl_allgatherv(double* s, double* r, int* n, int* dspl) { for (int i=0; i < n[0]; ++i) { r[i] = s[i]; } } #endif // NRNMPI #if BGPDMA extern int use_bgpdma_; #endif extern Point_process* ob2pntproc(Object*); extern void nrn_play_init(); extern Symlist* hoc_built_in_symlist; // turn off compression to avoid problems with presyn deliver earlier than // restore time. #if NRNMPI extern bool nrn_use_compress_; extern bool nrn_use_localgid_; #endif static bool use_spikecompress_; static bool use_gidcompress_; static int callback_mode; static void tqcallback(const TQItem* tq, int i); declarePtrList(TQItemList, TQItem) implementPtrList(TQItemList, TQItem) static TQItemList* tq_presyn_fanout; static TQItemList* tq_removal_list; #define QUEUECHECK 1 #if QUEUECHECK static void bbss_queuecheck(); #endif // API // see save_test_bin and restore_test_bin for an example of // the use of this following interface. Note in particular the // use in restore_test_bin of a prior clear_event_queue() in order // to allow bbss_buffer_counts to pass an assert during the restore // process. void* bbss_buffer_counts(int* len, int** gids, int** sizes, int* global_size); // First call to return the information needed to make the other // calls. Returns a pointer used by the other methods. // Caller is reponsible for freeing (using free() and not delete []) // the returned gids and sizes arrays // when finished. The sizes array and global_size are needed for the // caller to construct proper buffer sizes to pass to // bbss_save_global and bbss_save for filling in. The size of these // arrays is returned in *len. // They are not needed for restoring // (since the caller is passing already filled in buffers that are read // by bbss_restore_global and bbss_restore // The gids returned are base gids. It is the callers responsibility // to somehow concatenate buffers with the same gid (from different hosts) // either after save or before restore and preserve the piece count // of the number of concatenated buffers for each base gid. // Global_size will only be non_zero for host 0. void bbss_save_global(void* bbss, char* buffer, int sz); // call only on host 0 with a buffer of size equal to the // global_size returned from the bbss_buffer_counts call on host 0 // sz is the size of the buffer (for error checking only, buffer+sz is // out of bounds) void bbss_restore_global(void* bbss, char* buffer, int sz); // call on all hosts with the buffer contents returned from the call // to bbss_save_global // This must be called prior to any calls to bbss_restore // sz is the size of the buffer (error checking only) // This also does some other important restore initializations. void bbss_save(void* bbss, int gid, char* buffer, int sz); // Call this for each item of the gids from bbss_buffer_counts along with // a buffer of size from the corresponding sizes array. The buffer will // be filled in with savestate information. The gid may be the same on // different hosts, in which case it is the callers responsibility to // concatentate buffers at some point to allow calling of bbss_restore // sz is the size of the buffer (error checking only) void bbss_restore(void* bbss, int gid, int npiece, char* buffer, int sz); // Call this for each item of the gids from bbss_buffer_counts, the // number of buffers that were concatenated for the gid, and the // concatenated buffer (the concatenated buffer does NOT contain npiece // as the first value in the char* buffer pointer) // sz is the size of the buffer (error checking only) void bbss_save_done(void* bbss); // At the end of the save process, call this to cleanup. // when this call returns, bbss will be invalid. void bbss_restore_done(void* bbss); // At the end of the restore process, call this to do // some extra setting up and cleanup. // when this call returns, bbss will be invalid. }; // 0 no debug, 1 print to stdout, 2 read/write to IO file #define DEBUG 0 static int debug = DEBUG; static char dbuf[1024]; #if DEBUG == 1 #define PDEBUG printf("%s\n", dbuf) #else #define PDEBUG f->s(dbuf, 1) #endif static BBSaveState* bbss; BBSS_IO::BBSS_IO(){} static int usebin_; // 1 if using Buffer, 0 if using TxtFile class BBSS_Cnt : public BBSS_IO { public: BBSS_Cnt(); virtual ~BBSS_Cnt(); virtual void i(int& j, int chk=0); virtual void d(int n, double& p); virtual void d(int n, double* p); virtual void s(char* cp, int chk=0); virtual Type type(); int bytecnt(); int ni, nd, ns, nl; private: int bytecntbin(); int bytecntasc(); }; BBSS_Cnt::BBSS_Cnt() { ni = nd = ns = nl = 0; } BBSS_Cnt::~BBSS_Cnt() {} void BBSS_Cnt::i(int& j, int chk) { ++ni; ++nl;} void BBSS_Cnt::d(int n, double& p) { nd += n; ++nl;} void BBSS_Cnt::d(int n, double* p) { nd += n; ++nl;} void BBSS_Cnt::s(char* cp, int chk) { ns += strlen(cp) + 1; } BBSS_IO::Type BBSS_Cnt::type() {return BBSS_IO::CNT;} int BBSS_Cnt::bytecnt() { return usebin_ ? bytecntbin() : bytecntasc(); } int BBSS_Cnt::bytecntbin() { return ni*sizeof(int) + nd*sizeof(double) + ns; } int BBSS_Cnt::bytecntasc() { return ni*12 + nd*23 + ns + nl; } class BBSS_TxtFileOut : public BBSS_IO { public: BBSS_TxtFileOut(const char*); virtual ~BBSS_TxtFileOut(); virtual void i(int& j, int chk=0); virtual void d(int n, double& p); virtual void d(int n, double* p); virtual void s(char* cp, int chk=0); virtual Type type(); FILE* f; }; BBSS_TxtFileOut::BBSS_TxtFileOut(const char* fname) { f = fopen(fname, "w"); assert(f); } BBSS_TxtFileOut::~BBSS_TxtFileOut() { fclose(f); } void BBSS_TxtFileOut::i(int& j, int chk) { fprintf(f, "%12d\n", j); } void BBSS_TxtFileOut::d(int n, double& p) { d(n, &p); } void BBSS_TxtFileOut::d(int n, double* p){ for (int i=0; i < n; ++i) { fprintf(f, " %22.15g", p[i]); } fprintf(f, "\n"); } void BBSS_TxtFileOut::s(char* cp, int chk){fprintf(f, "%s\n", cp); } BBSS_IO::Type BBSS_TxtFileOut::type() {return BBSS_IO::OUT;} class BBSS_TxtFileIn : public BBSS_IO { public: BBSS_TxtFileIn(const char*); virtual ~BBSS_TxtFileIn(); virtual void i(int& j, int chk=0); virtual void d(int n, double& p) { d(n, &p); } virtual void d(int n, double* p); virtual void s(char* cp, int chk=0); virtual Type type() {return BBSS_IO::IN;} virtual void skip(int); FILE* f; }; BBSS_TxtFileIn::BBSS_TxtFileIn(const char* fname) { f = fopen(fname, "r"); assert(f); } BBSS_TxtFileIn::~BBSS_TxtFileIn() { fclose(f); } void BBSS_TxtFileIn::i(int& j, int chk) { int k; assert(fscanf(f, "%d\n", &k) == 1); if (chk) { assert (j == k); } j = k; } void BBSS_TxtFileIn::d(int n, double* p) { for (int i=0; i < n; ++i) { assert(fscanf(f, " %lf", p+i) == 1); } assert(fscanf(f, "\n") == 0); } void BBSS_TxtFileIn::s(char* cp, int chk) { char buf[100]; assert(fscanf(f, "%[^\n]\n", buf)==1); if (chk) { assert(strcmp(buf, cp) == 0); } strcpy(cp, buf); } void BBSS_TxtFileIn::skip(int n) { for (int i=0; i < n; ++i) { fgetc(f); } } class BBSS_BufferOut : public BBSS_IO { public: BBSS_BufferOut(char* buffer, int size); virtual ~BBSS_BufferOut(); virtual void i(int& j, int chk=0); virtual void d(int n, double& p); virtual void d(int n, double* p); virtual void s(char* cp, int chk=0); virtual Type type(); virtual void a(int); virtual void cpy(int size, char* cp); int sz; char* b; char* p; }; BBSS_BufferOut::BBSS_BufferOut(char* buffer, int size) { b = buffer; p = b; sz = size; } BBSS_BufferOut::~BBSS_BufferOut() {} void BBSS_BufferOut::i(int& j, int chk) {cpy(sizeof(int), (char*)(&j));} void BBSS_BufferOut::d(int n, double& d) {cpy(sizeof(double), (char*)(&d));} void BBSS_BufferOut::d(int n, double* d) {cpy(n*sizeof(double), (char*)d);} void BBSS_BufferOut::s(char* cp, int chk) {cpy(strlen(cp)+1, cp);} void BBSS_BufferOut::a(int i) { assert((p - b) + i <= sz);} BBSS_IO::Type BBSS_BufferOut::type() {return BBSS_IO::OUT;} void BBSS_BufferOut::cpy(int ns, char* cp){ a(ns); for (int ii = 0; ii < ns; ++ii) { p[ii] = cp[ii]; } p += ns; } class BBSS_BufferIn : public BBSS_BufferOut { public: BBSS_BufferIn(char* buffer, int size); virtual ~BBSS_BufferIn(); virtual void i(int& j, int chk=0); virtual void s(char* cp, int chk=0); virtual void skip(int n) { p += n; } virtual Type type(); virtual void cpy(int size, char* cp); }; BBSS_BufferIn::BBSS_BufferIn(char* buffer, int size) :BBSS_BufferOut(buffer, size) {} BBSS_BufferIn::~BBSS_BufferIn() {} void BBSS_BufferIn::i(int& j, int chk) { int k; cpy(sizeof(int), (char*)(&k)); if (chk) { assert (j == k); } j = k; } void BBSS_BufferIn::s(char* cp, int chk) { if (chk) { assert(strcmp(p, cp) == 0); } cpy(strlen(p)+1, cp); } BBSS_IO::Type BBSS_BufferIn::type() {return BBSS_IO::IN;} void BBSS_BufferIn::cpy(int ns, char* cp){ a(ns); for (int ii = 0; ii < ns; ++ii) { cp[ii] = p[ii]; } p += ns; } static void* cons(Object*) { BBSaveState* ss = new BBSaveState(); return (void*)ss; } static void destruct(void* v) { BBSaveState* ss = (BBSaveState*)v; delete ss; } static double save(void* v) { BBSaveState* ss = (BBSaveState*)v; BBSS_IO* io = new BBSS_TxtFileOut(gargstr(1)); ss->apply(io); delete io; return 1.; } static double restore(void* v) { BBSaveState* ss = (BBSaveState*)v; BBSS_IO* io = new BBSS_TxtFileIn(gargstr(1)); ss->apply(io); delete io; return 1.; } #include static double save_request(void* v) { int* gids, *sizes; Vect* gidvec = vector_arg(1); Vect* sizevec = vector_arg(2); BBSaveState* ss = (BBSaveState*)v; int len = ss->counts(&gids, &sizes); gidvec->resize(len); sizevec->resize(len); for (int i = 0; i < len; ++i) { gidvec->elem(i) = double(gids[i]); sizevec->elem(i) = double(sizes[i]); } if (len) { free(gids); free(sizes); } return double(len); } static double save_gid(void* v) { printf("save_gid not implemented\n"); return 0.; } static double restore_gid(void* v) { printf("restore_gid not implemented\n"); return 0.; } static double save_test(void* v) { int* gids, *sizes; BBSaveState* ss = (BBSaveState*)v; usebin_ = 0; if (nrnmpi_myid == 0) { // save global time BBSS_IO* io = new BBSS_TxtFileOut("out/tmp"); io->d(1, nrn_threads->_t); delete io; } int len = ss->counts(&gids, &sizes); for (int i = 0; i < len; ++i) { char fn[200]; sprintf(fn, "out/tmp.%d.%d", gids[i], nrnmpi_myid); BBSS_IO* io = new BBSS_TxtFileOut(fn); ss->f = io; ss->gidobj(gids[i]); delete io; } if (len) { free(gids); free(sizes); } return 0.; } static double save_test_bin(void* v) {//only for whole cells int len, *gids, *sizes, global_size; char* buf; char fname[100]; FILE* f; BBSaveState* ss = (BBSaveState*)v; usebin_ = 1; void* ref = bbss_buffer_counts(&len, &gids, &sizes, &global_size); if (nrnmpi_myid == 0) { // save global time buf = new char[global_size]; bbss_save_global(ref, buf, global_size); sprintf(fname, "binbufout/global.%d", global_size); assert(f = fopen(fname, "w")); fwrite(buf, sizeof(char), global_size, f); fclose(f); delete [] buf; sprintf(fname, "binbufout/global.size"); assert(f = fopen(fname, "w")); fprintf(f, "%d\n", global_size); fclose(f); } for (int i = 0; i < len; ++i) { buf = new char[sizes[i]]; bbss_save(ref, gids[i], buf, sizes[i]); sprintf(fname, "binbufout/%d.%d", gids[i], sizes[i]); assert(f = fopen(fname, "w")); fwrite(buf, sizeof(char), sizes[i], f); fclose(f); delete [] buf; sprintf(fname, "binbufout/%d.size", gids[i]); assert(f = fopen(fname, "w")); fprintf(f, "%d\n", sizes[i]); fclose(f); } if (len) { free(gids); free(sizes); } bbss_save_done(ref); return 0.; } declareNrnHash(PointProcessMap, Point_process*, int) implementNrnHash(PointProcessMap, Point_process*, int) static PointProcessMap* pp_ignore_map; static double ppignore(void* v) { if (ifarg(1)) { Point_process* pp = ob2pntproc(*(hoc_objgetarg(1))); if (!pp_ignore_map) { pp_ignore_map = new PointProcessMap(100); } (*pp_ignore_map)[pp] = 0; // naive set instead of map }else if (pp_ignore_map) { // clear delete pp_ignore_map; pp_ignore_map = 0; } return 0.; } static int ignored(Prop* p) { int i; Point_process* pp = (Point_process*)p->dparam[1]._pvoid; if (pp_ignore_map) { if (pp_ignore_map->find(pp, i)) { return 1; } } return 0; } void* bbss_buffer_counts(int* len, int** gids, int** sizes, int* global_size) { usebin_ = 1; BBSaveState* ss = new BBSaveState(); *global_size = 0; if (nrnmpi_myid == 0) { // save global time BBSS_Cnt* io = new BBSS_Cnt(); io->d(1, nrn_threads->_t); *global_size = io->bytecnt(); delete io; } *len = ss->counts(gids, sizes); return ss; } void bbss_save_global(void* bbss, char* buffer, int sz) { // call only on host 0 usebin_ = 1; BBSS_IO* io = new BBSS_BufferOut(buffer, sz); io->d(1, nrn_threads->_t); delete io; } void bbss_restore_global(void* bbss, char* buffer, int sz) { // call on all hosts usebin_ = 1; BBSS_IO* io = new BBSS_BufferIn(buffer, sz); io->d(1, nrn_threads->_t); t = nrn_threads->_t; delete io; clear_event_queue(); #if NRNMPI use_spikecompress_ = nrn_use_compress_; use_gidcompress_ = nrn_use_localgid_; nrn_use_compress_ = false; nrn_use_localgid_ = false; #endif if (nrn_use_bin_queue_) { nrn_binq_enqueue_error_handler = bbss_early; } } void bbss_save(void* bbss, int gid, char* buffer, int sz) { usebin_ = 1; BBSaveState* ss = (BBSaveState*) bbss; BBSS_IO* io = new BBSS_BufferOut(buffer, sz); ss->f = io; ss->gidobj(gid); delete io; } void bbss_restore(void* bbss, int gid, int ngroup, char* buffer, int sz) { usebin_ = 1; BBSaveState* ss = (BBSaveState*) bbss; BBSS_IO* io = new BBSS_BufferIn(buffer, sz); ss->f = io; for (int i = 0; i < ngroup; ++i) { ss->gidobj(gid); t = nrn_threads->_t; } delete io; } void bbss_save_done(void* bbss) { BBSaveState* ss = (BBSaveState*) bbss; delete ss; } static void bbss_remove_delivered() { TQueue* tq = net_cvode_instance_event_queue(nrn_threads); // PreSyn and NetCon spikes are on the queue. To determine the spikes // that have already been delivered the PreSyn items that have // NetCon delivery times < t need to get fanned out to NetCon items // on the queue before checking the times. tq_presyn_fanout = new TQItemList(100); callback_mode = 2; tq->forall_callback(tqcallback); for (int i = tq_presyn_fanout->count()-1; i >= 0; --i) { TQItem* qi = tq_presyn_fanout->item(i); double td = qi->t_; PreSyn* ps = (PreSyn*)qi->data_; tq->remove(qi); ps->fanout(td, net_cvode_instance, nrn_threads); } delete tq_presyn_fanout; // now everything on the queue which is subject to removal is a NetCon tq_removal_list = new TQItemList(100); callback_mode = 3; tq->forall_callback(tqcallback); for (int i = tq_removal_list->count()-1; i >= 0; --i) { TQItem* qi = tq_removal_list->item(i); int type = ((DiscreteEvent*)qi->data_)->type(); if (type != NetConType) { printf("%d type=%d\n", nrnmpi_myid, type); } assert(type == NetConType); tq->remove(qi); } delete tq_removal_list; } void bbss_restore_done(void* bbss) { if (bbss) { BBSaveState* ss = (BBSaveState*) bbss; delete ss; } // We did not save the NetParEvent. In fact, during // saving, the minimum delay might be different than // what is needed with this distribution and nhost. NetParEvent* npe = new NetParEvent(); npe->ithread_ = 0; npe->savestate_restore(t, net_cvode_instance); delete npe; nrn_spike_exchange(nrn_threads); #if BGPDMA // only necessary if multisend method is using two subintervals if (use_bgpdma_) { nrn_spike_exchange(nrn_threads); } #endif // The queue may now contain spikes which have already been // delivered and so those must be removed if delivery time < t. // Actually, the Presyn spikes may end up as NetCon spikes some // of which may have been already delivered and some not (due to // variations in NetCon.delay . bbss_remove_delivered(); #if NRNMPI // turn spike compression back on nrn_use_localgid_ = use_gidcompress_; nrn_use_compress_ = use_spikecompress_; #endif // compare the restored queue count for each presyn spike with the // expected undelivered NetCon count what was read from the file // for each PreSyn. This is optional due to the computational // expense but is helpful to point toward a diagnosis of errors. #if QUEUECHECK bbss_queuecheck(); #endif nrn_binq_enqueue_error_handler = 0; } static double restore_test(void* v) { usebin_ = 0; int* gids, *sizes; BBSaveState* ss = (BBSaveState*)v; // restore global time BBSS_IO* io = new BBSS_TxtFileIn("in/tmp"); io->d(1, nrn_threads->_t); t = nrn_threads->_t; delete io; clear_event_queue(); // turn off compression. Will turn back on in bbs_restore_done. #if NRNMPI use_spikecompress_ = nrn_use_compress_; use_gidcompress_ = nrn_use_localgid_; nrn_use_compress_ = false; nrn_use_localgid_ = false; #endif if (nrn_use_bin_queue_) { nrn_binq_enqueue_error_handler = bbss_early; } int len = ss->counts(&gids, &sizes); for (int i = 0; i < len; ++i) { char fn[200]; sprintf(fn, "in/tmp.%d", gids[i]); BBSS_IO* io = new BBSS_TxtFileIn(fn); ss->f = io; int ngroup; ss->f->i(ngroup); for (int j=0; j < ngroup; ++j) { ss->gidobj(gids[i]); } delete io; } if (len) { free(gids); free(sizes); } bbss_restore_done(0); return 0.; } static double restore_test_bin(void* v) { //assumes whole cells usebin_ = 1; int len, *gids, *sizes, global_size, npiece, sz; void* ref; char* buf; char fname[100]; FILE* f; clear_event_queue(); ref = bbss_buffer_counts(&len, &gids, &sizes, &global_size); sprintf(fname, "binbufin/global.size"); assert(f = fopen(fname, "r")); assert(fscanf(f, "%d\n", &sz) == 1); fclose(f); global_size = sz; buf = new char[sz]; sprintf(fname, "binbufin/global.%d", global_size); f = fopen(fname, "r"); if (!f) { printf("%d fail open for read %s\n", nrnmpi_myid, fname);} assert(f); assert(fread(buf, sizeof(char), global_size, f) == global_size); fclose(f); bbss_restore_global(ref, buf, global_size); delete [] buf; for (int i = 0; i < len; ++i) { npiece = 1; sprintf(fname, "binbufin/%d.size", gids[i]); assert(f = fopen(fname, "r")); assert(fscanf(f, "%d\n", &sz) == 1); fclose(f); //if (sz != sizes[i]) { // printf("%d note sz=%d size=%d\n", nrnmpi_myid, sz, sizes[i]); //} buf = new char[sz]; sprintf(fname, "binbufin/%d.%d", gids[i], sz); f = fopen(fname, "r"); if (!f) { printf("%d fail open for read %s\n", nrnmpi_myid,fname);} assert(f); assert(fread(buf, sizeof(char), sz, f) == sz); fclose(f); bbss_restore(ref, gids[i], npiece, buf, sz); delete [] buf; } if (len) { free(gids); free(sizes); } bbss_restore_done(ref); return 0.; } static double vector_play_init(void* v) { nrn_play_init(); return 0.; } static Member_func members[] = { // text test "save", save, "restore", restore, "save_test", save_test, "restore_test", restore_test, "save_test_bin", save_test_bin, "restore_test_bin", restore_test_bin, // binary test "save_request", save_request, "save_gid", save_gid, "restore_gid", restore_gid, // indicate which point processes are to be ignored "ignore", ppignore, // allow Vector.play to work "vector_play_init", vector_play_init, 0, 0 }; void BBSaveState_reg() { class2oc("BBSaveState", cons, destruct, members, NULL, NULL, NULL); } // from savstate.cpp struct StateStructInfo { int offset; int size; Symbol* callback; }; static StateStructInfo* ssi; static cTemplate* nct; static void ssi_def() { if (nct) { return; } Symbol* s = hoc_lookup("NetCon"); nct = s->u.ctemplate; ssi = new StateStructInfo[n_memb_func]; for (int im=0; im < n_memb_func; ++im) { ssi[im].offset = -1; ssi[im].size = 0; ssi[im].callback = 0; if (!memb_func[im].sym) { continue; } NrnProperty* np = new NrnProperty(memb_func[im].sym->name); // generally we only save STATE variables. However for // models containing a NET_RECEIVE block, we also need to // save everything except the parameters // because they often contain // logic and analytic state values. Unfortunately, it is often // the case that the ASSIGNED variables are not declared as // RANGE variables so to avoid missing state, save the whole // param array including PARAMETERs. if (pnt_receive[im]) { ssi[im].offset = 0; ssi[im].size = np->prop()->param_size; }else{ int type = STATE; for (Symbol* sym = np->first_var(); np->more_var(); sym = np->next_var()) { if (np->var_type(sym) == type || np->var_type(sym) == STATE || sym->subtype == _AMBIGUOUS) { if (ssi[im].offset < 0) { ssi[im].offset = np->prop_index(sym); } ssi[im].size += hoc_total_array_data(sym, 0); } } } if (memb_func[im].is_point) { //check for callback named bbsavestate cTemplate* ts = nrn_pnt_template_[im]; ssi[im].callback = hoc_table_lookup("bbsavestate", ts->symtable); //if (ssi[im].callback) { // printf("callback %s.%s\n", ts->sym->name, ssi[im].callback->name); //} }else{ // check for callback named bbsavestate in a density mechanism char name[256]; sprintf(name, "bbsavestate_%s", memb_func[im].sym->name); ssi[im].callback = hoc_table_lookup(name, hoc_built_in_symlist); //if (ssi[im].callback) { // printf("callback %s\n", ssi[im].callback->name); //} } delete np; } } // if we know the Point_process, we can find the NetCon // BB project never has more than one NetCon connected to a Synapse. // But that may not hold in general so extend to List of NetCon using DEList. // and assume the list is same order on save/restore. typedef struct DEList { DiscreteEvent* de; struct DEList* next; } DEList; declareNrnHash(PP2DE, Point_process*, DEList*) implementNrnHash(PP2DE, Point_process*, DEList*) static PP2DE* pp2de; // NetCon.events declareList(DblList, double) implementList(DblList, double) declareNrnHash(NetCon2DblList, NetCon*, DblList*) implementNrnHash(NetCon2DblList, NetCon*, DblList*) static NetCon2DblList* nc2dblist; class SEWrap : public DiscreteEvent { public: SEWrap(const TQItem*, DEList*); ~SEWrap(); int type() { return se->type();} SelfEvent* se; double tt; int ncindex; // in the DEList or -1 if no NetCon for self event. }; SEWrap::SEWrap(const TQItem* tq, DEList* dl) { tt = tq->t_; se = (SelfEvent*)tq->data_; if (se->weight_) { ncindex = 0; for (;dl && dl->de && dl->de->type() == NetConType; dl = dl->next, ++ncindex) { if (se->weight_ == ((NetCon*)dl->de)->weight_) { return; } } // There used to be an assert(0) here. // There is no associated NetCon (or the NetCon is being // ignored, perhaps because it is used to reactivate a // BinReportHelper after a bbsavestate restore). // In either case, we should also ignore the // SelfEvent. So send back a special ncindex sentinal value. ncindex = -2; }else{ ncindex = -1; } } SEWrap::~SEWrap() {} declarePtrList(SEWrapList, SEWrap) implementPtrList(SEWrapList, SEWrap) static SEWrapList* sewrap_list; declareNrnHash(Int2Int, int, int) implementNrnHash(Int2Int, int, int) static Int2Int* base2spgid; // base gids are the host independent key for a cell which was multisplit declareNrnHash(Int2DblList, int, DblList*) implementNrnHash(Int2DblList, int, DblList*) static Int2DblList* src2send; // gid to presyn send time map static int src2send_cnt; // the DblList was needed in place of just a double because there might // be several spikes from a single PreSyn (interval between spikes less // than the maximum NetCon delay for that PreSyn). // Given a current bug regarding dropped spikes with bin queuing as well // as the question about the proper handling of a spike with delivery // time equal to the save state time, it is useful to provide a mechanism // that allows us to assert that the number of spikes on the queue // at a save (conceptually the number of NetCon fanned out from the // PreSyn that have not yet been delivered) // is identical to the number of spikes on the queue after // a restore. To help with this, we add a count of the "to be delivered" // NetCon spikes on the queue to each PreSyn item in the saved file. // For least effort, given the need to handle counts in the same // fashion as we handle the presyn send times in the DblList, we merely // represent (ts, cnt) pairs as adjacent items in the DblList. // For saving, the undelivered netcon count is always computed. After // restore this information can be checked against the actual // netcon count on the queue by defining QUEUECHECK to 1. Note that // computing the undelivered netcon count involves: 1) each machine // processing its queue's NetCon and PreSyn spikes using tqcallback // with callback_mode 1. 2) aggregating the PreSyn counts on some // machine using scatteritems(). 3) lastly sending the total count per // PreSyn to the machine that owns the PreSyn gid (see mk_presyn_info). // This 3-fold process is reused during restore to check the counts ane // we have factored out the relevant code so it can be used for both // save and restore (for the latter see bbss_queuecheck()). #if QUEUECHECK static Int2DblList* queuecheck_gid2unc; #endif static double binq_time(double tt) { double dt = nrn_threads->_dt; return int(tt/dt + 0.5 + 1.e-10)*dt; // 0.5 due to deliver at dt/2 } static void bbss_early(double td, TQItem* tq) { int type = ((DiscreteEvent*)tq->data_)->type(); // printf("bbss_early td=%g tq->t=%g t=%g bqt=%g type=%d\n", td, tq->t_, t, binq_time(td), type); // if NetCon, discard. If PreSyn, fanout. if (type == NetConType) { return; }else if (type == PreSynType) { PreSyn* ps = (PreSyn*)tq->data_; ps->fanout(binq_time(td), net_cvode_instance, nrn_threads); }else{ assert(0); } } static void tqcallback(const TQItem* tq, int i) { int type = ((DiscreteEvent*)tq->data_)->type(); switch (callback_mode) { case 0: { // the self events if (type == SelfEventType) { Point_process* pp = ((SelfEvent*)tq->data_)->target_; DEList *dl=0, *dl1=0; SEWrap* sew = 0; if(pp2de->find(pp, dl1)) { sew = new SEWrap(tq, dl1); }else{ dl1 = 0; sew = new SEWrap(tq, 0); } if (sew->ncindex == -2) { // ignore the self event //printf("%d Ignoring a SelfEvent to %s\n", nrnmpi_myid, memb_func[pp->prop->type].sym->name); delete sew; sew = 0; } if (sew) { sewrap_list->append(sew); DEList* dl = new DEList; dl->next = 0; dl->de = sew; if (dl1) { while(dl1->next) { dl1 = dl1->next; } dl1->next = dl; }else{ (*pp2de)[pp] = dl; } } } } break; case 1: { // the NetCon (and PreSyn) events int srcid, i; double ts, tt; PreSyn* ps; int cntinc;// number on queue to be delivered due to this event NetCon* nc = 0; if (type == NetConType) { nc = (NetCon*)tq->data_; ps = nc->src_; ts = tq->t_ - nc->delay_; cntinc = 1; }else if (type == PreSynType) { ps = (PreSyn*)tq->data_; ts = tq->t_ - ps->delay_; cntinc = ps->dil_.count(); }else{ return; } if (ps) { if (ps->gid_ >= 0) { // better not be from NetCon.event srcid = ps->gid_; DblList* dl; if (src2send->find(srcid, dl)) { // If delay is long and spiking // is fast there may be // another source spike when // its previous spike is still on // the queue. So we might have // to add another initiation time. // originally there was an assert error here under the assumption that all // spikes from a PreSyn were delivered before that PreSyn fired again. // The assumption did not hold for existing Blue Brain models. Therefore // we extend the algorithm to any number of spikes with different initiation // times from the same PreSyn. // For sanity we assume Presyns do not fire more than once every 0.1 ms. // Unfortunately this possibility makes mpi exchange much more difficult as // the number of doubles exchanged can be greater than the number of src2send // gids. // Add another initiation time if needed double m = 1e9; // > .1 add int im = -1; // otherwise assert < 1e-12 for (i = 0; i < dl->count(); i+=2) { double x = fabs(dl->item(i) - ts); if (x < m) { m = x; im = i; } } if (m > 0.1) { dl->append(ts); dl->append(cntinc); }else if (m > 1e-12) { assert(0); }else{ dl->item_ref(im+1) += cntinc; } }else{ dl = new DblList(2); dl->append(ts); dl->append(cntinc); (*src2send)[srcid] = dl; ++src2send_cnt; // distinct PreSyn } }else{ // osrc state should already have been associated // with the target Point_process and we should // now associate this event as well if (ps->osrc_) { // NetStim possibly // does not matter if NetCon.event // or if the event was sent from // the local stimulus. Can't be from // a PreSyn event since we demand // that there be only one NetCon // from this stimulus. assert(nc); DblList* db = 0; if (!nc2dblist->find(nc, db)) { db = new DblList(10); (*nc2dblist)[nc] = db; } db->append(tq->t_); }else{ // assume from NetCon.event // ps should be unused_presyn //printf("From NetCon.event\n"); assert(nc); DblList* db = 0; if (!nc2dblist->find(nc, db)) { db = new DblList(10); (*nc2dblist)[nc] = db; } db->append(tq->t_); } } } } break; case 2: { // some PreSyns may get fanned out into NetCon, only // some of which have already been delivered. If this is the // case, add the q item to the fanout list. Do not put in // list if all or none have been delivered. // Actually, for simplicity, just put all the PreSyn items in // the list for fanout if PreSyn::deliver time < t. if (type == PreSynType) { PreSyn* ps = (PreSyn*)tq->data_; printf("PreSyn %d deliver %g\n", ps->gid_, tq->t_); if (tq->t_ < t) { tq_presyn_fanout->append((TQItem*)tq); } } } break; case 3: { // ??? have the ones at t been delivered or not? if (type != NetConType) { break; } if (tq->t_ == t) { printf("%d Have not decided whether to remove this event\n", nrnmpi_myid); assert(0); } double td = tq->t_; double tt = t; // td should be on bin queue boundary if (nrn_use_bin_queue_) { td = binq_time(td); tt = binq_time(tt); } if (td < tt) { //((DiscreteEvent*)tq->data_)->pr("tq_removal_list", td, net_cvode_instance); tq_removal_list->append((TQItem*)tq); } } break; } } void BBSaveState::mk_pp2de() { hoc_Item* q; assert(!pp2de); // one only or make it a field. int n = nct->count; pp2de = new PP2DE(n+1); sewrap_list = new SEWrapList(1000); ITERATE(q, nct->olist) { NetCon* nc = (NetCon*)OBJ(q)->u.this_pointer; // ignore NetCon with no PreSyn. // i.e we do not save or restore information about // NetCon.event. We do save NetCons with local NetStim source. // But that NetStim can only be the source for one NetCon. // (because its state info will be attached to the // target synapse) if (!nc->src_) { continue; } //has a gid or else only one connection assert(nc->src_->gid_ >= 0 || nc->src_->dil_.count() == 1); Point_process* pp = nc->target_; DEList* dl = new DEList; dl->de = nc; dl->next = 0; DEList* dl1; // NetCons first then SelfEvents if (pp2de->find(pp, dl1)) { while(dl1->next) { dl1 = dl1->next; } dl1->next = dl; }else{ (*pp2de)[pp] = dl; } } TQueue* tq = net_cvode_instance_event_queue(nrn_threads); callback_mode = 0; tq->forall_callback(tqcallback); } static Int2DblList* presyn_queue; static void del_presyn_info() { NrnHashIterate(Int2DblList, presyn_queue, DblList*, dl) { delete dl; }}} delete presyn_queue; presyn_queue = 0; if (nc2dblist) { NrnHashIterate(NetCon2DblList, nc2dblist, DblList*, dl) { delete dl; }}} delete nc2dblist; nc2dblist = 0; } } void BBSaveState::del_pp2de() { DEList* dl, *dl1; if (!pp2de) { return; } NrnHashIterate(PP2DE, pp2de, DEList*, dl) { for (; dl; dl = dl1) { dl1 = dl->next; // need to delete SEWrap items but dl->de that // are not SEWrap may already be deleted. // Hence the extra sewrap_list and items are // deleted below. delete dl; } }}} delete pp2de; pp2de = 0; if (sewrap_list) { for (int i=0; i < sewrap_list->count(); ++i) { delete sewrap_list->item(i); } delete sewrap_list; sewrap_list = NULL; } del_presyn_info(); } BBSaveState::BBSaveState(){ if (!ssi) { ssi_def(); } } BBSaveState::~BBSaveState(){ if (pp2de) { del_pp2de(); } } void BBSaveState::apply(BBSS_IO* io) { f = io; bbss = this; core(); }; void BBSaveState::core() { if (debug) { sprintf(dbuf, "Enter core()"); PDEBUG; } char buf[100]; sprintf(buf, "//core"); f->s(buf, 1); init(); gids(); finish(); if (debug) { sprintf(dbuf, "Leave core()"); PDEBUG; } } void BBSaveState::init() { mk_base2spgid(); mk_pp2de(); mk_presyn_info(); } void BBSaveState::finish() { del_pp2de(); del_presyn_info(); if (base2spgid) { delete base2spgid; base2spgid = 0; } if (f->type() == BBSS_IO::IN) { nrn_spike_exchange(nrn_threads); } } static void base2spgid_item(int spgid, Object* obj) { int base = spgid % 10000000; int sp; if (spgid == base || !base2spgid->find(base, sp)) { (*base2spgid)[base] = spgid; } } void BBSaveState::mk_base2spgid() { if (base2spgid) { delete base2spgid; } base2spgid = new Int2Int(1000); nrn_gidout_iter(&base2spgid_item); } // c++ blue brain write interface in two phases. First return to bb what is // needed for each gid and then get from bb a series of gid, buffer // pairs to write the buffer. The read interface only requires a single // phase where we receive from bb a series of gid, buffer pairs for // reading. However a final step is required to transfer PreSyn spikes by // calling BBSaveState:finish(). // first phase for writing // the caller is responsible for free(*gids) and free(*cnts) // when finished with them. int BBSaveState::counts(int** gids, int** cnts) { f = new BBSS_Cnt(); BBSS_Cnt* c = (BBSS_Cnt*)f; bbss = this; init(); // how many int gidcnt = 0; NrnHashIterateKeyValue(Int2Int, base2spgid, int, base, int, spgid) { ++gidcnt; }}} if (gidcnt) { // using malloc instead of new as we might need to // deallocate from c code (of mod files) *gids = (int *) malloc(gidcnt * sizeof(int)); *cnts = (int *) malloc(gidcnt * sizeof(int)); if(*gids==NULL || *cnts==NULL) { printf("Error : Memory allocation failure in BBSaveState\n"); #if NRNMPI nrnmpi_abort(-1); #else abort(); #endif } } gidcnt = 0; NrnHashIterateKeyValue(Int2Int, base2spgid, int, base, int, spgid) { (*gids)[gidcnt] = base; c->ni = c->nd = c->ns = c->nl = 0; Object* obj = nrn_gid2obj(spgid); gidobj(spgid, obj); (*cnts)[gidcnt] = c->bytecnt(); ++gidcnt; }}} delete f; return gidcnt; } // note that a cell on a processor consists of any number of // pieces of a whole cell and each piece has its own spgid // (see nrn/share/lib/hoc/binfo.hoc) The piece with the output port // has spgid == basegid with a PreSyn.output_index_ = basegid // and the others have a PreSyn.output_index_ = -2 // in all cases the PreSyn.gid_ = spgid. (see netpar.cpp BBS::cell()) // Note that binfo.hoc provides base_gid(spgid) which is spgid%msgid // where msgid is typically 1e7 if the maximum basegid is less than that. // thishost_gid(basegid) returns the minimum spgid // of the pieces for the cell on thishost. It would be great if we // did not have to use the value of msgid. How could we safely derive it? // In general, different models invent different mappings between basegid // and msgid so ultimately (if not restricted to Blue Brain usage) // it is necessary to supply a user defined hoc (or python) callback // to compute base_gid(spgid). Then the writer and reader can create // a map of basegid to cell and use only basegid (never reading or writing // the spgid). If there is no basegid callback then we presume there // are no split cells. // a gid item for second phase of writing void BBSaveState::gid2buffer(int gid, char* buffer, int size) { if (f) { delete f; } f = new BBSS_BufferOut(buffer, size); Object* obj = nrn_gid2obj(gid); gidobj(gid, obj); delete f; f = 0; } // a gid item for first phase of reading void BBSaveState::buffer2gid(int gid, char* buffer, int size) { if (f) { delete f; } f = new BBSS_BufferIn(buffer, size); Object* obj = nrn_gid2obj(gid); gidobj(gid, obj); delete f; f = 0; } static void cb_gidobj(int gid, Object* obj) { bbss->gidobj(gid, obj); } void BBSaveState::gids() { if (debug) { sprintf(dbuf, "Enter gids()"); PDEBUG; } nrn_gidout_iter(&cb_gidobj); if (debug) { sprintf(dbuf, "Leave gids()"); PDEBUG; } } void BBSaveState::gidobj(int basegid) { int spgid; Object* obj; assert(base2spgid->find(basegid, spgid)); obj = nrn_gid2obj(spgid); gidobj(spgid, obj); } void BBSaveState::gidobj(int gid, Object* obj) { char buf[256]; int rgid = gid; if (debug) { sprintf(dbuf, "Enter gidobj(%d, %s)", gid, hoc_object_name(obj)); PDEBUG; } sprintf(buf, "begin cell"); f->s(buf, 1); f->i(rgid); //on reading, we promptly ignore rgid from now on, stick with gid int size = cellsize(obj); f->i(size); cell(obj); possible_presyn(gid); sprintf(buf, "end cell"); f->s(buf, 1); if (debug) { sprintf(dbuf, "Leave gidobj(%d, %s)", gid, hoc_object_name(obj)); PDEBUG; } } int BBSaveState::cellsize(Object* c){ if (debug) { sprintf(dbuf, "Enter cellsize(%s)", hoc_object_name(c)); PDEBUG; } int cnt = -1; if (f->type() == BBSS_IO::OUT) { BBSS_IO* sav = f; f = new BBSS_Cnt(); cell(c); cnt = ((BBSS_Cnt*)f)->bytecnt(); delete f; f = sav; } if (debug) { sprintf(dbuf, "Leave cellsize(%s)", hoc_object_name(c)); PDEBUG; } return cnt; } // Here is the major place where there is a symmetry break between writing // and reading. That is because of the possibility of splitting where // not only the pieces are distributed differently between saving and restoring // processors but the pieces themselves (as well as the piece gids) // are different. It is only the union of pieces that describes a complete cell. // Symmetry exists again at the section level // For writing the cell is defined as the existing set of pieces in the hoc // cell Object. Here is cell we write enough prefix info about the Section // to be able to determine if it exists before reading with section(sec); void BBSaveState::cell(Object* c) { if (debug) { sprintf(dbuf, "Enter cell(%s)", hoc_object_name(c)); PDEBUG; } char buf[256]; sprintf(buf, "%s", hoc_object_name(c)); f->s(buf); if (!is_point_process(c)) { // must be cell object if (f->type() != BBSS_IO::IN) { // writing, counting // from forall_section in cabcode.c // count, and iterate from first to last hoc_Item* qsec, *first, *last; qsec = c->secelm_; int cnt = 0; Section* sec; for (first = qsec; first->itemtype && hocSEC(first)->prop->dparam[6].obj == c; first = first->prev) { sec = hocSEC(first); if (sec->prop) { ++cnt; } } first = first->next; last = qsec->next; f->i(cnt); for (qsec = first; qsec != last; qsec = qsec->next) { Section* sec = hocSEC(qsec); if (sec->prop) { // the section exists sprintf(buf, "begin section"); f->s(buf); section_exist_info(sec); section(sec); sprintf(buf, "end section"); f->s(buf); } } }else{ // reading Section* sec; int i, cnt, indx, size; f->i(cnt); for (i=0; i < cnt; ++i) { sprintf(buf, "begin section"); f->s(buf, 1); f->s(buf); // the section name f->i(indx); // section array index f->i(size); sec = nrn_section_exists(buf, indx, c); if (sec) { section(sec); }else{ // skip size bytes f->skip(size); } sprintf(buf, "end section"); f->s(buf, 1); } } }else{ // ARTIFICIAL_CELL Point_process* pnt = ob2pntproc(c); mech(pnt->prop); } if (debug) { sprintf(dbuf, "Leave cell(%s)", hoc_object_name(c)); PDEBUG; } } void BBSaveState::section_exist_info(Section* sec) { char buf[256]; Symbol* sym = sec->prop->dparam[0].sym; sprintf(buf, "%s", sym->name); f->s(buf); int indx = sec->prop->dparam[5].i; f->i(indx); int size = sectionsize(sec); f->i(size, 1); } void BBSaveState::section(Section* sec) { if (debug) { sprintf(dbuf, "Enter section(%s)", sec->prop->dparam[0].sym->name); PDEBUG; } // section_exist_info(sec); seccontents(sec); if (debug) { sprintf(dbuf, "Leave section(%s)", sec->prop->dparam[0].sym->name); PDEBUG; } } int BBSaveState::sectionsize(Section* sec) { if (debug == 1) { sprintf(dbuf, "Enter sectionsize(%s)", sec->prop->dparam[0].sym->name); PDEBUG; } // should be same for both IN and OUT int cnt = -1; if (f->type() != BBSS_IO::CNT) { BBSS_IO* sav = f; f = new BBSS_Cnt(); seccontents(sec); cnt = ((BBSS_Cnt*)f)->bytecnt(); delete f; f = sav; } if (debug == 1) { sprintf(dbuf, "Leave sectionsize(%s)", sec->prop->dparam[0].sym->name); PDEBUG; } return cnt; } void BBSaveState::seccontents(Section* sec) { if (debug) { sprintf(dbuf, "Enter seccontents(%s)", sec->prop->dparam[0].sym->name); PDEBUG; } int i, nseg; char buf[100]; sprintf(buf, "//contents"); f->s(buf); nseg = sec->nnode-1; f->i(nseg, 1); for (i=0; i < nseg; ++i) { node(sec->pnode[i]); } node01(sec, sec->parentnode); node01(sec, sec->pnode[nseg]); if (debug) { sprintf(dbuf, "Leave seccontents(%s)", sec->prop->dparam[0].sym->name); PDEBUG; } } // all Point_process and mechanisms -- except IGNORE point process instances void BBSaveState::node(Node* nd) { if (debug) { sprintf(dbuf, "Enter node(nd)"); PDEBUG; } int i; Prop* p; f->d(1, NODEV(nd)); //count // On restore, new point processes may have been inserted in // the section and marked IGNORE. So we need to count only the // non-ignored. for (i=0, p = nd->prop; p; p = p->next) { if (p->type > 3) { if (memb_func[p->type].is_point) { if (!ignored(p)) { ++i; } }else{ // density mechanism ++i; } } } f->i(i, 1); for (p = nd->prop; p; p = p->next) { if (p->type > 3) { mech(p); } } if (debug) { sprintf(dbuf, "Leave node(nd)"); PDEBUG; } } // only Point_process that belong to Section void BBSaveState::node01(Section* sec, Node* nd) { if (debug) { sprintf(dbuf, "Enter node01(sec, nd)"); PDEBUG; } int i; Prop* p; // It is not clear why the zero area node voltages need to be saved. // Without them, we get correct simulations after a restore for // whole cells but not for split cells. f->d(1, NODEV(nd)); //count for (i=0, p = nd->prop; p; p = p->next) { if (memb_func[p->type].is_point) { Point_process* pp = (Point_process*)p->dparam[1]._pvoid; if (pp->sec == sec) { if (!ignored(p)) { ++i; } } } } f->i(i, 1); for (p = nd->prop; p; p = p->next) { if (memb_func[p->type].is_point) { Point_process* pp = (Point_process*)p->dparam[1]._pvoid; if (pp->sec == sec) { mech(p); } } } if (debug) { sprintf(dbuf, "Leave node01(sec, nd)"); PDEBUG; } } void BBSaveState::mech(Prop* p) { if (debug) { sprintf(dbuf, "Enter mech(prop type %d)", p->type); PDEBUG; } int type = p->type; if (memb_func[type].is_point && ignored(p)) { return; } f->i(type, 1); char buf[100]; sprintf(buf, "//%s", memb_func[type].sym->name); f->s(buf, 1); f->d(ssi[p->type].size, p->param + ssi[p->type].offset); Point_process* pp = 0; if (memb_func[p->type].is_point) { pp = (Point_process*)p->dparam[1]._pvoid; if (pnt_receive[p->type]) { // associated NetCon and queue SelfEvent // if the NetCon has a unique non-gid source (art cell) // that source is save/restored as well. netrecv_pp(pp); } } if (ssi[p->type].callback) { // model author dependent info // the POINT_PROCESS or SUFFIX has a bbsavestate function sprintf(buf, "callback"); f->s(buf, 1); int narg = 2; double xdir = -1.0; // -1 size, 0 save, 1 restore double* xval = NULL; // returned for save, sent for restore. hoc_pushpx(&xdir); hoc_pushpx(xval); if (memb_func[p->type].is_point) { hoc_call_ob_proc(pp->ob, ssi[p->type].callback, narg); double d = hoc_xpop(); }else{ double d = nrn_call_mech_func(ssi[p->type].callback, narg, p, p->type); } int sz = int(xdir); xval = new double[sz]; hoc_pushpx(&xdir); hoc_pushpx(xval); if (f->type() == BBSS_IO::IN) { // restore xdir = 1.; f->d(sz, xval); if (memb_func[p->type].is_point) { hoc_call_ob_proc(pp->ob, ssi[p->type].callback, narg); double d = hoc_xpop(); }else{ double d = nrn_call_mech_func(ssi[p->type].callback, narg, p, p->type); } }else{ xdir = 0.; if (memb_func[p->type].is_point) { hoc_call_ob_proc(pp->ob, ssi[p->type].callback, narg); double d = hoc_xpop(); }else{ double d = nrn_call_mech_func(ssi[p->type].callback, narg, p, p->type); } f->d(sz, xval); } delete [] xval; } if (debug) { sprintf(dbuf, "Leave mech(prop type %d)", p->type); PDEBUG; } } void BBSaveState::netrecv_pp(Point_process* pp) { if (debug) { sprintf(dbuf, "Enter netrecv_pp(pp prop type %d)", pp->prop->type); PDEBUG; } char buf[1000]; sprintf(buf, "%s", hoc_object_name(pp->ob)); f->s(buf); int type = pp->prop->type; // associated NetCon, and queue SelfEvent DEList* dl, *dl1; if (!pp2de->find(pp, dl)) {dl = 0;} int cnt = 0; // dl has the NetCons first then the SelfEvents // NetCon for (cnt = 0, dl1 = dl; dl1 && dl1->de->type() == NetConType; dl1 = dl1->next) { ++cnt; } f->i(cnt, 1); sprintf(buf, "NetCon"); f->s(buf, 1); for (; dl && dl->de->type() == NetConType; dl = dl->next) { NetCon* nc = (NetCon*)dl->de; f->d(nc->cnt_, nc->weight_); if (f->type() != BBSS_IO::IN) { // writing, counting DblList* db = 0; int j = 0; if (nc2dblist && nc2dblist->find(nc, db)) { j = db->count(); f->i(j); for (int i = 0; i < j; ++i) { double x = db->item(i); f->d(1, x); } }else{ f->i(j); } int has_stim = 0; if (nc->src_ && nc->src_->osrc_ && nc->src_->gid_ < 0) { // save the associated local stimulus has_stim = 1; f->i(has_stim, 1); Point_process* pp = ob2pntproc(nc->src_->osrc_); mech(pp->prop); }else{ f->i(has_stim, 1); } }else{ // reading int j = 0; f->i(j); for (int i = 0; i < j; ++i) { double x; f->d(1, x); nrn_netcon_event(nc, x); } int has_stim = 0; f->i(has_stim); if (has_stim) { assert((nc->src_ && nc->src_->osrc_ && nc->src_->gid_ < 0) == has_stim); Point_process* pp = ob2pntproc(nc->src_->osrc_); mech(pp->prop); } } } for (cnt = 0, dl1 = dl; dl1 && dl1->de->type() == SelfEventType; dl1 = dl1->next) { ++cnt; } f->i(cnt); // SelfEvent existence depends on state and for reading the queue // is empty. So count and save is different from restore if (f->type() != BBSS_IO::IN) { for (; dl && dl->de->type() == SelfEventType; dl = dl->next) { SEWrap* sew = (SEWrap*)dl->de; sprintf(buf, "SelfEvent"); f->s(buf); f->d(1, sew->se->flag_); f->d(1, sew->tt); f->i(sew->ncindex); int moff = -1; if (sew->se->movable_) { moff = (Datum*)(sew->se->movable_) - pp->prop->dparam; } f->i(moff); } }else{ // restore for (int i=0; i < cnt; ++i) { int ncindex, moff; double flag, tt, *w; f->s(buf); f->d(1, flag); f->d(1, tt); f->i(ncindex); f->i(moff); void** movable = 0; if(moff >= 0) { movable = &(pp->prop->dparam[moff]._pvoid); } if (ncindex == -1) { w = 0; }else{ int j; for (j=0, dl1 = dl; j < ncindex; ++j, dl1 = dl1->next) { ; } assert(dl1 && dl1->de->type() == NetConType); w = ((NetCon*)dl1->de)->weight_; } net_send(movable, w, pp, tt, flag); } } if (debug) { sprintf(dbuf, "Leave netrecv_pp(pp prop type %d)", pp->prop->type); PDEBUG; } } static int giddest_size; static int* giddest; static int* tsdest_cnts; static double* tsdest; // input scnt, sdipl ; output rcnt, rdispl static void all2allv_helper(int* scnt, int* sdispl, int* rcnt, int* rdispl) { int i; int np = nrnmpi_numprocs; int* c = new int[np]; rdispl[0] = 0; for (i=0; i < np; ++i) { c[i] = 1; rdispl[i+1] = rdispl[i] + c[i]; } nrnmpi_int_alltoallv(scnt, c, rdispl, rcnt, c, rdispl); delete [] c; rdispl[0] = 0; for (i=0; i < np; ++i) { rdispl[i+1] = rdispl[i] + rcnt[i]; } } static void all2allv_int2(int* scnt, int* sdispl, int* gidsrc, int* ndsrc) { #if NRNMPI int i; int np = nrnmpi_numprocs; int* rcnt = new int[np]; int* rdispl = new int[np+1]; all2allv_helper(scnt, sdispl, rcnt, rdispl); giddest = 0; tsdest_cnts = 0; giddest_size = rdispl[np]; if (giddest_size) { giddest = new int[giddest_size]; tsdest_cnts = new int[giddest_size]; } nrnmpi_int_alltoallv(gidsrc, scnt, sdispl, giddest, rcnt, rdispl); nrnmpi_int_alltoallv(ndsrc, scnt, sdispl, tsdest_cnts, rcnt, rdispl); delete [] rcnt; delete [] rdispl; #else assert(0); #endif } static void all2allv_dbl1(int* scnt, int* sdispl, double* tssrc) { #if NRNMPI int i, size; int np = nrnmpi_numprocs; int* rcnt = new int[np]; int* rdispl = new int[np+1]; all2allv_helper(scnt, sdispl, rcnt, rdispl); tsdest = 0; size = rdispl[np]; if (size) { tsdest = new double[size]; } nrnmpi_dbl_alltoallv(tssrc, scnt, sdispl, tsdest, rcnt, rdispl); delete [] rcnt; delete [] rdispl; #else assert(0); #endif } static void scatteritems() { // since gid queue items with the same gid are scattered on // many processors, we send all the gid,tscnt pairs (and tslists // with undelivered NetCon counts) // to the round-robin host (we do not know the gid owner host yet). int i, gid, host; DblList* dl; src2send_cnt = 0; src2send = new Int2DblList(1000); TQueue* tq = net_cvode_instance_event_queue(nrn_threads); // if event on queue at t we will not be able to decide whether or // not it should be delivered during restore. // The assert was moved into mk_presyn_info since this function is // reused by bbss_queuecheck and the error in that context will // be analyzed there. // assert(tq->least_t() > nrn_threads->_t); callback_mode = 1; tq->forall_callback(tqcallback); // space inefficient but simple support analogous to pc.all2all int* gidsrc = 0; int* ndsrc = 0; // count for each DblList, parallel to gidsrc double* tssrc = 0; // all the doubles (and undelivered NetCon counts) in every DblList if (src2send_cnt) { int ndsrctotal = 0; gidsrc = new int[src2send_cnt]; ndsrc = new int[src2send_cnt]; NrnHashIterateKeyValue(Int2DblList, src2send, int, gid, DblList*, dl) { ndsrctotal += dl->count(); }}} tssrc = new double[ndsrctotal]; } int* off = new int[nrnmpi_numprocs+1]; // offsets for gidsrc and ndsrc int* cnts = new int[nrnmpi_numprocs]; // dest host counts for gidsrc and ndsrc int* doff = new int[nrnmpi_numprocs+1]; // offsets for doubles int* dcnts = new int[nrnmpi_numprocs+1]; // dest counts of the doubles for (i=0; i < nrnmpi_numprocs; ++i) { cnts[i] = 0; dcnts[i] = 0; } // counts to send to each destination rank NrnHashIterateKeyValue(Int2DblList, src2send, int, gid, DblList*, dl) { int host = gid%nrnmpi_numprocs; ++cnts[host]; dcnts[host] += dl->count(); }}} // offsets off[0] = 0; doff[0] = 0; for (i=0; i < nrnmpi_numprocs; ++i) { off[i+1] = off[i] + cnts[i]; doff[i+1] = doff[i] + dcnts[i]; } // what to send to each destination. Note dcnts and ndsrc are NOT the same. for (i=0; i < nrnmpi_numprocs; ++i) { cnts[i] = 0; dcnts[i] = 0; } NrnHashIterateKeyValue(Int2DblList, src2send, int, gid, DblList*, dl) { host = gid%nrnmpi_numprocs; gidsrc[off[host] + cnts[host]] = gid; ndsrc[off[host] + cnts[host]++] = dl->count(); for (i=0; i < dl->count(); ++i) { tssrc[doff[host] + dcnts[host]++] = dl->item(i); } }}} NrnHashIterateKeyValue(Int2DblList, src2send, int, gid, DblList*, dl) { delete dl; }}} delete src2send; if (nrnmpi_numprocs > 1) { all2allv_int2(cnts, off, gidsrc, ndsrc); all2allv_dbl1(dcnts, doff, tssrc); if (gidsrc) { delete [] gidsrc; delete [] ndsrc; delete [] tssrc; } }else{ giddest_size = cnts[0]; giddest = gidsrc; tsdest_cnts = ndsrc; tsdest = tssrc; } delete [] cnts; delete [] off; delete [] dcnts; delete [] doff; } static void allgatherv_helper(int cnt, int* rcnt, int* rdspl) { nrnmpi_int_allgather(&cnt, rcnt, 1); rdspl[0] = 0; for (int i=0; i < nrnmpi_numprocs; ++i) { rdspl[i+1] = rdspl[i] + rcnt[i]; } } static void spikes_on_correct_host(int cnt, int* g, int* dcnts, int tscnt, double* ts, Int2DblList* m) { // tscnt is the sum of the dcnts. // i.e. the send times and undelivered NetCon counts. int i, rsize, *rg=NULL, *rtscnts=NULL; double *rts=NULL; // not at all space efficient if (nrnmpi_numprocs > 1) { int* cnts = new int[nrnmpi_numprocs]; int* dspl = new int[nrnmpi_numprocs+1]; allgatherv_helper(cnt, cnts, dspl); rsize = dspl[nrnmpi_numprocs]; if (rsize) { rg = new int[rsize]; rtscnts = new int[rsize]; } nrnmpi_int_allgatherv(g, rg, cnts, dspl); nrnmpi_int_allgatherv(dcnts, rtscnts, cnts, dspl); allgatherv_helper(tscnt, cnts, dspl); rts = new double[dspl[nrnmpi_numprocs]]; nrnmpi_dbl_allgatherv(ts, rts, cnts, dspl); delete [] cnts; delete [] dspl; }else{ rsize = cnt; rg = g; rtscnts = dcnts; rts = ts; } int tsoff = 0; for (i = 0; i < rsize; ++i) { if (nrn_gid_exists(rg[i])) { DblList* dl = new DblList(rtscnts[i]); (*m)[rg[i]] = dl; for (int j=0; j < rtscnts[i]; ++j) { dl->append(rts[tsoff + j]); } } tsoff += rtscnts[i]; } if (nrnmpi_numprocs > 1) { if(rg) delete [] rg; if(rtscnts) delete [] rtscnts; if(rts) delete [] rts; } } static void construct_presyn_queue() { // almost all the old mk_presyn_info factored into here since // a presyn_queue is optionally needed for check_queue() // note that undelivered netcon count is interleaved with tsend // in the DblList of the Int2DblList int gid, tscnt, i; double ts, tt; DblList* dl; if (presyn_queue) { del_presyn_info(); } nc2dblist = new NetCon2DblList(20); scatteritems(); int cnt = giddest_size; Int2DblList* m = new Int2DblList(cnt+1); int mcnt = 0; int mdcnt = 0; int its = 0; for (i=0; i < cnt; ++i) { int gid = giddest[i]; tscnt = tsdest_cnts[i]; if (m->find(gid, dl)) { // in the days when there could only be one // initiation time for a gid. //assert( fabs(tt - ts) < 1e-12 ); }else{ dl = new DblList(2); (*m)[gid] = dl; ++mcnt; } // add the initiation time(s) if they are unique ( > .1) // and also accumulate the undelivered netcon counts // otherwise assert if not identical ( > 1e-12) for (int k = 0; k < tscnt; k += 2) { double t1 = tsdest[its++]; int inccnt = tsdest[its++]; int add = 1; // can't hurt to test the ones just added // no thought given to efficiency // Actually, need to test to accumulate for (int j=0; j < dl->count(); j += 2) { double t2 = dl->item(j); double dt = fabs(dl->item(j) - t1); if (dt < 1e-12) { dl->item_ref(j+1) += inccnt; add = 0; break; }else if (dt < .1) { assert(0); } } if (add) { dl->append(t1); dl->append(inccnt); mdcnt += 2; } } } if (giddest) { delete [] giddest; delete [] tsdest_cnts; delete [] tsdest; } // each host now has a portion of the (gid, ts) spike pairs // (Actually (gid, list of (ts, undelivered NetCon count)) map.) // but the pairs are not on the hosts that own the gid. // The major thing that is accomplished so far is that the // up to thousands of Netcon events on the queues of thousands // of host are now a single PreSyn event on a single host. // We could save them all in separate area and read them all // and send only when a host owns the gid, but we wish // to keep the spike sent info with the cell info for the gid. // We next need to do something analogous to the allgather send // so each host can examine every spike and pick out the ones // which were sent from that host. That becomes the true // presyn_queue map. int* gidsrc = 0; int* tssrc_cnt = 0; double* tssrc = 0; if (mcnt) { gidsrc = new int[mcnt]; tssrc_cnt = new int[mcnt]; tssrc = new double[mdcnt]; } mcnt = 0; mdcnt = 0; NrnHashIterateKeyValue(Int2DblList, m, int, gid, DblList*, dl) { gidsrc[mcnt] = gid; tssrc_cnt[mcnt] = dl->count(); for (int i=0; i < dl->count(); ++i) { tssrc[mdcnt++] = dl->item(i); } ++mcnt; delete dl; }}} delete m; presyn_queue = m = new Int2DblList(127); spikes_on_correct_host(mcnt, gidsrc, tssrc_cnt, mdcnt, tssrc, m); if (gidsrc) { delete [] gidsrc; delete [] tssrc_cnt; delete [] tssrc; } } void BBSaveState::mk_presyn_info() { //also the NetCon* to tdelivery map if (f->type() != BBSS_IO::IN) { //only when saving or counting // if event on queue at t we will not be able to decide // whether or not it should be delivered during restore. TQueue* tq = net_cvode_instance_event_queue(nrn_threads); TQItem* tqi = tq->least(); int dtype = tqi?((DiscreteEvent*)(tqi->data_))->type():0; assert(tq->least_t() > nrn_threads->_t || dtype==NetParEventType); construct_presyn_queue(); } } void BBSaveState::possible_presyn(int gid) { if (debug) { sprintf(dbuf, "Enter possible_presyn()"); PDEBUG; } char buf[100]; int i; double ts; // first the presyn state associated with this gid if (nrn_gid_exists(gid) < 2) { if (f->type() == BBSS_IO::IN) { // if reading then skip what was written i = 0; f->i(i); if (i == 1) { // skip state int j; double x; sprintf(buf, "PreSyn"); f->s(buf, 1); f->i(j); f->d(1, x); } }else{ i = -1; f->i(i); } }else{ PreSyn* ps = nrn_gid2presyn(gid); i = (ps->ssrc_ != 0 ? 1 : -1); // does it have state f->i(i, 1); int output_index = ps->output_index_; f->i(output_index); if (output_index >= 0 && i == 1) { sprintf(buf, "PreSyn"); f->s(buf, 1); int j = (ps->flag_ ? 1 : 0); double th = ps->valthresh_; f->i(j); f->d(1, th ); if( ps->output_index_ >= 0 ) { ps->flag_ = j; ps->valthresh_ = th; } #if 0 f->d(1, ps->valold_); f->d(1, ps->told_); // ps->qthresh_ handling unimplemented but would not be needed // unless cvode.condition_order(2) when cvode active. #endif } } // next the possibility that a spike derived from this presyn // is on the queue. if (f->type() != BBSS_IO::IN) { //save or count DblList* dl; if (presyn_queue->find(gid, dl)) { f->i(gid); i = dl->count(); // ts and undelivered netcon counts f->i(i); for (i=0; i < dl->count(); i += 2) { ts = dl->item(i); f->d(1, ts); int unc = dl->item(i+1); f->i(unc); } }else{ i = -1; f->i(i); } }else{ // restore f->i(i); // gid if (i >= 0) { int cnt, unc; //assert (gid == i); if( gid == i ) { f->i(cnt); // both the ts and undelivered netcon counts //while re-issuing the PreSyn send, we do not want //any spike recording to take place. So, what are //the current Vector sizes, if used, so we can put //them back. This presumes we are recording only //from PreSyn with an output_gid. #if 1 // if set to 0 comment out asserts below // The only reason we save here is to allow a // assertion test when restoring the original // record vector size. int sz1 = -1; int sz2 = -1; PreSyn* ps = nrn_gid2presyn(gid); if (ps->tvec_) { sz1 = ps->tvec_->capacity(); } if (ps->idvec_) { sz2 = ps->idvec_->capacity(); } #endif #if QUEUECHECK // map from gid to unc for later checking if (!queuecheck_gid2unc) { queuecheck_gid2unc = new Int2DblList(1000); } DblList* dl = new DblList(cnt); (*queuecheck_gid2unc)[i] = dl; #endif for (int j=0; j< cnt; j += 2) { f->d(1, ts); if (nrn_use_bin_queue_ == 1) { ts = binq_time(ts); } f->i(unc); // expected undelivered NetCon count nrn_fake_fire(gid, ts, 2); // only owned by this #if QUEUECHECK dl->append(ts); dl->append(unc); #endif } // restore spike record sizes. if (ps->tvec_) { int sz = ps->tvec_->capacity() - cnt/2; assert(sz == sz1); ps->tvec_->resize(sz); } if (ps->idvec_) { int sz = ps->idvec_->capacity() - cnt/2; assert(sz == sz2); ps->idvec_->resize(sz); } } else { //skip -> file has undelivered spikes, but this is not the cell that deals with them f->i(cnt); for (int j=0; j< cnt; j += 2) { f->d(1, ts); f->i(unc); } } } } if (debug) { sprintf(dbuf, "Leave possible_presyn()"); PDEBUG; } } #if QUEUECHECK static void bbss_queuecheck() { construct_presyn_queue(); NrnHashIterateKeyValue(Int2DblList, queuecheck_gid2unc, int, gid, DblList*, dl) { DblList* dl2; if (presyn_queue->find(gid, dl2)) { if (dl->count() == dl2->count()) { for (int i=0; i < dl->count(); i += 2) { if ((fabs(dl->item(i) - dl2->item(i)) > 1e-12) || dl->item(i+1) != dl2->item(i+1)) { printf("error: gid=%d expect t=%g %d but queue contains t=%g %d tdiff=%g\n", gid, dl->item(i), int(dl->item(i+1)), dl2->item(i), int(dl2->item(i+1)), dl->item(i) - dl2->item(i)); } } }else{ printf("error: gid=%d distinct delivery times, expect %ld, actual %ld\n", gid, dl->count()/2, dl2->count()/2); } }else{ printf("error: gid=%d expect spikes but none on queue\n", gid); for (int i=0; i < dl->count()-1; i += 2) { printf(" %g %d", dl->item(i), int(dl->item(i+1))); } printf("\n"); } }}} NrnHashIterateKeyValue(Int2DblList, presyn_queue, int, gid, DblList*, dl2) { DblList* dl; if (!presyn_queue->find(gid, dl)) { printf("error: gid=%d expect no spikes but some on queue\n", gid); for (int i=0; i < dl2->count()-1; i += 2) { printf(" %g %d", dl->item(i), int(dl->item(i+1))); } printf("\n"); } }}} #if 0 printf("undelivered netcons\n"); NrnHashIterateKeyValue(Int2DblList, queuecheck_gid2unc, int, gid, DblList*, dl) { printf("%d", gid); for (int i=0; i < dl->count()-1; i += 2) { printf(" %g %d", dl->item(i), int(dl->item(i+1))); } printf("\n"); }}} #endif #if 0 printf("presyn_queue\n"); NrnHashIterateKeyValue(Int2DblList, presyn_queue, int, gid, DblList*, dl) { printf("%d", gid); for (int i=0; i < dl->count()-1; i += 2) { printf(" %g %d", dl->item(i), int(dl->item(i+1))); } printf("\n"); }}} #endif //cleanup NrnHashIterateKeyValue(Int2DblList, queuecheck_gid2unc, int, gid, DblList*, dl) { delete dl; }}} delete queuecheck_gid2unc; queuecheck_gid2unc = 0; del_presyn_info(); } #endif /*QUEUECHECK*/ neuron-7.5/src/nrniv/bbsavestate.h000066400000000000000000000025411323325274500173020ustar00rootroot00000000000000#ifndef bbsavestate_h #define bbsavestate_h struct Object; struct Section; struct Node; struct Prop; struct Point_process; // base class to allow either counting, reading, writing files, buffers, etc. // All the BBSaveState methods take a BBSS_IO subclass and are merely iterators class BBSS_IO { public: enum Type {IN, OUT, CNT}; BBSS_IO(); virtual ~BBSS_IO(){} virtual void i(int& j, int chk=0) = 0; virtual void d(int n, double& p) = 0; virtual void d(int n, double* p) = 0; virtual void s(char* cp, int chk=0) = 0; virtual Type type() = 0; virtual void skip(int){} // only when reading }; class BBSaveState { public: BBSaveState(); virtual ~BBSaveState(); virtual void apply(BBSS_IO* io); BBSS_IO* f; int counts(int** gids, int** counts); void core(); void init(); void finish(); void gids(); void gid2buffer(int gid, char* buffer, int size); void buffer2gid(int gid, char* buffer, int size); void gidobj(int basegid); void gidobj(int spgid, Object*); void cell(Object*); int cellsize(Object*); void section_exist_info(Section*); void section(Section*); int sectionsize(Section*); void seccontents(Section*); void node(Node*); void node01(Section*, Node*); void mech(Prop*); void netrecv_pp(Point_process*); void possible_presyn(int gid); void mk_base2spgid(); void mk_pp2de(); void mk_presyn_info(); void del_pp2de(); }; #endif neuron-7.5/src/nrniv/bbsdirect.cpp000077500000000000000000000001741323325274500172760ustar00rootroot00000000000000#include #if NRNMPI #include "../parallel/bbsdirectmpi.cpp" #else #include "../parallel/bbsdirect.cpp" #endif neuron-7.5/src/nrniv/bbslocal.cpp000077500000000000000000000000441323325274500171120ustar00rootroot00000000000000#include "../parallel/bbslocal.cpp" neuron-7.5/src/nrniv/bbslsrv.cpp000077500000000000000000000000431323325274500170050ustar00rootroot00000000000000#include "../parallel/bbslsrv.cpp" neuron-7.5/src/nrniv/bbslsrv2.cpp000077500000000000000000000001711323325274500170710ustar00rootroot00000000000000#include #if NRNMPI #include "../parallel/bbssrv2mpi.cpp" #else #include "../parallel/bbslsrv2.cpp" #endif neuron-7.5/src/nrniv/bbsrcli.cpp000077500000000000000000000001671323325274500167570ustar00rootroot00000000000000#include #if NRNMPI #include "../parallel/bbsclimpi.cpp" #else #include "../parallel/bbsrcli.cpp" #endif neuron-7.5/src/nrniv/bbssrv.cpp000077500000000000000000000001661323325274500166370ustar00rootroot00000000000000#include #if NRNMPI #include "../parallel/bbssrvmpi.cpp" #else #include "../parallel/bbssrv.cpp" #endif neuron-7.5/src/nrniv/bgpdma.cpp000066400000000000000000001021321323325274500165610ustar00rootroot00000000000000// included by netpar.cpp /* Overall exchange strategy When a cell spikes, it immediately does a DCMF_Multicast of (int gid, double spiketime) to all the target machines that have cells that need to receive this spike by spiketime + delay I'd like to cycle through a list of mconfig.nconnections so that I don't have to wait for my single connection to complete the previous broadcast when there is a high density of generated spikes but I need to take care of my bus error issues first. In order to minimize the number of nrnmpi_bgp_conserve tests (and potentially abandon them altogether if I can ever guarantee that exchange time is less than half the computation time), I divide the minimum delay integration intervals into two equal subintervals. So if a spike is generated in an even subinterval, I do not have to include it in the conservation check until the end of the next even subinterval. When a spike is received (DMA interrupt) it is placed in even or odd buffers (depending on whether the coded gid is positive or negative) At the end of a computation subinterval the even or odd buffer spikes are enqueued in the priority queue after checking that the number of spikes sent is equal to the number of spikes sent. */ extern "C" { extern IvocVect* vector_arg(int); extern void vector_resize(IvocVect*, int); extern void (*nrntimeout_call)(); } // The initial idea behind TWOPHASE is to avoid the large overhead of // initiating a send of the up to 10k list of target hosts when a cell fires. // I.e. when there are a small number of cells on a processor, this causes // load balance problems. // Load balance shuld be better if the send is distributed to a much smaller // set of targets, which, when they receive the spike, pass it on to a neighbor // set. A non-exclusive alternative to this is the use of RECORD_REPLAY // which give a very fast initiation but we have not been able to get that // to complete in the sense of all the targets receiving their spikes before // the conservation step. // We expect that TWOPHASE will work best in combination with ENQUEUE=2 // which has the greatest amount of overlap between computation // and communication. // Note: the old implementation assumed that input PreSyn did not need // a BGP_DMASend pointer so used the PreSyn.bgp.srchost_ element to // help figure out the target_hosts_ list for the output PreSyn.bgp.dma_send_. // Since bgp.srchost_ is used only for setup, it can be overwritten at phase2 // setup time with a bgp.dma_send_ so as to pass on the spike to the // phase2 list of target hosts. // set to 1 if you have problems with Record_Replay when some cells send // spikes to fewer than 4 hosts. #define WORK_AROUND_RECORD_BUG 0 #define TWOPHASE 1 // 0 no longer allowed since 672:544c61a730ec #if BGPDMA & 2 #include #include #define DCMFTICK DCMF_Tick(); #define DCMFTIMEBASE DCMF_Timebase() #endif #if !defined(DCMFTICK) #define DCMFTICK 0 #define DCMFTIMEBASE 0 #endif static unsigned long long dmasend_time_; static int n_xtra_cons_check_; #define MAXNCONS 10 #if MAXNCONS static int xtra_cons_hist_[MAXNCONS+1]; #endif // asm/msr.h no longer compiles on my machine. // only for basic testing of logic when not on blue gene/p #define USE_RDTSCL 0 // only use if careful not to overrun the buffer during a simulation #if 0 && (BGPDMA > 1 || USE_RDTSCL) #define TBUFSIZE (1<<15) #else #define TBUFSIZE 0 #endif #if TBUFSIZE static unsigned long tbuf_[TBUFSIZE]; static int itbuf_; #if USE_RDTSCL // but can have many accuracy problems on recent cpus. /* for rdtscl() */ //#include #define rdtscl(a) a++ static unsigned long t__; #define TBUF {rdtscl(t__); tbuf_[itbuf_++] = t__;} #else #define TBUF tbuf_[itbuf_++] = (unsigned long)DCMF_Timebase(); #endif // not USE_RDTSCLL #else #define TBUF /**/ #endif // ENQUEUE 0 means to BGP_ReceiveBuffer buffer -> PreSyn.send // ENQUEUE 1 means to BGP_ReceiveBuffer buffer -> psbuf -> PreSyn.send // ENQUEUE 2 means to BGP_ReceiveBuffer.incoming -> PrySyn.send // Note that ENQUEUE 2 give more overlap between computation and exchange // since the enqueuing takes place during computation except for those // remaining during conservation. #define ENQUEUE 2 #if ENQUEUE == 2 static unsigned long enq2_find_time_; static unsigned long enq2_enqueue_time_; // includes enq_find_time_ #endif #if TWOPHASE #define PHASE2BUFFER_SIZE 2048 // power of 2 #define PHASE2BUFFER_MASK (PHASE2BUFFER_SIZE - 1) struct Phase2Buffer { PreSyn* ps; double spiketime; }; #endif #include declareStructPool(SpkPool, NRNMPI_Spike) implementStructPool(SpkPool, NRNMPI_Spike) #define BGP_RECEIVEBUFFER_SIZE 10000 class BGP_ReceiveBuffer { public: BGP_ReceiveBuffer(); virtual ~BGP_ReceiveBuffer(); void init(int index); void incoming(int gid, double spiketime); void enqueue(); int index_; int size_; int count_; int maxcount_; int busy_; int nsend_, nrecv_; // for checking conservation int nsend_cell_; // cells that spiked this interval. unsigned long long timebase_; NRNMPI_Spike** buffer_; SpkPool* pool_; void enqueue1(); void enqueue2(); PreSyn** psbuf_; #if TWOPHASE void phase2send(); int phase2_head_; int phase2_tail_; int phase2_nsend_cell_, phase2_nsend_; Phase2Buffer* phase2_buffer_; #endif }; #if TWOPHASE static int use_phase2_; static void setup_phase2(); #define NTARGET_HOSTS_PHASE1 ntarget_hosts_phase1_ #else #define NTARGET_HOSTS_PHASE1 ntarget_hosts_ #endif class BGP_DMASend { public: BGP_DMASend(); virtual ~BGP_DMASend(); void send(int gid, double t); int ntarget_hosts_; int* target_hosts_; NRNMPI_Spike spk_; #if 0 // There is no possibility of send2self because an output PreSyn // is never in the gid2in_ table. int send2self_; // if 1 then send spikes to this host also #endif #if TWOPHASE int ntarget_hosts_phase1_; #endif #if HAVE_DCMF_RECORD_REPLAY unsigned persist_id_; #endif }; #if TWOPHASE class BGP_DMASend_Phase2 { public: BGP_DMASend_Phase2(); virtual ~BGP_DMASend_Phase2(); NRNMPI_Spike spk_; void send_phase2(int gid, double t, BGP_ReceiveBuffer*); int ntarget_hosts_phase2_; int* target_hosts_phase2_; #if HAVE_DCMF_RECORD_REPLAY unsigned persist_id_; #endif }; #endif static BGP_ReceiveBuffer* bgp_receive_buffer[BGP_INTERVAL]; static int current_rbuf, next_rbuf; #if BGP_INTERVAL == 2 // note that if a spike is supposed to be received by bgp_receive_buffer[1] // then during transmission its gid is complemented. #endif BGP_ReceiveBuffer::BGP_ReceiveBuffer() { busy_ = 0; count_ = 0; size_ = BGP_RECEIVEBUFFER_SIZE; buffer_ = new NRNMPI_Spike*[size_]; pool_ = new SpkPool(BGP_RECEIVEBUFFER_SIZE); psbuf_ = 0; #if ENQUEUE == 1 psbuf_ = new PreSyn*[size_]; #endif #if TWOPHASE phase2_buffer_ = new Phase2Buffer[PHASE2BUFFER_SIZE]; phase2_head_ = phase2_tail_ = 0; #endif } BGP_ReceiveBuffer::~BGP_ReceiveBuffer() { assert(busy_ == 0); for (int i = 0; i < count_; ++i) { pool_->hpfree(buffer_[i]); } delete [] buffer_; delete pool_; if (psbuf_) delete [] psbuf_; #if TWOPHASE delete [] phase2_buffer_; #endif } void BGP_ReceiveBuffer::init(int index) { index_ = index; timebase_ = 0; nsend_cell_ = nsend_ = nrecv_ = busy_ = maxcount_ = 0; for (int i = 0; i < count_; ++i) { pool_->hpfree(buffer_[i]); } count_ = 0; #if TWOPHASE phase2_head_ = phase2_tail_ = 0; phase2_nsend_cell_ = phase2_nsend_ = 0; #endif } void BGP_ReceiveBuffer::incoming(int gid, double spiketime) { //printf("%d %p.incoming %g %g %d\n", nrnmpi_myid, this, t, spk->spiketime, spk->gid); assert(busy_ == 0); busy_ = 1; #if 0 && ENQUEUE == 2 // this section is potential race if both ReceiveBuffer called at // once, but in fact this is only called from within messager advance. // Note that this does not work as we occasionally get a timeout // during conservation checking. For this reason we return to buffer // usage but overlap through a call to enqueue on both ReceiveBuffer // on each messager advance unsigned long long tb = DCMFTIMEBASE; PreSyn* ps; assert(gid2in_->find(gid, ps)); enq2_find_time_ += (unsigned long)(DCMFTIMEBASE - tb); ps->send(spiketime, net_cvode_instance, nrn_threads); enq2_enqueue_time_ += (unsigned long)(DCMFTIMEBASE - tb); #else if (count_ >= size_) { size_ *= 2; NRNMPI_Spike** newbuf = new NRNMPI_Spike*[size_]; for (int i = 0; i < count_; ++i) { newbuf[i] = buffer_[i]; } delete [] buffer_; buffer_ = newbuf; if (psbuf_) { delete [] psbuf_; psbuf_ = new PreSyn*[size_]; } } NRNMPI_Spike* spk = pool_->alloc(); spk->gid = gid; spk->spiketime = spiketime; buffer_[count_++] = spk; if (maxcount_ < count_) { maxcount_ = count_; } #endif ++nrecv_; busy_ = 0; } void BGP_ReceiveBuffer::enqueue() { //printf("%d %p.enqueue count=%d t=%g nrecv=%d nsend=%d\n", nrnmpi_myid, this, t, count_, nrecv_, nsend_); assert(busy_ == 0); busy_ = 1; #if 1 for (int i=0; i < count_; ++i) { NRNMPI_Spike* spk = buffer_[i]; PreSyn* ps; #if ENQUEUE == 2 unsigned long long tb = DCMFTIMEBASE; #endif #if WORK_AROUND_RECORD_BUG if (!gid2in_->find(spk->gid, ps)) { #if ENQUEUE == 2 enq2_find_time_ += (unsigned long)(DCMFTIMEBASE - tb); #endif pool_->hpfree(spk); continue; } #else assert(gid2in_->find(spk->gid, ps)); #endif #if TWOPHASE if (use_phase2_ && ps->bgp.dma_send_phase2_) { // cannot do directly because busy_; //ps->bgp.dma_send_phase2_->send_phase2(spk->gid, spk->spiketime, this); Phase2Buffer& pb = phase2_buffer_[phase2_head_++]; phase2_head_ &= PHASE2BUFFER_MASK; assert(phase2_head_ != phase2_tail_); pb.ps = ps; pb.spiketime = spk->spiketime; } #endif #if ENQUEUE == 2 enq2_find_time_ += (unsigned long)(DCMFTIMEBASE - tb); #endif ps->send(spk->spiketime, net_cvode_instance, nrn_threads); pool_->hpfree(spk); #if ENQUEUE == 2 enq2_enqueue_time_ += (unsigned long)(DCMFTIMEBASE - tb); #endif } #endif count_ = 0; #if ENQUEUE != 2 nrecv_ = 0; nsend_ = 0; nsend_cell_ = 0; #endif busy_ = 0; #if TWOPHASE phase2send(); #endif } void BGP_ReceiveBuffer::enqueue1() { //printf("%d %lx.enqueue count=%d t=%g nrecv=%d nsend=%d\n", nrnmpi_myid, (long)this, t, count_, nrecv_, nsend_); assert(busy_ == 0); busy_ = 1; for (int i=0; i < count_; ++i) { NRNMPI_Spike* spk = buffer_[i]; PreSyn* ps; assert(gid2in_->find(spk->gid, ps)); psbuf_[i] = ps; #if TWOPHASE if (use_phase2_ && ps->bgp.dma_send_phase2_) { // cannot do directly because busy_; //ps->bgp.dma_send_phase2_->send_phase2(spk->gid, spk->spiketime, this); Phase2Buffer& pb = phase2_buffer_[phase2_head_++]; phase2_head_ &= PHASE2BUFFER_MASK; assert(phase2_head_ != phase2_tail_); pb.ps = ps; pb.spiketime = spk->spiketime; } #endif } busy_ = 0; #if TWOPHASE phase2send(); #endif } void BGP_ReceiveBuffer::enqueue2() { //printf("%d %lx.enqueue count=%d t=%g nrecv=%d nsend=%d\n", nrnmpi_myid, (long)this, t, count_, nrecv_, nsend_); assert(busy_ == 0); busy_ = 1; for (int i=0; i < count_; ++i) { NRNMPI_Spike* spk = buffer_[i]; PreSyn* ps = psbuf_[i]; ps->send(spk->spiketime, net_cvode_instance, nrn_threads); pool_->hpfree(spk); } count_ = 0; nrecv_ = 0; nsend_ = 0; nsend_cell_ = 0; busy_ = 0; } #if TWOPHASE void BGP_ReceiveBuffer::phase2send() { while (phase2_head_ != phase2_tail_) { Phase2Buffer& pb = phase2_buffer_[phase2_tail_++]; phase2_tail_ &= PHASE2BUFFER_MASK; pb.ps->bgp.dma_send_phase2_->send_phase2(pb.ps->gid_, pb.spiketime, this); } } #endif // number of DCMF_Multicast_t to cycle through when not using recordreplay #define NSEND 10 #if BGPDMA > 1 extern "C" { extern void getMemSize(long long *mem); extern void getUsedMem(long long *mem); extern void getFreeMem(long long *mem); } #endif #if BGPDMA & 2 #define PIPEWIDTH 16 static DCMF_Opcode_t* hints_; //static DCMF_Protocol_t protocol __attribute__((__aligned__(16))); //static DCMF_Multicast_Configuration_t mconfig; struct MyProtocolWrapper { DCMF_Protocol_t protocol __attribute__((__aligned__(16))); } __attribute__((__aligned__(16))); static MyProtocolWrapper* mpw; static DCMF_Multicast_Configuration_t* mconfig; struct MyMulticastInfo { DCMF_Request_t request __attribute__((__aligned__(16))); DCQuad msginfo __attribute__((__aligned__(16))); DCMF_Multicast_t msend; DCMF_Callback_t cb_done; bool req_in_use; bool record; // when recordreplay, first time Multicast, thereafter Restart }__attribute__((__aligned__(16))); // NSEND of them for cycling, or, if recordreplay, max_persist_ids of them static int n_mymulticast_; // NSEND or max_persist_ids static struct MyMulticastInfo* mci_; // maybe we will use this when a rank sends to itself. static void spk_ready (int gid, double spiketime) { assert(0); //printf("%d spk_ready %d %g\n", nrnmpi_myid, gid, spiketime); // to avoid a race condition (since we may be in the middle of // retrieving an item from the event queue) store the incoming // events in a receive buffer int i = 0; #if BGP_INTERVAL == 2 if (gid < 0) { gid = ~gid; i = 1; } #endif bgp_receive_buffer[i]->incoming(gid, spiketime); ++nrecv_; } // async callback for receiver's side of multisend static DCMF_Request_t * msend_recv(const DCQuad * msginfo, unsigned nquads, unsigned senderID, const unsigned sndlen, unsigned connid, void * arg, unsigned * rcvlen, char ** rcvbuf, unsigned * pipewidth, DCMF_Callback_t * cb_done) { unsigned long long tb = DCMF_Timebase(); *rcvlen = 0; *rcvbuf = 0; * pipewidth = PIPEWIDTH; cb_done->clientdata = 0; cb_done->function = 0; double t = *((double*)&msginfo->w0); int gid = *((int*)&msginfo->w2); // printf("%d msend_recv %d %g\n", nrnmpi_myid, spk->gid, spk->spiketime); int i = 0; #if BGP_INTERVAL == 2 if (gid < 0) { gid = ~gid; i = 1; } #endif bgp_receive_buffer[i]->incoming(gid, t); ++nrecv_; bgp_receive_buffer[i]->timebase_ += DCMF_Timebase() - tb; return NULL; } // Multisend_multicast callback #if DCMF_VERSION_MAJOR >= 2 static void multicast_done(void* arg, DCMF_Error_t *) { #else static void multicast_done(void* arg) { #endif bool* a = (bool*)arg; *a = false; } #endif //BGPDMA & 2 static int max_ntarget_host; // For one phase sending, max_multisend_targets is max_ntarget_host. // For two phase sending, it is the maximum of all the // ntarget_hosts_phase1 and ntarget_hosts_phase2. static int max_multisend_targets; double nrn_bgp_receive_time(int type) { // and others double rt = 0.; switch(type) { case 2: //in msend_recv if (!use_bgpdma_) { return rt; } for (int i = 0; i < n_bgp_interval; ++i) { rt += bgp_receive_buffer[i]->timebase_ * DCMFTICK; } break; case 3: // in BGP_DMAsend::send if (!use_bgpdma_) { return rt; } rt = dmasend_time_ * DCMFTICK; break; case 4: // number of extra conservation checks rt = double(n_xtra_cons_check_); // and if there is second vector arg then also return the histogram #if MAXNCONS if (ifarg(2) && use_bgpdma_) { IvocVect* vec = vector_arg(2); vector_resize(vec, MAXNCONS+1); for (int i=0; i <= MAXNCONS; ++i) { vector_vec(vec)[i] = double(xtra_cons_hist_[i]); } } #endif // MAXNCONS #if TBUFSIZE if (ifarg(3)) { IvocVect* vec = vector_arg(3); vector_resize(vec, itbuf_+1); for (int i=0; i <= itbuf_; ++i) { vector_vec(vec)[i] = double(tbuf_[i]); } vector_vec(vec)[itbuf_] = DCMFTICK; } #endif break; #if ALTHASH case 5: rt = double(gid2in_->max_chain_length()); break; case 6: rt = double(gid2in_->nclash()); break; case 7: rt = double(gid2in_->nfind()); break; #endif case 8: // exchange method properties // bit 0-1: 0 allgather, 1 multisend as MPI_ISend, // 2 multisend DCMF, 3 multisend DCMF with record replay // bit 2: n_bgp_interval, 0 means one interval, 1 means 2 // bit 3: number of phases, 0 means 1 phase, 1 means 2 // bit 4: 1 means althash used // bit 5: 1 means enqueue separated into two parts for timeing { int meth = use_dcmf_record_replay ? 3 : use_bgpdma_; int p = meth + 4*(n_bgp_interval == 2 ? 1 : 0) #if TWOPHASE + 8*use_phase2_ #endif + 16*(ALTHASH == 1 ? 1 : 0) + 32*ENQUEUE; rt = double(p); } break; #if BGPDMA > 1 case 9: // getMemSize { long long mem; getMemSize(&mem); rt = double(mem); break; } case 10: // getUsedMem { long long mem; getUsedMem(&mem); rt = double(mem); break; } case 11: // getFreeMem { long long mem; getFreeMem(&mem); rt = double(mem); break; } #endif case 12: // greatest length multisend { rt = double(max_multisend_targets); break; } } return rt; } extern "C" { extern void nrnmpi_bgp_comm(); extern void nrnmpi_bgp_multisend(NRNMPI_Spike*, int, int*); extern int nrnmpi_bgp_single_advance(NRNMPI_Spike*); extern int nrnmpi_bgp_conserve(int nsend, int nrecv); } static void bgp_dma_init() { for (int i = 0; i < n_bgp_interval; ++i) { bgp_receive_buffer[i]->init(i); } current_rbuf = 0; next_rbuf = n_bgp_interval - 1; #if TBUFSIZE itbuf_ = 0; #endif #if BGPDMA & 2 if (use_bgpdma_ == 2) for (int i=0; i < n_mymulticast_; ++i) { mci_[i].req_in_use = false; } #endif dmasend_time_ = 0; #if ENQUEUE == 2 enq2_find_time_ = enq2_enqueue_time_ = 0; #endif n_xtra_cons_check_ = 0; #if MAXNCONS for (int i=0; i <= MAXNCONS; ++i) { xtra_cons_hist_[i] = 0; } #endif // MAXNCONS } static int bgp_advance() { NRNMPI_Spike spk; PreSyn* ps; int i = 0; while(nrnmpi_bgp_single_advance(&spk)) { i += 1; int j = 0; #if BGP_INTERVAL == 2 if (spk.gid < 0) { spk.gid = ~spk.gid; j = 1; } #endif bgp_receive_buffer[j]->incoming(spk.gid, spk.spiketime); } nrecv_ += i; return i; } #if BGPDMA void nrnbgp_messager_advance() { #if BGPDMA & 2 if (use_bgpdma_ > 1) { DCMF_Messager_advance(); } #endif #if BGPDMA & 1 if (use_bgpdma_ == 1) { bgp_advance(); } #endif #if ENQUEUE == 2 bgp_receive_buffer[current_rbuf]->enqueue(); #endif } #endif BGP_DMASend::BGP_DMASend() { ntarget_hosts_ = 0; target_hosts_ = NULL; #if 0 send2self_ = 0; #endif #if TWOPHASE ntarget_hosts_phase1_ = 0; #endif } BGP_DMASend::~BGP_DMASend() { if (target_hosts_) { delete [] target_hosts_; } } #if TWOPHASE BGP_DMASend_Phase2::BGP_DMASend_Phase2() { ntarget_hosts_phase2_ = 0; target_hosts_phase2_ = 0; } BGP_DMASend_Phase2::~BGP_DMASend_Phase2() { if (target_hosts_phase2_) { delete [] target_hosts_phase2_; } } #endif static int isend; // helps debugging when core dump since otherwise cannot tell where // BGP_DMASend::send fails #if 0 static void mymulticast(DCMF_Multicast_t* arg) { DCMF_Multicast(arg); } static void myrestart(DCMF_Request_t* arg) { DCMF_Restart(arg); } #endif void BGP_DMASend::send(int gid, double t) { unsigned long long tb = DCMFTIMEBASE; if (NTARGET_HOSTS_PHASE1) { spk_.gid = gid; spk_.spiketime = t; #if BGP_INTERVAL == 2 bgp_receive_buffer[next_rbuf]->nsend_ += ntarget_hosts_; bgp_receive_buffer[next_rbuf]->nsend_cell_ += 1; if (next_rbuf == 1) { spk_.gid = ~spk_.gid; } #else bgp_receive_buffer[0]->nsend_ += ntarget_hosts_; bgp_receive_buffer[0]->nsend_cell_ += 1; #endif nsend_ += 1; #if BGPDMA & 2 if (use_bgpdma_ == 2) { MyMulticastInfo* mci; #if HAVE_DCMF_RECORD_REPLAY if (use_dcmf_record_replay) { mci = mci_ + persist_id_; }else{ #else { #endif mci = mci_ + isend; } int acnt = 0; while (mci->req_in_use) { ++acnt; nrnbgp_messager_advance(); } // if (acnt > 10) { printf("%d multicast %d not done\n", nrnmpi_myid, msend.connection_id);} mci->req_in_use = true; //printf("%d multisend %d %g\n", nrnmpi_myid, gid, t); *((double*)&(mci->msginfo.w0)) = spk_.spiketime; *((int*)&(mci->msginfo.w2)) = spk_.gid; mci->msend.nranks = (unsigned int)NTARGET_HOSTS_PHASE1; mci->msend.ranks = (unsigned int*) target_hosts_; //printf("%d DCMF_Multicast %d %g %d\n", nrnmpi_myid, msend.connection_id, t, gid); #if HAVE_DCMF_RECORD_REPLAY if (use_dcmf_record_replay) { if (mci->record) { #if 0 mymulticast(&mci->msend); #else DCMF_Multicast(&mci->msend); #endif mci->record = false; }else{ #if 0 myrestart(&mci->request); #else DCMF_Restart(&mci->request); #endif } }else{ #else { #endif DCMF_Multicast(&mci->msend); isend = (++isend)%n_mymulticast_; } } #endif // BGPDMA & 2 #if BGPDMA & 1 if (use_bgpdma_ == 1) { nrnmpi_bgp_multisend(&spk_, NTARGET_HOSTS_PHASE1, target_hosts_); } #endif } #if 0 // I am given to understand that multisend cannot send to itself // one is never supposed to send to oneself since an output presyn // can never be in the gid2in_ table (ie. the assert below would fail). if (send2self_) { PreSyn* ps; assert(gid2in_->find(gid, ps)); ps->send(t, net_cvode_instance, nrn_threads); } #endif dmasend_time_ += DCMFTIMEBASE - tb; } #if TWOPHASE void BGP_DMASend_Phase2::send_phase2(int gid, double t, BGP_ReceiveBuffer* rb) { unsigned long long tb = DCMFTIMEBASE; if (ntarget_hosts_phase2_) { spk_.gid = gid; spk_.spiketime = t; #if BGP_INTERVAL == 2 if (rb->index_ == 1) { spk_.gid = ~spk_.gid; } #endif rb->phase2_nsend_cell_ += 1; rb->phase2_nsend_ += ntarget_hosts_phase2_; #if BGPDMA & 2 if (use_bgpdma_ == 2) { MyMulticastInfo* mci; #if HAVE_DCMF_RECORD_REPLAY if (use_dcmf_record_replay) { mci = mci_ + persist_id_; }else{ #else { #endif mci = mci_ + isend; } int acnt = 0; while (mci->req_in_use) { ++acnt; nrnbgp_messager_advance(); } // if (acnt > 10) { printf("%d multicast %d not done\n", nrnmpi_myid, msend.connection_id);} mci->req_in_use = true; //printf("%d multisend %d %g\n", nrnmpi_myid, gid, t); *((double*)&(mci->msginfo.w0)) = spk_.spiketime; *((int*)&(mci->msginfo.w2)) = spk_.gid; mci->msend.nranks = (unsigned int)ntarget_hosts_phase2_; mci->msend.ranks = (unsigned int*) target_hosts_phase2_; //printf("%d DCMF_Multicast %d %g %d\n", nrnmpi_myid, msend.connection_id, t, gid); #if HAVE_DCMF_RECORD_REPLAY if (use_dcmf_record_replay) { if (mci->record) { DCMF_Multicast(&mci->msend); mci->record = false; }else{ DCMF_Restart(&mci->request); } }else{ #else { #endif DCMF_Multicast(&mci->msend); isend = (++isend)%n_mymulticast_; } } #endif // BGPDMA & 2 #if BGPDMA & 1 if (use_bgpdma_ == 1) { nrnmpi_bgp_multisend(&spk_, ntarget_hosts_phase2_, target_hosts_phase2_); } #endif } dmasend_time_ += DCMFTIMEBASE - tb; } #endif // TWOPHASE static void determine_source_hosts(); static void determine_targid_count_on_srchost(int* src, int* send); static void determine_targids_on_srchost(int* s, int* scnt, int* sdispl, int* r, int* rcnt, int* rdispl); static void determine_target_hosts(); static int gathersrcgid(int hostbegin, int totalngid, int* ngid, int* thishostgid, int* n, int* displ, int bsize, int* buf); void bgp_dma_receive(NrnThread* nt) { // nrn_spike_exchange(); assert(nt == nrn_threads); TBUF double w1, w2; int ncons = 0; int& s = bgp_receive_buffer[current_rbuf]->nsend_; int& r = bgp_receive_buffer[current_rbuf]->nrecv_; #if ENQUEUE == 2 unsigned long tfind, tsend; #endif w1 = nrnmpi_wtime(); #if BGPDMA & 2 if (use_bgpdma_ == 2) { nrnbgp_messager_advance(); TBUF #if ENQUEUE == 2 // want the overlap with computation, not conserve tfind = enq2_find_time_; tsend = enq2_enqueue_time_ - enq2_find_time_; #endif // demonstrates that most of the time here is due to load imbalance #if TBUFSIZE nrnmpi_barrier(); #endif TBUF while (nrnmpi_bgp_conserve(s, r) != 0) { nrnbgp_messager_advance(); ++ncons; } TBUF n_xtra_cons_check_ += ncons; } #endif #if BGPDMA & 1 if (use_bgpdma_ == 1) { nrnbgp_messager_advance(); TBUF #if ENQUEUE == 2 // want the overlap with computation, not conserve tfind = enq2_find_time_; tsend = enq2_enqueue_time_ - enq2_find_time_; #endif #if TBUFSIZE nrnmpi_barrier(); #endif TBUF while (nrnmpi_bgp_conserve(s, r) != 0) { nrnbgp_messager_advance(); ++ncons; } TBUF } #endif w1 = nrnmpi_wtime() - w1; w2 = nrnmpi_wtime(); #if TBUFSIZE tbuf_[itbuf_++] = (unsigned long)ncons; tbuf_[itbuf_++] = (unsigned long)bgp_receive_buffer[current_rbuf]->nsend_cell_; tbuf_[itbuf_++] = (unsigned long)s; tbuf_[itbuf_++] = (unsigned long)r; tbuf_[itbuf_++] = (unsigned long)dmasend_time_; #if TWOPHASE if (use_phase2_) { tbuf_[itbuf_++] = (unsigned long)bgp_receive_buffer[current_rbuf]->phase2_nsend_cell_; tbuf_[itbuf_++] = (unsigned long)bgp_receive_buffer[current_rbuf]->phase2_nsend_; } #endif #endif #if (BGPMDA & 2) && MAXNCONS if (ncons > MAXNCONS) { ncons = MAXNCONS; } ++xtra_cons_hist_[ncons]; #endif // MAXNCONS #if ENQUEUE == 0 bgp_receive_buffer[current_rbuf]->enqueue(); #endif #if ENQUEUE == 1 bgp_receive_buffer[current_rbuf]->enqueue1(); TBUF bgp_receive_buffer[current_rbuf]->enqueue2(); #endif #if ENQUEUE == 2 bgp_receive_buffer[current_rbuf]->enqueue(); s = r = bgp_receive_buffer[current_rbuf]->nsend_cell_ = 0; #if TWOPHASE bgp_receive_buffer[current_rbuf]->phase2_nsend_cell_ = 0; bgp_receive_buffer[current_rbuf]->phase2_nsend_ = 0; #endif enq2_find_time_ = 0; enq2_enqueue_time_ = 0; #if TBUFSIZE tbuf_[itbuf_++] = tfind; tbuf_[itbuf_++] = tsend; #endif #endif // ENQUEUE == 2 wt1_ = nrnmpi_wtime() - w2; wt_ = w1; #if BGP_INTERVAL == 2 //printf("%d reverse buffers %g\n", nrnmpi_myid, t); if (n_bgp_interval == 2) { current_rbuf = next_rbuf; next_rbuf = ((next_rbuf + 1)&1); } #endif TBUF } void bgp_dma_send(PreSyn* ps, double t) { #if 0 if (nrn_use_localgid_) { nrn_outputevent(ps->localgid_, t); }else{ nrn2ncs_outputevent(ps->output_index_, t); } #endif if (ps->bgp.dma_send_) ps->bgp.dma_send_->send(ps->output_index_, t); } void bgpdma_send_init(PreSyn* ps) { } void bgpdma_cleanup_presyn(PreSyn* ps) { if (ps->bgp.dma_send_) { if (ps->output_index_ >= 0) { delete ps->bgp.dma_send_; ps->bgp.dma_send_ = 0; } #if TWOPHASE if (ps->output_index_ < 0) { delete ps->bgp.dma_send_phase2_; ps->bgp.dma_send_phase2_ = 0; } #endif } } static void bgpdma_cleanup() { nrntimeout_call = 0; #if BGPDMA & 2 if (hints_) { delete [] hints_; hints_ = 0; delete [] mconfig->connectionlist; delete [] mci_; } #endif NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { bgpdma_cleanup_presyn(ps); }}} #if TWOPHASE NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { bgpdma_cleanup_presyn(ps); }}} #endif } static void bgptimeout() { printf("%d timeout %d %d %d\n", nrnmpi_myid, current_rbuf, bgp_receive_buffer[current_rbuf]->nsend_, bgp_receive_buffer[current_rbuf]->nrecv_ ); } #if WORK_AROUND_RECORD_BUG static void ensure_ntarget_gt_3(BGP_DMASend* bs) { // work around for bug in RecordReplay if (bs->ntarget_hosts_ > 3) { return; } int nold = bs->ntarget_hosts_; int* old = bs->target_hosts_; bs->target_hosts_ = new int[4]; for (int i=0; i < nold; ++i) { bs->target_hosts_[i] = old[i]; } delete [] old; int h = (nrnmpi_myid + 4)%nrnmpi_numprocs; while (bs->ntarget_hosts_ < 4) { int b = 0; for (int i=0; i < bs->ntarget_hosts_; ++i) { if (h == bs->target_hosts_[i]) { h = (h + 4)%nrnmpi_numprocs; b = 1; break; } } if (b == 0) { bs->target_hosts_[bs->ntarget_hosts_++] = h; h = (h + 1)%nrnmpi_numprocs; } } bs->ntarget_hosts_phase1_ = bs->ntarget_hosts_; } #endif #define FASTSETUP 1 #if FASTSETUP #include "bgpdmasetup.cpp" #endif void bgp_dma_setup() { bgpdma_cleanup(); if (use_bgpdma_ == 0) { return; } //not sure this is useful for debugging when stuck in a collective. //nrntimeout_call = bgptimeout; double wt = nrnmpi_wtime(); nrnmpi_bgp_comm(); //if (nrnmpi_myid == 0) printf("bgp_dma_setup()\n"); // although we only care about the set of hosts that gid2out_ // sends spikes to (source centric). We do not want to send // the entire list of gid2in (which may be 10000 times larger // than gid2out) from every machine to every machine. // so we accomplish the task in two phases the first of which // involves allgather with a total receive buffer size of number // of cells (even that is too large and we will split it up // into chunks). And the second, an // allreduce with receive buffer size of number of hosts. max_ntarget_host = 0; max_multisend_targets = 0; #if FASTSETUP // completely new algorithm does one and two phase. setup_presyn_dma_lists(); #else // obsolete // see 672:544c61a730ec #error "FASTSETUP required" #endif // obsolete (not FASTSETUP) if (!bgp_receive_buffer[0]) { bgp_receive_buffer[0] = new BGP_ReceiveBuffer(); } #if BGP_INTERVAL == 2 if (n_bgp_interval == 2 && !bgp_receive_buffer[1]) { bgp_receive_buffer[1] = new BGP_ReceiveBuffer(); } #endif #if BGPDMA & 2 if (use_bgpdma_ == 2) { // going to leak these since no way to unregister mpw = new MyProtocolWrapper; mconfig = new DCMF_Multicast_Configuration_t; // one would think that everyone can use the same hints and so they // can be allocated according to the maximum ntarget_hosts_. hints_ = new DCMF_Opcode_t[nrnmpi_numprocs]; for (int i = 0; i < nrnmpi_numprocs; ++i) { hints_[i] = DCMF_PT_TO_PT_SEND; } // I am also guessing everyone can use the same mconfig. #if HAVE_DCMF_RECORD_REPLAY unsigned max_persist_ids = 0; if (use_dcmf_record_replay) { PreSyn* ps; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0 && ps->bgp.dma_send_->ntarget_hosts_ > 0) { ps->bgp.dma_send_->persist_id_ = max_persist_ids++; #if WORK_AROUND_RECORD_BUG ensure_ntarget_gt_3(ps->bgp.dma_send_); #endif } }}} } if (max_persist_ids > 0) { // may want to check for too many as well mconfig->protocol = DCMF_MEMFIFO_MCAST_RECORD_REPLAY_PROTOCOL; mconfig->max_persist_ids = max_persist_ids; mconfig->max_msgs = max_multisend_targets; n_mymulticast_ = max_persist_ids; }else{ mconfig->protocol = DCMF_MEMFIFO_DMA_MSEND_PROTOCOL; mconfig->max_persist_ids = 0; mconfig->max_msgs = 0; n_mymulticast_ = NSEND; #if TWOPHASE if (use_phase2_) { n_mymulticast_ *= 100; } #endif } #else mconfig->protocol = DCMF_MEMFIFO_DMA_MSEND_PROTOCOL; n_mymulticast_ = NSEND; #if TWOPHASE if (use_phase2_) { n_mymulticast_ *= 100; } #endif #endif if (nrnmpi_myid == 0) { printf("n_mymulticast_ = %d\n", n_mymulticast_); } mci_ = new MyMulticastInfo[n_mymulticast_]; mconfig->cb_recv = msend_recv; mconfig->nconnections = n_mymulticast_; //max_multisend_targets; mconfig->connectionlist = new void*[n_mymulticast_]; mconfig->clientdata = NULL; assert(DCMF_Multicast_register (&mpw->protocol, mconfig) == DCMF_SUCCESS); for (int i = 0; i < n_mymulticast_; ++i) { MyMulticastInfo* mci = mci_+ i; mci->record = true; mci->req_in_use = false; mci->cb_done.clientdata = (void*)&mci->req_in_use; mci->cb_done.function = multicast_done; mci->msend.registration = &mpw->protocol; mci->msend.request = &mci->request; mci->msend.cb_done = mci->cb_done; mci->msend.consistency = DCMF_MATCH_CONSISTENCY; //DCMF_RELAXED_CONSISTENCY; mci->msend.connection_id = i; mci->msend.bytes = 0; mci->msend.src = NULL; mci->msend.opcodes = hints_; mci->msend.msginfo = &mci->msginfo; mci->msend.count = 1; mci->msend.op = DCMF_UNDEFINED_OP; mci->msend.dt = DCMF_UNDEFINED_DT; #if HAVE_DCMF_RECORD_REPLAY mci->msend.persist_id = i; #endif } } #endif } #ifdef USENCS //give me data on which gids of this node send out APs int ncs_bgp_sending_info( int **sendlist2build ) { int nsrcgid = 0; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0) { ++nsrcgid; } }}} *sendlist2build = nsrcgid ? new int[nsrcgid] : 0; int i = 0; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0) { (*sendlist2build)[i] = ps->gid_; ++i; } }}} //printf( "Node %d sees first hand %d gids send\n", nrnmpi_myid, nsrcgid ); return nsrcgid; } //function to access the sending information of a presyn int ncs_bgp_target_hosts( int gid, int** targetnodes ) { PreSyn* ps; assert(gid2out_->find(gid, ps)); if( ps->bgp.dma_send_ ) { (*targetnodes) = ps->bgp.dma_send_->ntarget_hosts_? new int[ps->bgp.dma_send_->ntarget_hosts_] : 0; return ps->bgp.dma_send_->ntarget_hosts_; } return 0; } //iterate over gid2in_ just so I can see what is in there int ncs_bgp_target_info( int **presyngids ) { //(*presyngids) = 0; int i, nsrcgid; PreSyn* ps; nsrcgid = 0; // some target PreSyns may not have any input // so initialize all to -1 NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { assert(ps->output_index_ < 0); if( ps->bgp.srchost_ != -1 ) //has input { ++nsrcgid; //printf( "Node %d: Presyn for gid %d has src %d\n", nrnmpi_myid, ps->gid_, ps->bgp.srchost_ ); } }}} (*presyngids) = nsrcgid ? new int[nsrcgid] : 0; i=0; NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { assert(ps->output_index_ < 0); if( ps->bgp.srchost_ != -1 ) //has input { (*presyngids)[i] = ps->gid_; ++i; } }}} return nsrcgid; } int ncs_bgp_mindelays( int **srchost, double **delays ) { int i, nsrcgid=0; NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { assert(ps->output_index_ < 0); if( ps->bgp.srchost_ != -1 ) //has input { ++nsrcgid; } }}} (*delays) = nsrcgid ? new double[nsrcgid] : 0; (*srchost) = nsrcgid ? new int[nsrcgid] : 0; i=0; NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { assert(ps->output_index_ < 0); if( ps->bgp.srchost_ != -1 ) //has input { (*delays)[i] = ps->mindelay(); (*srchost)[i] = ps->bgp.srchost_; ++i; } }}} return nsrcgid; } #endif //USENCS neuron-7.5/src/nrniv/bgpdmasetup.cpp000066400000000000000000000442341323325274500176520ustar00rootroot00000000000000/* For very large numbers of processors and cells and fanout, it is taking a long time to figure out each cells target list given the input gids (gid2in) on each host. e.g 240 seconds for 2^25 cells, 1k connections per cell, and 128K cores; and 340 seconds for two phase excchange. To reduce this setup time we experiment with a very different algorithm in which we construct a gid target host list on host gid%nhost and copy that list to the source host owning the gid. */ #if 0 void celldebug(const char* p, Gid2PreSyn* map) { FILE* f; char fname[100]; sprintf(fname, "debug.%d", nrnmpi_myid); f = fopen(fname, "a"); PreSyn* ps; fprintf(f, "\n%s\n", p); int rank = nrnmpi_myid; fprintf(f, " %2d:", rank); NrnHashIterateKeyValue(Gid2PreSyn, map, int, gid, PreSyn*, ps) { fprintf(f, " %2d", gid); }}} fprintf(f, "\n"); fclose(f); } void alltoalldebug(const char* p, int* s, int* scnt, int* sdispl, int* r, int* rcnt, int* rdispl){ FILE* f; char fname[100]; sprintf(fname, "debug.%d", nrnmpi_myid); f = fopen(fname, "a"); fprintf(f, "\n%s\n", p); int rank = nrnmpi_myid; fprintf(f, " rank %d\n", rank); for (int i=0; i < nrnmpi_numprocs; ++i) { fprintf(f, " s%d : %d %d :", i, scnt[i], sdispl[i]); for (int j = sdispl[i]; j < sdispl[i+1]; ++j) { fprintf(f, " %2d", s[j]); } fprintf(f, "\n"); } for (int i=0; i < nrnmpi_numprocs; ++i) { fprintf(f, " r%d : %d %d :", i, rcnt[i], rdispl[i]); for (int j = rdispl[i]; j < rdispl[i+1]; ++j) { fprintf(f, " %2d", r[j]); } fprintf(f, "\n"); } fclose(f); } #else void celldebug(const char* p, Gid2PreSyn* map) {} void alltoalldebug(const char* p, int* s, int* scnt, int* sdispl, int* r, int* rcnt, int* rdispl){} #endif #if 0 void phase1debug() { FILE* f; char fname[100]; sprintf(fname, "debug.%d", nrnmpi_myid); f = fopen(fname, "a"); PreSyn* ps; fprintf(f, "\nphase1debug %d", nrnmpi_myid); NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { fprintf(f, "\n %2d:", ps->gid_); BGP_DMASend* bs = ps->bgp.dma_send_; for (int i=0; i < bs->ntarget_hosts_; ++i) { fprintf(f, " %2d", bs->target_hosts_[i]); } }}} fprintf(f, "\n"); fclose(f); } void phase2debug() { FILE* f; char fname[100]; sprintf(fname, "debug.%d", nrnmpi_myid); f = fopen(fname, "a"); PreSyn* ps; fprintf(f, "\nphase2debug %d", nrnmpi_myid); NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { fprintf(f, "\n %2d:", ps->gid_); BGP_DMASend_Phase2* bs = ps->bgp.dma_send_phase2_; if (bs) { for (int i=0; i < bs->ntarget_hosts_phase2_; ++i) { fprintf(f, " %2d", bs->target_hosts_phase2_[i]); } } }}} fprintf(f, "\n"); fclose(f); } #endif static void del(int* a) { if (a) { delete [] a; } } static int* newintval(int val, int size) { if (size == 0) { return 0; } int* x = new int[size]; for (int i=0; i < size; ++i) { x[i] = val; } return x; } static int* newoffset(int* acnt, int size) { int* aoff = new int[size+1]; aoff[0] = 0; for (int i=0; i < size; ++i) { aoff[i+1] = aoff[i] + acnt[i]; } return aoff; } // input scnt, sdispl ; output, newly allocated rcnt, rdispl static void all2allv_helper(int* scnt, int* sdispl, int*& rcnt, int*& rdispl) { int i; int np = nrnmpi_numprocs; int* c = newintval(1, np); rdispl = newoffset(c, np); rcnt = newintval(0, np); nrnmpi_int_alltoallv(scnt, c, rdispl, rcnt, c, rdispl); del(c); del(rdispl); rdispl = newoffset(rcnt, np); } #define all2allv_perf 1 extern "C" {extern unsigned long long nrn_mallinfo(int);} //input s, scnt, sdispl ; output, newly allocated r, rcnt, rdispl static void all2allv_int(int* s, int* scnt, int* sdispl, int*& r, int*& rcnt, int*& rdispl, const char* dmes) { #if all2allv_perf double tm = nrnmpi_wtime(); #endif int np = nrnmpi_numprocs; all2allv_helper(scnt, sdispl, rcnt, rdispl); r = newintval(0, rdispl[np]); nrnmpi_int_alltoallv(s, scnt, sdispl, r, rcnt, rdispl); alltoalldebug(dmes, s, scnt, sdispl, r, rcnt, rdispl); // when finished with r, rcnt, rdispl, caller should del them. #if all2allv_perf if (nrnmpi_myid == 0) { int nb = 4*nrnmpi_numprocs + sdispl[nrnmpi_numprocs] + rdispl[nrnmpi_numprocs]; tm = nrnmpi_wtime() - tm; printf("all2allv_int %s space=%d total=%llu time=%g\n", dmes, nb, nrn_mallinfo(0), tm); } #endif } class TarList { public: TarList(); virtual ~TarList(); virtual void alloc(); int size; int* list; int rank; #if TWOPHASE int* indices; // indices of list for groups of phase2 targets. // If indices is not null, then size is one less than // the size of the indices list where indices[size] = the size of // the list. Indices[0] is 0 and list[indices[i]] is the rank // to send the ith group of phase2 targets. #endif }; declareNrnHash(Int2TarList, int, TarList*) implementNrnHash(Int2TarList, int, TarList*) static Int2TarList* gid2tarlist; TarList::TarList() { size = 0; list = 0; rank = -1; #if TWOPHASE indices = 0; #endif } TarList::~TarList() { del(list); #if TWOPHASE del(indices); #endif } void TarList::alloc() { if (size) { list = new int[size]; } } #if TWOPHASE #include static void* ranstate; static void random_init(int i) { if (!ranstate) { ranstate = nrnisaac_new(); } nrnisaac_init(ranstate, nrnmpi_myid + 1); } static unsigned int get_random() { return nrnisaac_uint32_pick(ranstate); } static int iran(int i1, int i2) { // discrete uniform random integer from i2 to i2 inclusive. Must // work if i1 == i2 if (i1 == i2) { return i1; } int i3 = i1 + get_random()%(i2 - i1 + 1); return i3; } static void phase2organize(TarList* tl) { // copied and modified from old specify_phase2_distribution of bgpdma.cpp int n, nt; nt = tl->size; n = int(sqrt(double(nt))); // change to about 20 if (n > 1) { // do not bother if not many connections // equal as possible group sizes tl->indices = new int[n+1]; tl->indices[n] = tl->size; tl->size = n; for (int i=0; i < n; ++i) { tl->indices[i] = (i * nt)/n; } // Note: not sure the following is true anymore but it could be. // This distribution is very biased (if 0 is a phase1 target // it is always a phase2 sender. So now choose a random // target in the subset and make that the phase2 sender // (need to switch the indices[i] target and the one chosen) for (int i=0; i < n; ++i) { int i1 = tl->indices[i]; int i2 = tl->indices[i+1]-1; // need discrete uniform random integer from i1 to i2 int i3 = iran(i1, i2); int itar = tl->list[i1]; tl->list[i1] = tl->list[i3]; tl->list[i3] = itar; } } } #endif //TWOPHASE /* Setting up target lists uses a lot of temporary memory. It is conceiveable that this can be done prior to creating any cells or connections. I.e. gid2out is presently known from pc.set_gid2node(gid,...). Gid2in is presenly known from NetCon = pc.gid_connect(gid, target) and it is quite a style and hoc network programming change to use something like pc.need_gid(gid) before cells with their synapses are created since one would have to imagine that the hoc network setup code would have to be executed in a virtual or 'abstract' fashion without actually creating, cells, targets, or NetCons. Anyway, to potentially support this in the future, we write setup_target_lists to not use any PreSyn information. */ static int setup_target_lists(int**); static void fill_dma_send_lists(int, int*); static void setup_presyn_dma_lists() { // Create and attach BGP_DMASend instances to output Presyn NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { // only ones that generate spikes. eg. multisplit // registers a gid and even associates with a cell piece, but // that piece may not send spikes. if (ps->output_index_ >= 0) { bgpdma_cleanup_presyn(ps); ps->bgp.dma_send_ = new BGP_DMASend(); } }}} #if TWOPHASE // Need to use the bgp union slot for dma_send_phase2_. // Only will be non-NULL if the input is a phase 2 sender. NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { ps->bgp.srchost_ = 0; }}} #endif int* r; int sz = setup_target_lists(&r); fill_dma_send_lists(sz, r); del(r); // phase1debug(); // phase2debug(); } static void fill_dma_send_lists(int sz, int* r) { // sequence of gid, size, [totalsize], list // Note that totalsize is there only for output gid's and use_phase2_. // Using this sequence, copy lists to proper phase // 1 and phase 2 lists. (Phase one lists found in gid2out_ and phase // two lists found in gid2in_. for (int i = 0; i < sz;) { int gid = r[i++]; int size = r[i++]; PreSyn* ps = 0; if (use_phase2_) { // look in gid2in first if (gid2in_->find(gid, ps)) { // phase 2 target list BGP_DMASend_Phase2* bsp = new BGP_DMASend_Phase2(); ps->bgp.dma_send_phase2_ = bsp; bsp->ntarget_hosts_phase2_ = size; int* p = newintval(0, size); bsp->target_hosts_phase2_ = p; //printf("%d %d phase2 size=%d\n", nrnmpi_myid, gid, bsp->ntarget_hosts_phase2_); for (int j = 0; j < size; ++j) { p[j] = r[i++]; assert(p[j] != nrnmpi_myid); } } } if (!ps) { // phase 1 target list (or whole list if use_phase2 is 0) assert(gid2out_->find(gid, ps)); BGP_DMASend* bs = ps->bgp.dma_send_; bs->ntarget_hosts_phase1_ = size; if (use_phase2_ == 0) { bs->ntarget_hosts_ = size; }else{ bs->ntarget_hosts_ = r[i++]; } int* p = newintval(0, size); bs->target_hosts_ = p; //printf("%d %d phase1 size=%d\n", nrnmpi_myid, gid, bs->ntarget_hosts_); for (int j = 0; j < size; ++j) { p[j] = r[i++]; // There never was a possibility of send2self // because an output presyn is never in gid2in_. assert(p[j] != nrnmpi_myid); } } } // compute max_ntarget_host and max_multisend_targets max_ntarget_host = 0; max_multisend_targets = 0; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0) { // only ones that generate spikes BGP_DMASend* bs = ps->bgp.dma_send_; if (max_ntarget_host < bs->ntarget_hosts_) { max_ntarget_host = bs->ntarget_hosts_; } if (max_multisend_targets < bs->NTARGET_HOSTS_PHASE1) { max_multisend_targets = bs->NTARGET_HOSTS_PHASE1; } } }}} if (use_phase2_) NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { BGP_DMASend_Phase2* bsp = new BGP_DMASend_Phase2(); if (bsp && max_multisend_targets < bsp->ntarget_hosts_phase2_) { max_multisend_targets = bsp->ntarget_hosts_phase2_; } }}} } // return is vector and its size. The vector encodes a sequence of // gid, target list size, and target list static int setup_target_lists(int** r_return) { int *s, *r, *scnt, *rcnt, *sdispl, *rdispl; int nhost = nrnmpi_numprocs; celldebug("output gid", gid2out_); celldebug("input gid", gid2in_); // What are the target ranks for a given input gid. All the ranks // with the same input gid send that gid to the intermediate // gid%nhost rank. The intermediate rank can then construct the // list of target ranks for the gids it gets. // scnt is number of input gids from target scnt = newintval(0, nhost); NrnHashIterateKeyValue(Gid2PreSyn, gid2in_, int, gid, PreSyn*, ps) { ++scnt[gid%nhost]; }}} // s are the input gids from target to be sent to the various intermediates sdispl = newoffset(scnt, nhost); s = newintval(0, sdispl[nhost]); NrnHashIterateKeyValue(Gid2PreSyn, gid2in_, int, gid, PreSyn*, ps) { s[sdispl[gid%nhost]++] = gid; }}} // Restore sdispl for the message. del(sdispl); sdispl = newoffset(scnt, nhost); all2allv_int(s, scnt, sdispl, r, rcnt, rdispl, "gidin to intermediate"); del(s); del(scnt); del(sdispl); // r is the gids received by this intermediate rank from all other ranks. // Construct hash table for finding the target rank list for a given gid. gid2tarlist = new Int2TarList(1000); // Now figure out the size of the target list for each distinct gid in r. for (int i=0; i < rdispl[nhost]; ++i) { #if ALTHASH TarList* tl; if (gid2tarlist->find(r[i], tl)) { tl->size += 1; }else{ tl = new TarList(); tl->size = 1; gid2tarlist->insert(r[i], tl); } #else assert(0); #endif } // Conceptually, now the intermediate is the mpi source and the gid // sources are the mpi destination in regard to target lists. // It would be possible at this point, but confusing, // to allocate a s[rdispl[nhost]] and figure out scnt and sdispl by // by getting the counts and gids from the ranks that own the source // gids. In this way we could organize s without having to allocate // individual target lists on the intermediate and then allocate // another large s buffer to receive a copy of them. However for // this processing we already require two large buffers for input // gid's so there is no real savings of space. // So let's do the simple obvious sequence and now complete the // target lists. // Allocate the target lists (and set size to 0 (we will recount when filling). NrnHashIterate(Int2TarList, gid2tarlist, TarList*, tl) { tl->alloc(); tl->size = 0; }}} // fill the target lists for (int rank=0; rank < nhost; ++rank) { int b = rdispl[rank]; int e = rdispl[rank + 1]; for (int i=b; i < e; ++i) { TarList* tl; if (gid2tarlist->find(r[i], tl)) { tl->list[tl->size] = rank; tl->size++; } } } del(r); del(rcnt); del(rdispl); // Now the intermediate hosts have complete target lists and // the sources know the intermediate host from the gid2out_ map. // We could potentially organize here for two-phase exchange as well. // Which target lists are desired by the source rank? // Ironically, for round robin distributions, the target lists are // already on the proper source rank so the following code should // be tested for random distributions of gids. // How many on the source rank? scnt = newintval(0, nhost); NrnHashIterateKeyValue(Gid2PreSyn, gid2out_, int, gid, PreSyn*, ps) { if (ps->output_index_ >= 0) { // only ones that generate spikes ++scnt[gid%nhost]; } }}} sdispl = newoffset(scnt, nhost); // what are the gids of those target lists s = newintval(0, sdispl[nhost]); NrnHashIterateKeyValue(Gid2PreSyn, gid2out_, int, gid, PreSyn*, ps) { if (ps->output_index_ >= 0) { // only ones that generate spikes s[sdispl[gid%nhost]++] = gid; } }}} // Restore sdispl for the message. del(sdispl); sdispl = newoffset(scnt, nhost); all2allv_int(s, scnt, sdispl, r, rcnt, rdispl, "gidout"); #if TWOPHASE // fill in the tl->rank for phase 1 target lists // r is an array of source spiking gids // tl is list associating input gids with list of target ranks. for (int rank=0; rank < nhost; ++rank) { int b = rdispl[rank]; int e = rdispl[rank+1]; for (int i=b; i < e; ++i) { TarList* tl; // note that there may be input gids with no corresponding // output gid so that the find may not return true and in // that case the tl->rank remains -1. // For example multisplit gids or simulation of a subset of // cells. if (gid2tarlist->find(r[i], tl)) { tl->rank = rank; } } } del(s); del(scnt); del(sdispl); del(r); del(rcnt); del(rdispl); if (use_phase2_) { random_init(nrnmpi_myid + 1); NrnHashIterate(Int2TarList, gid2tarlist, TarList*, tl) { if (tl->rank >= 0) { // only if output gid is spike generating phase2organize(tl); } }}} } // For clarity, use the all2allv_int style of information flow // from source to destination as above (instead of the obsolete // section which was difficult to understand (It was last present at // 672:544c61a730ec)) // and also use a uniform code // for copying one and two phase information from a TarList to // develop the s, scnt, and sdispl buffers. That is, a buffer list // section in s for either a one-phase list or the much shorter // (individually) lists for first and second phases, has a // gid, size, totalsize header for each list where totalsize // is only present if the gid is an output gid (for // BGP_DMASend.ntarget_host used for conservation). // Note that totalsize is tl->indices[tl->size] // how much to send to each rank scnt = newintval(0, nhost); NrnHashIterateKeyValue(Int2TarList, gid2tarlist, int, gid, TarList*, tl) { if (tl->rank < 0) { // When the output gid does not generate spikes, that rank // is not interested if there is a target list for it. // If the output gid dies not exist, there is no rank. // In either case ignore this target list. continue; } if (tl->indices) { // indices[size] is the size of list but size of those // are the sublist phase 2 destination ranks which // don't get sent as part of the phase 2 target list. // Also there is a phase 1 target list of size so there // are altogether size+1 target lists. // (one phase 1 list and size phase 2 lists) scnt[tl->rank] += tl->size + 2; // gid, size, list for (int i=0; i < tl->size; ++i) { scnt[tl->list[tl->indices[i]]] += tl->indices[i+1] - tl->indices[i] + 1; // gid, size, list } }else{ // gid, list size, list scnt[tl->rank] += tl->size + 2; } if (use_phase2_) { // The phase 1 header has as its third element, the // total list size (needed for conservation); scnt[tl->rank] += 1; } }}} sdispl = newoffset(scnt, nhost); s = newintval(0, sdispl[nhost]); // what to send to each rank NrnHashIterateKeyValue(Int2TarList, gid2tarlist, int, gid, TarList*, tl) { if (tl->rank < 0) { continue; } if (tl->indices) { s[sdispl[tl->rank]++] = gid; s[sdispl[tl->rank]++] = tl->size; if (use_phase2_) { s[sdispl[tl->rank]++] = tl->indices[tl->size]; } for (int i = 0; i < tl->size; ++i) { s[sdispl[tl->rank]++] = tl->list[tl->indices[i]]; } for (int i = 0; i < tl->size; ++i) { int rank = tl->list[tl->indices[i]]; s[sdispl[rank]++] = gid; assert(tl->indices[i+1] > tl->indices[i]); s[sdispl[rank]++] = tl->indices[i+1] - tl->indices[i] - 1; for (int j = tl->indices[i] + 1; j < tl->indices[i+1]; ++j) { s[sdispl[rank]++] = tl->list[j]; } } }else{ // gid, list size, list s[sdispl[tl->rank]++] = gid; s[sdispl[tl->rank]++] = tl->size; if (use_phase2_) { s[sdispl[tl->rank]++] = tl->size; } for (int i = 0; i < tl->size; ++i) { s[sdispl[tl->rank]++] = tl->list[i]; } } delete tl; }}} delete gid2tarlist; sdispl = newoffset(scnt, nhost); all2allv_int(s, scnt, sdispl, r, rcnt, rdispl, "lists"); del(s); del(scnt); del(sdispl); del(rcnt); int sz = rdispl[nhost]; del(rdispl); *r_return = r; return sz; #else // NOT TWOPHASE --- obsolete // see 672:544c61a730ec #error "TWOPHASE required" #endif // obsolete } neuron-7.5/src/nrniv/bgpmeminfo.c000066400000000000000000000024771323325274500171250ustar00rootroot00000000000000#include #if defined(BGPDMA) && BGPDMA > 1 /* now compiled directly instead of included in bgpdma.cpp because it for an unknown reason now causes a bug in the functionality of pc.cell . */ /* from curl -k -O https://wiki.alcf.anl.gov/images/8/8d/Meminfo.c */ /* compile with -I/bgsys/drivers/ppcfloor/arch/include */ #undef STR #include #include #include #include /* gives total memory size per MPI process */ void getMemSize(long long *mem) { long long total; int node_config; _BGP_Personality_t personality; Kernel_GetPersonality(&personality, sizeof(personality)); total = BGP_Personality_DDRSizeMB(&personality); node_config = BGP_Personality_processConfig(&personality); if (node_config == _BGP_PERS_PROCESSCONFIG_VNM) total /= 4; else if (node_config == _BGP_PERS_PROCESSCONFIG_2x2) total /= 2; total *= 1024*1024; *mem = total; } /* gives total memory used */ void getUsedMem(long long *mem) { long long alloc; struct mallinfo m; m = mallinfo(); alloc = m.hblkhd + m.uordblks; *mem = alloc; } /* gives available memory */ void getFreeMem(long long *mem) { long long total, alloc; getMemSize(&total); getUsedMem(&alloc); *mem = total - alloc; } #endif /* BGPDMA > 1 */ neuron-7.5/src/nrniv/cachevec.cpp000066400000000000000000000052731323325274500171000ustar00rootroot00000000000000#include <../../nrnconf.h> // some functions needed by CACHEVEC. mostly to steer to the various update_ptrs // methods. #if HAVE_IV #include #include #include #include #endif #include #include #include #include #include #include #include #include #include extern "C" { void nrniv_recalc_ptrs(); extern double* nrn_recalc_ptr(double*); extern NetCvode* net_cvode_instance; } extern void nrn_linmod_update_ptrs(void*); extern void nrn_partrans_update_ptrs(); static Symbol* grsym_; static Symbol* ptrsym_; static Symbol* lmsym_; static Symbol* pshpsym_; static Symbol* ptrvecsym_; void nrniv_recalc_ptrs() { // PlayRecord and PreSyn pointers net_cvode_instance->recalc_ptrs(); hoc_List* hl; hoc_Item* q; #if HAVE_IV // update pointers used by Graph if (!grsym_) { grsym_ = hoc_lookup("Graph"); assert(grsym_->type == TEMPLATE); } hl = grsym_->u.ctemplate->olist; ITERATE(q, hl) { Object* obj = OBJ(q); Graph* g = (Graph*)obj->u.this_pointer; if (g) {g->update_ptrs();} } // update pointers used by PlotShape if (!pshpsym_) { pshpsym_ = hoc_lookup("PlotShape"); assert(pshpsym_->type == TEMPLATE); } hl = pshpsym_->u.ctemplate->olist; ITERATE(q, hl) { Object* obj = OBJ(q); ShapePlot* ps = (ShapePlot*)obj->u.this_pointer; if (ps) {ps->update_ptrs();} } // update pointers used by xpanel HocPanel::update_ptrs(); #endif // update pointers used by Pointer if (!ptrsym_) { ptrsym_ = hoc_lookup("Pointer"); assert(ptrsym_->type == TEMPLATE); } hl = ptrsym_->u.ctemplate->olist; ITERATE(q, hl) { Object* obj = OBJ(q); OcPointer* op = (OcPointer*)obj->u.this_pointer; if (op && op->p_) { double* pd = nrn_recalc_ptr(op->p_); if (op->p_ != pd ) { nrn_notify_pointer_disconnect(op); op->p_ = pd; op->valid_ = true; nrn_notify_when_double_freed(op->p_, op); } } } // update what LinearMechanisms are observing if (!lmsym_) { lmsym_ = hoc_lookup("LinearMechanism"); assert(lmsym_->type == TEMPLATE); } hl = lmsym_->u.ctemplate->olist; ITERATE(q, hl) { Object* obj = OBJ(q); void* pt = (void*)obj->u.this_pointer; if (pt) {nrn_linmod_update_ptrs(pt);} } // update pointers used by parallel transfer nrn_partrans_update_ptrs(); } void nrn_recalc_ptrvector() { // update pointers used by PtrVector hoc_List* hl; hoc_Item* q; if (!ptrvecsym_) { ptrvecsym_ = hoc_lookup("PtrVector"); assert(ptrvecsym_->type == TEMPLATE); } hl = ptrvecsym_->u.ctemplate->olist; ITERATE(q, hl) { Object* obj = OBJ(q); OcPtrVector* op = (OcPtrVector*)obj->u.this_pointer; op->ptr_update(); } } neuron-7.5/src/nrniv/classreg.cpp000077500000000000000000000003361323325274500171400ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "nrnrt.h" #define OC_CLASSES "nrnclass.h" #include "../ivoc/classreg.cpp" neuron-7.5/src/nrniv/cvodeobj.cpp000077500000000000000000000002561323325274500171310ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/cvodeobj.cpp" neuron-7.5/src/nrniv/cvodestb.cpp000077500000000000000000000002561323325274500171470ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/cvodestb.cpp" neuron-7.5/src/nrniv/cvtrset.cpp000077500000000000000000000002551323325274500170270ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/cvtrset.cpp" neuron-7.5/src/nrniv/cxprop.cpp000066400000000000000000000470721323325274500166550ustar00rootroot00000000000000#include <../../nrnconf.h> /* allocate and free property data and Datum arrays for nrniv this allows for the possibility of greater cache efficiency */ #include #include #include #include #include #include #include #include #include extern "C" { extern void nrn_mk_prop_pools(int); extern void nrn_cache_prop_realloc(); extern int nrn_is_ion(int); void nrn_update_ion_pointer(Symbol* sion, Datum* dp, int id, int ip); #if EXTRACELLULAR void nrn_extcell_update_param(); #endif extern void nrn_recalc_ptrs(double*(*)(double*)); static double* recalc_ptr(double*); void* nrn_pool_create(long count, int itemsize); void nrn_pool_delete(void* pool); void* nrn_pool_alloc(void* pool); void nrn_pool_free(void* pool, void* item); void nrn_pool_freeall(void* pool); } declareArrayPool(CharArrayPool, char) implementArrayPool(CharArrayPool, char) #define APSIZE 1000 declareArrayPool(DoubleArrayPool, double) implementArrayPool(DoubleArrayPool, double) declareArrayPool(DatumArrayPool, Datum) implementArrayPool(DatumArrayPool, Datum) static int force; static int npools_; static DoubleArrayPool** dblpools_; static DatumArrayPool** datumpools_; static void mk_prop_pools(int n); #define NRN_MECH_REORDER 1 /* Based on the nrn_threads tml->ml->nodelist order from the last call to nrn_cache_prop_realloc() (which writes a data file) from a previous launch, on this launch, read that file and create pools matched to the space needed by each thread and which, from the sequence of data allocation requests returns space that ends up being laid out in memory in just the way we want. The data file format is maxtype // so we can be sure we have large enough npools_ nthread // number of threads nmech // number of mechanisms used in this thread type sz1 sz2 ntget cnt // mechanism type, double/Datum array size total number of times alloc was called, how many needed for this thread // the above specifies the pool allocation // note that the pool chain order is the same as the thread order // there are nthread of the following lists cnt // number of mechanisms in thread type i seq // i is the tml->ml->data[i], seq is the allocation order // ie we want Note that the overall memory allocation sequence has to be identical to the original sequence in terms of get/put for the final layout to be exactly right for cache efficiency and for threads not to share cache lines. However, if this is not the case, the memory allocation is still correct, just not as efficient. */ #if NRN_MECH_REORDER static void read_temp1() { // return; FILE* f; int nscan, maxtype, imech, nmech, type, sz1, sz2, ntget, ith, nth, i, j, cnt, seq; char line[200]; sprintf(line, "temp_%d_%d", nrnmpi_myid, nrnmpi_numprocs); f = fopen(line, "r"); if (!f) { return; } force = 1; assert(fgets(line, 200, f)); assert(sscanf(line, "%d", &maxtype) == 1); mk_prop_pools(maxtype); long* ntget1 = new long[maxtype]; for (i=0; i < maxtype; ++i) { ntget1[i] = 0; } // allocate the pool space assert(fgets(line, 200, f)); assert(sscanf(line, "%d", &nth) == 1); for (ith=0; ith < nth; ++ith) { assert(fgets(line, 200, f)); assert(sscanf(line, "%d", &nmech) == 1); for (imech=0; imech < nmech; ++imech) { assert(fgets(line, 200, f)); assert(sscanf(line, "%d %d %d %d %d", &type, &sz1, &sz2, &ntget, &cnt) == 5); // printf("(%d %d %d %d %d) %s", type, sz1, sz2, ntget, cnt, line); ntget1[type] = ntget; if (sz1) { if (!dblpools_[type]) { dblpools_[type] = new DoubleArrayPool(cnt, sz1); }else{ dblpools_[type]->grow(cnt); } } if (sz2) { if (!datumpools_[type]) { datumpools_[type] = new DatumArrayPool(cnt, sz2); }else{ datumpools_[type]->grow(cnt); } } } } for (i = 0; i < maxtype; ++i) { if (dblpools_[i] && dblpools_[i]->size() < ntget1[i]) { dblpools_[i]->grow(ntget1[i] - dblpools_[i]->size()); } if (datumpools_[i] && datumpools_[i]->size() < ntget1[i]) { datumpools_[i]->grow(ntget1[i] - datumpools_[i]->size()); } } delete [] ntget1; // now the tricky part, put items in an unnatural order // first set all pointers to 0 for (i = 0; i < maxtype; ++i) { if (dblpools_[i]) { double** items = dblpools_[i]->items(); int sz = dblpools_[i]->size(); for (int j=0; j < sz; ++j) { items[j] = 0; } } if (datumpools_[i]) { Datum** items = datumpools_[i]->items(); int sz = datumpools_[i]->size(); for (int j=0; j < sz; ++j) { items[j] = 0; } } } // then set the proper seq pointers DoubleArrayPool** p1 = new DoubleArrayPool*[npools_]; DatumArrayPool** p2 = new DatumArrayPool*[npools_]; int* chain = new int[npools_]; for (i=0; i < npools_; ++i) { p1[i] = dblpools_[i]; p2[i] = datumpools_[i]; chain[i] = 0; } for (ith = 0; ith < nth; ++ith) { assert(fgets(line, 200, f)); assert(sscanf(line, "%d", &cnt) == 1); for (i=0; i < cnt; ++i) { assert(fgets(line, 200, f)); assert(sscanf(line, "%d %d %d", &type, &j, &seq)); if (dblpools_[type]) { double** items = dblpools_[type]->items(); assert(items[seq] == 0); items[seq] = p1[type]->element(j); ++chain[type]; } if (datumpools_[type]) { Datum** items = datumpools_[type]->items(); assert(items[seq] == 0); items[seq] = p2[type]->element(j); ++chain[type]; } } for (i=0; i < npools_; ++i) { if (chain[i]) { if (p1[i] && p2[i]) { assert(chain[i] == (p1[i]->chain_size() + p2[i]->chain_size())); }else if (p1[i]) { assert(chain[i] == p1[i]->chain_size()); }else if (p2[i]) { assert(chain[i] == p2[i]->chain_size()); } if (p1[i]) {p1[i] = p1[i]->chain();} if (p2[i]) {p2[i] = p2[i]->chain();} chain[i] = 0; } } } // finally set the rest for (i=0; i < npools_; ++i) { if (p1[i]) { int j = 0; int k = 0; int n = dblpools_[i]->size(); int sz = p1[i]->chain_size(); double** items = dblpools_[i]->items(); for (j = 0; j < n; ++j) { if (items[j] == 0) { assert(k < sz); items[j] = p1[i]->element(k); ++k; } } assert(k == sz); } if (p2[i]) { int j = 0; int k = 0; int n = datumpools_[i]->size(); int sz = p2[i]->chain_size(); Datum** items = datumpools_[i]->items(); for (j = 0; j < n; ++j) { if (items[j] == 0) { assert(k < sz); items[j] = p2[i]->element(k); ++k; } } assert(k == sz); } } delete [] p1; delete [] p2; fclose(f); } #endif // NRN_MECH_REORDER static void mk_prop_pools(int n) { int i; if (n > npools_) { DoubleArrayPool** p1 = new DoubleArrayPool*[n]; DatumArrayPool** p2 = new DatumArrayPool*[n]; for (i=0; i < n; ++i) { p1[i] = 0; p2[i] = 0; } if (dblpools_) { for (i=0; i < npools_; ++i) { p1[i] = dblpools_[i]; p2[i] = datumpools_[i]; } delete [] dblpools_; delete [] datumpools_; } dblpools_ = p1; datumpools_ = p2; npools_ = n; } } void nrn_mk_prop_pools(int n) { #if NRN_MECH_REORDER if (force == 0) { read_temp1(); } #endif mk_prop_pools(n); } double* nrn_prop_data_alloc(int type, int count, Prop* p) { if (!dblpools_[type]) { dblpools_[type] = new DoubleArrayPool(APSIZE, count); } assert(dblpools_[type]->d2() == count); p->_alloc_seq = dblpools_[type]->ntget(); double* pd = dblpools_[type]->alloc(); //if (type > 1) printf("nrn_prop_data_alloc %d %s %d %p\n", type, memb_func[type].sym->name, count, pd); return pd; } Datum* nrn_prop_datum_alloc(int type, int count, Prop* p) { int i; Datum* ppd; if (!datumpools_[type]) { datumpools_[type] = new DatumArrayPool(APSIZE, count); } assert(datumpools_[type]->d2() == count); p->_alloc_seq = datumpools_[type]->ntget(); ppd = datumpools_[type]->alloc(); //if (type > 1) printf("nrn_prop_datum_alloc %d %s %d %p\n", type, memb_func[type].sym->name, count, ppd); for (i=0; i < count; ++i) { ppd[i]._pvoid = 0; } return ppd; } void nrn_prop_data_free(int type, double* pd) { //if (type > 1) printf("nrn_prop_data_free %d %s %p\n", type, memb_func[type].sym->name, pd); if (pd) { dblpools_[type]->hpfree(pd); } } void nrn_prop_datum_free(int type, Datum* ppd) { //if (type > 1) printf("nrn_prop_datum_free %d %s %p\n", type, memb_func[type].sym->name, ppd); if (ppd) { datumpools_[type]->hpfree(ppd); } } declareStructPool(SectionPool, Section) implementStructPool(SectionPool, Section) static SectionPool* secpool_; Section* nrn_section_alloc() { if (!secpool_) { secpool_ = new SectionPool(1000); } Section* s = secpool_->alloc(); return s; } void nrn_section_free(Section* s) { secpool_->hpfree(s); } int nrn_is_valid_section_ptr(void* v) { if (!secpool_) {return 0; } return secpool_->is_valid_ptr(v); } int nrn_prop_is_cache_efficient() { DoubleArrayPool** p = new DoubleArrayPool*[npools_]; int r = 1; for (int i=0; i < npools_; ++i) { p[i] = dblpools_[i]; } for (int it = 0; it < nrn_nthread; ++it) { NrnThread* nt = nrn_threads + it; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; int i = tml->index; if (ml->nodecount > 0) { if (!p[i]) { //printf("thread %d mechanism %s pool chain does not exist\n", it, memb_func[i].sym->name); r = 0; continue; } if (p[i]->chain_size() != ml->nodecount) { //printf("thread %d mechanism %s chain_size %d nodecount=%d\n", it, memb_func[i].sym->name, p[i]->chain_size(), ml->nodecount); r = 0; p[i] = p[i]->chain(); continue; } for (int j = 0; j < ml->nodecount; ++j) { if (p[i]->element(j) != ml->data[j]) { //printf("thread %d mechanism %s instance %d element %p data %p\n", //it, memb_func[i].sym->name, j, p[i]->element(j), (ml->data + j)); r = 0; } } p[i] = p[i]->chain(); } } } delete [] p; return r; } // in-place data reallocation only intended to work when only ion data has // pointers to it and no one uses pointers to other prop data. If this does // not hold, then segmentation violations are likely to occur. // Note that the tml list is already ordered properly so ions are first. // We can therefore call the mechanism pdata_update function (which normally // contains pointers to ion variables) and the ion variables will exist // in their new proper locations. // we do one type (for all threads) at a time. Sadly, we have to keep the // original pool in existence til the new pool is complete. And we have to // keep old ion pools til the end. static DoubleArrayPool** oldpools_; // only here to allow assertion checking // extending to gui pointers and other well-known things that hold pointers // the idea is that there are not *that* many. static int recalc_index_; // the one we are working on static double* recalc_ptr(double* old) { // is old in the op pool? for (DoubleArrayPool* op = oldpools_[recalc_index_]; op; op = op->chain()) { long ds = op->chain_size() * op->d2(); if (old >= op->pool() && old < (op->pool() + ds)) { // if so then the value gives us the pointer in the new pool long offset = old - op->pool(); offset %= op->d2(); DoubleArrayPool* np = dblpools_[recalc_index_]; long i = (long)(*old); //if (i < 0 || i >= np->size()) abort(); assert(i >= 0 && i < np->size()); double* n = np->items()[i] + offset; //printf("recalc_ptr old=%p new=%p value=%g\n", old, n, *n); return n; } } return old; } static hoc_List* mechstanlist_; static int in_place_data_realloc() { int status = 0; NrnThread* nt; // what types are in use int* types = new int[n_memb_func]; oldpools_ = new DoubleArrayPool*[n_memb_func]; for (int i=0; i < n_memb_func; ++i) { types[i] = 0; oldpools_[i] = dblpools_[i]; } FOR_THREADS(nt) { for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { ++types[tml->index]; } } // iterate over those types for (int i=0; i < n_memb_func; ++i) if (types[i]) { int ision = nrn_is_ion(i); DoubleArrayPool* oldpool = dblpools_[i]; DoubleArrayPool* newpool = 0; // create the pool with proper chain sizes int ml_total_count = 0; // so we can know if we get them all FOR_THREADS(nt) { for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) if (i == tml->index) { ml_total_count += tml->ml->nodecount; if (!newpool) { newpool = new DoubleArrayPool(tml->ml->nodecount, oldpool->d2()); }else{ newpool->grow(tml->ml->nodecount); } break; } } // Any extras? Put them in a new last chain. // actually ml_total_count cannot be 0. int extra = oldpool->nget() - ml_total_count; assert(extra >= 0 && newpool); if (extra) { newpool->grow(extra); } newpool->free_all(); // items in pool data order // reset ml->data pointers to the new pool and copy the values FOR_THREADS(nt) { for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) if (i == tml->index) { Memb_list* ml = tml->ml; for (int j=0; j < ml->nodecount; ++j) { double* data = ml->data[j]; int ntget = newpool->ntget(); ml->data[j] = newpool->alloc(); for (int k=0; k < newpool->d2(); ++k) { ml->data[j][k] = data[k]; } // store in old location enough info // to construct a pointer to the new location for (int k=0; k < newpool->d2(); ++k) { data[k] = double(ntget); } } // update any Datum pointers to ion variable locations void (*s)(Datum*) = memb_func[i]._update_ion_pointers; if (s) for (int j=0; j < ml->nodecount; ++j) { (*s)(ml->pdata[j]); } } } // the newpool items are in the correct order for thread cache // efficiency. But there may be other old items, // e.g MechanismStandard that are not part of the memb lists. // We made the chain item for them above. Now, sadly, we // need to iterate over the MechanismStandards to find the // old pool data. if (extra) { // should assert that newpool last chain is empty. if (!mechstanlist_) { Symbol* s = hoc_lookup("MechanismStandard"); mechstanlist_ = s->u.ctemplate->olist; } hoc_Item* q; int found = 0; int looked_at = 0; ITERATE(q, mechstanlist_) { ++looked_at; MechanismStandard* ms = (MechanismStandard*)(OBJ(q)->u.this_pointer); NrnProperty* np = ms->np(); if (np->type() == i && np->deleteable()) { Prop* p = np->prop(); double* data = p->param; int ntget = newpool->ntget(); p->param = newpool->alloc(); for (int k=0; k < newpool->d2(); ++k) { p->param[k] = data[k]; } // store in old location enough info // to construct a pointer to the new location for (int k=0; k < newpool->d2(); ++k) { data[k] = double(ntget); } ++found; } } // unless we missed something that holds a prop pointer. // printf("%d extra %s, looked at %d, found %d\n", extra, memb_func[i].sym->name, looked_at, found); assert(extra == found); } dblpools_[i] = newpool; // let the gui and other things update recalc_index_ = i; nrn_recalc_ptrs(recalc_ptr); if (0 && !ision) { delete oldpool; assert (oldpool == oldpools_[i]); oldpools_[i] = 0; } } // update p->param for the node properties Memb_list** mlmap = new Memb_list*[n_memb_func]; FOR_THREADS(nt) { // make a map for (int i=0; i < n_memb_func; ++i) { mlmap[i] = 0; } for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { mlmap[tml->index] = tml->ml; tml->ml->nodecount = 0; } // fill for (int i=0; i < nt->end; ++i) { Node* nd = nt->_v_node[i]; for (Prop* p = nd->prop; p; p = p->next) { if (memb_func[p->type].current || memb_func[p->type].state || memb_func[p->type].initialize ) { Memb_list* ml = mlmap[p->type]; assert(ml->nodelist[ml->nodecount] == nd); if (!memb_func[p->type].hoc_mech) { p->param = ml->data[ml->nodecount]; } ++ml->nodecount; } } } } // one more thing to do for extracellular #if EXTRACELLULAR nrn_extcell_update_param(); #endif // finally get rid of the old ion pools for (int i=0; i < n_memb_func; ++i) if (types[i] && oldpools_[i]) { delete oldpools_[i]; } delete [] oldpools_; delete [] types; delete [] mlmap; // if useful, we could now realloc the Datum pools and just make // bit copies of the Datum values. return status; } void nrn_update_ion_pointer(Symbol* sion, Datum* dp, int id, int ip) { int iontype = sion->subtype; DoubleArrayPool* np = dblpools_[iontype]; DoubleArrayPool* op = oldpools_[iontype]; assert(np); assert(op); assert(ip < op->d2()); assert(1); // should point into pool() for one of the op pool chains // and the index should be a pointer to the double in np long i = (long)(*dp[id].pval); assert(i >= 0 && i < np->size()); double* pvar = np->items()[i]; dp[id].pval = pvar + ip; } void nrn_cache_prop_realloc() { if (!nrn_prop_is_cache_efficient()) { // printf("begin nrn_prop_is_cache_efficient %d\n", nrn_prop_is_cache_efficient()); in_place_data_realloc(); // printf("end nrn_prop_is_cache_efficient %d\n", nrn_prop_is_cache_efficient()); } return; #if NRN_MECH_REORDER nrn_prop_is_cache_efficient(); FILE* f; char buf[100]; int i, it, type; // we wish to rearrange the arrays so that they are in memb_list->data order within // the ArrayPools. We do not want to use up a lot of temporary space to do this // because there may not be much left. // In each pool all the pointers between put and get (nget of them) are in use. if (force) { sprintf(buf, "temp2_%d", nrnmpi_myid); }else{ sprintf(buf, "temp_%d_%d", nrnmpi_myid, nrnmpi_numprocs); } f = fopen(buf, "w"); fprintf(f, "%d\n", n_memb_func); fprintf(f, "%d\n", nrn_nthread); for (it = 0; it < nrn_nthread; ++it) { NrnThread* nt = nrn_threads + it; // how many mechanisms used in this thread i=0; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { ++i; } fprintf(f, "%d\n", i); for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; i = tml->index; int j, cnt = ml->nodecount; int sz1 = 0, sz2 = 0, ntget = 0; if (dblpools_[i]) { sz1 = dblpools_[i]->d2(); ntget = dblpools_[i]->ntget(); } if (datumpools_[i]) {sz2 = datumpools_[i]->d2(); } fprintf(f, "%d %d %d %d %d %s\n", i, sz1, sz2, ntget, cnt, memb_func[i].sym->name); } } // above is enough for allocating the pools. Now the proper order info. Memb_list** mlmap = new Memb_list*[n_memb_func]; for (it = 0; it < nrn_nthread; ++it) { NrnThread* nt = nrn_threads + it; for (i=0; i < n_memb_func; ++i) { mlmap[i] = 0; } //unnecessary but ... // how many prop used in this thread int cnt=0; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { cnt += tml->ml->nodecount; tml->ml->nodecount = 0; // recount them below mlmap[tml->index] = tml->ml; } fprintf(f, "%d\n", cnt); int cnt2 = 0; for (i=0; i < nt->end; ++i) { Node* nd = nt->_v_node[i]; for (Prop* p = nd->prop; p; p = p->next) { if (memb_func[p->type].current || memb_func[p->type].state || memb_func[p->type].initialize ) { Memb_list* ml = mlmap[p->type]; if(!ml || nd != ml->nodelist[ml->nodecount]) { abort(); } assert(ml && nd == ml->nodelist[ml->nodecount]); assert(fprintf(f, "%d %d %ld\n", p->type, ml->nodecount++, p->_alloc_seq) > 0); ++cnt2; } } } assert(cnt == cnt2); } delete [] mlmap; fclose(f); #endif } // for avoiding interthread cache line sharing // each thread needs its own pool instance void* nrn_pool_create(long count, int itemsize) { CharArrayPool* p = new CharArrayPool(count, itemsize); return (void*)p; } void nrn_pool_delete(void* pool) { CharArrayPool* p = (CharArrayPool*)pool; delete p; } void* nrn_pool_alloc(void* pool) { CharArrayPool* p = (CharArrayPool*)pool; return (void*)p->alloc(); } void nrn_pool_free(void* pool, void* item) { CharArrayPool* p = (CharArrayPool*)pool; p->hpfree((char*)item); } void nrn_pool_freeall(void* pool) { CharArrayPool* p = (CharArrayPool*)pool; p->free_all(); } neuron-7.5/src/nrniv/datapath.cpp000077500000000000000000000002521323325274500171200ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../ivoc/datapath.cpp" neuron-7.5/src/nrniv/finithnd.cpp000066400000000000000000000061551323325274500171420ustar00rootroot00000000000000#include <../../nrnconf.h> /* statements that are called during finitialize() Type 1 is the default. Type 0 are called after v is set but before INITIAL blocks are called. This is also after clearing the event queue and playing the time 0 values. Type 1 are after INITIAL blocks (and linmod and init_net_events) but before variable step re_init or fcurrent(); Type 2 are just before return. ie after vector initial record and delivery of events at t=0; Type 3 are at the very beginning of finitialize. ie structure changes are allowed. */ #include #include #include #include #include class FInitialHandler; declarePtrList(FIHList, FInitialHandler) implementPtrList(FIHList, FInitialHandler) class FInitialHandler { public: FInitialHandler(int, const char*, Object*, Object* pyact=NULL); virtual ~FInitialHandler(); HocCommand* stmt_; int type_; static FIHList* fihlist_[4]; }; extern "C" { void nrn_fihexec(int type); } void nrn_fihexec(int type) { FIHList* fl = FInitialHandler::fihlist_[type]; if (fl) { int i, cnt; cnt = fl->count(); for (i=0; i < cnt; ++i) { FInitialHandler* f = fl->item(i); f->stmt_->execute(); } } } static double allprint(void* v) { int type, i, cnt; for (type=0; type < 4; ++type) { FIHList* fl = FInitialHandler::fihlist_[type]; if (fl && fl->count() > 0) { cnt = fl->count(); printf("Type %d FInitializeHandler statements\n", type); for (i=0; i < cnt; ++i) { FInitialHandler* f = fl->item(i); if (f->stmt_->pyobject()) { printf("\t%s\n", hoc_object_name(f->stmt_->pyobject())); }else if (f->stmt_->object()) { printf("\t%s.%s\n", hoc_object_name(f->stmt_->object()), f->stmt_->name()); }else{ printf("\t%s\n", f->stmt_->name()); } } } } return 0.; } static Member_func members[] = { "allprint", allprint, 0, 0 }; static void* finithnd_cons(Object*) { int type = 1; // default is after INITIAL blocks are called int ia = 1; if (hoc_is_double_arg(ia)) { type = (int)chkarg(ia, 0, 3); ++ia; } char* s = NULL; Object* pyact = NULL; if (hoc_is_object_arg(ia)) { pyact = *hoc_objgetarg(ia); if (!pyact) { hoc_execerror("arg is None", 0); } }else{ s =gargstr(ia); } ++ia; Object* obj = NULL; if (ifarg(ia)) { obj = *hoc_objgetarg(ia); } FInitialHandler* f = new FInitialHandler(type, s, obj, pyact); return f; } static void finithnd_destruct(void* v) { FInitialHandler* f = (FInitialHandler*)v; delete f; } void FInitializeHandler_reg() { class2oc("FInitializeHandler", finithnd_cons, finithnd_destruct, members, NULL, NULL, NULL); } FIHList* FInitialHandler::fihlist_[4]; FInitialHandler::FInitialHandler(int i, const char* s, Object* obj, Object* pyact) { if (!fihlist_[i]) { fihlist_[i] = new FIHList(10); } type_ = i; if (pyact) { stmt_ = new HocCommand(pyact); }else{ stmt_ = new HocCommand(s, obj); } fihlist_[i]->append(this); } FInitialHandler::~FInitialHandler() { delete stmt_; int i, cnt; cnt = fihlist_[type_]->count(); for (i=0; i < cnt; ++i) { if (fihlist_[type_]->item(i) == this) { fihlist_[type_]->remove(i); return; } } } neuron-7.5/src/nrniv/geometry3d.cpp000066400000000000000000001010431323325274500174110ustar00rootroot00000000000000/* This file contains code adapted from p3d.py in http://code.google.com/p/pythonisosurfaces/source/checkout which was released under the new BSD license. accessed 31 July 2012 */ #include #include #include //#include extern "C" { int geometry3d_find_triangles(double value0, double value1, double value2, double value3, double value4, double value5, double value6, double value7, double x0, double x1, double y0, double y1, double z0, double z1, double* out, int offset); double geometry3d_llgramarea(double* p0, double* p1, double* p2) ; double geometry3d_sum_area_of_triangles(double* tri_vec, int len); } inline double max(double a, double b) { return a > b ? a : b; } const int edgeTable[] = { 0x0, 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00, 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90, 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30, 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0, 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60, 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0, 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950, 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0, 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0, 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650, 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0, 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460, 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0, 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230, 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190, 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x0}; /* CTNG:tritable */ const int triTable[256][16] = { {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1}, {3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1}, {4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1}, {9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1}, {10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1}, {5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1}, {8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1}, {2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1}, {11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1}, {5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1}, {11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1}, {11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1}, {9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1}, {6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1}, {6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1}, {8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1}, {7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1}, {3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1}, {9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1}, {8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1}, {0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1}, {6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1}, {10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1}, {10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1}, {0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1}, {3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1}, {9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1}, {8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1}, {3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1}, {10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1}, {10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1}, {7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1}, {1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1}, {11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1}, {8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1}, {0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1}, {7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1}, {7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1}, {10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1}, {0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1}, {7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1}, {9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1}, {6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1}, {4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1}, {10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1}, {8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1}, {1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1}, {10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1}, {10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1}, {9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1}, {7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1}, {3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1}, {7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1}, {3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1}, {6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1}, {9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1}, {1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1}, {4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1}, {7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1}, {6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1}, {0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1}, {6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1}, {0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1}, {11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1}, {6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1}, {5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1}, {9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1}, {1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1}, {10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1}, {0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1}, {5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1}, {11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1}, {9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1}, {7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1}, {2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1}, {9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1}, {1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1}, {10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1}, {2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1}, {0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1}, {0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1}, {9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1}, {5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1}, {5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1}, {9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1}, {1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1}, {3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1}, {4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1}, {9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1}, {11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1}, {2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1}, {9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1}, {3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1}, {1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1}, {4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1}, {0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1}, {1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; /* CTNG:interpedge */ void geometry3d_vi(double* p1, double* p2, double v1, double v2, double* out) { if (fabs(v1) < 0.000000000001) { out[0] = p1[0]; out[1] = p1[1]; out[2] = p1[2]; return; } if (fabs(v2) < 0.000000000001) { out[0] = p2[0]; out[1] = p2[1]; out[2] = p2[2]; return; } double delta_v = v1 - v2; if (fabs(delta_v) < 0.0000000001) { out[0] = p1[0]; out[1] = p1[1]; out[2] = p1[2]; return; } double mu = v1 / delta_v; if (isnan(mu)) { printf("geometry3d_vi error. delta_v = %g, v1 = %g, v2 = %g\n", delta_v, v1, v2); } out[0] = p1[0] + mu * (p2[0] - p1[0]); out[1] = p1[1] + mu * (p2[1] - p1[1]); out[2] = p1[2] + mu * (p2[2] - p1[2]); } int geometry3d_find_triangles(double value0, double value1, double value2, double value3, double value4, double value5, double value6, double value7, double x0, double x1, double y0, double y1, double z0, double z1, double* out, int offset) { out = out + offset; double position[8][3] = {{x0, y0, z0}, {x1, y0, z0}, {x1, y1, z0}, {x0, y1, z0}, {x0, y0, z1}, {x1, y0, z1}, {x1, y1, z1}, {x0, y1, z1}}; /* CTNG:domarch */ int cubeIndex = 0; if (value0 < 0) cubeIndex |= 1; if (value1 < 0) cubeIndex |= 2; if (value2 < 0) cubeIndex |= 4; if (value3 < 0) cubeIndex |= 8; if (value4 < 0) cubeIndex |= 16; if (value5 < 0) cubeIndex |= 32; if (value6 < 0) cubeIndex |= 64; if (value7 < 0) cubeIndex |= 128; int et = edgeTable[cubeIndex]; if (et == 0) return 0; double vertexList[12][3]; if (et & 1) geometry3d_vi(position[0], position[1], value0, value1, vertexList[0]); if (et & 2) geometry3d_vi(position[1], position[2], value1, value2, vertexList[1]); if (et & 4) geometry3d_vi(position[2], position[3], value2, value3, vertexList[2]); if (et & 8) geometry3d_vi(position[3], position[0], value3, value0, vertexList[3]); if (et & 16) geometry3d_vi(position[4], position[5], value4, value5, vertexList[4]); if (et & 32) geometry3d_vi(position[5], position[6], value5, value6, vertexList[5]); if (et & 64) geometry3d_vi(position[6], position[7], value6, value7, vertexList[6]); if (et & 128) geometry3d_vi(position[7], position[4], value7, value4, vertexList[7]); if (et & 256) geometry3d_vi(position[0], position[4], value0, value4, vertexList[8]); if (et & 512) geometry3d_vi(position[1], position[5], value1, value5, vertexList[9]); if (et & 1024) geometry3d_vi(position[2], position[6], value2, value6, vertexList[10]); if (et & 2048) geometry3d_vi(position[3], position[7], value3, value7, vertexList[11]); int const * const tt = triTable[cubeIndex]; int i, j, k, count; for (i = 0, count = 0; i < 16; i += 3, count++) { if (tt[i] == -1) break; for (k = 0; k < 3; k++) { for (j = 0; j < 3; j++) out[j] = vertexList[tt[i + k]][j]; out += 3; } } return count; } double geometry3d_llgramarea(double* p0, double* p1, double* p2) { /* setup the vectors */ double a[] = {p0[0] - p1[0], p0[1] - p1[1], p0[2] - p1[2]}; double b[] = {p0[0] - p2[0], p0[1] - p2[1], p0[2] - p2[2]}; /* take the cross-product */ double cpx = a[1] * b[2] - a[2] * b[1]; double cpy = a[2] * b[0] - a[0] * b[2]; double cpz = a[0] * b[1] - a[1] * b[0]; return sqrt(cpx * cpx + cpy * cpy + cpz * cpz); } double geometry3d_sum_area_of_triangles(double* tri_vec, int len) { double sum = 0; for (int i = 0; i < len; i += 9) { sum += geometry3d_llgramarea(tri_vec + i, tri_vec + i + 3, tri_vec + i + 6); } return sum / 2.; } /***************************************************************************** * this contains cone, and cylinder code translated and modified * from Barbier and Galin 2004's example code * see /u/ramcd/spatial/experiments/one_time_tests/2012-06-28/cone.cpp * on 7 june 2012, the original code was available online at * http://jgt.akpeters.com/papers/BarbierGalin04/Cone-Sphere.zip ****************************************************************************/ class geometry3d_Cylinder { public: geometry3d_Cylinder(double x0, double y0, double z0, double x1, double y1, double z1, double r); //~geometry3d_Cylinder(); double signed_distance(double px, double py, double pz); private: //double x0, y0, z0, x1, y1, z1, r; double r, rr, axisx, axisy, axisz, cx, cy, cz, h; }; geometry3d_Cylinder::geometry3d_Cylinder(double x0, double y0, double z0, double x1, double y1, double z1, double r) : r(r), cx((x0 + x1) / 2.), cy((y0 + y1) / 2.), cz((z0 + z1) / 2.), rr(r * r) { axisx = x1 - x0; axisy = y1 - y0; axisz = z1 - z0; double axislength = sqrt(axisx * axisx + axisy * axisy + axisz * axisz); axisx /= axislength; axisy /= axislength; axisz /= axislength; h = axislength / 2.; } double geometry3d_Cylinder::signed_distance(double px, double py, double pz) { double nx, ny, nz, y, yy, xx, x; nx = px - cx; ny = py - cy; nz = pz - cz; y = fabs(axisx * nx + axisy * ny + axisz * nz); yy = y * y; xx = nx * nx + ny * ny + nz * nz - yy; if (y < h) { return max(-fabs(h - y), sqrt(xx) - r); } else { y -= h; yy = y * y; if (xx < rr) { return fabs(y); } else { x = sqrt(xx) - r; return sqrt(yy + x * x); } } } extern "C" { void* geometry3d_new_Cylinder(double x0, double y0, double z0, double x1, double y1, double z1, double r) { return new geometry3d_Cylinder(x0, y0, z0, x1, y1, z1, r); } void geometry3d_delete_Cylinder(void* ptr) { delete (geometry3d_Cylinder*) ptr; } // TODO: add validation for ptr double geometry3d_Cylinder_signed_distance(void* ptr, double px, double py, double pz) { return ((geometry3d_Cylinder*) ptr) -> signed_distance(px, py, pz); } } class geometry3d_Cone { public: geometry3d_Cone(double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1); double signed_distance(double px, double py, double pz); private: double axisx, axisy, axisz, cx, cy, cz, h, rra, rrb, conelength; double side1, side2, x0, y0, z0, r0, axislength; }; geometry3d_Cone::geometry3d_Cone(double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1) : cx((x0 + x1) / 2.), cy((y0 + y1) / 2.), cz((z0 + z1) / 2.), rra(r0 * r0), rrb(r1 * r1), x0(x0), y0(y0), z0(z0), r0(r0) { // TODO: these are preconditions; the python assures them, but could/should // take care of that here assert(r1 <= r0); assert(r1 >= 0); axisx = x1 - x0; axisy = y1 - y0; axisz = z1 - z0; axislength = sqrt(axisx * axisx + axisy * axisy + axisz * axisz); axisx /= axislength; axisy /= axislength; axisz /= axislength; h = axislength / 2.; rra = r0 * r0; rrb = r1 * r1; conelength = sqrt((r1 - r0) * (r1 - r0) + axislength * axislength); side1 = (r1 - r0) / conelength; side2 = axislength / conelength; } double geometry3d_Cone::signed_distance(double px, double py, double pz) { double nx, ny, nz, y, yy, xx, x, rx, ry; nx = px - x0; ny = py - y0; nz = pz - z0; y = axisx * nx + axisy * ny + axisz * nz; yy = y * y; xx = nx * nx + ny * ny + nz * nz - yy; // in principle, xx >= 0, but roundoff errors may cause trouble if (xx < 0) xx = 0; if (y < 0) { if (xx < rra) return -y; x = sqrt(xx) - r0; return sqrt(x * x + yy); } else if (xx < rrb) { return y - axislength; } else { x = sqrt(xx) - r0; if (y < 0) { if (x < 0) return y; return sqrt(x * x + yy); } else { ry = x * side1 + y * side2; if (ry < 0) return sqrt(x * x + yy); rx = x * side2 - y * side1; if (ry > conelength) { ry -= conelength; return sqrt(rx * rx + ry * ry); } else { return rx; } } } } extern "C" { void* geometry3d_new_Cone(double x0, double y0, double z0, double r0, double x1, double y1, double z1, double r1) { return new geometry3d_Cone(x0, y0, z0, r0, x1, y1, z1, r1); } void geometry3d_delete_Cone(void* ptr) { delete (geometry3d_Cone*) ptr; } // TODO: add validation for ptr double geometry3d_Cone_signed_distance(void* ptr, double px, double py, double pz) { return ((geometry3d_Cone*) ptr) -> signed_distance(px, py, pz); } } class geometry3d_Sphere { public: geometry3d_Sphere(double x, double y, double z, double r); double signed_distance(double px, double py, double pz); private: double x, y, z, r; }; geometry3d_Sphere::geometry3d_Sphere(double x, double y, double z, double r) : x(x), y(y), z(z), r(r) {} double geometry3d_Sphere::signed_distance(double px, double py, double pz) { return sqrt(pow(x - px, 2) + pow(y - py, 2) + pow(z - pz, 2)) - r; } extern "C" { void* geometry3d_new_Sphere(double x, double y, double z, double r) { return new geometry3d_Sphere(x, y, z, r); } void geometry3d_delete_Sphere(void* ptr) { delete (geometry3d_Sphere*) ptr; } // TODO: add validation for ptr double geometry3d_Sphere_signed_distance(void* ptr, double px, double py, double pz) { return ((geometry3d_Sphere*) ptr) -> signed_distance(px, py, pz); } } class geometry3d_Plane { public: geometry3d_Plane(double x, double y, double z, double nx, double ny, double nz); double signed_distance(double px, double py, double pz); private: double nx, ny, nz; double d, mul; }; geometry3d_Plane::geometry3d_Plane(double x, double y, double z, double nx, double ny, double nz) : nx(nx), ny(ny), nz(nz), d(-(nx * x + ny * y + nz * z)), mul(1. / sqrt(nx * nx + ny * ny + nz * nz)) {} double geometry3d_Plane::signed_distance(double px, double py, double pz) { return (nx * px + ny * py + nz * pz + d) * mul; } extern "C" { void* geometry3d_new_Plane(double x, double y, double z, double nx, double ny, double nz) { return new geometry3d_Plane(x, y, z, nx, ny, nz); } void geometry3d_delete_Plane(void* ptr) { delete (geometry3d_Plane*) ptr; } // TODO: add validation for ptr double geometry3d_Plane_signed_distance(void* ptr, double px, double py, double pz) { return ((geometry3d_Plane*) ptr) -> signed_distance(px, py, pz); } } /* extern "C" { PyObject* nrnpy_pyCallObject(PyObject*, PyObject*); void print_numbers(PyObject *p) { for (Py_ssize_t i = 0; i< PyList_Size(p); i++) { PyObject* obj = PyList_GetItem(p, i); printf("%g ", PyFloat_AsDouble(obj)); } printf("\n"); } // TODO: it would be nice to remove the python dependence, because that // limits us to mostly single threaded due to the global interpreter // lock int geometry3d_process_cell(int i, int j, int k, PyObject* objects, double* xs, double* ys, double* zs, double* tridata, int start) { double x, y, z, x1, y1, z1, xx, yy, zz; x = xs[i]; y = ys[j]; z = zs[k]; x1 = xs[i + 1]; y1 = ys[j + 1]; z1 = zs[k + 1]; double value[8], current_value; PyObject* result; PyObject* obj; printf("inside process_cell\n"); // march around the cube for (int m = 0; m < 8; m++) { // NOTE: only describing changes from previous case switch(m) { case 0: xx = x; yy = y; zz = z; break; case 1: xx = x1; break; case 2: yy = y1; break; case 3: xx = x; break; case 4: yy = y; zz = z1; break; case 5: xx = x1; break; case 6: yy = y1; break; case 7: xx = x; break; } printf("phase 0, len(objects) = %ld\n", PyList_Size(objects)); obj = PyList_GetItem(objects, 0); printf("phase 0a, obj = %x\n", (void*) obj); result = PyEval_CallMethod(obj, "distance", "ddd", xx, yy, zz); //Py_DECREF(obj); printf("phase 1\n"); current_value = PyFloat_AsDouble(result); //Py_DECREF(result); for (Py_ssize_t n = 1; n < PyList_Size(objects); n++) { printf("phase 2, n = %ld\n", n); obj = PyList_GetItem(objects, n); result = PyEval_CallMethod(obj, "distance", "ddd", xx, yy, zz); Py_DECREF(obj); current_value = min(current_value, PyFloat_AsDouble(result)); //Py_DECREF(result); } value[m] = current_value; } printf("finishing up; start = %d\n", start); return start + 9 * geometry3d_find_triangles(value[0], value[1], value[2], value[3], value[4], value[5], value[6], value[7], x, x1, y, y1, z, z1, tridata, start); } int geometry3d_test_call_function(PyObject* obj) { printf("inside\n"); if (obj == NULL) printf("obj is NULL\n"); Py_INCREF(obj); PyEval_CallObject(obj, obj); return 0; } int geometry3d_test_call_function3(int (*func) (void)) { return func(); } int geometry3d_test_call_method(PyObject* list, PyObject* obj) { PyEval_CallMethod(list, "insert", "O", obj); return 0; } // this works, but is slower than the python version int geometry3d_contains_surface(int i, int j, int k, double (*objdist)(double, double, double), double* xs, double* ys, double* zs, double dx, double r_inner, double r_outer) { bool has_neg = false, has_pos = false; double xbar = xs[i] + dx / 2; double ybar = ys[j] + dx / 2; double zbar = zs[k] + dx / 2; double d = fabs(objdist(xbar, ybar, zbar)); //if (i == 586 && j == 2169 && k == 83) {printf("at magic point, d=%g\n", d);} //printf("sphere test: d = %g, r_inner = %g, r_outer = %g\n", d, r_inner, r_outer); if (d <= r_inner) return 1; if (d >= r_outer) return 0; // // spheres alone are indeterminant; check corners // for (int di = 0; di < 2; di++) { // for (int dj = 0; dj < 2; dj++) { // for (int dk = 0; dk < 2; dk++) { // d = objdist(xs[i + di], ys[j + dj], zs[k + dk]); // //printf("d = %g\n", d); // if (d <= 0) has_neg = true; // if (d >= 0) has_pos = true; // if (has_neg && has_pos) return 1; // } // } // } // spheres alone are indeterminant; check corners for (double* x = xs + i; x < xs + i + 2; x++) { for (double* y = ys + j; y < ys + j + 2; y++) { for (double* z = zs + k; z < zs + k + 2; z++) { d = objdist(*x, *y, *z); if (d <= 0) has_neg = true; if (d >= 0) has_pos = true; if (has_neg && has_pos) return 1; } } } return 0; } } */ neuron-7.5/src/nrniv/glinerec.cpp000066400000000000000000000047631323325274500171320ustar00rootroot00000000000000#include <../../nrnconf.h> // we want to plot correctly during the local step method when // cvode.solve(tstop) is invoked. However, not all GraphLine are time graphs, // so we assume that the time graphs will be added during stdinit // during iteration over the graph lists of the stdrun implementation which // calls Graph.simgraph(). Constantly updating during stdinit // overcomes the problem of new addexpr, addval, and changed locations of // point processes. // Note: cvode.simgraph_remove() deletes all the GLineRecord instances. #include #include "nrnoc2iv.h" #include "vrecitem.h" #include "netcvode.h" #include "cvodeobj.h" #if HAVE_IV // to end of file #include "graph.h" extern "C" { extern NetCvode* net_cvode_instance; }; class GLineRecordList; class GLineRecord : public PlayRecord { public: GLineRecord(GraphLine*); virtual ~GLineRecord(); virtual void install(Cvode* cv) { record_add(cv); } virtual void record_init() {gl_->simgraph_init();} virtual void continuous(double t) { gl_->simgraph_continuous(t);} virtual bool uses(void* v) { return (void*)gl_ == v; } GraphLine* gl_; }; declarePtrList(GLineRecordList, GLineRecord) implementPtrList(GLineRecordList, GLineRecord) static GLineRecordList* grl; // Since GraphLine is not an observable, its destructor calls this. // So ivoc will work, a stub is placed in ivoc/datapath.cpp void graphLineRecDeleted(GraphLine* gl) { if (!grl) { return; } int i, cnt = grl->count(); for (i = 0; i < cnt; ++i) { GLineRecord* r = grl->item(i); if (r->uses(gl)) { delete r; return; } } } void NetCvode::simgraph_remove() { if (!grl) { return; } while (grl->count()) { delete grl->item(grl->count()-1); } } void Graph::simgraph() { int i, cnt; if (!grl) { grl = new GLineRecordList(); } cnt = line_list_.count(); for (i = 0; i < cnt; ++i) { GraphLine* gl = line_list_.item(i); PlayRecord* pr = net_cvode_instance->playrec_uses(gl); if (pr) { delete pr; } GLineRecord* r = new GLineRecord(gl); grl->append(r); } } GLineRecord::GLineRecord(GraphLine* gl) : PlayRecord(NULL){ //shouldnt be necessary but just in case // printf("GLineRecord %p name=%s\n", this, gl->name()); gl_ = gl; gl_->simgraph_activate(true); pd_ = hoc_val_pointer(gl->name()); } GLineRecord::~GLineRecord(){ // printf("~GLineRecord %p\n", this); int i; for (i = grl->count()-1; i >= 0; --i) { if (grl->item(i) == this) { gl_->simgraph_activate(false); grl->remove(i); return; } } } #else void NetCvode::simgraph_remove() {} #endif neuron-7.5/src/nrniv/have2want.cpp000066400000000000000000000164721323325274500172410ustar00rootroot00000000000000/* To be included by a file that desires rendezvous rank exchange functionality. Need to define HAVEWANT_t, HAVEWANT_alltoallv, and HAVEWANT2Int */ #ifdef have2want_cpp #error "This implementation can only be included once" /* The static function names could involve a macro name. */ #endif #define have2want_cpp /* A rank owns a set of HAVEWANT_t keys and wants information associated with a set of HAVEWANT_t keys owned by unknown ranks. Owners do not know which ranks want their information. Ranks that want info do not know which ranks own that info. The have_to_want function returns two new vectors of keys along with associated count and displacement vectors of length nhost and nhost+1 respectively. Note that a send_to_want_displ[i+1] = send_to_want_cnt[i] + send_to_want_displ[i] . send_to_want[send_to_want_displ[i] to send_to_want_displ[i+1]] contains the keys from this rank for which rank i wants information. recv_from_have[recv_from_have_displ[i] to recv_from_have_displ[i+1] contains the keys from which rank i is sending information to this rank. Note that on rank i, the order of keys in the rank j area of send_to_want is the same order of keys on rank j in the ith area in recv_from_have. The rendezvous_rank function is used to parallelize this computation and minimize memory usage so that no single rank ever needs to know all keys. */ #ifndef HAVEWANT_t #define HAVEWANT_t int #endif // round robin default rendezvous rank function static int default_rendezvous(HAVEWANT_t key) { return key % nrnmpi_numprocs; } static int* cnt2displ(int* cnt) { int* displ = new int[nrnmpi_numprocs+1]; displ[0] = 0; for (int i=0; i < nrnmpi_numprocs; ++i) { displ[i+1] = displ[i] + cnt[i]; } return displ; } static int* srccnt2destcnt(int* srccnt) { int* destcnt = new int[nrnmpi_numprocs]; nrnmpi_int_alltoall(srccnt, destcnt, 1); return destcnt; } static void rendezvous_rank_get(HAVEWANT_t* data, int size, HAVEWANT_t* &sdata, int* &scnt, int* &sdispl, HAVEWANT_t* &rdata, int* &rcnt, int* &rdispl, int (*rendezvous_rank)(HAVEWANT_t) ){ int nhost = nrnmpi_numprocs; int rank = nrnmpi_myid; // count what gets sent scnt = new int[nhost]; for (int i=0; i < nhost; ++i) { scnt[i] = 0; } for (int i=0; i < size; ++i) { int r = (*rendezvous_rank)(data[i]); ++scnt[r]; } sdispl = cnt2displ(scnt); rcnt = srccnt2destcnt(scnt); rdispl = cnt2displ(rcnt); sdata = new HAVEWANT_t[sdispl[nhost]]; rdata = new HAVEWANT_t[rdispl[nhost]]; // scatter data into sdata by recalculating scnt. for (int i=0; i < nhost; ++i) { scnt[i] = 0; } for (int i=0; i < size; ++i) { int r = (*rendezvous_rank)(data[i]); sdata[sdispl[r] + scnt[r]] = data[i]; ++scnt[r]; } HAVEWANT_alltoallv(sdata, scnt, sdispl, rdata, rcnt, rdispl); } static void have_to_want( HAVEWANT_t* have, int have_size, HAVEWANT_t* want, int want_size, HAVEWANT_t* &send_to_want, int* &send_to_want_cnt, int* &send_to_want_displ, HAVEWANT_t* &recv_from_have, int* &recv_from_have_cnt, int* &recv_from_have_displ, int (*rendezvous_rank)(HAVEWANT_t) ){ // 1) Send have and want to the rendezvous ranks. // 2) Rendezvous rank matches have and want. // 3) Rendezvous ranks tell the want ranks which ranks own the keys // 4) Ranks that want tell owner ranks where to send. int nhost = nrnmpi_numprocs; int rank = nrnmpi_myid; // 1) Send have and want to the rendezvous ranks. HAVEWANT_t *have_s_data, *have_r_data; int *have_s_cnt, *have_s_displ, *have_r_cnt, *have_r_displ; rendezvous_rank_get(have, have_size, have_s_data, have_s_cnt, have_s_displ, have_r_data, have_r_cnt, have_r_displ, rendezvous_rank ); // assume it is an error if two ranks have the same key so create // hash table of key2rank. Will also need it for matching have and want HAVEWANT2Int havekey2rank = HAVEWANT2Int(have_r_displ[nhost]); for (int r=0; r < nhost; ++r) { for (int i=0; i < have_r_cnt[r]; ++i) { HAVEWANT_t key = have_r_data[have_r_displ[r] + i]; int srcrank; if (havekey2rank.find(key, srcrank)) { char buf[200]; sprintf(buf, "key %lld owned by multiple ranks\n", (long long)key); hoc_execerror(buf, 0); } havekey2rank[key] = r; } } delete [] have_r_data; delete [] have_r_cnt; delete [] have_r_displ; HAVEWANT_t *want_s_data, *want_r_data; int *want_s_cnt, *want_s_displ, *want_r_cnt, *want_r_displ; rendezvous_rank_get(want, want_size, want_s_data, want_s_cnt, want_s_displ, want_r_data, want_r_cnt, want_r_displ, rendezvous_rank ); // 2) Rendezvous rank matches have and want. // we already have made the havekey2rank map. // Create an array parallel to want_r_data which contains the ranks that // have that data. int n = want_r_displ[nhost]; int* want_r_ownerranks = new int[n]; for (int r=0; r < nhost; ++r) { for (int i=0; i < want_r_cnt[r]; ++i) { int ix = want_r_displ[r] + i; HAVEWANT_t key = want_r_data[ix]; int srcrank; if (!havekey2rank.find(key, srcrank)) { char buf[200]; sprintf(buf, "key = %lld is wanted but does not exist\n", (long long)key); hoc_execerror(buf, 0); } want_r_ownerranks[ix] = srcrank; } } delete [] want_r_data; // 3) Rendezvous ranks tell the want ranks which ranks own the keys // The ranks that want keys need to know the ranks that own those keys. // The want_s_ownerranks will be parallel to the want_s_data. // That is, each item defines the rank from which information associated // with that key is coming from int* want_s_ownerranks = new int[want_s_displ[nhost]]; nrnmpi_int_alltoallv(want_r_ownerranks, want_r_cnt, want_r_displ, want_s_ownerranks, want_s_cnt, want_s_displ); delete [] want_r_ownerranks; delete [] want_r_cnt; delete [] want_r_displ; // 4) Ranks that want tell owner ranks where to send. // Finished with the rendezvous ranks. The ranks that want keys know the // owner ranks for those keys. The next step is for the want ranks to // tell the owner ranks where to send. // The parallel want_s_ownerranks and want_s_data are now uselessly ordered // by rendezvous rank. Reorganize so that want ranks can tell owner ranks // what they want. n = want_s_displ[nhost]; delete [] want_s_displ; for (int i=0; i < nhost; ++i) { want_s_cnt[i] = 0; } HAVEWANT_t* old_want_s_data = want_s_data; want_s_data = new HAVEWANT_t[n]; // compute the counts for (int i=0; i < n; ++i) { int r = want_s_ownerranks[i]; ++want_s_cnt[r]; } want_s_displ = cnt2displ(want_s_cnt); for (int i=0; i < nhost; ++i) { want_s_cnt[i] = 0; } // recount while filling for (int i=0; i < n; ++i) { int r = want_s_ownerranks[i]; HAVEWANT_t key = old_want_s_data[i]; want_s_data[want_s_displ[r] + want_s_cnt[r]] = key; ++want_s_cnt[r]; } delete [] old_want_s_data; want_r_cnt = srccnt2destcnt(want_s_cnt); want_r_displ = cnt2displ(want_r_cnt); want_r_data = new HAVEWANT_t[want_r_displ[nhost]]; HAVEWANT_alltoallv(want_s_data, want_s_cnt, want_s_displ, want_r_data, want_r_cnt, want_r_displ); // now the want_r_data on the have_ranks are grouped according to the ranks // that want those keys. send_to_want = want_r_data; send_to_want_cnt = want_r_cnt; send_to_want_displ = want_r_displ; recv_from_have = want_s_data; recv_from_have_cnt = want_s_cnt; recv_from_have_displ = want_s_displ; } neuron-7.5/src/nrniv/hocmech.cpp000066400000000000000000000313361323325274500167440ustar00rootroot00000000000000#include <../../nrnconf.h> #undef check #include #include #include "nrnoc2iv.h" #include "nrniv_mf.h" extern "C" { #include "parse.h" extern int point_reg_helper(Symbol*); extern Object* hoc_newobj1(Symbol*, int); extern Symlist* hoc_symlist; extern void hoc_unlink_symbol(Symbol*, Symlist*); extern void hoc_link_symbol(Symbol*, Symlist*); extern void hoc_free_list(Symlist**); extern Datum* hoc_look_inside_stack(int, int); extern void nrn_loc_point_process(int, Point_process*, Section*, Node*); extern char* pnt_map; extern Symbol** pointsym; extern Prop* nrn_point_prop_; extern void print_symlist(const char*, Symlist*); extern void make_mechanism(); extern void make_pointprocess(); extern void hoc_construct_point(Object*, int); extern Object* hoc_new_opoint(int); } static Object* last_created_pp_ob_; static bool skip_; static const char** make_m(bool, int&, Symlist*, char*, char*); class HocMech { public: Symbol* mech; // template name Symbol* initial; // INITIAL proc initial() Symbol* after_step; // SOLVE ... METHOD after_cvode;proc after_step() Symlist* slist; // point process range variables. }; static void check(const char* s) { if (hoc_lookup(s)) { hoc_execerror(s, "already exists"); } } static void check_list(const char* s, Symlist* sl) { if (hoc_table_lookup(s, sl)) { hoc_execerror(s, "already exists"); } } void hoc_construct_point(Object* ob, int narg) { if (skip_) { //printf("skipped hoc_construct_point\n"); return; } //printf("%s is a pointprocess\n", hoc_object_name(ob)); int type = ob->ctemplate->symtable->last->subtype; int ptype = pnt_map[type]; Point_process* pnt = (Point_process*)create_point_process(ptype, ob); ob->u.dataspace[ob->ctemplate->dataspace_size - 1]._pvoid = (void*)pnt; assert(last_created_pp_ob_ == NULL); last_created_pp_ob_ = ob; if (narg > 0) { double x = hoc_look_inside_stack(narg-1, NUMBER)->val; //printf("x=%g\n", x); Section* sec = chk_access(); Node* nd = node_exact(sec, x); //printf("ptype=%d pnt=%p %s nd=%p\n", ptype, pnt, secname(sec), nd); //printf("type=%d pointsym=%p\n", type, pointsym[ptype]); //printf("type=%d from pointsym %s = %d\n", type, pointsym[ptype]->name, //pointsym[ptype]->subtype); nrn_loc_point_process(ptype, pnt, sec, nd); } } Point_process* ob2pntproc_0(Object* ob) { Point_process* pp; if (ob->ctemplate->steer) { pp = (Point_process*)ob->u.this_pointer; }else{ pp = (Point_process*)ob->u.dataspace[ob->ctemplate->dataspace_size - 1]._pvoid; } return pp; } Point_process* ob2pntproc(Object* ob) { Point_process* pp = ob2pntproc_0(ob); if (!pp || !pp->prop) { hoc_execerror(hoc_object_name(ob),"point process not located in a section"); } return pp; } int special_pnt_call(Object* ob, Symbol* sym, int narg) { char* name = sym->name; if (strcmp(name, "loc") == 0) { int type = ob->ctemplate->symtable->last->subtype; int ptype = pnt_map[type]; if (narg != 1) { hoc_execerror("no argument", 0); } double x = hoc_look_inside_stack(narg-1, NUMBER)->val; Section* sec = chk_access(); Node* node = node_exact(sec, x); nrn_loc_point_process(ptype, ob2pntproc(ob), sec, node); hoc_pushx(x); return 1; }else if (strcmp(name, "has_loc") == 0) { Point_process* p = ob2pntproc(ob); hoc_pushx(double(p != NULL && p->sec != NULL)); return 1; }else if (strcmp(name, "get_loc") == 0) { hoc_pushx(get_loc_point_process(ob2pntproc(ob))); return 1; }else{ return 0; } } static void alloc_mech(Prop* p) { Symbol* mech = ((HocMech*)memb_func[p->type].hoc_mech)->mech; p->ob = hoc_newobj1(mech, 0); //printf("alloc_mech %s\n", hoc_object_name(p->ob)); } static void alloc_pnt(Prop* p) { // this is complex because it can be called either before or // after the hoc object has been created. And so there // must be communication between alloc_pnt and hoc_construct_point. // need the prop->dparam[1]._pvoid if (nrn_point_prop_) { p->dparam = nrn_point_prop_->dparam; p->ob = nrn_point_prop_->ob; //printf("p->ob comes from nrn_point_prop_ %s\n", hoc_object_name(p->ob)); }else{ p->dparam = (Datum*)hoc_Ecalloc(2, sizeof(Datum)); if (last_created_pp_ob_) { p->ob = last_created_pp_ob_; //printf("p->ob comes from last_created %s\n", hoc_object_name(p->ob)); }else{ Symbol* mech = ((HocMech*)memb_func[p->type].hoc_mech)->mech; skip_ = true; //printf("p->ob comes from hoc_newobj1 %s\n", mech->name); p->ob = hoc_newobj1(mech, 0); skip_ = false; } } last_created_pp_ob_ = NULL; } Object* hoc_new_opoint(int type) { HocMech* hm = (HocMech*)memb_func[type].hoc_mech; return hoc_newobj1(hm->mech, 0); } static void call(Symbol* s, Node* nd, Prop* p) { Section* sec = nd->sec; Object* ob = p->ob; double x = nrn_arc_position(sec, nd); nrn_pushsec(sec); hoc_pushx(x); //printf("hoc_call_objfunc %s ob=%s\n", s->name, hoc_object_name(ob)); hoc_call_objfunc(s, 1, ob); nrn_popsec(); } static void initial(void* nt, Memb_list* ml, int type) { HocMech* hm = (HocMech*)memb_func[type].hoc_mech; int i, cnt = ml->nodecount; for (i=0; i < cnt; ++i) { call(hm->initial, ml->nodelist[i], ml->prop[i]); } } static void after_step(void* nt, Memb_list* ml, int type) { HocMech* hm = (HocMech*)memb_func[type].hoc_mech; int i, cnt = ml->nodecount; for (i=0; i < cnt; ++i) { call(hm->after_step, ml->nodelist[i], ml->prop[i]); } } // note that an sgi CC complained about the alloc token not being interpretable //as std::alloc so we changed to hm_alloc static HocMech* common_register(const char** m, Symbol* classsym, Symlist* slist, void (hm_alloc)(Prop*), int& type){ Pvmi cur, jacob, stat, initialize; cur = NULL; jacob = NULL; stat = NULL; initialize = NULL; HocMech* hm = new HocMech(); hm->slist = NULL; hm->mech = classsym; hm->initial = hoc_table_lookup("initial", slist); hm->after_step = hoc_table_lookup("after_step", slist); if (hm->initial) initialize = (Pvmi)initial; if (hm->after_step) stat = (Pvmi)after_step; register_mech(m, hm_alloc, cur, jacob, stat, initialize, -1, 0); type = nrn_get_mechtype(m[1]); hoc_register_cvode(type, NULL, NULL, NULL, NULL); memb_func[type].hoc_mech = hm; return hm; } void make_mechanism() { char buf[256]; int i, cnt; Symbol* sp; char* mname = gargstr(1); //printf("mname=%s\n", mname); check(mname); char* classname = gargstr(2); //printf("classname=%s\n", classname); char* parnames = NULL; if (ifarg(3)) { parnames = new char[strlen(gargstr(3)) + 1]; strcpy(parnames, gargstr(3)); } //if(parnames) printf("parnames=%s\n", parnames); Symbol* classsym = hoc_lookup(classname); if (classsym->type != TEMPLATE) { hoc_execerror(classname, "not a template"); } cTemplate* tp = classsym->u.ctemplate; Symlist* slist = tp->symtable; const char** m = make_m(true, cnt, slist, mname, parnames); common_register(m, classsym, slist, alloc_mech, i); for (sp = slist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->cpublic) { sprintf(buf, "%s_%s", sp->name, m[1]); Symbol* sp1 = hoc_lookup(buf); sp1->u.rng.index = sp->u.oboff; } } for (i=0; i < cnt; ++i) { if (m[i]) { delete [] m[i]; } } delete [] m; delete [] parnames; hoc_retpushx(1.); } void make_pointprocess() { char buf[256]; int i, cnt, type, ptype; Symbol* sp, *s2; char* classname = gargstr(1); //printf("classname=%s\n", classname); char* parnames = NULL; if (ifarg(2)) { parnames = new char[strlen(gargstr(2)) + 1]; strcpy(parnames, gargstr(2)); } //if(parnames) printf("parnames=%s\n", parnames); Symbol* classsym = hoc_lookup(classname); if (classsym->type != TEMPLATE) { hoc_execerror(classname, "not a template"); } cTemplate* tp = classsym->u.ctemplate; Symlist* slist = tp->symtable; // increase the dataspace by 1 void pointer. The last element // is where the Point_process pointer can be found and when // the object dataspace is freed, so is the Point_process. if (tp->count > 0) { fprintf(stderr, "%d object(s) of type %s already exist.\n", tp->count, classsym->name); hoc_execerror("Can't make a template into a PointProcess when instances already exist", 0); } ++tp->dataspace_size; const char** m = make_m(false, cnt, slist, classsym->name, parnames); check_list("loc", slist); check_list("get_loc", slist); check_list("has_loc", slist); //so far we need only the name and type sp = hoc_install("loc", FUNCTION, 0., &slist); sp->cpublic = 1; sp = hoc_install("get_loc", FUNCTION, 0., &slist); sp->cpublic = 1; sp = hoc_install("has_loc", FUNCTION, 0., &slist); sp->cpublic = 1; Symlist* slsav = hoc_symlist; hoc_symlist = NULL; HocMech* hm = common_register(m, classsym, slist, alloc_pnt, type); hm->slist = hoc_symlist; hoc_symlist = slsav; s2 = hoc_table_lookup(m[1], hm->slist); assert(s2->subtype == type); // type = s2->subtype; ptype = point_reg_helper(s2); //printf("type=%d pointtype=%d %s %p\n", type, ptype, s2->name, s2); classsym->u.ctemplate->is_point_ = ptype; // classsym->name is already in slist as an undef, Remove it and // move s2 out of HocMech->slist and into slist. // That is the one with the u.ppsym. // The only reason it needs to be in slist is to find the // mechanims type. And it needs to be LAST in that list. // The only reason for the u.ppsym is for ndatclas.c and we // need to fill those symbols with oboff. sp = hoc_table_lookup(classsym->name, slist); hoc_unlink_symbol(sp, slist); hoc_unlink_symbol(s2, hm->slist); hoc_link_symbol(s2, slist); hoc_link_symbol(sp, hm->slist); // just so it isn't counted as leakage for (i=0; i < s2->s_varn; ++i) { Symbol* sp = hoc_table_lookup(s2->u.ppsym[i]->name, slist); s2->u.ppsym[i]->cpublic = 2; s2->u.ppsym[1]->u.oboff = sp->u.oboff; } for (i=0; i < cnt; ++i) { if (m[i]) { delete [] m[i]; } } delete [] m; if (parnames) { delete [] parnames; } hoc_retpushx(1.); } static const char** make_m(bool suffix, int& cnt, Symlist* slist, char* mname, char* parnames) { char buf[256]; char* cc; Symbol* sp; int i, imax; cnt = 0; for (sp = slist->first; sp; sp = sp->next) { if (sp->type == VAR) { ++cnt; //printf ("cnt=%d |%s|\n", cnt, sp->name); } } cnt += 6; //printf("cnt=%d\n", cnt); const char** m = new const char*[cnt]; for (i=0; iparam[sym->u.rng.index]) // has to actually execute the variant // hoc_objectdata[sym->u.oboff].pval // when assigning and setting from the var_suffix form. // the PARAMETER names are space separated in parnames. char* cp, *csp = NULL; if(parnames) for (cp = parnames; cp && *cp; cp = csp) { csp = strchr(cp, ' '); if (csp) { *csp = '\0'; ++csp; if (!isalpha(*csp)) { hoc_execerror("Must be a space separated list of names\n", gargstr(3)); } } if (suffix) { sprintf(buf, "%s_%s", cp, m[1]); check(buf); }else{ sprintf(buf, "%s", cp); } if (!(sp = hoc_table_lookup(cp, slist)) || !sp->cpublic || !(sp->type == VAR)) { hoc_execerror(cp, "is not a public variable"); } cc = new char[strlen(cp) + strlen(m[1]) + 20]; //above 20 give enough room for _ and possible array size imax = hoc_total_array_data(sp, 0); if (imax > 1) { sprintf(cc, "%s[%d]", buf, imax); }else{ sprintf(cc, "%s", buf); } m[i] = cc; //printf("m[%d]=%s\n", i, m[i]); ++i; } int j, jmax = i; m[i++] = 0; // CONSTANT ASSIGNED separator //printf("m[%d] = NULL\n", i); for (sp = slist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->cpublic) { if (suffix) { sprintf(buf, "%s_%s", sp->name, m[1]); check(buf); }else{ sprintf(buf, "%s", sp->name); } bool b = false; for (j=1; j < jmax; ++j) { if (strstr(m[j], buf)) { b = true; // already a PARAMETER break; } } if (b) { continue; } cc = new char[strlen(buf) + 20]; //above 20 give enough room for possible array size imax = hoc_total_array_data(sp, 0); if (imax > 1) { sprintf(cc, "%s[%d]", buf, imax); }else{ sprintf(cc, "%s", buf); } m[i] = cc; //printf("m[%d]=%s\n", i, m[i]); ++i; } } //printf("m[%d] = NULL\n", i); m[i++] = 0; // ASSIGNED STATE separator //printf("m[%d] = NULL\n", i); m[i++] = 0; // STATE NRNPOINTER separator //printf("m[%d] = NULL\n", i); m[i++] = 0; // end return m; } neuron-7.5/src/nrniv/impedanc.cpp000066400000000000000000000253251323325274500171170ustar00rootroot00000000000000#include <../../nrnconf.h> #undef check #include "nrnmpi.h" #include "nonlinz.h" #include #if defined(__GO32__) #define NoInlineComplex #include <_complex.h> #if defined(NoInlineComplex) inline double Complex::real() const { return re; } inline double Complex::imag() const { return im; } inline Complex::Complex() {} inline Complex::Complex(const Complex& y) :re(y.real()), im(y.imag()) {} inline Complex::Complex(double r, double i) :re(r), im(i) {} inline Complex::~Complex() {} inline Complex& Complex::operator = (const Complex& y) { re = y.real(); im = y.imag(); return *this; } inline Complex& Complex::operator += (const Complex& y) { re += y.real(); im += y.imag(); return *this; } inline Complex& Complex::operator += (double y) { re += y; return *this; } inline Complex& Complex::operator -= (const Complex& y) { re -= y.real(); im -= y.imag(); return *this; } inline Complex& Complex::operator -= (double y) { re -= y; return *this; } inline Complex& Complex::operator *= (const Complex& y) { double r = re * y.real() - im * y.imag(); im = re * y.imag() + im * y.real(); re = r; return *this; } inline Complex& Complex::operator *= (double y) { re *= y; im *= y; return *this; } // functions inline int operator == (const Complex& x, const Complex& y) { return x.real() == y.real() && x.imag() == y.imag(); } inline int operator == (const Complex& x, double y) { return x.imag() == 0.0 && x.real() == y; } inline int operator != (const Complex& x, const Complex& y) { return x.real() != y.real() || x.imag() != y.imag(); } inline int operator != (const Complex& x, double y) { return x.imag() != 0.0 || x.real() != y; } inline Complex operator - (const Complex& x) { return Complex(-x.real(), -x.imag()); } inline Complex conj(const Complex& x) { return Complex(x.real(), -x.imag()); } inline Complex operator + (const Complex& x, const Complex& y) { return Complex(x.real() + y.real(), x.imag() + y.imag()); } inline Complex operator + (const Complex& x, double y) { return Complex(x.real() + y, x.imag()); } inline Complex operator + (double x, const Complex& y) { return Complex(x + y.real(), y.imag()); } inline Complex operator - (const Complex& x, const Complex& y) { return Complex(x.real() - y.real(), x.imag() - y.imag()); } inline Complex operator - (const Complex& x, double y) { return Complex(x.real() - y, x.imag()); } inline Complex operator - (double x, const Complex& y) { return Complex(x - y.real(), -y.imag()); } inline Complex operator * (const Complex& x, const Complex& y) { return Complex(x.real() * y.real() - x.imag() * y.imag(), x.real() * y.imag() + x.imag() * y.real()); } inline Complex operator * (const Complex& x, double y) { return Complex(x.real() * y, x.imag() * y); } inline Complex operator * (double x, const Complex& y) { return Complex(x * y.real(), x * y.imag()); } inline double real(const Complex& x) { return x.real(); } inline double imag(const Complex& x) { return x.imag(); } inline double abs(const Complex& x) { return hypot(x.real(), x.imag()); } inline double norm(const Complex& x) { return (x.real() * x.real() + x.imag() * x.imag()); } inline double arg(const Complex& x) { return atan2(x.imag(), x.real()); } inline Complex polar(double r, double t) { return Complex(r * cos(t), r * sin(t)); } #endif #else #include #endif #include "nrnoc2iv.h" #include "classreg.h" #include #include extern "C" { #include "membfunc.h" extern void nrn_rhs(NrnThread*); extern void nrn_lhs(NrnThread*); extern int tree_changed; extern int v_structure_change; extern void setup_topology(); extern void recalc_diam(); } typedef void (*Pfrv4)(int, Node**, double**, Datum**); class Imp { public: Imp(); virtual ~Imp(); // v(x)/i(x) and v(loc)/i(x) == v(x)/i(loc) int compute(double freq, bool nonlin = false, int maxiter = 500); void location(Section*, double); double transfer_amp(Section*, double); double input_amp(Section*, double); double transfer_phase(Section*, double); double input_phase(Section*, double); double ratio_amp(Section*, double); private: int loc(Section*, double); void alloc(); void impfree(); void check(); void setmat(double); void setmat1(); void LUDecomp(); void solve(); public: double deltafac_; private: int n; Complex* transfer; Complex* input; Complex* d; /* diagonal */ Complex* pivot; int istim; /* where current injected */ Section* sloc_; double xloc_; NonLinImp* nli_; }; static void* cons(Object*) { Imp* imp = new Imp(); return (void*)imp; } static void destruct(void* v) { Imp* imp = (Imp*)v; delete imp; } static double compute(void* v) { Imp* imp = (Imp*)v; int rval = 0; bool nonlin = false; if (ifarg(2)) { nonlin = *getarg(2) ? true : false; } if (ifarg(3)) { rval = imp->compute(*getarg(1), nonlin, int(chkarg(3, 1, 1e9))); }else{ rval = imp->compute(*getarg(1), nonlin); } return double(rval); } static double location(void* v) { Imp* imp = (Imp*)v; double x = chkarg(1, -1., 1.); Section* sec = NULL; if (x >= 0.0) { sec = chk_access(); } imp->location(sec, x); return 0.; } static double transfer_amp(void* v) { Imp* imp = (Imp*)v; return imp->transfer_amp(chk_access(), chkarg(1, 0., 1.)); } static double input_amp(void* v) { Imp* imp = (Imp*)v; return imp->input_amp(chk_access(), chkarg(1, 0., 1.)); } static double transfer_phase(void* v) { Imp* imp = (Imp*)v; return imp->transfer_phase(chk_access(), chkarg(1, 0., 1.)); } static double input_phase(void* v) { Imp* imp = (Imp*)v; return imp->input_phase(chk_access(), chkarg(1, 0., 1.)); } static double ratio_amp(void* v) { Imp* imp = (Imp*)v; return imp->ratio_amp(chk_access(), chkarg(1, 0., 1.)); } static double deltafac(void* v) { Imp* imp = (Imp*)v; if (ifarg(1)) { imp->deltafac_ = chkarg(1, 1e-10, 1); } return imp->deltafac_; } static Member_func members[] = { "compute", compute, "loc", location, "input", input_amp, "transfer", transfer_amp, "ratio", ratio_amp, "input_phase", input_phase, "transfer_phase", transfer_phase, "deltafac", deltafac, 0, 0 }; void Impedance_reg() { class2oc("Impedance", cons, destruct, members, NULL, NULL, NULL); } Imp::Imp(){ n = 0; d = NULL; pivot = NULL; transfer = NULL; input = NULL; nli_ = NULL; sloc_ = NULL; xloc_ = 0.; istim = -1; deltafac_ = .001; } Imp::~Imp(){ if (sloc_) { section_unref(sloc_); } impfree(); } void Imp::impfree(){ if (d) { delete [] d; delete [] transfer; delete [] input; delete [] pivot; d = NULL; } if (nli_) { delete nli_; nli_ = NULL; } } void Imp::check() { NrnThread* _nt = nrn_threads; nrn_thread_error("Impedance works with only one thread"); if (sloc_ && !sloc_->prop) { section_unref(sloc_); sloc_ = NULL; } if (tree_changed) { setup_topology(); } if (v_structure_change) { recalc_diam(); } if (n != _nt->end) { alloc(); } } void Imp::alloc(){ NrnThread* _nt = nrn_threads; impfree(); n = _nt->end; d = new Complex[n]; transfer = new Complex[n]; input = new Complex[n]; pivot = new Complex[n]; } int Imp::loc(Section* sec, double x){ if (x < 0.0 || sec == NULL) { return -1; } Node* nd; int i; nd = node_exact(sec, x); i = nd->v_node_index; return i; } double Imp::transfer_amp(Section* sec, double x){ check(); int vloc = loc(sec, x); return nli_ ? nli_->transfer_amp(vloc) : abs(transfer[vloc]); } double Imp::input_amp(Section* sec, double x){ check(); return nli_ ? nli_->input_amp(loc(sec, x)) : abs(input[loc(sec, x)]); } double Imp::transfer_phase(Section* sec, double x){ check(); return nli_ ? nli_->transfer_phase(loc(sec, x)) : arg(transfer[loc(sec, x)]); } double Imp::input_phase(Section* sec, double x){ check(); return nli_ ? nli_->input_phase(loc(sec, x)) : arg(input[loc(sec, x)]); } double Imp::ratio_amp(Section* sec, double x){ check(); int i = loc(sec, x); return nli_ ? nli_->ratio_amp(i, istim) : (abs(transfer[i]/input[i])); } void Imp::location(Section* sec, double x){ if (sloc_) { section_unref(sloc_); } sloc_ = sec; xloc_ = x; if (sloc_) { section_ref(sloc_); } } int Imp::compute(double freq, bool nonlin, int maxiter){ int rval = 0; check(); if (sloc_) { istim = loc(sloc_, xloc_); }else{ istim = -1; if (nrnmpi_numprocs == 0) { hoc_execerror("Impedance stimulus location is not specified.", 0); } } if (n == 0 && nrnmpi_numprocs == 1) return rval; double omega = 1e-6*2*3.14159265358979323846*freq; // wC has units of mho/cm2 if (nonlin) { if (!nli_) { nli_ = new NonLinImp(); } nli_->compute(omega, deltafac_, maxiter); rval = nli_->solve(istim); }else{ if (nli_) { delete nli_; nli_ = NULL; } if (istim == -1) { hoc_execerror("Impedance stimulus location is not specified.", 0); } setmat(omega); LUDecomp(); solve(); } return rval; } void Imp::setmat(double omega) { NrnThread* _nt = nrn_threads; int i; setmat1(); for (i=0; i < n; ++i) { d[i] = Complex(NODED(_nt->_v_node[i]), NODERHS(_nt->_v_node[i]) * omega); transfer[i] = 0.; } transfer[istim] = 1.e2/NODEAREA(_nt->_v_node[istim]); // injecting 1nA // rhs returned is then in units of mV or MegOhms } void Imp::setmat1() { //printf("Imp::setmat1\n"); /* The calculated g is good til someone else changes something having to do with the matrix. */ NrnThread* _nt = nrn_threads; Memb_list* mlc = _nt->tml->ml; int i; assert(_nt->tml->index == CAP); for (i=0; i < nrn_nthread; ++i) { double cj = nrn_threads[i].cj; nrn_threads[i].cj = 0; nrn_rhs(nrn_threads+i); // not useful except that many model description set g while // computing i nrn_lhs(nrn_threads+i); nrn_threads[i].cj = cj; } for (i=0; i < n; ++i) { NODERHS(_nt->_v_node[i]) = 0; } for (i=0; i < mlc->nodecount; ++i) { NODERHS(mlc->nodelist[i]) = mlc->data[i][0]; } } void Imp::LUDecomp() { int i, ip; NrnThread* _nt = nrn_threads; int i1, i2, i3; i1 = 0; i2 = i1 + _nt->ncell; i3 = _nt->end; for (i=i3-1; i >= i2; --i) { ip = _nt->_v_parent[i]->v_node_index; pivot[i] = NODEA(_nt->_v_node[i]) / d[i]; d[ip] -= pivot[i] * NODEB(_nt->_v_node[i]); } } void Imp::solve() { int i, ip, j; for (j=0; j < nrn_nthread; ++j) { NrnThread* _nt = nrn_threads + j; int i1, i2, i3; i1 = 0; i2 = i1 + _nt->ncell; i3 = _nt->end; for (i=istim; i >= i2; --i) { ip = _nt->_v_parent[i]->v_node_index; transfer[ip] -= transfer[i] * pivot[i]; } for (i=i1; i < i2; ++i) { transfer[i] /= d[i]; input[i] = 1./d[i]; } for (i=i2; i < i3; ++i) { ip = _nt->_v_parent[i]->v_node_index; transfer[i] -= NODEB(_nt->_v_node[i]) * transfer[ip]; transfer[i] /= d[i]; input[i] = (1 + input[ip]*pivot[i]*NODEB(_nt->_v_node[i]))/d[i]; } // take into account area for (i=i2; i < i3; ++i) { input[i] *= 1e2/NODEAREA(_nt->_v_node[i]); } } } neuron-7.5/src/nrniv/kschan.cpp000066400000000000000000002207611323325274500166070ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include "nrnoc2iv.h" #include "classreg.h" #include "kschan.h" #include "kssingle.h" #include "parse.h" #include "nrniv_mf.h" #define NSingleIndex 0 #if defined(__MWERKS__) && !defined(_MSC_VER) #include #define strdup _strdup #endif declarePtrList(KSChanList, KSChan) implementPtrList(KSChanList, KSChan) static KSChanList* channels; extern "C" { extern char* hoc_symbol_units(Symbol*, const char*); extern void nrn_mk_table_check(); } static Symbol* ksstate_sym; static Symbol* ksgate_sym; static Symbol* kstrans_sym; #define nt_dt nrn_threads->_dt static void check_objtype(Object* o, Symbol* s) { if (o->ctemplate->sym != s) { char buf[200]; sprintf(buf, "%s is not a %s", o->ctemplate->sym->name, s->name); hoc_execerror(buf,0); } if (!o->u.this_pointer) { hoc_execerror(hoc_object_name(o), " was deleted by KSChan"); } } static void unref(Object* obj) { if (obj) { obj->u.this_pointer = 0; hoc_obj_unref(obj); } } static void chkobj(void* v) { if (!v) { hoc_execerror("This object was deleted by KSChan", 0); } } static void check_table_thread_(double* p, Datum* ppvar, Datum* thread, void* vnt, int type) { KSChan* c = channels->item(type); c->check_table_thread((NrnThread*)vnt); } static void nrn_alloc(Prop* prop) { KSChan* c = channels->item(prop->type); c->alloc(prop); } static void nrn_init(NrnThread* nt, Memb_list* ml, int type) { //printf("nrn_init\n"); KSChan* c = channels->item(type); c->init(ml->nodecount, ml->nodelist, ml->data, ml->pdata, nt); } static void nrn_cur(NrnThread* nt, Memb_list* ml, int type) { //printf("nrn_cur\n"); KSChan* c = channels->item(type); #if CACHEVEC if (use_cachevec) { c->cur(ml->nodecount, ml->nodeindices, ml->data, ml->pdata, nt); }else #endif /* CACHEVEC */ { c->cur(ml->nodecount, ml->nodelist, ml->data, ml->pdata); } } static void nrn_jacob(NrnThread* nt, Memb_list* ml, int type) { //printf("nrn_jacob\n"); KSChan* c = channels->item(type); #if CACHEVEC if (use_cachevec) { c->jacob(ml->nodecount, ml->nodeindices, ml->data, ml->pdata, nt); }else #endif /* CACHEVEC */ { c->jacob(ml->nodecount, ml->nodelist, ml->data, ml->pdata); } } static void nrn_state(NrnThread* nt, Memb_list* ml, int type) { //printf("nrn_state\n"); KSChan* c = channels->item(type); #if CACHEVEC if (use_cachevec) { c->state(ml->nodecount, ml->nodeindices, ml->nodelist, ml->data, ml->pdata, nt); }else #endif /* CACHEVEC */ { c->state(ml->nodecount, ml->nodelist, ml->data, ml->pdata, nt); } } static int ode_count(int type){ //printf("ode_count\n"); KSChan* c = channels->item(type); return c->count(); } static void ode_map(int ieq, double** pv, double** pvdot, double* p, Datum* pd, double* atol, int type){ //printf("ode_map\n"); KSChan* c = channels->item(type); c->map(ieq, pv, pvdot, p, pd, atol); } static void ode_spec(NrnThread*, Memb_list* ml, int type){ //printf("ode_spec\n"); KSChan* c = channels->item(type); c->spec(ml->nodecount, ml->nodelist, ml->data, ml->pdata); } static void ode_matsol(NrnThread* nt, Memb_list* ml, int type){ //printf("ode_matsol\n"); KSChan* c = channels->item(type); c->matsol(ml->nodecount, ml->nodelist, ml->data, ml->pdata, nt); } static void singchan(NrnThread* nt, Memb_list* ml, int type){ //printf("singchan_\n"); KSChan* c = channels->item(type); c->cv_sc_update(ml->nodecount, ml->nodelist, ml->data, ml->pdata, nt); } static void* hoc_create_pnt(Object* ho) { return create_point_process(ho->ctemplate->is_point_, ho); } static void hoc_destroy_pnt(void* v) { // first free the KSSingleNodeData if it exists. Point_process* pp = (Point_process*)v; if (pp->prop) { KSChan* c = channels->item(pp->prop->type); c->destroy_pnt(pp); } } void KSChan::destroy_pnt(Point_process* pp) { if (single_ && pp->prop->dparam[2]._pvoid) { //printf("deleteing KSSingleNodeData\n"); KSSingleNodeData* snd = (KSSingleNodeData*) pp->prop->dparam[2]._pvoid; delete snd; pp->prop->dparam[2]._pvoid = NULL; } destroy_point_process(pp); } static double hoc_loc_pnt(void* v) { Point_process* pp = (Point_process*)v; return loc_point_process(pp->ob->ctemplate->is_point_, pp); } static double hoc_has_loc(void* v) { return has_loc_point(v); } static double hoc_get_loc_pnt(void* v) { return get_loc_point_process(v); } static double hoc_nsingle(void* v) { Point_process* pp = (Point_process*)v; KSChan* c = channels->item(pp->prop->type); if (ifarg(1)) { c->nsingle(pp, (int)chkarg(1, 1, 1e9)); } return (double) c->nsingle(pp); } static Member_func member_func[] = { "loc", hoc_loc_pnt, "has_loc", hoc_has_loc, "get_loc", hoc_get_loc_pnt, "nsingle", hoc_nsingle, 0, 0 }; void kschan_cvode_single_update() { } // hoc interface static double ks_setstructure(void* v) { KSChan* ks = (KSChan*)v; ks->setstructure(vector_arg(1)); return 1; } static double ks_remove_state(void* v) { KSChan* ks = (KSChan*)v; int is; if (hoc_is_double_arg(1)) { is = (int)chkarg(1, 0, ks->nstate_ - 1); }else{ Object* obj = *hoc_objgetarg(1); check_objtype(obj, ksstate_sym); KSState* kss = (KSState*)obj->u.this_pointer; is = kss->index_; } ks->remove_state(is); return 0.; } static double ks_remove_transition(void* v) { KSChan* ks = (KSChan*)v; int it; if (hoc_is_double_arg(1)) { it = (int)chkarg(1, ks->ivkstrans_, ks->ntrans_ - 1); }else{ Object* obj = *hoc_objgetarg(1); check_objtype(obj, kstrans_sym); KSTransition* kst = (KSTransition*)obj->u.this_pointer; it = kst->index_; assert(it >= ks->ivkstrans_ && it < ks->ntrans_); } ks->remove_transition(it); return 0.; } static double ks_ngate(void* v) { KSChan* ks = (KSChan*)v; return (double)ks->ngate_; } static double ks_nstate(void* v) { KSChan* ks = (KSChan*)v; return (double)ks->nstate_; } static double ks_ntrans(void* v) { KSChan* ks = (KSChan*)v; return (double)ks->ntrans_; } static double ks_nligand(void* v) { KSChan* ks = (KSChan*)v; return (double)ks->nligand_; } static double ks_is_point(void* v) { KSChan* ks = (KSChan*)v; return (ks->is_point() ? 1. : 0.); } static double ks_single(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { ks->set_single(((int)chkarg(1, 0, 1)) != 0); } return (ks->is_single() ? 1. : 0.); } static double ks_iv_type(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { ks->cond_model_ = (int)chkarg(1, 0, 2); ks->setcond(); } if (ks->ion_sym_) { return (double)ks->cond_model_; } return 0.; } static double ks_gmax(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { ks->gmax_deflt_ = chkarg(1, 0., 1e9); } return ks->gmax_deflt_; } static double ks_erev(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { ks->erev_deflt_ = chkarg(1, -1e9, 1e9); } return ks->erev_deflt_; } static double ks_vres(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { KSSingle::vres_ = chkarg(1, 1e-9, 1e9); } return KSSingle::vres_; } static double ks_rseed(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { KSSingle::idum_ = (unsigned int)chkarg(1, 0, 1e9); } return (double)KSSingle::idum_; } static double ks_usetable(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { if (hoc_is_pdouble_arg(1)) { int n; n = ks->usetable(hoc_pgetarg(1), hoc_pgetarg(2)); return double(n); }else{ bool use = ((int)chkarg(1, 0, 1)) ? true : false; if (ifarg(2)) { ks->usetable(use, (int)chkarg(2, 2, 10000), *getarg(3), *getarg(4)); }else{ ks->usetable(use); } } } return ks->usetable() ? 1. : 0.; } static Object** temp_objvar(const char* name, void* v, Object** obp) { Object** po; if (*obp) { po = hoc_temp_objptr(*obp); }else{ po = hoc_temp_objvar(hoc_lookup(name), v); *obp = *po; hoc_obj_ref(*po); } return po; } static Object** ks_add_hhstate(void* v) { KSChan* ks = (KSChan*)v; KSState* kss = ks->add_hhstate(gargstr(1)); return temp_objvar("KSState", kss, &kss->obj_); } static Object** ks_add_ksstate(void* v) { KSChan* ks = (KSChan*)v; Object* obj = *hoc_objgetarg(1); int ig = ks->ngate_; if (obj) { check_objtype(obj, ksgate_sym); KSGateComplex* ksg = (KSGateComplex*)obj->u.this_pointer; assert(ksg && ksg->index_ < ks->ngate_); ig = ksg->index_; } KSState* kss = ks->add_ksstate(ig, gargstr(2)); return temp_objvar("KSState", kss, &kss->obj_); } static Object** ks_add_transition(void* v) { KSChan* ks = (KSChan*)v; const char* lig = NULL; if (ifarg(3)) { lig = gargstr(3); } int src, target; if (hoc_is_double_arg(1)) { src = (int)chkarg(1, ks->nhhstate_, ks->nstate_-1); target = (int)chkarg(2, ks->nhhstate_, ks->nstate_-1); }else{ Object* obj = *hoc_objgetarg(1); check_objtype(obj, ksstate_sym); src = ((KSState*)obj->u.this_pointer)->index_; obj = *hoc_objgetarg(2); check_objtype(obj, ksstate_sym); target = ((KSState*)obj->u.this_pointer)->index_; } KSTransition* kst = ks->add_transition(src, target, lig); return temp_objvar("KSTrans", kst, &kst->obj_); } static Object** ks_trans(void* v) { KSChan* ks = (KSChan*)v; KSTransition* kst; if (hoc_is_double_arg(1)) { kst = ks->trans_ + (int)chkarg(1, 0, ks->ntrans_ - 1); }else{ int src, target; Object* obj = *hoc_objgetarg(1); check_objtype(obj, ksstate_sym); src = ((KSState*)obj->u.this_pointer)->index_; obj = *hoc_objgetarg(2); check_objtype(obj, ksstate_sym); target = ((KSState*)obj->u.this_pointer)->index_; kst = ks->trans_ + ks->trans_index(src, target); } return temp_objvar("KSTrans", kst, &kst->obj_); } static Object** ks_state(void* v) { KSChan* ks = (KSChan*)v; KSState* kss = ks->state_ + (int)chkarg(1, 0, ks->nstate_ - 1); return temp_objvar("KSState", kss, &kss->obj_); } static Object** ks_gate(void* v) { KSChan* ks = (KSChan*)v; KSGateComplex* ksg = ks->gc_ + (int)chkarg(1, 0, ks->ngate_ - 1); return temp_objvar("KSGate", ksg, &ksg->obj_); } static const char** ks_name(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { ks->setname(gargstr(1)); } char** ps = hoc_temp_charptr(); *ps = (char*)ks->name_.string(); return (const char**)ps; } static const char** ks_ion(void* v) { KSChan* ks = (KSChan*)v; if (ifarg(1)) { ks->setion(gargstr(1)); } char** ps = hoc_temp_charptr(); *ps = (char*)ks->ion_.string(); return (const char**)ps; } static const char** ks_ligand(void* v) { KSChan* ks = (KSChan*)v; char** ps = hoc_temp_charptr(); *ps = (char*)ks->ligands_[(int)chkarg(1, 0, ks->nligand_ - 1)]->name; return (const char**)ps; } static double kss_frac(void* v) { chkobj(v); KSState* kss = (KSState*)v; if (ifarg(1)) { kss->f_ = chkarg(1, 0., 1e9); } return kss->f_; } static double kss_index(void* v) { chkobj(v); KSState* kss = (KSState*)v; return kss->index_; } static Object** kss_gate(void* v) { chkobj(v); KSState* kss = (KSState*)v; KSChan* ks = kss->ks_; int ig = ks->gate_index(kss->index_); KSGateComplex* ksg = ks->gc_ + ig; return temp_objvar("KSGate", ksg, &ksg->obj_); } static const char** kss_name(void* v) { chkobj(v); KSState* kss = (KSState*)v; if (ifarg(1)) { kss->ks_->setsname(kss->index_, gargstr(1)); } char** ps = hoc_temp_charptr(); *ps = (char*)kss->string(); return (const char**)ps; } static double ksg_nstate(void* v) { chkobj(v); KSGateComplex* ksg = (KSGateComplex*)v; return (double)ksg->nstate_; } static double ksg_power(void* v) { chkobj(v); KSGateComplex* ksg = (KSGateComplex*)v; if (ifarg(1)) { // could affect validity of single channel style ksg->ks_->power(ksg, (int)chkarg(1, 0, 1e6)); } return (double)ksg->power_; } static double ksg_sindex(void* v) { chkobj(v); KSGateComplex* ksg = (KSGateComplex*)v; return (double)ksg->sindex_; } static double ksg_index(void* v) { chkobj(v); KSGateComplex* ksg = (KSGateComplex*)v; return (double)ksg->index_; } static double kst_set_f(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; int i = (int)chkarg(1, 0, 1); int type = (int)chkarg(2, 0, 7); Vect* vec = vector_arg(3); double vmin = -100; double vmax = 50; if (type == 7) { // table, optional vmin, vmax if (ifarg(4)) { vmin = *getarg(4); vmax = *getarg(5); } } kst->setf(i, type, vec, vmin, vmax); return 0; } static double kst_index(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; return (double)kst->index_; } static double kst_type(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; if (ifarg(1)) { int type = (int)chkarg(1, 0, 3); char* s = NULL; if (type >= 2) { s = gargstr(2); } Object* o = kst->obj_; kst->ks_->settype(kst, type, s); // kst may change kst = (KSTransition*)o->u.this_pointer; } return (double)kst->type_; } static double kst_ftype(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; KSChanFunction* f; if ((int)chkarg(1, 0, 1) == 0) { f = kst->f0; }else{ f = kst->f1; } if (f) { return (double)f->type(); } return -1.; } static double kst_ab(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; Vect* x = vector_arg(1); Vect* a = vector_arg(2); Vect* b = vector_arg(3); kst->ab(x, a, b); return 0; } static double kst_inftau(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; Vect* x = vector_arg(1); Vect* a = vector_arg(2); Vect* b = vector_arg(3); kst->inftau(x, a, b); return 0; } static double kst_f(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; int i = (int)chkarg(1, 0, 1); KSChanFunction* f = (i ? kst->f1 : kst->f0); if (!f) { return 0.; } double x = *getarg(2); return f->f(x); } static Object** kst_src(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; KSState* kss = kst->ks_->state_ + kst->src_; return temp_objvar("KSState", kss, &kss->obj_); } static Object** kst_target(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; KSState* kss = kst->ks_->state_ + kst->target_; return temp_objvar("KSState", kss, &kss->obj_); } static Object** kst_parm(void* v) { chkobj(v); KSTransition* kst = (KSTransition*)v; KSChanFunction* f; if ((int)chkarg(1, 0, 1) == 0) { f = kst->f0; }else{ f = kst->f1; } Vect* vec = NULL; if (f) { vec = f->gp_; if (f->type() == 7) { if (ifarg(2)) { double* px; px = hoc_pgetarg(2); *px = ((KSChanTable*)f)->vmin_; px = hoc_pgetarg(3); *px = ((KSChanTable*)f)->vmax_; } } } return vector_temp_objvar(vec); }; static const char** kst_ligand(void* v) { static char s[20];; s[0] = '\0'; chkobj(v); KSTransition* kst = (KSTransition*)v; if (kst->type_ >= 2) { strncpy(s, kst->ks_->ligands_[kst->ligand_index_]->name, 20); s[strlen(s) - 4] = (kst->type_==3) ? 'i' : 'o'; s[strlen(s) - 3] = '\0'; } char** ps = hoc_temp_charptr(); *ps = s; return (const char**)ps; } static double kst_stoichiometry(void* v) { KSTransition* kst = (KSTransition*)v; if (ifarg(1)) { kst->stoichiom_ = (int)chkarg(1, 1, 1e9); } return double(kst->stoichiom_); } static double ks_pr(void* v) { KSChan* ks = (KSChan*)v; KSTransition* kt; Symbol* s; int i, j; printf("%s type properties\n", hoc_object_name(ks->obj_)); printf("name=%s is_point_=%s ion_=%s cond_model_=%d\n", ks->name_.string(), (ks->is_point() ? "true" : "false"), ks->ion_.string(), ks->cond_model_); printf(" ngate=%d nstate=%d nhhstate=%d nligand=%d ntrans=%d ivkstrans=%d iligtrans=%d\n", ks->ngate_, ks->nstate_, ks->nhhstate_, ks->nligand_, ks->ntrans_, ks->ivkstrans_, ks->iligtrans_); printf(" default gmax=%g erev=%g\n", ks->gmax_deflt_, ks->erev_deflt_); for (i=0; i < ks->ngate_; ++i) { printf(" gate %d index=%d nstate=%d power=%d\n", i, ks->gc_[i].sindex_, ks->gc_[i].nstate_, ks->gc_[i].power_); } for (i=0; i < ks->nligand_; ++i) { printf(" ligand %d %s\n", i, ks->ligands_[i]->name); } for (i=0; i < ks->iligtrans_; ++i) { kt = ks->trans_ + i; printf(" trans %d src=%d target=%d type=%d\n", i, kt->src_, kt->target_, kt->type_); printf(" f0 type=%d f1 type=%d\n", kt->f0?kt->f0->type():-1, kt->f1?kt->f1->type():-1); } for (i=ks->iligtrans_; i < ks->ntrans_; ++i) { kt = ks->trans_ + i; printf(" trans %d src=%d target=%d type=%d ligindex=%d\n", i, kt->src_, kt->target_, kt->type_, kt->ligand_index_); printf(" f0 type=%d f1 type=%d\n", kt->f0?kt->f0->type():-1, kt->f1?kt->f1->type():-1); } printf(" state names and fractional conductance\n"); for (i=0; i < ks->nstate_; ++i) { printf(" %d %s %g\n", i, ks->state_[i].string(), ks->state_[i].f_); } return 1; } static Member_func ks_dmem[] = { // keeping c++ consistent with java "setstructure", ks_setstructure, "remove_state", ks_remove_state, "remove_transition", ks_remove_transition, "ngate", ks_ngate, "nstate", ks_nstate, "ntrans", ks_ntrans, "nligand", ks_nligand, "is_point", ks_is_point, "single", ks_single, "pr", ks_pr, "iv_type", ks_iv_type, "gmax", ks_gmax, "erev", ks_erev, "vres", ks_vres, "rseed", ks_rseed, "usetable", ks_usetable, 0, 0 }; static Member_ret_obj_func ks_omem[] = { "add_hhstate", ks_add_hhstate, "add_ksstate", ks_add_ksstate, "add_transition", ks_add_transition, "trans", ks_trans, "state", ks_state, "gate", ks_gate, 0,0 }; static Member_ret_str_func ks_smem[] = { "name", ks_name, "ion", ks_ion, "ligand", ks_ligand, 0, 0 }; static Member_func kss_dmem[] = { "frac", kss_frac, "index", kss_index, 0,0 }; static Member_ret_obj_func kss_omem[] = { "gate", kss_gate, 0,0 }; static Member_ret_str_func kss_smem[] = { "name", kss_name, 0,0 }; static Member_func ksg_dmem[] = { "nstate", ksg_nstate, "power", ksg_power, "sindex", ksg_sindex, "index", ksg_index, 0,0 }; static Member_ret_obj_func ksg_omem[] = { 0,0 }; static Member_ret_str_func ksg_smem[] = { 0,0 }; static Member_func kst_dmem[] = { "set_f", kst_set_f, "index", kst_index, "type", kst_type, "ftype", kst_ftype, "ab", kst_ab, "inftau", kst_inftau, "f", kst_f, "stoichiometry", kst_stoichiometry, 0,0 }; static Member_ret_obj_func kst_omem[] = { "src", kst_src, "target", kst_target, "parm", kst_parm, 0,0 }; static Member_ret_str_func kst_smem[] = { "ligand", kst_ligand, 0,0 }; static void* ks_cons(Object* o) { /* hoc_obj_ref(o); // so never destroyed char* suffix = gargstr(1); check(suffix); char* ion = gargstr(2); Object* t1 = *hoc_objgetarg(4); Object* t2 = *hoc_objgetarg(7); check_obj_type(t1, "VGateTransRate"); check_obj_type(t2, "VGateTransRate"); hoc_obj_ref(t1); // never destroyed hoc_obj_ref(t2); // never destroyed */ bool isp = false; if (ifarg(1)) { isp = ((int)chkarg(1, 0, 1)) != 0; } KSChan* c = new KSChan(o, isp); return c; } static void ks_destruct(void*) { assert(0); } // construction of KSState, KSGateComplex, and KSTransition are // handled by KSChan in order for it to maintain its slightly more // computationally efficient lists static void* kss_cons(Object* o) { hoc_execerror("Cannot create a KSState except through KSChan", 0); return NULL; } static void kss_destruct(void*) { } static void* ksg_cons(Object* o) { hoc_execerror("Cannot create a KSGate except through KSChan", 0); return NULL; } static void ksg_destruct(void*) { } static void* kst_cons(Object* o) { hoc_execerror("Cannot create a KSTransition except through KSChan", 0); return NULL; } static void kst_destruct(void*) { } void KSChan_reg() { class2oc("KSChan", ks_cons, ks_destruct, ks_dmem, NULL, ks_omem, ks_smem); class2oc("KSGate", ksg_cons, ksg_destruct, ksg_dmem, NULL, ksg_omem, ksg_smem); class2oc("KSState", kss_cons, kss_destruct, kss_dmem, NULL, kss_omem, kss_smem); class2oc("KSTrans", kst_cons, kst_destruct, kst_dmem, NULL, kst_omem, kst_smem); ksstate_sym = hoc_lookup("KSState"); ksgate_sym = hoc_lookup("KSGate"); kstrans_sym = hoc_lookup("KSTrans"); KSSingle::vres_ = 0.1; KSSingle::idum_ = 0; } // param is gmax, g, i --- if change then change numbers below // state names are handled individually static const char* m_kschan_pat[] = { "0", "kschan", "gmax", 0, "g", "i", 0, 0, 0 }; static const char* m_kschan[9]; // gmax=0 g=1 i=1 state names will be modltype 2, there are no pointer variables void KSChan::add_channel(const char** m) { KSChan* c = (KSChan*)this; Symlist* sav = hoc_symlist; hoc_symlist = hoc_built_in_symlist; hoc_built_in_symlist = 0; if (is_point()) { pointtype_ = point_register_mech(m, nrn_alloc, nrn_cur, nrn_jacob, nrn_state, nrn_init, -1, 1, hoc_create_pnt, hoc_destroy_pnt, member_func); }else{ register_mech(m, nrn_alloc, nrn_cur, nrn_jacob, nrn_state, nrn_init, -1, 1); } hoc_built_in_symlist = hoc_symlist; hoc_symlist = sav; mechtype_ = nrn_get_mechtype(m[1]); //printf("mechanism type is %d\n", mechtype_); hoc_register_cvode(mechtype_, ode_count, ode_map, ode_spec, ode_matsol); if (!channels) { channels = new KSChanList(50); } while(channels->count() < mechtype_) { channels->append(NULL); } channels->append(c); } KSChan::KSChan(Object* obj, bool is_p) { //printf("KSChan created\n"); int i; nhhstate_ = 0; mechtype_ = -1; usetable(false, 0, 1., 0.);; is_point_ = is_p; is_single_ = false; single_ = NULL; ppoff_ = (is_point() ? (is_single() ? 3 : 2) : 0) ; // area, pnt, single gmaxoffset_ = (is_single() ? 1 : 0); // and Nsingle is the first obj_ = obj; hoc_obj_ref(obj_); gc_ = NULL; state_ = NULL; trans_ = NULL; iv_relation_ = NULL; state_size_ = gate_size_ = trans_size_ = 0; ngate_ = nligand_ = nstate_ = nksstate_ = 0; ntrans_ = iligtrans_ = ivkstrans_ = 0; cond_model_ = 0; ion_sym_ = NULL; ligands_ = NULL; mechsym_ = NULL; rlsym_ = NULL; char buf[50]; sprintf(buf, "Chan%d", obj_->index); name_ = buf; ion_ = "NonSpecific"; mat_ = NULL; elms_ = NULL; diag_ = NULL; gmax_deflt_ = 0.; erev_deflt_ = 0.; soffset_ = 4; // gmax, e, g, i before the first state in p array build(); } KSChan::~KSChan(){} void KSChan::build() { if (mechsym_) { return; } int i; char buf[100]; if (strcmp(ion_.string(), "NonSpecific") != 0) { ion_reg(ion_.string(), -10000.); sprintf(buf, "%s_ion", ion_.string()); ion_sym_ = looksym(buf); if (!ion_sym_) { hoc_execerror(buf, " is not an ion mechanism"); } } const char* suffix = name_.string(); char unsuffix[100]; if (is_point()) { unsuffix[0] = '\0'; }else{ sprintf(unsuffix, "_%s", name_.string()); } if (looksym(suffix)) { hoc_execerror(suffix, "already exists"); } assert((m_kschan[0] = strdup(m_kschan_pat[0])) != 0); assert((m_kschan[1] = strdup(suffix)) != 0); sprintf(buf, "gmax%s", unsuffix); assert((m_kschan[2] = strdup(buf)) != 0); int aoff = 0; if (!ion_sym_) { sprintf(buf, "e%s", unsuffix); assert((m_kschan[3] = strdup(buf)) != 0); aoff = 1; } m_kschan[3+aoff] = 0; sprintf(buf, "g%s", unsuffix); assert((m_kschan[4+aoff] = strdup(buf)) != 0); sprintf(buf, "i%s", unsuffix); assert((m_kschan[5+aoff] = strdup(buf)) != 0); m_kschan[6+aoff] = 0; m_kschan[7+aoff] = 0; soffset_ = 3+aoff; // first state points here in p array add_channel(m_kschan); for (i=0; i < 9; ++i) if (m_kschan[i]) { free((void*)m_kschan[i]); } mechsym_ = looksym(suffix); if (is_point()) { rlsym_ = looksym(suffix, mechsym_); }else{ rlsym_ = mechsym_; } setcond(); sname_install(); // printf("%s allowed in insert statement\n", name_.string()); } void KSChan::setname(const char* s) { //printf("KSChan::setname\n"); int i; if (strcmp(s, name_.string()) == 0) { return; } name_ = s; if (mechsym_) { char old_suffix[100]; i = 0; while (strcmp(mechsym_->name, name_.string()) != 0 && looksym(name_.string())){ printf("KSChan::setname %s already in use\n", name_.string()); sprintf(old_suffix, "%s%d", s, i); name_ = old_suffix; ++i; // if want original name use if statement and something like this // name_ = mechsym_->name // return; } sprintf(old_suffix, "_%s", mechsym_->name); const char* suffix = name_.string(); free(mechsym_->name); mechsym_->name = strdup(suffix); if (is_point()) { free(rlsym_->name); rlsym_->name = strdup(suffix); } Symbol* sp; if (!is_point()) for (i=0; i < rlsym_->s_varn; ++i) { sp = rlsym_->u.ppsym[i]; char* cp = strstr(sp->name, old_suffix); if (cp) { int nbase = cp - sp->name; int n = nbase + strlen(suffix) + 2; char* s1 = (char*)hoc_Emalloc(n); hoc_malchk(); strncpy(s1, sp->name, nbase); sprintf(s1 + nbase, "_%s", suffix); //printf("KSChan::setname change %s to %s\n", sp->name, s1); free(sp->name); sp->name = s1; } } // printf("%s renamed to %s\n", old_suffix+1, name_.string()); } } int KSChan::state(const char* s) { int i; for (i = 0; i < nstate_; ++i) { if (strcmp(state_[i].string(), s) == 0) { return i; } } return -1; } void KSChan::power(KSGateComplex* gc, int p) { if (is_single() && p != 1) { set_single(false); } gc->power_ = p; } void KSChan::set_single(bool b, bool update) { if (!is_point()) { b = false; return; } if (b && (ngate_ != 1 || gc_[0].power_ != 1 || nhhstate_ > 0 || nksstate_ < 2)) { b = false; hoc_warning("KSChan single channel mode implemented only for single ks gating complex to first power", 0); } if (is_single()) { memb_func[mechtype_].singchan_ = NULL; delete_schan_node_data(); delete single_; single_ = NULL; } is_single_ = b; if (update) { update_prop(); } if (b) { single_ = new KSSingle(this); memb_func[mechtype_].singchan_ = singchan; alloc_schan_node_data(); } } const char* KSChan::state(int i) { return state_[i].string(); } int KSChan::trans_index(const char* s, const char* t) { int i; for (i = 0; i < ntrans_; ++i) { if (strcmp(state_[trans_[i].src_].string(), s) == 0 && strcmp(state_[trans_[i].target_].string(), t) == 0){ return i; } } return -1; } int KSChan::trans_index(int s, int t) { int i; for (i = 0; i < ntrans_; ++i) { if (trans_[i].src_ == s && trans_[i].target_ == t){ return i; } } return -1; } int KSChan::gate_index(int is) { int i; for (i=1; i < ngate_; ++i) { if (is < gc_[i].sindex_) { return i-1; } } return ngate_ - 1; } void KSChan::update_prop() { // prop.param is [Nsingle], gmax, [e], g, i, states // prop.dparam for density is [4ion], [4ligands] // prop.dparam for point is area, pnt, [singledata], [4ion], [4ligands] int i; Symbol* searchsym = (is_point() ? mechsym_ : NULL); // some old sym pointers Symbol* gmaxsym = rlsym_->u.ppsym[gmaxoffset_]; Symbol* gsym = rlsym_->u.ppsym[soffset_ - 2]; Symbol* isym = rlsym_->u.ppsym[soffset_ - 1]; Symbol* esym = ion_sym_ ? NULL : rlsym_->u.ppsym[gmaxoffset_ + 1]; int old_gmaxoffset = gmaxoffset_; int old_soffset = soffset_; int old_svarn = rlsym_->s_varn; // sizes and offsets psize_ = 3; // prop->param: gmax, g, i dsize_ = 0; // prop->dparam: empty ppoff_ = 0; soffset_ = 3; gmaxoffset_ = 0; if (is_single()) { psize_ += 1; // Nsingle exists dsize_ += 1; // KSSingleNodeData* exists gmaxoffset_ = 1; ppoff_ += 1; soffset_ += 1; } if (is_point()) { dsize_ += 2; // area, Point_process* exists ppoff_ += 2; } if (ion_sym_ == NULL ) { psize_ += 1; // e exists soffset_ += 1; }else{ dsize_ += 4; // ion current } dsize_ += 4*nligand_; psize_ += nstate_; // range variable names associated with prop->param rlsym_->s_varn = psize_; // problem here Symbol** ppsym = newppsym(rlsym_->s_varn); if (is_point()) { Symbol* sym = looksym("Nsingle", searchsym); if (is_single()) { // Nsingle exists with offset 0 if (!sym) { sym = installsym("Nsingle", RANGEVAR, searchsym); } ppsym[NSingleIndex] = sym; sym->subtype = nrnocCONST; // PARAMETER sym->u.rng.type = rlsym_->subtype; sym->u.rng.index = NSingleIndex; }else if (sym) { // eliminate if Nsingle exists freesym(sym, searchsym); } } ppsym[gmaxoffset_] = gmaxsym; gmaxsym->u.rng.index = gmaxoffset_; ppsym[soffset_ - 2] = gsym; gsym->u.rng.index = soffset_ - 2; ppsym[soffset_ - 1] = isym; isym->u.rng.index = soffset_ - 1; if (esym) { ppsym[gmaxoffset_ + 1] = esym; esym->u.rng.index = gmaxoffset_ + 1; } int j; for (j=soffset_, i=old_soffset; i < old_svarn; ++i, ++j) { ppsym[j] = rlsym_->u.ppsym[i]; ppsym[j]->u.rng.index = j; } free(rlsym_->u.ppsym); rlsym_->u.ppsym = ppsym; setcond(); state_consist(gmaxoffset_ - old_gmaxoffset); ion_consist(); } void KSChan::setion(const char* s) { //printf("KSChan::setion\n"); int i; if (strcmp(ion_.string(), s) == 0) { return; } Symbol* searchsym = (is_point() ? mechsym_ : NULL); if (strlen(s) == 0) { ion_ = "NonSpecific"; }else{ ion_ = s; } char buf[100]; int pdoff = ppoff_; int io = gmaxoffset_; if( strcmp(ion_.string(), "NonSpecific") == 0) { // non-specific if (ion_sym_) { // switch from useion to non-specific printf("switch from useion to non-specific\n"); rlsym_->s_varn += 1; Symbol** ppsym = newppsym(rlsym_->s_varn); for (i=0; i <= io; ++i) { ppsym[i] = rlsym_->u.ppsym[i]; } ion_sym_ = NULL; if (is_point()) { sprintf(buf, "e"); }else{ sprintf(buf, "e_%s", rlsym_->name); } if (looksym(buf, searchsym)) { hoc_execerror(buf, "already exists"); } ppsym[1 + io] = installsym(buf, RANGEVAR, searchsym); ppsym[1 + io]->subtype = 0; ppsym[1 + io]->u.rng.type = rlsym_->subtype; ppsym[1 + io]->cpublic = 1; ppsym[1 + io]->u.rng.index = 1 + io; for (i=2+io; i < rlsym_->s_varn; ++i) { ppsym[i] = rlsym_->u.ppsym[i-1]; ppsym[i]->u.rng.index += 1; } free(rlsym_->u.ppsym); rlsym_->u.ppsym = ppsym; soffset_ += 1; setcond(); state_consist(); ion_consist(); } }else{ // want useion pdoff = 5 + ppoff_; sprintf(buf, "%s_ion", s); // is it an ion Symbol* sym = looksym(buf); if (!sym || sym->type != MECHANISM || memb_func[sym->subtype].alloc != memb_func[looksym("na_ion")->subtype].alloc) { printf("%s is not an ion mechanism", sym->name); } if (ion_sym_) { // there already is an ion if (strcmp(ion_sym_->name, buf) != 0) { //is it different // printf(" mechanism %s now uses %s instead of %s\n", // name_.string(), sym->name, ion_sym_->name); ion_sym_ = sym; state_consist(); ion_consist(); } // if same do nothing }else{ // switch from non-specific to useion Symbol* searchsym = (is_point() ? mechsym_ : NULL); ion_sym_ = sym; rlsym_->s_varn -= 1; Symbol** ppsym = newppsym(rlsym_->s_varn); for (i=0; i <= io; ++i) { ppsym[i] = rlsym_->u.ppsym[i]; } freesym(rlsym_->u.ppsym[1 + io], searchsym); for (i=1 + io; i < rlsym_->s_varn; ++i) { ppsym[i] = rlsym_->u.ppsym[i+1]; ppsym[i]->u.rng.index -= 1; } free(rlsym_->u.ppsym); rlsym_->u.ppsym = ppsym; --soffset_; setcond(); state_consist(); ion_consist(); } } for (i = iligtrans_; i < ntrans_; ++i) { trans_[i].lig2pd(pdoff); } } void KSChan::setsname(int i, const char* s) { state_[i].name_ = s; sname_install(); } void KSChan::free1() { int i; for (i=0; i < nstate_; ++i) { unref(state_[i].obj_); } for (i=0; i < ngate_; ++i) { unref(gc_[i].obj_); } for (i=0; i < ntrans_; ++i) { unref(trans_[i].obj_); } if (gc_) {delete [] gc_; gc_ = NULL;} if (state_) { delete [] state_; state_ = NULL;} if (trans_) { delete [] trans_; trans_ = NULL;} if (iv_relation_) { delete iv_relation_; iv_relation_ = NULL; } if (ligands_) { delete [] ligands_; ligands_ = NULL; } if (mat_) { spDestroy(mat_); delete [] elms_; delete [] diag_; mat_ = NULL; } ngate_ = 0; nstate_ = 0; ntrans_ = 0; state_size_ = 0; gate_size_ = 0; trans_size_ = 0; } void KSChan::setcond() { //printf("KSChan::setcond\n"); int i; if (iv_relation_) { delete iv_relation_; } if (ion_sym_) { if (cond_model_ == 2) { if (is_point()) { iv_relation_ = new KSPPIvghk(); ((KSPPIvghk*)iv_relation_)->z = nrn_ion_charge(ion_sym_); }else{ iv_relation_ = new KSIvghk(); ((KSIvghk*)iv_relation_)->z = nrn_ion_charge(ion_sym_); } for (i=gmaxoffset_; i < 2+gmaxoffset_; ++i) { rlsym_->u.ppsym[i]->name[0] = 'p'; hoc_symbol_units(rlsym_->u.ppsym[i], (is_point() ? "cm3/s" : "cm/s")); } }else{ if (is_point()) { iv_relation_ = new KSPPIv(); }else{ iv_relation_ = new KSIv(); } for (i=gmaxoffset_; i < 2 + gmaxoffset_; ++i) { rlsym_->u.ppsym[i]->name[0] = 'g'; hoc_symbol_units(rlsym_->u.ppsym[i], is_point() ? "uS" : "S/cm2"); } } hoc_symbol_units(rlsym_->u.ppsym[2 + gmaxoffset_], is_point() ? "nA" : "mA/cm2"); }else{ if (is_point()) { iv_relation_ = new KSPPIvNonSpec(); }else{ iv_relation_ = new KSIvNonSpec(); } for (i=gmaxoffset_; i < 3 + gmaxoffset_; i += 2) { rlsym_->u.ppsym[i]->name[0] = 'g'; hoc_symbol_units(rlsym_->u.ppsym[i], is_point() ? "uS" : "S/cm2"); } hoc_symbol_units(rlsym_->u.ppsym[1 + gmaxoffset_], "mV"); hoc_symbol_units(rlsym_->u.ppsym[3 + gmaxoffset_], is_point() ? "nA" : "mA/cm2"); } if (is_point()) { ((KSPPIv*)iv_relation_)->ppoff_ = ppoff_; } } void KSChan::setligand(int i, const char* lig) { char buf[100]; //printf("KSChan::setligand %d %s\n", i, lig); sprintf(buf, "%s_ion", lig); Symbol* s = looksym(buf); if (!s) { ion_reg(lig, 0); s = looksym(buf); } if (s->type != MECHANISM || memb_func[s->subtype].alloc != memb_func[looksym("na_ion")->subtype].alloc) { hoc_execerror(buf, "is already in use and is not an ion."); } ligands_[i] = s; if (mechsym_) { state_consist(); ion_consist(); } } void KSChan::settype(KSTransition* t, int type, const char* lig) { int i, j; // if no ligands involved then it is just a type change. usetable(false); if (type < 2 && t->type_ < 2) { t->type_ = type; return; } set_single(false); int ilig = -1; // is t already using a ligand int iligold = -2; if (t->type_ >= 2) { iligold = t->ligand_index_; //printf("t already using a ligand index %d\n", iligold); if (type < 2) { // from having to not having // what is to be done with existing ligand // is anybody else using it bool remove = true; for (i = iligtrans_; i < ntrans_; ++i) { if (trans_[i].ligand_index_ == iligold && iligold != i) { remove = false; // old is still needed } } if (remove) { // unneeded Symbol** ligands = NULL; --nligand_; if (nligand_ > 0) { ligands = new Symbol*[nligand_]; } for (i=0, j=0; j < nligand_; ++i, ++j) { if (i == iligold) { ++j; } ligands[i] = ligands_[j]; } delete [] ligands_; ligands_ = ligands; } // transitions with ligands may get decremented for (i = iligtrans_; i < ntrans_; ++i) { if (trans_[i].ligand_index_ > iligold) { --trans_[i].ligand_index_; } } // the transition may have to be moved forward assert(t->index_ >= iligtrans_); KSTransition tt = *t; t->obj_ = NULL; trans_remove(t->index_); trans_insert(iligtrans_, tt.src_, tt.target_); t = trans_ + iligtrans_ - 1; t->type_ = type; t->ligand_index_ = -1; t->obj_ = tt.obj_; if (t->obj_) { t->obj_->u.this_pointer = t; } t->f0 = tt.f0; t->f1 = tt.f1; tt.f0 = NULL; tt.f1 = NULL; check_struct(); state_consist(); ion_consist(); setupmat(); return; } } // there is a ligand, handle the last two cases // is ligand valid char buf[100]; //printf("KSChan::settype %s %d %s\n", hoc_object_name(t->obj_), type, lig); //printf("old t->ligand_index_=%d type=%d\n", t->ligand_index_, t->type_); strcpy(buf, lig); strcpy(buf+strlen(buf)-1, "_ion"); //printf("ion name %s\n", buf); Symbol* s = looksym(buf); if (!s) { hoc_execerror(buf, "does not exist"); ion_reg(lig, 0); s = looksym(buf); } if (s->type != MECHANISM || memb_func[s->subtype].alloc != memb_func[looksym("na_ion")->subtype].alloc) { hoc_execerror(buf, "is already in use and is not an ion."); } // is ligand in list for (i=0; i < nligand_; ++i) { if (ligands_[i] == s) { ilig = i; break; } } //printf("ilig=%d iligold=%d\n", ilig, iligold); bool add2list = true; bool move = true; // if t already using a ligand, what is to be done with it if (t->type_ >= 2) { move = false; // do not need to reorder the transition add2list = false; for (i = iligtrans_; i < ntrans_; ++i) { if (trans_[i].ligand_index_ == iligold && t->index_ != i) { add2list = true; // old is still needed } } } //printf("add2list=%d\n", add2list); if (add2list) { // add it to list Symbol** ligands = new Symbol*[nligand_+1]; for (i=0; i < nligand_; ++i) { ligands[i] = ligands_[i]; } if (nligand_) { delete [] ligands_; } ilig = nligand_; ++nligand_; ligands_ = ligands; }else{ // replace ilig = iligold; } ligands_[ilig] = s; #if 0 printf("ligands\n"); for (i=0; i < nligand_; ++i) {printf("%s\n", ligands_[ilig]->name);} #endif // update the transition t->ligand_index_ = ilig; t->type_ = type; //printf("new t->ligand_index_=%d type=%d\n", t->ligand_index_, t->type_); // if switch from no ligand to ligand // then transition must be moved to iligtrans or above if (iligold < 0 && ilig >= 0) { #if 0 printf("old transition order\n"); for (i=0; i < ntrans_; ++i) { printf("i=%d index=%d type=%d ligand_index=%d %s<->%s\n", i, trans_[i].index_, trans_[i].type_, trans_[i].ligand_index_, state_[trans_[i].src_].string(), state_[trans_[i].target_].string()); } #endif assert(t->index_ < iligtrans_); KSTransition tt = *t; t->obj_ = NULL; t->f0 = NULL; t->f1 = NULL; trans_remove(t->index_); trans_insert(ntrans_, tt.src_, tt.target_); t = trans_ + ntrans_ - 1; t->obj_ = tt.obj_; t->ligand_index_ = tt.ligand_index_; t->type_ = tt.type_; t->f0 = tt.f0; t->f1 = tt.f1; tt.f0 = NULL; tt.f1 = NULL; if (t->obj_) { t->obj_->u.this_pointer = t; } if (iligtrans_ == ntrans_) { --iligtrans_; } #if 0 printf("new transition order\n"); for (i=0; i < ntrans_; ++i) { printf("i=%d index=%d type=%d ligand_index=%d %s<->%s %s\n", i, trans_[i].index_, trans_[i].type_, trans_[i].ligand_index_, state_[trans_[i].src_].string(), state_[trans_[i].target_].string(), hoc_object_name(trans_[i].obj_)); } #endif } check_struct(); state_consist(); ion_consist(); setupmat(); } KSState* KSChan::add_hhstate(const char* name) { int i; usetable(false); // new state, transition, gate, and f int is = nhhstate_; state_insert(is, name, 1.); gate_insert(is, is, 1); trans_insert(is, is, is); trans_[is].ligand_index_ = -1; trans_[is].type_ = 0; // adjust gate indices for (i=nhhstate_; i < ngate_; ++i) { ++gc_[i].sindex_; } // adjust transition indices for (i=ivkstrans_; i < ntrans_; ++i) { ++trans_[i].src_; ++trans_[i].target_; } set_single(false); check_struct(); sname_install(); state_consist(); setupmat(); return state_ + is; } KSState* KSChan::add_ksstate(int ig, const char* name) { // states must be added so that the gate states are in sequence int i, is; usetable(false); if (ig == ngate_) { is = nstate_; gate_insert(ig, is, 1); }else{ is = gc_[ig].sindex_ + gc_[ig].nstate_; ++gc_[ig].nstate_; } state_insert(is, name, 0.); if (nksstate_ == 0) { --nhhstate_; ++nksstate_; } // update gate indices for (i = ig+1; i < ngate_; ++i) { ++gc_[i].sindex_; } // update transition indices for (i = ivkstrans_; i < ntrans_; ++i) { if (trans_[i].src_ > is) { --trans_[i].src_; } if (trans_[i].target_ > is) { --trans_[i].target_; } } check_struct(); sname_install(); set_single(false); state_consist(); setupmat(); return state_ + is; } void KSChan::remove_state(int is) { int i; usetable(false); if (is < nhhstate_) { state_remove(is); gate_remove(is); trans_remove(is); // adjust gate indices for (i=is; i < ngate_; ++i) { --gc_[i].sindex_; } // adjust transition indices for (i=is; i < ntrans_; ++i) { --trans_[i].src_; --trans_[i].target_; } }else{ // remove a kinetic scheme state state_remove(is); // remove all the transitions involving this state for (i = ntrans_ - 1; i >= ivkstrans_; --i) { if (trans_[i].src_ == is || trans_[i].target_ == is) { trans_remove(i); } } // adjust transition indices for (i = ivkstrans_; i < ntrans_; ++i) { if (trans_[i].src_ > is) { --trans_[i].src_; } if (trans_[i].target_ > is) { --trans_[i].target_; } } // If this is the only state // the gate is removed. Otherwise the index and nstate // are updated. Note that it is not inconsistent for // the state graph of a gate to be multiple. for (i = nhhstate_; i < ngate_; ++i) { if (is >= gc_[i].sindex_ && is < (gc_[i].sindex_ + gc_[i].nstate_)) { if (gc_[i].nstate_ == 1) {// remove gate gate_remove(i); }else{ --gc_[i].nstate_; if (is == gc_[i].sindex_) { ++gc_[i].sindex_; } } break; } } for (i = nhhstate_; i < ngate_; ++i) { if (gc_[i].sindex_ > is) { --gc_[i].sindex_; } } } set_single(false); check_struct(); sname_install(); state_consist(); setupmat(); } KSTransition* KSChan::add_transition(int src, int target, const char* ligand) { usetable(false); assert(ligand == NULL); int it = (ligand ? ntrans_ : iligtrans_); trans_insert(it, src, target); trans_[it].ligand_index_ = -1; trans_[it].type_ = 0; set_single(false); check_struct(); setupmat(); return trans_ + it; } void KSChan::remove_transition(int it) { usetable(false); assert(it >= ivkstrans_); set_single(false); trans_remove(it); check_struct(); setupmat(); } //#undef assert //#define assert(arg) if (!(arg)) { abort(); } void KSChan::check_struct() { int i; assert(ngate_ >= nhhstate_); assert(ivkstrans_ == nhhstate_); assert(nstate_ == nhhstate_ + nksstate_); for (i=0; i < nhhstate_; ++i) { assert(trans_[i].src_ == i); assert(trans_[i].target_ == i); assert(gc_[i].sindex_ == i); assert(gc_[i].nstate_ == 1); } for (i=1; i < ngate_; ++i) { assert(gc_[i].index_ == i); assert(gc_[i].sindex_ == gc_[i-1].sindex_ + gc_[i-1].nstate_); } for (i=ivkstrans_; i < ntrans_; ++i) { assert(trans_[i].src_ >= nhhstate_); assert(trans_[i].target_ >= nhhstate_); } for (i=0; i < iligtrans_; ++i) { assert(trans_[i].type_ < 2); if (trans_[i].ligand_index_ != -1) { printf("trans_ %d ligand_index_=%d\n", i, trans_[i].ligand_index_); } assert(trans_[i].ligand_index_ == -1); } for (i=iligtrans_; i < ntrans_; ++i) { int j = trans_[i].ligand_index_; assert(j >= 0 && j < nligand_); assert(trans_[i].type_ >= 2); } for (i=0; i < nstate_; ++i) { assert(state_[i].ks_ == this); assert(state_[i].index_ == i); Object* o = state_[i].obj_; if (o) { assert(o->u.this_pointer == state_ + i); } } for (i=0; i < ntrans_; ++i) { assert(trans_[i].ks_ == this); assert(trans_[i].index_ == i); Object* o = trans_[i].obj_; if (o) { assert(o->u.this_pointer == trans_ + i); } } } KSState* KSChan::state_insert(int i, const char* n, double d) { int j; usetable(false); if (nstate_ >= state_size_) { state_size_ += 5; KSState* state = new KSState[state_size_]; for (j = 0; j < nstate_; ++j) { state[j] = state_[j]; } delete [] state_; for (j = 0; j < state_size_; ++j) { state[j].ks_ = this; } state_ = state; } for (j = i; j < nstate_; ++j) { state_[j+1] = state_[j]; } state_[i].f_ = d; state_[i].name_ = n; if (i <= nhhstate_) { ++nhhstate_; }else{ ++nksstate_; } ++nstate_; for (j = 0; j < nstate_; ++j) { state_[j].index_ = j; if (state_[j].obj_) { state_[j].obj_->u.this_pointer = state_ + j; } } return state_ + i; } void KSChan::state_remove(int i) { int j; usetable(false); unref(state_[i].obj_); for (j = i+1; j < nstate_; ++j) { state_[j-1] = state_[j]; if (state_[j-1].obj_) { state_[j-1].obj_->u.this_pointer = state_ + j - 1; } } if (i < nhhstate_) { --nhhstate_; }else{ --nksstate_; } --nstate_; state_[nstate_].obj_ = NULL; for (j = 0; j < nstate_; ++j) { state_[j].index_ = j; if (state_[j].obj_) { state_[j].obj_->u.this_pointer = state_ + j; } } } KSGateComplex* KSChan::gate_insert(int ig, int is, int power) { int j; usetable(false); if (ngate_ >= gate_size_) { gate_size_ += 5; KSGateComplex* gc = new KSGateComplex[gate_size_]; for (j = 0; j < ngate_; ++j) { gc[j] = gc_[j]; } delete [] gc_; gc_ = gc; for (j = 0; j < gate_size_; ++j) { gc_[j].ks_ = this; } } for (j = ig; j < ngate_; ++j) { gc_[j+1] = gc_[j]; } gc_[ig].sindex_ = is; gc_[ig].nstate_ = 1; gc_[ig].power_ = power; ++ngate_; for (j = 0; j < ngate_; ++j) { gc_[j].index_ = j; if (gc_[j].obj_) { gc_[j].obj_->u.this_pointer = gc_ + j; } } return gc_ + ig; } void KSChan::gate_remove(int i) { int j; usetable(false); unref(gc_[i].obj_); for (j = i+1; j < ngate_; ++j) { gc_[j-1] = gc_[j]; if (gc_[j-1].obj_) { gc_[j-1].obj_->u.this_pointer = gc_ + j - 1; } } --ngate_; gc_[ngate_].obj_ = NULL; for (j = 0; j < ngate_; ++j) { gc_[j].index_ = j; if (gc_[j].obj_) { gc_[j].obj_->u.this_pointer = gc_ + j; } } } KSTransition* KSChan::trans_insert(int i, int src, int target) { int j; usetable(false); if (ntrans_ >= trans_size_) { trans_size_ += 5; KSTransition* trans = new KSTransition[trans_size_]; for (j = 0; j < ntrans_; ++j) { trans[j] = trans_[j]; trans_[j].f0 = NULL; trans_[j].f1 = NULL; } delete [] trans_; trans_ = trans; } for (j = i; j < ntrans_; ++j) { trans_[j+1] = trans_[j]; } trans_[i].src_ = src; trans_[i].target_ = target; trans_[i].f0 = NULL; trans_[i].f1 = NULL; ivkstrans_ = nhhstate_; if (i <= iligtrans_) { ++iligtrans_; } ++ntrans_; for (j = 0; j < ntrans_; ++j) { trans_[j].index_ = j; trans_[j].ks_ = this; if (trans_[j].obj_) { trans_[j].obj_->u.this_pointer = trans_ + j; } } return trans_ + i; } void KSChan::trans_remove(int i) { int j; usetable(false); unref(trans_[i].obj_); for (j = i+1; j < ntrans_; ++j) { trans_[j-1] = trans_[j]; if (trans_[j-1].obj_) { trans_[j-1].obj_->u.this_pointer = trans_ + j - 1; } } if (i < ivkstrans_) { --ivkstrans_; } if (i < iligtrans_) { --iligtrans_; } --ntrans_; for (j = 0; j < ntrans_; ++j) { trans_[j].index_ = j; if (trans_[j].obj_) { trans_[j].obj_->u.this_pointer = trans_ + j; } } trans_[ntrans_].obj_ = NULL; } void KSChan::setstructure(Vect* vec) { int i, j, ii, idx, ns; //printf("setstructure called for KSChan %p %s\n", this, name_.string()); #if 0 for (i=0; i < vec->capacity(); ++i) { printf("%d %g\n", i, vec->elem(i)); } #endif usetable(false); int nstate_old = nstate_; KSState* state_old = state_; nstate_ = 0; state_ = 0; free1(); j = 0; cond_model_ = (int)vec->elem(j++); setcond(); ngate_ = (int)vec->elem(j++); nstate_ = (int)vec->elem(j++); nhhstate_ = (int)vec->elem(j++); nksstate_ = nstate_ - nhhstate_; ivkstrans_ = nhhstate_; ntrans_ = (int)vec->elem(j++); nligand_ = (int)vec->elem(j++); iligtrans_ = (int)vec->elem(j++); if (ngate_) { gc_ = new KSGateComplex[ngate_]; gate_size_ = ngate_; } if (ntrans_) { trans_ = new KSTransition[ntrans_]; trans_size_ = ntrans_; } if (nstate_) { state_ = new KSState[nstate_]; state_size_ = nstate_; // preserve old names as much as possible for (i = 0; i < nstate_; ++i) { state_[i].index_ = i; state_[i].ks_ = this; if (i < nstate_old) { state_[i].name_ = state_old[i].name_; }else{ char buf[20]; sprintf(buf, "s%d", i); state_[i].name_ = buf; } } if (state_old) { for (i=0; i < nstate_old; ++i) { unref(state_old[i].obj_); } delete [] state_old; } } for (i=0; i < nstate_; ++i) { state_[i].f_ = 0.; } for (i=0; i < ngate_; ++i) { gc_[i].ks_ = this; gc_[i].index_ = i; gc_[i].sindex_ = idx = (int)vec->elem(j++); gc_[i].nstate_ = ns = (int)vec->elem(j++); gc_[i].power_ = (int)vec->elem(j++); for (ii=0; ii < ns; ++ii) { state_[ii + idx].f_ = vec->elem(j++); } } // assert that order is all vtrans and then all lig trans int pdoff = ppoff_ + ion_sym_ ? 5 : 0; for (i=0; i < ntrans_; ++i) { trans_[i].index_ = i; trans_[i].ks_ = this; trans_[i].src_ = (int)vec->elem(j++); trans_[i].target_ = (int)vec->elem(j++); trans_[i].type_ = (int)vec->elem(j++); trans_[i].ligand_index_ = (int)vec->elem(j++); if (i >= iligtrans_) { trans_[i].lig2pd(pdoff); } } if (nligand_) { ligands_ = new Symbol*[nligand_]; for (i=0; i < nligand_; ++i) { ligands_[i] = NULL; } } check_struct(); if (mechsym_) { set_single(false, false); sname_install(); state_consist(); setupmat(); } } void KSChan::sname_install() { Symbol* searchsym = is_point() ? mechsym_ : NULL; char unsuffix[100]; if (is_point()) { unsuffix[0] = '\0'; }else{ sprintf(unsuffix, "_%s", mechsym_->name); } // there need to be symbols for nstate_ states int i; int nold = rlsym_->s_varn; int nnew = soffset_ + nstate_; Symbol** snew; Symbol** sold = rlsym_->u.ppsym; // the ones that exist and new symbols get a temporary name of "". snew = newppsym(nnew); for (i=0; i < nnew; ++i) { if (i < nold) { snew[i] = sold[i]; if (i >= soffset_) { snew[i]->name[0] = '\0'; // will be freed below } }else{ // if not enough make more with a name of "" snew[i] = installsym("", RANGEVAR, searchsym); snew[i]->subtype = 3; snew[i]->u.rng.type = rlsym_->subtype; snew[i]->u.rng.index = i; } } // if too many then free the unused symbols and hope they really are unused for (i = nnew; i < nold; ++i) { freesym(sold[i], searchsym); } rlsym_->s_varn = nnew; free(rlsym_->u.ppsym); rlsym_->u.ppsym = snew; // fill the names checking for conflicts char buf[100], buf1[100]; for (i=0; i < nstate_; ++i) { sprintf(buf, "%s%s", state_[i].string(), unsuffix); int j = 0; buf1[0]='\0'; while (looksym(buf, searchsym)) { sprintf(buf1, "%s%d", state_[i].string(), j++); sprintf(buf, "%s%s", buf1, unsuffix); } free(snew[i + soffset_]->name); snew[i + soffset_]->name = strdup(buf); if (strlen(buf1) > 0) { state_[i].name_ = buf1; } } } // check at the top and built-in level, or, if top!= NULL check the template Symbol* KSChan::looksym(const char* name, Symbol* top) { if (top) { if (top->type != TEMPLATE) { printf("%s type=%d\n", top->name, top->type); abort();} assert(top->type == TEMPLATE); return hoc_table_lookup(name, top->u.ctemplate->symtable); } Symbol* sp = hoc_table_lookup(name, hoc_top_level_symlist); if (sp) { return sp; } sp = hoc_table_lookup(name, hoc_built_in_symlist); return sp; } // install in the built-in list or the template list Symbol* KSChan::installsym(const char* name, int type, Symbol* top) { if (top) { assert (top->type == TEMPLATE); Symbol* s = hoc_install(name, type, 0.0, &top->u.ctemplate->symtable); s->cpublic = 1; return s; } return hoc_install(name, type, 0.0, &hoc_built_in_symlist); } Symbol** KSChan::newppsym(int n) { Symbol** spp = (Symbol**) hoc_Emalloc(n*sizeof(Symbol*)); hoc_malchk(); return spp; } void KSChan::freesym(Symbol* s, Symbol* top) { if (top) { assert(top->type == TEMPLATE); hoc_unlink_symbol(s, top->u.ctemplate->symtable); }else{ hoc_unlink_symbol(s, hoc_built_in_symlist); } free(s->name); if (s->extra) { if (s->extra->parmlimits) { free(s->extra->parmlimits); } if (s->extra->units) { free(s->extra->units); } free(s->extra); } free(s); } void KSChan::setupmat() { int i, j, err; //printf("KSChan::setupmat nksstate=%d\n", nksstate_); if (mat_) { spDestroy(mat_); delete [] elms_; delete [] diag_; mat_ = NULL; } if (!nksstate_) { return; } mat_ = spCreate(nksstate_, 0, &err); if (err != spOKAY) { hoc_execerror("Couldn't create sparse matrix", 0); } spFactor(mat_); // will fail but creates an internal vector needed by // mulmat which might be called prior to initialization // when switching to cvode active. elms_ = new double*[4*(ntrans_ - ivkstrans_)]; diag_ = new double*[nksstate_]; for (i=ivkstrans_, j=0; i < ntrans_; ++i) { int s, t; s = trans_[i].src_ - nhhstate_ + 1; t = trans_[i].target_ - nhhstate_ + 1; elms_[j++] = spGetElement(mat_, s, s); elms_[j++] = spGetElement(mat_, s, t); elms_[j++] = spGetElement(mat_, t, t); elms_[j++] = spGetElement(mat_, t, s); } for (i=0; i < nksstate_; ++i) { diag_[i] = spGetElement(mat_, i+1, i+1); } } void KSChan::fillmat(double v, Datum* pd) { int i, j; double a, b; spClear(mat_); for (i=ivkstrans_, j=0; i < iligtrans_; ++i) { trans_[i].ab(v, a, b); //printf("trans %d v=%g a=%g b=%g\n", i, v, a, b); *elms_[j++] -= a; *elms_[j++] += b; *elms_[j++] -= b; *elms_[j++] += a; } for (i=iligtrans_; i < ntrans_; ++i) { a = trans_[i].alpha(pd); b = trans_[i].beta(); *elms_[j++] -= a; *elms_[j++] += b; *elms_[j++] -= b; *elms_[j++] += a; } //printf("after fill\n"); //spPrint(mat_, 0, 1, 0); } void KSChan::mat_dt(double dt, double* p) { // y' = m*y this part add the dt for the form ynew/dt - yold/dt =m*ynew // the matrix ends up as (m-1/dt)ynew = -1/dt*yold int i; double dt1 = -1./dt; for (i=0; i < nksstate_; ++i) { *(diag_[i]) += dt1; p[i] *= dt1; } } void KSChan::solvemat(double* s) { int e; e = spFactor(mat_); if (e != spOKAY) { switch (e) { case spZERO_DIAG: hoc_execerror("spFactor error:", "Zero Diagonal"); case spNO_MEMORY: hoc_execerror("spFactor error:", "No Memory"); case spSINGULAR: hoc_execerror("spFactor error:", "Singular"); } } spSolve(mat_, s-1, s-1); } void KSChan::mulmat(double* s, double* ds) { spMultiply(mat_, ds-1, s-1); } void KSChan::alloc(Prop* prop) { //printf("KSChan::alloc nstate_=%d nligand_=%d\n", nstate_, nligand_); //printf("KSChan::alloc %s param=%p\n", name_.string(), prop->param); int j; prop->param_size = soffset_ + 2*nstate_; if (is_point() && nrn_point_prop_) { assert(nrn_point_prop_->param_size == prop->param_size); prop->param = nrn_point_prop_->param; prop->dparam = nrn_point_prop_->dparam; }else{ prop->param = nrn_prop_data_alloc(prop->type, prop->param_size, prop); prop->param[gmaxoffset_] = gmax_deflt_; if (is_point()) { prop->param[NSingleIndex] = 1.; } if (!ion_sym_) { prop->param[1 + gmaxoffset_] = erev_deflt_; } } int ppsize = ppoff_; if (ion_sym_) { ppsize += 5 + 2*nligand_; }else{ ppsize += 2*nligand_; } if (!is_point() || nrn_point_prop_ == 0) { if (ppsize > 0) { prop->dparam = nrn_prop_datum_alloc(prop->type, ppsize, prop); if (is_point()) { prop->dparam[2]._pvoid = NULL; } }else{ prop->dparam = 0; } } Datum* pp = prop->dparam; int poff = ppoff_; if (ion_sym_) { Prop* prop_ion = need_memb(ion_sym_); if (cond_model_ == 0) { //ohmic nrn_promote(prop_ion, 0, 1); }else if (cond_model_ == 1) { // nernst nrn_promote(prop_ion, 1, 0); }else{ // ghk nrn_promote(prop_ion, 1, 0); } pp[ppoff_+0].pval = prop_ion->param + 0; //ena pp[ppoff_+1].pval = prop_ion->param + 3; //ina pp[ppoff_+2].pval = prop_ion->param + 4; //dinadv pp[ppoff_+3].pval = prop_ion->param + 1; //nai pp[ppoff_+4].pval = prop_ion->param + 2; //nao poff += 5; } for (j=0; j < nligand_; ++j) { Prop* pion = need_memb(ligands_[j]); nrn_promote(pion, 1, 0); pp[poff+2*j].pval = pion->param + 2; // nao pp[poff+2*j+1].pval = pion->param + 1; // nai } if (single_ && prop->dparam[2]._pvoid == NULL) { single_->alloc(prop, soffset_); } } Prop* KSChan::needion(Symbol* s, Node* nd, Prop* pm) { Prop* p, *pion; int type = s->subtype; for (p = nd->prop; p; p = p->next) { if (p->type == type) { break; } } pion = p; //printf("KSChan::needion %s\n", s->name); //printf("before ion rearrangement\n"); //for (p=nd->prop; p; p=p->next) {printf("\t%s\n", memb_func[p->type].sym->name);} if (!pion) { pion = prop_alloc(&nd->prop, type, nd); }else{ // if after then move to beginning for (p = pm; p; p = p->next) { if (p->next == pion) { p->next = p->next->next; pion->next = nd->prop; nd->prop = pion; break; } } } //printf("after ion rearrangement\n"); //for (p=nd->prop; p; p=p->next) {printf("\t%s\n", memb_func[p->type].sym->name);} return pion; } void KSChan::ion_consist() { //printf("KSChan::ion_consist\n"); int i, j; Section* sec; Node* nd; hoc_Item* qsec; int mtype = rlsym_->subtype; int poff = ppoff_; if (ion_sym_) { poff += 5; } for (i = iligtrans_; i < ntrans_; ++i) { trans_[i].lig2pd(poff); } int ppsize = poff + 2*nligand_; ForAllSections(sec) for (i = 0; i < sec->nnode; ++i) { nd = sec->pnode[i]; Prop* p, *pion; for (p = nd->prop; p; p = p->next) { if (p->type == mtype) { break; } } if (!p) { continue; } p->dparam = (Datum*)erealloc(p->dparam, ppsize*sizeof(Datum)); //printf("KSChan::ion_consist %s node %d mtype=%d ion_type=%d\n", //secname(sec), i, mtype, ion_sym_->subtype); if (ion_sym_) { pion = needion(ion_sym_, nd, p); if (cond_model_ == 0) { //ohmic nrn_promote(pion, 0, 1); }else if (cond_model_ == 1) { // nernst nrn_promote(pion, 1, 0); }else{ // ghk nrn_promote(pion, 1, 0); } Datum* pp = p->dparam; pp[ppoff_+0].pval = pion->param + 0; //ena pp[ppoff_+1].pval = pion->param + 3; //ina pp[ppoff_+2].pval = pion->param + 4; //dinadv pp[ppoff_+3].pval = pion->param + 1; //nai pp[ppoff_+4].pval = pion->param + 2; //nao } for (j=0; j < nligand_; ++j) { ligand_consist(j, poff, p, nd); } } } } void KSChan::ligand_consist(int j, int poff, Prop* p, Node* nd) { Prop* pion; pion = needion(ligands_[j], nd, p); nrn_promote(pion, 1, 0); p->dparam[poff+2*j].pval = pion->param + 2; // nao p->dparam[poff+2*j+1].pval = pion->param + 1; // nai } void KSChan::state_consist(int shift) { // shift when Nsingle winks in and out of existence //printf("KSChan::state_consist\n"); int i, j, ns; Section* sec; Node* nd; hoc_Item* qsec; int mtype = rlsym_->subtype; ns = soffset_ + 2*nstate_; ForAllSections(sec) for (i = 0; i < sec->nnode; ++i) { nd = sec->pnode[i]; Prop* p; for (p = nd->prop; p; p = p->next) { if (p->type == mtype) { if (p->param_size != ns) { v_structure_change = 1; double* oldp = p->param; p->param = (double*)erealloc(oldp, ns*sizeof(double)); if (oldp != p->param || shift != 0) { //printf("KSChan::state_consist realloc changed location\n"); notify_freed_val_array(oldp, p->param_size); } p->param_size = ns; if (shift == 1) { for (j = ns-1; j > 0; --j) { p->param[j] = p->param[j-1]; } p->param[0] = 1; }else if (shift == -1) { for (j = 1; j < ns; ++j) { p->param[j-1] = p->param[j]; } } } break; } } } } } void KSChan::delete_schan_node_data() { hoc_List* list = mechsym_->u.ctemplate->olist; hoc_Item* q; ITERATE(q, list) { Point_process* pnt = (Point_process*)(OBJ(q)->u.this_pointer); if (pnt && pnt->prop && pnt->prop->dparam[2]._pvoid) { KSSingleNodeData* snd = (KSSingleNodeData*)pnt->prop->dparam[2]._pvoid; delete snd; pnt->prop->dparam[2]._pvoid = NULL; } } } void KSChan::alloc_schan_node_data() { hoc_List* list = mechsym_->u.ctemplate->olist; hoc_Item* q; ITERATE(q, list) { Point_process* pnt = (Point_process*)(OBJ(q)->u.this_pointer); if (pnt && pnt->prop) { single_->alloc(pnt->prop, soffset_); } } } void KSChan::init(int n, Node** nd, double** pp, Datum** ppd, NrnThread* nt) { int i, j; if (nstate_) for (i=0; i < n; ++i) { double v = NODEV(nd[i]); double* s = pp[i] + soffset_; for (j=0; j < nstate_; ++j) { s[j] = 0; } for (j=0; j < ngate_; ++j) { s[gc_[j].sindex_] = 1; } for (j = 0; j < nhhstate_; ++j) { s[j] = trans_[j].inf(v); } if (nksstate_) { s += nhhstate_; fillmat(v, ppd[i]); mat_dt(1e9, s); solvemat(s); } if (is_single()) { KSSingleNodeData* snd = (KSSingleNodeData*)ppd[i][2]._pvoid; snd->nsingle_ = int(pp[i][NSingleIndex] + .5); pp[i][NSingleIndex] = double(snd->nsingle_); if (snd->nsingle_ > 0) { // replace population fraction with integers. single_->init(v, s, snd, nt); } } //printf("KSChan::init\n"); //s = pp[i] + soffset_; //for (j=0; j < nstate_; ++j) { // printf("%d %g\n", j, s[j]); //} } } void KSChan::state(int n, Node** nd, double** pp, Datum** ppd, NrnThread* nt) { int i, j; double* s; if (nstate_) { for (i=0; i < n; ++i) { if (is_single() && pp[i][NSingleIndex] > .999) { single_->state(nd[i], pp[i], ppd[i], nt); continue; } double v = NODEV(nd[i]); s = pp[i] + soffset_; if (usetable_) { double inf, tau; int k; double x, y; x = (v - vmin_)*dvinv_; y = floor(x); k = int(y); x -= y; if(k < 0) { for (j = 0; j < nhhstate_; ++j) { trans_[j].inftau_hh_table(0, inf, tau); s[j] += (inf - s[j])*tau; } }else if (k >= hh_tab_size_) { for (j = 0; j < nhhstate_; ++j) { trans_[j].inftau_hh_table(hh_tab_size_-1, inf, tau); s[j] += (inf - s[j])*tau; } }else{ for (j = 0; j < nhhstate_; ++j) { trans_[j].inftau_hh_table(k, x, inf, tau); s[j] += (inf - s[j])*tau; } } }else{ for (j = 0; j < nhhstate_; ++j) { double inf, tau; trans_[j].inftau(v, inf, tau); tau = 1. - KSChanFunction::Exp(-nt->_dt/tau); s[j] += (inf - s[j])*tau; } } if (nksstate_) { s += nhhstate_; fillmat(v, ppd[i]); mat_dt(nt->_dt, s); solvemat(s); } } } } #if CACHEVEC void KSChan::state(int n, int *ni, Node** nd, double** pp, Datum** ppd, NrnThread* _nt) { int i, j; double* s; if (nstate_) { for (i=0; i < n; ++i) { if (is_single() && pp[i][NSingleIndex] > .999) { single_->state(nd[i], pp[i], ppd[i], _nt); continue; } double v = VEC_V(ni[i]); s = pp[i] + soffset_; if (usetable_) { double inf, tau; int k; double x, y; x = (v - vmin_)*dvinv_; y = floor(x); k = int(y); x -= y; if(k < 0) { for (j = 0; j < nhhstate_; ++j) { trans_[j].inftau_hh_table(0, inf, tau); s[j] += (inf - s[j])*tau; } }else if (k >= hh_tab_size_) { for (j = 0; j < nhhstate_; ++j) { trans_[j].inftau_hh_table(hh_tab_size_-1, inf, tau); s[j] += (inf - s[j])*tau; } }else{ for (j = 0; j < nhhstate_; ++j) { trans_[j].inftau_hh_table(k, x, inf, tau); s[j] += (inf - s[j])*tau; } } }else{ for (j = 0; j < nhhstate_; ++j) { double inf, tau; trans_[j].inftau(v, inf, tau); tau = 1. - KSChanFunction::Exp(-_nt->_dt/tau); s[j] += (inf - s[j])*tau; } } if (nksstate_) { s += nhhstate_; fillmat(v, ppd[i]); mat_dt(_nt->_dt, s); solvemat(s); } } } } #endif /* CACHEVEC */ void KSChan::cur(int n, Node** nd, double** pp, Datum** ppd) { int i; for (i=0; i < n; ++i) { double g, ic; g = conductance(pp[i][gmaxoffset_], pp[i]+soffset_); ic = iv_relation_->cur(g, pp[i]+gmaxoffset_, ppd[i], NODEV(nd[i])); NODERHS(nd[i]) -= ic; } } #if CACHEVEC void KSChan::cur(int n, int *nodeindices, double** pp, Datum** ppd, NrnThread* _nt) { int i; for (i=0; i < n; ++i) { double g, ic; int ni = nodeindices[i]; g = conductance(pp[i][gmaxoffset_], pp[i]+soffset_); ic = iv_relation_->cur(g, pp[i]+gmaxoffset_, ppd[i], VEC_V(ni)); VEC_RHS(ni) -= ic; } } #endif /* CACHEVEC */ void KSChan::jacob(int n, Node** nd, double** pp, Datum** ppd) { int i; for (i=0; i < n; ++i) { NODED(nd[i]) += iv_relation_->jacob(pp[i]+gmaxoffset_, ppd[i], NODEV(nd[i])); } } #if CACHEVEC void KSChan::jacob(int n, int *nodeindices, double** pp, Datum** ppd, NrnThread* _nt) { int i; for (i=0; i < n; ++i) { int ni = nodeindices[i]; VEC_D(ni) += iv_relation_->jacob(pp[i]+gmaxoffset_, ppd[i], VEC_V(ni)); } } #endif /* CACHEVEC */ double KSIv::cur(double g, double* p, Datum* pd, double v) { double i, ena; ena = *pd[0].pval; p[1] = g; i = g*(v - ena); p[2] = i; *pd[1].pval += i; //iion return i; } double KSIv::jacob(double* p, Datum* pd, double) { *pd[2].pval += p[1]; // diion/dv return p[1]; } double KSIvghk::cur(double g, double* p, Datum* pd, double v) { double i, ci, co; ci = *pd[3].pval; co = *pd[4].pval; p[1] = g; i = g*nrn_ghk(v, ci, co, z); p[2] = i; *pd[1].pval += i; return i; } double KSIvghk::jacob(double* p, Datum* pd, double v) { double i1, ci, co, didv; ci = *pd[3].pval; co = *pd[4].pval; i1 = p[1]*nrn_ghk(v + .001, ci, co, z); // g is p[1] didv = (i1 - p[2])*1000.; *pd[2].pval += didv; return didv; } double KSIvNonSpec::cur(double g, double* p, Datum* pd, double v) { double i; p[2] = g; // gmax, e, g i = g*(v - p[1]); p[3] = i; return i; } double KSIvNonSpec::jacob(double* p, Datum* pd, double) { return p[2]; } double KSPPIv::cur(double g, double* p, Datum* pd, double v) { double afac = 1.e2/(*pd[0].pval); pd += ppoff_; double i, ena; ena = *pd[0].pval; p[1] = g; i = g*(v - ena); p[2] = i; i *= afac; *pd[1].pval += i; //iion return i; } double KSPPIv::jacob(double* p, Datum* pd, double) { double afac = 1.e2/(*pd[0].pval); pd += ppoff_; double g = p[1]*afac; *pd[2].pval += g; // diion/dv return g; } double KSPPIvghk::cur(double g, double* p, Datum* pd, double v) { double afac = 1.e2/(*pd[0].pval); pd += ppoff_; double i, ci, co; ci = *pd[3].pval; co = *pd[4].pval; p[1] = g; i = g*nrn_ghk(v, ci, co, z)*1e6; p[2] = i; i *= afac; *pd[1].pval += i; return i; } double KSPPIvghk::jacob(double* p, Datum* pd, double v) { double afac = 1.e2/(*pd[0].pval); pd += ppoff_; double i1, ci, co, didv; ci = *pd[3].pval; co = *pd[4].pval; i1 = p[1]*nrn_ghk(v + .001, ci, co, z)*1e6; // g is p[1] didv = (i1 - p[2])*1000.; didv *= afac; *pd[2].pval += didv; return didv; } double KSPPIvNonSpec::cur(double g, double* p, Datum* pd, double v) { double afac = 1.e2/(*pd[0].pval); double i; p[2] = g; // gmax, e, g i = g*(v - p[1]); p[3] = i; return i*afac; } double KSPPIvNonSpec::jacob(double* p, Datum* pd, double) { double afac = 1.e2/(*pd[0].pval); return p[2]*afac; } double KSChan::conductance(double gmax, double* s) { double g = 1.; int i; for (i=0; i < ngate_; ++i) { g *= gc_[i].conductance(s, state_); } return gmax*g; } KSTransition::KSTransition(){ obj_ = NULL; f0 = NULL; f1 = NULL; size1_ = 0; inftab_ = NULL; tautab_ = NULL; stoichiom_ = 1; // f0 = new KSChanFunction(); // f1 = new KSChanFunction(); } KSTransition::~KSTransition(){ if (f0) { delete f0; } if (f1) { delete f1; } hh_table_make(0., 0); } void KSTransition::setf(int i, int type, Vect* vec, double vmin, double vmax) { ks_->usetable(false); if (i == 0) { if (f0) { delete f0; } f0 = KSChanFunction::new_function(type, vec, vmin, vmax); }else{ if (f1) { delete f1; } f1 = KSChanFunction::new_function(type, vec, vmin, vmax); } } void KSTransition::lig2pd(int poff) { ks_->usetable(false); if (type_ == 2) { pd_index_ = poff + 2*ligand_index_; }else if (type_ == 3){ pd_index_ = poff + 2*ligand_index_ + 1; }else{ assert(0); } } void KSTransition::ab(double v, double& a, double& b) { a = f0->f(v); if (f0->type() == 5 && f1->type() == 6) { b = ((KSChanBGinf*)f0)->tau; }else{ b = f1->f(v); } if (type_ == 1) { double t = a; a = t/b; b = (1. - t)/b; } } void KSTransition::ab(Vect* v, Vect* a, Vect* b) { int i, n = v->capacity(); a->resize(n); b->resize(n); if (f0->type() == 5 && f1->type() == 6) { for (i=0; i < n; ++i) { a->elem(i) = f0->f(v->elem(i)); b->elem(i) = ((KSChanBGinf*)f0)->tau; } }else{ for (i=0; i < n; ++i) { a->elem(i) = f0->f(v->elem(i)); b->elem(i) = f1->f(v->elem(i)); } } if (type_ == 1) { for (i=0; i < n; ++i) { double t = a->elem(i); a->elem(i) = t/b->elem(i); b->elem(i) = (1. - t)/b->elem(i); } } } void KSTransition::inftau(double v, double& a, double& b) { a = f0->f(v); if (f0->type() == 5 && f1->type() == 6) { b = ((KSChanBGinf*)f0)->tau; }else{ b = f1->f(v); } if (type_ != 1) { double t = 1./(a + b); a = a * t; b = t; } } void KSTransition::inftau(Vect* v, Vect* a, Vect* b) { int i, n = v->capacity(); a->resize(n); b->resize(n); if (f0->type() == 5 && f1->type() == 6) { for (i=0; i < n; ++i) { a->elem(i) = f0->f(v->elem(i)); b->elem(i) = ((KSChanBGinf*)f0)->tau; } }else{ for (i=0; i < n; ++i) { a->elem(i) = f0->f(v->elem(i)); b->elem(i) = f1->f(v->elem(i)); } } if (type_ != 1) { for (i=0; i < n; ++i) { double t = 1./(a->elem(i) + b->elem(i)); a->elem(i) = a->elem(i) * t; b->elem(i) = t; } } } double KSTransition::alpha(Datum* pd) { double x = *(pd[pd_index_].pval); switch (stoichiom_) { case 1: return x * f0->c(0); case 2: return x * x * f0->c(0); case 3: return x * x * x * f0->c(0); case 4: {x *= x; return x * x * f0->c(0); } default: return f0->c(0)* pow(x, double(stoichiom_)); } } double KSTransition::beta() { return f1->c(0); } KSGateComplex::KSGateComplex() { power_ = 0; obj_ = NULL; } KSGateComplex::~KSGateComplex() {} double KSGateComplex::conductance(double* s, KSState* st) { double g = 0.; int i; s += sindex_; st += sindex_; for (i=0; i < nstate_; ++i) { g += s[i] * st[i].f_; } #if 1 switch (power_) { // 14.42 case 1: return g; case 2: return g*g; case 3: return g*g*g; case 4: g = g*g; return g*g; } #endif return pow(g, (double)power_); // 18.74 } KSState::KSState() { obj_ = NULL; f_ = 0.; } KSState::~KSState() { } int KSChan::count() { return nstate_; } void KSChan::map(int ieq, double** pv, double** pvdot, double* p, Datum* pd, double* atol){ int i; double *p1 = p + soffset_; double *p2 = p1 + nstate_; for (i=0; i < nstate_; ++i) { pv[i] = p1 + i; pvdot[i] = p2 + i; } } void KSChan::spec(int n, Node** nd, double** p, Datum** ppd){ int i, j; if (nstate_) for (i=0; i < n; ++i) { //for (j=0; j < nstate_; ++j) { //printf("KSChan spec before j=%d s=%g ds=%g\n", j, p[i][soffset_+j], p[i][soffset_+nstate_+j]); //} double v = NODEV(nd[i]); double *p1 = p[i] + soffset_; double *p2 = p1 + nstate_; if (is_single() && p[i][NSingleIndex] > .999) { for (j = 0; j < nstate_; ++j) { p2[j] = 0.; } continue; } for (j = 0; j < nhhstate_; ++j) { double inf, tau; trans_[j].inftau(v, inf, tau); p2[j] = (inf - p1[j])/tau; } if (nksstate_) { fillmat(v, ppd[i]); mulmat(p1 + nhhstate_, p2 + nhhstate_); } //for (j=0; j < nstate_; ++j) { //printf("KSChan spec after j=%d s=%g ds=%g\n", j, p[i][soffset_+j], p[i][soffset_+nstate_+j]); //} } } void KSChan::matsol(int n, Node** nd, double** p, Datum** ppd, NrnThread* nt){ int i, j; double* p2; if (nstate_) for (i=0; i < n; ++i) { if (is_single() && p[i][NSingleIndex] > .999) { continue; } double v = NODEV(nd[i]); p2 = p[i] + soffset_ + nstate_; for (j = 0; j < nhhstate_; ++j) { double tau; tau = trans_[j].tau(v); p2[j] /= (1 + nt->_dt/tau); } if (nksstate_) { p2 += nhhstate_; fillmat(v, ppd[i]); mat_dt(nt->_dt, p2); solvemat(p2); } } } // from Cvode::do_nonode void KSChan::cv_sc_update(int n, Node** nd, double** pp, Datum** ppd, NrnThread* nt) { int i, j; double* s; if (nstate_) { for (i=0; i < n; ++i) { if (pp[i][NSingleIndex] > .999) { single_->cv_update(nd[i], pp[i], ppd[i], nt); } } } } KSChanFunction::KSChanFunction() { gp_ = NULL; } KSChanFunction::~KSChanFunction() { if (gp_) { hoc_obj_unref(gp_->obj_); } } KSChanFunction* KSChanFunction::new_function(int type, Vect* vec, double vmin, double vmax) { KSChanFunction* f; switch (type) { case 1: f = new KSChanConst(); break; case 2: f = new KSChanExp(); break; case 3: f = new KSChanLinoid(); break; case 4: f = new KSChanSigmoid(); break; case 5: f = new KSChanBGinf(); break; case 6: f = new KSChanBGtau(); break; case 7: f = new KSChanTable(vec, vmin, vmax); break; default: f = new KSChanFunction(); break; } f->gp_ = vec; hoc_obj_ref(f->gp_->obj_); return f; } KSChanTable::KSChanTable(Vect* vec, double vmin, double vmax) { vmin_ = vmin; vmax_ = vmax; assert(vmax > vmin); assert(vec->capacity() > 1); dvinv_ = (vec->capacity() - 1)/(vmax - vmin); } double KSChanTable::f(double v) { double x; if (v <= vmin_) { x = c(0); }else if (v >= vmax_) { x = c(gp_->capacity() - 1); }else{ x = (v - vmin_)*dvinv_; int i = (int)x; x -= floor(x); x = c(i) + (c(i+1) - c(i))*x; } return x; } void KSTransition::hh_table_make(double dt, int size, double vmin, double vmax) { int i; double dv, tau; if (size < 1 || vmin >= vmax || size - size1_ != 1) { if (size1_) { delete [] inftab_; delete [] tautab_; size1_ = 0; inftab_ = NULL; tautab_ = NULL; } if (size < 1) { return; } } if (inftab_ == NULL) { inftab_ = new double[size]; tautab_ = new double[size]; } size1_ = size - 1; dv = (vmax - vmin)/size1_; for (i=0; i < size; ++i) { inftau(vmin + i*dv, inftab_[i], tau); tautab_[i] = 1. - KSChanFunction::Exp(-dt/tau); } } void KSChan::usetable(bool use, int size, double vmin, double vmax) { if (vmin >= vmax) { vmin_ = -100; vmax_ = 50; }else{ vmin_ = vmin; vmax_ = vmax; } if (size < 2) { hh_tab_size_ = 200; }else{ hh_tab_size_ = size; } dvinv_ = (hh_tab_size_-1)/(vmax_ - vmin_); usetable(use); } static int ksusing(int type) { for (int i=0; i < nrn_nthread; ++i) { for (NrnThreadMembList* tml = nrn_threads[i].tml; tml; tml = tml->next) { if (tml->index == type) { return 1; } } } return 0; } void KSChan::usetable(bool use) { int i; if (nhhstate_ == 0) { use = false; } usetable_ = use; if (mechtype_ == -1) { return; } if (usetable_) { dtsav_ = -1.0; check_table_thread(nrn_threads); if (memb_func[mechtype_].thread_table_check_ != check_table_thread_) { memb_func[mechtype_].thread_table_check_ = check_table_thread_; if (ksusing(mechtype_)) { nrn_mk_table_check(); } } }else{ if (memb_func[mechtype_].thread_table_check_) { memb_func[mechtype_].thread_table_check_ = 0; if (ksusing(mechtype_)) { nrn_mk_table_check(); } } } } int KSChan::usetable(double* vmin, double* vmax) { *vmin = vmin_; *vmax = vmax_; return hh_tab_size_; } void KSChan::check_table_thread(NrnThread* nt) { int i; if (usetable_ && nt->_dt != dtsav_) { for (i = 0; i < nhhstate_; ++i) { trans_[i].hh_table_make(nt->_dt, hh_tab_size_, vmin_, vmax_); } dtsav_ = nt->_dt; } } neuron-7.5/src/nrniv/kschan.h000066400000000000000000000267101323325274500162520ustar00rootroot00000000000000#ifndef kschan_h #define kschan_h #include #include #include "nrnoc2iv.h" #include "ivocvect.h" extern "C" { #include "spmatrix.h" } extern "C" { //extern double dt; extern double celsius; } class KSState; class KSChan; class KSSingle; struct NrnThread; class KSChanFunction { public: KSChanFunction(); virtual ~KSChanFunction(); virtual int type() { return 0; } virtual double f(double v) { return 1.; } void f(int cnt, double* v, double* val) { int i; for (i=0; i < cnt; ++i) { val[i] = f(v[i]); } } static KSChanFunction* new_function(int type, Vect*, double , double); Vect* gp_; // gate parameters double c(int i) { return gp_->elem(i); } static double Exp(double x) { if (x > 700.) {return exp(700.); } else if (x < -700.) { return exp(-700.); } else { return exp(x); } } }; class KSChanConst : public KSChanFunction { public: virtual int type() { return 1; } virtual double f(double v) { return c(0); } }; class KSChanExp : public KSChanFunction { public: virtual int type() { return 2; } virtual double f(double v) { return c(0)*Exp(c(1) * (v - c(2))); } }; class KSChanLinoid : public KSChanFunction { public: virtual int type() { return 3; } virtual double f(double v) { double x = c(1)*(v - c(2)); if (fabs(x) > 1e-6) { return c(0)*x/(1 - Exp(-x)); }else{ return c(0)*(1 + x/2.); } } }; class KSChanSigmoid : public KSChanFunction { public: virtual int type() { return 4; } virtual double f(double v) { return c(0) / (1. + Exp(c(1) * (v - c(2)))); } }; // e/(kT) e/k=11.604589 from hoc's FARADAY and R values #define ebykt (11.604589/(273.15 + celsius)) // from MODELING NEURONAL BIOPHYSICS Lyle J Graham //A Chapter in the Handbook of Brain Theory and Neural Networks, Volume 2 //a' = K*exp(z*gam*(v-vhalf)*F/RT) //b' = K*exp(-z*(1-gam)*(v-vhalf)*F/RT) //but tau = 1/(a' + b') + tau0 //and inf = a'/(a' + b') // so there is no fast way to get either a,b or inf,tau individually class KSChanBGinf : public KSChanFunction { public: virtual int type() { return 5; } virtual double f(double v) { double x = ebykt*c(2)*(v - c(1)); double ap = c(0) * Exp(c(3)*x); double bp = c(0) * Exp((c(3) - 1.)*x); tau = 1/(ap + bp); double inf = ap*tau; tau += c(4); return inf; } double tau; // may avoid duplicate call to KSChanBGtau }; class KSChanBGtau : public KSChanFunction { public: virtual int type() { return 6; } virtual double f(double v) { double x = ebykt*c(2)*(v - c(1)); double ap = c(0) * Exp(c(3)*x); double bp = c(0) * Exp((c(3) - 1.)*x); double tau = 1/(ap + bp); inf = ap*tau; tau += c(4); return tau; } double inf; // may avoid duplicate call to KSChanBGinf }; class KSChanTable : public KSChanFunction { public: KSChanTable(Vect*, double vmin, double vmax); virtual int type() { return 7; } virtual double f(double v); double vmin_, vmax_; private: double dvinv_; }; class KSTransition { public: KSTransition(); virtual ~KSTransition(); // vmin, vmax only for type KSChanTable void setf(int direction, int type, Vect* vec, double vmin, double vmax); // only voltage gated for now double alpha(double v) { return type_ == 0 ? f0->f(v) : f0->f(v)/f1->f(v); } double beta(double v) { return type_ == 0 ? f1->f(v) : (1. - f0->f(v))/f1->f(v); } double inf(double v) { return type_ == 1 ? f0->f(v) : f0->f(v)/(f0->f(v) + f1->f(v)); } double tau(double v) { return type_ == 1 ? f1->f(v) : 1./(f0->f(v) + f1->f(v)); } void ab(double v, double& a, double& b); void ab(Vect* v, Vect* a, Vect* b); void inftau(double v, double& inf, double& tau); void inftau(Vect* v, Vect* inf, Vect* tau); // hh tables // easily out of date!! // in anything about f0 or f1 changes then must call hh_table_make; void hh_table_make(double dt, int size=200, double vmin=-100., double vmax=50.); bool usehhtable() { return (size1_ > 0); } void inftau_hh_table(int i, double& inf, double& tau) { inf = inftab_[i]; tau = tautab_[i]; } void inftau_hh_table(int i, double x, double& inf, double& tau) { inf = inftab_[i] + (inftab_[i+1] - inftab_[i])*x; tau = tautab_[i] + (tautab_[i+1] - tautab_[i])*x; } // the agent style virtual double alpha(Datum*); virtual double beta(); void lig2pd(int pdoff); public: Object* obj_; int index_; // into trans_ array int src_; int target_; KSChan* ks_; KSChanFunction* f0; KSChanFunction* f1; int type_; // 0-ab,voltage gated; 1-inftau voltage gated // 2-ligand outside; 3-ligand inside int ligand_index_; int pd_index_; int stoichiom_; private: // for hh tables. double* inftab_; double* tautab_; int size1_; }; class KSGateComplex { public: KSGateComplex(); virtual ~KSGateComplex(); double conductance(double* state, KSState* st); public: Object* obj_; KSChan* ks_; int index_; // into gc_ array int sindex_; // starting state index for this complex int nstate_; // number of states int power_; // eg. n^4, or m^3 }; class KSIv { public: // this one for ionic ohmic and nernst. virtual double cur(double g, double* p, Datum* pd, double v); virtual double jacob(double* p, Datum* pd, double v); }; class KSIvghk : public KSIv { public: // this one for ionic Goldman-Hodgkin-Katz virtual double cur(double g, double* p, Datum* pd, double v); virtual double jacob(double* p, Datum* pd, double v); double z; }; class KSIvNonSpec : public KSIv{ // this one for non-specific ohmic. There will be a PARAMETER e_suffix at p[1] virtual double cur(double g, double* p, Datum* pd, double v); virtual double jacob(double* p, Datum* pd, double v); }; class KSPPIv : public KSIv { public: // this one for POINT_PROCESS ionic ohmic and nernst. virtual double cur(double g, double* p, Datum* pd, double v); virtual double jacob(double* p, Datum* pd, double v); int ppoff_; }; class KSPPIvghk : public KSPPIv { public: // this one for POINT_PROCESS ionic Goldman-Hodgkin-Katz virtual double cur(double g, double* p, Datum* pd, double v); virtual double jacob(double* p, Datum* pd, double v); double z; }; class KSPPIvNonSpec : public KSPPIv{ // this one for POINT_PROCESS non-specific ohmic. There will be a PARAMETER e_suffix at p[1] virtual double cur(double g, double* p, Datum* pd, double v); virtual double jacob(double* p, Datum* pd, double v); }; class KSState { public: KSState(); virtual ~KSState(); const char* string() { return name_.string(); } double f_; // normalized conductance CopyString name_; int index_; // into state_ array KSChan* ks_; Object* obj_; }; class KSChan { public: KSChan(Object*, bool is_point = false); virtual ~KSChan(); virtual void alloc(Prop*); virtual void init(int, Node**, double**, Datum**, NrnThread*); virtual void cur(int, Node**, double**, Datum**); virtual void jacob(int, Node**, double**, Datum**); virtual void state(int, Node**, double**, Datum**, NrnThread*); #if CACHEVEC != 0 virtual void cur(int, int *, double**, Datum**, NrnThread*); virtual void jacob(int, int *, double**, Datum**, NrnThread*); virtual void state(int, int *, Node**, double**, Datum**, NrnThread*); #endif /* CACHEVEC */ void add_channel(const char**); //for cvode virtual int count(); virtual void map(int, double**, double**, double*, Datum*, double*); virtual void spec(int, Node**, double**, Datum**); virtual void matsol(int, Node**, double**, Datum**, NrnThread*); virtual void cv_sc_update(int, Node**, double**, Datum**, NrnThread*); double conductance(double gmax, double* state); public: // hoc accessibilty int state(const char* name); const char* state(int index); int trans_index(const char* src, const char* target); // index of the transition int trans_index(int src, int target); // index of the transition int gate_index(int state_index); // index of the gate bool is_point() { return is_point_; } bool is_single() { return is_single_; } void set_single(bool, bool update = true); void destroy_pnt(Point_process*); int nsingle(Point_process*); void nsingle(Point_process*, int); double alpha(double v, int, int) {return 0.;} double beta(double v, int, int) {return 0.;} void setstructure(Vect*); void setname(const char*); void setsname(int, const char*); void setion(const char*); void setligand(int i, const char*); void settype(KSTransition*, int type, const char*); void setivrelation(int); // hoc incremental management KSState* add_hhstate(const char*); KSState* add_ksstate(int igate, const char*); void remove_state(int); // these are only for kinetic scheme transitions since an hh // always has one and only one transition. KSTransition* add_transition(int src, int target, const char* ligand); void remove_transition(int); void setcond(); void power(KSGateComplex*, int); void usetable(bool, int size, double vmin, double vmax); void usetable(bool); int usetable(double* vmin, double* vmax);// get info bool usetable() { return usetable_; } void check_table_thread(NrnThread*); private: void free1(); void build(); void setupmat(); void fillmat(double v, Datum* pd); void mat_dt(double dt, double* p); void solvemat(double*); void mulmat(double*, double*); void ion_consist(); void ligand_consist(int, int, Prop*, Node*); Prop* needion(Symbol*, Node*, Prop*); void state_consist(int shift = 0); void sname_install(); Symbol* looksym(const char*, Symbol* tmplt = NULL); Symbol* installsym(const char*, int, Symbol* tmplt = NULL); void freesym(Symbol*, Symbol* tmplt = NULL); Symbol** newppsym(int); void delete_schan_node_data(); void alloc_schan_node_data(); void update_prop(); // can add and remove Nsingle and SingleNodeData KSState* state_insert(int i, const char* name, double frac); void state_remove(int i); KSGateComplex* gate_insert(int ig, int is, int power); void gate_remove(int i); KSTransition* trans_insert(int i, int src, int target); void trans_remove(int i); void check_struct(); int state_size_; int gate_size_; int trans_size_; bool is_point_; bool is_single_; // for point process int pointtype_; int mechtype_; public: CopyString name_; // name of channel CopyString ion_; // name of ion , "" means non-specific double gmax_deflt_; double erev_deflt_; int cond_model_; KSIv* iv_relation_; int ngate_; // number of gating complexes int ntrans_; // total number of transitions int ivkstrans_; // index of beginning of voltage sensitive ks transitions int iligtrans_; // index of beginning of ligand sensitive ks transitions // 0 to ivkstrans_ - 1 are the hh transitions int nhhstate_; // total number of hh states, does not include ks states int nksstate_; // total number of kinetic scheme states. int nstate_; // total number of all states, nhhstate_ to nstate_ - 1 // are kinetic scheme states. The nhhstate_ are first // and the nhhstate_ = ivkstrans_ KSState* state_; // the state names KSGateComplex* gc_; KSTransition* trans_; // array of transitions Symbol* ion_sym_; // if NULL then non-specific and e_suffix is a parameter int nligand_; Symbol** ligands_; Object* obj_; KSSingle* single_; private: int cvode_ieq_; Symbol* mechsym_; // the top level symbol (insert sym or new sym) Symbol* rlsym_; // symbol with the range list (= mechsym_ when density) char* mat_; double** elms_; double** diag_; int dsize_; // size of prop->dparam int psize_; // size of prop->param int soffset_; //STATE begins here in the p array. int gmaxoffset_; // gmax is here in the p array, normally 0 but if // there is an Nsingle then it is 1. int ppoff_; //2 or 3 for point process since area and Point_process* are // first two elements and there may be a KSSingleNodeData* // for hh rate tables double vmin_, vmax_, dvinv_, dtsav_; int hh_tab_size_; bool usetable_; }; #endif neuron-7.5/src/nrniv/kssingle.cpp000066400000000000000000000357751323325274500171700ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include "nrnoc2iv.h" #include "kschan.h" #include "kssingle.h" // needed for DiscreteEvent aspect #include "netcvode.h" #include "cvodeobj.h" //---------------- // KSSingleTrans, KSSingleState is only apparently redundant with KSTrans // and KSState. i.e. they are identical only if KSChan has only a single // gating complex with a power of 1. If there are G gating complexes with // powers pg and numbers of states sg (where g ranges from 0 to G-1) then // the number of distinct states for the gate g is the binomial factor // nsg = (sg + pg - 1, pg). i.e. (sg + pg - 1)! / pg! / (sg - 1)! // and the total number of distinct states is the product of the nsg. // consider m^3 * h, and suppose m is open and M is closed then there // are three ways to go from mmmh to Mmmh and one way to go to mmmH. i.e // MMMH <-> mMMH (3am, bm) MMMH <-> MMMh (ah, bh) MMMh <-> mMMh (3am, bm) // mMMH <-> mmMH (2am, 2bm) mMMH <-> mMMh (ah, bh) mMMh <-> mmMh (2am, 2bm) // mmMH <-> mmmH (am, 3bm) mmMH <-> mmMh (ah, bh) mmMh <-> mmmh (am, 3bm) // there are 8 states and 18 transitions. // // Following a single particle as it moves from state to state is // the simplest case. It suffices to keep track of the state index // and, following ... // use two random numbers. One random number is transformed into // a negative exponential distribution // and defines the time interval to the next transition. The rate is the // sum of all the possible transition rates. The other is uniformly // distibuted between 0 and 1 and is used to determine which transition // branch was taken according to the // // For the case of N particles distributed among the states we use // an integer array in which an element is the integer population of the // corresponding state. Too bad we lose the efficiency of the implicit handling // of 0 population states but I don't see how it can be helped. // Again we use two random numbers. The transition rate of some event, i.e. // some particle moves to another state, is the sum over all states of the // state population times the sum of all the possible transition rates for // that state. And, again, the second random number defines the branch taken. // Note that this is still an exact stochastic simulation in that only // one thing happens at a time. // // It remains to discuss how things are affected by changing rates. // We make the approximation that rates are constant within a dt. In // consequence we only need to compute the rate information once per dt // (at least for the N particle case) no matter how many transitions have // to be followed til the last one is beyond the t0+dt point. The question // is what to do with that last interval which remains unused, ie. time // has not reached the "transition time" // Also we'd like to be efficient when the average interval is much greater // than dt. // The simplest implementation is to just discard the random numbers and // assert that the time is t0 <- t0+dt and compute from that point // at the next solve step. The alternative is to hold the last random // pair and recalculate the interval (assuming the rate has changed) // to obtain (from the last actual transition time) a new transition time. // and see if it is now less than the new t0 + dt. Note that there is // some extra error here because of the assumption of constant rate over the // last entire random interval and not just the last dt. // Note that we do not have to worry about this (or at least worry less) // in voltage clamp context as well as in contexts in which intervals are // seldom > dt. However no analysis has been done and I can't demonstrate // that the statistical error of following a single channel // during an action potential is not substantial. We compromise and // test the voltage. If it has changed then we reset the transition time // to t0 and repick random numbers. If it has not changed significantly, // then we keep the last random interval and use that when t0+dt passes the // up to then unexecuted transition. //---------------- // The above broad design envisioned a parallel structure involving // a single kinetic scheme isomorphic to the user level spec which // may have multiple gates raised to powers. The initial implementation // for the KSSingle constructor, however, for simplicity assumed that the // user level spec was only one ks gate complex with power 1. In any case // the question of state read out and conductance calculation arises // and in either case it seems to make most sense that the standard // state array in the prop->param array be used. With the current // limited implementation, KSSingleNodeData.statelist_ is conceptually // identical to the prop->param states. In the envisioned full implementation // the least violent possibility is to keep the user level spec as much // as possible but to expand the prop->param states to correspond // to single channel requirements. Another possibility which does a // lot more violence to the user spec but makes the current implementation // almost complete is to replace the user spec with a single channel // adequate ks scheme. Merely stating it is sufficient to reject it. // A third possiblity is to not use the prop->param states at all since // their user level spec does not correspond to the ks single channel // states. But this makes GUI interface not re-usable (e.g. plotting // a state) and the question of determining states values at the user // level remains. The last possibility is to not allow single channel // mode unless there is only one ks gate complex raised to a single power // and coelesce the redundant structures. // So it seems that the best extension so far is to // keep the user level spec in KSChan but when in single channel mode, // define the prop->param state array to correspond to single channel // states. Since we are going that far we might as well go the whole // way and also introduce a new Nsingle PARAMETER and make the // dparam[2]._pvoid == KSSingleNodeData existent only in single channel // mode. Note that since KSChan.nstate_ <= KSSingle.nstate_, initialization // can fill the KSChan interpreted prop->param states with the fractions, // and then, per normal, the prop->param states interpreted at KSSingle // states get filled with the right integers. We'll also need a naming // convention for KSSingle states since that is how they get accessed at // the hoc level. We need names for the hh open and closed state // if the hh state name is "a". We need names generated for powers. // Products are easy, just concatenate the names. For powers of hh states we // use the hh state name followed by the number that are open. eg an m^3 // gate gets the names m0, m1, m2, m3. Thus m^3*h has the names // m0h0 m1h0 m2h0 m3h0 m0h1 m1h1 m2h1 m3h1 (m3h1 is the only open state) // Kind of makes mh[4][2] attractive. // The combinatorics for ks gates raised to a power // is more complex and it is not clear that that is so useful. I think // it makes sense to ignore that and use array indices only for hh gates // raised to a power. Thus a 3 state gate multiplied by an h hh gate would // have the names c0h[2], c1h[2], oh[2] // The nice aspect of this is that the current implementation can be // easily transformed since the transformation of prop->param states can // be deferred to later. i.e there seems to be a nice incremental path // to a full implementation without removing at one step what was added // at the previous step. The first step is to replace the not always used // int* KSSingleNodeData.statelist_ with an always used // double* KSSingleNodeData.statepop_ which points into the prop->param. //---------------- extern "C" { extern int cvode_active_; } extern NetCvode* net_cvode_instance; double KSSingle::vres_; unsigned int KSSingle::idum_; KSSingle::KSSingle(KSChan* c) { //implemenation assumes one ks gate complex with power 1 int i; sndindex_ = 2; nstate_ = c->nstate_; states_ = new KSSingleState[nstate_]; ntrans_ = 2 * c->ntrans_; transitions_ = new KSSingleTrans[ntrans_]; rval_ = new double[Math::max(ntrans_, nstate_)]; uses_ligands_ = false; for (i=0; i < c->ntrans_; ++i) { { KSSingleTrans& tf = transitions_[2*i]; tf.kst_ = c->trans_ + i; if (tf.kst_->type_ >= 2) { uses_ligands_ = true; } tf.f_ = true; tf.fac_ = 1.; tf.src_ = tf.kst_->src_; tf.target_ = tf.kst_->target_; }{ KSSingleTrans& tf = transitions_[2*i + 1]; tf.kst_ = c->trans_ + i; tf.f_ = false; tf.fac_ = 1.; tf.src_ = tf.kst_->target_; tf.target_ = tf.kst_->src_; } } // The transition list for each source state is required for // N=1 single channels. // count first for (i=0; i < ntrans_; ++i) { states_[transitions_[i].src_].ntrans_++; } // allocate and reset count for (i=0; i < nstate_; ++i) { KSSingleState& ss = states_[i]; ss.transitions_ = new int[ss.ntrans_]; ss.ntrans_ = 0; } // link for (i=0; i < ntrans_; ++i) { KSSingleState& ss = states_[transitions_[i].src_]; ss.transitions_[ss.ntrans_] = i; ++ss.ntrans_; } } KSSingle::~KSSingle() { delete [] states_; delete [] transitions_; delete [] rval_; } KSSingleState::KSSingleState() { ntrans_ = 0; transitions_ = NULL; } KSSingleState::~KSSingleState() { if (transitions_) { delete [] transitions_; } } KSSingleTrans::KSSingleTrans() { } KSSingleTrans::~KSSingleTrans() { } double KSSingleTrans::rate(Point_process* pnt) { if (kst_->type_ < 2) { return rate(NODEV(pnt->node)); }else{ return rate(pnt->prop->dparam); } } KSSingleNodeData::KSSingleNodeData() { statepop_ = NULL; nsingle_ = 1; } KSSingleNodeData::~KSSingleNodeData() { } void KSSingleNodeData::deliver(double tt, NetCvode* nc, NrnThread* nt) { ++KSSingle::singleevent_deliver_; Cvode* cv = (Cvode*)((*ppnt_)->nvi_); if (cv) { nc->retreat(tt, cv); cv->set_init_flag(); } assert(nt->_t == tt); vlast_ = NODEV((*ppnt_)->node); if (nsingle_ == 1) { kss_->do1trans(this); }else{ kss_->doNtrans(this); } qi_ = nc->event(t1_, this, nt); } void KSSingleNodeData::pr(const char* s, double tt, NetCvode* nc) { printf("%s %s %.15g\n", s, hoc_object_name((*ppnt_)->ob), tt); } void KSSingle::state(Node* nd, double* p, Datum* pd, NrnThread* nt) { // integrate from t-dt to t int i; double v = NODEV(nd); KSSingleNodeData* snd = (KSSingleNodeData*)pd[sndindex_]._pvoid; // if truly single channel, as opposed to N single channels // then follow the one populated state. Otherwise do the // general case if (snd->nsingle_ == 1) { one(v, snd, nt); }else{ multi(v, snd, nt); } } void KSSingle::cv_update(Node* nd, double* p, Datum* pd, NrnThread* nt) { // if v changed then need to move the outstanding // single channel event time to a recalculated time int i; double v = NODEV(nd); KSSingleNodeData* snd = (KSSingleNodeData*)pd[sndindex_]._pvoid; if (uses_ligands_ || !vsame(v, snd->vlast_)) { assert(nt->_t < snd->t1_); snd->vlast_ = v; snd->t0_ = nt->_t; if (snd->nsingle_ == 1) { next1trans(snd); }else{ nextNtrans(snd); } net_cvode_instance->move_event(snd->qi_, snd->t1_, nt); ++KSSingle::singleevent_move_; } } int KSSingle::rvalrand(int n) { int i; --n; double x = unifrand(rval_[n]); for (i=0; i < n; ++i) { if (rval_[i] >= x) { return i; } } return n; } void KSSingle::one(double v, KSSingleNodeData* snd, NrnThread* nt) { if (uses_ligands_ || !vsame(v, snd->vlast_)) { snd->vlast_ = v; snd->t0_ = nt->_t - nt->_dt; next1trans(snd); } while (snd->t1_ <= nt->_t) { snd->vlast_ = v; do1trans(snd); } } void KSSingle::do1trans(KSSingleNodeData* snd) { snd->t0_ = snd->t1_; //printf("KSSingle::do1trans t1=%g old=%d ", snd->t1_, snd->filledstate_); snd->statepop_[snd->filledstate_] = 0.; snd->filledstate_ = transitions_[snd->next_trans_].target_; snd->statepop_[snd->filledstate_] = 1.; //printf("new=%d \n", snd->filledstate_); next1trans(snd); } void KSSingle::next1trans(KSSingleNodeData* snd) { int i; KSSingleState* ss = states_ + snd->filledstate_; double x = 0; for (i = 0; i < ss->ntrans_; ++i) { KSSingleTrans* st = transitions_ + ss->transitions_[i]; x += st->rate(*snd->ppnt_); rval_[i] = x; } if (x > 1e-9) { snd->t1_ = exprand()/x + snd->t0_; snd->next_trans_ = ss->transitions_[rvalrand(ss->ntrans_)]; }else{ snd->t1_ = 1e9 + snd->t0_; snd->next_trans_ = ss->transitions_[0]; } //printf("KSSingle::next1trans v=%g t1_=%g %d (%d, %d)\n", snd->vlast_, snd->t1_, snd->next_trans_, //transitions_[snd->next_trans_].src_, transitions_[snd->next_trans_].target_); } void KSSingle::multi(double v, KSSingleNodeData* snd, NrnThread* nt) { if (uses_ligands_ || !vsame(v, snd->vlast_)) { snd->vlast_ = v; snd->t0_ = nt->_t - nt->_dt; nextNtrans(snd); } while (snd->t1_ <= nt->_t) { snd->vlast_ = v; doNtrans(snd); } } void KSSingle::doNtrans(KSSingleNodeData* snd) { snd->t0_ = snd->t1_; KSSingleTrans* st = transitions_ + snd->next_trans_; assert(snd->statepop_[st->src_] >= 1.); --snd->statepop_[st->src_]; ++snd->statepop_[st->target_]; //printf("KSSingle::doNtrans t1=%g %d with %g -> %d with %g\n", snd->t1_, //st->src_, snd->statepop_[st->src_], st->target_, snd->statepop_[st->target_]); nextNtrans(snd); } void KSSingle::nextNtrans(KSSingleNodeData* snd) { int i; double x = 0; for (i = 0; i < ntrans_; ++i) { KSSingleTrans* st = transitions_ + i; x += snd->statepop_[st->src_] * st->rate(*snd->ppnt_); rval_[i] = x; } if (x > 1e-9) { snd->t1_ = exprand()/x + snd->t0_; snd->next_trans_ = rvalrand(ntrans_); }else{ snd->t1_ = 1e9 + snd->t0_; snd->next_trans_ = 0; } } void KSSingle::alloc(Prop* p, int sindex) { // and discard old if not NULL KSSingleNodeData* snd = (KSSingleNodeData*)(p->dparam[2]._pvoid); if (snd) { delete snd; } snd = new KSSingleNodeData(); snd->kss_ = this; snd->ppnt_ = (Point_process**)(&p->dparam[1]._pvoid); p->dparam[2]._pvoid = snd; snd->statepop_ = p->param + sindex; } void KSSingle::init(double v, double* s, KSSingleNodeData* snd, NrnThread* nt) { // assuming 1-1 correspondence between KSChan and KSSingle states // place steady state population intervals end to end int i; double x = 0; snd->qi_ = NULL; snd->t0_ = nt->_t; snd->vlast_ = v; for (i=0; i < nstate_; ++i) { x += s[i]; rval_[i] = x; } // initialization of complex kinetic schemes often not accurate to 9 decimal places // assert(Math::equal(rval_[nstate_ - 1], 1., 1e-9)); for (i=0; i < nstate_; ++i) { snd->statepop_[i] = 0; } if (snd->nsingle_ == 1) { snd->filledstate_ = rvalrand(nstate_); ++snd->statepop_[snd->filledstate_]; next1trans(snd); }else{ for (i=0; i < snd->nsingle_; ++i) { ++snd->statepop_[rvalrand(nstate_)]; } nextNtrans(snd); //for (i=0; i < nstate_; ++i) { // printf(" state %d pop %g\n", i, snd->statepop_[i]); //} } if (cvode_active_) { snd->qi_ = net_cvode_instance->event(snd->t1_, snd, nrn_threads); } } void KSChan::nsingle(Point_process* pp, int n) { KSSingleNodeData* snd = (KSSingleNodeData*)pp->prop->dparam[2]._pvoid; if (snd) { snd->nsingle_ = n; } } int KSChan::nsingle(Point_process* pp) { KSSingleNodeData* snd = (KSSingleNodeData*)pp->prop->dparam[2]._pvoid; if (snd) { return snd->nsingle_; }else{ return 1000000000; } } neuron-7.5/src/nrniv/kssingle.h000066400000000000000000000046171323325274500166240ustar00rootroot00000000000000#ifndef kssingle_h #define kssingle_h #include #include #include #include extern "C" { #include } class KSSingleTrans; class KSSingleState; class KSSingle; class KSChan; class KSSingleNodeData : public DiscreteEvent { public: KSSingleNodeData(); virtual ~KSSingleNodeData(); // subclassed DiscreteEvent methods virtual void deliver(double t, NetCvode*, NrnThread*); virtual void pr(const char*, double t, NetCvode*); // specific to KSSingleNodeData int nsingle_; double* statepop_; // points to prop->param state array int filledstate_; // used when nsingle_ == 1, index of populated state double vlast_; // voltage at which the transition rates were calculated double t0_; // last transition time. <= t on entry to step calculations. double t1_; // next. > t + dt on exit from step calculations. int next_trans_; // if t1_ takes effect, this is the trans. Point_process** ppnt_; KSSingle* kss_; TQItem* qi_; }; class KSSingle { public: KSSingle(KSChan*); virtual ~KSSingle(); void alloc(Prop*, int sindex); void init(double v, double* s, KSSingleNodeData* snd, NrnThread*); void state(Node*, double*, Datum*, NrnThread*); void cv_update(Node*, double*, Datum*, NrnThread*); void one(double, KSSingleNodeData*, NrnThread*); void do1trans(KSSingleNodeData*); void next1trans(KSSingleNodeData*); void multi(double, KSSingleNodeData*, NrnThread*); void doNtrans(KSSingleNodeData*); void nextNtrans(KSSingleNodeData*); bool vsame(double x, double y) {return Math::equal(x, y, vres_);} double exprand() { return -log(mcell_ran4a(&idum_)); } double unifrand(double range) { return mcell_ran4a(&idum_)*range; } int rvalrand(int); int ntrans_, nstate_, sndindex_; KSSingleTrans* transitions_; KSSingleState* states_; double* rval_; bool uses_ligands_; static double vres_; static unsigned int idum_; static unsigned long singleevent_deliver_; static unsigned long singleevent_move_; }; class KSSingleTrans { public: KSSingleTrans(); virtual ~KSSingleTrans(); double rate(Point_process*); double rate(double v) { return fac_ * (f_ ? kst_->alpha(v) : kst_->beta(v)); } double rate(Datum* pd) { return fac_ * (f_ ? kst_->alpha(pd) : kst_->beta()); } int src_; int target_; KSTransition* kst_; bool f_; double fac_; }; class KSSingleState { public: KSSingleState(); virtual ~KSSingleState(); int ntrans_; int* transitions_; }; #endif neuron-7.5/src/nrniv/linmod.cpp000077500000000000000000000051551323325274500166230ustar00rootroot00000000000000#include <../../nrnconf.h> // linear model whose equations are solved simultaneously with the // voltage equations. // The c*dy/dt + g*y = b equations are added to the node equations // and the policy is that the the list of nodes pertains to the first // equations. // this has only the essential info with regard to solving equations and // nothing with regard to parameterization. // the matrices are assumed to be constant during a simulation run. // and there is no provision here for changing bvec. // MatrixMap gives fast copying of linear model matrix to main tree matrix // In DASPK, the equation order for voltage equations is the same as for // the fixed step method (see nrncvode/occcvode.cpp Cvode::daspk_) // This is a different order than that of cvode in which cap nodes are first // followed by no-cap nodes. // The parallel extends to the additional equations in these linear mechanisms // along with extracellular nodes. // Therefore bmap_ can be used directly for the map to the // daspk equation indices. #include #include "linmod.h" extern "C" { extern int (*nrnpy_hoccommand_exec)(Object*); } LinearModelAddition::LinearModelAddition(Matrix* cmat, Matrix* gmat, Vect* yvec, Vect* y0, Vect* bvec, int nnode, Node** nodes, Vect* elayer, Object* f_callable) : NrnDAE(cmat, yvec, y0, nnode, nodes, elayer), b_(*bvec), f_callable_(f_callable) { //printf("LinearModelAddition %p\n", this); g_ = new MatrixMap(gmat); } LinearModelAddition::~LinearModelAddition() { //printf("~LinearModelAddition %p\n", this); delete g_; } void LinearModelAddition::alloc_(int size, int start, int nnode, Node** nodes, int* elayer) { //printf("LinearModelAddition::alloc_ %p\n", this); assert(b_.capacity() == size); assert(g_->nrow() == size && g_->ncol() == size); //printf("g_->alloc start=%d, nnode=%d\n", start_, nnode_); g_->alloc(start, nnode, nodes, elayer); } void LinearModelAddition::f_(Vect& y, Vect& yprime, int size) { //printf("LinearModelAddition::f_ %p\n", this); //right side portion of (c/dt +g)*[dy] = -g*y + b // given y, returns y' // vm,vext may be reinitialized between fixed steps and certainly // has been adjusted by daspk // size is the number of equations if (f_callable_) { if (!(*nrnpy_hoccommand_exec)(f_callable_)) { hoc_execerror("LinearModelAddition runtime error",0); } } g_->mulv(y, yprime); for (int i = 0; i < size; ++i) { yprime[i] = b_[i] - yprime[i]; } } // indicates that the returned Jacobian must be multiplied by -1 to be // true value double LinearModelAddition::jacobian_multiplier_() { return -1; } MatrixMap* LinearModelAddition::jacobian_(Vect& y) { return g_; } neuron-7.5/src/nrniv/linmod.h000077500000000000000000000012261323325274500162630ustar00rootroot00000000000000#ifndef linmod_h #define linmod_h #include #include "ocmatrix.h" #include "ivocvect.h" #include "nrnoc2iv.h" #include "matrixmap.h" #include "nrndae.h" class LinearModelAddition : public NrnDAE { public: LinearModelAddition(Matrix* c, Matrix* g, Vect* y, Vect* y0, Vect* b, int nnode = 0, Node** nodes = NULL, Vect* elayer = NULL, Object* f_callable = NULL); virtual ~LinearModelAddition(); private: void f_(Vect& y, Vect& yprime, int size); MatrixMap* jacobian_(Vect& y); double jacobian_multiplier_(); void alloc_(int size, int start, int nnode, Node** nodes, int* elayer); MatrixMap* g_; Vect& b_; Object* f_callable_; }; #endif neuron-7.5/src/nrniv/linmod1.cpp000066400000000000000000000077301323325274500167020ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "ocnotify.h" #if HAVE_IV #include "ivoc.h" #endif #include "classreg.h" #include "linmod.h" #include "nrnoc2iv.h" extern "C" { extern double* nrn_recalc_ptr(double*); } //hoc interface to a LinearModelAddition // remember that the policy for equation additions to the tree matrix is // cmat*y' + gmat*y = b and where the first nnode rows specify // the number of equations (identfied by nodes) // which are added to existing node equations in the tree structure // and the first nnode columns specify the voltages (identified by nodes) // which are coupled to the equations. i.e the number of new equations // and states added to the tree matrix is nrow - nnode class LinearMechanism : public Observer { public: LinearMechanism(); virtual ~LinearMechanism(); virtual void disconnect(Observable*); virtual void update(Observable*); void create(); void lmfree(); bool valid() { return model_ != NULL; } void update_ptrs(); LinearModelAddition* model_; Matrix* c_; Matrix* g_; Vect* y_; Vect* y0_; Vect* b_; int nnode_; Object* f_callable_; Node** nodes_; Vect* elayer_; }; extern void nrn_linmod_update_ptrs(void*); void nrn_linmod_update_ptrs(void* p) { LinearMechanism* lm = (LinearMechanism*)p; lm->update_ptrs(); } static double valid(void* v) { return double(((LinearMechanism*)v)->valid()); } static Member_func members[] = { "valid", valid, 0, 0 }; static void* cons(Object*) { LinearMechanism* m = new LinearMechanism(); m->create(); return (void*)m; } static void destruct(void* v) { LinearMechanism* m = (LinearMechanism*)v; delete m; } void LinearMechanism_reg() { class2oc("LinearMechanism", cons, destruct, members, NULL, NULL, NULL); } LinearMechanism::LinearMechanism() { model_ = NULL; c_ = NULL; g_ = NULL; y_ = NULL; b_ = NULL; nnode_ = 0; nodes_ = NULL; y0_ = NULL; elayer_ = NULL; f_callable_ = NULL; } LinearMechanism::~LinearMechanism() { //printf("~LinearMechanism\n"); lmfree(); } void LinearMechanism::lmfree() { if (f_callable_) { hoc_obj_unref(f_callable_); f_callable_ = NULL; } if (model_) { delete model_; model_ = NULL; } if (nodes_) { nrn_notify_pointer_disconnect(this); nnode_ = 0; delete [] nodes_; nodes_ = NULL; elayer_ = NULL; } } void LinearMechanism::update_ptrs() { if (nodes_) { nrn_notify_pointer_disconnect(this); for (int i=0; i < nnode_; ++i) { double* pd = nrn_recalc_ptr(&(NODEV(nodes_[i]))); if (pd != &(NODEV(nodes_[i]))) { nrn_notify_when_double_freed(pd, this); } } } } void LinearMechanism::disconnect(Observable*){} void LinearMechanism::update(Observable*){ lmfree(); } void LinearMechanism::create() { int i; lmfree(); i = 0; Object* o = *hoc_objgetarg(++i); if (strcmp(o->ctemplate->sym->name, "PythonObject") == 0) { f_callable_ = o; hoc_obj_ref(o); c_ = matrix_arg(++i); } else { f_callable_ = NULL; c_ = matrix_arg(1); } g_ = matrix_arg(++i); y_ = vector_arg(++i); if (ifarg(i + 2) && hoc_is_object_arg(i + 2) && is_vector_arg(i + 2)) { y0_ = vector_arg(++i); } b_ = vector_arg(++i); if (ifarg(++i)) { #if HAVE_IV Oc oc; #endif if (hoc_is_double_arg(i)) { nnode_ = 1; nodes_ = new Node*[1]; double x = chkarg(i, 0., 1.); Section* sec = chk_access(); nodes_[0] = node_exact(sec, x); nrn_notify_when_double_freed(&NODEV(nodes_[0]), this); }else{ Object* o = *hoc_objgetarg(i); check_obj_type(o, "SectionList"); SectionList* sl = new SectionList(o); sl->ref(); Vect* x = vector_arg(i+1); Section* sec; nnode_ = 0; nodes_ = new Node*[x->capacity()]; for (sec = sl->begin(); sec; sec = sl->next()) { nodes_[nnode_] = node_exact(sec, x->elem(nnode_)); nrn_notify_when_double_freed(&NODEV(nodes_[nnode_]), this); ++nnode_; } if (ifarg(i+2)) { elayer_ = vector_arg(i+2); } sl->unref(); } } model_ = new LinearModelAddition(c_, g_, y_, y0_, b_, nnode_, nodes_, elayer_, f_callable_); } neuron-7.5/src/nrniv/matrixmap.cpp000066400000000000000000000034511323325274500173350ustar00rootroot00000000000000#include <../../nrnconf.h> #include "matrixmap.h" #include using std::vector; extern "C" { #include "spmatrix.h" } MatrixMap::MatrixMap(Matrix& mat) : m_(mat), plen_(0), ptree_(NULL), pm_(NULL) { } MatrixMap::MatrixMap(Matrix* mat) : m_(*mat), plen_(0), ptree_(NULL), pm_(NULL) { } MatrixMap::~MatrixMap() { mmfree(); } void MatrixMap::mmfree() { // safe to delete NULL pointers delete [] ptree_; delete [] pm_; ptree_ = NULL; pm_ = NULL; } void MatrixMap::add(double fac) { for (int i=0 ; i < plen_; ++i) { //printf("i=%d %g += %g * %g\n", i, *ptree_[i], fac, *pm_[i]); *ptree_[i] += fac * (*pm_[i]); } } void MatrixMap::alloc(int start, int nnode, Node** nodes, int* layer) { NrnThread* _nt = nrn_threads; mmfree(); // how many elements int nrow = m_.nrow(); int ncol = m_.ncol(); //printf("MatrixMap::alloc nrow=%d ncol=%d\n", nrow, ncol); plen_ = 0; vector nonzero_i, nonzero_j; m_.nonzeros(nonzero_i, nonzero_j); pm_ = new double*[nonzero_i.size()]; ptree_ = new double*[nonzero_i.size()]; for (int k = 0; k < nonzero_i.size(); k++) { const int i = nonzero_i[k]; const int j = nonzero_j[k]; int it; if (i < nnode) { it = nodes[i] -> eqn_index_ + layer[i]; //printf("i=%d it=%d area=%g\n", i, it, nodes[i]->area); if (layer[i] > 0 && !nodes[i] -> extnode) { it = 0; } } else { it = start + i - nnode; } int jt; pm_[plen_] = m_.mep(i, j); if (j < nnode) { jt = nodes[j] -> eqn_index_ + layer[j]; if (layer[j] > 0 && !nodes[j] -> extnode) { jt = 0; } } else { jt = start + j - nnode; } //printf("MatrixMap::alloc getElement(%d,%d)\n", it, jt); ptree_[plen_] = spGetElement(_nt->_sp13mat, it, jt); ++plen_; } } neuron-7.5/src/nrniv/matrixmap.h000066400000000000000000000044311323325274500170010ustar00rootroot00000000000000#ifndef matrixmap_h #define matrixmap_h // this defines things needed by ocmatrix #include #include "ocmatrix.h" #include "nrnoc2iv.h" class MatrixMap { public: MatrixMap(Matrix*); MatrixMap(Matrix&); ~MatrixMap(); void alloc(int, int, Node**, int*); void mmfree(); void add(double fac); // passthroughs for accessing m_ inline void mulv(Vect& in, Vect& out) {m_.mulv(in, out);}; inline void mulv(Vect* in, Vect* out) {m_.mulv(in, out);}; inline void mulm(Matrix* in, Matrix* out) {m_.mulm(in, out);}; inline void muls(double a, Matrix* out) {m_.muls(a, out);}; inline void add(Matrix* a, Matrix* out) {m_.add(a, out);}; inline void getrow(int r, Vect* out) {m_.getrow(r, out);}; inline void getcol(int c, Vect* out) {m_.getcol(c, out);}; inline double& operator() (int i, int j) {return m_(i, j);}; inline int nrow() {return m_.nrow();}; inline int ncol() {return m_.ncol();}; inline double* mep(int i, int j) {return m_.mep(i, j);}; inline void getdiag(int d, Vect* out) {m_.getdiag(d, out);} inline void setrow(int r, Vect* in){m_.setrow(r, in);} inline void setcol(int c, Vect* in){m_.setcol(c, in);} inline void setdiag(int d, Vect* in){m_.setdiag(d, in);} inline void setrow(int r, double in){m_.setrow(r, in);} inline void setcol(int c, double in){m_.setcol(c, in);} inline void setdiag(int d, double in){m_.setdiag(d, in);} inline void zero(){m_.zero();} inline void ident(){m_.ident();} inline void exp(Matrix* out){m_.exp(out);} inline void pow(int p, Matrix* out){m_.pow(p, out);} inline void inverse(Matrix* out){m_.inverse(out);} inline void solv(Vect* vin, Vect* vout, bool use_lu) {m_.solv(vin, vout, use_lu);} inline void copy(Matrix* out){m_.copy(out);} inline void bcopy(Matrix* mout, int i0, int j0, int n0, int m0, int i1, int j1) { m_.bcopy(mout, i0, j0, n0, m0, i1, j1); } inline void transpose(Matrix* out){m_.transpose(out);} inline void symmeigen(Matrix* mout, Vect* vout){m_.symmeigen(mout, vout);} inline void svd1(Matrix* u, Matrix* v, Vect* d){m_.svd1(u, v, d);} inline double det(int* e){return m_.det(e);} inline int sprowlen(int a){return m_.sprowlen(a);} inline double spgetrowval(int i, int jindx, int* j){return m_.spgetrowval(i, jindx, j);} private: Matrix& m_; // the map int plen_; double** pm_; double** ptree_; }; #endif neuron-7.5/src/nrniv/multisplit.cpp000066400000000000000000003254621323325274500175520ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include #include #include #include extern "C" { void nrnmpi_multisplit(Section*, double x, int sid, int backbone_style); int nrn_multisplit_active_; extern int diam_changed; extern void nrn_cachevec(int); extern void nrn_matrix_node_free(); extern void (*nrn_multisplit_setup_)(); extern void* nrn_multisplit_triang(NrnThread*); extern void* nrn_multisplit_reduce_solve(NrnThread*); extern void* nrn_multisplit_bksub(NrnThread*); extern double t; void nrn_multisplit_ptr_update(); void nrnmpi_multisplit_clear(); void nrn_multisplit_nocap_v(); void nrn_multisplit_nocap_v_part1(NrnThread*); void nrn_multisplit_nocap_v_part2(NrnThread*); void nrn_multisplit_nocap_v_part3(NrnThread*); void nrn_multisplit_adjust_rhs(NrnThread*); extern void (*nrn_multisplit_solve_)(); static void multisplit_v_setup(); static void multisplit_solve(); extern double nrnmpi_rtcomp_time_; #if PARANEURON extern double nrnmpi_splitcell_wait_; #else static double nrnmpi_splitcell_wait_; #endif #if NRNMPI #else static int nrnmpi_use; static void nrnmpi_int_allgather(int*, int*, int){} static void nrnmpi_int_allgatherv(int*, int*, int*, int*){} static void nrnmpi_postrecv_doubles(double*, int, int, int, void**){} static void nrnmpi_send_doubles(double*, int, int, int){} static void nrnmpi_wait(void**){} static void nrnmpi_barrier(){} static double nrnmpi_wtime() { return 0.0; } #endif } class MultiSplit; class MultiSplitControl; #define A(i) VEC_A(i) #define B(i) VEC_B(i) #define D(i) VEC_D(i) #define RHS(i) VEC_RHS(i) #define S1A(i) sid1A[i] #define S1B(i) sid1B[i] // any number of nodes can have the same sid (generally those nodes // will be on different machines). // A node cannot have more than one sid. // A tree cannot have more than two nodes with an sid and those nodes // must be distinct. // NOTE: // For cache efficiency, it would be nice to keep individual cell nodes // together (i.e v_node from 0 to rootnodecount-1 are NOT the root nodes.) // This would allow keeping the backbones contiguous and would simplify the // solution of the sid0,1 2x2 at the end of triangularization that forms // an N shaped matrix. Unfortunately, in several places, e.g. matrix setup, // the first rootnodecount v_node are assumed to be the individual cell roots // and at this time it would be confusing to work on that tangential issue. // However, it does mean that we need some special structure since // sid0 ...backbone interior nodes... sid1 are not contiguous in the v_node // for a single cell. // Presently the node order is // 1) all the roots of cells with 0 or 1 sid (no backbone involved) // 2) all the sid0 when there are two sids in a cell. 1) + 2) = rootnodecount // 3) the interior backbone nodes (does not include sid0 or sid1 nodes) // 4) all the sid1 nodes // 5) all remaining nodes // backbone_begin is the index for 2). // backbone_interior_begin is one more than the last index for 2) // backbone_sid1_begin is the index for 4) // backbone_end is the index for 5. // Modification to handle short backbones // Numerical accuracy/stability suffers when backbones are electrically // short. Unfortunately, it is impossible to divide many 3-d reconstructed // cells with any kind of load balance without using them. Also, // unfortunately, it is probably not possible to solve the problem // in general. However we can extend, without introducing // too much parallel inefficiency, the implementation to allow an // arbitrarily short backbone treated as a single node, as long as it // does not connect to a short backbone on another machine. e.g we can // have alternating short and long sausages but not a sequence of // contiguous short sausages. The idea is to exchange backbone info // in two stages. First receive the info that short backbones need // (by definition only from long backbones), compute the exact D,RHS // backbone end points (only a 2x2 matrix solve), and then send the // exact short backbone info. matrix_exchange carries out the // augmented communication. But we need to distinguish short from // long backbones since for short ones we need to factor out the // first part of bksub_backbone and do it in the middle of // matrix_exchange (as well as avoid doing that twice in bksub_backbone). // We can accomplish that by introducing the index // backbone_long_begin between the backbone_begin and backbone_interior_begin // indices. Then in matrix exchange we do backbone_begin to // backbone_long_begin - 1 , and in bksub_backbone, the first part is // from backbone_long_begin to backbone_interior_begin - 1. // Modification to handle any number of backbones, short or long, exactly. // In this case, it is not necessary to consider numerical stability/accuracy. // However a tree matrix with rank equal to the number of distinct sid for // an entire parallelized cell must be solved between the send and receive // stages for that cell. The main issue to be resolved is: which machine receives // the matrix information. ie. a single sid subtree sends d and rhs to the // (rthost)machine that gaussian eliminates the reduced tree // matrix and a two sid backbone subtree sends the two d, a, b, and two rhs // to rthost. After rthost solves the matrix (triangualize and back substitute) // the answer for each sid is sent back to the machines needing it. // Clearly, some savings results if rthost happens to be one of the machines // with a 2 sid backbone. Also, it is probably best if a machine serves // as rthost to as few cells as possible. // Modification to handle multiple subtrees with same sid on same machine. // This is very valuable for load balancing. It demands a backbone style // of 2 (using reduced tree matrices) and we allow user specified host // for the reduced tree. The exact solution using reduced trees has // proved so much more useful than the long/short backbone methods // that we should consider removing the code // for those others and implement only the reduced tree method. // Area handling prior to ReducedTree extension was and mostly still is: // 1) sending long to short, long, reduced on the send side multiplies // the send buffer (D and RHS components) by area (if non-zero area node) // from 0 to iarea_short_long using area_node_indices and buf_area_indices. // 2) receive what is needed by short backbone (and reduced tree) and the // receive buffer for short backbong divides by area from iarea_short_long // to narea using aread_node_indices and buf_area_indices. (not needed by // reduced tree but the local D and RHS will have to be multiplied by the // node area when filling the ReducedTree. Also the sid1A and sid1B terms // will have to be area multiplied both on the ReducedTree host // and when backbones are sent to the ReducedTree host // 3) The short backbone is solved consistent with its original node area // (and the ReducedTree is solved with all its equation having been multiplied // by area. // 4) Note that solving the short and reduced tree gives the answer which // does not have to be scaled but we multiply the D and RHS by 1e30 so // those equation are v = RHS/D regardless of area or coupling. So no need // to divide by area on the short or reduced tree machines and it would not // matter if we did so or not. // 5) all remaining receives take place and what is received gets divided // by the node area (0 to iarea_short_long). As mentioned above, this does // not affect the result that was sent from the short or reduced tree // host (since D and RHS were scaled by 1e30). // So... Anything sent to reduced trees from another machine needs to get its // info multiplied by the node area. This is sid0 D and RHS and if there is // a sid1 then that D and RHS as well as sid1A and sid1B. // Also... Anything rmapped into a reduced tree from the reduced tree machine // needs to get its rmap info multiplied by the node area ( in fact we can // do that in place before calling fillrmap since those values get the result // *1e30 returned into them). // We do the old methods (backbone style 0 and 1) completely segregated from // the new reducedtree method by introducing a vector parallel to // nodeindex_buffer_ called nodeindex_rthost_ that contains the hostid for the // reduced tree host associated with that sid. Then -1 means old style and // >= 0 means reducedtree style. // the implementation so far has turned out to be too brittle with regard // to unimportant topology changes in the sense of new point processes or // anything that ends up calling multisplit_v_setup. The experienced // cause of this is because MultiSplitTransferInfo holds pointers into // the sid1A and sid1B off diag elements and those arrays are freed // and reallocated when multisplit_v_setup is called. Although // exchange_setup cries out for a simplified and // more efficient implementation, for now, opportunistically reset the // pointers in the MultiSplitTransferInfo at the end multisplit_v_setup struct Area2Buf { int inode; int n; // using only for transfer to ReducedTree on another int ibuf[3]; // machine so n is 2 or 3 double adjust_rhs_; // for cvode MultiSplit* ms; // for recalculating ibuf pointers after v_setup }; struct Area2RT { int inode; int n; // 2 or 3 double* pd[3]; double adjust_rhs_; // for cvode MultiSplit* ms; // for recalculating pd pointers after v_setup }; declareNrnHash(Int2IntTable, int, int) implementNrnHash(Int2IntTable, int, int) // d and rhs keep getting reorderd according to thread cache efficiency // so we need to retain some logical info in order to update the // pointer lists in the Reduced tree. Prior to this comment, this was // done only for sid1A and sid1B near the end of v_setup. That is ok // since sid1A and sid1B are allocated by v_setup. But d and rhs are // filled into the Node* after return from v_setup. class ReducedTree { public: ReducedTree(MultiSplitControl*, int rank, int mapsize); virtual ~ReducedTree(); void solve(); void nocap(); //private: public: void gather(); void scatter(); MultiSplitControl* msc; int n; int* ip; double* rhs; double* d; double* a; double* b; int n2, n4, nmap; public: // next implementation, exploit the fact that send buffer can be // smaller than the receive buffer since we only need to send back // the answer in RHS. Now we are sending back RHS, D, // and even the offdiags. double **smap, **rmap; int *ismap, *irmap; int nsmap, irfill; int* rmap2smap_index; // needed for nocap when cvode used int* nzindex; // needed for nocap when cvode used double* v; // needed for nocap when cvode used void reorder(int j, int nt, int* mark, int* all_bb_relation, int* allsid); Int2IntTable* s2rt; // sid2rank table void fillrmap(int sid1, int sid2, double* pd); void fillsmap(int sid, double* prhs, double* pdiag); void pr_map(int, double*); }; class MultiSplit { public: Node* nd[2]; int sid[2]; int backbone_style; // 0 = no, 1 = yes, 2 = reducedtree (exact) int rthost; // nrnmpi_myid where reducedtree will be solved // the problem with using backsid_ to find the index now is that // the value may not be unique since several backbones can be // connected at the same sid on this machine. So store the index into // the backsid) array. int back_index; // and need the thread id as well int ithread; // reduced tree pointers to d and rhs can become invalid and // need to be restored. According to the exchange_setup that calls // ReducedTree::fillrmap, the order is nd[0]->rhs, nd[0]->d, nd[1]->rhs // nd[1]->d. ReducedTree* rt_; int rmap_index_; int smap_index_; }; // note: the tag_ below was added in case this machine interacts with // another via more than one message type. i.e combinations of short<->long, // reduced<->long, and long<->long backbone interactions. // The user should avoid this // eventuality and in fact we might not allow it. // mpi transfer information struct MultiSplitTransferInfo { int host_; // host id for send-receive int nnode_; // number of nodes involved int* nodeindex_; // v_node indices of those nodes. Pointer into nodeindex_buffer_ int* nodeindex_th_; // thread for above int nnode_rt_; // number of off diag elements involved int* nd_rt_index_; // v_node indices of offdiag. Not pointer into nodeindex_buffer. Needed for area2buf int* nd_rt_index_th_; // thread for above double** offdiag_; // pointers to sid1A or sid1B off diag elements int* ioffdiag_; // indices of above, to recalculate offdiag when freed int size_; // 2*nnode_ + nnode_rt_ doubles needed in buffer int displ_; // displacement into trecvbuf_ void* request_; // MPI_Request int tag_; // short<->long, long<->long, subtree->rthost, rthost->subtree int rthost_; // host id where the reduced tree is located (normally -1) }; declareNrnHash(MultiSplitTable, Node*, MultiSplit*) implementNrnHash(MultiSplitTable, Node*, MultiSplit*) declarePtrList(MultiSplitList, MultiSplit) implementPtrList(MultiSplitList, MultiSplit) #include static MultiSplitControl* msc_; void nrnmpi_multisplit(Section* sec, double x, int sid, int backbone_style) { if (!msc_) { msc_ = new MultiSplitControl(); } msc_->multisplit(sec, x, sid, backbone_style); } MultiSplitControl::MultiSplitControl() { narea2buf_ = narea2rt_ = 0; area2buf_ = 0; area2rt_ = 0; nthost_ = 0; ihost_reduced_long_ = ihost_short_long_ = 0; msti_ = 0; tbsize = 0; ndbsize = 0; trecvbuf_ = 0; tsendbuf_ = 0; nodeindex_buffer_ = 0; nodeindex_buffer_th_ = 0; nodeindex_rthost_ = 0; narea_ = 0; iarea_short_long_ = 0; buf_area_indices_ = 0; area_node_indices_ = 0; nrtree_ = 0; rtree_ = 0; classical_root_to_multisplit_ = 0; multisplit_list_ = 0; nth_ = 0; mth_ = 0; } MultiSplitControl::~MultiSplitControl() { } MultiSplitThread::MultiSplitThread() { backbone_begin = backbone_long_begin = backbone_interior_begin = 0; backbone_sid1_begin = backbone_long_sid1_begin = backbone_end = 0; sid1A = sid1B = 0; sid0i = 0; nbackrt_ = 0; backsid_ = 0; backAindex_ = 0; backBindex_ = 0; i1 = i2 = i3 = 0; } MultiSplitThread::~MultiSplitThread() { del_sidA(); } void MultiSplitControl::multisplit(Section* sec, double x, int sid, int backbone_style) { #if 0 if (sid > 1000) { pexch(); return; } if (sid >= 1000) { pmat(sid>1000); return; } #endif if (sid < 0) { nrn_cachevec(1); if (classical_root_to_multisplit_) { nrn_multisplit_setup_ = multisplit_v_setup; nrn_multisplit_solve_ = multisplit_solve; nrn_matrix_node_free(); } exchange_setup(); return; } nrn_multisplit_active_ = 1; if (backbone_style != 2) { hoc_execerror("only backbone_style 2 is now supported", 0); } if (!classical_root_to_multisplit_) { classical_root_to_multisplit_ = new MultiSplitTable(97); multisplit_list_ = new MultiSplitList(); } Node* nd = node_exact(sec, x); // printf("root of %s(%g) ", secname(sec), x); Node* root; for (sec = nd->sec; sec; sec = sec->parentsec) { root = sec->parentnode; } assert(root); // printf("is %s\n", secname(root->sec)); MultiSplit* ms; if (classical_root_to_multisplit_->find(root, ms)) { if (backbone_style == 2) { if(ms->backbone_style != 2) { hoc_execerror("earlier call for this cell did not have a backbone style = 2", 0); } }else if (backbone_style == 1) { ms->backbone_style = 1; } ms->nd[1] = nd; ms->sid[1] = sid; if (ms->sid[1] == ms->sid[0]) { char s[100]; sprintf(s, "two sid = %d at same point on tree rooted at", sid); hoc_execerror(s, secname(root->sec)); } }else{ ms = new MultiSplit(); ms->backbone_style = backbone_style; ms->rthost = -1; ms->nd[0] = nd; ms->nd[1] = 0; ms->sid[0] = sid; ms->sid[1] = -1; ms->back_index = -1; ms->ithread = -1; ms->rt_ = 0; ms->rmap_index_ = -1; ms->smap_index_ = -1; (*classical_root_to_multisplit_)[root] = ms; multisplit_list_->append(ms); } } void MultiSplitThread::del_sidA() { if (sid1A) { delete [] sid1A; delete [] sid1B; delete [] sid0i; sid1A = 0; sid1B = 0; sid0i = 0; } if (nbackrt_) { delete [] backsid_; delete [] backAindex_; delete [] backBindex_; nbackrt_ = 0; } } void MultiSplitControl::del_msti() { int i; if (nrtree_) { for (i=0; i < nrtree_; ++i) { delete rtree_[i]; } delete [] rtree_; nrtree_ = 0; } if (msti_) { for (i=0; i < nthost_; ++i) { if (msti_[i].nnode_rt_) { delete [] msti_[i].nd_rt_index_; delete [] msti_[i].nd_rt_index_th_; delete [] msti_[i].offdiag_; delete [] msti_[i].ioffdiag_; } } delete [] msti_; msti_ = 0; if (nodeindex_buffer_) { delete [] nodeindex_buffer_; delete [] nodeindex_buffer_th_; delete [] nodeindex_rthost_; } nodeindex_buffer_ = 0; nodeindex_buffer_th_ = 0; nodeindex_rthost_ = 0; if (trecvbuf_) { delete [] trecvbuf_; delete [] tsendbuf_; } trecvbuf_ = 0; tsendbuf_ = 0; if (narea_) { delete [] buf_area_indices_; delete [] area_node_indices_; buf_area_indices_ = 0; area_node_indices_ = 0; narea_ = 0; } if(narea2buf_) { // at present, statically 3 since only used for ReducedTree // for (i=0; i < narea2buf_; ++i) { // delete [] area2buf_->ibuf; // } delete [] area2buf_; area2buf_ = 0; narea2buf_ = 0; } if(narea2rt_) { delete [] area2rt_; area2rt_ = 0; narea2rt_ = 0; } } } void nrnmpi_multisplit_clear() { if (msc_) { msc_->multisplit_clear(); nrn_multisplit_active_ = 0; } } void MultiSplitControl::multisplit_clear() { //printf("nrnmpi_multisplit_clear()\n"); int i; nrn_multisplit_solve_ = 0; nrn_multisplit_setup_ = 0; for (i=0; i < nth_; ++i) { mth_[i].del_sidA(); } if (mth_) { delete [] mth_; mth_ = 0; } nth_ = 0; del_msti(); if (classical_root_to_multisplit_) { MultiSplit* ms; NrnHashIterate(MultiSplitTable, classical_root_to_multisplit_, MultiSplit*, ms) { delete ms; }}} delete classical_root_to_multisplit_; delete multisplit_list_; classical_root_to_multisplit_ = 0; multisplit_list_ = 0; } } // in the incremental development of exchange_setup from only long to short // to reduced tree we end up with many iterations over all pc.multisplit // calls. ie. every machines sid info. If the performance becomes // visible relative to the total setup time then one can replace all those // iterations by preserving only the sid graph info that is needed by each // machine. A sid graph, tree, would contain a list of sid's and a list of // machines. Then there would be a map of sid2graph. This list and map // could be constructed with a single iteration. ie. when an edge is seen // the graphs of the two sids would merge. Then one could throw away all // graphs that have no sid on this machine. I would expect an order of // magnitude performance improvement in exchange_setup. void MultiSplitControl::exchange_setup() { int i, j, k; del_msti(); //above recalc_diam so multisplit_v_setup does not // attempt to fill offdiag_ if (diam_changed) { recalc_diam(); } // how many nodes are involved on this machine // all nodes are distinct. For now we independently assert that // all the sid on this machine are distinct. So when we get an // sid from another machine it does not have to be directed to // more than one place. So, just like splitcell, we cannot test // a multisplit on a single machine. // When sids are not distinct, in the context of reduced trees, // there is no problem with respect to sending sid info to // multiple places since each sid info gets added to the reduced // tree and the reduced tree answer gets sent back to each sid. // So there is not a lot of special code involved with multiple // pieces on the same host, since each piece <-> reduced tree // independently of where the piece and reduced tree are located. int n = 0; int nsbb = 0; // number of short backbone sid's int nwc = 0; // number of backbonestyle=2 nodes. if (classical_root_to_multisplit_) { MultiSplit* ms; for (i=0; i < multisplit_list_->count(); ++i) { ms = multisplit_list_->item(i); ++n; if (ms->nd[1]) { ++n; } if (ms->backbone_style == 2) { ++nwc; if (ms->nd[1]) { ++nwc; } }else if (ms->backbone_style == 1) { if (ms->nd[1]) { nsbb += 2; }else{ // shouldn't be set anyway ms->backbone_style = 0; } } } } //printf("%d n=%d nsbb=%d nwc=%d\n", nrnmpi_myid, n, nsbb, nwc); if (nrnmpi_numprocs == 1 && n == 0) { return; } // how many nodes are involved on each of the other machines int* nn = new int[nrnmpi_numprocs]; if (nrnmpi_use) { nrnmpi_int_allgather(&n, nn, 1); }else{ nn[0] = n; } //if (nrnmpi_myid==0) for (i=0; i < nrnmpi_numprocs;++i) printf("%d %d nn=%d\n", nrnmpi_myid, i, nn[i]); // what are the sid's on this machine int* sid = 0; int* inode = 0; int* threadid = 0; // an parallel array back to MultiSplit MultiSplit** vec2ms = new MultiSplit*[n]; // following used to be is_ssb (is sid for short backbone) // now we code that as well as enough information for the // backbone_style==2 case to figure out the reduced tree matrix // so 0 means backbone_style == 0, 1 means backbone_style == 1 // and > 1 means backbone_style == 2 and the value is // other backbone sid+3 (so a value of 2 means that // it is a single sid subtree and a value of 3 means that the // other backbone sid is 0. int* bb_relation = 0; if (n > 0) { sid = new int[n]; inode = new int[n]; bb_relation = new int[n]; threadid = new int[n]; } if (classical_root_to_multisplit_) { i = 0; MultiSplit* ms; for (int ii=0; ii < multisplit_list_->count(); ++ii) { ms = multisplit_list_->item(ii); sid[i] = ms->sid[0]; inode[i] = ms->nd[0]->v_node_index; threadid[i] = ms->ithread; bb_relation[i] = ms->backbone_style; vec2ms[i] = ms; ++i; if (ms->nd[1]) { sid[i] = ms->sid[1]; inode[i] = ms->nd[1]->v_node_index; threadid[i] = ms->ithread; bb_relation[i] = ms->backbone_style; if (ms->backbone_style == 2) { bb_relation[i-1] += 1 + sid[i]; bb_relation[i] += 1 + sid[i-1]; } vec2ms[i] = ms; ++i; } } } //for (i=0; i < n; ++i) { printf("%d %d sid=%d inode=%d %s %d\n", nrnmpi_myid, i, sid[i], inode[i], secname(v_node[inode[i]]->sec), v_node[inode[i]]->sec_node_index_);} // what are the sid's and backbone status on each of the other machines // first need a buffer for them and their offsets int* displ = new int[nrnmpi_numprocs+1]; displ[0] = 0; for (i = 0; i < nrnmpi_numprocs; ++i) { displ[i+1] = displ[i] + nn[i]; } int nt = displ[nrnmpi_numprocs]; // total number of (distinct) nodes int* allsid = new int[nt]; int* all_bb_relation = new int[nt]; if (nrnmpi_use) { nrnmpi_int_allgatherv(sid, allsid, nn, displ); nrnmpi_int_allgatherv(bb_relation, all_bb_relation, nn, displ); }else{ for (i=0; i < n; ++i) { allsid[i] = sid[i]; all_bb_relation[i] = bb_relation[i]; } } if (!n) { delete [] allsid; delete [] all_bb_relation; delete [] displ; delete [] nn; delete [] vec2ms; errno = 0; return; } // now we need to analyze // how many machines do we need to communicate with // note that when long sid is connected to 1 or more long sid // and also a short backbone sid that there is no need to send // or receive info from the long sid because the short sid sends // back the answer. // A similar communication pattern holds for the backbone_style==2 // case. i.e. a star instead of all2all. The only problem is // which host is the center of the star. The following // code for backbone_style < 2 is almost unchanged but // backbone_style >=2 issue handling is inserted as needed. // there should not be that many sid on one machine. so just use // linear search // for an index into the all... vectors, mark[index] is the index // into this hosts vectors of the corresponding sid. It gets slowly // transformed into a communication pattern in the sense that // mark[index] = -1 means no communication will take place between // this host and the host associated with the index. // For reduced tree purposes, we overload the mark semantics so // that mark[index] points to one (of the possibly two) sid on the // same cell. ie. all the sid on other cpus that are part of the // whole cell point to that sid. // For backbone style 2, // when there are several pieces on the same host with the same // sid, then the mark points to the principle pieces sid. i.e all // the sid on this cpu that are part of the whole cell also point // to that sid. int* mark = new int[nt]; int* connects2short = new int[n]; for (i = 0; i < n; ++i) {// so we know if we will be sending to connects2short[i] = 0; // a short backbone. } for (i=0; i < nt; ++i) { mark[i] = -1; for (j=0; j < n; ++j) { if (allsid[i] == sid[j]) { // here we can errcheck the case of 2 on one // machine and a different style for the same // sid on another machine. If this passes on // all machines then a single cell is necessarily // consistent with regard to all sids for it // being backbone_style == 2 if ((bb_relation[j] >= 2) != (all_bb_relation[i] >= 2)) { hoc_execerror("backbone_style==2 inconsistent between hosts for same sid", 0); } if (all_bb_relation[i] < 2) { mark[i] = j; if (all_bb_relation[i] == 1) { connects2short[j] = 1; } } } } } // but we do not want to mark allsid on this machine for (i=displ[nrnmpi_myid]; i < displ[nrnmpi_myid]+n; ++i) { mark[i] = -1; } // but note that later when we mark the reduced tree items we // do leave the marks for allsid on this machine (but the marks // have a slightly different meaning // undo all the marks for long to long if there is a long to short // but be careful not to undo the short to long for (i=0; i < nt; ++i) { if (mark[i] >= 0 && connects2short[mark[i]] && all_bb_relation[i] == 0 && bb_relation[mark[i]] == 0) { mark[i] = -1; } } // make sure no short to short connections for (i = 0; i < nt; ++i) { if (mark[i] >= 0) { if (bb_relation[mark[i]] == 1 && all_bb_relation[i] == 1) { hoc_execerror("a short to short backbone interprocessor connection exists", 0); } } } // right now, the communication pattern represented by mark is // bogus for backbone_style == 2 and they are all -1. // We want to adjust mark so all the sid on // a single cell point to one of the sid on this cell // The following uses an excessive number of iterations // over the all... vectors (proportional to number of distinct sids // on a cell and should be made more efficient for (j = 0; j < n; ++j) { if (bb_relation[j] >= 2) { reduced_mark(j, sid[j], nt, mark, allsid, all_bb_relation); // note the above will also mark both this host sids // so when the other one comes around here it will // mark nothing. } } #if 0 for (i=0; i < nt; ++i) { printf("%d %d allsid=%d all_bb_relation=%d mark=%d\n", nrnmpi_myid, i, allsid[i], all_bb_relation[i], mark[i]);} #endif // it is an error if there are two pieces of the same cell on the // same host. All we need to do is make sure the mark for this // cpu are unique. i.e belong to different cells // This is no longer an error. For backbonestyle 2, allowing // multiple pieces of same cell on same cpu. if (0) { int* mcnt = new int[n]; for (j=0; j < n; ++j) { mcnt[j] = 0; } for (i = displ[nrnmpi_myid]; i < displ[nrnmpi_myid]+n; ++i) { if (all_bb_relation[i] >= 2 && mark[i] >= 0) { mcnt[mark[i]] += 1; if (all_bb_relation[i] > 2) { ++i; } } } for (j=0; j < n; ++j) { assert(mcnt[j] < 2); } delete [] mcnt; } // for reduced trees, we now need to settle on which host will solve // a reduced tree. If rthost is this one then this receives from // and sends to every host that has a sid on the cell. If the rthost // is another, then this sends and receives to rthost. // For now let it be the first host with two sid, and if there is // no such host (then why are we using style 2?) then the first // host with 1. nrtree_ = 0; int* rthost = new int[n]; ReducedTree** rt = new ReducedTree*[n]; for (j=0; j < n; ++j) { rthost[j] = -1; rt[j] = 0; } if (nwc) { MultiSplit* ms; for (int ii=0; ii < multisplit_list_->count(); ++ii) { ms = multisplit_list_->item(ii); if (ms->backbone_style == 2) { for (j = 0; j < n; ++j) {//find the mark value if (sid[j] == ms->sid[0]) { break; } } ms->rthost = -1; k = -1; for (int ih=0; ih < nrnmpi_numprocs; ++ih) { for (i=displ[ih]; i < displ[ih+1]; ++i) { if (mark[i] == j) { if (all_bb_relation[i] > 2) { ms->rthost = ih; break; } if (all_bb_relation[i] == 2) { if (k == -1) { k = ih; } } } } if (ms->rthost != -1) { break; } } if (ms->rthost == -1) { ms->rthost = k; } // only want rthost[j] for sid[0], not sid[1] rthost[j] = ms->rthost; //printf("%d sid0=%d sid1=%d rthost=%d\n", nrnmpi_myid, ms->sid[0], ms->sid[1], ms->rthost); } } // it is important that only the principal sid has rthost != 0 // since we count them below, nrtree_, to allocate rtree_. } #if 0 for (j=0; j < n; ++j) { printf("%d j=%d sid=%d bb_relation=%d rthost=%d\n", nrnmpi_myid,j, sid[j], bb_relation[j], rthost[j]); } #endif // there can be a problem when one host sends parts of two cells // to another host due to cells not being in the same order with // respect to NrnHashIterate. So demand that they are in the // same order. Note this can also be used to assert that there // are not two pieces on a host from the same cell. // But we no longer use NrnHashIterate and the order is consistent // because ordering is always with respect to the allgathered // arrays of size nt. if (0) { for (i=0; i < nrnmpi_numprocs; ++i) { int ix = -1; int nj = displ[i+1]; for (j = displ[i]; j < nj; ++j) { if (all_bb_relation[j] >= 2 && mark[j] >= 0 && rthost[mark[j]] == nrnmpi_myid) { assert(mark[j] > ix); ix = mark[j]; if (all_bb_relation[j] > 2) { ++j; } } } } } // allocate rtree_ for (j=0; j < n; ++j) { if (rthost[j] == nrnmpi_myid) { ++nrtree_; } } if (nrtree_) { i = 0; rtree_ = new ReducedTree*[nrtree_]; for (j=0; j < n; ++j) { if (rthost[j] == nrnmpi_myid) { // sid to rank table Int2IntTable* s2rt = new Int2IntTable(20); int rank = 0; int mapsize = 0; int r; for (k=0; k < nt; ++k) { if (mark[k] == j && all_bb_relation[k] >= 2) { if (!s2rt->find(allsid[k], r)) { (*s2rt)[allsid[k]] = rank++; } if (all_bb_relation[k] == 2) { mapsize += 2; }else{ mapsize += 3; } } } rtree_[i] = new ReducedTree(this, rank, mapsize); rt[j] = rtree_[i]; // needed for third pass below //printf("%d new ReducedTree(%d, %d)\n", nrnmpi_myid, rank, mapsize); // at this point the ReducedTree.s2rt is not in tree order // (in fact we do not even know if it is a tree) // so reorder. For a tree, we know there must be ReducedTree.n - 1 // edges. rtree_[i]->s2rt = s2rt; rtree_[i]->reorder(j, nt, mark, all_bb_relation, allsid); ++i; } } } // fill in the rest of the rthost[], mt->rthost, and rt for (int ii=0, j=0; ii < multisplit_list_->count(); ++ii, ++j) { MultiSplit* ms = multisplit_list_->item(ii); if (ms->backbone_style == 2) { int jj = mark[displ[nrnmpi_myid] + j]; ms->rthost = rthost[jj]; rthost[j] = ms->rthost; rt[j] = rt[jj]; if (ms->nd[1]) { ++j; } } } #if 0 for (int ii=0; ii < multisplit_list_->count(); ++ii) { MultiSplit* ms = multisplit_list_->item(ii); if (ms->backbone_style == 2) { printf("%d sid0=%d sid1=%d rthost=%d\n", nrnmpi_myid, ms->sid[0], ms->sid[1], ms->rthost); } } for (j=0; j < n; ++j) { printf("%d j=%d sid=%d bb_relation=%d rthost=%d\n", nrnmpi_myid,j, sid[j], bb_relation[j], rthost[j]); } #endif // count the reduced tree related nodes that have non-zero area for (i=0; i < n; ++i) { // remember rthost >= 0 only for sid[0] if (rthost[i] >= 0) for (j=0; j < 2; ++j) { NrnThread* _nt = nrn_threads + threadid[i]; Node* nd = _nt->_v_node[inode[i+j]]; if (nd->_classical_parent && nd->sec_node_index_ < nd->sec->nnode-1) { if (rthost[i] == nrnmpi_myid) { ++narea2rt_; }else{ ++narea2buf_; } } if (bb_relation[i] == 2) { // sid[0] only break; } if (j == 1) { ++i; } } } if (narea2rt_) { area2rt_ = new Area2RT[narea2rt_]; } if (narea2buf_) { area2buf_ = new Area2Buf[narea2buf_]; } // can fill in all of the info for area2rt_ but only some for area2buf_ // actually, area2rt is the one used in practice since only the soma ever // has a sid at a non-zero area node and the reduced tree will probably // be on the machine with the soma. narea2rt_ = narea2buf_ = 0; for (i=0; i < n; ++i) { // remember rthost >= 0 only for sid[0] if (rthost[i] >= 0) for (j=0; j < 2; ++j) { NrnThread* _nt = nrn_threads + threadid[i]; Node* nd = _nt->_v_node[inode[i+j]]; if (nd->_classical_parent && nd->sec_node_index_ < nd->sec->nnode-1) { if (rthost[i] == nrnmpi_myid) { Area2RT& art = area2rt_[narea2rt_]; art.ms = vec2ms[i]; art.inode = inode[i+j]; art.n = 2; art.pd[0] = &D(art.inode); art.pd[1] = &RHS(art.inode); if (bb_relation[i] > 2) { art.n = 3; k = vec2ms[i]->back_index; MultiSplitThread& t = mth_[vec2ms[i]->ithread]; if (j == 0) { art.pd[2] = t.sid1A + t.backAindex_[k]; }else{ art.pd[2] = t.sid1B + t.backBindex_[k]; } } ++narea2rt_; }else{ Area2Buf& ab = area2buf_[narea2buf_]; ab.ms = vec2ms[i]; ab.inode = inode[i+j]; // can figure out how many but not // the indices into the send buffer. ab.n = 2; if (bb_relation[i] > 2) { ab.n = 3; } ++narea2buf_; } } if (bb_relation[i] == 2) { // sid[0] only break; } } } #if 0 printf("%d narea2rt=%d narea2buf=%d\n", nrnmpi_myid, narea2rt_, narea2buf_); for (i = 0; i < narea2rt_; ++i) { Area2RT& art = area2rt_[i]; printf("%d area2rt[%d] inode=%d n=%d thread=%d\n", nrnmpi_myid, i, art.inode, art.n, art.ms->ithread); } for (i = 0; i < narea2buf_; ++i) { Area2Buf& ab = area2buf_[i]; printf("%d area2buf[%d] inode=%d n=%d\n", nrnmpi_myid, i, ab.inode, ab.n); } #endif #if 0 if (nrnmpi_myid == 0) { for (i=0; i < n; ++i) { printf("%d %d sid=%d bbrelation=%d rthost=%d rt=%p\n", nrnmpi_myid, i, sid[i], bb_relation[i], rthost[i], rt[i]); } for (i=0; i < nrnmpi_numprocs+1; ++i) { printf("%d displ[%d]=%d\n", nrnmpi_myid, i, displ[i]); } for (i=0; i < nt; ++i) { printf("%d %d allsid=%d mark=%d all_bb_relation=%d\n", nrnmpi_myid, i, allsid[i], mark[i], all_bb_relation[i]); }} #endif // it is best if the user arranges things so that machine -> machine // has only one type of connection, i.e long->short, long->long, // or short->long since that means only one message required. // But for generality we program for the possibility of needing // two message types (long->short and short->long are the same // type and distinct from long->long) // Actually we do need 3 because one cannot mix long->short // and long->long in the same message because they need // different tags. // we also calculate the indices for the types // we need to have separate tags for long <-> reduced trees nthost_ = 0; // int ndbsize, tbsize; ndbsize = 0; tbsize = 0; for (i=0; i < nrnmpi_numprocs; ++i) { int nh = 0; int type = 0; int nh1 = 0; for (j=displ[i]; j < displ[i+1]; ++j) { if (mark[j] >= 0) { // how many distinct all_bb_relation<2: 1,2,3? if (bb_relation[mark[j]] == 1) { // short<->long assert(all_bb_relation[j] == 0); type |= 04; ++ndbsize; // space for node index tbsize += 2; // d and rhs }else if (all_bb_relation[j] == 1) { //long<->short type |= 01; ++ndbsize; tbsize += 2; }else if (all_bb_relation[j] < 2) { // long<->long type |= 02; ++ndbsize; tbsize += 2; }else if (all_bb_relation[j] >= 2) { int rth = rthost[mark[j]]; if (rth == nrnmpi_myid) { if (i != nrnmpi_myid) { //this is the rthost //reducedtree->long type |= 010; // no node buffer since all // info <-> ReducedTree // ++ndbsize; tbsize += 2; if (all_bb_relation[j] > 2) { tbsize += 1; } } }else if (i == nrnmpi_myid) { // only this to the rthost // long->reducedtree nh1 += 1; // may not be distinct hosts // be careful not to count twice for (int jj = displ[i]; jj < j; ++jj) { if (rth == rthost[mark[jj]]) { nh1 -= 1; break; } } ++ndbsize; tbsize += 2; // off diag element if (all_bb_relation[j] > 2) { tbsize += 1; } } } } } nh = (type&1) + ((type/2)&1) + ((type/4)&1) + ((type/010)&1); nthost_ += nh + nh1; //printf("%d type=%d %d %d %d %d %d nh=%d nthost_=%d\n", nrnmpi_myid, type, type&1, (type/2)&1, (type/4)&1, (type/010)&1, (type/020)&1, nh, nthost_); } //printf("%d x nthost_=%d\n", nrnmpi_myid, nthost_); msti_ = new MultiSplitTransferInfo[nthost_]; for (i=0; i < nthost_; ++i) { // two of these needed before rest of fill msti_[i].nnode_rt_ = 0; msti_[i].nd_rt_index_ = 0; msti_[i].nd_rt_index_th_ = 0; msti_[i].offdiag_ = 0; msti_[i].ioffdiag_ = 0; msti_[i].rthost_ = -1; } if (ndbsize) { // can be 0 if rthost nodeindex_buffer_ = new int[ndbsize]; nodeindex_buffer_th_ = new int[ndbsize]; nodeindex_rthost_ = new int[ndbsize]; } for (i=0; i < ndbsize; ++i) { nodeindex_rthost_[i] = -1; } //printf("%d nthost_=%d ndbsize=%d tbsize=%d nrtree_=%d\n", nrnmpi_myid, nthost_, ndbsize, tbsize, nrtree_); //tbsize_=tbsize; if (tbsize) { trecvbuf_ = new double[tbsize]; tsendbuf_ = new double[tbsize]; } // We need to fill the msti_ array // in the order long<->short long<->reduced // followed by long<->long followed by reduced<->long // followed short<->long. // three distinct message tags nthost_ = 0; int mdisp = 0; k = 0; // first pass for the long<->short backbones for (i=0; i < nrnmpi_numprocs; ++i) { int b = 0; for (j=displ[i]; j < displ[i+1]; ++j) { if (mark[j] >= 0 && bb_relation[mark[j]] == 0 && all_bb_relation[j] == 1) { nodeindex_buffer_th_[k] = threadid[mark[j]]; nodeindex_buffer_[k++] = inode[mark[j]]; //printf("%d i=%d j=%d k=%d nthost=%d mark=%d inode=%d\n", nrnmpi_myid, i, j, k, nthost_, mark[j], inode[mark[j]]); ++b; } } if (b) { msti_[nthost_].displ_ = mdisp; msti_[nthost_].size_ = 2*b; mdisp += 2*b; msti_[nthost_].host_ = i; msti_[nthost_].nnode_ = b; msti_[nthost_].tag_ = 1; ++nthost_; } } // second pass for the long<->reducedtree // includes the communication of sid <-> reduced tree for the // non rthost cpus // first make a list of the rthost values, the size of that // list will be how many msti we need for this pass. int* tmphost = new int[n]; // cannot be more than this. int ntmphost = 0; i = nrnmpi_myid; for (j=displ[i]; j < displ[i+1]; ++j) { int j1 = mark[j]; if (j1 >= 0 && bb_relation[j1] >= 2 && rthost[j1] != i) { tmphost[ntmphost++] = rthost[j1]; for (int itmp = 1; itmp < ntmphost; ++itmp) { if (tmphost[itmp-1] == rthost[j1]) { ntmphost--; break; } } } } //printf("%d second pass ntmphost = %d\n", nrnmpi_myid, ntmphost); // now we can loop over that list and fill the msti for (int itmp = 0; itmp < ntmphost; ++itmp) { i = nrnmpi_myid; int b = 0; int br = 0; // only the ones on this machine and rthost not this machine // Note: rthost generally has different sid value // and number of sid than this machine for (j=displ[i]; j < displ[i+1]; ++j) { int jj = j - displ[i]; int j1 = mark[j]; // point to sid[0] on this machine // skip if sid[1] of the rthost //printf("%d i=%d j=%d j1=%d bb_relation[j1]=%d rthost[j1]=%d\n", //nrnmpi_myid, i, j, j1, bb_relation[j1], rthost[j1]); if (j1 >= 0 && bb_relation[j1] >= 2 && rthost[j1] == tmphost[itmp]) { // only the first has rthost //printf("%d sid=%d bb_relation=%d send to rthost=%d k=%d\n", nrnmpi_myid, //sid[j1], bb_relation[j1], rthost[j1], k); // mark[j] points to the index for sid0 nodeindex_rthost_[k] = rthost[j1]; nodeindex_buffer_th_[k] = threadid[j - displ[i]]; nodeindex_buffer_[k++] = inode[j - displ[i]]; ++b; // one or two? if (bb_relation[jj] > 2) { //int iii = i; { // except that msti_[nthost_].offdiag_ has not been allocated, this is a // good time to figure out the pointers to sid1A and sid1B and which is which MultiSplitTransferInfo& m = msti_[nthost_]; int i; int* ix; int* ixth; double** od; int* iod; // start by assuming 2 and then increment by 2 if (m.offdiag_) { ix = m.nd_rt_index_; ixth = m.nd_rt_index_th_; od = m.offdiag_; iod = m.ioffdiag_; m.nd_rt_index_ = new int[m.nnode_rt_ + 2]; m.nd_rt_index_th_ = new int[m.nnode_rt_ + 2]; m.offdiag_ = new double*[m.nnode_rt_ + 2]; m.ioffdiag_ = new int[m.nnode_rt_ + 2]; for (i=0; i < m.nnode_rt_; ++i) { m.nd_rt_index_[i] = ix[i]; m.nd_rt_index_th_[i] = ixth[i]; m.offdiag_[i] = od[i]; m.ioffdiag_[i] = iod[i]; } delete [] ix; delete [] ixth; delete [] od; delete [] iod; ix = m.nd_rt_index_ + m.nnode_rt_; ixth = m.nd_rt_index_th_; od = m.offdiag_ + m.nnode_rt_; iod = m.ioffdiag_ + m.nnode_rt_; }else{ m.nd_rt_index_ = new int[2]; m.nd_rt_index_th_ = new int[2]; m.offdiag_ = new double*[2]; m.ioffdiag_ = new int[2]; ix = m.nd_rt_index_; ixth = m.nd_rt_index_th_; od = m.offdiag_; iod = m.ioffdiag_; } // now fill in // sid0 is for sid1A[0] , sid1 is for sid1B[???] //sid0: nodeindex = inode[j1] // in multisplit_v_setup, we created two parallel vectors of size // nbackrt_ (number of backbones sending to reduced tree). // backsid_ is sid0, and // backAindex_ corresponding sid1A index for sid0 // backBindex_ sid1B index for sid1 // Should not be too many backbones on this machine so linear // search should be ok. BUG again. i is MultiSplit.back_index and // can determine MultiSplit from j1. i = vec2ms[jj]->back_index; MultiSplitThread& t = mth_[vec2ms[jj]->ithread]; assert(sid[jj] == t.backsid_[i]); ix[0] = inode[jj]; ix[1] = inode[jj + 1]; ixth[0] = vec2ms[jj]->ithread; ixth[1] = vec2ms[jj]->ithread; od[0] = t.sid1A + t.backAindex_[i]; od[1] = t.sid1B + t.backBindex_[i]; iod[0] = t.backAindex_[i]; iod[1] = t.backBindex_[i]; #if 0 printf("%d offdiag nbrt=%d iii=%d i=%d j1=%d jj=%d sid=%d ix = %d %d back = %d %d\n", nrnmpi_myid, nbackrt_, iii, i, j1, jj, sid[j1], ix[0], ix[1], t.backAindex_[i], t.backBindex_[i]); #endif m.nnode_rt_ += 2; } nodeindex_rthost_[k] = rthost[j1]; ++j; ++jj; nodeindex_buffer_th_[k] = threadid[jj]; nodeindex_buffer_[k++] = inode[jj]; ++b; br += 2; } } } if (b || br) { msti_[nthost_].displ_ = mdisp; msti_[nthost_].size_ = 2*b + br; mdisp += 2*b + br; msti_[nthost_].host_ = tmphost[itmp]; msti_[nthost_].rthost_ = tmphost[itmp]; msti_[nthost_].nnode_ = b; msti_[nthost_].tag_ = 3; ++nthost_; } } delete [] tmphost; // third pass for the long->long backbones for (i=0; i < nrnmpi_numprocs; ++i) { int b = 0; for (j=displ[i]; j < displ[i+1]; ++j) { if (mark[j] >= 0 && bb_relation[mark[j]] == 0 && all_bb_relation[j] == 0) { nodeindex_buffer_th_[k] = threadid[mark[j]]; nodeindex_buffer_[k++] = inode[mark[j]]; //printf("%d i=%d j=%d k=%d nthost=%d mark=%d inode=%d\n", nrnmpi_myid, i, j, k, nthost_, mark[j], inode[mark[j]]); ++b; } } if (b) { msti_[nthost_].displ_ = mdisp; msti_[nthost_].size_ = 2*b; mdisp += 2*b; msti_[nthost_].host_ = i; msti_[nthost_].nnode_ = b; msti_[nthost_].tag_ = 2; ++nthost_; } } // fourth pass for the reducedtree->long backbones // the reduced tree <-> sids not on this host ihost_reduced_long_ = nthost_; for (i=0; i < nrnmpi_numprocs; ++i) { int b = 0; int br = 0; // not the ones on this machine and rthost this machine for (j=displ[i]; j < displ[i+1]; ++j) { int j1 = mark[j]; if (j1 >= 0 && all_bb_relation[j] >= 2 && rthost[j1] == nrnmpi_myid && rthost[j1] != i) { //printf("%d i=%d sid=%d bb_relation=%d send to rthost=%d rt=%p\n", nrnmpi_myid, i, //allsid[j], all_bb_relation[j], rthost[j1], rt[j1]); // don't care about the nodeindex, only // the ReducedTree. // fill in the ReducedTree map with RHS and D pointers to the sid[0] related receive buffer // and next iteration the sid[1] int ib = mdisp + 2*b; //printf("%d fill buf %d\n", nrnmpi_myid, ib); rt[j1]->fillrmap(allsid[j], -1, trecvbuf_ + ib+1); //exchange order is d, rhs rt[j1]->fillrmap(allsid[j], allsid[j], trecvbuf_ + ib); rt[j1]->fillsmap(allsid[j], tsendbuf_ + ib+1, tsendbuf_ + ib); ++b; // at least D and RHS received and sent back if (all_bb_relation[j] > 2) { // two of these // need to fill in off diag after this iteration is done and then re-iterate // because they are at the end of the buffer section for machine i. ++br; // an offdiag received // though I suppose it does not // need to be sent back } } } // reiterate and fill in off diag br = 0; for (j=displ[i]; j < displ[i+1]; ++j) { int j1 = mark[j]; if (j1 >= 0 && all_bb_relation[j] >= 2 && rthost[j1] == nrnmpi_myid && rthost[j1] != i) { if (all_bb_relation[j] > 2) { // two of these int ib = mdisp + 2*b + br; //printf("%d offdiag fill buf %d j1=%d rt=%p\n", nrnmpi_myid, ib, j1, rt[j1]); rt[j1]->fillrmap(allsid[j+1], allsid[j], trecvbuf_ + ib); rt[j1]->fillrmap(allsid[j], allsid[j+1], trecvbuf_ + ib + 1); br += 2; j += 1; } } } if (b || br) { msti_[nthost_].displ_ = mdisp; msti_[nthost_].size_ = 2*b + br; mdisp += 2*b + br; msti_[nthost_].host_ = i; msti_[nthost_].rthost_ = nrnmpi_myid; msti_[nthost_].nnode_ = b; // no nnode_rt_ for this phase //msti_[nthost_].nnode_rt_ = br; //msti_[nthost_].offdiag_ = new double*[br]; msti_[nthost_].tag_ = 3; ++nthost_; } } // fifth pass for the short->long backbones int tmp_index = k; ihost_short_long_ = nthost_; for (i=0; i < nrnmpi_numprocs; ++i) { int b = 0; for (j=displ[i]; j < displ[i+1]; ++j) { if (mark[j] >= 0 && bb_relation[mark[j]] == 1 && all_bb_relation[j] == 0) { nodeindex_buffer_th_[k] = threadid[mark[j]]; nodeindex_buffer_[k++] = inode[mark[j]]; //printf("%d i=%d j=%d k=%d nthost=%d mark=%d inode=%d\n", nrnmpi_myid, i, j, k, nthost_, mark[j], inode[mark[j]]); ++b; } } if (b) { msti_[nthost_].displ_ = mdisp; msti_[nthost_].size_ = 2*b; mdisp += 2*b; msti_[nthost_].host_ = i; msti_[nthost_].nnode_ = b; msti_[nthost_].tag_ = 1; ++nthost_; } } #if 0 printf("%d nthost_ = %d\n", nrnmpi_myid, nthost_); for (i=0; i < nthost_; ++i) { MultiSplitTransferInfo& m = msti_[i]; printf("%d i=%d displ_=%d host_=%d nnode_=%d tag_=%d\n", nrnmpi_myid, i, m.displ_, m.host_, m.nnode_, m.tag_); } #endif #if 0 for (i=0; i < k; ++i) { j=nodeindex_buffer_[i]; printf("%d %d nodeindex_buffer %d %s %d\n", nrnmpi_myid, i, j, secname(v_node[j]->sec), v_node[j]->sec_node_index_); } #endif // the sids on this machine with rthost on this machine // go into the ReducedTree directly if (nrtree_) { i = 0; int ib = 0; MultiSplit* ms; for (int ii=0; ii < multisplit_list_->count(); ++ii) { ms = multisplit_list_->item(ii); NrnThread* _nt = nrn_threads + ms->ithread; MultiSplitThread& t = mth_[ms->ithread]; if (ms->rthost == nrnmpi_myid) { //printf("%d nrtree_=%d i=%d rt=%p\n", nrnmpi_myid, nrtree_, i, rt[i]); int j = ms->nd[0]->v_node_index; //printf("%d call fillrmap sid %d,%d %d node=%d\n", nrnmpi_myid, ms->sid[0], ms->sid[0], j); ms->rt_ = rt[i]; ms->rmap_index_ = rt[i]->irfill; ms->smap_index_ = rt[i]->nsmap; rt[i]->fillrmap(ms->sid[0], -1, &RHS(j)); rt[i]->fillrmap(ms->sid[0], ms->sid[0], &D(j)); rt[i]->fillsmap(ms->sid[0], &RHS(j), &D(j)); if (ms->nd[1]) { ib = ms->back_index; assert(t.backsid_[ib] == ms->sid[0]); // fill sid1 row // note: for cvode need to keep fillrmap as pairs so following // moved from between sid1A,sid1B fillrmap. j = ms->nd[1]->v_node_index; //printf("%d call fillrmap sid1 %d %d node=%d\n", nrnmpi_myid, ms->sid[1], ms->sid[1], j); rt[i]->fillrmap(ms->sid[1], -1, &RHS(j)); rt[i]->fillrmap(ms->sid[1], ms->sid[1], &D(j)); rt[i]->fillsmap(ms->sid[1], &RHS(j), &D(j)); // fill sid1A for sid0 row //printf("%d call fillrmap sid %d,%d %d ib=%d t.backsid=%d t.backAindex=%d\n", //nrnmpi_myid, ms->sid[1], ms->sid[0], ib, t.backsid_[ib], t.backAindex_[ib]); rt[i]->fillrmap(ms->sid[1], ms->sid[0], t.sid1A + t.backAindex_[ib]); // fill sid1B //printf("%d call fillrmap sid %d,%d ib=%d backBindex=%d\n", nrnmpi_myid, ms->sid[0], ms->sid[1], ib, backBindex_[ib]); rt[i]->fillrmap(ms->sid[0], ms->sid[1], t.sid1B + t.backBindex_[ib]); } } ++i; if (ms->nd[1]) { ++i; } } } if (nthost_) { msti_[0].nodeindex_th_ = nodeindex_buffer_th_; msti_[0].nodeindex_ = nodeindex_buffer_; for (i=1; i < nthost_; ++i) { msti_[i].nodeindex_th_ = msti_[i-1].nodeindex_th_ + msti_[i-1].nnode_; msti_[i].nodeindex_ = msti_[i-1].nodeindex_ + msti_[i-1].nnode_; } } // count how many nodeindex_buffer are non-zero area nodes // iarea_short_long_ and narea_ only for ones // not related to the ReducedTree method //printf("%d ndbsize=%d\n", nrnmpi_myid, ndbsize); for (i=0; i < ndbsize; ++i) { NrnThread* _nt = nrn_threads + nodeindex_buffer_th_[i]; Node* nd = _nt->_v_node[nodeindex_buffer_[i]]; if (i == tmp_index) { iarea_short_long_ = narea_; } if (nd->_classical_parent && nd->sec_node_index_ < nd->sec->nnode - 1) { if (nodeindex_rthost_[i] < 0) { ++narea_; } } } //printf("%d narea=%d iarea_short_long=%d\n", nrnmpi_myid, narea_, iarea_short_long_); if (narea_) { buf_area_indices_ = new int[narea_]; area_node_indices_ = new int[narea_]; k = 0; for (i=0; i < ndbsize; ++i) { NrnThread* _nt = nrn_threads + nodeindex_buffer_th_[i]; Node* nd = _nt->_v_node[nodeindex_buffer_[i]]; if (nd->_classical_parent && nd->sec_node_index_ < nd->sec->nnode - 1) { buf_area_indices_[k] = 2*i; area_node_indices_[k] = nodeindex_buffer_[i]; ++k; } } } // look through the nthost list and fill in the area2buf receive buffer // indices for info sent to reducetrees (by definition,not on this machine) for (i=0; i < nthost_; ++i) { MultiSplitTransferInfo& msti = msti_[i]; if (msti.tag_ == 3) { // reduced tree related // but we only want to, not from, the reduced tree machine // any nodes nonzero area? //printf("%d i=%d nnode=%d nodeindex=%p host=%d rthost=%d\n", nrnmpi_myid, i, msti.nnode_, msti.nodeindex_, msti.host_, msti.rthost_); if (msti.rthost_ != nrnmpi_myid) for (j=0; j < msti.nnode_; ++j) { NrnThread* _nt = nrn_threads + msti.nodeindex_th_[j]; int in = msti.nodeindex_[j]; Node* nd = _nt->_v_node[in]; if (nd->_classical_parent && nd->sec_node_index_ < nd->sec->nnode - 1) { // non-zero area // search the area2buf list for (k = 0; k < narea2buf_; ++k) { if (area2buf_[k].inode == in && area2buf_[k].ms->ithread == _nt->id ) { break; } } assert(k < narea2buf_); Area2Buf& ab = area2buf_[k]; // ok. fill in the ibuf info ab.ibuf[0] = msti.displ_ + 2*j; ab.ibuf[1] = ab.ibuf[0] + 1; if (ab.n == 3) { // which offdiag item? int ioff; for (ioff = 0; ioff < msti.nnode_rt_; ++ioff) { if (msti.nd_rt_index_[ioff] == in && msti.nd_rt_index_th_[ioff] == _nt->id) { break; } } assert(ioff < msti.nnode_rt_); ab.ibuf[2] = msti.displ_ + 2*msti.nnode_ + ioff; } #if 0 printf("%d in=%d n=%d ibuf %d %d %d\n", nrnmpi_myid, in, ab.n, ab.ibuf[0], ab.ibuf[1], (ab.n == 3) ? ab.ibuf[2] : -1); #endif } } } } //printf("%d leave exchange_setup\n", nrnmpi_myid); //nrnmpi_int_allgather(&n, nn, 1); delete [] nn; delete [] sid; delete [] inode; delete [] threadid; delete [] displ; delete [] allsid; delete [] vec2ms; delete [] mark; delete [] bb_relation; delete [] all_bb_relation; delete [] connects2short; delete [] rthost; delete [] rt; errno = 0; } // when d and rhs pointers are updated in the Node, they must be updated in // the reducedtree rmap and smap as well void nrn_multisplit_ptr_update() { msc_->rt_map_update(); } void MultiSplitControl::rt_map_update() { for (int i=0; i < multisplit_list_->count(); ++i) { MultiSplit& ms = *multisplit_list_->item(i); if (ms.rthost == nrnmpi_myid) { // reduced tree on this host assert(ms.rt_); assert(ms.rmap_index_ >= 0); assert(ms.smap_index_ >= 0); MultiSplitThread& t = mth_[ms.ithread]; double** r = ms.rt_->rmap + ms.rmap_index_; double** s = ms.rt_->smap + ms.smap_index_; for (int j=0; j < 2; ++j) if (ms.nd[j]) { *s++ = *r++ = &NODERHS(ms.nd[j]); *s++ = *r++ = &NODED(ms.nd[j]); } if (ms.nd[1]) { // do sid1a and sid1b as well assert(ms.back_index >= 0); *r++ = t.sid1A + t.backAindex_[ms.back_index]; *r++ = t.sid1B + t.backBindex_[ms.back_index]; } } } // also need to do the Area2RT.pd[3] where the // order is d, rhs, and possibly sid1A or sid1B for (int i = 0; i < narea2rt_; ++i) { Area2RT& art = area2rt_[i]; MultiSplit& ms = *art.ms; NrnThread* _nt = nrn_threads + ms.ithread; art.pd[0] = &D(art.inode); art.pd[1] = &RHS(art.inode); if (art.n == 3) { MultiSplitThread& t = mth_[ms.ithread]; if (art.inode == ms.nd[0]->v_node_index) { art.pd[2] = t.sid1A + t.backAindex_[ms.back_index]; }else if (art.inode == ms.nd[1]->v_node_index) { art.pd[2] = t.sid1B + t.backBindex_[ms.back_index]; }else{ assert(0); } } } } void MultiSplitControl::pexch() { int i, j, k, id; id = nrnmpi_myid; // assume only one thread when there is transfer info NrnThread* nt = nrn_threads; printf("%d nthost_=%d\n", id, nthost_); for (i=0; i < nthost_; ++i) { MultiSplitTransferInfo& ms = msti_[i]; printf("%d %d host=%d nnode=%d displ=%d\n", id, i, ms.host_, ms.nnode_, ms.displ_); for (j=0; j < ms.nnode_; ++j) { k = ms.nodeindex_[j]; printf("%d %d %d %d %s %d\n", id, i, j, k, secname(nt->_v_node[k]->sec), nt->_v_node[k]->sec_node_index_); } } } void MultiSplitControl::reduced_mark(int m, int sid, int nt, int* mark, int* allsid, int* all_bb_relation) { int i; for (i = 0; i < nt; ++i) { if (mark[i] == -1 && allsid[i] == sid) { mark[i] = m; if (all_bb_relation[i] > 2) { int sid2 = all_bb_relation[i] - 3; reduced_mark(m, sid2, nt, mark, allsid, all_bb_relation); } } } } /* section ParallelContext.multisplit_connect(x, sid) is a generalization of root ParallelContext.splitcell_connect(adjacent_host). sid refers to a point and all points with the same sid are connected together with 0 resistance wires. If a connected set of sections has only 1 sid then that point will be the root and triangularization can proceed normally. If a connected set of sections has 2 sid then triangularization proceeds from the leaves to the backbone between the 2 sid which forms a cable. Then special triangularization with fill-in of the sid1A column proceeds from the backbone element adjacent to sid1 and then with fill-in of the sid1B column (which modifies the sid1A column) from the backbone end adjacent to sid0 in the hope that the fill-in elements at the sid are small enough to ignore in the interprocessor jacobian element matrix exchange. Note that gaussian elimination in the backbone is more complex as normal tree elimination with the same number of nodes. We defer the implementation of more than 2 sid in a subtree. */ /* Gaussian elimination strategy for the backbone. There are two different strategies that optimize either minimum number of matrix operations that is best for long backbones, or numerical stability by minimizing the far off diagonal just before exchange which would be best for short (tightly coupled) backbones. For long backbones, it is simplest to begin triangularization using the equations adjacent to the center as pivot equations. This fills in a single column. But in the trivial case of the center being the only interior point, there are no triangularization operations before exchange. 1 xx 2 xxx 3 xxx 4 xxx 5 xxx 6 xxx 7 xx 1 x x 2 xx x 3 xxx 4 xxx 5 xxx 6 x xx 7 x x exchange occurs 1 x x 2 x x 3 xx 4 x 5 xx 6 x x 7 x x For short backbones and greatest stability/accuracy and still simple but many more operations, one begins adjacent to the sids. Now, in the trivial case of the center being the only interior point, it is used to reduce the off diagonal element. If there is no interior point nothing happens. 1 xx 2 xxx triangularize starting with equation 6 (cannot start with 3 xxx equation 1 or 7 because we do not know the correct value for d) 4 xxx this eliminates the a elements but at the cost of introducing 5 xxx A elements in column 7 6 xxx 7 xx 1 x x cannot use 1, instead do the same starting at 2 2 xx x this eliminates b elements but at the cost of introducing 3 xx x B elements in column 1. Also A elements are modified. 4 xx x 5 xx x 6 xxx 7 xx 1 x x 2 xx x 3 x x x 4 x x x 5 x x x 6 x xx 7 x x exchange occurs (modified d for 1 and 7 solve the 1 and 7 2x2 equations then back substitute */ void MultiSplitControl::prstruct() { int id, i, it; for (id=0; id < nrnmpi_numprocs; ++id) { nrnmpi_barrier(); if (id == nrnmpi_myid) { printf("myid=%d\n", id); printf(" MultiSplit %ld\n", multisplit_list_->count()); for (i=0; i < multisplit_list_->count(); ++i) { MultiSplit* ms = multisplit_list_->item(i); Node* nd = ms->nd[0]; printf(" %2d bbs=%d bi=%-2d rthost=%-4d %-4d %s{%d}", i, ms->backbone_style, ms->back_index, ms->rthost, ms->sid[0], secname(ms->nd[0]->sec), ms->nd[0]->sec_node_index_); if (ms->nd[1]) { printf(" %-4d %s{%d}", ms->sid[1], secname(ms->nd[1]->sec), ms->nd[1]->sec_node_index_); } printf("\n"); } for (it = 0; it < nrn_nthread; ++it) { NrnThread* _nt = nrn_threads + it; MultiSplitThread& t = mth_[it]; printf(" backbone_begin=%d backbone_long_begin=%d backbone_interior_begin=%d\n", t.backbone_begin, t.backbone_long_begin, t.backbone_interior_begin); printf(" backbone_sid1_begin=%d backbone_long_sid1_begin=%d backbone_end=%d\n", t.backbone_sid1_begin, t.backbone_long_sid1_begin, t.backbone_end); printf(" nbackrt_=%d i, backsid_[i], backAindex_[i], backBindex_[i]\n", t.nbackrt_); if (t.nbackrt_) { for (int i=0; i < t.nbackrt_; ++i) { printf(" %2d %2d %5d %5d", i, t.backsid_[i], t.backAindex_[i], t.backBindex_[i]); Node* nd = _nt->_v_node[t.backbone_begin + t.backAindex_[i]]; printf(" %s{%d}", secname(nd->sec), nd->sec_node_index_); nd = _nt->_v_node[t.backbone_begin + t.backBindex_[i]]; printf(" %s{%d}", secname(nd->sec), nd->sec_node_index_); printf("\n"); } } } printf(" ReducedTree %d\n", nrtree_); for (i=0; i < nrtree_; ++i) { ReducedTree* rt = rtree_[i]; printf(" %d n=%d nmap=%d\n", i, rt->n, rt->nmap); rt->pr_map(tbsize, trecvbuf_); } printf(" MultiSplitTransferInfo %d\n", nthost_); for (i=0; i < nthost_; ++i) { MultiSplitTransferInfo& m = msti_[i]; printf(" %d host=%d rthost=%d nnode=%d nnode_rt=%d size=%d tag=%d\n", i, m.host_, m.rthost_, m.nnode_, m.nnode_rt_, m.size_, m.tag_); if (m.nnode_) { printf(" nodeindex=%p nodeindex_buffer = %p\n", m.nodeindex_,nodeindex_buffer_); } } printf(" ndbsize=%d i nodeindex_buffer_=%p nodeindex_rthost_=%p\n", ndbsize, nodeindex_buffer_, nodeindex_rthost_); if (ndbsize) { for (int i=0; i < ndbsize; ++i) { printf(" %d %d %d\n", i, nodeindex_buffer_[i], nodeindex_rthost_[i]); } } printf(" tbsize=%d trecvbuf_=%p tsendbuf_=%p\n", tbsize, trecvbuf_, tsendbuf_); printf("\n"); } } nrnmpi_barrier(); } // following uses the short backbone method (N form of the matrix) // What is a good order for the above? We already have a tree order structure // with a root. If there is a single sid involved then that should be the // root and we are conceptually the same as splitcell.cpp // For two sid, then the tree is ordered as (see above comment at the NOTE) void multisplit_solve() { msc_->solve(); } void* nrn_multisplit_triang(NrnThread* nt){ msc_->mth_[nt->id].triang(nt); return (void*)0; } void* nrn_multisplit_reduce_solve(NrnThread* nt){ if (nt->id == 0) { msc_->reduce_solve(); } return (void*)0; } void* nrn_multisplit_bksub(NrnThread* nt){ msc_->mth_[nt->id].bksub(nt); return (void*)0; } void MultiSplitControl::solve() { // if (t < .025) prstruct(); // if (nrnmpi_myid == 0) pmat(true); NrnThread* nt = nrn_threads; MultiSplitThread& t = mth_[0]; t.triang_subtree2backbone(nt); t.triang_backbone(nt); // if (nrnmpi_myid == 4) pmat(true); // pmat1("t"); //printf("%d enter matrix exchange\n", nrnmpi_myid); matrix_exchange(); //printf("%d leave matrix exchange\n", nrnmpi_myid); // pmat1("e"); t.bksub_backbone(nt); t.bksub_subtrees(nt); // pmat(true); // nrnmpi_barrier(); // only possible if everyone is actually multisplit // abort(); } void MultiSplitThread::triang(NrnThread* _nt) { triang_subtree2backbone(_nt); triang_backbone(_nt); } void MultiSplitControl::reduce_solve() { matrix_exchange(); } void MultiSplitThread::bksub(NrnThread* _nt) { bksub_backbone(_nt); bksub_subtrees(_nt); } // In the typical case, all nodes connected to the same sids have 0 area // and thus the weighted average voltage is just sum RHS / sum D. // However, nrn_multisplit_nocap_v is somewhat of a misnomer because one or // more compartments (but not connected together with the same sid) may have // non-zero area and thus that voltage is correct and must be transferred // to all the connecting (with same sid) zero-area nodes. Furthermore // the sum RHS (of the zero area nodes) must be added to the RHS of non-zero // area node (after that non-zero RHS has been computed back in the caller). // Lastly, that sum of RHS has to be adjusted using the sum of D of the // zero area nodes so that the RHS is proper with respect to the correct // value of V. // So. When there is no non-zero area node for a sid, the voltage is // sum rhs / sum d. For a non-zero area node the V must be sent and the // sum rhs and sum d from the others must be received and the true rhs // put into adjust_rhs_ using rhs - d*v. For a zero-area // node (with same sid as non-zero area node), rhs and d must be sent, and // voltage can be computed after receiving the changed rhs and d by // rhs/d. void nrn_multisplit_nocap_v() { msc_->multisplit_nocap_v_part1(nrn_threads); msc_->multisplit_nocap_v_part2(nrn_threads); msc_->multisplit_nocap_v_part3(nrn_threads); } void nrn_multisplit_nocap_v_part1(NrnThread* nt) { msc_->multisplit_nocap_v_part1(nt); } void nrn_multisplit_nocap_v_part2(NrnThread* nt) { msc_->multisplit_nocap_v_part2(nt); } void nrn_multisplit_nocap_v_part3(NrnThread* nt) { msc_->multisplit_nocap_v_part3(nt); } void MultiSplitControl::multisplit_nocap_v_part1(NrnThread* _nt) { int i; // scale the non-zero area node elements since those already // have the answer. // the problem here is that non-zero area v is correct, // but rhs ends up wrong for // non-zero area nodes (because current from zero area not added) // so encode v into D and sum of zero-area rhs will end up in // rhs. if (_nt->id == 0) for (i=0; i < narea2buf_; ++i) { Area2Buf& ab = area2buf_[i]; VEC_D(ab.inode) = 1e50; // sentinal VEC_RHS(ab.inode) = VEC_V(ab.inode)*1e50; } // also scale the non-zero area elements on this host for (i=0; i < narea2rt_; ++i) { Area2RT& ar = area2rt_[i]; if (_nt->id == ar.ms->ithread) { VEC_D(ar.inode) = 1e50; VEC_RHS(ar.inode) = VEC_V(ar.inode)*1e50; } } } void MultiSplitControl::multisplit_nocap_v_part2(NrnThread* _nt) { if (_nt->id == 0) {matrix_exchange_nocap();} } void MultiSplitControl::multisplit_nocap_v_part3(NrnThread* _nt) { // at this point, for zero area nodes, D is // 1.0, and the voltage is RHS/D). // So zero-area node information is fine. // But for non-zero area nodes, D is the sum of all zero-area // node d, and RHS is the sum of all zero-area node rhs. int i, j; if (_nt->id == 0) for (i=0; i < narea2buf_; ++i) { Area2Buf& ab = area2buf_[i]; int j = ab.inode; double afac = 100. / VEC_AREA(j); ab.adjust_rhs_ = (VEC_RHS(j) - VEC_D(j)*VEC_V(j)) * afac; //printf("%d nz1 %d D=%g RHS=%g V=%g afac=%g adjust=%g\n", //nrnmpi_myid, i, D(i), RHS(i), VEC_V(j), afac, ab.adjust_rhs_); } for (i=0; i < narea2rt_; ++i) { Area2RT& ar = area2rt_[i]; if (_nt->id == ar.ms->ithread) { int j = ar.inode; double afac = 100. / VEC_AREA(j); ar.adjust_rhs_ = (VEC_RHS(j) - VEC_D(j)*VEC_V(j)) * afac; //printf("%d nz2 %d D=%g RHS=%g V=%g afac=%g adjust=%g\n", //nrnmpi_myid, i, D(i), RHS(i), VEC_V(j), afac, ar.adjust_rhs_); } } } void nrn_multisplit_adjust_rhs(NrnThread* nt) { msc_->multisplit_adjust_rhs(nt); } void MultiSplitControl::multisplit_adjust_rhs(NrnThread* _nt) { int i; if (_nt->id == 0) for (i=0; i < narea2buf_; ++i) { Area2Buf& ab = area2buf_[i]; VEC_RHS(ab.inode) += ab.adjust_rhs_; } // also scale the non-zero area elements on this host for (i=0; i < narea2rt_; ++i) { Area2RT& ar = area2rt_[i]; if (_nt->id == ar.ms->ithread) { //printf("%d adjust %d %g %g\n", //nrnmpi_myid, ar.inode, ar.adjust_rhs_, VEC_RHS(ar.inode)); VEC_RHS(ar.inode) += ar.adjust_rhs_; } } } // Two phases: Send all the info from long backbones and receive // all the short backbone info for this machine. // Then process the 2x2 short backbone and send remaining (short) // backbone and receive the rest (long) of the backbone info. // The ReducedTree solve fits into this strategy receiving from long at the // same time as receiving from short and // sending to long at the same time as sending from short // The MultiSplitTransferInfo order is // this -> other // long -> short 0, ihost_long_long-1 // long -> long ihost_long_long, ihost_long_reduced-1 // long -> reduced ihost_long_reduced, ihost_reduced_long-1 // reduced -> long ihost_reduced_long, ihost_short_long-1 // short -> long ihost_short_long, nthost_ void MultiSplitControl::matrix_exchange() { int i, j, jj, k; double* tbuf; double rttime; double wt = nrnmpi_wtime(); NrnThread* _nt; // the mpi strategy is copied from the // cvode/examples_par/pvkxb.c exchange strategy #define EXCHANGE_ON 1 #if EXCHANGE_ON // post all the receives for (i=0; i < nthost_; ++i) { int tag; MultiSplitTransferInfo& mt = msti_[i]; tag = mt.tag_; // receiving the result from a reduced tree is tag 4. if (tag == 3 && nrnmpi_myid != mt.rthost_) { tag = 4; } nrnmpi_postrecv_doubles(trecvbuf_ + mt.displ_, mt.size_, mt.host_, tag, &mt.request_); #if 0 printf("%d post receive %d displ=%d size=%d host=%d tag=%d\n", nrnmpi_myid, i, mt.displ_, mt.size_, mt.host_, tag); #endif } // Note that we are assuming only one thread (_nt) when // mpi is used. (In order for D and RHS to make sense) // fill the send buffer with the long backbone info // i.e. long->short, long -> long, long -> reduced for (i=0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; j = 0; tbuf = tsendbuf_ + mt.displ_; for (jj = 0; jj < mt.nnode_; ++jj) { k = mt.nodeindex_[jj]; _nt = nrn_threads + mt.nodeindex_th_[jj]; tbuf[j++] = D(k); tbuf[j++] = RHS(k); } // each sent backbone will have added 2 to mt.nnode_rt_ for (jj = 0; jj < mt.nnode_rt_; ++jj) { tbuf[j++] = *mt.offdiag_[jj]; } #if 0 //if (nrnmpi_myid == 4) { printf("%d send to %d nnode=%d nnode_rt=%d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.nnode_, mt.nnode_rt_, mt.size_, mt.tag_); //} #endif #if 0 //if (nrnmpi_myid == 4) { for (j = 0; j < mt.nnode_; ++j) { printf("%d send to %d tbuf[%d] = %g tbuf[%d] = %g from node %d\n", nrnmpi_myid, mt.host_, 2*j, tbuf[2*j], 2*j+1, tbuf[2*j+1], mt.nodeindex_[j]); } for (j = 0; j < mt.nnode_rt_; ++j) { int jj = 2*mt.nnode_ + j; printf("%d send to %d offdiag tbuf[%d] = %g\n", nrnmpi_myid, mt.host_, jj, tbuf[jj]); } //} #endif } // adjust area for any D, RHS, sid1A, sid1B going to a ReducedTree host for (i=0; i < narea2buf_; ++i) { Area2Buf& ab = area2buf_[i]; _nt = nrn_threads + ab.ms->ithread; double afac = 0.01 * VEC_AREA(ab.inode); tbuf = tsendbuf_; for (j = 0; j < ab.n; ++j) { tbuf[ab.ibuf[j]] *= afac; #if 0 printf("%d area2buf * afac=%g i=%d j=%d node=%d ibuf=%d buf=%g\n", nrnmpi_myid, afac, i, j, ab.inode, ab.ibuf[j], tbuf[ab.ibuf[j]]); #endif } } // send long backbone info (long->short, long->long) for (i=0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; tbuf = tsendbuf_ + mt.displ_; nrnmpi_send_doubles(tbuf, mt.size_, mt.host_, mt.tag_); #if 0 printf("%d post send %d displ=%d size=%d host=%d tag=%d\n", nrnmpi_myid, i, mt.displ_, mt.size_, mt.host_, mt.tag_); #endif } #if 0 for (i=ihost_reduced_long_; i < nthost_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; printf("%d will send result to %d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.size_, mt.tag_); } #endif // handle the reduced trees and short backbones // wait for receives from the long backbones needed by reduced tree // and short backbones to complete (reduced <- long, short <- long) for (i=ihost_reduced_long_; i < nthost_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; #if 0 printf("%d wait one %d\n", nrnmpi_myid, mt.host_); #endif nrnmpi_wait(&mt.request_); #if 0 printf("%d receive from %d nnode=%d nnode_rt=%d size=%d tag=%d displ=%d\n", nrnmpi_myid, mt.host_, mt.nnode_, mt.nnode_rt_, mt.size_, mt.tag_, mt.displ_); //for (j=0; j < mt.size_; ++j) { printf("%d receive tbuf[%d]=%g\n", nrnmpi_myid, j, trecvbuf_[mt.displ_ + j]);} #endif } #if 0 for (i=0; i < tbsize_; ++i) { printf("%d trecvbuf[%d] = %g\n", nrnmpi_myid, i, trecvbuf_[i]);} #endif // measure reducedtree,short backbone computation time rttime = nrnmpi_wtime(); // adjust area in place for any D, RHS, sid1A, sid1B on this host // going to ReducedTree on this host //if (narea2rt_) printf("%d adjust area in place\n", nrnmpi_myid); for (i=0; i < narea2rt_; ++i) { Area2RT& ar = area2rt_[i]; NrnThread* _nt = nrn_threads + ar.ms->ithread; double afac = 0.01 * VEC_AREA(ar.inode); for (j = 0; j < ar.n; ++j) { *ar.pd[j] *= afac; } } #endif //EXCHANGE_ON for (i = 0; i < nrtree_; ++i) { rtree_[i]->solve(); } #if EXCHANGE_ON // measure reducedtree,short backbone computation time nrnmpi_rtcomp_time_ += nrnmpi_wtime() - rttime; // send reduced and short backbone info (reduced -> long, short -> long) for (i=ihost_reduced_long_; i < nthost_; ++i) { int tag; MultiSplitTransferInfo& mt = msti_[i]; tbuf = tsendbuf_ + mt.displ_; //printf("%d send result to %d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.size_, mt.tag_); tag = mt.tag_; // sending result from reduced tree means tag is 4 if (tag == 3) { tag = 4; } nrnmpi_send_doubles(tbuf, mt.size_, mt.host_, tag); // only moderately wasteful (50%) in sending back irrelevant // off diag info. Required is only 2*mt.nnode_. But these // messages are pretty short, anyway. } // handle the long backbones // wait for all remaining receives to complete // long <- short, long <- long, long <- reduced for (i=0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; #if 0 printf("%d wait two %d\n", nrnmpi_myid, mt.host_); #endif nrnmpi_wait(&mt.request_); #if 0 printf("%d receive from %d nnode=%d nnode_rt=%d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.nnode_, mt.nnode_rt_, mt.size_, mt.tag_); #endif } // add to matrix (long <- long) // and also (long <- short) even though in principle should // not add those since already solved on short backbone machine // we can add since the ones sent were scaled by 1e30 which // will eliminate the effect of existing D, RHS, and S1A or S1B // as well as making the possible area scaling irrelevant // being able to handle them together means we do not need // 0 to ihost_long_long - 1 to refer to long <-> short for (i = 0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; j = 0; tbuf = trecvbuf_ + mt.displ_; for (jj = 0; jj < mt.nnode_; ++jj) { k = mt.nodeindex_[jj]; _nt = nrn_threads + mt.nodeindex_th_[jj]; D(k) += tbuf[j++]; RHS(k) += tbuf[j++]; } #if 0 if (nrnmpi_myid == 4) { for (j = 0; j < mt.nnode_; ++j) { printf("%d received from %d tbuf[%d] = %g tbuf[%d] = %g added to node %d\n", nrnmpi_myid, mt.host_, 2*j, tbuf[2*j], 2*j+1, tbuf[2*j+1], mt.nodeindex_[j]); } } #endif } #endif //EXCHANGE_ON #if PARANEURON nrnmpi_splitcell_wait_ += nrnmpi_wtime() - wt; #endif errno = 0; } void MultiSplitControl::matrix_exchange_nocap() { //copy of matrix_exchange() and modified int i, j, jj, k; double* tbuf; double rttime; double wt = nrnmpi_wtime(); NrnThread* _nt; // the mpi strategy is copied from the // cvode/examples_par/pvkxb.c exchange strategy #define EXCHANGE_ON 1 #if EXCHANGE_ON // post all the receives for (i=0; i < nthost_; ++i) { int tag; MultiSplitTransferInfo& mt = msti_[i]; tag = mt.tag_; // receiving the result from a reduced tree is tag 4. if (tag == 3 && nrnmpi_myid != mt.rthost_) { tag = 4; } nrnmpi_postrecv_doubles(trecvbuf_ + mt.displ_, mt.size_, mt.host_, tag, &mt.request_); #if 0 printf("%d post receive %d displ=%d size=%d host=%d tag=%d\n", nrnmpi_myid, i, mt.displ_, mt.size_, mt.host_, tag); #endif } // fill the send buffer with the long backbone info // i.e. long->short, long -> long, long -> reduced for (i=0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; j = 0; tbuf = tsendbuf_ + mt.displ_; for (jj = 0; jj < mt.nnode_; ++jj) { k = mt.nodeindex_[jj]; _nt = nrn_threads + mt.nodeindex_th_[jj]; tbuf[j++] = D(k); tbuf[j++] = RHS(k); } // each sent backbone will have added 2 to mt.nnode_rt_ for (jj = 0; jj < mt.nnode_rt_; ++jj) { tbuf[j++] = *mt.offdiag_[jj]; } #if 0 //if (nrnmpi_myid == 4) { printf("%d send to %d nnode=%d nnode_rt=%d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.nnode_, mt.nnode_rt_, mt.size_, mt.tag_); //} #endif #if 0 //if (nrnmpi_myid == 4) { for (j = 0; j < mt.nnode_; ++j) { printf("%d send to %d tbuf[%d] = %g tbuf[%d] = %g from node %d\n", nrnmpi_myid, mt.host_, 2*j, tbuf[2*j], 2*j+1, tbuf[2*j+1], mt.nodeindex_[j]); } for (j = 0; j < mt.nnode_rt_; ++j) { int jj = 2*mt.nnode_ + j; printf("%d send to %d offdiag tbuf[%d] = %g\n", nrnmpi_myid, mt.host_, jj, tbuf[jj]); } //} #endif } // send long backbone info (long->short, long->long) for (i=0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; tbuf = tsendbuf_ + mt.displ_; nrnmpi_send_doubles(tbuf, mt.size_, mt.host_, mt.tag_); #if 0 printf("%d post send %d displ=%d size=%d host=%d tag=%d\n", nrnmpi_myid, i, mt.displ_, mt.size_, mt.host_, mt.tag_); #endif } #if 0 for (i=ihost_reduced_long_; i < nthost_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; printf("%d will send result to %d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.size_, mt.tag_); } #endif // handle the reduced trees and short backbones // wait for receives from the long backbones needed by reduced tree // and short backbones to complete (reduced <- long, short <- long) for (i=ihost_reduced_long_; i < nthost_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; #if 0 printf("%d wait one %d\n", nrnmpi_myid, mt.host_); #endif nrnmpi_wait(&mt.request_); #if 0 printf("%d receive from %d nnode=%d nnode_rt=%d size=%d tag=%d displ=%d\n", nrnmpi_myid, mt.host_, mt.nnode_, mt.nnode_rt_, mt.size_, mt.tag_, mt.displ_); //for (j=0; j < mt.size_; ++j) { printf("%d receive tbuf[%d]=%g\n", nrnmpi_myid, j, trecvbuf_[mt.displ_ + j]);} #endif } #if 0 for (i=0; i < tbsize_; ++i) { printf("%d trecvbuf[%d] = %g\n", nrnmpi_myid, i, trecvbuf_[i]);} #endif // measure reducedtree,short backbone computation time rttime = nrnmpi_wtime(); #endif //EXCHANGE_ON // remember V may be encoded in D for (i = 0; i < nrtree_; ++i) { rtree_[i]->nocap(); } #if EXCHANGE_ON // replace in matrix // for zero area nodes, D is 1.0 and RHS is V from zero area node. // for non-zero area nodes, they are sum from zero area. for (i=ihost_short_long_; i < nthost_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; j = 0; tbuf = trecvbuf_ + mt.displ_; for (jj = 0; jj < mt.nnode_; ++jj) { k = mt.nodeindex_[jj]; _nt = nrn_threads + mt.nodeindex_th_[jj]; D(k) = tbuf[j++]; RHS(k) = tbuf[j++]; } #if 0 for (j = 0; j < mt.nnode_; ++j) { printf("%d received from %d tbuf[%d] = %g tbuf[%d] = %g added to node %d\n", nrnmpi_myid, mt.host_, 2*j, tbuf[2*j], 2*j+1, tbuf[2*j+1], mt.nodeindex_[j]); } #endif } // measure reducedtree,short backbone computation time nrnmpi_rtcomp_time_ += nrnmpi_wtime() - rttime; // send reduced and short backbone info (reduced -> long, short -> long) for (i=ihost_reduced_long_; i < nthost_; ++i) { int tag; MultiSplitTransferInfo& mt = msti_[i]; tbuf = tsendbuf_ + mt.displ_; //printf("%d send result to %d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.size_, mt.tag_); tag = mt.tag_; // sending result from reduced tree means tag is 4 if (tag == 3) { tag = 4; } nrnmpi_send_doubles(tbuf, mt.size_, mt.host_, tag); // only moderately wasteful (50%) in sending back irrelevant // off diag info. Required is only 2*mt.nnode_. But these // messages are pretty short, anyway. } // handle the long backbones // wait for all remaining receives to complete // long <- short, long <- long, long <- reduced for (i=0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; #if 0 printf("%d wait two %d\n", nrnmpi_myid, mt.host_); #endif nrnmpi_wait(&mt.request_); #if 0 printf("%d receive from %d nnode=%d nnode_rt=%d size=%d tag=%d\n", nrnmpi_myid, mt.host_, mt.nnode_, mt.nnode_rt_, mt.size_, mt.tag_); #endif } // replace in matrix // for zero area nodes, D is 1.0 and RHS is V from zero area node. // for non-zero area nodes, they are sum from zero area. for (i = 0; i < ihost_reduced_long_; ++i) { MultiSplitTransferInfo& mt = msti_[i]; j = 0; tbuf = trecvbuf_ + mt.displ_; for (jj = 0; jj < mt.nnode_; ++jj) { k = mt.nodeindex_[jj]; _nt = nrn_threads + mt.nodeindex_th_[jj]; D(k) = tbuf[j++]; RHS(k) = tbuf[j++]; } #if 0 if (nrnmpi_myid == 4) { for (j = 0; j < mt.nnode_; ++j) { printf("%d received from %d tbuf[%d] = %g tbuf[%d] = %g added to node %d\n", nrnmpi_myid, mt.host_, 2*j, tbuf[2*j], 2*j+1, tbuf[2*j+1], mt.nodeindex_[j]); } } #endif } #endif //EXCHANGE_ON #if PARANEURON nrnmpi_splitcell_wait_ += nrnmpi_wtime() - wt; #endif errno = 0; } ReducedTree::ReducedTree(MultiSplitControl* ms, int rank, int mapsize) { //printf("ReducedTree::ReducedTree(%d, %d)\n", rank, mapsize); int i; msc = ms; n = rank; assert(n > 0); assert(mapsize > 0); ip = new int[n]; rhs = new double[4*n]; d = rhs + n; a = d + n; b = a + n; n2 = 2*n; n4 = 4*n; nmap = mapsize; smap = new double*[nmap]; rmap = new double*[nmap]; ismap = new int[nmap]; irmap = new int[nmap]; nzindex = new int[n]; rmap2smap_index = new int[nmap]; v = new double[n]; s2rt = 0; nsmap = 0; irfill = 0; for (i = 0; i < nmap; ++i) { smap[i] = 0; ismap[i] = -1; rmap[i] = 0; irmap[i] = -1; rmap2smap_index[i] = -1; } } ReducedTree::~ReducedTree() { int i; delete [] ip; delete [] rhs; delete [] smap; delete [] ismap; delete [] rmap; delete [] irmap; delete [] nzindex; delete [] v; delete [] rmap2smap_index; if (s2rt) { delete s2rt; } } void ReducedTree::nocap() { // remember that info from zero area nodes is D=d and RHS=rhs // and from non-zero area is D=1e50 and RHS=v*1e50 // on return, the info for zero area if no nonzero should be // D=sum d and RHS=sum rhs // the info for zero area if nonzero should be D=1.0 and RHS=v // and the info for nonzero should be D=sum d and RHS=sum rhs. int i; for (i=0; i < n; ++i) { rhs[i] = 0.0; d[i] = 0.0; nzindex[i] = -1; } // not supposed to add when D=1e50. Note that order in rmap is // rhs followed by d for (i=0; i < nmap; i+=2) { int j = irmap[i]; // reduced matrix row index for rhs if (*rmap[i+1] == 1e50) { v[j] = *rmap[i] * 1e-50; nzindex[j] = rmap2smap_index[i]; }else{ rhs[j] += *rmap[i]; d[j] += *rmap[i+1]; } } #if 0 for (i=0; i < n; ++i) { printf("%d ReducedTree %2d %12.5g %12.5g %d %12.5g\n", nrnmpi_myid, i, d[i], rhs[i], nzindex[i], v[i]); } #endif for (i=0; i < nsmap; i += 2) { int j = ismap[i]; // reduced matrix matrix row index for rhs if (nzindex[j] == -1 || i == nzindex[j]) { // for the non-zero area nodes and zero area nodes // when no non-zero area node involved *smap[i] = rhs[j]; *smap[i+1] = d[j]; }else{ // for the zero area nodes *smap[i] = v[j]; *smap[i+1] = 1.0; } } } void ReducedTree::solve() { int i; double p; gather(); #if 0 for (i=0; i < n; ++i) { printf("%d ReducedTree %2d %12.5g %12.5g %2d %12.5g %12.5g\n", nrnmpi_myid, i, b[i], d[i], ip[i], ip[i] >= 0?a[i]:0., rhs[i]); } #endif // triangularization for (i = n - 1; i > 0; --i) { p = a[i]/d[i]; d[ip[i]] -= p*b[i]; rhs[ip[i]] -= p*rhs[i]; } // back substitution rhs[0] /= d[0]; for (i = 1; i < n; ++i) { rhs[i] -= b[i]*rhs[ip[i]]; rhs[i] /= d[i]; } #if 0 for (i=0; i < n; ++i) { printf("%d Result %2d %12.5g\n", nrnmpi_myid, i, rhs[i]); } #endif scatter(); } void ReducedTree::gather() { int i; for (i=0; i < n4; ++i) { rhs[i] = 0.0; } for (i=0; i < nmap; ++i) { rhs[irmap[i]] += *rmap[i]; } #if 0 for (i=0; i < nmap; ++i){ printf("%d %p gather i=%d ie=%d %g\n", nrnmpi_myid, this, i, irmap[i], *rmap[i]); } #endif } void ReducedTree::scatter() { int i; // scatter the result for this host // fill the send buffer for other hosts #if 0 for (i=0; i < nsmap; i += 2) { printf("%d enter scatter %d %p %g %p %g\n", nrnmpi_myid, i, smap[i], *smap[i], smap[i+1], *smap[i+1]); } #endif //printf("nsmap=%d\n", nsmap); for (i=0; i < nsmap; i += 2) { //printf("i=%d ismap[i]=%d\n", i, ismap[i]); *smap[i] = 1e30*rhs[ismap[i]]; *smap[i+1] = 1e30; } #if 0 for (i=0; i < nsmap; i += 2) if (i > 10){ printf("%d leave scatter %d %p %g %p %g\n", nrnmpi_myid, i, smap[i], *smap[i], smap[i+1], *smap[i+1]); } #endif } void ReducedTree::pr_map(int tsize, double* trbuf) { int i; printf(" rmap\n"); for (i=0; i < nmap; ++i) { for (int it=0; it < nrn_nthread; ++it) { NrnThread* nt = nrn_threads + it; MultiSplitThread& t = msc_->mth_[it]; int nb = t.backbone_end - t.backbone_begin; if (rmap[i] >= trbuf && rmap[i] < (trbuf + tsize)) { printf(" %2d rhs[%2d] += tbuf[%ld]\n", i, irmap[i], rmap[i]-trbuf); } if (rmap[i] >= nt->_actual_rhs && rmap[i] < (nt->_actual_rhs + nt->end)) { Node* nd = nt->_v_node[rmap[i] - nt->_actual_rhs]; printf(" %2d rhs[%2d] rhs[%d] += rhs[%ld] \t%s{%d}\n", i, irmap[i], irmap[i], rmap[i] - nt->_actual_rhs, secname(nd->sec), nd->sec_node_index_); } if (rmap[i] >= nt->_actual_d && rmap[i] < (nt->_actual_d + nt->end)) { printf(" %2d rhs[%2d] d[%d] += d[%ld]\n", i, irmap[i], irmap[i] - n, rmap[i] - nt->_actual_d); } if (rmap[i] >= t.sid1A && rmap[i] < (t.sid1A + nb)) { printf(" %2d rhs[%2d] a[%d] += sid1A[%ld]", i, irmap[i], irmap[i] - 2*n, rmap[i]-t.sid1A); int j = (rmap[i] - t.sid1A) + t.backbone_begin; Node* nd = nt->_v_node[j]; printf(" \tA(%d) %s{%d}", j, secname(nd->sec), nd->sec_node_index_); printf("\n"); } if (rmap[i] >= t.sid1B && rmap[i] < (t.sid1B + nb)) { printf(" %2d rhs[%2d] b[%d] += sid1B[%ld]", i, irmap[i], irmap[i] - 3*n, rmap[i]-t.sid1B); int j = (rmap[i] - t.sid1B) + t.backbone_begin; Node* nd = nt->_v_node[j]; printf("\tB(%d) %s{%d}", j, secname(nd->sec), nd->sec_node_index_); printf("\n"); } } } } void ReducedTree::reorder(int j, int nt, int* mark, int* allbbr, int* allsid) { // specify ip and modify s2rt so they have tree order consistency // there should be n-1 edges, so if (n == 1) { ip[0] = -1; return; } int* e1 = new int[n-1]; int* e2 = new int[n-1]; int* order = new int[n]; int* sid = new int[n]; int singlesid = -1; int i; for (i=0; i < n; ++i) { order[i] = -1; } // fill in the edges. int ne = n - 1; int ie = 0; for (i = 0; i < nt; ++i) { if (mark[i] == j && allbbr[i] == 2) { singlesid = allsid[i]; } if (mark[i] == j && allbbr[i] > 2 && allsid[i] < allbbr[i]-3) { //printf("i=%d ie=%d ne=%d mark=%d allsid=%d allbbr=%d\n", i, ie, ne, mark[i], allsid[i], allbbr[i]-3); assert(ie < ne); assert(s2rt->find(allsid[i], e1[ie])); sid[e1[ie]]= allsid[i]; assert(s2rt->find(allbbr[i]-3, e2[ie])); sid[e2[ie]] = allbbr[i]-3; ++ie; } } assert(ie == ne); if (ne == 0) { assert(singlesid >= 0); sid[0] = singlesid; } // order the elements starting at 0 // also fill in the ip vector // should replace by a O(n) or at worst a O(nlogn) algorithm ip[0] = -1; order[0] = 0; int ordered = 1; while (ordered < n) { int old = ordered; for (i=0; i < ne; ++i) { if (e1[i] >= 0) { if (order[e1[i]] >= 0) { assert(order[e2[i]] == -1); ip[ordered] = order[e1[i]]; order[e2[i]] = ordered++; e1[i] = -1; // edge handled e2[i] = -1; }else if (order[e2[i]] >= 0) { assert(order[e1[i]] == -1); ip[ordered] = order[e2[i]]; order[e1[i]] = ordered++; e1[i] = -1; // edge handled e2[i] = -1; } } } assert(ordered > old); // if tree then accomplished something } // reset the s2rt ranks for the sids for (i=0; i < n; ++i) { (*s2rt)[sid[i]] = order[i]; } #if 0 printf("%d ReducedTree n=%d nmap=%d\n", nrnmpi_myid, n, nmap); for (i=0; i < n; ++i) { printf("%d i=%d sid=%d sid2i=%d\n", nrnmpi_myid, i, sid[i], (*s2rt)[sid[i]]); } for (i=0; i < n; ++i) { printf("%d i=%d ip=%d\n", nrnmpi_myid, i, ip[i]); } #endif delete [] e1; delete [] e2; delete [] order; delete [] sid; } void ReducedTree::fillrmap(int sid1, int sid2, double* pd) { int i, j; assert(s2rt->find(sid1, i)); // type order is RHS, D, A, B if (sid2 < 0) { // RHS j = i; }else if (sid2 == sid1) { // D j = i + n; }else{ // A or B? assert(s2rt->find(sid2, j)); if (ip[i] == j) { // A j = i + 2*n; }else if (ip[j] == i) { // B j = j + 3*n; }else{ assert(0); } } // in most cases we could have done RHS and D together since they // are adjacent in the receive buffer. However they are not adjacent // for the sids on this machine. //printf("%d fillrmap sid1=%d sid2=%d i=%d j=%d irfill=%d\n", nrnmpi_myid, sid1, sid2, i, j, irfill); irmap[irfill] = j; rmap[irfill] = pd; rmap2smap_index[irfill] = nsmap; irfill += 1; } void ReducedTree::fillsmap(int sid, double* prhs, double* pd) { int i; assert(s2rt->find(sid, i)); //printf("%d fillsmap sid=%d i=%d nsmap=%d\n", nrnmpi_myid, sid, i, nsmap); ismap[nsmap] = i; smap[nsmap] = prhs; ismap[nsmap+1] = i; smap[nsmap+1] = pd; nsmap += 2; } // triangularize all subtrees, results in a backbone tri-diagonal void MultiSplitThread::triang_subtree2backbone(NrnThread* _nt) { int i, ip; double p; // eliminate a of the subtrees for (i=i3 - 1; i >= backbone_end; --i) { ip = _nt->_v_parent_index[i]; p = A(i) / D(i); D(ip) -= p * B(i); RHS(ip) -= p * RHS(i); } #if 0 printf("end of triang_subtree2backbone\n"); for (i=i1; i < backbone_end; ++i) { printf("i=%d D=%g RHS=%g\n", i, D(i), RHS(i)); } #endif } //backbone starts as tridiagonal, ends up in form of N. void MultiSplitThread::triang_backbone(NrnThread* _nt) { int i, j, ip, jp; double p; // begin the backbone triangularization. This eliminates a and fills in // sid1A column. Begin with pivot equation adjacent to sid1. for (i=backbone_sid1_begin; i < backbone_end; ++i) { // what is the equation index for A(i) j = _nt->_v_parent_index[i] - backbone_begin; S1A(j) = A(i); } for (i = backbone_sid1_begin-1; i >= backbone_interior_begin; --i) { ip = _nt->_v_parent_index[i]; j = i - backbone_begin; jp = ip - backbone_begin; p = A(i) / D(i); D(ip) -= p * B(i); RHS(ip) -= p * RHS(i); S1A(jp) = -p * S1A(j); //printf("iter i=%d ip=%d j=%d jp=%d D(ip)=%g RHS(ip)=%g S1A(ip)=%g\n", //i, ip, j, jp, D(ip), RHS(ip), S1A(jp)); } // complete the backbone triangularization to form the N shaped matrix // This eliminates b and fills in the sid1B column. Begin with // pivot equation adjacent to sid0 (the root) for (i = backbone_interior_begin; i < backbone_sid1_begin; ++i) { ip = _nt->_v_parent_index[i]; j = i - backbone_begin; if (ip < backbone_interior_begin) { S1B(j) = B(i); continue; } jp = ip - backbone_begin; p = B(i)/D(ip); RHS(i) -= p * RHS(ip); S1A(j) -= p * S1A(jp); S1B(j) = -p * S1B(jp); //printf("iter2 i=%d j=%d D(i)=%g RHS(i)=%g S1A(j)=%g S1B(j)=%g\n", //i, j, D(i), RHS(i), S1A(j), S1B(j)); } // exactly like above but S1A happens to be D for (i = backbone_sid1_begin; i < backbone_end; ++i) { ip = _nt->_v_parent_index[i]; j = i - backbone_begin; if (ip < backbone_interior_begin) { S1B(j) = B(i); continue; } jp = ip - backbone_begin; p = B(i)/D(ip); RHS(i) -= p * RHS(ip); D(i) -= p * S1A(jp); S1B(j) = -p * S1B(jp); //printf("iter3 i=%d j=%d D(i)=%g RHS(i)=%g S1B(j)=%g\n", //i, j, D(i), RHS(i), S1B(j)); } #if 0 printf("%d end of triang_backbone\n", nrnmpi_myid); for (i=i1; i < backbone_end; ++i) { printf("%d i=%d D=%g RHS=%g\n", nrnmpi_myid, i, D(i), RHS(i)); } #endif } // exchange of d and rhs of sids has taken place and we can solve for the // backbone nodes void MultiSplitThread::bksub_backbone(NrnThread* _nt) { int i, j, ip, ip1, ip2; double a, b, p, vsid1; // need to solve the 2x2 consisting of sid0 and sid1 points // this part has already been done for short backbones j = backbone_long_sid1_begin; //printf("%d, backbone %d %d %d %d %d %d\n", nrnmpi_myid, //backbone_begin, backbone_long_begin, backbone_interior_begin, //backbone_sid1_begin, backbone_long_sid1_begin, backbone_end); for (i=backbone_long_begin; i < backbone_interior_begin; ++i) { a = S1A(i - backbone_begin); b = S1B(j - backbone_begin); p = b/D(i); D(j) -= p * a; RHS(j) -= p * RHS(i); RHS(j) /= D(j); RHS(i) -= a * RHS(j); RHS(i) /= D(i); ++j; } // now sid0 and sid1 values give us the column values // do in two sweeps. Wish we could keep a single cell backbone // contiguous. // Do the S1A sweep on a per cell basis. for (i = backbone_sid1_begin; i < backbone_end; ++i) { vsid1 = RHS(i); for (j = _nt->_v_parent_index[i]; j >= backbone_interior_begin; j = _nt->_v_parent_index[j]) { RHS(j) -= S1A(j - backbone_begin) * vsid1; } } // For the S1B sweep we use sid0 root info for each interior node for (i = backbone_interior_begin; i < backbone_sid1_begin; ++i) { j = i - backbone_begin; RHS(i) -= S1B(j) * RHS(sid0i[j]); RHS(i) /= D(i); } #if 0 printf("%d end of bksub_backbone\n", nrnmpi_myid); for (i=i1; i < backbone_end; ++i) { printf("%d i=%d RHS=%g\n", nrnmpi_myid, i, RHS(i)); } #endif } void MultiSplitThread::bksub_short_backbone_part1(NrnThread* _nt) { int i, j; double a, b, p; // solve the 2x2 consisting of sid0 and sid1 points. j = backbone_sid1_begin; for (i=backbone_begin; i < backbone_long_begin; ++i) { a = S1A(i - backbone_begin); b = S1B(j - backbone_begin); #if 0 printf("%d part1 i=%d j=%d\n", nrnmpi_myid, i, j); printf("%d part1 d=%12.5g a=%12.5g rhs=%12.5g\n", nrnmpi_myid,D(i), a, RHS(i)); printf("%d part1 b=%12.5g d=%12.5g rhs=%12.5g\n", nrnmpi_myid, b, D(j), RHS(j)); #endif p = b/D(i); D(j) -= p * a; RHS(j) -= p * RHS(i); RHS(j) /= D(j); RHS(i) -= a * RHS(j); RHS(i) /= D(i); #if 0 printf("%d part1 result %12.5g %12.5g\n", nrnmpi_myid, RHS(i), RHS(j)); #endif ++j; } // Note that it no longer makes sense to add D and RHS // to the other machines since RHS is the solution itself // at the other machine corresponding points. In fact // we don't need to send D at all. Just replace the // RHS, skip that equation, and go on. But for // code uniformity and since skipping is more complex // it seems simpler to just setup the right equation // on the other machine. i.e. 1 * v = rhs } //solve the subtrees, rhs on the backbone is already solved void MultiSplitThread::bksub_subtrees(NrnThread* _nt) { int i, ip; // solve all rootnodes not part of a backbone for (i=i1; i < backbone_begin; ++i) { RHS(i) /= D(i); } // solve the subtrees for (i=backbone_end; i < i3; ++i) { ip = _nt->_v_parent_index[i]; RHS(i) -= B(i) * RHS(ip); RHS(i) /= D(i); } #if 0 printf("%d end of bksub_subtrees (just the backbone)\n", nrnmpi_myid); for (i=i1; i < backbone_end; ++i) { printf("%d i=%d RHS=%g\n", nrnmpi_myid, i, RHS(i)); } #endif } // fill the v_node, v_parent node vectors in the proper order and // determine backbone index values. See the NOTE above. The relevant order // is: // 1) all the roots of cells with 0 or 1 sid (no backbone involved) // 2) all the sid0 when there are two sids in a cell. 1) + 2) = rootnodecount // 3) the interior backbone nodes (does not include sid0 or sid1 nodes) // 4) all the sid1 nodes // 5) all remaining nodes // backbone_begin is the index for 2). // backbone_long_begin ; earlier are short backbones, later are long // backbone_interior_begin is one more than the last index for 2) // backbone_sid1_begin is the index for 4) // backbone_long_sid1_begin ; ealier are short, later are long // backbone_end is the index for 5. // We allow the single or pair sid nodes to be different from a rootnode. // Note: generally speaking, the first sid will probably always be // a classical root node. However, we do want to handle the case where // many branches connect to soma(0.5), so do the whole tree ordering // as the general case. void multisplit_v_setup() { msc_->v_setup(); } void MultiSplitControl::v_setup() { if (!classical_root_to_multisplit_) { return; } // the typical case is that this comes from the beginning of exchange_setup // through recalc_diam since exhange_setup needs the proper // thread nt->_v_node and ms->ithread. Hence anything that // changes the overall structure // requires a complete start over from the point prior to splitting. assert(use_cachevec); assert(!use_sparse13); int i; // first time through, nth_ = 0 if (nth_ == 0) { //printf("MultiSplitControl::v_setup due to multisplit()\n"); assert(mth_ == 0); nth_ = nrn_nthread; mth_ = new MultiSplitThread[nth_]; for (i=0; i < nrn_nthread; ++i) { mth_[i].v_setup(nrn_threads + i); } }else{ if (nth_ != nrn_nthread) { hoc_execerror("ParallelContext.nthread() was changed after ParallelContext.multisplit()",0); } // pointers have changed and need to reorder and update reduced tree maps //printf("MultiSplitControl::v_setup due to pointer change\n"); for (i=0; i < nrn_nthread; ++i) { mth_[i].v_setup(nrn_threads + i); } } } void MultiSplitThread::v_setup(NrnThread* nt) { // Precondition: // v_node and v_parent node vectors are in their classical tree order // and Node.v_node_index also is consistent with that. // calls to pc.multisplit() define the implicit connections // between splitcell // Postcondition: v_node and v_parent node vectors are in their multisplit // tree order. That info can be subsequently used to re-allocate // the actual v i1 = 0; i2 = i1 + nt->ncell; i3 = nt->end; int nnode = i3 - i1; MultiSplitTable* classical_root_to_multisplit_ = msc_->classical_root_to_multisplit_; MultiSplitList* multisplit_list_ = msc_->multisplit_list_; // node vs v_node relation is always with an i1 offset Node** node = new Node*[nnode]; Node** parent = new Node*[nnode]; Node* nd; int i, j, i0, ii, in, ip, nback, ib, ibl, ibs; int is0, is1, k0, k1, iss0, iss1, isl0, isl1; #if 0 printf("multisplit_v_setup %d\n", nnode); for (i=i1; i < i3; ++i) { assert(nt->_v_node[i]->v_node_index == i); assert(nt->_v_parent[i] == 0 || nt->_v_parent[i]->v_node_index < i); } #endif #if 0 printf("multisplit_v_setup %d\n", nnode); printf("\nclassical order\n"); for (i=i1; i < i3; ++i) { printf("%d %d %d %s %d\n", i, nt->_v_node[i]->v_node_index, nt->_v_parent[i] ? nt->_v_parent[i]->v_node_index : -1, secname(nt->v_node[i]->sec), nt->_v_node[i]->sec_node_index_); } #endif del_sidA(); // the first phase is to transform from the classical tree order // to a tree order where the sid0 are roots. In splitcell, this // was done at the hoc level (rerooting a tree involves reversing // the parent child relationship on the line between the old and // new roots). However at the hoc level it is only possible to // have split points at section boundaries and // that meant that soma(0.5) could not // be a root. We want to allow that. It is also much simpler // to deal with the backbone between sid0 and sid1 // if sid0 is already a root. // how many sid0 backbone (long and short) roots are there backbone_begin = i2; backbone_long_begin = backbone_begin; if (classical_root_to_multisplit_) { MultiSplit* ms; for (int ii=0; ii < multisplit_list_->count(); ++ii) { ms = multisplit_list_->item(ii); if (ms->nd[1]) { if (ms->nd[1]->_nt != nt) { continue; } --backbone_begin; if (ms->backbone_style != 1) { --backbone_long_begin; } if (ms->backbone_style == 2) { ++nbackrt_; } } } } backbone_interior_begin = i2; if (nbackrt_) { backsid_ = new int[nbackrt_]; backAindex_ = new int[nbackrt_]; backBindex_ = new int[nbackrt_]; } // reorder the trees so sid0 is the root, at least with respect to v_parent for (i = i1; i < i2; ++i) { Node* oldroot = nt->_v_node[i]; MultiSplit* ms; if (classical_root_to_multisplit_->find(oldroot, ms)) { nd = ms->nd[0]; if (nd == oldroot) { // the cell tree is fine // the way it is (the usual case) nt->_v_parent[nd->v_node_index] = 0; }else{ // need to reverse the parent/child relationship // on the path from nd to oldroot in = nd->v_node_index; nd = 0; while (in > i) { ip = nt->_v_parent[in]->v_node_index; nt->_v_parent[in] = nd; nd = nt->_v_node[in]; in = ip; } nt->_v_parent[in] = nd; } } } // Now the only problem is that assert(v_parent[i] < v_node[i]) // is false. But we can take care of that at the end. // the sid0 are now root nodes with respect to v_parent #if 0 printf("\nsid0 is a root\n"); for (i=i1; i < i3; ++i) { printf("%d %d %d %s %d\n", i, nt->_v_node[i]->v_node_index, nt->_v_parent[i] ? nt->_v_parent[i]->v_node_index : -1, secname(nt->_v_node[i]->sec), nt->_v_node[i]->sec_node_index_); } #endif // Index all the classical rootnodes and sid rootnodes // If the classical rootnode has only 1 sid, it // replaces it as a rootnode. If there are 2 the first sid node // gets shifted to the backbone_begin indices in the proper // short or long section. backbone_end = i2; ii = i1; ibl = backbone_long_begin; ibs = backbone_begin; for (i = i1; i < i2; ++i) { nd = nt->_v_node[i]; MultiSplit* ms; if (classical_root_to_multisplit_->find(nd, ms)) { if (ms->nd[1]) { ib = ms->backbone_style >= 1 ? ibs : ibl; node[ib-i1] = ms->nd[0]; parent[ib-i1] = 0; if (ms->backbone_style >= 1) {++ibs;} else {++ibl;} // here we can get a bit greedy and // start counting how many indices are // needed for the backbones // how many nodes between nd[0] and nd[1] // note that nd[0] IS a root. i0 = ms->nd[0]->v_node_index; int iii = ms->nd[1]->v_node_index; while(i0 != iii) { iii = nt->_v_parent[iii]->v_node_index; ++backbone_end; } }else{ node[ii-i1] = ms->nd[0]; parent[ii-i1] = 0; ++ii; } }else{ node[ii-i1] = nd; parent[ii-i1] = 0; ++ii; } } backbone_sid1_begin = backbone_end - (backbone_interior_begin - backbone_begin); backbone_long_sid1_begin = backbone_sid1_begin + (backbone_long_begin - backbone_begin); //printf("backbone begin=%d interior=%d sid1=%d end=%d\n", //backbone_begin, backbone_interior_begin, backbone_sid1_begin, backbone_end); #if 0 for (i=i1; i < backbone_interior_begin; ++i) { assert(parent[i-i1] == 0); } #endif nback = backbone_end - backbone_begin; if (nback) { sid0i = new int[nback]; sid1A = new double[nback]; sid1B = new double[nback]; for (i=0; i < nback; ++i) { sid1A[i] = sid1B[i] = 0.; sid0i[i] = -1; } } iss0 = backbone_begin; iss1 = backbone_sid1_begin; isl0 = backbone_long_begin; isl1 = backbone_long_sid1_begin; ib = backbone_sid1_begin; // order backbone_sid1_begin to backbone_begin (same order as // backbone_begin to backbone_interior) // again, short are before long // the backbone interior can be any order int ibrt = 0; for (i = i1; i < i2; ++i) { nd = nt->_v_node[i]; MultiSplit* ms; if (classical_root_to_multisplit_->find(nd, ms)) { ms->ithread = nt->id; if (ms->nd[1]) { if (ms->backbone_style >= 1) { is0 = iss0++; is1 = iss1++; }else{ is0 = isl0++; is1 = isl1++; } i0 = ms->nd[0]->v_node_index; ii = ms->nd[1]->v_node_index; node[is1-i1] = ms->nd[1]; parent[is1-i1] = nt->_v_parent[ii]; ii = nt->_v_parent[ii]->v_node_index; while(i0 != ii) { --ib; node[ib-i1] = nt->_v_node[ii]; parent[ib-i1] = nt->_v_parent[ii]; //printf("sid0i[%d] = %d\n", ib-backbone_begin, is0); sid0i[ib-backbone_begin] = is0; ii = nt->_v_parent[ii]->v_node_index; } if (ms->backbone_style == 2) { backsid_[ibrt] = ms->sid[0]; ms->back_index = ibrt; backAindex_[ibrt] = is0 - backbone_begin; backBindex_[ibrt] = is1 - backbone_begin; //printf("backAindex[%d] = %d sid=%d Bindex=%d\n", //ibrt, backAindex_[ibrt], backsid_[ibrt], backBindex_[ibrt]); ++ibrt; } } } } //printf("backbone order complete\n"); // most of the rest are already in tree order and have the correct // parents. They just need to be copied into node and parent // so that the parent index is alway < the node index // However, sid0 becoming root can cause many places where // parent_index > node_index and these need to be relocated for (i=i1; i < i3; ++i) { // can exploit this variable because it will be set later nt->_v_node[i]->eqn_index_ = -1; } for (i=i1; i < backbone_end; ++i) { #if 0 printf("backbone i=%d %d %s %d", i, node[i]->v_node_index, secname(node[i]->sec), node[i]->sec_node_index_); printf(" -> %s %d\n", parent[i]?secname(parent[i]->sec):"root", parent[i]?parent[i]->sec_node_index_:-1); #endif node[i-i1]->eqn_index_ = i; } // the rest are in order j = backbone_end; for (i = i1; i < i3; ++i) { k0 = 0; k1 = i; //printf("i=%d\n", i); while (nt->_v_node[k1]->eqn_index_ < 0) { //printf("counting i=%d k1=%d k0=%d\n", i, k1, k0); ++k0; if (!nt->_v_parent[k1]) { break; } k1 = nt->_v_parent[k1]->v_node_index; } //printf("i=%d k0=%d\n", i, k0); k1 = i; j += k0; k0 = j - 1; while(nt->_v_node[k1]->eqn_index_ < 0) { //printf("ordering i=%d k1=%d k0=%d parent=%p\n", i, k1, k0, nt->_v_parent[k1]); node[k0-i1] = nt->_v_node[k1]; parent[k0-i1] = nt->_v_parent[k1]; node[k0-i1]->eqn_index_ = k0; --k0; if (!nt->_v_parent[k1]) { break; } k1 = nt->_v_parent[k1]->v_node_index; } } for (i = i1; i < i3; ++i) { assert(i == node[i-i1]->eqn_index_); nt->_v_node[i] = node[i-i1]; nt->_v_parent[i] = parent[i-i1]; nt->_v_node[i]->v_node_index = i; } delete [] node; delete [] parent; #if 0 printf("\nmultisplit reordering\n"); printf("backbone begin=%d long=%d interior=%d sid1=%d long=%d end=%d\n", backbone_begin, backbone_long_begin, backbone_interior_begin, backbone_sid1_begin, backbone_long_sid1_begin, backbone_end); for (i=i1; i < i3; ++i) { printf("%d %d %s %d ", nt->_v_node[i]->v_node_index, nt->_v_parent[i] ? nt->_v_parent[i]->v_node_index : -1, secname(nt->_v_node[i]->sec), nt->_v_node[i]->sec_node_index_); if (nt->_v_parent[i]) { printf(" -> %s %d\n", secname(nt->_v_parent[i]->sec), nt->_v_parent[i]->sec_node_index_); }else{ printf(" root\n"); } } #endif for (i=i1; i < i3; ++i) if (nt->_v_parent[i] && nt->_v_parent[i]->v_node_index >= i) { printf("i=%d parent=%d\n", i, nt->_v_parent[i]->v_node_index); } for (i=i1; i < i3; ++i) { assert(nt->_v_node[i]->v_node_index == i); assert(nt->_v_parent[i] == 0 || nt->_v_parent[i]->v_node_index < i); } // freeing sid1A... invalidated any offdiag_ pointers. for (i=0; i < msc_->nthost_; ++i) { MultiSplitTransferInfo& msti = msc_->msti_[i]; for (j = 0; j < msti.nnode_rt_; j += 2) { msti.offdiag_[j] = sid1A + msti.ioffdiag_[j]; msti.offdiag_[j+1] = sid1B + msti.ioffdiag_[j+1]; } } // sid1A, sid1B pointers in reducedtree map will be updated by // rt_map_update along with d and rhs } void MultiSplitControl::pmat(bool full) { int it, i, ip, is; printf("\n"); for (it=0; it < nrn_nthread; ++it) { NrnThread* _nt = nrn_threads + it; MultiSplitThread& t = mth_[it]; for (i=0; i < _nt->end; ++i) { is = _nt->_v_node[i]->_classical_parent ? _nt->_v_node[i]->sec_node_index_ : -1; printf("%d %d %s %d", _nt->_v_node[i]->v_node_index, _nt->_v_parent[i] ? _nt->_v_parent[i]->v_node_index : -1, secname(_nt->_v_node[i]->sec), is); if (_nt->_v_parent[i]) { is = _nt->_v_parent[i]->_classical_parent ? _nt->_v_parent[i]->sec_node_index_ : -1; printf(" -> %s %d", secname(_nt->_v_parent[i]->sec), is); printf("\t %10.5g %10.5g", NODEB(_nt->_v_node[i]), NODEA(_nt->_v_node[i])); }else{ printf(" root\t\t %10.5g %10.5g", 0., 0.); } if (full) { printf(" %10.5g %10.5g", NODED(_nt->_v_node[i]), NODERHS(_nt->_v_node[i])); if (t.sid0i && i >= t.backbone_begin && i < t.backbone_end) { printf(" %10.5g %10.5g", t.S1B(i-t.backbone_begin), t.S1A(i-t.backbone_begin)); } } printf("\n"); } } } void MultiSplitControl::pmatf(bool full) { int it, i, ip, is; FILE* f; char fname[100]; sprintf(fname, "pmat.%04d", nrnmpi_myid); f = fopen(fname, "w"); for (it=0; it < nrn_nthread; ++it) { NrnThread* _nt = nrn_threads + it; MultiSplitThread& t = mth_[it]; fprintf(f, "%d %d\n", it, _nt->end); for (i=0; i < _nt->end; ++i) { is = _nt->_v_node[i]->_classical_parent ? _nt->_v_node[i]->sec_node_index_ : -1; fprintf(f,"%d %d %s %d", _nt->_v_node[i]->v_node_index, _nt->_v_parent[i] ? _nt->_v_parent[i]->v_node_index : -1, secname(_nt->_v_node[i]->sec), is); if (_nt->_v_parent[i]) { is = _nt->_v_parent[i]->_classical_parent ? _nt->_v_parent[i]->sec_node_index_ : -1; fprintf(f, " -> %s %d", secname(_nt->_v_parent[i]->sec), is); fprintf(f, "\t %10.5g %10.5g", NODEB(_nt->_v_node[i]), NODEA(_nt->_v_node[i])); }else{ fprintf(f, " root\t\t %10.5g %10.5g", 0., 0.); } if (full) { fprintf(f, " %10.5g %10.5g", NODED(_nt->_v_node[i]), NODERHS(_nt->_v_node[i])); if (t.sid0i && i >= t.backbone_begin && i < t.backbone_end) { fprintf(f, " %10.5g %10.5g", t.S1B(i-t.backbone_begin), t.S1A(i-t.backbone_begin)); } } fprintf(f, "\n"); } } fclose(f); } void MultiSplitControl::pmat1(const char* s) { int it; double a, b, d, rhs; MultiSplit* ms; for (it=0; it < nrn_nthread; ++it) { NrnThread* _nt = nrn_threads + it; MultiSplitThread& t = mth_[it]; int i1 = 0; int i3 = _nt->end; for (int ii=0; ii < multisplit_list_->count(); ++ii) { ms = multisplit_list_->item(ii); int i = ms->nd[0]->v_node_index; if (i < i1 || i >= i3) { continue; } d = D(i); rhs = RHS(i); a = b = 0.; if (ms->nd[1]) { a = mth_[it].S1A(0); } printf("%2d %s sid=%d %12.5g %12.5g %12.5g %12.5g\n", nrnmpi_myid, s, ms->sid[0], b, d, a, rhs); if (ms->nd[1]) { d = D(ms->nd[1]->v_node_index); rhs = RHS(ms->nd[1]->v_node_index); a = 0.; b = t.S1B(t.backbone_sid1_begin - t.backbone_begin); printf("%2d %s sid=%d %12.5g %12.5g %12.5g %12.5g\n", nrnmpi_myid, s, ms->sid[1], b, d, a, rhs); } } } } double* nrn_classicalNodeA(Node* nd) { int i = nd->v_node_index; Node* pnd = nd->_classical_parent; NrnThread* _nt = nd->_nt; if (_nt->_v_parent[i] == pnd) { return &NODEA(nd); } else if (pnd == 0) { return 0; } else if (_nt->_v_parent[pnd->v_node_index] == nd) { return &NODEB(pnd); } else { assert(0); } return 0; } double* nrn_classicalNodeB(Node* nd) { int i = nd->v_node_index; Node* pnd = nd->_classical_parent; NrnThread* _nt = nd->_nt; if (_nt->_v_parent[i] == pnd) { return &NODEB(nd); } else if (pnd == 0) { return 0; } else if (_nt->_v_parent[pnd->v_node_index] == nd) { return &NODEA(pnd); } else { assert(0); } return 0; } neuron-7.5/src/nrniv/multisplitcontrol.h000066400000000000000000000051551323325274500206120ustar00rootroot00000000000000#ifndef multisplitcontrol_h #define multisplitcontrol_h class MultiSplitThread { public: MultiSplitThread(); virtual ~MultiSplitThread(); void del_sidA(); void triang(NrnThread*); void bksub(NrnThread*); void triang_subtree2backbone(NrnThread*); void triang_backbone(NrnThread*); void bksub_backbone(NrnThread*); void bksub_short_backbone_part1(NrnThread*); void bksub_subtrees(NrnThread*); void v_setup(NrnThread*); double *sid1A, *sid1B; // to be filled in sid1 and sid0 columns int* sid0i; // interior node to sid0 index. parallel to sid1B // for mapping sid1A... to transfer buffer when ReducedTree not on this machine int nbackrt_; // number of backbones that send info to ReducedTree int* backsid_; // sid0 int* backAindex_; // sid1A index for sid0 int* backBindex_; // sid1B index for sid1 int backbone_begin, backbone_long_begin, backbone_interior_begin; int backbone_sid1_begin, backbone_long_sid1_begin, backbone_end; int i1, i2, i3; }; class MultiSplitControl { public: MultiSplitControl(); virtual ~MultiSplitControl(); void multisplit_clear(); void multisplit_nocap_v(); void multisplit_nocap_v_part1(NrnThread*); void multisplit_nocap_v_part2(NrnThread*); void multisplit_nocap_v_part3(NrnThread*); void multisplit_adjust_rhs(NrnThread*); void prstruct(); void reduce_solve(); void multisplit(Section*, double, int, int); void solve(); void reduced_mark(int, int, int, int*, int*, int*); void matrix_exchange(); void matrix_exchange_nocap(); void v_setup(); void exchange_setup(); void rt_map_update(); void del_msti(); void pmat(bool full = false); void pmatf(bool full = false); void pmat1(const char*); void pexch(); int narea2buf_, narea2rt_; Area2Buf* area2buf_; Area2RT* area2rt_; int nthost_; // number of distinct hosts that need send-receive int ihost_reduced_long_, ihost_short_long_; // indices for groups MultiSplitTransferInfo* msti_; // will be nthost_ of them int tbsize; int ndbsize; double* trecvbuf_; //enough buffer for all receives double* tsendbuf_; // enough for all send int* nodeindex_buffer_; // nodeindex_ points into here int* nodeindex_buffer_th_; // thread for above int* nodeindex_rthost_; // ReducedTree machine that gets this node info. Normally -1. int narea_; // number of transfer nodes that need area adjustment int iarea_short_long_;// different ones get adjusted at different times int* buf_area_indices_; int* area_node_indices_; int nrtree_; ReducedTree** rtree_; MultiSplitTable* classical_root_to_multisplit_; MultiSplitList* multisplit_list_; // NrnHashIterate is not in insertion order int nth_; MultiSplitThread* mth_; }; #endif neuron-7.5/src/nrniv/ndatclas.cpp000066400000000000000000000143121323325274500171220ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "nrnoc2iv.h" #include "classreg.h" extern "C" { #include "membfunc.h" #include "parse.h" } extern "C" { extern Prop* prop_alloc(Prop**, int, Node*); extern void single_prop_free(Prop*); extern Symlist* hoc_built_in_symlist; extern Symlist* hoc_top_level_symlist; } //---------------------------------------------------- /* static */ class NrnPropertyImpl { friend class NrnProperty; NrnPropertyImpl(Prop*); ~NrnPropertyImpl(); Prop* p_; int iterator_; Symbol* sym_; bool del_; }; NrnPropertyImpl::NrnPropertyImpl(Prop* p) { p_ = p; iterator_ = -1; sym_ = memb_func[p_->type].sym; del_ = false; } NrnPropertyImpl::~NrnPropertyImpl() { if (del_ && p_) { //printf("NrnProperty freed prop\n"); single_prop_free(p_); } } //--------------------------------------------------- /* static */ class SectionListImpl { friend class SectionList; Object* ob_; struct hoc_Item* itr_; struct hoc_Item* list_; }; //---------------------------------------------------- #if 0 /* static */ class NrnSectionImpl { friend NrnSection NrnSectionImpl(Section*); ~NrnSectionImpl(); Section* sec_; }; NrnSectionImpl::NrnSectionImpl(Section* sec) { sec_ = sec; section_ref(sec); } NrnSectionImpl::~NrnSectionImpl() { section_unref(sec_); } #endif //---------------------------------------------------- NrnProperty::NrnProperty(Prop* p) { npi_ = new NrnPropertyImpl(p); } NrnProperty::NrnProperty(const char* name) { Symbol* sym = hoc_table_lookup(name, hoc_built_in_symlist); if (!sym) { sym = hoc_table_lookup(name, hoc_top_level_symlist); } if(sym) { if (sym->type == MECHANISM) { /*EMPTY*/ }else if (sym->type == TEMPLATE && sym->u.ctemplate->is_point_){ sym = hoc_table_lookup(name, sym->u.ctemplate->symtable); }else{ sym = 0; } } if (sym) { Prop* p, *p0 = 0, *p1; //printf("prop_alloc %s %p type=%d\n", sym->name, sym, sym->subtype); // need to do this with no args hoc_push_frame(sym, 0); p = prop_alloc(&p0, sym->subtype, NULL); hoc_pop_frame(); for (; p0 != p; p0 = p1) { p1 = p0->next; single_prop_free(p0); } npi_ = new NrnPropertyImpl(p); npi_->del_ = true; }else{ npi_ = NULL; hoc_execerror(name, "is not a Mechanism or Point Process"); } } NrnProperty::~NrnProperty(){ delete npi_; } bool NrnProperty::deleteable() { return npi_->del_; } const char* NrnProperty::name() const { return npi_->sym_->name; } bool NrnProperty::is_point() const { return memb_func[npi_->p_->type].is_point; } int NrnProperty::type() const { return npi_->p_->type; } Prop* NrnProperty::prop() const { return npi_->p_; } Symbol* NrnProperty::first_var() { npi_->iterator_ = -1; return next_var(); } bool NrnProperty::more_var() { if (npi_->iterator_ >= npi_->sym_->s_varn) { return false; }else{ return true; } } Symbol* NrnProperty::next_var() { ++npi_->iterator_; if (more_var()) { return npi_->sym_->u.ppsym[npi_->iterator_]; }else{ return 0; } } Symbol* NrnProperty::var(int i) { return npi_->sym_->u.ppsym[i]; } int NrnProperty::var_type(Symbol* sym) const{ return nrn_vartype(sym); } bool NrnProperty::assign(Prop* src, Prop* dest, int vartype) { int n; assert(vartype != NRNPOINTER); if (src && dest && src != dest && src->type == dest->type) { if (src->ob) { Symbol* msym = memb_func[src->type].sym; int i, j, jmax, cnt = msym->s_varn; for (i=0; i < cnt; ++i) { Symbol* sym = msym->u.ppsym[i]; if (vartype == 0 || nrn_vartype(sym) == vartype) { jmax = hoc_total_array_data(sym, 0); n = sym->u.rng.index; double* x, *y; y = dest->ob->u.dataspace[n].pval; x = src->ob->u.dataspace[n].pval; for (j=0; j < jmax; ++j) { y[j] = x[j]; } } } }else{ if (vartype == 0) { n = src->param_size; for (int i=0; i < n; ++i) { dest->param[i] = src->param[i]; } }else{ Symbol* msym = memb_func[src->type].sym; int i, j, jmax, cnt = msym->s_varn; for (i=0; i < cnt; ++i) { Symbol* sym = msym->u.ppsym[i]; if (nrn_vartype(sym) == vartype) { jmax = hoc_total_array_data(sym, 0); n = sym->u.rng.index; for (j=0; j < jmax; ++j) { dest->param[n+j] = src->param[n+j]; } } } } } return true; }else{ return false; } } Symbol* NrnProperty::find(const char* name) { Symbol* sym; int i, cnt; cnt = npi_->sym_->s_varn; for (i=0; i < cnt; ++i) { sym = npi_->sym_->u.ppsym[i]; if (strcmp(sym->name, name) == 0) { return sym; } } return 0; } int NrnProperty::prop_index(const Symbol* s)const { assert(s); if (s->type != RANGEVAR) { hoc_execerror(s->name , "not a range variable"); } return s->u.rng.index; } double* NrnProperty::prop_pval(const Symbol* s, int index)const { if (npi_->p_->ob) { return npi_->p_->ob->u.dataspace[prop_index(s)].pval + index; }else{ if (s->subtype == NRNPOINTER) { return npi_->p_->dparam[prop_index(s) + index].pval; }else{ return npi_->p_->param + prop_index(s) + index; } } } //-------------------------------------------------- SectionList::SectionList(Object* ob) { sli_ = new SectionListImpl(); check_obj_type(ob, "SectionList"); sli_->ob_ = ob; ++ob->refcount; sli_->list_ = (struct hoc_Item*) ob->u.this_pointer; sli_->itr_ = sli_->list_; } SectionList::~SectionList() { hoc_dec_refcount(&sli_->ob_); delete sli_; } Section* SectionList::begin() { sli_->itr_ = sli_->list_->next; return next(); } Section* SectionList::next() { Section* sec; if (sli_->itr_ == sli_->list_) { sec = NULL; }else{ sec = hocSEC(sli_->itr_); sli_->itr_ = sli_->itr_->next; } return sec; } #if 0 //--------------------------------------------------- NrnSection::NrnSection(Section* sec) { npi_ = new NrnSectionImpl(sec); } NrnSection::~NrnSection() { delete npi_; } void NrnSection::section(Section* sec) { section_ref(sec); section_unref(npi_->sec_); npi_->sec_ = sec; } Section* NrnSection::section() { return npi_->sec_; } Node* NrnSection::node(int inode) { return sec_->pnode[inode]; } bool NrnSection::is_mechanism(type) { return nrn_mechanism(type, node(0)) != (Prop*)0 } double* NrnSection::var_pointer(const char* var) { nrn_pushsec(nsi_->sec_); double* pval = hoc_val_pointer(var); nrn_popsec(); return pval; } #endif neuron-7.5/src/nrniv/ndatclas.h000066400000000000000000000023751323325274500165750ustar00rootroot00000000000000#ifndef nrn_dataclass_h #define nrn_dataclass_h #include class NrnPropertyImpl; class SectionListImpl; class NrnNodeImpl; class NrnProperty { public: NrnProperty(Prop*); NrnProperty(const char*); virtual ~NrnProperty(); const char* name() const; int type() const; bool is_point() const; bool deleteable(); Symbol* first_var(); bool more_var(); Symbol* next_var(); Symbol* find(const char* rangevar); Symbol* var(int); int prop_index(const Symbol*)const; double* prop_pval(const Symbol*, int arrayindex=0)const; Prop* prop() const; int var_type(Symbol*) const; //vartype=0, 1, 2, 3 means all, PARAMETER, ASSIGNED, STATE static bool assign(Prop* src, Prop* dest, int vartype=0); private: NrnPropertyImpl* npi_; }; class SectionList : public Resource { public: SectionList(Object*); virtual ~SectionList(); Section* begin(); Section* next(); private: SectionListImpl* sli_; }; #if 0 class NrnSection { public: NrnSection(Section* sec); virtual ~NrnSection(); void section(Section*); Section* section(); Node* node(int index); bool is_mechanism(int type); double* var_pointer(Symbol*, int index=0, int inode=0); double* var_pointer(const char*); // eg. ca_cadifus[2](.7) private: NrnNodeImpl* nni_; }; #endif #endif neuron-7.5/src/nrniv/netcvode.cpp000077500000000000000000000002561323325274500171450ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/netcvode.cpp" neuron-7.5/src/nrniv/netpar.cpp000066400000000000000000001201001323325274500166130ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include #define ALTHASH 1 #if ALTHASH #include #else #include #endif #include #undef MD #define MD 2147483648. class PreSyn; // hash table where buckets are binary search maps declareNrnHash(Gid2PreSyn, int, PreSyn*) implementNrnHash(Gid2PreSyn, int, PreSyn*) #include #include #include #include #define BGP_INTERVAL 2 #if BGP_INTERVAL == 2 static int n_bgp_interval; #endif static Symbol* netcon_sym_; static Gid2PreSyn* gid2out_; static Gid2PreSyn* gid2in_; static double t_exchange_; static double dt1_; // 1/dt static void alloc_space(); extern "C" { extern NetCvode* net_cvode_instance; extern double t, dt; extern int cvode_active_; extern Point_process* ob2pntproc(Object*); extern int nrn_use_selfqueue_; extern void nrn_pending_selfqueue(double, NrnThread*); extern int vector_capacity(IvocVect*); //ivocvect.h conflicts with STL extern double* vector_vec(IvocVect*); extern Object* nrn_sec2cell(Section*); extern void ncs2nrn_integrate(double tstop); extern void nrn_fake_fire(int gid, double firetime, int fake_out); int nrnmpi_spike_compress(int nspike, bool gid_compress, int xchng_meth); void nrn_cleanup_presyn(PreSyn*); int nrn_set_timeout(int); void nrnmpi_gid_clear(int); extern void nrn_partrans_clear(); void nrn_spike_exchange_init(); extern double nrn_bgp_receive_time(int); typedef void (*PFIO)(int, Object*); extern void nrn_gidout_iter(PFIO); extern Object* nrn_gid2obj(int); extern PreSyn* nrn_gid2presyn(int); extern int nrn_gid_exists(int); extern double nrnmpi_step_wait_; // barrier at beginning of spike exchange. // BGPDMA can be 0,1,2,3,6,7 // (BGPDMA & 1) > 0 means multisend ISend allowed // (BGPDMA & 2) > 0 means multisend Blue Gene/P DMA allowed // (BGPDMA & 4) > 0 means multisend Blue Gene/P DMA Record Replay allowed #if !defined(BGPDMA) #define BGPDMA 0 #endif #if BGPDMA == 0 double nrn_bgp_receive_time(int) { return 0.; } #endif #if PARANEURON extern void nrnmpi_split_clear(); #endif extern void nrnmpi_multisplit_clear(); } static double set_mindelay(double maxdelay); #if NRNMPI #include "../nrnmpi/mpispike.h" extern "C" { void nrn_timeout(int); void nrn_spike_exchange(NrnThread*); extern int nrnmpi_int_allmax(int); extern void nrnmpi_int_allgather(int*, int*, int); void nrn2ncs_outputevent(int netcon_output_index, double firetime); bool nrn_use_compress_; // global due to bbsavestate #define use_compress_ nrn_use_compress_ } #ifdef USENCS extern int ncs_bgp_sending_info( int ** ); extern int ncs_bgp_target_hosts( int, int** ); extern int ncs_bgp_target_info( int ** ); extern int ncs_bgp_mindelays( int **, double ** ); //get minimum delays for all presyn objects in gid2in_ int ncs_netcon_mindelays( int**hosts, double **delays ) { return ncs_bgp_mindelays(hosts, delays); } double ncs_netcon_localmindelay( int srcgid ) { PreSyn *ps; gid2out_->find( srcgid, ps ); assert(ps); return ps->mindelay(); } //get the number of netcons for an object, if it sends here int ncs_netcon_count( int srcgid, bool localNetCons ) { PreSyn *ps; int flag = false; if( localNetCons ) gid2out_->find( srcgid, ps ); else gid2in_->find( srcgid, ps ); if( !ps ) { //no cells on this cpu receive from the given gid fprintf( stderr, "should never happen!\n" ); return 0; } return ps->dil_.count(); } //inject a spike into the appropriate netcon void ncs_netcon_inject( int srcgid, int netconIndex, double spikeTime, bool localNetCons ) { PreSyn *ps; NetCvode* ns = net_cvode_instance; if( localNetCons ) gid2out_->find( srcgid, ps ); else gid2in_->find( srcgid, ps ); if( !ps ) { //no cells on this cpu receive from the given gid return; } //fprintf( stderr, "gid %d index %d!\n", srcgid, netconIndex ); NetCon* d = ps->dil_.item(netconIndex); NrnThread* nt = nrn_threads; if (d->active_ && d->target_) { #if BBTQ == 5 ns->bin_event(spikeTime + d->delay_, d, nt); #else ns->event(spikeTime + d->delay_, d, nt); #endif } } int ncs_gid_receiving_info( int **presyngids ) { return ncs_bgp_target_info( presyngids ); } //given the gid of a cell, retrieve its target count int ncs_gid_sending_count( int **sendlist2build ) { if( !gid2out_ ) { fprintf( stderr, "gid2out_ not allocated\n" ); return -1; } return ncs_bgp_sending_info( sendlist2build ); } int ncs_target_hosts( int gid, int** targetnodes ) { return ncs_bgp_target_hosts( gid, targetnodes ); } #endif // for compressed gid info during spike exchange bool nrn_use_localgid_; void nrn_outputevent(unsigned char localgid, double firetime); static Gid2PreSyn** localmaps_; #define NRNSTAT 1 static int nsend_, nsendmax_, nrecv_, nrecv_useful_; #if NRNSTAT static IvocVect* max_histogram_; #endif static int ocapacity_; // for spikeout_ // require it to be smaller than min_interprocessor_delay. static double wt_; // wait time for nrnmpi_spike_exchange static double wt1_; // time to find the PreSyns and send the spikes. static int spfixout_capacity_; static int idxout_; static void nrn_spike_exchange_compressed(NrnThread*); #endif // NRNMPI #if BGPDMA & 4 #define HAVE_DCMF_RECORD_REPLAY 1 #else #define HAVE_DCMF_RECORD_REPLAY 0 #endif #if BGPDMA int use_dcmf_record_replay; int use_bgpdma_; // can be 0, 1, or 2 : allgather, multisend (ISend, bgpdma) static void bgp_dma_setup(); static void bgp_dma_init(); static void bgp_dma_receive(NrnThread*); extern void bgp_dma_send(PreSyn*, double t); static void bgpdma_cleanup_presyn(PreSyn*); #endif static int active_; static double usable_mindelay_; static double min_interprocessor_delay_; static double mindelay_; // the one actually used. Some of our optional algorithms static double last_maxstep_arg_; static NetParEvent* npe_; // nrn_nthread of them static int n_npe_; // just to compare with nrn_nthread #if NRNMPI // for combination of threads and mpi. #if USE_PTHREAD static MUTDEC #endif static int seqcnt_; static NrnThread* last_nt_; #endif #if NRN_MUSIC #include "nrnmusic.cpp" #endif NetParEvent::NetParEvent(){ wx_ = ws_ = 0.; ithread_ = -1; } NetParEvent::~NetParEvent(){ } void NetParEvent::send(double tt, NetCvode* nc, NrnThread* nt){ nc->event(tt + usable_mindelay_, this, nt); } void NetParEvent::deliver(double tt, NetCvode* nc, NrnThread* nt){ int seq; if (nrn_use_selfqueue_) { //first handle pending flag=1 self events nrn_pending_selfqueue(tt, nt); } // has to be the last event at this time in order to avoid a race // condition with HocEvent that may call things such as pc.barrier // actually allthread HocEvent (cvode.event(tev) and cvode.event(tev,stmt) // will be executed last after a thread join when nrn_allthread_handle // is called. net_cvode_instance->deliver_events(tt, nt); nt->_stop_stepping = 1; nt->_t = tt; #if NRNMPI if (nrnmpi_numprocs > 0) { MUTLOCK seq = ++seqcnt_; MUTUNLOCK if (seq == nrn_nthread) { last_nt_ = nt; #if BGPDMA if (use_bgpdma_) { bgp_dma_receive(nt); }else{ nrn_spike_exchange(nt); } #else nrn_spike_exchange(nt); #endif wx_ += wt_; ws_ += wt1_; seqcnt_ = 0; } } #endif send(tt, nc, nt); } void NetParEvent::pgvts_deliver(double tt, NetCvode* nc){ assert(nrn_nthread == 1); deliver(tt, nc, nrn_threads); } void NetParEvent::pr(const char* m, double tt, NetCvode* nc){ printf("%s NetParEvent %d t=%.15g tt-t=%g\n", m, ithread_, tt, tt - nrn_threads[ithread_]._t); } DiscreteEvent* NetParEvent::savestate_save(){ //pr("savestate_save", 0, net_cvode_instance); NetParEvent* npe = new NetParEvent(); npe->ithread_ = ithread_; return npe; } DiscreteEvent* NetParEvent::savestate_read(FILE* f){ int i; char buf[100]; assert(fgets(buf, 100, f)); assert(sscanf(buf, "%d\n", &i) == 1); //printf("NetParEvent::savestate_read %d\n", i); NetParEvent* npe = new NetParEvent(); npe->ithread_ = i; return npe; } void NetParEvent::savestate_write(FILE* f){ //pr("savestate_write", 0, net_cvode_instance); fprintf(f, "%d\n%d\n", NetParEventType, ithread_); } void NetParEvent::savestate_restore(double tt, NetCvode* nc){ #if NRNMPI if (use_compress_) { t_exchange_ = t; } #endif if (ithread_ == 0) { //npe_->pr("savestate_restore", tt, nc); for (int i=0; i < nrn_nthread; ++i) if (npe_+i) { nc->event(tt, npe_+i, nrn_threads + i); } } } #if NRNMPI inline static void sppk(unsigned char* c, int gid) { for (int i = localgid_size_-1; i >= 0; --i) { c[i] = gid & 255; gid >>= 8; } } inline static int spupk(unsigned char* c) { int gid = *c++; for (int i = 1; i < localgid_size_; ++i) { gid <<= 8; gid += *c++; } return gid; } void nrn_outputevent(unsigned char localgid, double firetime) { if (!active_) { return; } MUTLOCK nout_++; int i = idxout_; idxout_ += 2; if (idxout_ >= spfixout_capacity_) { spfixout_capacity_ *= 2; spfixout_ = (unsigned char*)hoc_Erealloc(spfixout_, spfixout_capacity_*sizeof(unsigned char)); hoc_malchk(); } spfixout_[i++] = (unsigned char)((firetime - t_exchange_)*dt1_ + .5); spfixout_[i] = localgid; //printf("%d idx=%d lgid=%d firetime=%g t_exchange_=%g [0]=%d [1]=%d\n", nrnmpi_myid, i, (int)localgid, firetime, t_exchange_, (int)spfixout_[i-1], (int)spfixout_[i]); MUTUNLOCK } #ifndef USENCS void nrn2ncs_outputevent(int gid, double firetime) { if (!active_) { return; } MUTLOCK if (use_compress_) { nout_++; int i = idxout_; idxout_ += 1 + localgid_size_; if (idxout_ >= spfixout_capacity_) { spfixout_capacity_ *= 2; spfixout_ = (unsigned char*)hoc_Erealloc(spfixout_, spfixout_capacity_*sizeof(unsigned char)); hoc_malchk(); } //printf("%d nrnncs_outputevent %d %.20g %.20g %d\n", nrnmpi_myid, gid, firetime, t_exchange_, //(int)((unsigned char)((firetime - t_exchange_)*dt1_ + .5))); spfixout_[i++] = (unsigned char)((firetime - t_exchange_)*dt1_ + .5); //printf("%d idx=%d firetime=%g t_exchange_=%g spfixout=%d\n", nrnmpi_myid, i, firetime, t_exchange_, (int)spfixout_[i-1]); sppk(spfixout_+i, gid); //printf("%d idx=%d gid=%d spupk=%d\n", nrnmpi_myid, i, gid, spupk(spfixout_+i)); }else{ #if nrn_spikebuf_size == 0 int i = nout_++; if (i >= ocapacity_) { ocapacity_ *= 2; spikeout_ = (NRNMPI_Spike*)hoc_Erealloc(spikeout_, ocapacity_*sizeof(NRNMPI_Spike)); hoc_malchk(); } //printf("%d cell %d in slot %d fired at %g\n", nrnmpi_myid, gid, i, firetime); spikeout_[i].gid = gid; spikeout_[i].spiketime = firetime; #else int i = nout_++; if (i >= nrn_spikebuf_size) { i -= nrn_spikebuf_size; if (i >= ocapacity_) { ocapacity_ *= 2; spikeout_ = (NRNMPI_Spike*)hoc_Erealloc(spikeout_, ocapacity_*sizeof(NRNMPI_Spike)); hoc_malchk(); } spikeout_[i].gid = gid; spikeout_[i].spiketime = firetime; }else{ spbufout_->gid[i] = gid; spbufout_->spiketime[i] = firetime; } #endif } MUTUNLOCK //printf("%d cell %d in slot %d fired at %g\n", nrnmpi_myid, gid, i, firetime); } #endif //USENCS #endif // NRNMPI static int nrn_need_npe() { int b = 0; if (active_) { b = 1; } if (nrn_use_selfqueue_) { b = 1; } if (nrn_nthread > 1) { b = 1; } if (b) { if (last_maxstep_arg_ == 0) { last_maxstep_arg_ = 100.; } set_mindelay(last_maxstep_arg_); }else{ if (npe_) { delete [] npe_; npe_ = NULL; n_npe_ = 0; } } return b; } static void calc_actual_mindelay() { //reasons why mindelay_ can be smaller than min_interprocessor_delay // are use_bgpdma_ when BGP_INTERVAL == 2 #if BGPDMA && (BGP_INTERVAL == 2) if (use_bgpdma_ && n_bgp_interval == 2) { mindelay_ = min_interprocessor_delay_ / 2.; }else{ mindelay_ = min_interprocessor_delay_; } #endif } #if BGPDMA #include "bgpdma.cpp" #else #define TBUFSIZE 0 #define TBUF /**/ #endif void nrn_spike_exchange_init() { if (nrnmpi_step_wait_ >= 0.0) { nrnmpi_step_wait_ = 0.0; } #ifdef USENCS bgp_dma_setup(); return; #endif //printf("nrn_spike_exchange_init\n"); if (!nrn_need_npe()) { return; } // if (!active_ && !nrn_use_selfqueue_) { return; } alloc_space(); //printf("nrnmpi_use=%d active=%d\n", nrnmpi_use, active_); calc_actual_mindelay(); usable_mindelay_ = mindelay_; if (cvode_active_ == 0 && nrn_nthread > 1) { usable_mindelay_ -= dt; } if ((usable_mindelay_ < 1e-9) || (cvode_active_ == 0 && usable_mindelay_ < dt)) { if (nrnmpi_myid == 0) { hoc_execerror("usable mindelay is 0", "(or less than dt for fixed step method)"); }else{ return; } } #if NRN_MUSIC if (nrnmusic) { nrnmusic_runtime_phase(); } #endif #if TBUFSIZE itbuf_ = 0; #endif #if BGPDMA if (use_bgpdma_) { bgp_dma_init(); } #endif if (n_npe_ != nrn_nthread) { if (npe_) { delete [] npe_; } npe_ = new NetParEvent[nrn_nthread]; n_npe_ = nrn_nthread; } for (int i = 0; i < nrn_nthread; ++i) { npe_[i].ithread_ = i; npe_[i].wx_ = 0.; npe_[i].ws_ = 0.; npe_[i].send(t, net_cvode_instance, nrn_threads + i); } #if NRNMPI if (use_compress_) { idxout_ = 2; t_exchange_ = t; dt1_ = 1./dt; usable_mindelay_ = floor(mindelay_ * dt1_ + 1e-9) * dt; assert (usable_mindelay_ >= dt && (usable_mindelay_ * dt1_) < 255); }else{ #if nrn_spikebuf_size > 0 if (spbufout_) { spbufout_->nspike = 0; } #endif } nout_ = 0; nsend_ = nsendmax_ = nrecv_ = nrecv_useful_ = 0; if (nrnmpi_numprocs > 0) { if (nrn_nthread > 0) { #if USE_PTHREAD if (!mut_) { MUTCONSTRUCT(1) } #endif }else{ MUTDESTRUCT } } #endif // NRNMPI //if (nrnmpi_myid == 0){printf("usable_mindelay_ = %g\n", usable_mindelay_);} } #if NRNMPI void nrn_spike_exchange(NrnThread* nt) { if (!active_) { return; } #if BGPDMA if (use_bgpdma_) { bgp_dma_receive(nt); return; } #endif if (use_compress_) { nrn_spike_exchange_compressed(nt); return; } TBUF #if TBUFSIZE nrnmpi_barrier(); #endif TBUF double wt; int i, n; #if NRNSTAT nsend_ += nout_; if (nsendmax_ < nout_) { nsendmax_ = nout_; } #endif #if nrn_spikebuf_size > 0 spbufout_->nspike = nout_; #endif wt = nrnmpi_wtime(); if (nrnmpi_step_wait_ >= 0.) { nrnmpi_barrier(); nrnmpi_step_wait_ += nrnmpi_wtime() - wt; } n = nrnmpi_spike_exchange(); wt_ = nrnmpi_wtime() - wt; wt = nrnmpi_wtime(); TBUF #if TBUFSIZE tbuf_[itbuf_++] = (unsigned long)nout_; tbuf_[itbuf_++] = (unsigned long)n; #endif errno = 0; //if (n > 0) { //printf("%d nrn_spike_exchange sent %d received %d\n", nrnmpi_myid, nout_, n); //} nout_ = 0; if (n == 0) { #if NRNSTAT if (max_histogram_) { vector_vec(max_histogram_)[0] += 1.; } #endif TBUF return; } #if NRNSTAT nrecv_ += n; if (max_histogram_) { int mx = 0; if (n > 0) { for (i=nrnmpi_numprocs-1 ; i >= 0; --i) { #if nrn_spikebuf_size == 0 if (mx < nin_[i]) { mx = nin_[i]; } #else if (mx < spbufin_[i].nspike) { mx = spbufin_[i].nspike; } #endif } } int ms = vector_capacity(max_histogram_)-1; mx = (mx < ms) ? mx : ms; vector_vec(max_histogram_)[mx] += 1.; } #endif // NRNSTAT #if nrn_spikebuf_size > 0 for (i = 0; i < nrnmpi_numprocs; ++i) { int j; int nn = spbufin_[i].nspike; if (nn > nrn_spikebuf_size) { nn = nrn_spikebuf_size; } for (j=0; j < nn; ++j) { PreSyn* ps; if (gid2in_->find(spbufin_[i].gid[j], ps)) { ps->send(spbufin_[i].spiketime[j], net_cvode_instance, nt); #if NRNSTAT ++nrecv_useful_; #endif } } } n = ovfl_; #endif // nrn_spikebuf_size > 0 for (i = 0; i < n; ++i) { PreSyn* ps; if (gid2in_->find(spikein_[i].gid, ps)) { ps->send(spikein_[i].spiketime, net_cvode_instance, nt); #if NRNSTAT ++nrecv_useful_; #endif } } wt1_ = nrnmpi_wtime() - wt; TBUF } void nrn_spike_exchange_compressed(NrnThread* nt) { if (!active_) { return; } TBUF #if TBUFSIZE nrnmpi_barrier(); #endif TBUF assert(!cvode_active_); double wt; int i, n, idx; #if NRNSTAT nsend_ += nout_; if (nsendmax_ < nout_) { nsendmax_ = nout_; } #endif assert(nout_ < 0x10000); spfixout_[1] = (unsigned char)(nout_ & 0xff); spfixout_[0] = (unsigned char)(nout_>>8); wt = nrnmpi_wtime(); if (nrnmpi_step_wait_ >= 0.) { nrnmpi_barrier(); nrnmpi_step_wait_ += nrnmpi_wtime() - wt; } n = nrnmpi_spike_exchange_compressed(); wt_ = nrnmpi_wtime() - wt; wt = nrnmpi_wtime(); TBUF #if TBUFSIZE tbuf_[itbuf_++] = (unsigned long)nout_; tbuf_[itbuf_++] = (unsigned long)n; #endif errno = 0; //if (n > 0) { //printf("%d nrn_spike_exchange sent %d received %d\n", nrnmpi_myid, nout_, n); //} nout_ = 0; idxout_ = 2; if (n == 0) { #if NRNSTAT if (max_histogram_) { vector_vec(max_histogram_)[0] += 1.; } #endif t_exchange_ = nrn_threads->_t; TBUF return; } #if NRNSTAT nrecv_ += n; if (max_histogram_) { int mx = 0; if (n > 0) { for (i=nrnmpi_numprocs-1 ; i >= 0; --i) { if (mx < nin_[i]) { mx = nin_[i]; } } } int ms = vector_capacity(max_histogram_)-1; mx = (mx < ms) ? mx : ms; vector_vec(max_histogram_)[mx] += 1.; } #endif // NRNSTAT if (nrn_use_localgid_) { int idxov = 0; for (i = 0; i < nrnmpi_numprocs; ++i) { int j, nnn; int nn = nin_[i]; if (nn) { if (i == nrnmpi_myid) { // skip but may need to increment idxov. if (nn > ag_send_nspike_) { idxov += (nn - ag_send_nspike_)*(1 + localgid_size_); } continue; } Gid2PreSyn* gps = localmaps_[i]; if (nn > ag_send_nspike_) { nnn = ag_send_nspike_; }else{ nnn = nn; } idx = 2 + i*ag_send_size_; for (j=0; j < nnn; ++j) { // order is (firetime,gid) pairs. double firetime = spfixin_[idx++]*dt + t_exchange_; int lgid = (int)spfixin_[idx]; idx += localgid_size_; PreSyn* ps; if (gps->find(lgid, ps)) { ps->send(firetime + 1e-10, net_cvode_instance, nt); #if NRNSTAT ++nrecv_useful_; #endif } } for ( ; j < nn; ++j) { double firetime = spfixin_ovfl_[idxov++]*dt + t_exchange_; int lgid = (int)spfixin_ovfl_[idxov]; idxov += localgid_size_; PreSyn* ps; if (gps->find(lgid, ps)) { ps->send(firetime+1e-10, net_cvode_instance, nt); #if NRNSTAT ++nrecv_useful_; #endif } } } } }else{ for (i = 0; i < nrnmpi_numprocs; ++i) { int j; int nn = nin_[i]; if (nn > ag_send_nspike_) { nn = ag_send_nspike_; } idx = 2 + i*ag_send_size_; for (j=0; j < nn; ++j) { // order is (firetime,gid) pairs. double firetime = spfixin_[idx++]*dt + t_exchange_; int gid = spupk(spfixin_ + idx); idx += localgid_size_; PreSyn* ps; if (gid2in_->find(gid, ps)) { ps->send(firetime+1e-10, net_cvode_instance, nt); #if NRNSTAT ++nrecv_useful_; #endif } } } n = ovfl_; idx = 0; for (i = 0; i < n; ++i) { double firetime = spfixin_ovfl_[idx++]*dt + t_exchange_; int gid = spupk(spfixin_ovfl_ + idx); idx += localgid_size_; PreSyn* ps; if (gid2in_->find(gid, ps)) { ps->send(firetime+1e-10, net_cvode_instance, nt); #if NRNSTAT ++nrecv_useful_; #endif } } } t_exchange_ = nrn_threads->_t; wt1_ = nrnmpi_wtime() - wt; TBUF } static void mk_localgid_rep() { int i, j, k; PreSyn* ps; // how many gids are there on this machine // and can they be compressed into one byte int ngid = 0; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0) { ++ngid; } }}} int ngidmax = nrnmpi_int_allmax(ngid); if (ngidmax > 256) { //do not compress return; } localgid_size_ = sizeof(unsigned char); nrn_use_localgid_ = true; // allocate Allgather receive buffer (send is the nrnmpi_myid one) int* rbuf = new int[nrnmpi_numprocs*(ngidmax + 1)]; int* sbuf = new int[ngidmax + 1]; sbuf[0] = ngid; ++sbuf; ngid = 0; // define the local gid and fill with the gids on this machine NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0) { ps->localgid_ = (unsigned char)ngid; sbuf[ngid] = ps->output_index_; ++ngid; } }}} --sbuf; // exchange everything nrnmpi_int_allgather(sbuf, rbuf, ngidmax+1); delete [] sbuf; errno = 0; // create the maps // there is a lot of potential for efficiency here. i.e. use of // perfect hash functions, or even simple Vectors. localmaps_ = new Gid2PreSyn*[nrnmpi_numprocs]; localmaps_[nrnmpi_myid] = 0; for (i = 0; i < nrnmpi_numprocs; ++i) if (i != nrnmpi_myid) { // how many do we need? sbuf = rbuf + i*(ngidmax + 1); ngid = *(sbuf++); // at most // of which we actually use... for (k=0, j=0; k < ngid; ++k) { if (gid2in_ && gid2in_->find(int(sbuf[k]), ps)) { ++j; } } // oh well. there is probably a rational way to choose but... localmaps_[i] = new Gid2PreSyn((j > 19) ? 19 : j+1); } // fill in the maps for (i = 0; i < nrnmpi_numprocs; ++i) if (i != nrnmpi_myid) { sbuf = rbuf + i*(ngidmax + 1); ngid = *(sbuf++); for (k=0; k < ngid; ++k) { if (gid2in_ && gid2in_->find(int(sbuf[k]), ps)) { #if ALTHASH localmaps_[i]->insert(k, ps); #else (*localmaps_[i])[k] = ps; #endif } } } // cleanup delete [] rbuf; } #endif // NRNMPI // may stimulate a gid for a cell not owned by this cpu. This allows // us to run single cells or subnets and stimulate exactly according to // their input in a full parallel net simulation. // For some purposes, it may be useful to simulate a spike from a // cell that does exist and would normally send its own spike, eg. // recurrent stimulation. This can be useful in debugging where the // spike raster comes from another implementation and one wants to // get complete control of all input spikes without the confounding // effects of output spikes from the simulated cells. In this case // set the third arg to 1 and set the output cell thresholds very // high so that they do not themselves generate spikes. // The remaining possibility is fake_out=2 which only does a send for // the gids owned by this cpu. This, followed by a nrn_spike_exchange(), // ensures that all the target cells, regardless of what rank they are on // will get the spike delivered and nobody gets it twice. void nrn_fake_fire(int gid, double spiketime, int fake_out) { assert(gid2in_); PreSyn* ps; if (fake_out < 2 && gid2in_->find(gid, ps)) { assert(ps); //printf("nrn_fake_fire %d %g\n", gid, spiketime); ps->send(spiketime, net_cvode_instance, nrn_threads); #if NRNSTAT ++nrecv_useful_; #endif }else if (fake_out && gid2out_->find(gid, ps)) { assert(ps); //printf("nrn_fake_fire fake_out %d %g\n", gid, spiketime); ps->send(spiketime, net_cvode_instance, nrn_threads); #if NRNSTAT ++nrecv_useful_; #endif } } static void alloc_space() { if (!gid2out_) { netcon_sym_ = hoc_lookup("NetCon"); #if ALTHASH gid2out_ = new Gid2PreSyn(1000); gid2in_ = new Gid2PreSyn(500000); #else gid2out_ = new Gid2PreSyn(211); gid2in_ = new Gid2PreSyn(2311); #endif #if NRNMPI ocapacity_ = 100; spikeout_ = (NRNMPI_Spike*)hoc_Emalloc(ocapacity_*sizeof(NRNMPI_Spike)); hoc_malchk(); icapacity_ = 100; spikein_ = (NRNMPI_Spike*)hoc_Emalloc(icapacity_*sizeof(NRNMPI_Spike)); hoc_malchk(); nin_ = (int*)hoc_Emalloc(nrnmpi_numprocs*sizeof(int)); hoc_malchk(); #if nrn_spikebuf_size > 0 spbufout_ = (NRNMPI_Spikebuf*)hoc_Emalloc(sizeof(NRNMPI_Spikebuf)); hoc_malchk(); spbufin_ = (NRNMPI_Spikebuf*)hoc_Emalloc(nrnmpi_numprocs*sizeof(NRNMPI_Spikebuf)); hoc_malchk(); #endif #endif } } void BBS::set_gid2node(int gid, int nid) { alloc_space(); #if NRNMPI if (nid == nrnmpi_myid) { #else { #endif //printf("gid %d defined on %d\n", gid, nrnmpi_myid); PreSyn* ps; char m[200]; if (gid2in_->find(gid, ps)) { sprintf(m, "gid=%d already exists as an input port", gid); hoc_execerror(m, "Setup all the output ports on this process before using them as input ports."); } if (gid2out_->find(gid, ps)) { sprintf(m, "gid=%d already exists on this process as an output port", gid); hoc_execerror(m, 0); } #if ALTHASH gid2out_->insert(gid, NULL); #else (*gid2out_)[gid] = NULL; #endif // gid2out_->insert(pair(gid, NULL)); } } static int gid2in_donot_remove = 0; // avoid gid2in_ removal when iterating gid2in_ void nrn_cleanup_presyn(PreSyn* ps) { #if BGPDMA bgpdma_cleanup_presyn(ps); #endif PreSyn* pss; if (ps->gid_ >= 0 && gid2in_ && gid2in_donot_remove == 0) { gid2in_->remove(ps->gid_); } } void nrnmpi_gid_clear(int arg) { if (arg == 0 || arg == 3 || arg == 4) { nrn_partrans_clear(); #if PARANEURON nrnmpi_split_clear(); #endif } if (arg == 0 || arg == 2 || arg == 4) { nrnmpi_multisplit_clear(); } if (arg == 2 || arg == 3) { return; } if (!gid2out_) { return; } PreSyn* ps, *psi; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps && !gid2in_->find(ps->gid_, psi)) { if (arg == 4) { delete ps; }else{ #if BGPDMA bgpdma_cleanup_presyn(ps); #endif ps->gid_ = -1; ps->output_index_ = -1; if (ps->dil_.count() == 0) { delete ps; } } } }}} gid2in_donot_remove = 1; NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { if (arg == 4) { delete ps; }else{ #if BGPDMA bgpdma_cleanup_presyn(ps); #endif ps->gid_ = -1; ps->output_index_ = -1; if (ps->dil_.count() == 0) { delete ps; } } }}} gid2in_donot_remove = 0; #if ALTHASH gid2in_->remove_all(); gid2out_->remove_all(); #else int i; for (i = gid2out_->size_ - 1; i >= 0; --i) { gid2out_->at(i).clear(); } for (i = gid2in_->size_ - 1; i >= 0; --i) { gid2in_->at(i).clear(); } #endif } int nrn_gid_exists(int gid) { PreSyn* ps; alloc_space(); if (gid2out_->find(gid, ps)) { //printf("%d gid %d exists\n", nrnmpi_myid, gid); if (ps) { return (ps->output_index_ >= 0 ? 3 : 2); }else{ return 1; } } return 0; } int BBS::gid_exists(int gid) {return nrn_gid_exists(gid);} double BBS::threshold() { int gid = int(chkarg(1, 0., MD)); PreSyn* ps; if (!gid2out_->find(gid, ps) || ps == NULL) { hoc_execerror("gid not associated with spike generation location", 0); } if (ifarg(2)) { ps->threshold_ = *getarg(2); } return ps->threshold_; } void BBS::cell() { int gid = int(chkarg(1, 0., MD)); PreSyn* ps; if (gid2in_->find(gid, ps)) { char buf[100]; sprintf(buf, "gid=%d is in the input list. Must register prior to connecting", gid); hoc_execerror(buf, 0); } if (gid2out_->find(gid, ps) == 0) { char buf[100]; sprintf(buf, "gid=%d has not been set on rank %d", gid, nrnmpi_myid); hoc_execerror(buf, 0); } Object* ob = *hoc_objgetarg(2); if (!ob || ob->ctemplate != netcon_sym_->u.ctemplate) { check_obj_type(ob, "NetCon"); } NetCon* nc = (NetCon*)ob->u.this_pointer; ps = nc->src_; //printf("%d cell %d %s\n", nrnmpi_myid, gid, hoc_object_name(ps->ssrc_ ? nrn_sec2cell(ps->ssrc_) : ps->osrc_)); #if ALTHASH gid2out_->insert(gid, ps); #else (*gid2out_)[gid] = ps; #endif ps->gid_ = gid; if (ifarg(3) && !chkarg(3, 0., 1.)) { ps->output_index_ = -2; //prevents destruction of PreSyn }else{ ps->output_index_ = gid; } } void BBS::outputcell(int gid) { PreSyn* ps; assert(gid2out_->find(gid, ps)); assert(ps); ps->output_index_ = gid; ps->gid_ = gid; } void BBS::spike_record(int gid, IvocVect* spikevec, IvocVect* gidvec) { PreSyn* ps; if (gid >= 0) { assert(gid2out_->find(gid, ps)); assert(ps); ps->record(spikevec, gidvec, gid); }else{ // record all output spikes NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps->output_index_ >= 0) { ps->record(spikevec, gidvec, ps->output_index_); } }}} } } static Object* gid2obj_(int gid) { Object* cell = 0; //printf("%d gid2obj gid=%d\n", nrnmpi_myid, gid); PreSyn* ps; assert(gid2out_->find(gid, ps)); //printf(" found\n"); assert(ps); cell = ps->ssrc_ ? nrn_sec2cell(ps->ssrc_) : ps->osrc_; //printf(" return %s\n", hoc_object_name(cell)); return cell; } Object** BBS::gid2obj(int gid) { return hoc_temp_objptr(gid2obj_(gid)); } Object** BBS::gid2cell(int gid) { Object* cell = 0; //printf("%d gid2obj gid=%d\n", nrnmpi_myid, gid); PreSyn* ps; assert(gid2out_->find(gid, ps)); //printf(" found\n"); assert(ps); if (ps->ssrc_) { cell = nrn_sec2cell(ps->ssrc_); }else{ cell = ps->osrc_; // but if it is a POINT_PROCESS in a section // that is inside an object ... (probably has a WATCH statement) Section* sec = ob2pntproc(cell)->sec; Object* c2; if (sec && (c2 = nrn_sec2cell(sec))) { if (c2) { cell = c2; } } } //printf(" return %s\n", hoc_object_name(cell)); return hoc_temp_objptr(cell); } Object** BBS::gid_connect(int gid) { Object* target = *hoc_objgetarg(2); if (!is_point_process(target)) { hoc_execerror("arg 2 must be a point process", 0); } alloc_space(); PreSyn* ps; if (gid2out_->find(gid, ps)) { // the gid is owned by this machine so connect directly if (!ps) { char buf[100]; sprintf(buf, "gid %d owned by %d but no associated cell", gid, nrnmpi_myid); hoc_execerror(buf, 0); } }else if (gid2in_->find(gid, ps)) { // the gid stub already exists //printf("%d connect %s from already existing %d\n", nrnmpi_myid, hoc_object_name(target), gid); }else{ //printf("%d connect %s from new PreSyn for %d\n", nrnmpi_myid, hoc_object_name(target), gid); ps = new PreSyn(NULL, NULL, NULL); net_cvode_instance->psl_append(ps); #if ALTHASH gid2in_->insert(gid, ps); #else (*gid2in_)[gid] = ps; #endif ps->gid_ = gid; } NetCon* nc; Object** po; if (ifarg(3)) { po = hoc_objgetarg(3); if (!*po || (*po)->ctemplate != netcon_sym_->u.ctemplate) { check_obj_type(*po, "NetCon"); } nc = (NetCon*)((*po)->u.this_pointer); if (nc->target_ != ob2pntproc(target)) { hoc_execerror("target is different from 3rd arg NetCon target", 0); } nc->replace_src(ps); }else{ nc = new NetCon(ps, target); po = hoc_temp_objvar(netcon_sym_, nc); nc->obj_ = *po; } return po; } static int timeout_ = 20; int nrn_set_timeout(int timeout) { int tt; tt = timeout_; timeout_ = timeout; return tt; } void BBS::netpar_solve(double tstop) { #if NRNMPI double mt, md; tstopunset; if (cvode_active_) { mt = 1e-9 ; md = mindelay_; }else{ mt = dt ; md = mindelay_ - 1e-10; } if (md < mt) { if (nrnmpi_myid == 0) { hoc_execerror("mindelay is 0", "(or less than dt for fixed step method)"); }else{ return; } } double wt; nrnmpi_barrier(); // make sure all integrations start about the same nrn_timeout(timeout_); //time to avoid spurious timeouts while waiting // at the next MPI_collective. wt = nrnmpi_wtime(); if (cvode_active_) { ncs2nrn_integrate(tstop); }else{ ncs2nrn_integrate(tstop*(1.+1e-11)); } impl_->integ_time_ += nrnmpi_wtime() - wt; impl_->integ_time_ -= (npe_ ? (npe_[0].wx_ + npe_[0].ws_) : 0.); #if BGPDMA if (use_bgpdma_) { #if BGP_INTERVAL == 2 for (int i=0; i < n_bgp_interval; ++i) { bgp_dma_receive(nrn_threads); } #else bgp_dma_receive(nrn_threads); #endif }else{ nrn_spike_exchange(nrn_threads); } #else nrn_spike_exchange(nrn_threads); #endif nrn_timeout(0); impl_->wait_time_ += wt_; impl_->send_time_ += wt1_; if (npe_) { impl_->wait_time_ += npe_[0].wx_; impl_->send_time_ += npe_[0].ws_; npe_[0].wx_ = npe_[0].ws_ = 0.; }; //printf("%d netpar_solve exit t=%g tstop=%g mindelay_=%g\n",nrnmpi_myid, t, tstop, mindelay_); #else // not NRNMPI ncs2nrn_integrate(tstop); #endif tstopunset; } static double set_mindelay(double maxdelay) { double mindelay = maxdelay; last_maxstep_arg_ = maxdelay; if (nrn_use_selfqueue_ || net_cvode_instance->localstep() || nrn_nthread > 1 ) { hoc_Item* q; if (net_cvode_instance->psl_) ITERATE(q, net_cvode_instance->psl_) { PreSyn* ps = (PreSyn*)VOIDITM(q); double md = ps->mindelay(); if (mindelay > md) { mindelay = md; } } } #if NRNMPI else{ NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { double md = ps->mindelay(); if (mindelay > md) { mindelay = md; } }}} } if (nrnmpi_use) {active_ = 1;} if (use_compress_) { if (mindelay/dt > 255) { mindelay = 255*dt; } } //printf("%d netpar_mindelay local %g now calling nrnmpi_mindelay\n", nrnmpi_myid, mindelay); // double st = time(); mindelay_ = nrnmpi_mindelay(mindelay); min_interprocessor_delay_ = mindelay_; // add_wait_time(st); //printf("%d local min=%g global min=%g\n", nrnmpi_myid, mindelay, mindelay_); if (mindelay_ < 1e-9 && nrn_use_selfqueue_) { nrn_use_selfqueue_ = 0; double od = mindelay_; mindelay = set_mindelay(maxdelay); if (nrnmpi_myid == 0) { printf("Notice: The global minimum NetCon delay is %g, so turned off the cvode.queue_mode\n", od); printf(" use_self_queue option. The interprocessor minimum NetCon delay is %g\n", mindelay); } } errno = 0; return mindelay; #else mindelay_ = mindelay; min_interprocessor_delay_ = mindelay_; return mindelay; #endif //NRNMPI } double BBS::netpar_mindelay(double maxdelay) { #if BGPDMA bgp_dma_setup(); #endif double tt = set_mindelay(maxdelay); return tt; } void BBS::netpar_spanning_statistics(int* nsend, int* nsendmax, int* nrecv, int* nrecv_useful) { #if NRNMPI *nsend = nsend_; *nsendmax = nsendmax_; *nrecv = nrecv_; *nrecv_useful = nrecv_useful_; #endif } // unfortunately, ivocvect.h conflicts with STL IvocVect* BBS::netpar_max_histogram(IvocVect* mh) { #if NRNMPI && NRNSTAT IvocVect* h = max_histogram_; if (max_histogram_) { max_histogram_ = NULL; } if (mh) { max_histogram_ = mh; } return h; #else return NULL; #endif } /* 08-Nov-2010 The workhorse for spike exchange on up to 10K machines is MPI_Allgather but as the number of machines becomes far greater than the fanout per cell we have been exploring a class of exchange methods called multisend where the spikes only go to those machines that need them and there is overlap between communication and computation. The numer of variants of multisend has grown so that some method selection function is needed that makes sense. The situation that needs to be captured by xchng_meth is Allgather multisend implemented as MPI_ISend multisend DCMF (only for Blue Gene/P) multisend record_replay (only for Blue Gene/P with recordreplay_v1r4m2.patch) n_bgp_interval 1 or 2 per minimum interprocessor NetCon delay that concept valid for all methods Note that Allgather allows spike compression and an allgather spike buffer with size chosen at setup time. All methods allow bin queueing. All the multisend methods should allow two phase multisend. Note that, in principle, MPI_ISend allows the source to send the index of the target PreSyn to avoid a hash table lookup (even with a two phase variant) Not all variation are useful. e.g. it is pointless to combine Allgather and n_bgp_interval=2. RecordReplay should be best on the BG/P. The whole point is to make the spike transfer initiation as lowcost as possible since that is what causes most load imbalance. I.e. since 10K more spikes arrive than are sent, spikes received per processor per interval are much more statistically balanced than spikes sent per processor per interval. And presently DCMF multisend injects 10000 messages per spike into the network which is quite expensive. record replay avoids this overhead and the idea of two phase multisend distributes the injection See case 8 of nrn_bgp_receive_time for the xchng_meth properties */ int nrnmpi_spike_compress(int nspike, bool gid_compress, int xchng_meth) { #if NRNMPI if (nrnmpi_numprocs < 2) { return 0; } #if BGP_INTERVAL == 2 n_bgp_interval = (xchng_meth & 4) ? 2 : 1; #endif #if BGPDMA use_bgpdma_ = (xchng_meth & 3); if (use_bgpdma_ == 3) { assert(HAVE_DCMF_RECORD_REPLAY); } #if TWOPHASE use_phase2_ = (xchng_meth & 8) ? 1 : 0; if (nrnmpi_myid == 0) {printf("use_phase2_ = %d\n", use_phase2_);} #endif #if HAVE_DCMF_RECORD_REPLAY use_dcmf_record_replay = (use_bgpdma_ == 3 ? 1 : 0); if (nrnmpi_myid == 0) {printf("use_dcmf_record_replay = %d\n", use_dcmf_record_replay);} #endif if (use_bgpdma_ == 3) { use_bgpdma_ = 2; } if (use_bgpdma_ == 2) { assert(BGPDMA & 2); } if (use_bgpdma_ == 1) { assert(BGPDMA & 1); } if (nrnmpi_myid == 0) {printf("use_bgpdma_ = %d\n", use_bgpdma_);} #else // BGPDMA == 0 assert(xchng_meth == 0); #endif if (nspike >= 0) { ag_send_nspike_ = 0; if (spfixout_) { free(spfixout_); spfixout_ = 0; } if (spfixin_) { free(spfixin_); spfixin_ = 0; } if (spfixin_ovfl_) { free(spfixin_ovfl_); spfixin_ovfl_ = 0; } if (localmaps_) { for (int i=0; i < nrnmpi_numprocs; ++i) if (i != nrnmpi_myid) { if (localmaps_[i]) { delete localmaps_[i]; } } delete [] localmaps_; localmaps_ = 0; } } if (nspike == 0) { // turn off use_compress_ = false; nrn_use_localgid_ = false; }else if (nspike > 0) { // turn on if (cvode_active_) { if (nrnmpi_myid == 0) {hoc_warning("ParallelContext.spike_compress cannot be used with cvode active", 0);} use_compress_ = false; nrn_use_localgid_ = false; return 0; } use_compress_ = true; ag_send_nspike_ = nspike; nrn_use_localgid_ = false; if (gid_compress) { // we can only do this after everything is set up mk_localgid_rep(); if (!nrn_use_localgid_ && nrnmpi_myid == 0) { printf("Notice: gid compression did not succeed. Probably more than 255 cells on one cpu.\n"); } } if (!nrn_use_localgid_) { localgid_size_ = sizeof(unsigned int); } ag_send_size_ = 2 + ag_send_nspike_*(1 + localgid_size_); spfixout_capacity_ = ag_send_size_ + 50*(1 + localgid_size_); spfixout_ = (unsigned char*)hoc_Emalloc(spfixout_capacity_); hoc_malchk(); spfixin_ = (unsigned char*)hoc_Emalloc(nrnmpi_numprocs*ag_send_size_); hoc_malchk(); ovfl_capacity_ = 100; spfixin_ovfl_ = (unsigned char*)hoc_Emalloc(ovfl_capacity_*(1 + localgid_size_)); hoc_malchk(); } return ag_send_nspike_; #else return 0; #endif } PreSyn* nrn_gid2outputpresyn(int gid) { // output PreSyn PreSyn* ps; if (gid2out_->find(gid, ps)) { return ps; } return NULL; } Object* nrn_gid2obj(int gid) { return gid2obj_(gid); } PreSyn* nrn_gid2presyn(int gid) { // output PreSyn PreSyn* ps; assert(gid2out_->find(gid, ps)); return ps; } void nrn_gidout_iter(PFIO callback) { PreSyn* ps; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps) { int gid = ps->gid_; Object* c = gid2obj_(gid); (*callback)(gid, c); } }}} } #include "nrnbbcore_write.h" extern "C" { extern int* nrn_prop_param_size_; extern int* pnt_receive_size; extern short* nrn_is_artificial_; static int weightcnt(NetCon* nc) { return nc->cnt_; // return nc->target_ ? pnt_receive_size[nc->target_->prop->type]: 1; } size_t nrncore_netpar_bytes() { PreSyn* ps; size_t ntot, nin, nout, nnet, nweight; ntot = nin = nout = nnet = nweight = 0; size_t npnt = 0; if (0 && nrnmpi_myid == 0) { printf("size Presyn=%ld NetCon=%ld Point_process=%ld Prop=%ld\n", sizeof(PreSyn), sizeof(NetCon), sizeof(Point_process), sizeof(Prop)); } NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps) { nout += 1; int n = ps->dil_.count(); nnet += n; for (int i=0; i < n; ++i) { nweight += weightcnt(ps->dil_.item(i)); NetCon* nc = ps->dil_.item(i); if (nc->target_) { npnt += 1; } } } }}} //printf("output Presyn npnt = %ld nweight = %ld\n", npnt, nweight); NrnHashIterate(Gid2PreSyn, gid2in_, PreSyn*, ps) { if (ps) { nin += 1; int n = ps->dil_.count(); nnet += n; for (int i=0; i < n; ++i) { nweight += weightcnt(ps->dil_.item(i)); NetCon* nc = ps->dil_.item(i); if (nc->target_) { npnt += 1; } } } }}} //printf("after input Presyn total npnt = %ld nweight = %ld\n", npnt, nweight); ntot = (nin + nout)*sizeof(PreSyn) + nnet*sizeof(NetCon) + nweight*sizeof(double); // printf("%d rank output Presyn %ld input Presyn %ld NetCon %ld bytes %ld\n", // nrnmpi_myid, nout, nin, nnet, ntot); return ntot; } void nrncore_netpar_cellgroups_helper(CellGroup* cgs) { //printf("nrncore_netpar_cellgroups_helper\n"); // for the real cells in each thread (all have output gid and voltage spike // detector) fill the cgs output_ps, output_gid, and output_vindex // All the other (acell) gids have already been processed. int* gidcnt = new int[nrn_nthread]; // real only for (int i=0; i < nrn_nthread; ++ i) { gidcnt[i] = 0; } PreSyn* ps; NrnHashIterate(Gid2PreSyn, gid2out_, PreSyn*, ps) { if (ps && ps->thvar_) { int ith = ps->nt_->id; assert(ith >= 0 && ith < nrn_nthread); int i = gidcnt[ith]; cgs[ith].output_ps[i] = ps; cgs[ith].output_gid[i] = ps->output_index_; assert(ps->thvar_ >= ps->nt_->_actual_v); int inode = ps->thvar_ - ps->nt_->_actual_v; assert(inode <= ps->nt_->end); cgs[ith].output_vindex[i] = inode; ++gidcnt[ith]; } }}} #if 0 // allow real cells to NOT have a direct voltage threshold. for (int i=0; i < nrn_nthread; ++ i) { assert(nrn_threads[i].ncell == gidcnt[i]); } #endif delete [] gidcnt; } } // extern "C" of nrnbbcore_write neuron-7.5/src/nrniv/nonlinz.cpp000066400000000000000000000416511323325274500170260ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include "nonlinz.h" #include "nrnoc2iv.h" #include "nrnmpi.h" extern "C" { #include "cspmatrix.h" #include "membfunc.h" } typedef int (*Pfridot)(...); extern "C" { extern int structure_change_cnt; extern void v_setup_vectors(); extern void nrn_rhs(NrnThread*); extern int nrndae_extra_eqn_count(); extern Symlist *hoc_built_in_symlist; extern void (*nrnthread_v_transfer_)(NrnThread*); } extern void pargap_jacobi_rhs(double*, double*); extern void pargap_jacobi_setup(int mode); class NonLinImpRep { public: NonLinImpRep(); virtual ~NonLinImpRep(); void delta(double); void didv(); void dids(); void dsdv(); void dsds(); int gapsolve(); char* m_; int scnt_; // structure_change int n_v_, n_ext_, n_lin_, n_ode_, neq_v_, neq_; double** pv_; double** pvdot_; int* v_index_; double* rv_; double* jv_; double** diag_; double* deltavec_; // just like cvode.atol*cvode.atolscale for ode's double delta_; // slightly more efficient and easier for v. void current(int, Memb_list*, int); void ode(int, Memb_list*); double omega_; int iloc_; // current injection site of last solve float* vsymtol_; int maxiter_; }; NonLinImp::NonLinImp() { rep_ = NULL; } NonLinImp::~NonLinImp() { if (rep_) { delete rep_; } } double NonLinImp::transfer_amp(int vloc) { double x = rep_->rv_[vloc]; double y = rep_->jv_[vloc]; return sqrt(x*x+y*y); } double NonLinImp::input_amp(int curloc) { if (nrnmpi_numprocs > 1 && nrnthread_v_transfer_) { hoc_execerror("not allowed with both gap junctions and nhost>0", 0); } solve(curloc); if (curloc < 0) { return 0.0; } double x = rep_->rv_[curloc]; double y = rep_->jv_[curloc]; return sqrt(x*x+y*y); } double NonLinImp::transfer_phase(int vloc) { double x = rep_->rv_[vloc]; double y = rep_->jv_[vloc]; return atan2(y, x); } double NonLinImp::input_phase(int curloc) { if (nrnmpi_numprocs > 1 && nrnthread_v_transfer_) { hoc_execerror("not allowed with both gap junctions and nhost>0", 0); } solve(curloc); if (curloc < 0) { return 0.0; } double x = rep_->rv_[curloc]; double y = rep_->jv_[curloc]; return atan2(y,x); } double NonLinImp::ratio_amp(int clmploc, int vloc) { if (nrnmpi_numprocs > 1 && nrnthread_v_transfer_) { hoc_execerror("not allowed with both gap junctions and nhost>0", 0); } solve(clmploc); if (clmploc < 0) { return 0.0; } double ax,bx,cx, ay,by,cy,bb; ax = rep_->rv_[vloc]; ay = rep_->jv_[vloc]; bx = rep_->rv_[clmploc]; by = rep_->jv_[clmploc]; bb = bx*bx + by*by; cx = (ax*bx + ay*by)/bb; cy = (ay*bx - ax*by)/bb; return sqrt(cx*cx + cy*cy); } void NonLinImp::compute(double omega, double deltafac, int maxiter) { v_setup_vectors(); nrn_rhs(nrn_threads); if (rep_ && rep_->scnt_ != structure_change_cnt) { delete rep_; rep_ = NULL; } if (!rep_) { rep_ = new NonLinImpRep(); } rep_->maxiter_ = maxiter; if (rep_->neq_ == 0) { return; } if (nrndae_extra_eqn_count() > 0) { hoc_execerror("Impedance calculation with LinearMechanism not implemented", 0); } if (nrn_threads->_ecell_memb_list) { hoc_execerror("Impedance calculation with extracellular not implemented", 0); } rep_->omega_ = 1000.* omega; rep_->delta(deltafac); // fill matrix cmplx_spClear(rep_->m_); rep_->didv(); rep_->dsds(); #if 1 // when 0 equivalent to standard method rep_->dids(); rep_->dsdv(); #endif // cmplx_spPrint(rep_->m_, 0, 1, 1); // for (int i=0; i < rep_->neq_; ++i) { // printf("i=%d %g %g\n", i, rep_->diag_[i][0], rep_->diag_[i][1]); // } int e = cmplx_spFactor(rep_->m_); switch (e) { case spZERO_DIAG: hoc_execerror("cmplx_spFactor error:", "Zero Diagonal"); case spNO_MEMORY: hoc_execerror("cmplx_spFactor error:", "No Memory"); case spSINGULAR: hoc_execerror("cmplx_spFactor error:", "Singular"); } rep_->iloc_ = -2; } int NonLinImp::solve(int curloc) { int rval = 0; NrnThread* _nt = nrn_threads; if (!rep_) { hoc_execerror("Must call Impedance.compute first", 0); } if (rep_->iloc_ != curloc) { int i; rep_->iloc_ = curloc; for (i=0; i < rep_->neq_; ++i) { rep_->rv_[i] = 0; rep_->jv_[i] = 0; } if (curloc >= 0) {rep_->rv_[curloc] = 1.e2/NODEAREA(_nt->_v_node[curloc]);} if (nrnthread_v_transfer_) { rval = rep_->gapsolve(); }else{ assert(rep_->m_); cmplx_spSolve(rep_->m_, rep_->rv_-1, rep_->rv_-1, rep_->jv_-1, rep_->jv_-1); } } return rval; } // too bad it is not easy to reuse the cvode/daspk structures. Most of // mapping is already done there. NonLinImpRep::NonLinImpRep() { int err; int i, j, ieq, cnt; NrnThread* _nt = nrn_threads; maxiter_ = 500; m_ = NULL; vsymtol_ = NULL; Symbol* vsym = hoc_table_lookup("v", hoc_built_in_symlist); if (vsym->extra) { vsymtol_ = &vsym->extra->tolerance; } // the equation order is the same order as for the fixed step method // for current balance. Remaining ode equation order is // defined by the memb_list. // how many equations n_v_ = _nt->end; n_ext_ = 0; if (_nt->_ecell_memb_list) { n_ext_ = _nt->_ecell_memb_list->nodecount*nlayer; } n_lin_ = nrndae_extra_eqn_count(); n_ode_ = 0; for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; i = tml->index; Pfridot s = (Pfridot)memb_func[i].ode_count; if (s) { cnt = (*s)(i); n_ode_ += cnt * ml->nodecount; } } neq_v_ = n_v_ + n_ext_ + n_lin_; neq_ = neq_v_ + n_ode_; if (neq_ == 0) { return; } m_ = cmplx_spCreate(neq_, 1, &err); assert(err == spOKAY); pv_ = new double*[neq_]; pvdot_ = new double*[neq_]; v_index_ = new int[n_v_]; rv_ = new double[neq_+1]; rv_ += 1; jv_ = new double[neq_+1]; jv_ += 1; diag_ = new double*[neq_]; deltavec_ = new double[neq_]; for (i=0; i < n_v_; ++i) { // utilize nd->eqn_index in case of use_sparse13 later Node* nd = _nt->_v_node[i]; pv_[i] = &NODEV(nd); pvdot_[i] = nd->_rhs; v_index_[i] = i+1; } for (i=0; i < n_v_; ++i) { diag_[i] = cmplx_spGetElement(m_, v_index_[i], v_index_[i]); } for (i=neq_v_; i < neq_; ++i) { diag_[i] = cmplx_spGetElement(m_, i+1, i+1); } scnt_ = structure_change_cnt; } NonLinImpRep::~NonLinImpRep() { if (!m_) { return; } cmplx_spDestroy(m_); delete [] pv_; delete [] pvdot_; delete [] v_index_; delete [] (rv_ - 1); delete [] (jv_ - 1); delete [] diag_; delete [] deltavec_; } void NonLinImpRep::delta(double deltafac){ // also defines pv_,pvdot_ map for ode int i, j, nc, cnt, ieq; NrnThread* nt = nrn_threads; for (i=0; i < neq_; ++i) { deltavec_[i] = deltafac; // all v's wasted but no matter. } ieq = neq_v_; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; i = tml->index; nc = ml->nodecount; Pfridot s = (Pfridot)memb_func[i].ode_count; if (s && (cnt = (*s)(i)) > 0) { s = (Pfridot)memb_func[i].ode_map; for (j=0; j < nc; ++j) { (*s)(ieq, pv_ + ieq, pvdot_ + ieq, ml->data[j], ml->pdata[j], deltavec_ + ieq, i); ieq += cnt; } } } delta_ = (vsymtol_ && (*vsymtol_ != 0.)) ? *vsymtol_ : 1.; delta_ *= deltafac; } void NonLinImpRep::didv() { int i, j, ip; Node* nd; NrnThread* _nt = nrn_threads; // d2v/dv2 terms for (i=_nt->ncell; i < n_v_; ++i) { nd = _nt->_v_node[i]; ip = _nt->_v_parent[i]->v_node_index; double* a = cmplx_spGetElement(m_, v_index_[ip], v_index_[i]); double* b = cmplx_spGetElement(m_, v_index_[i], v_index_[ip]); *a += NODEA(nd); *b += NODEB(nd); *diag_[i] -= NODEB(nd); *diag_[ip] -= NODEA(nd); } // jwC term Memb_list* mlc = _nt->tml->ml; int n = mlc->nodecount; for (i=0; i < n; ++i) { double* cd = mlc->data[i]; j = mlc->nodelist[i]->v_node_index; diag_[v_index_[j]-1][1] += .001 * cd[0] * omega_; } // di/dv terms // because there may be several point processes of the same type // at the same location, we have to be careful to neither increment that // nd->v multiple times nor count the rhs multiple times. // So we can't take advantage of vectorized point processes. // To avoid this we do each mechanism item separately. // We assume there is no interaction between // separate locations. Note that interactions such as gap junctions // would not be handled in any case without computing a full jacobian. // i.e. calling nrn_rhs varying every state one at a time (that would // give the d2v/dv2 terms as well), but the expense is unwarranted. for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { i = tml->index; if (i == CAP) { continue; } if (!memb_func[i].current) { continue; } Memb_list* ml = tml->ml; double* x1 = rv_; // use as temporary storage double* x2 = jv_; for (j = 0; j < ml->nodecount; ++j) { Node* nd = ml->nodelist[j]; // zero rhs // save v NODERHS(nd) = 0; x1[j] = NODEV(nd); // v+dv NODEV(nd) += delta_; current(i, ml, j); // save rhs // zero rhs // restore v x2[j] = NODERHS(nd); NODERHS(nd) = 0; NODEV(nd) = x1[j]; current(i, ml, j); // conductance // add to matrix *diag_[v_index_[nd->v_node_index]-1] -= (x2[j] - NODERHS(nd))/delta_; } } } void NonLinImpRep::dids() { // same strategy as didv but now the innermost loop is over // every state but just for that compartment // outer loop over ode mechanisms in same order as we created the pv_ map // so we can eas int ieq, i, in, is, iis; NrnThread* nt = nrn_threads; ieq = neq_ - n_ode_; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; i = tml->index; if (memb_func[i].ode_count && ml->nodecount) { int nc = ml->nodecount; Pfridot s = (Pfridot)memb_func[i].ode_count; int cnt = (*s)(i); if (memb_func[i].current) { double* x1 = rv_; // use as temporary storage double* x2 = jv_; for (in = 0; in < ml->nodecount; ++in) { Node* nd = ml->nodelist[in]; // zero rhs NODERHS(nd) = 0; // compute rhs current(i, ml, in); // save rhs x2[in] = NODERHS(nd); // each state incremented separately and restored for (iis = 0; iis < cnt; ++iis) { is = ieq + in*cnt + iis; // save s x1[is] = *pv_[is]; // increment s and zero rhs *pv_[is] += deltavec_[is]; NODERHS(nd) = 0; current(i, ml, in); *pv_[is] = x1[is]; // restore s double g = (NODERHS(nd) - x2[in])/deltavec_[is]; if (g != 0.) { double* elm = cmplx_spGetElement(m_, v_index_[nd->v_node_index], is+1); elm[0] = -g; } } // don't know if this is necessary but make sure last // call with respect to original states current(i, ml, in); } } ieq += cnt*nc; } } } void NonLinImpRep::dsdv() { int ieq, i, in, is, iis; NrnThread* nt = nrn_threads; ieq = neq_ - n_ode_; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; i = tml->index; if (memb_func[i].ode_count && ml->nodecount) { int nc = ml->nodecount; Pfridot s = (Pfridot)memb_func[i].ode_count; int cnt = (*s)(i); if (memb_func[i].current) { double* x1 = rv_; // use as temporary storage double* x2 = jv_; // zero rhs, save v for (in = 0; in < ml->nodecount; ++in) { Node* nd = ml->nodelist[in]; for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { *pvdot_[is] = 0.; } x1[in] = NODEV(nd); } // increment v only once in case there are multiple // point processes at the same location for (in = 0; in < ml->nodecount; ++in) { Node* nd = ml->nodelist[in]; if (x1[in] == NODEV(nd)) { NODEV(nd) += delta_; } } // compute rhs. this is the rhs(v+dv) ode(i, ml); // save rhs, restore v, and zero rhs for (in = 0; in < ml->nodecount; ++in) { Node* nd = ml->nodelist[in]; for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { x2[is] = *pvdot_[is]; *pvdot_[is] = 0; } NODEV(nd) = x1[in]; } // compute the rhs(v) ode(i, ml); // fill the ds/dv elements for (in = 0; in < ml->nodecount; ++in) { Node* nd = ml->nodelist[in]; for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { double ds = (x2[is] - *pvdot_[is])/delta_; if (ds != 0.) { double* elm = cmplx_spGetElement(m_, is+1, v_index_[nd->v_node_index]); elm[0] = -ds; } } } } ieq += cnt*nc; } } } void NonLinImpRep::dsds() { int ieq, i, in, is, iis, ks, kks; NrnThread* nt = nrn_threads; // jw term for (i = neq_v_; i < neq_; ++i) { diag_[i][1] += omega_; } ieq = neq_v_; for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; i = tml->index; if (memb_func[i].ode_count && ml->nodecount) { int nc = ml->nodecount; Pfridot s = (Pfridot)memb_func[i].ode_count; int cnt = (*s)(i); double* x1 = rv_; // use as temporary storage double* x2 = jv_; // zero rhs, save s for (in = 0; in < ml->nodecount; ++in) { for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { *pvdot_[is] = 0.; x1[is] = *pv_[is]; } } // compute rhs. this is the rhs(s) ode(i, ml); // save rhs for (in = 0; in < ml->nodecount; ++in) { for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { x2[is] = *pvdot_[is]; } } // iterate over the states for (kks=0; kks < cnt; ++kks) { // zero rhs, increment s(ks) for (in = 0; in < ml->nodecount; ++in) { ks = ieq + in*cnt + kks; for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { *pvdot_[is] = 0.; } *pv_[ks] += deltavec_[ks]; } ode(i, ml); // store element and restore s // fill the ds/dv elements for (in = 0; in < ml->nodecount; ++in) { Node* nd = ml->nodelist[in]; ks = ieq + in*cnt + kks; for (is = ieq + in*cnt, iis = 0; iis < cnt; ++iis, ++is) { double ds = ( *pvdot_[is] - x2[is])/deltavec_[is]; if (ds != 0.) { double* elm = cmplx_spGetElement(m_, is+1, ks+1); elm[0] = -ds; } *pv_[ks] = x1[ks]; } } // perhaps not necessary but ensures the last computation is with // the base states. ode(i, ml); } ieq += cnt*nc; } } } void NonLinImpRep::current(int im, Memb_list* ml, int in) { // assume there is in fact a current method Pfridot s = (Pfridot)memb_func[im].current; // fake a 1 element memb_list Memb_list mfake; #if CACHEVEC != 0 mfake.nodeindices = ml->nodeindices + in; #endif mfake.nodelist = ml->nodelist+in; mfake.data = ml->data + in; mfake.pdata = ml->pdata + in; mfake.prop = ml->prop + in; mfake.nodecount = 1; mfake._thread = ml->_thread; (*s)(nrn_threads, &mfake, im); } void NonLinImpRep::ode(int im, Memb_list* ml) { // assume there is in fact an ode method int i, nc; Pfridot s = (Pfridot)memb_func[im].ode_spec; nc = ml->nodecount; if (memb_func[im].hoc_mech) { int j, count; count = ml->nodecount; for (j=0; j < count; ++j) { Node* nd = ml->nodelist[j]; (*s)(nd, ml->prop[j]); } }else{ (*s)(nrn_threads, ml, im); } } int NonLinImpRep::gapsolve() { // On entry, rv_ and jv_ contain the complex b for A*x = b. // On return rv_ and jv_ contain complex solution, x. // m_ is the factored matrix for the trees without gap junctions // Jacobi method (easy for parallel) // A = D + R // D*x_(k+1) = (b - R*x_(k)) // D is m_ (and includes the gap junction contribution to the diagonal) // R is the off diagonal matrix of the gaps. // one and only one stimulus #if NRNMPI if (nrnmpi_numprocs > 1 && nrnmpi_int_sum_reduce(iloc_ >= 0 ? 1 : 0) != 1) { if (nrnmpi_myid == 0) { hoc_execerror("there can be one and only one impedance stimulus", 0); } } #endif double *rx, *jx, *rx1, *jx1, *rb, *jb; if (neq_) { rx = new double[neq_]; jx = new double[neq_]; rx1 = new double[neq_]; jx1 = new double[neq_]; rb = new double[neq_]; jb = new double[neq_]; } // initialize for first iteration for (int i=0; i < neq_; ++i) { rx[i] = jx[i] = 0.0; rb[i] = rv_[i]; jb[i] = jv_[i]; } pargap_jacobi_setup(0); // iterate till change in x is small double tol = 1e-9; double delta; int success = 0; int iter; for (iter = 1; iter <= maxiter_; ++iter) { if (neq_) { cmplx_spSolve(m_, rb-1, rx1-1, jb-1, jx1-1); } // if any change in x > tol, then do another iteration. success = 1; delta = 0.0; for (int i=0; i < neq_; ++i) { double err = fabs(rx1[i] - rx[i]) + fabs(jx1[i] - jx[i]); if (err > tol) { success = 0; } if (delta < err) { delta = err; } } #if NRNMPI if (nrnmpi_numprocs > 1) { success = nrnmpi_int_sum_reduce(success) / nrnmpi_numprocs; } #endif if (success) { for (int i=0; i < neq_; ++i) { rv_[i] = rx1[i]; jv_[i] = jx1[i]; } break; } // setup for next iteration for (int i=0; i < neq_; ++i) { rx[i] = rx1[i]; jx[i] = jx1[i]; rb[i] = rv_[i]; jb[i] = jv_[i]; } pargap_jacobi_rhs(rb, rx); pargap_jacobi_rhs(jb, jx); } pargap_jacobi_setup(1); // tear down if (neq_) { delete [] rx; delete [] jx; delete [] rx1; delete [] jx1; delete [] rb; delete [] jb; } if (!success) { char buf[256]; sprintf(buf, "Impedance calculation did not converge in %d iterations. Max state change on last iteration was %g (Iterations stop at %g)\n", maxiter_, delta, tol); execerror(buf, 0); } return iter; } neuron-7.5/src/nrniv/nonlinz.h000077500000000000000000000007001323325274500164640ustar00rootroot00000000000000#ifndef nonlinz_h #define nonlinz_h class NonLinImpRep; class NonLinImp { public: NonLinImp(); virtual ~NonLinImp(); void compute(double omega, double deltafac, int maxiter); double transfer_amp(int vloc); // v_node[arg] is the node double transfer_phase(int vloc); double input_amp(int curloc); double input_phase(int curloc); double ratio_amp(int clmploc, int vloc); int solve(int curloc); private: NonLinImpRep* rep_; }; #endif neuron-7.5/src/nrniv/nrnbbcore_write.cpp000066400000000000000000001373051323325274500205250ustar00rootroot00000000000000#include <../../nrnconf.h> // A model built using NEURON is heavyweight in memory usage and that // prevents maximizing the number of cells that can be simulated on // a process. On the other hand, a tiny version of NEURON that contains // only the cache efficient structures, minimal memory usage arrays, // needed to do a simulation (no interpreter, hoc Objects, Section, etc.) // lacks the model building flexibility of NEURON. // Ideally, the only arrays needed for a tiny version simulation are those // enumerated in the NrnThread structure in src/nrnoc/multicore.h up to, // but not including, the Node** arrays. Also tiny versions of POINT_PROCESS, // PreSyn, NetCon, and SUFFIX mechanisms will be stripped down from // their full NEURON definitions and, it seems certain, many of the // double fields will be converted to some other, less memory using, types. // With this in mind, we envision that NEURON will incrementally construct // cache efficient whole cell structures which can be saved and read with // minimal processing into the tiny simulator. Note that this is a petabyte // level of data volume. Consider, for example, 128K cores each // preparing model data for several thousand cells using full NEURON where // there is not enough space for the simultaneous existence of // those several thousand cells --- but there is with the tiny version. // Several assumptions with regard to the nrnbbcore_read reader. // Since memory is filled with cells, whole cell // load balance should be adequate and so there is no provision for // multisplit. A process gets a list of the gid owned by that process // and allocates the needed // memory based on size variables for each gid, i.e. // number of nodes, number of instances of each mechanism type, and number // of NetCon instances. Also the offsets are calculated for where the // cell information is to reside in the cache efficient arrays. // The rest of the cell information is then copied // into memory with the proper offsets. Pointers to data, used in the old // NEURON world are converted to integer indices into a common data array. // A good deal of conceptual confusion resulted in earlier implementations // with regard to ordering of synapses and // artificial cells with and without gids. The ordering of the property // data for those is defined by the order in the NrnThread.tml list where // every Memb_list.data has an easily found index relative to its 'nodecount'. // (For artificial cells, since those are not ordered in a cache efficient // array, we get the index using int nrncore_art2index(double* param) // which looks up the index in a hash table. Earlier implementations // handled 'artificial cells without gids' specially which also // necessitated special handling of their NetCons and disallowed artificial // cells with gids. We now handle all artificial cells in a thread // in the same way as any other synapse (the assumption still holds that // any artificial cell without a gid in a thread can connect only to // targets in the same thread. Thus, a single NrnThread.synapses now contains // all synapses and all artificial cells belonging to that thread. All // the synapses and artificial cells are in NrnThread.tml order. So there // are no exceptions in filling Point_process pointers from the data indices // on the corebluron side. PreSyn ordering is a bit more delicate. // From netpar.cpp, the gid2out_ hash table defines an output_gid // ordering and gives us all the PreSyn // associated with real and artificial cells having gids. But those are // randomly ordered and interleaved with 'no gid instances' // relative to the tml ordering. // Since the number of output PreSyn >= number of output_gid it makes sense // to order the PreSyn in the same way as defined by the tml ordering. // Thus, even though artificial cells with and without gids are mixed, // at least it is convenient to fill the PreSyn.psrc field. // Synapses are first but the artificial cells with and without gids are // mixed. The problem that needs to // be explicitly overcome is associating output gids with the proper PreSyn // and that can be done with a list parallel to the acell part of the // output_gid list that specifies the PreSyn list indices. // Note that allocation of large arrays allows considerable space savings // by eliminating overhead involved in allocation of many individual // instances. /* Assumptions regarding the scope of possible models.(Incomplete list) All real cells have gids. Artificial cells without gids connect only to cells in the same thread. No POINTER to data outside of NrnThread. No POINTER to data in ARTIFICIAL_CELL (that data is not cache_efficient) nt->tml->pdata is not cache_efficient */ // See corebluron/src/simcore/nrniv/nrn_setup.cpp for a description of // the file format written by this file. #include #include #include #include #include #include #include #include #include #include // for nrnbbcore_vecplay_write #include // for nrnbbcore_vecplay_write #include extern NetCvode* net_cvode_instance; extern "C" { // to end of file extern void hoc_execerror(const char*, const char*); extern int* nrn_prop_param_size_; extern int* nrn_prop_dparam_size_; static int* bbcore_dparam_size; // cvodeieq not present extern char* pnt_map; extern short* nrn_is_artificial_; extern int nrn_is_ion(int type); extern double nrn_ion_charge(Symbol* sym); extern Symbol* hoc_lookup(const char*); extern int secondorder; /* not NULL, need to write gap information */ extern void (*nrnthread_v_transfer_)(NrnThread*); extern size_t nrnbbcore_gap_write(const char* path, int* group_ids); typedef void (*bbcore_write_t)(double*, int*, int*, int*, double*, Datum*, Datum*, NrnThread*); extern bbcore_write_t* nrn_bbcore_write_; static CellGroup* mk_cellgroups(); // gid, PreSyn, NetCon, Point_process relation. static void datumtransform(CellGroup*); // Datum.pval to int static void datumindex_fill(int, CellGroup&, DatumIndices&, Memb_list*); //helper static void write_memb_mech_types(const char* fname); static void write_globals(const char* fname); static void write_nrnthread(const char* fname, NrnThread& nt, CellGroup& cg); static void write_nrnthread_task(const char*, CellGroup* cgs); static int* datum2int(int type, Memb_list* ml, NrnThread& nt, CellGroup& cg, DatumIndices& di, int* ml_data_offset, int* ml_vdata_offset); static void setup_nrn_has_net_event(); static int chkpnt; // Up to now all the artificial cells have been left out of the processing. // Since most processing is in the context of iteration over nt.tml it // might be easiest to transform the loops using a // copy of nt.tml with artificial cell types belonging to nt at the end. // Treat these artificial cell memb_list as much as possible like the others. // The only issue is that data for artificial cells is not in cache order // (after all there is no BREAKPOINT or SOLVE block for ARTIFICIAL_CELLs) // so we assume there will be no POINTER usage into that data. // Also, note that ml.nodecount for artificial cell does not refer to // a list of voltage nodes but just to the count of instances. static NrnThreadMembList** tml_with_art; // nrn_nthread of them static void mk_tml_with_art(void); declareNrnHash(PVoid2Int, void*, int) implementNrnHash(PVoid2Int, void*, int) PVoid2Int* artdata2index_; /** mapping information */ static NrnMappingInfo mapinfo; // to avoid incompatible dataset between neuron and coreneuron // add version string to the dataset files const char *bbcore_write_version = "1.0"; // accessible from ParallelContext.total_bytes() size_t nrnbbcore_write() { if (!use_cachevec) { hoc_execerror("nrnbbcore_write requires cvode.cache_efficient(1)", NULL); } NrnThread* nt; NrnThreadMembList* tml; if (!bbcore_dparam_size) { bbcore_dparam_size = new int[n_memb_func]; } char fname[1024]; char path[1024]; sprintf(path, "."); if (ifarg(1)) { strcpy(path, hoc_gargstr(1)); } for (int i=0; i < n_memb_func; ++i) { int sz = nrn_prop_dparam_size_[i]; bbcore_dparam_size[i] = sz; Memb_func* mf = memb_func + i; if (mf && mf->dparam_semantics && sz && mf->dparam_semantics[sz-1] == -3) { // cvode_ieq in NEURON but not CoreNEURON bbcore_dparam_size[i] = sz - 1; } } setup_nrn_has_net_event(); mk_tml_with_art(); sprintf(fname, "%s/%s", path, "bbcore_mech.dat"); write_memb_mech_types(fname); sprintf(fname, "%s/%s", path, "globals.dat"); write_globals(fname); size_t rankbytes = 0; size_t nbytes; FOR_THREADS(nt) { size_t threadbytes = 0; size_t npnt = 0; size_t nart = 0; int ith = nt->id; //printf("rank %d thread %d\n", nrnmpi_myid, ith); //printf(" ncell=%d nnode=%d\n", nt->ncell, nt->end); //v_parent_index, _actual_a, _actual_b, _actual_area nbytes = nt->end * (1*sizeof(int) + 3*sizeof(double)); threadbytes += nbytes; int mechcnt = 0; size_t mechcnt_instances = 0; for (tml = tml_with_art[ith]; tml; tml = tml->next) { ++mechcnt; Memb_list* ml = tml->ml; mechcnt_instances += ml->nodecount; npnt += (memb_func[tml->index].is_point ? ml->nodecount : 0); int psize = nrn_prop_param_size_[tml->index]; int dpsize = nrn_prop_dparam_size_[tml->index]; // includes cvodeieq if present //printf("%d %s ispnt %d cnt %d psize %d dpsize %d\n",tml->index, memb_func[tml->index].sym->name, //memb_func[tml->index].is_point, ml->nodecount, psize, dpsize); // nodeindices, data, pdata + pnt with prop int notart = nrn_is_artificial_[tml->index] ? 0 : 1; if (nrn_is_artificial_[tml->index]) { nart += ml->nodecount; } nbytes = ml->nodecount * (notart*sizeof(int) + 1*sizeof(double*) + 1*sizeof(Datum*) + psize*sizeof(double) + dpsize*sizeof(Datum)); threadbytes += nbytes; } nbytes += npnt * (sizeof(Point_process) + sizeof(Prop)); //printf(" mech in use %d Point instances %ld artcells %ld total instances %ld\n", //mechcnt, npnt, nart, mechcnt_instances); //printf(" thread bytes %ld\n", threadbytes); rankbytes += threadbytes; } rankbytes += nrncore_netpar_bytes(); //printf("%d bytes %ld\n", nrnmpi_myid, rankbytes); CellGroup* cgs = mk_cellgroups(); datumtransform(cgs); for (int i=0; i < nrn_nthread; ++i) { chkpnt = 0; write_nrnthread(path, nrn_threads[i], cgs[i]); } /** write mapping information */ if(mapinfo.size()) { int gid = cgs[0].group_id; nrn_write_mapping_info(path, gid, mapinfo); mapinfo.clear(); } if (nrnthread_v_transfer_) { // see partrans.cpp. nrn_nthread files of path/icg_gap.dat int* group_ids = new int[nrn_nthread]; for (int i=0; i < nrn_nthread; ++i) { group_ids[i] = cgs[i].group_id; } nrnbbcore_gap_write(path, group_ids); delete [] group_ids; } if (artdata2index_) { delete artdata2index_; artdata2index_ = NULL; } // filename data might have to be collected at hoc level since // pc.nrnbbcore_write might be called // many times per rank since model may be built as series of submodels. if (ifarg(2)) { Vect* cgidvec = vector_arg(2); vector_resize(cgidvec, nrn_nthread); double* px = vector_vec(cgidvec); for (int i=0; i < nrn_nthread; ++i) { px[i] = double(cgs[i].group_id); } }else{ write_nrnthread_task(path, cgs); } if (tml_with_art) { for (int ith=0; ith < nrn_nthread; ++ith) { NrnThreadMembList* tmlnext; for (tml = tml_with_art[ith]; tml; tml = tmlnext) { tmlnext = tml->next; delete tml; } } tml_with_art = NULL; } return rankbytes; } int nrncore_art2index(double* d) { int i; assert(artdata2index_->find(d, i)); return i; } extern "C" { extern int nrn_has_net_event_cnt_; extern int* nrn_has_net_event_; } static int* has_net_event_; static void setup_nrn_has_net_event() { if (has_net_event_) { return; } has_net_event_ = new int[n_memb_func]; for (int i=0; i < n_memb_func; ++i) { has_net_event_[i] = 0; } for(int i=0; i < nrn_has_net_event_cnt_; ++i) { has_net_event_[nrn_has_net_event_[i]] = 1; } } static int nrn_has_net_event(int type) { return has_net_event_[type]; } void mk_tml_with_art() { // copy NrnThread tml list and append ARTIFICIAL cell types // but do not include PatternStim tml_with_art = new NrnThreadMembList*[nrn_nthread]; // copy from NrnThread NrnThreadMembList *tml1, *tml2; NrnThreadMembList** tail = new NrnThreadMembList*[nrn_nthread]; for (int id = 0; id < nrn_nthread; ++id) { tml2 = tml_with_art[id] = NULL; for (tml1 = nrn_threads[id].tml; tml1; tml1 = tml1->next) { if (tml_with_art[id] == NULL) { tml2 = new NrnThreadMembList; tml_with_art[id] = tml2; }else{ tml2->next = new NrnThreadMembList; tml2 = tml2->next; } tml2->index = tml1->index; tml2->ml = tml1->ml; tml2->next = NULL; } tail[id] = tml2; } int *acnt = new int[nrn_nthread]; artdata2index_ = new PVoid2Int(1000); for (int i = 0; i < n_memb_func; ++i) { if (nrn_is_artificial_[i] && memb_list[i].nodecount) { // skip PatternStim if (strcmp(memb_func[i].sym->name, "PatternStim") == 0) { continue; } if (strcmp(memb_func[i].sym->name, "HDF5Reader") == 0) { continue; } Memb_list* ml = memb_list + i; // how many artificial in each thread for (int id = 0; id < nrn_nthread; ++id) {acnt[id] = 0;} for (int j = 0; j < memb_list[i].nodecount; ++j) { Point_process* pnt = (Point_process*)memb_list[i].pdata[j][1]._pvoid; int id = ((NrnThread*)pnt->_vnt)->id; ++acnt[id]; } // allocate for (int id = 0; id < nrn_nthread; ++id) { if (acnt[id]) { NrnThreadMembList* tml3 = new NrnThreadMembList; tml3->next = NULL; tml3->index = i; tml3->ml = new Memb_list; tml3->ml->nodecount = acnt[id]; tml3->ml->nodelist = NULL; tml3->ml->nodeindices = NULL; tml3->ml->prop = NULL; tml3->ml->_thread = NULL; tml3->ml->data = new double*[acnt[id]]; tml3->ml->pdata = new Datum*[acnt[id]]; // link at tail if (tml_with_art[id] == NULL) { tml_with_art[id] = tail[id] = tml3; }else{ tail[id]->next = tml3; tail[id] = tml3; } } } // fill data and pdata pointers // and fill the artdata2index hash table for (int id = 0; id < nrn_nthread; ++id) {acnt[id] = 0;} for (int j = 0; j < memb_list[i].nodecount; ++j) { Point_process* pnt = (Point_process*)memb_list[i].pdata[j][1]._pvoid; int id = ((NrnThread*)pnt->_vnt)->id; assert(tail[id]->index == i); Memb_list* ml = tail[id]->ml; ml->data[acnt[id]] = memb_list[i].data[j]; ml->pdata[acnt[id]] = memb_list[i].pdata[j]; artdata2index_->insert(ml->data[acnt[id]], acnt[id]); ++acnt[id]; } } } delete [] tail; delete [] acnt; } CellGroup::CellGroup() { n_output = n_real_output = n_presyn = n_netcon = n_mech = ntype = 0; group_id = -1; output_gid = output_vindex = 0; netcons = 0; output_ps = 0; ndiam = 0; netcon_srcgid = netcon_pnttype = netcon_pntindex = 0; datumindices = 0; type2ml = new Memb_list*[n_memb_func]; for (int i=0; i < n_memb_func; ++i) { type2ml[i] = 0; } } CellGroup::~CellGroup() { if (output_gid) delete [] output_gid; if (output_vindex) delete [] output_vindex; if (netcon_srcgid) delete [] netcon_srcgid; if (netcon_pnttype) delete [] netcon_pnttype; if (netcon_pntindex) delete [] netcon_pntindex; if (datumindices) delete [] datumindices; if (netcons) delete [] netcons; if (output_ps) delete [] output_ps; delete [] type2ml; } DatumIndices::DatumIndices() { type = -1; ion_type = ion_index = 0; } DatumIndices::~DatumIndices() { if (ion_type) delete [] ion_type; if (ion_index) delete [] ion_index; } // use the Hoc NetCon object list to segregate according to threads // and fill the CellGroup netcons, netcon_srcgid, netcon_pnttype, and // netcon_pntindex (called at end of mk_cellgroups); static void mk_cgs_netcon_info(CellGroup* cgs) { // count the netcons for each thread int* nccnt = new int[nrn_nthread]; for (int i=0; i < nrn_nthread; ++i) { nccnt[i] = 0; } Symbol* ncsym = hoc_lookup("NetCon"); hoc_List* ncl = ncsym->u.ctemplate->olist; hoc_Item* q; ITERATE(q, ncl) { Object* ho = (Object*)VOIDITM(q); NetCon* nc = (NetCon*)ho->u.this_pointer; int ith = 0; // if no _vnt, put in thread 0 if (nc->target_ && nc->target_->_vnt) { ith = ((NrnThread*)(nc->target_->_vnt))->id; } ++nccnt[ith]; } // allocate for (int i=0; i < nrn_nthread; ++i) { cgs[i].n_netcon = nccnt[i]; cgs[i].netcons = new NetCon*[nccnt[i]+1]; cgs[i].netcon_srcgid = new int[nccnt[i]+1]; cgs[i].netcon_pnttype = new int[nccnt[i]+1]; cgs[i].netcon_pntindex = new int[nccnt[i]+1]; } // reset counts and fill for (int i=0; i < nrn_nthread; ++i) { nccnt[i] = 0; } ITERATE(q, ncl) { Object* ho = (Object*)VOIDITM(q); NetCon* nc = (NetCon*)ho->u.this_pointer; int ith = 0; // if no _vnt, put in thread 0 if (nc->target_ && nc->target_->_vnt) { ith = ((NrnThread*)(nc->target_->_vnt))->id; } int i = nccnt[ith]; cgs[ith].netcons[i] = nc; if (nc->target_) { int type = nc->target_->prop->type; cgs[ith].netcon_pnttype[i] = type; if (nrn_is_artificial_[type]) { cgs[ith].netcon_pntindex[i] = nrncore_art2index(nc->target_->prop->param); }else{ // cache efficient so can calculate index from pointer Memb_list* ml = cgs[ith].type2ml[type]; int sz = nrn_prop_param_size_[type]; double* d1 = ml->data[0]; double* d2 = nc->target_->prop->param; assert(d2 >= d1 && d2 < (d1 + (sz*ml->nodecount))); int ix = (d2 - d1)/sz; cgs[ith].netcon_pntindex[i] = ix; } }else{ cgs[ith].netcon_pnttype[i] = 0; cgs[ith].netcon_pntindex[i] = -1; } if (nc->src_) { PreSyn* ps = nc->src_; if (ps->gid_ >= 0) { cgs[ith].netcon_srcgid[i] = ps->gid_; }else{ if (ps->osrc_) { assert(ps->thvar_ == NULL); Point_process* pnt = (Point_process*)ps->osrc_->u.this_pointer; int type = pnt->prop->type; if (nrn_is_artificial_[type]) { int ix = nrncore_art2index(pnt->prop->param); cgs[ith].netcon_srcgid[i] = -(type + 1000*ix); }else{ assert(nrn_has_net_event(type)); Memb_list* ml = cgs[ith].type2ml[type]; int sz = nrn_prop_param_size_[type]; double* d1 = ml->data[0]; double* d2 = pnt->prop->param; assert(d2 >= d1 && d2 < (d1 + (sz*ml->nodecount))); int ix = (d2 - d1)/sz; cgs[ith].netcon_srcgid[i] = -(type + 1000*ix); } }else{ cgs[ith].netcon_srcgid[i] = -1; } } }else{ cgs[ith].netcon_srcgid[i] = -1; } ++nccnt[ith]; } delete [] nccnt; } CellGroup* mk_cellgroups() { CellGroup* cgs = new CellGroup[nrn_nthread]; for (int i=0; i < nrn_nthread; ++i) { int ncell = nrn_threads[i].ncell; // real cell count int npre = ncell; for (NrnThreadMembList* tml = tml_with_art[i]; tml; tml = tml->next) { cgs[i].type2ml[tml->index] = tml->ml; if (nrn_has_net_event(tml->index)) { npre += tml->ml->nodecount; } } cgs[i].n_presyn = npre; cgs[i].n_real_output = ncell; cgs[i].output_ps = new PreSyn*[npre]; cgs[i].output_gid = new int[npre]; cgs[i].output_vindex = new int[npre]; // in case some cells do not have voltage presyns (eg threshold detection // computed from a POINT_PROCESS NET_RECEIVE with WATCH and net_event) // initialize as unused. for (int j=0; j < npre; ++j) { cgs[i].output_ps[j] = NULL; cgs[i].output_gid[j] = -1; cgs[i].output_vindex[j] = -1; } // fill in the artcell info npre = ncell; cgs[i].n_output = ncell; // add artcell (and PP with net_event) with gid in following loop for (NrnThreadMembList* tml = tml_with_art[i]; tml; tml = tml->next) { if (nrn_has_net_event(tml->index)) { for (int j=0; j < tml->ml->nodecount; ++j) { Point_process* pnt = (Point_process*)tml->ml->pdata[j][1]._pvoid; PreSyn* ps = (PreSyn*)pnt->presyn_; cgs[i].output_ps[npre] = ps; int agid = -1; if (nrn_is_artificial_[tml->index]) { agid = -(tml->index + 1000*nrncore_art2index(pnt->prop->param)); }else{ // POINT_PROCESS with net_event Memb_list* ml = tml->ml; int sz = nrn_prop_param_size_[tml->index]; double* d1 = ml->data[0]; double* d2 = pnt->prop->param; assert(d2 >= d1 && d2 < (d1 + (sz*ml->nodecount))); int ix = (d2 - d1)/sz; agid = -(tml->index + 1000*ix); } if (ps) { if (ps->output_index_ >= 0) { // has gid cgs[i].output_gid[npre] = ps->output_index_; if (cgs[i].group_id < 0) { cgs[i].group_id = ps->output_index_; } ++cgs[i].n_output; }else{ cgs[i].output_gid[npre] = agid; } }else{ // if an acell is never a source, it will not have a presyn cgs[i].output_gid[npre] = -1; } // the way we associate an acell PreSyn with the Point_process. cgs[i].output_vindex[npre] = agid; ++npre; } } } } // work at netpar.cpp because we don't have the output gid hash tables here. // fill in the output_ps, output_gid, and output_vindex for the real cells. nrncore_netpar_cellgroups_helper(cgs); // use first real cell gid, if it exists, as the group_id for (int i=0; i < nrn_nthread; ++i) { if (cgs[i].n_real_output && cgs[i].output_gid[0] >= 0) { cgs[i].group_id = cgs[i].output_gid[0]; } } // use the Hoc NetCon object list to segregate according to threads // and fill the CellGroup netcons, netcon_srcgid, netcon_pnttype, and // netcon_pntindex mk_cgs_netcon_info(cgs); return cgs; } void datumtransform(CellGroup* cgs) { // ions, area, and POINTER to v. for (int ith=0; ith < nrn_nthread; ++ith) { NrnThread& nt = nrn_threads[ith]; CellGroup& cg = cgs[ith]; // how many mechanisms in use and how many DatumIndices do we need. for (NrnThreadMembList* tml = tml_with_art[ith]; tml; tml = tml->next) { ++cg.n_mech; if (tml->ml->pdata[0]) { ++cg.ntype; } } cg.datumindices = new DatumIndices[cg.ntype]; // specify type, allocate the space, and fill the indices int i=0; for (NrnThreadMembList* tml = tml_with_art[ith]; tml; tml = tml->next) { int sz = bbcore_dparam_size[tml->index]; if (sz) { DatumIndices& di = cg.datumindices[i++]; di.type = tml->index; Memb_list* ml = tml->ml; int n = ml->nodecount * sz; di.ion_type = new int[n]; di.ion_index = new int[n]; // fill the indices. // had tointroduce a memb_func[i].dparam_semantics registered by each mod file. datumindex_fill(ith, cg, di, ml); } } } } void datumindex_fill(int ith, CellGroup& cg, DatumIndices& di, Memb_list* ml) { NrnThread& nt = nrn_threads[ith]; double* a = nt._actual_area; int nnode = nt.end; int mcnt = ml->nodecount; int dsize = bbcore_dparam_size[di.type]; if (dsize == 0) { return; } int* dmap = memb_func[di.type].dparam_semantics; assert(dmap); // what is the size of the nt._vdata portion needed for a single ml->dparam[i] int vdata_size = 0; for (int i=0; i < dsize; ++i) { int* ds = memb_func[di.type].dparam_semantics; if (ds[i] == -4 || ds[i] == -6 || ds[i] == -7 || ds[i] == 0) { ++vdata_size; } } int isart = nrn_is_artificial_[di.type]; for (int i=0; i < mcnt; ++i) { // Prop* datum instance arrays are not in cache efficient order // ie. ml->pdata[i] are not laid out end to end in memory. // Also, ml->data for artificial cells is not in cache efficient order // but in the artcell case there are no pointers to doubles and // the _actual_area pointer should be left unfilled. Datum* dparam = ml->pdata[i]; int offset = i*dsize; int vdata_offset = i*vdata_size; for (int j=0; j < dsize; ++j) { int etype = -100; // uninterpreted int eindex = -1; if (dmap[j] == -1) { // double* into _actual_area if (isart) { etype = -1; eindex = -1; // the signal to ignore in bbcore. }else{ if (dparam[j].pval == &ml->nodelist[i]->_area) { // possibility it points directly into Node._area instead of // _actual_area. For our purposes we need to figure out the // _actual_area index. etype = -1; eindex = ml->nodeindices[i]; assert(a[ml->nodeindices[i]] == *dparam[j].pval); }else{ if (dparam[j].pval < a || dparam[j].pval >= (a + nnode)){ printf("%s dparam=%p a=%p a+nnode=%p j=%d\n", memb_func[di.type].sym->name, dparam[j].pval, a, a+nnode, j); abort(); } assert(dparam[j].pval >= a && dparam[j].pval < (a + nnode)); etype = -1; eindex = dparam[j].pval - a; } } }else if (dmap[j] == -2) { // this is an ion and dparam[j][0].i is the iontype etype = -2; eindex = dparam[j].i; }else if (dmap[j] == -3) { // cvodeieq is always last and never seen assert(dmap[j] != -3); }else if (dmap[j] == -4) { // netsend (_tqitem pointer) // eventually index into nt->_vdata etype = -4; eindex = vdata_offset++; }else if (dmap[j] == -6) { // pntproc // eventually index into nt->_vdata etype = -6; eindex = vdata_offset++; }else if (dmap[j] == -7) { // bbcorepointer // eventually index into nt->_vdata etype = -6; eindex = vdata_offset++; }else if (dmap[j] == -8) { // watch etype = -8; eindex = 0; }else if (dmap[j] == -9) { // diam cg.ndiam = nt.end; etype = -9; // Rare for a mechanism to use dparam pointing to diam. // MORPHOLOGY was never made cache efficient. And // is not in the tml_with_art. // Need to determine this node and then simple to search its // mechanism list for MORPHOLOGY and then know the diam. Node* nd = ml->nodelist[i]; double* pdiam = NULL; for (Prop* p = nd->prop; p; p = p->next) { if (p->type == MORPHOLOGY) { pdiam = p->param; break; } } assert(dparam[j].pval == pdiam); eindex = ml->nodeindices[i]; }else if (dmap[j] == -5) { // POINTER // must be a pointer into nt->_data. Handling is similar to eion so // give proper index into the type. double* pd = dparam[j].pval; etype = 0; if (pd >= nt._actual_v && pd < (nt._actual_v + nnode)) { etype = -5; // signifies an index into voltage array portion of _data eindex = pd - nt._actual_v; }else{ for (NrnThreadMembList* tml = nt.tml; tml; tml = tml->next) { if (nrn_is_artificial_[tml->index]) { continue; } Memb_list* ml1 = tml->ml; int nn = nrn_prop_param_size_[tml->index] * ml1->nodecount; if (pd >= ml1->data[0] && pd < (ml1->data[0] + nn)) { etype = tml->index; eindex = pd - ml1->data[0]; break; } } fprintf(stderr, "POINTER is not pointing to voltage or mechanism data. Perhaps it should be a BBCOREPOINTER\n"); assert(etype != 0); } // pointer into one of the tml types? }else if (dmap[j] > 0 && dmap[j] < 1000) { // double* into eion type data Memb_list* eml = cg.type2ml[dmap[j]]; assert(eml); if(dparam[j].pval < eml->data[0]){ printf("%s dparam=%p data=%p j=%d etype=%d %s\n", memb_func[di.type].sym->name, dparam[j].pval, eml->data[0], j, dmap[j], memb_func[dmap[j]].sym->name); abort(); } assert(dparam[j].pval >= eml->data[0]); etype = dmap[j]; if (dparam[j].pval >= (eml->data[0] + (nrn_prop_param_size_[etype] * eml->nodecount))) { printf("%s dparam=%p data=%p j=%d psize=%d nodecount=%d etype=%d %s\n", memb_func[di.type].sym->name, dparam[j].pval, eml->data[0], j, nrn_prop_param_size_[etype], eml->nodecount, etype, memb_func[etype].sym->name); } assert(dparam[j].pval < (eml->data[0] + (nrn_prop_param_size_[etype] * eml->nodecount))); eindex = dparam[j].pval - eml->data[0]; }else if (dmap[j] > 1000) {//int* into ion dparam[xxx][0] //store the actual ionstyle etype = dmap[j]; eindex = *((int*)dparam[j]._pvoid); } else { char errmes[100]; sprintf(errmes, "Unknown semantics type %d for dparam item %d of", dmap[j], j); hoc_execerror(errmes, memb_func[di.type].sym->name); } di.ion_type[offset + j] = etype; di.ion_index[offset + j] = eindex; } } } static void write_memb_mech_types(const char* fname) { // list of Memb_func names, types, point type info, is_ion // and data, pdata instance sizes. If the mechanism is an eion type, // the following line is the charge. // Not all Memb_func are necessarily used in the model. if (nrnmpi_myid > 0) { return; } // only rank 0 writes this file FILE* f = fopen(fname, "wb"); if (!f) { hoc_execerror("nrnbbcore_write write_mem_mech_types could not open for writing: %s\n", fname); } fprintf(f, "%s\n", bbcore_write_version); fprintf(f, "%d\n", n_memb_func); for (int type=2; type < n_memb_func; ++type) { Memb_func& mf = memb_func[type]; fprintf(f, "%s %d %d %d %d %d %d\n", mf.sym->name, type, pnt_map[type], // the pointtype, 0 means not a POINT_PROCESS nrn_is_artificial_[type], nrn_is_ion(type), nrn_prop_param_size_[type], bbcore_dparam_size[type] ); if (nrn_is_ion(type)) { fprintf(f, "%g\n", nrn_ion_charge(mf.sym)); } } // tack on an endian sentinal value so reader can determine if byteswap needed. int32_t x = 1.0; fwrite(&x, sizeof(int32_t), 1, f); fclose(f); } // format is name value // with last line of 0 0 //In case of an array, the line is name[num] with num lines following with // one value per line. Values are %.20g format. static void write_globals(const char* fname) { if (nrnmpi_myid > 0) { return; } // only rank 0 writes this file FILE* f = fopen(fname, "w"); if (!f) { hoc_execerror("nrnbbcore_write write_globals could not open for writing: %s\n", fname); } fprintf(f, "%s\n", bbcore_write_version); for (Symbol* sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->subtype == USERDOUBLE) { if (ISARRAY(sp)) { Arrayinfo* a = sp->arayinfo; if (a->nsub == 1) { fprintf(f, "%s[%d]\n", sp->name, a->sub[0]); for (int i=0; i < a->sub[0]; ++i) { char n[256]; sprintf(n, "%s[%d]", sp->name, i); fprintf(f, "%.20g\n", *hoc_val_pointer(n)); } } }else{ fprintf(f, "%s %.20g\n", sp->name, *sp->u.pval); } } } fprintf(f, "0 0\n"); fprintf(f, "secondorder %d\n", secondorder); fclose(f); } void writeint_(int* p, size_t size, FILE* f) { fprintf(f, "chkpnt %d\n", chkpnt++); size_t n = fwrite(p, sizeof(int), size, f); assert(n == size); } void writedbl_(double* p, size_t size, FILE* f) { fprintf(f, "chkpnt %d\n", chkpnt++); size_t n = fwrite(p, sizeof(double), size, f); assert(n == size); } #define writeint(p,size) writeint_(p, size, f) #define writedbl(p,size) writedbl_(p, size, f) static void write_contiguous_art_data(double** data, int nitem, int szitem, FILE* f) { fprintf(f, "chkpnt %d\n", chkpnt++); // the assumption is that an fwrite of nitem groups of szitem doubles can be // fread as a single group of nitem*szitem doubles. for (int i = 0; i < nitem; ++i) { size_t n = fwrite(data[i], sizeof(double), szitem, f); assert(n == szitem); } } // Vector.play information. // Must play into a data element in this thread // File format is # of play instances in this thread (generally VecPlayContinuous) // For each Play instance // VecPlayContinuousType (4), pd (index), y.size, yvec, tvec // Other VecPlay instance types are possible, such as VecPlayContinuous with // a discon vector or VecPlayStep with a DT or tvec, but are not implemented // at present. Assertion errors are generated if not type 0 of if we // cannot determine the index into the NrnThread._data . static void nrnbbcore_vecplay_write(FILE* f, NrnThread& nt, int* ml_data_offset) { // count the instances for this thread // error if not a VecPlayContinuous with no discon vector int n = 0; PlayRecList* fp = net_cvode_instance->fixed_play_; for (int i=0; i < fp->count(); ++i){ if (fp->item(i)->type() == VecPlayContinuousType) { VecPlayContinuous* vp = (VecPlayContinuous*)fp->item(i); if (vp->discon_indices_ == NULL) { if (vp->ith_ == nt.id) { assert(vp->y_ && vp->t_); ++n; } }else{ assert(0); } }else{ assert(0); } } fprintf(f, "%d VecPlay instances\n", n); for (int i=0; i < fp->count(); ++i) { if (fp->item(i)->type() == VecPlayContinuousType) { VecPlayContinuous* vp = (VecPlayContinuous*)fp->item(i); if (vp->discon_indices_ == NULL) { if (vp->ith_ == nt.id) { double* pd = vp->pd_; int found = 0; fprintf(f, "%d\n", vp->type()); for (NrnThreadMembList* tml = nt.tml; tml; tml = tml->next) { if (nrn_is_artificial_[tml->index]) { continue; } Memb_list* ml = tml->ml; int nn = nrn_prop_param_size_[tml->index] * ml->nodecount; if (pd >= ml->data[0] && pd < (ml->data[0] + nn)) { int ix = (pd - ml->data[0]); int sz = vector_capacity(vp->y_); fprintf(f, "%d\n", tml->index); fprintf(f, "%d\n", ix); fprintf(f, "%d\n", sz); writedbl(vector_vec(vp->y_), sz); writedbl(vector_vec(vp->t_), sz); found = 1; break; } } assert(found); } } } } } void write_nrnthread(const char* path, NrnThread& nt, CellGroup& cg) { char fname[1000]; if (cg.n_output <= 0) { return; } assert(cg.group_id >= 0); sprintf(fname, "%s/%d_1.dat", path, cg.group_id); FILE* f = fopen(fname, "wb"); if (!f) { hoc_execerror("nrnbbcore_write write_nrnthread could not open for writing:", fname); } fprintf(f, "%s\n", bbcore_write_version); fprintf(f, "%d npresyn\n", cg.n_presyn); fprintf(f, "%d nnetcon\n", cg.n_netcon); writeint(cg.output_gid, cg.n_presyn); writeint(cg.netcon_srcgid, cg.n_netcon); fclose(f); sprintf(fname, "%s/%d_2.dat", path, cg.group_id); f = fopen(fname, "w"); if (!f) { hoc_execerror("nrnbbcore_write write_nrnthread could not open for writing:", fname); } fprintf(f, "%s\n", bbcore_write_version); NrnThreadMembList* tml; // sizes and data offset int* ml_data_offset = new int[n_memb_func]; int* ml_vdata_offset = new int[n_memb_func]; int data_offset = 6*nt.end; if (cg.ndiam) { data_offset += nt.end; } int vdata_offset = 0; for (int i=0; i < n_memb_func; ++i) { ml_data_offset[i] = -1; // for nt._data ml_vdata_offset[i] = -1; // for nt._vdata } fprintf(f, "%d ngid\n", cg.n_output); fprintf(f, "%d n_real_gid\n", cg.n_real_output); fprintf(f, "%d nnode\n", nt.end); fprintf(f, "%d ndiam\n", cg.ndiam); fprintf(f, "%d nmech\n", cg.n_mech); double* diamvec = NULL; if (cg.ndiam) { diamvec = new double[nt.end]; for (int i=0; i < nt.end; ++i) { Node* nd = nt._v_node[i]; double diam = 0.0; for (Prop* p = nd->prop; p; p = p->next) { if (p->type == MORPHOLOGY) { diam = p->param[0]; break; } } diamvec[i] = diam; } } for (tml=tml_with_art[nt.id]; tml; tml = tml->next) { fprintf(f, "%d\n", tml->index); fprintf(f, "%d\n", tml->ml->nodecount); ml_data_offset[tml->index] = data_offset; data_offset += tml->ml->nodecount*nrn_prop_param_size_[tml->index]; ml_vdata_offset[tml->index] = vdata_offset; int* ds = memb_func[tml->index].dparam_semantics; for (int psz=0; psz < bbcore_dparam_size[tml->index]; ++psz) { if (ds[psz] == -4 || ds[psz] == -6 || ds[psz] == -7 || ds[psz] == 0) { //printf("%s ds[%d]=%d vdata_offset=%d\n", memb_func[tml->index].sym->name, psz, ds[psz], vdata_offset); vdata_offset += tml->ml->nodecount; } } } // printf("ndata=%d nidata=%d nvdata=%d nnetcon=%d\n", data_offset, 0, vdata_offset, cg.n_netcon); fprintf(f, "%d ndata\n", data_offset); fprintf(f, "%d nidata\n", 0); fprintf(f, "%d nvdata\n", vdata_offset); int nweight = 0; for (int i=0; i < cg.n_netcon; ++i) { nweight += cg.netcons[i]->cnt_; } fprintf(f, "%d nweight\n", nweight); // data assert(cg.n_real_output == nt.ncell); writeint(nt._v_parent_index, nt.end); writedbl(nt._actual_a, nt.end); writedbl(nt._actual_b, nt.end); writedbl(nt._actual_area, nt.end); writedbl(nt._actual_v, nt.end); if (diamvec) { writedbl(diamvec, nt.end); delete [] diamvec; } int id = 0; for (tml=tml_with_art[nt.id]; tml; tml=tml->next) { Memb_list* ml = tml->ml; int isart = nrn_is_artificial_[tml->index]; int n = ml->nodecount; int sz = nrn_prop_param_size_[tml->index]; if (isart) { // data may not be contiguous write_contiguous_art_data(ml->data, n, sz, f); }else{ writeint(ml->nodeindices, n); writedbl(ml->data[0], n * sz); } sz = bbcore_dparam_size[tml->index]; if (sz) { int* pdata = datum2int(tml->index, ml, nt, cg, cg.datumindices[id], ml_data_offset, ml_vdata_offset); writeint(pdata, n * sz); ++id; delete [] pdata; } } writeint(cg.output_vindex, cg.n_presyn); double* output_threshold = new double[cg.n_real_output]; for (int i=0; i < cg.n_real_output; ++i) { output_threshold[i] = cg.output_ps[i] ? cg.output_ps[i]->threshold_ : 0.0; } writedbl(output_threshold, cg.n_real_output); delete [] output_threshold; // connections int n = cg.n_netcon; //printf("n_netcon=%d nweight=%d\n", n, nweight); writeint(cg.netcon_pnttype, n); writeint(cg.netcon_pntindex, n); // alloc a weight array and write netcon weights double* weights = new double[nweight]; int iw = 0; for (int i=0; i < n; ++ i) { NetCon* nc = cg.netcons[i]; for (int j=0; j < nc->cnt_; ++j) { weights[iw++] = nc->weight_[j]; } } writedbl(weights, nweight); delete [] weights; // alloc a delay array and write netcon delays double* delays = new double[n]; for (int i=0; i < n; ++ i) { NetCon* nc = cg.netcons[i]; delays[i] = nc->delay_; } writedbl(delays, n); delete [] delays; // special handling for BBCOREPOINTER // how many mechanisms require it n = 0; for (tml=tml_with_art[nt.id]; tml; tml = tml->next) { if (nrn_bbcore_write_[tml->index]) { ++n; } } fprintf(f, "%d bbcorepointer\n", n); // for each of those, what is the mech type and data size // and what is the data for (tml=tml_with_art[nt.id]; tml; tml = tml->next) { if (nrn_bbcore_write_[tml->index]) { fprintf(f, "%d\n", tml->index); Memb_list* ml = tml->ml; int dcnt = 0; int icnt = 0; // data size and allocate for (int i = 0; i < ml->nodecount; ++i) { (*nrn_bbcore_write_[tml->index])(NULL, NULL, &dcnt, &icnt, ml->data[i], ml->pdata[i], ml->_thread, &nt); } fprintf(f, "%d\n%d\n", icnt, dcnt); double* dArray = NULL; int* iArray = NULL; if (icnt) { iArray = new int[icnt]; } if (dcnt) { dArray = new double[dcnt]; } icnt = dcnt = 0; // data values for (int i = 0; i < ml->nodecount; ++i) { (*nrn_bbcore_write_[tml->index])(dArray, iArray, &dcnt, &icnt, ml->data[i], ml->pdata[i], ml->_thread, &nt); } if (icnt) { writeint(iArray, icnt); delete [] iArray; } if (dcnt) { writedbl(dArray, dcnt); delete [] dArray; } } } nrnbbcore_vecplay_write(f, nt, ml_data_offset); fclose(f); delete [] ml_data_offset; delete [] ml_vdata_offset; } /// Writing the number of threads per MPI task void write_nrnthread_task(const char* path, CellGroup* cgs) { int *iRecv, *iRecvVec, *iDispl; if (nrnmpi_myid == 0) { iRecv = new int[nrnmpi_numprocs]; iDispl = new int[nrnmpi_numprocs]; } int iSumThread = 0; int *iSend = new int[nrn_nthread]; #ifdef NRNMPI /// Getting the number of threads for each task if (nrnmpi_numprocs > 1) { nrnmpi_int_gather(&nrn_nthread, iRecv, 1, 0); }else{ iRecv[0] = nrn_nthread; } #else iRecv[0] = nrn_nthread; #endif if (nrnmpi_myid == 0) { for (int iInt = 0; iInt < nrnmpi_numprocs; ++iInt) { iDispl[iInt] = iSumThread; iSumThread += iRecv[iInt]; } iRecvVec = new int[iSumThread]; } for (int iInt = 0; iInt < nrn_nthread; ++iInt) { iSend[iInt] = cgs[iInt].group_id; } #ifdef NRNMPI /// Getting all the first gids (per thread) into the array with correspondent offsets if (nrnmpi_numprocs > 1) { nrnmpi_int_gatherv(iSend, nrn_nthread, iRecvVec, iRecv, iDispl, 0); }else{ for (int iInt = 0; iInt < nrn_nthread; ++iInt) { iRecvVec[iInt] = iSend[iInt]; } } #else for (int iInt = 0; iInt < nrn_nthread; ++iInt) { iRecvVec[iInt] = iSend[iInt]; } #endif /// Writing the file with task, correspondent number of threads and list of correspondent first gids if (nrnmpi_myid == 0) { char fname[1000]; sprintf(fname, "%s/%s", path, "files.dat"); FILE *fp = fopen(fname, "w"); if (!fp) { hoc_execerror("nrnbbcore_write write_nrnthread_task could not open for writing:", fname); } fprintf(fp, "%s\n", bbcore_write_version); // temporary? expedient to notify coreneuron that this model involves // gap junctions if (nrnthread_v_transfer_) { fprintf(fp, "-1\n"); } fprintf(fp, "%d\n", iSumThread); for (int iInt = 0; iInt < nrnmpi_numprocs; ++iInt) { //fprintf(fp, "%d\t%d\n", iInt, iRecv[iInt]); for (int jInt = 0; jInt < iRecv[iInt]; ++jInt) { fprintf(fp, "%d\n", iRecvVec[jInt+iDispl[iInt]]); } } fclose(fp); } delete [] iSend; if (nrnmpi_myid == 0) { delete [] iRecv; delete [] iDispl; delete [] iRecvVec; } } int* datum2int(int type, Memb_list* ml, NrnThread& nt, CellGroup& cg, DatumIndices& di, int* ml_data_offset, int* ml_vdata_offset) { int isart = nrn_is_artificial_[di.type]; int sz = bbcore_dparam_size[type]; int* pdata = new int[ml->nodecount * sz]; int diam_offset = 6*nt.end; int area_offset = 5*nt.end; int volt_offset = 4*nt.end; for (int i=0; i < ml->nodecount; ++i) { Datum* d = ml->pdata[i]; int ioff = i*sz; for (int j = 0; j < sz; ++j) { int jj = ioff + j; int etype = di.ion_type[jj]; int eindex = di.ion_index[jj]; if (etype == -1) { if (isart) { pdata[jj] = -1; // maybe save this space eventually. but not many of these in bb models }else{ pdata[jj] = area_offset + eindex; } }else if (etype == -9) { pdata[jj] = diam_offset + eindex; }else if (etype > 0 && etype < 1000){//ion pointer and also POINTER pdata[jj] = ml_data_offset[etype] + eindex; }else if (etype > 1000 && etype < 2000) { //ionstyle can be explicit instead of pointer to int* pdata[jj] = eindex; }else if (etype == -2) { // an ion and this is the iontype pdata[jj] = eindex; }else if (etype == -4) { // netsend (_tqitem) pdata[jj] = ml_vdata_offset[type] + eindex; //printf("etype %d jj=%d eindex=%d pdata=%d\n", etype, jj, eindex, pdata[jj]); }else if (etype == -6) { // pntproc pdata[jj] = ml_vdata_offset[type] + eindex; //printf("etype %d jj=%d eindex=%d pdata=%d\n", etype, jj, eindex, pdata[jj]); }else if (etype == -7) { // bbcorepointer pdata[jj] = ml_vdata_offset[type] + eindex; //printf("etype %d jj=%d eindex=%d pdata=%d\n", etype, jj, eindex, pdata[jj]); }else if (etype == -5) { // POINTER to voltage pdata[jj] = volt_offset + eindex; //printf("etype %d\n", etype); }else{ //uninterpreted assert(eindex != -3); // avoided if last pdata[jj] = 0; } } } return pdata; } /** @brief Count number of unique elements in the array. * there is a copy of the vector but we are primarily * using it for small section list vectors. */ int count_distinct(double *data, int len) { if( len == 0) return 0; std::vector v; v.assign(data, data + len); std::sort(v.begin(), v.end()); return std::unique(v.begin(), v.end()) - v.begin(); } /** @brief For BBP use case, we want to write section-segment * mapping to gid_3.dat file. This information will be * provided through neurodamus HOC interface with following * format: * gid : number of non-empty neurons in the cellgroup * name : name of section list (like soma, axon, apic) * nsec : number of sections * sections : list of sections * segments : list of segments */ void nrnbbcore_register_mapping() { // gid of a cell int gid = *hoc_getarg(1); // name of section list std::string name = std::string(hoc_gargstr(2)); // hoc vectors: sections and segments Vect* sec = vector_arg(3); Vect* seg = vector_arg(4); double* sections = vector_vec(sec); double* segments = vector_vec(seg); int nsec = vector_capacity(sec); int nseg = vector_capacity(seg); if( nsec != nseg ) { std::cout << "Error: Section and Segment mapping vectors should have same size!\n"; abort(); } // number of unique sections nsec = count_distinct(sections, nsec); SecMapping *smap = new SecMapping(nsec, name); smap->sections.assign(sections, sections+nseg); smap->segments.assign(segments, segments+nseg); // store mapping information mapinfo.add_sec_mapping(gid, smap); } /** @brief dump mapping information to gid_3.dat file */ void nrn_write_mapping_info(const char *path, int gid, NrnMappingInfo &minfo) { /** full path of mapping file */ std::stringstream ss; ss << path << "/" << gid << "_3.dat"; std::string fname(ss.str()); FILE *f = fopen(fname.c_str(), "w"); if (!f) { hoc_execerror("nrnbbcore_write could not open for writing:", fname.c_str()); } fprintf(f, "%s\n", bbcore_write_version); /** number of gids in NrnThread */ fprintf(f, "%zd\n", minfo.size()); /** all cells mapping information in NrnThread */ for(size_t i = 0; i < minfo.size(); i++) { CellMapping *c = minfo.mapping[i]; /** gid, #section, #compartments, #sectionlists */ fprintf(f, "%d %d %d %zd\n", c->gid, c->num_sections(), c->num_segments(), c->size()); for(size_t j = 0; j < c->size(); j++) { SecMapping* s = c->secmapping[j]; /** section list name, number of sections, number of segments */ fprintf(f, "%s %d %zd\n", s->name.c_str(), s->nsec, s->size()); /** section - segment mapping */ if(s->size()) { writeint(&(s->sections.front()), s->size()); writeint(&(s->segments.front()), s->size()); } } } fclose(f); } } // end of extern "C" neuron-7.5/src/nrniv/nrnbbcore_write.h000066400000000000000000000035451323325274500201700ustar00rootroot00000000000000#ifndef nrnbbcore_write_h #define nrnbbcore_write_h #define DatumIndices nrncore_DatumIndices #define CellGroup nrncore_CellGroup struct Memb_list; // assume all Datum.pval point into this cell. In practice, this holds because // they point either to the area or an ion property of the given node. // This is tightly coupled to cache_efficient // NrnThread.NrnThreadMembList.Memb_List.data and pdata and // NrnThread._actual_area class DatumIndices { public: DatumIndices(); virtual ~DatumIndices(); int type; // ordering as though pdata[i][j] was pdata[0][i*sz+j] int* ion_type; // -1 -2 -3 -4 -5 means area,iontype,cvodeieq,netsend,pointer int* ion_index; // or index into _actual_area }; class CellGroup { public: CellGroup(); virtual ~CellGroup(); Memb_list** type2ml; int group_id; // PreSyn, NetCon, target info int n_presyn;// real first int n_output; // real + art with gid int n_real_output; int ndiam; // > 0 only if diam semantics in use. int n_mech; // following three are parallel arrays PreSyn** output_ps; //n_presyn of these, real are first, tml order for acell. int* output_gid; // n_presyn of these, -(type + 1000*index) if no gid int* output_vindex; // n_presyn of these. >=0 if associated with voltage, -(type + 1000*index) for acell. int n_netcon; // all that have targets associated with this threads Point_process. NetCon** netcons; int* netcon_srcgid; // -(type + 1000*index) refers to acell with no gid // -1 means the netcon has no source int* netcon_pnttype; int* netcon_pntindex; // Datum.pval info int ntype; DatumIndices* datumindices; }; #if defined(__cplusplus) extern "C" { #endif extern size_t nrncore_netpar_bytes(); extern void nrncore_netpar_cellgroups_helper(CellGroup*); extern int nrncore_art2index(double* param); // find the Memb_list index #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrniv/nrnclass.h000077500000000000000000000022321323325274500166220ustar00rootroot00000000000000#include "occlass.h" #if EXTERNS ,Shape_reg() ,PlotShape_reg() ,PPShape_reg() ,RangeVarPlot_reg() ,SectionBrowser_reg() ,MechanismStandard_reg() ,MechanismType_reg() ,NetCon_reg() ,LinearMechanism_reg() ,KSChan_reg() ,Impedance_reg() ,SaveState_reg() ,BBSaveState_reg() ,FInitializeHandler_reg() ,StateTransitionEvent_reg() ,nrnpython_reg() #if USEDASPK ,Daspk_reg() #endif #if USECVODE ,Cvode_reg() ,TQueue_reg() ,SingleChan_reg() #endif #if USEDSP ,DSP_reg() #endif #if USEBBS ,ParallelContext_reg() #endif #if NRN_REALTIME , NrnRealTime_reg() #endif #if NRN_DAQ , NrnDAQ_reg() #endif #else //EXTERNS ,Shape_reg ,PlotShape_reg ,PPShape_reg ,RangeVarPlot_reg ,SectionBrowser_reg ,MechanismStandard_reg ,MechanismType_reg ,NetCon_reg ,LinearMechanism_reg ,KSChan_reg ,Impedance_reg ,SaveState_reg ,BBSaveState_reg ,FInitializeHandler_reg ,StateTransitionEvent_reg ,nrnpython_reg #if USEDASPK ,Daspk_reg #endif #if USECVODE ,Cvode_reg ,TQueue_reg ,SingleChan_reg #endif #if USEDSP ,DSP_reg #endif #if USEBBS ,ParallelContext_reg #endif #if NRN_REALTIME , NrnRealTime_reg #endif #if NRN_DAQ , NrnDAQ_reg #endif #endif // !EXTERNS neuron-7.5/src/nrniv/nrndae.cpp000066400000000000000000000176521323325274500166120ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "nrndae.h" #include "nrnoc2iv.h" extern "C" { extern void nrndae_alloc(); extern int nrndae_extra_eqn_count(); extern void nrndae_init(); extern void nrndae_rhs(); // relative to c*dy/dt = -g*y + b extern void nrndae_lhs(); extern void nrndae_dkmap(double**, double**); extern void nrndae_dkres(double*, double*, double*); extern void nrndae_dkpsol(double); extern void nrndae_update(); extern void nrn_matrix_node_free(); extern int cvode_active_; extern int nrn_use_daspk_; extern int secondorder; extern int nrndae_list_is_empty(); } static NrnDAEPtrList nrndae_list; int nrndae_list_is_empty() { return nrndae_list.empty() ? 1 : 0; } void nrndae_register(NrnDAE* n) { nrndae_list.push_back(n); } void nrndae_deregister(NrnDAE* n) { nrndae_list.remove(n); } int nrndae_extra_eqn_count() { int neqn = 0; for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { neqn += (*m) -> extra_eqn_count(); } return neqn; } void nrndae_update() { for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> update(); } } void nrndae_alloc() { NrnThread* _nt = nrn_threads; nrn_thread_error("NrnDAE only one thread allowed"); int neqn = _nt -> end; if (_nt -> _ecell_memb_list) { neqn += _nt -> _ecell_memb_list -> nodecount * nlayer; } for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> alloc(neqn + 1); neqn += (*m) -> extra_eqn_count(); } } void nrndae_init() { if ((!nrndae_list.empty()) && (secondorder > 0 || ((cvode_active_ > 0) && (nrn_use_daspk_ == 0)))) { hoc_execerror("NrnDAEs only work with secondorder==0 or daspk",0); } for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> init(); } } void nrndae_rhs() { for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> rhs(); } } void nrndae_lhs() { for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> lhs(); } } void nrndae_dkmap(double** pv, double** pvdot) { for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> dkmap(pv, pvdot); } } void nrndae_dkres(double* y, double* yprime, double* delta) { // c*y' = f(y) so // delta = c*y' - f(y) for (NrnDAEPtrListIterator m = nrndae_list.begin(); m != nrndae_list.end(); m++) { (*m) -> dkres(y, yprime, delta); } } inline void NrnDAE::alloc_(int size, int start, int nnode, Node** nodes, int* elayer) { } void NrnDAE::alloc(int start_index) { //printf("NrnDAE::alloc %lx\n", (long)this); size_ = y_.capacity(); if (y0_) { assert(y0_ -> capacity() == size_); } assert(c_->nrow() == size_ && c_->ncol() == size_); cyp_.resize(size_); yptmp_.resize(size_); start_ = start_index; //printf("start=%d size=%d\n", start_, size_); delete [] bmap_; bmap_ = new int[size_]; for (int i = 0; i < size_; ++i) { if (i < nnode_) { bmap_[i] = nodes_[i]->eqn_index_ + elayer_[i]; if (elayer_[i] > 0 && !nodes_[i]->extnode) { //hoc_execerror(secname(nodes_[i]->sec), "NrnDAE: Referring to an extracellular layer but\nextracellular is not inserted."); // instead treat as though connected to ground. bmap_[i] = 0; } }else{ bmap_[i] = start_ + i - nnode_; } } //printf("c_->alloc start=%d, nnode=%d\n", start_, nnode_); c_->alloc(start_, nnode_, nodes_, elayer_); // allow subclasses to do their own allocations as well alloc_(size_, start_, nnode_, nodes_, elayer_); } NrnDAE::NrnDAE(Matrix* cmat, Vect* const yvec, Vect* const y0, int nnode, Node** const nodes, Vect* const elayer, void (*f_init)(void* data), void* const data) : y_(*yvec), yptmp_((Object*) NULL), cyp_((Object*) NULL), f_init_(f_init), data_(data) { //printf("NrnDAE %lx\n", (long)this); if (cmat) { assumed_identity_ = NULL; } else { const int size = y_.capacity(); assumed_identity_ = new OcSparseMatrix(size, size); //assumed_identity_->setdiag(0, 1); for (int i = 0; i < size; i++) (*assumed_identity_)(i, i) = 1; cmat = assumed_identity_; } c_ = new MatrixMap(cmat); Vect &elay = *elayer; nnode_ = nnode; nodes_ = nodes; if (nnode_ > 0) { elayer_ = new int[nnode_]; if (elayer) { for (int i = 0; i < nnode_; ++i) { elayer_[i] = int(elay[i]); } } else { for (int i = 0; i < nnode_; ++i) { elayer_[i] = 0; } } } else { elayer_ = NULL; } y0_ = y0; bmap_ = new int[1]; nrndae_register(this); // use_sparse13 = 1; nrn_matrix_node_free(); } NrnDAE::~NrnDAE() { nrndae_deregister(this); delete [] bmap_; delete c_; delete assumed_identity_; if (elayer_) { delete [] elayer_; } // if (nrndae_list->count() == 0) { // use_sparse13 = 0; // } nrn_matrix_node_free(); } int NrnDAE::extra_eqn_count() { //printf("NrnDAE::extra_eqn_count %lx\n", (long)this); //printf(" nnode_=%d g_->nrow()=%d\n", nnode_, g_->nrow()); return c_->nrow() - nnode_; } void NrnDAE::dkmap(double** pv, double** pvdot) { //printf("NrnDAE::dkmap\n"); NrnThread* _nt = nrn_threads; for (int i = nnode_; i < size_; ++i) { //printf("bmap_[%d] = %d\n", i, bmap_[i]); pv[bmap_[i] - 1] = y_.vec() + i; pvdot[bmap_[i] - 1] = _nt->_actual_rhs + bmap_[i]; } } void NrnDAE::update() { //printf("NrnDAE::update %lx\n", (long)this); NrnThread* _nt = nrn_threads; // note that the following is correct also for states that refer // to the internal potential of a segment. i.e rhs is v + vext[0] for (int i = 0; i < size_; ++i) { y_[i] += _nt->_actual_rhs[bmap_[i]]; } //for (int i=0; i < size_; ++i) printf(" i=%d bmap_[i]=%d y_[i]=%g\n", i, bmap_[i], y_->elem(i)); } void NrnDAE::init() { //printf("NrnDAE::init %lx\n", (long)this); //printf("init size_=%d %d %d %d\n", size_, y_->capacity(), y0_->capacity(), b_->capacity()); Vect& y0 = *y0_; v2y(); if (f_init_) { f_init_(data_); } else { if (y0_) { for (int i = nnode_; i < size_; ++i) { y_[i] = y0[i]; } } else { for (int i = nnode_; i < size_; ++i) { y_[i] = 0.; } } } //for (i=0; i < nnode_; ++i) printf(" i=%d y[i]=%g\n", i, y[i]); } void NrnDAE::v2y() { // vm,vext may be reinitialized between fixed steps and certainly // have been adjusted by daspk for (int i = 0; i < nnode_; ++i) { Node* nd = nodes_[i]; //Note elayer_[0] refers to internal. if (elayer_[i] == 0) { y_[i] = NODEV(nd); if (nd -> extnode) { y_[i] += nd->extnode->v[0]; } } else if (nd -> extnode) { y_[i] = nd -> extnode -> v[elayer_[i] - 1]; } } } void NrnDAE::dkres(double* y, double* yprime, double* delta) { //printf("NrnDAE::dkres %lx\n", (long)this); // delta is already f(y) // now subtract c*y' // The problem is the map between y and yprime and the local // representation of the y and yprime for (int i = 0; i < size_; ++i) { //printf("%d %d %g %g\n", i, bmap_[i]-1, y[bmap_[i]-1], yprime[bmap_[i]-1]); yptmp_[i] = yprime[bmap_[i] - 1]; } Vect* cyp; if (assumed_identity_) { // if c_ is KNOWN to be the identity matrix, then no multiplication to do // for now, this happens only when cmat = NULL // note that the user might change cmat, so we can't assume that if it's initially // the identity that it will stay that way cyp = &yptmp_; } else { c_->mulv(yptmp_, cyp_); // mulv cannot multiply in place cyp = &cyp_; } for (int i = 0; i < size_; ++i) { delta[bmap_[i] - 1] -= (*cyp)[i]; } } void NrnDAE::rhs() { NrnThread* _nt = nrn_threads; v2y(); f_(y_, yptmp_, size_); for (int i = 0; i < size_; ++i) { _nt->_actual_rhs[bmap_[i]] += yptmp_[i]; } } void NrnDAE::lhs() { //printf("NrnDAE::lhs %lx\n", (long)this); //printf(" nrn_threads[0].cj = %g\n", nrn_threads[0].cj); //left side portion of (c/dt - J)*[dy] = f(y) c_->add(nrn_threads[0].cj); v2y(); jacobian_(y_)->add(jacobian_multiplier_() * -1); } neuron-7.5/src/nrniv/nrndae.h000066400000000000000000000143021323325274500162440ustar00rootroot00000000000000/** * @file nrndae.h * @brief Supports modifying voltage equations and adding new equations. * @author Michael Hines, Robert McDougal * * @remark Subclasses of NrnDAE can work with equations of the form * $C \frac{dy}{dt} = f(y)$. LinearModelAddition, defined in linmod.h * and linmod.cpp is an example that supports linear dynamics of the * form $C \frac{dy}{dt} = A y + b$. */ #ifndef nrndae_h #define nrndae_h // this defines things needed by ocmatrix #include #include "ivocvect.h" #include "matrixmap.h" #include /** * NEURON Differential Algebraic Equations. * * @remark This is an abstract class; subclass this (or use a subclass) to * add dynamics. LinearModelAddition is an example. See linmod.h. */ class NrnDAE { public: /** * Find the number of state variables introduced by this object. * * @return The number of states added (not modified) by this instance. */ int extra_eqn_count(); /** * Allocate space for these dynamics in the overall system. * * @param start_index starting index for new states */ void alloc(int start_index); /** * Compute the left side portion of $(C - J) \frac{dy}{dt} = f(y)$. */ void lhs(); /** * Compute the right side portion of $(C - J) \frac{dy}{dt} = f(y)$. */ void rhs(); /** * Compute the residual: $f(y) - C \frac{dy}{dt}$ * * @param y array of state variables * @param yprime array of derivatives of state variables * @param delta array to store the difference $f(y)-Cy'$ */ void dkres(double* y, double* yprime, double* delta); /** * Initialize the dynamics. * * @remark Does this by calling f_init_. If f_init_ is NULL, initializes to * values in y0_. If y0_ is NULL, initializes all states to 0. */ void init(); /** * Update states to reflect the changes over a time-step. * * @remark When this function is called, the changes have already been * computed by the solver. This just updates the local variables. */ void update(); /** * Setup the map between voltages and states in y_. * * @param pv pointers to voltage nodes (set by this function) * @param pvdot pointers to voltage derivatives (set by this * function) */ void dkmap(double** pv, double** pvdot); /** * Destructor. */ virtual ~NrnDAE(); protected: /** * Constructor. * * @param cmat the matrix $C$ in $Cy'=f(y)$. * @param yvec vector to store the state variables in * @param y0 initial conditions * @param nnode number of voltage equations to modify * @param nodes pointers to voltage nodes * @param elayer which potential layer to use for each voltage node * @param f_init function to call during an finitialize * @param data data to pass to f_init * * @remark If cmat is NULL, then assumes $C$ is the identity matrix. * @remark If f_init is non-NULL, that takes priority. Otherwise, if * y0 is non-NULL, then initializes to those values. Otherwise * initializes by setting all states to 0. */ NrnDAE(Matrix* cmat, Vect* const yvec, Vect* const y0, int nnode, Node** const nodes, Vect* const elayer, void (*f_init)(void* data) = NULL, void* const data = NULL); private: /** * The right-hand-side function. * * @param y the state variables * @param yprime a vector to store the derivatives * @param size the number of state variables */ virtual void f_(Vect& y, Vect& yprime, int size) = 0; /** * Compute the Jacobian. * * @param y the state variables * @return Pointer to a MatrixMap containing the jacobian. * * @remark The calling function will not delete this pointer. * @remark It is occasionally easier to return the Jacobian divided by * a constant factor. If so, have jacobian_multiplier_ return a * number that should be multiplied by the matrix returned by * this function to get the true Jacobian. */ virtual MatrixMap* jacobian_(Vect& y) = 0; /// Function used for initializing the state variables. void (*f_init_)(void* data); /// Data to pass to f_init_. void* data_; // value of jacobian_ must be multiplied by this value before use virtual double jacobian_multiplier_() {return 1;} /** * Additional allocation for subclasses. * * @remark Called during alloc(). Unless overriden, this function is empty. */ virtual void alloc_(int size, int start, int nnode, Node** nodes, int* elayer); /// the matrix $C$ in $C y' = f(y)$ MatrixMap* c_; /// identity matrix if constructed with $C$ NULL; else NULL. Matrix* assumed_identity_; /// vector of initial conditions Vect* y0_; /// vector to store the state variables in Vect& y_; /// total number of states declared or modified in this object int size_; /// mapping between the states in y and the states in the whole system int* bmap_; /// Number of voltage nodes used by the dynamics. int nnode_; /// Pointers to voltage nodes used by the dynamics. Node** nodes_; /// the position of the first added equation (if any) in the global system int start_; /// temporary vector used for residual calculation. Vect cyp_; /// temporary vector used for residual calculation. Vect yptmp_; /** * Which voltage layers to read from. * * @remark Normally elements are 0 and refer to internal potential. * Otherwise range from 1 to nlayer and refer to vext[elayer-1]. * vm+vext and vext must be placed in y for calculation of rhs */ int* elayer_; /// Transfer any voltage states to y_. void v2y(); }; /** * Add a NrnDAE object to the system. * * @param n The NrnDAE object (ie the dynamics) to add. */ void nrndae_register(NrnDAE* n); /** * Remove a NrnDAE object from the system. * * @param n The NrnDAE object (ie the dynamics) to remove. */ void nrndae_deregister(NrnDAE* n); typedef std::list NrnDAEPtrList; typedef NrnDAEPtrList::const_iterator NrnDAEPtrListIterator; #endif neuron-7.5/src/nrniv/nrndaspk.cpp000077500000000000000000000002561323325274500171560ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/nrndaspk.cpp" neuron-7.5/src/nrniv/nrnhash.h000066400000000000000000000054451323325274500164460ustar00rootroot00000000000000#ifndef nrnhash_h #define nrnhash_h // hash table where buckets are binary search maps and key is castable to unsigned long #include #include #if defined(HAVE_SSTREAM) // the standard... #include #include #else #include #include #endif #define __NrnHashEntry(Table) Table##_Entry #define NrnHashEntry(Table) __NrnHashEntry(Table) #define __NrnHashLT(Table) nrnhash_lt_##Table #define NrnHashLT(Table) __NrnHashLT(Table) // note that more recent STL versions (But not gcc2.95) supply // at(long) to get the vector element. My version contains some // confusion with regard to how to handle issues involving const // in this classes implementation of the find method. // [] creates key value association if does not exist #define declareNrnHash(Table,Key,Value) \ struct NrnHashLT(Table) { \ int operator() (Key i, Key j) const { \ return (key_to_hash(i) < key_to_hash(j)); \ } \ }; \ \ class NrnHashEntry(Table) : public std::map {}; \ \ class Table : public vector { \ public: \ Table(long size); \ virtual ~Table(); \ bool find(Key, Value&)const; \ NrnHashEntry(Table)& at(unsigned long bucket){ return *(begin() + bucket); } \ Value& operator[](Key key) { return at(hash(key))[key]; } \ void remove(Key); \ unsigned long hash(Key key)const { return (key_to_hash(key))%size_; } \ long size_; \ }; #define implementNrnHash(Table,Key,Value) \ Table::Table(long size) { \ resize(size+1); \ size_ = size; \ } \ \ Table::~Table() {} \ \ bool Table::find(Key key, Value& ps)const { \ NrnHashEntry(Table)::const_iterator itr; \ const NrnHashEntry(Table)& gm = ((Table*)this)->at(hash(key)); \ if ((itr = gm.find(key)) == gm.end()) { \ return false; \ } \ ps = itr->second; \ return true; \ }\ \ void Table::remove(Key key) { \ NrnHashEntry(Table)& gm = ((Table*)this)->at(hash(key)); \ gm.erase(key); \ } // for iteration, if you have // declareNrnHash(Table,Key,Object) // Table* table; // then you can iterate with #define NrnHashIterate(Table,table,Value,value) \ if (table) for (long i__ = table->size_ - 1; i__ >= 0; --i__) { \ NrnHashEntry(Table)::const_iterator p__ = table->at(i__).begin(); \ NrnHashEntry(Table)::const_iterator pe__ = table->at(i__).end(); \ while(p__ != pe__) { \ Value value = (*p__).second; \ ++p__; \ // need to close with two extra }} #define NrnHashIterateKeyValue(Table,table, Key,key, Value,value) \ if (table) for (long i__ = table->size_ - 1; i__ >= 0; --i__) { \ NrnHashEntry(Table)::const_iterator p__ = table->at(i__).begin(); \ NrnHashEntry(Table)::const_iterator pe__ = table->at(i__).end(); \ while(p__ != pe__) { \ Key key = (*p__).first; \ Value value = (*p__).second; \ ++p__; \ // need to close with two extra }} #endif // nrnhash_h neuron-7.5/src/nrniv/nrnhash_alt.h000066400000000000000000000176241323325274500173100ustar00rootroot00000000000000/* a copy of OS/table.h hacked to be a replacement for a NrnHash */ /* * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University * Copyright (c) 1991 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Stanford and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Stanford and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * Generic object association table. */ #ifndef nrnhash_alt_h #define nrnhash_alt_h #if defined(HAVE_STDINT_H) #include #endif #include #if 1 || defined(__STDC__) || defined(__ANSI_CPP__) #define __NrnHashEntry(NrnHash) NrnHash##_Entry #define NrnHashEntry(NrnHash) __NrnHashEntry(NrnHash) #define __NrnHashIterator(NrnHash) NrnHash##_Iterator #define NrnHashIterator(NrnHash) __NrnHashIterator(NrnHash) #else #define __NrnHashEntry(NrnHash) NrnHash/**/_Entry #define NrnHashEntry(NrnHash) __NrnHashEntry(NrnHash) #define __NrnHashIterator(NrnHash) NrnHash/**/_Iterator #define NrnHashIterator(NrnHash) __NrnHashIterator(NrnHash) #endif #define declareNrnHash(NrnHash,Key,Value) \ struct NrnHashEntry(NrnHash); \ \ class NrnHash { \ public: \ NrnHash(int); \ ~NrnHash(); \ \ void insert(Key, Value); \ bool find(Key, Value&); \ bool find_and_remove(Value&, Key); \ void remove(Key); \ void remove_all(); \ int max_chain_length(); \ int nclash() {return nclash_;} \ int nfind() { return nfind_;} \ private: \ friend class NrnHashIterator(NrnHash); \ \ int size_; \ NrnHashEntry(NrnHash)** first_; \ NrnHashEntry(NrnHash)** last_; \ \ NrnHashEntry(NrnHash)*& probe(Key); \ int nclash_; \ int nfind_; \ }; \ \ struct NrnHashEntry(NrnHash) { \ private: \ friend class NrnHash; \ friend class NrnHashIterator(NrnHash); \ \ Key key_; \ Value value_; \ NrnHashEntry(NrnHash)* chain_; \ }; \ \ class NrnHashIterator(NrnHash) { \ public: \ NrnHashIterator(NrnHash)(NrnHash&); \ \ Key& cur_key(); \ Value& cur_value(); \ bool more(); \ bool next(); \ private: \ NrnHashEntry(NrnHash)* cur_; \ NrnHashEntry(NrnHash)** entry_; \ NrnHashEntry(NrnHash)** last_; \ }; \ \ inline Key& NrnHashIterator(NrnHash)::cur_key() { return cur_->key_; } \ inline Value& NrnHashIterator(NrnHash)::cur_value() { return cur_->value_; } \ inline bool NrnHashIterator(NrnHash)::more() { return entry_ <= last_; } /* * Predefined hash functions */ // google integer hash function // http://www.concentric.net/~Ttwang/tech/inthash.htm static uint32_t nrn_uint32hash( uint32_t a) { return a; a = (a ^ 61) ^ (a >> 16); a = a + (a << 3); a = a ^ (a >> 4); a = a * 0x27d4eb2d; a = a ^ (a >> 15); return a; } //inline unsigned long key_to_hash(long k) { return (unsigned long)k; } //inline unsigned long key_to_hash(const void* k) { return (unsigned long)k; } inline uint32_t nrn_key_to_hash(long k) { return nrn_uint32hash((uint32_t)k); } #if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ > __SIZEOF_LONG__ inline uint32_t nrn_key_to_hash(const void* k) { return nrn_uint32hash((uint32_t)((unsigned long long)k)); } #else inline uint32_t nrn_key_to_hash(const void* k) { return nrn_uint32hash((uint32_t)((unsigned long)k)); } #endif /* * NrnHash implementation */ #define implementNrnHash(NrnHash,Key,Value) \ NrnHash::NrnHash(int n) { \ for (size_ = 32; size_ < n; size_ <<= 1); \ first_ = new NrnHashEntry(NrnHash)*[size_]; \ --size_; \ last_ = &first_[size_]; \ for (register NrnHashEntry(NrnHash)** e = first_; e <= last_; e++) { \ *e = NULL; \ } \ nclash_ = nfind_ = 0; \ } \ \ NrnHash::~NrnHash() { \ remove_all(); \ delete [] first_; \ } \ \ void NrnHash::remove_all() { \ for (register NrnHashEntry(NrnHash)** e = first_; e <= last_; e++) { \ NrnHashEntry(NrnHash)* t = *e; \ for (register NrnHashEntry(NrnHash)* i = t; i; i = t) { \ t = i->chain_; \ delete i; \ } \ *e = NULL; \ } \ } \ \ inline NrnHashEntry(NrnHash)*& NrnHash::probe(Key i) { \ return first_[nrn_key_to_hash(i) & size_]; \ } \ \ void NrnHash::insert(Key k, Value v) { \ register NrnHashEntry(NrnHash)* e; \ for (e = probe(k); e != NULL; e = e->chain_) { \ if (e->key_ == k) { \ e->value_ = v; \ return; \ } \ } \ e = new NrnHashEntry(NrnHash); \ e->key_ = k; \ e->value_ = v; \ register NrnHashEntry(NrnHash)** a = &probe(k); \ e->chain_ = *a; \ *a = e; \ } \ \ bool NrnHash::find(Key k, Value& v) { \ ++nfind_; \ for (register NrnHashEntry(NrnHash)* e = probe(k); e != NULL; e = e->chain_) { \ if (e->key_ == k) { \ v = e->value_; \ return true; \ } \ if (e->chain_) { ++nclash_;} \ } \ return false; \ } \ \ bool NrnHash::find_and_remove(Value& v, Key k) { \ NrnHashEntry(NrnHash)** a = &probe(k); \ register NrnHashEntry(NrnHash)* e = *a; \ if (e != NULL) { \ if (e->key_ == k) { \ v = e->value_; \ *a = e->chain_; \ delete e; \ return true; \ } else { \ register NrnHashEntry(NrnHash)* prev; \ do { \ prev = e; \ e = e->chain_; \ } while (e != NULL && e->key_ != k); \ if (e != NULL) { \ v = e->value_; \ prev->chain_ = e->chain_; \ delete e; \ return true; \ } \ } \ } \ return false; \ } \ \ void NrnHash::remove(Key k) { \ NrnHashEntry(NrnHash)** a = &probe(k); \ register NrnHashEntry(NrnHash)* e = *a; \ if (e != NULL) { \ if (e->key_ == k) { \ *a = e->chain_; \ delete e; \ } else { \ register NrnHashEntry(NrnHash)* prev; \ do { \ prev = e; \ e = e->chain_; \ } while (e != NULL && e->key_ != k); \ if (e != NULL) { \ prev->chain_ = e->chain_; \ delete e; \ } \ } \ } \ } \ \ int NrnHash::max_chain_length() { \ int m = 0; \ for (NrnHashEntry(NrnHash)** e = first_; e <= last_; e++) { \ int i = 0; \ for (NrnHashEntry(NrnHash)* ec = *e; ec; ec = ec->chain_) { \ ++i; \ } \ if (i > m) { m = i; } \ } \ return m; \ } \ \ NrnHashIterator(NrnHash)::NrnHashIterator(NrnHash)(NrnHash& t) { \ last_ = t.last_; \ for (entry_ = t.first_; entry_ <= last_; entry_++) { \ cur_ = *entry_; \ if (cur_ != NULL) { \ break; \ } \ } \ } \ \ bool NrnHashIterator(NrnHash)::next() { \ cur_ = cur_->chain_; \ if (cur_ != NULL) { \ return true; \ } \ for (++entry_; entry_ <= last_; entry_++) { \ cur_ = *entry_; \ if (cur_ != NULL) { \ return true; \ } \ } \ return false; \ } // for iteration, if you have // declareNrnHash(Table,int,Object) // Table* table; // then you can iterate with #define NrnHashIterate(Table,table,Value,value) \ if (table) for (NrnHashIterator(Table) i__(*table); i__.more(); i__.next()) {{ \ Value value = i__.cur_value(); \ // need to close with two extra }} #define NrnHashIterateKeyValue(Table,table, Key,key, Value,value) \ if (table) for (NrnHashIterator(Table) i__(*table); i__.more(); i__.next()) {{ \ Key key = i__.cur_key(); \ Value value = i__.cur_value(); \ // need to close with two extra }} #endif neuron-7.5/src/nrniv/nrnmenu.cpp000066400000000000000000000717561323325274500170320ustar00rootroot00000000000000 #include <../../nrnconf.h> #include #include #include #include #if HAVE_IV #include "secbrows.h" #include "ivoc.h" #endif #include "nrnoc2iv.h" #include "nrnmenu.h" #include "classreg.h" typedef void (*ReceiveFunc)(Point_process*, double*, double); extern "C" { // from nrnoc #include "membfunc.h" #include "parse.h" extern Symlist *hoc_built_in_symlist; extern Symbol **pointsym; extern double* point_process_pointer(Point_process*, Symbol*, int); extern Point_process* ob2pntproc(Object*); extern ReceiveFunc* pnt_receive; extern int nrn_has_net_event_cnt_; extern int* nrn_has_net_event_; extern short* nrn_is_artificial_; extern int node_index(Section*, double); extern char* pnt_map; extern void nrn_parent_info(Section*); // to nrnoc void nrnallsectionmenu(); void nrnallpointmenu(); void nrnsecmenu(); void nrnglobalmechmenu(); void nrnmechmenu(); void nrnpointmenu(); Object* (*nrnpy_callable_with_args)(Object*, int narg); int (*nrnpy_ob_is_seg)(Object*); } #if HAVE_IV static void pnodemenu(Prop* p1, double, int type, const char* path, MechSelector* = NULL); static void mech_menu(Prop* p1, double, int type, const char* path, MechSelector* = NULL); static void point_menu(Object*, int); #endif void nrnallsectionmenu() { #if HAVE_IV IFGUI SectionBrowser::make_section_browser(); ENDGUI #endif hoc_retpushx(1.); } void nrnsecmenu() { #if HAVE_IV IFGUI double x; Section* sec = NULL; if (hoc_is_object_arg(1)) { // x = -1 not allowed nrn_seg_or_x_arg(1, &sec, &x); nrn_pushsec(sec); }else{ x = chkarg(1,-1.,1.); } section_menu(x, (int)chkarg(2,1.,3.)); if (sec) { nrn_popsec(); } ENDGUI #endif hoc_retpushx(1.); } #ifdef ultrix extern "C" { char *strstr(const char *, const char *); } #endif static bool has_globals(const char* name) { Symbol* sp; char suffix[100]; sprintf(suffix, "_%s", name); for (sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->subtype == USERDOUBLE && strstr(sp->name, suffix) ) { return true; } } return false; } void nrnglobalmechmenu() { #if HAVE_IV IFGUI Symbol *sp; char* s; char buf[200]; char suffix[100]; if (!ifarg(1)) { hoc_ivmenu("Mechanisms (Globals)"); for (sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == MECHANISM && sp->subtype != MORPHOLOGY && has_globals(sp->name)) { sprintf(buf, "nrnglobalmechmenu(\"%s\")", sp->name); hoc_ivbutton(sp->name, buf); } } hoc_ivmenu(0); hoc_retpushx(1.); return; } char* name = gargstr(1); sprintf(suffix, "_%s", name); if (ifarg(2) && *getarg(2) == 0.) { int cnt = 0; for (sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->subtype == USERDOUBLE && (s = strstr(sp->name, suffix)) != 0 && s[strlen(suffix)] == '\0'){ ++cnt; } } hoc_retpushx(double(cnt)); return; } sprintf(buf, "%s (Globals)", name); hoc_ivpanel(buf); for (sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->subtype == USERDOUBLE && (s = strstr(sp->name, suffix)) != 0 && s[strlen(suffix)] == '\0'){ if (ISARRAY(sp)) { char n[50]; int i; Arrayinfo* a = sp->arayinfo; for (i=0; i < a->sub[0]; i++) { if (i > 5) break; sprintf(buf, "%s[%d]", sp->name, i); sprintf(n, "%s[%d]", sp->name, i); hoc_ivpvalue(n, hoc_val_pointer(buf), false, sp->extra); } }else{ hoc_ivvalue(sp->name, sp->name, 1); } } } hoc_ivpanelmap(); ENDGUI #endif hoc_retpushx(1.); } void nrnmechmenu() { hoc_retpushx(1.); } #if HAVE_IV void section_menu(double x1, int type, MechSelector* ms) { char buf[200]; const char* name; Section *sec; Prop *p; Node* node; double x; String btype; CopyString sname; switch (type) { case nrnocCONST: btype = "(Parameters)"; break; case STATE: btype = "(States)"; break; case 2: btype = "(Assigned)"; break; } sec = chk_access(); name = secname(sec); if (x1 >= 0) { node = node_exact(sec, x1); x = nrn_arc_position(sec, node); sprintf(buf, "%s(%g) %s", name, x, btype.string()); }else{ sprintf(buf, "%s(0 - 1) %s", name, btype.string()); node = sec->pnode[0]; x = nrn_arc_position(sec, node); sname = hoc_section_pathname(sec); //printf("returned %s\n", sname.string()); } hoc_ivpanel(buf); hoc_ivlabel(buf); if (type == nrnocCONST) { if (x1 < 0) { sprintf(buf,"nseg = %d", sec->nnode-1); hoc_ivlabel(buf); sprintf(buf, "%s.L", sname.string()); if (sec->npt3d) { hoc_ivvaluerun("L", buf, "define_shape()", 1); }else{ hoc_ivvalue("L", buf, 1); } sprintf(buf, "%s.Ra += 0", sname.string()); hoc_ivpvaluerun("Ra",&sec->prop->dparam[7].val, buf, 1, 0, hoc_var_extra("Ra")); p = sec->prop; if (p->dparam[4].val != 1) { hoc_ivpvaluerun("Rall",&sec->prop->dparam[4].val, "diam_changed = 1", 1, 0, hoc_var_extra("rallbranch")); } } }else{ if (x1 < 0) { sprintf(buf,"%s.%s", sname.string(), "v"); hoc_ivvalue("v",buf); }else{ sprintf(buf,"v(%g)", x); hoc_ivpvalue("v",hoc_val_pointer(buf), false, hoc_lookup("v")->extra); } } p = node->prop; if (x1 < 0) { pnodemenu(p, x, type, sname.string(), ms); }else{ pnodemenu(p, x, type, 0, ms); } hoc_ivpanelmap(); } static void pnodemenu(Prop* p1, double x, int type, const char* path, MechSelector* ms) { if (!p1) { return; } pnodemenu(p1->next, x, type, path, ms); /*print in insert order*/ if (memb_func[p1->type].is_point) { return; }else{ mech_menu(p1, x, type, path, ms); } } #endif #if HAVE_IV static bool nrn_is_const(const char* path, const char* name) { char buf[256]; sprintf(buf, "%s for (hoc_ac_) if (hoc_ac_ > 0 && hoc_ac_ < 1) if (%s(hoc_ac_) != %s(.5)) {hoc_ac_ = 0 break}\n", path, name, name); Oc oc; oc.run(buf); return (hoc_ac_ != 0.); } #endif #if HAVE_IV static void mech_menu(Prop* p1, double x, int type, const char* path, MechSelector* ms) { Symbol *sym, *vsym; int i, j; char buf[200]; bool deflt; if (ms && !ms->is_selected(p1->type)) { return; } if (type == nrnocCONST) { deflt = true; }else{ deflt = false; } sym = memb_func[p1->type].sym; if (sym->s_varn) { for (j=0; j < sym->s_varn; j++ ) { vsym = sym->u.ppsym[j]; if (nrn_vartype(vsym) == type) { if (vsym->type == RANGEVAR) { if (ISARRAY(vsym)) { char n[50]; Arrayinfo* a = vsym->arayinfo; for (i=0; i < a->sub[0]; i++) { if (i > 5) break; sprintf(n, "%s[%d]", vsym->name, i); if (path) { if (nrn_is_const(path, n)) { sprintf(buf, "%s.%s", path, n); hoc_ivvalue(n, buf, deflt); }else{ sprintf(buf, "%s is not constant", n); hoc_ivlabel(buf); } }else{ sprintf(buf, "%s[%d](%g)",vsym->name, i, x); hoc_ivpvalue(n, hoc_val_pointer(buf), false, vsym->extra); } } }else{ if (path) { if (nrn_is_const(path, vsym->name)) { sprintf(buf, "%s.%s", path, vsym->name); hoc_ivvalue(vsym->name, buf, deflt); }else{ sprintf(buf, "%s is not constant", vsym->name); hoc_ivlabel(buf); } }else{ sprintf(buf, "%s(%g)", vsym->name, x); if (p1->type == MORPHOLOGY) { Section* sec = chk_access(); char buf2[200]; sprintf(buf2, "%s.Ra += 0", secname(sec)); hoc_ivpvaluerun(vsym->name, hoc_val_pointer(buf), buf2, 1, 0, vsym->extra); }else{ hoc_ivpvalue(vsym->name, hoc_val_pointer(buf), deflt, vsym->extra); } } } } } } } } #endif void nrnallpointmenu() { #if HAVE_IV IFGUI int i; double x = n_memb_func - 1; Symbol *sp, *psym; char buf[200]; hoc_Item* q; if (!ifarg(1)) { hoc_ivmenu("Point Processes"); for (i=1; (sp = pointsym[i]) != (Symbol *)0; i++) { sprintf(buf, "nrnallpointmenu(%d)", i); hoc_ivbutton(sp->name, buf); } hoc_ivmenu(0); hoc_retpushx(1.); return; } i = (int)chkarg(1, 0., x); if ((psym = pointsym[i]) != (Symbol *)0) { hoc_ivpanel(psym->name); sp = hoc_table_lookup(psym->name,hoc_built_in_symlist); assert (sp && sp->type == TEMPLATE); bool locmenu = false; ITERATE(q, sp->u.ctemplate->olist) { // are there any hoc_ivmenu("locations"); locmenu = true; break; } bool are_globals = false; char suffix[100]; sprintf(suffix, "_%s", sp->name); for (Symbol *stmp = hoc_built_in_symlist->first; stmp; stmp = stmp->next) { if (stmp->type == VAR && stmp->subtype == USERDOUBLE && strstr(stmp->name, suffix) ) { are_globals = true; break; } } ITERATE(q, sp->u.ctemplate->olist) { Object* ob = OBJ(q); Point_process* pp = ob2pntproc(ob); if (pp->sec) { sprintf(buf, "nrnpointmenu(%p)", ob); hoc_ivbutton(sec_and_position(pp->sec,pp->node), buf); } } if (locmenu) { hoc_ivmenu(0); } if (are_globals) { sprintf(buf, "nrnglobalmechmenu(\"%s\")", psym->name); hoc_ivbutton("Globals", buf); } hoc_ivpanelmap(); } ENDGUI #endif hoc_retpushx(1.); } void nrnpointmenu() { #if HAVE_IV IFGUI Object* ob; if (hoc_is_object_arg(1)) { ob = *hoc_objgetarg(1); }else{ ob = (Object*)((size_t)(*getarg(1))); } Symbol* sym = hoc_table_lookup(ob->ctemplate->sym->name, ob->ctemplate->symtable); if (!sym || sym->type != MECHANISM || !memb_func[sym->subtype].is_point) { hoc_execerror(ob->ctemplate->sym->name, "not a point process"); } int make_label = 1; if (ifarg(2)) { make_label = int(chkarg(2, -1., 1.)); } point_menu(ob, make_label); ENDGUI #endif hoc_retpushx(1.); } #if HAVE_IV static void point_menu(Object* ob, int make_label) { Point_process* pp = ob2pntproc(ob); int k, m; Symbol *psym, *vsym; char buf[200]; bool deflt; if (pp->sec) { sprintf(buf, "%s at ", hoc_object_name(ob)); strcat(buf, sec_and_position(pp->sec, pp->node)); }else{ sprintf(buf, "%s", hoc_object_name(ob)); } hoc_ivpanel(buf); if (make_label== 1){ hoc_ivlabel(buf); }else if (make_label== 0){ hoc_ivlabel(hoc_object_name(ob)); }else if (make_label==-1){ //i.e. do neither k=0; } psym = pointsym[pnt_map[pp->prop->type]]; #if 0 switch (type) { case nrnocCONST: sprintf(buf, "%s[%d] (Parameters)", psym->name, j); break; case STATE: sprintf(buf, "%s[%d] (States)", psym->name, j); break; case 2: sprintf(buf, "%s[%d] (Assigned)", psym->name, j); break; } #endif if (psym->s_varn) { for (k=0; k < psym->s_varn; k++ ) { vsym = psym->u.ppsym[k]; if (nrn_vartype(vsym) == nrnocCONST) { deflt = true; #if defined(MikeNeubig) deflt = false; #endif // end of hack }else{ deflt = false; } if (ISARRAY(vsym)) { Arrayinfo* a = vsym->arayinfo; for (m=0; m < vsym->arayinfo->sub[0]; m++) { double* pd; if (m > 5) break; sprintf(buf, "%s[%d]", vsym->name, m); pd = point_process_pointer(pp, vsym, m); if (pd) { hoc_ivpvalue(buf, pd,deflt, vsym->extra); } } }else{ hoc_ivpvalue(vsym->name, point_process_pointer(pp, vsym,0),deflt, vsym->extra); } } } hoc_ivpanelmap(); } #endif //----------------------- // MechanismStandard static double ms_panel(void* v) { #if HAVE_IV IFGUI char* label = NULL; if (ifarg(1)) { label = gargstr(1); } ((MechanismStandard*)v)->panel(label); ENDGUI #endif return 0.; } static double ms_action(void* v) { char* a = 0; Object* pyact = NULL; if(ifarg(1)) { if (hoc_is_str_arg(1)) { a = gargstr(1); }else{ pyact = *hoc_objgetarg(1); } } ((MechanismStandard*)v)->action(a, pyact); return 0.; } static double ms_out(void* v) { MechanismStandard* m = (MechanismStandard*)v; if (ifarg(1)) { if (hoc_is_double_arg(1)) { double x = chkarg(1, 0, 1); m->out(chk_access(), x); }else{ Object* o = *hoc_objgetarg(1); if (is_obj_type(o, "MechanismStandard")) { m->out((MechanismStandard*)o->u.this_pointer); }else if (is_point_process(o)) { m->out(ob2pntproc(o)); }else if (nrnpy_ob_is_seg && (*nrnpy_ob_is_seg)(o)) { double x; Section* sec; nrn_seg_or_x_arg(1, &sec, &x); m->out(sec, x); }else{ hoc_execerror("Object arg must be MechanismStandard or a Point Process, not", hoc_object_name(o)); } } }else{ m->out(chk_access()); } return 0.; } static double ms_in(void* v) { MechanismStandard* m = (MechanismStandard*)v; if (ifarg(1)) { if (hoc_is_double_arg(1)) { double x = chkarg(1, 0, 1); m->in(chk_access(), x); }else{ Object* o = *hoc_objgetarg(1); if (is_obj_type(o, "MechanismStandard")) { m->in((MechanismStandard*)o->u.this_pointer); }else if (is_point_process(o)) { m->in(ob2pntproc(o)); }else if (nrnpy_ob_is_seg && (*nrnpy_ob_is_seg)(o)) { double x; Section* sec; nrn_seg_or_x_arg(1, &sec, &x); m->in(sec, x); }else{ hoc_execerror("Object arg must be MechanismStandard or a Point Process or a nrn.Segment, not", hoc_object_name(o)); } } }else{ m->in(chk_access()); } return 0.; } static double ms_set(void* v) { int i=0; if (ifarg(3)) { // array index i = int(*getarg(3)); } ((MechanismStandard*)v)->set(gargstr(1), *getarg(2), i); return 0.; } static double ms_get(void* v) { int i=0; if (ifarg(2)) { // array index i = int(*getarg(2)); } return ((MechanismStandard*)v)->get(gargstr(1), i); } static double ms_count(void* v) { return ((MechanismStandard*)v)->count(); } static double ms_name(void* v) { const char* n; int rval = 0; MechanismStandard* ms = (MechanismStandard*)v; if (ifarg(2)) { n = ms->name((int)chkarg(2, 0, ms->count() - 1), rval); }else{ n = ms->name(); } hoc_assign_str(hoc_pgargstr(1), n); return double(rval); } static double ms_save(void* v) { #if HAVE_IV ostream* o = Oc::save_stream; if (o) { ((MechanismStandard*)v)->save(gargstr(1), o); } #endif return 0.; } static void* ms_cons(Object* ob) { int vartype = nrnocCONST; if (ifarg(2)) { // 0 means all vartype = int(chkarg(2, -1, STATE)); } MechanismStandard* m = new MechanismStandard(gargstr(1), vartype); m->ref(); m->msobj_ = ob; return (void*)m; } static void ms_destruct(void* v) { Resource::unref((MechanismStandard*)v); } static Member_func ms_members[] = { "panel", ms_panel, "action", ms_action, "in", ms_in, "_in", ms_in, "out", ms_out, "set", ms_set, "get", ms_get, "count", ms_count, "name", ms_name, "save", ms_save, 0, 0 }; void MechanismStandard_reg() { class2oc("MechanismStandard", ms_cons, ms_destruct, ms_members, NULL, NULL, NULL); } MechanismStandard::MechanismStandard(const char* name, int vartype) { msobj_ = NULL; glosym_ = NULL; np_ = new NrnProperty(name); name_cnt_ = 0; vartype_ = vartype; // vartype=0 means all but not globals, -1 means globals offset_ = 0; if (vartype_ == -1) { char suffix[100]; char* s; sprintf(suffix, "_%s", name); Symbol * sp; for (sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->subtype == USERDOUBLE && (s = strstr(sp->name, suffix)) != 0 && s[strlen(suffix)] == '\0'){ ++name_cnt_; } } glosym_ = new Symbol*[name_cnt_]; int i=0; for (sp = hoc_built_in_symlist->first; sp; sp = sp->next) { if (sp->type == VAR && sp->subtype == USERDOUBLE && (s = strstr(sp->name, suffix)) != 0 && s[strlen(suffix)] == '\0'){ glosym_[i] = sp; ++i; } } }else{ for (Symbol* sym = np_->first_var(); np_->more_var(); sym = np_->next_var()) { int type = np_->var_type(sym); if (type < vartype) { ++offset_; }else if (vartype == 0 || type == vartype) { ++name_cnt_; } } } action_ = ""; pyact_ = NULL; } MechanismStandard::~MechanismStandard() { if (pyact_) { hoc_obj_unref(pyact_); } if (glosym_) { delete [] glosym_; } delete np_; } int MechanismStandard::count() { return name_cnt_; } const char* MechanismStandard::name() { return np_->name(); } const char* MechanismStandard::name(int i, int& size) { Symbol* s; if (vartype_ == -1) { s = glosym_[i]; }else{ s = np_->var(i+offset_); } size = hoc_total_array_data(s, 0); return s->name; } void MechanismStandard::panel(const char* label) { #if HAVE_IV mschk("panel"); char buf[256]; int i; Symbol* sym; hoc_ivpanel("MechanismStandard"); if (label) { hoc_ivlabel(label); }else{ hoc_ivlabel(np_->name()); } for (sym = np_->first_var(), i=0; np_->more_var(); sym = np_->next_var(), ++i) { if (vartype_ == 0 || np_->var_type(sym) == vartype_) { Object* pyactval = NULL; int size = hoc_total_array_data(sym, 0); if (pyact_) { assert(nrnpy_callable_with_args); hoc_push_object(msobj_); hoc_pushx(double(i)); hoc_pushx(0.0); pyactval = (*nrnpy_callable_with_args)(pyact_, 3); }else{ sprintf(buf, "hoc_ac_ = %d %s", i, action_.string()); } hoc_ivvaluerun_ex(sym->name, NULL, np_->prop_pval(sym), NULL, pyact_ ? NULL : buf, pyactval, true, false, true, sym->extra); if (pyactval) { hoc_obj_unref(pyactval); } int j; for (j=1; j < size; ++j) { ++i; if (pyact_) { assert(nrnpy_callable_with_args); hoc_push_object(msobj_); hoc_pushx(double(i)); hoc_pushx(double(j)); pyactval = (*nrnpy_callable_with_args)(pyact_, 3); }else{ sprintf(buf, "hoc_ac_ = %d %s", i, action_.string()); } char buf2[200]; sprintf(buf2, "%s[%d]", sym->name, j); hoc_ivvaluerun_ex(buf2, NULL, np_->prop_pval(sym, j), NULL, pyact_ ? NULL : buf, pyact_, true, false, true, sym->extra); if (pyactval) { hoc_obj_unref(pyactval); } } } } hoc_ivpanelmap(); #endif } void MechanismStandard::action(const char* action, Object* pyact){ mschk("action"); action_ = action ? action : ""; if (pyact) { pyact_ = pyact; hoc_obj_ref(pyact); } } void MechanismStandard::set(const char* name, double val, int index){ mschk("set"); Symbol* s = np_->find(name); if (s) { *np_->prop_pval(s, index) = val; }else{ hoc_execerror(name, "not in this property"); } } double MechanismStandard::get(const char* name, int index){ mschk("get"); Symbol* s = np_->find(name); if (!s) { hoc_execerror(name, "not in this property"); } double* pval = np_->prop_pval(s, index); if (!pval) { return -1e300; } return *pval; } void MechanismStandard::in(Section* sec, double x){ mschk("in"); int i = 0; if (x >= 0) { i = node_index(sec, x); } Prop* p = nrn_mechanism(np_->type(), sec->pnode[i]); NrnProperty::assign(p, np_->prop(), vartype_); } void MechanismStandard::in(Point_process* pp){ mschk("in"); NrnProperty::assign(pp->prop, np_->prop(), vartype_); } void MechanismStandard::in(MechanismStandard* ms){ mschk("in"); NrnProperty::assign(ms->np_->prop(), np_->prop(), vartype_); } void MechanismStandard::out(Section* sec, double x){ mschk("out"); if (x < 0) { for (int i = 0; i < sec->nnode; ++i) { Prop* p = nrn_mechanism(np_->type(), sec->pnode[i]); NrnProperty::assign(np_->prop(), p, vartype_); } }else{ int i = node_index(sec, x); Prop* p = nrn_mechanism(np_->type(), sec->pnode[i]); NrnProperty::assign(np_->prop(), p, vartype_); } } void MechanismStandard::out(Point_process* pp){ mschk("out"); NrnProperty::assign(np_->prop(), pp->prop, vartype_); } void MechanismStandard::out(MechanismStandard* ms){ mschk("out"); NrnProperty::assign(np_->prop(), ms->np_->prop(), vartype_); } void MechanismStandard::save(const char* obref, ostream* po) { mschk("save"); ostream& o = *po; char buf[256]; sprintf(buf, "%s = new MechanismStandard(\"%s\")", obref, np_->name()); o << buf << endl; for (Symbol* sym = np_->first_var(); np_->more_var(); sym = np_->next_var()) { if (vartype_ == 0 || np_->var_type(sym) == vartype_) { int i, cnt = hoc_total_array_data(sym, 0); for (i=0; i < cnt; ++i) { sprintf(buf, "%s.set(\"%s\", %g, %d)", obref, sym->name, *np_->prop_pval(sym, i), i); o << buf << endl; } } } } void MechanismStandard::mschk(const char* s) { if (vartype_ == -1) { hoc_execerror(s, " MechanismStandard method not implemented for GLOBAL type"); } } /* help MembraneType listin nrniv Provides a way of iterating over all membrane mechanisms or point processes and allows selection via a menu or under hoc control. mt = new MembraneType(0) The object can be considered a list of all the available continuous membrane mechanisms. eg "hh", "pas", "extracellular". that can be inserted into a section. mt = new MembraneType(1) The object can be considered a list of all available Point Processes. eg. PulseStim, AlphaSynapse, VClamp. To print the names of all mechanisms in this object list try: strdef mname for i=0,mt.count() { mt.select(i) mt.selected(mname) print mname } help select mt.select("name") mt.select(i) selects either the named mechanism or the i'th mechanism in the list. help selected i = mt.selected([strdef]) returns the index of the current selection. If present, strarg is assigned to the name of the current selection. help make mt.make() For continuous mechanisms. Inserts selected mechanism into currently accessed section. help remove mt.remove() For continuous mechanisms. Deletes selected mechanism from currently accessed section. A nop if the mechanism is not in the section. help make mt.make(objectvar) For point processes. The arg becomes a reference to a new point process of type given by the selection. Note that the newly created point process is not located in any section. Note that if objectvar was the only reference to another object then that object is destroyed. help count i = mt.count() The number of different mechanisms in the list. help menu mt.menu() Inserts a special menu into the currently open xpanel. The menu label always reflects the current selection. Submenu items are indexed according to position with the first item being item 0. When the mouse button is released on a submenu item that item becomes the selection and the action (if any) is executed. help action mt.action("command") The action to be executed when a submenu item is selected. */ static double mt_select(void* v) { MechanismType* mt = (MechanismType*)v; if (hoc_is_double_arg(1)) { mt->select(int(chkarg(1, -1, mt->count() - 1))); }else if (hoc_is_str_arg(1)) { mt->select(gargstr(1)); } return 0.; } static double mt_selected(void* v) { MechanismType* mt = (MechanismType*)v; int i = mt->selected_item(); if (ifarg(1)) { hoc_assign_str(hoc_pgargstr(1), mt->selected()); } return double(i); } static double mt_internal_type(void* v) { MechanismType* mt = (MechanismType*)v; return double(mt->internal_type()); } static double mt_make(void* v) { MechanismType* mt = (MechanismType*)v; if (mt->is_point()) { mt->point_process(hoc_objgetarg(1)); }else{ mt->insert(chk_access()); } return 0.; } static double mt_remove(void* v) { MechanismType* mt = (MechanismType*)v; mt->remove(chk_access()); return 0.; } static double mt_count(void* v) { MechanismType* mt = (MechanismType*)v; return double(mt->count()); } static double mt_menu(void* v) { #if HAVE_IV IFGUI MechanismType* mt = (MechanismType*)v; mt->menu(); ENDGUI #endif return 0.; } static double mt_action(void* v) { MechanismType* mt = (MechanismType*)v; if (hoc_is_str_arg(1)) { mt->action(gargstr(1), NULL); }else{ mt->action(NULL, *hoc_objgetarg(1)); } return 0.; } static double mt_is_target(void* v) { MechanismType* mt = (MechanismType*)v; return double(mt->is_netcon_target(int(chkarg(1, 0, mt->count())))); } static double mt_has_net_event(void* v) { MechanismType* mt = (MechanismType*)v; return double(mt->has_net_event(int(chkarg(1, 0, mt->count())))); } static double mt_is_artificial(void* v) { MechanismType* mt = (MechanismType*)v; return double(mt->is_artificial(int(chkarg(1, 0, mt->count())))); } static Object** mt_pp_begin(void* v) { MechanismType* mt = (MechanismType*)v; Point_process* pp = mt->pp_begin(); Object* obj = NULL; if (pp) { obj = pp->ob; } return hoc_temp_objptr(obj); } static Object** mt_pp_next(void* v) { MechanismType* mt = (MechanismType*)v; Point_process* pp = mt->pp_next(); Object* obj = NULL; if (pp) { obj = pp->ob; } return hoc_temp_objptr(obj); } static void* mt_cons(Object* obj) { MechanismType* mt = new MechanismType(int(chkarg(1, 0, 1))); mt->ref(); mt->mtobj_ = obj; return (void*)mt; } static void mt_destruct(void* v) { MechanismType* mt = (MechanismType*)v; mt->unref(); } static Member_func mt_members[] = { "select", mt_select, "selected", mt_selected, "make", mt_make, "remove", mt_remove, "count", mt_count, "menu", mt_menu, "action", mt_action, "is_netcon_target", mt_is_target, "has_net_event", mt_has_net_event, "is_artificial", mt_is_artificial, "internal_type", mt_internal_type, 0,0 }; static Member_ret_obj_func mt_retobj_members[] = { "pp_begin", mt_pp_begin, "pp_next", mt_pp_next, 0,0 }; void MechanismType_reg() { class2oc("MechanismType", mt_cons, mt_destruct, mt_members, NULL, mt_retobj_members, NULL); } /* static */ class MechTypeImpl { private: friend class MechanismType; bool is_point_; int* type_; int count_; int select_; CopyString action_; Object* pyact_; Section* sec_iter_; int inode_iter_; Prop* p_iter_; }; typedef Symbol* PSym; MechanismType::MechanismType(bool point_process){ mti_ = new MechTypeImpl; mti_->is_point_ = point_process; mti_->count_ = 0; int i; for (i=2; i < n_memb_func; ++i) { if (point_process == memb_func[i].is_point) { ++mti_->count_; } } mti_->type_ = new int[mti_->count_]; int j=0; for (i=2; i < n_memb_func; ++i) { if (point_process == memb_func[i].is_point) { mti_->type_[j] = i; ++j; } } mti_->pyact_ = NULL; action("", NULL); select(0); } MechanismType::~MechanismType(){ if (mti_->pyact_) { hoc_obj_unref(mti_->pyact_); } delete [] mti_->type_; delete mti_; } bool MechanismType::is_point() { return mti_->is_point_; } Point_process* MechanismType::pp_begin() { if (!mti_->is_point_) { hoc_execerror("Not a MechanismType(1)", 0); } mti_->sec_iter_ = chk_access(); nrn_parent_info(mti_->sec_iter_); mti_->p_iter_ = 0; if (mti_->sec_iter_->parentnode) { mti_->inode_iter_ = -1; mti_->p_iter_ = mti_->sec_iter_->parentnode->prop; } if (!mti_->p_iter_) { mti_->inode_iter_ = 0; mti_->p_iter_ = mti_->sec_iter_->pnode[0]->prop; } Point_process* pp = pp_next(); // note that p_iter is the one looked at and then incremented return pp; } Point_process* MechanismType::pp_next() { Point_process* pp = NULL; bool done = mti_->p_iter_ == 0; while (!done) { if (mti_->p_iter_->type == mti_->type_[mti_->select_]) { pp = (Point_process*)mti_->p_iter_->dparam[1]._pvoid; done = true; // but if it does not belong to this section if (pp->sec != mti_->sec_iter_) { pp = NULL; done = false; } } mti_->p_iter_ = mti_->p_iter_->next; while (!mti_->p_iter_) { ++mti_->inode_iter_; if (mti_->inode_iter_ >= mti_->sec_iter_->nnode) { done = true; break; // really at the end }else{ mti_->p_iter_ = mti_->sec_iter_->pnode[mti_->inode_iter_]->prop; } } } return pp; } bool MechanismType::is_netcon_target(int i) { int j = mti_->type_[i]; return pnt_receive[j] ? true : false; } bool MechanismType::has_net_event(int i) { int j = mti_->type_[i]; int k; for (k=0; k < nrn_has_net_event_cnt_; ++k) { if (nrn_has_net_event_[k] == j) { return true; } } return false; } bool MechanismType::is_artificial(int i) { int j = mti_->type_[i]; return (nrn_is_artificial_[j] ? true:false); } void MechanismType::select(const char* name){ for (int i=0; i < mti_->count_; ++i) { if (strcmp(name, memb_func[mti_->type_[i]].sym->name) == 0) { select(i); break; } } } const char* MechanismType::selected(){ Symbol* sym = memb_func[mti_->type_[selected_item()]].sym; return sym->name; } int MechanismType::internal_type() { return mti_->type_[selected_item()]; } extern "C" { extern void mech_insert1(Section*, int); extern void mech_uninsert1(Section*, Symbol*); } void MechanismType::insert(Section* sec){ if (!mti_->is_point_) { mech_insert1(sec, memb_func[mti_->type_[selected_item()]].sym->subtype); } } void MechanismType::remove(Section* sec){ if (!mti_->is_point_) { mech_uninsert1(sec, memb_func[mti_->type_[selected_item()]].sym); } } extern "C" {extern Object* nrn_new_pointprocess(Symbol*);} void MechanismType::point_process(Object** o){ Symbol* sym = memb_func[mti_->type_[selected_item()]].sym; hoc_dec_refcount(o); *o = nrn_new_pointprocess(sym); (*o)->refcount = 1; } void MechanismType::action(const char* action, Object* pyact){ mti_->action_ = action ? action : ""; if (pyact) { hoc_obj_ref(pyact); } if (mti_->pyact_) { hoc_obj_unref(mti_->pyact_); mti_->pyact_ = NULL; } mti_->pyact_ = pyact; } void MechanismType::menu(){ #if HAVE_IV char buf[200]; Oc oc; oc.run("{xmenu(\"MechType\")}\n"); for (int i=0; i < mti_->count_; ++i) { Symbol* s = memb_func[mti_->type_[i]].sym; if (s->subtype != MORPHOLOGY) { if (mti_->pyact_) { assert(nrnpy_callable_with_args); hoc_push_object(mtobj_); hoc_pushx(double(i)); Object* pyactval = (*nrnpy_callable_with_args)(mti_->pyact_, 2); hoc_ivbutton(s->name, NULL, pyactval); hoc_obj_unref(pyactval); }else { sprintf(buf, "xbutton(\"%s\", \"hoc_ac_=%d %s\")\n", s->name, i, mti_->action_.string() ); oc.run(buf); } } } oc.run("{xmenu()}\n"); #endif } int MechanismType::count(){ return mti_->count_; } int MechanismType::selected_item(){ return mti_->select_; } void MechanismType::select(int index){ if (index < 0) { mti_->select_ = index; }else if (index >= count()) { mti_->select_ = count() - 1; }else{ mti_->select_ = index; } } neuron-7.5/src/nrniv/nrnmenu.h000066400000000000000000000034131323325274500164600ustar00rootroot00000000000000#ifndef nrnmenu_h #define nrnmenu_h #include #include "ndatclas.h" #include class MechTypeImpl; class MechanismStandard : public Resource { public: MechanismStandard(const char*, int vartype); virtual ~MechanismStandard(); void panel(const char* label = NULL); void action(const char*, Object* pyact); int count(); const char* name(); const char* name(int, int&); // returns array dimension and name // from arg (section.node(x) (0 if x < 0) to this void in(Section*, double x = -1.); void in(Point_process*); void in(MechanismStandard*); void set(const char*, double val, int arrayindex=0); // from this to segement containing x (uniformly if x < 0) void out(Section*, double x = -1.); void out(Point_process*); void out(MechanismStandard*); double get(const char*, int arrayindex=0); void save(const char*, ostream*); // for session files NrnProperty* np() { return np_; } Object* msobj_; // wraps 'this' and used as first arg for pyact_ private: NrnProperty* np_; int name_cnt_; int offset_; int vartype_; CopyString action_; Object* pyact_; Symbol** glosym_; void mschk(const char*); }; class MechanismType : public Resource { public: MechanismType(bool point_process); virtual ~MechanismType(); bool is_point(); bool is_netcon_target(int); bool has_net_event(int); bool is_artificial(int); void select(const char*); const char* selected(); void insert(Section*); void remove(Section*); void point_process(Object**); void action(const char*, Object* pyact); void menu(); int count(); int selected_item(); int internal_type(); void select(int); Point_process* pp_begin(); Point_process* pp_next(); Object* mtobj_; // wraps 'this' and used as first arg for pyact_ private: MechTypeImpl* mti_; }; #endif neuron-7.5/src/nrniv/nrnmusic.cpp000066400000000000000000000171651323325274500172000ustar00rootroot00000000000000#define NO_PYTHON_H 1 #include <../neuronmusic/nrnmusic.h> extern "C" { extern int nrnmusic; extern MPI_Comm nrnmusic_comm; void nrnmusic_init(int*, char***); void nrnmusic_terminate(); void nrnmusic_injectlist(void* vp, double tt); void nrnmusic_inject(void* port, int gindex, double tt); void nrnmusic_spikehandle(void* vport, double tt, int gindex); extern Object* nrnpy_po2ho(PyObject*); extern PyObject* nrnpy_ho2po(Object*); extern Object* hoc_new_object(Symbol*, void*); } MUSIC::Setup* nrnmusic_setup; MUSIC::Runtime* nrnmusic_runtime; class NrnMusicEventHandler : public MUSIC::EventHandlerLocalIndex { public: void operator() (double t, MUSIC::LocalIndex id); void filltable(NRNMUSIC::EventInputPort*, int); PreSyn** table; }; class MusicPortPair { public: MusicPortPair(void* port, int gindex, void* p); virtual ~MusicPortPair(); void clear(); // avoid recursion on delete by first calling clear void* port_; int gindex_; MusicPortPair* next_; }; MusicPortPair::MusicPortPair(void* port, int gindex, void* vp) { port_ = port; gindex_ = gindex; next_ = (MusicPortPair*)vp; } MusicPortPair::~MusicPortPair() { if (next_) { delete next_; } } void MusicPortPair::clear() { MusicPortPair* i, *j; for (i=next_; i; i = j) { j = i->next_; i->next_ = 0; delete i; } } class NetParMusicEvent: public DiscreteEvent { public: NetParMusicEvent(); virtual ~NetParMusicEvent(); virtual void send(double, NetCvode*, NrnThread*); virtual void deliver(double, NetCvode*, NrnThread*); virtual int type() { return 100; } }; static NetParMusicEvent* npme; #include declareTable(PortTable, void*, int) // used as set implementTable(PortTable, void*, int) static PortTable* music_input_ports; static PortTable* music_output_ports; declareTable(Gi2PreSynTable, int, PreSyn*) implementTable(Gi2PreSynTable, int, PreSyn*) NetParMusicEvent::NetParMusicEvent() { } NetParMusicEvent::~NetParMusicEvent() { } void NetParMusicEvent::send(double t, NetCvode* nc, NrnThread* nt) { nc->event(t + usable_mindelay_, this, nt); } void NetParMusicEvent::deliver(double t, NetCvode* nc, NrnThread* nt) { nrnmusic_runtime->tick(); send(t, nc, nt); } void alloc_music_space() { if (music_input_ports) { return; } music_input_ports = new PortTable(64); music_output_ports = new PortTable(64); } void nrnmusic_injectlist(void* vp, double tt) { MusicPortPair* mpp; for (mpp = (MusicPortPair*)vp; mpp; mpp = mpp->next_) { nrnmusic_inject(mpp->port_, mpp->gindex_, tt); } } void nrnmusic_inject(void* vport, int gi, double tt) { //printf("nrnmusic_inject %p %d %g\n", vport, gi, tt); ((MUSIC::EventOutputPort*)vport)-> insertEvent(tt / 1000.0, // unit conversion ms -> s (MUSIC::GlobalIndex)gi); } void NrnMusicEventHandler::filltable(NRNMUSIC::EventInputPort* port, int cnt) { table = new PreSyn*[cnt]; int j = 0; for (TableIterator(Gi2PreSynTable) i(*port->gi_table); i.more(); i.next()) { PreSyn* ps = i.cur_value(); table[j] = ps; ++j; } } void NrnMusicEventHandler::operator () (double t, MUSIC::LocalIndex id) { PreSyn* ps = table[id]; ps->send(1000.0 * t, net_cvode_instance, nrn_threads); //printf("event handler t=%g id=%d ps=%p\n", t, int(id), ps); } NRNMUSIC::EventOutputPort* NRNMUSIC::publishEventOutput (std::string id) { return new NRNMUSIC::EventOutputPort (nrnmusic_setup, id); } void NRNMUSIC::EventOutputPort::gid2index(int gid, int gi) { // analogous to pc.cell // except pc.cell(gid, nc) has already been called and this // will add this to the PreSyn.music_out_ list. alloc_music_space(); PreSyn* ps; if (!gid2out_->find(gid, ps)) { return; } ps->music_port_ = new MusicPortPair((void*)this, gi, ps->music_port_); // to create an IndexList for a later map, need to // save the indices used for each port int i = 0; if (!music_output_ports->find(i, (void*)this)) { music_output_ports->insert((void*)this, i); gi_table = new Gi2PreSynTable(1024); } PreSyn* ps2; assert(!gi_table->find(ps2, gi)); //printf("gid2index insert %p %d\n", this, gi); gi_table->insert(gi, ps); } NRNMUSIC::EventInputPort::EventInputPort(MUSIC::Setup* s, std::string id) : MUSIC::Port (s, id), MUSIC::EventInputPort(s, id) { gi_table = new Gi2PreSynTable(1024); } NRNMUSIC::EventInputPort* NRNMUSIC::publishEventInput (std::string id) { return new NRNMUSIC::EventInputPort (nrnmusic_setup, id); } PyObject* NRNMUSIC::EventInputPort::index2target(int gi, PyObject* ptarget) { // analogous to pc.gid_connect Object* target = nrnpy_po2ho(ptarget); if (!is_point_process(target)) { hoc_execerror("target arg must be a Point_process", 0); } alloc_music_space(); PreSyn* ps; int i = 0; if (!music_input_ports->find(i, (void*)this)) { music_input_ports->insert((void*)this, i); } //assert (!gi_table->find(ps, gi)); if (!gi_table->find(ps, gi)) { ps = new PreSyn(NULL, NULL, NULL); net_cvode_instance->psl_append(ps); gi_table->insert(gi, ps); } ps->gid_ = -2; ps->output_index_ = -2; NetCon* nc = new NetCon(ps, target); Object* o = hoc_new_object(netcon_sym_, nc); nc->obj_ = o; PyObject* po = nrnpy_ho2po(o); //printf("index2target %d %s\n", gi, hoc_object_name(target)); return po; } void nrnmusic_init(int* pargc, char*** pargv) { int i; int& argc = *pargc; char**& argv = *pargv; if (strlen(argv[0]) >= 5 && strcmp(argv[0] + strlen(argv[0]) - 5, "music") == 0) { nrnmusic = 1; } for (i=0; i < argc; ++i) { if (strcmp(argv[i], "-music") == 0) { nrnmusic = 1; } } if (getenv ("_MUSIC_CONFIG_")) nrnmusic = 1; // temporary kludge if (nrnmusic) { nrnmusic_setup = new MUSIC::Setup(argc, argv); nrnmusic_comm = nrnmusic_setup->communicator(); } } void nrnmusic_terminate() { if (!nrnmusic_runtime) { nrnmusic_runtime = new MUSIC::Runtime(nrnmusic_setup, 1); } nrnmusic_runtime->finalize (); delete nrnmusic_runtime; } // Called from nrn_spike_exchange_init so usable_mindelay is ready to use // For now, can only be called once. static void nrnmusic_runtime_phase() { static int called = 0; assert(!called); called = 1; // call map on all the input ports for (TableIterator(PortTable) i(*music_input_ports); i.more(); i.next()) { NRNMUSIC::EventInputPort* eip = (NRNMUSIC::EventInputPort*)i.cur_key(); NrnMusicEventHandler* eh = new NrnMusicEventHandler(); Gi2PreSynTable* pst = eip->gi_table; std::vector gindices; //iterate over pst and create indices int cnt = 0; for (TableIterator(Gi2PreSynTable) j(*pst); j.more(); j.next()) { int gi = j.cur_key(); //printf("input port eip=%p gi=%d\n", eip, gi); gindices.push_back (gi); ++cnt; } eh->filltable(eip, cnt); MUSIC::PermutationIndex indices (&gindices.front (), gindices.size ()); eip->map(&indices, eh, usable_mindelay_ / 1000.0); delete eip->gi_table; } delete music_input_ports; // call map on all the output ports for (TableIterator(PortTable) i(*music_output_ports); i.more(); i.next()) { NRNMUSIC::EventOutputPort* eop = (NRNMUSIC::EventOutputPort*)i.cur_key(); Gi2PreSynTable* pst = eop->gi_table; std::vector gindices; //iterate over pst and create indices for (TableIterator(Gi2PreSynTable) j(*pst); j.more(); j.next()) { int gi = j.cur_key(); //printf("output port eop=%p gi = %d\n", eop, gi); gindices.push_back (gi); } MUSIC::PermutationIndex indices (&gindices.front (), gindices.size ()); eop->map(&indices, MUSIC::Index::GLOBAL); delete eop->gi_table; } delete music_output_ports; //switch to the runtime phase //printf("usable_mindelay = %g\n", usable_mindelay_); nrnmusic_runtime = new MUSIC::Runtime(nrnmusic_setup, usable_mindelay_ / 1000.0); npme = new NetParMusicEvent(); npme->send(0, net_cvode_instance, nrn_threads); } neuron-7.5/src/nrniv/nrnoc2iv.h000066400000000000000000000002631323325274500165360ustar00rootroot00000000000000#ifndef nrnoc2iv_h #define nrnoc2iv_h // common things in nrnoc that can be used by nrniv #include "oc2iv.h" extern "C" { #include "section.h" } #include "ndatclas.h" #endif neuron-7.5/src/nrniv/nrnpy.cpp000066400000000000000000000171311323325274500165010ustar00rootroot00000000000000#include <../../nrnconf.h> // For Linux and Max OS X, // Solve the problem of not knowing what version of Python the user has by // possibly deferring linking to libnrnpython.so to run time using the proper // Python interface #include <../nrnpython/nrnpython_config.h> #include #include #include #include "nrnoc2iv.h" #include "classreg.h" #include "nonvintblock.h" #include "nrnmpi.h" extern "C" { extern int nrn_nopython; extern int nrnpy_nositeflag; extern int nrn_is_python_extension; int* nrnpy_site_problem_p; extern void (*p_nrnpython_start)(int); void nrnpython(); static void (*p_nrnpython_real)(); static void (*p_nrnpython_reg_real)(); } // following is undefined or else has the value of sys.api_version // at time of configure (using the python first in the PATH). #if defined(NRNPYTHON_DYNAMICLOAD) #ifdef MINGW #define RTLD_NOW 0 #define RTLD_GLOBAL 0 #define RTLD_NOLOAD 0 extern "C" { extern void* dlopen_noerr(const char* name, int mode); #define dlopen dlopen_noerr extern void* dlsym(void* handle, const char* name); extern int dlclose(void* handle); extern char* dlerror(); } #else //#define _GNU_SOURCE #include #endif extern "C" { extern char* neuron_home; } #if NRNPYTHON_DYNAMICLOAD >= 20 && NRNPYTHON_DYNAMICLOAD < 30 #ifdef MINGW static const char* ver[] = {"2.7", 0}; #else static const char* ver[] = {"2.7", "2.6", "2.5", 0}; #endif // !MINGW #elif NRNPYTHON_DYNAMICLOAD >= 30 #ifdef MINGW static const char* ver[] = {"3.5", 0}; #else static const char* ver[] = {"3.6", "3.5", "3.4", 0}; #endif // !MINGW #else //NRNPYTHON_DYNAMICLOAD < 20 static const char* ver[] = {0}; #endif //NRNPYTHON_DYNAMICLOAD < 20 static int iver; // which python is loaded? static void* python_already_loaded(); static void* load_python(); static void load_nrnpython(int, const char*); #else //!defined(NRNPYTHON_DYNAMICLOAD) extern "C" { extern void nrnpython_start(int); extern void nrnpython_reg_real(); extern void nrnpython_real(); } #endif //defined(NRNPYTHON_DYNAMICLOAD) void nrnpython() { #if USE_PYTHON if (p_nrnpython_real) { (*p_nrnpython_real)(); return; } #endif hoc_retpushx(0.); } // Stub class for when Python does not exist static void* p_cons(Object*) { return 0; } static void p_destruct(void* v) { } static Member_func p_members[] = {0,0}; #if NRNPYTHON_DYNAMICLOAD static char* pyhome; static void siteprob(void) { if (nrnpy_site_problem_p && (*nrnpy_site_problem_p)) { printf("Py_Initialize exited. PYTHONHOME probably needs to be set correctly.\n"); if(pyhome) { printf("Our automatic guess based on the Python shared library location:\n export PYTHONHOME=%s\ndid not work.\n", pyhome); } printf("It will help to examine the output of:\nnrnpyenv.sh\n\ and set the indicated environment variables, or avoid python by adding\n\ nopython: on\n\ to %s/lib/nrn.defaults (or .nrn.defaults in your $HOME directory)\n", neuron_home); } } static void set_pythonhome(void* handle){ if (nrnmpi_myid == 0) {atexit(siteprob);} #ifdef MINGW #else if (getenv("PYTHONHOME") || nrnpy_nositeflag) { return; } Dl_info dl_info; void* s = dlsym(handle, "Py_Initialize"); assert(s != NULL); int success = dladdr(s, &dl_info); if (success) { //printf("%s\n", dl_info.dli_fname); pyhome = strdup(dl_info.dli_fname); char* p = pyhome; int n = strlen(p); int seen = 0; for (int i = n-1; i > 0; --i) { if (p[i] == '/') { if (++seen >= 2) { p[i] = '\0' ; break; } } } int res = setenv("PYTHONHOME", p, 1); assert(res == 0); } #endif } #endif void nrnpython_reg() { //printf("nrnpython_reg in nrnpy.cpp\n"); #if USE_PYTHON if (nrn_nopython) { p_nrnpython_start = 0; p_nrnpython_real = 0; p_nrnpython_reg_real = 0; }else{ #if NRNPYTHON_DYNAMICLOAD void* handle = NULL; char* nrn_pylib = NULL; if (!nrn_is_python_extension) { // As last resort (or for python3) load $NRN_PYLIB nrn_pylib = getenv("NRN_PYLIB"); if (nrn_pylib) { handle = dlopen(nrn_pylib, RTLD_NOW|RTLD_GLOBAL); if (!handle) { fprintf(stderr, "Could not dlopen NRN_PYLIB: %s\n", nrn_pylib); exit(1); } } if (!handle) { python_already_loaded();} if (!handle) { // embed python handle = load_python(); } if (handle) { // need to worry about the site.py problem // can fix with a proper PYTHONHOME but need to know // what path was used to load the python library. set_pythonhome(handle); } }else{ //printf("nrn_is_python_extension = %d\n", nrn_is_python_extension); } // for some mysterious reason on max osx 10.12 // (perhaps due to System Integrity Protection?) when python is // launched, python_already_loaded() returns a NULL handle unless // the full path to the dylib is used. Since we know it is loaded // in these circumstances, it is sufficient to go ahead and dlopen // the nrnpython interface library if (handle || nrn_is_python_extension) { load_nrnpython(nrn_is_python_extension, nrn_pylib); } #else p_nrnpython_start = nrnpython_start; p_nrnpython_real = nrnpython_real; p_nrnpython_reg_real = nrnpython_reg_real; #endif } if (p_nrnpython_reg_real) { (*p_nrnpython_reg_real)(); if (nrnpy_site_problem_p) { *nrnpy_site_problem_p = 1; } return; } #endif class2oc("PythonObject", p_cons, p_destruct, p_members, NULL, NULL, NULL); } #if NRNPYTHON_DYNAMICLOAD // to end of file // important dlopen flags : // RTLD_NOLOAD returns NULL if not open, or handle if it is resident. static void* ver_dlo(int flag) { for (int i = 0; ver[i]; ++i) { char name[100]; #ifdef MINGW sprintf(name, "python%c%c.dll", ver[i][0], ver[i][2]); #else #if DARWIN sprintf(name, "libpython%s.dylib", ver[i]); #else sprintf(name, "libpython%s.so", ver[i]); #endif #endif void* handle = dlopen(name, flag); iver = i; if (handle) { return handle; } } iver = -1; return NULL; } static void* python_already_loaded() { void* handle = ver_dlo(RTLD_NOW|RTLD_GLOBAL|RTLD_NOLOAD); //printf("python_already_loaded %d\n", iver); return handle; } static void* load_python() { void* handle = ver_dlo(RTLD_NOW|RTLD_GLOBAL); //printf("load_python %d\n", iver); return handle; } static void* load_sym(void* handle, const char* name) { void* p = dlsym(handle, name); if (!p) { printf("Could not load %s\n", name); exit(1); } return p; } static void* load_nrnpython_helper(const char* npylib) { char name[2048]; #ifdef MINGW sprintf(name, "%s.dll", npylib); #else #if DARWIN sprintf(name, "%s/../../%s/lib/%s.dylib", neuron_home, NRNHOSTCPU, npylib); #else sprintf(name, "%s.so", npylib); #endif #endif void* handle = dlopen(name, RTLD_NOW); return handle; } static void load_nrnpython(int pyver10, const char* pylib) { void* handle = NULL; #if defined(__MINGW32__) char name[256]; if (pyver10 > 1) { sprintf(name, "libnrnpython%d", pyver10); } else if (pylib && strstr(pylib, "ython") != NULL) { char* cp = strstr(pylib, "ython") + 5; sprintf(name, "libnrnpython%c%c", cp[0], cp[1]); } else { sprintf(name, "libnrnpython27"); } handle = load_nrnpython_helper(name); if (!handle) { printf("Could not load %s\n", name); printf("pyver10=%d pylib=%s\n", pyver10, pylib ? pylib : "NULL"); return; } #else handle = load_nrnpython_helper("libnrnpython3"); if (!handle) { handle = load_nrnpython_helper("libnrnpython2"); if (!handle) { printf("Could not load either libnrnpython3 or libnrnpython2\n"); printf("pyver10=%d pylib=%s\n", pyver10, pylib ? pylib : "NULL"); return; } } #endif p_nrnpython_start = (void(*)(int))load_sym(handle, "nrnpython_start"); p_nrnpython_real = (void(*)())load_sym(handle, "nrnpython_real"); p_nrnpython_reg_real = (void(*)())load_sym(handle, "nrnpython_reg_real"); } #endif neuron-7.5/src/nrniv/nrnrtime.cpp000066400000000000000000000027631323325274500171760ustar00rootroot00000000000000#include <../../nrnconf.h> #include "nrnrt.h" #if NRN_REALTIME // to end of file #include #include "classreg.h" #include "nrnoc2iv.h" #include "parse.h" extern "C" { extern int stoprun; extern double t; extern void nrn_fixed_step(); } class NrnRealTime { public: NrnRealTime(); virtual ~NrnRealTime(); }; static double softrun(void* v) { double tstop_ = chkarg(1, 1e-9, 1e9); while (t < tstop_) { nrn_fixed_step(); if (stoprun) { break; } } return 0.; } static double run(void* v) { int ovrn = 0; if (nrn_realtime_) { ovrn = nrn_rt_run(*getarg(1)); } return (double)ovrn; } static double overrun(void* v) { return(double)nrnrt_overrun_; } static double rth(void* v) { nrn_rtrun_thread_init(); return 1.; } static Member_func members[] = { "run", run, "steptime", 0, // will be changed below "overrun", overrun, "use_runthread", rth, "softrun", softrun, 0, 0 }; static void* cons(Object*) { NrnRealTime* m = new NrnRealTime(); return (void*)m; } static void destruct(void* v) { NrnRealTime* m = (NrnRealTime*)v; delete m; } static void steer_val(void* v) { hoc_spop(); hoc_pushpx(&nrn_rtstep_time_); } void NrnRealTime_reg() { class2oc("RealTime", cons, destruct, members, NULL, NULL, NULL); Symbol* sv = hoc_lookup("RealTime"); Symbol* sx = hoc_table_lookup("steptime", sv->u.ctemplate->symtable); sx->type = VAR; sx->arayinfo = NULL; sv->u.ctemplate->steer = steer_val; } NrnRealTime::NrnRealTime() { } NrnRealTime::~NrnRealTime() { } #endif //NRN_REALTIME neuron-7.5/src/nrniv/nrnsection_mapping.h000066400000000000000000000064511323325274500207000ustar00rootroot00000000000000#ifndef NRN_SECTION_MAPPING #define NRN_SECTION_MAPPING #include #include /** @brief Section to segment mapping * * For a section list (of particulat type), store mapping * of section to segment. Note that the section is repeated * when there are multiple segments in a section. */ struct SecMapping { /** number of sections in section list */ int nsec; /** name of section list */ std::string name; /** list of segments */ std::vector segments; /** list sections associated with each segment */ std::vector sections; SecMapping(int n, std::string s) : nsec(n), name(s) {} size_t size() { return segments.size(); } }; /** @brief Compartment mapping information for a cell * * A cell can have multiple section list types like * soma, axon, apic, dend etc. User will add these * section lists using HOC interface. */ struct CellMapping { /** gid of a cell */ int gid; /** list of section lists (like soma, axon, apic) */ std::vector secmapping; CellMapping(int g, SecMapping* s) { gid = g; secmapping.push_back(s); } /** @brief total number of sections in a cell */ int num_sections() { int nsec = 0; for(size_t i = 0; i < secmapping.size(); i++) { nsec += secmapping[i]->nsec; } return nsec; } /** @brief total number of segments in a cell */ int num_segments() { int nseg = 0; for(size_t i = 0; i < secmapping.size(); i++) { nseg += secmapping[i]->segments.size(); } return nseg; } /** @brief number of section lists */ size_t size() { return secmapping.size(); } ~CellMapping() { for(size_t i = 0; i < secmapping.size(); i++) { delete secmapping[i]; } } }; /** @brief Compartment mapping information for NrnThread * * NrnThread could have more than one cell in cellgroup * and we store this in vector. */ struct NrnMappingInfo { /** list of cells mapping */ std::vector mapping; /** @brief number of cells */ size_t size() { return mapping.size(); } /** @brief after writing NrnThread to file we remove * all previous mapping information, free memory. */ void clear() { for(size_t i = 0; i < mapping.size(); i++) { delete mapping[i]; } mapping.clear(); } /** @brief memory cleanup */ ~NrnMappingInfo() { for(size_t i = 0; i < mapping.size(); i++) { delete mapping[i]; } } /** @brief get cell mapping information for given gid * if exist otherwise return NULL. */ CellMapping* get_cell_mapping(int gid) { for(int i = 0; i < mapping.size(); i++) { if ( mapping[i]->gid == gid) return mapping[i]; } return NULL; } /** @brief add section mapping information for given gid * if cell is not peviously added, create new cell mapping. */ void add_sec_mapping(int gid, SecMapping* s) { CellMapping *cm = get_cell_mapping(gid); if ( cm == NULL ) { CellMapping *c = new CellMapping(gid, s); mapping.push_back(c); } else { cm->secmapping.push_back(s); } } }; #if defined(__cplusplus) extern "C" void nrn_write_mapping_info(const char *, int, NrnMappingInfo&); #endif #endif // NRN_SECTION_MAPPING neuron-7.5/src/nrniv/nrnste.cpp000066400000000000000000000067341323325274500166530ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include #include #include #include static double ste_transition(void* v) { StateTransitionEvent* ste = (StateTransitionEvent*)v; int src = (int)chkarg(1, 0, ste->nstate()-1); int dest = (int)chkarg(2, 0, ste->nstate()-1); double* var1 = hoc_pgetarg(3); double* var2 = hoc_pgetarg(4); HocCommand* hc = NULL; if (ifarg(5)) { Object* obj = NULL; if (hoc_is_str_arg(5)) { char* stmt = NULL; stmt = gargstr(5); if (ifarg(6)) { obj = *hoc_objgetarg(6); } hc = new HocCommand(stmt, obj); }else{ obj = *hoc_objgetarg(5); hc = new HocCommand(obj); } } ste->transition(src, dest, var1, var2, hc); return 1.; } static double ste_state(void* v) { StateTransitionEvent* ste = (StateTransitionEvent*)v; int state = ste->state(); if (ifarg(1)) { ste->state((int)chkarg(1, 0, ste->nstate()-1)); } return (double)state; } static Member_func members[] = { "transition", ste_transition, "state", ste_state, 0, 0 }; static void* ste_cons(Object*) { int nstate = (int)chkarg(1, 1, 1e6); Point_process* pnt = NULL; if (ifarg(2)) { Object* obj = *hoc_objgetarg(2); pnt = ob2pntproc(obj); } StateTransitionEvent* ste = new StateTransitionEvent(nstate, pnt); return ste; } static void ste_destruct(void* v) { StateTransitionEvent* ste = (StateTransitionEvent*)v; delete ste; } void StateTransitionEvent_reg() { class2oc("StateTransitionEvent", ste_cons, ste_destruct, members, NULL, NULL, NULL); } StateTransitionEvent::StateTransitionEvent(int nstate, Point_process* pnt){ nstate_ = nstate; states_ = new STEState[nstate_]; istate_ = 0; pnt_ = pnt; activated_ = -1; } StateTransitionEvent::~StateTransitionEvent(){ deactivate(); delete [] states_; } void StateTransitionEvent::deactivate() { if (activated_ < 0) { return; } STEState& s = states_[activated_]; for (int i=0; i < s.ntrans_; ++i) { s.transitions_[i].deactivate(); } activated_ = -1; } void StateTransitionEvent::activate() { if (activated_ >= 0) { deactivate(); } STEState& s = states_[istate_]; for (int i=0; i < s.ntrans_; ++i) { s.transitions_[i].activate(); } activated_ = istate_; } void StateTransitionEvent::state(int ist) { assert(ist >= 0 && ist < nstate_); deactivate(); istate_ = ist; activate(); } STEState::STEState(){ ntrans_ = 0; transitions_ = NULL; } STEState::~STEState(){ if (transitions_) { delete [] transitions_; } } STETransition* STEState::add_transition() { ++ntrans_; STETransition* st = transitions_; transitions_ = new STETransition[ntrans_]; if (st) { int i; for (i=0; i < ntrans_-1; ++i) { transitions_[i].hc_ = st[i].hc_; st[i].hc_ = NULL; transitions_[i].ste_ = st[i].ste_; st[i].ste_ = NULL; transitions_[i].stec_ = st[i].stec_; st[i].stec_ = NULL; transitions_[i].var1_ = st[i].var1_; transitions_[i].var2_ = st[i].var2_; transitions_[i].dest_ = st[i].dest_; transitions_[i].var1_is_time_ = st[i].var1_is_time_; } delete [] st; } return transitions_ + ntrans_ - 1; } STETransition::STETransition(){ hc_ = NULL; ste_ = NULL; stec_ = NULL; var1_is_time_ = false; } STETransition::~STETransition(){ if (hc_) { delete hc_; } if (stec_) { delete stec_; } } void STETransition::event() { ste_->deactivate(); ste_->istate_ = dest_; if (hc_) { nrn_hoc_lock(); hc_->execute(); nrn_hoc_unlock(); } ste_->activate(); } neuron-7.5/src/nrniv/nrnste.h000066400000000000000000000027271323325274500163160ustar00rootroot00000000000000#ifndef nrnste_h #define nrnste_h //StateTransitionEvent is a finite state machine in which a transtion occurs // when the transition condition is true. For speed the transition condition // is of the form *var1 > *var2 and allows second order interpolation. // Transition conditions are checked only if the source state is the // current state. #include class HocCommand; class StateTransitionEvent; class STECondition; declarePtrList(STEList, StateTransitionEvent) class STETransition { public: STETransition(); virtual ~STETransition(); void event(); // from STECondition::deliver virtual double value() { return *var1_ - *var2_;} void activate(); // add ste_ to watch list void deactivate(); // remove ste_ from watch list double* var1_; double* var2_; HocCommand* hc_; StateTransitionEvent* ste_; STECondition* stec_; int dest_; bool var1_is_time_; }; class STEState { public: STEState(); virtual ~STEState(); STETransition* add_transition(); int ntrans_; STETransition* transitions_; }; class StateTransitionEvent { public: StateTransitionEvent(int nstate, Point_process*); virtual ~StateTransitionEvent(); void transition(int src, int dest, double* var1, double* var2, HocCommand*); void state(int i); // set current state -- update watch list. int state(){return istate_;} int nstate() { return nstate_;} void activate(); void deactivate(); int nstate_; int istate_; STEState* states_; Point_process* pnt_; int activated_; }; #endif neuron-7.5/src/nrniv/nvector_nrnparallel_ld.c000066400000000000000000000631711323325274500215310ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a parallel MPI implementation * of the NVECTOR package. * ----------------------------------------------------------------- */ #define USELONGDOUBLE 1 #include <../../nrnconf.h> #include #include #include /* for NRNMPI_DYNAMICLOAD */ #include #if NRNMPI_DYNAMICLOAD extern void nrnmpi_dbl_allreduce_vec(double* src, double* dest, int cnt, int type); extern void nrnmpi_longdbl_allreduce_vec(long double* src, long double* dest, int cnt, int type); extern void nrnmpi_long_allreduce_vec(long* src, long* dest, int cnt, int type); extern int nrnmpi_numprocs; #endif #include "nvector_nrnparallel_ld.h" #if NRNMPI_DYNAMICLOAD #else extern MPI_Comm nrnmpi_comm; #endif #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define HALF RCONST(0.5) #define ONE RCONST(1.0) #define ONEPT5 RCONST(1.5) #if USELONGDOUBLE #define ldrealtype long double #else #define ldrealtype realtype #endif /* Error Message */ #define BAD_N1 "N_VNew_NrnParallelLD -- Sum of local vector lengths differs from " #define BAD_N2 "input global length. \n\n" #define BAD_N BAD_N1 BAD_N2 /* Private function prototypes */ /* Reduction operations add/max/min over the processor group */ static realtype VAllReduce_NrnParallelLD(realtype d, int op, MPI_Comm comm); #if USELONGDOUBLE /* only for sum */ static ldrealtype VAllReduce_long_NrnParallelLD(ldrealtype d, int op, MPI_Comm comm); #else #define VAllReduce_long_NrnParallelLD VAllReduce_NrnParallelLD #endif /* z=x */ static void VCopy_NrnParallelLD(N_Vector x, N_Vector z); /* z=x+y */ static void VSum_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z); /* z=x-y */ static void VDiff_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z); /* z=-x */ static void VNeg_NrnParallelLD(N_Vector x, N_Vector z); /* z=c(x+y) */ static void VScaleSum_NrnParallelLD(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=c(x-y) */ static void VScaleDiff_NrnParallelLD(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=ax+y */ static void VLin1_NrnParallelLD(realtype a, N_Vector x, N_Vector y, N_Vector z); /* z=ax-y */ static void VLin2_NrnParallelLD(realtype a, N_Vector x, N_Vector y, N_Vector z); /* y <- ax+y */ static void Vaxpy_NrnParallelLD(realtype a, N_Vector x, N_Vector y); /* x <- ax */ static void VScaleBy_NrnParallelLD(realtype a, N_Vector x); /* * ----------------------------------------------------------------- * exported functions * ----------------------------------------------------------------- */ /* ---------------------------------------------------------------- * Function to create a new parallel vector with empty data array */ N_Vector N_VNewEmpty_NrnParallelLD(MPI_Comm comm, long int local_length, long int global_length) { N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnParallelLD content; long int n, Nsum; /* Compute global length as sum of local lengths */ n = local_length; #if NRNMPI_DYNAMICLOAD nrnmpi_long_allreduce_vec(&n, &Nsum, 1, 1); #else comm = nrnmpi_comm; MPI_Allreduce(&n, &Nsum, 1, PVEC_INTEGER_MPI_TYPE, MPI_SUM, comm); #endif if (Nsum != global_length) { printf(BAD_N); return(NULL); } /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) { free(v); return(NULL); } ops->nvclone = N_VClone_NrnParallelLD; ops->nvdestroy = N_VDestroy_NrnParallelLD; ops->nvspace = N_VSpace_NrnParallelLD; ops->nvgetarraypointer = N_VGetArrayPointer_NrnParallelLD; ops->nvsetarraypointer = N_VSetArrayPointer_NrnParallelLD; ops->nvlinearsum = N_VLinearSum_NrnParallelLD; ops->nvconst = N_VConst_NrnParallelLD; ops->nvprod = N_VProd_NrnParallelLD; ops->nvdiv = N_VDiv_NrnParallelLD; ops->nvscale = N_VScale_NrnParallelLD; ops->nvabs = N_VAbs_NrnParallelLD; ops->nvinv = N_VInv_NrnParallelLD; ops->nvaddconst = N_VAddConst_NrnParallelLD; ops->nvdotprod = N_VDotProd_NrnParallelLD; ops->nvmaxnorm = N_VMaxNorm_NrnParallelLD; ops->nvwrmsnormmask = N_VWrmsNormMask_NrnParallelLD; ops->nvwrmsnorm = N_VWrmsNorm_NrnParallelLD; ops->nvmin = N_VMin_NrnParallelLD; ops->nvwl2norm = N_VWL2Norm_NrnParallelLD; ops->nvl1norm = N_VL1Norm_NrnParallelLD; ops->nvcompare = N_VCompare_NrnParallelLD; ops->nvinvtest = N_VInvTest_NrnParallelLD; ops->nvconstrmask = N_VConstrMask_NrnParallelLD; ops->nvminquotient = N_VMinQuotient_NrnParallelLD; /* Create content */ content = (N_VectorContent_NrnParallelLD) malloc(sizeof(struct _N_VectorContent_NrnParallelLD)); if (content == NULL) { free(ops); free(v); return(NULL); } /* Attach lengths and communicator */ content->local_length = local_length; content->global_length = global_length; content->comm = comm; content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------- * Function to create a new parallel vector */ N_Vector N_VNew_NrnParallelLD(MPI_Comm comm, long int local_length, long int global_length) { N_Vector v; realtype *data; v = N_VNewEmpty_NrnParallelLD(comm, local_length, global_length); if (v == NULL) return(NULL); /* Create data */ if(local_length > 0) { /* Allocate memory */ data = (realtype *) malloc(local_length * sizeof(realtype)); if(data == NULL) {N_VDestroy_NrnParallelLD(v);return(NULL);} /* Attach data */ NV_OWN_DATA_P_LD(v) = TRUE; NV_DATA_P_LD(v) = data; } return(v); } /* ---------------------------------------------------------------------------- * Function to clone from a template a new vector with empty (NULL) data array */ N_Vector N_VCloneEmpty_NrnParallelLD(N_Vector w) { N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnParallelLD content; if (w == NULL) return(NULL); /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) { free(v); return(NULL); } ops->nvclone = w->ops->nvclone; ops->nvdestroy = w->ops->nvdestroy; ops->nvspace = w->ops->nvspace; ops->nvgetarraypointer = w->ops->nvgetarraypointer; ops->nvsetarraypointer = w->ops->nvsetarraypointer; ops->nvlinearsum = w->ops->nvlinearsum; ops->nvconst = w->ops->nvconst; ops->nvprod = w->ops->nvprod; ops->nvdiv = w->ops->nvdiv; ops->nvscale = w->ops->nvscale; ops->nvabs = w->ops->nvabs; ops->nvinv = w->ops->nvinv; ops->nvaddconst = w->ops->nvaddconst; ops->nvdotprod = w->ops->nvdotprod; ops->nvmaxnorm = w->ops->nvmaxnorm; ops->nvwrmsnormmask = w->ops->nvwrmsnormmask; ops->nvwrmsnorm = w->ops->nvwrmsnorm; ops->nvmin = w->ops->nvmin; ops->nvwl2norm = w->ops->nvwl2norm; ops->nvl1norm = w->ops->nvl1norm; ops->nvcompare = w->ops->nvcompare; ops->nvinvtest = w->ops->nvinvtest; ops->nvconstrmask = w->ops->nvconstrmask; ops->nvminquotient = w->ops->nvminquotient; /* Create content */ content = (N_VectorContent_NrnParallelLD) malloc(sizeof(struct _N_VectorContent_NrnParallelLD)); if (content == NULL) { free(ops); free(v); return(NULL); } /* Attach lengths and communicator */ content->local_length = NV_LOCLENGTH_P_LD(w); content->global_length = NV_GLOBLENGTH_P_LD(w); content->comm = NV_COMM_P_LD(w); content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------- * Function to create a parallel N_Vector with user data component */ N_Vector N_VMake_NrnParallelLD(MPI_Comm comm, long int local_length, long int global_length, realtype *v_data) { N_Vector v; v = N_VNewEmpty_NrnParallelLD(comm, local_length, global_length); if (v == NULL) return(NULL); if (local_length > 0) { /* Attach data */ NV_OWN_DATA_P_LD(v) = FALSE; NV_DATA_P_LD(v) = v_data; } return(v); } /* ---------------------------------------------------------------- * Function to create an array of new parallel vectors. */ N_Vector *N_VNewVectorArray_NrnParallelLD(int count, MPI_Comm comm, long int local_length, long int global_length) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0) { /* Allocate memory */ data = (realtype *) malloc(local_length * sizeof(realtype)); if(data == NULL) {N_VDestroy_NrnParallelLD(v);return(NULL);} /* Attach data */ NV_OWN_DATA_P_LD(v) = TRUE; NV_DATA_P_LD(v) = data; } return(v); } void N_VDestroy_NrnParallelLD(N_Vector v) { if ( (NV_OWN_DATA_P_LD(v) == TRUE) && (NV_DATA_P_LD(v) != NULL) ) free(NV_DATA_P_LD(v)); free(v->content); free(v->ops); free(v); } void N_VSpace_NrnParallelLD(N_Vector v, long int *lrw, long int *liw) { MPI_Comm comm; int npes; comm = NV_COMM_P_LD(v); #if NRNMPI_DYNAMICLOAD npes = nrnmpi_numprocs; #else MPI_Comm_size(comm, &npes); #endif *lrw = NV_GLOBLENGTH_P_LD(v); *liw = 2 * npes; } realtype *N_VGetArrayPointer_NrnParallelLD(N_Vector v) { realtype *v_data; v_data = NV_DATA_P_LD(v); return(v_data); } void N_VSetArrayPointer_NrnParallelLD(realtype *v_data, N_Vector v) { if (NV_LOCLENGTH_P_LD(v) > 0) NV_DATA_P_LD(v) = v_data; } void N_VLinearSum_NrnParallelLD(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { long int i, N; realtype c, *xd, *yd, *zd; N_Vector v1, v2; booleantype test; if ((b == ONE) && (z == y)) { /* BLAS usage: axpy y <- ax+y */ Vaxpy_NrnParallelLD(a,x,y); return; } if ((a == ONE) && (z == x)) { /* BLAS usage: axpy x <- by+x */ Vaxpy_NrnParallelLD(b,y,x); return; } /* Case: a == b == 1.0 */ if ((a == ONE) && (b == ONE)) { VSum_NrnParallelLD(x, y, z); return; } /* Cases: (1) a == 1.0, b = -1.0, (2) a == -1.0, b == 1.0 */ if ((test = ((a == ONE) && (b == -ONE))) || ((a == -ONE) && (b == ONE))) { v1 = test ? y : x; v2 = test ? x : y; VDiff_NrnParallelLD(v2, v1, z); return; } /* Cases: (1) a == 1.0, b == other or 0.0, (2) a == other or 0.0, b == 1.0 */ /* if a or b is 0.0, then user should have called N_VScale */ if ((test = (a == ONE)) || (b == ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin1_NrnParallelLD(c, v1, v2, z); return; } /* Cases: (1) a == -1.0, b != 1.0, (2) a != 1.0, b == -1.0 */ if ((test = (a == -ONE)) || (b == -ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin2_NrnParallelLD(c, v1, v2, z); return; } /* Case: a == b */ /* catches case both a and b are 0.0 - user should have called N_VConst */ if (a == b) { VScaleSum_NrnParallelLD(a, x, y, z); return; } /* Case: a == -b */ if (a == -b) { VScaleDiff_NrnParallelLD(a, x, y, z); return; } /* Do all cases not handled above: (1) a == other, b == 0.0 - user should have called N_VScale (2) a == 0.0, b == other - user should have called N_VScale (3) a,b == other, a !=b, a != -b */ N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + b * (*yd++); } void N_VConst_NrnParallelLD(realtype c, N_Vector z) { long int i, N; realtype *zd; N = NV_LOCLENGTH_P_LD(z); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = c; } void N_VProd_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) * (*yd++); } void N_VDiv_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) / (*yd++); } void N_VScale_NrnParallelLD(realtype c, N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; if (z == x) { /* BLAS usage: scale x <- cx */ VScaleBy_NrnParallelLD(c, x); return; } if (c == ONE) { VCopy_NrnParallelLD(x, z); } else if (c == -ONE) { VNeg_NrnParallelLD(x, z); } else { N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = c * (*xd++); } } void N_VAbs_NrnParallelLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++, xd++, zd++) *zd = ABS(*xd); } void N_VInv_NrnParallelLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = ONE / (*xd++); } void N_VAddConst_NrnParallelLD(N_Vector x, realtype b, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) + b; } realtype N_VDotProd_NrnParallelLD(N_Vector x, N_Vector y) { long int i, N; realtype sum = ZERO, *xd, *yd, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); comm = NV_COMM_P_LD(x); for (i=0; i < N; i++) sum += xd[i] * yd[i]; gsum = VAllReduce_long_NrnParallelLD(sum, 1, comm); return(gsum); } realtype N_VMaxNorm_NrnParallelLD(N_Vector x) { long int i, N; realtype max, *xd, gmax; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); comm = NV_COMM_P_LD(x); max = ZERO; for (i=0; i < N; i++, xd++) { if (ABS(*xd) > max) max = ABS(*xd); } gmax = VAllReduce_NrnParallelLD(max, 2, comm); return(gmax); } realtype N_VWrmsNorm_NrnParallelLD(N_Vector x, N_Vector w) { long int i, N, N_global; realtype prodi, *xd, *wd; ldrealtype sum = ZERO, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); N_global = NV_GLOBLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); wd = NV_DATA_P_LD(w); comm = NV_COMM_P_LD(x); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } gsum = VAllReduce_long_NrnParallelLD(sum, 1, comm); return(RSqrt((realtype)gsum / N_global)); } realtype N_VWrmsNormMask_NrnParallelLD(N_Vector x, N_Vector w, N_Vector id) { long int i, N, N_global; realtype prodi, *xd, *wd, *idd; ldrealtype sum = ZERO, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); N_global = NV_GLOBLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); wd = NV_DATA_P_LD(w); idd = NV_DATA_P_LD(id); comm = NV_COMM_P_LD(x); for (i=0; i < N; i++) { if (idd[i] > ZERO) { prodi = xd[i] * wd[i]; sum += prodi * prodi; } } gsum = VAllReduce_long_NrnParallelLD(sum, 1, comm); return(RSqrt((realtype)gsum / N_global)); } realtype N_VMin_NrnParallelLD(N_Vector x) { long int i, N; realtype min, *xd, gmin; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); comm = NV_COMM_P_LD(x); min = BIG_REAL; if (N > 0) { xd = NV_DATA_P_LD(x); min = xd[0]; xd++; for (i=1; i < N; i++, xd++) { if ((*xd) < min) min = *xd; } } gmin = VAllReduce_NrnParallelLD(min, 3, comm); return(gmin); } realtype N_VWL2Norm_NrnParallelLD(N_Vector x, N_Vector w) { long int i, N; realtype prodi, *xd, *wd; ldrealtype sum = ZERO, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); wd = NV_DATA_P_LD(w); comm = NV_COMM_P_LD(x); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } gsum = VAllReduce_long_NrnParallelLD(sum, 1, comm); return(RSqrt((realtype)gsum)); } realtype N_VL1Norm_NrnParallelLD(N_Vector x) { long int i, N; realtype *xd; ldrealtype sum = ZERO, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); comm = NV_COMM_P_LD(x); for (i=0; i= c) ? ONE : ZERO; } } booleantype N_VInvTest_NrnParallelLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd, val, gval; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); comm = NV_COMM_P_LD(x); val = ONE; for (i=0; i < N; i++) { if (*xd == ZERO) val = ZERO; else *zd++ = ONE / (*xd++); } gval = VAllReduce_NrnParallelLD(val, 3, comm); if (gval == ZERO) return(FALSE); else return(TRUE); } booleantype N_VConstrMask_NrnParallelLD(N_Vector c, N_Vector x, N_Vector m) { long int i, N; booleantype test; realtype *cd, *xd, *md; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); cd = NV_DATA_P_LD(c); md = NV_DATA_P_LD(m); comm = NV_COMM_P_LD(x); test = TRUE; for (i=0; i ONEPT5 || (*cd) < -ONEPT5) { if ( (*xd)*(*cd) <= ZERO) {test = FALSE; *md = ONE; } continue; } if ( (*cd) > HALF || (*cd) < -HALF) { if ( (*xd)*(*cd) < ZERO ) {test = FALSE; *md = ONE; } } } return((booleantype)VAllReduce_long_NrnParallelLD((realtype)test, 3, comm)); } realtype N_VMinQuotient_NrnParallelLD(N_Vector num, N_Vector denom) { booleantype notEvenOnce; long int i, N; realtype *nd, *dd, min=0.0; MPI_Comm comm; N = NV_LOCLENGTH_P_LD(num); nd = NV_DATA_P_LD(num); dd = NV_DATA_P_LD(denom); comm = NV_COMM_P_LD(num); notEvenOnce = TRUE; for (i = 0; i < N; i++, nd++, dd++) { if (*dd == ZERO) continue; else { if (notEvenOnce) { min = *nd / *dd ; notEvenOnce = FALSE; } else min = MIN(min, (*nd) / (*dd)); } } if (notEvenOnce || (N == 0)) min = BIG_REAL; return(VAllReduce_NrnParallelLD(min, 3, comm)); } /* * ----------------------------------------------------------------- * private functions * ----------------------------------------------------------------- */ static realtype VAllReduce_NrnParallelLD(realtype d, int op, MPI_Comm comm) { /* * This function does a global reduction. The operation is * sum if op = 1, * max if op = 2, * min if op = 3. * The operation is over all processors in the communicator */ realtype out; #if NRNMPI_DYNAMICLOAD nrnmpi_dbl_allreduce_vec(&d, &out, 1, op); #else switch (op) { case 1: MPI_Allreduce(&d, &out, 1, PVEC_REAL_MPI_TYPE, MPI_SUM, comm); break; case 2: MPI_Allreduce(&d, &out, 1, PVEC_REAL_MPI_TYPE, MPI_MAX, comm); break; case 3: MPI_Allreduce(&d, &out, 1, PVEC_REAL_MPI_TYPE, MPI_MIN, comm); break; default: break; } #endif return(out); } #if USELONGDOUBLE static ldrealtype VAllReduce_long_NrnParallelLD(ldrealtype d, int op, MPI_Comm comm) { /* * This function does a global reduction. The operation is * sum if op = 1, * max if op = 2, * min if op = 3. * The operation is over all processors in the communicator */ ldrealtype out; assert(op == 1); #if NRNMPI_DYNAMICLOAD nrnmpi_longdbl_allreduce_vec(&d, &out, 1, op); #else MPI_Allreduce(&d, &out, 1, MPI_LONG_DOUBLE, MPI_SUM, comm); #endif return(out); } #endif static void VCopy_NrnParallelLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = *xd++; } static void VSum_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) + (*yd++); } static void VDiff_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) - (*yd++); } static void VNeg_NrnParallelLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = -(*xd++); } static void VScaleSum_NrnParallelLD(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) + (*yd++)); } static void VScaleDiff_NrnParallelLD(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) - (*yd++)); } static void VLin1_NrnParallelLD(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + (*yd++); } static void VLin2_NrnParallelLD(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); zd = NV_DATA_P_LD(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) - (*yd++); } static void Vaxpy_NrnParallelLD(realtype a, N_Vector x, N_Vector y) { long int i, N; realtype *xd, *yd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); yd = NV_DATA_P_LD(y); if (a == ONE) { for (i=0; i < N; i++) *yd++ += (*xd++); return; } if (a == -ONE) { for (i=0; i < N; i++) *yd++ -= (*xd++); return; } for (i=0; i < N; i++) *yd++ += a * (*xd++); } static void VScaleBy_NrnParallelLD(realtype a, N_Vector x) { long int i, N; realtype *xd; N = NV_LOCLENGTH_P_LD(x); xd = NV_DATA_P_LD(x); for (i=0; i < N; i++) *xd++ *= a; } neuron-7.5/src/nrniv/nvector_nrnparallel_ld.h000066400000000000000000000317241323325274500215350ustar00rootroot00000000000000/* * N_Vector_NrnParallelLD derived from N_Vector_Parallel Sundials version * by replacing every occurrence of Parallel with NrnParallelLD and then * modifying relevant method implementations to allow long double * accumulation. */ /* Macros changed with sed 's/NV_\([A-Za-z_]*\)_P/NV_\1_P_LD/g' nvector_nrnparallel_ld.h >temp mv temp nvector_nrnparallel_ld.h sed 's/NV_\([A-Za-z_]*\)_P/NV_\1_P_LD/g' nvector_nrnparallel_ld.c >temp mv temp nvector_nrnparallel_ld.c */ /* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the main header file for the MPI-enabled implementation * of the NVECTOR module. * * Part I contains declarations specific to the parallel * implementation of the supplied NVECTOR module. * * Part II defines accessor macros that allow the user to efficiently * use the type N_Vector without making explicit references to the * underlying data structure. * * Part III contains the prototype for the constructor * N_VNew_Parallel as well as implementation-specific prototypes * for various useful vector operations. * * Notes: * * - The definition of the generic N_Vector structure can be * found in the header file shared/include/nvector.h. * * - The definition of the type realtype can be found in the * header file shared/include/sundialstypes.h, and it may be * changed (at the configuration stage) according to the user's * needs. The sundialstypes.h file also contains the definition * for the type booleantype. * * - N_Vector arguments to arithmetic vector operations need not * be distinct. For example, the following call: * * N_VLinearSum_Parallel(a,x,b,y,y); * * (which stores the result of the operation a*x+b*y in y) * is legal. * ----------------------------------------------------------------- */ #ifndef _NVECTOR_NRNPARALLEL_LD_H #define _NVECTOR_NRNPARALLEL_LD_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #if NRNMPI_DYNAMICLOAD #define MPI_DOUBLE double #define MPI_LONG long #define MPI_Comm int #else #include #endif #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * PART I: PARALLEL implementation of N_Vector * ----------------------------------------------------------------- */ /* define MPI data types */ #if defined(SUNDIALS_SINGLE_PRECISION) #define PVEC_REAL_MPI_TYPE MPI_FLOAT #elif defined(SUNDIALS_DOUBLE_PRECISION) #define PVEC_REAL_MPI_TYPE MPI_DOUBLE #elif defined(SUNDIALS_EXTENDED_PRECISION) #define PVEC_REAL_MPI_TYPE MPI_LONG_DOUBLE #endif #define PVEC_INTEGER_MPI_TYPE MPI_LONG /* parallel implementation of the N_Vector 'content' structure contains the global and local lengths of the vector, a pointer to an array of realtype components, the MPI communicator, and a flag indicating ownership of the data */ struct _N_VectorContent_NrnParallelLD { long int local_length; /* local vector length */ long int global_length; /* global vector length */ booleantype own_data; /* ownership of data */ realtype *data; /* local data array */ MPI_Comm comm; /* pointer to MPI communicator */ }; typedef struct _N_VectorContent_NrnParallelLD *N_VectorContent_NrnParallelLD; /* * ----------------------------------------------------------------- * PART II: macros NV_CONTENT_P_LD, NV_DATA_P_LD, NV_OWN_DATA_P_LD, * NV_LOCLENGTH_P_LD, NV_GLOBLENGTH_P_LD,NV_COMM_P_LD, and NV_Ith_P_LD * ----------------------------------------------------------------- * In the descriptions below, the following user declarations * are assumed: * * N_Vector v; * long int v_len, s_len, i; * * (1) NV_CONTENT_P_LD * * This routines gives access to the contents of the parallel * vector N_Vector. * * The assignment v_cont = NV_CONTENT_P_LD(v) sets v_cont to be * a pointer to the parallel N_Vector content structure. * * (2) NV_DATA_P_LD, NV_OWN_DATA_P_LD, NV_LOCLENGTH_P_LD, NV_GLOBLENGTH_P_LD, * and NV_COMM_P_LD * * These routines give access to the individual parts of * the content structure of a parallel N_Vector. * * The assignment v_data = NV_DATA_P_LD(v) sets v_data to be * a pointer to the first component of the local data for * the vector v. The assignment NV_DATA_P_LD(v) = data_v sets * the component array of v to be data_V by storing the * pointer data_v. * * The assignment v_llen = NV_LOCLENGTH_P_LD(v) sets v_llen to * be the length of the local part of the vector v. The call * NV_LOCLENGTH_P_LD(v) = llen_v sets the local length * of v to be llen_v. * * The assignment v_glen = NV_GLOBLENGTH_P_LD(v) sets v_glen to * be the global length of the vector v. The call * NV_GLOBLENGTH_P_LD(v) = glen_v sets the global length of v to * be glen_v. * * The assignment v_comm = NV_COMM_P_LD(v) sets v_comm to be the * MPI communicator of the vector v. The assignment * NV_COMM_C(v) = comm_v sets the MPI communicator of v to be * comm_v. * * (3) NV_Ith_P_LD * * In the following description, the components of the * local part of an N_Vector are numbered 0..n-1, where n * is the local length of (the local part of) v. * * The assignment r = NV_Ith_P_LD(v,i) sets r to be the value * of the ith component of the local part of the vector v. * The assignment NV_Ith_P_LD(v,i) = r sets the value of the * ith local component of v to be r. * * Note: When looping over the components of an N_Vector v, it is * more efficient to first obtain the component array via * v_data = NV_DATA_P_LD(v) and then access v_data[i] within the * loop than it is to use NV_Ith_P_LD(v,i) within the loop. * ----------------------------------------------------------------- */ #define NV_CONTENT_P_LD(v) ( (N_VectorContent_NrnParallelLD)(v->content) ) #define NV_LOCLENGTH_P_LD(v) ( NV_CONTENT_P_LD(v)->local_length ) #define NV_GLOBLENGTH_P_LD(v) ( NV_CONTENT_P_LD(v)->global_length ) #define NV_OWN_DATA_P_LD(v) ( NV_CONTENT_P_LD(v)->own_data ) #define NV_DATA_P_LD(v) ( NV_CONTENT_P_LD(v)->data ) #define NV_COMM_P_LD(v) ( NV_CONTENT_P_LD(v)->comm ) #define NV_Ith_P_LD(v,i) ( NV_DATA_P_LD(v)[i] ) /* * ----------------------------------------------------------------- * PART III: functions exported by nvector_parallel * * CONSTRUCTORS: * N_VNew_NrnParallelLD * N_VNewEmpty_NrnParallelLD * N_VClone_NrnParallelLD * N_VCloneEmpty_NrnParallelLD * N_VMake_NrnParallelLD * N_VNewVectorArray_NrnParallelLD * N_VNewVectorArrayEmpty_NrnParallelLD * DESTRUCTORS: * N_VDestroy_NrnParallelLD * N_VDestroyVectorArray_NrnParallelLD * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Function : N_VNew_NrnParallelLD * ----------------------------------------------------------------- * This function creates and allocates memory for a parallel vector. * ----------------------------------------------------------------- */ N_Vector N_VNew_NrnParallelLD(MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VNewEmpty_NrnParallelLD * ----------------------------------------------------------------- * This function creates a new parallel N_Vector with an empty * (NULL) data array. * ----------------------------------------------------------------- */ N_Vector N_VNewEmpty_NrnParallelLD(MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VCloneEmpty_NrnParallelLD * ----------------------------------------------------------------- * This function creates a new parallel N_Vector with an empty (NULL) * data array using the vector w as a template * (sets own_data = FALSE). * ----------------------------------------------------------------- */ N_Vector N_VCloneEmpty_NrnParallelLD(N_Vector w); /* * ----------------------------------------------------------------- * Function : N_VMake_NrnParallelLD * ----------------------------------------------------------------- * This function creates and allocates memory for a parallel vector * with a user-supplied data array. * ----------------------------------------------------------------- */ N_Vector N_VMake_NrnParallelLD(MPI_Comm comm, long int local_length, long int global_length, realtype *v_data); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArray_NrnParallelLD * ----------------------------------------------------------------- * This function creates an array of 'count' parallel vectors. This * array of N_Vectors can be freed using N_VDestroyVectorArray * (defined by the generic NVECTOR module). * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArray_NrnParallelLD(int count, MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArrayEmpty_NrnParallelLD * ----------------------------------------------------------------- * This function creates an array of 'count' parallel vectors each * with an empty (NULL) data array. * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArrayEmpty_NrnParallelLD(int count, MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VDestroyVectorArray_NrnParallelLD * ----------------------------------------------------------------- * This function frees an array of N_Vector created with * N_VNewVectorArray_NrnParallelLD. * ----------------------------------------------------------------- */ void N_VDestroyVectorArray_NrnParallelLD(N_Vector *vs, int count); /* * ----------------------------------------------------------------- * Function : N_VPrint_NrnParallelLD * ----------------------------------------------------------------- * This function prints the content of a parallel vector to stdout. * ----------------------------------------------------------------- */ void N_VPrint_NrnParallelLD(N_Vector v); /* * ----------------------------------------------------------------- * parallel implementations of the vector operations * ----------------------------------------------------------------- */ N_Vector N_VClone_NrnParallelLD(N_Vector w); void N_VDestroy_NrnParallelLD(N_Vector v); void N_VSpace_NrnParallelLD(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer_NrnParallelLD(N_Vector v); void N_VSetArrayPointer_NrnParallelLD(realtype *v_data, N_Vector v); void N_VLinearSum_NrnParallelLD(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst_NrnParallelLD(realtype c, N_Vector z); void N_VProd_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z); void N_VDiv_NrnParallelLD(N_Vector x, N_Vector y, N_Vector z); void N_VScale_NrnParallelLD(realtype c, N_Vector x, N_Vector z); void N_VAbs_NrnParallelLD(N_Vector x, N_Vector z); void N_VInv_NrnParallelLD(N_Vector x, N_Vector z); void N_VAddConst_NrnParallelLD(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd_NrnParallelLD(N_Vector x, N_Vector y); realtype N_VMaxNorm_NrnParallelLD(N_Vector x); realtype N_VWrmsNorm_NrnParallelLD(N_Vector x, N_Vector w); realtype N_VWrmsNormMask_NrnParallelLD(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin_NrnParallelLD(N_Vector x); realtype N_VWL2Norm_NrnParallelLD(N_Vector x, N_Vector w); realtype N_VL1Norm_NrnParallelLD(N_Vector x); void N_VCompare_NrnParallelLD(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest_NrnParallelLD(N_Vector x, N_Vector z); booleantype N_VConstrMask_NrnParallelLD(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient_NrnParallelLD(N_Vector num, N_Vector denom); #ifdef __cplusplus } #endif #endif neuron-7.5/src/nrniv/nvector_nrnserial_ld.c000077500000000000000000000517231323325274500212170ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 2212 $ * $Date: 2008-09-08 16:32:26 +0200 (Mon, 08 Sep 2008) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a serial implementation * of the NVECTOR package. * ----------------------------------------------------------------- */ #define USELONGDOUBLE 1 #include <../../nrnconf.h> #include #if HAVE_POSIX_MEMALIGN #define HAVE_MEMALIGN 1 #endif #if HAVE_MEMALIGN #define _XOPEN_SOURCE 600 #endif #include #include #include "nvector_nrnserial_ld.h" #include "shared/sundialsmath.h" #include "shared/sundialstypes.h" #define ZERO RCONST(0.0) #define HALF RCONST(0.5) #define ONE RCONST(1.0) #define ONEPT5 RCONST(1.5) #if USELONGDOUBLE #define ldrealtype long double #else #define ldrealtype realtype #endif /* Private function prototypes */ /* z=x */ static void VCopy_NrnSerialLD(N_Vector x, N_Vector z); /* z=x+y */ static void VSum_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z); /* z=x-y */ static void VDiff_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z); /* z=-x */ static void VNeg_NrnSerialLD(N_Vector x, N_Vector z); /* z=c(x+y) */ static void VScaleSum_NrnSerialLD(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=c(x-y) */ static void VScaleDiff_NrnSerialLD(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=ax+y */ static void VLin1_NrnSerialLD(realtype a, N_Vector x, N_Vector y, N_Vector z); /* z=ax-y */ static void VLin2_NrnSerialLD(realtype a, N_Vector x, N_Vector y, N_Vector z); /* y <- ax+y */ static void Vaxpy_NrnSerialLD(realtype a, N_Vector x, N_Vector y); /* x <- ax */ static void VScaleBy_NrnSerialLD(realtype a, N_Vector x); /* * ----------------------------------------------------------------- * exported functions * ----------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- * Function to create a new empty serial vector */ N_Vector N_VNewEmpty_NrnSerialLD(long int length) { N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnSerialLD content; /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = N_VClone_NrnSerialLD; ops->nvdestroy = N_VDestroy_NrnSerialLD; ops->nvspace = N_VSpace_NrnSerialLD; ops->nvgetarraypointer = N_VGetArrayPointer_NrnSerialLD; ops->nvsetarraypointer = N_VSetArrayPointer_NrnSerialLD; ops->nvlinearsum = N_VLinearSum_NrnSerialLD; ops->nvconst = N_VConst_NrnSerialLD; ops->nvprod = N_VProd_NrnSerialLD; ops->nvdiv = N_VDiv_NrnSerialLD; ops->nvscale = N_VScale_NrnSerialLD; ops->nvabs = N_VAbs_NrnSerialLD; ops->nvinv = N_VInv_NrnSerialLD; ops->nvaddconst = N_VAddConst_NrnSerialLD; ops->nvdotprod = N_VDotProd_NrnSerialLD; ops->nvmaxnorm = N_VMaxNorm_NrnSerialLD; ops->nvwrmsnormmask = N_VWrmsNormMask_NrnSerialLD; ops->nvwrmsnorm = N_VWrmsNorm_NrnSerialLD; ops->nvmin = N_VMin_NrnSerialLD; ops->nvwl2norm = N_VWL2Norm_NrnSerialLD; ops->nvl1norm = N_VL1Norm_NrnSerialLD; ops->nvcompare = N_VCompare_NrnSerialLD; ops->nvinvtest = N_VInvTest_NrnSerialLD; ops->nvconstrmask = N_VConstrMask_NrnSerialLD; ops->nvminquotient = N_VMinQuotient_NrnSerialLD; /* Create content */ content = (N_VectorContent_NrnSerialLD) malloc(sizeof(struct _N_VectorContent_NrnSerialLD)); if (content == NULL) {free(ops);free(v);return(NULL);} content->length = length; content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a new serial vector */ N_Vector N_VNew_NrnSerialLD(long int length) { N_Vector v; realtype *data; v = N_VNewEmpty_NrnSerialLD(length); if (v == NULL) return(NULL); /* Create data */ if (length > 0) { /* Allocate memory */ #if HAVE_MEMALIGN assert(posix_memalign((void**)&data, 64, length*sizeof(realtype)) == 0); #else data = (realtype *) malloc(length * sizeof(realtype)); #endif if(data == NULL) {N_VDestroy_NrnSerialLD(v);return(NULL);} /* Attach data */ NV_OWN_DATA_S_LD(v) = TRUE; NV_DATA_S_LD(v) = data; } return(v); } /* ---------------------------------------------------------------------------- * Function to clone from a template a new vector with empty (NULL) data array */ N_Vector N_VCloneEmpty_NrnSerialLD(N_Vector w) { N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnSerialLD content; if (w == NULL) return(NULL); /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = w->ops->nvclone; ops->nvdestroy = w->ops->nvdestroy; ops->nvspace = w->ops->nvspace; ops->nvgetarraypointer = w->ops->nvgetarraypointer; ops->nvsetarraypointer = w->ops->nvsetarraypointer; ops->nvlinearsum = w->ops->nvlinearsum; ops->nvconst = w->ops->nvconst; ops->nvprod = w->ops->nvprod; ops->nvdiv = w->ops->nvdiv; ops->nvscale = w->ops->nvscale; ops->nvabs = w->ops->nvabs; ops->nvinv = w->ops->nvinv; ops->nvaddconst = w->ops->nvaddconst; ops->nvdotprod = w->ops->nvdotprod; ops->nvmaxnorm = w->ops->nvmaxnorm; ops->nvwrmsnormmask = w->ops->nvwrmsnormmask; ops->nvwrmsnorm = w->ops->nvwrmsnorm; ops->nvmin = w->ops->nvmin; ops->nvwl2norm = w->ops->nvwl2norm; ops->nvl1norm = w->ops->nvl1norm; ops->nvcompare = w->ops->nvcompare; ops->nvinvtest = w->ops->nvinvtest; ops->nvconstrmask = w->ops->nvconstrmask; ops->nvminquotient = w->ops->nvminquotient; /* Create content */ content = (N_VectorContent_NrnSerialLD) malloc(sizeof(struct _N_VectorContent_NrnSerialLD)); if (content == NULL) {free(ops);free(v);return(NULL);} content->length = NV_LENGTH_S_LD(w); content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a serial N_Vector with user data component */ N_Vector N_VMake_NrnSerialLD(long int length, realtype *v_data) { N_Vector v; v = N_VNewEmpty_NrnSerialLD(length); if (v == NULL) return(NULL); if (length > 0) { /* Attach data */ NV_OWN_DATA_S_LD(v) = FALSE; NV_DATA_S_LD(v) = v_data; } return(v); } /* ---------------------------------------------------------------------------- * Function to create an array of new serial vectors. */ N_Vector *N_VNewVectorArray_NrnSerialLD(int count, long int length) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0) { /* Allocate memory */ #if HAVE_MEMALIGN assert(posix_memalign((void**)&data, 64, length*sizeof(realtype)) == 0); #else data = (realtype *) malloc(length * sizeof(realtype)); #endif if(data == NULL) {N_VDestroy_NrnSerialLD(v);return(NULL);} /* Attach data */ NV_OWN_DATA_S_LD(v) = TRUE; NV_DATA_S_LD(v) = data; } return(v); } void N_VDestroy_NrnSerialLD(N_Vector v) { if (NV_OWN_DATA_S_LD(v) == TRUE) free(NV_DATA_S_LD(v)); free(v->content); free(v->ops); free(v); } void N_VSpace_NrnSerialLD(N_Vector v, long int *lrw, long int *liw) { *lrw = NV_LENGTH_S_LD(v); *liw = 1; } realtype *N_VGetArrayPointer_NrnSerialLD(N_Vector v) { realtype *v_data; v_data = NV_DATA_S_LD(v); return(v_data); } void N_VSetArrayPointer_NrnSerialLD(realtype *v_data, N_Vector v) { if (NV_LENGTH_S_LD(v) > 0) NV_DATA_S_LD(v) = v_data; } void N_VLinearSum_NrnSerialLD(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { long int i, N; realtype c, *xd, *yd, *zd; N_Vector v1, v2; booleantype test; if ((b == ONE) && (z == y)) { /* BLAS usage: axpy y <- ax+y */ Vaxpy_NrnSerialLD(a,x,y); return; } if ((a == ONE) && (z == x)) { /* BLAS usage: axpy x <- by+x */ Vaxpy_NrnSerialLD(b,y,x); return; } /* Case: a == b == 1.0 */ if ((a == ONE) && (b == ONE)) { VSum_NrnSerialLD(x, y, z); return; } /* Cases: (1) a == 1.0, b = -1.0, (2) a == -1.0, b == 1.0 */ if ((test = ((a == ONE) && (b == -ONE))) || ((a == -ONE) && (b == ONE))) { v1 = test ? y : x; v2 = test ? x : y; VDiff_NrnSerialLD(v2, v1, z); return; } /* Cases: (1) a == 1.0, b == other or 0.0, (2) a == other or 0.0, b == 1.0 */ /* if a or b is 0.0, then user should have called N_VScale */ if ((test = (a == ONE)) || (b == ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin1_NrnSerialLD(c, v1, v2, z); return; } /* Cases: (1) a == -1.0, b != 1.0, (2) a != 1.0, b == -1.0 */ if ((test = (a == -ONE)) || (b == -ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin2_NrnSerialLD(c, v1, v2, z); return; } /* Case: a == b */ /* catches case both a and b are 0.0 - user should have called N_VConst */ if (a == b) { VScaleSum_NrnSerialLD(a, x, y, z); return; } /* Case: a == -b */ if (a == -b) { VScaleDiff_NrnSerialLD(a, x, y, z); return; } /* Do all cases not handled above: (1) a == other, b == 0.0 - user should have called N_VScale (2) a == 0.0, b == other - user should have called N_VScale (3) a,b == other, a !=b, a != -b */ N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + b * (*yd++); } void N_VConst_NrnSerialLD(realtype c, N_Vector z) { long int i, N; realtype *zd; N = NV_LENGTH_S_LD(z); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = c; } void N_VProd_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) * (*yd++); } void N_VDiv_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) / (*yd++); } void N_VScale_NrnSerialLD(realtype c, N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; if (z == x) { /* BLAS usage: scale x <- cx */ VScaleBy_NrnSerialLD(c, x); return; } if (c == ONE) { VCopy_NrnSerialLD(x, z); } else if (c == -ONE) { VNeg_NrnSerialLD(x, z); } else { N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = c * (*xd++); } } void N_VAbs_NrnSerialLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++, xd++, zd++) *zd = ABS(*xd); } void N_VInv_NrnSerialLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = ONE / (*xd++); } void N_VAddConst_NrnSerialLD(N_Vector x, realtype b, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) + b; } realtype N_VDotProd_NrnSerialLD(N_Vector x, N_Vector y) { long int i, N; realtype sum = ZERO, *xd, *yd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); for (i=0; i < N; i++) sum += (*xd++) * (*yd++); return(sum); } realtype N_VMaxNorm_NrnSerialLD(N_Vector x) { long int i, N; realtype max = ZERO, *xd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); for (i=0; i < N; i++, xd++) { if (ABS(*xd) > max) max = ABS(*xd); } return(max); } realtype N_VWrmsNorm_NrnSerialLD(N_Vector x, N_Vector w) { long int i, N; realtype prodi, *xd, *wd; ldrealtype sum = ZERO; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); wd = NV_DATA_S_LD(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return(RSqrt((realtype)sum / N)); } realtype N_VWrmsNormMask_NrnSerialLD(N_Vector x, N_Vector w, N_Vector id) { long int i, N; realtype prodi, *xd, *wd, *idd; ldrealtype sum = ZERO; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); wd = NV_DATA_S_LD(w); idd = NV_DATA_S_LD(id); for (i=0; i < N; i++) { if (idd[i] > ZERO) { prodi = xd[i] * wd[i]; sum += prodi * prodi; } } return(RSqrt((realtype)sum / N)); } realtype N_VMin_NrnSerialLD(N_Vector x) { long int i, N; realtype min, *xd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); min = xd[0]; xd++; for (i=1; i < N; i++, xd++) { if ((*xd) < min) min = *xd; } return(min); } realtype N_VWL2Norm_NrnSerialLD(N_Vector x, N_Vector w) { long int i, N; realtype prodi, *xd, *wd; ldrealtype sum = ZERO; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); wd = NV_DATA_S_LD(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return(RSqrt((realtype)sum)); } realtype N_VL1Norm_NrnSerialLD(N_Vector x) { long int i, N; realtype *xd; ldrealtype sum = ZERO; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); for (i=0; i= c) ? ONE : ZERO; } } booleantype N_VInvTest_NrnSerialLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) { if (*xd == ZERO) return(FALSE); *zd++ = ONE / (*xd++); } return(TRUE); } booleantype N_VConstrMask_NrnSerialLD(N_Vector c, N_Vector x, N_Vector m) { long int i, N; booleantype test; realtype *cd, *xd, *md; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); cd = NV_DATA_S_LD(c); md = NV_DATA_S_LD(m); test = TRUE; for (i=0; i ONEPT5 || (*cd) < -ONEPT5) { if ( (*xd)*(*cd) <= ZERO) {test = FALSE; *md = ONE; } continue; } if ( (*cd) > HALF || (*cd) < -HALF) { if ( (*xd)*(*cd) < ZERO ) {test = FALSE; *md = ONE; } } } return(test); } realtype N_VMinQuotient_NrnSerialLD(N_Vector num, N_Vector denom) { booleantype notEvenOnce; long int i, N; realtype *nd, *dd, min=0.0; N = NV_LENGTH_S_LD(num); nd = NV_DATA_S_LD(num); dd = NV_DATA_S_LD(denom); notEvenOnce = TRUE; for (i = 0; i < N; i++, nd++, dd++) { if (*dd == ZERO) continue; else { if (notEvenOnce) { min = *nd / *dd ; notEvenOnce = FALSE; } else min = MIN(min, (*nd) / (*dd)); } } if (notEvenOnce || (N == 0)) min = BIG_REAL; return(min); } /* * ----------------------------------------------------------------- * private functions * ----------------------------------------------------------------- */ static void VCopy_NrnSerialLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = *xd++; } static void VSum_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) + (*yd++); } static void VDiff_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = (*xd++) - (*yd++); } static void VNeg_NrnSerialLD(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = -(*xd++); } static void VScaleSum_NrnSerialLD(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) + (*yd++)); } static void VScaleDiff_NrnSerialLD(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) - (*yd++)); } static void VLin1_NrnSerialLD(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + (*yd++); } static void VLin2_NrnSerialLD(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); zd = NV_DATA_S_LD(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) - (*yd++); } static void Vaxpy_NrnSerialLD(realtype a, N_Vector x, N_Vector y) { long int i, N; realtype *xd, *yd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); yd = NV_DATA_S_LD(y); if (a == ONE) { for (i=0; i < N; i++) *yd++ += (*xd++); return; } if (a == -ONE) { for (i=0; i < N; i++) *yd++ -= (*xd++); return; } for (i=0; i < N; i++) *yd++ += a * (*xd++); } static void VScaleBy_NrnSerialLD(realtype a, N_Vector x) { long int i, N; realtype *xd; N = NV_LENGTH_S_LD(x); xd = NV_DATA_S_LD(x); for (i=0; i < N; i++) *xd++ *= a; } neuron-7.5/src/nrniv/nvector_nrnserial_ld.h000077500000000000000000000250661323325274500212250ustar00rootroot00000000000000/* * N_Vector_NrnSerialLD derived from N_Vector_Serial Sundials version * by replaceing every occurrence of Serial with NrnSerialLD and then * modifying relevant method implementations to allow long double * accumulation. */ /* Macros changed with sed 's/NV_\([A-Za-z_]*\)_S/NV_\1_S_LD/g' nvector_nrnserial_ld.h >temp mv temp nvector_nrnserial_ld.h sed 's/NV_\([A-Za-z_]*\)_S/NV_\1_S_LD/g' nvector_nrnserial_ld.c >temp mv temp nvector_nrnserial_ld.c */ /* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for the serial implementation of the * NVECTOR module. * * Part I contains declarations specific to the serial * implementation of the supplied NVECTOR module. * * Part II defines accessor macros that allow the user to * efficiently use the type N_Vector without making explicit * references to the underlying data structure. * * Part III contains the prototype for the constructor N_VNew_NrnSerialLD * as well as implementation-specific prototypes for various useful * vector operations. * * Notes: * * - The definition of the generic N_Vector structure can be found * in the header file shared/include/nvector.h. * * - The definition of the type realtype can be found in the * header file shared/include/sundialstypes.h, and it may be * changed (at the configuration stage) according to the user's * needs. The sundialstypes.h file also contains the definition * for the type booleantype. * * - N_Vector arguments to arithmetic vector operations need not * be distinct. For example, the following call: * * N_VLinearSum_NrnSerialLD(a,x,b,y,y); * * (which stores the result of the operation a*x+b*y in y) * is legal. * ----------------------------------------------------------------- */ #ifndef _NVECTOR_NRNSERIAL_LD_H #define _NVECTOR_NRNSERIAL_LD_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * PART I: SERIAL implementation of N_Vector * ----------------------------------------------------------------- */ /* serial implementation of the N_Vector 'content' structure contains the length of the vector, a pointer to an array of realtype components, and a flag indicating ownership of the data */ struct _N_VectorContent_NrnSerialLD { long int length; booleantype own_data; realtype *data; }; typedef struct _N_VectorContent_NrnSerialLD *N_VectorContent_NrnSerialLD; /* * ----------------------------------------------------------------- * PART II: macros NV_CONTENT_S_LD, NV_DATA_S_LD, NV_OWN_DATA_S_LD, * NV_LENGTH_S_LD, and NV_Ith_S_LD * ----------------------------------------------------------------- * In the descriptions below, the following user declarations * are assumed: * * N_Vector v; * long int i; * * (1) NV_CONTENT_S_LD * * This routines gives access to the contents of the serial * vector N_Vector. * * The assignment v_cont = NV_CONTENT_S_LD(v) sets v_cont to be * a pointer to the serial N_Vector content structure. * * (2) NV_DATA_S_LD NV_OWN_DATA_S_LD and NV_LENGTH_S_LD * * These routines give access to the individual parts of * the content structure of a serial N_Vector. * * The assignment v_data = NV_DATA_S_LD(v) sets v_data to be * a pointer to the first component of v. The assignment * NV_DATA_S_LD(v) = data_V sets the component array of v to * be data_v by storing the pointer data_v. * * The assignment v_len = NV_LENGTH_S_LD(v) sets v_len to be * the length of v. The call NV_LENGTH_S_LD(v) = len_v sets * the length of v to be len_v. * * (3) NV_Ith_S_LD * * In the following description, the components of an * N_Vector are numbered 0..n-1, where n is the length of v. * * The assignment r = NV_Ith_S_LD(v,i) sets r to be the value of * the ith component of v. The assignment NV_Ith_S_LD(v,i) = r * sets the value of the ith component of v to be r. * * Note: When looping over the components of an N_Vector v, it is * more efficient to first obtain the component array via * v_data = NV_DATA_S_LD(v) and then access v_data[i] within the * loop than it is to use NV_Ith_S_LD(v,i) within the loop. * ----------------------------------------------------------------- */ #define NV_CONTENT_S_LD(v) ( (N_VectorContent_NrnSerialLD)(v->content) ) #define NV_LENGTH_S_LD(v) ( NV_CONTENT_S_LD(v)->length ) #define NV_OWN_DATA_S_LD(v) ( NV_CONTENT_S_LD(v)->own_data ) #define NV_DATA_S_LD(v) ( NV_CONTENT_S_LD(v)->data ) #define NV_Ith_S_LD(v,i) ( NV_DATA_S_LD(v)[i] ) /* * ----------------------------------------------------------------- * PART III: functions exported by nvector_serial * * CONSTRUCTORS: * N_VNew_NrnSerialLD * N_VNewEmpty_NrnSerialLD * N_VClone_NrnSerialLD * N_VCloneEmpty_NrnSerialLD * N_VMake_NrnSerialLD * N_VNewVectorArray_NrnSerialLD * N_VNewVectorArrayEmpty_NrnSerialLD * DESTRUCTORS: * N_VDestroy_NrnSerialLD * N_VDestroyVectorArray_NrnSerialLD * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Function : N_VNew_NrnSerialLD * ----------------------------------------------------------------- * This function creates and allocates memory for a serial vector. * ----------------------------------------------------------------- */ N_Vector N_VNew_NrnSerialLD(long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VNewEmpty_NrnSerialLD * ----------------------------------------------------------------- * This function creates a new serial N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VNewEmpty_NrnSerialLD(long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VCloneEmpty_NrnSerialLD * ----------------------------------------------------------------- * This function creates a new serial N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VCloneEmpty_NrnSerialLD(N_Vector w); /* * ----------------------------------------------------------------- * Function : N_VMake_NrnSerialLD * ----------------------------------------------------------------- * This function creates and allocates memory for a serial vector * with a user-supplied data array. * ----------------------------------------------------------------- */ N_Vector N_VMake_NrnSerialLD(long int vec_length, realtype *v_data); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArray_NrnSerialLD * ----------------------------------------------------------------- * This function creates an array of 'count' serial vectors. This * array of N_Vectors can be freed using N_VDestroyVectorArray * (defined by the generic NVECTOR module). * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArray_NrnSerialLD(int count, long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArrayEmpty_NrnSerialLD * ----------------------------------------------------------------- * This function creates an array of 'count' serial vectors each * with an empty (NULL) data array. * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArrayEmpty_NrnSerialLD(int count, long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VDestroyVectorArray_NrnSerialLD * ----------------------------------------------------------------- * This function frees an array of N_Vector created with * N_VNewVectorArray_NrnSerialLD. * ----------------------------------------------------------------- */ void N_VDestroyVectorArray_NrnSerialLD(N_Vector *vs, int count); /* * ----------------------------------------------------------------- * Function : N_VPrint_NrnSerialLD * ----------------------------------------------------------------- * This function prints the content of a serial vector to stdout. * ----------------------------------------------------------------- */ void N_VPrint_NrnSerialLD(N_Vector v); /* * ----------------------------------------------------------------- * serial implementations of various useful vector operations * ----------------------------------------------------------------- */ N_Vector N_VClone_NrnSerialLD(N_Vector w); void N_VDestroy_NrnSerialLD(N_Vector v); void N_VSpace_NrnSerialLD(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer_NrnSerialLD(N_Vector v); void N_VSetArrayPointer_NrnSerialLD(realtype *v_data, N_Vector v); void N_VLinearSum_NrnSerialLD(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst_NrnSerialLD(realtype c, N_Vector z); void N_VProd_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z); void N_VDiv_NrnSerialLD(N_Vector x, N_Vector y, N_Vector z); void N_VScale_NrnSerialLD(realtype c, N_Vector x, N_Vector z); void N_VAbs_NrnSerialLD(N_Vector x, N_Vector z); void N_VInv_NrnSerialLD(N_Vector x, N_Vector z); void N_VAddConst_NrnSerialLD(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd_NrnSerialLD(N_Vector x, N_Vector y); realtype N_VMaxNorm_NrnSerialLD(N_Vector x); realtype N_VWrmsNorm_NrnSerialLD(N_Vector x, N_Vector w); realtype N_VWrmsNormMask_NrnSerialLD(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin_NrnSerialLD(N_Vector x); realtype N_VWL2Norm_NrnSerialLD(N_Vector x, N_Vector w); realtype N_VL1Norm_NrnSerialLD(N_Vector x); void N_VCompare_NrnSerialLD(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest_NrnSerialLD(N_Vector x, N_Vector z); booleantype N_VConstrMask_NrnSerialLD(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient_NrnSerialLD(N_Vector num, N_Vector denom); #ifdef __cplusplus } #endif #endif neuron-7.5/src/nrniv/nvector_nrnthread.c000077500000000000000000000454101323325274500205240ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-09 18:15:46 -0500 (Wed, 09 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a nrnthread implementation * of the NVECTOR package. * ----------------------------------------------------------------- */ #define USELONGDOUBLE 0 #include #include #include "shared/nvector_serial.h" #include "nvector_nrnthread.h" #include "shared/sundialsmath.h" #include "shared/sundialstypes.h" #include "section.h" #include "nrnmutdec.h" #define ZERO RCONST(0.0) #define HALF RCONST(0.5) #define ONE RCONST(1.0) #define ONEPT5 RCONST(1.5) #if 0 #define mydebug(a) printf(a) #define mydebug2(a,b) printf(a,b) #else #define mydebug(a) /**/ #define mydebug2(a,b) /**/ #endif #if USELONGDOUBLE #define ldrealtype long double #else #define ldrealtype realtype #endif #if USE_PTHREAD static MUTDEC #endif /* argument passing between NrnThread and Serial */ static N_Vector x_; static N_Vector y_; static N_Vector z_; static N_Vector w_; static N_Vector id_; static realtype a_; static realtype b_; static realtype c_; static realtype retval; #if USELONGDOUBLE static long double longdretval; #endif static booleantype bretval; #define xpass x_ = x; #define ypass y_ = y; #define zpass z_ = z; #define wpass w_ = w; #define idpass id_ = id; #define apass a_ = a; #define bpass b_ = b; #define cpass c_ = c; #define xarg(i) NV_SUBVEC_NT(x_, i) #define yarg(i) NV_SUBVEC_NT(y_, i) #define zarg(i) NV_SUBVEC_NT(z_, i) #define warg(i) NV_SUBVEC_NT(w_, i) #define idarg(i) NV_SUBVEC_NT(id_, i) #define aarg a_ #define barg b_ #define carg c_ #define lock MUTLOCK #define unlock MUTUNLOCK #define lockadd(arg) lock; retval += arg; unlock; #if USELONGDOUBLE #define locklongdadd(arg) lock; longdretval += arg; unlock; #else #define locklongdadd(arg) lockadd(arg) #endif #define lockmax(arg) lock; if (retval < arg) { retval = arg; }; unlock; #define lockmin(arg) lock; if (retval > arg) { retval = arg; }; unlock; #define lockfalse lock; bretval = FALSE; unlock; /* * ----------------------------------------------------------------- * exported functions * ----------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- * Function to create a new empty nrnthread vector */ N_Vector N_VNewEmpty_NrnThread(long int length, int nthread, long int* sizes) { int i; N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnThread content; if (!MUTCONSTRUCTED) { MUTCONSTRUCT(1) } /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = N_VClone_NrnThread; ops->nvdestroy = N_VDestroy_NrnThread; ops->nvspace = N_VSpace_NrnThread; ops->nvgetarraypointer = N_VGetArrayPointer_NrnThread; ops->nvsetarraypointer = N_VSetArrayPointer_NrnThread; ops->nvlinearsum = N_VLinearSum_NrnThread; ops->nvconst = N_VConst_NrnThread; ops->nvprod = N_VProd_NrnThread; ops->nvdiv = N_VDiv_NrnThread; ops->nvscale = N_VScale_NrnThread; ops->nvabs = N_VAbs_NrnThread; ops->nvinv = N_VInv_NrnThread; ops->nvaddconst = N_VAddConst_NrnThread; ops->nvdotprod = N_VDotProd_NrnThread; ops->nvmaxnorm = N_VMaxNorm_NrnThread; ops->nvwrmsnormmask = N_VWrmsNormMask_NrnThread; ops->nvwrmsnorm = N_VWrmsNorm_NrnThread; ops->nvmin = N_VMin_NrnThread; ops->nvwl2norm = N_VWL2Norm_NrnThread; ops->nvl1norm = N_VL1Norm_NrnThread; ops->nvcompare = N_VCompare_NrnThread; ops->nvinvtest = N_VInvTest_NrnThread; ops->nvconstrmask = N_VConstrMask_NrnThread; ops->nvminquotient = N_VMinQuotient_NrnThread; /* Create content */ content = (N_VectorContent_NrnThread) malloc(sizeof(struct _N_VectorContent_NrnThread)); if (content == NULL) {free(ops);free(v);return(NULL);} content->length = length; content->nt = nthread; content->own_data = FALSE; content->data = (N_Vector*) malloc(sizeof(N_Vector)*nthread); if (content->data == NULL) { free(ops); free(v); free(content); return(NULL);} for (i=0; i < nthread; ++i) { content->data[i] = NULL; } /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a new nrnthread vector */ N_Vector N_VNew_NrnThread(long int length, int nthread, long int* sizes) { int i; N_Vector v; N_Vector data; N_VectorContent_NrnThread* content; v = N_VNewEmpty_NrnThread(length, nthread, sizes); if (v == NULL) return(NULL); /* Create data */ if (length > 0) { /* Allocate memory */ NV_OWN_DATA_NT(v) = TRUE; for (i=0; i < nthread; ++i) { data = N_VNew_Serial(sizes[i]); if(data == NULL) {N_VDestroy_NrnThread(v);return(NULL);} NV_SUBVEC_NT(v, i) = data; } } return(v); } /* ---------------------------------------------------------------------------- * Function to clone from a template a new vector with empty (NULL) data array */ N_Vector N_VCloneEmpty_NrnThread(N_Vector w) { int i; N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnThread content; N_VectorContent_NrnThread wcontent; if (w == NULL) return(NULL); /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = w->ops->nvclone; ops->nvdestroy = w->ops->nvdestroy; ops->nvspace = w->ops->nvspace; ops->nvgetarraypointer = w->ops->nvgetarraypointer; ops->nvsetarraypointer = w->ops->nvsetarraypointer; ops->nvlinearsum = w->ops->nvlinearsum; ops->nvconst = w->ops->nvconst; ops->nvprod = w->ops->nvprod; ops->nvdiv = w->ops->nvdiv; ops->nvscale = w->ops->nvscale; ops->nvabs = w->ops->nvabs; ops->nvinv = w->ops->nvinv; ops->nvaddconst = w->ops->nvaddconst; ops->nvdotprod = w->ops->nvdotprod; ops->nvmaxnorm = w->ops->nvmaxnorm; ops->nvwrmsnormmask = w->ops->nvwrmsnormmask; ops->nvwrmsnorm = w->ops->nvwrmsnorm; ops->nvmin = w->ops->nvmin; ops->nvwl2norm = w->ops->nvwl2norm; ops->nvl1norm = w->ops->nvl1norm; ops->nvcompare = w->ops->nvcompare; ops->nvinvtest = w->ops->nvinvtest; ops->nvconstrmask = w->ops->nvconstrmask; ops->nvminquotient = w->ops->nvminquotient; /* Create content */ content = (N_VectorContent_NrnThread) malloc(sizeof(struct _N_VectorContent_NrnThread)); if (content == NULL) {free(ops);free(v);return(NULL);} wcontent = NV_CONTENT_NT(w); content->length = NV_LENGTH_NT(w); content->own_data = FALSE; content->nt = wcontent->nt; content->data = (N_Vector*) malloc(sizeof(N_Vector) * content->nt); if (content->data == NULL) { free(ops); free(v); free(content); return(NULL);} for (i=0; i < content->nt; ++i) { content->data[i] = NULL; } /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a nrnthread N_Vector with user data component */ N_Vector N_VMake_NrnThread(long int length, realtype *v_data) { N_Vector v=NULL; assert(0); #if 0 v = N_VNewEmpty_NrnThread(length); if (v == NULL) return(NULL); if (length > 0) { /* Attach data */ NV_OWN_DATA_NT(v) = FALSE; NV_DATA_NT(v) = v_data; } #endif return (v); } /* ---------------------------------------------------------------------------- * Function to create an array of new nrnthread vectors. */ N_Vector *N_VNewVectorArray_NrnThread(int count, long int length, int nthread, long int* sizes) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0) { NV_OWN_DATA_NT(v) = TRUE; for (i=0; i < nt; ++i) { wdata = NV_SUBVEC_NT(w, i); data = N_VClone(wdata); if(data == NULL) {N_VDestroy_NrnThread(v);return(NULL);} NV_SUBVEC_NT(v, i) = data; } /* Attach data */ } return(v); } void N_VDestroy_NrnThread(N_Vector v) { int i, nt; N_Vector data; nt = NV_NT_NT(v); if (NV_OWN_DATA_NT(v) == TRUE) { if (NV_CONTENT_NT(v)->data) { for (i = 0; i < nt; ++i) { data = NV_SUBVEC_NT(v, i); if (data) { N_VDestroy(data); } } free(NV_CONTENT_NT(v)->data); } } free(v->content); free(v->ops); free(v); } void N_VSpace_NrnThread(N_Vector v, long int *lrw, long int *liw) { *lrw = NV_LENGTH_NT(v); *liw = 1; } /* NOTICE: the pointer returned is actually the NVector* data where data is nthread NVector. so when you get the realtype* cast it back to (NVector*) */ realtype *N_VGetArrayPointer_NrnThread(N_Vector v) { N_Vector *v_data; v_data = NV_DATA_NT(v); return((realtype*)v_data); } void N_VSetArrayPointer_NrnThread(realtype *v_data, N_Vector v) { assert(0); #if 0 if (NV_LENGTH_NT(v) > 0) NV_DATA_NT(v) = v_data; #endif } static void* vlinearsum(NrnThread* nt) { int i = nt->id; N_VLinearSum_Serial(aarg, xarg(i), barg, yarg(i), zarg(i)); return (void*)0; } void N_VLinearSum_NrnThread(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { apass bpass xpass ypass zpass nrn_multithread_job(vlinearsum); mydebug("vlinearsum\n"); /*pr(z);*/ } static void* vconst(NrnThread* nt) { int i = nt->id; N_VConst_Serial(carg, zarg(i)); return (void*)0; } void N_VConst_NrnThread(realtype c, N_Vector z) { cpass zpass nrn_multithread_job(vconst); mydebug("vconst\n"); } static void* vprod(NrnThread* nt) { int i = nt->id; N_VProd_Serial(xarg(i), yarg(i), zarg(i)); return (void*)0; } void N_VProd_NrnThread(N_Vector x, N_Vector y, N_Vector z) { xpass ypass zpass nrn_multithread_job(vprod); mydebug("vprod\n"); } static void* vdiv(NrnThread* nt) { int i = nt->id; N_VDiv_Serial(xarg(i), yarg(i), zarg(i)); return (void*)0; } void N_VDiv_NrnThread(N_Vector x, N_Vector y, N_Vector z) { xpass ypass zpass nrn_multithread_job(vdiv); mydebug("vdiv\n"); } static void* vscale(NrnThread* nt) { int i = nt->id; N_VScale_Serial(carg, xarg(i), zarg(i)); return (void*)0; } void N_VScale_NrnThread(realtype c, N_Vector x, N_Vector z) { cpass xpass zpass nrn_multithread_job(vscale); mydebug("vscale\n"); /*pr(z);*/ } static void* vabs(NrnThread* nt) { int i = nt->id; N_VAbs_Serial(xarg(i), zarg(i)); return (void*)0; } void N_VAbs_NrnThread(N_Vector x, N_Vector z) { xpass zpass nrn_multithread_job(vabs); mydebug("vabs\n"); } static void* vinv(NrnThread* nt) { int i = nt->id; N_VInv_Serial(xarg(i), zarg(i)); return (void*)0; } void N_VInv_NrnThread(N_Vector x, N_Vector z) { xpass zpass nrn_multithread_job(vinv); mydebug("vinv\n"); } static void* vaddconst(NrnThread* nt) { int i = nt->id; N_VAddConst_Serial(xarg(i), barg, zarg(i)); return (void*)0; } void N_VAddConst_NrnThread(N_Vector x, realtype b, N_Vector z) { bpass xpass zpass nrn_multithread_job(vaddconst); mydebug("vaddconst\n"); } static void* vdotprod(NrnThread* nt) { realtype s; int i = nt->id; s = N_VDotProd_Serial(xarg(i), yarg(i)); lockadd(s); return (void*)0; } realtype N_VDotProd_NrnThread(N_Vector x, N_Vector y) { retval = ZERO; xpass ypass nrn_multithread_job(vdotprod); mydebug2("vdotprod %.20g\n", retval); return(retval); } static void* vmaxnorm(NrnThread* nt) { realtype max; int i = nt->id; max = N_VMaxNorm_Serial(xarg(i)); lockmax(max); return (void*)0; } realtype N_VMaxNorm_NrnThread(N_Vector x) { retval = ZERO; xpass nrn_multithread_job(vmaxnorm); mydebug2("vmaxnorm %.20g\n", retval); return(retval); } static ldrealtype vwrmsnorm_help(N_Vector x, N_Vector w) { long int i, N; ldrealtype sum = ZERO; realtype prodi, *xd, *wd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return(sum); } static void* vwrmsnorm(NrnThread* nt) { ldrealtype s; int i = nt->id; s = vwrmsnorm_help(xarg(i), warg(i)); locklongdadd(s); return (void*)0; } realtype N_VWrmsNorm_NrnThread(N_Vector x, N_Vector w) { long int N; N = NV_LENGTH_NT(x); #if USELONGDOUBLE longdretval = ZERO; #else retval = ZERO; #endif xpass wpass nrn_multithread_job(vwrmsnorm); #if USELONGDOUBLE retval = longdretval; #endif mydebug2("vwrmsnorm %.20g\n", RSqrt(retval / N)); return(RSqrt(retval / N)); } static realtype vwrmsnormmask_help(N_Vector x, N_Vector w, N_Vector id) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd, *idd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); idd = NV_DATA_S(id); for (i=0; i < N; i++) { if (idd[i] > ZERO) { prodi = xd[i] * wd[i]; sum += prodi * prodi; } } return(sum); } static void* vwrmsnormmask(NrnThread* nt) { realtype s; int i = nt->id; s = vwrmsnormmask_help(xarg(i), warg(i), idarg(i)); lockadd(s); return (void*)0; } realtype N_VWrmsNormMask_NrnThread(N_Vector x, N_Vector w, N_Vector id) { long int N; N = NV_LENGTH_NT(x); retval = ZERO; xpass wpass idpass nrn_multithread_job(vwrmsnormmask); mydebug2("vwrmsnormmask %.20g\n", RSqrt(retval / N)); return(RSqrt(retval / N)); } static void* vmin(NrnThread* nt) { realtype min; int i = nt->id; if (NV_LENGTH_S(xarg(i))) { min = N_VMin_Serial(xarg(i)); lockmin(min); } return (void*)0; } realtype N_VMin_NrnThread(N_Vector x) { retval = BIG_REAL; xpass nrn_multithread_job(vmin); mydebug2("vmin %.20g\n", retval); return(retval); } static realtype N_VWL2Norm_helper(N_Vector x, N_Vector w) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return sum; } static void* vwl2norm(NrnThread* nt) { realtype sum; int i = nt->id; sum = N_VWL2Norm_helper(xarg(i), warg(i)); lockadd(sum); return (void*)0; } realtype N_VWL2Norm_NrnThread(N_Vector x, N_Vector w) { long int N; retval = ZERO; xpass wpass nrn_multithread_job(vwl2norm); N = NV_LENGTH_NT(x); mydebug2("vwl2norm %.20g\n", RSqrt(retval)); return(RSqrt(retval)); } static void* vl1norm(NrnThread* nt) { realtype sum; int i = nt->id; sum = N_VL1Norm_Serial(xarg(i)); lockadd(sum); return (void*)0; } realtype N_VL1Norm_NrnThread(N_Vector x) { retval = ZERO; xpass nrn_multithread_job(vl1norm); mydebug2("vl1norm %.20g\n", retval); return(retval); } static void* v1mask(NrnThread* nt) { int i = nt->id; N_VOneMask_Serial(xarg(i)); return (void*)0; } void N_VOneMask_NrnThread(N_Vector x) { xpass nrn_multithread_job(v1mask); } static void* vcompare(NrnThread* nt) { int i = nt->id; N_VCompare_Serial(carg, xarg(i), zarg(i)); return (void*)0; } void N_VCompare_NrnThread(realtype c, N_Vector x, N_Vector z) { cpass xpass zpass nrn_multithread_job(vcompare); mydebug("vcompare\n"); } static void* vinvtest(NrnThread* nt) { booleantype b; int i = nt->id; b = N_VInvTest_Serial(xarg(i), zarg(i)); if (!b) { lockfalse; } return (void*)0; } booleantype N_VInvTest_NrnThread(N_Vector x, N_Vector z) { bretval = TRUE; xpass zpass nrn_multithread_job(vinvtest); mydebug2("vinvtest %d\n", bretval); return(bretval); } static void* vconstrmask(NrnThread* nt) { booleantype b; int i = nt->id; b = N_VConstrMask_Serial(yarg(i), xarg(i), zarg(i)); if (!b) { lockfalse; } return (void*)0; } booleantype N_VConstrMask_NrnThread(N_Vector y, N_Vector x, N_Vector z) { bretval = TRUE; ypass xpass zpass nrn_multithread_job(vconstrmask); mydebug2("vconstrmask %d\n", bretval); return(bretval); } static void* vminquotient(NrnThread* nt) { realtype min; int i = nt->id; min = N_VMinQuotient_Serial(xarg(i), yarg(i)); lockmin(min); return (void*)0; } realtype N_VMinQuotient_NrnThread(N_Vector x, N_Vector y) /* num, denom */ { retval = BIG_REAL; xpass ypass nrn_multithread_job(vconstrmask); mydebug2("vminquotient %.20g\n", retval); return(retval); } neuron-7.5/src/nrniv/nvector_nrnthread.h000077500000000000000000000253151323325274500205330ustar00rootroot00000000000000/* * N_Vector_NrnThread derived from N_Vector_Serial SunDials version * by replacing every occurrence of nrnthread with nrnthread in the various * cases and then modifying the relevant prototypes. * We only re-implement the ones that are used by cvodes and ida */ /* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-09 18:15:46 -0500 (Wed, 09 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for the nrnthread implementation of the * NVECTOR module. * * Part I contains declarations specific to the nrnthread * implementation of the supplied NVECTOR module. * * Part II defines accessor macros that allow the user to * efficiently use the type N_Vector without making explicit * references to the underlying data structure. * * Part III contains the prototype for the constructor N_VNew_NrnThread * as well as implementation-specific prototypes for various useful * vector operations. * * Notes: * * - The definition of the generic N_Vector structure can be found * in the header file shared/include/nvector.h. * * - The definition of the type realtype can be found in the * header file shared/include/sundialstypes.h, and it may be * changed (at the configuration stage) according to the user's * needs. The sundialstypes.h file also contains the definition * for the type booleantype. * * - N_Vector arguments to arithmetic vector operations need not * be distinct. For example, the following call: * * N_VLinearSum_NrnThread(a,x,b,y,y); * * (which stores the result of the operation a*x+b*y in y) * is legal. * ----------------------------------------------------------------- */ #ifndef _NVECTOR_NRNTHREAD_H #define _NVECTOR_NRNTHREAD_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "nvector.h" #include "sundialstypes.h" extern void N_VOneMask_Serial(N_Vector x); /* * ----------------------------------------------------------------- * PART I: NRNTHREAD implementation of N_Vector * ----------------------------------------------------------------- */ /* nrnthread implementation of the N_Vector 'content' structure contains the length of the vector, nthread, and a pointer to nthread N_Vector (serial) */ struct _N_VectorContent_NrnThread { long int length; int nt; /* number of threads */ booleantype own_data; N_Vector *data; /* nt of them (N_Vector_Serial) */ }; typedef struct _N_VectorContent_NrnThread *N_VectorContent_NrnThread; /* Note: documentation below may not be completely transformed from the N_Vector_Serial case */ /* * ----------------------------------------------------------------- * PART II: macros NV_CONTENT_S, NV_DATA_S, NV_OWN_DATA_S, * NV_LENGTH_S, and NV_Ith_S * ----------------------------------------------------------------- * In the descriptions below, the following user declarations * are assumed: * * N_Vector v; * long int i; * * (1) NV_CONTENT_NT * * This routines gives access to the contents of the nrnthread * vector N_Vector. * * The assignment v_cont = NV_CONTENT_NT(v) sets v_cont to be * a pointer to the nrnthread N_Vector content structure. * * (2) NV_SUBVEC_NT and NV_LENGTH_NT * * These routines give access to the individual parts of * the content structure of a nrnthread N_Vector. * * The assignment v_data = NV_SUBVEC_NT(v, i) sets v_data to be * a pointer to the ith N_Vector of v. The assignment * NV_SUBVEC_NT(v, i) = data_V sets the ith component N_Vector of v to * be data_v by storing the pointer data_v. * * The assignment v_llen = NV_SIZE_NT(v,i) sets v_llen to be * the length of the ith component of v. The call NV_LENGTH_NT(v) = len_v sets * the length of v to be len_v. * * (3) NV_Ith_NT * * In the following description, the components of an * N_Vector are numbered 0..n-1, where n is the length of v. * * The assignment r = NV_Ith_S(v,i) sets r to be the value of * the ith component of v. The assignment NV_Ith_S(v,i) = r * sets the value of the ith component of v to be r. * * Note: When looping over the components of an N_Vector v, it is * more efficient to first obtain the component array via * v_data = NV_DATA_S(v) and then access v_data[i] within the * loop than it is to use NV_Ith_S(v,i) within the loop. * ----------------------------------------------------------------- */ #define NV_CONTENT_NT(v) ( (N_VectorContent_NrnThread)(v->content) ) #define NV_LENGTH_NT(v) ( NV_CONTENT_NT(v)->length ) #define NV_NT_NT(v) ( NV_CONTENT_NT(v)->nt ) #define NV_OWN_DATA_NT(v) ( NV_CONTENT_NT(v)->own_data ) #define NV_DATA_NT(v) ( NV_CONTENT_NT(v)->data ) #define NV_SUBVEC_NT(v, i) ( NV_CONTENT_NT(v)->data[i] ) #define NV_Ith_NT(v,i) ( NV_DATA_NT(v)[i] ) /* wrong but not needed */ /* * ----------------------------------------------------------------- * PART III: functions exported by nvector_nrnthread * * CONSTRUCTORS: * N_VNew_NrnThread * N_VNewEmpty_NrnThread * N_VClone_NrnThread * N_VCloneEmpty_NrnThread * N_VMake_NrnThread * N_VNewVectorArray_NrnThread * N_VNewVectorArrayEmpty_NrnThread * DESTRUCTORS: * N_VDestroy_NrnThread * N_VDestroyVectorArray_NrnThread * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Function : N_VNew_NrnThread * ----------------------------------------------------------------- * This function creates and allocates memory for a nrnthread vector. * ----------------------------------------------------------------- */ N_Vector N_VNew_NrnThread(long int vec_length, int nthread, long int* sizes ); /* * ----------------------------------------------------------------- * Function : N_VNewEmpty_NrnThread * ----------------------------------------------------------------- * This function creates a new nrnthread N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VNewEmpty_NrnThread(long int vec_length, int nthread, long int* sizes); /* * ----------------------------------------------------------------- * Function : N_VCloneEmpty_NrnThread * ----------------------------------------------------------------- * This function creates a new nrnthread N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VCloneEmpty_NrnThread(N_Vector w); /* * ----------------------------------------------------------------- * Function : N_VMake_NrnThread * ----------------------------------------------------------------- * This function creates and allocates memory for a nrnthread vector * with a user-supplied data array. * ----------------------------------------------------------------- */ /*not implemented*/ N_Vector N_VMake_NrnThread(long int vec_length, realtype *v_data); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArray_NrnThread * ----------------------------------------------------------------- * This function creates an array of 'count' nrnthread vectors. This * array of N_Vectors can be freed using N_VDestroyVectorArray * (defined by the generic NVECTOR module). * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArray_NrnThread(int count, long int vec_length, int nthread, long int* sizes); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArrayEmpty_NrnThread * ----------------------------------------------------------------- * This function creates an array of 'count' nrnthread vectors each * with an empty (NULL) data array. * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArrayEmpty_NrnThread(int count, long int vec_length, int nthread, long int* sizes); /* * ----------------------------------------------------------------- * Function : N_VDestroyVectorArray_NrnThread * ----------------------------------------------------------------- * This function frees an array of N_Vector created with * N_VNewVectorArray_NrnThread. * ----------------------------------------------------------------- */ void N_VDestroyVectorArray_NrnThread(N_Vector *vs, int count); /* * ----------------------------------------------------------------- * Function : N_VPrint_NrnThread * ----------------------------------------------------------------- * This function prints the content of a nrnthread vector to stdout. * ----------------------------------------------------------------- */ void N_VPrint_NrnThread(N_Vector v); /* * ----------------------------------------------------------------- * nrnthread implementations of various useful vector operations * ----------------------------------------------------------------- */ N_Vector N_VClone_NrnThread(N_Vector w); void N_VDestroy_NrnThread(N_Vector v); void N_VSpace_NrnThread(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer_NrnThread(N_Vector v); void N_VSetArrayPointer_NrnThread(realtype *v_data, N_Vector v); void N_VLinearSum_NrnThread(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst_NrnThread(realtype c, N_Vector z); void N_VProd_NrnThread(N_Vector x, N_Vector y, N_Vector z); void N_VDiv_NrnThread(N_Vector x, N_Vector y, N_Vector z); void N_VScale_NrnThread(realtype c, N_Vector x, N_Vector z); void N_VAbs_NrnThread(N_Vector x, N_Vector z); void N_VInv_NrnThread(N_Vector x, N_Vector z); void N_VAddConst_NrnThread(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd_NrnThread(N_Vector x, N_Vector y); realtype N_VMaxNorm_NrnThread(N_Vector x); realtype N_VWrmsNorm_NrnThread(N_Vector x, N_Vector w); realtype N_VWrmsNormMask_NrnThread(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin_NrnThread(N_Vector x); realtype N_VWL2Norm_NrnThread(N_Vector x, N_Vector w); realtype N_VL1Norm_NrnThread(N_Vector x); void N_VCompare_NrnThread(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest_NrnThread(N_Vector x, N_Vector z); booleantype N_VConstrMask_NrnThread(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient_NrnThread(N_Vector num, N_Vector denom); #ifdef __cplusplus } #endif #endif neuron-7.5/src/nrniv/nvector_nrnthread_ld.c000077500000000000000000000460011323325274500212000ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-09 18:15:46 -0500 (Wed, 09 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a nrnthread implementation * of the NVECTOR package. * ----------------------------------------------------------------- */ #define USELONGDOUBLE 1 #include #include #include "shared/nvector_serial.h" #include "nvector_nrnthread_ld.h" #include "shared/sundialsmath.h" #include "shared/sundialstypes.h" #include "section.h" #include "nrnmutdec.h" #define ZERO RCONST(0.0) #define HALF RCONST(0.5) #define ONE RCONST(1.0) #define ONEPT5 RCONST(1.5) #if 0 #define mydebug(a) printf(a) #define mydebug2(a,b) printf(a,b) #else #define mydebug(a) /**/ #define mydebug2(a,b) /**/ #endif #if USELONGDOUBLE #define ldrealtype long double #else #define ldrealtype realtype #endif #if USE_PTHREAD static MUTDEC #endif /* argument passing between NrnThreadLD and Serial */ static N_Vector x_; static N_Vector y_; static N_Vector z_; static N_Vector w_; static N_Vector id_; static realtype a_; static realtype b_; static realtype c_; static realtype retval; #if USELONGDOUBLE static long double longdretval; #endif static booleantype bretval; #define xpass x_ = x; #define ypass y_ = y; #define zpass z_ = z; #define wpass w_ = w; #define idpass id_ = id; #define apass a_ = a; #define bpass b_ = b; #define cpass c_ = c; #define xarg(i) NV_SUBVEC_NT_LD(x_, i) #define yarg(i) NV_SUBVEC_NT_LD(y_, i) #define zarg(i) NV_SUBVEC_NT_LD(z_, i) #define warg(i) NV_SUBVEC_NT_LD(w_, i) #define idarg(i) NV_SUBVEC_NT_LD(id_, i) #define aarg a_ #define barg b_ #define carg c_ #define lock MUTLOCK #define unlock MUTUNLOCK #define lockadd(arg) lock; retval += arg; unlock; #if USELONGDOUBLE #define locklongdadd(arg) lock; longdretval += arg; unlock; #else #define locklongdadd(arg) lockadd(arg) #endif #define lockmax(arg) lock; if (retval < arg) { retval = arg; }; unlock; #define lockmin(arg) lock; if (retval > arg) { retval = arg; }; unlock; #define lockfalse lock; bretval = FALSE; unlock; /* * ----------------------------------------------------------------- * exported functions * ----------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- * Function to create a new empty nrnthread vector */ N_Vector N_VNewEmpty_NrnThreadLD(long int length, int nthread, long int* sizes) { int i; N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnThreadLD content; if (!MUTCONSTRUCTED) { MUTCONSTRUCT(1) } /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = N_VClone_NrnThreadLD; ops->nvdestroy = N_VDestroy_NrnThreadLD; ops->nvspace = N_VSpace_NrnThreadLD; ops->nvgetarraypointer = N_VGetArrayPointer_NrnThreadLD; ops->nvsetarraypointer = N_VSetArrayPointer_NrnThreadLD; ops->nvlinearsum = N_VLinearSum_NrnThreadLD; ops->nvconst = N_VConst_NrnThreadLD; ops->nvprod = N_VProd_NrnThreadLD; ops->nvdiv = N_VDiv_NrnThreadLD; ops->nvscale = N_VScale_NrnThreadLD; ops->nvabs = N_VAbs_NrnThreadLD; ops->nvinv = N_VInv_NrnThreadLD; ops->nvaddconst = N_VAddConst_NrnThreadLD; ops->nvdotprod = N_VDotProd_NrnThreadLD; ops->nvmaxnorm = N_VMaxNorm_NrnThreadLD; ops->nvwrmsnormmask = N_VWrmsNormMask_NrnThreadLD; ops->nvwrmsnorm = N_VWrmsNorm_NrnThreadLD; ops->nvmin = N_VMin_NrnThreadLD; ops->nvwl2norm = N_VWL2Norm_NrnThreadLD; ops->nvl1norm = N_VL1Norm_NrnThreadLD; ops->nvcompare = N_VCompare_NrnThreadLD; ops->nvinvtest = N_VInvTest_NrnThreadLD; ops->nvconstrmask = N_VConstrMask_NrnThreadLD; ops->nvminquotient = N_VMinQuotient_NrnThreadLD; /* Create content */ content = (N_VectorContent_NrnThreadLD) malloc(sizeof(struct _N_VectorContent_NrnThreadLD)); if (content == NULL) {free(ops);free(v);return(NULL);} content->length = length; content->nt = nthread; content->own_data = FALSE; content->data = (N_Vector*) malloc(sizeof(N_Vector)*nthread); if (content->data == NULL) { free(ops); free(v); free(content); return(NULL);} for (i=0; i < nthread; ++i) { content->data[i] = NULL; } /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a new nrnthread vector */ N_Vector N_VNew_NrnThreadLD(long int length, int nthread, long int* sizes) { int i; N_Vector v; N_Vector data; N_VectorContent_NrnThreadLD* content; v = N_VNewEmpty_NrnThreadLD(length, nthread, sizes); if (v == NULL) return(NULL); /* Create data */ if (length > 0) { /* Allocate memory */ NV_OWN_DATA_NT_LD(v) = TRUE; for (i=0; i < nthread; ++i) { data = N_VNew_Serial(sizes[i]); if(data == NULL) {N_VDestroy_NrnThreadLD(v);return(NULL);} NV_SUBVEC_NT_LD(v, i) = data; } } return(v); } /* ---------------------------------------------------------------------------- * Function to clone from a template a new vector with empty (NULL) data array */ N_Vector N_VCloneEmpty_NrnThreadLD(N_Vector w) { int i; N_Vector v; N_Vector_Ops ops; N_VectorContent_NrnThreadLD content; N_VectorContent_NrnThreadLD wcontent; if (w == NULL) return(NULL); /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = w->ops->nvclone; ops->nvdestroy = w->ops->nvdestroy; ops->nvspace = w->ops->nvspace; ops->nvgetarraypointer = w->ops->nvgetarraypointer; ops->nvsetarraypointer = w->ops->nvsetarraypointer; ops->nvlinearsum = w->ops->nvlinearsum; ops->nvconst = w->ops->nvconst; ops->nvprod = w->ops->nvprod; ops->nvdiv = w->ops->nvdiv; ops->nvscale = w->ops->nvscale; ops->nvabs = w->ops->nvabs; ops->nvinv = w->ops->nvinv; ops->nvaddconst = w->ops->nvaddconst; ops->nvdotprod = w->ops->nvdotprod; ops->nvmaxnorm = w->ops->nvmaxnorm; ops->nvwrmsnormmask = w->ops->nvwrmsnormmask; ops->nvwrmsnorm = w->ops->nvwrmsnorm; ops->nvmin = w->ops->nvmin; ops->nvwl2norm = w->ops->nvwl2norm; ops->nvl1norm = w->ops->nvl1norm; ops->nvcompare = w->ops->nvcompare; ops->nvinvtest = w->ops->nvinvtest; ops->nvconstrmask = w->ops->nvconstrmask; ops->nvminquotient = w->ops->nvminquotient; /* Create content */ content = (N_VectorContent_NrnThreadLD) malloc(sizeof(struct _N_VectorContent_NrnThreadLD)); if (content == NULL) {free(ops);free(v);return(NULL);} wcontent = NV_CONTENT_NT_LD(w); content->length = NV_LENGTH_NT_LD(w); content->own_data = FALSE; content->nt = wcontent->nt; content->data = (N_Vector*) malloc(sizeof(N_Vector) * content->nt); if (content->data == NULL) { free(ops); free(v); free(content); return(NULL);} for (i=0; i < content->nt; ++i) { content->data[i] = NULL; } /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a nrnthread N_Vector with user data component */ N_Vector N_VMake_NrnThreadLD(long int length, realtype *v_data) { N_Vector v = NULL; assert(0); #if 0 v = N_VNewEmpty_NrnThreadLD(length); if (v == NULL) return(NULL); if (length > 0) { /* Attach data */ NV_OWN_DATA_NT_LD(v) = FALSE; NV_DATA_NT_LD(v) = v_data; } #endif return(v); } /* ---------------------------------------------------------------------------- * Function to create an array of new nrnthread vectors. */ N_Vector *N_VNewVectorArray_NrnThreadLD(int count, long int length, int nthread, long int* sizes) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0) { NV_OWN_DATA_NT_LD(v) = TRUE; for (i=0; i < nt; ++i) { wdata = NV_SUBVEC_NT_LD(w, i); data = N_VClone(wdata); if(data == NULL) {N_VDestroy_NrnThreadLD(v);return(NULL);} NV_SUBVEC_NT_LD(v, i) = data; } /* Attach data */ } return(v); } void N_VDestroy_NrnThreadLD(N_Vector v) { int i, nt; N_Vector data; nt = NV_NT_NT_LD(v); if (NV_OWN_DATA_NT_LD(v) == TRUE) { if (NV_CONTENT_NT_LD(v)->data) { for (i = 0; i < nt; ++i) { data = NV_SUBVEC_NT_LD(v, i); if (data) { N_VDestroy(data); } } free(NV_CONTENT_NT_LD(v)->data); } } free(v->content); free(v->ops); free(v); } void N_VSpace_NrnThreadLD(N_Vector v, long int *lrw, long int *liw) { *lrw = NV_LENGTH_NT_LD(v); *liw = 1; } /* NOTICE: the pointer returned is actually the NVector* data where data is nthread NVector. so when you get the realtype* cast it back to (NVector*) */ realtype *N_VGetArrayPointer_NrnThreadLD(N_Vector v) { N_Vector *v_data; v_data = NV_DATA_NT_LD(v); return((realtype*)v_data); } void N_VSetArrayPointer_NrnThreadLD(realtype *v_data, N_Vector v) { assert(0); #if 0 if (NV_LENGTH_NT_LD(v) > 0) NV_DATA_NT_LD(v) = v_data; #endif } static void* vlinearsum(NrnThread* nt) { int i = nt->id; N_VLinearSum_Serial(aarg, xarg(i), barg, yarg(i), zarg(i)); return (void*)0; } void N_VLinearSum_NrnThreadLD(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { apass bpass xpass ypass zpass nrn_multithread_job(vlinearsum); mydebug("vlinearsum\n"); /*pr(z);*/ } static void* vconst(NrnThread* nt) { int i = nt->id; N_VConst_Serial(carg, zarg(i)); return (void*)0; } void N_VConst_NrnThreadLD(realtype c, N_Vector z) { cpass zpass nrn_multithread_job(vconst); mydebug("vconst\n"); } static void* vprod(NrnThread* nt) { int i = nt->id; N_VProd_Serial(xarg(i), yarg(i), zarg(i)); return (void*)0; } void N_VProd_NrnThreadLD(N_Vector x, N_Vector y, N_Vector z) { xpass ypass zpass nrn_multithread_job(vprod); mydebug("vprod\n"); } static void* vdiv(NrnThread* nt) { int i = nt->id; N_VDiv_Serial(xarg(i), yarg(i), zarg(i)); return (void*)0; } void N_VDiv_NrnThreadLD(N_Vector x, N_Vector y, N_Vector z) { xpass ypass zpass nrn_multithread_job(vdiv); mydebug("vdiv\n"); } static void* vscale(NrnThread* nt) { int i = nt->id; N_VScale_Serial(carg, xarg(i), zarg(i)); return (void*)0; } void N_VScale_NrnThreadLD(realtype c, N_Vector x, N_Vector z) { cpass xpass zpass nrn_multithread_job(vscale); mydebug("vscale\n"); /*pr(z);*/ } static void* vabs(NrnThread* nt) { int i = nt->id; N_VAbs_Serial(xarg(i), zarg(i)); return (void*)0; } void N_VAbs_NrnThreadLD(N_Vector x, N_Vector z) { xpass zpass nrn_multithread_job(vabs); mydebug("vabs\n"); } static void* vinv(NrnThread* nt) { int i = nt->id; N_VInv_Serial(xarg(i), zarg(i)); return (void*)0; } void N_VInv_NrnThreadLD(N_Vector x, N_Vector z) { xpass zpass nrn_multithread_job(vinv); mydebug("vinv\n"); } static void* vaddconst(NrnThread* nt) { int i = nt->id; N_VAddConst_Serial(xarg(i), barg, zarg(i)); return (void*)0; } void N_VAddConst_NrnThreadLD(N_Vector x, realtype b, N_Vector z) { bpass xpass zpass nrn_multithread_job(vaddconst); mydebug("vaddconst\n"); } static void* vdotprod(NrnThread* nt) { realtype s; int i = nt->id; s = N_VDotProd_Serial(xarg(i), yarg(i)); lockadd(s); return (void*)0; } realtype N_VDotProd_NrnThreadLD(N_Vector x, N_Vector y) { retval = ZERO; xpass ypass nrn_multithread_job(vdotprod); mydebug2("vdotprod %.20g\n", retval); return(retval); } static void* vmaxnorm(NrnThread* nt) { realtype max; int i = nt->id; max = N_VMaxNorm_Serial(xarg(i)); lockmax(max); return (void*)0; } realtype N_VMaxNorm_NrnThreadLD(N_Vector x) { retval = ZERO; xpass nrn_multithread_job(vmaxnorm); mydebug2("vmaxnorm %.20g\n", retval); return(retval); } static ldrealtype vwrmsnorm_help(N_Vector x, N_Vector w) { long int i, N; ldrealtype sum = ZERO; realtype prodi, *xd, *wd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return(sum); } static void* vwrmsnorm(NrnThread* nt) { ldrealtype s; int i = nt->id; s = vwrmsnorm_help(xarg(i), warg(i)); locklongdadd(s); return (void*)0; } realtype N_VWrmsNorm_NrnThreadLD(N_Vector x, N_Vector w) { long int N; N = NV_LENGTH_NT_LD(x); #if USELONGDOUBLE longdretval = ZERO; #else retval = ZERO; #endif xpass wpass nrn_multithread_job(vwrmsnorm); #if USELONGDOUBLE retval = longdretval; #endif mydebug2("vwrmsnorm %.20g\n", RSqrt(retval / N)); return(RSqrt(retval / N)); } static realtype vwrmsnormmask_help(N_Vector x, N_Vector w, N_Vector id) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd, *idd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); idd = NV_DATA_S(id); for (i=0; i < N; i++) { if (idd[i] > ZERO) { prodi = xd[i] * wd[i]; sum += prodi * prodi; } } return(sum); } static void* vwrmsnormmask(NrnThread* nt) { realtype s; int i = nt->id; s = vwrmsnormmask_help(xarg(i), warg(i), idarg(i)); lockadd(s); return (void*)0; } realtype N_VWrmsNormMask_NrnThreadLD(N_Vector x, N_Vector w, N_Vector id) { long int N; N = NV_LENGTH_NT_LD(x); retval = ZERO; xpass wpass idpass nrn_multithread_job(vwrmsnormmask); mydebug2("vwrmsnormmask %.20g\n", RSqrt(retval / N)); return(RSqrt(retval / N)); } static void* vmin(NrnThread* nt) { realtype min; int i = nt->id; if (NV_LENGTH_S(xarg(i))) { min = N_VMin_Serial(xarg(i)); lockmin(min); } return (void*)0; } realtype N_VMin_NrnThreadLD(N_Vector x) { retval = BIG_REAL; xpass nrn_multithread_job(vmin); mydebug2("vmin %.20g\n", retval); return(retval); } static realtype N_VWL2Norm_helper(N_Vector x, N_Vector w) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return sum; } static void* vwl2norm(NrnThread* nt) { realtype sum; int i = nt->id; sum = N_VWL2Norm_helper(xarg(i), warg(i)); lockadd(sum); return (void*)0; } realtype N_VWL2Norm_NrnThreadLD(N_Vector x, N_Vector w) { long int N; retval = ZERO; xpass wpass nrn_multithread_job(vwl2norm); N = NV_LENGTH_NT_LD(x); mydebug2("vwl2norm %.20g\n", RSqrt(retval)); return(RSqrt(retval)); } static void* vl1norm(NrnThread* nt) { realtype sum; int i = nt->id; sum = N_VL1Norm_Serial(xarg(i)); lockadd(sum); return (void*)0; } realtype N_VL1Norm_NrnThreadLD(N_Vector x) { retval = ZERO; xpass nrn_multithread_job(vl1norm); mydebug2("vl1norm %.20g\n", retval); return(retval); } static void* v1mask(NrnThread* nt) { int i = nt->id; N_VOneMask_Serial(xarg(i)); return (void*)0; } void N_VOneMask_NrnThreadLD(N_Vector x) { xpass nrn_multithread_job(v1mask); } static void* vcompare(NrnThread* nt) { int i = nt->id; N_VCompare_Serial(carg, xarg(i), zarg(i)); return (void*)0; } void N_VCompare_NrnThreadLD(realtype c, N_Vector x, N_Vector z) { cpass xpass zpass nrn_multithread_job(vcompare); mydebug("vcompare\n"); } static void* vinvtest(NrnThread* nt) { booleantype b; int i = nt->id; b = N_VInvTest_Serial(xarg(i), zarg(i)); if (!b) { lockfalse; } return (void*)0; } booleantype N_VInvTest_NrnThreadLD(N_Vector x, N_Vector z) { bretval = TRUE; xpass zpass nrn_multithread_job(vinvtest); mydebug2("vinvtest %d\n", bretval); return(bretval); } static void* vconstrmask(NrnThread* nt) { booleantype b; int i = nt->id; b = N_VConstrMask_Serial(yarg(i), xarg(i), zarg(i)); if (!b) { lockfalse; } return (void*)0; } booleantype N_VConstrMask_NrnThreadLD(N_Vector y, N_Vector x, N_Vector z) { bretval = TRUE; ypass xpass zpass nrn_multithread_job(vconstrmask); mydebug2("vconstrmask %d\n", bretval); return(bretval); } static void* vminquotient(NrnThread* nt) { realtype min; int i = nt->id; min = N_VMinQuotient_Serial(xarg(i), yarg(i)); lockmin(min); return (void*)0; } realtype N_VMinQuotient_NrnThreadLD(N_Vector x, N_Vector y) /* num, denom */ { retval = BIG_REAL; xpass ypass nrn_multithread_job(vconstrmask); mydebug2("vminquotient %.20g\n", retval); return(retval); } neuron-7.5/src/nrniv/nvector_nrnthread_ld.h000077500000000000000000000261571323325274500212170ustar00rootroot00000000000000/* * N_Vector_NrnThreadLD derived from N_Vector_Serial SunDials version * by replacing every occurrence of nrnthread with nrnthread in the various * cases and then modifying the relevant prototypes. * We only re-implement the ones that are used by cvodes and ida */ /* Macros changed with sed 's/NV_\([A-Za-z_]*\)_NT/NV_\1_NT_LD/g' nvector_nrnthread_ld.c > temp mv temp nvector_nrnthread_ld.c sed 's/NV_\([A-Za-z_]*\)_NT/NV_\1_NT_LD/g' nvector_nrnthread_ld.h >temp mv temp nvector_nrnthread_ld.h */ /* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-09 18:15:46 -0500 (Wed, 09 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for the nrnthread implementation of the * NVECTOR module. * * Part I contains declarations specific to the nrnthread * implementation of the supplied NVECTOR module. * * Part II defines accessor macros that allow the user to * efficiently use the type N_Vector without making explicit * references to the underlying data structure. * * Part III contains the prototype for the constructor N_VNew_NrnThreadLD * as well as implementation-specific prototypes for various useful * vector operations. * * Notes: * * - The definition of the generic N_Vector structure can be found * in the header file shared/include/nvector.h. * * - The definition of the type realtype can be found in the * header file shared/include/sundialstypes.h, and it may be * changed (at the configuration stage) according to the user's * needs. The sundialstypes.h file also contains the definition * for the type booleantype. * * - N_Vector arguments to arithmetic vector operations need not * be distinct. For example, the following call: * * N_VLinearSum_NrnThreadLD(a,x,b,y,y); * * (which stores the result of the operation a*x+b*y in y) * is legal. * ----------------------------------------------------------------- */ #ifndef _NVECTOR_NRNTHREAD_LD_H #define _NVECTOR_NRNTHREAD_LD_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "nvector.h" #include "sundialstypes.h" extern void N_VOneMask_Serial(N_Vector x); /* * ----------------------------------------------------------------- * PART I: NRNTHREAD implementation of N_Vector * ----------------------------------------------------------------- */ /* nrnthread implementation of the N_Vector 'content' structure contains the length of the vector, nthread, and a pointer to nthread N_Vector (serial) */ struct _N_VectorContent_NrnThreadLD { long int length; int nt; /* number of threads */ booleantype own_data; N_Vector *data; /* nt of them (N_Vector_Serial) */ }; typedef struct _N_VectorContent_NrnThreadLD *N_VectorContent_NrnThreadLD; /* Note: documentation below may not be completely transformed from the N_Vector_Serial case */ /* * ----------------------------------------------------------------- * PART II: macros NV_CONTENT_S, NV_DATA_S, NV_OWN_DATA_S, * NV_LENGTH_S, and NV_Ith_S * ----------------------------------------------------------------- * In the descriptions below, the following user declarations * are assumed: * * N_Vector v; * long int i; * * (1) NV_CONTENT_NT_LD * * This routines gives access to the contents of the nrnthread * vector N_Vector. * * The assignment v_cont = NV_CONTENT_NT_LD(v) sets v_cont to be * a pointer to the nrnthread N_Vector content structure. * * (2) NV_SUBVEC_NT_LD and NV_LENGTH_NT_LD * * These routines give access to the individual parts of * the content structure of a nrnthread N_Vector. * * The assignment v_data = NV_SUBVEC_NT_LD(v, i) sets v_data to be * a pointer to the ith N_Vector of v. The assignment * NV_SUBVEC_NT_LD(v, i) = data_V sets the ith component N_Vector of v to * be data_v by storing the pointer data_v. * * The assignment v_llen = NV_SIZE_NT_LD(v,i) sets v_llen to be * the length of the ith component of v. The call NV_LENGTH_NT_LD(v) = len_v sets * the length of v to be len_v. * * (3) NV_Ith_NT_LD * * In the following description, the components of an * N_Vector are numbered 0..n-1, where n is the length of v. * * The assignment r = NV_Ith_S(v,i) sets r to be the value of * the ith component of v. The assignment NV_Ith_S(v,i) = r * sets the value of the ith component of v to be r. * * Note: When looping over the components of an N_Vector v, it is * more efficient to first obtain the component array via * v_data = NV_DATA_S(v) and then access v_data[i] within the * loop than it is to use NV_Ith_S(v,i) within the loop. * ----------------------------------------------------------------- */ #define NV_CONTENT_NT_LD(v) ( (N_VectorContent_NrnThreadLD)(v->content) ) #define NV_LENGTH_NT_LD(v) ( NV_CONTENT_NT_LD(v)->length ) #define NV_NT_NT_LD(v) ( NV_CONTENT_NT_LD(v)->nt ) #define NV_OWN_DATA_NT_LD(v) ( NV_CONTENT_NT_LD(v)->own_data ) #define NV_DATA_NT_LD(v) ( NV_CONTENT_NT_LD(v)->data ) #define NV_SUBVEC_NT_LD(v, i) ( NV_CONTENT_NT_LD(v)->data[i] ) #define NV_Ith_NT_LD(v,i) ( NV_DATA_NT_LD(v)[i] ) /* wrong but not needed */ /* * ----------------------------------------------------------------- * PART III: functions exported by nvector_nrnthread * * CONSTRUCTORS: * N_VNew_NrnThreadLD * N_VNewEmpty_NrnThreadLD * N_VClone_NrnThreadLD * N_VCloneEmpty_NrnThreadLD * N_VMake_NrnThreadLD * N_VNewVectorArray_NrnThreadLD * N_VNewVectorArrayEmpty_NrnThreadLD * DESTRUCTORS: * N_VDestroy_NrnThreadLD * N_VDestroyVectorArray_NrnThreadLD * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Function : N_VNew_NrnThreadLD * ----------------------------------------------------------------- * This function creates and allocates memory for a nrnthread vector. * ----------------------------------------------------------------- */ N_Vector N_VNew_NrnThreadLD(long int vec_length, int nthread, long int* sizes ); /* * ----------------------------------------------------------------- * Function : N_VNewEmpty_NrnThreadLD * ----------------------------------------------------------------- * This function creates a new nrnthread N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VNewEmpty_NrnThreadLD(long int vec_length, int nthread, long int* sizes); /* * ----------------------------------------------------------------- * Function : N_VCloneEmpty_NrnThreadLD * ----------------------------------------------------------------- * This function creates a new nrnthread N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VCloneEmpty_NrnThreadLD(N_Vector w); /* * ----------------------------------------------------------------- * Function : N_VMake_NrnThreadLD * ----------------------------------------------------------------- * This function creates and allocates memory for a nrnthread vector * with a user-supplied data array. * ----------------------------------------------------------------- */ /*not implemented*/ N_Vector N_VMake_NrnThreadLD(long int vec_length, realtype *v_data); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArray_NrnThreadLD * ----------------------------------------------------------------- * This function creates an array of 'count' nrnthread vectors. This * array of N_Vectors can be freed using N_VDestroyVectorArray * (defined by the generic NVECTOR module). * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArray_NrnThreadLD(int count, long int vec_length, int nthread, long int* sizes); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArrayEmpty_NrnThreadLD * ----------------------------------------------------------------- * This function creates an array of 'count' nrnthread vectors each * with an empty (NULL) data array. * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArrayEmpty_NrnThreadLD(int count, long int vec_length, int nthread, long int* sizes); /* * ----------------------------------------------------------------- * Function : N_VDestroyVectorArray_NrnThreadLD * ----------------------------------------------------------------- * This function frees an array of N_Vector created with * N_VNewVectorArray_NrnThreadLD. * ----------------------------------------------------------------- */ void N_VDestroyVectorArray_NrnThreadLD(N_Vector *vs, int count); /* * ----------------------------------------------------------------- * Function : N_VPrint_NrnThreadLD * ----------------------------------------------------------------- * This function prints the content of a nrnthread vector to stdout. * ----------------------------------------------------------------- */ void N_VPrint_NrnThreadLD(N_Vector v); /* * ----------------------------------------------------------------- * nrnthread implementations of various useful vector operations * ----------------------------------------------------------------- */ N_Vector N_VClone_NrnThreadLD(N_Vector w); void N_VDestroy_NrnThreadLD(N_Vector v); void N_VSpace_NrnThreadLD(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer_NrnThreadLD(N_Vector v); void N_VSetArrayPointer_NrnThreadLD(realtype *v_data, N_Vector v); void N_VLinearSum_NrnThreadLD(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst_NrnThreadLD(realtype c, N_Vector z); void N_VProd_NrnThreadLD(N_Vector x, N_Vector y, N_Vector z); void N_VDiv_NrnThreadLD(N_Vector x, N_Vector y, N_Vector z); void N_VScale_NrnThreadLD(realtype c, N_Vector x, N_Vector z); void N_VAbs_NrnThreadLD(N_Vector x, N_Vector z); void N_VInv_NrnThreadLD(N_Vector x, N_Vector z); void N_VAddConst_NrnThreadLD(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd_NrnThreadLD(N_Vector x, N_Vector y); realtype N_VMaxNorm_NrnThreadLD(N_Vector x); realtype N_VWrmsNorm_NrnThreadLD(N_Vector x, N_Vector w); realtype N_VWrmsNormMask_NrnThreadLD(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin_NrnThreadLD(N_Vector x); realtype N_VWL2Norm_NrnThreadLD(N_Vector x, N_Vector w); realtype N_VL1Norm_NrnThreadLD(N_Vector x); void N_VCompare_NrnThreadLD(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest_NrnThreadLD(N_Vector x, N_Vector z); booleantype N_VConstrMask_NrnThreadLD(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient_NrnThreadLD(N_Vector num, N_Vector denom); #ifdef __cplusplus } #endif #endif neuron-7.5/src/nrniv/nvkludge.cpp000066400000000000000000000023131323325274500171460ustar00rootroot00000000000000#include <../../nrnconf.h> /* must get some things linked from nrniv which otherwise would be gotten from ivoc. Needed only if linked statically */ #include #include #include "symdir.h" #include "datapath.h" #include #if HAVE_IV #include "ivoc.h" #endif #include "oc2iv.h" #include "scoplib_ansi.h" extern "C" { extern double (*nrnpy_guigetval)(Object*); extern void (*nrnpy_guisetval)(Object*, double); extern int (*nrnpy_guigetstr)(Object*, char**); } #if defined(CYGWIN) extern "C" { extern int ncyg_fprintf(); } #endif #if NRNMPI extern "C" { extern void nrn_timeout(int); extern double scop_random(); } #endif extern void nrn_vecsim_add(void*, bool); extern void nrn_vecsim_remove(void*); void nrn_nvkludge_dummy() { SymDirectory* s1 = new SymDirectory(-1); HocDataPaths* hp = new HocDataPaths(); #if HAVE_IV Oc::valid_stmt(0, 0); #endif #if defined(CYGWIN) #if HAVE_IV Oc::valid_expr(0); #endif hoc_func_table(0,0,0); hoc_spec_table(0,0); ncyg_fprintf(); #endif nrn_vecsim_add(NULL, false); nrn_vecsim_remove(NULL); #if NRNMPI nrn_timeout(0); #endif nrnpy_guigetval = 0; nrnpy_guisetval = 0; nrnpy_guigetstr = 0; scop_random(); } neuron-7.5/src/nrniv/ocbbs.cpp000077500000000000000000000000411323325274500164160ustar00rootroot00000000000000#include "../parallel/ocbbs.cpp" neuron-7.5/src/nrniv/occvode.cpp000077500000000000000000000002551323325274500167570ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/occvode.cpp" neuron-7.5/src/nrniv/ocjump.cpp000077500000000000000000000002501323325274500166250ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../ivoc/ocjump.cpp" neuron-7.5/src/nrniv/partrans.cpp000066400000000000000000001150611323325274500171660ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include #include #include #include #include #if defined(HAVE_STDINT_H) #include #endif // replaces use of qsort_r in sidsort for bbcorewrite #include #include #include #include // Introduced for NonVSrcUpdateInfo #ifndef NRNLONGSGID #define NRNLONGSGID 0 #endif #if NRNLONGSGID #define sgid_t int64_t #define sgid_alltoallv nrnmpi_long_alltoallv #else #define sgid_t int #define sgid_alltoallv nrnmpi_int_alltoallv #endif extern "C" { void nrnmpi_source_var(); void nrnmpi_target_var(); void nrnmpi_setup_transfer(); void nrn_partrans_clear(); static void mpi_transfer(); static void thread_transfer(NrnThread*); static void thread_vi_compute(NrnThread*); static void mk_ttd(); extern double t; extern int v_structure_change; extern int structure_change_cnt; extern double* nrn_recalc_ptr(double*); extern const char *bbcore_write_version; // see lengthy comment in ../nrnoc/fadvance.c // nrnmpi_v_transfer requires existence of nrnthread_v_transfer even if there // is only one thread. // Thread 0 does the nrnmpi_v_transfer into incoming_src_buf. // Data destined for targets in thread owned memory // is copied to the proper place by each thread via nrnthread_v_transfer // MPI_Alltoallv is used to transfer interprocessor data. // The basic assumption is that this will be mostly used for gap junctions in which // most often one source voltage goes to one target or at least only a few targets. // Note that the source data for nrnthread_v_transfer is in incoming_src_buf, // source locations owned by thread, and source locations owned by other threads. /* 16-5-2014 Gap junctions with extracellular require that the voltage source be v + vext. A solution to the v+vext problem is to create a thread specific source value buffer just for extracellular nodes. NODEV(_nd) + _nd->extnode->v[0] . That is, if there is no extracellular the ttd.sv and and poutsrc_ pointers stay exactly the same. Whereas, if there is extracellular, those would point into the source value buffer of the correct thread. Of course, it is necessary that the source value buffer be computed prior to either parallel transfer or mpi_transfer. Note that some sources that are needed by another thread may not be needed by mpi and vice versa. For the fixed step method, mpi transfer occurs prior to thread transfer. For global variable step methods (cvode and lvardt do not work with extracellular anyway): 1) for multisplit, mpi between ms_part3 and ms_part4 2) not multisplit, mpi between transfer_part1 and transfer_part2 with thread transfer in ms_part4 and transfer_part2. Therefore it is possible to do the v+vext computation at the beginning of mpi transfer except that mpi_transfer is not called if there is only one process. Also, this would be very cache inefficient for threads since mpi transfer is done only by thread 0. Therefore we need yet another callback. void* nrnthread_vi_compute(NrnThread*) called, if needed, at the end of update(nt) and before mpi transfer in nrn_finitialize. */ /* 29-9-2016 Want to allow a source to be any range variable at a node or in a Point_process. e.g an ion concentration. The v+vext change restricted sources to voltage partly in order to simplify pointer recalculation for cache efficiency. If the source is not voltage, the calling context of pc.source_var must be sufficient to easily store enough info to update the pointer for cache efficiency or changed number of threads. ie. in general, (Node*, mechtype, parray_index). If the variable is a member of a Point_process, it would be simple to pass it as the third arg and store the reference. However, we reject that due to not handling the typical case of concentration. So we impose the limitation that structural changes that destroy the Node or move the pointer to another Node generally require clearing and re-declaring the source, sid, target relations, (nseg change, point process relocation). Which is, in fact, the current limitation on voltage sources. The substantive implementation change is to provide a safe pointer update for when we know the Node*. An extra map > should do nicely. with voltages NOT being in the map. Also a decent error message can be generated. Finally, it is fairly clear how to make this work with coreneuron by perhaps adding a triple of sid, mechtype, parray_index integer vectors to the _gap.dat file. */ #if 1 || PARANEURON extern void (*nrnthread_v_transfer_)(NrnThread*); // before nonvint and BEFORE INITIAL extern void (*nrnthread_vi_compute_)(NrnThread*); extern void (*nrnmpi_v_transfer_)(); // before nrnthread_v_transfer and after update. Called by thread 0. extern void (*nrn_mk_transfer_thread_data_)(); #endif #if PARANEURON extern double nrnmpi_transfer_wait_; extern void nrnmpi_barrier(); extern void nrnmpi_int_allgather(int*, int*, int); extern int nrnmpi_int_allmax(int); extern void sgid_alltoallv(sgid_t*, int*, int*, sgid_t*, int*, int*); extern void nrnmpi_int_alltoallv(int*, int*, int*, int*, int*, int*); extern void nrnmpi_dbl_alltoallv(double*, int*, int*, double*, int*, int*); #endif } struct TransferThreadData { int cnt; double** tv; // pointers to the ParallelContext.target_var double** sv; // pointers to the ParallelContext.source_var (or into MPI target buffer) }; static TransferThreadData* transfer_thread_data_; static int n_transfer_thread_data_; // for the case where we need vi = v + vext as the source voltage struct SourceViBuf { int cnt; Node** nd; double* val; }; static SourceViBuf* source_vi_buf_; static int n_source_vi_buf_; void nrn_partrans_update_ptrs(); declareNrnHash(MapSgid2Int, sgid_t, int); implementNrnHash(MapSgid2Int, sgid_t, int); declareNrnHash(MapNode2PDbl, Node*, double*); implementNrnHash(MapNode2PDbl, Node*, double*); declarePtrList(DblPList, double) implementPtrList(DblPList, double) declarePtrList(NodePList, Node) implementPtrList(NodePList, Node) #define PPList partrans_PPList declarePtrList(PPList, Point_process) implementPtrList(PPList, Point_process) declareList(IntList, int) implementList(IntList, int) declareList(SgidList, sgid_t) implementList(SgidList, sgid_t) static double* insrc_buf_; // Receives the interprocessor data destined for other threads. static double* outsrc_buf_; static double** poutsrc_; // prior to mpi copy src value to proper place in outsrc_buf_ static int* poutsrc_indices_; // for recalc pointers static int insrc_buf_size_, *insrccnt_, *insrcdspl_; static int outsrc_buf_size_, *outsrccnt_, *outsrcdspl_; static MapSgid2Int* sid2insrc_; // received interprocessor sid data is // associated with which insrc_buf index. Created by nrnmpi_setup_transfer // and used by mk_ttd // ordered by calls to nrnmpi_target_var() static DblPList* targets_; // list of target double* static SgidList* sgid2targets_; // list of target sgid static PPList* target_pntlist_; // list of target Point_process static IntList* target_parray_index_; // to recompute targets_ for cache_efficint // ordered by calls to nrnmpi_source_var() typedef std::vector DblPVec; static NodePList* visources_; // list of source Node*, (multiples possible) static SgidList* sgids_; // source gids static MapSgid2Int* sgid2srcindex_; // sgid2srcindex[sgids[i]] == i typedef std::map > NonVSrcUpdateInfo; static NonVSrcUpdateInfo non_vsrc_update_info_; // source ssid -> (type,parray_index) static int max_targets_; static int target_ptr_update_cnt_ = 0; static int target_ptr_need_update_cnt_ = 0; static bool is_setup_; static void alloclists(); // deleted when setup_transfer called // defined persistently when pargap_jacobi_setup(0) called. static int imped_current_type_count_; static int* imped_current_type_; static Memb_list** imped_current_ml_; static void delete_imped_info() { if (imped_current_type_count_) { imped_current_type_count_ = 0; delete [] imped_current_type_; delete [] imped_current_ml_; } } // pv2node extended to any range variable in the section // This helper searches over all the mechanisms in the node. // If *pv exists, store mechtype and parray_index. static bool non_vsrc_setinfo(sgid_t ssid, Node* nd, double* pv) { for (Prop* p = nd->prop; p; p = p->next) { if (pv >= p->param && pv < (p->param + p->param_size)) { non_vsrc_update_info_[ssid] = std::pair(p->type, pv - p->param); //printf("non_vsrc_setinfo %p %d %ld %s\n", pv, p->type, pv-p->param, memb_func[p->type].sym->name); return true; } } return false; } static double* non_vsrc_update(Node* nd, int type, int ix) { for (Prop* p = nd->prop; p; p = p->next) { if (type == p->type) { return p->param + ix; } } char buf[100]; sprintf(buf, "%d of %s", ix, memb_func[type].sym->name); hoc_execerror("partrans update: could not find parameter index", buf); return NULL; } // Find the Node associated with the voltage. // Easy if v in the currently accessed section. // Extended to any pointer to range variable in the section. // If not a voltage save pv associated with mechtype, p_array_index // in non_vsrc_update_info_ static Node* pv2node(sgid_t ssid, double* pv) { Section* sec = chk_access(); Node* nd = sec->parentnode; if (nd) { if (&NODEV(nd) == pv || non_vsrc_setinfo(ssid, nd, pv)) { return nd; } } for (int i = 0; i < sec->nnode; ++i) { nd = sec->pnode[i]; if (&NODEV(nd) == pv || non_vsrc_setinfo(ssid, nd, pv)) { return nd; } } hoc_execerror("Pointer to v is not in the currently accessed section", 0); return NULL; } void nrnmpi_source_var() { alloclists(); is_setup_ = false; double* psv = hoc_pgetarg(1); // but might not be a voltage sgid_t sgid = (sgid_t)(*getarg(2)); int i; if (sgid2srcindex_->find(sgid, i)) { char tmp[40]; sprintf(tmp, "%lld", (long long)sgid); hoc_execerror("source var gid already in use:", tmp); } (*sgid2srcindex_)[sgid] = visources_->count(); visources_->append(pv2node(sgid, psv)); sgids_->append(sgid); //printf("nrnmpi_source_var %p source_val=%g sgid=%ld\n", psv, *psv, (long)sgid); } static int compute_parray_index(Point_process* pp, double* ptv) { if (!pp) { return -1; } long i = ptv - pp->prop->param; if (i < 0 || i >= pp->prop->param_size) { i = -1; } return int(i); } static double* tar_ptr(Point_process* pp, int index) { return pp->prop->param + index; } static void check_pointers() { //printf("check_pointers\n"); for (int i = 0; i < targets_->count(); ++i) { double* pd = tar_ptr(target_pntlist_->item(i), target_parray_index_->item(i)); assert(targets_->item(i) == pd); } } static void target_ptr_update() { //printf("target_ptr_update\n"); if (targets_) { int n = targets_->count(); DblPList* newtar = new DblPList(n); for (int i=0; i < n; ++i) { double* pd = tar_ptr(target_pntlist_->item(i), target_parray_index_->item(i)); newtar->append(pd); } delete targets_; targets_ = newtar; } mk_ttd(); target_ptr_update_cnt_ = target_ptr_need_update_cnt_; } void nrnmpi_target_var() { Point_process* pp = 0; alloclists(); int iarg = 1; is_setup_ = false; if (hoc_is_object_arg(iarg)) { pp = ob2pntproc(*hoc_objgetarg(iarg++)); } double* ptv = hoc_pgetarg(iarg++); sgid_t sgid = (sgid_t)(*getarg(iarg++)); targets_->append(ptv); target_pntlist_->append(pp); target_parray_index_->append(compute_parray_index(pp, ptv)); sgid2targets_->append(sgid); //printf("nrnmpi_target_var %p target_val=%g sgid=%ld\n", ptv, *ptv, (long)sgid); } void nrn_partrans_update_ptrs() { // These pointer changes require that the targets be range variables // of a point process and the sources be range variables int i, n; if (visources_) { n = visources_->count(); // update the poutsrc that have no extracellular for (i=0; i < outsrc_buf_size_; ++i) { int isrc = poutsrc_indices_[i]; Node* nd = visources_->item(long(isrc)); NonVSrcUpdateInfo::iterator it; it = non_vsrc_update_info_.find(sgids_->item(isrc)); if (it != non_vsrc_update_info_.end()) { poutsrc_[i] = non_vsrc_update(nd, it->second.first, it->second.second); }else if (!nd->extnode) { poutsrc_[i] = &(NODEV(nd)); }else{ // pointers into SourceViBuf updated when // latter is (re-)created } } } // the target vgap pointers also need updating but they will not // change til after this returns ... (verify this) ++target_ptr_need_update_cnt_; } //static FILE* xxxfile; static void rm_ttd() { if (!transfer_thread_data_){ return; } for (int i=0; i < n_transfer_thread_data_; ++ i) { TransferThreadData& ttd = transfer_thread_data_[i]; if (ttd.cnt) { delete [] ttd.tv; delete [] ttd.sv; } } delete [] transfer_thread_data_; transfer_thread_data_ = 0; n_transfer_thread_data_ = 0; nrnthread_v_transfer_ = 0; } static void rm_svibuf() { if (!source_vi_buf_){ return; } for (int i=0; i < n_source_vi_buf_; ++ i) { SourceViBuf& svib = source_vi_buf_[i]; if (svib.cnt) { delete [] svib.nd; delete [] svib.val; } } delete [] source_vi_buf_; source_vi_buf_ = 0; n_source_vi_buf_ = 0; nrnthread_vi_compute_ = 0; } static MapNode2PDbl* mk_svibuf() { rm_svibuf(); if (!visources_ || visources_->count() == 0) { return NULL; } // any use of extracellular? int has_ecell = 0; for (int tid = 0; tid < nrn_nthread; ++tid) { if (nrn_threads[tid]._ecell_memb_list) { has_ecell = 1; break; } } if (!has_ecell) { return NULL; } source_vi_buf_ = new SourceViBuf[nrn_nthread]; n_source_vi_buf_ = nrn_nthread; NonVSrcUpdateInfo::iterator it; for (int tid = 0; tid < nrn_nthread; ++tid) { source_vi_buf_[tid].cnt = 0; } // count for (int i=0; i < visources_->count(); ++i) { Node* nd = visources_->item(i); it = non_vsrc_update_info_.find(sgids_->item(i)); if (nd->extnode && it == non_vsrc_update_info_.end()) { assert(nd->_nt >= nrn_threads && nd->_nt < (nrn_threads + nrn_nthread)); ++source_vi_buf_[nd->_nt->id].cnt; } } // allocate for (int tid=0; tid < nrn_nthread; ++tid) { SourceViBuf& svib = source_vi_buf_[tid]; if (svib.cnt) { svib.nd = new Node*[svib.cnt]; svib.val = new double[svib.cnt]; } svib.cnt = 0; // recount on fill } // fill for (int i=0; i < visources_->count(); ++i) { Node* nd = visources_->item(i); it = non_vsrc_update_info_.find(sgids_->item(i)); if (nd->extnode && it == non_vsrc_update_info_.end()) { int tid = nd->_nt->id; SourceViBuf& svib = source_vi_buf_[tid]; svib.nd[svib.cnt] = nd; ++svib.cnt; } } // now the only problem is how to get TransferThreadData and poutsrc_ // to point to the proper SourceViBuf given that sgid2srcindex // only gives us the Node* and we dont want to search linearly // (during setup) everytime we we want to associate. // We can do the poutsrc_ now by creating a temporary Node* to // double* map .. The TransferThreadData can be done later // in mk_ttd using the same map and then deleted. MapNode2PDbl* ndvi2pd = new MapNode2PDbl(1000); for (int tid=0; tid < nrn_nthread; ++tid) { SourceViBuf& svib = source_vi_buf_[tid]; for (int i = 0; i < svib.cnt; ++i) { Node* nd = svib.nd[i]; (*ndvi2pd)[nd] = svib.val + i; } } for (int i=0; i < outsrc_buf_size_; ++i) { int isrc = poutsrc_indices_[i]; Node* nd = visources_->item(isrc); double* pd = NULL; it = non_vsrc_update_info_.find(sgids_->item(i)); if (nd->extnode && it == non_vsrc_update_info_.end()) { assert(ndvi2pd->find(nd, pd)); poutsrc_[i] = pd; } } nrnthread_vi_compute_ = thread_vi_compute; return ndvi2pd; } static void mk_ttd() { int i, j, k, tid, n; MapNode2PDbl* ndvi2pd = mk_svibuf(); rm_ttd(); if (!targets_ || targets_->count() == 0) { if (ndvi2pd) { delete ndvi2pd; } // some MPI transfer code paths require that all ranks // have a nrn_thread_v_transfer. // As mentioned in http://static.msi.umn.edu/tutorial/scicomp/general/MPI/content3_new.html // "Communications may, or may not, be synchronized, // depending on how the vendor chose to implement them." // In particular the BG/Q (and one other machine) is sychronizing. // (but see: http://www-01.ibm.com/support/docview.wss?uid=isg1IZ58190 ) if (nrnmpi_numprocs > 1 && max_targets_) { nrnthread_v_transfer_ = thread_transfer; } return; } n = targets_->count(); if (nrn_nthread > 1) for (i=0; i < n; ++i) { Point_process* pp = target_pntlist_->item(i); int sgid = sgid2targets_->item(i); if (!pp) { fprintf(stderr, "Do not know the POINT_PROCESS target for source id %lld\n", (long long)sgid); hoc_execerror("For multiple threads, the target pointer must reference a range variable of a POINT_PROCESS.", "Note that it is fastest to supply a reference to the POINT_PROCESS as the first arg."); } } transfer_thread_data_ = new TransferThreadData[nrn_nthread]; for (tid = 0; tid < nrn_nthread; ++tid) { transfer_thread_data_[tid].cnt = 0; } n_transfer_thread_data_ = nrn_nthread; // how many targets in each thread if (nrn_nthread == 1) { transfer_thread_data_[0].cnt = target_pntlist_->count(); }else{ for (i=0; i < n; ++i) { assert(target_pntlist_->item(i)); tid = ((NrnThread*)target_pntlist_->item(i)->_vnt)->id; ++transfer_thread_data_[tid].cnt; } } // allocate for (tid = 0; tid < nrn_nthread; ++tid) { TransferThreadData& ttd = transfer_thread_data_[tid]; if (ttd.cnt) { ttd.tv = new double*[ttd.cnt]; ttd.sv = new double*[ttd.cnt]; } ttd.cnt = 0; } // count again and fill pointers for (i=0; i < n; ++i) { if (nrn_nthread == 1) { tid = 0; }else{ tid = ((NrnThread*)target_pntlist_->item(i)->_vnt)->id; } TransferThreadData& ttd = transfer_thread_data_[tid]; j = ttd.cnt++; ttd.tv[j] = targets_->item(i); // perhaps inter- or intra-thread, perhaps interprocessor // if inter- or intra-thread, perhaps SourceViBuf sgid_t sid = sgid2targets_->item(i); if (sgid2srcindex_->find(sid, k)) { Node* nd = visources_->item(k); NonVSrcUpdateInfo::iterator it; it = non_vsrc_update_info_.find(sid); if (it != non_vsrc_update_info_.end()) { ttd.sv[j] = non_vsrc_update(nd, it->second.first, it->second.second); }else if (nd->extnode) { double* pd; assert(ndvi2pd->find(nd, pd)); ttd.sv[j] = pd; }else{ ttd.sv[j] = &(NODEV(nd)); } }else if (sid2insrc_ && sid2insrc_->find(sid, k)) { ttd.sv[j] = insrc_buf_ + k; }else{ fprintf(stderr, "No source_var for target_var sid = %lld\n", (long long)sid); assert(0); } } if (ndvi2pd) { delete ndvi2pd; } nrnthread_v_transfer_ = thread_transfer; } void thread_vi_compute(NrnThread* _nt) { // vi+vext needed by either mpi or thread transfer copied into // the source value buffer for this thread. Note that relevant // poutsrc_ and ttd[_nt->id].sv items // point into this source value buffer if (!source_vi_buf_) { return; } SourceViBuf& svb = source_vi_buf_[_nt->id]; for (int i = 0; i < svb.cnt; ++i) { Node* nd = svb.nd[i]; assert(nd->extnode); svb.val[i] = NODEV(nd) + nd->extnode->v[0]; } } void mpi_transfer() { int i, n = outsrc_buf_size_; for (i=0; i < n; ++i) { outsrc_buf_[i] = *poutsrc_[i]; } #if PARANEURON if (nrnmpi_numprocs > 1) { double wt = nrnmpi_wtime(); nrnmpi_dbl_alltoallv(outsrc_buf_, outsrccnt_, outsrcdspl_, insrc_buf_, insrccnt_, insrcdspl_); nrnmpi_transfer_wait_ += nrnmpi_wtime() - wt; errno = 0; } #endif // insrc_buf_ will get transferred to targets by thread_transfer } void thread_transfer(NrnThread* _nt) { if (!is_setup_) { hoc_execerror("ParallelContext.setup_transfer()", "needs to be called."); } if (!targets_ || targets_->count() == 0) { return; } // fprintf(xxxfile, "%g\n", t); // an edited old comment prior to allowing simultaneous threads and mpi. // for threads we do direct transfers under the assumption // that v is being transferred and they were set in a // previous multithread job. For the fixed step method this // call is from nonvint which in the same thread job as update // and that is the case even with multisplit. So we really // need to break the job between update and nonvint. Too bad. // For global cvode, things are ok except if the source voltage // is at a zero area node since nocap_v_part2 is a part // of this job and in fact the v does not get updated til // the next job in nocap_v_part3. Again, too bad. But it is // quite ambiguous, stability wise, // to have a gap junction in a zero area node, anyway, since // the system is then truly a DAE. // For now we presume we have dealt with these matters and // do the transfer. assert(n_transfer_thread_data_ == nrn_nthread); if (target_ptr_need_update_cnt_ > target_ptr_update_cnt_) { target_ptr_update(); } TransferThreadData& ttd = transfer_thread_data_[_nt->id]; for (int i = 0; i < ttd.cnt; ++i) { *(ttd.tv[i]) = *(ttd.sv[i]); } } // The simplest conceivable transfer is to use MPI_Allgatherv and send // all sources to all machines. More complicated and possibly more efficient // in terms of total received buffer size // would be to use MPI_Alltoallv in which distinct data is sent and received. // Most transfer are one to one, at most one to a few, so now we use alltoallv. // The old comment read: " // We begin with MPI_Allgatherv. We try // to save a trivial copy by making // outgoing_source_buf a pointer into the incoming_source_buf. // " But this was a mistake as many mpi implementations do not allow overlap // of send and receive buffers. // 22-08-2014 For setup of the All2allv pattern, use the rendezvous rank // idiom. #define HAVEWANT_t sgid_t #define HAVEWANT_alltoallv sgid_alltoallv #define HAVEWANT2Int MapSgid2Int #if PARANEURON #include "have2want.cpp" #endif void nrnmpi_setup_transfer() { #if !PARANEURON if (nrnmpi_numprocs > 1) { hoc_execerror("To use ParallelContext.setup_transfer when nhost > 1, NEURON must be configured with --with-paranrn", 0); } #endif int nhost = nrnmpi_numprocs; // char ctmp[100]; // sprintf(ctmp, "vartrans%d", nrnmpi_myid); // xxxfile = fopen(ctmp, "w"); alloclists(); is_setup_ = true; // printf("nrnmpi_setup_transfer\n"); delete_imped_info(); if (insrc_buf_) { delete [] insrc_buf_; insrc_buf_ = 0; } if (outsrc_buf_) { delete [] outsrc_buf_; outsrc_buf_ = 0; } if (sid2insrc_) { delete sid2insrc_; sid2insrc_ = 0; } if (poutsrc_) { delete [] poutsrc_ ; poutsrc_ = 0; } if (poutsrc_indices_) { delete [] poutsrc_indices_ ; poutsrc_indices_ = 0; } #if PARANEURON // if there are no targets anywhere, we do not need to do anything max_targets_ = nrnmpi_int_allmax(targets_->count()); if (max_targets_ == 0) { return; } if (nrnmpi_numprocs > 1) { if (!insrccnt_) { insrccnt_ = new int[nrnmpi_numprocs]; insrcdspl_ = new int[nrnmpi_numprocs+1]; outsrccnt_ = new int[nrnmpi_numprocs]; outsrcdspl_ = new int[nrnmpi_numprocs+1]; } // This is an old comment prior to using the want_to_have rendezvous // rank function in want2have.cpp. The old method did not scale // to more sgids than could fit on a single rank, because // each rank sent its "need" list to every rank. // // This machine needs to send which sources to which other machines. // It does not need to send to itself. // Which targets have sources on other machines.(none if nrnmpi_numprocs=1) // 1) list sources needed that are on other machines. // 2) send that info to all machines. // 3) source machine can figure out which machines want its sids // and therefore construct outsrc_buf, etc. // 4) Notify target machines which sids the source machine will send // 5) The target machines can figure out where the sids are coming from // and therefore construct insrc_buf, etc. // // 1) List sources needed by this rank and sources that this rank owns. // 2) Call the have_to_want function. Returns two sets of three // vectors. The first set of three vectors is a an sgid buffer, // along with counts and displacements. The sgids in the ith region // of the buffer are the sgids from this rank that are // wanted by the ith rank. For the second set, the sgids in the ith // region are the sgids on the ith rank that are wanted by this rank. // 3) First return triple creates the proper outsrc_buf_. // 4) The second triple is creates the insrc_buf_. // 1) // It will often be the case that multiple targets will need the // same source. We count the needed sids only once regardless of // how often they are used. // At the end of this section, needsrc is an array of needsrc_cnt // sids needed by this machine. The 'seen' table values are unused // but the keys are all the (unique) sgid needed by this process. int needsrc_cnt = 0; MapSgid2Int* seen = new MapSgid2Int(targets_->count());//for single counting int szalloc = targets_->count(); szalloc = szalloc ? szalloc : 1; sgid_t* needsrc = new sgid_t[szalloc]; // more than we need for (int i = 0; i < sgid2targets_->count(); ++i) { sgid_t sid = sgid2targets_->item(i); // only need it if not a source on this machine int srcindex; // Note that although old comment possibly mention that we do not transfer // intraprocessor sids, it is actually a good idea to do so in order to // produce a reasonable error message about using the same sid for multiple // source variables. Hence the following statement is commented out. // if (!sgid2srcindex_->find(sid, srcindex)) { if (!seen->find(sid, srcindex)) { (*seen)[sid] = srcindex; needsrc[needsrc_cnt++] = sid; } // } } #if 0 for (int i=0; i < needsrc_cnt; ++i) { printf("%d step 1 need %d\n", nrnmpi_myid, needsrc[i]); } #endif // 1 continued) Create an array of sources this rank owns. // This already exists as a vector in the SgidList* sgids_ but // that is private so go ahead and copy. sgid_t* ownsrc = new sgid_t[sgids_->count() + 1]; // not 0 length if count is 0 for (int i=0; i < sgids_->count(); ++i) { ownsrc[i] = sgids_->item(i); } // 2) Call the have_to_want function. sgid_t* send_to_want; int *send_to_want_cnt, *send_to_want_displ; sgid_t* recv_from_have; int *recv_from_have_cnt, *recv_from_have_displ; have_to_want(ownsrc, sgids_->count(), needsrc, needsrc_cnt, send_to_want, send_to_want_cnt, send_to_want_displ, recv_from_have, recv_from_have_cnt, recv_from_have_displ, default_rendezvous); // sanity check. all the sgids we are asked to send, we actually have int n = send_to_want_displ[nhost]; #if 0 // done in passing in step 3 below for (int i=0; i < n; ++i) { sgid_t sgid = send_to_want[i]; int x; assert(sgid2srcindex_->find(sgid, x)); } #endif // sanity check. all the sgids we receive, we actually need. // also set the seen value to the proper recv_from_have index. // i.e it is the sid2insrc_ in step 4. n = recv_from_have_displ[nhost]; for (int i=0; i < n; ++i) { sgid_t sgid = recv_from_have[i]; int x; assert(seen->find(sgid, x)); (*seen)[sgid] = i; } // clean up a little delete [] ownsrc; delete [] needsrc; delete [] recv_from_have; // 3) First return triple creates the proper outsrc_buf_. // Now that we know what machines are interested in our sids... // construct outsrc_buf, outsrc_buf_size, outsrccnt_, outsrcdspl_ // and poutsrc_; outsrccnt_ = send_to_want_cnt; outsrcdspl_ = send_to_want_displ; outsrc_buf_size_ = outsrcdspl_[nrnmpi_numprocs]; szalloc = outsrc_buf_size_ ? outsrc_buf_size_ : 1; outsrc_buf_ = new double[szalloc]; poutsrc_ = new double*[szalloc]; poutsrc_indices_ = new int[szalloc]; for (int i=0; i < outsrc_buf_size_; ++i) { sgid_t sid = send_to_want[i]; int srcindex; assert(sgid2srcindex_->find(sid, srcindex)); Node* nd = visources_->item(long(srcindex)); NonVSrcUpdateInfo::iterator it; it = non_vsrc_update_info_.find(sid); if (it != non_vsrc_update_info_.end()) { poutsrc_[i] = non_vsrc_update(nd, it->second.first, it->second.second); }else if (!nd->extnode) { poutsrc_[i] = &(NODEV(nd)); }else{ // the v+vext case can only be done after mk_svib() } poutsrc_indices_[i] = srcindex; outsrc_buf_[i] = double(sid); // see step 5 } delete [] send_to_want; // 4) The second triple is creates the insrc_buf_. // From the recv_from_have and seen table, construct the insrc... insrccnt_ = recv_from_have_cnt; insrcdspl_ = recv_from_have_displ; insrc_buf_size_ = insrcdspl_[nrnmpi_numprocs]; szalloc = insrc_buf_size_ ? insrc_buf_size_ : 1; insrc_buf_ = new double[szalloc]; // map sid to insrc_buf_ indices. // mk_ttd can then construct the right pointer to the source. sid2insrc_ = seen; // since seen was constructed and then modified // way above this. Might be better to reconstruct here. nrnmpi_v_transfer_ = mpi_transfer; } #endif //PARANEURON nrn_mk_transfer_thread_data_ = mk_ttd; if (!v_structure_change) { mk_ttd(); } } void alloclists() { if (!targets_) { targets_ = new DblPList(100); target_pntlist_ = new PPList(100); target_parray_index_ = new IntList(100); sgid2targets_ = new SgidList(100); visources_ = new NodePList(100); sgids_ = new SgidList(100); sgid2srcindex_ = new MapSgid2Int(256); } } void nrn_partrans_clear() { if (!targets_) { return; } nrnthread_v_transfer_ = 0; nrnthread_vi_compute_ = 0; nrnmpi_v_transfer_ = 0; delete sgid2srcindex_; delete sgids_; delete visources_; delete sgid2targets_; delete targets_; delete target_pntlist_; delete target_parray_index_; targets_ = 0; max_targets_ = 0; rm_svibuf(); rm_ttd(); if (insrc_buf_) { delete [] insrc_buf_; insrc_buf_ = 0; } if (outsrc_buf_) { delete [] outsrc_buf_; outsrc_buf_ = 0; } if (sid2insrc_) { delete sid2insrc_; sid2insrc_ = 0; } if (poutsrc_) { delete [] poutsrc_ ; poutsrc_ = 0; } if (poutsrc_indices_) { delete [] poutsrc_indices_ ; poutsrc_indices_ = 0; } non_vsrc_update_info_.clear(); nrn_mk_transfer_thread_data_ = 0; } // assume one thread and no extracellular static double *vgap1, *vgap2; static int imped_change_cnt; void pargap_jacobi_setup(int mode) { if (!nrnthread_v_transfer_) { return; } // list of gap junction types and memb_list for each if (mode == 0) { if (imped_change_cnt != structure_change_cnt) { delete_imped_info(); imped_change_cnt = structure_change_cnt; } if (imped_current_type_count_ == 0 && targets_ && targets_->count() > 0) { for (int i=0; i < targets_->count(); ++i) { Point_process* pp = target_pntlist_->item(i); if (!pp) { hoc_execerror("For impedance, pc.target_var requires that its first arg be a reference to the POINT_PROCESS", 0); } int type = pp->prop->type; if (imped_current_type_count_ == 0) { imped_current_type_count_ = 1; imped_current_type_ = new int[5]; imped_current_ml_ = new Memb_list*[5]; imped_current_type_[0] = type; } int add = 1; for (int k=0; k < imped_current_type_count_; ++k) { if (type == imped_current_type_[k]) { add = 0; break; } } if (add) { assert(imped_current_type_count_ < 5); imped_current_type_[imped_current_type_count_] = type; imped_current_type_count_ += 1; } } NrnThread* nt = nrn_threads; for (int k=0; k < imped_current_type_count_; ++k) { for (NrnThreadMembList* tml = nt->tml; tml; tml = tml->next) { if (imped_current_type_[k] == tml->index) { imped_current_ml_[k] = tml->ml; } } } // are all the instances in use int ninst = 0; for (int k=0; k < imped_current_type_count_; ++k) { ninst += imped_current_ml_[k]->nodecount; } if (ninst != targets_->count()) { char buf[100]; sprintf(buf, "that is %d != %ld", ninst, targets_->count()); hoc_execerror("number of gap junctions not equal to number of pc.transfer_var", buf); } } } TransferThreadData* ttd = transfer_thread_data_; if (mode == 0) { // setup if (visources_->count()) {vgap1 = new double[visources_->count()];} if (ttd && ttd->cnt) {vgap2 = new double[ttd->cnt];} for (int i=0; i < visources_->count(); ++i) { vgap1[i] = NODEV(visources_->item(i)); } if (ttd) for (int i=0; i < ttd->cnt; ++i) { vgap2[i] = *(ttd->tv[i]); } }else{ // tear down for (int i=0; i < visources_->count(); ++i) { NODEV(visources_->item(i)) = vgap1[i]; } if (ttd) for (int i=0; i < ttd->cnt; ++i) { *(ttd->tv[i]) = vgap2[i]; } if (vgap1) { delete [] vgap1; vgap1 = NULL; } if (vgap2) { delete [] vgap2; vgap2 = NULL; } } } void pargap_jacobi_rhs(double* b, double* x) { // helper for complex impedance with parallel gap junctions // b = b - R*x R are the off diagonal gap elements of the jacobian. // we presume 1 thread. First nrn_thread[0].end equations are in node order. if (!nrnthread_v_transfer_) { return; } NrnThread* _nt = nrn_threads; // transfer gap node voltages to gap vpre for (int i=0; i < visources_->count(); ++i) { Node* nd = visources_->item(i); NODEV(nd) = x[nd->v_node_index]; } mpi_transfer(); thread_transfer(_nt); // set gap node voltages to 0 so we can use nrn_cur to set rhs for (int i=0; i < visources_->count(); ++i) { Node* nd = visources_->item(i); NODEV(nd) = 0.0; NODERHS(nd) = 0.0; } for (int k=0; k < imped_current_type_count_; ++k) { int type = imped_current_type_[k]; Memb_list* ml = imped_current_ml_[k]; (*memb_func[type].current)(_nt, ml, type); } // possibly many gap junctions in same node (and possible even different // types) but rhs is the accumulation of all those instances at each node // so ... The only thing that can go wrong is if there are intances of // gap junctions that are not being used (not in the target list). for (int i=0; i < _nt->end; ++i) { b[i] += VEC_RHS(i); } } extern "C" { extern size_t nrnbbcore_gap_write(const char* path, int* group_ids); } /* file format for /_gap.dat All gap info for thread. No file if ntar == 0 ntar // number of targets in this thread (vpre) nsrc // number of sources in this thread (v) type // gap mechanism ix_vpre // range variable index relative to beginning of instance sid_target // ntar = memb_list[type].nodecount of these lines //there are no indices for target vpre since sorted in memb_list order. sid_src // nsrc of these (sorted in increasing order of index) // nsrc of these Assert all gaps have the same type. Assert ntar = memb_list[type].nodecount. Assert no extracellular. */ struct BBCoreGapInfo { int nsrc, ntar; int* sid_src; int* v_index; int* sid_target; int* vpre_index; }; static void sidsort(int* sids, int cnt, int* indices); size_t nrnbbcore_gap_write(const char* path, int* group_ids) { if (non_vsrc_update_info_.size() > 0) { hoc_execerror("Non Voltage transfer sources not supported in CoreNEURON", NULL); } // if there are no targets, then there are no sources if (!targets_ || !targets_->count()) { assert(sgids_->count() == 0); return 0; } // type assert(target_pntlist_ && target_pntlist_->count() == targets_->count()); int type = target_pntlist_->item(0)->prop->type; // all the same type for (int i=0; i < targets_->count(); ++i) { assert(type == target_pntlist_->item(i)->prop->type); } int ix_vpre = target_parray_index_->item(0); // memb_lists of the threads. Memb_list** gap_ml = new Memb_list*[nrn_nthread]; for (int tid=0; tid < nrn_nthread; ++tid) { NrnThread& nt = nrn_threads[tid]; for (NrnThreadMembList* tml = nt.tml; tml; tml = tml->next) { if (tml->index == type) { gap_ml[tid] = tml->ml; } } } // space for the info BBCoreGapInfo* gi = new BBCoreGapInfo[nrn_nthread]; for (int tid = 0; tid < nrn_nthread; ++tid) { BBCoreGapInfo& g = gi[tid]; int n = transfer_thread_data_[tid].cnt; g.sid_src = new int[n]; // but perhaps fewer sources than targets g.v_index = new int[n]; // fewer sources than targets g.sid_target = new int[n]; g.vpre_index = new int[n]; g.ntar = 0; // will end up as gap_ml[tid].nodecount g.nsrc = 0; // will end up as number of distinct gap_ml[tid].nodeindices } // gap info for targets, segregate into threads for (int i=0; i < targets_->count(); ++i) { int sid = sgid2targets_->item(i); NrnThread* nt = (NrnThread*)target_pntlist_->item(i)->_vnt; int tid = nt ? nt->id : 0; Memb_list* ml = gap_ml[tid]; int ix = targets_->item(i) - ml->data[0]; BBCoreGapInfo& g = gi[tid]; g.sid_target[g.ntar] = sid; g.vpre_index[g.ntar] = ix; g.ntar += 1; } // gap info for sources, segregate into threads. for (int i=0; i < sgids_->count(); ++i) { int sid = sgids_->item(i); Node* nd = visources_->item(i); assert(nd->extnode == NULL); int tid = nd->_nt ? nd->_nt->id : 0; int ix = nd->_v - nrn_threads[tid]._actual_v; assert(ix >= 0 && ix < nrn_threads[tid].end); BBCoreGapInfo& g = gi[tid]; g.sid_src[g.nsrc] = sid; g.v_index[g.nsrc] = ix; g.nsrc += 1; } // Sort each threads sources and targets so that the indices are // monotonically increasing. (In fact the target indices will then be // in memb_list order and that array will not have to be transferred.) for (int tid=0; tid < nrn_nthread; ++tid) { BBCoreGapInfo& g = gi[tid]; sidsort(g.sid_src, g.nsrc, g.v_index); sidsort(g.sid_target, g.ntar, g.vpre_index); } // print the files for (int tid = 0; tid < nrn_nthread; ++tid) { BBCoreGapInfo& g = gi[tid]; if (g.ntar == 0) { continue; } assert(g.nsrc > 0); char fname[1000]; sprintf(fname, "%s/%d_gap.dat", path, group_ids[tid]); FILE* f = fopen(fname, "wb"); assert(f); fprintf(f, "%s\n", bbcore_write_version); fprintf(f, "%d ntar\n", g.ntar); fprintf(f, "%d nsrc\n", g.nsrc); fprintf(f, "%d %s\n", type, memb_func[type].sym->name); fprintf(f, "%d ix_vpre\n", ix_vpre); // range variable offset from instance int chkpnt = 0; #define CHKPNT fprintf(f, "chkpnt %d\n", chkpnt++); CHKPNT fwrite(g.sid_target, g.ntar, sizeof(int), f); CHKPNT fwrite(g.sid_src, g.nsrc, sizeof(int), f); CHKPNT fwrite(g.v_index, g.nsrc, sizeof(int), f); fclose(f); } // cleanup for (int tid=0; tid < nrn_nthread; ++tid) { BBCoreGapInfo& g = gi[tid]; delete [] g.sid_src; delete [] g.sid_target; delete [] g.v_index; delete [] g.vpre_index; } delete [] gi; delete [] gap_ml; return 0; } static bool mycompar(const std::pair& a, const std::pair& b) { return a.second < b.second; } static void sidsort(int* sids, int cnt, int* indices) { std:vector< pair< int, int> > si(cnt); // sids,indices for (int i=0; i < cnt; ++i) { si[i].first = sids[i]; si[i].second = indices[i]; } std::sort(si.begin(), si.end(), mycompar); // copy back for (int i=0; i < cnt; ++i) { sids[i] = si[i].first; indices[i] = si[i].second; } // check that the sort is correct for (int i=1; i < cnt; ++i) { assert(indices[i-1] <= indices[i]); } } neuron-7.5/src/nrniv/ppshape.cpp000066400000000000000000000040251323325274500167710ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "oclist.h" #include "nrnoc2iv.h" #include "classreg.h" #if HAVE_IV #include "ppshape.h" #endif //HAVE_IV // ppshape registration static double pp_append(void* v) { #if HAVE_IV IFGUI Object* ob = *hoc_objgetarg(1); ((PPShape*)v)->pp_append(ob); ENDGUI #endif return 1.; } static Member_func pp_members[] = { // "view", pp_view, "append", pp_append, 0, 0 }; static void* pp_cons(Object* ho) { #if HAVE_IV IFGUI Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "List"); PPShape* p = new PPShape((OcList*)ob->u.this_pointer); p->ref(); p->view(200); p->hoc_obj_ptr(ho); return (void*)p; ENDGUI #endif return 0; } static void pp_destruct(void* v) { #if HAVE_IV IFGUI Resource::unref((PPShape*)v); ENDGUI #endif } void PPShape_reg() { // printf("PPShape_reg\n"); class2oc("PPShape", pp_cons, pp_destruct, pp_members, NULL, NULL, NULL); } #if HAVE_IV // to end of file /* static */ class PPShapeImpl { public: OcList* ocl_; }; PPShape::PPShape(OcList* ocl) : ShapeScene(NULL) { si_ = new PPShapeImpl; si_->ocl_ = ocl; Resource::ref(si_->ocl_); long i, cnt = ocl->count(); for (i=0; i < cnt; ++i) { install(si_->ocl_->object(i)); } } PPShape::~PPShape() { Resource::unref(si_->ocl_); delete si_; } void PPShape::pp_append(Object* ob) { if (!is_point_process(ob)) { hoc_execerror(hoc_object_name(ob), "not a point process"); } if (si_->ocl_->index(ob) != -1) { return; } si_->ocl_->append(ob); install(ob); } void PPShape::install(Object* ob) { append_fixed(new PointProcessGlyph(ob)); } void PPShape::pp_remove(PointProcessGlyph* ppg) { long i = si_->ocl_->index(ppg->object()); if (i == -1) { return; } si_->ocl_->remove(i); remove(glyph_index(ppg)); } void PPShape::pp_move(PointProcessGlyph*) { } void PPShape::examine(PointProcessGlyph*) { } PointProcessGlyph::PointProcessGlyph(Object* ob) : GLabel("x", colors->color(2), true, 12, .5, .5) { ob_ = ob; ++ob->refcount; } PointProcessGlyph::~PointProcessGlyph() { hoc_dec_refcount(&ob_); } #endif neuron-7.5/src/nrniv/ppshape.h000077500000000000000000000012341323325274500164400ustar00rootroot00000000000000#ifndef ppshape_h #define ppshape_h // shape class for viewing point processes #include "shape.h" #include "graph.h" class PPShapeImpl; class OcList; struct Object; class PointProcessGlyph : public GLabel { public: PointProcessGlyph(Object*); virtual ~PointProcessGlyph(); virtual Object* object() { return ob_;} private: Object* ob_; }; class PPShape : public ShapeScene { public: PPShape(OcList*); virtual ~PPShape(); virtual void pp_append(Object*); virtual void install(Object*); virtual void pp_remove(PointProcessGlyph*); virtual void pp_move(PointProcessGlyph*); virtual void examine(PointProcessGlyph*); private: PPShapeImpl* si_; }; #endif neuron-7.5/src/nrniv/prcellstate.cpp000066400000000000000000000142101323325274500176500ustar00rootroot00000000000000#include "../../nrnconf.h" #include "section.h" #include "membfunc.h" #include "nrniv_mf.h" #include "netcon.h" #include "OS/table.h" #include "OS/list.h" #define precision 15 extern "C" { void nrn_prcellstate(int gid, const char* filesuffix); } declarePtrList(NetConList, NetCon) // NetCons in same order as Point_process implementPtrList(NetConList, NetCon) // and there may be several per pp. declareTable(PV2I, void*, int) implementTable(PV2I, void*, int) static PV2I* pnt2index; // for deciding if NetCon is to be printed static int pntindex; // running count of printed point processes. extern "C" { #include "neuron.h" } static void pr_memb(int type, Memb_list* ml, int* cellnodes, NrnThread& nt, FILE* f) { int header_printed = 0; int size = nrn_prop_param_size_[type]; int psize = nrn_prop_dparam_size_[type]; int receives_events = pnt_receive[type] ? 1 : 0; for (int i = 0; i < ml->nodecount; ++i) { int inode = ml->nodeindices[i]; if (cellnodes[inode] >= 0) { if (!header_printed) { header_printed = 1; fprintf(f, "type=%d %s size=%d\n", type, memb_func[type].sym->name, size); } if (receives_events) { fprintf(f, "%d nri %d\n", cellnodes[inode], pntindex); Point_process* pp = (Point_process*)ml->pdata[i][1]._pvoid; pnt2index->insert(pp, pntindex); ++pntindex; } for (int j=0; j < size; ++j) { fprintf(f, " %d %d %.*g\n", cellnodes[inode], j, precision, ml->data[i][j]); } } } } static void pr_netcon(NrnThread& nt, FILE* f) { if (pntindex == 0) { return; } // pnt2index table has been filled // List of NetCon for each of the NET_RECEIVE point process instances // ... all NetCon list in the hoc NetCon cTemplate NetConList** nclist = new NetConList*[pntindex]; for (int i=0; i < pntindex; ++i) { nclist[i] = new NetConList(1); } int nc_cnt = 0; Symbol* ncsym = hoc_lookup("NetCon"); hoc_Item* q; ITERATE (q, ncsym->u.ctemplate->olist) { Object* obj = OBJ(q); NetCon* nc = (NetCon*)obj->u.this_pointer; Point_process* pp = nc->target_; int index; if (pnt2index->find(index, pp)) { nclist[index]->append(nc); ++nc_cnt; } } fprintf(f, "netcons %d\n", nc_cnt); fprintf(f, " pntindex srcgid active delay weights\n"); for (int i=0; i < pntindex; ++i) { for (int j=0; j < nclist[i]->count(); ++j) { NetCon* nc = nclist[i]->item(j); int srcgid = -3; srcgid = (nc->src_) ? nc->src_->gid_ : -3; if (srcgid < 0 && nc->src_ && nc->src_->osrc_) { const char* name = nc->src_->osrc_->ctemplate->sym->name; fprintf(f, "%d %s %d %.*g", i, name, nc->active_?1:0, precision, nc->delay_); }else if (srcgid < 0 && nc->src_ && nc->src_->ssrc_) { fprintf(f, "%d %s %d %.*g", i, "v", nc->active_?1:0, precision, nc->delay_); }else{ fprintf(f, "%d %d %d %.*g", i, srcgid, nc->active_?1:0, precision, nc->delay_); } int wcnt = pnt_receive_size[nc->target_->prop->type]; for (int k=0; k < wcnt; ++k) { fprintf(f, " %.*g", precision, nc->weight_[k]); } fprintf(f, "\n"); } } // cleanup for (int i=0; i < pntindex; ++i) { delete nclist[i]; } delete [] nclist; } static void pr_realcell(PreSyn& ps, NrnThread& nt, FILE* f) { //for associating NetCons with Point_process identifiers pnt2index = new PV2I(1000); pntindex = 0; // threshold variable is a voltage printf("thvar=%p actual_v=%p end=%p\n", ps.thvar_, nt._actual_v, nt._actual_v + nt.end); int inode = -1; if (ps.thvar_ < nt._actual_v || ps.thvar_ >= (nt._actual_v + nt.end)) { if (ps.ssrc_) { /* not cache efficient, search the nodes in this section */ printf("%s\n", ps.ssrc_?secname(ps.ssrc_):"unknown"); for (int i=0; i < ps.ssrc_->nnode; ++i) { Node* nd = ps.ssrc_->pnode[i]; if (ps.thvar_ == nd->_v) { inode = nd->v_node_index; break; } } if (inode < 0) { /* check parent node */ Node* nd = ps.ssrc_->parentnode; if (ps.thvar_ == nd->_v) { inode = nd->v_node_index; } } } if (inode < 0) { hoc_execerror("gid not associated with a voltage", 0); } }else{ inode = ps.thvar_ - nt._actual_v; } // and the root node is ... int rnode = inode; while (rnode >= nt.ncell) { rnode = nt._v_parent_index[rnode]; } // count the number of nodes in the cell // do not assume all cell nodes except the root are contiguous int* cellnodes = new int[nt.end]; for (int i=0; i < nt.end; ++i) { cellnodes[i] = -1; } int cnt = 0; cellnodes[rnode] = cnt++; for (int i=nt.ncell; i < nt.end; ++i) { if (cellnodes[nt._v_parent_index[i]] >= 0) { cellnodes[i] = cnt++; } } fprintf(f, "%d nodes %d is the threshold node\n", cnt, cellnodes[inode]-1); fprintf(f, " threshold %.*g\n", precision, ps.threshold_); fprintf(f, "inode parent area a b\n"); for (int i=0; i < nt.end; ++i) if (cellnodes[i] >= 0) { Node* nd = nt._v_node[i]; //if not cach_efficient then _actual_area=NULL fprintf(f, "%d %d %.*g %.*g %.*g\n", cellnodes[i], cellnodes[nt._v_parent_index[i]], precision, NODEAREA(nd), precision, nt._actual_a[i], precision, nt._actual_b[i]); } fprintf(f, "inode v\n"); for (int i=0; i < nt.end; ++i) if (cellnodes[i] >= 0) { Node* nd = nt._v_node[i]; //if not cach_efficient then _actual_v=NULL fprintf(f, "%d %.*g\n", cellnodes[i], precision, NODEV(nd)); } // each mechanism for (NrnThreadMembList* tml = nt.tml; tml; tml = tml->next) { pr_memb(tml->index, tml->ml, cellnodes, nt, f); } // the NetCon info (uses pnt2index) pr_netcon(nt, f); delete [] cellnodes; delete pnt2index; } void nrn_prcellstate(int gid, const char* suffix) { PreSyn* ps = nrn_gid2outputpresyn(gid); if (!ps) { return; } // found it so create a _.nrn file char buf[200]; sprintf(buf, "%d_%s.nrndat", gid, suffix); FILE* f = fopen(buf, "w"); assert(f); NrnThread& nt = *ps->nt_; fprintf(f, "gid = %d\n", gid); fprintf(f, "t = %.*g\n", precision, nt._t); fprintf(f, "celsius = %.*g\n", precision, celsius); if (ps->thvar_) { pr_realcell(*ps, nt, f); } fclose(f); } neuron-7.5/src/nrniv/rot3band.h000066400000000000000000000020061323325274500165070ustar00rootroot00000000000000#ifndef rot3band_h #define rot3band_h /* 3-D rubberband On the button press a globe appears centered at the mouse location Dragging the mouse causes the globe to rotate as though the mouse was always at the same location on the globe. If the mouse is dragged off the globe, the mouse is treated as though it is on the edge. The mouse is always treated as though it is on the front hemisphere. Well, maybe someday. Can type x, y, z to get immediate rotations in which axes are out of screen. Multiple invocations of the Rotate3Band accumulate rotations. */ #include "rubband.h" #include "rotate3d.h" class Rotate3Band : public Rubberband { public: Rotate3Band(Rotation3d* = NULL, RubberAction* = NULL, Canvas* = NULL); virtual ~Rotate3Band(); virtual void press(Event&); virtual void drag(Event&); virtual void draw(Coord, Coord); virtual bool event(Event&); // looks for x, y, z press Rotation3d* rotation(); virtual void help(); private: Rotation3d* rot_; float x_old_, y_old_; }; #endif neuron-7.5/src/nrniv/rotate3d.cpp000066400000000000000000000141661323325274500170650ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_IV // to end of file #include #include #include #include #include #include "rot3band.h" #include #include "nrnoc2iv.h" #include "shape.h" #include "ivoc.h" #define Rotate_ "Rotate3D PlotShape" Rotation3d::Rotation3d() { identity(); int i, j; for (i=0; i < 2; ++i) for (j=0; j < 3; ++j) o_[i][j] = 0.; } Rotation3d::~Rotation3d() {} void Rotation3d::identity(){ int i, j; for (i=0; i < 3; ++i) { for (j=0; j < 3; ++j) { a_[i][j] = 0.; } a_[i][i] = 1.; } } void Rotation3d::rotate_x(float radian){ Rotation3d m; m.a_[1][1] = m.a_[2][2] = cos(radian); m.a_[2][1] = - (m.a_[1][2] = sin(radian)); post_multiply(m); } void Rotation3d::rotate_y(float radian){ Rotation3d m; m.a_[2][2] = m.a_[0][0] = cos(radian); m.a_[2][0] = - (m.a_[0][2] = sin(radian)); post_multiply(m); } void Rotation3d::rotate_z(float radian){ Rotation3d m; m.a_[0][0] = m.a_[1][1] = cos(radian); m.a_[1][0] = - (m.a_[0][1] = sin(radian)); post_multiply(m); } void Rotation3d::post_multiply(Rotation3d& m) { // r = m*r float x[3][3]; int i, j, k; for (i=0; i < 3; ++i) { for (j=0; j < 3; ++j) { x[i][j] = 0; for (k=0; k < 3; ++k) { x[i][j] += m.a_[i][k]*a_[k][j]; } } } for (i=0; i < 3; ++i) { for (j=0; j < 3; ++j) { a_[i][j] = x[i][j]; } } } void Rotation3d::rotate(float x, float y, float z, float* tr) const { float r[3]; r[0] = x; r[1] = y; r[2] = z; rotate(r, tr); } void Rotation3d::rotate(float* r, float* tr) const { int i; float x[3]; for (i=0; i < 3; ++i) { x[i] = r[i] - o_[0][i]; } for (i=0; i < 3; ++i) { tr[i] = a_[i][0]*x[0] + a_[i][1]*x[1] + a_[i][2]*x[2] + o_[1][i]; } } void Rotation3d::origin(float x, float y, float z) { o_[0][0] = x; o_[0][1] = y; o_[0][2] = z; } void Rotation3d::offset(float x, float y) { o_[1][0] = x; o_[1][1] = y; o_[1][2] = 0.; } void Rotation3d::x_axis(float& x, float& y) const { x = a_[0][0]; y = a_[1][0]; } void Rotation3d::y_axis(float& x, float& y) const { x = a_[0][1]; y = a_[1][1]; } void Rotation3d::z_axis(float& x, float& y) const { x = a_[0][2]; y = a_[1][2]; } void Rotation3d::inverse_rotate(float* tr, float* r) const { int i; float x[3]; for (i=0; i < 3; ++i) { x[i] = tr[i]; } for (i=0; i < 3; ++i) { r[i] = a_[0][i]*x[0] + a_[1][i]*x[1] + a_[2][i]*x[2]; } } Rotate3Band::Rotate3Band(Rotation3d* r3, RubberAction* ra, Canvas* c) : Rubberband(ra, c) { if (r3) { rot_ = r3; }else{ rot_ = new Rotation3d(); } Resource::ref(rot_); } Rotate3Band::~Rotate3Band(){ Resource::unref(rot_); } Rotation3d* Rotate3Band::rotation() { return rot_; } bool Rotate3Band::event(Event& e) { const float deg = 3.14159265358979323846/18.; if (e.type() == Event::key) { undraw(x(), y()); char buf[2]; if (e.mapkey(buf, 1) > 0) switch (buf[0]) { case 'x': rot_->identity(); rot_->rotate_y(3.14159265358979323846/2.); break; case 'y': case 'a': rot_->identity(); rot_->rotate_x(3.14159265358979323846/2.); break; case 'z': case ' ': rot_->identity(); break; case 'X': rot_->rotate_x(deg); break; case 'Y': case 'A': rot_->rotate_y(deg); break; case 'Z': rot_->rotate_z(deg); break; case 037&'x': rot_->rotate_x(-deg); break; case 037&'y': case 037&'a': rot_->rotate_y(-deg); break; case 037&'z': rot_->rotate_z(-deg); break; default: break; } draw(x(), y()); return true; }else{ return Rubberband::event(e); } } void Rotate3Band::help() { Oc::help(Rotate_); } void Rotate3Band::press(Event& e) { Canvas* c = canvas(); c->push_transform(); Transformer t; c->transformer(transformer()); XYView* v = XYView::current_pick_view(); c->fill_rect(v->left(), v->bottom(), v->right(), v->top(), Scene::default_background()); c->pop_transform(); x_old_ = x(); y_old_ = y(); ShapeScene* ss = (ShapeScene*)v->scene(); Coord x1, y1; transformer().inverse_transform(x(), y(), x1, y1); ss->nearest(x1, y1); ShapeSection* ssec = ss->selected(); Section* s = ssec->section(); // this is the point we want to stay fixed. int i = ssec->get_coord(ss->arc_selected(), x1, y1); // what is it now float r[3]; rot_->rotate(s->pt3d[i].x, s->pt3d[i].y, s->pt3d[i].z, r); rot_->origin(s->pt3d[i].x, s->pt3d[i].y, s->pt3d[i].z); rot_->offset(r[0], r[1]); } void Rotate3Band::drag(Event&) { float dx = x() - x_old_; float dy = y() - y_old_; //printf ("dx=%g dy=%g\n", dx,dy); rot_->rotate_x(dy/50); rot_->rotate_y(dx/50); x_old_ = x(); y_old_ = y(); } void Rotate3Band::draw(Coord, Coord) { Canvas* c = canvas(); const Font* f = WidgetKit::instance()->font(); float x, y; float x0, y0; c->push_transform(); c->transformer(transformer()); #if 0 hoc_Item* qsec; ForAllSections(sec) //{ #else PolyGlyph* sg = ((ShapeScene*)XYView::current_pick_view()->scene()) ->shape_section_list(); GlyphIndex cnt = sg->count(); for (GlyphIndex i=0; i < cnt; ++i) { Section* sec = ((ShapeSection*)sg->component(i))->section(); #endif if (sec->npt3d) { float r[3]; int i = 0; r[0] = sec->pt3d[i].x; r[1] = sec->pt3d[i].y; r[2] = sec->pt3d[i].z; rot_->rotate(r, r); c->move_to(r[0], r[1]); i = sec->npt3d - 1; r[0] = sec->pt3d[i].x; r[1] = sec->pt3d[i].y; r[2] = sec->pt3d[i].z; rot_->rotate(r, r); c->line_to(r[0], r[1]); c->stroke(color(), brush()); } } c->pop_transform(); x0 = x_begin(); y0 = y_begin(); c->push_transform(); Transformer t; c->transformer(t); c->new_path(); Coord w = canvas()->width()/4; rot_->x_axis(x, y); //printf("x_axis %g %g\n", x, y); c->line(x0, y0, x0+x*w, y0+y*w, color(), brush()); #ifndef WIN32 c->character(f, 'x', f->width('x'), color(), x0+x*w*1.1, y0+y*w*1.1); #endif rot_->y_axis(x, y); //printf("y_axis %g %g\n", x, y); c->line(x0, y0, x0+x*w, y0+y*w, color(), brush()); #ifndef WIN32 c->character(f, 'y', f->width('y'), color(), x0+x*w*1.1, y0+y*w*1.1); #endif rot_->z_axis(x, y); //printf("z_axis %g %g\n", x, y); c->line(x0, y0, x0+x*w, y0+y*w, color(), brush()); #ifndef WIN32 c->character(f, 'z', f->width('z'), color(), x0+x*w*1.1, y0+y*w*1.1); #endif c->pop_transform(); } #endif neuron-7.5/src/nrniv/rotate3d.h000077500000000000000000000013541323325274500165300ustar00rootroot00000000000000#ifndef rotation3d_h #define rotation3d_h /* 3-D rotation matrix */ class Rotation3d : public Resource { public: Rotation3d(); virtual ~Rotation3d(); void rotate(float x, float y, float z, float* tr)const; void rotate(float* r, float* tr) const; void inverse_rotate(float* tr, float* r) const; void identity(); // relative transformation of the transformation void rotate_x(float radians); void rotate_y(float radians); void rotate_z(float radians); void origin(float x, float y, float z); void offset(float x, float y); void post_multiply(Rotation3d&); void x_axis(float& x, float& y) const; void y_axis(float& x, float& y) const; void z_axis(float& x, float& y) const; private: float a_[3][3]; float o_[2][3]; }; #endif neuron-7.5/src/nrniv/savstate.cpp000066400000000000000000000651751323325274500172000ustar00rootroot00000000000000#include <../../nrnconf.h> #undef check #include #include #include "ocfile.h" #include "nrnoc2iv.h" #include "classreg.h" #include "ndatclas.h" #include "tqueue.h" #include "netcon.h" #include "vrecitem.h" typedef void (*ReceiveFunc)(Point_process*, double*, double); extern "C" { #include "membfunc.h" extern int section_count; extern void nrn_shape_update(); extern Section** secorder; extern ReceiveFunc* pnt_receive; extern NetCvode* net_cvode_instance; extern TQueue* net_cvode_instance_event_queue(NrnThread*); extern void clear_event_queue(); extern hoc_Item* net_cvode_instance_psl(); extern PlayRecList* net_cvode_instance_prl(); extern double t; extern short* nrn_is_artificial_; static void tqcallback(const TQItem* tq, int i); }; #define ASSERTfgets(a,b,c) assert(fgets(a,b,c) != 0) #define ASSERTfread(a,b,c,d) assert(fread(a,b,c,d) == c) #define ASSERTfwrite(a,b,c,d) assert(fwrite(a,b,c,d) == c) class SaveState : public Resource { public: SaveState(); ~SaveState(); virtual void save(); virtual void restore(int type); virtual void read(OcFile*, bool close); virtual void write(OcFile*, bool close); struct NodeState { double v; int nmemb; int* type; int nstate; double* state; }; struct SecState { Section* sec; int nnode; struct NodeState* ns; struct NodeState* root; // non-zero for rootnode }; struct StateStructInfo { int offset; int size; }; struct ACellState { int type; int ncell; double* state; }; struct NetConState { int object_index; // for checking int nstate; double* state; }; struct PreSynState { bool flag; // is it firing? double valthresh, valold, told; }; struct TQState { int nstate; double* tdeliver; DiscreteEvent** items; }; private: bool check(bool warn); void alloc(); void ssfree(); void ssi_def(); private: void fread_NodeState(NodeState*, int, FILE*); void fwrite_NodeState(NodeState*, int, FILE*); void fread_SecState(SecState*, int, FILE*); void fwrite_SecState(SecState*, int, FILE*); private: double t_; int nroot_; int nsec_; SecState* ss_; int nacell_; // number of types ACellState* acell_; int nncs_; NetConState* ncs_; int npss_; PreSynState* pss_; TQState* tqs_; int tqcnt_; // volatile for index of forall_callback int nprs_; PlayRecordSave** prs_; static StateStructInfo* ssi; static cTemplate* nct; private: void savenode(NodeState&, Node*); void restorenode(NodeState&, Node*); bool checknode(NodeState&, Node*, bool); void allocnode(NodeState&, Node*); void saveacell(ACellState&, int type); void restoreacell(ACellState&, int type); bool checkacell(ACellState&, int type, bool); void allocacell(ACellState&, int type); void savenet(); void restorenet(); void readnet(FILE*); void writenet(FILE*); bool checknet(bool); void allocnet(); void free_tq(); void alloc_tq(); public: void tqcount(const TQItem*, int); void tqsave(const TQItem*, int); }; static SaveState* this_savestate; static int callback_mode; void tqcallback(const TQItem* tq, int i) { if (callback_mode == 0) { this_savestate->tqcount(tq, i); }else{ this_savestate->tqsave(tq, i); } } #if __sgi && 0 // fixed in version 5 of os StateStructInfo* SaveState::ssi; #else SaveState::StateStructInfo* SaveState::ssi; #endif cTemplate* SaveState::nct; SaveState::SaveState() { int i, j; ssi_def(); nroot_ = 0; ss_ = NULL; nsec_ = 0; nncs_ = 0; ncs_ = NULL; npss_ = 0; pss_ = NULL; tqs_ = new TQState(); tqs_->nstate = 0; nprs_ = 0; prs_ = NULL; nacell_ = 0; for (i=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { ++nacell_; } acell_ = new ACellState[nacell_]; for (i=0; i < nacell_; ++i) { acell_[i].ncell = 0; acell_[i].state = 0; } for (i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { acell_[j].type = i; ++j; } } SaveState::~SaveState() { ssfree(); delete tqs_; delete [] acell_; } void SaveState::fread_NodeState(NodeState* ns, int cnt, FILE* f) { for (int i=0; i < cnt; ++i) { ASSERTfread(&ns[i].v, sizeof(double), 1, f); ASSERTfread(&ns[i].nmemb, sizeof(int), 1, f); ASSERTfread(&ns[i].nstate, sizeof(int), 1, f); } } void SaveState::fwrite_NodeState(NodeState* ns, int cnt, FILE* f){ for (int i=0; i < cnt; ++i) { ASSERTfwrite(&ns[i].v, sizeof(double), 1, f); ASSERTfwrite(&ns[i].nmemb, sizeof(int), 1, f); ASSERTfwrite(&ns[i].nstate, sizeof(int), 1, f); } } void SaveState::fread_SecState(SecState* ss, int cnt, FILE* f){ int b; for (int i=0; i < cnt; ++i) { ASSERTfread(&ss[i].nnode, sizeof(int), 1, f); ASSERTfread(&b, sizeof(int), 1, f); if (b) { ss[i].root = new NodeState; }else{ ss[i].root = 0; } } } void SaveState::fwrite_SecState(SecState* ss, int cnt, FILE* f){ int b; for (int i=0; i < cnt; ++i) { ASSERTfwrite(&ss[i].nnode, sizeof(int), 1, f); b = ss[i].root ? 1 : 0; ASSERTfwrite(&b, sizeof(int), 1, f); } } void SaveState::ssi_def() { if (nct) { return; } Symbol* s = hoc_lookup("NetCon"); nct = s->u.ctemplate; ssi = new StateStructInfo[n_memb_func]; for (int im=0; im < n_memb_func; ++im) { ssi[im].offset = -1; ssi[im].size = 0; if (!memb_func[im].sym) { continue; } NrnProperty* np = new NrnProperty(memb_func[im].sym->name); // generally we only save STATE variables. However for // models containing a NET_RECEIVE block, we also need to // save everything except the parameters // because they often contain // logic and analytic state values. Unfortunately, it is often // the case that the ASSIGNED variables are not declared as // RANGE variables so to avoid missing state, save the whole // param array including PARAMETERs. if (pnt_receive[im]) { ssi[im].offset = 0; ssi[im].size = np->prop()->param_size; }else{ int type = STATE; for (Symbol* sym = np->first_var(); np->more_var(); sym = np->next_var()) { if (np->var_type(sym) == type || np->var_type(sym) == STATE || sym->subtype == _AMBIGUOUS) { if (ssi[im].offset < 0) { ssi[im].offset = np->prop_index(sym); } ssi[im].size += hoc_total_array_data(sym, 0); } } } delete np; } } bool SaveState::check(bool warn) { hoc_Item* qsec; int isec; if (nsec_ != section_count) { if (warn) { fprintf(stderr, "SaveState warning: %d sections exist but saved %d\n", section_count, nsec_); } return false; } if (nroot_ != nrn_global_ncell) { if (warn) { fprintf(stderr, "SaveState warning: %d cells exist but saved %d\n", nrn_global_ncell, nroot_); } return false; } if (nsec_ && ss_[0].sec == NULL) { // got the data from a read isec = 0; ForAllSections(sec) ss_[isec].sec = sec; section_ref(ss_[isec].sec); ++isec; } } for (int i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { if (!checkacell(acell_[j], i, warn)) { return false; } ++j; } for (int isec=0; isec < nsec_; ++isec) { SecState& ss = ss_[isec]; Section* sec = ss.sec; if (!sec->prop || sec->nnode != ss.nnode) { if (warn) { if (!sec->prop) { fprintf(stderr, "SaveState warning: saved section no longer exists\n"); }else{ fprintf(stderr, "SaveState warning: %s has %d nodes but saved %d\n", secname(sec), sec->nnode, ss.nnode); } } return false; } for (int inode = 0; inode < ss.nnode; ++inode) { NodeState& ns = ss.ns[inode]; Node* nd = sec->pnode[inode]; int i=0; Prop* p; for (p = nd->prop; p; p = p->next) { if (ssi[p->type].size == 0) { continue; } if (i >= ns.nmemb) { if (warn) { fprintf(stderr,"SaveState warning: \ fewer mechanisms saved than exist at node %d of %s\n", inode, secname(sec)); } return false; } if (p->type != ns.type[i]) { if (warn) { fprintf(stderr, "SaveState warning: mechanisms out of order at node %d of %s\n\ saved %s but need %s\n", inode, secname(sec), memb_func[i].sym->name, memb_func[p->type].sym->name); } return false; } ++i; } if (i != ns.nmemb) { if (warn) { fprintf(stderr, "SaveState warning: more mechanisms saved than exist at node %d of %s\n", inode, secname(sec)); } return false; } } if (!sec->parentsec || ss.root) { if (sec->parentsec || !ss.root) { if (warn) { fprintf(stderr, "SaveState warning: Saved section and %s are not both root sections.\n", secname(sec)); } } if (!checknode(*ss.root, sec->parentnode, warn)) { return false; } } } if (!checknet(warn)) { return false; } return true; } bool SaveState::checknode(NodeState& ns, Node* nd, bool warn) { int i=0; Prop* p; for (p = nd->prop; p; p = p->next) { if (ssi[p->type].size == 0) { continue; } if (i >= ns.nmemb) { if (warn) { fprintf(stderr,"SaveState warning: \ fewer mechanisms saved than exist at a root node\n"); } return false; } if (p->type != ns.type[i]) { if (warn) { fprintf(stderr, "SaveState warning: mechanisms out of order at a rootnode\n\ saved %s but need %s\n", memb_func[i].sym->name, memb_func[p->type].sym->name); } return false; } ++i; } if (i != ns.nmemb) { if (warn) { fprintf(stderr, "SaveState warning: more mechanisms saved than exist at a rootnode\n"); } return false; } return true; } bool SaveState::checkacell(ACellState& ac, int type, bool warn) { if (memb_list[type].nodecount != ac.ncell) { if (warn) { fprintf(stderr, "SaveState warning: different number of %s saved than exist.\n", memb_func[type].sym->name); } return false; } return true; } void SaveState::alloc() { ssfree(); int inode, isec; hoc_Item* qsec; nsec_ = section_count; ss_ = new SecState[nsec_]; nroot_ = 0; isec = 0; ForAllSections(sec) SecState& ss = ss_[isec]; ss.sec = sec; section_ref(ss.sec); ss.nnode = ss.sec->nnode; ss.ns = new NodeState[ss.nnode]; for (inode = 0; inode < ss.nnode; ++inode) { Node* nd = ss.sec->pnode[inode]; NodeState& ns = ss.ns[inode]; allocnode(ns, nd); } if (!sec->parentsec) { assert(sec->parentnode); ss.root = new NodeState; allocnode(*ss.root, sec->parentnode); ++nroot_; }else{ ss.root = 0; } ++isec; } assert(isec == section_count); assert(nroot_ == nrn_global_ncell); for (int i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { allocacell(acell_[j], i); ++j; } PlayRecList* prl = net_cvode_instance_prl(); nprs_ = prl->count(); if (nprs_) { prs_ = new PlayRecordSave*[nprs_]; } allocnet(); } void SaveState::allocnode(NodeState& ns, Node* nd) { ns.nmemb = 0; ns.type = NULL; ns.state = NULL; ns.nstate = 0; Prop* p; for (p = nd->prop; p; p = p->next) { if (ssi[p->type].size == 0) { continue; } ++ns.nmemb; ns.nstate += ssi[p->type].size; } if (ns.nmemb) { ns.type = new int[ns.nmemb]; } if (ns.nstate) { ns.state = new double[ns.nstate]; } int i = 0; for (p = nd->prop; p; p = p->next) { if (ssi[p->type].size == 0) { continue; } ns.type[i] = p->type; ++i; } } void SaveState::allocacell(ACellState& ac, int type) { Memb_list& ml = memb_list[type]; ac.type = type; ac.ncell = ml.nodecount; ac.state = new double[ac.ncell * ssi[type].size]; } void SaveState::ssfree() { int i, isec, inode; for (isec=0; isec < nsec_; ++isec) { SecState& ss = ss_[isec]; for (inode = 0; inode < ss.nnode; ++inode) { NodeState& ns = ss.ns[inode]; if (ns.nmemb) { delete [] ns.type; } if (ns.nstate) { delete [] ns.state; } } if (ss.root) { NodeState& ns = *ss.root; if (ns.nmemb) { delete [] ns.type; } if (ns.nstate) { delete [] ns.state; } delete ss.root; } if (ss.nnode) { delete [] ss.ns; } if (ss.sec) { // got info from an fread but never checked it section_unref(ss.sec); } } if (nsec_) { delete [] ss_; } nsec_ = 0; ss_ = NULL; for (i=0; i < nacell_; ++i) { if (acell_[i].ncell) { delete [] acell_[i].state; acell_[i].state = 0; acell_[i].ncell = 0; } } // note we do not destroy the acell_. if (nncs_) { for (i = 0; i < nncs_; ++i) { if (ncs_[i].nstate) { delete [] ncs_[i].state; } } delete [] ncs_; } nncs_ = 0; ncs_ = NULL; if (npss_) { delete [] pss_; } npss_ = 0; pss_ = NULL; free_tq(); if (nprs_) { for (i=0; i < nprs_; ++i) { delete prs_[i]; } delete [] prs_; } nprs_ = 0; } void SaveState::save() { NrnThread* nt; if (!check(false)) { alloc(); } FOR_THREADS(nt) { assert(t == nt->_t); } t_ = t; int inode; for (int isec=0; isec < nsec_; ++isec) { SecState& ss = ss_[isec]; Section* sec = ss.sec; for (inode = 0; inode < ss.nnode; ++inode) { NodeState& ns = ss.ns[inode]; Node* nd = sec->pnode[inode]; savenode(ns, nd); } if (ss.root) { NodeState& ns = *ss.root; Node* nd = sec->parentnode; savenode(ns, nd); } } for (int i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { saveacell(acell_[j], i); ++j; } if (nprs_) { PlayRecList* prl = net_cvode_instance_prl(); int i; assert(nprs_ == prl->count()); for (i=0; i < nprs_; ++i) { prs_[i] = prl->item(i)->savestate_save(); } } savenet(); } void SaveState::savenode(NodeState& ns, Node* nd) { ns.v = NODEV(nd); int istate = 0; Prop* p; for (p = nd->prop; p; p = p->next) { if (ssi[p->type].size == 0) { continue; } int type = p->type; int max = ssi[type].offset + ssi[type].size; #if EXTRACELLULAR if (type == EXTRACELL) { for (int i=0; i < nlayer; ++i) { ns.state[istate++] = nd->extnode->v[i]; } }else #endif { for (int ip=ssi[type].offset; ip < max; ++ip) { ns.state[istate++] = p->param[ip]; } } } } void SaveState::saveacell(ACellState& ac, int type) { Memb_list& ml = memb_list[type]; int sz = ssi[type].size; double* p = ac.state; for (int i = 0; i < ml.nodecount; ++i) { double* d = ml.data[i]; for (int j=0; j < sz; ++j) { (*p++) = d[j]; } } } void SaveState::restore(int type) { NrnThread* nt; if (!check(true)) { hoc_execerror("SaveState:", "Stored state inconsistent with current neuron structure"); } t = t_; FOR_THREADS(nt) { nt->_t = t_; } int inode; for (int isec=0; isec < nsec_; ++isec) { SecState& ss = ss_[isec]; Section* sec = ss.sec; for (inode = 0; inode < ss.nnode; ++inode) { NodeState& ns = ss.ns[inode]; Node* nd = sec->pnode[inode]; restorenode(ns, nd); } if (ss.root) { NodeState& ns = *ss.root; Node* nd = sec->parentnode; restorenode(ns, nd); } } for (int i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { restoreacell(acell_[j], i); ++j; } if (type == 1) { return; } PlayRecList* prl = net_cvode_instance_prl(); // during a local step the PlayRecList is augmented with GLineRecord // assert(nprs_ == prl->count()); assert(nprs_ <= prl->count()); int i; for (i = 0; i < nprs_; ++i) { prs_[i]->savestate_restore(); } restorenet(); } void SaveState::restorenode(NodeState& ns, Node* nd) { NODEV(nd) = ns.v;; int istate = 0; Prop* p; for (p = nd->prop; p; p = p->next) { if (ssi[p->type].size == 0) { continue; } int type = p->type; int max = ssi[type].offset + ssi[type].size; #if EXTRACELLULAR if (type == EXTRACELL) { for (int i=0; i < nlayer; ++i) { nd->extnode->v[i] = ns.state[istate++]; } }else #endif { for (int ip=ssi[type].offset; ip < max; ++ip) { p->param[ip] = ns.state[istate++]; } } } } void SaveState::restoreacell(ACellState& ac, int type) { Memb_list& ml = memb_list[type]; int sz = ssi[type].size; double* p = ac.state; for (int i = 0; i < ml.nodecount; ++i) { double* d = ml.data[i]; for (int j=0; j < sz; ++j) { d[j] = (*p++); } } } void SaveState::read(OcFile* ocf, bool close) { if (!ocf->open(ocf->get_name(), "r")) { hoc_execerror("Couldn't open file for reading:", ocf->get_name()); } nrn_shape_update(); BinaryMode(ocf) FILE* f = ocf->file(); ssfree(); char buf[200]; ASSERTfgets(buf, 200, f); if (strcmp(buf, "SaveState binary file version 6.0\n") != 0) { ocf->close(); hoc_execerror("Bad SaveState binary file", " Not version 6.0"); } ASSERTfread((char*)&t_, sizeof(double), 1, f); // fscanf(f, "%d %d\n", &nsec_, &nrootnode_); // on some os's fscanf leaves file pointer at wrong place for next fread // can check it with ftell(f) ASSERTfgets(buf, 200, f); sscanf(buf, "%d %d\n", &nsec_, &nroot_); // to enable comparison of SaveState files, we avoid // putting pointers in the files and instead explicitly read/write // structure elements. ss_ = new SecState[nsec_]; fread_SecState(ss_, nsec_, f); for (int isec=0; isec < nsec_; ++isec) { SecState& ss = ss_[isec]; ss.sec = NULL; ss.ns = new NodeState[ss.nnode]; fread_NodeState(ss.ns, ss.nnode, f); for (int inode = 0; inode < ss.nnode; ++inode) { NodeState& ns = ss.ns[inode]; if (ns.nmemb) { ns.type = new int[ns.nmemb]; ASSERTfread((char*)ns.type, sizeof(int), ns.nmemb, f); } if (ns.nstate) { ns.state = new double[ns.nstate]; ASSERTfread((char*)ns.state, sizeof(double), ns.nstate, f); } } if (ss.root) { fread_NodeState(ss.root, 1, f); NodeState& ns = *ss.root; if (ns.nmemb) { ns.type = new int[ns.nmemb]; ASSERTfread((char*)ns.type, sizeof(int), ns.nmemb, f); } if (ns.nstate) { ns.state = new double[ns.nstate]; ASSERTfread((char*)ns.state, sizeof(double), ns.nstate, f); } } } int n = 0; ASSERTfgets(buf, 20, f); sscanf(buf, "%d\n", &n); assert(n == nacell_); for (int i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { int nt = 0, nc = 0, ns = 0; ASSERTfgets(buf, 200, f); assert(sscanf(buf, "%d %d %d\n", &nt, &nc, &ns) == 3); assert(nt == i && nc == memb_list[i].nodecount); assert(ns == nc * ssi[i].size); acell_[j].ncell = nc; acell_[j].state = new double[ns]; ASSERTfread((char*)acell_[j].state, sizeof(double), ns, f); ++j; } ASSERTfgets(buf, 20, f); sscanf(buf, "%d\n", &nprs_); if (nprs_) { prs_ = new PlayRecordSave*[nprs_]; for (int i=0; i < nprs_; ++i) { prs_[i] = PlayRecord::savestate_read(f); } } readnet(f); if (close) { ocf->close(); } } void SaveState::write(OcFile* ocf, bool close) { if (!ocf->open(ocf->get_name(), "w")) { hoc_execerror("Couldn't open file for writing:", ocf->get_name()); } BinaryMode(ocf) FILE* f = ocf->file(); fprintf(f, "SaveState binary file version 6.0\n"); ASSERTfwrite((char*)&t_, sizeof(double), 1, f); fprintf(f, "%d %d\n", nsec_, nroot_); fwrite_SecState(ss_, nsec_, f); for (int isec=0; isec < nsec_; ++isec) { SecState& ss = ss_[isec]; fwrite_NodeState(ss.ns, ss.nnode, f); for (int inode = 0; inode < ss.nnode; ++inode) { NodeState& ns = ss.ns[inode]; if (ns.nmemb){ ASSERTfwrite((char*)ns.type, sizeof(int), ns.nmemb, f); } if (ns.nstate) { ASSERTfwrite((char*)ns.state, sizeof(double), ns.nstate, f); } } if (ss.root) { fwrite_NodeState(ss.root, 1, f); NodeState& ns = *ss.root; if (ns.nmemb){ ASSERTfwrite((char*)ns.type, sizeof(int), ns.nmemb, f); } if (ns.nstate) { ASSERTfwrite((char*)ns.state, sizeof(double), ns.nstate, f); } } } fprintf(f, "%d\n", nacell_); for (int i=0, j=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i]) { int sz = acell_[j].ncell * ssi[i].size; fprintf(f, "%d %d %d\n", acell_[j].type, acell_[j].ncell, sz); ASSERTfwrite((char*)acell_[j].state, sizeof(double), sz, f); ++j; } fprintf(f, "%d\n", nprs_); for (int i=0; i < nprs_; ++i) { fprintf(f, "%d %d\n", prs_[i]->pr_->type(), i); prs_[i]->savestate_write(f); } writenet(f); if (close) { ocf->close(); } } void SaveState::savenet() { int i, j, n; double* w; hoc_Item* q; Object* ob; NetCon* d; PreSyn* ps; i = 0; ITERATE(q, nct->olist) { ob = OBJ(q); d = (NetCon*)ob->u.this_pointer; n = ncs_[i].nstate; w = ncs_[i].state; for (j=0; j < n; ++j) { w[j] = d->weight_[j]; } ++i; } i = 0; if (net_cvode_instance_psl()) ITERATE(q, net_cvode_instance_psl()) { ps = (PreSyn*)VOIDITM(q); ps->hi_index_ = i; pss_[i].flag = ps->flag_; pss_[i].valthresh = ps->valthresh_; pss_[i].valold = ps->valold_; pss_[i].told = ps->told_; ++i; } alloc_tq(); tqcnt_ = 0; NrnThread* nt; FOR_THREADS(nt) { TQueue* tq = net_cvode_instance_event_queue(nt); this_savestate = this; callback_mode = 1; tq->forall_callback(tqcallback); } } void SaveState::tqcount(const TQItem*, int) { ++tqcnt_; } void SaveState::tqsave(const TQItem* q, int) { DiscreteEvent* de = (DiscreteEvent*)q->data_; tqs_->tdeliver[tqcnt_] = q->t_; tqs_->items[tqcnt_] = de->savestate_save(); ++tqcnt_; } void SaveState::restorenet() { int i, j, n; double* w; hoc_Item* q; Object* ob; NetCon* d; PreSyn* ps; // NetCon's i = 0; ITERATE(q, nct->olist) { ob = OBJ(q); d = (NetCon*)ob->u.this_pointer; n = ncs_[i].nstate; w = ncs_[i].state; for (j=0; j < n; ++j) { d->weight_[j] = w[j]; } ++i; } // PreSyn's i = 0; if (net_cvode_instance_psl()) ITERATE(q, net_cvode_instance_psl()) { ps = (PreSyn*)VOIDITM(q); ps->hi_index_ = i; ps->flag_ = pss_[i].flag; ps->valthresh_ = pss_[i].valthresh; ps->valold_ = pss_[i].valold; ps->told_ = pss_[i].told; ++i; } // event queue // clear it clear_event_queue(); // restore it n = tqs_->nstate; for (i=0; i < n; ++i) { tqs_->items[i]->savestate_restore(tqs_->tdeliver[i], net_cvode_instance); } } void SaveState::readnet(FILE* f) { free_tq(); char buf[200]; ASSERTfgets(buf, 200, f); sscanf(buf, "%d\n", &nncs_); if (nncs_ != 0) { ncs_ = new NetConState[nncs_]; } int i, n, type; for (i=0; i < nncs_; ++i) { ASSERTfgets(buf, 200, f); sscanf(buf, "%d %d\n", &ncs_[i].object_index, &ncs_[i].nstate); if (ncs_[i].nstate) { ncs_[i].state = new double[ncs_[i].nstate]; ASSERTfread((char*)ncs_[i].state, sizeof(double), ncs_[i].nstate, f); } } // PreSyn's ASSERTfgets(buf, 200, f); sscanf(buf, "%d\n", &npss_); if (npss_ != 0) { pss_ = new PreSynState[npss_]; ASSERTfread((char*)pss_, sizeof(PreSynState), npss_, f); PreSyn* ps; i = 0; hoc_Item* q; if (net_cvode_instance_psl()) ITERATE(q, net_cvode_instance_psl()) { ps = (PreSyn*)VOIDITM(q); ps->hi_index_ = i; ++i; } assert(npss_ == i); } ASSERTfgets(buf, 200, f); sscanf(buf, "%d\n", &n); tqs_->nstate = n; if (n) { tqs_->items = new DiscreteEvent*[n]; tqs_->tdeliver = new double[n]; ASSERTfread((char*)tqs_->tdeliver, sizeof(double), n, f); for (i=0; i < n; ++i) { DiscreteEvent* de = NULL; ASSERTfgets(buf, 200, f); sscanf(buf, "%d\n", &type); switch(type) { case DiscreteEventType: de = DiscreteEvent::savestate_read(f); break; case TstopEventType: de = TstopEvent::savestate_read(f); break; case NetConType: de = NetCon::savestate_read(f); break; case SelfEventType: de = SelfEvent::savestate_read(f); break; case PreSynType: de = PreSyn::savestate_read(f); break; case HocEventType: de = HocEvent::savestate_read(f); break; case PlayRecordEventType: de = PlayRecordEvent::savestate_read(f); break; case NetParEventType: de = NetParEvent::savestate_read(f); break; default: hoc_execerror("SaveState::readnet", "Unimplemented DiscreteEvent type"); break; } tqs_->items[i] = de; } } } void SaveState::writenet(FILE* f) { fprintf(f, "%d\n", nncs_); int i, n; for (i=0; i < nncs_; ++i) { fprintf(f, "%d %d\n", ncs_[i].object_index, ncs_[i].nstate); if (ncs_[i].nstate) { ASSERTfwrite((char*)ncs_[i].state, sizeof(double), ncs_[i].nstate, f); } } fprintf(f, "%d\n", npss_); if (npss_) { ASSERTfwrite((char*)pss_, sizeof(PreSynState), npss_, f); } n = tqs_->nstate; fprintf(f, "%d\n", n); if (n) { ASSERTfwrite((char*)tqs_->tdeliver, sizeof(double), n, f); for (i=0; i < n; ++i) { tqs_->items[i]->savestate_write(f); } } } bool SaveState::checknet(bool warn) { if (nncs_ != nct->count) { if (warn) { fprintf(stderr, "SaveState warning: There are %d NetCon but %d saved\n", nct->count, nncs_); } return false; } int i; hoc_Item* q; Object* ob; NetCon* d; i = 0; ITERATE(q, nct->olist) { ob = OBJ(q); d = (NetCon*)ob->u.this_pointer; if (ob->index != ncs_[i].object_index) { if (warn) { fprintf(stderr, "SaveState warning: %s is matched with NetCon[%d]\n", hoc_object_name(ob), ncs_[i].object_index); } return false; } if (d->cnt_ != ncs_[i].nstate) { if (warn) { fprintf(stderr, "SaveState warning: %s has %d weight states but saved %d\n", hoc_object_name(ob), d->cnt_, ncs_[i].nstate); } return false; } ++i; } // PreSyn's i = 0; if (net_cvode_instance_psl()) ITERATE(q, net_cvode_instance_psl()) { ++i; } if (npss_ != i) { if (warn) { fprintf(stderr, "SaveState warning: There are %d internal PreSyn but %d saved\n", i, npss_); } return false; } return true; } void SaveState::allocnet() { nncs_ = nct->count; if (nncs_ != 0) { ncs_ = new NetConState[nncs_]; } int i, n; hoc_Item* q; Object* ob; NetCon* d; i = 0; ITERATE(q, nct->olist) { ob = OBJ(q); d = (NetCon*)ob->u.this_pointer; ncs_[i].object_index = ob->index; ncs_[i].nstate = d->cnt_; if (d->cnt_) { ncs_[i].state = new double[d->cnt_]; } ++i; } PreSyn* ps; npss_ = 0; if (net_cvode_instance_psl()) ITERATE(q, net_cvode_instance_psl()) { ps = (PreSyn*)VOIDITM(q); ps->hi_index_ = npss_; ++npss_; } if (npss_ != 0) { pss_ = new PreSynState[npss_]; } } //The event TQueue is highly volatile so it needs to be freed and allocated // on every save and fread void SaveState::free_tq() { int i; if (tqs_->nstate) { for (i=0; i < tqs_->nstate; ++i) { delete tqs_->items[i]; } tqs_->nstate = 0; delete [] tqs_->items; delete [] tqs_->tdeliver; } } void SaveState::alloc_tq() { int n; free_tq(); tqcnt_ = 0; NrnThread* nt; FOR_THREADS(nt) { TQueue* tq = net_cvode_instance_event_queue(nt); this_savestate = this; callback_mode = 0; tq->forall_callback(tqcallback); } n = tqcnt_; tqs_->nstate = n; if (n) { tqs_->items = new DiscreteEvent*[n]; tqs_->tdeliver = new double[n]; } } static void* cons(Object*) { SaveState* ss = new SaveState(); ss->ref(); return (void*)ss; } static void destruct(void* v) { SaveState* ss = (SaveState*)v; Resource::unref(ss); } static double save(void* v) { SaveState* ss = (SaveState*)v; ss->save(); return 1.; } static double restore(void* v) { SaveState* ss = (SaveState*)v; int type = 0; if (ifarg(1)) { type = (int)chkarg(1, 0, 1); } ss->restore(type); return 1.; } static double ssread(void* v) { bool close = true; SaveState* ss = (SaveState*)v; Object* obj = *hoc_objgetarg(1); check_obj_type(obj, "File"); if (ifarg(2)) { close = chkarg(2, 0, 1) ? true : false; } OcFile* f = (OcFile*)obj->u.this_pointer; ss->read(f, close); return 1.; } static double sswrite(void* v) { bool close = true; SaveState* ss = (SaveState*)v; Object* obj = *hoc_objgetarg(1); check_obj_type(obj, "File"); if (ifarg(2)) { close = chkarg(2, 0, 1) ? true : false; } OcFile* f = (OcFile*)obj->u.this_pointer; ss->write(f, close); return 1.; } static Member_func members[] = { "save", save, "restore", restore, "fread", ssread, "fwrite", sswrite, 0, 0 }; void SaveState_reg() { class2oc("SaveState", cons, destruct, members, NULL, NULL, NULL); } neuron-7.5/src/nrniv/secbrows.cpp000066400000000000000000000262611323325274500171660ustar00rootroot00000000000000#include <../../nrnconf.h> #include "classreg.h" #if HAVE_IV #include #include #include #include #include "apwindow.h" #include "secbrows.h" #include "oclist.h" #include "ivoc.h" #include "objcmd.h" #endif #include "nrnoc2iv.h" extern "C" { #include "membfunc.h" void (*nrnpy_call_python_with_section)(Object*, Section*) = NULL; } //----------------------------------------- static double sb_select(void* v) { #if HAVE_IV IFGUI Section* sec = chk_access(); ((OcSectionBrowser*)v)->select_section(sec); ENDGUI #endif return 1.; } static double sb_select_action(void* v) { #if HAVE_IV IFGUI char* str_action = NULL; Object* obj_action = NULL; if (hoc_is_object_arg(1)) { obj_action = *hoc_objgetarg(1); } else { str_action = gargstr(1); } ((OcSectionBrowser*)v)->set_select_action(str_action, obj_action); ENDGUI #endif return 1.; } static double sb_accept_action(void* v) { #if HAVE_IV IFGUI char* str_action = NULL; Object* obj_action = NULL; if (hoc_is_object_arg(1)) { obj_action = *hoc_objgetarg(1); } else { str_action = gargstr(1); } ((OcSectionBrowser*)v)->set_accept_action(str_action, obj_action); ENDGUI #endif return 1.; } static Member_func sb_members[] = { "select", sb_select, "select_action", sb_select_action, "accept_action", sb_accept_action, 0, 0 }; static void* sb_cons(Object*) { Object* ob; #if HAVE_IV OcSectionBrowser* b = NULL; IFGUI if (ifarg(1)) { ob = *hoc_objgetarg(1); b = new OcSectionBrowser(ob); }else{ b = new OcSectionBrowser(NULL); } b->ref(); Window* w = new StandardWindow(b->standard_glyph()); w->map(); ENDGUI return (void*)b; #else return 0; #endif } static void sb_destruct(void* v) { #if HAVE_IV Resource::unref((OcSectionBrowser*)v); #endif } void SectionBrowser_reg() { class2oc("SectionBrowser", sb_cons, sb_destruct, sb_members, NULL, NULL, NULL); } #if HAVE_IV OcSectionBrowser::OcSectionBrowser(Object* ob) : OcBrowser() { long i; select_is_pycallback_ = false; accept_is_pycallback_ = false; if (ob) { SectionList sl(ob); Section* sec; scnt_ = 0; for (sec = sl.begin(); sec; sec = sl.next()) { ++scnt_; } if (scnt_) { psec_ = new Section*[scnt_]; } scnt_=0; for (sec = sl.begin(); sec; sec = sl.next()) { psec_[scnt_++] = sec; } }else{ struct hoc_Item* qsec; scnt_=0; ForAllSections(sec) //{ ++scnt_; } psec_ = new Section*[scnt_]; scnt_=0; ForAllSections(sec) //{ psec_[scnt_++] = sec; } } for (i=0; i < scnt_; ++i) { append_item(secname(psec_[i])); section_ref(psec_[i]); } select_ = NULL; accept_ = NULL; } OcSectionBrowser::~OcSectionBrowser() { long i; for (i=0; i < scnt_; ++i) { section_unref(psec_[i]); } delete [] psec_; if (select_) { delete select_; } if (accept_) { delete accept_; } } void OcSectionBrowser::accept(){ if (accept_) { long i = selected(); if (i < 0) { return; } nrn_pushsec(psec_[i]); if (accept_is_pycallback_) { if (nrnpy_call_python_with_section) { (*nrnpy_call_python_with_section)(accept_pycallback_, psec_[i]); } else { // should not be able to get here } } else { accept_->execute(); } nrn_popsec(); } } void OcSectionBrowser::select_section(Section* sec){ long i; if (sec->prop) for (i=0; i < scnt_; ++i) { if (psec_[i] == sec) { OcBrowser::select_and_adjust(i); return; } } OcBrowser::select(-1); } void OcSectionBrowser::set_select_action(const char* s, Object* pyact){ if (select_) { delete select_; } if (pyact) { select_is_pycallback_ = true; select_pycallback_ = pyact; // note: we won't actually invoke this but necessary to avoid segfault select_ = new HocCommand(pyact); } else { select_is_pycallback_ = false; select_ = new HocCommand(s); } } void OcSectionBrowser::set_accept_action(const char* s, Object* pyact){ if (accept_) { delete accept_; } if (pyact) { accept_is_pycallback_ = true; accept_pycallback_ = pyact; // note: we won't actually invoke this but necessary to avoid segfault accept_ = new HocCommand(pyact); } else { accept_is_pycallback_ = false; accept_ = new HocCommand(s); } } void OcSectionBrowser::select(GlyphIndex i){ GlyphIndex old = selected(); OcBrowser::select(i); if (i >= 0 && old != i && select_) { if (psec_[i]->prop) { nrn_pushsec(psec_[i]); if (select_is_pycallback_) { if (nrnpy_call_python_with_section) { (*nrnpy_call_python_with_section)(select_pycallback_, psec_[i]); } else { // should not be able to get here } } else { select_->execute(); } nrn_popsec(); }else{ state(i)->set(TelltaleState::is_enabled, false); OcBrowser::select(old); } } } //----------------------------------------- MechVarType::MechVarType() : MonoGlyph(NULL) { int i; LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); Button* b[3]; b[0] = wk.palette_button("Parameters", NULL); b[1] = wk.palette_button("States", NULL); b[2] = wk.palette_button("Assigned", NULL); PolyGlyph* vb = lk.vbox(b[0],b[1],b[2]); for (i=0; i < 3; ++i) { tts_[i] = b[i]->state(); Resource::ref(tts_[i]); } tts_[0]->set(TelltaleState::is_chosen, true); body(wk.inset_frame(lk.margin(vb, 5))); } MechVarType::~MechVarType() { int i; for (i=0; i < 3; ++i) { Resource::unref(tts_[i]); } } bool MechVarType::parameter_select() { return select(0);} bool MechVarType::state_select() { return select(1);} bool MechVarType::assigned_select() { return select(2);} bool MechVarType::select(int i) { return tts_[i]->test(TelltaleState::is_chosen); } //--------------------------------------------------------------------- #define MSBEGIN 2 MechSelector::MechSelector() : MonoGlyph(NULL){ int i; LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); ScrollBox* vsb = lk.vscrollbox(5); Button* b; tts_ = new TelltaleState*[n_memb_func]; for (i=MSBEGIN; i < n_memb_func; ++i) { b = wk.palette_button(memb_func[i].sym->name, NULL); b->state()->set(TelltaleState::is_chosen, true); vsb->append(b); tts_[i] = b->state(); } body( lk.hbox( lk.vcenter( wk.inset_frame( lk.margin( lk.natural_span(vsb, 200, 100), 5 ) ), 1.0 ), lk.hspace(4), wk.vscroll_bar(vsb) ) ); // body(wk.inset_frame(lk.margin(vsb, 5))); } MechSelector::~MechSelector(){ delete [] tts_; } bool MechSelector::is_selected(int type) { if (type >= MSBEGIN && type < n_memb_func && tts_[type]->test(TelltaleState::is_chosen)) { return true; } return false; } int MechSelector::begin(){ iterator_ = MSBEGIN-1; return next(); } bool MechSelector::done(){ if (iterator_ >= n_memb_func) { return true; }else{ return false; } } int MechSelector::next(){ while(!done()) { ++iterator_; if (is_selected(iterator_)) { return iterator_; } } return 0; } //--------------------------------------------------------------------- class SectionBrowserImpl { friend class SectionBrowser; SectionBrowserImpl(); ~SectionBrowserImpl(); MechSelector* ms_; MechVarType* mvt_; Section** psec_; int scnt_; void make_panel(Section*); }; /* static */ class BrowserAccept : public Action { public: BrowserAccept(SectionBrowser*); virtual ~BrowserAccept(); virtual void execute(); private: SectionBrowser* sb_; }; BrowserAccept::BrowserAccept(SectionBrowser* sb){sb_ = sb;} BrowserAccept::~BrowserAccept(){} void BrowserAccept::execute(){sb_->accept();} SectionBrowserImpl::SectionBrowserImpl() { struct hoc_Item* qsec; scnt_=0; ForAllSections(sec) //{ ++scnt_; } psec_ = new Section*[scnt_]; scnt_=0; ForAllSections(sec) //{ psec_[scnt_++] = sec; section_ref(sec); } ms_ = new MechSelector(); ms_->ref(); mvt_ = new MechVarType(); mvt_->ref(); } SectionBrowserImpl::~SectionBrowserImpl() { for (int i=0; i < scnt_; ++i) { section_unref(psec_[i]); } delete [] psec_; ms_->unref(); mvt_->unref(); } SectionBrowser::SectionBrowser() : OcBrowser(new BrowserAccept(this), NULL) { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); sbi_ = new SectionBrowserImpl; for (int i=0; i < sbi_->scnt_; ++i) { append_item(secname(sbi_->psec_[i])); } } SectionBrowser::SectionBrowser(Object*) : OcBrowser(NULL, NULL) { } SectionBrowser::~SectionBrowser(){ delete sbi_; } void SectionBrowser::accept() { printf("accepted %d\n", int(selected())); Section* sec = sbi_->psec_[int(selected())]; if (sec->prop) { nrn_pushsec(sec); if (sbi_->mvt_->parameter_select()) { section_menu(-1, nrnocCONST, sbi_->ms_); } if (sbi_->mvt_->state_select()) { section_menu(.5, STATE, sbi_->ms_); } if (sbi_->mvt_->assigned_select()) { section_menu(.5, 2, sbi_->ms_); } nrn_popsec(); }else{ printf("This section was deleted\n"); } } void SectionBrowser::select(GlyphIndex i) { if (sbi_->psec_[int(i)]->prop) { FileBrowser::select(i); }else{ FileBrowser::select(-1); } // printf("selected\n"); } void SectionBrowser::make_section_browser() { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); SectionBrowser* sb = new SectionBrowser(); Window* w = new StandardWindow ( lk.hbox( sb->standard_glyph(), lk.hspace(5), lk.vbox( sb->sbi_->mvt_, lk.vspace(5), sb->sbi_->ms_ ) ) ); w->map(); } //--------------------------------------------------- /* static */ class PBrowserAccept : public Action { public: PBrowserAccept(PointProcessBrowser*); virtual ~PBrowserAccept(); virtual void execute(); private: PointProcessBrowser* b_; }; PBrowserAccept::PBrowserAccept(PointProcessBrowser* b){b_ = b;} PBrowserAccept::~PBrowserAccept(){} void PBrowserAccept::execute(){b_->accept();} /* static */ class PPBImpl { friend class PointProcessBrowser; PPBImpl(OcList*); virtual ~PPBImpl(); OcList* ocl_; }; PPBImpl::PPBImpl(OcList* ocl) { ocl_ = ocl; Resource::ref(ocl_); } PPBImpl::~PPBImpl() { Resource::unref(ocl_); } PointProcessBrowser::PointProcessBrowser(OcList* ocl) : OcBrowser(new PBrowserAccept(this), NULL) { ppbi_ = new PPBImpl(ocl); long i, cnt = ocl->count(); for (i=0; i < cnt; ++i) { append_pp(ocl->object(i)); } } PointProcessBrowser::~PointProcessBrowser() { delete ppbi_; } void PointProcessBrowser::make_point_process_browser(OcList* ocl) { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); PointProcessBrowser* ppb = new PointProcessBrowser(ocl); SectionBrowser* sb = new SectionBrowser(); Window* w = new StandardWindow ( lk.hbox( sb->standard_glyph(), lk.hspace(5), ppb->standard_glyph() ) ); w->map(); } void PointProcessBrowser::append_pp(Object* ob) { append_item(hoc_object_name(ob)); } void PointProcessBrowser::remove_pp() { GlyphIndex i = selected(); if (i >= 0) { remove_selectable(i); ppbi_->ocl_->remove(i); refresh(); } } void PointProcessBrowser::add_pp(Object* ob) { ppbi_->ocl_->append(ob); append_pp(ob); select(ppbi_->ocl_->count() - 1); refresh(); } void PointProcessBrowser::select(GlyphIndex i) { FileBrowser::select(i); Object* ob = ppbi_->ocl_->object(i); printf("selected %s\n", hoc_object_name(ob)); } void PointProcessBrowser::accept() { printf("PointProcessBrowser::accept\n"); } #endif neuron-7.5/src/nrniv/secbrows.h000066400000000000000000000035161323325274500166310ustar00rootroot00000000000000#ifndef secbrowser_h #define secbrowser_h #include #include "ocbrowsr.h" class TelltaleState; struct Object; class SectionBrowserImpl; class MechSelector; class OcList; class PPBImpl; class HocCommand; struct Section; extern void section_menu(double, int, MechSelector* = NULL); class MechVarType : public MonoGlyph { public: MechVarType(); virtual ~MechVarType(); bool parameter_select(); bool assigned_select(); bool state_select(); private: bool select(int); private: TelltaleState* tts_[3]; }; class MechSelector : public MonoGlyph { public: MechSelector(); virtual ~MechSelector(); bool is_selected(int type); int begin(); bool done(); int next(); private: TelltaleState** tts_; int iterator_; }; class OcSectionBrowser : public OcBrowser { public: OcSectionBrowser(Object*); virtual ~OcSectionBrowser(); virtual void accept(); virtual void select_section(Section*); virtual void set_select_action(const char*, Object*); virtual void set_accept_action(const char*, Object*); virtual void select(GlyphIndex); private: Section** psec_; int scnt_; HocCommand* select_; HocCommand* accept_; bool select_is_pycallback_; Object* select_pycallback_; bool accept_is_pycallback_; Object* accept_pycallback_; }; class SectionBrowser : public OcBrowser { public: SectionBrowser(); SectionBrowser(Object*); virtual ~SectionBrowser(); static void make_section_browser(); void accept(); virtual void select(GlyphIndex); private: SectionBrowserImpl* sbi_; }; class PointProcessBrowser : public OcBrowser { public: PointProcessBrowser(OcList*); virtual ~PointProcessBrowser(); static void make_point_process_browser(OcList*); void accept(); virtual void select(GlyphIndex); virtual void add_pp(Object*); virtual void remove_pp(); virtual void append_pp(Object*); private: PPBImpl* ppbi_; }; #endif neuron-7.5/src/nrniv/shape.cpp000066400000000000000000001366161323325274500164450ustar00rootroot00000000000000#include <../../nrnconf.h> #include "classreg.h" #if HAVE_IV // to end of file #define BEVELJOIN 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mymath.h" #include "apwindow.h" //really only need colors from graph.h #include "graph.h" #include "shapeplt.h" #include "rubband.h" #include "scenepic.h" #include "rot3band.h" #include "nrnoc2iv.h" #include "objcmd.h" #include "idraw.h" #include "hocmark.h" #include "ocobserv.h" #include "parse.h" #include "ivoc.h" #define Shape_Section_ "Section PlotShape" #define Shape_Rotate_ "Rotate3D PlotShape" #define Shape_Style_ "ShapeStyle PlotShape" extern "C" { void nrn_define_shape(); extern int nrn_shape_changed_; extern int structure_change_cnt; extern int section_count; extern Section** secorder; extern Point_process* ob2pntproc(Object*); extern Point_process* ob2pntproc_0(Object*); extern double* nrn_recalc_ptr(double*); extern Object* (*nrnpy_seg_from_sec_x)(Section*, double); } #if BEVELJOIN static long beveljoin_ = 0; #endif static ShapeScene* volatile_ptr_ref; class ShapeChangeObserver : public Observer { public: ShapeChangeObserver(ShapeScene*); virtual ~ShapeChangeObserver(); virtual void update(Observable*); void force(); bool needs_update() { return (shape_changed_ != nrn_shape_changed_);} private: int shape_changed_; int struc_changed_; ShapeScene* s_; }; static const Color* sec_sel_color() { static const Color* lt = NULL; if (!lt) { String c; Display* dis = Session::instance()->default_display(); if (!dis->style()->find_attribute("section_select_color", c) || ( lt = Color::lookup(dis, c)) == NULL) { lt = Color::lookup(dis, "#ff0000"); } lt->ref(); } return lt; } static const Color* sec_adjacent_color() { static const Color* lt = NULL; if (!lt) { String c; Display* dis = Session::instance()->default_display(); if (!dis->style()->find_attribute("section_adjacent_color", c) || ( lt = Color::lookup(dis, c)) == NULL) { lt = Color::lookup(dis, "#00ff00"); } lt->ref(); } return lt; } inline float norm(float x, float y) { return (x*x + y*y);} /* static */ class OcShape; //must be append_fixed to OcShape or else... /* static */ class PointMark : public MonoGlyph, public Observer { public: PointMark(OcShape*, Object*, const Color*, const char style = 'O', float size = 8.); virtual ~PointMark(); virtual void update(Observable*); virtual void disconnect(Observable*); virtual void draw(Canvas*, const Allocation&) const; const Object* object() {return ob_;} virtual void set_loc(Section*, float x); bool everything_ok(); private: GlyphIndex i_; Coord x_, y_; Object* ob_; OcShape* sh_; Section* sec_; float xloc_; }; class OcShapeHandler; /* static */ class OcShape : public ShapeScene { public: OcShape(SectionList* = NULL); virtual ~OcShape(); virtual void select_section(Section*); virtual void handle_picked(); virtual void selected(ShapeSection* s, Coord x, Coord y) { ShapeScene::selected(s, x, y); } virtual ShapeSection* selected() { return ShapeScene::selected(); } virtual void set_select_action(const char*); virtual void set_select_action(Object*); virtual void save_phase1(ostream&); virtual PointMark* point_mark(Object*, const Color*, const char style = 'O',const float size = 8.); virtual PointMark* point_mark(Section*, float x, const Color*); virtual void point_mark_remove(Object* pp = NULL); virtual void transform3d(Rubberband* rb = NULL); virtual void erase_all(); virtual void sel_color(ShapeSection* sold, ShapeSection* snew); private: HocCommand* select_; PolyGlyph* point_mark_list_; OcShapeHandler* osh_; ShapeSection* sold_; bool show_adjacent_selection_; }; /*static*/ class OcShapeHandler : public SectionHandler { public: OcShapeHandler(OcShape*); virtual ~OcShapeHandler(); virtual bool event(Event&); private: OcShape* s_; }; OcShapeHandler::OcShapeHandler(OcShape* s) { s_ = s; } OcShapeHandler::~OcShapeHandler() {} bool OcShapeHandler::event(Event&) { s_->handle_picked(); return true; } #endif //HAVE_IV // Shape class registration for oc static double sh_view(void* v) { #if HAVE_IV IFGUI OcShape* sh = (OcShape*)v; if (ifarg(8)) { Coord x[8]; int i; for (i=0; i < 8; ++i) { x[i] = *getarg(i+1); } sh->view(x); } ENDGUI #endif return 1.; } static double sh_flush(void* v) { #if HAVE_IV IFGUI ((ShapeScene*)v)->flush(); ENDGUI #endif return 1.; } static double sh_begin(void*) {// a noop. Exists only because graphs and return 1.; // shapes are often in same list } static double sh_save_name(void* v) { #if HAVE_IV IFGUI ((ShapeScene*)v)->name(gargstr(1)); ENDGUI #endif return 1.; } static double sh_select(void* v) { #if HAVE_IV IFGUI Section* sec = chk_access(); ((OcShape*)v)->select_section(sec); ENDGUI #endif return 1.; } static double sh_select_action(void* v) { #if HAVE_IV IFGUI if (hoc_is_object_arg(1)) { ((OcShape*)v)->set_select_action(*hoc_objgetarg(1)); }else{ ((OcShape*)v)->set_select_action(gargstr(1)); } ENDGUI #endif return 1.; } static double sh_view_count(void* v) { int n = 0; #if HAVE_IV IFGUI n = ((ShapeScene*)v)->view_count(); ENDGUI #endif return double(n); } double nrniv_sh_nearest(void* v) { double d = 0.; #if HAVE_IV IFGUI d = ((ShapeScene*)v)->nearest(*getarg(1), *getarg(2)); ENDGUI #endif return d; } double nrniv_sh_push(void* v) { double d = -1.; #if HAVE_IV IFGUI ShapeScene* ss = (ShapeScene*)v; ShapeSection* s = ss->selected(); if (s && s->good()) { nrn_pushsec(s->section()); d = ss->arc_selected(); } ENDGUI #endif return d; } Object** nrniv_sh_nearest_seg(void* v) { Object* obj = NULL; #if HAVE_IV IFGUI ShapeScene* ss = (ShapeScene*)v; ShapeSection* ssec = NULL; double d = ss->nearest(*getarg(1), *getarg(2)); ssec = ss->selected(); if (d < 1e15 && nrnpy_seg_from_sec_x && ssec) { d = ss->arc_selected(); obj = (*nrnpy_seg_from_sec_x)(ssec->section(), d); } --obj->refcount; ENDGUI #endif return hoc_temp_objptr(obj); } Object** nrniv_sh_selected_seg(void* v) { Object* obj = NULL; #if HAVE_IV IFGUI ShapeScene* ss = (ShapeScene*)v; ShapeSection* ssec = NULL; ssec = ss->selected(); if (nrnpy_seg_from_sec_x && ssec) { double d = ss->arc_selected(); obj = (*nrnpy_seg_from_sec_x)(ssec->section(), d); } --obj->refcount; ENDGUI #endif return hoc_temp_objptr(obj); } double nrniv_sh_observe(void* v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; SectionList* sl = NULL; if (ifarg(1)) { Object* o = *hoc_objgetarg(1); check_obj_type(o, "SectionList"); sl = new SectionList(o); sl->ref(); s->observe(sl); sl->unref(); }else{ s->observe(NULL); } ENDGUI #endif return 0.; } double nrniv_sh_rotate(void* v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; if (!ifarg(1)) { // identity s->rotate(); }else{ // defines origin (absolute) and rotation // (relative to the current coord system) s->rotate(*getarg(1), *getarg(2), *getarg(3), *getarg(4), *getarg(5), *getarg(6) ); } ENDGUI #endif return 0.; } static double sh_unmap(void*v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; s->dismiss(); ENDGUI #endif return 0.; } double nrniv_sh_color(void*v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; const Color* c = NULL; c = colors->color(int(*getarg(1))); s->color(chk_access(), c); ENDGUI #endif return 0.; } double nrniv_sh_color_all(void*v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; const Color* c = NULL; c = colors->color(int(*getarg(1))); s->color(c); ENDGUI #endif return 0.; } double nrniv_sh_color_list(void*v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; const Color* c = NULL; c = colors->color(int(*getarg(2))); s->color(new SectionList(*hoc_objgetarg(1)), c); ENDGUI #endif return 0.; } static double sh_point_mark(void* v) { #if HAVE_IV IFGUI OcShape* s = (OcShape*)v; char style = 'O'; float size = 8.; if (hoc_is_object_arg(1)) { if (ifarg(3)) { if (hoc_is_str_arg(3)) { style = *gargstr(3); } else { style = char(chkarg(3, 0, 127)); } } if (ifarg(4)) { size = float(chkarg(4, 1e-9, 1e9)); } s->point_mark(*hoc_objgetarg(1), colors->color(int(*getarg(2))), style, size); }else{ s->point_mark(chk_access(), chkarg(1,0.,1.), colors->color(int(*getarg(2)))); } ENDGUI #endif return 0.; } static double sh_point_mark_remove(void* v) { #if HAVE_IV IFGUI Object* o = NULL; OcShape* s = (OcShape*)v; if (ifarg(1)) { o = *hoc_objgetarg(1); } s->point_mark_remove(o); ENDGUI #endif return 0.; } static double sh_printfile(void* v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; s->printfile(gargstr(1)); ENDGUI #endif return 1.; } static double sh_show(void* v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; s->shape_type(int(chkarg(1, 0., 2.))); ENDGUI #endif return 1.; } extern double ivoc_gr_menu_action(void* v); static double exec_menu(void* v) { #if HAVE_IV IFGUI ((Scene*)v)->picker()->exec_item(gargstr(1)); ENDGUI #endif return 0.; } double nrniv_len_scale(void* v) { #if HAVE_IV IFGUI ShapeScene* scene = (ShapeScene*)v; ShapeSection* ss = scene->shape_section(chk_access()); if (ss) { if (ifarg(1)) { ss->scale(chkarg(1, 1e-9, 1e9)); scene->force(); } return ss->scale(); } ENDGUI #endif return 0.; } extern double ivoc_gr_menu_tool(void*); extern double ivoc_gr_mark(void*); extern double ivoc_gr_size(void*); extern double ivoc_gr_label(void*); extern double ivoc_gr_line(void*); extern double ivoc_gr_begin_line(void*); extern double ivoc_gr_erase(void*); extern double ivoc_gr_gif(void*); extern double ivoc_erase_all(void*); static Member_func sh_members[] = { "nearest", nrniv_sh_nearest, "push_selected", nrniv_sh_push, "view", sh_view, "size", ivoc_gr_size, "flush", sh_flush, "begin", sh_begin, "view_count", sh_view_count, "select", sh_select, "action", sh_select_action, "save_name", sh_save_name, "unmap", sh_unmap, "color", nrniv_sh_color, "color_all", nrniv_sh_color_all, "color_list", nrniv_sh_color_list, "point_mark", sh_point_mark, "point_mark_remove", sh_point_mark_remove, "point_mark_remove", sh_point_mark_remove, "printfile", sh_printfile, "show", sh_show, "menu_action", ivoc_gr_menu_action, "menu_tool", ivoc_gr_menu_tool, "exec_menu", exec_menu, "observe", nrniv_sh_observe, "rotate", nrniv_sh_rotate, "beginline", ivoc_gr_begin_line, "line", ivoc_gr_line, "label", ivoc_gr_label, "mark", ivoc_gr_mark, "erase", ivoc_gr_erase, "erase_all", ivoc_erase_all, "len_scale", nrniv_len_scale, "gif", ivoc_gr_gif, 0,0 }; static Member_ret_obj_func retobj_members[] = { "nearest_seg", nrniv_sh_nearest_seg, "selected_seg", nrniv_sh_selected_seg }; static void* sh_cons(Object* ho) { #if HAVE_IV OcShape* sh = NULL; IFGUI int i=1; int iarg=1; SectionList* sl = NULL; // first arg may be an object. if (ifarg(iarg)) { if (hoc_is_object_arg(iarg)) { sl = new SectionList(*hoc_objgetarg(iarg)); sl->ref(); ++iarg; } } if (ifarg(iarg)) { i = int(chkarg(iarg,0,1)); } sh = new OcShape(sl); Resource::unref(sl); sh->ref(); sh->hoc_obj_ptr(ho); if (i) { sh->view(200); } ENDGUI return (void*)sh; #endif return 0; } static void sh_destruct(void* v) { #if HAVE_IV IFGUI ((ShapeScene*)v)->dismiss(); Resource::unref((OcShape*)v); ENDGUI #endif } void Shape_reg() { // printf("Shape_reg\n"); class2oc("Shape", sh_cons, sh_destruct, sh_members, NULL, retobj_members, NULL); } #if HAVE_IV OcShape::OcShape(SectionList* sl):ShapeScene(sl){ select_ = NULL; point_mark_list_ = NULL; osh_ = new OcShapeHandler(this); osh_->ref(); section_handler(osh_); sold_ = NULL; Display* dis = Session::instance()->default_display(); show_adjacent_selection_ = dis->style()->value_is_on("show_adjacent_selection"); } OcShape::~OcShape(){ if (select_) delete select_; Resource::unref(point_mark_list_); osh_->unref(); Resource::unref(sold_); } void OcShape::erase_all() { Resource::unref(point_mark_list_); point_mark_list_ = NULL; ShapeScene::erase_all(); } PointMark* OcShape::point_mark(Object* ob, const Color* c, const char style, const float size) { if (!point_mark_list_) { point_mark_list_ = new PolyGlyph(); } PointMark* g = new PointMark(this, ob, c, style, size); point_mark_list_->append(g); append_fixed(new GraphItem(g, 0)); if (!g->everything_ok()) { point_mark_list_->remove(point_mark_list_->count()-1); remove(glyph_index(g)); return NULL; } return g; } PointMark* OcShape::point_mark(Section* sec, float x, const Color* c) { if (!point_mark_list_) { point_mark_list_ = new PolyGlyph(); } PointMark* g = new PointMark(this, NULL, c); g->set_loc(sec, x); point_mark_list_->append(g); append_fixed(new GraphItem(g, 0)); if (!g->everything_ok()) { point_mark_list_->remove(point_mark_list_->count()-1); remove(glyph_index(g)); return NULL; } return g; } void OcShape::point_mark_remove(Object* o) { if (point_mark_list_) { if (o) { GlyphIndex i, cnt = point_mark_list_->count(); for (i=cnt-1; i >= 0; --i) { PointMark* g = (PointMark*)point_mark_list_->component(i); if (g->object() == o) { remove(glyph_index(g)); point_mark_list_->remove(i); break; } } }else{ while(point_mark_list_->count()) { remove(glyph_index(point_mark_list_->component(0))); point_mark_list_->remove(0); } } } } void OcShape::set_select_action(const char* s) { if (select_) { delete select_; } select_ = new HocCommand(s); } void OcShape::set_select_action(Object* pobj) { if (select_) { delete select_; } select_ = new HocCommand(pobj); } void OcShape::sel_color(ShapeSection* sold, ShapeSection* snew) { ShapeSection* ss; Section* s; const Color* c; if (sold) { c = Scene::default_foreground(); s = sold->section(); sold->setColor(c, this); if (show_adjacent_selection_) { ss = shape_section(s->parentsec); if (ss) { ss->setColor(c, this); } for (s = s->child; s; s = s->sibling) { ss = shape_section(s); if (ss) { ss->setColor(c, this); } } } } if (snew) { c = sec_sel_color(); snew->setColor(c, this); c = sec_adjacent_color(); s = snew->section(); if (show_adjacent_selection_) { ss = shape_section(s->parentsec); if (ss) { ss->setColor(c, this); } for (s = s->child; s; s = s->sibling) { ss = shape_section(s); if (ss) { ss->setColor(c, this); } } } } } void OcShape::select_section(Section* sec) { ShapeSection* s1 = ShapeScene::selected(); ShapeSection* ss; Section* s; const Color* c; ss = shape_section(sec); sel_color(s1, ss); if (ss) { ShapeScene::selected(ss); Resource::ref(ss); Resource::unref(sold_); sold_ = ss; } } void OcShape::handle_picked() { ShapeSection* s1 = ShapeScene::selected(); if (!s1 || !s1->good()) { return; } sel_color(sold_, s1); if (sold_) { sold_->unref(); } sold_ = s1; sold_->ref(); if (select_) { nrn_pushsec(s1->section()); hoc_ac_ = arc_selected(); //printf("arc_selected %g\n", hoc_ac_); select_->execute(); nrn_popsec(); } } void OcShape::save_phase1(ostream& o) { o << "{" << endl; save_class(o, "Shape"); } #if 1 //ShapeView ShapeView::ShapeView(ShapeScene* s) : View( (s->x1() + s->x2())/2, (s->y1() + s->y2())/2, Math::max(s->x2() - s->x1(), s->y2() - s->y1())*1.1, s // ,150*(s->x2() - s->x1())/Math::max(s->x2() - s->x1(), s->y2() - s->y1()), // 150*(s->y2() - s->y1())/Math::max(s->x2() - s->x1(), s->y2() - s->y1()) ) { } ShapeView::ShapeView(ShapeScene* s, Coord* x) : View( x[0],x[1],x[2],x[3], s, x[6], x[7] ) { Coord x1, y1, x2, y2; zout(x1, y1, x2, y2); size(x1, y1, x2, y2); } ShapeView::~ShapeView() {} #endif /* static */ class ShapeType : public Action { public: ShapeType(int); virtual ~ShapeType(); virtual void execute(); private: int shapetype_; }; ShapeType::ShapeType(int st) { shapetype_ = st; } ShapeType::~ShapeType() {} void ShapeType::execute() { if (Oc::helpmode()) { Oc::help(Shape_Style_); } ShapeScene::current_pick_scene()->shape_type(shapetype_); } //declareHandlerCallback(ShapeScene) //implementHandlerCallback(ShapeScene) declareRubberCallback(ShapeScene) implementRubberCallback(ShapeScene) declareActionCallback(ShapeScene) implementActionCallback(ShapeScene) void ShapeScene::observe(SectionList* sl) { GlyphIndex i, cnt; hoc_Item* qsec; Section* sec; ShapeSection* gl; while(sg_->count()) { gl = (ShapeSection*)sg_->component(sg_->count()-1); i = glyph_index(gl); remove(i); sg_->remove(sg_->count()-1); } if (sl) { // haven't figured out a way to save this view_all_ = false; for (sec = sl->begin(); sec; sec = sl->next()) { gl = new ShapeSection(sec); append(new FastGraphItem(gl, 0)); sg_->append(gl); } }else{ view_all_ = true; ForAllSections(sec) gl = new ShapeSection(sec); append(new FastGraphItem(gl, 0)); sg_->append(gl); } } recalc_diam(); selected_ = NULL; volatile_ptr_ref = NULL; transform3d(); if (shape_changed_) { force(); flush(); } } void ShapeScene::force() { shape_changed_->force(); } ShapeScene::ShapeScene(SectionList* sl) : Graph(0) { nrn_define_shape(); new_size(-100,-100,100,100); erase_axis(); WidgetKit& wk = *WidgetKit::instance(); sg_ = new PolyGlyph(); sg_->ref(); shape_changed_ = NULL; //observe not ready for it yet r3b_ = new Rotate3Band(NULL,new RubberCallback(ShapeScene)( this, &ShapeScene::transform3d)); r3b_->ref(); observe(sl); var_name_ = NULL; wk.style()->find_attribute("shape_beveljoin", beveljoin_); MenuItem* mi; Menu* m; shape_type_ = ShapeScene::show_centroid; section_handler_ = NULL; selected_ = NULL; picker(); picker()->remove_item("Crosshair"); picker()->remove_item("Plot what?"); picker()->remove_item("Pick Vector"); picker()->remove_item("Color/Brush"); picker()->remove_item("Keep Lines"); picker()->remove_item("Family Label?"); picker()->remove_item("Erase"); picker()->remove_item("Remove"); picker()->bind_select((OcHandler*)NULL); MenuItem* m2 = picker()->add_radio_menu("Section",(OcHandler*)NULL, SECTION); m2->state()->set(TelltaleState::is_chosen, true); picker()->add_radio_menu("3D Rotate", r3b_, 0, ROTATE); picker()->add_menu("Redraw Shape", new ActionCallback(ShapeScene)(this, &ShapeScene::flush)); m = wk.pullright(); mi = wk.menu_item("Show Diam"); mi->action(new ShapeType(ShapeScene::show_diam)); picker()->add_menu("Show Diam", mi, m); mi = wk.menu_item("Centroid"); mi->action(new ShapeType(ShapeScene::show_centroid)); picker()->add_menu("Centroid", mi, m); mi = wk.menu_item("Schematic"); mi->action(new ShapeType(ShapeScene::show_schematic)); picker()->add_menu("Schematic", mi, m); mi = wk.menu_item("Shape Style"); mi->menu(m); picker()->add_menu(mi); Requisition req; Coord x1, y1, x2, y2; Coord xt1 = 0, yt1 = 0, xt2 = 0, yt2 = 0; GlyphIndex i, cnt = count(); for (i=0; i < cnt; ++i) { component(i)->request(req); MyMath::box(req, x1, y1, x2, y2); xt1 = Math::min(x1, xt1); yt1 = Math::min(y1, yt1); xt2 = Math::max(x2, xt2); yt2 = Math::max(y2, yt2); } Scene::new_size(xt1, yt1, xt2, yt2); color_value_ = new ColorValue(); Resource::ref(color_value_); shape_changed_ = new ShapeChangeObserver(this); } void ShapeScene::help() { switch (tool()) { case SECTION: Oc::help(Shape_Section_); break; case ROTATE: Oc::help(Shape_Rotate_); break; default: Scene::help(); break; } } #if 0 StandardPicker* ShapeScene::picker() { return picker_;} #endif ShapeScene::~ShapeScene(){ volatile_ptr_ref = NULL; Resource::unref(section_handler_); Resource::unref(color_value_); Resource::unref(sg_); Resource::unref(r3b_); delete shape_changed_; if (var_name_) { delete var_name_; } } void ShapeScene::erase_all() { Resource::unref(sg_); sg_ = new PolyGlyph(); sg_->ref(); volatile_ptr_ref = NULL; Graph::erase_all(); } void ShapeScene::rotate() { Rotation3d* rot = r3b_->rotation(); rot->identity(); transform3d(); } void ShapeScene::rotate(Coord xorg, Coord yorg, Coord zorg, float xrad, float yrad, float zrad) { Rotation3d* rot = r3b_->rotation(); rot->origin(xorg, yorg, zorg); rot->rotate_x(xrad); rot->rotate_y(yrad); rot->rotate_z(zrad); transform3d(); } void ShapeScene::transform3d(Rubberband*) { Rotation3d* rot = r3b_->rotation(); Coord x, y; // rb->transformer().inverse_transform(rb->x_begin(), rb->y_begin(), x, y); // printf("ShapeScene::transform3d %g %g\n", x, y); long i, n; for (i=0; i < section_count; ++i) { ShapeSection* ss = shape_section(secorder[i]); if (ss) { ss->transform3d(rot); } } n = count(); for (i=0; i < n; ++i) { modified(i); } } void ShapeScene::flush() { if (shape_changed_->needs_update()) { shape_changed_->update(NULL); }else{ damage_all(); } } void ShapeScene::wholeplot(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const { long i, j, n = sg_->count(); Coord l, b, r, t; x1 = y1 = 1e9; x2 = y2 = -1e9; for (i=0; i < n; ++i) { ((ShapeSection*)sg_->component(i))->size(l, b, r, t); x1 = Math::min(x1, l); x2 = Math::max(x2, r); y1 = Math::min(y1, b); y2 = Math::max(y2, t); } if (x1 >= x2 || y1 >= y2) { Scene::wholeplot(x1, y1, x2, y2); } } ColorValue* ShapeScene::color_value() { return color_value_;} PolyGlyph* ShapeScene::shape_section_list() { return sg_;} void ShapeScene::name(const char* s) { if (!var_name_) { var_name_ = new CopyString(s); }else{ *var_name_ = s; } } void ShapeScene::save_phase2(ostream& o) { char buf[256]; if (var_name_) { if ((var_name_->string())[var_name_->length() - 1] == '.') { sprintf(buf, "%sappend(save_window_)", var_name_->string()); }else{ sprintf(buf, "%s = save_window_", var_name_->string()); } o << buf << endl; sprintf(buf, "save_window_.save_name(\"%s\")", var_name_->string()); o << buf << endl; } Graph::save_phase2(o); } void ShapeScene::view(Rubberband* rb) { Coord x1, y1, x2, y2, t, b, l, r; ((RubberRect*)rb)->get_rect_canvas(l,b,r,t); ((RubberRect*)rb)->get_rect(x1, y1, x2, y2); printf("new view with %g %g %g %g\n", x1, y1, x2, y2); #if 0 double d1, d2; int ntic; MyMath::round_range(x1, x2, d1, d2, ntic); x1 = d1; x2 = d2; MyMath::round_range(y1, y2, d1, d2, ntic); y1 = d1; y2 = d2; #endif View* v; ViewWindow* w = new ViewWindow( v = new View((x2+x1)/2, (y1+y2)/2, x2 - x1, this, r - l, (r - l)*(y2 - y1)/(x2 - x1)), "Shape" ); const Event& e = rb->event(); w->place(l + e.pointer_root_x() - e.pointer_x(), b + e.pointer_root_y() - e.pointer_y()); w->map(); } void ShapeScene::section_handler(SectionHandler* h) { Resource::ref(h); Resource::unref(section_handler_); section_handler_ = h; } SectionHandler* ShapeScene::section_handler(ShapeSection* ss) { if (section_handler_) { section_handler_->shape_section(ss); } return section_handler_; } SectionHandler* ShapeScene::section_handler() { return section_handler_; } void ShapeScene::shape_type(int s) { shape_type_ = s; damage_all(); } float ShapeScene::nearest(Coord x, Coord y) { GlyphIndex i, cnt = sg_->count(); float d2, d = 1e20; for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)sg_->component(i); if (ss->good()) { d2 = ss->how_near(x, y); if (d2 < d) { selected(ss, x, y); d = d2; } } } // printf("nearest %s %g\n", hoc_section_pathname(selected()->section()), d); return d; } ShapeSection* ShapeScene::shape_section(Section* sec) { GlyphIndex i, cnt = sg_->count(); if (this != volatile_ptr_ref) { volatile_ptr_ref = this; for (i=0; i < section_count; ++i) { secorder[i]->volatile_ptr = NULL; } for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)sg_->component(i); if (ss->good()) { ss->section()->volatile_ptr = ss; } } } return sec ? (ShapeSection*)sec->volatile_ptr : NULL; } //color the shapesections static bool par_helper(Section* sec) { /* decide whether a sec with 2 marks should be colored. yes if there are not two single marked children connected at same location or any double marked children */ Section* csec; double y, x = -1.; for (csec = sec->child; csec; csec = csec->sibling) { switch(nrn_value_mark(csec)) { case 1: y = nrn_connection_position(csec); if (x == y) { return false; } x = y; break; case 2: return false; } } return true; } void ShapeScene::color(Section* sec1, Section* sec2, const Color* c) { nrn_clear_mark(); Section* sec; for (sec = sec1; sec; sec = nrn_trueparent(sec)) { nrn_increment_mark(sec); } for (sec = sec2; sec; sec = nrn_trueparent(sec)) { nrn_increment_mark(sec); } GlyphIndex i, cnt = sg_->count(); for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)sg_->component(i); if (ss->good()) { switch (nrn_value_mark(ss->section())) { case 1: ss->setColor(c, this); break; case 2: if (par_helper(ss->section())) { ss->setColor(c, this); } break; } } } } void ShapeScene::color(Section* sec, const Color* c) { ShapeSection* ss = shape_section(sec); if (ss && ss->color() != c) { ss->setColor(c, this); } } void ShapeScene::color(const Color* c) { GlyphIndex i, cnt = sg_->count(); for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)sg_->component(i); if (ss->color() != c && ss->good()) { ss->setColor(c, this); } } } void ShapeScene::color(SectionList* sl, const Color* c) { Resource::ref(sl); nrn_clear_mark(); for (Section* sec = sl->begin(); sec; sec = sl->next()) { nrn_increment_mark(sec); } GlyphIndex i, cnt = sg_->count(); for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)sg_->component(i); if (ss->color() != c && ss->good() && nrn_value_mark(ss->section())) { ss->setColor(c, this); } } Resource::unref(sl); } void ShapeScene::view(Coord) { ShapeView* v = new ShapeView(this); ViewWindow* w = new ViewWindow(v, "Shape"); w->map(); } void ShapeScene::view(Coord* x) { ShapeView* v = new ShapeView(this, x); ViewWindow* w = new ViewWindow(v, "Shape"); w->xplace(int(x[4]), int(x[5])); w->map(); } ShapeSection* ShapeScene::selected() { return selected_; } void ShapeScene::selected(ShapeSection* s, Coord x, Coord y) { selected_ = s; x_sel_ = x; y_sel_ = y; } float ShapeScene::arc_selected() { if (!selected() || x_sel_ == fil) { return .5; } return selected()->arc_position(x_sel_, y_sel_); } ShapeSection::ShapeSection(Section* sec) { sec_ = sec; section_ref(sec_); color_ = Scene::default_foreground(); color_->ref(); old_ = NULL; pvar_ = NULL; scale(1.); if (sec_->npt3d == 0) { nrn_define_shape(); } n_ = sec_->npt3d; assert(n_); x_ = new float[n_]; y_ = new float[n_]; // Rotation3d rot; // transform3d(&rot); } ShapeSection::~ShapeSection() { color_->unref(); int n = sec_->npt3d -1; delete [] x_; delete [] y_; clear_variable(); section_unref(sec_); } void ShapeSection::transform3d(Rotation3d* rot) { int i; if (!good()) { return; } if (n_ != sec_->npt3d) { if (sec_->npt3d == 0) { nrn_define_shape(); } n_ = sec_->npt3d; delete [] x_; delete [] y_; x_ = new float[n_]; y_ = new float[n_]; } float r[3]; Coord x0, y0, xp, yp; r[0] = sec_->pt3d[0].x; r[1] = sec_->pt3d[0].y; r[2] = sec_->pt3d[0].z; rot->rotate(r,r); xp = x0 = r[0]; yp = y0 = r[1]; // needed for len_scale since each section has to be translated to // its connection point Section* ps = nrn_trueparent(sec_); if (ps && ps->volatile_ptr) { ShapeSection* pss = (ShapeSection*)ps->volatile_ptr; // need the connection position relative to the trueparent Section* sec; for (sec = sec_; sec->parentsec != ps; sec = sec->parentsec){ ; } pss->loc(nrn_connection_position(sec), xp, yp); } // but need to deal with the logical_connection which may exist // on any section between sec and trueparent. Just hope there is // no more than one. Coord xinc = 0; Coord yinc = 0; Pt3d* logic_con = NULL; if (ps) { for (Section* sec = sec_; sec != ps; sec = sec->parentsec) { logic_con = sec->logical_connection; if (logic_con) { break; } } } if (logic_con) { r[0] = logic_con->x; r[1] = logic_con->y; r[2] = logic_con->z; rot->rotate(r,r); xinc = x0 - r[0]; yinc = y0 - r[1]; } xp += xinc; yp += yinc; for (i=0; i < n_; ++i) { r[0] = sec_->pt3d[i].x; r[1] = sec_->pt3d[i].y; r[2] = sec_->pt3d[i].z; rot->rotate(r, r); x_[i] = xp + len_scale_*(r[0] - x0);// *100./(100. - r[2]); y_[i] = yp + len_scale_*(r[1] - y0);// *100./(100. - r[2]); } Coord x = x_[0]; Coord y = y_[0]; Coord d2 = Math::abs(sec_->pt3d[0].d)/2 + 1; xmin_ = x - d2; xmax_ = x + d2; ymin_ = y - d2; ymax_ = y + d2; for (i=1; i < n_; i++) { x = x_[i]; y = y_[i]; d2 = Math::abs(sec_->pt3d[i].d)/2 + 1; xmin_ = Math::min(xmin_, x-d2); xmax_ = Math::max(xmax_, x+d2); ymin_ = Math::min(ymin_, y-d2); ymax_ = Math::max(ymax_, y+d2); } } void ShapeSection::loc(double arc, Coord& x, Coord& y) { double a = arc0at0(sec_) ? arc : 1. - arc; double len = section_length(sec_); int i; if (a <= .0001) { i = 0; }else if (a >= .999) { i = sec_->npt3d - 1; }else{ a *= len; for (i = 1; i < sec_->npt3d; ++ i) { #if 0 // the nearest 3-d point if (a < (sec_->pt3d[i].arc + sec_->pt3d[i-1].arc)) { break; } #else //above is not good if 3-d points are far apart and not near center of // a segment. So return the location at the center of the segment. if (a <= sec_->pt3d[i].arc) { float a1 = sec_->pt3d[i-1].arc; float a2 = sec_->pt3d[i].arc; if (a2 > a1) { float t1 = (a - a1)/(a2 - a1); x = x_[i]*t1 + x_[i-1]*(1. - t1); y = y_[i]*t1 + y_[i-1]*(1. - t1); return; }else{ break; } } #endif } i -= 1; } x = x_[i]; y = y_[i]; } #if 0 void ShapeSection::update(Observable* o) { TelltaleState* t = (TelltaleState*)o; printf("update %d %d\n", secname(section()), t->flags()); if (t->test(TelltaleState::is_enabled_active)) { setColor(sec_sel_color()); ShapeScene::current_pick_scene()->selected(this); }else if (t->test(TelltaleState::is_enabled)) { if (color_ == sec_sel_color()) { //printf("setting to dark\n"); setColor(Scene::default_foreground()); } ShapeScene::current_pick_scene()->selected(NULL); } } #endif void ShapeSection::request(Requisition& req) const { // Requirement rx(xmax_ - xmin_, 0, 0, -xmin_/(xmax_ - xmin_)); // Requirement ry(ymax_ - ymin_, 0, 0, -ymin_/(ymax_ - ymin_)); Requirement rx( -xmin_, -xmin_, -xmin_, xmax_, xmax_, xmax_); Requirement ry( -ymin_, -ymin_, -ymin_, ymax_, ymax_, ymax_); req.require(Dimension_X, rx); req.require(Dimension_Y, ry); } void ShapeSection::size(Coord& l, Coord& b, Coord& r, Coord& t) const { l = xmin_; r = xmax_; b = ymin_; t = ymax_; } void ShapeSection::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.set(c, a); // Coord x = a.x(); // Coord y = a.y(); // ext.merge_xy(c, x + xmin_, x + xmax_, y + ymin_, y + ymax_); // ext.set_xy(c, xmin_, xmax_, ymin_, ymax_); } void ShapeSection::selectMenu() {//popup menu item selected const char* name = secname(sec_); printf("%s\n", name); Color* blue = (Color*) Color::lookup(Session::instance()->default_display(), "blue"); ShapeScene* s = ShapeScene::current_pick_scene(); setColor(blue, s); s->selected(this); Oc oc; hoc_ivpanel(name); char buf[200]; hoc_ivmenu(name); sprintf(buf, "%s nrnsecmenu(.5, 1)", name); hoc_ivbutton("Parameters", buf); sprintf(buf, "%s nrnsecmenu(.5, 2)", name); hoc_ivbutton("Assigned", buf); sprintf(buf, "%s nrnsecmenu(.5, 3)", name); hoc_ivbutton("States", buf); hoc_ivmenu(0); hoc_ivpanel(0); } Section* ShapeSection::section() const { return sec_; } bool ShapeSection::good() const { return sec_->prop != 0; } void ShapeSection::update_ptrs() { if (!pvar_) { return; } int i, n = section()->nnode-1; for (i=0; i < n; ++i) { pvar_[i] = nrn_recalc_ptr(pvar_[i]); } } void ShapeSection::set_range_variable(Symbol* sym) { clear_variable(); if (!good()) { return; } int i, n=section()->nnode-1; pvar_ = new double*[n]; old_ = new const Color*[n]; bool any = false; if (nrn_exists(sym, section()->pnode[0])){ for (i=0; i < n; ++i) { pvar_[i] = nrn_rangepointer(section(), sym, nrn_arc_position(section(), section()->pnode[i]) ); old_[i] = NULL; if (pvar_[i]) { any = true; } } }else{ for (i=0; i < n; ++i) { pvar_[i] = 0; old_[i] = NULL; } } } void ShapeSection::clear_variable() { if (pvar_) { delete [] pvar_; pvar_ = NULL; } if (old_) { delete [] old_; old_ = NULL; } } void ShapeSection::draw(Canvas* c, const Allocation& a) const { if (!good()) { return; } float e = 1e-2; #if 0 // fails when length very long > 100000. If checking important // then should use relative comparison if (!( Math::equal(xmin_, a.left(), e) && Math::equal(xmax_, a.right(), e) && Math::equal(ymin_, a.bottom(), e) && Math::equal(ymax_, a.top(), e) )) { printf("xmin_=%g a.left=%g ymin_=%g a.bottom=%g xmax_=%g a.right=%g\n", xmin_, a.left(),ymin_,a.bottom(),xmax_,a.right()); } #endif Coord x=a.x(), y=a.y(); fast_draw(c, x, y, true); } void ShapeSection::fast_draw(Canvas* c, Coord x, Coord y, bool b) const { Section* sec = section(); IfIdraw(pict()); if (pvar_) { const Color* color; ColorValue* cv = ShapeScene::current_draw_scene()->color_value(); if (sec->nnode == 2) { if (pvar_[0]) { color = cv->get_color(*pvar_[0]); }else{ color = cv->no_value(); } if (color != old_[0] || b) { draw_points(c, color, 0, sec_->npt3d); ((ShapeSection*)this)->old_[0] = color; } /////////////////////////////////////// #if FASTIDIOUS }else if (sec->npt3d > 2) { // draw each segment with proper color such that segment boundaries are // at least within 5% of their proper location and best possible relative to // actual points. i.e. if a section boundary is between 3d points such that // moving the boundary to the nearest point increases or decreases the // length of the segment by more than 5%, then draw the fractional // interval. Otherwise move the boundary to the nearest point. int iseg, i3d; double xbegin; // end location already drawn double xend; // location we'd like to draw to double dseg; // accurate desired length of segment double a3dold; // the arc length at i3d-1 double a3dnew; // the arc length at i3d double frac; // fraction of a segment length of the a3dnew point from // xend when a3dnew > xend // walk iseg=0 through sec->nnode-2 // note that a3d points are totally arbitrary but segments are // all approximately dseg in length. // we don't want to draw anything < .05*dseg in length unless it is // a complete a3d interval. We might draw something up to 1.1*dseg in length. dseg = section_length(sec_)/double(sec_->nnode - 1); xbegin = 0.; a3dold = 0.; i3d = 1; for (iseg = 0; iseg < sec->nnode - 1; ++iseg) { if (pvar_[iseg]) { color = cv->get_color(*pvar_[iseg]); }else{ color = cv->no_value(); } if (color != old_[iseg] || b) { ((ShapeSection*)this)->old_[iseg] = color; }else{ color = NULL; } xend = double(iseg+1)*dseg; for ( ; i3d < sec->npt3d; ++i3d) { a3dold = sec_->pt3d[i3d-1].arc; a3dnew = sec_->pt3d[i3d].arc; if (a3dnew > xend) { frac = (a3dnew - xend)/dseg; // do we move to a3dnew or // actually draw the fractional line if (frac < .05) { // draw to a3dnew fastidious_draw(c, color, i3d, xbegin, a3dnew); xbegin = a3dnew; ++i3d; break; // on to next segment // and next i3d }else{ // draw to xend fastidious_draw(c, color, i3d, xbegin, xend); xbegin = xend; break; // on to next segment // and reread i3d } }else{ // draw from xbegin to a3dnew fastidious_draw(c, color, i3d, xbegin, a3dnew); xbegin = a3dnew; } } } assert(Math::equal(xend, sec_->pt3d[sec_->npt3d-1].arc, 1e-6)); #endif // FASTIDIOUS /////////////////////////////////////// }else{ for (int iseg = 0; iseg < sec->nnode - 1; ++iseg) { if (pvar_[iseg]) { color = cv->get_color(*pvar_[iseg]); }else{ color = cv->no_value(); } if (color != old_[iseg] || b) { draw_seg(c, color, iseg); ((ShapeSection*)this)->old_[iseg] = color; } } } }else{ draw_points(c, color_, 0, sec_->npt3d); } IfIdraw(end()); } #if FASTIDIOUS void ShapeSection::fastidious_draw(Canvas* c, const Color* color, int i1, float a1, float a2) const { int i; float len, f1, f2, d, x1, x2, y1, y2, a, aa; if (!color) { return; } i = i1-1; a = sec_->pt3d[i].arc; aa = sec_->pt3d[i1].arc; if ((aa - a) < 1e-5) { return; } f1 = (a1 - a)/(aa - a); f2 = (a2 - a)/(aa - a); d = x_[i1] - x_[i]; x1 = f1*d + x_[i]; x2 = f2*d + x_[i]; d = y_[i1] - y_[i]; y1 = f1*d + y_[i]; y2 = f2*d + y_[i]; switch (ShapeScene::current_draw_scene()->shape_type()) { case ShapeScene::show_diam: float d1, d2, t1, t2; t1 = Math::abs(sec_->pt3d[i].d)/2.; t2 = Math::abs(sec_->pt3d[i1].d)/2.; d1 = f1*(t2 - t1) + t1; d2 = f2*(t2 - t1) + t1; trapezoid(c, color, x1,y1,x2,y2,d1,d2); if (beveljoin_) { if (f1 < 1e-6) { bevel_join(c, color, i, t1); } } break; case ShapeScene::show_schematic: case ShapeScene::show_centroid: c->new_path(); c->move_to(x1, y1); c->line_to(x2, y2); c->stroke(color, brushes->brush(0)); IfIdraw(line(c, x1, y1, x2, y2, color)); break; } } #endif #if BEVELJOIN void ShapeSection::bevel_join(Canvas* c, const Color* color, int i, float d) const { if (i == 0) { return; } float perp1[2], perp2[2], x, y; x = x_[i]; y = y_[i]; bool b = true; b &= MyMath::unit_normal(x - x_[i-1], y - y_[i-1], perp1); b &= MyMath::unit_normal(x_[i+1] - x, y_[i+1] - y, perp2); if (b && (perp1[0] != perp2[0] || perp1[1] != perp2[1])) { Coord xt[4], yt[4]; xt[0] = x + d*perp1[0]; yt[0] = y + d*perp1[1]; xt[1] = x - d*perp2[0]; yt[1] = y - d*perp2[1]; xt[2] = x - d*perp1[0]; yt[2] = y - d*perp1[1]; xt[3] = x + d*perp2[0]; yt[3] = y + d*perp2[1]; int i; c->new_path(); c->move_to(xt[0], yt[0]); for (i = 1; i < 4; ++i) { c->line_to(xt[i], yt[i]); } c->close_path(); c->fill(color); if (OcIdraw::idraw_stream) { OcIdraw::polygon(c, 4, xt, yt, color, 0, true); } } } #else void ShapeSection::bevel_join(Canvas*, const Color*, int, float) const {} #endif void ShapeSection::draw_seg(Canvas* c, const Color* color, int iseg) const { float darc = 1./float(sec_->nnode - 1); float ds = darc * section_length(sec_); float x = ds*iseg; int i, j; if (sec_->nnode == 2) { i = 0; j = sec_->npt3d; draw_points(c, color, i, j); } else if ( sec_->npt3d == 2 ) { float x1, x2, y1, y2; x1 = darc*iseg*(x_[1] - x_[0]) + x_[0]; x2 = darc*(iseg + 1)*(x_[1] - x_[0]) + x_[0]; y1 = darc*iseg*(y_[1] - y_[0]) + y_[0]; y2 = darc*(iseg + 1)*(y_[1] - y_[0]) + y_[0]; switch (ShapeScene::current_draw_scene()->shape_type()) { case ShapeScene::show_diam: float d1, d2, t1, t2; t1 = Math::abs(sec_->pt3d[0].d)/2.; t2 = Math::abs(sec_->pt3d[1].d)/2.; d1 = darc*iseg*(t2 - t1) + t1; d2 = darc*(iseg + 1)*(t2 - t1) + t1; trapezoid(c, color, x1,y1,x2,y2,d1,d2); break; case ShapeScene::show_schematic: case ShapeScene::show_centroid: c->new_path(); c->move_to(x1, y1); c->line_to(x2, y2); c->stroke(color, brushes->brush(0)); IfIdraw(line(c, x1, y1, x2, y2, color)); break; } }else{ for (i = 1; i < sec_->npt3d; i++) { if (sec_->pt3d[i].arc > x) { break; } } i--; x += ds*1.0001; for (j = i+1; j < sec_->npt3d; j++) { if (sec_->pt3d[j].arc > x) { break; } } draw_points(c, color, i, j); } } void ShapeSection::draw_points(Canvas* c, const Color* color, int i, int j) const { switch (ShapeScene::current_draw_scene()->shape_type()) { case ShapeScene::show_diam: while(++i < j) { trapezoid(c, color, i); #if BEVELJOIN if (beveljoin_) { bevel_join(c, color, i-1, Math::abs(sec_->pt3d[i-1].d)/2); } #endif } break; case ShapeScene::show_centroid: IfIdraw(mline(c, j-i, x_ + i, y_ + i, color)); c->new_path(); c->move_to(x_[i], y_[i]); while (++i < j) { c->line_to(x_[i], y_[i]); } c->stroke(color, brushes->brush(0)); break; case ShapeScene::show_schematic: IfIdraw(line(c, x_[i], y_[i], x_[j-1], y_[j-1], color)); c->new_path(); c->line(x_[i], y_[i], x_[j-1], y_[j-1], color, 0); break; } } void ShapeSection::trapezoid(Canvas* c, const Color* color, int i) const{ trapezoid(c, color, x_[i-1], y_[i-1], x_[i], y_[i], Math::abs(sec_->pt3d[i-1].d)/2., Math::abs(sec_->pt3d[i].d)/2. ); } void ShapeSection::trapezoid(Canvas* c, const Color* color, float x1, float y1, float x2, float y2, float d1, float d2) const{ float x, y, rx, ry, d, norm; x = x2 - x1; y = y2 - y1; norm = sqrt(x*x + y*y); if (norm > .0001) { rx = y/norm; ry = -x/norm; }else{ return; } d = d1; c->new_path(); c->move_to(x1 + rx*d, y1 + ry*d); c->line_to(x1 - rx*d, y1 - ry*d); d = d2; c->line_to(x2 - rx*d, y2 - ry*d); c->line_to(x2 + rx*d, y2 + ry*d); c->close_path(); c->fill(color); if (OcIdraw::idraw_stream) { Coord xt[4], yt[4]; d = d1; xt[0] = x1 + rx*d; yt[0] = y1 + ry*d; xt[1] = x1 - rx*d; yt[1] = y1 - ry*d; d = d2; xt[2] = x2 - rx*d; yt[2] = y2 - ry*d; xt[3] = x2 + rx*d; yt[3] = y2 + ry*d; OcIdraw::polygon(c, 4, xt, yt, color, 0, true); } } void ShapeSection::setColor(const Color* color, ShapeScene* s) { color->ref(); color_->unref(); color_ = color; damage(s); } void ShapeSection::pick(Canvas*, const Allocation&, int depth, Hit& h) { if (!good() || ! h.event() || h.event()->type() != Event::down) return; Coord x = h.left(); Coord y = h.bottom(); if (! near_section(x, y, XYView::current_pick_view()->x_pick_epsilon())) return; if (h.event()->pointer_button() == Event::left) { ShapeScene* s = ShapeScene::current_pick_scene(); //printf("section %s x=%g y=%g\n", secname(sec_), x, y); if (h.any()) { // maybe one already found is closer Coord x2 = how_near(x, y); if (s->selected()) { Coord x1 = s->selected()->how_near(x, y); //printf("%s at %g and %s at %g\n", secname(s->selected()->section()), x1, secname(section()), x2); if (x1 < x2) { return; } } } s->selected(this, x, y); if (s->section_handler()){ h.target(depth, this, 0, (s->section_handler(this))); } } } ShapeScene* ShapeScene::current_pick_scene() { return (ShapeScene*)XYView::current_pick_view()->scene(); } ShapeScene* ShapeScene::current_draw_scene() { return (ShapeScene*)XYView::current_draw_view()->scene(); } bool ShapeSection::near_section(Coord x, Coord y, Coord mineps)const { int n = sec_->npt3d; for (int i=1; i < n; ++i) { if (MyMath::near_line_segment( x, y, x_[i-1], y_[i-1], x_[i], y_[i], Math::max(float(Math::abs(sec_->pt3d[i-1].d)/2.), float(mineps)) )) { return true; } } return false; } float ShapeSection::how_near(Coord x, Coord y)const { int n = sec_->npt3d; float d2, d = 1e20; for (int i=1; i < n; ++i) { d2 = MyMath::distance_to_line_segment( x, y, x_[i-1], y_[i-1], x_[i], y_[i] ); if (d2 < d) { d = d2; } } return d; } float ShapeSection::arc_position(Coord x, Coord y)const { int ic, n = sec_->npt3d; float d2, d = 1e20; float darc, len, dlen1; for (int i=1; i < n; ++i) { d2 = MyMath::distance_to_line_segment( x, y, x_[i-1], y_[i-1], x_[i], y_[i] ); if (d2 < d) { d = d2; ic = i-1; } } d *= d; len = MyMath::norm2(x_[ic] - x_[ic+1], y_[ic] - y_[ic+1]); dlen1 = MyMath::norm2(x - x_[ic], y - y_[ic]); if (dlen1 <= d + 1e-2) { darc = 0.; }else if (len <= d + 1e-2) { darc = sqrt(len); }else{ darc = sqrt(dlen1 - d); } d = sec_->pt3d[ic].arc + darc; d /= section_length(sec_); d = (d < 0.) ? 0. : d; d = (d > 1.) ? 1. : d; d = (nrn_section_orientation(sec_) == 1.) ? 1. - d : d; // round to nearest segment point float dx = 1./(sec_->nnode-1); if (d < dx/4.) { d = 0.; }else if (d > 1. - dx/4.) { d = 1.; }else{ d = (int(d*(sec_->nnode - 1)) + .5)*dx; } return d; } int ShapeSection::get_coord(double a, Coord& x, Coord& y)const { int i, n = sec_->npt3d; double arc = (nrn_section_orientation(sec_) == 1.) ? (1. - a) : a; arc *= section_length(sec_); for (i=0; i < n; ++i) { if (arc < sec_->pt3d[i].arc) { break; } } if (i == n) { i -= 1; x = x_[i]; y = y_[i]; }else{ double frac = (arc - sec_->pt3d[i-1].arc) / (sec_->pt3d[i].arc - sec_->pt3d[i-1].arc); x = x_[i-1]*(1-frac) + x_[i]*frac; y = y_[i-1]*(1-frac) + y_[i]*frac; i = (i > 0 && frac < .5) ? i-1 : i; } return i; } void ShapeSection::damage(ShapeScene* s) { //printf("ShapeSection::damage %s\n", secname(sec_)); s->damage(xmin_, ymin_, xmax_, ymax_); } SectionHandler::SectionHandler() { ss_ = NULL; } SectionHandler::~SectionHandler() { shape_section(NULL); } bool SectionHandler::event(Event&) { return true; } void SectionHandler::shape_section(ShapeSection* ss) { Resource::ref(ss); Resource::unref(ss_); ss_ = ss; } ShapeSection* SectionHandler::shape_section() { return ss_;} PointMark::PointMark(OcShape* sh, Object* ob, const Color* c, const char style, const float size) : MonoGlyph(NULL) { sh_ = sh; // don't ref ob_ = ob; if (ob_) { ObjObservable::Attach(ob, this); } body(HocMark::instance(style, size, c, NULL)); i_ = 0; sec_ = NULL; xloc_ = 0.; } PointMark::~PointMark() { //printf("~PointMark\n"); if(ob_) { Object* ob = ob_; ob_ = NULL; //printf("Detach\n"); ObjObservable::Detach(ob, this); } } void PointMark::disconnect(Observable*) { //printf("PointMark::disconnect\n"); if (ob_) { Object* ob = ob_; ob_ = NULL; //printf("point_mark_remove\n"); sh_->point_mark_remove(ob); } } void PointMark::update(Observable*) { everything_ok(); } void PointMark::draw(Canvas* c, const Allocation& a0)const { const Transformer& tv = XYView::current_draw_view()->s2o(); Allocation a(a0); Coord x, y; tv.inverse_transform(x_, y_, x, y); a.x_allotment().origin(x); a.y_allotment().origin(y); MonoGlyph::draw(c, a); } void PointMark::set_loc(Section* sec, float x) { sec_ = sec; xloc_ = x; } bool PointMark::everything_ok() { sec_ = NULL; if (ob_) { Point_process* pnt = ob2pntproc_0(ob_); if (pnt && pnt->sec) { sec_ = pnt->sec; xloc_ = nrn_arc_position(pnt->sec, pnt->node); } } if (!sec_ || ! sec_->prop) { return false; } ShapeSection* ss = sh_->shape_section(sec_); if (!ss) { return false; } ss->get_coord(xloc_, x_, y_); if (i_ >= sh_->count() || sh_->component(i_) != (Glyph*)this) { i_ = sh_->glyph_index(this); } if (i_ < 0) return false; sh_->move(i_, x_, y_); return true; } void OcShape::transform3d(Rubberband* rot) { ShapeScene::transform3d(rot); if (point_mark_list_) { GlyphIndex i, cnt = point_mark_list_->count(); for (i=0; i < cnt; ++i) { ((PointMark*)point_mark_list_->component(i))->update(NULL); } } } ShapeChangeObserver::ShapeChangeObserver(ShapeScene* s) { s_ = s; //do not ref shape_changed_ = nrn_shape_changed_; struc_changed_ = structure_change_cnt; Oc oc; oc.notify_attach(this); } ShapeChangeObserver::~ShapeChangeObserver() { Oc oc; oc.notify_detach(this); } void ShapeChangeObserver::update(Observable*) { if (shape_changed_ != nrn_shape_changed_) { //printf("ShapeChangeObserver::update shape_changed%p nrn_shape_changed=%d\n", this, nrn_shape_changed_); shape_changed_ = nrn_shape_changed_; nrn_define_shape(); volatile_ptr_ref = NULL; if (struc_changed_ != structure_change_cnt) { struc_changed_ = structure_change_cnt; //printf("ShapeChangeObserver::update structure_changed%p\n", this); if (s_->view_all()) { s_->observe(); } shape_changed_ = 0; }else{ s_->transform3d(); shape_changed_ = nrn_shape_changed_; s_->flush(); } } } void ShapeChangeObserver::force() { shape_changed_ = 0; } #endif // HAVE_IV neuron-7.5/src/nrniv/shape.h000066400000000000000000000111051323325274500160730ustar00rootroot00000000000000#ifndef shape_h #define shape_h #include "scenevie.h" #include "graph.h" #undef Rubberband struct Section; // neuron section structure class ShapeSection; class SectionHandler; class StandardPicker; class MyRect; class Color; class Brush; class SectionList; class Rubberband; class ColorValue; class PolyGlyph; struct Symbol; class Rotation3d; class Rotate3Band; class ShapeChangeObserver; class ShapeScene : public Graph { // entire neuron public: enum {SECTION=Graph::EXTRAGRAPHTOOL, ROTATE, EXTRASHAPETOOL}; ShapeScene(SectionList* = NULL); virtual ~ShapeScene(); virtual void erase_all(); virtual void observe(SectionList* = NULL); virtual void flush(); virtual ShapeSection* selected(); virtual float arc_selected(); virtual void selected(ShapeSection*, Coord x = fil, Coord y = fil); virtual float nearest(Coord, Coord); // and sets selected virtual void wholeplot(Coord& x1, Coord& y1, Coord& x2, Coord& y2)const; static ShapeScene* current_pick_scene(); static ShapeScene* current_draw_scene(); void color(Section* sec1, Section* sec2, const Color*); void color(Section* sec, const Color*); void color(const Color*); void color(SectionList*, const Color*); ColorValue* color_value(); virtual void view(Coord); virtual void view(Coord*); virtual void view(Rubberband*); enum {show_diam, show_centroid, show_schematic}; void shape_type(int); int shape_type() {return shape_type_;} virtual void section_handler(SectionHandler*); virtual SectionHandler* section_handler(); virtual SectionHandler* section_handler(ShapeSection*); PolyGlyph* shape_section_list(); virtual void transform3d(Rubberband* rb = NULL); virtual ShapeSection* shape_section(Section*); virtual void name(const char*); virtual void save_phase2(ostream&); virtual void help(); void force(); bool view_all() { return view_all_;} void rotate(); // identity void rotate(Coord xorg, Coord yorg, Coord zorg, float xrad, float yrad, float zrad); //relative private: bool view_all_; ShapeSection* selected_; Coord x_sel_, y_sel_; ColorValue* color_value_; int shape_type_; SectionHandler* section_handler_; PolyGlyph* sg_; Rotate3Band* r3b_; CopyString* var_name_; ShapeChangeObserver* shape_changed_; }; class FastShape : public Glyph { public: FastShape(); virtual ~FastShape(); virtual void fast_draw(Canvas*, Coord x, Coord y, bool)const = 0; }; class FastGraphItem : public GraphItem { public: FastGraphItem(FastShape* g, bool save = true, bool pick = true); virtual bool is_fast() {return true;} }; class ShapeSection : public FastShape { //single section public: ShapeSection(Section*); virtual ~ShapeSection(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void fast_draw(Canvas*, Coord x, Coord y, bool) const; virtual void pick(Canvas*, const Allocation&, int depth, Hit&); virtual void setColor(const Color*, ShapeScene*); const Color* color(){return color_;} virtual void set_range_variable(Symbol*); virtual void clear_variable(); virtual void selectMenu(); virtual bool near_section(Coord, Coord, Coord mineps) const; float how_near(Coord, Coord)const; float arc_position(Coord, Coord)const; int get_coord(double arc, Coord&, Coord&)const; Section* section() const; bool good() const; virtual void damage(ShapeScene*); // virtual void update(Observable*); virtual void draw_seg(Canvas*, const Color*, int iseg) const; virtual void draw_points(Canvas*, const Color*, int, int) const; virtual void transform3d(Rotation3d*); virtual void size(Coord& l, Coord& b, Coord& r, Coord& t) const; void scale(Coord x) { len_scale_ = x; } Coord scale() { return len_scale_; } void update_ptrs(); private: void trapezoid(Canvas*, const Color*, int i) const; void trapezoid(Canvas*, const Color*, float, float, float, float,float, float) const; void loc(double, Coord&, Coord&); void bevel_join(Canvas*, const Color*, int, float) const; #define FASTIDIOUS 1 #if FASTIDIOUS void fastidious_draw(Canvas*, const Color*, int, float, float) const; #endif private: double** pvar_; Section* sec_; Coord len_scale_; const Color* color_; const Color** old_; Coord xmin_, xmax_, ymin_, ymax_; Coord *x_, *y_; int n_; }; #if 1 class ShapeView : public View { public: ShapeView(ShapeScene*); ShapeView(ShapeScene*, Coord*); virtual ~ShapeView(); }; #endif class SectionHandler : public Handler { public: SectionHandler(); virtual ~SectionHandler(); virtual bool event(Event&); void shape_section(ShapeSection*); ShapeSection* shape_section(); private: ShapeSection* ss_; }; #endif neuron-7.5/src/nrniv/shapeplt.cpp000066400000000000000000000632351323325274500171610ustar00rootroot00000000000000#include <../../nrnconf.h> #include "classreg.h" #if HAVE_IV #include #include #include #include #include #include #include #include #include #include #include #include "scenepic.h" #include "shapeplt.h" #include "graph.h" #include "ivoc.h" #include "nrnoc2iv.h" #include "rubband.h" #include "symchoos.h" #include "symdir.h" #include "parse.h" #include "utility.h" #include "objcmd.h" #include "idraw.h" #define SelectVariable_ "PlotWhat PlotShape" #define VariableScale_ "VariableScale PlotShape" #define TimePlot_ "TimePlot PlotShape" #define SpacePlot_ "SpacePlot PlotShape" #define ShapePlot_ "ShapePlot PlotShape" #define MoveText_ "MoveText PlotShape" extern "C" { extern Symlist* hoc_built_in_symlist; } #endif // HAVE_IV // PlotShape class registration for oc static double sh_flush(void* v) { #if HAVE_IV IFGUI ((ShapePlot*)v)->flush(); ENDGUI #endif return 1.; } static double fast_flush(void* v) { #if HAVE_IV IFGUI ((ShapePlot*)v)->fast_flush(); ENDGUI #endif return 1.; } static double sh_begin(void*) {// a noop. Exists only because graphs and return 1.; // shapes are often in same list } static double sh_scale(void* v) { #if HAVE_IV IFGUI ((ShapePlot*)v)->scale(float(*getarg(1)), float(*getarg(2))); ENDGUI #endif return 1.; } static double sh_view(void* v) { #if HAVE_IV IFGUI ShapePlot* sh = (ShapePlot*)v; if (ifarg(8)) { Coord x[8]; int i; for (i=0; i < 8; ++i) { x[i] = *getarg(i+1); } sh->view(x); } ENDGUI #endif return 1.; } static double sh_variable(void* v) { #if HAVE_IV IFGUI Symbol* s; s = hoc_table_lookup(gargstr(1), hoc_built_in_symlist); if (s) { ((ShapePlot*)v)->variable(s); } ENDGUI #endif return 1.; } static double sh_view_count(void* v) { int n = 0; #if HAVE_IV IFGUI n = ((ShapeScene*)v)->view_count(); ENDGUI #endif return double(n); } static double sh_save_name(void* v) { #if HAVE_IV IFGUI ((ShapeScene*)v)->name(gargstr(1)); ENDGUI #endif return 1.; } static double sh_unmap(void*v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; s->dismiss(); ENDGUI #endif return 0.; } static double sh_printfile(void* v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; s->printfile(gargstr(1)); ENDGUI #endif return 1.; } static double sh_show(void* v) { #if HAVE_IV IFGUI ShapeScene* s = (ShapeScene*)v; s->shape_type(int(chkarg(1, 0., 2.))); ENDGUI #endif return 1.; } extern double ivoc_gr_menu_action(void* v); static double s_colormap(void* v) { #if HAVE_IV IFGUI ShapePlot* s = (ShapePlot*)v; if (ifarg(4)) { s->color_value()->colormap(int(chkarg(1, 0, 255)), int(chkarg(2, 0, 255)), int(chkarg(3, 0, 255)), int(chkarg(4, 0, 255)) ); }else{ bool b = false; if (ifarg(2)) { b = (bool)chkarg(2, 0, 1); } s->color_value()->colormap(int(chkarg(1, 0, 1000)), b); } ENDGUI #endif return 1.; } static double sh_hinton(void* v) { #if HAVE_IV IFGUI ShapeScene* ss = (ShapeScene*)v; double* pd = hoc_pgetarg(1); double xsize = chkarg(4, 1e-9, 1e9); double ysize = xsize; if (ifarg(5)) { ysize = chkarg(5, 1e-9, 1e9); } Hinton* h = new Hinton(pd, xsize, ysize, ss); ss->append(new FastGraphItem(h)); ss->move(ss->count() - 1, *getarg(2), *getarg(3)); ENDGUI #endif return 1.; } static double exec_menu(void* v) { #if HAVE_IV IFGUI ((Scene*)v)->picker()->exec_item(gargstr(1)); ENDGUI #endif return 0.; } extern double ivoc_gr_menu_tool(void*); extern double ivoc_gr_mark(void*); extern double ivoc_gr_size(void*); extern double ivoc_gr_label(void*); extern double ivoc_gr_line(void*); extern double ivoc_gr_begin_line(void*); extern double ivoc_gr_erase(void*); extern double ivoc_gr_gif(void*); extern double ivoc_erase_all(void*); extern double nrniv_sh_observe(void*); extern double nrniv_sh_rotate(void*); extern double nrniv_sh_nearest(void*); extern double nrniv_sh_push(void*); extern double nrniv_sh_color(void*); extern double nrniv_sh_color_all(void*); extern double nrniv_sh_color_list(void*); extern double nrniv_len_scale(void*); extern Object** nrniv_sh_nearest_seg(void*); extern Object** nrniv_sh_selected_seg(void*); static Member_func sh_members[] = { "hinton", sh_hinton, "nearest", nrniv_sh_nearest, "push_selected", nrniv_sh_push, "scale", sh_scale, "view", sh_view, "size", ivoc_gr_size, "view_count", sh_view_count, "flush", sh_flush, "fastflush", fast_flush, "begin", sh_begin, "variable", sh_variable, "save_name", sh_save_name, "unmap", sh_unmap, "color", nrniv_sh_color, "color_all", nrniv_sh_color_all, "color_list", nrniv_sh_color_list, "printfile", sh_printfile, "show", sh_show, "menu_action", ivoc_gr_menu_action, "menu_tool", ivoc_gr_menu_tool, "colormap", s_colormap, "exec_menu", exec_menu, "observe", nrniv_sh_observe, "rotate", nrniv_sh_rotate, "beginline", ivoc_gr_begin_line, "line", ivoc_gr_line, "label", ivoc_gr_label, "mark", ivoc_gr_mark, "erase", ivoc_gr_erase, "erase_all", ivoc_erase_all, "len_scale", nrniv_len_scale, "gif", ivoc_gr_gif, 0,0 }; static Member_ret_obj_func retobj_members[] = { "nearest_seg", nrniv_sh_nearest_seg, "selected_seg", nrniv_sh_selected_seg }; static void* sh_cons(Object* ho) { #if HAVE_IV ShapePlot* sh = NULL; IFGUI int i=1; int iarg=1; SectionList* sl = NULL; // first arg may be an object. if (ifarg(iarg)) { if (hoc_is_object_arg(iarg)) { sl = new SectionList(*hoc_objgetarg(iarg)); sl->ref(); ++iarg; } } if (ifarg(iarg)) { i = int(chkarg(iarg,0,1)); } sh = new ShapePlot(NULL, sl); Resource::unref(sl); sh->ref(); sh->hoc_obj_ptr(ho); if (i) { sh->view(200); } ENDGUI return (void*)sh; #else return 0; #endif } static void sh_destruct(void* v) { #if HAVE_IV IFGUI ((ShapeScene*)v)->dismiss(); ENDGUI Resource::unref((ShapeScene*)v); #endif } void PlotShape_reg() { // printf("PlotShape_reg\n"); class2oc("PlotShape", sh_cons, sh_destruct, sh_members, NULL, retobj_members, NULL); } #if HAVE_IV /* static */ class ShapePlotImpl : public Observer { public: ShapePlotImpl(ShapePlot*, Symbol*); ~ShapePlotImpl(); virtual void time(); virtual void space(); virtual void shape(); virtual void show_shape_val(bool); virtual void select_variable(); virtual void scale(); virtual void colorbar(); virtual void update(Observable*); public: ShapePlot* sp_; Symbol* sym_; GLabel* variable_; double graphid_; int colorid_; SectionHandler* time_sh_; bool showing_; Glyph* colorbar_; bool fast_; }; /* static */ class MakeTimePlot : public SectionHandler { public: MakeTimePlot(ShapePlotImpl*); virtual ~MakeTimePlot(); virtual bool event(Event&); private: ShapePlotImpl* spi_; }; /* static */ class MakeSpacePlot : public RubberAction { public: MakeSpacePlot(ShapePlotImpl*); virtual ~MakeSpacePlot(); virtual void execute(Rubberband*); private: ShapePlotImpl* spi_; }; declareActionCallback(ShapePlotImpl); implementActionCallback(ShapePlotImpl); ShapePlot::ShapePlot(Symbol* sym, SectionList* sl) : ShapeScene(sl) { spi_ = new ShapePlotImpl(this, sym); variable(spi_->sym_); picker()->add_menu("Plot What?", new ActionCallback(ShapePlotImpl)( spi_, &ShapePlotImpl::select_variable)); picker()->add_menu("Variable scale", new ActionCallback(ShapePlotImpl)( spi_, &ShapePlotImpl::scale)); picker()->add_radio_menu("Time Plot", new ActionCallback(ShapePlotImpl)( spi_, &ShapePlotImpl::time)); picker()->add_radio_menu("Space Plot", new ActionCallback(ShapePlotImpl)( spi_, &ShapePlotImpl::space)); picker()->add_radio_menu("Shape Plot", new ActionCallback(ShapePlotImpl)( spi_, &ShapePlotImpl::shape)); color_value()->attach(spi_); spi_->colorbar(); } ShapePlot::~ShapePlot() { color_value()->detach(spi_); delete spi_; } void ShapePlot::observe(SectionList* sl) { // printf("ShapePlot::observe\n"); ShapeScene::observe(sl); if (spi_->showing_) { PolyGlyph* pg = shape_section_list(); GlyphIndex i, cnt = pg->count(); for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)pg->component(i); ss->set_range_variable(spi_->sym_); } damage_all(); } } void ShapePlot::update_ptrs() { PolyGlyph* pg = shape_section_list(); GlyphIndex i, cnt = pg->count(); for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)pg->component(i); ss->update_ptrs(); } } void ShapePlot::erase_all() { Resource::unref(spi_->colorbar_); spi_->colorbar_ = NULL; ShapeScene::erase_all(); } void ShapePlotImpl::update(Observable*) { colorbar(); sp_->damage_all(); } void ShapePlot::variable(Symbol* sym) { GlyphIndex i; spi_->sym_ = sym; i = glyph_index(spi_->variable_); GLabel* g = new GLabel(spi_->sym_->name, colors->color(1), 1, 1, .5, .5); if (i >= 0) { damage(i); replace(i, new GraphItem(g, 0)); damage(i); }else{ append_fixed(new GraphItem(g, 0)); } Resource::unref(spi_->variable_); Resource::ref(g); spi_->variable_ = g; if (spi_->showing_) { spi_->showing_ = false; spi_->show_shape_val(true); } scale(-80, 40); } const char* ShapePlot::varname()const { return spi_->sym_->name; } void ShapePlot::scale(float min, float max) { color_value()->set_scale(min, max); } void ShapePlot::save_phase1(ostream& o) { o << "{" << endl; save_class(o, "PlotShape"); char buf[256]; sprintf(buf, "save_window_.variable(\"%s\")", spi_->sym_->name); o << buf << endl; } void ShapePlot::shape_plot() {} void ShapePlot::make_time_plot(Section*, float) { } void ShapePlot::make_space_plot(Section*, float, Section*, float) { } void ShapePlot::flush() { spi_->fast_ = false; if (tool() == SHAPE) { damage_all(); } } void ShapePlot::fast_flush() { if (tool() == SHAPE) { int i, cnt = view_count(); spi_->fast_ = true; // fast for only one view for (i=0; i < cnt; ++i) { XYView* v = sceneview(i); Coord x = v->left(), y = v->bottom(); #if defined(WIN32) // if x,y is not on the screen then use right, top. Otherwise InvalidateRect // will not take effect. Window* w = v->canvas() ? v->canvas()->window() : NULL; if (w) { if (w->left() < 0) { x = v->right(); } if (w->bottom() < 0) { y = v->top(); } } #endif v->damage(x, y, x, y); } } } #if defined(WIN32) extern void* mswin_setclip(Canvas*, int, int, int, int); extern void mswin_delete_object(void*); #endif void ShapePlot::draw(Canvas* c, const Allocation& a) const { if (spi_->fast_) { #if defined(WIN32) || MAC //win32 clipping is much more strict than X11 clipping even though the //implementations seem to agree that clipping is the intersection of //all clip requests on the clip stack in canvas. Clipping is originally //set to the damage area and thus nothing actually gets drawn to //the buffer. Furthermore, when copying from buffer to screen, only //the original damage area is copied. For some reason in X11 neither //seems to prevent the correct appearance although I wonder if it //will work on all x11 implementations. However, for WIN32, both cause //problems and thus the implementation of Canvas16::clip was changed to // not do an intersection and the "damage_all" below along with a change // to the window.c paint function in which the damage area is reread before // the bit block transfer solves the problem. // At any rate this is fast only for the first view since the fast_draw's // only work once. XYView* v = XYView::current_draw_view(); c->push_clipping(true); #if MAC c->clip_rect(v->left(), v->bottom(), v->right(), v->top()); #endif #if defined(WIN32) //Consider the commit message: // ------- // 28) Branch: MAIN Date: 2004-05-21 06:30 Commit by: hines // canvas16.cpp //MSWin PolyGlyphs inside a ScrollBox occasionally do not repair all the damage // This is apparently a long standing problem dating from 1999 which just //now became very noticable with the MultipleRunFitter Parameter panel //when there are many parameters (so that it is a scrollbox). This has //been traced to a #if 0 fragment in the clipping mechanism which turned //off the intersection calculation when a new clipping region was requested // We have turned this section back on. There was no reason mentioned in //the 1999 log message when the #if 0 was introduced. The major reason for //the larger change in that file was drawing dashed brush lines. If a //problem with clipping exists then it will have to be fixed in another way. // ------- // Well, here is the reason for the #if 0. Without it, the fast_flush movie // is not drawn for shapeplots. (Strangely, the neurondemo movie works for // the stylized neuron but not the pyramidal cell. // So as not to ruin the MAIN 28 commit of canvas16.cpp // we force the clipping to the entire canvas for the fast_flush. // Feeble attempts to do everything here, foundered on my inability to // include in this file. So the implementation is placed in // ivocwin.cpp. Note that the clip region must be deleted after use. // void* new_clip = mswin_setclip(c, 0, 0, c->pwidth(), c->pheight()); #endif #endif GlyphIndex i, cnt = count(); for (i=0; i < cnt; ++i) { GraphItem* gi = (GraphItem*)component(i); if (gi->is_fast()) { Coord x, y; location(i, x, y); ((FastShape*)(gi->body()))->fast_draw(c, x, y, false); } } #if defined(WIN32) || MAC c->pop_clipping(); #if defined(WIN32) mswin_delete_object(new_clip); #endif v->damage_all();; #endif spi_->fast_ = false; }else{ ShapeScene::draw(c, a); } } ShapePlotImpl::ShapePlotImpl(ShapePlot* sp, Symbol* sym) { sp_ = sp; colorid_ = 0; graphid_ = 0; showing_ = false; fast_ = false; colorbar_ = NULL; if (sym) { sym_ = sym; }else{ sym_ = hoc_table_lookup("v", hoc_built_in_symlist); } variable_ = NULL; time_sh_ = new MakeTimePlot(this); time_sh_->ref(); } ShapePlotImpl::~ShapePlotImpl() { Resource::unref(variable_); time_sh_->unref(); Resource::unref(colorbar_); } void ShapePlotImpl::colorbar() { bool showing; if (colorbar_) { int i = sp_->glyph_index(colorbar_); Resource::unref(colorbar_); showing = sp_->showing(i); sp_->remove(i); }else{ showing = false; } colorbar_ = sp_->color_value()->make_glyph(); colorbar_->ref(); sp_->append_fixed(new GraphItem(colorbar_, 0)); sp_->show(sp_->count() - 1, showing); if (showing) { XYView* v = XYView::current_pick_view(); sp_->move(sp_->count() - 1, v->left(), v->top()); } } void ShapePlotImpl::select_variable() { if (Oc::helpmode()) { Oc::help(SelectVariable_); } SymChooser* sc; Oc oc; Style* style = new Style(Session::instance()->style()); style->attribute("caption", "Variable in the shape domain"); sc = new SymChooser(new SymDirectory(RANGEVAR) , WidgetKit::instance(), style, NULL, 1); sc->ref(); while (sc->post_for(XYView::current_pick_view()->canvas()->window())) { Symbol* s; s = hoc_table_lookup(sc->selected()->string(), hoc_built_in_symlist); if (s) { sp_->variable(s); break; } } sc->unref(); } void ShapePlotImpl::scale() { if (Oc::helpmode()) { Oc::help(VariableScale_); } Coord x, y; x = sp_->color_value()->low(); y = sp_->color_value()->high(); if (var_pair_chooser("Variable range scale", x, y, XYView::current_pick_view()->canvas()->window())) { sp_->scale(x, y); } } void ShapePlotImpl::time() { if (Oc::helpmode()) { Oc::help(TimePlot_); return; } sp_->tool(ShapePlot::TIME); graphid_ = 0; colorid_ = 2; sp_->color(colors->color(1)); sp_->section_handler(time_sh_); show_shape_val(false); sp_->picker()->bind_select((OcHandler*)NULL); } void ShapePlotImpl::space() { if (Oc::helpmode()) { Oc::help(SpacePlot_); return; } sp_->tool(ShapePlot::SPACE); graphid_ = 0; colorid_ = 1; sp_->color(colors->color(1)); sp_->section_handler((SectionHandler*)NULL); show_shape_val(false); sp_->picker()->bind_select(new RubberLine(new MakeSpacePlot(this))); } void ShapePlotImpl::shape() { if (Oc::helpmode()) { Oc::help(ShapePlot_); return; } sp_->tool(ShapePlot::SHAPE); //printf("shape\n"); sp_->section_handler((SectionHandler*)NULL); sp_->picker()->bind_select((OcHandler*)NULL); show_shape_val(true); } void ShapePlotImpl::show_shape_val(bool show) { if (show != showing_) { PolyGlyph* pg = sp_->shape_section_list(); GlyphIndex i, cnt = pg->count(); if (show) { for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)pg->component(i); ss->set_range_variable(sym_); } }else{ for (i=0; i < cnt; ++i) { ShapeSection* ss = (ShapeSection*)pg->component(i); ss->clear_variable(); } } if (colorbar_) { int i = sp_->glyph_index(colorbar_); sp_->show(i, show); if (show) { XYView* v = XYView::current_pick_view(); sp_->move(i, v->left(), v->top()); } } sp_->damage_all(); showing_ = show; } } MakeTimePlot::MakeTimePlot(ShapePlotImpl* spi){ spi_ = spi; } MakeTimePlot::~MakeTimePlot(){ } bool MakeTimePlot::event(Event&) { Oc oc; ShapeSection* ss = shape_section(); Section* sec = ss->section(); if (spi_->sp_->tool() != ShapePlot::TIME) { return false; } if (spi_->graphid_ == 0) { oc.run("newPlotV()\n"); oc.run("hoc_ac_ = object_id(graphItem)\n"); spi_->graphid_ = hoc_ac_; } oc.run("hoc_ac_ = object_id(graphItem)\n"); //printf("graphid_=%g hoc_ac_=%g\n", graphid_, hoc_ac_); float x = spi_->sp_->arc_selected(); x = nrn_arc_position(sec, node_exact(sec, x)); x = (nrn_section_orientation(sec) == 0.) ? x : 1. - x; if (spi_->graphid_ == hoc_ac_) { char buf[200]; sprintf(buf, "{graphItem.color(%d)}\n", spi_->colorid_); oc.run(buf); sprintf(buf, "{graphItem.addvar(\"%s.%s(%g)\")}\n", hoc_section_pathname(sec), spi_->sp_->varname(), x ); oc.run(buf); ss->setColor(colors->color(spi_->colorid_), ShapeScene::current_pick_scene()); ++spi_->colorid_; }else{ spi_->graphid_ = 0; } return true; } MakeSpacePlot::MakeSpacePlot(ShapePlotImpl* spi){ spi_ = spi; } MakeSpacePlot::~MakeSpacePlot(){ } void MakeSpacePlot::execute(Rubberband* rb) { ShapePlot* sp = spi_->sp_; RubberLine* rl = (RubberLine*)rb; Coord x1, y1, x2, y2; float a1, a2; rl->get_line(x1, y1, x2, y2); //printf("MakeSpacePlot %g %g %g %g\n", x1, y1, x2, y2); char buf[256]; Oc oc; oc.run("objectvar rvp_\n"); Section* sec1, *sec2; sp->nearest(x1, y1); sec1 = sp->selected()->section(); a1 = sp->arc_selected(); a1 = (a1 < .5) ? 0. : 1.; sp->nearest(x2, y2); sec2 = sp->selected()->section(); a2 = sp->arc_selected(); a2 = (a2 < .5) ? 0. : 1.; if (sec1 == sec2 && a1 == a2) { printf("Null path for space plot: ignored\n"); return; } oc.run("hoc_ac_ = object_id(graphItem)\n"); //printf("graphid_=%g hoc_ac_=%g\n", graphid_, hoc_ac_); if (spi_->graphid_ == 0. || spi_->graphid_ != hoc_ac_) { oc.run("graphItem = new Graph()\n"); oc.run("hoc_ac_ = object_id(graphItem)\n"); spi_->graphid_ = hoc_ac_; oc.run("{graphItem.save_name(\"flush_list.\")}\n"); oc.run("{flush_list.append(graphItem)}\n"); spi_->colorid_ = 1; } ++spi_->colorid_; ColorValue* cv = sp->color_value(); sprintf(buf, "rvp_ = new RangeVarPlot(\"%s\")\n", sp->varname());oc.run(buf); sprintf(buf, "%s rvp_.begin(%g)\n", hoc_section_pathname(sec1), a1);oc.run(buf); sprintf(buf, "%s rvp_.end(%g)\n", hoc_section_pathname(sec2), a2);oc.run(buf); oc.run("{rvp_.origin(rvp_.d2root)}\n"); sprintf(buf, "{graphItem.size(rvp_.left(), rvp_.right(), %g, %g)}\n", cv->low(), cv->high()); oc.run(buf); sprintf(buf, "{graphItem.addobject(rvp_, %d, 1) graphItem.yaxis()}\n", spi_->colorid_); oc.run(buf); sp->color(sec1, sec2, colors->color(spi_->colorid_)); } static const Color* gray; static int csize; static const Color** crange; static int spec[] = { 95, 0, 95, 111, 0, 111, 127, 0, 143, 143, 0, 127, 159, 0, 111, 175, 0, 95, 191, 0, 79, 207, 0, 63, 207, 31, 47, 223, 47, 47, 239, 63, 31, 255, 79, 15, 255, 95, 7, 255, 111, 0, 255, 127, 0, 255, 143, 0, 255, 159, 0, 255, 175, 0, 255, 191, 0, 255, 207, 0, 255, 223, 0, 255, 239, 0, 255, 247, 0, 255, 255, 0, -1}; ColorValue::ColorValue(){ if (!gray) { Style* s = Session::instance()->style(); CopyString name; csize = 0; if (s->find_attribute("shape_scale_file", name)) { name = expand_env_var(name.string()); //printf("ColorValue %s\n", name.string()); FILE* f; if ((f = fopen(name.string(), "r")) == 0) { #ifdef WIN32 #else printf("Cannot open %s: Using built-in colormap for shapeplot\n", name.string()); #endif }else{ int r, g, b; while(fscanf(f, "%d %d %d", &r, &g, &b) == 3) { ++csize; } if (csize) { crange = new const Color*[csize]; rewind(f); csize = 0; while(fscanf(f, "%d %d %d", &r, &g, &b) == 3) { crange[csize] = new Color( ColorIntensity(r/256.), ColorIntensity(g/256.), ColorIntensity(b/256.) ); Resource::ref(crange[csize]); ++csize; } } fclose(f); } } if (csize == 0) { for ( csize=0; spec[csize*3] != -1; csize++) { } crange = new const Color*[csize]; for ( csize=0; spec[csize*3] != -1; csize++) { crange[csize] = new Color( ColorIntensity(spec[csize*3]/256.), ColorIntensity(spec[csize*3+1]/256.), ColorIntensity(spec[csize*3+2]/256.) ); Resource::ref(crange[csize]); } } gray = Color::lookup(Session::instance()->default_display(), "gray"); Resource::ref(gray); } csize_ = 0; crange_ = NULL; set_scale(0, 1); } ColorValue::~ColorValue(){ int i; if (csize_) { // delete the local for (i=0; i < csize_; ++i) { crange_[i]->unref(); } delete [] crange_; } } void ColorValue::set_scale(float low, float high) { if (low < high) { low_ = low; high_ = high; } notify(); } const Color* ColorValue::get_color(float val) const { float x = (val - low_)/(high_ - low_); if (csize_) { if (x > .99)return crange_[csize_-1]; else if (x < 0) return crange_[0]; else return crange_[int(csize_ * x)]; }else{ if (x > .99)return crange[csize-1]; else if (x < 0) return crange[0]; else return crange[int(csize * x)]; } } const Color* ColorValue::no_value() const { return gray; } class ColorValueGlyphItem : public MonoGlyph { public: ColorValueGlyphItem(const char*, const Color*); virtual ~ColorValueGlyphItem(); virtual void draw(Canvas*, const Allocation&)const; private: CopyString label_; const Color* color_; }; ColorValueGlyphItem::ColorValueGlyphItem(const char* buf, const Color* c) { body(new Background(WidgetKit::instance()->label(buf), c)); label_ = buf; color_ = c; } ColorValueGlyphItem::~ColorValueGlyphItem() {} void ColorValueGlyphItem::draw(Canvas* c, const Allocation& a)const { body()->draw(c, a); if (OcIdraw::idraw_stream) { OcIdraw::pict(); OcIdraw::rect(c, a.left(), a.bottom(), a.right(), a.top(), color_, NULL, true); Transformer t; t.translate(a.left(), a.bottom()); OcIdraw::text(c, label_.string(), t); OcIdraw::end(); } } Glyph* ColorValue::make_glyph() { LayoutKit& lk = *LayoutKit::instance(); WidgetKit& wk = *WidgetKit::instance(); PolyGlyph* box = lk.vbox(csize+2); int c = csize_ ? csize_ : csize; for (int i = c-1;i >= 0; --i) { char buf[50]; float x = low_ + i*(high_ - low_)/(c-1); sprintf(buf, "%5g", x); box->append(new ColorValueGlyphItem(buf, get_color(x))); // box->append(new Background(wk.label(buf), get_color(x))); } return box; } void ColorValue::colormap(int size, bool global) { int i; if (csize_) { for (i=0; i < csize_; ++i) { crange_[i]->unref(); } delete [] crange_; crange_ = NULL; csize_ = 0; } if (global) { if (csize) { for (i=0; i < csize; ++i) { crange[i]->unref(); } delete [] crange; } csize = (size > 1) ? size : 2; crange = new const Color*[csize]; for (i=0; i < csize; ++i) { crange[i] = gray; crange[i]->ref(); } }else{ csize_ = (size > 1) ? size : 2; crange_ = new const Color*[csize_]; for (i=0; i < csize_; ++i) { crange_[i] = gray; crange_[i]->ref(); } } } void ColorValue::colormap(int i, int r, int g, int b) { if (crange_) { if (i >= 0 && i < csize_ && r < 256 && g < 256 && b < 256) { crange_[i]->unref(); crange_[i] = new Color( ColorIntensity(r/256.), ColorIntensity(g/256.), ColorIntensity(b/256.) ); Resource::ref(crange_[i]); } }else{ if (i >= 0 && i < csize && r < 256 && g < 256 && b < 256) { crange[i]->unref(); crange[i] = new Color( ColorIntensity(r/256.), ColorIntensity(g/256.), ColorIntensity(b/256.) ); Resource::ref(crange[i]); } } } FastGraphItem::FastGraphItem(FastShape* g, bool s, bool p) : GraphItem(g, s, p) {} FastShape::FastShape() { } FastShape::~FastShape() { } Hinton::Hinton(double* pd, Coord xsize, Coord ysize, ShapeScene* ss) { pd_ = pd; old_ = NULL; // not referenced xsize_ = xsize/2; ysize_ = ysize/2; ss_ = ss; Oc oc; oc.notify_when_freed(pd_, this); } Hinton::~Hinton() { Oc oc; oc.notify_pointer_disconnect(this); } void Hinton::update(Observable*) { pd_ = NULL; ss_->remove(ss_->glyph_index(this)); } void Hinton::request(Requisition& req) const { assert(this); Requirement rx(2.*xsize_, 0, 0, .5); Requirement ry(2.*ysize_, 0, 0, .5); req.require_x(rx); req.require_y(ry); } void Hinton::allocate(Canvas* c, const Allocation& a, Extension& ext) { ext.set(c, a); } void Hinton::draw(Canvas* c, const Allocation& a) const { if (pd_) { Coord x = a.x(); Coord y = a.y(); const Color* color = ss_->color_value()->get_color(*pd_); c->fill_rect(x - xsize_, y - ysize_, x + xsize_, y + ysize_, color); ((Hinton*)this)->old_ = color; IfIdraw(rect(c, x - xsize_, y - ysize_, x + xsize_, y + ysize_, color, NULL, true)); } } void Hinton::fast_draw(Canvas* c, Coord x, Coord y, bool) const { if (pd_) { const Color* color = ss_->color_value()->get_color(*pd_); if (color != old_) { c->fill_rect(x - xsize_, y - ysize_, x + xsize_, y + ysize_, color); ((Hinton*)this)->old_ = color; } } } #endif //HAVE_IV neuron-7.5/src/nrniv/shapeplt.h000066400000000000000000000033521323325274500166200ustar00rootroot00000000000000#ifndef shapeplot_h #define shapeplot_h #include "shape.h" struct Symbol; class ShapePlotImpl; class SectionList; class ShapePlot : public ShapeScene { public: enum {TIME=ShapeScene::EXTRASHAPETOOL, SPACE, SHAPE}; ShapePlot(Symbol* = NULL, SectionList* = NULL); virtual ~ShapePlot(); virtual void observe(SectionList* = NULL); virtual void erase_all(); virtual void draw(Canvas*, const Allocation&) const; void variable(Symbol*); const char* varname()const; virtual void scale(float min, float max); virtual void save_phase1(ostream&); virtual void shape_plot(); virtual void make_time_plot(Section*, float x); virtual void make_space_plot(Section* s1, float x1, Section* s2, float x2); virtual void flush(); virtual void fast_flush(); void update_ptrs(); private: ShapePlotImpl* spi_; }; class ColorValue : public Resource, public Observable{ public: ColorValue(); virtual ~ColorValue(); void set_scale(float low, float high); const Color* get_color(float) const; const Color* no_value() const; float low() { return low_;} float high() { return high_;} Glyph* make_glyph(); void colormap(int size, bool global = false); void colormap(int index, int red, int green, int blue); private: float low_, high_; int csize_; const Color** crange_; }; class Hinton : public Observer, public FastShape { public: Hinton(double*, Coord xsize, Coord ysize, ShapeScene*); virtual ~Hinton(); virtual void request(Requisition&) const; virtual void allocate(Canvas*, const Allocation&, Extension&); virtual void draw(Canvas*, const Allocation&) const; virtual void fast_draw(Canvas*, Coord x, Coord y, bool) const; virtual void update(Observable*); private: double* pd_; const Color* old_; Coord xsize_, ysize_; ShapeScene* ss_; }; #endif neuron-7.5/src/nrniv/singlech.cpp000066400000000000000000000202561323325274500171310ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "nrnoc2iv.h" #include "ndatclas.h" #include "ivocvect.h" #include "ocmatrix.h" #include "classreg.h" #include "singlech.h" extern "C" { #include "membfunc.h" } #include "random1.h" #include "NegExp.h" extern "C" { void hoc_reg_singlechan(int, void (*)(...)); void _singlechan_declare(void (*)(double, double*, Datum*), int*, int); void _nrn_single_react(int, int, double); extern double exprand(double); // must be changed! } /* encoded in the order of the rates and to_states below is the order in which the _nrn_single_react statements are made. */ class SingleChanState { public: SingleChanState(); virtual ~SingleChanState(); void rate(int to_state, double value); public: int cond_; int n_; int size_; double* tau_; int* to_state_; }; class SingleChanInfo { public: int type_; void (*f_)(double, double*, Datum*); int* slist_; int n_; }; declarePtrList(SingleChanInfoList, SingleChanInfo) implementPtrList(SingleChanInfoList, SingleChanInfo) SingleChanInfoList* infolist; static SingleChan* current_chan; #define NS 3 SingleChanState::SingleChanState() { size_ = NS; to_state_ = new int[size_]; tau_ = new double[size_]; n_ = 0; cond_ = 0; } SingleChanState::~SingleChanState() { delete [] to_state_; delete [] tau_; } void SingleChanState::rate(int to_state, double value) { if (n_ >= size_) { int i; int size = 2*size_; int* s = new int[size]; double* r = new double[size]; for (i=0; i < size; ++i) { s[i] = to_state_[i]; r[i] = tau_[i]; } delete [] to_state_; delete [] tau_; to_state_ = s; tau_ = r; size_ = size; } to_state_[n_]= to_state; tau_[n_] = 1/value; ++n_; } extern "C" { // bug in cray compiler. But it cant hurt. void hoc_reg_singlechan(int type, void (*f)(...)){ if (!infolist) { infolist = new SingleChanInfoList(); } SingleChanInfo* info = new SingleChanInfo(); info->type_ = type; infolist->append(info); (*f)(); #if 0 if (nrn_istty_) { printf("Allow single channel model for %s\n", memb_func[info->type_].sym->name); } #endif } void _singlechan_declare(void (*f)(double, double*, Datum*), int* slist, int n) { SingleChanInfo* info = infolist->item(infolist->count()-1); info->f_ = f; info->slist_ = slist; info->n_ = n; } } void _nrn_single_react(int i, int j, double rate) { // printf("_nrn_single_react %d %d %g\n", i, j, rate); current_chan->state_[i].rate(j, rate); } SingleChan::SingleChan(const char* name) { r_ = NULL; erand_ = &SingleChan::erand1; nprop_ = new NrnProperty(name); int i; for (i=0; i < infolist->count(); ++i) { if (infolist->item(i)->type_ == nprop_->type()) { info_ = infolist->item(i); } } if (!info_) { hoc_execerror(name, "cannot be a SingleChannel"); } state_ = new SingleChanState[info_->n_]; set_rates(0.); } SingleChan::SingleChan(OcMatrix* m) { r_ = NULL; erand_ = &SingleChan::erand1; state_ = NULL; nprop_ = NULL; info_ = new SingleChanInfo(); info_->type_ = -1; info_->f_ = NULL; info_->slist_ = NULL; info_->n_ = 0; set_rates(m); } SingleChan::~SingleChan() { if (state_) { delete [] state_; } if (nprop_) { delete nprop_; }else{ delete info_; } if (r_) { hoc_obj_unref(r_->obj_); } } void SingleChan::set_rates(double v) { int i, n = info_->n_; if (info_->f_) { for (i=0; i < n; ++i) { state_[i].n_ = 0; } current_chan = (SingleChan*)this; (*info_->f_)(v, nprop_->prop()->param, nprop_->prop()->dparam); } } void SingleChan::set_rates(OcMatrix* m) { assert(nprop_ == NULL); if (state_) { delete [] state_; } info_->n_ = m->nrow(); state_ = new SingleChanState[n()]; int i, j; for (i=0; i < n(); ++i) { SingleChanState& s = state_[i]; s.n_ = 0; for (j=0; j < n(); ++j) { double val = m->getval(i,j); if (val > 0.) { s.rate(j, 1./val); } } } } void SingleChan::set_rates(int i, int j, double tau) { assert(i < n() && j < n() && tau > 0.0); SingleChanState& s = state_[i]; int k; for (k=0; k < n(); ++k) { if (j == s.to_state_[k]) { s.tau_[k] = tau; return; } } assert(k < n()); } const char* SingleChan::name(int i) { return NULL; } int SingleChan::index(const char* name) { return -1; } int SingleChan::cond(int i) { return state_[i].cond_; } void SingleChan::cond(int i, int cond) { state_[i].cond_ = cond; } void SingleChan::current_state(int i) { current_ = i; } int SingleChan::current_state() { return current_; } int SingleChan::current_cond() { return cond(current_); } double SingleChan::state_transition() { double dt = 1e15; double t; int i, j=0, n=state_[current_].n_; SingleChanState& s = state_[current_]; for (i = 0; i < n; ++i) { if ((t = s.tau_[i]* (this->*erand_)()) < dt) { dt = t; j = i; } } current_ = s.to_state_[j]; return dt; } double SingleChan::erand1() { return exprand(1); } double SingleChan::erand2() { return (*r_->rand)(); } void SingleChan::setrand(Rand* r) { if (r) { hoc_obj_ref(r->obj_); delete r->rand; r->rand = new NegativeExpntl(1.0, r->gen); erand_ = &SingleChan::erand2; }else{ erand_ = &SingleChan::erand1; } if (r_) { hoc_obj_unref(r_->obj_); } r_ = r; } int SingleChan::n() { return info_->n_; } double SingleChan::cond_transition() { double dt = 0; int i = cond(current_); do { dt += state_transition(); }while(cond(current_) == i); return dt; } void SingleChan::state_transitions(Vect* dt, Vect* state) { int i; int n = dt->capacity(); state->resize(n); for (i=0; i < n; ++i) { state->elem(i) = current_; dt->elem(i) = state_transition(); } } void SingleChan::cond_transitions(Vect* dt, Vect* cond) { int i; int n = dt->capacity(); cond->resize(n); for (i=0; i < n; ++i) { cond->elem(i) = current_cond(); dt->elem(i) = cond_transition(); } } void SingleChan::get_rates(OcMatrix* m) { m->resize(n(), n()); m->zero(); int i, j; for (i=0; i < n(); ++i) { SingleChanState& s = state_[i]; for (j=0; j < s.n_; ++j) { *m->mep(i,s.to_state_[j]) += 1/s.tau_[j]; } } } static double set_rates(void* v) { SingleChan* s = (SingleChan*)v; if (hoc_is_object_arg(1)) { s->set_rates(matrix_arg(1)); }else if (ifarg(3)) { int i, j; double val; i = (int)chkarg(1, 0., s->n()-1); j = (int)chkarg(2, 0., s->n()-1); val = chkarg(3, 1e-10, 1e10); s->set_rates(i, j, val); }else{ s->set_rates(*getarg(1)); } return 0.; } static double get_rates(void* v) { SingleChan* s = (SingleChan*)v; s->get_rates(matrix_arg(1)); return 1.; } static double set_rand(void* v) { SingleChan* s = (SingleChan*)v; Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "Random"); Rand* r = (Rand*)(ob->u.this_pointer); s->setrand(r); return 1.; } static double cond(void* v) { SingleChan* s = (SingleChan*)v; int i = (int)chkarg(1, 0, s->n()); if (ifarg(2)) { s->cond(i, (int)*getarg(2)); } return double(s->cond(i)); } static double current_state(void* v) { SingleChan* s = (SingleChan*)v; if (ifarg(1)) { s->current_state((int)chkarg(1,0,s->n())); } return (double)s->current_state(); } static double current_cond(void* v) { SingleChan* s = (SingleChan*)v; return (double)s->cond(s->current_state()); } static double state_transition(void* v) { SingleChan* s = (SingleChan*)v; return s->state_transition(); } static double cond_transition(void* v) { SingleChan* s = (SingleChan*)v; return s->cond_transition(); } static double state_transitions(void* v) { SingleChan* s = (SingleChan*)v; s->state_transitions(vector_arg(1), vector_arg(2)); return 1.; } static double cond_transitions(void* v) { SingleChan* s = (SingleChan*)v; s->cond_transitions(vector_arg(1), vector_arg(2)); return 1.; } static Member_func members[] = { "state_transition", state_transition, "cond_transition", cond_transition, "set_rates", set_rates, "get_rates", get_rates, "cond", cond, "current_state", current_state, "current_cond", current_cond, "state_transitions", state_transitions, "cond_transitions", cond_transitions, "set_rand", set_rand, 0, 0 }; static void* cons(Object*) { SingleChan* s; if (hoc_is_str_arg(1)) { s = new SingleChan(gargstr(1)); }else{ s = new SingleChan(matrix_arg(1)); } return (void*)s; } static void destruct(void* v) { SingleChan* s = (SingleChan*)v; delete s; } void SingleChan_reg() { class2oc("SingleChan", cons, destruct, members, NULL, NULL, NULL); } neuron-7.5/src/nrniv/singlech.h000077500000000000000000000016131323325274500165750ustar00rootroot00000000000000#ifndef singlech_h #define singlech_h class SingleChanInfo; class SingleChanState; class NrnProperty; class Vect; class OcMatrix; class Rand; class SingleChan { public: SingleChan(const char*); SingleChan(OcMatrix*); virtual ~SingleChan(); void set_rates(double v); void set_rates(OcMatrix*); void set_rates(int, int, double tau); const char* name(int); int index(const char*); int current_state(); void current_state(int); int cond(int); void cond(int, int); int current_cond(); double state_transition(); double cond_transition(); void state_transitions(Vect* dt, Vect* state); void cond_transitions(Vect* dt, Vect* cond); int n(); void get_rates(OcMatrix*); void setrand(Rand*); public: SingleChanState* state_; private: double (SingleChan::*erand_)(); double erand1(); double erand2(); Rand* r_; private: SingleChanInfo* info_; NrnProperty* nprop_; int current_; }; #endif neuron-7.5/src/nrniv/spaceplt.cpp000066400000000000000000000373261323325274500171560ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "classreg.h" #include #include #include #include #include #if HAVE_IV #include "graph.h" #include "scenepic.h" #include "utility.h" #include "ivoc.h" #endif #include "ivocvect.h" #include "nrnoc2iv.h" #include "objcmd.h" extern "C" { extern int nrn_multisplit_active_; extern int hoc_execerror_messages; extern int node_index(Section*, double); extern int structure_change_cnt, nrn_shape_changed_; }; class SecPos { public: float x; float len; Section* sec; }; declareList(SecPosList, SecPos); implementList(SecPosList, SecPos); class RangeExpr { public: RangeExpr(const char* expr, Object* pyobj, SecPosList*); virtual ~RangeExpr(); void fill(); void compute(); bool exists(int); double* pval(int); private: long n_; SecPosList* spl_; double* val_; bool* exist_; HocCommand* cmd_; }; #if !HAVE_IV class NoIVGraphVector { public: NoIVGraphVector(const char*); virtual ~NoIVGraphVector(); void begin(); void add(float, double*); int count(); CopyString name_; int count_, size_; double** py_; float* x_; }; NoIVGraphVector::NoIVGraphVector(const char* name) { name_ = name; size_ = 0; count_ = 0; py_ = NULL; x_ = NULL; } NoIVGraphVector::~NoIVGraphVector() { if (py_) { delete [] py_; delete [] x_; } } int NoIVGraphVector::count() {return count_;} void NoIVGraphVector::begin() { count_ = 0; if (!size_) { size_ = 20; py_ = new double*[size_]; x_ = new float[size_]; } } void NoIVGraphVector::add(float x, double* y) { if ( count_ == size_) { size_ *= 2; double** py = new double*[size_]; float* px = new float[size_]; for (int i=0; ix_begin(x, sec); return 1.; } static double s_end(void* v) { double x; Section* sec; nrn_seg_or_x_arg(1, &sec, &x); ((RangeVarPlot*)v)->x_end(x, sec); return 1.; } static double s_origin(void* v) { ((RangeVarPlot*)v)->origin(*getarg(1)); return 1.; } static double s_d2root(void* v) { return ((RangeVarPlot*)v)->d2root(); return 0.0; } static double s_left(void* v) { return ((RangeVarPlot*)v)->left(); return 0.0; } static double s_right(void* v) { return ((RangeVarPlot*)v)->right(); return 0.0; } static double s_list(void* v) { Object* ob = *hoc_objgetarg(1); check_obj_type(ob, "SectionList"); ((RangeVarPlot*)v)->list(ob); return 0.; } static double s_color(void* v) { #if HAVE_IV IFGUI ((RangeVarPlot*)v)->color(colors->color((int)chkarg(1,0,100))); ENDGUI #endif return 0.; } static double to_vector(void* v) { RangeVarPlot* rvp = (RangeVarPlot*)v; Vect* y = vector_arg(1); #if HAVE_IV long i, cnt = rvp->py_data()->count(); #else long i, cnt = rvp->count(); #endif rvp->compute(); y->resize(cnt); for (i=0; i < cnt; ++i) { #if HAVE_IV y->elem(i) = *rvp->py_data()->p(i); #else if (rvp->py_[i]) { y->elem(i) = *rvp->py_[i]; }else{ y->elem(i) = 0.0; } #endif } if (ifarg(2)) { Vect* x = vector_arg(2); x->resize(cnt); for (i=0; i < cnt; ++i) { #if HAVE_IV x->elem(i) = rvp->x_data()->get_val(i); #else x->elem(i) = rvp->x_[i]; #endif } } return double(cnt); } static double from_vector(void* v) { RangeVarPlot* rvp = (RangeVarPlot*)v; Vect* y = vector_arg(1); #if HAVE_IV long i, cnt = rvp->py_data()->count(); for (i=0; i < cnt; ++i) { *rvp->py_data()->p(i) = y->elem(i); } #else long i, cnt = rvp->count(); for (i=0; i < cnt; ++i) { if (rvp->py_[i]) { *rvp->py_[i] = y->elem(i); } } #endif return double(cnt); } static Member_func s_members[] = { "begin", s_begin, "end", s_end, "origin", s_origin, "d2root", s_d2root, "left", s_left, "right", s_right, "list", s_list, "color", s_color, "to_vector", to_vector, "from_vector", from_vector, 0, 0 }; static void* s_cons(Object*) { char* var = NULL; Object* pyobj = NULL; if (hoc_is_str_arg(1)) { var = gargstr(1); }else{ pyobj = *hoc_objgetarg(1); } RangeVarPlot* s = new RangeVarPlot(var, pyobj); #if HAVE_IV s->ref(); #endif return (void*)s; } static void s_destruct(void* v) { #if HAVE_IV Resource::unref((RangeVarPlot*)v); #endif } void RangeVarPlot_reg() { //printf("RangeVarPlot_reg\n"); class2oc("RangeVarPlot", s_cons, s_destruct, s_members, NULL, NULL, NULL); } #if HAVE_IV RangeVarPlot::RangeVarPlot(const char* var, Object* pyobj) : GraphVector(var ? var : "pyobj") { #else RangeVarPlot::RangeVarPlot(const char* var, Object* pyobj) : NoIVGraphVector(var) { #endif begin_section_ = 0; end_section_ = 0; sec_list_ = new SecPosList(50); struc_changed_ = structure_change_cnt; shape_changed_ = nrn_shape_changed_; #if HAVE_IV Oc oc; oc.notify_attach(this); #endif if ((var && strstr(var, "$1")) || pyobj) { rexp_ = new RangeExpr(var, pyobj, sec_list_); }else{ rexp_ = NULL; } expr_ = var ? var : "pyobj"; origin_ = 0.; d2root_ = 0.; } RangeVarPlot::~RangeVarPlot() { if (begin_section_) { section_unref(begin_section_); begin_section_ = NULL; } if (end_section_) { section_unref(end_section_); end_section_ = NULL; } delete sec_list_; if (rexp_) { delete rexp_; } #if HAVE_IV Oc oc; oc.notify_detach(this); #endif } #if HAVE_IV void RangeVarPlot::update(Observable* o) { if (o) { // must be Oc::notify_change_ because free is NULL // but do not update if multisplit active if (shape_changed_ != nrn_shape_changed_ && !nrn_multisplit_active_) { //printf("RangeVarPlot::update shape_changed %d %d\n", shape_changed_, nrn_shape_changed_); shape_changed_ = nrn_shape_changed_; set_x(); fill_pointers(); } }else{ //printf("RangeVarPlot::update -> GraphVector::update\n"); GraphVector::update(o); } } #endif void RangeVarPlot::origin(float x) { origin_ = x; fill_pointers(); } double RangeVarPlot::d2root() { return d2root_; } void RangeVarPlot::x_begin(float x, Section* sec) { if (begin_section_) { section_unref(begin_section_); } begin_section_ = sec; section_ref(begin_section_); x_begin_ = x; set_x(); fill_pointers(); } void RangeVarPlot::x_end(float x, Section* sec) { if (end_section_) { section_unref(end_section_); } end_section_ = sec; section_ref(end_section_); x_end_ = x; set_x(); fill_pointers(); } float RangeVarPlot::left() { if (sec_list_->count()) { return sec_list_->item(0).len + origin_; }else{ return origin_; } } float RangeVarPlot::right() { if (sec_list_->count()) { return sec_list_->item(sec_list_->count() - 1).len + origin_; }else{ return origin_; } } void RangeVarPlot::compute() { if (rexp_) { rexp_->compute(); } } #if HAVE_IV void RangeVarPlot::request(Requisition& req) const { if (rexp_) { rexp_->compute(); } GraphVector::request(req); } #endif #if HAVE_IV void RangeVarPlot::save(ostream& o) { char buf[256]; o << "objectvar rvp_" << endl; sprintf(buf, "rvp_ = new RangeVarPlot(\"%s\")", expr_.string()); o << buf << endl; sprintf(buf, "%s rvp_.begin(%g)",hoc_section_pathname(begin_section_), x_begin_); o << buf << endl; sprintf(buf, "%s rvp_.end(%g)",hoc_section_pathname(end_section_), x_end_); o << buf << endl; sprintf(buf, "rvp_.origin(%g)", origin_); o << buf << endl; Coord x, y; label_loc(x, y); sprintf(buf, "save_window_.addobject(rvp_, %d, %d, %g, %g)", colors->color(color()), brushes->brush(brush()), x, y); o << buf << endl; } #endif #if HAVE_IV bool RangeVarPlot::choose_sym(Graph* g) { // printf("RangeVarPlot::choose_sym\n"); char s[256]; s[0] = '\0'; while (str_chooser("Range Variable or expr involving $1", s, XYView::current_pick_view()->canvas()->window())) { RangeVarPlot* rvp = new RangeVarPlot(s, NULL); rvp->ref(); rvp->begin_section_ = begin_section_; rvp->x_begin_ = x_begin_; rvp->end_section_ = end_section_; rvp->x_end_ = x_end_; rvp->set_x(); rvp->origin(origin_); // check to see if there is anything to plot if (!rvp->trivial()) { g->add_graphVector(rvp); rvp->label(g->label(s)); rvp->unref(); break; }else{ printf("%s doesn't exist along the path %s(%g)", s, secname(begin_section_), x_begin_); printf(" to %s(%g)\n", secname(end_section_), x_end_); } rvp->unref(); } return true; } #endif #if 0 void SpacePlot::expr(const char* expr) { is_var_ = false; if (gv_) { gv_->begin(); } Graph::add_var(expr); set_x(); } #endif void RangeVarPlot::fill_pointers() { long xcnt = sec_list_->count(); if (xcnt) { Symbol* sym; char buf[200]; begin(); if (rexp_) { rexp_->fill(); }else{ sscanf(expr_.string(), "%[^[]", buf); sym = hoc_lookup(buf); if (!sym) { return; } sprintf(buf, "%s(hoc_ac_)", expr_.string()); } int noexist=0;// don't plot single points that don't exist bool does_exist; double* pval = NULL; for (long i=0; i < xcnt; ++i) { Section* sec = sec_list_->item(i).sec; hoc_ac_ = sec_list_->item(i).x; if (rexp_) { does_exist = rexp_->exists(int(i)); }else{ nrn_pushsec(sec); does_exist = nrn_exists(sym, node_exact(sec, hoc_ac_)); //does_exist = nrn_exists(sym, sec->pnode[node_index(sec, hoc_ac_)]); } if (does_exist) { if (rexp_) { pval = rexp_->pval(int(i)); }else{ pval = hoc_val_pointer(buf); } if (noexist > 1) { add (sec_list_->item(i-1).len + origin_, 0); add (sec_list_->item(i-1).len + origin_, pval); } if (i == 1 && noexist == 1) { add(sec_list_->item(i-1).len + origin_, pval); } add(sec_list_->item(i).len + origin_, pval); noexist = 0; }else{ if (noexist == 1) { add (sec_list_->item(i-1).len + origin_, pval); add (sec_list_->item(i-1).len + origin_, 0); } if (i == xcnt - 1 && noexist == 0) { add (sec_list_->item(i).len + origin_, pval); } ++noexist; } nrn_popsec(); } } } void RangeVarPlot::list(Object* ob) { hoc_List* l = (hoc_List*)ob->u.this_pointer; long i, cnt = sec_list_->count(); Section* sec = NULL; for (i = 0; i < cnt; ++i) { if (sec_list_->item(i).sec != sec) { sec = sec_list_->item(i).sec; if (sec) { hoc_l_lappendsec(l, sec); section_ref(sec); } } } } #if 0 void SpacePlot::plot() { Graph* g = (Graph*)this; long xcnt = sec_list_->count(); double* x = hoc_val_pointer("x"); if (xcnt) { g->begin(); for (long i=0; i < xcnt; ++i) { nrn_pushsec(sec_list_->item(i).sec); *x = sec_list_->item(i).x; gr_->plot(sec_list_->item(i).len); nrn_popsec(); } } gr_->flush(); } void SpacePlot::plot() { gr_->flush(); } #endif void RangeVarPlot::set_x() { sec_list_->remove_all(); if (!begin_section_ || !end_section_ || !begin_section_->prop || !end_section_->prop) { return; } SecPos spos; double d, dist, d2r, x; Section* sec, *sec1, *sec2, *rootsec; Node* nd, *nd1, *nd2, *rootnode; sec1 = begin_section_; sec2 = end_section_; v_setup_vectors(); nd1 = node_exact(sec1, x_begin_); nd2 = node_exact(sec2, x_end_); dist = topol_distance(sec1, nd1, sec2, nd2, &rootsec, &rootnode); //printf("dist=%g\n", dist); if (!rootnode) { hoc_execerror("SpacePlot", "No path from begin to end points"); } d2r = topol_distance(sec1, nd1, rootsec, rootnode, &rootsec, &rootnode); #if 0 gr_->erase_most(); gr_->new_size(-d2r, -80, dist-d2r, 40); gr_->xaxis(0,1,1); gr_->yaxis(0,1,1); Coord y1=gr_->y1(), y2 = gr_->y2(); gr_->new_size(-d2r - dist/10, y1 - (y2-y1)/10, dist*1.1 - d2r, y2 + (y2-y1)/10); #endif nd = nd1; sec = sec1; d = -d2r + node_dist(sec, nd); while (nd != rootnode) { x = node_dist(sec, nd); spos.sec = sec; spos.x = nrn_arc_position(sec, nd); spos.len = d - x; //printf("%s(%g) at %g %g\n", secname(spos.sec), spos.x, spos.len, x); sec_list_->append(spos); if (x == 0.) { sec = nrn_trueparent(sec); d += node_dist(sec, nd); } nd = nrn_parent_node(nd); } if (sec) { spos.sec = sec; }else{ spos.sec = nd->child; } spos.x = nrn_arc_position(spos.sec, nd); spos.len = 0.; //printf("%s(%g) at %g root\n", secname(spos.sec), spos.x, spos.len); sec_list_->append(spos); long indx = sec_list_->count(); nd = nd2; sec = sec2; d = dist - d2r - node_dist(sec, nd); while (nd != rootnode) { x = node_dist(sec, nd); spos.sec = sec; spos.x = nrn_arc_position(sec, nd); spos.len = d + x; //printf("%s(%g) at %g\n", secname(spos.sec), spos.x, spos.len); sec_list_->insert(indx, spos); if (x == 0.) { sec = nrn_trueparent(sec); d -= node_dist(sec, nd); } nd = nrn_parent_node(nd); } for (sec = rootsec; sec->parentsec; sec = sec->parentsec){} nd = sec->parentnode; d2root_ = topol_distance(rootsec, rootnode, sec, nd, &sec, &nd); //debugging #if 0 printf("debugging\n"); long cnt, icnt; cnt = sec_list_->count(); for (icnt=0; icntitem(icnt).sec), sec_list_->item(icnt).x, sec_list_->item(icnt).len); } #endif } RangeExpr::RangeExpr(const char* expr, Object* pycall, SecPosList* spl) { spl_ = spl; n_ = 0; val_ = NULL; exist_ = NULL; if (pycall) { cmd_ = new HocCommand(pycall); return; } char buf[256]; const char* p1; char* p2; sprintf(buf, "hoc_ac_ = "); p2 = buf + strlen(buf); for (p1 = expr; *p1;) { if (p1[0] == '$' && p1[1] == '1') { p1 += 2; strcpy(p2, "hoc_ac_"); p2 += 7; }else{ *p2++ = *p1++; } } *p2 = '\0'; cmd_ = new HocCommand(buf); } RangeExpr::~RangeExpr() { if (val_) { delete [] val_; delete [] exist_; } delete cmd_; } void RangeExpr::fill() { if (n_ != spl_->count()) { if (val_) { delete [] val_; delete [] exist_; } n_ = spl_->count(); if (n_) { val_ = new double[n_]; exist_ = new bool[n_]; } } int temp = hoc_execerror_messages; for (long i=0; i < n_; ++i) { nrn_pushsec(spl_->item(i).sec); hoc_ac_ = spl_->item(i).x; hoc_execerror_messages = 0; if (cmd_->pyobject()) { hoc_pushx(hoc_ac_); int err = 0; // no messages cmd_->func_call(1, &err); // return err==0 means success exist_[i] = err ? false : true; if (err) { val_[i] = 0.0; } nrn_popsec(); continue; } if (cmd_->execute(bool(false)) == 0) { exist_[i] = true; val_[i] = 0.; }else{ exist_[i] = false; #if 0 printf("RangeExpr: %s no exist at %s(%g)\n", cmd_->name(), secname(spl_->item(i).sec), spl_->item(i).x ); #endif } nrn_popsec(); } hoc_execerror_messages = temp; } void RangeExpr::compute() { for (long i=0; i < n_; ++i) { if (exist_[i]) { nrn_pushsec(spl_->item(i).sec); hoc_ac_ = spl_->item(i).x; if (cmd_->pyobject()) { hoc_pushx(hoc_ac_); int err = 1; // messages val_[i] = cmd_->func_call(1, &err); }else{ cmd_->execute(bool(false)); val_[i] = hoc_ac_; } nrn_popsec(); } } } bool RangeExpr::exists(int i) { if (i < n_) { return exist_[i]; }else{ return false; } } double* RangeExpr::pval(int i) { if (i < n_) { return val_ + i; }else{ return 0; } } neuron-7.5/src/nrniv/splitcell.cpp000066400000000000000000000115451323325274500173310ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include #include #include /* Started out attempting a general implementation in which the subtrees could be on any host and any number of them. That required a distinct gid for each subtree. However, since the only purpose of cellsplit is for load balance efficiency, we settled on a very restrictive but still adequate policy of subtrees being on adjacent hosts and at most one cell split between i and i+1 and at most one cell split between i and i-1. We also disallow a split where both subtrees are on the same host. This policy allows a very simple and direct setting up and transfer of matrix information. Note that gid information about the subtrees is no longer required by this implementation. */ extern "C" { void nrnmpi_splitcell_connect(int that_host); // that_host must be adjacent to nrnmpi_myid extern int structure_change_cnt; #if PARANEURON void nrnmpi_split_clear(); extern void (*nrnmpi_splitcell_compute_)(); extern void nrnmpi_send_doubles(double*, int cnt, int dest, int tag); extern void nrnmpi_recv_doubles(double*, int cnt, int src, int tag); extern double nrnmpi_splitcell_wait_; #endif } #if PARANEURON static int change_cnt_; static void transfer(); static void set_structure(); static void splitcell_compute(); class SplitCell { public: Section* rootsec_; int that_host_; }; declarePtrList(SplitCellList, SplitCell) implementPtrList(SplitCellList, SplitCell) static SplitCellList* splitcell_list_; #define ip 0 #define im 2 static bool splitcell_connected_[2]; static double* transfer_p_[4]; #endif void nrnmpi_splitcell_connect(int that_host) { #if PARANEURON int i; if (!splitcell_list_) { splitcell_list_ = new SplitCellList(); } Section* rootsec = chk_access(); if (abs(nrnmpi_myid - that_host) != 1) { hoc_execerror("cells may be split only on adjacent hosts", 0); } if (that_host < 0 || that_host >= nrnmpi_numprocs) { hoc_execerror("adjacent host out of range", 0); } if (rootsec->parentsec) { hoc_execerror(secname(rootsec), "is not a root section"); } // printf("%d nrnmpi_splitcell_connect %s %d\n", nrnmpi_myid, // secname(rootsec), that_host); nrnmpi_splitcell_compute_ = splitcell_compute; for (i=0; i < 2; ++i) if (that_host == nrnmpi_myid + i*2-1) { if (splitcell_connected_[i]) { char buf[100]; sprintf(buf, "%d and %d", nrnmpi_myid, that_host); hoc_execerror("splitcell connection already exists between hosts", buf); } splitcell_connected_[i] = true; } SplitCell* sc = new SplitCell(); splitcell_list_->append(sc); sc->rootsec_ = rootsec; sc->that_host_ = that_host; #else if (nrnmpi_myid == 0) { hoc_execerror("ParallelContext.splitcell not available.", "NEURON not configured with --with-paranrn"); } #endif } #if PARANEURON void nrnmpi_split_clear() { if (nrnmpi_splitcell_compute_ == splitcell_compute) { if (nrnmpi_myid == 0) { hoc_execerror("nrnmpi_split_clear ", "not implemented"); } } } void splitcell_compute() { int i; if (structure_change_cnt != change_cnt_) { set_structure(); change_cnt_ = structure_change_cnt; } transfer(); #if 0 for (i = 0; i < split_cnt_; ++i) { SplitInfo& si = split_info_[i]; if (si.that_host == nrnmpi_myid) { SplitInfo& sj = split_info_[si.that_index]; sj.d_that = *(si.d_this); sj.rhs_that = *(si.rhs_this); } } for (i = 0; i < split_cnt_; ++i) { SplitInfo& si = split_info_[i]; *(si.d_this) += si.d_that; *(si.rhs_this) += si.rhs_that; } #endif } void transfer() { double trans[2], trans_sav[2]; double wt = nrnmpi_wtime(); if (transfer_p_[ip]) { trans[0] = *transfer_p_[ip + 0]; trans[1] = *transfer_p_[ip + 1]; nrnmpi_send_doubles(trans, 2, nrnmpi_myid+1, 1); } if (transfer_p_[im]) { nrnmpi_recv_doubles(trans_sav, 2, nrnmpi_myid-1, 1); // defer copying to the d and rhs variables since the // old info needs to be transferred next trans[0] = *transfer_p_[im + 0]; trans[1] = *transfer_p_[im + 1]; *transfer_p_[im + 0] += trans_sav[0]; *transfer_p_[im + 1] += trans_sav[1]; nrnmpi_send_doubles(trans, 2, nrnmpi_myid-1, 1); } if (transfer_p_[ip]) { nrnmpi_recv_doubles(trans, 2, nrnmpi_myid+1, 1); *transfer_p_[ip + 0] += trans[0]; *transfer_p_[ip + 1] += trans[1]; } nrnmpi_splitcell_wait_ += nrnmpi_wtime() - wt; errno = 0; } void set_structure() { int i, cnt; if (!splitcell_list_) { return; } cnt = splitcell_list_->count(); for (i = 0; i < cnt; ++i) { SplitCell& sc = *splitcell_list_->item(i); if (sc.that_host_ == nrnmpi_myid + 1) { transfer_p_[ip + 0] = &NODED(sc.rootsec_->parentnode); transfer_p_[ip + 1] = &NODERHS(sc.rootsec_->parentnode); }else{ assert(sc.that_host_ == nrnmpi_myid - 1); transfer_p_[im + 0] = &NODED(sc.rootsec_->parentnode); transfer_p_[im + 1] = &NODERHS(sc.rootsec_->parentnode); } } } #endif neuron-7.5/src/nrniv/structpool.h000077500000000000000000000054751323325274500172310ustar00rootroot00000000000000#ifndef structpool_h #define structpool_h // same as ../nrncvode/pool.h but items do not require a clear method. // create and manage a vector of objects as a memory pool of those objects // the object must have a void clear() method which takes care of any // data the object contains which should be deleted upon free_all. // clear() is NOT called on free, only on free_all. // the chain of Pool // is only for extra items in a pool_ and no other fields are used. // the pool doubles in size every time a chain Pool is added. // maxget() tells the most number of pool items used at once. #define declareStructPool(Pool,T) \ class Pool { \ public: \ Pool(long count); \ ~Pool(); \ T* alloc(); \ void hpfree(T*); \ int maxget() { return maxget_;} \ void free_all(); \ int is_valid_ptr(void*); \ private: \ void grow(); \ private: \ T** items_; \ T* pool_; \ long pool_size_; \ long count_; \ long get_; \ long put_; \ long nget_; \ long maxget_; \ Pool* chain_; \ }; \ \ #define implementStructPool(Pool,T) \ Pool::Pool(long count) { \ count_ = count; \ pool_ = new T[count_]; \ pool_size_ = count; \ items_ = new T*[count_]; \ for (long i = 0; i < count_; ++i) items_[i] = pool_ + i; \ get_ = 0; \ put_ = 0; \ nget_ = 0; \ maxget_ = 0; \ chain_ = 0; \ } \ \ void Pool::grow() { \ assert(get_ == put_); \ Pool* p = new Pool(count_); \ p->chain_ = chain_; \ chain_ = p; \ long newcnt = 2*count_; \ T** itms = new T*[newcnt]; \ long i, j; \ put_ += count_; \ for (i = 0; i < get_; ++i) { \ itms[i] = items_[i]; \ } \ for (i = get_, j = 0; j < count_; ++i, ++j) { \ itms[i] = p->items_[j]; \ } \ for (i = put_, j = get_; j < count_; ++i, ++j) { \ itms[i] = items_[j]; \ } \ delete [] items_; \ delete [] p->items_; \ p->items_ = 0; \ items_ = itms; \ count_ = newcnt; \ } \ \ Pool::~Pool() { \ if (chain_) { \ delete chain_; \ } \ delete [] pool_; \ if (items_) { \ delete [] items_; \ } \ } \ \ int Pool::is_valid_ptr(void* v) { \ Pool* pp; \ for(pp = this; pp; pp = pp->chain_) { \ void* vp = (void*)(pp->pool_); \ if (v >= vp && v < (void*)(pp->pool_ + pp->pool_size_)) { \ if (( ((char*)v - (char*)vp)%sizeof(T) ) == 0) { \ return 1; \ }else{ \ return 0; \ } \ } \ } \ return 0; \ } \ \ T* Pool::alloc() { \ if (nget_ >= count_) { grow(); } \ T* item = items_[get_]; \ get_ = (get_+1)%count_; \ ++nget_; \ if (nget_ > maxget_) { maxget_ = nget_; } \ return item; \ } \ \ void Pool::hpfree(T* item) { \ assert(nget_ > 0); \ items_[put_] = item; \ put_ = (put_ + 1)%count_; \ --nget_; \ } \ \ void Pool::free_all() { \ Pool* pp; \ long i; \ nget_ = 0; \ get_ = 0; \ put_ = 0; \ for(pp = this; pp; pp = pp->chain_) { \ for (i=0; i < pp->pool_size_; ++i) { \ items_[put_++] = pp->pool_ + i; \ } \ } \ assert(put_ == count_); \ put_ = 0; \ } \ \ #endif neuron-7.5/src/nrniv/symdir.cpp000077500000000000000000000002501323325274500166370ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../ivoc/symdir.cpp" neuron-7.5/src/nrniv/tqueue.cpp000077500000000000000000000002541323325274500166440ustar00rootroot00000000000000/* * Automake doesn't deal well with source files in a separate directory, so * this is just a stub to trick it into working right. */ #include "../nrncvode/tqueue.cpp" neuron-7.5/src/nrniv/vrecord.cpp000066400000000000000000000247651323325274500170120ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #if HAVE_IV #include "ivoc.h" #endif #include "nrnoc2iv.h" #include "ocobserv.h" #include "ivocvect.h" #include #include "ocpointer.h" #include "vrecitem.h" #include "netcvode.h" #include "cvodeobj.h" extern "C" { extern double t; extern NetCvode* net_cvode_instance; extern Point_process* ob2pntproc(Object*); } //Vector.play_remove() void nrn_vecsim_remove(void* v) { PlayRecord* pr; while ((pr = net_cvode_instance->playrec_uses(v)) != 0) { delete pr; } } void nrn_vecsim_add(void* v, bool record) { IvocVect* yvec, *tvec, *dvec; extern short* nrn_is_artificial_; double* pvar = NULL; char* s = NULL; double ddt; Object* ppobj = NULL; int iarg = 0; yvec = (IvocVect*)v; if (hoc_is_object_arg(1)) { iarg = 1; ppobj = *hoc_objgetarg(1); if (!ppobj || ppobj->ctemplate->is_point_ <= 0 || nrn_is_artificial_[ob2pntproc(ppobj)->prop->type] ) { hoc_execerror("Optional first arg is not a POINT_PROCESS", 0); } } if (record == false && hoc_is_str_arg(iarg+1)) {//statement involving $1 // Vector.play("proced($1)", ...) s = gargstr(iarg+1); }else if (record == false && hoc_is_double_arg(iarg+1)) {// play that element // Vector.play(index) // must be a VecPlayStep and nothing else VecPlayStep* vps = (VecPlayStep*)net_cvode_instance->playrec_uses(v); if (vps) { int j = (int)chkarg(iarg+1, 0., yvec->capacity()-1); if (vps->si_) { vps->si_->play_one(yvec->elem(j)); } } return; }else{ // Vector.play(&SEClamp[0].amp1, ...) // Vector.record(&SEClamp[0].i, ...) pvar = hoc_pgetarg(iarg+1); } tvec = NULL; dvec = NULL; ddt = -1.; int con = 0; if (ifarg(iarg+2)) { if (hoc_is_object_arg(iarg+2)) { // Vector...(..., tvec) tvec = vector_arg(iarg+2); }else{ // Vector...(..., Dt) ddt = chkarg(iarg+2, 1e-9, 1e10); } if (ifarg(iarg+3)) { if (hoc_is_double_arg(iarg+3)) { con = (int)chkarg(iarg+3, 0., 1.); }else{ dvec = vector_arg(iarg+3); con = 1; } } } // tvec can be used for many record/play items // if (tvec) { nrn_vecsim_remove(tvec); } if (record) { // yvec can be used only for one record (but many play) if (yvec) { nrn_vecsim_remove(yvec); } if (tvec) { new VecRecordDiscrete(pvar, yvec, tvec, ppobj); } else if (ddt > 0.) { new VecRecordDt(pvar, yvec, ddt, ppobj); } else if (pvar == &t) { new TvecRecord(chk_access(), yvec, ppobj); } else { new YvecRecord(pvar, yvec, ppobj); } }else{ if (con) { if (!tvec) { hoc_execerror("Second argument of Vector.play in continuous mode must be a time vector", 0); } if (s) { new VecPlayContinuous(s, yvec, tvec, dvec, ppobj); }else{ new VecPlayContinuous(pvar, yvec, tvec, dvec, ppobj); } }else{ if (!tvec && ddt == -1.) { chkarg(iarg+2, 1e-9, 1e10); } if (s) { new VecPlayStep(s, yvec, tvec, ddt, ppobj); }else{ new VecPlayStep(pvar, yvec, tvec, ddt, ppobj); } } } } VecPlayStep::VecPlayStep(double* pd, IvocVect* y, IvocVect* t, double dt, Object* ppobj) : PlayRecord(pd, ppobj) { //printf("VecPlayStep\n"); init(y, t, dt); } VecPlayStep::VecPlayStep(const char* s, IvocVect* y, IvocVect* t, double dt, Object* ppobj) : PlayRecord(&NODEV(chk_access()->pnode[0]), ppobj) { //printf("VecPlayStep\n"); init(y, t, dt); si_ = new StmtInfo(s); } void VecPlayStep::init(IvocVect* y, IvocVect* t, double dt) { y_ = y; t_ = t; dt_ = dt; ObjObservable::Attach(y_->obj_, this); if (t_) { ObjObservable::Attach(t_->obj_, this); } e_ = new PlayRecordEvent(); e_->plr_ = this; si_ = NULL; } VecPlayStep::~VecPlayStep() { //printf("~VecPlayStep\n"); ObjObservable::Detach(y_->obj_, this); if (t_) { ObjObservable::Detach(t_->obj_, this); } delete e_; if (si_) { delete si_; } } void VecPlayStep::disconnect(Observable*) { // printf("%s VecPlayStep disconnect\n", hoc_object_name(y_->obj_)); delete this; } void VecPlayStep::install(Cvode* cv) { play_add(cv); } void VecPlayStep::play_init() { current_index_ = 0; NrnThread* nt = nrn_threads; if (cvode_ && cvode_->nth_) { nt = cvode_->nth_; } if (t_) { if (t_->capacity() > 0) { e_->send(t_->elem(0), net_cvode_instance, nt); } }else{ e_->send(0., net_cvode_instance, nt); } } void VecPlayStep::deliver(double tt, NetCvode* ns) { NrnThread* nt = nrn_threads + ith_; if (cvode_) { cvode_->set_init_flag(); if (cvode_->nth_) { nt = cvode_->nth_; } } if (si_) { t = tt; nrn_hoc_lock(); si_->play_one(y_->elem(current_index_++)); nrn_hoc_unlock(); }else{ *pd_ = y_->elem(current_index_++); } if (current_index_ < y_->capacity()) { if (t_) { if (current_index_ < t_->capacity()) { e_->send(t_->elem(current_index_), ns, nt); } }else{ e_->send(tt + dt_, ns, nt); } } } void VecPlayStep::pr() { printf("VecPlayStep "); printf("%s.x[%d]\n", hoc_object_name(y_->obj_), current_index_); } VecPlayContinuous::VecPlayContinuous(double* pd, IvocVect* y, IvocVect* t, IvocVect* discon, Object* ppobj) : PlayRecord(pd, ppobj) { //printf("VecPlayContinuous\n"); init(y, t, discon); } VecPlayContinuous::VecPlayContinuous(const char* s, IvocVect* y, IvocVect* t, IvocVect* discon, Object* ppobj) : PlayRecord(&NODEV(chk_access()->pnode[0]), ppobj) { //printf("VecPlayContinuous\n"); init(y, t, discon); si_ = new StmtInfo(s); } void VecPlayContinuous::init(IvocVect* y, IvocVect* t, IvocVect* discon) { y_ = y; t_ = t; discon_indices_ = discon; ubound_index_ = 0; last_index_ = 0; ObjObservable::Attach(y_->obj_, this); if (t_) { ObjObservable::Attach(t_->obj_, this); } if (discon_indices_) { ObjObservable::Attach(discon_indices_->obj_, this); } e_ = new PlayRecordEvent(); e_->plr_ = this; si_ = NULL; } VecPlayContinuous::~VecPlayContinuous() { //printf("~VecPlayContinuous\n"); ObjObservable::Detach(y_->obj_, this); ObjObservable::Detach(t_->obj_, this); if (discon_indices_) { ObjObservable::Detach(discon_indices_->obj_, this); } delete e_; if (si_) { delete si_; } } void VecPlayContinuous::disconnect(Observable*) { // printf("%s VecPlayContinuous disconnect\n", hoc_object_name(y_->obj_)); delete this; } void VecPlayContinuous::install(Cvode* cv) { play_add(cv); } void VecPlayContinuous::play_init() { NrnThread* nt = nrn_threads; if (cvode_ && cvode_->nth_) { nt = cvode_->nth_; } last_index_ = 0; discon_index_ = 0; if (discon_indices_) { if (discon_indices_->capacity() > 0) { ubound_index_ = (int)discon_indices_->elem(discon_index_++); //printf("play_init %d %g\n", ubound_index_, t_->elem(ubound_index_)); e_->send(t_->elem(ubound_index_), net_cvode_instance, nt); }else{ ubound_index_ = t_->capacity()-1; } }else{ ubound_index_ = 0; e_->send(t_->elem(ubound_index_), net_cvode_instance, nt); } } void VecPlayContinuous::deliver(double tt, NetCvode* ns) { NrnThread* nt = nrn_threads + ith_; //printf("deliver %g\n", tt); if (cvode_) { cvode_->set_init_flag(); if (cvode_->nth_) { nt = cvode_->nth_; } } last_index_ = ubound_index_; if (discon_indices_) { if (discon_index_ < discon_indices_->capacity()) { ubound_index_ = (int)discon_indices_->elem(discon_index_++); //printf("after deliver:send %d %g\n", ubound_index_, t_->elem(ubound_index_)); e_->send(t_->elem(ubound_index_), ns, nt); }else{ ubound_index_ = t_->capacity() - 1; } }else{ if (ubound_index_ < t_->capacity() - 1) { ubound_index_++; e_->send(t_->elem(ubound_index_), ns, nt); } } continuous(tt); } void VecPlayContinuous::continuous(double tt) { if (si_) { t = tt; nrn_hoc_lock(); si_->play_one(interpolate(tt)); nrn_hoc_unlock(); }else{ *pd_ = interpolate(tt); } } double VecPlayContinuous::interpolate(double tt) { if (tt >= t_->elem(ubound_index_)) { last_index_ = ubound_index_; if (last_index_ == 0) { //printf("return last tt=%g ubound=%g y=%g\n", tt, t_->elem(ubound_index_), y_->elem(last_index_)); return y_->elem(last_index_); } }else if (tt <= t_->elem(0)) { last_index_ = 0; //printf("return elem(0) tt=%g t0=%g y=%g\n", tt, t_->elem(0), y_->elem(0)); return y_->elem(0); }else{ search(tt); } double x0 = y_->elem(last_index_-1); double x1 = y_->elem(last_index_); double t0 = t_->elem(last_index_ - 1); double t1 = t_->elem(last_index_); //printf("IvocVectRecorder::continuous tt=%g t0=%g t1=%g theta=%g x0=%g x1=%g\n", tt, t0, t1, (tt - t0)/(t1 - t0), x0, x1); if (t0 == t1) { return (x0 + x1)/2.; } return interp((tt - t0)/(t1 - t0), x0, x1); #if 0 // dt double theta = tt/dt_ - last_index_; interp(theta, x0, x1); #endif } void VecPlayContinuous::search(double tt) { // assert (tt > t_->elem(0) && tt < t_->elem(t_->capacity() - 1)) while ( tt < t_->elem(last_index_)) { --last_index_; } while ( tt >= t_->elem(last_index_)) { ++last_index_; } } void VecPlayContinuous::pr() { printf("VecPlayContinuous "); printf("%s.x[%d]\n", hoc_object_name(y_->obj_), last_index_); } PlayRecordSave* VecPlayStep::savestate_save() { return new VecPlayStepSave(this); } VecPlayStepSave::VecPlayStepSave(PlayRecord* prl) : PlayRecordSave(prl) { curindex_ = ((VecPlayStep*)pr_)->current_index_; } VecPlayStepSave::~VecPlayStepSave() { } void VecPlayStepSave::savestate_restore() { check(); VecPlayStep* vps = (VecPlayStep*)pr_; vps->current_index_ = curindex_; if (curindex_ > 0) { if (vps->si_) { vps->si_->play_one(vps->y_->elem(curindex_ - 1)); }else{ *vps->pd_ = vps->y_->elem(curindex_ - 1); } } } void VecPlayStepSave::savestate_write(FILE* f) { fprintf(f, "%d\n", curindex_); } void VecPlayStepSave::savestate_read(FILE* f) { char buf[100]; assert(fgets(buf, 100, f)); assert(sscanf(buf, "%d\n", &curindex_) == 1); } PlayRecordSave* VecPlayContinuous::savestate_save() { return new VecPlayContinuousSave(this); } VecPlayContinuousSave::VecPlayContinuousSave(PlayRecord* prl) : PlayRecordSave(prl) { VecPlayContinuous* vpc = (VecPlayContinuous*)pr_; last_index_ = vpc->last_index_; discon_index_ = vpc->discon_index_; ubound_index_ = vpc->ubound_index_; } VecPlayContinuousSave::~VecPlayContinuousSave() { } void VecPlayContinuousSave::savestate_restore() { check(); VecPlayContinuous* vpc = (VecPlayContinuous*)pr_; vpc->last_index_ = last_index_; vpc->discon_index_ = discon_index_; vpc->ubound_index_ = ubound_index_; vpc->continuous(t); } void VecPlayContinuousSave::savestate_write(FILE* f) { fprintf(f, "%d %d %d\n", last_index_, discon_index_, ubound_index_); } void VecPlayContinuousSave::savestate_read(FILE* f) { char buf[100]; assert(fgets(buf, 100, f)); assert(sscanf(buf, "%d %d %d\n", &last_index_, &discon_index_, &ubound_index_) == 3); } neuron-7.5/src/nrnjava/000077500000000000000000000000001323325274500151275ustar00rootroot00000000000000neuron-7.5/src/nrnjava/Makefile.am000077500000000000000000000037321323325274500171730ustar00rootroot00000000000000SUBDIRS = neuron nrnccmb ## The list of libraries that we make from this directory. lib_LTLIBRARIES = libnrnjava.la ## These are all the .c files that need to be compiled to make libnrnjava.la. libnrnjava_la_SOURCES = njvm.cpp nrnjava.cpp nrnjni.cpp pkginclude_HEADERS = njvm.h nrnjavaclassdir = $(prefix)/share/@PACKAGE@/classes nrnjavaclass_DATA = nrnclsld.jar neuron.jar # nrnccmb.jar JAVAC=@JAVAC@ JAVA=@JAVA@ JAVAH=@JAVAH@ # Flags for compiling C++ code with JNI headers JNIFLAGS = @JNI_INCLUDE_FLAGS@ # The interviews includes must be before the X includes so that if a # vanilla interviews is also installed, we don't use it. IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) S=$(srcdir) nsrc=$(top_srcdir)/src includes = -I$(nsrc)/nrniv -I$(nsrc)/CVODE -I$(nsrc)/nrncvode -I$(nsrc)/sparse13 -I$(nsrc)/gnu \ -I. -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I../oc -I$(nsrc)/oc $(IV_INCLUDES) AM_CPPFLAGS = -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 $(JNIFLAGS) $(includes) if BUILD_NRNJAVA EXTRA_DIST = neuron.jar nrnclsld.jar nrnccmb.jar \ mk_njreg.sh njreg.h njredirreg.h neuron_Neuron.h neuron_Redirect.h \ nrnjava.html javanrn.html neuron_Neuron.h: neuron/Neuron.class $(JAVAH) -classpath $(srcdir) -jni neuron.Neuron neuron_Redirect.h: neuron/Redirect.class $(JAVAH) -classpath $(srcdir) -jni neuron.Redirect nrnjni.lo nrnjni.o: njreg.h njredirreg.h njreg.h: neuron_Neuron.h $(srcdir)/mk_njreg.sh neuron_Neuron.h njreg njredirreg.h: neuron_Redirect.h $(srcdir)/mk_njreg.sh neuron_Redirect.h njredirreg nrnjava.lo: neuron_Neuron.h neuron_Redirect.h nrnclsld.jar: neuron/NrnClassLoader.class (cd $(srcdir) ; \ jar cf nrnclsld.jar neuron/NrnClassLoader.class \ ) neuron.jar: $(srcdir)/neuron/*.class ( cd $(srcdir) ; \ mv neuron/NrnClassLoader.class NrnClassLoader.class ; \ jar cf neuron.jar neuron/*.class ; \ mv NrnClassLoader.class neuron/NrnClassLoader.class ; \ ) else EXTRA_DIST = mk_njreg.sh nrnjava.html javanrn.html endif doc: $(javaSrc) javadoc -d doc $(javaSrc) neuron-7.5/src/nrnjava/Makefile.in000066400000000000000000001012421323325274500171740ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/nrnjava ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(nrnjavaclassdir)" \ "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libnrnjava_la_LIBADD = am_libnrnjava_la_OBJECTS = njvm.lo nrnjava.lo nrnjni.lo libnrnjava_la_OBJECTS = $(am_libnrnjava_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libnrnjava_la_SOURCES) DIST_SOURCES = $(libnrnjava_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(nrnjavaclass_DATA) HEADERS = $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)njconf.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/njconf.h.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = neuron nrnccmb lib_LTLIBRARIES = libnrnjava.la libnrnjava_la_SOURCES = njvm.cpp nrnjava.cpp nrnjni.cpp pkginclude_HEADERS = njvm.h nrnjavaclassdir = $(prefix)/share/@PACKAGE@/classes nrnjavaclass_DATA = nrnclsld.jar neuron.jar # nrnccmb.jar # Flags for compiling C++ code with JNI headers JNIFLAGS = @JNI_INCLUDE_FLAGS@ # The interviews includes must be before the X includes so that if a # vanilla interviews is also installed, we don't use it. IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) S = $(srcdir) nsrc = $(top_srcdir)/src includes = -I$(nsrc)/nrniv -I$(nsrc)/CVODE -I$(nsrc)/nrncvode -I$(nsrc)/sparse13 -I$(nsrc)/gnu \ -I. -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I../oc -I$(nsrc)/oc $(IV_INCLUDES) AM_CPPFLAGS = -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 $(JNIFLAGS) $(includes) @BUILD_NRNJAVA_FALSE@EXTRA_DIST = mk_njreg.sh nrnjava.html javanrn.html @BUILD_NRNJAVA_TRUE@EXTRA_DIST = neuron.jar nrnclsld.jar nrnccmb.jar \ @BUILD_NRNJAVA_TRUE@ mk_njreg.sh njreg.h njredirreg.h neuron_Neuron.h neuron_Redirect.h \ @BUILD_NRNJAVA_TRUE@ nrnjava.html javanrn.html all: njconf.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrnjava/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrnjava/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): njconf.h: stamp-h10 @test -f $@ || rm -f stamp-h10 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h10 stamp-h10: $(srcdir)/njconf.h.in $(top_builddir)/config.status @rm -f stamp-h10 cd $(top_builddir) && $(SHELL) ./config.status src/nrnjava/njconf.h distclean-hdr: -rm -f njconf.h stamp-h10 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libnrnjava.la: $(libnrnjava_la_OBJECTS) $(libnrnjava_la_DEPENDENCIES) $(EXTRA_libnrnjava_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libnrnjava_la_OBJECTS) $(libnrnjava_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/njvm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnjava.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnjni.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nrnjavaclassDATA: $(nrnjavaclass_DATA) @$(NORMAL_INSTALL) @list='$(nrnjavaclass_DATA)'; test -n "$(nrnjavaclassdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(nrnjavaclassdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(nrnjavaclassdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(nrnjavaclassdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(nrnjavaclassdir)" || exit $$?; \ done uninstall-nrnjavaclassDATA: @$(NORMAL_UNINSTALL) @list='$(nrnjavaclass_DATA)'; test -n "$(nrnjavaclassdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(nrnjavaclassdir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) njconf.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(nrnjavaclassdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-nrnjavaclassDATA install-pkgincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-nrnjavaclassDATA \ uninstall-pkgincludeHEADERS .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man \ install-nrnjavaclassDATA install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-nrnjavaclassDATA uninstall-pkgincludeHEADERS .PRECIOUS: Makefile @BUILD_NRNJAVA_TRUE@neuron_Neuron.h: neuron/Neuron.class @BUILD_NRNJAVA_TRUE@ $(JAVAH) -classpath $(srcdir) -jni neuron.Neuron @BUILD_NRNJAVA_TRUE@neuron_Redirect.h: neuron/Redirect.class @BUILD_NRNJAVA_TRUE@ $(JAVAH) -classpath $(srcdir) -jni neuron.Redirect @BUILD_NRNJAVA_TRUE@nrnjni.lo nrnjni.o: njreg.h njredirreg.h @BUILD_NRNJAVA_TRUE@njreg.h: neuron_Neuron.h @BUILD_NRNJAVA_TRUE@ $(srcdir)/mk_njreg.sh neuron_Neuron.h njreg @BUILD_NRNJAVA_TRUE@njredirreg.h: neuron_Redirect.h @BUILD_NRNJAVA_TRUE@ $(srcdir)/mk_njreg.sh neuron_Redirect.h njredirreg @BUILD_NRNJAVA_TRUE@nrnjava.lo: neuron_Neuron.h neuron_Redirect.h @BUILD_NRNJAVA_TRUE@nrnclsld.jar: neuron/NrnClassLoader.class @BUILD_NRNJAVA_TRUE@ (cd $(srcdir) ; \ @BUILD_NRNJAVA_TRUE@ jar cf nrnclsld.jar neuron/NrnClassLoader.class \ @BUILD_NRNJAVA_TRUE@ ) @BUILD_NRNJAVA_TRUE@neuron.jar: $(srcdir)/neuron/*.class @BUILD_NRNJAVA_TRUE@ ( cd $(srcdir) ; \ @BUILD_NRNJAVA_TRUE@ mv neuron/NrnClassLoader.class NrnClassLoader.class ; \ @BUILD_NRNJAVA_TRUE@ jar cf neuron.jar neuron/*.class ; \ @BUILD_NRNJAVA_TRUE@ mv NrnClassLoader.class neuron/NrnClassLoader.class ; \ @BUILD_NRNJAVA_TRUE@ ) doc: $(javaSrc) javadoc -d doc $(javaSrc) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrnjava/javanrn.html000077500000000000000000000137541323325274500174710ustar00rootroot00000000000000

Writing Java classes that communicate with NEURON

Executing hoc statements

import neuron.Neuron;
Neuron.execute(new String("print \"Hello, World\""));

References to hoc variables

import neuron.HocVariable;
HocVariable vs = new HocVariable(new String("soma.v(.5)"))
double v = vs.getVal();
vs.setVal(-65)

References to hoc objects

Argument lists are an array of objects of type Double, String, or Object
import neuron.HocObject;
HocObject ho = new HocObject(new String("Graph"));
// following is a list of all Vectors
// in hoc it would be
// objref o
// o = new List("Vector")
HocObject ho = new HocObject(new String("List"),
			new Object[] { new String("Vector")});
Note that the Graph will not be destroyed until the first HocObject is garbage collected. This can be done explicitly with
Runtime rt = Runtime.getRuntime();
rt.runFinalization();
rt.gc();
Note that when hoc passes an objref as an argument to a java class method (or java class constructor) the object appears in java as a native java object (if its construction was as a java object, either registered with load_java or unregistered so that it appeared in hoc as a JavaObject), or a HocObject (or classes that extend HocObject such as HocVector).

Calling methods of hoc objects

Argument lists are an array of objects of type Double, String, or Object. Methods return double, String, or Object via the dMethod, sMethod, or oMethod call respectively. See the hoc vector example below.

References to hoc Vectors

HocVector extends HocObject
import neuron.HocVector
HocVector hv = new HocVector(10);
hv.oMethod(new String("indgen"), null);
double[] v = hv.fromHoc();
for (int i; i < v.length; ++i) {
	v[i] *= 2;
}
hv.toHoc(v);
double size = hv.dMethod(new String("size"), null);
String label = hv.sMethod(new String("label", null);
System.out.println(hv);// prints Vector[25] or whatever the index is
Note that when hoc passes a Vector as an argument to a java class method (or java class constructor) the Vector appears in java as a HocVector.

Java Windows and the PrintAndFileWindowManager

After a Frame title has been set and the frame has been shown on the screen, it is a good idea to call
	Neuron.windowListen(Frame, this)
This will allow the print and file window manager as well as the NEURONMainMenu/Window to manage the java Frame properly. Note that Iconify button on the title bar of the java window means "hide" in this case. Also, be aware that the default action of a JFrame when the close button is pressed is to "hide". This can be changed with Frame.setDefaultCloseOperation(int); The hoc window for this java frame references the hoc object for the java object. The hoc object is unreferenced when the window is closed (but not when it is hidden). The "this" reference is necessary for saving the java object that owns the window in a session file as well as the window's position and size. On retrieval the java object will be created and the java window will be moved and sized to the saved location. For most java objects this will not be sufficient information to reconstruct the object's data and the java class implementation will have to provide one or more of the special methods,
public int hocSessionPriority()
public char[] hocSessionSave(String sfname)
If the hocSessionPriority method exists, it is called when the session file is saved and the return integer is used to help order the window information in the session file from highest to lowest priority. The default priority is 1. Priority must be lower than any tool which constructs information needed by the java object and higher than any tool which may use information provided by the java object. Some existing tool priorities are
2000 Robert Cannon's catacomb channel builder
1000 cell builder
995 network builder
990 point process manager
100 multiple run fitter
1 linear circuit builder
The priority for the linear circuit builder is a mistake because one could not fit the parameters in a multiple run fitter since that would be created before the linear circuit builder. If the hocSessionSave method exists, it is called when the session file is saved. The argument is the name of the session file. The string returned by this method is copied into the session file just after the hoc statement that constructs the object. The session file name can be used to construct associated file names that save the object data. The return string should use the "ocbox_" objref name to call methods on the newly constructed object. For example, the java interface to Robert Cannon's catacomb channel builder (see nrn-5.1/src/nrnjava/nrnccmb/Channels.java) uses the implementation
        public int hocSessionPriority() {
                return 2000;
        }
        public char[] hocSessionSave(String sfname) {
                StringBuffer s;
                s = new StringBuffer(sfname); s.append(".ccm");
                save(s.toString());
                s = new StringBuffer("{ocbox_.map() ocbox_.load(\"");
                s.append(sfname).append(".ccm\")}\n");
                return s.toString().toCharArray();
        }
When a session file, "temp.ses", is created with a channel builder window then the save("temp.ses.ccm") will be executed to construct a ccm file with all the channel specific information needed for later reconstruction of the object. The session file itself contains the statements
/*Begin catacomb.channel.KSChannel */
{load_java("nrnccmb.Channels", "nrnccmb_Channels")}
ocbox_ = new nrnccmb_Channels()
{ocbox_.map() ocbox_.load("./temp.ses.ccm")}
{PWManager[0].jwindow(ocbox_, 1, 378, 1, 541, 574)}
objref ocbox_
/*End catacomb.channel.KSChannel */
Notice that all the lines were automatically constructed by the internal session save code except for the statement involving ocbox_.load. That information was object specific in regard to its particular policy for constructing the view window for the object and which ccm file to load. neuron-7.5/src/nrnjava/mk_njreg.sh000077500000000000000000000003551323325274500172650ustar00rootroot00000000000000#!/bin/sh sed -n ' 1i\ static JNINativeMethod '$2'_methods[] = { /Method/s/.*Method: *\(.*\)$/{"\1",/p /Signature/s/.*Signature: *\(.*\)$/"\1",/p /JNICALL/s/.*JNICALL *\(.*\)$/(void*)\1},/p $a\ {0,0,0}\ }; ' < $1 | tr -d '\015' > $2.h neuron-7.5/src/nrnjava/neuron/000077500000000000000000000000001323325274500164355ustar00rootroot00000000000000neuron-7.5/src/nrnjava/neuron/HocObject.java000077500000000000000000000060171323325274500211470ustar00rootroot00000000000000package neuron; /** Java reference to a NEURON hoc object. HocObjects are for receiving hoc Object arguments and passing them back as a return value. As such, it is intended for use in container classes. A HocObject is only created when it comes into a method as an argument. At that time the hoc Object* reference count is incremented and the Object* is cast to a long and stored in hocObjectCast. When the HocObject is garbage collected, the Object* reference count is decremented. */ public class HocObject { HocObject() { hocObjectCast = 0; id = 0; //System.out.println("HocObject construct"); } long hocObjectCast; int id; /** Java can create a HocObject of a particular type */ protected void finalize() throws Throwable { try { if (hocObjectCast != 0) { Neuron.hocObjectUnref(hocObjectCast); //System.out.println("HocObject finalize " + hocObjectCast); } } finally { super.finalize(); } } static void pushArgs(Object[] args) { for (int i=0; i < args.length; ++i) { pushArg(args[i]); } } static void pushArg(Object arg) { if (arg instanceof Double) { Neuron.pushArgD(((Double)arg).doubleValue()); }else if (arg instanceof String) { Neuron.pushArgS((String)arg); }else if (arg instanceof Object) { Neuron.pushArgO(arg, Neuron.getObjectType(arg)); }else{ Neuron.pushArgO(null, 0); } } public long cppPointer() { // had better be a CPLUSPLUS type object. return Neuron.cppPointer(hocObjectCast); } long methodID(String name) { return Neuron.methodID(hocObjectCast, name); } public String toString() { return Neuron.hocObjectName(hocObjectCast); } public HocObject(String hocClassName) { id = 0; hocObjectCast = Neuron.getNewHObject(hocClassName, 0); } public HocObject(String hocClassName, Object[] args) { id = 0; pushArgs(args); hocObjectCast = Neuron.getNewHObject(hocClassName, args.length); } public double dMethod(String name, Object[] args) { pushArgs(args); return Neuron.hDoubleMethod(hocObjectCast, methodID(name), args.length); } public String sMethod(String name, Object[] args) { pushArgs(args); return Neuron.hCharsMethod(hocObjectCast, methodID(name), args.length); } public Object oMethod(String name, Object[] args) { pushArgs(args); return Neuron.hObjectMethod(hocObjectCast, methodID(name), args.length); } // limited to scalars public double dGet(String name) { return new HocVariable(this.toString()+"."+name).getVal(); } public String sGet(String name) { return Neuron.hGetStringField(hocObjectCast, name); } public Object oGet(String name) { return Neuron.hGetObjectField(hocObjectCast, name); } public void Set(String name, double x) { new HocVariable(this.toString()+"."+name).setVal(x); } public void Set(String name, String s) { Neuron.execute(this.toString()+"."+name+"=\""+s+"\""); } public void Set(String name, Object o) { if (o instanceof String) { Neuron.execute(this.toString()+"."+name+"=\""+o+"\""); }else{ Neuron.hSetObjectField(hocObjectCast, name, o, Neuron.getObjectType(o)); } } } neuron-7.5/src/nrnjava/neuron/HocVariable.java000077500000000000000000000017571323325274500214740ustar00rootroot00000000000000package neuron; /** Java reference to a NEURON hoc variable HocVariables are for fast evaluation and assignment of any variable in hoc. At this time there is no notification when a value has changed. */ public class HocVariable { public HocVariable(String varname) { if (Neuron.execute("{hoc_pointer_(&" + varname + ")}")) { hocVarPointerCast = Neuron.getVarPointer(); //System.out.println("HocVariable: " + varname + " " + hocVarPointerCast); varname_ = varname; }else{ varname_ = "Invalid_" + varname; System.out.println("HocVariable: Invalid variable name: " + varname); hocVarPointerCast = 0; } } public boolean valid() { return hocVarPointerCast != 0; } public String name() { return varname_; } public double getVal() { return valid() ? Neuron.getVal(hocVarPointerCast) : -1e98; } public double setVal(double x) { if (valid()) { Neuron.setVal(hocVarPointerCast, x); return x; }else{ return -1e98; } } String varname_; long hocVarPointerCast; } neuron-7.5/src/nrnjava/neuron/HocVector.java000077500000000000000000000014701323325274500212010ustar00rootroot00000000000000package neuron; /** Java reference to a NEURON Vector object. */ public class HocVector extends HocObject { public HocVector(int size) { super(); super.id = 1; // the index in Neuron.hoClasses super.hocObjectCast = Neuron.vectorNew(size); } // used only for passing a Vector arg from hoc to java HocVector() { //System.out.println("HocVector construct"); } public int size() { return Neuron.vectorSize(hocObjectCast); } public void set(int i, double x) { Neuron.vectorSet(hocObjectCast, i, x); } public double get(int i) { return Neuron.vectorGet(hocObjectCast, i); } public double[] fromHoc() { // too bad about the copying return Neuron.vectorFromHoc(hocObjectCast); } public void toHoc(double[] v) { // too bad about the copying Neuron.vectorToHoc(hocObjectCast, v, v.length); } } neuron-7.5/src/nrnjava/neuron/Makefile.am000077500000000000000000000003731323325274500204770ustar00rootroot00000000000000javaSrc = NrnClassLoader.java\ Neuron.java HocObject.java HocVariable.java HocVector.java \ PWMListener.java Redirect.java EXTRA_DIST = $(javaSrc) JAVAC = @JAVAC@ all: ( cd $(srcdir) ; \ $(JAVAC) -classpath .:../nrnclsld.jar $(javaSrc) ; \ ) neuron-7.5/src/nrnjava/neuron/Makefile.in000066400000000000000000000375551323325274500205210ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/nrnjava/neuron ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ javaSrc = NrnClassLoader.java\ Neuron.java HocObject.java HocVariable.java HocVector.java \ PWMListener.java Redirect.java EXTRA_DIST = $(javaSrc) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrnjava/neuron/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrnjava/neuron/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile all: ( cd $(srcdir) ; \ $(JAVAC) -classpath .:../nrnclsld.jar $(javaSrc) ; \ ) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrnjava/neuron/Neuron.java000077500000000000000000000514351323325274500205610ustar00rootroot00000000000000/** Neuron / Java interface * @author Fred Howell * @date 1 March 2001 */ package neuron; import java.util.Vector; import java.util.Hashtable; import java.lang.reflect.*; import java.awt.Frame; import java.awt.Point; import java.net.*; /** Info about a hoc-callable method ------ */ class MethodInfo { String signature; Method m; char returnType; MethodInfo(Method m) { this.m = m; signature = ""; Class type = m.getReturnType(); if (type.equals(double.class)) { returnType = 'd'; }else if (type.equals(int.class)) { returnType = 'i'; }else if (type.equals(boolean.class)) { returnType = 'b'; }else if (type.equals(void.class)) { returnType = 'v'; }else if (type.equals(char[].class)) { returnType = 's'; }else if (type.getName().indexOf('.') != -1) { // don't care what the type is at this point returnType = 'o'; }else{ returnType = '\0'; } } Method getMethod() { return m; } } /** Info about a java-accessible hoc class */ class ClassInfo { Class c; int id; // the index of this ClassInfo in Neuron.classList boolean pureStatic; //constructorSignatures Vector cons = new Vector(); // constructors that have args. Vector conSig = new Vector(); // String java type signatures that hoc understands. Vector hocSig = new Vector(); // String hoc type signatures, only dso. Vector methods = new Vector(); // references to MethodInfo ClassInfo( Class c, int id ) { this.c = c; this.id = id; Constructor[] constructors = c.getConstructors(); int len = constructors.length; pureStatic = (len == 0); for (int i = 0; i < len; ++i) { Class[] pt = constructors[i].getParameterTypes(); if (pt.length == 0) { continue; //don't put in list } String sig = hocSignature(pt); if (sig != null) { //put in list cons.addElement(constructors[i]); conSig.addElement(sig); String hs = ""; for (int j = 0; j < sig.length(); ++j) { char a = sig.charAt(j); switch(a) { case 'i': case 'b': hs = hs + 'd'; break; default: hs = hs + a; } } hocSig.addElement(hs); } } // System.out.println(c.getName() + ": pureStatic is " + pureStatic); } void addMethodInfo( MethodInfo mi ) { methods.addElement( mi ); } MethodInfo getMethodInfo( int i ) { return (MethodInfo) methods.elementAt(i); } int getConstructor(String sig) { int len = cons.size(); for (int i=0; i < len; ++i) { //System.out.println("getConstructor comparing " + sig + " " + (String)hocSig.get(i)); if (sig.equals((String)hocSig.elementAt(i))) { return i; } } return -1; } static String hocSignature(Class[] pt) { String sig = ""; for (int k = 0; k < pt.length; k ++) { Class s = pt[k]; if (s.equals(double.class)) { sig += "d"; }else if (s.equals(int.class)) { sig += "i"; }else if (s.equals(boolean.class)) { sig += "b"; }else if (s.equals(char[].class)) { sig += "s"; }else if (s.equals(String.class)) { sig += "S"; }else if (s.getName().indexOf('.') != -1) { sig += "o"; }else{ sig = null; break; } } return sig; } } /** Static class for interfacing Neuron to Java The general case for arguments involves matching the actual signature of a hoc call to a method with one of the (overloaded) method signatures. This happens especially with constructors. We want to be fast in the case of non-overloaded methods. Here is the sequence. 1)A method call is made in hoc to the proper c function returning a double, strdef, or object. 2)The c function calls a java function with the index of the class (it is of course a java class) and index of the method. The java function called depends on whether the return type is supposed to be a double, strdef (char[]), or object. (the latter case requires a good deal of extra effort). 3)Java gets all the args by calling a pair of jni functions. The first returns the type (double, strdef, or object type) For the object type, the index of the java class (if the hoc object contained a java object) is returned. A negative index implies double, strdef, HocObject, JavaObject, HocVector, etc. HocObject means that Hoc understands it but it is opaque to Java. JavaObject is a hoc object that contains a Java object handle of a type unregistered to hoc. The second jni function called is the one that returns a double,strdef, or object. Based on the type return of the first jni call the return value is cast to the proper object (e.g. Double, String, etc.) 4) If the method is not overloaded it is invoked. If overloaded the signature types are compared and the right method is invoked. (note: at this time, for overloaded methods, hoc also creates a unique symbol of the form name%dargs where %d is the number of args and args is a string containing diso) 5) If the return type desired is double or char[] then we return a double or String to be converted to strdef. Object return types specifically call a jni function that tells the c side how to interpret the hobject. i.e. if it is a registered java object then we know it's class id and can construct the proper hoc portion of the object. If it is a HocObject then the return long value can be cast to the hoc object pointer. If it is an unregistered java type then a JavaObject can be constructed and the jobject saved in it. */ public class Neuron { // static { System.out.println("loading Neuron");} static native String getHocStringArg( int i ); static native double getHocDoubleArg( int i, int type ); static native Object getHocObjectArg( int i, IllegalArgumentException e ); // If we know the id we can find the class. If we know the class // we can find the id static Hashtable classInfo = new Hashtable(); static Vector classList = new Vector(); // hoc objects must be enclosed in a HocObject type or // a type that extends it. Here are the java types in an // order known by nrnjava.cpp:nj_encapsulate. static Vector hoClasses = new Vector(); static private URLClassLoader ncl; static { try { hoClasses.addElement(NrnClassLoader.load("neuron.HocObject")); hoClasses.addElement(NrnClassLoader.load("neuron.HocVector")); }catch (Exception e) { System.out.println(e); e.printStackTrace(); } } // A positive number or 0 is the class id. // Negative numbers refer to double, strdef, etc. // not currently used. static native int getHocArgType(int i); // for actual constructor signature call. Reasonably fast but // not very general since hoc knows the java types static native String getHocArgSig(); static native void hocObjectUnref(long hocObjectCast); /** Create a hoc version of a class */ static native void java2nrnClass( String classname, int classindex, String methods); /** Execute a hoc statement returns 1 if no hoc error, 0 otherwise */ public static native boolean execute(String statement); /** For use by HocVariable */ static native long getVarPointer(); static native double getVal(long hocVarPointerCast); static native void setVal(long hocVarPointerCast, double x); // for passing back the return type from callMethod static MethodInfo lastMi; /** Make a hoc class for a given Java class Check if the java class is already loaded If not, load it. Register it with hoc. */ static public int makeHocClass(String className, String hocName, String path) { // System.out.println("Neuron: makeHocClass called "+className+" "+hocName + " |"+path+"|"); try { Class c = null; try { NrnClassLoader.add(path); c = NrnClassLoader.load(className); } catch (Throwable e) { System.out.println(e); e.printStackTrace(); return 0; } // Space separated list of method names // in the format "type name signature type name signature ..." // where type is d, s, or o and signature is a string of // d,i,s,o String methods=""; ClassInfo ci = new ClassInfo(c, classList.size()); // System.out.println("Neuron: makeHocClass getting methods for "+className); Method[] theMethods = c.getMethods(); for (int i = 0; i < theMethods.length; i++) { String methodString = theMethods[i].getName(); // System.out.println("Method :"+ methodString); // May be overloaded. Then some methodStrings are // repeated and hoc will note that fact and // only create one symbol for them and then // one mangled symbol for each that can be used // with no lookup overhead. MethodInfo mi = new MethodInfo( theMethods[i] ); char rt = mi.returnType; String htype = null; switch (rt) { case 'd': case 'i': case 'b': case 'v': htype = "d"; break; case 's': htype = "s"; break; case 'o': htype = "o"; break; default: break; // don't use } if (htype != null) { // however, only use if argtypes are ok. Class[] pt = theMethods[i].getParameterTypes(); mi.signature = ClassInfo.hocSignature(pt); if (mi.signature == null) { htype = null; } } if (htype != null) { ci.addMethodInfo( mi ); if (methods.length() > 0) { methods = methods + " "; } methods = methods + htype + " " + methodString + " " + mi.signature; } } java2nrnClass( hocName, ci.id, methods); classInfo.put( c, ci ); classList.addElement(ci); } catch (Throwable e) { System.out.println("Exception in makeHocClass "+e); e.printStackTrace(); return 0; } return 1; } static int identity(Object o1, Object o2) { return (o1 == o2) ? 1 : 0; } /* the real java class name for a java object */ static String javaClassName(Object jo) { return jo.getClass().toString(); } /* Return a generic Java object given a class name */ static Object constructNoArg(int cid) { try { ClassInfo ci = (ClassInfo)classList.elementAt(cid); if (ci.pureStatic) { return null; } Class c = ci.c; // System.out.println(" Got class: "+c); Object o = c.newInstance(); // System.out.println(" Got object: "+o); return o; } catch (Exception e) { System.out.println("Exception in constructNoArg "+e); return new Integer(-1); } } /** Return args from hoc in an object array */ static Object[] fillArgs(String signature) throws IllegalArgumentException{ //System.out.println("Trying to get args with Signature "+signature); int narg = signature.length(); Object[] ret = new Object[narg]; double d; for (int i=0; i= 0) { cp = cp.substring(i); } System.out.println("path to jars " + cp); add_jars(cp); // ncl.add("file:/home/hines/nrn5/src/nrnjava/neuron.jar"); // System.out.println("NrnClassLoader ready"); }catch (Exception e) { System.out.println(e); } } } neuron-7.5/src/nrnjava/neuron/PWMListener.java000077500000000000000000000025251323325274500214600ustar00rootroot00000000000000package neuron; //import java.awt.event.*; import java.awt.event.WindowAdapter; import java.awt.event.ComponentListener; import java.awt.event.WindowEvent; import java.awt.event.ComponentEvent; import java.awt.Frame; import java.awt.Rectangle; class PWMListener extends WindowAdapter implements ComponentListener { PWMListener(Frame w, long hocJavaWindowCast) { // System.out.println("PWMListener for " + w.getTitle()); jwc = hocJavaWindowCast; } public void windowClosing(WindowEvent e) { // System.out.println(e); Neuron.pwmEvent(jwc, 1, 0, 0, 0, 0); } public void windowIconified(WindowEvent e) { // System.out.println(e); Frame f = (Frame)e.getWindow(); f.setState(Frame.NORMAL); Neuron.setwin(jwc, 2, 0, 0); Neuron.pwmEvent(jwc, 3, 0, 0, 0, 0); } public void componentHidden(ComponentEvent e) { doit(3, e); } public void componentMoved(ComponentEvent e) { doit(4, e); } public void componentResized(ComponentEvent e) { doit(5, e); } public void componentShown(ComponentEvent e) { doit(6, e); } private long jwc; // cast of the pwm pointer to the corresponding JavaWindow rep. private void doit(int type, ComponentEvent e) { // System.out.println(e); Rectangle r = e.getComponent().getBounds(); if (!e.getComponent().isShowing()) { type = 3; } Neuron.pwmEvent(jwc, type, r.x, r.y, r.width, r.height); } } neuron-7.5/src/nrnjava/neuron/Redirect.java000077500000000000000000000025661323325274500210550ustar00rootroot00000000000000package neuron; import java.io.*; /** Mac and mswin need stdout and stderr redirected to the console. */ public class Redirect { static private PrintStream stdout; static private PrintStream stderr; static { try { stdout = new PrintStream(new ConsoleStream(1)); stderr = new PrintStream(new ConsoleStream(2)); System.setOut(stdout); System.setErr(stderr); }catch (Exception e) { System.out.println(e); System.exit(1); } } static native void consoleWrite(int fd, int b); } // for now just put it in files til things work right class ConsoleStream extends OutputStream { private int fd; public ConsoleStream(int i) { fd= i; } public void write(int b) { Redirect.consoleWrite(fd, b); } } /* class ConsoleStream extends OutputStream { private int fd; public ConsoleStream(int i) { fd= i; } public void close() { try { if (!closed) { stream.close(); closed = true; }}catch (Exception e) { } } public void flush() { try { if (!closed) { stream.flush(); }}catch (Exception e) { } } public void write(int b) throws IOException { try {if (!closed) { stream.write(b); }}catch (Exception e) { } } private static FileOutputStream stream; private static boolean closed; static { try { stream = new FileOutputStream("Redirect.out"); closed = false; }catch(Exception e) { System.exit(1); } } } */ neuron-7.5/src/nrnjava/njconf.h.in000077500000000000000000000004651323325274500171720ustar00rootroot00000000000000#ifndef njconf_h /* define to 1 if want to use the Java virtual machine in NEURON */ #undef USENRNJAVA /* define to 1 if version 0x00010001, 2 if JNI_VERSION_1_2 */ #undef USEJVM /* define to 1 if have locale.h */ #undef HAVE_LOCALE_H /* if defined then try to dlopen the jvm */ #undef JVM_DLOPEN #endif neuron-7.5/src/nrnjava/njvm.cpp000066400000000000000000000323761323325274500166200ustar00rootroot00000000000000/* March 2001 modified by Michael Hines so that NEURON starts the Java VM */ // nj_load() supports the load_java hoc command // nrn_InitializeJavaVM makes the Java virtual machine ready for use // this is done from ivocmain.cpp shortly after NEURON is launched. // Initializing just before the first load_java command did not work. // Mac and MSWIN dynamically load the jvm. #include <../../nrnconf.h> #ifdef WIN32 #include #endif #include "njconf.h" // which jvm version to use #include #include #include #include #include #include "nrnoc2iv.h" #include "njvm.h" #if HAVE_LOCALE_H // Java may set the locale so sprint(buf, "%g", 1.5) gives "1,5" // if so we will need to set it back. #include #endif #if defined(JVM_DLOPEN) #include jint nrn_CreateJavaVM(JavaVM **pvm, void **penv, void *args); #endif // Java virtual machine version // The Mac only has Java 1 via the MRJ. No reason not to always use // Java2 for mswin. Unix can use either (see njconf.h.in) // However, only Java2 is fully supported and allows additions to // the classpath from hoc. #if carbon #undef MAC #endif #ifndef USEJVM #if MAC #define USEJVM 1 #else #define USEJVM 2 #endif #endif extern "C" { // Java has threads and NEURON does not. It is important that when // Java calls a function in NEURON and then NEURON calls back a function // in Java that the proper thread environment is used. This is done // with the njvm.h macros jnisave and jnirestore that put the env into nrnjava_env // How are errors handled? JNIEnv* nrnjava_env; JNIEnv* nrnjava_root_env; JavaVM* nrnjava_vm; // CreateJavaVM fills this in but we do not use it. extern char* neuron_home; extern int(*p_hoc_load_java)(); static int nj_load(); extern void* (*p_java2nrn_cons)(Object*); #ifdef WIN32 #undef _WIN32 #define _WIN32 #endif #ifdef _WIN32 char* hoc_back2forward(char*); jint nrn_CreateJavaVM(JavaVM **pvm, void **penv, void *args); #endif #if MAC static jint nrn_GetDefaultJavaVMInitArgs(void*); static jint nrn_CreateJavaVM(JavaVM **pvm, JNIEnv **penv, void *args); #endif } int convertJavaClassToHoc(JNIEnv*, const char*, const char*, const char*); void nrnjava_init(); #ifdef _WIN32 #define PATH_SEPARATOR ';' #else /* UNIX */ #define PATH_SEPARATOR ':' #endif #define NULL_CHECK(arg) assert((arg)) #if USEJVM == 2 /* * List of VM options to be specified when the VM is created. */ static JavaVMOption *options; static int numOptions, maxOptions; #endif extern "C" { // needed by microsoft visual c++ // support load_java command in hoc. // e.g. load_java("java.lang.String", "JString") // p_hoc_load_java points to this static int nj_load() { // first time through, initialize if (!p_java2nrn_cons) { if (!nrnjava_root_env) { hoc_execerror("The JavaVM is not available.", 0); } nrnjava_init(); if (!p_java2nrn_cons) { hoc_execerror(" Java portion of NEURON was not initialized.", 0); } } char* jname; // fully qualified name. e.g. java.lang.String char* hname; // hoc name, e.g. JString char* path = ""; // classpath addition to find jname. See NrnClassLoader.add jname = gargstr(1); // hocname same as jname if not specified as second arg if (ifarg(2)) { hname = gargstr(2); }else{ hname = jname; } if (ifarg(3)) { path = gargstr(3); } // see neuron/Neuron.java makeHocClass return convertJavaClassToHoc(nrnjava_env, jname, hname, path); } } #if USEJVM == 2 // copied from /usr/j2se/src.jar : src/launcher/java.c /* * Adds a new VM option with the given given name and value. */ static void AddOption(char *str, void *info) { int i; /* * Expand options array if needed to accomodate at least one more * VM option. */ if (numOptions >= maxOptions) { if (options == 0) { maxOptions = 4; options = new JavaVMOption[maxOptions]; } else { JavaVMOption *tmp; tmp = new JavaVMOption[maxOptions*2]; for (i=0; i < numOptions; ++i) { tmp[i].optionString = options[i].optionString; tmp[i].extraInfo = options[i].extraInfo; } maxOptions *= 2; delete [] options; options = tmp; } } options[numOptions].optionString = str; options[numOptions++].extraInfo = info; } #endif // copied from /usr/j2se/src.jar : src/launcher/java.c /* * Prints the version information from the java.version and other properties. */ static void PrintJavaVersion(JNIEnv *env) { jclass ver; jmethodID print; NULL_CHECK(ver = (env)->FindClass("sun/misc/Version")); NULL_CHECK(print = (env)->GetStaticMethodID(ver, "print", "()V")); (env)->CallStaticVoidMethod(ver, print); } static void myabort() { printf("my abort\n"); exit(1); } static void myexit() { printf("my exit\n"); exit(1); } jint myvfprintf(FILE* fp, const char* format, va_list args); jint myvfprintf(FILE* fp, const char* format, va_list args) { char buf[1024]; vsprintf(buf, format, args); printf("%s", buf); return 1; } #if USEJVM == 1 // allowing Mac classic dlopen and Unix static static void initialize_jvm1(); static void initialize_jvm1() { char* classpath; JDK1_1InitArgs args; args.version = 0x00010001; //args.debugging = 1; //args.vfprintf = myvfprintf; #if MAC if (nrn_GetDefaultJavaVMInitArgs(&args) < 0) { return; } classpath = new char[strlen(args.classpath) + 2*strlen(neuron_home) + 100]; // following string for mac, then convert ; to : sprintf(classpath, "%s;/%s/classes/neuron.jar", args.classpath, neuron_home); for (char* cp = classpath; *cp; ++cp) { if (*cp == ';') { *cp = ':'; }else if (*cp == ':') { *cp = '/'; } } #else JNI_GetDefaultJavaMVInitArgs(&args); const char* ucpenv = getenv("CLASSPATH"); // Find classes first in the working directory where neuron was launched. // Then the users CLASSPATH // environment variable (if any). And lastly, the, $NEURONHOME/classes if (ucpenv == nil) { ucpenv = "."; // can't hurt to have it twice } int len = strlen(args.classpath) + strlen(ucpenv) + 2*strlen(neuron_home) + 100; classpath = new char[len]; sprintf(classpath, "%s%c.%c%s%c%s/classes/neuron.jar", args.classpath, PATH_SEPARATOR, PATH_SEPARATOR, PATH_SEPARATOR, ucpenv, PATH_SEPARATOR, neuron_home, ); //printf("%s\n", classpath); sprintf(classpath, "%s:.:%s/classes/neuron.jar", args.classpath, neuron_home); #endif args.classpath = classpath; //for (int i = 0; args.properties[i]; ++i) { //printf("properties |%s|\n", args.properties[i]); //} //args.debugging = 1; //args.vfprintf = myvfprintf; printf("classpath |%s|\n", args.classpath); #if MAC jint res = nrn_CreateJavaVM(&nrnjava_vm, &nrnjava_root_env, (void*)&args); #else jint res = JNI_CreateJavaVM(&nrnjava_vm, (void**)&nrnjava_root_env, &args); #endif nrnjava_env = nrnjava_root_env; if (res < 0) { fprintf(stderr, "JNI_CreateJavaVM returned %d\n", res); }else{ p_hoc_load_java = nj_load; fprintf(stderr, "Created Java VM\n"); } } #endif #if USEJVM == 2 // allowing mswin and unix dlopen and unix static static void initialize_jvm2(); static void initialize_jvm2() { JavaVMInitArgs args; // Because we want to dynamically append to the classpath from hoc // we do all class loading through the neuron/NrnClassLoader in order // to defeat the security policy. char* classpath; int len = strlen(neuron_home) + 100; classpath = new char[len]; sprintf(classpath, "-Djava.class.path=%s/classes/nrnclsld.jar", neuron_home); #if defined(_WIN32) hoc_back2forward(classpath); #endif //printf("%s\n", classpath); args.version = JNI_VERSION_1_2; //printf("version = %lx\n", args.version); AddOption(classpath, nil); // AddOption("-verbose", nil); // AddOption("abort", myabort); // AddOption("exit", myexit); args.nOptions = numOptions; args.options = options; args.ignoreUnrecognized = JNI_FALSE; #if defined(_WIN32) || defined(JVM_DLOPEN) jint res = nrn_CreateJavaVM(&nrnjava_vm, (void**)&nrnjava_root_env, &args); if (res == -10) { return; } #else jint res = JNI_CreateJavaVM(&nrnjava_vm, (void**)&nrnjava_root_env, &args); #endif nrnjava_env = nrnjava_root_env; delete [] classpath; delete [] options; if (res < 0) { switch (res) { case JNI_EVERSION: fprintf(stderr, "JNI Version error. VM is not JNI_VERSION_1_2\n"); break; case JNI_ENOMEM: fprintf(stderr, "Not enough memory\n"); break; case JNI_EINVAL: fprintf(stderr, "invalid arguments\n"); break; default: fprintf(stderr, "JNI_CreateJavaVM returned %d\n", res); break; } fprintf(stderr, "Info: optional feature Java VM is not present.\n"); }else{ p_hoc_load_java = nj_load; if (nrn_istty_) { fprintf(stderr, "Created Java VM\n"); PrintJavaVersion(nrnjava_env); } } } #endif void nrn_InitializeJavaVM() { if (nrnjava_root_env) { // hmm. NEURON must have been loaded by java nrnjava_env = nrnjava_root_env; p_hoc_load_java = nj_load; } else { #if USEJVM == 2 initialize_jvm2(); #else initialize_jvm1(); #endif } #if HAVE_LOCALE_H // in case Java set the locale such that the radix is a ',', set it // back to a '.' char radixtest[50]; sprintf(radixtest, "%g", 1.5); //printf("radixtest=|%s|\n", radixtest); if (strchr(radixtest, ',')) { setlocale(LC_NUMERIC, "C"); // sprintf(radixtest, "%g", 1.5); //printf("after setlocale(LC_NUMERIC, \"C\"), radixtest=|%s|\n", radixtest); } #endif } #if defined(JVM_DLOPEN) #include #include #include typedef jint(*PCJVM)(JavaVM**, void**, void*); jint nrn_CreateJavaVM(JavaVM **pvm, void **penv, void *args) { jint res; *pvm = 0; *penv = 0; Session* ses = Session::instance(); String str("libjvm.so"); char* name = "jvmdll"; if (ses && !ses->style()->find_attribute(name, str)){ // fprintf(stderr, "\"%s\" not defined in nrn.defaults\n", name); return -10; } void* handle = (void *) dlopen(str.string(), RTLD_NOW | RTLD_GLOBAL); if (!handle) { fprintf(stderr, "dlopen(\"%s\") failed: %s\n", str.string(), dlerror()); return -1; } #if defined(DARWIN) PCJVM addr = (PCJVM)dlsym(handle, "JNI_CreateJavaVM_Impl"); #else PCJVM addr = (PCJVM)dlsym(handle, "JNI_CreateJavaVM"); #endif if (!addr) { fprintf(stderr, "%s\n", dlerror()); return -1; } res = (*addr)(pvm, penv, args); return res; } #endif #ifdef _WIN32 #if _MSC_VER #undef bool #endif #if defined(__MWERKS__) && __MWERKS__ >= 7 #undef bool #endif #include #include #include static int jerr_; static void * dlopen (const char *name, int) { void *ret; { /* handle for the named library */ String str; jerr_ = 0; if (!Session::instance()->style()->find_attribute(name, str)){ //fprintf(stderr, "\"%s\" not defined in nrn.def\n", name); jerr_ = -10; ret = NULL; }else{ ret = (void *) LoadLibrary (str.string()); if (ret == NULL) { DWORD dw = GetLastError(); fprintf(stderr, "LoadLibrary(\"%s\") failed with error %d\n", str.string(), dw); jerr_ = -1; } } } return ret; } static void * dlsym (void *handle, const char *name) { void *ret = (void *) GetProcAddress ((HMODULE) handle, name); if (!ret) { fprintf(stderr, "Could not GetProcAddress for \"%s\"\n", name); } return ret; } #if defined(_MSC_VER) typedef jint(CALLBACK *PCJVM)(JavaVM**, void**, void*); #else typedef jint(*PCJVM)(JavaVM**, void**, void*); #endif jint nrn_CreateJavaVM(JavaVM **pvm, void **penv, void *args) { jint res; *pvm = 0; *penv = 0; void* handle = dlopen("jvmdll", 0); if (!handle) { return jerr_; } PCJVM addr = (PCJVM)dlsym(handle, "JNI_CreateJavaVM"); if (!addr) { return -1; } res = (*addr)(pvm, penv, args); return res; } #endif #if MAC extern "C" { bool is_mac_dll(FSSpec*); extern OSErr __path2fss(const char* name, FSSpec*); } typedef jint(*PCJVM)(JavaVM**, JNIEnv**, void*); typedef jint(*PIJVM)(void*); typedef CFragConnectionID(*PF)(); static PCJVM caddr; static jint nrn_GetDefaultJavaVMInitArgs(void* args) { PIJVM iaddr = 0; long i, cnt; CFragConnectionID id; CFragSymbolClass sc; Ptr sa; Str255 sname; OSErr myErr; FSSpec fs; char name[256]; sprintf(name, "%s:nrnjvmdll", neuron_home); if ((__path2fss(name, &fs) == fnfErr) || !is_mac_dll(&fs)) { fprintf(stderr, "%s is not the nrnjvmdll\n", name); return -1; } myErr = GetDiskFragment(&fs, 0, kCFragGoesToEOF, 0, kLoadCFrag, &id, &sa, sname); //myErr = GetSharedLibrary("\pMRJLib", kPowerPCCFragArch, kLoadCFrag, // &id, &sa, sname); if (myErr) { sname[sname[0]+1]='\0'; fprintf(stderr, "could not load the Java VM : %s\n", sname+1); return -1; } sa = 0; myErr = CountSymbols(id, &cnt); //printf("%d symbols exported\n", cnt); for (i=0; i < cnt; ++i) { myErr = GetIndSymbol(id, i, sname, &sa, &sc); sname[sname[0]+1] = '\0'; //printf("%d %s\n", i, sname+1); if (strcmp((char*)(sname+1), "nrn2_GetDefaultJavaVMInitArgs") == 0) { iaddr = (PIJVM)sa; } if (strcmp((char*)(sname+1), "nrn2_CreateJavaVM") == 0) { caddr = (PCJVM)sa; } } if (iaddr) { jint res = (*iaddr)(args); if (res < 0) { fprintf(stderr, "call to JNI_GetDefaultJavaVMInitArgs returned %d\n", res); } return res; } fprintf(stderr, "no address for JNI_GetDefaultJavaVMInitArgs\n"); return -1; } static jint nrn_CreateJavaVM(JavaVM **pvm, JNIEnv **penv, void *args) { jint res; *pvm = 0; *penv = 0; if (!caddr) { fprintf(stderr, "no address for JNI_CreateJavaVM\n"); return -1; } res = (*caddr)(pvm, penv, args); return res; } #endif neuron-7.5/src/nrnjava/njvm.h000077500000000000000000000004411323325274500162540ustar00rootroot00000000000000#ifndef njmv_h #define njmv_h #define jnisave JNIEnv* jesave = nrnjava_env; nrnjava_env = env; #define jnirestore nrnjava_env = jesave; #if defined(__cplusplus) extern "C" { #endif extern JNIEnv* nrnjava_env; extern JNIEnv* nrnjava_root_env; #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnjava/nrnccmb/000077500000000000000000000000001323325274500165515ustar00rootroot00000000000000neuron-7.5/src/nrnjava/nrnccmb/Channels.java000077500000000000000000000046721323325274500211630ustar00rootroot00000000000000package nrnccmb; import java.util.*; import java.awt.*; import catacomb.channel.*; import catacomb.modeler.*; import catacomb.core.*; import neuron.*; public class Channels implements DataListener { CcmbList chlist; Hashtable table; public Channels() { catacomb.modeler.checkInit(); table = new Hashtable(); String[] h = {"pore, level=6", "nRNPore, level=3"}; chlist = new CcmbList("KSChannel"); chlist.applyHints(h); chlist.addDataListener(this); } public int hocSessionPriority() { return 2000; } public char[] hocSessionSave(String sfname) { StringBuffer s; s = new StringBuffer(sfname); s.append(".ccm"); save(s.toString()); s = new StringBuffer("{ocbox_.map() ocbox_.load(\""); s.append(sfname).append(".ccm\")}\n"); //System.out.println("hocSessionSave" + s); return s.toString().toCharArray(); } public void load(String fname) { Sys.setObject(chlist); Sys.importFile(fname); } public void save(String fname) { Sys.saveComponent(chlist, fname); } public void map() { if (Sys.interactor == null) { Sys.interactor = new catacomb.gui.GuiInteractor(); } try { Sys.editObject(chlist); Sys.setMainProgram(false); Object o = Sys.getEditor(chlist); Frame f = (Frame)((catacomb.gui.ObjectViewer)o).getFrame(); Neuron.windowListen(f, this); }catch (Exception e) { System.out.println(e); e.printStackTrace(); } } public void sync_rates() { Enumeration e; for (e = table.elements(); e.hasMoreElements();) { ((NrnKSChan)e.nextElement()).sync_rates(null); } } public String getName() { return "NrnCcmbChList"; } public void dataChange(DataEvent d) { if (d.type == d.STRUCTURE && d.srcVob == chlist) { int i, j; Enumeration e; for (e = table.elements(); e.hasMoreElements();) { ((NrnKSChan)e.nextElement()).mark(0); } for (i=0; i < chlist.size(); ++i) { KSChannel c = (KSChannel)chlist.at(i); if (table.containsKey(c)) { ((NrnKSChan)table.get(c)).mark(1); }else{ table.put(c, new NrnKSChan(c)); //System.out.println("Adding " + c.getName()); } } for (e = table.elements(); e.hasMoreElements();) { NrnKSChan nc = (NrnKSChan)e.nextElement(); if (nc.mark() == 0) { table.remove(nc.ch_); //System.out.println("Removing " + nc.ch_.getName()); }else{ nc.checkName(); } } } // System.out.println(d); // for (int i = 0; i < chlist.size(); ++i) { // System.out.println("" + i+ " " + chlist.at(i)); // } } } neuron-7.5/src/nrnjava/nrnccmb/Makefile.am000077500000000000000000000013201323325274500206040ustar00rootroot00000000000000javaSrc = Channels.java NrnKSChan.java JAVAC = @JAVAC@ EXTRA_DIST = $(javaSrc) # Only attempt to compile if ccmb.jar is available # For normal installations this is not necessary since # nrnccmb.jar is distributed with these classes precompiled # and ccmb.jar will be # installed when the channel builder is first invoked. # Since Robert Cannon has a login on my machine he is able # to deposit a new ccmb.jar file in the following location #CCMBPATH = /home/rcc/ccmb.jar CCMBPATH = $(HOME)/ccmb.jar all: ../nrnccmb.jar ../nrnccmb.jar: $(javaSrc) ( cd $(srcdir) ; \ if test -r "$(CCMBPATH)" ; then \ $(JAVAC) -classpath ..:$(CCMBPATH) $(javaSrc) ; \ ( cd .. ; jar cf nrnccmb.jar nrnccmb/*.class ) ; \ fi \ ) neuron-7.5/src/nrnjava/nrnccmb/Makefile.in000066400000000000000000000405051323325274500206220ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/nrnjava/nrnccmb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ javaSrc = Channels.java NrnKSChan.java EXTRA_DIST = $(javaSrc) # Only attempt to compile if ccmb.jar is available # For normal installations this is not necessary since # nrnccmb.jar is distributed with these classes precompiled # and ccmb.jar will be # installed when the channel builder is first invoked. # Since Robert Cannon has a login on my machine he is able # to deposit a new ccmb.jar file in the following location #CCMBPATH = /home/rcc/ccmb.jar CCMBPATH = $(HOME)/ccmb.jar all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrnjava/nrnccmb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrnjava/nrnccmb/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile all: ../nrnccmb.jar ../nrnccmb.jar: $(javaSrc) ( cd $(srcdir) ; \ if test -r "$(CCMBPATH)" ; then \ $(JAVAC) -classpath ..:$(CCMBPATH) $(javaSrc) ; \ ( cd .. ; jar cf nrnccmb.jar nrnccmb/*.class ) ; \ fi \ ) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrnjava/nrnccmb/NrnKSChan.java000077500000000000000000000127611323325274500212130ustar00rootroot00000000000000package nrnccmb; import java.awt.*; import catacomb.channel.*; import catacomb.core.*; import catacomb.standard.*; import neuron.*; public class NrnKSChan implements DataListener{ public KSChannel ch_; public NrnKSChan(KSChannel chan) { ch_ = chan; mark_ = 1; name_ = ch_.getName(); structure_ = new HocVector(100); f_ = new HocVector(10); rate_ = new HocVector(5); ho_ = new HocObject("KSChan"); ho_.dMethod("setname", new Object[]{name_}); ccmb2nrn(); ch_.addDataListener(this); } public void mark(int i) { mark_ = i; } public int mark() { return mark_; } public void checkName() { if (name_ != ch_.getName()) { //System.out.println("Change name from " + name_ + " to " + ch_.getName()); name_ = ch_.getName(); ho_.dMethod("setname", new Object[]{name_}); ccmb2nrn(); } } public String getName() { return name_; } public void dataChange(DataEvent d) { // System.out.println("NrnKSChan dataChange for " + name_ + ": "+d); if (d.getSource() instanceof CcmbLink) { data = ch_.getData(); ratevalues(data); }else{ System.out.println(d); ccmb2nrn(); } } public void ccmb2nrn() { data = ch_.getData(); // System.out.println("ccmb2nrn " + data); // catacomb.core.U.dumpArrays(data); structure(data); snames(data); ligand_names(data); ratevalues(data); } private void structure(Object[] data) { int len, ntrans, nvtrans, nstate, nligand, i, j, k, ia[]; k = 0; len = 0; // determine size nstate = 0; ntrans = 0; nligand = 0; nvtrans = 0; ngate_ = ((int[])data[1])[0]; int indx[] = new int[ngate_]; for (i = 0; i < ngate_; ++i) { indx[i] = nstate; Object gc[] = (Object[])data[2+i]; ia = (int[])gc[0]; nstate += ia[0]; ntrans += ia[1]; if (gc[5] != null) { nligand += ((String[])gc[5]).length; //System.out.println("for gate " + i + " nligand=" + nligand); } for (j=0; j < ia[1]; ++j) { int ta[] = ((int[][])gc[1])[j]; if (ta[0] != 3) { ++nvtrans; } } } double st[] = new double[3*ngate_ + 4*ntrans + nstate + 6]; st[k++] = ((int[])data[1])[1]; // conductance model st[k++] = ngate_; st[k++] = nstate; st[k++] = ntrans; st[k++] = nligand; st[k++] = nvtrans; nstate = 0; // index for complex, number of states in complex, // power, then, for each state in complex,, its fractional // conductance for (i = 0; i < ngate_; ++i) { st[k++] = indx[i]; Object gc[] = (Object[])data[2+i]; ia = (int[])gc[0]; st[k++] = ia[0]; st[k++] = ia[2]; double f[] = (double[])gc[3]; for (j=0; j < ia[0]; ++j) { st[k++] = f[j]; } } // for each transition, the src, target, type, and ligand index // but only vtrans first nligand = 0; for (i = 0; i < ngate_; ++i) { Object gc[] = (Object[])data[2+i]; ia = (int[])gc[0]; for (j=0; j < ia[1]; ++j) { int ta[] = ((int[][])gc[1])[j]; if (ta[0] == 3) { continue; } st[k++] = indx[i] + ta[1]; st[k++] = indx[i] + ta[2]; st[k++] = ta[0]; st[k++] = nligand + ta[4]; } if (gc[5] != null) { nligand += ((String[])gc[5]).length; } } // now the ligand ones nligand = 0; for (i = 0; i < ngate_; ++i) { Object gc[] = (Object[])data[2+i]; ia = (int[])gc[0]; for (j=0; j < ia[1]; ++j) { int ta[] = ((int[][])gc[1])[j]; if (ta[0] != 3) { continue; } st[k++] = indx[i] + ta[1]; st[k++] = indx[i] + ta[2]; st[k++] = ta[0]; st[k++] = nligand + ta[4]; } if (gc[5] != null) { nligand += ((String[])gc[5]).length; } } //System.out.println("structure_ "); //for (i=0; i < st.length; ++i) { // System.out.println(i + " " +st[i]); //} structure_.toHoc(st); ho_.dMethod("setstructure", new Object[]{structure_}); ho_.dMethod("setion", new Object[]{ ((String[])data[0])[1], new Double(((int[])data[1])[2]) }); } private void snames(Object[] data) { int i, j, ntot, n; ntot = 0; for (i=0; i < ngate_; ++i) { Object gc[] = (Object[])data[2+i]; n = ((int[])gc[0])[0]; String s[] = (String[])gc[4]; for (j=0; j < n; ++j) { ho_.dMethod("setsname", new Object[]{ new Double(ntot), s[j]}); ++ntot; } } } private void ligand_names(Object[] data) { int i, j, ntot, n; ntot = 0; for (i=0; i < ngate_; ++i) { Object gc[] = (Object[])data[2+i]; if (gc[5] != null) { String s[] = (String[])gc[5]; for (j=0; j < s.length; ++j) { ho_.dMethod("setligand", new Object[]{ new Double(ntot), s[j]}); ++ntot; } } } } private void ratevalues(Object[] data) { int i, j, ntot, n; ntot = 0; for (i=0; i < ngate_; ++i) { Object gc[] = (Object[])data[2+i]; n = ((int[])gc[0])[1]; double rat[][] = (double[][])gc[2]; for (j=0; j < n; ++j) { rate_.toHoc(rat[j]); ho_.dMethod("setrate", new Object[]{ new Double(ntot), rate_}); ++ntot; } } } public void sync_rates(HocObject h) { if (h != null && h != ho_) { return; } int i, j, ntot, n; ntot = 0; for (i=0; i < ngate_; ++i) { Object gc[] = (Object[])data[2+i]; n = ((int[])gc[0])[1]; double rat[][] = (double[][])gc[2]; for (j=0; j < n; ++j) { ho_.dMethod("getrate", new Object[]{ new Double(ntot), rate_}); rat[j] = rate_.fromHoc(); ++ntot; //System.out.println("sync_rates "); //for (int k=0; k < rat[j].length; ++k) { // System.out.println(k + " " +rat[j][k]); //} } } ch_.setData(data); } private Object[] data; private int ngate_; private int mark_; private String name_; private HocObject ho_; private HocVector structure_; private HocVector f_; private HocVector rate_; } neuron-7.5/src/nrnjava/nrnjava.cpp000066400000000000000000000362551323325274500173050ustar00rootroot00000000000000/** Neuron/Java Interface code * * @author Fred Howell * @date March 2001 * * Modified by Michael Hines * The Java to Neuron JNIEXPORT functions for Neuron.java * have been collected in nrnjni.cpp. This file now mostly supports the * Neuron to Java direction */ #include <../../nrnconf.h> #include #include #include #include #include #include #include #include #include "ivoc.h" #include "classreg.h" #include "nrnoc2iv.h" #include "parse.h" #include "njvm.h" extern "C" { extern Symlist* hoc_top_level_symlist; // Hooks in nrn-5.0.0/src/oc/hoc_oop.c for filling in cTemplate structure extern void* (*p_java2nrn_cons)(Object*); /* returns pointer to java object */ extern void (*p_java2nrn_destruct)(void* opaque_java_object); extern double (*p_java2nrn_dmeth)(Object* ho, Symbol* method); extern char** (*p_java2nrn_smeth)(Object* ho, Symbol* method); extern Object** (*p_java2nrn_ometh)(Object* ho, Symbol* method); extern const char* (*p_java2nrn_classname)(Object* ho); extern bool (*p_java2nrn_identity)(Object* o1, Object* o2); } // and others extern void (*nrnjava_pwm_setwin)(void*, int, int, int); // actual functions in this file that fill in the above hooks static void* java2nrn_cons(Object* o); static void java2nrn_destruct(void* opaque_java_object); static double java2nrn_dmeth(Object* ho, Symbol* method); static char** java2nrn_smeth(Object* ho, Symbol* method); static Object** java2nrn_ometh(Object* ho, Symbol* method); static const char* java2nrn_classname(Object* ho); static bool java2nrn_identity(Object* o1, Object* o2); static void pwm_setwin(void*, int, int, int); static char** js2charpool(jstring js); // see nrnjni.cpp extern void nrnjni_registration(jclass nrnCls); extern void nrnjni_redirreg(jclass nrnCls); // Java Method & class IDs static jclass nrnclsldr; static jclass neuronCls; static jmethodID nrnclsldID; static jmethodID constructNoArgID; static jmethodID constructWithArgID; static jmethodID makeHocClassID; static jmethodID invokeDoubleMethodID; static jmethodID invokeCharsMethodID; static jmethodID invokeObjectMethodID; static jmethodID encapsulateID; static jmethodID getObjectTypeID; static jmethodID setwinID; static jmethodID identityID; static jmethodID jclassnameID; static jfieldID hocObjectCastID; declarePtrList(NJSymList, Symbol) implementPtrList(NJSymList, Symbol) // list of cTemplate of java registered classes in id order. // this parallels the classList in Neuron.Java NJSymList* nrn_jclass_symlist; declarePtrList(NJStrList, String) implementPtrList(NJStrList, String) // list of the full java classnames for use in session save static NJStrList* njclassnames; Symbol* nrn_jobj_sym; // for a JavaObject Symbol* nrn_vec_sym; // for deciding if Vector static void* joconstruct(Object*) { hoc_execerror("JavaObject for internal use only.", "Do not construct"); return nil; } static void jodestruct(void* v) { if (v) { nrnjava_env->DeleteGlobalRef((jobject)v); } } static double joequals(void* v) { jobject jo1 = (jobject)v; Object* o2 = *hoc_objgetarg(1); jobject jo2; if (o2 == nil) {return 0.;} if (o2->ctemplate->constructor == joconstruct // a JavaObject || o2->ctemplate->sym->type == JAVAOBJECT) { // registerd java Object jobject jo2 = (jobject)o2->u.this_pointer; return (nrnjava_env->CallStaticIntMethod(neuronCls, identityID, jo1,jo2 ) != 0 ) ? 1. : 0.; } return 0.; } static const char** joname(void* v) { jstring js = (jstring)nrnjava_env->CallStaticObjectMethod( neuronCls, jclassnameID, (jobject)v); return (const char**)js2charpool(js); } static Member_func jo_members[] = { "equals", joequals, 0,0 }; static Member_ret_str_func jo_retstr_members[] = { "name", joname, 0,0 }; // called from njvm.cpp when the first NrnJava hoc object is consstructed void nrnjava_init () { // printf("nrnjava_init\n"); nrn_jclass_symlist = new NJSymList(20); class2oc("JavaObject", joconstruct, jodestruct, jo_members, nil, nil, jo_retstr_members); nrn_jobj_sym = hoc_lookup("JavaObject"); nrn_vec_sym = hoc_lookup("Vector"); #if defined(_MSWIN) || (defined(MAC) && !defined(DARWIN)) neuronCls = nrnjava_env->FindClass("neuron/Redirect"); if (neuronCls == 0) { printf("ERROR in nrnjava_init : neuron/Redirect class not loaded\n"); printf("Look in the Redirect.out file of the current working directory for the reason for failure\n"); return; } nrnjni_redirreg(neuronCls); #endif nrnclsldr = nrnjava_env->FindClass("neuron/NrnClassLoader"); if (nrnclsldr == 0) { printf("ERROR in nrnjava_init : neuron/NrnClassLoader not found\n"); } nrnclsldID = nrnjava_env->GetStaticMethodID(nrnclsldr, "load", "(Ljava/lang/String;)Ljava/lang/Class;" ); jstring js; js = nrnjava_env->NewStringUTF("neuron.Neuron"); neuronCls = (jclass)nrnjava_env->CallStaticObjectMethod(nrnclsldr, nrnclsldID,js); if (neuronCls == 0) { printf("ERROR in nrnjava_init : neuron.Neuron class not found\n"); return; } js = nrnjava_env->NewStringUTF("neuron.HocObject"); jclass hoCls = (jclass)nrnjava_env->CallStaticObjectMethod(nrnclsldr, nrnclsldID,js); if (hoCls == 0) { printf("ERROR in nrnjava_init : neuron.HocObject class not found\n"); return; } p_java2nrn_cons = java2nrn_cons; p_java2nrn_destruct = java2nrn_destruct; p_java2nrn_dmeth = java2nrn_dmeth; p_java2nrn_smeth = java2nrn_smeth; p_java2nrn_ometh = java2nrn_ometh; p_java2nrn_classname = java2nrn_classname; p_java2nrn_identity = java2nrn_identity; nrnjava_pwm_setwin = pwm_setwin; nrnjni_registration(neuronCls); /*** Lookup method ids of Java Neuron class ***/ constructNoArgID = nrnjava_env->GetStaticMethodID( neuronCls, "constructNoArg", "(I)Ljava/lang/Object;" ); constructWithArgID = nrnjava_env->GetStaticMethodID( neuronCls, "constructWithArg", "(I)Ljava/lang/Object;" ); makeHocClassID = nrnjava_env->GetStaticMethodID( neuronCls, "makeHocClass", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I" ); invokeDoubleMethodID = nrnjava_env->GetStaticMethodID( neuronCls, "invokeDoubleMethod", "(Ljava/lang/Object;III)D" ); invokeCharsMethodID = nrnjava_env->GetStaticMethodID( neuronCls, "invokeCharsMethod", "(Ljava/lang/Object;III)Ljava/lang/String;" ); invokeObjectMethodID = nrnjava_env->GetStaticMethodID( neuronCls, "invokeObjectMethod", "(Ljava/lang/Object;III)Ljava/lang/Object;" ); encapsulateID = nrnjava_env->GetStaticMethodID( neuronCls, "encapsulateHocObject", "(JI)Ljava/lang/Object;" ); getObjectTypeID = nrnjava_env->GetStaticMethodID( neuronCls, "getObjectType", "(Ljava/lang/Object;)I" ); setwinID = nrnjava_env->GetStaticMethodID( neuronCls, "setwin", "(JIII)I"); identityID = nrnjava_env->GetStaticMethodID( neuronCls, "identity", "(Ljava/lang/Object;Ljava/lang/Object;)I" ); jclassnameID = nrnjava_env->GetStaticMethodID( neuronCls, "javaClassName", "(Ljava/lang/Object;)Ljava/lang/String;" ); hocObjectCastID = nrnjava_env->GetFieldID( hoCls, "hocObjectCast", "J"); // printf("neuronCls=%ld mids %ld %ld %ld\n", // neuronCls, constructNoArgID, // makeHocClassID, invokeDoubleMethodID); } // don't forget to delete [] after use char* nrn_underbar2dot(const char* s) { char *mangledstr = new char[strlen(s) + 1]; strcpy(mangledstr, s); for (char* cp = mangledstr; *cp; ++cp) { if (*cp == '_') { *cp = '.'; } } return mangledstr; } //don't forget to delete [] char* nrn_dot2underbar(const char* s) { char *mangledstr = new char[strlen(s) + 1]; strcpy(mangledstr, s); for (char* cp = mangledstr; *cp; ++cp) { if (*cp == '.') { *cp = '_'; } } return mangledstr; } /** equality in the sense of == */ static bool java2nrn_identity(Object* o1, Object* o2) { if (o1 == o2) return true; if (o1 == 0 || o2 == 0) return false; return (nrnjava_env->CallStaticIntMethod(neuronCls, identityID, (jobject)o1->u.this_pointer, (jobject)o2->u.this_pointer ) != 0 ) ? true : false; } /** Construct a new instance of a java class * @param o Empty hoc object which will contain this object */ static void* java2nrn_cons(Object* o) { // printf("java2nrn_cons %s\n",o->ctemplate->sym->name ); jint cid = -(o->ctemplate->id) - 1; jobject newo; if (!ifarg(1)) { newo = nrnjava_env->CallStaticObjectMethod( neuronCls, constructNoArgID, cid ); }else{ newo = nrnjava_env->CallStaticObjectMethod( neuronCls, constructWithArgID, cid); } jobject ret = 0; if (newo) { // otherwise it is pure static like java.lang.Math // printf("java2nrn_cons got jobject %ld\n", newo ); ret = nrnjava_env->NewGlobalRef( newo ); // printf("java2nrn_cons got global jobject %ld\n", ret ); } return (void*)ret; } /** Destroy java reference */ static void java2nrn_destruct(void* opaque_java_object) { // printf("java2nrn_destruct\n"); if (opaque_java_object) { nrnjava_env->DeleteGlobalRef( (jobject) opaque_java_object ); } } /** Make a hoc equivalent to Java class (jname) calling it hname in hoc. Done from NrnJava.load("name") after the class is loaded with FindClass. */ int convertJavaClassToHoc( JNIEnv *env, const char* jname, const char* hname, const char* path ) { //only if classname not already in use. if (!njclassnames) { njclassnames = new NJStrList(); } char* hn = nrn_dot2underbar(hname); // printf("loading %s --- calling it %s\n", jname, hn); Symbol* s = hoc_table_lookup(hn, hoc_top_level_symlist); if (s) { delete [] hn; if (s->type == TEMPLATE && s->u.ctemplate->id < 0) { return 2; } return 0; } jstring js = env->NewStringUTF( jname ); if (env->ExceptionOccurred()) { env->ExceptionDescribe();} jstring hs = env->NewStringUTF( hn ); jstring jp = env->NewStringUTF(path); int i = env->CallStaticIntMethod(neuronCls, makeHocClassID, js, hs, jp); if (i == 1) { njclassnames->append(new CopyString(jname)); } errno = 0; // have seen this set to 2 by linux delete [] hn; return i; } static const char* java2nrn_classname(Object* ho) { jint cid = -(ho->ctemplate->id) - 1; return njclassnames->item(cid)->string(); } static void overloaded(Object* ho, Symbol* method) { int n = strlen(method->name); printf("%s.%s Overloaded. Use one of:\n", hoc_object_name(ho), method->name); for (Symbol* s = ho->ctemplate->symtable->first; s; s = s->next) { if (s != method && strncmp(s->name, method->name, n) == 0 && isdigit(s->name[n]) ) { printf(" %s\n", s->name); } } hoc_execerror(method->name, "Overloaded. Disambiguate using a more specific method."); } /** invoke java method returning double */ static double java2nrn_dmeth(Object* ho, Symbol* method) { // printf("java2nrn_dmeth invoking %s.%s\n", hoc_object_name(ho), method->name); if (method->s_varn) {overloaded(ho, method);} double d = (double) nrnjava_env->CallStaticDoubleMethod( neuronCls, invokeDoubleMethodID, (jobject)ho->u.this_pointer, -(jint)ho->ctemplate->id - 1, (jint)method->u.u_auto, (jint)method->s_varn); errno = 0; if (d == -1e98) { hoc_execerror("Java Exception for", method->name); } return d; } static char** js2charpool(jstring js) { #define imax 5 static char** cs; static int i; // allow up to 5 calls before freeing // the problem is that several of these can be put on the // hoc stack before an early one is copied into strdef // and until then the early one must stay in existence if (!cs) { cs = new char*[imax]; for (i=0; i < imax; ++i) { cs[i] = nil; } i = 0; } const char* jc = nrnjava_env->GetStringUTFChars(js, 0); if (cs[i]) { delete [] cs[i]; cs[i] = nil; } i = (i+1)%imax; cs[i] = new char[strlen(jc) + 1]; strcpy(cs[i], jc); nrnjava_env->ReleaseStringUTFChars(js, jc); return cs + i; } /** invoke java method returning String */ static char** java2nrn_smeth(Object* ho, Symbol* method) { // printf("java2nrn_smeth invoking %s.%s\n", hoc_object_name(ho), method->name); if (method->s_varn) {overloaded(ho, method);} jstring js = (jstring)nrnjava_env->CallStaticObjectMethod( neuronCls, invokeCharsMethodID, (jobject)ho->u.this_pointer, -(jint)ho->ctemplate->id - 1, (jint)method->u.u_auto, (jint)method->s_varn); errno = 0; if (js == nil) { hoc_execerror("Java Exception for", method->name); } return js2charpool(js); } Object** nj_j2hObject(jobject jo, int type) { Object** po = nil; if (jo == 0) { //null po = hoc_temp_objptr(0); return po; } if (type >= 0) { void* v = nrnjava_env->NewGlobalRef(jo); Symbol* tsym = nrn_jclass_symlist->item(type); po = hoc_temp_objvar(tsym, v); return po; }else{ void* v; Object* o; switch (type) { case -1: //Unregistered java object // put it in a JavaObject v = nrnjava_env->NewGlobalRef(jo); po = hoc_temp_objvar(nrn_jobj_sym, v); return po; case -2: //encapsulated hoc object case -3: //encapsulated Vector object o = (Object*)nrnjava_env->GetLongField(jo, hocObjectCastID); po = hoc_temp_objptr(o); return po; default: break; } } return 0; } /** invoke java method returning a Java Object */ static Object** java2nrn_ometh(Object* ho, Symbol* method) { // printf("java2nrn_ometh invoking %s.%s\n", hoc_object_name(ho), method->name); // I don't know how to return two things at once so we call two // methods. The first returns a java object and the second tells // the type. //type 0+ is a registered java object and is the template id. //type -1 is an unregistered java object -- enclose in JavaObject //type -2 is a HocObject and the jobject has a field called // long hocObjectCast which we can cast to the correct object. // other types are for Java objects that extend HocObject // but all have a field called "long hocObjectCast" Object** po = nil; if (method->s_varn) {overloaded(ho, method);} jobject jo = nrnjava_env->CallStaticObjectMethod( neuronCls, invokeObjectMethodID, (jobject)ho->u.this_pointer, -(jint)ho->ctemplate->id - 1, (jint)method->u.u_auto, (jint)method->s_varn); if (nrnjava_env->ExceptionOccurred()) { nrnjava_env->ExceptionDescribe(); hoc_execerror("Java Exception for", method->name); } jint type = 0; if (jo) { type = nrnjava_env->CallStaticIntMethod( neuronCls, getObjectTypeID, jo); } //printf("java2nrn_ometh type = %d\n", type); po = nj_j2hObject(jo, type); if (!po) { printf("%s.%s : do not recognize the return object type %d\n", hoc_object_name(ho), method->name, type); } errno = 0; return po; } /** a hoc object must be encapsulated in a java object for use in java. The generic case for hoc objects opaque to java is HocObject and it's java id for this purpose is 0. Other kinds of hoc object which java should be able to do something with, eg. Vector all have a corresponding java class that extends HocObject and an id known here and in Neuron.java. */ jobject nj_encapsulate(Object* ho) { jobject jo; int type = 0; if ( ho->ctemplate->sym == nrn_vec_sym) { type = 1; } //printf("nj_encapsulate %s %ld\n", hoc_object_name(ho), (long)ho); jo = nrnjava_env->CallStaticObjectMethod(neuronCls, encapsulateID, (jlong)ho, type); // refcount incremented already by h2jObject(Object*) return jo; } static void pwm_setwin(void* win, int type, int left, int top) { // printf("pwm_setwin %p %ld %d %d %d\n", win, type, left, top); if (nrnjava_root_env == nrnjava_env) { nrnjava_env->CallStaticIntMethod(neuronCls, setwinID, (jlong)win, type, left, top); }else{ printf("nrnjava_env = %ld nrnjava_root_env = %ld\n", (long)nrnjava_env, (long)nrnjava_root_env); } } neuron-7.5/src/nrnjava/nrnjava.html000077500000000000000000000161461323325274500174670ustar00rootroot00000000000000

NEURON + Java User reference

Java from the perspective of NEURON

This file discusses how to use java from NEURON's interpreter. A user level discussion of the converse is in "Writing java classes that communicate with NEURON".

See also:
NEURON + Java Interface programmer reference
which is the javadoc generated information from the neuron.* classes that implement the java to neuron interface. Early development notes are now mostly obsolete except for the important acknowlegement of Fred Howell's original work on the interface.

Loading java classes into NEURON

load_java("java.lang.String")
load_java("java.lang.String", "JString")
This function registers a Java class with the Hoc interpreter. In hoc the class is called java_lang_String or JString respectively. The load_java function returns 1 if the class can be found and registered, 2 if the name is already in use (hopefully because the same class was previously loaded with that name), and 0 (along with an error message, probably ClassNotFoundException).

The same java classes may be loaded more than once with different hoc names.

Java classes are looked for first in the current working directory, then the list of directories or jar files specified in the ${CLASSPATH} environment variable, then the jar files in the ${NEURONHOME}/classes directory, and finally in the directories (or jar files) dynamically added to the neuron/NrnClassLoader.

It should be noted that the java virtual machine's system class loader starts with a java.class.path variable which contains only the ${NEURONHOME}/classes/nrnclsld.jar so that only the basic java classes and the neuron.NrnClassLoader are loaded with the system loader. All other classes are loaded with the neuron.NrnClassLoader which has a dynamically configurable list of directories and jar files which are looked in for classes. This means that if a class is loaded which fails due because it needs a package not in the current classpath, that one can load that prerequisite package and then attempt to reload the dependent class.

For example

load_java("Notepad", "Notepad")
returns 0 and prints the "java.lang.ClassNotFoundException: Notepad" message. Re-executing with a third argument that specifies the path to the class gives
load_java("Notepad", "Notepad", "file:/usr/j2sdk1_3_1/demo/jfc/Notepad/Notepad.jar")
succeeds.

Java objects in NEURON

After a Java class is loaded, instances of the class (objects) are created in the same way as native NEURON objects. e.g
load_java("java.util.Vector", "JVector")
objref jv
jv = new JVector()
print jv // prints JVector[0]
If there is more than one class constructor with args, better performance is obtained using the no arg constructor (if it exists) since that avoids a dynamic lookup of the proper constructor on the basis of the specific hoc argument list used. Also, with overloaded constructors, argument types double, int, and boolean cannot be distinguished and all objects are of type object at the time the constructor selection is made. In practice this is only rarely a problem. e.g.
load_java("java.lang.String", "JString")
objref s
s = new String() // no problem
s = new String("Hello") // no problem
s = new String(s) // have to use s = new String(s.toCharArray)
/home/hines/nrn5/sparc/bin/nrniv: Expecting string argument near line 19
s = new String(s)        
                          ^
        String[2].init(String[1])

Class Methods

The java class methods that can be called from hoc are all of the public static methods and public instance methods (along with all the inherited superclass methods) that take arguments of java type: double int boolean char[] Object and return a value of any of these types or void.
Example
load_java("java.lang.Math", "JMath")
objref jm
jm = new JMath()
jm.ceil(4.3) // prints 5
If such methods are overloaded at the hoc level then the correct method name in hoc is the method name followed by the number of arguments followed by a signature string consisting of the letters 'd', 'i', 'b', 's', or 'o' in the order of the arguments.
Example
load_java("java.lang.Math", "JMath")
objref jm
jm = new JMath()
jm.min2ii(4.1, 3.1) // prints 3
jm.min2dd(4.1, 3.1) // prints 3.1
Attempting to use the overloaded name will print a list of possible disambiguated method names as in:
oc>jm.min(4.1, 3.1)
JMath[0].min Overloaded. Use one of:
        min2ii
        min2dd
/home/hines/nrn5/sparc/bin/nrniv: min Overloaded.  Disambiguate using a
more specific method. near line 10
jm.min(4.1, 3.1)
                 ^
        JMath[0].min(4.1, 3.1)
oc>
Notice that even pure static classes need an object instance in hoc before one can call the static method.

What about unregistered Java objects?

If a java method returns an object that is unregistered (no load_java call that registers that type), hoc encapsulates it as a JavaObject with only two methods, "equals", and "name". JavaObject.equals(o) returns 1 only if the underlying native java object references are the same and JavaObject.name() returns the class name of the underlying java object. When (if) it goes back into java as an argument of another method call, java receives it as its original type. Consider
load_java("java.util.Vector", "JVector")
objref jv, o
jv = new JVector()
o = jv.toString // but the java String is unregistered
oc>print o
JavaObject[0] 
oc> o.name // prints the underlying classname of the java object
        class java.lang.String 
jv.add1o(o) // now put that object into jv
print jv.get(0) // still a JavaObject but not the same hoc version of it.
jv.get(0).equals(o) // but they really are the same
load_java("java.lang.String", "JString")
print jv.get(0).toCharArray // Now it comes back as the proper JString!

What about passing Hoc objects that Java knows nothing about?

In this case java encapsulates it as an opaque HocObject. When it is returned by a method, it is unpacked and reappears as the original hoc object. E.g.
load_java("java.util.Vector", "JVector")
objref jv
jv = new JVector()
jv.add1o(new Graph())
print jv.get(0) //prints Graph[0] (if it was the first vector created)
jv.get(0).size(-100,100,-200,200)

Watch out! Different hoc objects can reference the same java object!

For normal native hoc objects, different internal names of the object (template name followed by an index in brackets) imply distinct object instances. But a java object in hoc is really a reference back to the java object in Java. Thus different internal hoc object names can actually refer to the same java object. Consider
load_java("java.util.Vector", "JV")
objref jv1, jv2
jv1 = new JV()
jv1.add1o(new Vector())
jv1.add1o(jv1)
jv2 = jv1.get(1)
jv1 // prints JV[0]
jv2 // prints JV[1]
jv1 == jv2 /// they are different hoc objects
jv1.equals(jv2) // but they are the same java object
If this causes too much trouble in the future, then the jv1 == jv2 semantics can be changed. neuron-7.5/src/nrnjava/nrnjni.cpp000077500000000000000000000372311323325274500171420ustar00rootroot00000000000000/** JNI code for Neuron.java C implementations of Java native methods */ #include <../../nrnconf.h> #include #include #include #include #include "ivoc.h" #include "nrnoc2iv.h" #include "parse.h" #include "ivocvect.h" #include "neuron_Neuron.h" // generated JNI Header file #include "njvm.h" // need nrnjava_env #include "njreg.h" // generated registration structure //via mk_njreg.sh from neuron_Neuron.h #include "neuron_Redirect.h" #include "njredirreg.h" char* nrn_dot2underbar(const char*); jobject nj_encapsulate(Object*); Object** nj_j2hObject(jobject, int); declarePtrList(NJSymList, Symbol) // implemented in nrnjava.cpp // list of cTemplate of java registered classes in id order. // this parallels the classList in Neuron.Java extern NJSymList* nrn_jclass_symlist; extern Symbol* nrn_jobj_sym; extern Symbol* nrn_vec_sym; //implemented in src/ivoc/pwman.cpp void* nrnjava_pwm_listen(const char*, Object*); void nrnjava_pwm_event(size_t, int, int, int, int, int); extern "C" { /** Create a hoc class from a java one @param classindex : +ve id for class (0,1, ...) */ Symbol* java2nrn_class(const char* classname, int classindex, const char* methods); extern double* hoc_varpointer; extern Symlist* hoc_top_level_symlist; extern Objectdata* hoc_top_level_data; double hoc_integer(double); Object* hoc_new_object(Symbol*, void*); Object* hoc_newobj1(Symbol*, int); #define call_ob_proc hoc_call_ob_proc Object** hoc_objpop(); char** hoc_strpop(); void hoc_tobj_unref(Object**); } /*** Explicit registration required ***/ // the class loader apparently doesn't fill in the slots except // when you dynamically load the native methods. void nrnjni_registration(jclass neuronCls) { int cnt; for (cnt=0; njreg_methods[cnt].name; ++cnt) {} nrnjava_env->RegisterNatives(neuronCls, njreg_methods, cnt); } void nrnjni_redirreg(jclass c) { int cnt; for (cnt=0; njredirreg_methods[cnt].name; ++cnt) {} nrnjava_env->RegisterNatives(c, njredirreg_methods, cnt); } static void illegalArg(JNIEnv* env, const char* s) { // env->ThrowNew(env->FindClass("java.lang.IllegalArgumentException"), s); } JNIEXPORT jstring JNICALL Java_neuron_Neuron_getHocStringArg( JNIEnv *env, jclass cls, jint idx) { char *str=""; if (!ifarg(idx)) { printf("error - missing string as arg %d\n", idx); illegalArg(env, "missing string"); return nil; } if (hoc_is_str_arg( idx )) { str = gargstr( idx ); } else { printf("error - expecting string as arg %d\n", idx); illegalArg(env, "expecting string"); return nil; } jstring ret = env->NewStringUTF( str ); return ret; } JNIEXPORT jdouble JNICALL Java_neuron_Neuron_getHocDoubleArg( JNIEnv *env, jclass cls, jint idx, jint type) { double ret; if (!ifarg(idx)) { printf("error - missing double as arg %d\n", idx); illegalArg(env, "missing double"); return (jdouble)-1.0E98; } if (hoc_is_double_arg( idx )) { ret = *(getarg( idx )); } else { printf("error - expecting double as arg %d\n", idx); illegalArg(env, "expecting double"); return (jdouble)-1.0E98; } if (type == 1) { ret = hoc_integer(ret); } return (jdouble)ret; } static jobject h2jObject(Object* o) { jobject jo; if (o == 0) { return 0; } hoc_obj_ref(o); // one of several possibilities here if (o->ctemplate->id < 0) { // a Java object jo = (jobject)o->u.this_pointer; }else if (o->ctemplate->sym == nrn_jobj_sym) { // an unregistered java object jo = (jobject)o->u.this_pointer; }else{ //encapsulate in HocObject, HocVector, etc. jo = nj_encapsulate(o); } return jo; } JNIEXPORT jobject JNICALL Java_neuron_Neuron_getHocObjectArg (JNIEnv *env, jclass cl, jint i, jthrowable e) { jobject ret; //printf("getHocObjArg %s %ld\n", hoc_object_name(o), (long)o); if (!ifarg(i)) { printf("error - missing Object as arg %d\n", i); illegalArg(env, "missing Object"); return e; } if (hoc_is_object_arg(i)) { Object* o = *hoc_objgetarg(i); ret = h2jObject(o); }else if (hoc_is_str_arg(i)) { //encapsulate in String char* s = gargstr(i); ret = Java_neuron_Neuron_getHocStringArg(env, cl, i); }else{ printf("error - expecting Object or strdef as arg %d\n", i); illegalArg(env, "expecting Object or strdef"); ret = e; } return ret; } JNIEXPORT void JNICALL Java_neuron_Neuron_hocObjectUnref (JNIEnv *, jclass, jlong i) { Object* o = (Object*)i; //printf("hocObjectUnref %d %s\n", (long)i, hoc_object_name(o)); hoc_obj_unref(o); } JNIEXPORT jlong JNICALL Java_neuron_Neuron_getVarPointer (JNIEnv *, jclass) { // there must have been a prior call to hoc_pointer_(&varname) //printf("getVarPointer %ld\n", (long)hoc_varpointer); return (jlong)hoc_varpointer; } JNIEXPORT jdouble JNICALL Java_neuron_Neuron_getVal (JNIEnv *, jclass, jlong p){ double* pd = (double*)p; return (jdouble)(*pd); } JNIEXPORT void JNICALL Java_neuron_Neuron_setVal (JNIEnv *, jclass, jlong p, jdouble d) { double* pd = (double*)p; *pd = d; } JNIEXPORT void JNICALL Java_neuron_Neuron_java2nrnClass( JNIEnv *env, jclass cls, jstring classname, jint classindex, jstring methods ) { const char *cn = env->GetStringUTFChars( classname,0 ); const char *m = env->GetStringUTFChars( methods,0 ); char* mangled = nrn_dot2underbar(cn); env->ReleaseStringUTFChars(classname, cn); // printf("class %s methods\n%s\n", mangled, m); Symbol* s = java2nrn_class(mangled, (int) classindex, m); nrn_jclass_symlist->append(s); delete [] mangled; env->ReleaseStringUTFChars(methods, m); } // Call a hoc method JNIEXPORT jboolean JNICALL Java_neuron_Neuron_execute ( JNIEnv *env, jclass, jstring statement) { // assert(env == nrnjava_env); jnisave const char* s = env->GetStringUTFChars(statement,0); jboolean r = Oc::valid_stmt(s, 0); env->ReleaseStringUTFChars(statement, s); jnirestore return r; } JNIEXPORT jint JNICALL Java_neuron_Neuron_getHocArgType (JNIEnv *env, jclass, jint i) { int type = hoc_argtype(i+1); switch (type) { case NUMBER: return 1; case STRING: return 2; case OBJECTVAR: case OBJECTTMP: return 3; } return 0; } JNIEXPORT jstring JNICALL Java_neuron_Neuron_getHocArgSig (JNIEnv *env, jclass) { char sig[100]; int i; for (i = 0; ifarg(i+1); ++i) { int type = hoc_argtype(i+1); switch (type) { case NUMBER: sig[i] = 'd'; break; case STRING: sig[i] = 'S'; break; case OBJECTVAR: case OBJECTTMP: sig[i] = 'o'; break; } } sig[i] = '\0'; // printf("getHocArgSig |%s|\n", sig); return env->NewStringUTF(sig); } JNIEXPORT jlong JNICALL Java_neuron_Neuron_vectorNew (JNIEnv *env, jclass, jint size){ jnisave Vect* v = vector_new1(size); Object* ho = hoc_new_object(nrn_vec_sym, v); hoc_obj_ref(ho); jlong jc = (jlong)ho; jnirestore return jc; } JNIEXPORT jint JNICALL Java_neuron_Neuron_vectorSize (JNIEnv *, jclass, jlong jc){ Object* ho = (Object*)jc; Vect* vec = (Vect*)ho->u.this_pointer; return vec->capacity(); } static void outOfBounds(JNIEnv* env) { env->ThrowNew(env->FindClass("java.lang.IndexOutOfBoundsException"), "HocVector"); } JNIEXPORT void JNICALL Java_neuron_Neuron_vectorSet (JNIEnv *env, jclass, jlong jc, jint i, jdouble x) { Object* ho = (Object*)jc; Vect* vec = (Vect*)ho->u.this_pointer; if (i < 0 || i >= vec->capacity()) { printf("Neuron.vectorSet i=%d size=%d\n", i, vec->capacity()); outOfBounds(env); } vec->elem(i) = x; } JNIEXPORT jdouble JNICALL Java_neuron_Neuron_vectorGet (JNIEnv *env, jclass, jlong jc, jint i){ Object* ho = (Object*)jc; Vect* vec = (Vect*)ho->u.this_pointer; if (i < 0 || i >= vec->capacity()) { printf("Neuron.vectorGet i=%d size=%d\n", i, vec->capacity()); outOfBounds(env); } return vec->elem(i); } JNIEXPORT void JNICALL Java_neuron_Neuron_vectorToHoc (JNIEnv *env, jclass, jlong jc, jdoubleArray ja, jint size) { Object* ho = (Object*)jc; Vect* vec = (Vect*)ho->u.this_pointer; vector_resize(vec, size); env->GetDoubleArrayRegion(ja, 0, size, &vec->elem(0)); } JNIEXPORT jdoubleArray JNICALL Java_neuron_Neuron_vectorFromHoc (JNIEnv *env, jclass, jlong jc) { Object* ho = (Object*)jc; Vect* vec = (Vect*)ho->u.this_pointer; jint size = vec->capacity(); jdoubleArray ja = env->NewDoubleArray(size); env->SetDoubleArrayRegion(ja, 0, size, &vec->elem(0)); return ja; } JNIEXPORT jlong JNICALL Java_neuron_Neuron_cppPointer (JNIEnv *, jclass, jlong jc) { Object* ho = (Object*)jc; if (ho->ctemplate->sym->subtype == CPLUSOBJECT) { return (jlong)ho->u.this_pointer; }else{ return 0; } } JNIEXPORT jstring JNICALL Java_neuron_Neuron_hocObjectName (JNIEnv *env, jclass, jlong jc) { Object* ho = (Object*)jc; char* s = hoc_object_name(ho); jstring js = env->NewStringUTF(s); return js; } JNIEXPORT jlong JNICALL Java_neuron_Neuron_getNewHObject (JNIEnv *env, jclass, jstring name, jint narg){ jnisave const char* cn = env->GetStringUTFChars(name, 0); // Symbol* s = hoc_table_lookup(cn, hoc_top_level_symlist); Symbol* s = hoc_lookup(cn); if (!s || s->type != TEMPLATE) { printf("getNewHObject could not lookup %s or it is not a template.\n", cn); return 0; } env->ReleaseStringUTFChars(name, cn); Object* o = hoc_newobj1(s, narg); hoc_obj_ref(o); jnirestore return (jlong)o; } JNIEXPORT jdouble JNICALL Java_neuron_Neuron_hDoubleMethod__Ljava_lang_String_2I (JNIEnv *env, jclass, jstring name, jint narg) { jnisave const char* cn = env->GetStringUTFChars(name, 0); Symbol* sym = hoc_lookup(cn); env->ReleaseStringUTFChars(name, cn); jnirestore return hoc_call_func(sym, narg); } JNIEXPORT jdouble JNICALL Java_neuron_Neuron_hDoubleMethod__JJI (JNIEnv *env, jclass, jlong jc, jlong mid, jint narg){ jnisave Object* ho = (Object*)jc; Symbol* s = (Symbol*)mid; //printf("hDoubleMethod %s.%s with %d args\n", hoc_object_name(ho), s->name, narg); call_ob_proc(ho, s, narg); jnirestore return hoc_xpop(); } JNIEXPORT jstring JNICALL Java_neuron_Neuron_hCharsMethod (JNIEnv *env, jclass, jlong jc, jlong mid, jint narg){ jnisave Object* ho = (Object*)jc; Symbol* sym = (Symbol*)mid; call_ob_proc(ho, sym, narg); char* s = *hoc_strpop(); jstring js = env->NewStringUTF(s); jnirestore return js; } JNIEXPORT jobject JNICALL Java_neuron_Neuron_hObjectMethod (JNIEnv *env, jclass, jlong jc, jlong mid, jint narg){ jnisave Object* ho = (Object*)jc; Symbol* s = (Symbol*)mid; call_ob_proc(ho, s, narg); Object** po = hoc_objpop(); jobject jo = h2jObject(*po); hoc_tobj_unref(po); // o may need to get it's refcount decremented here. jnirestore return jo; } JNIEXPORT void JNICALL Java_neuron_Neuron_pushArgD (JNIEnv *, jclass, jdouble x){ //printf("pushArgD %g\n", x); hoc_pushx(x); } JNIEXPORT void JNICALL Java_neuron_Neuron_pushArgS (JNIEnv *env, jclass, jstring js){ // see java2nrn_smeth for a similar implementation // hopefully 20 is sufficient before a string is freed. // perhaps a more general implementation is needed. // It would be safe to free these when the corresponding // hCharsMethod call returns. static char** cs; static int i; #define ncs 20 const char* jc = env->GetStringUTFChars(js, 0); if (!cs) { cs = new char*[ncs]; for (i=0; i < ncs; ++i) { cs[i] = nil; } i = 0; } if (cs[i]) { delete [] cs[i]; } i = (i+1)%ncs; cs[i] = new char[strlen(jc + 1)]; strcpy(cs[i], jc); hoc_pushstr(cs + i); //printf("pushArgS |%s|\n", cs[i]); env->ReleaseStringUTFChars(js, jc); } JNIEXPORT void JNICALL Java_neuron_Neuron_pushArgO (JNIEnv *env, jclass, jobject jo, jint type){ jnisave //printf("pushArgO jo=%p type=%d\n", jo, type); Object** po = nj_j2hObject(jo, type); if (!po) { printf("Do not recognize the object argument type %d\n", type); } hoc_pushobj(po); //printf("pushArgO %s refcount=%d\n", hoc_object_name(*po), (*po)->refcount); jnirestore } JNIEXPORT jlong JNICALL Java_neuron_Neuron_methodID (JNIEnv *env, jclass, jlong jc, jstring name){ const char* s = env->GetStringUTFChars(name, 0); Object* ho = (Object*)jc; Symbol* sym = hoc_table_lookup(s, ho->ctemplate->symtable); //printf("methodID %s %s\n", s, sym->name); env->ReleaseStringUTFChars(name, s); return (jlong)sym; } JNIEXPORT jlong JNICALL Java_neuron_Neuron_pwmListen (JNIEnv *env, jclass, jstring title, jobject jo, jint type) { Object** po = nj_j2hObject(jo, type); Object* ho = po ? *po : nil; jnisave const char* s = env->GetStringUTFChars(title, 0); // printf("pwmListen env=%ld %s\n", (long)env, s); jlong ic = (jlong)nrnjava_pwm_listen(s, ho); // implementation in src/ivoc/pwman.cpp env->ReleaseStringUTFChars(title, s); jnirestore return ic; } JNIEXPORT void JNICALL Java_neuron_Neuron_pwmEvent (JNIEnv *env, jclass, jlong jwc, jint type, jint l, jint t, jint w, jint h) { jnisave // printf("pwmEvent env=%d type=%d l=%d t=%d w=%d h=%d\n", //(long)env, type, l, t, w, h); nrnjava_pwm_event(jwc, type, l, t, w, h); // see src/ivoc/pwman.cpp jnirestore } JNIEXPORT jstring JNICALL Java_neuron_Neuron_sGet (JNIEnv *env, jclass, jstring js){ const char* s = env->GetStringUTFChars(js, 0); Symbol* sym = hoc_table_lookup(s, hoc_top_level_symlist); assert(sym && sym->type == STRING); char** sval = hoc_top_level_data[sym->u.oboff].ppstr; env->ReleaseStringUTFChars(js, s); return env->NewStringUTF(*sval); } JNIEXPORT jobject JNICALL Java_neuron_Neuron_oGet (JNIEnv *env, jclass, jstring js){ const char* s = env->GetStringUTFChars(js, 0); Symbol* sym = hoc_table_lookup(s, hoc_top_level_symlist); assert(sym && sym->type == OBJECTVAR); Object** po = hoc_top_level_data[sym->u.oboff].pobj; env->ReleaseStringUTFChars(js, s); jobject jo = h2jObject(*po); hoc_obj_unref(*po); return jo; } JNIEXPORT jstring JNICALL Java_neuron_Neuron_hGetStringField (JNIEnv *env, jclass, jlong v, jstring js){ const char* s = env->GetStringUTFChars(js, 0); Object* o = (Object*)v; Symbol* sym = hoc_table_lookup(s, o->ctemplate->symtable); assert(sym && sym->type == STRING); char** sval = hoc_top_level_data[sym->u.oboff].ppstr; env->ReleaseStringUTFChars(js, s); return env->NewStringUTF(*sval); } JNIEXPORT jobject JNICALL Java_neuron_Neuron_hGetObjectField (JNIEnv *env, jclass, jlong v, jstring js){ const char* s = env->GetStringUTFChars(js, 0); Object* o = (Object*)v; Symbol* sym = hoc_table_lookup(s, o->ctemplate->symtable); assert(sym && sym->type == OBJECTVAR); Object** po = o->u.dataspace[sym->u.oboff].pobj; env->ReleaseStringUTFChars(js, s); jobject jo = h2jObject(*po); hoc_obj_unref(*po); return jo; } JNIEXPORT void JNICALL Java_neuron_Neuron_hSetObjectField__JLjava_lang_String_2Ljava_lang_Object_2I (JNIEnv *env, jclass, jlong v, jstring js, jobject joval, jint type){ jnisave const char* s = env->GetStringUTFChars(js, 0); Object* o = (Object*)v; Symbol* sym = hoc_table_lookup(s, o->ctemplate->symtable); assert(sym && sym->type == OBJECTVAR); Object** po = o->u.dataspace[sym->u.oboff].pobj; Object** poval = nj_j2hObject(joval, type); Object* old = *po; *po = *poval; (*po)->refcount++; hoc_obj_unref(old); env->ReleaseStringUTFChars(js, s); jnirestore } JNIEXPORT void JNICALL Java_neuron_Neuron_hSetObjectField__Ljava_lang_String_2Ljava_lang_Object_2I (JNIEnv *env, jclass, jstring js, jobject joval, jint type){ jnisave const char* s = env->GetStringUTFChars(js, 0); Symbol* sym = hoc_table_lookup(s, hoc_top_level_symlist); assert(sym && sym->type == OBJECTVAR); Object** po = hoc_top_level_data[sym->u.oboff].pobj; Object** poval = nj_j2hObject(joval, type); Object* old = *po; *po = *poval; (*po)->refcount++; hoc_obj_unref(old); env->ReleaseStringUTFChars(js, s); jnirestore } JNIEXPORT void JNICALL Java_neuron_Redirect_consoleWrite (JNIEnv *env, jclass, jint fd, jint b) { jnisave #ifdef _MSWIN if (b != '\r') { printf("%c", b); } #else #ifdef MAC if (b == '\r') { b = '\n'; } printf("%c", b); #else printf("%c", b); #endif #endif // if (fd == 1) { // fputc(b, stdout); // }else{ // fputc(b, stderr); // } jnirestore } neuron-7.5/src/nrnmpi/000077500000000000000000000000001323325274500147735ustar00rootroot00000000000000neuron-7.5/src/nrnmpi/Makefile.am000077500000000000000000000015111323325274500170300ustar00rootroot00000000000000lib_LTLIBRARIES = libnrnmpi.la nsrc=$(top_srcdir)/src includes = -I$(nsrc)/oc @NRN_REALTIME_INCLUDE@ -I@MUSIC_INCDIR@ AM_CFLAGS = @MINGW_CFLAG@ $(includes) libnrnmpi_la_SOURCES = nrnmpi.c bbsmpipack.c mpispike.c nrnrt.c CC = @MPICCnrnmpi@ if BUILD_NRNMPI_DYNAMIC #NEED_RTLD_GLOBAL = -L$(libdir) -loc -lnrniv # liboc.so and libnrnoc.so have not been installed yet. # need to rerun the make after that NEED_RTLD_GLOBAL= INC = nrnmpi_dynam.h nrnmpi_dynam_cinc nrnmpi_dynam_wrappers.inc $(INC): mkdynam.sh nrnmpidec.h (cd $(nsrc)/nrnmpi ; sh mkdynam.sh) $(libnrnmpi_la_OBJECTS): $(INC) all: $(nsrc)/nrnmpi/nrnmpi_dynam.h else NEED_RTLD_GLOBAL = endif libnrnmpi_la_LIBADD = @MUSIC_LIBLA@ $(NEED_RTLD_GLOBAL) EXTRA_DIST = nrnmpidec.h nrnmpi_impl.h mpispike.h notes_nrnrt \ mkdynam.sh nrnmpi_dynam.c nrnmpi_dynam_stubs.c nrnmpi_def_cinc neuron-7.5/src/nrnmpi/Makefile.in000066400000000000000000000614051323325274500170460ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/nrnmpi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libnrnmpi_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libnrnmpi_la_OBJECTS = nrnmpi.lo bbsmpipack.lo mpispike.lo nrnrt.lo libnrnmpi_la_OBJECTS = $(am_libnrnmpi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libnrnmpi_la_SOURCES) DIST_SOURCES = $(libnrnmpi_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @MPICCnrnmpi@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libnrnmpi.la nsrc = $(top_srcdir)/src includes = -I$(nsrc)/oc @NRN_REALTIME_INCLUDE@ -I@MUSIC_INCDIR@ AM_CFLAGS = @MINGW_CFLAG@ $(includes) libnrnmpi_la_SOURCES = nrnmpi.c bbsmpipack.c mpispike.c nrnrt.c @BUILD_NRNMPI_DYNAMIC_FALSE@NEED_RTLD_GLOBAL = #NEED_RTLD_GLOBAL = -L$(libdir) -loc -lnrniv # liboc.so and libnrnoc.so have not been installed yet. # need to rerun the make after that @BUILD_NRNMPI_DYNAMIC_TRUE@NEED_RTLD_GLOBAL = @BUILD_NRNMPI_DYNAMIC_TRUE@INC = nrnmpi_dynam.h nrnmpi_dynam_cinc nrnmpi_dynam_wrappers.inc libnrnmpi_la_LIBADD = @MUSIC_LIBLA@ $(NEED_RTLD_GLOBAL) EXTRA_DIST = nrnmpidec.h nrnmpi_impl.h mpispike.h notes_nrnrt \ mkdynam.sh nrnmpi_dynam.c nrnmpi_dynam_stubs.c nrnmpi_def_cinc all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrnmpi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrnmpi/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libnrnmpi.la: $(libnrnmpi_la_OBJECTS) $(libnrnmpi_la_DEPENDENCIES) $(EXTRA_libnrnmpi_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libnrnmpi_la_OBJECTS) $(libnrnmpi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbsmpipack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpispike.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnmpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnrt.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile @BUILD_NRNMPI_DYNAMIC_TRUE@$(INC): mkdynam.sh nrnmpidec.h @BUILD_NRNMPI_DYNAMIC_TRUE@ (cd $(nsrc)/nrnmpi ; sh mkdynam.sh) @BUILD_NRNMPI_DYNAMIC_TRUE@$(libnrnmpi_la_OBJECTS): $(INC) @BUILD_NRNMPI_DYNAMIC_TRUE@all: $(nsrc)/nrnmpi/nrnmpi_dynam.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrnmpi/bbsmpipack.c000077500000000000000000000247541323325274500172710ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include /* do not want the redef in the dynamic load case */ #include #if NRNMPI_DYNAMICLOAD #include #endif #include #if NRNMPI #if HAVE_STRING_H #include #endif #include #include #include #include #include #include #define nrnmpidebugleak 0 #define debug 0 extern MPI_Comm nrn_bbs_comm; #if nrnmpidebugleak static int nrnmpi_bufcnt_; #endif /* we want to find the key easily and I am assuming that all MPI implementations allow one to start unpacking from a particular position. Therefore we give space for the key position at the beginning and an int always takes up the same space at position 0. Now I regret not forcing the key to come first at the user level. */ #define my_MPI_INT 0 #define my_MPI_DOUBLE 1 #define my_MPI_CHAR 2 #define my_MPI_PACKED 3 #define my_MPI_PICKLE 4 static MPI_Datatype mytypes[] = {MPI_INT, MPI_DOUBLE, MPI_CHAR, MPI_PACKED, MPI_CHAR}; static void unpack(void* buf, int count, int my_datatype, bbsmpibuf* r, const char* errmes) { int type[2]; assert(r && r->buf); #if debug printf("%d unpack upkpos=%d pkposition=%d keypos=%d size=%d\n", nrnmpi_myid_bbs, r->upkpos, r->pkposition, r->keypos, r->size); #endif assert(r->upkpos >= 0 && r->size >= r->upkpos); MPI_Unpack(r->buf, r->size, &r->upkpos, type, 2, MPI_INT, nrn_bbs_comm); #if debug printf("%d unpack r=%p size=%d upkpos=%d type[0]=%d datatype=%d type[1]=%d count=%d\n", nrnmpi_myid_bbs, r, r->size, r->upkpos, type[0], my_datatype, type[1], count); #endif if (type[0] != my_datatype || type[1] != count) { printf("%d unpack size=%d upkpos=%d type[0]=%d datatype=%d type[1]=%d count=%d\n", nrnmpi_myid_bbs, r->size, r->upkpos, type[0], my_datatype, type[1], count); } assert(type[0] == my_datatype); assert(type[1] == count); MPI_Unpack(r->buf, r->size, &r->upkpos, buf, count, mytypes[my_datatype], nrn_bbs_comm); } void nrnmpi_upkbegin(bbsmpibuf* r) { int type; int p; #if debug printf("%d nrnmpi_upkbegin %p (preunpack upkpos=%d keypos=%d)\n", nrnmpi_myid_bbs, r, r->upkpos, r->keypos); #endif assert(r && r->buf && r->size > 0); if (nrnmpi_myid_bbs == -1) { hoc_execerror("subworld process with nhost > 0 cannot use", "the bulletin board"); } r->upkpos = 0; MPI_Unpack(r->buf, r->size, &r->upkpos, &p, 1, MPI_INT, nrn_bbs_comm); if (p > r->size) { printf("\n %d nrnmpi_upkbegin keypos=%d size=%d\n", nrnmpi_myid_bbs, p, r->size); } assert(p <= r->size); MPI_Unpack(r->buf, r->size, &p, &type, 1, MPI_INT, nrn_bbs_comm); #if debug printf("%d nrnmpi_upkbegin type=%d keypos=%d\n", nrnmpi_myid_bbs, type, p); #endif assert(type == 0); r->keypos = p; } char* nrnmpi_getkey(bbsmpibuf* r) { char* s; int type; type = r->upkpos; r->upkpos = r->keypos; #if debug printf("%d nrnmpi_getkey %p keypos=%d\n", nrnmpi_myid_bbs, r, r->keypos); #endif s = nrnmpi_upkstr(r); assert(r->pkposition == 0 || r->pkposition == r->upkpos); r->pkposition = r->upkpos; r->upkpos = type; #if debug printf("getkey return %s\n", s); #endif return s; } int nrnmpi_getid(bbsmpibuf* r) { int i, type; type = r->upkpos; r->upkpos = r->keypos; #if debug printf("%d nrnmpi_getid %p keypos=%d\n", nrnmpi_myid_bbs, r, r->keypos); #endif i = nrnmpi_upkint(r); r->upkpos = type; #if debug printf("getid return %d\n", i); #endif return i; } int nrnmpi_upkint(bbsmpibuf* r) { int i; unpack(&i, 1, my_MPI_INT, r, "upkint"); return i; } double nrnmpi_upkdouble(bbsmpibuf* r) { double x; unpack(&x, 1, my_MPI_DOUBLE, r, "upkdouble"); return x; } void nrnmpi_upkvec(int n, double* x, bbsmpibuf* r) { unpack(x, n, my_MPI_DOUBLE, r, "upkvec"); } char* nrnmpi_upkstr(bbsmpibuf* r) { int len; char* s; unpack(&len, 1, my_MPI_INT, r, "upkstr length"); s = cxx_char_alloc(len+1); /* will be delete not free */ unpack(s, len, my_MPI_CHAR, r, "upkstr string"); s[len] = '\0'; return s; } char* nrnmpi_upkpickle(size_t* size, bbsmpibuf* r) { int len; char* s; unpack(&len, 1, my_MPI_INT, r, "upkpickle length"); *size = len; s = cxx_char_alloc(len + 1); /* will be delete, not free */ unpack(s, len, my_MPI_PICKLE, r, "upkpickle data"); return s; } static void resize(bbsmpibuf* r, int size) { int newsize; if (r->size < size) { newsize = (size/64)*64 + 128; r->buf = hoc_Erealloc(r->buf, newsize); hoc_malchk(); r->size = newsize; } } void nrnmpi_pkbegin(bbsmpibuf* r) { int type; if (nrnmpi_myid_bbs == -1) { hoc_execerror("subworld process with nhost > 0 cannot use", "the bulletin board"); } r->pkposition = 0; type = 0; #if debug printf("%d nrnmpi_pkbegin %p size=%d pkposition=%d\n", nrnmpi_myid_bbs, r, r->size, r->pkposition); #endif MPI_Pack(&type, 1, MPI_INT, r->buf, r->size, &r->pkposition, nrn_bbs_comm); } void nrnmpi_enddata(bbsmpibuf* r) { int p, type, isize, oldsize; p = r->pkposition; type = 0; #if debug printf("%d nrnmpi_enddata %p size=%d pkposition=%d\n", nrnmpi_myid_bbs, r, r->size, p); #endif MPI_Pack_size(1, MPI_INT, nrn_bbs_comm, &isize); oldsize = r->size; resize(r, r->pkposition + isize); #if debug if (oldsize < r->pkposition + isize) { printf("%d %p need %d more. end up with total of %d\n", nrnmpi_myid_bbs, r, isize, r->size); } #endif MPI_Pack(&type, 1, MPI_INT, r->buf, r->size, &r->pkposition, nrn_bbs_comm); #if debug printf("%d nrnmpi_enddata buf=%p size=%d pkposition=%d\n", nrnmpi_myid_bbs, r->buf, r->size, r->pkposition); #endif MPI_Pack(&p, 1, MPI_INT, r->buf, r->size, &type, nrn_bbs_comm); #if debug printf("%d after nrnmpi_enddata, %d was packed at beginning and 0 was packed before %d\n", nrnmpi_myid_bbs, p, r->pkposition); #endif } static void pack(void* inbuf, int incount, int my_datatype, bbsmpibuf* r, const char* e) { int type[2]; int dsize, isize, oldsize; #if debug printf("%d pack %p count=%d type=%d outbuf-%p pkposition=%d %s\n", nrnmpi_myid_bbs, r, incount, my_datatype, r->buf, r->pkposition, e); #endif MPI_Pack_size(incount, mytypes[my_datatype], nrn_bbs_comm, &dsize); MPI_Pack_size(2, MPI_INT, nrn_bbs_comm, &isize); oldsize = r->size; resize(r, r->pkposition + dsize + isize); #if debug if (oldsize < r->pkposition + dsize + isize) { printf("%d %p need %d more. end up with total of %d\n", nrnmpi_myid_bbs, r, dsize+isize, r->size); } #endif type[0] = my_datatype; type[1] = incount; MPI_Pack(type, 2, MPI_INT, r->buf, r->size, &r->pkposition, nrn_bbs_comm); MPI_Pack(inbuf, incount, mytypes[my_datatype], r->buf, r->size, &r->pkposition, nrn_bbs_comm); #if debug printf("%d pack done pkposition=%d\n", nrnmpi_myid_bbs, r->pkposition); #endif } void nrnmpi_pkint(int i, bbsmpibuf* r) { int ii; ii = i; pack(&ii, 1, my_MPI_INT, r, "pkint"); } void nrnmpi_pkdouble(double x, bbsmpibuf* r) { double xx; xx = x; pack(&xx, 1, my_MPI_DOUBLE, r, "pkdouble"); } void nrnmpi_pkvec(int n, double* x, bbsmpibuf* r) { pack(x, n, my_MPI_DOUBLE, r, "pkvec"); } void nrnmpi_pkstr(const char* s, bbsmpibuf* r) { int len; len = strlen(s); pack(&len, 1, my_MPI_INT, r, "pkstr length"); pack((char*)s, len, my_MPI_CHAR, r, "pkstr string"); } void nrnmpi_pkpickle(const char* s, size_t size, bbsmpibuf* r) { int len = size; pack(&len, 1, my_MPI_INT, r, "pkpickle length"); pack((char*)s, len, my_MPI_PICKLE, r, "pkpickle data"); } void nrnmpi_bbssend(int dest, int tag, bbsmpibuf* r) { #if debug printf("%d nrnmpi_bbssend %p dest=%d tag=%d size=%d\n", nrnmpi_myid_bbs, r, dest, tag, (r)?r->size:0); #endif if (r) { assert( r->buf && r->keypos <= r->size); MPI_Send(r->buf, r->size, MPI_PACKED, dest, tag, nrn_bbs_comm); }else{ MPI_Send(NULL, 0, MPI_PACKED, dest, tag, nrn_bbs_comm); } errno = 0; #if debug printf("%d return from send\n", nrnmpi_myid_bbs); #endif } int nrnmpi_bbsrecv(int source, bbsmpibuf* r) { MPI_Status status; int size; if (source == -1) { source = MPI_ANY_SOURCE; } #if debug printf("%d nrnmpi_bbsrecv %p\n", nrnmpi_myid_bbs, r); #endif MPI_Probe(source, MPI_ANY_TAG, nrn_bbs_comm, &status); MPI_Get_count(&status, MPI_PACKED, &size); #if debug printf("%d nrnmpi_bbsrecv probe size=%d source=%d tag=%d\n", nrnmpi_myid_bbs, size, status.MPI_SOURCE, status.MPI_TAG); #endif resize(r, size); MPI_Recv(r->buf, r->size, MPI_PACKED, source, MPI_ANY_TAG, nrn_bbs_comm, &status); errno = 0; return status.MPI_TAG; } int nrnmpi_bbssendrecv(int dest, int tag, bbsmpibuf* s, bbsmpibuf* r) { int size, itag, source; int msgtag; MPI_Status status; #if debug printf("%d nrnmpi_bbssendrecv dest=%d tag=%d\n", nrnmpi_myid_bbs, dest, tag); #endif if (!nrnmpi_iprobe(&size, &itag, &source) || source != dest) { #if debug printf("%d nrnmpi_bbssendrecv nothing available so send\n", nrnmpi_myid_bbs); #endif nrnmpi_bbssend(dest, tag, s); } return nrnmpi_bbsrecv(dest, r); } int nrnmpi_iprobe(int* size, int* tag, int* source) { int flag = 0; MPI_Status status; MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, nrn_bbs_comm, &flag, &status); if (flag) { if (source) *source = status.MPI_SOURCE; if (tag) *tag = status.MPI_TAG; if (size) MPI_Get_count(&status, MPI_PACKED, size); } return flag; } void nrnmpi_probe(int* size, int* tag, int* source) { int flag = 0; MPI_Status status; MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, nrn_bbs_comm, &status); if (source) *source = status.MPI_SOURCE; if (tag) *tag = status.MPI_TAG; if (size) MPI_Get_count(&status, MPI_PACKED, size); } bbsmpibuf* nrnmpi_newbuf(int size) { bbsmpibuf* buf; buf = (bbsmpibuf*)hoc_Emalloc(sizeof(bbsmpibuf)); hoc_malchk(); #if debug printf("%d nrnmpi_newbuf %p\n", nrnmpi_myid_bbs, buf); #endif buf->buf = (char*)0; if (size > 0) { buf->buf = (char*)hoc_Emalloc(size*sizeof(char)) ; hoc_malchk(); } buf->size = size; buf->pkposition = 0; buf->upkpos = 0; buf->keypos = 0; buf->refcount = 0; #if nrnmpidebugleak ++nrnmpi_bufcnt_; #endif return buf; } void nrnmpi_copy(bbsmpibuf* dest, bbsmpibuf* src){ int i; resize(dest, src->size); for (i=0; i < src->size; ++i) { dest->buf[i] = src->buf[i]; } dest->pkposition = src->pkposition; dest->upkpos = src->upkpos; dest->keypos = src->keypos; } static void nrnmpi_free(bbsmpibuf* buf){ #if debug printf("%d nrnmpi_free %p\n", nrnmpi_myid_bbs, buf); #endif if (buf->buf) { free(buf->buf); } free(buf); #if nrnmpidebugleak --nrnmpi_bufcnt_; #endif } void nrnmpi_ref(bbsmpibuf* buf) { assert(buf); buf->refcount += 1; } void nrnmpi_unref(bbsmpibuf* buf) { if (buf) { --buf->refcount; if (buf->refcount <= 0) { nrnmpi_free(buf); } } } #if nrnmpidebugleak void nrnmpi_checkbufleak() { if (nrnmpi_bufcnt_ > 0) { printf("%d nrnmpi_bufcnt=%d\n", nrnmpi_myid_bbs, nrnmpi_bufcnt_); } } #endif #endif /*NRNMPI*/ neuron-7.5/src/nrnmpi/mkdynam.sh000066400000000000000000000024551323325274500167750ustar00rootroot00000000000000#!/bin/sh names=`sed -n ' /extern /s/extern [a-z*]* \(nrnmpi_[a-zA-Z0-9_]*\)(.*);/\1/p /BGPDMA/s/.*/BGPDMA/p $s/.*/ENDIF/p ' nrnmpidec.h` #generate nrnmpi_dynam_wrappers.inc sed -n ' /extern void/s/extern \(void\) \(nrnmpi_[a-zA-Z0-9_]*\)\(.*\);/\1 \2\3 {@ (*p_\2)\3;@}/p /extern [^v]/s/extern \([a-z*]*\) \(nrnmpi_[a-zA-Z0-9_]*\)\(.*\);/\1 \2\3 {@ return (*p_\2)\3;@}/p /BGPDMA/p $p ' nrnmpidec.h | tr '@' '\n' | sed ' /p_nrnmpi/ { s/, [a-zA-Z0-9_*]* /, /g s/)([a-zA-Z_0-9*]* /)(/ s/char\* //g } '> nrnmpi_dynam_wrappers.inc #generate nrnmpi_dynam.h ( echo ' #ifndef nrnmpi_dynam_h #define nrnmpi_dynam_h /* generated by mkdynam.sh */ #if NRNMPI_DYNAMICLOAD ' for i in $names ; do if test "$i" = "BGPDMA" ; then echo "#if BGPDMA" elif test "$i" = "ENDIF" ; then echo "#endif" else echo "#define $i f_$i" fi done echo ' #endif /* NRNMPI_DYNAMICLOAD */ #endif ' ) > nrnmpi_dynam.h #generate nrnmpi_dynam_cinc ( sed -n ' /extern/s/extern \([a-z*]*\) \(nrnmpi_[a-zA-Z0-9_]*\)\(.*\);/static \1 (*p_\2)\3;/p /BGPDMA/p $p ' nrnmpidec.h echo ' static struct { char* name; void** ppf; }ftable[] = {' for i in $names ; do if test "$i" = "BGPDMA" ; then echo "#if BGPDMA" elif test "$i" = "ENDIF" ; then echo "#endif" else echo " \"f_$i\", (void**)&p_$i," fi done echo ' 0,0 }; ' ) > nrnmpi_dynam_cinc neuron-7.5/src/nrnmpi/mpispike.c000066400000000000000000000331001323325274500167550ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include /* do not want the redef in the dynamic load case */ #include #if NRNMPI_DYNAMICLOAD #include #endif #include #include #if NRNMPI #include "nrnmpidec.h" #include "nrnmpi_impl.h" #include "mpispike.h" #include extern void nrnbbs_context_wait(); static int np; static int* displs; static int* byteovfl; /* for the compressed transfer method */ static MPI_Datatype spike_type; static void pgvts_op(double* in, double* inout, int* len, MPI_Datatype* dptr); static MPI_Op mpi_pgvts_op; static void make_spike_type() { NRNMPI_Spike s; int block_lengths[2]; MPI_Aint displacements[2]; MPI_Aint addresses[3]; MPI_Datatype typelist[2]; typelist[0] = MPI_INT; typelist[1] = MPI_DOUBLE; block_lengths[0] = block_lengths[1] = 1; MPI_Get_address(&s, &addresses[0]); MPI_Get_address(&(s.gid), &addresses[1]); MPI_Get_address(&(s.spiketime), &addresses[2]); displacements[0] = addresses[1] - addresses[0]; displacements[1] = addresses[2] - addresses[0]; MPI_Type_create_struct(2, block_lengths, displacements, typelist, &spike_type); MPI_Type_commit(&spike_type); MPI_Op_create((MPI_User_function*)pgvts_op, 1, &mpi_pgvts_op); } void nrnmpi_spike_initialize() { make_spike_type(); } #if nrn_spikebuf_size > 0 static MPI_Datatype spikebuf_type; static void make_spikebuf_type() { NRNMPI_Spikebuf s; int block_lengths[3]; MPI_Aint displacements[3]; MPI_Aint addresses[4]; MPI_Datatype typelist[3]; typelist[0] = MPI_INT; typelist[1] = MPI_INT; typelist[2] = MPI_DOUBLE; block_lengths[0] = 1; block_lengths[1] = nrn_spikebuf_size; block_lengths[2] = nrn_spikebuf_size; MPI_Address(&s, &addresses[0]); MPI_Address(&(s.nspike), &addresses[1]); MPI_Address(&(s.gid[0]), &addresses[2]); MPI_Address(&(s.spiketime[0]), &addresses[3]); displacements[0] = addresses[1] - addresses[0]; displacements[1] = addresses[2] - addresses[0]; displacements[2] = addresses[3] - addresses[0]; MPI_Type_struct(3, block_lengths, displacements, typelist, &spikebuf_type); MPI_Type_commit(&spikebuf_type); } #endif int nrnmpi_spike_exchange() { int i, n, novfl, n1; if (!displs) { np = nrnmpi_numprocs; displs = (int*)hoc_Emalloc(np*sizeof(int)); hoc_malchk(); displs[0] = 0; #if nrn_spikebuf_size > 0 make_spikebuf_type(); #endif } nrnbbs_context_wait(); #if nrn_spikebuf_size == 0 MPI_Allgather(&nout_, 1, MPI_INT, nin_, 1, MPI_INT, nrnmpi_comm); n = nin_[0]; for (i=1; i < np; ++i) { displs[i] = n; n += nin_[i]; } if (n) { if (icapacity_ < n) { icapacity_ = n + 10; free(spikein_); spikein_ = (NRNMPI_Spike*)hoc_Emalloc(icapacity_ * sizeof(NRNMPI_Spike)); hoc_malchk(); } MPI_Allgatherv(spikeout_, nout_, spike_type, spikein_, nin_, displs, spike_type, nrnmpi_comm); } #else MPI_Allgather(spbufout_, 1, spikebuf_type, spbufin_, 1, spikebuf_type, nrnmpi_comm); novfl = 0; n = spbufin_[0].nspike; if (n > nrn_spikebuf_size) { nin_[0] = n - nrn_spikebuf_size; novfl += nin_[0]; }else{ nin_[0] = 0; } for (i=1; i < np; ++i) { displs[i] = novfl; n1 = spbufin_[i].nspike; n += n1; if (n1 > nrn_spikebuf_size) { nin_[i] = n1 - nrn_spikebuf_size; novfl += nin_[i]; }else{ nin_[i] = 0; } } if (novfl) { if (icapacity_ < novfl) { icapacity_ = novfl + 10; free(spikein_); spikein_ = (NRNMPI_Spike*)hoc_Emalloc(icapacity_ * sizeof(NRNMPI_Spike)); hoc_malchk(); } n1 = (nout_ > nrn_spikebuf_size) ? nout_ - nrn_spikebuf_size : 0; MPI_Allgatherv(spikeout_, n1, spike_type, spikein_, nin_, displs, spike_type, nrnmpi_comm); } ovfl_ = novfl; #endif return n; } /* The compressed spike format is restricted to the fixed step method and is a sequence of unsigned char. nspike = buf[0]*256 + buf[1] a sequence of spiketime, localgid pairs. There are nspike of them. spiketime is relative to the last transfer time in units of dt. note that this requires a mindelay < 256*dt. localgid is an unsigned int, unsigned short, or unsigned char in size depending on the range and thus takes 4, 2, or 1 byte respectively. To be machine independent we do our own byte coding. When the localgid range is smaller than the true gid range, the gid->PreSyn are remapped into hostid specific maps. If there are not many holes, i.e just about every spike from a source machine is delivered to some cell on a target machine, then instead of a hash map, a vector is used. The allgather sends the first part of the buf and the allgatherv buffer sends any overflow. */ int nrnmpi_spike_exchange_compressed() { int i, novfl, n, ntot, idx, bs, bstot; /* n is #spikes, bs is #byte overflow */ if (!displs) { np = nrnmpi_numprocs; displs = (int*)hoc_Emalloc(np*sizeof(int)); hoc_malchk(); displs[0] = 0; byteovfl = (int*)hoc_Emalloc(np*sizeof(int)); hoc_malchk(); } nrnbbs_context_wait(); MPI_Allgather(spfixout_, ag_send_size_, MPI_BYTE, spfixin_, ag_send_size_, MPI_BYTE, nrnmpi_comm); novfl = 0; ntot = 0; bstot = 0; for (i=0; i < np; ++i) { displs[i] = bstot; idx = i*ag_send_size_; n = spfixin_[idx++]*256; n += spfixin_[idx++]; ntot += n; nin_[i] = n; if (n > ag_send_nspike_) { bs = 2 + n*(1 + localgid_size_) - ag_send_size_; byteovfl[i] = bs; bstot += bs; novfl += n - ag_send_nspike_; }else{ byteovfl[i] = 0; } } if (novfl) { if (ovfl_capacity_ < novfl) { ovfl_capacity_ = novfl + 10; free(spfixin_ovfl_); spfixin_ovfl_ = (unsigned char*)hoc_Emalloc(ovfl_capacity_ * (1 + localgid_size_)*sizeof(unsigned char)); hoc_malchk(); } bs = byteovfl[nrnmpi_myid]; /* note that the spfixout_ buffer is one since the overflow is contiguous to the first part. But the spfixin_ovfl_ is completely separate from the spfixin_ since the latter dynamically changes its size during a run. */ MPI_Allgatherv(spfixout_ + ag_send_size_, bs, MPI_BYTE, spfixin_ovfl_, byteovfl, displs, MPI_BYTE, nrnmpi_comm); } ovfl_ = novfl; return ntot; } double nrnmpi_mindelay(double m) { double result; if (!nrnmpi_use) { return m; } nrnbbs_context_wait(); MPI_Allreduce(&m, &result, 1, MPI_DOUBLE, MPI_MIN, nrnmpi_comm); return result; } int nrnmpi_int_allmax(int x) { int result; if (nrnmpi_numprocs < 2) { return x; } nrnbbs_context_wait(); MPI_Allreduce(&x, &result, 1, MPI_INT, MPI_MAX, nrnmpi_comm); return result; } extern void nrnmpi_int_gather(int* s, int* r, int cnt, int root) { MPI_Gather(s, cnt, MPI_INT, r, cnt, MPI_INT, root, nrnmpi_comm); } extern void nrnmpi_int_gatherv(int* s, int scnt, int* r, int* rcnt, int* rdispl, int root) { MPI_Gatherv(s, scnt, MPI_INT, r, rcnt, rdispl, MPI_INT, root, nrnmpi_comm); } extern void nrnmpi_int_alltoall(int* s, int* r, int n) { MPI_Alltoall(s, n, MPI_INT, r, n, MPI_INT, nrnmpi_comm); } extern void nrnmpi_int_alltoallv(int* s, int* scnt, int* sdispl, int* r, int* rcnt, int* rdispl) { MPI_Alltoallv(s, scnt, sdispl, MPI_INT, r, rcnt, rdispl, MPI_INT, nrnmpi_comm); } extern void nrnmpi_long_alltoallv(int64_t* s, int* scnt, int* sdispl, int64_t* r, int* rcnt, int* rdispl) { MPI_Alltoallv(s, scnt, sdispl, MPI_LONG, r, rcnt, rdispl, MPI_LONG, nrnmpi_comm); } extern void nrnmpi_dbl_alltoallv(double* s, int* scnt, int* sdispl, double* r, int* rcnt, int* rdispl) { MPI_Alltoallv(s, scnt, sdispl, MPI_DOUBLE, r, rcnt, rdispl, MPI_DOUBLE, nrnmpi_comm); } extern void nrnmpi_char_alltoallv(char* s, int* scnt, int* sdispl, char* r, int* rcnt, int* rdispl) { MPI_Alltoallv(s, scnt, sdispl, MPI_CHAR, r, rcnt, rdispl, MPI_CHAR, nrnmpi_comm); } /* following are for the partrans */ void nrnmpi_int_allgather(int* s, int* r, int n) { MPI_Allgather(s, n, MPI_INT, r, n, MPI_INT, nrnmpi_comm); } void nrnmpi_int_allgatherv(int* s, int* r, int* n, int* dspl) { MPI_Allgatherv(s, n[nrnmpi_myid], MPI_INT, r, n, dspl, MPI_INT, nrnmpi_comm); } void nrnmpi_long_allgatherv(int64_t* s, int64_t* r, int* n, int* dspl) { MPI_Allgatherv(s, n[nrnmpi_myid], MPI_LONG, r, n, dspl, MPI_LONG, nrnmpi_comm); } void nrnmpi_dbl_allgatherv(double* s, double* r, int* n, int* dspl) { MPI_Allgatherv(s, n[nrnmpi_myid], MPI_DOUBLE, r, n, dspl, MPI_DOUBLE, nrnmpi_comm); } void nrnmpi_dbl_broadcast(double* buf, int cnt, int root) { MPI_Bcast(buf, cnt, MPI_DOUBLE, root, nrnmpi_comm); } void nrnmpi_int_broadcast(int* buf, int cnt, int root) { MPI_Bcast(buf, cnt, MPI_INT, root, nrnmpi_comm); } void nrnmpi_char_broadcast(char* buf, int cnt, int root) { MPI_Bcast(buf, cnt, MPI_CHAR, root, nrnmpi_comm); } int nrnmpi_int_sum_reduce(int in) { int result; MPI_Allreduce(&in, &result, 1, MPI_INT, MPI_SUM, nrnmpi_comm); return result; } void nrnmpi_assert_opstep(int opstep, double t) { /* all machines in comm should have same opstep and same t. */ double buf[2]; if (nrnmpi_numprocs < 2) { return; } buf[0] = (double)opstep; buf[1] = t; MPI_Bcast(buf, 2, MPI_DOUBLE, 0, nrnmpi_comm); if (opstep != (int)buf[0] || t != buf[1]) { printf("%d opstep=%d %d t=%g t-troot=%g\n", nrnmpi_myid, opstep, (int)buf[0], t, t-buf[1]); hoc_execerror("nrnmpi_assert_opstep failed", (char*)0); } } double nrnmpi_dbl_allmin(double x) { double result; if (nrnmpi_numprocs < 2) { return x; } MPI_Allreduce(&x, &result, 1, MPI_DOUBLE, MPI_MIN, nrnmpi_comm); return result; } static void pgvts_op(double* in, double* inout, int* len, MPI_Datatype* dptr){ int i, r=0; assert(*dptr == MPI_DOUBLE); assert(*len == 4); if (in[0] < inout[0]) { /* least time has highest priority */ r = 1; }else if (in[0] == inout[0]) { /* when times are equal then */ if (in[1] < inout[1]) { /* NetParEvent done last */ r = 1; }else if (in[1] == inout[1]) { /* when times and ops are equal then */ if (in[2] < inout[2]) { /* init done next to last.*/ r = 1; }else if (in[2] == inout[2]) { /* when times, ops, and inits are equal then */ if (in[3] < inout[3]) { /* choose lowest rank */ r = 1; } } } } if (r) { for (i=0; i < 4; ++i) { inout[i] = in[i]; } } } int nrnmpi_pgvts_least(double* t, int* op, int* init) { int i; double ibuf[4], obuf[4]; ibuf[0] = *t; ibuf[1] = (double)(*op); ibuf[2] = (double)(*init); ibuf[3] = (double)nrnmpi_myid; for (i=0; i < 4; ++i) { obuf[i] = ibuf[i]; } MPI_Allreduce(ibuf, obuf, 4, MPI_DOUBLE, mpi_pgvts_op, nrnmpi_comm); assert(obuf[0] <= *t); if (obuf[0] == *t) { assert((int)obuf[1] <= *op); if ((int)obuf[1] == *op) { assert((int)obuf[2] <= *init); if ((int)obuf[2] == *init) { assert((int)obuf[3] <= nrnmpi_myid); } } } *t = obuf[0]; *op = (int)obuf[1]; *init = (int)obuf[2]; if (nrnmpi_myid == (int)obuf[3]) { return 1; } return 0; } /* following for splitcell.cpp transfer */ void nrnmpi_send_doubles(double* pd, int cnt, int dest, int tag) { MPI_Send(pd, cnt, MPI_DOUBLE, dest, tag, nrnmpi_comm); } void nrnmpi_recv_doubles(double* pd, int cnt, int src, int tag) { MPI_Status status; MPI_Recv(pd, cnt, MPI_DOUBLE, src, tag, nrnmpi_comm, &status); } void nrnmpi_postrecv_doubles(double* pd, int cnt, int src, int tag, void** request) { MPI_Irecv(pd, cnt, MPI_DOUBLE, src, tag, nrnmpi_comm, (MPI_Request*)request); } void nrnmpi_wait(void** request) { MPI_Status status; MPI_Wait((MPI_Request*)request, &status); } void nrnmpi_barrier() { if (nrnmpi_numprocs < 2) { return; } MPI_Barrier(nrnmpi_comm); } double nrnmpi_dbl_allreduce(double x, int type) { double result; MPI_Op t; if (nrnmpi_numprocs < 2) { return x; } if (type == 1) { t = MPI_SUM; }else if (type == 2) { t = MPI_MAX; }else{ t = MPI_MIN; } MPI_Allreduce(&x, &result, 1, MPI_DOUBLE, t, nrnmpi_comm); return result; } void nrnmpi_dbl_allreduce_vec(double* src, double* dest, int cnt, int type) { int i; MPI_Op t; assert(src != dest); if (nrnmpi_numprocs < 2) { for (i = 0; i < cnt; ++i) { dest[i] = src[i]; } return; } if (type == 1) { t = MPI_SUM; }else if (type == 2) { t = MPI_MAX; }else{ t = MPI_MIN; } MPI_Allreduce(src, dest, cnt, MPI_DOUBLE, t, nrnmpi_comm); return; } void nrnmpi_longdbl_allreduce_vec(longdbl* src, longdbl* dest, int cnt, int type) { int i; MPI_Op t; assert(src != dest); if (nrnmpi_numprocs < 2) { for (i = 0; i < cnt; ++i) { dest[i] = src[i]; } return; } if (type == 1) { t = MPI_SUM; }else if (type == 2) { t = MPI_MAX; }else{ t = MPI_MIN; } MPI_Allreduce(src, dest, cnt, MPI_LONG_DOUBLE, t, nrnmpi_comm); return; } void nrnmpi_long_allreduce_vec(long* src, long* dest, int cnt, int type) { int i; MPI_Op t; assert(src != dest); if (nrnmpi_numprocs < 2) { for (i = 0; i < cnt; ++i) { dest[i] = src[i]; } return; } if (type == 1) { t = MPI_SUM; }else if (type == 2) { t = MPI_MAX; }else{ t = MPI_MIN; } MPI_Allreduce(src, dest, cnt, MPI_LONG, t, nrnmpi_comm); return; } void nrnmpi_dbl_allgather(double* s, double* r, int n) { MPI_Allgather(s, n, MPI_DOUBLE, r, n, MPI_DOUBLE, nrnmpi_comm); } #if BGPDMA static MPI_Comm bgp_comm; void nrnmpi_bgp_comm() { if (!bgp_comm) { MPI_Comm_dup(nrnmpi_comm, &bgp_comm); } } void nrnmpi_bgp_multisend(NRNMPI_Spike* spk, int n, int* hosts) { int i; MPI_Request r; MPI_Status status; for (i=0; i < n; ++i) { MPI_Isend(spk, 1, spike_type, hosts[i], 1, bgp_comm, &r); MPI_Request_free(&r); } } int nrnmpi_bgp_single_advance(NRNMPI_Spike* spk) { int flag = 0; MPI_Status status; MPI_Iprobe(MPI_ANY_SOURCE, 1, bgp_comm, &flag, &status); if (flag) { MPI_Recv(spk, 1, spike_type, MPI_ANY_SOURCE, 1, bgp_comm, &status); } return flag; } static int iii; int nrnmpi_bgp_conserve(int nsend, int nrecv) { int tcnts[2]; tcnts[0] = nsend - nrecv; MPI_Allreduce(tcnts, tcnts+1, 1, MPI_INT, MPI_SUM, bgp_comm); return tcnts[1]; } #endif /*BGPDMA*/ #endif /*NRNMPI*/ neuron-7.5/src/nrnmpi/mpispike.h000066400000000000000000000026161323325274500167720ustar00rootroot00000000000000#ifndef nrnmpispike_h #define nrnmpispike_h #ifndef nrn_spikebuf_size #define nrn_spikebuf_size 0 #endif #if nrn_spikebuf_size > 0 typedef struct { int nspike; int gid[nrn_spikebuf_size]; double spiketime[nrn_spikebuf_size]; } NRNMPI_Spikebuf; #endif #if defined(__cplusplus) extern "C" { #endif #define icapacity_ nrnmpi_i_capacity_ #define spikeout_ nrnmpi_spikeout_ #define spikein_ nrnmpi_spikein_ #define nout_ nrnmpi_nout_ #define nin_ nrnmpi_nin_ extern int nout_; extern int* nin_; extern int icapacity_; extern NRNMPI_Spike* spikeout_; extern NRNMPI_Spike* spikein_; #define spfixout_ nrnmpi_spikeout_fixed_ #define spfixin_ nrnmpi_spikein_fixed_ #define spfixin_ovfl_ nrnmpi_spikein_fixed_ovfl_ #define localgid_size_ nrnmpi_localgid_size_ #define ag_send_size_ nrnmpi_ag_send_size_ #define ag_send_nspike_ nrnmpi_send_nspike_ #define ovfl_capacity_ nrnmpi_ovfl_capacity_ #define ovfl_ nrnmpi_ovfl_ extern int localgid_size_; /* bytes */ extern int ag_send_size_; /* bytes */ extern int ag_send_nspike_; /* spikes */ extern int ovfl_capacity_; /* spikes */ extern int ovfl_; /* spikes */ extern unsigned char* spfixout_; extern unsigned char* spfixin_; extern unsigned char* spfixin_ovfl_; #if nrn_spikebuf_size > 0 #define spbufout_ nrnmpi_spbufout_ #define spbufin_ nrnmpi_spbufin_ extern NRNMPI_Spikebuf* spbufout_; extern NRNMPI_Spikebuf* spbufin_; #endif #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnmpi/notes_nrnrt000066400000000000000000000036471323325274500173030ustar00rootroot00000000000000Building linux with rtai see http://www.fdn.fr/~brouchou/rtai/rtai-doc-prj/installation-guide.html also extremely helpful, especially for the initial transformation of neuron was: http://people.mech.kuleuven.be/~psoetens/portingtolxrt.html using rtai-3.2 linux-2.6.10 patched with rtai-3.2/base/arch/i386/patches/hal-linux-2.6.10-i386-r9.patch cp /boot/config-2.6.12-1.1372_FC3 .config make oldconfig #accept default for everything make gconfig General setup LOCALVERSION -adeos Loadable module support Enable loadable module support ` MODVERSIONS N Power management options Power Management support PM (I left it on but ...) Processor type and features REGPARM N (Y prevents testsuites/user tests from working) make su make modules_install make install I've been uninstalling my failures by removing /boot/*2.6.10* /lib/modules/2.6.10* and editing /boot/grub/grub.conf I'm not quite sure, but after the linux config is built and even before building, installing, and rebooting, I think it might be a good idea to configure rtai-3.2 I created $HOME/rtlinux/rtaibuild and did make -f ../rtai-3.2/makefile srctree=../rtai-3.2 gconfig General Installation directory /home/hines/rtlinux/realtime Linux source tree /home/hines/rtlinux/linux-2.6.10 Machine Number of CPUs 1 (my guess, I am not sure) IPC support I turned on Yes for Semaphores, Message, and Mailboxes. I'm not sure if that was necessary, but I do not know what M (Maybe?) means at any rate, after that, configure succeeded. Also it is not clear to me that it is necessary to reboot linux before building rtai but I generally have rebooted first and then in rtaibuild make su make install moved the realtime/lib files out of the way except for liblxrt.a to avoid some link warnings. One then tests with copy a tests .runinfo and run to a test directory and modify the .runinfo to read latency:lxrt+sem+mbx+msg:/home/hines/neuron/nrnrt/i686/bin/nrngui -realtime hhap.hoc neuron-7.5/src/nrnmpi/nrnmpi.c000077500000000000000000000150631323325274500164520ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include "nrnpthread.h" /* do not want the redef in the dynamic load case */ #include #if NRNMPI_DYNAMICLOAD #include /* define all the nrnmpi functions name to f_name */ #endif #include #include #if NRNMPI_DYNAMICLOAD #else #include "nrnmpi_def_cinc" #endif extern double nrn_timeus(); #if NRNMPI #include #define asrt(arg) assert(arg == MPI_SUCCESS) #define USE_HPM 0 #if USE_HPM #include #endif int nrnmusic; #if NRN_MUSIC MPI_Comm nrnmusic_comm; extern void nrnmusic_init(int* parg, char*** pargv); extern void nrnmusic_terminate(); #endif MPI_Comm nrnmpi_world_comm; MPI_Comm nrnmpi_comm; MPI_Comm nrn_bbs_comm; static MPI_Group grp_bbs; static MPI_Group grp_net; extern void nrnmpi_spike_initialize(); #define nrnmpidebugleak 0 #if nrnmpidebugleak extern void nrnmpi_checkbufleak(); #endif static int nrnmpi_under_nrncontrol_; #endif void nrnmpi_init(int nrnmpi_under_nrncontrol, int* pargc, char*** pargv) { #if NRNMPI int i, b, flag; static int called = 0; if (called) { return; } called = 1; nrnmpi_use = 1; nrnmpi_under_nrncontrol_ = nrnmpi_under_nrncontrol; if( nrnmpi_under_nrncontrol_ ) { #if 0 {int i; printf("nrnmpi_init: argc=%d\n", *pargc); for (i=0; i < *pargc; ++i) { printf("%d |%s|\n", i, (*pargv)[i]); } } #endif #if NRN_MUSIC nrnmusic_init(pargc, pargv); /* see src/nrniv/nrnmusic.cpp */ #endif #if !ALWAYS_CALL_MPI_INIT /* this is not good. depends on mpirun adding at least one arg that starts with -p4 but that probably is dependent on mpich and the use of the ch_p4 device. We are trying to work around the problem that MPI_Init may change the working directory and so when not invoked under mpirun we would like to NOT call MPI_Init. */ b = 0; for (i=0; i < *pargc; ++i) { if (strncmp("-p4", (*pargv)[i], 3) == 0) { b = 1; break; } if (strcmp("-mpi", (*pargv)[i]) == 0) { b = 1; break; } } if (nrnmusic) { b = 1; } if (!b) { nrnmpi_use = 0; nrnmpi_under_nrncontrol_ = 0; return; } #endif MPI_Initialized(&flag); if (!flag) { #if (USE_PTHREAD) int required = MPI_THREAD_SERIALIZED; int provided; asrt(MPI_Init_thread(pargc, pargv, required, &provided)); if( required > provided) { nrn_cannot_use_threads_and_mpi = 1; } #else asrt(MPI_Init(pargc, pargv)); #endif } #if NRN_MUSIC if (nrnmusic) { asrt(MPI_Comm_dup(nrnmusic_comm, &nrnmpi_world_comm)); }else{ #else { #endif asrt(MPI_Comm_dup(MPI_COMM_WORLD, &nrnmpi_world_comm)); } } grp_bbs = MPI_GROUP_NULL; grp_net = MPI_GROUP_NULL; asrt(MPI_Comm_dup(nrnmpi_world_comm, &nrnmpi_comm)); asrt(MPI_Comm_dup(nrnmpi_world_comm, &nrn_bbs_comm)); asrt(MPI_Comm_rank(nrnmpi_world_comm, &nrnmpi_myid_world)); asrt(MPI_Comm_size(nrnmpi_world_comm, &nrnmpi_numprocs_world)); nrnmpi_numprocs = nrnmpi_numprocs_bbs = nrnmpi_numprocs_world; nrnmpi_myid = nrnmpi_myid_bbs = nrnmpi_myid_world; nrnmpi_spike_initialize(); /*begin instrumentation*/ #if USE_HPM hpmInit( nrnmpi_myid_world, "mpineuron" ); #endif #if 0 {int i; printf("nrnmpi_init: argc=%d\n", *pargc); for (i=0; i < *pargc; ++i) { printf("%d |%s|\n", i, (*pargv)[i]); } } #endif #if 1 if (nrnmpi_myid == 0) { printf("numprocs=%d\n", nrnmpi_numprocs_world); } #endif #endif /* NRNMPI */ } double nrnmpi_wtime() { #if NRNMPI if (nrnmpi_use) { return MPI_Wtime(); } #endif return nrn_timeus(); } void nrnmpi_terminate() { #if NRNMPI if (nrnmpi_use) { #if 0 printf("%d nrnmpi_terminate\n", nrnmpi_myid_world); #endif #if USE_HPM hpmTerminate( nrnmpi_myid_world ); #endif if( nrnmpi_under_nrncontrol_ ) { #if NRN_MUSIC if (nrnmusic) { nrnmusic_terminate(); }else #endif MPI_Finalize(); } nrnmpi_use = 0; #if nrnmpidebugleak nrnmpi_checkbufleak(); #endif } #endif /*NRNMPI*/ } void nrnmpi_abort(int errcode) { #if NRNMPI int flag; MPI_Initialized(&flag); if (flag) { MPI_Abort(MPI_COMM_WORLD, errcode); }else{ abort(); } #else abort(); #endif } #if NRNMPI void nrnmpi_subworld_size(int n) { /* n is the size of a subworld, nrnmpi_numprocs (pc.nhost) */ if (nrnmpi_use != 1) { return; } if (nrnmpi_comm != MPI_COMM_NULL) {asrt(MPI_Comm_free(&nrnmpi_comm)); } if (nrn_bbs_comm != MPI_COMM_NULL) {asrt(MPI_Comm_free(&nrn_bbs_comm)); } if (grp_bbs != MPI_GROUP_NULL) { asrt(MPI_Group_free(&grp_bbs)); } if (grp_net != MPI_GROUP_NULL) { asrt(MPI_Group_free(&grp_net)); } MPI_Group wg; asrt(MPI_Comm_group(nrnmpi_world_comm, &wg)); int r = nrnmpi_myid_world; /* special cases */ if (n == 1) { asrt(MPI_Group_incl(wg, 1, &r, &grp_net)); asrt(MPI_Comm_dup(nrnmpi_world_comm, &nrn_bbs_comm)); asrt(MPI_Comm_create(nrnmpi_world_comm, grp_net, &nrnmpi_comm)); asrt(MPI_Comm_rank(nrnmpi_comm, &nrnmpi_myid)); asrt(MPI_Comm_size(nrnmpi_comm, &nrnmpi_numprocs)); asrt(MPI_Comm_rank(nrn_bbs_comm, &nrnmpi_myid_bbs)); asrt(MPI_Comm_size(nrn_bbs_comm, &nrnmpi_numprocs_bbs)); }else if (n == nrnmpi_numprocs_world) { asrt(MPI_Group_incl(wg, 1, &r, &grp_bbs)); asrt(MPI_Comm_dup(nrnmpi_world_comm, &nrnmpi_comm)); asrt(MPI_Comm_create(nrnmpi_world_comm, grp_bbs, &nrn_bbs_comm)); asrt(MPI_Comm_rank(nrnmpi_comm, &nrnmpi_myid)); asrt(MPI_Comm_size(nrnmpi_comm, &nrnmpi_numprocs)); if (r == 0) { asrt(MPI_Comm_rank(nrn_bbs_comm, &nrnmpi_myid_bbs)); asrt(MPI_Comm_size(nrn_bbs_comm, &nrnmpi_numprocs_bbs)); }else{ nrnmpi_myid_bbs = -1; nrnmpi_numprocs_bbs = -1; } }else{ int nw = nrnmpi_numprocs_world; int nb = nw/n; /* nrnmpi_numprocs_bbs */ int range[3]; /* net is contiguous */ range[0] = r/n; range[0] *= n; /* first */ range[1] = range[0] + n - 1; /* last */ range[2] = 1; /* stride */ asrt(MPI_Group_range_incl(wg, 1, &range, &grp_net)); asrt(MPI_Comm_create(nrnmpi_world_comm, grp_net, &nrnmpi_comm)); asrt(MPI_Comm_rank(nrnmpi_comm, &nrnmpi_myid)); asrt(MPI_Comm_size(nrnmpi_comm, &nrnmpi_numprocs)); range[0] = 0; /* first */ range[1] = nw - n; /* last */ range[2] = n; /* stride */ asrt(MPI_Group_range_incl(wg, 1, &range, &grp_bbs)); asrt(MPI_Comm_create(nrnmpi_world_comm, grp_bbs, &nrn_bbs_comm)); if (r%n == 0) { /* only rank 0 of the subworlds */ asrt(MPI_Comm_rank(nrn_bbs_comm, &nrnmpi_myid_bbs)); asrt(MPI_Comm_size(nrn_bbs_comm, &nrnmpi_numprocs_bbs)); }else{ nrnmpi_myid_bbs = -1; nrnmpi_numprocs_bbs = -1; } } asrt(MPI_Group_free(&wg)); } /* so src/nrnpython/inithoc.cpp does not have to include a c++ mpi.h */ int nrnmpi_wrap_mpi_init(int* flag) { return MPI_Initialized(flag); } #endif neuron-7.5/src/nrnmpi/nrnmpi_def_cinc000066400000000000000000000011301323325274500200260ustar00rootroot00000000000000int nrnmpi_use; int nrnmpi_numprocs = 1; /* size */ int nrnmpi_myid = 0; /* rank */ int nrnmpi_numprocs_world = 1; int nrnmpi_myid_world = 0; int nrnmpi_numprocs_bbs = 1; int nrnmpi_myid_bbs = 0; int nrnmpi_nout_; int* nrnmpi_nin_; int nrnmpi_i_capacity_; NRNMPI_Spike* nrnmpi_spikeout_; NRNMPI_Spike* nrnmpi_spikein_; int nrnmpi_localgid_size_; int nrnmpi_ag_send_size_; int nrnmpi_send_nspike_; int nrnmpi_ovfl_capacity_; int nrnmpi_ovfl_; unsigned char* nrnmpi_spikeout_fixed_; unsigned char* nrnmpi_spikein_fixed_; unsigned char* nrnmpi_spikein_fixed_ovfl_; int nrn_cannot_use_threads_and_mpi; neuron-7.5/src/nrnmpi/nrnmpi_dynam.c000066400000000000000000000066061323325274500176420ustar00rootroot00000000000000#include <../../nrnconf.h> #include "nrnmpiuse.h" #include #include #include #include #include #if NRNMPI_DYNAMICLOAD /* to end of file */ #ifdef MINGW #define RTLD_NOW 0 #define RTLD_GLOBAL 0 #define RTLD_NOLOAD 0 extern void* dlopen_noerr(const char* name, int mode); #define dlopen dlopen_noerr extern void* dlsym(void* handle, const char* name); extern int dlclose(void* handle); extern char* dlerror(); #else #include #endif #include "nrnmpi.h" #include "mpispike.h" #include "nrnmpi_def_cinc" /* nrnmpi global variables */ #include "nrnmpi_dynam_cinc" /* autogenerated file */ #include "nrnmpi_dynam_wrappers.inc" /* autogenerated file */ #include "nrnmpi_dynam_stubs.c" static void* load_mpi(const char* name, char* mes) { int flag = RTLD_NOW | RTLD_GLOBAL; void* handle = dlopen(name, flag); if (!handle) { sprintf(mes, "load_mpi: %s\n", dlerror()); }else{ sprintf(mes, "load_mpi: %s successful\n", name); } return handle; } static void* load_nrnmpi(const char* name, char* mes) { int i; int flag = RTLD_NOW | RTLD_GLOBAL; void* handle = dlopen(name, flag); if (!handle) { sprintf(mes, "load_nrnmpi: %s\n", dlerror()); return 0; } sprintf(mes, "load_nrnmpi: %s successful\n", name); for (i = 0; ftable[i].name; ++i) { void* p = dlsym(handle, ftable[i].name); if (!p) { sprintf(mes+strlen(mes), "load_nrnmpi: %s\n", dlerror()); return 0; } *ftable[i].ppf = p; } return handle; } char* nrnmpi_load(int is_python) { int ismes=0; char* pmes; pmes = (char*)malloc(1024); pmes[0]='\0'; #if DARWIN sprintf(pmes, "Try loading openmpi\n"); void* handle = load_mpi("libmpi.dylib", pmes+strlen(pmes)); if (handle) { /* see man dyld */ if (!load_nrnmpi("@loader_path/libnrnmpi.dylib", pmes+strlen(pmes))) { return pmes; } }else{ ismes = 1; sprintf(pmes+strlen(pmes), "Is openmpi installed? If not in default location, need a LD_LIBRARY_PATH.\n"); } #else /*not DARWIN*/ #if defined(MINGW) sprintf(pmes, "Try loading msmpi\n"); void* handle = load_mpi("msmpi.dll", pmes+strlen(pmes)); if (handle) { if (!load_nrnmpi("libnrnmpi.dll", pmes+strlen(pmes))){ return pmes; } }else{ ismes = 1; return pmes; } #else /*not MINGW*/ sprintf(pmes, "Try loading openmpi\n"); void* handle = load_mpi("libmpi.so", pmes+strlen(pmes)); if (handle) { if (!load_nrnmpi("libnrnmpi.so", pmes+strlen(pmes))){ return pmes; } }else{ sprintf(pmes+strlen(pmes), "Try loading mpich2\n"); handle = load_mpi("libmpl.so", pmes+strlen(pmes)); handle = load_mpi("libmpich.so", pmes+strlen(pmes)); #if 0 /* Not needed because the issue of Python launch on LINUX not resolving variables from already loaded shared libraries (due to loading them with RTLD_LOCAL) was solved at the src/nrnmpi/Makefile.am level via a change to libnrnmpi_la_LIBADD */ if (!dlopen("liboc.so", RTLD_NOW | RTLD_NOLOAD | RTLD_GLOBAL)) { fprintf(stderr, "Did not promote liboc.so to RTLD_GLOBAL: %s\n", dlerror()); } if (!dlopen("libnrniv.so", RTLD_NOW | RTLD_NOLOAD | RTLD_GLOBAL)) { fprintf(stderr, "Did not promote libnrniv.so to RTLD_GLOBAL: %s\n", dlerror()); } #endif if(!load_nrnmpi("libnrnmpi.so", pmes+strlen(pmes))){ return pmes; } } #endif /*not MINGW*/ #endif /* not DARWIN */ if (!handle) { sprintf(pmes+strlen(pmes), "could not dynamically load libmpi.so or libmpich2.so\n"); return pmes; } free(pmes); return 0; } #endif neuron-7.5/src/nrnmpi/nrnmpi_dynam_stubs.c000066400000000000000000000015061323325274500210540ustar00rootroot00000000000000/* a few calls to nrnmpi functions are made even when MPI not available */ /* these need enough implementation to work with nrnmpi_numprocs = 1 */ #include "nrnmpiuse.h" #if NRNMPI_DYNAMICLOAD /* to end of file */ #include #include "nrnmpidec.h" extern double nrn_timeus(); static void stub_nrnmpi_init(int nrnmpi_under_nrncontrol, int* pargc, char*** pargv) {} static void stub_nrnmpi_terminate(){} static double stub_nrnmpi_mindelay(double m) { return m; } static int stub_nrnmpi_int_allmax(int x) { return x; } static void stub_nrnmpi_barrier(){} void nrnmpi_stubs() { p_nrnmpi_init = stub_nrnmpi_init; p_nrnmpi_terminate = stub_nrnmpi_terminate; p_nrnmpi_wtime = nrn_timeus; p_nrnmpi_mindelay = stub_nrnmpi_mindelay; p_nrnmpi_int_allmax = stub_nrnmpi_int_allmax; p_nrnmpi_barrier = stub_nrnmpi_barrier; } #endif neuron-7.5/src/nrnmpi/nrnmpi_impl.h000066400000000000000000000003741323325274500174740ustar00rootroot00000000000000#ifndef nrnmpi_impl_h #define nrnmpi_impl_h #include extern void* hoc_Emalloc(size_t size); extern void* hoc_Erealloc(void* buf, size_t size); extern void hoc_malchk(); extern MPI_Comm nrnmpi_world_comm; extern MPI_Comm nrnmpi_comm; #endif neuron-7.5/src/nrnmpi/nrnmpidec.h000077500000000000000000000107011323325274500171250ustar00rootroot00000000000000/* This file is processed by mkdynam.sh and so it is important that the prototypes be of the form "type foo(type arg, ...)" */ #ifndef nrnmpidec_h #define nrnmpidec_h #include #if defined(HAVE_STDINT_H) #include #endif typedef long double longdbl; #if NRNMPI #include #if defined(__cplusplus) extern "C" { #endif /* from bbsmpipack.c */ typedef struct bbsmpibuf { char* buf; int size; int pkposition; int upkpos; int keypos; int refcount; } bbsmpibuf; extern bbsmpibuf* nrnmpi_newbuf(int size); extern void nrnmpi_copy(bbsmpibuf* dest, bbsmpibuf* src); extern void nrnmpi_ref(bbsmpibuf* buf); extern void nrnmpi_unref(bbsmpibuf* buf); extern void nrnmpi_upkbegin(bbsmpibuf* buf); extern char* nrnmpi_getkey(bbsmpibuf* buf); extern int nrnmpi_getid(bbsmpibuf* buf); extern int nrnmpi_upkint(bbsmpibuf* buf); extern double nrnmpi_upkdouble(bbsmpibuf* buf); extern void nrnmpi_upkvec(int n, double* x, bbsmpibuf* buf); extern char* nrnmpi_upkstr(bbsmpibuf* buf); extern char* nrnmpi_upkpickle(size_t* size, bbsmpibuf* buf); extern void nrnmpi_pkbegin(bbsmpibuf* buf); extern void nrnmpi_enddata(bbsmpibuf* buf); extern void nrnmpi_pkint(int i, bbsmpibuf* buf); extern void nrnmpi_pkdouble(double x, bbsmpibuf* buf); extern void nrnmpi_pkvec(int n, double* x, bbsmpibuf* buf); extern void nrnmpi_pkstr(const char* s, bbsmpibuf* buf); extern void nrnmpi_pkpickle(const char* s, size_t size, bbsmpibuf* buf); extern int nrnmpi_iprobe(int* size, int* tag, int* source); extern void nrnmpi_probe(int* size, int* tag, int* source); extern void nrnmpi_bbssend(int dest, int tag, bbsmpibuf* r); extern int nrnmpi_bbsrecv(int source, bbsmpibuf* r); extern int nrnmpi_bbssendrecv(int dest, int tag, bbsmpibuf* s, bbsmpibuf* r); /* from nrnmpi.c */ extern void nrnmpi_init(int nrnmpi_under_nrncontrol, int* pargc, char*** pargv); extern int nrnmpi_wrap_mpi_init(int* flag); extern double nrnmpi_wtime(); extern void nrnmpi_terminate(); extern void nrnmpi_abort(int errcode); extern void nrnmpi_subworld_size(int n); /* from mpispike.c */ extern void nrnmpi_spike_initialize(); extern int nrnmpi_spike_exchange(); extern int nrnmpi_spike_exchange_compressed(); extern double nrnmpi_mindelay(double maxdel); extern int nrnmpi_int_allmax(int i); extern void nrnmpi_int_gather(int* s, int* r, int cnt, int root); extern void nrnmpi_int_gatherv(int* s, int scnt, int* r, int* rcnt, int* rdispl, int root); extern void nrnmpi_int_allgather(int* s, int* r, int n); extern void nrnmpi_int_allgatherv(int* s, int* r, int* n, int* dspl); extern void nrnmpi_int_alltoall(int* s, int* r, int n); extern void nrnmpi_int_alltoallv(int* s, int* scnt, int* sdispl, int* r, int* rcnt, int* rdispl); extern void nrnmpi_long_allgatherv(int64_t* s, int64_t* r, int* n, int* dspl); extern void nrnmpi_long_alltoallv(int64_t* s, int* scnt, int* sdispl, int64_t* r, int* rcnt, int* rdispl); extern void nrnmpi_dbl_allgatherv(double* s, double* r, int* n, int* dspl); extern void nrnmpi_dbl_alltoallv(double* s, int* scnt, int* sdispl, double* r, int* rcnt, int* rdispl); extern void nrnmpi_char_alltoallv(char* s, int* scnt, int* sdispl, char* r, int* rcnt, int* rdispl); extern void nrnmpi_dbl_broadcast(double* buf, int cnt, int root); extern void nrnmpi_int_broadcast(int* buf, int cnt, int root); extern void nrnmpi_char_broadcast(char* buf, int cnt, int root); extern int nrnmpi_int_sum_reduce(int in); extern void nrnmpi_assert_opstep(int opstep, double t); extern double nrnmpi_dbl_allmin(double x); extern int nrnmpi_pgvts_least(double* t, int* op, int* init); extern void nrnmpi_send_doubles(double* pd, int cnt, int dest, int tag); extern void nrnmpi_recv_doubles(double* pd, int cnt, int src, int tag); extern void nrnmpi_postrecv_doubles(double* pd, int cnt, int src, int tag, void** request); extern void nrnmpi_wait(void** request); extern void nrnmpi_barrier(); extern double nrnmpi_dbl_allreduce(double x, int type); extern void nrnmpi_dbl_allreduce_vec(double* src, double* dest, int cnt, int type); extern void nrnmpi_longdbl_allreduce_vec(longdbl* src, longdbl* dest, int cnt, int type); extern void nrnmpi_long_allreduce_vec(long* src, long* dest, int cnt, int type); extern void nrnmpi_dbl_allgather(double* s, double* r, int n); #if BGPDMA extern void nrnmpi_bgp_comm(); extern void nrnmpi_bgp_multisend(NRNMPI_Spike* spk, int n, int* hosts); extern int nrnmpi_bgp_single_advance(NRNMPI_Spike* spk); extern int nrnmpi_bgp_conserve(int nsend, int nrecv); #endif #if defined(__cplusplus) } #endif #endif #endif neuron-7.5/src/nrnmpi/nrnrt.c000066400000000000000000000106651323325274500163120ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #if NRN_REALTIME #include #include #include #include /*#include */ #include extern void nrn_fixed_step(); extern void nrn_fake_step(); extern double t, dt; extern int stoprun; int nrn_realtime_; int nrnrt_overrun_; double nrn_rtstep_time_; /* setting the scheduler to SCHED_FIFO is fully optional and just helps response times when testing your program in soft realtime mode. */ void nrn_setscheduler() { if (nrn_realtime_) { struct sched_param mysched; mysched.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1; if( sched_setscheduler( 0, SCHED_FIFO, &mysched ) == -1 ) { puts("ERROR IN SETTING THE SCHEDULER"); perror("errno"); errno = 0; exit(1); } } } #define taskname(x) (1000 + (x)) static RT_TASK* maintask_; static RT_TASK* rtrun_task_; static SEM* sem_; static pthread_t rtrun_thread_; static int volatile end_, rt_running_; static int period_; static double tstop_; static void msleep(int ms) { poll(NULL, 0, ms); } static int rtrun() { RTIME t1; int ovrn = 0; rt_running_ = 1; nrn_rtstep_time_ = 0.; start_rt_timer(period_); rt_make_hard_real_time(); nrn_fake_step(); // get as much as possible into the cache rt_task_make_periodic(rtrun_task_, rt_get_time() + period_, period_); rt_task_wait_period(); while (t < tstop_) { t1 = rt_get_cpu_time_ns(); nrn_fixed_step(); nrn_rtstep_time_ = (double)(rt_get_cpu_time_ns() - t1); ovrn += rt_task_wait_period(); if (stoprun) { break; } } rt_make_soft_real_time(); stop_rt_timer(); rt_running_ = 0; return ovrn; } static void* rtrun_fun(void* arg) { pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); if (!(rtrun_task_ = rt_task_init_schmod(taskname(1), 0, 1000, 0, SCHED_FIFO, 1))) { printf("Cannot init rtrun_fun task %u\n", taskname(1)); exit(1); } mlockall(MCL_CURRENT | MCL_FUTURE); end_ = 1; rt_task_suspend(rtrun_task_); rt_sem_wait(sem_); while (!end_) { nrnrt_overrun_ = rtrun(); rt_sem_wait(sem_); } rt_task_delete(rtrun_task_); ++end_; return (void*)0; } void nrn_maintask_init() { if (nrn_realtime_) { char buf[10]; int i = 0; int priority = 0; /* Highest */ int stack_size = 0; /* Use default (512) */ int msg_size = 0; /* Use default (256) */ /* mlockall(MCL_CURRENT | MCL_FUTURE); */ rt_grow_and_lock_stack(2000000); /* macro in rtai_lxrt.h */ do { sprintf(buf, "NRN%d", ++i); printf("buf=|%s|\n", buf); printf("%ul\n", nam2num(buf)); } while (rt_get_adr(nam2num(buf))); printf("buf=|%s|\n", buf); maintask_ = rt_task_init(nam2num(buf), priority, stack_size, msg_size); printf("rt_task_init for maintask %s\n", buf); rtrun_task_ = maintask_; /*we will make a separate thread for if if we do not mind taking the extra time for switching and semaphore handling. i.e. using large dt and want to be able to press the stop button */ } } void nrn_rtrun_thread_init() { int arg = 1; pthread_attr_t attr; if (rtrun_thread_) { return; } end_ = 0; pthread_attr_init(&attr); if (pthread_create(&rtrun_thread_, &attr, rtrun_fun, (void*)arg)) { printf("nrn_rtrun_thread_init error creating thread\n"); } pthread_attr_destroy(&attr); /* // I do not know why the strange handshaking involving rt_task_suspend // and rt_task_resume is being done. I am slavishly following the // switching example in the rtai sources. I wonder if the sem // is not supposed to be created til after the thread. I am guessing // that is unnecessary and it would be sufficient merely to create it // before the thread and have the thread wait on the semaphore. // Oh well... */ sem_ = rt_sem_init(nam2num("SEMAPH"), 1); while (!end_) { msleep(50); } end_ = 0; rt_task_resume(rtrun_task_); } void nrn_maintask_delete() { if (nrn_realtime_) { if (rtrun_thread_) { end_ = 1; rt_sem_signal(sem_); while(end_ <= 1) { msleep(50); } } rt_task_delete(maintask_); printf("rt_task_delete for maintask\n"); } } int nrn_rt_run(double tstop) { RTIME t1; RTIME period_in_nanosecs; if (rt_running_) { stoprun = 1; printf("Currently doing a realtime run. Setting stoprun=1."); return 0; } tstop_ = tstop; period_in_nanosecs = (RTIME)(dt*1000000.); rt_set_periodic_mode(); period_ = (int) nano2count((RTIME)period_in_nanosecs); if (rtrun_thread_) { rt_sem_signal(sem_); }else{ nrnrt_overrun_ = rtrun(); } return nrnrt_overrun_; } #endif neuron-7.5/src/nrnoc/000077500000000000000000000000001323325274500146075ustar00rootroot00000000000000neuron-7.5/src/nrnoc/Makefile.am000077500000000000000000000135561323325274500166600ustar00rootroot00000000000000## The program that we make from this directory. bin_PROGRAMS = nrnoc nrnoc_SOURCES = ocmain.c nrnnoiv.c ocnoiv.c cprop.c if BUILD_NRNMPI_DYNAMIC nrnmpila = else nrnmpila = ../nrnmpi/libnrnmpi.la endif nrnoc_LDADD = ../oc/modlreg.o libnrnoc.la ../oc/liboc.la @MEMACSLIBLA@ \ ../scopmath/libscopmath.la ../sparse13/libsparse13.la \ $(nrnmpila) \ @NRN_READLINE_LIBS@ @PTHREAD_LIBS@ ## The shared library that we make from this directory. lib_LTLIBRARIES = libnrnoc.la MODFILES = hh.mod feature.mod passive.mod stim.mod syn.mod \ vclmp.mod apcount.mod svclmp.mod oclmp.mod xmech.mod \ netstim.mod intfire1.mod intfire2.mod intfire4.mod \ expsyn.mod exp2syn.mod ppmark.mod pattern.mod #same as above, can't use $(patsubst %.mod,%.c,$(MODFILES)) due to automake MODFILES_C = hh.c feature.c passive.c stim.c syn.c \ vclmp.c apcount.c svclmp.c oclmp.c xmech.c \ netstim.c intfire1.c intfire2.c intfire4.c \ expsyn.c exp2syn.c ppmark.c pattern.c libnrnoc_la_SOURCES = $(MODFILES_C) cabcode.c capac.c clamp.c eion.c \ extcelln.c fadvance.c fstim.c init.c nrnnemo.c point.c \ psection.c solve.c synapse.c treeset.c hoc_init.c code.c hoc_oop.c \ seclist.c method3.c hocprax.c secref.c ldifus.c hocusr.c nrnversion.c \ nrnversion.h nrntimeout.c passive0.c ## ## The list of .c files which are actually built during the build procedure. ## These files should not be packaged in a distribution. ## Some of these are made from .mod files, and the others are soft linked from ## other directories. ## BUILT_SOURCES = $(MODFILES_C) $(srcdir)/nrnversion.h EXTRA_DIST = $(MODFILES) PTHREAD_CC=@PTHREAD_CC@ PTHREAD_CFLAGS=@PTHREAD_CFLAGS@ PTHREAD_LIBS=@PTHREAD_LIBS@ AM_CFLAGS = @MINGW_CFLAG@ $(PTHREAD_CFLAGS) nsrc=$(top_srcdir)/src includes = -I$(top_builddir)/src/oc -I$(nsrc)/oc -I$(nsrc)/scopmath -I$(nsrc)/sparse13 -I$(nsrc)/nrnmpi AM_CPPFLAGS = -DCABLE=1 -DOOP=1 $(includes) NMODL = ../nmodl/nocmodl FORCE: $(srcdir)/nrnversion.h: FORCE if test -d $(top_srcdir)/.git ; then \ sh $(top_srcdir)/git2nrnversion_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp ; \ if cmp $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; then \ echo "nrnversion.h not changed" ; \ rm $(srcdir)/nrnversion.h.tmp ; \ else \ mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ echo "updated nrnversion.h" ; \ fi \ elif test -d $(top_srcdir)/.hg ; then \ sh $(top_srcdir)/hg2nrnversion_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp ; \ if cmp $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; then \ echo "nrnversion.h not changed" ; \ rm $(srcdir)/nrnversion.h.tmp ; \ else \ mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ echo "updated nrnversion.h" ; \ fi \ else \ if test -d $(top_srcdir)/.svn && svnversion $(top_srcdir) ; then \ if test "`svnversion $(top_srcdir)`" != "`sed -n 's/.*SVN_CHANGESET.*(\([^)]*\).*/\1/p' $(srcdir)/nrnversion.h`" ; then \ sh $(top_srcdir)/svn2nrn_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp; \ if test -s $(srcdir)/nrnversion.h.tmp ; then \ mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ fi ; \ echo "updated nrnversion.h" ; \ else \ echo "nrnversion.h not changed" ; \ fi \ fi \ fi #$(srcdir)/nrnversion.h: FORCE # if test -d $(top_srcdir)/.hg ; then \ # sh $(top_srcdir)/hg2nrnversion_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp ; \ # if cmp $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; then \ # echo "nrnversion.h not changed" ; \ # rm $(srcdir)/nrnversion.h.tmp ; \ # else \ # mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ # echo "updated nrnversion.h" ; \ # fi \ # else \ # if test -d $(top_srcdir)/.svn && svnversion $(top_srcdir) ; then \ # if test "`svnversion $(top_srcdir)`" != "`sed -n 's/.*SVN_CHANGESET.*(\([^)]*\).*/\1/p' $(srcdir)/nrnversion.h`" ; then \ # sh $(top_srcdir)/svn2nrn_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp; \ # if test -s $(srcdir)/nrnversion.h.tmp ; then \ # mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ # fi ; \ # echo "updated nrnversion.h" ; \ # else \ # echo "nrnversion.h not changed" ; \ # fi \ # fi \ # fi nrnversion.o nrnversion.lo: nrnversion.h $(MODFILES_C): $(NMODL) %.c: %.mod (export MODLUNIT=$(top_srcdir)/share/lib/nrnunits.lib; $(NMODL) $<) sed "s/_reg()/_reg_()/" $(srcdir)/$(notdir $@) > $(srcdir)/$(notdir $@).tmp mv $(srcdir)/$(notdir $@).tmp $(srcdir)/$(notdir $@) ## Force make to make hocusr.h even before it's done dependency scanning. hocusr.lo: hocusr.h hocusr.h: $(nsrc)/nrnoc/neuron.h $(nsrc)/oc/mk_hocusr_h.py $(nsrc)/nrnoc/options.h cat $(nsrc)/nrnoc/neuron.h > tmp.c @CPP@ -E -I$(nsrc)/nrnoc -I$(nsrc)/oc tmp.c | sed '/^#/d' > neuron.tmp $(PYTHON_BLD) $(nsrc)/oc/mk_hocusr_h.py < neuron.tmp > temp2hoc cat neuron.tmp temp2hoc |sed 's/"nrnhoc_topology"/"topology"/' > hocusr.h rm -f temp1hoc temp2hoc neuron.tmp tmp.c ## Header files that need to be installed: pkginclude_HEADERS = neuron.h md1redef.h md2redef.h section.h nrnoc_ml.h \ cabvars.h membdef.h membfunc.h nrniv_mf.h nrn_ansi.h nrncvode.h \ options.h nrnredef.h multisplit.h multicore.h nmodlmutex.h ## Header files that need to be included in the distribution but not installed: noinst_HEADERS = hocusr.h \ osxdlfcn.h osxdlfcn.c multicore.c \ nonvintblock.h nrndae_c.h ## We have to play a trick on automake to get it to install the .o files in ## an architecture-dependent subdirectory. (Apparently automake's authors ## never heard of installing .o files.) We pretend to create a separate ## directory (which is really just $(pkglibdir)) and we install the .o files ## by calling them "DATA". ## Argh!!!!! libobjdir = $(libdir) ## The following object files need to be installed: libobj_DATA = ocmain.o nrnnoiv.o ocnoiv.o cprop.o neuron-7.5/src/nrnoc/Makefile.in000066400000000000000000001126641323325274500166660ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = nrnoc$(EXEEXT) subdir = src/nrnoc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(libobjdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libnrnoc_la_LIBADD = am__objects_1 = hh.lo feature.lo passive.lo stim.lo syn.lo vclmp.lo \ apcount.lo svclmp.lo oclmp.lo xmech.lo netstim.lo intfire1.lo \ intfire2.lo intfire4.lo expsyn.lo exp2syn.lo ppmark.lo \ pattern.lo am_libnrnoc_la_OBJECTS = $(am__objects_1) cabcode.lo capac.lo clamp.lo \ eion.lo extcelln.lo fadvance.lo fstim.lo init.lo nrnnemo.lo \ point.lo psection.lo solve.lo synapse.lo treeset.lo \ hoc_init.lo code.lo hoc_oop.lo seclist.lo method3.lo \ hocprax.lo secref.lo ldifus.lo hocusr.lo nrnversion.lo \ nrntimeout.lo passive0.lo libnrnoc_la_OBJECTS = $(am_libnrnoc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = PROGRAMS = $(bin_PROGRAMS) am_nrnoc_OBJECTS = ocmain.$(OBJEXT) nrnnoiv.$(OBJEXT) ocnoiv.$(OBJEXT) \ cprop.$(OBJEXT) nrnoc_OBJECTS = $(am_nrnoc_OBJECTS) @BUILD_NRNMPI_DYNAMIC_FALSE@am__DEPENDENCIES_1 = \ @BUILD_NRNMPI_DYNAMIC_FALSE@ ../nrnmpi/libnrnmpi.la nrnoc_DEPENDENCIES = ../oc/modlreg.o libnrnoc.la ../oc/liboc.la \ ../scopmath/libscopmath.la ../sparse13/libsparse13.la \ $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libnrnoc_la_SOURCES) $(nrnoc_SOURCES) DIST_SOURCES = $(libnrnoc_la_SOURCES) $(nrnoc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(libobj_DATA) HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)nrnconfigargs.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/nrnconfigargs.h.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ nrnoc_SOURCES = ocmain.c nrnnoiv.c ocnoiv.c cprop.c @BUILD_NRNMPI_DYNAMIC_FALSE@nrnmpila = ../nrnmpi/libnrnmpi.la @BUILD_NRNMPI_DYNAMIC_TRUE@nrnmpila = nrnoc_LDADD = ../oc/modlreg.o libnrnoc.la ../oc/liboc.la @MEMACSLIBLA@ \ ../scopmath/libscopmath.la ../sparse13/libsparse13.la \ $(nrnmpila) \ @NRN_READLINE_LIBS@ @PTHREAD_LIBS@ lib_LTLIBRARIES = libnrnoc.la MODFILES = hh.mod feature.mod passive.mod stim.mod syn.mod \ vclmp.mod apcount.mod svclmp.mod oclmp.mod xmech.mod \ netstim.mod intfire1.mod intfire2.mod intfire4.mod \ expsyn.mod exp2syn.mod ppmark.mod pattern.mod #same as above, can't use $(patsubst %.mod,%.c,$(MODFILES)) due to automake MODFILES_C = hh.c feature.c passive.c stim.c syn.c \ vclmp.c apcount.c svclmp.c oclmp.c xmech.c \ netstim.c intfire1.c intfire2.c intfire4.c \ expsyn.c exp2syn.c ppmark.c pattern.c libnrnoc_la_SOURCES = $(MODFILES_C) cabcode.c capac.c clamp.c eion.c \ extcelln.c fadvance.c fstim.c init.c nrnnemo.c point.c \ psection.c solve.c synapse.c treeset.c hoc_init.c code.c hoc_oop.c \ seclist.c method3.c hocprax.c secref.c ldifus.c hocusr.c nrnversion.c \ nrnversion.h nrntimeout.c passive0.c BUILT_SOURCES = $(MODFILES_C) $(srcdir)/nrnversion.h EXTRA_DIST = $(MODFILES) AM_CFLAGS = @MINGW_CFLAG@ $(PTHREAD_CFLAGS) nsrc = $(top_srcdir)/src includes = -I$(top_builddir)/src/oc -I$(nsrc)/oc -I$(nsrc)/scopmath -I$(nsrc)/sparse13 -I$(nsrc)/nrnmpi AM_CPPFLAGS = -DCABLE=1 -DOOP=1 $(includes) NMODL = ../nmodl/nocmodl pkginclude_HEADERS = neuron.h md1redef.h md2redef.h section.h nrnoc_ml.h \ cabvars.h membdef.h membfunc.h nrniv_mf.h nrn_ansi.h nrncvode.h \ options.h nrnredef.h multisplit.h multicore.h nmodlmutex.h noinst_HEADERS = hocusr.h \ osxdlfcn.h osxdlfcn.c multicore.c \ nonvintblock.h nrndae_c.h libobjdir = $(libdir) libobj_DATA = ocmain.o nrnnoiv.o ocnoiv.o cprop.o all: $(BUILT_SOURCES) nrnconfigargs.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrnoc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrnoc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrnconfigargs.h: stamp-h5 @test -f $@ || rm -f stamp-h5 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h5 stamp-h5: $(srcdir)/nrnconfigargs.h.in $(top_builddir)/config.status @rm -f stamp-h5 cd $(top_builddir) && $(SHELL) ./config.status src/nrnoc/nrnconfigargs.h distclean-hdr: -rm -f nrnconfigargs.h stamp-h5 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libnrnoc.la: $(libnrnoc_la_OBJECTS) $(libnrnoc_la_DEPENDENCIES) $(EXTRA_libnrnoc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libnrnoc_la_OBJECTS) $(libnrnoc_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list nrnoc$(EXEEXT): $(nrnoc_OBJECTS) $(nrnoc_DEPENDENCIES) $(EXTRA_nrnoc_DEPENDENCIES) @rm -f nrnoc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nrnoc_OBJECTS) $(nrnoc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cabcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cprop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp2syn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expsyn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extcelln.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feature.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hoc_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hoc_oop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocprax.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocusr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intfire1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intfire2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intfire4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldifus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netstim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnnemo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnnoiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrntimeout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnversion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oclmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocmain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocnoiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passive.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passive0.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seclist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svclmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synapse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treeset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vclmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmech.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libobjDATA: $(libobj_DATA) @$(NORMAL_INSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libobjdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libobjdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libobjdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(libobjdir)" || exit $$?; \ done uninstall-libobjDATA: @$(NORMAL_UNINSTALL) @list='$(libobj_DATA)'; test -n "$(libobjdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libobjdir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ nrnconfigargs.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libobjdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-libobjDATA install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-libobjDATA uninstall-pkgincludeHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-libobjDATA install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-libobjDATA uninstall-pkgincludeHEADERS .PRECIOUS: Makefile FORCE: $(srcdir)/nrnversion.h: FORCE if test -d $(top_srcdir)/.git ; then \ sh $(top_srcdir)/git2nrnversion_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp ; \ if cmp $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; then \ echo "nrnversion.h not changed" ; \ rm $(srcdir)/nrnversion.h.tmp ; \ else \ mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ echo "updated nrnversion.h" ; \ fi \ elif test -d $(top_srcdir)/.hg ; then \ sh $(top_srcdir)/hg2nrnversion_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp ; \ if cmp $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; then \ echo "nrnversion.h not changed" ; \ rm $(srcdir)/nrnversion.h.tmp ; \ else \ mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ echo "updated nrnversion.h" ; \ fi \ else \ if test -d $(top_srcdir)/.svn && svnversion $(top_srcdir) ; then \ if test "`svnversion $(top_srcdir)`" != "`sed -n 's/.*SVN_CHANGESET.*(\([^)]*\).*/\1/p' $(srcdir)/nrnversion.h`" ; then \ sh $(top_srcdir)/svn2nrn_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp; \ if test -s $(srcdir)/nrnversion.h.tmp ; then \ mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ fi ; \ echo "updated nrnversion.h" ; \ else \ echo "nrnversion.h not changed" ; \ fi \ fi \ fi #$(srcdir)/nrnversion.h: FORCE # if test -d $(top_srcdir)/.hg ; then \ # sh $(top_srcdir)/hg2nrnversion_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp ; \ # if cmp $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; then \ # echo "nrnversion.h not changed" ; \ # rm $(srcdir)/nrnversion.h.tmp ; \ # else \ # mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ # echo "updated nrnversion.h" ; \ # fi \ # else \ # if test -d $(top_srcdir)/.svn && svnversion $(top_srcdir) ; then \ # if test "`svnversion $(top_srcdir)`" != "`sed -n 's/.*SVN_CHANGESET.*(\([^)]*\).*/\1/p' $(srcdir)/nrnversion.h`" ; then \ # sh $(top_srcdir)/svn2nrn_h.sh $(top_srcdir) > $(srcdir)/nrnversion.h.tmp; \ # if test -s $(srcdir)/nrnversion.h.tmp ; then \ # mv $(srcdir)/nrnversion.h.tmp $(srcdir)/nrnversion.h ; \ # fi ; \ # echo "updated nrnversion.h" ; \ # else \ # echo "nrnversion.h not changed" ; \ # fi \ # fi \ # fi nrnversion.o nrnversion.lo: nrnversion.h $(MODFILES_C): $(NMODL) %.c: %.mod (export MODLUNIT=$(top_srcdir)/share/lib/nrnunits.lib; $(NMODL) $<) sed "s/_reg()/_reg_()/" $(srcdir)/$(notdir $@) > $(srcdir)/$(notdir $@).tmp mv $(srcdir)/$(notdir $@).tmp $(srcdir)/$(notdir $@) hocusr.lo: hocusr.h hocusr.h: $(nsrc)/nrnoc/neuron.h $(nsrc)/oc/mk_hocusr_h.py $(nsrc)/nrnoc/options.h cat $(nsrc)/nrnoc/neuron.h > tmp.c @CPP@ -E -I$(nsrc)/nrnoc -I$(nsrc)/oc tmp.c | sed '/^#/d' > neuron.tmp $(PYTHON_BLD) $(nsrc)/oc/mk_hocusr_h.py < neuron.tmp > temp2hoc cat neuron.tmp temp2hoc |sed 's/"nrnhoc_topology"/"topology"/' > hocusr.h rm -f temp1hoc temp2hoc neuron.tmp tmp.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrnoc/apcount.c000066400000000000000000000235471323325274500164370ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__APCount #define _nrn_initial _nrn_initial__APCount #define nrn_cur _nrn_cur__APCount #define _nrn_current _nrn_current__APCount #define nrn_jacob _nrn_jacob__APCount #define nrn_state _nrn_state__APCount #define _net_receive _net_receive__APCount #define check check__APCount #define record record__APCount #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define n _p[0] #define thresh _p[1] #define time _p[2] #define firing _p[3] #define space _p[4] #define v _p[5] #define _g _p[6] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_check(); static double _hoc_record(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "check", _hoc_check, "record", _hoc_record, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "thresh", "mV", "time", "ms", 0,0 }; static double delta_t = 0.01; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "APCount", "n", "thresh", "time", 0, "firing", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 7, _prop); /*initialize range parameters*/ n = 0; thresh = -20; time = 0; } _prop->param = _p; _prop->param_size = 7; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _apcount_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 7, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 APCount /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/apcount.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int check(_threadargsproto_); static int record(_threadargsproto_); /*VERBATIM*/ extern void vector_resize(); extern double* vector_vec(); extern void* vector_arg(); static int check ( _threadargsproto_ ) { /*VERBATIM*/ if (v >= thresh && !firing) { int size; double* px; void* vv; firing = 1; time = t; n += 1.; vv = *((void**)(&space)); if (vv) { size = (int)n; vector_resize(vv, size); px = vector_vec(vv); px[size-1] = time; } } if (firing && v < thresh && t > time) { firing = 0; } return 0; } static double _hoc_check(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; check ( _p, _ppvar, _thread, _nt ); return(_r); } static int record ( _threadargsproto_ ) { /*VERBATIM*/ extern void* vector_arg(); void** vv; vv = (void**)(&space); *vv = (void*)0; if (ifarg(1)) { *vv = vector_arg(1); } return 0; } static double _hoc_record(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; record ( _p, _ppvar, _thread, _nt ); return(_r); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { n = 0.0 ; firing = 0.0 ; /*VERBATIM*/ { void* vv; vv = *((void**)(&space)); if (vv) { vector_resize(vv, 0); } } check ( _threadargs_ ) ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) += _g; }else #endif { _nd = _ml->_nodelist[_iml]; NODED(_nd) += _g; } } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { { { check(_p, _ppvar, _thread, _nt); } } { } }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/apcount.mod000077500000000000000000000020351323325274500167640ustar00rootroot00000000000000NEURON { POINT_PROCESS APCount RANGE n, thresh, time, firing THREADSAFE : if APCount.record uses distinct instances of Vector } UNITS { (mV) = (millivolt) } PARAMETER { n thresh = -20 (mV) time (ms) } ASSIGNED { firing space } VERBATIM extern void vector_resize(); extern double* vector_vec(); extern void* vector_arg(); ENDVERBATIM INITIAL { n = 0 firing = 0 VERBATIM { void* vv; vv = *((void**)(&space)); if (vv) { vector_resize(vv, 0); } } ENDVERBATIM check() } BREAKPOINT { SOLVE check METHOD after_cvode } PROCEDURE check() { VERBATIM if (v >= thresh && !firing) { int size; double* px; void* vv; firing = 1; time = t; n += 1.; vv = *((void**)(&space)); if (vv) { size = (int)n; vector_resize(vv, size); px = vector_vec(vv); px[size-1] = time; } } if (firing && v < thresh && t > time) { firing = 0; } ENDVERBATIM } PROCEDURE record() { VERBATIM extern void* vector_arg(); void** vv; vv = (void**)(&space); *vv = (void*)0; if (ifarg(1)) { *vv = vector_arg(1); } ENDVERBATIM } neuron-7.5/src/nrnoc/cabcode.c000066400000000000000000001474521323325274500163500ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/cabcode.c,v 1.37 1999/07/08 14:24:59 hines Exp */ #define HOC_L_LIST 1 #include #include #include #include #include "section.h" #include "nrniv_mf.h" #include "membfunc.h" #include "parse.h" #include "hocparse.h" #include "membdef.h" extern int hoc_execerror_messages; #define symlist hoc_symlist int tree_changed = 1; /* installing section, changeing nseg and connecting sections set this flag. The flag is set to 0 when the topology is set up */ int diam_changed = 1; /* changing diameter, length set this flag The flag is set to 0 when node.a and node.b is set up */ extern int nrn_shape_changed_; extern int v_structure_change; char* (*nrnpy_pysec_name_p_)(Section*); Object* (*nrnpy_pysec_cell_p_)(Section*); int (*nrnpy_pysec_cell_equals_p_)(Section*, Object*); /* switching from Ra being a global variable to it being a section variable opens up the possibility of a great deal of confusion and inadvertant wrong results. To help avoid this we print a warning message whenever the value in one section is set but no others. But only the first time through treeset. */ #if RA_WARNING int nrn_ra_set = 0; #endif #define NSECSTACK 200 static Section *secstack[NSECSTACK + 1]; static int isecstack = 0; /* stack index */ /* don't do section stack auto correction in the interval between push_section() ... pop_section in hoc (also for point process get_loc. These should be deprecated in favor of doing everything with SectionRef */ static int skip_secstack_check = 0; static int range_vec_indx(); int nrn_isecstack(void) { return isecstack; } void nrn_secstack(i) int i; { if (skip_secstack_check) { return; } #if 1 if (isecstack > i) { printf("The sectionstack index should be %d but it is %d\n", i, isecstack); hoc_warning("prior to version 5.3 the section stack would not have been properly popped\n\ and the currently accessed section would have been ", secname(secstack[isecstack])); } #endif while (isecstack > i) { nrn_popsec(); } } void nrn_initcode(void) { while(isecstack > 0) { nrn_popsec(); } isecstack = 0; section_object_seen = 0; state_discon_allowed_ = 1; skip_secstack_check = 0; } void oc_save_cabcode(int* a1, int* a2) { *a1 = isecstack; *a2 = section_object_seen; } void oc_restore_cabcode(int* a1, int* a2) { while(isecstack > *a1) { nrn_popsec(); } isecstack = *a1; section_object_seen = *a2; } void nrn_pushsec(Section* sec) { isecstack++; if (isecstack >= NSECSTACK) { int i = NSECSTACK; hoc_warning("section stack overflow", (char *)0); while (--i >= 0) { fprintf(stderr, "%*s%s\n", i, "", secname(secstack[i])); --i; } hoc_execerror("section stack overflow", (char *)0); } secstack[isecstack] = sec; if (sec) { #if 0 if (sec->prop && sec->prop->dparam[0].sym) { printf("pushsec %s\n", sec->prop->dparam[0].sym->name); }else{ printf("pushsec unnamed or deleted section\n"); } #endif ++sec->refcount; } } void nrn_popsec(void) { if (isecstack > 0) { Section* sec = secstack[isecstack--]; if (!sec) { return; } #if 0 if (sec->prop && sec->prop->dparam[0].sym) { printf("popsec %s\n", sec->prop->dparam[0].sym->name); }else{ printf("popsec unnamed or with no properties\n"); } #endif if (--sec->refcount <= 0) { #if 0 printf("sec freed after pop\n"); #endif nrn_section_free(sec); } } } void sec_access_pop(void) { nrn_popsec(); } #if 0 static void free_point_process(void) { free_all_point(); free_clamp(); free_stim(); free_syn(); } #endif #if 0 void clear_sectionlist(void) /* merely change all SECTION to UNDEF */ { printf("clear_sectionlist not fixed yet, doing nothing\n"); return; Symbol *s; free_point_process(); if (symlist) for (s=symlist->first; s; s = s->next) { if (s->type == SECTION) { s->type = UNDEF; no longer done this way see OPARINFO if (s->arayinfo) { free((char *)s->arayinfo); s->arayinfo = (Arrayinfo *)0; } } nrn_initcode(); secstack[0] = (Section *)0; } if (section) { sec_free(section, nsection); section = (Section *)0; nsection = 0; } } #endif void add_section(void) /* symbol at pc+1, number of indices at pc+2 */ { Symbol *sym; int nsub, size; Item** pitm; sym = (pc++)->sym; /*printf("declaring %s as section\n", sym->name);*/ if (sym->type == SECTION) { int total, i; total = hoc_total_array(sym); for (i=0; itype == UNDEF); sym->type = SECTION; hoc_install_object_data_index(sym); } nsub = (pc++)->i; if (nsub) { size = hoc_arayinfo_install(sym, nsub); }else{ size = 1; } hoc_objectdata[sym->u.oboff].psecitm = pitm = (Item **)emalloc(size*sizeof(Item*)); if (hoc_objectdata == hoc_top_level_data) { new_sections((Object*)0, sym, pitm, size); }else{ new_sections(hoc_thisobject, sym, pitm, size); } #if 0 printf("%s", s->name); for (i=0; iarayinfo->sub[i]);} printf(" is a section name\n"); #endif } Object* nrn_sec2cell(Section* sec) { if (sec->prop) { if (sec->prop->dparam[6].obj) { return sec->prop->dparam[6].obj; }else if (nrnpy_pysec_cell_p_) { Object* o = (*nrnpy_pysec_cell_p_)(sec); if (o) { --o->refcount; } return o; } } return (Object*)0; } int nrn_sec2cell_equals(Section* sec, Object* obj) { if (sec->prop) { if (sec->prop->dparam[6].obj) { return sec->prop->dparam[6].obj == obj; }else if (nrnpy_pysec_cell_equals_p_) { return (*nrnpy_pysec_cell_equals_p_)(sec, obj); } } return 0; } static Section* new_section(Object* ob, Symbol* sym, int i){ Section* sec; Prop* prop; static Symbol* nseg; double d; if (!nseg) { nseg = hoc_lookup("nseg"); } sec = sec_alloc(); section_ref(sec); prop = prop_alloc(&(sec->prop), CABLESECTION, (Node*)0); prop->dparam[0].sym = sym; prop->dparam[5].i = i; if (ob) { prop->dparam[6].obj = ob; }else{ prop->dparam[6].obj = (Object*)0; } #if USE_PYTHON prop->dparam[PROP_PY_INDEX]._pvoid = (void*)0; #endif nrn_pushsec(sec); d = (double)DEF_nseg; cable_prop_assign(nseg, &d, 0); tree_changed = 1; /*printf("new_section %s\n", secname(sec));*/ return sec; } void new_sections(Object* ob, Symbol* sym, Item** pitm, int size){ int i; for (i=0; i < size; ++i) { Section* sec = new_section(ob, sym, i); if (ob) { if (ob->secelm_) { pitm[i] = insertsec(ob->secelm_->next, sec); }else{ pitm[i] = lappendsec(section_list, sec); } ob->secelm_ = pitm[i]; }else{ pitm[i] = lappendsec(section_list, sec); } sec->prop->dparam[8].itm = pitm[i]; } } #if USE_PYTHON Section* nrnpy_newsection(void* v) { Item* itm; Section* sec; sec = new_section((Object*)0, (Symbol*)0, 0); sec->prop->dparam[PROP_PY_INDEX]._pvoid = v; itm = lappendsec(section_list, sec); sec->prop->dparam[8].itm = itm; return sec; } #endif void delete_section(void) { Section* sec; Object* ob; Item** pitm; Symbol* sym; int i; sec = chk_access(); if (!sec->prop->dparam[0].sym) { hoc_execerror("Cannot delete an unnamed section", (char*)0); } sym = sec->prop->dparam[0].sym; ob = sec->prop->dparam[6].obj; i = sec->prop->dparam[5].i; if (ob) { pitm = ob->u.dataspace[sym->u.oboff].psecitm + i; }else{ pitm = hoc_top_level_data[sym->u.oboff].psecitm + i; } sec_free(*pitm); *pitm = 0; hoc_retpushx(0.); } /* At this point, all the sections are cables and each section has the following properties (except for section 0). Only one property with 9 Datums section[i].prop->dparam[0].sym pointer to section symbol [1].val position (0--1) of connection to parent [2].val length of section in microns [3].val first node at position 0 or 1 [4].val rall branch [5].i aray index [6].obj pointer to the object pointer [7].val Ra [8].itm hoc_Item* with Section* as element [9]._pvoid NrnThread* [PROP_PY_INDEX].pvoid pointer to the Python Section object The first element allows us to find the symbol when we know the section number. If an array section the index can be computed with i - (section[i].sym)->u.u_auto */ double section_length(Section* sec) { double x; if (sec->recalc_area_ && sec->npt3d) { sec->prop->dparam[2].val = sec->pt3d[sec->npt3d - 1].arc; } x = sec->prop->dparam[2].val; if (x <= 1e-9) { x = sec->prop->dparam[2].val = 1e-9; } return x; } int arc0at0(Section* sec) { return ((sec->prop->dparam[3].val) ? 0 : 1); } double nrn_ra(Section* sec) { return sec->prop->dparam[7].val; } void cab_alloc(Prop* p) { Datum *pd; #if USE_PYTHON #define CAB_SIZE 11 #else #define CAB_SIZE 10 #endif pd = nrn_prop_datum_alloc(CABLESECTION, CAB_SIZE, p); pd[1].val = pd[3].val = 0.; pd[2].val = DEF_L; pd[4].val = DEF_rallbranch; pd[7].val = DEF_Ra; p->dparam = pd; p->param_size = CAB_SIZE; /* this one is special since it refers to dparam */ } void morph_alloc(Prop* p) { double *pd; pd = nrn_prop_data_alloc(MORPHOLOGY, 1, p); pd[0] = DEF_diam; /* microns */ diam_changed = 1; p->param = pd; p->param_size = 1; } double nrn_diameter(Node* nd) { Prop* p; p = nrn_mechanism(MORPHOLOGY, nd); return p->param[0]; } void nrn_chk_section(Symbol* s) { if (s->type != SECTION) { execerror("Not a SECTION name:", s->name); } } Section* chk_access(void) { Section* sec = secstack[isecstack]; if (!sec || !sec->prop) { /* use any existing section as a default section */ hoc_Item* qsec; ForAllSections(lsec) if (lsec->prop) { sec = lsec; ++sec->refcount; secstack[isecstack] = sec; /*printf("automatic default section %s\n", secname(sec));*/ break; } } } if (!sec) { execerror("Section access unspecified", (char *)0); } if (sec->prop) { return sec; }else{ execerror("Accessing a deleted section", (char*)0); } return NULL; /* never reached */ } Section* nrn_noerr_access(void) /* return 0 if no accessed section */ { Section* sec = secstack[isecstack]; if (!sec || !sec->prop) { /* use any existing section as a default section */ hoc_Item* qsec; ForAllSections(lsec) if (lsec->prop) { sec = lsec; ++sec->refcount; secstack[isecstack] = sec; /*printf("automatic default section %s\n", secname(sec));*/ break; } } } if (!sec) { return (Section*)0; } if (sec->prop) { return sec; }else{ return (Section*)0; } } /*sibling and child pointers do not ref sections to avoid mutual references */ /* the sibling list is ordered according to increasing distance from parent */ void nrn_remove_sibling_list(Section* sec) { Section* s; if (sec->parentsec) { if (sec->parentsec->child == sec) { sec->parentsec->child = sec->sibling; return; } for (s = sec->parentsec->child; s; s = s->sibling) { if (s->sibling == sec) { s->sibling = sec->sibling; return; } } } } static double ncp_abs(Section* sec) { double x = nrn_connection_position(sec); if (sec->parentsec) { if (!arc0at0(sec->parentsec)) { return 1. - x; } } return x; } void nrn_add_sibling_list(Section* sec) { Section* s; double x; if (sec->parentsec) { x = ncp_abs(sec); s = sec->parentsec->child; if (!s || x <= ncp_abs(s)) { sec->sibling = s; sec->parentsec->child = sec; return; } for (; s->sibling; s = s->sibling) { if (x <= ncp_abs(s->sibling)) { sec->sibling = s->sibling; s->sibling = sec; return; } } s->sibling = sec; sec->sibling = 0; } } static void reverse_sibling_list(Section* sec) { int scnt; Section* ch; Section** pch; for (scnt=0, ch = sec->child; ch; ++scnt, ch=ch->sibling) { hoc_pushobj((Object**)ch); } pch = &sec->child; while(scnt--) { Object** hoc_objpop(); ch = (Section*)hoc_objpop(); *pch = ch; pch = &ch->sibling; ch->parentnode = 0; } *pch = 0; } void disconnect(void) { nrn_disconnect(chk_access()); hoc_retpushx(0.); } static void reverse_nodes(Section* sec) { int i, j; Node* nd; /* printf("reverse %d nodes for %s\n", sec->nnode-1, secname(sec));*/ for (i=0, j=sec->nnode-2; i < j; ++i, --j) { nd = sec->pnode[i]; sec->pnode[i] = sec->pnode[j]; sec->pnode[i]->sec_node_index_ = i; sec->pnode[j] = nd; nd->sec_node_index_ = j; } } void nrn_disconnect(Section* sec) { Section* ch; Section* oldpsec = sec->parentsec; Node* oldpnode = sec->parentnode; if (!oldpsec) { return; } nrn_remove_sibling_list(sec); sec->parentsec = (Section*)0; sec->parentnode = (Node*)0; nrn_parent_info(sec); nrn_relocate_old_points(sec, oldpnode, sec, sec->parentnode); for (ch = sec->child; ch; ch = ch->sibling) if (nrn_at_beginning(ch)){ ch->parentnode = sec->parentnode; nrn_relocate_old_points(ch, oldpnode, ch, ch->parentnode); } section_unref(oldpsec); tree_changed = 1; } static void connectsec_impl(Section* parent, Section* sec) { Section* ch; Section* oldpsec = sec->parentsec; Node* oldpnode = sec->parentnode; double d1, d2; Datum *pd; d2 = xpop(); d1 = xpop(); if (d1 != 0. && d1 != 1.) { hoc_execerror(secname(sec), " must connect at position 0 or 1"); } if (d2 < 0. || d2 > 1.) { hoc_execerror(secname(sec), " must connect from 0<=x<=1 of parent"); } if (sec->parentsec) { fprintf(stderr, "Notice: %s(%g)", secname(sec), nrn_section_orientation(sec) ); fprintf(stderr, " had previously been connected to parent %s(%g)\n", secname(sec->parentsec), nrn_connection_position(sec) ); nrn_remove_sibling_list(sec); } if (nrn_section_orientation(sec) != d1) { reverse_sibling_list(sec); reverse_nodes(sec); } pd = sec->prop->dparam; pd[1].val = d2; pd[3].val = d1; section_ref(parent); sec->parentsec = parent; nrn_add_sibling_list(sec); sec->parentnode = (Node*)0; nrn_parent_info(sec); nrn_relocate_old_points(sec, oldpnode, sec, sec->parentnode); for (ch = sec->child; ch; ch = ch->sibling) if (nrn_at_beginning(ch)){ ch->parentnode = sec->parentnode; nrn_relocate_old_points(ch, oldpnode, ch, ch->parentnode); } if (oldpsec) { section_unref(oldpsec); }else if (oldpnode) { nrn_node_destruct1(oldpnode); } tree_changed = 1; diam_changed = 1; } void simpleconnectsection(void) /* 2 expr on stack and two sections on section stack */ /* for a prettier syntax: connect sec1(x), sec2(x) */ { Section* parent, *child; parent = nrn_sec_pop(); child = nrn_sec_pop(); connectsec_impl(parent, child); } void connectsection(void) /* 2 expr on stack and section symbol on section stack */ { Section* parent, *child; child = nrn_sec_pop(); parent = chk_access(); connectsec_impl(parent, child); } static Section* Sec_access(void) /* section symbol at pc */ { Objectdata* odsav; Object* obsav = 0; Symlist* slsav; Item* itm; Symbol *s = (pc++)->sym; if (!s) { return chk_access(); } if (s->public == 2) { s = s->u.sym; odsav = hoc_objectdata_save(); obsav = hoc_thisobject; slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; } nrn_chk_section(s); itm = OPSECITM(s)[range_vec_indx(s)]; if (obsav) { hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; } if (!itm) { hoc_execerror(s->name, ": section was deleted"); } return itm->element.sec; #if 0 printf("accessing %s with index %d\n", s->name, access_index); #endif } void sec_access(void) { /* access section */ Section** psec; Section* sec = chk_access(); ++sec->refcount; nrn_popsec(); psec = secstack + isecstack; if (*psec) { section_unref(*psec); } *psec = sec; } void sec_access_object(void) { /* access section */ Section** psec; Section* sec; if (! section_object_seen) { hoc_execerror("Access: Not a section", (char*)0); } sec = chk_access(); ++sec->refcount; nrn_popsec(); psec = secstack + isecstack; if (*psec) { section_unref(*psec); } *psec = sec; section_object_seen = 0; } void sec_access_push(void) { nrn_pushsec(Sec_access()); } Section* nrn_sec_pop(void) { Section* sec = chk_access(); nrn_popsec(); return sec; } void hoc_sec_internal_push(void) { Section* sec = (Section*)((pc++)->ptr); nrn_pushsec(sec); } void* hoc_sec_internal_name2ptr(const char* s, int eflag) { /* syntax is __nrnsec_0xff... and need to verify that ff... is a pointer to a Section. To avoid invalid memory read errors, we changed the section allocation/free in solve.c to use a SectionPool which allows checking to see if a void* is a possible Section* from the pool. */ int n; Section* sec; void* vp = NULL; int err = 0; n = strlen(s); if (n < 12 || strncmp(s, "__nrnsec_0x", 11) != 0) { err = 1; }else{ if (sscanf(s+9, "%p", &vp) != 1) { err = 1; } } if (err) { if (eflag) { hoc_execerror("Invalid internal section name:", s); }else{ hoc_warning("Invalid internal section name:", s); } return NULL; } sec = (Section*)vp; if (nrn_is_valid_section_ptr(vp) == 0 || !sec->prop || !sec->prop->dparam || !sec->prop->dparam[8].itm || sec->prop->dparam[8].itm->itemtype != SECTION) { if (eflag) { hoc_execerror("Section associated with internal name does not exist:", s); }else{ hoc_warning("Section associated with internal name does not exist:", s); } vp = NULL; } return vp; } /* in an object syntax a section may either be last or next to last in either case it is pushed when it is seen in hoc_object_component and section_object_seen is set. If it was last then this is called with it set and we do nothing. ie the section is on the stack till the end of the next statement. If it was second to last then it hoc_object_component will set it back to 0 and pop the section. Therefore we need to push a section below to keep the stack ok when it is popped at the end of the next statement. */ void ob_sec_access_push(Item* qsec) { if (!qsec) { hoc_execerror("section in the object was deleted", (char*)0); } nrn_pushsec(qsec->element.sec); } void ob_sec_access(void) { if (!section_object_seen) { hoc_nopop(); nrn_pushsec(secstack[isecstack]); } section_object_seen = 0; } /* For now there is always one more node than segments and the last node has no properties. This fact is spread everywhere in which nnode is dealt with */ void mech_access(void) { /* section symbol at pc */ Section* sec = chk_access(); Symbol* s = (pc++)->sym; mech_insert1(sec, s->subtype); } void mech_insert1(Section* sec, int type) { int n, i; Node *nd, **pnd; Prop *m; /* make sure that all nodes but last of the current section have this membrane type */ /* subsequent range variables refer to this mechanism */ /* For now, we assume: 1) Parameters for different mechanisms do not have to have distinct names. Thus access mech marks those symbols which are allowed. Another access section gets back to the geometry properties. 2) Membrane is installed in entire section. (except last node) */ /* Is the property already allocated*/ n = sec->nnode - 1; pnd = sec->pnode; nd = pnd[0]; #if METHOD3 /* For method3 the parent must also have the property. Also the last node may have it because one of the connecting sections have it. */ if (_method3) { Section* psec = sec->parentsec; /* must be in parent */ Node* pnd = sec->parentnode; if (!nrn_mechanism(s->subtype, pnd)) { prop_alloc(&pnd->prop, type, pnd); } /* method3 has mechanisms in the "zero area" node. */ n = sec->nnode; /* may already be in last node */ if (nrn_mechanism(type, sec->pnode[n - 1])) { --n; } } #endif m = nrn_mechanism(type, nd); if (!m) { /* all nodes get the property */ for (i = n - 1; i >= 0; i--) { IGNORE(prop_alloc(&(pnd[i]->prop), type, pnd[i])); } #if EXTRACELLULAR if (type == EXTRACELL) { prop_alloc(&(pnd[n]->prop), type, pnd[n]); /*even last node*/ /* if rootnode owned by section, it gets property as well*/ if (!sec->parentsec) { nd = sec->parentnode; if (nd) { prop_alloc(&nd->prop, type, nd); } } extcell_2d_alloc(sec); diam_changed = 1; } #endif } } void mech_uninsert(void) { Section* sec = chk_access(); Symbol* s = (pc++)->sym; mech_uninsert1(sec, s); } void mech_uninsert1(Section* sec, Symbol* s) { /* remove the mechanism from the currently accessed section */ int n, i; Prop *m, *mnext; int type = s->subtype; if (type == MORPHOLOGY #if EXTRACELLULAR || type == EXTRACELL #endif ) { hoc_warning("Can't uninsert mechanism", s->name); return; } if (nrn_is_ion(type)) { hoc_warning("Not allowed to uninsert ions at this time", s->name); return; } #if METHOD3 if (_method3) { hoc_execerror("Can't uninsert mechanisms when spatial method is non_zero", s->name); } #endif n = sec->nnode; for (i=0; i < n; ++i) { mnext = sec->pnode[i]->prop; if (mnext && mnext->type == type) { sec->pnode[i]->prop = mnext->next; single_prop_free(mnext); continue; } for (m = mnext; m; m = mnext) { mnext = m->next; if (mnext && mnext->type == type) { m->next = mnext->next; single_prop_free(mnext); break; } } } } void nrn_rangeconst(Section* sec, Symbol* s, double* pd, int op) { short n, i; Node *nd; int indx; double* dpr; double d = *pd; #if METHOD3 /* this is highly restrictive at this time. All parameters except morphology must be uniform across section connections because the density of channels is assumed to be uniform during matrix construction. ie the node does not know which side gets which value */ if (_method3) { n = sec->nnode; }else #endif n = sec->nnode - 1; if (s->u.rng.type == VINDEX) { nd = node_ptr(sec, 0., (double *)0); if (op) { *pd = hoc_opasgn(op, NODEV(nd), d); } NODEV(nd) = *pd; nd = node_ptr(sec, 1., (double *)0); if (op) { *pd = hoc_opasgn(op, NODEV(nd), d); } NODEV(nd) = *pd; for (i=0; ipnode[i]), d); } NODEV(sec->pnode[i]) = *pd; } }else{ if (s->u.rng.type == IMEMFAST){ hoc_execerror("i_membrane_ cannot be assigned a value", 0); } indx = range_vec_indx(s); if (s->u.rng.type == MORPHOLOGY) { if (!can_change_morph(sec)) { return; } diam_changed = 1; if (sec->recalc_area_ && op != 0) { nrn_area_ri(sec); } } for (i=0; iu.rng.type == MORPHOLOGY) { sec->recalc_area_ = 1; nrn_diam_change(sec); } #if EXTRACELLULAR if (s->u.rng.type == EXTRACELL) { if (s->u.rng.index == 0) { diam_changed = 1; } dpr = nrn_vext_pd(s, indx, node_ptr(sec, 0., (double*)0)); if (dpr) { if (op) { *dpr = hoc_opasgn(op, *dpr, d); }else{ *dpr = d; } } dpr = nrn_vext_pd(s, indx, node_ptr(sec, 1., (double*)0)); if (dpr) { if (op) { *dpr = hoc_opasgn(op, *dpr, d); }else{ *dpr = d; } } } #endif #if METHOD3 /* this is a hack and way too restrictive */ if (_method3) { /*the parent node also gets the value */ if (tree_changed) { setup_topology(); } *(dprop(s, indx, sec->parentsec, sec->parentnode)) = *pd; } #endif } } void range_const(void) /* rangevariable symbol at pc, value on stack */ { Section* sec; double d; int op; Symbol *s = (pc++)->sym; op = (pc++)->i; d = xpop(); sec = nrn_sec_pop(); nrn_rangeconst(sec, s, &d, op); hoc_pushx(d); } static int range_vec_indx(Symbol* s) { int indx; if (ISARRAY(s)) { indx = hoc_araypt(s, SYMBOL); }else{ indx = 0; } return indx; } Prop* nrn_mechanism(int type, Node* nd) /* returns property for mechanism at the node */ { Prop *m; for (m = nd->prop; m; m = m->next) { if (m->type == type) { break; } } return m; } /*returns prop given mech type, section, and inode */ /* error if mech not at this position */ Prop* nrn_mechanism_check(int type, Section* sec, int inode) { Prop *m; m = nrn_mechanism(type, sec->pnode[inode]); if (!m) { if (hoc_execerror_messages) { Fprintf(stderr, "%s mechanism not inserted in section %s\n", memb_func[type].sym->name, secname(sec)); } hoc_execerror("", (char *)0); } return m; } Prop* hoc_getdata_range(int type) { int inode; Section *sec; double x; nrn_seg_or_x_arg(1, &sec, &x); inode = node_index(sec, x); return nrn_mechanism_check(type, sec, inode); } static Datum* pdprop(Symbol* s, int indx, Section* sec, short inode) { /* basically copied from dprop for use to connect a nmodl POINTER */ Prop *m; m = nrn_mechanism_check(s->u.rng.type, sec, inode); return m->dparam + s->u.rng.index + indx; } void connectpointer(void) { /* pointer symbol at pc, target variable on stack, maybe range variable location on stack */ Datum *dat; double *pd, *hoc_pxpop(); double d; Symbol *s = (pc++)->sym; pd = hoc_pxpop(); if (s->subtype != NRNPOINTER) { hoc_execerror(s->name, "not a model variable POINTER"); } #if 0 /* can't be since parser sees object syntax and generates different code. */ if (s->type == NRNPNTVAR) { dat = ppnrnpnt(s); }else #endif { short i; Section* sec; d = xpop(); sec = nrn_sec_pop(); i = node_index(sec, d); dat = pdprop(s, range_vec_indx(s), sec, i); } dat->pval = pd; } void range_interpolate_single(void) /*symbol at pc, 2 values on stack*/ { double x, y; Symbol* s; Section* sec; double* pd, *nrn_rangepointer(); int op; s = (pc++)->sym; op = (pc++)->i; y = xpop(); x = xpop(); sec = nrn_sec_pop(); if (s->u.rng.type == MORPHOLOGY) { if (!can_change_morph(sec)) { return; } diam_changed = 1; if (sec->recalc_area_ && op != 0) { nrn_area_ri(sec); } } pd = nrn_rangepointer(sec, s, x); if (op) { y = hoc_opasgn(op, *pd, y); } *pd = y; if (s->u.rng.type == MORPHOLOGY) { sec->recalc_area_ = 1; nrn_diam_change(sec); } #if EXTRACELLULAR if (s->u.rng.type == EXTRACELL && s->u.rng.index == 0) { diam_changed = 1; } #endif } void range_interpolate(void) /*symbol at pc, 4 values on stack*/ { short i, i1, i2, di; Section* sec; double y1, y2, x1, x2, x, dx, thet, y; double* dpr; Symbol *s = (pc++)->sym; int indx, op; Node *nd; op = (pc++)->i; #if METHOD3 if (_method3) { hoc_execerror("Range variable interpolation not implemented", "for new spatial discretization methods"); } #endif y2 = xpop(); y1 = xpop(); x2 = xpop(); x1 = xpop(); dx = x2 - x1; if (dx < 1e-10) { hoc_execerror("range variable notation r(x1:x2) requires"," x1 > x2"); } sec = nrn_sec_pop(); di = nrn_section_orientation(sec) ? -1 : 1; i2 = node_index(sec, x2) + di; i1 = node_index(sec, x1); if (s->u.rng.type == VINDEX) { if (x1 == 0. || x1 == 1.) { nd = node_ptr(sec, x1, (double *)0); if (op) { NODEV(nd) = hoc_opasgn(op, NODEV(nd), y1); }else{ NODEV(nd) = y1; } } if (x2 == 1. || x2 == 0.) { nd = node_ptr(sec, x2, (double *)0); if (op) { NODEV(nd) = hoc_opasgn(op, NODEV(nd), y2); }else{ NODEV(nd) = y2; } } for (i=i1; i != i2; i += di) { nd = sec->pnode[i]; x = ((double)i + .5)/(sec->nnode - 1); if (di < 0) { x = 1. - x; } thet = (x - x1)/dx; if (thet >= -1e-9 && thet <= 1.+1e-9) { y = y1*(1.- thet) + y2*thet; if (op) { NODEV(nd) = hoc_opasgn(op, NODEV(nd), y); }else{ NODEV(nd) = y; } } } return; } if (s->u.rng.type == IMEMFAST){ hoc_execerror("i_membrane_ cannot be assigned a value", 0); } if (s->u.rng.type == MORPHOLOGY) { if (!can_change_morph(sec)) { return; } diam_changed = 1; } indx = range_vec_indx(s); for (i=i1; i != i2; i += di) { dpr = dprop(s, indx, sec, i); x = ((double)i + .5)/(sec->nnode - 1); if (di < 0) { x = 1. - x; } thet = (x - x1)/dx; if (thet >= -1e-9 && thet <= 1.+1e-9) { y = y1*(1.- thet) + y2*thet; if (op) { *dpr = hoc_opasgn(op, *dpr, y); }else{ *dpr = y; } } } if (s->u.rng.type == MORPHOLOGY) { sec->recalc_area_ = 1; nrn_diam_change(sec); } #if EXTRACELLULAR if (s->u.rng.type == EXTRACELL && s->u.rng.index == 0) { diam_changed = 1; } if (s->u.rng.type == EXTRACELL) { if (x1 == 0. || x1 == 1.) { dpr = nrn_vext_pd(s, indx, node_ptr(sec, x1, (double*)0)); if (dpr) { if (op) { *dpr = hoc_opasgn(op, *dpr, y1); }else{ *dpr = y1; } } } if (x2 == 1. || x2 == 0.) { dpr = nrn_vext_pd(s, indx, node_ptr(sec, x2, (double*)0)); if (dpr) { if (op) { *dpr = hoc_opasgn(op, *dpr, y2); }else{ *dpr = y2; } } } } #endif } int nrn_exists(Symbol* s, Node* node) { if (s->u.rng.type == VINDEX) { return 1; }else if (nrn_mechanism(s->u.rng.type, node)) { return 1; #if EXTRACELLULAR }else if (nrn_vext_pd(s, 0, node)) { return 1; #endif }else if (s->u.rng.type == IMEMFAST && nrn_use_fast_imem){ return 1; }else{ return 0; } } double* nrn_rangepointer(Section* sec, Symbol* s, double d) { /* if you change this change nrnpy_rangepointer as well */ short i; Node *nd; int indx; if (s->u.rng.type == VINDEX) { nd = node_ptr(sec, d, (double *)0); return &NODEV(nd); } if (s->u.rng.type == IMEMFAST) { if (nrn_use_fast_imem) { nd = node_ptr(sec, d, (double *)0); if (!nd->_nt) { v_setup_vectors(); assert(nd->_nt); } return nd->_nt->_nrn_fast_imem->_nrn_sav_rhs + nd->v_node_index; }else{ hoc_execerror("cvode.use_fast_imem(1) has not been executed so i_membrane_ does not exist", 0); } } indx = range_vec_indx(s); #if EXTRACELLULAR if (s->u.rng.type == EXTRACELL) { double* pd; pd = nrn_vext_pd(s, indx, node_ptr(sec, d, (double*)0)); if (pd) { return pd; } } #endif i = node_index(sec, d); return dprop(s, indx, sec, i); } /* return nil if failure instead of hoc_execerror and return pointer to the 0 element if an array */ double* nrnpy_rangepointer(Section* sec, Symbol* s, double d, int* err) { /* if you change this change nrnpy_rangepointer as well */ short i; Node *nd; *err = 0; if (s->u.rng.type == VINDEX) { return &NODEV(node_ptr(sec, d, (double *)0)); } if (s->u.rng.type == IMEMFAST) { if (nrn_use_fast_imem) { nd = node_ptr(sec, d, (double *)0); if (!nd->_nt) { v_setup_vectors(); assert(nd->_nt); } return nd->_nt->_nrn_fast_imem->_nrn_sav_rhs + nd->v_node_index; }else{ return (double*)0; } } #if EXTRACELLULAR if (s->u.rng.type == EXTRACELL) { double* pd; nd = node_ptr(sec, d, (double*)0); pd = nrn_vext_pd(s, 0, nd); if (pd) { return pd; } } #endif i = node_index(sec, d); return nrnpy_dprop(s, 0, sec, i, err); } void rangevarevalpointer(void) /* symbol at pc, location on stack, return pointer on stack */ { short i; Section* sec; double d; Symbol *s = (pc++)->sym; Node *nd; int indx; d = xpop(); sec = nrn_sec_pop(); if (s->u.rng.type == VINDEX) { nd = node_ptr(sec, d, (double *)0); hoc_pushpx(&NODEV(nd)); return; } if (s->u.rng.type == IMEMFAST) { if (nrn_use_fast_imem) { nd = node_ptr(sec, d, (double *)0); if (!nd->_nt) { v_setup_vectors(); assert(nd->_nt); } hoc_pushpx(nd->_nt->_nrn_fast_imem->_nrn_sav_rhs + nd->v_node_index); }else{ hoc_execerror("cvode.use_fast_imem(1) has not been executed so i_membrane_ does not exist", 0); } return; } indx = range_vec_indx(s); if (s->u.rng.type == MORPHOLOGY && sec->recalc_area_) { nrn_area_ri(sec); } if (s->u.rng.type == EXTRACELL) { double* pd; pd = nrn_vext_pd(s, indx, node_ptr(sec, d, (double*)0)); if (pd) { hoc_pushpx(pd); return; } } i = node_index(sec, d); hoc_pushpx(dprop(s, indx, sec, i)); } void rangevareval(void) /* symbol at pc, location on stack, return value on stack */ { double *pd, *hoc_pxpop(); rangevarevalpointer(); pd = hoc_pxpop(); hoc_pushx(*pd); } void rangepoint(void) /* symbol at pc, return value on stack */ { hoc_pushx(.5); rangevareval(); } int node_index(Section* sec, double x) /* returns nearest index to x */ { int i; double n; if (x < 0. || x > 1.) { hoc_execerror("range variable domain is 0<=x<=1", (char *)0); } #if METHOD3 if (_method3) { n = sec->nnode; }else #endif n = (double)(sec->nnode - 1); assert(n >= 0.); i = n*x; if (i == (int)n) { i = n - 1; } if (sec->prop->dparam[3].val) { i = n - i - 1; } return i; } /* return -1 if x at connection end, nnode-1 if at other end */ int node_index_exact(Section* sec, double x) { if (x == 0.) { if (arc0at0(sec)) { return -1; }else{ return sec->nnode - 1; } }else if ( x == 1.) { if (arc0at0(sec)) { return sec->nnode - 1; }else{ return -1; } }else{ return node_index(sec, x); } } /*USERPROPERTY subtype of VAR used for non range variables associated with section property may have special actions (eg. nseg)*/ double cable_prop_eval(Symbol* sym) { Section* sec; sec = nrn_sec_pop(); switch(sym->u.rng.type) { case 0: /* not in property list so must be nnode */ #if METHOD3 if (_method3) { return (double) sec->nnode; }else #endif return (double) sec->nnode - 1; case CABLESECTION: return sec->prop->dparam[sym->u.rng.index].val; default: hoc_execerror(sym->name, " not a USERPROPERTY"); } return 0.; } double* cable_prop_eval_pointer(Symbol* sym) { Section* sec; sec = nrn_sec_pop(); switch(sym->u.rng.type) { case CABLESECTION: return &sec->prop->dparam[sym->u.rng.index].val; default: hoc_execerror(sym->name, " not a USERPROPERTY that can be pointed to"); } return (double *)0; } #if KEEP_NSEG_PARM int keep_nseg_parm_; void keep_nseg_parm(void) { int i = keep_nseg_parm_; keep_nseg_parm_ = (int)chkarg(1, 0., 1.); hoc_retpushx((double)i); } #endif void nrn_change_nseg(Section* sec, int n) { if (n > 32767.) { n = 1; fprintf(stderr, "requesting %s.nseg=%d but the maximum value is 32767.\n", secname(sec), n); hoc_warning("nseg too large, setting to 1.", (char*)0); } if (n < 1) { hoc_execerror("nseg", " must be positive"); } #if METHOD3 if (_method3) { --n; } #else if (sec->nnode == n + 1) { return; }else #endif { Node** pnd; int i; int nold = sec->nnode; node_alloc(sec, (short)n + 1); tree_changed = 1; diam_changed = 1; sec->recalc_area_ = 1; pnd = sec->pnode; #if METHOD3 if (_method3) { ++n; } #endif #if KEEP_NSEG_PARM if(!keep_nseg_parm_ || nold == 0) #endif for (i=0; iprop), MORPHOLOGY, pnd[i])); IGNORE(prop_alloc(&(pnd[i]->prop), CAP, pnd[i])); } } } void cable_prop_assign(Symbol* sym, double* pd, int op) { Section* sec; sec = nrn_sec_pop(); switch(sym->u.rng.type) { case 0: /* not in property list so must be nnode */ if (op) { *pd = hoc_opasgn(op, (double)(sec->nnode - 1), *pd); } nrn_change_nseg(sec, (int)(*pd)); break; case CABLESECTION: if (sym->u.rng.index == 2) { if (can_change_morph(sec)) { if (op) { *pd = hoc_opasgn(op, sec->prop->dparam[2].val, *pd); } sec->prop->dparam[2].val = *pd; nrn_length_change(sec, *pd); diam_changed = 1; sec->recalc_area_ = 1; } }else{ if (op) { *pd = hoc_opasgn(op, sec->prop->dparam[sym->u.rng.index].val, *pd); } diam_changed = 1; sec->recalc_area_ = 1; sec->prop->dparam[sym->u.rng.index].val = *pd; } #if RA_WARNING if (sym->u.rng.index == 7) { ++nrn_ra_set; } #endif break; default: hoc_execerror(sym->name, " not a USERPROPERTY"); } } /* x of parent for this section */ double nrn_connection_position(Section* sec) { return sec->prop->dparam[1].val; } /* x=0,1 end connected to parent */ double nrn_section_orientation(Section* sec) { return sec->prop->dparam[3].val; } int nrn_at_beginning(Section* sec) { assert(sec->parentsec); return nrn_connection_position(sec) == nrn_section_orientation(sec->parentsec); } static void nrn_rootnode_alloc(Section* sec) { Extnode* nde; Node* nrn_node_construct1(); sec->parentnode = nrn_node_construct1(); sec->parentnode->sec = sec; #if EXTRACELLULAR if (sec->pnode[0]->extnode) { prop_alloc(&sec->parentnode->prop, EXTRACELL, sec->parentnode); extcell_node_create(sec->parentnode); } #endif } Section* nrn_trueparent(Section* sec) { Section* psec; for (psec = sec->parentsec; psec; psec = psec->parentsec) { if (nrn_at_beginning(sec)) { sec = psec; }else{ break; } } return psec; } void nrn_parent_info(Section* s) { /* determine the parentnode using only the authoritative info of parentsec and arc length connection position */ /* side effects are that on exit, s will have the right parentnode and the true parent (not connected to any section) will have the right parentnode */ Section* sec, *psec, *true_parent; Node* pnode; double x; true_parent = (Section*)0; for (sec = s, psec = sec->parentsec; psec; sec = psec, psec = sec->parentsec) { if (psec == s) { fprintf(stderr, "%s connection to ", secname(s)); fprintf(stderr, "%s will form a loop\n", secname(s->parentsec)); nrn_disconnect(s); hoc_execerror(secname(s), "connection will form loop"); } x = nrn_connection_position(sec); if (x != nrn_section_orientation(psec)) { true_parent = psec; if (x == 1. || x == 0.) { pnode = psec->pnode[psec->nnode - 1]; }else{ pnode = psec->pnode[node_index(psec, x)]; } break; } } if (true_parent == (Section*)0) { if (sec->parentnode) { /* non nil parent node in section without a parent is definitely valid */ pnode = sec->parentnode; }else{ nrn_rootnode_alloc(sec); pnode = sec->parentnode; } } s->parentnode = pnode; } void setup_topology(void) { Item* qsec; /* use connection info in section property to connect nodes. */ /* for the moment we assume uniform dx and range 0-1 */ /* Sections may be connected to a parent at an orientation (usually 0) at which the node belongs to some ancestor of the parent. All difficulties derive from that fact. ie. the parentnode may not belong to the parentsec. And parent nodes may be invalid. And if they are valid then we want to maintain the useful info such as point processes which are in them. ie, we only change the parentnode here if it is invalid. */ nrn_global_ncell = 0; ForAllSections(sec) #if 0 if (sec->nnode < 1) { /* last node is not a segment */ hoc_execerror(secname(sec), " has no segments"); } #else assert(sec->nnode > 0); #endif nrn_parent_info(sec); if (!sec->parentsec) { ++nrn_global_ncell; } } #if METHOD3 if (_method3) { int i; Node* nd = root/*obsolete*/section->pnode; for (i=0; iprop) { if (sec->prop->dparam[0].sym) { s = sec->prop->dparam[0].sym; indx = sec->prop->dparam[5].i; ob = sec->prop->dparam[6].obj; if (ob) { Sprintf(name, "%s.%s%s", hoc_object_name(ob), s->name, hoc_araystr(s, indx, ob->u.dataspace)); }else{ Sprintf(name, "%s%s", s->name, hoc_araystr(s, indx, hoc_top_level_data)); } #if USE_PYTHON }else if (sec->prop->dparam[PROP_PY_INDEX]._pvoid) { assert(nrnpy_pysec_name_p_); return (*nrnpy_pysec_name_p_)(sec); #endif }else{ name[0] = '\0'; } }else{ name[0] = '\0'; } return name; } void section_owner(void) { Section* sec; Object* ob; sec = chk_access(); ob = nrn_sec2cell(sec); hoc_ret(); hoc_push_object(ob); } char* hoc_section_pathname(Section* sec) { Symbol* s; int indx; static char name[200]; Object* ob; if (sec && sec->prop && sec->prop->dparam[0].sym) { s = sec->prop->dparam[0].sym; indx = sec->prop->dparam[5].i; ob = sec->prop->dparam[6].obj; if (ob) { char* p = hoc_object_pathname(ob); if (p) { Sprintf(name, "%s.%s%s", p, s->name, hoc_araystr(s, indx, ob->u.dataspace)); }else{ hoc_warning("Can't find a pathname for", secname(sec)); strcpy(name, secname(sec)); return name; } }else{ Sprintf(name, "%s%s", s->name, hoc_araystr(s, indx, hoc_objectdata)); } }else if (sec && sec->prop && sec->prop->dparam[PROP_PY_INDEX]._pvoid) { sprintf(name, "__nrnsec_%p", sec); }else{ name[0] = '\0'; } return name; } double nrn_arc_position(Section* sec, Node* node) { int inode; double x; assert(sec); if (sec->parentnode == node) { x = 0.; }else if ((inode = node->sec_node_index_) == sec->nnode-1) { x = 1.; }else{ x = ((double)inode+.5)/((double)sec->nnode - 1.); } if (arc0at0(sec)) { return x; }else{ return 1. - x; } } #if 0 double nrn_arc_position(Section* sec, int i) { double x; int n; n = sec->nnode - 1; if (i == n) { x = 1.; }else{ #if METHOD3 if (_method3) { x = (i+1)/((double)n); }else #endif x = (i+.5)/((double)n); } if (sec->prop->dparam[3].val) { x = 1. - x; } return x; } #endif const char* sec_and_position(Section* sec, Node* nd) { const char* buf; static char buf1[200]; double x; assert(sec); buf = secname(sec); x = nrn_arc_position(sec, nd); sprintf(buf1, "%s(%g)", buf, x); return buf1; } int segment_limits(double* pdx) { int n; Section* sec; double l; sec = chk_access(); #if METHOD3 if (_method3) { n = sec->nnode; }else #endif n = sec->nnode - 1; /* l = sec->prop->dparam[2].val;*/ l = 1.; *pdx = l/((double)n); return sec->nnode; } #undef PI #define PI 3.14159265358979323846 Node* node_exact(Section* sec, double x) { /* like node_index but give proper node when x is 0 or 1 as well as in between */ Node* node; assert(sec); #if METHOD3 if (_method3) { inode = (int)(x*sec->nnode + .5); /* ranges from 0 to nnode */ if (tree_changed) { setup_topology(); } if(sec->prop->dparam[3].val) { inode = sec->nnode - inode; } --inode; if (inode < 0) { inode = sec->parentnode; sec = sec->parentsec; *psec = sec; } }else #endif { if (x <= 0. || x >= 1.) { x = (x < 0.)?0.:x; x = (x > 1.)?1.:x; if(sec->prop->dparam[3].val) { x = 1. - x; } if (x == 0.) { if (tree_changed) { setup_topology(); } node = sec->parentnode; } else { node = sec->pnode[sec->nnode - 1]; } } else { node = sec->pnode[node_index(sec, x)]; } } return node; } Node* node_ptr(Section* sec, double x, double* parea) { /* returns pointer to proper node and the area of the node */ Node *nd; nd = node_exact(sec, x); if(parea) { if (nd->sec->recalc_area_) { nrn_area_ri(nd->sec); } *parea = NODEAREA(nd); } return nd; } int nrn_get_mechtype(const char* mechname) { Symbol* s; s = hoc_lookup(mechname); assert(s); if (s->type == TEMPLATE) { s = hoc_table_lookup(mechname, s->u.template->symtable); assert(s && s->type == MECHANISM); } return s->subtype; } #if VECTORIZE int nrn_instance_count(int mechtype) { if (v_structure_change) { v_setup_vectors(); } return memb_list[mechtype].nodecount; } #endif #if EXTRACELLULAR /* want to handle vext(0), vext(1) correctly. No associated i_membrane though.*/ /* otherwise return correct pointer to vext if it exists return pointer to zero if a child node has extnode return 0 if symbol is not vext. */ double* nrn_vext_pd(Symbol* s, int indx, Node* nd) { static double zero; if (s->u.rng.type != EXTRACELL) {return (double*)0;} #if I_MEMBRANE if (s->u.rng.index != 3*(nlayer) + 2) {return (double*)0;} #else /* not I_MEMBRANE */ if (s->u.rng.index != 3*(nlayer) + 1) {return (double*)0;} #endif zero = 0.; if (nd->extnode) { return nd->extnode->v + indx; }else{ Section* sec; /* apparently not maintaining Node.child */ /*for (sec = nd->child; sec; sec = sec->sibling) {*/ for (sec = nd->sec->child; sec; sec = sec->sibling) { if (sec->pnode[0]->extnode) { return &zero; } } return (double*)0; } } #endif /* if you change this then change nrnpy_dprop as well */ /* returns location of property symbol */ double* dprop(Symbol* s, int indx, Section* sec, short inode) { Prop *m; m = nrn_mechanism_check(s->u.rng.type, sec, inode); #if EXTRACELLULAR /* this does not handle vext(0) and vext(1) properly at this time */ #if I_MEMBRANE if (m->type == EXTRACELL && s->u.rng.index == 3*(nlayer) + 2) { #else if (m->type == EXTRACELL && s->u.rng.index == 3*(nlayer) + 1) { #endif return sec->pnode[inode]->extnode->v + indx; } #endif if (s->subtype != NRNPOINTER) { if (m->ob) { return m->ob->u.dataspace[s->u.rng.index].pval + indx; }else{ return &(m->param[s->u.rng.index]) + indx; } }else{ double **p = &((m->dparam)[s->u.rng.index + indx].pval); if (!(*p)) { hoc_execerror(s->name, "wasn't made to point to anything"); } return *p; } } /* return nil instead of hoc_execerror. */ /* returns location of property symbol */ double* nrnpy_dprop(Symbol* s, int indx, Section* sec, short inode, int* err) { Prop *m; m = nrn_mechanism(s->u.rng.type, sec->pnode[inode]); if (!m) { *err = 1; return (double*)0; } #if EXTRACELLULAR /* this does not handle vext(0) and vext(1) properly at this time */ #if I_MEMBRANE if (m->type == EXTRACELL && s->u.rng.index == 3*(nlayer) + 2) { #else if (m->type == EXTRACELL && s->u.rng.index == 3*(nlayer) + 1) { #endif return sec->pnode[inode]->extnode->v + indx; } #endif if (s->subtype != NRNPOINTER) { if (m->ob) { return m->ob->u.dataspace[s->u.rng.index].pval + indx; }else{ return &(m->param[s->u.rng.index]) + indx; } }else{ double **p = &((m->dparam)[s->u.rng.index + indx].pval); if (!(*p)) { *err = 2; } return *p; } } static char* objectname(void) { static char buf[100]; if (hoc_thisobject) { Sprintf(buf, "%s", hoc_object_name(hoc_thisobject)); }else{ buf[0] = '\0'; } return buf; } #define relative(pc) (pc + (pc)->i) void forall_section(void) { /*statement pointed to by pc continuation pointed to by pc+1. template used is shortfor in code.c of hoc system. */ /* if inside object then forall refers only to sections in the object */ Inst *savepc = pc; Item* qsec, *first, *last; extern int hoc_returning; char buf[200]; char** s; char** hoc_strpop(); int istk; /* fast forall within an object asserts that the object sections are contiguous and secelm_ is the last. */ if (hoc_thisobject) { qsec = hoc_thisobject->secelm_; if (qsec) { for (first = qsec; first->prev->itemtype && hocSEC(first->prev)->prop->dparam[6].obj == hoc_thisobject; first = first->prev) { ; } last = qsec->next; }else{ first = (Item*)0; last = (Item*)0; } }else{ first = section_list->next; last = section_list; } s = hoc_strpop(); buf[0] = '\0'; if (s) { sprintf(buf, "%s.*%s.*", objectname(), *s); }else{ char* o = objectname(); if (o[0]) { sprintf(buf, "%s.*", o); } } istk = nrn_isecstack(); /* do the iteration safely. a possible command is to delete the section*/ for (qsec = first; qsec != last;) { Section* sec = hocSEC(qsec); qsec = qsec->next; if (buf[0]) { hoc_regexp_compile(buf); if (! hoc_regexp_search(secname(sec))) { continue; } } nrn_pushsec(sec); hoc_execute(relative(savepc)); nrn_popsec(); if (hoc_returning) { nrn_secstack(istk); } if (hoc_returning == 1 || hoc_returning == 4) { break; }else if (hoc_returning == 2) { hoc_returning = 0; break; }else{ hoc_returning = 0; } } if (!hoc_returning) pc =relative(savepc+1); } void hoc_ifsec(void) { Inst *savepc = pc; char buf[200]; char** s; char** hoc_strpop(); extern int hoc_returning; s = hoc_strpop(); sprintf(buf, ".*%s.*", *s); hoc_regexp_compile(buf); if (hoc_regexp_search(secname(chk_access()))) { hoc_execute(relative(savepc)); } if (!hoc_returning) pc = relative(savepc+1); } void issection(void) { /* returns true if string is the access section */ hoc_regexp_compile(gargstr(1)); if (hoc_regexp_search(secname(chk_access()))) { hoc_retpushx(1.); }else{ hoc_retpushx(0.); } } int has_membrane(char* mechanism_name, Section* sec) { /* return true if string is an inserted membrane in the section sec */ Prop* p; for (p = sec->pnode[0]->prop; p; p = p->next) { if (strcmp(memb_func[p->type].sym->name, mechanism_name) == 0) { return(1); } } return(0); } void ismembrane(void) { /* return true if string is an inserted membrane in the access section */ char *str; Prop *p; str = gargstr(1); hoc_retpushx((double) has_membrane(str, chk_access())); } const char* secaccessname(void) { return secname(chk_access()); } void sectionname(void) { const char *buf; char **cpp; buf = secname(chk_access()); cpp = hoc_pgargstr(1); hoc_assign_str(cpp, buf); hoc_retpushx(1.); } void hoc_secname(void) { static char* buf = (char*)0; if (!buf) { buf = (char*)emalloc(256*sizeof(char)); } strcpy(buf,secname(chk_access())); hoc_ret(); hoc_pushstr(&buf); } void this_section(void) { /* return section number of currently accessed section at arc length postition x */ Section* sec; sec = chk_access(); hoc_retpushx((double)(size_t)(sec)); } void this_node(void) { /* return node number of currently accessed section at arc length postition x */ Section* sec; Node* nd; sec = chk_access(); nd = node_exact(sec, *getarg(1)); hoc_retpushx((double)(size_t)nd); } void parent_section(void) { /* return section number of currently accessed section at arc length postition x */ Section* sec; sec = chk_access(); hoc_retpushx((double)(size_t)(sec->parentsec)); } void parent_connection(void) { Section* sec; sec = chk_access(); hoc_retpushx(nrn_connection_position(sec)); } void section_orientation(void) { Section* sec; sec = chk_access(); hoc_retpushx(nrn_section_orientation(sec)); } void parent_node(void) { Section* sec; hoc_execerror("parent_node() needs to be re-implemented", 0); sec = chk_access(); hoc_retpushx((double)(size_t)(sec->parentnode)); } void pop_section(void) { --skip_secstack_check; if (skip_secstack_check < 0) { skip_secstack_check = 0; } nrn_popsec(); hoc_retpushx(1.); } /* turn off section stack fixing (in case of return,continue,break in a section statement) between exlicit user level push_section,etc and pop_section */ void hoc_level_pushsec(Section* sec) { ++skip_secstack_check; nrn_pushsec(sec); } void push_section(void) { Section* sec; if (hoc_is_str_arg(1)) { Item* qsec; char* s; sec = (Section*)0; s = gargstr(1); ForAllSections(sec1) /* I can't imagine a more inefficient way */ if (strcmp(s, secname(sec1)) == 0) { sec = sec1; break; } } if (!sec) { hoc_execerror("push_section: arg not a sectionname:", s); } }else{ sec = (Section*)(size_t)(*getarg(1)); } if (!sec || !sec->prop || !sec->prop->dparam || !sec->prop->dparam[8].itm || sec->prop->dparam[8].itm->itemtype != SECTION) { hoc_execerror("Not a Section pointer", (char*)0); } hoc_level_pushsec(sec); hoc_retpushx(1.0); } #if FISHER void assign_hoc_str(char* str, char* val, int global) /* Assign hoc string in global dataspace if global == 1, else use current dataspace. */ { Symbol *sym; char** pstr; Objectdata* obdsave = hoc_objectdata; /* save current dataspace */ if (!global && hoc_thisobject) { sym = hoc_table_lookup(str, hoc_thisobject->template->symtable); }else{ hoc_objectdata = hoc_top_level_data; sym = hoc_lookup(str); } if (sym && sym->type == STRING) { /* point to string */ pstr = OPSTR(sym); hoc_assign_str(pstr, val); } hoc_objectdata = obdsave; } #endif Section* nrn_section_exists(char* name, int indx, Object* cell) { Section* sec = (Section*)0; Symbol* sym = (Symbol*)0; Object* obj = cell; Objectdata* obd; Item* itm; if (obj) { sym = hoc_table_lookup(name, obj->template->symtable); /* if external then back to top level */ if (sym && sym->public == 2) { sym = sym->u.sym; obj = (Object*)0; } }else{ sym = hoc_table_lookup(name, hoc_top_level_symlist); } if (sym) { if (sym->type == SECTION) { if (obj) { obd = obj->u.dataspace; }else{ obd = hoc_top_level_data; } if (indx < hoc_total_array_data(sym, obd)) { itm = *(obd[sym->u.oboff].psecitm + indx); if (itm) { sec = itm->element.sec; } } } } return sec; } void section_exists(void) { int iarg, indx; Section* sec; Object* obj; char *str, *cp, buf[100]; obj = (Object*)0; sec = (Section*)0; iarg = 1; str = gargstr(iarg++); indx = 0; if (ifarg(iarg) && hoc_is_double_arg(iarg)) { indx = (int)chkarg(iarg++, 0., 1e9); }else{ /* if [integer] present, then extract the value and the basename */ if (sscanf(str, "%[^[][%d", buf, &indx) == 2) { str = buf; } } if (ifarg(iarg)) { obj = *hoc_objgetarg(iarg); } sec = nrn_section_exists(str, indx, obj); hoc_retpushx((double)(sec && sec->prop)); } neuron-7.5/src/nrnoc/cabvars.h000077500000000000000000000030571323325274500164110ustar00rootroot00000000000000/* /local/src/master/nrn/src/nrnoc/cabvars.h,v 1.5 1999/02/05 18:09:50 hines Exp */ #define XMECH 0 static struct { /* USERPROPERTY */ char *name; short type; short index; } usrprop[] = { "nseg", 0, 0, "L", 1, 2, "rallbranch", 1, 4, "Ra", 1, 7, 0, 0, 0 }; extern void capac_reg_(), passive0_reg_(), _passive_reg_(), #if EXTRACELLULAR extracell_reg_(), #endif _stim_reg_(), _syn_reg_(), _expsyn_reg_(), _exp2syn_reg_(), _svclmp_reg_(), _vclmp_reg_(), _oclmp_reg_(), _apcount_reg_(), _netstim_reg_(), _intfire1_reg_(), _intfire2_reg_(), _intfire4_reg_(), _ppmark_reg_(), _pattern_reg_(), #if XMECH _xmech_reg_(), #endif _feature_reg_(), _hh_reg_(); static Pfrv mechanism[] = { /* type will start at 3 */ capac_reg_, _passive_reg_, #if EXTRACELLULAR /* extracellular requires special handling and must be type 5 */ extracell_reg_, #endif passive0_reg_, /* twice as fast as model description? */ _stim_reg_, _syn_reg_, _expsyn_reg_, _exp2syn_reg_, _svclmp_reg_, _vclmp_reg_, _oclmp_reg_, _apcount_reg_, _hh_reg_, _feature_reg_, _netstim_reg_, _intfire1_reg_, _intfire2_reg_, _intfire4_reg_, _ppmark_reg_, _pattern_reg_, #if XMECH _xmech_reg_, #endif 0 }; static const char *morph_mech[] = { /* this is type 2 */ "0", "morphology", "diam", 0,0,0, }; extern void cab_alloc(Prop*); extern void morph_alloc(Prop*); extern Memb_func* memb_func; #if 0 first two memb_func NULL_CUR, NULL_ALLOC, NULL_STATE, NULL_INITIALIZE, (Pfri)0, 0, /*Unused*/ NULL_CUR, cab_alloc, NULL_STATE, NULL_INITIALIZE, (Pfri)0, 0, /*CABLESECTION*/ #endif neuron-7.5/src/nrnoc/capac.c000077500000000000000000000063401323325274500160300ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/capac.c,v 1.6 1998/11/25 19:14:28 hines Exp */ #include "section.h" #include "membdef.h" #include "nrniv_mf.h" static const char *mechanism[] = { "0", "capacitance", "cm",0, "i_cap", 0,0 }; static void cap_alloc(Prop*); static void cap_init(NrnThread*, Memb_list*, int); #define nparm 2 void capac_reg_(void) { int mechtype; /* all methods deal with capacitance in special ways */ register_mech(mechanism, cap_alloc, (Pvmi)0, (Pvmi)0, (Pvmi)0, cap_init, -1, 1); mechtype = nrn_get_mechtype(mechanism[1]); hoc_register_prop_size(mechtype, nparm, 0); } #define cm vdata[i][0] #define i_cap vdata[i][1] /* cj is analogous to 1/dt for cvode and daspk for fixed step second order it is 2/dt and for pure implicit fixed step it is 1/dt It used to be static but is now a thread data variable */ void nrn_cap_jacob(NrnThread* _nt, Memb_list* ml) { int count = ml->nodecount; Node **vnode = ml->nodelist; double **vdata = ml->data; int i; double cfac = .001 * _nt->cj; #if CACHEVEC if (use_cachevec) { int* ni = ml->nodeindices; for (i=0; i < count; i++) { VEC_D(ni[i]) += cfac*cm; } }else #endif /* CACHEVEC */ { for (i=0; i < count; ++i) { NODED(vnode[i]) += cfac*cm; } } } static void cap_init(NrnThread* _nt, Memb_list* ml, int type ) { int count = ml->nodecount; double **vdata = ml->data; int i; for (i=0; i < count; ++i) { i_cap = 0; } } void nrn_capacity_current(NrnThread* _nt, Memb_list* ml) { int count = ml->nodecount; Node **vnode = ml->nodelist; double **vdata = ml->data; int i; double cfac = .001 * _nt->cj; /* since rhs is dvm for a full or half implicit step */ /* (nrn_update_2d() replaces dvi by dvi-dvx) */ /* no need to distinguish secondorder */ #if CACHEVEC if (use_cachevec) { int* ni = ml->nodeindices; for (i=0; i < count; i++) { i_cap = cfac*cm*VEC_RHS(ni[i]); } }else #endif /* CACHEVEC */ { for (i=0; i < count; ++i) { i_cap = cfac*cm*NODERHS(vnode[i]); } } } #if CVODE void nrn_mul_capacity(NrnThread* _nt, Memb_list* ml) { int count = ml->nodecount; Node **vnode = ml->nodelist; double **vdata = ml->data; int i; double cfac = .001 * _nt->cj; #if CACHEVEC if (use_cachevec) { int* ni = ml->nodeindices; for (i=0; i < count; i++) { VEC_RHS(ni[i]) *= cfac*cm; } }else #endif /* CACHEVEC */ { for (i=0; i < count; ++i) { NODERHS(vnode[i]) *= cfac*cm; } } } void nrn_div_capacity(NrnThread* _nt, Memb_list* ml) { int count = ml->nodecount; Node **vnode = ml->nodelist; double **vdata = ml->data; int i; #if CACHEVEC if (use_cachevec) { int* ni = ml->nodeindices; for (i=0; i < count; i++) { i_cap = VEC_RHS(ni[i]); VEC_RHS(ni[i]) /= 1.e-3*cm; } }else #endif /* CACHEVEC */ { for (i=0; i < count; ++i) { i_cap = NODERHS(vnode[i]); NODERHS(vnode[i]) /= 1.e-3*cm; } } if (_nt->_nrn_fast_imem) { double* p = _nt->_nrn_fast_imem->_nrn_sav_rhs; for (i=0; i < count; ++i) { p[vnode[i]->v_node_index] += i_cap; } } } #endif /*CVODE*/ /* the rest can be constructed automatically from the above info*/ static void cap_alloc(Prop* p) { double *pd; pd = nrn_prop_data_alloc(CAP, nparm, p); pd[0] = DEF_cm; /*default capacitance/cm^2*/ p->param = pd; p->param_size = nparm; } neuron-7.5/src/nrnoc/clamp.c000066400000000000000000000105171323325274500160530ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/clamp.c,v 1.2 1997/08/15 13:04:10 hines Exp */ /* modified from fstim.c */ /* 4/9/2002 modified to conform to new treeset.c */ /* fclamp(maxlevel, loc) allocates space for maxlevel level changes all at location loc previously existing clamp is released. All clamp levels are initialized to clamp_resist series resistance. and 0 duration. After the final level change the clamp is off. fclamp(i, duration, vc) the maxlevel level changes concatenate. This function specifies the magnitude and duration of the ith level. fclampv() the value of the clamp potential at the global time t fclampi() the clamp current at the global time t */ #include #include "neuron.h" #include "section.h" #include "nrniv_mf.h" static double loc; static Node *pnd; static Section* sec; static double gtemp; static int maxlevel = 0; /* size of clamp array */ static double *duration, *vc, *tswitch; /* maxlevel of them */ static int oldsw = 0; static double clampval(); extern void clamp_prepare(); #define nt_t nrn_threads->_t void print_clamp() { int i; if (maxlevel == 0) return; #ifndef _OMPSS_ Printf("%s fclamp(%d, %g) /* Second arg is location */\n\ /* fclamp( #, duration(ms), magnitude(mV)) ; clamp_resist = %g */\n", secname(sec), maxlevel, loc, clamp_resist); #else Printf("%s fclamp(%d, %g) /* Second arg is location */\nfclamp( #, duration(ms), magnitude(mV)) ; clamp_resist = %g */\n", secname(sec),maxlevel, loc, clamp_resist); #endif for (i=0; i 1) { hoc_execerror("fsyn does not allow threads", ""); } /* two args are maxlevel, loc */ /* three args are level, duration, vc */ i = chkarg(1, 0., 10000.); if (ifarg(3)) { int num; if (i >= maxlevel) { hoc_execerror("level index out of range", (char *)0); } duration[i] = chkarg(2, 0., 1e21); vc[i] = *getarg(3); tswitch[0] = -1e-9; for (num = 0; num < maxlevel; num++) { tswitch[num+1] = tswitch[num] + duration[num]; } oldsw = 0; hoc_retpushx(tswitch[maxlevel-1]); } else { free_clamp(); maxlevel = i; if (maxlevel) { duration = (double *)emalloc((unsigned)(maxlevel * sizeof(double))); vc = (double *)emalloc((unsigned)(maxlevel * sizeof(double))); tswitch = (double *)emalloc((unsigned)((maxlevel + 1) * sizeof(double))); for (i = 0; iprop) { pnd = node_ptr(sec, loc, &area); }else{ free_clamp(); return; } if (clamp_resist <= 0) { hoc_execerror("clamp_resist must be > 0 in megohms", (char *)0); } } void activclamp_rhs(void) { double v; if (!maxlevel) { return; } v = clampval(); #if EXTRACELLULAR if (pnd->extnode) { NODERHS(pnd) += gtemp*(v - NODEV(pnd) - pnd->extnode->v[0]); }else{ NODERHS(pnd) += gtemp*(v - NODEV(pnd)); } #else NODERHS(pnd) += gtemp*(v - NODEV(pnd)); #endif } void activclamp_lhs(void) { double v; if (!maxlevel) { return; } NODED(pnd) += gtemp; } static double clampval(void) { gtemp = 1.e2/clamp_resist/NODEAREA(pnd); for (;;) { #if CVODE at_time(nrn_threads, tswitch[oldsw]); #endif if (nt_t < tswitch[oldsw]) { if (oldsw == 0) { break; } #if CVODE /* for cvode the other was inefficient since t is non-monotonic */ --oldsw; #else oldsw = 0; #endif }else{ if (nt_t < tswitch[oldsw + 1]) { break; } else { if (++oldsw == maxlevel) { --oldsw; gtemp = 0.; break; } } } } return vc[oldsw]; } neuron-7.5/src/nrnoc/code.c000077500000000000000000000002611323325274500156670ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../oc/code.c" neuron-7.5/src/nrnoc/cprop.c000066400000000000000000000016451323325274500161040ustar00rootroot00000000000000#include <../../nrnconf.h> /* allocate and free property data and Datum arrays for nrnoc the nrniv/cxprop.cpp version allows for the possibility of greater cache efficiency */ #include #include #include void nrn_mk_prop_pools(int n) {} void nrn_cache_prop_realloc() {} int nrn_is_valid_section_ptr(void* v) { return 0; } double* nrn_prop_data_alloc(int type, int count, Prop* p) { double* pd = (double*)hoc_Ecalloc(count, sizeof(double)); hoc_malchk(); return pd; } Datum* nrn_prop_datum_alloc(int type, int count, Prop* p) { Datum* ppd = (Datum*)hoc_Ecalloc(count, sizeof(Datum)); hoc_malchk(); return ppd; } void nrn_prop_data_free(int type, double* pd) { if (pd) { free(pd); } } void nrn_prop_datum_free(int type, Datum* ppd) { if (ppd) { free(ppd); } } Section* nrn_section_alloc() { return (Section *)emalloc(sizeof(Section)); } void nrn_section_free(Section* s) { free(s); } neuron-7.5/src/nrnoc/eion.c000066400000000000000000000352641323325274500157170ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/eion.c,v 1.10 1998/02/26 16:42:50 hines Exp */ #include #include "section.h" #include "neuron.h" #include "membfunc.h" #include "parse.h" #include "membdef.h" #include "nrniv_mf.h" #undef hoc_retpushx extern double chkarg(); extern Section* nrn_noerr_access(); extern void hoc_register_prop_size(int, int, int); #define nparm 5 static const char *mechanism[] = { /*just a template*/ "0", "na_ion", "ena", "nao", "nai", 0, "ina", "dina_dv_", 0, 0 }; static DoubScal scdoub[] = { /* just a template*/ "ci0_na_ion", 0, "co0_na_ion", 0, 0, 0 }; static void ion_alloc(Prop*); static void ion_cur(NrnThread*, Memb_list*, int); static void ion_init(NrnThread*, Memb_list*, int); double nrn_nernst(double, double, double), nrn_ghk(double, double, double, double); static int na_ion, k_ion, ca_ion; /* will get type for these special ions */ int nrn_is_ion(type) int type; { return (memb_func[type].alloc == ion_alloc); } static int ion_global_map_size; static double** ion_global_map; #define global_conci(type) ion_global_map[type][0] #define global_conco(type) ion_global_map[type][1] #define global_charge(type) ion_global_map[type][2] double nrn_ion_charge(Symbol* sym) { return global_charge(sym->subtype); } void ion_register(void) { /* hoc level registration of ion name. Return -1 if name already in use and not an ion; and the mechanism subtype otherwise. */ char* name; char buf[100]; Symbol *s; Symlist* sav; int fail; fail = 0; sav = hoc_symlist; hoc_symlist = hoc_top_level_symlist; name = gargstr(1); sprintf(buf, "%s_ion", name); s = hoc_lookup(buf); if (s && s->type == MECHANISM && memb_func[s->subtype].alloc == ion_alloc) { hoc_symlist = sav; hoc_retpushx((double)s->subtype); return; } if (s) { fail = 1; } sprintf(buf, "e%s", name); if (hoc_lookup(buf)) { fail = 1; } sprintf(buf, "%si", name); if (hoc_lookup(buf)) { fail = 1; } sprintf(buf, "%so", name); if (hoc_lookup(buf)) { fail = 1; } sprintf(buf, "i%s", name); if (hoc_lookup(buf)) { fail = 1; } sprintf(buf, "di%s_dv_", name); if (hoc_lookup(buf)) { fail = 1; } if (fail) { hoc_symlist = sav; hoc_retpushx(-1.); return; } hoc_symlist = hoc_built_in_symlist; ion_reg(name, *getarg(2)); hoc_symlist = sav; sprintf(buf, "%s_ion", name); s = hoc_lookup(buf); hoc_retpushx((double)s->subtype); } void ion_charge(void) { Symbol* s; s = hoc_lookup(gargstr(1)); if (!s || s->type != MECHANISM || memb_func[s->subtype].alloc != ion_alloc) { hoc_execerror(gargstr(1), "is not an ion mechanism"); } hoc_retpushx(global_charge(s->subtype)); } void ion_reg(const char* name, double valence) { int i, mechtype; Symbol *s; char buf[7][50]; double val; #define VAL_SENTINAL -10000. Sprintf(buf[0], "%s_ion", name); Sprintf(buf[1], "e%s", name); Sprintf(buf[2], "%si", name); Sprintf(buf[3], "%so", name); Sprintf(buf[5], "i%s", name); Sprintf(buf[6], "di%s_dv_", name); for (i=0; i<7; i++) { mechanism[i+1] = buf[i]; } mechanism[5] = (char *)0; /* buf[4] not used above */ s = hoc_lookup(buf[0]); if (!s || s->type != MECHANISM || memb_func[s->subtype].alloc != ion_alloc) { register_mech(mechanism, ion_alloc, ion_cur, (void*)0, (void*)0, ion_init, -1, 1); hoc_symbol_limits(hoc_lookup(buf[2]), 1e-12, 1e9); hoc_symbol_limits(hoc_lookup(buf[3]), 1e-12, 1e9); hoc_symbol_units(hoc_lookup(buf[1]), "mV"); hoc_symbol_units(hoc_lookup(buf[2]), "mM"); hoc_symbol_units(hoc_lookup(buf[3]), "mM"); hoc_symbol_units(hoc_lookup(buf[5]), "mA/cm2"); hoc_symbol_units(hoc_lookup(buf[6]), "S/cm2"); s = hoc_lookup(buf[0]); mechtype = nrn_get_mechtype(mechanism[1]); hoc_register_prop_size(mechtype, nparm, 1 ); hoc_register_dparam_semantics(mechtype, 0, "iontype"); nrn_writes_conc(mechtype, 1); if (ion_global_map_size <= s->subtype) { ion_global_map_size = s->subtype + 1; ion_global_map = (double**)erealloc(ion_global_map, sizeof(double*)*ion_global_map_size); } ion_global_map[s->subtype] = (double*)emalloc(3*sizeof(double)); Sprintf(buf[0], "%si0_%s", name, s->name); scdoub[0].name = buf[0]; scdoub[0].pdoub = ion_global_map[s->subtype]; Sprintf(buf[1], "%so0_%s", name, s->name); scdoub[1].name = buf[1]; scdoub[1].pdoub = ion_global_map[s->subtype] + 1; hoc_register_var(scdoub, (DoubVec*)0, (VoidFunc*)0); hoc_symbol_units(hoc_lookup(scdoub[0].name), "mM"); hoc_symbol_units(hoc_lookup(scdoub[1].name), "mM"); if (strcmp("na", name) == 0) { na_ion = s->subtype; global_conci(s->subtype) = DEF_nai; global_conco(s->subtype) = DEF_nao; global_charge(s->subtype) = 1.; }else if (strcmp("k", name) == 0) { k_ion = s->subtype; global_conci(s->subtype) = DEF_ki; global_conco(s->subtype) = DEF_ko; global_charge(s->subtype) = 1.; }else if (strcmp("ca", name) == 0) { ca_ion = s->subtype; global_conci(s->subtype) = DEF_cai; global_conco(s->subtype) = DEF_cao; global_charge(s->subtype) = 2.; }else{ global_conci(s->subtype) = DEF_ioni; global_conco(s->subtype) = DEF_iono; global_charge(s->subtype) = VAL_SENTINAL; } for (i=0; i < 3; ++i) { /* used to be nrnocCONST */ s->u.ppsym[i]->subtype = _AMBIGUOUS; } } val = global_charge(s->subtype); if (valence != VAL_SENTINAL && val != VAL_SENTINAL && valence != val) { fprintf(stderr, "%s ion valence defined differently in\n\ two USEION statements (%g and %g)\n", s->name, valence, global_charge(s->subtype)); nrn_exit(1); }else if (valence == VAL_SENTINAL && val == VAL_SENTINAL) { fprintf(stderr, "%s ion valence must be defined in\n\ the USEION statement of any model using this ion\n", s->name); nrn_exit(1); }else if (valence != VAL_SENTINAL) { global_charge(s->subtype) = valence; } } #define FARADAY 96485.309 #define ktf (1000.*8.3134*(celsius + 273.15)/FARADAY) double nrn_nernst(ci, co, z) double z, ci, co; { /*printf("nrn_nernst %g %g %g\n", ci, co, z);*/ if (z == 0) { return 0.; } if (ci <= 0.) { return 1e6; }else if (co <= 0.) { return -1e6; }else{ return ktf/z*log(co/ci); } } void nrn_wrote_conc(sym, pe, it) Symbol* sym; double* pe; int it; { if (it & 04) { pe[0] = nrn_nernst(pe[1], pe[2], nrn_ion_charge(sym)); } } void nernst(void) { double val=0.0; if (hoc_is_str_arg(1)) { Symbol* s = hoc_lookup(gargstr(1)); if (s && ion_global_map[s->u.rng.type]) { Section* sec = chk_access(); double* nrn_rangepointer(); Symbol* ion = memb_func[s->u.rng.type].sym; double z = global_charge(s->u.rng.type); double *ci, *co, *e, x; if (ifarg(2)) { x = chkarg(2, 0., 1.); }else{ x = .5; } ci = nrn_rangepointer(sec, ion->u.ppsym[1] , x); co = nrn_rangepointer(sec, ion->u.ppsym[2], x); e = nrn_rangepointer(sec, ion->u.ppsym[0], x); switch (s->u.rng.index) { case 0: val = nrn_nernst(*ci, *co, z); hoc_retpushx(val); return; case 1: val = *co*exp(-z/ktf* *e); hoc_retpushx(val); return; case 2: val = *ci*exp(z/ktf* *e); hoc_retpushx(val); return; } } hoc_execerror(gargstr(1), " not a reversal potential or concentration"); }else{ val = nrn_nernst(*getarg(1), *getarg(2), *getarg(3)); /*printf("nernst=%g\n", val);*/ } hoc_retpushx(val); return; } static double efun(x) double x; { if (fabs(x) < 1e-4) { return 1. - x/2.; }else{ return x/(exp(x) - 1); } } double nrn_ghk(v, ci, co, z) double v, ci, co, z; { double eco, eci, temp; temp = z*v/ktf; eco = co*efun(temp); eci = ci*efun(-temp); return (.001)*z*FARADAY*(eci - eco); } void ghk(void) { double val = nrn_ghk(*getarg(1), *getarg(2), *getarg(3), *getarg(4)); hoc_retpushx(val); } #if VECTORIZE #define erev pd[i][0] /* From Eion */ #define conci pd[i][1] #define conco pd[i][2] #define cur pd[i][3] #define dcurdv pd[i][4] /* handle erev, conci, conc0 "in the right way" according to ion_style default. See nrn/lib/help/nrnoc.help. ion_style("name_ion", [c_style, e_style, einit, eadvance, cinit]) ica is assigned eca is parameter but if conc exists then eca is assigned if conc is nrnocCONST then eca calculated on finitialize if conc is STATE then eca calculated on fadvance and conc finitialize with global nai0, nao0 nernst(ci, co, charge) and ghk(v, ci, co, charge) available to hoc and models. */ #define iontype ppd[i][0].i /* how _AMBIGUOUS is to be handled */ /*the bitmap is 03 concentration unused, nrnocCONST, DEP, STATE 04 initialize concentrations 030 reversal potential unused, nrnocCONST, DEP, STATE 040 initialize reversal potential 0100 calc reversal during fadvance 0200 ci being written by a model 0400 co being written by a model */ #define charge global_charge(type) #define conci0 global_conci(type) #define conco0 global_conco(type) double nrn_nernst_coef(type) int type; { /* for computing jacobian element dconc'/dconc */ return ktf/charge; } /* It is generally an error for two models to WRITE the same concentration */ void nrn_check_conc_write(p_ok, pion, i) Prop* p_ok, *pion; int i; { static long *chk_conc_, *ion_bit_, size_; Prop* p; int flag, j, k; if (i == 1) { flag = 0200; }else{ flag = 0400; } /* an embarassing hack */ /* up to 32 possible ions */ /* continuously compute a bitmap that allows determination of which models WRITE which ion concentrations */ if (n_memb_func > size_){ if (!chk_conc_) { chk_conc_ = (long*)ecalloc(2*n_memb_func, sizeof(long)); ion_bit_ = (long*)ecalloc(n_memb_func, sizeof(long)); }else{ chk_conc_ = (long*)erealloc(chk_conc_, 2*n_memb_func*sizeof(long)); ion_bit_ = (long*)erealloc(ion_bit_, n_memb_func*sizeof(long)); for (j = size_; j < n_memb_func; ++j) { chk_conc_[2*j] = 0; chk_conc_[2*j+1] = 0; ion_bit_[j] = 0; } } size_ = n_memb_func; } for (k=0, j=0; j < n_memb_func; ++j) { if (nrn_is_ion(j)) { ion_bit_[j] = (1<type + i] |= ion_bit_[pion->type]; if (pion->dparam[0].i & flag) { /* now comes the hard part. Is the possibility in fact actual.*/ for (p = pion->next; p; p = p->next) { if (p == p_ok) { continue; } if (chk_conc_[2*p->type + i] & ion_bit_[pion->type]) { char buf[300]; sprintf(buf, "%.*s%c is being written at the same location by %s and %s", (int)strlen(memb_func[pion->type].sym->name)-4, memb_func[pion->type].sym->name, ((i == 1)? 'i' : 'o'), memb_func[p_ok->type].sym->name, memb_func[p->type].sym->name); hoc_warning(buf, (char*)0); } } } pion->dparam[0].i |= flag; } void ion_style(void) { Symbol* s; int istyle, i, oldstyle; Section* sec; Prop* p, *nrn_mechanism(); s = hoc_lookup(gargstr(1)); if (!s || s->type != MECHANISM || !nrn_is_ion(s->subtype)) { hoc_execerror(gargstr(1), " is not an ion"); } sec = chk_access(); p = nrn_mechanism(s->subtype, sec->pnode[0]); oldstyle = -1; if (p) { oldstyle = p->dparam[0].i; } if (ifarg(2)) { istyle = (int)chkarg(2, 0., 3.); /* c_style */ istyle += 010*(int)chkarg(3, 0., 3.); /* e_style */ istyle += 040*(int)chkarg(4, 0., 1.); /* einit */ istyle += 0100*(int)chkarg(5, 0., 1.); /* eadvance */ istyle += 04*(int)chkarg(6, 0., 1.); /* cinit*/ #if 0 /* global effect */ { int count; Datum** ppd; v_setup_vectors(); count = memb_list[s->subtype].nodecount; ppd = memb_list[s->subtype].pdata; for (i=0; i < count; ++i) { iontype = (iontype&(0200+0400)) + istyle; } } #else /* currently accessed section */ { for (i=0; i < sec->nnode; ++i) { p = nrn_mechanism(s->subtype, sec->pnode[i]); if (p) { p->dparam[0].i &= (0200+0400); p->dparam[0].i += istyle; } } } #endif } hoc_retpushx((double)oldstyle); } int nrn_vartype(sym) Symbol* sym; { int i; i = sym->subtype; if (i == _AMBIGUOUS) { Section* sec; Prop* p, *nrn_mechanism(); sec = nrn_noerr_access(); if (!sec) { return nrnocCONST; } p = nrn_mechanism(sym->u.rng.type, sec->pnode[0]); if (p) { int it = p->dparam[0].i; if (sym->u.rng.index == 0) { /* erev */ i = (it & 030)>>3; /* unused, nrnocCONST, DEP, or STATE */ }else{ /* concentration */ i = (it & 03); } } } return i; } /* the ion mechanism it flag defines how _AMBIGUOUS is to be interpreted */ void nrn_promote(p, conc, rev) Prop* p; int conc, rev; { int oldconc, oldrev; int* it = &p->dparam[0].i; oldconc = (*it & 03); oldrev = (*it & 030)>>3; /* precedence */ if (oldconc < conc) { oldconc = conc; } if (oldrev < rev) { oldrev = rev; } /* promote type */ if (oldconc > 0 && oldrev < 2) { oldrev = 2; } *it &= ~0177; /* clear the bitmap */ *it += oldconc + 010*oldrev; if (oldconc == 3) { /* if state then cinit */ *it += 4; if (oldrev == 2) { /* if not state (WRITE) then eadvance */ *it += 0100; } } if (oldconc > 0 && oldrev == 2) { /*einit*/ *it += 040; } } /* Must be called prior to any channels which update the currents */ static void ion_cur(NrnThread* nt, Memb_list* ml, int type) { int count = ml->nodecount; Node** vnode = ml->nodelist; double **pd = ml->data; Datum **ppd = ml->pdata; int i; /*printf("ion_cur %s\n", memb_func[type].sym->name);*/ #if _CRAY #pragma _CRI ivdep #endif for (i=0; i < count; ++i) { dcurdv = 0.; cur = 0.; if (iontype & 0100) { erev = nrn_nernst(conci, conco, charge); } }; } /* Must be called prior to other models which possibly also initialize concentrations based on their own states */ static void ion_init(NrnThread* nt, Memb_list* ml, int type) { int count = ml->nodecount; Node** vnode = ml->nodelist; double **pd = ml->data; Datum **ppd = ml->pdata; int i; /*printf("ion_init %s\n", memb_func[type].sym->name);*/ #if _CRAY #pragma _CRI ivdep #endif for (i=0; i < count; ++i) { if (iontype & 04) { conci = conci0; conco = conco0; } } #if _CRAY #pragma _CRI ivdep #endif for (i=0; i < count; ++i) { if (iontype & 040) { erev = nrn_nernst(conci, conco, charge); } } } static void ion_alloc(p) Prop *p; { double *pd[1]; int i=0; pd[0] = nrn_prop_data_alloc(p->type, nparm, p); p->param_size = nparm; cur = 0.; dcurdv = 0.; if (p->type == na_ion) { erev = DEF_ena; conci = DEF_nai; conco = DEF_nao; }else if (p->type == k_ion) { erev = DEF_ek; conci = DEF_ki; conco = DEF_ko; }else if (p->type == ca_ion) { erev = DEF_eca; conci = DEF_cai; conco = DEF_cao; }else{ erev = DEF_eion; conci = DEF_ioni; conco = DEF_iono; } p->param = pd[0]; p->dparam = nrn_prop_datum_alloc(p->type, 1, p); p->dparam->i = 0; } void second_order_cur(NrnThread* nt) { extern int secondorder; NrnThreadMembList* tml; Memb_list* ml; int j, i, i2; #define c 3 #define dc 4 if (secondorder == 2) { for (tml = nt->tml; tml; tml = tml->next) if (memb_func[tml->index].alloc == ion_alloc) { ml = tml->ml; i2 = ml->nodecount; for (i = 0; i < i2; ++i) { ml->data[i][c] += ml->data[i][dc] * ( NODERHS(ml->nodelist[i]) ) ; } } } } #endif neuron-7.5/src/nrnoc/exp2syn.c000066400000000000000000000324311323325274500163660ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__Exp2Syn #define _nrn_initial _nrn_initial__Exp2Syn #define nrn_cur _nrn_cur__Exp2Syn #define _nrn_current _nrn_current__Exp2Syn #define nrn_jacob _nrn_jacob__Exp2Syn #define nrn_state _nrn_state__Exp2Syn #define _net_receive _net_receive__Exp2Syn #define state state__Exp2Syn #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define tau1 _p[0] #define tau2 _p[1] #define e _p[2] #define i _p[3] #define g _p[4] #define A _p[5] #define B _p[6] #define factor _p[7] #define DA _p[8] #define DB _p[9] #define v _p[10] #define _g _p[11] #define _tsav _p[12] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "tau2", 1e-09, 1e+09, "tau1", 1e-09, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "tau1", "ms", "tau2", "ms", "e", "mV", "A", "uS", "B", "uS", "i", "nA", "g", "uS", 0,0 }; static double A0 = 0; static double B0 = 0; static double delta_t = 0.01; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } static int _ode_count(int); static void _ode_map(int, double**, double**, double*, Datum*, double*, int); static void _ode_spec(_NrnThread*, _Memb_list*, int); static void _ode_matsol(_NrnThread*, _Memb_list*, int); #define _cvode_ieq _ppvar[2]._i static void _ode_matsol_instance1(_threadargsproto_); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "Exp2Syn", "tau1", "tau2", "e", 0, "i", "g", 0, "A", "B", 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 13, _prop); /*initialize range parameters*/ tau1 = 0.1; tau2 = 10; e = 0; } _prop->param = _p; _prop->param_size = 13; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 3, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); /* some states have an absolute tolerance */ static Symbol** _atollist; static HocStateTolerance _hoc_state_tol[] = { 0,0 }; static void _net_receive(Point_process*, double*, double); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _exp2syn_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 13, 3); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "cvodeieq"); hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 Exp2Syn /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/exp2syn.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int _ode_spec1(_threadargsproto_); /*static int _ode_matsol1(_threadargsproto_);*/ static int _slist1[2], _dlist1[2]; static int state(_threadargsproto_); /*CVODE*/ static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset = 0; { DA = - A / tau1 ; DB = - B / tau2 ; } return _reset; } static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { DA = DA / (1. - dt*( ( - 1.0 ) / tau1 )) ; DB = DB / (1. - dt*( ( - 1.0 ) / tau2 )) ; return 0; } /*END CVODE*/ static int state (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { { A = A + (1. - exp(dt*(( - 1.0 ) / tau1)))*(- ( 0.0 ) / ( ( - 1.0 ) / tau1 ) - A) ; B = B + (1. - exp(dt*(( - 1.0 ) / tau2)))*(- ( 0.0 ) / ( ( - 1.0 ) / tau2 ) - B) ; } return 0; } static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt; _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; { if (nrn_netrec_state_adjust && !cvode_active_){ /* discon state adjustment for cnexp case (rate uses no local variable) */ double __state = A; double __primary = (A + _args[0] * factor) - __state; __primary += ( 1. - exp( 0.5*dt*( ( - 1.0 ) / tau1 ) ) )*( - ( 0.0 ) / ( ( - 1.0 ) / tau1 ) - __primary ); A += __primary; } else { A = A + _args[0] * factor ; } if (nrn_netrec_state_adjust && !cvode_active_){ /* discon state adjustment for cnexp case (rate uses no local variable) */ double __state = B; double __primary = (B + _args[0] * factor) - __state; __primary += ( 1. - exp( 0.5*dt*( ( - 1.0 ) / tau2 ) ) )*( - ( 0.0 ) / ( ( - 1.0 ) / tau2 ) - __primary ); B += __primary; } else { B = B + _args[0] * factor ; } } } static int _ode_count(int _type){ return 2;} static void _ode_spec(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node* _nd; double _v; int _iml, _cntml; _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v = NODEV(_nd); _ode_spec1 (_p, _ppvar, _thread, _nt); }} static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { double* _p; Datum* _ppvar; int _i; _p = _pp; _ppvar = _ppd; _cvode_ieq = _ieq; for (_i=0; _i < 2; ++_i) { _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; _cvode_abstol(_atollist, _atol, _i); } } static void _ode_matsol_instance1(_threadargsproto_) { _ode_matsol1 (_p, _ppvar, _thread, _nt); } static void _ode_matsol(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node* _nd; double _v; int _iml, _cntml; _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v = NODEV(_nd); _ode_matsol_instance1(_threadargs_); }} static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ A = A0; B = B0; { double _ltp ; if ( tau1 / tau2 > 0.9999 ) { tau1 = 0.9999 * tau2 ; } if ( tau1 / tau2 < 1e-9 ) { tau1 = tau2 * 1e-9 ; } A = 0.0 ; B = 0.0 ; _ltp = ( tau1 * tau2 ) / ( tau2 - tau1 ) * log ( tau2 / tau1 ) ; factor = - exp ( - _ltp / tau1 ) + exp ( - _ltp / tau2 ) ; factor = 1.0 / factor ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { g = B - A ; i = g * ( v - e ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) -= _rhs; }else #endif { NODERHS(_nd) -= _rhs; } } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) += _g; }else #endif { _nd = _ml->_nodelist[_iml]; NODED(_nd) += _g; } } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { { state(_p, _ppvar, _thread, _nt); }}} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _slist1[0] = &(A) - _p; _dlist1[0] = &(DA) - _p; _slist1[1] = &(B) - _p; _dlist1[1] = &(DB) - _p; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/exp2syn.mod000066400000000000000000000030371323325274500167230ustar00rootroot00000000000000COMMENT Two state kinetic scheme synapse described by rise time tau1, and decay time constant tau2. The normalized peak condunductance is 1. Decay time MUST be greater than rise time. The solution of A->G->bath with rate constants 1/tau1 and 1/tau2 is A = a*exp(-t/tau1) and G = a*tau2/(tau2-tau1)*(-exp(-t/tau1) + exp(-t/tau2)) where tau1 < tau2 If tau2-tau1 is very small compared to tau1, this is an alphasynapse with time constant tau2. If tau1/tau2 is very small, this is single exponential decay with time constant tau2. The factor is evaluated in the initial block such that an event of weight 1 generates a peak conductance of 1. Because the solution is a sum of exponentials, the coupled equations can be solved as a pair of independent equations by the more efficient cnexp method. ENDCOMMENT NEURON { POINT_PROCESS Exp2Syn RANGE tau1, tau2, e, i NONSPECIFIC_CURRENT i RANGE g } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (microsiemens) } PARAMETER { tau1 = 0.1 (ms) <1e-9,1e9> tau2 = 10 (ms) <1e-9,1e9> e=0 (mV) } ASSIGNED { v (mV) i (nA) g (uS) factor } STATE { A (uS) B (uS) } INITIAL { LOCAL tp if (tau1/tau2 > 0.9999) { tau1 = 0.9999*tau2 } if (tau1/tau2 < 1e-9) { tau1 = tau2*1e-9 } A = 0 B = 0 tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1) factor = -exp(-tp/tau1) + exp(-tp/tau2) factor = 1/factor } BREAKPOINT { SOLVE state METHOD cnexp g = B - A i = g*(v - e) } DERIVATIVE state { A' = -A/tau1 B' = -B/tau2 } NET_RECEIVE(weight (uS)) { A = A + weight*factor B = B + weight*factor } neuron-7.5/src/nrnoc/expsyn.c000066400000000000000000000301611323325274500163020ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__ExpSyn #define _nrn_initial _nrn_initial__ExpSyn #define nrn_cur _nrn_cur__ExpSyn #define _nrn_current _nrn_current__ExpSyn #define nrn_jacob _nrn_jacob__ExpSyn #define nrn_state _nrn_state__ExpSyn #define _net_receive _net_receive__ExpSyn #define state state__ExpSyn #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define tau _p[0] #define e _p[1] #define i _p[2] #define g _p[3] #define Dg _p[4] #define v _p[5] #define _g _p[6] #define _tsav _p[7] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "tau", 1e-09, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "tau", "ms", "e", "mV", "g", "uS", "i", "nA", 0,0 }; static double delta_t = 0.01; static double g0 = 0; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } static int _ode_count(int); static void _ode_map(int, double**, double**, double*, Datum*, double*, int); static void _ode_spec(_NrnThread*, _Memb_list*, int); static void _ode_matsol(_NrnThread*, _Memb_list*, int); #define _cvode_ieq _ppvar[2]._i static void _ode_matsol_instance1(_threadargsproto_); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "ExpSyn", "tau", "e", 0, "i", 0, "g", 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 8, _prop); /*initialize range parameters*/ tau = 0.1; e = 0; } _prop->param = _p; _prop->param_size = 8; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 3, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); /* some states have an absolute tolerance */ static Symbol** _atollist; static HocStateTolerance _hoc_state_tol[] = { 0,0 }; static void _net_receive(Point_process*, double*, double); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _expsyn_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 8, 3); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "cvodeieq"); hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 ExpSyn /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/expsyn.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int _ode_spec1(_threadargsproto_); /*static int _ode_matsol1(_threadargsproto_);*/ static int _slist1[1], _dlist1[1]; static int state(_threadargsproto_); /*CVODE*/ static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset = 0; { Dg = - g / tau ; } return _reset; } static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { Dg = Dg / (1. - dt*( ( - 1.0 ) / tau )) ; return 0; } /*END CVODE*/ static int state (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { { g = g + (1. - exp(dt*(( - 1.0 ) / tau)))*(- ( 0.0 ) / ( ( - 1.0 ) / tau ) - g) ; } return 0; } static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt; _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; { if (nrn_netrec_state_adjust && !cvode_active_){ /* discon state adjustment for cnexp case (rate uses no local variable) */ double __state = g; double __primary = (g + _args[0]) - __state; __primary += ( 1. - exp( 0.5*dt*( ( - 1.0 ) / tau ) ) )*( - ( 0.0 ) / ( ( - 1.0 ) / tau ) - __primary ); g += __primary; } else { g = g + _args[0] ; } } } static int _ode_count(int _type){ return 1;} static void _ode_spec(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node* _nd; double _v; int _iml, _cntml; _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v = NODEV(_nd); _ode_spec1 (_p, _ppvar, _thread, _nt); }} static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { double* _p; Datum* _ppvar; int _i; _p = _pp; _ppvar = _ppd; _cvode_ieq = _ieq; for (_i=0; _i < 1; ++_i) { _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; _cvode_abstol(_atollist, _atol, _i); } } static void _ode_matsol_instance1(_threadargsproto_) { _ode_matsol1 (_p, _ppvar, _thread, _nt); } static void _ode_matsol(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node* _nd; double _v; int _iml, _cntml; _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v = NODEV(_nd); _ode_matsol_instance1(_threadargs_); }} static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ g = g0; { g = 0.0 ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { i = g * ( v - e ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) -= _rhs; }else #endif { NODERHS(_nd) -= _rhs; } } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) += _g; }else #endif { _nd = _ml->_nodelist[_iml]; NODED(_nd) += _g; } } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { { state(_p, _ppvar, _thread, _nt); }}} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _slist1[0] = &(g) - _p; _dlist1[0] = &(Dg) - _p; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/expsyn.mod000077500000000000000000000006241323325274500166430ustar00rootroot00000000000000NEURON { POINT_PROCESS ExpSyn RANGE tau, e, i NONSPECIFIC_CURRENT i } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (microsiemens) } PARAMETER { tau = 0.1 (ms) <1e-9,1e9> e = 0 (mV) } ASSIGNED { v (mV) i (nA) } STATE { g (uS) } INITIAL { g=0 } BREAKPOINT { SOLVE state METHOD cnexp i = g*(v - e) } DERIVATIVE state { g' = -g/tau } NET_RECEIVE(weight (uS)) { g = g + weight } neuron-7.5/src/nrnoc/extcelln.c000077500000000000000000000407471323325274500166100ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/extcell.c,v 1.4 1996/05/21 17:09:19 hines Exp */ #include #include #include "section.h" #include "nrniv_mf.h" #include "hocassrt.h" extern int cvode_active_; extern int nrn_use_daspk_; #if EXTRACELLULAR /* the N index is a keyword in the following. See init.c for implementation.*/ static const char *mechanism[] = { "0", "extracellular", "xraxial[N]", "xg[N]", "xc[N]", "e_extracellular", 0, #if I_MEMBRANE "i_membrane", #endif 0, "vext[N]", 0, }; static HocParmLimits limits[] = { "xraxial", 1e-9, 1e15, "xg", 0., 1e15, "xc", 0., 1e15, 0,0.,0. }; static HocParmUnits units[] = { "xraxial", "MOhm/cm", "xg", "S/cm2", "xc", "uF/cm2", "e_extracellular", "mV", "vext", "mV", "i_membrane", "mA/cm2", 0,0 }; static void extcell_alloc(Prop*); static void extcell_init(NrnThread* nt, Memb_list* ml, int type); #if 0 static void printnode(const char* s); #endif static int _ode_count(int type) { /* hoc_execerror("extracellular", "cannot be used with CVODE");*/ /* but can be used with daspk. However everything is handled in analogy with intracellular nodes instead of in analogy with a membrane mechanism. Thus the count really comes from the size of sp13mat. */ return 0; } void extracell_reg_(void) { int i; register_mech(mechanism, extcell_alloc, (Pvmi)0, (Pvmi)0, (Pvmi)0, extcell_init, -1, 1); i = nrn_get_mechtype(mechanism[1]); hoc_register_cvode(i, _ode_count, 0,0,0); hoc_register_limits(i, limits); hoc_register_units(i, units); } /* solving is done with sparse13 */ /* interface between hoc and extcell */ #define xraxial pd /* From Eion */ #define xg (pd + (nlayer)) #define xc (pd + 2*(nlayer)) #define e_extracellular pd[3*(nlayer)] #if I_MEMBRANE #define i_membrane pd[1 + 3*(nlayer)] #define sav_g pd[2 + 3*(nlayer)] #define sav_rhs pd[3 + 3*(nlayer)] #endif /* based on update() in fadvance.c */ /* update has already been called so modify nd->v based on dvi we only need to update extracellular nodes and base the corresponding nd->v on dvm (dvm = dvi - dvx) */ void nrn_update_2d(NrnThread* nt) { int i, cnt, il; extern int secondorder; Node *nd, **ndlist; Extnode *nde; double* pd; double cfac; Memb_list* ml = nt->_ecell_memb_list; if (!ml) { return; } cfac = .001 * nt->cj; cnt = ml->nodecount; ndlist = ml->nodelist; for (i=0; i < cnt; ++i) { nd = ndlist[i]; nde = nd->extnode; for (il = 0; il < nlayer; ++il) { nde->v[il] += *nde->_rhs[il]; } NODEV(nd) -= *nde->_rhs[0]; } #if I_MEMBRANE for (i=0; i < cnt; ++i) { pd = ml->data[i]; nd = ndlist[i]; NODERHS(nd) -= *nd->extnode->_rhs[0]; i_membrane = sav_g * (NODERHS(nd)) + sav_rhs; #if 1 /* i_membrane is a current density (mA/cm2). However it contains contributions from Non-ELECTRODE_CURRENT point processes. i_membrane(0) and i_membrane(1) will return the membrane current density at the points .5/nseg and 1-.5/nseg respectively. This can cause confusion if non-ELECTRODE_CURRENT point processes are located at these 0-area nodes since 1) not only is the true current density infinite, but 2) the correct absolute current is being computed here at the x=1 point but is not available, and 3) the correct absolute current at x=0 is not computed if the parent is a rootnode or there is no extracellular mechanism for the parent of this section. Thus, if non-ELECTRODE_CURRENT point processesm, eg synapses, are being used it is not a good idea to insert them at the points x=0 or x=1 */ #else i_membrane *= NODEAREA(nd); /* i_membrane is nA for every segment. This is different from all other continuous mechanism currents and same as PointProcess currents since it contains non-ELECTRODE_CURRENT point processes and may be non-zero for the zero area nodes. */ #endif } #endif } static void extcell_alloc(Prop* p) { double *pd; int i; #if I_MEMBRANE #define nparm (3*(nlayer) + 4) #else #define nparm (3*(nlayer) + 1) #endif pd = nrn_prop_data_alloc(EXTRACELL, nparm, p); p->param_size = nparm; for (i=0; i < nlayer; ++i) { xraxial[i]= 1.e9; xg[i] = 1.e9; xc[i] = 0.; } e_extracellular = 0.; #if 0 i_membrane = 0.; sav_g = 0.; sav_rhs = 0.; #endif p->param = pd; } /*ARGSUSED*/ static void extcell_init(NrnThread* nt, Memb_list* ml, int type) { int ndcount = ml->nodecount; Node** ndlist = ml->nodelist; double** data = ml->data; int i, j; double* pd; if ((cvode_active_ > 0) && (nrn_use_daspk_ == 0)) { hoc_execerror("Extracellular mechanism only works with fixed step methods and daspk", 0); } for (i=0; i < ndcount; ++i) { for (j = 0; j < nlayer; ++j) { ndlist[i]->extnode->v[j] = 0.; } #if I_MEMBRANE pd = data[i]; i_membrane = 0.; #endif } } void extcell_node_create(Node* nd) { int i, j; Extnode *nde; Prop* p; /* may be a nnode increase so some may already be allocated */ if (!nd->extnode) { nde = (Extnode *)emalloc(sizeof(Extnode)); nd->extnode = nde; for (j=0; j < nlayer; ++j) { nde->v[j] = 0.; } nde->param = (double *)0; for (p = nd->prop; p; p = p->next) { if (p->type == EXTRACELL) { nde->param = p->param; break; } } assert(p && p->type == EXTRACELL); } } void nrn_extcell_update_param(void) { int i; NrnThread* nt; FOR_THREADS(nt) { Memb_list* ml = nt->_ecell_memb_list; if (ml) { int cnt = ml->nodecount; Node **ndlist = ml->nodelist; for (i=0; i < cnt; ++i) { Node* nd = ndlist[i]; assert(nd->extnode); nd->extnode->param = ml->data[i]; } } } } void extcell_2d_alloc(Section* sec) { int i, j; Node *nd; Extnode *nde; Prop* p; /* may be a nnode increase so some may already be allocated */ for (i = sec->nnode-1; i>=0; i--) { extcell_node_create(sec->pnode[i]); } /* if the rootnode is owned by this section then it gets extnode also*/ if (!sec->parentsec && sec->parentnode) { /* last "if" clause unnecessary*/ extcell_node_create(sec->parentnode); } } /* from treesetup.c */ void nrn_rhs_ext(NrnThread* _nt) { int i, j, cnt; Node *nd, *pnd, **ndlist; double* pd; Extnode *nde, *pnde; Memb_list* ml = _nt->_ecell_memb_list; if (!ml) { return; } cnt = ml->nodecount; ndlist = ml->nodelist; /* nd rhs contains -membrane current + stim current */ /* nde rhs contains stim current */ for (i=0; i < cnt; ++i) { nd = ndlist[i]; nde = nd->extnode; *nde->_rhs[0] -= NODERHS(nd); #if I_MEMBRANE pd = ml->data[i]; sav_rhs = *nde->_rhs[0]; /* and for daspk this is the ionic current which can be combined later with i_cap before return from solve. */ #endif } for (i=0; i < cnt; ++i) { nd = ndlist[i]; nde = nd->extnode; pnd = _nt->_v_parent[nd->v_node_index]; if (pnd) { pnde = pnd->extnode; pd = nde->param; /* axial contributions */ if (pnde) { /* parent sec may not be extracellular */ for (j=0; j < nlayer; ++j) { double dv = pnde->v[j] - nde->v[j]; *nde->_rhs[j] -= nde->_b[j]*dv; *pnde->_rhs[j] += nde->_a[j]*dv; /* for the internal balance equation take care of vi = vm + vx */ if (j == 0) { NODERHS(nd) -= NODEB(nd)*dv; NODERHS(pnd) += NODEA(nd)*dv; } } }else{ /* no extracellular in parent but still need to take care of vi = vm + vx in this node. Note that we are NOT grounding the parent side of xraxial so equivalent to sealed. Also note that when children of this node do not have extracellular, we deal with that, at end of this function. */ double dv = - nde->v[0]; NODERHS(nd) -= NODEB(nd)*dv; NODERHS(pnd) += NODEA(nd)*dv; } /* series resistance and battery to ground */ /* between nlayer-1 and ground */ j = nlayer-1; *nde->_rhs[j] -= xg[j] * (nde->v[j] - e_extracellular); for (--j; j >= 0; --j) { /* between j and j+1 layer */ double x = xg[j]*(nde->v[j] - nde->v[j+1]); *nde->_rhs[j] -= x; *nde->_rhs[j+1] += x; } } } cnt = _nt->_ecell_child_cnt; for (i = 0; i < cnt; ++i) { double dv; nd = _nt->_ecell_children[i]; pnd = _nt->_v_parent[nd->v_node_index]; dv = pnd->extnode->v[0]; NODERHS(nd) -= NODEB(nd)*dv; NODERHS(pnd) += NODEA(nd)*dv; } } void nrn_setup_ext(NrnThread* _nt) { int i, j, cnt; Node *nd, *pnd, **ndlist; double* pd; double d, cfac, mfac; Extnode *nde, *pnde; Memb_list* ml = _nt->_ecell_memb_list; if (!ml) { return; } /*printnode("begin setup");*/ cnt = ml->nodecount; ndlist = ml->nodelist; cfac = .001 * _nt->cj; /* d contains all the membrane conductances (and capacitance) */ /* i.e. (cm/dt + di/dvm - dis/dvi)*[dvi] and (dis/dvi)*[dvx] */ for (i=0; i < cnt; ++i) { nd = ndlist[i]; nde = nd->extnode; d = NODED(nd); /* nde->_d only has -ELECTRODE_CURRENT contribution */ d = (*nde->_d[0] += NODED(nd)); /* now d is only the membrane current contribution */ /* i.e. d = cm/dt + di/dvm */ *nde->_x12[0] -= d; *nde->_x21[0] -= d; #if I_MEMBRANE pd = ml->data[i]; sav_g = d; #endif } /* series resistance, capacitance, and axial terms. */ for (i=0; i < cnt; ++i) { nd = ndlist[i]; nde = nd->extnode; pnd = _nt->_v_parent[nd->v_node_index]; if (pnd) { pd = nde->param; /* series resistance and capacitance to ground */ j = 0; for (;; ) { /* between j and j+1 layer */ mfac = (xg[j] + xc[j]*cfac); *nde->_d[j] += mfac; ++j; if (j == nlayer) { break; } *nde->_d[j] += mfac; *nde->_x12[j] -= mfac; *nde->_x21[j] -= mfac; } pnde = pnd->extnode; /* axial connections */ if (pnde) { /* parent sec may not be extracellular */ for (j=0; j < nlayer; ++j) { *nde->_d[j] -= nde->_b[j]; *pnde->_d[j] -= nde->_a[j];; *nde->_a_matelm[j] += nde->_a[j]; *nde->_b_matelm[j] += nde->_b[j];; } } } } /*printnode("end setup_lhs");*/ } /* based on treeset.c */ void ext_con_coef(void) /* setup a and b */ { int j,k; double dx, area; hoc_Item* qsec; Node *nd, **pnd; Extnode *nde; double *pd; /* temporarily store half segment resistances in rhs */ ForAllSections(sec) /*{*/ if (sec->pnode[0]->extnode){ dx = section_length(sec)/((double)(sec->nnode - 1)); for (j = 0; j < sec->nnode-1; j++) { nde = sec->pnode[j]->extnode; pd = nde->param; for (k=0; k < nlayer; ++k) { *nde->_rhs[k] = 1e-4*xraxial[k]*(dx/2.); /*Megohms*/ } } /* last segment has 0 length. */ nde = sec->pnode[j]->extnode; pd = nde->param; for (k=0; k < nlayer; ++k) { *nde->_rhs[k] = 0.; xc[k] = 0.; xg[k] = 0.; } /* if owns a rootnode */ if (!sec->parentsec) { nde = sec->parentnode->extnode; pd = nde->param; for (k=0; k < nlayer; ++k) { *nde->_rhs[k] = 0.; xc[k] = 0.; xg[k] = 0.; } } }} /* assume that if only one connection at x=1, then they butte together, if several connections at x=1 then last point is at x=1, has 0 area and other points are at centers of nnode-1 segments. If interior connection then child half section connects straight to the point*/ /* for the near future we always have a last node at x=1 with no properties */ ForAllSections(sec) /*{*/ if(sec->pnode[0]->extnode){ /* node half resistances in general get added to the node and to the node's "child node in the same section". child nodes in different sections don't involve parent node's resistance */ nde = sec->pnode[0]->extnode; for (k=0; k < nlayer; ++k) { nde->_b[k] = *nde->_rhs[k]; } for (j = 1; j < sec->nnode; j++) { nde = sec->pnode[j]->extnode; for (k=0; k < nlayer; ++k) { nde->_b[k] = *nde->_rhs[k] + *(sec->pnode[j-1]->extnode->_rhs[k]); /*megohms*/ } } }} ForAllSections(sec) /*{*/ if(sec->pnode[0]->extnode){ /* convert to siemens/cm^2 for all nodes except last and microsiemens for last. This means that a*V = mamps/cm2 and a*v in last node = nanoamps. Note that last node has no membrane properties and no area. It may perhaps recieve current stimulus later */ /* first the effect of node on parent equation. Note That last nodes have area = 1.e2 in dimensionless units so that last nodes have units of microsiemens's */ pnd = sec->pnode; nde = pnd[0]->extnode; area = NODEAREA(sec->parentnode); /* param[4] is rall_branch */ for (k=0; k < nlayer; ++k) { nde->_a[k] = -1.e2*sec->prop->dparam[4].val/(nde->_b[k] * area); } for (j = 1; j < sec->nnode; j++) { nde = pnd[j]->extnode; area = NODEAREA(pnd[j - 1]); for (k=0; k < nlayer; ++k) { nde->_a[k] = -1.e2/(nde->_b[k] * area); } } }} /* now the effect of parent on node equation. */ ForAllSections(sec) /*{*/ if(sec->pnode[0]->extnode){ for (j=0; j < sec->nnode; j++) { nd = sec->pnode[j]; nde = nd->extnode; for (k=0; k < nlayer; ++k) { nde->_b[k] = -1.e2/(nde->_b[k] * NODEAREA(nd)); } } }} } #if 0 /* needs to be fixed to deal with rootnodes having this property */ static void printnode(const char* s) { int in, i, j, k; hoc_Item* qsec; Section* sec; Node* nd; Extnode* nde; double *pd; NrnThread* _nt; FOR_THREADS(_nt) for (in=0; in < _nt->end; ++in) { nd = _nt->_v_node[in]; if (nd->extnode) { sec = nd->sec; j = nd->sec_node_index_; nde = nd->extnode; pd = nde->param; for (k=0; k < nlayer; ++k) { printf("%s %s nd%d layer%d v=%g rhs=%g:\n", s, secname(sec), j, k, nde->v[k], *nde->_rhs[k]); printf("xraxial=%g xg=%g xc=%g e=%g\n", xraxial[k], xg[k], xc[k], e_extracellular); } } } } #if 0 static int cntndsave; static Extnode* ndesave; void save2mat(void) { int i, j, k, im, ipm; register Node *nd, *pnd; register Extnode *nde, *pnde; if (cntndsave < v_node_count) { if (ndesave) { free(ndesave); } cntndsave = v_node_count; ndesave = (Extnode*)ecalloc(cntndsave, sizeof(Extnode)); } for (i=0; i < v_node_count; ++i) { nd = v_node[i]; nde = nd->extnode; if (nde) { for (j=0; j < nlayer; ++j) { ndesave[i].v[j] = nde->v[j]; ndesave[i].rhs[j] = nde->_rhs[j]; for (k=0; k < 2*(nlayer)+1; ++k) { ndesave[i].m[j][k] = nde->_m[j][k]; } if (!v_parent[i]->extnode && j > 0) { ndesave[i].m[j][0] = 0.; ndesave[i].m[j][2*(nlayer)] = 0.; } } }else{ for (j=0; j < nlayer; ++j) { ndesave[i].m[j][nlayer] = 1; } ndesave[i].v[0] = nd->v; ndesave[i].m[0][nlayer] = NODED(nd); ndesave[i].rhs[0] = NODERHS(nd); ndesave[i].m[0][0] = NODEB(nd); ndesave[i].m[0][2*(nlayer)] = NODEA(nd); } } } #if 0 #define DBG printf #else DBG() {} #endif void check2mat(void) { int i, j, k, im, ip; Node* nd; Extnode* nde; double sum; /* copy solved v to saved v */ for (i=0; i < v_node_count; ++ i) { nd = v_node[i]; nde = nd->extnode; if (nde) { for (j=0; j < (nlayer); ++j) { ndesave[i].v[j] = nde->_rhs[j]; } }else{ ndesave[i].v[0] = NODERHS(nd); } } #if 0 printf("mat\n"); for (i=0; i < v_node_count; ++i) { printf("node %d\n", i); for (j=0; j < (nlayer); ++j) { printf("%d %d ", j, i); for (k=0; k <= 2*(nlayer); ++k) { printf(" %-8.3g", ndesave[i].m[j][k]); } printf(" %g %g\n", ndesave[i].v[j], ndesave[i].rhs[j]); } } #endif /* rhs - M*V accomplished by subtracting every term from rhs */ for (i=0; i < v_node_count; ++i) { DBG("work on node %d\n", i); if (v_parent[i]) { ip = v_parent[i]->v_node_index; /* effect of parent on node */ DBG(" effect of parent %d on node %d\n", ip, i); for (j=0; j < nlayer; ++j) { DBG(" work on layer %d\n", j); for (k=j; k < nlayer; ++k) { DBG(" nde[%d].rhs[%d] -= nde[%d].v[%d]*nde[%d].m[%d][%d]\n", i,j,ip,k,i,j,k-j); DBG(" %g * %g\n",ndesave[ip].v[k],ndesave[i].m[j][k-j]); ndesave[i].rhs[j] -= ndesave[ip].v[k]*ndesave[i].m[j][k-j]; } } /* effect of node on parent */ DBG(" effect of node %d on parent %d\n", i, ip); for (j=0; j < nlayer; ++j) { DBG(" work on layer %d\n", j); for (k=0; k <= j; ++k) { DBG(" nde[%d].rhs[%d] -= nde[%d].v[%d]*nde[%d].m[%d][%d]\n", ip,j,i,k,i,j,2*(nlayer)-j+k); DBG(" %g * %g\n",ndesave[i].v[k],ndesave[i].m[j][2*(nlayer)-j+k]); ndesave[ip].rhs[j] -= ndesave[i].v[k]*ndesave[i].m[j][2*(nlayer)-j+k]; } } } /* effect of node on node */ DBG(" effect of node %d on node %d\n", i, i); for (j=0; j < nlayer; ++j) { DBG(" work on layer %d\n", j); for (k=0; k < nlayer; ++k) { DBG(" nde[%d].rhs[%d] -= nde[%d].v[%d]*nde[%d].m[%d][%d]\n", i,j,i,k,i,j,(nlayer)+k-j); DBG(" %g * %g\n",ndesave[i].v[k],ndesave[i].m[j][(nlayer)+k-j]); ndesave[i].rhs[j] -= ndesave[i].v[k]*ndesave[i].m[j][(nlayer)+k-j]; } } } for (i=0; i < v_node_count; ++i) { for (j=0; j < (nlayer); ++j) { if (fabs(ndesave[i].rhs[j]) > 1e-5) { printf("bad soln of eq %d,%d rhs-M*V=%g\n", i,j, ndesave[i].rhs[j]); } } } } #endif #endif #endif /*EXTRACELLULAR*/ neuron-7.5/src/nrnoc/fadvance.c000066400000000000000000000651501323325274500165310ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include "neuron.h" #include "section.h" #include "nrniv_mf.h" #include "multisplit.h" #define nrnoc_fadvance_c #include "nonvintblock.h" #include "nrncvode.h" #include "spmatrix.h" /* after an fadvance from t-dt to t, v is defined at t states that depend on v are defined at t+dt/2 states, such as concentration that depend on current are defined at t and currents are defined at t-dt/2. */ /* fcurrent is used to set up all assigned variables without changing any states. It assumes all states have their values at time t which is only first order correct. It determines the nonvint assignments first so that ena, etc. are correct for the current determinations. We demand that nonvint assignments can be done without changing states when dt is temporarily set to 0. It turned out to be a bad idea to do this. Many methods (KINETIC, PROCEDURE) for solving are not even called when dt =0. Also it plays havoc with tables that are recomputed several times when dt is changed then changed back. Therefore we are no longer trying to initialize assigned variables within SOLVE'd blocks. Instead we are making initialization more convenient, at least within the normal situations, by introducing a finitialize() with an optional argument vinit. finitialize will call the INITIALIZE block for all mechanisms in all segments. (Default initialization sets all states to state0.) The user can set things up specially in a models INITIAL block. INITIAL blocks can make use of v. With care they can make use of ionic concentrations just like breakpoint and solve blocks. When the argument is present, v for all segments are set to that value. */ #if !defined(NRNMPI) || NRNMPI == 0 extern double nrnmpi_wtime(); #endif extern double* nrn_mech_wtime_; extern double t, dt; extern double chkarg(); extern void nrn_fixed_step(); extern void nrn_fixed_step_group(int); static void* nrn_fixed_step_thread(NrnThread*); static void* nrn_fixed_step_group_thread(NrnThread* nth); static void* nrn_fixed_step_lastpart(NrnThread*); extern void* setup_tree_matrix(NrnThread*); extern void nrn_solve(NrnThread*); extern void nonvint(NrnThread* nt); extern void nrncvode_set_t(double t); static void* nrn_ms_treeset_through_triang(NrnThread*); static void* nrn_ms_reduce_solve(NrnThread*); static void* nrn_ms_bksub(NrnThread*); static void* nrn_ms_bksub_through_triang(NrnThread*); extern void* nrn_multisplit_triang(NrnThread*); extern void* nrn_multisplit_reduce_solve(NrnThread*); extern void* nrn_multisplit_bksub(NrnThread*); extern void (*nrn_multisplit_setup_)(); void (*nrn_allthread_handle)(); extern int tree_changed; extern int diam_changed; extern int state_discon_allowed_; extern double hoc_epsilon; static void update(NrnThread*); #if 0 /* 1 to save space, but must worry about other uses of the memb_list such as in netcvode.cpp in fornetcon_prepare */ extern short* nrn_is_artificial_; extern Template** nrn_pnt_template_; #endif #if NRN_DAQ extern void nrn_daq_scanstart(); extern void nrn_daq_ai(); extern void nrn_daq_ao(); #endif #define NRNCTIME 1 #define NONVINT_ODE_COUNT 5 #if NRNCTIME #define CTBEGIN double wt = nrnmpi_wtime(); #define CTADD nth->_ctime += nrnmpi_wtime() - wt; #else #define CTBEGIN /**/ #define CTADD /**/ #endif #define ELIMINATE_T_ROUNDOFF 0 #if ELIMINATE_T_ROUNDOFF /* in order to simplify and as much as possible avoid the handling of round-off error due to repeated t += dt, we use t = nrn_tbase_ + nrn_ndt_ * nrn_dt_; to advance time. The problems that must be overcome are when the user changes dt in the middle of a run or switches from cvode or abruptly and arbitrarily sets a new value of t and continues from there (hence nrn_tbase_) */ double nrn_ndt_, nrn_tbase_, nrn_dt_; void nrn_chk_ndt() { if (dt != nrn_dt_ || t != nrn_tbase_ + nrn_ndt_ * nrn_dt_) { if (nrnmpi_myid == 0) printf("nrn_chk_ndt t=%g dt=%g old nrn_tbase_=%g nrn_ndt_=%g nrn_dt_=%g\n", t, dt, nrn_tbase_, nrn_ndt_, nrn_dt_); nrn_dt_ = dt; nrn_tbase_ = t; nrn_ndt_ = 0.; } } #endif /* ELIMINATE_T_ROUNDOFF */ /* There are (too) many variants of nrn_fixed_step depending on nrnmpi_numprocs 1 or > 1, nrn_nthread 1 or > 1, nrnmpi_v_transfer nil or callable, nrn_multisplit_setup nil or callable, and whether one step with fadvance or possibly many with ParallelContext.psolve before synchronizing with NetParEvent. The combination of simultaneous nrnmpi_numprocs > 1 and nrn_nthread > 1 with parallel transfer requires some refactoring of the use of the old (*nrnmpi_v_transfer_)() from within nonvint(nt) which handled either mpi or threads but cannot handle both simultaneously. (Unless the first thread that arrives in nrnmpi_v_transfer is the one that accomplishes the mpi transfer). Instead, we replace with nrnthread_v_transfer(nt) to handle the per thread copying of source data into the target space owned by the thread. Between update (called by nrn_fixed_step_thread and nrn_ms_bksub), and nonvint (called by nrn_fixed_step_lastpart, we need to have thread 0 do the interprocessor transfer of source voltages to a either a staging area for later copying to the target by a thread (or directly to the target if only one thread). This will happen with (*nrnmpi_v_transfer_)(). (Look Ma, no threads). This deals properly with the necessary mpi synchronization. And leaves thread handling where it was before. Also, writing to the staging area is only done by thread 0. Fixed step and global variable step logic is limited to the case where an nrnmpi_v_transfer requires existence of nrnthread_v_transfer (even if one thread). */ #if 1 || PARANEURON void (*nrnmpi_v_transfer_)(); /* called by thread 0 */ void (*nrnthread_v_transfer_)(NrnThread* nt); /* if at least one gap junction has a source voltage with extracellular inserted */ void (*nrnthread_vi_compute_)(NrnThread* nt); #endif #if VECTORIZE extern int v_structure_change; #endif #if CVODE int cvode_active_; #endif int stoprun; int nrn_use_fast_imem; #define PROFILE 0 #include "profile.h" void fadvance(void) { tstopunset; #if CVODE if (cvode_active_) { cvode_fadvance(-1.); tstopunset; hoc_retpushx(1.); return; } #endif if (tree_changed) { setup_topology(); } if (v_structure_change) { v_setup_vectors(); } if (diam_changed) { recalc_diam(); } nrn_fixed_step(); tstopunset; hoc_retpushx(1.); } /* batch_save() initializes list of variables batch_save(&varname, ...) adds variable names to list for saving batch_save("varname", ...) adds variable names to the list and name will appear in header. batch_run(tstop, tstep, "file") saves variables in file every tstep */ static void batch_out(), batch_open(), batch_close(); void batch_run(void) /* avoid interpreter overhead */ { double tstop, tstep, tnext; char* filename; char* comment; tstopunset; tstop = chkarg(1,0.,1e20); tstep = chkarg(2, 0., 1e20); if (ifarg(3)) { filename = gargstr(3); }else{ filename = 0; } if (ifarg(4)) { comment = gargstr(4); }else{ comment = ""; } if (tree_changed) { setup_topology(); } #if VECTORIZE if (v_structure_change) { v_setup_vectors(); } #endif batch_open(filename, tstop, tstep, comment); batch_out(); if (cvode_active_) { while (t < tstop) { cvode_fadvance(t+tstep); batch_out(); } }else{ tstep -= dt/4.; tstop -= dt/4.; tnext = t + tstep; while (t < tstop) { nrn_fixed_step(); if (t > tnext) { batch_out(); tnext = t + tstep; } if (stoprun) { tstopunset; break; } } } batch_close(); hoc_retpushx(1.); } static void dt2thread(double adt) { if (adt != nrn_threads[0]._dt) { int i; for (i=0; i < nrn_nthread; ++i) { NrnThread* nt = nrn_threads + i; nt->_t = t; nt->_dt = dt; if (secondorder) { nt->cj = 2.0/dt; }else{ nt->cj = 1.0/dt; } } } } static int _upd; static void* daspk_init_step_thread(NrnThread* nt) { setup_tree_matrix(nt); nrn_solve(nt); if (_upd) { update(nt); } return (void*)0; } void nrn_daspk_init_step(double tt, double dteps, int upd){ int i; double dtsav = nrn_threads->_dt; int so = secondorder; dt = dteps; t = tt; secondorder = 0; dt2thread(dteps); nrn_thread_table_check(); _upd = upd; nrn_multithread_job(daspk_init_step_thread); dt = dtsav; secondorder = so; dt2thread(dtsav); nrn_thread_table_check(); } void nrn_fixed_step() { int i; #if ELIMINATE_T_ROUNDOFF nrn_chk_ndt(); #endif if (t != nrn_threads->_t) { dt2thread(-1.); }else{ dt2thread(dt); } nrn_thread_table_check(); if (nrn_multisplit_setup_) { nrn_multithread_job(nrn_ms_treeset_through_triang); // remove to avoid possible deadlock where some ranks do a // v transfer and others do a spike exchange. // i.e. must complete the full multisplit time step. //if (!nrn_allthread_handle) { nrn_multithread_job(nrn_ms_reduce_solve); nrn_multithread_job(nrn_ms_bksub); /* see comment below */ if (nrnthread_v_transfer_) { if (nrnmpi_v_transfer_) { (*nrnmpi_v_transfer_)(); } nrn_multithread_job(nrn_fixed_step_lastpart); } //} }else{ nrn_multithread_job(nrn_fixed_step_thread); /* if there is no nrnthread_v_transfer then there cannot be a nrnmpi_v_transfer and lastpart will be done in above call. */ if (nrnthread_v_transfer_) { if (nrnmpi_v_transfer_) { (*nrnmpi_v_transfer_)(); } nrn_multithread_job(nrn_fixed_step_lastpart); } } t = nrn_threads[0]._t; if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } } /* better cache efficiency since a thread can do an entire minimum delay integration interval before joining */ static int step_group_n; static int step_group_begin; static int step_group_end; void nrn_fixed_step_group(int n) { int i; #if ELIMINATE_T_ROUNDOFF nrn_chk_ndt(); #endif dt2thread(dt); nrn_thread_table_check(); if (nrn_multisplit_setup_) { int b = 0; nrn_multithread_job(nrn_ms_treeset_through_triang); step_group_n = 0; /* abort at bksub flag */ for (i=1; i < n; ++i) { nrn_multithread_job(nrn_ms_reduce_solve); nrn_multithread_job(nrn_ms_bksub_through_triang); if (step_group_n) { step_group_n = 0; if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } /* aborted step at bksub, so if not stopped must do the triang*/ b = 1; if (!stoprun) { nrn_multithread_job(nrn_ms_treeset_through_triang); } } if (stoprun) { break; } b = 0; } if (!b) { nrn_multithread_job(nrn_ms_reduce_solve); nrn_multithread_job(nrn_ms_bksub); } if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } }else{ step_group_n = n; step_group_begin = 0; step_group_end = 0; while(step_group_end < step_group_n) { /*printf("step_group_end=%d step_group_n=%d\n", step_group_end, step_group_n);*/ nrn_multithread_job(nrn_fixed_step_group_thread); if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } if (stoprun) { break; } step_group_begin = step_group_end; } } t = nrn_threads[0]._t; } void* nrn_fixed_step_group_thread(NrnThread* nth) { int i; nth->_stop_stepping = 0; for (i = step_group_begin; i < step_group_n; ++i) { nrn_fixed_step_thread(nth); if (nth->_stop_stepping) { if (nth->id == 0) { step_group_end = i + 1; } nth->_stop_stepping = 0; return (void*)0; } } if (nth->id == 0) { step_group_end = step_group_n; } return (void*)0; } void* nrn_fixed_step_thread(NrnThread* nth) { double wt; deliver_net_events(nth); wt = nrnmpi_wtime(); nrn_random_play(nth); #if ELIMINATE_T_ROUNDOFF nth->nrn_ndt_ += .5; nth->_t = nrn_tbase_ + nth->nrn_ndt_ * nrn_dt_; #else nth->_t += .5 * nth->_dt; #endif fixed_play_continuous(nth); setup_tree_matrix(nth); nrn_solve(nth); second_order_cur(nth); update(nth); CTADD /* To simplify the logic, if there is no nrnthread_v_transfer then there cannot be an nrnmpi_v_transfer. */ if (!nrnthread_v_transfer_) { nrn_fixed_step_lastpart(nth); } return (void*)0; } extern void nrn_extra_scatter_gather(int direction, int tid); extern void nrn_ba(NrnThread*, int); void* nrn_fixed_step_lastpart(NrnThread* nth) { CTBEGIN #if NRN_DAQ nrn_daq_ao(); #endif #if ELIMINATE_T_ROUNDOFF nth->nrn_ndt_ += .5; nth->_t = nrn_tbase_ + nth->nrn_ndt_ * nrn_dt_; #else nth->_t += .5 * nth->_dt; #endif fixed_play_continuous(nth); #if NRN_DAQ nrn_daq_scanstart(); #endif nrn_extra_scatter_gather(0, nth->id); nonvint(nth); nrn_ba(nth, AFTER_SOLVE); #if NRN_DAQ nrn_daq_ai(); #endif fixed_record_continuous(nth); CTADD nrn_deliver_events(nth) ; /* up to but not past texit */ return (void*)0; } /* nrn_fixed_step_thread is split into three pieces */ void* nrn_ms_treeset_through_triang(NrnThread* nth) { double wt; deliver_net_events(nth); wt = nrnmpi_wtime(); nrn_random_play(nth); #if ELIMINATE_T_ROUNDOFF nth->nrn_ndt_ += .5; nth->_t = nrn_tbase_ + nth->nrn_ndt_ * nrn_dt_; #else nth->_t += .5 * nth->_dt; #endif fixed_play_continuous(nth); setup_tree_matrix(nth); nrn_multisplit_triang(nth); CTADD return (void*)0; } void* nrn_ms_reduce_solve(NrnThread* nth) { nrn_multisplit_reduce_solve(nth); return (void*)0; } void* nrn_ms_bksub(NrnThread* nth) { CTBEGIN nrn_multisplit_bksub(nth); second_order_cur(nth); update(nth); CTADD /* see above comment in nrn_fixed_step_thread */ if (!nrnthread_v_transfer_) { nrn_fixed_step_lastpart(nth); } return (void*)0; } void* nrn_ms_bksub_through_triang(NrnThread* nth) { nrn_ms_bksub(nth); if (nth->_stop_stepping) { nth->_stop_stepping = 0; if (nth == nrn_threads) { step_group_n = 1; } return (void*)0; } nrn_ms_treeset_through_triang(nth); return (void*)0; } #if NRN_REALTIME void nrn_fake_step() { /* get as much into cache as possible */ /* if we could do a full nrn_fixed_step we would save about 10 us */ /*Not nearly enough. This only saving a few */ setup_tree_matrix(); nrn_solve(); #if 0 nonvint(); /* this is an important one, 2 more us, but ... */ #endif } #endif static void update(NrnThread* _nt) { int i, i1, i2; i1 = 0; i2 = _nt->end; #if CACHEVEC if (use_cachevec) { /* do not need to worry about linmod or extracellular*/ if (secondorder) { for (i=i1; i < i2; ++i) { VEC_V(i) += 2.*VEC_RHS(i); } }else{ for (i=i1; i < i2; ++i) { VEC_V(i) += VEC_RHS(i); } } }else #endif { /* use original non-vectorized update */ if (secondorder) { #if _CRAY #pragma _CRI ivdep #endif for (i=i1; i < i2; ++i) { NODEV(_nt->_v_node[i]) += 2.*NODERHS(_nt->_v_node[i]); } }else{ #if _CRAY #pragma _CRI ivdep #endif for (i=i1; i < i2; ++i) { NODEV(_nt->_v_node[i]) += NODERHS(_nt->_v_node[i]); } if (use_sparse13) { nrndae_update(); } } } /* end of non-vectorized update */ #if EXTRACELLULAR nrn_update_2d(_nt); #endif if (nrnthread_vi_compute_) { (*nrnthread_vi_compute_)(_nt); } #if I_MEMBRANE if (_nt->tml) { assert(_nt->tml->index == CAP); nrn_capacity_current(_nt, _nt->tml->ml); } #endif if (nrn_use_fast_imem) { nrn_calc_fast_imem(_nt); } } void nrn_calc_fast_imem(NrnThread* _nt) { int i; int i1 = 0; int i3 = _nt->end; double* pd = _nt->_nrn_fast_imem->_nrn_sav_d; double* prhs = _nt->_nrn_fast_imem->_nrn_sav_rhs; if (use_cachevec) { for (i = i1; i < i3 ; ++i) { prhs[i] = (pd[i]*VEC_RHS(i) + prhs[i])*VEC_AREA(i)*0.01; } }else{ for (i = i1; i < i3 ; ++i) { Node* nd = _nt->_v_node[i]; prhs[i] = (pd[i]*NODERHS(nd) + prhs[i])*NODEAREA(nd)*0.01; } } } void fcurrent(void) { int i; if (tree_changed) { setup_topology(); } if (v_structure_change) { v_setup_vectors(); } if (diam_changed) { recalc_diam(); } dt2thread(-1.); nrn_thread_table_check(); state_discon_allowed_ = 0; nrn_multithread_job(setup_tree_matrix); state_discon_allowed_ = 1; hoc_retpushx(1.); } void nrn_print_matrix(NrnThread* _nt) { extern int section_count; extern Section** secorder; int isec, inode; Section* sec; Node* nd; if (use_sparse13) { if(ifarg(1) && chkarg(1, 0., 1.) == 0.) { spPrint(_nt->_sp13mat, 1, 0, 1); }else{ int i, n = spGetSize(_nt->_sp13mat, 0); spPrint(_nt->_sp13mat, 1, 1, 1); for (i=1; i <= n; ++i) { printf("%d %g\n", i, _nt->_actual_rhs[i]); } } }else if (_nt) { for (inode = 0; inode < _nt->end; ++inode) { nd = _nt->_v_node[inode]; printf("%d %g %g %g %g\n", inode, ClassicalNODEB(nd), ClassicalNODEA(nd), NODED(nd), NODERHS(nd)); } }else{ for (isec = 0; isec < section_count; ++isec) { sec = secorder[isec]; for (inode = 0; inode < sec->nnode; ++inode) { nd = sec->pnode[inode]; printf("%d %d %g %g %g %g\n", isec, inode, ClassicalNODEB(nd), ClassicalNODEA(nd), NODED(nd), NODERHS(nd)); } } } } void fmatrix(void) { if (ifarg(1)) { double x; Section* sec; int id; Node* nd; NrnThread* _nt; nrn_seg_or_x_arg(1, &sec, &x); id = (int)chkarg(2, 1., 4.); nd = node_exact(sec, x); _nt = nd->_nt; switch (id) { case 1: hoc_retpushx(NODEA(nd)); break; case 2: hoc_retpushx(NODED(nd)); break; case 3: hoc_retpushx(NODEB(nd)); break; case 4: hoc_retpushx(NODERHS(nd)); break; } return; } nrn_print_matrix(nrn_threads); hoc_retpushx(1.); return; } void nonvint(NrnThread* _nt) { #if VECTORIZE int i=0; double w; int measure = 0; NrnThreadMembList* tml; #if 1 || PARANEURON /* nrnmpi_v_transfer if needed was done earlier */ if (nrnthread_v_transfer_) {(*nrnthread_v_transfer_)(_nt);} #endif if (_nt->id == 0 && nrn_mech_wtime_) { measure = 1; } errno = 0; for (tml = _nt->tml; tml; tml = tml->next) if (memb_func[tml->index].state) { Pvmi s = memb_func[tml->index].state; if (measure) { w = nrnmpi_wtime(); } (*s)(_nt, tml->ml, tml->index); if (measure) { nrn_mech_wtime_[tml->index] += nrnmpi_wtime() - w; } if (errno) { if (nrn_errno_check(i)) { hoc_warning("errno set during calculation of states", (char*)0); } } } long_difus_solve(0, _nt); /* if any longitudinal diffusion */ nrn_nonvint_block_fixed_step_solve(_nt->id); #endif } #if VECTORIZE int nrn_errno_check(int i) { int ierr; ierr = hoc_errno_check(); if (ierr) { fprintf(stderr, "%d errno=%d at t=%g during call to mechanism %s\n", nrnmpi_myid, ierr, t, memb_func[i].sym->name); } return ierr; } #else int nrn_errno_check(Prop* p, int inode, Section* sec) { int ierr; char* secname(); ierr = hoc_errno_check(); if (ierr) { fprintf(stderr, "%d errno set at t=%g during call to mechanism %s at node %d in section %s\n", nrnmpi_myid, t, memb_func[p->type].sym->name, inode, secname(sec)); } return ierr; } #endif void frecord_init(void) { /* useful when changing states after an finitialize() */ int i; dt2thread(-1); nrn_record_init(); if (!cvode_active_) { for (i=0; i < nrn_nthread; ++i) { fixed_record_continuous(nrn_threads + i); } } hoc_retpushx(1.); } void verify_structure(void) { if (tree_changed) { setup_topology(); } if (v_structure_change) { v_setup_vectors(); } if (diam_changed) { recalc_diam(); } nrn_solver_prepare(); /* cvode ready to be used */ } void nrn_finitialize(int setv, double v) { int iord, i; NrnThread* _nt; extern int _ninits; extern short* nrn_is_artificial_; ++_ninits; nrn_fihexec(3); /* model structure changes can be made */ verify_structure(); #if ELIMINATE_T_ROUNDOFF nrn_ndt_ = 0.; nrn_dt_ = dt; nrn_tbase_ = 0.; #else t = 0.; dt2thread(-1.); #endif if (cvode_active_) { nrncvode_set_t(t); } nrn_thread_table_check(); clear_event_queue(); nrn_spike_exchange_init(); nrn_random_play(_nt); #if VECTORIZE nrn_play_init(); /* Vector.play */ for (i=0; i < nrn_nthread; ++i) { nrn_deliver_events(nrn_threads + i); /* The play events at t=0 */ } if (setv) { #if _CRAY #pragma _CRI ivdep #endif FOR_THREADS(_nt) for (i=0; i < _nt->end; ++i) { NODEV(_nt->_v_node[i]) = v; } } #if 1 || PARANEURON if (nrnthread_vi_compute_) FOR_THREADS(_nt){ (*nrnthread_vi_compute_)(_nt); } if (nrnmpi_v_transfer_) { (nrnmpi_v_transfer_)(); } if (nrnthread_v_transfer_) FOR_THREADS(_nt){ (*nrnthread_v_transfer_)(_nt); } #endif nrn_fihexec(0); /* after v is set but before INITIAL blocks are called*/ for (i=0; i < nrn_nthread; ++i) { nrn_ba(nrn_threads + i, BEFORE_INITIAL); } #if _CRAY cray_node_init(); #endif /* the INITIAL blocks are ordered so that mechanisms that write concentrations are after ions and before mechanisms that read concentrations. */ /* the memblist list in NrnThread is already so ordered */ #if MULTICORE for (i=0; i < nrn_nthread; ++i) { NrnThread* nt = nrn_threads + i; nrn_nonvint_block_init(nt->id); NrnThreadMembList* tml; for (tml = nt->tml; tml; tml = tml->next) { Pvmi s = memb_func[tml->index].initialize; if (s) { (*s)(nt, tml->ml, tml->index); } } } #endif for (iord=0; iord < n_memb_func; ++iord) { i = memb_order_[iord]; /* first clause due to MULTICORE */ if (nrn_is_artificial_[i]) if (memb_func[i].initialize) { Pvmi s = memb_func[i].initialize; #if 0 if (nrn_is_artificial_[i]) { /* I hope the space saving of the memb_list arrays is worth doing this specifically. And if art cells are needed in the memb_list anywhere else we will have do do something similar to this. This gives up vectorization but this is only initialization and all the other use of artcell should be event driven. */ Prop* p; hoc_Item* q; hoc_List* list = nrn_pnt_template_[i]->olist; ITERATE(q, list) { Object* obj = OBJ(q); Prop* p = ((Point_process*)obj->u.this_pointer)->prop; (*s)((Node*)0, p->param, p->dparam); } }else if (memb_list[i].nodecount){ #else if (memb_list[i].nodecount){ #endif (*s)(nrn_threads, memb_list + i, i); } if (errno) { if (nrn_errno_check(i)) { hoc_warning("errno set during call to INITIAL block", (char*)0); } } } } #endif if (use_sparse13) { nrndae_init(); } init_net_events(); for (i = 0; i < nrn_nthread; ++i) { nrn_ba(nrn_threads + i, AFTER_INITIAL); } nrn_fihexec(1); /* after INITIAL blocks, before fcurrent*/ for (i=0; i < nrn_nthread; ++i) { nrn_deliver_events(nrn_threads + i); /* The INITIAL sent events at t=0 */ } if (cvode_active_) { cvode_finitialize(t); nrn_record_init(); }else{ state_discon_allowed_ = 0; for (i=0; i < nrn_nthread; ++i) { setup_tree_matrix(nrn_threads + i); if (nrn_use_fast_imem) { nrn_calc_fast_imem(nrn_threads + i); } } state_discon_allowed_ = 1; #if 0 && NRN_DAQ nrn_daq_ao(); nrn_daq_scanstart(); nrn_daq_ai(); #endif nrn_record_init(); for (i=0; i < nrn_nthread; ++i) { fixed_record_continuous(nrn_threads + i); } } for (i=0; i < nrn_nthread; ++i) { nrn_deliver_events(nrn_threads + i); /* The record events at t=0 */ } #if NRNMPI nrn_spike_exchange(nrn_threads); #endif if (nrn_allthread_handle) { (*nrn_allthread_handle)(); } nrn_fihexec(2); /* just before return */ } void finitialize(void) { int setv; double v = 0.0; setv = 0; if (ifarg(1)) { v = *getarg(1); setv = 1; } tstopunset; nrn_finitialize(setv, v); tstopunset; hoc_retpushx(1.); } static FILE* batch_file; static int batch_size; static int batch_n; static double** batch_var; static void batch_open(name, tstop, tstep, comment) char* name, *comment; double tstop, tstep; { if (batch_file) { batch_close(); } if (!name) { return; } batch_file = fopen(name, "w"); if (!batch_file) { hoc_execerror("Couldn't open batch file", name); } fprintf(batch_file, "%s\nbatch_run from t = %g to %g in steps of %g with dt = %g\n", comment, t, tstop, tstep, dt); #if 0 fprintf(batch_file, "variable names --\n"); if (!batch_var) { batch_var = hoc_newlist(); } count = 0; ITERATE(q, batch_varname) { fprintf(batch_file, "%s\n", STR(q)); ++count; } if (count != batch_n) { if (batch_var) { free(batch_var); } batch_n = count; batch_var = (double**)ecalloc(batch_n, sizeof(double*)); } count = 0; ITERATE(q, batch_varname) { batch_var[count++] = hoc_val_pointer(STR(q)); } #endif } static void batch_close() { if (batch_file) { fclose(batch_file); batch_file = 0; } } static void batch_out() { if (batch_file) { int i; for (i =0; i < batch_n; ++i) { fprintf(batch_file, " %g", *batch_var[i]); } fprintf(batch_file,"\n"); } } void batch_save(void) { double* hoc_pgetarg(); int i; if (!ifarg(1)) { batch_n = 0; }else{ for (i=1; ifarg(i); ++i) { if ( batch_size <= batch_n){ batch_size += 20; batch_var = (double**)erealloc(batch_var, batch_size*sizeof(double*)); } batch_var[batch_n] = hoc_pgetarg(i); ++batch_n; } } hoc_retpushx(1.); } void nrn_ba(NrnThread* nt, int bat){ NrnThreadBAList* tbl; int i; for (tbl = nt->tbl[bat]; tbl; tbl = tbl->next) { nrn_bamech_t f = tbl->bam->f; int type = tbl->bam->type; Memb_list* ml = tbl->ml; for (i=0; i < ml->nodecount; ++i) { (*f)(ml->nodelist[i], ml->data[i], ml->pdata[i], ml->_thread, nt); } } } typedef struct List_nonvint_block { int (*func)(int method, int size, double* pd1, double* pd2, int tid); struct List_nonvint_block *next; } List_nonvint_block; /* a global list to store the nrn_nonvint_block functions */ List_nonvint_block* nonvint_block_list = NULL; int nrn_nonvint_block_exe(int method, int size, double* pd1, double* pd2, int tid) { /* execute all functions in nonvint_block_list and return the sum of the * return values */ int rval, sum = 0; List_nonvint_block* node; for(node = nonvint_block_list; node != NULL; node = node-> next) { rval = (*(node->func))(method, size, pd1, pd2, tid); if(rval == -1) { hoc_execerror("nrn_nonvint_block error", 0); } else { sum += rval; } if (method == NONVINT_ODE_COUNT) { size += rval; } } return sum; } int set_nonvint_block(int (*new_nrn_nonvint_block)(int method, int size, double* pd1, double* pd2, int tid)) { /* store new_nrn_nonvint_block functions in a list */ List_nonvint_block* node = (List_nonvint_block*)malloc(sizeof(List_nonvint_block)); node->func = new_nrn_nonvint_block; node->next = NULL; if(nonvint_block_list == NULL) { nonvint_block_list = node; } else { nonvint_block_list->next = node; } /* could this be set directly in nrn_nonvint_block_helper? */ nrn_nonvint_block = &nrn_nonvint_block_exe; return 0; } int nrn_nonvint_block_helper(int method, int size, double* pd1, double* pd2, int tid) { int rval = (*nrn_nonvint_block)(method, size, pd1, pd2, tid); if (rval == -1) { hoc_execerror("nrn_nonvint_block error", 0); } return rval; } /* Derived from scopmath/euler.c. Here because scopmath does not know about NrnThread */ #include "nrniv_mf.h" #undef SUCCESS #define SUCCESS 0 #define der_(arg) p[der[arg]] #define var_(arg) p[var[arg]] /* ARGSUSED */ int euler_thread(int neqn, int* var, int* der, double* p, int (*func)(double*, Datum*, Datum*, NrnThread*), Datum* ppvar, Datum* thread, NrnThread* nt) { int i; double dt = nt->_dt; /* Calculate the derivatives */ (*func) (p, ppvar, thread, nt); /* Update dependent variables --- note defines in euler above*/ for (i = 0; i < neqn; i++) var_(i) += dt * (der_(i)); return (SUCCESS); } neuron-7.5/src/nrnoc/feature.c000066400000000000000000000166451323325274500164220ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* NOT VECTORIZED */ #define NRN_VECTORIZED 0 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init_ #define _nrn_initial _nrn_initial_ #define nrn_cur _nrn_cur_ #define _nrn_current _nrn_current_ #define nrn_jacob _nrn_jacob_ #define nrn_state _nrn_state_ #define _net_receive _net_receive_ #define install_vector_fitness install_vector_fitness_ #define _threadargscomma_ /**/ #define _threadargsprotocomma_ /**/ #define _threadargs_ /**/ #define _threadargsproto_ /**/ /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); static double *_p; static Datum *_ppvar; #define t nrn_threads->_t #define dt nrn_threads->_dt #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; /* external NEURON variables */ /* declaration of user functions */ static void _hoc_install_vector_fitness(void); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _p = _prop->param; _ppvar = _prop->dparam; } static void _hoc_setdata() { Prop *_prop, *hoc_getdata_range(int); _prop = hoc_getdata_range(_mechtype); _setdata(_prop); hoc_retpushx(1.); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { "setdata_feature", _hoc_setdata, "install_vector_fitness", _hoc_install_vector_fitness, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { 0,0 }; static double v = 0; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "feature", 0, 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; _p = nrn_prop_data_alloc(_mechtype, 0, _prop); /*initialize range parameters*/ _prop->param = _p; _prop->param_size = 0; } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _feature_reg_() { int _vectorized = 0; _initlists(); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 feature /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/feature.mod\n"); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int install_vector_fitness(); /*VERBATIM*/ #include "hocdec.h" static double width(void* vv) { int i, nx, ny, i1, i2; double *x, *y; double h; h = *getarg(2); ny = vector_instance_px(vv, &y); nx = vector_arg_px(1, &x); if (nx != ny) return 0.; for (i1 = 0; i1 < nx; ++i1) { if (y[i1] >= h) { break;} } for (i2 = i1+1; i2 < nx; ++i2) { if (y[i2] <= h) { break; } } return x[i2] - x[i1]; } /* xval, yval must be sorted in increasing order for xval */ /* xval is relative to the peak of the data */ /* xpeak is the peak location of the simulation */ /* xfitness is a measure of match in the x-dimension relative to peak location for particular values of y */ /* yfitness is a measure of match in the y-dimension relative to peak location for particular values of relative x */ static double xfitness(void* vv) { int nx, ny, nyval, nxval, i, j; double sum, d, xpeak, *y, *x, *yval, *xval; ny = vector_instance_px(vv, &y); nx = vector_arg_px(1, &x); if (nx != ny) { hoc_execerror("vectors not same size", 0); } xpeak = *getarg(2); nyval = vector_arg_px(3, &yval); nxval = vector_arg_px(4, &xval); j = 0; sum = 0.; for (i = 0; i < nx; ++i) { if (y[i] >= yval[j]) { d = (x[i] - xpeak) - xval[j]; sum += d*d; ++j; if (j >= nxval) return sum; if (x[i] > xpeak) break; } } for (++i; i < nx; ++i) { if (y[i] <= yval[j]) { d = (x[i] - xpeak) - xval[j]; sum += d*d; ++j; if (j >= nxval) return sum; } } return 1e9; } static double yfitness(void* vv) { int nx, ny, nyval, nxval, i, j; double sum, d, xpeak, *y, *x, *yval, *xval; ny = vector_instance_px(vv, &y); nx = vector_arg_px(1, &x); if (nx != ny) { hoc_execerror("vectors not same size", 0); } xpeak = *getarg(2); nyval = vector_arg_px(3, &yval); nxval = vector_arg_px(4, &xval); j = 0; sum = 0.; for (i = 0; i < nx; ++i) { if (x[i] - xpeak >= xval[j]) { d = y[i] - yval[j]; sum += d*d; ++j; if (j >= nxval) return sum; } } return 1e9; } static double firstpeak(void* vv) { int ny, i; double *y; ny = vector_instance_px(vv, &y) - 1; i = 0; while (i < ny) { if (y[i] >= -20) { if (y[i] > y[i+1]) { return (double) i; } i = i + 1; } else { i = i + 2; } } return 0.; } static int install_vector_fitness ( ) { /*VERBATIM*/ {static int once; if (!once) { once = 1; install_vector_method("width", width); install_vector_method("xfitness", xfitness); install_vector_method("yfitness", yfitness); install_vector_method("firstpeak", firstpeak); }} return 0; } static void _hoc_install_vector_fitness(void) { double _r; _r = 1.; install_vector_fitness ( ); hoc_retpushx(_r); } static void initmodel() { int _i; double _save;_ninits++; { } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(); }} static double _nrn_current(double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { }} } static void terminal(){} static void _initlists() { int _i; static int _first = 1; if (!_first) return; _first = 0; } neuron-7.5/src/nrnoc/feature.mod000077500000000000000000000050401323325274500167450ustar00rootroot00000000000000: width = yvec.width(xvec, yval) sensitive to noise in yvec NEURON { SUFFIX nothing } VERBATIM #include "hocdec.h" static double width(void* vv) { int i, nx, ny, i1, i2; double *x, *y; double h; h = *getarg(2); ny = vector_instance_px(vv, &y); nx = vector_arg_px(1, &x); if (nx != ny) return 0.; for (i1 = 0; i1 < nx; ++i1) { if (y[i1] >= h) { break;} } for (i2 = i1+1; i2 < nx; ++i2) { if (y[i2] <= h) { break; } } return x[i2] - x[i1]; } /* xval, yval must be sorted in increasing order for xval */ /* xval is relative to the peak of the data */ /* xpeak is the peak location of the simulation */ /* xfitness is a measure of match in the x-dimension relative to peak location for particular values of y */ /* yfitness is a measure of match in the y-dimension relative to peak location for particular values of relative x */ static double xfitness(void* vv) { int nx, ny, nyval, nxval, i, j; double sum, d, xpeak, *y, *x, *yval, *xval; ny = vector_instance_px(vv, &y); nx = vector_arg_px(1, &x); if (nx != ny) { hoc_execerror("vectors not same size", 0); } xpeak = *getarg(2); nyval = vector_arg_px(3, &yval); nxval = vector_arg_px(4, &xval); j = 0; sum = 0.; for (i = 0; i < nx; ++i) { if (y[i] >= yval[j]) { d = (x[i] - xpeak) - xval[j]; sum += d*d; ++j; if (j >= nxval) return sum; if (x[i] > xpeak) break; } } for (++i; i < nx; ++i) { if (y[i] <= yval[j]) { d = (x[i] - xpeak) - xval[j]; sum += d*d; ++j; if (j >= nxval) return sum; } } return 1e9; } static double yfitness(void* vv) { int nx, ny, nyval, nxval, i, j; double sum, d, xpeak, *y, *x, *yval, *xval; ny = vector_instance_px(vv, &y); nx = vector_arg_px(1, &x); if (nx != ny) { hoc_execerror("vectors not same size", 0); } xpeak = *getarg(2); nyval = vector_arg_px(3, &yval); nxval = vector_arg_px(4, &xval); j = 0; sum = 0.; for (i = 0; i < nx; ++i) { if (x[i] - xpeak >= xval[j]) { d = y[i] - yval[j]; sum += d*d; ++j; if (j >= nxval) return sum; } } return 1e9; } static double firstpeak(void* vv) { int ny, i; double *y; ny = vector_instance_px(vv, &y) - 1; i = 0; while (i < ny) { if (y[i] >= -20) { if (y[i] > y[i+1]) { return (double) i; } i = i + 1; } else { i = i + 2; } } return 0.; } ENDVERBATIM PROCEDURE install_vector_fitness() { VERBATIM {static int once; if (!once) { once = 1; install_vector_method("width", width); install_vector_method("xfitness", xfitness); install_vector_method("yfitness", yfitness); install_vector_method("firstpeak", firstpeak); }} ENDVERBATIM } neuron-7.5/src/nrnoc/fstim.c000066400000000000000000000072611323325274500161030ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/fstim.c,v 1.2 1997/08/15 13:04:11 hines Exp */ /* copy of synapse.c modified to simulate current stimulus pulses */ /* 4/9/2002 modified to conform to new treeset.c */ /* fstim(maxnum) allocates space for maxnum synapses. Space for previously existing synapses is released. All synapses initialized to 0 maximum conductance. fstim(i, loc, delay, duration, stim) The ith current stimulus is injected at parameter `loc' different current stimuli do not concatenate but can ride on top of each other. delay refers to onset of stimulus relative to t=0 delay and duration are in msec. stim in namps. fstimi(i) returns stimulus current for ith stimulus at the value of the global time t. */ #include #include "neuron.h" #include "section.h" #include "nrniv_mf.h" typedef struct Stimulus { double loc; /* parameter location (0--1) */ double delay; /* value of t in msec for onset */ double duration;/* turns off at t = delay + duration */ double mag; /* magnitude in namps */ double mag_seg; /* value added to rhs, depends on area of seg*/ Node *pnd; /* segment location */ Section* sec; } Stimulus; static int maxstim = 0; /* size of stimulus array */ static Stimulus *pstim; /* pointer to stimulus array */ static void free_stim(void); static void stim_record(int); #define nt_t nrn_threads->_t void print_stim() { int i; if (maxstim == 0) return; /*SUPPRESS 440*/ Printf("fstim(%d)\n/* section fstim( #, loc, delay(ms), duration(ms), magnitude(namp)) */\n", maxstim); for (i=0; i 1) { hoc_execerror("fstim does not allow threads", ""); } i = chkarg(1, 0., 10000.); if (ifarg(2)) { if (i >= maxstim) { hoc_execerror("index out of range", (char *)0); } pstim[i].loc = chkarg(2, 0., 1.); pstim[i].delay = chkarg(3, 0., 1e21); pstim[i].duration = chkarg(4, 0., 1e21); pstim[i].mag = *getarg(5); pstim[i].sec = chk_access(); section_ref(pstim[i].sec); stim_record(i); } else { free_stim(); maxstim = i; if (maxstim) { pstim = (Stimulus *)emalloc((unsigned)(maxstim * sizeof(Stimulus))); } for (i = 0; iprop) { pstim[i].pnd = node_ptr(sec, pstim[i].loc, &area); pstim[i].mag_seg = 1.e2*pstim[i].mag / area; }else{ section_unref(sec); pstim[i].sec = 0; } } } void stim_prepare(void) { int i; for (i=0; i pstim[i].delay + pstim[i].duration - 1e-9) { return 0.0; } return pstim[i].mag_seg; } void activstim_rhs(void) { int i; for (i=0; i #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__hh #define _nrn_initial _nrn_initial__hh #define nrn_cur _nrn_cur__hh #define _nrn_current _nrn_current__hh #define nrn_jacob _nrn_jacob__hh #define nrn_state _nrn_state__hh #define _net_receive _net_receive__hh #define _f_rates _f_rates__hh #define rates rates__hh #define states states__hh #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define gnabar _p[0] #define gkbar _p[1] #define gl _p[2] #define el _p[3] #define gna _p[4] #define gk _p[5] #define il _p[6] #define m _p[7] #define h _p[8] #define n _p[9] #define Dm _p[10] #define Dh _p[11] #define Dn _p[12] #define ena _p[13] #define ek _p[14] #define ina _p[15] #define ik _p[16] #define v _p[17] #define _g _p[18] #define _ion_ena *_ppvar[0]._pval #define _ion_ina *_ppvar[1]._pval #define _ion_dinadv *_ppvar[2]._pval #define _ion_ek *_ppvar[3]._pval #define _ion_ik *_ppvar[4]._pval #define _ion_dikdv *_ppvar[5]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ extern double celsius; /* declaration of user functions */ static void _hoc_rates(void); static void _hoc_vtrap(void); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata() { Prop *_prop, *hoc_getdata_range(int); _prop = hoc_getdata_range(_mechtype); _setdata(_prop); hoc_retpushx(1.); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { "setdata_hh", _hoc_setdata, "rates_hh", _hoc_rates, "vtrap_hh", _hoc_vtrap, 0, 0 }; #define vtrap vtrap_hh extern double vtrap( _threadargsprotocomma_ double , double ); static void _check_rates(double*, Datum*, Datum*, _NrnThread*); static void _check_table_thread(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, int _type) { _check_rates(_p, _ppvar, _thread, _nt); } /* declare global and static user variables */ static int _thread1data_inuse = 0; static double _thread1data[6]; #define _gth 0 #define htau_hh _thread1data[0] #define htau _thread[_gth]._pval[0] #define hinf_hh _thread1data[1] #define hinf _thread[_gth]._pval[1] #define mtau_hh _thread1data[2] #define mtau _thread[_gth]._pval[2] #define minf_hh _thread1data[3] #define minf _thread[_gth]._pval[3] #define ntau_hh _thread1data[4] #define ntau _thread[_gth]._pval[4] #define ninf_hh _thread1data[5] #define ninf _thread[_gth]._pval[5] #define usetable usetable_hh double usetable = 1; /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "gl_hh", 0, 1e+09, "gkbar_hh", 0, 1e+09, "gnabar_hh", 0, 1e+09, "usetable_hh", 0, 1, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "mtau_hh", "ms", "htau_hh", "ms", "ntau_hh", "ms", "gnabar_hh", "S/cm2", "gkbar_hh", "S/cm2", "gl_hh", "S/cm2", "el_hh", "mV", "gna_hh", "S/cm2", "gk_hh", "S/cm2", "il_hh", "mA/cm2", 0,0 }; static double delta_t = 0.01; static double h0 = 0; static double m0 = 0; static double n0 = 0; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { "minf_hh", &minf_hh, "hinf_hh", &hinf_hh, "ninf_hh", &ninf_hh, "mtau_hh", &mtau_hh, "htau_hh", &htau_hh, "ntau_hh", &ntau_hh, "usetable_hh", &usetable_hh, 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static int _ode_count(int); static void _ode_map(int, double**, double**, double*, Datum*, double*, int); static void _ode_spec(_NrnThread*, _Memb_list*, int); static void _ode_matsol(_NrnThread*, _Memb_list*, int); #define _cvode_ieq _ppvar[6]._i static void _ode_matsol_instance1(_threadargsproto_); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "hh", "gnabar_hh", "gkbar_hh", "gl_hh", "el_hh", 0, "gna_hh", "gk_hh", "il_hh", 0, "m_hh", "h_hh", "n_hh", 0, 0}; static Symbol* _na_sym; static Symbol* _k_sym; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; _p = nrn_prop_data_alloc(_mechtype, 19, _prop); /*initialize range parameters*/ gnabar = 0.12; gkbar = 0.036; gl = 0.0003; el = -54.3; _prop->param = _p; _prop->param_size = 19; _ppvar = nrn_prop_datum_alloc(_mechtype, 7, _prop); _prop->dparam = _ppvar; /*connect ionic variables to this model*/ prop_ion = need_memb(_na_sym); nrn_promote(prop_ion, 0, 1); _ppvar[0]._pval = &prop_ion->param[0]; /* ena */ _ppvar[1]._pval = &prop_ion->param[3]; /* ina */ _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dinadv */ prop_ion = need_memb(_k_sym); nrn_promote(prop_ion, 0, 1); _ppvar[3]._pval = &prop_ion->param[0]; /* ek */ _ppvar[4]._pval = &prop_ion->param[3]; /* ik */ _ppvar[5]._pval = &prop_ion->param[4]; /* _ion_dikdv */ } static void _initlists(); /* some states have an absolute tolerance */ static Symbol** _atollist; static HocStateTolerance _hoc_state_tol[] = { 0,0 }; static void _thread_mem_init(Datum*); static void _thread_cleanup(Datum*); static void _update_ion_pointer(Datum*); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _hh_reg_() { int _vectorized = 1; _initlists(); ion_reg("na", -10000.); ion_reg("k", -10000.); _na_sym = hoc_lookup("na_ion"); _k_sym = hoc_lookup("k_ion"); register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 2); _extcall_thread = (Datum*)ecalloc(1, sizeof(Datum)); _thread_mem_init(_extcall_thread); _thread1data_inuse = 0; _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); _nrn_thread_reg(_mechtype, 1, _thread_mem_init); _nrn_thread_reg(_mechtype, 0, _thread_cleanup); _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); _nrn_thread_table_reg(_mechtype, _check_table_thread); hoc_register_prop_size(_mechtype, 19, 7); hoc_register_dparam_semantics(_mechtype, 0, "na_ion"); hoc_register_dparam_semantics(_mechtype, 1, "na_ion"); hoc_register_dparam_semantics(_mechtype, 2, "na_ion"); hoc_register_dparam_semantics(_mechtype, 3, "k_ion"); hoc_register_dparam_semantics(_mechtype, 4, "k_ion"); hoc_register_dparam_semantics(_mechtype, 5, "k_ion"); hoc_register_dparam_semantics(_mechtype, 6, "cvodeieq"); hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 hh /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/hh.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static double *_t_minf; static double *_t_mtau; static double *_t_hinf; static double *_t_htau; static double *_t_ninf; static double *_t_ntau; static int _reset; static char *modelname = "hh.mod squid sodium, potassium, and leak channels"; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int _f_rates(_threadargsprotocomma_ double); static int rates(_threadargsprotocomma_ double); static int _ode_spec1(_threadargsproto_); /*static int _ode_matsol1(_threadargsproto_);*/ static void _n_rates(_threadargsprotocomma_ double _lv); static int _slist1[3], _dlist1[3]; static int states(_threadargsproto_); /*CVODE*/ static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) {int _reset = 0; { rates ( _threadargscomma_ v ) ; Dm = ( minf - m ) / mtau ; Dh = ( hinf - h ) / htau ; Dn = ( ninf - n ) / ntau ; } return _reset; } static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { rates ( _threadargscomma_ v ) ; Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mtau )) ; Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / htau )) ; Dn = Dn / (1. - dt*( ( ( ( - 1.0 ) ) ) / ntau )) ; return 0; } /*END CVODE*/ static int states (double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { { rates ( _threadargscomma_ v ) ; m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mtau)))*(- ( ( ( minf ) ) / mtau ) / ( ( ( ( - 1.0 ) ) ) / mtau ) - m) ; h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / htau)))*(- ( ( ( hinf ) ) / htau ) / ( ( ( ( - 1.0 ) ) ) / htau ) - h) ; n = n + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / ntau)))*(- ( ( ( ninf ) ) / ntau ) / ( ( ( ( - 1.0 ) ) ) / ntau ) - n) ; } return 0; } static double _mfac_rates, _tmin_rates; static void _check_rates(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { static int _maktable=1; int _i, _j, _ix = 0; double _xi, _tmax; static double _sav_celsius; if (!usetable) {return;} if (_sav_celsius != celsius) { _maktable = 1;} if (_maktable) { double _x, _dx; _maktable=0; _tmin_rates = - 100.0 ; _tmax = 100.0 ; _dx = (_tmax - _tmin_rates)/200.; _mfac_rates = 1./_dx; for (_i=0, _x=_tmin_rates; _i < 201; _x += _dx, _i++) { _f_rates(_p, _ppvar, _thread, _nt, _x); _t_minf[_i] = minf; _t_mtau[_i] = mtau; _t_hinf[_i] = hinf; _t_htau[_i] = htau; _t_ninf[_i] = ninf; _t_ntau[_i] = ntau; } _sav_celsius = celsius; } } static int rates(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _lv) { #if 0 _check_rates(_p, _ppvar, _thread, _nt); #endif _n_rates(_p, _ppvar, _thread, _nt, _lv); return 0; } static void _n_rates(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _lv){ int _i, _j; double _xi, _theta; if (!usetable) { _f_rates(_p, _ppvar, _thread, _nt, _lv); return; } _xi = _mfac_rates * (_lv - _tmin_rates); if (isnan(_xi)) { minf = _xi; mtau = _xi; hinf = _xi; htau = _xi; ninf = _xi; ntau = _xi; return; } if (_xi <= 0.) { minf = _t_minf[0]; mtau = _t_mtau[0]; hinf = _t_hinf[0]; htau = _t_htau[0]; ninf = _t_ninf[0]; ntau = _t_ntau[0]; return; } if (_xi >= 200.) { minf = _t_minf[200]; mtau = _t_mtau[200]; hinf = _t_hinf[200]; htau = _t_htau[200]; ninf = _t_ninf[200]; ntau = _t_ntau[200]; return; } _i = (int) _xi; _theta = _xi - (double)_i; minf = _t_minf[_i] + _theta*(_t_minf[_i+1] - _t_minf[_i]); mtau = _t_mtau[_i] + _theta*(_t_mtau[_i+1] - _t_mtau[_i]); hinf = _t_hinf[_i] + _theta*(_t_hinf[_i+1] - _t_hinf[_i]); htau = _t_htau[_i] + _theta*(_t_htau[_i+1] - _t_htau[_i]); ninf = _t_ninf[_i] + _theta*(_t_ninf[_i+1] - _t_ninf[_i]); ntau = _t_ntau[_i] + _theta*(_t_ntau[_i+1] - _t_ntau[_i]); } static int _f_rates ( _threadargsprotocomma_ double _lv ) { double _lalpha , _lbeta , _lsum , _lq10 ; _lq10 = pow( 3.0 , ( ( celsius - 6.3 ) / 10.0 ) ) ; _lalpha = .1 * vtrap ( _threadargscomma_ - ( _lv + 40.0 ) , 10.0 ) ; _lbeta = 4.0 * exp ( - ( _lv + 65.0 ) / 18.0 ) ; _lsum = _lalpha + _lbeta ; mtau = 1.0 / ( _lq10 * _lsum ) ; minf = _lalpha / _lsum ; _lalpha = .07 * exp ( - ( _lv + 65.0 ) / 20.0 ) ; _lbeta = 1.0 / ( exp ( - ( _lv + 35.0 ) / 10.0 ) + 1.0 ) ; _lsum = _lalpha + _lbeta ; htau = 1.0 / ( _lq10 * _lsum ) ; hinf = _lalpha / _lsum ; _lalpha = .01 * vtrap ( _threadargscomma_ - ( _lv + 55.0 ) , 10.0 ) ; _lbeta = .125 * exp ( - ( _lv + 65.0 ) / 80.0 ) ; _lsum = _lalpha + _lbeta ; ntau = 1.0 / ( _lq10 * _lsum ) ; ninf = _lalpha / _lsum ; return 0; } static void _hoc_rates(void) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } _thread = _extcall_thread; _nt = nrn_threads; #if 1 _check_rates(_p, _ppvar, _thread, _nt); #endif _r = 1.; rates ( _p, _ppvar, _thread, _nt, *getarg(1) ); hoc_retpushx(_r); } double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { double _lvtrap; if ( fabs ( _lx / _ly ) < 1e-6 ) { _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; } else { _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; } return _lvtrap; } static void _hoc_vtrap(void) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } _thread = _extcall_thread; _nt = nrn_threads; _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); hoc_retpushx(_r); } static int _ode_count(int _type){ return 3;} static void _ode_spec(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node* _nd; double _v; int _iml, _cntml; _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v = NODEV(_nd); ena = _ion_ena; ek = _ion_ek; _ode_spec1 (_p, _ppvar, _thread, _nt); }} static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { double* _p; Datum* _ppvar; int _i; _p = _pp; _ppvar = _ppd; _cvode_ieq = _ieq; for (_i=0; _i < 3; ++_i) { _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; _cvode_abstol(_atollist, _atol, _i); } } static void _ode_matsol_instance1(_threadargsproto_) { _ode_matsol1 (_p, _ppvar, _thread, _nt); } static void _ode_matsol(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node* _nd; double _v; int _iml, _cntml; _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v = NODEV(_nd); ena = _ion_ena; ek = _ion_ek; _ode_matsol_instance1(_threadargs_); }} static void _thread_mem_init(Datum* _thread) { if (_thread1data_inuse) {_thread[_gth]._pval = (double*)ecalloc(6, sizeof(double)); }else{ _thread[_gth]._pval = _thread1data; _thread1data_inuse = 1; } } static void _thread_cleanup(Datum* _thread) { if (_thread[_gth]._pval == _thread1data) { _thread1data_inuse = 0; }else{ free((void*)_thread[_gth]._pval); } } extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); static void _update_ion_pointer(Datum* _ppvar) { nrn_update_ion_pointer(_na_sym, _ppvar, 0, 0); nrn_update_ion_pointer(_na_sym, _ppvar, 1, 3); nrn_update_ion_pointer(_na_sym, _ppvar, 2, 4); nrn_update_ion_pointer(_k_sym, _ppvar, 3, 0); nrn_update_ion_pointer(_k_sym, _ppvar, 4, 3); nrn_update_ion_pointer(_k_sym, _ppvar, 5, 4); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ h = h0; m = m0; n = n0; { rates ( _threadargscomma_ v ) ; m = minf ; h = hinf ; n = ninf ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if 0 _check_rates(_p, _ppvar, _thread, _nt); #endif #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; ena = _ion_ena; ek = _ion_ek; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { gna = gnabar * m * m * m * h ; ina = gna * ( v - ena ) ; gk = gkbar * n * n * n * n ; ik = gk * ( v - ek ) ; il = gl * ( v - el ) ; } _current += ina; _current += ik; _current += il; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } ena = _ion_ena; ek = _ion_ek; _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { double _dik; double _dina; _dina = ina; _dik = ik; _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); _ion_dinadv += (_dina - ina)/.001 ; _ion_dikdv += (_dik - ik)/.001 ; } _g = (_g - _rhs)/.001; _ion_ina += ina ; _ion_ik += ik ; #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) -= _rhs; }else #endif { NODERHS(_nd) -= _rhs; } } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) += _g; }else #endif { _nd = _ml->_nodelist[_iml]; NODED(_nd) += _g; } } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { ena = _ion_ena; ek = _ion_ek; { states(_p, _ppvar, _thread, _nt); } }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _slist1[0] = &(m) - _p; _dlist1[0] = &(Dm) - _p; _slist1[1] = &(h) - _p; _dlist1[1] = &(Dh) - _p; _slist1[2] = &(n) - _p; _dlist1[2] = &(Dn) - _p; _t_minf = makevector(201*sizeof(double)); _t_mtau = makevector(201*sizeof(double)); _t_hinf = makevector(201*sizeof(double)); _t_htau = makevector(201*sizeof(double)); _t_ninf = makevector(201*sizeof(double)); _t_ntau = makevector(201*sizeof(double)); _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/hh.mod000077500000000000000000000056541323325274500157240ustar00rootroot00000000000000TITLE hh.mod squid sodium, potassium, and leak channels COMMENT This is the original Hodgkin-Huxley treatment for the set of sodium, potassium, and leakage channels found in the squid giant axon membrane. ("A quantitative description of membrane current and its application conduction and excitation in nerve" J.Physiol. (Lond.) 117:500-544 (1952).) Membrane voltage is in absolute mV and has been reversed in polarity from the original HH convention and shifted to reflect a resting potential of -65 mV. Remember to set celsius=6.3 (or whatever) in your HOC file. See squid.hoc for an example of a simulation using this model. SW Jaslove 6 March, 1992 ENDCOMMENT UNITS { (mA) = (milliamp) (mV) = (millivolt) (S) = (siemens) } ? interface NEURON { SUFFIX hh USEION na READ ena WRITE ina USEION k READ ek WRITE ik NONSPECIFIC_CURRENT il RANGE gnabar, gkbar, gl, el, gna, gk GLOBAL minf, hinf, ninf, mtau, htau, ntau THREADSAFE : assigned GLOBALs will be per thread } PARAMETER { gnabar = .12 (S/cm2) <0,1e9> gkbar = .036 (S/cm2) <0,1e9> gl = .0003 (S/cm2) <0,1e9> el = -54.3 (mV) } STATE { m h n } ASSIGNED { v (mV) celsius (degC) ena (mV) ek (mV) gna (S/cm2) gk (S/cm2) ina (mA/cm2) ik (mA/cm2) il (mA/cm2) minf hinf ninf mtau (ms) htau (ms) ntau (ms) } ? currents BREAKPOINT { SOLVE states METHOD cnexp gna = gnabar*m*m*m*h ina = gna*(v - ena) gk = gkbar*n*n*n*n ik = gk*(v - ek) il = gl*(v - el) } INITIAL { rates(v) m = minf h = hinf n = ninf } ? states DERIVATIVE states { rates(v) m' = (minf-m)/mtau h' = (hinf-h)/htau n' = (ninf-n)/ntau } :LOCAL q10 ? rates PROCEDURE rates(v(mV)) { :Computes rate and other constants at current v. :Call once from HOC to initialize inf at resting v. LOCAL alpha, beta, sum, q10 TABLE minf, mtau, hinf, htau, ninf, ntau DEPEND celsius FROM -100 TO 100 WITH 200 UNITSOFF q10 = 3^((celsius - 6.3)/10) :"m" sodium activation system alpha = .1 * vtrap(-(v+40),10) beta = 4 * exp(-(v+65)/18) sum = alpha + beta mtau = 1/(q10*sum) minf = alpha/sum :"h" sodium inactivation system alpha = .07 * exp(-(v+65)/20) beta = 1 / (exp(-(v+35)/10) + 1) sum = alpha + beta htau = 1/(q10*sum) hinf = alpha/sum :"n" potassium activation system alpha = .01*vtrap(-(v+55),10) beta = .125*exp(-(v+65)/80) sum = alpha + beta ntau = 1/(q10*sum) ninf = alpha/sum } FUNCTION vtrap(x,y) { :Traps for 0 in denominator of rate eqns. if (fabs(x/y) < 1e-6) { vtrap = y*(1 - x/y/2) }else{ vtrap = x/(exp(x/y) - 1) } } UNITSON neuron-7.5/src/nrnoc/hoc_init.c000077500000000000000000000002651323325274500165550ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../oc/hoc_init.c" neuron-7.5/src/nrnoc/hoc_oop.c000077500000000000000000000002641323325274500164060ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../oc/hoc_oop.c" neuron-7.5/src/nrnoc/hocprax.c000066400000000000000000000157211323325274500164250ustar00rootroot00000000000000#include <../../nrnconf.h> /* Hoc interface to praxis. See praxis.c in the scopmath library about tolerance (t0), maxstepsize (h0), and printmode (prin). These are set with attr_praxis(t0, h0, prin) Minimise an interpreted hoc function or compiled hoc function with double x[n] fit_praxis(n, "funname", &x[0], "afterquad statement") where n is the number of variables on which funname depends and x is a vector containing on entry a guess of the point of minimum and on exit contains the estimated point of minimum. (The third arg may be a Vector) Funname will be called with 2 args to be retrieved by $1 and $&2[i]. afterquad statement (if the arg exists , will be executed at the end of each main loop iteration (complete conjugate gradient search followed by calculation of quadratic form) eg. double x[2] attr_praxis(1e-5, 1, -1) func f() { return $&0[0]^2 + 2*$&0[1]^4 } fit_praxis(2, "f", &x) After fit_praxis exits, (or on execution of afterquad stmt) one can retrieve the i'th principal value with pval_praxis(i). If you also want the i'th principal axis then use double a[n] pval = pval_praxis(i, &a) also can use pval = pval_praxis(i, Vector) */ #include #include "hocdec.h" #include "parse.h" extern int stoprun; extern double praxis(), praxis_pval(), *praxis_paxis(), chkarg(); extern int praxis_stop(int); extern void vector_resize(void*, int); extern double* vector_vec(void*); extern void* vector_arg(int); extern void* vector_new2(void* vec); extern void vector_delete(void* vec); extern int vector_capacity(void*); extern Object** vector_pobj(void* v); extern int nrn_praxis_ran_index; extern Object** hoc_objgetarg(int); static double efun(double*, int); static Symbol* hoc_efun_sym; static double tolerance, machep, maxstepsize; static long int printmode; /* for prax_pval to know the proper size, following has to be the value at return of previous prax call */ static long int nvar; double (*nrnpy_praxis_efun)(Object* pycallable, Object* hvec); static Object* efun_py; static Object* efun_py_arg; static void* vec_py_save; void stop_praxis(void) { int i = 1; if (ifarg(1)) { i = (int)chkarg(1, 0., 1e5); } i = praxis_stop(i); hoc_retpushx((double)i); } /* want to get best result if user does a stoprun */ static double minerr, *minarg; /* too bad this is not recursive */ void fit_praxis(void) { extern Symbol* hoc_lookup(); extern char* gargstr(); char* after_quad; int i; double err, fmin; double* px; /* allow nested calls to fit_praxis. I.e. store all the needed statics specific to this invocation with proper reference counting and then unref/destoy on exit from this invocation. Before the prax call save the statics from earlier invocation without increasing the ref count and on exit restore without decreasing the ref count. */ /* save before setting statics, restore after prax */ double minerrsav, *minargsav, maxstepsizesav, tolerancesav; long int printmodesav, nvarsav; Symbol* efun_sym_sav; Object* efun_py_save, *efun_py_arg_save; void* vec_py_save_save; /* store statics specified by this invocation */ /* will be copied just before calling prax */ double minerr_, *minarg_; long int nvar_; Symbol* efun_sym_; Object* efun_py_, *efun_py_arg_; void* vec_py_save_; minerr_ = 0.0; nvar_ = 0; minarg_ = NULL; efun_sym_ = NULL; efun_py_ = NULL; efun_py_arg_ = NULL; vec_py_save_ = NULL; fmin = 0.; if (hoc_is_object_arg(1)) { assert(nrnpy_praxis_efun); efun_py_ = *hoc_objgetarg(1); hoc_obj_ref(efun_py_); efun_py_arg_ = *vector_pobj(vector_arg(2)); hoc_obj_ref(efun_py_arg_); vec_py_save_ = vector_new2(efun_py_arg_->u.this_pointer); nvar_ = vector_capacity(vec_py_save_); px = vector_vec(vec_py_save_); }else{ nvar_ = (int)chkarg(1, 0., 1e6); efun_sym_ = hoc_lookup(gargstr(2)); if (!efun_sym_ || (efun_sym_->type != FUNCTION && efun_sym_->type != FUN_BLTIN)) { hoc_execerror(gargstr(2), "not a function name"); } if (!hoc_is_pdouble_arg(3)) { void* vec = vector_arg(3); if (vector_capacity(vec) != nvar_) { hoc_execerror("first arg not equal to size of Vector",0); } px = vector_vec(vec); }else{ px = hoc_pgetarg(3); } } minarg_ = (double*)ecalloc(nvar_, sizeof(double)); if (maxstepsize == 0.) { hoc_execerror("call attr_praxis first to set attributes", 0); } machep = 1e-15; if (ifarg(4)) { after_quad = gargstr(4); }else{ after_quad = (char*)0; } /* save the values set by earlier invocation */ minerrsav = minerr; minargsav = minarg; tolerancesav = tolerance; maxstepsizesav = maxstepsize; printmodesav = printmode; nvarsav = nvar; efun_sym_sav = hoc_efun_sym; efun_py_save = efun_py; efun_py_arg_save = efun_py_arg; vec_py_save_save = vec_py_save; /* copy this invocation values to the statics */ minerr = minerr_; minarg = minarg_; nvar = nvar_; hoc_efun_sym = efun_sym_; efun_py = efun_py_; efun_py_arg = efun_py_arg_; vec_py_save = vec_py_save_; minerr=1e9; err = praxis(&tolerance, &machep, &maxstepsize, nvar, &printmode, px, efun, &fmin, after_quad); err = minerr; if (minerr < 1e9) { for (i=0; iu.this_pointer); for (i=0; i < nvar_; ++i) { px[i] = minarg_[i]; } hoc_obj_unref(efun_py_); hoc_obj_unref(efun_py_arg_); vector_delete(vec_py_save_); } if (minarg_) { free(minarg_); } hoc_retpushx(err); } void hoc_after_prax_quad(s) char* s; { hoc_obj_run(s, hoc_thisobject); } void attr_praxis(void) { if (ifarg(2)) { tolerance = *getarg(1); maxstepsize = *getarg(2); printmode = (int)chkarg(3, 0., 3.); hoc_retpushx(0.); }else{ int old = nrn_praxis_ran_index; if (ifarg(1)) { nrn_praxis_ran_index = (int)chkarg(1, 0., 1e9); } hoc_retpushx((double)old); } } void pval_praxis(void) { int i; i = (int)chkarg(1, 0., (double)(nvar-1)); if (ifarg(2)) { int j; double *p1, *p2; p1 = praxis_paxis(i); if (!hoc_is_pdouble_arg(2)) { void* vec = vector_arg(2); vector_resize(vec, nvar); p2 = vector_vec(vec); }else{ p2 = hoc_pgetarg(2); } for (j = 0; j < nvar; ++j) { p2[j] = p1[j]; } } hoc_retpushx(praxis_pval(i)); } static double efun(double* v, int n) { int i; double err; if (efun_py) { double* px = vector_vec(efun_py_arg->u.this_pointer); for (i=0; i < n; ++i) { px[i] = v[i]; } err = nrnpy_praxis_efun(efun_py, efun_py_arg); for (i=0; i < n; ++i) { v[i] = px[i]; } }else{ extern double hoc_call_func(); int i; hoc_pushx((double)n); hoc_pushpx(v); err = hoc_call_func(hoc_efun_sym, 2); } if (!stoprun && err < minerr) { minerr = err; for (i=0; i < n; ++i) { minarg[i] = v[i]; } } return err; } neuron-7.5/src/nrnoc/hocusr.c000077500000000000000000000002631323325274500162620ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../oc/hocusr.c" neuron-7.5/src/nrnoc/hocusr.h000066400000000000000000000104621323325274500162660ustar00rootroot00000000000000extern void node_data(), disconnect(); extern void batch_run(), batch_save(); extern void pt3dclear(), pt3dadd(), n3d(), x3d(), y3d(), z3d(), arc3d(), diam3d(); extern void pt3dinsert(), pt3dremove(), pt3dchange(); extern void define_shape(), pt3dconst(), pt3dstyle(); extern void spine3d(), setSpineArea(), getSpineArea(); extern void area(), ri(); extern void initnrn(), nrnhoc_topology(), fadvance(), distance(), finitialize(); extern void fstim(), fstimi(); extern void ion_style(), ion_register(), ion_charge(), nernst(), ghk(); extern void section_owner(); extern void make_mechanism(), make_pointprocess(); extern void nrnpython(); extern void fsyn(), fsyng(), fsyni(); extern void fclamp(), fclampi(), fclampv(), prstim(); extern void fcurrent(), fmatrix(), frecord_init(); extern void issection(), ismembrane(), sectionname(), psection(); extern void pop_section(), push_section(), section_exists(); extern void delete_section(); extern int secondorder, diam_changed, nrn_shape_changed_, nrn_netrec_state_adjust; extern double clamp_resist; extern double celsius; extern int stoprun; extern void fit_praxis(), attr_praxis(), pval_praxis(), stop_praxis(); extern void keep_nseg_parm(); extern void nrnallsectionmenu(), nrnallpointmenu(), nrnsecmenu(); extern void nrnglobalmechmenu(), nrnmechmenu(), nrnpointmenu(); extern void this_section(), this_node(), parent_section(), parent_node(); extern void parent_connection(), section_orientation(); /* Functions */ static VoidFunc function[] = { "node_data", node_data, "disconnect", disconnect, "batch_run", batch_run, "batch_save", batch_save, "pt3dclear", pt3dclear, "pt3dadd", pt3dadd, "n3d", n3d, "x3d", x3d, "y3d", y3d, "z3d", z3d, "arc3d", arc3d, "diam3d", diam3d, "pt3dinsert", pt3dinsert, "pt3dremove", pt3dremove, "pt3dchange", pt3dchange, "define_shape", define_shape, "pt3dconst", pt3dconst, "pt3dstyle", pt3dstyle, "spine3d", spine3d, "setSpineArea", setSpineArea, "getSpineArea", getSpineArea, "area", area, "ri", ri, "initnrn", initnrn, "topology", nrnhoc_topology, "fadvance", fadvance, "distance", distance, "finitialize", finitialize, "fstim", fstim, "fstimi", fstimi, "ion_style", ion_style, "ion_register", ion_register, "ion_charge", ion_charge, "nernst", nernst, "ghk", ghk, "section_owner", section_owner, "make_mechanism", make_mechanism, "make_pointprocess", make_pointprocess, "nrnpython", nrnpython, "fsyn", fsyn, "fsyng", fsyng, "fsyni", fsyni, "fclamp", fclamp, "fclampi", fclampi, "fclampv", fclampv, "prstim", prstim, "fcurrent", fcurrent, "fmatrix", fmatrix, "frecord_init", frecord_init, "issection", issection, "ismembrane", ismembrane, "sectionname", sectionname, "psection", psection, "pop_section", pop_section, "push_section", push_section, "section_exists", section_exists, "delete_section", delete_section, "fit_praxis", fit_praxis, "attr_praxis", attr_praxis, "pval_praxis", pval_praxis, "stop_praxis", stop_praxis, "keep_nseg_parm", keep_nseg_parm, "nrnallsectionmenu", nrnallsectionmenu, "nrnallpointmenu", nrnallpointmenu, "nrnsecmenu", nrnsecmenu, "nrnglobalmechmenu", nrnglobalmechmenu, "nrnmechmenu", nrnmechmenu, "nrnpointmenu", nrnpointmenu, "this_section", this_section, "this_node", this_node, "parent_section", parent_section, "parent_node", parent_node, "parent_connection", parent_connection, "section_orientation", section_orientation, 0, 0 }; static struct { /* Integer Scalars */ const char *name; int *pint; } scint[] = { "secondorder", &secondorder, "diam_changed", &diam_changed, "nrn_shape_changed_", &nrn_shape_changed_, "nrn_netrec_state_adjust", &nrn_netrec_state_adjust, "stoprun", &stoprun, 0, 0 }; static struct { /* Vector integers */ const char *name; int *pint; int index1; } vint[] = { 0,0 }; static struct { /* Float Scalars */ const char *name; float *pfloat; } scfloat[] = { 0, 0 }; static struct { /* Vector float */ const char *name; float *pfloat; int index1; } vfloat[] = { 0,0,0 }; /* Double Scalars */ DoubScal scdoub[] = { "clamp_resist", &clamp_resist, "celsius", &celsius, 0,0 }; /* Vectors */ DoubVec vdoub[] = { 0, 0, 0 }; static struct { /* Arrays */ const char *name; double *pdoub; int index1; int index2; } ardoub[] = { 0, 0, 0, 0 }; static struct { /* triple dimensioned arrays */ const char *name; double *pdoub; int index1; int index2; int index3; } thredim[] = { 0, 0, 0, 0, 0 }; neuron-7.5/src/nrnoc/init.c000066400000000000000000000646021323325274500157260ustar00rootroot00000000000000#include <../../nrnconf.h> #include extern char* nrn_version(); /* change this to correspond to the ../nmodl/nocpout nmodl_version_ string*/ static char nmodl_version_[] = "6.2.0"; static char banner[] = "Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016\n\ See http://neuron.yale.edu/neuron/credits\n"; # include #include #include #include "section.h" #include "parse.h" #include "nrniv_mf.h" #include "cabvars.h" #include "neuron.h" #include "membdef.h" #include "nrnmpi.h" #ifdef WIN32 #if defined(HAVE_DLFCN_H) && !defined(__MINGW32__) #include #else #define RTLD_NOW 0 extern void* dlopen(const char* name, int mode); extern void* dlsym(void* handle, char* name); extern int dlclose(void* handle); extern char* dlerror(); #endif /*#include "../mswin/windll/dll.h"*/ /*static struct DLL* dll;*/ #endif #if defined(WIN32) || defined(NRNMECH_DLL_STYLE) extern char* nrn_mech_dll; /* declared in hoc_init.c so ivocmain.cpp can see it */ #endif #if defined(WIN32) #undef DLL_DEFAULT_FNAME #define DLL_DEFAULT_FNAME "nrnmech.dll" #endif #if defined(NRNMECH_DLL_STYLE) #if defined(DARWIN) #ifndef DLL_DEFAULT_FNAME #define DLL_DEFAULT_FNAME "libnrnmech.dylib" #endif #if __GNUC__ < 4 #include "osxdlfcn.h" #include "osxdlfcn.c" #else #include #endif #else #include #ifndef DLL_DEFAULT_FNAME #define DLL_DEFAULT_FNAME "./libnrnmech.so" #endif #endif #endif # define CHECK(name) if (hoc_lookup(name) != (Symbol *)0){\ IGNORE(fprintf(stderr, CHKmes, name));\ nrn_exit(1);} static char CHKmes[] = "The user defined name, %s, already exists\n"; void (*nrnpy_reg_mech_p_)(int); int secondorder=0; int state_discon_allowed_; extern int nrn_nobanner_; double t, dt, clamp_resist, celsius, htablemin, htablemax; int nrn_netrec_state_adjust = 0; hoc_List* section_list; int nrn_global_ncell = 0; /* used to be rootnodecount */ extern double hoc_default_dll_loaded_; extern int nrn_istty_; extern int nrn_nobanner_; #if FISHER #include #include "fisher.h" double id_number; /* for rcs control, set in setup_id_info() */ char login_name[20]; /* store user's login for sys.c & rcs.c */ char *pipe_filter = "more"; /* allow for running NEURON in emacs */ #endif static HocParmLimits _hoc_parm_limits[] = { "Ra", 1e-6, 1e9, "L", 1e-4, 1e20, "diam", 1e-9, 1e9, "cm", 0., 1e9, "rallbranch", 1., 1e9, "nseg", 1., 1e9, "celsius", -273., 1e6, "dt", 1e-9, 1e15, 0, 0., 0. }; static HocParmUnits _hoc_parm_units[] = { "Ra", "ohm-cm", "L", "um", "diam", "um", "cm", "uF/cm2", "celsius", "degC", "dt", "ms", "t", "ms", "v", "mV", "i_cap", "mA/cm2", 0, 0 }; static int memb_func_size_; Memb_func* memb_func; Memb_list* memb_list; short* memb_order_; Symbol** pointsym; Point_process** point_process; char* pnt_map; /* so prop_free can know its a point mech*/ BAMech** bamech_; Template** nrn_pnt_template_; /* for finding artificial cells */ /* for synaptic events. */ pnt_receive_t* pnt_receive; pnt_receive_init_t* pnt_receive_init; short* pnt_receive_size; /* values are type numbers of mechanisms which do net_send call */ int nrn_has_net_event_cnt_; int* nrn_has_net_event_; int* nrn_prop_param_size_; int* nrn_prop_dparam_size_; int* nrn_dparam_ptr_start_; int* nrn_dparam_ptr_end_; typedef int (*bbcore_write_t)(void*, int, int*, double*, Datum*, Datum*, NrnThread*); bbcore_write_t* nrn_bbcore_write_; void hoc_reg_bbcore_write(int type, bbcore_write_t f) { nrn_bbcore_write_[type] = f; } void add_nrn_has_net_event(type) int type; { ++nrn_has_net_event_cnt_; nrn_has_net_event_ = (int*)erealloc(nrn_has_net_event_, nrn_has_net_event_cnt_*sizeof(int)); nrn_has_net_event_[nrn_has_net_event_cnt_ - 1] = type; } /* values are type numbers of mechanisms which have FOR_NETCONS statement */ int nrn_fornetcon_cnt_; /* how many models have a FOR_NETCONS statement */ int* nrn_fornetcon_type_; /* what are the type numbers */ int* nrn_fornetcon_index_; /* what is the index into the ppvar array */ void add_nrn_fornetcons(int type, int indx) { int i = nrn_fornetcon_cnt_++; nrn_fornetcon_type_ = (int*)erealloc(nrn_fornetcon_type_, (i+1)*sizeof(int)); nrn_fornetcon_index_ = (int*)erealloc(nrn_fornetcon_index_, (i+1)*sizeof(int)); nrn_fornetcon_type_[i] = type; nrn_fornetcon_index_[i]= indx; } /* array is parallel to memb_func. All are 0 except 1 for ARTIFICIAL_CELL */ short* nrn_is_artificial_; short* nrn_artcell_qindex_; void add_nrn_artcell(int type, int qi) { nrn_is_artificial_[type] = 1; nrn_artcell_qindex_[type] = qi; } int nrn_is_artificial(int pnttype) { return (int)nrn_is_artificial_[pointsym[pnttype]->subtype]; } int nrn_is_cable(void) {return 1;} #if 0 && defined(WIN32) int mswin_load_dll(char* cp1) { if (nrnmpi_myid < 1) if (!nrn_nobanner_ && nrn_istty_) { fprintf(stderr, "loading membrane mechanisms from %s\n", cp1); } dll = dll_load(cp1); if (dll) { Pfri mreg = dll_lookup(dll, "_modl_reg"); if (mreg) { (*mreg)(); } return 1; } return 0; } #endif #if defined(WIN32) || defined(NRNMECH_DLL_STYLE) int mswin_load_dll(const char* cp1) { /* actually linux dlopen */ void* handle; if (nrnmpi_myid < 1) if (!nrn_nobanner_ && nrn_istty_) { fprintf(stderr, "loading membrane mechanisms from %s\n", cp1); } handle = dlopen(cp1, RTLD_NOW); if (handle) { Pfrv mreg = (Pfrv)dlsym(handle, "modl_reg"); if (mreg) { (*mreg)(); }else{ fprintf(stderr, "dlsym _modl_reg failed\n%s\n", dlerror()); dlclose(handle); return 0; } return 1; }else{ fprintf(stderr, "dlopen failed - \n%s\n", dlerror()); } return 0; } #endif #if !MAC void hoc_nrn_load_dll(void) { #if defined(WIN32) || defined(NRNMECH_DLL_STYLE) Symlist* sav; int i; FILE* f; const char* fn; fn = expand_env_var(gargstr(1)); f = fopen(fn, "rb"); if (f) { fclose(f); sav = hoc_symlist; hoc_symlist = hoc_built_in_symlist; hoc_built_in_symlist = (Symlist*)0; i = mswin_load_dll(fn); hoc_built_in_symlist = hoc_symlist; hoc_symlist = sav; hoc_retpushx((double)i); }else{ hoc_retpushx(0.); } #else hoc_warning("nrn_load_dll not available on this machine", (char*)0); hoc_retpushx(0.); #endif } #endif extern void nrn_threads_create(int); static DoubScal scdoub[] = { "t", &t, "dt", &dt, 0,0 }; void hoc_last_init(void) { int i; Pfrv *m; Symbol *s; hoc_register_var(scdoub, (DoubVec*)0, (VoidFunc*)0); nrn_threads_create(1); if (nrnmpi_myid < 1) if (nrn_nobanner_ == 0) { Fprintf(stderr, "%s\n", nrn_version(1)); Fprintf(stderr, "%s\n", banner); IGNORE(fflush(stderr)); } memb_func_size_ = 30; memb_func = (Memb_func*)ecalloc(memb_func_size_, sizeof(Memb_func)); memb_list = (Memb_list*)ecalloc(memb_func_size_, sizeof(Memb_list)); pointsym = (Symbol**)ecalloc(memb_func_size_, sizeof(Symbol*)); point_process = (Point_process**)ecalloc(memb_func_size_, sizeof(Point_process*)); pnt_map = (char*)ecalloc(memb_func_size_, sizeof(char)); memb_func[1].alloc = cab_alloc; nrn_pnt_template_ = (Template**)ecalloc(memb_func_size_, sizeof(Template*)); pnt_receive = (pnt_receive_t*)ecalloc(memb_func_size_, sizeof(pnt_receive_t)); pnt_receive_init = (pnt_receive_init_t*)ecalloc(memb_func_size_, sizeof(pnt_receive_init_t)); pnt_receive_size = (short*)ecalloc(memb_func_size_, sizeof(short)); nrn_is_artificial_ = (short*)ecalloc(memb_func_size_, sizeof(short)); nrn_artcell_qindex_ = (short*)ecalloc(memb_func_size_, sizeof(short)); nrn_prop_param_size_ = (int*)ecalloc(memb_func_size_, sizeof(int)); nrn_prop_dparam_size_ = (int*)ecalloc(memb_func_size_, sizeof(int)); nrn_dparam_ptr_start_ = (int*)ecalloc(memb_func_size_, sizeof(int)); nrn_dparam_ptr_end_ = (int*)ecalloc(memb_func_size_, sizeof(int)); memb_order_ = (short*)ecalloc(memb_func_size_, sizeof(short)); bamech_ = (BAMech**)ecalloc(BEFORE_AFTER_SIZE, sizeof(BAMech*)); nrn_mk_prop_pools(memb_func_size_); nrn_bbcore_write_ = (bbcore_write_t*)ecalloc(memb_func_size_, sizeof(bbcore_write_t)); #if KEEP_NSEG_PARM {extern int keep_nseg_parm_; keep_nseg_parm_ = 1; } #endif #if FISHER /* get login_name from 'LOGNAME' */ strcpy(login_name, getenv("LOGNAME")); if (getenv("CAT_PIPE")) { pipe_filter = "cat"; /* preferred for emacs environment */ } else { pipe_filter = "more"; /* preferred for xterm environment */ } #endif section_list = hoc_l_newlist(); CHECK("v"); s = hoc_install("v", RANGEVAR, 0.0, &hoc_symlist); s->u.rng.type = VINDEX; CHECK("i_membrane_"); s = hoc_install("i_membrane_", RANGEVAR, 0.0, &hoc_symlist); s->u.rng.type = IMEMFAST; for (i = 0; usrprop[i].name; i++) { CHECK(usrprop[i].name); s = hoc_install(usrprop[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; s->subtype = USERPROPERTY; s->u.rng.type = usrprop[i].type; s->u.rng.index = usrprop[i].index; } SectionList_reg(); SectionRef_reg(); register_mech(morph_mech, morph_alloc, (Pvmi)0, (Pvmi)0, (Pvmi)0, (Pvmi)0, -1, 0); hoc_register_prop_size(MORPHOLOGY, 1, 0); for (m = mechanism; *m; m++) { (*m)(); } #if !MAC modl_reg(); #endif hoc_register_limits(0, _hoc_parm_limits); hoc_register_units(0, _hoc_parm_units); #if defined(WIN32) || defined(NRNMECH_DLL_STYLE) if (!nrn_mech_dll) { /* use the default if it exists */ FILE* ff = fopen(DLL_DEFAULT_FNAME, "r"); if (ff) { fclose(ff); nrn_mech_dll = DLL_DEFAULT_FNAME; } } if (nrn_mech_dll) { char *cp1, *cp2; hoc_default_dll_loaded_ = 1.; #if defined(WIN32) /* Sometimes (windows 10 and launch recent enthought canopy) it seems that mswin_load_dll fails if the filename is not a full path to nrnmech.dll */ if (strcmp(nrn_mech_dll, "nrnmech.dll") == 0) { char buf[5100]; char* retval = getcwd(buf, 4096); if (retval) { strncat(buf, "\\", 100); strncat(buf, nrn_mech_dll, 100); mswin_load_dll(buf); } }else{ #endif /*WIN32*/ for (cp1 = nrn_mech_dll; *cp1; cp1 = cp2) { for (cp2 = cp1; *cp2; ++cp2) { if (*cp2 == ';') { *cp2 = '\0'; ++cp2; break; } } mswin_load_dll(cp1); } #if defined(WIN32) } #endif /*WIN32*/ } #endif /* WIN32 || NRNMECH_DLL_STYLE */ s = hoc_lookup("section_owner"); s->type = OBJECTFUNC; } void initnrn(void) { secondorder = DEF_secondorder; /* >0 means crank-nicolson. 2 means currents adjusted to t+dt/2 */ t = 0; /* msec */ dt = DEF_dt; /* msec */ clamp_resist = DEF_clamp_resist; /*megohm*/ celsius = DEF_celsius; /* degrees celsius */ hoc_retpushx(1.); } static int pointtype = 1; /* starts at 1 since 0 means not point in pnt_map*/ int n_memb_func; /* if vectorized then thread_data_size added to it */ void nrn_register_mech_common( const char **m, Pvmp alloc, Pvmi cur, Pvmi jacob, Pvmi stat, Pvmi initialize, int nrnpointerindex, /* if -1 then there are none */ int vectorized ){ static int type = 2; /* 0 unused, 1 for cable section */ int j, k, modltype, pindx, modltypemax; Symbol *s; const char **m2; if (type >= memb_func_size_) { memb_func_size_ += 20; memb_func = (Memb_func*)erealloc(memb_func, memb_func_size_*sizeof(Memb_func)); memb_list = (Memb_list*)erealloc(memb_list, memb_func_size_*sizeof(Memb_list)); pointsym = (Symbol**)erealloc(pointsym, memb_func_size_*sizeof(Symbol*)); point_process = (Point_process**)erealloc(point_process, memb_func_size_*sizeof(Point_process*)); pnt_map = (char*)erealloc(pnt_map, memb_func_size_*sizeof(char)); nrn_pnt_template_ = (Template**)erealloc(nrn_pnt_template_, memb_func_size_*sizeof(Template*)); pnt_receive = (pnt_receive_t*)erealloc(pnt_receive, memb_func_size_*sizeof(pnt_receive_t)); pnt_receive_init = (pnt_receive_init_t*)erealloc(pnt_receive_init, memb_func_size_*sizeof(pnt_receive_init_t)); pnt_receive_size = (short*)erealloc(pnt_receive_size, memb_func_size_*sizeof(short)); nrn_is_artificial_ = (short*)erealloc(nrn_is_artificial_, memb_func_size_*sizeof(short)); nrn_artcell_qindex_ = (short*)erealloc(nrn_artcell_qindex_, memb_func_size_*sizeof(short)); nrn_prop_param_size_ = (int*)erealloc(nrn_prop_param_size_, memb_func_size_*sizeof(int)); nrn_prop_dparam_size_ = (int*)erealloc(nrn_prop_dparam_size_, memb_func_size_*sizeof(int)); nrn_dparam_ptr_start_ = (int*)erealloc(nrn_dparam_ptr_start_, memb_func_size_*sizeof(int)); nrn_dparam_ptr_end_ = (int*)erealloc(nrn_dparam_ptr_end_, memb_func_size_*sizeof(int)); memb_order_ = (short*)erealloc(memb_order_, memb_func_size_*sizeof(short)); nrn_bbcore_write_ = (bbcore_write_t*)erealloc(nrn_bbcore_write_, memb_func_size_*sizeof(bbcore_write_t)); for (j=memb_func_size_ - 20; j < memb_func_size_; ++j) { pnt_map[j] = 0; point_process[j] = (Point_process*)0; pointsym[j] = (Symbol*)0; nrn_pnt_template_[j] = (Template*)0; pnt_receive[j] = (pnt_receive_t)0; pnt_receive_init[j] = (pnt_receive_init_t)0; pnt_receive_size[j] = 0; nrn_is_artificial_[j] = 0; nrn_artcell_qindex_[j] = 0; memb_order_[j] = 0; nrn_bbcore_write_[j] = (bbcore_write_t)0; } nrn_mk_prop_pools(memb_func_size_); } nrn_prop_param_size_[type] = 0; /* fill in later */ nrn_prop_dparam_size_[type] = 0; /* fill in later */ nrn_dparam_ptr_start_[type] = 0; /* fill in later */ nrn_dparam_ptr_end_[type] = 0; /* fill in later */ memb_func[type].current = cur; memb_func[type].jacob = jacob; memb_func[type].alloc = alloc; memb_func[type].state = stat; memb_func[type].initialize = initialize; memb_func[type].destructor = (void*)0; #if VECTORIZE memb_func[type].vectorized = vectorized ? 1:0; memb_func[type].thread_size_ = vectorized ? (vectorized - 1) : 0; memb_func[type].thread_mem_init_ = (void*)0; memb_func[type].thread_cleanup_ = (void*)0; memb_func[type].thread_table_check_ = (void*)0; memb_func[type]._update_ion_pointers = (void*)0; memb_func[type].is_point = 0; memb_func[type].hoc_mech = (void*)0; memb_func[type].setdata_ = (void*)0; memb_func[type].dparam_semantics = (int*)0; memb_list[type].nodecount = 0; memb_list[type]._thread = (Datum*)0; memb_order_[type] = type; #endif #if CVODE memb_func[type].ode_count = (void*)0; memb_func[type].ode_map = (void*)0; memb_func[type].ode_spec = (void*)0; memb_func[type].ode_matsol = (void*)0; memb_func[type].ode_synonym = (void*)0; memb_func[type].singchan_ = (void*)0; #endif /* as of 5.2 nmodl translates so that the version string is the first string in m. This allows the neuron application to determine if nmodl c files are compatible with this version Note that internal mechanisms have a version of "0" and are by nature consistent. */ /*printf("%s %s\n", m[0], m[1]);*/ if (strcmp(m[0], "0") == 0) { /* valid by nature */ }else if (m[0][0] != '6') { /* must be 5.1 or before */ fprintf(stderr, "Mechanism %s needs to be re-translated.\n\ It's pre version 6.0 \"c\" code is incompatible with this neuron version.\n", m[0]); nrn_exit(1); }else if (strcmp(m[0], nmodl_version_) != 0){ fprintf(stderr, "Mechanism %s needs to be re-translated.\n\ It's version %s \"c\" code is incompatible with this neuron version.\n", m[1], m[0]); nrn_exit(1); } CHECK(m[1]); s = hoc_install(m[1], MECHANISM, 0.0, &hoc_symlist); s->subtype = type; memb_func[type].sym = s; /* printf("%s type=%d\n", s->name, type);*/ m2 = m + 2; if (nrnpointerindex == -1) { modltypemax = STATE; } else { modltypemax = NRNPOINTER; } for (k=0, j=0, modltype=nrnocCONST; modltype<=modltypemax; modltype++, j++){ /*EMPTY*/ for (; m2[j]; j++, k++) { ; } } s->s_varn = k; s->u.ppsym = (Symbol **) emalloc((unsigned)(j*sizeof(Symbol *))); /* this is set up for the possiblility of overloading range variables. We are currently not allowing this. Hence the #if. If never overloaded then no reason for list of symbols for each mechanism. */ /* the indexing is confusing because k refers to index in the range indx list and j refers to index in mechanism list which has 0 elements to separate nrnocCONST, DEPENDENT, and STATE */ /* variable pointers added on at end, if they exist */ /* allowing range variable arrays. Must extract dimension info from name[%d]*/ /* pindx refers to index into the p-array */ pindx = 0; for (j=0, k=0, modltype=nrnocCONST; modltype <= modltypemax; modltype++, j++) { for (; m2[j]; j++, k++) { Symbol *s2; char buf[200], *cp; int indx; unsigned nsub=0; strcpy(buf, m2[j]); /* not allowed to change constant string */ indx = 1; cp = strchr(buf, '['); if (cp) { #if EXTRACELLULAR if (cp[1] == 'N') { indx = nlayer; }else #endif { sscanf(cp+1, "%d", &indx); } nsub = 1; *cp = '\0'; } /*SUPPRESS 624*/ if ((s2 = hoc_lookup(buf))) { #if 0 if (s2->subtype != RANGEVAR) { IGNORE(fprintf(stderr, CHKmes, buf)); } #else IGNORE(fprintf(stderr, CHKmes, buf)); #endif }else{ s2 = hoc_install(buf, RANGEVAR, 0.0, &hoc_symlist); s2->subtype = modltype; s2->u.rng.type = type; s2->public = 1; if (modltype == NRNPOINTER) { /* not in p array */ s2->u.rng.index = nrnpointerindex; } else { s2->u.rng.index = pindx; } if (nsub) { s2->arayinfo = (Arrayinfo *) emalloc( sizeof(Arrayinfo) + nsub * sizeof(int)); s2->arayinfo->a_varn = (unsigned *)0; s2->arayinfo->refcount = 1; s2->arayinfo->nsub = nsub; s2->arayinfo->sub[0] = indx; } if (modltype == NRNPOINTER) { if (nrn_dparam_ptr_end_[type] == 0) { nrn_dparam_ptr_start_[type] = nrnpointerindex; } nrnpointerindex += indx; nrn_dparam_ptr_end_[type] = nrnpointerindex; }else { pindx += indx; } } s->u.ppsym[k] = s2; } } ++type; n_memb_func = type; } void register_mech( const char **m, Pvmp alloc, Pvmi cur, Pvmi jacob, Pvmi stat, Pvmi initialize, int nrnpointerindex, /* if -1 then there are none */ int vectorized ){ int type = n_memb_func; nrn_register_mech_common(m, alloc, cur, jacob, stat, initialize, nrnpointerindex, vectorized); if (nrnpy_reg_mech_p_) { (*nrnpy_reg_mech_p_)(type); } } void nrn_writes_conc(int type, int unused) { static int lastion = EXTRACELL+1; int i; for (i=n_memb_func - 2; i >= lastion; --i) { memb_order_[i+1] = memb_order_[i]; } memb_order_[lastion] = type; #if 0 printf("%s reordered from %d to %d\n", memb_func[type].sym->name, type, lastion); #endif if (nrn_is_ion(type)) { ++lastion; } } void hoc_register_prop_size(int type, int psize, int dpsize) { nrn_prop_param_size_[type] = psize; nrn_prop_dparam_size_[type] = dpsize; if (memb_func[type].dparam_semantics) { free(memb_func[type].dparam_semantics); memb_func[type].dparam_semantics = (int*)0; } if (dpsize) { memb_func[type].dparam_semantics = (int*)ecalloc(dpsize, sizeof(int)); } } void hoc_register_dparam_semantics(int type, int ix, const char* name) { /* only interested in area, iontype, cvode_ieq, netsend, pointer, pntproc, bbcorepointer, watch, diam, fornetcon, xx_ion and #xx_ion which will get a semantics value of -1, -2, -3, -4, -5, -6, -7, -8, -9, -10 type, and type+1000 respectively */ if (strcmp(name, "area") == 0) { memb_func[type].dparam_semantics[ix] = -1; }else if (strcmp(name, "iontype") == 0) { memb_func[type].dparam_semantics[ix] = -2; }else if (strcmp(name, "cvodeieq") == 0) { memb_func[type].dparam_semantics[ix] = -3; }else if (strcmp(name, "netsend") == 0) { memb_func[type].dparam_semantics[ix] = -4; }else if (strcmp(name, "pointer") == 0) { memb_func[type].dparam_semantics[ix] = -5; }else if (strcmp(name, "pntproc") == 0) { memb_func[type].dparam_semantics[ix] = -6; }else if (strcmp(name, "bbcorepointer") == 0) { memb_func[type].dparam_semantics[ix] = -7; }else if (strcmp(name, "watch") == 0) { memb_func[type].dparam_semantics[ix] = -8; }else if (strcmp(name, "diam") == 0) { memb_func[type].dparam_semantics[ix] = -9; }else if (strcmp(name, "fornetcon") == 0) { memb_func[type].dparam_semantics[ix] = -10; }else{ int i = 0; if (name[0] == '#') { i = 1; } Symbol* s = hoc_lookup(name+i); if (s && s->type == MECHANISM) { memb_func[type].dparam_semantics[ix] = s->subtype + i*1000; }else{ fprintf(stderr, "mechanism %s : unknown semantics for %s\n", memb_func[type].sym->name, name); assert(0); } } #if 0 printf("dparam semantics %s ix=%d %s %d\n", memb_func[type].sym->name, ix, name, memb_func[type].dparam_semantics[ix]); #endif } #if CVODE void hoc_register_cvode( int i, nrn_ode_count_t cnt, nrn_ode_map_t map, Pvmi spec, Pvmi matsol ){ memb_func[i].ode_count = cnt; memb_func[i].ode_map = map; memb_func[i].ode_spec = spec; memb_func[i].ode_matsol = matsol; } void hoc_register_synonym(int i, void (*syn)(int, double**, Datum**)){ memb_func[i].ode_synonym = syn; } #endif void register_destructor(Pvmp d) { memb_func[n_memb_func - 1].destructor = d; } int point_reg_helper(Symbol* s2) { pointsym[pointtype] = s2; s2->public = 0; pnt_map[n_memb_func-1] = pointtype; memb_func[n_memb_func-1].is_point = 1; if (nrnpy_reg_mech_p_) { (*nrnpy_reg_mech_p_)(n_memb_func-1); } return pointtype++; } int point_register_mech( const char **m, Pvmp alloc, Pvmi cur, Pvmi jacob, Pvmi stat, Pvmi initialize, int nrnpointerindex, int vectorized, void* (*constructor)(Object*), void (*destructor)(void*), Member_func* fmember ){ extern void steer_point_process(); Symlist* sl; Symbol* s, *s2; void class2oc(); CHECK(m[1]); class2oc(m[1], constructor, destructor, fmember, (void*)0, (void*)0, (void*)0); s = hoc_lookup(m[1]); sl = hoc_symlist; hoc_symlist = s->u.template->symtable; s->u.template->steer = steer_point_process; s->u.template->is_point_ = pointtype; nrn_register_mech_common(m, alloc, cur, jacob, stat, initialize, nrnpointerindex, vectorized); nrn_pnt_template_[n_memb_func-1] = s->u.template; s2 = hoc_lookup(m[1]); hoc_symlist = sl; return point_reg_helper(s2); } /* some stuff from scopmath needed for built-in models */ #if 0 double* makevector(int nrows) { double* v; v = (double*)emalloc((unsigned)(nrows*sizeof(double))); return v; } #endif int _ninits; void _modl_cleanup(void){} #if 1 void _modl_set_dt(double newdt) { dt = newdt; nrn_threads->_dt = newdt; } void _modl_set_dt_thread(double newdt, NrnThread* nt) { nt->_dt = newdt; } double _modl_get_dt_thread(NrnThread* nt) { return nt->_dt; } #endif int nrn_pointing(double* pd) { return pd ? 1 : 0; } int state_discon_flag_ = 0; void state_discontinuity(int i, double* pd, double d) { if (state_discon_allowed_ && state_discon_flag_ == 0) { *pd = d; /*printf("state_discontinuity t=%g pd=%lx d=%g\n", t, (long)pd, d);*/ } } void hoc_register_limits(int type, HocParmLimits* limits) { int i; Symbol* sym; for (i=0; limits[i].name; ++i) { sym = (Symbol*)0; if (type && memb_func[type].is_point) { Symbol* t; t = hoc_lookup(memb_func[type].sym->name); sym = hoc_table_lookup( limits[i].name, t->u.template->symtable ); } if (!sym) { sym = hoc_lookup(limits[i].name); } hoc_symbol_limits(sym, limits[i].bnd[0], limits[i].bnd[1]); } } void hoc_register_units(int type, HocParmUnits* units) { int i; Symbol* sym; for (i=0; units[i].name; ++i) { sym = (Symbol*)0; if (type && memb_func[type].is_point) { Symbol* t; t = hoc_lookup(memb_func[type].sym->name); sym = hoc_table_lookup( units[i].name, t->u.template->symtable ); } if (!sym) { sym = hoc_lookup(units[i].name); } hoc_symbol_units(sym, units[i].units); } } void hoc_reg_ba(int mt, nrn_bamech_t f, int type) { BAMech* bam; switch (type) { /* see bablk in src/nmodl/nocpout.c */ case 11: type = BEFORE_BREAKPOINT; break; case 22: type = AFTER_SOLVE; break; case 13: type = BEFORE_INITIAL; break; case 23: type = AFTER_INITIAL; break; case 14: type = BEFORE_STEP; break; default: printf("before-after processing type %d for %s not implemented\n", type, memb_func[mt].sym->name); nrn_exit(1); } bam = (BAMech*)emalloc(sizeof(BAMech)); bam->f = f; bam->type = mt; bam->next = bamech_[type]; bamech_[type] = bam; } void _cvode_abstol(Symbol** s, double* tol, int i) { #if CVODE if (s && s[i]->extra) { double x; x = s[i]->extra->tolerance; if (x != 0) { tol[i] *= x; } } #endif } void hoc_register_tolerance(int type, HocStateTolerance* tol, Symbol*** stol) { #if CVODE int i; Symbol* sym; /*printf("register tolerance for %s\n", memb_func[type].sym->name);*/ for (i = 0; tol[i].name; ++i) { if (memb_func[type].is_point) { Symbol* t; t = hoc_lookup(memb_func[type].sym->name); sym = hoc_table_lookup( tol[i].name, t->u.template->symtable ); }else{ sym = hoc_lookup(tol[i].name); } hoc_symbol_tolerance(sym, tol[i].tolerance); } if (memb_func[type].ode_count) { Symbol** psym, *msym, *vsym; double **pv; Node** pnode; Prop* p; extern Node** node_construct(); int i, j, k, n, na, index=0; n = (*memb_func[type].ode_count)(type); if (n > 0) { psym = (Symbol**)ecalloc(n, sizeof(Symbol*)); pv = (double**)ecalloc(2*n, sizeof(double*)); pnode = node_construct(1); prop_alloc(&(pnode[0]->prop), MORPHOLOGY, pnode[0]); /* in case we need diam */ p = prop_alloc(&(pnode[0]->prop), type, pnode[0]); /* this and any ions */ (*memb_func[type].ode_map)(0, pv, pv+n, p->param, p->dparam, (double*)0, type); for (i=0; i < n; ++i) { for (p = pnode[0]->prop; p; p = p->next) { if (pv[i] >= p->param && pv[i] < (p->param + p->param_size)) { index = pv[i] - p->param; break; } } /* p is the prop and index is the index into the p->param array */ assert(p); /* need to find symbol for this */ msym = memb_func[p->type].sym; for (j=0; j < msym->s_varn; ++j) { vsym = msym->u.ppsym[j]; if (vsym->type == RANGEVAR && vsym->u.rng.index == index) { psym[i] = vsym; /*printf("identified %s at index %d of %s\n", vsym->name, index, msym->name);*/ if (ISARRAY(vsym)) { na = vsym->arayinfo->sub[0]; for (k=1; k < na; ++k) { psym[++i] = vsym; } } break; } } assert (j < msym->s_varn); } node_destruct(pnode, 1); *stol = psym; free (pv); } } #endif } void _nrn_thread_reg(int i, int cons, void(*f)(Datum*)) { if (cons == 1) { memb_func[i].thread_mem_init_ = f; }else if (cons == 0) { memb_func[i].thread_cleanup_ = f; }else if (cons == 2) { memb_func[i]._update_ion_pointers = f; } } void _nrn_thread_table_reg(int i, void(*f)(double*, Datum*, Datum*, void*, int)) { memb_func[i].thread_table_check_ = f; } void _nrn_setdata_reg(int i, void(*call)(Prop*)) { memb_func[i].setdata_ = call; } /* there is some question about the _extcall_thread variables, if any. */ double nrn_call_mech_func(Symbol* s, int narg, Prop* p, int type) { double x; extern double hoc_call_func(Symbol*, int); void (*call)(Prop*) = memb_func[type].setdata_; if (call) { (*call)(p); } x = hoc_call_func(s, narg); return x; } neuron-7.5/src/nrnoc/intfire1.c000066400000000000000000000212421323325274500164750ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__IntFire1 #define _nrn_initial _nrn_initial__IntFire1 #define nrn_cur _nrn_cur__IntFire1 #define _nrn_current _nrn_current__IntFire1 #define nrn_jacob _nrn_jacob__IntFire1 #define nrn_state _nrn_state__IntFire1 #define _net_receive _net_receive__IntFire1 #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define tau _p[0] #define refrac _p[1] #define m _p[2] #define t0 _p[3] #define refractory _p[4] #define v _p[5] #define _tsav _p[6] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_M(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "M", _hoc_M, 0, 0 }; #define M M_IntFire1 extern double M( _threadargsproto_ ); /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "tau", "ms", "refrac", "ms", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "IntFire1", "tau", "refrac", 0, "m", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 7, _prop); /*initialize range parameters*/ tau = 10; refrac = 5; } _prop->param = _p; _prop->param_size = 7; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 3, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); #define _tqitem &(_ppvar[2]._pvoid) static void _net_receive(Point_process*, double*, double); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _intfire1_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 7, 3); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "netsend"); add_nrn_artcell(_mechtype, 2); add_nrn_has_net_event(_mechtype); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 IntFire1 /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/intfire1.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} double M ( _threadargsproto_ ) { double _lM; if ( refractory == 0.0 ) { _lM = m * exp ( - ( t - t0 ) / tau ) ; } else if ( refractory == 1.0 ) { if ( t - t0 < .5 ) { _lM = 2.0 ; } else { _lM = - 1.0 ; } } return _lM; } static double _hoc_M(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = M ( _p, _ppvar, _thread, _nt ); return(_r); } static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt; _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; if (_lflag == 1. ) {*(_tqitem) = 0;} { if ( refractory == 0.0 ) { m = m * exp ( - ( t - t0 ) / tau ) ; t0 = t ; m = m + _args[0] ; if ( m > 1.0 ) { refractory = 1.0 ; m = 2.0 ; artcell_net_send ( _tqitem, _args, _pnt, t + refrac , refractory ) ; net_event ( _pnt, t ) ; } } else if ( _lflag == 1.0 ) { t0 = t ; refractory = 0.0 ; m = 0.0 ; } } } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { m = 0.0 ; t0 = t ; refractory = 0.0 ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v=_v; { }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/intfire1.mod000077500000000000000000000021351323325274500170350ustar00rootroot00000000000000NEURON { : ARTIFICIAL_CELL means : that this model not only has a NET_RECEIVE block and does NOT : have a BREAKPOINT but is not associated with a : section location or numerical integrator. i.e it does not : refer to v or any ions or have a POINTER. It is entirely isolated : and depends on discrete events from the outside to affect it and : affects the outside only by sending discrete events. ARTIFICIAL_CELL IntFire1 RANGE tau, refrac, m : m plays the role of voltage } PARAMETER { tau = 10 (ms) refrac = 5 (ms) } ASSIGNED { m t0(ms) refractory } INITIAL { m = 0 t0 = t refractory = 0 : 0-integrates input, 1-refractory } FUNCTION M() { if (refractory == 0) { M = m*exp(-(t - t0)/tau) }else if (refractory == 1) { if (t - t0 < .5) { M = 2 }else{ M = -1 } } } NET_RECEIVE (w) { if (refractory == 0) { : inputs integrated only when excitable m = m*exp(-(t - t0)/tau) t0 = t m = m + w if (m > 1) { refractory = 1 m = 2 net_send(refrac, refractory) net_event(t) } }else if (flag == 1) { : ready to integrate again t0 = t refractory = 0 m = 0 } } neuron-7.5/src/nrnoc/intfire2.c000066400000000000000000000323751323325274500165070ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__IntFire2 #define _nrn_initial _nrn_initial__IntFire2 #define nrn_cur _nrn_cur__IntFire2 #define _nrn_current _nrn_current__IntFire2 #define nrn_jacob _nrn_jacob__IntFire2 #define nrn_state _nrn_state__IntFire2 #define _net_receive _net_receive__IntFire2 #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define taus _p[0] #define taum _p[1] #define ib _p[2] #define i _p[3] #define m _p[4] #define t0 _p[5] #define v _p[6] #define _tsav _p[7] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_I(); static double _hoc_M(); static double _hoc_firetime(); static double _hoc_newton1(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "I", _hoc_I, "M", _hoc_M, "firetime", _hoc_firetime, "newton1", _hoc_newton1, 0, 0 }; #define I I_IntFire2 #define M M_IntFire2 #define firetime firetime_IntFire2 #define newton1 newton1_IntFire2 extern double I( _threadargsproto_ ); extern double M( _threadargsproto_ ); extern double firetime( _threadargsprotocomma_ double , double , double ); extern double newton1( _threadargsprotocomma_ double , double , double , double , double ); /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "taus", "ms", "taum", "ms", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "IntFire2", "taus", "taum", "ib", 0, "i", "m", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 8, _prop); /*initialize range parameters*/ taus = 20; taum = 10; ib = 0; } _prop->param = _p; _prop->param_size = 8; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 3, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); #define _tqitem &(_ppvar[2]._pvoid) static void _net_receive(Point_process*, double*, double); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _intfire2_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 8, 3); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "netsend"); add_nrn_artcell(_mechtype, 2); add_nrn_has_net_event(_mechtype); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 IntFire2 /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/intfire2.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} double M ( _threadargsproto_ ) { double _lM; double _lx , _lf ; _lf = taus / ( taus - taum ) ; _lx = ( i - ib ) * exp ( - ( t - t0 ) / taus ) ; _lM = ib + _lf * _lx + ( m - ( ib + ( i - ib ) * _lf ) ) * exp ( - ( t - t0 ) / taum ) ; return _lM; } static double _hoc_M(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = M ( _p, _ppvar, _thread, _nt ); return(_r); } double I ( _threadargsproto_ ) { double _lI; double _lx , _lf ; _lf = taus / ( taus - taum ) ; _lx = ( i - ib ) * exp ( - ( t - t0 ) / taus ) ; _lI = _lx + ib ; return _lI; } static double _hoc_I(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = I ( _p, _ppvar, _thread, _nt ); return(_r); } static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt; _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; if (_lflag == 1. ) {*(_tqitem) = 0;} { double _lx , _linew , _lf , _libf ; _lf = taus / ( taus - taum ) ; _lx = ( i - ib ) * exp ( - ( t - t0 ) / taus ) ; _linew = ib + _lx ; if ( _lflag == 1.0 ) { net_event ( _pnt, t ) ; m = 0.0 ; _libf = ( _linew - ib ) * _lf ; artcell_net_send ( _tqitem, _args, _pnt, t + firetime ( _threadargscomma_ ib , _libf , 0.0 ) , 1.0 ) ; } else { m = ib + _lf * _lx + ( m - ( ib + ( i - ib ) * _lf ) ) * exp ( - ( t - t0 ) / taum ) ; _linew = _linew + _args[0] ; if ( m >= 1.0 ) { artcell_net_move ( _tqitem, _pnt, t ) ; } else { _libf = ( _linew - ib ) * _lf ; artcell_net_move ( _tqitem, _pnt, firetime ( _threadargscomma_ ib , _libf , m ) + t ) ; } } t0 = t ; i = _linew ; } } double firetime ( _threadargsprotocomma_ double _la , double _lb , double _lc ) { double _lfiretime; double _lr , _lcab , _lx , _lm , _lf ; _lr = taum / taus ; if ( _la <= 1.0 && _la + _lb <= 1.0 ) { _lfiretime = 1e9 ; } else if ( _la > 1.0 && _lb <= 0.0 ) { _lcab = _lc - _la - _lb ; _lm = _lr * _lb + _lcab ; if ( _lm >= 0.0 ) { _lfiretime = - taus * log ( newton1 ( _threadargscomma_ _la , _lcab , _lb , 1.0 / _lr , 0.0 ) ) ; } else { _lx = ( 1.0 - _lc + _lm ) / _lm ; if ( _lx <= 0.0 ) { _lfiretime = - taus * log ( newton1 ( _threadargscomma_ _la , _lcab , _lb , 1.0 / _lr , 0.0 ) ) ; } else { _lfiretime = - taum * log ( newton1 ( _threadargscomma_ _la , _lb , _lcab , _lr , _lx ) ) ; } } } else { _lcab = _lc - _la - _lb ; _lx = pow( ( - _lcab / ( _lr * _lb ) ) , ( 1.0 / ( _lr - 1.0 ) ) ) ; _lf = _la + _lb * pow( _lx , _lr ) + _lcab * _lx ; if ( _lx >= 1.0 || _lf <= 1.0 ) { _lfiretime = 1e9 ; } else { _lm = _lr * _lb + _lcab ; _lx = ( 1.0 - _lc + _lm ) / _lm ; _lfiretime = - taum * log ( newton1 ( _threadargscomma_ _la , _lb , _lcab , _lr , _lx ) ) ; } } return _lfiretime; } static double _hoc_firetime(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = firetime ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) , *getarg(3) ); return(_r); } double newton1 ( _threadargsprotocomma_ double _la , double _lb , double _lc , double _lr , double _lx ) { double _lnewton1; double _ldx , _lf , _ldf , _liter , _lxm ; _ldx = 1.0 ; _lf = 0.0 ; _liter = 0.0 ; while ( fabs ( _ldx ) > 1e-6 || fabs ( _lf - 1.0 ) > 1e-6 ) { _lf = _la + _lb * pow( _lx , _lr ) + _lc * _lx ; _ldf = _lr * _lb * pow( _lx , ( _lr - 1.0 ) ) + _lc ; _ldx = ( 1.0 - _lf ) / _ldf ; _lx = _lx + _ldx ; if ( _lx <= 0.0 ) { _lx = 1e-4 ; } else if ( _lx > 1.0 ) { _lx = 1.0 ; } _liter = _liter + 1.0 ; if ( _liter == 6.0 && _lr < 1.0 ) { _lxm = pow( ( - _lc / ( _lr * _lb ) ) , ( 1.0 / ( _lr - 1.0 ) ) ) ; } if ( _liter > 5.0 ) { } if ( _liter > 10.0 ) { printf ( "Intfire2 iter %g x=%g f=%g df=%g dx=%g a=%g b=%g c=%g r=%g\n" , _liter , _lx , _lf , _ldf , _ldx , _la , _lb , _lc , _lr ) ; _lf = 1.0 ; _ldx = 0.0 ; } } _lnewton1 = _lx ; return _lnewton1; } static double _hoc_newton1(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = newton1 ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) , *getarg(3) , *getarg(4) , *getarg(5) ); return(_r); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { i = ib ; m = 0.0 ; if ( taus <= taum ) { taus = taum + .1 ; } t0 = t ; artcell_net_send ( _tqitem, (double*)0, _ppvar[1]._pvoid, t + firetime ( _threadargscomma_ ib , 0.0 , 0.0 ) , 1.0 ) ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v=_v; { }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/intfire2.mod000077500000000000000000000075761323325274500170540ustar00rootroot00000000000000: total current is ib + weighted events that decay with time constant taus : total current is integrated and when passes 1, then fire : i.e. taus * di/dt + i = ib where if event occurs at time t1 then : i(t1) += w : and taum*dm/dt + m = i where fire if m crosses 1 in a positive direction : and after firing, m = 0. : Require, taum < taus, ie synaptic current longer than membrane time constant. NEURON { ARTIFICIAL_CELL IntFire2 RANGE taus, taum, ib, i, m } PARAMETER { taus = 20 (ms) taum = 10 (ms) ib = 0 } ASSIGNED { i m t0 (ms) } FUNCTION M() { LOCAL x, f f = taus/(taus - taum) x = (i - ib)*exp(-(t - t0)/taus) M = ib + f*x + (m - (ib + (i - ib)*f))*exp(-(t - t0)/taum) } FUNCTION I() { LOCAL x, f f = taus/(taus - taum) x = (i - ib)*exp(-(t - t0)/taus) I = x + ib } INITIAL { i = ib m = 0 if (taus <= taum) { taus = taum + .1 } t0 = t net_send(firetime(ib, 0, 0), 1) } NET_RECEIVE (w) { LOCAL x, inew, f, ibf f = taus/(taus - taum) x = (i - ib)*exp(-(t - t0)/taus) inew = ib + x if (flag == 1) { : time to fire :printf("now firing t=%g inew=%g\n", t, inew) net_event(t) m = 0 ibf = (inew - ib)*f net_send(firetime(ib, ibf, 0), 1) }else{ m = ib + f*x + (m - (ib + (i - ib)*f))*exp(-(t - t0)/taum) :printf("event w=%g i=%g m=%g\n", w, inew, m) inew = inew + w if (m >= 1) { net_move(t) : the time to fire is now }else{ ibf = (inew - ib)*f net_move(firetime(ib, ibf, m) + t) } } t0 = t i = inew } FUNCTION firetime(a, b, c) (ms) { : find 1 = a + b*exp(-t/taus) + (c - a - b)*exp(-t/taum) : assert c < 1 taum < taus LOCAL r, cab, x, m, f r = taum/taus : for numerical convenience when b is not too negative solve : 1 = a + b*x^r + (c - a - b)*x where 0 1 && b <= 0) { : must be one solution in the domain since a > 1 : find starting point cab = c - a - b m = r*b + cab : slope at x=1 if (m >= 0) { : switch to alternative firetime = -taus * log(newton1(a,cab,b,1/r,0)) }else{ :intercept at f=1 note: value at x=1 is c x = (1 - c + m)/m if (x <= 0) { :switch to alternative firetime = -taus*log(newton1(a,cab,b,1/r,0)) }else{ : newton starting at x firetime = -taum*log(newton1(a,b,cab,r,x)) } } }else{ : if a solution exists then newtons method starting from : x=1 will converge to the proper one. : a solution does not exist if f(tm) <= 1 cab = c - a - b : max at x = (-cab/(r*b))^(1/(r-1)) f = a + b*x^r + cab*x :printf("max at x=%g val=%g\n", x, f) : believe it or not, there are cases where the max is : located at x > 1. e.g. a=0, b=1.1, c=.9, r=.5 : so both parts of the test are essential if (x >= 1 || f <= 1) { firetime = 1e9 }else{ m = r*b + cab x = (1 - c + m)/m firetime = -taum*log(newton1(a,b,cab,r,x)) } } :printf("firetime=%g\n", firetime) } FUNCTION newton1(a,b,c,r,x) { : solve 1 = a + b*x^r + c*x starting from x : derivative is r*b*x^(r-1) + c : must stay in domain 0 < x <= 1 LOCAL dx, f, df, iter, xm dx = 1 f = 0 iter = 0 :printf("newton a=%g b=%g c=%g r=%g x=%g\n", a, b, c, r, x) while( fabs(dx) > 1e-6 || fabs(f - 1) > 1e-6) { f = a + b*x^r + c*x df = r*b*x^(r-1) + c dx = (1 - f)/df :printf("newton x=%g f=%g df=%g dx=%g\n", x, f, df, dx) x = x + dx if (x <= 0) { x = 1e-4 }else if (x > 1) { x = 1 } iter = iter + 1 if (iter == 6 && r < 1) { xm = (-c/(r*b))^(1/(r-1)) :printf("max at x=%g val=%g\n", xm, (a + b*xm^r + c*xm)) } if (iter >5) { :printf("Intfire2 iter %g x=%g f=%g df=%g dx=%g a=%g b=%g c=%g r=%g\n", :iter, x, f, df, dx, a, b, c, r) } if (iter > 10) { printf("Intfire2 iter %g x=%g f=%g df=%g dx=%g a=%g b=%g c=%g r=%g\n", iter, x, f, df, dx, a, b, c, r) f=1 dx=0 } } newton1 = x } neuron-7.5/src/nrnoc/intfire4.c000066400000000000000000000463351323325274500165120ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__IntFire4 #define _nrn_initial _nrn_initial__IntFire4 #define nrn_cur _nrn_cur__IntFire4 #define _nrn_current _nrn_current__IntFire4 #define nrn_jacob _nrn_jacob__IntFire4 #define nrn_state _nrn_state__IntFire4 #define _net_receive _net_receive__IntFire4 #define factors factors__IntFire4 #define fixprecondition fixprecondition__IntFire4 #define newstates newstates__IntFire4 #define update update__IntFire4 #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define taue _p[0] #define taui1 _p[1] #define taui2 _p[2] #define taum _p[3] #define e _p[4] #define i1 _p[5] #define i2 _p[6] #define m _p[7] #define nself _p[8] #define nexcite _p[9] #define ninhibit _p[10] #define ae _p[11] #define ai1 _p[12] #define ai2 _p[13] #define enew _p[14] #define i1new _p[15] #define i2new _p[16] #define mnew _p[17] #define t0 _p[18] #define ke _p[19] #define ki1 _p[20] #define ki2 _p[21] #define km _p[22] #define be _p[23] #define bi1 _p[24] #define bi2 _p[25] #define a _p[26] #define b _p[27] #define tau_swap _p[28] #define flag _p[29] #define v _p[30] #define _tsav _p[31] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_E(); static double _hoc_I(); static double _hoc_M(); static double _hoc_deriv(); static double _hoc_firetimebound(); static double _hoc_factors(); static double _hoc_fixprecondition(); static double _hoc_newstates(); static double _hoc_search(); static double _hoc_update(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "E", _hoc_E, "I", _hoc_I, "M", _hoc_M, "deriv", _hoc_deriv, "firetimebound", _hoc_firetimebound, "factors", _hoc_factors, "fixprecondition", _hoc_fixprecondition, "newstates", _hoc_newstates, "search", _hoc_search, "update", _hoc_update, 0, 0 }; #define E E_IntFire4 #define I I_IntFire4 #define M M_IntFire4 #define deriv deriv_IntFire4 #define firetimebound firetimebound_IntFire4 #define search search_IntFire4 extern double E( _threadargsproto_ ); extern double I( _threadargsproto_ ); extern double M( _threadargsproto_ ); extern double deriv( _threadargsprotocomma_ double ); extern double firetimebound( _threadargsproto_ ); extern double search( _threadargsproto_ ); /* declare global and static user variables */ #define eps eps_IntFire4 double eps = 1e-06; #define ib ib_IntFire4 double ib = 0; #define taueps taueps_IntFire4 double taueps = 0.01; /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "eps_IntFire4", 1e-09, 0.01, "taueps_IntFire4", 1e-09, 1e+09, "taum", 0, 1e+09, "taui2", 0, 1e+09, "taui1", 0, 1e+09, "taue", 0, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "eps_IntFire4", "1e-9", "taueps_IntFire4", "1e-9", "taue", "ms", "taui1", "ms", "taui2", "ms", "taum", "ms", "ae", "1/ms", "ai1", "1/ms", "ai2", "1/ms", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { "ib_IntFire4", &ib_IntFire4, "eps_IntFire4", &eps_IntFire4, "taueps_IntFire4", &taueps_IntFire4, 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "IntFire4", "taue", "taui1", "taui2", "taum", 0, "e", "i1", "i2", "m", "nself", "nexcite", "ninhibit", "ae", "ai1", "ai2", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 32, _prop); /*initialize range parameters*/ taue = 5; taui1 = 10; taui2 = 20; taum = 50; } _prop->param = _p; _prop->param_size = 32; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 3, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); #define _tqitem &(_ppvar[2]._pvoid) static void _net_receive(Point_process*, double*, double); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _intfire4_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 32, 3); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "netsend"); add_nrn_artcell(_mechtype, 2); add_nrn_has_net_event(_mechtype); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 IntFire4 /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/intfire4.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int factors(_threadargsproto_); static int fixprecondition(_threadargsproto_); static int newstates(_threadargsprotocomma_ double); static int update(_threadargsproto_); static int newstates ( _threadargsprotocomma_ double _ld ) { double _lee , _lei1 , _lei2 , _lem ; _lee = exp ( - ke * _ld ) ; _lei1 = exp ( - ki1 * _ld ) ; _lei2 = exp ( - ki2 * _ld ) ; _lem = exp ( - km * _ld ) ; enew = e * _lee ; i1new = i1 * _lei1 ; i2new = i2 * _lei2 + bi1 * i1 * ( _lei2 - _lei1 ) ; mnew = m * _lem + be * e * ( _lem - _lee ) + ( bi2 * i2 + a * i1 ) * ( _lem - _lei2 ) - b * i1 * ( _lem - _lei1 ) ; return 0; } static double _hoc_newstates(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; newstates ( _p, _ppvar, _thread, _nt, *getarg(1) ); return(_r); } double M ( _threadargsproto_ ) { double _lM; newstates ( _threadargscomma_ t - t0 ) ; _lM = mnew ; return _lM; } static double _hoc_M(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = M ( _p, _ppvar, _thread, _nt ); return(_r); } double E ( _threadargsproto_ ) { double _lE; newstates ( _threadargscomma_ t - t0 ) ; _lE = ae * enew ; return _lE; } static double _hoc_E(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = E ( _p, _ppvar, _thread, _nt ); return(_r); } double I ( _threadargsproto_ ) { double _lI; newstates ( _threadargscomma_ t - t0 ) ; _lI = ai2 * i2new ; return _lI; } static double _hoc_I(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = I ( _p, _ppvar, _thread, _nt ); return(_r); } static int update ( _threadargsproto_ ) { e = enew ; i1 = i1new ; i2 = i2new ; m = mnew ; t0 = t ; return 0; } static double _hoc_update(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; update ( _p, _ppvar, _thread, _nt ); return(_r); } static int fixprecondition ( _threadargsproto_ ) { if ( taui2 < 4.0 * taueps ) { taui2 = 4.0 * taueps ; } if ( taui1 < 3.0 * taueps ) { taui1 = 3.0 * taueps ; } if ( taue < 2.0 * taueps ) { taue = 2.0 * taueps ; } if ( taue > taui2 ) { tau_swap = taue ; taue = taui2 - taueps ; printf ( "Warning: Adjusted taue from %g to %g to ensure taue < taui2\n" , tau_swap , taue ) ; } else if ( taui2 - taue < taueps ) { taue = taui2 - taueps ; } if ( taui1 > taui2 ) { tau_swap = taui2 ; taui2 = taui1 ; taui1 = tau_swap ; printf ( "Warning: Swapped taui1 and taui2\n" ) ; } if ( taui2 - taui1 < taueps ) { taui1 = taui2 - taueps ; } if ( taum <= taui2 ) { if ( taui2 - taum < taueps ) { taum = taui2 - taueps ; } if ( fabs ( taui1 - taum ) < taueps ) { taum = taui1 - taueps ; } if ( fabs ( taui1 - taum ) < taueps ) { if ( taui1 - taum < 0.0 ) { taum = taui1 - taueps ; } else { taui1 = taum - taueps ; } } if ( fabs ( taue - taum ) < taueps ) { if ( taue - taum < 0.0 ) { taum = taue - taueps ; } else { taue = taum - taueps ; } } if ( fabs ( taui1 - taum ) < taueps ) { taum = taui1 - taueps ; } } else if ( taum - taui2 < taueps ) { taum = taui2 + taueps ; } return 0; } static double _hoc_fixprecondition(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; fixprecondition ( _p, _ppvar, _thread, _nt ); return(_r); } static int factors ( _threadargsproto_ ) { double _ltp ; ke = 1.0 / taue ; ki1 = 1.0 / taui1 ; ki2 = 1.0 / taui2 ; km = 1.0 / taum ; _ltp = log ( km / ke ) / ( km - ke ) ; be = 1.0 / ( exp ( - km * _ltp ) - exp ( - ke * _ltp ) ) ; ae = be * ( ke - km ) ; _ltp = log ( ki2 / ki1 ) / ( ki2 - ki1 ) ; bi1 = 1.0 / ( exp ( - ki2 * _ltp ) - exp ( - ki1 * _ltp ) ) ; ai1 = bi1 * ( ki1 - ki2 ) ; e = 0.0 ; i1 = 1.0 ; i2 = 0.0 ; m = 0.0 ; bi2 = 1.0 ; ai2 = bi2 * ( ki2 - km ) ; a = bi2 * bi1 ; b = a * ( ki2 - km ) / ( ki1 - km ) ; _ltp = search ( _threadargs_ ) ; newstates ( _threadargscomma_ _ltp ) ; bi2 = 1.0 / mnew ; ai2 = bi2 * ( ki2 - km ) ; a = bi2 * bi1 ; b = a * ( ki2 - km ) / ( ki1 - km ) ; newstates ( _threadargscomma_ _ltp ) ; i1 = 0.0 ; return 0; } static double _hoc_factors(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; factors ( _p, _ppvar, _thread, _nt ); return(_r); } double deriv ( _threadargsprotocomma_ double _ld ) { double _lderiv; _lderiv = ( - km * exp ( - _ld * km ) + ki2 * exp ( - _ld * ki2 ) ) / ( ki2 - km ) - ( ( - km * exp ( - _ld * km ) + ki1 * exp ( - _ld * ki1 ) ) ) / ( ki1 - km ) ; return _lderiv; } static double _hoc_deriv(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = deriv ( _p, _ppvar, _thread, _nt, *getarg(1) ); return(_r); } double search ( _threadargsproto_ ) { double _lsearch; double _lx , _lt1 , _lt2 ; _lt1 = 1.0 ; flag = 0.0 ; if ( deriv ( _threadargscomma_ _lt1 ) < 0.0 ) { while ( deriv ( _threadargscomma_ _lt1 ) < 0.0 && _lt1 > 1e-9 ) { _lt2 = _lt1 ; _lt1 = _lt1 / 10.0 ; } if ( deriv ( _threadargscomma_ _lt1 ) < 0.0 ) { printf ( "Error wrong deriv(t1): t1=%g deriv(t1)=%g\n" , _lt1 , deriv ( _threadargscomma_ _lt1 ) ) ; flag = 1.0 ; _lsearch = 1e-9 ; } } else { _lt2 = _lt1 ; while ( deriv ( _threadargscomma_ _lt2 ) > 0.0 && _lt2 < 1e9 ) { _lt1 = _lt2 ; _lt2 = _lt2 * 10.0 ; } if ( deriv ( _threadargscomma_ _lt2 ) > 0.0 ) { printf ( "Error wrong deriv(t2): t2=%g deriv(t2)=%g\n" , _lt2 , deriv ( _threadargscomma_ _lt2 ) ) ; flag = 1.0 ; _lsearch = 1e9 ; } } while ( _lt2 - _lt1 > 1e-6 && flag == 0.0 ) { _lsearch = ( _lt1 + _lt2 ) / 2.0 ; _lx = deriv ( _threadargscomma_ _lsearch ) ; if ( _lx > 0.0 ) { _lt1 = _lsearch ; } else { _lt2 = _lsearch ; } } return _lsearch; } static double _hoc_search(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = search ( _p, _ppvar, _thread, _nt ); return(_r); } static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt; _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; if (_lflag == 1. ) {*(_tqitem) = 0;} { newstates ( _threadargscomma_ t - t0 ) ; update ( _threadargs_ ) ; if ( m > 1.0 - eps ) { net_event ( _pnt, t ) ; m = 0.0 ; } if ( _lflag == 1.0 ) { nself = nself + 1.0 ; artcell_net_send ( _tqitem, _args, _pnt, t + firetimebound ( _threadargs_ ) , 1.0 ) ; } else { if ( _args[0] > 0.0 ) { nexcite = nexcite + 1.0 ; e = e + _args[0] ; } else { ninhibit = ninhibit + 1.0 ; i1 = i1 + _args[0] ; } artcell_net_move ( _tqitem, _pnt, firetimebound ( _threadargs_ ) + t ) ; } } } double firetimebound ( _threadargsproto_ ) { double _lfiretimebound; double _lslope ; _lslope = - km * m + ae * e + ai2 * i2 ; if ( _lslope <= 1e-9 ) { _lfiretimebound = 1e9 ; } else { _lfiretimebound = ( 1.0 - m ) / _lslope ; } return _lfiretimebound; } static double _hoc_firetimebound(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = firetimebound ( _p, _ppvar, _thread, _nt ); return(_r); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { fixprecondition ( _threadargs_ ) ; factors ( _threadargs_ ) ; e = 0.0 ; i1 = 0.0 ; i2 = 0.0 ; m = 0.0 ; t0 = t ; artcell_net_send ( _tqitem, (double*)0, _ppvar[1]._pvoid, t + firetimebound ( _threadargs_ ) , 1.0 ) ; nself = 0.0 ; nexcite = 0.0 ; ninhibit = 0.0 ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v=_v; { }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/intfire4.mod000077500000000000000000000255301323325274500170440ustar00rootroot00000000000000COMMENT Authors: Original (taum > taui2 > taui1 > taue) : M. Hines and N.T. Carnevale Improved (taui2 > taue and taui2 > taui1): R.A.J. van Elburg Artificial cell with fast exponential decay excitatory current and slower alpha function like inhibitory current and arbitrary membrane time constant. Fires when membrane state = 1. On firing, only the membrane state returns to 0 Although the four states, e, i1, i2, m are available, plotting will be more pleasing if one uses the function E, I, and M Fast excitatory current, E(t), has single exponential decay with time constant, taue. Slower inhibitory current, I2(t), is alpha function like and has two time contants, taui1 and taui2. The leaky integrator membrane has time constant taum. The total current is the input to this integrator. Cell fires when state m passes 1 and after firing, m = 0. Require taui2 > taue and taui2 > taui1 or in other words ki1 > ki2 and ke > ki2 States are normalized so that an excitatory weight of 1 produces a maximum e of 1 and a maximum m of 1 Also an inhibitory weight of -1 produces a maximum i2 of -1 and a maximum m of -1. Basic equations: dE(t)/dt = -ke*E(t) dI1(t)/dt = -ki1*I1(t) dI2(t)/dt = -ki2*I2(t) + ai1*I1(t) dM(t)/dt = -km*M(t) + ae*E(t) + ai2*I2(t) The initial conditions are e, i1, i2, and m The analytic solution is E(t) = e*exp(-ke*t) I1(t) = i1*exp(-ki1*t) I2(t) = i2*exp(-ki2*t) + bi1*i1*(exp(-ki2*t) - exp(-ki1*t)) M(t) = m * exp(-km*t) + be*e*(exp(-km*t) - exp(-ke*t)) + bi2*i2*(exp(-km*t) - exp(-ki2*t)) + bi2*bi1*i1 * (exp(-km*t) - exp(-ki2*t)) - bi2*bi1*i1*(ki2 - km)/(ki1 - km)*(exp(-km*t) - exp(-ki1*t)) The derivation of a lower bound on the first passage time based on Newton iteration is possible if we assume that taue<=taui2, i.e. that the inhibition outlasts excitation. The validity of the Newton iteration for setting a lower bound on threshold passage time follows from a physical analysis of the different contributing currents. The parameters taui1 are involved in controlling the time course of the growth of the inhibitory current. Therefore the taui1 associated current contributes to a growth of inhibition and can be ignored when trying to find a lower bound for the threshold passage time because it contributes only to its delay. The other contributions to the membrane potential change are the leak current associated with the membrane time constant taum and the exponentially decaying (parts) of the synaptic currents. The leak current is maximal close to threshold and can therefore only grow when approaching threshold. So if we use the present value in a calculation of threshold passage time while we are approaching threshold we will underestimate threshold passage time. The exponentially decaying (parts) of the synaptic currents consist of an excitatory and an inhibitory part, if we assume taue taui1 = 10 (ms) <0,1e9> taui2 = 20 (ms) <0,1e9> taum = 50 (ms) <0,1e9> ib = 0 eps = 1e-6 <1e-9,0.01> taueps = 0.01 <1e-9,1e9> } ASSIGNED { e i1 i2 m enew i1new i2new mnew t0 (ms) nself nexcite ninhibit ke (1/ms) ki1 (1/ms) ki2 (1/ms) km (1/ms) ae (1/ms) ai1 (1/ms) ai2 (1/ms) be bi1 bi2 a b tau_swap (ms) flag (1) } PROCEDURE newstates(d(ms)) { LOCAL ee, ei1, ei2, em ee = exp(-ke*d) ei1 = exp(-ki1*d) ei2= exp(-ki2*d) em = exp(-km*d) enew = e*ee i1new = i1*ei1 i2new = i2*ei2 + bi1*i1*(ei2 - ei1) mnew = m*em + be*e*(em - ee) + (bi2*i2 + a*i1)*(em - ei2) - b*i1*(em - ei1) } FUNCTION M() { newstates(t - t0) M = mnew } FUNCTION E() { newstates(t - t0) E = ae*enew } FUNCTION I() { newstates(t - t0) I = ai2*i2new } PROCEDURE update() { e = enew i1 = i1new i2 = i2new m = mnew t0 = t } PROCEDURE fixprecondition() { : and force assertion for correctness of algorithm : Preconditions: : taue < taui2 : taui1 < taui2 : To avoid division by zero errors, the need for alpha function [x*exp(-x)] : solutions and poor convergence we also impose : fabs(taux-tauy) >= taueps : The checks on the preconditions can lead to 3 consecutive shifts in taum : and a smaller number of shifts in the other parameters to prevent this : shift from bringing taum at or below zero we need to ensure : that we keep sufficient distance from zero. if(taui2 < 4*taueps){ taui2=4*taueps } if(taui1 < 3*taueps){ taui1=3*taueps } if(taue < 2*taueps){ taue=2*taueps } : taue < taui2 if (taue > taui2) { tau_swap=taue taue = taui2 - taueps printf("Warning: Adjusted taue from %g to %g to ensure taue < taui2\n",tau_swap,taue) } else if (taui2-taue < taueps){ taue = taui2 - taueps } : taui1 < taui2, after this taui2 is fixed if (taui1 > taui2) { tau_swap=taui2 taui2=taui1 taui1=tau_swap printf("Warning: Swapped taui1 and taui2\n") } : Avoid division by zero errors and poor convergence and impose : fabs(taux-tauy) >= taueps if (taui2-taui1 < taueps){ : taui1 < taui2 --> taui2-taui1 is positive taui1 = taui2 - taueps } if (taum <= taui2) { if (taui2 -taum < taueps){ : (taum <= taui2) --> taui2 -taum is positive definite taum=taui2-taueps } if (fabs(taui1 -taum) < taueps){ taum=taui1-taueps } if (fabs(taui1 -taum) < taueps){ if(taui1 -taum < 0){ taum=taui1-taueps } else{ taui1=taum-taueps } } if (fabs(taue -taum) < taueps){ if(taue -taum < 0){ taum=taue-taueps } else{ taue=taum-taueps } } if (fabs(taui1 -taum) < taueps){ taum=taui1-taueps } } else if (taum-taui2 < taueps){ : (taum > taui2) --> taum -taui2 is positive taum=taui2+taueps } } PROCEDURE factors() { LOCAL tp ke=1/taue ki1=1/taui1 ki2=1/taui2 km=1/taum : normalize so the peak magnitude of m is 1 when single e of 1 tp = log(km/ke)/(km - ke) be = 1/(exp(-km*tp) - exp(-ke*tp)) ae = be*(ke - km) :printf("INITIAL be=%g tp=%g \n", be, tp) : normalize so the peak magnitude of i2 is 1 when single i of 1 tp = log(ki2/ki1)/(ki2 - ki1) bi1 = 1/(exp(-ki2*tp) - exp(-ki1*tp)) ai1 = bi1*(ki1 - ki2) :printf("INITIAL bi1=%g tp=%g \n", bi1, tp) : normalize so the peak magnitude of m is 1 when single i of 1 : first set up enough so we can use newstates() e = 0 i1 = 1 i2 = 0 m = 0 bi2 = 1 ai2 = bi2*(ki2 - km) a = bi2*bi1 b = a*(ki2 - km)/(ki1 - km) :find the 0 of dm/dt tp = search() : now compute normalization factor and reset constants that depend on it newstates(tp) bi2 = 1/mnew ai2 = bi2*(ki2 - km) a = bi2*bi1 b = a*(ki2 - km)/(ki1 - km) : now newstates(tp) should set mnew=1 newstates(tp) :printf("INITIAL bi2=%g tp=%g mnew=%g\n", bi2, tp, mnew) i1 = 0 } FUNCTION deriv(d(ms)) (/ms2) { : proportional, not exact derivative but sign true (provided ki1 > ki2) deriv= ( - km *exp( - d*km ) + ki2*exp( - d*ki2))/(ki2 - km) -(( - km*exp( - d*km) + ki1*exp( - d*ki1)))/(ki1 - km ) } FUNCTION search() (ms) { LOCAL x, t1, t2 : should only do this when tau's change : exponential search for two initial t values for the chord search one factor : of 10 separated, with the low value t1 before (deriv(t1) < 0) and the high : value t2 after (deriv(t2) > 0) the extremal reached by m due to an isolated : i1 current. For this calculation the i1 current is taken to be depolarizing : and therefore the extremum is actually a maximum. During the simulation i1 is : constrained to be hyperpolarizing and then the extremum will be a minimum : occuring at the same location. t1=1 flag=0 if(deriv(t1) < 0 ){ while ( deriv(t1) < 0 && t1>1e-9 ){ t2=t1 t1=t1/10 } if (deriv(t1) < 0) { printf("Error wrong deriv(t1): t1=%g deriv(t1)=%g\n", t1, deriv(t1)) flag=1 search = 1e-9 } }else{ t2=t1 while (deriv(t2) > 0 && t2<1e9 ){ t1=t2 t2=t2*10 } if (deriv(t2) > 0) { printf("Error wrong deriv(t2): t2=%g deriv(t2)=%g\n", t2, deriv(t2)) flag=1 search = 1e9 } } : printf("search t1=%g x1=%g t2=%g x2=%g\n", t1, deriv(t1), t2, deriv(t2)) : chord search for the maximum in m(t) while (t2 - t1 > 1e-6 && flag==0) { search = (t1+t2)/2 x = deriv(search) if (x > 0) { t1 = search }else{ t2 = search } :printf("search t1=%g x1=%g t2=%g x2=%g\n", t1, deriv(t1), t2, deriv(t2)) } } INITIAL { fixprecondition() factors() e = 0 i1 = 0 i2 = 0 m = 0 t0 = t net_send(firetimebound(), 1) nself=0 nexcite=0 ninhibit=0 } NET_RECEIVE (w) { newstates(t-t0) update() :printf("event %g t=%g e=%g i1=%g i2=%g m=%g\n", flag, t, e, i1, i2, m) if (m > 1-eps) { : time to fire :printf("fire\n") net_event(t) m = 0 } if (flag == 1) { :self event nself = nself + 1 net_send(firetimebound(), 1) }else{ if (w > 0) { nexcite = nexcite + 1 e = e + w }else{ ninhibit = ninhibit + 1 i1 = i1 + w } :printf("w=%g e=%g i1=%g\n", w, e, i1) net_move(firetimebound() + t) } } FUNCTION firetimebound() (ms) { LOCAL slope slope = -km*m + ae*e + ai2*i2 if (slope <= 1e-9) { firetimebound = 1e9 }else{ firetimebound = (1 - m)/slope } } neuron-7.5/src/nrnoc/ldifus.c000077500000000000000000000325641323325274500162560ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include "section.h" #include "membfunc.h" #include "neuron.h" #include "nrniv_mf.h" #include "parse.h" #define nt_t nrn_threads->_t #define nt_dt nrn_threads->_dt extern int diam_change_cnt; extern int structure_change_cnt; typedef struct LongDifus { int dchange; int* mindex; /* index into memb_list[m] */ int* pindex; /* parent in this struct */ double** state; double* a; double* b; double* d; double* rhs; double* af; /* efficiency benefit is very low, rall/dx^2 */ double* bf; /* 1/dx^2 */ double* vol; /* volatile volume from COMPARTMENT */ double* dc; /* volatile diffusion constant * cross sectional area from LONGITUDINAL_DIFFUSION */ }LongDifus; typedef struct LongDifusThreadData { int nthread; LongDifus** ldifus; Memb_list** ml; }LongDifusThreadData; static int ldifusfunccnt; static ldifusfunc_t* ldifusfunc; static ldifusfunc2_t stagger, ode, matsol, overall_setup; void hoc_register_ldifus1(ldifusfunc_t f) { ldifusfunc = (ldifusfunc_t*)erealloc(ldifusfunc, (ldifusfunccnt + 1)*sizeof(ldifusfunc_t) ); ldifusfunc[ldifusfunccnt] = f; ++ldifusfunccnt; } #if MAC /* this avoids a missing _ptrgl12 in the mac library that was called by the MrC compiled object */ void mac_difusfunc(ldifusfunc2_t* f, int m, ldifusfunc3_t diffunc, void** v, int ai, int sindex, int dindex, NrnThread* nt) { (*f)(m, diffunc, v, ai, sindex, dindex, nt); } #endif void nrn_tree_solve(double* a, double* d, double* b, double* rhs, int* pindex, int n) { /* treesolver a - above the diagonal d - diagonal b - below the diagonal rhs - right hand side, which is changed to the result pindex - parent indices n - number of states */ int i; /* triang */ for (i = n - 1; i > 0; --i) { int pin = pindex[i]; if (pin > -1) { double p; p = a[i] / d[i]; d[pin] -= p * b[i]; rhs[pin] -= p * rhs[i]; } } /* bksub */ for (i = 0; i < n; ++i) { int pin = pindex[i]; if (pin > -1) { rhs[i] -= b[i] * rhs[pin]; } rhs[i] /= d[i]; } } void long_difus_solve(int method, NrnThread* nt) { ldifusfunc2_t* f = NULL; int i; if (ldifusfunc) { switch (method) { case 0: /* normal staggered time step */ f = stagger; break; case 1: /* dstate = f(state) */ f = ode; break; case 2: /* solve (1 + dt*jacobian)*x = b */ f = matsol; break; case 3: /* setup only called by thread 0 */ f = overall_setup; break; } assert(f); for (i=0; i < ldifusfunccnt; ++i) { (*ldifusfunc[i])(f, nt); } } } static void longdifusfree(LongDifus** ppld) { if (*ppld) { LongDifus* pld = *ppld; #if 0 printf("free longdifus structure_change=%d %d\n", pld->schange, structure_change_cnt); #endif free (pld->mindex); free (pld->pindex); free (pld->state); free (pld->a); free (pld->b); free (pld->d); free (pld->rhs); free (pld->af); free (pld->bf); free (pld->vol); free (pld->dc); free(pld); } *ppld = (LongDifus*)0; } static void longdifus_diamchange(LongDifus* pld, int m, int sindex, Memb_list* ml, NrnThread* _nt) { int i, n, mi, mpi, j, index, pindex, vnodecount; Node* nd, *pnd; double rall, dxp, dxc; if (pld->dchange == diam_change_cnt) { return; } /*printf("longdifus_diamchange %d %d\n", pld->dchange, diam_change_cnt);*/ vnodecount = _nt->end; n = ml->nodecount; for (i=0; i < n; ++i) { /* For every child with a parent having this mechanism */ /* Also child may butte end to end with parent or attach to middle */ mi = pld->mindex[i]; if (sindex < 0) { pld->state[i] = ml->pdata[mi][-sindex - 1].pval; }else{ pld->state[i] = ml->data[mi] + sindex; } nd = ml->nodelist[mi]; pindex = pld->pindex[i]; if (pindex > -1) { mpi = pld->mindex[pindex]; pnd = ml->nodelist[mpi]; if (nd->sec_node_index_ == 0) { rall = nd->sec->prop->dparam[4].val; }else{ rall = 1.; } dxc = section_length(nd->sec) / ((double)(nd->sec->nnode - 1)); dxp = section_length(pnd->sec) / ((double)(pnd->sec->nnode - 1)); pld->af[i] = 2*rall/dxp/(dxc + dxp); pld->bf[i] = 2/dxc/(dxc + dxp); } } pld->dchange = diam_change_cnt; } static void longdifusalloc(LongDifus** ppld, int m, int sindex, Memb_list* ml, NrnThread* _nt) { LongDifus* pld; int i, n, mi, mpi, j, index, pindex, vnodecount; int* map, *omap; Node* nd, *pnd; hoc_Item* qsec; vnodecount = _nt->end; *ppld = pld = (LongDifus*)emalloc(sizeof(LongDifus)); n = ml->nodecount; pld->dchange = 0; pld->mindex = (int*)ecalloc(n, sizeof(int)); pld->pindex = (int*)ecalloc(n, sizeof(int)); pld->state = (double**)ecalloc(n, sizeof(double*)); pld->a = (double*)ecalloc(n, sizeof(double)); pld->b = (double*)ecalloc(n, sizeof(double)); pld->d = (double*)ecalloc(n, sizeof(double)); pld->rhs = (double*)ecalloc(n, sizeof(double)); pld->af = (double*)ecalloc(n, sizeof(double)); pld->bf = (double*)ecalloc(n, sizeof(double)); pld->vol = (double*)ecalloc(n, sizeof(double)); pld->dc = (double*)ecalloc(n, sizeof(double)); /* make a map from node_index to memb_list index. -1 means no exist*/ map = (int*)ecalloc(vnodecount, sizeof(int)); omap = (int*)ecalloc(n, sizeof(int)); for (i=0; i < vnodecount; ++i) { map[i] = -1; } for (i=0; i < n; ++i) { map[ml->nodelist[i]->v_node_index] = i; } #if 0 for (i=0; i < vnodecount; ++i) { printf("%d index=%d\n", i, map[i]); } #endif /* order the indices for efficient gaussian elimination */ /* But watch out for 0 area nodes. Use the parent of parent */ /* But if parent of parent does not have diffusion mechanism check the parent section */ /* And watch out for root. Use first node of root section */ for (i=0, j=0; i < vnodecount; ++i) { if (map[i] > -1) { pld->mindex[j] = map[i]; omap[map[i]] = j; /* from memb list index to order */ pnd = _nt->_v_parent[i]; pindex = map[pnd->v_node_index]; if (pindex == -1) {/* maybe this was zero area node */ pnd = _nt->_v_parent[pnd->v_node_index]; if (pnd) { pindex = map[pnd->v_node_index]; if (pindex < 0) { /* but what about the parent section */ Section* psec = _nt->_v_node[i]->sec->parentsec; if (psec) { pnd = psec->pnode[0]; pindex = map[pnd->v_node_index]; } } }else{ /* maybe this section is not the root */ Section* psec = _nt->_v_node[i]->sec->parentsec; if (psec) { pnd = psec->pnode[0]; pindex = map[pnd->v_node_index]; } } } if (pindex > -1) { pld->pindex[j] = omap[pindex]; }else{ pld->pindex[j] = -1; } ++j; } } longdifus_diamchange(pld, m, sindex, ml, _nt); #if 0 for (i=0; i < n; ++i) { printf("i=%d pin=%d mi=%d :%s node %d state[(%i)]=%g\n", i, pld->pindex[i], pld->mindex[i], secname(ml->nodelist[pld->mindex[i]]->sec), ml->nodelist[pld->mindex[i]]->sec_node_index_ , sindex, pld->state[i][0]); } #endif free(map); free(omap); } /* called at end of v_setup_vectors only for thread 0 */ /* only v makes sense and the purpose is to free the old, allocate space */ /* for the new, and setup the tml field */ /* the args used are m and v */ static void overall_setup(int m, ldifusfunc3_t diffunc, void** v, int ai, int sindex, int dindex, NrnThread* _nt) { int i; LongDifusThreadData** ppldtd = (LongDifusThreadData**)v; LongDifusThreadData* ldtd = *ppldtd; if (ldtd) { /* free the whole thing */ free((char*)ldtd->ml); for (i=0; i < ldtd->nthread; ++i) { if (ldtd->ldifus[i]) { longdifusfree(ldtd->ldifus + i); } } free((char*)ldtd->ldifus); free((char*)ldtd); *ppldtd = (LongDifusThreadData*)0; } /* new overall space */ *ppldtd = (LongDifusThreadData*)emalloc(sizeof(LongDifusThreadData)); ldtd = *ppldtd; ldtd->nthread = nrn_nthread; ldtd->ldifus = (LongDifus**)ecalloc(nrn_nthread, sizeof(LongDifus*)); ldtd->ml = (Memb_list**)ecalloc(nrn_nthread, sizeof(Memb_list*)); /* which have memb_list pointers */ for (i=0; i < nrn_nthread; ++i) { NrnThreadMembList* tml; for (tml = nrn_threads[i].tml; tml; tml = tml->next) { if (tml->index == m) { ldtd->ml[i] = tml->ml; longdifusalloc(ldtd->ldifus + i, m, sindex, tml->ml, nrn_threads + i); break; } } } } static LongDifus* v2ld(void** v, int tid) { LongDifusThreadData** ppldtd = (LongDifusThreadData**)v; return (*ppldtd)->ldifus[tid]; } static Memb_list* v2ml(void** v, int tid) { LongDifusThreadData** ppldtd = (LongDifusThreadData**)v; return (*ppldtd)->ml[tid]; } static void stagger(int m, ldifusfunc3_t diffunc, void** v, int ai, int sindex, int dindex, NrnThread* _nt) { LongDifus* pld; int i, n, di; double dc, vol, dfdi, dx; double** data; Datum** pdata; Datum* thread; Memb_list* ml; di = dindex + ai; pld = v2ld(v, _nt->id); if(!pld) return; ml = v2ml(v, _nt->id); n = ml->nodecount; data = ml->data; pdata = ml->pdata; thread = ml->_thread; longdifus_diamchange(pld, m, sindex, ml, _nt); /*flux and volume coefficients (if dc is constant this is too often)*/ for (i=0; i < n; ++i) { int pin = pld->pindex[i]; int mi = pld->mindex[i]; pld->dc[i] = (*diffunc)(ai, data[mi], pdata[mi], pld->vol+i, &dfdi, thread, _nt); pld->d[i] = 0.; #if 0 if (dfdi) { pld->d[i] += fabs(dfdi)/pld->vol[i]/pld->state[i][ai]; } #endif if (pin > -1) { /* D * area between compartments */ dc = (pld->dc[i] + pld->dc[pin])/2.; pld->a[i] = -pld->af[i] * dc / pld->vol[pin]; pld->b[i] = -pld->bf[i] * dc / pld->vol[i]; } } /* setup matrix */ for (i=0; i < n; ++i) { int pin = pld->pindex[i]; int mi = pld->mindex[i]; pld->d[i] += 1./nt_dt; pld->rhs[i] = pld->state[i][ai]/nt_dt; if (pin > -1) { pld->d[i] -= pld->b[i]; pld->d[pin] -= pld->a[i]; } } #if 0 for (i=0; i < n; ++i) { double a,b; if (pld->pindex[i] > -1) { a = pld->a[i]; b = pld->b[i]; }else{ a=b=0.;} printf("i=%d a=%g b=%g d=%g rhs=%g state=%g\n", i, a, b, pld->d[i], pld->rhs[i], pld->state[i][ai]); } #endif /* we've set up the matrix; now solve it */ nrn_tree_solve(pld->a, pld->d, pld->b, pld->rhs, pld->pindex, n); /* update answer */ for (i=0; i < n; ++i) { pld->state[i][ai] = pld->rhs[i]; } } static void ode(int m, ldifusfunc3_t diffunc, void** v, int ai, int sindex, int dindex, NrnThread* _nt) { LongDifus* pld; int i, n, di; double dc, vol, dfdi; double** data; Datum** pdata; Datum* thread; Memb_list* ml; di = dindex + ai; pld = v2ld(v, _nt->id); if(!pld) return; ml = v2ml(v, _nt->id); n = ml->nodecount; data = ml->data; pdata = ml->pdata; thread = ml->_thread; longdifus_diamchange(pld, m, sindex, ml, _nt); /*flux and volume coefficients (if dc is constant this is too often)*/ for (i=0; i < n; ++i) { int pin = pld->pindex[i]; int mi = pld->mindex[i]; pld->dc[i] = (*diffunc)(ai, data[mi], pdata[mi], pld->vol+i, &dfdi, thread, _nt); if (pin > -1) { /* D * area between compartments */ dc = (pld->dc[i] + pld->dc[pin])/2.; pld->a[i] = pld->af[i] * dc / pld->vol[pin]; pld->b[i] = pld->bf[i] * dc / pld->vol[i]; } } /* add terms to diffeq */ for (i=0; i < n; ++i) { double dif; int pin = pld->pindex[i]; int mi = pld->mindex[i]; #if 0 pld->d[i] = data[mi][di]; #endif if (pin > -1) { dif = (pld->state[pin][ai] - pld->state[i][ai]); data[mi][di] += dif*pld->b[i]; data[pld->mindex[pin]][di] -= dif*pld->a[i]; } } #if 0 for (i=0; i < n; ++i) { int mi = pld->mindex[i]; printf("%d olddstate=%g new=%g\n", i, pld->d[i], data[mi][di]); } #endif } static void matsol(int m, ldifusfunc3_t diffunc, void** v, int ai, int sindex, int dindex, NrnThread* _nt) { LongDifus* pld; int i, n, di; double dc, vol, dfdi; double** data; Datum** pdata; Datum* thread; Memb_list* ml; di = dindex + ai; pld = v2ld(v, _nt->id); if(!pld) return; ml = v2ml(v, _nt->id); n = ml->nodecount; data = ml->data; pdata = ml->pdata; thread = ml->_thread; /*flux and volume coefficients (if dc is constant this is too often)*/ for (i=0; i < n; ++i) { int pin = pld->pindex[i]; int mi = pld->mindex[i]; pld->dc[i] = (*diffunc)(ai, data[mi], pdata[mi], pld->vol+i, &dfdi, thread, _nt); pld->d[i] = 0.; if (dfdi) { pld->d[i] += fabs(dfdi)/pld->vol[i]/pld->state[i][ai]; #if 0 printf("i=%d state=%g vol=%g dfdc=%g\n", i, pld->state[i][ai],pld->vol[i], pld->d[i]); #endif } if (pin > -1) { /* D * area between compartments */ dc = (pld->dc[i] + pld->dc[pin])/2.; pld->a[i] = -pld->af[i] * dc / pld->vol[pin]; pld->b[i] = -pld->bf[i] * dc / pld->vol[i]; } } /* setup matrix */ for (i=0; i < n; ++i) { int pin = pld->pindex[i]; int mi = pld->mindex[i]; pld->d[i] += 1./nt_dt; pld->rhs[i] = data[mi][di]/nt_dt; if (pin > -1) { pld->d[i] -= pld->b[i]; pld->d[pin] -= pld->a[i]; } } #if 0 for (i=0; i < n; ++i) { double a,b; int mi = pld->mindex[i]; if (pld->pindex[i] > -1) { a = pld->a[i]; b = pld->b[i]; }else{ a=b=0.;} printf("i=%d a=%g b=%g d=%g rhs=%g dstate=%g\n", i, a, b, pld->d[i], pld->rhs[i], data[mi][di]); } #endif /* triang */ for (i = n - 1; i > 0; --i) { int pin = pld->pindex[i]; if (pin > -1) { double p; p = pld->a[i] / pld->d[i]; pld->d[pin] -= p * pld->b[i]; pld->rhs[pin] -= p * pld->rhs[i]; } } /* bksub */ for (i=0; i < n; ++i) { int pin = pld->pindex[i]; if (pin > -1) { pld->rhs[i] -= pld->b[i] * pld->rhs[pin]; } pld->rhs[i] /= pld->d[i]; } /* update answer */ for (i=0; i < n; ++i) { int mi = pld->mindex[i]; data[mi][di] = pld->rhs[i]; } } neuron-7.5/src/nrnoc/md1redef.h000077500000000000000000000011521323325274500164510ustar00rootroot00000000000000#ifndef nmodl1_redef_h #define nmodl1_redef_h #define v _v #define area _area #define thisnode _thisnode #define GC _GC #define EC _EC #define extnode _extnode #define xain _xain #define xbout _xbout #define i _i #define sec _sec #undef Memb_list #undef nodelist #undef nodeindices #undef data #undef pdata #undef prop #undef nodecount #undef type #define NrnThread _NrnThread #define Memb_list _Memb_list #define nodelist _nodelist #define nodeindices _nodeindices #define data _data #define pdata _pdata #define prop _prop #define nodecount _nodecount #define type _type #define pval _pval #define id _id #endif neuron-7.5/src/nrnoc/md2redef.h000077500000000000000000000005131323325274500164520ustar00rootroot00000000000000#ifndef nmodl2_redef_h #define nmodl2_redef_h #undef v #undef area #undef thisnode #undef GC #undef EC #undef extnode #undef xain #undef xbout #undef i #undef sec #undef NrnThread #undef Memb_list #undef nodelist #undef nodeindices #undef data #undef pdata #undef prop #undef nodecount #undef pval #undef type #undef id #endif neuron-7.5/src/nrnoc/membdef.h000077500000000000000000000055131323325274500163660ustar00rootroot00000000000000/* /local/src/master/nrn/src/nrnoc/membdef.h,v 1.2 1995/02/13 20:20:42 hines Exp */ /* numerical parameters */ #define DEF_nseg 1 /* default number of segments per section*/ #define DEF_dt .025 /* ms */ #define DEF_secondorder 0 /* >0 means crank-nicolson. 2 means current adjusted to t+dt/2 */ /*global parameters */ #define DEF_Ra 35.4 /* ohm-cm */ /*changed from 34.5 on 1/6/95*/ #define DEF_celsius 6.3 /* deg-C */ #define DEF_vrest -65. /* mV */ #if SEJNOWSKI /* fsyn/fcon */ #define DEF_spikethresh -10. /* mV (fcon) */ #define DEF_tablesize 200 /* size of lookup table for alpha fxns (both) */ #define DEF_max_syn 10000 /* max synapses per fsyn call */ #define DEF_max_con 1000 /* sqrt of max connectivity for fcon */ #define MIN_DELAY .5 /* min delay for randomly generated delays (fcon) */ #define MIN_GMAX 0. /* min gmax for randomly generated gmax (both) */ #define MIN_ISI 1.0 /* min interval between syn activation (msec) (both) */ #define QLEN 10 /* max number of spikes in epspq (fcon) */ /* for use with flag() */ #define SYN_TYPE_FLAG (int)1 /* Stimulus type (fsyn) */ #define TRAIN_FLAG (int)2 /* Stimulus train (fsyn) */ #define DENSE_FLAG (int)1 /* Randomize pre, post or both (fcon) */ #define SELF_CON_FLAG (int)2 /* Allow for self connections (fcon) */ #define CON_TYPE_FLAG (int)3 /* Stimulus type (fcon) */ /* used by parameter dump when dump_flag == 1. (see pdump.c) */ #define LINE_LEN 78 /* line length */ #define IFSEC_INDENT 4 /* how far to indent ifsec */ #define MECH_INDENT 22 /* how far from begin of line to indent mechs */ #define MAX_BLANK MECH_INDENT + 10 /* max blanks stored for use in indenting */ #endif /* old point process parameters */ /* fclamp */ #define DEF_clamp_resist 1e-3 /* megohm */ /* Parameters that are used in mechanism _alloc() procedures */ /* cable */ #define DEF_L 100. /* microns */ #define DEF_rallbranch 1. /* morphology */ #define DEF_diam 500. /* microns */ /* capacitance */ #define DEF_cm 1. /* uF/cm^2 */ /* fast passive (e_p and g_p)*/ #define DEF_e DEF_vrest /* mV */ #define DEF_g 5.e-4 /* S/cm^2 */ /* na_ion */ #define DEF_nai 10. /* mM */ #define DEF_nao 140. /* mM */ #define DEF_ena (115. + DEF_vrest) /* mV */ /* k_ion */ #define DEF_ki 54.4 /* mM */ #define DEF_ko 2.5 /* mM */ #define DEF_ek (-12. + DEF_vrest) /* mV */ /* ca_ion -> any program that uses DEF_eca must include */ #define DEF_cai 5.e-5 /* mM */ #define DEF_cao 2. /* mM */ #include #define DEF_eca 12.5 *log(DEF_cao / DEF_cai) /* mV */ /* default ion values */ #define DEF_ioni 1. /* mM */ #define DEF_iono 1. /* mM */ #define DEF_eion 0. /* mV */ neuron-7.5/src/nrnoc/membfunc.h000077500000000000000000000052101323325274500165550ustar00rootroot00000000000000#ifndef nrn_memb_func_h #define nrn_memb_func_h #if defined(__cplusplus) extern "C" { #endif #include "nrnoc_ml.h" typedef Datum *(*Pfrpdat)(); typedef void(*Pvmi)(struct NrnThread*, Memb_list*, int); typedef void (*Pvmp)(Prop*); typedef int (*nrn_ode_count_t)(int); typedef void (*nrn_ode_map_t)(int, double**, double**, double*, Datum*, double*, int); typedef void (*nrn_ode_synonym_t)(int, double**, Datum**); /* eventually replace following with Pvmp */ typedef void (*nrn_bamech_t)(Node*, double*, Datum*, Datum*, struct NrnThread*); #define NULL_CUR (Pfri)0 #define NULL_ALLOC (Pfri)0 #define NULL_STATE (Pfri)0 #define NULL_INITIALIZE (Pfri)0 typedef struct Memb_func { Pvmp alloc; Pvmi current; Pvmi jacob; Pvmi state; Pvmi initialize; Pvmp destructor; /* only for point processes */ Symbol *sym; #if CVODE nrn_ode_count_t ode_count; nrn_ode_map_t ode_map; Pvmi ode_spec; Pvmi ode_matsol; nrn_ode_synonym_t ode_synonym; Pvmi singchan_; /* managed by kschan for variable step methods */ #endif int vectorized; int thread_size_; /* how many Datum needed in Memb_list if vectorized */ void (*thread_mem_init_)(Datum*); /* after Memb_list._thread is allocated */ void (*thread_cleanup_)(Datum*); /* before Memb_list._thread is freed */ void (*thread_table_check_)(double*, Datum*, Datum*, void*, int); void (*_update_ion_pointers)(Datum*); int is_point; void* hoc_mech; void (*setdata_)(struct Prop*); int* dparam_semantics; // for nrncore writing. } Memb_func; #define IMEMFAST -2 #define VINDEX -1 #define CABLESECTION 1 #define MORPHOLOGY 2 #define CAP 3 #if EXTRACELLULAR #define EXTRACELL 5 #endif #define nrnocCONST 1 #define DEP 2 #define STATE 3 /*See init.c and cabvars.h for order of nrnocCONST, DEP, and STATE */ #define BEFORE_INITIAL 0 #define AFTER_INITIAL 1 #define BEFORE_BREAKPOINT 2 #define AFTER_SOLVE 3 #define BEFORE_STEP 4 #define BEFORE_AFTER_SIZE 5 /* 1 more than the previous */ typedef struct BAMech { nrn_bamech_t f; int type; struct BAMech* next; } BAMech; extern BAMech** bamech_; extern Memb_func* memb_func; extern int n_memb_func; extern int* nrn_prop_param_size_; extern int* nrn_prop_dparam_size_; extern void hoc_register_prop_size(int type, int psize, int dpsize); #if VECTORIZE extern Memb_list* memb_list; /* for finitialize, order is same up through extracellular, then ions, then mechanisms that write concentrations, then all others. */ extern short* memb_order_; #endif #define NRNPOINTER 4 /* added on to list of mechanism variables.These are pointers which connect variables from other mechanisms via the _ppval array. */ #define _AMBIGUOUS 5 #if defined(__cplusplus) } #endif #endif /* nrn_memb_func_h */ neuron-7.5/src/nrnoc/method3.c000066400000000000000000000265511323325274500163270ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/method3.c,v 1.5 1999/07/08 14:25:03 hines Exp */ /* method3.c,v * Revision 1.5 1999/07/08 14:25:03 hines * Uniformly use section_length(sec) instead of sec->prop->dparam[2].val * and make sure it never returns <= 0 * Also avoid recursive error when error due to shape updating. * * Revision 1.4 1998/02/19 20:20:03 hines * several fields moved from memb_list to memb_func. * This was more convenient for local variable time step method * * Revision 1.3 1997/04/07 19:47:26 hines * PI now same everywhere * * Revision 1.2 1996/05/21 17:09:21 hines * Section now holds list of node pointers instead of vector of nodes. * This will be used later to allow changing nseg to not throw away node * information. This has been checked up through the level of the nrn/examples * files to verify that it produces the same results as the previous structure. * * Revision 1.1.1.1 1994/10/12 17:22:33 hines * NEURON 3.0 distribution * * Revision 4.25 1993/04/20 08:58:42 hines * rootsection no longer exists. section structure changed so * sec->parentnode is a Node*. sec->parentsec no longer changed but * kept the way user specified it. The function Section* nrn_trueparent(sec) * returns the section that used to be in parentsec after setup_topology() * was executed. no more inode_exact(Section** psec, double x)---has been * replaced by Node* node_exact(Section* sec, double x) * There is now a rootnode list. parentsec of a section which was not * connect'ed to anything has a parentsec of nil. One can now disconnect * and delete sections without otherwise changing user spec (except * point processes at ends may be moved or changed -- will be fixed later) * * Revision 4.4 93/01/06 09:44:45 hines * minor adjustments for cray c90 * * Revision 3.43 92/12/16 14:24:33 hines * Ra switched from global variable to section variable in which it can * take on different values in different sections. Similar to L. * No need to set diam_changed when Ra changed. * * Revision 3.35 92/10/27 12:09:50 hines * list.c list.h moved from nrnoc to oc * * Revision 3.21 92/10/08 10:24:42 hines * third order correct with _method3 = 3 and when more than 1 segment * per section and interior segments do not have point processes. * when not active then third order correct no matter what. * * Revision 3.17 92/09/30 16:52:59 hines * strength of stimuli requires area=100 for _method3 * * Revision 3.15 92/09/27 19:30:12 hines * set up for testing with 1-d cables. only first node sees G' and E' * dg and de set to 0 for all other nodes. Doesn't appear to be a difference * whether G' and E' are second order correct or not for HH cables. * * Revision 3.13 92/09/27 17:45:11 hines * non vectorized model descriptions with _method3 fill thisnode.GC,EC * instead of d,rhs when models are channel densities. * HH doesn't work too well with G' and E' as first order differences so * now it is zeroed. * * Revision 3.12 92/09/25 18:03:22 hines * for method3. now tested and working for transient passive cables. * but perhaps the equations could be written with better roundoff * error when dt is small * * Revision 3.11 92/09/24 17:03:42 hines * METHOD3 option. use with spatial_method(i) with i=0-3 * 0 is the default and is the normal neuron method with zero area nodes * at boundaries and branch points. * 1 is the standard method with half area nodes at boundaries * 2 is a modified second order method which weights by 2/12, 8/12, 2/12 * 3 is a third order correct method which weights by 1/12 10/12 1/12 * with the last three methods x = i/nnode with i=0 to nnode * methods 1 and 2 are at present quite inefficient since they use the * data structures of 3. * Works in steady state. not tested with dynamic simulations * At this time, discontinuities in parameters (except diameter) is * not handled well across nodes and all parameters are assumed to * be constant in interval between node and parent node. * Good deal of difficulty remains in managing values that change discontinuously * * Revision 1.1 92/09/24 11:26:31 hines * Initial revision * */ /* started from version 3.5 of treeset.c */ #include #include #include "section.h" #if METHOD3 && VECTORIZE #include "membfunc.h" #include "neuron.h" #include "parse.h" extern int diam_changed; extern int tree_changed; extern double chkarg(); extern double nrn_ra(); int _method3; int spatial_method() { int new_method; if (ifarg(1)) { new_method = (int)chkarg(1, 0., 3.); if (_method3 == 0 && new_method) { /* don't use last node */ tree_changed = 1; }else if (_method3 && new_method == 0) { /* need the last node */ tree_changed = 1; } if (_method3 != new_method) { _method3 = new_method; tree_changed = 1; diam_changed = 1; } _method3 = new_method; } hoc_retpushx((double) _method3); } /* When properties are allocated to nodes or freed, v_structure_change is set to 1. This means that the mechanism vectors need to be re-determined. */ extern int v_structure_change; extern int v_node_count; extern Node** v_node; extern Node** v_parent; extern int section_count; extern Section** secorder; method3_setup_tree_matrix() /* construct diagonal elements */ { int i; if (diam_changed) { recalc_diam(); } #if _CRAY #pragma _CRI ivdep #endif for (i = 0; i < v_node_count; ++i) { Node* nd = v_node[i]; NODED(nd) = 0.; NODERHS(nd) = 0.; nd->thisnode.GC = 0.; nd->thisnode.EC = 0.; } for (i=0; i < n_memb_func; ++i) if (memb_func[i].current && memb_list[i].nodecount) { if (memb_func[i].vectorized) { memb_func[i].current( memb_list[i].nodecount, memb_list[i].nodelist, memb_list[i].data, memb_list[i].pdata ); }else{ int j, count; Pfrd s = memb_func[i].current; Memb_list* m = memb_list + i; count = m->nodecount; if (memb_func[i].is_point) { for (j = 0; j < count; ++j) { Node* nd = m->nodelist[j]; NODERHS(nd) -= (*s)(m->data[j], m->pdata[j], &NODED(nd),nd->v); }; }else{ for (j = 0; j < count; ++j) { Node* nd = m->nodelist[j]; nd->thisnode.EC -= (*s)(m->data[j], m->pdata[j], &nd->thisnode.GC,nd->v); }; } } if (errno) { if (nrn_errno_check(i)) { hoc_warning("errno set during calculation of currents", (char*)0); } } } #if 0 && _CRAY #pragma _CRI ivdep #endif for (i=rootnodecount; i < v_node_count; ++i) { Node* nd2; Node* nd = v_node[i]; Node* pnd = v_parent[nd->v_node_index]; double dg, de, dgp, dep, fac; #if 0 if (i == rootnodecount) { printf("v0 %g vn %g jstim %g jleft %g jright %g\n", nd->v, pnd->v, nd->fromparent.current, nd->toparent.current, nd[1].fromparent.current); } #endif /* dg and de must be second order when used */ if ((nd2 = nd->toparent.nd2) != (Node*)0) { dgp = -(3*(pnd->thisnode.GC - pnd->thisnode.Cdt) - 4*(nd->thisnode.GC - nd->thisnode.Cdt) +(nd2->thisnode.GC - nd2->thisnode.Cdt))/2 ; dep = -(3*(pnd->thisnode.EC - pnd->thisnode.Cdt * pnd->v) - 4*(nd->thisnode.EC - nd->thisnode.Cdt * nd->v) +(nd2->thisnode.EC - nd2->thisnode.Cdt * nd2->v))/2 ; }else{ dgp = 0.; dep = 0.; } if ((nd2 = pnd->fromparent.nd2) != (Node*)0) { dg = -(3*(nd->thisnode.GC - nd->thisnode.Cdt) - 4*(pnd->thisnode.GC - pnd->thisnode.Cdt) +(nd2->thisnode.GC - nd2->thisnode.Cdt))/2 ; de = -(3*(nd->thisnode.EC - nd->thisnode.Cdt * nd->v) - 4*(pnd->thisnode.EC - pnd->thisnode.Cdt * pnd->v) +(nd2->thisnode.EC - nd2->thisnode.Cdt * nd2->v))/2 ; }else{ dg = 0.; de = 0.; } fac = 1. + nd->toparent.coefjdot * nd->thisnode.GC; nd->toparent.djdv0 = ( nd->toparent.coefj + nd->toparent.coef0 * nd->thisnode.GC + nd->toparent.coefdg * dg )/fac; NODED(nd) += nd->toparent.djdv0; nd->toparent.current = ( - nd->toparent.coef0 * nd->thisnode.EC - nd->toparent.coefn * pnd->thisnode.EC + nd->toparent.coefjdot * nd->thisnode.Cdt * nd->toparent.current - nd->toparent.coefdg * de )/fac; NODERHS(nd) -= nd->toparent.current; NODEB(nd) = ( - nd->toparent.coefj + nd->toparent.coefn * pnd->thisnode.GC )/fac; /* this can break cray vectors */ fac = 1. + nd->fromparent.coefjdot * pnd->thisnode.GC; nd->fromparent.djdv0 = ( nd->fromparent.coefj + nd->fromparent.coef0 * pnd->thisnode.GC + nd->fromparent.coefdg * dgp )/fac; pNODED(nd) += nd->fromparent.djdv0; nd->fromparent.current = ( - nd->fromparent.coef0 * pnd->thisnode.EC - nd->fromparent.coefn * nd->thisnode.EC + nd->fromparent.coefjdot * nd->thisnode.Cdt * nd->fromparent.current - nd->fromparent.coefdg * dep )/fac; pNODERHS(nd) -= nd->fromparent.current; NODEA(nd) = ( - nd->fromparent.coefj + nd->fromparent.coefn * nd->thisnode.GC )/fac; } activstim(); activsynapse(); #if SEJNOWSKI activconnect(); #endif activclamp(); } method3_axial_current() { int i; #if _CRAY #pragma _CRI ivdep #endif for (i=rootnodecount; i < v_node_count; ++ i) { Node* nd = v_node[i]; Node* pnd = v_parent[i]; nd->toparent.current += nd->toparent.djdv0 * nd->v + NODEB(nd) * pnd->v; nd->fromparent.current += nd->fromparent.djdv0 * pnd->v + NODEA(nd) * nd->v; } #if 0 printf("cur0 %g curleft %g curright %g\n", v_node[rootnodecount]->fromparent.current, v_node[rootnodecount]->toparent.current, v_node[rootnodecount+1]->fromparent.current ); #endif } /* For now there is always one more node in a section than there are segments */ /* except in section 0 in which all nodes serve as x=0 to connecting sections */ /* the above is obsolete with method3 */ #define PI 3.14159265358979323846 method3_connection_coef() /* setup a and b */ { int j; double dx, diam, ra, coef; hoc_Item* qsec; Section* sec; Node *nd; Prop *p, *nrn_mechanism(); float r, s, t; if (tree_changed) { setup_topology(); } /* for now assume diameter between node and parent is constant and located at the node */ /* r = 6 is standard method, 5 is third order, 4 is modified second order */ switch (_method3) { case 1: r = 6.; break; case 2: r = 4.; break; case 3: r = 5.; break; default: hoc_execerror(" invalid spatial method", (char*)0); } s = 6. - r; if (r == 5.) { t = 1.; }else{ t = 0.; } ForAllSections(sec) dx = section_length(sec)/((double)(sec->nnode)); for (j = 0; j < sec->nnode; ++j) { nd = sec->pnode[j]; p = nrn_mechanism(MORPHOLOGY, nd); assert(p); diam = p->param[0]; /* dv/(ra*dx) is nanoamps */ ra = nrn_ra(sec)*4.e-2/(PI * diam*diam); /* coef*dx* mA/cm^2 should be nanoamps */ coef = PI *1e-2* diam; nd->area = 100.; sec->parentnode->area = 100.; nd->toparent.coef0 = coef*r*dx/12.; nd->fromparent.coef0 = coef*r*dx/12.; nd->toparent.coefn = coef*s*dx/12.; nd->fromparent.coefn = coef*s*dx/12.; nd->toparent.coefjdot = t*ra*coef*dx*dx/12.; nd->fromparent.coefjdot = t*ra*coef*dx*dx/12.; nd->toparent.coefdg = t*coef*dx/12.; nd->fromparent.coefdg = t*coef*dx/12.; nd->toparent.coefj = 1./(ra*dx); nd->fromparent.coefj = 1./(ra*dx); nd->toparent.nd2 = 0; nd->fromparent.nd2 = 0; } if (sec->nnode > 1) { sec->pnode[0]->toparent.nd2 = sec->pnode[1]; if (sec->nnode > 2) { sec->pnode[sec->nnode - 2]->fromparent.nd2 = sec->pnode[sec->nnode - 3]; }else{ sec->pnode[sec->nnode - 2]->fromparent.nd2 = sec->parentsec->pnode[sec->parentsec->nnode - 1]; } } } } #endif neuron-7.5/src/nrnoc/multicore.c000066400000000000000000001020111323325274500167510ustar00rootroot00000000000000/* included by treeset.c */ /*#include <../../nrnconf.h>*/ /*#include */ #include #include /* Now that threads have taken over the actual_v, v_node, etc, it might be a good time to regularize the method of freeing, allocating, and updating those arrays. To recapitulate the history, Node used to be the structure that held direct values for v, area, d, rhs, etc. That continued to hold for the cray vectorization project which introduced v_node, v_parent, memb_list. Cache efficiency introduced actual_v, actual_area, actual_d, etc and the Node started pointing into those arrays. Additional nodes after allocation required updating pointers to v and area since those arrays were freed and reallocated. Now, the threads hold all these arrays and we want to update them properly under the circumstances of changing topology, changing number of threads, and changing distribution of cells on threads. Note there are no longer global versions of any of these arrays. We do not want to update merely due to a change in area. Recently we have dealt with diam, area, ri on a section basis. We generally desire an update just before a simulation when the efficient structures are necessary. This is reasonably well handled by the v_structure_change flag which historically freed and reallocated v_node and v_parent and, just before this comment, ended up setting the NrnThread tml. This makes most of the old memb_list vestigial and we now got rid of it except for the artificial cells (and it is possibly not really necessary there). Switching between sparse and tree matrix just cause freeing and reallocation of actual_rhs. If we can get the freeing, reallocation, and pointer update correct for _actual_v, I am guessing everything else can be dragged along with it. We have two major cases, call to pc.nthread and change in model structure. We want to use Node* as much as possible and defer the handling of v_structure_change as long as possible. */ #define CACHELINE_ALLOC(name,type,size) name = (type*)nrn_cacheline_alloc((void**)&name, size*sizeof(type)) #define CACHELINE_CALLOC(name,type,size) name = (type*)nrn_cacheline_calloc((void**)&name, size, sizeof(type)) int nrn_nthread; NrnThread* nrn_threads; void (*nrn_mk_transfer_thread_data_)(); static int busywait_; static int busywait_main_; extern void nrn_thread_error(const char*); extern void nrn_threads_free(); extern void nrn_old_thread_save(); extern double nrn_timeus(); static int nrn_thread_parallel_; void nrn_mk_table_check(); static int table_check_cnt_; static Datum* table_check_; static int allow_busywait_; /* linux specfic for performance testing */ /* eventually will be removed */ #define BENCHMARKING 0 #if BENCHMARKING /* for rdtscll() */ #include #define BENCHDECLARE unsigned long t1; #define BENCHBEGIN(arg) if (t_[arg] < t1_[arg] + BSIZE) {rdtscl(t1); *(t_[arg]++) = t1;} #define BENCHADD(arg) BENCHBEGIN(arg) #define WAIT wait_for_workers_timeit #define CPU_MHZ 3192 #define BSIZE 200000 #define BS 10 static unsigned long bcnt_, bcnt1_; static unsigned long t1_[BS][BSIZE], *t_[BS]; #else #define BENCHDECLARE /**/ #define BENCHBEGIN(arg) /**/ #define BENCHADD(arg) /**/ #define WAIT wait_for_workers #define BS 0 #endif static void* nulljob(NrnThread* nt) { return (void*)0; } int nrn_inthread_; #if USE_PTHREAD #include #include /* for sched_setaffinity */ /* abort if using threads and a call to malloc is unprotected */ #define use_malloc_hook 0 #if use_malloc_hook #include static int nrn_malloc_protected_; static void my_init_hook(); static void *(*old_malloc_hook) (size_t, const void*); static void *(*old_memalign_hook) (size_t, size_t, const void*); static void *(*old_realloc_hook) (void*, size_t, const void*); static void (*old_free_hook) (void*, const void*); static void *my_malloc_hook (size_t, const void*); static void *my_memalign_hook (size_t, size_t, const void*); static void *my_realloc_hook (void*, size_t, const void*); static void my_free_hook (void*, const void*); void (*__malloc_initialize_hook)(void) = my_init_hook; static void* my_malloc_hook(size_t size, const void* caller) { void* result; if (nrn_inthread_ && !nrn_malloc_protected_) { abort(); } __malloc_hook = old_malloc_hook; __memalign_hook = old_memalign_hook; __realloc_hook = old_realloc_hook; __free_hook = old_free_hook; result = malloc(size); old_malloc_hook = __malloc_hook; old_memalign_hook = __memalign_hook; old_realloc_hook = __realloc_hook; old_free_hook = __free_hook; __malloc_hook = my_malloc_hook; __memalign_hook = my_memalign_hook; __realloc_hook = my_realloc_hook; __free_hook = my_free_hook; return result; } static void* my_memalign_hook(size_t alignment, size_t size, const void* caller) { void* result; if (nrn_inthread_ && !nrn_malloc_protected_) { abort(); } __malloc_hook = old_malloc_hook; __memalign_hook = old_memalign_hook; __realloc_hook = old_realloc_hook; __free_hook = old_free_hook; result = memalign(alignment, size); old_malloc_hook = __malloc_hook; old_memalign_hook = __memalign_hook; old_realloc_hook = __realloc_hook; old_free_hook = __free_hook; __malloc_hook = my_malloc_hook; __memalign_hook = my_memalign_hook; __realloc_hook = my_realloc_hook; __free_hook = my_free_hook; return result; } static void* my_realloc_hook(void* ptr, size_t size, const void* caller) { void* result; if (nrn_inthread_ && !nrn_malloc_protected_) { abort(); } __malloc_hook = old_malloc_hook; __memalign_hook = old_memalign_hook; __realloc_hook = old_realloc_hook; __free_hook = old_free_hook; result = realloc(ptr, size); old_malloc_hook = __malloc_hook; old_memalign_hook = __memalign_hook; old_realloc_hook = __realloc_hook; old_free_hook = __free_hook; __malloc_hook = my_malloc_hook; __memalign_hook = my_memalign_hook; __realloc_hook = my_realloc_hook; __free_hook = my_free_hook; return result; } static void my_free_hook(void* ptr, const void* caller) { if (nrn_inthread_ && !nrn_malloc_protected_) { abort(); } __malloc_hook = old_malloc_hook; __memalign_hook = old_memalign_hook; __realloc_hook = old_realloc_hook; __free_hook = old_free_hook; free(ptr); old_malloc_hook = __malloc_hook; old_memalign_hook = __memalign_hook; old_realloc_hook = __realloc_hook; old_free_hook = __free_hook; __malloc_hook = my_malloc_hook; __memalign_hook = my_memalign_hook; __realloc_hook = my_realloc_hook; __free_hook = my_free_hook; } static void my_init_hook() { static int installed = 0; if (installed) { return; } installed = 1; old_malloc_hook = __malloc_hook; __malloc_hook = my_malloc_hook; old_memalign_hook = __memalign_hook; __memalign_hook = my_memalign_hook; old_realloc_hook = __realloc_hook; __realloc_hook = my_realloc_hook; old_free_hook = __free_hook; __free_hook = my_free_hook; } #endif static int interpreter_locked; static pthread_mutex_t interpreter_lock_; static pthread_mutex_t* _interpreter_lock; static pthread_mutex_t nmodlmutex_; pthread_mutex_t* _nmodlmutex; static pthread_mutex_t nrn_malloc_mutex_; static pthread_mutex_t* _nrn_malloc_mutex; void nrn_malloc_lock() { if (_nrn_malloc_mutex) { pthread_mutex_lock(_nrn_malloc_mutex); #if use_malloc_hook nrn_malloc_protected_ = 1; #endif } } void nrn_malloc_unlock() { if (_nrn_malloc_mutex) { #if use_malloc_hook nrn_malloc_protected_ = 0; #endif pthread_mutex_unlock(_nrn_malloc_mutex); } } /* when PERMANENT is 0, we avoid false warnings with helgrind, but a bit slower */ /* when 0, create/join instead of wait on condition. */ #ifndef PERMANENT #define PERMANENT 1 #endif typedef volatile struct { int flag; int thread_id; /* for nrn_solve etc.*/ void* (*job)(NrnThread*); } slave_conf_t; static pthread_cond_t* cond; static pthread_mutex_t* mut; static pthread_t* slave_threads; static slave_conf_t* wc; static void wait_for_workers() { int i; for (i=1; i < nrn_nthread; ++i) { #if PERMANENT if (busywait_main_) { while (wc[i].flag != 0){;} }else{ pthread_mutex_lock(mut + i); while (wc[i].flag != 0) { pthread_cond_wait(cond + i, mut + i); } pthread_mutex_unlock(mut + i); } #else pthread_join(slave_threads[i], (void*)0); #endif } } static void wait_for_workers_timeit() { BENCHDECLARE BENCHBEGIN(BS-2) wait_for_workers(); BENCHADD(BS-1) } static void send_job_to_slave(int i, void* (*job)(NrnThread*)) { #if PERMANENT pthread_mutex_lock(mut + i); wc[i].job = job; wc[i].flag = 1; pthread_cond_signal(cond + i); pthread_mutex_unlock(mut + i); #else pthread_create(slave_threads + i, (void*)0, (void*(*)(void*))job, (void*)(nrn_threads + i)); #endif } void setaffinity(int i) { int mask; return; #if 0 cpu_set_t mask; CPU_ZERO(&mask); CPU_SET(i, &mask); mask = (1 << i); sched_setaffinity(0, 4, &mask); #endif } static void* slave_main(void* arg) { slave_conf_t* my_wc = (slave_conf_t*)arg; pthread_mutex_t *my_mut = mut + my_wc->thread_id; pthread_cond_t *my_cond = cond + my_wc->thread_id; BENCHDECLARE #if BENCHMARKING unsigned long* t_[BS]; int a1, a2; a1 = my_wc->thread_id; a2 = my_wc->thread_id + nrn_nthread; t_[a1] = t1_[a1]; t_[a2] = t1_[a2]; #endif setaffinity(my_wc->thread_id); for(;;) { if (busywait_) { while(my_wc->flag == 0) {;} if (my_wc->flag == 1) { BENCHBEGIN(a1) (*my_wc->job)(nrn_threads + my_wc->thread_id); BENCHADD(a2) }else{ return (void*)0; } my_wc->flag = 0; pthread_cond_signal(my_cond); }else{ pthread_mutex_lock(my_mut); while (my_wc->flag == 0) { pthread_cond_wait(my_cond, my_mut); } pthread_mutex_unlock(my_mut); pthread_mutex_lock(my_mut); if (my_wc->flag == 1) { pthread_mutex_unlock(my_mut); BENCHBEGIN(a1) (*my_wc->job)(nrn_threads + my_wc->thread_id); BENCHADD(a2) }else{ pthread_mutex_unlock(my_mut); return (void*)0; } pthread_mutex_lock(my_mut); my_wc->flag = 0; pthread_cond_signal(my_cond); pthread_mutex_unlock(my_mut); } } return (void*)0; } static void threads_create_pthread(){ #if NRNMPI if (nrn_nthread > 1 && nrnmpi_numprocs > 1 && nrn_cannot_use_threads_and_mpi == 1) { if (nrnmpi_myid == 0) { printf("This MPI is not threadsafe so pthreads are disabled.\n"); } nrn_thread_parallel_ = 0; return; } #endif setaffinity(nrnmpi_myid); if (nrn_nthread > 1) { int i; #if PERMANENT CACHELINE_ALLOC(wc, slave_conf_t, nrn_nthread); slave_threads = (pthread_t *)emalloc(sizeof(pthread_t)*nrn_nthread); cond = (pthread_cond_t *)emalloc(sizeof(pthread_cond_t)*nrn_nthread); mut = (pthread_mutex_t *)emalloc(sizeof(pthread_mutex_t)*nrn_nthread); for (i=1; i < nrn_nthread; ++i) { wc[i].flag = 0; wc[i].thread_id = i; pthread_cond_init(cond + i, (void*)0); pthread_mutex_init(mut + i, (void*)0); pthread_create(slave_threads + i, (void*)0, slave_main, (void*)(wc+i)); } #else slave_threads = (pthread_t *)emalloc(sizeof(pthread_t)*nrn_nthread); #endif /* PERMANENT */ if (!_interpreter_lock) { interpreter_locked = 0; _interpreter_lock = &interpreter_lock_; pthread_mutex_init(_interpreter_lock, (void*)0); } if (!_nmodlmutex) { _nmodlmutex = &nmodlmutex_; pthread_mutex_init(_nmodlmutex, (void*)0); } if (!_nrn_malloc_mutex) { _nrn_malloc_mutex = &nrn_malloc_mutex_; pthread_mutex_init(_nrn_malloc_mutex, (void*)0); } nrn_thread_parallel_ = 1; }else{ nrn_thread_parallel_ = 0; } } static void threads_free_pthread(){ int i; if (slave_threads) { #if PERMANENT wait_for_workers(); for (i=1; i < nrn_nthread; ++i) { pthread_mutex_lock(mut + i); wc[i].flag = -1; pthread_cond_signal(cond + i); pthread_mutex_unlock(mut + i); pthread_join(slave_threads[i], (void*)0); pthread_cond_destroy(cond + i); pthread_mutex_destroy(mut + i); } free((char*)slave_threads); free((char*)cond); free((char*)mut); free((char*)wc); slave_threads = (pthread_t*)0; cond = (pthread_cond_t*)0; mut = (pthread_mutex_t*)0; wc = (slave_conf_t*)0; #else free((char*)slave_threads); slave_threads = (pthread_t*)0; #endif /*PERMANENT*/ } if (_interpreter_lock) { pthread_mutex_destroy(_interpreter_lock); _interpreter_lock = (pthread_mutex_t*)0; interpreter_locked = 0; } if (_nmodlmutex) { pthread_mutex_destroy(_nmodlmutex); _nmodlmutex = (pthread_mutex_t*)0; } if (_nrn_malloc_mutex) { pthread_mutex_destroy(_nrn_malloc_mutex); _nrn_malloc_mutex = (pthread_mutex_t*)0; } nrn_thread_parallel_ = 0; } #else /* USE_PTHREAD */ void nrn_malloc_lock() {} void nrn_malloc_unlock() {} static void threads_create_pthread(){ nrn_thread_parallel_ = 0; } static void threads_free_pthread(){ nrn_thread_parallel_ = 0; } #endif /* !USE_PTHREAD */ void nrn_thread_error(const char* s) { if (nrn_nthread != 1) { hoc_execerror(s, (char*)0); } } void nrn_thread_stat() { #if BENCHMARKING FILE* f; long i, j, n; char buf[50]; sprintf(buf, "bench.%d.dat", nrnmpi_myid); f = fopen(buf, "w"); #if 1 n = (t_[0] - t1_[0]); for (i=1; i < nrn_nthread; ++i) { t_[i] = t1_[i] + n; t_[i+nrn_nthread] = t1_[i+nrn_nthread] + n; } #endif n = 0; for (i=0; i < BS; ++i) { n += t_[i] - t1_[i]; } fprintf(f, "%ld\n", n); n = 0; for (j=0; j < BS; ++j) { n = t_[j] - t1_[j]; for (i=0; i < n; ++i) { fprintf(f, "%ld %d\n", t1_[j][i], j*nrnmpi_numprocs + nrnmpi_myid); } } fclose(f); #endif /*BENCHMARKING*/ } void nrn_threads_create(int n, int parallel) { int i, j; NrnThread* nt; if (nrn_nthread != n) { /*printf("sizeof(NrnThread)=%d sizeof(Memb_list)=%d\n", sizeof(NrnThread), sizeof(Memb_list));*/ threads_free_pthread(); nrn_threads_free(); for (i = 0; i < nrn_nthread; ++i) { nt = nrn_threads + i; if (nt->userpart) { hoc_obj_unref(nt->userpart); } } free((char*)nrn_threads); #if BENCHMARKING #endif nrn_threads = (NrnThread*)0; nrn_nthread = n; if (n > 0) { CACHELINE_ALLOC(nrn_threads, NrnThread, n); #if BENCHMARKING for (i=0; i < BS; ++i) { t_[i] = t1_[i]; } #endif for (i=0; i < n; ++i) { nt = nrn_threads + i; nt->_t = 0.; nt->_dt = -1e9; nt->id = i; nt->_stop_stepping = 0; nt->tml = (NrnThreadMembList*)0; nt->_ml_list = NULL; nt->roots = (hoc_List*)0; nt->userpart = 0; nt->ncell = 0; nt->end = 0; for (j=0; j < BEFORE_AFTER_SIZE; ++j) { nt->tbl[j] = (NrnThreadBAList*)0; } nt->_actual_rhs = 0; nt->_actual_d = 0; nt->_actual_a = 0; nt->_actual_b = 0; nt->_actual_v = 0; nt->_actual_area = 0; nt->_v_parent_index = 0; nt->_v_node = 0; nt->_v_parent = 0; nt->_ecell_memb_list = 0; nt->_ecell_child_cnt = 0; nt->_ecell_children = NULL; nt->_sp13mat = 0; nt->_ctime = 0.0; nt->_vcv = 0; nt->_nrn_fast_imem = 0; } } v_structure_change = 1; diam_changed = 1; } if (nrn_thread_parallel_ != parallel) { threads_free_pthread(); if (parallel) { threads_create_pthread(); } } /*printf("nrn_threads_create %d %d\n", nrn_nthread, nrn_thread_parallel_);*/ } /* Avoid invalidating pointers to i_membrane_ unless the number of compartments in a thread has changed. */ static int fast_imem_nthread_ = 0; static int* fast_imem_size_ = NULL; static _nrn_Fast_Imem* fast_imem_; static void fast_imem_free() { int i; for (i = 0; i < nrn_nthread; ++i) { nrn_threads[i]._nrn_fast_imem = NULL; } for (i = 0; i < fast_imem_nthread_; ++i) { if (fast_imem_size_[i] > 0) { free(fast_imem_[i]._nrn_sav_rhs); free(fast_imem_[i]._nrn_sav_d); } } if (fast_imem_nthread_) { free(fast_imem_size_); free(fast_imem_); fast_imem_nthread_ = 0; fast_imem_size_ = NULL; fast_imem_ = NULL; } } static void fast_imem_alloc() { int i; if (fast_imem_nthread_ != nrn_nthread) { fast_imem_free(); fast_imem_nthread_ = nrn_nthread; fast_imem_size_ = ecalloc(nrn_nthread, sizeof(int)); fast_imem_ = (_nrn_Fast_Imem*)ecalloc(nrn_nthread, sizeof(_nrn_Fast_Imem)); } for (i=0; i < nrn_nthread; ++i) { NrnThread* nt = nrn_threads + i; int n = nt->end; _nrn_Fast_Imem* fi = fast_imem_ + i; if (n != fast_imem_size_[i]) { if (fast_imem_size_[i] > 0) { free(fi->_nrn_sav_rhs); free(fi->_nrn_sav_d); } if (n > 0) { CACHELINE_ALLOC(fi->_nrn_sav_rhs, double, n); CACHELINE_ALLOC(fi->_nrn_sav_d, double, n); } fast_imem_size_[i] = n; } } } void nrn_fast_imem_alloc() { if (nrn_use_fast_imem) { int i; fast_imem_alloc(); for (i=0; i < nrn_nthread; ++i) { nrn_threads[i]._nrn_fast_imem = fast_imem_ + i; } }else{ fast_imem_free(); } } void nrn_threads_free() { int it, i; for (it = 0; it < nrn_nthread; ++it) { NrnThread* nt = nrn_threads + it; NrnThreadMembList* tml, *tml2; for (tml = nt->tml; tml; tml = tml2) { Memb_list* ml = tml->ml; tml2 = tml->next; free((char*)ml->nodelist); free((char*)ml->nodeindices); if (memb_func[tml->index].hoc_mech) { free((char*)ml->prop); }else{ free((char*)ml->data); free((char*)ml->pdata); } if (ml->_thread) { if (memb_func[tml->index].thread_cleanup_) { (*memb_func[tml->index].thread_cleanup_)(ml->_thread); } free((char*)ml->_thread); } free((char*)ml); free((char*)tml); } if (nt->_ml_list) { free((char*)nt->_ml_list); nt->_ml_list = NULL; } for (i=0; i < BEFORE_AFTER_SIZE; ++i) { NrnThreadBAList* tbl, *tbl2; for (tbl = nt->tbl[i]; tbl; tbl = tbl2) { tbl2 = tbl->next; free((char*)tbl); } nt->tbl[i] = (NrnThreadBAList*)0; } nt->tml = (NrnThreadMembList*)0; if (nt->userpart == 0 && nt->roots) { hoc_l_freelist(&nt->roots); nt->ncell = 0; } if (nt->_actual_rhs) {free((char*)nt->_actual_rhs); nt->_actual_rhs = 0;} if (nt->_actual_d) {free((char*)nt->_actual_d); nt->_actual_d = 0;} if (nt->_actual_a) {free((char*)nt->_actual_a); nt->_actual_a = 0;} if (nt->_actual_b) {free((char*)nt->_actual_b); nt->_actual_b = 0;} if (nt->_v_parent_index) {free((char*)nt->_v_parent_index); nt->_v_parent_index = 0;} if (nt->_v_node) {free((char*)nt->_v_node); nt->_v_node = 0;} if (nt->_v_parent) {free((char*)nt->_v_parent); nt->_v_parent = 0;} nt->_ecell_memb_list = 0; if (nt->_ecell_children) { nt->_ecell_child_cnt = 0; free(nt->_ecell_children); nt->_ecell_children = NULL; } if (nt->_sp13mat) { spDestroy(nt->_sp13mat); nt->_sp13mat = 0; } nt->_nrn_fast_imem = NULL; /* following freed by nrn_recalc_node_ptrs */ nrn_old_thread_save(); nt->_actual_v = 0; nt->_actual_area = 0; nt->end = 0; nt->ncell = 0; nt->_vcv = 0; } } /* be careful to make the tml list in proper memb_order. This is important */ /* for correct finitialize where mechanisms that write concentrations must be */ /* after ions and before mechanisms that read concentrations. */ static void thread_memblist_setup(NrnThread* _nt, int* mlcnt, void** vmap) { int i, ii; Node* nd; Prop* p; NrnThreadMembList* tml, **ptml; Memb_list** mlmap = (Memb_list**)vmap; BAMech** bamap = (BAMech**)vmap; #if 0 printf("thread_memblist_setup %lx v_node_count=%d ncell=%d end=%d\n", (long)nth, v_node_count, nth->ncell, nth->end); #endif for (i=0; i < n_memb_func; ++i) { mlcnt[i] = 0; } /* count */ for (i = 0; i < _nt->end; ++i) { nd = _nt->_v_node[i]; for (p = nd->prop; p; p = p->next) { if (memb_func[p->type].current || memb_func[p->type].state || memb_func[p->type].initialize ) { ++mlcnt[p->type]; } } } /* allocate */ ptml = &_nt->tml; for (ii = 0; ii < n_memb_func; ++ii) { i = memb_order_[ii]; if (mlcnt[i]) { if (_nt->id > 0 && memb_func[i].vectorized == 0) { hoc_execerror(memb_func[i].sym->name, "is not thread safe"); } /*printf("thread_memblist_setup %lx type=%d cnt=%d\n", (long)nth, i, mlcnt[i]);*/ CACHELINE_ALLOC(tml, NrnThreadMembList, 1); tml->index = i; tml->next = (NrnThreadMembList*)0; *ptml = tml; ptml = &tml->next; CACHELINE_ALLOC(tml->ml, Memb_list, 1); if (i == EXTRACELL) { _nt->_ecell_memb_list = tml->ml; } mlmap[i] = tml->ml; CACHELINE_ALLOC(tml->ml->nodelist, Node*, mlcnt[i]); CACHELINE_ALLOC(tml->ml->nodeindices, int, mlcnt[i]); if (memb_func[i].hoc_mech) { tml->ml->prop = (Prop**)emalloc(mlcnt[i]*sizeof(Prop*)); }else{ CACHELINE_ALLOC(tml->ml->data, double*, mlcnt[i]); CACHELINE_ALLOC(tml->ml->pdata, Datum*, mlcnt[i]); } tml->ml->_thread = (Datum*)0; if (memb_func[i].thread_size_) { tml->ml->_thread = (Datum*)ecalloc(memb_func[i].thread_size_, sizeof(Datum)); if (memb_func[tml->index].thread_mem_init_) { (*memb_func[tml->index].thread_mem_init_)(tml->ml->_thread); } } tml->ml->nodecount = 0; /* counted again below */ } } CACHELINE_CALLOC(_nt->_ml_list, Memb_list*, n_memb_func); for (tml = _nt->tml; tml; tml = tml->next) { _nt->_ml_list[tml->index] = tml->ml; } /* fill */ for (i = 0; i < _nt->end; ++i) { nd = _nt->_v_node[i]; for (p = nd->prop; p; p = p->next) { if (memb_func[p->type].current || memb_func[p->type].state || memb_func[p->type].initialize ) { Memb_list* ml = mlmap[p->type]; ml->nodelist[ml->nodecount] = nd; ml->nodeindices[ml->nodecount] = nd->v_node_index; if (memb_func[p->type].hoc_mech) { ml->prop[ml->nodecount] = p; }else{ ml->data[ml->nodecount] = p->param; ml->pdata[ml->nodecount] = p->dparam; } ++ml->nodecount; } } } /* count and store any Node* with the property nd->extnode == NULL && nd->pnd != NULL && nd->pnd->extcell != NULL */ if (_nt->_ecell_memb_list) { Node* pnd; int cnt=0; for (i = 0; i < _nt->end; ++i) { nd = _nt->_v_node[i]; pnd = _nt->_v_parent[i]; if (nd->extnode == NULL && pnd && pnd->extnode) { ++cnt; } } if (cnt) { Node** p; CACHELINE_ALLOC(_nt->_ecell_children, Node*, cnt); _nt->_ecell_child_cnt = cnt; p = _nt->_ecell_children; cnt = 0; for (i = 0; i < _nt->end; ++i) { nd = _nt->_v_node[i]; pnd = _nt->_v_parent[i]; if (nd->extnode == NULL && pnd && pnd->extnode) { p[cnt++] = nd; } } } } #if 0 for (i=0; i < n_memb_func; ++i) { if (mlcnt[i]) {assert(mlcnt[i] = mlmap[i]->nodecount);} } for (tml = _nt->tml; tml; tml = tml->next) { assert(mlcnt[tml->index] == tml->ml->nodecount); } #endif /* fill the ba lists */ /* need map from ml type to BA type. Reuse vmap */ for (i=0; i < BEFORE_AFTER_SIZE; ++i) { BAMech* bam; NrnThreadBAList* tbl, **ptbl; for (ii=0; ii < n_memb_func; ++ii) { bamap[ii] = (BAMech*)0; } for (bam = bamech_[i]; bam; bam = bam->next) { bamap[bam->type] = bam; } /* unnecessary but keep in order anyway */ ptbl = _nt->tbl + i; for (tml = _nt->tml; tml; tml = tml->next) { if (bamap[tml->index]) { Memb_list* ml = tml->ml; tbl = (NrnThreadBAList*)emalloc(sizeof(NrnThreadBAList)); tbl->next = (NrnThreadBAList*)0; tbl->bam = bamap[tml->index]; tbl->ml = ml; *ptbl = tbl; ptbl = &(tbl->next); } } } /* fill in the Point_process._vnt value. */ /* artificial cells done in v_setup_vectors() */ for (tml = _nt->tml; tml; tml = tml->next) if (memb_func[tml->index].is_point) { for (i=0; i < tml->ml->nodecount; ++i) { Point_process* pnt = (Point_process*)tml->ml->pdata[i][1]._pvoid; pnt->_vnt = (void*)_nt; } } } static void nrn_thread_memblist_setup() { int it, *mlcnt; void** vmap; mlcnt = (int*)emalloc(n_memb_func*sizeof(int)); vmap = (void**)emalloc(n_memb_func*sizeof(void*)); for (it=0; it < nrn_nthread; ++it) { thread_memblist_setup(nrn_threads + it, mlcnt, vmap); } nrn_fast_imem_alloc(); free((char*)vmap); free((char*)mlcnt); nrn_mk_table_check(); if (nrn_mk_transfer_thread_data_) { (*nrn_mk_transfer_thread_data_)(); } } /* secorder needs to correspond to cells in NrnThread with roots */ /* at the beginning of each thread region */ /* this differs from original secorder where all roots are at the beginning */ /* in passing, also set start and end indices. */ static void reorder_secorder() { NrnThread* _nt; Section* sec, *ch; Node* nd; hoc_Item* qsec; hoc_List* sl; int order, isec, i, j, inode; /* count and allocate */ ForAllSections(sec) sec->order = -1; } order = 0; FOR_THREADS(_nt) { /* roots of this thread */ sl = _nt->roots; inode = 0; ITERATE(qsec, sl) { sec = hocSEC(qsec); assert(sec->order == -1); secorder[order] = sec; sec->order = order; ++order; nd = sec->parentnode; nd->_nt = _nt; inode += 1; } /* all children of what is already in secorder */ for (isec = order - _nt->ncell; isec < order; ++isec) { sec = secorder[isec]; /* to make it easy to fill in PreSyn.nt_*/ sec->prop->dparam[9]._pvoid = (void*)_nt; for (j = 0; j < sec->nnode; ++j) { nd = sec->pnode[j]; nd->_nt = _nt; inode += 1; } for (ch = sec->child; ch; ch = ch->sibling) { assert(ch->order == -1); secorder[order] = ch; ch->order = order; ++order; } } _nt->end = inode; CACHELINE_CALLOC(_nt->_actual_rhs, double, inode); CACHELINE_CALLOC(_nt->_actual_d, double, inode); CACHELINE_CALLOC(_nt->_actual_a, double, inode); CACHELINE_CALLOC(_nt->_actual_b, double, inode); CACHELINE_CALLOC(_nt->_v_node, Node*, inode); CACHELINE_CALLOC(_nt->_v_parent, Node*, inode); CACHELINE_CALLOC(_nt->_v_parent_index, int, inode); } /* do it again and fill _v_node and _v_parent */ /* index each cell section in relative order. Do offset later */ ForAllSections(sec) sec->order = -1; } order = 0; FOR_THREADS(_nt) { /* roots of this thread */ sl = _nt->roots; inode = 0; ITERATE(qsec, sl) { sec = hocSEC(qsec); assert(sec->order == -1); secorder[order] = sec; sec->order = order; ++order; nd = sec->parentnode; nd->_nt = _nt; _nt->_v_node[inode] = nd; _nt->_v_parent[inode] = (Node*)0; _nt->_v_node[inode]->v_node_index = inode; inode += 1; } /* all children of what is already in secorder */ for (isec = order - _nt->ncell; isec < order; ++isec) { sec = secorder[isec]; /* to make it easy to fill in PreSyn.nt_*/ sec->prop->dparam[9]._pvoid = (void*)_nt; for (j = 0; j < sec->nnode; ++j) { nd = sec->pnode[j]; nd->_nt = _nt; _nt->_v_node[inode] = nd; if (j) { _nt->_v_parent[inode] = sec->pnode[j - 1]; }else{ _nt->_v_parent[inode] = sec->parentnode; } _nt->_v_node[inode]->v_node_index = inode; inode += 1; } for (ch = sec->child; ch; ch = ch->sibling) { assert(ch->order == -1); secorder[order] = ch; ch->order = order; ++order; } } _nt->end = inode; } assert(order == section_count); /*assert(inode == v_node_count);*/ /* not missing any */ ForAllSections(sec) assert(sec->order != -1); } /* here is where multisplit reorders the nodes. Afterwards in either case, we can then point to v, d, rhs in proper node order */ FOR_THREADS(_nt) for (inode=0; inode < _nt->end; ++inode) { _nt->_v_node[inode]->_classical_parent = _nt->_v_parent[inode]; } if (nrn_multisplit_setup_) { /* classical order abandoned */ (*nrn_multisplit_setup_)(); } /* make the Nodes point to the proper d, rhs */ FOR_THREADS(_nt) { for (j = 0; j < _nt->end; ++j) { Node* nd = _nt->_v_node[j]; nd->_d = _nt->_actual_d + j; nd->_rhs = _nt->_actual_rhs + j; } } /* because the d,rhs changed, if multisplit is used we need to update the reduced tree gather/scatter pointers */ if (nrn_multisplit_setup_) { nrn_multisplit_ptr_update(); } } void nrn_mk_table_check() { int i, id, index; int* ix; if (table_check_) { free((void*)table_check_); table_check_ = (Datum*)0; } ix = (int*)emalloc(n_memb_func*sizeof(int)); for (i=0; i < n_memb_func; ++i) { ix[i] = -1; } table_check_cnt_ = 0; for (id=0; id < nrn_nthread; ++id) { NrnThread* nt = nrn_threads + id; NrnThreadMembList* tml; for (tml = nt->tml; tml; tml = tml->next) { index = tml->index; if (memb_func[index].thread_table_check_ && ix[index] == -1) { ix[index] = id; table_check_cnt_ += 2; } } } if (table_check_cnt_) { table_check_ = (Datum*)emalloc(table_check_cnt_*sizeof(Datum)); } i=0; for (id=0; id < nrn_nthread; ++id) { NrnThread* nt = nrn_threads + id; NrnThreadMembList* tml; for (tml = nt->tml; tml; tml = tml->next) { index = tml->index; if (memb_func[index].thread_table_check_ && ix[index] == id) { table_check_[i++].i = id; table_check_[i++]._pvoid = (void*)tml; } } } free((void*)ix); } void nrn_thread_table_check() { int i; for (i=0; i < table_check_cnt_; i += 2) { NrnThread* nt = nrn_threads + table_check_[i].i; NrnThreadMembList* tml = (NrnThreadMembList*)table_check_[i+1]._pvoid; Memb_list* ml = tml->ml; (*memb_func[tml->index].thread_table_check_)( ml->data[0], ml->pdata[0], ml->_thread, nt, tml->index ); } } /* if it is possible for more than one thread to get into the interpreter, lock it. */ void nrn_hoc_lock() { #if USE_PTHREAD if (nrn_inthread_) { pthread_mutex_lock(_interpreter_lock); interpreter_locked = 1; } #endif } void nrn_hoc_unlock() { #if USE_PTHREAD if (interpreter_locked) { interpreter_locked = 0; pthread_mutex_unlock(_interpreter_lock); } #endif } void nrn_multithread_job(void*(*job)(NrnThread*)) { int i; #if USE_PTHREAD BENCHDECLARE if (nrn_thread_parallel_) { nrn_inthread_ = 1; for (i=1; i < nrn_nthread; ++i) { send_job_to_slave(i, job); } BENCHBEGIN(0) (*job)(nrn_threads); BENCHADD(nrn_nthread) WAIT(); nrn_inthread_ = 0; }else{ /* sequential */ #else { #endif for (i=1; i < nrn_nthread; ++i) { BENCHBEGIN(i) (*job)(nrn_threads + i); BENCHADD(i+nrn_nthread) } BENCHBEGIN(0) (*job)(nrn_threads); BENCHADD(nrn_nthread) } } void nrn_onethread_job(int i, void*(*job)(NrnThread*)) { BENCHDECLARE assert(i >= 0 && i < nrn_nthread); #if USE_PTHREAD if (nrn_thread_parallel_) { if (i > 0) { send_job_to_slave(i, job); WAIT(); }else{ BENCHBEGIN(0) (*job)(nrn_threads); BENCHADD(nrn_nthread) } }else{ #else { #endif (*job)(nrn_threads + i); } } void nrn_wait_for_threads() { #if USE_PTHREAD if (nrn_thread_parallel_) { wait_for_workers(); } #endif } void nrn_thread_partition(); int nrn_user_partition() { int i, it, b, n; hoc_Item* qsec; hoc_List* sl; char buf[256]; Section* sec; NrnThread* nt; /* all one or all the other*/ b = (nrn_threads[0].userpart != (Object*)0); for (it=1; it < nrn_nthread; ++it) { if ((nrn_threads[it].userpart != (Object*)0) != b) { hoc_execerror("some threads have a user defined partition", "and some do not"); } } if (!b) { return 0; } /* discard partition if any section mentioned has been deleted. The model has changed */ FOR_THREADS(nt) { sl = nt->roots; ITERATE(qsec, sl) { sec = hocSEC(qsec); if (!sec->prop) { for (i=0; i < nrn_nthread; ++i) { nrn_thread_partition(i, (Object*)0); } return 0; } } } ForAllSections(sec) sec->volatile_mark = 0; } /* fill in ncell and verify consistency */ n = 0; for (it=0; it < nrn_nthread; ++it) { nt = nrn_threads + it; sl = nt->roots; nt->ncell = 0; ITERATE(qsec, sl) { sec = hocSEC(qsec); ++nt->ncell; ++n; if (sec->parentsec) { sprintf(buf, "in thread partition %d is not a root section", it); hoc_execerror(secname(sec), buf); } if (sec->volatile_mark) { sprintf(buf, "appeared again in partition %d", it); hoc_execerror(secname(sec), buf); } sec->volatile_mark = 1; } } if (n != nrn_global_ncell) { sprintf(buf, "The total number of cells, %d, is different than the number of user partition cells, %d\n", nrn_global_ncell, n); hoc_execerror(buf, (char*)0); } return 1; } void nrn_thread_partition(int it, Object* sl) { NrnThread* nt; assert(it >= 0 && it < nrn_nthread); nt = nrn_threads + it; if (nt->userpart == (Object*)0 && nt->roots) { hoc_l_freelist(&nt->roots); } if (sl) { hoc_obj_ref(sl); } if (nt->userpart) { hoc_obj_unref(nt->userpart); nt->userpart = (Object*)0; nt->roots = (hoc_List*)0; } if (sl) { nt->userpart = sl; /* already reffed above */ nt->roots = (hoc_List*)sl->u.this_pointer; } v_structure_change = 1; } void nrn_use_busywait(int b) { #if USE_PTHREAD if (allow_busywait_ && nrn_thread_parallel_) { if (b == 0 && busywait_main_ == 1) { busywait_ = 0; nrn_multithread_job(nulljob); busywait_main_ = 0; }else if (b == 1 && busywait_main_ == 0) { busywait_main_ = 1; wait_for_workers(); busywait_ = 1; nrn_multithread_job(nulljob); } }else{ if (busywait_main_ == 1) { busywait_ = 0; nrn_multithread_job(nulljob); busywait_main_ = 0; } } #endif } int nrn_allow_busywait(int b) { int old = allow_busywait_; allow_busywait_ = b; return old; } #if USE_PTHREAD static long waste_; static void* waste(void* v) { size_t i, j, n; n = (size_t)v; j = 0; for (i=0; i < n; ++i) { j += i; } /* hoping it is not optimized away */ waste_ = j; return (void*)0; } #define _nt_ 32 static double trial(int ip) { int i; double t; pthread_t* th; th = (pthread_t*)ecalloc(ip, sizeof(pthread_t)); t = nrn_timeus(); for (i=0; i < ip; ++i) { pthread_create(th + i, (void*)0, waste, (void*)100000000); } for (i=0; i < ip; ++i) { pthread_join(th[i], (void*)0); } t = nrn_timeus() - t; free((char*)th); return t; } #endif int nrn_how_many_processors() { #if USE_PTHREAD int i, ip; double t1, t2; printf("nthread walltime (count to 1e8 on each thread)\n"); t1 = trial(1); printf("%4d\t %g\n", 1, t1); for (ip = 2; ip <= _nt_; ip *= 2) { t2 = trial(ip); printf("%4d\t %g\n", ip, t2); if (t2 > 1.3*t1) { return ip/2; } } return _nt_; #else return 1; #endif } neuron-7.5/src/nrnoc/multicore.h000066400000000000000000000062521323325274500167700ustar00rootroot00000000000000#ifndef multicore_h #define multicore_h /* Starts from Hubert Eichner's modifications but incorporates a significant refactorization. The best feature of Hubert's original code is retained. I.e. the user level structures remain unchanged and the vectors, e.g v_node, are ordered so that each thread uses a contiguous region. We take this even further by changing rootnodecount to nrn_global_ncell and ordering the rootnodes so they appear in the proper place in the lists instead of all at the beginning. This means most of the user level for i=0,rootnode-1 loops have to be changed to iterate over all the nrn_thread_t.ncell. But underneath the VECTORIZE part, most functions are given an ithread argument and none ever get outside the array portions specified by the nrn_thread_t. This means that the thread parallelization can be handled at the level of fadvance() and a network sim can take advantage of the minimum netcon delay interval The main caveat with threads is that mod files should not use pointers that cross thread data boundaries. ie. gap junctions should use the ParallelContext methods. */ /* now included by section.h since this has take over the v_node, actual_v, etc. */ #include #if defined(__cplusplus) extern "C" { #endif typedef struct NrnThreadMembList{ /* patterned after CvMembList in cvodeobj.h */ struct NrnThreadMembList* next; Memb_list* ml; int index; } NrnThreadMembList; typedef struct NrnThreadBAList { Memb_list* ml; /* an item in the NrnThreadMembList */ BAMech* bam; struct NrnThreadBAList* next; } NrnThreadBAList; typedef struct _nrn_Fast_Imem { double* _nrn_sav_rhs; double* _nrn_sav_d; } _nrn_Fast_Imem; typedef struct NrnThread { double _t; double _dt; double cj; NrnThreadMembList* tml; Memb_list** _ml_list; int ncell; /* analogous to old rootnodecount */ int end; /* 1 + position of last in v_node array. Now v_node_count. */ int id; /* this is nrn_threads[id] */ int _stop_stepping; /* delivered an all thread HocEvent */ int _ecell_child_cnt; /* see _ecell_children below */ double* _actual_rhs; double* _actual_d; double* _actual_a; double* _actual_b; double* _actual_v; double* _actual_area; int* _v_parent_index; Node** _v_node; Node** _v_parent; char* _sp13mat; /* handle to general sparse matrix */ Memb_list* _ecell_memb_list; /* normally nil */ Node** _ecell_children; /* nodes with no extcell but parent has it */ _nrn_Fast_Imem* _nrn_fast_imem; void* _vcv; /* replaces old cvode_instance and nrn_cvode_ */ #if 1 double _ctime; /* computation time in seconds (using nrnmpi_wtime) */ #endif NrnThreadBAList* tbl[BEFORE_AFTER_SIZE]; /* wasteful since almost all empty */ hoc_List* roots; /* ncell of these */ Object* userpart; /* the SectionList if this is a user defined partition */ } NrnThread; extern int nrn_nthread; extern NrnThread* nrn_threads; extern void nrn_thread_error(const char*); extern void nrn_multithread_job(void*(*)(NrnThread*)); extern void nrn_onethread_job(int, void*(*)(NrnThread*)); extern void nrn_wait_for_threads(); extern void nrn_thread_table_check(); #define FOR_THREADS(nt) for (nt = nrn_threads; nt < nrn_threads + nrn_nthread; ++nt) #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnoc/multisplit.h000066400000000000000000000032421323325274500171670ustar00rootroot00000000000000#ifndef multisplit_h #define multisplit_h #include #if 0 /* comment */ in the classical order, knowing a node means you know the classical parent with v_parent[node->v_node_index]. Also the effect of the parent on the node equation is given by NODEB(node) and the effect of the node on the parent equation is NODEA(node). One major circumstance of the multisplit order is that a parent child may be reversed. For a single sid0, this happens on the path between the classical root and sid0. If a parent-child has been reversed and given a node we know the classical parent (presently a child) then at the node ClassicalB = ClassicalParentPresentA ClassicalA = ClassicalParentPresentB The other aspect of multisplit, both sid0 and sid1 exist, is more complex because of the two parent nature of the center node on the path between sid0 and sid1. Our convention is that v_parent[centernode->v_node_index] is toward sid0. And the other parent is v_parent[c2sid1_parent_index[centernode->v_node_index - backbone_center_begin]] So we need to know what Classical A and B are for the center node and its two parents. A center node may be reversed or not with respect to its classical parent. One of the present parents may or may not be its classical parent. #endif /* end comment */ #if defined(__cplusplus) extern "C" { #endif #if 1 || PARANEURON extern double* nrn_classicalNodeA(Node* n); extern double* nrn_classicalNodeB(Node* n); #define ClassicalNODEA(n) (*nrn_classicalNodeA(n)) #define ClassicalNODEB(n) (*nrn_classicalNodeB(n)) #else #define ClassicalNODEA(n) NODEA(n) #define ClassicalNODEB(n) NODEB(n) #endif #if defined(__cplusplus) } #endif #endif /* multisplit_h */ neuron-7.5/src/nrnoc/netstim.c000066400000000000000000000425001323325274500164370ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__NetStim #define _nrn_initial _nrn_initial__NetStim #define nrn_cur _nrn_cur__NetStim #define _nrn_current _nrn_current__NetStim #define nrn_jacob _nrn_jacob__NetStim #define nrn_state _nrn_state__NetStim #define _net_receive _net_receive__NetStim #define init_sequence init_sequence__NetStim #define next_invl next_invl__NetStim #define noiseFromRandom123 noiseFromRandom123__NetStim #define noiseFromRandom noiseFromRandom__NetStim #define seed seed__NetStim #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define interval _p[0] #define number _p[1] #define start _p[2] #define noise _p[3] #define event _p[4] #define on _p[5] #define ispike _p[6] #define v _p[7] #define _tsav _p[8] #define _nd_area *_ppvar[0]._pval #define donotuse *_ppvar[2]._pval #define _p_donotuse _ppvar[2]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = 2; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_erand(); static double _hoc_init_sequence(); static double _hoc_invl(); static double _hoc_next_invl(); static double _hoc_noiseFromRandom123(); static double _hoc_noiseFromRandom(); static double _hoc_seed(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "erand", _hoc_erand, "init_sequence", _hoc_init_sequence, "invl", _hoc_invl, "next_invl", _hoc_next_invl, "noiseFromRandom123", _hoc_noiseFromRandom123, "noiseFromRandom", _hoc_noiseFromRandom, "seed", _hoc_seed, 0, 0 }; #define erand erand_NetStim #define invl invl_NetStim extern double erand( _threadargsproto_ ); extern double invl( _threadargsprotocomma_ double ); /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "interval", 1e-09, 1e+09, "noise", 0, 1, "number", 0, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "interval", "ms", "start", "ms", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "NetStim", "interval", "number", "start", "noise", 0, 0, 0, "donotuse", 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 9, _prop); /*initialize range parameters*/ interval = 10; number = 10; start = 50; noise = 0; } _prop->param = _p; _prop->param_size = 9; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); #define _tqitem &(_ppvar[3]._pvoid) static void _net_receive(Point_process*, double*, double); static void bbcore_write(double*, int*, int*, int*, _threadargsproto_); extern void hoc_reg_bbcore_write(int, void(*)(double*, int*, int*, int*, _threadargsproto_)); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _netstim_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_reg_bbcore_write(_mechtype, bbcore_write); hoc_register_prop_size(_mechtype, 9, 4); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "bbcorepointer"); hoc_register_dparam_semantics(_mechtype, 3, "netsend"); add_nrn_artcell(_mechtype, 3); add_nrn_has_net_event(_mechtype); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 NetStim /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/netstim.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int init_sequence(_threadargsprotocomma_ double); static int next_invl(_threadargsproto_); static int noiseFromRandom123(_threadargsproto_); static int noiseFromRandom(_threadargsproto_); static int seed(_threadargsprotocomma_ double); /*VERBATIM*/ #if NRNBBCORE /* running in CoreNEURON */ #define IFNEWSTYLE(arg) arg #else /* running in NEURON */ /* 1 means noiseFromRandom was called when _ran_compat was previously 0 . 2 means noiseFromRandom123 was called when _ran_compart was previously 0. */ static int _ran_compat; /* specifies the noise style for all instances */ #define IFNEWSTYLE(arg) if(_ran_compat == 2) { arg } #endif /* running in NEURON */ static int seed ( _threadargsprotocomma_ double _lx ) { /*VERBATIM*/ #if !NRNBBCORE set_seed ( _lx ) ; /*VERBATIM*/ #endif return 0; } static double _hoc_seed(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; seed ( _p, _ppvar, _thread, _nt, *getarg(1) ); return(_r); } static int init_sequence ( _threadargsprotocomma_ double _lt ) { if ( number > 0.0 ) { on = 1.0 ; event = 0.0 ; ispike = 0.0 ; } return 0; } static double _hoc_init_sequence(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; init_sequence ( _p, _ppvar, _thread, _nt, *getarg(1) ); return(_r); } double invl ( _threadargsprotocomma_ double _lmean ) { double _linvl; if ( _lmean <= 0. ) { _lmean = .01 ; } if ( noise == 0.0 ) { _linvl = _lmean ; } else { _linvl = ( 1. - noise ) * _lmean + noise * _lmean * erand ( _threadargs_ ) ; } return _linvl; } static double _hoc_invl(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = invl ( _p, _ppvar, _thread, _nt, *getarg(1) ); return(_r); } /*VERBATIM*/ #include "nrnran123.h" #if !NRNBBCORE /* backward compatibility */ double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); int nrn_random_isran123(void* r, uint32_t* id1, uint32_t* id2, uint32_t* id3); #endif double erand ( _threadargsproto_ ) { double _lerand; /*VERBATIM*/ if (_p_donotuse) { /* :Supports separate independent but reproducible streams for : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ #if !NRNBBCORE if (_ran_compat == 2) { _lerand = nrnran123_negexp((nrnran123_State*)_p_donotuse); }else{ _lerand = nrn_random_pick(_p_donotuse); } #else _lerand = nrnran123_negexp((nrnran123_State*)_p_donotuse); #endif return _lerand; }else{ #if NRNBBCORE assert(0); #else /* : the old standby. Cannot use if reproducible parallel sim : independent of nhost or which host this instance is on : is desired, since each instance on this cpu draws from : the same stream */ #endif } #if !NRNBBCORE _lerand = exprand ( 1.0 ) ; /*VERBATIM*/ #endif return _lerand; } static double _hoc_erand(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = erand ( _p, _ppvar, _thread, _nt ); return(_r); } static int noiseFromRandom ( _threadargsproto_ ) { /*VERBATIM*/ #if !NRNBBCORE { void** pv = (void**)(&_p_donotuse); if (_ran_compat == 2) { fprintf(stderr, "NetStim.noiseFromRandom123 was previously called\n"); assert(0); } _ran_compat = 1; if (ifarg(1)) { *pv = nrn_random_arg(1); }else{ *pv = (void*)0; } } #endif return 0; } static double _hoc_noiseFromRandom(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; noiseFromRandom ( _p, _ppvar, _thread, _nt ); return(_r); } static int noiseFromRandom123 ( _threadargsproto_ ) { /*VERBATIM*/ #if !NRNBBCORE { nrnran123_State** pv = (nrnran123_State**)(&_p_donotuse); if (_ran_compat == 1) { fprintf(stderr, "NetStim.noiseFromRandom was previously called\n"); assert(0); } _ran_compat = 2; if (*pv) { nrnran123_deletestream(*pv); *pv = (nrnran123_State*)0; } if (ifarg(3)) { *pv = nrnran123_newstream3((uint32_t)*getarg(1), (uint32_t)*getarg(2), (uint32_t)*getarg(3)); }else if (ifarg(2)) { *pv = nrnran123_newstream((uint32_t)*getarg(1), (uint32_t)*getarg(2)); } } #endif return 0; } static double _hoc_noiseFromRandom123(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; noiseFromRandom123 ( _p, _ppvar, _thread, _nt ); return(_r); } /*VERBATIM*/ #if !NRNBBCORE static void bbcore_write(double* x, int* d, int* xx, int *offset, _threadargsproto_) { if (!noise) { return; } /* error if using the legacy scop_exprand */ if (!_p_donotuse) { fprintf(stderr, "NetStim: cannot use the legacy scop_negexp generator for the random stream.\n"); assert(0); } if (d) { uint32_t* di = ((uint32_t*)d) + *offset; if (_ran_compat == 1) { void** pv = (void**)(&_p_donotuse); /* error if not using Random123 generator */ if (!nrn_random_isran123(*pv, di, di+1, di+2)) { fprintf(stderr, "NetStim: Random123 generator is required\n"); assert(0); } }else{ nrnran123_State** pv = (nrnran123_State**)(&_p_donotuse); nrnran123_getids3(*pv, di, di+1, di+2); } /*printf("Netstim bbcore_write %d %d %d\n", di[0], di[1], di[3]);*/ } *offset += 3; } #endif static void bbcore_read(double* x, int* d, int* xx, int* offset, _threadargsproto_) { assert(!_p_donotuse); if (noise) { uint32_t* di = ((uint32_t*)d) + *offset; nrnran123_State** pv = (nrnran123_State**)(&_p_donotuse); *pv = nrnran123_newstream3(di[0], di[1], di[2]); }else{ return; } *offset += 3; } static int next_invl ( _threadargsproto_ ) { if ( number > 0.0 ) { event = invl ( _threadargscomma_ interval ) ; } if ( ispike >= number ) { on = 0.0 ; } return 0; } static double _hoc_next_invl(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; next_invl ( _p, _ppvar, _thread, _nt ); return(_r); } static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _thread = (Datum*)0; _nt = (_NrnThread*)_pnt->_vnt; _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; if (_lflag == 1. ) {*(_tqitem) = 0;} { if ( _lflag == 0.0 ) { if ( _args[0] > 0.0 && on == 0.0 ) { init_sequence ( _threadargscomma_ t ) ; next_invl ( _threadargs_ ) ; event = event - interval * ( 1. - noise ) ; artcell_net_send ( _tqitem, _args, _pnt, t + event , 1.0 ) ; } else if ( _args[0] < 0.0 ) { on = 0.0 ; } } if ( _lflag == 3.0 ) { if ( on == 1.0 ) { init_sequence ( _threadargscomma_ t ) ; artcell_net_send ( _tqitem, _args, _pnt, t + 0.0 , 1.0 ) ; } } if ( _lflag == 1.0 && on == 1.0 ) { ispike = ispike + 1.0 ; net_event ( _pnt, t ) ; next_invl ( _threadargs_ ) ; if ( on == 1.0 ) { artcell_net_send ( _tqitem, _args, _pnt, t + event , 1.0 ) ; } } } } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { /*VERBATIM*/ if (_p_donotuse) { /* only this style initializes the stream on finitialize */ IFNEWSTYLE(nrnran123_setseq((nrnran123_State*)_p_donotuse, 0, 0);) } on = 0.0 ; ispike = 0.0 ; if ( noise < 0.0 ) { noise = 0.0 ; } if ( noise > 1.0 ) { noise = 1.0 ; } if ( start >= 0.0 && number > 0.0 ) { on = 1.0 ; event = start + invl ( _threadargscomma_ interval ) - interval * ( 1. - noise ) ; if ( event < 0.0 ) { event = 0.0 ; } artcell_net_send ( _tqitem, (double*)0, _ppvar[1]._pvoid, t + event , 3.0 ) ; } } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v=_v; { }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/netstim.mod000077500000000000000000000174331323325274500170060ustar00rootroot00000000000000: $Id: netstim.mod 2212 2008-09-08 14:32:26Z hines $ : comments at end : the Random idiom has been extended to support CoreNEURON. : For backward compatibility, noiseFromRandom(hocRandom) can still be used : as well as the default low-quality scop_exprand generator. : However, CoreNEURON will not accept usage of the low-quality generator, : and, if noiseFromRandom is used to specify the random stream, that stream : must be using the Random123 generator. : The recommended idiom for specfication of the random stream is to use : noiseFromRandom123(id1, id2[, id3]) : If any instance uses noiseFromRandom123, then no instance can use noiseFromRandom : and vice versa. NEURON { ARTIFICIAL_CELL NetStim RANGE interval, number, start RANGE noise THREADSAFE : only true if every instance has its own distinct Random BBCOREPOINTER donotuse } PARAMETER { interval = 10 (ms) <1e-9,1e9>: time between spikes (msec) number = 10 <0,1e9> : number of spikes (independent of noise) start = 50 (ms) : start of first spike noise = 0 <0,1> : amount of randomness (0.0 - 1.0) } ASSIGNED { event (ms) on ispike donotuse } VERBATIM #if NRNBBCORE /* running in CoreNEURON */ #define IFNEWSTYLE(arg) arg #else /* running in NEURON */ /* 1 means noiseFromRandom was called when _ran_compat was previously 0 . 2 means noiseFromRandom123 was called when _ran_compart was previously 0. */ static int _ran_compat; /* specifies the noise style for all instances */ #define IFNEWSTYLE(arg) if(_ran_compat == 2) { arg } #endif /* running in NEURON */ ENDVERBATIM :backward compatibility PROCEDURE seed(x) { VERBATIM #if !NRNBBCORE ENDVERBATIM set_seed(x) VERBATIM #endif ENDVERBATIM } INITIAL { VERBATIM if (_p_donotuse) { /* only this style initializes the stream on finitialize */ IFNEWSTYLE(nrnran123_setseq((nrnran123_State*)_p_donotuse, 0, 0);) } ENDVERBATIM on = 0 : off ispike = 0 if (noise < 0) { noise = 0 } if (noise > 1) { noise = 1 } if (start >= 0 && number > 0) { on = 1 : randomize the first spike so on average it occurs at : start + noise*interval event = start + invl(interval) - interval*(1. - noise) : but not earlier than 0 if (event < 0) { event = 0 } net_send(event, 3) } } PROCEDURE init_sequence(t(ms)) { if (number > 0) { on = 1 event = 0 ispike = 0 } } FUNCTION invl(mean (ms)) (ms) { if (mean <= 0.) { mean = .01 (ms) : I would worry if it were 0. } if (noise == 0) { invl = mean }else{ invl = (1. - noise)*mean + noise*mean*erand() } } VERBATIM #include "nrnran123.h" #if !NRNBBCORE /* backward compatibility */ double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); int nrn_random_isran123(void* r, uint32_t* id1, uint32_t* id2, uint32_t* id3); #endif ENDVERBATIM FUNCTION erand() { VERBATIM if (_p_donotuse) { /* :Supports separate independent but reproducible streams for : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ #if !NRNBBCORE if (_ran_compat == 2) { _lerand = nrnran123_negexp((nrnran123_State*)_p_donotuse); }else{ _lerand = nrn_random_pick(_p_donotuse); } #else _lerand = nrnran123_negexp((nrnran123_State*)_p_donotuse); #endif return _lerand; }else{ #if NRNBBCORE assert(0); #else /* : the old standby. Cannot use if reproducible parallel sim : independent of nhost or which host this instance is on : is desired, since each instance on this cpu draws from : the same stream */ #endif } #if !NRNBBCORE ENDVERBATIM erand = exprand(1) VERBATIM #endif ENDVERBATIM } PROCEDURE noiseFromRandom() { VERBATIM #if !NRNBBCORE { void** pv = (void**)(&_p_donotuse); if (_ran_compat == 2) { fprintf(stderr, "NetStim.noiseFromRandom123 was previously called\n"); assert(0); } _ran_compat = 1; if (ifarg(1)) { *pv = nrn_random_arg(1); }else{ *pv = (void*)0; } } #endif ENDVERBATIM } PROCEDURE noiseFromRandom123() { VERBATIM #if !NRNBBCORE { nrnran123_State** pv = (nrnran123_State**)(&_p_donotuse); if (_ran_compat == 1) { fprintf(stderr, "NetStim.noiseFromRandom was previously called\n"); assert(0); } _ran_compat = 2; if (*pv) { nrnran123_deletestream(*pv); *pv = (nrnran123_State*)0; } if (ifarg(3)) { *pv = nrnran123_newstream3((uint32_t)*getarg(1), (uint32_t)*getarg(2), (uint32_t)*getarg(3)); }else if (ifarg(2)) { *pv = nrnran123_newstream((uint32_t)*getarg(1), (uint32_t)*getarg(2)); } } #endif ENDVERBATIM } VERBATIM #if !NRNBBCORE static void bbcore_write(double* x, int* d, int* xx, int *offset, _threadargsproto_) { if (!noise) { return; } /* error if using the legacy scop_exprand */ if (!_p_donotuse) { fprintf(stderr, "NetStim: cannot use the legacy scop_negexp generator for the random stream.\n"); assert(0); } if (d) { uint32_t* di = ((uint32_t*)d) + *offset; if (_ran_compat == 1) { void** pv = (void**)(&_p_donotuse); /* error if not using Random123 generator */ if (!nrn_random_isran123(*pv, di, di+1, di+2)) { fprintf(stderr, "NetStim: Random123 generator is required\n"); assert(0); } }else{ nrnran123_State** pv = (nrnran123_State**)(&_p_donotuse); nrnran123_getids3(*pv, di, di+1, di+2); } /*printf("Netstim bbcore_write %d %d %d\n", di[0], di[1], di[3]);*/ } *offset += 3; } #endif static void bbcore_read(double* x, int* d, int* xx, int* offset, _threadargsproto_) { assert(!_p_donotuse); if (noise) { uint32_t* di = ((uint32_t*)d) + *offset; nrnran123_State** pv = (nrnran123_State**)(&_p_donotuse); *pv = nrnran123_newstream3(di[0], di[1], di[2]); }else{ return; } *offset += 3; } ENDVERBATIM PROCEDURE next_invl() { if (number > 0) { event = invl(interval) } if (ispike >= number) { on = 0 } } NET_RECEIVE (w) { if (flag == 0) { : external event if (w > 0 && on == 0) { : turn on spike sequence : but not if a netsend is on the queue init_sequence(t) : randomize the first spike so on average it occurs at : noise*interval (most likely interval is always 0) next_invl() event = event - interval*(1. - noise) net_send(event, 1) }else if (w < 0) { : turn off spiking definitively on = 0 } } if (flag == 3) { : from INITIAL if (on == 1) { : but ignore if turned off by external event init_sequence(t) net_send(0, 1) } } if (flag == 1 && on == 1) { ispike = ispike + 1 net_event(t) next_invl() if (on == 1) { net_send(event, 1) } } } COMMENT Presynaptic spike generator --------------------------- This mechanism has been written to be able to use synapses in a single neuron receiving various types of presynaptic trains. This is a "fake" presynaptic compartment containing a spike generator. The trains of spikes can be either periodic or noisy (Poisson-distributed) Parameters; noise: between 0 (no noise-periodic) and 1 (fully noisy) interval: mean time between spikes (ms) number: number of spikes (independent of noise) Written by Z. Mainen, modified by A. Destexhe, The Salk Institute Modified by Michael Hines for use with CVode The intrinsic bursting parameters have been removed since generators can stimulate other generators to create complicated bursting patterns with independent statistics (see below) Modified by Michael Hines to use logical event style with NET_RECEIVE This stimulator can also be triggered by an input event. If the stimulator is in the on==0 state (no net_send events on queue) and receives a positive weight event, then the stimulator changes to the on=1 state and goes through its entire spike sequence before changing to the on=0 state. During that time it ignores any positive weight events. If, in an on!=0 state, the stimulator receives a negative weight event, the stimulator will change to the on==0 state. In the on==0 state, it will ignore any ariving net_send events. A change to the on==1 state immediately fires the first spike of its sequence. ENDCOMMENT neuron-7.5/src/nrnoc/neuron.h000077500000000000000000000063511323325274500162760ustar00rootroot00000000000000#include "options.h" #if METHOD3 extern int spatial_method(); #endif #if NEMO extern int neuron2nemo(), nemo2neuron(); #endif extern void node_data(), disconnect(); extern void batch_run(), batch_save(); extern void pt3dclear(), pt3dadd(), n3d(), x3d(), y3d(), z3d(), arc3d(), diam3d(); extern void pt3dinsert(), pt3dremove(), pt3dchange(); extern void define_shape(), pt3dconst(), pt3dstyle(); extern void spine3d(), setSpineArea(), getSpineArea(); extern void area(), ri(); extern void initnrn(), nrnhoc_topology(), fadvance(), distance(), finitialize(); extern void fstim(), fstimi(); extern void ion_style(), ion_register(), ion_charge(), nernst(), ghk(); extern void section_owner(); /* returns object that created section */ extern void make_mechanism(), make_pointprocess(); extern void nrnpython(); #if !SEJNOWSKI extern void fsyn(), fsyng(), fsyni(); #endif extern void fclamp(), fclampi(), fclampv(), prstim(); extern void fcurrent(), fmatrix(), frecord_init(); extern void issection(), ismembrane(), sectionname(), psection(); extern void pop_section(), push_section(), section_exists(); extern void delete_section(); extern int secondorder, diam_changed, nrn_shape_changed_, nrn_netrec_state_adjust; extern double clamp_resist; extern double celsius; extern int stoprun; extern void fit_praxis(), attr_praxis(), pval_praxis(), stop_praxis(); #if KEEP_NSEG_PARM extern void keep_nseg_parm(); #endif extern void nrnallsectionmenu(), nrnallpointmenu(), nrnsecmenu(); extern void nrnglobalmechmenu(), nrnmechmenu(), nrnpointmenu(); extern void this_section(), this_node(), parent_section(), parent_node(); extern void parent_connection(), section_orientation(); #if SEJNOWSKI extern void fdefault(); /* for sej_menu.c */ extern void dump_vars(); /* sej_default.c */ extern void update_id_info(), params(), private_menu(); /* sej_menu.c */ extern void save_run(), save_params(), flush(), file_exist(); /* sej_menu.c */ extern void sassign(), dassign(), setup_id_info(), clean_dir();/* sej_menu.c */ extern void ftime(), fseed(), fran(), rand(), norm(), pois(); /* sej_ransyn.c */ extern void syn_reset(), fsyn(), fsyn_set(), fsyng(), fsyni(); /* sej_synapse.c */ extern void con_reset(), fcon(), fcon_set(), fcong(), fconi(); /* sej_connect.c */ extern void top2(), dump(), dump_all(); /* sej_dump.c */ extern void ptest(); /* non-initialized variables */ double ic; double id_number, param_number; /* for sej_menu.c */ /* initialized variables */ double stop_time, nsteps, vrest; double init_seed, run_seed, cainit, kinit, nainit; double dump_flag, print_flag, graph_flag, gray_flag; double fig_flag, timer_flag, stim_flag, view_flag; #endif #if FISHER extern void rcsdiff_file(), rcs_version(), rcs_co_file(); /* rcs.c */ extern void rcs_ci_file(), rcs_view_file(); /* rcs.c */ extern void add_version_entry(), save_output_file(); /* sys.c */ extern void answer_yes(), file_exist(), dassign(), sassign(); /* sys.c */ extern void setup_id_info(), update_id_info(); /* sys.c */ /* non-initialized variables */ #if !SEJNOWSKI double id_number; /* sys.c */ #endif #endif neuron-7.5/src/nrnoc/nmodlmutex.h000066400000000000000000000006021323325274500171520ustar00rootroot00000000000000#ifndef nmodlmutex_h #define nmodlmutex_h #include #if USE_PTHREAD #include extern pthread_mutex_t* _nmodlmutex; #define _NMODLMUTEXLOCK {if (_nmodlmutex) { pthread_mutex_lock(_nmodlmutex); }} #define _NMODLMUTEXUNLOCK {if (_nmodlmutex) { pthread_mutex_unlock(_nmodlmutex); }} #else #define _NMODLMUTEXLOCK /**/ #define _NMODLMUTEXUNLOCK /**/ #endif #endif neuron-7.5/src/nrnoc/nonvintblock.h000066400000000000000000000066321323325274500174750ustar00rootroot00000000000000#ifndef nonvintblock_h #define nonvintblock_h #if defined(__cplusplus) extern "C" { #endif /* Interface for adding blocks of equations setup and solved in python analogous to the LONGITUDINAL_DIFFUSION at nonvint time for fixed and variable step methods. Of course, limited to single thread. The substantive idea is embodied in the last 7 definitions below that look like functions with distinct prototypes. The obscurity is due to having a single function pointer in nrniv/nrnoc library space which gets dynamically filled in when the Python nonvint_block_supervisor module is imported. When that function is called, the supervisor interprets the remaining arguments according to the first "method" argument. The tid (thread id) argument should always be 0. Only one of the methods has a meaningful int return value. The other uses can merely return 0. */ #if defined(nrnoc_fadvance_c) /* define only in fadvance.c */ #define nonvintblock_extern /**/ #else /* declare everywhere else */ #define nonvintblock_extern extern #endif extern int nrn_nonvint_block_helper(int method, int length, double* pd1, double* pd2, int tid); nonvintblock_extern int (*nrn_nonvint_block)(int method, int length, double* pd1, double* pd2, int tid); #define nonvint_block(method, size, pd1, pd2, tid) \ nrn_nonvint_block ? nrn_nonvint_block_helper(method, size, pd1, pd2, tid) : 0 /* called near end of nrnoc/treeset.c:v_setup_vectors after structure_change_cnt is incremented. */ #define nrn_nonvint_block_setup() nonvint_block(0, 0, 0, 0, 0) /* called in nrnoc/fadvance.c:nrn_finitialize before mod file INITIAL blocks */ #define nrn_nonvint_block_init(tid) nonvint_block(1, 0, 0, 0, tid) /* called at end of nrnoc/treeset.c:rhs and nrncvode/cvtrset.cpp:rhs */ #define nrn_nonvint_block_current(size, rhs, tid) nonvint_block(2, size, rhs, 0, tid) /*if any ionic membrane currents are generated, they subtract from NrnThread._actual_rhs*/ /* called at end of nrnoc/treeset.c:lhs and nrncvode/cvtrset.cpp:lhs */ #define nrn_nonvint_block_conductance(size, d, tid) nonvint_block(3, size, d, 0, tid) /*if any ionic membrane currents are generated, di/dv adds to _actual_d */ /* called at end of nrnoc/fadvance.c:nonvint */ #define nrn_nonvint_block_fixed_step_solve(tid) nonvint_block(4, 0, 0, 0, tid) /* returns the number of extra equations solved by cvode or ida */ #define nrn_nonvint_block_ode_count(offset, tid) nonvint_block(5, offset, 0, 0, tid) /* fill in the double* y with the initial values */ #define nrn_nonvint_block_ode_reinit(size, y, tid) nonvint_block(6, size, y, 0, tid) /* using the values in double* y, fill in double* ydot so that ydot = f(y) */ #define nrn_nonvint_block_ode_fun(size, y, ydot, tid) nonvint_block(7, size, y, ydot, tid) /* Solve (1 + dt*jacobian)*x = b replacing b values with the x values. Note that y (state values) are available for constructing the jacobian (if the problem is non-linear) */ #define nrn_nonvint_block_ode_solve(size, b, y, tid) nonvint_block(8, size, b, y, tid) /* Do any desired preprocessing of Jacobian in preparation for ode_solve. This will be called at least every time dt changes */ #define nrn_nonvint_block_jacobian(size, ypred, ydot, tid) nonvint_block(9, size, ypred, ydot, tid) /* multiply the existing values in y (cvode.atol()) with appropriate scale factors */ #define nrn_nonvint_block_ode_abstol(size, y, tid) nonvint_block(10, size, y, 0, tid) #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnoc/nrn_ansi.h000066400000000000000000000130531323325274500165710ustar00rootroot00000000000000#ifndef nrn_ansi_h #define nrn_ansi_h #if defined(__cplusplus) extern "C" { #endif extern int state_discon_allowed_; extern int section_object_seen; extern int nrn_isecstack(void); extern void nrn_secstack(int); extern void oc_save_cabcode(int* a1, int* a2); extern void oc_restore_cabcode(int* a1, int* a2); extern void new_sections(Object* ob, Symbol* sym, hoc_Item** pitm, int size); extern void cable_prop_assign(Symbol* sym, double* pd, int op); extern void nrn_parent_info(Section* s); extern void nrn_relocate_old_points(Section* oldsec, Node* oldnode, Section* sec, Node* node); extern int nrn_at_beginning(Section* sec); extern void nrn_node_destruct1(Node*); extern void mech_insert1(Section*, int); extern void extcell_2d_alloc(Section* sec); extern int nrn_is_ion(int); extern void single_prop_free(Prop*); extern void prop_free(Prop**); extern int can_change_morph(Section*); extern void nrn_area_ri(Section* sec); extern void nrn_diam_change(Section*); extern void sec_free(hoc_Item*); extern int node_index(Section* sec, double x); extern void extcell_node_create(Node*); extern const char* sec_and_position(Section* sec, Node* nd); extern void section_order(void); extern Section* nrn_sec_pop(void); extern Node* node_ptr(Section* sec, double x, double* parea); extern double* nrn_vext_pd(Symbol* s, int indx, Node* nd); extern double* nrnpy_dprop(Symbol* s, int indx, Section* sec, short inode, int* err); extern void nrn_disconnect(Section*); extern void mech_uninsert1(Section* sec, Symbol* s); extern Object* nrn_sec2cell(Section*); extern int nrn_sec2cell_equals(Section*, Object*); extern double* dprop(Symbol* s, int indx, Section* sec, short inode); extern void nrn_initcode(); extern int segment_limits(double*); extern void second_order_cur(NrnThread*); extern void hoc_register_dparam_size(int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void hoc_register_dparam_semantics(int, int, const char*); extern void setup_topology(void); extern int nrn_errno_check(int); extern void long_difus_solve(int method, NrnThread* nt); extern void nrn_fihexec(int); extern int special_pnt_call(Object*, Symbol*, int); extern void ob_sec_access_push(hoc_Item*); extern void nrn_mk_prop_pools(int); extern void SectionList_reg(void); extern void SectionRef_reg(void); extern void modl_reg(void); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void hoc_symbol_tolerance(Symbol*, double); extern void node_destruct(Node**, int); extern void nrn_sec_ref(Section**, Section*); extern void hoc_level_pushsec(Section*); extern double nrn_ra(Section*); extern int node_index_exact(Section*, double); extern void nrn_cachevec(int); extern void nrn_ba(NrnThread*, int); extern void nrniv_recalc_ptrs(void); extern void nrn_recalc_ptrvector(void); extern void nrn_recalc_ptrs(double*(*r)(double*)); extern void nrn_rhs_ext(NrnThread*); extern void nrn_setup_ext(NrnThread*); extern void nrn_cap_jacob(NrnThread*, Memb_list*); extern void clear_point_process_struct(Prop* p); extern void ext_con_coef(void); extern void nrn_multisplit_ptr_update(void); extern void nrn_cache_prop_realloc(); extern void nrn_use_daspk(int); extern void nrn_update_ps2nt(void); extern void _nrn_free_fornetcon(void**); extern void add_nrn_fornetcons(int, int); extern void _nrn_free_watch(Datum*, int, int); extern void _nrn_watch_activate(Datum*, double(*)(Point_process*), int, Point_process*, int, double); extern void hoc_reg_ba(int, nrn_bamech_t, int); extern int nrn_pointing(double*); extern void activstim_rhs(void); extern void activclamp_rhs(void); extern void activclamp_lhs(void); extern void activsynapse_rhs(void); extern void activsynapse_lhs(void); extern void stim_prepare(void); extern void clamp_prepare(void); extern void synapse_prepare(void); extern void v_setup_vectors(void); extern void section_ref(Section*); extern void section_unref(Section*); extern const char* secname(Section*); extern void nrn_pushsec(Section*); extern void nrn_popsec(void); extern Section* chk_access(void); extern void nrn_rangeconst(Section*, Symbol*, double* value, int op); extern Prop* nrn_mechanism(int type, Node*); extern int nrn_exists(Symbol*, Node*); extern double* nrn_rangepointer(Section*, Symbol*, double x); extern double* cable_prop_eval_pointer(Symbol*); // section on stack will be popped extern char* hoc_section_pathname(Section*); extern double nrn_arc_position(Section*, Node*); extern double node_dist(Section*, Node*); // distance of node to parent position extern Node* node_exact(Section*, double); extern double nrn_section_orientation(Section*); extern double nrn_connection_position(Section*); extern Section* nrn_trueparent(Section*); extern double topol_distance(Section*, Node*, Section*, Node*, Section**, Node**); extern int arc0at0(Section*); extern void nrn_clear_mark(void); extern short nrn_increment_mark(Section*); extern short nrn_value_mark(Section*); extern int is_point_process(Object*); extern int nrn_vartype(Symbol*); // nrnocCONST, DEP, STATE extern void recalc_diam(void); extern double nrn_call_mech_func(Symbol*, int narg, Prop*, int type); extern Prop* nrn_mechanism_check(int type, Section* sec, int inode); extern int nrn_use_fast_imem; extern void nrn_fast_imem_alloc(); extern void nrn_calc_fast_imem(NrnThread*); extern void nrn_seg_or_x_arg(int iarg, Section** psec, double* px); extern void nrn_pt3dclear(Section*); extern void nrn_length_change(Section*, double); extern void stor_pt3d(Section*, double x, double y, double z, double d); extern int nrn_netrec_state_adjust; #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnoc/nrnconfigargs.h.in000066400000000000000000000002011323325274500202160ustar00rootroot00000000000000#ifndef nrnconfigargs_h #define nrnconfigargs_h /* define to the args passed to configure */ #define NRN_CONFIG_ARGS "" #endif neuron-7.5/src/nrnoc/nrncvode.h000066400000000000000000000017001323325274500165740ustar00rootroot00000000000000#ifndef nrncvode_h #define nrncvode_h #if defined(__cplusplus) extern "C" { #endif extern void cvode_fadvance(double); extern void cvode_finitialize(double); extern void nrncvode_set_t(double); extern void deliver_net_events(NrnThread*); extern void nrn_deliver_events(NrnThread*); extern void clear_event_queue(void); extern void init_net_events(void); extern void nrn_record_init(void); extern void nrn_play_init(void); extern void fixed_record_continuous(NrnThread* nt); extern void fixed_play_continuous(NrnThread* nt); extern void nrn_solver_prepare(void); extern void nrn_random_play(NrnThread*); extern void nrn_daspk_init_step(double, double, int); extern void nrndae_init(void); extern void nrndae_update(void); extern void nrn_update_2d(NrnThread*); extern void nrn_capacity_current(NrnThread* _nt, Memb_list* ml); extern void nrn_spike_exchange_init(void); extern void nrn_spike_exchange(NrnThread* nt); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnoc/nrndae_c.h000066400000000000000000000011331323325274500165270ustar00rootroot00000000000000#ifndef nrndae_c_h #define nrndae_c_h #if defined(__cplusplus) extern "C" { #endif extern void nrndae_alloc(void); extern int nrndae_extra_eqn_count(void); extern void nrndae_init(void); extern void nrndae_rhs(void); /* relative to c*dy/dt = -g*y + b */ extern void nrndae_lhs(void); extern void nrndae_dkmap(double**, double**); extern void nrndae_dkres(double*, double*, double*); extern void nrndae_dkpsol(double); extern void nrndae_update(void); extern void nrn_matrix_node_free(void); extern int nrndae_list_is_empty(void); extern int nrn_use_daspk_; #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnoc/nrniv_mf.h000066400000000000000000000100071323325274500165740ustar00rootroot00000000000000#ifndef nrniv_mf_h #define nrniv_mf_h #include "membfunc.h" #include struct NrnThread; union Datum; #if defined(__cplusplus) extern "C" { #endif typedef double (*ldifusfunc3_t)(int, double*, Datum*, double*, double*, Datum*, NrnThread*); typedef void ldifusfunc2_t(int, ldifusfunc3_t, void**, int, int, int, NrnThread*); typedef void (*ldifusfunc_t)(ldifusfunc2_t, NrnThread*); typedef void (*pnt_receive_t)(Point_process*, double*, double); typedef void (*pnt_receive_init_t)(Point_process*, double*, double); extern void register_mech(const char**, Pvmp, Pvmi, Pvmi, Pvmi, Pvmi, int, int); extern int point_register_mech(const char**, Pvmp, Pvmi, Pvmi, Pvmi, Pvmi, int, int, void*(*)(Object*), void(*)(void*), Member_func*); extern void hoc_register_cvode(int, nrn_ode_count_t, nrn_ode_map_t, Pvmi, Pvmi); extern void hoc_register_ldifus1(ldifusfunc_t); extern int nrn_get_mechtype(const char*); extern int v_structure_change; extern void ion_reg(const char*, double); extern Prop* need_memb(Symbol*); extern Prop* need_memb_cl(Symbol*,int*,int*); extern Prop* prop_alloc(Prop**, int, Node*); extern void nrn_promote(Prop*, int, int); extern void nrn_check_conc_write(Prop*, Prop*, int); extern void nrn_writes_conc(int, int); extern void nrn_wrote_conc(Symbol*, double*, int); extern double nrn_ion_charge(Symbol*); extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); extern void* create_point_process(int, Object*); extern void destroy_point_process(void*); extern double has_loc_point(void*); extern double get_loc_point_process(void*); extern double loc_point_process(int, void*); extern Prop* nrn_point_prop_; extern Point_process* ob2pntproc(Object*); extern Point_process* ob2pntproc_0(Object*); extern int at_time(NrnThread*, double); extern void nrn_complain(double*); extern int ifarg(int); extern pnt_receive_t* pnt_receive; extern pnt_receive_init_t* pnt_receive_init; extern short* pnt_receive_size; extern void add_nrn_artcell(int, int); extern void add_nrn_has_net_event(int); extern void set_seed(double); extern void nrn_net_send(void**, double*, Point_process*, double, double); extern void nrn_net_move(void**, Point_process*, double); extern void nrn_net_event(Point_process*, double); extern void artcell_net_send(void**, double*, Point_process*, double, double); extern void artcell_net_move(void**, Point_process*, double); extern void register_destructor(Pvmp); extern void hoc_register_synonym(int, void(*)(int, double**, Datum**)); extern double* _getelm(int, int); extern double* _nrn_thread_getelm(void*, int, int); extern int sparse(void**, int, int*, int*, double*, double*, double, int(*)(), double**, int); extern int sparse_thread(void**, int, int*, int*, double*, double*, double, int(*)(void*, double*, double*, Datum*, Datum*, NrnThread*), int, Datum*, Datum*, NrnThread*); extern int _ss_sparse(void**, int, int*, int*, double*, double*, double, int(*)(), double**, int); extern int _ss_sparse_thread(void**, int, int*, int*, double*, double*, double, int(*)(void*, double*, double*, Datum*, Datum*, NrnThread*), int, void*, void*, void*); extern int _cvode_sparse(void**, int, int*, double*, int(*)(), double**); extern int _cvode_sparse_thread(void**, int, int*, double*, int(*)(void*, double*, double*, Datum*, Datum*, NrnThread*), void*, void*, void*); extern int _nrn_destroy_sparseobj_thread(void*); extern int derivimplicit(int, int, int*, int*, double*, double*, double, int(*)(), double**); extern int derivimplicit_thread(int, int*, int*, double*, int(*)(double*, union Datum*, union Datum*, struct NrnThread*), void*, void*, void*); extern int _ss_derivimplicit(int, int, int*, int*, double*, double*, double, int(*)(), double**); extern int _ss_derivimplicit_thread(int, int*, int*, double*, int(*)(double*, union Datum*, union Datum*, struct NrnThread*), void*, void*, void*); extern int euler_thread(int, int*, int*, double*, int(*)(double*, union Datum*, union Datum*, struct NrnThread*), union Datum*, union Datum*, struct NrnThread*); #if defined(__cplusplus) } #endif #endif /* nrniv_mf_h */ neuron-7.5/src/nrnoc/nrnnemo.c000066400000000000000000000115671323325274500164410ustar00rootroot00000000000000#include <../../nrnconf.h> #include "section.h" #define OBSOLETE 1 #if !OBSOLETE #include "membfunc.h" #include "hocassrt.h" /* basic loop taken from topology() in solve.c */ static FILE *fin, *fmark, *fdat; static int inode; static dashes(), file_func(), dat_head(); #define MAXMARKS 32 static long *marksec; static printline(); extern int section_count; extern Section** secorder; #endif void nemo2neuron(void) { hoc_retpushx(1.0); } void neuron2nemo(void) { #if OBSOLETE hoc_execerror("neuron2nemo:", "implementation is obsolete"); #else short i, isec, imark; extern int tree_changed; char name[50]; if (tree_changed) { setup_topology(); } Sprintf(name, "in/%s", gargstr(1)); if ((fin = fopen(name, "w")) == (FILE *)0) { hoc_execerror("Can't write to ", name); } Sprintf(name, "mark/%s", gargstr(1)); if ((fmark = fopen(name, "w")) == (FILE *)0) { hoc_execerror("Can't write to ", name); } Sprintf(name, "dat/%s", gargstr(1)); if ((fdat = fopen(name, "w")) == (FILE *)0) { hoc_execerror("Can't write to ", name); } dat_head(); /* set up the mark for every section */ imark = 1; marksec = (long *)ecalloc(section_count, sizeof(long)); for (i=1; i < section_count; i++) { isec = i; if (marksec[isec]) { marksec[i] = marksec[isec]; }else{ if (imark < MAXMARKS) { marksec[i] = 1L << (imark++); file_func(secorder[isec]); } } } Fprintf(fin, "/* created by NEURON */\n"); inode = 0; for (i=0; ichild, 0, 0., (double)(i*100)); dashes(v_node[i]->child, 0., (double)(i*100), 0., 1); } free((char *)marksec); fclose(fin); fclose(fmark); #endif hoc_retpushx(1.0); } #if !OBSOLETE static dashes(Section* sec, double x, double y, double theta, int leftend) { Section* ch; int i, nrall, irall; double cos(), sin(), xx, yy, ttheta, dx; dx = section_length(sec)/((double)sec->nnode - 1); nrall = (int) sec->prop->dparam[4].val; for (irall=0; irall < nrall; irall++) { xx = x; yy=y; ttheta = theta + (double)(nrall - 2*irall - 1)/(double)nrall; for (i=0; innode - 1; i++) { xx += dx*cos(ttheta); yy += dx*sin(ttheta); printline(sec, i, xx, yy); } for (i=sec->nnode - 1; i>=0; i--) { if ((ch = sec->pnode[i]->child) != (Section*)0) { if (i == sec->nnode - 1) { dashes(ch, xx, yy, ttheta, 0); }else{ dashes(ch, xx, yy, ttheta+.5, 0); } } if (i < sec->nnode - 1) { xx -= dx*cos(ttheta); yy -= dx*sin(ttheta); } } if (leftend) { ttheta = 3.14159 - .5; } if ((ch = sec->sibling) != (Section*)0) { dashes(ch, x, y, ttheta+.5, 0); } } } static double diamval(Node* nd) { Prop *p; for (p = nd->prop; p; p = p->next) { if (p->type == MORPHOLOGY) { break; } } assert(p); return p->param[0]; } static void printline(Section* sec, int i, double x, double y) { char type; int nb; Section* csec; Node *nd; double d; ++inode; assert(sec->nnode > 1); type = 'C'; nd = sec->pnode[i]; d = diamval(nd); nb = 0; for (csec = nd->child; csec; csec = csec->sibling) { nb += (int)csec->prop->dparam[4].val; } if (i == sec->nnode - 2) { ++i; nd = sec->pnode[i]; for (csec = nd->child; csec; csec = csec->sibling) { nb += (int)csec->prop->dparam[4].val; } } if (i < sec->nnode - 2) { nb++; } if (nb>2) { /*many branches*/ type = 'B'; x -= .001; while (nb>2) { fwrite((char *)&marksec[sec->order], sizeof(long), 1, fmark); Fprintf(fin, "%d\t%c\t%g\t%g\t0\t%g\n", inode++, type, (x += .001), y, d); --nb; } } else if ( nb == 2) { /*one branch*/ type = 'B'; } else if (nb == 0) { type = 'T'; } fwrite((char *)&marksec[sec->order], sizeof(long), 1, fmark); Fprintf(fin, "%d\t%c\t%g\t%g\t0\t%g\n", inode, type, x, y, d); } /* modified from nemo.c */ static void file_func(Section* sec) { int active; Node *nd; Prop *p; Symbol *s, *hoc_lookup(); static int hhtype = 0; if (!hhtype) { s = hoc_lookup("HH"); hhtype = s->subtype; } nd = sec->pnode[0]; active = 0; for (p = nd->prop; p; p = p->next) { if (p->type == hhtype) { active = 1; } } assert(sec->prop->dparam[0].sym); fprintf(fdat,"%s\n",sec->prop->dparam[0].sym->name); fprintf(fdat,"^area %g\n",1.); fprintf(fdat,"^Rm %g\n",1.); fprintf(fdat,"^active %d\n",active); fprintf(fdat,"^synapse %d\n",0); fprintf(fdat,"^Erev %g\n",0.); fprintf(fdat,"^gback %g\n",0.); fprintf(fdat,"^gsyn %g\n",0.); fprintf(fdat,"^tstart %g\n",0.); fprintf(fdat,"^twidth %g\n",0.); } static void dat_head(void) { double Ra = 35.4; fprintf(fdat,"freq\n"); fprintf(fdat,"%d %g %g\n",4, 1., 1000.); fprintf(fdat,"tran\n"); fprintf(fdat,"%g %g\n", .1, 10.); fprintf(fdat,"elec\n"); fprintf(fdat,"%g %g %g\n",1000., 1.e-6, Ra); fprintf(fdat,"syn\n"); fprintf(fdat,"%g %g\n",30., -15.); fprintf(fdat,"hh\n"); fprintf(fdat,"%g %g %g %g %g %g\n",1.,1.,1.,1.,1.,1.); fprintf(fdat,"batt\n"); fprintf(fdat,"%g %g\n",115., -12.); fprintf(fdat,"%10d\n",9999); } #endif neuron-7.5/src/nrnoc/nrnnoiv.c000066400000000000000000000071351323325274500164520ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "nrnredef.h" #include "section.h" #include "nrnmpiuse.h" #include "nrndae_c.h" #define hoc_retpushx hoc_retpushx /* stubs for nrnoc. The actual functions are for interviews menus */ void nrnallsectionmenu(){hoc_retpushx(0);} void nrnallpointmenu(){hoc_retpushx(0);} void nrnsecmenu(){hoc_retpushx(0);} void nrnglobalmechmenu(){hoc_retpushx(0);} void nrnmechmenu(){hoc_retpushx(0);} void nrnpointmenu(){hoc_retpushx(0);} void make_mechanism(){hoc_retpushx(0);} void make_pointprocess(){hoc_retpushx(0);} void nrnpython() {hoc_retpushx(0);} void nrn_prcellstate(int gid, const char* suffix){} /*ARGSUSED*/ void hoc_construct_point(Object* ob, int i){} void nrn_random_play(){} void* nrn_random_arg(i) int i; { return (void*)0; } double nrn_random_pick(void* r) { return 0.; } int nrn_random_isran123(void* r, uint32_t* id1, uint32_t* id2, uint32_t* id3){ return 0.; } void hoc_new_opoint(){} int special_pnt_call(Object* ob, Symbol* sym, int narg){return 0;} void bbs_handle(){} void nrndae_alloc(void){} int nrndae_extra_eqn_count(void){return 0;} void nrndae_init(void){} void nrndae_rhs(void){} void nrndae_lhs(void){} void nrndae_dkmap(double** pv, double** pvdot){} void nrndae_dkres(double* y, double* yprime, double* delta){} void nrndae_dkpsol(double unused){} void nrndae_update(void){} int nrndae_list_is_empty(void){return 0;} void nrn_solver_prepare(){} void nrn_fihexec(i) int i;{} void nrn_deliver_events(tt) double tt;{} void nrn_record_init(){} void nrn_play_init(){} void fixed_record_continuous(){} void fixed_play_continuous(){} void nrniv_recalc_ptrs(){} void nrn_recalc_ptrvector(){} void nrn_extra_scatter_gather(int direction, int tid) {} void nrn_update_ion_pointer(int type, Datum* d, int i, int j) {} void nrn_update_ps2nt(){} int at_time(NrnThread* nt, double te) { double x = te - 1e-11; if (x > (nt->_t - nt->_dt) && x <= nt->_t) { return 1; }else{ return 0; } } void net_event(){hoc_execerror("net_event only available in nrniv", (char*)0);} void net_send(){hoc_execerror("net_send only available in nrniv", (char*)0);} void artcell_net_send(){hoc_execerror("net_send only available in nrniv", (char*)0);} void net_move(){hoc_execerror("net_move only available in nrniv", (char*)0);} void artcell_net_move(){hoc_execerror("net_move only available in nrniv", (char*)0);} void nrn_use_daspk(i) int i; { } #if CVODE void cvode_fadvance(t)double t;{} void cvode_finitialize(double t0){} void nrncvode_set_t(double tt) {} void cvode_event(x) double x;{} void clear_event_queue(){} void init_net_events(){} void deliver_net_events(){} void hoc_reg_singlechan(){} void _singlechan_declare(){} void _nrn_single_react(){} #endif #if defined(CYGWIN) void* dll_lookup(s) char* s; {return 0;} void* dll_load(v, s) void* v; char* s; {return 0;} #endif void nrn_spike_exchange_init(){} void nrn_spike_exchange(NrnThread* nt){} void nrn_fake_fire(i,x,j)int i, j; double x;{} void nrn_daq_ao() {} void nrn_daq_ai() {} void nrn_daq_scanstart(){} void nrn_multisplit_ptr_update(){} void nrn_multisplit_bksub(){assert(0);} void nrn_multisplit_reduce_solve(){assert(0);} void nrn_multisplit_triang(){assert(0);} #if 1 || PARANEURON double* nrn_classicalNodeA(Node* n) {return (double*)0;} double* nrn_classicalNodeB(Node* n) {return (double*)0;} #endif void* nrn_pool_create(long count, int itemsize){assert(0); return (void*)0;} void nrn_pool_delete(void* pool){assert(0);} void nrn_pool_freeall(void* pool){assert(0);} void* nrn_pool_alloc(void* pool){assert(0); return (void*)0;} #if NRN_MUSIC void nrnmusic_init(int* parg, char*** pargv){} void nrnmusic_terminate(){} #endif neuron-7.5/src/nrnoc/nrnoc_ml.h000066400000000000000000000011241323325274500165650ustar00rootroot00000000000000#ifndef nrnoc_ml_h #define nrnoc_ml_h typedef struct Memb_list { Node** nodelist; #if CACHEVEC != 0 /* nodeindices contains all nodes this extension is responsible for, * ordered according to the matrix. This allows to access the matrix * directly via the nrn_actual_* arrays instead of accessing it in the * order of insertion and via the node-structure, making it more * cache-efficient */ int *nodeindices; #endif /* CACHEVEC */ double** data; Datum** pdata; Prop** prop; Datum* _thread; /* thread specific data (when static is no good) */ int nodecount; } Memb_list; #endif neuron-7.5/src/nrnoc/nrnredef.h000077500000000000000000000002131323325274500165620ustar00rootroot00000000000000#ifndef nrnredef_h #define nrnredef_h #define net_send nrn_net_send #define net_move nrn_net_move #define net_event nrn_net_event #endif neuron-7.5/src/nrnoc/nrntimeout.c000066400000000000000000000034161323325274500171630ustar00rootroot00000000000000#include <../../nrnconf.h> #include #if NRNMPI #if defined(HAVE_SETITIMER) && defined(HAVE_SIGACTION) #include #include #include #include void (*nrntimeout_call)(); static double told; static struct itimerval value; #if !defined(BLUEGENE) static struct sigaction act, oact; #endif #define NRNTIMEOUT_DEBUG 0 #if NRNTIMEOUT_DEBUG extern double nrn_time(); static old_nrn_time; #endif static void timed_out(int sig) { #if NRNTIMEOUT_DEBUG double z = nrn_time(); printf("timed_out(%d) wall_elapse=%g told=%g t=%g\n", sig, z-old_nrn_time, told, nrn_threads->_t); old_nrn_time = z; #endif if (nrn_threads->_t == told) { /* nothing has been accomplished since last signal*/ printf("nrn_timeout t=%g\n", nrn_threads->_t); if (nrntimeout_call) { (*nrntimeout_call)(); } nrnmpi_abort(0); } told = nrn_threads->_t; } void nrn_timeout(int seconds) { if (nrnmpi_myid != 0) { return; } #if NRNTIMEOUT_DEBUG printf("nrn_timeout(%d) t=%g\n", seconds, nrn_threads->_t); old_nrn_time = nrn_time(); #endif #if BLUEGENE if (seconds) { told = nrn_threads->_t; signal(SIGALRM, timed_out); }else{ signal(SIGALRM, SIG_DFL); } #else if (seconds) { told = nrn_threads->_t; act.sa_handler = timed_out; act.sa_flags = SA_RESTART; if(sigaction(SIGALRM, &act, &oact)) { printf("sigaction failed\n"); nrnmpi_abort(0); } }else{ sigaction(SIGALRM, &oact, (struct sigaction*)0); } #endif value.it_interval.tv_sec = seconds; value.it_interval.tv_usec = 0; value.it_value.tv_sec = seconds; value.it_value.tv_usec = 0; if(setitimer(ITIMER_REAL, &value, (struct itimerval*)0)) { printf("setitimer failed\n"); nrnmpi_abort(0); } } #else void nrn_timeout(int seconds) { } #endif /* not HAVE_SETITIMER */ #endif /*NRNMPI*/ neuron-7.5/src/nrnoc/nrnversion.c000077500000000000000000000100631323325274500171610ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include extern int nrn_global_argc; extern char** nrn_global_argv; extern int nrn_main_launch; /* 1 if nrniv, 2 if python, 0 if unknownn */ static char buf[256]; static char* sarg = 0; static char configargs[] = NRN_CONFIG_ARGS; #if defined(GIT_BRANCH) char* nrn_version(int i) { char head[1024]; char *cp; int b; buf[0] = '\0'; if (strncmp(GIT_BRANCH, "Release", 7) == 0) { sprintf(head, "%s (%s)", GIT_BRANCH, GIT_CHANGESET); }else{ sprintf(head, "VERSION %s %s%s(%s)", PACKAGE_VERSION, strcmp("trunk", GIT_BRANCH) ? GIT_BRANCH : "", strcmp("trunk", GIT_BRANCH) ? " " : "", GIT_CHANGESET); } if (i == 0) { sprintf(buf, "%s", PACKAGE_VERSION); }else if (i == 2) { sprintf(buf, "%s", head); }else if (i == 3) { sprintf(buf, "%s", GIT_CHANGESET); }else if (i == 4) { sprintf(buf, "%s", GIT_DATE); }else if (i == 5) { sprintf(buf, "%s", GIT_LOCAL); }else if (i == 6) { return configargs; }else if (i == 7) { int j, size; if (!sarg) { char* c; int size = 0; for (j=0; j < nrn_global_argc; ++j) { size += strlen(nrn_global_argv[j]) + 1; } sarg = (char*)calloc(size+1, sizeof(char)); c = sarg; for (j=0; j < nrn_global_argc; ++j) { sprintf(c, "%s%s", j?" ":"", nrn_global_argv[j]); c = c + strlen(c); } } return sarg; }else if (i == 8) { sprintf(buf, "%s", NRNHOST); }else if (i == 9) { sprintf(buf, "%d", nrn_main_launch); }else{ sprintf(buf, "NEURON -- %s %s", head, GIT_DATE); } return buf; } #elif defined(HG_BRANCH) char* nrn_version(int i) { char head[1024]; char *cp; int b; buf[0] = '\0'; if (strncmp(HG_TAG, "Release", 7) == 0) { sprintf(head, "%s (%s:%s)", HG_TAG, HG_LOCAL, HG_CHANGESET); }else if (strncmp(HG_BRANCH, "Release", 7) == 0) { sprintf(head, "%s (%s:%s)", HG_BRANCH, HG_LOCAL, HG_CHANGESET); }else{ sprintf(head, "VERSION %s %s%s(%s:%s)", PACKAGE_VERSION, strcmp("trunk", HG_BRANCH) ? HG_BRANCH : "", strcmp("trunk", HG_BRANCH) ? " " : "", HG_LOCAL, HG_CHANGESET); } if (i == 0) { sprintf(buf, "%s", PACKAGE_VERSION); }else if (i == 2) { sprintf(buf, "%s", head); }else if (i == 3) { sprintf(buf, "%s", HG_CHANGESET); }else if (i == 4) { sprintf(buf, "%s", HG_DATE); }else if (i == 5) { sprintf(buf, "%s", HG_LOCAL); }else if (i == 6) { return configargs; }else if (i == 7) { int j, size; if (!sarg) { char* c; int size = 0; for (j=0; j < nrn_global_argc; ++j) { size += strlen(nrn_global_argv[j]) + 1; } sarg = (char*)calloc(size+1, sizeof(char)); c = sarg; for (j=0; j < nrn_global_argc; ++j) { sprintf(c, "%s%s", j?" ":"", nrn_global_argv[j]); c = c + strlen(c); } } return sarg; }else if (i == 8) { sprintf(buf, "%s", NRNHOST); }else if (i == 9) { sprintf(buf, "%d", nrn_main_launch); }else{ sprintf(buf, "NEURON -- %s %s", head, HG_DATE); } return buf; } #else char* nrn_version(int i) { char head[1024]; char tail[50]; char *cp; int b; buf[0] = '\0'; if (strncmp(SVN_BRANCH, "Release", 7) == 0) { sprintf(head, "%s", SVN_BRANCH); }else{ sprintf(head, "VERSION %s%s%s", PACKAGE_VERSION, ((strcmp(SVN_BRANCH, "") == 0) ? "" : "."), SVN_BRANCH); } sprintf(tail, " %s", SVN_CHANGESET); b = 0; for (cp = tail; *cp; ++cp) { if (*cp == ' ' || *cp == '(' || *cp == ')' || (*cp >= '0' && *cp <= '9')) { ; }else{ b = 1; break; } } if (b == 0) { tail[0] = '\0'; } if (i == 0) { sprintf(buf, "%s", PACKAGE_VERSION); }else if (i == 2) { sprintf(buf, "%s.%s", head,SVN_TREE_CHANGE); }else if (i == 3) { sprintf(buf, "%s", SVN_BASE_CHANGESET); }else if (i == 4) { sprintf(buf, "%s", SVN_DATE); }else if (i == 5) { sprintf(buf, "%s", SVN_CHANGESET); }else{ sprintf(buf, "NEURON -- %s.%s (%s) %s%s", head, SVN_TREE_CHANGE, SVN_BASE_CHANGESET, SVN_DATE, tail); } return buf; } #endif neuron-7.5/src/nrnoc/nrnversion.h000066400000000000000000000001631323325274500171630ustar00rootroot00000000000000#define GIT_DATE "2017-09-25" #define GIT_BRANCH "master" #define GIT_CHANGESET "6b4c19f" #define GIT_LOCAL "1650" neuron-7.5/src/nrnoc/oclmp.c000066400000000000000000000252551323325274500160760ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__OClamp #define _nrn_initial _nrn_initial__OClamp #define nrn_cur _nrn_cur__OClamp #define _nrn_current _nrn_current__OClamp #define nrn_jacob _nrn_jacob__OClamp #define nrn_state _nrn_state__OClamp #define _net_receive _net_receive__OClamp #define icur icur__OClamp #define vstim vstim__OClamp #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define rs _p[0] #define on _p[1] #define off _p[2] #define vc _p[3] #define switched_on _p[4] #define i _p[5] #define onflag _p[6] #define v _p[7] #define _g _p[8] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_icur(); static double _hoc_vstim(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "icur", _hoc_icur, "vstim", _hoc_vstim, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "rs", 1e-09, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "rs", "megohm", "on", "ms", "off", "ms", "vc", "mV", "i", "nA", 0,0 }; static double delta_t = 0.01; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "OClamp", "rs", "on", "off", "vc", "switched_on", 0, "i", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 9, _prop); /*initialize range parameters*/ rs = 1; on = 0; off = 0; vc = 0; switched_on = 0; } _prop->param = _p; _prop->param_size = 9; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _oclmp_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 9, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 OClamp /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/oclmp.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int icur(_threadargsproto_); static int vstim(_threadargsproto_); static int icur ( _threadargsproto_ ) { if ( onflag ) { i = ( vc - v ) / rs ; } else { i = 0.0 ; } return 0; } static double _hoc_icur(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; icur ( _p, _ppvar, _thread, _nt ); return(_r); } static int vstim ( _threadargsproto_ ) { if ( switched_on ) { onflag = 1.0 ; at_time ( _nt, on ) ; at_time ( _nt, off ) ; if ( t < on ) { onflag = 0.0 ; } else if ( t > off ) { onflag = 0.0 ; } } else { onflag = 0.0 ; } icur ( _threadargs_ ) ; return 0; } static double _hoc_vstim(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; vstim ( _p, _ppvar, _thread, _nt ); return(_r); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { onflag = 0.0 ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { vstim ( _threadargs_ ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) += _rhs; }else #endif { NODERHS(_nd) += _rhs; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_rhs[_ni[_iml]] += _rhs; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_rhs[0] += _rhs; } #endif } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) -= _g; }else #endif { NODED(_nd) -= _g; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_d[_ni[_iml]] -= _g; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_d[0] += _g; } #endif } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v=_v; { { { icur(_p, _ppvar, _thread, _nt); } }}} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/oclmp.mod000077500000000000000000000043611323325274500164310ustar00rootroot00000000000000COMMENT Clamp for optimization. This is derived from svclmp.mod but only has an on, off, amp input Single electrode Voltage clamp a start and stop time. Clamp is on at time on, and off at time off When clamp is off the injected current is 0. i is the injected current, vc measures the control voltage Do not insert several instances of this model at the same location in order to make level changes. That is equivalent to independent clamps and they will have incompatible internal state values. The electrical circuit for the clamp is exceedingly simple: vc ---'\/\/`--- cell rs Note that since this is an electrode current model v refers to the internal potential which is equivalent to the membrane potential v when there is no extracellular membrane mechanism present but is v+vext when one is present. Also since i is an electrode current, positive values of i depolarize the cell. (Normally, positive membrane currents are outward and thus hyperpolarize the cell) ENDCOMMENT NEURON { POINT_PROCESS OClamp ELECTRODE_CURRENT i RANGE on, off, rs, vc, i, switched_on } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (microsiemens) } PARAMETER { rs = 1 (megohm) <1e-9, 1e9> on = 0 (ms) off = 0 (ms) vc (mV) switched_on = 0 } ASSIGNED { v (mV) : automatically v + vext when extracellular is present i (nA) onflag } INITIAL { onflag = 0 } BREAKPOINT { SOLVE icur METHOD after_cvode vstim() } PROCEDURE icur() { if (onflag) { i = (vc - v)/rs }else{ i = 0 } } COMMENT The SOLVE of icur() in the BREAKPOINT block is necessary to compute i=(vc - v(t))/rs instead of i=(vc - v(t-dt))/rs This is important for time varying vc because the actual i used in the implicit method is equivalent to (vc - v(t)/rs due to the calculation of di/dv from the BREAKPOINT block. The reason this works is because the SOLVE statement in the BREAKPOINT block is executed after the membrane potential is advanced. It is a shame that vstim has to be called twice but putting the call in a SOLVE block would cause playing a Vector into vc to be off by one time step. ENDCOMMENT PROCEDURE vstim() { if (switched_on) { onflag = 1 at_time(on) at_time(off) if (t < on) { onflag = 0 }else if (t > off) { onflag = 0 } }else{ onflag = 0 } icur() } neuron-7.5/src/nrnoc/ocmain.c000077500000000000000000000002631323325274500162250ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../oc/ocmain.c" neuron-7.5/src/nrnoc/ocnoiv.c000077500000000000000000000002631323325274500162540ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../oc/ocnoiv.c" neuron-7.5/src/nrnoc/options.h000077500000000000000000000034131323325274500164570ustar00rootroot00000000000000/* Options are either very significant to the usage and/or affect the size of the main data structures and thus require much recompilation, including recompilation of all models. */ /* switching from Ra being a global variable to it being a section variable opens up the possibility of a great deal of confusion and inadvertant wrong results. To help avoid this we print a warning message whenever the value in one section is set but no others. But only the first time through treeset. */ #define RA_WARNING 0 #define VECTORIZE 1 /* hope this speeds up simulations on a Cray */ /* this is no longer optional */ #define I_MEMBRANE 1 /* compute i_cap and i_membrane on fadvance */ #if _CRAY #define EXTRACELLULAR 0 /* this form of gaussian elimination is vectorized*/ #else #define EXTRACELLULAR 2 /* number of extracellular layers */ #endif #define DIAMLIST 1 /* section contains diameter info */ #define EXTRAEQN 0 /* ionic concentrations calculated via * jacobian along with v */ #if DIAMLIST #define NTS_SPINE 1 /* A negative diameter in pt3dadd() tags that * diamlist location as having a spine. * diam3d() still returns the postive diameter * spined3d() returns 1 or 0 signifying presence * of spine. setSpineArea() tells how much * area/spine to add to the segment. */ #endif #define METHOD3 0 /* third order spatially correct method */ /* testing only, not completely implemented */ /* cannot be used with extracellular */ #define KEEP_NSEG_PARM 1 /* Use old segment parameters to define */ /* the new segment information */ #define CVODE 1 /* Allow the cvode variable time step method*/ #if !defined(CACHEVEC) #define CACHEVEC 1 /* define to 0 doubles in nodes instead of vectors*/ #endif #define MULTICORE 1 /* not optional */ neuron-7.5/src/nrnoc/osxdlfcn.c000077500000000000000000000154051323325274500166030ustar00rootroot00000000000000/* Copyright (c) 2002 Peter O'Gorman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* Just to prove that it isn't that hard to add Mac calls to your code :) This works with pretty much everything, including kde3 xemacs and the gimp, I'd guess that it'd work in at least 95% of cases, use this as your starting point, rather than the mess that is dlfcn.c, assuming that your code does not require ref counting or symbol lookups in dependent libraries */ #include #include #include #include #include #include #include #include #include "osxdlfcn.h" #define ERR_STR_LEN 256 static void *dlsymIntern(void *handle, const char *symbol); static const char *error(int setget, const char *str, ...); /* Set and get the error string for use by dlerror */ static const char *error(int setget, const char *str, ...) { static char errstr[ERR_STR_LEN]; static int err_filled = 0; const char *retval; NSLinkEditErrors ler; int lerno; const char *dylderrstr; const char *file; va_list arg; if (setget <= 0) { va_start(arg, str); strncpy(errstr, "dlsimple: ", ERR_STR_LEN); vsnprintf(errstr + 10, ERR_STR_LEN - 10, str, arg); va_end(arg); /* We prefer to use the dyld error string if getset is 1*/ if (setget == 0) { NSLinkEditError(&ler, &lerno, &file, &dylderrstr); fprintf(stderr,"dyld: %s\n",dylderrstr); if (dylderrstr && strlen(dylderrstr)) strncpy(errstr,dylderrstr,ERR_STR_LEN); } err_filled = 1; retval = NULL; } else { if (!err_filled) retval = NULL; else retval = errstr; err_filled = 0; } return retval; } /* dlopen */ void *dlopen(const char *path, int mode) { void *module = 0; NSObjectFileImage ofi = 0; NSObjectFileImageReturnCode ofirc; static int (*make_private_module_public) (NSModule module) = 0; unsigned int flags = NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE; /* If we got no path, the app wants the global namespace, use -1 as the marker in this case */ if (!path) return (void *)-1; /* Create the object file image, works for things linked with the -bundle arg to ld */ ofirc = NSCreateObjectFileImageFromFile(path, &ofi); switch (ofirc) { case NSObjectFileImageSuccess: /* It was okay, so use NSLinkModule to link in the image */ if (!(mode & RTLD_LAZY)) flags += NSLINKMODULE_OPTION_BINDNOW; module = NSLinkModule(ofi, path,flags); /* Don't forget to destroy the object file image, unless you like leaks */ NSDestroyObjectFileImage(ofi); /* If the mode was global, then change the module, this avoids multiply defined symbol errors to first load private then make global. Silly, isn't it. */ if ((mode & RTLD_GLOBAL)) { if (!make_private_module_public) { _dyld_func_lookup("__dyld_NSMakePrivateModulePublic", (unsigned long *)&make_private_module_public); } make_private_module_public(module); } break; case NSObjectFileImageInappropriateFile: /* It may have been a dynamic library rather than a bundle, try to load it */ module = (void *)NSAddImage(path, NSADDIMAGE_OPTION_RETURN_ON_ERROR); break; case NSObjectFileImageFailure: error(0,"Object file setup failure : \"%s\"", path); return 0; case NSObjectFileImageArch: error(0,"No object for this architecture : \"%s\"", path); return 0; case NSObjectFileImageFormat: error(0,"Bad object file format : \"%s\"", path); return 0; case NSObjectFileImageAccess: error(0,"Can't read object file : \"%s\"", path); return 0; } if (!module) error(0, "Can not open \"%s\"", path); return module; } /* dlsymIntern is used by dlsym to find the symbol */ void *dlsymIntern(void *handle, const char *symbol) { NSSymbol *nssym = 0; /* If the handle is -1, if is the app global context */ if (handle == (void *)-1) { /* Global context, use NSLookupAndBindSymbol */ if (NSIsSymbolNameDefined(symbol)) { nssym = NSLookupAndBindSymbol(symbol); } } /* Now see if the handle is a struch mach_header* or not, use NSLookupSymbol in image for libraries, and NSLookupSymbolInModule for bundles */ else { /* Check for both possible magic numbers depending on x86/ppc byte order */ if ((((struct mach_header *)handle)->magic == MH_MAGIC) || (((struct mach_header *)handle)->magic == MH_CIGAM)) { if (NSIsSymbolNameDefinedInImage((struct mach_header *)handle, symbol)) { nssym = NSLookupSymbolInImage((struct mach_header *)handle, symbol, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); } } else { nssym = NSLookupSymbolInModule(handle, symbol); } } if (!nssym) { error(0, "Symbol \"%s\" Not found", symbol); return NULL; } return NSAddressOfSymbol(nssym); } const char *dlerror(void) { return error(1, (char *)NULL); } int dlclose(void *handle) { if ((((struct mach_header *)handle)->magic == MH_MAGIC) || (((struct mach_header *)handle)->magic == MH_CIGAM)) { error(-1, "Can't remove dynamic libraries on darwin"); return 0; } if (!NSUnLinkModule(handle, 0)) { error(0, "unable to unlink module %s", NSNameOfModule(handle)); return 1; } return 0; } /* dlsym, prepend the underscore and call dlsymIntern */ void *dlsym(void *handle, const char *symbol) { static char undersym[257]; /* Saves calls to malloc(3) */ int sym_len = strlen(symbol); void *value = NULL; char *malloc_sym = NULL; if (sym_len < 256) { snprintf(undersym, 256, "_%s", symbol); value = dlsymIntern(handle, undersym); } else { malloc_sym = malloc(sym_len + 2); if (malloc_sym) { sprintf(malloc_sym, "_%s", symbol); value = dlsymIntern(handle, malloc_sym); free(malloc_sym); } else { error(-1, "Unable to allocate memory"); } } return value; } neuron-7.5/src/nrnoc/osxdlfcn.h000077500000000000000000000050641323325274500166100ustar00rootroot00000000000000/* Copyright (c) 2002 Jorge Acereda & Peter O'Gorman Portions may be copyright others, see the AUTHORS file included with this distribution. Maintained by Peter O'Gorman Bug Reports and other queries should go to Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef _DLFCN_H_ #define _DLFCN_H_ #ifdef __cplusplus extern "C" { #endif #if defined (__GNUC__) && __GNUC__ > 3 #define dl_restrict __restrict #else #define dl_restrict #endif /* * Structure filled in by dladdr(). */ typedef struct dl_info { const char *dli_fname; /* Pathname of shared object */ void *dli_fbase; /* Base address of shared object */ const char *dli_sname; /* Name of nearest symbol */ void *dli_saddr; /* Address of nearest symbol */ } Dl_info; extern void * dlopen(const char *path, int mode); extern void * dlsym(void * dl_restrict handle, const char * dl_restrict symbol); extern const char * dlerror(void); extern int dlclose(void * handle); extern int dladdr(const void * dl_restrict, Dl_info * dl_restrict); #define RTLD_LAZY 0x1 #define RTLD_NOW 0x2 #define RTLD_LOCAL 0x4 #define RTLD_GLOBAL 0x8 #define RTLD_NOLOAD 0x10 #define RTLD_NODELETE 0x80 /* * Special handle arguments for dlsym(). */ #define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */ #define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */ #ifdef __cplusplus } #endif #endif /* _DLFCN_H_ */ neuron-7.5/src/nrnoc/passive.c000066400000000000000000000151231323325274500164270ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__pas #define _nrn_initial _nrn_initial__pas #define nrn_cur _nrn_cur__pas #define _nrn_current _nrn_current__pas #define nrn_jacob _nrn_jacob__pas #define nrn_state _nrn_state__pas #define _net_receive _net_receive__pas #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define g _p[0] #define e _p[1] #define i _p[2] #define v _p[3] #define _g _p[4] #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata() { Prop *_prop, *hoc_getdata_range(int); _prop = hoc_getdata_range(_mechtype); _setdata(_prop); hoc_retpushx(1.); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { "setdata_pas", _hoc_setdata, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "g_pas", 0, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "g_pas", "S/cm2", "e_pas", "mV", "i_pas", "mA/cm2", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "pas", "g_pas", "e_pas", 0, "i_pas", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; _p = nrn_prop_data_alloc(_mechtype, 5, _prop); /*initialize range parameters*/ g = 0.001; e = -70; _prop->param = _p; _prop->param_size = 5; } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _passive_reg_() { int _vectorized = 1; _initlists(); register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 5, 0); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 pas /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/passive.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = "passive membrane channel"; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { i = g * ( v - e ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) -= _rhs; }else #endif { NODERHS(_nd) -= _rhs; } } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) += _g; }else #endif { _nd = _ml->_nodelist[_iml]; NODED(_nd) += _g; } } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/passive.mod000077500000000000000000000004221323325274500167630ustar00rootroot00000000000000TITLE passive membrane channel UNITS { (mV) = (millivolt) (mA) = (milliamp) (S) = (siemens) } NEURON { SUFFIX pas NONSPECIFIC_CURRENT i RANGE g, e } PARAMETER { g = .001 (S/cm2) <0,1e9> e = -70 (mV) } ASSIGNED {v (mV) i (mA/cm2)} BREAKPOINT { i = g*(v - e) } neuron-7.5/src/nrnoc/passive0.c000077500000000000000000000030751323325274500165150ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/passive0.c,v 1.2 1997/03/13 14:18:02 hines Exp */ #include "section.h" #include "membdef.h" #include "nrniv_mf.h" #define nparm 2 static const char *mechanism[] = { "0", "fastpas", "g_fastpas", "e_fastpas", 0,0,0 }; static void pas_alloc(Prop* p); static void pas_cur(NrnThread* nt, Memb_list* ml, int type); static void pas_jacob(NrnThread* nt, Memb_list* ml, int type); void passive0_reg_(void) { int mechtype; register_mech(mechanism, pas_alloc, pas_cur, pas_jacob, (Pvmi)0, (Pvmi)0, -1, 1); mechtype = nrn_get_mechtype(mechanism[1]); hoc_register_prop_size(mechtype, nparm, 0); } #define g vdata[i][0] #define e vdata[i][1] #define v NODEV(vnode[i]) static void pas_cur(NrnThread* nt, Memb_list* ml, int type) { int count = ml->nodecount; Node **vnode = ml->nodelist; double **vdata = ml->data; Datum **vpdata = ml->pdata; int i; #if _CRAY #pragma _CRI ivdep #endif for (i=0; i < count; ++i) { NODERHS(vnode[i]) -= g * (v - e); } } static void pas_jacob(NrnThread* nt, Memb_list* ml, int type) { int count = ml->nodecount; Node **vnode = ml->nodelist; double **vdata = ml->data; Datum **vpdata = ml->pdata; int i; #if _CRAY #pragma _CRI ivdep #endif for (i=0; i < count; ++i) { NODED(vnode[i]) += g; } } /* the rest can be constructed automatically from the above info*/ static void pas_alloc(Prop* p) { double *pd; pd = nrn_prop_data_alloc(p->type, nparm, p); p->param_size = nparm; #if defined(__MWERKS__) pd[0] = 5.e-4;/*DEF_g;*/ #else pd[0] = DEF_g; #endif pd[1] = DEF_e; p->param = pd; } neuron-7.5/src/nrnoc/pattern.c000066400000000000000000000235241323325274500164360ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* NOT VECTORIZED */ #define NRN_VECTORIZED 0 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__PatternStim #define _nrn_initial _nrn_initial__PatternStim #define nrn_cur _nrn_cur__PatternStim #define _nrn_current _nrn_current__PatternStim #define nrn_jacob _nrn_jacob__PatternStim #define nrn_state _nrn_state__PatternStim #define _net_receive _net_receive__PatternStim #define play play__PatternStim #define _threadargscomma_ /**/ #define _threadargsprotocomma_ /**/ #define _threadargs_ /**/ #define _threadargsproto_ /**/ /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); static double *_p; static Datum *_ppvar; #define t nrn_threads->_t #define dt nrn_threads->_dt #define fake_output _p[0] #define _tsav _p[1] #define _nd_area *_ppvar[0]._pval #define ptr *_ppvar[2]._pval #define _p_ptr _ppvar[2]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = 2; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_initps(); static double _hoc_play(); static double _hoc_sendgroup(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _p = _prop->param; _ppvar = _prop->dparam; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "initps", _hoc_initps, "play", _hoc_play, "sendgroup", _hoc_sendgroup, 0, 0 }; #define initps initps_PatternStim #define sendgroup sendgroup_PatternStim extern double initps( ); extern double sendgroup( ); /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { 0,0 }; static double v = 0; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } static void _destructor(Prop*); static void _constructor(Prop*); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "PatternStim", "fake_output", 0, 0, 0, "ptr", 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 2, _prop); /*initialize range parameters*/ fake_output = 0; } _prop->param = _p; _prop->param_size = 2; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ if (!nrn_point_prop_) {_constructor(_prop);} } static void _initlists(); #define _tqitem &(_ppvar[3]._pvoid) static void _net_receive(Point_process*, double*, double); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _pattern_reg_() { int _vectorized = 0; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 0, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); register_destructor(_destructor); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 2, 4); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_dparam_semantics(_mechtype, 2, "pointer"); hoc_register_dparam_semantics(_mechtype, 3, "netsend"); add_nrn_artcell(_mechtype, 3); pnt_receive[_mechtype] = _net_receive; pnt_receive_size[_mechtype] = 1; hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 PatternStim /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/pattern.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int play(); static void _net_receive (_pnt, _args, _lflag) Point_process* _pnt; double* _args; double _lflag; { _p = _pnt->_prop->param; _ppvar = _pnt->_prop->dparam; if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");} _tsav = t; if (_lflag == 1. ) {*(_tqitem) = 0;} { double _lnst ; if ( _lflag == 1.0 ) { _lnst = sendgroup ( _threadargs_ ) ; if ( _lnst >= t ) { artcell_net_send ( _tqitem, _args, _pnt, t + _lnst - t , 1.0 ) ; } } } } /*VERBATIM*/ extern int ifarg(int iarg); extern double* vector_vec(void* vv); extern int vector_capacity(void* vv); extern void* vector_arg(int iarg); extern void nrn_fake_fire(int gid, double spiketime, int fake_out); typedef struct { void* tvec; void* gidvec; int index; } Info; #define INFOCAST Info** ip = (Info**)(&(_p_ptr)) double initps ( ) { double _linitps; /*VERBATIM*/ { INFOCAST; Info* info = *ip; info->index = 0; if (info->tvec) { _linitps = 1.; }else{ _linitps = 0.; } } return _linitps; } static double _hoc_initps(void* _vptr) { double _r; _hoc_setdata(_vptr); _r = initps ( ); return(_r); } double sendgroup ( ) { double _lsendgroup; /*VERBATIM*/ { INFOCAST; Info* info = *ip; int size = vector_capacity(info->tvec); int fake_out; double* tvec = vector_vec(info->tvec); double* gidvec = vector_vec(info->gidvec); int i; fake_out = fake_output ? 1 : 0; for (i=0; info->index < size; ++i) { /* only if the gid is NOT on this machine */ nrn_fake_fire((int)gidvec[info->index], tvec[info->index], fake_out); ++info->index; if (i > 100 && t < tvec[info->index]) { break; } } if (info->index >= size) { _lsendgroup = t - 1.; }else{ _lsendgroup = tvec[info->index]; } } return _lsendgroup; } static double _hoc_sendgroup(void* _vptr) { double _r; _hoc_setdata(_vptr); _r = sendgroup ( ); return(_r); } static int play ( ) { /*VERBATIM*/ { INFOCAST; Info* info = *ip; if (ifarg(1)) { info->tvec = vector_arg(1); info->gidvec = vector_arg(2); }else{ info->tvec = (void*)0; info->gidvec = (void*)0; } } return 0; } static double _hoc_play(void* _vptr) { double _r; _hoc_setdata(_vptr); _r = 1.; play ( ); return(_r); } static void _constructor(Prop* _prop) { _p = _prop->param; _ppvar = _prop->dparam; { { /*VERBATIM*/ { INFOCAST; Info* info = (Info*)hoc_Emalloc(sizeof(Info)); hoc_malchk(); *ip = info; info->tvec = (void*)0; info->gidvec = (void*)0; info->index = 0; } } } } static void _destructor(Prop* _prop) { _p = _prop->param; _ppvar = _prop->dparam; { { /*VERBATIM*/ { INFOCAST; Info* info = *ip; free(info); } } } } static void initmodel() { int _i; double _save;_ninits++; { { if ( initps ( _threadargs_ ) > 0.0 ) { artcell_net_send ( _tqitem, (double*)0, _ppvar[1]._pvoid, t + 0.0 , 1.0 ) ; } } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _tsav = -1e20; initmodel(); }} static double _nrn_current(double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; v=_v; { }} } static void terminal(){} static void _initlists() { int _i; static int _first = 1; if (!_first) return; _first = 0; } neuron-7.5/src/nrnoc/pattern.mod000077500000000000000000000041671323325274500170000ustar00rootroot00000000000000: The spikeout pairs (t, gid) resulting from a parallel network simulation : can become the stimulus for any single cpu subnet as long as the gid's are : consistent. : Note: hoc must retain references to the tvec and gidvec vectors : to prevent the Info from going out of existence NEURON { ARTIFICIAL_CELL PatternStim RANGE fake_output POINTER ptr } PARAMETER { fake_output = 0 } ASSIGNED { ptr } INITIAL { if (initps() > 0) { net_send(0, 1) } } NET_RECEIVE (w) {LOCAL nst if (flag == 1) { nst = sendgroup() if (nst >= t) {net_send(nst - t, 1)} } } VERBATIM extern int ifarg(int iarg); extern double* vector_vec(void* vv); extern int vector_capacity(void* vv); extern void* vector_arg(int iarg); extern void nrn_fake_fire(int gid, double spiketime, int fake_out); typedef struct { void* tvec; void* gidvec; int index; } Info; #define INFOCAST Info** ip = (Info**)(&(_p_ptr)) ENDVERBATIM CONSTRUCTOR { VERBATIM { INFOCAST; Info* info = (Info*)hoc_Emalloc(sizeof(Info)); hoc_malchk(); *ip = info; info->tvec = (void*)0; info->gidvec = (void*)0; info->index = 0; } ENDVERBATIM } DESTRUCTOR { VERBATIM { INFOCAST; Info* info = *ip; free(info); } ENDVERBATIM } FUNCTION initps() { VERBATIM { INFOCAST; Info* info = *ip; info->index = 0; if (info->tvec) { _linitps = 1.; }else{ _linitps = 0.; } } ENDVERBATIM } FUNCTION sendgroup() { VERBATIM { INFOCAST; Info* info = *ip; int size = vector_capacity(info->tvec); int fake_out; double* tvec = vector_vec(info->tvec); double* gidvec = vector_vec(info->gidvec); int i; fake_out = fake_output ? 1 : 0; for (i=0; info->index < size; ++i) { /* only if the gid is NOT on this machine */ nrn_fake_fire((int)gidvec[info->index], tvec[info->index], fake_out); ++info->index; if (i > 100 && t < tvec[info->index]) { break; } } if (info->index >= size) { _lsendgroup = t - 1.; }else{ _lsendgroup = tvec[info->index]; } } ENDVERBATIM } PROCEDURE play() { VERBATIM { INFOCAST; Info* info = *ip; if (ifarg(1)) { info->tvec = vector_arg(1); info->gidvec = vector_arg(2); }else{ info->tvec = (void*)0; info->gidvec = (void*)0; } } ENDVERBATIM } neuron-7.5/src/nrnoc/point.c000077500000000000000000000227241323325274500161160ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/point.c,v 1.13 1999/03/23 16:12:09 hines Exp */ /* modl description via modlreg calls point_register_mech() and saves the pointtype as later argument to create and loc */ #include #include "section.h" #include "membfunc.h" #include "parse.h" extern char* pnt_map; extern Symbol** pointsym; /*list of variable symbols in s->u.ppsym[k] with number in s->s_varn */ extern short* nrn_is_artificial_; extern double loc_point_process(); extern Prop* prop_alloc(); static int cppp_semaphore = 0; /* connect point process pointer semaphore */ static double** cppp_pointer; static void free_one_point(); static void create_artcell_prop(Point_process* pnt, short type); Prop* nrn_point_prop_; void (*nrnpy_o2loc_p_)(Object*, Section**, double*); void* create_point_process(int pointtype, Object* ho) { Point_process* pp; pp = (Point_process*)emalloc(sizeof(Point_process)); pp->node = 0; pp->sec = 0; pp->prop = 0; pp->ob = ho; pp->presyn_ = 0; pp->nvi_ = 0; pp->_vnt = 0; if (nrn_is_artificial_[pointsym[pointtype]->subtype]) { create_artcell_prop(pp, pointsym[pointtype]->subtype); return pp; } if (ho && ho->template->steer && ifarg(1)) { loc_point_process(pointtype, (void*)pp); } return (void*)pp; } Object* nrn_new_pointprocess(Symbol* sym) { void* v; Object* hoc_new_object(), *hoc_new_opoint(); Object* ob; extern Symlist* hoc_built_in_symlist; Symbol* hoc_table_lookup(); int pointtype; assert(sym->type == MECHANISM && memb_func[sym->subtype].is_point); pointtype = pnt_map[sym->subtype]; if (memb_func[sym->subtype].hoc_mech) { ob = hoc_new_opoint(sym->subtype); }else{ hoc_push_frame(sym, 0); v = create_point_process(pointtype, (Object*)0); hoc_pop_frame(); sym = hoc_table_lookup(sym->name, hoc_built_in_symlist); ob = hoc_new_object(sym, v); ((Point_process*)v)->ob = ob; } return ob; } void destroy_point_process(void* v) { Point_process* pp = (Point_process*)v; free_one_point(pp); free((char*)pp); } void nrn_loc_point_process(int pointtype, Point_process* pnt, Section* sec, Node* node) { extern Prop *prop_alloc_disallow(), *prop_alloc(); extern Section* nrn_pnt_sec_for_need_; Prop* p; double x, nrn_arc_position(); assert(!nrn_is_artificial_[pointsym[pointtype]->subtype]); x = nrn_arc_position(sec, node); /* the problem the next fragment overcomes is that POINTER's become invalid when a point process is moved (dparam and param were allocated but then param was freed and replaced by old param) The error that I saw, then, was when a dparam pointed to a param -- useful to give default value to a POINTER and then the param was immediately freed. This was the tip of the iceberg since in general when one moves a point process, some pointers are valid and some invalid and this can only be known by the model in its CONSTRUCTOR. Therefore, instead of copying the old param to the new param (and therefore invalidating other pointers as in menus) we flag the allocation routine for the model to 1) not allocate param and dparam, 2) don't fill param but do the work for dparam (fill pointers for ions), 3) execute the constructor normally. */ if (pnt->prop) { nrn_point_prop_ = pnt->prop; }else{ nrn_point_prop_ = (Prop*)0; } nrn_pnt_sec_for_need_ = sec; if (x == 0. || x == 1.) { p = prop_alloc_disallow(&(node->prop), pointsym[pointtype]->subtype, node); }else{ p = prop_alloc(&(node->prop), pointsym[pointtype]->subtype, node); } nrn_pnt_sec_for_need_ = (Section*)0; nrn_point_prop_ = (Prop*)0; if (pnt->prop) { pnt->prop->param = (double*)0; pnt->prop->dparam = (Datum*)0; free_one_point(pnt); } nrn_sec_ref(&pnt->sec, sec); pnt->node = node; pnt->prop = p; pnt->prop->dparam[0].pval = &NODEAREA(node); pnt->prop->dparam[1]._pvoid = (void*)pnt; if (pnt->ob) { if (pnt->ob->observers) { hoc_obj_notify(pnt->ob); } if (pnt->ob->template->observers) { hoc_template_notify(pnt->ob, 2); } } } static void create_artcell_prop(Point_process* pnt, short type) { Prop* p = (Prop*)0; nrn_point_prop_ = (Prop*)0; pnt->prop = prop_alloc(&p, type, (Node*)0); pnt->prop->dparam[0].pval = (double*)0; pnt->prop->dparam[1]._pvoid = (void*)pnt; if (pnt->ob) { if (pnt->ob->observers) { hoc_obj_notify(pnt->ob); } if (pnt->ob->template->observers) { hoc_template_notify(pnt->ob, 2); } } } void nrn_relocate_old_points(Section* oldsec, Node* oldnode, Section* sec, Node* node) { Point_process* pnt; Prop* p, *pn; if (oldnode) for (p = oldnode->prop; p; p = pn) { pn = p->next; if (memb_func[p->type].is_point) { pnt = (Point_process*)p->dparam[1]._pvoid; if (oldsec == pnt->sec) { if (oldnode == node) { nrn_sec_ref(&pnt->sec, sec); }else{ #if 0 double nrn_arc_position(); char* secname(); printf("relocating a %s to %s(%d)\n", memb_func[p->type].sym->name, secname(sec), nrn_arc_position(sec, node) ); #endif nrn_loc_point_process( pnt_map[p->type], pnt, sec, node ); } } } } } void nrn_seg_or_x_arg(int iarg, Section** psec, double* px) { if (hoc_is_double_arg(iarg)) { *px = chkarg(iarg, 0., 1.); *psec = chk_access(); }else{ Object* o = *hoc_objgetarg(iarg); *psec = (Section*)0; if (nrnpy_o2loc_p_) { (*nrnpy_o2loc_p_)(o, psec, px); } if (!(*psec)) { assert(0); } } } double loc_point_process(int pointtype, void* v) { extern int hoc_is_double_arg(); extern double chkarg(); extern Object** hoc_objgetarg(); Point_process* pnt = (Point_process*)v; double x; Section *sec; Node *node, *node_exact(); if (nrn_is_artificial_[pointsym[pointtype]->subtype]) { hoc_execerror("ARTIFICIAL_CELLs are not located in a section", (char*)0); } nrn_seg_or_x_arg(1, &sec, &x); node = node_exact(sec, x); nrn_loc_point_process(pointtype, pnt, sec, node); return x; } double get_loc_point_process(void* v) { #if METHOD3 extern int _method3; #endif double x, nrn_arc_position(); Point_process *pnt = (Point_process*)v; Section* sec; if (pnt->prop == (Prop *)0) { hoc_execerror("point process not located in a section", (char*)0); } if (nrn_is_artificial_[pnt->prop->type]) { hoc_execerror("ARTIFICIAL_CELLs are not located in a section", (char*)0); } sec = pnt->sec; x = nrn_arc_position(sec, pnt->node); hoc_level_pushsec(sec); return x; } double has_loc_point(void* v) { Point_process *pnt = (Point_process*)v; return (pnt->sec != 0); } double* point_process_pointer(Point_process* pnt, Symbol* sym, int index) { static double dummy; double* pd; if (pnt->prop == (Prop *)0) { if (nrn_inpython_ == 1) { /* python will handle the error */ hoc_warning("point process not located in a section", (char*)0); nrn_inpython_ = 2; return NULL; }else{ hoc_execerror("point process not located in a section", (char*)0); } } if (sym->subtype == NRNPOINTER) { pd = (pnt->prop->dparam)[sym->u.rng.index + index].pval; if (cppp_semaphore) { ++cppp_semaphore; cppp_pointer = &((pnt->prop->dparam)[sym->u.rng.index + index].pval); pd = &dummy; }else if(!pd) { #if 0 hoc_execerror(sym->name, "wasn't made to point to anything"); #else return (double*)0; #endif } }else{ if (pnt->prop->ob) { pd = pnt->prop->ob->u.dataspace[sym->u.rng.index].pval + index; }else{ pd = pnt->prop->param + sym->u.rng.index + index; } } /*printf("point_process_pointer %s pd=%lx *pd=%g\n", sym->name, pd, *pd);*/ return pd; } void steer_point_process(void* v) /* put the right double pointer on the stack */ { Symbol* sym, *hoc_spop(); int index; Point_process *pnt = (Point_process*)v; sym = hoc_spop(); if (ISARRAY(sym)) { index = hoc_araypt(sym, SYMBOL); }else{ index = 0; } hoc_pushpx(point_process_pointer(pnt, sym, index)); } void nrn_cppp(void) { cppp_semaphore = 1; } void connect_point_process_pointer(void) { double* hoc_pxpop(); if (cppp_semaphore != 2) { cppp_semaphore = 0; hoc_execerror("not a point process pointer", (char*)0); } cppp_semaphore = 0; *cppp_pointer = hoc_pxpop(); hoc_nopop(); } static void free_one_point(Point_process* pnt) /* must unlink from node property list also */ { Prop *p, *p1; p = pnt->prop; if (!p) { return; } if (!nrn_is_artificial_[p->type]) { p1 = pnt->node->prop; if (p1 == p) { pnt->node->prop = p1->next; }else for (; p1; p1 = p1->next) { if (p1->next == p) { p1->next = p->next; break; } } } #if VECTORIZE { extern int v_structure_change; v_structure_change = 1; } #endif if (p->param) { if (memb_func[p->type].destructor) { memb_func[p->type].destructor(p); } notify_freed_val_array(p->param, p->param_size); nrn_prop_data_free(p->type, p->param); } if (p->dparam) { nrn_prop_datum_free(p->type, p->dparam); } free((char*)p); pnt->prop = (Prop *)0; pnt->node = (Node *)0; if (pnt->sec) {section_unref(pnt->sec);} pnt->sec = (Section *)0; } void clear_point_process_struct(Prop* p) /* called from prop_free */ { Point_process* pnt; pnt = (Point_process*)p->dparam[1]._pvoid; if (pnt) { free_one_point(pnt); if (pnt->ob) { if (pnt->ob->observers) { hoc_obj_notify(pnt->ob); } if (pnt->ob->template->observers) { hoc_template_notify(pnt->ob, 2); } } } else { if (p->ob) { hoc_obj_unref(p->ob); } if (p->param) { notify_freed_val_array(p->param, p->param_size); nrn_prop_data_free(p->type, p->param); } if (p->dparam) { nrn_prop_datum_free(p->type, p->dparam); } free((char*)p); } } int is_point_process(Object* ob) { if (ob) { return ob->template->is_point_ != 0; } return 0; } neuron-7.5/src/nrnoc/ppmark.c000066400000000000000000000155161323325274500162550ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__PointProcessMark #define _nrn_initial _nrn_initial__PointProcessMark #define nrn_cur _nrn_cur__PointProcessMark #define _nrn_current _nrn_current__PointProcessMark #define nrn_jacob _nrn_jacob__PointProcessMark #define nrn_state _nrn_state__PointProcessMark #define _net_receive _net_receive__PointProcessMark #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define v _p[0] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "PointProcessMark", 0, 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 1, _prop); /*initialize range parameters*/ } _prop->param = _p; _prop->param_size = 1; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _ppmark_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 1, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 PointProcessMark /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/ppmark.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/ppmark.mod000077500000000000000000000001421323325274500166020ustar00rootroot00000000000000: for the purpose of displaying a location on a Shape NEURON { POINT_PROCESS PointProcessMark } neuron-7.5/src/nrnoc/psection.c000066400000000000000000000030771323325274500166060ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "section.h" #include "parse.h" #include "membfunc.h" static void pnode(Prop*); void psection(void) { Section *sec; Prop *p, *p1; sec = chk_access(); p = sec->prop; Printf("%s {", secname(sec)); Printf(" nseg=%d L=%g Ra=%g", sec->nnode - 1, section_length(sec), nrn_ra(sec)); if (p->dparam[4].val != 1) { Printf(" rallbranch=%g", p->dparam[4].val); } Printf("\n"); if (sec->parentsec) { Printf(" %s ",secname(sec->parentsec)); Printf("connect %s (%g), %g\n", secname(sec), p->dparam[3].val, p->dparam[1].val); } else { v_setup_vectors(); /*SUPPRESS 440*/ Printf(" /*location %g attached to cell %d*/\n", p->dparam[3].val, sec->parentnode->v_node_index); } if (sec->nnode) { /*SUPPRESS 440*/ Printf(" /* First segment only */\n"); p1 = sec->pnode[0]->prop; pnode(p1); } Printf("}\n"); hoc_retpushx(1.); } static void pnode(Prop* p1) { Symbol *sym; int j; if (!p1) { return; } pnode(p1->next); /*print in insert order*/ sym = memb_func[p1->type].sym; Printf(" insert %s {", sym->name); if (sym->s_varn) { for (j=0; j < sym->s_varn; j++ ) { Symbol* s = sym->u.ppsym[j]; if (nrn_vartype(s) == nrnocCONST) { if (p1->ob) { printf(" %s=%g", s->name, p1->ob->u.dataspace[s->u.rng.index].pval[0]); }else{ Printf(" %s=%g", s->name, p1->param[s->u.rng.index]); } } } } Printf("}\n"); } extern void print_stim(void); extern void print_clamp(void); extern void print_syn(void); void prstim(void) { print_stim(); print_clamp(); print_syn(); hoc_retpushx(1.); } neuron-7.5/src/nrnoc/seclist.c000077500000000000000000000124561323325274500164340ustar00rootroot00000000000000#include <../../nrnconf.h> #define HOC_L_LIST 1 #include "section.h" #include "neuron.h" #include "parse.h" #include "hocparse.h" #include "code.h" #include "hoc_membf.h" /*ARGSUSED*/ static void* constructor(Object* ho) { List* sl; sl = newlist(); return (void*)sl; } static void destructor(void* v) { Item* q; List* sl = (List*)v; ITERATE(q, sl) { section_unref(q->element.sec); } freelist(&sl); } static double append(void* v) { Section* sec = chk_access(); lappendsec((List*)v, sec); section_ref(sec); return 1.; } static Item* children1(List* sl, Section* sec) { Item* i; Section* ch; i = sl->prev; for (ch = sec->child; ch; ch = ch->sibling) { i = lappendsec(sl, ch); section_ref(ch); } return i; } static double children(void* v) { Section* sec; List* sl; sec = chk_access(); sl = (List*)v; children1(sl, sec); return 1.; } static Item* subtree1(List* sl, Section* sec) { Item* i, *j, *last, *first; Section* s; /* it is confusing to span the tree from the root without using recursion. */ s = sec; i = lappendsec(sl, s); section_ref(s); last = i->prev; while( i != last) { for (first = last->next, last = i, j = first; j->prev != last; j = j->next) { s = hocSEC(j); i = children1(sl, s); } } return i; } static double subtree(void* v) { Section* sec; List* sl; sec = chk_access(); sl = (List*)v; subtree1(sl, sec); return 1.; } static double wholetree(void* v) { List* sl; Section* s, *sec, *ch; Item* i, *j, *first, *last; sec = chk_access(); sl = (List*)v; /*find root*/ for (s = sec; s->parentsec; s = s->parentsec) {} subtree1(sl, s); return 1.; } static double allroots(void* v) { List* sl; Item* qsec; sl = (List*)v; ForAllSections(sec) if (!sec->parentsec) { lappendsec(sl, sec); section_ref(sec); } } return 1.; } static double seclist_remove(void* v) { Section* sec, *s; Item* q, *q1; List* sl; int i; sl = (List*)v; i = 0; if (!ifarg(1)) { sec = chk_access(); ITERATE(q, sl) { if (sec == q->element.sec) { delete(q); section_unref(sec); return 1.; } } hoc_warning(secname(sec), "not in this section list"); }else{ Object* o; o = *hoc_objgetarg(1); check_obj_type(o, "SectionList"); ITERATE(q, sl) { s = hocSEC(q); s->volatile_mark = 0; } sl = (List*)o->u.this_pointer; ITERATE(q, sl) { s = hocSEC(q); s->volatile_mark = 1; } sl = (List*)v; i = 0; for (q = sl->next; q != sl; q = q1) { q1 = q->next; s = hocSEC(q); if (s->volatile_mark) { delete(q); section_unref(s); ++i; } } } return (double) i; } static double unique(void* v) { int i; /* number deleted */ Section* s; Item* q, *q1; List* sl = (List*)v; ITERATE(q, sl) { s = hocSEC(q); s->volatile_mark = 0; } i = 0; for (q = sl->next; q != sl; q = q1) { q1 = q->next; s = hocSEC(q); if (s->volatile_mark++) { delete(q); section_unref(s); ++i; } } return (double)i; } static double contains(void* v) { Section* s; Item* q; List* sl = (List*)v; s = chk_access(); ITERATE(q, sl) { if (hocSEC(q) == s) { return 1.; } } return (0.); } static double printnames(void* v) { Item* q; List* sl = (List*)v; ITERATE(q, sl) { printf("%s\n", secname(q->element.sec)); } return 1.; } static Member_func members[] = { "append", append, "remove", seclist_remove, "wholetree", wholetree, "subtree", subtree, "children", children, "unique", unique, "printnames", printnames, "contains", contains, "allroots", allroots, 0,0 }; void SectionList_reg(void) { void class2oc(); /* printf("SectionList_reg\n");*/ class2oc("SectionList", constructor, destructor, members, (void*)0, (void*)0, (void*)0); } #define relative(pc) (pc + (pc)->i) extern int hoc_returning; static void check(Object* ob) { if (!ob) { hoc_execerror("nil object is not a SectionList", (char*)0); } if (ob->template->constructor != constructor) { hoc_execerror(ob->template->sym->name, " is not a SectionList"); } } void forall_sectionlist(void) { Inst* savepc = pc; Item* q, *q1; Section* sec; List* sl; Object* ob; Object** obp; int istk; /* if arg is a string use forall_section */ if (hoc_stacktype() == STRING) { forall_section(); return; } obp = hoc_objpop(); ob = *obp; check(ob); sl = (List*)(ob->u.this_pointer); istk = nrn_isecstack(); for (q = sl->next; q != sl; q = q1) { q1 = q->next; sec = q->element.sec; if (!sec->prop) { delete(q); section_unref(sec); continue; } nrn_pushsec(sec); hoc_execute(relative(savepc)); nrn_popsec(); if (hoc_returning) { nrn_secstack(istk); } if (hoc_returning == 1 || hoc_returning == 4) { break; }else if (hoc_returning ==2) { hoc_returning = 0; break; }else{ hoc_returning = 0; } } hoc_tobj_unref(obp); if (!hoc_returning) { pc = relative(savepc+1); } } void hoc_ifseclist(void) { Inst *savepc = pc; Item* q; Section* sec = chk_access(); List* sl; Object* ob; Object** obp; /* if arg is a string use forall_section */ if (hoc_stacktype() == STRING) { hoc_ifsec(); return; } obp = hoc_objpop(); ob = *obp; check(ob); sl = (List*)(ob->u.this_pointer); ITERATE(q, sl) { if (sec == q->element.sec) { hoc_execute(relative(savepc)); if (!hoc_returning) { pc = relative(savepc+1); } hoc_tobj_unref(obp); return; } } hoc_tobj_unref(obp); if (!hoc_returning) { pc = relative(savepc+1); } } neuron-7.5/src/nrnoc/secref.c000077500000000000000000000212551323325274500162320ustar00rootroot00000000000000#include <../../nrnconf.h> /* Section reference Allows sections to be stored as variables and passed as arguments by using an object as a label for a particular section. Usage is: objectvar s1, s2 soma s1 = new SectionRef() print s1.sec.L // prints length of soma s2 = s1 s2.sec {psection()} // makes soma the currently accessed section for a statement access s1.sec // soma becomes the default section */ #include #include "section.h" #include "parse.h" #include "hoc_membf.h" Symbol* nrn_sec_sym, *nrn_parent_sym, *nrn_root_sym, *nrn_child_sym; Symbol* nrn_trueparent_sym; static hoc_Item** sec2pitm(Section* sec) { extern Objectdata* hoc_top_level_data; Symbol* sym; Object* ob; int i; if (!sec || !sec->prop || !sec->prop->dparam[0].sym) { hoc_execerror("section is unnamed", (char*)0); } sym = sec->prop->dparam[0].sym; ob = sec->prop->dparam[6].obj; i = sec->prop->dparam[5].i; if (ob) { return ob->u.dataspace[sym->u.oboff].psecitm + i; }else{ return hoc_top_level_data[sym->u.oboff].psecitm + i; } } /*ARGSUSED*/ static void* cons(Object* ho) { Section* sec = chk_access(); section_ref(sec); return (void*)(sec); } static void destruct(void* v) { Section* sec = (Section*)v; section_unref(sec); } #if 0 static double dummy(void* v) { Section* sec = (Section*)v; printf("%s\n", secname(sec)); return 0.; } #endif static double s_unname(void* v) { hoc_Item** pitm; Section* sec; sec = (Section*)v; pitm = sec2pitm(sec); *pitm = (hoc_Item*)0; sec->prop->dparam[0].sym = (Symbol*)0; return 1.; } static double s_rename(void* v) { extern Object* hoc_thisobject, **hoc_objgetarg(); extern Objectdata* hoc_top_level_data; extern Symbol* hoc_table_lookup(); extern Symlist* hoc_top_level_symlist; extern Object* ivoc_list_item(); char* name; Section* sec; Symbol* sym; hoc_Item* qsec; hoc_Item** pitm; Object* ob, *olist; Objectdata* obdsav; int i, index, size, n; sec = (Section*)v; if (!sec->prop) { printf("SectionRef[???].sec is a deleted section\n"); return 0.; } qsec = sec->prop->dparam[8].itm; if (sec->prop->dparam[0].sym) { printf("%s must first be unnamed\n", secname(sec)); return 0.; } name = gargstr(1); size = 0; index = 0; if (ifarg(2)) { olist = *hoc_objgetarg(2); size = ivoc_list_count(olist); assert(size > 0); } sym = hoc_table_lookup(name, hoc_top_level_symlist); obdsav = hoc_objectdata; hoc_objectdata = hoc_top_level_data; if (sym) { if (sym->type != SECTION || (sym->arayinfo && sym->arayinfo->nsub > 1)) { printf("The new name already exists and is not a SECTION or has a dimension > 1\n"); hoc_objectdata = obdsav; return 0; } /* check that it points to no sections */ n = hoc_total_array_data(sym, hoc_top_level_data); pitm = hoc_top_level_data[sym->u.oboff].psecitm; for (i=0; i < n; ++i) { if (pitm[i]) { printf("Previously existing %s[%d] points to a section which is being deleted\n", sym->name, i); sec_free(pitm[i]); } } if (sym->arayinfo) { hoc_freearay(sym); } free(pitm); }else{ sym = hoc_install(name, SECTION, 0., &hoc_top_level_symlist); hoc_install_object_data_index(sym); } if (size) { hoc_pushx((double)size); hoc_arayinfo_install(sym, 1); hoc_top_level_data[sym->u.oboff].psecitm = pitm = (hoc_Item**)ecalloc(size, sizeof(hoc_Item*)); }else{ hoc_top_level_data[sym->u.oboff].psecitm = pitm = (hoc_Item**)ecalloc(1, sizeof(hoc_Item*)); } if (size == 0) { pitm[index] = qsec; sec->prop->dparam[0].sym = sym; sec->prop->dparam[5].i = index; sec->prop->dparam[6].obj = (Object*)0; OPSECITM(sym)[0] = qsec; }else{ for (i=0; i < size; ++i) { ob = ivoc_list_item(olist, i); /*assert(is_obj_type(ob, "SectionRef")*/ sec = (Section*)ob->u.this_pointer; if (!sec->prop) { printf("%s references a deleted section\n", hoc_object_name(ob)); hoc_objectdata = obdsav; return 0; } qsec = sec->prop->dparam[8].itm; sec->prop->dparam[0].sym = sym; sec->prop->dparam[5].i = i; sec->prop->dparam[6].obj = (Object*)0; OPSECITM(sym)[i] = qsec; } } #if 0 printf("SectionRef[???}.rename"); i = sec->prop->dparam[5].i; if (ob) { pitm = ob->u.dataspace[sym->u.oboff].psecitm; }else{ pitm = hoc_top_level_data[sym->u.oboff].psecitm; } printf("%s\n", secname(sec)); printf("sec->prop->dparam[0].sym->name = %s\n", sym->name); printf("dparam[5].i = %d dparam[6].obj = %s\n", i, hoc_object_name(ob)); printf("sym->u.oboff = %d\n", sym->u.oboff); if (ob) { printf("ob->u.dataspace[sym->u.oboff].psecitm = %lx\n", pitm); }else{ printf("hoc_top_level_data[sym->u.oboff].psecitm = %lx\n", pitm); } printf("hocSEC(pitm[i]) = %s\n", secname(hocSEC(pitm[i]))); if (sym->arayinfo) { Arrayinfo* a; int j; a = sym->arayinfo; printf("symbol array info "); for (j=0; j < a->nsub; ++j) { printf("[%d]", a->sub[j]); } printf("\n"); if (ob) { a = ob->u.dataspace[sym->u.oboff + 1].arayinfo; printf("dataspace array info "); for (j=0; j < a->nsub; ++j) { printf("[%d]", a->sub[j]); } printf("\n"); } }else{ printf("scalar\n"); } #endif hoc_objectdata = obdsav; return 1; } int nrn_secref_nchild(Section* sec) { int n; if (!sec->prop) { hoc_execerror("Section was deleted", (char*)0); } for (n=0, sec = sec->child; sec; sec = sec->sibling) { ++n; } return n; } static double s_nchild(void* v) { int n; return (double)nrn_secref_nchild((Section*)v); } static double s_has_parent(void* v) { int n; Section* sec = (Section*)v; if (!sec->prop) { hoc_execerror("Section was deleted", (char*)0); } return (double)(sec->parentsec != (Section*)0); } static double s_has_trueparent(void* v) { int n; Section* sec = (Section*)v; if (!sec->prop) { hoc_execerror("Section was deleted", (char*)0); } return (double)(nrn_trueparent(sec) != (Section*)0); } static double s_exists(void* v) { int n; Section* sec = (Section*)v; return (double)(sec->prop != (Prop*)0); } static double s_cas(void* v) { /* return 1 if currently accessed section */ Section* sec = (Section*)v; Section* cas = chk_access(); if (!sec->prop) { hoc_execerror("Section was deleted", (char*)0); } if (sec == cas) { return 1.; } return 0.; } static Member_func members[] = { "sec", s_rename, /* will actually become a SECTIONREF below */ "parent", s_rename, "trueparent", s_rename, "root", s_rename, "child", s_rename, "nchild", s_nchild, "has_parent", s_has_parent, "has_trueparent", s_has_trueparent, "exists", s_exists, "rename", s_rename, "unname", s_unname, "is_cas", s_cas, 0, 0 }; Section* nrn_sectionref_steer(Section* sec, Symbol* sym, int* pnindex) { Section* s=0; if (sym == nrn_parent_sym) { s = sec->parentsec; if (!s) { if (nrn_inpython_ == 1) { hoc_warning("SectionRef has no parent for ", secname(sec)); nrn_inpython_ = 2; return NULL; }else{ hoc_execerror("SectionRef has no parent for ", secname(sec)); } } }else if (sym == nrn_trueparent_sym) { s = nrn_trueparent(sec); if (!s) { if (nrn_inpython_) { hoc_warning("SectionRef has no parent for ", secname(sec)); nrn_inpython_ = 2; return NULL; }else{ hoc_execerror("SectionRef has no parent for ", secname(sec)); } } }else if (sym == nrn_root_sym) { for (s = sec; s->parentsec; s = s->parentsec) {} }else if (sym == nrn_child_sym) { int index, i; if (*pnindex == 0) { if (nrn_inpython_) { hoc_warning("SectionRef.child[index]", (char*)0); nrn_inpython_ = 2; return NULL; }else{ hoc_execerror("SectionRef.child[index]", (char*)0); } } index = (int)hoc_xpop(); --*pnindex; for (i=0, s = sec->child; i < index && s; s = s->sibling) { ++i; } if (i != index || !s) { if (nrn_inpython_) { hoc_warning("SectionRef.child index too large for", secname(sec)); nrn_inpython_ = 2; return NULL; }else{ hoc_execerror("SectionRef.child index too large for", secname(sec)); } } } return s; } void SectionRef_reg(void) { Symbol* s, *sr, *hoc_table_lookup(); extern void class2oc(); class2oc("SectionRef", cons, destruct, members, (void*)0, (void*)0, (void*)0); /* now make the sec variable an actual SECTIONREF */ sr = hoc_lookup("SectionRef"); s = hoc_table_lookup("sec", sr->u.template->symtable); s->type = SECTIONREF; nrn_sec_sym = s; s = hoc_table_lookup("parent", sr->u.template->symtable); s->type = SECTIONREF; nrn_parent_sym = s; s = hoc_table_lookup("trueparent", sr->u.template->symtable); s->type = SECTIONREF; nrn_trueparent_sym = s; s = hoc_table_lookup("root", sr->u.template->symtable); s->type = SECTIONREF; nrn_root_sym = s; s = hoc_table_lookup("child", sr->u.template->symtable); s->type = SECTIONREF; nrn_child_sym = s; s->arayinfo = (Arrayinfo*)emalloc(sizeof(Arrayinfo));; s->arayinfo->refcount = 1; s->arayinfo->a_varn = (void*)0; s->arayinfo->nsub = 1; s->arayinfo->sub[0] = 0; } neuron-7.5/src/nrnoc/section.h000077500000000000000000000300431323325274500164270ustar00rootroot00000000000000/* /local/src/master/nrn/src/nrnoc/section.h,v 1.4 1996/05/21 17:09:24 hines Exp */ #ifndef section_h #define section_h /* In order to support oc objects containing sections, instead of vector of ordered sections, we now have a list (in the nmodl sense) of unordered sections. The lesser efficiency is ok because the number crunching is vectorized. ie only the user interface deals with sections and that needs to be convenient */ /* Data structure for solving branching 1-D tree diffusion type equations. Vector of ordered sections each of which points to a vector of nodes. Each section must have at least one node. There may be 0 sections. The order of last node to first node is used in triangularization. First node to last is used in back substitution. The first node of a section is connected to some node of a section with lesser index. */ /* An equation is associated with each node. d and rhs are the diagonal and right hand side respectively. a is the effect of this node on the parent node's equation. b is the effect of the parent node on this node's equation. d is assumed to be non-zero. d and rhs is calculated from the property list. */ #if defined(__cplusplus) extern "C" { #endif #include "nrnredef.h" #include "options.h" #include "hoclist.h" /*#define DEBUGSOLVE 1*/ #define xpop hoc_xpop #define pc hoc_pc #define spop hoc_spop #define execerror hoc_execerror #include "hocdec.h" typedef struct Section { int refcount; /* may be in more than one list */ short nnode; /* Number of nodes for ith section */ struct Section* parentsec; /* parent section of node 0 */ struct Section* child; /* root of the list of children connected to this parent kept in order of increasing x */ struct Section* sibling; /* used as list of sections that have same parent */ /* the parentnode is only valid when tree_changed = 0 */ struct Node* parentnode; /* parent node */ struct Node** pnode; /* Pointer to pointer vector of node structures */ int order; /* index of this in secorder vector */ short recalc_area_; /* NODEAREA, NODERINV, diam, L need recalculation */ short volatile_mark; /* for searching */ void* volatile_ptr; /* e.g. ShapeSection* */ #if DIAMLIST short npt3d; /* number of 3-d points */ short pt3d_bsize; /* amount of allocated space for 3-d points */ struct Pt3d *pt3d; /* list of 3d points with diameter */ struct Pt3d *logical_connection; /* nil for legacy, otherwise specifies logical connection position (for translation) */ #endif struct Prop *prop; /* eg. length, etc. */ } Section; #if DIAMLIST typedef struct Pt3d { float x,y,z,d; /* 3d point, microns */ double arc; } Pt3d; #endif #if METHOD3 typedef float NodeCoef; typedef double NodeVal; typedef struct Info3Coef { NodeVal current; /* for use in next time step */ NodeVal djdv0; NodeCoef coef0; /* 5dx/12 */ NodeCoef coefn; /* 1dx/12 */ NodeCoef coefjdot; /* dx^2*ra/12 */ NodeCoef coefdg; /* dx/12 */ NodeCoef coefj; /* 1/(ra*dx) */ struct Node* nd2; /* the node dx away in the opposite direction*/ /* note above implies that nodes next to branches cannot have point processes and still be third order correct. Also nodes next to branches cannot themselves be branch points */ } Info3Coef; typedef struct Info3Val { /* storage to help build matrix efficiently */ NodeVal GC; /* doesn't include point processes */ NodeVal EC; NodeCoef Cdt; } Info3Val; /*METHOD3*/ #endif /* if any double is added after area then think about changing the notify_free_val parameter in node_free in solve.c */ #define NODED(n) (*((n)->_d)) #define NODERHS(n) (*((n)->_rhs)) #undef NODEV /* sparc-sun-solaris2.9 */ #if CACHEVEC == 0 #define NODEA(n) ((n)->_a) #define NODEB(n) ((n)->_b) #define NODEV(n) ((n)->_v) #define NODEAREA(n) ((n)->_area) #else /* CACHEVEC */ #define NODEV(n) (*((n)->_v)) #define NODEAREA(n) ((n)->_area) #define NODERINV(n) ((n)->_rinv) #define VEC_A(i) (_nt->_actual_a[(i)]) #define VEC_B(i) (_nt->_actual_b[(i)]) #define VEC_D(i) (_nt->_actual_d[(i)]) #define VEC_RHS(i) (_nt->_actual_rhs[(i)]) #define VEC_V(i) (_nt->_actual_v[(i)]) #define VEC_AREA(i) (_nt->_actual_area[(i)]) #define NODEA(n) (VEC_A((n)->v_node_index)) #define NODEB(n) (VEC_B((n)->v_node_index)) #endif /* CACHEVEC */ extern int use_sparse13; extern int use_cachevec; extern int secondorder; extern int cvode_active_; typedef struct Node { #if CACHEVEC == 0 double _v; /* membrane potential */ double _area; /* area in um^2 but see treesetup.c */ double _a; /* effect of node in parent equation */ double _b; /* effect of parent in node equation */ #else /* CACHEVEC */ double *_v; /* membrane potential */ double _area; /* area in um^2 but see treesetup.c */ double _rinv; /* conductance uS from node to parent */ double _v_temp; /* vile necessity til actual_v allocated */ #endif /* CACHEVEC */ double* _d; /* diagonal element in node equation */ double* _rhs; /* right hand side in node equation */ double* _a_matelm; double* _b_matelm; int eqn_index_; /* sparse13 matrix row/col index */ /* if no extnodes then = v_node_index +1*/ /* each extnode adds nlayer more equations after this */ struct Prop *prop; /* Points to beginning of property list */ Section* child; /* section connected to this node */ /* 0 means no other section connected */ Section* sec; /* section this node is in */ /* #if PARANEURON */ struct Node* _classical_parent; /* needed for multisplit */ struct NrnThread* _nt; /* #endif */ #if EXTRACELLULAR struct Extnode* extnode; #endif #if EXTRAEQN struct Eqnblock *eqnblock; /* hook to other equations which need to be solved at the same time as the membrane potential. eg. fast changeing ionic concentrations */ #endif /*MOREEQN*/ #if DEBUGSOLVE double savd; double savrhs; #endif /*DEBUGSOLVE*/ #if VECTORIZE int v_node_index; /* only used to calculate parent_node_indices*/ #endif int sec_node_index_; /* to calculate segment index from *Node */ #if METHOD3 Info3Coef toparent; Info3Coef fromparent; Info3Val thisnode; #endif } Node; #if EXTRACELLULAR /* pruned to only work with sparse13 */ #define nlayer (EXTRACELLULAR) /* first (0) layer is extracellular next to membrane */ /* changing nlayer here means you have to change the explicit numbers nlayer-1 in the mechanism structure in extcell.c */ typedef struct Extnode { double *param; /* points to extracellular parameter vector */ /* v is membrane potential. so v internal = Node.v + Node.vext[0] */ /* However, the Node equation is for v internal. */ /* This is reconciled during update. */ double v[nlayer]; /* v external. */ double _a[nlayer]; double _b[nlayer]; double* _d[nlayer]; double* _rhs[nlayer]; /* d, rhs, a, and b are analogous to those in node */ double* _a_matelm[nlayer]; double* _b_matelm[nlayer]; double* _x12[nlayer]; /* effect of v[layer] on eqn layer-1 (or internal)*/ double* _x21[nlayer]; /* effect of v[layer-1 or internal] on eqn layer*/ } Extnode; #endif #if !INCLUDEHOCH #include "hocdec.h" /* Prop needs Datum and Datum needs Symbol */ #endif #define PROP_PY_INDEX 10 typedef struct Prop { struct Prop *next; /* linked list of properties */ short type; /* type of membrane, e.g. passive, HH, etc. */ short unused1; /* gcc and borland need pairs of shorts to align the same.*/ int param_size; /* for notifying hoc_free_val_array */ double *param; /* vector of doubles for this property */ Datum *dparam; /* usually vector of pointers to doubles of other properties but maybe other things as well for example one cable section property is a symbol */ long _alloc_seq; /* for cache efficiency */ Object* ob; /* nil if normal property, otherwise the object containing the data*/ } Prop; extern double* nrn_prop_data_alloc(int type, int count, Prop* p); extern Datum* nrn_prop_datum_alloc(int type, int count, Prop* p); extern void nrn_prop_data_free(int type, double* pd); extern void nrn_prop_datum_free(int type, Datum* ppd); /* a point process is computed just like regular mechanisms. Ie it appears in the property list whose type specifies which allocation, current, and state functions to call. This means some nodes have more properties than other nodes even in the same section. The Point_process structure allows the interface to hoc variable names. Each variable symbol u.rng->type refers to the point process mechanism. The variable is treated as a vector variable whose first index specifies "which one" of that mechanisms insertion points we are talking about. Finally the variable u.rng->index tells us where in the p-array to look. The number of point_process vectors is the number of different point process types. This is different from the mechanism type which enumerates all mechanisms including the point_processes. It is the responsibility of create_point_process to set up the vectors and fill in the symbol information. However only after the process is given a location can the variables be set or accessed. This is because the allocation function may have to connect to some ionic parameters and the process exists primarily as a property of a node. */ typedef struct Point_process { Section *sec; /* section and node location for the point mechanism*/ Node *node; Prop *prop; /* pointer to the actual property linked to the node property list */ Object* ob; /* object that owns this process */ void* presyn_; /* non-threshold presynapse for NetCon */ void* nvi_; /* NrnVarIntegrator (for local step method) */ void* _vnt; /* NrnThread* (for NET_RECEIVE and multicore) */ } Point_process; #if EXTRAEQN /*Blocks of equations can hang off each node of the current conservation equations. These are equations which must be solved simultaneously because they depend on the voltage and affect the voltage. An example are fast changing ionic concentrations (or merely if we want to be able to calculate steady states using a stable method). */ typedef struct Eqnblock { struct Eqnblock *eqnblock_next; /* may be several such blocks */ Pfri eqnblock_triang; /* triangularization function */ Pfri eqnblock_bksub; /* back substitution function */ double *eqnblock_data; #if 0 the solving functions know how to find the following info from the eqnblock_data. double *eqnblock_row; /* current conservation depends on states */ double *eqnblock_col; /* state equations depend on voltage */ double *eqnblock_matrix; /* state equations depend on states */ double *eqnblock_rhs: the functions merely take a pointer to the node and this Eqnblock in order to update the values of the diagonal, v, and the rhs The interface with EXTRACELLULAR makes things a bit more subtle. It seems clear that we will have to change the meaning of v to be membrane potential so that the internal potential is v + vext. This will avoid requiring two rows and two columns since the state equations will depend only on v and not vext. In fact, if vext did not have longitudinal relationships with other vext the extracellular mechanism could be implemented in this style. #endif } Eqnblock; #endif /*EXTRAEQN*/ extern int nrn_global_ncell; /* note that for multiple threads all the rootnodes are no longer contiguous */ extern hoc_List* section_list; /* Where the Sections live */ extern Section* chk_access(); extern Section *sec_alloc(); /* Allocates a single section */ extern void node_alloc(Section*, short); /* Allocates node vectors in a section*/ extern double section_length(Section*), nrn_diameter(Node*); extern double nrn_ghk(double, double, double, double); extern Node* nrn_parent_node(Node*); extern Section* nrn_section_alloc(); extern void nrn_section_free(Section*); extern int nrn_is_valid_section_ptr(void*); /* loop over sections. Must previously declare Item* qsec. Contains the {! */ #define ForAllSections(sec) \ ITERATE(qsec, section_list) { Section* sec = hocSEC(qsec); #if METHOD3 extern int _method3; #endif #include extern int stoprun; #define tstopbit (1 << 15) #define tstopset stoprun |= tstopbit #define tstopunset stoprun &= (~tstopbit) /* cvode.event(tevent) sets this. Reset at beginning */ /* of any hoc call for integration and before returning to hoc */ #if defined(__cplusplus) } #endif #include "nrn_ansi.h" #endif neuron-7.5/src/nrnoc/solve.c000066400000000000000000000500711323325274500161060ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/solve.c,v 1.15 1999/07/12 14:34:13 hines Exp */ /* solve.c 15-Dec-88 */ /* The data structures in section.h were developed primarily for the needs of solving and setting up the matrix equations reasonably efficiently in space and time. I am hypothesizing that they will also be convenient for accessing parameters. Important properties of the structures used here are: Each section must have at least one node. There may be 0 sections. The order for back substitution is given by section[i]->order. The order of last node to first node is used in triangularization. First node to last is used in back substitution. */ /* An equation is associated with each node. d and rhs are the diagonal and right hand side respectively. a is the effect of this node on the parent node's equation. b is the effect of the parent node on this node's equation. d is assumed to be non-zero. */ /* We have seen that it is best to have nodes generally denote the centers of segments because most properties are most easily defined at those points. The old problem then arises again of 2nd order correct demands that a point be exactly at any branches. For this reason we always allocate one extra node at the end with 0 length. Sections that connect at x=1 connect to this node. Sections that connect from 0 #include #include #include #include "section.h" #include "membdef.h" #include "membfunc.h" #include "spmatrix.h" extern int tree_changed; static void node_free(); static void triang(NrnThread*), bksub(NrnThread*); #if PARANEURON void (*nrnmpi_splitcell_compute_)(); #endif void (*nrn_multisplit_solve_)(); /* used for vectorization and distance calculations */ int section_count; Section** secorder; /* nrn_solve() solves the matrix equations represented in "section" rhs is replaced by the solution (delta v's). d is destroyed. */ /* Section *sec_alloc(nsec) allocates a vector of nsec sections and returns a pointer to the first one in the list. No nodes are allocated. The usage is normally "section = sec_alloc(nsection)" After allocation one must allocate nodes for each section with node_alloc(sec, n). After all this connect sections together using section indices. Finally order the sections with section_order(section, nsec). When the section vector is no longer needed (and before creating another one) free the space with sec_free(section, nsection); */ #if DEBUGSOLVE double debugsolve(void) /* returns solution error */ { short inode; int i; Section *sec, *psec, *ch; Node *nd, *pnd, **ndP; double err, sum; /* save parts of matrix that will be destroyed */ assert(0) /* need to save the rootnodes too */ ForAllSections(sec) assert(sec->pnode && sec->nnode); for (inode = sec->nnode-1; inode >= 0; inode--) { nd = sec->pnode[inode]; nd->savd = NODED(nd); nd->savrhs = NODERHS(nd); } } triang(nrn_threads); bksub(nrn_threads); err = 0.; /* need to check the rootnodes too */ ForAllSections(sec) for (inode = sec->nnode-1; inode >= 0; inode--) { ndP= sec->pnode + inode; nd = sec->pnode[inode]; /* a single internal current equation */ sum = nd->savd * NODERHS(nd); if (inode > 0) { sum += NODEB(nd) * NODERHS(nd - 1); }else{ pnd = sec->parentnode; sum += NODEB(nd) * NODERHS(pnd); } if (inode < sec->nnode-1) { sum += NODEA(ndP[1]) * NODERHS(ndP[1]); } for (ch = nd->child; ch; ch = ch->sibling){ psec = ch; pnd = psec->pnode[0]; assert(pnd && psec->nnode); sum += NODEA(pnd) * NODERHS(pnd); } sum -= nd->savrhs; err += fabs(sum); } } return err; } #endif /*DEBUGSOLVE*/ double node_dist(Section* sec, Node* node) { int inode; double ratio; if (!sec || sec->parentnode == node) { return 0.; }else if ((inode = node->sec_node_index_) == sec->nnode-1) { ratio = 1.; }else{ ratio = ((double)inode+.5)/((double)sec->nnode - 1.); } return section_length(sec)*ratio; } double topol_distance(Section* sec1, Node* node1, Section* sec2, Node* node2, Section** prootsec, Node** prootnode) { /* returns the distance between the two nodes Ie the sum of the appropriate length portions of those sections connecting these two nodes. */ double d, x1, x2; d = 0; if (tree_changed) { setup_topology(); } /* keep moving toward a common node */ while (sec1 != sec2) { if (!sec1) { d += node_dist(sec2, node2); node2 = sec2->parentnode; sec2 = sec2->parentsec; }else if (!sec2){ d += node_dist(sec1, node1); node1 = sec1->parentnode; sec1 = sec1->parentsec; }else if (sec1->order > sec2->order) { d += node_dist(sec1, node1); node1 = sec1->parentnode; sec1 = sec1->parentsec; }else{ d += node_dist(sec2, node2); node2 = sec2->parentnode; sec2 = sec2->parentsec; } } if (!sec1) { if (node1 != node2) { sec1 = 0; d = 1e20; node1 = (Node*)0; } } else if (node1 != node2) { x1 = node_dist(sec1, node1); x2 = node_dist(sec2, node2); if (x1 < x2) { d += x2 - x1; }else{ node1 = node2; d += x1 - x2; } } *prootsec = sec1; *prootnode = node1; return d; } static Section *origin_sec; void distance(void) { double d, chkarg(); int mode; Node* node, *node_exact(); Section *sec; static Node* origin_node; if (tree_changed) { setup_topology(); } if (ifarg(2)) { nrn_seg_or_x_arg(2, &sec, &d); mode = (int) chkarg(1, 0., 1.); }else if (ifarg(1)) { nrn_seg_or_x_arg(1, &sec, &d); mode = 1; }else{ sec = chk_access(); d = 0.; mode = 0; } node = node_exact(sec, d); if (mode == 0) { origin_node = node; origin_sec = sec; }else{ if (!origin_sec || !origin_sec->prop) { hoc_execerror("Distance origin not valid.","Need to initialize origin with distance()"); } d = topol_distance(origin_sec, origin_node, sec, node, &sec, &node ); } hoc_retpushx(d); } static void dashes(Section* sec, int offset, int first); void nrnhoc_topology(void) /* print the topology of the branched cable */ { hoc_Item* q; v_setup_vectors(); printf("\n"); ITERATE(q, section_list) { Section* sec = (Section*)VOIDITM(q); if (sec->parentsec == (Section*)0) { Printf("|"); dashes(sec, 0, '-'); } } Printf("\n"); hoc_retpushx(1.); } static void dashes(Section* sec, int offset, int first) { int i, scnt; Section* ch; char direc[10]; extern double nrn_section_orientation(); i = (int)nrn_section_orientation(sec); sprintf(direc, "(%d-%d)", i, 1-i); for (i=0; innode; i++) Printf("-"); if (sec->prop->dparam[4].val == 1) { Printf("| %s%s\n", secname(sec), direc); }else{ Printf("| %s%s with %g rall branches\n", secname(sec), direc, sec->prop->dparam[4].val); } /* navigate the sibling list backwards */ /* note that the sibling list is organized monotonically by increasing distance from parent */ for (scnt=0, ch=sec->child; ch; ++scnt, ch = ch->sibling) { hoc_pushobj((Object**)ch); } while(scnt--) { Object** hoc_objpop(); ch = (Section*)hoc_objpop(); i = node_index_exact(sec, nrn_connection_position(ch)); Printf(" "); dashes(ch, i+offset+1, 0140); /* the ` char*/ } } /* solve the matrix equation */ void nrn_solve(NrnThread* _nt) { #if 0 printf("\nnrn_solve enter %lx\n", (long)_nt); nrn_print_matrix(_nt); #endif #if PARANEURON if (nrn_multisplit_solve_) { nrn_thread_error("nrn_multisplit_solve"); (*nrn_multisplit_solve_)(); return; } #endif #if DEBUGSOLVE { double err; nrn_thread_error("debugsolve"); err = debugsolve(); if (err > 1.e-10) { Fprintf(stderr, "solve error = %g\n", err); } } #else if (use_sparse13) { int e; nrn_thread_error("solve use_sparse13"); e = spFactor(_nt->_sp13mat); if (e != spOKAY) { switch (e) { case spZERO_DIAG: hoc_execerror("spFactor error:", "Zero Diagonal"); case spNO_MEMORY: hoc_execerror("spFactor error:", "No Memory"); case spSINGULAR: hoc_execerror("spFactor error:", "Singular"); } } spSolve(_nt->_sp13mat, _nt->_actual_rhs, _nt->_actual_rhs); }else{ triang(_nt); #if PARANEURON if (nrnmpi_splitcell_compute_) { nrn_thread_error("nrnmpi_splitcell_compute"); (*nrnmpi_splitcell_compute_)(); } #endif bksub(_nt); } #endif #if 0 printf("\nnrn_solve leave %lx\n", (long)_nt); nrn_print_matrix(_nt); #endif } #if VECTORIZE && _CRAY extern Node*** v_node_depth_lists; extern Node*** v_parent_depth_lists; /* parents must be unique in each list */ extern int* v_node_depth_count; extern int v_node_depth; /* so depth may be more than twice what you'd expect */ #endif /* triangularization of the matrix equations */ void triang(NrnThread* _nt) { register Node *nd, *pnd; double p; int i, i2, i3; i2 = _nt->ncell; i3 = _nt->end; #if CACHEVEC if (use_cachevec) { for (i = i3 - 1; i >= i2; --i) { p = VEC_A(i) / VEC_D(i); VEC_D(_nt->_v_parent_index[i]) -= p * VEC_B(i); VEC_RHS(_nt->_v_parent_index[i]) -= p * VEC_RHS(i); } }else #endif /* CACHEVEC */ { for (i = i3 - 1; i >= i2; --i) { nd = _nt->_v_node[i]; pnd = _nt->_v_parent[i]; p = NODEA(nd) / NODED(nd); NODED(pnd) -= p * NODEB(nd); NODERHS(pnd) -= p * NODERHS(nd); } } } /* back substitution to finish solving the matrix equations */ void bksub(NrnThread* _nt) { register Node *nd, *cnd; int i, i1, i2, i3; i1 = 0; i2 = i1 + _nt->ncell; i3 = _nt->end; #if CACHEVEC if (use_cachevec) { for (i = i1; i < i2; ++i) { VEC_RHS(i) /= VEC_D(i); } for (i = i2; i < i3; ++i) { VEC_RHS(i) -= VEC_B(i) * VEC_RHS(_nt->_v_parent_index[i]); VEC_RHS(i) /= VEC_D(i); } }else #endif /* CACHEVEC */ { for (i = i1; i < i2; ++i) { NODERHS(_nt->_v_node[i]) /= NODED(_nt->_v_node[i]); } for (i = i2; i < i3; ++i) { cnd = _nt->_v_node[i]; nd = _nt->_v_parent[i]; NODERHS(cnd) -= NODEB(cnd) * NODERHS(nd); NODERHS(cnd) /= NODED(cnd); } } } void nrn_clear_mark(void) { hoc_Item* qsec; ForAllSections(sec) sec->volatile_mark = 0; } } short nrn_increment_mark(sec) Section* sec; { return sec->volatile_mark++;} short nrn_value_mark(sec) Section* sec; { return sec->volatile_mark;} /* allocate space for sections (but no nodes) */ /* returns pointer to Section */ Section* sec_alloc(void) { Section *sec; /* changed from emalloc to allocation from a SectionPool in order to allow safe checking of whether a void* is a possible Section* without the possibility of invalid memory read errors. Note that freeing sections must be done with nrn_section_free(Section*) */ sec = nrn_section_alloc(); sec->refcount = 0; sec->nnode = 0; sec->parentsec = sec->sibling = sec->child = (Section*)0; sec->parentnode = (Node*)0; sec->pnode = (Node **)0; #if DIAMLIST sec->npt3d = 0; sec->pt3d_bsize = 0; sec->pt3d = (Pt3d *)0; sec->logical_connection = (Pt3d*)0; #endif sec->prop = (Prop *)0; sec->recalc_area_ = 0; return sec; } static void section_unlink(Section* sec); /* free everything about sections */ void sec_free(hoc_Item* secitem) { Section *sec; if (!secitem) { return; } sec = hocSEC(secitem); assert(sec); /*printf("sec_free %s\n", secname(sec));*/ section_unlink(sec); {Object* ob = sec->prop->dparam[6].obj; if (ob && ob->secelm_ == secitem) { /* it is the last */ hoc_Item* q = secitem->prev; if (q->itemtype && hocSEC(q)->prop && hocSEC(q)->prop->dparam[6].obj == ob) { ob->secelm_ = q; }else{ ob->secelm_ = (hoc_Item*)0; } } } hoc_l_delete(secitem); prop_free(&(sec->prop)); node_free(sec); if (!sec->parentsec && sec->parentnode) { nrn_node_destruct1(sec->parentnode); } #if DIAMLIST if (sec->pt3d) { free((char *)sec->pt3d); sec->pt3d = (Pt3d*)0; sec->npt3d = 0; sec->pt3d_bsize = 0; } if (sec->logical_connection) { free((char*)sec->logical_connection); sec->logical_connection = (Pt3d*)0; } #endif section_unref(sec); } /* can't actually release the space till the refcount goes to 0 */ void section_unref(Section* sec) { /*printf("section_unref %lx %d\n", (long)sec, sec->refcount-1);*/ if (--sec->refcount <= 0) { #if 0 printf("section_unref: freed\n"); #endif assert (!sec->parentsec); nrn_section_free(sec); } } void section_ref(Section* sec) { /*printf("section_ref %lx %d\n", (long)sec,sec->refcount+1);*/ ++sec->refcount; } void nrn_sec_ref(Section** psec, Section* sec) { Section* s = *psec; if (sec) { section_ref(sec); } *psec = sec; if (s) { section_unref(s); } } static void section_unlink(Section* sec) /* other sections no longer reference this one */ { /* only sections that are explicitly connected to this are disconnected */ Section* child; tree_changed = 1; /* disconnect the sections connected to this at the parent end */ for (child = sec->child; child; child = child->sibling) { nrn_disconnect(child); } nrn_disconnect(sec); } Node** node_construct(int n) { Node* nd, **pnode; int i; pnode = (Node**)ecalloc((unsigned)n, sizeof(Node*)); for (i = n - 1; i >= 0; i--) { nd = (Node *)ecalloc(1, sizeof(Node)); #if CACHEVEC nd->_v = &nd->_v_temp; nd->_area = 100.; nd->_rinv = 0.; #endif nd->sec_node_index_ = i; pnode[i] = nd; nd->prop = (Prop *)0; NODEV(nd) = DEF_vrest; #if EXTRACELLULAR nd->extnode = (Extnode*)0; #endif #if EXTRAEQN nd->eqnblock = (Eqnblock *)0; #endif } return pnode; } Node* nrn_node_construct1(void) { Node* nd; Node** ndp; ndp = node_construct(1); nd = ndp[0]; free((char*)ndp); return nd; } void nrn_node_destruct1(Node* nd) { if (!nd) { return; } prop_free(&(nd->prop)); #if CACHEVEC notify_freed_val_array(&NODEV(nd), 1); notify_freed_val_array(&NODEAREA(nd), 2); #else notify_freed_val_array(&NODEV(nd), 2); #endif #if EXTRACELLULAR if (nd->extnode) { notify_freed_val_array(nd->extnode->v, nlayer); } #endif #if EXTRAEQN { Eqnblock *e, *e1; for (e = nd->eqnblock; e; e = e1) { e1 = e->eqnblock_next; free((char *)e); } } #endif #if EXTRACELLULAR if (nd->extnode) { free((char *)nd->extnode); } #endif free((char*)nd); } void node_destruct(Node** pnode, int n) { int i; Node* nd; for (i = n - 1; i >= 0; i--) { if (pnode[i]) { nrn_node_destruct1(pnode[i]); } } free((char *)pnode); } #if KEEP_NSEG_PARM extern int keep_nseg_parm_; static Node* node_clone(Node* nd1) { Node* nd2; Prop* p1, *p2, *prop_alloc(); int i, imax; nd2 = (Node *)ecalloc(1, sizeof(Node)); #if CACHEVEC nd2->_v = &nd2->_v_temp; #endif NODEV(nd2) = NODEV(nd1); for (p1 = nd1->prop; p1; p1 = p1->next) { if (!memb_func[p1->type].is_point) { p2 = prop_alloc(&(nd2->prop), p1->type, nd2); if (p2->ob) { Symbol* s, *ps; double* px, *py; int j, jmax; s = memb_func[p1->type].sym; jmax = s->s_varn; for (j=0; j < jmax; ++j) { ps = s->u.ppsym[j]; px = p2->ob->u.dataspace[ps->u.rng.index].pval; py = p1->ob->u.dataspace[ps->u.rng.index].pval; imax = hoc_total_array_data(ps, 0); for (i=0; i < imax; ++i) { px[i] = py[i]; } } }else{ for (i=0; i < p1->param_size; ++i) { p2->param[i] = p1->param[i]; } } } } /* in case the user defined an explicit ion_style, make sure the new node has the same style for all ions. */ for (p1 = nd1->prop; p1; p1 = p1->next) { if (nrn_is_ion(p1->type)) { p2 = nd2->prop; while (p2 && p2->type != p1->type) { p2 = p2->next; } assert(p2 && p1->type == p2->type); p2->dparam[0].i = p1->dparam[0].i; } } return nd2; } static Node* node_interp(Node* nd1, Node* nd2, double frac) { Node* nd; if (frac > .5) { nd = node_clone(nd2); }else{ nd = node_clone(nd1); } return nd; } static void node_realloc(Section* sec, short nseg) { Node** pn1, **pn2; int n1, n2, i1, i2, i; double x; pn1 = sec->pnode; n1 = sec->nnode; pn2 = (Node**)ecalloc((unsigned)nseg, sizeof(Node*)); n2 = nseg; sec->pnode = pn2; sec->nnode = n2; n1--; n2--; /* number of non-zero area segments */ pn2[n2] = pn1[n1]; /* 0 area node at end of section */ pn1[n1] = (Node*)0; /* sprinkle nodes from pn1 to pn2 */ if (n1 < n2) { /* the ones that are reused */ for (i1 = 0; i1 < n1; ++i1) { x = (i1+.5)/(double)n1; i2 = (int)(n2*x); /* because we want to round to n2*x-.5 */ pn2[i2] = pn1[i1]; } /* the ones that are cloned */ for (i2 = 0; i2 < n2; ++i2) if (pn2[i2] == NULL) { x = (i2 + 0.5)/(double)n2; i1 = (int)(n1*x); pn2[i2] = node_clone(pn1[i1]); } for (i1 = 0; i1 < n1; ++i1) { pn1[i1] = (Node*)0; } }else{ for (i2 = 0; i2 < n2; ++i2) { x = (i2+.5)/(double)n2; i1 = (int)(n1*x); pn2[i2] = pn1[i1]; pn1[i1] = (Node*)0; } /* do not lose any point processes */ i1 = 0; for (i2=0; i2 < n2; ++i2) { double x1, x2; x2 = (i2+1.)/(double)n2; /* far end of new segment */ for (; i1 < n1; ++i1) { x1 = (i1+.5)/(double)n1; if (x1 > x2) { break; } if (pn1[i1] == (Node*)0) { continue; } #if 0 printf("moving point processes from pn1[%d] to pn2[%d]\n", i1, i2); printf("i.e. x1=%g in the range %g to %g\n", x1, x2-1./n2, x2); #endif nrn_relocate_old_points(sec, pn1[i1], sec, pn2[i2]); } } /* Some of the pn1 were not used */ } node_destruct(pn1, n1 + 1); for (i2=0; i2 < nseg; ++i2) { pn2[i2]->sec_node_index_ = i2; } #if EXTRACELLULAR if (sec->pnode[sec->nnode-1]->extnode) { extcell_2d_alloc(sec); } #endif } #endif /* allocate node vectors for a section list */ void node_alloc(Section* sec, short nseg) { int i; #if KEEP_NSEG_PARM if (keep_nseg_parm_ && (nseg > 0) && sec->pnode) { node_realloc(sec, nseg); }else #endif { node_free(sec); if (nseg == 0) { return; } sec->pnode = node_construct(nseg); sec->nnode = nseg; } for (i=0; i < nseg; ++i) { sec->pnode[i]->sec = sec; } } /* free a node vector for one section */ static void node_free(Section* sec) { Node **pnd; pnd = sec->pnode; if (!pnd) { sec->nnode = 0; } if (sec->nnode == 0) { return; } node_destruct(sec->pnode, sec->nnode); sec->pnode = (Node **)0; sec->nnode = 0; } void section_order(void) /* create a section order consistent */ /* with connection info */ { int order, isec; Section* ch; Section *sec; hoc_Item* qsec; /* count the sections */ section_count = 0; /*SUPPRESS 765*/ ForAllSections(sec) sec->order = -1; ++section_count; } if (secorder) { free((char *)secorder); secorder = (Section**)0; } if (section_count) { secorder = (Section**)emalloc(section_count*sizeof(Section*)); } order = 0; ForAllSections(sec) /* all the roots first */ if (!sec->parentsec) { secorder[order] = sec; sec->order = order; ++order; } } for (isec=0; isec= order) { /* there is a loop */ ForAllSections(sec) Section* psec, *s = sec; for (psec = sec->parentsec; psec; s = psec, psec = psec->parentsec) { if (!psec || s->order >= 0) { break; }else if (psec == sec) { fprintf(stderr, "A loop exists consisting of:\n %s", secname(sec)); for (s = sec->parentsec; s != sec; s = s->parentsec) { fprintf(stderr, " %s", secname(s)); } fprintf(stderr, " %s\nUse
disconnect() to break the loop\n ", secname(sec)); hoc_execerror("A loop exists involving section", secname(sec)); } } } } sec = secorder[isec]; for (ch = sec->child; ch; ch = ch->sibling) { secorder[order] = ch; ch->order = order; ++order; } } assert(order == section_count); } neuron-7.5/src/nrnoc/stim.c000066400000000000000000000211531323325274500157310ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__IClamp #define _nrn_initial _nrn_initial__IClamp #define nrn_cur _nrn_cur__IClamp #define _nrn_current _nrn_current__IClamp #define nrn_jacob _nrn_jacob__IClamp #define nrn_state _nrn_state__IClamp #define _net_receive _net_receive__IClamp #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define del _p[0] #define dur _p[1] #define amp _p[2] #define i _p[3] #define v _p[4] #define _g _p[5] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "dur", 0, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "del", "ms", "dur", "ms", "amp", "nA", "i", "nA", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "IClamp", "del", "dur", "amp", 0, "i", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 6, _prop); /*initialize range parameters*/ del = 0; dur = 0; amp = 0; } _prop->param = _p; _prop->param_size = 6; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _stim_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 6, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 IClamp /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/stim.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { i = 0.0 ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { at_time ( _nt, del ) ; at_time ( _nt, del + dur ) ; if ( t < del + dur && t >= del ) { i = amp ; } else { i = 0.0 ; } } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) += _rhs; }else #endif { NODERHS(_nd) += _rhs; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_rhs[_ni[_iml]] += _rhs; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_rhs[0] += _rhs; } #endif } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) -= _g; }else #endif { NODED(_nd) -= _g; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_d[_ni[_iml]] -= _g; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_d[0] += _g; } #endif } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/stim.mod000077500000000000000000000011141323325274500162640ustar00rootroot00000000000000COMMENT Since this is an electrode current, positive values of i depolarize the cell and in the presence of the extracellular mechanism there will be a change in vext since i is not a transmembrane current but a current injected directly to the inside of the cell. ENDCOMMENT NEURON { POINT_PROCESS IClamp RANGE del, dur, amp, i ELECTRODE_CURRENT i } UNITS { (nA) = (nanoamp) } PARAMETER { del (ms) dur (ms) <0,1e9> amp (nA) } ASSIGNED { i (nA) } INITIAL { i = 0 } BREAKPOINT { at_time(del) at_time(del+dur) if (t < del + dur && t >= del) { i = amp }else{ i = 0 } } neuron-7.5/src/nrnoc/svclmp.c000066400000000000000000000261021323325274500162600ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__SEClamp #define _nrn_initial _nrn_initial__SEClamp #define nrn_cur _nrn_cur__SEClamp #define _nrn_current _nrn_current__SEClamp #define nrn_jacob _nrn_jacob__SEClamp #define nrn_state _nrn_state__SEClamp #define _net_receive _net_receive__SEClamp #define icur icur__SEClamp #define vstim vstim__SEClamp #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define rs _p[0] #define dur1 _p[1] #define amp1 _p[2] #define dur2 _p[3] #define amp2 _p[4] #define dur3 _p[5] #define amp3 _p[6] #define i _p[7] #define vc _p[8] #define tc2 _p[9] #define tc3 _p[10] #define on _p[11] #define v _p[12] #define _g _p[13] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_icur(); static double _hoc_vstim(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "icur", _hoc_icur, "vstim", _hoc_vstim, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "dur3", 0, 1e+09, "dur2", 0, 1e+09, "rs", 1e-09, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "rs", "megohm", "dur1", "ms", "amp1", "mV", "dur2", "ms", "amp2", "mV", "dur3", "ms", "amp3", "mV", "i", "nA", "vc", "mV", 0,0 }; static double delta_t = 1; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "SEClamp", "rs", "dur1", "amp1", "dur2", "amp2", "dur3", "amp3", 0, "i", "vc", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 14, _prop); /*initialize range parameters*/ rs = 1; dur1 = 0; amp1 = 0; dur2 = 0; amp2 = 0; dur3 = 0; amp3 = 0; } _prop->param = _p; _prop->param_size = 14; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _svclmp_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 14, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 SEClamp /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/svclmp.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = "svclmp.mod"; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int icur(_threadargsproto_); static int vstim(_threadargsproto_); static int icur ( _threadargsproto_ ) { if ( on ) { i = ( vc - v ) / rs ; } else { i = 0.0 ; } return 0; } static double _hoc_icur(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; icur ( _p, _ppvar, _thread, _nt ); return(_r); } static int vstim ( _threadargsproto_ ) { on = 1.0 ; if ( dur1 ) { at_time ( _nt, dur1 ) ; } if ( dur2 ) { at_time ( _nt, tc2 ) ; } if ( dur3 ) { at_time ( _nt, tc3 ) ; } if ( t < dur1 ) { vc = amp1 ; } else if ( t < tc2 ) { vc = amp2 ; } else if ( t < tc3 ) { vc = amp3 ; } else { vc = 0.0 ; on = 0.0 ; } icur ( _threadargs_ ) ; return 0; } static double _hoc_vstim(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = 1.; vstim ( _p, _ppvar, _thread, _nt ); return(_r); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ { tc2 = dur1 + dur2 ; tc3 = tc2 + dur3 ; on = 0.0 ; } } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { vstim ( _threadargs_ ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) += _rhs; }else #endif { NODERHS(_nd) += _rhs; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_rhs[_ni[_iml]] += _rhs; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_rhs[0] += _rhs; } #endif } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) -= _g; }else #endif { NODED(_nd) -= _g; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_d[_ni[_iml]] -= _g; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_d[0] += _g; } #endif } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v=_v; { { { icur(_p, _ppvar, _thread, _nt); } }}} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/svclmp.mod000077500000000000000000000046501323325274500166240ustar00rootroot00000000000000TITLE svclmp.mod COMMENT Single electrode Voltage clamp with three levels. Clamp is on at time 0, and off at time dur1+dur2+dur3. When clamp is off the injected current is 0. The clamp levels are amp1, amp2, amp3. i is the injected current, vc measures the control voltage) Do not insert several instances of this model at the same location in order to make level changes. That is equivalent to independent clamps and they will have incompatible internal state values. The electrical circuit for the clamp is exceedingly simple: vc ---'\/\/`--- cell rs Note that since this is an electrode current model v refers to the internal potential which is equivalent to the membrane potential v when there is no extracellular membrane mechanism present but is v+vext when one is present. Also since i is an electrode current, positive values of i depolarize the cell. (Normally, positive membrane currents are outward and thus hyperpolarize the cell) ENDCOMMENT INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)} DEFINE NSTEP 3 NEURON { POINT_PROCESS SEClamp ELECTRODE_CURRENT i RANGE dur1, amp1, dur2, amp2, dur3, amp3, rs, vc, i } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (microsiemens) } PARAMETER { rs = 1 (megohm) <1e-9, 1e9> dur1 (ms) amp1 (mV) dur2 (ms) <0,1e9> amp2 (mV) dur3 (ms) <0,1e9> amp3 (mV) } ASSIGNED { v (mV) : automatically v + vext when extracellular is present i (nA) vc (mV) tc2 (ms) tc3 (ms) on } INITIAL { tc2 = dur1 + dur2 tc3 = tc2 + dur3 on = 0 } BREAKPOINT { SOLVE icur METHOD after_cvode vstim() } PROCEDURE icur() { if (on) { i = (vc - v)/rs }else{ i = 0 } } COMMENT The SOLVE of icur() in the BREAKPOINT block is necessary to compute i=(vc - v(t))/rs instead of i=(vc - v(t-dt))/rs This is important for time varying vc because the actual i used in the implicit method is equivalent to (vc - v(t)/rs due to the calculation of di/dv from the BREAKPOINT block. The reason this works is because the SOLVE statement in the BREAKPOINT block is executed after the membrane potential is advanced. It is a shame that vstim has to be called twice but putting the call in a SOLVE block would cause playing a Vector into vc to be off by one time step. ENDCOMMENT PROCEDURE vstim() { on = 1 if (dur1) {at_time(dur1)} if (dur2) {at_time(tc2)} if (dur3) {at_time(tc3)} if (t < dur1) { vc = amp1 }else if (t < tc2) { vc = amp2 }else if (t < tc3) { vc = amp3 }else { vc = 0 on = 0 } icur() } neuron-7.5/src/nrnoc/syn.c000066400000000000000000000215411323325274500155670ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__AlphaSynapse #define _nrn_initial _nrn_initial__AlphaSynapse #define nrn_cur _nrn_cur__AlphaSynapse #define _nrn_current _nrn_current__AlphaSynapse #define nrn_jacob _nrn_jacob__AlphaSynapse #define nrn_state _nrn_state__AlphaSynapse #define _net_receive _net_receive__AlphaSynapse #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define onset _p[0] #define tau _p[1] #define gmax _p[2] #define e _p[3] #define i _p[4] #define g _p[5] #define v _p[6] #define _g _p[7] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_alpha(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "alpha", _hoc_alpha, 0, 0 }; #define alpha alpha_AlphaSynapse extern double alpha( _threadargsprotocomma_ double ); /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "gmax", 0, 1e+09, "tau", 0.001, 1e+06, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "onset", "ms", "tau", "ms", "gmax", "uS", "e", "mV", "i", "nA", 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "AlphaSynapse", "onset", "tau", "gmax", "e", 0, "i", 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 8, _prop); /*initialize range parameters*/ onset = 0; tau = 0.1; gmax = 0; e = 0; } _prop->param = _p; _prop->param_size = 8; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _syn_reg_() { int _vectorized = 1; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 8, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 AlphaSynapse /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/syn.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} double alpha ( _threadargsprotocomma_ double _lx ) { double _lalpha; if ( _lx < 0.0 || _lx > 10.0 ) { _lalpha = 0.0 ; } else { _lalpha = _lx * exp ( 1.0 - _lx ) ; } return _lalpha; } static double _hoc_alpha(void* _vptr) { double _r; double* _p; Datum* _ppvar; Datum* _thread; _NrnThread* _nt; _p = ((Point_process*)_vptr)->_prop->param; _ppvar = ((Point_process*)_vptr)->_prop->dparam; _thread = _extcall_thread; _nt = (_NrnThread*)((Point_process*)_vptr)->_vnt; _r = alpha ( _p, _ppvar, _thread, _nt, *getarg(1) ); return(_r); } static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ { if ( gmax ) { at_time ( _nt, onset ) ; } g = gmax * alpha ( _threadargscomma_ ( t - onset ) / tau ) ; i = g * ( v - e ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) -= _rhs; }else #endif { NODERHS(_nd) -= _rhs; } } } static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) += _g; }else #endif { _nd = _ml->_nodelist[_iml]; NODED(_nd) += _g; } } } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/syn.mod000077500000000000000000000015241323325274500161260ustar00rootroot00000000000000COMMENT an synaptic current with alpha function conductance defined by i = g * (v - e) i(nanoamps), g(microsiemens); where g = 0 for t < onset and g = gmax * (t - onset)/tau * exp(-(t - onset - tau)/tau) for t > onset this has the property that the maximum value is gmax and occurs at t = delay + tau. ENDCOMMENT NEURON { POINT_PROCESS AlphaSynapse RANGE onset, tau, gmax, e, i NONSPECIFIC_CURRENT i } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (microsiemens) } PARAMETER { onset=0 (ms) tau=.1 (ms) <1e-3,1e6> gmax=0 (uS) <0,1e9> e=0 (mV) } ASSIGNED { v (mV) i (nA) g (uS)} BREAKPOINT { if (gmax) { at_time(onset) } g = gmax * alpha( (t - onset)/tau ) i = g*(v - e) } FUNCTION alpha(x) { if (x < 0 || x > 10) { alpha = 0 }else{ alpha = x * exp(1 - x) } } neuron-7.5/src/nrnoc/synapse.c000066400000000000000000000112761323325274500164440ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/nrnoc/synapse.c,v 1.2 1997/08/15 13:04:13 hines Exp */ /* modified from fstim.c */ /* fsyn(maxnum) allocates space for maxnum synapses. Space for previously existing synapses is released. All synapses initialized to 0 maximum conductance. fsyn(i, loc, delay, tau, gmax, erev) The ith synapse is injected at parameter `loc' different synapses do not concatenate but can ride on top of each other. delay refers to onset of synapse relative to t=0 delay and duration are in msec. stim in namps. a synaptic current defined by i = g * (v - erev) i(nanoamps), g(microsiemens); where g = 0 for t < delay and g = gmax * (t - delay)/tau * exp(-(t - delay - tau)/tau) for t > onset this has the property that the maximum value is gmax and occurs at t = delay + tau. fsyni(i) returns synaptic current for ith synapse at the value of the global time t in units of nanoamps. fsyng(i) returns synaptic conductance for ith synapse at the value of the global time t. */ #include #include "neuron.h" #include "section.h" #include "nrniv_mf.h" #define nt_t nrn_threads->_t /* impress the stimulus code to do synapses */ typedef struct Stimulus { double loc; /* parameter location (0--1) */ double delay; /* value of t in msec for onset */ double duration;/* turns off at t = delay + duration */ double mag; /* conductance in microsiemens */ double erev; double mag_seg; /* value added to rhs, depends on area of seg*/ double g; /* holds conductance when current calculated */ Node *pnd; /* segment location */ Section* sec; } Stimulus; static int maxstim = 0; /* size of stimulus array */ static Stimulus *pstim; /* pointer to stimulus array */ static void free_syn(void); static void stim_record(int); void print_syn(void) { int i; if (maxstim == 0) return; /*SUPPRESS 440*/ Printf("fsyn(%d)\n/* section fsyn( #, loc, delay(ms), tau(ms), conduct(uS), erev(mV)) */\n", maxstim); for (i=0; i 1) { hoc_execerror("fsyn does not allow threads", ""); } i = chkarg(1, 0., 10000.); if (ifarg(2)) { if (i >= maxstim) { hoc_execerror("index out of range", (char *)0); } pstim[i].loc = chkarg(2, 0., 1.); pstim[i].delay = chkarg(3, 0., 1e21); pstim[i].duration = chkarg(4, 0., 1e21); pstim[i].mag = *getarg(5); pstim[i].erev = *getarg(6); pstim[i].sec = chk_access(); section_ref(pstim[i].sec); stim_record(i); } else { free_syn(); maxstim = i; if (maxstim) { pstim = (Stimulus *)emalloc((unsigned)(maxstim * sizeof(Stimulus))); } for (i = 0; iprop) { pstim[i].pnd = node_ptr(sec, pstim[i].loc, &area); pstim[i].mag_seg = 1.e2*pstim[i].mag / area; }else{ section_unref(sec); pstim[i].sec = 0; } } } void synapse_prepare(void) { int i; for (i=0; i 0.0 && x < 10.0) { return x * exp(-x + 1.0); } return 0.0; } void activsynapse_rhs(void) { int i; for (i=0; i /* /local/src/master/nrn/src/nrnoc/treeset.c,v 1.39 1999/07/08 14:25:07 hines Exp */ #include #if HAVE_STDLIB_H #include #endif #include #include #include "section.h" #include "membfunc.h" #include "neuron.h" #include "parse.h" #include "nrnmpi.h" #include "multisplit.h" #include "spmatrix.h" #include "nonvintblock.h" #include "nrndae_c.h" #if CVODE extern int cvode_active_; #endif int nrn_shape_changed_; /* for notifying Shape class in nrniv */ double* nrn_mech_wtime_; extern int diam_changed; extern int tree_changed; extern double chkarg(); extern double nrn_ra(); #if !defined(NRNMPI) || NRNMPI == 0 extern double nrnmpi_wtime(); #endif extern Symlist* hoc_built_in_symlist; extern int* nrn_prop_dparam_size_; extern int* nrn_dparam_ptr_start_; extern int* nrn_dparam_ptr_end_; extern void nrn_define_shape(); #if 1 || PARANEURON void (*nrn_multisplit_setup_)(); #endif #if CACHEVEC /* a, b, d and rhs are, from now on, all stored in extra arrays, to improve * cache efficiency in nrn_lhs() and nrn_rhs(). Formerly, three levels of * indirection were necessary for accessing these elements, leading to lots * of L2 misses. 2006-07-05/Hubert Eichner */ /* these are now thread instance arrays */ static void nrn_recalc_node_ptrs(); #define UPDATE_VEC_AREA(nd) if (nd->_nt && nd->_nt->_actual_area) { nd->_nt->_actual_area[(nd)->v_node_index] = NODEAREA(nd);} #endif /* CACHEVEC */ int use_cachevec; /* Do not use unless necessary (loops in tree structure) since overhead (for gaussian elimination) is about a factor of 3 in space and 2 in time even for a tree. */ int nrn_matrix_cnt_ = 0; int use_sparse13 = 0; int nrn_use_daspk_ = 0; #if VECTORIZE /* When properties are allocated to nodes or freed, v_structure_change is set to 1. This means that the mechanism vectors need to be re-determined. */ int v_structure_change; int structure_change_cnt; int diam_change_cnt; #endif extern int section_count; extern Section** secorder; #if 1 /* if 0 then handled directly to save space : see finitialize*/ extern short* nrn_is_artificial_; extern Template** nrn_pnt_template_; #endif /* (2002-04-06) One reason for going into the following in depth is to allow comparison of the fixed step implicit method with the implementation of the corresponding cvode (vext not allowed) and daspk (vext allowed) versions. In the fixed step method the result of a setup is a linear matrix equation of the form G*(vinew,vxnew) = i(vm,vx) which is solved and followed by an update step vx=vxnew vm = vinew - vxnew When cvode was added, as much as possible of the existing setup was re-used through the addition of flags. Cvode solves a system of the form dy/dt = f(y) and this is not obtainable in the presence of extracellular or LinearMechanism instances. And even in the cases it can handle, it required a good deal of manipulation to remove the zero area compartments from the state vector and compute the algebraic equations separately. In fact, as of 2002-04-06, the CONSERVE statement for kinetic schemes in model descriptions is still ignored. At any rate, the issues involved are 1) How to compute f(y). Any algebraic equations are solved inside f(y) so that the algebraic states are consistent with y. 2) How to setup the jacobian (I - gamma*df/dy)*y = b When daspk was added which solves the form 0 = f(y, y') having one implementation serving the setup for three very distinct methods became too cumbersome. Therefore setup_tree_matrix was copied twice and modified separately so that each method had its own setup code derived from this file. The issues that have arisen with daspk are 1) How to actually implement a residual function res = f(y, y') 2) How to actually implement a preconditioner setup of the form (df/dy + cj*df/dy')*y = b 3) how to initialize so that 0 = f(y(0), y'(0)) when it is not possible to know which are the algebraic and which are the differential equations. Also, it is often the case that a linear combination of apparently differential equations yields an algebraic equation and we don't know the linearly dependent subsets. DASPK itself will only handle initialization if one can mark some states as differential and the remaining states as algebraic. With that, here's what is going on in this file with respect to setup of G*(vinew, vxnew) = i(vm,vx) The current balance equations are sum of outward currents = sum of inward currents For an internal node cm*dvm/dt + i(vm) = is(vi) + ai_j*(vi_j - vi) For an external node (one layer) cx*dvx/dt + gx*(vx - ex) = cm*dvm/dt + i(vm) + ax_j*(vx_j - vx) where vm = vi - vx and every term has the dimensions mA/cm2 (the last terms in each equation represent the second derivative cable properties) The chosen convention that determines the side of the terms and their sign is that positive membrane current is outward but electrode stimulus currents are toward the node. We place the terms involving currents leaving a node on the left, and currents entering a node on the right. i.e. |is ia `.' ---> <--- |im ie `.' ---> <--- |gx*vx `.' --- \ / - At the hoc level, v refers to vm and vext refers to vx. It should also be realized that LinearMechanism instances overlay equations of the form c*dy/dt + g*y = b onto the current balance equation set thus adding new states, equations, and terms to the above equations. However, note that when y refers to a voltage of a segment in those equations it always means vi or vx and never vm. At this point it is up to us whether we setup and solve the form G*(vm,vx) = i or G*(vi,vx) = i since any particular choice is resolved back to (vm,vx) in the update step. At present, particularly for the implicit fixed step method whose setup implementation resides in this file, we've chosen G*(vi,vx) = i, because there are fewer operations in setting up second derivatives and it makes life easy for the LinearMechanism. i.e. on setup each element of the linear mechanism gets added to only one element of the complete matrix equations and on update we merely copy the vi solution to the proper LinearMechanism states and update v=vi-vext for the compartment membrane potentials. The implicit linear form for the compartment internal node is cm/dt*(vmnew - vmold) + (di/dvm*(vmnew - vmold) + i(vmold)) = (dis/dvi*(vinew - viold) + is(viold)) + ai_j*(vinew_j - vinew) and for the compartment external node is cx/dt*(vxnew - vxold) - gx(vxnew - ex) = cm/dt*(vmnew - vmold) + (di/dvm*(vmnew - vmold) + i(vmold)) + ax_j*(vxnew_j - vxnew) = 0 and this forms the matrix equation row (for an internal node) (cm/dt + di/dvm - dis/dvi + ai_j)*vinew - ai_j*vinew_j -(cm/dt + di/dvm)*vxnew = cm/dt*vmold + di/dvm*vmold - i(vmold) - dis/dvi*viold + is(viold) where old is present value of vm, vi, or vx and new will be found by solving this matrix equation (which is of the form G*v = rhs) The matrix equation row for the extracellular node is (cx/dt + gx + ax_j + cm/dt + di/dvm)*vext -ax_j*vxnew_j -(cm/dt + di/dvm)*vinew = cx/dt*vxold - (cm/dt*vmold + di/dv*vmold - i(vmold)) - gx*ex Node.v is always interpreted as membrane potential and it is important to distinguish this from internal potential (Node.v + Node.extnode.v) when the extracellular mechanism is present. In dealing with these current balance equations, all three methods use the same mechanism calls to calculate di/dvm, i(vm), dis/dvi, is(vi) and add them to the matrix equation. Thus the passive channel, i=g*(v - e), is a transmembrane current (convention is positive outward) and the mechanism adds g to the diagonal element of the matrix and subtracts i - g*v from the right hand side. (see nrn_cur of passive.c) It does NOT add anything to the extracellular current balance row. An electrode current (convention positive current increases the internal potential) such as a voltage clamp with small resistance, is=g*(vc - (v+vext)) (see nrn_cur of svclmp.c) subtracts -g from the matrix diagonal (since dis/dvi = -g) and adds i - g*(v+vext) to the right hand side. In the presence of an extracellular mechanism, such electrode mechanisms add the dis/dvi term to the extracellular equation diagonal and also add is - dis/dvi*(viold) to the extracellular equation right hand side. This is where a trick comes in. Note that in the equations it is the membrane currents that appear in both rows whereas the stimulus appears in the internal row only. But the membrane mechanisms add membrane currents only to the internal row and stimuli to both rows. Perhaps the additional confusion was not worth the mechanism efficiency gain ( since there are many more membrane (and synaptic) currents than stimulus currents) but at any rate the matrix filling is ordered so that membrane mechanisms are done before the axial currents. This means that only membrane and stimulus currents are present on the internal diagonal and right hand side. However, only stimulus current is present on the external diagonal and right hand side. The difference of course is the membrane current elements by themselves and the extracellular code fills the elements appropriately. So, in the code below, the order for doing the extracellular setup is very important with respect to filling the matrix and mechanisms must be first, then the obsolete activsynapse, then the extracellular setup, then linear models and the obsolete activstim and activclamp. I.e it is crucial to realize that before extracellular has been called that the internal current balance matrix rows are with respect to vm whereas (except for special handling of stimulus terms by keeping separate track of those currents) and after extracellular has been called the current balance matrix rows are with respect to vi and vext. Finally at the end it is possible to add the internal axial terms. */ /* 2002-04-06 General comments toward a reorganization of the implementation to promote code sharing of the fixed, cvode, and daspk methods and with regard to the efficiency of cvode and daspk. The existing fixed step setup stategy is almost identical to that needed by the current balance portion jacobian solvers for cvode and daspk. However it is wasteful to calculate the right hand side since that is thrown away because those solvers demand a calculation of M*x=b where b is provided and the answer ends up in b. Also, for the function evaluation portion of those solvers, the reuse of the setup is wastful because after setting up the matrix, we essentially calculate rhs - M*x and then throw away M. So, without reducing the efficiency of the fixed step it would be best to re-implement the setup functions to separate the calculation of M from that of b. Those pieces could then be used by all three methods as needed. Also at this level of strategy we can properly take into account cvode's and daspk's requirement of separating the dy/dt terms from the y dependent terms. Note that the problem we are dealing with is entirely confined to the current balance equations and little or no change is required for the mechanism ode's. One other detail must be considered. The computation that memb_func[i].current presently performs can be split into two parts only if the jacabian calculation is done first. This is because the first BREAKPOINT evaluation is for v+.001 and the second is for v. We can't turn that around. The best that can be done (apart from analytic calculation of g) is to make use of the simultaneous calculation of g for the fixed step, store it for use when the jacobian is evalulated and eventually have faster version of current only for use by cvode and daspk. A further remark. LinearMechanisms allow much greater generality in the structure of the current balance equations, especially with regard to extracellular coupling and nonlinear gap junctions. In both these cases, the extracellular equivalent circuit apparatus is entirely superfluous and only the idea of a floating extracellular node is needed. Perhaps this, as well as the elimination of axial resistors for single segment sections will be forthcoming. Therefore it is also useful to keep a clear separation between the computation of membrane currents intra- and extracellular contribution and the calculation of intracellular axial and extracellular currents. The most reusable fixed step strategy I can think of is to compute M*(dvi,dvx) = i on the basis of cm*dvm/dt = -i(vm) + is(vi) + ai_j*(vi_j - vi) cx*dvx/dt - cm*dvm/dt = -gx*(vx - ex) + i(vm) + ax_j*(vx_j - vx) It has advantage of not adding capacitance terms to the right hand side but requires the calculation of axial currents for addition to the right hand side, which would have to be done anyway for cvode and daspk. The choice is re-usability. Note that the dvm/dt term in the external equation is why cvode can't work with the extracellular mechanism. Also the axial coupling terms are linear so both the matrix and righthand side are easy to setup separately without much loss of efficiency. 1)Put -i(vm)+is(vi) into right hand side for internal node and, if an extracellular node exists, store is(vi) as well so that we can later carry out the trick of putting i(vm) into the external right hand side. This is common also for cvode and daspk. 2)For extracellular nodes perform the trick and deal with gx*ex and add the extracellular axial terms to the right hand side. Common to daspk and cvode. 3) Add the internal axial terms to the right hand side. Common to daspk and cvode The above accomplishes a function evaluation for cvode. For daspk it would remain only to use y' to calculate the residual from the derivative terms. 4)Start setting up the matrix by calculating di/dvm from the mechanisms and put it directly into the rhs. For stimulus currents, store dis/dvi for later use of the trick. Common also for cvode and daspk 5) For extracellular nodes perform the trick and deal with gx and extracellular axial terms to the matrix. Common to cvode and daspk 6) Add the internal axial terms to the matrix.Commond to cvode and daspk. At this point the detailed handling of capacitance may be different for the three methods. For the fixed step, what is required is 7) add cm/dt to the internal diagonal 8) for external nodes fill in the cv/dt and cx/dt contributions. This completes the setup of the matrix equations. We then solve for dvi and dvx and update using (for implicit method) vx += dvx vm += dvi-dvx */ /* calculate right hand side of cm*dvm/dt = -i(vm) + is(vi) + ai_j*(vi_j - vi) cx*dvx/dt - cm*dvm/dt = -gx*(vx - ex) + i(vm) + ax_j*(vx_j - vx) This is a common operation for fixed step, cvode, and daspk methods */ void nrn_rhs(NrnThread* _nt) { int i, i1, i2, i3; double w; int measure = 0; NrnThreadMembList* tml; i1 = 0; i2 = i1 + _nt->ncell; i3 = _nt->end; if (_nt->id == 0 && nrn_mech_wtime_) { measure = 1; } if (diam_changed) { nrn_thread_error("need recalc_diam()"); recalc_diam(); } if (use_sparse13) { int i, neqn; nrn_thread_error("nrn_rhs use_sparse13"); neqn = spGetSize(_nt->_sp13mat, 0); for (i=1; i <= neqn; ++i) { _nt->_actual_rhs[i] = 0.; } }else{ #if CACHEVEC if (use_cachevec) { for (i = i1; i < i3; ++i) { VEC_RHS(i) = 0.; } }else #endif /* CACHEVEC */ { for (i = i1; i < i3; ++i) { NODERHS(_nt->_v_node[i]) = 0.; } } } if (_nt->_nrn_fast_imem) { for (i = i1; i < i3; ++i) { _nt->_nrn_fast_imem->_nrn_sav_rhs[i] = 0.; } } nrn_ba(_nt, BEFORE_BREAKPOINT); /* note that CAP has no current */ for (tml = _nt->tml; tml; tml = tml->next) if (memb_func[tml->index].current) { Pvmi s = memb_func[tml->index].current; if (measure) { w = nrnmpi_wtime(); } (*s)(_nt, tml->ml, tml->index); if (measure) { nrn_mech_wtime_[tml->index] += nrnmpi_wtime() - w; } if (errno) { if (nrn_errno_check(tml->index)) { hoc_warning("errno set during calculation of currents", (char*)0); } } } activsynapse_rhs(); if (_nt->_nrn_fast_imem) { /* _nrn_save_rhs has only the contribution of electrode current so here we transform so it only has membrane current contribution */ double* p = _nt->_nrn_fast_imem->_nrn_sav_rhs; if (use_cachevec) { for (i = i1; i < i3; ++i) { p[i] -= VEC_RHS(i); } }else{ for (i = i1; i < i3; ++i) { Node* nd = _nt->_v_node[i]; p[i] -= NODERHS(nd); } } } #if EXTRACELLULAR /* Cannot have any axial terms yet so that i(vm) can be calculated from i(vm)+is(vi) and is(vi) which are stored in rhs vector. */ nrn_rhs_ext(_nt); /* nrn_rhs_ext has also computed the the internal axial current for those nodes containing the extracellular mechanism */ #endif if (use_sparse13) { /* must be after nrn_rhs_ext so that whatever is put in nd->_rhs does not get added to nde->rhs */ nrndae_rhs(); } activstim_rhs(); activclamp_rhs(); /* now the internal axial currents. The extracellular mechanism contribution is already done. rhs += ai_j*(vi_j - vi) */ #if CACHEVEC if (use_cachevec) { for (i = i2; i < i3; ++i) { double dv = VEC_V(_nt->_v_parent_index[i]) - VEC_V(i); /* our connection coefficients are negative so */ VEC_RHS(i) -= VEC_B(i)*dv; VEC_RHS(_nt->_v_parent_index[i]) += VEC_A(i)*dv; } }else #endif /* CACHEVEC */ { for (i = i2; i < i3; ++i) { Node* nd = _nt->_v_node[i]; Node* pnd = _nt->_v_parent[i]; double dv = NODEV(pnd) - NODEV(nd); /* our connection coefficients are negative so */ NODERHS(nd) -= NODEB(nd)*dv; NODERHS(pnd) += NODEA(nd)*dv; } } } /* calculate left hand side of cm*dvm/dt = -i(vm) + is(vi) + ai_j*(vi_j - vi) cx*dvx/dt - cm*dvm/dt = -gx*(vx - ex) + i(vm) + ax_j*(vx_j - vx) with a matrix so that the solution is of the form [dvm+dvx,dvx] on the right hand side after solving. This is a common operation for fixed step, cvode, and daspk methods */ void nrn_lhs(NrnThread* _nt) { int i, i1, i2, i3; NrnThreadMembList* tml; i1 = 0; i2 = i1 + _nt->ncell; i3 = _nt->end; if (diam_changed) { nrn_thread_error("need recalc_diam()"); } if (use_sparse13) { int i, neqn; neqn = spGetSize(_nt->_sp13mat, 0); spClear(_nt->_sp13mat); }else{ #if CACHEVEC if (use_cachevec) { for (i = i1; i < i3; ++i) { VEC_D(i) = 0.; } }else #endif /* CACHEVEC */ { for (i = i1; i < i3; ++i) { NODED(_nt->_v_node[i]) = 0.; } } } if (_nt->_nrn_fast_imem) { for (i = i1; i < i3; ++i) { _nt->_nrn_fast_imem->_nrn_sav_d[i] = 0.; } } /* note that CAP has no jacob */ for (tml = _nt->tml; tml; tml = tml->next) if (memb_func[tml->index].jacob) { Pvmi s = memb_func[tml->index].jacob; (*s)(_nt, tml->ml, tml->index); if (errno) { if (nrn_errno_check(tml->index)) { hoc_warning("errno set during calculation of jacobian", (char*)0); } } } /* now the cap current can be computed because any change to cm by another model has taken effect */ /* note, the first is CAP */ if (_nt->tml) { assert(_nt->tml->index == CAP); nrn_cap_jacob(_nt, _nt->tml->ml); } activsynapse_lhs(); if (_nt->_nrn_fast_imem) { /* _nrn_save_d has only the contribution of electrode current so here we transform so it only has membrane current contribution */ double* p = _nt->_nrn_fast_imem->_nrn_sav_d; if (use_sparse13) { for (i = i1; i < i3; ++i) { Node* nd = _nt->_v_node[i]; p[i] += NODED(nd); } }else if (use_cachevec) { for (i = i1; i < i3; ++i) { p[i] += VEC_D(i); } }else{ for (i = i1; i < i3; ++i) { Node* nd = _nt->_v_node[i]; p[i] += NODED(nd); } } } #if EXTRACELLULAR /* nde->_d[0] contains the -ELECTRODE_CURRENT contribution to nd->_d */ nrn_setup_ext(_nt); #endif if (use_sparse13) { /* must be after nrn_setup_ext so that whatever is put in nd->_d does not get added to nde->d */ nrndae_lhs(); } activclamp_lhs(); /* at this point d contains all the membrane conductances */ /* now add the axial currents */ if (use_sparse13) { for (i = i2; i < i3; ++i) { Node* nd = _nt->_v_node[i]; *(nd->_a_matelm) += NODEA(nd); *(nd->_b_matelm) += NODEB(nd); /* b may have value from lincir */ NODED(nd) -= NODEB(nd); } for (i=i2; i < i3; ++i) { NODED(_nt->_v_parent[i]) -= NODEA(_nt->_v_node[i]); } } else { #if CACHEVEC if (use_cachevec) { for (i=i2; i < i3; ++i) { VEC_D(i) -= VEC_B(i); VEC_D(_nt->_v_parent_index[i]) -= VEC_A(i); } }else #endif /* CACHEVEC */ { for (i=i2; i < i3; ++i) { NODED(_nt->_v_node[i]) -= NODEB(_nt->_v_node[i]); NODED(_nt->_v_parent[i]) -= NODEA(_nt->_v_node[i]); } } } } /* for the fixed step method */ void* setup_tree_matrix(NrnThread* _nt){ nrn_rhs(_nt); nrn_lhs(_nt); nrn_nonvint_block_current(_nt->end, _nt->_actual_rhs, _nt->id); nrn_nonvint_block_conductance(_nt->end, _nt->_actual_d, _nt->id); return (void*)0; } /* membrane mechanisms needed by other mechanisms (such as Eion by HH) may require that the needed mechanism appear before it in the list. (because ina must be initialized before it is incremented by HH) With current implementation, a chain of "needs" may not be in list order. */ static Prop **current_prop_list; /* the one prop_alloc is working on when need_memb is called */ static int disallow_needmemb = 0; /* point processes cannot use need_memb when inserted at locations 0 or 1 */ Section* nrn_pnt_sec_for_need_; Prop* need_memb(Symbol* sym) { int type; Prop *mprev, *m, *prop_alloc(); if (disallow_needmemb) { fprintf(stderr, "You can not locate a point process at\n\ position 0 or 1 if it needs an ion\n"); hoc_execerror(sym->name, "can't be inserted in this node"); } type = sym->subtype; mprev = (Prop *)0; /* may need to relink m */ for (m = *current_prop_list; m; mprev = m, m = m->next) { if (m->type == type) { break; } } if (m) { /* a chain of "needs" will not be in list order so it is important that order only important for Eion */ if (mprev) { mprev->next = m->next; m->next = *current_prop_list; } *current_prop_list = m; } else if (nrn_pnt_sec_for_need_) { /* The caller was a POINT_PROCESS and we need to make sure that all segments of this section have the ion in order to prevent the possibility of multiple instances of this ion if a density mechanism that needs it is subsequently inserted or if the ion mechanism itself is inserted. Any earlier insertions of the latter or locating this kind of POINT_PROCESS in this section will mean that we no longer get to this arm of the if statement because m above is not nil. */ Section* sec = nrn_pnt_sec_for_need_; Prop** cpl = current_prop_list; nrn_pnt_sec_for_need_ = (Section*)0; mech_insert1(sec, type); current_prop_list = cpl; m = need_memb(sym); }else{ m = prop_alloc(current_prop_list, type, (Node*)0); } return m; } Node* nrn_alloc_node_; /* needed by models that use area */ Prop* prop_alloc(Prop** pp, int type, Node* nd) { /* link in new property at head of list */ /* returning *Prop because allocation may */ /* cause other properties to be linked ahead */ /* some models need the node (to find area) */ Prop *p; if (nd) { nrn_alloc_node_ = nd; } #if VECTORIZE v_structure_change = 1; #endif current_prop_list = pp; p = (Prop *)emalloc(sizeof(Prop)); p->type = type; p->next = *pp; p->ob = (Object*)0; p->_alloc_seq = -1; *pp = p; assert(memb_func[type].alloc); p->dparam = (Datum *)0; p->param = (double *)0; p->param_size = 0; (memb_func[type].alloc)(p); return p; } Prop* prop_alloc_disallow(Prop** pp, short type, Node* nd) { Prop *p; disallow_needmemb = 1; p = prop_alloc(pp, type, nd); disallow_needmemb = 0; return p; } void prop_free(Prop** pp) /* free an entire property list */ { Prop *p, *pn; p = *pp; *pp = (Prop *)0; while (p) { pn = p->next; single_prop_free(p); p = pn; } } void single_prop_free(Prop* p) { extern char* pnt_map; #if VECTORIZE v_structure_change = 1; #endif if (pnt_map[p->type]) { clear_point_process_struct(p); return; } if (p->param) { notify_freed_val_array(p->param, p->param_size); nrn_prop_data_free(p->type, p->param); } if (p->dparam) { if (p->type == CABLESECTION) { notify_freed_val_array(&p->dparam[2].val, 6); } nrn_prop_datum_free(p->type, p->dparam); } if (p->ob) { hoc_obj_unref(p->ob); } free((char *)p); } /* For now there is always one more node in a section than there are segments */ /* except in section 0 in which all nodes serve as x=0 to connecting sections */ #undef PI #define PI 3.14159265358979323846 static double diam_from_list(Section* sec, int inode, Prop* p, double rparent); int recalc_diam_count_, nrn_area_ri_nocount_, nrn_area_ri_count_; void nrn_area_ri(Section* sec) { int j; double ra, dx, diam, rright, rleft; Prop* p; Node* nd; if (nrn_area_ri_nocount_ == 0) { ++nrn_area_ri_count_; } #if DIAMLIST if (sec->npt3d) { sec->prop->dparam[2].val = sec->pt3d[sec->npt3d - 1].arc; } #endif ra = nrn_ra(sec); dx = section_length(sec)/((double)(sec->nnode - 1)); rright = 0.; for (j = 0; j < sec->nnode-1; j++) { nd = sec->pnode[j]; for (p = nd->prop; p; p = p->next) { if (p->type == MORPHOLOGY) { break; } } assert(p); #if DIAMLIST if (sec->npt3d > 1) { /* trapezoidal integration of diam, area, and resistance useing pt3d the integration is over the span of the segment j. and NODEAREA and NODERINV are filled in. The right half of the segment resistance (MOhm) is returned. */ rright = diam_from_list(sec, j, p, rright); }else #endif { /* area for right circular cylinders. Ri as right half of parent + left half of this */ diam = p->param[0]; if (diam <= 0.) { p->param[0] = 1e-6; hoc_execerror(secname(sec), "diameter diam = 0. Setting to 1e-6"); } NODEAREA(nd) = PI*diam*dx; /* um^2 */ UPDATE_VEC_AREA(nd); rleft = 1e-2*ra*(dx/2)/(PI*diam*diam/4.); /*left half segment Megohms*/ NODERINV(nd) = 1./(rleft + rright); /*uS*/ rright = rleft; } } /* last segment has 0 length. area is 1e2 in dimensionless units */ NODEAREA(sec->pnode[j]) = 1.e2; UPDATE_VEC_AREA(sec->pnode[j]); NODERINV(sec->pnode[j]) = 1./rright; sec->recalc_area_ = 0; diam_changed = 1; } Node* nrn_parent_node(Node* nd) { return nd->_classical_parent; } void connection_coef(void) /* setup a and b */ { int j; double dx, diam, area, ra; hoc_Item* qsec; Node *nd; Prop *p; #if RA_WARNING extern int nrn_ra_set; #endif #if 1 /* now only called from recalc_diam */ assert(!tree_changed); #else if (tree_changed) { setup_topology(); } #endif #if RA_WARNING if (nrn_ra_set > 0 && nrn_ra_set < section_count - 1) { hoc_warning("Don't forget to set Ra in every section", "eg. forall Ra=35.4"); } #endif ++recalc_diam_count_; nrn_area_ri_nocount_ = 1; ForAllSections(sec) nrn_area_ri(sec); } nrn_area_ri_nocount_ = 0; /* assume that if only one connection at x=1, then they butte together, if several connections at x=1 then last point is at x=1, has 0 area and other points are at centers of nnode-1 segments. If interior connection then child half section connects straight to the point*/ /* for the near future we always have a last node at x=1 with no properties */ ForAllSections(sec) #if 1 /* unnecessary because they are unused, but help when looking at fmatrix */ if (!sec->parentsec) { if (nrn_classicalNodeA(sec->parentnode)) { ClassicalNODEA(sec->parentnode) = 0.0; } if (nrn_classicalNodeB(sec->parentnode)) { ClassicalNODEB(sec->parentnode) = 0.0; } } #endif /* convert to siemens/cm^2 for all nodes except last and microsiemens for last. This means that a*V = mamps/cm2 and a*v in last node = nanoamps. Note that last node has no membrane properties and no area. It may perhaps receive current stimulus later */ /* first the effect of node on parent equation. Note That last nodes have area = 1.e2 in dimensionless units so that last nodes have units of microsiemens */ nd = sec->pnode[0]; area = NODEAREA(sec->parentnode); /* dparam[4] is rall_branch */ ClassicalNODEA(nd) = -1.e2*sec->prop->dparam[4].val * NODERINV(nd) / area; for (j = 1; j < sec->nnode; j++) { nd = sec->pnode[j]; area = NODEAREA(sec->pnode[j - 1]); ClassicalNODEA(nd) = -1.e2 * NODERINV(nd) / area; } } /* now the effect of parent on node equation. */ ForAllSections(sec) for (j=0; j < sec->nnode; j++) { nd = sec->pnode[j]; ClassicalNODEB(nd) = -1.e2 * NODERINV(nd) / NODEAREA(nd); } } #if EXTRACELLULAR ext_con_coef(); #endif } void nrn_shape_update(void) { static int updating; if (section_list->next == section_list) { return; } if (!updating || updating != diam_change_cnt) { updating = diam_change_cnt; if (tree_changed) { setup_topology(); } if (v_structure_change) { v_setup_vectors(); } if (diam_changed) { recalc_diam(); } updating = 0; } } static void nrn_matrix_node_alloc(void); void recalc_diam(void) { v_setup_vectors(); nrn_matrix_node_alloc(); connection_coef(); diam_changed = 0; ++diam_change_cnt; stim_prepare(); synapse_prepare(); #if SEJNOWSKI connect_prepare(); #endif clamp_prepare(); } void area(void) { /* returns area (um^2) of segment containing x */ double x; Section *sec; Node *node_ptr(); x = *getarg(1); if (x == 0. || x == 1.) { hoc_retpushx(0.); }else{ sec = chk_access(); if (sec->recalc_area_) { nrn_area_ri(sec); } hoc_retpushx(NODEAREA(sec->pnode[node_index(sec, x)])); } } void ri(void) { /* returns resistance (Mohm) between center of segment containing x and the center of the parent segment */ double area; Node *np, *node_ptr(); np = node_ptr(chk_access(), *getarg(1), &area); if (NODERINV(np)) { hoc_retpushx(1./NODERINV(np)); /* Megohms */ }else{ hoc_retpushx(1.e30); } } #if DIAMLIST static int pt3dconst_; void pt3dconst(void) { int i = pt3dconst_; if (ifarg(1)) { pt3dconst_ = (int)chkarg(1, 0., 1.); } hoc_retpushx((double)i); } void pt3dstyle(void) { Section* sec = chk_access(); if (ifarg(1)) { /* Classical, Logical connection */ /* Logical connection is used to turn off snapping to the centroid of the parent which sometimes ruins the 3-d shape rendering due to branches connected to a large diameter soma getting translated to the middle of the soma. Of course, the question then arises of what to do when the soma is moved to a new location or an ancestor branch length is changed (i.e. exactly what snapping to the parent deals with automatically) Our answer is that a pt3dstyle==1 branch gets translated exactly by the amount of the parent translation instead of snapping to a specific absolute x,y,z position. */ if ((int)chkarg(1, 0., 1.) == 1) { Pt3d* p = sec->logical_connection; if (hoc_is_pdouble_arg(2)) { if (p) { double* px, *hoc_pgetarg(); px = hoc_pgetarg(2); *px = p->x; px = hoc_pgetarg(3); *px = p->y; px = hoc_pgetarg(4); *px = p->z; } }else{ if (!p) { p = sec->logical_connection = (Pt3d*)ecalloc(1, sizeof(Pt3d)); } p->x = *getarg(2); p->y = *getarg(3); p->z = *getarg(4); ++nrn_shape_changed_; diam_changed = 1; } }else{ if (sec->logical_connection) { free((char*)sec->logical_connection); sec->logical_connection = (Pt3d*)0; ++nrn_shape_changed_; diam_changed = 1; } } } hoc_retpushx((double)(sec->logical_connection ? 1 : 0)); } void pt3dclear(void) { /*destroys space in current section for 3d points.*/ Section* sec = chk_access(); nrn_pt3dclear(sec); hoc_retpushx((double)sec->pt3d_bsize); } static void nrn_pt3dbufchk(Section* sec, int n) { if (n > sec->pt3d_bsize) { sec->pt3d_bsize = n; if ((sec->pt3d = (Pt3d *)hoc_Erealloc((char *)sec->pt3d, n*sizeof(Pt3d))) == (Pt3d *)0) { sec->npt3d = 0; sec->pt3d_bsize = 0; hoc_malchk(); } } } static void nrn_pt3dmodified(Section* sec, int i0) { int n, i; ++nrn_shape_changed_; diam_changed = 1; sec->recalc_area_ = 1; n = sec->npt3d; #if NTS_SPINE #else if (sec->pt3d[i0].d < 0.) { hoc_execerror("Diameter less than 0", (char *)0); } #endif if (i0 == 0) { sec->pt3d[0].arc = 0.; i0 = 1; } for (i = i0; i < n; ++i) { Pt3d* p = sec->pt3d + i - 1; double t1,t2,t3; t1 = sec->pt3d[i].x - p->x; t2 = sec->pt3d[i].y - p->y; t3 = sec->pt3d[i].z - p->z; sec->pt3d[i].arc = p->arc + sqrt(t1*t1 + t2*t2 + t3*t3); } sec->prop->dparam[2].val = sec->pt3d[n-1].arc; } void nrn_pt3dclear(Section* sec) { int req; if (ifarg(1)) { req = chkarg(1, 0., 30000.); }else{ req = 0; } ++nrn_shape_changed_; if (req != sec->pt3d_bsize) { if (sec->pt3d) { free((char *)(sec->pt3d)); sec->pt3d = (Pt3d *)0; sec->pt3d_bsize = 0; } if (req > 0) { sec->pt3d = (Pt3d*)ecalloc(req, sizeof(Pt3d)); sec->pt3d_bsize = req; } } sec->npt3d = 0; } void pt3dinsert(void) { Section* sec; int i, n, i0; sec = chk_access(); n = sec->npt3d; nrn_pt3dbufchk(sec, n+1); i0 = (int)chkarg(1, 0., (double)(n)); ++sec->npt3d; for (i = n-1; i >= i0; --i) { Pt3d* p = sec->pt3d + i + 1; p->x = sec->pt3d[i].x; p->y = sec->pt3d[i].y; p->z = sec->pt3d[i].z; p->d = sec->pt3d[i].d; } sec->pt3d[i0].x = *getarg(2); sec->pt3d[i0].y = *getarg(3); sec->pt3d[i0].z = *getarg(4); sec->pt3d[i0].d = *getarg(5); nrn_pt3dmodified(sec,i0); hoc_retpushx(0.); } void pt3dchange(void) { int i, n; Section* sec = chk_access(); n = sec->npt3d; i = (int)chkarg(1, 0., (double)(n-1)); if (ifarg(5)) { sec->pt3d[i].x = *getarg(2); sec->pt3d[i].y = *getarg(3); sec->pt3d[i].z = *getarg(4); sec->pt3d[i].d = *getarg(5); nrn_pt3dmodified(sec, i); }else{ sec->pt3d[i].d = *getarg(2); ++nrn_shape_changed_; diam_changed = 1; sec->recalc_area_ = 1; } hoc_retpushx(0.); } void pt3dremove(void) { int i, i0, n; Section* sec = chk_access(); n = sec->npt3d; i0 = (int)chkarg(1, 0., (double)(n-1)); for (i=i0+1; i < n; ++i) { Pt3d* p = sec->pt3d + i - 1; p->x = sec->pt3d[i].x; p->y = sec->pt3d[i].y; p->z = sec->pt3d[i].z; p->d = sec->pt3d[i].d; } --sec->npt3d; nrn_pt3dmodified(sec, i0); hoc_retpushx(0.); } void nrn_diam_change(Section* sec) { if (!pt3dconst_ && sec->npt3d) { /* fill 3dpoints as though constant diam segments */ int i; double x, L; L = section_length(sec); if (fabs(L - sec->pt3d[sec->npt3d - 1].arc) > .001) { nrn_length_change(sec, L); } for (i=0; i < sec->npt3d; ++i) { x = sec->pt3d[i].arc/L; if (x > 1.0) {x = 1.0;} node_index(sec, x); sec->pt3d[i].d = nrn_diameter(sec->pnode[node_index(sec, x)]); } ++nrn_shape_changed_; } } void nrn_length_change(Section* sec, double d) { if (!pt3dconst_ && sec->npt3d) { int i; double x0,y0,z0; double fac; double l; x0 = sec->pt3d[0].x; y0 = sec->pt3d[0].y; z0 = sec->pt3d[0].z; l = sec->pt3d[sec->npt3d-1].arc; fac = d/l; /*if (fac != 1) { printf("nrn_length_change from %g to %g\n", l, d);}*/ for (i=0; i < sec->npt3d; ++i) { sec->pt3d[i].arc = sec->pt3d[i].arc *fac; sec->pt3d[i].x = x0 + (sec->pt3d[i].x - x0)*fac; sec->pt3d[i].y = y0 + (sec->pt3d[i].y - y0)*fac; sec->pt3d[i].z = z0 + (sec->pt3d[i].z - z0)*fac; } ++nrn_shape_changed_; } } /*ARGSUSED*/ int can_change_morph(Section* sec) { return pt3dconst_ == 0; } static void stor_pt3d_vec(Section* sec, IvocVect* xv, IvocVect* yv, IvocVect* zv, IvocVect* dv) { int i; int n = vector_capacity(xv); double* x = vector_vec(xv); double* y = vector_vec(yv); double* z = vector_vec(zv); double* d = vector_vec(dv); nrn_pt3dbufchk(sec, n); sec->npt3d = n; for (i=0; i < n; i++) { sec->pt3d[i].x = x[i]; sec->pt3d[i].y = y[i]; sec->pt3d[i].z = z[i]; sec->pt3d[i].d = d[i]; } nrn_pt3dmodified(sec, 0); } void pt3dadd(void) { /*pt3add(x,y,z, d) stores 3d point at end of current pt3d list. first point assumed to be at arc length position 0. Last point at 1. arc length increases monotonically. */ if (hoc_is_object_arg(1)) { stor_pt3d_vec(chk_access(), vector_arg(1), vector_arg(2), vector_arg(3), vector_arg(4)); }else{ stor_pt3d(chk_access(), *getarg(1), *getarg(2), *getarg(3), *getarg(4)); } hoc_retpushx(1.); } void n3d(void) { /* returns number of 3d points in section */ Section* sec; sec = chk_access(); hoc_retpushx ((double)sec->npt3d); } void x3d(void) { /* returns x value at index of 3d list */ Section* sec; int n, i; sec = chk_access(); n = sec->npt3d - 1; i = chkarg(1, 0., (double)n); hoc_retpushx((double)sec->pt3d[i].x); } void y3d(void) { /* returns x value at index of 3d list */ Section* sec; int n, i; sec = chk_access(); n = sec->npt3d - 1; i = chkarg(1, 0., (double)n); hoc_retpushx((double)sec->pt3d[i].y); } void z3d(void) { /* returns x value at index of 3d list */ Section* sec; int n, i; sec = chk_access(); n = sec->npt3d - 1; i = chkarg(1, 0., (double)n); hoc_retpushx((double)sec->pt3d[i].z); } void arc3d(void) { /* returns x value at index of 3d list */ Section* sec; int n, i; sec = chk_access(); n = sec->npt3d - 1; i = chkarg(1, 0., (double)n); hoc_retpushx((double)sec->pt3d[i].arc); } void diam3d(void) { /* returns x value at index of 3d list */ Section* sec; double d; int n, i; sec = chk_access(); n = sec->npt3d - 1; i = chkarg(1, 0., (double)n); d = (double)sec->pt3d[i].d; hoc_retpushx(fabs(d)); } void spine3d(void) { /* returns x value at index of 3d list */ Section* sec; int n, i; double d; sec = chk_access(); n = sec->npt3d - 1; i = chkarg(1, 0., (double)n); d = (double)sec->pt3d[i].d; if (d < 0) { hoc_retpushx(1.); }else{ hoc_retpushx(0.); } } void stor_pt3d(Section* sec, double x, double y, double z, double d) { int n; n = sec->npt3d; nrn_pt3dbufchk(sec, n+1); sec->npt3d++; sec->pt3d[n].x = x; sec->pt3d[n].y = y; sec->pt3d[n].z = z; sec->pt3d[n].d = d; nrn_pt3dmodified(sec, n); } static double spinearea=0.; void setSpineArea(void) { spinearea = *getarg(1); diam_changed = 1; hoc_retpushx(spinearea); } void getSpineArea(void) { hoc_retpushx(spinearea); } void define_shape(void) { nrn_define_shape(); hoc_retpushx(1.); } static void nrn_translate_shape(Section* sec, float x, float y, float z) { int i; float dx, dy, dz; if (pt3dconst_) { return; } if (sec->logical_connection) { /* args are relative not absolute */ Pt3d* p = sec->logical_connection; dx = x - p->x; dy = y - p->y; dz = z - p->z; p->x = x; p->y = y; p->z = z; }else{ dx = x - sec->pt3d[0].x; dy = y - sec->pt3d[0].y; dz = z - sec->pt3d[0].z; } /* if (dx*dx + dy*dy + dz*dz < 10.)*/ for (i=0; i < sec->npt3d; ++i) { sec->pt3d[i].x += dx; sec->pt3d[i].y += dy; sec->pt3d[i].z += dz; } } void nrn_define_shape(void) { static int changed_; int i, j; Section* sec, *psec, *ch, *nrn_trueparent(); float x, y, z, dz, x1, y1; float nch, ich=0.0, angle; double arc, len; double nrn_connection_position(); if (changed_ == nrn_shape_changed_ && !diam_changed && !tree_changed) { return; } recalc_diam(); dz = 100.; for (i=0; i < section_count; ++i) { sec = secorder[i]; arc = nrn_connection_position(sec); if ((psec = sec->parentsec) == (Section*)0) { /* section has no parent */ x = 0; y = 0; z = i * dz; x1 = 1; y1 = 0; }else{ double arc1 = arc; x1 = psec->pt3d[psec->npt3d-1].x - psec->pt3d[0].x; y1 = psec->pt3d[psec->npt3d-1].y - psec->pt3d[0].y; if (!arc0at0(psec)) { arc1 = 1. - arc; } if (arc1 < .5) { x1 = -x1; y1 = -y1; } x = psec->pt3d[psec->npt3d-1].x*arc1 + psec->pt3d[0].x*(1-arc1); y = psec->pt3d[psec->npt3d-1].y*arc1 + psec->pt3d[0].y*(1-arc1); z = psec->pt3d[psec->npt3d-1].z*arc1 + psec->pt3d[0].z*(1-arc1); } if (sec->npt3d) { if (psec) { nrn_translate_shape(sec, x, y, z); } continue; } if (fabs(y1) < 1e-6 && fabs(x1) < 1e-6) { printf("nrn_define_shape: %s first and last 3-d point at same (x,y)\n", secname(psec)); angle = 0.; }else{ angle = atan2(y1, x1); } if (arc > 0. && arc < 1.) { angle += 3.14159265358979323846/2.; } nch = 0.; if (psec) for (ch=psec->child; ch; ch = ch->sibling) { if (ch == sec) { ich = nch; } if (arc == nrn_connection_position(ch)) { ++nch; } } if (nch > 1) { angle += ich/(nch - 1.) * .8 - .4; } len = section_length(sec); x1 = x + len*cos(angle); y1 = y + len*sin(angle); stor_pt3d(sec, x, y, z, nrn_diameter(sec->pnode[0])); for (j = 0; j < sec->nnode-1; ++j) { double frac = ((double)j+.5)/(double)(sec->nnode-1); stor_pt3d(sec, x*(1-frac)+x1*frac, y*(1-frac)+y1*frac, z, nrn_diameter(sec->pnode[j]) ); } stor_pt3d(sec, x1, y1, z, nrn_diameter(sec->pnode[sec->nnode-2])); /* don't let above change length due to round-off errors*/ sec->pt3d[sec->npt3d-1].arc = len; sec->prop->dparam[2].val = len; } changed_ = nrn_shape_changed_; } static double diam_from_list(Section* sec, int inode, Prop* p, double rparent) /* p->param[0] is diam of inode in sec.*/ /* rparent right half resistance of the parent segment*/ { /* Basic algorithm assumes a set of monotonic points on which a function is defined. The extension is the piecewise continuous function. y(x) for 0<=x<=x[n] (extrapolate for x>x[n]). The problem is to form the integral of f(y(s)) over intervals s[i] <= s <= s[i+1]. Note the intervals don't have to be equal. This implementation is specific to a call to this function for each interval in order. */ /* computes diam as average, area, and ri. Slightly weirder since interval spit in two to compute right and left half values of ri */ /* fills NODEAREA and NODERINV and returns the right half resistance (MOhms) of the segment. */ static int j; static double x1, y1, ds; int ihalf; double si, sip; double diam, delta, temp, ri, area, ra, rleft=0.0; int npt, nspine; if (inode == 0) { j = 0; si = 0.; x1 = sec->pt3d[j].arc; y1 = fabs(sec->pt3d[j].d); ds = sec->pt3d[sec->npt3d - 1].arc / ((double)(sec->nnode - 1)); } si = (double)inode*ds; npt = sec->npt3d; diam = 0.; area = 0.; nspine = 0; ra = nrn_ra(sec); for (ihalf = 0; ihalf < 2; ihalf++) { ri = 0.; sip = si + ds/2.; for (;;) { int jp, jnext; double x2, y2, xj, xjp; jp = j + 1; xj = sec->pt3d[j].arc; #if NTS_SPINE if (sec->pt3d[j].d < 0 && xj >= si && xj < sip) { nspine++; } #endif xjp = sec->pt3d[jp].arc; if (xjp > sip || jp == npt - 1) { double frac; if (fabs(xjp - xj) < 1e-10) { frac = 1; }else{ frac = (sip - xj)/(xjp - xj); } x2 = sip; y2 = (1. - frac)*fabs(sec->pt3d[j].d) + frac*fabs(sec->pt3d[jp].d); jnext = j; }else{ x2 = xjp; y2 = fabs(sec->pt3d[jp].d); jnext = jp; } /* f += integrate(x1,y1, x2, y2) */ delta = (x2 - x1); diam += (y2 + y1)*delta; if (delta < 1e-15) { delta = 1e-15; } if ((temp = y2*y1/delta) == 0) { temp = 1e-15; } ri += 1/temp; #if 1 /*taper is very seldom taken into account*/ temp = .5*(y2 - y1); temp = sqrt(delta*delta + temp*temp); #else temp = delta; #endif area += (y2 + y1)*temp; /* end of integration */ x1 = x2; y1 = y2; if (j == jnext) { break; } j = jnext; } if (ihalf == 0) { rleft = ri*ra/PI*(4.*.01); /*left seg resistance*/ }else{ ri = ri*ra/PI*(4.*.01); /* MegOhms */ /* above is right half segment resistance */ } si = sip; } /* answer for inode is here */ NODERINV(sec->pnode[inode]) = 1./(rparent + rleft); diam *= .5/ds; if (fabs(diam - p->param[0]) > 1e-9 || diam < 1e-5) { p->param[0] = diam; /* microns */ } NODEAREA(sec->pnode[inode]) = area*.5*PI;/* microns^2 */ UPDATE_VEC_AREA(sec->pnode[inode]); #if NTS_SPINE /* if last point has a spine then increment spine count for last node */ if (inode == sec->nnode-2 && sec->pt3d[npt-1].d < 0.) { nspine += 1; } NODEAREA(sec->pnode[inode]) += nspine*spinearea; UPDATE_VEC_AREA(sec->pnode[inode]); #endif return ri; } #endif /*DIAMLIST*/ #include "multicore.c" #if VECTORIZE void v_setup_vectors(void) { int inode, i; int isec; Section* sec; Node* nd; Prop* p; NrnThread* _nt; if (tree_changed) { setup_topology(); /* now classical secorder */ v_structure_change = 1; ++nrn_shape_changed_; } /* get rid of the old */ if (!v_structure_change) { return; } nrn_threads_free(); for (i=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i] && memb_func[i].initialize) { if (memb_list[i].nodecount) { memb_list[i].nodecount = 0; free((char*)memb_list[i].nodelist); #if CACHEVEC free((void *)memb_list[i].nodeindices); #endif /* CACHEVEC */ if (memb_func[i].hoc_mech) { free((char*)memb_list[i].prop); }else{ free((char*)memb_list[i].data); free((char*)memb_list[i].pdata); } } } #if 1 /* see finitialize */ /* and count the artificial cells */ for (i=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i] && memb_func[i].initialize) { Template* tmp = nrn_pnt_template_[i]; memb_list[i].nodecount = tmp->count; } #endif /* allocate it*/ for (i=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i] && memb_func[i].initialize) { if (memb_list[i].nodecount) { memb_list[i].nodelist = (Node**) emalloc(memb_list[i].nodecount * sizeof(Node*)); #if CACHEVEC memb_list[i].nodeindices = (int *) emalloc(memb_list[i].nodecount * sizeof(int)); #endif /* CACHEVEC */ if (memb_func[i].hoc_mech) { memb_list[i].prop = (Prop**) emalloc(memb_list[i].nodecount * sizeof(Prop*)); }else{ memb_list[i].data = (double**) emalloc(memb_list[i].nodecount * sizeof(double*)); memb_list[i].pdata = (Datum**) emalloc(memb_list[i].nodecount * sizeof(Datum*)); } memb_list[i].nodecount = 0; /* counted again below */ } } #if MULTICORE if (!nrn_user_partition()) { /* does not depend on memb_list */ int ith, j; NrnThread* _nt; section_order(); /* could be already reordered */ /* round robin distribution */ for (ith=0; ith < nrn_nthread; ++ith) { _nt = nrn_threads + ith; _nt->roots = hoc_l_newlist(); _nt->ncell = 0; } j = 0; for (ith=0; ith < nrn_nthread; ++ith) { _nt = nrn_threads + ith; for (i=ith; i < nrn_global_ncell; i += nrn_nthread) { hoc_l_lappendsec(_nt->roots, secorder[j]); ++_nt->ncell; ++j; } } } /* reorder. also fill NrnThread node indices, v_node, and v_parent */ reorder_secorder(); #endif #if CACHEVEC FOR_THREADS(_nt) { for (inode=0; inode < _nt->end; inode++) { if (_nt->_v_parent[inode]!=NULL) { _nt->_v_parent_index[inode]=_nt->_v_parent[inode]->v_node_index; } } } #endif /* CACHEVEC */ nrn_thread_memblist_setup(); #if 1 /* see finitialize */ /* fill in artificial cell info */ for (i=0; i < n_memb_func; ++i) if (nrn_is_artificial_[i] && memb_func[i].initialize) { hoc_Item* q; hoc_List* list; int j, nti; Template* tmp = nrn_pnt_template_[i]; memb_list[i].nodecount = tmp->count; nti = 0; j = 0; list = tmp->olist; #if 0 if (memb_func[i].vectorized == 0 && list->next != list) { hoc_execerror(memb_func[i].sym->name, "is not thread safe"); } #endif ITERATE(q, list) { Object* obj = OBJ(q); Point_process* pnt = (Point_process*)obj->u.this_pointer; p = pnt->prop; memb_list[i].nodelist[j] = (Node*)0; memb_list[i].data[j] = p->param; memb_list[i].pdata[j] = p->dparam; /* for now, round robin all the artificial cells */ /* but put the non-threadsafe ones in thread 0 */ /* Note that artficial cells are assumed not to need a thread specific Memb_list. But this implies that they do not have thread specific data. For this reason, for now, an otherwise thread-safe artificial cell model is declared by nmodl as thread-unsafe. */ if (memb_func[i].vectorized == 0) { pnt->_vnt = (void*)(nrn_threads); }else{ pnt->_vnt = (void*)(nrn_threads + nti); nti = (nti + 1)%nrn_nthread; } ++j; } } #endif nrn_recalc_node_ptrs(); v_structure_change = 0; nrn_update_ps2nt(); ++structure_change_cnt; long_difus_solve(3, nrn_threads); nrn_nonvint_block_setup(); diam_changed = 1; } #endif /*VECTORIZE*/ #define NODE_DATA 0 #if NODE_DATA static FILE* fnd; #undef P #undef Pn #undef Pd #undef Pg #define P fprintf(fnd, #define Pn P "\n") #define Pd(arg) P "%d\n", arg) #define Pg(arg) P "%g\n", arg) void node_data_scaffolding(void) { int i; Pd(n_memb_func); /* P "Mechanism names (first two are nil) beginning with memb_func[2]\n");*/ for (i=2; i < n_memb_func; ++ i){ P "%s", memb_func[i].sym->name); Pn; } } void node_data_structure(void) { int i, j; nrn_thread_error("node_data_structure"); Pd(v_node_count); Pd(nrn_global_ncell); /* P "Indices of node parents\n");*/ for (i=0; i < v_node_count; ++i) { Pd(v_parent[i]->v_node_index); } /* P "node lists for the membrane mechanisms\n");*/ for (i=2; i < n_memb_func; ++ i){ /* P "count, node list for mechanism %s\n", memb_func[i].sym->name);*/ Pd(memb_list[i].nodecount); for (j=0; j < memb_list[i].nodecount; ++j) { Pd(memb_list[i].nodelist[j]->v_node_index); } } } void node_data_values(void) { int i, j, k; /* P "data for nodes then for all mechanisms in order of the above structure\n"); */ for (i=0; i < v_node_count; ++ i) { Pg(NODEV(v_node[i])); Pg(NODEA(v_node[i])); Pg(NODEB(v_node[i])); Pg(NODEAREA(v_node[i])); } for (i=2; i < n_memb_func; ++ i){ Prop* prop, *nrn_mechanism(); int cnt; double* pd; if (memb_list[i].nodecount) { assert(!memb_func[i].hoc_mech); prop = nrn_mechanism(i, memb_list[i].nodelist[0]); cnt = prop->param_size; Pd(cnt); } for (j=0; j < memb_list[i].nodecount; ++j) { pd = memb_list[i].data[j]; for (k = 0; k < cnt; ++k) { Pg(pd[k]); } } } } void node_data(void) { fnd = fopen(gargstr(1), "w"); if (!fnd) { hoc_execerror("node_data: can't open", gargstr(1)); } if (tree_changed) { setup_topology(); } if (v_structure_change) { v_setup_vectors(); } if (diam_changed) { recalc_diam(); } node_data_scaffolding(); node_data_structure(); node_data_values(); fclose(fnd); hoc_retpushx(1.); } #else void node_data(void) { printf("recalc_diam=%d nrn_area_ri=%d\n", recalc_diam_count_, nrn_area_ri_count_); hoc_retpushx(0.); } #endif void nrn_complain(double* pp) { /* print location for this param on the standard error */ Node* nd; hoc_Item* qsec; int j; Prop* p; ForAllSections(sec) for (j = 0; j < sec->nnode; ++j) { nd = sec->pnode[j]; for (p = nd->prop; p; p = p->next) { if (p->param == pp) { fprintf(stderr, "Error at section location %s(%g)\n", secname(sec), nrn_arc_position(sec, nd)); return; } } } } fprintf(stderr, "Don't know the location of params at %p\n", pp); } void nrn_matrix_node_free(void) { NrnThread* nt; FOR_THREADS(nt) { if (nt->_actual_rhs) { free((char*)nt->_actual_rhs); nt->_actual_rhs = (double*)0; } if (nt->_actual_d) { free((char*)nt->_actual_d); nt->_actual_d = (double*)0; } #if CACHEVEC if (nt->_actual_a) { free((char*)nt->_actual_a); nt->_actual_a = (double*)0; } if (nt->_actual_b) { free((char*)nt->_actual_b); nt->_actual_b = (double*)0; } /* because actual_v and actual_area have pointers to them from many places, defer the freeing until nrn_recalc_node_ptrs is called */ #endif /* CACHEVEC */ if (nt->_sp13mat) { spDestroy(nt->_sp13mat); nt->_sp13mat = (char*)0; } } diam_changed = 1; } /* 0 means no model, 1 means ODE, 2 means DAE */ int nrn_modeltype(void) { NrnThread* nt; static Template* lm = (Template*)0; int type; v_setup_vectors(); if (!nrndae_list_is_empty()) { return 2; } type = 0; if (nrn_global_ncell > 0) { type = 1; FOR_THREADS(nt) if (nt->_ecell_memb_list) { type = 2; } } if (type == 0 && nrn_nonvint_block_ode_count(0, 0)) { type = 1; } return type; } /* minimally update flags consistent with the model type and cvode_active_ return true if any flags changed. If DAE then variable step method requires daspk If DAE then must be sparse13 If daspk then must be sparse13 If cvode then must be classic tree method */ int nrn_method_consistent(void) { int consist; int type; consist = 0; type = nrn_modeltype(); if (cvode_active_) { if (type == 2) { if (nrn_use_daspk_ == 0) { nrn_use_daspk(1); consist = 1; } } if (nrn_use_daspk_ != use_sparse13) { use_sparse13 = nrn_use_daspk_; consist = 1; } }else if (type == 2 && use_sparse13 == 0) { use_sparse13 = 1; consist = 1; } if (use_sparse13 != 0) { nrn_cachevec(0); } return consist; } /* sparse13 uses the mathematical index scheme in which the rows and columns range from 1...size instead of 0...size-1. Thus the calls to spGetElement(i,j) have args that are 1 greater than a normal c style. Also the actual_rhs_ uses this style, 1-neqn, when sparse13 is activated and therefore is passed to spSolve as actual_rhs intead of actual_rhs-1. */ static void nrn_matrix_node_alloc(void) { int i, b; Node* nd; NrnThread* nt; nrn_method_consistent(); nt = nrn_threads; /*printf("use_sparse13=%d sp13mat=%lx rhs=%lx\n", use_sparse13, (long)nt->_sp13mat, (long)nt->_actual_rhs);*/ if (use_sparse13) { if (nt->_sp13mat) { return; }else{ nrn_matrix_node_free(); } }else{ if (nt->_sp13mat) { v_structure_change = 1; v_setup_vectors(); return; }else{ if (nt->_actual_rhs != (double*)0) { return; } } } /*printf("nrn_matrix_node_alloc does its work\n");*/ #if CACHEVEC FOR_THREADS(nt) { nt->_actual_a = (double*)ecalloc(nt->end, sizeof(double)); nt->_actual_b = (double*)ecalloc(nt->end, sizeof(double)); } nrn_recalc_node_ptrs(); #endif /* CACHEVEC */ #if 0 printf("nrn_matrix_node_alloc use_sparse13=%d cvode_active_=%d nrn_use_daspk_=%d\n", use_sparse13, cvode_active_, nrn_use_daspk_); #endif ++nrn_matrix_cnt_; if (use_sparse13) { int in, err, extn, neqn, j; nt = nrn_threads; neqn = nt->end + nrndae_extra_eqn_count(); extn = 0; if (nt->_ecell_memb_list) { extn = nt->_ecell_memb_list->nodecount * nlayer; } /*printf(" %d extracellular nodes\n", extn);*/ neqn += extn; nt->_actual_rhs = (double*)ecalloc(neqn+1, sizeof(double)); nt->_sp13mat = spCreate(neqn, 0, &err); if (err != spOKAY) { hoc_execerror("Couldn't create sparse matrix", (char*)0); } for (in=0, i=1; in < nt->end; ++in, ++i) { nt->_v_node[in]->eqn_index_ = i; if (nt->_v_node[in]->extnode) { i += nlayer; } } for (in = 0; in < nt->end; ++in) { int ie, k; Node* nd, *pnd; Extnode* nde; nd = nt->_v_node[in]; nde = nd->extnode; pnd = nt->_v_parent[in]; i = nd->eqn_index_; nd->_rhs = nt->_actual_rhs + i; nd->_d = spGetElement(nt->_sp13mat, i, i); if (nde) { for (ie = 0; ie < nlayer; ++ie) { k = i + ie + 1; nde->_d[ie] = spGetElement(nt->_sp13mat, k, k); nde->_rhs[ie] = nt->_actual_rhs + k; nde->_x21[ie] = spGetElement(nt->_sp13mat, k, k-1); nde->_x12[ie] = spGetElement(nt->_sp13mat, k-1, k); } } if (pnd) { j = pnd->eqn_index_; nd->_a_matelm = spGetElement(nt->_sp13mat, j, i); nd->_b_matelm = spGetElement(nt->_sp13mat, i, j); if (nde && pnd->extnode) for (ie = 0; ie < nlayer; ++ie) { int kp = j + ie + 1; k = i + ie + 1; nde->_a_matelm[ie] = spGetElement(nt->_sp13mat, kp, k); nde->_b_matelm[ie] = spGetElement(nt->_sp13mat, k, kp); } }else{ /* not needed if index starts at 1 */ nd->_a_matelm = (double*)0; nd->_b_matelm = (double*)0; } } nrndae_alloc(); }else{ FOR_THREADS(nt) { assert(nrndae_extra_eqn_count() == 0); assert(!nt->_ecell_memb_list || nt->_ecell_memb_list->nodecount == 0); nt->_actual_d = (double*)ecalloc(nt->end, sizeof(double)); nt->_actual_rhs = (double*)ecalloc(nt->end, sizeof(double)); for (i = 0; i < nt->end; ++i) { Node* nd = nt->_v_node[i]; nd->_d = nt->_actual_d + i; nd->_rhs = nt->_actual_rhs + i; } } } } void nrn_cachevec(int b) { if (use_sparse13) { use_cachevec = 0; }else{ if (b && use_cachevec == 0) { tree_changed = 1; } use_cachevec = b; } } #if CACHEVEC /* Pointers that need to be updated are: All Point process area pointers. All mechanism POINTER variables that point to v. All Graph addvar pointers that plot v. All Vector record and play pointers that deal with v. All PreSyn threshold detectors that watch v. */ static int n_recalc_ptr_callback; static void (*recalc_ptr_callback[20])(); static int recalc_cnt_; static double **recalc_ptr_new_vp_, **recalc_ptr_old_vp_; static int n_old_thread_; static int* old_actual_v_size_; static double** old_actual_v_; static double** old_actual_area_; /* defer freeing a few things which may have pointers to them until ready to update those pointers */ void nrn_old_thread_save(void) { int i; int n = nrn_nthread; if (old_actual_v_){return;} /* one is already outstanding */ n_old_thread_ = n; old_actual_v_size_ = (int*)ecalloc(n, sizeof(int)); old_actual_v_ = (double**)ecalloc(n, sizeof(double*)); old_actual_area_ = (double**)ecalloc(n, sizeof(double*)); for (i=0; i < n; ++i) { NrnThread* nt = nrn_threads + i; old_actual_v_size_[i] = nt->end; old_actual_v_[i] = nt->_actual_v; old_actual_area_[i] = nt->_actual_area; } } static double* (*recalc_ptr_)(double*); double* nrn_recalc_ptr(double* old) { if (recalc_ptr_) { return (*recalc_ptr_)(old); } if (!recalc_ptr_old_vp_) { return old; } if (nrn_isdouble(old, 0.0, (double)recalc_cnt_)) { int k = (int)(*old); if (old == recalc_ptr_old_vp_[k]) { return recalc_ptr_new_vp_[k]; } } return old; } void nrn_register_recalc_ptr_callback(Pfrv f) { if (n_recalc_ptr_callback >= 20) { printf("More than 20 recalc_ptr_callback functions\n"); exit(1); } recalc_ptr_callback[n_recalc_ptr_callback++] = f; } void nrn_recalc_ptrs(double*(*r)(double*)) { int i; recalc_ptr_ = r; /* update pointers managed by c++ */ nrniv_recalc_ptrs(); /* user callbacks to update pointers */ for (i=0; i < n_recalc_ptr_callback; ++i) { (*recalc_ptr_callback[i])(); } recalc_ptr_ = (void*)0; } void nrn_recalc_node_ptrs(void) { int i, ii, j, k; NrnThread* nt; if (use_cachevec == 0) { return; } /*printf("nrn_recalc_node_ptrs\n");*/ recalc_cnt_ = 0; FOR_THREADS(nt) { recalc_cnt_ += nt->end; } recalc_ptr_new_vp_ = (double**)ecalloc(recalc_cnt_, sizeof(double*)); recalc_ptr_old_vp_ = (double**)ecalloc(recalc_cnt_, sizeof(double*)); /* first update the pointers without messing with the old NODEV,NODEAREA */ /* to prepare for the update, copy all the v and area values into the */ /* new arrays are replace the old values by index value. */ /* a pointer dereference value of i allows us to easily check */ /* if the pointer points to what v_node[i]->_v points to. */ ii = 0; FOR_THREADS(nt) { nt->_actual_v = (double*)ecalloc(nt->end, sizeof(double)); nt->_actual_area = (double*)ecalloc(nt->end, sizeof(double)); } FOR_THREADS(nt) for (i = 0; i < nt->end; ++i) { Node* nd = nt->_v_node[i]; nt->_actual_v[i] = *nd->_v; recalc_ptr_new_vp_[ii] = nt->_actual_v + i; recalc_ptr_old_vp_[ii] = nd->_v; nt->_actual_area[i] = nd->_area; *nd->_v = (double)ii; ++ii; } /* update POINT_PROCESS pointers to NODEAREA */ /* and relevant POINTER pointers to NODEV */ FOR_THREADS(nt) for (i=0; i < nt->end; ++i) { Node* nd = nt->_v_node[i]; Prop* p; Datum* d; int dpend; for (p = nd->prop; p; p = p->next) { if (memb_func[p->type].is_point && !nrn_is_artificial_[p->type]) { p->dparam[0].pval = nt->_actual_area + i; } dpend = nrn_dparam_ptr_end_[p->type]; for (j=nrn_dparam_ptr_start_[p->type]; j < dpend; ++j) { double* pval = p->dparam[j].pval; if (nrn_isdouble(pval, 0., (double)recalc_cnt_)) { /* possible pointer to v */ k = (int)(*pval); if (pval == recalc_ptr_old_vp_[k]) { p->dparam[j].pval = recalc_ptr_new_vp_[k]; } } } } } nrn_recalc_ptrs((void*)0); /* now that all the pointers are updated we update the NODEV */ ii = 0; FOR_THREADS(nt) for (i = 0; i < nt->end; ++i) { Node* nd = nt->_v_node[i]; nd->_v = recalc_ptr_new_vp_[ii]; ++ii; } free((char*)recalc_ptr_old_vp_); free((char*)recalc_ptr_new_vp_); recalc_ptr_old_vp_ = (double**)0; recalc_ptr_new_vp_ = (double**)0; /* and free the old thread arrays if new ones were allocated */ for (i = 0; i < n_old_thread_; ++i) { if (old_actual_v_[i]) hoc_free_val_array(old_actual_v_[i], old_actual_v_size_[i]); if (old_actual_area_[i]) free((char*)old_actual_area_[i]); } free((char*)old_actual_v_size_); free((char*)old_actual_v_); free((char*)old_actual_area_); old_actual_v_size_ = 0; old_actual_v_ = 0; old_actual_area_ = 0; n_old_thread_ = 0; nrn_cache_prop_realloc(); nrn_recalc_ptrvector(); } #endif /* CACHEVEC */ neuron-7.5/src/nrnoc/vclmp.c000066400000000000000000000300541323325274500160760ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* NOT VECTORIZED */ #define NRN_VECTORIZED 0 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__VClamp #define _nrn_initial _nrn_initial__VClamp #define nrn_cur _nrn_cur__VClamp #define _nrn_current _nrn_current__VClamp #define nrn_jacob _nrn_jacob__VClamp #define nrn_state _nrn_state__VClamp #define _net_receive _net_receive__VClamp #define update update__VClamp #define vstim vstim__VClamp #define _threadargscomma_ /**/ #define _threadargsprotocomma_ /**/ #define _threadargs_ /**/ #define _threadargsproto_ /**/ /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); static double *_p; static Datum *_ppvar; #define t nrn_threads->_t #define dt nrn_threads->_dt #define dur (_p + 0) #define amp (_p + 3) #define gain _p[6] #define rstim _p[7] #define tau1 _p[8] #define tau2 _p[9] #define e0 _p[10] #define vo0 _p[11] #define vi0 _p[12] #define fac _p[13] #define i _p[14] #define e _p[15] #define vo _p[16] #define vi _p[17] #define stim _p[18] #define tc _p[19] #define De _p[20] #define Dvo _p[21] #define Dvi _p[22] #define _g _p[23] #define _nd_area *_ppvar[0]._pval #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; /* external NEURON variables */ /* declaration of user functions */ static double _hoc_icur(); static double _hoc_update(); static double _hoc_vstim(); static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern Prop* nrn_point_prop_; static int _pointtype; static void* _hoc_create_pnt(_ho) Object* _ho; { void* create_point_process(); return create_point_process(_pointtype, _ho); } static void _hoc_destroy_pnt(); static double _hoc_loc_pnt(_vptr) void* _vptr; {double loc_point_process(); return loc_point_process(_pointtype, _vptr); } static double _hoc_has_loc(_vptr) void* _vptr; {double has_loc_point(); return has_loc_point(_vptr); } static double _hoc_get_loc_pnt(_vptr)void* _vptr; { double get_loc_point_process(); return (get_loc_point_process(_vptr)); } extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _p = _prop->param; _ppvar = _prop->dparam; } static void _hoc_setdata(void* _vptr) { Prop* _prop; _prop = ((Point_process*)_vptr)->_prop; _setdata(_prop); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { 0,0 }; static Member_func _member_func[] = { "loc", _hoc_loc_pnt, "has_loc", _hoc_has_loc, "get_loc", _hoc_get_loc_pnt, "icur", _hoc_icur, "update", _hoc_update, "vstim", _hoc_vstim, 0, 0 }; #define icur icur_VClamp extern double icur( ); /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { "dur", 0, 1e+09, "fac", 1, 10, "gain", 0, 1e+09, "rstim", 1e-09, 1e+09, "tau2", 0, 1e+09, "tau1", 0, 1e+09, 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { "dur", "ms", "amp", "mV", "rstim", "megohm", "tau1", "ms", "tau2", "ms", "e0", "mV", "vo0", "mV", "vi0", "mV", "fac", "1.0", "e", "mV", "vo", "mV", "vi", "mV", "i", "nA", 0,0 }; static double delta_t = 0.01; static double v = 0; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); static void nrn_cur(_NrnThread*, _Memb_list*, int); static void nrn_jacob(_NrnThread*, _Memb_list*, int); static void _hoc_destroy_pnt(_vptr) void* _vptr; { destroy_point_process(_vptr); } /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "VClamp", "dur[3]", "amp[3]", "gain", "rstim", "tau1", "tau2", "e0", "vo0", "vi0", "fac", 0, "i", 0, "e", "vo", "vi", 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; if (nrn_point_prop_) { _prop->_alloc_seq = nrn_point_prop_->_alloc_seq; _p = nrn_point_prop_->param; _ppvar = nrn_point_prop_->dparam; }else{ _p = nrn_prop_data_alloc(_mechtype, 24, _prop); /*initialize range parameters*/ gain = 100000; rstim = 1; tau1 = 0.001; tau2 = 0; e0 = 0; vo0 = 0; vi0 = 0; fac = 0; } _prop->param = _p; _prop->param_size = 24; if (!nrn_point_prop_) { _ppvar = nrn_prop_datum_alloc(_mechtype, 2, _prop); } _prop->dparam = _ppvar; /*connect ionic variables to this model*/ } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _vclmp_reg_() { int _vectorized = 0; _initlists(); _pointtype = point_register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 0, _hoc_create_pnt, _hoc_destroy_pnt, _member_func); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 24, 2); hoc_register_dparam_semantics(_mechtype, 0, "area"); hoc_register_dparam_semantics(_mechtype, 1, "pntproc"); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 VClamp /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/vclmp.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static int update(); static int vstim(); #define _RHS1(arg) _coef1[arg][3] static int _slist1[3];static double **_coef1; static void clamp(); static int vstim ( ) { tc = 0.0 ; {int _lj ;for ( _lj = 0 ; _lj <= 3 - 1 ; _lj ++ ) { stim = amp [ _lj ] ; tc = tc + dur [ _lj ] ; if ( t < tc ) { tc = tc + 100.0 ; /*VERBATIM*/ break; } } } return 0; } static double _hoc_vstim(void* _vptr) { double _r; _hoc_setdata(_vptr); _r = 1.; vstim ( ); return(_r); } double icur ( ) { double _licur; double _lvout ; if ( t > tc ) { e0 = 0.0 ; vo0 = 0.0 ; _licur = 0.0 ; } else { error = 0; clamp(); error = simeq(3, _coef1, _p, _slist1); if(error){fprintf(stderr,"at line 141 in file ../../../nrn/src/nrnoc/vclmp.mod:\n SOLVE clamp\n"); nrn_complain(_p); abort_run(error);} _licur = ( vo - v ) / rstim ; } return _licur; } static double _hoc_icur(void* _vptr) { double _r; _hoc_setdata(_vptr); _r = icur ( ); return(_r); } static void clamp () { zero_matrix(_coef1, 3, 4); { int _counte = -1; double _lt1 , _lt2 ; _lt1 = tau1 / dt ; _lt2 = tau2 / dt ; ++_counte; _coef1[_counte][0] -= 1.0 ; _RHS1(_counte) -= v ; _coef1[_counte][1] += fac * 1.0 ; _RHS1(_counte) += fac * v ; ; ++_counte; _coef1[_counte][1] -= _lt2 * 1.0 ; _RHS1(_counte) -= _lt2 * vo0 ; _coef1[_counte][1] -= 1.0 ; _coef1[_counte][2] -= gain * 1.0 ; ; ++_counte; _RHS1(_counte) -= stim ; _coef1[_counte][2] += 1.0 ; _coef1[_counte][0] -= 1.0 ; _coef1[_counte][2] += 1.0 ; _coef1[_counte][0] -= _lt1 * 1.0 ; _coef1[_counte][2] += _lt1 * 1.0 ; _RHS1(_counte) -= _lt1 * ( vi0 - e0 ) ; _RHS1(_counte) -= 0.0 ; ; } } static int update ( ) { i = icur ( _threadargs_ ) ; e0 = e ; vo0 = vo ; vi0 = vi ; /*VERBATIM*/ return 0; return 0; } static double _hoc_update(void* _vptr) { double _r; _hoc_setdata(_vptr); _r = 1.; update ( ); return(_r); } static void initmodel() { int _i; double _save;_ninits++; _save = t; t = 0.0; { e = e0; vi = vi0; vo = vo0; { e0 = 0.0 ; vo = v ; vo0 = v ; vi = v ; vi0 = v ; e = 0.0 ; {int _lj ;for ( _lj = 0 ; _lj <= 3 - 1 ; _lj ++ ) { if ( dur [ _lj ] > 0.0 && amp [ _lj ] != 0.0 ) { /*VERBATIM*/ {extern int cvode_active_; if (cvode_active_) { hoc_execerror("VClamp", " does not work with CVODE"); }} } } } } _sav_indep = t; t = _save; } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v = _v; initmodel(); }} static double _nrn_current(double _v){double _current=0.;v=_v;{ { vstim ( _threadargs_ ) ; i = icur ( _threadargs_ ) ; } _current += i; } return _current; } static void nrn_cur(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } _g = _nrn_current(_v + .001); { _rhs = _nrn_current(_v); } _g = (_g - _rhs)/.001; _g *= 1.e2/(_nd_area); _rhs *= 1.e2/(_nd_area); #if CACHEVEC if (use_cachevec) { VEC_RHS(_ni[_iml]) += _rhs; }else #endif { NODERHS(_nd) += _rhs; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_rhs[_ni[_iml]] += _rhs; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_rhs[0] += _rhs; } #endif }} static void nrn_jacob(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { VEC_D(_ni[_iml]) -= _g; }else #endif { NODED(_nd) -= _g; } if (_nt->_nrn_fast_imem) { _nt->_nrn_fast_imem->_nrn_sav_d[_ni[_iml]] -= _g; } #if EXTRACELLULAR if (_nd->_extnode) { *_nd->_extnode->_d[0] += _g; } #endif }} static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type){ Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if EXTRACELLULAR _nd = _ml->_nodelist[_iml]; if (_nd->_extnode) { _v = NODEV(_nd) +_nd->_extnode->_v[0]; }else #endif { #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } } v=_v; { { error = update(); if(error){fprintf(stderr,"at line 111 in file ../../../nrn/src/nrnoc/vclmp.mod:\n SOLVE update METHOD after_cvode : but not really (see above)\n"); nrn_complain(_p); abort_run(error);} }}} } static void terminal(){} static void _initlists() { int _i; static int _first = 1; if (!_first) return; _slist1[0] = &(vi) - _p; _slist1[1] = &(vo) - _p; _slist1[2] = &(e) - _p; if (_first) _coef1 = makematrix(3, 4); _first = 0; } neuron-7.5/src/nrnoc/vclmp.mod000077500000000000000000000107231323325274500164370ustar00rootroot00000000000000COMMENT Voltage clamp with three levels. Clamp is on at time 0, and off at time dur[0]+dur[1]+dur[2]. When clamp is off the injected current is 0. Do not insert several instances of this model at the same location in order to make level changes. That is equivalent to independent clamps and they will have incompatible internal state values. The control amplifier has the indicated gain and time constant. The input amplifier is ideal. tau2 gain +-|\____rstim____>to cell -amp --'\/`-------|/ | |----||--- |___ __|-----/|___from cell `'`' \| tau1 The clamp has a three states which are the voltage input of the gain amplifier, the voltage output of the gain amplfier, and the voltage output of the measuring amplifier. A good initial condition for these voltages are 0, 0, and v respectively. This model is quite stiff. For this reason the current is updated within the solve block before updating the state of the clamp. This gives the correct value of the current on exit from fadvance(). If we didn't do this and instead used the values computed in the breakpoint block, it would look like the clamp current is much larger than it actually is since it doesn't take into account the change in voltage within the timestep, ie equivalent to an almost infinite capacitance. Also, because of stiffness, do not use this model except with secondorder=0. This model makes use of implementation details of how models are interfaced to neuron. At some point I will make the translation such that these kinds of models can be handled straightforwardly. Note that since this is an electrode current model v refers to the internal potential which is equivalent to the membrane potential v when there is no extracellular membrane mechanism present but is v+vext when one is present. Also since i is an electrode current, positive values of i depolarize the cell. (Normally, positive membrane currents are outward and thus hyperpolarize the cell) ENDCOMMENT DEFINE NSTEP 3 NEURON { POINT_PROCESS VClamp ELECTRODE_CURRENT i RANGE e0,vo0,vi0,dur,amp,gain,rstim,tau1,tau2,fac,i } UNITS { (nA) = (nanoamp) (mV) = (millivolt) (uS) = (microsiemens) } PARAMETER { dur[NSTEP] (ms) <0, 1e9> amp[NSTEP] (mV) gain = 1e5 <0,1e9> rstim = 1 (megohm) <1e-9,1e9> tau1 = .001 (ms) <0,1e9> tau2 = 0 (ms) <0,1e9> e0 (mV) vo0 (mV) vi0(mV) fac=0 <1,10> } ASSIGNED { v (mV) : automatically v + vext when extracellular is present dt (ms) i (nA) stim (mV) tc (ms) } STATE { e (mV) vo (mV) vi (mV) } INITIAL { e0 = 0 vo = v vo0 = v vi = v vi0 = v e = 0 FROM j=0 TO NSTEP-1 { if (dur[j] > 0 && amp[j] != 0) { : nrn/lib/hoc/electrod.hoc always installs a VClamp : stopping cvode here if the clamp is on still allows : that tool to control a IClamp under cvode VERBATIM {extern int cvode_active_; if (cvode_active_) { hoc_execerror("VClamp", " does not work with CVODE"); }} ENDVERBATIM }} } BREAKPOINT { SOLVE update METHOD after_cvode : but not really (see above) vstim() i = icur() } PROCEDURE vstim() { : can't be called from update since vinput must : remain constant throughout dt interval and : update is called at t+dt tc = 0 (ms) FROM j=0 TO NSTEP-1 { stim = amp[j] tc = tc + dur[j] if (t < tc) { tc = tc + 100 : clamp is definitely not off VERBATIM break; ENDVERBATIM } } } FUNCTION icur()(nA) { : since this function uses range variables, it : should not be called from hoc. If you want to : know the current, look in i_vc LOCAL vout if (t > tc) { e0 = 0 vo0 = 0 icur = 0 }else{ SOLVE clamp icur = (vo - v)/rstim } } LINEAR clamp { LOCAL t1, t2 t1 = tau1/dt t2 = tau2/dt ~ vi = v + fac*vo - fac*v ~ t2*vo - t2*vo0 + vo = -gain * e ~ -stim - e + vi - e + t1*vi - t1*e - t1*(vi0 - e0) = 0 } PROCEDURE update() { i = icur() e0 = e vo0 = vo vi0 = vi VERBATIM return 0; ENDVERBATIM } COMMENT This implementation is not very high level since the clamp uses a state which must be computed at the same time as the membrane potential and doesn't fit into the paradigm normally used for channel states. The state, vinput0, at t is integrated from its old value saved in vinput. The value of vinput (as well as the initial values of v and the output of the control amplifier) is updated when the SOLVE is executed. Notice that the icur function is very stiff with respect to v. For this reason i is only good for the user after the SOLVE is executed. ENDCOMMENT neuron-7.5/src/nrnoc/xmech.c000066400000000000000000000130061323325274500160570ustar00rootroot00000000000000/* Created by Language version: 6.2.0 */ /* VECTORIZED */ #define NRN_VECTORIZED 1 #include #include #include #include "scoplib_ansi.h" #undef PI #define nil 0 #include "md1redef.h" #include "section.h" #include "nrniv_mf.h" #include "md2redef.h" #if METHOD3 extern int _method3; #endif #if !NRNGPU #undef exp #define exp hoc_Exp extern double hoc_Exp(double); #endif #define nrn_init _nrn_init__Xmech #define _nrn_initial _nrn_initial__Xmech #define nrn_cur _nrn_cur__Xmech #define _nrn_current _nrn_current__Xmech #define nrn_jacob _nrn_jacob__Xmech #define nrn_state _nrn_state__Xmech #define _net_receive _net_receive__Xmech #define _threadargscomma_ _p, _ppvar, _thread, _nt, #define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, #define _threadargs_ _p, _ppvar, _thread, _nt #define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt /*SUPPRESS 761*/ /*SUPPRESS 762*/ /*SUPPRESS 763*/ /*SUPPRESS 765*/ extern double *getarg(); /* Thread safe. No static _p or _ppvar. */ #define t _nt->_t #define dt _nt->_dt #define v _p[0] #if MAC #if !defined(v) #define v _mlhv #endif #if !defined(h) #define h _mlhh #endif #endif #if defined(__cplusplus) extern "C" { #endif static int hoc_nrnpointerindex = -1; static Datum* _extcall_thread; static Prop* _extcall_prop; /* external NEURON variables */ /* declaration of user functions */ static int _mechtype; extern void _nrn_cacheloop_reg(int, int); extern void hoc_register_prop_size(int, int, int); extern void hoc_register_limits(int, HocParmLimits*); extern void hoc_register_units(int, HocParmUnits*); extern void nrn_promote(Prop*, int, int); extern Memb_func* memb_func; extern void _nrn_setdata_reg(int, void(*)(Prop*)); static void _setdata(Prop* _prop) { _extcall_prop = _prop; } static void _hoc_setdata() { Prop *_prop, *hoc_getdata_range(int); _prop = hoc_getdata_range(_mechtype); _setdata(_prop); hoc_retpushx(1.); } /* connect user functions to hoc names */ static VoidFunc hoc_intfunc[] = { "setdata_Xmech", _hoc_setdata, 0, 0 }; /* declare global and static user variables */ /* some parameters have upper and lower limits */ static HocParmLimits _hoc_parm_limits[] = { 0,0,0 }; static HocParmUnits _hoc_parm_units[] = { 0,0 }; /* connect global user variables to hoc */ static DoubScal hoc_scdoub[] = { 0,0 }; static DoubVec hoc_vdoub[] = { 0,0,0 }; static double _sav_indep; static void nrn_alloc(Prop*); static void nrn_init(_NrnThread*, _Memb_list*, int); static void nrn_state(_NrnThread*, _Memb_list*, int); /* connect range variables in _p that hoc is supposed to know about */ static const char *_mechanism[] = { "6.2.0", "Xmech", 0, 0, 0, 0}; extern Prop* need_memb(Symbol*); static void nrn_alloc(Prop* _prop) { Prop *prop_ion; double *_p; Datum *_ppvar; _p = nrn_prop_data_alloc(_mechtype, 1, _prop); /*initialize range parameters*/ _prop->param = _p; _prop->param_size = 1; } static void _initlists(); extern Symbol* hoc_lookup(const char*); extern void _nrn_thread_reg(int, int, void(*)(Datum*)); extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, _NrnThread*, int)); extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); extern void _cvode_abstol( Symbol**, double*, int); void _xmech_reg_() { int _vectorized = 1; _initlists(); register_mech(_mechanism, nrn_alloc,(void*)0, (void*)0, (void*)0, nrn_init, hoc_nrnpointerindex, 1); _mechtype = nrn_get_mechtype(_mechanism[1]); _nrn_setdata_reg(_mechtype, _setdata); hoc_register_prop_size(_mechtype, 1, 0); hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); ivoc_help("help ?1 Xmech /home/hines/neuron/nrnrpm/src/nrnoc/../../../nrn/src/nrnoc/xmech.mod\n"); hoc_register_limits(_mechtype, _hoc_parm_limits); hoc_register_units(_mechtype, _hoc_parm_units); } static int _reset; static char *modelname = ""; static int error; static int _ninits = 0; static int _match_recurse=1; static void _modl_cleanup(){ _match_recurse=1;} static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt) { int _i; double _save;{ } } static void nrn_init(_NrnThread* _nt, _Memb_list* _ml, int _type){ double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v = _v; initmodel(_p, _ppvar, _thread, _nt); } } static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, _NrnThread* _nt, double _v){double _current=0.;v=_v;{ } return _current; } static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { }} } static void terminal(){} static void _initlists(){ double _x; double* _p = &_x; int _i; static int _first = 1; if (!_first) return; _first = 0; } #if defined(__cplusplus) } /* extern "C" */ #endif neuron-7.5/src/nrnoc/xmech.mod000077500000000000000000000012151323325274500164160ustar00rootroot00000000000000NEURON{ SUFFIX Xmech} COMMENT Dummy mechanism for linking an "unknown" mechanism into neuron for teaching and course examination purposes. This merely generates the hook for registering a mechanism. The teacher can construct an unknown channel in another directory, translate it via nocmodl, manually eliminate the registration of range variables etc, compile it and place it in the nrnoc/SRC/$CPU directory and create a new library. The student's task is then to reverse engineer the model in a circumstance in which no information specific to the model is available from the interpreter. (except that the channel has been inserted). ENDCOMMENT neuron-7.5/src/nrnpython/000077500000000000000000000000001323325274500155275ustar00rootroot00000000000000neuron-7.5/src/nrnpython/Makefile.am000077500000000000000000000023211323325274500175640ustar00rootroot00000000000000npylib = libnrnpython@npy_pyver10@ lib_LTLIBRARIES = libnrnpython@npy_pyver10@.la nsrc=$(top_srcdir)/src DEFS = @DEFS@ @NRNPYTHON_DEFINES@ NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) includes = -I. -I$(nsrc)/nrniv -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I$(nsrc)/oc -I$(nsrc)/nrnmpi -I$(nsrc)/gnu $(NRNPYTHON_INCLUDES) $(IV_INCLUDES) AM_CPPFLAGS = -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 $(includes) AM_CXXFLAGS = @MINGW_CFLAG@ if BUILD_NRNPYTHON if BUILD_CYGWIN EXTEND = inithoc.cpp else if BUILD_MINGW EXTEND = inithoc.cpp else EXTEND = endif endif endif libnrnpython@npy_pyver10@_la_SOURCES = nrnpython.cpp nrnpy_hoc.cpp nrnpy_nrn.cpp \ nrnpy_p2h.cpp grids.c rxd.c rxd_vol.c $(EXTEND) noinst_HEADERS = nrnpython.h nrnpy_reg.h \ nrnpy_hoc_2.h nrnpy_hoc_3.h \ nrnpy_nrn_2.h nrnpy_nrn_3.h hoccontext.h \ nrnpy_utils.h rxd.h grids.h if BUILD_MINGW nrnpython.dll: $(npylib).la $(CC) -shared -Wl,--out-implib,$(npylib).dll.a \ -o nrnpython.dll .libs/*.o endif if BUILD_NRNPYTHON BUILT_SOURCES = force setup.py force: if test inithoc.cpp -ot $(nsrc)/nrnpython/inithoc.cpp ; then \ cp $(nsrc)/nrnpython/inithoc.cpp inithoc.cpp ; \ fi clean-local: -rm -rf build endif neuron-7.5/src/nrnpython/Makefile.in000066400000000000000000000716501323325274500176050ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/nrnpython ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ nrnpython_config.h $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = setup.py CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libnrnpython@npy_pyver10@_la_LIBADD = am__libnrnpython@npy_pyver10@_la_SOURCES_DIST = nrnpython.cpp \ nrnpy_hoc.cpp nrnpy_nrn.cpp nrnpy_p2h.cpp grids.c rxd.c \ rxd_vol.c inithoc.cpp @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@@BUILD_NRNPYTHON_TRUE@am__objects_1 = inithoc.lo @BUILD_CYGWIN_TRUE@@BUILD_NRNPYTHON_TRUE@am__objects_1 = inithoc.lo am_libnrnpython@npy_pyver10@_la_OBJECTS = nrnpython.lo nrnpy_hoc.lo \ nrnpy_nrn.lo nrnpy_p2h.lo grids.lo rxd.lo rxd_vol.lo \ $(am__objects_1) libnrnpython@npy_pyver10@_la_OBJECTS = \ $(am_libnrnpython@npy_pyver10@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libnrnpython@npy_pyver10@_la_SOURCES) DIST_SOURCES = $(am__libnrnpython@npy_pyver10@_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)nrnpython_config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/nrnpython_config.h.in $(srcdir)/setup.py.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ @NRNPYTHON_DEFINES@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ npylib = libnrnpython@npy_pyver10@ lib_LTLIBRARIES = libnrnpython@npy_pyver10@.la nsrc = $(top_srcdir)/src IV_INCLUDES = @IV_INCLUDE@ $(X_CFLAGS) includes = -I. -I$(nsrc)/nrniv -I$(nsrc)/ivoc -I$(nsrc)/nrnoc -I$(nsrc)/oc -I$(nsrc)/nrnmpi -I$(nsrc)/gnu $(NRNPYTHON_INCLUDES) $(IV_INCLUDES) AM_CPPFLAGS = -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 $(includes) AM_CXXFLAGS = @MINGW_CFLAG@ @BUILD_CYGWIN_FALSE@@BUILD_MINGW_FALSE@@BUILD_NRNPYTHON_TRUE@EXTEND = @BUILD_CYGWIN_FALSE@@BUILD_MINGW_TRUE@@BUILD_NRNPYTHON_TRUE@EXTEND = inithoc.cpp @BUILD_CYGWIN_TRUE@@BUILD_NRNPYTHON_TRUE@EXTEND = inithoc.cpp libnrnpython@npy_pyver10@_la_SOURCES = nrnpython.cpp nrnpy_hoc.cpp nrnpy_nrn.cpp \ nrnpy_p2h.cpp grids.c rxd.c rxd_vol.c $(EXTEND) noinst_HEADERS = nrnpython.h nrnpy_reg.h \ nrnpy_hoc_2.h nrnpy_hoc_3.h \ nrnpy_nrn_2.h nrnpy_nrn_3.h hoccontext.h \ nrnpy_utils.h rxd.h grids.h @BUILD_NRNPYTHON_TRUE@BUILT_SOURCES = force setup.py all: $(BUILT_SOURCES) nrnpython_config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/nrnpython/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/nrnpython/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrnpython_config.h: stamp-h3 @test -f $@ || rm -f stamp-h3 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h3 stamp-h3: $(srcdir)/nrnpython_config.h.in $(top_builddir)/config.status @rm -f stamp-h3 cd $(top_builddir) && $(SHELL) ./config.status src/nrnpython/nrnpython_config.h distclean-hdr: -rm -f nrnpython_config.h stamp-h3 setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libnrnpython@npy_pyver10@.la: $(libnrnpython@npy_pyver10@_la_OBJECTS) $(libnrnpython@npy_pyver10@_la_DEPENDENCIES) $(EXTRA_libnrnpython@npy_pyver10@_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libnrnpython@npy_pyver10@_la_OBJECTS) $(libnrnpython@npy_pyver10@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grids.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inithoc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnpy_hoc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnpy_nrn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnpy_p2h.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnpython.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rxd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rxd_vol.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) nrnpython_config.h installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @BUILD_NRNPYTHON_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile @BUILD_MINGW_TRUE@nrnpython.dll: $(npylib).la @BUILD_MINGW_TRUE@ $(CC) -shared -Wl,--out-implib,$(npylib).dll.a \ @BUILD_MINGW_TRUE@ -o nrnpython.dll .libs/*.o @BUILD_NRNPYTHON_TRUE@force: @BUILD_NRNPYTHON_TRUE@ if test inithoc.cpp -ot $(nsrc)/nrnpython/inithoc.cpp ; then \ @BUILD_NRNPYTHON_TRUE@ cp $(nsrc)/nrnpython/inithoc.cpp inithoc.cpp ; \ @BUILD_NRNPYTHON_TRUE@ fi @BUILD_NRNPYTHON_TRUE@clean-local: @BUILD_NRNPYTHON_TRUE@ -rm -rf build # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/nrnpython/grids.c000066400000000000000000000217141323325274500170100ustar00rootroot00000000000000/****************************************************************** Author: Austin Lachance Date: 10/28/16 Description: Defines the functions for implementing and manipulating a linked list of Grid_nodes ******************************************************************/ #include #include #include "grids.h" #include #ifdef __APPLE__ #include #else #include #endif #define DIE(msg) exit(fprintf(stderr, "%s\n", msg)) double *dt_ptr; double* t_ptr; Grid_node *Parallel_grids[100] = {NULL}; // Set ∆t, t pointers void make_time_ptr(PyHocObject* my_dt_ptr, PyHocObject* my_t_ptr) { dt_ptr = my_dt_ptr -> u.px_; t_ptr = my_t_ptr -> u.px_; } // Add Flux * "flux" to a given grid *grid void add_flux(Grid_node **grid, Flux* flux) { (*grid)->flux_list = flux; } // Make a new Grid_node given required Grid_node parameters Grid_node *make_Grid(PyHocObject* my_states, int my_num_states_x, int my_num_states_y, int my_num_states_z, double my_dc_x, double my_dc_y, double my_dc_z, double my_dx, double my_dy, double my_dz, PyHocObject* my_alpha, PyHocObject* my_lambda) { Grid_node *new_Grid = malloc(sizeof(Grid_node)); assert(new_Grid); new_Grid->states = my_states->u.px_; new_Grid->size_x = my_num_states_x; new_Grid->size_y = my_num_states_y; new_Grid->size_z = my_num_states_z; new_Grid->flux_list = NULL; new_Grid->dc_x = my_dc_x; new_Grid->dc_y = my_dc_y; new_Grid->dc_z = my_dc_z; new_Grid->dx = my_dx; new_Grid->dy = my_dy; new_Grid->dz = my_dz; new_Grid->old_states = (double *) malloc(sizeof(double) * new_Grid->size_x * new_Grid->size_y * new_Grid->size_z); assert(new_Grid->old_states); new_Grid->concentration_list = NULL; new_Grid->num_concentrations = 0; new_Grid->current_list = NULL; new_Grid->num_currents = 0; new_Grid->next = NULL; new_Grid->VARIABLE_ECS_VOLUME = FALSE; /*Check to see if variable tortuosity/volume fraction is used*/ if(PyFloat_Check(my_lambda)) { /*apply the tortuosity*/ new_Grid->dc_x = my_dc_x/SQ(PyFloat_AsDouble((PyObject*)my_lambda)); new_Grid->dc_y = my_dc_y/SQ(PyFloat_AsDouble((PyObject*)my_lambda)); new_Grid->dc_z = my_dc_z/SQ(PyFloat_AsDouble((PyObject*)my_lambda)); /*is it worth storing lambda?*/ new_Grid->lambda = (double*)malloc(sizeof(double)); new_Grid->lambda[0] = SQ(PyFloat_AsDouble((PyObject*)my_lambda)); new_Grid->get_lambda = &get_lambda_scalar; } else { new_Grid->lambda = my_lambda->u.px_; new_Grid->VARIABLE_ECS_VOLUME = TRUE; new_Grid->get_lambda = &get_lambda_array; } if(PyFloat_Check(my_alpha)) { new_Grid->alpha = (double*)malloc(sizeof(double)); new_Grid->alpha[0] = PyFloat_AsDouble((PyObject*)my_alpha); new_Grid->get_alpha = &get_alpha_scalar; } else { new_Grid->alpha = my_alpha->u.px_; new_Grid->VARIABLE_ECS_VOLUME = VOLUME_FRACTION; new_Grid->get_alpha = &get_alpha_array; } new_Grid->reactions = NULL; return new_Grid; } // Insert a Grid_node "new_Grid" into the list located at grid_list_index in Parallel_grids /* returns the grid number TODO: change this to returning the pointer */ int insert(int grid_list_index, PyHocObject* my_states, int my_num_states_x, int my_num_states_y, int my_num_states_z, double my_dc_x, double my_dc_y, double my_dc_z, double my_dx, double my_dy, double my_dz, PyHocObject* my_alpha, PyHocObject* my_lambda) { int i = 0; printf("INSERTING\n"); Grid_node *new_Grid = make_Grid(my_states, my_num_states_x, my_num_states_y, my_num_states_z, my_dc_x, my_dc_y, my_dc_z, my_dx, my_dy, my_dz, my_alpha, my_lambda); Grid_node **head = &(Parallel_grids[grid_list_index]); Grid_node *save; if(!(*head)) { *head = new_Grid; save = *head; } else { i++; /*count the head as the first grid*/ save = *head; Grid_node *end = *head; while(end->next != NULL) { i++; end = end->next; } end->next = new_Grid; } while(save != NULL) { printf("SIZE X: %d SIZE Y: %d SIZE Z: %d\n", save->size_x, save->size_y, save->size_z); save = save->next; } return i; } /* TODO: make this work with Grid_node ptrs instead of pairs of list indices */ void set_grid_concentrations(int grid_list_index, int index_in_list, PyObject* grid_indices, PyObject* neuron_pointers) { /* Preconditions: Assumes the specified grid has been created. Assumes len(grid_indices) = len(neuron_pointers) and that both are proper python lists */ /* TODO: note that these will need updating anytime the structure of the model changes... look at the structure change count at each advance and trigger a callback to regenerate if necessary */ Grid_node* g; Py_ssize_t i; Py_ssize_t n = PyList_Size(grid_indices); /* Find the Grid Object */ g = Parallel_grids[grid_list_index]; for (i = 0; i < index_in_list; i++) { g = g->next; } /* free the old concentration list */ free(g->concentration_list); /* allocate space for the new list */ g->concentration_list = malloc(sizeof(Concentration_Pair) * n); g->num_concentrations = n; /* populate the list */ /* TODO: it would be more general to iterate instead of assuming lists and using list lookups */ for (i = 0; i < n; i++) { /* printf("set_grid_concentrations %ld\n", i); */ g->concentration_list[i].source = PyInt_AS_LONG(PyList_GET_ITEM(grid_indices, i)); g->concentration_list[i].destination = ((PyHocObject*) PyList_GET_ITEM(neuron_pointers, i)) -> u.px_; } } /* TODO: make this work with Grid_node ptrs instead of pairs of list indices */ void set_grid_currents(int grid_list_index, int index_in_list, PyObject* grid_indices, PyObject* neuron_pointers, PyObject* scale_factors) { /* Preconditions: Assumes the specified grid has been created. Assumes len(grid_indices) = len(neuron_pointers) = len(scale_factors) and that all are proper python lists */ /* TODO: note that these will need updating anytime the structure of the model changes... look at the structure change count at each advance and trigger a callback to regenerate if necessary */ Grid_node* g; Py_ssize_t i; Py_ssize_t n = PyList_Size(grid_indices); /* Find the Grid Object */ g = Parallel_grids[grid_list_index]; for (i = 0; i < index_in_list; i++) { g = g->next; } /* free the old current list */ free(g->current_list); /* allocate space for the new list */ g->current_list = malloc(sizeof(Current_Triple) * n); g->num_currents = n; /* populate the list */ /* TODO: it would be more general to iterate instead of assuming lists and using list lookups */ for (i = 0; i < n; i++) { g->current_list[i].destination = PyInt_AS_LONG(PyList_GET_ITEM(grid_indices, i)); g->current_list[i].scale_factor = PyFloat_AS_DOUBLE(PyList_GET_ITEM(scale_factors, i)); g->current_list[i].source = ((PyHocObject*) PyList_GET_ITEM(neuron_pointers, i)) -> u.px_; /* printf("set_grid_currents %ld out of %ld, %ld, %ld\n", i, n, PyList_Size(neuron_pointers), PyList_Size(scale_factors)); */ }/* if (PyErr_Occurred()) { printf("uh oh\n"); PyErr_PrintEx(0); } else { printf("no problems\n"); } PyErr_Clear(); */ } // Free a single Grid_node void free_Grid(Grid_node *grid) { free(grid->states); free(grid->old_states); free(grid->flux_list); free(grid->concentration_list); free(grid->current_list); free(grid->alpha); free(grid->lambda); free(grid); } // Insert a Grid_node into the linked list /*void insert(Grid_node **head, Grid_node *new_Grid) { if(!(*head)) { *head = new_Grid; return; } Grid_node *end = *head; while(end->next != NULL) { end = end->next; } end->next = new_Grid; }*/ // Delete a specific Grid_node from the list int delete(Grid_node **head, Grid_node *find) { if(*head == find) { Grid_node *temp = *head; *head = (*head)->next; free_Grid(temp); return 1; } Grid_node *temp = *head; while(temp->next != find) { temp = temp->next; } if(!temp) return 0; Grid_node *delete_me = temp->next; temp->next = delete_me->next; free_Grid(delete_me); return 1; } // Destroy the list located at list_index and free all memory void empty_list(int list_index) { Grid_node **head = &(Parallel_grids[list_index]); while(*head != NULL) { Grid_node *old_head = *head; *head = (*head)->next; free_Grid(old_head); } } static double get_alpha_scalar(double* alpha, int idx) { return alpha[0]; } static double get_alpha_array(double* alpha, int idx) { return alpha[idx]; } static double get_lambda_scalar(double* lambda, int idx) { return 1.; /*already rescale the diffusion coefficients*/ } static double get_lambda_array(double* lambda, int idx) { return lambda[idx]; } neuron-7.5/src/nrnpython/grids.h000066400000000000000000000127371323325274500170220ustar00rootroot00000000000000/****************************************************************** Author: Austin Lachance Date: 10/28/16 Description: Header File for grids.c. Allows access to Grid_node and Flux_pair structs and their respective functions ******************************************************************/ #include #include #ifdef __APPLE__ #include #else #include #endif #define DIE(msg) exit(fprintf(stderr, "%s\n", msg)) #define IDX(x,y,z) ((z) + (y) * g.size_z + (x) * g.size_z * g.size_y) #define INDEX(x,y,z) ((z) + (y) * grid->size_z + (x) * grid->size_z * grid->size_y) #define ALPHA(x,y,z) (g.get_alpha(g.alpha,IDX(x,y,z))) #define LAMBDA(x,y,z) (g.get_lambda(g.lambda,IDX(x,y,z))) #define SQ(x) ((x)*(x)) #define CU(x) ((x)*(x)*(x)) #define TRUE 1 #define FALSE 0 #define VOLUME_FRACTION 3 #define TORTUOSITY 2 #define VOLUME_FRACTION 3 typedef struct { PyObject_HEAD void* ho_; union { double x_; char* s_; void* ho_; double* px_; }u; void* sym_; // for functions and arrays void* iteritem_; // enough info to carry out Iterator protocol int nindex_; // number indices seen so far (or narg) int* indices_; // one fewer than nindex_ int type_; // 0 HocTopLevelInterpreter, 1 HocObject // 2 function (or TEMPLATE) // 3 array // 4 reference to number // 5 reference to string // 6 reference to hoc object // 7 forall section iterator // 8 pointer to a hoc scalar // 9 incomplete pointer to a hoc array (similar to 3) } PyHocObject; typedef struct Flux_pair { double *flux; // Value of flux int grid_index; // Location in grid } Flux; typedef struct { double* destination; /* memory loc to transfer concentration to */ long source; /* index in grid for source */ } Concentration_Pair; typedef struct { long destination; /* index in grid */ double* source; /* memory loc of e.g. ica */ double scale_factor; } Current_Triple; typedef double (*ReactionRate)(double*); typedef struct Reaction { struct Reaction* next; ReactionRate reaction; unsigned int num_species_involved; double** species_states; unsigned char* subregion; unsigned int subregion_size; } Reaction; typedef struct Grid_node { double *states; // Array of doubles representing Grid space double *old_states; // Copy of states to hold old values int size_x; // Size of X dimension int size_y; // Size of Y dimension int size_z; // Size of Z dimension double dc_x; // X diffusion constant double dc_y; // Y diffusion constant double dc_z; // Z diffusion constant double dx; // ∆X double dy; // ∆Y double dz; // ∆Z Flux *flux_list; // List of pointer, index pairs struct Grid_node *next; Concentration_Pair* concentration_list; Current_Triple* current_list; Py_ssize_t num_concentrations, num_currents; /*Extension to handle a variable diffusion characteristics of a grid*/ unsigned char VARIABLE_ECS_VOLUME; /*FLAG which variable volume fraction methods should be used*/ /*diffusion characteristics are arrays of a single value or * the number of voxels (size_x*size_y*size_z)*/ double *lambda; /* tortuosities squared D_eff=D_free/lambda */ double *alpha; /* volume fractions */ /*Function that will be assigned when the grid is created to either return * the single value or the value at a given index*/ double (*get_alpha)(double*,int); double (*get_lambda)(double*,int); Reaction* reactions; } Grid_node; static double get_alpha_scalar(double*, int); static double get_alpha_array(double*, int); static double get_lambda_scalar(double*, int); static double get_lambda_array(double*, int); /***** GLOBALS *******************************************************************/ extern double *dt_ptr; // Universal ∆t extern double *t_ptr; // Universal t // static int N = 100; // Number of grid_lists (size of Parallel_grids) extern Grid_node *Parallel_grids[100];// Array of Grid_node * lists /*********************************************************************************/ // Set the global ∆t void make_dt_ptr(PyHocObject* my_dt_ptr); // Create a single Grid_node /* Parameters: Python object that includes array of double pointers, size of x, y, and z dimensions x, y, and z diffusion constants delta x, delta y, and delta z*/ Grid_node *make_Grid(PyHocObject* my_states, int my_num_states_x, int my_num_states_y, int my_num_states_z, double my_dc_x, double my_dc_y, double my_dc_z, double my_dx, double my_dy, double my_dz, PyHocObject* my_alpha, PyHocObject* my_lambda); // Free a single Grid_node "grid" void free_Grid(Grid_node *grid); // Insert a Grid_node "new_Grid" into the list located at grid_list_index in Parallel_grids int insert(int grid_list_index, PyHocObject* my_states, int my_num_states_x, int my_num_states_y, int my_num_states_z, double my_dc_x, double my_dc_y, double my_dc_z, double my_dx, double my_dy, double my_dz, PyHocObject* my_alpha, PyHocObject* my_lambda); // Delete a specific Grid_node "find" from the list "head" int delete(Grid_node **head, Grid_node *find); // Destroy the list located at list_index and free all memory void empty_list(int list_index); neuron-7.5/src/nrnpython/hoccontext.h000066400000000000000000000017441323325274500200640ustar00rootroot00000000000000#ifndef hoccontext_h #define hoccontext_h extern "C" { extern Object* hoc_thisobject; extern Objectdata* hoc_top_level_data; extern Symlist* hoc_top_level_symlist; extern Symlist* hoc_symlist; #define HocTopContextSet \ HocContext hcref; \ HocContext* hc_ = 0; \ if (hoc_thisobject) { \ hc_ = hc_save_and_set_to_top_(&hcref); \ } #define HocContextRestore \ if (hc_) { \ hc_restore_(hc_); \ } typedef struct HocContext { Object* obj; Objectdata* obd; Symlist* sl; } HocContext; static HocContext* hc_save_and_set_to_top_(HocContext* hc) { hc->obj = hoc_thisobject; hc->obd = hoc_objectdata; hc->sl = hoc_symlist; hoc_thisobject = 0; hoc_objectdata = hoc_top_level_data; hoc_symlist = hoc_top_level_symlist; return hc; } static void hc_restore_(HocContext* hc) { hoc_thisobject = hc->obj; hoc_objectdata = hc->obd; hoc_symlist = hc->sl; } } #endif neuron-7.5/src/nrnpython/inithoc.cpp000066400000000000000000000117041323325274500176730ustar00rootroot00000000000000#include "nrnmpiuse.h" #include "nrnpthread.h" #include #include #include "nrnmpi.h" #include "nrnpython_config.h" #if defined(__MINGW32__) #define _hypot hypot #endif #include #include extern "C" { // int nrn_global_argc; extern char** nrn_global_argv; extern void nrnpy_augment_path(); extern void (*p_nrnpython_finalize)(); #if PY_MAJOR_VERSION >= 3 extern PyObject* nrnpy_hoc(); #else extern void nrnpy_hoc(); #endif #if NRNMPI_DYNAMICLOAD extern void nrnmpi_stubs(); extern char* nrnmpi_load(int is_python); #endif #if NRNPYTHON_DYNAMICLOAD extern int nrnpy_site_problem; #define HOCMOD(a, b) HOCMOD_(a, b) #define HOCMOD_(a, b) a ## b #else #define HOCMOD(a, b) a #endif extern int nrn_is_python_extension; extern int ivocmain(int, char**, char**); extern int nrn_main_launch; #ifdef NRNMPI static const char* argv_mpi[] = {"NEURON", "-mpi", "-dll", 0}; static int argc_mpi = 2; #endif static const char* argv_nompi[] = {"NEURON", "-dll", 0}; static int argc_nompi = 1; #if USE_PTHREAD #include static pthread_t main_thread_; #endif static void nrnpython_finalize() { #if USE_PTHREAD pthread_t now = pthread_self(); if (pthread_equal(main_thread_, now)) { #else { #endif Py_Finalize(); } #if linux system("stty sane"); #endif } static char* env[] = {0}; #if defined(__MINGW32__) // The problem is that the hoc.dll name is the same for python2 and 3. // The work around is to name them hoc27.dll and hoc36.dll when manually // created by nrncygso.sh and use if version clauses in the neuron // module to import the correct one as hoc. Generalizable in the // future to 27, 34, 35, 36 with try except clauses. // It seems that since these dlls refer to python3x.dll explicitly, // it is not possible for different minor versions of python3x to share // hoc module dlls. // It is conceivable that this strategy will work for linux and mac as well, // but for now setup.py names them differently anyway. #if PY_MAJOR_VERSION >= 3 PyObject* HOCMOD(PyInit_hoc, NRNPYTHON_DYNAMICLOAD)() { #else //!PY_MAJOR_VERSION >= 3 void HOCMOD(inithoc, NRNPYTHON_DYNAMICLOAD)() { #endif //!PY_MAJOR_VERSION >= 3 #else // ! defined __MINGW32__ #if PY_MAJOR_VERSION >= 3 PyObject* PyInit_hoc() { #else //!PY_MAJOR_VERSION >= 3 void inithoc() { #endif //!PY_MAJOR_VERSION >= 3 #endif // ! defined __MINGW32__ char buf[200]; int argc = argc_nompi; char** argv = (char**)argv_nompi; #if USE_PTHREAD main_thread_ = pthread_self(); #endif if (nrn_global_argv) { // ivocmain was already called so already loaded #if PY_MAJOR_VERSION >= 3 return nrnpy_hoc(); #else //!PY_MAJOR_VERSION >= 3 nrnpy_hoc(); return; #endif //!PY_MAJOR_VERSION >= 3 } #ifdef NRNMPI int flag = 0; int mpi_mes = 0; // for printing an mpi message only once. char* pmes = 0; #if NRNMPI_DYNAMICLOAD nrnmpi_stubs(); // if nrnmpi_load succeeds (MPI available), pmes is nil. pmes = nrnmpi_load(1); #endif //NRNMPI_DYNAMICLOAD // avoid having to include the c++ version of mpi.h if (!pmes) { nrnmpi_wrap_mpi_init(&flag); } // MPI_Initialized(&flag); if (flag) { mpi_mes = 1; argc = argc_mpi; argv = (char**)argv_mpi; } else if (getenv("NEURON_INIT_MPI")) { // force NEURON to initialize MPI mpi_mes = 2; if (pmes) { printf( "NEURON_INIT_MPI exists in env but NEURON cannot initialize MPI " "because:\n%s\n", pmes); exit(1); } else { argc = argc_mpi; argv = (char**)argv_mpi; } } else { mpi_mes = 3; } assert(mpi_mes != -1); // avoid unused variable warning #endif //NRNMPI #if !defined(__CYGWIN__) sprintf(buf, "%s/.libs/libnrnmech.so", NRNHOSTCPU); // printf("buf = |%s|\n", buf); FILE* f; if ((f = fopen(buf, "r")) != 0) { fclose(f); argc += 2; argv[argc - 1] = new char[strlen(buf) + 1]; strcpy(argv[argc - 1], buf); } #endif // !defined(__CYGWIN__) nrn_is_python_extension = 1; const char* pyver = Py_GetVersion(); nrn_is_python_extension = (pyver[0]-'0')*10 + (pyver[2] - '0'); p_nrnpython_finalize = nrnpython_finalize; #if NRNMPI nrnmpi_init(1, &argc, &argv); // may change argc and argv #if 0 && !defined(NRNMPI_DYNAMICLOAD) if (nrnmpi_myid == 0) { switch(mpi_mes) { case 0: break; case 1: printf("MPI_Initialized==true, MPI functionality enabled by Python.\n"); break; case 2: printf("MPI functionality enabled by NEURON.\n"); break; case 3: printf("MPI_Initialized==false, MPI functionality not enabled.\n"); break; } } #endif // 0 && !defined(NRNMPI_DYNAMICLOAD) if (pmes) { free(pmes); } #endif // NRNMPI nrn_main_launch = 2; ivocmain(argc, argv, env); // nrnpy_augment_path(); #if NRNPYTHON_DYNAMICLOAD nrnpy_site_problem = 0; #endif // NRNPYTHON_DYNAMICLOAD #if PY_MAJOR_VERSION >= 3 return nrnpy_hoc(); #else // ! PY_MAJOR_VERSION >= 3 nrnpy_hoc(); #endif // ! PY_MAJOR_VERSION >= 3 } #if !defined(CYGWIN) void modl_reg() {} #endif // !defined(CYGWIN) } neuron-7.5/src/nrnpython/nrnpy_hoc.cpp000066400000000000000000002064341323325274500202430ustar00rootroot00000000000000#include #include #include #include #include #include "ivocvect.h" #include "oclist.h" #include "nrniv_mf.h" #include "nrnpy_utils.h" #include #if defined(__MINGW32__) && NRNPYTHON_DYNAMICLOAD > 0 // want to end up with a string like "hoc36" #define HOCMOD_1(s) HOCMOD_2(s) #define HOCMOD_2(s) #s #define HOCMOD "hoc" HOCMOD_1(NRNPYTHON_DYNAMICLOAD) #else #define HOCMOD hoc #endif extern "C" { #include "parse.h" extern Section* nrn_noerr_access(); extern void hoc_pushs(Symbol*); extern double* hoc_evalpointer(); extern double cable_prop_eval(Symbol* sym); extern void nrn_change_nseg(Section*, int); extern Symlist* hoc_top_level_symlist; extern Symlist* hoc_built_in_symlist; extern Inst* hoc_pc; extern void hoc_push_string(); extern char** hoc_strpop(); extern void hoc_objectvar(); extern Object* hoc_newobj1(Symbol*, int); extern int ivoc_list_count(Object*); extern Object** hoc_objpop(); extern Object* hoc_obj_look_inside_stack(int); extern void hoc_object_component(); extern int nrn_inpython_; extern int hoc_stack_type(); extern void hoc_call(); extern Objectdata* hoc_top_level_data; extern void hoc_tobj_unref(Object**); extern void sec_access_push(); extern PyObject* nrnpy_pushsec(PyObject*); extern bool hoc_valid_stmt(const char*, Object*); myPyMODINIT_FUNC nrnpy_nrn(); extern PyObject* nrnpy_cas(PyObject*, PyObject*); extern PyObject* nrnpy_forall(PyObject*, PyObject*); extern PyObject* nrnpy_newsecobj(PyObject*, PyObject*, PyObject*); extern int section_object_seen; extern Symbol* nrnpy_pyobj_sym_; extern Symbol* nrn_child_sym; extern int nrn_secref_nchild(Section*); extern PyObject* nrnpy_hoc2pyobject(Object*); PyObject* nrnpy_ho2po(Object*); Object* nrnpy_po2ho(PyObject*); extern Object* nrnpy_pyobject_in_obj(PyObject*); static void pyobject_in_objptr(Object**, PyObject*); extern IvocVect* (*nrnpy_vec_from_python_p_)(void*); extern Object** (*nrnpy_vec_to_python_p_)(void*); extern Object** (*nrnpy_vec_as_numpy_helper_)(int, double*); int nrnpy_set_vec_as_numpy(PyObject* (*p)(int, double*)); // called by ctypes. extern double** nrnpy_setpointer_helper(PyObject*, PyObject*); extern Symbol* ivoc_alias_lookup(const char* name, Object* ob); extern int nrn_netcon_weight(void*, double**); extern int nrn_matrix_dim(void*, int); extern PyObject* pmech_types; // Python map for name to Mechanism extern PyObject* rangevars_; // Python map for name to Symbol static cTemplate* hoc_vec_template_; static cTemplate* hoc_list_template_; static cTemplate* hoc_sectionlist_template_; // typestr returned by Vector.__array_interface__ // byteorder (first element) is modified at import time // to reflect the system byteorder // Allocate one extra character space in case we have a two character integer of // bytes per double // i.e. 16 static char array_interface_typestr[5] = "|f8"; // static pointer to neurons.doc.get_docstring function initialized at import // time static PyObject* pfunc_get_docstring = NULL; static const char* hocobj_docstring = "class neuron.hoc.HocObject - Hoc Object wrapper"; #if 1 } #include extern "C" { #else extern Object* hoc_thisobject; #define HocTopContextSet \ if (hoc_thisobject) { \ abort(); \ } \ assert(hoc_thisobject == 0); #define HocContextRestore /**/ #endif /* Because python types have so many methods, attempt to do all set and get using a PyHocObject which has different amounts filled in as the information is gathered with a view toward ultimately making a call to hoc_object_component. That requires that array indices or function arguments are on the stack. The major variant is that we may be at the top level. The function arg case is easy since they all come as a tuple in the call method. The array indices come sequentially with a series of calls to the sequence method. A nice side effect of intermediate objects is the extra efficiency of reuse that avoids symbol lookup. Sadly, the scalar case does not give this since the value is set/get instead of returning the intermediate. */ namespace PyHoc { enum ObjectType { HocTopLevelInterpreter = 0, HocObject = 1, HocFunction = 2, // function or TEMPLATE HocArray = 3, HocRefNum = 4, HocRefStr = 5, HocRefObj = 6, HocForallSectionIterator = 7, HocScalarPtr = 8, HocArrayIncomplete = 9, // incomplete pointer to a hoc array (similar to HocArray) }; } // namespace PyHoc typedef struct { PyObject_HEAD Object* ho_; union { double x_; char* s_; Object* ho_; double* px_; } u; Symbol* sym_; // for functions and arrays void* iteritem_; // enough info to carry out Iterator protocol int nindex_; // number indices seen so far (or narg) int* indices_; // one fewer than nindex_ PyHoc::ObjectType type_; } PyHocObject; static PyTypeObject* hocobject_type; static PyObject* hocobj_call(PyHocObject* self, PyObject* args, PyObject* kwrds); static PyObject* nrnexec(PyObject* self, PyObject* args) { const char* cmd; if (!PyArg_ParseTuple(args, "s", &cmd)) { return NULL; } bool b = hoc_valid_stmt(cmd, 0); return Py_BuildValue("i", b ? 1 : 0); } static PyObject* hoc_ac(PyObject* self, PyObject* args) { PyArg_ParseTuple(args, "|d", &hoc_ac_); return Py_BuildValue("d", hoc_ac_); } static PyMethodDef HocMethods[] = { {"execute", nrnexec, METH_VARARGS, "Execute a hoc command, return 1 on success, 0 on failure."}, {"hoc_ac", hoc_ac, METH_VARARGS, "Get (or set) the scalar hoc_ac_."}, {NULL, NULL, 0, NULL}}; static void hocobj_dealloc(PyHocObject* self) { // printf("hocobj_dealloc %p\n", self); if (self->ho_) { hoc_obj_unref(self->ho_); } if (self->type_ == PyHoc::HocRefStr && self->u.s_) { // delete [] self->u.s_; free(self->u.s_); } if (self->type_ == PyHoc::HocRefObj && self->u.ho_) { hoc_obj_unref(self->u.ho_); } if (self->indices_) { delete[] self->indices_; } ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static PyObject* hocobj_new(PyTypeObject* subtype, PyObject* args, PyObject* kwds) { PyObject* subself; subself = subtype->tp_alloc(subtype, 0); // printf("hocobj_new %s %p\n", subtype->tp_name, subself); if (subself == NULL) { return NULL; } PyHocObject* self = (PyHocObject*)subself; self->ho_ = NULL; self->u.x_ = 0.; self->sym_ = NULL; self->indices_ = NULL; self->nindex_ = 0; self->type_ = PyHoc::HocTopLevelInterpreter; self->iteritem_ = 0; if (kwds && PyDict_Check(kwds)) { PyObject* base = PyDict_GetItemString(kwds, "hocbase"); if (base) { int ok = 0; if (PyObject_TypeCheck(base, hocobject_type)) { PyHocObject* hbase = (PyHocObject*)base; if (hbase->type_ == PyHoc::HocFunction && hbase->sym_->type == TEMPLATE) { // printf("hocobj_new base %s\n", hbase->sym_->name); // remove the hocbase keyword since hocobj_call only allows // the "sec" keyword argument PyDict_DelItemString(kwds, "hocbase"); PyObject* r = hocobj_call(hbase, args, kwds); if (!r) { Py_DECREF(subself); return NULL; } PyHocObject* rh = (PyHocObject*)r; self->type_ = rh->type_; self->ho_ = rh->ho_; hoc_obj_ref(self->ho_); Py_DECREF(r); ok = 1; } } if (!ok) { Py_DECREF(subself); PyErr_SetString(PyExc_TypeError, "HOC base class not valid"); return NULL; } } } return subself; } static int hocobj_init(PyObject* subself, PyObject* args, PyObject* kwds) { // printf("hocobj_init %s %p\n", // ((PyTypeObject*)PyObject_Type(subself))->tp_name, subself); #if 0 if (subself != NULL) { PyHocObject* self = (PyHocObject*)subself; if (self->ho_) { hoc_obj_unref(self->ho_); } self->ho_ = NULL; self->u.x_ = 0.; self->sym_ = NULL; self->indices_ = NULL; self->nindex_ = 0; self->type_ = 0; } #endif return 0; } static void pyobject_in_objptr(Object** op, PyObject* po) { Object* o = nrnpy_pyobject_in_obj(po); if (*op) { hoc_obj_unref(*op); } *op = o; } static PyObject* hocobj_name(PyObject* pself, PyObject* args) { PyHocObject* self = (PyHocObject*)pself; char buf[512], *cp; buf[0] = '\0'; cp = buf; PyObject* po; if (self->type_ == PyHoc::HocObject) { sprintf(cp, "%s", hoc_object_name(self->ho_)); } else if (self->type_ == PyHoc::HocFunction || self->type_ == PyHoc::HocArray) { sprintf(cp, "%s%s%s", self->ho_ ? hoc_object_name(self->ho_) : "", self->ho_ ? "." : "", self->sym_->name); if (self->type_ == PyHoc::HocArray) { for (int i = 0; i < self->nindex_; ++i) { sprintf(cp += strlen(cp), "[%d]", self->indices_[i]); } sprintf(cp += strlen(cp), "[?]"); } else { sprintf(cp += strlen(cp), "()"); } } else if (self->type_ == PyHoc::HocRefNum) { sprintf(cp, "", self->u.x_); } else if (self->type_ == PyHoc::HocRefStr) { sprintf(cp, "", self->u.s_); } else if (self->type_ == PyHoc::HocRefObj) { sprintf(cp, "", hoc_object_name(self->u.ho_)); } else if (self->type_ == PyHoc::HocForallSectionIterator) { sprintf(cp, ""); } else if (self->type_ == PyHoc::HocScalarPtr) { sprintf(cp, "", self->u.px_ ? *self->u.px_ : -1e100); } else if (self->type_ == PyHoc::HocArrayIncomplete) { sprintf(cp, "", self->sym_->name); } else { sprintf(cp, ""); } po = Py_BuildValue("s", buf); return po; } static PyObject* hocobj_repr(PyObject* p) { return hocobj_name(p, NULL); } static Inst* save_pc(Inst* newpc) { Inst* savpc = hoc_pc; hoc_pc = newpc; return savpc; } static int hocobj_pushargs(PyObject* args, std::vector& s2free) { int i, narg = PyTuple_Size(args); for (i = 0; i < narg; ++i) { PyObject* po = PyTuple_GetItem(args, i); // PyObject_Print(po, stdout, 0); // printf(" pushargs %d\n", i); if (nrnpy_numbercheck(po)) { PyObject* pn = PyNumber_Float(po); hoc_pushx(PyFloat_AsDouble(pn)); Py_XDECREF(pn); } else if (is_python_string(po)) { char** ts = hoc_temp_charptr(); Py2NRNString str(po, /* disable_release */ true); *ts = str.c_str(); s2free.push_back(*ts); hoc_pushstr(ts); } else if (PyObject_IsInstance(po, (PyObject*)hocobject_type)) { PyHocObject* pho = (PyHocObject*)po; PyHoc::ObjectType tp = pho->type_; if (tp == PyHoc::HocObject) { hoc_push_object(pho->ho_); } else if (tp == PyHoc::HocRefNum) { hoc_pushpx(&pho->u.x_); } else if (tp == PyHoc::HocRefStr) { hoc_pushstr(&pho->u.s_); } else if (tp == PyHoc::HocRefObj) { hoc_pushobj(&pho->u.ho_); } else if (tp == PyHoc::HocScalarPtr) { hoc_pushpx(pho->u.px_); } else { // make a hoc python object and push that Object* ob = NULL; pyobject_in_objptr(&ob, po); hoc_push_object(ob); hoc_obj_unref(ob); } } else { // make a hoc PythonObject and push that? Object* ob = NULL; if (po != Py_None) { pyobject_in_objptr(&ob, po); } hoc_push_object(ob); hoc_obj_unref(ob); } } return narg; } static void hocobj_pushargs_free_strings(std::vector& s2free) { std::vector::iterator it = s2free.begin(); for (; it != s2free.end(); ++it) { delete *it; } } static Symbol* getsym(char* name, Object* ho, int fail) { Symbol* sym = 0; if (ho) { sym = hoc_table_lookup(name, ho->ctemplate->symtable); if (!sym && strcmp(name, "delay") == 0) { sym = hoc_table_lookup("del", ho->ctemplate->symtable); } else if (!sym && ho->aliases) { sym = ivoc_alias_lookup(name, ho); } } else { sym = hoc_table_lookup(name, hoc_top_level_symlist); if (!sym) { sym = hoc_table_lookup(name, hoc_built_in_symlist); } } if (sym && sym->type == UNDEF) { sym = 0; } if (!sym && fail) { char e[200]; sprintf(e, "'%s' is not a defined hoc variable name.", name); PyErr_SetString(PyExc_LookupError, e); } return sym; } // on entry the stack order is indices, args, object // on exit all that is popped and the result is on the stack static void component(PyHocObject* po) { Inst fc[6]; fc[0].sym = po->sym_; fc[1].i = 0; fc[2].i = 0; fc[5].i = 0; if (po->type_ == PyHoc::HocFunction) { fc[2].i = po->nindex_; fc[5].i = 1; } else if (po->type_ == PyHoc::HocArray || po->type_ == PyHoc::HocArrayIncomplete) { fc[1].i = po->nindex_; } Object* stack_value = hoc_obj_look_inside_stack(po->nindex_); assert(stack_value == po->ho_); fc[3].i = po->ho_->ctemplate->id; fc[4].sym = po->sym_; Inst* pcsav = save_pc(fc); hoc_object_component(); hoc_pc = pcsav; } int nrnpy_numbercheck(PyObject* po) { // PyNumber_Check can return 1 for things that should not reasonably // be cast to float but should stay as python objects. // e.g. numpy.arange(1,5) and 5J // The complexity here is partly due to SAGE having its own // number system, e.g. type(1) is int rval = PyNumber_Check(po); // but do not allow sequences if (rval == 1 && po->ob_type->tp_as_sequence) { rval = 0; } // or things that fail when float(po) fails. ARGGH! This // is a lot more expensive than I would like. if (rval == 1) { PyObject* tmp = PyNumber_Float(po); if (tmp) { Py_DECREF(tmp); } else { PyErr_Clear(); rval = 0; } } return rval; } PyObject* nrnpy_ho2po(Object* o) { // o may be NULLobject, or encapsulate a Python object (via // the PythonObject class in hoc (see Py2Nrn in nrnpy_p2h.cpp), // or be a native hoc class instance such as Graph. // The return value is None, or the encapsulated PyObject or // an encapsulating PyHocObject PyObject* po; if (!o) { po = Py_BuildValue(""); } else if (o->ctemplate->sym == nrnpy_pyobj_sym_) { po = nrnpy_hoc2pyobject(o); Py_INCREF(po); } else { po = hocobj_new(hocobject_type, 0, 0); ((PyHocObject*)po)->ho_ = o; ((PyHocObject*)po)->type_ = PyHoc::HocObject; hoc_obj_ref(o); } return po; } Object* nrnpy_po2ho(PyObject* po) { // po may be None, or encapsulate a hoc object (via the // PyHocObject, or be a native Python instance such as [1,2,3] // The return value is None, or the encapsulated hoc object, // or a hoc object of type PythonObject that encapsulates the // po. Object* o; if (po == Py_None) { o = 0; } else if (PyObject_TypeCheck(po, hocobject_type)) { PyHocObject* pho = (PyHocObject*)po; if (pho->type_ == PyHoc::HocObject) { o = pho->ho_; hoc_obj_ref(o); } else if (pho->type_ == PyHoc::HocRefObj) { o = pho->u.ho_; hoc_obj_ref(o); } else { // all the rest encapsulate o = nrnpy_pyobject_in_obj(po); } } else { // even if Python string or number o = nrnpy_pyobject_in_obj(po); } return o; } PyObject* nrnpy_hoc_pop() { PyObject* result = 0; Object* ho; Object** d; switch (hoc_stack_type()) { case STRING: result = Py_BuildValue("s", *hoc_strpop()); break; case VAR: result = Py_BuildValue("d", *hoc_pxpop()); break; case NUMBER: result = Py_BuildValue("d", hoc_xpop()); break; case OBJECTVAR: case OBJECTTMP: d = hoc_objpop(); ho = *d; // printf("Py2Nrn %p %p\n", ho->ctemplate->sym, nrnpy_pyobj_sym_); result = nrnpy_ho2po(ho); hoc_tobj_unref(d); break; default: printf("nrnpy_hoc_pop error: stack type = %d\n", hoc_stack_type()); } return result; } static int set_final_from_stk(PyObject* po) { int err = 0; switch (hoc_stack_type()) { case STRING: char* s; if (PyArg_Parse(po, "s", &s) == 1) { hoc_assign_str(hoc_strpop(), s); } else { err = 1; } break; case VAR: double x; if (PyArg_Parse(po, "d", &x) == 1) { *(hoc_pxpop()) = x; } else { err = 1; } break; case OBJECTVAR: PyHocObject* pho; if (PyArg_Parse(po, "O!", hocobject_type, &pho) == 1) { Object** pobj = hoc_objpop(); if (pho->sym_) { PyErr_SetString(PyExc_TypeError, "argument cannot be a hoc object intermediate"); return -1; } Object* ob = *pobj; hoc_obj_ref(pho->ho_); hoc_obj_unref(ob); *pobj = pho->ho_; } else { err = 1; } break; default: printf("set_final_from_stk() error: stack type = %d\n", hoc_stack_type()); err = 1; break; } return err; } static void* fcall(void* vself, void* vargs) { PyHocObject* self = (PyHocObject*)vself; if (self->ho_) { hoc_push_object(self->ho_); } std::vector strings_to_free; int narg = hocobj_pushargs((PyObject*)vargs, strings_to_free); if (self->ho_) { self->nindex_ = narg; component(self); hocobj_pushargs_free_strings(strings_to_free); return (void*)nrnpy_hoc_pop(); } if (self->sym_->type == BLTIN) { if (narg != 1) { hoc_execerror("must be one argument for", self->sym_->name); } double d = hoc_call_func(self->sym_, 1); hoc_pushx(d); } else if (self->sym_->type == TEMPLATE) { Object* ho = hoc_newobj1(self->sym_, narg); PyHocObject* result = (PyHocObject*)hocobj_new(hocobject_type, 0, 0); result->ho_ = ho; result->type_ = PyHoc::HocObject; hocobj_pushargs_free_strings(strings_to_free); return result; } else { HocTopContextSet Inst fc[4]; // ugh. so a potential call of hoc_get_last_pointer_symbol will return nil. fc[0].in = STOP; fc[1].sym = self->sym_; fc[2].i = narg; fc[3].in = STOP; Inst* pcsav = save_pc(fc + 1); hoc_call(); hoc_pc = pcsav; HocContextRestore } hocobj_pushargs_free_strings(strings_to_free); return (void*)nrnpy_hoc_pop(); } static PyObject* hocobj_call(PyHocObject* self, PyObject* args, PyObject* kwrds) { PyObject* section = 0; PyObject* result; if (kwrds && PyDict_Check(kwrds)) { #if 0 PyObject* keys = PyDict_Keys(kwrds); assert(PyList_Check(keys)); int n = PyList_Size(keys); for (int i = 0; i < n; ++i) { PyObject* key = PyList_GetItem(keys, i); PyObject* value = PyDict_GetItem(kwrds, key); printf("%s %s\n", PyString_AsString(key), PyString_AsString(PyObject_Str(value))); } #endif section = PyDict_GetItemString(kwrds, "sec"); int num_kwargs = PyDict_Size(kwrds); if (num_kwargs > 1) { PyErr_SetString(PyExc_RuntimeError, "invalid keyword argument"); return NULL; } if (section) { section = nrnpy_pushsec(section); if (!section) { PyErr_SetString(PyExc_TypeError, "sec is not a Section"); return NULL; } } else { if (num_kwargs) { PyErr_SetString(PyExc_RuntimeError, "invalid keyword argument"); return NULL; } } } if (self->type_ == PyHoc::HocTopLevelInterpreter) { result = nrnexec((PyObject*)self, args); } else if (self->type_ == PyHoc::HocFunction) { OcJump* oj; oj = new OcJump(); if (oj) { result = (PyObject*)oj->fpycall(fcall, (void*)self, (void*)args); delete oj; if (result == NULL) { PyErr_SetString(PyExc_RuntimeError, "hoc error"); } } else { result = (PyObject*)fcall((void*)self, (void*)args); } } else { PyErr_SetString(PyExc_TypeError, "object is not callable"); return NULL; } if (section) { nrn_popsec(); } return result; } static Arrayinfo* hocobj_aray(Symbol* sym, Object* ho) { if (!sym->arayinfo) { return 0; } if (ho) { // objectdata or not? int cplus = (ho->ctemplate->sym->subtype & (CPLUSOBJECT | JAVAOBJECT)); if (cplus) { return sym->arayinfo; } else { return ho->u.dataspace[sym->u.oboff + 1].arayinfo; } } else { if (sym->type == VAR && (sym->subtype == USERDOUBLE || sym->subtype == USERINT || sym->subtype == USERFLOAT)) { return sym->arayinfo; } else { return hoc_top_level_data[sym->u.oboff + 1].arayinfo; } } } static PyHocObject* intermediate(PyHocObject* po, Symbol* sym, int ix) { PyHocObject* ponew = (PyHocObject*)hocobj_new(hocobject_type, 0, 0); if (po->ho_) { ponew->ho_ = po->ho_; hoc_obj_ref(po->ho_); } if (ix > -1) { // array, increase dimension by one int j; assert(po->sym_ == sym); assert(po->type_ == PyHoc::HocArray || po->type_ == PyHoc::HocArrayIncomplete); ponew->sym_ = sym; ponew->nindex_ = po->nindex_ + 1; ponew->type_ = po->type_; ponew->indices_ = new int[ponew->nindex_]; for (j = 0; j < po->nindex_; ++j) { ponew->indices_[j] = po->indices_[j]; } ponew->indices_[po->nindex_] = ix; } else { // make it an array (no indices yet) ponew->sym_ = sym; ponew->type_ = PyHoc::HocArray; } return ponew; } // when called, nindex is 1 less than reality static void hocobj_pushtop(PyHocObject* po, Symbol* sym, int ix) { int i; int n = po->nindex_++; // printf("hocobj_pushtop n=%d", po->nindex_); for (i = 0; i < n; ++i) { hoc_pushx((double)po->indices_[i]); // printf(" %d", po->indices_[i]); } hoc_pushx((double)ix); // printf(" %d\n", ix); if (sym) { hoc_pushs(sym); } } static void hocobj_objectvar(Symbol* sym) { Inst fc; fc.sym = sym; Inst* pcsav = save_pc(&fc); hoc_objectvar(); hoc_pc = pcsav; } static PyObject* hocobj_getsec(Symbol* sym) { Inst fc; fc.sym = sym; Inst* pcsav = save_pc(&fc); sec_access_push(); hoc_pc = pcsav; PyObject* result = nrnpy_cas(0, 0); nrn_popsec(); return result; } // leave pointer on stack ready for get/set final static void eval_component(PyHocObject* po, int ix) { int j; hoc_push_object(po->ho_); hocobj_pushtop(po, 0, ix); component(po); --po->nindex_; } PyObject* nrn_hocobj_ptr(double* pd) { PyObject* result = hocobj_new(hocobject_type, 0, 0); PyHocObject* po = (PyHocObject*)result; po->type_ = PyHoc::HocScalarPtr; po->u.px_ = pd; return result; } static void symlist2dict(Symlist* sl, PyObject* dict) { PyObject* nn = Py_BuildValue(""); for (Symbol* s = sl->first; s; s = s->next) { if (s->type == UNDEF) { continue; } if (s->cpublic == 1 || sl == hoc_built_in_symlist || sl == hoc_top_level_symlist) { if (strcmp(s->name, "del") == 0) { PyDict_SetItemString(dict, "delay", nn); } else { PyDict_SetItemString(dict, s->name, nn); } } } Py_DECREF(nn); } static int setup_doc_system() { PyObject* pdoc; if (pfunc_get_docstring) { return 1; } pdoc = PyImport_ImportModule("neuron.doc"); if (pdoc == NULL) { PyErr_SetString(PyExc_ImportError, "Failed to import neuron.doc documentation module."); return 0; } pfunc_get_docstring = PyObject_GetAttrString(pdoc, "get_docstring"); if (pfunc_get_docstring == NULL) { PyErr_SetString( PyExc_AttributeError, "neuron.doc module does not have attribute 'get_docstring'!"); return 0; } return 1; } // TODO: This function needs refactoring; there are too many exit points static PyObject* hocobj_getattr(PyObject* subself, PyObject* pyname) { PyHocObject* self = (PyHocObject*)subself; if (self->type_ == PyHoc::HocObject && !self->ho_) { PyErr_SetString(PyExc_TypeError, "not a compound type"); return NULL; } PyObject* result = NULL; int isptr = 0; Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); return NULL; } // printf("hocobj_getattr %s\n", n); Symbol* sym = getsym(n, self->ho_, 0); if (!sym) { if (self->type_ == PyHoc::HocObject && self->ho_->ctemplate->sym == nrnpy_pyobj_sym_) { PyObject* p = nrnpy_hoc2pyobject(self->ho_); return PyObject_GenericGetAttr(p, pyname); } if (strcmp(n, "__dict__") == 0) { // all the public names Symlist* sl = 0; if (self->ho_) { sl = self->ho_->ctemplate->symtable; } else if (self->sym_ && self->sym_->type == TEMPLATE) { sl = self->sym_->u.ctemplate->symtable; } PyObject* dict = PyDict_New(); if (sl) { symlist2dict(sl, dict); } else { symlist2dict(hoc_built_in_symlist, dict); symlist2dict(hoc_top_level_symlist, dict); } // Is the self->ho_ a Vector? If so, add the __array_interface__ symbol if (is_obj_type(self->ho_, "Vector")) { PyDict_SetItemString(dict, "__array_interface__", Py_None); } return dict; } else if (strncmp(n, "_ref_", 5) == 0) { if (self->type_ > PyHoc::HocObject) { PyErr_SetString(PyExc_TypeError, "not a HocTopLevelInterpreter or HocObject"); return NULL; } sym = getsym(n + 5, self->ho_, 0); if (!sym) { return PyObject_GenericGetAttr((PyObject*)subself, pyname); } if (sym->type != VAR && sym->type != RANGEVAR && sym->type != VARALIAS) { char buf[200]; sprintf(buf, "Hoc pointer error, %s is not a hoc variable or range variable", sym->name); PyErr_SetString(PyExc_TypeError, buf); return NULL; } isptr = 1; } else if (is_obj_type(self->ho_, "Vector") && strcmp(n, "__array_interface__") == 0) { // return __array_interface__ // printf("building array interface\n"); Vect* v = (Vect*)self->ho_->u.this_pointer; int size = v->capacity(); double* x = vector_vec(v); return Py_BuildValue("{s:(i),s:s,s:i,s:(N,O)}", "shape", size, "typestr", array_interface_typestr, "version", 3, "data", PyLong_FromVoidPtr(x), Py_True); } else if (strcmp(n, "__doc__") == 0) { if (setup_doc_system()) { PyObject* docobj = NULL; if (self->ho_) { docobj = Py_BuildValue("s s", self->ho_->ctemplate->sym->name, self->sym_ ? self->sym_->name : ""); } else if (self->sym_) { // Symbol docobj = Py_BuildValue("s s", "", self->sym_->name); } else { // Base HocObject docobj = Py_BuildValue("s s", "", ""); } result = PyObject_CallObject(pfunc_get_docstring, docobj); Py_DECREF(docobj); return result; } else { return NULL; } } else if (self->type_ == PyHoc::HocTopLevelInterpreter && strncmp(n, "__nrnsec_0x", 11) == 0) { Section* sec = (Section*)hoc_sec_internal_name2ptr(n, 0); if (sec == NULL) { PyErr_SetString(PyExc_NameError, n); } else if (sec && sec->prop && sec->prop->dparam[PROP_PY_INDEX]._pvoid) { result = (PyObject*)sec->prop->dparam[PROP_PY_INDEX]._pvoid; Py_INCREF(result); } else { nrn_pushsec(sec); result = nrnpy_cas(NULL, NULL); nrn_popsec(); } return result; } else { // ipython wants to know if there is a __getitem__ // even though it does not use it. return PyObject_GenericGetAttr((PyObject*)subself, pyname); } } // printf("%s type=%d nindex=%d %s\n", self->sym_?self->sym_->name:"noname", // self->type_, self->nindex_, sym->name); // no hoc component for a hoc function // ie the sym has to be a component for the object returned by the function if (self->type_ == PyHoc::HocFunction) { PyErr_SetString( PyExc_TypeError, "No hoc method for a callable. Missing parentheses before the '.'?"); return NULL; } if (self->type_ == PyHoc::HocArray) { PyErr_SetString(PyExc_TypeError, "Missing array index"); return NULL; } if (self->ho_) { // use the component fork. result = hocobj_new(hocobject_type, 0, 0); PyHocObject* po = (PyHocObject*)result; po->ho_ = self->ho_; hoc_obj_ref(po->ho_); po->sym_ = sym; // evaluation deferred unless VAR,STRING,OBJECTVAR and not // an array int t = sym->type; if (t == VAR || t == STRING || t == OBJECTVAR || t == RANGEVAR || t == SECTION || t == SECTIONREF || t == VARALIAS || t == OBJECTALIAS) { if (sym != nrn_child_sym && !ISARRAY(sym)) { hoc_push_object(po->ho_); nrn_inpython_ = 1; component(po); if (nrn_inpython_ == 2) { // error in component nrn_inpython_ = 0; PyErr_SetString(PyExc_TypeError, "No value"); return NULL; } nrn_inpython_ = 0; Py_DECREF(po); if (t == SECTION || t == SECTIONREF) { section_object_seen = 0; result = nrnpy_cas(0, 0); nrn_popsec(); return result; } else { if (isptr) { return nrn_hocobj_ptr(hoc_pxpop()); } else { return nrnpy_hoc_pop(); } } } else { if (isptr) { po->type_ = PyHoc::HocArrayIncomplete; } else { po->type_ = PyHoc::HocArray; } return result; } } else { po->type_ = PyHoc::HocFunction; return result; } } // top level interpreter fork HocTopContextSet switch (sym->type) { case VAR: // double* if (!ISARRAY(sym)) { if (sym->subtype == USERINT) { result = Py_BuildValue("i", *(sym->u.pvalint)); break; } if (sym->subtype == USERPROPERTY) { if (!nrn_noerr_access()) { PyErr_SetString(PyExc_TypeError, "Section access unspecified"); break; } if (!isptr) { if (sym->u.rng.type == CABLESECTION) { result = Py_BuildValue("d", cable_prop_eval(sym)); }else{ result = Py_BuildValue("i", int(cable_prop_eval(sym))); } break; }else if (sym->u.rng.type != CABLESECTION) { PyErr_SetString(PyExc_TypeError, "Cannot be a reference"); break; } } hoc_pushs(sym); hoc_evalpointer(); if (isptr) { result = nrn_hocobj_ptr(hoc_pxpop()); } else { result = Py_BuildValue("d", *hoc_pxpop()); } } else { result = (PyObject*)intermediate(self, sym, -1); if (isptr) { ((PyHocObject*)result)->type_ = PyHoc::HocArrayIncomplete; } else { } } break; case STRING: // char* { Inst fc, *pcsav; fc.sym = sym; pcsav = save_pc(&fc); hoc_push_string(); hoc_pc = pcsav; result = Py_BuildValue("s", *hoc_strpop()); } break; case OBJECTVAR: // Object* if (!ISARRAY(sym)) { Inst fc, *pcsav; fc.sym = sym; pcsav = save_pc(&fc); hoc_objectvar(); hoc_pc = pcsav; Object* ho = *hoc_objpop(); result = nrnpy_ho2po(ho); } else { result = (PyObject*)intermediate(self, sym, -1); } break; case SECTION: if (!ISARRAY(sym)) { result = hocobj_getsec(sym); } else { result = (PyObject*)intermediate(self, sym, -1); } break; case PROCEDURE: case FUNCTION: case FUN_BLTIN: case BLTIN: case HOCOBJFUNCTION: case STRINGFUNC: case TEMPLATE: case OBJECTFUNC: { result = hocobj_new(hocobject_type, 0, 0); PyHocObject* po = (PyHocObject*)result; if (self->ho_) { po->ho_ = self->ho_; hoc_obj_ref(po->ho_); } po->type_ = PyHoc::HocFunction; po->sym_ = sym; // printf("function %s\n", po->sym_->name); break; } case SETPOINTERKEYWORD: result = PyObject_GenericGetAttr((PyObject*)subself, pyname); break; default: // otherwise { if (PyDict_GetItemString(pmech_types, n)) { PyErr_Format(PyExc_TypeError, "Cannot access %s directly; it is a mechanism that may be inserted into a section.", n); } else if (PyDict_GetItemString(rangevars_, n)) { PyErr_Format(PyExc_TypeError, "Cannot access %s directly; it is a range variable and may be accessed via a section or segment.", n); } else { PyErr_Format(PyExc_TypeError, "Cannot access %s (NEURON type %d) directly.", n, sym->type); break; } } } HocContextRestore return result; } static PyObject* hocobj_baseattr(PyObject* subself, PyObject* args) { PyObject* name; if (!PyArg_ParseTuple(args, "O", &name)) { return NULL; } return hocobj_getattr(subself, name); } static int refuse_to_look; static PyObject* hocobj_getattro(PyObject* subself, PyObject* name) { PyObject* result = 0; if ((PyTypeObject*)PyObject_Type(subself) != hocobject_type) { // printf("try generic %s\n", PyString_AsString(name)); result = PyObject_GenericGetAttr(subself, name); if (result) { // printf("found generic %s\n", PyString_AsString(name)); return result; } else { PyErr_Clear(); } } if (!refuse_to_look) { result = hocobj_getattr(subself, name); } return result; } static int hocobj_setattro(PyObject* subself, PyObject* pyname, PyObject* value) { int err = 0; Inst* pcsav; Inst fc; int issub = ((PyTypeObject*)PyObject_Type(subself) != hocobject_type); if (issub) { // printf("try hasattr %s\n", PyString_AsString(name)); refuse_to_look = 1; if (PyObject_HasAttr(subself, pyname)) { refuse_to_look = 0; // printf("found hasattr for %s\n", PyString_AsString(name)); return PyObject_GenericSetAttr(subself, pyname, value); } refuse_to_look = 0; } PyHocObject* self = (PyHocObject*)subself; PyHocObject* po; if (self->type_ == PyHoc::HocObject && !self->ho_) { return 1; } Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); return -1; } // printf("hocobj_setattro %s\n", n); Symbol* sym = getsym(n, self->ho_, 0); if (!sym) { if (issub) { return PyObject_GenericSetAttr(subself, pyname, value); } else if (!sym && self->type_ == PyHoc::HocObject && self->ho_->ctemplate->sym == nrnpy_pyobj_sym_) { PyObject* p = nrnpy_hoc2pyobject(self->ho_); return PyObject_GenericSetAttr(p, pyname, value); } else { sym = getsym(n, self->ho_, 1); } } if (!sym) { return -1; } if (self->ho_) { // use the component fork. PyObject* result = hocobj_new(hocobject_type, 0, 0); po = (PyHocObject*)result; po->ho_ = self->ho_; hoc_obj_ref(po->ho_); po->sym_ = sym; // evaluation deferred unless VAR,STRING,OBJECTVAR and not // an array int t = sym->type; if (t == VAR || t == STRING || t == OBJECTVAR || t == RANGEVAR || t == VARALIAS || t == OBJECTALIAS) { if (!ISARRAY(sym)) { hoc_push_object(po->ho_); nrn_inpython_ = 1; component(po); if (nrn_inpython_ == 2) { // error in component nrn_inpython_ = 0; PyErr_SetString(PyExc_TypeError, "No value"); return -1; } Py_DECREF(po); return set_final_from_stk(value); } else { char e[200]; sprintf(e, "'%s' requires subscript for assignment", n); PyErr_SetString(PyExc_TypeError, e); return -1; } } else { PyErr_SetString(PyExc_TypeError, "not assignable"); return -1; } } HocTopContextSet switch (sym->type) { case VAR: // double* if (ISARRAY(sym)) { PyErr_SetString(PyExc_TypeError, "wrong number of subscripts"); err = -1; } else { if (sym->subtype == USERINT) { err = PyArg_Parse(value, "i", sym->u.pvalint) == 0; } else if (sym->subtype == USERPROPERTY) { if (!nrn_noerr_access()) { PyErr_SetString(PyExc_TypeError, "Section access unspecified"); err = -1; break; } double x; if (sym->u.rng.type != CABLESECTION) { int i; if (PyArg_Parse(value, "i", &i) != 0 && i > 0 && i <= 32767) { x = double(i); }else{ PyErr_SetString(PyExc_ValueError, "nseg must be an integer in range 1 to 32767"); err = -1; } } else { err = PyArg_Parse(value, "d", &x) == 0; } if (!err) { cable_prop_assign(sym, &x, 0); } } else { hoc_pushs(sym); hoc_evalpointer(); err = PyArg_Parse(value, "d", hoc_pxpop()) == 0; } } break; case STRING: // char* fc.sym = sym; pcsav = save_pc(&fc); hoc_push_string(); hoc_pc = pcsav; char* s; if (PyArg_Parse(value, "s", &s) == 1) { hoc_assign_str(hoc_strpop(), s); } else { err = 1; } break; case OBJECTVAR: // Object* { hocobj_objectvar(sym); Object** op; op = hoc_objpop(); PyObject* po; PyHocObject* pho; if (PyArg_Parse(value, "O", &po) == 1) { if (po == Py_None) { hoc_obj_unref(*op); *op = 0; } else if (PyObject_TypeCheck(po, hocobject_type)) { pho = (PyHocObject*)po; if (pho->sym_) { PyErr_SetString(PyExc_TypeError, "argument cannot be a hoc object intermediate"); err = -1; } else { hoc_obj_ref(pho->ho_); hoc_obj_unref(*op); *op = pho->ho_; } } else { // it is a PythonObject in hoc pyobject_in_objptr(op, po); } } else { err = 1; } break; } default: PyErr_SetString(PyExc_TypeError, "not assignable"); err = -1; break; } HocContextRestore return err; } static Symbol* sym_vec_x; static Symbol* sym_mat_x; static Symbol* sym_netcon_weight; static int araylen(Arrayinfo* a, PyHocObject* po) { assert(a->nsub > po->nindex_); int n = 0; // Hoc Vector and Matrix are special cases because the sub[] // do not get filled in til just before hoc_araypt is called. // at least check the vector if (po->sym_ == sym_vec_x) { n = vector_capacity((IvocVect*)po->ho_->u.this_pointer); } else if (po->sym_ == sym_netcon_weight) { double* w; n = nrn_netcon_weight(po->ho_->u.this_pointer, &w); } else if (po->sym_ == nrn_child_sym) { n = nrn_secref_nchild((Section*)po->ho_->u.this_pointer); } else if (po->sym_ == sym_mat_x) { n = nrn_matrix_dim(po->ho_->u.this_pointer, po->nindex_); } else { n = a->sub[po->nindex_]; } return n; } static int araychk(Arrayinfo* a, PyHocObject* po, int ix) { int n = araylen(a, po); if (ix < 0 || n <= ix) { // printf("ix=%d nsub=%d nindex=%d sub[nindex]=%d\n", ix, a->nsub, // po->nindex_, a->sub[po->nindex_]); char e[200]; sprintf(e, "%s%s%s", po->ho_ ? hoc_object_name(po->ho_) : "", (po->ho_ && po->sym_) ? "." : "", po->sym_ ? po->sym_->name : ""); PyErr_SetString(PyExc_IndexError, e); return -1; } return 0; } static Py_ssize_t hocobj_len(PyObject* self) { PyHocObject* po = (PyHocObject*)self; if (po->type_ == PyHoc::HocObject) { if (po->ho_->ctemplate == hoc_vec_template_) { return vector_capacity((Vect*)po->ho_->u.this_pointer); } else if (po->ho_->ctemplate == hoc_list_template_) { return ivoc_list_count(po->ho_); } else if (po->ho_->ctemplate == hoc_sectionlist_template_) { PyErr_SetString(PyExc_TypeError, "hoc.SectionList has no len()"); return -1; } } else if (po->type_ == PyHoc::HocArray) { Arrayinfo* a = hocobj_aray(po->sym_, po->ho_); return araylen(a, po); } else if (po->sym_ && po->sym_->type == TEMPLATE) { return po->sym_->u.ctemplate->count; } else if (po->type_ == PyHoc::HocForallSectionIterator) { PyErr_SetString(PyExc_TypeError, "hoc.allsec() has no len()"); return -1; } PyErr_SetString(PyExc_TypeError, "Most HocObject have no len()"); return -1; } static int hocobj_nonzero(PyObject* self) { // printf("hocobj_nonzero\n"); PyHocObject* po = (PyHocObject*)self; int b = 1; if (po->type_ == PyHoc::HocObject) { if (po->ho_->ctemplate == hoc_vec_template_) { b = vector_capacity((Vect*)po->ho_->u.this_pointer) > 0; } else if (po->ho_->ctemplate == hoc_list_template_) { b = ivoc_list_count(po->ho_) > 0; } } else if (po->type_ == PyHoc::HocArray) { Arrayinfo* a = hocobj_aray(po->sym_, po->ho_); b = araylen(a, po) > 0; } else if (po->sym_ && po->sym_->type == TEMPLATE) { b = po->sym_->u.ctemplate->count > 0; } return b; } PyObject* nrnpy_forall(PyObject* self, PyObject* args) { PyObject* po = hocobj_new(hocobject_type, 0, 0); PyHocObject* pho = (PyHocObject*)po; pho->type_ = PyHoc::HocForallSectionIterator; pho->iteritem_ = section_list; return po; } static PyObject* hocobj_iter(PyObject* self) { // printf("hocobj_iter %p\n", self); PyHocObject* po = (PyHocObject*)self; if (po->type_ == PyHoc::HocObject) { if (po->ho_->ctemplate == hoc_vec_template_) { return PySeqIter_New(self); } else if (po->ho_->ctemplate == hoc_list_template_) { return PySeqIter_New(self); } else if (po->ho_->ctemplate == hoc_sectionlist_template_) { po->iteritem_ = ((hoc_Item*)po->ho_->u.this_pointer)->next; Py_INCREF(self); return self; } } else if (po->type_ == PyHoc::HocForallSectionIterator) { po->iteritem_ = section_list->next; Py_INCREF(self); return self; } else if (po->type_ == PyHoc::HocArray) { return PySeqIter_New(self); } else if (po->sym_ && po->sym_->type == TEMPLATE) { po->iteritem_ = po->sym_->u.ctemplate->olist->next; Py_INCREF(self); return self; } PyErr_SetString(PyExc_TypeError, "Not an iterable HocObject"); return NULL; } static PyObject* iternext_sl(PyHocObject* po, hoc_Item* ql) { hoc_Item* q = (hoc_Item*)po->iteritem_; if (q != ql) { if (q->prev != ql) { nrn_popsec(); } for (;;) { // have to watch out for deleted sections. hoc_Item* q1 = q->next; Section* sec = q->element.sec; if (!sec->prop) { // delete from list and go on // to the next. If no more return NULL hoc_l_delete(q); section_unref(sec); q = q1; if (q != ql) { continue; } else { return NULL; } } nrn_pushsec(sec); po->iteritem_ = q1; break; } return nrnpy_cas(NULL, NULL); } else { if (q->prev != ql) { nrn_popsec(); } return NULL; } } static PyObject* hocobj_iternext(PyObject* self) { // printf("hocobj_iternext %p\n", self); PyHocObject* po = (PyHocObject*)self; if (po->type_ == PyHoc::HocObject) { hoc_Item* ql = (hoc_Item*)po->ho_->u.this_pointer; return iternext_sl(po, ql); } else if (po->type_ == PyHoc::HocForallSectionIterator) { hoc_Item* ql = section_list; return iternext_sl(po, ql); } else if (po->sym_->type == TEMPLATE) { hoc_Item* q = (hoc_Item*)po->iteritem_; if (q != po->sym_->u.ctemplate->olist) { po->iteritem_ = q->next; return nrnpy_ho2po(OBJ(q)); } } return NULL; } /* Had better be an array. But the same ambiguity as with getattro in that we may return the final value or an intermediate (in the case where there is more than one dimension.) At least for now we only have to handle the OBJECTVAR and VAR case as a component and at the top level. */ static PyObject* hocobj_getitem(PyObject* self, Py_ssize_t ix) { PyObject* result = NULL; PyHocObject* po = (PyHocObject*)self; if (po->type_ > PyHoc::HocArray && po->type_ != PyHoc::HocArrayIncomplete) { if (ix != 0 && po->type_ != PyHoc::HocScalarPtr) { PyErr_SetString(PyExc_IndexError, "index for hoc ref must be 0"); return NULL; } if (po->type_ == PyHoc::HocScalarPtr) { result = Py_BuildValue("d", po->u.px_[ix]); } else if (po->type_ == PyHoc::HocRefNum) { result = Py_BuildValue("d", po->u.x_); } else if (po->type_ == PyHoc::HocRefStr) { result = Py_BuildValue("s", po->u.s_); } else { result = nrnpy_ho2po(po->u.ho_); } return result; } if (po->type_ == PyHoc::HocObject) { // might be in an iterator context if (po->ho_->ctemplate == hoc_vec_template_) { Vect* hv = (Vect*)po->ho_->u.this_pointer; if (ix < 0 || ix >= vector_capacity(hv)) { char e[200]; sprintf(e, "%s", hoc_object_name(po->ho_)); PyErr_SetString(PyExc_IndexError, e); return NULL; } else { return PyFloat_FromDouble(vector_vec(hv)[ix]); } } else if (po->ho_->ctemplate == hoc_list_template_) { OcList* hl = (OcList*)po->ho_->u.this_pointer; if (ix < 0 || ix >= hl->count()) { char e[200]; sprintf(e, "%s", hoc_object_name(po->ho_)); PyErr_SetString(PyExc_IndexError, e); return NULL; } else { return nrnpy_ho2po(hl->object(ix)); } } else { PyErr_SetString(PyExc_TypeError, "unsubscriptable object"); return NULL; } } if (!po->sym_) { // printf("unsubscriptable %s %d type=%d\n", hoc_object_name(po->ho_), ix, // po->type_); PyErr_SetString(PyExc_TypeError, "unsubscriptable object"); return NULL; } else if (po->sym_->type == TEMPLATE) { hoc_Item* q, * ql = po->sym_->u.ctemplate->olist; Object* ob; ITERATE(q, ql) { ob = OBJ(q); if (ob->index == ix) { return nrnpy_ho2po(ob); } } char e[200]; sprintf(e, "%s[%ld] instance does not exist", po->sym_->name, ix); PyErr_SetString(PyExc_IndexError, e); return NULL; } if (po->type_ != PyHoc::HocArray && po->type_ != PyHoc::HocArrayIncomplete) { char e[200]; sprintf(e, "unsubscriptable object, type %d\n", po->type_); PyErr_SetString(PyExc_TypeError, e); return NULL; } Arrayinfo* a = hocobj_aray(po->sym_, po->ho_); if (araychk(a, po, ix)) { return NULL; } if (a->nsub - 1 > po->nindex_) { // another intermediate PyHocObject* ponew = intermediate(po, po->sym_, ix); result = (PyObject*)ponew; } else { // ready to evaluate if (po->ho_) { eval_component(po, ix); if (po->sym_->type == SECTION || po->sym_->type == SECTIONREF) { section_object_seen = 0; result = nrnpy_cas(0, 0); nrn_popsec(); return result; } else { if (po->type_ == PyHoc::HocArrayIncomplete) { result = nrn_hocobj_ptr(hoc_pxpop()); } else { result = nrnpy_hoc_pop(); } } } else { // must be a top level intermediate HocTopContextSet switch (po->sym_->type) { case VAR: hocobj_pushtop(po, po->sym_, ix); hoc_evalpointer(); --po->nindex_; if (po->type_ == PyHoc::HocArrayIncomplete) { assert(!po->u.px_); result = nrn_hocobj_ptr(hoc_pxpop()); } else { result = Py_BuildValue("d", *hoc_pxpop()); } break; case OBJECTVAR: hocobj_pushtop(po, 0, ix); hocobj_objectvar(po->sym_); --po->nindex_; result = nrnpy_ho2po(*hoc_objpop()); break; case SECTION: hocobj_pushtop(po, 0, ix); result = hocobj_getsec(po->sym_); --po->nindex_; break; } HocContextRestore } } return result; } static int hocobj_setitem(PyObject* self, Py_ssize_t i, PyObject* arg) { // printf("hocobj_setitem %d\n", i); int err = -1; PyHocObject* po = (PyHocObject*)self; if (po->type_ > PyHoc::HocArray) { if (po->type_ == PyHoc::HocArrayIncomplete) { PyErr_SetString(PyExc_TypeError, "incomplete hoc pointer"); return -1; } if (i != 0 && po->type_ != PyHoc::HocScalarPtr) { PyErr_SetString(PyExc_IndexError, "index for hoc ref must be 0"); return -1; } if (po->type_ == PyHoc::HocScalarPtr) { PyArg_Parse(arg, "d", po->u.px_ + i); } else if (po->type_ == PyHoc::HocRefNum) { PyArg_Parse(arg, "d", &po->u.x_); } else if (po->type_ == PyHoc::HocRefStr) { char* ts; PyArg_Parse(arg, "s", &ts); hoc_assign_str(&po->u.s_, ts); } else { PyObject* tp; PyArg_Parse(arg, "O", &tp); po->u.ho_ = nrnpy_po2ho(tp); } return 0; } if (!po->sym_ || po->type_ != PyHoc::HocArray) { PyErr_SetString(PyExc_TypeError, "unsubscriptable object"); return -1; } Arrayinfo* a = hocobj_aray(po->sym_, po->ho_); if (a->nsub - 1 != po->nindex_) { PyErr_SetString(PyExc_TypeError, "wrong number of subscripts"); return -1; } if (araychk(a, po, i)) { return -1; } if (po->ho_) { if (po->sym_->type == SECTION) { PyErr_SetString(PyExc_TypeError, "not assignable"); } else { eval_component(po, i); err = set_final_from_stk(arg); } } else { // must be a top level intermediate HocTopContextSet switch (po->sym_->type) { case VAR: hocobj_pushtop(po, po->sym_, i); hoc_evalpointer(); --po->nindex_; err = PyArg_Parse(arg, "d", hoc_pxpop()) != 1; break; case OBJECTVAR: { hocobj_pushtop(po, 0, i); hocobj_objectvar(po->sym_); --po->nindex_; Object** op; op = hoc_objpop(); PyObject* pyo; if (PyArg_Parse(arg, "O", &pyo) == 1) { Object* ho = nrnpy_po2ho(pyo); hoc_obj_unref(*op); *op = ho; err = 0; } else { err = 1; } break; } default: PyErr_SetString(PyExc_TypeError, "not assignable"); break; } HocContextRestore } return err; } static PyObject* mkref(PyObject* self, PyObject* args) { PyObject* pa; PyHocObject* result; if (PyArg_ParseTuple(args, "O", &pa) == 1) { result = (PyHocObject*)hocobj_new(hocobject_type, 0, 0); if (nrnpy_numbercheck(pa)) { result->type_ = PyHoc::HocRefNum; PyObject* pn = PyNumber_Float(pa); result->u.x_ = PyFloat_AsDouble(pn); Py_XDECREF(pn); } else if (is_python_string(pa)) { result->type_ = PyHoc::HocRefStr; result->u.s_ = 0; Py2NRNString str(pa); char* cpa = str.c_str(); hoc_assign_str(&result->u.s_, cpa); } else { result->type_ = PyHoc::HocRefObj; result->u.ho_ = nrnpy_po2ho(pa); } return (PyObject*)result; } PyErr_SetString(PyExc_TypeError, "single arg must be number, string, or Object"); return NULL; } static PyObject* setpointer(PyObject* self, PyObject* args) { PyObject* ref, *name, *pp, * result = NULL; if (PyArg_ParseTuple(args, "O!OO", hocobject_type, &ref, &name, &pp) == 1) { PyHocObject* href = (PyHocObject*)ref; double** ppd = 0; if (href->type_ != PyHoc::HocScalarPtr) { goto done; } if (PyObject_TypeCheck(pp, hocobject_type)) { PyHocObject* hpp = (PyHocObject*)pp; if (hpp->type_ != PyHoc::HocObject) { goto done; } Py2NRNString str(name); char* n = str.c_str(); if (!n) { goto done; } Symbol* sym = getsym(n, hpp->ho_, 0); if (!sym || sym->type != RANGEVAR || sym->subtype != NRNPOINTER) { goto done; } ppd = &ob2pntproc(hpp->ho_)->prop->dparam[sym->u.rng.index].pval; } else { ppd = nrnpy_setpointer_helper(name, pp); if (!ppd) { goto done; } } *ppd = href->u.px_; result = Py_None; Py_INCREF(result); } done: if (!result) { PyErr_SetString(PyExc_TypeError, "setpointer(_ref_hocvar, 'POINTER_name', point_process or " "nrn.Mechanism))"); } return result; } static PyObject* hocobj_vptr(PyObject* pself, PyObject* args) { Object* ho = ((PyHocObject*)pself)->ho_; PyObject* po = NULL; if (ho) { po = Py_BuildValue("O", PyLong_FromVoidPtr(ho)); } if (!po) { PyErr_SetString(PyExc_TypeError, "HocObject does not wrap a Hoc Object"); } return po; } static long hocobj_hash(PyHocObject* self) { return castptr2long self->ho_; } PyObject* nrn_ptr_richcmp(void* self_ptr, void* other_ptr, int op) { bool result = false; switch (op) { case Py_LT: result = self_ptr < other_ptr; break; case Py_LE: result = self_ptr <= other_ptr; break; case Py_EQ: result = self_ptr == other_ptr; break; case Py_NE: result = self_ptr != other_ptr; break; case Py_GT: result = self_ptr > other_ptr; break; case Py_GE: result = self_ptr >= other_ptr; break; } if (result) { Py_RETURN_TRUE; } Py_RETURN_FALSE; } // TODO: unfortunately, this duplicates code from hocobj_same; consolidate? static PyObject* hocobj_richcmp(PyHocObject* self, PyObject* other, int op) { void* self_ptr = (void*)(self->ho_); void* other_ptr = (void*)other; if (PyObject_TypeCheck(other, hocobject_type)) { other_ptr = (void*)(((PyHocObject*)other)->ho_); } return nrn_ptr_richcmp(self_ptr, other_ptr, op); } static PyObject* hocobj_same(PyHocObject* pself, PyObject* args) { PyObject* po; if (PyArg_ParseTuple(args, "O", &po)) { if (PyObject_TypeCheck(po, hocobject_type)) { if (((PyHocObject*)po)->ho_ == pself->ho_) { Py_RETURN_TRUE; } } Py_RETURN_FALSE; } return NULL; } static char* double_array_interface(PyObject* po, long& stride) { void* data = 0; PyObject* pstride; PyObject* psize; if (PyObject_HasAttrString(po, "__array_interface__")) { PyObject* ai = PyObject_GetAttrString(po, "__array_interface__"); Py2NRNString typestr(PyDict_GetItemString(ai, "typestr")); if (strcmp(typestr.c_str(), array_interface_typestr) == 0) { data = PyLong_AsVoidPtr( PyTuple_GetItem(PyDict_GetItemString(ai, "data"), 0)); // printf("double_array_interface idata = %ld\n", idata); if (PyErr_Occurred()) { data = 0; } pstride = PyDict_GetItemString(ai, "strides"); if (pstride == Py_None) { stride = 8; } else if (PyTuple_Check(pstride)) { if (PyTuple_Size(pstride) == 1) { psize = PyTuple_GetItem(pstride, 0); if (PyLong_Check(psize)) { stride = PyLong_AsLong(psize); } else if (PyInt_Check(psize)) { stride = PyInt_AS_LONG(psize); } else { PyErr_SetString(PyExc_TypeError, "array_interface stride element of invalid type."); data = 0; } } else data = 0; // don't handle >1 dimensions } else { PyErr_SetString(PyExc_TypeError, "array_interface stride object of invalid type."); data = 0; } } Py_DECREF(ai); } return (char*)data; } static IvocVect* nrnpy_vec_from_python(void* v) { Vect* hv = (Vect*)v; // printf("%s.from_array\n", hoc_object_name(hv->obj_)); Object* ho = *hoc_objgetarg(1); if (ho->ctemplate->sym != nrnpy_pyobj_sym_) { hoc_execerror(hoc_object_name(ho), " is not a PythonObject"); } PyObject* po = nrnpy_hoc2pyobject(ho); Py_INCREF(po); if (!PySequence_Check(po)) { if (!PyIter_Check(po)) { hoc_execerror( hoc_object_name(ho), " does not support the Python Sequence or Iterator protocol"); } PyObject* iterator = PyObject_GetIter(po); assert(iterator != NULL); int i = 0; PyObject* p; while ((p = PyIter_Next(iterator)) != NULL) { if (!PyNumber_Check(p)) { char buf[50]; sprintf(buf, "item %d not a number", i); hoc_execerror(buf, 0); } hv->resize_chunk(i + 1); hv->elem(i++) = PyFloat_AsDouble(p); Py_DECREF(p); } Py_DECREF(iterator); } else { int size = PySequence_Size(po); // printf("size = %d\n", size); hv->resize(size); double* x = vector_vec(hv); long stride; char* y = double_array_interface(po, stride); if (y) { for (int i = 0, j = 0; i < size; ++i, j += stride) { x[i] = *(double*)(y + j); } } else { for (int i = 0; i < size; ++i) { PyObject* p = PySequence_GetItem(po, i); if (!PyNumber_Check(p)) { char buf[50]; sprintf(buf, "item %d not a number", i); hoc_execerror(buf, 0); } x[i] = PyFloat_AsDouble(p); Py_DECREF(p); } } } Py_DECREF(po); return hv; } static PyObject* (*vec_as_numpy)(int, double*); int nrnpy_set_vec_as_numpy(PyObject* (*p)(int, double*)) { vec_as_numpy = p; return 0; } static Object** vec_as_numpy_helper(int size, double* data) { if (vec_as_numpy) { PyObject* po = (*vec_as_numpy)(size, data); if (po != Py_None) { Object* ho = nrnpy_po2ho(po); Py_DECREF(po); --ho->refcount; return hoc_temp_objptr(ho); } } hoc_execerror("Vector.as_numpy() error", 0); return NULL; } static Object** nrnpy_vec_to_python(void* v) { Vect* hv = (Vect*)v; int size = hv->capacity(); double* x = vector_vec(hv); // printf("%s.to_array\n", hoc_object_name(hv->obj_)); PyObject* po; Object* ho = 0; // as_numpy_array=True is the case where this function is being called by the // ivocvect __array__ member // as such perhaps we should check here that no arguments were passed // although this should be the case unless the function is erroneously called // by the user. if (ifarg(1)) { ho = *hoc_objgetarg(1); if (ho->ctemplate->sym != nrnpy_pyobj_sym_) { hoc_execerror(hoc_object_name(ho), " is not a PythonObject"); } po = nrnpy_hoc2pyobject(ho); if (!PySequence_Check(po)) { hoc_execerror(hoc_object_name(ho), " is not a Python Sequence"); } if (size != PySequence_Size(po)) { hoc_execerror(hoc_object_name(ho), "Python Sequence not same size as Vector"); } } else { if ((po = PyList_New(size)) == NULL) { hoc_execerror("Could not create new Python List with correct size.", 0); } ho = nrnpy_po2ho(po); Py_DECREF(po); --ho->refcount; } // printf("size = %d\n", size); long stride; char* y = double_array_interface(po, stride); if (y) { for (int i = 0, j = 0; i < size; ++i, j += stride) { *(double*)(y + j) = x[i]; } } else if (PyList_Check(po)) { // PySequence_SetItem does DECREF of old items for (int i = 0; i < size; ++i) { PyObject* pn = PyFloat_FromDouble(x[i]); if (!pn || PyList_SetItem(po, i, pn) == -1) { char buf[50]; sprintf(buf, "%d of %d", i, size); hoc_execerror("Could not set a Python Sequence item", buf); } } } else { // assume PySequence_SetItem works for (int i = 0; i < size; ++i) { PyObject* pn = PyFloat_FromDouble(x[i]); if (!pn || PySequence_SetItem(po, i, pn) == -1) { char buf[50]; sprintf(buf, "%d of %d", i, size); hoc_execerror("Could not set a Python Sequence item", buf); } Py_DECREF(pn); } } return hoc_temp_objptr(ho); } // poorly follows __reduce__ and __setstate__ // from numpy/core/src/multiarray/methods.c static PyObject* hocpickle_reduce(PyObject* self, PyObject* args) { // printf("hocpickle_reduce\n"); PyHocObject* pho = (PyHocObject*)self; if (!is_obj_type(pho->ho_, "Vector")) { PyErr_SetString(PyExc_TypeError, "HocObject: Only Vector instance can be pickled"); return NULL; } Vect* vec = (Vect*)pho->ho_->u.this_pointer; // neuron module has a _pkl method that returns h.Vector(0) PyObject* mod = PyImport_ImportModule("neuron"); if (mod == NULL) { return NULL; } PyObject* obj = PyObject_GetAttrString(mod, "_pkl"); Py_DECREF(mod); if (obj == NULL) { PyErr_SetString(PyExc_Exception, "neuron module has no _pkl method."); return NULL; } PyObject* ret = PyTuple_New(3); if (ret == NULL) { return NULL; } PyTuple_SET_ITEM(ret, 0, obj); PyTuple_SET_ITEM(ret, 1, Py_BuildValue("(N)", PyInt_FromLong(0))); // see numpy implementation if more ret[1] stuff needed in case we // pickle anything but a hoc Vector. I don't think ret[1] can be None. // Fill object's state. Tuple with 4 args: // pickle version, 2.0 bytes to determine if swapbytes needed, // vector size, string data PyObject* state = PyTuple_New(4); if (state == NULL) { Py_DECREF(ret); return NULL; } PyTuple_SET_ITEM(state, 0, PyInt_FromLong(1)); double x = 2.0; PyObject* str = PyBytes_FromStringAndSize((const char*)(&x), sizeof(double)); if (str == NULL) { Py_DECREF(ret); Py_DECREF(state); return NULL; } PyTuple_SET_ITEM(state, 1, str); PyTuple_SET_ITEM(state, 2, PyInt_FromLong(vec->capacity())); str = PyBytes_FromStringAndSize((const char*)vector_vec(vec), vec->capacity() * sizeof(double)); if (str == NULL) { Py_DECREF(ret); Py_DECREF(state); return NULL; } PyTuple_SET_ITEM(state, 3, str); PyTuple_SET_ITEM(ret, 2, state); return ret; } // following copied (except for nrn_need_byteswap line) from NEURON ivocvect.cpp #define BYTEHEADER \ uint32_t _II__; \ char* _IN__; \ char _OUT__[16]; \ int BYTESWAP_FLAG = 0; #define BYTESWAP(_X__, _TYPE__) \ if (BYTESWAP_FLAG == 1) { \ _IN__ = (char*)&(_X__); \ for (_II__ = 0; _II__ < sizeof(_TYPE__); _II__++) { \ _OUT__[_II__] = _IN__[sizeof(_TYPE__) - _II__ - 1]; \ } \ (_X__) = *((_TYPE__*)&_OUT__); \ } static PyObject* hocpickle_setstate(PyObject* self, PyObject* args) { BYTEHEADER int version = -1; int size = -1; PyObject* rawdata = NULL; PyObject* endian_data; PyHocObject* pho = (PyHocObject*)self; // printf("hocpickle_setstate %s\n", hoc_object_name(pho->ho_)); Vect* vec = (Vect*)pho->ho_->u.this_pointer; if (!PyArg_ParseTuple(args, "(iOiO)", &version, &endian_data, &size, &rawdata)) { return NULL; } Py_INCREF(endian_data); Py_INCREF(rawdata); // printf("hocpickle version=%d size=%d\n", version, size); vector_resize(vec, size); if (!PyBytes_Check(rawdata) || !PyBytes_Check(endian_data)) { PyErr_SetString(PyExc_TypeError, "pickle not returning string"); Py_DECREF(endian_data); Py_DECREF(rawdata); return NULL; } char* datastr; Py_ssize_t len; if (PyBytes_AsStringAndSize(endian_data, &datastr, &len) < 0) { Py_DECREF(endian_data); Py_DECREF(rawdata); return NULL; } if (len != sizeof(double)) { PyErr_SetString(PyExc_ValueError, "endian_data size is not sizeof(double)"); Py_DECREF(endian_data); Py_DECREF(rawdata); return NULL; } BYTESWAP_FLAG = 0; if (*((double*)datastr) != 2.0) { BYTESWAP_FLAG = 1; } Py_DECREF(endian_data); // printf("byteswap = %d\n", BYTESWAP_FLAG); if (PyBytes_AsStringAndSize(rawdata, &datastr, &len) < 0) { Py_DECREF(rawdata); return NULL; } if (len != size * sizeof(double)) { PyErr_SetString(PyExc_ValueError, "buffer size does not match array size"); Py_DECREF(rawdata); return NULL; } if (BYTESWAP_FLAG) { double* x = (double*)datastr; for (int i = 0; i < size; ++i) { BYTESWAP(x[i], double) } } memcpy((char*)vector_vec(vec), datastr, len); Py_DECREF(rawdata); Py_INCREF(Py_None); return Py_None; } static PyMethodDef hocobj_methods[] = { {"ref", mkref, METH_VARARGS, "Wrap to allow call by reference in a hoc function"}, {"baseattr", hocobj_baseattr, METH_VARARGS, "To allow use of an overrided base method"}, {"cas", nrnpy_cas, METH_VARARGS, "Return the currently accessed section."}, {"allsec", nrnpy_forall, METH_VARARGS, "Return iterator over all sections."}, {"Section", (PyCFunction)nrnpy_newsecobj, METH_VARARGS | METH_KEYWORDS, "Return a new Section"}, {"setpointer", setpointer, METH_VARARGS, "Assign hoc variable address to NMODL POINTER"}, {"hocobjptr", hocobj_vptr, METH_NOARGS, "Hoc Object pointer as a long int"}, {"same", (PyCFunction)hocobj_same, METH_VARARGS, "o1.same(o2) return True if o1 and o2 wrap the same internal HOC Object"}, {"hname", hocobj_name, METH_NOARGS, "More specific than __str__() or __attr__()."}, {"__reduce__", hocpickle_reduce, METH_VARARGS, "pickle interface"}, {"__setstate__", hocpickle_setstate, METH_VARARGS, "pickle interface"}, {NULL, NULL, 0, NULL}}; static PyMemberDef hocobj_members[] = {{NULL, 0, 0, 0, NULL}}; #if (PY_MAJOR_VERSION >= 3) #include "nrnpy_hoc_3.h" #else #include "nrnpy_hoc_2.h" #endif // Figure out the endian-ness of the system, and return // 0 (error), '<' (little endian) or '>' (big endian) char get_endian_character() { char endian_character = 0; PyObject* psys = PyImport_ImportModule("sys"); if (psys == NULL) { PyErr_SetString(PyExc_ImportError, "Failed to import sys to determine system byteorder."); return 0; } PyObject* pbo = PyObject_GetAttrString(psys, "byteorder"); if (pbo == NULL) { PyErr_SetString(PyExc_AttributeError, "sys module does not have attribute 'byteorder'!"); return 0; } Py2NRNString byteorder(pbo); if (byteorder.c_str() == NULL) { return 0; } if (strcmp(byteorder.c_str(), "little") == 0) { endian_character = '<'; } else if (strcmp(byteorder.c_str(), "big") == 0) { endian_character = '>'; } else { PyErr_SetString(PyExc_RuntimeError, "Unknown system native byteorder."); return 0; } return endian_character; } myPyMODINIT_FUNC nrnpy_hoc() { PyObject* m; nrnpy_vec_from_python_p_ = nrnpy_vec_from_python; nrnpy_vec_to_python_p_ = nrnpy_vec_to_python; nrnpy_vec_as_numpy_helper_ = vec_as_numpy_helper; PyLockGIL lock; char endian_character = 0; #if PY_MAJOR_VERSION >= 3 int err = 0; PyObject* modules = PyImport_GetModuleDict(); #if defined(__MINGW32__) if ((m = PyDict_GetItemString(modules, HOCMOD)) != NULL && PyModule_Check(m)) { #else if ((m = PyDict_GetItemString(modules, "hoc")) != NULL && PyModule_Check(m)) { #endif // __MINGW32__ return m; } m = PyModule_Create(&hocmodule); #else // PY_MAJOR_VERSION #if defined(__MINGW32__) m = Py_InitModule3(HOCMOD, HocMethods, "HOC interaction with Python"); #else m = Py_InitModule3("hoc", HocMethods, "HOC interaction with Python"); #endif // __MINGW32__ #endif // PY_MAJOR_VERSION assert(m); Symbol* s = NULL; #if PY_MAJOR_VERSION >= 3 hocobject_type = (PyTypeObject*)PyType_FromSpec(&nrnpy_HocObjectType_spec); #else hocobject_type = &nrnpy_HocObjectType; #endif if (PyType_Ready(hocobject_type) < 0) goto fail; Py_INCREF(hocobject_type); // printf("AddObject HocObject\n"); PyModule_AddObject(m, "HocObject", (PyObject*)hocobject_type); s = hoc_lookup("Vector"); assert(s); hoc_vec_template_ = s->u.ctemplate; sym_vec_x = hoc_table_lookup("x", s->u.ctemplate->symtable); assert(sym_vec_x); s = hoc_lookup("List"); assert(s); hoc_list_template_ = s->u.ctemplate; s = hoc_lookup("SectionList"); assert(s); hoc_sectionlist_template_ = s->u.ctemplate; s = hoc_lookup("Matrix"); assert(s); sym_mat_x = hoc_table_lookup("x", s->u.ctemplate->symtable); assert(sym_mat_x); s = hoc_lookup("NetCon"); assert(s); sym_netcon_weight = hoc_table_lookup("weight", s->u.ctemplate->symtable); assert(sym_netcon_weight); nrnpy_nrn(); endian_character = get_endian_character(); if (endian_character == 0) goto fail; array_interface_typestr[0] = endian_character; // Setup bytesize in typestr snprintf(array_interface_typestr + 2, 3, "%ld", sizeof(double)); #if PY_MAJOR_VERSION >= 3 err = PyDict_SetItemString(modules, "hoc", m); assert(err == 0); Py_DECREF(m); return m; fail: return NULL; #else fail: return; #endif } } // end of extern c neuron-7.5/src/nrnpython/nrnpy_hoc_2.h000066400000000000000000000107051323325274500201230ustar00rootroot00000000000000// ugh. all this just for proper bool(hocobject) // there has to be a better way to get working __nonzero__ // but putting it into hocobj_methods did not work. static PyNumberMethods hocobj_as_number = { 0, /* nb_add */ 0, /* nb_subtract */ 0, /* nb_multiply */ 0, /* nb_divide */ 0, /* nb_remainder */ 0, /* nb_divmod */ 0, /* nb_power */ 0, /* nb_negative */ 0, /* nb_positive */ 0, /* nb_absolute */ (inquiry)hocobj_nonzero, /* nb_nonzero */ 0, /* nb_invert */ 0, /* nb_lshift */ 0, /* nb_rshift */ 0, /* nb_and */ 0, /* nb_xor */ 0, /* nb_or */ 0, /* nb_coerce */ 0, /* nb_int */ 0, /* nb_long */ 0, /* nb_float */ 0, /* nb_oct */ 0, /* nb_hex */ 0, /* nb_inplace_add */ 0, /* nb_inplace_subtract */ 0, /* nb_inplace_multiply */ 0, /* nb_inplace_divide */ 0, /* nb_inplace_remainder */ 0, /* nb_inplace_power */ 0, /* nb_inplace_lshift */ 0, /* nb_inplace_rshift */ 0, /* nb_inplace_and */ 0, /* nb_inplace_xor */ 0, /* nb_inplace_or */ 0, /* nb_floor_divide */ 0, /* nb_true_divide */ 0, /* nb_inplace_floor_divide */ 0, /* nb_inplace_true_divide */ #if PYTHON_API_VERSION > 1012 0, /* nb_index */ #endif }; static PySequenceMethods hocobj_seqmeth = { hocobj_len, NULL, NULL, hocobj_getitem, NULL, hocobj_setitem, NULL, NULL, NULL, NULL }; #undef ccast #if PYTHON_API_VERSION < 1013 #define ccast (char*) #else #define ccast /**/ #endif static PyTypeObject nrnpy_HocObjectType = { PyObject_HEAD_INIT(NULL)0, /*ob_size*/ ccast "hoc.HocObject", /*tp_name*/ sizeof(PyHocObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)hocobj_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ hocobj_repr, /*tp_repr*/ &hocobj_as_number, /*tp_as_number*/ &hocobj_seqmeth, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ (hashfunc)hocobj_hash, /*tp_hash */ (ternaryfunc)hocobj_call, /*tp_call*/ 0, /*tp_str*/ hocobj_getattro, /*tp_getattro*/ hocobj_setattro, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ ccast hocobj_docstring, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)hocobj_richcmp, /* tp_richcompare */ 0, /* tp_weaklistoffset */ &hocobj_iter, /* tp_iter */ &hocobj_iternext, /* tp_iternext */ hocobj_methods, /* tp_methods */ 0, // hocobj_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)hocobj_init, /* tp_init */ 0, /* tp_alloc */ hocobj_new, /* tp_new */ }; neuron-7.5/src/nrnpython/nrnpy_hoc_3.h000066400000000000000000000022331323325274500201210ustar00rootroot00000000000000 static PyType_Slot nrnpy_HocObjectType_slots[] = { {Py_tp_dealloc, (void*)hocobj_dealloc}, {Py_tp_repr, (void*)hocobj_repr}, {Py_tp_hash, (void*)hocobj_hash}, {Py_tp_call, (void*)hocobj_call}, {Py_tp_getattro, (void*)hocobj_getattro}, {Py_tp_setattro, (void*)hocobj_setattro}, {Py_tp_richcompare, (void*)hocobj_richcmp}, {Py_tp_iter, (void*)&hocobj_iter}, {Py_tp_iternext, (void*)&hocobj_iternext}, {Py_tp_methods, (void*)hocobj_methods}, {Py_tp_init, (void*)hocobj_init}, {Py_tp_new, (void*)hocobj_new}, {Py_tp_doc, (void*)hocobj_docstring}, {Py_nb_bool, (void*)hocobj_nonzero}, {Py_sq_length, (void*)hocobj_len}, {Py_sq_item, (void*)hocobj_getitem}, {Py_sq_ass_item, (void*)hocobj_setitem}, {0, 0}, }; static PyType_Spec nrnpy_HocObjectType_spec = { "hoc.HocObject", sizeof(PyHocObject), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, nrnpy_HocObjectType_slots, }; static struct PyModuleDef hocmodule = {PyModuleDef_HEAD_INIT, "hoc", "HOC interaction with Python", -1, HocMethods, NULL, NULL, NULL, NULL}; neuron-7.5/src/nrnpython/nrnpy_nrn.cpp000066400000000000000000001471221323325274500202650ustar00rootroot00000000000000#include #include #include #include #include "nrnpy_utils.h" extern "C" { #include #include extern void nrn_area_ri(Section* sec); extern void sec_free(hoc_Item*); extern Symlist* hoc_built_in_symlist; double* nrnpy_rangepointer(Section*, Symbol*, double, int*); extern PyObject* nrn_ptr_richcmp(void* self_ptr, void* other_ptr, int op); extern int has_membrane(char*, Section*); typedef struct { PyObject_HEAD Section* sec_; char* name_; PyObject* cell_; } NPySecObj; NPySecObj* newpysechelp(Section* sec); typedef struct { PyObject_HEAD NPySecObj* pysec_; int allseg_iter_; } NPyAllsegIter; typedef struct { PyObject_HEAD NPySecObj* pysec_; double x_; int alliter_; } NPySegObj; typedef struct { PyObject_HEAD NPySegObj* pyseg_; Prop* prop_; int first_iter_; } NPyMechObj; typedef struct { PyObject_HEAD NPyMechObj* pymech_; int index_; } NPyRVItr; typedef struct { PyObject_HEAD NPySegObj* pyseg_; Symbol* sym_; int isptr_; } NPyRangeVar; static PyTypeObject* psection_type; static PyTypeObject* pallsegiter_type; static PyTypeObject* psegment_type; static PyTypeObject* pmech_generic_type; static PyTypeObject* range_type; PyObject* pmech_types; // Python map for name to Mechanism PyObject* rangevars_; // Python map for name to Symbol extern Section* nrnpy_newsection(NPySecObj*); extern void simpleconnectsection(); extern void nrn_change_nseg(Section*, int); extern double section_length(Section*); extern double nrn_ra(Section*); extern int can_change_morph(Section*); extern short* nrn_is_artificial_; extern cTemplate** nrn_pnt_template_; extern void nrn_diam_change(Section*); extern void nrn_length_change(Section*, double); extern int diam_changed; extern void mech_insert1(Section*, int); extern void mech_uninsert1(Section*, Symbol*); extern PyObject* nrn_hocobj_ptr(double*); extern PyObject* nrnpy_forall(PyObject* self, PyObject* args); extern Object* nrnpy_po2ho(PyObject*); extern Object* nrnpy_pyobject_in_obj(PyObject*); extern Symbol* nrnpy_pyobj_sym_; extern int nrnpy_ho_eq_po(Object*, PyObject*); extern PyObject* nrnpy_hoc2pyobject(Object*); extern PyObject* nrnpy_ho2po(Object*); static void nrnpy_reg_mech(int); extern void (*nrnpy_reg_mech_p_)(int); static int ob_is_seg(Object*); extern int (*nrnpy_ob_is_seg)(Object*); static Object* seg_from_sec_x(Section*, double x); extern Object* (*nrnpy_seg_from_sec_x)(Section*, double x); static void o2loc(Object*, Section**, double*); extern void (*nrnpy_o2loc_p_)(Object*, Section**, double*); static void nrnpy_unreg_mech(int); extern char* (*nrnpy_pysec_name_p_)(Section*); static char* pysec_name(Section*); extern Object* (*nrnpy_pysec_cell_p_)(Section*); static Object* pysec_cell(Section*); static PyObject* pysec2cell(NPySecObj*); extern int (*nrnpy_pysec_cell_equals_p_)(Section*, Object*); static int pysec_cell_equals(Section*, Object*); static void remake_pmech_types(); static char* pysec_name(Section* sec) { static char buf[512]; if (sec->prop) { NPySecObj* ps = (NPySecObj*)sec->prop->dparam[PROP_PY_INDEX]._pvoid; buf[0] = '\0'; if (ps->cell_) { PyLockGIL lock; PyObject* cell = PyObject_Str(ps->cell_); Py2NRNString str(cell); Py_DECREF(cell); char* cp = str.c_str(); sprintf(buf, "%s.", cp); } char* cp = buf + strlen(buf); if (ps->name_) { sprintf(cp, "%s", ps->name_); } else { // sprintf(cp, "PySec_%p", ps); sprintf(buf, "__nrnsec_%p", sec); } return buf; } return 0; } static Object* pysec_cell(Section* sec) { if (sec->prop && sec->prop->dparam[PROP_PY_INDEX]._pvoid) { PyObject* cell = ((NPySecObj*)sec->prop->dparam[PROP_PY_INDEX]._pvoid)->cell_; if (cell) { return nrnpy_po2ho(cell); } } return 0; } static int pysec_cell_equals(Section* sec, Object* obj) { PyObject* po = ((NPySecObj*)sec->prop->dparam[PROP_PY_INDEX]._pvoid)->cell_; return nrnpy_ho_eq_po(obj, po); } static void NPySecObj_dealloc(NPySecObj* self) { // printf("NPySecObj_dealloc %p %s\n", self, secname(self->sec_)); if (self->sec_) { if (self->sec_->prop) { self->sec_->prop->dparam[PROP_PY_INDEX]._pvoid = 0; } if (self->name_) { delete[] self->name_; } if (self->sec_->prop && !self->sec_->prop->dparam[0].sym) { sec_free(self->sec_->prop->dparam[8].itm); } else { section_unref(self->sec_); } } ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static void NPyAllsegIter_dealloc(NPyAllsegIter* self) { // printf("NPyAllsegIter_dealloc %p %s\n", self, secname(self->pysec_->sec_)); Py_XDECREF(self->pysec_); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static void NPySegObj_dealloc(NPySegObj* self) { // printf("NPySegObj_dealloc %p\n", self); Py_XDECREF(self->pysec_); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static void NPyRangeVar_dealloc(NPyRangeVar* self) { // printf("NPyRangeVar_dealloc %p\n", self); Py_XDECREF(self->pyseg_); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static void NPyMechObj_dealloc(NPyMechObj* self) { // printf("NPyMechObj_dealloc %p %s\n", self, self->ob_type->tp_name); Py_XDECREF(self->pyseg_); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } // A new (or inited) python Section object with no arg creates a nrnoc section // which persists only while the python object exists. The nrnoc section // structure // has no hoc Symbol but the Python Section pointer is filled in // and secname(sec) returns the Python Section object name from the hoc section. // If a Python Section object is created from an existing nrnoc section // (with a filled in Symbol) the nrnoc section will continue to exist until // the hoc delete_section() is called on it. // static int NPySecObj_init(NPySecObj* self, PyObject* args, PyObject* kwds) { // printf("NPySecObj_init %p %p\n", self, self->sec_); static const char* kwlist[] = {"cell", "name", NULL}; if (self != NULL && !self->sec_) { if (self->name_) { delete[] self->name_; } self->name_ = 0; self->cell_ = 0; char* name = 0; PyObject* cell = 0; // avoid "warning: deprecated conversion from string constant to char*" // someday eliminate the (char**) when python changes their prototype if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Os", (char**)kwlist, &self->cell_, &name)) { return -1; } // note that we are NOT referencing the cell if (name) { self->name_ = new char[strlen(name) + 1]; strcpy(self->name_, name); } self->sec_ = nrnpy_newsection(self); } return 0; } static int NPyAllsegIter_init(NPyAllsegIter* self, PyObject* args, PyObject* kwds) { NPySecObj* pysec; // printf("NPyAllsegIter_init %p %p\n", self, self->sec_); if (self != NULL && !self->pysec_) { if (!PyArg_ParseTuple(args, "O!", psection_type, &pysec)) { return -1; } self->allseg_iter_ = 0; self->pysec_ = pysec; Py_INCREF(pysec); } return 0; } PyObject* NPySecObj_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { NPySecObj* self; self = (NPySecObj*)type->tp_alloc(type, 0); // printf("NPySecObj_new %p\n", self); if (self != NULL) { if (NPySecObj_init(self, args, kwds) != 0) { Py_DECREF(self); return NULL; } } return (PyObject*)self; } PyObject* NPyAllsegIter_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { NPyAllsegIter* self; self = (NPyAllsegIter*)type->tp_alloc(type, 0); // printf("NPyAllsegIter_new %p\n", self); if (self != NULL) { if (NPyAllsegIter_init(self, args, kwds) != 0) { Py_DECREF(self); return NULL; } } return (PyObject*)self; } PyObject* nrnpy_newsecobj(PyObject* self, PyObject* args, PyObject* kwds) { return NPySecObj_new(psection_type, args, kwds); } static PyObject* NPySegObj_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { NPySecObj* pysec; double x; if (!PyArg_ParseTuple(args, "O!d", psection_type, &pysec, &x)) { return NULL; } if (x > 1.0 && x < 1.0001) { x = 1.0; } if (x < 0. || x > 1.0) { PyErr_SetString(PyExc_ValueError, "segment position range is 0 <= x <= 1"); return NULL; } NPySegObj* self; self = (NPySegObj*)type->tp_alloc(type, 0); // printf("NPySegObj_new %p\n", self); if (self != NULL) { self->pysec_ = pysec; self->x_ = x; Py_INCREF(self->pysec_); } return (PyObject*)self; } static PyObject* NPyMechObj_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { NPySegObj* pyseg; if (!PyArg_ParseTuple(args, "O!", psegment_type, &pyseg)) { return NULL; } NPyMechObj* self; self = (NPyMechObj*)type->tp_alloc(type, 0); // printf("NPyMechObj_new %p %s\n", self, // ((PyObject*)self)->ob_type->tp_name); if (self != NULL) { self->pyseg_ = pyseg; Py_INCREF(self->pyseg_); } return (PyObject*)self; } static PyObject* NPyRangeVar_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { NPyRangeVar* self; self = (NPyRangeVar*)type->tp_alloc(type, 0); if (self != NULL) { self->pyseg_ = NULL; self->sym_ = NULL; self->isptr_ = 0; } return (PyObject*)self; } static int NPySegObj_init(NPySegObj* self, PyObject* args, PyObject* kwds) { // printf("NPySegObj_init %p %p\n", self, self->pysec_); NPySecObj* pysec; double x; if (!PyArg_ParseTuple(args, "O!d", psection_type, &pysec, &x)) { return -1; } if (x > 1.0 && x < 1.0001) { x = 1.0; } if (x < 0. || x > 1.0) { PyErr_SetString(PyExc_ValueError, "segment position range is 0 <= x <= 1"); return -1; } Py_INCREF(pysec); if (self->pysec_) { Py_DECREF(self->pysec_); } self->pysec_ = pysec; self->x_ = x; return 0; } static int ob_is_seg(Object* o) { if (!o || o->ctemplate->sym != nrnpy_pyobj_sym_) { return 0; } PyObject* po = nrnpy_hoc2pyobject(o); if (!PyObject_TypeCheck(po, psegment_type)) { return 0; } return 1; } static void o2loc(Object* o, Section** psec, double* px) { if (o->ctemplate->sym != nrnpy_pyobj_sym_) { hoc_execerror("not a Python nrn.Segment", 0); } PyObject* po = nrnpy_hoc2pyobject(o); if (!PyObject_TypeCheck(po, psegment_type)) { hoc_execerror("not a Python nrn.Segment", 0); } NPySegObj* pyseg = (NPySegObj*)po; *psec = pyseg->pysec_->sec_; *px = pyseg->x_; } static int NPyMechObj_init(NPyMechObj* self, PyObject* args, PyObject* kwds) { // printf("NPyMechObj_init %p %p %s\n", self, self->pyseg_, // ((PyObject*)self)->ob_type->tp_name); NPySegObj* pyseg; if (!PyArg_ParseTuple(args, "O!", psegment_type, &pyseg)) { return -1; } Py_INCREF(pyseg); Py_XDECREF(self->pyseg_); self->pyseg_ = pyseg; return 0; } static int NPyRangeVar_init(NPyRangeVar* self, PyObject* args, PyObject* kwds) { return 0; } static PyObject* NPySecObj_name(NPySecObj* self) { PyObject* result; result = PyString_FromString(secname(self->sec_)); return result; } static PyObject* NPySecObj_n3d(NPySecObj* self) { return PyInt_FromLong(self->sec_->npt3d); } static PyObject* NPySecObj_x3d( NPySecObj* self, PyObject* args) { // returns x value at index of 3d list Section* sec = self->sec_; int n, i; if (!PyArg_ParseTuple(args, "i", &i)) { return NULL; } n = sec->npt3d - 1; if (i < 0 || i > n) { PyErr_SetString(PyExc_Exception, "Arg out of range\n"); return NULL; } return PyFloat_FromDouble((double)sec->pt3d[i].x); } static PyObject* NPySecObj_y3d( NPySecObj* self, PyObject* args) { // returns y value at index of 3d list Section* sec = self->sec_; int n, i; if (!PyArg_ParseTuple(args, "i", &i)) { return NULL; } n = sec->npt3d - 1; if (i < 0 || i > n) { PyErr_SetString(PyExc_Exception, "Arg out of range\n"); return NULL; } return PyFloat_FromDouble((double)sec->pt3d[i].y); } static PyObject* NPySecObj_z3d( NPySecObj* self, PyObject* args) { // returns z value at index of 3d list Section* sec = self->sec_; int n, i; if (!PyArg_ParseTuple(args, "i", &i)) { return NULL; } n = sec->npt3d - 1; if (i < 0 || i > n) { PyErr_SetString(PyExc_Exception, "Arg out of range\n"); return NULL; } return PyFloat_FromDouble((double)sec->pt3d[i].z); } static PyObject* NPySecObj_arc3d( NPySecObj* self, PyObject* args) { // returns arc position value at index of 3d list Section* sec = self->sec_; int n, i; if (!PyArg_ParseTuple(args, "i", &i)) { return NULL; } n = sec->npt3d - 1; if (i < 0 || i > n) { PyErr_SetString(PyExc_Exception, "Arg out of range\n"); return NULL; } return PyFloat_FromDouble((double)sec->pt3d[i].arc); } static PyObject* NPySecObj_diam3d( NPySecObj* self, PyObject* args) { // returns diam value at index of 3d list Section* sec = self->sec_; int n, i; if (!PyArg_ParseTuple(args, "i", &i)) { return NULL; } n = sec->npt3d - 1; if (i < 0 || i > n) { PyErr_SetString(PyExc_Exception, "Arg out of range\n"); return NULL; } return PyFloat_FromDouble((double)fabs(sec->pt3d[i].d)); } static PyObject* pysec_repr(PyObject* p) { NPySecObj* psec = (NPySecObj*)p; if (psec->sec_ && psec->sec_->prop) { return NPySecObj_name(psec); } return PyString_FromString(""); } static PyObject* pyseg_repr(PyObject* p) { NPySegObj* pyseg = (NPySegObj*)p; if (pyseg->pysec_->sec_ && pyseg->pysec_->sec_->prop) { const char* sname = secname(pyseg->pysec_->sec_); char* name = new char[strlen(sname) + 100]; sprintf(name, "%s(%g)", sname, pyseg->x_); PyObject* result = PyString_FromString(name); delete[] name; return result; } return PyString_FromString(""); } static PyObject* hoc_internal_name(NPySecObj* self) { PyObject* result; char buf[256]; sprintf(buf, "__nrnsec_%p", self->sec_); result = PyString_FromString(buf); return result; } NPySecObj* newpysechelp(Section* sec) { if (!sec || !sec->prop) { return NULL; } section_ref(sec); NPySecObj* pysec = NULL; if (sec->prop->dparam[PROP_PY_INDEX]._pvoid) { pysec = (NPySecObj*)sec->prop->dparam[PROP_PY_INDEX]._pvoid; Py_INCREF(pysec); assert(pysec->sec_ == sec); } else { pysec = (NPySecObj*)psection_type->tp_alloc(psection_type, 0); pysec->sec_ = sec; pysec->name_ = 0; pysec->cell_ = 0; } return pysec; } static PyObject* newpyseghelp(Section* sec, double x) { NPySegObj* seg = (NPySegObj*)PyObject_New(NPySegObj, psegment_type); if (seg == NULL) { return NULL; } seg->x_ = x; seg->alliter_ = 0; seg->pysec_ = newpysechelp(sec); return (PyObject*)seg; } static PyObject* pysec_parentseg(NPySecObj* self) { Section* psec = self->sec_->parentsec; if (psec == NULL || psec->prop == NULL) { Py_INCREF(Py_None); return Py_None; } double x = nrn_connection_position(self->sec_); return newpyseghelp(psec, x); } static PyObject* pysec_trueparentseg(NPySecObj* self) { Section* sec = self->sec_; Section* psec = NULL; for (psec = sec->parentsec; psec; psec = psec->parentsec) { if (psec == NULL || psec->prop == NULL) { Py_INCREF(Py_None); return Py_None; } if (nrn_at_beginning(sec)) { sec = psec; } else { break; } } if (psec == NULL) { Py_INCREF(Py_None); return Py_None; } double x = nrn_connection_position(sec); return newpyseghelp(psec, x); } static PyObject* pysec_orientation(NPySecObj* self) { double x = nrn_section_orientation(self->sec_); return Py_BuildValue("d", x); } static PyObject* pysec_children(NPySecObj* self) { Section* sec = self->sec_; PyObject* result = PyList_New(0); if (!result) { return NULL; } for (Section* s = sec->child; s; s = s->sibling) { PyObject* item = (PyObject*)newpysechelp(s); if (!item) { return NULL; } if (PyList_Append(result, item) != 0) { return NULL; } Py_XDECREF(item); } return result; } static PyObject* pysec2cell(NPySecObj* self) { PyObject* result; if (self->cell_) { result = self->cell_; Py_INCREF(result); } else if (self->sec_->prop && self->sec_->prop->dparam[6].obj) { result = nrnpy_ho2po(self->sec_->prop->dparam[6].obj); } else { result = Py_None; Py_INCREF(result); } return result; } static long pysec_hash(PyObject* self) { return castptr2long((NPySecObj*)self)->sec_; } static long pyseg_hash(PyObject* self) { NPySegObj* seg = (NPySegObj*)self; return castptr2long node_exact(seg->pysec_->sec_, seg->x_); } static PyObject* pyseg_richcmp(NPySegObj* self, PyObject* other, int op) { PyObject* pysec; bool result = false; NPySegObj* seg = (NPySegObj*)self; void* self_ptr = (void*)node_exact(seg->pysec_->sec_, seg->x_); void* other_ptr = (void*)other; if (PyObject_TypeCheck(other, psegment_type)) { seg = (NPySegObj*)other; other_ptr = (void*)node_exact(seg->pysec_->sec_, seg->x_); } return nrn_ptr_richcmp(self_ptr, other_ptr, op); } static PyObject* pysec_richcmp(NPySecObj* self, PyObject* other, int op) { PyObject* pysec; bool result = false; void* self_ptr = (void*)(self->sec_); void* other_ptr = (void*)other; if (PyObject_TypeCheck(other, psection_type)) { void* self_ptr = (void*)(self->sec_); other_ptr = (void*)(((NPySecObj*)other)->sec_); } return nrn_ptr_richcmp(self_ptr, other_ptr, op); } static PyObject* pysec_same(NPySecObj* self, PyObject* args) { PyObject* pysec; if (PyArg_ParseTuple(args, "O", &pysec)) { if (PyObject_TypeCheck(pysec, psection_type)) { if (((NPySecObj*)pysec)->sec_ == self->sec_) { Py_RETURN_TRUE; } } } Py_RETURN_FALSE; } static PyObject* NPyMechObj_name(NPyMechObj* self) { PyObject* result = NULL; if (self->prop_) { result = PyString_FromString(memb_func[self->prop_->type].sym->name); } return result; } static PyObject* pymech_repr(PyObject* p) { NPyMechObj* pymech = (NPyMechObj*)p; Section* sec = pymech->pyseg_->pysec_->sec_; if (sec && sec->prop) { return NPyMechObj_name(pymech); } return PyString_FromString(""); } static PyObject* NPyRangeVar_name(NPyRangeVar* self) { PyObject* result = NULL; if (self->sym_) { if (self->isptr_) { char buf[256]; sprintf(buf, "_ref_%s", self->sym_->name); result = PyString_FromString(buf); } else { result = PyString_FromString(self->sym_->name); } } return result; } static PyObject* NPySecObj_connect(NPySecObj* self, PyObject* args) { PyObject* p; NPySecObj* parent; double parentx, childend; parentx = -1000.; childend = 0.; if (!PyArg_ParseTuple(args, "O|dd", &p, &parentx, &childend)) { return NULL; } if (PyObject_TypeCheck(p, psection_type)) { parent = (NPySecObj*)p; if (parentx == -1000.) { parentx = 1.; } } else if (PyObject_TypeCheck(p, psegment_type)) { parent = ((NPySegObj*)p)->pysec_; if (parentx != -1000.) { childend = parentx; } parentx = ((NPySegObj*)p)->x_; } else { PyErr_SetString(PyExc_TypeError, "first arg not a nrn.Section or nrn.Segment"); return NULL; } // printf("NPySecObj_connect %s %g %g\n", parent, parentx, childend); if (parentx > 1. || parentx < 0.) { PyErr_SetString(PyExc_ValueError, "out of range 0 <= parentx <= 1."); return NULL; } if (childend != 0. && childend != 1.) { PyErr_SetString(PyExc_ValueError, "child connection end must be 0 or 1"); return NULL; } Py_INCREF(self); hoc_pushx(childend); hoc_pushx(parentx); nrn_pushsec(self->sec_); nrn_pushsec(parent->sec_); simpleconnectsection(); return (PyObject*)self; } static PyObject* NPySecObj_insert(NPySecObj* self, PyObject* args) { char* tname; if (!PyArg_ParseTuple(args, "s", &tname)) { return NULL; } PyObject* otype = PyDict_GetItemString(pmech_types, tname); if (!otype) { // check first to see if the pmech_types needs to be // augmented by any new KSChan remake_pmech_types(); otype = PyDict_GetItemString(pmech_types, tname); if (!otype) { PyErr_SetString(PyExc_ValueError, "argument not a density mechanism name."); return NULL; } } int type = PyInt_AsLong(otype); // printf("NPySecObj_insert %s %d\n", tname, type); mech_insert1(self->sec_, type); Py_INCREF(self); return (PyObject*)self; } static PyObject* NPySecObj_uninsert(NPySecObj* self, PyObject* args) { char* tname; if (!PyArg_ParseTuple(args, "s", &tname)) { return NULL; } PyObject* otype = PyDict_GetItemString(pmech_types, tname); if (!otype) { // check first to see if the pmech_types needs to be // augmented by any new KSChan remake_pmech_types(); otype = PyDict_GetItemString(pmech_types, tname); if (!otype) { PyErr_SetString(PyExc_ValueError, "argument not a density mechanism name."); return NULL; } } int type = PyInt_AsLong(otype); // printf("NPySecObj_uninsert %s %d\n", tname, memb_func[type].sym); mech_uninsert1(self->sec_, memb_func[type].sym); Py_INCREF(self); return (PyObject*)self; } static PyObject* NPySecObj_has_membrane(NPySecObj* self, PyObject* args) { char* mechanism_name; PyObject* result; if (!PyArg_ParseTuple(args, "s", &mechanism_name)) { return NULL; } result = has_membrane(mechanism_name, self->sec_) ? Py_True : Py_False; Py_XINCREF(result); return result; } PyObject* nrnpy_pushsec(PyObject* sec) { if (PyObject_TypeCheck(sec, psection_type)) { nrn_pushsec(((NPySecObj*)sec)->sec_); return sec; } return NULL; } static PyObject* NPySecObj_push(NPySecObj* self, PyObject* args) { nrn_pushsec(self->sec_); Py_INCREF(self); return (PyObject*)self; } static PyObject* section_iter(NPySecObj* self) { // printf("section_iter\n"); NPySegObj* seg; seg = PyObject_New(NPySegObj, psegment_type); if (seg == NULL) { return NULL; } seg->x_ = -1.; seg->alliter_ = 0; seg->pysec_ = self; Py_INCREF(self); return (PyObject*)seg; } static PyObject* allseg(NPySecObj* self) { // printf("allseg\n"); NPyAllsegIter* ai = PyObject_New(NPyAllsegIter, pallsegiter_type); ai->pysec_ = self; Py_INCREF(self); ai->allseg_iter_ = -1; return (PyObject*)ai; } static PyObject* allseg_iter(NPyAllsegIter* self) { Py_INCREF(self); self->allseg_iter_ = -1; return (PyObject*)self; } static PyObject* allseg_next(NPyAllsegIter* self) { NPySegObj* seg; int n1 = self->pysec_->sec_->nnode - 1; if (self->allseg_iter_ > n1) { // end of iteration return NULL; } seg = PyObject_New(NPySegObj, psegment_type); if (seg == NULL) { // error return NULL; } seg->pysec_ = self->pysec_; Py_INCREF(self->pysec_); if (self->allseg_iter_ == -1) { seg->x_ = 0.; } else if (self->allseg_iter_ == n1) { seg->x_ = 1.; } else { seg->x_ = (double(self->allseg_iter_) + 0.5) / ((double)n1); } ++self->allseg_iter_; return (PyObject*)seg; } static PyObject* seg_point_processes(NPySegObj* self) { Node* nd = node_exact(self->pysec_->sec_, self->x_); PyObject* result = PyList_New(0); for (Prop* p = nd->prop; p; p = p->next) { if (memb_func[p->type].is_point) { Point_process* pp = (Point_process*)p->dparam[1]._pvoid; PyObject* item = nrnpy_ho2po(pp->ob); int err = PyList_Append(result, item); assert(err == 0); Py_XDECREF(item); } } return result; } static PyObject* node_index1(NPySegObj* self) { Node* nd = node_exact(self->pysec_->sec_, self->x_); PyObject* result = Py_BuildValue("i", nd->v_node_index); return result; } static PyObject* seg_area(NPySegObj* self) { Section* sec = self->pysec_->sec_; if (sec->recalc_area_) { nrn_area_ri(sec); } double x = self->x_; double a = 0.0; if (x > 0. && x < 1.) { Node* nd = node_exact(sec, x); a = NODEAREA(nd); } PyObject* result = Py_BuildValue("d", a); return result; } static PyObject* seg_ri(NPySegObj* self) { Section* sec = self->pysec_->sec_; if (sec->recalc_area_) { nrn_area_ri(sec); } double ri = 1e30; Node* nd = node_exact(sec, self->x_); if (NODERINV(nd)) { ri = 1. / NODERINV(nd); } PyObject* result = Py_BuildValue("d", ri); return result; } static PyObject* segment_iter(NPySegObj* self) { NPyMechObj* m = NULL; Node* nd = node_exact(self->pysec_->sec_, self->x_); Prop* p = nd->prop; m = PyObject_New(NPyMechObj, pmech_generic_type); for (;;) { if (!p) { break; } // printf("segment_iter %d %s\n", p->type, memb_func[p->type].sym->name); if (PyDict_GetItemString(pmech_types, memb_func[p->type].sym->name)) { // printf("segment_iter found\n"); break; } p = p->next; } m->pyseg_ = self; Py_INCREF(m->pyseg_); m->prop_ = p; m->first_iter_ = 1; return (PyObject*)m; } static Object* seg_from_sec_x(Section* sec, double x) { PyObject* pyseg = (PyObject*)PyObject_New(NPySegObj, psegment_type); NPySegObj* pseg = (NPySegObj*)pyseg; NPySecObj* pysec = (NPySecObj*)sec->prop->dparam[PROP_PY_INDEX]._pvoid; if (pysec) { pseg->pysec_ = pysec; Py_INCREF(pysec); } else { pysec = (NPySecObj*)psection_type->tp_alloc(psection_type, 0); pysec->sec_ = sec; pysec->name_ = 0; pysec->cell_ = 0; Py_INCREF(pysec); pseg->pysec_ = pysec; } pseg->x_ = x; Object* ho = nrnpy_pyobject_in_obj(pyseg); Py_DECREF(pyseg); return ho; } static Object** pp_get_segment(void* vptr) { Point_process* pnt = (Point_process*)vptr; // printf("pp_get_segment %s\n", hoc_object_name(pnt->ob)); Object* ho = NULL; if (pnt->prop) { Section* sec = pnt->sec; double x = nrn_arc_position(sec, pnt->node); ho = seg_from_sec_x(sec, x); } if (!ho) { ho = nrnpy_pyobject_in_obj(Py_None); } Object** tobj = hoc_temp_objptr(ho); --ho->refcount; return tobj; } static void rv_noexist(Section* sec, const char* n, double x, int err) { char buf[200]; if (err == 2) { sprintf(buf, "%s was not made to point to anything at %s(%g)", n, secname(sec), x); } else if (err == 1) { sprintf(buf, "%s, the mechanism does not exist at %s(%g)", n, secname(sec), x); } else { sprintf(buf, "%s does not exist at %s(%g)", n, secname(sec), x); } PyErr_SetString(PyExc_NameError, buf); } static PyObject* section_getattro(NPySecObj* self, PyObject* pyname) { PyObject* rv; Py_INCREF(pyname); Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); Py_DECREF(pyname); return NULL; } // printf("section_getattr %s\n", n); PyObject* result = 0; if (strcmp(n, "L") == 0) { result = Py_BuildValue("d", section_length(self->sec_)); } else if (strcmp(n, "Ra") == 0) { result = Py_BuildValue("d", nrn_ra(self->sec_)); } else if (strcmp(n, "nseg") == 0) { result = Py_BuildValue("i", self->sec_->nnode - 1); } else if ((rv = PyDict_GetItemString(rangevars_, n)) != NULL) { Symbol* sym = ((NPyRangeVar*)rv)->sym_; if (ISARRAY(sym)) { NPyRangeVar* r = PyObject_New(NPyRangeVar, range_type); r->pyseg_ = PyObject_New(NPySegObj, psegment_type); r->pyseg_->pysec_ = self; Py_INCREF(self); r->pyseg_->x_ = 0.5; r->sym_ = sym; r->isptr_ = 0; result = (PyObject*)r; } else { int err; double* d = nrnpy_rangepointer(self->sec_, sym, 0.5, &err); if (!d) { rv_noexist(self->sec_, n, 0.5, err); result = NULL; } else { if (self->sec_->recalc_area_ && sym->u.rng.type == MORPHOLOGY) { nrn_area_ri(self->sec_); } result = Py_BuildValue("d", *d); } } } else if (strcmp(n, "rallbranch") == 0) { result = Py_BuildValue("d", self->sec_->prop->dparam[4].val); } else if (strcmp(n, "__dict__") == 0) { result = PyDict_New(); int err = PyDict_SetItemString(result, "L", Py_None); assert(err == 0); err = PyDict_SetItemString(result, "Ra", Py_None); assert(err == 0); err = PyDict_SetItemString(result, "nseg", Py_None); assert(err == 0); err = PyDict_SetItemString(result, "rallbranch", Py_None); assert(err == 0); } else { result = PyObject_GenericGetAttr((PyObject*)self, pyname); } Py_DECREF(pyname); return result; } static int section_setattro(NPySecObj* self, PyObject* pyname, PyObject* value) { PyObject* rv; int err = 0; Py_INCREF(pyname); Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); Py_DECREF(pyname); return -1; } // printf("section_setattro %s\n", n); if (strcmp(n, "L") == 0) { double x; if (PyArg_Parse(value, "d", &x) == 1 && x > 0.) { if (can_change_morph(self->sec_)) { self->sec_->prop->dparam[2].val = x; nrn_length_change(self->sec_, x); diam_changed = 1; self->sec_->recalc_area_ = 1; } } else { PyErr_SetString(PyExc_ValueError, "L must be > 0."); err = -1; } } else if (strcmp(n, "Ra") == 0) { double x; if (PyArg_Parse(value, "d", &x) == 1 && x > 0.) { self->sec_->prop->dparam[7].val = x; diam_changed = 1; self->sec_->recalc_area_ = 1; } else { PyErr_SetString(PyExc_ValueError, "Ra must be > 0."); err = -1; } } else if (strcmp(n, "nseg") == 0) { int nseg; if (PyArg_Parse(value, "i", &nseg) == 1 && nseg > 0 && nseg <= 32767) { nrn_change_nseg(self->sec_, nseg); } else { PyErr_SetString(PyExc_ValueError, "nseg must be an integer in range 1 to 32767"); err = -1; } // printf("section_setattro err=%d nseg=%d nnode\n", err, nseg, // self->sec_->nnode); } else if ((rv = PyDict_GetItemString(rangevars_, n)) != NULL) { Symbol* sym = ((NPyRangeVar*)rv)->sym_; if (ISARRAY(sym)) { PyErr_SetString(PyExc_IndexError, "missing index"); err = -1; } else { int errp; double* d = nrnpy_rangepointer(self->sec_, sym, 0.5, &errp); if (!d) { rv_noexist(self->sec_, n, 0.5, errp); err = -1; } else if (!PyArg_Parse(value, "d", d)) { PyErr_SetString(PyExc_ValueError, "bad value"); err = -1; } else { // only need to do following if nseg > 1, VINDEX, or EXTRACELL nrn_rangeconst(self->sec_, sym, d, 0); } } } else if (strcmp(n, "rallbranch") == 0) { double x; if (PyArg_Parse(value, "d", &x) == 1 && x > 0.) { self->sec_->prop->dparam[4].val = x; diam_changed = 1; self->sec_->recalc_area_ = 1; } else { PyErr_SetString(PyExc_ValueError, "rallbranch must be > 0"); err = -1; } } else { err = PyObject_GenericSetAttr((PyObject*)self, pyname, value); } Py_DECREF(pyname); return err; } static PyObject* segment_next(NPySegObj* self) { // printf("segment_next enter x=%g\n", self->x_); double dx = 1. / ((double)self->pysec_->sec_->nnode - 1); double x = self->x_; if (x < -1e-9) { if (self->alliter_) { x = 0.; } else { x = dx / 2.; } } else if (x < 1e-9) { x = dx / 2.; } else { x += dx; } if (x > 1. + dx - 1e-9) { return NULL; } if (x > 1. + 1e-9) { if (self->alliter_) { x = 1.0; } else { return NULL; } } NPySegObj* seg = PyObject_New(NPySegObj, psegment_type); assert(seg); if (seg == NULL) { } self->x_ = x; seg->x_ = x; seg->alliter_ = self->alliter_; seg->pysec_ = self->pysec_; Py_INCREF(seg->pysec_); return (PyObject*)seg; } static PyObject* mech_next(NPyMechObj* self) { Prop* p = self->prop_; if (self->first_iter_) { self->first_iter_ = 0; } else { p = p->next; } NPyMechObj* m = NULL; for (;;) { if (!p) { return NULL; } // printf("segment_iter %d %s\n", p->type, memb_func[p->type].sym->name); if (PyDict_GetItemString(pmech_types, memb_func[p->type].sym->name)) { // printf("segment_iter found\n"); m = PyObject_New(NPyMechObj, pmech_generic_type); break; } p = p->next; } if (m == NULL) { return NULL; } self->prop_ = p; m->pyseg_ = self->pyseg_; Py_INCREF(m->pyseg_); m->prop_ = p; return (PyObject*)m; } static PyObject* segment_getattro(NPySegObj* self, PyObject* pyname) { Symbol* sym; Py_INCREF(pyname); Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); Py_DECREF(pyname); return NULL; } // printf("segment_getattr %s\n", n); PyObject* result = NULL; PyObject* otype = NULL; PyObject* rv = NULL; Section* sec = self->pysec_->sec_; if (strcmp(n, "v") == 0) { Node* nd = node_exact(sec, self->x_); result = Py_BuildValue("d", NODEV(nd)); } else if ((otype = PyDict_GetItemString(pmech_types, n)) != NULL) { int type = PyInt_AsLong(otype); // printf("segment_getattr type=%d\n", type); Node* nd = node_exact(sec, self->x_); Prop* p = nrn_mechanism(type, nd); if (!p) { rv_noexist(sec, n, self->x_, 1); result = NULL; } else { NPyMechObj* m = PyObject_New(NPyMechObj, pmech_generic_type); if (m == NULL) { result = NULL; } else { m->pyseg_ = self; m->prop_ = p; Py_INCREF(m->pyseg_); result = (PyObject*)m; } } } else if ((rv = PyDict_GetItemString(rangevars_, n)) != NULL) { sym = ((NPyRangeVar*)rv)->sym_; if (ISARRAY(sym)) { NPyRangeVar* r = PyObject_New(NPyRangeVar, range_type); r->pyseg_ = self; Py_INCREF(r->pyseg_); r->sym_ = sym; r->isptr_ = 0; result = (PyObject*)r; } else { int err; double* d = nrnpy_rangepointer(sec, sym, self->x_, &err); if (!d) { rv_noexist(sec, n, self->x_, err); result = NULL; } else { if (sec->recalc_area_ && sym->u.rng.type == MORPHOLOGY) { nrn_area_ri(sec); } result = Py_BuildValue("d", *d); } } } else if (strncmp(n, "_ref_", 5) == 0) { if (strcmp(n + 5, "v") == 0) { Node* nd = node_exact(sec, self->x_); result = nrn_hocobj_ptr(&(NODEV(nd))); } else if ((sym = hoc_table_lookup(n + 5, hoc_built_in_symlist)) != 0 && sym->type == RANGEVAR) { if (ISARRAY(sym)) { NPyRangeVar* r = PyObject_New(NPyRangeVar, range_type); r->pyseg_ = self; Py_INCREF(r->pyseg_); r->sym_ = sym; r->isptr_ = 1; result = (PyObject*)r; } else { int err; double* d = nrnpy_rangepointer(sec, sym, self->x_, &err); if (!d) { rv_noexist(sec, n + 5, self->x_, err); result = NULL; } else { result = nrn_hocobj_ptr(d); } } } else { rv_noexist(sec, n, self->x_, 2); result = NULL; } } else if (strcmp(n, "__dict__") == 0) { Node* nd = node_exact(sec, self->x_); result = PyDict_New(); int err = PyDict_SetItemString(result, "v", Py_None); assert(err == 0); PyDict_SetItemString(result, "diam", Py_None); assert(err == 0); PyDict_SetItemString(result, "cm", Py_None); assert(err == 0); for (Prop* p = nd->prop; p; p = p->next) { if (p->type > CAP && !memb_func[p->type].is_point) { char* pn = memb_func[p->type].sym->name; err = PyDict_SetItemString(result, pn, Py_None); assert(err == 0); } } } else { result = PyObject_GenericGetAttr((PyObject*)self, pyname); } Py_DECREF(pyname); return result; } static int segment_setattro(NPySegObj* self, PyObject* pyname, PyObject* value) { PyObject* rv; Symbol* sym; int err = 0; Py_INCREF(pyname); Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); Py_DECREF(pyname); return -1; } // printf("segment_setattro %s\n", n); if (strcmp(n, "x") == 0) { int nseg; double x; if (PyArg_Parse(value, "d", &x) == 1 && x > 0. && x <= 1.) { if (x < 1e-9) { self->x_ = 0.; } else if (x > 1. - 1e-9) { self->x_ = 1.; } else { self->x_ = x; } } else { PyErr_SetString(PyExc_ValueError, "x must be in range 0. to 1."); err = -1; } } else if ((rv = PyDict_GetItemString(rangevars_, n)) != NULL) { sym = ((NPyRangeVar*)rv)->sym_; if (ISARRAY(sym)) { char s[200]; sprintf(s, "%s needs an index for assignment", sym->name); PyErr_SetString(PyExc_IndexError, s); err = -1; } else { int errp; double* d = nrnpy_rangepointer(self->pysec_->sec_, sym, self->x_, &errp); if (!d) { rv_noexist(self->pysec_->sec_, n, self->x_, errp); Py_DECREF(pyname); return -1; } if (!PyArg_Parse(value, "d", d)) { PyErr_SetString(PyExc_ValueError, "bad value"); Py_DECREF(pyname); return -1; } else if (sym->u.rng.type == MORPHOLOGY) { diam_changed = 1; self->pysec_->sec_->recalc_area_ = 1; nrn_diam_change(self->pysec_->sec_); } else if (sym->u.rng.type == EXTRACELL && sym->u.rng.index == 0) { // cannot execute because xraxial is an array diam_changed = 1; } } } else { err = PyObject_GenericSetAttr((PyObject*)self, pyname, value); } Py_DECREF(pyname); return err; } static PyObject* mech_getattro(NPyMechObj* self, PyObject* pyname) { Py_INCREF(pyname); Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); Py_DECREF(pyname); return NULL; } // printf("mech_getattro %s\n", n); PyObject* result = NULL; NrnProperty np(self->prop_); char buf[200]; int isptr = (strncmp(n, "_ref_", 5) == 0); sprintf(buf, "%s_%s", isptr ? n + 5 : n, memb_func[self->prop_->type].sym->name); Symbol* sym = np.find(buf); if (sym) { // printf("mech_getattro sym %s\n", sym->name); if (ISARRAY(sym)) { NPyRangeVar* r = PyObject_New(NPyRangeVar, range_type); r->pyseg_ = self->pyseg_; Py_INCREF(r->pyseg_); r->sym_ = sym; r->isptr_ = isptr; result = (PyObject*)r; } else { double* px = np.prop_pval(sym, 0); if (!px) { rv_noexist(self->pyseg_->pysec_->sec_, sym->name, self->pyseg_->x_, 2); } else if (isptr) { result = nrn_hocobj_ptr(px); } else { result = Py_BuildValue("d", *px); } } } else if (strcmp(n, "__dict__") == 0) { result = PyDict_New(); for (Symbol* s = np.first_var(); np.more_var(); s = np.next_var()) { int err = PyDict_SetItemString(result, s->name, Py_None); assert(err == 0); } } else { result = PyObject_GenericGetAttr((PyObject*)self, pyname); } Py_DECREF(pyname); return result; } static int mech_setattro(NPyMechObj* self, PyObject* pyname, PyObject* value) { int err = 0; Py_INCREF(pyname); Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { PyErr_SetString(PyExc_TypeError, "attribute name must be a string"); Py_DECREF(pyname); return -1; } // printf("mech_setattro %s\n", n); NrnProperty np(self->prop_); char buf[200]; sprintf(buf, "%s_%s", n, memb_func[self->prop_->type].sym->name); Symbol* sym = np.find(buf); if (sym) { double x; if (PyArg_Parse(value, "d", &x) == 1) { double* pd = np.prop_pval(sym, 0); if (pd) { *pd = x; } else { rv_noexist(self->pyseg_->pysec_->sec_, sym->name, self->pyseg_->x_, 2); err = 1; } } else { PyErr_SetString(PyExc_ValueError, "must be a double"); err = -1; } } else { err = PyObject_GenericSetAttr((PyObject*)self, pyname, value); } Py_DECREF(pyname); return err; } double** nrnpy_setpointer_helper(PyObject* pyname, PyObject* mech) { if (PyObject_TypeCheck(mech, pmech_generic_type) == 0) { return NULL; } NPyMechObj* m = (NPyMechObj*)mech; NrnProperty np(m->prop_); char buf[200]; Py2NRNString name(pyname); char* n = name.c_str(); if (!n) { return NULL; } sprintf(buf, "%s_%s", n, memb_func[m->prop_->type].sym->name); Symbol* sym = np.find(buf); if (!sym || sym->type != RANGEVAR || sym->subtype != NRNPOINTER) { return 0; } return &m->prop_->dparam[np.prop_index(sym)].pval; } static PyObject* NPySecObj_call(NPySecObj* self, PyObject* args) { double x = 0.5; PyArg_ParseTuple(args, "|d", &x); PyObject* segargs = Py_BuildValue("(O,d)", self, x); PyObject* seg = NPySegObj_new(psegment_type, segargs, 0); Py_DECREF(segargs); return seg; } static Py_ssize_t rv_len(PyObject* self) { NPyRangeVar* r = (NPyRangeVar*)self; assert(r->sym_ && r->sym_->arayinfo); assert(r->sym_->arayinfo->nsub == 1); return r->sym_->arayinfo->sub[0]; } static PyObject* rv_getitem(PyObject* self, Py_ssize_t ix) { NPyRangeVar* r = (NPyRangeVar*)self; PyObject* result = NULL; if (ix < 0 || ix >= rv_len(self)) { PyErr_SetString(PyExc_IndexError, r->sym_->name); return NULL; } int err; double* d = nrnpy_rangepointer(r->pyseg_->pysec_->sec_, r->sym_, r->pyseg_->x_, &err); if (!d) { rv_noexist(r->pyseg_->pysec_->sec_, r->sym_->name, r->pyseg_->x_, err); return NULL; } d += ix; if (r->isptr_) { result = nrn_hocobj_ptr(d); } else { result = Py_BuildValue("d", *d); } return result; } static int rv_setitem(PyObject* self, Py_ssize_t ix, PyObject* value) { NPyRangeVar* r = (NPyRangeVar*)self; if (ix < 0 || ix >= rv_len(self)) { PyErr_SetString(PyExc_IndexError, r->sym_->name); return -1; } int err; double* d = nrnpy_rangepointer(r->pyseg_->pysec_->sec_, r->sym_, r->pyseg_->x_, &err); if (!d) { rv_noexist(r->pyseg_->pysec_->sec_, r->sym_->name, r->pyseg_->x_, err); return -1; } d += ix; if (!PyArg_Parse(value, "d", d)) { PyErr_SetString(PyExc_ValueError, "bad value"); return -1; } if (r->sym_->u.rng.type == EXTRACELL && r->sym_->u.rng.index == 0) { diam_changed = 1; } return 0; } static PyMethodDef NPySecObj_methods[] = { {"name", (PyCFunction)NPySecObj_name, METH_NOARGS, "Section name (same as hoc secname())"}, {"hname", (PyCFunction)NPySecObj_name, METH_NOARGS, "Section name (same as hoc secname())"}, {"has_membrane", (PyCFunction)NPySecObj_has_membrane, METH_VARARGS, "Returns True if the section's membrane has this density mechanism.\nThis " "is not for point processes."}, {"connect", (PyCFunction)NPySecObj_connect, METH_VARARGS, "childSection.connect(parentSection, [parentX], [childEnd]) " "or\nchildSection.connect(parentSegment, [childEnd])"}, {"insert", (PyCFunction)NPySecObj_insert, METH_VARARGS, "section.insert(densityMechanismName) e.g. soma.insert('hh')"}, {"uninsert", (PyCFunction)NPySecObj_uninsert, METH_VARARGS, "section.uninsert(densityMechanismName) e.g. soma.insert('hh')"}, {"push", (PyCFunction)NPySecObj_push, METH_VARARGS, "section.push() makes it the currently accessed section. Should end with " "a corresponding hoc.pop_section()"}, {"allseg", (PyCFunction)allseg, METH_VARARGS, "iterate over segments. Includes x=0 and x=1 zero-area nodes in the " "iteration."}, {"cell", (PyCFunction)pysec2cell, METH_NOARGS, "Return the object that owns the Section. Possibly None."}, {"same", (PyCFunction)pysec_same, METH_VARARGS, "sec1.same(sec2) returns True if sec1 and sec2 wrap the same NEURON " "Section"}, {"hoc_internal_name", (PyCFunction)hoc_internal_name, METH_NOARGS, "Hoc accepts this name wherever a section is syntactically valid."}, {"parentseg", (PyCFunction)pysec_parentseg, METH_NOARGS, "Return the nrn.Segment specified by the connect method. Possibly None."}, {"trueparentseg", (PyCFunction)pysec_trueparentseg, METH_NOARGS, "Return the nrn.Segment this section connects to which is closer to the " "root. Possibly None. (same as parentseg unless parentseg.x == " "parentseg.sec.orientation()"}, {"orientation", (PyCFunction)pysec_orientation, METH_NOARGS, "Returns 0.0 or 1.0 depending on the x value closest to parent."}, {"children", (PyCFunction)pysec_children, METH_NOARGS, "Return list of child sections. Possibly an empty list"}, {"n3d", (PyCFunction)NPySecObj_n3d, METH_NOARGS, "Returns the number of 3D points."}, {"x3d", (PyCFunction)NPySecObj_x3d, METH_VARARGS, "Returns the x coordinate of the ith 3D point."}, {"y3d", (PyCFunction)NPySecObj_y3d, METH_VARARGS, "Returns the y coordinate of the ith 3D point."}, {"z3d", (PyCFunction)NPySecObj_z3d, METH_VARARGS, "Returns the z coordinate of the ith 3D point."}, {"arc3d", (PyCFunction)NPySecObj_arc3d, METH_VARARGS, "Returns the arc position of the ith 3D point."}, {"diam3d", (PyCFunction)NPySecObj_diam3d, METH_VARARGS, "Returns the diam of the ith 3D point."}, {NULL}}; static PyMethodDef NPySegObj_methods[] = { {"point_processes", (PyCFunction)seg_point_processes, METH_NOARGS, "seg.point_processes() returns list of POINT_PROCESS instances in the " "segment."}, {"node_index", (PyCFunction)node_index1, METH_NOARGS, "seg.node_index() returns index of v, rhs, etc. in the _actual arrays of " "the appropriate NrnThread."}, {"area", (PyCFunction)seg_area, METH_NOARGS, "Segment area (um2) (same as h.area(sec(x), sec=sec))"}, {"ri", (PyCFunction)seg_ri, METH_NOARGS, "Segment resistance to parent segment (Megohms) (same as h.ri(sec(x), " "sec=sec))"}, {NULL}}; // I'm guessing Python should change their typedef to get rid of the // four "deprecated conversion from string constant to 'char*'" warnings. // Could avoid by casting each to (char*) but probably better to keep the // warnings. For now we get rid of the warnings by copying the string to // char array. static char* cpstr(const char* s) { char* s2 = new char[strlen(s) + 1]; strcpy(s2, s); return s2; } static PyMemberDef NPySegObj_members[] = { {cpstr("x"), T_DOUBLE, offsetof(NPySegObj, x_), 0, cpstr("location in the section (segment containing x)")}, {cpstr("sec"), T_OBJECT_EX, offsetof(NPySegObj, pysec_), 0, cpstr("Section")}, {NULL}}; static PyMethodDef NPyMechObj_methods[] = { {"name", (PyCFunction)NPyMechObj_name, METH_NOARGS, "Mechanism name (same as hoc suffix for density mechanism)"}, {NULL}}; static PyMethodDef NPyRangeVar_methods[] = { {"name", (PyCFunction)NPyRangeVar_name, METH_NOARGS, "Range variable array name"}, {NULL}}; static PyMemberDef NPyMechObj_members[] = {{NULL}}; PyObject* nrnpy_cas(PyObject* self, PyObject* args) { Section* sec = chk_access(); // printf("nrnpy_cas %s\n", secname(sec)); return (PyObject*)newpysechelp(sec); } static PyMethodDef nrnpy_methods[] = { {"cas", nrnpy_cas, METH_VARARGS, "Return the currently accessed section."}, {"allsec", nrnpy_forall, METH_VARARGS, "Return iterator over all sections."}, {NULL}}; #if PY_MAJOR_VERSION >= 3 #include "nrnpy_nrn_3.h" #else #include "nrnpy_nrn_2.h" #endif static PyObject* nrnmodule_; static void rangevars_add(Symbol* sym) { assert(sym && sym->type == RANGEVAR); NPyRangeVar* r = PyObject_New(NPyRangeVar, range_type); // printf("%s\n", sym->name); r->sym_ = sym; r->isptr_ = 0; PyDict_SetItemString(rangevars_, sym->name, (PyObject*)r); } myPyMODINIT_FUNC nrnpy_nrn(void) { int i; PyObject* m; #if PY_MAJOR_VERSION >= 3 int err = 0; PyObject* modules = PyImport_GetModuleDict(); if ((m = PyDict_GetItemString(modules, "nrn")) != NULL && PyModule_Check(m)) { return m; } #endif #if PY_MAJOR_VERSION >= 3 psection_type = (PyTypeObject*)PyType_FromSpec(&nrnpy_SectionType_spec); #else psection_type = &nrnpy_SectionType; #endif psection_type->tp_new = PyType_GenericNew; if (PyType_Ready(psection_type) < 0) goto fail; Py_INCREF(psection_type); #if PY_MAJOR_VERSION >= 3 pallsegiter_type = (PyTypeObject*)PyType_FromSpec(&nrnpy_AllsegIterType_spec); #else pallsegiter_type = &nrnpy_AllsegIterType; #endif pallsegiter_type->tp_new = PyType_GenericNew; if (PyType_Ready(pallsegiter_type) < 0) goto fail; Py_INCREF(pallsegiter_type); #if PY_MAJOR_VERSION >= 3 psegment_type = (PyTypeObject*)PyType_FromSpec(&nrnpy_SegmentType_spec); #else psegment_type = &nrnpy_SegmentType; #endif psegment_type->tp_new = PyType_GenericNew; if (PyType_Ready(psegment_type) < 0) goto fail; Py_INCREF(psegment_type); #if PY_MAJOR_VERSION >= 3 range_type = (PyTypeObject*)PyType_FromSpec(&nrnpy_RangeType_spec); #else range_type = &nrnpy_RangeType; #endif range_type->tp_new = PyType_GenericNew; if (PyType_Ready(range_type) < 0) goto fail; Py_INCREF(range_type); #if PY_MAJOR_VERSION >= 3 m = PyModule_Create( &nrnsectionmodule); // like nrn but namespace will not include mechanims. #else m = Py_InitModule3("_neuron_section", nrnpy_methods, "NEURON interaction with Python"); #endif PyModule_AddObject(m, "Section", (PyObject*)psection_type); PyModule_AddObject(m, "Segment", (PyObject*)psegment_type); #if PY_MAJOR_VERSION >= 3 err = PyDict_SetItemString(modules, "_neuron_section", m); assert(err == 0); Py_DECREF(m); m = PyModule_Create(&nrnmodule); // #else m = Py_InitModule3("nrn", nrnpy_methods, "NEURON interaction with Python"); #endif nrnmodule_ = m; PyModule_AddObject(m, "Section", (PyObject*)psection_type); PyModule_AddObject(m, "Segment", (PyObject*)psegment_type); #if PY_MAJOR_VERSION >= 3 pmech_generic_type = (PyTypeObject*)PyType_FromSpec(&nrnpy_MechanismType_spec); #else pmech_generic_type = &nrnpy_MechanismType; #endif pmech_generic_type->tp_new = PyType_GenericNew; if (PyType_Ready(pmech_generic_type) < 0) goto fail; Py_INCREF(pmech_generic_type); PyModule_AddObject(m, "Mechanism", (PyObject*)pmech_generic_type); remake_pmech_types(); nrnpy_reg_mech_p_ = nrnpy_reg_mech; nrnpy_ob_is_seg = ob_is_seg; nrnpy_seg_from_sec_x = seg_from_sec_x; nrnpy_o2loc_p_ = o2loc; nrnpy_pysec_name_p_ = pysec_name; nrnpy_pysec_cell_p_ = pysec_cell; nrnpy_pysec_cell_equals_p_ = pysec_cell_equals; #if PY_MAJOR_VERSION >= 3 err = PyDict_SetItemString(modules, "nrn", m); assert(err == 0); Py_DECREF(m); return m; fail: return NULL; #else fail: return; #endif } void remake_pmech_types() { int i; Py_XDECREF(pmech_types); Py_XDECREF(rangevars_); pmech_types = PyDict_New(); rangevars_ = PyDict_New(); rangevars_add(hoc_table_lookup("diam", hoc_built_in_symlist)); rangevars_add(hoc_table_lookup("cm", hoc_built_in_symlist)); rangevars_add(hoc_table_lookup("v", hoc_built_in_symlist)); rangevars_add(hoc_table_lookup("i_cap", hoc_built_in_symlist)); rangevars_add(hoc_table_lookup("i_membrane_", hoc_built_in_symlist)); for (i = 4; i < n_memb_func; ++i) { // start at pas nrnpy_reg_mech(i); } } void nrnpy_reg_mech(int type) { int i; char* s; Memb_func* mf = memb_func + type; if (!nrnmodule_) { return; } if (mf->is_point) { if (nrn_is_artificial_[type] == 0) { Symlist* sl = nrn_pnt_template_[type]->symtable; Symbol* s = hoc_table_lookup("get_segment", sl); if (!s) { s = hoc_install("get_segment", OBFUNCTION, 0, &sl); #if MAC s->u.u_proc->defn.pfo = (Object * *(*)(...))pp_get_segment; #else s->u.u_proc->defn.pfo = (Object * *(*)())pp_get_segment; #endif } } return; } s = mf->sym->name; // printf("nrnpy_reg_mech %s %d\n", s, type); if (PyDict_GetItemString(pmech_types, s)) { hoc_execerror(s, "mechanism already exists"); } Py_INCREF(pmech_generic_type); PyModule_AddObject(nrnmodule_, s, (PyObject*)pmech_generic_type); PyDict_SetItemString(pmech_types, s, Py_BuildValue("i", type)); for (i = 0; i < mf->sym->s_varn; ++i) { Symbol* sym = mf->sym->u.ppsym[i]; rangevars_add(sym); } } void nrnpy_unreg_mech(int type) { // not implemented but needed when KSChan name changed. } } // end of extern c neuron-7.5/src/nrnpython/nrnpy_nrn_2.h000066400000000000000000000273301323325274500201510ustar00rootroot00000000000000 #undef ccast #if PYTHON_API_VERSION < 1013 #define ccast (char*) #else #define ccast /**/ #endif static PyTypeObject nrnpy_SectionType = { PyObject_HEAD_INIT(NULL)0, /*ob_size*/ ccast "nrn.Section", /*tp_name*/ sizeof(NPySecObj), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)NPySecObj_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ pysec_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ (hashfunc)pysec_hash, /*tp_hash*/ (ternaryfunc)NPySecObj_call, /*tp_call*/ 0, /*tp_str*/ (getattrofunc)section_getattro, /*tp_getattro*/ (setattrofunc)section_setattro, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ ccast "Section objects", /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)pysec_richcmp, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc)section_iter, /* tp_iter */ 0, /* tp_iternext */ NPySecObj_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)NPySecObj_init, /* tp_init */ 0, /* tp_alloc */ NPySecObj_new, /* tp_new */ }; static PyTypeObject nrnpy_AllsegIterType = { PyObject_HEAD_INIT(NULL)0, /*ob_size*/ ccast "nrn.AllsegIter", /*tp_name*/ sizeof(NPyAllsegIter), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)NPyAllsegIter_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ ccast "Iterate over all Segments of a Section, including x=0 and 1", /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc)allseg_iter, /* tp_iter */ (iternextfunc)allseg_next, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)NPyAllsegIter_init, /* tp_init */ 0, /* tp_alloc */ NPyAllsegIter_new, /* tp_new */ }; static PyTypeObject nrnpy_SegmentType = { PyObject_HEAD_INIT(NULL)0, /*ob_size*/ ccast "nrn.Segment", /*tp_name*/ sizeof(NPySegObj), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)NPySegObj_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ pyseg_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ (hashfunc)pyseg_hash, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ (getattrofunc)segment_getattro, /*tp_getattro*/ (setattrofunc)segment_setattro, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ "Segment objects", /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)pyseg_richcmp, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc)segment_iter, /* tp_iter */ (iternextfunc)segment_next, /* tp_iternext */ NPySegObj_methods, /* tp_methods */ NPySegObj_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)NPySegObj_init, /* tp_init */ 0, /* tp_alloc */ NPySegObj_new, /* tp_new */ }; static PySequenceMethods rv_seqmeth = { rv_len, NULL, NULL, rv_getitem, NULL, rv_setitem, NULL, NULL, NULL, NULL }; static PyTypeObject nrnpy_RangeType = { PyObject_HEAD_INIT(NULL)0, /*ob_size*/ ccast "nrn.RangeVar", /*tp_name*/ sizeof(NPyRangeVar), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)NPyRangeVar_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ 0, /*tp_as_number*/ &rv_seqmeth, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash */ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ "Range Variable Array objects", /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ NPyRangeVar_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)NPyRangeVar_init, /* tp_init */ 0, /* tp_alloc */ NPyRangeVar_new, /* tp_new */ }; static PyTypeObject nrnpy_MechanismType = { PyObject_HEAD_INIT(NULL)0, /*ob_size*/ ccast "nrn.Mechanism", /*tp_name*/ sizeof(NPyMechObj), /*tp_basicsize*/ 0, /*tp_itemsize*/ (destructor)NPyMechObj_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ pymech_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash */ 0, /*tp_call*/ 0, /*tp_str*/ (getattrofunc)mech_getattro, /*tp_getattro*/ (setattrofunc)mech_setattro, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ "Mechanism objects", /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (iternextfunc)mech_next, /* tp_iternext */ NPyMechObj_methods, /* tp_methods */ NPyMechObj_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)NPyMechObj_init, /* tp_init */ 0, /* tp_alloc */ NPyMechObj_new, /* tp_new */ }; neuron-7.5/src/nrnpython/nrnpy_nrn_3.h000066400000000000000000000075441323325274500201570ustar00rootroot00000000000000static PyType_Slot nrnpy_SectionType_slots[] = { {Py_tp_dealloc, (void*)NPySecObj_dealloc}, {Py_tp_repr, (void*)pysec_repr}, {Py_tp_hash, (void*)pysec_hash}, {Py_tp_call, (void*)NPySecObj_call}, {Py_tp_getattro, (void*)section_getattro}, {Py_tp_setattro, (void*)section_setattro}, {Py_tp_richcompare, (void*)pysec_richcmp}, {Py_tp_iter, (void*)section_iter}, {Py_tp_methods, (void*)NPySecObj_methods}, {Py_tp_init, (void*)NPySecObj_init}, {Py_tp_new, (void*)NPySecObj_new}, {Py_tp_doc, (void*)"Section objects"}, {0, 0}, }; static PyType_Spec nrnpy_SectionType_spec = { "nrn.Section", sizeof(NPySecObj), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, nrnpy_SectionType_slots, }; static PyType_Slot nrnpy_AllsegIterType_slots[] = { {Py_tp_dealloc, (void*)NPyAllsegIter_dealloc}, {Py_tp_iter, (void*)allseg_iter}, {Py_tp_iternext, (void*)allseg_next}, {Py_tp_init, (void*)NPyAllsegIter_init}, {Py_tp_new, (void*)NPyAllsegIter_new}, {Py_tp_doc, (void*)"Iterate over all Segments of a Section, including x=0 and 1"}, {0, 0}, }; static PyType_Spec nrnpy_AllsegIterType_spec = { "nrn.AllsegIter", sizeof(NPyAllsegIter), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, nrnpy_AllsegIterType_slots, }; static PyType_Slot nrnpy_SegmentType_slots[] = { {Py_tp_dealloc, (void*)NPySegObj_dealloc}, {Py_tp_repr, (void*)pyseg_repr}, {Py_tp_hash, (void*)pyseg_hash}, {Py_tp_getattro, (void*)segment_getattro}, {Py_tp_setattro, (void*)segment_setattro}, {Py_tp_richcompare, (void*)pyseg_richcmp}, {Py_tp_iter, (void*)segment_iter}, {Py_tp_iternext, (void*)segment_next}, {Py_tp_methods, (void*)NPySegObj_methods}, {Py_tp_members, (void*)NPySegObj_members}, {Py_tp_init, (void*)NPySegObj_init}, {Py_tp_new, (void*)NPySegObj_new}, {Py_tp_doc, (void*)"Segment objects"}, {0, 0}, }; static PyType_Spec nrnpy_SegmentType_spec = { "nrn.Segment", sizeof(NPySegObj), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, nrnpy_SegmentType_slots, }; static PyType_Slot nrnpy_RangeType_slots[] = { {Py_tp_dealloc, (void*)NPyRangeVar_dealloc}, {Py_tp_methods, (void*)NPyRangeVar_methods}, {Py_tp_init, (void*)NPyRangeVar_init}, {Py_tp_new, (void*)NPyRangeVar_new}, {Py_tp_doc, (void*)"Range Variable Array objects"}, {Py_sq_length, (void*)rv_len}, {Py_sq_item, (void*)rv_getitem}, {Py_sq_ass_item, (void*)rv_setitem}, {0, 0}, }; static PyType_Spec nrnpy_RangeType_spec = { "nrn.RangeVar", sizeof(NPyRangeVar), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, nrnpy_RangeType_slots, }; static PyType_Slot nrnpy_MechanismType_slots[] = { {Py_tp_dealloc, (void*)NPyMechObj_dealloc}, {Py_tp_repr, (void*)pymech_repr}, {Py_tp_getattro, (void*)mech_getattro}, {Py_tp_setattro, (void*)mech_setattro}, {Py_tp_iternext, (void*)mech_next}, {Py_tp_methods, (void*)NPyMechObj_methods}, {Py_tp_members, (void*)NPyMechObj_members}, {Py_tp_init, (void*)NPyMechObj_init}, {Py_tp_new, (void*)NPyMechObj_new}, {Py_tp_doc, (void*)"Mechanism objects"}, {0, 0}, }; static PyType_Spec nrnpy_MechanismType_spec = { "nrn.Mechanism", sizeof(NPyMechObj), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, nrnpy_MechanismType_slots, }; static struct PyModuleDef nrnmodule = {PyModuleDef_HEAD_INIT, "nrn", "NEURON interaction with Python", -1, nrnpy_methods, NULL, NULL, NULL, NULL}; /* limited namespace version of nrn module which will not have the mechanism names added. (At least one ModelDB model has a mechanism called 'cas') */ static struct PyModuleDef nrnsectionmodule = { PyModuleDef_HEAD_INIT, "_neuron_section", "NEURON interaction with Python", -1, nrnpy_methods, NULL, NULL, NULL, NULL}; neuron-7.5/src/nrnpython/nrnpy_p2h.cpp000066400000000000000000000545361323325274500201670ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include #include "nrnpy_utils.h" extern "C" { #include "parse.h" extern void hoc_nopop(); extern void hoc_pop_defer(); extern Object* hoc_new_object(Symbol*, void*); extern int hoc_stack_type(); extern char** hoc_strpop(); extern Object** hoc_objpop(); extern Object* hoc_pop_object(); extern void hoc_stkobj_unref(Object*); extern void hoc_tobj_unref(Object**); extern int hoc_ipop(); PyObject* nrnpy_hoc2pyobject(Object*); Object* nrnpy_pyobject_in_obj(PyObject*); int nrnpy_ho_eq_po(Object*, PyObject*); extern void* (*nrnpy_save_thread)(); extern void (*nrnpy_restore_thread)(void*); static void* save_thread() { return PyEval_SaveThread(); } static void restore_thread(void* g) {PyEval_RestoreThread((PyThreadState*)g); } extern Symbol* nrnpy_pyobj_sym_; extern void (*nrnpy_py2n_component)(Object*, Symbol*, int, int); extern void (*nrnpy_hpoasgn)(Object*, int); extern double (*nrnpy_praxis_efun)(Object*, Object*); extern int (*nrnpy_hoccommand_exec)(Object*); extern int (*nrnpy_hoccommand_exec_strret)(Object*, char*, int); extern void (*nrnpy_cmdtool)(Object*, int, double, double, int); extern double (*nrnpy_func_call)(Object*, int, int*); extern Object* (*nrnpy_callable_with_args)(Object*, int); extern double (*nrnpy_guigetval)(Object*); extern void (*nrnpy_guisetval)(Object*, double); extern int (*nrnpy_guigetstr)(Object*, char**); extern char* (*nrnpy_po2pickle)(Object*, size_t* size); extern Object* (*nrnpy_pickle2po)(char*, size_t size); extern char* (*nrnpy_callpicklef)(char*, size_t size, int narg, size_t* retsize); extern int (*nrnpy_pysame)(Object*, Object*); // contain same Python object extern Object* (*nrnpympi_alltoall)(Object*, int); typedef struct { PyObject_HEAD Section* sec_; char* name_; PyObject* cell_; } NPySecObj; extern NPySecObj* newpysechelp(Section* sec); extern void (*nrnpy_call_python_with_section)(Object*, Section*); void nrnpython_reg_real(); PyObject* nrnpy_ho2po(Object*); void nrnpy_decref_defer(PyObject*); PyObject* nrnpy_pyCallObject(PyObject*, PyObject*); Object* nrnpy_po2ho(PyObject*); static void py2n_component(Object*, Symbol*, int, int); static void hpoasgn(Object*, int); static double praxis_efun(Object*, Object*); static int hoccommand_exec(Object*); static int hoccommand_exec_strret(Object*, char*, int); static void grphcmdtool(Object*, int, double, double, int); static double func_call(Object*, int, int*); static Object* callable_with_args(Object*, int); static double guigetval(Object*); static void guisetval(Object*, double); static int guigetstr(Object*, char**); static char* po2pickle(Object*, size_t* size); static Object* pickle2po(char*, size_t size); static char* call_picklef(char*, size_t size, int narg, size_t* retsize); static Object* py_alltoall(Object*, int); static int pysame(Object*, Object*); static PyObject* main_module; static PyObject* main_namespace; static hoc_List* dlist; #if NRNPYTHON_DYNAMICLOAD extern int nrnpy_site_problem; extern int* nrnpy_site_problem_p; #endif } class Py2Nrn { public: Py2Nrn(); virtual ~Py2Nrn(); int type_; // 0 toplevel PyObject* po_; }; static void* p_cons(Object*) { Py2Nrn* p = new Py2Nrn(); return p; } static void p_destruct(void* v) { delete (Py2Nrn*)v; } Member_func p_members[] = {0,0}; static void call_python_with_section(Object* pyact, Section* sec) { PyObject* po = ((Py2Nrn*)pyact->u.this_pointer)->po_; PyObject* r; PyLockGIL lock; PyObject* args = PyTuple_Pack(1, (PyObject*) newpysechelp(sec)); r = nrnpy_pyCallObject(po, args); Py_XDECREF(args); Py_XDECREF(r); } void nrnpython_reg_real() { //printf("nrnpython_reg_real()\n"); class2oc("PythonObject", p_cons, p_destruct, p_members, NULL, NULL, NULL); Symbol* s = hoc_lookup("PythonObject"); assert(s); nrnpy_pyobj_sym_ = s; nrnpy_py2n_component = py2n_component; nrnpy_call_python_with_section = call_python_with_section; nrnpy_hpoasgn = hpoasgn; nrnpy_praxis_efun = praxis_efun; nrnpy_hoccommand_exec = hoccommand_exec; nrnpy_hoccommand_exec_strret = hoccommand_exec_strret; nrnpy_cmdtool = grphcmdtool; nrnpy_func_call = func_call; nrnpy_callable_with_args = callable_with_args; nrnpy_guigetval = guigetval; nrnpy_guisetval = guisetval; nrnpy_guigetstr = guigetstr; nrnpy_po2pickle = po2pickle; nrnpy_pickle2po = pickle2po; nrnpy_callpicklef = call_picklef; nrnpympi_alltoall = py_alltoall; nrnpy_pysame = pysame; nrnpy_save_thread = save_thread; nrnpy_restore_thread = restore_thread; dlist = hoc_l_newlist(); #if NRNPYTHON_DYNAMICLOAD nrnpy_site_problem_p = &nrnpy_site_problem; #endif } Py2Nrn::Py2Nrn() { po_ = NULL; type_ = 0; // printf("Py2Nrn() %p\n", this); } Py2Nrn::~Py2Nrn() { PyLockGIL lock; Py_XDECREF(po_); // printf("~Py2Nrn() %p\n", this); } int nrnpy_ho_eq_po(Object* ho, PyObject* po) { if (ho->ctemplate->sym == nrnpy_pyobj_sym_) { return ((Py2Nrn*)ho->u.this_pointer)->po_ == po; } return 0; } int pysame(Object* o1, Object* o2) { if (o2->ctemplate->sym == nrnpy_pyobj_sym_) { return nrnpy_ho_eq_po(o1, ((Py2Nrn*)o2->u.this_pointer)->po_); } return 0; } PyObject* nrnpy_hoc2pyobject(Object* ho) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; if (!po) { if (!main_module) { main_module = PyImport_AddModule("__main__"); main_namespace = PyModule_GetDict(main_module); Py_INCREF(main_module); Py_INCREF(main_namespace); } po = main_module; } return po; } Object* nrnpy_pyobject_in_obj(PyObject* po) { Py2Nrn* pn = new Py2Nrn(); pn->po_ = po; Py_INCREF(po); pn->type_ = 1; Object* on = hoc_new_object(nrnpy_pyobj_sym_, (void*)pn); hoc_obj_ref(on); return on; } PyObject* nrnpy_pyCallObject(PyObject* callable, PyObject* args) { // When hoc calls a PythonObject method, then in case python // calls something back in hoc, the hoc interpreter must be // at the top level HocTopContextSet PyObject* p = PyObject_CallObject(callable, args); #if 0 printf("PyObject_CallObject callable\n"); PyObject_Print(callable, stdout, 0); printf("\nargs\n"); PyObject_Print(args, stdout, 0); printf("\nreturn %p\n", p); if (p) { PyObject_Print(p, stdout, 0); printf("\n");} #endif HocContextRestore return p; } void py2n_component(Object* ob, Symbol* sym, int nindex, int isfunc) { #if 0 if (isfunc) { printf("py2n_component %s.%s(%d)\n", hoc_object_name(ob), sym->name, nindex); }else{ printf("py2n_component %s.%s[%d]\n", hoc_object_name(ob), sym->name, nindex); } #endif int i; Py2Nrn* pn = (Py2Nrn*)ob->u.this_pointer; PyObject* head = pn->po_; PyObject* tail; PyLockGIL lock; if (pn->type_ == 0) { // top level if (!main_module) { main_module = PyImport_AddModule("__main__"); main_namespace = PyModule_GetDict(main_module); Py_INCREF(main_module); Py_INCREF(main_namespace); } tail = PyRun_String(sym->name, Py_eval_input, main_namespace, main_namespace); } else { Py_INCREF(head); if (strcmp(sym->name, "_") == 0) { tail = head; Py_INCREF(tail); } else { tail = PyObject_GetAttrString(head, sym->name); } } if (!tail) { PyErr_Print(); lock.release(); hoc_execerror("No attribute:", sym->name); } PyObject* args = 0; Object* on; PyObject* result = 0; if (isfunc) { args = PyTuple_New(nindex); for (i = 0; i < nindex; ++i) { PyObject* arg = nrnpy_hoc_pop(); // PyObject_Print(arg, stdout, 0); // printf(" %d arg %d\n", arg->ob_refcnt, i); if (PyTuple_SetItem(args, nindex - 1 - i, arg)) { assert(0); } } // printf("PyObject_CallObject %s %p\n", sym->name, tail); result = nrnpy_pyCallObject(tail, args); Py_DECREF(args); // PyObject_Print(result, stdout, 0); // printf(" result of call\n"); if (!result) { PyErr_Print(); lock.release(); hoc_execerror("PyObject method call failed:", sym->name); } } else if (nindex) { PyObject* arg; if (hoc_stack_type() == NUMBER) { arg = Py_BuildValue("l", (long)hoc_xpop()); } else { arg = nrnpy_hoc_pop(); } result = PyObject_GetItem(tail, arg); if (!result) { PyErr_Print(); lock.release(); hoc_execerror("Python get item failed:", hoc_object_name(ob)); } } else { result = tail; Py_INCREF(result); } // printf("py2n_component %s %d %s result refcount=%d\n", hoc_object_name(ob), // ob->refcount, sym->name, result->ob_refcnt); // if numeric, string, or python HocObject return those if (nrnpy_numbercheck(result)) { hoc_pop_defer(); PyObject* pn = PyNumber_Float(result); hoc_pushx(PyFloat_AsDouble(pn)); Py_XDECREF(pn); Py_XDECREF(result); } else if (is_python_string(result)) { char** ts = hoc_temp_charptr(); Py2NRNString str(result, true); *ts = str.c_str(); hoc_pop_defer(); hoc_pushstr(ts); // how can we defer the result unref til the string is popped nrnpy_decref_defer(result); } else { // PyObject_Print(result, stdout, 0); on = nrnpy_po2ho(result); hoc_pop_defer(); hoc_push_object(on); if (on) { on->refcount--; } Py_XDECREF(result); } Py_XDECREF(head); Py_DECREF(tail); } static void hpoasgn(Object* o, int type) { int nindex; Symbol* sym; PyObject* poleft; PyObject* poright; if (type == NUMBER) { poright = PyFloat_FromDouble(hoc_xpop()); } else if (type == STRING) { poright = Py_BuildValue("s", *hoc_strpop()); } else if (type == OBJECTVAR || type == OBJECTTMP) { Object** po2 = hoc_objpop(); poright = nrnpy_ho2po(*po2); hoc_tobj_unref(po2); } else { hoc_execerror("Cannot assign that type to PythonObject", (char*)0); } Object* stack_value = hoc_pop_object(); assert(o == stack_value); poleft = nrnpy_hoc2pyobject(o); sym = hoc_spop(); nindex = hoc_ipop(); // printf("hpoasgn %s %s %d\n", hoc_object_name(o), sym->name, nindex); if (nindex == 0) { PyObject_SetAttrString(poleft, sym->name, poright); } else if (nindex == 1) { PyObject* key = PyLong_FromDouble(hoc_xpop()); PyObject* a = PyObject_GetAttrString(poleft, sym->name); PyObject_SetItem(a, key, poright); Py_DECREF(a); Py_DECREF(key); } else { char buf[512]; sprintf(buf, "%s.%s[][]...=...:", hoc_object_name(o), sym->name); hoc_execerror( buf, "HOC cannot handle PythonObject assignment with more than one index."); } Py_DECREF(poright); // hoc_push_object(o); hoc_stkobj_unref(o); } void nrnpy_decref_defer(PyObject* po) { if (po) { #if 0 PyObject* ps = PyObject_Str(po); printf("defer %s\n", PyString_AsString(ps)); Py_DECREF(ps); #endif hoc_l_lappendvoid(dlist, (void*)po); } } #if (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 3) // copied from /Modules/_ctypes/_ctypes.c static PyObject* PyTuple_Pack(int n, ...) { int i; PyObject* o; PyObject* result; PyObject** items; va_list vargs; va_start(vargs, n); result = PyTuple_New(n); if (result == NULL) return NULL; items = ((PyTupleObject*)result)->ob_item; for (i = 0; i < n; i++) { o = va_arg(vargs, PyObject*); Py_INCREF(o); items[i] = o; } va_end(vargs); return result; } #endif static PyObject* hoccommand_exec_help1(PyObject* po) { PyObject* r; // PyObject_Print(po, stdout, 0); // printf("\n"); if (PyTuple_Check(po)) { PyObject* args = PyTuple_GetItem(po, 1); if (!PyTuple_Check(args)) { args = PyTuple_Pack(1, args); } // PyObject_Print(PyTuple_GetItem(po, 0), stdout, 0); // printf("\n"); // PyObject_Print(args, stdout, 0); // printf("\n"); // printf("threadstate %p\n", PyThreadState_GET()); r = nrnpy_pyCallObject(PyTuple_GetItem(po, 0), args); } else { r = nrnpy_pyCallObject(po, PyTuple_New(0)); } if (r == NULL) { PyErr_Print(); } return r; } static PyObject* hoccommand_exec_help(Object* ho) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; // printf("%s\n", hoc_object_name(ho)); return hoccommand_exec_help1(po); } static double praxis_efun(Object* ho, Object* v) { PyLockGIL lock; PyObject* pc = nrnpy_ho2po(ho); PyObject* pv = nrnpy_ho2po(v); PyObject* po = Py_BuildValue("(OO)", pc, pv); Py_XDECREF(pc); Py_XDECREF(pv); PyObject* r = hoccommand_exec_help1(po); PyObject* pn = PyNumber_Float(r); double x = PyFloat_AsDouble(pn); Py_XDECREF(pn); Py_XDECREF(r); Py_XDECREF(po); return x; } static int hoccommand_exec(Object* ho) { PyLockGIL lock; PyObject* r = hoccommand_exec_help(ho); if (r == NULL) { lock.release(); hoc_execerror("Python Callback failed", 0); } Py_XDECREF(r); return (r != NULL); } static int hoccommand_exec_strret(Object* ho, char* buf, int size) { PyLockGIL lock; PyObject* r = hoccommand_exec_help(ho); if (r) { PyObject* pn = PyObject_Str(r); Py2NRNString str(pn); Py_XDECREF(pn); strncpy(buf, str.c_str(), size); buf[size - 1] = '\0'; Py_XDECREF(r); } else { lock.release(); hoc_execerror("Python Callback failed", 0); } return (r != NULL); } static void grphcmdtool(Object* ho, int type, double x, double y, int key) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; PyObject* r; PyLockGIL lock; PyObject* args = PyTuple_Pack(4, PyInt_FromLong(type), PyFloat_FromDouble(x), PyFloat_FromDouble(y), PyInt_FromLong(key)); r = nrnpy_pyCallObject(po, args); Py_XDECREF(args); Py_XDECREF(r); } static Object* callable_with_args(Object* ho, int narg) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; PyLockGIL lock; PyObject* args = PyTuple_New((Py_ssize_t)narg); if (args == NULL) { lock.release(); hoc_execerror("PyTuple_New failed", 0); } for (int i = 0; i < narg; ++i) { PyObject* item = nrnpy_hoc_pop(); if (item == NULL) { Py_XDECREF(args); lock.release(); hoc_execerror("nrnpy_hoc_pop failed", 0); } if (PyTuple_SetItem(args, (Py_ssize_t)(narg - i - 1), item) != 0) { Py_XDECREF(args); lock.release(); hoc_execerror("PyTuple_SetItem failed", 0); } } PyObject* r = PyTuple_New(2); PyTuple_SetItem(r, 1, args); Py_INCREF(po); // when r is destroyed, do not want po refcnt to go to 0 PyTuple_SetItem(r, 0, po); Object* hr = nrnpy_po2ho(r); Py_XDECREF(r); return hr; } static double func_call(Object* ho, int narg, int* err) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; PyObject* r; PyLockGIL lock; PyObject* args = PyTuple_New((Py_ssize_t)narg); if (args == NULL) { lock.release(); hoc_execerror("PyTuple_New failed", 0); } for (int i = 0; i < narg; ++i) { PyObject* item = nrnpy_hoc_pop(); if (item == NULL) { Py_XDECREF(args); lock.release(); hoc_execerror("nrnpy_hoc_pop failed", 0); } if (PyTuple_SetItem(args, (Py_ssize_t)(narg - i - 1), item) != 0) { Py_XDECREF(args); lock.release(); hoc_execerror("PyTuple_SetItem failed", 0); } } r = nrnpy_pyCallObject(po, args); Py_XDECREF(args); double rval = 0.0; if (r == NULL) { if (!err || *err) { PyErr_Print(); }else{ PyErr_Clear(); } if (!err || *err) { lock.release(); hoc_execerror("func_call failed", 0); } if (err) { *err = 1; } }else{ if (nrnpy_numbercheck(r)) { PyObject* pn = PyNumber_Float(r); rval = PyFloat_AsDouble(pn); Py_XDECREF(pn); } Py_XDECREF(r); if (err) { *err = 0; } // success } return rval; } static double guigetval(Object* ho) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; PyLockGIL lock; PyObject* r = PyObject_GetAttr(PyTuple_GetItem(po, 0), PyTuple_GetItem(po, 1)); PyObject* pn = PyNumber_Float(r); double x = PyFloat_AsDouble(pn); Py_XDECREF(pn); return x; } static void guisetval(Object* ho, double x) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; PyLockGIL lock; PyObject* pn = PyFloat_FromDouble(x); if (PyObject_SetAttr(PyTuple_GetItem(po, 0), PyTuple_GetItem(po, 1), pn)) { ; } Py_XDECREF(pn); } static int guigetstr(Object* ho, char** cpp) { PyObject* po = ((Py2Nrn*)ho->u.this_pointer)->po_; PyLockGIL lock; PyObject* r = PyObject_GetAttr(PyTuple_GetItem(po, 0), PyTuple_GetItem(po, 1)); PyObject* pn = PyObject_Str(r); Py2NRNString name(pn); Py_DECREF(pn); char* cp = name.c_str(); if (*cpp && strcmp(*cpp, cp) == 0) { return 0; } if (*cpp) { delete[] * cpp; } *cpp = new char[strlen(cp) + 1]; strcpy(*cpp, cp); return 1; } static PyObject* loads; static PyObject* dumps; static void setpickle() { PyObject* pickle; if (!dumps) { #if PY_MAJOR_VERSION >= 3 pickle = PyImport_ImportModule("pickle"); #else pickle = PyImport_ImportModule("cPickle"); #endif if (pickle) { Py_INCREF(pickle); dumps = PyObject_GetAttrString(pickle, "dumps"); loads = PyObject_GetAttrString(pickle, "loads"); if (dumps) { Py_INCREF(dumps); Py_INCREF(loads); } } if (!dumps || !loads) { hoc_execerror("Neither Python cPickle nor pickle are available", 0); } } } // note that *size includes the null terminating character if it exists static char* pickle(PyObject* p, size_t* size) { PyObject* arg = PyTuple_Pack(1, p); PyObject* r = nrnpy_pyCallObject(dumps, arg); Py_XDECREF(arg); assert(r); #if PY_MAJOR_VERSION >= 3 assert(PyBytes_Check(r)); *size = PyBytes_Size(r); char* buf1 = PyBytes_AsString(r); #else char* buf1 = PyString_AsString(r); *size = PyString_Size(r) + 1; #endif char* buf = new char[*size]; for (int i = 0; i < *size; ++i) { buf[i] = buf1[i]; } Py_XDECREF(r); return buf; } static char* po2pickle(Object* ho, size_t* size) { setpickle(); if (ho && ho->ctemplate->sym == nrnpy_pyobj_sym_) { PyObject* po = nrnpy_hoc2pyobject(ho); char* buf = pickle(po, size); return buf; } else { return 0; } } static PyObject* unpickle(char* s, size_t size) { #if PY_MAJOR_VERSION >= 3 PyObject* ps = PyBytes_FromStringAndSize(s, size); #else PyObject* ps = PyString_FromString(s); #endif PyObject* arg = PyTuple_Pack(1, ps); PyObject* po = nrnpy_pyCallObject(loads, arg); assert(po); Py_XDECREF(arg); Py_XDECREF(ps); return po; } static Object* pickle2po(char* s, size_t size) { setpickle(); PyObject* po = unpickle(s, size); Object* ho = nrnpy_pyobject_in_obj(po); Py_XDECREF(po); return ho; } char* call_picklef(char* fname, size_t size, int narg, size_t* retsize) { // fname is a pickled callable, narg is the number of args on the // hoc stack with types double, char*, hoc Vector, and PythonObject // callable return must be pickleable. PyObject* args = 0; PyObject* result = 0; PyObject* callable; setpickle(); #if PY_MAJOR_VERSION >= 3 PyObject* ps = PyBytes_FromStringAndSize(fname, size); #else PyObject* ps = PyString_FromString(fname); #endif args = PyTuple_Pack(1, ps); callable = nrnpy_pyCallObject(loads, args); assert(callable); Py_XDECREF(args); Py_XDECREF(ps); args = PyTuple_New(narg); for (int i = 0; i < narg; ++i) { PyObject* arg = nrnpy_hoc_pop(); if (PyTuple_SetItem(args, narg - 1 - i, arg)) { assert(0); } // Py_XDECREF(arg); } result = nrnpy_pyCallObject(callable, args); Py_DECREF(callable); Py_DECREF(args); #if PY_MAJOR_VERSION >= 3 if (PyBytes_Check(result)) { #else if (!result) { #endif PyErr_Print(); hoc_execerror("PyObject method call failed:", 0); } char* rs = pickle(result, retsize); Py_XDECREF(result); return rs; } #include "nrnmpi.h" int* mk_displ(int* cnts) { int* displ = new int[nrnmpi_numprocs + 1]; displ[0] = 0; for (int i = 0; i < nrnmpi_numprocs; ++i) { displ[i + 1] = displ[i] + cnts[i]; } return displ; } Object* py_alltoall(Object* o, int size) { int np = nrnmpi_numprocs; PyObject* psrc = nrnpy_hoc2pyobject(o); if (!PyList_Check(psrc)) { hoc_execerror("Argument must be a Python list", 0); } if (PyList_Size(psrc) != np) { hoc_execerror("py_alltoall list size must be nhost", 0); } if (np == 1) { return o; } #if NRNMPI setpickle(); int* scnt = new int[np]; for (int i = 0; i < np; ++i) { scnt[i] = 0; } PyObject* pdest; PyObject* iterator = PyObject_GetIter(psrc); PyObject* p; size_t bufsz = 100000; // 100k buffer to start with if (size > 0) { // or else the positive number specified bufsz = size; } char* s = 0; if (size >= 0) { // otherwise count only s = new char[bufsz]; } int curpos = 0; for (int i = 0; (p = PyIter_Next(iterator)) != NULL; ++i) { if (p == Py_None) { scnt[i] = 0; Py_DECREF(p); continue; } size_t sz; char* b = pickle(p, &sz); if (size >= 0) { if (curpos + sz >= bufsz) { bufsz = bufsz * 2 + sz; char* s2 = new char[bufsz]; for (int i = 0; i < curpos; ++i) { s2[i] = s[i]; } delete[] s; s = s2; } for (int j = 0; j < sz; ++j) { s[curpos + j] = b[j]; } } curpos += sz; scnt[i] = sz; delete[] b; Py_DECREF(p); } Py_DECREF(iterator); // what are destination counts int* ones = new int[np]; for (int i = 0; i < np; ++i) { ones[i] = 1; } int* sdispl = mk_displ(ones); int* rcnt = new int[np]; nrnmpi_int_alltoallv(scnt, ones, sdispl, rcnt, ones, sdispl); delete[] ones; delete[] sdispl; // exchange sdispl = mk_displ(scnt); int* rdispl = mk_displ(rcnt); char* r = 0; if (size < 0) { pdest = PyTuple_New(2); PyTuple_SetItem(pdest, 0, Py_BuildValue("l", (long)sdispl[np])); PyTuple_SetItem(pdest, 1, Py_BuildValue("l", (long)rdispl[np])); delete[] scnt; delete[] sdispl; delete[] rcnt; delete[] rdispl; } else { r = new char[rdispl[np]]; nrnmpi_char_alltoallv(s, scnt, sdispl, r, rcnt, rdispl); delete[] s; delete[] scnt; delete[] sdispl; pdest = PyList_New(np); assert(pdest != NULL); for (int i = 0; i < np; ++i) { if (rcnt[i] == 0) { PyList_SetItem(pdest, i, Py_None); } else { PyObject* p = unpickle(r + rdispl[i], rcnt[i]); PyList_SetItem(pdest, i, p); } } delete[] r; delete[] rcnt; delete[] rdispl; } Object* ho = nrnpy_po2ho(pdest); --ho->refcount; return ho; #endif } neuron-7.5/src/nrnpython/nrnpy_reg.h000066400000000000000000000002411323325274500177000ustar00rootroot00000000000000extern "C" { extern myPyMODINIT_FUNC nrnpy_hoc(); extern myPyMODINIT_FUNC nrnpy_nrn(); static myPyMODINIT_FUNC (*nrnpy_reg_[])() = {nrnpy_hoc, nrnpy_nrn, 0}; } neuron-7.5/src/nrnpython/nrnpy_utils.h000066400000000000000000000027571323325274500203010ustar00rootroot00000000000000#ifndef nrnpy_utils_h #define nrnpy_utils_h #include #include inline bool is_python_string(PyObject* python_string) { return PyUnicode_Check(python_string) || PyBytes_Check(python_string); } class Py2NRNString { public: Py2NRNString(PyObject* python_string, bool disable_release = false) { disable_release_ = disable_release; str_ = NULL; if (PyUnicode_Check(python_string)) { PyObject* py_bytes = PyUnicode_AsASCIIString(python_string); str_ = strdup(PyBytes_AsString(py_bytes)); Py_XDECREF(py_bytes); } else if (PyBytes_Check(python_string)) { str_ = strdup(PyBytes_AsString(python_string)); } } ~Py2NRNString() { if (!disable_release_) { free(str_); } } inline char* c_str() const { return str_; } private: Py2NRNString(); Py2NRNString(const Py2NRNString&); Py2NRNString& operator=(const Py2NRNString&); char* str_; bool disable_release_; }; class PyLockGIL { public: PyLockGIL() : state_(PyGILState_Ensure()) , locked_(true) {} /* This is mainly used to unlock manually prior to a hoc_execerror() call * since this uses longjmp() */ void release() { assert(locked_); locked_ = false; PyGILState_Release(state_); } ~PyLockGIL() { release(); } private: PyLockGIL(const PyLockGIL&); PyLockGIL& operator=(const PyLockGIL&); PyGILState_STATE state_; bool locked_; /* check if double unlocking */ }; #endif /* end of include guard: nrnpy_utils_h */ neuron-7.5/src/nrnpython/nrnpython.cpp000066400000000000000000000173651323325274500203060ustar00rootroot00000000000000#include #include #include #include #if HAVE_IV #include #endif #include #include #include extern "C" { #include void nrnpython_real(); void nrnpython_start(int); extern int hoc_get_line(); extern HocStr* hoc_cbufstr; extern int nrnpy_nositeflag; extern char* hoc_ctp; extern FILE* hoc_fin; extern const char* hoc_promptstr; extern char* neuronhome_forward(); // extern char*(*PyOS_ReadlineFunctionPointer)(FILE*, FILE*, char*); #if (PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 4) static char* nrnpython_getline(FILE*, FILE*, const char*); #elif((PY_MAJOR_VERSION >= 3) || \ (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 2)) static char* nrnpython_getline(FILE*, FILE*, char*); #else static char* nrnpython_getline(char*); #endif extern void rl_stuff_char(int); extern int nrn_global_argc; extern char** nrn_global_argv; void nrnpy_augment_path(); int nrnpy_pyrun(const char*); extern int (*p_nrnpy_pyrun)(const char*); extern int nrn_global_argc; extern char** nrn_global_argv; #if NRNPYTHON_DYNAMICLOAD int nrnpy_site_problem; #endif } void nrnpy_augment_path() { static int augmented = 0; char buf[1024]; if (!augmented && strlen(neuronhome_forward()) > 0) { // printf("augment_path\n"); augmented = 1; sprintf(buf, "sys.path.append('%s/lib/python')", neuronhome_forward()); int err = PyRun_SimpleString("import sys"); assert(err == 0); err = PyRun_SimpleString(buf); assert(err == 0); sprintf(buf, "sys.path.prepend('')"); err = PyRun_SimpleString("sys.path.insert(0, '')"); assert(err == 0); } } int nrnpy_pyrun(const char* fname) { #ifdef MINGW #if PY_MAJOR_VERSION >= 3 // perhaps this should be the generic implementation char* cmd = new char[strlen(fname) + 40]; sprintf(cmd, "exec(open(\"%s\").read(), globals())", fname); int err = PyRun_SimpleString(cmd); delete [] cmd; if (err != 0) { PyErr_Print(); PyErr_Clear(); return 0; } return 1; #else // PY_MAJOR_VERSION < 3 /* http://www.megasolutions.net/python/How-to-receive-a-FILE--from-Python-under-MinGW_-38375.aspx Because microsoft C runtimes are not binary compatible, we can't just call fopen to get a FILE * and pass that FILE * to another application or library (Python25.dll in this case) that uses a different version of the C runtime that this DLL uses. Using PyFile_AsFile is a work-around... */ PyObject* pfo = PyFile_FromString((char*)fname, (char*)"r"); if (pfo == NULL) { PyErr_Print(); PyErr_Clear(); return 0; } else { char* cmd = NULL; if (PyRun_AnyFile(PyFile_AsFile(pfo), fname) == -1) { PyErr_Print(); PyErr_Clear(); Py_DECREF(pfo); if (cmd) { delete [] cmd; } return 0; } Py_DECREF(pfo); if (cmd) { delete [] cmd; } return 1; } #endif // PY_MAJOR_VERSION < 3 #else // MINGW not defined FILE* fp = fopen(fname, "r"); if (fp) { PyRun_AnyFile(fp, fname); fclose(fp); return 1; } else { fprintf(stderr, "Could not open %s\n", fname); return 0; } #endif // MINGW not defined } #if PY_MAJOR_VERSION >= 3 static wchar_t** copy_argv_wcargv(int argc, char** argv) { // adapted from frozenmain.c, left out error checking wchar_t** argv_copy = (wchar_t**)PyMem_Malloc(sizeof(wchar_t*) * argc); for (int i = 0; i < argc; ++i) { size_t argsize = strlen(argv[i]); argv_copy[i] = (wchar_t*)PyMem_Malloc((argsize + 1) * sizeof(wchar_t)); int count = mbstowcs(argv_copy[i], argv[i], argsize + 1); } return argv_copy; } #endif void nrnpython_start(int b) { #if USE_PYTHON static int started = 0; // printf("nrnpython_start %d started=%d\n", b, started); if (b == 1 && !started) { p_nrnpy_pyrun = nrnpy_pyrun; if (nrnpy_nositeflag) { Py_NoSiteFlag = 1; } // printf("Py_NoSiteFlag = %d\n", Py_NoSiteFlag); Py_Initialize(); #if NRNPYTHON_DYNAMICLOAD // return from Py_Initialize means there was no site problem nrnpy_site_problem = 0; #endif #if PY_MAJOR_VERSION >= 3 wchar_t** argv_copy = copy_argv_wcargv(nrn_global_argc, nrn_global_argv); PySys_SetArgv(nrn_global_argc, argv_copy); #else PySys_SetArgv(nrn_global_argc, nrn_global_argv); #endif started = 1; // see nrnpy_reg.h for (int i = 0; nrnpy_reg_[i]; ++i) { (*nrnpy_reg_[i])(); } nrnpy_augment_path(); } if (b == 0 && started) { PyGILState_STATE gilsav = PyGILState_Ensure(); Py_Finalize(); // because of finalize, no PyGILState_Release(gilsav); started = 0; } if (b == 2 && started) { int i; #if (PY_MAJOR_VERSION >= 3) // basically a copy of code from Modules/python.c wchar_t** argv_copy = (wchar_t**)PyMem_Malloc(sizeof(wchar_t*) * nrn_global_argc); if (!argv_copy) { fprintf(stderr, "out of memory\n"); exit(1); } for (i = 0; i < nrn_global_argc; ++i) { #ifdef HAVE_BROKEN_MBSTOWCS size_t argsize = strlen(argv[i]); #else size_t argsize = mbstowcs(NULL, nrn_global_argv[i], 0); #endif size_t count; if (argsize == (size_t)-1) { fprintf(stderr, "Could not convert argument %d to string\n", i); exit(1); } argv_copy[i] = (wchar_t*)PyMem_Malloc((argsize + 1) * sizeof(wchar_t)); if (!argv_copy[i]) { fprintf(stderr, "out of memory\n"); exit(1); } count = mbstowcs(argv_copy[i], nrn_global_argv[i], argsize + 1); if (count == (size_t)-1) { fprintf(stderr, "Could not convert argument %d to string\n", i); exit(1); } } PySys_SetArgv(nrn_global_argc, argv_copy); #else PySys_SetArgv(nrn_global_argc, nrn_global_argv); #endif nrnpy_augment_path(); #if !defined(MINGW) // cannot get this to avoid crashing with MINGW PyOS_ReadlineFunctionPointer = nrnpython_getline; #endif // Is there a -c "command" or file.py arg. for (i = 1; i < nrn_global_argc; ++i) { char* arg = nrn_global_argv[i]; if (strcmp(arg, "-c") == 0 && i + 1 < nrn_global_argc) { PyRun_SimpleString(nrn_global_argv[i + 1]); break; } else if (strlen(arg) > 3 && strcmp(arg + strlen(arg) - 3, ".py") == 0) { nrnpy_pyrun(arg); break; } } // In any case start interactive. // PyRun_InteractiveLoop(fopen("/dev/tty", "r"), "/dev/tty"); PyRun_InteractiveLoop(hoc_fin, "stdin"); } if (b == 3 && started) { #if HAVE_IV if (Session::instance()) { Session::instance()->quit(); rl_stuff_char(EOF); } #endif } #endif } void nrnpython_real() { int retval = 0; #if USE_PYTHON HocTopContextSet { PyLockGIL lock; retval = PyRun_SimpleString(gargstr(1)) == 0; } HocContextRestore #endif hoc_retpushx(double(retval)); } #if (PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 4) static char* nrnpython_getline(FILE*, FILE*, const char* prompt) { #elif((PY_MAJOR_VERSION >= 3) || \ (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 2)) static char* nrnpython_getline(FILE*, FILE*, char* prompt) { #else static char* nrnpython_getline(char* prompt) { #endif hoc_cbufstr->buf[0] = '\0'; hoc_promptstr = prompt; int r = hoc_get_line(); // printf("r=%d c=%d\n", r, hoc_cbufstr->buf[0]); if (r == 1) { size_t n = strlen(hoc_cbufstr->buf) + 1; hoc_ctp = hoc_cbufstr->buf + n - 1; #if (PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 4) char* p = (char*)PyMem_RawMalloc(n); #else char* p = (char*)PyMem_MALLOC(n); #endif if (p == 0) { return 0; } strcpy(p, hoc_cbufstr->buf); return p; } else if (r == EOF) { #if (PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 4) char* p = (char*)PyMem_RawMalloc(2); #else char* p = (char*)PyMem_MALLOC(2); #endif if (p == 0) { return 0; } p[0] = '\0'; return p; } return 0; } neuron-7.5/src/nrnpython/nrnpython.h000066400000000000000000000025511323325274500177420ustar00rootroot00000000000000#ifndef nrnpython_h #define nrnpython_h #ifdef _WIN64 #define MS_WIN64 #define MS_WIN32 #define MS_WINDOWS #endif #include <../../nrnconf.h> #include #if defined(NRNPYTHON_DYNAMICLOAD) && NRNPYTHON_DYNAMICLOAD >= 30 #define PY_LIMITED_API #endif #if defined(USE_PYTHON) #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE #if defined(__MINGW32__) //at least a problem with g++6.3.0 #define _hypot hypot #endif #include #if (PY_MAJOR_VERSION >= 3) #define myPyMODINIT_FUNC PyObject * #else #define myPyMODINIT_FUNC void #ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ #define PyMODINIT_FUNC void #endif /*PyMODINIT_FUNC*/ #ifndef PY_FORMAT_SIZE_T #define Py_ssize_t int #endif /*PY_FORMAT_SIZE_T*/ #endif /* PY_MAJOR_VERSION */ #endif /*USE_PYTHON*/ #if (PY_MAJOR_VERSION >= 3) #define PyString_FromString PyUnicode_FromString #define PyInt_Check PyLong_Check #define PyInt_CheckExact PyLong_CheckExact #define PyInt_AS_LONG PyLong_AsLong #define PyInt_AsLong PyLong_AsLong #define PyInt_FromLong PyLong_FromLong #endif #if defined(__cplusplus) extern "C" { #endif extern PyObject* nrnpy_hoc_pop(); extern int nrnpy_numbercheck(PyObject*); #if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ > __SIZEOF_LONG__ #define castptr2long (long)(long long) #else #define castptr2long (long) #endif #if defined(__cplusplus) } #endif #endif neuron-7.5/src/nrnpython/nrnpython_config.h.in000077500000000000000000000005761323325274500217040ustar00rootroot00000000000000#ifndef H_nrnpython_config_included #define H_nrnpython_config_included 1 /* Define if Python available */ #undef USE_PYTHON /* Define to sys.api_version if dynamic loading desired */ /* 1013 is good for 2.5-2.7 */ #undef NRNPYTHON_DYNAMICLOAD #ifndef NRNHOSTCPU /* Define to the nrnivmodl consistent cpu name */ #undef NRNHOSTCPU #endif #endif /* H_nrnpython_config_included */ neuron-7.5/src/nrnpython/rxd.c000066400000000000000000001134411323325274500164740ustar00rootroot00000000000000#include #include #include #include "grids.h" #include "rxd.h" #include #ifdef __APPLE__ #include #else #include #endif #define DIE(msg) exit(fprintf(stderr, "%s\n", msg)) #define SAFE_FREE(ptr){if(ptr!=NULL) free(ptr);} /* Globals */ /*Store the onset/offset for each threads reaction tasks*/ ReactGridData* threaded_reactions_tasks; int NUM_THREADS = 1; /*Update the global array of reaction tasks when the number of reactions *or threads change. *n - the old number of threads - use to free the old threaded_reactions_tasks*/ void refresh_reactions(int n) { int k; if(threaded_reactions_tasks != NULL) { for(k = 0; k next) { for(r = grid->reactions; r != NULL;) { free(r->species_states); if(r->subregion) free(r->subregion); tmp = r; r = r->next; free(tmp); } } refresh_reactions(NUM_THREADS); } /*Create a reaction * list_idx - the index for the linked list in the global array Parallel_grids * grid_id - the grid id within the linked list * ReactionRate - the reaction function * subregion - either NULL or a boolean array the same size as the grid * indicating if reaction occurs at a specific voxel */ Reaction* create_reaction(int list_idx, int grid_id, ReactionRate f, unsigned char* subregion) { Grid_node *grid; int i, j; Reaction* r = (Reaction*)malloc(sizeof(Reaction)); assert(r); r->reaction = f; for(grid = Parallel_grids[list_idx], i = 0; grid != NULL; grid = grid -> next, i++) { if(i==grid_id) { /*Place the reaction at the top of the stack `reactions` in Grid_node*/ r->next = grid->reactions; grid->reactions = r; if(subregion == NULL) { r->subregion = NULL; r->subregion_size = 0; } else { for(r->subregion_size=0, j=0; j < grid->size_x * grid->size_y * grid->size_z; j++) r->subregion_size += subregion[j]; r->subregion = subregion; } } } r->num_species_involved=i; r->species_states = (double**)malloc(sizeof(Grid_node*)*(r->num_species_involved)); assert(r->species_states); for(grid = Parallel_grids[list_idx], i = 0; grid != NULL; grid = grid -> next, i++) { /*Assumes grids are the same size (no interpolation) *Assumes all the species will be in the same Parallel_grids list*/ r->species_states[i] = grid->old_states; } return r; } /*register_reaction is called from python it creates a reaction with * list_idx - the index for the linked list in the global array Parallel_grids * (currently this is always 0) * grid_id - the grid id within the linked list - this corresponds to species * ReactionRate - the reaction function */ void register_reaction(int list_idx, int grid_id, ReactionRate f) { create_reaction(list_idx, grid_id, f, NULL); refresh_reactions(NUM_THREADS); } /*register_subregion_reaction is called from python it creates a reaction with * list_idx - the index for the linked list in the global array Parallel_grids * (currently this is always 0) * grid_id - the grid id within the linked list - this corresponds to species * my_subregion - a boolean array indicating the voxels where a reaction occurs * ReactionRate - the reaction function */ void register_subregion_reaction(int list_idx, int grid_id, unsigned char* my_subregion, ReactionRate f) { create_reaction(list_idx, grid_id, f, my_subregion); refresh_reactions(NUM_THREADS); } static int states_cvode_offset; void scatter_concentrations(void); static void update_boundaries_x(int i, int j, int k, int dj, int dk, double rate_x, double rate_y, double rate_z, int num_states_x, int num_states_y, int num_states_z, const double const* states, double* ydot); static void update_boundaries_y(int i, int j, int k, int di, int dk, double rate_x, double rate_y, double rate_z, int num_states_x, int num_states_y, int num_states_z, const double const* states, double* ydot); static void update_boundaries_z(int i, int j, int k, int di, int dj, double rate_x, double rate_y, double rate_z, int num_states_x, int num_states_y, int num_states_z, const double const* states, double* ydot); static int dg_adi(Grid_node g); static void _rhs_variable_step_helper(Grid_node* grid, const double const* states, double* ydot); fptr _setup, _initialize; /*create_threaded_reactions is used to generate evenly distribution of reactions * across NUM_THREADS * returns ReactGridData* which can be used as the global * threaded_reactions_tasks */ ReactGridData* create_threaded_reactions() { int i,k,load,reactions = 0,tasks_per_thread; Grid_node* grid; Reaction* react; /*Count the number of reactions*/ for(grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { for(react = grid->reactions; react != NULL; react = react -> next) { if(react->subregion) reactions += react->subregion_size; else reactions += grid->size_x * grid->size_y * grid->size_z; } } if(reactions == 0) return NULL; /*Divide the number of reactions between the threads*/ tasks_per_thread = reactions / NUM_THREADS; ReactGridData* tasks = (ReactGridData*)calloc(sizeof(ReactGridData), NUM_THREADS); tasks[0].onset = (ReactSet*)malloc(sizeof(ReactSet)); tasks[0].onset->grid = Parallel_grids[0]; tasks[0].onset->idx = 0; for(k = 0, load = 0, grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { for(i = 0; i < grid->size_x * grid->size_y * grid->size_z; i++) { for(react = grid->reactions; react != NULL; react = react -> next) { if(!react->subregion || react->subregion[i]) load++; if(load >= tasks_per_thread) { tasks[k].offset = (ReactSet*)malloc(sizeof(ReactSet)); tasks[k].offset->grid = grid; tasks[k++].offset->idx = i; tasks[k].onset = (ReactSet*)malloc(sizeof(ReactSet)); tasks[k].onset->grid = grid; tasks[k].onset->idx = i + 1; load = 0; } } } } return tasks; } /*do_reactions takes ReactGridData which defines the set of reactions to be * performed. It calculate the reaction based on grid->old_states and updates * grid->states */ void* do_reactions(void* dataptr) { ReactGridData task = *(ReactGridData*)dataptr; unsigned char started = FALSE, stop = FALSE; int i, j, start_idx, stop_idx; double* states_cache; double dt = *dt_ptr; Grid_node* grid; Reaction* react; for(grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { if(started || grid == task.onset->grid) { if(!started) { started = TRUE; start_idx = task.onset->idx; } else { start_idx = 0; } if(task.offset->grid == grid) { stop_idx = task.offset->idx; stop = TRUE; } else { stop_idx = grid->size_x * grid->size_y * grid->size_z; stop = FALSE; } for(i = start_idx; ireactions; react != NULL; react = react -> next) { if(!react->subregion || react->subregion[i]) { states_cache = (double*)malloc(sizeof(double)*react->num_species_involved); for(j = 0; j < react->num_species_involved; j++) { /*TODO: this assumes grids are the same size/shape * * add interpolation in case they aren't */ states_cache[j] = react->species_states[j][i]; } grid->states[i] += dt*(react->reaction(states_cache)); free(states_cache); } } } if(stop) return NULL; } } return NULL; } /* run_threaded_reactions * Array ReactGridData tasks length NUM_THREADS and calls do_reactions and * executes each task with a separate thread */ static void run_threaded_reactions(ReactGridData* tasks) { int k; pthread_t* thread = malloc(sizeof(pthread_t) * NUM_THREADS); assert(thread); /* launch threads */ for (k = 0; k < NUM_THREADS - 1; k++) { pthread_create(&thread[k], NULL, &do_reactions, &tasks[k]); } /* run one task in the main thread */ do_reactions(&tasks[NUM_THREADS - 1]); /* wait for them to finish */ for (k = 0; k < NUM_THREADS - 1; k++) { pthread_join(thread[k], NULL); } free(thread); } static void _fadvance_fixed_step(void) { Grid_node* grid; Py_ssize_t n, i; double* states; Current_Triple* c; double dt = (*dt_ptr); /* currents, via explicit Euler */ for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { states = grid->states; n = grid->num_currents; c = grid->current_list; /*divided the concentration by the volume fraction of the relevant voxel*/ if(grid->VARIABLE_ECS_VOLUME == VOLUME_FRACTION) { for (i = 0; i < n; i++) { states[c[i].destination] += dt * c[i].scale_factor * (*c[i].source)/grid->alpha[c[i].destination]; } } else { for (i = 0; i < n; i++) { states[c[i].destination] += dt * c[i].scale_factor * (*c[i].source)/grid->alpha[0]; } } memcpy(grid->old_states, states, sizeof(double) * grid->size_x * grid->size_y * grid->size_z); } /* TODO: implicit reactions*/ if(threaded_reactions_tasks != NULL) run_threaded_reactions(threaded_reactions_tasks); for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { switch(grid->VARIABLE_ECS_VOLUME) { case VOLUME_FRACTION: dg_adi_vol(*grid); break; case TORTUOSITY: dg_adi_tort(*grid); break; default: dg_adi(*grid); } } /* transfer concentrations */ scatter_concentrations(); } void scatter_concentrations(void) { /* transfer concentrations to classic NEURON */ Grid_node* grid; Py_ssize_t i, n; Concentration_Pair* cp; double* states; for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { states = grid->states; n = grid->num_concentrations; cp = grid->concentration_list; for (i = 0; i < n; i++) { (*cp[i].destination) = states[cp[i].source]; } } } /***************************************************************************** * * Begin variable step code * *****************************************************************************/ /* count the total number of state variables AND store their offset (passed in) in the cvode vector */ static int ode_count(const int offset) { int count = 0; states_cvode_offset = offset; Grid_node* grid; for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { count += grid->size_x * grid->size_y * grid->size_z; } return count; } static int find(const int x, const int y, const int z, const int size_y, const int size_z) { int index = z + y * size_z + x * size_z * size_y; return index; } static void _ode_reinit(double* y) { Grid_node* grid; Py_ssize_t i; int grid_size; double* grid_states; y += states_cvode_offset; for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { grid_states = grid->states; grid_size = grid->size_x * grid->size_y * grid->size_z; for (i = 0; i < grid_size; i++) { y[i] = grid_states[i]; } y += grid_size; } } static void _rhs_variable_step(const double t, const double* states, double* ydot) { Grid_node *grid; Py_ssize_t n, i; int grid_size; Current_Triple* c; double* grid_states; const double const* orig_states = states + states_cvode_offset; const int calculate_rhs = ydot == NULL ? 0 : 1; double* const orig_ydot = ydot + states_cvode_offset; states = orig_states; ydot = orig_ydot; /* prepare for advance by syncing data with local copy */ for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { grid_states = grid->states; grid_size = grid->size_x * grid->size_y * grid->size_z; /* start by clearing our part of ydot */ if (calculate_rhs) { for (i = 0; i < grid_size; i++) { ydot[i] = 0; } ydot += grid_size; } /* copy the passed in states to local memory (needed to make reaction rates correct) */ for (i = 0; i < grid_size; i++) { grid_states[i] = states[i]; } states += grid_size; } /* transfer concentrations to classic NEURON states */ scatter_concentrations(); if (!calculate_rhs) { return; } ydot = orig_ydot; states = orig_states; /* process currents */ for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { grid_states = grid->states; n = grid->num_currents; c = grid->current_list; grid_size = grid->size_x * grid->size_y * grid->size_z; for (i = 0; i < n; i++) { ydot[c[i].destination] += c[i].scale_factor * (*c[i].source); } ydot += grid_size; states += grid_size; } /* TODO: reactions */ ydot = orig_ydot; states = orig_states; /* do the diffusion rates */ for (grid = Parallel_grids[0]; grid != NULL; grid = grid -> next) { _rhs_variable_step_helper(grid, states, ydot); ydot += grid_size; states += grid_size; } } static void _rhs_variable_step_helper(Grid_node* grid, const double const* states, double* ydot) { int num_states_x = grid->size_x, num_states_y = grid->size_y, num_states_z = grid->size_z; double dc_x = grid->dc_x, dc_y = grid->dc_y, dc_z = grid->dc_z; double dx = grid->dx, dy = grid->dy, dz = grid->dz; int i, j, k, stop_i, stop_j, stop_k; double rate_x = dc_x / (dx * dx); double rate_y = dc_y / (dy * dy); double rate_z = dc_z / (dz * dz); /* Euler advance x, y, z (all internal points) */ stop_i = num_states_x - 1; stop_j = num_states_y - 1; stop_k = num_states_z - 1; for (i = 1; i < stop_i; i++) { for(j = 1; j < stop_j; j++) { for(k = 1; k < stop_k; k++) { int index = find(i, j, k, num_states_y, num_states_z); int prev_i = find(i-1, j, k, num_states_y, num_states_z); int prev_j = find(i, j-1, k, num_states_y, num_states_z); int prev_k = find(i, j, k-1, num_states_y, num_states_z); int next_i = find(i+1, j, k, num_states_y, num_states_z); int next_j = find(i, j+1, k, num_states_y, num_states_z); int next_k = find(i, j, k+1, num_states_y, num_states_z); ydot[index] += rate_x * (states[prev_i] - 2 * states[index] + states[next_i]); ydot[index] += rate_y * (states[prev_j] - 2 * states[index] + states[next_j]); ydot[index] += rate_z * (states[prev_k] - 2 * states[index] + states[next_k]); } } } /* boundary conditions for Z faces */ for(i = 1; i < stop_i; i++) { for(j = 1; j < stop_j; j++) { int index = find(i, j, 0, num_states_y, num_states_z); int prev_i = find(i-1, j, 0, num_states_y, num_states_z); int prev_j = find(i, j-1, 0, num_states_y, num_states_z); int next_i = find(i+1, j, 0, num_states_y, num_states_z); int next_j = find(i, j+1, 0, num_states_y, num_states_z); int next_k = find(i, j, 1, num_states_y, num_states_z); ydot[index] += rate_x * (states[prev_i] - 2 * states[index] + states[next_i]); ydot[index] += rate_y * (states[prev_j] - 2 * states[index] + states[next_j]); ydot[index] += rate_z * (states[next_k] - states[index]); index = find(i, j, stop_k, num_states_y, num_states_z); prev_i = find(i-1, j, stop_k, num_states_y, num_states_z); prev_j = find(i, j-1, stop_k, num_states_y, num_states_z); next_i = find(i+1, j, stop_k, num_states_y, num_states_z); next_j = find(i, j+1, stop_k, num_states_y, num_states_z); next_k = find(i, j, stop_k-1, num_states_y, num_states_z); ydot[index] += rate_x * (states[prev_i] - 2 * states[index] + states[next_i]); ydot[index] += rate_y * (states[prev_j] - 2 * states[index] + states[next_j]); ydot[index] += rate_z * (states[next_k] - states[index]); } } /* boundary conditions for X faces */ for(j = 1; j < stop_j; j++) { for(k = 1; k < stop_k; k++) { int index = find(0, j, k, num_states_y, num_states_z); int prev_j = find(0, j-1, k, num_states_y, num_states_z); int prev_k = find(0, j, k-1, num_states_y, num_states_z); int next_j = find(0, j+1, k, num_states_y, num_states_z); int next_k = find(0, j, k+1, num_states_y, num_states_z); int next_i = find(1, j, k, num_states_y, num_states_z); ydot[index] += rate_x * (states[next_i] - states[index]); ydot[index] += rate_y * (states[prev_j] - 2 * states[index] + states[next_j]); ydot[index] += rate_z * (states[prev_k] - 2 * states[index] + states[next_k]); index = find(stop_i, j, k, num_states_y, num_states_z); prev_j = find(stop_i, j-1, k, num_states_y, num_states_z); prev_k = find(stop_i, j, k-1, num_states_y, num_states_z); next_j = find(stop_i, j+1, k, num_states_y, num_states_z); next_k = find(stop_i, j, k+1, num_states_y, num_states_z); next_i = find(stop_i-1, j, k, num_states_y, num_states_z); ydot[index] += rate_x * (states[next_i] - states[index]); ydot[index] += rate_y * (states[prev_j] - 2 * states[index] + states[next_j]); ydot[index] += rate_z * (states[prev_k] - 2 * states[index] + states[next_k]); } } /* boundary conditions for Y faces */ for(i = 1; i < stop_i; i++) { for(k = 1; k < stop_k; k++) { int index = find(i, 0, k, num_states_y, num_states_z); int prev_i = find(i-1, 0, k, num_states_y, num_states_z); int prev_k = find(i, 0, k-1, num_states_y, num_states_z); int next_i = find(i+1, 0, k, num_states_y, num_states_z); int next_k = find(i, 0, k+1, num_states_y, num_states_z); int next_j = find(i, 1, k, num_states_y, num_states_z); ydot[index] += rate_x * (states[prev_i] - 2 * states[index] + states[next_i]); ydot[index] += rate_y * (states[next_j] - states[index]); ydot[index] += rate_z * (states[prev_k] - 2 * states[index] + states[next_k]); index = find(i, stop_j, k, num_states_y, num_states_z); prev_i = find(i-1, stop_j, k, num_states_y, num_states_z); prev_k = find(i, stop_j, k-1, num_states_y, num_states_z); next_i = find(i+1, stop_j, k, num_states_y, num_states_z); next_k = find(i, stop_j, k+1, num_states_y, num_states_z); next_j = find(i, stop_j-1, k, num_states_y, num_states_z); ydot[index] += rate_x * (states[prev_i] - 2 * states[index] + states[next_i]); ydot[index] += rate_y * (states[next_j] - states[index]); ydot[index] += rate_z * (states[prev_k] - 2 * states[index] + states[prev_k]); } } /* boundary conditions for edges */ for(i = 1; i < stop_i; i++) { update_boundaries_x(i, 0, 0, 1, 1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_x(i, stop_j, 0, -1, 1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_x(i, 0, stop_k, 1, -1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_x(i, stop_j, stop_k, -1, -1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); } for(j = 1; j < stop_j; j++) { update_boundaries_y(0, j, 0, 1, 1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_y(stop_i, j, 0, -1, 1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_y(0, j, stop_k, 1, -1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_y(stop_i, j, stop_k, -1, -1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); } for(k = 1; k < stop_k; k++) { update_boundaries_z(0, 0, k, 1, 1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_z(stop_i, 0, k, -1, 1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_z(0, stop_j, k, 1, -1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); update_boundaries_z(stop_i, stop_j, k, -1, -1, rate_x, rate_y, rate_z, num_states_x, num_states_y, num_states_z, states, ydot); } /* boundary conditions for corners */ int next_i, next_j, next_k; for(i = 0; i <= stop_i; i += stop_i) { for(j = 0; j <= stop_j; j += stop_j) { for(k = 0; k <= stop_k; k += stop_k) { int corner = find(i, j, k, num_states_y, num_states_z); if(!i) next_i = find(i+1, j, k, num_states_y, num_states_z); else next_i = find(i-1, j, k, num_states_y, num_states_z); if(!j) next_j = find(i, j+1, k, num_states_y, num_states_z); else next_j = find(i, j-1, k, num_states_y, num_states_z); if(!k) next_k = find(i, j, k+1, num_states_y, num_states_z); else next_k = find(i, j, k-1, num_states_y, num_states_z); ydot[corner] += rate_x * (states[next_i] - states[corner]); ydot[corner] += rate_y * (states[next_j] - states[corner]); ydot[corner] += rate_z * (states[next_k] - states[corner]); } } } } /* update x-dimension edge points */ /* function takes in combinations of j and k to represent the edges as well as 1 or -1 for dj and dk to indicate which adjacent location is still in bounds */ static void update_boundaries_x(int i, int j, int k, int dj, int dk, double rate_x, double rate_y, double rate_z, int num_states_x, int num_states_y, int num_states_z, const double const* states, double* ydot) { int edge = find(i, j, k, num_states_y, num_states_z); int prev_i = find(i-1, j, k, num_states_y, num_states_z); int next_i = find(i+1, j, k, num_states_y, num_states_z); int next_j = find(i, j + dj, k, num_states_y, num_states_z); int next_k = find(i, j, k + dk, num_states_y, num_states_z); ydot[edge] += rate_x * (states[prev_i] - 2 * states[edge] + states[next_i]); ydot[edge] += rate_y * (states[next_j] - states[edge]); ydot[edge] += rate_z * (states[next_k] - states[edge]); } /* update y-dimension edge points */ static void update_boundaries_y(int i, int j, int k, int di, int dk, double rate_x, double rate_y, double rate_z, int num_states_x, int num_states_y, int num_states_z, const double const* states, double* ydot) { int edge = find(i, j, k, num_states_y, num_states_z); int prev_j = find(i, j-1, k, num_states_y, num_states_z); int next_j = find(i, j+1, k, num_states_y, num_states_z); int next_i = find(i + di, j, k, num_states_y, num_states_z); int next_k = find(i, j, k + dk, num_states_y, num_states_z); ydot[edge] += rate_x * (states[next_i] - states[edge]); ydot[edge] += rate_y * (states[prev_j] - 2 * states[edge] + states[next_j]); ydot[edge] += rate_z * (states[next_k] - states[edge]); } /* update z-dimension edge points */ static void update_boundaries_z(int i, int j, int k, int di, int dj, double rate_x, double rate_y, double rate_z, int num_states_x, int num_states_y, int num_states_z, const double const* states, double* ydot) { int edge = find(i, j, k, num_states_y, num_states_z); int prev_k = find(i, j, k-1, num_states_y, num_states_z); int next_k = find(i, j, k+1, num_states_y, num_states_z); int next_i = find(i + di, j, k, num_states_y, num_states_z); int next_j = find(i, j + dj, k, num_states_y, num_states_z); ydot[edge] += rate_x * (states[next_i] - states[edge]); ydot[edge] += rate_y * (states[next_j] - states[edge]); ydot[edge] += rate_z * (states[prev_k] - 2 * states[edge] + states[next_k]); } /***************************************************************************** * * End variable step code * *****************************************************************************/ /* solve_dd_clhs_tridiag uses Thomas Algorithm to solves a * diagonally dominant tridiagonal matrix (Ax=b), where the * triple (lower, diagonal and upper) are repeated to form A. * N - length of the matrix * l_diag - lower diagonal * diag - diagonal * u_diag - upper diagonal * b - pointer to the RHS (length N) * lbc_diag - the lower boundary diagonal (the first diagonal element) * lbc_u_diag - the lower boundary upper diagonal (the first upper * diagonal element) * ubc_l_diag - the upper boundary lower diagonal (the last lower * diagonal element) * ubc_diag - the upper boundary diagonal (the last diagonal element) * The solution (x) is stored in b. * c - scratchpad array, N - 1 doubles long */ static int solve_dd_clhs_tridiag(const int N, const double l_diag, const double diag, const double u_diag, const double lbc_diag, const double lbc_u_diag, const double ubc_l_diag, const double ubc_diag, double* const b, double* const c) { /*could solve the difference equation rather than allocate memory*/ int i; c[0] = lbc_u_diag/lbc_diag; b[0] = b[0]/lbc_diag; for(i=1;i=0;i--) { b[i]=b[i]-c[i]*b[i+1]; } return 0; } /* dg_adi_x performs the first of 3 steps in DG-ADI * g - the parameters and state of the grid * dt - the time step * y - the index for the y plane * z - the index for the z plane * state - where the output of this step is stored * scratch - scratchpad array of doubles, length g.size_x - 1 */ static AdiLineData dg_adi_x(Grid_node g, const double dt, const int y, const int z, double const * const state, double* const scratch) { int yp,ym,zp,zm; int x; double *RHS = malloc(sizeof(double)*g.size_x); double r = g.dc_x*dt/SQ(g.dx); double div_y = (y==0||y==g.size_y-1)?2.:1., div_z = (z==0||z==g.size_z-1)?2.:1.; AdiLineData result; result.copyFrom = RHS; result.copyTo = IDX(0, y, z); /*zero flux boundary condition*/ yp = (y==g.size_y-1)?y-1:y+1; ym = (y==0)?y+1:y-1; zp = (z==g.size_z-1)?z-1:z+1; zm = (z==0)?z+1:z-1; RHS[0] = g.states[IDX(0,y,z)] + dt*((g.dc_x/SQ(g.dx))*(g.states[IDX(1,y,z)] - 2.*g.states[IDX(0,y,z)] + g.states[IDX(1,y,z)])/4. + (g.dc_y/SQ(g.dy))*(g.states[IDX(0,yp,z)] - 2.*g.states[IDX(0,y,z)] + g.states[IDX(0,ym,z)])/div_y + (g.dc_z/SQ(g.dz))*(g.states[IDX(0,y,zp)] - 2.*g.states[IDX(0,y,z)] + g.states[IDX(0,y,zm)])/div_z); for(x=1; x copyTo, k = 0; k < num_each_line; k++, j += offset) { state[j] = (myVal -> copyFrom)[k]; } free(myVal -> copyFrom); } } static void* do_dg_adi(void* dataptr) { AdiGridData* data = (AdiGridData*) dataptr; int start = data -> start; int stop = data -> stop; AdiLineData* vals = data -> vals; int i, j, k; double* state = data -> state; double dt = *dt_ptr; int sizej = data -> sizej; Grid_node g = data -> g; double* scratchpad = data -> scratchpad; AdiLineData (*dg_adi_dir)(Grid_node, double, int, int, double const *, double*) = data -> dg_adi_dir; for (k = start; k < stop; k++) { i = k / sizej; j = k % sizej; vals[k] = dg_adi_dir(g, dt, i, j, state, scratchpad); } return NULL; } void run_threaded_dg_adi(AdiGridData* tasks, pthread_t* thread, const int i, const int j, Grid_node g, double* state, AdiLineData* vals, AdiLineData (*dg_adi_dir)(Grid_node, double, int, int, double const *, double*), const int n) { int k; /* when doing any given direction, the number of tasks is the product of the other two, so multiply everything then divide out the current direction */ const int tasks_per_thread = (g.size_x * g.size_y * g.size_z / n + NUM_THREADS - 1) / NUM_THREADS; for (k = 0; k < NUM_THREADS; k++) { tasks[k].start = k * tasks_per_thread; tasks[k].stop = (k + 1) * tasks_per_thread; tasks[k].g = g; tasks[k].state = state; tasks[k].vals = vals; tasks[k].sizej = j; tasks[k].dg_adi_dir = dg_adi_dir; tasks[k].scratchpad = malloc(sizeof(double) * ((g.VARIABLE_ECS_VOLUME==VOLUME_FRACTION?2*n-1:n-1))); /*with variable volume fraction there are at most n additional points*/ } tasks[NUM_THREADS - 1].stop = i * j; /* launch threads */ for (k = 0; k < NUM_THREADS - 1; k++) { pthread_create(&thread[k], NULL, do_dg_adi, &tasks[k]); } /* run one task in the main thread */ do_dg_adi(&tasks[NUM_THREADS - 1]); /* wait for them to finish, free scratch space as they do */ for (k = 0; k < NUM_THREADS - 1; k++) { pthread_join(thread[k], NULL); free(tasks[k].scratchpad); } } /*DG-ADI implementation the 3 step process to diffusion species in grid g by time step *dt_ptr * g - the state and parameters */ static int dg_adi(Grid_node g) { double* state = malloc(sizeof(double) * g.size_x * g.size_y * g.size_z); AdiLineData* vals = malloc(sizeof(AdiLineData) * g.size_y * g.size_z); pthread_t* thread = malloc(sizeof(pthread_t) * NUM_THREADS); AdiGridData* tasks = malloc(sizeof(AdiGridData) * NUM_THREADS); assert(vals); assert(thread); assert(tasks); /* first step: advance the x direction */ run_threaded_dg_adi(tasks, thread, g.size_y, g.size_z, g, state, vals, dg_adi_x, g.size_x); /* transfer data */ dg_transfer_data(vals, state, g.size_x, g.size_y * g.size_z, g.size_y * g.size_z); /* Adjust memory */ free(vals); vals = malloc(sizeof(AdiLineData) * g.size_x * g.size_z); /* second step: advance the y direction */ run_threaded_dg_adi(tasks, thread, g.size_x, g.size_z, g, state, vals, dg_adi_y, g.size_y); /* transfer data */ dg_transfer_data(vals, state, g.size_y, g.size_x * g.size_z, g.size_z); /* Adjust memory */ free(vals); vals = malloc(sizeof(AdiLineData) * g.size_x * g.size_y); /* third step: advance the z direction */ run_threaded_dg_adi(tasks, thread, g.size_x, g.size_y, g, state, vals, dg_adi_z, g.size_z); /* transfer data directly into Grid_node values (g.states) */ dg_transfer_data(vals, g.states, g.size_z, g.size_x * g.size_y, 1); free(state); free(vals); free(thread); free(tasks); return 0; } /* TODO: this will need modified to also support intracellular rxd */ int rxd_nonvint_block(int method, int size, double* p1, double* p2, int thread_id) { switch (method) { case 0: _setup(); break; case 1: _initialize(); break; case 2: /* compute outward current to be subtracted from rhs */ break; case 3: /* conductance to be added to d */ break; case 4: /* fixed step solve */ _fadvance_fixed_step(); break; case 5: /* ode_count */ return ode_count(size); break; case 6: /* ode_reinit(y) */ _ode_reinit(p1); break; case 7: /* ode_fun(t, y, ydot); from t and y determine ydot */ _rhs_variable_step(*t_ptr, p1, p2); break; case 8: /* ode_solve(dt, t, b, y); solve mx=b replace b with x */ /* TODO: we can probably reuse the dgadi code here... for now, we do nothing, which implicitly approximates the Jacobian as the identity matrix */ break; case 9: /* ode_jacobian(dt, t, ypred, fpred); optionally prepare jacobian for fast ode_solve */ break; case 10: /* ode_abs_tol(y_abs_tolerance); fill with cvode.atol() * scalefactor */ break; default: printf("Unknown rxd_nonvint_block call: %d\n", method); break; } /* printf("method=%d, size=%d, thread_id=%d\n", method, size, thread_id); */ return 0; } void set_setup(const fptr setup_fn) { _setup = setup_fn; } void set_initialize(const fptr initialize_fn) { _initialize = initialize_fn; /*Setup threaded reactions*/ refresh_reactions(NUM_THREADS); printf("SET INITIALIZE\n"); } /* verbatim from nrnoc/ldifus.c; included as a copy for convenience TODO: if we don't ever need this, remove it */ static void nrn_tree_solve(double* a, double* d, double* b, double* rhs, int* pindex, int n) { /* treesolver a - above the diagonal d - diagonal b - below the diagonal rhs - right hand side, which is changed to the result pindex - parent indices n - number of states */ int i; /* triang */ for (i = n - 1; i > 0; --i) { int pin = pindex[i]; if (pin > -1) { double p; p = a[i] / d[i]; d[pin] -= p * b[i]; rhs[pin] -= p * rhs[i]; } } /* bksub */ for (i = 0; i < n; ++i) { int pin = pindex[i]; if (pin > -1) { rhs[i] -= b[i] * rhs[pin]; } rhs[i] /= d[i]; } } // double* states1; // double* states2; // double* states3; int num_states; neuron-7.5/src/nrnpython/rxd.h000066400000000000000000000020151323325274500164730ustar00rootroot00000000000000#include typedef void (*fptr)(void); typedef struct { Grid_node* grid; int idx; } ReactSet; typedef struct { ReactSet* onset; ReactSet* offset; } ReactGridData; typedef struct { double* copyFrom; long copyTo; } AdiLineData; typedef struct { int start, stop; AdiLineData* vals; double* state; Grid_node g; int sizej; AdiLineData (*dg_adi_dir)(Grid_node, double, int, int, double const *, double*); double* scratchpad; } AdiGridData; extern void set_num_threads(int); extern int get_num_threads(void); extern int dg_adi_vol(Grid_node g); extern int dg_adi_tort(Grid_node g); extern void dg_transfer_data(AdiLineData * const, double* const, int const, int const, int const); extern void run_threaded_dg_adi(AdiGridData*, pthread_t*, const int, const int, Grid_node, double*, AdiLineData*, AdiLineData (*dg_adi_dir)(Grid_node, double, int, int, double const *, double*), const int n); extern ReactGridData* create_threaded_reactions(void); extern void* do_reactions(void*); neuron-7.5/src/nrnpython/rxd_vol.c000066400000000000000000000543341323325274500173610ustar00rootroot00000000000000#include #include #include "grids.h" #include "rxd.h" #include #ifdef __APPLE__ #include #else #include #endif /*Tortuous diffusion coefficients*/ #define DcX(x,y,z) (g.dc_x/LAMBDA(x,y,z)) #define DcY(x,y,z) (g.dc_y/LAMBDA(x,y,z)) #define DcZ(x,y,z) (g.dc_z/LAMBDA(x,y,z)) /*Flux in the x,y,z directions*/ #define Fxx(x1,x2) (ALPHA(x1,y,z)*g.dc_x*(g.states[IDX(x1,y,z)] - g.states[IDX(x2,y,z)])/LAMBDA(x1,y,z)) #define Fxy(y1,y1d,y2) (ALPHA(x,y1d,z)*g.dc_y*(g.states[IDX(x,y1,z)] - g.states[IDX(x,y2,z)])/LAMBDA(x,y1d,z)) #define Fxz(z1,z1d,z2) (ALPHA(x,y,z1d)*g.dc_z*(g.states[IDX(x,y,z1)] - g.states[IDX(x,y,z2)])/LAMBDA(x,y,z1d)) #define Fyy(y1,y2) (ALPHA(x,y1,z)*g.dc_y*(g.states[IDX(x,y1,z)] - g.states[IDX(x,y2,z)])/LAMBDA(x,y1,z)) #define Fzz(z1,z2) (ALPHA(x,y,z1)*g.dc_z*(g.states[IDX(x,y,z1)] - g.states[IDX(x,y,z2)])/LAMBDA(x,y,z1)) extern int NUM_THREADS; /* solve Ax=b where A is a diagonally dominant tridiagonal matrix * N - length of the matrix * l_diag - pointer to the lower diagonal (length N-1) * diag - pointer to diagonal (length N) * u_diag - pointer to the upper diagonal (length N-1) * B - pointer to the RHS (length N) * The solution (x) will be stored in B. * l_diag, diag and u_diag are not changed. * c - scratch pad, preallocated memory for (N-1) doubles */ static int solve_dd_tridiag(int N, const double* l_diag, const double* diag, const double* u_diag, double* b, double *c) { int i; c[0] = u_diag[0]/diag[0]; b[0] = b[0]/diag[0]; for(i=1;i=0;i--) { b[i]=b[i]-c[i]*b[i+1]; } return 0; } /* dg_adi_vol_x performs the first of 3 steps in DG-ADI * g - the parameters and state of the grid * dt - the time step * y - the index for the y plane * z - the index for the z plane * state - where the output of this step is stored * scratch - scratchpad array of doubles, length 2*g.size_x - 1 * like dg_adi_x except the grid has a variable volume fraction * g.alpha and my have variable tortuosity g.lambda */ static AdiLineData dg_adi_vol_x(Grid_node g, const double dt, const int y, const int z, double const * const state, double* const scratch) { int yp,ypd,ym,ymd,zp,zpd,zm,zmd,div_y,div_z; int i,x,N=2*g.size_x-1; double frac; unsigned char* fp = malloc(N*sizeof(unsigned char)); /*an array indicating if a point is an additional point (TRUE) that should not be stored in state *or and original point (FALSE) that should be stored in state*/ double *RHS; double *diag = malloc(N*sizeof(double)); double *l_diag = malloc((N-1)*sizeof(double)); double *u_diag = malloc((N-1)*sizeof(double)); double scale_lower=1., add_diag=0; AdiLineData result; result.copyFrom = diag; result.copyTo = IDX(0, y, z); for(x=0,i=0; x&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = oc$(EXEEXT) subdir = src/oc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h nrnmpiuse.h \ nrnrtuse.h nrnpthread.h $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @BUILD_MINGW_FALSE@liboc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__liboc_la_SOURCES_DIST = parse.y bksub.c getelm.c lineq.c subrows.c \ prmat.c code2.c debug.c ocerf.c fileio.c ftime.c getsym.c \ hoc.c hocedit.c math.c nonlin.c list.c regexp.c audit.c \ symbol.c version.c xred.c parallel.c functabl.c plot.c plt.c \ axis.c settext.c x.c fmenu.c termio.c isoc99.c nrnmpi_dynam.c \ scoprand.c isaac64.c mcran4.c nrnisaac.c nrnran123.c \ cygwinprt.c nrnfilewrap.c @BUILD_NRNMPI_DYNAMIC_TRUE@am__objects_1 = nrnmpi_dynam.lo am__objects_2 = isaac64.lo mcran4.lo nrnisaac.lo nrnran123.lo am_liboc_la_OBJECTS = parse.lo bksub.lo getelm.lo lineq.lo subrows.lo \ prmat.lo code2.lo debug.lo ocerf.lo fileio.lo ftime.lo \ getsym.lo hoc.lo hocedit.lo math.lo nonlin.lo list.lo \ regexp.lo audit.lo symbol.lo version.lo xred.lo parallel.lo \ functabl.lo plot.lo plt.lo axis.lo settext.lo x.lo fmenu.lo \ termio.lo isoc99.lo $(am__objects_1) scoprand.lo \ $(am__objects_2) cygwinprt.lo nrnfilewrap.lo liboc_la_OBJECTS = $(am_liboc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libocxt_la_LIBADD = am_libocxt_la_OBJECTS = code.lo hoc_init.lo hoc_oop.lo spinit.lo \ spinit1.lo spinit2.lo libocxt_la_OBJECTS = $(am_libocxt_la_OBJECTS) PROGRAMS = $(bin_PROGRAMS) am_oc_OBJECTS = ocmain.$(OBJEXT) ocnoiv.$(OBJEXT) nocable.$(OBJEXT) \ modlreg.$(OBJEXT) ockludge.$(OBJEXT) oc_OBJECTS = $(am_oc_OBJECTS) @BUILD_NRNMPI_DYNAMIC_FALSE@am__DEPENDENCIES_2 = \ @BUILD_NRNMPI_DYNAMIC_FALSE@ ../nrnmpi/libnrnmpi.la oc_DEPENDENCIES = libocxt.la liboc.la $(am__DEPENDENCIES_2) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = YLWRAP = $(top_srcdir)/ylwrap SOURCES = $(liboc_la_SOURCES) $(libocxt_la_SOURCES) $(oc_SOURCES) DIST_SOURCES = $(am__liboc_la_SOURCES_DIST) $(libocxt_la_SOURCES) \ $(oc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)nrnmpiuse.h.in nrnrtuse.h.in nrnpthread.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/nrnmpiuse.h.in \ $(srcdir)/nrnpthread.h.in $(srcdir)/nrnrtuse.h.in \ $(top_srcdir)/depcomp $(top_srcdir)/ylwrap parse.c parse.h DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = liboc.la libocxt.la nsrc = $(top_srcdir)/src includes = -I$(nsrc) -I$(nsrc)/memacs -I$(nsrc)/sparse -I$(nsrc)/nrnmpi $(X_CFLAGS) AM_CPPFLAGS = -DOOP=1 -DINTERVIEWS=1 -DHOC=1 $(includes) AM_CFLAGS = @MINGW_CFLAG@ RanFiles = isaac64.c mcran4.c nrnisaac.c nrnran123.c @BUILD_NRNMPI_DYNAMIC_FALSE@nrnmpila = ../nrnmpi/libnrnmpi.la @BUILD_NRNMPI_DYNAMIC_TRUE@nrnmpila = @BUILD_NRNMPI_DYNAMIC_FALSE@nrnmpidynam = @BUILD_NRNMPI_DYNAMIC_TRUE@nrnmpidynam = nrnmpi_dynam.c liboc_la_SOURCES = parse.y bksub.c getelm.c lineq.c subrows.c prmat.c \ code2.c debug.c ocerf.c fileio.c ftime.c \ getsym.c hoc.c hocedit.c math.c nonlin.c \ list.c regexp.c audit.c symbol.c \ version.c xred.c parallel.c functabl.c plot.c plt.c axis.c \ settext.c x.c fmenu.c termio.c isoc99.c $(nrnmpidynam)\ scoprand.c $(RanFiles) cygwinprt.c nrnfilewrap.c libocxt_la_SOURCES = code.c hoc_init.c hoc_oop.c \ spinit.c spinit1.c spinit2.c AM_YFLAGS = -d EXTRA_DIST = mk_hocusr_h.py hocusr.c macprt.c mswinprt.c system.c \ $(nrnmpidynam) @BUILD_MINGW_FALSE@liboc_la_LIBADD = $(X_LIBS) @BUILD_MINGW_TRUE@liboc_la_LIBADD = -lpthread oc_SOURCES = ocmain.c ocnoiv.c nocable.c modlreg.c ockludge.c oc_LDADD = libocxt.la liboc.la \ $(nrnmpila) \ @MEMACSLIBLA@ @NRN_READLINE_LIBS@ pkginclude_HEADERS = hoc.h hoclist.h hocdec.h hocassrt.h nrnisaac.h \ oc_ansi.h hocparse.h ocfunc.h ocmisc.h nrnjava.h hocgetsym.h \ nrnpthread.h hoc_membf.h nrnran123.h scoplib_ansi.h nrnapi.h noinst_HEADERS = code.h equation.h hocmodl.h hocstr.h \ profile.h redef.h parse.h mcran4.h nrnmpi.h nrnrt.h isaac64.h \ nrnfilewrap.h nrn_vsscanf.c classreg.h all: nrnmpiuse.h nrnrtuse.h nrnpthread.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/oc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/oc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): nrnmpiuse.h: stamp-h6 @test -f $@ || rm -f stamp-h6 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h6 stamp-h6: $(srcdir)/nrnmpiuse.h.in $(top_builddir)/config.status @rm -f stamp-h6 cd $(top_builddir) && $(SHELL) ./config.status src/oc/nrnmpiuse.h nrnrtuse.h: stamp-h7 @test -f $@ || rm -f stamp-h7 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h7 stamp-h7: $(srcdir)/nrnrtuse.h.in $(top_builddir)/config.status @rm -f stamp-h7 cd $(top_builddir) && $(SHELL) ./config.status src/oc/nrnrtuse.h nrnpthread.h: stamp-h8 @test -f $@ || rm -f stamp-h8 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h8 stamp-h8: $(srcdir)/nrnpthread.h.in $(top_builddir)/config.status @rm -f stamp-h8 cd $(top_builddir) && $(SHELL) ./config.status src/oc/nrnpthread.h distclean-hdr: -rm -f nrnmpiuse.h stamp-h6 nrnrtuse.h stamp-h7 nrnpthread.h stamp-h8 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } parse.h: parse.c @if test ! -f $@; then rm -f parse.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parse.c; else :; fi liboc.la: $(liboc_la_OBJECTS) $(liboc_la_DEPENDENCIES) $(EXTRA_liboc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(liboc_la_OBJECTS) $(liboc_la_LIBADD) $(LIBS) libocxt.la: $(libocxt_la_OBJECTS) $(libocxt_la_DEPENDENCIES) $(EXTRA_libocxt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libocxt_la_OBJECTS) $(libocxt_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list oc$(EXEEXT): $(oc_OBJECTS) $(oc_DEPENDENCIES) $(EXTRA_oc_DEPENDENCIES) @rm -f oc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(oc_OBJECTS) $(oc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/axis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bksub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cygwinprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmenu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functabl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getelm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsym.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hoc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hoc_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hoc_oop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocedit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isaac64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isoc99.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lineq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcran4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modlreg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nocable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonlin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnfilewrap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnisaac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnmpi_dynam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrnran123.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocerf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ockludge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocmain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocnoiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prmat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scoprand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spinit1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spinit2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subrows.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/termio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xred.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .y.c: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) nrnmpiuse.h \ nrnrtuse.h nrnpthread.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f parse.c -rm -f parse.h clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile code2.lo code.lo fileio.lo getsym.lo hoc.lo hoc_init.lo hoc_oop.lo \ list.lo nonlin.lo parallel.lo symbol.lo: parse.h code2.o code.o fileio.o getsym.o hoc.o hoc_init.o hoc_oop.o \ list.o nonlin.o parallel.o symbol.o: parse.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/oc/audit.c000077500000000000000000000143141323325274500153510ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include "hocassrt.h" static int doaudit; static FILE* faudit; static FILE* audit_pipe; typedef struct RetrieveAudit { int mode; int id; FILE* pipe; } RetrieveAudit; static RetrieveAudit retrieve_audit; static void pipesend(int type, const char *s); /* Notes: The goal is to support easy reconstruction of a simulation while realizing that the user may not know whether to save the information til she sees something that she feels is worth saving. If he does want to save then a saveaudit() command is issued. RCS checking of files In order to not delay the main process while managing rcs files (deciding whether a file needs to be checked in with rcsdiff and ci) we merely send the file name through a pipe to another process which will asynchronously maintain a list of xopen statements with the proper rcs version number. */ #define AUDIT_SCRIPT_DIR "$NEURONHOME/lib/auditscripts" #define AUDIT_DIR "AUDIT" static void hoc_audit_init(void) { #if !OCSMALL if (retrieve_audit.mode) { /* clean up. there must have been an execerror */ retrieve_audit.mode = 0; retrieve_audit.id = 0; if (retrieve_audit.pipe) { pclose(retrieve_audit.pipe); retrieve_audit.pipe = (FILE*)0; } } #endif } void hoc_audit_from_hoc_main1(int argc, const char **argv, const char **envp) { #if !OCSMALL /*ARGSUSED*/ int i; char buf[200]; hoc_on_init_register(hoc_audit_init); #if 0 if (getenv("HOCAUDIT")) { doaudit = 1; printf("auditing\n"); }else{ doaudit = 0; printf("no auditing\n"); } #endif if (!doaudit) { return; } /* since file open for entire session will have to make the name unique*/ sprintf(buf, "if [ ! -d %s ] ; then mkdir %s ; fi", AUDIT_DIR, AUDIT_DIR); assert(system(buf) >= 0); sprintf(buf, "mkdir %s/%d", AUDIT_DIR, hoc_pid()); assert(system(buf) >= 0); sprintf(buf, "%s/hocaudit.sh %d %s", AUDIT_SCRIPT_DIR, hoc_pid(), AUDIT_DIR); if ((audit_pipe = popen(buf, "w")) == (FILE*)0) { hoc_warning("Could not connect to hocaudit.sh via pipe:", buf); doaudit = 0; return; } if (hoc_saveaudit() == 0) { return; } fprintf(faudit, "/*\n"); for (i=0; i < argc; ++i) { fprintf(faudit, " %s", argv[i]); } fprintf(faudit, "\n*/\n"); fflush(faudit); for (i=1; i < argc; ++i) { if ( argv[i][0] != '-') { fprintf(faudit, "xopen(\"%s\")\n", argv[i]); hoc_audit_from_xopen1(argv[i], (char*)0); } } fprintf(faudit, "\n"); #endif } #if !OCSMALL static void pipesend(int type, const char *s) { int err; if (audit_pipe) { err = fprintf(audit_pipe, "%d %s\n", type, s); if (err == EOF) { hoc_warning("auditing failed in pipesend", "turning off"); doaudit = 0; audit_pipe = 0; return; } fflush(audit_pipe); } } #endif void hoc_audit_command(const char *buf) { #if !OCSMALL if(doaudit) { fprintf(faudit, "%s", buf); } #endif } void hoc_audit_from_xopen1(const char *fname, const char *rcs) { #if !OCSMALL if (!hoc_retrieving_audit() && doaudit && !rcs) { pipesend(1, fname); } #endif } void hoc_audit_from_final_exit(void) { #if !OCSMALL if (faudit) { fclose(faudit); faudit = 0; } if (audit_pipe) { pclose(audit_pipe); audit_pipe = 0; } doaudit = 0; #endif } void hoc_audit_from_emacs(const char *bufname, const char *filname) { #if !OCSMALL char fname[200]; char s[256]; FILE* f; extern char* hoc_pipegets(); static int n=0; if (!doaudit) { return; } sprintf(fname, "%s/%d/bf%d", AUDIT_DIR, hoc_pid(), n); if ((f = fopen(fname, "w")) == (FILE*)0) { hoc_warning("audit:Couldn't open temporary emacs buffer file:", fname); return; } while (hoc_pipegets(s, 256)) { fprintf(f, "%s", s); } fclose(f); sprintf(s, "%s %s %s", fname, bufname, filname); pipesend(2, s); n++; #endif } void hoc_Saveaudit(void) { int err; #if !OCSMALL err = hoc_saveaudit(); #endif hoc_ret(); hoc_pushx((double)err); } int hoc_saveaudit(void) { #if !OCSMALL static int n=0; char buf[200]; if (hoc_retrieving_audit() || !doaudit) { return 0; } if (faudit) { fclose(faudit); faudit = 0; sprintf(buf, "hocaudit%d", n); pipesend(3, buf); ++n; } sprintf(buf, "%s/%d/hocaudit%d", AUDIT_DIR, hoc_pid(), n); if ((faudit = fopen(buf, "w")) == (FILE*)0) { hoc_warning("NO audit. fopen failed for:", buf); doaudit = 0; return 0; } #endif return 1; } int hoc_retrieving_audit(void) { #if !OCSMALL return retrieve_audit.mode; #else return 0; #endif } void hoc_Retrieveaudit(void) { int err, id; #if !OCSMALL if (ifarg(1)) { id = (int)chkarg(1, 0., 1e7); }else{ id = 0; } #endif err = hoc_retrieve_audit(id); hoc_ret(); hoc_pushx((double)err); } static void xopen_audit(void) { #if !OCSMALL char buf[200], *bp; strcpy(buf, "rm "); bp = buf + strlen(buf); /* get the temporary file name */ assert(fgets(bp, 200, retrieve_audit.pipe)); /*printf("xopen_audit: %s", bp);*/ bp[strlen(bp) - 1] = '\0'; hoc_xopen1(bp, ""); #if 1 assert(system(buf) >= 0); #endif #endif } #ifdef NeXT int hoc_retrieve_audit(int id) /* I have no idea why... CMC */ #else int hoc_retrieve_audit(int id) #endif { #if !OCSMALL RetrieveAudit save; char buf[200]; char retdir[200]; save = retrieve_audit; /*printf("retrieve audit id=%d\n", id);*/ retrieve_audit.mode = 1; retrieve_audit.id = id; sprintf(buf, "%s/retrieve.sh %d %s", AUDIT_SCRIPT_DIR, id, AUDIT_DIR); if ((retrieve_audit.pipe = popen(buf, "r")) == (FILE*)0) { hoc_execerror("Could not connect via pipe:", buf); } assert(fgets(retdir, 200, retrieve_audit.pipe)); xopen_audit(); assert(!fgets(buf, 200, retrieve_audit.pipe)); /* pclose(retrieve_audit.pipe);*/ retrieve_audit = save; fprintf(stderr, "should now delete %s", retdir); #endif return 1; } void hoc_xopen_from_audit(const char *fname) { #if !OCSMALL char buf[200]; /* check the synchronization */ assert(fgets(buf, 200, retrieve_audit.pipe)); buf[strlen(buf)-1] = '\0'; if(strncmp(buf, fname, strlen(fname)) != 0) { fprintf(stderr, "Warning: xopen_from_audit files have different names %s %s\n", fname, buf); } xopen_audit(); #endif } void hoc_emacs_from_audit(void) { #if !OCSMALL int i; char buf[200]; /* check synchronization */ assert(fgets(buf, 200, retrieve_audit.pipe)); i = strncmp(buf, "em", 2); assert(i == 0); xopen_audit(); #endif } neuron-7.5/src/oc/axis.c000077500000000000000000000375121323325274500152140ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/axis.c,v 1.2 1999/01/04 13:04:55 hines Exp */ /* axis.c,v * Revision 1.2 1999/01/04 13:04:55 hines * fabs now from include math.h * * Revision 1.1.1.1 1994/10/12 17:22:06 hines * NEURON 3.0 distribution * * Revision 2.63 1993/11/04 15:55:48 hines * port to solaris2 (no more warnings) * * Revision 2.19 1993/02/02 10:34:03 hines * static functions declared before used * * Revision 1.9 92/10/29 09:19:17 hines * some errors in freeing objects fixed and replace usage of getarg for * non numbers. * * Revision 1.8 92/10/14 10:07:55 hines * move oc specific stuff out of axis.c and into code2.c * new argument function hoc_pgetarg checks for double pointer on stack * and returns it. * hoc_val_pointer(string) returns a pointer to the variable resulting * from parsing the string. * * Revision 1.7 92/10/09 12:13:51 hines * remove old style point process syntax * make hoc_run_expr(sym) much more general * added hoc_run_stmt(sym) as well * create them with hoc_parse_expr(char*, Symlist**) and * hoc_parse_stmt(char*, Symlist**) * * Revision 1.6 92/07/31 08:54:52 hines * following merged from hoc to oc * Stewart Jasloves contribution to axis labels. This can be invoked by * setting #define Jaslove 1. It is 0 by default. The 3rd and 6th arguments * of axis() may have a precision which specifies the number of digits * after the decimal point for axis labels. eg. 5.3 denotes 5 tic marks with * 3 digits after the decimal point for each tic label * * * Revision 1.5 92/04/15 11:22:16 hines * double hoc_run_expr(sym) returns value of expresssion in sym made by * hoc_parse_exper() * * Revision 1.4 92/04/09 12:39:52 hines * ready to add idplot usage with newgraph(), addgraph(), initgraph(), xgraph() * flushgraph(). * A facilitating function exists called * Symbol* hoc_parse_expr(char* str, Symlist** psymlist) which * return a procedure symbol which can be used as * hoc_execute(sym->u.u_proc->defn.in); * val = hoc_xpop(); * * Revision 1.3 92/03/19 08:57:01 hines * axis labels close to origin set to 0 so label not strange looking. * * Revision 1.2 91/10/18 14:39:40 hines * symbol tables now are type Symlist containing pointers to first and last * symbols. New symbols get added onto the end. * * Revision 1.1 91/10/11 11:11:28 hines * Initial revision * * Revision 4.17 91/03/18 10:38:43 hines * some builtin functions take address of varname. eg. regraph(&name) * regraph saves list of addresses for fast plotting * * Revision 4.11 91/01/23 17:54:20 hines * use emalloc * * Revision 3.99 90/09/18 13:14:31 hines * plotx() and ploty() functions added so that we can hang absolute * location stuff around a scaled point. * * Revision 3.96 90/09/04 08:30:55 hines * try to get dos and unix together again in one RCS directory * * Revision 3.93 90/08/09 09:19:21 hines * axis.c placement of labels slightly lowered to look good with FIG * * Revision 3.83 90/07/25 10:39:56 hines * almost lint free on sparc 1+ under sunos 4.1 * * Revision 3.82 90/07/25 08:51:10 hines * sun uses color in graph * * Revision 3.53 90/03/22 16:22:18 jamie * correct error with checkin * * Revision 3.47 90/03/22 15:22:18 jamie * Jamie's Additions stopwatch and settext. * * Revision 3.46 90/01/24 06:35:48 mlh * emalloc() and ecalloc() are macros which return null if out of space * and then call execerror. This ensures that pointers are set to null. * If more cleanup necessary then use hoc_Emalloc() followed by hoc_malchk() * * Revision 3.29 89/10/19 06:54:44 mlh * printing directed through plprint(string) instead * of detailed routing at each place * * Revision 3.7 89/07/13 08:20:25 mlh * stack functions involve specific types instead of Datum * * Revision 3.4 89/07/12 10:25:54 mlh * Lint free * * Revision 3.3 89/07/10 15:44:02 mlh * Lint pass1 is silent. Inst structure changed to union. * * Revision 2.0 89/07/07 16:01:42 mlh * ready to add cable stuff * */ /* version 7.1.1 12/8/88 change graph to not interact with plot. Adding graphmode(mode). */ /* version 7.1.2 12/20/88 ordinate labels not positioned correctly on laser writer because leading spaces not printed */ /* version 7.1.3 12/29/88 sometimes doesn't return to last point after flushing because call to axis from setup can destroy xsav and ysav */ /* version 7.2.1 2-jan-89 make sure graph(t) and graphmode dont try to do anything when graph list is empty. Replace onerr with static badgraph which is one when graph is empty. */ #include #include #include #include "hoc.h" # define CLIP 1e9 # define XS 500. # define YS 400. # define XO 100. # define YO 100. # define Ret(a) hoc_ret(); hoc_pushx(a); /* This makes it easier to save and restore the 8 plot scale parameters*/ #define NPARAM 10 static double param[NPARAM] = { XO, YO, XS, YS, -1e9,-1e9,1e9,1e9,0.0,0.0 }; #define xorg param[0] #define yorg param[1] #define xscale param[2] #define yscale param[3] #define xlow param[4] #define ylow param[5] #define xhigh param[6] #define yhigh param[7] #define xsav param[8] #define ysav param[9] static double XSIZE=XS, YSIZE=YS, XORG=XO, YORG=YO; static double xstart=0., xstop=1., ystart=0., ystop=1.; static double xinc=1., yinc=1.; static double lastmode=1; static double clip=CLIP; static int grphing=0; /* flag true if multiple graphs */ static int SaveForRegraph=0; static int regraph_index; static int max_regraph_index = 1000; static int regraph_narg[1000]; static int regraph_mode[1000]; static int regraph_color[1000]; static double regraph_x[1000]; static double *regraph_y[1000]; static int PLOT(int, int, double, double); static void free_graph(void); static void plotstream(int, int, double); static void plotflush(int); static void do_setup(void); void hoc_regraph(void) { if (regraph_index < max_regraph_index) { regraph_y[regraph_index] = hoc_pgetarg(1); regraph_index++; } Ret(1.) } static void open_regraph(void){ SaveForRegraph=1; regraph_index = 0; } static void close_regraph(void) { SaveForRegraph=0; } static void do_regraph(void) { int i; for (i=0; i= xlow && y <=yhigh && y >= ylow) { plt(mode, x, y); } else if (mode > 0) { lastmode = 1; ok = 0; } return ok; } void hoc_plotx(void) { double val; val = xorg + *getarg(1)*xscale; Ret(val); } void hoc_ploty(void) { double val; val = yorg + *getarg(1)*yscale; Ret(val); } # define WIDTH 10. # define HEIGHT 10. void hoc_axis(void) { #if DOS extern int newstyle; extern unsigned text_style, text_orient, text_size; #endif int width, height; double x, y; double i, j, offset; char s[200]; double x0, y0; #define Jaslove 0 #if Jaslove /* tick mark values are printed with the precision indicated in the call to axis() from hoc. For example, if x ticks is 10.2 then the number of ticks (xinc) is 10, and the precision (xprec) is 2 decimal places. The first Sprintf() below builds the precision for the second Sprintf(), so in the above example values would essentially be output as printf("%.2f",x), in which x is the real value of the tick mark. */ char ss[6]; static double xprec=.1, yprec=.1; #endif /*Jaslove*/ if (ifarg(6)) { xstart = *getarg(1); xstop = *getarg(2); xinc = *getarg(3); ystart = *getarg(4); ystop = *getarg(5); yinc = *getarg(6); #if Jaslove xprec = xinc - floor(xinc); yprec = yinc - floor(yinc); #endif xinc = floor(xinc); yinc = floor(yinc); } else if (ifarg(4)) { XORG = *getarg(1); XSIZE = *getarg(2); YORG = *getarg(3); YSIZE = *getarg(4); } else if (ifarg(1)) { clip = *getarg(1); } xscale = XSIZE/(xstop - xstart); yscale = YSIZE/(ystop - ystart); xorg = XORG - xstart*xscale; yorg = YORG - ystart*yscale; xlow = xstop - clip*(xstop - xstart); xlow = xorg + xscale*xlow; xhigh = xstart + clip*(xstop - xstart); xhigh = xorg + xscale*xhigh; ylow = ystop - clip*(ystop - ystart); ylow = yorg + yscale*ylow; yhigh = ystart + clip*(ystop - ystart); yhigh = yorg + yscale*yhigh; if (xorg < XORG || xorg > XORG+XSIZE) x0 = XORG; else x0 = xorg; if (yorg < YORG || yorg > YORG+YSIZE) y0 = YORG; else y0 = yorg; if (!ifarg(1)) { plt(1,XORG,y0); for (x = xstart; x <= xstop+1e-10; x=x+(xstop-xstart)/xinc){ i = xorg + xscale*x; plt(2,i,y0); plt(2,i,y0+10.); plt(1,i,y0); } plt(1,x0,YORG); for (y = ystart; y <= ystop+1e-10; y = y+(ystop-ystart)/yinc){ j = yorg + yscale*y; plt(2,x0,j); plt(2,x0+10.,j); plt(1,x0,j); } #if DOS if (newstyle) { settextstyle(text_style,text_orient,text_size); newstyle = 0; } width = textwidth("O")*1.5; height = textheight("O"); #else width = WIDTH; height = HEIGHT; #endif #if Jaslove Sprintf(ss, "%%%.1ff", xprec); #endif for (x = xstart; x <= xstop+1e-10; x=x + (xstop-xstart)/xinc){ i = xorg + xscale*x; #if Jaslove Sprintf(s, ss, x); #else if (fabs(x) < 1e-10) { x = 0.; } Sprintf(s, "%g", x); #endif offset = width*(int)strlen(s)/2; if( i == x0 && y0 != YORG ) offset = -width/2; #if DOS plt(1,i-offset,y0-height); plt(-2,0.,0.); #else plt(1,i-offset,y0-1.5*height); plt(-2,0.,0.); #endif plprint(s); } #if Jaslove Sprintf(ss, "%%%.1ff", yprec); #endif for (y = ystart; y <= ystop+1e-10; y = y+(ystop-ystart)/yinc){ #if Jaslove Sprintf(s, ss, y); #else if (fabs(y) < 1e-10) { y = 0.; } Sprintf(s, "%g", y); #endif offset = width*(int)strlen(s) + width; j = yorg + yscale*y; if ( j == y0 && x0 != XORG ) #if DOS plt(1, x0-offset, j+height); #else plt(1, x0-offset, j+2.); #endif else #if DOS plt(1,x0-offset,j+height/2); #else plt(1,x0-offset,j-6.); #endif plt(-2,0.,0.); plprint(s); } plt(-1,0.,0.); } Ret(1.); } /* prior to version 7.1.1 graph connects with the plot functions in such a way that multiple line graphs can be generated by using the plot function in the same way that one creates a single plot. graph() starts a new list of expressions and setup statements graph("expr", "setup") adds this spec to the list graph(1) executes the setup statements graph(-1) flushes remaining part of graph version 7.1.1 graph(t) accumulates a point with this abscissa for all expr in list. graphmode(1) executes setup statements graphmode(-1) flushes remaining part of graph, next graphs with start new lines graphmode(2...) flushes, but next graphs don't start new lines */ /* local info for graph */ static int initialized; /* true if the setup statements have been executed*/ static Symlist *graph_sym_list; /*list of expressions and setup statements*/ #define MAXCNT 50 static int pcnt; /* points per plot already stored */ static int badgraph=1; /* graph data structure is no good or empty */ static double *lx; /* points to array which holds abscissa values */ typedef struct Grph { /* holds info for graphing */ struct Grph *g_next; /*next one in the queue*/ Symbol *g_sexp; /* symbol for the expression */ Symbol *g_setup; /* symbol for the setup statement */ int g_color; double g_param[NPARAM]; /* holds plot scale factors, etc. */ double g_val[MAXCNT]; /* y value buffer to plot */ } Grph; static Grph *glist_head, *glist_tail; /* access for the queue */ void hoc_Graph(void) { Grph *g; if (ifarg(2)) { if (badgraph) { free_graph(); } badgraph = 1; /* if this is not reset at end then we had an execerror*/ initialized = pcnt = 0; if (glist_head == (Grph *)0) { lx = (double *)emalloc(sizeof(double)*MAXCNT); } g = (Grph *)emalloc(sizeof(Grph)); g->g_next = (Grph *)0; g->g_sexp = g->g_setup = (Symbol *)0; if (glist_tail != (Grph *)0) { glist_tail->g_next = g; }else{ glist_head = g; } glist_tail = g; g->g_sexp = hoc_parse_expr(gargstr(1), &graph_sym_list); g->g_setup = hoc_parse_stmt(gargstr(2), &graph_sym_list); badgraph = 0; /* successful */ grphing = 1; }else if (ifarg(1) && !badgraph) { plotstream(2,2,*getarg(1)); }else{ free_graph(); badgraph = 1; } Ret(0.); } void hoc_Graphmode(void) { int mode; if (!badgraph) { mode = *getarg(1); if (mode == 1) { do_setup(); } if (mode == -1) { plotflush(1); } if (mode > 1 && pcnt > 0) { plotflush(2); } } Ret(0.); } static void free_graph(void) { Grph *g, *gnext; /* free all graph space and reinitialize */ hoc_free_list(&graph_sym_list); for (g = glist_head; g != (Grph *)0; g = gnext) { gnext = g->g_next; free((char *)g); } if (lx) { free((char *)lx); lx = (double *)0; } glist_head = glist_tail = (Grph *)0; grphing = initialized = pcnt = 0; } static void plotstream(int narg, int mode, double x) { Grph *g; if (narg == 1 || narg == 3) { plotflush(1); IGNORE(PLOT(narg, mode, xsav, ysav)); } if (pcnt >= MAXCNT) { plotflush(2); } if (narg == 2 || narg == 3) { lx[pcnt] = x; for (g = glist_head; g != (Grph *)0; g = g->g_next) { g->g_val[pcnt] = hoc_run_expr(g->g_sexp); } pcnt++; } } static void plotflush(int contin) { /* contin = 1 then flush after this will start with new points contin = 2 then it will start with last points of this flush */ int savcolor; int i, savmode; double parsav[NPARAM]; Grph *g; savmode = lastmode; if (!initialized) { do_setup(); } for (i=0; ig_next) { for (i=0; ig_param[i]; } if (color != g->g_color) { IGNORE(set_color(g->g_color)); } IGNORE(PLOT(1,1,0.,0.)); for (i=0; ig_val[i])); } if (contin == 2) { g->g_val[0] = g->g_val[pcnt-1]; } } for (i=0; i 0) { lx[0] = lx[pcnt-1]; pcnt = 1; IGNORE(PLOT(3,1,xsav,ysav)); /* last point of explicit plot */ } lastmode = savmode; if (contin == 1) { pcnt = 0; } } static void do_setup(void) { Grph *g; double parsav[NPARAM]; int i; int savcolor; for (i=0; ig_next) { hoc_run_stmt(g->g_setup); for (i=0; ig_param[i] = param[i]; } g->g_color = color; } for (i=0; i /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../sparse/bksub.c" neuron-7.5/src/oc/classreg.h000066400000000000000000000005571323325274500160540ustar00rootroot00000000000000#ifndef classreg_h #define classreg_h #include #include #include #if defined(__cplusplus) extern "C" { #endif extern void class2oc(const char*, void* (*cons)(Object*), void (*destruct)(void*), Member_func*, int (*checkpoint)(void**), Member_ret_obj_func*, Member_ret_str_func* ); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/code.c000077500000000000000000001561031323325274500151600ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/code.c,v 1.37 1999/07/03 14:20:21 hines Exp */ #if defined(__GO32__) #include #endif #include #include "hoc.h" #include "code.h" #include "hocstr.h" #include "parse.h" #include "ocfunc.h" #include "ocmisc.h" #include "hocparse.h" #include "equation.h" #include #include #include #include #include "nrnfilewrap.h" #if CABLE #include "options.h" #include "section.h" int bbs_poll_; extern void bbs_handle(void); #define BBSPOLL if (--bbs_poll_ == 0) { bbs_handle(); } int nrn_isecstack(); #else #define BBSPOLL /**/ #endif # define STACKCHK if (stackp >= stacklast) \ execerror("Stack too deep.", "Increase with -NSTACK stacksize option"); int tstkchk_actual(int i, int j) { int k, l; char *s[2]; if (i != j) { for (k =0, l=i; k<2; k++, l=j) { switch (l) { case NUMBER: s[k] = "(double)"; break; case STRING: s[k] = "(char *)"; break; case OBJECTVAR: s[k] = "(Object **)"; break; case USERINT: s[k] = "(int)"; break; case SYMBOL: s[k] = "(Symbol)"; break; case VAR: s[k] = "(double *)"; break; case OBJECTTMP: /* would use OBJECT if it existed */ s[k] = "(Object *)"; break; default: s[k] = "(Unknown)"; break; } } fprintf(stderr, "bad stack access: expecting %s; really %s\n", s[1], s[0]); execerror("interpreter stack type error", (char *)0); } return 0; } #define USEMACROS 1 #if USEMACROS #define pushxm(d) ((stackp++)->val = (d));((stackp++)->i = NUMBER) #define pushsm(d) ((stackp++)->sym = (d));((stackp++)->i = SYMBOL) #define xpopm() (tstkchk((--stackp)->i, NUMBER), (--stackp)->val) #define spopm() (tstkchk((--stackp)->i, SYMBOL), (--stackp)->sym) #define nopopm() (stackp -= 2) #define tstkchk(i,j) (((i)!=(j))?tstkchk_actual(i,j):0) #else #define pushxm(d) pushx(d) #define pushsm(d) pushs(d) #define xpopm() xpop() #define spopm() spop() #define nopopm() nopop() #define tstkchk(i,j) tstkchk_actual(i,j) #endif #define EPS hoc_epsilon #define NSTACK 1000 /* default size */ #define nstack hoc_nstack static Datum *stack; /* the stack */ static Datum *stackp; /* next free spot on stack */ static Datum *stacklast; /* last stack element */ #define NPROG 50000 Inst *prog; /* the machine */ Inst *progp; /* next free spot for code generation */ Inst *pc; /* program counter during execution */ Inst *progbase; /* start of current subprogram */ Inst *prog_parse_recover; /* start after parse error */ int hoc_returning; /* 1 if return stmt seen, 2 if break, 3 if continue */ /* 4 if stop */ typedef struct Frame { /* proc/func call stack frame */ Symbol *sp; /* symbol table entry */ Inst *retpc; /* where to resume after return */ Datum *argn; /* n-th argument on stack */ int nargs; /* number of arguments */ Inst *iter_stmt_begin; /* Iterator statement starts here */ Object *iter_stmt_ob; /* context of Iterator statement */ Object *ob; /* for stack frame debug message */ } Frame; #define NFRAME 512 /* default size */ #define nframe hoc_nframe static Frame *frame, *fp, *framelast; /* first, frame pointer, last */ /* temporary object references come from this pool. This allows the stack to be aware if it is storing a temporary. We are trying to solve problems of objrefs on the stack changing the object they point to and also a failure of garbage collection since temporary objrefs have not, in the past, been reffed or unreffed. The first problem is easily solved without much efficiency loss by having the stack store the object pointer instead of the objref pointer. Garbage collection is implemented by reffing any object that is placed on the stack via hoc_push_object (and thus borrows the use of the type OBJECTTMP) It is then the responsibility of everything that pops an object to determine whether the object should be unreffed. This is also done on error recovery and when the stack frame is popped. I hate the efficiency loss but it is not as bad as it could be since most popping occurs when the stack frame is popped and in this case it is faster to check for OBJECTTMP than if the returned Object** is from the pool. */ #define DEBUG_GARBAGE 1 #define TOBJ_POOL_SIZE 50 static Object** hoc_temp_obj_pool_; static int obj_pool_index_; static int tobj_count; /* how many stack pushes of OBJECTTMP have been reffed*/ /* Here is the old comment on the function when it was in hoc_oop.c. At this time we are dealing uniformly with object variables and cannot deal cleanly with objects. Eventually it may be possible to put an object pointer on the stack but not now. Try to avoid using "functions which return new objects" as arguments to other functions. If this is done then it may happen that when the stack pointer is finally used it may point to a different object than when it was put on the stack. Things are safe when a temp_objvar is finally removed from the stack. Memory leakage will occur if a temp_objvar is passed as an arg but never assigned to a full fledged object variable. ie its reference count is 0 but unref will never be called on it. The danger is illustrated with proc p(obj.func_returning_object()) { // $o1 is on the stack print $o1 // correct object for i=0,100 { o = obj.func_returning_different_object() print i, $o1 //when i=50 $o1 will be different } } In this case one should first assign $o1 to another object variable and then use that object variable exclusively instead of $o1. This also prevent leakage of the object pointed to by $o1. If this ever becomes a problem then it is not too difficult to implement objects on the stack with garbage collection. */ Object** hoc_temp_objptr(obj) Object* obj; { Object** tobj; obj_pool_index_ = (obj_pool_index_ + 1)%TOBJ_POOL_SIZE; tobj = hoc_temp_obj_pool_ + obj_pool_index_; *tobj = obj; return tobj; } /* should be called after finished with pointer from a popobj */ void hoc_tobj_unref(Object** p) { if (p >= hoc_temp_obj_pool_ && p < hoc_temp_obj_pool_ + TOBJ_POOL_SIZE) { --tobj_count; hoc_obj_unref(*p); } } /* vec.c.x[0] used freed memory because the temporary vector was unreffed after the x pointer was put on the stack but before it was evaluated. The hoc_pop_defer replaces the nopop in in hoc_object_component handling of a cplus steer method (which pushes a double pointer). The corresponding hoc_unref_defer takes place in hoc_object_eval after evaluating the pointer. This should take care of the most common (itself very rare) problem. However it still would not in general take care of the purposeless passing of &vec.c.x[0] as an argument to a function since intervening pop_defer/unref_defer pairs could take place. */ static Object* unref_defer_; void hoc_unref_defer(void) { if (unref_defer_) { #if 0 printf("hoc_unref_defer %s %d\n", hoc_object_name(unref_defer_), unref_defer_->refcount); #endif hoc_obj_unref(unref_defer_); unref_defer_ = (Object*)0; } } void hoc_pop_defer(void) { Object* obj; if (unref_defer_) { #if 0 printf("hoc_pop_defer unrefs %s %d\n", hoc_object_name(unref_defer_), unref_defer_->refcount); #endif hoc_unref_defer(); } if (stackp <= stack) execerror("stack underflow", (char *) 0); if (stackp[-1].i == OBJECTTMP) { unref_defer_ = stackp[-2].obj; if (unref_defer_) { ++unref_defer_->refcount; } #if 0 printf("hoc_pop_defer %s %d\n", hoc_object_name(unref_defer_), unref_defer_->refcount); #endif } hoc_nopop(); } /* should be called on each OBJECTTMP on the stack after adjusting the stack pointer downward */ void hoc_stkobj_unref(Object* o) { --tobj_count; hoc_obj_unref(o); } /* check the args of the frame and unref any of type OBJECTTMP */ static void frameobj_clean(Frame* f) { Datum* s; int i, narg; if (f->nargs == 0) { return; } s = f->argn + 2; for (i=f->nargs-1; i >= 0; --i) { if ((--s)->i == OBJECTTMP) { s->i = 0; hoc_stkobj_unref((--s)->obj); }else{ --s; } } } void hoc_init_space(void) /* create space for stack and code */ { if (nframe == 0) { nframe = NFRAME; } if (nstack == 0) { nstack = NSTACK; } stackp = stack = (Datum *)emalloc(sizeof(Datum)*nstack); stacklast = stack + nstack; progp = progbase = prog = (Inst *)emalloc(sizeof(Inst)*NPROG); fp = frame = (Frame *)emalloc(sizeof(Frame)*nframe); framelast = frame + nframe; hoc_temp_obj_pool_ = (Object**)emalloc(sizeof(Object*)*TOBJ_POOL_SIZE); } #define MAXINITFCNS 10 static int maxinitfcns; static Pfrv initfcns[MAXINITFCNS]; void hoc_prstack(void) { int i; Datum* s; printf("interpreter stack: %ld \n", (stackp - stack)/2); for (i=0, s = stackp - 1; s > stack; --s, ++i) { if (i > 10) { printf("...\n"); break; } printf("%d stacktype=%d\n", i, s->i); --s; } } void hoc_on_init_register(Pfrv pf) { /* modules that may have to be cleaned up after an execerror */ if (maxinitfcns < MAXINITFCNS) { initfcns[maxinitfcns++] = pf; }else{ fprintf(stderr, "increase definition for MAXINITFCNS\n"); nrn_exit(1); } } void initcode(void) /* initialize for code generation */ { int i; errno = 0; if (hoc_errno_count > 5) { fprintf(stderr, "errno set %d times on last execution\n", hoc_errno_count); } hoc_errno_count = 0; prog_parse_recover = progbase = prog; progp = progbase; hoc_unref_defer(); if (tobj_count) { while(fp < frame) { frameobj_clean(fp); --fp; } #if DEBUG_GARBAGE if (tobj_count) { printf("initcode failed with %d left\n", tobj_count); } #endif tobj_count = 0; } stackp = stack; fp = frame; free_list(&p_symlist); hoc_returning = 0; do_equation = 0; for (i=0; i < maxinitfcns; ++i) { (*initfcns[i])(); } #if CABLE nrn_initcode(); /* special requirements for NEURON */ #endif } static Frame *rframe; static Datum *rstack; static const char *parsestr; void oc_save_code( Inst* *a1, Inst* *a2, Datum* *a3, Frame* *a4, int *a5, int *a6, Inst* *a7, Frame* *a8, Datum* *a9, Symlist* *a10, Inst* *a11, int *a12 ){ *a1 = progbase; *a2 = progp; *a3 = stackp; *a4 = fp; *a5 = hoc_returning; *a6 = do_equation; *a7 = pc; *a8 = rframe; *a9 = rstack; *a10 = p_symlist; *a11 = prog_parse_recover; *a12 = tobj_count; } void oc_restore_code( Inst* *a1, Inst* *a2, Datum* *a3, Frame* *a4, int *a5, int *a6, Inst* *a7, Frame* *a8, Datum* *a9, Symlist* *a10, Inst* *a11, int *a12 ){ progbase = *a1; progp = *a2; if (tobj_count > *a12) { while(fp > *a4) { frameobj_clean(fp); --fp; } #if DEBUG_GARBAGE if (tobj_count != *a12) { printf("oc_restore_code tobj_count=%d should be %d\n", tobj_count, *a12); } #endif } stackp = *a3; fp = *a4; hoc_returning = *a5; do_equation = *a6; pc = *a7; rframe = *a8; rstack = *a9; p_symlist = *a10; prog_parse_recover = *a11; } int hoc_strgets_need(void) { return strlen(parsestr); } char* hoc_strgets(char* cbuf, int nc) {/* getc for a string, used by parser */ strncpy(cbuf, parsestr, nc); if (*parsestr == '\0') { return (char *)0; }else{ return cbuf; } } static void rinitcode(void) /* initialize for recursive code generation */ { errno = 0; hoc_errno_count = 0; prog_parse_recover = progbase; progp = progbase; stackp = rstack; fp = rframe; free_list(&p_symlist); if (hoc_returning != 4) { /* if stop not seen */ hoc_returning = 0; } do_equation = 0; } int hoc_ParseExec(int yystart) { /* can recursively parse and execute what is in cbuf. may parse single tokens. called from hoc_oc(str). All these parse and execute routines should be combined into a single method robust method. The pipeflag method has become encrusted with too many irrelevant mechanisms. There is no longer anything sacred about the cbuf. The only requiremnent is to tell the get line function where to get its string. */ int yret; Frame *sframe, *sfp; Inst *sprogbase, *sprogp, *spc, *sprog_parse_recover; Datum *sstackp, *sstack; Symlist *sp_symlist; if (yystart) { sframe=rframe;sfp=fp; sprogbase=progbase; sprogp=progp; spc=pc, sprog_parse_recover=prog_parse_recover; sstackp=stackp; sstack=rstack; sp_symlist=p_symlist; rframe = fp; rstack = stackp; progbase = progp; p_symlist = (Symlist *)0; } if (yystart) { rinitcode(); } if (hoc_in_yyparse) { hoc_execerror("Cannot reenter parser.", "Maybe you were in the middle of a direct command."); } yret = yyparse(); switch (yret) { case 1: execute(progbase); rinitcode(); break; case 'e': hoc_edit(); for (rinitcode(); hoc_yyparse(); rinitcode()) { execute(progbase); } break; case -3 : hoc_execerror("incomplete statement parse not allowed\n", (char*)0); default: break; } if (yystart) { rframe=sframe; fp=sfp; progbase=sprogbase; progp=sprogp; pc=spc; prog_parse_recover=sprog_parse_recover; stackp=sstackp; rstack=sstack; p_symlist=sp_symlist; } return yret; } int hoc_xopen_run(Symbol* sp, const char* str) { /*recursively parse and execute for xopen*/ /* if sp != 0 then parse string and save code */ /* without executing. Note str must be a 'list'*/ int n=0; Frame *sframe=rframe, *sfp=fp; Inst *sprogbase=progbase, *sprogp=progp, *spc=pc, *sprog_parse_recover=prog_parse_recover; Datum *sstackp=stackp, *sstack=rstack; Symlist *sp_symlist=p_symlist; rframe = fp; rstack = stackp; progbase = progp; p_symlist = (Symlist *)0; if (sp == (Symbol *)0) { for (rinitcode(); hoc_yyparse(); rinitcode()) execute(progbase); }else{ int savpipeflag; rinitcode(); savpipeflag = hoc_pipeflag; hoc_pipeflag = 2; parsestr=str; if(!hoc_yyparse()) { execerror("Nothing to parse", (char *)0); } n = (int)(progp-progbase); hoc_pipeflag = savpipeflag; hoc_define(sp); rinitcode(); } rframe=sframe; fp=sfp; progbase=sprogbase; progp=sprogp; pc=spc; prog_parse_recover=sprog_parse_recover; stackp=sstackp; rstack=sstack; p_symlist=sp_symlist; return n; } static char* stmp[128]; static int istmp = 0; char** hoc_temp_charptr(void) { istmp = (istmp+1)%128; return stmp+istmp; } int hoc_stack_type(void) { return stackp[-1].i; } void pushx(double d) { /* push double onto stack */ STACKCHK (stackp++)->val = d; (stackp++)->i = NUMBER; } void hoc_pushobj(Object** d) { /* push pointer to object pointer onto stack */ STACKCHK if (d >= hoc_temp_obj_pool_ && d < (hoc_temp_obj_pool_ + TOBJ_POOL_SIZE)) { hoc_push_object(*d); return; } (stackp++)->pobj = d; (stackp++)->i = OBJECTVAR; } void hoc_push_object(Object* d) { /* push pointer to object onto stack */ STACKCHK (stackp++)->obj = d; (stackp++)->i = OBJECTTMP; /* would use OBJECT if it existed */ hoc_obj_ref(d); ++tobj_count; } void hoc_pushstr(char** d) { /* push pointer to string pointer onto stack */ STACKCHK (stackp++)->pstr = d; (stackp++)->i = STRING; } void hoc_push_string(void) { /* code for pushing a symbols string */ Objectdata* odsav; Object* obsav = 0; Symlist* slsav; Symbol *s; s = (pc++)->sym; if (!s) { hoc_pushstr((char**) 0); return; } if (s->type == CSTRING) { hoc_pushstr(&(s->u.cstr)); }else{ if (s->public == 2) { s = s->u.sym; odsav = hoc_objectdata_save(); obsav = hoc_thisobject; slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; } hoc_pushstr(OPSTR(s)); if (obsav) { hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; } } } void hoc_pushpx(double* d) { /* push double pointer onto stack */ STACKCHK (stackp++)->pval = d; (stackp++)->i = VAR; } void pushs(Symbol* d) { /* push symbol pointer onto stack */ STACKCHK (stackp++)->sym = d; (stackp++)->i = SYMBOL; } void pushi(int d) { /* push integer onto stack */ STACKCHK (stackp++)->i = d; (stackp++)->i = USERINT; } int hoc_stacktype(void) { if (stackp <= stack) { execerror("stack empty", (char*)0); } return (stackp - 1)->i; } int hoc_argtype(int narg) { /* type of nth arg */ if (narg > fp->nargs) execerror(fp->sp->name, "not enough arguments"); return(fp->argn[(narg - fp->nargs)*2 + 1].i); } int hoc_is_double_arg(int narg) { return (hoc_argtype(narg) == NUMBER); } int hoc_is_pdouble_arg(int narg) { return (hoc_argtype(narg) == VAR); } int hoc_is_str_arg(narg) int narg; { return (hoc_argtype(narg) == STRING); } int hoc_is_object_arg(int narg) { int type = hoc_argtype(narg); return (type == OBJECTVAR || type == OBJECTTMP); } int hoc_is_tempobj_arg(int narg) { return (hoc_argtype(narg) == OBJECTTMP); } Datum* hoc_look_inside_stack(int i, int type) {/* stack pointer at depth i; i=0 is top */ tstkchk((stackp - 2*i - 1)->i, type); return stackp - 2*(i + 1); } Object* hoc_obj_look_inside_stack(int i) { /* stack pointer at depth i; i=0 is top */ Datum* d = stackp - 2*i - 2; int type = d[1].i; if (type == OBJECTTMP) { return d[0].obj; } tstkchk(type, OBJECTVAR); return *(d[0].pobj); } int hoc_inside_stacktype(int i) { /* 0 is top */ return (stackp - 2*i - 1)->i; } double xpop(void) { /* pop double and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; tstkchk(stackp->i, NUMBER); return (--stackp)->val; } #if 0 void pstack(void) { char* hoc_object_name(); Datum* d; int i; for (d=stackp; d > stack;) { i = (--d)->i; --d; switch(i) { case NUMBER: printf("(double)\n"); break; case STRING: printf("(char *)\n"); break; case OBJECTVAR: printf("(Object **) %s\n", hoc_object_name(*(d->pobj))); break; case USERINT: printf("(int)\n"); break; case SYMBOL: printf("(Symbol) %s\n", d->sym); break; case VAR: printf("(double *)\n"); break; case OBJECTTMP: /* would use OBJECT if it existed */ printf("(Object *) %s\n", hoc_object_name(d->obj)); break; default: printf("(Unknown)\n"); break; } } } #endif double* hoc_pxpop(void) {/* pop double pointer and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; tstkchk(stackp->i, VAR); return (--stackp)->pval; } Symbol* spop(void) {/* pop symbol pointer and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; tstkchk(stackp->i, SYMBOL); return (--stackp)->sym; } /* When using objpop, after dealing with the pointer, one should call hoc_tobj_unref(pobj) in order to prevent memory leakage since the object may have been reffed when it was pushed on the stack */ Object** hoc_objpop(void) {/* pop pointer to object pointer and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; if (stackp->i == OBJECTTMP) { return hoc_temp_objptr((--stackp)->obj); } tstkchk(stackp->i, OBJECTVAR); return (--stackp)->pobj; } Object* hoc_pop_object(void ) {/* pop object and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; tstkchk(stackp->i, OBJECTTMP); return (--stackp)->obj; } char** hoc_strpop(void) { /* pop pointer to string pointer and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; tstkchk(stackp->i, STRING); return (--stackp)->pstr; } int ipop(void) {/* pop symbol pointer and return top elem from stack */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; tstkchk(stackp->i, USERINT); return (--stackp)->i; } void nopop(void) {/* just pop the stack without returning anything */ if (stackp <= stack) execerror("stack underflow", (char *) 0); --stackp; if (stackp->i == OBJECTTMP) { stackp->i = 0; hoc_stkobj_unref((--stackp)->obj); }else{ --stackp; } } void constpush(void) /* push constant onto stack */ { pushxm(*((pc++)->sym)->u.pnum); } void pushzero(void) /* push zero onto stack */ { pushxm(0.); } void varpush(void) /* push variable onto stack */ { pushsm((pc++)->sym); } # define relative(pc) (pc + (pc)->i) void forcode(void) { double d; Inst *savepc = pc; /* loop body */ int isec; #if CABLE isec = nrn_isecstack(); #endif execute(savepc+3); /* condition */ d = xpopm(); while (d) { execute(relative(savepc)); /* body */ #if CABLE if (hoc_returning) {nrn_secstack(isec);} #endif if (hoc_returning == 1 || hoc_returning == 4) /* return or stop */ break; else if (hoc_returning == 2) /* break */ { hoc_returning = 0; break; } else /* continue */ hoc_returning = 0; if ((savepc+2)->i) /* diff between while and for */ execute(relative(savepc+2)); /* increment */ execute(savepc+3); d = xpopm(); } if (!hoc_returning) pc = relative(savepc+1); /* next statement */ } void shortfor(void) { Inst *savepc = pc; double begin, end, *pval=0; Symbol *sym; int isec; end = xpopm() + EPS; begin = xpopm(); sym = spopm(); switch (sym->type) { case UNDEF: hoc_execerror(sym->name, "undefined variable"); case VAR: if (!ISARRAY(sym)) { if (sym->subtype == USERINT) { execerror("integer iteration variable", sym->name); }else if (sym->subtype == USERDOUBLE) { pval = sym->u.pval; }else{ pval = OPVAL(sym); } break; } else { if (sym->subtype == USERINT) execerror("integer iteration variable", sym->name); else if (sym->subtype == USERDOUBLE) pval = sym->u.pval + araypt(sym, SYMBOL); else pval = OPVAL(sym) + araypt(sym, OBJECTVAR); } break; case AUTO: pval = &(fp->argn[sym->u.u_auto*2].val); break; default: execerror("for loop non-variable", sym->name); } #if CABLE isec = nrn_isecstack(); #endif for (*pval = begin; *pval<=end; *pval += 1.) { execute(relative(savepc)); #if CABLE if (hoc_returning) {nrn_secstack(isec);} #endif if (hoc_returning == 1 || hoc_returning == 4) { break; }else if (hoc_returning == 2) { hoc_returning = 0; break; }else{ hoc_returning = 0; } } if (!hoc_returning) pc =relative(savepc+1); } void hoc_iterator(void) { /* pc is ITERATOR symbol, argcount, stmtbegin, stmtend */ /* for testing execute stmt once */ Symbol* sym; int argcount; Inst* stmtbegin, *stmtend; sym = (pc++)->sym; argcount = (pc++)->i; stmtbegin = relative(pc); stmtend = relative(pc+1);; hoc_iterator_object(sym, argcount, stmtbegin, stmtend, hoc_thisobject); } void hoc_iterator_object( Symbol* sym, int argcount, Inst* beginpc, Inst* endpc, Object* ob ){ int i; fp++; if (fp >= framelast) { fp--; execerror(sym->name, "call nested too deeply, increase with -NFRAME framesize option"); } fp->sp = sym; fp->nargs = argcount; fp->retpc = endpc; fp->argn = stackp - 2; stackp += sym->u.u_proc->nauto * 2; /* clear the autoobject pointers */ for (i = sym->u.u_proc->nobjauto; i > 0; --i) { stackp[-2*i].obj = (Object*)0; } fp->iter_stmt_begin = beginpc; fp->iter_stmt_ob = ob; fp->ob = ob; STACKCHK execute(sym->u.u_proc->defn.in); nopop(); /* 0.0 from the procret() */ if (hoc_returning != 4) { hoc_returning = 0; } } void hoc_iterator_stmt(void) { Inst* pcsav; Object* ob; Object* obsav; Objectdata* obdsav; Symlist* slsav; int isec; Frame* iter_f = fp; /* iterator frame */ Frame* ef = fp - 1; /* iterator statement frame */ fp++; /* execution frame */ fp->sp = iter_f->sp; fp->ob = iter_f->ob; if (ef != frame) { /*SUPPRESS 26*/ fp->argn = ef->argn; fp->nargs = ef->nargs; }else{ /* top. only for stack trace */ fp->argn = 0; fp->nargs = 0; } ob = iter_f->iter_stmt_ob; obsav = hoc_thisobject; obdsav = hoc_objectdata_save(); slsav = hoc_symlist; hoc_thisobject = ob; if (ob) { hoc_objectdata = ob->u.dataspace; hoc_symlist = ob->template->symtable; }else{ hoc_objectdata = hoc_top_level_data; hoc_symlist = hoc_top_level_symlist; } pcsav = pc; #if CABLE isec = nrn_isecstack(); #endif execute(iter_f->iter_stmt_begin); pc = pcsav; hoc_objectdata = hoc_objectdata_restore(obdsav); hoc_thisobject = obsav; hoc_symlist = slsav; --fp; #if CABLE if (hoc_returning) {nrn_secstack(isec);} #endif switch (hoc_returning) { case 1: /* return means not only return from iter but return from the procedure containing the iter statement */ hoc_execerror("return from within an iterator statement not allowed.", "Set a flag and use break."); case 2: /* break means return from iter */ procret(); break; case 3: /* continue means go on from iter as though nothing happened*/ hoc_returning = 0; break; } } static void for_segment2(Symbol* sym, int mode) { /* symbol on stack; statement pointed to by pc continuation pointed to by pc+1. template used is shortfor in code.c of hoc system. */ #if CABLE int i, imax; Inst *savepc = pc; double *pval=0, dx; int isec; #if METHOD3 extern int _method3; #endif switch (sym->type) { case UNDEF: hoc_execerror(sym->name, "undefined variable"); case VAR: if (!ISARRAY(sym)) { if (sym->subtype == USERINT) execerror("integer iteration variable", sym->name); else if (sym->subtype == USERDOUBLE) pval = sym->u.pval; else pval = OPVAL(sym); break; } else { if (sym->subtype == USERINT) execerror("integer iteration variable", sym->name); else if (sym->subtype == USERDOUBLE) pval = sym->u.pval + araypt(sym, SYMBOL); else pval = OPVAL(sym) + araypt(sym, OBJECTVAR); } break; case AUTO: pval = &(fp->argn[sym->u.u_auto*2].val); break; default: execerror("for loop non-variable", sym->name); } imax = segment_limits(&dx); #if METHOD3 if (_method3) { for (i=0, *pval=0; i <= imax; i++) { if (mode == 0 && (i == imax || i == 0)) { continue; } if (i == imax) { *pval = 1.; } else { *pval = i * dx; } execute(relative(savepc)); if (hoc_returning == 1 || hoc_returning == 4) { break; }else if (hoc_returning == 2) { hoc_returning = 0; break; }else{ hoc_returning = 0; } } }else #endif { if (mode == 0) { i = 1; *pval = dx/2.; }else{ i = 0; *pval = 0.; } #if CABLE isec = nrn_isecstack(); #endif for (; i <= imax; i++) { if (i == imax) { if (mode == 0) { continue; } *pval = 1.; } execute(relative(savepc)); #if CABLE if (hoc_returning) {nrn_secstack(isec);} #endif if (hoc_returning == 1 || hoc_returning == 4) { break; }else if (hoc_returning == 2) { hoc_returning = 0; break; }else{ hoc_returning = 0; } if (i == 0) { *pval += dx/2.; } else if (i < imax) { *pval += dx; } } } if (!hoc_returning) pc =relative(savepc+1); #else execerror("for (var) {stmt} syntax only allowed in CABLE", (char *)0); #endif } void for_segment(void) { for_segment2(spopm(), 1); } void for_segment1(void) { Symbol* sym; double d; int mode; d = xpopm(); sym = spopm(); mode = (fabs(d)< EPS) ? 0 : 1; for_segment2(sym, mode); } void ifcode(void) { double d; Inst *savepc = pc; /* then part */ execute(savepc+3); /* condition */ d = xpopm(); if (d) execute(relative(savepc)); else if ((savepc+1)->i) /* else part? */ execute(relative(savepc+1)); if (!hoc_returning) pc = relative(savepc+2); /* next stmt */ } void Break(void) /* break statement */ { hoc_returning = 2; } void Continue(void) /* continue statement */ { hoc_returning = 3; } void Stop(void) /* stop statement */ { hoc_returning = 4; } void hoc_define(Symbol* sp) { /* put func/proc in symbol table */ Inst *inst, *newinst; if (sp->u.u_proc->defn.in != STOP) free((char *) sp->u.u_proc->defn.in); free_list(&(sp->u.u_proc->list)); sp->u.u_proc->list = p_symlist; p_symlist = (Symlist *)0; sp->u.u_proc->size =(unsigned)(progp - progbase); sp->u.u_proc->defn.in = (Inst *) emalloc((unsigned)(progp-progbase)*sizeof(Inst)); newinst = sp->u.u_proc->defn.in; for (inst = progbase; inst != progp; ) *newinst++ = *inst++; progp = progbase; /* next code starts here */ } void frame_debug(void) /* print the call sequence on an execerror */ { Frame *f; int i, j; char id[10]; if (nrnmpi_numprocs_world > 1) { sprintf(id, "%d ", nrnmpi_myid_world); }else{ id[0]='\0'; } for (i=5, f=fp; f != frame && --i; f=f-1) { /* print only to depth of 5 */ for (j=i; j; j--) { IGNORE(fputs(" ",stderr)); } if (f->ob) { Fprintf(stderr, "%s%s.%s(", id, hoc_object_name(f->ob), f->sp->name); }else{ Fprintf(stderr, "%s%s(", id, f->sp->name); } for (j=1; j<=f->nargs;) { switch(f->argn[(j - f->nargs)*2 + 1].i) { case NUMBER: Fprintf(stderr, "%g", f->argn[(j - f->nargs)*2].val); break; case STRING: { char* s = *f->argn[(j - f->nargs)*2].pstr; if(strlen(s) > 15) { Fprintf(stderr, "\"%.10s...\"", s); }else{ Fprintf(stderr, "\"%s\"", s); } } break; case OBJECTVAR: Fprintf(stderr, "%s", hoc_object_name(*f->argn[(j - f->nargs)*2].pobj)); break; default: Fprintf(stderr, "..."); break; } if (++j <= f->nargs) { fprintf(stderr, ", "); } } IGNORE(fputs(")\n", stderr)); } if (i <= 0) { Fprintf(stderr, "and others\n"); } } void push_frame(Symbol* sp, int narg) { /* helpful for explicit function calls */ if (++fp >= framelast) { --fp; execerror(sp->name, "call nested too deeply, increase with -NFRAME framesize option"); } fp->sp = sp; fp->nargs = narg; fp->argn = stackp - 2; /* last argument */ fp->ob = hoc_thisobject; } void pop_frame(void) { int i; frameobj_clean(fp); for (i = 0; i < fp->nargs; i++) nopopm(); /* pop arguments */ --fp; } void call(void) /* call a function */ { int i, isec; Symbol *sp = pc[0].sym; /* symbol table entry */ /* for function */ if (++fp >= framelast) { --fp; execerror(sp->name, "call nested too deeply, increase with -NFRAME framesize option"); } fp->sp = sp; fp->nargs = pc[1].i; fp->retpc = pc + 2; fp->ob = hoc_thisobject; /*SUPPRESS 26*/ fp->argn = stackp - 2; /* last argument */ BBSPOLL #if CABLE isec = nrn_isecstack(); #endif if (sp->type == FUN_BLTIN || sp->type == OBJECTFUNC || sp->type == STRINGFUNC) { stackp += sp->u.u_proc->nauto * 2; /* Offset stack for auto space */ STACKCHK (*(sp->u.u_proc->defn.pf))(); if (hoc_errno_check()) { hoc_warning("errno set during call of", sp->name); } } else if ((sp->type == FUNCTION || sp->type == PROCEDURE || sp->type == HOCOBJFUNCTION) && sp->u.u_proc->defn.in != STOP) { stackp += sp->u.u_proc->nauto * 2; /* Offset stack for auto space */ STACKCHK /* clear the autoobject pointers. */ for (i = sp->u.u_proc->nobjauto; i > 0; --i) { stackp[-2*i].obj = (Object*)0; } if (sp->public == 2) { Objectdata* odsav = hoc_objectdata_save(); Object* obsav = hoc_thisobject; Symlist* slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; execute(sp->u.u_proc->defn.in); hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; }else{ execute(sp->u.u_proc->defn.in); } /* the autoobject pointers were unreffed at the ret() */ } else { execerror(sp->name, "undefined function"); } #if CABLE if (hoc_returning) {nrn_secstack(isec);} #endif if (hoc_returning != 4) { /*if not stopping */ hoc_returning = 0; } } void hoc_fake_call(Symbol* s) { /*fake it so c code can call functions that ret() */ /* but these functions better not ask for any arguments */ /* don't forget a double is left on the stack and returning = 1 */ /* use the symbol for the function as the argument, only requirement which is always true is that it has no local variables pushed on the stack so nauto=0 and nobjauto=0 */ ++fp; fp->sp = s; fp->nargs = 0; fp->retpc = pc; fp->ob = 0; } double hoc_call_func(Symbol* s, int narg) { /* call the symbol as a function, The args better be pushed on the stack first arg first. */ if (s->type == BLTIN) { return (*(s->u.ptr))(xpop()); }else{ Inst* pcsav; Inst fc[4]; fc[0].pf = hoc_call; fc[1].sym = s; fc[2].i = narg; fc[3].in = STOP; pcsav = hoc_pc; hoc_execute(fc); hoc_pc = pcsav; return hoc_xpop(); } } void hoc_ret(void) { /* common return from func, proc, or iterator */ int i; /* unref all the auto object pointers */ for (i = fp->sp->u.u_proc->nobjauto; i > 0; --i) { hoc_obj_unref(stackp[-2*i].obj); } stackp -= fp->sp->u.u_proc->nauto * 2; /* Pop off the autos */ frameobj_clean(fp); for (i = 0; i < fp->nargs; i++) nopopm(); /* pop arguments */ pc = (Inst *)fp->retpc; --fp; hoc_returning = 1; } void funcret(void) /* return from a function */ { double d; if (fp->sp->type != FUNCTION) execerror(fp->sp->name, "(proc or iterator) returns value"); d = xpopm(); /* preserve function return value */ ret(); pushxm(d); } void procret(void) /* return from a procedure */ { if (fp->sp->type == FUNCTION) execerror(fp->sp->name, "(func) returns no value"); if (fp->sp->type == HOCOBJFUNCTION) execerror(fp->sp->name, "(obfunc) returns no value"); ret(); pushxm(0.); /*will be popped immediately; necessary because caller may have compiled it as a function*/ } void hocobjret(void) /* return from a hoc level obfunc */ { Object** d; if (fp->sp->type != HOCOBJFUNCTION) execerror(fp->sp->name, "objfunc returns objref"); d = hoc_objpop(); /* preserve function return value */ if (*d) { (*d)->refcount++;} ret(); /*make a temp and ref it in case autoobj returned since ret would have unreffed it*/ hoc_push_object(*d); if (*d) { (*d)->refcount--;} hoc_tobj_unref(d); } void hoc_Numarg(void) { int narg; Frame* f = fp - 1; if (f == frame) { narg = 0; }else{ narg = f->nargs; } ret(); pushxm((double)narg); } void hoc_Argtype(void) { int narg, iarg, type, itype=0; Frame* f = fp - 1; if (f == frame) { execerror("argtype can only be called in a func or proc", 0); } iarg = (int)chkarg(1, -1000., 100000.); if (iarg > f->nargs || iarg < 1) { itype = -1; }else{ type = (f->argn[(iarg - f->nargs)*2 + 1].i); switch (type) { case NUMBER: itype = 0; break; case OBJECTVAR: case OBJECTTMP: itype = 1; break; case STRING: itype = 2; break; case VAR: itype = 3; break; } } ret(); pushxm((double)itype); } int ifarg(int narg) { /* true if there is an nth argument */ if (narg > fp->nargs) return 0; return 1; } Object** hoc_objgetarg(int narg) {/* return pointer to nth argument */ Datum* d; if (narg > fp->nargs) execerror(fp->sp->name, "not enough arguments"); d = fp->argn + (narg - fp->nargs)*2; if (d[1].i == OBJECTTMP) { return hoc_temp_objptr(d[0].obj); } tstkchk(d[1].i, OBJECTVAR); return d[0].pobj; } char** hoc_pgargstr(int narg) { /* return pointer to nth argument */ char ** cpp = NULL; Symbol *sym; int type; if (narg > fp->nargs) execerror(fp->sp->name, "not enough arguments"); type = fp->argn[(narg - fp->nargs)*2 + 1].i; if (type == STRING) { cpp = fp->argn[(narg - fp->nargs)*2].pstr; }else if (type != SYMBOL) { execerror("Expecting string argument", (char *)0); }else{ sym = fp->argn[(narg - fp->nargs)*2].sym; if (sym->type == CSTRING) { cpp = &sym->u.cstr; }else if (sym->type == STRING) { cpp = OPSTR(sym); }else{ execerror("Expecting string argument", (char *)0); } } return cpp; } double* hoc_pgetarg(int narg) { /* return pointer to nth argument */ if (narg > fp->nargs) execerror(fp->sp->name, "not enough arguments"); tstkchk(fp->argn[(narg - fp->nargs)*2 + 1].i, VAR); return fp->argn[(narg - fp->nargs)*2].pval; } double* getarg(int narg) { /* return pointer to nth argument */ if (narg > fp->nargs) execerror(fp->sp->name, "not enough arguments"); #if 1 tstkchk(fp->argn[(narg - fp->nargs)*2 + 1].i, NUMBER); #endif return &fp->argn[(narg - fp->nargs)*2].val; } int hoc_argindex(void) { int j; j = (int)xpopm(); if (j < 1) { hoc_execerror("arg index i < 1", 0); } return j; } void arg(void) /* push argument onto stack */ { int i; i = (pc++)->i; if (i == 0) { i = hoc_argindex(); } pushxm( *getarg(i)); } void hoc_stringarg(void) /* push string arg onto stack */ { int i; i = (pc++)->i; if (i == 0) { i = hoc_argindex(); } hoc_pushstr(hoc_pgargstr(i)); } double hoc_opasgn(int op, double dest, double src) { switch (op) { case '+': return dest + src; case '*': return dest * src; case '-': return dest - src; case '/': if (src == 0.) { hoc_execerror("Divide by 0", (char*)0); } return dest / src; default: return src; } } void argassign(void) /* store top of stack in argument */ { double d; int i, op; i = (pc++)->i; if (i == 0) { i = hoc_argindex(); } op = (pc++)->i; d = xpopm(); if (op) { d = hoc_opasgn(op, *getarg(i), d); } pushxm(d); /* leave value on stack */ *getarg(i) = d; } void hoc_argrefasgn(void) { double d, *pd; int i, j, op; i = (pc++)->i; j = (pc++)->i; if (i == 0) { i = hoc_argindex(); } op = (pc++)->i; d = xpopm(); if (j) { j = (int)(xpopm() + EPS); } pd = hoc_pgetarg(i); if (op) { d = hoc_opasgn(op, pd[j], d); } pushxm(d); /* leave value on stack */ pd[j] = d; } void hoc_argref(void) { int i, j; double* pd; i = (pc++)->i; j = (pc++)->i; if (i == 0) { i = hoc_argindex(); } pd = hoc_pgetarg(i); if (j) { j = (int)(xpopm() + EPS); } pushxm(pd[j]); } void hoc_argrefarg(void) { double* pd; int i; i = (pc++)->i; if (i == 0) { i = hoc_argindex(); } pd = hoc_pgetarg(i); hoc_pushpx(pd); } void bltin(void) /* evaluate built-in on top of stack */ { double d; d = xpopm(); d = (*((pc++)->sym->u.ptr))(d); pushxm(d); } Symbol* hoc_get_symbol(const char* var) { Symlist *sl = (Symlist *)0; Symbol *prc, *sym; Inst* last; prc = hoc_parse_stmt(var, &sl); hoc_run_stmt(prc); last = (Inst*)prc->u.u_proc->defn.in + prc->u.u_proc->size - 1; if (last[-2].pf == eval) { sym = last[-3].sym; }else if (last[-3].pf == rangepoint || last[-3].pf == rangevareval) { sym = last[-2].sym; }else if (last[-4].pf == hoc_object_eval) { sym = last[-10].sym; }else{ sym = (Symbol*)0; } free_list(&sl); return sym; } Symbol* hoc_get_last_pointer_symbol(void) {/* hard to imagine a kludgier function*/ Symbol* sym = (Symbol*)0; Inst* pcv; int istop=0; for (pcv = pc; pcv; --pcv) { if (pcv->pf == hoc_ob_pointer) { if (pcv[-2].sym) { sym = pcv[-2].sym; /* e.g. &ExpSyn[0].A */ }else{ sym = pcv[-6].sym; /* e.g. & Cell[0].soma.v(.5) */ } break; }else if (pcv->pf == hoc_evalpointer) { sym = pcv[-1].sym; break; }else if (pcv->pf == rangevarevalpointer) { sym = pcv[1].sym; break; }else if (pcv->in == STOP) { /* hopefully only got here from python. Give up on second STOP*/ if (istop++ == 1) { break; } } } return sym; } void hoc_autoobject(void) { /* AUTOOBJ symbol at pc+1. */ /* pointer to object pointer left on stack */ int i; Symbol *obs; Object **obp; #if PDEBUG printf("code for hoc_autoobject()\n"); #endif obs = (pc++)->sym; hoc_pushobj(&(fp->argn[obs->u.u_auto*2].obj)); } void eval(void) /* evaluate variable on stack */ { Objectdata* odsav; Object* obsav = 0; Symlist* slsav; double d=0.0, cable_prop_eval(); Symbol *sym; sym = spopm(); if (sym->public == 2) { sym = sym->u.sym; odsav = hoc_objectdata_save(); obsav = hoc_thisobject; slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; } switch (sym->type) { case UNDEF: execerror("undefined variable", sym->name); case VAR: if (!ISARRAY(sym)) { if (do_equation && sym->s_varn > 0 && hoc_access[sym->s_varn] == 0) { hoc_access[sym->s_varn] = var_access; var_access = sym->s_varn; } switch (sym->subtype) { case USERDOUBLE: d = *(sym->u.pval); break; case USERINT: d = (double)(*(sym->u.pvalint)); break; #if CABLE case USERPROPERTY: d = cable_prop_eval(sym); break; #endif case USERFLOAT: d = (double)(*(sym->u.pvalfloat)); break; default: d = *(OPVAL(sym)); break; } }else { switch (sym->subtype) { case USERDOUBLE: d = (sym->u.pval)[araypt(sym, SYMBOL)]; break; case USERINT: d = (sym->u.pvalint)[araypt(sym, SYMBOL)]; break; case USERFLOAT: d = (sym->u.pvalfloat)[araypt(sym, SYMBOL)]; break; #if NEMO case NEMONODE: hoc_eval_nemonode(sym, xpopm(), &d); break; case NEMOAREA: hoc_eval_nemoarea(sym, xpopm(), &d); break; #endif /*NEMO*/ default: d = (OPVAL(sym))[araypt(sym, OBJECTVAR)]; break; } } break; case AUTO: d = fp->argn[sym->u.u_auto*2].val; break; default: execerror("attempt to evaluate a non-variable", sym->name); } if (obsav) { hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; } pushxm(d); } void hoc_evalpointer(void) /* leave pointer to variable on stack */ { Objectdata* odsav; Object* obsav = 0; Symlist* slsav; double *d=0, *cable_prop_eval_pointer(); Symbol *sym; sym = spopm(); if (sym->public == 2) { sym = sym->u.sym; odsav = hoc_objectdata_save(); obsav = hoc_thisobject; slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; } switch (sym->type) { case UNDEF: execerror("undefined variable", sym->name); case VAR: if (!ISARRAY(sym)) { switch (sym->subtype) { case USERDOUBLE: d = sym->u.pval; break; case USERINT: case USERFLOAT: execerror("can use pointer only to doubles", sym->name); break; #if CABLE case USERPROPERTY: d = cable_prop_eval_pointer(sym); break; #endif default: d = OPVAL(sym); break; } }else { switch (sym->subtype) { case USERDOUBLE: d = sym->u.pval + araypt(sym, SYMBOL); break; case USERINT: case USERFLOAT: #if NEMO case NEMONODE: case NEMOAREA: #endif /*NEMO*/ execerror("can use pointer only to doubles", sym->name); break; default: d = OPVAL(sym) + araypt(sym, OBJECTVAR); break; } } break; case AUTO: #if 0 execerror("can't use pointer to local variable", sym->name); #else d = &(fp->argn[sym->u.u_auto*2].val); #endif break; default: execerror("attempt to evaluate pointer to a non-variable", sym->name); } if (obsav) { hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; } hoc_pushpx(d); } void add(void) /* add top two elems on stack */ { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 += d2; pushxm(d1); } void hoc_sub(void) /* subtract top two elems on stack */ { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 -= d2; pushxm(d1); } void mul(void) /* multiply top two elems on stack */ { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 *= d2; pushxm(d1); } #if _CRAY /* try to do integer division, so that if x is an exact multiple of y then we really get an integer as the result. Algorithm: find n such that tx = x * 10^n and ty = y * 10^n are both integral. If tx/ty leaves no remainder, then tx/ty is the correct answer and is stored in iptr, intdiv returns true. Otherwise a floating point division can be done, intdiv returns false. */ static int intdiv(double x, double y, int* iptr) { long ix, iy, iz; int done = 0; while (!done) { if (fabs(x) > (1<<62) || fabs(y) > (1<<62)) return 0; /* out of range of integers */ if (x == (long) x && y == (long) y) done = 1; else { x *= (long double) 10; y *= (long double) 10; } } ix = (long) x; iy = (long) y; iz = ix/iy; if (ix == iz*iy) { /* no remainder */ *iptr = (int) iz; return 1; } return 0; } #endif void hoc_div(void) /* divide top two elems on stack */ { double d1, d2; d2 = xpopm(); if (d2 == 0.0) execerror("division by zero", (char *) 0); d1 = xpopm(); #if _CRAY { int i; if (intdiv(d1, d2, &i)) d1 = (int) i; /* result is an integer */ else d1 = d1/d2; /* result is not an integer */ } #else d1 /= d2; #endif pushxm(d1); } void hoc_cyclic(void) /* the modulus function */ { double d1, d2; double r, q; d2 = xpopm(); if (d2 <= 0.) execerror("a%b, b<=0", (char *) 0); d1 = xpopm(); r = d1; if ( r >= d2) { q = floor(d1/d2); r = d1 - q*d2; } else if ( r <= -d2) { q = floor(-d1/d2); r = d1 + q*d2; } if (r > d2) { r = r - d2; } if (r < 0.) { r = r + d2; } pushxm(r); } void negate(void) /* negate top element on stack */ { double d; d = xpopm(); pushxm(-d); } void gt(void) { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 > d2 + EPS); pushxm(d1); } void lt(void) { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 < d2 - EPS); pushxm(d1); } void ge(void) { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 >= d2 - EPS); pushxm(d1); } void le(void) { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 <= d2 + EPS); pushxm(d1); } void eq(void) { int t1, t2; double d1=0.0, d2; t1 = (stackp-1)->i; t2 = (stackp-3)->i; switch (t2) { case NUMBER: tstkchk(t1, t2); d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 <= d2 + EPS && d1 >= d2 - EPS); break; case STRING: d1 = (double)(strcmp(*hoc_strpop(), *hoc_strpop()) == 0); break; case OBJECTTMP: case OBJECTVAR: { Object** o1, **o2; o1 = hoc_objpop(); o2 = hoc_objpop(); d1 = (double)(*o1 == *o2); hoc_tobj_unref(o1); hoc_tobj_unref(o2); } break; default: hoc_execerror("don't know how to compare these types", (char*)0); } pushxm(d1); } void ne(void) { int t1, t2; double d1=0.0, d2; t1 = (stackp-1)->i; t2 = (stackp-3)->i; switch (t1) { case NUMBER: tstkchk(t1, t2); d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 < d2 - EPS || d1 > d2 + EPS); break; case STRING: d1 = (double)(strcmp(*hoc_strpop(), *hoc_strpop()) != 0); break; case OBJECTTMP: case OBJECTVAR: { Object** o1, **o2; o1 = hoc_objpop(); o2 = hoc_objpop(); d1 = (double)(*o1 != *o2); hoc_tobj_unref(o1); hoc_tobj_unref(o2); } break; default: hoc_execerror("don't know how to compare these types", (char*)0); } pushxm(d1); } void hoc_and(void) { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 != 0.0 && d2 != 0.0); pushxm(d1); } void hoc_or(void) { double d1, d2; d2 = xpopm(); d1 = xpopm(); d1 = (double)(d1 != 0.0 || d2 != 0.0); pushxm(d1); } void hoc_not(void) { double d; d = xpopm(); d = (double)(d == 0.0); pushxm(d); } void power(void) /* arg1 raised to arg2 */ { double d1, d2; extern double Pow(); d2 = xpopm(); d1 = xpopm(); d1 = Pow(d1, d2); pushxm(d1); } void assign(void) /* assign result of execute to top symbol */ { Objectdata* odsav; Object* obsav = 0; Symlist* slsav; int op; Symbol *sym; double d2; op = (pc++)->i; sym = spopm(); if (sym->public == 2) { sym = sym->u.sym; odsav = hoc_objectdata_save(); obsav = hoc_thisobject; slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; } d2 = xpopm(); switch (sym->type) { case UNDEF: hoc_execerror(sym->name, "undefined variable"); case VAR: if(!ISARRAY(sym)) { switch (sym->subtype) { case USERDOUBLE: if (op) { d2 = hoc_opasgn(op, *(sym->u.pval), d2); } *(sym->u.pval) = d2; break; case USERINT: if (op) { d2 = hoc_opasgn(op, (double)(*(sym->u.pvalint)), d2); } *(sym->u.pvalint) = (int)(d2 + EPS); break; #if CABLE case USERPROPERTY: cable_prop_assign(sym, &d2, op); break; #endif case USERFLOAT: if (op) { d2 = hoc_opasgn(op, (double)(*(sym->u.pvalfloat)), d2); } *(sym->u.pvalfloat) = (float)(d2); break; default: if (op) { d2 = hoc_opasgn(op, *(OPVAL(sym)), d2); } *(OPVAL(sym)) = d2; break; } }else { int ind; switch (sym->subtype) { case USERDOUBLE: ind = araypt(sym, SYMBOL); if (op) { d2 = hoc_opasgn(op, (sym->u.pval)[ind], d2); } (sym->u.pval)[ind] = d2; break; case USERINT: ind = araypt(sym, SYMBOL); if (op) { d2 = hoc_opasgn(op, (double)((sym->u.pvalint)[ind]), d2); } (sym->u.pvalint)[ind] = (int)(d2 + EPS); break; case USERFLOAT: ind = araypt(sym, SYMBOL); if (op) { d2 = hoc_opasgn(op, (double)((sym->u.pvalfloat)[ind]), d2); } (sym->u.pvalfloat)[ind] = (float)d2; break; #if NEMO case NEMONODE: hoc_asgn_nemonode(sym, xpopm(), &d2, op); break; case NEMOAREA: hoc_asgn_nemoarea(sym, xpopm(), &d2, op); break; #endif /*NEMO*/ default: ind = araypt(sym, OBJECTVAR); if (op) { d2 = hoc_opasgn(op, (OPVAL(sym))[ind], d2); } (OPVAL(sym))[ind] = d2; break; } } break; case AUTO: if (op) { d2 = hoc_opasgn(op, fp->argn[sym->u.u_auto*2].val, d2); } fp->argn[sym->u.u_auto*2].val = d2; break; default: execerror("assignment to non-variable", sym->name); } if (obsav) { hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; } pushxm(d2); } void hoc_assign_str(char** cpp, const char* buf) { char* s = *cpp; *cpp = (char *)emalloc((unsigned)(strlen(buf) + 1)); Strcpy(*cpp, buf); if (s) { hoc_free_string(s); } } void assstr(void) { /* assign string on top to stack - 1 */ char **ps1, **ps2; ps1 = hoc_strpop(); ps2 = hoc_strpop(); hoc_assign_str(ps2, *ps1); } char* hoc_araystr(Symbol* sym, int index, Objectdata* obd) { /* returns array string for multiple dimensions */ static char name[100]; char *cp = name+100; char buf[20]; int i, n, j, n1; *--cp = '\0'; if (ISARRAY(sym)) { Arrayinfo* a; if (sym->subtype == 0) { a = obd[sym->u.oboff + 1].arayinfo; }else{ a = sym->arayinfo; } for (i = a->nsub - 1; i >= 0; --i) { n = a->sub[i]; j = index%n; index /= n; Sprintf(buf, "%d", j); n1 = strlen(buf); assert(n1 + 2 < cp - name); *--cp = ']'; for (j = n1-1; j >=0; --j) { *--cp = buf[j]; } *--cp = '['; } } return cp; } int hoc_array_index(Symbol* sp, Objectdata* od) { /* subs must be in reverse order on stack */ int i; if (ISARRAY(sp)) { if (sp->subtype == 0) { Objectdata* sav = hoc_objectdata; hoc_objectdata = od; i = araypt(sp, OBJECTVAR); hoc_objectdata = sav; }else{ i = araypt(sp, 0); } }else{ i= 0; } return i; } int araypt(Symbol* sp, int type) { /* return subscript - subs in reverse order on stack */ int i, total, varn; int d; register Arrayinfo *aray; if (type == OBJECTVAR) { aray = OPARINFO(sp); }else{ aray = sp->arayinfo; } total = 0; for (i = 0; i < aray->nsub; i++) { tstkchk((stackp - 2*(aray->nsub - i) + 1)->i, NUMBER); d = (int)((stackp - 2*(aray->nsub - i))->val + EPS); if (d < 0 || d >= aray->sub[i]) execerror("subscript out of range", sp->name); total = total * (aray->sub[i]) + d; } for (i = 0; i< aray->nsub; i++) nopopm(); if (do_equation && sp->s_varn != 0 && (varn = (aray->a_varn)[total]) != 0 && hoc_access[varn] == 0) { hoc_access[varn] = var_access; var_access = varn; } return total; } /* obsolete */ #if CABLE && 0 int nrnpnt_araypt(Symbol* sp, int pi) { int i, total; int d; register Arrayinfo *aray = sp->arayinfo; /* the difference is that the first index is for a neuron point process vector, and the remaining incices are normal vector indices. the return value is the parameter index and the first index is returned in pi. return is 0 if not a vector or if element 0. */ total = 0; for (i = 0; i < aray->nsub; i++) { tstkchk((stackp - 2*(aray->nsub - i) + 1)->i, NUMBER); d = (int)((stackp - 2*(aray->nsub - i))->val + EPS); if (d < 0 || d >= aray->sub[i]) execerror("subscript out of range", sp->name); total = total * (aray->sub[i]) + d; if (i == 0) { *pi = total; total = 0; } } for (i = 0; i< aray->nsub; i++) nopopm(); return total; } #endif void print(void) /* pop top value from stack, print it */ { #if defined(__GO32__) extern int egagrph; if (egagrph) { char buf[50]; sprintf(buf, "\t"); grx_output_some_chars(buf, strlen(buf)); prexpr(); grx_output_some_chars("\n", 1); }else #endif { nrnpy_pr("\t"); prexpr(); nrnpy_pr("\n"); } } void prexpr(void) /* print numeric value */ { static HocStr* s; char *hoc_object_name(); char * ss; #if CABLE char* secaccessname(); #endif Object** pob; if (!s) s = hocstr_create(256); switch (hoc_stacktype()) { case NUMBER: Sprintf(s->buf, "%.8g ", xpopm()); break; case STRING: ss = *(hoc_strpop()); hocstr_resize(s, strlen(ss) + 1); Sprintf(s->buf, "%s ", ss); break; case OBJECTTMP: case OBJECTVAR: pob = hoc_objpop(); Sprintf(s->buf, "%s ", hoc_object_name(*pob)); hoc_tobj_unref(pob); break; #if 0 && CABLE case SECTION: Sprintf(s->buf, "%s ", secaccessname()); break; #endif default: hoc_execerror("Don't know how to print this type\n", 0); } plprint(s->buf); } void prstr(void) /* print string value */ { static HocStr* s; char **cpp; if (!s) s = hocstr_create(256); cpp = hoc_strpop(); hocstr_resize(s, strlen(*cpp)+10); Sprintf(s->buf, "%s", *cpp); plprint(s->buf); } /*-----------------------------------------------------------------*/ void hoc_delete_symbol(void) /* Added 15-JUN-90 by JCW. This routine deletes a "defined-on-the-fly" variable from the symbol list. */ /* modified greatly by Hines. Very unsafe in general. */ { #if 1 /*---- local variables -----*/ Symbol * doomed, * sp; /*---- start function ------*/ /* copy address of the symbol that will be deleted */ doomed = (pc++)->sym; #endif /* hoc_execerror("delete_symbol doesn't work right now.", (char *)0);*/ #if 1 if (doomed->type == UNDEF) fprintf(stderr, "%s: no such variable\n", doomed->name); else if (doomed->defined_on_the_fly == 0) fprintf(stderr, "%s: can't be deleted\n", doomed->name); else { hoc_free_symspace(doomed); } #endif } /*----------------------------------------------------------*/ void hoc_newline(void) /* print newline */ { plprint("\n"); } void varread(void) /* read into variable */ { double d=0.0; extern NrnFILEWrap *fin; Symbol *var = (pc++)->sym; assert(var->public != 2); if (! ((var->type == VAR || var->type == UNDEF) && !ISARRAY(var) && var->subtype == NOTUSER ) ) { execerror(var->name, "is not a scalar variable"); } Again: switch (nrn_fw_fscanf(fin, "%lf", OPVAL(var))) { case EOF: if (moreinput()) goto Again; d = *(OPVAL(var)) = 0.0; break; case 0: execerror("non-number read into", var->name); break; default: d = 1.0; break; } var->type = VAR; pushxm(d); } static Inst* codechk(void) { if (progp >= prog+NPROG-1) execerror("procedure too big", (char *) 0); if (zzdebug) debugzz(progp); return progp++; } Inst* Code(Pfrv f) { /* install one instruction or operand */ progp->pf = f; return codechk(); } Inst* codei(int f) { progp->i = f; return codechk(); } Inst* hoc_codeptr(void* vp) { progp->ptr = vp; return codechk(); } void codesym(Symbol* f) { progp->sym = f; IGNORE(codechk()); } void codein(Inst* f) { progp->in = f; IGNORE(codechk()); } void insertcode(Inst* begin, Inst* end, Pfrv f) { Inst *i; for (i = end - 1; i != begin; i--) { *i = *(i - 1); } begin->pf = f; if(zzdebug) { Inst* p; printf("insert code: what follows is the entire code so far\n"); for (p = prog; p < progp; ++p) { debugzz(p); } printf("end of insert code debugging\n"); } } #if defined(DOS) || defined(__GO32__) || defined (WIN32) || (MAC && !defined(DARWIN)) static int ntimes; #endif void execute(Inst* p) /* run the machine */ { Inst *pcsav; BBSPOLL for (pc = p; pc->in != STOP && !hoc_returning; ) { #if defined(DOS) if (++ntimes > 10) { ntimes = 0; #if 0 kbhit(); /* DOS can't capture interrupt when number crunching*/ #endif } #endif #if defined(__GO32__) || (defined(WIN32) && !defined(CYGWIN)) if (++ntimes > 10) { ntimes = 0; hoc_check_intupt(1); } #endif #if MAC && !defined(DARWIN) /* there is significant overhead here */ if (++ntimes > 100) { ntimes = 0; hoc_check_intupt(1); } #endif if (intset) execerror("interrupted", (char *)0); /* (*((pc++)->pf))(); DEC 5000 increments pc after the return!*/ pcsav = pc++; (*((pcsav)->pf))(); } } neuron-7.5/src/oc/code.h000077500000000000000000000045711323325274500151660ustar00rootroot00000000000000#ifndef hoc_code_h #define hoc_code_h #include "redef.h" extern void eval(void), add(void), hoc_sub(void), mul(void), hoc_div(void), hoc_cyclic(void), negate(void), power(void); extern void assign(void), bltin(void), varpush(void), constpush(void), print(void), varread(void); extern void nopop(void), prexpr(void), prstr(void), assstr(void), pushzero(void); extern void gt(void), lt(void), eq(void), ge(void), le(void), ne(void), hoc_and(void), hoc_or(void), hoc_not(void); extern void ifcode(void), forcode(void), shortfor(void), call(void), arg(void), argassign(void); extern void hoc_argrefasgn(void), hoc_argref(void), hoc_iterator(void), hoc_iterator_stmt(void); extern void funcret(void), procret(void), Break(void), Continue(void), Stop(void); extern void debug(void), edit(void), hoc_evalpointer(void); extern void hoc_newline(void), hoc_delete_symbol(void), hoc_stringarg(void), hoc_push_string(void); extern void hoc_parallel_begin(void), hoc_parallel_end(void), hoc_argrefarg(void); extern void hoc_arayinstal(void); /* OOP */ extern void hoc_objectvar(void), hoc_object_component(void), hoc_object_eval(void); extern void hoc_object_asgn(void), hoc_objvardecl(void), hoc_cmp_otype(void), hoc_newobj(void); extern void hoc_asgn_obj_to_str(void), hoc_known_type(void), hoc_push_string(void); extern void hoc_objectarg(void), hoc_ob_pointer(void), hoc_constobject(void); extern void hoc_push_current_object(void), hoc_newobj_arg(void); extern void hoc_autoobject(void), hocobjret(void), hoc_newobj_ret(void); /* END OOP */ /* NEWCABLE */ extern void connectsection(void), add_section(void), range_const(void), range_interpolate(void); extern void clear_sectionlist(void), install_sectionlist(void); extern void rangevareval(void), sec_access(void), mech_access(void); extern void for_segment(void), for_segment1(void); extern void sec_access_temp(void), sec_access_push(void), sec_access_pop(void); extern void rangepoint(void), forall_section(void), hoc_ifsec(void); extern void rangevarevalpointer(void); extern void connectpointer(void), connect_point_process_pointer(void), nrn_cppp(void); extern void ob_sec_access(void), sec_access_object(void); extern void forall_sectionlist(void), connect_obsec_syntax(void); extern void hoc_ifseclist(void), mech_uninsert(void); extern void simpleconnectsection(void), range_interpolate_single(void); extern void hoc_sec_internal_push(void); /* END NEWCABLE*/ #endif neuron-7.5/src/oc/code2.c000077500000000000000000000365611323325274500152470ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/code2.c,v 1.12 1999/06/08 17:48:26 hines Exp */ #include "hoc.h" #include "hocstr.h" #include "parse.h" #include "hocparse.h" #include #include #include #include #include #include "nrnfilewrap.h" int units_on_flag_; extern char **gargv; extern int gargc; extern double chkarg(); extern Symlist* hoc_built_in_symlist; extern Symlist* hoc_top_level_symlist; extern Symbol *hoc_table_lookup(); extern char **hoc_pgargstr(); float* hoc_sym_domain(Symbol* sym) { if (sym && sym->extra) { return sym->extra->parmlimits; } return (float*)0; } HocSymExtension* hoc_var_extra(const char* name) { Symbol* sym; sym = hoc_lookup(name); if (sym) { return sym->extra; }else{ return (HocSymExtension*)0; } } Symbol* hoc_name2sym(const char* name) { char* buf, *cp; Symbol* sym; buf = emalloc(strlen(name)+1); strcpy(buf, name); for (cp = buf; *cp; ++cp) { if (*cp == '.') { *cp = '\0'; ++cp; break; } } sym = hoc_table_lookup(buf, hoc_built_in_symlist); if (!sym) { sym = hoc_table_lookup(buf, hoc_top_level_symlist); } if (sym && *cp == '\0') { free(buf); return sym; }else if (sym && sym->type == TEMPLATE && *cp != '\0') { sym = hoc_table_lookup(cp, sym->u.template->symtable); if (sym) { free(buf); return sym; } } free(buf); return (Symbol*)0; } void hoc_Symbol_limits(void) { Symbol* sym, *hoc_get_last_pointer_symbol(); double* hoc_pgetarg(); if (hoc_is_str_arg(1)) { char* name = gargstr(1); sym = hoc_name2sym(name); if (!sym) { hoc_execerror("Cannot find the symbol for ", name); } }else{ hoc_pgetarg(1); sym = hoc_get_last_pointer_symbol(); if (!sym) { hoc_execerror("Cannot find the symbol associated with the pointer when called from Python.", "Use a string instead of pointer argument"); } } assert(sym); hoc_symbol_limits(sym, *getarg(2), *getarg(3)); ret(); pushx(1.); } void hoc_symbol_limits(Symbol* sym, float low, float high) { sym_extra_alloc(sym); if (!sym->extra->parmlimits) { sym->extra->parmlimits = (float*)emalloc(2*sizeof(float)); } sym->extra->parmlimits[0] = low; sym->extra->parmlimits[1] = high; } void hoc_symbol_tolerance(Symbol* sym, double tol) { sym_extra_alloc(sym); sym->extra->tolerance = tol; } double check_domain_limits(float* limits, double val) { if (limits) { if (val < limits[0]) { return (double)limits[0]; }else if (val > limits[1]) { return (double)limits[1]; } } return val; } char* hoc_symbol_units(Symbol* sym, const char* units) { if (!sym) { return (char*)0; } if (units) { if (sym->extra && sym->extra->units) { free(sym->extra->units); sym->extra->units = (char*)0; } sym_extra_alloc(sym); sym->extra->units = (char*)emalloc(strlen(units)+1); strcpy(sym->extra->units, units); } if (sym->extra && sym->extra->units) { return sym->extra->units; }else{ return (char*)0; } } void hoc_Symbol_units(void) { Symbol* sym, *hoc_get_last_pointer_symbol(); double* hoc_pgetarg(); int hoc_is_str_arg(); char** hoc_temp_charptr(); char** units = hoc_temp_charptr(); if (hoc_is_double_arg(1)) { units_on_flag_ = (int)chkarg(1, 0., 1.); if (units_on_flag_) { *units = "on"; }else{ *units = "off"; } }else{ if (hoc_is_str_arg(1)) { char* name = gargstr(1); sym = hoc_name2sym(name); if (!sym) { hoc_execerror("Cannot find the symbol for ", name); } }else{ hoc_pgetarg(1); sym = hoc_get_last_pointer_symbol(); if (!sym) { hoc_execerror("Cannot find the symbol associated with the pointer when called from Python.", "Use a string instead of pointer argument"); } } assert(sym); *units = (char*)0; if (ifarg(2)) { *units = gargstr(2); } *units = hoc_symbol_units(sym, *units); if (*units == (char*)0) { *units = ""; } } hoc_ret(); hoc_pushstr(units); } char* neuronhome_forward(void) { extern char* neuron_home; #if defined(WIN32) static char* buf; extern char* hoc_back2forward(); extern void hoc_forward2back(); if (!buf) { buf = emalloc(strlen(neuron_home)+1); strcpy(buf, neuron_home); } hoc_back2forward(buf); return buf; #else return neuron_home; #endif } char *neuron_home_dos; void hoc_neuronhome(void) { extern char* neuron_home; #if defined(WIN32)||defined(CYGWIN) if (ifarg(1) && (int)chkarg(1, 0., 1.) == 1) { if (!neuron_home_dos) { extern void setneuronhome(char*); setneuronhome((char*)0); } hoc_ret(); hoc_pushstr(&neuron_home_dos); }else{ hoc_ret(); hoc_pushstr(&neuron_home); } #else hoc_ret(); hoc_pushstr(&neuron_home); #endif } char* gargstr(int narg) /* Return pointer to string which is the narg argument */ { return *hoc_pgargstr(narg); } void hoc_Strcmp(void) { char *s1, *s2; s1=gargstr(1); s2=gargstr(2); ret(); pushx((double)strcmp(s1 ,s2)); } static int hoc_vsscanf(const char* buf); void hoc_sscanf(void) { int n; n = hoc_vsscanf(gargstr(1)); ret(); pushx((double)n); } static int hoc_vsscanf(const char* buf) { /* assumes arg2 format string from hoc as well as remaining args */ char *pf, *format, errbuf[100], **hoc_pgargstr(); void* arglist[20]; int n=0, iarg, i, islong, convert, sawnum; double* hoc_pgetarg(); struct { union { double d; float f; long l; int i; char* s; char c; }u; int type; } arg[20]; for (i=0; i < 20; ++i) { arglist[i] = (void*)0; } format = gargstr(2); iarg = 0; errbuf[0] = '\0'; for (pf = format; *pf; ++pf) { if (*pf == '%') { convert = 1; islong = 0; sawnum = 0; ++pf; if (! *pf) goto incomplete; if (*pf == '*') { convert = 0; ++pf; if (! *pf) goto incomplete; } if (convert && iarg >= 19) { goto too_many; } while(isdigit(*pf)) { sawnum = 1; ++pf; if (! *pf) goto incomplete; } if (*pf == 'l') { islong = 1; ++pf; if (! *pf) goto incomplete; } if (convert) switch(*pf) { case '%': convert = 0; break; case 'd': case 'i': case 'o': case 'u': case 'x': if (islong) { arg[iarg].type = 'l'; arglist[iarg] = (void*)&arg[iarg].u.l; }else{ arg[iarg].type = 'i'; arglist[iarg] = (void*)&arg[iarg].u.i; } break; case 'e': case 'f': case 'g': if (islong) { arg[iarg].type = 'd'; arglist[iarg] = (void*)&arg[iarg].u.d; }else{ arg[iarg].type = 'f'; arglist[iarg] = (void*)&arg[iarg].u.f; } break; case '[': if (islong) { goto bad_specifier; } i=0; /* watch out for []...] and [^]...] */ for (;;) { if (! *pf) goto incomplete; if (*pf == ']') { if (!( (i == 1) || ((i == 2) && (pf[-1] == '^')))) { break; } } ++i; ++pf; } case 's': if (islong) { goto bad_specifier; } arg[iarg].type = 's'; arg[iarg].u.s = (char*)emalloc(strlen(buf) + 1); arglist[iarg] = (void*)arg[iarg].u.s; break; case 'c': if (islong || sawnum) { goto bad_specifier; } arg[iarg].type = 'c'; arglist[iarg] = (void*)&arg[iarg].u.c; break; default: goto bad_specifier; /*break;*/ } if (convert) { ++iarg; if (!ifarg(iarg+2)) { goto missing_arg; } switch (arg[iarg-1].type) { case 's': if (!hoc_is_str_arg(iarg+2)) { sprintf(errbuf, "arg %d must be a string", iarg+2); goto bad_arg; } break; default: if (!hoc_is_pdouble_arg(iarg+2)) { sprintf(errbuf, "arg %d must be a pointer to a number", iarg+2); goto bad_arg; } break; } } } } #if 0 n = vsscanf(buf, format, arglist); #else if (iarg < 4) { n = sscanf(buf, format, arglist[0], arglist[1], arglist[2]); }else if (iarg < 13) { n = sscanf(buf, format, arglist[0], arglist[1], arglist[2], arglist[3], arglist[4], arglist[5], arglist[6], arglist[7], arglist[8], arglist[9], arglist[10], arglist[11]); }else{ goto too_many; } #endif assert(n <= iarg); for (i = 0; i < n; ++i) { switch (arg[i].type) { case 'd': *hoc_pgetarg(i+3) = arg[i].u.d; break; case 'i': *hoc_pgetarg(i+3) = (double)arg[i].u.i; break; case 'l': *hoc_pgetarg(i+3) = (double)arg[i].u.l; break; case 'f': *hoc_pgetarg(i+3) = (double)arg[i].u.f; break; case 's': hoc_assign_str(hoc_pgargstr(i+3), arg[i].u.s); break; case 'c': *hoc_pgetarg(i+3) = (double)arg[i].u.c; break; } } goto normal; incomplete: sprintf(errbuf, "incomplete format specifier for arg %d", iarg + 3); goto normal; bad_specifier: sprintf(errbuf, "unknown conversion specifier for arg %d", iarg + 3); goto normal; missing_arg: sprintf(errbuf, "missing arg %d", iarg + 2); goto normal; bad_arg: goto normal; too_many: sprintf(errbuf, "too many ( > %d) args", iarg + 2); goto normal; normal: for (i=0; i < iarg; ++i) { if (arg[i].type == 's') { free(arg[i].u.s); } } if (errbuf[0]) { hoc_execerror("scan error:", errbuf); } return n; } void System(void) { extern int hoc_plttext; #if defined(WIN32) && !defined(CYGWIN) static char stdoutfile[]="\\systmp.tmp"; #else static char stdoutfile[]="/systmp.tmp"; #endif double d; int system(); FILE *fp; if (hoc_plttext && !strchr(gargstr(1), '>')) { int n; HocStr* st; n = strlen(gargstr(1)) + strlen(stdoutfile); st = hocstr_create(n + 256); Sprintf(st->buf, "%s > %s", gargstr(1), stdoutfile); d = (double) system(st->buf); #if 1 if ((fp = fopen(stdoutfile, "r")) == (FILE *)0) { hoc_execerror("Internal error in System(): can't open", stdoutfile); } while (fgets(st->buf, 255, fp) == st->buf) { plprint(st->buf); } #endif hocstr_delete(st); IGNORE(unlink(stdoutfile)); } else if (ifarg(2)) { NrnFILEWrap* fpw; extern HocStr* hoc_tmpbuf; HocStr* line; int i; fp = popen(gargstr(1), "r"); if (!fp) { hoc_execerror("could not popen the command:", gargstr(1)); } line = hocstr_create(1000); i = 0; hoc_tmpbuf->buf[0] = '\0'; fpw = nrn_fw_wrap(fp); while (fgets_unlimited(line, fpw)) { i += strlen(line->buf); if (hoc_tmpbuf->size <= i) { hocstr_resize(hoc_tmpbuf, 2*hoc_tmpbuf->size); } strcat(hoc_tmpbuf->buf, line->buf); } hocstr_delete(line); d = (double)pclose(fp); nrn_fw_delete(fpw); hoc_assign_str(hoc_pgargstr(2), hoc_tmpbuf->buf); } else { d = (double) system(gargstr(1)); } errno = 0; ret(); pushx(d); } void Xred(void) /* read with prompt string and default and limits */ { double d; double xred(); d = xred(gargstr(1), *getarg(2), *getarg(3), *getarg(4)); ret(); pushx(d); } static struct { /* symbol types */ char *name; short t_type; } type_sym[] = { "Builtins", BLTIN, "Other Builtins", FUN_BLTIN, "Functions", FUNCTION, "Procedures", PROCEDURE, "Undefined", UNDEF, "Scalars", VAR, 0, 0 }; static void symdebug(const char* s, Symlist* list) /* for debugging display the symbol lists */ { Symbol *sp; Printf("\n\nSymbol list %s\n\n", s); if (list) for (sp = list->first; sp != (Symbol *)0; sp = sp->next) { Printf("name:%s\ntype:", sp->name); switch (sp->type) { case VAR: if(!ISARRAY(sp)) { if (sp->subtype == USERINT) Printf("VAR USERINT %8d", *(sp->u.pvalint)); else if (sp->subtype == USERDOUBLE) Printf("VAR USERDOUBLE %.8g", *(OPVAL(sp))); else Printf("VAR %.8g", *(OPVAL(sp))); }else{ if (sp->subtype == USERINT) Printf("ARRAY USERINT"); else if (sp->subtype == USERDOUBLE) Printf("ARRAY USERDOUBLE"); else Printf("ARRAY"); } break; case NUMBER: Printf("NUMBER %.8g", *(OPVAL(sp)));break; case STRING: Printf("STRING %s", *(OPSTR(sp)));break; case UNDEF: Printf("UNDEF");break; case BLTIN: Printf("BLTIN");break; case AUTO: Printf("AUTO");break; case FUNCTION: Printf("FUNCTION"); symdebug(sp->name, sp->u.u_proc->list); break; case PROCEDURE: Printf("PROCEDURE"); symdebug(sp->name, sp->u.u_proc->list); break; case FUN_BLTIN: Printf("FUN_BLTIN");break; default: Printf("%d", sp->type);break; } Printf("\n"); } } void symbols(void) /* display the types above */ { int i, j; Symbol *sp; if (zzdebug == 0) for (i = 0; type_sym[i].t_type != 0; i++) { Printf("\n%s\n", type_sym[i].name); for (sp = symlist->first; sp != (Symbol *)0; sp = sp->next) if (sp->type == type_sym[i].t_type) { Printf("\t%s", sp->name); switch (sp->type) { case VAR: if(ISARRAY(sp)){ for (j=0; j < sp->arayinfo->nsub; j++) Printf("[%d]", sp->arayinfo->sub[j]); } break; default: break; } } Printf("\n"); } else{ symdebug("p_symlist", p_symlist); symdebug("symlist", symlist); } ret(); pushx(0.); } double chkarg(int arg, double low, double high) /* argument checking for user functions */ { double *getarg(), val; val = *getarg(arg); if (val > high || val < low) { hoc_execerror("Arg out of range in user function", (char *)0); } return val; } double hoc_run_expr(Symbol* sym) /* value of expression in sym made by hoc_parse_expr*/ { Inst *pcsav = hoc_pc; hoc_execute(sym->u.u_proc->defn.in); hoc_pc = pcsav; return hoc_ac_; } Symbol* hoc_parse_expr(const char* str, Symlist** psymlist) { Symbol* sp; char s[BUFSIZ]; extern Symlist* hoc_top_level_symlist; if (!psymlist) { psymlist = &hoc_top_level_symlist; } sp = hoc_install(str,PROCEDURE,0.,psymlist); sp->u.u_proc->defn.in = STOP; sp->u.u_proc->list = (Symlist *)0; sp->u.u_proc->nauto = 0; sp->u.u_proc->nobjauto = 0; if (strlen(str) > BUFSIZ - 20) { HocStr* s; s = hocstr_create(strlen(str) + 20); sprintf(s->buf, "hoc_ac_ = %s\n", str); hoc_xopen_run(sp, s->buf); hocstr_delete(s); }else{ sprintf(s, "hoc_ac_ = %s\n", str); hoc_xopen_run(sp, s); } return sp; } void hoc_run_stmt(Symbol* sym) { Inst *pcsav = hoc_pc; hoc_execute(sym->u.u_proc->defn.in); hoc_pc = pcsav; } Symbol* hoc_parse_stmt(const char* str, Symlist** psymlist) { Symbol* sp; char s[BUFSIZ]; extern Symlist* hoc_top_level_symlist; if (!psymlist) { psymlist = &hoc_top_level_symlist; } sp = hoc_install(str,PROCEDURE,0.,psymlist); sp->u.u_proc->defn.in = STOP; sp->u.u_proc->list = (Symlist *)0; sp->u.u_proc->nauto = 0; sp->u.u_proc->nobjauto = 0; if (strlen(str) > BUFSIZ - 10) { HocStr* s; s = hocstr_create(strlen(str) + 10); sprintf(s->buf, "{%s}\n", str); hoc_xopen_run(sp, s->buf); hocstr_delete(s); }else{ sprintf(s, "{%s}\n", str); hoc_xopen_run(sp, s); } return sp; } extern double* hoc_varpointer; void hoc_pointer(void) { double* hoc_pgetarg(); hoc_varpointer = hoc_pgetarg(1); ret(); pushx(1.); } double* hoc_val_pointer(const char* s) { char buf[BUFSIZ]; hoc_varpointer = 0; if (strlen(s) > BUFSIZ - 20) { HocStr* buf; buf = hocstr_create(strlen(s) + 20); sprintf(buf->buf, "{hoc_pointer_(&%s)}\n", s); hoc_oc(buf->buf); hocstr_delete(buf); }else{ sprintf(buf, "{hoc_pointer_(&%s)}\n", s); hoc_oc(buf); } return hoc_varpointer; } void hoc_name_declared(void) { Symbol* s; extern Symlist* hoc_top_level_symlist; Symlist* slsav; int x; int arg2 = 0; if (ifarg(2)) { arg2 = chkarg(2, 0., 2.); } if (arg2 == 1.) { s = hoc_lookup(gargstr(1)); }else{ slsav = hoc_symlist; hoc_symlist = hoc_top_level_symlist; s = hoc_lookup(gargstr(1)); hoc_symlist = slsav; } x = s ? 1. : 0.; if (s) { x = (s->type == OBJECTVAR) ? 2 : x; x = (s->type == SECTION) ? 3 : x; x = (s->type == STRING) ? 4 : x; x = (s->type == VAR) ? 5 : x; if (x == 5 && arg2 == 2) { x = (s->arayinfo) ? 6 : x; x = (s->subtype == USERINT) ? 7 : x; x = (s->subtype == USERPROPERTY) ? 8 : x; } } ret(); pushx((double)x); } neuron-7.5/src/oc/cygwinprt.c000077500000000000000000000021501323325274500162640ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #if defined(CYGWIN) || defined(MINGW) #if !defined(__MINGW32__) #include "system.c" #define my_off64_t loff_t #else #define my_off64_t off64_t #endif #include "mswinprt.c" my_off64_t lseek64(int fd, my_off64_t offset, int whence) { fprintf(stderr, "called lseek64\n"); abort(); } /* mingw does not have dlfcn.h */ #if !defined(HAVE_DLFCN_H) || defined(__MINGW32__) void* dlopen(const char *name, int mode) { void *ret; /* handle for the named library */ ret = (void *) LoadLibrary(name); if (ret == NULL) { DWORD dw = GetLastError(); fprintf(stderr, "LoadLibrary(\"%s\") failed with error %d\n", name, dw); } return ret; } void* dlopen_noerr(const char *name, int mode) {return (void*)LoadLibrary(name);} void* dlsym(void *handle, const char *name) { void *ret = (void *) GetProcAddress ((HMODULE) handle, name); if (!ret) { fprintf(stderr, "Could not GetProcAddress for \"%s\"\n", name); } return ret; } int dlclose(void* handle) { } static char* dler_=""; char* dlerror() { return dler_; } #endif /* HAVE_DLFCN_H */ #endif neuron-7.5/src/oc/debug.c000077500000000000000000000111701323325274500153260ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/debug.c,v 1.7 1996/04/09 16:39:14 hines Exp */ #include "hoc.h" #include "code.h" #include "equation.h" #include int zzdebug; #if DOS #define prcod(c1,c2) else if (p->pf == c1) Printf("%p %p %s", p, p->pf, c2); #else #define prcod(c1,c2) else if (p->pf == c1) Printf("%p %p %s", p, p->pf, c2); #endif void debug(void) /* print the machine */ { if (zzdebug == 0) zzdebug = 1; else zzdebug = 0; } void debugzz(Inst* p) /* running copy of calls to execute */ { #if !OCSMALL { if(p->in == STOP) Printf("STOP\n"); prcod(nopop, "POP\n") prcod(eval, "EVAL\n") prcod(add, "ADD\n") prcod(hoc_sub, "SUB\n") prcod(mul, "MUL\n") prcod(hoc_div, "DIV\n") prcod(negate, "NEGATE\n") prcod(power, "POWER\n") prcod(assign, "ASSIGN\n") prcod(bltin, "BLTIN\n") prcod(varpush, "VARPUSH\n") prcod(constpush, "CONSTPUSH\n") prcod(pushzero, "PUSHZERO\n") prcod(print, "PRINT\n") prcod(varread, "VARREAD\n") prcod(prexpr, "PREXPR\n") prcod(prstr,"PRSTR\n") prcod(gt, "GT\n") prcod(lt, "LT\n") prcod(eq, "EQ\n") prcod(ge, "GE\n") prcod(le, "LE\n") prcod(ne, "NE\n") prcod(hoc_and, "AND\n") prcod(hoc_or, "OR\n") prcod(hoc_not, "NOT\n") prcod(ifcode, "IFCODE\n") prcod(forcode, "FORCODE\n") prcod(shortfor, "SHORTFOR\n") prcod(call, "CALL\n") prcod(arg, "ARG\n") prcod(argassign, "ARGASSIGN\n") prcod(funcret, "FUNCRET\n") prcod(procret, "PROCRET\n") prcod(hocobjret, "HOCOBJRET\n") #if DOS /* no room for all this stuff */ #else prcod(hoc_iterator_stmt, "hoc_iterator_stmt\n") prcod(hoc_iterator, "hoc_iterator\n") prcod(hoc_argrefasgn, "ARGREFASSIGN\n") prcod(hoc_argref, "ARGREF\n") prcod(hoc_stringarg, "STRINGARG\n") prcod(hoc_push_string, "push_string\n") prcod(Break, "Break\n") prcod(Continue, "Continue\n") prcod(Stop, "Stop()\n") prcod(assstr, "assstr\n") prcod(hoc_evalpointer, "evalpointer\n") prcod(hoc_newline, "newline\n") prcod(hoc_delete_symbol, "delete_symbol\n") prcod(hoc_cyclic, "cyclic\n") prcod(hoc_parallel_begin, "parallel_begin\n") prcod(hoc_parallel_end, "parallel_end\n") prcod(dep_make, "DEPENDENT\n") prcod(eqn_name, "EQUATION\n") prcod(eqn_init, "eqn_init()\n") prcod(eqn_lhs, "eqn_lhs()\n") prcod(eqn_rhs, "eqn_rhs()\n") /*OOP*/ prcod(hoc_push_current_object, "hoc_push_current_object\n") prcod(hoc_objectvar, "objectvar\n") prcod(hoc_object_component, "objectcomponent()\n") prcod(hoc_object_eval, "objecteval\n") prcod(hoc_object_asgn, "objectasgn\n") prcod(hoc_objvardecl, "objvardecl\n") prcod(hoc_cmp_otype, "cmp_otype\n") prcod(hoc_newobj, "newobject\n") prcod(hoc_asgn_obj_to_str, "assignobj2str\n") prcod(hoc_known_type, "known_type\n") prcod(hoc_push_string, "push_string\n") prcod(hoc_objectarg, "hoc_objectarg\n") prcod(hoc_ob_pointer, "hoc_ob_pointer\n") prcod(hoc_constobject, "hoc_constobject\n") /*NEWCABLE*/ prcod(connect_obsec_syntax, "connect_obsec_syntax()\n") prcod(connectsection, "connectsection()\n") prcod(simpleconnectsection, "simpleconnectsection()\n") prcod(connectpointer, "connectpointer()\n") prcod(add_section, "add_section()\n") prcod(range_const, "range_const()\n") prcod(range_interpolate, "range_interpolate()\n") prcod(range_interpolate_single, "range_interpolate_single()\n") prcod(rangevareval, "rangevareval()\n") prcod(rangepoint, "rangepoint()\n") prcod(sec_access, "sec_access()\n") prcod(ob_sec_access, "ob_sec_access()\n") prcod(mech_access, "mech_access()\n") prcod(for_segment, "forsegment()\n") prcod(sec_access_push, "sec_access_push()\n") prcod(sec_access_pop, "sec_access_pop()\n") prcod(forall_section, "forall_section()\n") prcod(hoc_ifsec, "hoc_ifsec()\n") prcod(hoc_ifseclist, "hocifseclist()\n") prcod(forall_sectionlist, "forall_sectionlist()\n") prcod(connect_point_process_pointer, "connect_point_process_pointer\n") prcod(nrn_cppp, "nrn_cppp()\n") prcod(rangevarevalpointer, "rangevarevalpointer\n") prcod(sec_access_object, "sec_access_object\n") prcod(mech_uninsert, "mech_uninsert\n") #endif else { size_t offset = (size_t)p->in; if (offset < 1000) Printf("relative %d\n", p->i); else { offset = (size_t)(p->in) - (size_t)p; if (offset > (size_t)prog - (size_t)p && offset < (size_t)(&prog[2000]) - (size_t)p ) Printf("relative %ld\n", p->in - p); else if (p->sym->name != (char *) 0) { if (p->sym->name[0] == '\0') { Printf("constant or string pointer\n"); /*Printf("value=%g\n", p->sym->u.val);*/ } else Printf("%s\n", p->sym->name); } else Printf("symbol without name\n"); } } p++; } #endif /*OCSMALL*/ } neuron-7.5/src/oc/equation.h000077500000000000000000000023131323325274500160710ustar00rootroot00000000000000/* $Header$ */ /* $Log$ Revision 1.1 2003/02/11 18:36:09 hines Initial revision Revision 1.1.1.1 2003/01/01 17:46:34 hines NEURON -- Version 5.4 2002/12/23 from prospero as of 1-1-2003 Revision 1.1.1.1 2002/06/26 16:23:07 hines NEURON 5.3 2002/06/04 * Revision 1.1.1.1 2001/01/01 20:30:35 hines * preparation for general sparse matrix * * Revision 1.1.1.1 2000/03/09 13:55:34 hines * almost working * * Revision 1.2 1994/10/26 17:24:59 hines * access name changed to an explicit hoc_access and taken out of redef.h * * Revision 1.1.1.1 1994/10/12 17:22:02 hines * NEURON 3.0 distribution * * Revision 1.1 91/10/11 11:12:26 hines * Initial revision * * Revision 3.28 89/09/29 16:02:46 mlh * need to use -1 as falg for unsigned variable * * Revision 2.0 89/07/07 11:30:34 mlh * Preparation for newcable * * Revision 1.1 89/07/07 11:15:45 mlh * Initial revision * */ extern int do_equation; /* switch for determining access to dep vars */ extern int *hoc_access; /* links to next accessed variables */ extern int var_access; /* variable number as pointer into access array */ extern void eqn_name(void), eqn_init(void), eqn_lhs(void), eqn_rhs(void), dep_make(void); neuron-7.5/src/oc/fileio.c000077500000000000000000000437731323325274500155250ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/fileio.c,v 1.34 1999/09/14 13:11:46 hines Exp */ #include #include #include #include #include "hoc.h" #include "ocmisc.h" #include "hocstr.h" #include "hoclist.h" #include "parse.h" #include "hocparse.h" #include #include #include "nrnfilewrap.h" #include "nrnjava.h" extern jmp_buf begin; extern char* neuron_home; NrnFILEWrap *frin; FILE *fout; #if 0 && MAC #include void debugfile(const char* format, ...) { va_list args; static FILE* df; if (!df) { df = fopen("debugfile", "w"); } va_start(args, format); vfprintf(df, format, args); fflush(df); } #endif void hoc_stdout(void) { #if defined(WIN32) && !defined(CYGWIN) extern FILE* hoc_redir_stdout; if (ifarg(1)) { if (hoc_redir_stdout) { hoc_execerror("stdout already switched", (char*)0); } hoc_redir_stdout = fopen(gargstr(1), "wb"); }else if (hoc_redir_stdout) { fclose(hoc_redir_stdout); hoc_redir_stdout = (FILE*)0; } ret(); pushx ( (hoc_redir_stdout) ? (double)fileno(hoc_redir_stdout) : 1.); #else #if defined(MAC) && !defined(DARWIN) hoc_execerror("hoc_stdout", "not implemented for MAC"); #else /*UNIX */ static int prev = -1; if (ifarg(1)) { FILE* f1; if (prev != -1) { hoc_execerror("stdout already switched", (char*)0); } prev = dup(1); if (prev < 0) { hoc_execerror("Unable to backup stdout", (char*)0); } f1 = fopen(gargstr(1), "wb"); if (!f1) { hoc_execerror("Unable to open ", gargstr(1)); } if (dup2(fileno(f1), 1) < 0) { hoc_execerror("Unable to attach stdout to ", gargstr(1)); } fclose(f1); }else if (prev > -1) { int i; if (dup2(prev, 1) < 0) { hoc_execerror("Unable to restore stdout", (char*)0); } close(prev); prev = -1; } ret(); pushx((double)fileno(stdout)); #endif #endif } void ropen(void) /* open file for reading */ { double d; char *fname; if (ifarg(1)) fname = gargstr(1); else fname = ""; d = 1.; if (!nrn_fw_eq(frin, stdin)) IGNORE(nrn_fw_fclose(frin)); frin = nrn_fw_set_stdin(); if (fname[0] != 0) { if ((frin = nrn_fw_fopen(fname, "r")) == (NrnFILEWrap *)0) { const char* retry; retry = expand_env_var(fname); if ((frin = nrn_fw_fopen(retry, "r")) == (NrnFILEWrap *)0) { d = 0.; frin = nrn_fw_set_stdin(); } } } errno = 0; ret(); pushx(d); } void wopen(void) /* open file for writing */ { char *fname; double d; if (ifarg(1)) fname = gargstr(1); else fname = ""; d = 1.; if (fout != stdout) ERRCHK(IGNORE(fclose(fout));) fout = stdout; if (fname[0] != 0) ERRCHK(if ((fout = fopen(expand_env_var(fname), "w")) == (FILE *)0) { d = 0.; fout = stdout; }) errno = 0; ret(); pushx(d); } const char* expand_env_var(const char* s) { static HocStr* hs; const char* cp1; char* cp2; int n; int begin = 1; /* only needed for mac when necessary to prepend a : */ if (!hs) { hs = hocstr_create(256); } hocstr_resize(hs, strlen(s) + 2); for (cp1=s, cp2 = hs->buf + begin; *cp1; ++cp1) { if (*cp1 == '$' && cp1[1] == '(') { char* cp3; char buf[200]; cp1 += 2; for (cp3 = buf; *cp1 && *cp1 != ')'; ++cp1) { *cp3++ = *cp1; assert(cp3 - buf < 200); } if (*cp1) { *cp3 = '\0'; if (strcmp(buf, "NEURONHOME") == 0) { cp3 = neuron_home; }else{ cp3 = getenv(buf); } if (cp3) { n = cp2 - hs->buf; hocstr_resize(hs, n + strlen(cp3) + strlen(s) + 2); cp2 = hs->buf + n; while(*cp3) { *cp2++ = *cp3++; } } }else{ --cp1; } }else{ *cp2++ = *cp1; } } *cp2 = '\0'; #if MAC && !defined(DARWIN) /* convert / to : */ for (cp1 = hs->buf+begin; *cp1; ++cp1) { if (*cp1 == '/') { *cp1 = ':'; } } /* if a : in the original name then assume already mac and done */ /* if $ in original name then done since NEURONHOME already has correct prefix */ /* if first is : then remove it, otherwise prepend it */ if (!strchr(s, ':') && !strchr(s, '$')) { if (hs->buf[begin] == ':') { begin = 2; }else{ begin = 0; hs->buf[0] = ':'; } } for (cp1 = hs->buf+begin , cp2 = cp1; *cp1 ;) { if (cp1[0] == ':' && cp1[1] == '.') { if (cp1[2] == ':') { cp1 += 2; continue; }else if (cp1[2] == '.' && cp1[3] == ':') { cp1 += 3; *cp2++ = ':'; continue; } } *cp2++ = *cp1++; } *cp2 = '\0'; #endif return hs->buf + begin; } int hoc_xopen_file_size_; char* hoc_xopen_file_; char* hoc_current_xopen(void) { return hoc_xopen_file_; } int hoc_xopen1(const char* name, const char* rcs) /* read and execute a hoc program */ { /*printf("hoc_xopen1 %d %s\n", strlen(name), name);*/ NrnFILEWrap *savfin; int savpipflag, save_lineno; char* savname; char* fname = strdup(name); assert(fname); #if 1 if (rcs) { if (rcs[0] != '\0') { int sz = 2*(strlen(rcs) + strlen(name)) + 20; free(fname); fname = emalloc(sz); Sprintf(fname, "co -p%s %s > %s-%s", rcs, name, name, rcs); ERRCHK(if (system(fname) != 0) { free(fname); hoc_execerror(name, "\nreturned error in hoc_co system call"); }) Sprintf(fname, "%s-%s", name, rcs); } }else if (hoc_retrieving_audit()) { hoc_xopen_from_audit(fname); free(fname); return 0; } #endif savpipflag = pipeflag; savfin = fin; pipeflag = 0; errno = EINTR; while (errno == EINTR) { errno = 0; #if MAC if ((fin = nrn_fw_fopen(fname, "rb")) == NULL) { #else if ((fin = nrn_fw_fopen(fname, "r")) == NULL) { #endif const char* retry; retry = expand_env_var(fname); free(fname); assert((fname = strdup(retry))); #if MAC if ((fin = nrn_fw_fopen(retry, "rb")) == NULL) { #else if ((fin = nrn_fw_fopen(retry, "r")) == NULL) { #endif fin = savfin; pipeflag = savpipflag; free(fname); execerror("Can't open ", retry); } } } save_lineno = hoc_lineno; hoc_lineno = 0; assert((savname = strdup(hoc_xopen_file_))); if (strlen(fname) >= hoc_xopen_file_size_) { hoc_xopen_file_size_ = strlen(fname) + 100; hoc_xopen_file_ = erealloc(hoc_xopen_file_, hoc_xopen_file_size_); } strcpy(hoc_xopen_file_, fname); if (fin) { hoc_audit_from_xopen1(fname, rcs); IGNORE(hoc_xopen_run((Symbol *)0, (char *)0)); } if (fin && !nrn_fw_eq(fin,stdin)) { ERRCHK(IGNORE(nrn_fw_fclose(fin));) } fin = savfin; pipeflag = savpipflag; if (rcs && rcs[0]) { unlink(fname); } free(fname); hoc_xopen_file_[0] = '\0'; hoc_lineno = save_lineno; strcpy(hoc_xopen_file_, savname); return 0; } void xopen(void) /* read and execute a hoc program */ { if (ifarg(2)) { hoc_xopen1(gargstr(1), gargstr(2)); }else{ hoc_xopen1(gargstr(1), 0); } ret(); pushx(1.); } void Fprint(void) /* fprintf function */ { char* buf; double d; hoc_sprint1(&buf, 1); d = (double)fprintf(fout, "%s", buf); ret(); pushx(d); } void PRintf(void) /* printf function */ { char* buf; double d; hoc_sprint1(&buf, 1); d = (int)strlen(buf); NOT_PARALLEL_SUB(plprint(buf);) fflush(stdout); ret(); pushx(d); } void hoc_Sprint(void) /* sprintf function */ { char **cpp; char *buf; /* This is not guaranteed safe since we may be pointing to double */ cpp = hoc_pgargstr(1); hoc_sprint1(&buf, 2); hoc_assign_str(cpp, buf); ret(); pushx(1.); } double hoc_scan(FILE* fi) { double d; char fs[256]; for(;;) { if (fscanf(fi, "%255s", fs) == EOF) { execerror("EOF in fscan", (char *)0); } if (fs[0] == 'i' || fs[0] == 'n' || fs[0] == 'I' || fs[0] == 'N') { continue; } if (sscanf(fs, "%lf", &d) == 1) { /* but if at end of line, leave at beginning of next*/ if(fscanf(fi, "\n")) {;} /* ignore return value */ break; } } return d; } double hoc_fw_scan(NrnFILEWrap* fi) { double d; char fs[256]; for(;;) { if (nrn_fw_fscanf(fi, "%255s", fs) == EOF) { execerror("EOF in fscan", (char *)0); } if (fs[0] == 'i' || fs[0] == 'n' || fs[0] == 'I' || fs[0] == 'N') { continue; } if (sscanf(fs, "%lf", &d) == 1) { /* but if at end of line, leave at beginning of next*/ nrnignore = nrn_fw_fscanf(fi, "\n"); break; } } return d; } void Fscan(void) /* read a number from input file */ { double d; NrnFILEWrap *fi; if (nrn_fw_eq(frin, stdin)) { fi = fin; }else{ fi = frin; } d = hoc_fw_scan(fi); ret(); pushx(d); } void hoc_Getstr(void) /* read a line (or word) from input file */ { char* buf; char **cpp; NrnFILEWrap* fi; int word = 0; if (nrn_fw_eq(frin, stdin)) { fi = fin; }else{ fi = frin; } cpp = hoc_pgargstr(1); if (ifarg(2)) { word = (int)chkarg(2, 0., 1.); } if (word) { buf = hoc_tmpbuf->buf; if(nrn_fw_fscanf(fi, "%s", buf) != 1) { execerror("EOF in getstr", (char*)0); } }else{ if ((buf = fgets_unlimited(hoc_tmpbuf, fi)) == (char *)0) { execerror("EOF in getstr", (char *)0); } } hoc_assign_str(cpp, buf); ret(); pushx((double)strlen(buf)); } void hoc_sprint1(char** ppbuf, int argn) { /* convert args to right type for conversion */ /* argn is argument number where format is */ static HocStr* hs; char *pbuf, *pfmt, *pfrag, frag[120]; int n, convflag, lflag, didit, hoc_argtype(); char *fmt, *cp; if (!hs) { hs = hocstr_create(512); } fmt = gargstr(argn++); convflag = lflag = didit = 0; pbuf = hs->buf; pfrag = frag; *pfrag = 0; *pbuf = 0; for (pfmt = fmt; *pfmt; pfmt++) { *pfrag++ = *pfmt; *pfrag = 0; if (convflag) { switch (*pfmt) { case 'l': lflag += 1; break; case 'd': case 'o': case 'x': if (lflag) { if (lflag == 1) { pfrag[1] = pfrag[0]; pfrag[0] = pfrag[-1]; pfrag[-1] = 'l'; } Sprintf(pbuf, frag, (long long)*getarg(argn)); }else{ Sprintf(pbuf, frag, (int)*getarg(argn)); } didit = 1; break; case 'c': Sprintf(pbuf, frag, (char)*getarg(argn)); didit = 1; break; case 'f': case 'e': case 'g': Sprintf(pbuf, frag, *getarg(argn)); didit = 1; break; case 's': if (hoc_is_object_arg(argn)) { char* hoc_object_name(); Object** hoc_objgetarg(); cp = hoc_object_name(*hoc_objgetarg(argn)); }else{ cp = gargstr(argn); } n = pbuf - hs->buf; hocstr_resize(hs, n + strlen(cp) + 100); pbuf = hs->buf + n; Sprintf(pbuf, frag, cp); didit = 1; break; case '%': pfrag[-1] = 0; strcpy(pbuf, frag); didit = 1; argn--; /* an arg was not consumed */ break; default: break; } }else if (*pfmt == '%') { convflag = 1; }else if (pfrag - frag > 100) { n = pbuf - hs->buf; hocstr_resize(hs, n + strlen(frag) + 100); pbuf = hs->buf + n; Sprintf(pbuf, "%s", frag); pfrag = frag; *pfrag = 0; while (*pbuf) { pbuf++; } } if (didit) { int n; argn++; lflag = 0; convflag = 0; didit = 0; pfrag = frag; *pfrag = 0; while (*pbuf) { pbuf++; } n = pbuf - hs->buf; hocstr_resize(hs, n + 100); pbuf = hs->buf + n; } } if (pfrag != frag) Sprintf(pbuf, "%s", frag); *ppbuf = hs->buf; } #if defined(__TURBOC__) || defined(__GO32__) || defined(WIN32) || defined(MAC) static FILE* oc_popen(char* cmd, char* type) { FILE* fp; char buf[1024]; assert(strlen(cmd) + 20 < 1024); sprintf(buf, "sh %s > hocload.tmp", cmd); if (system(buf) != 0) { return (FILE*)0; }else if ( (fp = fopen("hocload.tmp", "r")) == (FILE*)0) { return (FILE*)0; }else{ return fp; } } static void oc_pclose(FILE* fp) { fclose(fp); unlink("hocload.tmp"); } #else #define oc_popen popen #define oc_pclose pclose #endif static int hoc_Load_file(int, const char*); static void hoc_load(const char* stype) { int i=1; char* s; Symbol* sym; char cmd[1024]; FILE* p; char file[1024], *f; while(ifarg(i)) { s = gargstr(i); ++i; sym = hoc_lookup(s); if (!sym || sym->type == UNDEF) { assert(strlen(stype) + strlen(s) + 50 < 1024); sprintf(cmd, "$NEURONHOME/lib/hocload.sh %s %s %d", stype, s, hoc_pid()); p = oc_popen(cmd, "r"); if (p) { f = fgets(file, 1024, p); if (f) { f[strlen(f)-1] = '\0'; } oc_pclose(p); if (f) { fprintf(stderr, "Getting %s from %s\n", s, f); hoc_Load_file(0,f); }else{ fprintf(stderr, "Couldn't find a file that declares %s\n", s); } }else{ hoc_execerror("can't run:", cmd); } } } } Pfri p_hoc_load_java; void hoc_load_java(void) { int r = 0; if (p_hoc_load_java) { r = (*p_hoc_load_java)(); } ret(); pushx((double)r); } void hoc_load_proc(void) { hoc_load("proc"); ret(); pushx(1.); } void hoc_load_func(void) { hoc_load("func"); ret(); pushx(1.); } void hoc_load_template(void) { hoc_load("begintemplate"); ret(); pushx(1.); } void hoc_load_file(void) { int iarg = 1; int i = 0; if (hoc_is_double_arg(iarg)) { i = (int)chkarg(iarg, 0., 1.); iarg = 2; } if (!ifarg(iarg+1) || !hoc_lookup(gargstr(iarg+1))) { i = hoc_Load_file(i, gargstr(iarg)); } ret(); pushx((double)i); } static int hoc_Load_file(int always, const char* name) { /* if always is 0 then xopen only if file of that name not already loaded with one of the load_xxx functions and search in the current, $HOC_LIBRARY_PATH, $NEURONHOME/lib/hoc directories (in that order) for the file if there is no directory prefix. Temporarily change to the directory containing the file so that it can xopen files relative to its location. */ #define hoc_load_file_size_ 1024 static hoc_List* loaded; hoc_Item* q; int b, is_loaded; int goback; char expname[hoc_load_file_size_]; const char *base; char path[hoc_load_file_size_], old[hoc_load_file_size_]; char fname[hoc_load_file_size_], cmd[hoc_load_file_size_]; #if USE_NRNFILEWRAP int f; #else FILE* f; #endif old[0] = '\0'; goback = 0; /* has the file already been loaded */ is_loaded = 0; if (!loaded) { loaded = hoc_l_newlist(); } ITERATE(q, loaded) { if (strcmp(STR(q), name) == 0) { if (!always) { return 1; }else{ is_loaded = 1; } } } /* maybe the name already has an explicit path */ expname[hoc_load_file_size_ - 1] = '\0'; strncpy(expname, expand_env_var(name), hoc_load_file_size_); assert(expname[hoc_load_file_size_ - 1] == '\0'); name = expname; if ((base = strrchr(name, '/')) != NULL) { strncpy(path, name, base-name); path[base-name] = '\0'; ++base; #if USE_NRNFILEWRAP f = nrn_fw_readaccess(name); #else f = fopen(name, "r"); #endif }else{ base = name; path[0] = '\0'; /* otherwise find the file in the default directories */ #if USE_NRNFILEWRAP f = nrn_fw_readaccess(base); #else f = fopen(base, "r"); /* cwd */ #endif #if !MAC if (!f) { /* try HOC_LIBRARY_PATH */ int i; char* hlp; hlp = getenv("HOC_LIBRARY_PATH"); while(hlp && *hlp) { char* cp = strchr(hlp, ':'); if (!cp) { cp = strchr(hlp, ' '); } if (!cp) { cp = hlp + strlen(hlp); } assert(cp-hlp < hoc_load_file_size_); strncpy(path, hlp, cp-hlp); path[cp-hlp] = '\0'; if (*cp) { hlp = cp+1; }else{ hlp = 0; } if (path[0]) { sprintf(fname, "%s/%s", path, base); #if USE_NRNFILEWRAP f = nrn_fw_readaccess(expand_env_var(fname)); #else f = fopen(expand_env_var(fname), "r"); #endif if (f) { break; } }else{ break; } } } #endif if (!f) { /* try NEURONHOME/lib/hoc */ sprintf(path, "$(NEURONHOME)/lib/hoc"); assert(strlen(path) + strlen(base) + 1 < hoc_load_file_size_); sprintf(fname, "%s/%s", path, base); #if USE_NRNFILEWRAP f = nrn_fw_readaccess(expand_env_var(fname)); #else f = fopen(expand_env_var(fname), "r"); #endif } } /* add the name to the list of loaded packages */ if (f) { if (!is_loaded) { hoc_l_lappendstr(loaded, name); } #if USE_NRNFILEWRAP == 0 fclose(f); #endif b = 1; }else{ b = 0; hoc_warning("Couldn't find:", name); path[0] = '\0'; } /* change to the right directory*/ if (b && path[0]) { goback = (getcwd(old, 1000) != 0); errno = 0; if (chdir(expand_env_var(path)) == -1) { hoc_warning("Couldn't change directory to:", path); path[0] = '\0'; b = 0; } /*printf("load_file cd to %s\n", path);*/ } /* xopen the file */ if (b) { /*printf("load_file xopen %s\n", base);*/ assert(strlen(base) + 50 < hoc_load_file_size_); sprintf(cmd, "hoc_ac_ = execute1(\"{xopen(\\\"%s\\\")}\")\n", base); b = hoc_oc(cmd); b = (int)hoc_ac_; } /* change back */ if (path[0] && goback) { if (hoc_chdir(old) == -1) { hoc_warning("Couldn't change directory back to:", old); b = 0; } /*printf("load_file cd back to %s\n", old);*/ } return b; } void hoc_getcwd(void) { int len; static char* buf; if (!buf) { buf = emalloc(hoc_load_file_size_); } if (!getcwd(buf, hoc_load_file_size_)) { hoc_execerror("getcwd failed. Perhaps the path length is > hoc_load_file_size_", (char*)0); } #if defined(WIN32) {extern char* hoc_back2forward(); strcpy(buf, hoc_back2forward(buf)); } #endif len = strlen(buf); #if defined(MAC) if (buf[len-1] != ':') { buf[len] = ':'; buf[len+1] = '\0'; } #else if (buf[len-1] != '/') { buf[len] = '/'; buf[len+1] = '\0'; } #endif hoc_ret(); hoc_pushstr(&buf); } void hoc_machine_name(void) { #if !defined(__GO32__) && !defined(WIN32) && !defined(MAC) /*----- functions called -----*/ /*----- local variables -----*/ char buf[20]; gethostname(buf, 20); hoc_assign_str(hoc_pgargstr(1), buf); #endif ret(); pushx(0.); } int hoc_chdir(const char* path) { return chdir(expand_env_var(path)); } void hoc_Chdir(void) { int i = hoc_chdir(gargstr(1)); ret(); pushx((double)i); } int nrn_is_python_extension; int (*nrnpy_pr_callback)(char*); void nrnpy_set_pr(int (*cb)(char*)) { if (nrn_is_python_extension) { nrnpy_pr_callback = cb; } } int nrnpy_pr(const char *fmt, ...) { int size = 0; char *p = NULL; va_list ap; if (!nrnpy_pr_callback) { va_start(ap, fmt); size = vprintf(fmt, ap); return size; } /* Determine required size */ va_start(ap, fmt); size = vsnprintf(p, size, fmt, ap); va_end(ap); if (size < 0) return 0; size++; /* For '\0' */ p = malloc(size); if (p == NULL) return 0; va_start(ap, fmt); size = vsnprintf(p, size, fmt, ap); if (size < 0) { free(p); return 0; } va_end(ap); (*nrnpy_pr_callback)(p); free(p); return size; } neuron-7.5/src/oc/fmenu.c000077500000000000000000000417021323325274500153560ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/fmenu.c,v 1.4 1996/02/16 16:19:25 hines Exp */ /* fmenu.c,v * Revision 1.4 1996/02/16 16:19:25 hines * OCSMALL used to throw out things not needed by teaching programs * * Revision 1.3 1995/07/22 13:01:47 hines * avoid unhandled exceptions in mswindows due to some function stubs * * Revision 1.2 1994/11/23 19:52:57 hines * all nrnoc works in dos with go32 * * Revision 1.1.1.1 1994/10/12 17:22:08 hines * NEURON 3.0 distribution * * Revision 2.19 93/02/02 10:34:25 hines * static functions declared before used * * Revision 1.3 92/08/18 07:31:36 hines * arrays in different objects can have different sizes. * Now one uses araypt(symbol, SYMBOL) or araypt(symbol, OBJECTVAR) to * return index of an array variable. * * Revision 1.2 91/10/14 17:36:08 hines * scaffolding for oop in place. Syntax about right. No action yet. * * Revision 1.1 91/10/11 11:12:01 hines * Initial revision * * Revision 4.20 91/04/03 16:01:33 hines * mistyped || * * Revision 4.9 91/01/04 09:51:08 hines * turboc++ sometimes fails with __TURBOC__ but succeeds with * #if defined(__TURBOC__) * * Revision 3.77 90/07/20 09:45:49 hines * case 3 allows actions to be executed when variable is changed * * Revision 3.50 90/02/17 10:12:25 mlh * lint free on sparc and makfile good for sparc * * Revision 3.44 90/01/05 14:57:24 mlh * min and max along with Jamie's changes that allow person to match * upper char by typing lower char (works only with turboc) * * Revision 3.41 89/12/08 15:34:47 mlh * infinite loop when searching for non-existent character starting * at first menu item. * Corrected with do{}while control structure. * * Revision 3.20 89/08/15 08:29:42 mlh * compiles under turbo-c 1.5 -- some significant bugs found * * Revision 3.7 89/07/13 08:21:26 mlh * stack functions involve specific types instead of Datum * * Revision 3.4 89/07/12 10:26:55 mlh * Lint free * * Revision 3.3 89/07/10 15:45:56 mlh * Lint pass1 is silent. Inst structure changed to union. * * Revision 2.0 89/07/07 11:36:43 mlh * *** empty log message *** * * Revision 1.1 89/07/07 11:15:57 mlh * Initial revision * */ /* Copyright 1989,88,87- M.L. Hines, Neurobiology Dept.,DUMC, Durham, NC * * REVISION HISTORY: * * 5-19-89 let return start entry of number * 5-04-89 Get it going on the SUN. * 4-17-89 Added if HOC if FOCEXT statements to distinguish between FOCAL * and HOC versions. * * Synopsis fmenu is a FOCAL menu management function * * x fmenu(args) where the following options are available: * * fmenu(nmenu,-1) allocates space for nmenu number of menus * Menu identifier numbers start at 0,1,...nmenu-1 * fmenu(imenu,0) erase previous menu identified by imenu. * * fmenu(imenu,1,var list) add variables specified in list * to imenu. The variable names will * be added sequentially in the order * specified. * * fmenu(imenu,2,"prompt","command") add the executable command * specified by a prompt,command pair * to imenu. * * fmenu(imenu) executes menu imenu, displays, * navigates through imenu. * * * Version 1.0 written by M.V. Evans and M.L. Hines 4-12-89 */ #include #if defined(WITHOUT_MEMACS) #define OCSMALL 1 #endif #if OCSMALL void hoc_fmenu(void) { hoc_ret(); hoc_pushx(0.); } hoc_menu_cleanup() { } #else #if defined(__GO32__) #define G32 1 #include #include extern int egagrph; /* detect if in graphics mode */ #endif #if DOS #include #include union REGS regs; extern int egagrph; /* detect if in graphics mode */ #else #if !G32 static int egagrph = 0; #include "estruct.h" extern TERM emacs_term; #endif #endif #include "hoc.h" #include #if HOC | OOP #define Ret(a) hoc_ret(); hoc_pushx(a) #endif #define NUL 0 #define SPACE '\040' #if DOS || G32 #define BEEP Printf("\007") #else #define BEEP (*emacs_term.t_beep)() #endif /* structure and functions from getsym.c */ #include "hocgetsym.h" /* Structure for single menu list */ typedef struct Menuitem{ struct Menuitem *pprevious; /* Pointer to a previous item */ short row, col; /* Coordinates of each menu item */ short type; char *prompt; /* prompt, command used for actions */ char *command; Psym *psym; double symmin; /* min and max value for sym */ double symmax; struct Menuitem *nextitem; /* Pointer to next menu item */ } Menuitem; /* menu types */ #define MENU_VAR 1 #define MENU_ACTION 2 /* Summary of menu functions : insert_menu(int r, int c, sym *sp ) - Stores row and col coordinates, and the symbol pointer specified in fcursor() as an item in a structure list. Successive items are appended at the end of the list. This function returns the pointer for the beginning of the list. display_menu(Menuitem *menu) - Displays the whole menu as specified by successive calls to fcursor. Recovers information stored for each menu item and prints the corresponding item variable name and value at its specified position. destroy_menu(Menuitem *menu) - Frees the space allocated for the whole menu list. navigate_menu(Menuitem *menu) - Allows user to move around the displayed menu by making use of the arrow keys. erase_item(Menuitem *pnow) - Erases second line contents in menu */ static int cexecute(const char*); static char *navigate(int); static Menuitem *append(); /*common code for appendsym,appendaction*/ static void appendvar(int, const char*, const char*); static void appendaction(int, const char*, const char*); static void destroy(int); static double enter(int, int, double, int, Menuitem*); static void prval(int, int, int, double); static void prs(int, int, int, const char*); static void undisplay(int); /* Structure pointer summary: *pprev - pointer to previous item structure *pnow - pointer to current item structure *nextitem - pointer to next item - forward link *pprevious - pointer to previous item - reverse link */ static int current_menu = -1; /* current menu number */ static int maxmenus; static Menuitem **menusfirst; /* pointers to first menuitem in list*/ static Menuitem **menuslast; /* pointers to last menuitem in list*/ static Menuitem **menuscurrent; /* pointers to where navigate starts*/ static int first = 1; /* emacs_term has not been opened */ #define diag(s) hoc_execerror(s, (char*)0); #define chk(i) {if (i < 0 || i >= maxmenus) diag("menu number out of range");} static void menu_manager(int nmenu) { int previous; char *command; previous = current_menu; current_menu = nmenu; #if DOS || G32 #else if (first) { (*emacs_term.t_open)(); (*emacs_term.t_close)(); first = 0; } #endif if (previous >= 0) { undisplay(previous); }else{ undisplay(current_menu); } while((command = navigate(current_menu)) != (char *)0) { if (cexecute(command) == 4) { /* 4 means stop was executed */ break; } } if (previous >= 0) { undisplay(current_menu); } current_menu = previous; } void hoc_fmenu(void){ int imenu, flag, i, narg; #ifdef WIN32 hoc_execerror("fmenu not available under mswindows.", "Use xpanel series"); #endif imenu = *getarg(1); if (!ifarg(2)) { /* navigate the menu */ chk(imenu); menu_manager(imenu); Ret(0.); return ; } flag = *getarg(2); narg = 2; switch(flag) { case -1: if (current_menu != -1) { diag("can't destroy current menu"); } if (maxmenus) { for (i = 0; isymmin = *getarg(narg=narg+1); menuslast[imenu]->symmax = *getarg(narg=narg+1); } break; case 2: while (ifarg(narg=narg+1)) { char *prompt, *command; prompt = gargstr(narg); command = gargstr(narg=narg+1); appendaction(imenu, prompt, command); } break; case 3: while (ifarg(narg=narg+1)) { appendvar(imenu, gargstr(narg), gargstr(narg+1)); menuslast[imenu]->symmin = *getarg(narg=narg+2); menuslast[imenu]->symmax = *getarg(narg=narg+1); } break; default: diag("illegal argument flag"); break; } Ret (0.); } static void xcursor(int r, int c){ #if DOS _BH = 0; _DH = r; _DL = c; _AH = 2; geninterrupt(0x10); #else #if G32 union REGS regs; regs.h.ah = 0x02; regs.h.bh = 0; regs.h.dh = r; regs.h.dl = c; if (egagrph) { grx_move(r, c); }else{ int86(0x10, ®s, ®s); } #else (*emacs_term.t_move)(r, c); #endif #endif } static int ibmgetc(void){ /* Copied from ibm.c file in memacs */ #if DOS regs.h.ah = 7; intdos(®s,®s); return (int)regs.h.al; #else #if G32 union REGS regs; regs.h.ah = 7; intdos(®s,®s); return (int)regs.h.al; #else return (*emacs_term.t_getchar)(); #endif #endif } static Menuitem *append(int imenu){ Menuitem *last, *pnow; if (imenu < 0 || imenu >= maxmenus) { diag("menu number out of range"); } last = menuslast[imenu]; pnow = (Menuitem *)emalloc(sizeof(Menuitem)); pnow->pprevious = last; pnow->nextitem = (Menuitem *)0; menuslast[imenu] = pnow; if (last) { int col = last->col, row = last->row; last->nextitem = pnow; col += 13; if (col > 77) { row += 2; col = 0; } pnow->row = row; pnow->col = col; }else{ menusfirst[imenu] = pnow; pnow->row = 0; pnow->col = 0; menuscurrent[imenu] = pnow; } pnow->type = 0; pnow->prompt = (char *)0; pnow->command = (char *)0; pnow->psym = (Psym *)0; return (pnow); } static void appendvar(int imenu, const char* variable, const char* command) { Menuitem *item; int i, len; char buf[256]; Psym *p; item = append(imenu); item->type = MENU_VAR; item->psym = p = hoc_getsym(variable); if (command) { item->command = (char *)emalloc((unsigned)(strlen(command) + 1)); Strcpy(item->command, command); }else{ item->command = (char *)0; } Sprintf(buf, "%s", p->sym->name); len = strlen(buf); for (i = 0; i < p->nsub; i++) { Sprintf(buf+len, "[%d]", p->sub[i]); len = strlen(buf); } item->prompt = (char *)emalloc((unsigned)(len+1)); Strcpy(item->prompt, buf); } static void appendaction(int imenu, const char* prompt, const char* command) { Menuitem *item; item = append(imenu); item->type = MENU_ACTION; item->prompt = (char *)emalloc((unsigned)(strlen(prompt) + 1)); Strcpy(item->prompt, prompt); item->command = (char *)emalloc((unsigned)(strlen(command) + 1)); Strcpy(item->command, command); } static void display(int imenu) { Menuitem *menu, *pnow; int row, col; chk(imenu); menu = menusfirst[imenu]; for(pnow=menu;pnow;pnow=pnow->nextitem){ row = pnow->row; col = pnow->col; prs(0, row, col, pnow->prompt); switch (pnow->type) { case MENU_VAR: prval(0, row+1, col, hoc_getsymval(pnow->psym)); break; } } xcursor(menuslast[imenu]->row+2, 0); } static void destroy(int imenu) { Menuitem *menu; Menuitem *pnow, *nextitem; menu = menusfirst[imenu]; menusfirst[imenu] = (Menuitem *)0; menuslast[imenu] = (Menuitem *)0; menuscurrent[imenu] = (Menuitem *)0; for(pnow = menu;pnow;pnow = nextitem){ nextitem = pnow->nextitem; if (pnow->prompt) { free(pnow->prompt); } if (pnow->command) { free((char *)pnow->command); } if (pnow->psym) { free_arrayinfo(pnow->psym->arayinfo); free((char *)pnow->psym); } free((char *)pnow); } } static char *navigate(int imenu) { Menuitem *menu; Menuitem *pcur, *pnow; int row, col, key, current_col; double val; menu = menusfirst[imenu]; if (menu == (Menuitem *)0) { return (char *)0; } #if DOS || G32 #else (*emacs_term.t_open)(); /* before return be sure to close */ #endif display(imenu); pcur = menuscurrent[imenu]; key = 0; while (key != 27) { pnow = pcur; /* pnow is fixed hereafter */ row = pnow->row + 1; col = pnow->col; switch (pnow->type) { case MENU_VAR: val = hoc_getsymval(pnow->psym); prval(1, row, col, val); break; case MENU_ACTION: prs(1, row, col, "execute"); break; } key = ibmgetc(); if(key == 27 || key == 3) goto label; if (key == 5) { #if DOS || G32 return "plt(-5)"; #else (*emacs_term.t_close)(); return "plt(-3)"; #endif } if(key == 0) { /* arrow key pressed */ key = ibmgetc(); switch(key) { case 77: /* Right arrow key */ pcur = pcur->nextitem; if(pcur == NUL) pcur = menu; break; case 75: /* Left arrow key */ pcur = pcur->pprevious; if (pcur == (Menuitem *)0) { pcur = menuslast[imenu]; } break; case 80: /* Down key */ current_col = pnow->col; do{ pcur=pcur->nextitem; if(pcur == (Menuitem *)0) { pcur = menu; } }while(pcur->col != current_col); break; case 72: /* Up key*/ current_col = pnow->col; do{ pcur=pcur->pprevious; if (pcur == (Menuitem *)0) { pcur = menuslast[imenu]; } }while(pcur->col != current_col); break; default: BEEP; break; } } else if( pnow->type == MENU_VAR && ( (isdigit(key) || key == '-' || key == '+' || key == 015 || key =='.')) ){ prs(0, row, col, ""); val = enter(row, col,val,key, pnow); hoc_assignsym(pnow->psym, val); if (pnow->command) { prs(0, pnow->row+1, pnow->col, "executing"); xcursor(menuslast[imenu]->row+2, 0); #if DOS || G32 #else (*emacs_term.t_close)(); #endif return pnow->command; } prval(1, row, col, val); } else if (key == 015 && pnow->type == MENU_ACTION) { prs(0, pnow->row+1, pnow->col, "executing"); xcursor(menuslast[imenu]->row+2, 0); #if DOS || G32 #else (*emacs_term.t_close)(); #endif return pnow->command; } else if (isalpha(key)) { pcur = pnow; do { pcur = pcur->nextitem; if (pcur == (Menuitem *)0) { pcur = menusfirst[imenu]; } if ( toupper(pcur->prompt[0]) == toupper(key) ) break; } while (pcur!=pnow); } else { BEEP; } menuscurrent[imenu] = pcur; switch (pnow->type) { /* the old one */ case MENU_VAR: prval(0, row, col, val); break; case MENU_ACTION: prs(0, row, col, ""); break; } } label: xcursor(menuslast[imenu]->row+2, 0); #if DOS || G32 #else (*emacs_term.t_close)(); #endif return (char *)0; } static double enter(int row, int col, double defalt, int frstch, Menuitem* pnow) { char istr[80],*istrptr; int key; double input; char buf[10]; istrptr = &istr[0]; xcursor(row,++col); if(frstch !=13){ *istrptr++ = frstch; sprintf(buf, "%c",istr[0]); plprint(buf); } for(;;) { key = ibmgetc(); if(isdigit(key)|| key =='.' || key == 'e' || key == '-' || key == '+'){ sprintf(buf, "%c",key); plprint(buf); *istrptr++ = key; continue; } else if(key == 27){ return (defalt); }else if (key == '\b') { if (istrptr > istr) { #if G32 if (egagrph) { grx_backspace(1); hoc_outtext(" "); grx_backspace(1); }else #endif Printf("\b \b"); *(--istrptr) = '\0'; } }else if (key == 13){ /*return*/ *istrptr = '\0'; if(sscanf(istr, "%lf",&input) == 1) if (input >= pnow->symmin && input <= pnow->symmax) { return (input); } else { /* input out of range */ BEEP; Sprintf(istr, "Range %-5g", pnow->symmin); prs(0, pnow->row, pnow->col, istr); Sprintf(istr, "To %-5g ", pnow->symmax); prs(0, pnow->row + 1, pnow->col, istr); key = ibmgetc(); BEEP; prs(0, pnow->row, pnow->col, pnow->prompt); return (defalt); } else{ return (defalt); } }else{ BEEP; continue; } } }/* end of function enter */ static void prval(int oldnew, int row, int col, double val) { char string[100]; Sprintf(string,"%g",val); prs(oldnew, row, col, string); } static void prs(int oldnew, int row, int col, const char* string) { char buf[100]; xcursor(row, col); if(oldnew == 0){ sprintf(buf, "%-13s",string); plprint(buf); }else{ sprintf(buf, "%13c", SPACE); plprint(buf); xcursor(row, col); sprintf(buf,"<%s>",string); plprint(buf); } } static int cexecute(const char* command) { int i; hoc_returning = 0; hoc_execstr(command); i = hoc_returning; hoc_returning = 0; return i; } #if DOS || G32 #else static void clrscr(void){ (*emacs_term.t_move)(0, 0); (*emacs_term.t_eeop)(); } #endif static void undisplay(int imenu) { int i; if(egagrph !=0){ #if GRX grx_txt_clear(); #else xcursor(menusfirst[imenu]->row, 0); for (i = menuslast[imenu]->row - menusfirst[imenu]->row + 2; i; i--) { Printf("%80c\n", SPACE); } #endif }else{ clrscr(); } } void hoc_menu_cleanup(void) { current_menu = -1; #if DOS || G32 #else if (!first) { (*emacs_term.t_close)(); } #endif } #endif /*OCSMALL*/ neuron-7.5/src/oc/ftime.c000077500000000000000000000023131323325274500153430ustar00rootroot00000000000000#include <../../nrnconf.h> #include "hoc.h" #if defined(HAVE_GETTIMEOFDAY) #include static double start_time = 0.; #else #include static time_t start_time=0; /* time_t is a long */ static time_t stop_time=1; #endif # define Ret(a) hoc_ret(); hoc_pushx(a); double nrn_time(void) { #if defined(HAVE_GETTIMEOFDAY) int ms10; struct timeval x; gettimeofday(&x, (struct timezone*)0); ms10 = x.tv_usec/10000; start_time = (100.*(double)(x.tv_sec) + (double)ms10)/100.; return (start_time); #else return ((double)time(&start_time)); #endif } void hoc_startsw(void) { Ret(nrn_time()); } void hoc_stopsw(void) { #if defined(HAVE_GETTIMEOFDAY) double y; int ms10; struct timeval x; gettimeofday(&x, (struct timezone*)0); ms10 = x.tv_usec/10000; y = (double)(x.tv_sec) + (double)ms10/100.; Ret(y - start_time); start_time = y; #else if (start_time==0) { printf("Must use startsw() first.\n"); Ret(0.); } else { time(&stop_time); Ret((double)(stop_time - start_time)); } #endif } double nrn_timeus(void) { #if defined(HAVE_GETTIMEOFDAY) struct timeval x; gettimeofday(&x, (struct timezone*)0); return ((double)x.tv_sec + .000001*((double)x.tv_usec)); #else return 0.; #endif } neuron-7.5/src/oc/functabl.c000077500000000000000000000077371323325274500160540ustar00rootroot00000000000000#include <../../nrnconf.h> #include "hoc.h" #define INTERPOLATE 1 typedef struct TableArg { int nsize; double* argvec; /* if nil use min,max */ double min; double max; #if INTERPOLATE double frac; /* temporary storage */ #endif } TableArg; typedef struct FuncTable { double* table; TableArg* targs; double value; /* if constant this is it */ } FuncTable; static int arg_index(TableArg* ta, double x) { int j; if (ta->argvec) { int t0, t1; #if INTERPOLATE ta->frac = 0.; #endif t0 = 0; t1 = ta->nsize-1; if (x <= ta->argvec[t0]) { j = 0; }else if (x >= ta->argvec[t1]) { j = t1; }else{ while (t0 < (t1-1)) { j = (t0 + t1)/2; #if 0 printf("x[%d]=%g x[%d]=%g x[%d]=%g\n", t0, ta->argvec[t0], j, ta->argvec[j], t1, ta->argvec[t1]); #endif if (ta->argvec[j] <= x) { t0 = j; }else{ t1 = j; } } j = t0; #if INTERPOLATE ta->frac = (x - ta->argvec[j])/(ta->argvec[j+1] - ta->argvec[j]); #if 0 printf("x[%d]=%g frac=%g x=%g\n", j, ta->argvec[j], ta->frac, x); #endif #endif } }else{ #if INTERPOLATE ta->frac = 0.; #endif if (x <= ta->min) { j = 0; }else if (x >= ta->max) { j = ta->nsize -1; }else{ double d, x1; d = (ta->max - ta->min)/((double)(ta->nsize - 1)); x1 = (x - ta->min)/d; j = (int)x1; #if INTERPOLATE ta->frac = x1 - (double)j; #endif } } return j; } static double inter(double frac, double* tab, int j) { if (frac > 0.) { return (1. - frac)*tab[j] + frac*tab[j+1]; }else{ return tab[j]; } } static double interp(double frac, double x1, double x2) { if (frac > 0.) { return (1. - frac)*x1 + frac*x2; }else{ return x1; } } double hoc_func_table(void* vpft, int n, double* args) { int i, j; double* tab; FuncTable* ft = (FuncTable*)vpft; if (!ft) { hoc_execerror("table not specified in hoc_func_table", (char*)0); } tab = ft->table; j = 0; for (i=0; i < n; ++i) { j = (j * ft->targs[i].nsize) + arg_index(ft->targs + i, args[i]); /* printf("calculating j: i=%d args=%g j=%d frac=%g\n", i, args[i], j, ft->targs[i].frac); */ } #if INTERPOLATE if (n == 1) { return inter(ft->targs[0].frac, tab, j); }else if (n == 2) { /* adjacent indices ar adjacent values of y dimension */ double y1, y2; double fy = ft->targs[1].frac; y1 = inter(fy, tab, j); /* printf("calculating y1: fy=%g j=%d y1=%g, tabj=%g\n", fy, j, y1, tab[j]); */ if (ft->targs[0].frac) { /* x dimension fraction */ int j1 = j + ft->targs[1].nsize; y2 = inter(fy, tab, j1); /* printf("calculating y2: fx=%g fy=%g j1=%d y2=%g tabj1=%g\n", ft->targs[0].frac, fy, j1, y2, tab[j1]); */ return interp(ft->targs[0].frac, y1, y2); }else{ return y1; } }else{ return tab[j]; } #else return tab[j]; #endif } void hoc_spec_table(void** vppt, int n) { int i, argcnt; FuncTable** ppt = (FuncTable**)vppt; FuncTable* ft; TableArg* ta; if (!*ppt) { *ppt = (FuncTable*) ecalloc(1, sizeof(FuncTable)); (*ppt)->targs = (TableArg*) ecalloc(n, sizeof(TableArg)); } ft = *ppt; ta = ft->targs; argcnt = 2; if (!ifarg(2)) { /* set to constant */ ft->value = *getarg(1); ft->table = &ft->value; for (i=0; i < n; ++i) { ta[i].nsize = 1; ta[i].argvec = (double*)0; ta[i].min = 1e20; ta[i].max = 1e20; } return; } if (hoc_is_object_arg(1)) { int ns; if (n > 1) { hoc_execerror("Vector arguments allowed only for functions", "of one variable"); } ns = vector_arg_px(1, &ft->table); ta[0].nsize = vector_arg_px(2, &ta[0].argvec); if (ns != ta[0].nsize) { hoc_execerror("Vector arguments not same size", (char*)0); } }else{ for (i = 0; i < n; ++i) { ta[i].nsize = *getarg(argcnt++); if (ta[i].nsize < 1) { hoc_execerror("size arg < 1 in hoc_spec_table", (char*)0); } if (hoc_is_double_arg(argcnt)) { ta[i].min = *getarg(argcnt++); ta[i].max = *getarg(argcnt++); if (ta[i].max < ta[i].min) { hoc_execerror("min > max in hoc_spec_table", (char*)0); } ta[i].argvec = (double*)0; }else{ ta[i].argvec = hoc_pgetarg(argcnt++); } } ft->table = hoc_pgetarg(1); } } neuron-7.5/src/oc/getelm.c000077500000000000000000000002671323325274500155220ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../sparse/getelm.c" neuron-7.5/src/oc/getsym.c000077500000000000000000000105241323325274500155520ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/getsym.c,v 1.2 1996/02/16 16:19:26 hines Exp */ /* getsym.c,v * Revision 1.2 1996/02/16 16:19:26 hines * OCSMALL used to throw out things not needed by teaching programs * * Revision 1.1.1.1 1994/10/12 17:22:08 hines * NEURON 3.0 distribution * * Revision 1.4 92/08/18 07:31:38 hines * arrays in different objects can have different sizes. * Now one uses araypt(symbol, SYMBOL) or araypt(symbol, OBJECTVAR) to * return index of an array variable. * * Revision 1.3 91/10/18 14:40:36 hines * symbol tables now are type Symlist containing pointers to first and last * symbols. New symbols get added onto the end. * * Revision 1.2 91/10/17 15:01:28 hines * VAR, STRING now handled with pointer to value located in object data space * to allow future multiple objects. Ie symbol for var, string, objectvar * has offset into a pointer data space. * * Revision 1.1 91/10/11 11:12:03 hines * Initial revision * * Revision 3.9 89/07/20 09:52:17 mlh * code functions no longer in hoc.h * * Revision 3.7 89/07/13 08:21:30 mlh * stack functions involve specific types instead of Datum * * Revision 3.4 89/07/12 10:27:00 mlh * Lint free * * Revision 3.3 89/07/10 15:46:00 mlh * Lint pass1 is silent. Inst structure changed to union. * * Revision 2.0 89/07/07 11:36:58 mlh * *** empty log message *** * * Revision 1.1 89/07/07 11:16:01 mlh * Initial revision * */ /* Psym *hoc_getsym("variable") returns a pointer to a new Psym structure that contains info used to find where the variable keeps its data. Array indices cannot involve local variables. Example: hoc_getsym("a[i][j]") depends on the values of i and j when hoc_getsym is called; and not on their values when the Psym is used. double hoc_getsymval(Psym *p) returns the value of the variable. If an array, the indices used are the values they had when hoc_getsym was called. hoc_assignsym(Psym *p, double val) sets the value of the variable. hoc_execstr(char *s) compiles and executes the string */ #if OCSMALL #else #include "hocgetsym.h" #include "parse.h" #include "hocparse.h" #include "code.h" Psym *hoc_getsym(const char* cp) { Symbol *sp, *sym; Symlist *symlist = (Symlist *)0; Inst *last, *pcsav; int i, n; char s[256]; Psym *p=0; Sprintf(s, "{%s}\n", cp); sp = hoc_install("", PROCEDURE, 0., &symlist); sp->u.u_proc->defn.in = STOP; sp->u.u_proc->list = (Symlist *)0; sp->u.u_proc->nauto = 0; n = hoc_xopen_run(sp, s); last = (Inst *)sp->u.u_proc->defn.in + n; if (n < 5 || last[-3].pf != hoc_eval) { hoc_execerror(s, " not a variable"); } last[-3].in = STOP; /*before doing last EVAL*/ pcsav = hoc_pc; hoc_execute(sp->u.u_proc->defn.in); hoc_pc = pcsav; sym = hoc_spop(); switch(sym->type) { case UNDEF: hoc_execerror(s, " is undefined"); case VAR: if (ISARRAY(sym)) { Arrayinfo* a; if (sym->subtype == NOTUSER) { a = OPARINFO(sym); }else{ a = sym->arayinfo; } p = (Psym *)emalloc((unsigned)(sizeof(Psym) + a->nsub)); p->arayinfo = a; ++a->refcount; p->nsub = a->nsub; for (i=p->nsub; i > 0;) { p->sub[--i] = hoc_xpop(); } } else { p = (Psym *)emalloc(sizeof(Psym)); p->arayinfo = 0; p->nsub = 0; } p->sym = sym; break; case AUTO: hoc_execerror(s, " is local variable"); default: hoc_execerror(s, " not a variable"); } hoc_free_list(&symlist); return p; } static void arayonstack(Psym* p) { int i; double d; if (p->nsub) { if (!ISARRAY(p->sym) || p->nsub != p->arayinfo->nsub) { hoc_execerror("wrong number of subscripts for ", p->sym->name); } for (i=0; i < p->nsub; i++) { d = p->sub[i]; hoc_pushx(d); } } } double hoc_getsymval(Psym* p) { arayonstack(p); hoc_pushs(p->sym); hoc_eval(); return hoc_xpop(); } void hoc_assignsym(Psym* p, double val){ arayonstack(p); hoc_pushx(val); hoc_pushs(p->sym); hoc_assign(); hoc_nopop(); } void hoc_execstr(const char* cp) { Symbol *sp; Symlist *symlist = (Symlist *)0; Inst *pcsav; char s[256]; Sprintf(s, "{%s}\n", cp); sp = hoc_install("", PROCEDURE, 0., &symlist); sp->u.u_proc->defn.in = STOP; sp->u.u_proc->list = (Symlist *)0; sp->u.u_proc->nauto = 0; IGNORE(hoc_xopen_run(sp, s)); pcsav = hoc_pc; hoc_execute(sp->u.u_proc->defn.in); hoc_pc = pcsav; hoc_free_list(&symlist); } #endif /*OCSMALL*/ neuron-7.5/src/oc/hoc.c000077500000000000000000001163331323325274500150200ustar00rootroot00000000000000#include <../../nrnconf.h> #include "../nrnpython/nrnpython_config.h" #include "hoc.h" #include "hocstr.h" #include "equation.h" #include #include #include #include #include #include "parse.h" #include "hocparse.h" #include "ocfunc.h" #include "ocmisc.h" #include "nrnmpi.h" #include "nrnrt.h" #include "nrnfilewrap.h" #if defined(__GO32__) #include #include #endif /* for eliminating "ignoreing return value" warnings. */ int nrnignore; /* only set in ivoc */ int nrn_global_argc; char** nrn_global_argv; #if defined(USE_PYTHON) int use_python_interpreter = 0; void (*p_nrnpython_start)(); void (*p_nrnpython_finalize)(); #endif int nrn_inpython_; int (*p_nrnpy_pyrun)(const char* fname); #if carbon || defined(MINGW) #include #endif #if HAVE_FENV_H #define NRN_FLOAT_EXCEPTION (defined(linux)) #endif #if NRN_FLOAT_EXCEPTION #define __USE_GNU #include #define FEEXCEPT (FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW ) int matherr1(void) { #if defined(FE_NOMASK_ENV) /* should be updated to be more generic */ /* above gives the signal but for some reason fegetexcept returns 0 */ switch(fegetexcept()) { case FE_DIVBYZERO: fprintf(stderr, "Floating exception: Divide by zero\n"); break; case FE_INVALID: fprintf(stderr, "Floating exception: Invalid (no well defined result\n"); break; case FE_OVERFLOW: fprintf(stderr, "Floating exception: Overflow\n"); break; } #endif /*FE_NOMASK_ENV*/ } #endif void nrn_feenableexcept() { int result = -1; #if NRN_FLOAT_EXCEPTION && defined(FE_NOMASK_ENV) if (ifarg(1) && chkarg(1, 0., 1.) == 0.) { result = feenableexcept(0); }else{ result = feenableexcept(FEEXCEPT); } #endif hoc_ret(); hoc_pushx((double)result); } #if 0 /* performance debugging when gprof is inadequate */ #include static unsigned long usec[30]; static unsigned long oldusec[30]; static struct timeval tp; void start_profile(int i){ gettimeofday(&tp, 0); oldusec[i] = tp.tv_usec; } void add_profile(int i) { gettimeofday(&tp, 0); if (tp.tv_usec > oldusec[i]) { usec[i] += tp.tv_usec - oldusec[i]; } } void pr_profile(void) { int i; for (i=0; i < 30; ++i) { if (usec[i]) { printf("sec[%d]=%g\n", i, ((double)usec[i])/1000000.); } } } #else void start_profile(i) int i; {} void add_profile(i) int i; {} void pr_profile(void) {} #endif #ifdef MAC #define READLINE 0 #endif #if defined(WITHOUT_MEMACS) #undef READLINE #define READLINE 0 #endif #if OCSMALL #define READLINE 0 #endif #ifndef READLINE #define READLINE 1 #endif #if READLINE extern char* readline(const char* prompt); extern void rl_deprep_terminal(void); extern void add_history(const char*); #endif int nrn_nobanner_; int pipeflag; int hoc_usegui; #if 1 /* no longer necessary to distinguish signed from unsigned since EOF never stored in a buffer. */ #define CHAR char #else #if -1 == '\377' #define CHAR char #else #define CHAR signed char #endif #endif /* buffers will grow automatically if an input line exceeds the following*/ #define TMPBUFSIZE 512 #define CBUFSIZE 512 HocStr* hoc_tmpbuf; HocStr* hoc_cbufstr; const char* hoc_promptstr; static CHAR *cbuf; CHAR *ctp; int hoc_ictp; extern char *RCS_hoc_version; extern char *RCS_hoc_date; extern char* neuron_home; extern int hoc_print_first_instance; #define EPS hoc_epsilon /* used to be a FILE* but had fopen problems when 128K cores on BG/P tried to fopen the same file for reading at once. */ NrnFILEWrap *fin; /* input file pointer */ #include const char *progname; /* for error messages */ int lineno; #include #include static int control_jmpbuf = 0; /* don't change jmp_buf if being controlled */ jmp_buf begin; static int hoc_oc_jmpbuf; static jmp_buf hoc_oc_begin; int intset; /* safer interrupt handling */ int indef; const char *infile; /* input file name */ extern int hoc_xopen_file_size_; extern char* hoc_xopen_file_; const char **gargv; /* global argument list */ int gargc; static int c = '\n'; /* global for use by warning() */ #if defined(WIN32) || MAC set_intset() { intset++; } #endif static int follow(int expect, int ifyes, int ifno);/* look ahead for >=, etc. */ static int Getc(NrnFILEWrap* fp); static void unGetc(int c, NrnFILEWrap* fp); static int backslash(int c); void nrn_exit(i) int i; { #if defined(WIN32) printf("NEURON exiting abnormally, press return to quit\n"); fgetc(stdin); #endif exit(i); } #if LINDA int hoc_retreat_flag; #define RETREAT_SIGNAL SIGHUP static RETSIGTYPE retreat_handler(int sig) /* catch interrupt */ { /*ARGSUSED*/ if (hoc_retreat_flag++) { /* never managed the first one properly */ nrn_exit(1); } if (!lookup("linda_retreat")) { hoc_retreat_flag = 0; /* user did not give us a safe retreat so it would be nice */ /* to take up later exactly at this point */ nrn_exit(1); } IGNORE(signal(RETREAT_SIGNAL, retreat_handler)); } void hoc_retreat(void) { hoc_obj_run("linda_retreat()\n", (Object*)0); exit(0); } #endif #if defined(WIN32) || defined(MAC) #define HAS_SIGPIPE 0 #else #define HAS_SIGPIPE 1 #endif #if HAS_SIGPIPE /*ARGSUSED*/ static RETSIGTYPE sigpipe_handler(int sig) { fprintf(stderr, "writing to a broken pipe\n"); signal(SIGPIPE, sigpipe_handler); } #endif int getnb(void) /* get next non-white character */ { int c; /*EMPTY*/ while ((c=Getc(fin)) == ' ' || c == '\t') { ; } return c; } /* yylex modified to return -3 when at end of cbuf. The parser can return and take up where it left off later. Supported by modification of bison.simple to allow event driven programming. */ #define YYNEEDMORE -3 /* for now we say comments or strings that span lines on stdin are in error */ #if 0 #define INCOMMENT 1; #define INSTRING 2; static int lexstate = 0; #endif /* sometimes is... doesn't work with -3. Hence Getc returns null and look at eos to see if true.*/ static int eos; int yylex(void) /* hoc6 */ { restart: /* when no token in between comments */ eos = 0; #if 0 /* do we really want to have several states? */ switch (lexstate) { case INCOMMENT: goto incomment; case INSTRING: goto instring; } #endif if ((c=getnb()) == EOF) { return 0; } if (c == '/' && follow('*', 1, 0)) /* comment */ { while ((c=Getc(fin)) != '*' || follow('/', 0, 1)) { if (c == EOF) return(0); /* if (c == YYNEEDMORE) {*/ if (eos) { acterror("comment not complete", " in cbuf"); } } goto restart; } if (c == '.' || isdigit(c)) /* number */ { char *npt; double d; IGNORE(unGetc(c, fin)); npt = (char *)ctp; /*EMPTY*/ while (isdigit(c = Getc(fin))) { ; } if (c == '.') { /*EMPTY*/ while(isdigit(c = Getc(fin))) { ; } } if (*npt == '.' && !isdigit(npt[1])) { IGNORE(unGetc(c, fin)); return (int)(*npt); } if (c == 'E' || c == 'e') { if (isdigit(c = Getc(fin)) || c == '+' || c == '-') { /*EMPTY*/ while (isdigit(c = Getc(fin))) { ; } } } IGNORE(unGetc(c, fin)); IGNORE(sscanf(npt, "%lf", &d)); if (d == 0.) return NUMZERO; yylval.sym = install("", NUMBER, d, &p_symlist); return NUMBER; } if (isalpha(c) || c == '_') { Symbol *s; char sbuf[256], *p = sbuf; do { if (p >= (sbuf + 255)) { sbuf[255] = '\0'; hoc_execerror("Name too long:", sbuf); } *p++ = c; } while ((c=Getc(fin)) != EOF && (isalnum(c) || c == '_')); IGNORE(unGetc(c, fin)); *p = '\0'; if (strncmp(sbuf, "__nrnsec_0x", 11) == 0) { yylval.ptr = hoc_sec_internal_name2ptr(sbuf, 1); return INTERNALSECTIONNAME; } if ((s=lookup(sbuf)) == 0) s = install(sbuf, UNDEF, 0.0, &symlist); yylval.sym = s; return s->type == UNDEF ? VAR : s->type; } if (c == '$') { /* argument? */ int ith; int n = 0; int retval = follow('o', OBJECTARG, ARG); if (retval == ARG) retval = follow('s', STRINGARG, ARG); if (retval == ARG) retval = follow('&', ARGREF, ARG); ith = follow('i', 1, 0); if (ith) { yylval.narg = 0; return retval; } while (isdigit(c=Getc(fin))) n = 10 * n + c - '0'; IGNORE(unGetc(c, fin)); if (n == 0) acterror("strange $...", (char *)0); yylval.narg = n; return retval; } if (c == '"') /* quoted string */ { static HocStr* sbuf; char *p; int n; if (!sbuf) { sbuf = hocstr_create(256); } for (p = sbuf->buf; (c=Getc(fin)) != '"'; p++) { if (c == '\n' || c == EOF || c == YYNEEDMORE) acterror("missing quote", ""); n = p - sbuf->buf; if (n >= sbuf->size - 1) { hocstr_resize(sbuf, n + 200); p = sbuf->buf + n; } *p = backslash(c); } *p = 0; yylval.sym = install("", CSTRING, 0.0, &p_symlist); (yylval.sym)->u.cstr = (char *)emalloc((unsigned)(strlen(sbuf->buf)+1)); Strcpy((yylval.sym)->u.cstr, sbuf->buf); return CSTRING; } switch (c) { case 0: {if (eos) return YYNEEDMORE; else return 0;} case '>': return follow('=', GE, GT); case '<': return follow('=', LE, LT); case '!': return follow('=', NE, NOT); case '+': case '-': case '*': { if (follow('=', 1, 0)) { yylval.narg = c; return ROP; }else{ return c; } } case '=': { if (follow('=', EQ, '=') == EQ) { return EQ; } if (do_equation) { return EQNEQ; } yylval.narg = 0; return ROP; } case '|': return follow('|', OR, '|'); case '&': return follow('&', AND, '&'); case '\\': { int i; /* continuation line if last char in line is \ */ i = follow('\n', 1000, '\\'); if (i == 1000) { return yylex(); } return i; } case '\r': return follow('\n', '\n', '\n'); case '\n': return '\n'; case '/': if (follow('/', 1, 0)) { while(*ctp) { ++ctp; } return '\n'; }else if (follow('=', 1, 0)) { yylval.narg = c; return ROP; }else{ return '/'; } default: return c; } } static int backslash(int c) { /* get next char with \'s interpreted */ static char transtab[] = "b\bf\fn\nr\rt\t"; if (c != '\\') return c; c = Getc(fin); if (islower(c) && strchr(transtab, c)) return strchr(transtab, c)[1]; return c; } static int follow(int expect, int ifyes, int ifno) /* look ahead for >=, etc. */ { int c = Getc(fin); if (c == expect) return ifyes; IGNORE(unGetc(c, fin)); return ifno; } void arayinstal(void) /* allocate storage for arrays */ { int i, nsub; Symbol * sp; #if defined(__TURBOC__) Inst *pcc; /* sometimes pop messes up pc */ #endif nsub = (pc++)->i; #if defined(__TURBOC__) pcc = pc; #endif sp = spop(); hoc_freearay(sp); sp->type = VAR; sp->s_varn = 0; i = hoc_arayinfo_install(sp, nsub); if ((OPVAL(sp) = (double *) hoc_Ecalloc((unsigned)i, sizeof(double))) == (double *) 0) { hoc_freearay(sp); Fprintf(stderr, "Not enough space for array %s\n", sp->name); hoc_malchk(); hoc_execerror("", (char *)0); } #if defined(__TURBOC__) pc = pcc; #endif } int hoc_arayinfo_install(Symbol* sp, int nsub) { double total, subscpt; int i; free_arrayinfo(sp->arayinfo); sp->arayinfo = (Arrayinfo *) emalloc((unsigned)( sizeof(Arrayinfo)+nsub*sizeof(int))); /*printf("emalloc arrayinfo at %lx\n", sp->arayinfo);*/ sp->arayinfo->a_varn = (unsigned *) 0; sp->arayinfo->nsub = nsub; sp->arayinfo->refcount = 1; total = 1.; while (nsub) { subscpt = floor(xpop() + EPS); if (subscpt <= 0.) execerror("subscript < 1", sp->name); total = total*subscpt; sp->arayinfo->sub[--nsub] = (int)subscpt; } if (total > 2e9) { /* following gives purify uninitialized memory read and cannot work around it with anything involving i. Must be a bug in purify because the i=(int)total gives the UMR when it is just above this if statement. but no UMR if in present location just above return. if ( (double)(i = (int)total) != total) { */ free((char *)sp->arayinfo); sp->arayinfo = (Arrayinfo *)0; execerror(sp->name, ":total subscript too large"); } if (OPARINFO(sp)) { /* probably never get here */ free_arrayinfo(OPARINFO(sp)); } OPARINFO(sp) = sp->arayinfo; ++sp->arayinfo->refcount; i = (int)total; return i; } void hoc_freearay(Symbol* sp) { Arrayinfo** pa = &(OPARINFO(sp)); if (sp->type == VAR) { hoc_free_val_array(OPVAL(sp), hoc_total_array(sp)); sp->type = UNDEF; } free_arrayinfo(*pa); free_arrayinfo(sp->arayinfo); sp->arayinfo = (Arrayinfo *)0; *pa = (Arrayinfo *)0; } void free_arrayinfo(Arrayinfo* a) { if (a != (Arrayinfo *) 0) { if ((--a->refcount) <= 0) { if (a->a_varn != (unsigned *) 0) free((char *)(a->a_varn)); free((char *)a); /* printf("free arrayinfo at %lx\n", a);*/ } } } void defnonly(const char* s) { /* warn if illegal definition */ if (!indef) acterror(s, "used outside definition"); } /* messages can turned off but the user had better check the return value of oc_run() */ static int debug_message_; void hoc_show_errmess_always(void) { double x, chkarg(); x = chkarg(1, 0., 1.); debug_message_ = (int)x; ret(); pushx(x); } int hoc_execerror_messages; /* this is possibly non-portable since it is based on the declaration in setjmp.h of typedef int jmp_buf[_JBLEN]; */ void (*oc_jump_target_)(); /* see ivoc/SRC/ocjump.c */ int yystart; void hoc_execerror_mes(const char* s, const char* t, int prnt){ /* recover from run-time error */ hoc_in_yyparse = 0; yystart = 1; hoc_menu_cleanup(); hoc_errno_check(); #if 0 hoc_xmenu_cleanup(); #endif if (debug_message_ || prnt) { warning(s, t); frame_debug(); nrn_err_dialog(s); #if defined(__GO32__) {extern int egagrph; if (egagrph) { hoc_outtext("Error:"); hoc_outtext(s); if (t) { hoc_outtext(" "); hoc_outtext(t); } hoc_outtext("\n"); }} #endif } /* in case warning not called */ ctp = cbuf; *ctp = '\0'; if (oc_jump_target_) { (*oc_jump_target_)(); } #if NRNMPI if (nrnmpi_numprocs_world > 1) { nrnmpi_abort(-1); } #endif hoc_execerror_messages = 1; if (fin && pipeflag == 0 && (!nrn_fw_eq(fin, stdin) || !nrn_istty_)) IGNORE(nrn_fw_fseek(fin, 0L, 2)); /* flush rest of file */ hoc_oop_initaftererror(); #if defined(WIN32) && !defined(CYGWIN) hoc_win_normal_cursor(); #endif if (hoc_oc_jmpbuf) { longjmp(hoc_oc_begin, 1); } longjmp(begin, 1); } void hoc_execerror(const char* s, const char* t)/* recover from run-time error */ { hoc_execerror_mes(s, t, hoc_execerror_messages); } RETSIGTYPE onintr(int sig) /* catch interrupt */ { /*ARGSUSED*/ stoprun = 1; if (intset++) execerror("interrupted", (char *) 0); IGNORE(signal(SIGINT, onintr)); } #if DOS #include #endif static int coredump; void hoc_coredump_on_error(void) { coredump = 1; ret(); pushx(1.); } RETSIGTYPE fpecatch(int sig) /* catch floating point exceptions */ { /*ARGSUSED*/ #if DOS _fpreset(); #endif #if 1 && NRN_FLOAT_EXCEPTION matherr1(); #endif if (coredump) { abort(); } signal(SIGFPE, fpecatch); execerror("floating point exception", (char *) 0); } #if HAVE_SIGSEGV RETSIGTYPE sigsegvcatch(int sig) /* segmentation violation probably due to arg type error */ { /*ARGSUSED*/ if (coredump) { abort(); } execerror("Segmentation violation", (char*)0); } #endif #if HAVE_SIGBUS RETSIGTYPE sigbuscatch(int sig) { /*ARGSUSED*/ if (coredump) { abort(); } execerror("Bus error", "See $NEURONHOME/lib/help/oc.help"); } #endif int hoc_pid(void) { return (int)getpid();} /* useful for making unique temporary file names */ /* readline should be avoided if stdin is not a terminal */ int nrn_istty_; /* has got to be called first. oc can only be event driven after this returns */ void hoc_main1_init(const char* pname, const char** envp) { extern NrnFILEWrap *frin; extern FILE *fout; static int inited = 0; hoc_xopen_file_size_ = 200; hoc_xopen_file_ = emalloc(hoc_xopen_file_size_); hoc_xopen_file_[0] = '\0'; hoc_promptstr = "oc>"; yystart = 1; lineno = 0; if (inited) { return; } inited = 1; /* could have been forced with the -isatty option */ if (nrn_istty_ == 0) { /* if not set then */ #ifdef HAVE_ISATTY nrn_istty_ = isatty(0); #else /* if we do not know, then assume so */ nrn_istty_ = 1; #endif } if (nrn_istty_ == -1) { nrn_istty_ = 0; } hoc_tmpbuf = hocstr_create(TMPBUFSIZE); hoc_cbufstr = hocstr_create(CBUFSIZE); cbuf = hoc_cbufstr->buf; ctp = cbuf; frin = nrn_fw_set_stdin(); fout = stdout; if (!parallel_sub) { if (!nrn_is_cable()) { Fprintf(stderr, "OC INTERPRETER %s %s\n", RCS_hoc_version, RCS_hoc_date); Fprintf(stderr, "Copyright 1992 - Michael Hines, Neurobiology Dept., DUMC, Durham, NC. 27710\n"); } } progname = pname; if (setjmp(begin)) { nrn_exit(1); } save_parallel_envp(); hoc_init(); initplot(); #if defined(__GO32__) setcbrk(0); #endif } HocStr* hocstr_create(size_t size) { HocStr* hs; hs = (HocStr*)emalloc(sizeof(HocStr)); hs->size = size; hs->buf = emalloc(size + 1); return hs; } static CHAR* fgets_unlimited_nltrans(HocStr* s, NrnFILEWrap* f, int nltrans); char* fgets_unlimited(HocStr* s, NrnFILEWrap* f) { return fgets_unlimited_nltrans(s, f, 0); } void hocstr_delete(HocStr* hs) { free(hs->buf); free(hs); } void hocstr_resize(HocStr* hs, size_t n) { if (hs->size < n) { /*printf("hocstr_resize to %d\n", n);*/ hs->buf = erealloc(hs->buf, n+1); hs->size = n; } } void hocstr_copy(HocStr* hs, const char* buf) { hocstr_resize(hs, strlen(buf)+1); strcpy(hs->buf, buf); } #if defined(CYGWIN) static int cygonce; /* does not need the '-' after a list of hoc files */ #endif static void hoc_run1(void); int hoc_main1(int argc, const char** argv, const char** envp) /* hoc6 */ { #ifdef WIN32 hoc_set_unhandled_exception_filter(); #endif #if 0 int controlled; #endif #if PVM init_parallel(&argc,argv); #endif save_parallel_argv(argc, argv); hoc_audit_from_hoc_main1(argc, argv, envp); hoc_main1_init(argv[0], envp); #if LINDA signal(RETREAT_SIGNAL, retreat_handler); #endif #if HAS_SIGPIPE signal(SIGPIPE, sigpipe_handler); #endif #if 0 controlled = control_jmpbuf; if (!controlled) { control_jmpbuf = 1; if (setjmp(begin)) { control_jmpbuf = 0; return 1; } } if (!controlled) { control_jmpbuf = 0; } #endif gargv = argv; gargc = argc; if ( argc > 2 && strcmp(argv[1], "-bbs_nhost") == 0) { /* if IV not running this may still be here */ gargv += 2; gargc -= 2; } if (argc > 1 && argv[1][0] != '-') { /* first file may be a checkpoint file */ extern int hoc_readcheckpoint(); switch (hoc_readcheckpoint(argv[1])) { case 1: ++gargv; --gargc; break; case 2: nrn_exit(1); break; default: break; } } if (gargc == 1) /* fake an argument list */ { #if 1 /* who knows why this ancient code no longer works under cygwin when the @@ to ' ' was introduced in moreinput*/ static const char *stdinonly[] = { "-" }; #else static char *stdinonly[1]; stdinonly[0] = (char*)emalloc(2*sizeof(char)); strcpy(stdinonly[0], "-"); #endif #if defined(CYGWIN) cygonce = 1; #endif gargv = stdinonly; gargc = 1; } else { ++gargv; --gargc; } while (moreinput()) hoc_run1(); return 0; } #if defined(WIN32) && HAVE_IV extern void ivcleanup(); #endif #if carbon #include static pthread_t* inputReady_; static pthread_mutex_t inputMutex_; static pthread_cond_t inputCond_; static int inputReadyFlag_; void* inputReadyThread(void* input); void* inputReadyThread(void* input) { fd_set readfds; int i, j; extern int stdin_event_ready(); char c; // printf("inputReadyThread started\n"); // pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &j); FD_ZERO(&readfds); FD_SET(fileno(stdin), &readfds); for (;;) { i = select(1, &readfds, 0, 0, 0); pthread_testcancel(); if (FD_ISSET(fileno(stdin), &readfds)) { if (!stdin_event_ready()) { // dialog is open. cannot accept input now. printf("Discarding input til Dialog is closed.\n"); read(fileno(stdin), &c, 1); continue; } } pthread_mutex_lock(&inputMutex_); pthread_cond_wait(&inputCond_, &inputMutex_); pthread_mutex_unlock(&inputMutex_); } printf("inputReadyThread done\n"); } #endif #if defined(MINGW) static pthread_t* inputReady_; static pthread_mutex_t inputMutex_; static pthread_cond_t inputCond_; static int inputReadyFlag_; static int inputReadyVal_; void* inputReadyThread(void* input); void* inputReadyThread(void* input) { int i, j; extern int stdin_event_ready(); char c; // pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &j); for (;;) { pthread_testcancel(); #if 0 //if (kbhit()) { if (!stdin_event_ready()) { // dialog is open. cannot accept input now. printf("Discarding input til Dialog is closed.\n"); read(fileno(stdin), &c, 1); continue; } //} #endif i = getch(); //printf("see %d %c\n", i, i); pthread_mutex_lock(&inputMutex_); inputReadyFlag_ = 1; inputReadyVal_ = i; stdin_event_ready(); pthread_cond_wait(&inputCond_, &inputMutex_); pthread_mutex_unlock(&inputMutex_); } printf("inputReadyThread done\n"); } #endif void hoc_final_exit(void) { char* buf; #if defined(USE_PYTHON) if (p_nrnpython_start) { (*p_nrnpython_start)(0);} #endif bbs_done(); hoc_audit_from_final_exit(); hoc_edit_quit(); /* Don't close the plots for the sub-processes when they finish, by default they are then closed when the master process ends */ NOT_PARALLEL_SUB(hoc_close_plot();) #if defined(WIN32) && HAVE_IV ivcleanup(); #ifndef CYGWIN if (winio_exists()) { winio_closeall(); } #endif #endif #if READLINE && (!defined(WIN32) || defined(CYGWIN)) && !defined(MAC) rl_deprep_terminal(); #endif ivoc_cleanup(); #ifdef WIN32 hoc_win32_cleanup(); #else buf = malloc(strlen(neuron_home) + 30); if (buf) { sprintf(buf, "%s/lib/cleanup %d", neuron_home, hoc_pid()); if (system(buf)) {;} /* ignore return value */ free(buf); } /* else did not call cleanup */ #endif } void hoc_quit(void) { #if carbon if (0 && inputReady_) { pthread_cancel(*inputReady_); pthread_kill(*inputReady_, SIGHUP); pthread_join(*inputReady_, 0); } #endif hoc_final_exit(); ivoc_final_exit(); #if defined(USE_PYTHON) /* if python was launched and neuron is an extension */ if (p_nrnpython_finalize) {(*p_nrnpython_finalize)();} #endif exit(0); } #if defined(CYGWIN) static const char* double_at2space(const char* infile) { char* buf; const char *cp1; char *cp2; int replace = 0; for (cp1 = infile; *cp1; ++cp1) { if (*cp1 == '@' && cp1[1] == '@') { replace = 1; break; } } if (!replace) { return infile; } buf = (char*)emalloc(strlen(infile) + 1); for (cp1=infile, cp2=buf; *cp1; ++cp1, ++cp2) { if (*cp1 == '@' && cp1[1] == '@') { *cp2 = ' '; ++cp1; }else{ *cp2 = *cp1; } } *cp2 = '\0'; return buf; } #endif /*CYGWIN*/ int moreinput(void) { if (pipeflag) { pipeflag = 0; return 1; } #if defined(WIN32) #ifndef CYGWIN if (!winio_exists()) { return 0; } #endif #if defined(CYGWIN) /* like mswin, do not need a '-' after hoc files, but ^D works */ if (gargc == 0 && cygonce == 0) { cygonce = 1; #else if (gargc == 0) { #endif fin = nrn_fw_set_stdin(); infile = 0; hoc_xopen_file_[0] = 0; #if defined(USE_PYTHON) return use_python_interpreter ? 0 : 1; #else return 1; #endif } #endif #if MAC if (gargc == 0) { fin = nrn_fw_set_stdin(); infile = 0; hoc_xopen_file_[0] = 0; #if defined(USE_PYTHON) return use_python_interpreter ? 0 : 1; #else return 1; #endif } #endif if (fin && !nrn_fw_eq(fin, stdin)) { IGNORE(nrn_fw_fclose(fin)); } fin = nrn_fw_set_stdin(); infile = 0; hoc_xopen_file_[0] = 0; if (gargc-- <= 0) { return 0; } infile = *gargv++; #if defined(WIN32) if (infile[0] == '"') { char* cp = strdup(infile + 1); for (++cp; *cp; ++cp) { if (*cp == '"') { *cp = '\0'; break; } } infile = cp; } #endif #if defined(CYGWIN) /* have difficulty passing spaces within arguments from neuron.exe through the neuron.sh shell script to nrniv.exe. Therefore neuron.exe converts the ' ' to "@@" and here we need to convert it back */ infile = double_at2space(infile); #endif lineno = 0; #if defined(USE_PYTHON) if (use_python_interpreter) { /* deal only with .hoc files. The hoc files are intended only for legacy code and there is no notion of stdin interaction with the hoc interpreter. */ if (strlen(infile) < 4 || strcmp(infile+strlen(infile)-4, ".hoc") != 0) { return moreinput(); } } #endif if (strcmp(infile, "-") == 0) { fin = nrn_fw_set_stdin(); infile = 0; hoc_xopen_file_[0] = 0; } else if (strcmp(infile, "-parallel") == 0) { /* ignore "val" as next argument */ infile = *gargv++; gargc--; return moreinput(); } else if (strcmp(infile, "-c") == 0) { int hpfi, err; HocStr* hs; infile = *gargv++; gargc--; #if defined (CYGWIN) infile = double_at2space(infile); #endif hs = hocstr_create(strlen(infile) + 2); sprintf(hs->buf, "%s\n", infile); /* now infile is a hoc statement */ hpfi = hoc_print_first_instance; fin = (NrnFILEWrap*)0; hoc_print_first_instance = 0; err = hoc_oc(hs->buf); hoc_print_first_instance = hpfi; hocstr_delete(hs); if (err) { hoc_warning("arg not valid statement:", infile); } return moreinput(); } else if (strlen(infile) > 3 && strcmp(infile+strlen(infile) -3, ".py") == 0) { if (!p_nrnpy_pyrun) { hoc_execerror("Python not available to interpret",infile); } (*p_nrnpy_pyrun)(infile); return moreinput(); } else if ((fin=nrn_fw_fopen(infile, "r")) == (NrnFILEWrap*)0) { #if OCSMALL hoc_menu_cleanup(); #endif Fprintf(stderr, "%d %s: can't open %s\n", nrnmpi_myid_world, progname, infile); #if NRNMPI if (nrnmpi_numprocs_world > 1) { nrnmpi_abort(-1); } #endif return moreinput(); } if (infile) { if (strlen(infile) >= hoc_xopen_file_size_) { hoc_xopen_file_size_ = strlen(infile) + 100; hoc_xopen_file_ = erealloc(hoc_xopen_file_, hoc_xopen_file_size_); } strcpy(hoc_xopen_file_, infile); } return 1; } #if 1 void hoc_run(void) { hoc_run1(); while (pipeflag == 1) { pipeflag = 0; hoc_run1(); } } #endif typedef RETSIGTYPE (*SignalType)(); static SignalType signals[4]; static void set_signals(void) { signals[0] = signal(SIGINT, onintr); signals[1] = signal(SIGFPE, fpecatch); #if HAVE_SIGSEGV signals[2] = signal(SIGSEGV, sigsegvcatch); #endif #if HAVE_SIGBUS signals[3] = signal(SIGBUS, sigbuscatch); #endif } static void restore_signals(void) { signals[0] = signal(SIGINT, signals[0]); signals[1] = signal(SIGFPE, signals[1]); #if HAVE_SIGSEGV signals[2] = signal(SIGSEGV, signals[2]); #endif #if HAVE_SIGBUS signals[3] = signal(SIGBUS, signals[3]); #endif } static void hoc_run1(void) /* execute until EOF */ { int controlled = control_jmpbuf; NrnFILEWrap* sav_fin = fin; if (!controlled) { set_signals(); control_jmpbuf = 1; if (setjmp(begin)) { fin = sav_fin; if (!nrn_fw_eq(fin, stdin)) { return; } } intset = 0; } hoc_execerror_messages = 1; if (pipeflag == 1) { /*at this location multiple emacs errors */ hoc_pipeflush(); /* don't eat up stack space */ }else{ pipeflag=0; } #if defined(WIN32) && !defined(CYGWIN) if (!nrn_fw_eq(fin, stdin)) { hoc_win_wait_cursor(); } #endif for (initcode(); hoc_yyparse(); initcode()) { execute(progbase); } #if defined(WIN32) && !defined(CYGWIN) hoc_win_normal_cursor(); #endif if (intset) execerror("interrupted", (char *)0); if (!controlled) { restore_signals(); control_jmpbuf = 0; } } /* event driven interface to oc. This routine always returns after processing its argument. The normal case is where the argument consists of a complete statement which can be parsed and executed. However this routine can be called with single tokens as well and the parsing will proceed incrementally until the last token that completes a statement is seen at which time the statement is executed. The routine can also be called with a string containing multiple statements separated by '\n's. During execution a ^C will halt processing and this routine will return to the calling statement. (if it is the controlling call for the jmp_buf; see below). Parse errors and execution errors will also result in a normal return to the calling statement. To avoid blocking other input events, this routine should not be called with statements which take too much time to execute or block waiting for input. With regard to long executing statements, at least in xview it is possible to run the event loop from the execute loop at intervals in code.c or else to run the event loop once via a hoc command. Where do we go in case of an hoc_execerror. We have to go to the beginning of hoc. But just maybe that is here. However hoc_oc may be called recursively. Or it may be called from the original hoc_run. Or it may be There is therefore a notion of the controlling routine for the jmp_buf begin. We only do a setjmp and set the signals when there is no other controlling routine. */ /* allow hoc_oc(buf) to handle any number of multiline statements */ static const char* nrn_inputbufptr; static void nrn_inputbuf_getline(void) { CHAR* cp; cp = ctp = cbuf = hoc_cbufstr->buf; while (*nrn_inputbufptr) { *cp++ = *nrn_inputbufptr++; if (cp[-1] == '\n') { break; } } if (cp != ctp) { if (cp[-1] != '\n') { *cp++ = '\n'; } } *cp = '\0'; } // used by ocjump.cpp void oc_save_input_info(const char** i1, int* i2, int* i3, NrnFILEWrap** i4) { *i1 = nrn_inputbufptr; *i2 = pipeflag; *i3 = lineno; *i4 = fin; } void oc_restore_input_info(const char* i1, int i2, int i3, NrnFILEWrap* i4) { nrn_inputbufptr = i1; pipeflag = i2; lineno = i3; fin = i4; } int hoc_oc(const char* buf) { char *cp; int controlled; #if 0 int yret; #endif int sav_pipeflag = pipeflag; int sav_lineno = lineno; const char* sav_inputbufptr = nrn_inputbufptr; nrn_inputbufptr = buf; pipeflag = 3; lineno = 1; controlled = hoc_oc_jmpbuf || oc_jump_target_; if (!controlled) { hoc_oc_jmpbuf = 1; if (setjmp(hoc_oc_begin)) { hoc_oc_jmpbuf = 0; restore_signals(); initcode(); intset = 0; pipeflag = sav_pipeflag; nrn_inputbufptr = sav_inputbufptr; lineno = sav_lineno; return 1; } set_signals(); } intset = 0; hocstr_resize(hoc_cbufstr, strlen(buf) + 10); nrn_inputbuf_getline(); while (*ctp || *nrn_inputbufptr) { hoc_ParseExec(yystart); if (intset) { execerror("interrupted", (char *)0); } } if (!controlled) { hoc_oc_jmpbuf = 0; restore_signals(); } lineno = sav_lineno; pipeflag = sav_pipeflag; nrn_inputbufptr = sav_inputbufptr; hoc_execerror_messages = 1; return 0; } void warning(const char* s, const char* t) /* print warning message */ { CHAR *cp; char id[10]; int n; if (nrnmpi_numprocs_world > 1) { sprintf(id, "%d ", nrnmpi_myid_world); }else{ id[0]='\0'; } if (t) { Fprintf(stderr, "%s%s: %s %s\n", id, progname, s, t); }else{ Fprintf(stderr, "%s%s: %s\n", id, progname, s); } if (hoc_xopen_file_ && hoc_xopen_file_[0]) { Fprintf(stderr, "%s in %s near line %d\n", id, hoc_xopen_file_, lineno); }else{ Fprintf(stderr, "%s near line %d\n", id, lineno); } n = strlen(cbuf); for (cp = cbuf; cp < (cbuf + n); ++cp) { if (!isprint((int)(*cp)) && !isspace((int)(*cp))) { Fprintf(stderr, "%scharacter \\%03o at position %ld is not printable\n", id, ((int)(*cp) & 0xff), cp-cbuf); break; } } Fprintf(stderr, "%s %s",id, cbuf); if (nrnmpi_numprocs_world > 0) { for (cp = cbuf; cp != ctp; cp++) { #if defined(WIN32) && !defined(CYGWIN) fputchar(' '); #else IGNORE(putc(' ', stderr)); #endif } Fprintf(stderr,"^\n"); } ctp = cbuf; *ctp = '\0'; } static int Getc(NrnFILEWrap* fp) { /*ARGSUSED*/ if (*ctp) { ++hoc_ictp; return *ctp++; } #if 0 /* don't allow parser to block. Actually partial statements were never allowed anyway */ if (!pipeflag && nrn_fw_eq(fp,stdin)) { eos = 1; return 0; } #endif if (hoc_get_line() == EOF) { return EOF; } return *ctp++; } static void unGetc(int c, NrnFILEWrap* fp) { /*ARGSUSED*/ if (c != EOF && c && ctp != cbuf) { *(--ctp) = c; } } int hoc_in_yyparse=0; int hoc_yyparse(void) { /* read line before calling yyparse() and set flag that we are inside yyparse() since re-entry is not allowed. This allows xview menus to work since most of the time we are reading a line from this point instead of in Getc which was called from yyparse(). */ /* the above may be obsolete. I switched to a modified bison generator from yacc which is generated a parser exactly like it used to be but may return YYNEEDMORE=-3 instead of blocking in yylex. If so another call to yyparse will take up exactly where it left off. This makes it easier to support event driven processing. Maybe it's time to redo the get_line process which fills cbuf with the next line to read. A real event driven program would fill cbuf and then call yyparse() directly. yyparse() returns 0 : end of file '\n' : ready to execute a command 'e' : user gave it em command, you should go to an editor -3: need more input, not at a point where it accepts or rejects the input. */ int i; if (hoc_in_yyparse) { hoc_execerror("Cannot re-enter parser", (char *)0); } do { if (hoc_get_line() == EOF) { return 0; } hoc_in_yyparse = 1; i = yyparse(); hoc_in_yyparse = 0; switch (i) { case 'e': i = '\n'; hoc_edit(); break; case -3 : /* need more input */ hoc_in_yyparse = 1; i = '\n'; break; } }while (i == '\n'); return i; } #if defined(__GO32__) #define INTERVIEWS 1 #endif #ifdef WIN32 #define INTERVIEWS 1 #endif #ifdef MAC #define INTERVIEWS 1 #endif #if defined(WITHOUT_MEMACS) #undef INTERVIEWS #define INTERVIEWS 0 #endif int hoc_interviews = 0; #if INTERVIEWS extern int run_til_stdin(); /* runs the interviews event loop. Returns 1 if there is input to be read. Returns 0 if somebody said quit but there is no input */ extern void hoc_notify_value(void); #if READLINE #if carbon extern int (*rl_event_hook)(void); static int event_hook(void) { if (!inputReady_) { inputReady_ = (pthread_t*)emalloc(sizeof(pthread_t)); pthread_mutex_init(&inputMutex_, 0); pthread_cond_init(&inputCond_, 0); pthread_create(inputReady_, 0, inputReadyThread, 0); }else{ pthread_mutex_unlock(&inputMutex_); } // printf("run til stdin\n"); run_til_stdin(); pthread_mutex_lock(&inputMutex_); pthread_cond_signal(&inputCond_); return 1; } #else /* not carbon */ #if defined(MINGW) extern int (*rl_getc_function)(void); static int getc_hook(void) { int i; if (!inputReady_) { stdin_event_ready(); /* store main thread id */ inputReady_ = (pthread_t*)emalloc(sizeof(pthread_t)); pthread_mutex_init(&inputMutex_, 0); pthread_cond_init(&inputCond_, 0); pthread_create(inputReady_, 0, inputReadyThread, 0); }else{ pthread_mutex_unlock(&inputMutex_); } // printf("run til stdin\n"); while(!inputReadyFlag_) { run_til_stdin(); usleep(10000); } inputReadyFlag_ = 0; i = inputReadyVal_; pthread_mutex_lock(&inputMutex_); pthread_cond_signal(&inputCond_); //printf("getc_hook returning %d\n", i); return i; } #else /* not carbon and not MINGW */ extern int (*rl_event_hook)(void); static int event_hook(void) { int i; i = run_til_stdin(); return i; } #endif /* not carbon and not MINGW */ #endif /* not carbon */ #endif /* READLINE */ #endif /* INTERVIEWS */ #if 1 || MAC /* On Mac combinations of /n /r /r/n require binary mode (otherwise /r/n is /n/n) but then /r does not end a line in fgets (keeps reading til /n) so we make our own fgets. May need to use it for data as well. */ /* for unix and mac this allows files created on any machine to be read on any machine */ CHAR* hoc_fgets_unlimited(HocStr* bufstr, NrnFILEWrap* f) { return fgets_unlimited_nltrans(bufstr, f, 1); } static CHAR* fgets_unlimited_nltrans(HocStr* bufstr, NrnFILEWrap* f, int nltrans) { int c, i; int nl1, nl2; if (nltrans) { nl1 = 26; nl2 = 4;}else{nl1 = nl2 = EOF;} for(i=0;; ++ i) { c = nrn_fw_getc(f); if (c == EOF || c == nl1 || c == nl2) { /* ^Z and ^D are end of file */ /* some editors don't put a newline at last line */ if ( i > 0) { nrn_fw_ungetc(c, f); c = '\n'; }else{ break; } } if (c == '\r') { int c2 = nrn_fw_getc(f); if (c2 != '\n') { nrn_fw_ungetc(c2, f); } c = '\n'; } if (bufstr->size <= i) { hocstr_resize(bufstr, bufstr->size * 2); } bufstr->buf[i] = c; if (c == '\n') { bufstr->buf[i+1] = '\0'; return bufstr->buf; } } return (CHAR*)0; } #endif #if MAC int hoc_get_line(void){ /* supports re-entry. fill cbuf with next line */ int hoc_pipegets_need(); char *hoc_pipegets(); if (*ctp) { hoc_execerror("Internal error:", "Not finished with previous input line"); } ctp = cbuf; *ctp = '\0'; if (pipeflag == 3) { nrn_inputbuf_getline(); if (*ctp == '\0') { return EOF; } }else if (pipeflag) { if (hoc_pipegets_need() > hoc_cbufstr->size) { hocstr_resize(hoc_cbufstr, hoc_pipegets_need()); } if (hoc_pipegets(cbuf, hoc_cbufstr->size) == (char *)0) { return EOF; } }else{ if (nrn_fw_wrap(fin, stdin) && hoc_interviews && !hoc_in_yyparse) { #if MAC for(;;){ extern CHAR* hoc_console_buffer; hoc_console_buffer = cbuf; if (run_til_stdin()){ //printf("%s", cbuf); //strcpy(cbuf, hoc_console_buffer); break; } else { return EOF; } } #endif } else if (hoc_fgets_unlimited(hoc_cbufstr, fin) == (CHAR *)0) { return EOF; } } // printf("%d %s", lineno, cbuf); errno = 0; lineno++; ctp = cbuf = hoc_cbufstr->buf; hoc_ictp=0; return 1; } #else int hoc_get_line(void){ /* supports re-entry. fill cbuf with next line */ char *hoc_pipegets(); if (*ctp) { hoc_execerror("Internal error:", "Not finished with previous input line"); } ctp = cbuf = hoc_cbufstr->buf; *ctp = '\0'; if (pipeflag == 3) { nrn_inputbuf_getline(); if (*ctp == '\0') { return EOF; } }else if (pipeflag) { if (hoc_pipegets_need() > hoc_cbufstr->size) { hocstr_resize(hoc_cbufstr, hoc_pipegets_need() + 100); } if (hoc_pipegets(cbuf, CBUFSIZE) == (char *)0) { return EOF; } }else{ #if READLINE if (nrn_fw_eq(fin, stdin) && nrn_istty_) { char *line; int n; #if INTERVIEWS #ifdef MINGW IFGUI if (hoc_interviews && !hoc_in_yyparse) { rl_getc_function = getc_hook; hoc_notify_value(); }else{ rl_getc_function = NULL; } ENDGUI #else /* not MINGW */ if (hoc_interviews && !hoc_in_yyparse) { rl_event_hook = event_hook; hoc_notify_value(); }else{ rl_event_hook = NULL; } #endif /* not MINGW */ #endif /* INTERVIEWS */ if ((line = readline(hoc_promptstr)) == (char *)0) { extern int hoc_notify_stop; return EOF; } #if defined(__GO32__) hoc_check_intupt(0); #endif n = strlen(line); if (n >= hoc_cbufstr->size - 3) { hocstr_resize(hoc_cbufstr, n+100); ctp = cbuf = hoc_cbufstr->buf; } strcpy((char*)cbuf, line); cbuf[n] = '\n'; cbuf[n+1] = '\0'; if (line && *line) { add_history(line); } free(line); hoc_audit_command(cbuf); }else{ fflush(stdout); if (hoc_fgets_unlimited(hoc_cbufstr, fin) == (CHAR *)0) { return EOF; } } #else #if INTERVIEWS if (nrn_fw_eq(fin, stdin) && hoc_interviews && !hoc_in_yyparse) { run_til_stdin()); } #endif #if defined(WIN32) if (nrn_fw_eq(fin, stdin)) { if (gets(cbuf) == (char*)0) { /*DebugMessage("gets returned NULL\n");*/ return EOF; } strcat(cbuf, "\n"); }else #endif { if (hoc_fgets_unlimited(hoc_cbufstr, fin) == (char *)0) { return EOF; } } #endif } errno = 0; lineno++; ctp = cbuf = hoc_cbufstr->buf; hoc_ictp=0; return 1; } #endif void hoc_help(void) { #if INTERVIEWS if (hoc_interviews) { ivoc_help(cbuf); }else #endif { IFGUI hoc_warning("Help only available from version with ivoc library", 0); ENDGUI } ctp = cbuf + strlen(cbuf) - 1; } #if defined(__GO32__) void hoc_check_intupt(int intupt) { if (_go32_was_ctrl_break_hit()) { if (intupt) { execerror("interrupted", (char*)0); } } } #endif neuron-7.5/src/oc/hoc.h000077500000000000000000000001131323325274500150110ustar00rootroot00000000000000 #ifndef hoc_h #define hoc_h #include "redef.h" #include "hocdec.h" #endif neuron-7.5/src/oc/hoc_init.c000077500000000000000000000216121323325274500160360ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/hoc_init.c,v 1.25 1999/11/08 17:48:58 hines Exp */ #include "hoc.h" #include "parse.h" #include #include "equation.h" #include "ocfunc.h" #if PVM extern int numprocs(), myproc(), psync(); #endif #if 0 extern int hoc_co(); #endif #if DOS || defined(WIN32) /*|| defined(MAC)*/ extern int hoc_settext(); extern void hoc_win_exec(void); extern double erf(), erfc(); /* supplied by unix */ #endif #if MAC static double Fabs(x) double x; { return (x>0.) ? x : -x; } static double Erf(x) double x; { return erf(x); } static double Erfc(x) double x; { return erfc(x); } #endif static struct { /* Keywords */ char *name; int kval; } keywords[] = { "proc", parsePROC, "func", FUNC, "obfunc", HOCOBJFUNC, "return", RETURN, "break", BREAK, "continue", CONTINUE, "stop", STOPSTMT, "if", IF, "else", ELSE, "while", WHILE, "for", FOR, "print", PRINT, "delete", parseDELETE, "read", READ, "debug", DEBUG, "double", parseDOUBLE, "em", EDIT, "depvar", DEPENDENT, "eqn", EQUATION, "local", LOCAL, "localobj", LOCALOBJ, "strdef", STRDEF, "parallel", PARALLEL, "help", HELP, "iterator", ITERKEYWORD, "iterator_statement", ITERSTMT, #if CABLE "create", SECTIONKEYWORD, "connect", CONNECTKEYWORD, "setpointer", SETPOINTERKEYWORD, "access", ACCESSKEYWORD, "insert", INSERTKEYWORD, "uninsert", UNINSERTKEYWORD, "forall", FORALL, "ifsec", IFSEC, "forsec", FORSEC, #endif /*CABLE*/ #if OOP "begintemplate", BEGINTEMPLATE, "endtemplate", ENDTEMPLATE, "objectvar", OBJVARDECL, "objref", OBJVARDECL, "public", PUBLICDECL, "external", EXTERNALDECL, "new", NEW, #endif 0, 0 }; static struct { /* Constants */ char *name; double cval; } consts[] = { "PI", 3.14159265358979323846, "E", 2.71828182845904523536, "GAMMA",0.57721566490153286060, /* Euler */ "DEG", 57.29577951308232087680, /* deg/radian */ "PHI", 1.61803398874989484820, /* golden ratio */ "FARADAY", 96485.309, /*coulombs/mole*/ "R", 8.31441, /*molar gas constant, joules/mole/deg-K*/ 0, 0 }; static struct { /* Built-ins */ char *name; double (*func)(); } builtins[] = { "sin", sin, "cos", cos, "atan", atan, "tanh", tanh, "log", Log, /* checks argument */ "log10",Log10, /* checks argument */ "exp", hoc1_Exp, /* checks argument */ "sqrt", Sqrt, /* checks argument */ "int", integer, #if MAC "abs", Fabs, "erf", Erf, "erfc", Erfc, #else "abs", fabs, "erf", erf, "erfc", erfc, #endif 0, 0 }; static struct { /* Builtin functions with multiple or variable args */ char *name; void (*fun_blt)(void); } fun_bltin[] = { "atan2", hoc_atan2, "system", hoc_System, "prmat", hoc_Prmat, "solve", hoc_solve, "eqinit", hoc_eqinit, "plt", hoc_Plt, "axis", hoc_axis, "plot", hoc_Plot, "plotx", hoc_plotx, "ploty", hoc_ploty, "regraph", hoc_regraph, "symbols", hoc_symbols, "printf", hoc_PRintf, "xred", hoc_Xred, "sred", hoc_Sred, "ropen", hoc_ropen, "wopen", hoc_wopen, "xopen", hoc_xopen, "hoc_stdout", hoc_stdout, "chdir", hoc_Chdir, "fprint", hoc_Fprint, "fscan", hoc_Fscan, "sscanf", hoc_sscanf, "sprint", hoc_Sprint, "graph", hoc_Graph, "graphmode", hoc_Graphmode, "fmenu", hoc_fmenu, "lw", hoc_Lw, "getstr", hoc_Getstr, "strcmp", hoc_Strcmp, "setcolor", hoc_Setcolor, "startsw", hoc_startsw, "stopsw", hoc_stopsw, "object_id", hoc_object_id, "allobjectvars", hoc_allobjectvars, "allobjects", hoc_allobjects, "xpanel", hoc_xpanel, "xbutton", hoc_xbutton, "xcheckbox", hoc_xcheckbox, "xstatebutton", hoc_xstatebutton, "xlabel", hoc_xlabel, "xmenu", hoc_xmenu, "xvalue", hoc_xvalue, "xpvalue", hoc_xpvalue, "xradiobutton", hoc_xradiobutton, "xfixedvalue", hoc_xfixedvalue, "xvarlabel", hoc_xvarlabel, "xslider", hoc_xslider, "boolean_dialog", hoc_boolean_dialog, "continue_dialog", hoc_continue_dialog, "string_dialog", hoc_string_dialog, "doEvents", hoc_single_event_run, "doNotify", hoc_notify_iv, "nrniv_bind_thread", nrniv_bind_thread, "ivoc_style", ivoc_style, "numarg", hoc_Numarg, "argtype", hoc_Argtype, "hoc_pointer_", hoc_pointer, /* for internal use */ "nrn_mallinfo", hoc_mallinfo, "execute", hoc_exec_cmd, "execute1", hoc_execute1, "load_proc", hoc_load_proc, "load_func", hoc_load_func, "load_template", hoc_load_template, "load_file", hoc_load_file, "load_java", hoc_load_java, "unix_mac_pc", hoc_unix_mac_pc, "show_winio", hoc_show_winio, "nrn_load_dll", hoc_nrn_load_dll, "machine_name", hoc_machine_name, "saveaudit", hoc_Saveaudit, "retrieveaudit", hoc_Retrieveaudit, "coredump_on_error", hoc_coredump_on_error, "checkpoint", hoc_checkpoint, "quit", hoc_quit, "object_push", hoc_object_push, "object_pop", hoc_object_pop, "pwman_place", hoc_pwman_place, "save_session", hoc_save_session, "print_session", hoc_print_session, "show_errmess_always", hoc_show_errmess_always, "execerror", hoc_Execerror, "variable_domain", hoc_Symbol_limits, "name_declared", hoc_name_declared, "use_mcell_ran4", hoc_usemcran4, "mcell_ran4", hoc_mcran4, "mcell_ran4_init", hoc_mcran4init, "nrn_feenableexcept", nrn_feenableexcept, #if PVM "numprocs", numprocs, "myproc", myproc, "psync", psync, #endif #if DOS "settext", hoc_settext, #endif #if defined(WIN32) "WinExec", hoc_win_exec, #endif 0, 0 }; static struct { /* functions that return a string */ char *name; void (*strfun_blt)(void); } strfun_bltin[] = { "secname", hoc_secname, "units", hoc_Symbol_units, "neuronhome", hoc_neuronhome, "getcwd", hoc_getcwd, "nrnversion", hoc_nrnversion, 0, 0 }; static struct { /* functions that return an object */ char *name; void (*objfun_blt)(void); } objfun_bltin[] = { "object_pushed", hoc_object_pushed, 0, 0 }; double hoc_epsilon = 1.e-11; double hoc_ac_; /*known to the interpreter to evaluate expressions with hoc_oc() */ double* hoc_varpointer; /* executing hoc_pointer(&var) will put the address of the variable in this location */ double hoc_cross_x_, hoc_cross_y_; /* For Graph class in ivoc */ double hoc_default_dll_loaded_; char* neuron_home; char* nrn_mech_dll; /* but actually only for NEURON mswin and linux */ int use_mcell_ran4_; int nrn_xopen_broadcast_; void hoc_init(void) /* install constants and built-ins table */ { int i; Symbol *s; use_mcell_ran4_ = 0; nrn_xopen_broadcast_ = 255; hoc_init_space(); for (i = 0; keywords[i].name; i++) IGNORE(install(keywords[i].name, keywords[i].kval, 0.0, &symlist)); for (i = 0; consts[i].name; i++) { s = install(consts[i].name, UNDEF, consts[i].cval, &symlist); s->type = VAR; s->u.pval = &consts[i].cval; s->subtype = USERDOUBLE; } for (i = 0; builtins[i].name; i++) { s = install(builtins[i].name, BLTIN, 0.0, &symlist); s->u.ptr = builtins[i].func; } for (i = 0; fun_bltin[i].name; i++) { s = install(fun_bltin[i].name, FUN_BLTIN, 0.0, &symlist); s->u.u_proc->defn.pf = fun_bltin[i].fun_blt; s->u.u_proc->nauto = 0; s->u.u_proc->nobjauto = 0; } for (i = 0; strfun_bltin[i].name; i++) { s = install(strfun_bltin[i].name, FUN_BLTIN, 0.0, &symlist); s->type = STRINGFUNC; s->u.u_proc->defn.pf = strfun_bltin[i].strfun_blt; s->u.u_proc->nauto = 0; s->u.u_proc->nobjauto = 0; } for (i = 0; objfun_bltin[i].name; i++) { s = install(objfun_bltin[i].name, FUN_BLTIN, 0.0, &symlist); s->type = OBJECTFUNC; s->u.u_proc->defn.pf = objfun_bltin[i].objfun_blt; s->u.u_proc->nauto = 0; } /* hoc_ac_ is a way to evaluate an expression using the interpreter */ hoc_install_var("hoc_ac_", &hoc_ac_); hoc_install_var("float_epsilon", &hoc_epsilon); hoc_install_var("hoc_cross_x_", &hoc_cross_x_); hoc_install_var("hoc_cross_y_", &hoc_cross_y_); hoc_install_var("default_dll_loaded_", &hoc_default_dll_loaded_); s = install("xopen_broadcast_", UNDEF, 0.0, &hoc_symlist); s->type = VAR; s->subtype = USERINT; s->u.pvalint = &nrn_xopen_broadcast_; /* initialize pointers ( why doesn't Vax do this?) */ hoc_access = (int *)0; spinit(); #if OOP hoc_class_registration(); hoc_built_in_symlist = symlist; symlist = (Symlist *)0; /* start symlist and top level the same list */ hoc_top_level_symlist = symlist = (Symlist *)emalloc(sizeof(Symlist)); symlist->first = symlist->last = (Symbol *)0; hoc_install_hoc_obj(); #endif } void hoc_unix_mac_pc(void) { hoc_ret(); #if defined(DARWIN) hoc_pushx(4.); #else #if MAC hoc_pushx(2.); #else #if defined(WIN32) hoc_pushx(3.); #else hoc_pushx(1.); #endif #endif #endif } void hoc_show_winio(void) { int b; b = (int)chkarg(1, 0., 1.); #if MAC hoc_sioux_show(b); #endif #if defined(WIN32) hoc_winio_show(b); #endif hoc_ret(); hoc_pushx(0.); } int nrn_main_launch; void hoc_nrnversion(void) { extern char* nrn_version(); static char* p; int i; i = 1; if (ifarg(1)) { i = (int)chkarg(1, 0., 20.); } hoc_ret(); p = nrn_version(i); hoc_pushstr(&p); } void hoc_Execerror(void) { char* c2 = (char*)0; if (ifarg(2)) { c2 = gargstr(2); } if (ifarg(1)) { hoc_execerror(gargstr(1), c2); }else{ hoc_execerror_mes(c2, c2, 0); } /* never get here */ } neuron-7.5/src/oc/hoc_membf.h000066400000000000000000000005671323325274500161710ustar00rootroot00000000000000#ifndef hoc_membf_h #define hoc_membf_h struct Object; typedef struct Member_func { const char* name; double (*member)(void*); }Member_func; typedef struct Member_ret_obj_func { const char* name; struct Object** (*member)(void*); }Member_ret_obj_func; typedef struct Member_ret_str_func { const char* name; const char** (*member)(void*); }Member_ret_str_func; #endif neuron-7.5/src/oc/hoc_oop.c000077500000000000000000001414671323325274500157030ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "hocstr.h" #include "parse.h" #include "hocparse.h" #include "code.h" #include "hocassrt.h" #include "hoclist.h" #include "nrnmpi.h" #include "nrnfilewrap.h" #include #define PDEBUG 0 #define JAVA2NRN 1 #if JAVA2NRN #include "nrnjava.h" void* (*p_java2nrn_cons)(Object*); void (*p_java2nrn_destruct)(void* opaque_java_object); double (*p_java2nrn_dmeth)(Object* ho, Symbol* method); char** (*p_java2nrn_smeth)(Object* ho, Symbol* method); Object** (*p_java2nrn_ometh)(Object* ho, Symbol* method); #endif #if USE_PYTHON Symbol* nrnpy_pyobj_sym_; void (*nrnpy_py2n_component)(Object* o, Symbol* s, int nindex, int isfunc); void (*nrnpy_hpoasgn)(Object* o, int type); #endif #if CABLE #include "section.h" #include "nrniv_mf.h" int section_object_seen; struct Section* nrn_sec_pop(); double* nrn_rangepointer(); static int connect_obsec_; #endif #define PUBLIC_TYPE 1 #define EXTERNAL_TYPE 2 static void call_constructor(Object*, Symbol*, int); static void free_objectdata(Objectdata*, Template*); int hoc_print_first_instance = 1; static Symbol* hoc_obj_; void hoc_install_hoc_obj(void) { hoc_oc("objref hoc_obj_[2]\n"); hoc_obj_ = hoc_lookup("hoc_obj_"); } Object* hoc_obj_get(int i) { Object** p = hoc_objectdata[hoc_obj_->u.oboff].pobj; if (p) { return p[i]; }else{ return (Object*)0; } } void hoc_obj_set(int i, Object* obj) { Object** p = hoc_objectdata[hoc_obj_->u.oboff].pobj; hoc_obj_ref(obj); hoc_dec_refcount(p + i); p[i] = obj; } char* hoc_object_name(Object* ob) { static char s[100]; if (ob) { Sprintf(s, "%s[%d]", ob->template->sym->name, ob->index); }else{ Sprintf(s, "NULLobject"); } return s; } size_t hoc_total_array(Symbol* s) /* total number of elements in array pointer */ { int total = 1, i; Arrayinfo* a = OPARINFO(s); if (a) { for (i = a->nsub-1; i>=0; --i) { total *= a->sub[i]; } } return total; } size_t hoc_total_array_data(Symbol* s, Objectdata* obd) /* total number of elements in array pointer */ { Arrayinfo* a; int total = 1, i; if (!obd) { a = s->arayinfo; }else switch (s->type) { #if CABLE case RANGEVAR: a = s->arayinfo; break; #endif default: a = obd[s->u.oboff + 1].arayinfo; break; } if (a) { for (i = a->nsub-1; i>=0; --i) { total *= a->sub[i]; } } return total; } static int icntobjectdata=0; Object* hoc_thisobject; Objectdata *hoc_objectdata = (Objectdata *)0; Objectdata *hoc_top_level_data; static int icnttoplevel; int hoc_in_template=0; void hoc_push_current_object(void) { hoc_push_object(hoc_thisobject); } Objectdata* hoc_objectdata_save(void) { /* hoc_top_level_data changes when new vars are introduced */ if (hoc_objectdata == hoc_top_level_data) { /* a template starts out its Objectdata as 0. */ return (Objectdata*)1; }else{ return hoc_objectdata; } } Objectdata* hoc_objectdata_restore(Objectdata* obdsav) { if (obdsav == (Objectdata*)1) { return hoc_top_level_data;; }else{ return obdsav; } } void hoc_obvar_declare(Symbol* sym, int type, int pmes) { if (sym->type != UNDEF) { return; } assert(sym->public != 2); if (pmes && hoc_symlist == hoc_top_level_symlist) { int b = 0; #if USE_NRNFILEWRAP b = (hoc_fin && hoc_fin->f == stdin); #else b = (hoc_fin == stdin); #endif if (nrnmpi_myid_world == 0 &&(hoc_print_first_instance || b)) { NOT_PARALLEL_SUB(printf("first instance of %s\n", sym->name);) } sym->defined_on_the_fly = 1; } hoc_install_object_data_index(sym); sym->type = type; switch (type) { case VAR: /*printf("hoc_obvar_declare %s\n", sym->name);*/ OPVAL(sym) = (double *)ecalloc(1, sizeof(double)); break; case STRING: OPSTR(sym) = (char **)0; break; case OBJECTVAR: break; #if CABLE case SECTION: OPSECITM(sym) = (struct Item**)0; break; #endif default: hoc_execerror(sym->name, "can't declare this in obvar_declare"); break; } } /*-----------------------------------------------*/ /* template stack so nested templates are ok */ typedef union { Symbol *sym; Symlist *symlist; Objectdata *odata; Object* o; int i; }Templatedatum; #define NTEMPLATESTACK 20 static Templatedatum templatestack[NTEMPLATESTACK]; static Templatedatum *templatestackp = templatestack; static Templatedatum *poptemplate(void) { if (templatestackp == templatestack) { hoc_execerror("templatestack underflow", (char *)0); } return (--templatestackp); } #define pushtemplatesym(arg) chktemplate(); (templatestackp++)->sym = arg #define pushtemplatesymlist(arg) chktemplate(); (templatestackp++)->symlist = arg #define pushtemplatei(arg) chktemplate(); (templatestackp++)->i = arg #define pushtemplateodata(arg) chktemplate(); (templatestackp++)->odata = arg #define pushtemplateo(arg) chktemplate(); (templatestackp++)->o = arg static void chktemplate(void){ if (templatestackp == templatestack+NTEMPLATESTACK) { templatestackp = templatestack; hoc_execerror("templatestack overflow", (char *)0); } } /*------------------------------------------------*/ /* mostly to allow saving of objects */ #define OBJ_STACK_SIZE 10 static Object* obj_stack_[OBJ_STACK_SIZE+1]; /* +1 so we can see the most recent pushed */ static int obj_stack_loc; void hoc_object_push(void) { Object* ob = *hoc_objgetarg(1); if (ob->template->constructor) { hoc_execerror("Can't do object_push for built-in class", 0); } if (obj_stack_loc >= OBJ_STACK_SIZE) { hoc_execerror("too many object context stack depth", 0); } obj_stack_[obj_stack_loc++] = hoc_thisobject; obj_stack_[obj_stack_loc] = ob; hoc_thisobject = ob; if (ob) { hoc_symlist = ob->template->symtable; hoc_objectdata = ob->u.dataspace; }else{ hoc_symlist = hoc_top_level_symlist; hoc_objectdata = hoc_top_level_data; } hoc_ret(); pushx(0.); } void hoc_object_pushed(void) { Object* ob; int i = chkarg(1, 0., (double)obj_stack_loc); ob = obj_stack_[obj_stack_loc - i]; hoc_ret(); hoc_push_object(ob); } void hoc_object_pop(void) { Object* ob; if (obj_stack_loc < 1) { hoc_execerror("object context stack underflow", 0); } obj_stack_[obj_stack_loc] = (Object*)0; ob = obj_stack_[--obj_stack_loc]; hoc_thisobject = ob; if (ob) { hoc_symlist = ob->template->symtable; hoc_objectdata = ob->u.dataspace; }else{ hoc_symlist = hoc_top_level_symlist; hoc_objectdata = hoc_top_level_data; } hoc_ret(); pushx(0.); } /*-----------------------------------------------*/ int hoc_resize_toplevel(int more) { if (more > 0) { icnttoplevel += more; hoc_top_level_data = (Objectdata *)erealloc((char *)hoc_top_level_data, icnttoplevel*sizeof(Objectdata)); if (templatestackp == templatestack) { hoc_objectdata = hoc_top_level_data; } } return icnttoplevel; } void hoc_install_object_data_index(Symbol* sp) { if (!hoc_objectdata) { icntobjectdata = 0; } sp->u.oboff = icntobjectdata; icntobjectdata += 2; /* data pointer and Arrayinfo */ hoc_objectdata = (Objectdata *)erealloc((char *)hoc_objectdata, icntobjectdata*sizeof(Objectdata)); hoc_objectdata[icntobjectdata-1].arayinfo = sp->arayinfo; if (sp->arayinfo) { ++sp->arayinfo->refcount; } if (templatestackp == templatestack) { hoc_top_level_data = hoc_objectdata; icnttoplevel = icntobjectdata; } } int hoc_obj_run(const char* cmd, Object* ob) { int err; Object* objsave; Objectdata* obdsave; Symlist* slsave; int osloc; objsave = hoc_thisobject; obdsave = hoc_objectdata_save(); slsave = hoc_symlist; osloc = obj_stack_loc; if (ob) { if (ob->template->constructor) { hoc_execerror("Can't execute in a built-in class context", 0); } hoc_thisobject = ob; hoc_objectdata = ob->u.dataspace; hoc_symlist = ob->template->symtable; }else{ hoc_thisobject = 0; hoc_objectdata = hoc_top_level_data; hoc_symlist = hoc_top_level_symlist; } err = hoc_oc(cmd); hoc_thisobject = objsave; hoc_objectdata = hoc_objectdata_restore(obdsave); hoc_symlist = slsave; obj_stack_loc = osloc; return err; } void hoc_exec_cmd(void) { /* execute string from top level or within an object context */ int err; char* cmd; char buf[256]; char* pbuf; Object* ob = 0; HocStr* hs=0; cmd = gargstr(1); pbuf = buf; if (strlen(cmd) > 256 - 10) { hs = hocstr_create(strlen(cmd) + 10); pbuf = hs->buf; } if (cmd[0] == '~') { sprintf(pbuf, "%s\n", cmd+1); }else{ sprintf(pbuf, "{%s}\n", cmd); } if (ifarg(2)) { ob = *hoc_objgetarg(2); } err = hoc_obj_run(pbuf, ob); if (err) { hoc_execerror("execute error:", cmd); } if (pbuf != buf) { hocstr_delete(hs); } hoc_ret(); pushx((double)(err)); } /* call a function within the context of an object. Args must be on stack */ double hoc_call_objfunc(Symbol* s, int narg, Object* ob) { double d, hoc_call_func(); Object* objsave; Objectdata* obdsave; Symlist* slsave; objsave = hoc_thisobject; obdsave = hoc_objectdata_save(); slsave = hoc_symlist; if (ob) { hoc_thisobject = ob; hoc_objectdata = ob->u.dataspace; hoc_symlist = ob->template->symtable; }else{ hoc_thisobject = 0; hoc_objectdata = hoc_top_level_data; hoc_symlist = hoc_top_level_symlist; } d = hoc_call_func(s, narg); hoc_thisobject = objsave; hoc_objectdata = hoc_objectdata_restore(obdsave); hoc_symlist = slsave; return d; } void hoc_oop_initaftererror(void) { hoc_symlist = hoc_top_level_symlist; templatestackp = templatestack; icntobjectdata = icnttoplevel; hoc_objectdata = hoc_top_level_data; hoc_thisobject = (Object*)0; obj_stack_loc = 0; hoc_in_template = 0; #if CABLE connect_obsec_ = 0; #endif } void oc_save_hoc_oop( Object* *a1, Objectdata* *a2, int *a4, Symlist* *a5 ){ *a1 = hoc_thisobject; /* same style as hoc_objectdata_sav */ if (hoc_objectdata == hoc_top_level_data) { *a2 = (Objectdata*)1; }else{ *a2 = hoc_objectdata; } *a4 = obj_stack_loc; *a5 = hoc_symlist; } void oc_restore_hoc_oop( Object* *a1, Objectdata* *a2, int *a4, Symlist* *a5 ){ hoc_thisobject = *a1; if (*a2 == (Objectdata*)1) { hoc_objectdata = hoc_top_level_data; }else{ hoc_objectdata = *a2; } obj_stack_loc = *a4; hoc_symlist = *a5; } Object* hoc_new_object(Symbol* symtemp, void* v) { Object* ob; #if PDEBUG printf("new object from template %s created.\n", symtemp->name); #endif ob = (Object *)emalloc(sizeof(Object)); ob->recurse = 0; ob->unref_recurse_cnt = 0; ob->refcount = 1; /* so template notify will not delete */ ob->observers = (void*)0; ob->template = symtemp->u.template; ob->aliases = (void*)0; ob->itm_me = hoc_l_lappendobj(ob->template->olist, ob); ob->secelm_ = (hoc_Item*)0; ob->template->count++; ob->index = ob->template->index++; if (symtemp->subtype & (CPLUSOBJECT | JAVAOBJECT)) { ob->u.this_pointer = v; if (v) { hoc_template_notify(ob, 1); } }else{ ob->u.dataspace = 0; } ob->refcount = 0; return ob; } void hoc_new_object_asgn( Object** obp, Symbol* st, void* v ){ hoc_dec_refcount(obp); *obp = hoc_new_object(st, v); hoc_obj_ref(*obp); } Object** hoc_temp_objvar(Symbol* symtemp, void* v){ return hoc_temp_objptr(hoc_new_object(symtemp, v)); } Object* hoc_newobj1(Symbol* sym, int narg) { Object *ob; Objectdata *obd; Symbol *s; int i, total; ob = hoc_new_object(sym, (void*)0); ob->refcount = 1; if (sym->subtype & (CPLUSOBJECT | JAVAOBJECT)) { call_constructor(ob, sym, narg); }else{ ob->u.dataspace = obd = (Objectdata *)ecalloc(ob->template->dataspace_size, sizeof(Objectdata)); for (s = ob->template->symtable->first; s; s = s->next) { if (s->public != 2) { switch (s->type) { case VAR: if ((obd[s->u.oboff + 1].arayinfo = s->arayinfo) != (Arrayinfo*)0) { ++s->arayinfo->refcount; } total = hoc_total_array_data(s, obd); obd[s->u.oboff].pval = (double *)emalloc(total*sizeof(double)); for(i=0; iu.oboff].pval)[i] = 0.; } break; case STRING: obd[s->u.oboff + 1].arayinfo = (Arrayinfo*)0; obd[s->u.oboff].ppstr = (char**)emalloc(sizeof(char*)); *obd[s->u.oboff].ppstr = (char *)emalloc(sizeof(char)); **(obd[s->u.oboff].ppstr) = '\0'; break; case OBJECTVAR: if ((obd[s->u.oboff + 1].arayinfo = s->arayinfo) != (Arrayinfo*)0) { ++s->arayinfo->refcount; } total = hoc_total_array_data(s, obd); obd[s->u.oboff].pobj = (Object **)emalloc(total*sizeof(Object *)); for (i=0; iu.oboff].pobj)[i] = (Object *)0; } if (strcmp(s->name, "this") == 0) { obd[s->u.oboff].pobj[0] = ob; } break; #if CABLE case SECTION: if ((obd[s->u.oboff + 1].arayinfo = s->arayinfo) != (Arrayinfo*)0) { ++s->arayinfo->refcount; } total = hoc_total_array_data(s, obd); obd[s->u.oboff].psecitm = (struct Item **)emalloc(total*sizeof(struct Item*)); new_sections(ob, s, obd[s->u.oboff].psecitm, total); break; #endif } } } if (ob->template->is_point_) { hoc_construct_point(ob, narg); } if (ob->template->init) { call_ob_proc(ob, ob->template->init, narg); }else{ for (i=0; i < narg; ++i) { hoc_nopop(); } } } hoc_template_notify(ob, 1); return ob; } void hoc_newobj_arg(void) { Object* ob; Symbol* sym; int narg; sym = (pc++)->sym; narg = (pc++)->i; ob = hoc_newobj1(sym, narg); --ob->refcount; /*not necessarily 0 since init may reference 'this' */ hoc_pushobj(hoc_temp_objptr(ob)); } void hoc_newobj_ret(void) { hoc_newobj_arg(); } void hoc_newobj(void) { /* template at pc+1 */ Object *ob, **obp; Objectdata *obd; Symbol *sym, *s; int i, total; int narg; sym = (pc++)->sym; narg = (pc++)->i; #if USE_PYTHON /* look inside stack because of limited number of temporary objects? */ /* whatever. we will keep the strategy */ if (hoc_inside_stacktype(narg) == OBJECTVAR) { #endif obp = hoc_look_inside_stack(narg, OBJECTVAR)->pobj; ob = hoc_newobj1(sym, narg); hoc_nopop(); /* the object pointer */ hoc_dec_refcount(obp); *(obp) = ob; hoc_pushobj(obp); #if USE_PYTHON }else{ /* PythonObject assignment */ Object* o = hoc_obj_look_inside_stack(narg); assert(o->template->sym == nrnpy_pyobj_sym_); ob = hoc_newobj1(sym, narg); hoc_push_object(ob); (*nrnpy_hpoasgn)(o, OBJECTTMP); hoc_obj_unref(ob); } #endif } static void call_constructor( Object *ob, Symbol *sym, int narg ){ Inst *pcsav; Symlist *slsav; Objectdata *obdsav; Object* obsav; slsav = hoc_symlist; obdsav = hoc_objectdata_save(); obsav = hoc_thisobject; pcsav = pc; push_frame(sym, narg); ob->u.this_pointer = (ob->template->constructor)(ob); pop_frame(); pc = pcsav; hoc_symlist = slsav; hoc_objectdata = hoc_objectdata_restore(obdsav); hoc_thisobject = obsav; } void call_ob_proc(Object *ob, Symbol *sym, int narg){ Inst *pcsav, callcode[4]; Symlist *slsav; Objectdata *obdsav; Object* obsav; slsav = hoc_symlist; obdsav = hoc_objectdata_save(); obsav = hoc_thisobject; pcsav = pc; if (ob->template->sym->subtype & CPLUSOBJECT) { hoc_thisobject = ob; push_frame(sym, narg); hoc_thisobject = obsav; if (sym->type == OBFUNCTION) { Object** o; o = (*(sym->u.u_proc->defn.pfo_vp))(ob->u.this_pointer); if (*o) {++(*o)->refcount;} /* in case unreffed below */ pop_frame(); if (*o) {--(*o)->refcount;} hoc_pushobj(o); }else if (sym->type == STRFUNCTION) { char** s; s = (char**)(*(sym->u.u_proc->defn.pfs_vp))(ob->u.this_pointer); pop_frame(); hoc_pushstr(s); }else{ double x; x = (*(sym->u.u_proc->defn.pfd_vp))(ob->u.this_pointer); pop_frame(); hoc_pushx(x); } #if JAVA2NRN }else if (ob->template->sym->subtype & JAVAOBJECT) { hoc_thisobject = ob; push_frame(sym, narg); hoc_thisobject = obsav; if (sym->type == OBFUNCTION) { Object** o; o = (*(p_java2nrn_ometh))(ob, sym); if (*o) {++(*o)->refcount;} /* in case unreffed below */ pop_frame(); if (*o) {--(*o)->refcount;} hoc_pushobj(o); }else if (sym->type == STRFUNCTION) { char** s; s = (*(p_java2nrn_smeth))(ob, sym); pop_frame(); hoc_pushstr(s); }else{ double x; x = (*(p_java2nrn_dmeth))(ob, sym); pop_frame(); hoc_pushx(x); } #endif /*JAVA2NRN*/ #if CABLE }else if (ob->template->is_point_ && special_pnt_call(ob, sym, narg)) { ;/*empty since special_pnt_call did the work for get_loc, has_loc, and loc*/ #endif }else{ callcode[0].pf = call; callcode[1].sym = sym; callcode[2].i = narg; callcode[3].in = STOP; hoc_objectdata = ob->u.dataspace; hoc_thisobject = ob; hoc_symlist = ob->template->symtable; execute(callcode); if (sym->type == PROCEDURE) { hoc_nopop(); } } if (hoc_errno_check()) { char str[200]; sprintf(str, "%s.%s", hoc_object_name(ob), sym->name); hoc_warning("errno set during call of", str); } pc = pcsav; hoc_symlist = slsav; hoc_objectdata = hoc_objectdata_restore(obdsav); hoc_thisobject = obsav; } static void call_ob_iter(Object *ob, Symbol *sym, int narg){ Symlist *slsav; Objectdata *obdsav; Object* obsav; Object* stmtobj; Inst* stmtbegin, *stmtend; slsav = hoc_symlist; obdsav = hoc_objectdata_save(); obsav = hoc_thisobject; hoc_objectdata = ob->u.dataspace; hoc_thisobject = ob; hoc_symlist = ob->template->symtable; stmtobj = hoc_look_inside_stack(narg+1, OBJECTTMP)->obj; stmtbegin = pc + pc->i; pc++; stmtend = pc + pc->i; hoc_iterator_object(sym, narg, stmtbegin, stmtend, stmtobj); /* the stack was popped by hoc_iterator_object hoc_nopop(); */ hoc_symlist = slsav; hoc_objectdata = hoc_objectdata_restore(obdsav); hoc_thisobject = obsav; } void hoc_objvardecl(void) {/* symbol at pc+1, number of indices at pc+2 */ Symbol *sym; int nsub, size, i; Object **pobj; sym = (pc++)->sym; #if PDEBUG printf("declareing %s as objectvar\n", sym->name); #endif if (sym->type == OBJECTVAR) { int total, i; total = hoc_total_array(sym); for (i=0; iu.oboff].pobj); hoc_freearay(sym); }else{ sym->type = OBJECTVAR; hoc_install_object_data_index(sym); } nsub = (pc++)->i; if (nsub) { size = hoc_arayinfo_install(sym, nsub); }else{ size = 1; } hoc_objectdata[sym->u.oboff].pobj = pobj = (Object **)emalloc(size*sizeof(Object *)); for (i=0; ii; } void hoc_known_type(void) { int type; type = ((pc++)->i); } void hoc_objectvar(void) { /* object variable symbol at pc+1. */ /* pointer to correct object left on stack */ Objectdata* odsav; Object* obsav = 0; Symlist* slsav; Symbol *obs; Object **obp; #if PDEBUG printf("code for hoc_objectvar()\n"); #endif obs = (pc++)->sym; if (obs->public == 2) { obs = obs->u.sym; odsav = hoc_objectdata_save(); obsav = hoc_thisobject; slsav = hoc_symlist; hoc_objectdata = hoc_top_level_data; hoc_thisobject = 0; hoc_symlist = hoc_top_level_symlist; } obp = OPOBJ(obs); if (ISARRAY(obs)) { hoc_pushobj(obp + araypt(obs, OBJECTVAR)); }else{ hoc_pushobj(obp); } if (obsav) { hoc_objectdata = hoc_objectdata_restore(odsav); hoc_thisobject = obsav; hoc_symlist = slsav; } } void hoc_objectarg(void) { /* object arg index at pc+1. */ /* pointer to correct object left on stack */ int i; Object **obp, **hoc_objgetarg(); #if PDEBUG printf("code for hoc_objectarg()\n"); #endif i = (pc++)->i; if (i == 0) { i = hoc_argindex(); } obp = hoc_objgetarg(i); hoc_pushobj(obp); } void hoc_constobject(void) { /* template at pc, index at pc+1, objpointer left on stack*/ char buf[200]; Object *obj; Item* q; Template* t = (pc++)->sym->u.template; int index = (int)hoc_xpop(); ITERATE (q, t->olist) { obj = OBJ(q); if (obj->index == index) { hoc_pushobj(hoc_temp_objptr(obj)); return; }else if (obj->index > index) { break; } } sprintf(buf, "%s[%d]\n", t->sym->name, index); hoc_execerror("Object ID doesn't exist:", buf); } Object* hoc_name2obj(const char* name, int index) { char buf[200]; Object *obj; Item* q; Template* t; Symbol* sym; sym = hoc_table_lookup(name, hoc_top_level_symlist); if (!sym) { sym = hoc_table_lookup(name, hoc_built_in_symlist); } if (!sym || sym->type != TEMPLATE) { hoc_execerror(name, "is not a template"); } t = sym->u.template; ITERATE (q, t->olist) { obj = OBJ(q); if (obj->index == index) { return obj; }else if (obj->index > index) { break; } } return (Object*)0; } void hoc_object_id(void) { Object *ob, **hoc_objgetarg(); ob = *(hoc_objgetarg(1)); if (ifarg(2) && chkarg(2, 0., 1.) == 1.) { hoc_ret(); if (ob) { pushx((double)ob->index); }else{ pushx(-1.); } }else{ hoc_ret(); pushx((double)((size_t)ob)); } } #if CABLE static void range_suffix(Symbol* sym, int nindex, int narg) { int bdim = 0; if (ISARRAY(sym)) { if (nindex != sym->arayinfo->nsub) { bdim = 1; } }else{ if (nindex != 0) { bdim = 1; } } if (bdim) { hoc_execerror(sym->name, "wrong number of array dimensions"); } if (sym->type == RANGEVAR) { hoc_pushi(narg); hoc_pushs(sym); }else if (sym->subtype == USERPROPERTY) { if (narg) { hoc_execerror(sym->name, "section property can't have argument"); } hoc_pushs(sym); }else{ hoc_execerror(sym->name, "suffix not a range variable or section property"); } } void connect_obsec_syntax(void) { connect_obsec_ = 1; } #endif void hoc_object_component(void) { /* number of indices at pc+2, number of args at pc+3, symbol at pc+1 */ /* object pointer on stack after indices */ /* if component turns out to be an object then make sure pointer to correct object, symbol, etc is left on stack for evaluation, assignment, etc. */ Symbol *sym0, *sym=0; int nindex, narg, cplus, isfunc; Object *obp, *obsav; Objectdata *psav; int* ptid; Symbol** psym; #if PDEBUG printf("code for hoc_object_component()\n"); #endif sym0 = (pc++)->sym; nindex = (pc++)->i; narg = (pc++)->i; ptid = &(pc++)->i; psym = &(pc++)->sym; isfunc = (pc++)->i; #if CABLE if (section_object_seen) { section_object_seen = 0; range_suffix(sym0, nindex, narg); return; } if (connect_obsec_) { narg += nindex; nindex = 0; } #endif if (nindex) { if (narg) { hoc_execerror("[...](...) syntax only allowed for array range variables:", sym0->name); } }else{ nindex = narg; } obp = hoc_obj_look_inside_stack(nindex); if (obp) { #if USE_PYTHON if (obp->template->sym == nrnpy_pyobj_sym_) { if (isfunc & 2) { /* this is the final left hand side of an assignment to the method of a PythonObject and we need to put the PythonObject and the method with all its info onto the stack so that a proper __setattro__ or __setitem__ can be accomplished in the next hoc_object_asgn */ if (isfunc&1) { hoc_execerror("Cannot assign to a PythonObject function call:", sym0->name); } pushi(nindex); pushs(sym0); hoc_push_object(obp); /* note obp is now on stack twice */ /* hpoasgn will pop both */ }else{ (*nrnpy_py2n_component)(obp, sym0, nindex, isfunc); } return; } #endif if (obp->template->id == *ptid) { sym = *psym; }else{ if (obp->aliases == 0 || (sym = ivoc_alias_lookup(sym0->name, obp)) == 0) { /* lookup only has to be done once if the name is not an alias and the ptid of the object is still the same. */ sym = hoc_table_lookup(sym0->name, obp->template->symtable); if (!sym || sym->public != PUBLIC_TYPE) { fprintf(stderr, "%s not a public member of %s\n", sym0->name, obp->template->sym->name); hoc_execerror(obp->template->sym->name, sym0->name); } *ptid = obp->template->id; *psym = sym; } } }else{ hoc_execerror(sym0->name, ": object prefix is NULL"); } psav = hoc_objectdata_save(); obsav = hoc_thisobject; cplus = (obp->template->sym->subtype & (CPLUSOBJECT | JAVAOBJECT)); if (!cplus) { /* c++ classes don't have a hoc dataspace */ hoc_objectdata = obp->u.dataspace; hoc_thisobject = obp; } switch (sym->type) { case OBJECTVAR: if (nindex) { if (!ISARRAY(sym) || OPARINFO(sym)->nsub != nindex) { hoc_execerror(sym->name, ":not right number of subscripts"); } nindex = araypt(sym, OBJECTVAR); } hoc_pop_defer(); hoc_pushobj(OPOBJ(sym) + nindex); break; case VAR: if (cplus) { double* pd; if (nindex) { if (!ISARRAY(sym) || sym->arayinfo->nsub != nindex) { hoc_execerror(sym->name, ":not right number of subscripts"); } } hoc_pushs(sym); (*obp->template->steer)(obp->u.this_pointer); pd = hoc_pxpop(); /* cannot pop a temporary object til after the pd is used in case (e.g. Vector.x) the pointer is a field in the object (often the pd has nothing to do with the object)*/ hoc_pop_defer(); /* corresponding unref_defer soon */ hoc_pushpx(pd); }else{ if (nindex) { if (!ISARRAY(sym) || OPARINFO(sym)->nsub != nindex) { hoc_execerror(sym->name, ":not right number of subscripts"); } nindex = araypt(sym, OBJECTVAR); } hoc_pop_defer(); /*finally get rid of symbol */ hoc_pushpx(OPVAL(sym) + nindex); } break; case STRING: if (nindex) { hoc_execerror(sym->name, ": string can't have function arguments or array indices"); } hoc_pop_defer(); hoc_pushstr(OPSTR(sym)); break; case PROCEDURE: case FUNCTION: { double d=0.; call_ob_proc(obp, sym, nindex); if (hoc_returning) { break; } if (sym->type == FUNCTION) { d = hoc_xpop(); } hoc_pop_defer(); hoc_pushx(d); break;} case HOCOBJFUNCTION: case OBFUNCTION: { Object** d; call_ob_proc(obp, sym, nindex); if (hoc_returning) { break; } d = hoc_objpop(); if (*d) {(*d)->refcount++;} /* nopop may unref if temp obj.*/ hoc_pop_defer(); hoc_pushobj(d); if (*d) {(*d)->refcount--;} /* see the nopop may unref comment */ hoc_tobj_unref(d); break;} case STRFUNCTION: { char** d; call_ob_proc(obp, sym, nindex); if (hoc_returning) { break; } d = hoc_strpop(); hoc_pop_defer(); hoc_pushstr(d); break;} #if CABLE case SECTIONREF: { extern Symbol* nrn_sec_sym; Section* sec, *nrn_sectionref_steer(); section_object_seen = 1; sec = (Section*)obp->u.this_pointer; if (sym != nrn_sec_sym) { sec = nrn_sectionref_steer(sec, sym, &nindex); } if (nrn_inpython_ == 2) { section_object_seen = 0; hoc_pop_defer(); hoc_objectdata = hoc_objectdata_restore(psav); hoc_thisobject = obsav; return; } if ( connect_obsec_) { double x=0.0; connect_obsec_ = 0; if (nindex != 1) { hoc_execerror(sym->name, ": bad connect syntax"); } x = hoc_xpop(); hoc_pop_defer(); hoc_pushx(x); }else{ if (nindex) { hoc_execerror(sym->name, ":no subscript allowed"); } hoc_pop_defer(); } if (!sec->prop) { hoc_execerror("Section was deleted", (char*)0); } nrn_pushsec(sec); break; } case SECTION: { double x=0.0; section_object_seen = 1; if (connect_obsec_) { x = hoc_xpop(); if (!nindex) { hoc_execerror(sym->name, ": bad connect syntax"); } --nindex; } if (nindex) { if (!ISARRAY(sym) || OPARINFO(sym)->nsub != nindex) { hoc_execerror(sym->name, ":not right number of subscripts"); } nindex = araypt(sym, OBJECTVAR); } hoc_pop_defer(); if (connect_obsec_) { hoc_pushx(x); connect_obsec_ = 0; } ob_sec_access_push(*(OPSECITM(sym) + nindex)); break; } #endif /*CABLE*/ case ITERATOR: { if ((pc++)->i != ITERATOR) { hoc_execerror(sym->name, ":ITERATOR can only be used in a for statement"); } call_ob_iter(obp, sym, nindex); if (hoc_returning) { break; } hoc_pop_defer(); hoc_nopop(); /* get rid of iterator statement context */ break;} default: if (cplus) { double* pd; if (nindex) { if (!ISARRAY(sym) || sym->arayinfo->nsub != nindex) { hoc_execerror(sym->name, ":not right number of subscripts"); } } hoc_pushs(sym); (*obp->template->steer)(obp->u.this_pointer); pd = hoc_pxpop(); hoc_pop_defer(); hoc_pushpx(pd); }else{ hoc_execerror(sym->name, ": can't push that type onto stack"); } break; case OBJECTALIAS: if (nindex) { hoc_execerror(sym->name, ": is an alias and cannot have subscripts"); } hoc_pop_defer(); hoc_push_object(sym->u.object_); break; case VARALIAS: if (nindex) { hoc_execerror(sym->name, ": is an alias and cannot have subscripts"); } hoc_pop_defer(); hoc_pushpx(sym->u.pval); break; } hoc_objectdata = hoc_objectdata_restore(psav); hoc_thisobject = obsav; } void hoc_object_eval(void) { int type; #if PDEBUG printf("code for hoc_object_eval\n"); #endif type = hoc_stacktype(); if (type == VAR) { hoc_pushx(*(hoc_pxpop())); }else if (type == SYMBOL) { #if CABLE Datum* d = hoc_look_inside_stack(0, SYMBOL); if (d->sym->type == RANGEVAR) { double* nrn_rangepointer(); Symbol* sym = hoc_spop(); int narg = hoc_ipop(); struct Section* sec = nrn_sec_pop(); double x; if (narg) { x = hoc_xpop(); }else{ x = .5; } hoc_pushx(*(nrn_rangepointer(sec, sym, x))); }else if (d->sym->type == VAR && d->sym->subtype == USERPROPERTY) { double cable_prop_eval(); hoc_pushx(cable_prop_eval(hoc_spop())); } #endif } } void hoc_ob_pointer(void) { int type; Symbol* sym; #if PDEBUG printf("code for hoc_ob_pointer\n"); #endif type = hoc_stacktype(); if (type == VAR) { }else if (type == SYMBOL) { #if CABLE Datum* d = hoc_look_inside_stack(0, SYMBOL); if (d->sym->type == RANGEVAR) { double* nrn_rangepointer(); Symbol* sym = hoc_spop(); int nindex = hoc_ipop(); struct Section* sec = nrn_sec_pop(); double x; if (nindex) { x = hoc_xpop(); }else{ x = .5; } hoc_pushpx(nrn_rangepointer(sec, sym, x)); }else if (d->sym->type == VAR && d->sym->subtype == USERPROPERTY) { double* cable_prop_eval_pointer(); hoc_pushpx(cable_prop_eval_pointer(hoc_spop())); }else{ hoc_execerror("Not a double pointer", 0); } #else hoc_execerror("Not a double pointer", 0); #endif }else{ hoc_execerror("Not a double pointer", 0); } } void hoc_asgn_obj_to_str(void) { /* string on stack */ char *d, **pstr; d = *(hoc_strpop()); pstr = hoc_strpop(); hoc_assign_str(pstr, d); } void hoc_object_asgn(void) { int type1, type2, op; op = (pc++)->i; type1 = hoc_stacktype(); type2 = hoc_inside_stacktype(1); #if CABLE if (type2 == SYMBOL) { Datum* d = hoc_look_inside_stack(1, SYMBOL); if (d->sym->type == RANGEVAR) { type2 = RANGEVAR; }else if (d->sym->type == VAR && d->sym->subtype == USERPROPERTY) { type2 = USERPROPERTY; } } if (type2 == RANGEVAR && type1 == NUMBER) { double d = hoc_xpop(); struct Section* sec; Symbol* sym = hoc_spop(); int nindex = hoc_ipop(); sec = nrn_sec_pop(); if (nindex) { double* pd; pd = nrn_rangepointer(sec, sym, hoc_xpop()); if (op) { d = hoc_opasgn(op, *pd, d); } *pd = d; }else{ nrn_rangeconst(sec, sym, &d, op); } hoc_pushx(d); return; }else if (type2 == USERPROPERTY && type1 == NUMBER) { double d = hoc_xpop(); cable_prop_assign(hoc_spop(), &d, op); hoc_pushx(d); return; } #endif switch (type2) { case VAR: { double d, *pd; d = hoc_xpop(); pd = hoc_pxpop(); if (op) { d = hoc_opasgn(op, *pd, d); } *pd = d; hoc_pushx(d); } break; case OBJECTVAR: { Object **d, **pd; if (op) { hoc_execerror("Invalid assignment operator for object", (char*)0); } d = hoc_objpop(); pd = hoc_objpop(); if (d != pd) { Object* tobj = *d; if (tobj) { (tobj)->refcount++; } hoc_tobj_unref(d); hoc_dec_refcount(pd); *pd = tobj; } hoc_pushobj(pd); } break; case STRING: { char *d, **pd; if (op) { hoc_execerror("Invalid assignment operator for string", (char*)0); } d = *(hoc_strpop()); pd = hoc_strpop(); hoc_assign_str(pd, d); hoc_pushstr(pd); } break; #if USE_PYTHON case OBJECTTMP: { /* should be PythonObject */ Object* o; o = hoc_obj_look_inside_stack(1); assert(o->template->sym == nrnpy_pyobj_sym_); if (op) { hoc_execerror("Invalid assignment operator for PythonObject", (char*)0); } (*nrnpy_hpoasgn)(o, type1); } break; #endif default: hoc_execerror("Cannot assign to left hand side", (char*)0); } } /* if the name isn't a template then look in the top level symbol table. This allows objects to create objects of any class defined at the top level */ Symbol* hoc_which_template(Symbol* s) { if (s->type != TEMPLATE) { Symbol* s1; s1 = hoc_table_lookup(s->name, hoc_top_level_symlist); if (!s1 || s1->type != TEMPLATE) { hoc_execerror(s->name, "is not a template"); } s = s1; } return s; } /* pushes old symtable and template name on template stack. And creates new symtable. The new symtable is used for all non-builtin names until an endtemplate is reached */ static int template_id; void hoc_begintemplate(Symbol* t1) { Symbol* t; int type; t = hoc_decl(t1); #if PDEBUG printf("begin template %s\n", t->name); #endif type = t->type; if (type == TEMPLATE) { hoc_execerror(t->name, ": a template cannot be redefined"); hoc_free_symspace(t); }else if (type != UNDEF) { hoc_execerror(t->name, "already used as something besides template"); } t->u.template = (Template *)emalloc(sizeof(Template)); t->type = TEMPLATE; t->u.template->sym = t; t->u.template->symtable = (Symlist *)0; t->u.template->dataspace_size = 0; t->u.template->constructor = 0; t->u.template->destructor = 0; t->u.template->is_point_ = 0; t->u.template->steer = 0; t->u.template->checkpoint = 0; t->u.template->id = ++template_id; pushtemplatei(icntobjectdata); pushtemplateodata(hoc_objectdata); pushtemplatei(hoc_in_template); pushtemplateo(hoc_thisobject); pushtemplatesymlist(hoc_symlist); pushtemplatesym(t); hoc_in_template = 1; hoc_objectdata = (Objectdata *)0; hoc_thisobject = (Object*)0; hoc_symlist = t->u.template->symtable; } void hoc_endtemplate(Symbol* t) { Symbol *ts, *s; #if PDEBUG printf("end template %s\n", t->name); #endif ts = (poptemplate())->sym; if (strcmp(ts->name, t->name) != 0) { hoc_execerror(t->name, "- end template mismatched with begin"); } ts->u.template->dataspace_size = icntobjectdata; ts->u.template->symtable = hoc_symlist; ts->u.template->count = 0; ts->u.template->index = 0; ts->u.template->olist = hoc_l_newlist(); ts->u.template->observers = (void*)0; hoc_symlist = (poptemplate())->symlist; free_objectdata(hoc_objectdata, ts->u.template); hoc_thisobject = (poptemplate())->o; hoc_in_template = (poptemplate())->i; hoc_objectdata = (poptemplate())->odata; icntobjectdata = (poptemplate())->i; ts->u.template->init = s = hoc_table_lookup("init", ts->u.template->symtable); if (s && s->type != PROCEDURE) { hoc_execerror("'init' can only be used as the initialization procedure for new objects", (char *)0); } ts->u.template->unref = s = hoc_table_lookup("unref", ts->u.template->symtable); if (s && s->type != PROCEDURE) { hoc_execerror("'unref' can only be used as the callback procedure when the reference count is decremented", (char *)0); } } void class2oc( const char* name, void* (*cons)(Object*), void (*destruct)(void*), Member_func* m, int (*checkpoint)(void**), Member_ret_obj_func* mobjret, Member_ret_str_func* strret ){ Symbol* tsym, *s; Template* t; int i; if (hoc_lookup(name)) { hoc_execerror(name, "already being used as a name"); } tsym = hoc_install(name, UNDEF, 0.0, &hoc_symlist); tsym->subtype = CPLUSOBJECT; hoc_begintemplate(tsym); t = tsym->u.template; t->constructor = cons; t->destructor = destruct; t->steer = 0; t->checkpoint = checkpoint; if (m) for (i=0; m[i].name; ++i) { s = hoc_install(m[i].name, FUNCTION, 0.0, &hoc_symlist); s->u.u_proc->defn.pfd_vp = m[i].member; hoc_add_publiclist(s); } if (mobjret) for (i=0; mobjret[i].name; ++i) { s = hoc_install(mobjret[i].name, OBFUNCTION, 0.0, &hoc_symlist); s->u.u_proc->defn.pfo_vp = mobjret[i].member; hoc_add_publiclist(s); } if (strret) for (i=0; strret[i].name; ++i) { s = hoc_install(strret[i].name, STRFUNCTION, 0.0, &hoc_symlist); s->u.u_proc->defn.pfs_vp = strret[i].member; hoc_add_publiclist(s); } hoc_endtemplate(tsym); } #if JAVA2NRN Symbol* java2nrn_class( const char* name, int id, const char* meth ){ Symbol* tsym, *s; Template* t; int i, mid; const char* cp; char mname[256], signature[256], *cn, *buf; if (hoc_lookup(name)) { hoc_execerror(name, "already being used as a name"); } tsym = hoc_install(name, UNDEF, 0.0, &hoc_symlist); printf("class %s methods:\n", tsym->name); tsym->subtype = JAVAOBJECT; hoc_begintemplate(tsym); t = tsym->u.template; t->id = -(id + 1); /* all others incremented from 1, must not be 0 */ t->constructor = p_java2nrn_cons; t->destructor = p_java2nrn_destruct; t->steer = 0; t->checkpoint = 0; mid = 0; /* meth is a "type name signature ..." space separated string constructed by Neuron.java and the order gives mid */ for (cp = meth; *cp; ++cp) { int type=0; switch (*cp) { case 'd': type = FUNCTION; break; case 's': type = STRFUNCTION; break; case 'o': type = OBFUNCTION; break; default: printf("|%s|\n", meth); assert(0); } ++cp; /* now at space */ ++cp;/* skip the space between type and name */ for (cn = mname; *cp != ' '; ++cn, ++cp) { if (*cp == '.') { *cn = '_'; }else{ *cn = *cp; } } *cn = '\0'; ++cp;/* skip the space between name and signature */ /* get the signature */ for (cn = signature; *cp != ' ' && *cp != '\0'; ++cn, ++cp) { *cn = *cp; } *cn = '\0'; if (*cp == '\0') { --cp; /* for increment will put it back for test */ } s = hoc_lookup(mname); if (s) { /* indicate overloading with s_varn */ s->s_varn = 1; }else{ s = hoc_install(mname, type, 0.0, &hoc_symlist); /* init will be removed later so don't add */ if (strcmp(mname, "init") != 0) { hoc_add_publiclist(s); s->s_varn = 0; /* not overloaded --- yet */ }else{ /* but force init to be overloaded */ s->s_varn = 1; } s->u.u_auto = mid; /*printf("installed %s %d\n", s->name, s->u.u_auto);*/ } mid++; } /* pass again and take care of overloading. */ mid = 0; for (cp = meth; *cp; ++cp) { int type=0; switch (*cp) { case 'd': type = FUNCTION; break; case 's': type = STRFUNCTION; break; case 'o': type = OBFUNCTION; break; default: printf("|%s|\n", meth); assert(0); } ++cp; /* now at space */ ++cp;/* skip the space between type and name */ for (cn = mname; *cp != ' '; ++cn, ++cp) { if (*cp == '.') { *cn = '_'; }else{ *cn = *cp; } } *cn = '\0'; ++cp;/* skip the space between name and signature */ /* get the signature */ for (cn = signature; *cp != ' ' && *cp != '\0'; ++cn, ++cp) { *cn = *cp; } *cn = '\0'; if (*cp == '\0') { --cp; /* for increment will put it back for test */ } s = hoc_lookup(mname); if (s->s_varn > 0) { sprintf(mname + strlen(mname), "%ld%s", strlen(signature), signature); if (hoc_lookup(mname)) { printf("%s derived from overloaded %s already exists\n", mname, s->name); }else{ Symbol* so; so = hoc_install(mname, type, 0.0, &hoc_symlist); hoc_add_publiclist(so); so->s_varn = 0; /* not overloaded --- yet */ so->u.u_auto = mid; ++s->s_varn; /*printf("installed %s %d\n", so->name, so->u.u_auto);*/ } } ++mid; } /* get rid of init if it exists. That's only for a hoc constructor */ s = hoc_lookup("init"); if (s) { hoc_unlink_symbol(s, hoc_symlist); if (s->name) { free(s->name); } free((char*)s); } hoc_endtemplate(tsym); i = 0; for (s = tsym->u.template->symtable->first; s; s = s->next) { i += strlen(s->name) + 1; if (i >= 80) { printf("\n"); i = strlen(s->name) + 1; } printf(" %s", s->name); } printf("\n"); return tsym; } #endif /* JAVA2NRN */ Symbol* hoc_decl(Symbol* s) { Symbol* ss; if (templatestackp == templatestack) { if (s == hoc_table_lookup(s->name, hoc_built_in_symlist)) { hoc_execerror(s->name, ": Redeclaring at top level"); } return s; } ss = hoc_table_lookup(s->name, hoc_symlist); if (!ss) { ss = hoc_install(s->name, UNDEF, 0.0, &hoc_symlist); } return ss; } void hoc_add_publiclist(Symbol* s) { Symbol* ss; #if PDEBUG printf("public name %s with type %d\n", s->name, s->type); #endif if (templatestackp == templatestack) { hoc_execerror("Not in a template\n", 0); } ss = hoc_decl(s); ss->public = PUBLIC_TYPE; } void hoc_external_var(Symbol* s) { Symbol* s0; if (templatestackp == templatestack) { hoc_execerror("Not in a template\n", 0); } if (s->public == PUBLIC_TYPE) { hoc_execerror(s->name, "can't be public and external"); } s->public = EXTERNAL_TYPE; s0 = hoc_table_lookup(s->name, hoc_top_level_symlist); if (!s0) { hoc_execerror(s->name, "not declared at the top level"); } s->type = s0->type; s->subtype = s0->subtype; switch(s->type) { case FUNCTION: case PROCEDURE: case ITERATOR: case HOCOBJFUNCTION: s->u.u_proc = s0->u.u_proc; break; case TEMPLATE: s->u.template = s0->u.template; break; case STRING: case OBJECTVAR: case VAR: case SECTION: s->arayinfo = s0->arayinfo; s->u.sym = s0; break; default: hoc_execerror(s->name, "type is not allowed external"); break; } } void hoc_ob_check(int type) { int t; t = ipop(); if (type == -1) { if (t == OBJECTVAR) {/* don't bother to check */ Code(hoc_cmp_otype); codei(0); } }else if (type) { if (t == OBJECTVAR) {/* must check dynamically */ #if PDEBUG printf("dymnamic checking of type=%d\n", type); #endif Code(hoc_cmp_otype); codei(type); }else if (type != t) { /* static check */ hoc_execerror("Type mismatch", (char *)0); } }else{ if (t != OBJECTVAR) { Code(hoc_known_type); codei(t); } } } void hoc_free_allobjects(Template *template, Symlist *sl, Objectdata *data) { /* look in all object variables that point to objects with this template and null them */ Symbol *s; int total, i; Object **obp; if (sl) for (s = sl->first; s; s = s->next) { if (s->type == OBJECTVAR && s->public != 2) { total = hoc_total_array_data(s, data); for (i=0; iu.oboff].pobj + i; if (*obp) { #if 1 if ((*obp)->template == template) { hoc_dec_refcount(obp); }else if (s->subtype != CPLUSOBJECT) { /* descend to look for more */ hoc_free_allobjects(template, (*obp)->template->symtable, (*obp)->u.dataspace); } #else if (s->subtype != CPLUSOBJECT) { /* descend to look for more */ hoc_free_allobjects(template, (*obp)->template->symtable, (*obp)->u.dataspace); } if ((*obp)->template == template) { hoc_dec_refcount(obp); } #endif } } } } } #define objectpath hoc_objectpath_impl #define pathprepend hoc_path_prepend void pathprepend(char* path, const char* name, const char* indx) { char buf[200]; if (path[0]) { strcpy(buf, path); sprintf(path, "%s%s.%s",name, indx, buf); }else{ sprintf(path, "%s%s", name, indx); } } int objectpath(Object* ob, Object* oblook, char* path, int depth) { /* recursively build the pathname to the object */ Symbol *s; Symlist* sl; int total, i; Objectdata* od; Object **obp; if (ob == oblook) { return 1; } if (oblook) { if (depth++ > 5) { hoc_warning("objectpath depth > 4 for", oblook->template->sym->name); return 0; } if (oblook->template->constructor) { return ivoc_list_look(ob, oblook, path, depth); }else{ od = oblook->u.dataspace; sl = oblook->template->symtable; } }else{ od = hoc_top_level_data; sl = hoc_top_level_symlist; } if (sl) for (s = sl->first; s; s = s->next) { if (s->type == OBJECTVAR && s->public != 2) { total = hoc_total_array_data(s, od); for (i=0; iu.oboff].pobj + i; if (*obp && *obp != oblook && objectpath(ob, *obp, path, depth)) { pathprepend(path, s->name, hoc_araystr(s, i, od)); return 1; } } } } return 0; } char* hoc_object_pathname(Object* ob) { static char path[512]; path[0] = '\0'; if (objectpath(ob, (Object*)0, path, 0)) { return path; }else{ #if 0 hoc_warning("Couldn't find a pathname to the object pointer", ob->template->sym->name); return (char*)0; #else return hoc_object_name(ob); #endif } } void hoc_obj_ref(Object* obj){ if (obj) { ++obj->refcount; } } void hoc_dec_refcount(Object** pobj) { Object* obj; obj = *pobj; if (obj == (Object *)0) { return; } *pobj = (Object *)0; assert(obj->refcount > 0); hoc_obj_unref(obj); } void hoc_obj_unref(Object* obj){ Object *obsav; if (!obj) { return; } #if 0 printf("unreffing %s with refcount %d\n", hoc_object_name(obj), obj->refcount); #endif --obj->refcount; if (obj->template->unref) { int i = obj->refcount; pushx((double)i); ++obj->unref_recurse_cnt; call_ob_proc(obj, obj->template->unref, 1); --obj->unref_recurse_cnt; } if (obj->refcount <= 0 && obj->unref_recurse_cnt == 0) { if (obj->aliases) { ivoc_free_alias(obj); } if (obj->observers) { hoc_obj_disconnect(obj); } hoc_l_delete(obj->itm_me); if (obj->template->observers) { hoc_template_notify(obj, 0); } if (obj->template->sym->subtype & (CPLUSOBJECT | JAVAOBJECT)) { (obj->template->destructor)(obj->u.this_pointer); }else{ obsav = hoc_thisobject; hoc_thisobject = obj; free_objectdata(obj->u.dataspace, obj->template); obj->u.dataspace = (Objectdata *)0; hoc_thisobject = obsav; } if (--obj->template->count <= 0) { obj->template->index = 0; } obj->template = (Template *)0; /* for testing purposes we don't free the object in order to make sure no object variable ever uses a freed object */ #if 1 hoc_free_object(obj); #endif } } static void free_objectdata(Objectdata *od, Template *template){ Symbol *s; int i, total; Objectdata *psav; Object **objp; psav = hoc_objectdata; hoc_objectdata = od; if (template->symtable) for (s=template->symtable->first; s; s=s->next) { if (s->public != 2) { switch (s->type) { case VAR: /*printf("free_objectdata %s\n", s->name);*/ hoc_free_val_array(OPVAL(s), hoc_total_array(s)); free_arrayinfo(OPARINFO(s)); break; case STRING: hoc_free_pstring(OPSTR(s)); free_arrayinfo(OPARINFO(s)); break; case OBJECTVAR: objp = OPOBJ(s); if (strcmp("this", s->name) != 0) { total = hoc_total_array(s); for (i = 0; i < total; i++) { hoc_dec_refcount(objp + i); } } free_arrayinfo(OPARINFO(s)); free((char*)objp); break; #if CABLE case SECTION: total = hoc_total_array(s); for (i = 0; i < total; ++i) { extern void sec_free(); sec_free(*(OPSECITM(s) + i)); } free((char*)OPSECITM(s)); free_arrayinfo(OPARINFO(s)); break; #endif } } } #if CABLE if (template->is_point_) { void* v = od[template->dataspace_size-1]._pvoid; if (v) { /* printf("Free point process\n");*/ destroy_point_process(v); } } #endif hoc_objectdata = psav; if (od) { free((char *)od); } } static void hoc_allobjects1(Symlist* sl, int nspace); static void hoc_allobjects2(Symbol* s, int nspace); void hoc_allobjects(void) { int n = 0; if (ifarg(1)) { if (hoc_is_str_arg(1)) { hoc_allobjects2(hoc_lookup(gargstr(1)), 0); }else{ Object** o = hoc_objgetarg(1); if (*o) { n = (*o)->refcount; } } }else{ hoc_allobjects1(hoc_built_in_symlist, 0); hoc_allobjects1(hoc_top_level_symlist, 0); } hoc_ret(); pushx((double)n); } void hoc_allobjects1(Symlist* sl, int nspace) { Symbol* s; Template* t; Object* o; Item* q; int i; if (sl) for (s = sl->first; s; s = s->next) { if (s->type == TEMPLATE) { t = s->u.template; ITERATE(q, t->olist) { o = OBJ(q); for (i=0; i < nspace; ++i) { printf(" "); } printf("%s with %d refs\n", hoc_object_name(o), o->refcount); } hoc_allobjects1(t->symtable, nspace+1); } } } void hoc_allobjects2(Symbol* s, int nspace) { Template* t; Object* o; Item* q; int i; if (s && s->type == TEMPLATE) { t = s->u.template; ITERATE(q, t->olist) { o = OBJ(q); for (i=0; i < nspace; ++i) { printf(" "); } printf("%s with %d refs\n", hoc_object_name(o), o->refcount); } } } static void hoc_list_allobjref(Symlist*, Objectdata*, int); void hoc_allobjectvars(void) { hoc_list_allobjref(hoc_top_level_symlist, hoc_top_level_data, 0); hoc_ret(); pushx(0.); } static void hoc_list_allobjref(Symlist *sl, Objectdata *data, int depth) { /* look in all object variables that point to objects and print them */ Symbol *s; int total, i, id; Object **obp; if (sl) for (s = sl->first; s; s = s->next) { if (s->type == OBJECTVAR && s->public != 2) { total = hoc_total_array_data(s, data); for (i=0; iu.oboff].pobj + i; for (id=0; id %s with %d refs.\n", s->name, i, hoc_object_name(*obp), (*obp)->refcount); }else{ printf("obp %s[%d] -> NULL\n", s->name, i); } if (*obp && !(*obp)->recurse && s->subtype != CPLUSOBJECT && (*obp)->u.dataspace != data /* not this */ ) { /* descend to look for more */ (*obp)->recurse = 1; hoc_list_allobjref((*obp)->template->symtable, (*obp)->u.dataspace, depth+1); (*obp)->recurse = 0; } } } } } void check_obj_type(Object* obj, const char* typename) { char buf[100]; if (!obj || strcmp(obj->template->sym->name, typename) != 0) { if (obj) { sprintf(buf, "object type is %s instead of", obj->template->sym->name); }else{ sprintf(buf, "object type is nil instead of"); } hoc_execerror(buf, typename); } } int is_obj_type(Object* obj, const char* typename) { if (obj && strcmp(obj->template->sym->name, typename) == 0) { return 1; }else{ return 0; } } neuron-7.5/src/oc/hocassrt.h000077500000000000000000000012251323325274500160730ustar00rootroot00000000000000 #ifndef hocassrt_h #define hocassrt_h #include #undef assert #undef _assert # ifndef NDEBUG # ifndef stderr # include # endif #if defined(__cplusplus) extern "C" { #endif extern void hoc_execerror(const char*, const char*); #if defined(__cplusplus) } #endif #if defined(__STDC__) # define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__,__LINE__);hoc_execerror(#ex, (char *)0);}} #else # define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__,__LINE__);hoc_execerror("ex", (char *)0);}} #endif # else # define _assert(ex) ; # define assert(ex) ; # endif #endif neuron-7.5/src/oc/hocdec.h000066400000000000000000000233441323325274500154750ustar00rootroot00000000000000 #ifndef hocdec_h #define hocdec_h #define INCLUDEHOCH 1 #define OOP 1 #if defined(__cplusplus) extern "C" { #endif #include "nrnapi.h" #include "hocassrt.h" #include #define gargstr hoc_gargstr #define getarg hoc_getarg /* the dec alpha cxx doesn't understand struct foo* inside a struct */ #if defined(__cplusplus) #define HocStruct /**/ #define HocTypedef /**/ #define HocUnion /**/ union Inst; struct Symbol; struct Arrayinfo; struct Proc; struct Symlist; union Datum; struct cTemplate; union Objectdata; struct Object; struct hoc_Item; #else #define HocStruct struct #define HocUnion union #define HocTypedef typedef #endif typedef int (*Pfri)(void); typedef void (*Pfrv)(void); typedef double (*Pfrd)(void); typedef struct Object** (*Pfro)(void); typedef const char** (*Pfrs)(void); typedef int (*Pfri_vp)(void*); typedef void (*Pfrv_vp)(void*); typedef double (*Pfrd_vp)(void*); typedef struct Object** (*Pfro_vp)(void*); typedef const char** (*Pfrs_vp)(void*); typedef union Inst { /* machine instruction list type */ Pfrv pf; Pfrd pfd; Pfro pfo; Pfrs pfs; Pfrv_vp pfv_vp; Pfrd_vp pfd_vp; Pfro_vp pfo_vp; Pfrs_vp pfs_vp; HocUnion Inst *in; HocStruct Symbol *sym; void* ptr; int i; } Inst; #define STOP (Inst *)0 typedef struct Arrayinfo { /* subscript info for arrays */ unsigned *a_varn; /* dependent variable number for array elms */ int nsub; /* number of subscripts */ int refcount; /* because one object always uses symbol's */ int sub[1]; /* subscript range */ } Arrayinfo; typedef struct Proc { Inst defn; /* FUNCTION, PROCEDURE, FUN_BLTIN */ unsigned long size; /* length of instruction list */ HocStruct Symlist *list; /* For constants and strings */ /* not used by FUN_BLTIN */ int nauto; /* total # local variables */ int nobjauto; /* the last of these are pointers to objects */ } Proc; typedef struct Symlist { HocStruct Symbol *first; HocStruct Symbol *last; }Symlist; typedef char *Upoint; # define NOTUSER 0 # define USERINT 1 /* For subtype */ # define USERDOUBLE 2 #define USERPROPERTY 3 /* for newcable non-range variables */ #define USERFLOAT 4 /* John Miller's NEMO uses floats */ #if NEMO #define NEMONODE 5 /* looks syntactically like vector */ #define NEMOAREA 6 /* looks like vector */ #endif #define SYMBOL 7 /* for stack type */ #define OBJECTTMP 8 /* temporary object on stack */ #define CPLUSOBJECT 16 /* c++ registered class */ #define JAVAOBJECT 32 /* c++ registered class */ /* above two are bits, next must start at 64 */ #define OBJECTALIAS 1 #define VARALIAS 2 typedef struct HocSymExtension { float *parmlimits; /* some variables have suggested bounds */ char* units; float tolerance; /* some states have cvode absolute tolerance */ }HocSymExtension; typedef struct Symbol { /* symbol table entry */ char *name; short type; short subtype; /* Flag for user integers */ #if defined(__cplusplus) short cpublic; /* flag set public variable */ #else short public; /* flag set public variable */ #endif short defined_on_the_fly;/* moved here because otherwize gcc and borland do not align the same way */ union { int oboff; /* offset into object data pointer space */ #if 0 /* these are now found via oboff. */ char *str; /* STRING */ HocStruct Object **objvar; /* possibly an array of object variables */ #endif double *pval; /* User defined doubles - also for alias to scalar */ HocStruct Object* object_; /* alias to an object */ char *cstr; /* constant string */ double *pnum; /* Numbers */ int *pvalint; /* User defined integers */ float *pvalfloat; /* User defined floats */ int u_auto; /* stack offset # for AUTO variable */ double (*ptr)(); /* if BLTIN */ Proc *u_proc; struct { short type; /* Membrane type to find Prop */ int index; /* prop->param[index] */ }rng; HocStruct Symbol **ppsym; /* Pointer to symbol pointer array */ #if defined(__cplusplus) HocStruct cTemplate *ctemplate; #else HocStruct Template *template; #endif HocStruct Symbol* sym; /* for external */ } u; unsigned s_varn; /* dependent variable number - 0 means indep */ Arrayinfo *arayinfo; /* ARRAY information if null then scalar */ HocSymExtension* extra; /* additions to symbol allow compatibility with old nmodl dll's */ HocStruct Symbol *next; /* to link to another */ } Symbol; #define ISARRAY(arg) (arg->arayinfo != (Arrayinfo *)0) #ifndef hoc_list_h #if defined(__cplusplus) #define hoc_List struct hoc_Item #else typedef struct hoc_Item hoc_List; #define List hoc_List #define Item hoc_Item #endif #endif typedef union Datum { /* interpreter stack type */ double val; Symbol *sym; int i; double *pval; /* first used with Eion in NEURON */ HocStruct Object **pobj; HocStruct Object *obj; /* sections keep this to construct a name */ char **pstr; HocStruct hoc_Item* itm; hoc_List* lst; void* _pvoid; /* not used on stack, see nrnoc/point.c */ } Datum; #if OOP #if defined(__cplusplus) typedef struct cTemplate { #else typedef struct Template { #endif Symbol *sym; Symlist *symtable; int dataspace_size; int is_point_; /* actually the pointtype > 0 if a point process */ Symbol *init; /* null if there is no initialization function */ Symbol *unref; /* null if there is no function to call when refcount is decremented */ int index; /* next unique integer used for name for section */ int count; /* how many of this kind of object */ hoc_List* olist; /* list of all instances */ int id; void* observers; /* hook to c++ ClassObservable */ void* (*constructor)(struct Object*); void (*destructor)(void*); void (*steer)(void*); /* normally nil */ int (*checkpoint)(void**); #if defined(__cplusplus) } cTemplate; #else } Template; #endif typedef union Objectdata{ double *pval; /* pointer to array of doubles, usually just 1 */ char **ppstr; /* pointer to pointer to string ,allows vectors someday*/ HocStruct Object **pobj; /* pointer to array of object pointers, usually just 1*/ HocStruct hoc_Item** psecitm; /* array of pointers to section items, usually just 1 */ hoc_List** plist; /* array of pointers to linked lists */ Arrayinfo* arayinfo; void* _pvoid; /* Point_process */ }Objectdata; typedef struct Object { int refcount; /* how many object variables point to this */ int index; /* unique integer used for names of sections */ union { Objectdata *dataspace; /* Points to beginning of object's data */ void* this_pointer; /* the c++ object */ }u; #if defined(__cplusplus) cTemplate *ctemplate; #else Template *template; #endif void* aliases; /* more convenient names for e.g. Vector or List elements dynamically created by this object*/ HocStruct hoc_Item* itm_me;/* this object in the template list */ HocStruct hoc_Item* secelm_; /* last of a set of contiguous section_list items used by forall */ void* observers; /* hook to c++ ObjObservable */ short recurse; /* to stop infinite recursions */ short unref_recurse_cnt; /* free only after last return from unref callback */ } Object; #endif typedef struct { /* User Functions */ const char *name; void (*func)(void); } VoidFunc; typedef struct { /* User Double Scalars */ const char *name; double *pdoub; } DoubScal; typedef struct { /* User Vectors */ const char *name; double *pdoub; int index1; } DoubVec; typedef struct { /* recommended limits for symbol values */ const char *name; float bnd[2]; } HocParmLimits; typedef struct { /* recommended tolerance for CVODE */ const char *name; float tolerance; } HocStateTolerance; typedef struct { /* units for symbol values */ const char *name; char *units; } HocParmUnits; #include "oc_ansi.h" extern void* emalloc(size_t n); extern void* ecalloc(size_t n, size_t size); extern void* erealloc(void* ptr, size_t n); extern Inst *hoc_progp, *hoc_progbase, *hoc_prog, *hoc_prog_parse_recover; extern Inst *hoc_pc; extern Objectdata *hoc_objectdata; extern Objectdata *hoc_top_level_data; extern Object* hoc_thisobject; extern Symlist* hoc_symlist; extern Symlist* hoc_top_level_symlist; extern Symlist* hoc_built_in_symlist; extern Objectdata *hoc_objectdata_save(void); extern Objectdata* hoc_objectdata_restore(Objectdata*); #define OPVAL(sym) hoc_objectdata[sym->u.oboff].pval #define OPSTR(sym) hoc_objectdata[sym->u.oboff].ppstr #define OPOBJ(sym) hoc_objectdata[sym->u.oboff].pobj #define OPSECITM(sym) hoc_objectdata[sym->u.oboff].psecitm #define OPLIST(sym) hoc_objectdata[sym->u.oboff].plist #define OPARINFO(sym) hoc_objectdata[sym->u.oboff + 1].arayinfo #if LINT #undef assert #define assert(arg) {if (arg) ;} /* so fprintf doesn't give lint */ #undef IGNORE #define IGNORE(arg) {if(arg);} #define LINTUSE(arg) {if(arg);} char *cplint; int ilint; #define Strcat cplint = strcat #define Strncat cplint = strncat #define Strcpy cplint = strcpy #define Strncpy cplint = strncpy #define Sprintf cplint = sprintf #define Printf ilint = printf #define Fprintf ilint = fprintf #else #if defined(__TURBOC__) #undef IGNORE #define IGNORE #else #undef IGNORE #define IGNORE(arg) arg #endif #define LINTUSE(arg) #define Strcat strcat #define Strncat strncat #define Strcpy strcpy #define Strncpy strncpy #define Sprintf sprintf #define Printf nrnpy_pr #define Fprintf fprintf #endif /* EINTR handling for LINDA */ #if LINDA #include #define ERRCHK(c1) {errno=EINTR;while(errno==EINTR){errno=0;c1}} #else #define ERRCHK(c1) c1 #endif #define IFGUI if (hoc_usegui){ #define ENDGUI } extern int hoc_usegui; /* when 0 does not make interviews calls */ extern int nrn_istty_; extern int parallel_sub; /* for use with parallel neuron (see parallel.cl) */ #define NOT_PARALLEL_SUB(c1) {if (!parallel_sub) c1} /* Enter handling for PVM NJP 11/21/94 */ #ifdef PVM extern int init_parallel( ); int num_procs; int *tids; int node_num; int mytid; #endif #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/hocedit.c000077500000000000000000000112511323325274500156570ustar00rootroot00000000000000#include <../../nrnconf.h> /* LINTLIBRARY */ /* /local/src/master/nrn/src/oc/hocedit.c,v 1.6 1999/07/03 14:20:24 hines Exp */ /* hocedit.c,v * Revision 1.6 1999/07/03 14:20:24 hines * no limit on input string size or execute strings. * (although an execute string could overrun the program buffer if * it generates more than NPROG instructions, see code.c) * * Revision 1.5 1997/03/21 21:28:33 hines * syntax errors now give correct file and line number message * * Revision 1.4 1997/03/13 14:18:12 hines * Merge Macintosh changes. NEURON sources compile with Codewarrior 11. * No readline or microemacs for mac. * * Revision 1.3 1996/02/16 16:19:29 hines * OCSMALL used to throw out things not needed by teaching programs * * Revision 1.2 1994/11/08 19:37:12 hines * command line editing works while in graphics mode with GRX and GO32 * * Revision 1.1.1.1 1994/10/12 17:22:10 hines * NEURON 3.0 distribution * * Revision 2.62 1993/10/18 13:24:19 hines * A start on an audit system. see audit.c * * Revision 1.1 91/10/11 11:12:07 hines * Initial revision * * Revision 4.43 91/10/01 11:34:24 hines * gather console input at one place in preparation for adding * emacs like command line editing. Hoc input now reads entire line. * * Revision 4.37 91/08/13 19:50:49 hines * can now use em after window size is changed. * * Revision 3.108 90/10/24 09:44:12 hines * saber warnings gone * * Revision 3.83 90/07/25 10:40:25 hines * almost lint free on sparc 1+ under sunos 4.1 * * Revision 3.4 89/07/12 10:27:18 mlh * Lint free * * Revision 3.3 89/07/10 15:46:16 mlh * Lint pass1 is silent. Inst structure changed to union. * * Revision 2.0 89/07/07 11:31:46 mlh * Preparation for newcable * * Revision 1.1 89/07/07 11:16:25 mlh * Initial revision * */ /* example to show how microemacs can be embedded in a larger program */ #include #include #include #include #if MAC #define OCSMALL 1 #endif #if defined(WITHOUT_MEMACS) #undef OCSMALL #define OCSMALL 1 #endif #if !OCSMALL #include "estruct.h" extern int emacs_main(int n, char** cpp); extern int emacs_refresh(int i, int j); extern int emacs_vtinit(void); #define IGNORE(arg) arg #define Fprintf fprintf extern TERM emacs_term; extern BUFFER *emacs_curbp; extern WINDOW *emacs_curwp; extern int hoc_pipeflag; extern int hoc_lineno; static jmp_buf emacs_begin; static int called = 0; static LINE *lp, *lhead; static short cnt; static char *argv[] = { "embedded", (char *)0}; #endif /* !OCSMALL */ void hoc_edit(void) { #if !OCSMALL #if DOS || defined(__GO32__) /*must erase screen if in graphics mode*/ extern int egagrph; if (egagrph) { plt(-3,0.,0.); } #endif if (hoc_retrieving_audit()) { hoc_emacs_from_audit(); return; } if (setjmp(emacs_begin)) { return; } if (!called) { called = 1; emacs_main(1, argv); } else { emacs_vtinit(); emacs_refresh(0, 1); emacs_main(-1, argv); } #endif } void hoc_edit_quit(void) { #if !OCSMALL char s[2]; if (called) { argv[0] = s; argv[0][0] = 'Z' & 037; rewind(stdin); /* else continuous EOF */ hoc_edit(); } #endif } int emacs_exit(int status) { #if !OCSMALL if (status) { Fprintf(stderr, "emacs--status = %d\n", status); hoc_pipeflag = 0; hoc_execerror("Error in emacs return", (char *)0); } if (status == 0) { lhead = emacs_curbp->b_linep; lp = lforw(lhead); cnt = 0; hoc_pipeflag = 1; hoc_lineno = 0; hoc_audit_from_emacs(emacs_curbp->b_bname, emacs_curbp->b_fname); lp = lforw(lhead); cnt = 0; } longjmp(emacs_begin, 1); #endif return 0; } #if !OCSMALL static LINE *lastlp; #endif void hoc_pipeflush(void) { #if !OCSMALL if (hoc_pipeflag == 1) { extern int hoc_ictp; if (ired("\nReenter emacs", 1, 0, 1)) { emacs_curwp->w_dotp = lback(lp); if (hoc_ictp < llength(lback(lp))) { emacs_curwp->w_doto = hoc_ictp; }else{ emacs_curwp->w_doto = llength(lback(lp))-1; } IGNORE(emacs_refresh(1, 1)); /* recenters "." in current window */ hoc_edit(); } else { cnt = 0; lp = lastlp = lhead; } } #endif } size_t hoc_pipegets_need(void) { int hoc_strgets_need(); #if !OCSMALL if (hoc_pipeflag == 1) { if (lp == lhead) { return 0; }else{ return llength(lp); } }else{ return hoc_strgets_need(); } #else return hoc_strgets_need(); #endif } char* hoc_pipegets(char* cbuf, int nc) { char *hoc_strgets(), *cp=cbuf; nc--; #if !OCSMALL if (hoc_pipeflag == 1) { if (lp == lhead) { cnt = 0; return (char *)0; } for (cnt=0; cnt < llength(lp) && cnt < nc; cnt++) { *cp++ = lgetc(lp, cnt); } *cp++ = '\n'; *cp = '\0'; lp = lforw(lp); return cbuf; }else{ #else { #endif return hoc_strgets(cbuf, nc); } } neuron-7.5/src/oc/hocgetsym.h000066400000000000000000000004451323325274500162470ustar00rootroot00000000000000#ifndef hocgetsym_h #define hocgetsym_h #include "hoc.h" typedef struct Psym { Symbol *sym; Arrayinfo* arayinfo; int nsub; int sub[1]; } Psym; Psym *hoc_getsym(const char*); double hoc_getsymval(Psym*); void hoc_assignsym(Psym* p, double val); void hoc_execstr(const char* cp); #endif neuron-7.5/src/oc/hoclist.h000077500000000000000000000072431323325274500157200ustar00rootroot00000000000000#ifndef hoc_list_h #define hoc_list_h #if HOC_L_LIST #define stralloc hoc_l_stralloc #define newitem hoc_l_newitem #define newlist hoc_l_newlist #define freelist hoc_l_freelist #define next hoc_l_next #define prev hoc_l_prev #define insertstr hoc_l_insertstr #define insertitem hoc_l_insertitem #define insertlist hoc_l_insertlist #define insertsym hoc_l_insertsym #define insertsec hoc_l_insertsec #define insertobj hoc_l_insertobj #define insertvoid hoc_l_insertvoid #define linsertsym hoc_l_linsertsym #define linsertstr hoc_l_linsertstr #define lappendsym hoc_l_lappendsym #define lappendstr hoc_l_lappendstr #define lappenditem hoc_l_lappenditem #define lappendlst hoc_l_lappendlst #define lappendsec hoc_l_lappendsec #define lappendobj hoc_l_lappendobj #define lappendvoid hoc_l_lappendvoid #define delete hoc_l_delete #define delitems hoc_l_delitems #define move hoc_l_move #define movelist hoc_l_movelist #define replacstr hoc_l_replacstr #define Item hoc_Item #define List hoc_List typedef struct hoc_Item hoc_List; /* list of mixed items */ #else #define hoc_List struct hoc_Item #endif typedef struct hoc_Item { union { struct hoc_Item *itm; hoc_List *lst; char *str; struct Symbol *sym; struct Section* sec; struct Object* obj; void* vd; } element; /* pointer to the actual item */ struct hoc_Item *next; struct hoc_Item *prev; short itemtype; } hoc_Item; #define ITEM0 (hoc_Item *)0 #define LIST0 (hoc_List *)0 #define ITERATE(itm,lst) for (itm = (lst)->next; itm != (lst); itm = itm->next) /* * this is convenient way to get the element pointer if you know what type * the item is */ #define SYM(q) ((q)->element.sym) #define STR(q) ((q)->element.str) #define ITM(q) ((q)->element.itm) #define LST(q) ((q)->element.lst) #define hocSEC(q) ((q)->element.sec) #define OBJ(q) ((q)->element.obj) #define VOIDITM(q) ((q)->element.vd) /* types not defined in parser */ #define ITEM 2 #define LIST 3 #define VOIDPOINTER 4 /* * An item type, STRING is also used as an item type */ #ifdef __cplusplus extern "C" { #endif extern char* hoc_l_stralloc(const char*, char* release); extern hoc_List* hoc_l_newlist(); extern hoc_Item* hoc_l_insertstr(hoc_Item*, const char*); extern hoc_Item* hoc_l_insertsym(hoc_Item*, struct Symbol*); extern hoc_Item* hoc_l_insertitem(hoc_Item*, hoc_Item*); extern hoc_Item* hoc_l_insertlist(hoc_Item*, hoc_List*); extern hoc_Item* hoc_l_insertsec(hoc_Item*, struct Section*); extern hoc_Item* hoc_l_insertvoid(hoc_Item*, void*); extern hoc_Item* hoc_l_linsertstr(hoc_List*, const char*); extern hoc_Item* hoc_l_linsertsym(hoc_List*, struct Symbol*); extern hoc_Item* hoc_l_lappendstr(hoc_List*, const char*); extern hoc_Item* hoc_l_lappendsym(hoc_List*, struct Symbol*); extern hoc_Item* hoc_l_lappenditem(hoc_List*, hoc_Item*); extern hoc_Item* hoc_l_lappendlst(hoc_List*, hoc_List*); extern hoc_Item* hoc_l_lappendsec(hoc_List*, struct Section*); extern hoc_Item* hoc_l_lappendvoid(hoc_List*, void*); extern hoc_Item* hoc_l_lappendobj(hoc_List*, struct Object*); extern void hoc_l_freelist(hoc_List**); extern hoc_Item* hoc_l_next(hoc_Item*); extern hoc_Item* hoc_l_prev(hoc_Item*); extern void hoc_l_delete(hoc_Item*); extern void hoc_l_move(hoc_Item*, hoc_Item*, hoc_Item*); extern void hoc_l_movelist(hoc_Item*, hoc_Item*, hoc_List*); extern void hoc_l_replacstr(hoc_Item*, const char*); #define Insertstr insertstr #define Insertsym insertsym #define Insertsec insertsec #define Linsertsym linsertsym #define Linsertstr linsertstr #define Lappendsym lappendsym #define Lappendstr lappendstr #define Lappenditem lappenditem #define Lappendlst lappendlst #define Lappendsec lappendsec #ifdef __cplusplus } #endif #endif neuron-7.5/src/oc/hocmodl.h000077500000000000000000000013561323325274500156770ustar00rootroot00000000000000extern void hoc_model(), hoc_initmodel(), hoc_terminal(), hoc_prconst(); extern int *hoc_pindepindex; static VoidFunc function[] = { "model", hoc_model, "initmodel", hoc_initmodel, "terminal", hoc_terminal, 0,0 }; static struct { /* Integer Scalars */ char *name; int *pint; } scint[] = { 0, 0 }; static struct { /* Vector integers */ char *name; int *pint; int index1; } vint[] = { 0,0,0 }; static DoubScal scdoub[] = { 0,0 }; static DoubVec vdoub[] = { 0,0,0 }; static struct { /* Arrays */ char *name; double *pdoub; int index1; int index2; } ardoub[] = { 0, 0, 0, 0 }; static struct { /* triple dimensioned arrays */ char *name; double *pdoub; int index1; int index2; int index3; } thredim[] = { 0, 0, 0, 0, 0 }; neuron-7.5/src/oc/hocparse.h000066400000000000000000000023641323325274500160530ustar00rootroot00000000000000#ifndef hocparse_h #define hocparse_h #include "hoc.h" /* do not know why this is not in parse.h */ extern int yyparse(void); extern int yylex(void); extern void hoc_acterror(const char*, const char*); extern void hoc_execute(Inst*); extern int hoc_yyparse(void); extern void hoc_define(Symbol*); extern void hoc_iterator_object(Symbol*, int, Inst*, Inst*, Object*); extern int hoc_zzdebug; extern void hoc_debugzz(Inst*); extern int hoc_moreinput(void); extern void hoc_free_symspace(Symbol*); extern Symlist* hoc_p_symlist; extern void hoc_defnonly(const char*); extern Symbol* hoc_decl(Symbol*); extern Symbol* hoc_which_template(Symbol*); extern void hoc_begintemplate(Symbol*); extern void hoc_endtemplate(Symbol*); extern void hoc_add_publiclist(Symbol*); extern void hoc_external_var(Symbol*); extern void hoc_insertcode(Inst*, Inst*, Pfrv); extern int hoc_lineno; extern int hoc_indef; extern Inst* hoc_codei(int i); extern void hoc_codein(Inst* f); extern void hoc_codesym(Symbol* f); extern Inst *hoc_codeptr(void* vp); extern Inst *hoc_Code(Pfrv); extern void hoc_ob_check(int); extern void hoc_obvar_declare(Symbol* sym, int type, int pmes); extern void hoc_help(void); extern char* hoc_strgets(char*, int); extern int hoc_strgets_need(void); #endif neuron-7.5/src/oc/hocstr.h000077500000000000000000000006101323325274500155440ustar00rootroot00000000000000#ifndef hocstr_h #define hocstr_h #include /* too many time char* buf overruns its storage */ typedef struct HocStr { char* buf; size_t size; }HocStr; extern HocStr* hoc_tmpbuf; /* highly volatile, copy immediately */ extern HocStr* hocstr_create(size_t); extern void hocstr_delete(HocStr*); void hocstr_resize(HocStr*, size_t); void hocstr_copy(HocStr*, const char*); #endif neuron-7.5/src/oc/hocusr.c000077500000000000000000000067161323325274500155550ustar00rootroot00000000000000#include <../../nrnconf.h> /* version 7.2.1 2-jan-89 */ #include #include #include "hocdec.h" #include "parse.h" #if 1 #include "hocusr.h" #endif # define CHECK(name) if (hoc_lookup(name) != (Symbol *)0){\ IGNORE(fprintf(stderr, CHKmes, name));\ nrn_exit(1);} static char CHKmes[] = "The user defined name, %s, already exists.\n"; static void arayinstal(Symbol* sp, int nsub, int sub1, int sub2, int sub3); void hoc_spinit(void) /* install user variables and functions */ { int i; Symbol *s; hoc_register_var(scdoub, vdoub, function); for (i = 0; scint[i].name; i++) { CHECK(scint[i].name); s = hoc_install(scint[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; s->u.pvalint = scint[i].pint; s->subtype = USERINT; } for (i = 0; scfloat[i].name; i++) { CHECK(scfloat[i].name); s = hoc_install(scfloat[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; s->u.pvalfloat = scfloat[i].pfloat; s->subtype = USERFLOAT; } for (i = 0; vint[i].name; i++) { CHECK(vint[i].name); s = hoc_install(vint[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; arayinstal(s, 1, vint[i].index1, 0, 0); s->u.pvalint = vint[i].pint; s->subtype = USERINT; } for (i = 0; vfloat[i].name; i++) { CHECK(vfloat[i].name); s = hoc_install(vfloat[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; arayinstal(s, 1, vfloat[i].index1, 0, 0); s->u.pvalfloat = vfloat[i].pfloat; s->subtype = USERFLOAT; } for (i = 0; ardoub[i].name; i++) { CHECK(ardoub[i].name); s = hoc_install(ardoub[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; arayinstal(s, 2, ardoub[i].index1, ardoub[i].index2, 0); s->u.pval = ardoub[i].pdoub; s->subtype = USERDOUBLE; } for (i = 0; thredim[i].name; i++) { CHECK(thredim[i].name); s = hoc_install(thredim[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; arayinstal(s, 3, thredim[i].index1, thredim[i].index2, thredim[i].index3); s->u.pval = thredim[i].pdoub; s->subtype = USERDOUBLE; } for (i = 0; function[i].name; i++) { if (!strncmp(function[i].name, "init", 4)) { hoc_fake_call(hoc_lookup(function[i].name)); (*function[i].func)(); continue; } } hoc_last_init(); } void hoc_register_var(DoubScal *scdoub, DoubVec *vdoub, VoidFunc *function) { int i; Symbol *s; if (scdoub) for (i = 0; scdoub[i].name; i++) { CHECK(scdoub[i].name); s = hoc_install(scdoub[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; s->u.pval = scdoub[i].pdoub; s->subtype = USERDOUBLE; } if (vdoub) for (i = 0; vdoub[i].name; i++) { CHECK(vdoub[i].name); s = hoc_install(vdoub[i].name, UNDEF, 0.0, &hoc_symlist); s->type = VAR; arayinstal(s, 1, vdoub[i].index1, 0, 0); s->u.pval = vdoub[i].pdoub; s->subtype = USERDOUBLE; } if (function) for (i = 0; function[i].name; i++) { CHECK(function[i].name); s=hoc_install(function[i].name, FUN_BLTIN, 0.0, &hoc_symlist); s->u.u_proc->defn.pf = function[i].func; s->u.u_proc->nauto = 0; s->u.u_proc->nobjauto = 0; } } /* set up arayinfo */ static void arayinstal(Symbol* sp, int nsub, int sub1, int sub2, int sub3) { sp->type = VAR; sp->s_varn = 0; sp->arayinfo = (Arrayinfo *) emalloc( (unsigned)(sizeof(Arrayinfo)+nsub*sizeof(int))); sp->arayinfo->a_varn = (unsigned *) 0; sp->arayinfo->nsub = nsub; sp->arayinfo->sub[0] = sub1; if (nsub > 1) sp->arayinfo->sub[1] = sub2; if (nsub > 2) sp->arayinfo->sub[2] = sub3; } void hoc_retpushx(double x) { /* utility return for user functions */ hoc_ret(); hoc_pushx(x); } neuron-7.5/src/oc/isaac64.c000066400000000000000000000055461323325274500155010ustar00rootroot00000000000000#include <../../nrnconf.h> #if HAVE_SYS_TYPES_H #include #endif /* ------------------------------------------------------------------------------ isaac64.c: A Fast cryptographic random number generator for 32-bit and 64-bit machines. By Bob Jenkins, 1996. Public Domain. Modified for modularity by Tom Bartol and Rex Kerr ------------------------------------------------------------------------------ */ #include "isaac64.h" #define ind(mm,x) (*(ub8 *)((ub1 *)(mm) + ((x) & ((RANDSIZ-1)<<3)))) #define rngstep(mix,a,b,mm,m,m2,r,x) \ { \ x = *m; \ a = (mix) + *(m2++); \ *(m++) = y = ind(mm,x) + a + b; \ *(r++) = b = ind(mm,y>>RANDSIZL) + x; \ } #define mix(a,b,c,d,e,f,g,h) \ { \ a-=e; f^=h>>9; h+=a; \ b-=f; g^=a<<9; a+=b; \ c-=g; h^=b>>23; b+=c; \ d-=h; a^=c<<15; c+=d; \ e-=a; b^=d>>14; d+=e; \ f-=b; c^=e<<20; e+=f; \ g-=c; d^=f>>17; f+=g; \ h-=d; e^=g<<14; g+=h; \ } void isaac64_generate(struct isaac64_state *rng) { register ub8 a,b,x,y,*m,*m2,*r,*mend; m=rng->mm; r=rng->randrsl; a = rng->aa; b = rng->bb + (++rng->cc); for (m = rng->mm, mend = m2 = m+(RANDSIZ/2); mmm, m, m2, r, x); rngstep( a^(a>>5) , a, b, rng->mm, m, m2, r, x); rngstep( a^(a<<12) , a, b, rng->mm, m, m2, r, x); rngstep( a^(a>>33) , a, b, rng->mm, m, m2, r, x); } for (m2 = rng->mm; m2mm, m, m2, r, x); rngstep( a^(a>>5) , a, b, rng->mm, m, m2, r, x); rngstep( a^(a<<12) , a, b, rng->mm, m, m2, r, x); rngstep( a^(a>>33) , a, b, rng->mm, m, m2, r, x); } rng->bb = b; rng->aa = a; } void isaac64_init(struct isaac64_state *rng, ub4 seed) { ub8 *r, *m; ub8 a,b,c,d,e,f,g,h; ub4 i; rng->aa=(ub8)0; rng->bb=(ub8)0; rng->cc=(ub8)0; a=b=c=d=e=f=g=h=0x9e3779b97f4a7c13LL; /* the golden ratio */ r = rng->randrsl; m = rng->mm; for (i=0; irandcnt=RANDMAX; /* prepare to use the first set of results */ } neuron-7.5/src/oc/isaac64.h000066400000000000000000000055021323325274500154760ustar00rootroot00000000000000/* ------------------------------------------------------------------------------ isaac64.h: Definitions for a fast cryptographic random number generator Bob Jenkins, 1996, Public Domain Modified for modularity by Tom Bartol and Rex Kerr Reference: http://burtleburtle.net/bob/rand/isaacafa.html Jenkins, R.J. (1996) ISAAC, in Fast Software Encryption, vol. 1039, ed. Gollmann, D. Spinger-Verlag, Cambridge ------------------------------------------------------------------------------ */ #ifndef ISAAC64_H #define ISAAC64_H #include #if defined(HAVE_STDINT_H) #include #endif #define RANDSIZL (4) /* I recommend 8 for crypto, 4 for simulations */ #define RANDSIZ (1<randcnt>0 ? \ ( *(((ub4 *)(rng->randrsl)) + (rng->randcnt-=1)) ) : \ ( isaac64_generate(rng), \ rng->randcnt=RANDMAX-1, \ *(((ub4 *)(rng->randrsl)) + rng->randcnt) )) #define isaac64_uint64(rng) \ (rng->randcnt>1 ? \ ( *((ub8 *)(((ub4 *)(rng->randrsl)) + (rng->randcnt-=2))) ) : \ ( isaac64_generate(rng), \ rng->randcnt=RANDMAX-2, \ *((ub8 *)(((ub4 *)(rng->randrsl)) + rng->randcnt)) )) #define isaac64_dbl32(rng) \ (rng->randcnt>0 ? \ ( DBL32 * (*(((ub4 *)(rng->randrsl)) + (rng->randcnt-=1)) ) ) : \ ( isaac64_generate(rng), \ rng->randcnt=RANDMAX-1, \ DBL32 * (*(((ub4 *)(rng->randrsl)) + rng->randcnt)) )) #define isaac64_dbl53(rng) \ (rng->randcnt>1 ? \ ( DBL53 * ((*((ub8 *)(((ub4 *)(rng->randrsl)) + (rng->randcnt-=2))))>>11) ) : \ ( isaac64_generate(rng), \ rng->randcnt=RANDMAX-2, \ DBL64 * ((*((ub8 *)(((ub4 *)(rng->randrsl)) + rng->randcnt)))>>11) )) #define isaac64_dbl64(rng) \ (rng->randcnt>1 ? \ ( DBL64 * (*((ub8 *)(((ub4 *)(rng->randrsl)) + (rng->randcnt-=2)))) ) : \ ( isaac64_generate(rng), \ rng->randcnt=RANDMAX-2, \ DBL64 * (*((ub8 *)(((ub4 *)(rng->randrsl)) + rng->randcnt))) )) #endif /* ISAAC64_H */ neuron-7.5/src/oc/isoc99.c000066400000000000000000000012601323325274500153530ustar00rootroot00000000000000#define _ISOC99_SOURCE #include #include /* trying to safely determine if a pointer is a pointer to a double where the double value would be in a specific range without causing floating exceptions Of course this founders in general on the dereferencing of invalid memory so it can only be used when pd is valid over sizeof(double). */ int nrn_isdouble(void* pd, double min, double max) { int i; if (!pd) { return 0; } #if defined(fpclassify) i = fpclassify(*((double*)pd)); if (i == FP_NORMAL || i == FP_ZERO) { return *((double*)pd) >= min && *((double*)pd) <= max; }else{ return 0; } #else return *((double*)pd) >= min && *((double*)pd) <= max; #endif } neuron-7.5/src/oc/lineq.c000077500000000000000000000002661323325274500153540ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../sparse/lineq.c" neuron-7.5/src/oc/list.c000077500000000000000000000123651323325274500152220ustar00rootroot00000000000000#include <../../nrnconf.h> /* The following routines support the concept of a list. That is, one can insert at the head of a list or append to the tail of a list with linsert() and lappend(). In addition, one can insert an item before a known item and it will be placed in the proper list. Items point to strings, symbols, etc. Note that more than one item in the same or several lists can point to the same string, symbol. Finally, knowing an item, one can determine the preceding and following items with next() and prev(). Deletion, replacement and moving blocks of items is also supported. */ /* Implementation The list is a doubly linked list. A special item with element 0 is always at the tail of the list and is denoted as the List pointer itself. list->next point to the first item in the list and list->prev points to the last item in the list. i.e. the list is circular Note that in an empty list next and prev points to itself. It is intended that this implementation be hidden from the user via the following function calls. */ #define HOC_L_LIST 1 #include #include "hoclist.h" #include "hocdec.h" #include "parse.h" #define Free free static Item* newitem(void) { Item* q; q = (Item *)emalloc(sizeof(Item)); return q; } List* newlist(void) { Item *i; i = newitem(); i->prev = i; i->next = i; i->element.lst = (List *)0; i->itemtype = 0; return (List *)i; } void freelist(List** plist) { /*free the list but not the elements*/ Item *i1, *i2; if (!(*plist)) { return; } for (i1 = (*plist)->next; i1 != *plist; i1 = i2) { i2 = i1->next; Free(i1); } Free(*plist); *plist = (List *)0; } static Item* linkitem(Item* item) { Item *i; i = newitem(); i->prev = item->prev; i->next = item; item->prev = i; i->prev->next = i; return i; } Item* next(Item* item) { assert(item->next->element.lst); /* never return the list item */ return item->next; } Item* prev(Item* item) { assert(item->prev->element.lst); /* never return the list item */ return item->prev; } Item* insertstr(Item* item, const char* str) { /* insert a copy of the string before item */ /* a copy is made because strings are often assembled into a reusable buffer*/ Item *i; i = linkitem(item); i->element.str = stralloc(str, (char *)0); i->itemtype = STRING; return i; } Item* insertitem(Item* item, Item* itm) { /* insert a item pointer before item */ Item *i; i = linkitem(item); i->element.itm = itm; i->itemtype = ITEM; return i; } Item* insertlist(Item* item, List* lst) { /* insert a item pointer before item */ Item *i; i = linkitem(item); i->element.lst = lst; i->itemtype = LIST; return i; } Item* insertsym(Item* item, struct Symbol* sym) { /* insert a symbol before item */ /* a copy is not made because we need the same symbol in different lists */ Item *i; i = linkitem(item); i->element.sym = sym; i->itemtype = SYMBOL; return i; } Item* insertsec(Item* item, struct Section* sec) { /* insert a section before item */ Item *i; i = linkitem(item); i->element.sec = sec; i->itemtype = SECTION; return i; } Item* insertobj(Item* item, struct Object* obj) { /* insert a object before item */ Item *i; i = linkitem(item); i->element.obj = obj; i->itemtype = OBJECTVAR; return i; } Item* insertvoid(Item* item, void* obj) { /* insert a void pointer before item */ Item *i; i = linkitem(item); i->element.vd = obj; i->itemtype = VOIDPOINTER; return i; } Item* linsertstr(List* list, const char* str) { return insertstr(list->next, str); } Item* lappendstr(List* list, const char* str) { return insertstr(list, str); } Item* linsertsym(List* list, struct Symbol* sym) { return insertsym(list->next, sym); } Item* lappendsym(List* list, struct Symbol* sym) { return insertsym(list, sym); } Item* lappenditem(List* list, Item* item) { return insertitem(list, item); } Item* lappendlst(List* list, List* lst) { return insertlist(list, lst); } Item* lappendsec(List* list, struct Section* sec) { return insertsec(list, sec); } Item* lappendobj(List* list, struct Object* obj) { return insertobj(list, obj); } Item* lappendvoid(List* list, void* obj) { return insertvoid(list, obj); } void delete(Item* item) { assert(item->itemtype); /* can't delete list */ item->next->prev = item->prev; item->prev->next = item->next; Free(item); } char* stralloc(const char* buf, char* rel) { /* allocate space, copy buf, and free rel */ char *s; s = (char*)emalloc((unsigned)(strlen(buf) + 1)); Strcpy(s, buf); if (rel) { Free(rel); } return s; } void delitems(Item* q1, Item* q2) { /* delete tokens from q1 to q2 */ /* It is a serious error if q2 precedes q1 */ Item *q; for (q = q1; q != q2;) { q = q->next; delete(q->prev); } delete(q2); } void move(Item* q1, Item* q2, Item* q3) {/* move q1 to q2 and insert before q3*/ /* it is a serious error if q2 precedes q1 */ assert(q1 && q2); assert(q1->itemtype && q2->itemtype); q1->prev->next = q2->next; /* remove from first list */ q2->next->prev = q1->prev; q1->prev = q3->prev; q3->prev->next = q1; q3->prev = q2; q2->next = q3; } void movelist(Item* q1, Item* q2, List* s) { /* move q1 to q2 from old list to end of list s*/ move(q1, q2, s); } void replacstr(Item* q, const char* s) { q->itemtype = STRING; q->element.str = stralloc(s, (char *)0); } neuron-7.5/src/oc/macprt.c000077500000000000000000000054741323325274500155400ustar00rootroot00000000000000 #include #include #include #include #include #include "hoc.h" extern void debugfile(const char*, ...); extern int oc_print_from_dll(char*); extern void single_event_run(); extern char* neuron_home; int oc_print_from_dll(char* buf) { /* interchange \n and \r !*/ char* cp; for (cp = buf; *cp != '\0'; ++cp) { /* safe because buf is already a temp buffer */ if (*cp == '\n') { *cp = '\r'; }else if (*cp == '\r') { *cp = '\n'; } } return printf("%s", buf); } /* jijun 4/22/97, 4/23/97 */ void setneuronhome(const char* p) { CInfoPBRec myPB; short vRefNum; long dirID; Str255 dirName; char prePath[256]; static char fullPath[256]; OSErr err = HGetVol ((0), &vRefNum, &dirID); if (err==noErr) { myPB.dirInfo.ioNamePtr = dirName; myPB.dirInfo.ioVRefNum = vRefNum; myPB.dirInfo.ioDrParID = dirID; myPB.dirInfo.ioFDirIndex= -1; do { myPB.dirInfo.ioDrDirID = myPB.dirInfo.ioDrParID; err = PBGetCatInfoSync(&myPB); if (err==noErr) { dirName[dirName[0]+1]='\0'; strcpy(prePath, (char*)&dirName[1]); strcat(prePath, ":"); strcat(prePath, fullPath); strcpy(fullPath, prePath); } } while (myPB.dirInfo.ioDrDirID > 2); } neuron_home=fullPath; // get rid of last ':' neuron_home[strlen(neuron_home)-1] = '\0'; // debugfile("neuron_home = %s\n", neuron_home); } char* getenv(const char* s) { static char buf[200]; if (strcmp(s, "NEURONHOME") == 0) { return neuron_home; } if (strcmp(s, "NRNDEMO") == 0) { strcpy(buf, neuron_home); strcat(buf, ":demo:"); return buf; } printf("getenv: don't know |%s|\n", s); return 0; } int hoc_copyfile(const char* src, const char* dest) { return 0; } void hoc_check_intupt(int intupt) { #if 1 EventRecord e; if (EventAvail(keyDownMask, &e)) { //debugfile("%d\n", e.what); if (e.what == keyDown) { char c = e.message&charCodeMask; if (c == 0x03) { set_intset(); } } //single_event_run(); } #endif } FILE* popen(char* s1, char* s2) { printf("no popen\n"); return 0; } pclose(FILE* p) { printf("no pclose\n"); } hoc_win_normal_cursor() { } hoc_win_wait_cursor() { } void plprint(const char* s) { printf("%s", s); } int hoc_plttext; /* int getpid() { return 1; } */ hoc_close_plot(){} hoc_Graphmode(){ret();pushx(0.);} hoc_Graph(){ret();pushx(0.);} hoc_regraph(){ret();pushx(0.);} hoc_plotx(){ret();pushx(0.);} hoc_ploty(){ret();pushx(0.);} hoc_Plt() {ret(); pushx(0.);} hoc_Setcolor(){ret(); pushx(0.);} hoc_Lw(){ret(); pushx(0.);} hoc_settext(){ret(); pushx(0.);} hoc_Plot(){ret();pushx(0.);} hoc_axis(){ret();pushx(0.);} hoc_fmenu() {ret();pushx(0.);} //int gethostname() {printf("no gethostname\n");} plt(int mode, double x, double y) {} hoc_menu_cleanup() { } initplot() {} neuron-7.5/src/oc/math.c000077500000000000000000000066001323325274500151730ustar00rootroot00000000000000#include <../../nrnconf.h> /* a fake change */ /* /local/src/master/nrn/src/oc/math.c,v 1.6 1999/07/16 13:43:10 hines Exp */ #include #include #include #include "nrnmpiuse.h" #include "ocfunc.h" # include "hoc.h" #define EPS hoc_epsilon #define MAXERRCOUNT 5 int hoc_errno_count; #if _CRAY #define log logl #define log10 log10l #define exp expl #define sqrt sqrtl #define pow powl #endif static double errcheck(double, const char*); void hoc_atan2(void) { double d; d = atan2(*hoc_getarg(1), *hoc_getarg(2)); hoc_ret(); hoc_pushx(d); } double Log(double x) { return errcheck(log(x), "log"); } double Log10(double x) { return errcheck(log10(x), "log10"); } /* used by nmodl and other c, c++ code */ double hoc_Exp(double x) { if (x < -700.) { return 0.; }else if (x > 700) { errno = ERANGE; if (++hoc_errno_count < MAXERRCOUNT) { fprintf(stderr, "exp(%g) out of range, returning exp(700)\n", x); } if (hoc_errno_count == MAXERRCOUNT) { fprintf(stderr, "No more errno warnings during this execution\n"); } return exp(700.); } return exp(x); } /* used by interpreter */ double hoc1_Exp(double x) { if (x < -700.) { return 0.; }else if (x > 700) { errno = ERANGE; return errcheck(exp(700.), "exp"); } return errcheck(exp(x), "exp"); } double Sqrt(double x) { return errcheck(sqrt(x), "sqrt"); } double Pow(double x, double y) { return errcheck(pow(x, y), "exponentiation"); } double integer(double x) { if (x < 0) { return (double)(long)(x - EPS); }else{ return (double)(long)(x + EPS); } } double errcheck(double d, const char* s) /* check result of library call */ { if (errno == EDOM) { errno = 0; hoc_execerror(s, "argument out of domain"); } else if (errno == ERANGE) { errno = 0; #if 0 hoc_execerror(s, "result out of range"); #else if (++hoc_errno_count > MAXERRCOUNT) { }else{ hoc_warning(s, "result out of range"); if (hoc_errno_count == MAXERRCOUNT) { fprintf(stderr, "No more errno warnings during this execution\n"); } } #endif } return d; } int hoc_errno_check(void) { int ierr; #if LINDA static parallel_eagain = 0; #endif #if 1 errno = 0; return 0; #else if (errno) { if (errno == EAGAIN) { /* Ubiquitous on many systems and it seems not to matter */ errno = 0; return 0; } #if BLUEGENE if (errno == ENOSYS) { errno = 0; return 0; } #endif #if !defined(MAC) || defined(DARWIN) if (errno == ENOENT) { errno = 0; return 0; } #endif if (++hoc_errno_count > MAXERRCOUNT) { errno = 0; return 0; } #if defined(CYGWIN) if (errno == EBUSY) { errno = 0; return 0; } #endif switch (errno) { case EDOM: fprintf(stderr, "A math function was called with argument out of domain\n"); break; case ERANGE: fprintf(stderr, "A math function was called that returned an out of range value\n"); break; #if LINDA /* regularly set by eval() and perhaps other linda commands */ case EAGAIN: if (parallel_eagain++ == 0) { perror("oc"); fprintf(stderr, "oc: This error occurs often from LINDA and thus will not be further reported.\n"); } break; #endif default: perror("oc"); break; } if (hoc_errno_count == MAXERRCOUNT) { fprintf(stderr, "No more errno warnings during this execution\n"); } } ierr = errno; errno = 0; return ierr; #endif } neuron-7.5/src/oc/mcran4.c000077500000000000000000000123171323325274500154300ustar00rootroot00000000000000/* The copyrighted code from Numerical Recipes Software has been removed and replaced by an independent implementation found in the random.c file in function Ranint4 from http://www.inference.phy.cam.ac.uk/bayesys/BayesSys.tar.gz by John Skilling http://www.inference.phy.cam.ac.uk/bayesys/ The code fragment was further modified by Michael Hines to change prototypes and produce output identical to the old version. This code is now placed under the General GNU Public License, version 2. The random.c file contained the header: //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Filename: random.c // // Purpose: Random utility procedures for BayeSys3. // // History: Random.c 17 Nov 1994 - 13 Sep 2003 // // Acknowledgments: // "Numerical Recipes", Press et al, for ideas // "Handbook of Mathematical Functions", Abramowitz and Stegun, for formulas // Peter J Acklam website, for inverse normal code //----------------------------------------------------------------------------- Copyright (c) 1994-2003 Maximum Entropy Data Consultants Ltd, 114c Milton Road, Cambridge CB4 1XE, England This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <../../nrnconf.h> #include #include #include #include #include #include #include "hocdec.h" static uint32_t lowindex = 0; void mcell_ran4_init(uint32_t low) { lowindex = low; } double mcell_ran4(uint32_t *high, double *x, unsigned int n, double range) { int i; for (i=0;i> 16; w &= 0xffff; u = ~((v - w) * (v + w)); /*m ^= (((u >> 16) | (u << 16)) ^ 0xb4f0c4a7) + w * v;*/ m ^= (((u >> 16) | (u << 16)) ^ 0x4b0f3b58) + w * v; w = m ^ 0x1e17d32c; v = w >> 16; w &= 0xffff; u = ~((v - w) * (v + w)); /*n ^= (((u >> 16) | (u << 16)) ^ 0x178b0f3c) + w * v;*/ n ^= (((u >> 16) | (u << 16)) ^ 0xe874f0c3) + w * v; return n; w = n ^ 0x03bcdc3c; v = w >> 16; w &= 0xffff; u = (v - w) * (v + w); m ^= (((u >> 16) | (u << 16)) ^ 0x96aa3a59) + w * v; w = m ^ 0x0f33d1b2; v = w >> 16; w &= 0xffff; u = (v - w) * (v + w); n ^= (((u >> 16) | (u << 16)) ^ 0xaa5835b9) + w * v; return n; } /* //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Function: Randouble (hines now nrnRan4dbl // // Purpose: Random double-precision floating-point sample. // The 2^52 allowed values are odd multiples of 2^-53, // symmetrically placed in strict interior of (0,1). // // Notes: (1) Tuned to 52-bit mantissa in "double" format. // (2) Uses one call to Ranint to get 64 random bits, with extra // random integer available in Rand[3]. // (3) All floating-point random calls are directed through this code, // except Rangauss which uses the extra random integer in Rand[3]. // // History: John Skilling 6 May 1995, 3 Dec 1995, 24 Aug 1996 // 20 Oct 2002, 17 Dec 2002 //----------------------------------------------------------------------------- // */ static const double SHIFT32 = 1.0 / 4294967296.0; /* 2^-32 */ double nrnRan4dbl(uint32_t* idx1, uint32_t idx2) { uint32_t hi, lo, extra; hi = (uint32_t)nrnRan4int(idx1, idx2); /*top 32 bits*/ /* // lo = (extra // low bits // & 0xfffff000) ^ 0x00000800; // switch lowest (2^-53) bit ON // return ((double)hi + (double)lo * SHIFT32) * SHIFT32; */ return ((double)hi) * SHIFT32; } neuron-7.5/src/oc/mcran4.h000077500000000000000000000035701323325274500154360ustar00rootroot00000000000000#ifndef mcran4_h #define mcran4_h #include #if defined(HAVE_STDINT_H) #include #endif extern void mcell_ran4_init(uint32_t); extern double mcell_ran4(uint32_t *idx1, double *x, unsigned int n, double range); extern double mcell_ran4a(uint32_t* idx1); extern uint32_t mcell_iran4(uint32_t* idx1); extern double nrnRan4dbl(uint32_t* idx1, uint32_t idx2); extern uint32_t nrnRan4int(uint32_t* idx1, uint32_t idx2); #endif /* The original ran4 generator was copyrighted by "Numerical Recipes in C" and therefore has been removed from the NEURON sources and replaced by code fragments obtained from http://www.inference.phy.cam.ac.uk/bayesys/ by John Skilling The function mcell_ran4a only returns a single uniform random number in the distribution 0.0 to 1.0 . The prototype for mcell_ran4 is the original. */ /* Michael Hines added the prefix mcell to the global names. These functions were obtained from Tom Bartol who uses them in his mcell program. He comments: For MCell, Ran4 has the distinct advantage of generating streams of random bits not just random numbers. This means that you can break the 32 bits of a single returned random number into several smaller chunks without fear of correlations between the chunks. Ran4 is not the fastest generator in the universe but it's pretty fast (16 million floating point random numbers per second on my 1GHz Intel PIII and 20 million integer random numbers per second) and of near cryptographic quality. I've modified it so that a given seed will generate the same sequence on Intel, Alpha, RS6000, PowerPC, and MIPS architectures (and probably anything else out there). It's also been modified to generate arbitrary length vectors of random numbers. This makes generating numbers more efficient because you can generate many numbers per function call. MCell generates them in chunks of 10000 at a time. */ neuron-7.5/src/oc/mk_hocusr_h.py000066400000000000000000000055021323325274500167460ustar00rootroot00000000000000import sys import re voidfun = [] intvar = [[],[]] #scalarint vectorint fltvar = [[],[]] #scalarfloat, vectorfloat dblvar = [[],[],[],[]] # scalar, vectordouble, arraydouble, threedim def processfun(a, names): # each name has trailing '()' for i in names: a.append(i.strip('()')) def processvar(a, names): # each name may have 0-3 trailing [%d] for i in names: sp = i.split('[') b = [] for j in sp: b.append(j.strip(']')) a[len(b)-1].append(b) def remove_multiline_comments(string): # remove all occurance comments (/*COMMENT */) from string string = re.sub(re.compile("/\*.*?\*/",re.DOTALL ) ,"" ,string) return string types = {} types['void'] = (voidfun, processfun) types['int'] = (intvar, processvar) types['float'] = (fltvar, processvar) types['double'] = (dblvar, processvar) def process(type, names): types[type][1](types[type][0], names) # read preprocessor output file into buffer text = sys.stdin.read() # the PGI preprocessor output i.e. 'pgcc -Mcpp -E' # has multi-line comments (unless we specify -Mcpp=nocomment). # we need to remove these multi-line comments text = remove_multiline_comments(text) for line in text.splitlines(): names = line.replace(',',' ').replace(';',' ').split() if len(names) > 2: process(names[1], names[2:]) print(''' /* Functions */ static VoidFunc function[] = { ''') for i in voidfun: if i: print('"%s", %s,'%(i,i)) print('''0, 0 }; static struct { /* Integer Scalars */ const char *name; int *pint; } scint[] = { ''') for i in intvar[0]: print('"%s", &%s,'%(i[0],i[0])) print('''0, 0 }; static struct { /* Vector integers */ const char *name; int *pint; int index1; } vint[] = { ''') for i in intvar[1]: print('"%s", %s, %s,'%(i[0],i[0],i[1])) print('''0,0 }; static struct { /* Float Scalars */ const char *name; float *pfloat; } scfloat[] = { ''') for i in fltvar[0]: print('"%s", &%s,'%(i[0],i[0])) print('''0, 0 }; static struct { /* Vector float */ const char *name; float *pfloat; int index1; } vfloat[] = { ''') for i in fltvar[1]: print('"%s", %s, %s,'%(i[0],i[0],i[1])) print('''0,0,0 }; /* Double Scalars */ DoubScal scdoub[] = { ''') for i in dblvar[0]: print('"%s", &%s,'%(i[0],i[0])) print('''0,0 }; /* Vectors */ DoubVec vdoub[] = { ''') for i in dblvar[1]: print('"%s", %s, %s,'%(i[0],i[0],i[1])) print('''0, 0, 0 }; static struct { /* Arrays */ const char *name; double *pdoub; int index1; int index2; } ardoub[] = { ''') for i in dblvar[2]: print('"%s", %s, %s, %s,'%(i[0], i[0], i[1], i[2])) print('''0, 0, 0, 0 }; static struct { /* triple dimensioned arrays */ const char *name; double *pdoub; int index1; int index2; int index3; } thredim[] = { ''') for i in dblvar[3]: print('"%s", %s, %s, %s, %s,'%(i[0], i[0], i[1], i[2], i[3])) print('''0, 0, 0, 0, 0 }; ''') neuron-7.5/src/oc/modlreg.c000077500000000000000000000001361323325274500156710ustar00rootroot00000000000000#include <../../nrnconf.h> void modl_reg(void){} /* dummy modl registration: see hocusr.c */ neuron-7.5/src/oc/mswinprt.c000077500000000000000000000210761323325274500161310ustar00rootroot00000000000000#ifndef CYGWIN #include <../../nrnconf.h> #endif #if defined(MINGW) #define CYGWIN #endif #include #include #include #include #include #include #include "hoc.h" #include "../mswin/extra/d2upath.c" extern char* neuron_home; extern char* neuron_home_dos; #if !defined(CYGWIN) extern HWND hCurrWnd; #endif static HCURSOR wait_cursor; static HCURSOR old_cursor; #if HAVE_IV extern int bad_install_ok; #else int bad_install_ok; #endif // HAVE_IV extern FILE* hoc_redir_stdout; setneuronhome(p) char* p; { // if the program lives in .../bin/neuron.exe // and .../lib exists then use ... as the // NEURONHOME char buf[256]; char *s; int i, j; // printf("p=|%s|\n", p); bad_install_ok = 1; #if 0 if (p[0] == '"') { strcpy(buf, p+1); }else{ strcpy(buf, p); } #endif GetModuleFileName(NULL, buf, 256); for (i=strlen(buf); i >= 0 && buf[i] != '\\'; --i) {;} buf[i] = '\0'; // /neuron.exe gone // printf("setneuronhome |%s|\n", buf); for (j=strlen(buf); j >= 0 && buf[j] != '\\'; --j) {;} buf[j] = '\0'; // /bin gone neuron_home_dos = emalloc(strlen(buf) + 1); strcpy(neuron_home_dos, buf); neuron_home = hoc_dos2unixpath(buf); return; #if 0 // but make sure it was bin Bin or BIN -- damn you bill gates // printf("i=%d j=%d buf=|%s|\n",i, j, buf); if (i == j+4 &&(buf[--i] == 'n' || buf[i] == 'N') &&(buf[--i] == 'i' || buf[i] == 'I') &&(buf[--i] == 'b' || buf[i] == 'B') ) { char buf1[256], *nh_old; // check for nrn.def or nrn.defaults // if it exists assume valid installation FILE* f; sprintf(buf1, "%s/lib/nrn.def", buf); if ((f = fopen(buf1, "r")) == (FILE*)0) { sprintf(buf1, "%s/lib/nrn.defaults", buf); if ((f = fopen(buf1, "r")) == (FILE*)0) { // printf("couldn't open %s\n", buf1); // printf("%s not valid neuronhome\n", buf); return; } } fclose(f); sprintf(buf1, "NEURONHOME=%s", buf); nh_old = getenv("NEURONHOME"); // if (nh_old){ printf("nh_old from first getenv is %s\n", nh_old); // }else{ printf("first getenv of NEURONHOME returns nil\n");} if (!nh_old || stricmp(buf, nh_old) != 0) { printf("Setting %s", buf1); if (nh_old) { printf(" from old value of %s\n", nh_old); }else{ printf("\n"); } s = emalloc(strlen(buf1)+1); strcpy(s, buf1); i = putenv(s); // arg must be global // printf("putenv of %s returned %d\n", s, i); } } neuron_home = getenv("NEURONHOME"); // if (neuron_home){ printf("neuron_home from second getenv is %s\n", neuron_home); // }else{ printf("second getenv of NEURONHOME returns nil\n");} if (!neuron_home) MessageBox(NULL, p, "Can't compute NEURONHOME from", MB_OK); #endif } void HandleOutput(char* s) { printf("%s", s); } static long exception_filter(p) LPEXCEPTION_POINTERS p; { // hoc_execerror("unhandled exception", ""); // return EXCEPTION_CONTINUE_EXECUTION; static n = 0; ++n; if (n == 1) { hoc_execerror("\nUnhandled Exception. This usually means a bad memory \n\ address.", "It is not possible to make a judgment as to whether it is safe\n\ to continue. If this happened while compiling a template, you will have to\n\ quit."); } if (n == 2) { MessageBox(NULL, "Second Unhandled Exception: Quitting NEURON. You will be asked to save \ any unsaved em buffers before exiting.", "NEURON Internal ERROR", MB_OK); hoc_quit(); } return EXCEPTION_EXECUTE_HANDLER; } hoc_set_unhandled_exception_filter() { SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)exception_filter); } BOOL hoc_copyfile(const char* src, const char* dest) { return CopyFile(src, dest, FALSE); } static FILE* dll_stdio_[] = {(FILE*)0x0, (FILE*)0x20, (FILE*)0x40}; void nrn_mswindll_stdio(i,o,e) FILE* i, *o, *e; { if (o != dll_stdio_[1]) { printf("nrn_mswindll_stdio stdio in dll = %p but expected %p\n", o, dll_stdio_[1]); } dll_stdio_[0] = i; dll_stdio_[1] = o; dll_stdio_[2] = e; } #if defined(CYGWIN) /* the cygwin nrnmech.dll will use these pointers for stdin, stdout, stderr */ /* and when we come back to ncyg_fprintf we compare the stream to them */ FILE __files[4]; #else #define ncyg_fprintf fprintf #endif int ncyg_fprintf(FILE /*_FAR*/ *stream, const char * strFmt, ...) { int len; static char s[4096] = {0}; va_list marker; va_start(marker, strFmt); #if defined(CYGWIN) #if 0 printf("ncyg stdin=%lx\n", (long)stdin); printf("ncyg stdout=%lx\n", (long)stdout); printf("ncyg stderr=%lx\n", (long)stderr); printf("ncyg dll_stdio[0]=%lx\n", (long)dll_stdio_[0]); printf("ncyg dll_stdio[1]=%lx\n", (long)dll_stdio_[1]); printf("ncyg dll_sdtio[2]=%lx\n", (long)dll_stdio_[2]); printf("ncyg stream=%lx\n", (long)stream); #endif if (stream == dll_stdio_[1]) { stream = stdout; }else if (stream == dll_stdio_[2]) { stream = stderr; } len = vsprintf(s, strFmt, marker); fputs(s, stream); return len; #endif } void hoc_forward2back(char* s) { char* cp; for (cp = s; *cp; ++cp) { if (*cp == '/') { *cp = '\\'; } } } char* hoc_back2forward(char* s) { char* cp = s; while(*cp) { if (*cp == '\\') { *cp = '/'; } ++cp; } return s; } #if HAVE_IV void ivoc_win32_cleanup(); #endif void hoc_win32_cleanup() { char buf[256]; char* path; #if HAVE_IV ivoc_win32_cleanup(); #endif path = getenv("TEMP"); if (path) { sprintf(buf, "%s/oc%d.hl", path, getpid()); unlink(buf); // DebugMessage("unlinked %s\n", buf); } } void hoc_win_exec(void) { int i; i = SW_SHOW; if (ifarg(2)) { i = (int)chkarg(2, -1000, 1000); } i = WinExec(gargstr(1), i); ret(); pushx((double)i); } #if !defined(CYGWIN) FILE* popen(char* s1, char* s2) { printf("no popen\n"); return 0; } pclose(FILE* p) { printf("no pclose\n"); } void hoc_check_intupt(int intupt) { #if !OCSMALL MSG msg; while (PeekMessage(&msg, hCurrWnd, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } #endif } #if defined(__MWERKS__) void __assertfail() { printf("assertfail\n");} #endif #if 0 char* dos_neuronhome() { static char* dnrnhome; char* nrnhome, *cp; if (!dnrnhome) { nrnhome = getenv("NEURONHOME"); dnrnhome = (char*)emalloc(strlen(nrnhome) + 1); strcpy(dnrnhome, nrnhome); for (cp = dnrnhome; *cp; ++cp) { if (*cp == '/') { *cp = '\\'; } } } return dnrnhome; } #endif #define HOCXDOS "lib/nrnsys.sh" #define SEMA1 "tmpdos1.tmp" #define SEMA2 "tmpdos2.tmp" int system(const char* s) { char buf[256], stin[128]; char* redirect; FILE* fin; unlink(SEMA1); unlink(SEMA2); errno = 0; redirect = strchr(s, '>'); if (redirect) {/* redirection filename is first arg */ strcpy(stin, redirect+1); sprintf(buf, "%s\\bin\\sh %s/%s %s %s %s", neuron_home, neuron_home, HOCXDOS, neuron_home, stin, expand_env_var(s)); redirect = strchr(buf, '>'); *redirect = '\0'; }else{ sprintf(buf, "%s\\bin\\sh %s/%s %s %s %s", neuron_home, neuron_home, HOCXDOS, neuron_home, SEMA2, expand_env_var(s)); } //printf("%s\n", buf); if (WinExec(buf, 0) < 32) { hoc_execerror("WinExec failed:", buf); } while((fin = fopen(SEMA1, "r")) == (FILE*)0) { Sleep(1); wmhandler_yield(); } fclose(fin); unlink(SEMA1); if (!redirect && (fin = fopen(SEMA2, "r")) != (FILE*)0) { while(fgets(buf, 256, fin)) { printf("%s", buf); } fclose(fin); unlink(SEMA2); } return 0; } hoc_win_normal_cursor() { if (old_cursor) { (HCURSOR)SetClassLong(hCurrWnd, GCL_HCURSOR, (long)old_cursor); SetCursor(old_cursor); old_cursor = 0; } } hoc_win_wait_cursor() { static int ready = 0; if (!ready) { wait_cursor = LoadCursor(NULL, IDC_WAIT); } if (!old_cursor) { //DebugMessage("set the wait cursor\n"); old_cursor = (HCURSOR)SetClassLong(hCurrWnd, GCL_HCURSOR, (long)wait_cursor); SetCursor(wait_cursor); } } #endif /* not CYGWIN */ void hoc_winio_show(int b) { #ifndef CYGWIN ShowWindow(hCurrWnd, b ? SW_SHOW : SW_HIDE); #endif } #if 0 void plprint(const char* s) { printf("%s", s); } #endif int hoc_plttext; #if !defined(__MWERKS__) int getpid() { #if 0 extern int __hInst; return __hInst; #else return 1; #endif } #endif //hoc_close_plot(){} //hoc_Graphmode(){ret();pushx(0.);} //hoc_Graph(){ret();pushx(0.);} //hoc_regraph(){ret();pushx(0.);} //hoc_plotx(){ret();pushx(0.);} //hoc_ploty(){ret();pushx(0.);} hoc_Plt() {ret(); pushx(0.);} hoc_Setcolor(){ret(); pushx(0.);} hoc_Lw(){ret(); pushx(0.);} hoc_settext(){ret(); pushx(0.);} //Plot(){ret();pushx(0.);} //axis(){ret();pushx(0.);} //hoc_fmenu() {ret();pushx(0.);} //int gethostname() {printf("no gethostname\n");} //plt(int mode, double x, double y) {} #if 0 hoc_menu_cleanup() { #if OCSMALL ShowWindow(hCurrWnd, SW_SHOW); #endif } #endif //initplot() {} #if 0 Fig_file(){} #endif neuron-7.5/src/oc/nocable.c000077500000000000000000000036401323325274500156460ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #if NRN_REALTIME double t, dt; void nrn_fixed_step(void){} void nrn_fake_step(void) {} #endif int stoprun; void clear_sectionlist(void) {} void add_section(void) {} void install_sectionlist(void) {} void connect_obsec_syntax(void) {} void connectsection(void) {} void connectpointer(void) {} void sec_access(void) {} void range_const(void) {} void range_interpolate(void) {} void rangevareval(void) {} void rangevarevalpointer(void) {} void mech_access(void) {} void mech_uninsert(void) {} void sec_access_push(void) {} void hoc_sec_internal_push(void) {} void* hoc_sec_internal_name2ptr(const char* s, int flag) { return NULL; } void sec_access_pop(void) {} void sec_access_temp(void) {} void rangepoint(void) {} void forall_section(void) {} void connect_point_process_pointer(){} void nrn_cppp(void) {} void hoc_ifsec(void) {} void ob_sec_access(void) {double hoc_xpop(); hoc_xpop();} void sec_access_object(void) {} void sectionlist_decl(void) {} void forall_sectionlist(void) {} void hoc_ifseclist(void) {} void hoc_nrn_load_dll(void) {} void hoc_push_sectionlist(void) {} void simpleconnectsection(void) {} void range_interpolate_single(void) {} int nrn_is_cable(void) { return 0; } int nrn_is_artificial(int type) {return 0;} static char dummystring[1]; static char* pdummystring; void hoc_secname(void) { hoc_ret(); pdummystring = dummystring; hoc_pushstr(&pdummystring); } void hoc_construct_point(Object *ob, int i) {} void nrn_shape_update(void) {} char *nrn_version(int i) {static char* s = "not NEURON"; return s;} char *nrn_minor_version; char *nrn_branch_name; char *nrn_tree_version; char *nrn_version_changeset; char *nrn_version_date; double* nrn_recalc_ptr(double* pd) { return pd; } void nrn_hoc_lock(void) {} void nrn_hoc_unlock(void) {} #include "nrnmpiuse.h" #if NRN_MUSIC void nrnmusic_init(int* parg, char*** pargv){} void nrnmusic_terminate(){} #endif neuron-7.5/src/oc/nonlin.c000077500000000000000000000140411323325274500155350ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "hoc.h" #include "parse.h" #include "hocparse.h" #include "equation.h" #include "lineq.h" #include "code.h" int do_equation; /* switch for determining access to dep vars */ int *hoc_access; /* links to next accessed variables */ int var_access; /* variable number as pointer into access array */ static double **varble; /* pointer to symbol values */ typedef struct elm *Elm; #define diag(s) hoc_execerror(s, (char*)0); void dep_make(void)/* tag the variable as dependent with a variable number */ { #if !OCSMALL Symbol *sym; unsigned *numpt=0; #if defined(__TURBOC__) Inst *pcsav=pc; #endif sym = spop(); #if defined(__TURBOC__) pc = pcsav; #endif switch (sym->type) { case UNDEF: hoc_execerror(sym->name, "undefined in dep_make"); sym->type = VAR; OPVAL(sym) = (double *)emalloc(sizeof(double)); *(OPVAL(sym)) = 0.; case VAR: if (sym->subtype != NOTUSER) { execerror(sym->name, "can't be a dependent variable"); } if (!ISARRAY(sym)) { numpt = &(sym->s_varn); }else{ Arrayinfo *aray = OPARINFO(sym); if (sym->s_varn == 0) /* allocate varnum array */ { int total = 1; int i; for (i=0; i < aray->nsub; i++) total *= (aray->sub)[i]; aray->a_varn = (unsigned *)ecalloc((unsigned)total, sizeof(unsigned)); sym->s_varn = (unsigned)total; /* set_varble() uses this */ } numpt = &((aray->a_varn)[araypt(sym, OBJECTVAR)]); } break; default: execerror(sym->name, "can't be a dependent variable"); } if (*numpt > 0) execerror(sym->name, "made dependent twice"); *numpt = ++neqn; #endif } void init_access(void) /* zero the access array */ { #if !OCSMALL if (hoc_access != (int *)0) free((char *)hoc_access); hoc_access = (int *)ecalloc((neqn+1), sizeof(int)); var_access = -1; #endif } static void eqn_space(void); /* reallocate space for matrix */ static void set_varble(void); /* set up varble array by searching for tags */ static void eqn_side(int lhs); static unsigned row; static unsigned maxeqn; void eqn_name(void) /* save row number for lhs and/or rhs */ { #if !OCSMALL if (maxeqn != neqn) /* discard equations and reallocate space */ { eqn_space(); set_varble(); } init_access(); do_equation = 1; eval(); do_equation = 0; if (var_access < 1) execerror("illegal equation name",(pc - 2)->sym->name); row = var_access; nopop(); #endif } static void set_varble(void) { /* set up varble array by searching for tags */ #if !OCSMALL Symbol *sp; for (sp = symlist->first; sp != (Symbol *)0; sp = sp->next) { if (sp->s_varn != 0) { if (sp->type == VAR) { if (!ISARRAY(sp)) { varble[sp->s_varn] = OPVAL(sp); }else{ int i; Arrayinfo *aray = OPARINFO(sp); for (i = 0; i < sp->s_varn; i++) if ((aray->a_varn)[i] > 0) varble[(aray->a_varn)[i]] = OPVAL(sp) + i; } } } } #endif } static double Delta = .001; /* variable variation */ void eqinit(void) /* built in function to initialize equation solver */ { #if !OCSMALL Symbol *sp; if (ifarg(1)) Delta = *getarg(1); for (sp = symlist->first; sp != (Symbol *)0; sp = sp->next) { if (sp->s_varn != 0) { if (ISARRAY(sp)) { if (OPARINFO(sp)->a_varn != (unsigned *)0) free((char *)(OPARINFO(sp)->a_varn)); } sp->s_varn = 0; } } neqn = 0; eqn_space(); #endif ret(); pushx(0.); } void eqn_init(void) /* initialize equation row */ { #if !OCSMALL struct elm *el; for (el = rowst[row]; el != (struct elm *)0; el = el->c_right) el->value = 0.; rhs[row] = 0.; #endif } void eqn_lhs(void) /* add terms to left hand side */ { eqn_side(1); } void eqn_rhs(void) /* add terms to right hand side */ { eqn_side(0); } static void eqn_side(int lhs) { #if !OCSMALL int i; struct elm *el; double f0, f1; Inst *savepc = pc; #if defined(__TURBOC__) Inst *pc1; #endif init_access(); do_equation = 1; execute(savepc); #if defined(__TURBOC__) pc1 = pc; #endif do_equation = 0; if (lhs) { f0 = xpop(); } else { f0 = -xpop(); } rhs[row] -= f0; for (i = var_access; i > 0; i = hoc_access[i]) { *varble[i] += Delta; execute(savepc); *varble[i] -= Delta; if (lhs) { f1 = xpop(); } else { f1 = -xpop(); } el = getelm((struct elm *)0, row, (unsigned)i); el->value += (f1 - f0)/Delta; } #if defined(__TURBOC__) pc=pc1; #endif pc++; #endif } static void eqn_space(void) { /* reallocate space for matrix */ #if !OCSMALL register int i; register struct elm *el; if (maxeqn > 0 && rowst == (Elm *)0) diag("matrix coefficients cannot be released"); for(i=1 ; i <= maxeqn ; i++) for(el = rowst[i] ; el; el = el->c_right) free((char *)el); maxeqn = neqn; if (varble) free((char *)varble); if (rowst) free((char *)rowst); if (colst) free((char *)colst); if (eqord) free((char *)eqord); if (varord) free((char *)varord); if (rhs) free((char *)rhs); varble = (double **)0; rowst = colst = (Elm *)0; eqord = varord = (unsigned *)0; rhs = (double *)0; rowst = (Elm *)ecalloc((maxeqn+1),sizeof(struct elm *)); varble = (double **)emalloc((maxeqn+1)*sizeof(double *)); colst = (Elm *)ecalloc((maxeqn+1),sizeof(struct elm *)); eqord = (unsigned *)emalloc((maxeqn+1)*sizeof(unsigned)); varord = (unsigned *)emalloc((maxeqn+1)*sizeof(unsigned)); rhs = (double *)emalloc((maxeqn+1)*sizeof(double)); for (i=1 ; i<= maxeqn ; i++) { eqord[i] = i; varord[i] = i; } #endif } void hoc_Prmat(void) { #if !OCSMALL prmat(); #endif ret(); pushx(1.); } void solve(void) { #if !OCSMALL /* Sum is a measure of the dependent variable accuracy and how well the equations are solved */ register int i; double sum; struct elm *el; sum = 0.; for (i=1 ; i <= neqn ; i++) sum += fabs(rhs[i]); if (!matsol()) diag("indeterminate system"); for (i=1 ; i<= neqn ; i++) { *varble[varord[i]] += rhs[eqord[i]]; sum += fabs(rhs[i]); } /* free all elements */ for (i=1; i <= neqn; i++) { struct elm *el2; for (el = rowst[i]; el != (struct elm *)0; el = el2) { el2 = el->c_right; free((char*)el); } rowst[i] = colst[i] = (struct elm *)0; } #else double sum = 0; #endif ret(); pushx(sum); } neuron-7.5/src/oc/nrn_vsscanf.c000066400000000000000000000373441323325274500165700ustar00rootroot00000000000000/* modified for use for NrnFILEWrap */ /* now included by nrnfilewrap.c */ /* * libslack - http://libslack.org/ * * Copyright (C) 1999-2010 raf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * or visit http://www.gnu.org/copyleft/gpl.html * * 20100612 raf */ /* =head1 NAME I - I with a I parameter =head1 SYNOPSIS #include #ifndef HAVE_VSSCANF #include #endif int vsscanf(const char *str, const char *format, va_list args); =head1 DESCRIPTION Similar to I with the variable argument list specified directly as for I. Note that this may not be identical in behaviour to the I on your system because this was implemented from scratch for systems that lack I. So your I and this I share no common code. Your I may support extensions that I does not support. I complies with all of the relevant ISO C requirements for I except: =over 4 =item * C may not be a multibyte character string; and =item * Scanning a pointer (C<"%p">) may not exactly match the format that your I uses to print pointers on your system. This version accepts pointers as a hexadecimal number with or without a preceding C<0x>. =back =head1 MT-Level MT-Safe if and only if no thread calls I. Since locales are inherently non-threadsafe as they are currently defined, this shouldn't be a problem. Just call C once after program initialisation and never again (at least not after creating any threads). If it is a problem, just change Cdecimal_point[0]> in the source to C<'.'> and it will be MT-Safe at the expense of losing locale support. =head1 EXAMPLE #include #ifndef HAVE_VSSCANF #include #endif int fdscanf(int fd, const char *format, ...) { va_list args; char buf[BUFSIZ]; ssize_t bytes; int rc; if ((bytes = read(fd, buf, BUFSIZ)) <= 0) return bytes; buf[bytes] = '\0'; va_start(args, format); rc = vsscanf(buf, format, args); va_end(args); return rc; } int main() { int rc, a = 0, b = 0; rc = fdscanf(STDIN_FILENO, "%d %d", &a, &b); printf("rc = %d a = %d b = %d\n", rc, a, b); return (rc == 2) ? EXIT_SUCCESS : EXIT_FAILURE; } =head1 NOTE I warns that: warning: ANSI C does not support the `L' length modifier warning: use of `l' length character with `e' type character However, the ANSI C standard (Section 7.9.6.2) states that: "Finally, the conversion specifiers C, C, and C shall be preceded by C if the corresponding argument is a pointer to I rather than a pointer to C, or by C if it is a pointer to I." I have chosen to disregard the I warnings in favour of the standard. If you see the above warnings when compiling the unit tests for I, just ignore them. =head1 SEE ALSO I, I =head1 AUTHOR 20100612 raf =cut */ #if USE_NRNFILEWRAP #else #include "config.h" #include "std.h" #include #endif #if USE_NRNFILEWRAP int nrn_vsscanf(const char *str, const char** rs, const char *format, va_list args) #else int vsscanf(const char *str, const char *format, va_list args) #endif { const char *f, *s; #if USE_NRNFILEWRAP const char point = '.'; #else const char point = localeconv()->decimal_point[0]; #endif int cnv = 0; for (s = str, f = format; *f; ++f) { if (*f == '%') { int size = 0; int width = 0; int do_cnv = 1; if (*++f == '*') ++f, do_cnv = 0; for (; isdigit((int)(unsigned int)*f); ++f) width *= 10, width += *f - '0'; if (*f == 'h' || *f == 'l' || *f == 'L') size = *f++; if (*f != '[' && *f != 'c' && *f != 'n') while (isspace((int)(unsigned int)*s)) ++s; #define COPY *b++ = *s++, --width #define MATCH(cond) if (width && (cond)) COPY; #define MATCH_ACTION(cond, action) if (width && (cond)) { COPY; action; } #define MATCHES_ACTION(cond, action) while (width && (cond)) { COPY; action; } #define FAIL (cnv) ? cnv : EOF switch (*f) { case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': case 'p': { static const char types[] = "diouxXp"; static const int bases[] = { 10, 0, 8, 10, 16, 16, 16 }; static const char digitset[] = "0123456789abcdefABCDEF"; static const int setsizes[] = { 10, 0, 0, 0, 0, 0, 0, 0, 8, 0, 10, 0, 0, 0, 0, 0, 22 }; int base = bases[strchr(types, *f) - types]; int setsize; char buf[513]; char *b = buf; int digit = 0; if (width <= 0 || width > 512) width = 512; MATCH(*s == '+' || *s == '-') MATCH_ACTION(*s == '0', digit = 1; MATCH_ACTION((*s == 'x' || *s == 'X') && (base == 0 || base == 16), base = 16) else base = 8; ) setsize = setsizes[base]; MATCHES_ACTION(memchr(digitset, *s, setsize), digit = 1) if (!digit) { *rs = s; return FAIL; } *b = '\0'; if (do_cnv) { if (*f == 'd' || *f == 'i') { long data = strtol(buf, NULL, base); if (size == 'h') *va_arg(args, short *) = (short)data; else if (size == 'l') *va_arg(args, long *) = data; else *va_arg(args, int *) = (int)data; } else { unsigned long data = strtoul(buf, NULL, base); if (size == 'p') *va_arg(args, void **) = (void *)data; else if (size == 'h') *va_arg(args, unsigned short *) = (unsigned short)data; else if (size == 'l') *va_arg(args, unsigned long *) = data; else *va_arg(args, unsigned int *) = (unsigned int)data; } ++cnv; } break; } case 'e': case 'E': case 'f': case 'g': case 'G': { char buf[513]; char *b = buf; int digit = 0; if (width <= 0 || width > 512) width = 512; MATCH(*s == '+' || *s == '-') MATCHES_ACTION(isdigit((int)(unsigned int)*s), digit = 1) MATCH(*s == point) MATCHES_ACTION(isdigit((int)(unsigned int)*s), digit = 1) MATCHES_ACTION(digit && (*s == 'e' || *s == 'E'), MATCH(*s == '+' || *s == '-') digit = 0; MATCHES_ACTION(isdigit((int)(unsigned int)*s), digit = 1) ) if (!digit) { *rs = s; return FAIL; } *b = '\0'; if (do_cnv) { double data = strtod(buf, NULL); if (size == 'l') *va_arg(args, double *) = data; else if (size == 'L') *va_arg(args, long double *) = (long double)data; else *va_arg(args, float *) = (float)data; ++cnv; } break; } case 's': { char *arg = va_arg(args, char *); if (width <= 0) width = INT_MAX; while (width-- && *s && !isspace((int)(unsigned int)*s)) if (do_cnv) *arg++ = *s++; if (do_cnv) *arg = '\0', ++cnv; break; } case '[': { char *arg = va_arg(args, char *); int setcomp = 0; size_t setsize; const char *end; if (width <= 0) width = INT_MAX; if (*++f == '^') setcomp = 1, ++f; end = strchr((*f == ']') ? f + 1 : f, ']'); if (!end) { *rs = s; return FAIL; } /* Could be cnv to match glibc-2.2 */ setsize = end - f; /* But FAIL matches the C standard */ while (width-- && *s) { if (!setcomp && !memchr(f, *s, setsize)) break; if (setcomp && memchr(f, *s, setsize)) break; if (do_cnv) *arg++ = *s++; } if (do_cnv) *arg = '\0', ++cnv; f = end; break; } case 'c': { char *arg = va_arg(args, char *); if (width <= 0) width = 1; while (width--) { if (!*s) { *rs = s; return FAIL; } if (do_cnv) *arg++ = *s++; } if (do_cnv) ++cnv; break; } case 'n': { if (size == 'h') *va_arg(args, short *) = (short)(s - str); else if (size == 'l') *va_arg(args, long *) = (long)(s - str); else *va_arg(args, int *) = (int)(s - str); break; } case '%': { if (*s++ != '%') { *rs = s; return cnv; } break; } default: *rs = s; return FAIL; } } else if (isspace((int)(unsigned int)*f)) { while (isspace((int)(unsigned int)f[1])) ++f; while (isspace((int)(unsigned int)*s)) ++s; } else { if (*s++ != *f) { *rs = s; return cnv; } } } *rs = s; return cnv; } #if 0 #ifdef TEST #undef _ISOC9X_SOURCE #undef __USE_ISOC9X #include #include int test_sscanf(const char *str, const char *format, ...) { int rc; va_list args; va_start(args, format); rc = vsscanf(str, format, args); va_end(args); return rc; } int main(int ac, char **av) { int errors = 0; short si1, si2; int i1, i2; long li1, li2; float f1, f2; double d1, d2; long double ld1, ld2; void *p1, *p2; char b1[128], b2[128]; char c1[128], c2[128]; char s1[128], s2[128]; short sn1, sn2; int in1, in2; long ln1, ln2; unsigned short su1, su2; unsigned int u1, u2; unsigned long lu1, lu2; char str[512]; int rc1, rc2; if (ac == 2 && !strcmp(av[1], "help")) { printf("usage: %s [show]\n", *av); return EXIT_SUCCESS; } printf("Testing: %s\n", "vsscanf"); /* Test one of everything */ sprintf(str, " abc -12 37 101 3.4e-1 12.34 102.23 xyz %p def ghi jkl %% ", p1 = (void *)0xdeadbeef ); if (ac >= 2 && !strcmp(av[1], "show")) printf("%s\n", str); rc1 = sscanf(str, " abc %hd %d %ld %e %le %Le xyz %p %[^abc ] %3c %s%hn %n%% %ln", &si1, &i1, &li1, &f1, &d1, &ld1, &p1, b1, c1, s1, &sn1, &in1, &ln1 ); rc2 = test_sscanf(str, " abc %hd %d %ld %e %le %Le xyz %p %[^abc ] %3c %s%hn %n%% %ln", &si2, &i2, &li2, &f2, &d2, &ld2, &p2, b2, c2, s2, &sn2, &in2, &ln2 ); if (rc1 != rc2) ++errors, printf("Test1: failed (returned %d, not %d)\n", rc2, rc1); if (si1 != si2) ++errors, printf("Test2: failed (%%hd scanned %hd, not %hd)\n", si2, si1); if (i1 != i2) ++errors, printf("Test3: failed (%%d scanned %d, not %d)\n", i2, i1); if (li1 != li2) ++errors, printf("Test4: failed (%%ld scanned %ld, not %ld)\n", li2, li1); if (fabs(f2 - 3.4e-1) / 3.4e-1 >= 4 * FLT_EPSILON) ++errors, printf("Test5: failed (%%e scanned %e, not %e)\n", f2, f1); if (fabs(d2 - 12.34) / 12.34 >= 4 * DBL_EPSILON) ++errors, printf("Test6: failed (%%le scanned %le, not %le)\n", d2, d1); if (fabs(ld2 - 102.23) / 102.23 >= 4 * LDBL_EPSILON) ++errors, printf("Test7: failed (%%Le scanned %Le, not %Le)\n", ld2, ld1); if (p1 != p2) ++errors, printf("Test8: failed (%%p scanned %p, not %p)\n", p2, p1); if (strcmp(b1, b2)) ++errors, printf("Test9: failed (%%[^abc ] scanned \"%s\", not \"%s\")\n", b2, b1); if (memcmp(c1, c2, 3)) ++errors, printf("Test10: failed (%%3c scanned \"%3.3s\", not \"%3.3s\")\n", c2, c1); if (strcmp(s1, s2)) ++errors, printf("Test11: failed (%%s scanned \"%s\", not \"%s\")\n", s2, s1); if (sn1 != sn2) ++errors, printf("Test12: failed (%%hn scanned %hd, not %hd)\n", sn2, sn1); if (in1 != in2) ++errors, printf("Test13: failed (%%n scanned %d, not %d)\n", in2, in1); if (ln1 != ln2) ++errors, printf("Test14: failed (%%ln scanned %ld, not %ld)\n", ln2, ln1); /* Test different numeric bases */ #define TEST_NUM(i, var, tst, str, format) \ rc1 = sscanf(str, format, &s##var##1, &var##1, &l##var##1); \ rc2 = test_sscanf(str, format, &s##var##2, &var##2, &l##var##2); \ if (rc1 != rc2) \ ++errors, printf("Test%d: failed (returned %d, not %d)\n", (i), rc2, rc1); \ if (s##var##1 != s##var##2) \ ++errors, printf("Test%d: failed (%%h%c scanned %hd, not %hd)\n", (i), tst, s##var##2, s##var##1); \ if (var##1 != var##2) \ ++errors, printf("Test%d: failed (%%%c scanned %d, not %d)\n", (i), tst, var##2, var##1); \ if (l##var##1 != l##var##2) \ ++errors, printf("Test%d: failed (%%l%c scanned %ld, not %ld)\n", (i), tst, l##var##2, l##var##1) #define TEST_STR(i, len, str, format) \ rc1 = sscanf(str, format, b1, c1, s1); \ rc2 = test_sscanf(str, format, b2, c2, s2); \ if (rc1 != rc2) \ ++errors, printf("Test%d: failed (returned %d, not %d)\n", (i), rc2, rc1); \ if (strcmp(b1, b2)) \ ++errors, printf("Test%d: failed (%%%d[ scanned \"%s\", not \"%s\")\n", (i), (len), b2, b1); \ if (memcmp(c1, c2, len)) \ ++errors, printf("Test%d: failed (%%%dc scanned \"%*.*s\", not \"%*.*s\")\n", (i), (len), (len), (len), c2, (len), (len), c1); \ if (strcmp(s1, s2)) \ ++errors, printf("Test%d: failed (%%%ds scanned \"%s\", not \"%s\")\n", (i), (len), s2, s1) TEST_NUM(15, i, 'i', "37 21 53", "%hi %i %li"); TEST_NUM(16, i, 'i', "037 021 053", "%hi %i %li"); TEST_NUM(17, i, 'i', "0x37 0x21 0x53", "%hi %i %li"); TEST_NUM(18, u, 'o', "037 021 053", "%ho %o %lo"); TEST_NUM(19, u, 'u', "37 21 53", "%hu %u %lu"); TEST_NUM(20, u, 'x', "0x37 0x21 0x53", "%hx %x %lx"); TEST_NUM(21, u, 'X', "0x37 0x21 0x53", "%hx %x %lx"); /* Test field width handling */ TEST_NUM(22, i, 'd', "123456789", "%3hd %2d %4ld"); TEST_NUM(23, i, 'i', "123456789", "%3hi %2i %4li"); TEST_NUM(24, i, 'i', "012340789", "%3hi %2i %4li"); TEST_NUM(25, i, 'x', "123456789", "%3hi %2i %4li"); TEST_NUM(26, u, 'o', "012340789", "%3ho %2o %4lo"); TEST_NUM(27, u, 'u', "123456789", "%3hu %2u %4lu"); TEST_NUM(28, u, 'x', "123456789", "%3hx %2x %4lx"); TEST_NUM(29, u, 'X', "123456789", "%3hx %2X %4lX"); TEST_STR(30, 1, "abcd", "%1[a]%c%1s"); TEST_STR(31, 5, "abc\001d e f g h i", "%5[][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*()_=+\\|{};':\",./<>? -]%5c%5s"); TEST_STR(32, 3, "abc\001d e f g h i", "%3[][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*()_=+\\|{};':\",./<>? -]%3c%3s"); TEST_STR(33, 7, "abc\001d e f g h i", "%7[][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*()_=+\\|{};':\",./<>? -]%7c%7s"); TEST_STR(34, 2, "abc\001d e f g h i", "%2[][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*()_=+\\|{};':\",./<>? -]%2c%2s"); /* Test error reporting */ #define TEST_ERR(i, str, format) \ rc1 = sscanf(str, format); \ rc2 = test_sscanf(str, format); \ if (rc1 != rc2) \ ++errors, printf("Test%d: failed (returned %d, not %d)\n", (i), rc2, rc1) #define TEST_ERR_ARG(i, str, format, var) \ rc1 = sscanf(str, format, &var##1); \ rc2 = test_sscanf(str, format, &var##1); \ if (rc1 != rc2) \ ++errors, printf("Test%d: failed (returned %d, not %d)\n", (i), rc2, rc1) TEST_ERR_ARG(35, "", "%d", i); TEST_ERR_ARG(36, "", "%i", i); TEST_ERR_ARG(37, "", "%o", u); TEST_ERR_ARG(38, "", "%u", u); TEST_ERR_ARG(39, "", "%x", u); TEST_ERR_ARG(40, "", "%X", u); TEST_ERR_ARG(41, "", "%p", p); TEST_ERR_ARG(42, "", "%e", f); TEST_ERR_ARG(43, "", "%E", f); TEST_ERR_ARG(44, "", "%f", f); TEST_ERR_ARG(45, "", "%g", f); TEST_ERR_ARG(46, "", "%G", f); TEST_ERR_ARG(47, "", "%[^]", *b); TEST_ERR_ARG(48, "", "%c", *c); TEST_ERR(49, "a", "%%"); TEST_ERR(50, "a", "b"); if (errors) printf("%d/50 tests failed (This system's sscanf(3) is probably wrong)\n", errors); else printf("All tests passed\n"); return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } #endif #endif /* vi:set ts=4 sw=4: */ neuron-7.5/src/oc/nrnapi.h000066400000000000000000000000751323325274500155330ustar00rootroot00000000000000#ifndef nrnapi_h #define nrnapi_h #define NRNAPI 2 #endif neuron-7.5/src/oc/nrnfilewrap.c000066400000000000000000000100311323325274500165570ustar00rootroot00000000000000#include <../../nrnconf.h> /* On the BG/P when 128K or more processors are used we need to avoid huge numbers of replicated reads of hoc files. The NrnFileWrap provides a framework for this. In normal circumstances corresponding fopen, fclose , getc, fall through to the FILE functions. Otherwise, the file will be read by rank 0 into a char buffer and broadcast to all the other ranks. */ #include #include #include #include #include #include #include #include "hoc.h" #include "nrnmpi.h" #include "nrnfilewrap.h" extern int nrn_xopen_broadcast_; #if USE_NRNFILEWRAP /* to end of file */ static NrnFILEWrap* fwstdin; static NrnFILEWrap* nrn_fw_read(const char* path, const char* mode); NrnFILEWrap* nrn_fw_wrap(FILE* f) { NrnFILEWrap* fw; fw = (NrnFILEWrap*)emalloc(sizeof(NrnFILEWrap)); fw->f = f; fw->buf = (char*)0; fw->ip = 0; fw->cnt = 0; return fw; } void nrn_fw_delete(NrnFILEWrap* fw){ if (fw->buf) { free(fw->buf); } free(fw); } int nrn_fw_fclose(NrnFILEWrap* fw){ int e = 0; if (fw->f) { e = fclose(fw->f); } if (fw->buf) { nrn_fw_delete(fw); } return e; } NrnFILEWrap* nrn_fw_set_stdin(){ if (!fwstdin) { fwstdin = nrn_fw_wrap(stdin); } return fwstdin; } NrnFILEWrap* nrn_fw_fopen(const char* path, const char* mode){ NrnFILEWrap* fw = (NrnFILEWrap*)0; FILE* f; if (nrn_xopen_broadcast_ == 0 || nrn_xopen_broadcast_ > nrnmpi_numprocs) { f = fopen(path, mode); if (f) { fw = nrn_fw_wrap(f); } }else{ fw = nrn_fw_read(path, mode); } return fw; } int nrn_fw_readaccess(const char* path) { int r; if (nrn_xopen_broadcast_ == 0 || nrn_xopen_broadcast_ > nrnmpi_numprocs) { r = access(path, R_OK); } else { if ( nrnmpi_myid == 0) { r = access(path, R_OK); #if 0 printf("access %s %d\n", path, r); #endif } nrnmpi_int_broadcast(&r, 1, 0); } r = ((r == 0) ? 1 : 0); return r; } int nrn_fw_fseek(NrnFILEWrap* fw, long offset, int whence){ int r = 0; int e = 0; if (fw->f) { r = fseek(fw->f, offset, whence); }else if (fw->buf) { long i = -1; switch(whence) { case SEEK_SET: i = offset; break; case SEEK_CUR: i = offset + fw->ip; break; case SEEK_END: i = offset + fw->cnt; break; } if (i >= 0 && i <= fw->cnt) { fw->ip = i; }else{ errno = EINVAL; r = -1; } }else{ errno = EBADF; r = -1; } return r; } int nrn_fw_getc(NrnFILEWrap* fw){ int c = EOF; if (fw->f) { c = getc(fw->f); }else if (fw->buf) { if (fw->ip < fw->cnt) { c = (int)fw->buf[fw->ip++]; } } return c; } int nrn_fw_ungetc(int c, NrnFILEWrap* fw){ int e = EOF; if (fw->f) { e = ungetc(c, fw->f); }else if (fw->buf) { if (fw->ip > 0) { fw->buf[--fw->ip] = (unsigned char)c; e = c; } } return e; } static int nrn_vsscanf(const char *str, const char** rs, const char *format, va_list args); int nrn_fw_fscanf(NrnFILEWrap* fw, const char* fmt, ...){ int i = 0; va_list ap; va_start(ap, fmt); if (fw->f) { i = vfscanf(fw->f, fmt, ap); }else if (fw->buf) { const char* rs; i = nrn_vsscanf(fw->buf + fw->ip, &rs, fmt, ap); fw->ip = (unsigned char*)rs - fw->buf; } va_end(ap); return i; } NrnFILEWrap* nrn_fw_read(const char* path, const char* mode){ NrnFILEWrap* fw = (NrnFILEWrap*)0; size_t sz = 0; int isz = -1; unsigned char* buf = (char*)0; if (nrnmpi_myid == 0) { FILE* f = fopen(path, mode); if (f) { struct stat bs; assert(!fstat(fileno(f), &bs)); sz = bs.st_size; isz = sz; if (sz > 0) { buf = (unsigned char*)emalloc(sz+2); assert(fread(buf, 1, sz, f) == sz); } fclose(f); #if 1 printf("load %s %d\n", path, isz); #endif } } if (nrnmpi_numprocs > 1) { nrnmpi_int_broadcast(&isz, 1, 0); if (nrnmpi_myid > 0) { if (isz > 0) { sz = isz; buf = (unsigned char*)emalloc(sz+2); } } if (isz > 0) { nrnmpi_char_broadcast((char*)buf, isz, 0); } } if (isz >= 0) { fw = nrn_fw_wrap((FILE*)0); fw->cnt = sz; buf[sz] = '\0'; fw->buf = (unsigned char*)buf; } return fw; } #include "nrn_vsscanf.c" #endif /* USE_NRNFILEWRAP */ neuron-7.5/src/oc/nrnfilewrap.h000066400000000000000000000027001323325274500165700ustar00rootroot00000000000000#ifndef nrnfilewrap_h #define nrnfilewrap_h #include #include #include #if !defined(USE_NRNFILEWRAP) #define USE_NRNFILEWRAP 0 #endif #if defined(__cplusplus) extern "C" { #endif #include "hocstr.h" #if USE_NRNFILEWRAP typedef struct NrnFILEWrap { FILE* f; unsigned char* buf; size_t ip, cnt; } NrnFILEWrap; extern char* fgets_unlimited(HocStr* s, NrnFILEWrap* f); extern NrnFILEWrap* nrn_fw_wrap(FILE* f); extern void nrn_fw_delete(NrnFILEWrap* fw); #define nrn_fw_eq(fw,ff) (fw->f == ff) extern int nrn_fw_fclose(NrnFILEWrap* fw); extern NrnFILEWrap* nrn_fw_set_stdin(); extern NrnFILEWrap* nrn_fw_fopen(const char* path, const char* mode); extern int nrn_fw_fseek(NrnFILEWrap* fw, long offset, int whence); extern int nrn_fw_getc(NrnFILEWrap* fw); extern int nrn_fw_ungetc(int c, NrnFILEWrap* fw); extern int nrn_fw_fscanf(NrnFILEWrap* fw, const char* format, ...); extern int nrn_fw_readaccess(const char* path); #else /* not USE_NRNFILEWRAP */ #define NrnFILEWrap FILE extern char* fgets_unlimited(HocStr* s, NrnFILEWrap* f); #define nrn_fw_wrap(f) f #define nrn_fw_delete(fw) /**/ #define nrn_fw_eq(fw,ff) (fw == ff) #define nrn_fw_fclose fclose #define nrn_fw_set_stdin() stdin #define nrn_fw_fopen fopen #define nrn_fw_fseek fseek #define nrn_fw_getc(fw) getc(fw) #define nrn_fw_ungetc(c,fw) ungetc(c,fw) #define nrn_fw_fscanf fscanf #endif extern NrnFILEWrap* hoc_fin; #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/nrnisaac.c000066400000000000000000000014111323325274500160300ustar00rootroot00000000000000#include <../../nrnconf.h> #include #if HAVE_SYS_TYPES_H #include #endif #include #include #include "hocdec.h" typedef struct isaac64_state Rng; void* nrnisaac_new(void) { Rng* rng; rng = (Rng*)hoc_Emalloc(sizeof(Rng)); hoc_malchk(); return (void*)rng; } void nrnisaac_delete(void* v) { free(v); } void nrnisaac_init(void* v, unsigned long int seed) { isaac64_init((Rng*)v, seed); } double nrnisaac_dbl_pick(void* v) { Rng* rng = (Rng*)v; double x = isaac64_dbl32(rng); /*printf("dbl %d %d %d %d %g\n", sizeof(ub8), sizeof(ub4), sizeof(ub2), sizeof(ub1), x);*/ return x; } uint32_t nrnisaac_uint32_pick(void* v) { Rng* rng = (Rng*)v; double x = isaac64_uint32(rng); /*printf("uint32 %g\n", x);*/ return x; } neuron-7.5/src/oc/nrnisaac.h000066400000000000000000000006151323325274500160420ustar00rootroot00000000000000#ifndef nrnisaac_h #define nrnisaac_h #include "nrnconf.h" #if defined(HAVE_STDINT_H) #include #endif #if defined(__cplusplus) extern "C" { #endif void* nrnisaac_new(void); void nrnisaac_delete(void* rng); void nrnisaac_init(void* rng, unsigned long int seed); double nrnisaac_dbl_pick(void* rng); uint32_t nrnisaac_uint32_pick(void* rng); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/nrnjava.h000066400000000000000000000011371323325274500157030ustar00rootroot00000000000000#ifndef nrnjava_h #define nrnjava_h #if defined(__cplusplus) #extern "C" { #endif extern void* (*p_java2nrn_cons)(Object*); extern void (*p_java2nrn_destruct)(void* opaque_java_object); extern double (*p_java2nrn_dmeth)(Object* ho, Symbol* method); extern char** (*p_java2nrn_smeth)(Object* ho, Symbol* method); extern Object** (*p_java2nrn_ometh)(Object* ho, Symbol* method); extern const char* (*p_java2nrn_classname)(Object* ho); extern Symbol* java2nrn_class(const char* classname, int classindex, const char* methods); extern int (*p_hoc_load_java)(void); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/nrnmpi.h000077500000000000000000000021701323325274500155500ustar00rootroot00000000000000#ifndef nrnmpi_h #define nrnmpi_h #include "nrnmpiuse.h" /* by default nrnmpi_numprocs_world = nrnmpi_numprocs = nrnmpi_numsubworlds and nrnmpi_myid_world = nrnmpi_myid and the bulletin board and network communication do not easily coexist. ParallelContext.subworlds(nsmall) divides the world into nrnmpi_numprocs_world/small subworlds of size nsmall. */ extern int nrnmpi_numprocs_world; /* size of entire world. total size of all subworlds */ extern int nrnmpi_myid_world; /* rank in entire world */ extern int nrnmpi_numprocs; /* size of subworld */ extern int nrnmpi_myid; /* rank in subworld */ extern int nrnmpi_numprocs_bbs; /* number of subworlds */ extern int nrnmpi_myid_bbs; /* rank in nrn_bbs_comm of rank 0 of a subworld */ typedef struct { int gid; double spiketime; } NRNMPI_Spike; #if NRNMPI #if defined(__cplusplus) extern "C" { #endif extern int nrnmpi_use; /* NEURON does MPI init and terminate?*/ extern int nrn_cannot_use_threads_and_mpi; /* 0 if required <= provided from MPI_Init_thread */ #if defined(__cplusplus) } #endif /*c++*/ #include "nrnmpidec.h" #endif /*NRNMPI*/ #endif /*nrnmpi_h*/ neuron-7.5/src/oc/nrnmpi_dynam.c000066400000000000000000000000441323325274500167260ustar00rootroot00000000000000#include "../nrnmpi/nrnmpi_dynam.c" neuron-7.5/src/oc/nrnmpiuse.h.in000077500000000000000000000021221323325274500166670ustar00rootroot00000000000000#ifndef usenrnmpi_h #define usenrnmpi_h /* define to 1 if you want MPI specific features activated */ #undef NRNMPI /* define to 1 if you want parallel distributed cells (and gap junctions) */ #undef PARANEURON /* define to 1 if you want mpi dynamically loaded instead of linked normally */ #undef NRNMPI_DYNAMICLOAD /* define to 1 if you want the MUSIC - MUlti SImulation Coordinator */ #undef NRN_MUSIC /* define to the dll path if you want to load automatically */ #undef DLL_DEFAULT_FNAME /* define if needed */ #undef ALWAYS_CALL_MPI_INIT /* Number of times to retry a failed open */ #undef FILE_OPEN_RETRY /* define if IBM BlueGene L, P or Q (activates BGLCheckPoint functionality) */ #undef BLUEGENE /* define if IBM BlueGene/P */ #undef BLUEGENEP /* define if IBM BlueGene/Q */ #undef BLUEGENEQ /* define BlueGene with checkpointing */ #undef BLUEGENE_CHECKPOINT /* Define bits for BGPDMA & 1 (ISend) & 2 (DMA spike transfer) & 4 (DMA Record Replay */ #undef BGPDMA /* Define to 1 for possibility of rank 0 xopen/ropen a file and broadcast everywhere */ #undef USE_NRNFILEWRAP #endif neuron-7.5/src/oc/nrnpthread.h000066400000000000000000000003511323325274500164060ustar00rootroot00000000000000/* src/oc/nrnpthread.h. Generated from nrnpthread.h.in by configure. */ #ifndef nrnpthread_h #define nrnpthread_h /* Configure with use_pthread=no if pthread.h exists but you do not want to use it */ #define USE_PTHREAD 1 #endif neuron-7.5/src/oc/nrnpthread.h.in000066400000000000000000000002341323325274500170130ustar00rootroot00000000000000#ifndef nrnpthread_h #define nrnpthread_h /* Configure with use_pthread=no if pthread.h exists but you do not want to use it */ #undef USE_PTHREAD #endif neuron-7.5/src/oc/nrnran123.c000066400000000000000000000057301323325274500157660ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include #include #include static const double SHIFT32 = 1.0 / 4294967297.0; /* 1/(2^32 + 1) */ static philox4x32_key_t k={{0}}; struct nrnran123_State { philox4x32_ctr_t c; philox4x32_ctr_t r; char which_; }; void nrnran123_set_globalindex(uint32_t gix) { k.v[0] = gix; } /* if one sets the global, one should reset all the stream sequences. */ uint32_t nrnran123_get_globalindex() { return k.v[0]; } nrnran123_State* nrnran123_newstream(uint32_t id1, uint32_t id2) { return nrnran123_newstream3(id1, id2, 0); } nrnran123_State* nrnran123_newstream3(uint32_t id1, uint32_t id2, uint32_t id3) { nrnran123_State* s; s = (nrnran123_State*)ecalloc(sizeof(nrnran123_State), 1); s->c.v[1] = id3; s->c.v[2] = id1; s->c.v[3] = id2; nrnran123_setseq(s, 0, 0); return s; } void nrnran123_deletestream(nrnran123_State* s) { free(s); } void nrnran123_getseq(nrnran123_State* s, uint32_t* seq, char* which) { *seq = s->c.v[0]; *which = s->which_; } void nrnran123_setseq(nrnran123_State* s, uint32_t seq, char which) { if (which > 3 || which < 0) { s->which_ = 0; }else{ s->which_ = which; } s->c.v[0] = seq; s->r = philox4x32(s->c, k); } void nrnran123_getids(nrnran123_State* s, uint32_t* id1, uint32_t* id2) { *id1 = s->c.v[2]; *id2 = s->c.v[3]; } void nrnran123_getids3(nrnran123_State* s, uint32_t* id1, uint32_t* id2, uint32_t* id3) { *id3 = s->c.v[1]; *id1 = s->c.v[2]; *id2 = s->c.v[3]; } uint32_t nrnran123_ipick(nrnran123_State* s) { uint32_t rval; char which = s->which_; assert (which < 4); rval = s->r.v[which++]; if (which > 3) { which = 0; s->c.v[0]++; s->r = philox4x32(s->c, k); } s->which_ = which; return rval; } double nrnran123_dblpick(nrnran123_State* s) { return nrnran123_uint2dbl(nrnran123_ipick(s)); } double nrnran123_negexp(nrnran123_State* s) { /* min 2.3283064e-10 to max 22.18071 */ return -log(nrnran123_dblpick(s)); } /* at cost of a cached value we could compute two at a time. */ double nrnran123_normal(nrnran123_State* s) { double w, x, y; double u1, u2; do { u1 = nrnran123_dblpick(s); u2 = nrnran123_dblpick(s); u1 = 2.*u1 - 1.; u2 = 2.*u2 - 1.; w = (u1*u1) + (u2*u2); } while( w > 1 ); y = sqrt( (-2.*log(w))/w); x = u1*y; return x; } nrnran123_array4x32 nrnran123_iran(uint32_t seq, uint32_t id1, uint32_t id2) { return nrnran123_iran3(seq, id1, id2, 0); } nrnran123_array4x32 nrnran123_iran3(uint32_t seq, uint32_t id1, uint32_t id2, uint32_t id3) { nrnran123_array4x32 a; philox4x32_ctr_t c; c.v[0] = seq; c.v[1] = id3; c.v[2] = id1; c.v[3] = id2; philox4x32_ctr_t r = philox4x32(c, k); a.v[0] = r.v[0]; a.v[1] = r.v[1]; a.v[2] = r.v[2]; a.v[3] = r.v[3]; return a; } double nrnran123_uint2dbl(uint32_t u) { /* 0 to 2^32-1 transforms to double value in open (0,1) interval */ /* min 2.3283064e-10 to max (1 - 2.3283064e-10) */ return ((double)u + 1.0) * SHIFT32; } neuron-7.5/src/oc/nrnran123.h000066400000000000000000000053111323325274500157660ustar00rootroot00000000000000#ifndef nrnran123_h #define nrnran123_h /* interface to Random123 */ /* http://www.thesalmons.org/john/random123/papers/random123sc11.pdf */ /* The 4x32 generators utilize a uint32x4 counter and uint32x4 key to transform into an almost cryptographic quality uint32x4 random result. There are many possibilites for balancing the sharing of the internal state instances while reserving a uint32 counter for the stream sequence and reserving other portions of the counter vector for stream identifiers and global index used by all streams. We currently provide a single instance by default in which the policy is to use the 0th counter uint32 as the stream sequence, words 2, 3 and 4 as the stream identifier, and word 0 of the key as the global index. Unused words are constant uint32 0. It is also possible to use Random123 directly without reference to this interface. See Random123-1.02/docs/html/index.html of the full distribution available from http://www.deshawresearch.com/resources_random123.html */ #include #if defined(__cplusplus) extern "C" { #endif typedef struct nrnran123_State nrnran123_State; typedef struct nrnran123_array4x32 { uint32_t v[4]; } nrnran123_array4x32; /* global index. eg. run number */ /* all generator instances share this global index */ extern void nrnran123_set_globalindex(uint32_t gix); extern uint32_t nrnran123_get_globalindex(); /* minimal data stream */ extern nrnran123_State* nrnran123_newstream(uint32_t id1, uint32_t id2); extern nrnran123_State* nrnran123_newstream3(uint32_t id1, uint32_t id2 , uint32_t id3); extern void nrnran123_deletestream(nrnran123_State*); extern void nrnran123_getseq(nrnran123_State*, uint32_t* seq, char* which); extern void nrnran123_setseq(nrnran123_State*, uint32_t seq, char which); extern void nrnran123_getids(nrnran123_State*, uint32_t* id1, uint32_t* id2); extern void nrnran123_getids3(nrnran123_State*, uint32_t* id1, uint32_t* id2, uint32_t* id3); extern uint32_t nrnran123_ipick(nrnran123_State*); /* uniform 0 to 2^32-1 */ extern double nrnran123_dblpick(nrnran123_State*); /* uniform open interval (0,1)*/ /* nrnran123_dblpick minimum value is 2.3283064e-10 and max value is 1-min */ extern double nrnran123_negexp(nrnran123_State*); /* mean 1.0 */ /* nrnran123_negexp min value is 2.3283064e-10, max is 22.18071 */ extern double nrnran123_normal(nrnran123_State*); /* mean 0.0, std 1.0 */ /* more fundamental (stateless) (though the global index is still used) */ extern nrnran123_array4x32 nrnran123_iran(uint32_t seq, uint32_t id1, uint32_t id2); extern nrnran123_array4x32 nrnran123_iran3(uint32_t seq, uint32_t id1, uint32_t id2, uint32_t id3); extern double nrnran123_uint2dbl(uint32_t); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/nrnrt.h000077500000000000000000000007301323325274500154100ustar00rootroot00000000000000#ifndef nrnrt_h #define nrnrt_h #include "nrnrtuse.h" #if NRN_REALTIME #if defined(__cplusplus) extern "C" { #endif void nrn_setscheduler(); void nrn_maintask_init(); void nrn_maintask_delete(); int nrn_rt_run(double tstop); void nrn_rtrun_thread_init(); extern int nrn_realtime_; extern double nrn_rtstep_time_; extern int nrnrt_overrun_; #if defined(__cplusplus) } #endif /*c++*/ #endif /* NRN_REALTIME */ #if NRN_6229 #define NRN_DAQ 1 #endif #endif /*nrnmpi_h*/ neuron-7.5/src/oc/nrnrtuse.h.in000077500000000000000000000002661323325274500165360ustar00rootroot00000000000000#ifndef usenrnrt_h #define usenrnrt_h /* define if want to use as rtlinux dynamic clamp */ #undef NRN_REALTIME /* define if have a NI PCI-6229 DAQ board */ #undef NRN_6229 #endif neuron-7.5/src/oc/oc_ansi.h000066400000000000000000000213001323325274500156510ustar00rootroot00000000000000#ifndef oc_ansi_h #define oc_ansi_h /* included by hocdec.h */ #if defined(__cplusplus) extern "C" { #endif extern int nrnignore; extern int hoc_obj_run(const char*, Object*); extern int hoc_argtype(int); extern int hoc_is_double_arg(int); extern int hoc_is_pdouble_arg(int); extern int hoc_is_str_arg(int); extern int hoc_is_object_arg(int); extern char* gargstr(int); extern char** hoc_pgargstr(int); extern double* getarg(int); extern double* hoc_pgetarg(int); extern Object** hoc_objgetarg(int); extern Object* hoc_name2obj(const char* name, int index); extern int ifarg(int); extern char** hoc_temp_charptr(void); extern void hoc_assign_str(char** pstr, const char* buf); extern double chkarg(int, double low, double high); extern double hoc_call_func(Symbol*, int narg); /* push first arg first. Warning: if the function is inside an object make sure you know what you are doing.*/ extern double hoc_call_objfunc(Symbol*, int narg, Object*); /* call a fuction within the context of an object.*/ extern double hoc_ac_; extern double hoc_epsilon; extern int nrn_inpython_; extern int stoprun; extern int hoc_color; extern int hoc_set_color(int); extern void hoc_plt(int, double, double); extern void hoc_plprint(const char*); extern void hoc_ret(void); /* but need to push before returning */ extern void hoc_retpushx(double); extern void hoc_pushx(double); extern void hoc_pushstr(char**); extern void hoc_pushobj(Object**); extern void hoc_push_object(Object*); extern void hoc_pushpx(double*); extern void hoc_pushs(Symbol*); extern void hoc_pushi(int); extern double hoc_xpop(void); extern Symbol *hoc_spop(void); extern double* hoc_pxpop(void); extern Object** hoc_objpop(void); extern Object* hoc_pop_object(void); extern char** hoc_strpop(void); extern int hoc_ipop(void); extern void hoc_nopop(void); extern void hoc_execerror(const char*, const char*); extern void hoc_execerror_mes(const char*, const char*, int); extern void hoc_warning(const char*, const char*); extern double* hoc_val_pointer(const char*); extern Symbol* hoc_lookup(const char*); extern Symbol* hoc_table_lookup(const char*, Symlist*); extern Symbol* hoc_install(const char*, int, double, Symlist**); extern Objectdata* hoc_objectdata; extern Datum* hoc_look_inside_stack(int, int); extern Object* hoc_obj_look_inside_stack(int); extern size_t hoc_total_array_data(Symbol*, Objectdata*); extern char* hoc_araystr(Symbol*, int, Objectdata*); extern char* hoc_object_name(Object*); extern char* hoc_object_pathname(Object*); extern const char* expand_env_var(const char*); extern void check_obj_type(Object*, const char*); extern int is_obj_type(Object*, const char*); extern void hoc_obj_ref(Object*); /* NULL allowed */ extern void hoc_obj_unref(Object*); /* NULL allowed */ extern void hoc_dec_refcount(Object**); extern Object** hoc_temp_objvar(Symbol* template_symbol, void* cpp_object); extern Object** hoc_temp_objptr(Object*); extern void hoc_new_object_asgn(Object** obp, Symbol* template_symbol, void* cpp_object); extern HocSymExtension* hoc_var_extra(const char*); extern double check_domain_limits(float*, double); extern Object* hoc_obj_get(int i); extern void hoc_obj_set(int i, Object*); extern void nrn_hoc_lock(void); extern void nrn_hoc_unlock(void); extern void* hoc_Emalloc(size_t size); extern void* hoc_Ecalloc(size_t nmemb, size_t size); extern void* hoc_Erealloc(void* ptr, size_t size); extern void hoc_malchk(void); extern void* nrn_cacheline_alloc(void** memptr, size_t size); extern void* nrn_cacheline_calloc(void** memptr, size_t nmemb, size_t size); extern char* cxx_char_alloc(size_t size); extern void nrn_exit(int); extern void hoc_free_list(Symlist**); extern int hoc_errno_check(void); extern Symbol* hoc_parse_stmt(const char*, Symlist**); extern void hoc_run_stmt(Symbol*); extern Symbol* hoc_parse_expr(const char*, Symlist**); extern double hoc_run_expr(Symbol*); extern void hoc_free_string(char*); extern int hoc_xopen1(const char*, const char*); extern int hoc_xopen_run(Symbol*, const char*); extern void hoc_symbol_limits(Symbol*, float, float); extern void sym_extra_alloc(Symbol*); extern int hoc_chdir(const char* path); extern void hoc_register_var(DoubScal*, DoubVec*, VoidFunc*); extern int nrn_isdouble(void*, double, double); extern int hoc_main1(int, const char**, const char**); extern void hoc_final_exit(); extern void hoc_sprint1(char**, int); extern double hoc_scan(FILE*); extern char* hoc_symbol_units(Symbol* sym, const char* units); extern void hoc_fake_call(Symbol*); extern void hoc_last_init(void); extern void hoc_obj_notify(Object*); extern int ivoc_list_count(Object*); extern double hoc_func_table(void* functable, int n, double* args); extern void hoc_spec_table(void** pfunctable, int n); extern void* hoc_sec_internal_name2ptr(const char* s, int eflag); #if defined(__cplusplus) class IvocVect; #else #define IvocVect void #endif extern void vector_append(IvocVect*, double); extern int vector_arg_px(int, double**); extern int vector_instance_px(void*, double**); extern void install_vector_method(const char*, double(*)(void*)); extern IvocVect* vector_new(int, Object*); /*use this if possible*/ extern IvocVect* vector_new0(); extern IvocVect* vector_new1(int); extern IvocVect* vector_new2(IvocVect*); extern void vector_delete(IvocVect*); extern int vector_buffer_size(IvocVect*); extern int vector_capacity(IvocVect*); extern void vector_resize(IvocVect*, int); extern Object** vector_temp_objvar(IvocVect*); extern double* vector_vec(IvocVect*); extern Object** vector_pobj(IvocVect*); extern IvocVect* vector_arg(int); extern int is_vector_arg(int); extern char* vector_get_label(IvocVect*); extern void vector_set_label(IvocVect*, char*); extern void hoc_regexp_compile(const char*); extern int hoc_regexp_search(const char*); extern Symbol* hoc_install_var(const char*, double*); extern void hoc_class_registration(void); extern void hoc_spinit(void); extern void hoc_freearay(Symbol*); extern int hoc_arayinfo_install(Symbol*, int); extern void hoc_free_arrayinfo(Arrayinfo*); extern void hoc_free_val_array(double*, size_t); extern size_t hoc_total_array(Symbol*); extern void hoc_menu_cleanup(void); extern void frame_debug(void); extern void hoc_oop_initaftererror(void); extern void save_parallel_envp(void); extern void save_parallel_argv(int, const char**); extern void hoc_init(void); extern void initplot(void); extern void hoc_audit_command(const char*); extern void hoc_audit_from_hoc_main1(int, const char**, const char**); extern void hoc_audit_from_final_exit(void); extern void hoc_audit_from_xopen1(const char*, const char*); extern void hoc_xopen_from_audit(const char* fname); extern void hoc_emacs_from_audit(void); extern void hoc_audit_from_emacs(const char*, const char*); extern int hoc_retrieving_audit (void); extern int hoc_retrieve_audit (int id); extern int hoc_saveaudit (void); extern void bbs_done(void); extern void hoc_close_plot(void); extern void hoc_edit(void); extern void hoc_edit_quit(void); extern size_t hoc_pipegets_need(void); extern void ivoc_cleanup(void); extern void ivoc_final_exit(void); extern void ivoc_help(const char*); extern int hoc_oc(const char*); extern void hoc_pipeflush(void); extern void hoc_initcode(void); extern int hoc_ParseExec(int); extern int hoc_get_line(void); extern int hoc_araypt(Symbol*, int); extern double hoc_opasgn(int op, double dest, double src); extern void hoc_install_object_data_index(Symbol*); extern void hoc_template_notify(Object*, int); extern void hoc_construct_point(Object*, int); extern void hoc_call_ob_proc(Object* ob, Symbol* sym, int narg); extern void hoc_push_frame(Symbol*, int); extern void hoc_pop_frame(void); extern int hoc_argindex(void); extern void hoc_pop_defer(void); extern void hoc_tobj_unref(Object**); extern int hoc_stacktype(void); extern int hoc_inside_stacktype(int); extern void hoc_link_symbol(Symbol*, Symlist*); extern void hoc_unlink_symbol(Symbol*, Symlist*); extern void notify_freed(void*); extern void notify_freed_val_array(double*, size_t); extern void notify_pointer_freed(void*); extern int ivoc_list_look(Object*, Object*, char*, int); extern void ivoc_free_alias(Object*); extern Symbol* ivoc_alias_lookup(const char*, Object*); extern void hoc_obj_disconnect(Object*); extern void hoc_free_object(Object*); extern void hoc_free_pstring(char**); extern int hoc_returning; extern void hoc_on_init_register(Pfrv); extern int hoc_pid(void); extern int hoc_ired(const char*, int, int, int); extern double hoc_xred(const char*, double, double, double); extern int hoc_sred(const char*, char*, char*); extern int nrnpy_pr(const char* fmt, ...); #if defined (__cplusplus) extern void hoc_free_allobjects(cTemplate*, Symlist*, Objectdata*); #else extern void hoc_free_allobjects(Template*, Symlist*, Objectdata*); #endif extern int nrn_is_cable(void); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/ocerf.c000077500000000000000000000030331323325274500153350ustar00rootroot00000000000000#include <../../nrnconf.h> #include #ifndef MINGW #if DOS || defined(__GO32__) || defined(WIN32) /*|| defined(MAC)*/ /****************************************************************************** * * File: erf.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "erf.c,v 1.5 1997/11/24 16:21:37 hines Exp" ; #endif /************************************************************ * * Abstract: erf() * * Normalized error function. * * erf(z) = (2/sqrt(PI)) * Integral from 0 to z of * exp(-t*t) dt * * Note that erf(-z) = -erf(z). To obtain the cumulative * Gaussian distribution function at z probits: * * z = (x - mean)/std_dev * cdf(z) = 0.5 * (1 + erf(z)) * * Calling sequence: erf(z) * * Argument: Input: z, double * * Functions called: none * * Returns: double precision value of error function is on * the interval [-1, 1] * * Files accessed: none * ***********************************************************/ #include #define a1 0.254829592 #define a2 -0.284496736 #define a3 1.421413741 #define a4 -1.453152027 #define a5 1.061405429 double erf(z) double z; { double t, value; t = 1. / (1. + 0.3275911 * fabs(z)); value = 1. - (((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t) * exp(-z * z); if (z >= 0.0) return (value); else return (-value); } double erfc(z) double z; { return 1. - erf(z); } #endif #endif neuron-7.5/src/oc/ocfunc.h000066400000000000000000000051461323325274500155250ustar00rootroot00000000000000#ifndef ocfunc_h #define ocfunc_h #if defined(__cplusplus) extern "C" { #endif extern double hoc_Log(double), hoc_Log10(double), hoc1_Exp(double), hoc_Sqrt(double), hoc_integer(double); extern double hoc_Pow(double, double); extern void hoc_System(void), hoc_Prmat(void), hoc_solve(void), hoc_eqinit(void), hoc_Plt(void), hoc_atan2(void); extern void hoc_symbols(void), hoc_PRintf(void), hoc_Xred(void), hoc_Sred(void); extern void hoc_ropen(void), hoc_wopen(void), hoc_xopen(void), hoc_Fscan(void), hoc_Fprint(void); extern void hoc_Graph(void), hoc_Graphmode(void), hoc_Plot(void), hoc_axis(void), hoc_Sprint(void); extern void hoc_fmenu(void), hoc_Getstr(void), hoc_Strcmp(void); extern void hoc_Lw(void), hoc_machine_name(void), hoc_Saveaudit(void), hoc_Retrieveaudit(void); extern void hoc_plotx(void), hoc_ploty(void), hoc_regraph(void); extern void hoc_startsw(void), hoc_stopsw(void), hoc_object_id(void); extern void hoc_allobjects(void), hoc_allobjectvars(void); extern void hoc_xpanel(void), hoc_xbutton(void), hoc_xmenu(void), hoc_xslider(void); extern void hoc_xfixedvalue(void), hoc_xvarlabel(void), hoc_xradiobutton(void); extern void hoc_xvalue(void), hoc_xpvalue(void), hoc_xlabel(void), ivoc_style(void); extern void hoc_boolean_dialog(void), hoc_string_dialog(void), hoc_continue_dialog(void); extern void nrn_err_dialog(const char*); extern void hoc_single_event_run(void), hoc_notify_iv(void), nrniv_bind_thread(void); extern void hoc_pointer(void), hoc_Numarg(void), hoc_Argtype(void), hoc_exec_cmd(void); extern void hoc_load_proc(void), hoc_load_func(void), hoc_load_template(void), hoc_load_file(void); extern void hoc_xcheckbox(void), hoc_xstatebutton(void), hoc_Symbol_limits(void); extern void hoc_coredump_on_error(void), hoc_checkpoint(void), hoc_quit(void); extern void hoc_object_push(void), hoc_object_pop(void), hoc_pwman_place(void); extern void hoc_show_errmess_always(void), hoc_execute1(void), hoc_secname(void); extern void hoc_neuronhome(void), hoc_Execerror(void); extern void hoc_sscanf(void), hoc_save_session(void), hoc_print_session(void); extern void hoc_Chdir(void), hoc_getcwd(void), hoc_Symbol_units(void), hoc_stdout(void); extern void hoc_name_declared(void), hoc_unix_mac_pc(void), hoc_show_winio(void); extern void hoc_usemcran4(void), hoc_mcran4(void), hoc_mcran4init(void); extern void hoc_nrn_load_dll(void), hoc_nrnversion(void), hoc_object_pushed(void); extern void hoc_mallinfo(void), hoc_load_java(void); extern void hoc_Setcolor(void); extern void hoc_init_space(void); extern void hoc_install_hoc_obj(void); extern void nrn_feenableexcept(void); #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/ockludge.c000066400000000000000000000024351323325274500160360ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #if NRNMPI && DARWIN && !defined(NRNMPI_DYNAMICLOAD) // For DARWIN I do not really know the proper way to avoid // dyld: lazy symbol binding failed: Symbol not found: _MPI_Init // when the MPI functions are all used in the libnrnmpi.dylib // but the libmpi.a is statically linked. Therefore I am forcing // the linking here by listing all the MPI functions being used. #include void work_around() { MPI_Comm c = MPI_COMM_WORLD; MPI_Abort(c, 0); MPI_Address(0,0); MPI_Allgather(0,0,0,0,0,0,c); MPI_Allgatherv(0,0,0,0,0,0,0,c); MPI_Allreduce(0,0,0,0,0,c); MPI_Barrier(c); MPI_Bcast(0,0,0,0,c); MPI_Comm_dup(c, 0); MPI_Comm_rank(c, 0); MPI_Comm_size(c, 0); MPI_Finalize(); MPI_Gather(0,0,0,0,0,0,0,c); MPI_Gatherv(0,0,0,0,0,0,0,0,c); MPI_Get_count(0, 0, 0); MPI_Init(0, 0); MPI_Initialized(0); MPI_Iprobe(0,0,c,0,0); MPI_Irecv(0,0,0,0,0,c,0); MPI_Isend(0,0,0,0,0,c,0); MPI_Op_create(0, 0, 0); MPI_Pack(0, 0, 0, 0, 0, 0, c); MPI_Pack_size(0, 0, c, 0); MPI_Probe(0, 0, c, 0); MPI_Recv(0,0,0,0,0,c,0); MPI_Request_free(0); MPI_Send(0,0,0,0,0,c); MPI_Sendrecv(0,0,0,0,0,0,0,0,0,0,c,0); MPI_Type_commit(0); MPI_Type_struct(0,0,0,0,0); MPI_Unpack(0, 0, 0, 0, 0, 0, c); MPI_Wait(0, 0); MPI_Wtime(); } #endif neuron-7.5/src/oc/ocmain.c000077500000000000000000000042651323325274500155150ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/ocmain.c,v 1.7 1997/07/29 20:23:33 hines Exp */ #include #include #include int hoc_nstack, hoc_nframe; extern const char* neuron_home; #if MAC char hoc_console_buffer[256]; #endif #if LINT int ilint; #define Fprintf ilint = fprintf #else #define Fprintf fprintf #endif #if defined(WIN32) void* cvode_pmem; #endif static void setnrnhome(const char* arg) { #if !defined(WIN32)&&!defined(MAC) /* Gary Holt's first pass at this was: Set the NEURONHOME environment variable. This should override any setting in the environment, so someone doesn't accidently use data files from an old version of neuron. But I have decided to use the environment variable if it exists */ neuron_home = getenv("NEURONHOME"); if (!neuron_home) { #if defined(HAVE_PUTENV) static char* buffer; buffer = malloc(strlen(NEURON_DATA_DIR) + 12); sprintf(buffer, "NEURONHOME=%s", NEURON_DATA_DIR); putenv(buffer); neuron_home = NEURON_DATA_DIR; #elif defined(HAVE_SETENV) setenv("NEURONHOME", NEURON_DATA_DIR, 1); neuron_home = NEURON_DATA_DIR; #else #error "I don't know how to set environment variables." // Maybe in this case the user will have to set it by hand. #endif } #else // Not unix: setneuronhome(arg); #endif } #if LINDA /* LINDA (SAF) */ real_main(int argc, const char** argv, const char**envp) { #else int main(int argc, const char** argv, const char** envp) { #endif int err; nrn_isdouble((void*)0, 0., 0.); #if MAC int our_argc = 1; char *our_argv[1]; our_argv[0] = "Neuron"; err = hoc_main1(our_argc, our_argv, envp); #else setnrnhome(argv[0]); err = hoc_main1(argc, argv, envp); #endif if (!err) { hoc_final_exit(); } #if EXPRESS exit(0); #else #if LINDA lexit(0); #else return err; #endif #endif } void hoc_single_event_run() { /* for interviews, ivoc make use of own main */ #if LINDA extern int hoc_retreat_flag; if (hoc_retreat_flag) { hoc_retreat(); } #endif #if INTERVIEWS && 0 single_event_run(); #endif hoc_ret(); hoc_pushx(0.); } int run_til_stdin() {return 1;} void hoc_notify_value(){} #ifdef WIN32 void ivcleanup() {} void ivoc_win32_cleanup() {} int bad_install_ok; #endif neuron-7.5/src/oc/ocmisc.h000066400000000000000000000003021323325274500155120ustar00rootroot00000000000000#ifndef ocmisc_h #define ocmisc_h extern long hoc_nstack; extern long hoc_nframe; extern int hoc_errno_count; extern int hoc_pipeflag; extern int hoc_in_yyparse; extern int hoc_intset; #endif neuron-7.5/src/oc/ocnoiv.c000077500000000000000000000063611323325274500155430ustar00rootroot00000000000000#include <../../nrnconf.h> #include "hoc.h" #include "ocfunc.h" /*ARGSUSED*/ void notify_freed(void* p) { } /*ARGSUSED*/ void notify_freed_val_array(double* p, size_t size) { } /*ARGSUSED*/ void notify_pointer_freed(void* p) { } /*ARGSUSED*/ void ivoc_help(const char* p) { } /*ARGSUSED*/ void nrn_err_dialog(const char* mes) {} void ivoc_cleanup(void) {} void hoc_notify_iv(void) {hoc_ret(); hoc_pushx(0.);} void nrniv_bind_thread(void) {hoc_ret(); hoc_pushx(0.);} void hoc_xpvalue() { hoc_ret(); hoc_pushx(0.);} void hoc_xlabel(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xbutton(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xcheckbox(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xstatebutton(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xmenu(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xvalue(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xpanel(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xradiobutton(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xfixedvalue(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xvarlabel(void) { hoc_ret(); hoc_pushx(0.);} void hoc_xslider(void) { hoc_ret(); hoc_pushx(0.);} void ivoc_style(void) { hoc_ret(); hoc_pushx(0.);} void hoc_boolean_dialog(void) { hoc_ret(); hoc_pushx(0.);} void hoc_continue_dialog(void) { hoc_ret(); hoc_pushx(0.);} void hoc_string_dialog(void) { hoc_ret(); hoc_pushx(0.);} void hoc_checkpoint(void) { hoc_ret(); hoc_pushx(0.);} void hoc_pwman_place(void) { hoc_ret(); hoc_pushx(0.);} void hoc_save_session(void) { hoc_ret(); hoc_pushx(0.);} void hoc_print_session(void) { hoc_ret(); hoc_pushx(0.);} void hoc_class_registration(void) {} void hoc_execute1(void) { /* the ivoc version returns safely even if execerror */ hoc_exec_cmd(); } #if !defined(SOME_IV) /*ARGSUSED*/ int ivoc_list_look(Object* ob, Object* oblook, char* path, int depth) { return 0; } /*ARGSUSED*/ void hoc_obj_disconnect(Object* ob) {} /*ARGSUSED*/ void hoc_obj_notify(Object* ob) {} /*ARGSUSED*/ void hoc_template_notify(Object* ob, int create) {} #endif /*ARGSUSED*/ int hoc_readcheckpoint(char* f) { return 0; } /*ARGSUSED*/ int vector_arg_px(int i, double** p) { hoc_execerror("implemented in ivoc library", "vector_arg_px"); return 0; } int vector_capacity(void* v) {return 0;} void install_vector_method(const char* name, Pfrd_vp f) {} int vector_instance_px(void* vv, double** px){return 0;} void vector_resize(v, n) void* v; int n; { hoc_execerror("implemented in ivoc library", "vector_resize"); } void vector_append(void* vv, double x) {} void vector_delete(void* v) {} void* vector_arg(int i) { return (void*)0;} void* vector_new2(void* v) { return (void*)0;} Object** vector_pobj(void* v) { return (Object**)0;} double* vector_vec(void* v) { hoc_execerror("implemented in ivoc library", "vector_vec"); return (double*)0; } Object* ivoc_list_item(Object* list, int item) { hoc_execerror("implemented in ivoc library", "ivoc_list_item"); return (Object*)0; } int ivoc_list_count(list) Object* list; { return 0; } void bbs_done(void){} Symbol* ivoc_alias_lookup(const char* name, Object* ob) {return (Symbol*)0;} void ivoc_free_alias(Object* ob){} #if carbon || defined(MINGW) void stdin_event_ready(void) {} #endif void nrnbbs_context_wait(void) {} void ivoc_final_exit(void) {} char* cxx_char_alloc(size_t len) { return (char*)hoc_Emalloc(len); } neuron-7.5/src/oc/parallel.c000077500000000000000000000152101323325274500160330ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/parallel.c,v 1.5 1997/03/13 14:18:17 hines Exp */ #if MAC #define OCSMALL 1 #define WIN32 1 #endif #if !OCSMALL #include #if HAVE_UNISTD_H #include #endif #if defined(__APPLE__) #include #endif #include "hoc.h" #include "parse.h" /* OBJECTVAR */ static int parallel_seen; static double *pval; /* pointer to loop counter value */ static double end_val; /* value to assign loop counter upon completion of loop */ #define NUM_ARGS 256 static char *parallel_argv; static char *parallel_envp; static int sargv=0, senvp=0; #endif /*!OCSMALL*/ int parallel_sub=0; int parallel_val; /* for use with parallel neuron (see hoc.c) */ /* stack has final, initial, symbol and should contain these on exit in order to execute the following shortfor */ void hoc_parallel_begin(void) { #if !OCSMALL Symbol *sym; double first, last; char *method, *getenv(); int parallel_hoc_main(); int i, j; last = xpop(); first = xpop(); sym = spop(); pushs(sym); method = getenv("NEURON_PARALLEL_METHOD"); if (!method) { pushx(first); pushx(last); return; } if (parallel_seen++) { hoc_warning("Only one parallel loop per batch run allowed.", "This loop is being executed serially"); pushx(first); pushx(last); return; } if (!parallel_sub) { /* if 0 then master */ /* the master instance executes the following portion of the loop */ for (i = ((int)first)+1; i <= (int)last; i++) { char buf[10], *pnt = parallel_argv; /* increment pnt to "00000" */ for (j = 0; j < 2; j++) { /*EMPTY*/ while (*pnt++); } /* replace "00000" with actual value */ sprintf(buf, "%5d", i); strcpy(pnt, buf); /* farm-out all but the first instance of the loop */ #if LINDA /* place arguments for eval() into tuple space, Linda doesn't seem to want to let the fxn in an eval take arrays as args */ __linda_out("parallel sargs", sargv, senvp); __linda_out("parallel args", parallel_argv:sargv, parallel_envp:senvp); __linda_eval("parallel run", parallel_hoc_main(i), i); #endif } #if LINDA /* do first pass though loop on master node (first to first) */ pushx(first); pushx(first); #else /* run in serial if not LINDA */ pushx(first); pushx(last); #endif /* block until all instances of loop have finished */ #if LINDA i = (int)last - (int)first; while (i-- > 0) { int err_val, err_num; __linda_in("parallel run", ?err_val, ?err_num); /* could test err_val != 0 but currently will always equal 0 */ } #endif /* assign value of symbol to last+1 as would be upon exiting a serial loop */ if (!ISARRAY(sym)) { if (sym->subtype == USERDOUBLE) { pval = sym->u.pval; } else { pval = OPVAL(sym); } } else { if (sym->subtype == USERDOUBLE) { pval = sym->u.pval + araypt(sym, SYMBOL); } else { pval = OPVAL(sym) + araypt(sym, OBJECTVAR); } } end_val = last + 1; } else { /* the subsidiary instances do remaining contiguous blocks of the loop */ /* only do "parallel_val" pass though loop */ pushx((double)parallel_val); pushx((double)parallel_val); } #endif } void hoc_parallel_end(void) { #if !OCSMALL /* need to exit after for-loop for all sub-processes */ if (parallel_sub) { hoc_final_exit(); #if LINDA lexit(0); #else exit(0); #endif } else { /* assign loop counter the proper end value */ *pval = end_val; } #endif } int parallel_hoc_main(int i) { #if !OCSMALL /*ARGSUSED*/ const char **_largv, **_lenvp; const char* pnt; char *targv, *tenvp; int j, _largc; _largv = emalloc(NUM_ARGS*sizeof(char*)); _lenvp = emalloc(NUM_ARGS*sizeof(char*)); #if LINDA char name[20]; gethostname(name, 20); Fprintf(stderr, "\nLaunching sub-process on %s.\n\t1\n", name); __linda_in("parallel sargs", ?sargv, ?senvp); #endif targv = emalloc(sargv); tenvp = emalloc(senvp); /* pointers need to point to memory that will be filled by __linda_in() */ #if LINDA __linda_in("parallel args", ?targv:, ?tenvp:); #endif pnt = targv; for (j = 0; *pnt; j++) { _largv[j] = pnt; /*EMPTY*/ while (*pnt++); } _largc = j; pnt = tenvp; for (j = 0; *pnt; j++) { _lenvp[j] = pnt; /*EMPTY*/ while (*pnt++); } /* run is killed at end of parallel for-loop (hoc_parallel_end()) */ hoc_main1(_largc, _largv, _lenvp); #endif return 0; } void save_parallel_argv(int argc, const char** argv) { /* first arg is program, save 2 & 3 for -parallel flags */ #if !defined(WIN32) const char *pnt; int j; /* count how long the block of memory should be */ for (j = 0; j < argc && (strcmp(argv[j], "-") != 0); j++) { pnt = argv[j]; while (*pnt++) { sargv++; } sargv++; /* add room for '\0' */ } sargv += 16; /* add 10 for "-parallel" and 6 for val ("00000") */ /* need room for extra '\0' at end, each space is of size (char) */ sargv = (sargv + 1) * sizeof(char); /* malloc blocks of memory */ parallel_argv = emalloc(sargv); #if 0 /* place the strings into the memory block separated by '\0' */ strcpy((pnt = parallel_argv), argv[0]); /*EMPTY*/ while (*pnt++); strcpy(pnt, "-parallel 0"); /* pad val with 00000 (assume max int) */ pnt += 16; for (j = 1; j < argc && (strcmp(argv[j], "-") != 0); j++) { if (strcmp(argv[j], "-parallel") == 0) { /* if sub-process then get val, increment past "-parallel" and "val" */ parallel_sub = 1; parallel_val = atoi(argv[++j]); } else { strcpy(pnt, argv[j]); /*EMPTY*/ while (*pnt++); } } *pnt = '\0'; /* place extra '\0' at end */ #endif #endif } void save_parallel_envp(void) { #if LINDA #if !defined(__APPLE__) extern char** environ; char** envp = environ; #endif #if defined(__APPLE__) char** envp = (*_NSGetEnviron()); #endif char *pnt; int j; char** envp = environ; /* count how long the block of memory should be */ for (j = 0; envp[j]; j++) { pnt = envp[j]; while (*pnt++) { senvp++; } senvp++; /* add room for '\0' */ } /* need room for extra '\0' at end, each space is of size (char) */ senvp = (senvp + 1) * sizeof(char); /* malloc blocks of memory */ parallel_envp = emalloc(senvp); /* place the strings into the memory block separated by '\0' */ pnt = parallel_envp; for (j = 0; envp[j]; j++) { strcpy(pnt, envp[j]); /*EMPTY*/ while (*pnt++); } *pnt = '\0'; /* place extra '\0' at end */ #endif } neuron-7.5/src/oc/parse.c000066400000000000000000004721431323325274500153620ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Copy the first part of user declarations. */ #line 2 "../../../nrn/src/oc/parse.y" /* yacc.c:339 */ #include <../../nrnconf.h> /* changes as of 2-jan-89 */ /* version 7.2.1 2-jan-89 short form of the for statement */ #if AIX #pragma alloca #endif #include "hoc.h" #include "ocmisc.h" #include "hocparse.h" #include "code.h" #include "equation.h" #include "nrnfilewrap.h" #if LINT Inst *inlint; #define code inlint = Code #else #define code Code #endif #define paction(arg) fprintf(stderr, "%s\n", arg) /* maintain a list of ierr addresses so we can clear them */ #define HOCERRSIZE 20 static int** hoc_err; static int hoc_errp; static int localcnt; static void clean_err(void) { int i; for (i=0; i < hoc_errp; ++i) { *hoc_err[i] = 0; } hoc_errp = 0; } static void pusherr(int* ip) { if (!hoc_err) { hoc_err = (int**)ecalloc(HOCERRSIZE, sizeof(int*)); hoc_errp = 0; } if (hoc_errp >= HOCERRSIZE) { clean_err(); hoc_execerror("error stack full", (char*)0); } hoc_err[hoc_errp++] = ip; } static void yyerror(const char* s); #if YYBISON #define myerr(arg) static int ierr=0;\ if (!(ierr++)){pusherr(&ierr);yyerror(arg);} --yyssp; --yyvsp; YYERROR #else #define myerr(arg) static int ierr=0;\ if (!(ierr++)){pusherr(&ierr);yyerror(arg);} YYERROR #endif #define code2(c1,c2) code(c1); codein(c2) #define code3(c1,c2,c3) code(c1); codesym(c2); code(c3) #define relative(ip1,ip2,offset) ((ip1-ip2) - offset) #define CHECK 1 /* check syntactically the consistency of arrays */ #define NOCHECK 0 /* don't check syntactically. For object components */ #define PN pushi(NUMBER) /* for type checking. expressions are usually numbers */ #define TPD hoc_ob_check(NUMBER); #define TPDYNAM hoc_ob_check(0); static Inst *prog_error; /* needed for stmtlist loc if error */ static int ntab; /* auto indentation */ static Inst* argrefcode(Pfrv pfrv, int i, int j); static Inst* argcode(Pfrv pfrv, int i); static void hoc_opasgn_invalid(int op); #line 146 "parse.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { EQNEQ = 258, NUMBER = 259, STRING = 260, PRINT = 261, parseDELETE = 262, VAR = 263, BLTIN = 264, UNDEF = 265, WHILE = 266, IF = 267, ELSE = 268, FOR = 269, FUNCTION = 270, PROCEDURE = 271, RETURN = 272, FUNC = 273, parsePROC = 274, HOCOBJFUNC = 275, READ = 276, parseDOUBLE = 277, DEBUG = 278, EDIT = 279, FUN_BLTIN = 280, DEPENDENT = 281, EQUATION = 282, LOCAL = 283, HOCOBJFUNCTION = 284, BREAK = 285, CONTINUE = 286, AUTO = 287, STRDEF = 288, STOPSTMT = 289, CSTRING = 290, PARALLEL = 291, HELP = 292, ITERATOR = 293, ITERKEYWORD = 294, ITERSTMT = 295, STRINGFUNC = 296, OBJECTFUNC = 297, LOCALOBJ = 298, AUTOOBJ = 299, ARG = 300, NUMZERO = 301, ARGREF = 302, INTERNALSECTIONNAME = 303, SECTIONKEYWORD = 304, SECTION = 305, CONNECTKEYWORD = 306, ACCESSKEYWORD = 307, RANGEVAR = 308, MECHANISM = 309, INSERTKEYWORD = 310, FORALL = 311, NRNPNTVAR = 312, FORSEC = 313, IFSEC = 314, UNINSERTKEYWORD = 315, SETPOINTERKEYWORD = 316, SECTIONREF = 317, BEGINTEMPLATE = 318, ENDTEMPLATE = 319, NEW = 320, OBJECTVAR = 321, TEMPLATE = 322, OBJVARDECL = 323, PUBLICDECL = 324, EXTERNALDECL = 325, OBFUNCTION = 326, STRFUNCTION = 327, OBJECTARG = 328, STRINGARG = 329, ROP = 330, OR = 331, AND = 332, GT = 333, GE = 334, LT = 335, LE = 336, EQ = 337, NE = 338, UNARYMINUS = 339, NOT = 340 }; #endif /* Tokens. */ #define EQNEQ 258 #define NUMBER 259 #define STRING 260 #define PRINT 261 #define parseDELETE 262 #define VAR 263 #define BLTIN 264 #define UNDEF 265 #define WHILE 266 #define IF 267 #define ELSE 268 #define FOR 269 #define FUNCTION 270 #define PROCEDURE 271 #define RETURN 272 #define FUNC 273 #define parsePROC 274 #define HOCOBJFUNC 275 #define READ 276 #define parseDOUBLE 277 #define DEBUG 278 #define EDIT 279 #define FUN_BLTIN 280 #define DEPENDENT 281 #define EQUATION 282 #define LOCAL 283 #define HOCOBJFUNCTION 284 #define BREAK 285 #define CONTINUE 286 #define AUTO 287 #define STRDEF 288 #define STOPSTMT 289 #define CSTRING 290 #define PARALLEL 291 #define HELP 292 #define ITERATOR 293 #define ITERKEYWORD 294 #define ITERSTMT 295 #define STRINGFUNC 296 #define OBJECTFUNC 297 #define LOCALOBJ 298 #define AUTOOBJ 299 #define ARG 300 #define NUMZERO 301 #define ARGREF 302 #define INTERNALSECTIONNAME 303 #define SECTIONKEYWORD 304 #define SECTION 305 #define CONNECTKEYWORD 306 #define ACCESSKEYWORD 307 #define RANGEVAR 308 #define MECHANISM 309 #define INSERTKEYWORD 310 #define FORALL 311 #define NRNPNTVAR 312 #define FORSEC 313 #define IFSEC 314 #define UNINSERTKEYWORD 315 #define SETPOINTERKEYWORD 316 #define SECTIONREF 317 #define BEGINTEMPLATE 318 #define ENDTEMPLATE 319 #define NEW 320 #define OBJECTVAR 321 #define TEMPLATE 322 #define OBJVARDECL 323 #define PUBLICDECL 324 #define EXTERNALDECL 325 #define OBFUNCTION 326 #define STRFUNCTION 327 #define OBJECTARG 328 #define STRINGARG 329 #define ROP 330 #define OR 331 #define AND 332 #define GT 333 #define GE 334 #define LT 335 #define LE 336 #define EQ 337 #define NE 338 #define UNARYMINUS 339 #define NOT 340 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 82 "../../../nrn/src/oc/parse.y" /* yacc.c:355 */ /* stack type */ Symbol *sym; /* symbol table pointer */ Inst *inst; /* machine instruction */ int narg; /* number of arguments */ void* ptr; #line 363 "parse.c" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ /* Copy the second part of user declarations. */ #line 380 "parse.c" /* yacc.c:358 */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE # if (defined __GNUC__ \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C # define YY_ATTRIBUTE(Spec) __attribute__(Spec) # else # define YY_ATTRIBUTE(Spec) /* empty */ # endif #endif #ifndef YY_ATTRIBUTE_PURE # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) #endif #ifndef YY_ATTRIBUTE_UNUSED # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 2865 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 105 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 97 /* YYNRULES -- Number of rules. */ #define YYNRULES 280 /* YYNSTATES -- Number of states. */ #define YYNSTATES 545 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 340 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 93, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 89, 104, 2, 94, 95, 87, 85, 99, 86, 98, 88, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 102, 103, 2, 76, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96, 2, 97, 92, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 100, 2, 101, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 90, 91 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 138, 138, 139, 140, 141, 143, 145, 147, 149, 151, 155, 161, 161, 162, 172, 176, 178, 181, 185, 191, 197, 201, 201, 203, 205, 207, 209, 212, 217, 220, 221, 221, 231, 234, 235, 238, 239, 240, 241, 242, 244, 247, 249, 251, 253, 256, 266, 268, 271, 273, 278, 280, 285, 287, 290, 291, 293, 297, 299, 303, 305, 307, 320, 322, 323, 325, 327, 328, 330, 332, 334, 343, 347, 353, 355, 357, 359, 361, 363, 368, 379, 383, 378, 390, 394, 389, 402, 406, 410, 416, 415, 421, 424, 425, 427, 429, 431, 431, 434, 436, 438, 440, 442, 444, 447, 451, 456, 455, 464, 467, 463, 473, 472, 480, 479, 486, 485, 492, 491, 499, 498, 510, 515, 515, 521, 521, 523, 530, 531, 531, 541, 543, 545, 547, 550, 558, 560, 562, 562, 565, 567, 569, 571, 572, 578, 580, 584, 586, 589, 591, 594, 597, 600, 604, 607, 610, 611, 622, 623, 628, 630, 632, 634, 636, 639, 641, 645, 648, 649, 651, 653, 655, 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, 677, 679, 681, 683, 685, 687, 689, 691, 694, 695, 696, 697, 699, 702, 707, 710, 712, 715, 718, 721, 720, 727, 735, 770, 777, 778, 782, 784, 786, 788, 791, 796, 795, 802, 801, 808, 807, 814, 813, 820, 826, 827, 828, 829, 831, 831, 838, 839, 841, 843, 846, 848, 850, 851, 856, 859, 858, 864, 866, 869, 870, 872, 871, 876, 876, 881, 881, 886, 887, 889, 896, 908, 909, 911, 921, 932, 940, 940, 940, 940, 940, 940, 940, 940, 941, 941, 941, 941, 941, 941, 941, 942, 942, 942, 942, 942, 942, 943 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "EQNEQ", "NUMBER", "STRING", "PRINT", "parseDELETE", "VAR", "BLTIN", "UNDEF", "WHILE", "IF", "ELSE", "FOR", "FUNCTION", "PROCEDURE", "RETURN", "FUNC", "parsePROC", "HOCOBJFUNC", "READ", "parseDOUBLE", "DEBUG", "EDIT", "FUN_BLTIN", "DEPENDENT", "EQUATION", "LOCAL", "HOCOBJFUNCTION", "BREAK", "CONTINUE", "AUTO", "STRDEF", "STOPSTMT", "CSTRING", "PARALLEL", "HELP", "ITERATOR", "ITERKEYWORD", "ITERSTMT", "STRINGFUNC", "OBJECTFUNC", "LOCALOBJ", "AUTOOBJ", "ARG", "NUMZERO", "ARGREF", "INTERNALSECTIONNAME", "SECTIONKEYWORD", "SECTION", "CONNECTKEYWORD", "ACCESSKEYWORD", "RANGEVAR", "MECHANISM", "INSERTKEYWORD", "FORALL", "NRNPNTVAR", "FORSEC", "IFSEC", "UNINSERTKEYWORD", "SETPOINTERKEYWORD", "SECTIONREF", "BEGINTEMPLATE", "ENDTEMPLATE", "NEW", "OBJECTVAR", "TEMPLATE", "OBJVARDECL", "PUBLICDECL", "EXTERNALDECL", "OBFUNCTION", "STRFUNCTION", "OBJECTARG", "STRINGARG", "ROP", "'='", "OR", "AND", "GT", "GE", "LT", "LE", "EQ", "NE", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARYMINUS", "NOT", "'^'", "'\\n'", "'('", "')'", "'['", "']'", "'.'", "','", "'{'", "'}'", "':'", "';'", "'&'", "$accept", "list", "$@1", "asgn", "object", "$@2", "ob", "ob1", "$@3", "func_or_range_array_case", "template", "objvarlist", "objvarlst1", "obvarname", "publiclist", "externallist", "strnasgn", "string1", "string2", "strlist", "string", "stmt", "@4", "@5", "@6", "@7", "$@8", "$@9", "@10", "$@11", "@12", "@13", "@14", "@15", "@16", "@17", "iterator", "$@18", "section", "$@19", "section_or_ob", "@20", "sectiondecl", "sectionname", "rangevar", "rangevar1", "$@21", "pointer", "for_init", "for_st", "for_cond", "for_inc", "cond", "while", "if", "begin", "end", "stmtlist", "expr", "function", "doublelist", "newarray", "numdimen", "newname", "varname", "$@22", "wholearray", "argrefdim", "array", "prlist", "delsym", "defn", "$@23", "$@24", "$@25", "$@26", "procname", "procstmt", "$@27", "arglist", "arglist1", "arglist2", "eqn_list", "$@28", "dep_list", "equation", "$@29", "lhs", "$@30", "rhs", "$@31", "local", "local1", "localobj", "local2", "ckvar", "anyname", YY_NULLPTR }; #endif # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 61, 331, 332, 333, 334, 335, 336, 337, 338, 43, 45, 42, 47, 37, 339, 340, 94, 10, 40, 41, 91, 93, 46, 44, 123, 125, 58, 59, 38 }; # endif #define YYPACT_NINF -428 #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-428))) #define YYTABLE_NINF -157 #define yytable_value_is_error(Yytable_value) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { -428, 1136, -428, -428, -428, -428, 2125, 18, -428, -82, -428, -428, 17, -428, -428, 2180, 147, 147, 147, -62, -428, -27, -22, -428, 25, 25, -428, -428, -428, -428, -428, -428, -428, 24, -428, 147, -428, -428, -428, -428, 1, -428, -428, -428, -428, -428, 14, 74, -428, 26, -428, -428, -428, 27, 85, 2403, 2463, 929, -11, -428, 2463, 79, -428, -428, -428, -428, 2286, 2286, -428, 1962, -428, -4, -428, 1888, -57, 2, -428, -5, 7, -428, 19, 1032, 8, 22, 1694, -54, -428, -428, 29, 29, 2756, -428, 28, -39, 41, -428, -428, -428, -48, -428, -428, 23, -33, 2773, 40, -428, -428, -428, 2286, -428, 1398, 45, 106, -428, 51, 2463, -428, 2773, -428, -428, -428, -428, -428, -428, -428, -428, -428, 25, 138, -428, -428, -428, 49, 54, 57, -428, -428, -428, 2463, -428, 25, 65, -428, -428, 67, 73, 2286, 95, 77, 2463, -428, 80, 76, -13, -428, 82, -428, -428, -428, -428, 167, 167, -428, 83, 84, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 2286, 2463, -428, -428, 90, 90, -428, 2566, 1233, -428, -428, -428, 2773, 2070, 2463, -428, 2463, 169, -428, -428, 167, 2463, -428, 5, -428, 2286, 2286, 2286, 2286, 1888, 1888, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 2286, -428, 97, 138, 2015, 1307, -428, 2233, 2286, 2125, -428, 2585, -428, 89, -47, 186, 103, 1888, -13, 120, 1307, 105, 107, 109, 110, 111, -428, 104, -428, 25, -428, 1307, -428, -428, -428, -428, 116, 1307, 1307, 2773, 2286, 2286, 114, 104, -428, -428, -428, 2286, 2286, -428, -428, 1888, -428, -428, -428, -428, 152, 2286, -13, -428, 2482, 115, 104, -428, -428, -428, 1498, -428, 2463, -428, 2773, -428, -428, -428, -428, -428, -428, -428, -428, 2773, 666, 117, 2773, 2604, -428, -428, 277, 422, 101, 101, 101, 101, 101, 101, 12, 12, 90, 90, 90, 90, 1307, -428, -428, 2773, 2463, 261, -428, 2773, 123, 124, -428, 2623, -428, 2773, -428, -428, -428, -428, -428, 1307, -428, -428, 2286, 129, 1307, 130, 134, 135, -428, 2286, 139, -428, 0, 141, 144, 142, 143, 148, 2773, 2503, 2463, 139, 77, 2642, -55, 2773, -428, 1888, 1888, 1888, 1888, 2661, 145, -428, 2463, 139, -428, -428, -428, 151, -428, 171, 2286, 1791, 1888, -428, -428, 234, 153, 155, -428, -428, 3, -428, -428, -428, 1307, -428, 1888, 2286, 156, -428, 804, -428, 157, 150, 150, 150, 2524, 2286, -428, -428, -428, 252, 2286, -428, 2286, 150, -428, -428, -428, 104, -428, 2286, -428, -428, -428, -428, -428, 158, 261, 104, 1307, 162, 2286, 2680, -428, 165, -428, 1888, -428, 1307, -428, 2286, -428, -428, 2699, -428, 2286, -428, 233, -428, -428, -428, -428, 2545, -428, 2286, -428, -428, 2773, 2459, -428, 139, 2718, -428, -428, -428, -428, 261, -428, 139, 170, 1307, -428, 2773, 187, -428, -428, -428, 173, 2737, -428, -428, 2773, 2463, 227, 174, -428, 2773, 269, 2286, -428, -428, -428, 179, 2286, -428, -428, -428, 1888, 1888, -428, 2463, -428, 176, 2463, -428, 2773, -428, 765, -428, -428, -428, 1233, 2463, -428, -428, 1888, 2286, -428, -428, 1596, -428, -428, 2773, -428, -428 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { 2, 0, 1, 14, 160, 58, 0, 0, 154, 0, 147, 153, 154, 191, 154, 154, 0, 0, 0, 0, 154, 0, 0, 192, 0, 0, 154, 154, 154, 154, 154, 154, 56, 0, 12, 0, 154, 154, 154, 25, 163, 161, 207, 127, 154, 125, 129, 0, 138, 0, 154, 154, 154, 0, 154, 0, 0, 0, 0, 154, 0, 0, 193, 194, 24, 59, 0, 0, 3, 0, 90, 168, 30, 167, 29, 0, 66, 37, 38, 67, 0, 0, 64, 0, 0, 165, 136, 147, 0, 0, 0, 154, 65, 162, 0, 92, 168, 167, 29, 210, 55, 0, 165, 209, 78, 213, 69, 202, 0, 152, 0, 0, 123, 81, 0, 0, 70, 71, 258, 223, 224, 226, 225, 214, 222, 216, 220, 0, 0, 8, 9, 240, 237, 0, 0, 74, 76, 201, 0, 75, 0, 0, 218, 73, 0, 0, 0, 164, 206, 0, 154, 0, 0, 0, 100, 29, 99, 154, 101, 112, 0, 0, 102, 0, 0, 97, 40, 259, 260, 275, 261, 262, 263, 264, 277, 271, 278, 279, 280, 272, 265, 266, 274, 267, 273, 268, 269, 270, 276, 36, 39, 33, 154, 0, 0, 47, 49, 181, 190, 174, 0, 0, 5, 68, 155, 63, 0, 0, 11, 0, 0, 10, 54, 0, 0, 6, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 229, 4, 0, 0, 0, 154, 0, 146, 0, 162, 0, 0, 0, 0, 0, 229, 0, 0, 0, 0, 0, 195, 0, 200, 0, 238, 229, 60, 62, 84, 13, 0, 229, 229, 16, 0, 0, 93, 131, 135, 207, 126, 0, 0, 130, 139, 0, 118, 114, 120, 116, 0, 0, 0, 23, 0, 41, 42, 46, 173, 159, 0, 104, 0, 52, 20, 31, 48, 50, 53, 51, 61, 204, 137, 18, 0, 0, 148, 0, 155, 155, 189, 188, 182, 183, 184, 185, 186, 187, 175, 176, 177, 178, 179, 180, 229, 196, 21, 15, 0, 0, 233, 234, 0, 230, 231, 0, 212, 211, 203, 172, 145, 107, 109, 229, 155, 124, 0, 0, 229, 0, 0, 0, 171, 0, 197, 241, 246, 0, 0, 0, 0, 0, 17, 0, 0, 132, 205, 0, 0, 94, 155, 0, 0, 0, 0, 0, 0, 26, 0, 43, 157, 91, 158, 0, 154, 166, 0, 0, 0, 151, 87, 88, 0, 0, 144, 142, 0, 235, 140, 170, 0, 166, 0, 0, 0, 79, 0, 77, 0, 0, 0, 0, 0, 0, 248, 244, 239, 0, 0, 28, 0, 0, 57, 27, 208, 133, 128, 0, 113, 155, 155, 155, 155, 0, 0, 44, 229, 34, 0, 0, 150, 0, 155, 0, 169, 229, 143, 0, 232, 155, 0, 122, 0, 72, 250, 215, 217, 221, 198, 0, 243, 0, 246, 242, 247, 0, 219, 134, 0, 119, 115, 121, 117, 0, 98, 45, 0, 229, 32, 106, 0, 149, 80, 155, 0, 0, 108, 110, 82, 0, 254, 251, 199, 249, 0, 0, 95, 96, 19, 0, 0, 89, 236, 141, 0, 0, 252, 0, 227, 255, 0, 248, 85, 35, 0, 155, 155, 256, 0, 0, 253, 245, 0, 0, 111, 83, 0, 257, 155, 105, 228, 86 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -428, -428, -428, 276, -428, -428, -1, 4, -428, -428, -428, -428, -428, -113, -428, -428, -428, 420, 467, -428, 66, 270, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, -428, 44, -428, -428, -428, -428, -98, 9, -209, -428, -427, -428, 194, -428, -428, 193, -428, -428, 2355, -313, -248, 366, -428, -428, 46, -269, -428, 10, -428, -155, -428, 6, -428, -428, -428, -428, -428, -428, -428, 61, -298, -428, -251, -428, -129, -428, -428, -428, -428, -428, -190, -428, -235, -428, -428, -428, -428, -428, -127, -41 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 141, 96, 72, 192, 97, 98, 397, 491, 75, 76, 298, 299, 77, 78, 79, 203, 81, 82, 269, 395, 256, 518, 371, 535, 201, 295, 415, 416, 517, 288, 385, 387, 384, 386, 254, 255, 101, 150, 152, 153, 279, 280, 102, 86, 157, 410, 87, 109, 318, 401, 222, 88, 89, 282, 304, 303, 205, 91, 92, 263, 367, 264, 93, 247, 283, 147, 148, 104, 106, 94, 259, 260, 273, 261, 123, 468, 531, 345, 346, 347, 95, 369, 132, 429, 475, 430, 431, 473, 474, 503, 504, 521, 522, 124, 270 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 73, 265, 287, 427, 459, 74, 360, 315, 403, 404, 85, 378, 108, 314, 189, 190, 26, 370, 206, 195, 487, 218, 113, 373, 374, 8, 105, 244, 241, 38, 392, 39, 127, 8, 131, 133, 241, 296, 140, 440, 219, 207, 218, 216, 418, 84, 154, 242, 354, 29, 207, 155, 355, 57, 58, 242, 111, 29, 48, 510, 64, 245, 43, 164, 45, 43, 129, 45, 111, 111, 441, 130, 73, 43, 258, 45, 146, 74, 125, 126, 158, 162, 85, 73, 315, 193, 405, 196, 74, 202, 151, 156, 351, 85, 209, 208, 142, 460, 163, 234, 235, 236, 428, 26, 237, 417, 210, 214, 281, 73, 421, 110, 211, 265, 74, 215, 38, 84, 39, 85, 251, 216, 43, 221, 45, 469, 470, 240, 84, 482, 483, 484, 485, 43, 243, 45, 479, 262, 48, 246, 57, 58, 495, 252, 253, 257, 118, 64, 266, 499, 271, 268, 286, 300, 84, 118, 267, 155, 272, 289, 291, 274, 119, 120, 155, 155, 308, 275, 309, 480, 277, 111, 5, 278, 284, 285, 121, 310, 294, 488, 207, 293, 237, 514, 111, 122, 232, 233, 234, 235, 236, 337, 353, 237, 314, 359, 26, 356, 489, 361, 366, 362, 32, 363, 364, 48, 365, 497, 37, 38, 372, 39, 311, 377, 391, 537, 538, 155, 412, 433, 400, 73, 73, 413, 420, 422, 74, 74, 544, 423, 424, 85, 85, 57, 58, 426, 432, 434, 435, 512, 64, 65, 450, 436, 447, 449, 451, 456, 457, 458, 467, 464, 466, 73, 358, 476, 490, 486, 74, 155, 494, 502, 513, 85, 396, 511, 84, 84, 515, 8, 520, 83, 524, 523, 526, 532, 368, 71, 448, 438, 313, 220, 223, 539, 461, 507, 338, 73, 379, 534, 26, 0, 74, 29, 389, 0, 0, 85, 84, 155, 406, 0, 73, 38, 0, 39, 0, 74, 407, 43, 111, 45, 85, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 58, 381, 0, 0, 84, 0, 64, 0, 281, 0, 0, 0, 0, 408, 0, 204, 0, 0, 155, 84, 0, 0, 300, 409, 411, 0, 217, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 90, 0, 237, 0, 0, 103, 0, 0, 0, 0, 0, 0, 0, 250, 117, 0, 73, 73, 73, 73, 0, 74, 74, 74, 74, 0, 85, 85, 85, 85, 0, 0, 73, 73, 0, 0, 0, 74, 74, 0, 0, 0, 85, 85, 0, 0, 0, 73, 0, 0, 0, 0, 74, 0, 80, 0, 0, 85, 0, 99, 0, 84, 84, 84, 84, 197, 198, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 84, 84, 408, 0, 0, 0, 0, 155, 0, 0, 0, 73, 409, 411, 0, 84, 74, 519, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 100, 248, 0, 0, 0, 0, 530, 0, 0, 533, 0, 0, 408, 0, 0, 0, 0, 155, 540, 321, 322, 0, 409, 411, 0, 0, 0, 84, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 276, 0, 237, 0, 73, 73, 0, 0, 0, 74, 74, 0, 357, 0, 85, 85, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 73, 74, 0, 0, 0, 74, 85, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 297, 0, 84, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 307, 0, 0, 0, 0, 0, 0, 84, 290, 292, 0, 84, 316, 317, 319, 320, 0, 0, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 0, 0, 0, 340, 344, 0, 307, 348, 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344, 0, 0, 306, 100, 100, 0, 0, 0, 0, 312, 344, 0, 0, 0, 0, 0, 344, 344, 0, 375, 376, 0, 0, 0, 0, 0, 380, 382, 0, 0, 442, 443, 444, 445, 0, 0, 388, 0, 343, 0, 0, 0, 349, 0, 0, 0, 454, 455, 0, 100, 0, 0, 0, 343, 0, 0, 100, 0, 0, 0, 0, 462, 0, 0, 343, 0, 0, 0, 0, 0, 343, 343, 0, 0, 0, 0, 0, 0, 0, 344, 0, 0, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 344, 0, 100, 419, 496, 344, 0, 0, 0, 0, 425, 0, 0, 100, 0, 0, 0, 0, 0, 100, 100, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 343, 237, 0, 0, 398, 0, 0, 0, 452, 0, 0, 399, 0, 0, 0, 0, 0, 0, 0, 343, 0, 0, 344, 0, 343, 463, 0, 0, 0, 0, 528, 529, 0, 0, 0, 472, 0, 0, 0, 0, 477, 0, 478, 0, 0, 0, 0, 100, 541, 481, 0, 0, 0, 0, 0, 0, 0, 0, 344, 0, 492, 0, 0, 0, 0, 0, 100, 344, 0, 498, 0, 100, 0, 0, 501, 0, 343, 0, 0, 0, 0, 0, 0, 506, 0, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 344, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 536, 0, 343, 0, 0, 0, 0, 525, 0, 0, 0, 343, 527, 100, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 0, 0, 0, 542, 465, 0, 0, 0, 0, 0, 0, 343, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 191, 0, -22, -22, -22, -22, -22, -22, -22, 0, -22, -22, -22, -22, -22, -22, -22, 0, 0, 0, -22, -22, 0, 0, -22, -22, -22, 100, -22, -22, -22, -22, -22, -22, -22, -22, 0, 0, 0, -22, -22, -22, 0, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, -22, -22, -22, 0, 0, 0, 0, -22, -22, -22, 0, 0, -22, -22, -22, -22, -22, 0, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 0, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, 212, 0, 0, -55, -55, -55, -55, -55, -55, 0, -55, -55, -55, -55, -55, -55, -55, 0, 0, 0, -55, -55, 0, 0, -55, -55, -55, 0, -55, -55, -55, -55, -55, -55, -55, -55, 0, 0, 0, -55, -55, -55, 0, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, 0, -55, -55, 0, -55, -55, -55, -55, 0, 0, 0, 0, -55, -55, -55, 0, 0, -55, -55, -55, -55, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -55, 0, 0, 0, 0, -55, 0, -55, -55, -55, 0, 0, 0, 0, -55, -55, 0, -55, 2, 3, 0, 0, 4, 5, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 35, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 55, 56, 0, 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 68, 69, 0, 0, 0, 302, 0, 70, -156, -156, -156, -156, -156, -156, 0, -156, -156, 0, -156, -156, -156, -156, 0, 0, 0, -156, -156, 0, 0, -156, -156, -156, 0, -156, -156, -156, -156, -156, -156, -156, -156, 0, 0, 0, -156, -156, -156, 0, -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, 0, -156, -156, 0, -156, -156, -156, -156, 0, 0, 0, 0, -156, -156, -156, 0, 0, -156, -156, -156, -156, 0, 0, 0, 4, 5, 0, 0, 8, 9, 0, 0, -156, 0, 0, 13, 0, -156, 0, -156, -156, 19, 0, 0, 0, 23, -156, -156, 0, 26, 0, 0, 29, 0, 0, 32, 0, 0, 0, 0, 0, 37, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 57, 58, 0, 0, 0, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 0, 69, 4, 5, 6, 7, 8, 9, 0, 10, 11, 342, 12, 13, 14, 15, 0, 0, 0, 19, 20, 0, 0, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 0, 0, 0, 57, 58, 59, 0, 0, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 249, 4, 5, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, 19, 20, 0, 0, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 0, 0, 0, 57, 58, 59, 0, 0, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 393, 69, 0, 0, 0, 0, 0, 70, 394, 4, 5, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, 19, 20, 0, 0, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 0, 0, 0, 57, 58, 59, 0, 0, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 393, 69, 0, 0, 0, 0, 0, 70, 543, 4, 5, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, 19, 20, 0, 0, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 0, 0, 0, 57, 58, 59, 0, 0, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 0, 69, 0, 0, 0, 216, 0, 70, 4, 5, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, 19, 20, 0, 0, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 0, 0, 0, 57, 58, 59, 0, 0, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 0, 69, 453, 0, 0, 0, 0, 70, 4, 5, 6, 7, 8, 9, 0, 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, 19, 20, 0, 0, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, 0, 51, 52, 53, 54, 0, 0, 0, 0, 57, 58, 59, 0, 0, 62, 63, 64, 65, 199, 0, 0, 4, 0, 0, 0, 8, 9, 0, 0, 66, 0, 0, 13, 0, 67, 0, 0, 69, 19, 0, 0, 0, 23, 70, 0, 0, 26, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 339, 0, 0, 4, 0, 0, 0, 8, 9, 0, 0, 0, 57, 58, 13, 0, 0, 62, 63, 64, 19, 0, 0, 0, 23, 0, 0, 0, 26, 0, 0, 29, 66, 0, 0, 0, 0, 67, 0, 0, 69, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 0, 0, 4, 5, 0, 0, 8, 9, 0, 57, 58, 0, 0, 13, 62, 63, 64, 0, 0, 19, 0, 0, 0, 23, 0, 0, 0, 26, 0, 66, 29, 0, 0, 32, 67, 0, 0, 69, 0, 37, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 0, 0, 4, 5, 0, 0, 8, 9, 305, 57, 58, 0, 0, 13, 62, 63, 64, 65, 0, 19, 0, 0, 0, 23, 0, 0, 0, 26, 0, 66, 29, 0, 0, 32, 67, 0, 0, 69, 0, 37, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 0, 0, 4, 0, 0, 0, 8, 9, 0, 57, 58, 0, 0, 13, 62, 63, 64, 65, 0, 19, 0, 0, 0, 23, 0, 0, 0, 26, 0, 66, 29, 0, 0, 0, 67, 0, 0, 69, 0, 0, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 4, 0, 0, 0, 8, 9, 0, 0, 115, 57, 58, 13, 0, 0, 62, 63, 64, 19, 0, 0, 0, 23, 0, 0, 0, 26, 0, 0, 29, 66, 0, 0, 0, 0, 67, 0, 0, 69, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 4, 0, 0, 0, 8, 9, 0, 0, 305, 57, 58, 13, 0, 0, 62, 63, 64, 19, 0, 0, 0, 23, 0, 0, 0, 26, 0, 0, 29, 66, 0, 0, 0, 0, 67, 0, 0, 69, 38, 0, 39, 40, 41, 42, 43, 0, 45, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 58, 0, 0, 0, 62, 63, 64, 0, 0, 0, 107, 0, 0, 0, 112, 0, 114, 116, 0, 66, 0, 0, 128, 0, 67, 0, 0, 69, 134, 135, 136, 137, 138, 139, 0, 0, 0, 0, 143, 144, 145, 0, 0, 0, 0, 0, 149, 0, 0, 0, 0, 166, 159, 160, 161, 167, 165, 0, 168, 169, 170, 194, 0, 0, 0, 171, 172, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 174, 0, 0, 175, 0, 0, 0, 0, 0, 176, 0, 0, 177, 178, 239, 179, 0, 0, 0, 0, 0, 180, 0, 0, 181, 182, 0, 0, 183, 0, 0, 0, 0, 184, 0, 0, 167, 185, 186, 168, 169, 170, 187, 188, 0, 0, 171, 172, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 174, 0, 0, 175, 0, 0, 0, 0, 0, 176, 0, 0, 177, 178, 0, 179, 0, 0, 0, 0, 0, 180, 0, 0, 181, 182, 0, 0, 183, 0, 0, 0, 0, 184, 0, 0, 0, 185, 186, 0, 0, 0, 187, 188, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 0, 0, 0, 0, 508, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 0, 0, 390, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 0, 0, 437, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 0, 0, 471, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 0, 0, 505, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 301, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 352, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 402, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 414, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 439, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 446, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 493, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 500, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 509, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 0, 0, 516, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237, 238, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 0, 0, 237 }; static const yytype_int16 yycheck[] = { 1, 128, 157, 3, 1, 1, 257, 216, 321, 322, 1, 280, 94, 8, 55, 56, 29, 268, 75, 60, 447, 75, 12, 274, 275, 8, 8, 75, 75, 42, 299, 44, 94, 8, 24, 25, 75, 192, 14, 94, 94, 98, 75, 98, 357, 1, 47, 94, 95, 32, 98, 47, 99, 66, 67, 94, 12, 32, 53, 486, 73, 94, 48, 54, 50, 48, 93, 50, 24, 25, 383, 93, 73, 48, 115, 50, 75, 73, 17, 18, 54, 54, 73, 84, 293, 96, 337, 8, 84, 93, 46, 47, 247, 84, 99, 93, 35, 94, 54, 87, 88, 89, 102, 29, 92, 356, 99, 99, 149, 110, 361, 94, 93, 240, 110, 93, 42, 73, 44, 110, 110, 98, 48, 94, 50, 423, 424, 99, 84, 442, 443, 444, 445, 48, 93, 50, 434, 127, 53, 99, 66, 67, 455, 98, 38, 94, 8, 73, 99, 462, 140, 94, 153, 194, 110, 8, 102, 153, 93, 160, 161, 94, 15, 16, 160, 161, 207, 94, 209, 438, 75, 127, 5, 96, 94, 99, 29, 8, 94, 448, 98, 98, 92, 496, 140, 38, 85, 86, 87, 88, 89, 94, 103, 92, 8, 75, 29, 94, 449, 94, 96, 94, 35, 94, 94, 53, 95, 458, 41, 42, 94, 44, 213, 99, 99, 528, 529, 213, 95, 75, 103, 222, 223, 99, 95, 95, 222, 223, 541, 95, 95, 222, 223, 66, 67, 96, 95, 95, 95, 490, 73, 74, 397, 95, 99, 94, 75, 13, 95, 94, 100, 95, 95, 254, 255, 3, 94, 99, 254, 255, 95, 28, 75, 254, 305, 95, 222, 223, 95, 8, 43, 1, 3, 99, 95, 99, 266, 1, 391, 377, 214, 87, 89, 531, 413, 475, 240, 288, 282, 524, 29, -1, 288, 32, 295, -1, -1, 288, 254, 295, 341, -1, 303, 42, -1, 44, -1, 303, 47, 48, 266, 50, 303, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 285, -1, -1, 288, -1, 73, -1, 377, -1, -1, -1, -1, 342, -1, 73, -1, -1, 342, 303, -1, -1, 391, 342, 342, -1, 84, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 1, -1, 92, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, 110, 15, -1, 384, 385, 386, 387, -1, 384, 385, 386, 387, -1, 384, 385, 386, 387, -1, -1, 400, 401, -1, -1, -1, 400, 401, -1, -1, -1, 400, 401, -1, -1, -1, 415, -1, -1, -1, -1, 415, -1, 1, -1, -1, 415, -1, 6, -1, 384, 385, 386, 387, 66, 67, -1, 69, -1, -1, -1, -1, -1, -1, -1, -1, 400, 401, 447, -1, -1, -1, -1, 447, -1, -1, -1, 456, 447, 447, -1, 415, 456, 502, -1, -1, -1, 456, -1, -1, -1, -1, -1, -1, -1, 6, 108, -1, -1, -1, -1, 520, -1, -1, 523, -1, -1, 486, -1, -1, -1, -1, 486, 532, 222, 223, -1, 486, 486, -1, -1, -1, 456, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 146, -1, 92, -1, 517, 518, -1, -1, -1, 517, 518, -1, 254, -1, 517, 518, -1, -1, -1, -1, -1, -1, 535, -1, -1, -1, 539, 535, -1, -1, -1, 539, 535, -1, -1, -1, 539, -1, -1, -1, -1, -1, -1, -1, -1, -1, 288, 193, -1, 517, 518, -1, -1, -1, -1, -1, -1, -1, -1, -1, 206, -1, -1, -1, -1, -1, -1, 535, 160, 161, -1, 539, 218, 219, 220, 221, -1, -1, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, -1, -1, -1, 241, 242, -1, 244, 245, 246, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, -1, -1, 206, 160, 161, -1, -1, -1, -1, 213, 268, -1, -1, -1, -1, -1, 274, 275, -1, 277, 278, -1, -1, -1, -1, -1, 284, 285, -1, -1, 384, 385, 386, 387, -1, -1, 294, -1, 242, -1, -1, -1, 246, -1, -1, -1, 400, 401, -1, 206, -1, -1, -1, 257, -1, -1, 213, -1, -1, -1, -1, 415, -1, -1, 268, -1, -1, -1, -1, -1, 274, 275, -1, -1, -1, -1, -1, -1, -1, 337, -1, -1, -1, -1, -1, 242, -1, -1, -1, 246, -1, -1, -1, -1, -1, -1, -1, -1, 356, -1, 257, 359, 456, 361, -1, -1, -1, -1, 366, -1, -1, 268, -1, -1, -1, -1, -1, 274, 275, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, 337, 92, -1, -1, 95, -1, -1, -1, 399, -1, -1, 102, -1, -1, -1, -1, -1, -1, -1, 356, -1, -1, 413, -1, 361, 416, -1, -1, -1, -1, 517, 518, -1, -1, -1, 426, -1, -1, -1, -1, 431, -1, 433, -1, -1, -1, -1, 337, 535, 440, -1, -1, -1, -1, -1, -1, -1, -1, 449, -1, 451, -1, -1, -1, -1, -1, 356, 458, -1, 460, -1, 361, -1, -1, 465, -1, 413, -1, -1, -1, -1, -1, -1, 474, -1, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, 490, 92, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, -1, 449, -1, -1, -1, -1, 508, -1, -1, -1, 458, 513, 413, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, -1, -1, -1, 536, 99, -1, -1, -1, -1, -1, -1, 490, -1, -1, -1, -1, -1, 449, -1, -1, -1, -1, -1, -1, -1, -1, 458, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, 490, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 1, -1, -1, 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, 93, 94, 95, -1, -1, -1, -1, 100, 101, -1, 103, 0, 1, -1, -1, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, 63, 64, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, 93, 94, -1, -1, -1, 1, -1, 100, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, -1, -1, -1, 4, 5, -1, -1, 8, 9, -1, -1, 86, -1, -1, 15, -1, 91, -1, 93, 94, 21, -1, -1, -1, 25, 100, 101, -1, 29, -1, -1, 32, -1, -1, 35, -1, -1, -1, -1, -1, 41, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, -1, -1, -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, -1, 94, 4, 5, 6, 7, 8, 9, -1, 11, 12, 104, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, -1, 94, -1, -1, -1, -1, -1, 100, -1, -1, 103, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, 93, 94, -1, -1, -1, -1, -1, 100, 101, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, 93, 94, -1, -1, -1, -1, -1, 100, 101, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, -1, 94, -1, -1, -1, 98, -1, 100, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, -1, 94, 95, -1, -1, -1, -1, 100, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 15, 16, 17, -1, -1, -1, 21, 22, -1, -1, 25, 26, 27, -1, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, -1, 40, 41, 42, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 55, 56, -1, 58, 59, 60, 61, -1, -1, -1, -1, 66, 67, 68, -1, -1, 71, 72, 73, 74, 1, -1, -1, 4, -1, -1, -1, 8, 9, -1, -1, 86, -1, -1, 15, -1, 91, -1, -1, 94, 21, -1, -1, -1, 25, 100, -1, -1, 29, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, 1, -1, -1, 4, -1, -1, -1, 8, 9, -1, -1, -1, 66, 67, 15, -1, -1, 71, 72, 73, 21, -1, -1, -1, 25, -1, -1, -1, 29, -1, -1, 32, 86, -1, -1, -1, -1, 91, -1, -1, 94, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, 4, 5, -1, -1, 8, 9, -1, 66, 67, -1, -1, 15, 71, 72, 73, -1, -1, 21, -1, -1, -1, 25, -1, -1, -1, 29, -1, 86, 32, -1, -1, 35, 91, -1, -1, 94, -1, 41, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, 4, 5, -1, -1, 8, 9, 65, 66, 67, -1, -1, 15, 71, 72, 73, 74, -1, 21, -1, -1, -1, 25, -1, -1, -1, 29, -1, 86, 32, -1, -1, 35, 91, -1, -1, 94, -1, 41, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, 4, -1, -1, -1, 8, 9, -1, 66, 67, -1, -1, 15, 71, 72, 73, 74, -1, 21, -1, -1, -1, 25, -1, -1, -1, 29, -1, 86, 32, -1, -1, -1, 91, -1, -1, 94, -1, -1, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, 4, -1, -1, -1, 8, 9, -1, -1, 65, 66, 67, 15, -1, -1, 71, 72, 73, 21, -1, -1, -1, 25, -1, -1, -1, 29, -1, -1, 32, 86, -1, -1, -1, -1, 91, -1, -1, 94, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, 4, -1, -1, -1, 8, 9, -1, -1, 65, 66, 67, 15, -1, -1, 71, 72, 73, 21, -1, -1, -1, 25, -1, -1, -1, 29, -1, -1, 32, 86, -1, -1, -1, -1, 91, -1, -1, 94, 42, -1, 44, 45, 46, 47, 48, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, -1, -1, -1, 71, 72, 73, -1, -1, -1, 8, -1, -1, -1, 12, -1, 14, 15, -1, 86, -1, -1, 20, -1, 91, -1, -1, 94, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 36, 37, 38, -1, -1, -1, -1, -1, 44, -1, -1, -1, -1, 1, 50, 51, 52, 5, 54, -1, 8, 9, 10, 59, -1, -1, -1, 15, 16, -1, -1, -1, -1, -1, -1, -1, -1, 25, -1, -1, -1, 29, -1, -1, 32, -1, -1, -1, -1, -1, 38, -1, -1, 41, 42, 91, 44, -1, -1, -1, -1, -1, 50, -1, -1, 53, 54, -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 5, 66, 67, 8, 9, 10, 71, 72, -1, -1, 15, 16, -1, -1, -1, -1, -1, -1, -1, -1, 25, -1, -1, -1, 29, -1, -1, 32, -1, -1, -1, -1, -1, 38, -1, -1, 41, 42, -1, 44, -1, -1, -1, -1, -1, 50, -1, -1, 53, 54, -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, -1, 66, 67, -1, -1, -1, 71, 72, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, -1, -1, -1, -1, 99, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, -1, -1, 97, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, -1, -1, 97, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, -1, -1, 97, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, -1, -1, 97, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, -1, -1, 95, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92, 93, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, -1, 92 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 106, 0, 1, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 58, 59, 60, 61, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 86, 91, 93, 94, 100, 108, 109, 111, 112, 115, 116, 119, 120, 121, 122, 123, 124, 126, 143, 149, 150, 153, 158, 159, 163, 164, 165, 169, 176, 187, 108, 111, 112, 122, 123, 143, 149, 163, 174, 8, 175, 160, 94, 154, 94, 143, 160, 169, 160, 65, 160, 163, 8, 15, 16, 29, 38, 181, 200, 181, 181, 94, 160, 93, 93, 169, 189, 169, 160, 160, 160, 160, 160, 160, 14, 107, 181, 160, 160, 160, 75, 172, 173, 160, 144, 143, 145, 146, 111, 112, 143, 151, 54, 160, 160, 160, 54, 143, 149, 160, 1, 5, 8, 9, 10, 15, 16, 25, 29, 32, 38, 41, 42, 44, 50, 53, 54, 57, 62, 66, 67, 71, 72, 201, 201, 1, 110, 96, 160, 201, 8, 163, 163, 1, 163, 131, 93, 122, 126, 163, 75, 98, 93, 99, 99, 93, 1, 75, 99, 93, 98, 126, 75, 94, 154, 94, 157, 157, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 160, 99, 75, 94, 93, 75, 94, 99, 170, 163, 103, 126, 169, 98, 38, 141, 142, 127, 94, 201, 177, 178, 180, 169, 166, 168, 200, 99, 102, 94, 125, 201, 169, 93, 179, 94, 94, 163, 75, 96, 147, 148, 201, 160, 171, 94, 99, 111, 171, 136, 111, 122, 111, 122, 98, 94, 132, 171, 163, 117, 118, 201, 95, 1, 162, 161, 65, 122, 163, 201, 201, 8, 111, 122, 125, 8, 150, 163, 163, 155, 163, 163, 126, 126, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 94, 166, 1, 163, 65, 104, 122, 163, 184, 185, 186, 163, 122, 163, 171, 95, 103, 95, 99, 94, 126, 111, 75, 184, 94, 94, 94, 94, 95, 96, 167, 169, 188, 184, 129, 94, 184, 184, 163, 163, 99, 167, 173, 163, 143, 163, 126, 139, 137, 140, 138, 163, 111, 97, 99, 167, 93, 101, 126, 201, 113, 95, 102, 103, 156, 95, 161, 161, 184, 201, 47, 111, 149, 152, 169, 95, 99, 95, 133, 134, 184, 161, 163, 95, 184, 95, 95, 95, 163, 96, 3, 102, 190, 192, 193, 95, 75, 95, 95, 95, 97, 148, 95, 94, 161, 126, 126, 126, 126, 95, 99, 118, 94, 171, 75, 163, 95, 126, 126, 13, 95, 94, 1, 94, 186, 126, 163, 95, 99, 95, 100, 182, 182, 182, 97, 163, 194, 195, 191, 3, 163, 163, 182, 167, 163, 161, 161, 161, 161, 99, 152, 167, 184, 94, 114, 163, 95, 95, 161, 126, 184, 163, 161, 95, 163, 28, 196, 197, 97, 163, 192, 99, 95, 152, 95, 184, 75, 161, 95, 95, 135, 128, 201, 43, 198, 199, 99, 3, 163, 95, 163, 126, 126, 201, 183, 99, 201, 194, 130, 102, 161, 161, 162, 201, 126, 163, 101, 161 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 107, 106, 106, 108, 108, 108, 108, 108, 108, 108, 110, 109, 109, 109, 109, 109, 109, 111, 112, 113, 112, 112, 114, 114, 115, 115, 115, 115, 115, 116, 117, 117, 117, 117, 118, 119, 119, 120, 120, 121, 121, 121, 121, 122, 122, 122, 123, 123, 124, 124, 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 128, 126, 129, 130, 126, 126, 126, 126, 131, 126, 126, 126, 126, 126, 126, 132, 126, 126, 126, 126, 126, 126, 126, 126, 126, 133, 126, 134, 135, 126, 136, 126, 137, 126, 138, 126, 139, 126, 140, 126, 141, 142, 141, 144, 143, 143, 145, 146, 145, 147, 147, 147, 147, 148, 149, 149, 151, 150, 152, 152, 152, 152, 152, 153, 153, 154, 155, 156, 156, 157, 158, 159, 160, 161, 162, 162, 162, 162, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 164, 164, 164, 164, 165, 165, 166, 167, 167, 168, 169, 170, 169, 169, 171, 172, 173, 173, 174, 174, 174, 174, 175, 177, 176, 178, 176, 179, 176, 180, 176, 181, 181, 181, 181, 181, 183, 182, 184, 184, 185, 185, 186, 186, 186, 186, 187, 188, 187, 189, 189, 190, 190, 191, 190, 193, 192, 195, 194, 196, 196, 197, 197, 198, 198, 199, 199, 200, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 2, 3, 3, 4, 3, 7, 3, 3, 0, 3, 1, 1, 4, 5, 5, 1, 1, 0, 6, 2, 0, 3, 2, 1, 1, 2, 2, 3, 1, 2, 3, 4, 1, 2, 3, 2, 3, 3, 3, 3, 2, 1, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 6, 2, 2, 2, 2, 5, 2, 5, 6, 0, 0, 10, 0, 0, 11, 4, 4, 7, 0, 4, 1, 3, 4, 7, 7, 0, 6, 2, 2, 2, 2, 2, 3, 10, 6, 0, 7, 0, 0, 10, 0, 5, 0, 6, 0, 6, 0, 6, 0, 6, 4, 0, 2, 0, 3, 1, 4, 0, 2, 1, 2, 3, 4, 1, 1, 3, 0, 3, 1, 4, 1, 2, 1, 4, 3, 0, 1, 3, 2, 3, 2, 1, 0, 0, 0, 2, 2, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 5, 4, 4, 4, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 3, 3, 2, 3, 4, 1, 2, 0, 4, 3, 2, 1, 0, 4, 1, 1, 3, 3, 1, 0, 6, 0, 6, 0, 6, 0, 6, 1, 1, 1, 1, 1, 0, 6, 0, 1, 1, 3, 1, 1, 2, 5, 2, 0, 5, 1, 3, 2, 2, 0, 5, 0, 2, 0, 2, 0, 1, 2, 3, 0, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*----------------------------------------. | Print this symbol's value on YYOUTPUT. | `----------------------------------------*/ static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T yystrlen (const char *yystr) { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: 'yyss': related to states. 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 138 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ntab = 0;} #line 2328 "parse.c" /* yacc.c:1646 */ break; case 3: #line 139 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { return '\n';} #line 2334 "parse.c" /* yacc.c:1646 */ break; case 4: #line 140 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { return '\n';} #line 2340 "parse.c" /* yacc.c:1646 */ break; case 5: #line 142 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { hoc_ob_check(-1); code2(nopop, STOP); return 1; } #line 2346 "parse.c" /* yacc.c:1646 */ break; case 6: #line 144 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { codein(STOP); return 1; } #line 2352 "parse.c" /* yacc.c:1646 */ break; case 7: #line 146 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPDYNAM; code2(print, STOP); return 1; } #line 2358 "parse.c" /* yacc.c:1646 */ break; case 8: #line 148 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { debug(); return '\n';} #line 2364 "parse.c" /* yacc.c:1646 */ break; case 9: #line 150 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { return 'e';} #line 2370 "parse.c" /* yacc.c:1646 */ break; case 10: #line 152 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(prstr); code2(hoc_newline, STOP); return 1; } #line 2376 "parse.c" /* yacc.c:1646 */ break; case 11: #line 155 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { return '\n';} #line 2382 "parse.c" /* yacc.c:1646 */ break; case 12: #line 161 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_help();} #line 2388 "parse.c" /* yacc.c:1646 */ break; case 13: #line 161 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { return '\n'; } #line 2394 "parse.c" /* yacc.c:1646 */ break; case 14: #line 163 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {clean_err(); hoc_execerror("parse error", (char*)0); #if LINT if (0) { if(yydebug); goto yynewstate; } #endif } #line 2407 "parse.c" /* yacc.c:1646 */ break; case 15: #line 173 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; TPD; s = spop(); hoc_obvar_declare(s, VAR, 1); code3(varpush, s, assign); codei((yyvsp[-1].narg)); PN;} #line 2415 "parse.c" /* yacc.c:1646 */ break; case 16: #line 177 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; defnonly("$"); argcode(argassign, (yyvsp[-2].narg)); codei((yyvsp[-1].narg)); (yyval.inst)=(yyvsp[0].inst); PN;} #line 2421 "parse.c" /* yacc.c:1646 */ break; case 17: #line 179 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; defnonly("$&"); argrefcode(hoc_argrefasgn, (yyvsp[-3].narg), (yyvsp[-2].narg)); codei((yyvsp[-1].narg)); (yyval.inst)=(yyvsp[0].inst); PN;} #line 2427 "parse.c" /* yacc.c:1646 */ break; case 18: #line 182 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; code(range_const); codesym(spop()); codei((yyvsp[-1].narg)); PN;} #line 2433 "parse.c" /* yacc.c:1646 */ break; case 19: #line 186 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Inst* p; hoc_opasgn_invalid((yyvsp[-5].narg)); code(hoc_newobj); codesym(hoc_which_template((yyvsp[-3].sym))); codei((yyvsp[-1].narg)); p = (Inst*)spop(); if (p) { p->i += 2; } } #line 2443 "parse.c" /* yacc.c:1646 */ break; case 20: #line 192 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Inst* p; TPDYNAM; code(hoc_object_asgn); codei((yyvsp[-1].narg)); p = (Inst*)spop(); if (p) { p->i += 2; } } #line 2452 "parse.c" /* yacc.c:1646 */ break; case 21: #line 197 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("assignment to variable, make sure right side is a number");} #line 2458 "parse.c" /* yacc.c:1646 */ break; case 22: #line 201 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {pushi(OBJECTVAR);pushs((yyvsp[0].sym)); pushi(CHECK);} #line 2464 "parse.c" /* yacc.c:1646 */ break; case 23: #line 202 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = (yyvsp[0].inst); code(hoc_objectvar); spop(); codesym((yyvsp[-2].sym));} #line 2470 "parse.c" /* yacc.c:1646 */ break; case 24: #line 204 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {defnonly("$o"); (yyval.inst) = argcode(hoc_objectarg, (yyvsp[0].narg)); pushi(OBJECTVAR);} #line 2476 "parse.c" /* yacc.c:1646 */ break; case 25: #line 206 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = code(hoc_autoobject); codesym((yyvsp[0].sym)); pushi(OBJECTVAR);} #line 2482 "parse.c" /* yacc.c:1646 */ break; case 26: #line 208 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {TPD; (yyval.inst) = (yyvsp[-1].inst); code(hoc_constobject); codesym((yyvsp[-3].sym)); pushi(OBJECTVAR);} #line 2488 "parse.c" /* yacc.c:1646 */ break; case 27: #line 210 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); code(call); codesym((yyvsp[-4].sym)); codei((yyvsp[-1].narg)); code(hoc_known_type); codei(OBJECTVAR); pushi(OBJECTVAR);} #line 2495 "parse.c" /* yacc.c:1646 */ break; case 28: #line 213 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); code(call); codesym((yyvsp[-4].sym)); codei((yyvsp[-1].narg)); code(hoc_known_type); codei(OBJECTVAR); pushi(OBJECTVAR);} #line 2502 "parse.c" /* yacc.c:1646 */ break; case 29: #line 217 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { spop(); } #line 2508 "parse.c" /* yacc.c:1646 */ break; case 30: #line 220 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { pushs((Symbol*)0); } #line 2514 "parse.c" /* yacc.c:1646 */ break; case 31: #line 221 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {pushs((yyvsp[0].sym));pushi(NOCHECK);} #line 2520 "parse.c" /* yacc.c:1646 */ break; case 32: #line 222 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {int isfunc; Inst* p; isfunc = ipop(); code(hoc_object_component); codesym(spop()); codei(ipop()); codei((yyvsp[0].narg)); codei(0); codesym(0); p = codei(isfunc); /* for USE_PYTHON */ spop(); pushs((Symbol*)p); /* in case assigning to a PythonObject we will want to update isfunc to 2 */ } #line 2534 "parse.c" /* yacc.c:1646 */ break; case 33: #line 231 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("object syntax is o1.o2.o3.");} #line 2540 "parse.c" /* yacc.c:1646 */ break; case 34: #line 234 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.narg) = 0; pushi(0);} #line 2546 "parse.c" /* yacc.c:1646 */ break; case 35: #line 236 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.narg) = (yyvsp[-1].narg); pushi(1);} #line 2552 "parse.c" /* yacc.c:1646 */ break; case 36: #line 238 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_begintemplate((yyvsp[0].sym));} #line 2558 "parse.c" /* yacc.c:1646 */ break; case 39: #line 241 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_endtemplate((yyvsp[0].sym));} #line 2564 "parse.c" /* yacc.c:1646 */ break; case 40: #line 242 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("begintemplate Name\npublic namelist\nexternal namelist\n...\nendtemplate Name");} #line 2570 "parse.c" /* yacc.c:1646 */ break; case 41: #line 245 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = (yyvsp[-1].inst);} #line 2576 "parse.c" /* yacc.c:1646 */ break; case 42: #line 248 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_objvardecl); codesym((yyvsp[0].sym)); codei(0);} #line 2582 "parse.c" /* yacc.c:1646 */ break; case 43: #line 250 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_objvardecl); codesym((yyvsp[-1].sym)); codei((yyvsp[0].narg));} #line 2588 "parse.c" /* yacc.c:1646 */ break; case 44: #line 252 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_objvardecl); codesym((yyvsp[0].sym)); codei(0);} #line 2594 "parse.c" /* yacc.c:1646 */ break; case 45: #line 254 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_objvardecl); codesym((yyvsp[-1].sym)); codei((yyvsp[0].narg));} #line 2600 "parse.c" /* yacc.c:1646 */ break; case 46: #line 257 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol* s; s = hoc_decl((yyvsp[0].sym)); if (s->type != UNDEF && s->type != OBJECTVAR) { acterror(s->name, " already declared"); } (yyval.sym) = s; } #line 2613 "parse.c" /* yacc.c:1646 */ break; case 47: #line 267 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_add_publiclist((yyvsp[0].sym));} #line 2619 "parse.c" /* yacc.c:1646 */ break; case 48: #line 269 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_add_publiclist((yyvsp[0].sym));} #line 2625 "parse.c" /* yacc.c:1646 */ break; case 49: #line 272 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_external_var((yyvsp[0].sym));} #line 2631 "parse.c" /* yacc.c:1646 */ break; case 50: #line 274 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_external_var((yyvsp[0].sym));} #line 2637 "parse.c" /* yacc.c:1646 */ break; case 51: #line 279 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_opasgn_invalid((yyvsp[-1].narg)); code(assstr);} #line 2643 "parse.c" /* yacc.c:1646 */ break; case 52: #line 281 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Inst* p = (Inst*) spop(); pushi(STRING); TPDYNAM; code(hoc_object_asgn); hoc_opasgn_invalid((yyvsp[-1].narg)); codei((yyvsp[-1].narg)); hoc_ob_check(-1); code(nopop); if (p) { p->i += 2; } } #line 2652 "parse.c" /* yacc.c:1646 */ break; case 53: #line 286 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_asgn_obj_to_str); hoc_opasgn_invalid((yyvsp[-1].narg)); } #line 2658 "parse.c" /* yacc.c:1646 */ break; case 54: #line 287 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("string assignment: both sides need to be a string");} #line 2664 "parse.c" /* yacc.c:1646 */ break; case 56: #line 292 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = code(hoc_push_string); codesym((yyvsp[0].sym));} #line 2670 "parse.c" /* yacc.c:1646 */ break; case 57: #line 294 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); code(call); codesym((yyvsp[-4].sym)); codei((yyvsp[-1].narg));} #line 2676 "parse.c" /* yacc.c:1646 */ break; case 58: #line 298 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = code(hoc_push_string); codesym((yyvsp[0].sym));} #line 2682 "parse.c" /* yacc.c:1646 */ break; case 59: #line 300 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {defnonly("$s"); (yyval.inst) = argcode(hoc_stringarg, (yyvsp[0].narg));} #line 2688 "parse.c" /* yacc.c:1646 */ break; case 60: #line 304 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-1].inst); } #line 2694 "parse.c" /* yacc.c:1646 */ break; case 62: #line 308 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol* s = hoc_decl((yyvsp[0].sym)); if (s->type == UNDEF) { hoc_obvar_declare(s, STRING, 0); OPSTR(s) = (char**)emalloc(sizeof(char*)); *OPSTR(s) = 0; }else if (s->type != STRING) { acterror(s->name, " already declared"); } hoc_assign_str(OPSTR(s), ""); } #line 2710 "parse.c" /* yacc.c:1646 */ break; case 63: #line 321 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(nopop); hoc_ob_check(-1); /*don't check*/} #line 2716 "parse.c" /* yacc.c:1646 */ break; case 68: #line 329 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(nopop); } #line 2722 "parse.c" /* yacc.c:1646 */ break; case 69: #line 331 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst);} #line 2728 "parse.c" /* yacc.c:1646 */ break; case 70: #line 333 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { defnonly("return"); (yyval.inst)=(yyvsp[0].inst); code(procret); } #line 2734 "parse.c" /* yacc.c:1646 */ break; case 71: #line 335 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { if (indef == 3) { TPDYNAM; (yyval.inst) = (yyvsp[0].inst); code(hocobjret); }else{ TPD; defnonly("return"); (yyval.inst)=(yyvsp[0].inst); code(funcret); } } #line 2747 "parse.c" /* yacc.c:1646 */ break; case 72: #line 344 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = code(hoc_newobj_ret); codesym(hoc_which_template((yyvsp[-3].sym))); codei((yyvsp[-1].narg)); code(hocobjret); } #line 2755 "parse.c" /* yacc.c:1646 */ break; case 73: #line 348 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { if (indef != 2) { acterror("iterator_statement used outside an iterator declaration", 0); } code(hoc_iterator_stmt); } #line 2765 "parse.c" /* yacc.c:1646 */ break; case 74: #line 354 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(Break); (yyval.inst) = (yyvsp[0].inst); } #line 2771 "parse.c" /* yacc.c:1646 */ break; case 75: #line 356 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(Stop); (yyval.inst) = (yyvsp[0].inst); } #line 2777 "parse.c" /* yacc.c:1646 */ break; case 76: #line 358 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(Continue); (yyval.inst) = (yyvsp[0].inst); } #line 2783 "parse.c" /* yacc.c:1646 */ break; case 77: #line 360 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); code(call); codesym((yyvsp[-4].sym)); codei((yyvsp[-1].narg)); code(nopop); } #line 2789 "parse.c" /* yacc.c:1646 */ break; case 78: #line 362 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); code(hoc_newline); } #line 2795 "parse.c" /* yacc.c:1646 */ break; case 79: #line 364 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); ((yyvsp[-2].inst))[0].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 0); /* body */ ((yyvsp[-2].inst))[1].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 1); /* exit */ } #line 2804 "parse.c" /* yacc.c:1646 */ break; case 80: #line 369 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ((yyvsp[-4].inst))[1].i =relative((yyvsp[-1].inst), (yyvsp[-4].inst), 1); /* body */ ((yyvsp[-4].inst))[2].i =relative((yyvsp[0].inst), (yyvsp[-4].inst), 2); /* exit from the for */ ((yyvsp[-4].inst))[3].i =relative((yyvsp[-2].inst), (yyvsp[-4].inst), 3); /* increment */ (yyval.inst) = (yyvsp[-5].inst); #if LINT if (0){YYERROR;} #endif } #line 2818 "parse.c" /* yacc.c:1646 */ break; case 81: #line 379 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *s; (yyval.inst) = Code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1); } #line 2826 "parse.c" /* yacc.c:1646 */ break; case 82: #line 383 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {TPD; TPD; hoc_opasgn_invalid((yyvsp[-3].narg)); (yyval.inst) = code(shortfor); codei(0); codei(0);} #line 2833 "parse.c" /* yacc.c:1646 */ break; case 83: #line 386 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-8].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 2841 "parse.c" /* yacc.c:1646 */ break; case 84: #line 390 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *s; (yyval.inst) = Code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1); } #line 2849 "parse.c" /* yacc.c:1646 */ break; case 85: #line 394 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {TPD; TPD; hoc_opasgn_invalid((yyvsp[-3].narg)); code(hoc_parallel_begin); (yyval.inst) = code(shortfor); codei(0); codei(0);} #line 2857 "parse.c" /* yacc.c:1646 */ break; case 86: #line 398 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-8].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ code(hoc_parallel_end); } #line 2866 "parse.c" /* yacc.c:1646 */ break; case 87: #line 403 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ((yyvsp[-3].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-3].inst), 1); /* body of loop */ ((yyvsp[-3].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-3].inst), 2); } #line 2874 "parse.c" /* yacc.c:1646 */ break; case 88: #line 407 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ((yyvsp[-3].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-3].inst), 1); /* thenpart */ ((yyvsp[-3].inst))[3].i = relative((yyvsp[0].inst), (yyvsp[-3].inst), 3); } #line 2882 "parse.c" /* yacc.c:1646 */ break; case 89: #line 411 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ((yyvsp[-6].inst))[1].i = relative((yyvsp[-4].inst), (yyvsp[-6].inst), 1); /* thenpart */ ((yyvsp[-6].inst))[2].i = relative((yyvsp[-1].inst), (yyvsp[-6].inst), 2); /* elsepart */ ((yyvsp[-6].inst))[3].i = relative((yyvsp[0].inst), (yyvsp[-6].inst), 3); } #line 2891 "parse.c" /* yacc.c:1646 */ break; case 90: #line 416 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ntab++;} #line 2897 "parse.c" /* yacc.c:1646 */ break; case 91: #line 418 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ntab--; (yyval.inst) = (yyvsp[-1].inst); } #line 2905 "parse.c" /* yacc.c:1646 */ break; case 93: #line 424 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-1].inst); } #line 2911 "parse.c" /* yacc.c:1646 */ break; case 94: #line 426 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[-2].inst); code(connectsection);} #line 2917 "parse.c" /* yacc.c:1646 */ break; case 95: #line 428 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[-5].inst); code(simpleconnectsection);} #line 2923 "parse.c" /* yacc.c:1646 */ break; case 96: #line 430 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[-5].inst); code(connectpointer); codesym(spop());} #line 2929 "parse.c" /* yacc.c:1646 */ break; case 97: #line 431 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(nrn_cppp);} #line 2935 "parse.c" /* yacc.c:1646 */ break; case 98: #line 432 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-4].inst); code(connect_point_process_pointer); hoc_ob_check(-1);} #line 2942 "parse.c" /* yacc.c:1646 */ break; case 99: #line 435 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); code(sec_access);} #line 2948 "parse.c" /* yacc.c:1646 */ break; case 100: #line 437 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); hoc_ob_check(SECTION); code(sec_access_object);} #line 2954 "parse.c" /* yacc.c:1646 */ break; case 101: #line 439 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = Code(mech_access); codesym((yyvsp[0].sym));} #line 2960 "parse.c" /* yacc.c:1646 */ break; case 102: #line 441 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = Code(mech_uninsert); codesym((yyvsp[0].sym));} #line 2966 "parse.c" /* yacc.c:1646 */ break; case 103: #line 443 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(sec_access_pop);} #line 2972 "parse.c" /* yacc.c:1646 */ break; case 104: #line 445 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(sec_access_pop); hoc_ob_check(-1); insertcode((yyvsp[-1].inst), (yyvsp[0].inst), ob_sec_access);} #line 2979 "parse.c" /* yacc.c:1646 */ break; case 105: #line 448 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; TPD; TPD; code(range_interpolate); codesym(spop()); codei((yyvsp[-3].narg)); } #line 2987 "parse.c" /* yacc.c:1646 */ break; case 106: #line 452 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(range_interpolate_single); codesym(spop()); codei((yyvsp[-1].narg)); } #line 2995 "parse.c" /* yacc.c:1646 */ break; case 107: #line 456 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1); (yyval.inst) = code(for_segment); codei(0); codei(0);} #line 3003 "parse.c" /* yacc.c:1646 */ break; case 108: #line 460 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-4].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3011 "parse.c" /* yacc.c:1646 */ break; case 109: #line 464 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1);} #line 3018 "parse.c" /* yacc.c:1646 */ break; case 110: #line 467 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = code(for_segment1); codei(0); codei(0);} #line 3024 "parse.c" /* yacc.c:1646 */ break; case 111: #line 469 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-7].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3032 "parse.c" /* yacc.c:1646 */ break; case 112: #line 473 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(hoc_push_string); codesym((Symbol*)0); (yyval.inst) = code(forall_section); codei(0); codei(0);} #line 3039 "parse.c" /* yacc.c:1646 */ break; case 113: #line 476 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3047 "parse.c" /* yacc.c:1646 */ break; case 114: #line 480 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(forall_section); codei(0); codei(0);} #line 3053 "parse.c" /* yacc.c:1646 */ break; case 115: #line 482 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-4].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3061 "parse.c" /* yacc.c:1646 */ break; case 116: #line 486 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(hoc_ifsec); codei(0); codei(0);} #line 3067 "parse.c" /* yacc.c:1646 */ break; case 117: #line 488 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-4].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3075 "parse.c" /* yacc.c:1646 */ break; case 118: #line 492 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_ob_check(-1); (yyval.inst) = code(forall_sectionlist); codei(0); codei(0); } #line 3082 "parse.c" /* yacc.c:1646 */ break; case 119: #line 495 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-4].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3090 "parse.c" /* yacc.c:1646 */ break; case 120: #line 499 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { hoc_ob_check(-1); (yyval.inst) = code(hoc_ifseclist); codei(0); codei(0); } #line 3098 "parse.c" /* yacc.c:1646 */ break; case 121: #line 504 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-4].inst); ((yyvsp[-2].inst))[1].i = relative((yyvsp[-1].inst), (yyvsp[-2].inst), 1); /* body */ ((yyvsp[-2].inst))[2].i = relative((yyvsp[0].inst), (yyvsp[-2].inst), 2); /* exit */ } #line 3106 "parse.c" /* yacc.c:1646 */ break; case 122: #line 511 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(hoc_iterator); codesym((yyvsp[-3].sym)); codei((yyvsp[-1].narg)); (yyval.inst) = progp; codein(STOP); codein(STOP); } #line 3115 "parse.c" /* yacc.c:1646 */ break; case 123: #line 515 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_push_current_object);} #line 3121 "parse.c" /* yacc.c:1646 */ break; case 124: #line 516 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {codei(ITERATOR); (yyval.inst) = progp; codein(STOP); codein(STOP); } #line 3129 "parse.c" /* yacc.c:1646 */ break; case 125: #line 521 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {pushs((yyvsp[0].sym)); pushi(CHECK);} #line 3135 "parse.c" /* yacc.c:1646 */ break; case 126: #line 522 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(sec_access_push); codesym(spop()); (yyval.inst) = (yyvsp[0].inst);} #line 3141 "parse.c" /* yacc.c:1646 */ break; case 127: #line 524 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(hoc_sec_internal_push); hoc_codeptr((yyvsp[0].ptr)); } #line 3150 "parse.c" /* yacc.c:1646 */ break; case 128: #line 530 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {TPD;} #line 3156 "parse.c" /* yacc.c:1646 */ break; case 129: #line 531 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = progp; code(connect_obsec_syntax);} #line 3162 "parse.c" /* yacc.c:1646 */ break; case 130: #line 532 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { #if 0 acterror("Sorry. The \"connect ob.sec...\" syntax ", "is not implemented"); #endif hoc_ob_check(SECTION); code(ob_sec_access); } #line 3174 "parse.c" /* yacc.c:1646 */ break; case 131: #line 542 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(add_section); codesym((yyvsp[0].sym)); codei(0);} #line 3180 "parse.c" /* yacc.c:1646 */ break; case 132: #line 544 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(add_section); codesym((yyvsp[-1].sym)); codei((yyvsp[0].narg));} #line 3186 "parse.c" /* yacc.c:1646 */ break; case 133: #line 546 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(add_section); codesym((yyvsp[0].sym)); codei(0);} #line 3192 "parse.c" /* yacc.c:1646 */ break; case 134: #line 548 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(add_section); codesym((yyvsp[-1].sym)); codei((yyvsp[0].narg));} #line 3198 "parse.c" /* yacc.c:1646 */ break; case 135: #line 551 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol* s; s = hoc_decl((yyvsp[0].sym)); if (s->type != UNDEF && s->type != SECTION) acterror(s->name, " already declared"); } #line 3209 "parse.c" /* yacc.c:1646 */ break; case 136: #line 559 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(sec_access_push); codesym((Symbol *)0);} #line 3215 "parse.c" /* yacc.c:1646 */ break; case 138: #line 562 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {pushs((yyvsp[0].sym)); pushi(CHECK);} #line 3221 "parse.c" /* yacc.c:1646 */ break; case 139: #line 563 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = (yyvsp[0].inst);} #line 3227 "parse.c" /* yacc.c:1646 */ break; case 140: #line 566 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code3(varpush, spop(), hoc_evalpointer);} #line 3233 "parse.c" /* yacc.c:1646 */ break; case 141: #line 568 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; code(rangevarevalpointer); codesym(spop());} #line 3239 "parse.c" /* yacc.c:1646 */ break; case 142: #line 570 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {hoc_ipop(); code(hoc_ob_pointer);} #line 3245 "parse.c" /* yacc.c:1646 */ break; case 143: #line 571 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("rangevariable needs explicit arc position,eg. v(.5)");} #line 3251 "parse.c" /* yacc.c:1646 */ break; case 144: #line 573 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = argcode(hoc_argrefarg, (yyvsp[0].narg));} #line 3257 "parse.c" /* yacc.c:1646 */ break; case 145: #line 579 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-1].inst);} #line 3263 "parse.c" /* yacc.c:1646 */ break; case 146: #line 581 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = progp; } #line 3269 "parse.c" /* yacc.c:1646 */ break; case 147: #line 584 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(forcode); codei(0); codei(0); codei(0); } #line 3275 "parse.c" /* yacc.c:1646 */ break; case 148: #line 587 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[0].inst); codein(STOP);} #line 3281 "parse.c" /* yacc.c:1646 */ break; case 149: #line 590 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-1].inst); codein(STOP);} #line 3287 "parse.c" /* yacc.c:1646 */ break; case 150: #line 592 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = progp; codein(STOP);} #line 3293 "parse.c" /* yacc.c:1646 */ break; case 151: #line 595 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; codein(STOP); (yyval.inst) = (yyvsp[-1].inst);} #line 3299 "parse.c" /* yacc.c:1646 */ break; case 152: #line 598 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); } #line 3305 "parse.c" /* yacc.c:1646 */ break; case 153: #line 601 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst)=code(ifcode); codei(0); codei(0); codei(0); } #line 3311 "parse.c" /* yacc.c:1646 */ break; case 154: #line 604 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = progp; } #line 3317 "parse.c" /* yacc.c:1646 */ break; case 155: #line 607 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { codein(STOP); (yyval.inst) = progp; } #line 3323 "parse.c" /* yacc.c:1646 */ break; case 156: #line 610 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = progp; prog_error = (yyval.inst); } #line 3329 "parse.c" /* yacc.c:1646 */ break; case 157: #line 612 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { prog_parse_recover = progp; prog_error = (yyval.inst); if (nrn_fw_eq(fin, stdin) && !pipeflag) { int i; Printf(">"); for (i = 0; i < ntab; i++) Printf(" "); } } #line 3344 "parse.c" /* yacc.c:1646 */ break; case 159: #line 624 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("syntax error in compound statement");} #line 3350 "parse.c" /* yacc.c:1646 */ break; case 160: #line 629 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(constpush); codesym((yyvsp[0].sym)); PN;} #line 3356 "parse.c" /* yacc.c:1646 */ break; case 161: #line 631 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(pushzero); PN;} #line 3362 "parse.c" /* yacc.c:1646 */ break; case 162: #line 633 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code3(varpush, spop(), eval); PN;} #line 3368 "parse.c" /* yacc.c:1646 */ break; case 163: #line 635 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { defnonly("$"); (yyval.inst) = argcode(arg, (yyvsp[0].narg)); PN;} #line 3374 "parse.c" /* yacc.c:1646 */ break; case 164: #line 637 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { defnonly("$&"); (yyval.inst) = argrefcode(hoc_argref, (yyvsp[-1].narg), (yyvsp[0].narg)); PN;} #line 3380 "parse.c" /* yacc.c:1646 */ break; case 165: #line 640 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(rangepoint); codesym(spop()); PN;} #line 3386 "parse.c" /* yacc.c:1646 */ break; case 166: #line 642 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; code(rangevareval); codesym(spop()); PN;} #line 3392 "parse.c" /* yacc.c:1646 */ break; case 167: #line 646 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(hoc_object_eval);} #line 3398 "parse.c" /* yacc.c:1646 */ break; case 169: #line 650 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); code(call); codesym((yyvsp[-4].sym)); codei((yyvsp[-1].narg)); PN;} #line 3404 "parse.c" /* yacc.c:1646 */ break; case 170: #line 652 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(call); codesym(spop()); codei((yyvsp[-1].narg)); PN;} #line 3410 "parse.c" /* yacc.c:1646 */ break; case 171: #line 654 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst)=(yyvsp[-1].inst); code(varread); codesym(spop()); PN;} #line 3416 "parse.c" /* yacc.c:1646 */ break; case 172: #line 656 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[-1].inst); code(bltin); codesym((yyvsp[-3].sym)); PN;} #line 3422 "parse.c" /* yacc.c:1646 */ break; case 173: #line 658 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-1].inst); } #line 3428 "parse.c" /* yacc.c:1646 */ break; case 174: #line 660 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {myerr("syntax error in expression");} #line 3434 "parse.c" /* yacc.c:1646 */ break; case 175: #line 662 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(add); PN; } #line 3440 "parse.c" /* yacc.c:1646 */ break; case 176: #line 664 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD;code(hoc_sub); PN;} #line 3446 "parse.c" /* yacc.c:1646 */ break; case 177: #line 666 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(mul); PN;} #line 3452 "parse.c" /* yacc.c:1646 */ break; case 178: #line 668 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(hoc_div); PN;} #line 3458 "parse.c" /* yacc.c:1646 */ break; case 179: #line 670 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(hoc_cyclic); PN;} #line 3464 "parse.c" /* yacc.c:1646 */ break; case 180: #line 672 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(power); PN;} #line 3470 "parse.c" /* yacc.c:1646 */ break; case 181: #line 674 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[0].inst); code(negate); PN;} #line 3476 "parse.c" /* yacc.c:1646 */ break; case 182: #line 676 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(gt); PN;} #line 3482 "parse.c" /* yacc.c:1646 */ break; case 183: #line 678 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(ge); PN;} #line 3488 "parse.c" /* yacc.c:1646 */ break; case 184: #line 680 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(lt); PN;} #line 3494 "parse.c" /* yacc.c:1646 */ break; case 185: #line 682 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(le); PN;} #line 3500 "parse.c" /* yacc.c:1646 */ break; case 186: #line 684 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { hoc_ob_check(-1); hoc_ob_check(-1); code(eq); PN;} #line 3506 "parse.c" /* yacc.c:1646 */ break; case 187: #line 686 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { hoc_ob_check(-1); hoc_ob_check(-1); code(ne); PN;} #line 3512 "parse.c" /* yacc.c:1646 */ break; case 188: #line 688 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(hoc_and); PN;} #line 3518 "parse.c" /* yacc.c:1646 */ break; case 189: #line 690 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; TPD; code(hoc_or); PN;} #line 3524 "parse.c" /* yacc.c:1646 */ break; case 190: #line 692 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.inst) = (yyvsp[0].inst); code(hoc_not); PN;} #line 3530 "parse.c" /* yacc.c:1646 */ break; case 195: #line 700 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; code(varpush); codesym(s=spop()); (yyval.inst) = (yyvsp[-1].inst); code(arayinstal); codei((yyvsp[0].narg)); hoc_obvar_declare(s, VAR, 0);} #line 3537 "parse.c" /* yacc.c:1646 */ break; case 196: #line 703 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; code(varpush); codesym(s = spop()); code(arayinstal); codei((yyvsp[0].narg)); hoc_obvar_declare(s, VAR, 0);} #line 3544 "parse.c" /* yacc.c:1646 */ break; case 197: #line 708 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {pushs((yyvsp[-1].sym)); (yyval.narg) = (yyvsp[0].narg);} #line 3550 "parse.c" /* yacc.c:1646 */ break; case 198: #line 711 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD; (yyval.narg) = 1; } #line 3556 "parse.c" /* yacc.c:1646 */ break; case 199: #line 713 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD;(yyval.narg) = (yyval.narg) + 1; } #line 3562 "parse.c" /* yacc.c:1646 */ break; case 201: #line 719 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { pushs((yyvsp[-1].sym)); (yyval.inst) = (yyvsp[0].inst); } #line 3568 "parse.c" /* yacc.c:1646 */ break; case 202: #line 721 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { if ((yyvsp[-1].sym)->subtype == USERPROPERTY) { code(sec_access_push); codesym((Symbol *)0); } pushs((yyvsp[-1].sym)); pushi(CHECK); } #line 3578 "parse.c" /* yacc.c:1646 */ break; case 203: #line 726 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.inst) = (yyvsp[-2].inst);} #line 3584 "parse.c" /* yacc.c:1646 */ break; case 204: #line 728 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { if ((yyvsp[0].sym)->subtype != USERPROPERTY) { acterror((yyvsp[0].sym)->name, "not a section variable"); } (yyval.inst) = (yyvsp[-2].inst); pushs((yyvsp[0].sym)); } #line 3594 "parse.c" /* yacc.c:1646 */ break; case 205: #line 742 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { int d1, chk; Symbol *sym; d1 = ipop(); chk = ipop(); sym = spop(); if (chk) { if (!ISARRAY(sym)) { if (d1) acterror(sym->name, "not an array variable"); }else{ if ( d1 == 0 ) { /*fake index list with all 0's*/ int i; for (i=0; iarayinfo->nsub; i++) { code(pushzero); } } else if ( d1 != sym->arayinfo->nsub) { acterror("wrong # of subscripts",sym->name); } } }else { pushi(d1); /* must check dynamically */ } pushs(sym); } #line 3625 "parse.c" /* yacc.c:1646 */ break; case 206: #line 771 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.narg) = ipop(); } #line 3633 "parse.c" /* yacc.c:1646 */ break; case 207: #line 777 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { pushi(0); } #line 3639 "parse.c" /* yacc.c:1646 */ break; case 208: #line 779 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPD;pushi(ipop() + 1); } #line 3645 "parse.c" /* yacc.c:1646 */ break; case 209: #line 783 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPDYNAM; code(prexpr);} #line 3651 "parse.c" /* yacc.c:1646 */ break; case 210: #line 785 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(prstr); } #line 3657 "parse.c" /* yacc.c:1646 */ break; case 211: #line 787 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { TPDYNAM; code(prexpr);} #line 3663 "parse.c" /* yacc.c:1646 */ break; case 212: #line 789 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(prstr); } #line 3669 "parse.c" /* yacc.c:1646 */ break; case 213: #line 792 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = code(hoc_delete_symbol); codesym((yyvsp[0].sym)); } #line 3675 "parse.c" /* yacc.c:1646 */ break; case 214: #line 796 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyvsp[0].sym)->type=FUNCTION; indef=1; } #line 3681 "parse.c" /* yacc.c:1646 */ break; case 215: #line 798 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(procret); hoc_define((yyvsp[-4].sym)); (yyvsp[-4].sym)->u.u_proc->nobjauto = (yyvsp[0].narg) - localcnt; (yyvsp[-4].sym)->u.u_proc->nauto=(yyvsp[0].narg); indef=0; } #line 3689 "parse.c" /* yacc.c:1646 */ break; case 216: #line 802 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyvsp[0].sym)->type=PROCEDURE; indef=1; } #line 3695 "parse.c" /* yacc.c:1646 */ break; case 217: #line 804 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(procret); hoc_define((yyvsp[-4].sym)); (yyvsp[-4].sym)->u.u_proc->nobjauto = (yyvsp[0].narg) - localcnt; (yyvsp[-4].sym)->u.u_proc->nauto=(yyvsp[0].narg); indef=0; } #line 3703 "parse.c" /* yacc.c:1646 */ break; case 218: #line 808 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyvsp[0].sym)->type = ITERATOR; indef=2; } #line 3709 "parse.c" /* yacc.c:1646 */ break; case 219: #line 810 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code(procret); hoc_define((yyvsp[-4].sym)); (yyvsp[-4].sym)->u.u_proc->nobjauto = (yyvsp[0].narg) - localcnt; (yyvsp[-4].sym)->u.u_proc->nauto = (yyvsp[0].narg); indef = 0; } #line 3717 "parse.c" /* yacc.c:1646 */ break; case 220: #line 814 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyvsp[0].sym)->type=HOCOBJFUNCTION; indef=3; } #line 3723 "parse.c" /* yacc.c:1646 */ break; case 221: #line 816 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(procret); hoc_define((yyvsp[-4].sym)); (yyvsp[-4].sym)->u.u_proc->nobjauto = (yyvsp[0].narg) - localcnt; (yyvsp[-4].sym)->u.u_proc->nauto=(yyvsp[0].narg); indef=0; } #line 3731 "parse.c" /* yacc.c:1646 */ break; case 222: #line 821 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *s; s=yylval.sym; if(s->type != UNDEF) acterror(s->name, "already defined"); s->u.u_proc = (Proc *)emalloc(sizeof(Proc)); s->u.u_proc->defn.in = STOP; s->u.u_proc->list = (Symlist *)0; } #line 3741 "parse.c" /* yacc.c:1646 */ break; case 227: #line 831 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {ntab++;} #line 3747 "parse.c" /* yacc.c:1646 */ break; case 228: #line 832 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { ntab--; (yyval.narg) = (yyvsp[-4].narg) + (yyvsp[-3].narg); } #line 3756 "parse.c" /* yacc.c:1646 */ break; case 229: #line 838 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.narg) = 0; } #line 3762 "parse.c" /* yacc.c:1646 */ break; case 231: #line 842 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.narg) = 1;} #line 3768 "parse.c" /* yacc.c:1646 */ break; case 232: #line 844 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {(yyval.narg) = (yyvsp[-2].narg) + 1;} #line 3774 "parse.c" /* yacc.c:1646 */ break; case 233: #line 847 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {} #line 3780 "parse.c" /* yacc.c:1646 */ break; case 234: #line 849 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { hoc_ob_check(-1);} #line 3786 "parse.c" /* yacc.c:1646 */ break; case 236: #line 852 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(hoc_newobj_arg); codesym(hoc_which_template((yyvsp[-3].sym))); codei((yyvsp[-1].narg)); } #line 3794 "parse.c" /* yacc.c:1646 */ break; case 237: #line 857 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); } #line 3800 "parse.c" /* yacc.c:1646 */ break; case 238: #line 859 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {code3(varpush, spop(), eqn_name); do_equation = 1; } #line 3807 "parse.c" /* yacc.c:1646 */ break; case 239: #line 862 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[-3].inst); do_equation = 0; } #line 3813 "parse.c" /* yacc.c:1646 */ break; case 240: #line 865 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; code3(varpush,s= spop(), dep_make); hoc_obvar_declare(s, VAR, 0);} #line 3819 "parse.c" /* yacc.c:1646 */ break; case 241: #line 867 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ {Symbol *s; code3(varpush, s=spop(), dep_make); hoc_obvar_declare(s, VAR, 0);} #line 3825 "parse.c" /* yacc.c:1646 */ break; case 244: #line 872 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(eqn_init); } #line 3831 "parse.c" /* yacc.c:1646 */ break; case 246: #line 876 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(eqn_lhs); } #line 3837 "parse.c" /* yacc.c:1646 */ break; case 247: #line 878 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { codein(STOP); TPD; } #line 3843 "parse.c" /* yacc.c:1646 */ break; case 248: #line 881 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { code(eqn_rhs); } #line 3849 "parse.c" /* yacc.c:1646 */ break; case 249: #line 883 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { codein(STOP); TPD; } #line 3855 "parse.c" /* yacc.c:1646 */ break; case 250: #line 886 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.narg) = 0; localcnt = (yyval.narg);} #line 3861 "parse.c" /* yacc.c:1646 */ break; case 252: #line 890 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *sp; (yyval.narg) = 1; localcnt = (yyval.narg); sp = install((yyvsp[0].sym)->name, AUTO, 0.0, &p_symlist); sp->u.u_auto = (yyval.narg); } #line 3872 "parse.c" /* yacc.c:1646 */ break; case 253: #line 897 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *sp; (yyval.narg) = (yyvsp[-2].narg) + 1; localcnt = (yyval.narg); if (hoc_table_lookup((yyvsp[0].sym)->name, p_symlist)) { acterror((yyvsp[0].sym)->name, "already declared local"); } sp = install((yyvsp[0].sym)->name, AUTO, 0.0, &p_symlist); sp->u.u_auto = (yyval.narg); } #line 3886 "parse.c" /* yacc.c:1646 */ break; case 254: #line 908 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { (yyval.narg) = 0;} #line 3892 "parse.c" /* yacc.c:1646 */ break; case 256: #line 912 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *sp; (yyval.narg) = 1; if (hoc_table_lookup((yyvsp[0].sym)->name, p_symlist)) { acterror((yyvsp[0].sym)->name, "already declared local"); } sp = install((yyvsp[0].sym)->name, AUTOOBJ, 0.0, &p_symlist); sp->u.u_auto = (yyval.narg) + localcnt; } #line 3906 "parse.c" /* yacc.c:1646 */ break; case 257: #line 922 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol *sp; (yyval.narg) = (yyvsp[-2].narg) + 1; if (hoc_table_lookup((yyvsp[0].sym)->name, p_symlist)) { acterror((yyvsp[0].sym)->name, "already declared local"); } sp = install((yyvsp[0].sym)->name, AUTOOBJ, 0.0, &p_symlist); sp->u.u_auto = (yyval.narg) + localcnt; } #line 3920 "parse.c" /* yacc.c:1646 */ break; case 258: #line 933 "../../../nrn/src/oc/parse.y" /* yacc.c:1646 */ { Symbol* s; s = hoc_decl((yyvsp[0].sym)); if (s->subtype != NOTUSER) acterror("can't redeclare user variable", s->name); (yyval.sym) = s; } #line 3931 "parse.c" /* yacc.c:1646 */ break; #line 3935 "parse.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif return yyresult; } #line 945 "../../../nrn/src/oc/parse.y" /* yacc.c:1906 */ /* end of grammar */ static void yyerror(const char* s) /* called for yacc syntax error */ { execerror(s, (char *)0); } void acterror(const char* s, const char*t) /* recover from action error while parsing */ { execerror(s,t); } static Inst* argrefcode(Pfrv pfrv, int i, int j){ Inst* in; in = argcode(pfrv, i); codei(j); return in; } static Inst* argcode(Pfrv pfrv, int i) { Inst* in; if (i == 0) { Symbol* si = hoc_lookup("i"); if (si->type != AUTO) { acterror("arg index used and i is not a LOCAL variable", 0); } in = code3(varpush, si, eval); Code(pfrv); codei(0); }else{ in = Code(pfrv); codei(i); } return in; } static void hoc_opasgn_invalid(int op) { if (op) { acterror("Invalid assignment operator.", "Only '=' allowed. "); } } neuron-7.5/src/oc/parse.h000066400000000000000000000127761323325274500153710ustar00rootroot00000000000000/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { EQNEQ = 258, NUMBER = 259, STRING = 260, PRINT = 261, parseDELETE = 262, VAR = 263, BLTIN = 264, UNDEF = 265, WHILE = 266, IF = 267, ELSE = 268, FOR = 269, FUNCTION = 270, PROCEDURE = 271, RETURN = 272, FUNC = 273, parsePROC = 274, HOCOBJFUNC = 275, READ = 276, parseDOUBLE = 277, DEBUG = 278, EDIT = 279, FUN_BLTIN = 280, DEPENDENT = 281, EQUATION = 282, LOCAL = 283, HOCOBJFUNCTION = 284, BREAK = 285, CONTINUE = 286, AUTO = 287, STRDEF = 288, STOPSTMT = 289, CSTRING = 290, PARALLEL = 291, HELP = 292, ITERATOR = 293, ITERKEYWORD = 294, ITERSTMT = 295, STRINGFUNC = 296, OBJECTFUNC = 297, LOCALOBJ = 298, AUTOOBJ = 299, ARG = 300, NUMZERO = 301, ARGREF = 302, INTERNALSECTIONNAME = 303, SECTIONKEYWORD = 304, SECTION = 305, CONNECTKEYWORD = 306, ACCESSKEYWORD = 307, RANGEVAR = 308, MECHANISM = 309, INSERTKEYWORD = 310, FORALL = 311, NRNPNTVAR = 312, FORSEC = 313, IFSEC = 314, UNINSERTKEYWORD = 315, SETPOINTERKEYWORD = 316, SECTIONREF = 317, BEGINTEMPLATE = 318, ENDTEMPLATE = 319, NEW = 320, OBJECTVAR = 321, TEMPLATE = 322, OBJVARDECL = 323, PUBLICDECL = 324, EXTERNALDECL = 325, OBFUNCTION = 326, STRFUNCTION = 327, OBJECTARG = 328, STRINGARG = 329, ROP = 330, OR = 331, AND = 332, GT = 333, GE = 334, LT = 335, LE = 336, EQ = 337, NE = 338, UNARYMINUS = 339, NOT = 340 }; #endif /* Tokens. */ #define EQNEQ 258 #define NUMBER 259 #define STRING 260 #define PRINT 261 #define parseDELETE 262 #define VAR 263 #define BLTIN 264 #define UNDEF 265 #define WHILE 266 #define IF 267 #define ELSE 268 #define FOR 269 #define FUNCTION 270 #define PROCEDURE 271 #define RETURN 272 #define FUNC 273 #define parsePROC 274 #define HOCOBJFUNC 275 #define READ 276 #define parseDOUBLE 277 #define DEBUG 278 #define EDIT 279 #define FUN_BLTIN 280 #define DEPENDENT 281 #define EQUATION 282 #define LOCAL 283 #define HOCOBJFUNCTION 284 #define BREAK 285 #define CONTINUE 286 #define AUTO 287 #define STRDEF 288 #define STOPSTMT 289 #define CSTRING 290 #define PARALLEL 291 #define HELP 292 #define ITERATOR 293 #define ITERKEYWORD 294 #define ITERSTMT 295 #define STRINGFUNC 296 #define OBJECTFUNC 297 #define LOCALOBJ 298 #define AUTOOBJ 299 #define ARG 300 #define NUMZERO 301 #define ARGREF 302 #define INTERNALSECTIONNAME 303 #define SECTIONKEYWORD 304 #define SECTION 305 #define CONNECTKEYWORD 306 #define ACCESSKEYWORD 307 #define RANGEVAR 308 #define MECHANISM 309 #define INSERTKEYWORD 310 #define FORALL 311 #define NRNPNTVAR 312 #define FORSEC 313 #define IFSEC 314 #define UNINSERTKEYWORD 315 #define SETPOINTERKEYWORD 316 #define SECTIONREF 317 #define BEGINTEMPLATE 318 #define ENDTEMPLATE 319 #define NEW 320 #define OBJECTVAR 321 #define TEMPLATE 322 #define OBJVARDECL 323 #define PUBLICDECL 324 #define EXTERNALDECL 325 #define OBFUNCTION 326 #define STRFUNCTION 327 #define OBJECTARG 328 #define STRINGARG 329 #define ROP 330 #define OR 331 #define AND 332 #define GT 333 #define GE 334 #define LT 335 #define LE 336 #define EQ 337 #define NE 338 #define UNARYMINUS 339 #define NOT 340 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 82 "../../../nrn/src/oc/parse.y" /* yacc.c:1909 */ /* stack type */ Symbol *sym; /* symbol table pointer */ Inst *inst; /* machine instruction */ int narg; /* number of arguments */ void* ptr; #line 231 "parse.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ neuron-7.5/src/oc/parse.y000077500000000000000000000617511323325274500154120ustar00rootroot00000000000000/* /local/src/master/nrn/src/oc/parse.y,v 1.29 1998/11/27 13:11:48 hines Exp */ %{ #include <../../nrnconf.h> /* changes as of 2-jan-89 */ /* version 7.2.1 2-jan-89 short form of the for statement */ #if AIX #pragma alloca #endif #include "hoc.h" #include "ocmisc.h" #include "hocparse.h" #include "code.h" #include "equation.h" #include "nrnfilewrap.h" #if LINT Inst *inlint; #define code inlint = Code #else #define code Code #endif #define paction(arg) fprintf(stderr, "%s\n", arg) /* maintain a list of ierr addresses so we can clear them */ #define HOCERRSIZE 20 static int** hoc_err; static int hoc_errp; static int localcnt; static void clean_err(void) { int i; for (i=0; i < hoc_errp; ++i) { *hoc_err[i] = 0; } hoc_errp = 0; } static void pusherr(int* ip) { if (!hoc_err) { hoc_err = (int**)ecalloc(HOCERRSIZE, sizeof(int*)); hoc_errp = 0; } if (hoc_errp >= HOCERRSIZE) { clean_err(); hoc_execerror("error stack full", (char*)0); } hoc_err[hoc_errp++] = ip; } static void yyerror(const char* s); #if YYBISON #define myerr(arg) static int ierr=0;\ if (!(ierr++)){pusherr(&ierr);yyerror(arg);} --yyssp; --yyvsp; YYERROR #else #define myerr(arg) static int ierr=0;\ if (!(ierr++)){pusherr(&ierr);yyerror(arg);} YYERROR #endif #define code2(c1,c2) code(c1); codein(c2) #define code3(c1,c2,c3) code(c1); codesym(c2); code(c3) #define relative(ip1,ip2,offset) ((ip1-ip2) - offset) #define CHECK 1 /* check syntactically the consistency of arrays */ #define NOCHECK 0 /* don't check syntactically. For object components */ #define PN pushi(NUMBER) /* for type checking. expressions are usually numbers */ #define TPD hoc_ob_check(NUMBER); #define TPDYNAM hoc_ob_check(0); static Inst *prog_error; /* needed for stmtlist loc if error */ static int ntab; /* auto indentation */ static Inst* argrefcode(Pfrv pfrv, int i, int j); static Inst* argcode(Pfrv pfrv, int i); static void hoc_opasgn_invalid(int op); %} %union { /* stack type */ Symbol *sym; /* symbol table pointer */ Inst *inst; /* machine instruction */ int narg; /* number of arguments */ void* ptr; } %token EQNEQ %token NUMBER STRING PRINT parseDELETE VAR BLTIN UNDEF WHILE IF ELSE FOR %token FUNCTION PROCEDURE RETURN FUNC parsePROC HOCOBJFUNC READ parseDOUBLE %token DEBUG EDIT FUN_BLTIN DEPENDENT EQUATION LOCAL HOCOBJFUNCTION %token BREAK CONTINUE AUTO STRDEF STOPSTMT CSTRING PARALLEL HELP %token ITERATOR ITERKEYWORD ITERSTMT STRINGFUNC OBJECTFUNC %token LOCALOBJ AUTOOBJ %token ARG NUMZERO ARGREF %token INTERNALSECTIONNAME %type expr stmt asgn prlist delsym stmtlist strnasgn %type cond while if begin end for_init for_st for_cond for_inc %type eqn_list dep_list varname wholearray array pointer %type doublelist strlist string1 string2 %type iterator %type procname newname function string ckvar %type anyname %type arglist arglist1 local local1 newarray numdimen procstmt %type localobj local2 /* NEWCABLE */ %token SECTIONKEYWORD SECTION CONNECTKEYWORD ACCESSKEYWORD %token RANGEVAR MECHANISM INSERTKEYWORD FORALL NRNPNTVAR FORSEC IFSEC %token UNINSERTKEYWORD SETPOINTERKEYWORD SECTIONREF %type sectiondecl sectionname %type rangevar rangevar1 section section_or_ob /* END NEWCABLE */ /* OOP */ %token BEGINTEMPLATE ENDTEMPLATE NEW OBJECTVAR TEMPLATE %token OBJVARDECL PUBLICDECL EXTERNALDECL OBFUNCTION STRFUNCTION %token OBJECTARG STRINGARG ROP %type template publiclist externallist %type obvarname %type ob ob1 objvarlist object %type func_or_range_array_case argrefdim /* END OOP */ %right '=' %right ROP %left OR %left AND %left GT GE LT LE EQ NE %left '+' '-' /* left associative, same precedence */ %left '*' '/' '%'/* left assoc., higher precedence */ %left UNARYMINUS NOT %right '^' /* exponentiation */ %% list: /* nothing */ { ntab = 0;} | list '\n' { return '\n';} | list defn '\n' { return '\n';} | list asgn '\n' { hoc_ob_check(-1); code2(nopop, STOP); return 1; } | list stmt '\n' { codein(STOP); return 1; } | list expr '\n' { TPDYNAM; code2(print, STOP); return 1; } | list DEBUG '\n' { debug(); return '\n';} | list EDIT '\n' { return 'e';} | list string1 '\n' {code(prstr); code2(hoc_newline, STOP); return 1; } /* OOP */ | list template '\n' { return '\n';} /* END OOP */ /* no longer useful | list '' '\n' { plt(-3,0.,0.); return '\n';} */ | list HELP {hoc_help();} '\n' { return '\n'; } | list error {clean_err(); hoc_execerror("parse error", (char*)0); #if LINT if (0) { if(yydebug); goto yynewstate; } #endif } ; asgn: varname ROP expr {Symbol *s; TPD; s = spop(); hoc_obvar_declare(s, VAR, 1); code3(varpush, s, assign); codei($2); PN;} | ARG ROP expr { TPD; defnonly("$"); argcode(argassign, $1); codei($2); $$=$3; PN;} | ARGREF argrefdim ROP expr { TPD; defnonly("$&"); argrefcode(hoc_argrefasgn, $1, $2); codei($3); $$=$4; PN;} /* NEWCABLE */ | rangevar ROP expr { TPD; code(range_const); codesym(spop()); codei($2); PN;} /* END NEWCABLE */ /* OOP */ |ob1 ROP NEW anyname '(' arglist ')' { Inst* p; hoc_opasgn_invalid($2); code(hoc_newobj); codesym(hoc_which_template($4)); codei($6); p = (Inst*)spop(); if (p) { p->i += 2; } } | ob1 ROP expr {Inst* p; TPDYNAM; code(hoc_object_asgn); codei($2); p = (Inst*)spop(); if (p) { p->i += 2; } } /* END OOP */ | varname ROP error {myerr("assignment to variable, make sure right side is a number");} ; /* OOP */ object: OBJECTVAR {pushi(OBJECTVAR);pushs($1); pushi(CHECK);} wholearray {$$ = $3; code(hoc_objectvar); spop(); codesym($1);} | OBJECTARG {defnonly("$o"); $$ = argcode(hoc_objectarg, $1); pushi(OBJECTVAR);} | AUTOOBJ {$$ = code(hoc_autoobject); codesym($1); pushi(OBJECTVAR);} | TEMPLATE '[' expr ']' {TPD; $$ = $3; code(hoc_constobject); codesym($1); pushi(OBJECTVAR);} | OBJECTFUNC begin '(' arglist ')' { $$ = $2; code(call); codesym($1); codei($4); code(hoc_known_type); codei(OBJECTVAR); pushi(OBJECTVAR);} | HOCOBJFUNCTION begin '(' arglist ')' { $$ = $2; code(call); codesym($1); codei($4); code(hoc_known_type); codei(OBJECTVAR); pushi(OBJECTVAR);} ; ob: ob1 { spop(); } ; ob1: object { pushs((Symbol*)0); } | ob1 '.' anyname {pushs($3);pushi(NOCHECK);} wholearray func_or_range_array_case {int isfunc; Inst* p; isfunc = ipop(); code(hoc_object_component); codesym(spop()); codei(ipop()); codei($6); codei(0); codesym(0); p = codei(isfunc); /* for USE_PYTHON */ spop(); pushs((Symbol*)p); /* in case assigning to a PythonObject we will want to update isfunc to 2 */ } | OBJECTVAR error {myerr("object syntax is o1.o2.o3.");} ; func_or_range_array_case: /* nothing */ {$$ = 0; pushi(0);} | '(' arglist ')' {$$ = $2; pushi(1);} ; template: BEGINTEMPLATE anyname {hoc_begintemplate($2);} | publiclist | externallist | ENDTEMPLATE anyname {hoc_endtemplate($2);} | BEGINTEMPLATE error {myerr("begintemplate Name\npublic namelist\nexternal namelist\n...\nendtemplate Name");} ; objvarlist: OBJVARDECL begin objvarlst1 {$$ = $2;} ; objvarlst1: obvarname {code(hoc_objvardecl); codesym($1); codei(0);} | obvarname numdimen {code(hoc_objvardecl); codesym($1); codei($2);} | objvarlst1 ',' obvarname {code(hoc_objvardecl); codesym($3); codei(0);} | objvarlst1 ',' obvarname numdimen {code(hoc_objvardecl); codesym($3); codei($4);} ; obvarname: anyname { Symbol* s; s = hoc_decl($1); if (s->type != UNDEF && s->type != OBJECTVAR) { acterror(s->name, " already declared"); } $$ = s; } ; publiclist: PUBLICDECL anyname {hoc_add_publiclist($2);} | publiclist ',' anyname {hoc_add_publiclist($3);} ; externallist: EXTERNALDECL VAR {hoc_external_var($2);} | externallist ',' VAR {hoc_external_var($3);} ; /* END OOP */ strnasgn: string2 ROP string1 {hoc_opasgn_invalid($2); code(assstr);} | ob1 ROP string1 {Inst* p = (Inst*) spop(); pushi(STRING); TPDYNAM; code(hoc_object_asgn); hoc_opasgn_invalid($2); codei($2); hoc_ob_check(-1); code(nopop); if (p) { p->i += 2; } } | string2 ROP ob {code(hoc_asgn_obj_to_str); hoc_opasgn_invalid($2); } | string2 error {myerr("string assignment: both sides need to be a string");} ; string1: string2 | CSTRING {$$ = code(hoc_push_string); codesym($1);} | STRINGFUNC begin '(' arglist ')' { $$ = $2; code(call); codesym($1); codei($4);} ; string2: STRING {$$ = code(hoc_push_string); codesym($1);} | STRINGARG {defnonly("$s"); $$ = argcode(hoc_stringarg, $1);} ; strlist: STRDEF begin string { $$ = $2; } | strlist ',' string ; string: anyname { Symbol* s = hoc_decl($1); if (s->type == UNDEF) { hoc_obvar_declare(s, STRING, 0); OPSTR(s) = (char**)emalloc(sizeof(char*)); *OPSTR(s) = 0; }else if (s->type != STRING) { acterror(s->name, " already declared"); } hoc_assign_str(OPSTR(s), ""); } ; stmt: expr { code(nopop); hoc_ob_check(-1); /*don't check*/} | strlist | doublelist /* OOP */ | objvarlist /* END OOP */ | strnasgn | string1 { code(nopop); } | parseDELETE delsym { $$ = $2;} | RETURN begin { defnonly("return"); $$=$2; code(procret); } | RETURN expr { if (indef == 3) { TPDYNAM; $$ = $2; code(hocobjret); }else{ TPD; defnonly("return"); $$=$2; code(funcret); } } | RETURN NEW anyname '(' arglist ')' {$$ = code(hoc_newobj_ret); codesym(hoc_which_template($3)); codei($5); code(hocobjret); } | ITERSTMT begin { if (indef != 2) { acterror("iterator_statement used outside an iterator declaration", 0); } code(hoc_iterator_stmt); } | BREAK begin { code(Break); $$ = $2; } | STOPSTMT begin { code(Stop); $$ = $2; } | CONTINUE begin { code(Continue); $$ = $2; } | PROCEDURE begin '(' arglist ')' { $$ = $2; code(call); codesym($1); codei($4); code(nopop); } | PRINT prlist { $$ = $2; code(hoc_newline); } | FOR begin iterator stmt end { $$ = $2; ($3)[0].i = relative($4, $3, 0); /* body */ ($3)[1].i = relative($5, $3, 1); /* exit */ } | for_init for_st for_cond for_inc stmt end { ($2)[1].i =relative($5, $2, 1); /* body */ ($2)[2].i =relative($6, $2, 2); /* exit from the for */ ($2)[3].i =relative($4, $2, 3); /* increment */ $$ = $1; #if LINT if (0){YYERROR;} #endif } | FOR varname { Symbol *s; $$ = Code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1); } ROP expr ',' expr {TPD; TPD; hoc_opasgn_invalid($4); $$ = code(shortfor); codei(0); codei(0);} stmt end { $$ = $2; ($8)[1].i = relative($9, $8, 1); /* body */ ($8)[2].i = relative($10, $8, 2); /* exit */ } | PARALLEL FOR varname { Symbol *s; $$ = Code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1); } ROP expr ',' expr {TPD; TPD; hoc_opasgn_invalid($5); code(hoc_parallel_begin); $$ = code(shortfor); codei(0); codei(0);} stmt end { $$ = $3; ($9)[1].i = relative($10, $9, 1); /* body */ ($9)[2].i = relative($11, $9, 2); /* exit */ code(hoc_parallel_end); } | while cond stmt end { ($1)[1].i = relative($3, $1, 1); /* body of loop */ ($1)[2].i = relative($4, $1, 2); }/* end, if cond fails */ | if cond stmt end /* else-less if */ { ($1)[1].i = relative($3, $1, 1); /* thenpart */ ($1)[3].i = relative($4, $1, 3); }/* end, if cond fails */ | if cond stmt end ELSE stmt end /* if with else */ { ($1)[1].i = relative($3, $1, 1); /* thenpart */ ($1)[2].i = relative($6, $1, 2); /* elsepart */ ($1)[3].i = relative($7, $1, 3); }/* end, if cond fails */ | '{' { ntab++;} stmtlist '}' { ntab--; $$ = $3; } | eqn_list /* NEWCABLE */ | SECTIONKEYWORD begin sectiondecl { $$ = $2; } | CONNECTKEYWORD section_or_ob ',' expr { TPD; $$ = $2; code(connectsection);} | CONNECTKEYWORD section_or_ob ',' section '(' expr ')' { TPD; $$ = $2; code(simpleconnectsection);} | SETPOINTERKEYWORD rangevar '(' expr ')' ',' pointer { TPD; $$ = $2; code(connectpointer); codesym(spop());} | SETPOINTERKEYWORD begin {code(nrn_cppp);} ob ',' pointer { $$ = $2; code(connect_point_process_pointer); hoc_ob_check(-1);} | ACCESSKEYWORD section { $$ = $2; code(sec_access);} | ACCESSKEYWORD ob { $$ = $2; hoc_ob_check(SECTION); code(sec_access_object);} | INSERTKEYWORD MECHANISM { $$ = Code(mech_access); codesym($2);} | UNINSERTKEYWORD MECHANISM { $$ = Code(mech_uninsert); codesym($2);} | section stmt { code(sec_access_pop);} | ob stmt end { code(sec_access_pop); hoc_ob_check(-1); insertcode($2, $3, ob_sec_access);} | rangevar '(' expr ':' expr ')' ROP expr ':' expr { TPD; TPD; TPD; TPD; code(range_interpolate); codesym(spop()); codei($7); } | rangevar '(' expr ')' ROP expr { TPD; TPD; code(range_interpolate_single); codesym(spop()); codei($5); } | FOR '(' varname ')' {Symbol *s; code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1); $$ = code(for_segment); codei(0); codei(0);} stmt end { $$ = $3; ($5)[1].i = relative($6, $5, 1); /* body */ ($5)[2].i = relative($7, $5, 2); /* exit */ } | FOR '(' varname ',' {Symbol *s; code(varpush); codesym(s = spop()); hoc_obvar_declare(s, VAR, 1);} expr ')' { TPD; $$ = code(for_segment1); codei(0); codei(0);} stmt end { $$ = $3; ($8)[1].i = relative($9, $8, 1); /* body */ ($8)[2].i = relative($10, $8, 2); /* exit */ } | FORALL begin { code(hoc_push_string); codesym((Symbol*)0); $$ = code(forall_section); codei(0); codei(0);} stmt end { $$ = $2; ($3)[1].i = relative($4, $3, 1); /* body */ ($3)[2].i = relative($5, $3, 2); /* exit */ } | FORSEC begin string1 { $$ = code(forall_section); codei(0); codei(0);} stmt end { $$ = $2; ($4)[1].i = relative($5, $4, 1); /* body */ ($4)[2].i = relative($6, $4, 2); /* exit */ } | IFSEC begin string1 { $$ = code(hoc_ifsec); codei(0); codei(0);} stmt end { $$ = $2; ($4)[1].i = relative($5, $4, 1); /* body */ ($4)[2].i = relative($6, $4, 2); /* exit */ } | FORSEC begin ob {hoc_ob_check(-1); $$ = code(forall_sectionlist); codei(0); codei(0); } stmt end { $$ = $2; ($4)[1].i = relative($5, $4, 1); /* body */ ($4)[2].i = relative($6, $4, 2); /* exit */ } | IFSEC begin ob { hoc_ob_check(-1); $$ = code(hoc_ifseclist); codei(0); codei(0); } stmt end { $$ = $2; ($4)[1].i = relative($5, $4, 1); /* body */ ($4)[2].i = relative($6, $4, 2); /* exit */ } /* END NEWCABLE */ ; iterator: ITERATOR '(' arglist ')' { code(hoc_iterator); codesym($1); codei($3); $$ = progp; codein(STOP); codein(STOP); } | {code(hoc_push_current_object);} ob {codei(ITERATOR); $$ = progp; codein(STOP); codein(STOP); } ; /* NEWCABLE */ section: SECTION {pushs($1); pushi(CHECK);} wholearray {code(sec_access_push); codesym(spop()); $$ = $3;} | INTERNALSECTIONNAME { $$ = code(hoc_sec_internal_push); hoc_codeptr($1); } ; section_or_ob: section '(' expr ')' {TPD;} | {$$ = progp; code(connect_obsec_syntax);} ob { #if 0 acterror("Sorry. The \"connect ob.sec...\" syntax ", "is not implemented"); #endif hoc_ob_check(SECTION); code(ob_sec_access); } ; sectiondecl: sectionname { code(add_section); codesym($1); codei(0);} | sectionname numdimen { code(add_section); codesym($1); codei($2);} | sectiondecl ',' sectionname {code(add_section); codesym($3); codei(0);} | sectiondecl ',' sectionname numdimen { code(add_section); codesym($3); codei($4);} ; sectionname:anyname { Symbol* s; s = hoc_decl($1); if (s->type != UNDEF && s->type != SECTION) acterror(s->name, " already declared"); } ; rangevar: rangevar1 { code(sec_access_push); codesym((Symbol *)0);} | section '.' rangevar1 ; rangevar1: RANGEVAR {pushs($1); pushi(CHECK);} wholearray {$$ = $3;} ; pointer: varname /*leave pointer on stack*/ { code3(varpush, spop(), hoc_evalpointer);} | rangevar '(' expr ')' { TPD; code(rangevarevalpointer); codesym(spop());} | ob {hoc_ipop(); code(hoc_ob_pointer);} | rangevar error {myerr("rangevariable needs explicit arc position,eg. v(.5)");} | ARGREF {$$ = argcode(hoc_argrefarg, $1);} ; /* END NEWCABLE */ for_init: FOR '(' stmt ';' { $$ = $3;} | FOR '(' ';' { $$ = progp; } ; for_st: /* nothing */ { $$ = code(forcode); codei(0); codei(0); codei(0); } ; for_cond: expr { TPD; $$ = $1; codein(STOP);} ; for_inc: ';' stmt ')' { $$ = $2; codein(STOP);} | ';' ')' { $$ = progp; codein(STOP);} ; cond: '(' expr ')' { TPD; codein(STOP); $$ = $2;} ; while: WHILE for_st { $$ = $2; } ; if: IF { $$=code(ifcode); codei(0); codei(0); codei(0); } ; begin: /* nothing */ { $$ = progp; } ; end: /* nothing */ { codein(STOP); $$ = progp; } ; stmtlist: /* nothing */ { $$ = progp; prog_error = $$; } | stmtlist '\n' { prog_parse_recover = progp; prog_error = $$; if (nrn_fw_eq(fin, stdin) && !pipeflag) { int i; Printf(">"); for (i = 0; i < ntab; i++) Printf(" "); } } | stmtlist stmt | error {myerr("syntax error in compound statement");} ; expr: NUMBER { $$ = code(constpush); codesym($1); PN;} | NUMZERO { $$ = code(pushzero); PN;} | varname { code3(varpush, spop(), eval); PN;} | ARG { defnonly("$"); $$ = argcode(arg, $1); PN;} | ARGREF argrefdim { defnonly("$&"); $$ = argrefcode(hoc_argref, $1, $2); PN;} /* NEWCABLE */ | rangevar {code(rangepoint); codesym(spop()); PN;} | rangevar '(' expr ')' { TPD; code(rangevareval); codesym(spop()); PN;} /* END NEWCABLE */ /* OOP */ | ob {code(hoc_object_eval);} /* END OOP */ | asgn | function begin '(' arglist ')' { $$ = $2; code(call); codesym($1); codei($4); PN;} | varname '(' arglist ')' /* error will be flagged at runtime */ { code(call); codesym(spop()); codei($3); PN;} | READ '(' varname ')' { $$=$3; code(varread); codesym(spop()); PN;} | BLTIN '(' expr ')' { TPD; $$ = $3; code(bltin); codesym($1); PN;} | '(' expr ')' { $$ = $2; } | '(' error {myerr("syntax error in expression");} | expr '+' expr { TPD; TPD; code(add); PN; } | expr '-' expr { TPD; TPD;code(hoc_sub); PN;} | expr '*' expr { TPD; TPD; code(mul); PN;} | expr '/' expr { TPD; TPD; code(hoc_div); PN;} | expr '%' expr { TPD; TPD; code(hoc_cyclic); PN;} | expr '^' expr { TPD; TPD; code(power); PN;} | '-' expr %prec UNARYMINUS { TPD; $$ = $2; code(negate); PN;} | expr GT expr { TPD; TPD; code(gt); PN;} | expr GE expr { TPD; TPD; code(ge); PN;} | expr LT expr { TPD; TPD; code(lt); PN;} | expr LE expr { TPD; TPD; code(le); PN;} | expr EQ expr { hoc_ob_check(-1); hoc_ob_check(-1); code(eq); PN;} | expr NE expr { hoc_ob_check(-1); hoc_ob_check(-1); code(ne); PN;} | expr AND expr { TPD; TPD; code(hoc_and); PN;} | expr OR expr { TPD; TPD; code(hoc_or); PN;} | NOT expr { TPD; $$ = $2; code(hoc_not); PN;} ; function: FUNCTION | FUN_BLTIN | OBFUNCTION | STRFUNCTION ; doublelist: parseDOUBLE begin newarray {Symbol *s; code(varpush); codesym(s=spop()); $$ = $2; code(arayinstal); codei($3); hoc_obvar_declare(s, VAR, 0);} | doublelist ',' newarray {Symbol *s; code(varpush); codesym(s = spop()); code(arayinstal); codei($3); hoc_obvar_declare(s, VAR, 0);} ; newarray: newname numdimen {pushs($1); $$ = $2;} ; numdimen: '[' expr ']' { TPD; $$ = 1; } | numdimen '[' expr ']' { TPD;$$ = $$ + 1; } ; newname: ckvar ; varname: AUTO begin { pushs($1); $$ = $2; } | VAR begin { if ($1->subtype == USERPROPERTY) { code(sec_access_push); codesym((Symbol *)0); } pushs($1); pushi(CHECK); } wholearray {$$ = $2;} | section '.' VAR { if ($3->subtype != USERPROPERTY) { acterror($3->name, "not a section variable"); } $$ = $1; pushs($3); } ; wholearray:begin array /* using execution stack to get Symbol from array */ /* and whether to do syntactic check or not */ /* object component array may share a name with the current symbol table which is not an array. object component checking done dynamically */ /* numindices, checkflag=1, arraysym -> arraysym */ /* numindices, checkflag=0, arraysym -> arraysym numindices*/ { int d1, chk; Symbol *sym; d1 = ipop(); chk = ipop(); sym = spop(); if (chk) { if (!ISARRAY(sym)) { if (d1) acterror(sym->name, "not an array variable"); }else{ if ( d1 == 0 ) { /*fake index list with all 0's*/ int i; for (i=0; iarayinfo->nsub; i++) { code(pushzero); } } else if ( d1 != sym->arayinfo->nsub) { acterror("wrong # of subscripts",sym->name); } } }else { pushi(d1); /* must check dynamically */ } pushs(sym); } ; argrefdim: array { $$ = ipop(); } ; array: /* Nothing */ { pushi(0); } | array '[' expr ']' { TPD;pushi(ipop() + 1); } ; prlist: expr { TPDYNAM; code(prexpr);} | string1 { code(prstr); } | prlist ',' expr { TPDYNAM; code(prexpr);} | prlist ',' string1 { code(prstr); } ; delsym: VAR { $$ = code(hoc_delete_symbol); codesym($1); } ; defn: FUNC procname {$2->type=FUNCTION; indef=1; } '(' ')' procstmt { code(procret); hoc_define($2); $2->u.u_proc->nobjauto = $6 - localcnt; $2->u.u_proc->nauto=$6; indef=0; } | parsePROC procname { $2->type=PROCEDURE; indef=1; } '(' ')' procstmt { code(procret); hoc_define($2); $2->u.u_proc->nobjauto = $6 - localcnt; $2->u.u_proc->nauto=$6; indef=0; } | ITERKEYWORD procname { $2->type = ITERATOR; indef=2; } '(' ')' procstmt {code(procret); hoc_define($2); $2->u.u_proc->nobjauto = $6 - localcnt; $2->u.u_proc->nauto = $6; indef = 0; } | HOCOBJFUNC procname { $2->type=HOCOBJFUNCTION; indef=3; } '(' ')' procstmt { code(procret); hoc_define($2); $2->u.u_proc->nobjauto = $6 - localcnt; $2->u.u_proc->nauto=$6; indef=0; } ; procname: ckvar { Symbol *s; s=yylval.sym; if(s->type != UNDEF) acterror(s->name, "already defined"); s->u.u_proc = (Proc *)emalloc(sizeof(Proc)); s->u.u_proc->defn.in = STOP; s->u.u_proc->list = (Symlist *)0; } | FUNCTION | PROCEDURE | ITERATOR | HOCOBJFUNCTION ; procstmt: '{' local localobj {ntab++;} stmtlist '}' { ntab--; $$ = $2 + $3; } ; arglist: /* nothing */ { $$ = 0; } | arglist1 ; arglist1: arglist2 {$$ = 1;} | arglist1 ',' arglist2 {$$ = $1 + 1;} ; arglist2: string1 {} | expr { hoc_ob_check(-1);} | '&' pointer | NEW anyname '(' arglist ')' { code(hoc_newobj_arg); codesym(hoc_which_template($2)); codei($4); } ; eqn_list: DEPENDENT dep_list { $$ = $2; } | EQUATION varname ':' {code3(varpush, spop(), eqn_name); do_equation = 1; } equation { $$ = $2; do_equation = 0; } ; dep_list: varname {Symbol *s; code3(varpush,s= spop(), dep_make); hoc_obvar_declare(s, VAR, 0);} | dep_list ',' varname {Symbol *s; code3(varpush, s=spop(), dep_make); hoc_obvar_declare(s, VAR, 0);} ; equation: lhs EQNEQ | EQNEQ rhs | ':' { code(eqn_init); } lhs EQNEQ rhs ; lhs: { code(eqn_lhs); } expr { codein(STOP); TPD; } ; rhs: { code(eqn_rhs); } expr { codein(STOP); TPD; } ; local: /* nothing */ { $$ = 0; localcnt = $$;} | local1 ; local1: LOCAL anyname { Symbol *sp; $$ = 1; localcnt = $$; sp = install($2->name, AUTO, 0.0, &p_symlist); sp->u.u_auto = $$; } | local1 ',' anyname { Symbol *sp; $$ = $1 + 1; localcnt = $$; if (hoc_table_lookup($3->name, p_symlist)) { acterror($3->name, "already declared local"); } sp = install($3->name, AUTO, 0.0, &p_symlist); sp->u.u_auto = $$; } ; localobj: /* nothing */ { $$ = 0;} | local2 ; local2: LOCALOBJ anyname { Symbol *sp; $$ = 1; if (hoc_table_lookup($2->name, p_symlist)) { acterror($2->name, "already declared local"); } sp = install($2->name, AUTOOBJ, 0.0, &p_symlist); sp->u.u_auto = $$ + localcnt; } | local2 ',' anyname { Symbol *sp; $$ = $1 + 1; if (hoc_table_lookup($3->name, p_symlist)) { acterror($3->name, "already declared local"); } sp = install($3->name, AUTOOBJ, 0.0, &p_symlist); sp->u.u_auto = $$ + localcnt; } ; ckvar: VAR { Symbol* s; s = hoc_decl($1); if (s->subtype != NOTUSER) acterror("can't redeclare user variable", s->name); $$ = s; } ; anyname: STRING|VAR|UNDEF|FUNCTION|PROCEDURE|FUN_BLTIN|SECTION|RANGEVAR |NRNPNTVAR|OBJECTVAR|TEMPLATE|OBFUNCTION|AUTO|AUTOOBJ|SECTIONREF |MECHANISM|BLTIN|STRFUNCTION|HOCOBJFUNCTION|ITERATOR|STRINGFUNC |OBJECTFUNC ; %% /* end of grammar */ static void yyerror(const char* s) /* called for yacc syntax error */ { execerror(s, (char *)0); } void acterror(const char* s, const char*t) /* recover from action error while parsing */ { execerror(s,t); } static Inst* argrefcode(Pfrv pfrv, int i, int j){ Inst* in; in = argcode(pfrv, i); codei(j); return in; } static Inst* argcode(Pfrv pfrv, int i) { Inst* in; if (i == 0) { Symbol* si = hoc_lookup("i"); if (si->type != AUTO) { acterror("arg index used and i is not a LOCAL variable", 0); } in = code3(varpush, si, eval); Code(pfrv); codei(0); }else{ in = Code(pfrv); codei(i); } return in; } static void hoc_opasgn_invalid(int op) { if (op) { acterror("Invalid assignment operator.", "Only '=' allowed. "); } } neuron-7.5/src/oc/plot.c000077500000000000000000000514501323325274500152230ustar00rootroot00000000000000#include <../../nrnconf.h> #include "hoc.h" /*LINTLIBRARY*/ #undef IGNORE #if LINT #define IGNORE(arg) {if(arg);} #else #define IGNORE(arg) arg #endif #if GRX #include #include "hoc.h" #define __TURBOC__ #endif #if defined(useNeXTstep) || defined(__TURBOC__) || defined(__linux__) #ifndef NRNOC_X11 #define NRNOC_X11 0 #endif #endif #define FIG 1 /* 12/8/88 add fig style output , replaces hpflag*/ #define TEK 1 #define HP 1 /* but not VT125 */ #define CODRAW 1 #if CODRAW static void Codraw_plt(int, double, double); static void Codraw_preamble(void); #endif #if HP static void hplot(int, double, double); #endif #if FIG static void Fig_preamble(void); static void Fig_plt(int, double, double); void Fig_file(const char*, int); #endif #if TEK static void tplot(int, double, double); #endif #include #include #if defined(__MINGW32__) extern char** _environ; #else /*!__MINGW32__*/ #if HAVE_UNISTD_H #include #if !defined(__APPLE__) extern char** environ; #else /* __APPLE */ #include #endif /* __APPLE__ */ #endif /* HAVE_UNISTD_H */ #endif /*!__MINGW32__*/ #if DOS #include #include #endif #if defined(GRX) #define DOS 1 #endif static int console = 1; /* 1 plotting to console graphics */ static int hardplot; /* 1 hp style 2 fig style 3 coplot*/ static int graphdev; static int hpflag; /* hp plotter switch */ int hoc_plttext; /* text can be printed to hpdev */ #define text hoc_plttext static FILE *gdev; /* system call stdout not directed to here */ static FILE *hpdev; /* hp, or fig style file */ static FILE *cdev; /* console device */ #define SSUN 1 #define VT 2 #define SEL 3 #define TEK4014 4 #define ADM 5 #define NX 6 #define US 037 #define GS 035 #define CAN 030 #define EM 031 #define FS 034 #define ESC 033 #define ETX 03 static char vt100[] = "TERM=vt125"; static char adm3a[] = "TERM=adm3a"; static char ssun[] = "TERM=sun"; static char tek4014[] = "TERM=4014"; static char ncsa[] = "NEURON=ncsa"; int hoc_color = 15; static double xlast, ylast; #if NRNOC_X11 extern void x11_put_text(const char*), x11_close_window(void), x11_setcolor(int); extern void x11_coord(), x11_vector(), x11_point(), x11_move(), x11flush(); extern void x11_clear(), x11_cleararea(), x11_open_window(), x11_fast(); static void hoc_x11plot(int, double, double); #endif #if NeXTstep extern void NeXT_put_text(), NeXT_close_window(), NeXT_setcolor(); extern void NeXT_coord(), NeXT_vector(), NeXT_point(), NeXT_move(), NeXTflush(); extern void NeXT_clear(), NeXT_cleararea(), NeXT_open_window(), NeXT_fast(); #endif static void hard_text_preamble(); #if defined(__TURBOC__) int egagrph = 0; /* global because need to erase on quit if in graphics mode */ static int graphmode = 0; static double xres=640., yres=350.; static tplt(); void *_graphgetmem(unsigned size) { char *p; p= hoc_Emalloc(size), hoc_malchk() ; return p; } static void Initplot(void) { #if !defined(__GO32__) registerfarbgidriver(EGAVGA_driver_far); registerfarbgidriver(CGA_driver_far); registerfarbgidriver(Herc_driver_far); registerfarbgifont(triplex_font_far); #endif graphdev = DETECT; initgraph(&graphdev, &graphmode,"c:\\bc\\bgi"); {int err; graphdev=1; err = graphresult(); if (err != grOk) { hoc_execerror("Error in initializing graphics adaptor\n", (char *)0); } xres = (double)(getmaxx()+1); yres = (double)(getmaxy()+1); grx_txt_clear(); return; } if (graphdev > 0) { xres = (double)(getmaxx()+1); yres = (double)(getmaxy()+1); restorecrtmode(); } else { hoc_execerror("Error in initializing graphics adaptor\n", (char *)0); } } #endif void plprint(const char* s) { #if DOS extern int newstyle; extern unsigned text_style, text_size, text_orient; #endif char buf[128]; if (text && s[strlen(s) - 1] == '\n') { IGNORE(strcpy(buf, s)); s = buf; buf[strlen(s)-1] = '\0'; } if (console && text) { #if DOS if (egagrph == 2) { if (newstyle) { settextstyle(text_style,text_orient,text_size); newstyle = 0; } outtext(s); }else{ IGNORE(fprintf(cdev, "%s", s)); } #else #if SUNCORE hoc_pl_sunplot(s); #else #if NRNOC_X11 x11_put_text(s); #else #if NeXTstep if (graphdev == NX) NeXT_put_text(s); #else IGNORE(fprintf(cdev, "%s", s)); IGNORE(fflush(cdev)); #endif #endif #endif #endif } else if (!text) { #if GRX if (egagrph) { hoc_outtext(s); }else #endif { #if 0 IGNORE(fprintf(stdout, "%s", s)); #else nrnpy_pr("%s", s); #endif } } if (hardplot && hpdev && text && strlen(s)) { hard_text_preamble(); IGNORE(fprintf(hpdev, "%s", s)); IGNORE(fflush(hpdev)); } if (text && s == buf) { plt(1, xlast, ylast-20); plt(-2, 0.,0.); } } #if GRX static int trcur; static GrTextRegion* gtr; #define GRXCOL 80 #define GRXROW 5 void grx_move(int r, int c){ r = r%GRXROW; c = c%GRXCOL; trcur = c + r*GRXCOL; } void grx_rel_move(int new){ trcur = ((int)(trcur/GRXCOL))*GRXCOL + new; } void grx_output_some_chars(const char* string, int count) { if (string[count] == '\0') { hoc_outtext(string); }else{ hoc_outtext("non-terminated string\n"); } } void grx_delete_chars(int count) { int i; int j = trcur; for (i=0; i < count; ++i) { gtr->txr_buffer[j++] = ' '; } GrDumpTextRegion(gtr); } grx_insert_some_chars(string, count) char* string; int count; { int i, j; i = trcur + count; j = trcur + count; while(i >= trcur) { gtr->txr_buffer[j--] = gtr->txr_buffer[i--]; } i = trcur; grx_output_some_chars(string, count); trcur = i; } grx_backspace(count) int count; { while (count--) { trcur--; } } grx_clear_to_eol() { int j = trcur; do { gtr->txr_buffer[j] = ' '; }while ((++j)%GRXCOL); GrDumpTextRegion(gtr); } grx_force_text() { int i; for (i=0; i < GRXCOL*GRXROW; ++i) { gtr->txr_backup[i] = '\0'; } GrDumpTextRegion(gtr); } grx_txt_clear() { int i; if (!gtr) { gtr = (GrTextRegion*)emalloc(sizeof(GrTextRegion)); gtr->txr_font = (GrFont*)0; gtr->txr_buffer = (char*)ecalloc(GRXCOL*GRXROW, sizeof(char)); gtr->txr_backup = (char*)ecalloc(GRXCOL*GRXROW, sizeof(char)); gtr->txr_xpos = 0; gtr->txr_ypos = 0; gtr->txr_width = GRXCOL; gtr->txr_height = GRXROW; gtr->txr_lineoffset = GRXCOL; gtr->txr_fgcolor.v = 7; gtr->txr_bgcolor.v = 0; gtr->txr_chrtype = GR_BYTE_TEXT; } for (i=0; i < GRXCOL*GRXROW; ++i) { gtr->txr_buffer[i] = ' '; } trcur = 0; GrDumpTextRegion(gtr); } hoc_outtext(s) char* s; { int i; char* cp; int ch; if (!egagrph) { return; } if (! gtr) { grx_txt_clear(); } for (cp = s; *cp; ++cp) { ch = *cp; if (*cp == '\n' || trcur >= GRXROW*GRXCOL) { char* c1, *c2; int j; for (i=1; i < GRXROW; ++i) { c1 = gtr->txr_buffer + (i-1)*GRXCOL; c2 = gtr->txr_buffer + (i)*GRXCOL; for (j =0; j < GRXCOL; ++j) { c1[j] = c2[j]; } } for (i=0; i < GRXCOL; ++i) { c2[i] = ' '; } trcur = (GRXROW-1)*GRXCOL; continue; } if (ch == '\t') { ch = ' '; } gtr->txr_buffer[trcur++] = ch; } GrDumpTextRegion(gtr); } #endif void initplot(void) { #if !defined(__MINGW32__) /* to end of function */ int i; #if defined (__APPLE__) char** environ=(*_NSGetEnviron()); #endif #if defined(__TURBOC__) graphdev = 0; #else #if NeXTstep graphdev = NX; #else graphdev = SSUN; for (i = 0; environ[i] != NULL; i++) { if (strcmp(environ[i], vt100) == 0) graphdev = VT; if (strcmp(environ[i], ssun) == 0) graphdev = SSUN; if (strcmp(environ[i], adm3a) == 0) graphdev = ADM; if (strcmp(environ[i], tek4014) == 0) graphdev = TEK4014; if (strcmp(environ[i], ncsa) == 0) graphdev = TEK4014; } #endif /*!NeXTstep*/ #endif /*!__TURBOC__*/ hpdev = (FILE *)0; cdev = gdev = stdout; #if SUNCORE if (graphdev == SSUN) { hoc_open_sunplot(environ); #else #if NeXTstep /*EMPTY*/ if (graphdev == SSUN) { #else #if NRNOC_X11 /*EMPTY*/ if (graphdev == SSUN) { #else if (graphdev == SSUN) { /* if (graphdev == SSUN &&(cdev = fopen("/dev/ttyp4", "w")) == (FILE *)0) { IGNORE(fprintf(stderr, "Can't open /dev/ttyp4 for TEK\n")); cdev = stdout; */ #endif /*NRNOC_X11*/ #endif /*NeXTstep*/ #endif /*SUNCORE*/ } else { if (graphdev == TEK4014) { cdev = gdev = stdout; } } #endif /*!__MINGW32__*/ } void hoc_close_plot(void) { #if DOS if (egagrph) plt(-3,0.,0.); #else #if SUNCORE hoc_close_sunplot(); #else #if NRNOC_X11 x11_close_window(); #else #if NeXTstep NeXT_close_window(); #endif #endif #endif #endif } void plt(int mode, double x, double y) { if (x < 0.) x = 0.; if (x > 1000.) x = 1000.; if (y < 0.) y = 0.; if (y > 780.) y = 780.; if (mode >= 0) { xlast = x; ylast = y; } if (console) { #if defined(__TURBOC__) if(graphdev > 0) { tplt(mode, x, y); } else if (graphdev == 0) { Initplot(); tplt(mode, x, y); } #else switch (graphdev) { case SSUN: #if SUNCORE hoc_sunplot(&text, mode, x, y); break; #else #if NRNOC_X11 hoc_x11plot(mode,x,y); break; #else #if NeXTstep break; case NX: hoc_NeXTplot(mode,x,y); break; #endif #endif #endif #if TEK case ADM: case SEL: case TEK4014: tplot(mode, x, y); break; #endif #if VT125 case VT: vtplot(mode, x, y); break; #endif } #endif } #if HP if (hardplot == 1) { hplot(mode, x, y); } #endif #if FIG if (hardplot == 2) { Fig_plt(mode, x, y); } #endif #if CODRAW if (hardplot == 3) { Codraw_plt(mode, x, y); } #endif if (hardplot && hpdev) { IGNORE(fflush(hpdev)); } if (console && cdev) { IGNORE(fflush(cdev)); } } #if TEK #define XHOME 0 #define YHOME 770 static void tplot(int mode, double x, double y) { unsigned ix, iy; int hx,hy,ly,lx; if (graphdev == SEL) { IGNORE(putc(ESC, cdev)); IGNORE(putc('1', cdev)); } if (mode < 0) { switch (mode) { default: case -1: /* home cursor */ switch (graphdev) { case ADM: /* to adm3a alpha mode */ IGNORE(putc(US, cdev)); IGNORE(putc(CAN, cdev)); break; case TEK4014: default: IGNORE(putc(GS, cdev)); hy = ( ((YHOME & 01777) >> 5) + 32); ly = ( (YHOME & 037) + 96); hx = ( ((XHOME & 01777) >> 5) + 32); lx = ( (XHOME & 037) + 64); IGNORE(fprintf(cdev, "%c%c%c%c", hy, ly, hx, lx)); IGNORE(putc(US, cdev)); break; } text = 0; return; case -2: /* to 4010 alpha mode */ IGNORE(putc(GS, cdev)); IGNORE(putc(US, cdev)); text = 1; return; case -3: /* erase, and go to alpha on ADM */ switch (graphdev) { case ADM: IGNORE(putc(GS, cdev)); IGNORE(putc(EM, cdev)); IGNORE(putc(US, cdev)); IGNORE(putc(CAN, cdev)); break; case TEK4014: default: IGNORE(putc(ESC, cdev)); IGNORE(putc(014, cdev)); break; } text = 0; return; } } switch (mode) { case 0: /* enter point mode */ /*IGNORE(putc(FS, cdev)); break;*/ /* no point mode on pure 4014 so plot vector of 0 length*/ case 1: /* enter vector mode */ IGNORE(putc(GS, cdev)); break; } iy = y; ix = x; hy = ( ((iy & 01777) >> 5) + 32); ly = ( (iy & 037) + 96); hx = ( ((ix & 01777) >> 5) + 32); lx = ( (ix & 037) + 64); IGNORE(fprintf(cdev, "%c%c%c%c", hy, ly, hx, lx)); if (mode == 0) { IGNORE(fprintf(cdev, "%c%c%c%c", hy, ly, hx, lx)); } return; } #endif /*TEK*/ #if FIG || HP || CODRAW static char hardplot_filename[100]; void hardplot_file(const char* s) { if (hpdev) { IGNORE(fclose(hpdev)); } hpdev = (FILE *)0; hpflag = 0; hardplot = 0; gdev = stdout; if (s) { hpdev = fopen(s, "w"); if (hpdev) { strncpy(hardplot_filename, s, 99); hpflag = 1; gdev = hpdev; }else{ IGNORE(fprintf(stderr, "Can't open %s for hardplot output\n", s)); } }else{ hardplot_filename[0]='\0'; } } void Fig_file(const char* s, int dev) { plt(-1, 0., 0.); hardplot_file(s); if (!hpdev) return; hardplot = dev; #if FIG if (hardplot == 2) { Fig_preamble(); } #endif #if CODRAW if (hardplot == 3) { Codraw_preamble(); } #endif } #endif static char fig_text_preamble[100]; static void hard_text_preamble(void) { if (hardplot == 2) { IGNORE(fprintf(hpdev, "%s", fig_text_preamble)); fig_text_preamble[0] = '\0'; } } #if FIG static void Fig_preamble(void) { static char fig_preamble[] = "#FIG 1.4\n80 2\n"; if (!hpdev) return; IGNORE(fprintf(hpdev,"%s", fig_preamble)); } #define HIRES 1 void Fig_plt(int mode, double x, double y) { #define SCX(x) ((int)(x*.8)) #define SCY(y) (600-(int)(y*.8)) #if HIRES #define SCXD(x) ((x*.8)) #define SCYD(y) (7.5*80.-(y*.8)) #endif #undef TEXT #define TEXT 1 #define LINE1 2 #define LINE2 3 static short state=0; static double oldx, oldy; static char text_preamble[] = "4 0 0 16 0 0 0 0.000 1 16 40 ", text_postamble[]="\1\n", #if HIRES line_preamble[]="7 1 0 1 0 0 0 0 0.000 0 0\n", #else line_preamble[]="2 1 0 1 0 0 0 0 0.000 0 0\n", #endif line_postamble[]=" 9999 9999\n"; if (!hpdev) return; if (state == TEXT) { if (!fig_text_preamble[0]) { IGNORE(fprintf(hpdev, "%s", text_postamble)); } state = 0; text = 0; } if (mode < 0) { if (state == LINE2) { IGNORE(fprintf(hpdev, "%s", line_postamble)); } text = 0; state = 0; if (mode == -2) { IGNORE(sprintf(fig_text_preamble, "%s %d %d ", text_preamble, SCX(oldx), SCY(oldy))); state = TEXT; text = 1; return; } if (mode == -3) { #if 0 IGNORE(fseek(hpdev, 0L, 0)); Fig_preamble(); #else Fig_file(hardplot_filename,2); #endif } }else { switch (mode) { case 0: break; case 1: if (state == LINE2) { IGNORE(fprintf(hpdev, "%s", line_postamble)); } state = LINE1; break; default: if (state == LINE1) { #if HIRES IGNORE(fprintf(hpdev, "%s %.1f %.1f\n", line_preamble, SCXD(oldx), SCYD(oldy))); #else IGNORE(fprintf(hpdev, "%s %d %d\n", line_preamble, SCX(oldx), SCY(oldy))); #endif state = LINE2; } #if HIRES IGNORE(fprintf(hpdev, " %.1f %.1f\n", SCXD(x), SCYD(y))); #else IGNORE(fprintf(hpdev, " %d %d\n", SCX(x), SCY(y))); #endif break; } oldx=x; oldy=y; } } #endif /*FIG*/ #if HP void hplot(int mode, double x, double y) { static short hpflag=0; static short txt = 0; if (!hpdev) return; if (hpflag == 0) { hpflag = 1; IGNORE(fprintf(hpdev, "%c.Y%c.I81;;17:%c.N;19:SC 0,1023,0,780;SP 1;", ESC, ESC, ESC)); } if (txt == 1) { IGNORE(fprintf(hpdev, "%c;", ETX)); txt = 0; text = 0; } if (mode < 0) switch (mode) { case -2: IGNORE(fprintf(hpdev, "LB")); txt = 1; text=1; return; case -3: txt=0; text = 0; hpflag=0; IGNORE(fseek(hpdev, 0L, 0)); return; default: IGNORE(fprintf(hpdev, "PU;SP;%c.Z", ESC)); txt = 0; text = 0; hpflag = 0; return; } switch (mode) { case 0: IGNORE(fprintf(hpdev, "PU %8.2f,%8.2f;PD;", x, y)); return; case 1: IGNORE(fprintf(hpdev, "PU %8.2f,%8.2f;", x, y)); return; default: IGNORE(fprintf(hpdev, "PD %8.2f,%8.2f;", x, y)); return; } } #endif /*HP*/ /* not modified for new method */ #if VT125 void vtplot(int mode, double x, double y) { static short vtgrph = 0; int vtx, vty; if (mode < 0) { IGNORE(fprintf(gdev, "%c\\%c", ESC, ESC)); switch (mode) { default: case -1: /* vt125 alpha mode */ break; case -2: /* graphics text mode */ IGNORE(fprintf(gdev, "P1pt\'")); vtgrph = 2; return; case -3: /* erase graphics */ IGNORE(fprintf(gdev, "P1pS(E)")); break; case -4: /* erase text */ IGNORE(fprintf(gdev, "[2J")); break; case -5: /* switch to HP plotter */ IGNORE(fprintf(gdev, "%c\\%c[5i", ESC, ESC)); /* esc and open port */ vtgrph = 0; hplot(-5, 0., 0.); return; } IGNORE(fprintf(gdev, "%c\\", ESC)); vtgrph = 0; return; } if (vtgrph == 2) { IGNORE(fprintf(gdev, "%c\\", ESC)); vtgrph = 0; } if (vtgrph == 0) { IGNORE(fprintf(gdev, "%cP1p", ESC)); vtgrph = 1; } vtx = (int) ((767./1023.)*x); vty = (int) (479. - (479/779.)*y); if (mode >= 2) { IGNORE(fprintf(gdev, "v[%d,%d]", vtx, vty)); return; } IGNORE(fprintf(gdev, "p[%d,%d]", vtx, vty)); if (mode == 0) IGNORE(fprintf(gdev, "v[]")); return; } #endif /*VT*/ int set_color(int c) { if (c >= 0 || c < 128) { hoc_color = c; } #if defined(__TURBOC__) if (egagrph) { setcolor(hoc_color); } #else #if SUNCORE set_line_index(c); set_text_index(c); #else #if NRNOC_X11 x11_setcolor(c); #else #if NeXTstep NeXT_setcolor(c); #endif #endif #endif #endif return (int) hoc_color; } #if defined(__TURBOC__) #define UN unsigned int static void tplt(int mode, double x, double y) { #if DOS extern int newstyle; #endif int ix, iy; if (egagrph == 0) { setgraphmode(graphmode); setcolor(hoc_color); egagrph = 1; #if DOS newstyle = 1; #endif } if (mode < 0) { text = 0; switch (mode) { default: case -1: if (egagrph) { egagrph=1; } cursor(0,0); break; case -2: /* graphics text mode */ egagrph=2; text = 1; return; case -3: /* erase graphics */ restorecrtmode(); egagrph = 0; break; #if GRX case -4: grx_txt_clear(); break; case -5: GrClearScreen(0); grx_force_text(); break; } #endif return; } ix = ((xres -1.)/1023.)*x; iy = (yres-1.) - ((yres-1.)/779.)*y; if (mode >= 2) { lineto(ix, iy); } if (mode == 1) { moveto(ix, iy); } if (mode == 0) { moveto(ix, iy); lineto(ix, iy); } return; } void cursor(int r, int c) { #if !defined(__GO32__) int ax, dx; ax = 2*256; dx = (r&255)*256 + c&255; _AX = ax; _BX = 0; _DX = dx; geninterrupt(0x10); #endif } #endif #if CODRAW #define CODRAW_MAXPOINT 200 static int codraw_npoint = 0; static float *codraw_pointx, *codraw_pointy; static void codraw_line(); void Codraw_preamble() { static char codraw_preamble[] = "SW(1,0,8,0,8);\nST(1);\nSG(0.1);\n\ SF(1,'HELVET-L');\nSF(2,'HELVET');\nSF(3,'CENTURY');\nSF(4,'SCRIPT');\n\ SF(5,'GREEK');\nSP(1);\nLT(1);LW(1);LC(15);LD(50);\nTF(1);TW(1);TS(0);TC(15);\ TL(1);TV(4);TA(0);TH(0.2);\n"; if (!hpdev) return; IGNORE(fprintf(hpdev,"%s", codraw_preamble)); codraw_npoint = 0; if (!codraw_pointy) { codraw_pointx = (float *)hoc_Emalloc(CODRAW_MAXPOINT*sizeof(float)); codraw_pointy = (float *)hoc_Emalloc(CODRAW_MAXPOINT*sizeof(float)); hoc_malchk(); } } void Codraw_plt(mode, x, y) int mode; double x, y; { #undef SCXD #undef SCYD #define SCXD(x) ((x*.008)) #define SCYD(y) ((y*.008)) #undef TEXT #undef LINE1 #undef LINE2 #define TEXT 1 #define LINE1 2 #define LINE2 3 static short state=0; static double oldx, oldy; if (!hpdev) return; if (state == TEXT) { IGNORE(fprintf(hpdev, "');\n")); state = 0; text = 0; } if (mode < 0) { if (state == LINE2) { codraw_line(); } text = 0; state = 0; if (mode == -2) { IGNORE(fprintf(hpdev, "TT(%.2f,%.2f,'", SCXD(oldx), SCYD(oldy))); state = TEXT; text = 1; return; } if (mode == -3) { IGNORE(fseek(hpdev, 0L, 0)); Codraw_preamble(); } }else { switch (mode) { case 0: break; case 1: if (state == LINE2) { codraw_line(); } state = LINE1; break; default: if (state == LINE1) { codraw_npoint = 1; codraw_pointx[0] = oldx; codraw_pointy[0] = oldy; state = LINE2; } codraw_pointx[codraw_npoint] = x; codraw_pointy[codraw_npoint] = y; if (++codraw_npoint == CODRAW_MAXPOINT) { codraw_line(); } break; } oldx=x; oldy=y; } } static void codraw_line() { int i; if (codraw_npoint < 2) { codraw_npoint = 0; return; } IGNORE(fprintf(hpdev, "LL(%d", codraw_npoint)); for (i=0; i= 0) { x11_coord(x, y); } if (mode > 1) { x11_vector(); }else { switch (mode) { case 0: x11_point(); break; case 1: x11_move(); break; case -1: text = 0; x11flush(); break; case -2: text = 1; break; case -3: x11_clear(); break; case -4: x11_coord(x, y); x11_cleararea(); break; case -5: x11_fast(1); break; case -6: x11_fast(0); } } } #endif /*NRNOC_X11*/ #if NeXTstep /* extern char *getenv(); */ static hoc_NeXTplot(mode, x, y) int mode; double x, y; { extern int NeXT_init_done; if (!NeXT_init_done) { NeXT_open_window(); } if (mode >= 0) { NeXT_coord(x, y); } if (mode > 1) { NeXT_vector(); }else { switch (mode) { case 0: NeXT_point(); break; case 1: NeXT_move(); break; case -1: text = 0; NeXTflush(); break; case -2: text = 1; break; case -3: NeXT_clear(); break; case -4: NeXT_coord(x, y); NeXT_cleararea(); break; case -5: NeXT_fast(1); break; case -6: NeXT_fast(0); break; case -7: NeXT_fast(-1); break; } } } #endif /*NeXTstep*/ neuron-7.5/src/oc/plt.c000077500000000000000000000016261323325274500150440ustar00rootroot00000000000000#include <../../nrnconf.h> #define FIG 1/* version 7.1.1 12/8/88 added plots in fig format */ #include "hoc.h" extern void Fig_file(const char*, int); #if !defined(CYGWIN) void Plt(void) { int mode; double x, y; #ifndef WIN32 mode = *getarg(1); if (mode >= 0 || ifarg(2)) { if ((x = *getarg(2)) > 2047) x = 2047; else if (x < 0) x = 0; if ((y = *getarg(3)) > 2047) y = 2047; else if (y < 0) y = 0; }else{ x=y=0.; } plt(mode, x, y); #endif ret(); pushx(1.); } void Setcolor(void) { double i; i = set_color((int)*getarg(1)); ret(); pushx(i); } void hoc_Lw(void) { char *s; static int dev=2; #ifndef WIN32 if (ifarg(1)) { s = gargstr(1); if (ifarg(2)) { dev = *getarg(2); } if (s[0] != '\0') { Fig_file(s, dev); } else { Fig_file((char *)0, dev); } } else { Fig_file((char *) 0, dev); } #endif ret(); pushx(0.); } #endif /*!defined(CYGWIN)*/ neuron-7.5/src/oc/prmat.c000077500000000000000000000002661323325274500153670ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../sparse/prmat.c" neuron-7.5/src/oc/profile.h000077500000000000000000000005001323325274500157000ustar00rootroot00000000000000#ifndef profile_h #ifdef __cplusplus extern "C" { #endif extern void start_profile(int); extern void add_profile(int); #ifdef __cplusplus } #endif #if defined(PROFILE) && PROFILE > 0 #define PSTART(i) start_profile(i); #define PSTOP(i) add_profile(i); #else #define PSTART(i) /**/ #define PSTOP(i) /**/ #endif #endif neuron-7.5/src/oc/redef.h000077500000000000000000000072561323325274500153440ustar00rootroot00000000000000/* /local/src/master/nrn/src/oc/redef.h,v 1.3 1994/10/28 15:18:01 hines Exp */ #ifndef hoc_redef_h #define hoc_redef_h # define Break hoc_Break # define Continue hoc_Continue # define Exp hoc_Exp # define Fprint hoc_Fprint # define Fscan hoc_Fscan # define Log hoc_Log # define Log10 hoc_Log10 # define Plt hoc_Plt # define plt hoc_plt # define color hoc_color # define Setcolor hoc_Setcolor # define set_color hoc_set_color # define Pow hoc_Pow # define PRintf hoc_PRintf # define Sqrt hoc_Sqrt # define System hoc_System # define Xred hoc_Xred # define acterror hoc_acterror # define add hoc_add # define arayinstal hoc_arayinstal # define free_arrayinfo hoc_free_arrayinfo # define araypt hoc_araypt # define arg hoc_arg # define argassign hoc_argassign # define assign hoc_assign # define assstr hoc_assstr # define begin hoc_begin # define bltin hoc_bltin # define call hoc_call # define call_ob_proc hoc_call_ob_proc # define cbuf hoc_cbuf # define Code hoc_Code # define codei hoc_codei # define codesym hoc_codesym # define codein hoc_codein # define constpush hoc_constpush # define pushzero hoc_pushzero # define ctp hoc_ctp # define debug hoc_debug # define debugzz hoc_debugzz # define defnonly hoc_defnonly # define dep_make hoc_dep_make # define do_equation hoc_do_equation # define edit hoc_edit # define eq hoc_eq # define eqinit hoc_eqinit # define eqn_init hoc_eqn_init # define eqn_lhs hoc_eqn_lhs # define eqn_name hoc_eqn_name # define eqn_rhs hoc_eqn_rhs # define eqn_side hoc_eqn_side # define errcheck hoc_errcheck # define eval hoc_eval # define execerror hoc_execerror # define execute hoc_execute # define fin hoc_fin # define follow hoc_follow # define forcode hoc_forcode # define shortfor hoc_shortfor # define fout hoc_fout # define fpecatch hoc_fpecatch # define free_list hoc_free_list # define frin hoc_frin # define funcret hoc_funcret # define gargstr hoc_gargstr # define getarg hoc_getarg # define gargc hoc_gargc # define gargv hoc_gargv # define ge hoc_ge # define getnb hoc_getnb # define gt hoc_gt # define ifcode hoc_ifcode # define indef hoc_indef # define infile hoc_infile # define init_access hoc_init_access # define initcode hoc_initcode # define insertcode hoc_insertcode # define install hoc_install # define integer hoc_integer # define intset hoc_intset # define ired hoc_ired # define xred hoc_xred # define sred hoc_sred # define le hoc_le # define lineno hoc_lineno # define lookup hoc_lookup # define lt hoc_lt # define moreinput hoc_moreinput # define mul hoc_mul # define ne hoc_ne # define negate hoc_negate # define onintr hoc_onintr # define p_symlist hoc_p_symlist # define parserror hoc_parserror # define pc hoc_pc # define pipeflag hoc_pipeflag # define pipeflush hoc_pipeflush # define pipegetc hoc_pipegetc # define pipeungetc hoc_pipeungetc # define xpop hoc_xpop # define spop hoc_spop # define ipop hoc_ipop # define nopop hoc_nopop # define power hoc_power # define prexpr hoc_prexpr # define print hoc_print # define plprint hoc_plprint # define procret hoc_procret # define prog hoc_prog # define prog_parse_recover hoc_prog_parse_recover # define progbase hoc_progbase # define progname hoc_progname # define progp hoc_progp # define prstr hoc_prstr # define pushx hoc_pushx # define pushs hoc_pushs # define pushi hoc_pushi # define push_frame hoc_push_frame # define pop_frame hoc_pop_frame # define ret hoc_ret # define ropen hoc_ropen # define run hoc_run # define solve hoc_solve # define spinit hoc_spinit # define symbols hoc_symbols # define symlist hoc_symlist # define var_access hoc_var_access # define varpush hoc_varpush # define varread hoc_varread # define warning hoc_warning # define wopen hoc_wopen # define xopen hoc_xopen # define zzdebug hoc_zzdebug #endif neuron-7.5/src/oc/regexp.c000077500000000000000000000177461323325274500155510ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/regexp.c,v 1.1.1.1 1994/10/12 17:22:13 hines Exp */ /* regexp.c,v * Revision 1.1.1.1 1994/10/12 17:22:13 hines * NEURON 3.0 distribution * * Revision 2.19 93/02/02 10:34:37 hines * static functions declared before used * * Revision 1.3 92/07/31 12:11:31 hines * following merged from hoc * The regular expression has been augmented with * {istart-iend} where istart and iend are integers. The expression matches * any integer that falls in this range. * * Revision 1.2 92/01/30 08:17:19 hines * bug fixes found in hoc incorporated. if()return, no else, objectcenter * warnings. * * Revision 1.1 91/10/11 11:12:16 hines * Initial revision * * Revision 3.108 90/10/24 09:44:14 hines * saber warnings gone * * Revision 3.58 90/05/17 16:30:52 jamie * changed global functions to start with hoc_ * moved regexp.c from project 'neuron' to 'hoc' * * Revision 1.25 89/08/31 10:28:46 mlh * regular expressions for issection() * differences between standard regular expressions are: * allways match from beginning to end of target (implicit ^ and $) * change [] to <> * eliminate \( * * Revision 1.2 89/08/31 09:22:17 mlh * works as in e.c and lint free * * Revision 1.1 89/08/31 08:24:59 mlh * Initial revision * */ /* regular expression match for section names grabbed prototype from e.c Use by first compiling the search string with hoc_regexp_compile(pattern) Then checking target strings one at a time with hoc_regexp_search(target) */ #include #include "hocdec.h" #define CABLESECTION 1 /* Always match from beginning of string (implicit ^), Always match end of string (implicit $), change [] to <>, eliminate \( */ #define STAR 01 #define SUFF '.' #define TILDE '~' #define EREGEXP 24 #define error(enum) hoc_execerror("search string format error", pattern) #define CBRA 1 #define CCHR 2 #define CDOT 4 #define CCL 6 #define NCCL 8 #define CDOL 10 #define CEOF 11 #define CKET 12 #if CABLESECTION #define INTRANGE 14 #endif #define NBRA 5 #define ESIZE 128 #define eof '\0' static char expbuf[ESIZE+4]; static char *pattern = ""; static char *loc1; static char *loc2; static char *locs; static char *braslist[NBRA]; static char *braelist[NBRA]; static int circfl; #if CABLESECTION static int int_range_start[NBRA]; static int int_range_stop[NBRA]; #endif static int advance(char* lp, char* ep); static int hoc_cclass(char* set, char c, int af); void hoc_regexp_compile(const char* pat) { char *cp = (char*)pat; register int c; register char *ep; char *lastep=0; #if (!CABLESECTION) char bracket[NBRA], *bracketp; int nbra; #else int int_range_index = 0; #endif int cclcnt; int tempc; if (!cp) { pattern = ""; error(EREGEXP); } if (pattern == cp && strcmp(pattern, cp)) { /* if previous pattern != cp then may have been freed */ return; } pattern = cp; ep = expbuf; #if (!CABLESECTION) bracketp = bracket; nbra = 0; #endif if ((c = *cp++)== '\n') { cp--; c = eof; } if (c==eof) { if (*ep==0) error(EREGEXP); return; } #if CABLESECTION circfl = 1; #else circfl = 0; if (c=='^') { c = *cp++; circfl++; } #endif if (c=='*') goto cerror; cp--; for (;;) { if (ep >= &expbuf[ESIZE]) goto cerror; c = *cp++; if (c=='\n') { cp--; c = eof; } if (c==eof) { #if CABLESECTION *ep++ = CDOL; #endif *ep++ = CEOF; return; } if (c!='*') lastep = ep; switch (c) { case '\\': #if (!CABLESECTION) if ((c = *cp++)=='(') { if (nbra >= NBRA) goto cerror; *bracketp++ = nbra; *ep++ = CBRA; *ep++ = nbra++; continue; } if (c == ')') { if (bracketp <= bracket) goto cerror; *ep++ = CKET; *ep++ = *--bracketp; continue; } #endif *ep++ = CCHR; if (c=='\n') goto cerror; *ep++ = c; continue; case '.': *ep++ = CDOT; continue; case '\n': goto cerror; case '*': if (*lastep==CBRA || *lastep==CKET) error(EREGEXP); *lastep |= STAR; continue; #if (!CABLESECTION) case '$': tempc = *cp; if (tempc != eof && tempc != '\n') goto defchar; *ep++ = CDOL; continue; #endif #if CABLESECTION case '{': { char* cp1 = cp; if (int_range_index >= NBRA) goto cerror; *ep++ = INTRANGE; do { if (!(*cp >= '0' && *cp <= '9') && *cp != '-') { error(EREGEXP); } }while (*(++cp) != '}'); cp++; if (2 != sscanf(cp1, "%d-%d", int_range_start + int_range_index, int_range_stop + int_range_index)) { error(EREGEXP); } *ep++ = int_range_index++; } continue; #endif #if CABLESECTION case '<': #else case '[': #endif *ep++ = CCL; *ep++ = 0; cclcnt = 1; if ((c = *cp++) == '^') { c = *cp++; ep[-2] = NCCL; } do { if (c == '\n') goto cerror; /* * Handle the escaped '-' */ if (c == '-' && *(ep-1) == '\\') *(ep-1) = '-'; /* * Handle ranges of characters (e.g. a-z) */ else if ( (tempc = *cp++) != ']' && c == '-' && cclcnt > 1 && tempc != '\n' && (c = *(ep-1)) <= tempc ) { while (++c <= tempc) { *ep++ = c; cclcnt++; if (ep >= &expbuf[ESIZE]) goto cerror; } } /* * Normal case. Add character to buffer */ else { cp--; *ep++ = c; cclcnt++; if (ep >= &expbuf[ESIZE]) goto cerror; } #if CABLESECTION } while ((c = *cp++) != '>'); #else } while ((c = *cp++) != ']'); #endif lastep[1] = cclcnt; continue; #if (!CABLESECTION) defchar: #endif default: *ep++ = CCHR; *ep++ = c; } } cerror: expbuf[0] = 0; error(EREGEXP); } int hoc_regexp_search(const char* tar) { /*return true if target matches pattern*/ char *target = (char*)tar; register char *p1, *p2, c; #if 1 if (target == (char *)0) { return(0); } p1 = target; locs = (char *)0; #else /* in e, apparently for searches within or at begining of string */ if (gf) { if (circfl) return(0); p1 = linebuf; p2 = genbuf; while (*p1++ = *p2++); locs = p1 = loc2; } else { if (addr==zero) return(0); p1 = getline(*addr); locs = NULL; } #endif p2 = expbuf; if (circfl) { loc1 = p1; return(advance(p1, p2)); } /* fast check for first character */ if (*p2==CCHR) { c = p2[1]; do { if (*p1!=c) continue; if (advance(p1, p2)) { loc1 = p1; return(1); } } while (*p1++); return(0); } /* regular algorithm */ do { if (advance(p1, p2)) { loc1 = p1; return(1); } } while (*p1++); return(0); } static int advance(char* lp, char* ep) { register char *curlp; for (;;) switch (*ep++) { case CCHR: if (*ep++ == *lp++) continue; return(0); case CDOT: if (*lp++) continue; return(0); case CDOL: if (*lp==0) continue; return(0); case CEOF: loc2 = lp; return(1); #if CABLESECTION case INTRANGE: { int start, stop, num; start = int_range_start[*ep]; stop = int_range_stop[*ep++]; num = *lp++ - '0'; if (num < 0 || num > 9) { return(0); } while(*lp >= '0' && *lp <= '9') { num = 10*num + *lp - '0'; ++lp; } if (num >= start && num <= stop) { continue; } } return(0); #endif case CCL: if (hoc_cclass(ep, *lp++, 1)) { ep += *ep; continue; } return(0); case NCCL: if (hoc_cclass(ep, *lp++, 0)) { ep += *ep; continue; } return(0); case CBRA: braslist[*ep++] = lp; continue; case CKET: braelist[*ep++] = lp; continue; case CDOT|STAR: curlp = lp; /*EMPTY*/ while (*lp++); goto star; case CCHR|STAR: curlp = lp; /*EMPTY*/ while (*lp++ == *ep); ep++; goto star; case CCL|STAR: case NCCL|STAR: curlp = lp; /*EMPTY*/ while (hoc_cclass(ep, *lp++, ep[-1]==(CCL|STAR))); ep += *ep; goto star; star: do { lp--; if (lp==locs) break; if (advance(lp, ep)) return(1); } while (lp > curlp); return(0); default: error(EREGEXP); } } static int hoc_cclass(char* set, char c, int af) { register int n; if (c == 0) return(0); n = *set++; while (--n) if (*set++ == c) return(af); return(!af); } neuron-7.5/src/oc/scoplib_ansi.h000066400000000000000000000103111323325274500167030ustar00rootroot00000000000000#ifndef scoplib_ansi_h #define scoplib_ansi_h #if defined(__cplusplus) extern "C" { #endif /* derived from nrn/src/scopmath/scoplib.h */ /* Memory allocation routines */ double *makevector(int); /* (length) */ int freevector(double*); /* (vector_address) */ double **makeptrvector(int); /* (length) */ int freeptrvector(double**); /* (vector_address) */ double **makematrix(int, int); /* (rows, columns) */ int freematrix(double**); /* (matrix_address) */ int zero_vector(double*, int); /* (vector, n) */ int zero_ptrvector(double**, int); /* (vector, n) */ int zero_matrix(double**, int, int); /* (matrix, rows, cols) */ int enqueue(double*, int); /* (&variable, vsize) */ int dequeue(double*, int); /* (&variable, vsize) */ /* Printing error messages */ int cls(); int abort_run(int); /* (error_code) */ int prterr(); /* (message_string) */ /* Solution of first order ordinary differential equations */ int euler(), heun(), runge(), adams(), /* (neqn, &var, &der, p, indep, h, derfunc, * first_time, temp) */ adeuler(), adrunge(); /* (neqn, &var, &der, p, indep, h, derfunc, * first_time, temp, maxerror) */ /* Implicit backwards eulerian integration. Can find steady-state solution of * first-order odes by passing "infinite" time step h */ int _advance(); /* (n,&var,&der,&indep,h,derfunc,first_time,&p * coef,linflag) */ /* Solution of boundary value problems */ int boundary(), /* (npts, x, y, p, fval, gval, qval) */ shoot(); /* (nbound, indepindex, matchtime, matchvalue, * known, unknown, p, diff) */ /* Solution of parabolic partial differential equations */ int crank(); /* (n, y, fval, gval, p, dt, dx, first_time, * bound_string) */ /* Definite integrals */ int romberg(); /* (a, b, func, p, integral) */ double legendre(); /* (a, b, func, p) */ /* Solution of simultaneous algebraic equations */ int simeq(int, double**, double*, int*); int seidel(); /* (n, coef, &soln) */ int invert(); /* (n, matrix) */ int crout(); /* (n, matrix, perm) */ int solve(); /* (n, matrix, const_vect, perm, &soln) */ int tridiag(); /* (n, super, diag, sub, const, &soln) */ int newton(); /* (n, &soln, p, funcval, &value) */ int simplex(); /* (n, &soln, p, funcval, &value) */ int buildjacobian(); /* (n, &var, p, funcval, value, jacobian) */ int nrn_newton_thread(); void nrn_destroy_newtonspace(); int derivimplicit_thread(); /* Sensitivity analysis */ int linearsens(); /* (nvar,&var,p,param,funcval,coeff,newjac, * &sens) */ int steadysens(); /* (nvar,&var,p,param,funcval,value,newjac, * &sens) */ int trajecsens(); /* (nvar,&var,&der,param,first_time,newjac, * &sens,&Dsens) */ int envelope(); /* (&var, vsize, param, uncert, &sens, &plus, * &minus) */ /* Curve-fitting and interpolation functions */ int derivs(); /* (nbase, x, y, mesh, der) */ double spline(); /* (nbase, x, y, mesh, der, x_inter) */ double force(); /* (t, filename) */ double stepforce(); /* (..., t, filename) */ int deflate(); /* (degree, coeff, root) */ int expfit(); /* (terms, reffile, amplitude, decay, * &fiterror) */ /* General modeling functions */ double hyperbol(); double revhyperbol(); /* (x, max, K) */ double sigmoid(); double revsigmoid(); /* (x, max, K, n) */ double* lag(); /* (var, curt, lagt, vsize) */ /* Forcing functions */ int threshold(); /* (x, limit, mode) */ double harmonic(); /* (t, period, amplitude, phase) */ double squarewave(); /* (t, period, amplitude) */ double sawtooth(); /* (t, period, amplitude) */ double revsawtooth(); /* (t, period, amplitude) */ double ramp(); /* (t, lag, height, duration) */ double pulse(); /* (t, lag, height, duration) */ double perpulse(); /* (t, lag, height, duration, delay) */ double step(); /* (t, jump_time, jump_height) */ double perstep(); /* (t, lag, period, jump_height) */ /* Probability functions */ int setseed(); /* (seed) */ int poisrand(); /* (mean) */ double factorial(double); /* (n) */ double scop_random(); double exprand(double); double normrand(double, double);/* (mean, std_dev) */ double poisson(double, double); /* (x, mean) */ double gauss(double, double, double); /* (x, mean, std_dev) */ double scop_erf(double); /* (x) */ #if defined(__cplusplus) } #endif #endif neuron-7.5/src/oc/scoprand.c000077500000000000000000000041711323325274500160540ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include /* this was removed from the scopmath library since there could be multiple copies of the static value below. One in neuron.exe and the other in nrnmech.dll. */ /****************************************************************************** * * File: random.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "random.c,v 1.4 1999/01/04 12:46:49 hines Exp" ; #endif #include #include static uint32_t value = 1; /*----------------------------------------------------------------------------- * * SCOP_RANDOM() * * Selects a random number from the uniform distribution on * the interval [0,1]. A seed number can be specified by a * call to the function set_seed(seed). Otherwise, a seed * of 1 will be used. * * Calling sequence: * scop_random() * * Arguments: * none for random; for set_seed * Input: seed, int value of the seed * * Output: argument unchanged * * * Returns: * Double precision value of the random number * * Functions called: * none * * Files accessed: * none * *--------------------------------------------------------------------------- */ double scop_random(void) { extern int use_mcell_ran4_; if (use_mcell_ran4_) { /*perhaps 4 times slower but much higher quality*/ return mcell_ran4a(&value); }else{ uint32_t a = 2147437301, c = 453816981, /* m = 2^32 - 1, the largest long int value that can be represented */ /*m = 0xFFFFFFFF;*/ /* limited to 32 bit integers*/ m = ~0; value = a * value + c; return (fabs((double) value / (double) m)); } } /*----------------------------------------------------------------------------- * * SET_SEED() * * Set random number seed * * Calling sequence: * set_seed(seed) * * Arguments: * seed - integer random number seed * * Returns: * nothing * * Functions called: * none * * Files accessed: * none * */ void set_seed(double seed) { value = (uint32_t)seed; } neuron-7.5/src/oc/settext.c000077500000000000000000000011761323325274500157450ustar00rootroot00000000000000#include <../../nrnconf.h> # include "hoc.h" # define Ret(a) hoc_ret(); hoc_pushx(a); int newstyle; unsigned int text_style=0, text_size=1, text_orient=0; int hoc_settext(void) { if (!ifarg(1)) { text_style = 0; text_size = 1; text_orient = 0; } else if (ifarg(3)) { text_size = *getarg(1); text_style = *getarg(2); text_orient = *getarg(3); } else if (ifarg(2)) { text_size = *getarg(1); text_style = *getarg(2); } else if (ifarg(1)) { text_size = *getarg(1); } if (text_style < 1) text_style = 1; if (text_style > 4) text_style = 0; if (text_orient > 1) text_orient = 0; newstyle = 1; Ret(1.); return 0; } neuron-7.5/src/oc/spinit.c000077500000000000000000000017771323325274500155620ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/spinit.c,v 1.1.1.1 1994/10/12 17:22:14 hines Exp */ /* spinit.c,v * Revision 1.1.1.1 1994/10/12 17:22:14 hines * NEURON 3.0 distribution * * Revision 2.64 1993/11/04 15:58:42 hines * forgot to checkin last time * * Revision 2.16 1993/01/22 17:34:22 hines * ocmodl, ivmodl working both for shared and static libraries * * Revision 1.2 92/08/12 11:56:33 hines * hoc_fake_ret() allows calls to functions that do a ret(). These functions * can have no arguments and the caller must pop the stack and deal with * hoc_returning. * This was done so init... could be called both from hoc_spinit and from * hoc. * last function called by hoc_spinit in hocusr.c is hoc_last_init() * * Revision 1.1 91/10/11 11:12:18 hines * Initial revision * * Revision 2.0 89/07/07 11:33:01 mlh * Preparation for newcable * * Revision 1.1 89/07/07 11:17:43 mlh * Initial revision * */ void hoc_spinit(void) /* Dummy special init */ { } neuron-7.5/src/oc/spinit1.c000077500000000000000000000001461323325274500156300ustar00rootroot00000000000000#include <../../nrnconf.h> void hoc_last_init(void) {} /* called at end of hoc_spinit in hocusr.c */ neuron-7.5/src/oc/spinit2.c000077500000000000000000000003301323325274500156240ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "hocdec.h" void _modl_set_dt(newdt) double newdt; { /*ARGSUSED*/ printf("ssimplic.c :: _modl_set_dt can't be called\n"); nrn_exit(1); } neuron-7.5/src/oc/subrows.c000077500000000000000000000002701323325274500157430ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #include "../sparse/subrows.c" neuron-7.5/src/oc/symbol.c000077500000000000000000000240021323325274500155430ustar00rootroot00000000000000#include <../../nrnconf.h> /* /local/src/master/nrn/src/oc/symbol.c,v 1.9 1999/02/25 18:01:58 hines Exp */ /* version 7.2.1 2-jan-89 */ #if HAVE_POSIX_MEMALIGN #define HAVE_MEMALIGN 1 #endif #if defined(DARWIN) /* posix_memalign seems not to work on Darwin 10.6.2 */ #undef HAVE_MEMALIGN #endif #if HAVE_MEMALIGN #define _XOPEN_SOURCE 600 #endif #include #include #include #include "hoc.h" #include "parse.h" #include "hoclist.h" #if MAC #undef HAVE_MALLOC_H #endif #if HAVE_MALLOC_H #include #endif #if HAVE_ALLOC_H #include /* at least for turbo C 2.0 */ #endif #include "nrnmpiuse.h" #if BLUEGENEQ #include #endif #if defined(__APPLE__) && defined(__MACH__) #include #endif #if OOP Symlist *hoc_built_in_symlist = (Symlist *)0; /* keywords, built-in functions, all name linked into hoc. Look in this list last */ Symlist *hoc_top_level_symlist = (Symlist *)0; /* all user names seen at top-level (non-public names inside templates do not appear here) */ extern Objectdata *hoc_top_level_data; #endif /*OOP*/ Symlist *symlist = (Symlist *)0; /* the current user symbol table: linked list */ Symlist *p_symlist = (Symlist *)0; /* current proc, func, or temp table */ /* containing constants, strings, and auto */ /* variables. Discarding these lists at */ /* appropriate times prevents storage leakage. */ void print_symlist(const char* s, Symlist* tab) { Symbol *sp; printf("%s\n", s); if (tab) for (sp=tab->first ; sp != (Symbol *) 0; sp = sp->next) { printf("%s %p\n", sp->name, sp); } } Symbol *hoc_table_lookup(const char* s, Symlist* tab) /* find s in specific table */ { Symbol *sp; if (tab) for (sp=tab->first ; sp != (Symbol *) 0; sp = sp->next) { if (strcmp(sp->name, s) == 0) { return sp; } } return (Symbol *)0; } Symbol* lookup(const char* s) /* find s in symbol table */ /* look in p_symlist then built_in_symlist then symlist */ { Symbol *sp; if ((sp = hoc_table_lookup(s, p_symlist)) != (Symbol *)0) { return sp; } if ((sp = hoc_table_lookup(s, symlist)) != (Symbol *)0) { return sp; } #if OOP if ((sp = hoc_table_lookup(s, hoc_built_in_symlist)) != (Symbol *)0) { return sp; } #endif return 0; /* 0 ==> not found */ } Symbol* install( /* install s in the list symbol table */ const char *s, int t, double d, Symlist **list ){ Symbol *sp; sp = (Symbol *) emalloc(sizeof(Symbol)); sp->name = (char *)emalloc((unsigned)(strlen(s)+1)); /* +1 for '\0' */ Strcpy(sp->name, s); sp->type = t; sp->subtype = NOTUSER; sp->defined_on_the_fly = 0; sp->public = 0; sp->s_varn = 0; sp->arayinfo = (Arrayinfo *)0; sp->extra = (HocSymExtension*)0; if (!(*list)) { *list = (Symlist *)emalloc(sizeof(Symlist)); (*list)->first = (*list)->last = (Symbol *)0; } hoc_link_symbol(sp, *list); switch (t) { case NUMBER: sp->u.pnum = (double *)emalloc(sizeof(double)); *sp->u.pnum = d; break; case VAR: hoc_install_object_data_index(sp); OPVAL(sp) = (double *)emalloc(sizeof(double)); *(OPVAL(sp)) = d; break; case PROCEDURE: case FUNCTION: case FUN_BLTIN: case OBFUNCTION: case STRFUNCTION: sp->u.u_proc = (Proc *)emalloc(sizeof(Proc)); sp->u.u_proc->list = (Symlist*)0; sp->u.u_proc->size = 0; break; default: sp->u.pnum = (double *)0; break; } return sp; } Symbol* hoc_install_var(const char* name, double* pval){ Symbol* s; s = hoc_install(name, UNDEF, 0.0, &symlist); s->type = VAR; s->u.pval = pval; s->subtype = USERDOUBLE; return s; } void hoc_unlink_symbol(Symbol* s, Symlist* list) { Symbol *sp; assert(list); if (list->first == s) { list->first = s->next; if (list->last == s) { list->last = (Symbol*)0; } }else { for (sp = list->first ; sp != (Symbol *) 0; sp = sp->next) { if (sp->next == s) { break; } } assert(sp); sp->next = s->next; if (list->last == s) { list->last = sp; } } s->next = (Symbol*)0; } void hoc_link_symbol(Symbol* sp, Symlist* list) { /* put at end of list */ if (list->last) { list->last->next = sp; }else{ list->first= sp; } list->last = sp; sp->next = (Symbol *)0; } static int emalloc_error=0; void hoc_malchk(void) { if (emalloc_error) { emalloc_error = 0; execerror("out of memory", (char *) 0); } } void* hoc_Emalloc(size_t n) { /* check return from malloc */ void *p; p = malloc(n); if (p == 0) emalloc_error = 1; return p; } void* emalloc(size_t n) { void* p = hoc_Emalloc(n); if (emalloc_error) { hoc_malchk(); } return p; } void* hoc_Ecalloc(size_t n, size_t size) { /* check return from calloc */ void *p; if (n == 0) { return (void*)0; } p = calloc(n, size); if (p == 0) emalloc_error = 1; return p; } void* ecalloc(size_t n, size_t size) { void* p = hoc_Ecalloc(n, size); if (emalloc_error) { hoc_malchk(); } return p; } void* nrn_cacheline_alloc(void** memptr, size_t size) { #if HAVE_MEMALIGN static int memalign_is_working = 1; if (memalign_is_working) { if (posix_memalign(memptr, 64, size) != 0) { fprintf(stderr, "posix_memalign not working, falling back to using malloc\n"); memalign_is_working = 0; *memptr = hoc_Emalloc(size); hoc_malchk(); } }else #endif *memptr = hoc_Emalloc(size); hoc_malchk(); return *memptr; } void* nrn_cacheline_calloc(void** memptr, size_t nmemb, size_t size) { int i, n; #if HAVE_MEMALIGN nrn_cacheline_alloc(memptr, nmemb*size); memset(*memptr, 0, nmemb*size); #else *memptr = hoc_Ecalloc(nmemb, size); hoc_malchk(); #endif return *memptr; } void* hoc_Erealloc(void* ptr, size_t size) {/* check return from realloc */ void* p; if (!ptr) { return hoc_Emalloc(size); } p = realloc(ptr, size); if (p == 0) { free(ptr); emalloc_error = 1; } return p; } void* erealloc(void* ptr, size_t size) { void* p = hoc_Erealloc(ptr, size); if (emalloc_error) { hoc_malchk(); } return p; } void hoc_free_symspace(Symbol* s1) { /* frees symbol space. Marks it UNDEF */ if (s1 && s1->public != 2) { switch (s1->type) { case UNDEF: break; case STRING: break; case VAR: break; case NUMBER: free((char *)(s1->u.pnum)); break; case CSTRING: free(s1->u.cstr); break; case PROCEDURE: case FUNCTION: if (s1->u.u_proc != (Proc *)0) { if (s1->u.u_proc->defn.in != STOP) free((char *) s1->u.u_proc->defn.in); free_list(&(s1->u.u_proc->list)); free((char *) s1->u.u_proc); } break; case AUTO: case AUTOOBJ: break; case TEMPLATE: hoc_free_allobjects(s1->u.template, hoc_top_level_symlist, hoc_top_level_data); free_list(&(s1->u.template->symtable)); {hoc_List* l = s1->u.template->olist; if (l->next == l) { hoc_l_freelist(&s1->u.template->olist); free(s1->u.template); }else{ hoc_warning("didn't free all objects created with the old template:", s1->name); } } break; case OBJECTVAR: #if 0 /* should have been freed above, otherwise I don't know the exact objects*/ if (s1->arayinfo) {int i, j, k=0; for (i = 0; i < s1->arayinfo->nsub; i++) { for (j=0; j < s1->arayinfo->sub[i]; j++) { hoc_dec_refcount(OPOBJ(s1) + k); ++k; } } }else{ hoc_dec_refcount(OPOBJ(s1)); } free((char *)OPOBJ(s1)); #endif break; case OBJECTALIAS: hoc_obj_unref(s1->u.object_); break; case VARALIAS: break; default: Fprintf(stderr, "In free_symspace may not free all of %s of type=%d\n", s1->name, s1->type); } if (s1->arayinfo != (Arrayinfo *)0) { free_arrayinfo(s1->arayinfo); s1->arayinfo = (Arrayinfo *)0; } } if (s1->extra) { if (s1->extra->parmlimits) { free((char*)s1->extra->parmlimits); } if (s1->extra->units) { free(s1->extra->units); } free(s1->extra); s1->extra = (HocSymExtension*)0; } s1->type = UNDEF; } void sym_extra_alloc(Symbol* sym) { if (!sym->extra) { sym->extra = (HocSymExtension*)ecalloc(1, sizeof(HocSymExtension)); } } void free_list(Symlist** list) { /* free the space in a symbol table */ Symbol *s1, *s2; if (*list) { for (s1 = (*list)->first; s1; s1 = s2){ s2 = s1->next; hoc_free_symspace(s1); if (s1->name) { free(s1->name); } free((char *) s1); } free((char *)(*list)); } *list = (Symlist *)0; } void hoc_free_val(double* p) { notify_freed(p); free(p); } void hoc_free_val_array(double* p, size_t size) { notify_freed_val_array(p, size); free(p); } void hoc_free_object(Object* p){ if (p) { notify_pointer_freed(p); free(p); } } void hoc_free_string(char* p) { free(p); } void hoc_free_pstring(char** p) { notify_freed((void*)p); if (*p) { free(*p); free(p); } } unsigned long long nrn_mallinfo(int item) { #if BLUEGENEQ /* BLUEGENE-Q ------------------------------------------------ */ uint64_t heap = 0; Kernel_GetMemorySize(KERNEL_MEMSIZE_HEAP, &heap); return heap; #elif defined(__APPLE__) && defined(__MACH__) /* OSX ------------------------------------------------------ * Returns the current resident set size (physical memory use) measured * in bytes, or zero if the value cannot be determined on this OS. */ struct mach_task_basic_info info; mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT; if ( task_info( mach_task_self( ), MACH_TASK_BASIC_INFO, (task_info_t)&info, &infoCount ) != KERN_SUCCESS ) return (size_t)0L; /* Can't access? */ return (size_t)info.resident_size; #elif HAVE_MALLINFO /* *NIX PLATFORMS WITH MALLINFO ------------------------------ */ int r; struct mallinfo m; m = mallinfo(); if (item == 1) { r = m.uordblks; }else if (item == 2) { r = m.hblkhd; }else if (item == 3) { r = m.arena; }else if (item == 4) { r = m.fordblks; }else if (item == 5) { r = m.hblks; }else if (item == 6) { r = m.hblkhd + m.arena; }else{ r = m.hblkhd + m.uordblks; } return (unsigned long long)r; #else /* UNSUPPORTED PLATFORM ------------------------------------ */ return 0; #endif } int hoc_mallinfo(void) { int i; unsigned long long x; extern double chkarg(int, double, double); i = (int)chkarg(1, 0., 10.); x = nrn_mallinfo(i); hoc_ret(); pushx((double)x); return 0; } neuron-7.5/src/oc/system.c000077500000000000000000000100501323325274500155600ustar00rootroot00000000000000/* FUNCTION <>---execute command string INDEX system INDEX _system_r ANSI_SYNOPSIS #include int system(char *<[s]>); int _system_r(void *<[reent]>, char *<[s]>); TRAD_SYNOPSIS #include int system(<[s]>) char *<[s]>; int _system_r(<[reent]>, <[s]>) char *<[reent]>; char *<[s]>; DESCRIPTION Use <> to pass a command string <<*<[s]>>> to <> on your system, and wait for it to finish executing. Use ``<>'' to test whether your system has <> available. The alternate function <<_system_r>> is a reentrant version. The extra argument <[reent]> is a pointer to a reentrancy structure. RETURNS <> returns a non-zero value if <> is available, and <<0>> if it is not. With a command argument, the result of <> is the exit status returned by <>. PORTABILITY ANSI C requires <>, but leaves the nature and effects of a command processor undefined. ANSI C does, however, specify that <> return zero or nonzero to report on the existence of a command processor. POSIX.2 requires <>, and requires that it invoke a <>. Where <> is found is left unspecified. Supporting OS subroutines required: <<_exit>>, <<_execve>>, <<_fork_r>>, <<_wait_r>>. */ #include #include #include #include #include <_syslist.h> #include #if defined (__APPLE__) #include #endif #if defined (unix) || defined (__CYGWIN__) static int do_system (); #endif int _system_r (ptr, s) struct _reent *ptr; _CONST char *s; { #if defined(HAVE_SYSTEM) return _system (s); ptr = ptr; #elif defined(NO_EXEC) if (s == NULL) return 0; errno = ENOSYS; return -1; #else /* ??? How to handle (s == NULL) here is not exactly clear. If _fork_r fails, that's not really a justification for returning 0. For now we always return 0 and leave it to each target to explicitly handle otherwise (this can always be relaxed in the future). */ #if defined (unix) || defined (__CYGWIN__) if (s == NULL) return 1; return do_system (ptr, s); #else if (s == NULL) return 0; errno = ENOSYS; return -1; #endif #endif } #ifndef _REENT_ONLY int system (s) _CONST char *s; { return _system_r (_REENT, s); } #endif #if defined (unix) && !defined (__CYGWIN__) && !defined(__rtems__) #if !defined(__APPLE__) extern char **environ; /* Only deal with a pointer to environ, to work around subtle bugs with shared libraries and/or small data systems where the user declares his own 'environ'. */ static char ***p_environ = &environ; #endif #if defined(__APPLE__) static char ***p_environ = _NSGetEnviron(); #endif static int do_system (ptr, s) struct _reent *ptr; _CONST char *s; { char *argv[4]; int pid, status; argv[0] = "sh"; argv[1] = "-c"; argv[2] = (char *) s; argv[3] = NULL; if ((pid = _fork_r (ptr)) == 0) { _execve ("/bin/sh", argv, *p_environ); exit (100); } else if (pid == -1) return -1; else { int rc = _wait_r (ptr, &status); if (rc == -1) return -1; status = (status >> 8) & 0xff; return status; } } #endif #if defined (__CYGWIN__) static int do_system (ptr, s) struct _reent *ptr; _CONST char *s; { char *argv[4]; int pid, status; argv[0] = "sh"; argv[1] = "-c"; argv[2] = (char *) s; argv[3] = NULL; if ((pid = vfork ()) == 0) { /* ??? It's not clear what's the right path to take (pun intended :-). There won't be an "sh" in any fixed location so we need each user to be able to say where to find "sh". That suggests using an environment variable, but after a few more such situations we may have too many of them. */ char *sh = getenv ("SH_PATH"); if (sh == NULL) sh = "/bin/sh"; execve (sh, argv, environ); exit (100); } else if (pid == -1) return -1; else { int rc = wait (&status); if (rc == -1) return -1; status = (status >> 8) & 0xff; return status; } } #endif neuron-7.5/src/oc/termio.c000077500000000000000000000003561323325274500155430ustar00rootroot00000000000000#include <../../nrnconf.h> #include /* * Automake doesn't deal well with sources that live in other directories, so * this is a quick and dirty workaround. */ #if !defined(WITHOUT_MEMACS) #include "../memacs/termio.c" #endif neuron-7.5/src/oc/version.c000077500000000000000000001071571323325274500157400ustar00rootroot00000000000000#include <../../nrnconf.h> /* $Header$ */ /* $Log$ Revision 1.1 2003/02/11 18:36:09 hines Initial revision Revision 1.1.1.1 2003/01/01 17:46:35 hines NEURON -- Version 5.4 2002/12/23 from prospero as of 1-1-2003 Revision 1.1.1.1 2002/06/26 16:23:07 hines NEURON 5.3 2002/06/04 * Revision 1.1.1.1 2001/01/01 20:30:35 hines * preparation for general sparse matrix * * Revision 1.3 2000/03/27 14:18:12 hines * All sources now include nrnconf.h instead of config.h so that minor * option changes (eg in src/parallel/bbsconf.h) do not require recompilation * of everything. * * Revision 1.2 2000/03/15 19:02:16 hines * trying to merge nrn4.3.0 stuff that used imake into the nrn4.2.3 distribution. * Now called nrn4.3.1 * * Revision 1.1.1.1 2000/03/09 13:55:34 hines * almost working * * Revision 1.2 1995/05/19 12:51:40 hines * change the oc version number and date * * Revision 1.1.1.1 1994/10/12 17:22:14 hines * NEURON 3.0 distribution * * Revision 2.116 1994/09/27 17:03:05 hines * when oc_jump_target failed then the next error could try to longjump to * a function that had already returned. fixed. * * Revision 2.115 1994/09/26 18:25:40 hines * fix warning on sgi * * Revision 2.114 1994/09/20 16:20:06 hines * port to dec alpha * * Revision 2.113 1994/09/20 14:50:42 hines * port to dec alpha (cxx thinks struct name inside struct is new def) * * Revision 2.112 1994/09/20 14:49:25 hines * execute1("cmd") will return even on execerror. Note: does * not surround with {} * * Revision 2.111 1994/09/12 13:37:14 hines * execute("~command") will eliminate tilde and execute command without * enclosing it in {}. This allows one to create func, proc dynamically. * * Revision 2.110 1994/08/18 12:19:15 hines * allow ob.sec.range[i](x) * this necessitated allowing parsing of ob[i](x) and then giving * an error dynamically. * * Revision 2.109 1994/08/17 19:48:49 hines * ocmain.o : get it from lib (nocable and ocnoiv too) * * Revision 2.108 1994/08/05 14:16:14 hines * show_errmess_always() * errno not defined from include file in hoc.c * NullArgument replaces null arguments in Imakefile * * Revision 2.107 1994/07/30 17:33:51 hines * checking whether bison or yacc is used * * Revision 2.106 1994/07/30 14:52:40 hines * pwman_place(left, top) * * Revision 2.105 1994/07/12 17:52:26 hines * more portable way of dealing with ocjump * * Revision 2.104 1994/07/12 13:47:54 hines * from last change there are 80 shift reduce conflicts * * Revision 2.103 1994/07/12 13:45:48 hines * can use constant objects of form * template[index]. * now object names are printed in this format as well. * * Revision 2.102 1994/07/04 15:10:54 hines * only print Oc banner if not NEURON * * Revision 2.101 1994/06/29 12:37:28 hines * can switch between bison and yacc. so far I have never used the partial * parseing feature of bison anyway. This works around a problem on some * crays in which there is a bug in bison. * * Revision 2.100 1994/06/21 12:36:04 hines * allow recursive calls to interpreter even in case of hoc_execerror. * * Revision 2.99 1994/06/17 13:00:35 hines * a number of things fixed while looking at the test coverage of hoc.c * mostly just to allow coverage. * CBUFSIZE is larger than 256 * array index computed with double arithmetic. * corrected handling of end of file while in comments * * Revision 2.98 1994/06/17 12:53:28 hines * when a hoc_exec_cmd fails another execerror is called since * otherwise the pc is invalid. at this time it is not possible to * recover while still interpreting since the interpreter is * initialized. This is not a problem with buttons, etc since when * they are running the interpreter at the top level and they don't get * control until the interpreter is done. * * Revision 2.97 1994/06/07 20:54:40 hines * anyname (eg local) can also be a mechanism name * * Revision 2.96 1994/06/07 20:46:12 hines * all_objectvars not setting objectdata when accessing arrayinfo * fixed * * Revision 2.95 1994/06/07 18:42:38 hines * allow redeclaration of names in templates that are built-in names * * Revision 2.94 1994/06/07 15:01:12 hines * no trailing blank after an object name * * Revision 2.93 1994/05/24 17:36:11 hines * allobjects() prints all object names with number of references * * Revision 2.92 1994/05/24 15:41:38 hines * allobjectrefs recurses on this. Fixed * * Revision 2.91 1994/05/20 19:13:58 hines * object_push(objref) and object_pop() * allow more easy saving of internal state of objects. * after an object_puhs(objref) subsequent commands are executed in * the context of the object til the next object_pop() * Warning: do not create new variables within one of these object contexts. * * Revision 2.90 1994/05/10 20:19:14 hines * global lineno no longer initialized when defined. * Note: there is a potential problem when calling oc_run() from * a descendent of an object since when there is an error, the highest * caller gets the execerror and not the lowest. it would be better ot * nicely unwrap all the calls instead of doing a longjmp * * Revision 2.89 1994/05/09 19:11:46 hines * call_constructor checks if object is a point process and if so * sets the Point_process->ob field so one can know the object given * the point process structure. This was done incorrectly a little while * ago. * * Revision 2.88 1994/05/09 13:54:21 hines * observers hook for templates. * * Revision 2.87 1994/05/05 18:19:32 hines * error when hoc starts out interpreting a template. fixed * * Revision 2.86 1994/05/03 15:15:30 hines * checkpoint returns int not void * * Revision 2.85 1994/05/03 15:11:02 hines * built-in classes can be checkpointed * * Revision 2.84 1994/05/02 12:53:54 hines * quit() function * * Revision 2.83 1994/04/27 12:43:47 hines * objref is keyword synonym for objectvar * * Revision 2.82 1994/04/27 12:17:56 hines * minor warnings from objectcenter fixed (and one serious problem from * last checkin) * PI, E, etc are now userdoubles and are available within objects. * * Revision 2.81 1994/04/27 11:21:31 hines * support for ivoc/SRC/checkpoint.c * usage is checkpoint("filename") * then ivoc filename ... * so far only for oc * * Revision 2.80 1994/04/06 17:14:24 hines * minor changes to structures to allow checkpointing in ivoc * basically no more codepfd * * Revision 2.79 1994/04/05 16:35:20 hines * hook for checkpoint * hoc_new_object_asgn(Object**, Symbol*, void*) * double hoc_call_objfunc(Symbol*, int narg, Object*) * * Revision 2.78 1994/03/15 17:09:14 hines * minor leak plugged for "this" in templates * * Revision 2.77 1994/03/10 15:26:07 hines * capture SIGPIPE print message and ignore * * Revision 2.76 1994/03/10 14:33:13 hines * error on last checkin * * Revision 2.75 1994/03/10 14:28:33 hines * invoke coredump_on_error() if want it on next segmentation violation or * bus error. * * Revision 2.74 1994/03/07 21:51:53 hines * make ob = new Obj(ob) act appropriately and don't make assignment til * after init was called. * * Revision 2.73 1994/03/04 21:37:01 hines * help for files invoked on command line * * Revision 2.72 1994/03/04 18:07:22 hines * *** empty log message *** * * Revision 2.71 1994/02/23 15:51:16 hines * RETREAT_SIGNAL (SIGHUP) handled and user written routine "linda_retreat()" * called on a doEvent(). Just exit if no such routine. * * Revision 2.70 1994/02/23 12:53:31 hines * help word word ... in ivoc tickles the help system * * Revision 2.69 1994/02/10 19:41:06 hines * set term=vt125 replaces vt100 in plot.c since that is a common term * even in a window system * * Revision 2.68 1994/01/21 18:14:31 hines * some NeXT portability fixes and turn off parse error messages when * hoc_execerror_message == 0 * * Revision 2.67 1994/01/11 20:22:24 hines * set errno to 0 every input line so don't get spurious interrupted * system call messages from ivoc select system call * * Revision 2.66 1993/12/15 15:02:01 hines * SECTIONREF and allow ob connect ob()(0or1), expr * * Revision 2.65 1993/11/09 14:30:04 hines * partial port to djg dos extender go32 * * Revision 2.64 1993/11/04 15:58:42 hines * forgot to checkin last time * * Revision 2.63 1993/11/04 15:55:48 hines * port to solaris2 (no more warnings) * * Revision 2.62 1993/10/18 13:27:38 hines * beginnings of an audit system * * Revision 2.61 1993/09/06 13:33:54 hines * hoc_scan reads one extra character after scanning the number and * discards it if it is a newline. Otherwise it ungetc's it. * * Revision 2.60 93/09/01 08:23:33 hines * some string assignment statements not popping stack so loops can eventually * give stack overflow * * Revision 2.59 93/08/19 16:38:20 hines * if (!0) print "hello" * now works. before the ! was not transmitted from yylex as NOT * and print "hello" was given the wrong $$ code index * * Revision 2.58 93/08/15 12:54:53 hines * fix warning of function declared external and later static * * Revision 2.56 93/08/14 15:05:37 hines * when in multiline statement typed directly to interpreter from console * we shut off the event driven interface so that there can be no * extraneous statements mixed with the current statement. * * Revision 2.55 93/08/13 17:11:26 hines * fix bug where we did not allow multiple line statements entered * from console as direct command * * Revision 2.54 93/08/11 11:04:49 hines * Zach Mainen's contribution of xstatebutton and xcheckbox * * Revision 2.53 93/07/23 11:33:26 hines * in hoc_total_array_data didn't work for RANGEVAR * * Revision 2.52 93/07/19 09:36:15 hines * freeing double arrays has different notify call * * Revision 2.51 93/07/08 14:23:58 hines * portable to SGI * * Revision 2.49 93/06/30 11:28:45 hines * expand_env_var needed a static buf for return. * * Revision 2.48 93/05/25 14:02:39 hines * some functions that check on the arg type. eg hoc_is_object_arg(narg) * * Revision 2.47 93/05/04 15:26:43 hines * another place where obdsave needs to remember that hoc_top_level_data * may change * * Revision 2.46 93/04/29 15:30:13 hines * notify_pointer_freed called whenever an object is freed. * * Revision 2.45 93/04/28 10:07:18 hines * when a new variable is created at the top level then hoc_top_level_data * is reallocated. (this can happen when xopen is called) however the * function call handlers save and restore a pointe to hoc_objectdata and * between save and restore the pointer may become invalid. This is * avoided with the idiom * Objectdata* obdsav = hoc_objectdata_save() * ... * hoc_objectdata = hoc_objectdata_restore(obdsav); * * Revision 2.44 93/04/21 10:34:49 hines * datum element can be _pvoid for generic pointer storage * * Revision 2.43 93/04/20 08:40:24 hines * lists can have void* elements (use insertvoid lappendvoid VOIDITM(q) ) * * Revision 2.42 93/04/17 07:02:58 hines * IRIX can use alloca * * Revision 2.41 93/04/14 15:04:04 hines * some fixes to Imakefile * * Revision 2.40 93/04/13 12:12:19 hines * SIG_RETURN already defined in HPUX : so defined as SIG_RETURN_TYEP * * Revision 2.39 93/04/12 14:08:44 hines * first pass at merging Fisher's LINDA addition * * Revision 2.38 93/03/18 07:53:34 hines * colors made static * * Revision 2.37 93/03/15 10:04:44 hines * assert needs to be #undef before #define * * Revision 2.36 93/03/11 09:32:32 hines * better error message when pointer to rangevar does not have arc spec * * Revision 2.35 93/03/11 07:38:03 hines * Nigel Goddards fix to div() so it works on a cray. * * Revision 2.34 93/03/09 09:46:14 hines * Object** hoc_temp_objvar(Symbol* template_symbol, void* cppobject) * not entirely safe when "function returning object" is arg to another * function. Safe when used in context * o = obj.function_returning_object() * * Revision 2.33 93/03/09 07:45:20 hines * hoc_call_func accepts BLTIN * * Revision 2.32 93/03/05 15:57:44 hines * slider and can call a user interpreted function or procedure via * hoc_call_func(Symbol*, int narg) with args on stack in first arg order * * Revision 2.31 93/03/05 08:42:20 hines * some slight performance improvements by avoidin hoc_lookup for objects * and use stack macros in code.c * * Revision 2.30 93/03/02 08:30:12 hines * parallization of shortfor loop as in * parallel for i=1,10 print i * * Revision 2.29 93/02/23 14:44:05 hines * compiles under DOS * * Revision 2.28 93/02/22 14:29:58 hines * nobody uses scanf("%F"..., everybody accepts scanf("%lf"... * * Revision 2.27 93/02/22 13:12:30 hines * works with turboc on DOS (but no readline) * * Revision 2.26 93/02/22 10:57:34 hines * checking of malloc out of order * * Revision 2.25 93/02/20 08:55:45 hines * AIX * * Revision 2.24 93/02/15 08:12:32 hines * for Linus * I mean linux * * Revision 2.23 93/02/12 10:01:10 hines * public names which are top level functions generated a syntax error. * * Revision 2.22 93/02/12 08:51:44 hines * beginning of port to PC-Dos * * Revision 2.21 93/02/11 17:04:30 hines * some fixes for NeXT * * Revision 2.20 93/02/03 11:28:01 hines * a bit more generic for portability. will possibly work on NeXT * * Revision 2.19 93/02/02 10:34:38 hines * static functions declared before used * * Revision 2.18 93/01/27 13:54:00 hines * get METHOD3 from options.h * * Revision 2.17 93/01/23 13:40:47 hines * don't inlclude stdio.h twice in ytab.c * * Revision 2.16 93/01/22 17:34:29 hines * ocmodl, ivmodl working both for shared and static libraries * * Revision 2.15 93/01/21 16:21:30 hines * load_func("name"), load_proc("name1", ...), load_template(...) * searches *.oc and *.hoc in . HOCLIBRARYPATH, and $NEURONHOME/lib/hoc * for the appropriate declaration and xopen's the first file that contains * such a declaration. * * Revision 2.14 93/01/21 13:19:34 hines * // commenst out the rest of the line * * Revision 2.13 93/01/21 12:45:49 hines * memory leak on multiple strdef of same symbol * * Revision 2.12 93/01/15 08:20:25 hines * can print nam of object with printf("%s",object) * * Revision 2.11 93/01/14 13:04:06 hines * switch from Objectdata.pstr to Objectdata.ppstr so we can eventually have * arrays of strings and so ivoc's varlabel will work properly. * * Revision 2.10 93/01/13 08:52:17 hines * stubs for xvarlabel, xradiobutton, and xfixedvalue * mechanism in place for notifying if strdef is freed. * * Revision 2.9 93/01/12 16:55:39 hines * really 76 shift/reduce conflicts * * Revision 2.8 93/01/12 16:53:17 hines * "str" = strdef was being allowed * * Revision 2.7 93/01/12 08:58:49 hines * to assign to a hoc string use * hoc_assign_str(char** cpp, char* buf) * Some minor modifications to allow use of some functions by File class * * Revision 2.6 93/01/08 17:08:39 hines * used by ivoc to make a hocusr with makeiv * * Revision 2.5 93/01/06 09:26:23 hines * cray c90 needs include remove some codecenter warnings * * Revision 2.4 93/01/05 17:20:19 hines * print perror() instead of errno= * void sec_access_pop Section* nrn_pop_sec * * Revision 2.1 92/12/31 09:38:16 hines * ready for beta release * * Revision 1.130 92/12/30 12:45:56 hines * don't require empty line after endtemplate * * Revision 1.129 92/12/22 16:53:21 hines * problem with new lines after public and external fixed. * public and external now can be anywhere in template but they had better * be before declarations (at least for external) and usage. * * Revision 1.128 92/12/22 15:29:31 hines * a template can have an external statement followin the public * statement which is a comma separated list of functions or procedures * defined at the top level which can be executed within the object. * (the function is executed in a top level context). * public and external statements are optional * * Revision 1.127 92/12/18 15:12:03 hines * fix bug in which pointers to range variables in object not allowed. * * Revision 1.126 92/12/11 09:41:33 hines * execute("command", [objvar]) executes command in context of object (top-level * if arg not present). int hoc_obj_execute(const char* cmd, Object*) used * in C. * * Revision 1.125 92/11/27 08:19:33 hines * can turn off error messages temporarily * * Revision 1.124 92/11/16 11:20:23 hines * error in x.c message when color doesn't exist * xlabel("string") * * Revision 1.123 92/11/13 16:09:20 hines * parseexec gives execerror when incomplete parse * * Revision 1.122 92/11/13 07:34:23 hines * hoc_object_pathname had problem with recursive objects * * Revision 1.121 92/11/11 12:40:55 hines * hoc_val_pointer more robust. * boolean is_obj_type(Object*, typename) * * Revision 1.120 92/11/10 07:38:37 hines * char* expand_env_var(char*) expands all the $(...) in the string. * moved from ivoc/main.c to here so oc can use it too. * xopen("...") now allows environment variables * * Revision 1.119 92/11/09 17:14:28 hines * botched last imakefile checkin by checking in the wrong one * * Revision 1.118 92/11/09 17:12:53 hines * trivial fix to Imakefile * * Revision 1.117 92/10/30 16:05:01 hines * echoing proper number of shift/reduce conflicts * * Revision 1.116 92/10/29 16:45:28 hines * char* hoc_object_pathname(Object*) * * Revision 1.115 92/10/29 09:20:16 hines * some errors in freeing objects fixed and replace usage of getarg for * non numbers. * * Revision 1.114 92/10/28 17:33:51 hines * *getarg() now checks to make sure it is returning a number * * Revision 1.113 92/10/27 12:08:18 hines * list.c hoclist.h moved from nrnoc to oc * all templates maintain a list of their objects * * Revision 1.112 92/10/27 09:17:48 hines * rangevar(x) = y is an allowed syntax and sets the value at the segment that * contains x * * Revision 1.111 92/10/24 12:12:48 hines * botched last checkin. now its right. * * Revision 1.110 92/10/24 12:02:22 hines * portability fixes found at Pittsburgh for CRAY and HP * * Revision 1.109 92/10/24 10:27:21 hines * error in stub for xpvalue() * * Revision 1.108 92/10/24 10:17:49 hines * botched last checkin for symbol.c. notifies interviews when hoc_free_val.. * called * * Revision 1.107 92/10/24 10:16:35 hines * noiv.c is place to put function stubs that only make sense with interviews * whenever any VAR is freed it should be done with hoc_free_val... which * will notify the interviews objects that hold pointers to variables. * * Revision 1.106 92/10/23 14:07:35 hines * only complete statements can be parsed in hoc_oc for now * also resetting parser yystart on hoc-execerror * object_name(Object*) returns object name * * Revision 1.105 92/10/23 08:21:30 hines * fix some memory leaks with purify having to do with failing to free * arayinfo * * Revision 1.104 92/10/22 12:33:21 hines * for debugging there is a list of all objects (#define OBLIST 1) * that can be printed. This list is turned off in hoc_oop.c * * Revision 1.103 92/10/22 09:49:17 hines * ob.sec syntax must always do a poptypestack at end. * * Revision 1.102 92/10/21 15:50:03 hines * this pointer is not referenced during initialization nor is it * unreferenced during freeing the object * * Revision 1.101 92/10/21 14:51:50 hines * fixed several errors having to do with stack and frame overflows * under object.section { stmt} and calling hoc procedures with * object.proc() * * Revision 1.100 92/10/21 11:10:31 hines * didn't allow local variable names used as object components. fixed * objectvar this * inside template will automatically get set to itself. * fixed error in popping the object type stack when sections were a component * * Revision 1.99 92/10/14 14:35:59 hines * numarg() returns the number of arguments in a hoc procedure or function. * hoc_typestack returns the type of the Datum on the stack * hoc_argtype(i) returns the type of the ith arg. * * Revision 1.98 92/10/14 10:10:25 hines * move oc specific stuff out of axis.c and into code2.c * new argument function hoc_pgetarg checks for double pointer on stack * and returns it. * hoc_val_pointer(string) returns a pointer to the variable resulting * from parsing the string. * * Revision 1.97 92/10/10 12:32:08 hines * old section list syntax discarded in favor of making them first class * objects. * style is * objectvar s * s = new SectionList() * sec s.append() * sec s.remove() * forsec s * ifsec s * * Revision 1.96 92/10/10 10:24:06 hines * ob.sec.range, ob.sec.range(x), ob.sec.property now allowed. * ob.sec.range(x) = expr means just change the value of node closest to x * * Revision 1.95 92/10/09 12:16:13 hines * remove old style point process syntax * make hoc_run_expr(sym) much more general * added hoc_run_stmt(sym) as well * create them with hoc_parse_expr(char*, Symlist**) and * hoc_parse_stmt(char*, Symlist**) * * Revision 1.94 92/10/09 07:48:23 hines * method available for setting and retrieving values from built-in classes. * used with new style of point processes. * * Revision 1.93 92/10/08 08:36:10 hines * some extra parse error messages about assignments and redeclaring * variables. * * Revision 1.92 92/10/07 15:43:26 hines * arg syntax changed to $s1 and $o1 because O looked too much like 0 * * Revision 1.91 92/10/07 15:34:36 hines * error in stack frame on call to C++ constructors. * * Revision 1.90 92/10/07 14:07:08 hines * get rid of irrelevant type clash on default action * * Revision 1.89 92/10/07 13:51:15 hines * strings can be passed as args and read and set with $S1 = $S2 * * Revision 1.88 92/10/07 10:45:14 hines * a simpler connect statement is now available in addition to the old * baroque syntax. it is * connect sec1(x), sec2(0 or 1) * * Revision 1.87 92/10/07 09:47:27 hines * keyword for setting pointers in models has been changed * from connect to setpointer * * Revision 1.86 92/10/05 10:15:49 hines * when _CRAY math functions get l suffix * * Revision 1.85 92/10/05 08:04:28 hines * bad ; in one line * * Revision 1.84 92/10/02 17:28:40 hines * can pass pointer to anything with & * * Revision 1.83 92/09/24 16:50:17 hines * METHOD3 for nrnoc. when _method3 != 0 then x = i/nnode from i=0 to nnode * * Revision 1.82 92/09/18 15:13:45 hines * hoc_list now won't conflict with OS::list * * Revision 1.81 92/09/18 13:39:01 hines * c++ class members interfaced to oc can return an Object** * used first for built in List class * * Revision 1.80 92/08/25 12:30:48 hines * hoc_araystr(Symbol*, index, Objectdata*) returns a string expressing the * array part of a variable * hoc_total_array_data(Symbol*, Objectdata*) returns the total length of * the variable vector. * * Revision 1.79 92/08/24 14:10:02 hines * define OOP 1 in hoc.h * * Revision 1.78 92/08/18 10:24:43 hines * templates can not make new objects using templates declared at the top level. * first looks for local templates though. * * Revision 1.77 92/08/18 07:31:45 hines * arrays in different objects can have different sizes. * Now one uses araypt(symbol, SYMBOL) or araypt(symbol, OBJECTVAR) to * return index of an array variable. * * Revision 1.76 92/08/17 12:49:38 hines * arrays in different objects can have different sizes. Now arayinfo * gets carried along in objectdata. arayinfo is reference counted. * * Revision 1.75 92/08/17 08:19:09 hines * strdef, double, and objectvar can appear inside functions (any compound * statement). They are still global (within a template). When executed * (and if they are arrays) the old arayinfo is thrown away and the * proper aray storage is allocated. Note that arrays should at least be * initialized outside of a statement or else the parser will complain when * it sees the array syntax. next step is to give each array in each object * it's own arayinfo so they can have different bounds. At this time * they could be inconsistent. One should not try to have the same name * with different dimensions though. * * Revision 1.74 92/08/17 07:32:05 hines * change from new(template) to new template(args) * strange problem with tests/test5.hoc with segmentation violation that * isn't seen with objectcenter and goes away when xopens have a path to the * file. * * Revision 1.73 92/08/15 12:41:32 hines * can pass object variable as arg to oc functions and procedures. Within * the procedures the syntax is * $$1.ob.ob.var etc. * see test7.hoc for usage with array of strings * * Revision 1.72 92/08/12 16:16:16 hines * uninsert mechanism_name * * Revision 1.71 92/08/12 11:56:34 hines * hoc_fake_ret() allows calls to functions that do a ret(). These functions * can have no arguments and the caller must pop the stack and deal with * hoc_returning. * This was done so init... could be called both from hoc_spinit and from * hoc. * last function called by hoc_spinit in hocusr.c is hoc_last_init() * * Revision 1.70 92/08/12 10:45:42 hines * Changes of sejnowski lab. also gets sred from hoc. Major addition is * a new x.c which is modified for screen updating following an expose * event. This is in x_sejnowski.c and will compile to x.o when * Sejnowski is defined as 1 in Imakefile (don't forget imknrn -a when * changed and delete old x.o) * Does not contain get_default on this checkin * * Revision 1.69 92/08/12 08:51:12 hines * FARADAY and R (molar gas constant) added as built-in constants. * * Revision 1.68 92/08/10 16:00:05 hines * forgot to checkin parse.y last time * * Revision 1.67 92/08/10 15:59:38 hines * lists of sections with seclistdef ,,, * append_seclist(seclist) * remove_seclist(seclist) * forsec seclist * ifsec seclist * * * Revision 1.66 92/08/10 10:30:28 hines * hoc_thisobject contains a pointer to the current object. It is 0 at the * top level. * * Revision 1.65 92/08/08 12:57:43 hines * access object.section * * Revision 1.64 92/08/08 12:42:22 hines * to get decent section names each object of a template has a unique index * a count of the objects is kept in the template and when the count is * 0 then the index restarts at 0. * print ob will show the style * * Revision 1.63 92/08/08 11:56:50 hines * ob.section.var not implemented but hooks are there to do it later * * Revision 1.62 92/08/08 10:03:01 hines * properly push section from object * * Revision 1.61 92/08/07 16:13:27 hines * sections as objects. sections now live in nmodl style list * * Revision 1.60 92/07/31 16:16:58 hines * float_epsilon used for logical comparisons, int(), indexing and short for * default value is 1e-11 * Hopfully no one has to worry about roundoff for the loops to come out * right. * * * Revision 1.59 92/07/31 14:34:57 hines * avoid saber warning with hoc_xpop not declared double in nocable.c * * Revision 1.58 92/07/31 14:17:04 hines * better handling of errno as in hoc * * Revision 1.57 92/07/31 13:49:19 hines * fix up forsec and ifsec so it works in object context * * Revision 1.56 92/07/31 12:12:38 hines * following merged from hoc * The regular expression has been augmented with * {istart-iend} where istart and iend are integers. The expression matches * any integer that falls in this range. * * Revision 1.55 92/07/31 12:01:15 hines * forsec and ifsec merged from hoc/neuron * * Revision 1.54 92/07/31 08:57:45 hines * no longer use strings.h * * Revision 1.53 92/07/31 08:55:29 hines * following merged from hoc to oc * Stewart Jasloves contribution to axis labels. This can be invoked by * setting #define Jaslove 1. It is 0 by default. The 3rd and 6th arguments * of axis() may have a precision which specifies the number of digits * after the decimal point for axis labels. eg. 5.3 denotes 5 tic marks with * 3 digits after the decimal point for each tic label * * * Revision 1.52 92/07/31 08:41:19 hines * ecalloc returns 0 when requesting 0 space. (now matches hoc) * * Revision 1.51 92/07/31 08:33:45 hines * failed to checkin code2.c when chkarg got moved there * * Revision 1.50 92/07/31 08:32:16 hines * C interface objects see the top level symbol table * * Revision 1.49 92/07/31 08:29:56 hines * remove the old newgraph stuff * * Revision 1.48 92/07/07 09:50:05 hines * chkarg moved to code2.c so always available * * Revision 1.47 92/07/06 16:13:38 hines * good start with interfacing c++ objects so they are callable from oc * * Revision 1.46 92/05/13 13:41:22 hines * some names in hoc.h were reserved for c++.These are changed to * cName when __cplusplus is defined. * * Revision 1.45 92/05/13 13:39:45 hines * plot(-3) merely seeked to beginning of file without erasing it. * now plt(-3) closes and reopens a 0 length file. * only for fig plots not done for codraw at this time. * * Revision 1.44 92/04/15 11:22:58 hines * double hoc_run_expr(sym) returns value of expresssion in sym made by * hoc_parse_exper() * * Revision 1.43 92/04/09 12:39:54 hines * ready to add idplot usage with newgraph(), addgraph(), initgraph(), xgraph() * flushgraph(). * A facilitating function exists called * Symbol* hoc_parse_expr(char* str, Symlist** psymlist) which * return a procedure symbol which can be used as * hoc_execute(sym->u.u_proc->defn.in); * val = hoc_xpop(); * * Revision 1.42 92/03/27 14:06:22 hines * turn off readline event hook if hoc_interviews becomes 0 * * Revision 1.41 92/03/19 08:57:38 hines * axis labels close to origin set to 0 so label not strange looking. * * Revision 1.40 92/03/17 08:09:52 hines * xmenufile() adds menu which can save or open menufiles. * * Revision 1.39 92/03/11 19:07:38 hines * proper passing of strings as arguments to built-in functions. * gargstr(i) and hoc_pgargstr(i) * * Revision 1.38 92/03/11 15:37:27 hines * doEvents() will execute InterViews events if any. * * Revision 1.37 92/03/11 13:56:13 hines * hoc.c inadvertently checked in last time with sigsegvec removed * * Revision 1.36 92/03/11 13:53:56 hines * all parse errors now hoc_execerror * * Revision 1.35 92/03/06 16:01:18 hines * hoc_oc can be used while executing. uses rinitcode(). But a problem * exists when single tokens are parsed. * * Revision 1.34 92/03/06 07:19:46 hines * hoc_ac_ global variable defined to allow evaluation of expressions * via hoc_oc("hoc_ac_ = expr\n"); * Then the user can find the value in extern double hoc_ac_. * * Revision 1.33 92/03/05 14:46:39 hines * number that terminates string demonstrated a bug in ungetc. now * we test to make sure we don't unget a '\0' * * Revision 1.32 92/03/05 13:25:41 hines * fix problem where not initcode after a execution by hoc_oc() * xvalue added * * Revision 1.31 92/02/26 10:27:54 hines * xview removed. nrnoc verified (needed fixes) for reversed section syntax. * * Revision 1.30 92/02/21 17:06:54 hines * new signal handling. hoc_oc() gets a longjump and returns. on return * the normal longjump is to hoc_run1() * * Revision 1.29 92/02/21 14:38:57 hines * Completely event driven with event loop from InterViews. * * Revision 1.28 92/02/20 10:55:02 hines * after em call from hoc_oc, execute the buffer * * Revision 1.27 92/02/19 15:02:02 hines * preparing for sections within objects. syntax is * ob.section stmt section.var * this causes about 36 extra shift/reduce conflicts * * Revision 1.26 92/02/17 08:56:51 hines * Imake defines BISON. Default parser is yacc (for hoc, nmodl, etc.) * * Revision 1.25 92/02/06 12:12:42 hines * Can have comments on same line with no tokens in between. * error fixed in translation of range vector with explicit section as first * item in a statement. * * Revision 1.24 92/02/05 08:42:18 hines * Can connect a NEURON {POINTER var,...} in models to external variables using * connect var_suffix, anyvar * * Revision 1.23 92/02/03 11:22:59 hines * rudimentary event driven version of oc. * * Revision 1.22 92/01/31 15:02:06 hines * fix a trivial type mismatch that was revealed on switch to bison. * Ready now to make oc event driven. * * Revision 1.21 92/01/30 11:05:12 hines * leave out an xflush in x.c so doesn't hang. error in cable part of code.c * found by codecenter. "if (a=b) instead of if(a == b)" * Imakefile invokes ObjectOrientedHoc * * Revision 1.20 92/01/30 08:43:33 hines * add -I.. to makedepend include path so it can find a touched stdarg.h * * Revision 1.19 92/01/30 08:17:21 hines * bug fixes found in hoc incorporated. if()return, no else, objectcenter * warnings. * * Revision 1.18 92/01/30 08:15:26 hines * y * under Imake control * * Revision 1.17 91/11/18 10:54:10 hines * xview menus. ^C doesnt work yet. * * Revision 1.16 91/11/13 07:57:09 hines * userdouble uses old style sym->u.pval * * Revision 1.15 91/11/05 11:24:17 hines * all neuron/examples produce same results with nrnoc as with neuron. * Found quite a few bugs this way. * * Revision 1.14 91/10/30 14:40:49 hines * stack.hoc works and can be reloaded * * Revision 1.13 91/10/29 15:05:21 hines * emacs command line editor with history * * Revision 1.12 91/10/25 12:03:52 hines * double arrays in objects work. init (if it exists) in a template * is executed for each new object. * * Revision 1.11 91/10/25 10:30:03 hines * stop works inside object procedures * fixed problem with single object statement in loop or if with no braces * * Revision 1.10 91/10/25 09:32:55 hines * object arrays. stack.hoc works. need to work on stop command and * necessity for braces around single statements in for loops. * * Revision 1.9 91/10/24 16:22:11 hines * can call object functions and procedures. Object arrays not working yet. * object_id(obj) is used for tests. * STKDEBUG turned on in code.c in which every element also carries a type. * * Revision 1.8 91/10/22 15:47:17 hines * objects and components. can assign, evaluate, and print. * No object arrays or function components yet. * At level of test3.hoc * * Revision 1.7 91/10/18 14:40:51 hines * symbol tables now are type Symlist containing pointers to first and last * symbols. New symbols get added onto the end. * * Revision 1.6 91/10/17 15:01:39 hines * VAR, STRING now handled with pointer to value located in object data space * to allow future multiple objects. Ie symbol for var, string, objectvar * has offset into a pointer data space. * * Revision 1.5 91/10/16 13:14:14 hines * fix up mistakes in last checkin * * Revision 1.4 91/10/16 12:48:00 hines * symbol tables for the templates. Prototype not even executed. * need to come to grips with how to find data in the objects. * * Revision 1.3 91/10/16 07:33:03 hines * prototype of type checking * * Revision 1.2 91/10/14 17:36:16 hines * scaffolding for oop in place. Syntax about right. No action yet. * * Revision 1.1 91/10/11 11:12:22 hines * Initial revision * * -------------------------------- * Revision 4.44 91/10/01 11:37:55 hines * optional use of xview libraries * * Revision 4.43 91/10/01 11:34:27 hines * gather console input at one place in preparation for adding * emacs like command line editing. Hoc input now reads entire line. * Revision 3.1 89/07/07 14:16:30 mlh * automattic version numbering * * Revision 3.0 89/07/07 13:58:28 mlh * *** empty log message *** * */ /* hoc */ char *RCS_hoc_version = "$Revision: 3 $"; char *RCS_hoc_date = "$Date: 2003-02-11 19:36:05 +0100 (Tue, 11 Feb 2003) $"; neuron-7.5/src/oc/x.c000077500000000000000000000124671323325274500145210ustar00rootroot00000000000000#include <../../nrnconf.h> #include #if defined(__TURBOC__) || defined(__linux__) #ifndef NRNOC_X11 #define NRNOC_X11 0 #endif #endif #if defined(__alpha) #undef USG #endif #if NRNOC_X11 #include #include #include /* initial position of window */ #define WX 100 #define WY 100 /* size of window */ #define WIDTH 500 #define HEIGHT 390 #define MARGIN 0 /* size of icon */ #define IWIDTH 64 #define IHEIGHT 20 #define Plot(x,y) XDrawPoint(display,win,gc,(x),(y)) #define Line(x1,y1,x2,y2) XDrawLine(display,win,gc,(x1),(y1),(x2),(y2)) #define LAST xold=xnew; yold=ynew static int fast; /* don't flush until plt(-1), use drawlines*/ static int nlinept; static XPoint polyline[200]; static int maxnlinept=200; static Display *display; static Window win; static GC gc; static int screen; static XEvent report; /*static XFontStruct *font;*/ static int D; #define Color (D > 1) #define Ncolors 11 static unsigned long colors[Ncolors]; extern void x11_open_window(); extern void x11_draw_vec(); int x11_init_done; static int xnew, ynew; static int xold, yold; static double xscale, yscale; #define TEKX 1000. #define TEKY 780. static void set_colors(void); void x11_fast(int mode) { fast = mode; } void x11flush(void) { if (fast && nlinept) { x11_draw_vec(); } XFlush(display); } static void getscale(void) { int x,y; unsigned int width, height, border_width, depth; Window root; XGetGeometry(display, win, &root, &x, &y, & width, &height, &border_width, &depth); xscale = ((double)width)/TEKX; yscale = ((double)height)/TEKY; } void x11_coord(double x, double y) { xnew = (int)(xscale*x); ynew = (int)(yscale*(TEKY - y)); } void x11_draw_vec(void) { if (nlinept > 1) { XDrawLines(display, win, gc, polyline, nlinept, CoordModeOrigin); } nlinept = 0; } void x11_vector(void) { if (fast) { if (nlinept == 0) { polyline[0].x = xold; polyline[0].y = yold; ++nlinept; } if (nlinept >= maxnlinept) { x11_draw_vec(); } polyline[nlinept].x = xnew; polyline[nlinept].y = ynew; ++nlinept; }else{ Line(xold, yold, xnew, ynew); XFlush(display); } LAST; } void x11_point(void) { Plot(xnew, ynew); LAST; if (!fast) { XFlush(display); } } void x11_move(void) { if (fast) { if (nlinept && (xnew != xold || ynew != yold)) { x11_draw_vec(); } } LAST; } void x11_clear(void){ XClearWindow(display, win); XFlush(display); getscale(); } void x11_cleararea(void){ int w, h, x, y; w = xnew-xold; h = ynew-yold; if (w < 0) { w = -w; x = xnew; }else{ x = xold; } if (h < 0) { h = -h; y = ynew; }else{ y=yold; } XClearArea(display, win, x, y, w, h, False); if (!fast) { XFlush(display); } } void x11_put_text(const char* s) { if(fast && nlinept) { x11_draw_vec(); } XDrawString(display, win, gc, xold, yold, s, strlen(s)); if (!fast) { XFlush(display); } } void x11_setcolor(int c) { if (!x11_init_done) { x11_open_window(); } x11_draw_vec(); if (c == 0) { XSetForeground(display, gc, BlackPixel(display, screen)); } else if (!Color) { XSetForeground(display, gc, WhitePixel(display, screen)); } else { XSetForeground(display, gc, colors[c%Ncolors]); } if (!fast) { XFlush(display); } } void x11_open_window(void) { char *window_name = "Xhocplot"; char *display_name = NULL; XSizeHints size_hints; XWindowAttributes attr; if (x11_init_done) { return; } if ((display = XOpenDisplay(display_name)) == NULL) { (void)fprintf(stderr, "cannot connect to X server %s\n", XDisplayName(display_name)); } screen = DefaultScreen(display); win = XCreateSimpleWindow(display, RootWindow(display, screen), WX, WY, WIDTH, HEIGHT, 0, BlackPixel(display, screen), WhitePixel(display, screen)); XGetWindowAttributes(display, win, &attr); D = attr.depth; if (Color) set_colors(); size_hints.flags = USPosition|USSize; size_hints.x = WX; size_hints.y = WY; size_hints.width = WIDTH; size_hints.height = HEIGHT; XSetStandardProperties(display, win, window_name, NULL, 0, NULL, 0, &size_hints); gc = XCreateGC(display, win, 0, NULL); XSetWindowBackground(display, win, BlackPixel(display, screen)); XSetForeground(display, gc, WhitePixel(display, screen)); XSetBackground(display, gc, BlackPixel(display, screen)); XMapWindow(display, win); /* font = XLoadQueryFont(display, "9x15"); XSetFont(display, gc, font->fid); */ XSelectInput(display, win, ExposureMask); XNextEvent(display, &report); XSelectInput(display, win, 0L); getscale(); x11_init_done = 1; } void x11_close_window(void) { if (x11_init_done) { XFreeGC(display, gc); XCloseDisplay(display); } x11_init_done = 0; } /*----------------------------------------------------------------------------- * set_colors - set colors from user resources or defaults *---------------------------------------------------------------------------*/ char *color_names[Ncolors] = { "black", "white", "yellow", "red", "green", "blue", "magenta", "cyan", "sienna", "orange", "coral" }; static void set_colors(void) { int n; XColor used, exact; for(n=0; n /* /local/src/master/nrn/src/oc/xred.c,v 1.3 1996/02/16 16:19:33 hines Exp */ /* xred.c,v * Revision 1.3 1996/02/16 16:19:33 hines * OCSMALL used to throw out things not needed by teaching programs * * Revision 1.2 1995/04/03 13:58:43 hines * Port to MSWindows * * Revision 1.1.1.1 1994/10/12 17:22:16 hines * NEURON 3.0 distribution * * Revision 2.22 93/02/12 08:51:42 hines * beginning of port to PC-Dos * * Revision 2.20 93/02/03 11:27:59 hines * a bit more generic for portability. will possibly work on NeXT * * Revision 2.7 93/01/12 08:58:48 hines * to assign to a hoc string use * hoc_assign_str(char** cpp, char* buf) * Some minor modifications to allow use of some functions by File class * * Revision 1.2 92/08/12 10:45:40 hines * Changes of sejnowski lab. also gets sred from hoc. Major addition is * a new x.c which is modified for screen updating following an expose * event. This is in x_sejnowski.c and will compile to x.o when * Sejnowski is defined as 1 in Imakefile (don't forget imknrn -a when * changed and delete old x.o) * Does not contain get_default on this checkin * * Revision 1.2 1992/06/30 23:14:11 fisher * added strstr() function for the MIPS - the MIPS' string.h doesn't * contain strstr() (see hoc.h comment). * * Revision 1.1 1992/05/22 19:35:47 fisher * Initial revision * * Revision 4.59 92/04/13 11:09:08 hines * Stewart Jasloves contribution of sred(). usage is * i = sred("prompt", "default", "charlist") * type one of the characters in the charlist. the default becomes that * character. return value is position in charlist (0 if first char). * * Revision 1.1 90/02/14 09:47:19 mlh * Initial revision * */ #include "hoc.h" /* input a n integer in range > min and < max */ int ired(const char* prompt, int defalt, int min, int max) { return( (int) xred(prompt, (double) defalt, (double) min, (double) max)); } /* input a double number in range > min and < max program loops til proper number is typed in by user prompt and default are typed by computer default is used if user types RETURN key input is freeform as scanf can make it. */ #include double xred(const char* prompt, double defalt, double min, double max) { #if !OCSMALL char istr[80], c[2] ; double input; for (;;) { IGNORE(fprintf(stderr,"%s (%-.5g)",prompt,defalt)); #ifdef WIN32 if (gets(istr) != NULL) { strcat(istr, "\n"); #else if (fgets(istr,79,stdin) != NULL) { #endif if (istr[0] == '\n') { input = defalt; goto label; } if (sscanf(istr,"%lf%1s",&input,c) == 1) if (sscanf(istr,"%lf",&input) == 1) label: { if (input >= min && input <= max) return(input); IGNORE(fprintf(stderr,"must be > %-.5g and < %-.5g\n", min,max)); continue; } } else { rewind(stdin); } IGNORE(fprintf(stderr,"input error\n")); } #else return 0.; #endif } /* hoc_Sred.c SW Jaslove March 23, 1992 This is the hoc interface for the sred() function, which follows. */ void hoc_Sred(void) { #if !OCSMALL char defalt[80], **pdefalt; double x; strcpy(defalt,gargstr(2)); pdefalt = hoc_pgargstr(2); x = (double) hoc_sred(gargstr(1), defalt, gargstr(3)); hoc_assign_str(pdefalt, defalt); #else double x = 0.; #endif ret(); hoc_pushx(x); } #if !OCSMALL /* sred.c SW Jaslove March 23, 1992 n = sred(prompt,default,charlist) Outputs a prompt and inputs a string which MUST be a member of charlist. If default exists: default is returned if user types RETURN key only. If default is null: a string MUST be entered, there is no default. If charlist is null and default exists: any typed string is accepted. Default MUST be a member of charlist, so a return value can be specified. Input is terminated by RETURN or first space after a nonspace char. Program loops until proper input is typed in by user. RETURNS: Starting position of input in charlist, beginning with 0. *** NOTE: default is replaced by entered string *** */ int hoc_sred(const char* prompt, char* defalt, char* charlist) { char istr[80], c[2], instring[40], *result; #if !defined(HAVE_STRSTR) extern char *strstr(); #endif for (;;) { /* cycle until done */ IGNORE(fprintf(stderr,"%s (%s)",prompt,defalt)); /* print prompt */ #ifdef WIN32 if (gets(istr) != NULL) { strcat(istr, "\n"); #else if (fgets(istr,79,stdin) != NULL) { /* read input */ #endif if (defalt[0]!='\0' && istr[0]=='\n') { strcpy(istr,defalt); /* if CR only, use default */ }else{ istr[strlen(istr)-1]='\0'; /* if real input, strip return */ } if ( sscanf(istr,"%s%s",instring,c) == 1 ) { /* only single input */ if ( charlist=='\0' ) { /* if charlist is null: */ strcpy(defalt,instring); /* accept any input, so */ return(0); /* update default and return 0 */ } if ((result = strstr(charlist,instring)) != NULL ) { strcpy(defalt,instring); /* if input is in charlist: */ return(result-charlist); /* update default and return pos */ } } IGNORE(fprintf(stderr, "input must be a substring of <<%s>>\n", charlist)); continue; /* go back for another cycle */ } else { rewind(stdin); } IGNORE(fprintf(stderr,"input error\n")); /* recycle */ } return 0; } #if !defined(HAVE_STRSTR) char * strstr(cs, ct) char *cs, *ct; { char *strchr_ptr, *cs_ptr; int ct_len; ct_len = strlen(ct); for (cs_ptr = cs; ((strchr_ptr = (char *)strchr(cs_ptr, ct[0])) && (ct_len <= strlen(strchr_ptr))); cs_ptr = strchr_ptr + 1) { if (memcmp(ct, strchr_ptr, ct_len) == 0) { return strchr_ptr; } } return (char *)0; } #endif #endif neuron-7.5/src/parallel/000077500000000000000000000000001323325274500152645ustar00rootroot00000000000000neuron-7.5/src/parallel/Makefile.am000077500000000000000000000007431323325274500173270ustar00rootroot00000000000000# This makefile does nothing except to copy some .c and .h files into # the distribution tar file. EXTRA_DIST = bbs.cpp bbs.h bbsdirect.cpp bbsdirect.h bbsimpl.h \ bbslocal.cpp bbslocal.h bbslsrv.cpp bbslsrv.h \ bbslsrv2.cpp bbslsrv2.h bbsrcli.cpp bbsrcli.h \ bbssrv.cpp bbssrv.h ocbbs.cpp \ bbsdirectmpi.cpp bbssrvmpi.cpp bbssrv2mpi.cpp bbsclimpi.cpp \ bbssrv2mpi.h subworld.cpp \ test0.hoc test1.hoc test2.hoc test3.hoc test4.hoc test5.hoc \ test6.hoc test7.hoc test0.py neuron-7.5/src/parallel/Makefile.in000066400000000000000000000447241323325274500173440ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This makefile does nothing except to copy some .c and .h files into # the distribution tar file. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/parallel ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)bbsconf.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/bbsconf.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = bbs.cpp bbs.h bbsdirect.cpp bbsdirect.h bbsimpl.h \ bbslocal.cpp bbslocal.h bbslsrv.cpp bbslsrv.h \ bbslsrv2.cpp bbslsrv2.h bbsrcli.cpp bbsrcli.h \ bbssrv.cpp bbssrv.h ocbbs.cpp \ bbsdirectmpi.cpp bbssrvmpi.cpp bbssrv2mpi.cpp bbsclimpi.cpp \ bbssrv2mpi.h subworld.cpp \ test0.hoc test1.hoc test2.hoc test3.hoc test4.hoc test5.hoc \ test6.hoc test7.hoc test0.py all: bbsconf.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/parallel/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/parallel/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): bbsconf.h: stamp-h9 @test -f $@ || rm -f stamp-h9 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h9 stamp-h9: $(srcdir)/bbsconf.h.in $(top_builddir)/config.status @rm -f stamp-h9 cd $(top_builddir) && $(SHELL) ./config.status src/parallel/bbsconf.h distclean-hdr: -rm -f bbsconf.h stamp-h9 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile bbsconf.h installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/parallel/bbs.cpp000066400000000000000000000263301323325274500165420ustar00rootroot00000000000000#include <../../nrnconf.h> #include "nrnmpi.h" #include "bbsconf.h" #include #include #include #include "oc2iv.h" #include "bbs.h" #include "bbslocal.h" #if defined(HAVE_PVM3_H) || defined(NRNMPI) #include "bbsdirect.h" #include "bbsrcli.h" #endif #if defined(HAVE_TMS) && !NRNMPI #include #include #include static struct tms tmsbuf, tms_start_; static clock_t starttime; #endif extern "C" { extern int nrn_global_argc; extern char** nrn_global_argv; }; bool BBSImpl::is_master_ = false; bool BBSImpl::started_ = false; bool BBSImpl::done_ = false; bool BBSImpl::master_works_ = true; #undef debug #define debug BBSImpl::debug_ int BBSImpl::debug_ = 0; bool BBSImpl::use_pvm_; int BBSImpl::mytid_; static int etaskcnt; static double total_exec_time; static double worker_take_time; BBS::BBS() { init(-1); } BBS::BBS(int n) { init(n); } #ifdef HAVE_PVM3_H void BBS::init(int n) { //printf("BBS::init\n"); //fflush(stdout); if (!BBSImpl::started_) { if (nrnmpi_numprocs_bbs < 2) { // master first time call nrnmpi_numprocs_bbs = 1; // the minimum if (n == 0) { // demand local BBSImpl::use_pvm_ = false; }else{ BBSDirect::check_pvm(); } BBSImpl::is_master_ = true; }else{ BBSImpl::use_pvm_ = true; } } if (BBSImpl::use_pvm_ == false) { //printf("new BBSLocal\n"); //fflush(stdout); impl_ = new BBSLocal(); }else{ if (BBSImpl::is_master_) { //printf("new BBSDirect\n"); //fflush(stdout); impl_ = new BBSDirect(); }else{ //printf("new BBSClient\n"); //fflush(stdout); impl_ = new BBSClient(); } } } #else //!HAVE_PVM3_H #if NRNMPI void BBS::init(int) { if (nrnmpi_use == 0) { BBSImpl::is_master_ = true; BBSImpl::use_pvm_ = false; impl_ = new BBSLocal(); return; } if (!BBSImpl::started_) { BBSImpl::use_pvm_ = false; BBSImpl::is_master_ = (nrnmpi_myid_bbs == 0) ? true : false; BBSImpl::master_works_ = true; //printf("%d BBS::init is_master=%d\n", nrnmpi_myid_bbs, BBSImpl::is_master_); } // Just as with PVM which stored buffers on the bulletin board // so we have the following files to store MPI_PACKED buffers // on the bulletin board. It would be possible to factor out // the pvm stuff and we may do that later but for now we // start with copies of the four files that worked for PVM // and convert to the nrnmpi functions implemented in // ../nrnmpi // The four files are // bbsclimpi.cpp - mpi remote client BBSClient from bbsrcli.cpp // bbsdirectmpi.cpp - mpi master client BBSDirect from bbsdirect.cpp // bbssrvmpi.cpp - mpi server portion to remote client from master bbs // BBSDirectServer derived from bbssrv.cpp // bbslsrvmpi.cpp - mpi master bbs portion of BBSDirectServer // derived from bbslsrv2.cpp // We reuse the .h files of these. if (BBSImpl::is_master_) { impl_ = new BBSDirect(); }else{ impl_ = new BBSClient(); } } #else // !NRNMPI void BBS::init(int) { if (!BBSImpl::started_) { BBSImpl::use_pvm_ = false; BBSImpl::is_master_ = true; BBSImpl::master_works_ = true; } impl_ = new BBSLocal(); } #endif // !NRNMPI #endif // !HAVE_PVM3_H BBSImpl::BBSImpl() { runworker_called_ = 0; wait_time_ = 0.; send_time_ = 0.; integ_time_ = 0.; working_id_ = 0; n_ = 0; pickle_ret_ = 0; pickle_ret_size_ = 0; } BBS::~BBS() { delete impl_; } BBSImpl::~BBSImpl() { if (pickle_ret_) { delete [] pickle_ret_; } } bool BBS::is_master() { return BBSImpl::is_master_; } int BBS::nhost() { return nrnmpi_numprocs; } int BBS::myid() { return nrnmpi_myid; } bool BBSImpl::is_master() { return is_master_; } double BBS::time() { return impl_->time(); } double BBSImpl::time() { #if NRNMPI return nrnmpi_wtime(); #else #ifdef HAVE_TMS return double(times(&tmsbuf))/100.; #else return 0.; #endif #endif } double BBS::wait_time() { return impl_->wait_time_; } double BBS::integ_time() { return impl_->integ_time_; } double BBS::send_time() { return impl_->send_time_; } void BBS::add_wait_time(double st) { impl_->wait_time_ += impl_->time() - st; } void BBS::perror(const char* s) { impl_->perror(s); } void BBSImpl::perror(const char*) { } int BBS::upkint() { int i = impl_->upkint(); if (debug) { printf("upkint %d\n", i); } return i; } double BBS::upkdouble() { double d = impl_->upkdouble(); if (debug) { printf("upkdouble %g\n", d); } return d; } void BBS::upkvec(int n, double* px) { impl_->upkvec(n, px); if (debug) { printf("upkvec %d\n", n); } } char* BBS::upkstr() { char* s = impl_->upkstr(); if (debug) { printf("upkstr |%s|\n", s); } return s; } char* BBS::upkpickle(size_t* n) { char* s = impl_->upkpickle(n); if (debug) { printf("upkpickle %lu |%s|\n", *n, s); } return s; } void BBS::pkbegin() { if (debug) { printf("pkbegin\n"); } impl_->pkbegin(); } void BBS::pkint(int i) { if (debug) { printf("pkint %d\n", i); } impl_->pkint(i); } void BBS::pkdouble(double x) { if (debug) { printf("pkdouble %g\n", x); } impl_->pkdouble(x); } void BBS::pkvec(int n, double* px) { if (debug) { printf("pkdouble %d\n", n); } impl_->pkvec(n, px); } void BBS::pkstr(const char* s) { if (debug) { printf("pkstr |%s|\n", s); } impl_->pkstr(s); } void BBS::pkpickle(const char* s, size_t n) { if (debug) { printf("pkpickle %lu |%s|\n", n, s); } impl_->pkpickle(s, n); } #if 0 // for now all todo messages are of the three item form // tid // gid // id // "stmt" // the latter should set hoc_ac_ if the return value is important // right now every arg must be literal, we'll handle variables later. // eg the following should work. // n = 1000 x = 0 for i=1,n { x += i } hoc_ac_ = x // although it may makes sense to send the result directly to the // tid for now we just put it back onto the mailbox in the form // message: "result tid gid" with two items, i.e. id, hoc_ac_ // Modified 11/30/09. To allow a return of a (pickled) PythonObject // for the case when the execution is for a Python Callable the return // message result now has three items, i.e. id, rtype, hoc_ac or pickled // PyObject. rtype = 0 means hoc_ac, rtype = 1 means pickled PyObject. // execute_helper returns the pickle string or (char*)0. #endif #if 0 // the todo management has been considerably modified to support // a priority queue style for the order in which tasks are executed. // Now the server manages the task id. Given a task id, it knows the // parent task id. // The working_id is always non-trivial on worker machines, and is // only 0 on the master when dealing with a submission at the top level // post_todo(working_id_) message is the statement, here the working_id is // the parent of the future stmt task. // take_todo: message is the statement. return is the id of this task // post_result(id) message is return value. // the result will be retrieved relative to the submitting working_id_ // look_take_result(working_id_) message is the return value. the return // value of this call is the id of the task that computed the return. #endif // BBSImpl::execute_helper() in ocbbs.c void BBSImpl::execute(int id) { // assumes a "_todo" message in receive buffer ++etaskcnt; double st, et; int userid; char* rs; char* s; size_t n; int i; int save_id = working_id_; int save_n = n_; working_id_ = id; n_ = 0; st = time(); if (debug_) { printf("execute begin %g: working_id_=%d\n",st, working_id_); } userid = upkint(); hoc_ac_ = double(id); rs = execute_helper(&n, id); //builds and execute hoc statement et = time() - st; total_exec_time += et; if (debug) { printf("execute end elapsed %g: working_id_=%d hoc_ac_=%g\n", et, working_id_, hoc_ac_); } pkbegin(); pkint(userid); pkint(rs?1:0); if (!rs) { pkdouble(hoc_ac_); }else{ pkpickle(rs, n); delete [] rs; } working_id_ = save_id; n_ = save_n; post_result(id); } int BBS::submit(int userid) { return impl_->submit(userid); } int BBSImpl::submit(int userid) { // userid was the first item packed ++n_; if (debug) { printf("submit n_= %d for working_id=%d userid=%d\n",n_, working_id_, userid); } if (userid < 0) { save_args(-userid); }else{ post_todo(working_id_); } return userid; } void BBS::context() { impl_->context(); } void BBSImpl::context() { printf("can't execute BBS::context on a worker\n"); exit(1); } bool BBS::working(int& id, double& x, int& userid) { return impl_->working(id, x, userid); } void BBS::master_works(int flag) { if (impl_->is_master() && nrnmpi_numprocs_bbs > 1) { impl_->master_works_ = flag ? true : false; } } int BBSImpl::master_take_result(int pid) { assert(0); return 0; } bool BBSImpl::working(int& id, double& x, int& userid) { int cnt=0; int rtype; double t; if (n_ <= 0) { if (debug) { printf("working n_=%d: return false\n", n_); } return false; } if(debug) { t = time(); } for (;;) { ++cnt; if (master_works_) { id = look_take_result(working_id_); }else{ id = master_take_result(working_id_); } if (id != 0) { userid = upkint(); rtype = upkint(); if (rtype == 0) { x = upkdouble(); }else{ assert(rtype == 1); x = 0.0; if (pickle_ret_) { delete [] pickle_ret_; } pickle_ret_ = upkpickle(&pickle_ret_size_); } --n_; if (debug) { printf("working n_=%d: after %d try elapsed %g sec got result for %d id=%d x=%g\n", n_, cnt, time()-t, working_id_, id, x); } if (userid < 0) { userid = -userid; return_args(userid); } return true; }else if ( (id = look_take_todo()) != 0) { if (debug) { printf("working: no result for %d but did get _todo id=%d\n", working_id_, id); } execute(id); } } }; void BBS::worker() { impl_->runworker_called_ = 1; impl_->worker(); } void BBSImpl::worker() { // forever request and execute commands double st, et; int id; if (!is_master()) { if (nrnmpi_myid_bbs == -1) { // wait for message from for(;;) { // the proper nrnmpi_myid == 0 subworld_worker_execute(); } } for (;;) { st = time(); id = take_todo(); et = time() - st; worker_take_time += et; execute(id); } } } void BBS::post(const char* key) { if (debug) { printf("post: |%s|\n", key); } impl_->post(key); } bool BBS::look_take(const char* key) { bool b = impl_->look_take(key); if (debug) { printf("look_take |%s| return %d\n", key, b); } return b; } bool BBS::look(const char* key) { bool b = impl_->look(key); if (debug) { printf("look |%s| return %d\n", key, b); } return b; } void BBS::take(const char* key) { // blocking double t; if (debug) { t = time(); printf("begin take |%s| at %g\n", key, t); } impl_->take(key); if (debug) { printf("end take |%s| elapsed %g from %g\n", key, time()-t, t); } } void BBS::done() { if (impl_->runworker_called_) { impl_->done(); } } void BBSImpl::done() { if (done_) { return; } done_ = true; #ifdef HAVE_TMS clock_t elapsed = times(&tmsbuf) - starttime; printf("%d tasks in %g seconds. %g seconds waiting for tasks\n", etaskcnt, total_exec_time, worker_take_time); printf("user=%g sys=%g elapsed=%g %g%%\n", (double)(tmsbuf.tms_utime - tms_start_.tms_utime)/100, (double)(tmsbuf.tms_stime - tms_start_.tms_stime)/100, (double)(elapsed)/100, 100.*(double)(tmsbuf.tms_utime - tms_start_.tms_utime)/(double)elapsed ); #endif } void BBSImpl::start() { if (started_) { return; } started_ = 1; #ifdef HAVE_TMS starttime = times(&tms_start_); #endif } neuron-7.5/src/parallel/bbs.h000066400000000000000000000032101323325274500161770ustar00rootroot00000000000000#ifndef bbs_h #define bbs_h #include "bbsimpl.h" class IvocVect; class BBS { public: BBS(); BBS(int nhost); virtual ~BBS(); bool look(const char*); void take(const char*); /* blocks til something to take */ bool look_take(const char*); /* returns false if nothing to take */ // after taking use these int upkint(); double upkdouble(); void upkvec(int n, double* px); // n input px space must exist char* upkstr(); // delete [] char* when finished char* upkpickle(size_t* size); // delete [] char* when finished // before posting use these void pkbegin(); void pkint(int); void pkdouble(double); void pkvec(int n, double* px); // doesn't pack n void pkstr(const char*); void pkpickle(const char*, size_t size); void post(const char*); int submit(int userid); bool working(int &id, double& x, int& userid); void master_works(int flag); void context(); bool is_master(); void worker(); // forever execute void done(); // prints timing void perror(const char*); double time(); double wait_time(); double integ_time(); double send_time(); void add_wait_time(double); // add interval since arg int nhost(); int myid(); // netpar interface void set_gid2node(int, int); int gid_exists(int); double threshold(); void cell(); void outputcell(int); void spike_record(int, IvocVect*, IvocVect*); void netpar_solve(double); Object** gid2obj(int); Object** gid2cell(int); Object** gid_connect(int); double netpar_mindelay(double maxdelay); void netpar_spanning_statistics(int*, int*, int*, int*); IvocVect* netpar_max_histogram(IvocVect*); Object** pyret(); protected: void init(int); protected: BBSImpl* impl_; }; #endif neuron-7.5/src/parallel/bbsclimpi.cpp000066400000000000000000000150321323325274500177350ustar00rootroot00000000000000#include <../../nrnconf.h> #include "../nrnpython/nrnpython_config.h" #include #include "bbsconf.h" #ifdef NRNMPI // to end of file #include #include #include #include #include #include "oc2iv.h" #include "bbs.h" #include "bbsrcli.h" #include "bbssrv.h" extern "C" { extern void nrnmpi_int_broadcast(int*, int, int); } #define debug 0 #if defined(USE_PYTHON) extern void (*p_nrnpython_start)(int); #endif #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #else #include #include #endif struct ltint { bool operator() (int i, int j) const { return i < j; } }; class KeepArgs : public map{}; #endif int BBSClient::sid_; BBSClient::BBSClient() { sendbuf_ = nil; recvbuf_ = nil; request_ = nrnmpi_newbuf(100); nrnmpi_ref(request_); #if defined(HAVE_STL) keepargs_ = new KeepArgs(); #endif BBSClient::start(); } BBSClient::~BBSClient() { nrnmpi_unref(sendbuf_); nrnmpi_unref(recvbuf_); nrnmpi_unref(request_); #if defined(HAVE_STL) delete keepargs_; #endif } void BBSClient::perror(const char* s) { printf("BBSClient error: %s\n", s); } void BBSClient::upkbegin() { nrnmpi_upkbegin(recvbuf_); } char* BBSClient::getkey() { return nrnmpi_getkey(recvbuf_); } int BBSClient::getid() { return nrnmpi_getid(recvbuf_); } int BBSClient::upkint() { return nrnmpi_upkint(recvbuf_); } double BBSClient::upkdouble() { return nrnmpi_upkdouble(recvbuf_); } void BBSClient::upkvec(int n, double* x) { nrnmpi_upkvec(n, x, recvbuf_); } char* BBSClient::upkstr() { return nrnmpi_upkstr(recvbuf_); // do not forget to free(string) } char* BBSClient::upkpickle(size_t* n) { return nrnmpi_upkpickle(n, recvbuf_); // do not forget to free(string) } void BBSClient::pkbegin() { if (!sendbuf_) { sendbuf_ = nrnmpi_newbuf(100); nrnmpi_ref(sendbuf_); } nrnmpi_pkbegin(sendbuf_); } void BBSClient::pkint(int i) { nrnmpi_pkint(i, sendbuf_); } void BBSClient::pkdouble(double x) { nrnmpi_pkdouble(x, sendbuf_); } void BBSClient::pkvec(int n, double* x) { nrnmpi_pkvec(n, x, sendbuf_); } void BBSClient::pkstr(const char* s) { nrnmpi_pkstr(s, sendbuf_); } void BBSClient::pkpickle(const char* s, size_t n) { nrnmpi_pkpickle(s, n, sendbuf_); } void BBSClient::post(const char* key) { #if debug printf("%d BBSClient::post |%s|\n", nrnmpi_myid_bbs, key); fflush(stdout); #endif nrnmpi_enddata(sendbuf_); nrnmpi_pkstr(key, sendbuf_); nrnmpi_bbssend(sid_, POST, sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; } void BBSClient::post_todo(int parentid) { #if debug printf("%d BBSClient::post_todo for %d\n", nrnmpi_myid_bbs, parentid); fflush(stdout); #endif nrnmpi_enddata(sendbuf_); nrnmpi_pkint(parentid, sendbuf_); nrnmpi_bbssend(sid_, POST_TODO, sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; } void BBSClient::post_result(int id) { #if debug printf("%d BBSClient::post_result %d\n", nrnmpi_myid_bbs, id); fflush(stdout); #endif nrnmpi_enddata(sendbuf_); nrnmpi_pkint(id, sendbuf_); nrnmpi_bbssend(sid_, POST_RESULT, sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; } int BBSClient::get(const char* key, int type) { #if debug printf("%d BBSClient::get |%s| type=%d\n", nrnmpi_myid_bbs, key, type); fflush(stdout); #endif nrnmpi_pkbegin(request_); nrnmpi_enddata(request_); nrnmpi_pkstr(key, request_); return get(type); } int BBSClient::get(int key, int type) { #if debug printf("%d BBSClient::get %d type=%d\n", nrnmpi_myid_bbs, key, type); fflush(stdout); #endif nrnmpi_pkbegin(request_); nrnmpi_enddata(request_); nrnmpi_pkint(key, request_); return get(type)-1; // sent id+1 so cannot be mistaken for QUIT } int BBSClient::get(int type) { // blocking fflush(stdout); fflush(stderr); double ts = time(); nrnmpi_unref(recvbuf_); recvbuf_ = nrnmpi_newbuf(100); nrnmpi_ref(recvbuf_); int msgtag = nrnmpi_bbssendrecv(sid_, type, request_, recvbuf_); errno = 0; wait_time_ += time() - ts; #if debug printf("%d BBSClient::get return msgtag=%d\n", nrnmpi_myid_bbs, msgtag); fflush(stdout); #endif if (msgtag == QUIT) { done(); } return msgtag; } bool BBSClient::look_take(const char* key) { #if debug printf("%d BBSClient::look_take %s\n", nrnmpi_myid_bbs, key); #endif int type = get(key, LOOK_TAKE); bool b = (type == LOOK_TAKE_YES); if (b) { upkbegin(); } return b; } bool BBSClient::look(const char* key) { #if debug printf("%d BBSClient::look %s\n", nrnmpi_myid_bbs, key); #endif int type = get(key, LOOK); bool b = (type == LOOK_YES); if (b) { upkbegin(); } return b; } void BBSClient::take(const char* key) { // blocking int bufid; get(key, TAKE); upkbegin(); } int BBSClient::look_take_todo() { int type = get(0, LOOK_TAKE_TODO); if (type) { upkbegin(); } return type; } int BBSClient::take_todo() { int type; char* rs; size_t n; while((type = get(0, TAKE_TODO)) == CONTEXT) { upkbegin(); upkint(); // throw away userid #if debug printf("%d execute context\n", nrnmpi_myid_bbs); fflush(stdout); #endif rs = execute_helper(&n, -1); if (rs) { delete [] rs; } } upkbegin(); return type; } int BBSClient::look_take_result(int pid) { int type = get(pid, LOOK_TAKE_RESULT); if (type) { upkbegin(); } return type; } void BBSClient::save_args(int userid) { #if defined(HAVE_STL) nrnmpi_ref(sendbuf_); keepargs_->insert( pair(userid, sendbuf_) ); #endif post_todo(working_id_); } void BBSClient::return_args(int userid) { #if defined(HAVE_STL) KeepArgs::iterator i = keepargs_->find(userid); nrnmpi_unref(recvbuf_); recvbuf_ = nil; if (i != keepargs_->end()) { recvbuf_ = (*i).second; nrnmpi_ref(recvbuf_); keepargs_->erase(i); upkbegin(); BBSImpl::return_args(userid); } #endif } void BBSClient::done() { #if debug printf("%d BBSClient::done\n", nrnmpi_myid_bbs); fflush(stdout); #endif if (nrnmpi_numprocs > 1 && nrnmpi_numprocs_bbs < nrnmpi_numprocs_world) { if (nrnmpi_myid == 0) { int info[2]; info[0] = -2; info[1] = -1; //printf("%d broadcast %d %d\n", nrnmpi_myid_world, info[0], info[1]); nrnmpi_int_broadcast(info, 2, 0); } } #if defined(USE_PYTHON) if (p_nrnpython_start) { (*p_nrnpython_start)(0);} #endif BBSImpl::done(); nrnmpi_terminate(); exit(0); } void BBSClient::start() { char* client = 0; int tid; int n; if (started_) { return; } #if debug printf("%d BBSClient start\n", nrnmpi_myid_bbs); fflush(stdout); #endif BBSImpl::start(); sid_ = 0; #if 0 { // a worker is_master_ = false; nrnmpi_pkbegin(request_); nrnmpi_enddata(request_); assert(get(HELLO) == HELLO); return; } #endif } #endif //NRNMPI neuron-7.5/src/parallel/bbsconf.h.in000077500000000000000000000006551323325274500174670ustar00rootroot00000000000000#ifndef H_bbsconfig_included #define H_bbsconfig_included 1 /* following are relevant to src/parallel implmentation of ParallelContext */ /* Define if PVM available */ #undef HAVE_PVM3_H /* Set to 1 if the standard template library exists */ #undef HAVE_STL /* Set to 1 if SIGPOLL is a possible signal */ #undef HAVE_SIGPOLL /* Set to 1 if can use the new PVM functions */ #undef HAVE_PKMESG #endif /* H_config_included */ neuron-7.5/src/parallel/bbsdirect.cpp000066400000000000000000000222371323325274500177370ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #ifdef HAVE_PVM3_H // to end of file #include #include #include #include #include #include "oc2iv.h" #include "bbs.h" #include "bbsdirect.h" #include "bbslsrv2.h" #include "bbssrv.h" #include "nrnmpi.h" extern "C" { extern int nrn_global_argc; extern char** nrn_global_argv; extern int bbs_nhost_; void bbs_sig_set(); #if defined(HAVE_PKMESG) int pvm_pkmesgbody(int); #endif }; #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #else #include #include #endif struct ltint { bool operator() (int i, int j) const { return i < j; } }; class KeepArgs : public map{}; #endif static char* rel_working_dir(); static int* cids; static int ncids; BBSDirect::BBSDirect() { if (!BBSDirectServer::server_) { BBSDirectServer::server_ = new BBSDirectServer(); } BBSDirect::start(); #if defined(HAVE_STL) keepargs_ = new KeepArgs(); #endif } BBSDirect::~BBSDirect() { #if defined(HAVE_STL) delete keepargs_; #endif } void BBSDirect::check_pvm() { BBSImpl:use_pvm_ = pvm_parent() != PvmSysErr; } void BBSDirect::perror(const char* s) { pvm_perror((char*)s); } void BBSDirect::context() { BBSDirectServer::server_->context(ncids, cids); } int BBSDirect::upkint() { int i; // printf("upkint from %d\n", pvm_getrbuf()); if (pvm_upkint(&i, 1, 1)) { perror("upkint"); } // printf("upkint returning %d\n", i); return i; } double BBSDirect::upkdouble() { double x; // printf("upkdouble from %d\n", pvm_getrbuf()); if( pvm_upkdouble(&x, 1, 1)) { perror("upkdouble"); } // printf("upkdouble returning %g\n", x); return x; } void BBSDirect::upkvec(int n, double* x) { // printf("upkvec from %d\n", pvm_getrbuf()); if( pvm_upkdouble(x, n, 1)) { perror("upkvec"); } } char* BBSDirect::upkstr() { int len; char* s; // printf("upkstr from %d\n", pvm_getrbuf()); if( pvm_upkint(&len, 1, 1)) { perror("upkstr"); } s = new char[len+1]; pvm_upkstr(s); // printf("upkstr returning |%s|\n", s); return s; } char* BBSDirect::upkpickle(size_t* n) { char* s = 0; assert(0); return s; } void BBSDirect::pkbegin() { if( pvm_initsend(PvmDataDefault) < 0 ) { perror("pkbegin"); } // printf("pkbegin into sbuf %d\n", pvm_getsbuf()); } void BBSDirect::pkint(int i) { int ii = i; // printf("pkint %d into %d\n", i, pvm_getsbuf()); if( pvm_pkint(&ii, 1, 1)) { perror("pkint"); } } void BBSDirect::pkdouble(double x) { double xx = x; // printf("pkdouble %g into %d\n", x, pvm_getsbuf()); if( pvm_pkdouble(&xx, 1, 1)) { perror("pkdouble"); } } void BBSDirect::pkvec(int n, double* x) { if( pvm_pkdouble(x, n, 1)) { perror("pkvec"); } } void BBSDirect::pkstr(const char* s) { int len = strlen(s); // printf("pkstr |%s| into %d\n", s, pvm_getsbuf()); if( pvm_pkint(&len, 1, 1)) { perror("pkstr length"); } if( pvm_pkstr((char*)s)) { perror("pkstr string"); } } void BBSDirect::pkpickle(const char* s, size_t n) { assert(0); } void BBSDirect::post(const char* key) { // printf("post |%s| sbuf %d\n", key, pvm_getsbuf()); BBSDirectServer::server_->post(key); BBSDirectServer::handle(); } void BBSDirect::post_todo(int parentid) { // printf("post_todo for %d sbuf %d\n", parentid, pvm_getsbuf()); BBSDirectServer::server_->post_todo(parentid, mytid_); BBSDirectServer::handle(); } void BBSDirect::post_result(int id) { // printf("post_result %d sbuf %d\n", id, pvm_getsbuf()); BBSDirectServer::server_->post_result(id); BBSDirectServer::handle(); } int BBSDirect::look_take_todo() { BBSDirectServer::handle(); int id = BBSDirectServer::server_->look_take_todo(); // printf("look_take_todo rbuf %d\n", pvm_getrbuf()); return id; } int BBSDirect::take_todo() { int id = BBSDirectServer::server_->look_take_todo(); if (id == 0) { printf("BBSDirect::take_todo blocking\n"); assert(0); } // printf("take_todo rbuf %d\n", pvm_getrbuf()); return id; } int BBSDirect::look_take_result(int pid) { BBSDirectServer::handle(); int id = BBSDirectServer::server_->look_take_result(pid); // printf("look_take_result %d rbuf %d\n", pid, pvm_getrbuf()); return id; } void BBSDirect::save_args(int userid) { #if defined(HAVE_STL) int bufid = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); pvm_pkmesgbody(bufid); keepargs_->insert( pair(userid, bufid) ); #endif BBSDirectServer::server_->post_todo(working_id_, mytid_); BBSDirectServer::handle(); } void BBSDirect::return_args(int userid) { #if defined(HAVE_STL) KeepArgs::iterator i = keepargs_->find(userid); if (i != keepargs_->end()) { int bufid = (*i).second; keepargs_->erase(i); pvm_freebuf(pvm_setrbuf(bufid)); BBSImpl::return_args(userid); } #endif } bool BBSDirect::look_take(const char* key) { BBSDirectServer::handle(); bool b = BBSDirectServer::server_->look_take(key); #if 0 if (b) { printf("look_take |%s| true rbuf %d\n", key, pvm_getrbuf()); }else{ printf("look_take |%s| false rbuf %d\n", key, pvm_getrbuf()); } #endif return b; } bool BBSDirect::look(const char* key) { BBSDirectServer::handle(); bool b = BBSDirectServer::server_->look(key); printf("look |%s| %d rbug %d\n", key, b, pvm_getrbuf()); return b; } void BBSDirect::take(const char* key) { // blocking int id; double st = time(); for (;;) { if (look_take(key)) { wait_time_ += time() - st; return; } else if ((id = look_take_todo()) != 0) { wait_time_ += time() - st; execute(id); st = time(); }else{ // perhaps should do something meaningful here // like check whether to quit or not } } } void BBSDirect::done() { int i; if (done_) { return; } BBSImpl::done(); done_ = true; printf("done: ncids=%d\n", ncids); for (i=0; i < ncids; ++i) { pvm_initsend(PvmDataDefault); pvm_send(cids[i], QUIT); //printf("kill %d\n", cids[i]); // pvm_kill(cids[i]); } if (pvm_exit()) {perror("BBSDirect::done");} BBSDirectServer::server_->done(); } void BBSDirect::start() { char* client = 0; int tid, host_mytid; int i, n, ncpu, nncpu; struct pvmhostinfo* hostp; if (started_) { return; } BBSImpl::start(); mytid_ = pvm_mytid(); nrnmpi_myid = 0; if (mytid_ < 0) { perror("start"); } host_mytid = pvm_tidtohost(mytid_); tid = pvm_parent(); if (tid == PvmSysErr) { perror("start"); }else if (tid == PvmNoParent) { is_master_ = true; pvm_catchout(stdout); pvm_setopt(PvmRoute, PvmRouteDirect); pvm_config(&n, NULL, &hostp); nncpu = 0; for (i=0; i < n; ++i) { ncpu = hostp[i].hi_speed; if (ncpu%1000) { hoc_warning(hostp[i].hi_name, " speed in pvm configuration file is not a multiple of 1000. Assuming 1000."); ncpu = 1000; } nncpu += ncpu/1000; } nrnmpi_numprocs = nncpu; ncids = 0; }else{ // a worker, impossible assert(false); } if (nrnmpi_numprocs > 1 && tid == PvmNoParent) { char ** sargv; // args are workingdirectory specialOrNrniv -bbs_nhost nhost args sargv = new char*[nrn_global_argc + 4]; for (i=1; i < nrn_global_argc; ++i) { sargv[i+3] = nrn_global_argv[i]; } sargv[nrn_global_argc + 3] = 0; sargv[0] = rel_working_dir(); //printf("sargv[0]=|%s|\n", sargv[0]); sargv[1] = nrn_global_argv[0]; sargv[2] = "-bbs_nhost"; sargv[3] = new char[10]; sprintf(sargv[3], "%d", nrnmpi_numprocs); cids = new int[nrnmpi_numprocs-1]; if (nrn_global_argv[nrn_global_argc] != 0) { printf("argv not null terminated\n"); exit(1); } BBSDirectServer::server_->start(); bbs_sig_set(); bbs_handle(); //spawn according to number of cpu's (but master has one less) //printf("%d total number of cpus on %d machines\n", nncpu, n); int icid = 0; bool first = true; while (icid < nrnmpi_numprocs - 1) { for (i=0; i < n; ++i) { ncpu = hostp[i].hi_speed; if (ncpu%1000) { ncpu = 1000; } ncpu /= 1000; //printf("%d cpu for machine %d (%s)\n", ncpu, i, hostp[i].hi_name); if (first && hostp[i].hi_tid == host_mytid) { // spawn one fewer on master first time through --ncpu; } if (icid + ncpu >= nrnmpi_numprocs) { ncpu = nrnmpi_numprocs - icid - 1; } //printf("before spawn %d processes (icid=%d) for machine %d (%s)\n", ncpu, icid, i, hostp[i].hi_name); if (ncpu) { ncids = pvm_spawn("bbswork.sh", sargv, PvmTaskHost, hostp[i].hi_name, ncpu, cids + icid); if (ncids != ncpu) { fprintf(stderr, "Tried to spawn %d tasks, only %d succeeded on %s\n", ncpu, ncids, hostp[i].hi_name); hoc_execerror("Could not spawn all the requested tasks for", hostp[i].hi_name); } //printf("spawned %d for %s with cids starting at %d\n", ncpu, hostp[i].hi_name, icid); icid += ncpu; } if (icid >= nrnmpi_numprocs) { break; } } first = false; } ncids = icid; printf("spawned %d more %s on %d cpus on %d machines\n", ncids, nrn_global_argv[0], nncpu, n); delete [] sargv[3]; delete [] sargv; } } static char* rel_working_dir() { // return relative to $HOME if possible, otherwise absolute // char* wd = new char[1024]; // getwd(wd); char* wd = getenv("PWD"); char* home = getenv("HOME"); int nh = strlen(home); if (strncmp(wd, home, nh) == 0) { if (wd[nh] == '/') {++nh;} #if 1 return wd + nh; #else // since then mem will be freed elsewhere char* rel = new char[strlen(wd) - nh + 1]; strcpy(rel, wd+nh); delete [] wd; return rel; #endif } return wd; } #endif //HAVE_PVM3_H neuron-7.5/src/parallel/bbsdirect.h000066400000000000000000000031671323325274500174050ustar00rootroot00000000000000#ifndef bbsdirect_h #define bbsdirect_h #include #include "bbsimpl.h" class KeepArgs; #if NRNMPI struct bbsmpibuf; #endif // uses the pvm packing and unpacking functions but calls the // server directly instead of through pvmd send, recv. // i.e. this bbs can only be on the master class BBSDirect : public BBSImpl { public: BBSDirect(); virtual ~BBSDirect(); virtual bool look(const char*); virtual void take(const char*); /* blocks til something to take */ virtual bool look_take(const char*); /* returns false if nothing to take */ // after taking use these virtual int upkint(); virtual double upkdouble(); virtual void upkvec(int, double*); virtual char* upkstr(); // delete [] char* when finished virtual char* upkpickle(size_t*); // delete [] char* when finished // before posting use these virtual void pkbegin(); virtual void pkint(int); virtual void pkdouble(double); virtual void pkvec(int, double*); virtual void pkstr(const char*); virtual void pkpickle(const char*, size_t); virtual void post(const char*); virtual void post_todo(int parentid); virtual void post_result(int id); virtual int look_take_result(int pid); // returns id, or 0 if nothing virtual int master_take_result(int pid); // returns id virtual int look_take_todo(); // returns id, or 0 if nothing virtual int take_todo(); // returns id virtual void save_args(int); virtual void return_args(int); virtual void context(); virtual void start(); virtual void done(); virtual void perror(const char*); static void check_pvm(); private: KeepArgs* keepargs_; #if NRNMPI bbsmpibuf* sendbuf_, *recvbuf_; #endif }; #endif neuron-7.5/src/parallel/bbsdirectmpi.cpp000066400000000000000000000162131323325274500204420ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "bbsconf.h" #ifdef NRNMPI // to end of file #include #include #include #include #include "oc2iv.h" #include "bbs.h" #include "bbsdirect.h" #include "bbssrv2mpi.h" #include "bbssrv.h" extern "C" { extern void nrnmpi_int_broadcast(int*, int, int); } #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #else #include #include #endif #define debug 0 struct ltint { bool operator() (int i, int j) const { return i < j; } }; class KeepArgs : public map{}; #endif BBSDirect::BBSDirect() { if (!BBSDirectServer::server_) { BBSDirectServer::server_ = new BBSDirectServer(); } sendbuf_ = nil; recvbuf_ = nil; BBSDirect::start(); #if defined(HAVE_STL) keepargs_ = new KeepArgs(); #endif } BBSDirect::~BBSDirect() { nrnmpi_unref(sendbuf_); nrnmpi_unref(recvbuf_); #if defined(HAVE_STL) delete keepargs_; #endif } void BBSDirect::perror(const char* s) { printf("BBSDirect error %s\n", s); } void BBSDirect::context() { BBSDirectServer::handle(); nrnmpi_enddata(sendbuf_); BBSDirectServer::server_->context(sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; } int BBSDirect::upkint() { int i; i = nrnmpi_upkint(recvbuf_); #if debug printf("upkint returning %d\n", i); #endif return i; } double BBSDirect::upkdouble() { double x; x = nrnmpi_upkdouble(recvbuf_); #if debug printf("upkdouble returning %g\n", x); #endif return x; } void BBSDirect::upkvec(int n, double* x) { nrnmpi_upkvec(n, x, recvbuf_); } char* BBSDirect::upkstr() { char* s; s = nrnmpi_upkstr(recvbuf_); #if debug printf("upkstr returning |%s|\n", s); #endif return s; } char* BBSDirect::upkpickle(size_t* n) { char* s; s = nrnmpi_upkpickle(n, recvbuf_); #if debug printf("upkpickle returning %d bytes\n", *n); #endif return s; } void BBSDirect::pkbegin() { #if debug printf("%d BBSDirect::pkbegin\n", nrnmpi_myid_bbs); #endif nrnmpi_unref(sendbuf_); sendbuf_ = nrnmpi_newbuf(100); nrnmpi_ref(sendbuf_); nrnmpi_pkbegin(sendbuf_); } void BBSDirect::pkint(int i) { #if debug printf("%d BBSDirect::pkint %d\n", nrnmpi_myid_bbs, i); #endif nrnmpi_pkint(i, sendbuf_); } void BBSDirect::pkdouble(double x) { #if debug printf("%d BBSDirect::pkdouble\n", nrnmpi_myid_bbs, x); #endif nrnmpi_pkdouble(x, sendbuf_); } void BBSDirect::pkvec(int n, double* x) { #if debug printf("%d BBSDirect::pkvec n=%d\n", nrnmpi_myid_bbs, n); #endif nrnmpi_pkvec(n, x, sendbuf_); } void BBSDirect::pkstr(const char* s) { #if debug printf("%d BBSDirect::pkstr %s\n", nrnmpi_myid_bbs, s); #endif nrnmpi_pkstr(s, sendbuf_); } void BBSDirect::pkpickle(const char* s, size_t n) { #if debug printf("%d BBSDirect::pkpickle %d bytes\n", nrnmpi_myid_bbs, n); #endif nrnmpi_pkpickle(s, n, sendbuf_); } void BBSDirect::post(const char* key) { #if debug printf("%d BBSDirect::post |%s|\n", nrnmpi_myid_bbs, key); #endif nrnmpi_enddata(sendbuf_); nrnmpi_pkstr(key, sendbuf_); BBSDirectServer::server_->post(key, sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; BBSDirectServer::handle(); } void BBSDirect::post_todo(int parentid) { #if debug printf("%d BBSDirect::post_todo for %d\n", nrnmpi_myid_bbs, parentid); #endif nrnmpi_enddata(sendbuf_); nrnmpi_pkint(parentid, sendbuf_); BBSDirectServer::server_->post_todo(parentid, nrnmpi_myid_bbs, sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; BBSDirectServer::handle(); } void BBSDirect::post_result(int id) { #if debug printf("%d BBSDirect::post_result %d\n", nrnmpi_myid_bbs, id); #endif nrnmpi_enddata(sendbuf_); nrnmpi_pkint(id, sendbuf_); BBSDirectServer::server_->post_result(id, sendbuf_); nrnmpi_unref(sendbuf_); sendbuf_ = nil; BBSDirectServer::handle(); } int BBSDirect::look_take_todo() { BBSDirectServer::handle(); int id = BBSDirectServer::server_->look_take_todo(&recvbuf_); if (id) { nrnmpi_upkbegin(recvbuf_); #if debug printf("%d look_take_todo getid=%d\n", nrnmpi_getid(recvbuf_)); #endif } #if debug printf("%d BBSDirect::look_take_todo id=%d\n", nrnmpi_myid_bbs, id); #endif return id; } int BBSDirect::take_todo() { int id = BBSDirectServer::server_->look_take_todo(&recvbuf_); if (id == 0) { printf("BBSDirect::take_todo blocking\n"); assert(0); } #if debug printf("%d BBSDirect::take_todo id=%d\n", nrnmpi_myid_bbs, id); #endif return id; } int BBSDirect::look_take_result(int pid) { BBSDirectServer::handle(); int id = BBSDirectServer::server_->look_take_result(pid, &recvbuf_); #if debug printf("%d BBSDirect::look_take_result id=%d pid=%d\n", nrnmpi_myid_bbs, id, pid); #endif if (id) { nrnmpi_upkbegin(recvbuf_); } #if debug printf("%d look_take_result return id=%d\n", nrnmpi_myid_bbs, id); #endif return id; } int BBSDirect::master_take_result(int pid) { assert(is_master()); assert(nrnmpi_numprocs_bbs > 1); for (;;) { int id = look_take_result(pid); if (id) { return id; } // wait for a message (no MPI_Iprobe) BBSDirectServer::handle_block(); } } void BBSDirect::save_args(int userid) { #if defined(HAVE_STL) nrnmpi_ref(sendbuf_); keepargs_->insert( pair(userid, sendbuf_) ); #endif post_todo(working_id_); } void BBSDirect::return_args(int userid) { #if defined(HAVE_STL) KeepArgs::iterator i = keepargs_->find(userid); nrnmpi_unref(recvbuf_); recvbuf_ = nil; if (i != keepargs_->end()) { recvbuf_ = (*i).second; keepargs_->erase(i); nrnmpi_upkbegin(recvbuf_); BBSImpl::return_args(userid); } #endif } bool BBSDirect::look_take(const char* key) { BBSDirectServer::handle(); bool b = BBSDirectServer::server_->look_take(key, &recvbuf_); if (b) { nrnmpi_upkbegin(recvbuf_); } #if debug if (b) { printf("look_take |%s| true\n", key); }else{ printf("look_take |%s| false\n", key); } #endif return b; } bool BBSDirect::look(const char* key) { BBSDirectServer::handle(); bool b = BBSDirectServer::server_->look(key, &recvbuf_); if (b) { nrnmpi_upkbegin(recvbuf_); } #if debug printf("look |%s| %d\n", key, b); #endif return b; } void BBSDirect::take(const char* key) { // blocking int id; double st = time(); for (;;) { if (look_take(key)) { wait_time_ += time() - st; return; } else if ((id = look_take_todo()) != 0) { wait_time_ += time() - st; execute(id); st = time(); }else{ // perhaps should do something meaningful here // like check whether to quit or not } } } void BBSDirect::done() { //printf("%d bbsdirect::done\n", nrnmpi_myid_world); int i; if (done_) { return; } if (nrnmpi_numprocs > 1 && nrnmpi_numprocs_bbs < nrnmpi_numprocs_world) { int info[2]; info[0] = -2; info[1] = -1; //printf("%d broadcast %d %d\n", nrnmpi_myid_world, info[0], info[1]); nrnmpi_int_broadcast(info, 2, 0); } BBSImpl::done(); done_ = true; nrnmpi_unref(sendbuf_); sendbuf_ = nrnmpi_newbuf(20); #if debug printf("done: numprocs_bbs=%d\n", nrnmpi_numprocs_bbs); #endif for (i=1; i < nrnmpi_numprocs_bbs; ++i) { nrnmpi_bbssend(i, QUIT, sendbuf_); //printf("kill %d\n", i); } BBSDirectServer::server_->done(); } void BBSDirect::start() { if (started_) { return; } BBSImpl::start(); is_master_ = true; BBSDirectServer::server_->start(); bbs_handle(); } #endif //NRNMPI neuron-7.5/src/parallel/bbsimpl.h000066400000000000000000000044731323325274500170750ustar00rootroot00000000000000#ifndef bbsimpl_h #define bbsimpl_h class BBSImpl { public: BBSImpl(); virtual ~BBSImpl(); virtual bool look(const char*) = 0; virtual void take(const char*) = 0; /* blocks til something to take */ virtual bool look_take(const char*) = 0; /* returns false if nothing to take */ // after taking use these virtual int upkint() = 0; virtual double upkdouble() = 0; virtual void upkvec(int, double*) = 0; virtual char* upkstr() = 0; // delete [] char* when finished virtual char* upkpickle(size_t*) = 0; // delete [] char* when finished // before posting use these virtual void pkbegin() = 0; virtual void pkint(int) = 0; virtual void pkdouble(double) = 0; virtual void pkvec(int, double*) = 0; virtual void pkstr(const char*) = 0; virtual void pkpickle(const char*, size_t) = 0; virtual void post(const char*) = 0; virtual void post_todo(int parentid) = 0; virtual void post_result(int id) = 0; virtual int look_take_result(int pid) = 0; // returns id, or 0 if nothing virtual int master_take_result(int pid); // returns id virtual int look_take_todo() = 0; // returns id, or 0 if nothing virtual int take_todo() = 0; // returns id virtual void save_args(int userid) = 0; virtual void return_args(int userid); virtual void execute(int id); // assumes a "todo" message in receive buffer virtual int submit(int userid); virtual bool working(int &id, double& x, int& userid); virtual void context(); virtual void start(); virtual void done(); virtual void worker(); // forever execute virtual bool is_master(); virtual double time(); virtual void perror(const char*); public: int runworker_called_; int working_id_, n_; double wait_time_; double integ_time_; double send_time_; char* pickle_ret_; size_t pickle_ret_size_; static bool is_master_; static bool started_, done_; static bool use_pvm_; static int mytid_; static int debug_; static bool master_works_; protected: char* execute_helper(size_t*, int id); // involves hoc specific details in ocbbs.c void subworld_worker_execute(); //shadows execute_helper. ie. each of // the nrnmpi_myid_bbs workers (and master) need to execute // the same thing on each of the subworld processes // associated with nrnmpi_myid==0. A subworld does not // intracommunicate via the bulletin board but only via // mpi on the subworld communicator. }; #endif neuron-7.5/src/parallel/bbslocal.cpp000066400000000000000000000110261323325274500175510ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #include #include "oc2iv.h" #include "bbslocal.h" #include "bbslsrv.h" #include #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #include #include #else #include #include #endif struct ltint { bool operator() (int i, int j) const { return i < j; } }; class KeepArgs : public map{}; #endif static MessageValue* posting_; static MessageValue* taking_; static BBSLocalServer* server_; BBSLocal::BBSLocal() { if (!server_) { server_ = new BBSLocalServer(); posting_ = nil; taking_ = nil; } start(); #if defined(HAVE_STL) keepargs_ = new KeepArgs(); #endif } BBSLocal::~BBSLocal() { // need to unref anything in keepargs_; #if defined(HAVE_STL) delete keepargs_; #endif } void BBSLocal::context() { } void BBSLocal::perror(const char* s) { hoc_execerror("BBSLocal error in ", s); } int BBSLocal::upkint() { int i; if (!taking_ || taking_->upkint(&i)) perror("upkint"); return i; } double BBSLocal::upkdouble() { double x; if(!taking_ || taking_->upkdouble(&x)) { perror("upkdouble"); } return x; } void BBSLocal::upkvec(int n, double* x) { if(!taking_ || taking_->upkvec(n, x)) { perror("upkdouble"); } } char* BBSLocal::upkstr() { int len; char* s; if( !taking_ || taking_->upkint(&len)) { perror("upkstr length"); } s = new char[len+1]; if (taking_->upkstr(s)) { perror("upkstr string"); } return s; } char* BBSLocal::upkpickle(size_t* n) { int len; char* s; if( !taking_ || taking_->upkint(&len)) { perror("upkpickle length"); } s = new char[len]; if (taking_->upkpickle(s, n)) { perror("upkpickle data"); } assert(*n == len); return s; } void BBSLocal::pkbegin() { Resource::unref(posting_); posting_ = new MessageValue(); posting_->ref(); } void BBSLocal::pkint(int i) { if( !posting_ || posting_->pkint(i)) { perror("pkint"); } } void BBSLocal::pkdouble(double x) { if( !posting_ || posting_->pkdouble(x)) { perror("pkdouble"); } } void BBSLocal::pkvec(int n, double* x) { if( !posting_ || posting_->pkvec(n, x)) { perror("pkdouble"); } } void BBSLocal::pkstr(const char* s) { if ( !posting_ || posting_->pkint(strlen(s))) { perror("pkstr length"); } if ( !posting_ || posting_->pkstr(s)) { perror("pkstr string"); } } void BBSLocal::pkpickle(const char* s, size_t n) { if ( !posting_ || posting_->pkint(n)) { perror("pkpickle size"); } if ( !posting_ || posting_->pkpickle(s, n)) { perror("pkpickle data"); } } void BBSLocal::post(const char* key) { server_->post(key, posting_); Resource::unref(posting_); posting_ = nil; } bool BBSLocal::look_take(const char* key) { Resource::unref(taking_); taking_ = nil; bool b = server_->look_take(key, &taking_); return b; } bool BBSLocal::look(const char* key) { Resource::unref(taking_); taking_ = nil; bool b = server_->look(key, &taking_); return b; } void BBSLocal::take(const char* key) { // blocking int id; for (;;) { Resource::unref(taking_); taking_ = nil; if (server_->look_take(key, &taking_)) { return; } else if ((id = server_->look_take_todo(&taking_)) != 0) { execute(id); } else { perror("take blocking"); } } } void BBSLocal::post_todo(int parentid) { server_->post_todo(parentid, posting_); Resource::unref(posting_); posting_ = nil; } void BBSLocal::post_result(int id) { server_->post_result(id, posting_); Resource::unref(posting_); posting_ = nil; } int BBSLocal::look_take_result(int pid) { Resource::unref(taking_); taking_ = nil; int id = server_->look_take_result(pid, &taking_); return id; } int BBSLocal::look_take_todo() { Resource::unref(taking_); taking_ = nil; int id = server_->look_take_todo(&taking_); return id; } int BBSLocal::take_todo() { Resource::unref(taking_); taking_ = nil; int id = look_take_todo(); if (id == 0) { perror("take_todo blocking"); } return id; } void BBSLocal::save_args(int userid) { server_->post_todo(working_id_, posting_); #if defined(HAVE_STL) keepargs_->insert( pair(userid, posting_) ); #endif posting_ = nil; } void BBSLocal::return_args(int userid) { #if defined(HAVE_STL) KeepArgs::iterator i = keepargs_->find(userid); assert(i != keepargs_->end()); Resource::unref(taking_); taking_ = (MessageValue*)((*i).second); keepargs_->erase(i); taking_->init_unpack(); BBSImpl::return_args(userid); #endif } void BBSLocal::done() { BBSImpl::done(); } void BBSLocal::start() { if (started_) { return; } BBSImpl::start(); mytid_ = 1; is_master_ = true; } neuron-7.5/src/parallel/bbslocal.h000066400000000000000000000024261323325274500172220ustar00rootroot00000000000000#ifndef bbslocal_h #define bbslocal_h #include "bbsimpl.h" class KeepArgs; class BBSLocal : public BBSImpl { public: BBSLocal(); virtual ~BBSLocal(); virtual bool look(const char*); virtual void take(const char*); /* blocks til something to take */ virtual bool look_take(const char*); /* returns false if nothing to take */ // after taking use these virtual int upkint(); virtual double upkdouble(); virtual void upkvec(int, double*); virtual char* upkstr(); // delete [] char* when finished virtual char* upkpickle(size_t* size); // delete [] char* when finished // before posting use these virtual void pkbegin(); virtual void pkint(int); virtual void pkdouble(double); virtual void pkvec(int, double*); virtual void pkstr(const char*); virtual void pkpickle(const char*, size_t); virtual void post(const char*); virtual void post_todo(int parentid); virtual void post_result(int id); virtual int look_take_result(int pid); // returns id, or 0 if nothing virtual int look_take_todo(); // returns id, or 0 if nothing virtual int take_todo(); // returns id virtual void save_args(int); virtual void return_args(int); virtual void context(); virtual void start(); virtual void done(); virtual void perror(const char*); private: KeepArgs* keepargs_; }; #endif neuron-7.5/src/parallel/bbslsrv.cpp000066400000000000000000000174561323325274500174620ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #include #include #include "bbslsrv.h" #define INT 1 #define DOUBLE 2 #define STRING 3 #define VECTOR 4 #define PICKLE 5 #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #include #include #else #include #include #include #include #include #endif // debug is 0 1 or 2 #define debug 0 class WorkItem { public: WorkItem(int id, MessageValue*); virtual ~WorkItem(); WorkItem* parent_; int id_; MessageValue* val_; bool todo_less_than(const WorkItem*)const; }; struct ltstr { bool operator() (const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; } }; struct ltint { bool operator() (int i, int j) const { return i < j; } }; struct ltWorkItem { bool operator() (const WorkItem* w1, const WorkItem* w2) const { return w1->todo_less_than(w2); } }; static char* newstr(const char* s) { char* s1 = new char[strlen(s) + 1]; strcpy(s1, s); return s1; } WorkItem::WorkItem(int id, MessageValue* m) { #if debug == 2 printf("WorkItem %d\n", id); #endif id_ = id; val_ = m; val_->ref(); parent_ = nil; } WorkItem::~WorkItem() { #if debug printf("~WorkItem %d\n", id_); #endif val_->unref(); } bool WorkItem::todo_less_than(const WorkItem* w) const { WorkItem* w1 = (WorkItem*)this; WorkItem* w2 = (WorkItem*)w; while (w1->parent_ != w2->parent_) { if (w1->id_ < w2->id_) { w2 = w2->parent_; }else{ w1 = w1->parent_; } } #if debug printf("todo_less_than %d < %d return %d\n", this->id_, w->id_, w1->id_ < w2->id_); #endif return w1->id_ < w2->id_; } class MessageList : public multimap {}; class WorkList : public map {}; class ReadyList : public set{}; class ResultList: public multimap{}; #else class MessageList {}; class WorkList {}; class ReadyList{}; class ResultList{}; extern "C" { extern void hoc_execerror(const char*, const char*);} static void nostl() { hoc_execerror("BBSLocalServer not working", "Compiled without STL"); } #endif MessageItem::MessageItem() { next_ = nil; type_ = 0; } MessageItem::~MessageItem() { switch (type_) { case STRING: delete [] u.s; break; case VECTOR: delete [] u.pd; break; case PICKLE: delete [] u.s; break; } } MessageValue::MessageValue() { first_ = nil; last_ = nil; unpack_ = nil; } MessageValue::~MessageValue() { MessageItem* mi, *next; for (mi = first_; mi; mi = next) { next = mi->next_; delete mi; } } MessageItem* MessageValue::link() { MessageItem* mi = new MessageItem(); if (last_) { last_->next_ = mi; }else{ first_ = mi; unpack_ = mi; } last_ = mi; return mi; } void MessageValue::init_unpack() { unpack_ = first_; } int MessageValue::pkint(int i) { MessageItem* m = link(); m->type_ = INT; m->u.i = i; return 0; } int MessageValue::pkdouble(double x) { MessageItem* m = link(); m->type_ = DOUBLE; m->u.d = x; return 0; } int MessageValue::pkvec(int n, double* x) { int i; MessageItem* m = link(); m->type_ = VECTOR; m->u.pd = new double[n]; for (i=0; i < n; ++i) { m->u.pd[i] = x[i]; } return 0; } int MessageValue::pkstr(const char* str) { MessageItem* m = link(); m->type_ = STRING; m->u.s = new char[strlen(str)+1]; strcpy(m->u.s, str); return 0; } int MessageValue::pkpickle(const char* bytes, size_t n) { MessageItem* m = link(); m->type_ = PICKLE; m->u.s = new char[n]; m->size_ = n; memcpy(m->u.s, bytes, n); return 0; } int MessageValue::upkint(int* i) { if (!unpack_ || unpack_->type_ != INT) { return -1; } *i = unpack_->u.i; unpack_ = unpack_->next_; return 0; } int MessageValue::upkdouble(double* d) { if (!unpack_ || unpack_->type_ != DOUBLE) { return -1; } *d = unpack_->u.d; unpack_ = unpack_->next_; return 0; } int MessageValue::upkvec(int n, double* d) { int i; if (!unpack_ || unpack_->type_ != VECTOR) { return -1; } for (i = 0; i < n; ++i) { d[i] = unpack_->u.pd[i]; } unpack_ = unpack_->next_; return 0; } int MessageValue::upkstr(char* s) { if (!unpack_ || unpack_->type_ != STRING) { return -1; } strcpy(s, unpack_->u.s); unpack_ = unpack_->next_; return 0; } int MessageValue::upkpickle(char* s, size_t* n) { if (!unpack_ || unpack_->type_ != PICKLE) { return -1; } *n = unpack_->size_; memcpy(s, unpack_->u.s, *n); unpack_ = unpack_->next_; return 0; } BBSLocalServer::BBSLocalServer(){ #if defined(HAVE_STL) messages_ = new MessageList(); work_ = new WorkList(); todo_ = new ReadyList(); results_ = new ResultList(); next_id_ = 1; #endif } BBSLocalServer::~BBSLocalServer(){ #if defined(HAVE_STL) delete todo_; delete results_; printf("~BBSLocalServer not deleting everything\n"); // need to unref MessageValue in messages_ and delete WorkItem in work_ delete messages_; delete work_; #endif } bool BBSLocalServer::look_take(const char* key, MessageValue** val) { #if defined(HAVE_STL) MessageList::iterator m = messages_->find(key); if (m != messages_->end()) { *val = (MessageValue*)((*m).second); char* s = (char*)((*m).first); messages_->erase(m); delete [] s; #if debug printf("srvr_look_take |%s|\n", key); #endif return true; } #if debug printf("fail srvr_look_take |%s|\n", key); #endif #else nostl(); #endif return false; } bool BBSLocalServer::look(const char* key, MessageValue** val) { #if defined(HAVE_STL) MessageList::iterator m = messages_->find(key); if (m != messages_->end()) { *val = (MessageValue*)((*m).second); Resource::ref(*val); #if debug printf("srvr_look true |%s|\n", key); #endif return true; }else{ val = nil; } #if debug printf("srvr_look false |%s|\n", key); #endif #else nostl(); #endif return false; } void BBSLocalServer::post(const char* key, MessageValue* val) { #if defined(HAVE_STL) MessageList::iterator m = messages_->insert( pair(newstr(key),val) ); Resource::ref(val); #if debug printf("srvr_post |%s|\n", key); #endif #else nostl(); #endif } void BBSLocalServer::post_todo(int parentid, MessageValue* val) { #if defined(HAVE_STL) WorkItem* w = new WorkItem(next_id_++, val); WorkList::iterator p = work_->find(parentid); if (p != work_->end()) { w->parent_ = (WorkItem*)((*p).second); } work_->insert(pair(w->id_, w)); todo_->insert(w); #if debug printf("srvr_post_todo id=%d pid=%d\n", w->id_, parentid); #endif #else nostl(); #endif } void BBSLocalServer::post_result(int id, MessageValue* val) { #if defined(HAVE_STL) WorkList::iterator i = work_->find(id); WorkItem* w = (WorkItem*)((*i).second); val->ref(); w->val_->unref(); w->val_ = val; results_->insert(pair(w->parent_ ? w->parent_->id_ : 0, w)); #if debug printf("srvr_post_done id=%d pid=%d\n", id, w->parent_ ? w->parent_->id_ : 0); #endif #endif } int BBSLocalServer::look_take_todo(MessageValue** m) { #if defined(HAVE_STL) ReadyList::iterator i = todo_->begin(); if (i != todo_->end()) { WorkItem* w = (*i); todo_->erase(i); *m = w->val_; #if debug printf("srvr look_take_todo %d\n", w->id_); #endif w->val_->ref(); return w->id_; }else{ #if debug printf("srvr look_take_todo failed\n"); #endif return 0; } #else nostl(); return 0; #endif } int BBSLocalServer::look_take_result(int pid, MessageValue** m) { #if defined(HAVE_STL) ResultList::iterator i = results_->find(pid); if (i != results_->end()) { WorkItem* w = (WorkItem*)((*i).second); results_->erase(i); *m = w->val_; w->val_->ref(); int id = w->id_; WorkList::iterator j = work_->find(id); work_->erase(j); #if debug printf("srvr look_take_result %d for parent %d\n", w->id_, pid); #endif delete w; return id; }else{ #if debug printf("srvr look_take_result failed for parent %d\n", pid); #endif return 0; } #else nostl(); return 0; #endif } neuron-7.5/src/parallel/bbslsrv.h000066400000000000000000000025531323325274500171170ustar00rootroot00000000000000#ifndef bbslsrv_h #define bbslsrv_h #include class MessageList; class WorkList; class ReadyList; class ResultList; class MessageItem { public: MessageItem(); virtual ~MessageItem(); MessageItem* next_; int type_; size_t size_; // for pickle type union { int i; double d; double* pd; char* s; }u; }; class MessageValue : public Resource { public: MessageValue(); virtual ~MessageValue(); void init_unpack(); // following return 0 if success, -1 if failure int upkint(int*); int upkdouble(double*); int upkvec(int, double*); int upkstr(char*); int upkpickle(char*, size_t*); int pkint(int); int pkdouble(double); int pkvec(int, double*); int pkstr(const char*); int pkpickle(const char*, size_t); private: MessageItem* link(); private: int type_; MessageItem* first_; MessageItem* last_; MessageItem* unpack_; }; class BBSLocalServer { public: BBSLocalServer(); virtual ~BBSLocalServer(); void post(const char* key, MessageValue*); bool look(const char* key, MessageValue**); bool look_take(const char* key, MessageValue**); void post_todo(int parentid, MessageValue*); void post_result(int id, MessageValue*); int look_take_todo(MessageValue**); int look_take_result(int pid, MessageValue**); private: MessageList* messages_; WorkList* work_; ReadyList* todo_; ResultList* results_; int next_id_; }; #endif neuron-7.5/src/parallel/bbslsrv2.cpp000066400000000000000000000205771323325274500175420ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #ifdef HAVE_PVM3_H // to end of file #include #include #include #include "bbslsrv2.h" #include "bbssrv.h" #if defined(HAVE_PKMESG) extern "C" { int pvm_pkmesgbody(int); }; #endif BBSDirectServer* BBSDirectServer::server_; #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #include #else #include #include #include #include #include #endif #define debug 0 #define MessageList PvmMessageList #define WorkItem PvmWorkItem #define WorkList PvmWorkList #define ReadyList PvmReadyList #define ResultList PvmResultList #define PendingList PvmPendingList #define LookingToDoList PvmLookingToDoList class WorkItem { public: WorkItem(int id, int bufid, int cid); virtual ~WorkItem(); WorkItem* parent_; int id_; int bufid_; int cid_; // pvm host id bool todo_less_than(const WorkItem*)const; }; struct ltstr { bool operator() (const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; } }; struct ltint { bool operator() (int i, int j) const { return i < j; } }; struct ltWorkItem { bool operator() (const WorkItem* w1, const WorkItem* w2) const { return w1->todo_less_than(w2); } }; static char* newstr(const char* s) { char* s1 = new char[strlen(s) + 1]; strcpy(s1, s); return s1; } WorkItem::WorkItem(int id, int bufid, int cid) { #if debug == 2 printf("WorkItem %d\n", id); #endif id_ = id; bufid_ = bufid; cid_ = cid; parent_ = nil; } WorkItem::~WorkItem() { #if debug printf("~WorkItem %d\n", id_); #endif } bool WorkItem::todo_less_than(const WorkItem* w) const { WorkItem* w1 = (WorkItem*)this; WorkItem* w2 = (WorkItem*)w; while (w1->parent_ != w2->parent_) { if (w1->id_ < w2->id_) { w2 = w2->parent_; }else{ w1 = w1->parent_; } } #if debug printf("todo_less_than %d < %d return %d\n", this->id_, w->id_, w1->id_ < w2->id_); #endif return w1->id_ < w2->id_; } class MessageList : public multimap {}; class PendingList : public multimap {}; class WorkList : public map {}; class LookingToDoList : public set {}; class ReadyList : public set{}; class ResultList: public multimap{}; #else class MessageList {}; class PendingList {}; class WorkList {}; class LookingToDoList {}; class ReadyList {}; class ResultList {}; #endif BBSDirectServer::BBSDirectServer(){ #if defined(HAVE_STL) messages_ = new MessageList(); work_ = new WorkList(); todo_ = new ReadyList(); results_ = new ResultList(); pending_ = new PendingList(); looking_todo_ = new LookingToDoList(); send_context_ = new LookingToDoList(); next_id_ = FIRSTID; context_buf_ = 0; remaining_context_cnt_ = 0; #endif } BBSDirectServer::~BBSDirectServer(){ #if defined(HAVE_STL) delete todo_; delete results_; delete looking_todo_; printf("~BBSLocalServer not deleting everything\n"); // need to unref MessageValue in messages_ and delete WorkItem in work_ delete pending_; delete messages_; delete work_; delete send_context_; #endif } bool BBSDirectServer::look_take(const char* key) { bool b = false; #if defined(HAVE_STL) MessageList::iterator m = messages_->find(key); if (m != messages_->end()) { b = true; int buf = (*m).second; buf = pvm_setrbuf(buf); //printf("free %d\n", buf); pvm_freebuf(buf); char* s = (char*)((*m).first); messages_->erase(m); delete [] s; } #if debug if (b) { printf("DirectServer::look_take |%s| %d\n", key, pvm_getrbuf()); }else{ printf("DirectServer::look_take |%s| fail\n", key); } #endif #endif return b; } bool BBSDirectServer::look(const char* key) { bool b = false; #if defined(HAVE_STL) MessageList::iterator m = messages_->find(key); if (m != messages_->end()) { b = true; int buf = (*m).second; pvm_initsend(PvmDataDefault); pvm_pkmesgbody(buf); buf = pvm_getrbuf(); pvm_setrbuf(pvm_setsbuf(pvm_mkbuf(PvmDataDefault))); pvm_freebuf(buf); } // printf("DirectServer::look %d |%s|\n", b, key); #endif return b; } void BBSDirectServer::put_pending(const char* key, int cid) { #if defined(HAVE_STL) #if debug printf("put_pending |%s| %d\n", key, cid); #endif char* s = newstr(key); pending_->insert(pair(s, cid)); #endif } bool BBSDirectServer::take_pending(const char* key, int* cid) { bool b = false; #if defined(HAVE_STL) PendingList::iterator p = pending_->find(key); if (p != pending_->end()) { *cid = (*p).second; //printf("take_pending |%s| %d\n", key, *cid); char* s = (char*)((*p).first); pending_->erase(p); delete [] s; b = true; } #endif return b; } void BBSDirectServer::post(const char* key) { #if defined(HAVE_STL) int cid; int bufid = pvm_getsbuf(); // printf("DirectServer::post |%s| bufid=%d\n", key, bufid); if (take_pending(key, &cid)) { pvm_send(cid, TAKE); pvm_freebuf(bufid); }else{ MessageList::iterator m = messages_->insert( pair(newstr(key), bufid) ); } pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); #endif } void BBSDirectServer::add_looking_todo(int cid) { #if defined(HAVE_STL) looking_todo_->insert(cid); #endif } void BBSDirectServer::post_todo(int pid, int cid){ #if defined(HAVE_STL) int bufid = pvm_getsbuf(); WorkItem* w = new WorkItem(next_id_++, bufid, cid); WorkList::iterator p = work_->find(pid); if (p != work_->end()) { w->parent_ = (WorkItem*)((*p).second); } work_->insert(pair(w->id_, w)); LookingToDoList::iterator i = looking_todo_->begin(); if (i != looking_todo_->end()) { cid = (*i); looking_todo_->erase(i); // the send buffer is correct pvm_send(cid, w->id_ + 1); w->bufid_ = 0; pvm_freebuf(pvm_getsbuf()); }else{ todo_->insert(w); } pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); #endif } void BBSDirectServer::context(int ncids, int* cids) { #if defined(HAVE_STL) int cid, j; //printf("ncids=%d\n", ncids); if (remaining_context_cnt_ > 0) { printf("some workers did not receive previous context\n"); // send_context_->clear(); send_context_->erase(send_context_->begin(), send_context_->end()); pvm_freebuf(context_buf_); } remaining_context_cnt_ = ncids; for (j = 0; j < ncids; ++j) { send_context_->insert(cids[j]); } LookingToDoList::iterator i = looking_todo_->begin(); while (i != looking_todo_->end()) { cid = (*i); looking_todo_->erase(i); //printf("sending context to already waiting %x\n", cid); pvm_send(cid, CONTEXT+1); --ncids; i = send_context_->find(cid); send_context_->erase(i); --remaining_context_cnt_; i = looking_todo_->begin(); } if (remaining_context_cnt_ > 0) { context_buf_ = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); }else{ pvm_freebuf(pvm_setsbuf(pvm_mkbuf(PvmDataDefault))); } #endif } bool BBSDirectServer::send_context(int cid) { #if defined(HAVE_STL) LookingToDoList::iterator i = send_context_->find(cid); if (i != send_context_->end()) { send_context_->erase(i); int oldbuf = pvm_setsbuf(context_buf_); //printf("sending context to %x\n", cid); pvm_send(cid, CONTEXT+1); pvm_setsbuf(oldbuf); if(--remaining_context_cnt_ <= 0) { pvm_freebuf(context_buf_); } return true; } #endif return false; } void BBSDirectServer::post_result(int id){ #if defined(HAVE_STL) WorkList::iterator i = work_->find(id); WorkItem* w = (WorkItem*)((*i).second); // deal with following when thinking about error recovery // at this time it was freed as a receive buffer after the take_todo // pvm_freebuf(w->bufid_); w->bufid_ = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); results_->insert(pair(w->parent_ ? w->parent_->id_ : 0, w)); #endif } int BBSDirectServer::look_take_todo() { #if defined(HAVE_STL) ReadyList::iterator i = todo_->begin(); if (i != todo_->end()) { WorkItem* w = (WorkItem*)(*i); todo_->erase(i); int oldbuf = pvm_setrbuf(w->bufid_); pvm_freebuf(oldbuf); w->bufid_ = 0; return w->id_; }else{ return 0; } #else return 0; #endif } int BBSDirectServer::look_take_result(int pid) { #if defined(HAVE_STL) ResultList::iterator i = results_->find(pid); if (i != results_->end()) { WorkItem* w = (WorkItem*)((*i).second); results_->erase(i); int oldbuf = pvm_setrbuf(w->bufid_); pvm_freebuf(oldbuf); int id = w->id_; WorkList::iterator j = work_->find(id); work_->erase(j); delete w; return id; }else{ return 0; } #else return 0; #endif } #endif //HAVE_PVM3_H neuron-7.5/src/parallel/bbslsrv2.h000066400000000000000000000022621323325274500171760ustar00rootroot00000000000000#ifndef bbslsrv2_h #define bbslsrv2_h #include #include class PvmMessageList; class PvmPendingList; class PvmWorkList; class PvmReadyList; class PvmLookingToDoList; class PvmResultList; extern "C" { void bbs_handle(); } class BBSDirectServer { public: BBSDirectServer(); virtual ~BBSDirectServer(); void post(const char* key); bool look(const char* key); bool look_take(const char* key); bool take_pending(const char* key, int* cid); void put_pending(const char* key, int cid); static BBSDirectServer* server_; static void handle(); // all remote requests static void handle1(); void start(); void done(); void post_todo(int parentid, int cid); void context(int ncid, int* cids); bool send_context(int cid); // sends if not sent already void post_result(int id); int look_take_todo(); int look_take_result(int parentid); private: void add_looking_todo(int cid); private: PvmMessageList* messages_; PvmPendingList* pending_; PvmWorkList* work_; PvmLookingToDoList* looking_todo_; PvmReadyList* todo_; PvmResultList* results_; PvmLookingToDoList* send_context_; int next_id_; int context_buf_; int remaining_context_cnt_; }; #endif neuron-7.5/src/parallel/bbsrcli.cpp000066400000000000000000000151501323325274500174120ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #ifdef HAVE_PVM3_H // to end of file #include #include #include #include #include #include "oc2iv.h" #include "bbs.h" #include "bbsrcli.h" #include "bbssrv.h" #include #define debug 0 extern "C" { extern int nrn_global_argc; extern char** nrn_global_argv; #if defined(HAVE_PKMESG) int pvm_pkmesg(int mid); int pvm_pkmesgbody(int); #endif }; #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #else #include #include #endif struct ltint { bool operator() (int i, int j) const { return i < j; } }; class KeepArgs : public map{}; #endif int BBSClient::sid_; BBSClient::BBSClient() { BBSClient::start(); #if defined(HAVE_STL) keepargs_ = new KeepArgs(); #endif } BBSClient::~BBSClient() { #if defined(HAVE_STL) delete keepargs_; #endif } void BBSClient::perror(const char* s) { pvm_perror((char*)s); } int BBSClient::upkint() { int i; if (pvm_upkint(&i, 1, 1)) { perror("upkint"); } return i; } double BBSClient::upkdouble() { double x; if( pvm_upkdouble(&x, 1, 1)) { perror("upkdouble"); } return x; } void BBSClient::upkvec(int n, double* x) { if( pvm_upkdouble(x, n, 1)) { perror("upkvec"); } } char* BBSClient::upkstr() { int len; char* s; if( pvm_upkint(&len, 1, 1)) { perror("upkstr"); } s = new char[len+1]; pvm_upkstr(s); return s; } char* BBSClient::upkpickle(size_t* n) { assert(0); return s; } void BBSClient::pkbegin() { if( pvm_initsend(PvmDataDefault) < 0 ) { perror("pkbegin"); } } void BBSClient::pkint(int i) { int ii = i; if( pvm_pkint(&ii, 1, 1)) { perror("pkint"); } } void BBSClient::pkdouble(double x) { double xx = x; if( pvm_pkdouble(&xx, 1, 1)) { perror("pkdouble"); } } void BBSClient::pkvec(int n, double* x) { if( pvm_pkdouble(x, n, 1)) { perror("pkvec"); } } void BBSClient::pkstr(const char* s) { int len = strlen(s); if( pvm_pkint(&len, 1, 1)) { perror("pkstr length"); } if( pvm_pkstr((char*)s)) { perror("pkstr string"); } } void BBSClient::pkpickle(const char* s, size_t n) { assert(0); } void BBSClient::post(const char* key) { #if debug printf("BBSClient::post |%s|\n", key); fflush(stdout); #endif int index, os; os = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); pvm_pkstr((char*)key); #if defined(HAVE_PKMESG) pvm_pkmesg(os); index = pvm_send(sid_, POST); #else pvm_send(sid_, CRAY_POST); os = pvm_setsbuf(os); index = pvm_send(sid_, CRAY_POST); #endif pvm_freebuf(os); if (index < 0) {perror("post");} } void BBSClient::post_todo(int parentid) { #if debug printf("BBSClient::post_todo for %d\n", parentid); fflush(stdout); #endif int index, os; os = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); pvm_pkint(&parentid, 1, 1); #if defined(HAVE_PKMESG) pvm_pkmesg(os); index = pvm_send(sid_, POST_TODO); #else pvm_send(sid_, CRAY_POST_TODO); os = pvm_setsbuf(os); index = pvm_send(sid_, CRAY_POST_TODO); #endif pvm_freebuf(os); if (index < 0) {perror("post_todo");} } void BBSClient::post_result(int id) { #if debug printf("BBSClient::post_result %d\n", id); fflush(stdout); #endif int index, os; os = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); pvm_pkint(&id, 1, 1); #if defined(HAVE_PKMESG) pvm_pkmesg(os); index = pvm_send(sid_, POST_RESULT); #else pvm_send(sid_, CRAY_POST_RESULT); os = pvm_setsbuf(os); index = pvm_send(sid_, CRAY_POST_RESULT); #endif pvm_freebuf(os); if (index < 0) {perror("post_result");} } int BBSClient::get(const char* key, int type) { #if debug printf("BBSClient::get |%s| type=%d\n", key, type); fflush(stdout); #endif int bufid, nbyte, msgtag, tid, index; pvm_initsend(PvmDataDefault); pvm_pkstr((char*)key); return get(type); } int BBSClient::get(int key, int type) { #if debug printf("BBSClient::get %d type=%d\n", key, type); fflush(stdout); #endif pvm_initsend(PvmDataDefault); pvm_pkint(&key, 1, 1); return get(type)-1; // sent id+1 so cannot be mistaken for QUIT } int BBSClient::get(int type) { // blocking fflush(stdout); fflush(stderr); double st = time(); int bufid, nbyte, msgtag, tid, index; index = pvm_send(sid_, type); bufid = pvm_recv(sid_, -1); pvm_bufinfo(bufid, &nbyte, &msgtag, &tid); wait_time_ += time() - st; if (bufid < 0) { perror("take"); } #if debug printf("BBSClient::get return msgtag=%d\n", msgtag); fflush(stdout); #endif if (msgtag == QUIT) { done(); } return msgtag; } bool BBSClient::look_take(const char* key) { int type = get(key, LOOK_TAKE); bool b = (type == LOOK_TAKE_YES); return b; } bool BBSClient::look(const char* key) { int type = get(key, LOOK); bool b = (type == LOOK_YES); return b; } void BBSClient::take(const char* key) { // blocking int bufid; get(key, TAKE); } int BBSClient::look_take_todo() { int type = get(0, LOOK_TAKE_TODO); return type; } int BBSClient::take_todo() { int type; char* rs; size_t n; while((type = get(0, TAKE_TODO)) == CONTEXT) { upkint(); // throw away userid #if debug printf("execute context\n"); fflush(stdout); #endif rs = execute_helper(&n, -1); if (rs) { delete [] rs; } } return type; } int BBSClient::look_take_result(int pid) { int type = get(pid, LOOK_TAKE_RESULT); return type; } void BBSClient::save_args(int userid) { #if defined(HAVE_PKMESG) #if defined(HAVE_STL) int bufid = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); pvm_pkmesgbody(bufid); keepargs_->insert( pair(userid, bufid) ); #endif post_todo(working_id_); #else int index, os; os = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); pvm_pkint(&working_id_, 1, 1); pvm_send(sid_, CRAY_POST_TODO); os = pvm_setsbuf(os); index = pvm_send(sid_, CRAY_POST_TODO); os = pvm_setsbuf(os); #if defined(HAVE_STL) keepargs_->insert( pair(userid, os) ); #endif #endif } void BBSClient::return_args(int userid) { #if defined(HAVE_STL) KeepArgs::iterator i = keepargs_->find(userid); if (i != keepargs_->end()) { int bufid = (*i).second; keepargs_->erase(i); pvm_freebuf(pvm_setrbuf(bufid)); BBSImpl::return_args(userid); } #endif } void BBSClient::done() { #if debug printf("BBSClient::done\n"); fflush(stdout); #endif BBSImpl::done(); if (pvm_exit()) {perror("BBSClient::done");} exit(0); } void BBSClient::start() { char* client = 0; int tid; int n; if (started_) { return; } #if debug printf("BBSClient start\n"); fflush(stdout); #endif BBSImpl::start(); mytid_ = pvm_mytid(); if (mytid_ < 0) { perror("start"); } tid = pvm_parent(); sid_ = tid; if (tid == PvmSysErr) { perror("start"); } assert(tid > 0); { // a worker is_master_ = false; pvm_initsend(PvmDataDefault); nrnmpi_myid = get(HELLO); assert(nrnmpi_myid > 0); return; } } #endif //HAVE_PVM_H neuron-7.5/src/parallel/bbsrcli.h000066400000000000000000000031121323325274500170520ustar00rootroot00000000000000#ifndef bbsrcli_h #define bbsrcli_h #include #include "bbsimpl.h" class KeepArgs; struct bbsmpibuf; class BBSClient : public BBSImpl{ // implemented as PVM Client public: BBSClient(); virtual ~BBSClient(); virtual bool look(const char*); virtual void take(const char*); /* blocks til something to take */ virtual bool look_take(const char*); /* returns false if nothing to take */ // after taking use these virtual int upkint(); virtual double upkdouble(); virtual void upkvec(int, double*); virtual char* upkstr(); // delete [] char* when finished virtual char* upkpickle(size_t*); // delete [] char* when finished // before posting use these virtual void pkbegin(); virtual void pkint(int); virtual void pkdouble(double); virtual void pkvec(int, double*); virtual void pkstr(const char*); virtual void pkpickle(const char*, size_t); virtual void post(const char*); virtual void post_todo(int parentid); virtual void post_result(int id); virtual int look_take_result(int pid); // returns id, or 0 if nothing virtual int look_take_todo(); // returns id, or 0 if nothing virtual int take_todo(); // returns id virtual void save_args(int); virtual void return_args(int); virtual void start(); virtual void done(); virtual void perror(const char*); private: int get(const char* key, int type); // return type int get(int key, int type); // return type int get(int type); // return type private: static int sid_; KeepArgs* keepargs_; #if NRNMPI void upkbegin(); char* getkey(); int getid(); bbsmpibuf* sendbuf_, *recvbuf_, *request_; #endif }; #endif neuron-7.5/src/parallel/bbssrv.cpp000077500000000000000000000156111323325274500173000ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #ifdef HAVE_PVM3_H // to end of file #include #include #include "bbslsrv2.h" #include "bbssrv.h" #include "nrnmpi.h" #define debug 0 #if defined(HAVE_SIGPOLL) #include #include #include //#include //#include #define POLLDELAY 20 extern "C" { void bbs_sig_handler(int); int bbs_sig_cnt_; int bbs_handled_cnt_; int bbs_sig_handle_cnt_; int pvm_getfds(int** fds); } #endif #define POLLCNT 300 extern "C" { extern int bbs_poll_; #if defined(HAVE_PKMESG) int pvm_upkmesg(); #endif void bbs_handle(); void bbs_sig_set(); extern double hoc_cross_x_; } static int bbs_poll_cnt_; static int bbs_msg_cnt_; static int clientid_; void bbs_handle() { if (BBSDirectServer::server_) { bbs_poll_ = POLLCNT; }else{ bbs_poll_ = -1; return; } #if defined(HAVE_SIGPOLL) sighold(SIGPOLL); if (bbs_poll_cnt_ < 2*bbs_sig_cnt_) { bbs_poll_ = POLLDELAY; } sigrelse(SIGPOLL); #endif ++bbs_poll_cnt_; BBSDirectServer::handle(); } void bbs_sig_set() { #if defined(HAVE_SIGPOLL) if (nrnmpi_numprocs < 2) {return;} //#define mask (S_RDNORM | S_RDBAND | S_HIPRI | S_MSG) //#define mask (S_INPUT) #define mask (S_RDNORM) int nfds, i, *fds, arg, e; nfds = pvm_getfds(&fds); for (i = 0; i < nfds; ++i) { e = ioctl(fds[i], I_GETSIG, &arg); if (e < 0) { if(errno != EINVAL) { perror("bbs_sig_set I_GETSIG"); } errno = 0; } arg = 0; if ((arg & mask) == 0) { //printf("set signal for %d to %lx cnt=%d\n", fds[i], arg|mask, bbs_sig_cnt_); if (ioctl(fds[i], I_SETSIG, arg|mask) < 0) { perror("bbs_sig_set I_SETSIG"); errno = 0; } } } if (sigset(SIGPOLL, bbs_sig_handler) == SIG_ERR) { perror("bbs_sig_set SIGPOLL handler"); } #endif } #if defined(HAVE_SIGPOLL) void bbs_sig_handler(int) { ++bbs_sig_cnt_; bbs_poll_ = 1; //printf("bbs_sig_handler %g %d\n", hoc_cross_x_, bbs_sig_cnt_); } #endif void BBSDirectServer::start() { if (nrnmpi_numprocs > 1) { bbs_poll_ = POLLCNT; } } void BBSDirectServer::done() { printf("bbs_msg_cnt_=%d bbs_poll_cnt_=%d bbs_poll_=%d\n", bbs_msg_cnt_, bbs_poll_cnt_, ((bbs_poll_ < 0) ? -bbs_poll_ : bbs_poll_)); #if defined(HAVE_SIGPOLL) printf("bbs_sig_cnt_=%d\n", bbs_sig_cnt_); #endif } void BBSDirectServer::handle() { if (pvm_probe(-1, -1) > 0) { int r, s; r = pvm_setrbuf(pvm_mkbuf(PvmDataDefault)); s = pvm_setsbuf(pvm_mkbuf(PvmDataDefault)); do { handle1(); } while (pvm_probe(-1, -1) > 0); r = pvm_setrbuf(r); s = pvm_setsbuf(s); pvm_freebuf(r); pvm_freebuf(s); } } void BBSDirectServer::handle1() { char key[512]; int bufid, size, cid, msgtag; int index; bufid = pvm_recv(-1, -1); ++bbs_msg_cnt_; pvm_bufinfo(bufid, &size, &msgtag, &cid); switch (msgtag) { case POST_TODO: pvm_upkint(&index, 1, 1); // the parent index #if debug printf("handle POST_TODO from %x when cross=%g\n", cid, hoc_cross_x_); #endif pvm_freebuf(pvm_setsbuf(pvm_upkmesg())); BBSDirectServer::server_->post_todo(index, cid); break; case POST_RESULT: pvm_upkint(&index, 1, 1); #if debug printf("handle POST_RESULT %d from %x when cross=%g\n", index, cid, hoc_cross_x_); #endif pvm_freebuf(pvm_setsbuf(pvm_upkmesg())); BBSDirectServer::server_->post_result(index); break; case POST: pvm_upkstr(key); #if debug printf("handle POST %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif pvm_freebuf(pvm_setsbuf(pvm_upkmesg())); BBSDirectServer::server_->post(key); break; case CRAY_POST_TODO: pvm_upkint(&index, 1, 1); // the parent index pvm_recv(cid, -1); #if debug printf("handle CRAY_POST_TODO from %x when cross=%g\n", cid, hoc_cross_x_); #endif BBSDirectServer::server_->post_todo(index, cid); break; case CRAY_POST_RESULT: pvm_upkint(&index, 1, 1); pvm_recv(cid, -1); #if debug printf("handle CRAY_POST_RESULT %d from %x when cross=%g\n", index, cid, hoc_cross_x_); #endif BBSDirectServer::server_->post_result(index); break; case CRAY_POST: pvm_upkstr(key); pvm_recv(cid, -1); #if debug printf("handle CRAY_POST %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif BBSDirectServer::server_->post(key); break; case LOOK: pvm_upkstr(key); #if debug printf("handle LOOK %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif if (BBSDirectServer::server_->look(key)) { pvm_setrbuf(pvm_setsbuf(pvm_getrbuf())); pvm_send(cid, LOOK_YES); }else{ pvm_initsend(PvmDataDefault); pvm_send(cid, LOOK_NO); } break; case LOOK_TAKE: pvm_upkstr(key); #if debug printf("handle LOOK_TAKE %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif if (BBSDirectServer::server_->look_take(key)) { pvm_setrbuf(pvm_setsbuf(pvm_getrbuf())); #if debug printf("handle sending back %d\n", pvm_getsbuf()); #endif pvm_send(cid, LOOK_TAKE_YES); }else{ pvm_initsend(PvmDataDefault); pvm_send(cid, LOOK_TAKE_NO); } break; case TAKE: pvm_upkstr(key); #if debug printf("handle TAKE %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif if (BBSDirectServer::server_->look_take(key)) { pvm_setrbuf(pvm_setsbuf(pvm_getrbuf())); #if debug printf("handle sending back %d\n", pvm_getsbuf()); #endif pvm_send(cid, TAKE); }else{ #if debug printf("handle put_pending %s for %d\n", key, cid); #endif BBSDirectServer::server_->put_pending(key, cid); } break; case LOOK_TAKE_TODO: #if debug printf("handle LOOK_TAKE_TODO for cid=%x\n", cid); #endif index = BBSDirectServer::server_->look_take_todo(); if (index) { pvm_setrbuf(pvm_setsbuf(pvm_getrbuf())); }else{ pvm_initsend(PvmDataDefault); } #if debug printf("handle sending back id=%d\n", index); #endif pvm_send(cid, index+1); break; case LOOK_TAKE_RESULT: pvm_upkint(&index, 1, 1); #if debug printf("handle LOOK_TAKE_RESULT for %x pid=%d\n", cid, index); #endif index = BBSDirectServer::server_->look_take_result(index); if (index) { pvm_setrbuf(pvm_setsbuf(pvm_getrbuf())); }else{ pvm_initsend(PvmDataDefault); } #if debug printf("handle sending back id=%d\n", index); #endif pvm_send(cid, index+1); break; case TAKE_TODO: #if debug printf("handle TAKE_TODO for %x\n", cid); #endif if (server_->remaining_context_cnt_ > 0 && server_->send_context(cid)) { #if debug printf("handle sent back a context\n"); #endif break; } index = BBSDirectServer::server_->look_take_todo(); if (index) { pvm_setrbuf(pvm_setsbuf(pvm_getrbuf())); #if debug printf("handle sending back id=%d\n", index); #endif pvm_send(cid, index+1); }else{ #if debug printf("handle add_looking_todo\n"); #endif BBSDirectServer::server_->add_looking_todo(cid); } break; case HELLO: printf("handle HELLO from %x when cross=%g\n", cid, hoc_cross_x_); pvm_initsend(PvmDataDefault); pvm_send(cid, ++clientid_); #if defined(HAVE_SIGPOLL) bbs_sig_set(); #endif break; default: printf("unknown message\n"); break; } } #else extern "C" { void bbs_handle(){} } #endif //HAVE_PVM3_H neuron-7.5/src/parallel/bbssrv.h000077500000000000000000000007071323325274500167450ustar00rootroot00000000000000#ifndef bbssrv_h #define bbssrv_h #define QUIT 0 #define POST 1 #define LOOK 2 #define LOOK_TAKE 3 #define TAKE 4 #define LOOK_YES 6 #define LOOK_NO 7 #define LOOK_TAKE_YES 8 #define LOOK_TAKE_NO 9 #define HELLO 10 #define POST_TODO 11 #define POST_RESULT 12 #define LOOK_TAKE_TODO 13 #define LOOK_TAKE_RESULT 14 #define TAKE_TODO 15 #define CONTEXT 16 #define CRAY_POST 17 #define CRAY_POST_TODO 18 #define CRAY_POST_RESULT 19 #define FIRSTID 20 #endif neuron-7.5/src/parallel/bbssrv2mpi.cpp000066400000000000000000000222511323325274500200630ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #include #if NRNMPI // to end of file #include #include #include #include "bbssrv2mpi.h" #include "bbssrv.h" #include "bbsimpl.h" extern "C" { void nrnbbs_context_wait(); }; BBSDirectServer* BBSDirectServer::server_; #if defined(HAVE_STL) #if defined(HAVE_SSTREAM) // the standard ... #include #include #else #include #include #include #include #include #endif #define debug 0 #define MessageList MpiMessageList #define WorkItem MpiWorkItem #define WorkList MpiWorkList #define ReadyList MpiReadyList #define ResultList MpiResultList #define PendingList MpiPendingList #define LookingToDoList MpiLookingToDoList class WorkItem { public: WorkItem(int id, bbsmpibuf* buf, int cid); virtual ~WorkItem(); WorkItem* parent_; int id_; bbsmpibuf* buf_; int cid_; // mpi host id bool todo_less_than(const WorkItem*)const; }; struct ltstr { bool operator() (const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; } }; struct ltint { bool operator() (int i, int j) const { return i < j; } }; struct ltWorkItem { bool operator() (const WorkItem* w1, const WorkItem* w2) const { return w1->todo_less_than(w2); } }; static char* newstr(const char* s) { char* s1 = new char[strlen(s) + 1]; strcpy(s1, s); return s1; } WorkItem::WorkItem(int id, bbsmpibuf* buf, int cid) { #if debug == 2 printf("WorkItem %d\n", id); #endif id_ = id; buf_ = buf; cid_ = cid; parent_ = nil; } WorkItem::~WorkItem() { #if debug printf("~WorkItem %d\n", id_); #endif } bool WorkItem::todo_less_than(const WorkItem* w) const { WorkItem* w1 = (WorkItem*)this; WorkItem* w2 = (WorkItem*)w; while (w1->parent_ != w2->parent_) { if (w1->id_ < w2->id_) { w2 = w2->parent_; }else{ w1 = w1->parent_; } } #if debug printf("todo_less_than %d < %d return %d\n", this->id_, w->id_, w1->id_ < w2->id_); #endif return w1->id_ < w2->id_; } class MessageList : public multimap {}; class PendingList : public multimap {}; class WorkList : public map {}; class LookingToDoList : public set {}; class ReadyList : public set{}; class ResultList: public multimap{}; #else class MessageList {}; class PendingList {}; class WorkList {}; class LookingToDoList {}; class ReadyList {}; class ResultList {}; #endif BBSDirectServer::BBSDirectServer(){ #if defined(HAVE_STL) messages_ = new MessageList(); work_ = new WorkList(); todo_ = new ReadyList(); results_ = new ResultList(); pending_ = new PendingList(); looking_todo_ = new LookingToDoList(); send_context_ = new LookingToDoList(); next_id_ = FIRSTID; context_buf_ = nil; remaining_context_cnt_ = 0; #endif } BBSDirectServer::~BBSDirectServer(){ #if defined(HAVE_STL) delete todo_; delete results_; delete looking_todo_; printf("~BBSLocalServer not deleting everything\n"); // need to unref MessageValue in messages_ and delete WorkItem in work_ delete pending_; delete messages_; delete work_; delete send_context_; #endif } bool BBSDirectServer::look_take(const char* key, bbsmpibuf** recv) { #if debug printf("DirectServer::look_take |%s|\n", key); #endif bool b = false; #if defined(HAVE_STL) nrnmpi_unref(*recv); *recv = nil; MessageList::iterator m = messages_->find(key); if (m != messages_->end()) { b = true; *recv = (*m).second; //printf("free %d\n", buf); char* s = (char*)((*m).first); messages_->erase(m); delete [] s; } #if debug printf("DirectServer::look_take |%s| recv=%p return %d\n", key, (*recv), b); #endif #endif return b; } bool BBSDirectServer::look(const char* key, bbsmpibuf** recv) { #if debug printf("DirectServer::look |%s|\n", key); #endif bool b = false; nrnmpi_unref(*recv); *recv = nil; #if defined(HAVE_STL) MessageList::iterator m = messages_->find(key); if (m != messages_->end()) { b = true; *recv = (*m).second; if (*recv) { nrnmpi_ref(*recv); } } #if debug printf("DirectServer::look |%s| recv=%p return %d\n", key, (*recv), b); #endif #endif return b; } void BBSDirectServer::put_pending(const char* key, int cid) { #if defined(HAVE_STL) #if debug printf("put_pending |%s| %d\n", key, cid); #endif char* s = newstr(key); pending_->insert(pair(s, cid)); #endif } bool BBSDirectServer::take_pending(const char* key, int* cid) { bool b = false; #if defined(HAVE_STL) PendingList::iterator p = pending_->find(key); if (p != pending_->end()) { *cid = (*p).second; #if debug printf("take_pending |%s| %d\n", key, *cid); #endif char* s = (char*)((*p).first); pending_->erase(p); delete [] s; b = true; } #endif return b; } void BBSDirectServer::post(const char* key, bbsmpibuf* send) { #if defined(HAVE_STL) int cid; #if debug printf("DirectServer::post |%s| send=%p\n", key, send); #endif if (take_pending(key, &cid)) { nrnmpi_bbssend(cid, TAKE, send); }else{ MessageList::iterator m = messages_->insert( pair(newstr(key), send) ); nrnmpi_ref(send); } #endif } void BBSDirectServer::add_looking_todo(int cid) { #if defined(HAVE_STL) looking_todo_->insert(cid); #endif } void BBSDirectServer::post_todo(int pid, int cid, bbsmpibuf* send){ #if defined(HAVE_STL) #if debug printf("BBSDirectServer::post_todo pid=%d cid=%d send=%p\n", pid, cid, send); #endif WorkItem* w = new WorkItem(next_id_++, send, cid); nrnmpi_ref(send); WorkList::iterator p = work_->find(pid); if (p != work_->end()) { w->parent_ = (WorkItem*)((*p).second); } work_->insert(pair(w->id_, w)); #if debug printf("work insert %d\n", w->id_); #endif LookingToDoList::iterator i = looking_todo_->begin(); if (i != looking_todo_->end()) { cid = (*i); looking_todo_->erase(i); // the send buffer is correct nrnmpi_bbssend(cid, w->id_ + 1, send); }else{ #if debug printf("todo insert\n"); #endif todo_->insert(w); } #endif } void BBSDirectServer::context(bbsmpibuf* send) { #if defined(HAVE_STL) int cid, j; #if debug printf("numprocs_bbs=%d\n", nrnmpi_numprocs_bbs); #endif if (remaining_context_cnt_ > 0) { printf("some workers did not receive previous context\n"); send_context_->erase(send_context_->begin(), send_context_->end()); nrnmpi_unref(context_buf_); context_buf_ = nil; } remaining_context_cnt_ = nrnmpi_numprocs_bbs - 1; for (j = 1; j < nrnmpi_numprocs_bbs; ++j) { send_context_->insert(j); } LookingToDoList::iterator i = looking_todo_->begin(); while (i != looking_todo_->end()) { cid = (*i); looking_todo_->erase(i); #if debug printf("sending context to already waiting %d\n", cid); #endif nrnmpi_bbssend(cid, CONTEXT+1, send); i = send_context_->find(cid); send_context_->erase(i); --remaining_context_cnt_; i = looking_todo_->begin(); } if (remaining_context_cnt_ > 0) { context_buf_ = send; nrnmpi_ref(context_buf_); handle(); } #endif } void nrnbbs_context_wait() { if (BBSImpl::is_master_) { BBSDirectServer::server_->context_wait(); } } void BBSDirectServer::context_wait() { //printf("context_wait enter %d\n", remaining_context_cnt_); while (remaining_context_cnt_) { handle(); } //printf("context_wait exit %d\n", remaining_context_cnt_); } bool BBSDirectServer::send_context(int cid) { #if defined(HAVE_STL) LookingToDoList::iterator i = send_context_->find(cid); if (i != send_context_->end()) { send_context_->erase(i); #if debug printf("sending context to %d\n", cid); #endif nrnmpi_bbssend(cid, CONTEXT+1, context_buf_); if (--remaining_context_cnt_ <= 0) { nrnmpi_unref(context_buf_); context_buf_ = nil; } return true; } #endif return false; } void BBSDirectServer::post_result(int id, bbsmpibuf* send){ #if defined(HAVE_STL) #if debug printf("DirectServer::post_result id=%d send=%p\n", id, send); #endif WorkList::iterator i = work_->find(id); WorkItem* w = (WorkItem*)((*i).second); nrnmpi_ref(send); nrnmpi_unref(w->buf_); w->buf_ = send; results_->insert(pair(w->parent_ ? w->parent_->id_ : 0, w)); #endif } int BBSDirectServer::look_take_todo(bbsmpibuf** recv) { #if defined(HAVE_STL) #if debug printf("DirectServer::look_take_todo\n"); #endif nrnmpi_unref(*recv); *recv = nil; ReadyList::iterator i = todo_->begin(); if (i != todo_->end()) { WorkItem* w = (WorkItem*)(*i); todo_->erase(i); *recv = w->buf_; #if debug printf("DirectServer::look_take_todo recv %p with keypos=%d return %d\n", *recv, (*recv)->keypos, w->id_); #endif w->buf_ = 0; return w->id_; }else{ return 0; } #else return 0; #endif } int BBSDirectServer::look_take_result(int pid, bbsmpibuf** recv) { #if debug printf("DirectServer::look_take_result pid=%d\n", pid); #endif #if defined(HAVE_STL) nrnmpi_unref(*recv); *recv = nil; ResultList::iterator i = results_->find(pid); if (i != results_->end()) { WorkItem* w = (WorkItem*)((*i).second); results_->erase(i); *recv = w->buf_; int id = w->id_; WorkList::iterator j = work_->find(id); work_->erase(j); delete w; #if debug printf("DirectServer::look_take_result recv=%p return %d\n", *recv, id); #endif return id; }else{ return 0; } #else return 0; #endif } #endif //NRNMPI neuron-7.5/src/parallel/bbssrv2mpi.h000066400000000000000000000025531323325274500175330ustar00rootroot00000000000000#ifndef bbslsrv2_h #define bbslsrv2_h #include #include class MpiMessageList; class MpiPendingList; class MpiWorkList; class MpiReadyList; class MpiLookingToDoList; class MpiResultList; struct bbsmpibuf; extern "C" { void bbs_handle(); } class BBSDirectServer { public: BBSDirectServer(); virtual ~BBSDirectServer(); void post(const char* key, bbsmpibuf*); bool look(const char* key, bbsmpibuf**); bool look_take(const char* key, bbsmpibuf**); bool take_pending(const char* key, int* cid); void put_pending(const char* key, int cid); static BBSDirectServer* server_; static void handle(); // all remote requests static void handle_block(); static void handle1(int size, int tag, int source); void start(); void done(); void post_todo(int parentid, int cid, bbsmpibuf*); void context(bbsmpibuf*); bool send_context(int cid); // sends if not sent already void post_result(int id, bbsmpibuf*); int look_take_todo(bbsmpibuf**); int look_take_result(int parentid, bbsmpibuf**); void context_wait(); private: void add_looking_todo(int cid); private: MpiMessageList* messages_; MpiPendingList* pending_; MpiWorkList* work_; MpiLookingToDoList* looking_todo_; MpiReadyList* todo_; MpiResultList* results_; MpiLookingToDoList* send_context_; int next_id_; bbsmpibuf* context_buf_; int remaining_context_cnt_; }; #endif neuron-7.5/src/parallel/bbssrvmpi.cpp000077500000000000000000000112301323325274500177770ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #include #ifdef NRNMPI // to end of file #include #include #include "bbssrv2mpi.h" #include "bbssrv.h" #define debug 0 #define POLLCNT 300 extern "C" { extern int bbs_poll_; void bbs_handle(); extern double hoc_cross_x_; } static int bbs_poll_cnt_; static int bbs_msg_cnt_; void bbs_handle() { if (BBSDirectServer::server_) { bbs_poll_ = POLLCNT; }else{ bbs_poll_ = -1; return; } ++bbs_poll_cnt_; BBSDirectServer::handle(); } void BBSDirectServer::start() { if (nrnmpi_numprocs_bbs > 1) { bbs_poll_ = POLLCNT; } } void BBSDirectServer::done() { return; printf("bbs_msg_cnt_=%d bbs_poll_cnt_=%d bbs_poll_=%d\n", bbs_msg_cnt_, bbs_poll_cnt_, ((bbs_poll_ < 0) ? -bbs_poll_ : bbs_poll_)); } void BBSDirectServer::handle_block() { int size; int tag; int source; nrnmpi_probe(&size, &tag, &source); handle1(size, tag, source); } void BBSDirectServer::handle() { int size; int tag; int source; if (nrnmpi_iprobe(&size, &tag, &source) != 0) { do { handle1(size, tag, source); } while (nrnmpi_iprobe(&size, &tag, &source) != 0); } } void BBSDirectServer::handle1(int size, int tag, int cid) { bbsmpibuf* recv; bbsmpibuf* send; char* key; int index; send = nil; recv = nrnmpi_newbuf(size); nrnmpi_ref(recv); nrnmpi_bbsrecv(cid, recv); ++bbs_msg_cnt_; if (size > 0) { nrnmpi_upkbegin(recv); } switch (tag) { case POST_TODO: index = nrnmpi_getid(recv); // the parent index #if debug printf("handle POST_TODO from %x when cross=%g\n", cid, hoc_cross_x_); #endif BBSDirectServer::server_->post_todo(index, cid, recv); break; case POST_RESULT: index = nrnmpi_getid(recv); #if debug printf("handle POST_RESULT %d from %x when cross=%g\n", index, cid, hoc_cross_x_); #endif BBSDirectServer::server_->post_result(index, recv); break; case POST: key = nrnmpi_getkey(recv); #if debug printf("handle POST %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif BBSDirectServer::server_->post(key, recv); break; case LOOK: key = nrnmpi_getkey(recv); #if debug printf("handle LOOK %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif if (BBSDirectServer::server_->look(key, &send)) { nrnmpi_bbssend(cid, LOOK_YES, send); nrnmpi_unref(send); }else{ nrnmpi_bbssend(cid, LOOK_NO, nil); } break; case LOOK_TAKE: key = nrnmpi_getkey(recv); #if debug printf("handle LOOK_TAKE %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif if (BBSDirectServer::server_->look_take(key, &send)) { #if debug printf("handle sending back something\n"); #endif nrnmpi_bbssend(cid, LOOK_TAKE_YES, send); nrnmpi_unref(send); }else{ nrnmpi_bbssend(cid, LOOK_TAKE_NO, nil); } break; case TAKE: key = nrnmpi_getkey(recv); #if debug printf("handle TAKE %s from %x when cross=%g\n", key, cid, hoc_cross_x_); #endif if (BBSDirectServer::server_->look_take(key, &send)) { #if debug printf("handle sending back something\n"); #endif nrnmpi_bbssend(cid, TAKE, send); nrnmpi_unref(send); }else{ #if debug printf("handle put_pending %s for %d\n", key, cid); #endif BBSDirectServer::server_->put_pending(key, cid); } break; case LOOK_TAKE_TODO: #if debug printf("handle LOOK_TAKE_TODO for cid=%x\n", cid); #endif index = BBSDirectServer::server_->look_take_todo(&send); #if debug printf("handle sending back id=%d\n", index); #endif nrnmpi_bbssend(cid, index+1, send); if (index) { nrnmpi_unref(send); } break; case LOOK_TAKE_RESULT: index = nrnmpi_getid(recv); #if debug printf("handle LOOK_TAKE_RESULT for %x pid=%d\n", cid, index); #endif index = BBSDirectServer::server_->look_take_result(index, &send); #if debug printf("handle sending back id=%d\n", index); #endif nrnmpi_bbssend(cid, index+1, send); if (index) { nrnmpi_unref(send); } break; case TAKE_TODO: #if debug printf("handle TAKE_TODO for %x\n", cid); #endif if (server_->remaining_context_cnt_ > 0 && server_->send_context(cid)) { #if debug printf("handle sent back a context\n"); #endif break; } index = BBSDirectServer::server_->look_take_todo(&send); if (index) { #if debug printf("handle sending back id=%d\n", index); #endif nrnmpi_bbssend(cid, index+1, send); nrnmpi_unref(send); }else{ #if debug printf("handle add_looking_todo\n"); #endif BBSDirectServer::server_->add_looking_todo(cid); } break; case HELLO: #if debug printf("handle HELLO from %x when cross=%g\n", cid, hoc_cross_x_); #endif nrnmpi_pkbegin(recv); nrnmpi_enddata(recv); nrnmpi_bbssend(cid, HELLO, recv); break; default: printf("unknown message\n"); break; } nrnmpi_unref(recv); } #else extern "C" { void bbs_handle(){} } #endif //NRNMPI neuron-7.5/src/parallel/ocbbs.cpp000066400000000000000000000672421323325274500170730ustar00rootroot00000000000000#include <../../nrnconf.h> #include "bbsconf.h" #include #include "classreg.h" #include "oc2iv.h" #include "ivocvect.h" #include "hoclist.h" #include "bbs.h" #include "bbsimpl.h" #include "ivocvect.h" #include "parse.h" #include "section.h" #include "membfunc.h" #include #include #undef MD #define MD 2147483647. extern "C" { extern int vector_arg_px(int, double**); Symbol* hoc_which_template(Symbol*); void bbs_done(); extern double t; #if BLUEGENE_CHECKPOINT int BGLCheckpoint(); #endif extern void nrnmpi_source_var(), nrnmpi_target_var(), nrnmpi_setup_transfer(); extern int nrnmpi_spike_compress(int nspike, bool gid_compress, int xchng_meth); extern int nrnmpi_splitcell_connect(int that_host); extern int nrnmpi_multisplit(Section*, double x, int sid, int backbonestyle); extern int nrn_set_timeout(int timeout); extern void nrnmpi_gid_clear(int); double nrnmpi_rtcomp_time_; extern double nrn_bgp_receive_time(int); char* (*nrnpy_po2pickle)(Object*, size_t*); Object* (*nrnpy_pickle2po)(char*, size_t); char* (*nrnpy_callpicklef)(char*, size_t, int, size_t*); Object* (*nrnpympi_alltoall)(Object*, int); extern void nrn_prcellstate(int gid, const char* suffix); double nrnmpi_step_wait_; #if PARANEURON double nrnmpi_transfer_wait_; double nrnmpi_splitcell_wait_; #endif #if NRNMPI void nrnmpi_barrier(); double nrnmpi_dbl_allreduce(double, int); void nrnmpi_dbl_allreduce_vec(double* src, double* dest, int cnt, int type); void nrnmpi_dbl_allgather(double*, double*, int); void nrnmpi_int_alltoallv(int*, int*, int*, int*, int*, int*); void nrnmpi_dbl_alltoallv(double*, int*, int*, double*, int*, int*); double nrmpi_wtime(); void nrnmpi_int_broadcast(int*, int, int); void nrnmpi_char_broadcast(char*, int, int); void nrnmpi_dbl_broadcast(double*, int, int); extern void nrnmpi_subworld_size(int n); #else static void nrnmpi_int_broadcast(int*, int, int){} static void nrnmpi_char_broadcast(char*, int, int){} static void nrnmpi_dbl_broadcast(double*, int, int){} #endif extern double* nrn_mech_wtime_; extern int nrn_nthread; extern void nrn_threads_create(int, int); extern void nrn_thread_partition(int, Object*); extern void nrn_thread_stat(); extern int nrn_allow_busywait(int); extern int nrn_how_many_processors(); extern size_t nrnbbcore_write(); extern size_t nrnbbcore_register_mapping(); } class OcBBS : public BBS , public Resource { public: OcBBS(int nhost_request); virtual ~OcBBS(); public: double retval_; int userid_; int next_local_; }; OcBBS::OcBBS(int n) : BBS(n) { next_local_ = 0; } OcBBS::~OcBBS() { } static bool posting_ = false; static void pack_help(int, OcBBS*); static void unpack_help(int, OcBBS*); static int submit_help(OcBBS*); static char* key_help(); void bbs_done() { #if USEBBS Symbol* sym = hoc_lookup("ParallelContext"); sym = hoc_which_template(sym); hoc_Item* q, *ql; ql = sym->u.ctemplate->olist; q = ql->next; if (q != ql) { Object* ob = OBJ(q); OcBBS* bbs = (OcBBS*)ob->u.this_pointer; if (bbs->is_master()) {bbs->done();} } #endif } static int submit_help(OcBBS* bbs) { int id, i, firstarg, style; char* pname = 0; // if using Python callable posting_ = true; bbs->pkbegin(); i = 1; if (hoc_is_double_arg(i)) { bbs->pkint((id = (int)chkarg(i++, 0, 1e7))); }else{ bbs->pkint((id = --bbs->next_local_)); } if (ifarg(i+1)) { #if 1 int argtypes = 0; int ii = 1; if (hoc_is_str_arg(i)) { style = 1; bbs->pkint(style); // "fname", arg1, ... style bbs->pkstr(gargstr(i++)); }else{ Object* ob = *hoc_objgetarg(i++); size_t size; if (nrnpy_po2pickle) { pname = (*nrnpy_po2pickle)(ob, &size); } if (pname) { style = 3; bbs->pkint(style); // pyfun, arg1, ... style bbs->pkpickle(pname, size); delete [] pname; }else{ style = 2; bbs->pkint(style); // [object],"fname", arg1, ... style bbs->pkstr(ob->ctemplate->sym->name); bbs->pkint(ob->index); //printf("ob=%s\n", hoc_object_name(ob)); bbs->pkstr(gargstr(i++)); } } firstarg = i; for (; ifarg(i); ++i) { // first is least significant if (hoc_is_double_arg(i)) { argtypes += 1*ii; }else if (hoc_is_str_arg(i)) { argtypes += 2*ii; }else if (is_vector_arg(i)) { //hoc Vector argtypes += 3*ii; }else{ // must be a PythonObject argtypes += 4*ii; } ii *= 5; } //printf("submit style %d %s argtypes=%o\n", style, gargstr(firstarg-1), argtypes); bbs->pkint(argtypes); pack_help(firstarg, bbs); #endif }else{ if (hoc_is_str_arg(i)) { bbs->pkint(0); // hoc statement style bbs->pkstr(gargstr(i)); }else if (nrnpy_po2pickle) { size_t size; pname = (*nrnpy_po2pickle)(*hoc_objgetarg(i), &size); bbs->pkint(3); // pyfun with no arg style bbs->pkpickle(pname, size); bbs->pkint(0); // argtypes delete [] pname; } } posting_ = false; return id; } static double submit(void *v) { int id; OcBBS* bbs = (OcBBS*)v; id = submit_help(bbs); bbs->submit(id); return double(id); } static double context(void *v) { OcBBS* bbs = (OcBBS*)v; submit_help(bbs); // printf("%d context %s %s\n", bbs->myid(), hoc_object_name(*hoc_objgetarg(1)), gargstr(2)); bbs->context(); return 1.; } static double working(void* v) { OcBBS* bbs = (OcBBS*)v; int id; bool b = bbs->working(id, bbs->retval_, bbs->userid_); if (b) { return double(id); }else{ return 0.; } } static double retval(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->retval_; } static double userid(void* v) { OcBBS* bbs = (OcBBS*)v; return (double)bbs->userid_; } static double nhost(void* v) { return nrnmpi_numprocs; } static double nrn_rank(void* v) { return nrnmpi_myid; } static double nhost_world(void* v) { return nrnmpi_numprocs_world; } static double rank_world(void* v) { return nrnmpi_myid_world; } static double nhost_bbs(void* v) { return nrnmpi_numprocs_bbs; } static double rank_bbs(void* v) { return nrnmpi_myid_bbs; } static double subworlds(void* v) { int n = int(chkarg(1, 1, nrnmpi_numprocs_world)); if (nrnmpi_numprocs_world%n) { hoc_execerror("nhost_world must be an integer multiple of subworld size", 0); } #if NRNMPI nrnmpi_subworld_size(n); #endif return 0.; } static double worker(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->worker(); return 0.; } static double master_works(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->master_works(int(chkarg(1, 0, 1))); return 0.; } static double done(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->done(); return 0.; } static void pack_help(int i, OcBBS* bbs) { if (!posting_) { bbs->pkbegin(); posting_ = true; } for (; ifarg(i); ++i) { if (hoc_is_double_arg(i)) { bbs->pkdouble(*getarg(i)); }else if (hoc_is_str_arg(i)) { bbs->pkstr(gargstr(i)); }else if (is_vector_arg(i)){ int n; double* px; n = vector_arg_px(i, &px); bbs->pkint(n); bbs->pkvec(n, px); }else{ // must be a PythonObject size_t size; char* s = nrnpy_po2pickle(*hoc_objgetarg(i), &size); bbs->pkpickle(s, size); delete [] s; } } } static double pack(void* v) { OcBBS* bbs = (OcBBS*)v; pack_help(1, bbs); return 0.; } static double post(void* v) { OcBBS* bbs = (OcBBS*)v; pack_help(2, bbs); posting_ = false; if (hoc_is_str_arg(1)) { bbs->post(gargstr(1)); }else{ char key[50]; sprintf(key, "%g", *getarg(1)); bbs->post(key); } return 1.; } static void unpack_help(int i, OcBBS* bbs) { for (; ifarg(i); ++i) { if (hoc_is_pdouble_arg(i)) { *hoc_pgetarg(i) = bbs->upkdouble(); }else if (hoc_is_str_arg(i)) { char* s = bbs->upkstr(); char** ps = hoc_pgargstr(i); hoc_assign_str(ps, s); delete [] s; }else if (is_vector_arg(i)){ Vect* vec = vector_arg(i); int n = bbs->upkint(); vec->resize(n); bbs->upkvec(n, vec->vec()); }else{ hoc_execerror("pc.unpack can only unpack str, scalar, or Vector.", "use pc.upkpyobj to unpack a Python Object"); } } } static double unpack(void* v) { OcBBS* bbs = (OcBBS*)v; unpack_help(1, bbs); return 1.; } static double upkscalar(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->upkdouble(); } static const char** upkstr(void* v) { OcBBS* bbs = (OcBBS*)v; char* s = bbs->upkstr(); char** ps = hoc_pgargstr(1); hoc_assign_str(ps, s); delete [] s; return (const char**)ps; } static Object** upkvec(void* v) { OcBBS* bbs = (OcBBS*)v; Vect* vec; int n = bbs->upkint(); if (ifarg(1)) { vec = vector_arg(1); vec->resize(n); }else{ vec = new Vect(n); } bbs->upkvec(n, vec->vec()); return vec->temp_objvar(); } static Object** upkpyobj(void* v) { OcBBS* bbs = (OcBBS*)v; size_t n; char* s = bbs->upkpickle(&n); assert(nrnpy_pickle2po); Object* po = (*nrnpy_pickle2po)(s, n); delete [] s; return hoc_temp_objptr(po); } static Object** pyret(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->pyret(); } Object** BBS::pyret() { assert(impl_->pickle_ret_); assert(nrnpy_pickle2po); Object* po = (*nrnpy_pickle2po)(impl_->pickle_ret_, impl_->pickle_ret_size_); delete [] impl_->pickle_ret_; impl_->pickle_ret_ = 0; impl_->pickle_ret_size_ = 0; return hoc_temp_objptr(po); } static Object** py_alltoall(void*) { assert(nrnpympi_alltoall); int size = 0; if (ifarg(2)) { size = int(chkarg(2, -1, 2.14748e9)); } Object* po = (*nrnpympi_alltoall)(*hoc_objgetarg(1), size); return hoc_temp_objptr(po); } static char* key_help() { static char key[50]; if (hoc_is_str_arg(1)) { return gargstr(1); }else{ sprintf(key, "%g", *getarg(1)); return key; } } static double take(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->take(key_help()); unpack_help(2, bbs); return 1.; } static double look(void* v) { OcBBS* bbs = (OcBBS*)v; if (bbs->look(key_help())) { unpack_help(2, bbs); return 1.; } return 0.; } static double look_take(void* v) { OcBBS* bbs = (OcBBS*)v; if (bbs->look_take(key_help())) { unpack_help(2, bbs); return 1.; } return 0.; } static double pctime(void* v) { return ((OcBBS*)v)->time(); } static double vtransfer_time(void* v) { int mode = ifarg(1) ? int(chkarg(1, 0., 2.)) : 0; if (mode == 2) { return nrnmpi_rtcomp_time_; #if PARANEURON }else if (mode == 1) { return nrnmpi_splitcell_wait_; }else{ return nrnmpi_transfer_wait_; } #else } return 0; #endif } static double mech_time(void* v) { if (ifarg(1)) { if (nrn_mech_wtime_) { int i = (int)chkarg(1, 0, n_memb_func-1); return nrn_mech_wtime_[i]; } }else{ if (!nrn_mech_wtime_) { nrn_mech_wtime_ = new double[n_memb_func]; } for (int i=0; i < n_memb_func; ++i) { nrn_mech_wtime_[i] = 0.0; } } return 0; } static double prcellstate(void* v) { nrn_prcellstate(int(*hoc_getarg(1)), hoc_gargstr(2)); return 0; } static double wait_time(void* v) { double w = ((OcBBS*)v)->wait_time(); return w; } static double step_time(void* v) { double w = ((OcBBS*)v)->integ_time(); #if PARANEURON w -= nrnmpi_transfer_wait_ + nrnmpi_splitcell_wait_; #endif return w; } static double step_wait(void* v) { if (ifarg(1)) { nrnmpi_step_wait_ = chkarg(1, -1.0, 0.0); } double w = nrnmpi_step_wait_; #if PARANEURON //sadly, no calculation of transfer and multisplit barrier times. #endif if (w < 0.) { w = 0.0; } return w; } static double send_time(void* v) { int arg = ifarg(1) ? int(chkarg(1, 0, 20)) : 0; if (arg) { return nrn_bgp_receive_time(arg); } return ((OcBBS*)v)->send_time(); } static double event_time(void* v) { return 0.; } static double integ_time(void* v) { return 0.; } static double set_gid2node(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->set_gid2node(int(chkarg(1, 0, MD)), int(chkarg(2, 0, MD))); return 0.; } static double gid_exists(void* v) { OcBBS* bbs = (OcBBS*)v; return int(bbs->gid_exists(int(chkarg(1, 0, MD)))); } static double cell(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->cell(); return 0.; } static double threshold(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->threshold(); } static double spcompress(void* v) { int nspike = -1; bool gid_compress = true; int xchng_meth = 0; if (ifarg(1)) { nspike = (int)chkarg(1, -1, MD); } if (ifarg(2)) { gid_compress = (chkarg(2, 0, 1) ? true : false); } if (ifarg(3)) { xchng_meth = (int)chkarg(3, 0, 15); } return (double)nrnmpi_spike_compress(nspike, gid_compress, xchng_meth); } static double splitcell_connect(void* v) { int that_host = (int)chkarg(1, 0, nrnmpi_numprocs-1); // also needs a currently accessed section that is the root of this_tree nrnmpi_splitcell_connect(that_host); return 0.; } static double multisplit(void* v) { double x = -1.; Section* sec = NULL; int sid = -1; int backbone_style = 2; int reducedtree_host = 0; if (ifarg(1)) { nrn_seg_or_x_arg(1, &sec, &x); sid = (int)chkarg(2, 0, (double)(0x7fffffff)); } if (ifarg(3)) { backbone_style = (int)chkarg(3, 0, 2); } // also needs a currently accessed section nrnmpi_multisplit(sec, x, sid, backbone_style); return 0.; } static double set_timeout(void* v) { int arg = 0; if (ifarg(1)){ arg = int(chkarg(1, 0, 10000)); } arg = nrn_set_timeout(arg); return double(arg); } static double gid_clear(void* v) { int arg = 0; if (ifarg(1)){ arg = int(chkarg(1, 0, 4)); } nrnmpi_gid_clear(arg); return 0.; } static double outputcell(void* v) { OcBBS* bbs = (OcBBS*)v; int gid = int(chkarg(1, 0., MD)); bbs->outputcell(gid); return 0.; } static double spike_record(void* v) { OcBBS* bbs = (OcBBS*)v; int gid = int(chkarg(1, -1., MD)); IvocVect* spikevec = vector_arg(2); IvocVect* gidvec = vector_arg(3); bbs->spike_record(gid, spikevec, gidvec); return 0.; } static double psolve(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->netpar_solve(chkarg(1, t, 1e9)); return 0.; } static double set_maxstep(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->netpar_mindelay(chkarg(1, 1e-6, 1e9)); } static double spike_stat(void* v) { OcBBS* bbs = (OcBBS*)v; int nsend, nsendmax, nrecv, nrecv_useful; nsend = nsendmax = nrecv = nrecv_useful = 0; bbs->netpar_spanning_statistics(&nsend, &nsendmax, &nrecv, &nrecv_useful); if (ifarg(1)) { *hoc_pgetarg(1) = nsend; } if (ifarg(2)) { *hoc_pgetarg(2) = nrecv; } if (ifarg(3)) { *hoc_pgetarg(3) = nrecv_useful; } return double(nsendmax); } static double maxhist(void* v) { OcBBS* bbs = (OcBBS*)v; IvocVect* vec = ifarg(1) ? vector_arg(1) : nil; if (vec) { hoc_obj_ref(vec->obj_); } vec = bbs->netpar_max_histogram(vec); if (vec) { hoc_obj_unref(vec->obj_); } return 0.; } static double source_var(void*) { // &source_variable, source_global_index // At BEFORE BREAKPOINT, the value of variable is sent to the // target machine(s). This can only be executed on the // source machine (where source_variable exists). nrnmpi_source_var(); return 0.; } static double target_var(void*) { // &target_variable, source_global_index // At BEFORE BREAKPOINT, the value of the target_variable is set // to the value of the source variable associated // with the source_global_index. This can only be executed on the // target machine (where target_variable exists). nrnmpi_target_var(); return 0.; } static double setup_transfer(void*) { // after all source/target and before init and run nrnmpi_setup_transfer(); return 0.; } static double barrier(void*) { // return wait time double t = 0.; #if NRNMPI if (nrnmpi_numprocs > 1) { t = nrnmpi_wtime(); nrnmpi_barrier(); t = nrnmpi_wtime() - t; } errno = 0; #endif return t; } static double allreduce(void*) { // type 1,2,3 sum, max, min if (hoc_is_object_arg(1)) { Vect* vec = vector_arg(1); int n = vec->capacity(); if (n == 0) { return 0.0; } #if NRNMPI if (nrnmpi_numprocs > 1) { int type = (int)chkarg(2, 1, 3); double* px = vector_vec(vec); double* dest = new double[n]; nrnmpi_dbl_allreduce_vec(px, dest, n, type); for (int i = 0; i < n; ++i) { px[i] = dest[i]; } delete [] dest; } errno = 0; #endif return 0.; }else{ double val = *getarg(1); #if NRNMPI if (nrnmpi_numprocs > 1) { int type = (int)chkarg(2, 1, 3); val = nrnmpi_dbl_allreduce(val, type); } errno = 0; #endif return val; } } static double allgather(void*) { double val = *getarg(1); Vect* vec = vector_arg(2); vector_resize(vec, nrnmpi_numprocs); double* px = vector_vec(vec); #if NRNMPI if (nrnmpi_numprocs > 1) { nrnmpi_dbl_allgather(&val, px, 1); errno = 0; }else{ px[0] = val; } #else px[0] = val; #endif return 0.; } static double alltoall(void*) { int i, ns, np = nrnmpi_numprocs; Vect* vsrc = vector_arg(1); Vect* vscnt = vector_arg(2); ns = vector_capacity(vsrc); double* s = vector_vec(vsrc); if (vector_capacity(vscnt) != np) { hoc_execerror("size of source counts vector is not nhost", 0); } double* x = vector_vec(vscnt); int* scnt = new int[np]; int* sdispl = new int[np+1]; sdispl[0] = 0; for (i=0; i < np; ++i) { scnt[i] = int(x[i]); sdispl[i+1] = sdispl[i] + scnt[i]; } if (ns != sdispl[np]) { hoc_execerror("sum of source counts is not the size of the src vector", 0); } Vect* vdest = vector_arg(3); if (nrnmpi_numprocs > 1) { #if NRNMPI int* rcnt = new int[np]; int* rdispl = new int[np + 1]; int* c = new int[np]; rdispl[0] = 0; for (i=0; i < np; ++i) { c[i] = 1; rdispl[i+1] = i+1; } nrnmpi_int_alltoallv(scnt, c, rdispl, rcnt, c, rdispl); delete [] c; for (i=0; i < np; ++i) { rdispl[i+1] = rdispl[i] + rcnt[i]; } vector_resize(vdest, rdispl[np]); double* r = vector_vec(vdest); nrnmpi_dbl_alltoallv(s, scnt, sdispl, r, rcnt, rdispl); delete [] rcnt; delete [] rdispl; #endif }else{ vector_resize(vdest, ns); double* r = vector_vec(vdest); for (i=0; i < ns; ++i) { r[i] = s[i]; } } delete [] scnt; delete [] sdispl; return 0.; } static double broadcast(void*) { int srcid = int(chkarg(2, 0, nrnmpi_numprocs - 1)); int cnt = 0; #if NRNMPI if (nrnmpi_numprocs > 1) { if (hoc_is_str_arg(1)) { char* s; if (srcid == nrnmpi_myid) { s = gargstr(1); cnt = strlen(s) + 1; } nrnmpi_int_broadcast(&cnt, 1, srcid); if (srcid != nrnmpi_myid) { s = new char[cnt]; } nrnmpi_char_broadcast(s, cnt, srcid); if (srcid != nrnmpi_myid) { hoc_assign_str(hoc_pgargstr(1), s); delete [] s; } }else{ Vect* vec = vector_arg(1); if (srcid == nrnmpi_myid) { cnt = vec->capacity(); } nrnmpi_int_broadcast(&cnt, 1, srcid); if (srcid != nrnmpi_myid) { vec->resize(cnt); } nrnmpi_dbl_broadcast(vector_vec(vec), cnt, srcid); } }else{ #else { #endif if (hoc_is_str_arg(1)) { cnt = strlen(gargstr(1)); }else{ cnt = vector_arg(1)->capacity(); } } return double(cnt); } static double checkpoint(void*) { #if BLUEGENE_CHECKPOINT int i = BGLCheckpoint(); return double(i); #else return 0.; #endif } static double nthrd(void*) { int ip = 1; if (ifarg(1)) { if (ifarg(2)) { ip = int(chkarg(2, 0, 1)); } nrn_threads_create(int(chkarg(1, 1, 1e5)), ip); } return double(nrn_nthread); } static double partition(void*) { Object* ob = 0; int it; if (ifarg(2)) { ob = *hoc_objgetarg(2); if (ob) { check_obj_type(ob, "SectionList"); } } if (ifarg(1)) { it = (int)chkarg(1, 0, nrn_nthread - 1); nrn_thread_partition(it, ob); }else{ for (it = 0; it < nrn_nthread; ++it) { nrn_thread_partition(it, ob); } } return 0.0; } static double thread_stat(void*) { nrn_thread_stat(); return 0.0; } static double thread_busywait(void*) { int old = nrn_allow_busywait(int(chkarg(1,0,1))); return double(old); } static double thread_how_many_proc(void*) { int i = nrn_how_many_processors(); return double(i); } static double sec_in_thread(void*) { Section* sec = chk_access(); return double(sec->pnode[0]->_nt->id); } static double thread_ctime(void*) { int i; #if 1 if (ifarg(1)) { i = int(chkarg(1, 0, nrn_nthread)); return nrn_threads[i]._ctime; }else{ for (i=0; i < nrn_nthread; ++i) { nrn_threads[i]._ctime = 0.0; } } #endif return 0.0; } static double nrn_thread_t(void*) { int i; i = int(chkarg(1, 0, nrn_nthread)); return nrn_threads[i]._t; } static double thread_dt(void*) { int i; i = int(chkarg(1, 0, nrn_nthread)); return nrn_threads[i]._dt; } static double nrnbbcorewrite(void*) { return double(nrnbbcore_write()); } static double nrnbbcore_register_mapping(void*) { return double(nrnbbcore_register_mapping()); } static Object** gid2obj(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->gid2obj(int(chkarg(1, 0, MD))); } static Object** gid2cell(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->gid2cell(int(chkarg(1, 0, MD))); } static Object** gid_connect(void* v) { OcBBS* bbs = (OcBBS*)v; return bbs->gid_connect(int(chkarg(1, 0, MD))); } static Member_func members[] = { "submit", submit, "working", working, "retval", retval, "userid", userid, "pack", pack, "post", post, "unpack", unpack, "upkscalar", upkscalar, "take", take, "look", look, "look_take", look_take, "runworker", worker, "master_works_on_jobs", master_works, "done", done, "id", nrn_rank, "nhost", nhost, "id_world", rank_world, "nhost_world", nhost_world, "id_bbs", rank_bbs, "nhost_bbs", nhost_bbs, "subworlds", subworlds, "context", context, "time", pctime, "wait_time", wait_time, "step_time", step_time, "step_wait", step_wait, "send_time", send_time, "event_time", event_time, "integ_time", integ_time, "vtransfer_time", vtransfer_time, "mech_time", mech_time, "timeout", set_timeout, "set_gid2node", set_gid2node, "gid_exists", gid_exists, "outputcell", outputcell, "cell", cell, "threshold", threshold, "spike_record", spike_record, "psolve", psolve, "set_maxstep", set_maxstep, "spike_statistics", spike_stat, "max_histogram", maxhist, "checkpoint", checkpoint, "spike_compress", spcompress, "gid_clear", gid_clear, "prcellstate", prcellstate, "source_var", source_var, "target_var", target_var, "setup_transfer", setup_transfer, "splitcell_connect", splitcell_connect, "multisplit", multisplit, "barrier", barrier, "allreduce", allreduce, "allgather", allgather, "alltoall", alltoall, "broadcast", broadcast, "nthread", nthrd, "partition", partition, "thread_stat", thread_stat, "thread_busywait", thread_busywait, "thread_how_many_proc", thread_how_many_proc, "sec_in_thread", sec_in_thread, "thread_ctime", thread_ctime, "dt", thread_dt, "t", nrn_thread_t, "nrnbbcore_write", nrnbbcorewrite, "nrnbbcore_register_mapping", nrnbbcore_register_mapping, 0,0 }; static Member_ret_str_func retstr_members[] = { "upkstr", upkstr, 0,0 }; static Member_ret_obj_func retobj_members[] = { "upkvec", upkvec, "gid2obj", gid2obj, "gid2cell", gid2cell, "gid_connect", gid_connect, "upkpyobj", upkpyobj, "pyret", pyret, "py_alltoall", py_alltoall, 0,0 }; static void* cons(Object*) { // not clear at moment what is best way to handle nested context int i = -1; if (ifarg(1)) { i = int(chkarg(1, 0, 10000)); } OcBBS* bbs = new OcBBS(i); bbs->ref(); return bbs; } static void destruct(void* v) { OcBBS* bbs = (OcBBS*)v; bbs->unref(); } void ParallelContext_reg() { class2oc("ParallelContext", cons, destruct, members, nil, retobj_members, retstr_members); } char* BBSImpl::execute_helper(size_t* size, int id) { char* s; int subworld = (nrnmpi_numprocs > 1 && nrnmpi_numprocs_bbs < nrnmpi_numprocs_world); int style = upkint(); if (subworld) { assert(nrnmpi_myid == 0); int info[2]; info[0] = id; info[1] = style; nrnmpi_int_broadcast(info, 2, 0); } char* rs = 0; *size = 0; switch (style) { case 0: s = upkstr(); if (subworld) { int size = strlen(s) + 1; nrnmpi_int_broadcast(&size, 1, 0); nrnmpi_char_broadcast(s, size, 0); } hoc_obj_run(s, nil); delete [] s; break; default: { #if 1 int i, j; size_t npickle; Symbol* fname = 0; Object* ob = nil; char* sarg[20]; // upto 20 argument may be strings int ns = 0; // number of args that are strings int narg = 0; // total number of args if (style == 2) { // object first s = upkstr(); // template name i = upkint(); // object index //printf("template |%s| index=%d\n", s, i); Symbol* sym = hoc_lookup(s); if (sym) { sym = hoc_which_template(sym); } if (!sym) { hoc_execerror(s, "is not a template"); } hoc_Item* q, *ql; ql = sym->u.ctemplate->olist; ITERATE(q, ql) { ob = OBJ(q); if (ob->index == i) { break; } ob = nil; } if (!ob) { fprintf(stderr, "%s[%d] is not an Object in this process\n", s, i); hoc_execerror("ParallelContext execution error", 0); } delete [] s; s = upkstr(); fname = hoc_table_lookup(s, sym->u.ctemplate->symtable); if (subworld) { hoc_execerror("with subworlds, this submit style not implemented", 0); } }else if (style == 3) { // Python callable s = upkpickle(&npickle); if (subworld) { int size = npickle; nrnmpi_int_broadcast(&size, 1, 0); nrnmpi_char_broadcast(s, size, 0); } }else{ s = upkstr(); if (subworld) { int size = strlen(s) + 1; //printf("%d exec hoc fun size = %d\n", nrnmpi_myid_world, size); nrnmpi_int_broadcast(&size, 1, 0); nrnmpi_char_broadcast(s, size, 0); } fname = hoc_lookup(s); } //printf("execute helper style %d fname=%s obj=%s\n", style, fname->name, hoc_object_name(ob)); if (style != 3 && !fname) { fprintf(stderr, "%s not a function in %s\n", s, hoc_object_name(ob)); hoc_execerror("ParallelContext execution error", 0); } int argtypes = upkint(); // first is least signif if (subworld) { //printf("%d exec argtypes = %d\n", nrnmpi_myid_world, argtypes); nrnmpi_int_broadcast(&argtypes, 1, 0); } for (j = argtypes; (i = j%5) != 0; j /= 5) { ++narg; if (i == 1) { double x = upkdouble(); //printf("%d arg %d scalar %g\n", nrnmpi_myid_world, narg, x); if (subworld) { nrnmpi_dbl_broadcast(&x, 1, 0); } hoc_pushx(x); }else if (i == 2) { sarg[ns] = upkstr(); //printf("arg %d string |%s|\n", narg, sarg[ns]); if (subworld) { int size = strlen(sarg[ns]) + 1; nrnmpi_int_broadcast(&size, 1, 0); nrnmpi_char_broadcast(sarg[ns], size, 0); } hoc_pushstr(sarg+ns); ns++; }else if (i == 3) { int n; n = upkint(); if (subworld) { nrnmpi_int_broadcast(&n, 1, 0); } Vect* vec = new Vect(n); //printf("arg %d vector size=%d\n", narg, n); upkvec(n, vec->vec()); if (subworld) { nrnmpi_dbl_broadcast(vec->vec(), n, 0); } hoc_pushobj(vec->temp_objvar()); }else{ //PythonObject size_t n; char* s = upkpickle(&n); int size = n; if (subworld) { nrnmpi_int_broadcast(&size, 1, 0); nrnmpi_char_broadcast(s, size, 0); } assert(nrnpy_pickle2po); Object* po = nrnpy_pickle2po(s, n); delete [] s; hoc_pushobj(hoc_temp_objptr(po)); } } if (style == 3) { assert(nrnpy_callpicklef); if (pickle_ret_) { delete [] pickle_ret_; pickle_ret_ = 0; pickle_ret_size_ = 0; } rs = (*nrnpy_callpicklef)(s, npickle, narg, size); hoc_ac_ = 0.; }else{ //printf("%d exec hoc call %s narg=%d\n", nrnmpi_myid_world, fname->name, narg); hoc_ac_ = hoc_call_objfunc(fname, narg, ob); //printf("%d exec return from hoc call %s narg=%d\n", nrnmpi_myid_world, fname->name, narg); } delete [] s; for (i=0; i < ns; ++i) { delete [] sarg[i]; } #endif } break; } return rs; } #include "subworld.cpp" void BBSImpl::return_args(int id) { // the message has been set up by the subclass // perhaps it would be better to do this directly // and avoid the meaningless create and delete. // but then they all would have to know this format int i; char* s; //printf("BBSImpl::return_args(%d):\n", id); i = upkint(); // userid int style = upkint(); //printf("message userid=%d style=%d\n", i, style); switch (style) { case 0: s = upkstr(); // the statement //printf("statement |%s|\n", s); delete [] s; break; case 2: // obj first s = upkstr(); // template name i = upkint(); // instance index //printf("object %s[%d]\n", s, i); delete [] s; //fall through case 1: s = upkstr(); //fname i = upkint(); // arg manifest //printf("fname=|%s| manifest=%o\n", s, i); delete [] s; break; case 3: size_t n; s = upkpickle(&n); //pickled callable i = upkint(); // arg manifest delete [] s; break; } // now only args are left and ready to unpack. } neuron-7.5/src/parallel/subworld.cpp000066400000000000000000000064651323325274500176440ustar00rootroot00000000000000// included by ocbbs.cpp void BBSImpl::subworld_worker_execute() { // execute the same thing that execute_worker is executing. This // is done for all the nrnmpi_myid_bbs == -1 workers associated with // the specific nrnmpi_myid == 0 with nrnmpi_myid_bbs >= 0. // All the nrnmpi/mpispike.c functions can be used since the // proper communicators for a subworld are used by those functions. // The broadcast functions are particularly useful and those are // how execute_worker passes messages into here. //printf("%d enter subworld_worker_execute\n", nrnmpi_myid_world); int info[2]; // wait for something to do nrnmpi_int_broadcast(info, 2, 0); // info[0] = -1 means it was from a pc.context. Also -2 means // DONE. //printf("%d subworld_worker_execute info %d %d\n", nrnmpi_myid_world, info[0], info[1]); int id = info[0]; if (id == -2) { // DONE, so quit. done(); } hoc_ac_ = double(id); int style = info[1]; if (style == 0) { // hoc statement form int size; nrnmpi_int_broadcast(&size, 1, 0); // includes terminator char *s = new char[size]; nrnmpi_char_broadcast(s, size, 0); hoc_obj_run(s, nil); delete [] s; //printf("%d leave subworld_worker_execute\n", nrnmpi_myid_world); return; } int i, j; int npickle; char* s; Symbol* fname = 0; Object* ob = nil; char* sarg[20]; // up to 20 arguments may be strings int ns = 0; // number of args that are strings int narg = 0; // total number of args if (style == 3) { // python callable nrnmpi_int_broadcast(&npickle, 1, 0); s = new char[npickle]; nrnmpi_char_broadcast(s, npickle, 0); }else if (style == 1) { // hoc function int size; nrnmpi_int_broadcast(&size, 1, 0); // includes terminator //printf("%d subworld hoc function string size = %d\n", nrnmpi_myid_world, size); s = new char(size); nrnmpi_char_broadcast(s, size, 0); fname = hoc_lookup(s); if (!fname) { return; } // error raised by sender }else{ return; // no others implemented, error raised by sender } // now get the args int argtypes; nrnmpi_int_broadcast(&argtypes, 1, 0); //printf("%d subworld argtypes = %d\n", nrnmpi_myid_world, argtypes); for (j = argtypes; (i = j%5) != 0; j /= 5) { ++narg; if (i == 1) { // double double x; nrnmpi_dbl_broadcast(&x, 1, 0); //printf("%d subworld scalar = %g\n", nrnmpi_myid_world, x); hoc_pushx(x); }else if (i == 2) { // string int size; nrnmpi_int_broadcast(&size, 1, 0); sarg[ns] = new char(size); nrnmpi_char_broadcast(sarg[ns], size, 0); hoc_pushstr(sarg+ns); ns++; }else if (i == 3) { // Vector int n; nrnmpi_int_broadcast(&n, 1, 0); Vect* vec = new Vect(n); nrnmpi_dbl_broadcast(vec->vec(), n, 0); hoc_pushobj(vec->temp_objvar()); }else{ // PythonObject int n; nrnmpi_int_broadcast(&n, 1, 0); char* s; s = new char[n]; nrnmpi_char_broadcast(s, n, 0); Object* po = nrnpy_pickle2po(s, size_t(n)); delete [] s; hoc_pushobj(hoc_temp_objptr(po)); } } if (style == 3) { size_t size; char* rs = (*nrnpy_callpicklef)(s, size_t(npickle), narg, &size); assert(rs); delete [] rs; }else{ //printf("%d subworld hoc call %s narg=%d\n", nrnmpi_myid_world, fname->name, narg); hoc_call_objfunc(fname, narg, ob); //printf("%d subworld return from hoc call %s\n", nrnmpi_myid_world, fname->name); } delete [] s; for (i=0; i < ns; ++i) { delete [] sarg[i]; } } neuron-7.5/src/parallel/test0.hoc000077500000000000000000000001661323325274500170240ustar00rootroot00000000000000objref pc pc = new ParallelContext() {printf("I am %d of %d\n", pc.id, pc.nhost)} {pc.runworker()} {pc.done()} quit() neuron-7.5/src/parallel/test0.py000077500000000000000000000002411323325274500166750ustar00rootroot00000000000000from neuron import h pc = h.ParallelContext() id = int(pc.id()) nhost = int(pc.nhost()) print ('I am %d of %d'%(id, nhost)) pc.runworker() pc.done() h.quit() neuron-7.5/src/parallel/test1.hoc000077500000000000000000000005601323325274500170230ustar00rootroot00000000000000 func f() {local x, i x = $1*$1 for i=1,100000 hoc_cross_x_ = i printf("%g = f(%g)\n", x, $1) return x } objref pc pc = new ParallelContext() pc.runworker() for i=1,10 { pc.submit("f", i) } x = 0 while (pc.working()) { x += pc.retval printf("f(%d)=%g x=%g\n", pc.upkscalar, pc.retval, x) if (i < 20) { pc.submit("f", i) i += 1 } } pc.done() quit() neuron-7.5/src/parallel/test2.hoc000077500000000000000000000007711323325274500170300ustar00rootroot00000000000000objref pc pc = new ParallelContext() objref vec vec = new Vector(1000) index=0 proc do() {local i, x pc.take("task", &index, vec) print "index=", index for i=1,100000 hoc_cross_x_ = i pc.post("done", index, vec.add(vec)) } strdef s s = "do()\n" proc submit() { vec.fill($1) pc.post("task", $1, vec) pc.submit(s) } pc.runworker() for i=1,10 { submit(i) } while (pc.working()) { pc.take("done", &index, vec) print index, vec.sum if (i < 100) { submit(i) i += 1 } } pc.done() quit() neuron-7.5/src/parallel/test3.hoc000077500000000000000000000005071323325274500170260ustar00rootroot00000000000000load_file("stdgui.hoc") create soma access soma insert hh dt=.001 objref pc pc = new ParallelContext() objref vec index=0 strdef s s = "run()\n" proc submit() { pc.submit(s) } pc.runworker() for i=1,10 { submit(i) } while (pc.working()) { print pc.retval if (i < 100) { submit(i) i += 1 } } pc.done() quit() neuron-7.5/src/parallel/test4.hoc000077500000000000000000000015161323325274500170300ustar00rootroot00000000000000strdef s objref vec objref pc pc = new ParallelContext() proc plook() {local x if (pc.look("plook")) { printf ("plook found %g , %s\n", pc.upkscalar, pc.upkstr(s)) pc.upkvec.printf } } pc.runworker() vec = new Vector(10) vec.indgen pc.post("test1", "this is test1", 10, vec) pc.post("test2", "this is a test2", 20, vec.fill(20)) pc.post("test3", "this is a test3", 30, vec.fill(30)) pc.post("test4", "this is a test4", 40, vec.fill(40)) pc.post("5test", "this is a 5test", 50, vec.fill(50)) proc p() { pc.take($s1) print pc.upkstr(s) print pc.upkscalar pc.upkvec.printf } p("test1") p("5test") p("test3") p("test2") p("test4") pc.post("plook", 25, "another test", vec) print "nhost=", pc.nhost for i=1,100000 hoc_ac_ = i // waste some time for i=1, pc.nhost { pc.submit("plook()\n") } while (pc.working()) {} pc.done() quit() neuron-7.5/src/parallel/test5.hoc000077500000000000000000000010721323325274500170260ustar00rootroot00000000000000func f() {local x, i x = $1*$1 for i=1,100000 hoc_cross_x_ = i printf("%g = f(%g, \"%s\", %s)\n", x, $1, $s2, $o3) $o3.add(1).printf return x } objref pc pc = new ParallelContext() pc.runworker() objref vec strdef s vec = new Vector(4) for i=1,10 { pc.submit("f", i, "hello", vec.fill(10*i)) } x = 0 while (pc.working()) { x += pc.retval printf("userid=%d retval=%g x=%g args: %g %s\n", \ pc.userid, pc.retval, x, pc.upkscalar, pc.upkstr(s)) pc.upkvec.printf if (i < 20) { pc.submit("f", i, "goodbye", vec.fill(10*i)) i += 1 } } pc.done() quit() neuron-7.5/src/parallel/test6.hoc000077500000000000000000000013341323325274500170300ustar00rootroot00000000000000begintemplate Test public f objref this func f() {local x, i, id id = hoc_ac_ x = $1*$1 for i=1,100000 hoc_cross_x_ = i printf("id=%d %s: %g = f(%g, \"%s\", %s)\n", id, this, x, $1, $s2, $o3) $o3.printf return x } endtemplate Test objref test[3] for i=0,2 test[i] = new Test() // better be exactly the same on all machines objref pc pc = new ParallelContext() pc.runworker() objref vec strdef s vec = new Vector(4) for i=1,10 { pc.submit(test[i%3], "f", i, "hello", vec.fill(10*i)) } x = 0 while ((id = pc.working()) != 0) { x += pc.retval printf("id=%d i=%d retval=%g x=%g\n", id, pc.upkscalar, pc.retval, x) if (i < 20) { pc.submit(test[i%3], "f", i, "goodbye", vec.fill(10*i)) i += 1 } } pc.done() quit() neuron-7.5/src/parallel/test7.hoc000077500000000000000000000016761323325274500170420ustar00rootroot00000000000000objref pc pc = new ParallelContext() objref vec strdef str context = 1 vec = new Vector(5) str = "starting" proc save_context() { context += 1 pc.look_take("context") pc.post("context", context, str, vec) } proc restore_context() { printf("oldcontext: %g %s %s\n", context, str, vec) vec.printf pc.look($s1, &context, str, vec) printf("newcontext: %g %s %s\n", context, str, vec) vec.printf pc.post("restore done") } pc.post("hello") pc.runworker for i=0, pc.nhost-1 { pc.take("hello") } vec.fill(1) str = "middle" save_context() pc.context("restore_context", "context") for i=1, pc.nhost-1 { pc.take("restore done") } vec.fill(2) str = "end" save_context() pc.context("restore_context", "context") for i=1, pc.nhost-1 { pc.take("restore done") } for j=1,50 { vec.fill(j) sprint(str, "test with j=%d", j) save_context() pc.context("restore_context", "context") for i=1, pc.nhost-1 { pc.take("restore done") } } pc.done quit() neuron-7.5/src/readline/000077500000000000000000000000001323325274500152535ustar00rootroot00000000000000neuron-7.5/src/readline/Makefile.am000077500000000000000000000003341323325274500173120ustar00rootroot00000000000000## The library that we make: lib_LTLIBRARIES = libreadline.la libreadline_la_SOURCES = readline.c history.c funmap.c keymaps.c noinst_HEADERS = chardefs.h emacs_keymap.h history.h keymaps.h \ readline.h vi_keymap.h neuron-7.5/src/readline/Makefile.in000066400000000000000000000600221323325274500173200ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/readline ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libreadline_la_LIBADD = am_libreadline_la_OBJECTS = readline.lo history.lo funmap.lo \ keymaps.lo libreadline_la_OBJECTS = $(am_libreadline_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libreadline_la_SOURCES) DIST_SOURCES = $(libreadline_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libreadline.la libreadline_la_SOURCES = readline.c history.c funmap.c keymaps.c noinst_HEADERS = chardefs.h emacs_keymap.h history.h keymaps.h \ readline.h vi_keymap.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/readline/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/readline/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libreadline.la: $(libreadline_la_OBJECTS) $(libreadline_la_DEPENDENCIES) $(EXTRA_libreadline_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libreadline_la_OBJECTS) $(libreadline_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keymaps.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readline.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/readline/chardefs.h000077500000000000000000000026321323325274500172110ustar00rootroot00000000000000/* chardefs.h -- Character definitions for readline. */ #ifndef _CHARDEFS_ #ifndef savestring #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifdef CTRL #undef CTRL #endif /* Some character stuff. */ #define control_character_threshold 0x020 /* smaller than this is control */ #define meta_character_threshold 0x07f /* larger than this is Meta. */ #define control_character_bit 0x40 /* 0x000000, must be off. */ #define meta_character_bit 0x080 /* x0000000, must be on. */ #define CTRL(c) ((c) & (~control_character_bit)) #define META(c) ((c) | meta_character_bit) #define UNMETA(c) ((c) & (~meta_character_bit)) #define UNCTRL(c) to_upper(((c)|control_character_bit)) #define lowercase_p(c) (((c) > ('a' - 1) && (c) < ('z' + 1))) #define uppercase_p(c) (((c) > ('A' - 1) && (c) < ('Z' + 1))) #define pure_alphabetic(c) (lowercase_p(c) || uppercase_p(c)) #ifndef to_upper #define to_upper(c) (lowercase_p(c) ? ((c) - 32) : (c)) #define to_lower(c) (uppercase_p(c) ? ((c) + 32) : (c)) #endif #define CTRL_P(c) ((c) < control_character_threshold) #define META_P(c) ((c) > meta_character_threshold) #define NEWLINE '\n' #define RETURN CTRL('M') #define RUBOUT 0x07f #define TAB '\t' #define ABORT_CHAR CTRL('G') #define PAGE CTRL('L') #define SPACE 0x020 #define ESC CTRL('[') #endif /* _CHARDEFS_ */ neuron-7.5/src/readline/emacs_keymap.h000077500000000000000000000441211323325274500200670ustar00rootroot00000000000000/* emacs_keymap.c -- the keymap for emacs_mode in readline (). */ /* Copyright (C) 1988,1989 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef BUFSIZ #include #endif /* BUFSIZ */ #include "readline.h" /* An array of function pointers, one for each possible key. If the type byte is ISKMAP, then the pointer is the address of a keymap. */ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { /* Control keys. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, rl_beg_of_line }, /* Control-a */ { ISFUNC, rl_backward }, /* Control-b */ { ISFUNC, (Function *)0x0 }, /* Control-c */ { ISFUNC, rl_delete }, /* Control-d */ { ISFUNC, rl_end_of_line }, /* Control-e */ { ISFUNC, rl_forward }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ { ISFUNC, rl_complete }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, rl_clear_screen }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_get_next_history }, /* Control-n */ { ISFUNC, (Function *)0x0 }, /* Control-o */ { ISFUNC, rl_get_previous_history }, /* Control-p */ { ISFUNC, rl_quoted_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISKMAP, (Function *)emacs_ctlx_keymap }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, (Function *)0x0 }, /* Control-z */ { ISKMAP, (Function *)emacs_meta_keymap }, /* Control-[ */ { ISFUNC, (Function *)0x0 }, /* Control-\ */ { ISFUNC, (Function *)0x0 }, /* Control-] */ { ISFUNC, (Function *)0x0 }, /* Control-^ */ { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_insert }, /* SPACE */ { ISFUNC, rl_insert }, /* ! */ { ISFUNC, rl_insert }, /* " */ { ISFUNC, rl_insert }, /* # */ { ISFUNC, rl_insert }, /* $ */ { ISFUNC, rl_insert }, /* % */ { ISFUNC, rl_insert }, /* & */ { ISFUNC, rl_insert }, /* ' */ { ISFUNC, rl_insert }, /* ( */ { ISFUNC, rl_insert }, /* ) */ { ISFUNC, rl_insert }, /* * */ { ISFUNC, rl_insert }, /* + */ { ISFUNC, rl_insert }, /* , */ { ISFUNC, rl_insert }, /* - */ { ISFUNC, rl_insert }, /* . */ { ISFUNC, rl_insert }, /* / */ /* Regular digits. */ { ISFUNC, rl_insert }, /* 0 */ { ISFUNC, rl_insert }, /* 1 */ { ISFUNC, rl_insert }, /* 2 */ { ISFUNC, rl_insert }, /* 3 */ { ISFUNC, rl_insert }, /* 4 */ { ISFUNC, rl_insert }, /* 5 */ { ISFUNC, rl_insert }, /* 6 */ { ISFUNC, rl_insert }, /* 7 */ { ISFUNC, rl_insert }, /* 8 */ { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ { ISFUNC, rl_insert }, /* : */ { ISFUNC, rl_insert }, /* ; */ { ISFUNC, rl_insert }, /* < */ { ISFUNC, rl_insert }, /* = */ { ISFUNC, rl_insert }, /* > */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_insert }, /* A */ { ISFUNC, rl_insert }, /* B */ { ISFUNC, rl_insert }, /* C */ { ISFUNC, rl_insert }, /* D */ { ISFUNC, rl_insert }, /* E */ { ISFUNC, rl_insert }, /* F */ { ISFUNC, rl_insert }, /* G */ { ISFUNC, rl_insert }, /* H */ { ISFUNC, rl_insert }, /* I */ { ISFUNC, rl_insert }, /* J */ { ISFUNC, rl_insert }, /* K */ { ISFUNC, rl_insert }, /* L */ { ISFUNC, rl_insert }, /* M */ { ISFUNC, rl_insert }, /* N */ { ISFUNC, rl_insert }, /* O */ { ISFUNC, rl_insert }, /* P */ { ISFUNC, rl_insert }, /* Q */ { ISFUNC, rl_insert }, /* R */ { ISFUNC, rl_insert }, /* S */ { ISFUNC, rl_insert }, /* T */ { ISFUNC, rl_insert }, /* U */ { ISFUNC, rl_insert }, /* V */ { ISFUNC, rl_insert }, /* W */ { ISFUNC, rl_insert }, /* X */ { ISFUNC, rl_insert }, /* Y */ { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ { ISFUNC, rl_insert }, /* [ */ { ISFUNC, rl_insert }, /* \ */ { ISFUNC, rl_insert }, /* ] */ { ISFUNC, rl_insert }, /* ^ */ { ISFUNC, rl_insert }, /* _ */ { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_insert }, /* a */ { ISFUNC, rl_insert }, /* b */ { ISFUNC, rl_insert }, /* c */ { ISFUNC, rl_insert }, /* d */ { ISFUNC, rl_insert }, /* e */ { ISFUNC, rl_insert }, /* f */ { ISFUNC, rl_insert }, /* g */ { ISFUNC, rl_insert }, /* h */ { ISFUNC, rl_insert }, /* i */ { ISFUNC, rl_insert }, /* j */ { ISFUNC, rl_insert }, /* k */ { ISFUNC, rl_insert }, /* l */ { ISFUNC, rl_insert }, /* m */ { ISFUNC, rl_insert }, /* n */ { ISFUNC, rl_insert }, /* o */ { ISFUNC, rl_insert }, /* p */ { ISFUNC, rl_insert }, /* q */ { ISFUNC, rl_insert }, /* r */ { ISFUNC, rl_insert }, /* s */ { ISFUNC, rl_insert }, /* t */ { ISFUNC, rl_insert }, /* u */ { ISFUNC, rl_insert }, /* v */ { ISFUNC, rl_insert }, /* w */ { ISFUNC, rl_insert }, /* x */ { ISFUNC, rl_insert }, /* y */ { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ { ISFUNC, rl_insert }, /* { */ { ISFUNC, rl_insert }, /* | */ { ISFUNC, rl_insert }, /* } */ { ISFUNC, rl_insert }, /* ~ */ { ISFUNC, rl_rubout } /* RUBOUT */ }; KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { /* Meta keys. Just like above, but the high bit is set. */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-@ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-a */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-b */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-c */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-d */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-e */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-f */ { ISFUNC, rl_abort }, /* Meta-Control-g */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-h */ { ISFUNC, rl_tab_insert }, /* Meta-Control-i */ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-k */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-l */ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-n */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-o */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-p */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-q */ { ISFUNC, rl_revert_line }, /* Meta-Control-r */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-s */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-t */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-u */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-v */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-w */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-x */ { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-z */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-[ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-\ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-] */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-^ */ { ISFUNC, (Function *)0x0 }, /* Meta-Control-_ */ /* The start of printing characters. */ { ISFUNC, (Function *)0x0 }, /* Meta-SPACE */ { ISFUNC, (Function *)0x0 }, /* Meta-! */ { ISFUNC, (Function *)0x0 }, /* Meta-" */ { ISFUNC, (Function *)0x0 }, /* Meta-# */ { ISFUNC, (Function *)0x0 }, /* Meta-$ */ { ISFUNC, (Function *)0x0 }, /* Meta-% */ { ISFUNC, (Function *)0x0 }, /* Meta-& */ { ISFUNC, (Function *)0x0 }, /* Meta-' */ { ISFUNC, (Function *)0x0 }, /* Meta-( */ { ISFUNC, (Function *)0x0 }, /* Meta-) */ { ISFUNC, (Function *)0x0 }, /* Meta-* */ { ISFUNC, (Function *)0x0 }, /* Meta-+ */ { ISFUNC, (Function *)0x0 }, /* Meta-, */ { ISFUNC, rl_digit_argument }, /* Meta-- */ { ISFUNC, (Function *)0x0 }, /* Meta-. */ { ISFUNC, (Function *)0x0 }, /* Meta-/ */ /* Regular digits. */ { ISFUNC, rl_digit_argument }, /* Meta-0 */ { ISFUNC, rl_digit_argument }, /* Meta-1 */ { ISFUNC, rl_digit_argument }, /* Meta-2 */ { ISFUNC, rl_digit_argument }, /* Meta-3 */ { ISFUNC, rl_digit_argument }, /* Meta-4 */ { ISFUNC, rl_digit_argument }, /* Meta-5 */ { ISFUNC, rl_digit_argument }, /* Meta-6 */ { ISFUNC, rl_digit_argument }, /* Meta-7 */ { ISFUNC, rl_digit_argument }, /* Meta-8 */ { ISFUNC, rl_digit_argument }, /* Meta-9 */ /* A little more punctuation. */ { ISFUNC, (Function *)0x0 }, /* Meta-: */ { ISFUNC, (Function *)0x0 }, /* Meta-; */ { ISFUNC, rl_beginning_of_history }, /* Meta-< */ { ISFUNC, (Function *)0x0 }, /* Meta-= */ { ISFUNC, rl_end_of_history }, /* Meta-> */ { ISFUNC, rl_possible_completions }, /* Meta-? */ { ISFUNC, (Function *)0x0 }, /* Meta-@ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* Meta-A */ { ISFUNC, rl_do_lowercase_version }, /* Meta-B */ { ISFUNC, rl_do_lowercase_version }, /* Meta-C */ { ISFUNC, rl_do_lowercase_version }, /* Meta-D */ { ISFUNC, rl_do_lowercase_version }, /* Meta-E */ { ISFUNC, rl_do_lowercase_version }, /* Meta-F */ { ISFUNC, rl_do_lowercase_version }, /* Meta-G */ { ISFUNC, rl_do_lowercase_version }, /* Meta-H */ { ISFUNC, rl_do_lowercase_version }, /* Meta-I */ { ISFUNC, rl_do_lowercase_version }, /* Meta-J */ { ISFUNC, rl_do_lowercase_version }, /* Meta-K */ { ISFUNC, rl_do_lowercase_version }, /* Meta-L */ { ISFUNC, rl_do_lowercase_version }, /* Meta-M */ { ISFUNC, rl_do_lowercase_version }, /* Meta-N */ { ISFUNC, rl_do_lowercase_version }, /* Meta-O */ { ISFUNC, rl_do_lowercase_version }, /* Meta-P */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Q */ { ISFUNC, rl_do_lowercase_version }, /* Meta-R */ { ISFUNC, rl_do_lowercase_version }, /* Meta-S */ { ISFUNC, rl_do_lowercase_version }, /* Meta-T */ { ISFUNC, rl_do_lowercase_version }, /* Meta-U */ { ISFUNC, rl_do_lowercase_version }, /* Meta-V */ { ISFUNC, rl_do_lowercase_version }, /* Meta-W */ { ISFUNC, rl_do_lowercase_version }, /* Meta-X */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Y */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Z */ /* Some more punctuation. */ { ISFUNC, rl_arrow_keys }, /* Meta-[ */ { ISFUNC, (Function *)0x0 }, /* Meta-\ */ { ISFUNC, (Function *)0x0 }, /* Meta-] */ { ISFUNC, (Function *)0x0 }, /* Meta-^ */ { ISFUNC, (Function *)0x0 }, /* Meta-_ */ { ISFUNC, (Function *)0x0 }, /* Meta-` */ /* Lowercase alphabet. */ { ISFUNC, (Function *)0x0 }, /* Meta-a */ { ISFUNC, rl_backward_word }, /* Meta-b */ { ISFUNC, rl_capitalize_word }, /* Meta-c */ { ISFUNC, rl_kill_word }, /* Meta-d */ { ISFUNC, (Function *)0x0 }, /* Meta-e */ { ISFUNC, rl_forward_word }, /* Meta-f */ { ISFUNC, (Function *)0x0 }, /* Meta-g */ { ISFUNC, (Function *)0x0 }, /* Meta-h */ { ISFUNC, (Function *)0x0 }, /* Meta-i */ { ISFUNC, (Function *)0x0 }, /* Meta-j */ { ISFUNC, (Function *)0x0 }, /* Meta-k */ { ISFUNC, rl_downcase_word }, /* Meta-l */ { ISFUNC, (Function *)0x0 }, /* Meta-m */ { ISFUNC, (Function *)0x0 }, /* Meta-n */ { ISFUNC, rl_arrow_keys }, /* Meta-o */ { ISFUNC, (Function *)0x0 }, /* Meta-p */ { ISFUNC, (Function *)0x0 }, /* Meta-q */ { ISFUNC, rl_revert_line }, /* Meta-r */ { ISFUNC, (Function *)0x0 }, /* Meta-s */ { ISFUNC, rl_transpose_words }, /* Meta-t */ { ISFUNC, rl_upcase_word }, /* Meta-u */ { ISFUNC, (Function *)0x0 }, /* Meta-v */ { ISFUNC, (Function *)0x0 }, /* Meta-w */ { ISFUNC, (Function *)0x0 }, /* Meta-x */ { ISFUNC, rl_yank_pop }, /* Meta-y */ { ISFUNC, (Function *)0x0 }, /* Meta-z */ /* Final punctuation. */ { ISFUNC, (Function *)0x0 }, /* Meta-{ */ { ISFUNC, (Function *)0x0 }, /* Meta-| */ { ISFUNC, (Function *)0x0 }, /* Meta-} */ { ISFUNC, (Function *)0x0 }, /* Meta-~ */ { ISFUNC, rl_backward_kill_word } /* Meta-rubout */ }; KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = { /* Control keys. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, (Function *)0x0 }, /* Control-a */ { ISFUNC, (Function *)0x0 }, /* Control-b */ { ISFUNC, (Function *)0x0 }, /* Control-c */ { ISFUNC, (Function *)0x0 }, /* Control-d */ { ISFUNC, (Function *)0x0 }, /* Control-e */ { ISFUNC, (Function *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, (Function *)0x0 }, /* Control-h */ { ISFUNC, (Function *)0x0 }, /* Control-i */ { ISFUNC, (Function *)0x0 }, /* Control-j */ { ISFUNC, (Function *)0x0 }, /* Control-k */ { ISFUNC, (Function *)0x0 }, /* Control-l */ { ISFUNC, (Function *)0x0 }, /* Control-m */ { ISFUNC, (Function *)0x0 }, /* Control-n */ { ISFUNC, (Function *)0x0 }, /* Control-o */ { ISFUNC, (Function *)0x0 }, /* Control-p */ { ISFUNC, (Function *)0x0 }, /* Control-q */ { ISFUNC, rl_re_read_init_file }, /* Control-r */ { ISFUNC, (Function *)0x0 }, /* Control-s */ { ISFUNC, (Function *)0x0 }, /* Control-t */ { ISFUNC, rl_undo_command }, /* Control-u */ { ISFUNC, (Function *)0x0 }, /* Control-v */ { ISFUNC, (Function *)0x0 }, /* Control-w */ { ISFUNC, (Function *)0x0 }, /* Control-x */ { ISFUNC, (Function *)0x0 }, /* Control-y */ { ISFUNC, (Function *)0x0 }, /* Control-z */ { ISFUNC, (Function *)0x0 }, /* Control-[ */ { ISFUNC, (Function *)0x0 }, /* Control-\ */ { ISFUNC, (Function *)0x0 }, /* Control-] */ { ISFUNC, (Function *)0x0 }, /* Control-^ */ { ISFUNC, (Function *)0x0 }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, (Function *)0x0 }, /* SPACE */ { ISFUNC, (Function *)0x0 }, /* ! */ { ISFUNC, (Function *)0x0 }, /* " */ { ISFUNC, (Function *)0x0 }, /* # */ { ISFUNC, (Function *)0x0 }, /* $ */ { ISFUNC, (Function *)0x0 }, /* % */ { ISFUNC, (Function *)0x0 }, /* & */ { ISFUNC, (Function *)0x0 }, /* ' */ { ISFUNC, rl_start_kbd_macro }, /* ( */ { ISFUNC, rl_end_kbd_macro }, /* ) */ { ISFUNC, (Function *)0x0 }, /* * */ { ISFUNC, (Function *)0x0 }, /* + */ { ISFUNC, (Function *)0x0 }, /* , */ { ISFUNC, (Function *)0x0 }, /* - */ { ISFUNC, (Function *)0x0 }, /* . */ { ISFUNC, (Function *)0x0 }, /* / */ /* Regular digits. */ { ISFUNC, (Function *)0x0 }, /* 0 */ { ISFUNC, (Function *)0x0 }, /* 1 */ { ISFUNC, (Function *)0x0 }, /* 2 */ { ISFUNC, (Function *)0x0 }, /* 3 */ { ISFUNC, (Function *)0x0 }, /* 4 */ { ISFUNC, (Function *)0x0 }, /* 5 */ { ISFUNC, (Function *)0x0 }, /* 6 */ { ISFUNC, (Function *)0x0 }, /* 7 */ { ISFUNC, (Function *)0x0 }, /* 8 */ { ISFUNC, (Function *)0x0 }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (Function *)0x0 }, /* : */ { ISFUNC, (Function *)0x0 }, /* ; */ { ISFUNC, (Function *)0x0 }, /* < */ { ISFUNC, (Function *)0x0 }, /* = */ { ISFUNC, (Function *)0x0 }, /* > */ { ISFUNC, (Function *)0x0 }, /* ? */ { ISFUNC, (Function *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* A */ { ISFUNC, rl_do_lowercase_version }, /* B */ { ISFUNC, rl_do_lowercase_version }, /* C */ { ISFUNC, rl_do_lowercase_version }, /* D */ { ISFUNC, rl_do_lowercase_version }, /* E */ { ISFUNC, rl_do_lowercase_version }, /* F */ { ISFUNC, rl_do_lowercase_version }, /* G */ { ISFUNC, rl_do_lowercase_version }, /* H */ { ISFUNC, rl_do_lowercase_version }, /* I */ { ISFUNC, rl_do_lowercase_version }, /* J */ { ISFUNC, rl_do_lowercase_version }, /* K */ { ISFUNC, rl_do_lowercase_version }, /* L */ { ISFUNC, rl_do_lowercase_version }, /* M */ { ISFUNC, rl_do_lowercase_version }, /* N */ { ISFUNC, rl_do_lowercase_version }, /* O */ { ISFUNC, rl_do_lowercase_version }, /* P */ { ISFUNC, rl_do_lowercase_version }, /* Q */ { ISFUNC, rl_do_lowercase_version }, /* R */ { ISFUNC, rl_do_lowercase_version }, /* S */ { ISFUNC, rl_do_lowercase_version }, /* T */ { ISFUNC, rl_do_lowercase_version }, /* U */ { ISFUNC, rl_do_lowercase_version }, /* V */ { ISFUNC, rl_do_lowercase_version }, /* W */ { ISFUNC, rl_do_lowercase_version }, /* X */ { ISFUNC, rl_do_lowercase_version }, /* Y */ { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ { ISFUNC, (Function *)0x0 }, /* [ */ { ISFUNC, (Function *)0x0 }, /* \ */ { ISFUNC, (Function *)0x0 }, /* ] */ { ISFUNC, (Function *)0x0 }, /* ^ */ { ISFUNC, (Function *)0x0 }, /* _ */ { ISFUNC, (Function *)0x0 }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, (Function *)0x0 }, /* a */ { ISFUNC, (Function *)0x0 }, /* b */ { ISFUNC, (Function *)0x0 }, /* c */ { ISFUNC, (Function *)0x0 }, /* d */ { ISFUNC, rl_call_last_kbd_macro }, /* e */ { ISFUNC, (Function *)0x0 }, /* f */ { ISFUNC, (Function *)0x0 }, /* g */ { ISFUNC, (Function *)0x0 }, /* h */ { ISFUNC, (Function *)0x0 }, /* i */ { ISFUNC, (Function *)0x0 }, /* j */ { ISFUNC, (Function *)0x0 }, /* k */ { ISFUNC, (Function *)0x0 }, /* l */ { ISFUNC, (Function *)0x0 }, /* m */ { ISFUNC, (Function *)0x0 }, /* n */ { ISFUNC, (Function *)0x0 }, /* o */ { ISFUNC, (Function *)0x0 }, /* p */ { ISFUNC, (Function *)0x0 }, /* q */ { ISFUNC, (Function *)0x0 }, /* r */ { ISFUNC, (Function *)0x0 }, /* s */ { ISFUNC, (Function *)0x0 }, /* t */ { ISFUNC, (Function *)0x0 }, /* u */ { ISFUNC, (Function *)0x0 }, /* v */ { ISFUNC, (Function *)0x0 }, /* w */ { ISFUNC, (Function *)0x0 }, /* x */ { ISFUNC, (Function *)0x0 }, /* y */ { ISFUNC, (Function *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (Function *)0x0 }, /* { */ { ISFUNC, (Function *)0x0 }, /* | */ { ISFUNC, (Function *)0x0 }, /* } */ { ISFUNC, (Function *)0x0 }, /* ~ */ { ISFUNC, rl_backward_kill_line } /* RUBOUT */ }; neuron-7.5/src/readline/funmap.c000077500000000000000000000147471323325274500167250ustar00rootroot00000000000000#include <../../nrnconf.h> /* funmap.c -- attach names to functions. */ /* Copyright (C) 1988,1989 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #if __STDC__ #include #endif #define STATIC_MALLOC #ifndef STATIC_MALLOC extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif #ifndef BUFSIZ #include #endif /* BUFSIZ */ #include "readline.h" FUNMAP **funmap = (FUNMAP **)NULL; static int funmap_size = 0; static int funmap_entry = 0; static FUNMAP default_funmap[] = { { "arrow-key-prefix", rl_arrow_keys }, { "redraw-current-line", rl_refresh_line}, { "beginning-of-line", rl_beg_of_line }, { "backward-char", rl_backward }, { "delete-char", rl_delete }, { "end-of-line", rl_end_of_line }, { "forward-char", rl_forward }, { "accept-line", rl_newline }, { "kill-line", rl_kill_line }, { "clear-screen", rl_clear_screen }, { "next-history", rl_get_next_history }, { "previous-history", rl_get_previous_history }, { "quoted-insert", rl_quoted_insert }, { "reverse-search-history", rl_reverse_search_history }, { "forward-search-history", rl_forward_search_history }, { "transpose-chars", rl_transpose_chars }, { "unix-line-discard", rl_unix_line_discard }, { "unix-word-rubout", rl_unix_word_rubout }, { "yank", rl_yank }, { "yank-pop", rl_yank_pop }, { "yank-nth-arg", rl_yank_nth_arg }, { "backward-delete-char", rl_rubout }, { "backward-word", rl_backward_word }, { "kill-word", rl_kill_word }, { "forward-word", rl_forward_word }, { "tab-insert", rl_tab_insert }, { "backward-kill-word", rl_backward_kill_word }, { "backward-kill-line", rl_backward_kill_line }, { "transpose-words", rl_transpose_words }, { "digit-argument", rl_digit_argument }, { "complete", rl_complete }, { "possible-completions", rl_possible_completions }, { "do-lowercase-version", rl_do_lowercase_version }, { "digit-argument", rl_digit_argument }, { "universal-argument", rl_universal_argument }, { "abort", rl_abort }, { "undo", rl_undo_command }, { "upcase-word", rl_upcase_word }, { "downcase-word", rl_downcase_word }, { "capitalize-word", rl_capitalize_word }, { "revert-line", rl_revert_line }, { "beginning-of-history", rl_beginning_of_history }, { "end-of-history", rl_end_of_history }, { "self-insert", rl_insert }, { "start-kbd-macro", rl_start_kbd_macro }, { "end-kbd-macro", rl_end_kbd_macro }, { "re-read-init-file", rl_re_read_init_file }, #ifdef VI_MODE { "vi-movement-mode", rl_vi_movement_mode }, { "vi-insertion-mode", rl_vi_insertion_mode }, { "vi-arg-digit", rl_vi_arg_digit }, { "vi-prev-word", rl_vi_prev_word }, { "vi-next-word", rl_vi_next_word }, { "vi-char-search", rl_vi_char_search }, { "vi-editing-mode", rl_vi_editing_mode }, { "vi-eof-maybe", rl_vi_eof_maybe }, { "vi-append-mode", rl_vi_append_mode }, { "vi-put", rl_vi_put }, { "vi-append-eol", rl_vi_append_eol }, { "vi-insert-beg", rl_vi_insert_beg }, { "vi-delete", rl_vi_delete }, { "vi-comment", rl_vi_comment }, { "vi-first-print", rl_vi_first_print }, { "vi-fword", rl_vi_fword }, { "vi-fWord", rl_vi_fWord }, { "vi-bword", rl_vi_bword }, { "vi-bWord", rl_vi_bWord }, { "vi-eword", rl_vi_eword }, { "vi-eWord", rl_vi_eWord }, { "vi-end-word", rl_vi_end_word }, { "vi-change-case", rl_vi_change_case }, { "vi-match", rl_vi_match }, { "vi-bracktype", rl_vi_bracktype }, { "vi-change-char", rl_vi_change_char }, { "vi-yank-arg", rl_vi_yank_arg }, { "vi-search", rl_vi_search }, { "vi-search-again", rl_vi_search_again }, { "vi-dosearch", rl_vi_dosearch }, { "vi-subst", rl_vi_subst }, { "vi-overstrike", rl_vi_overstrike }, { "vi-overstrike-delete", rl_vi_overstrike_delete }, { "vi-replace, ", rl_vi_replace }, { "vi-column", rl_vi_column }, { "vi-delete-to", rl_vi_delete_to }, { "vi-change-to", rl_vi_change_to }, { "vi-yank-to", rl_vi_yank_to }, { "vi-complete", rl_vi_complete }, #endif /* VI_MODE */ {(char *)NULL, (Function *)NULL } }; rl_add_funmap_entry (name, function) char *name; Function *function; { if (funmap_entry + 2 >= funmap_size) if (!funmap) funmap = (FUNMAP **)xmalloc ((funmap_size = 80) * sizeof (FUNMAP *)); else funmap = (FUNMAP **)xrealloc ((char*)funmap, (funmap_size += 80) * sizeof (FUNMAP *)); funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP)); funmap[funmap_entry]->name = name; funmap[funmap_entry]->function = function; funmap[++funmap_entry] = (FUNMAP *)NULL; } static int funmap_initialized = 0; /* Make the funmap contain all of the default entries. */ void rl_initialize_funmap () { register int i; if (funmap_initialized) return; for (i = 0; default_funmap[i].name; i++) rl_add_funmap_entry (default_funmap[i].name, default_funmap[i].function); funmap_initialized = 1; } /* Things that mean `Control'. */ char *possible_control_prefixes[] = { "Control-", "C-", "CTRL-", (char *)NULL }; char *possible_meta_prefixes[] = { "Meta", "M-", (char *)NULL }; #ifdef STATIC_MALLOC /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "history: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ neuron-7.5/src/readline/history.c000077500000000000000000001162701323325274500171320ustar00rootroot00000000000000#include <../../nrnconf.h> /* History.c -- standalone history library */ /* Copyright (C) 1989 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of routines for managing the text of previously typed lines. The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions you can call. I think I have done that. */ #if SYSV #define rindex strrchr #define index strchr #endif #if __STDC__ #include #if HAVE_MALLOC_H #include #endif #include #endif /* Remove these declarations when we have a complete libgnu.a. */ #define STATIC_MALLOC #ifndef STATIC_MALLOC extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif #include #include #include #include #include #include #ifdef HAVE_ALLOCA #ifdef HAVE_ALLOCA_H #include #endif #define NO_ALLOCA 0 #define Alloca alloca #else #define NO_ALLOCA 1 #define Alloca malloc #endif #include "history.h" #ifndef savestring #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifndef digit #define digit(c) ((c) >= '0' && (c) <= '9') #endif #ifndef member #define member(c, s) ((c) ? index ((s), (c)) : 0) #endif /* **************************************************************** */ /* */ /* History Functions */ /* */ /* **************************************************************** */ /* An array of HIST_ENTRY. This is where we store the history. */ static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL; /* Non-zero means that we have enforced a limit on the amount of history that we save. */ int history_stifled = 0; /* If HISTORY_STIFLED is non-zero, then this is the maximum number of entries to remember. */ int max_input_history; /* The current location of the interactive history pointer. Just makes life easier for outside callers. */ static int history_offset = 0; /* The number of strings currently stored in the input_history list. */ int history_length = 0; /* The current number of slots allocated to the input_history. */ static int history_size = 0; /* The number of slots to increase the_history by. */ #define DEFAULT_HISTORY_GROW_SIZE 50 /* The character that represents the start of a history expansion request. This is usually `!'. */ char history_expansion_char = '!'; /* The character that invokes word substitution if found at the start of a line. This is usually `^'. */ char history_subst_char = '^'; /* During tokenization, if this character is seen as the first character of a word, then it, and all subsequent characters upto a newline are ignored. For a Bourne shell, this should be '#'. Bash special cases the interactive comment character to not be a comment delimiter. */ char history_comment_char = '\0'; /* The list of characters which inhibit the expansion of text if found immediately following history_expansion_char. */ char *history_no_expand_chars = " \t\n\r="; /* The logical `base' of the history array. It defaults to 1. */ int history_base = 1; /* Begin a session in which the history functions might be used. This initializes interactive variables. */ void using_history () { history_offset = history_length; } /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ int history_total_bytes () { register int i, result; for (i = 0; the_history && the_history[i]; i++) result += strlen (the_history[i]->line); return (result); } /* Place STRING at the end of the history list. The data field is set to NULL. */ void add_history (string) char *string; { HIST_ENTRY *temp; if (history_stifled && (history_length == max_input_history)) { register int i; /* If the history is stifled, and history_length is zero, and it equals max_input_history, we don't save items. */ if (!history_length) return; /* If there is something in the slot, then remove it. */ if (the_history[0]) { free (the_history[0]->line); free (the_history[0]); } for (i = 0; i < history_length; i++) the_history[i] = the_history[i + 1]; history_base++; } else { if (!history_size) { the_history = (HIST_ENTRY **) xmalloc ((history_size = DEFAULT_HISTORY_GROW_SIZE) * sizeof (HIST_ENTRY *)); history_length = 1; } else { if (history_length == (history_size - 1)) { the_history = (HIST_ENTRY **) xrealloc (the_history, ((history_size += DEFAULT_HISTORY_GROW_SIZE) * sizeof (HIST_ENTRY *))); } history_length++; } } temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); temp->line = savestring (string); temp->data = (char *)NULL; the_history[history_length] = (HIST_ENTRY *)NULL; the_history[history_length - 1] = temp; } /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ HIST_ENTRY * replace_history_entry (which, line, data) int which; char *line; char *data; { HIST_ENTRY *temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); HIST_ENTRY *old_value; if (which >= history_length) return ((HIST_ENTRY *)NULL); old_value = the_history[which]; temp->line = savestring (line); temp->data = data; the_history[which] = temp; return (old_value); } /* Returns the magic number which says what history element we are looking at now. In this implementation, it returns history_offset. */ int where_history () { return (history_offset); } /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ int history_search (string, direction) char *string; int direction; { register int i = history_offset; register int reverse = (direction < 0); register char *line; register int index; int string_len = strlen (string); /* Take care of trivial cases first. */ if (!history_length || ((i == history_length) && !reverse)) return (-1); if (reverse && (i == history_length)) i--; while (1) { /* Search each line in the history list for STRING. */ /* At limit for direction? */ if ((reverse && i < 0) || (!reverse && i == history_length)) return (-1); line = the_history[i]->line; index = strlen (line); /* If STRING is longer than line, no match. */ if (string_len > index) goto next_line; /* Do the actual search. */ if (reverse) { index -= string_len; while (index >= 0) { if (strncmp (string, line + index, string_len) == 0) { history_offset = i; return (index); } index--; } } else { register int limit = (string_len - index) + 1; index = 0; while (index < limit) { if (strncmp (string, line + index, string_len) == 0) { history_offset = i; return (index); } index++; } } next_line: if (reverse) i--; else i++; } } /* Remove history element WHICH from the history. The removed element is returned to you so you can free the line, data, and containing structure. */ HIST_ENTRY * remove_history (which) int which; { HIST_ENTRY *return_value; if (which >= history_length || !history_length) return_value = (HIST_ENTRY *)NULL; else { register int i; return_value = the_history[which]; for (i = which; i < history_length; i++) the_history[i] = the_history[i + 1]; history_length--; } return (return_value); } /* Stifle the history list, remembering only MAX number of lines. */ void stifle_history (max) int max; { if (history_length > max) { register int i, j; /* This loses because we cannot free the data. */ for (i = 0; i < (history_length - max); i++) { free (the_history[i]->line); free (the_history[i]); } history_base = i; for (j = 0, i = history_length - max; j < max; i++, j++) the_history[j] = the_history[i]; the_history[j] = (HIST_ENTRY *)NULL; history_length = j; } history_stifled = 1; max_input_history = max; } /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ int unstifle_history () { int result = max_input_history; if (history_stifled) { result = - result; history_stifled = 0; } return (result); } /* Return the string that should be used in the place of this filename. This only matters when you don't specify the filename to read_history (), or write_history (). */ static char * history_filename (filename) char *filename; { char *return_val = filename ? savestring (filename) : (char *)NULL; if (!return_val) { char *home = (char *)getenv ("HOME"); if (!home) home = "."; return_val = (char *)xmalloc (2 + strlen (home) + strlen (".history")); sprintf (return_val, "%s/.history", home); } return (return_val); } /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history (filename) char *filename; { return (read_history_range (filename, 0, -1)); } /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history_range (filename, from, to) char *filename; int from, to; { register int line_start, line_end; char *input, *buffer = (char *)NULL; int file, current_line, done; struct stat finfo; input = history_filename (filename); file = open (input, O_RDONLY, 0666); if ((file < 0) || (stat (input, &finfo) == -1)) goto error_and_exit; buffer = (char *)xmalloc (finfo.st_size + 1); if (read (file, buffer, finfo.st_size) != finfo.st_size) error_and_exit: { if (file >= 0) close (file); if (buffer) free (buffer); return (errno); } close (file); /* Set TO to larger than end of file if negative. */ if (to < 0) to = finfo.st_size; /* Start at beginning of file, work to end. */ line_start = line_end = current_line = 0; /* Skip lines until we are at FROM. */ while (line_start < finfo.st_size && current_line < from) { for (line_end = line_start; line_end < finfo.st_size; line_end++) if (buffer[line_end] == '\n') { current_line++; line_start = line_end + 1; if (current_line == from) break; } } /* If there are lines left to gobble, then gobble them now. */ for (line_end = line_start; line_end < finfo.st_size; line_end++) if (buffer[line_end] == '\n') { buffer[line_end] = '\0'; if (buffer[line_start]) add_history (buffer + line_start); current_line++; if (current_line >= to) break; line_start = line_end + 1; } return (0); } /* Truncate the history file FNAME, leaving only LINES trailing lines. If FNAME is NULL, then use ~/.history. */ history_truncate_file (fname, lines) char *fname; register int lines; { register int i; int file; char *buffer = (char *)NULL, *filename; struct stat finfo; filename = history_filename (fname); if (stat (filename, &finfo) == -1) goto truncate_exit; file = open (filename, O_RDONLY, 066); if (file == -1) goto truncate_exit; buffer = (char *)xmalloc (finfo.st_size + 1); read (file, buffer, finfo.st_size); close (file); /* Count backwards from the end of buffer until we have passed LINES lines. */ for (i = finfo.st_size; lines && i; i--) { if (buffer[i] == '\n') lines--; } /* If there are fewer lines in the file than we want to truncate to, then we are all done. */ if (!i) goto truncate_exit; /* Otherwise, write from the start of this line until the end of the buffer. */ for (--i; i; i--) if (buffer[i] == '\n') { i++; break; } file = open (filename, O_WRONLY | O_TRUNC | O_CREAT, 0666); if (file == -1) goto truncate_exit; write (file, buffer + i, finfo.st_size - i); close (file); truncate_exit: if (buffer) free (buffer); free (filename); } #define HISTORY_APPEND 0 #define HISTORY_OVERWRITE 1 /* Workhorse function for writing history. Writes NELEMENT entries from the history list to FILENAME. OVERWRITE is non-zero if you wish to replace FILENAME with the entries. */ static int history_do_write (filename, nelements, overwrite) char *filename; int nelements, overwrite; { register int i; char *output = history_filename (filename); int file, mode; char cr = '\n'; if (overwrite) mode = O_WRONLY | O_CREAT | O_TRUNC; else mode = O_WRONLY | O_APPEND; if ((file = open (output, mode, 0666)) == -1) return (errno); if (nelements > history_length) nelements = history_length; for (i = history_length - nelements; i < history_length; i++) { if (write (file, the_history[i]->line, strlen (the_history[i]->line)) < 0) break; if (write (file, &cr, 1) < 0) break; } close (file); return (0); } /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (nelements, filename) int nelements; char *filename; { return (history_do_write (filename, nelements, HISTORY_APPEND)); } /* Overwrite FILENAME with the current history. If FILENAME is NULL, then write the history list to ~/.history. Values returned are as in read_history ().*/ int write_history (filename) char *filename; { return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); } /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY * current_history () { if ((history_offset == history_length) || !the_history) return ((HIST_ENTRY *)NULL); else return (the_history[history_offset]); } /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry then return a NULL pointer. */ HIST_ENTRY * previous_history () { if (!history_offset) return ((HIST_ENTRY *)NULL); else return (the_history[--history_offset]); } /* Move history_offset forward to the next history entry, and return a pointer to that entry. If there is no next entry then return a NULL pointer. */ HIST_ENTRY * next_history () { if (history_offset == history_length) return ((HIST_ENTRY *)NULL); else return (the_history[++history_offset]); } /* Return the current history array. The caller has to be carefull, since this is the actual array of data, and could be bashed or made corrupt easily. The array is terminated with a NULL pointer. */ HIST_ENTRY ** history_list () { return (the_history); } /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ HIST_ENTRY * history_get (offset) int offset; { int index = offset - history_base; if (index >= history_length || index < 0 || !the_history) return ((HIST_ENTRY *)NULL); return (the_history[index]); } /* Search for STRING in the history list. DIR is < 0 for searching backwards. POS is an absolute index into the history list at which point to begin searching. */ int history_search_pos (string, dir, pos) char *string; int dir, pos; { int ret, old = where_history (); history_set_pos (pos); if (history_search (string, dir) == -1) { history_set_pos (old); return (-1); } ret = where_history (); history_set_pos (old); return ret; } /* Make the current history item be the one at POS, an absolute index. Returns zero if POS is out of range, else non-zero. */ int history_set_pos (pos) int pos; { if (pos > history_length || pos < 0 || !the_history) return (0); history_offset = pos; return (1); } /* **************************************************************** */ /* */ /* History Expansion */ /* */ /* **************************************************************** */ /* Hairy history expansion on text, not tokens. This is of general use, and thus belongs in this library. */ /* The last string searched for in a !?string? search. */ static char *search_string = (char *)NULL; /* Return the event specified at TEXT + OFFSET modifying OFFSET to point to after the event specifier. Just a pointer to the history line is returned; NULL is returned in the event of a bad specifier. You pass STRING with *INDEX equal to the history_expansion_char that begins this specification. DELIMITING_QUOTE is a character that is allowed to end the string specification for what to search for in addition to the normal characters `:', ` ', `\t', `\n', and sometimes `?'. So you might call this function like: line = get_history_event ("!echo:p", &index, 0); */ char * get_history_event (string, caller_index, delimiting_quote) char *string; int *caller_index; int delimiting_quote; { register int i = *caller_index; int which, sign = 1; HIST_ENTRY *entry; /* The event can be specified in a number of ways. !! the previous command !n command line N !-n current command-line minus N !str the most recent command starting with STR !?str[?] the most recent command containing STR All values N are determined via HISTORY_BASE. */ if (string[i] != history_expansion_char) return ((char *)NULL); /* Move on to the specification. */ i++; /* Handle !! case. */ if (string[i] == history_expansion_char) { i++; which = history_base + (history_length - 1); *caller_index = i; goto get_which; } /* Hack case of numeric line specification. */ read_which: if (string[i] == '-') { sign = -1; i++; } if (digit (string[i])) { int start = i; /* Get the extent of the digits. */ for (; digit (string[i]); i++); /* Get the digit value. */ sscanf (string + start, "%d", &which); *caller_index = i; if (sign < 0) which = (history_length + history_base) - which; get_which: if (entry = history_get (which)) return (entry->line); return ((char *)NULL); } /* This must be something to search for. If the spec begins with a '?', then the string may be anywhere on the line. Otherwise, the string must be found at the start of a line. */ { int index; char *temp; int substring_okay = 0; if (string[i] == '?') { substring_okay++; i++; } for (index = i; string[i]; i++) if (whitespace (string[i]) || string[i] == '\n' || string[i] == ':' || (substring_okay && string[i] == '?') || string[i] == delimiting_quote) break; temp = (char *)Alloca (1 + (i - index)); strncpy (temp, &string[index], (i - index)); temp[i - index] = '\0'; if (string[i] == '?') i++; *caller_index = i; search_again: index = history_search (temp, -1); if (index < 0) search_lost: { history_offset = history_length; #if NO_ALLOCA free(temp); #endif return ((char *)NULL); } if (index == 0 || substring_okay || (strncmp (temp, the_history[history_offset]->line, strlen (temp)) == 0)) { search_won: entry = current_history (); history_offset = history_length; /* If this was a substring search, then remember the string that we matched for word substitution. */ if (substring_okay) { if (search_string) free (search_string); search_string = savestring (temp); } #if NO_ALLOCA free(temp); #endif return (entry->line); } if (history_offset) history_offset--; else goto search_lost; goto search_again; } } /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place -1) If there was an error in expansion. If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ int history_expand (string, output) char *string; char **output; { register int j, l = strlen (string); int i, word_spec_error = 0; int cc, modified = 0; char *word_spec, *event; int starting_index, only_printing = 0, substitute_globally = 0; char *get_history_word_specifier (), *rindex (); /* The output string, and its length. */ int len = 0; char *result = (char *)NULL; /* Used in add_string; */ char *temp, tt[2], tbl[3]; #if NO_ALLOCA #define USED_SIZE 128 char ** saved_alloc; int allocs_used = 0; int allocs_alloced = USED_SIZE; saved_alloc = (char **) malloc(USED_SIZE * sizeof(char *)); #define save_an_alloc(ptr) \ if (allocs_used >= allocs_alloced) \ saved_alloc = (char **) \ realloc(saved_alloc, (sizeof(char *) * (allocs_alloced += USED_SIZE)));\ saved_alloc[allocs_used++] = ptr #define free_the_allocs() \ while (allocs_used > 0) \ free(saved_alloc[--allocs_used]); \ free(saved_alloc) #endif /* Prepare the buffer for printing error messages. */ result = (char *)xmalloc (len = 255); result[0] = tt[1] = tbl[2] = '\0'; tbl[0] = '\\'; tbl[1] = history_expansion_char; /* Grovel the string. Only backslash can quote the history escape character. We also handle arg specifiers. */ /* Before we grovel forever, see if the history_expansion_char appears anywhere within the text. */ /* The quick substitution character is a history expansion all right. That is to say, "^this^that^" is equivalent to "!!:s^this^that^", and in fact, that is the substitution that we do. */ if (string[0] == history_subst_char) { char *format_string = (char *)Alloca (10 + strlen (string)); #if NO_ALLOCA save_an_alloc(format_string); #endif sprintf (format_string, "%c%c:s%s", history_expansion_char, history_expansion_char, string); string = format_string; l += 4; goto grovel; } /* If not quick substitution, still maybe have to do expansion. */ /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ for (i = 0; string[i]; i++) if (string[i] == history_expansion_char) if (!string[i + 1] || member (string[i + 1], history_no_expand_chars)) continue; else goto grovel; free (result); *output = savestring (string); return (0); grovel: for (i = j = 0; i < l; i++) { int tchar = string[i]; if (tchar == history_expansion_char) tchar = -3; switch (tchar) { case '\\': if (string[i + 1] == history_expansion_char) { i++; temp = tbl; goto do_add; } else goto add_char; /* case history_expansion_char: */ case -3: starting_index = i + 1; cc = string[i + 1]; /* If the history_expansion_char is followed by one of the characters in history_no_expand_chars, then it is not a candidate for expansion of any kind. */ if (member (cc, history_no_expand_chars)) goto add_char; /* There is something that is listed as a `word specifier' in csh documentation which means `the expanded text to this point'. That is not a word specifier, it is an event specifier. */ if (cc == '#') goto hack_pound_sign; /* If it is followed by something that starts a word specifier, then !! is implied as the event specifier. */ if (member (cc, ":$*%^")) { char fake_s[3]; int fake_i = 0; i++; fake_s[0] = fake_s[1] = history_expansion_char; fake_s[2] = '\0'; event = get_history_event (fake_s, &fake_i, 0); } else { int quoted_search_delimiter = 0; /* If the character before this `!' is a double or single quote, then this expansion takes place inside of the quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) quoted_search_delimiter = string[i - 1]; event = get_history_event (string, &i, quoted_search_delimiter); } if (!event) event_not_found: { int l = 1 + (i - starting_index); temp = (char *)Alloca (1 + l); #if NO_ALLOCA save_an_alloc(temp); #endif strncpy (temp, string + starting_index, l); temp[l - 1] = 0; sprintf (result, "%s: %s.", temp, word_spec_error ? "Bad word specifier" : "Event not found"); error_exit: *output = result; #if NO_ALLOCA free_the_allocs(); #endif return (-1); } /* If a word specifier is found, then do what that requires. */ starting_index = i; word_spec = get_history_word_specifier (string, event, &i); /* There is no such thing as a `malformed word specifier'. However, it is possible for a specifier that has no match. In that case, we complain. */ if (word_spec == (char *)-1) bad_word_spec: { word_spec_error++; goto event_not_found; } /* If no word specifier, than the thing of interest was the event. */ if (!word_spec) temp = event; else { temp = (char *)Alloca (1 + strlen (word_spec)); #if NO_ALLOCA save_an_alloc(temp); #endif strcpy (temp, word_spec); free (word_spec); } /* Perhaps there are other modifiers involved. Do what they say. */ hack_specials: if (string[i] == ':') { char *tstr; switch (string[i + 1]) { /* :p means make this the last executed line. So we return an error state after adding this line to the history. */ case 'p': only_printing++; goto next_special; /* :t discards all but the last part of the pathname. */ case 't': tstr = rindex (temp, '/'); if (tstr) temp = ++tstr; goto next_special; /* :h discards the last part of a pathname. */ case 'h': tstr = rindex (temp, '/'); if (tstr) *tstr = '\0'; goto next_special; /* :r discards the suffix. */ case 'r': tstr = rindex (temp, '.'); if (tstr) *tstr = '\0'; goto next_special; /* :e discards everything but the suffix. */ case 'e': tstr = rindex (temp, '.'); if (tstr) temp = tstr; goto next_special; /* :s/this/that substitutes `this' for `that'. */ /* :gs/this/that substitutes `this' for `that' globally. */ case 'g': if (string[i + 2] == 's') { i++; substitute_globally = 1; goto substitute; } else case 's': substitute: { char *this, *that, *new_event; int delimiter = 0; int si, l_this, l_that, l_temp = strlen (temp); if (i + 2 < strlen (string)) delimiter = string[i + 2]; if (!delimiter) break; i += 3; /* Get THIS. */ for (si = i; string[si] && string[si] != delimiter; si++); l_this = (si - i); this = (char *)Alloca (1 + l_this); #if NO_ALLOCA save_an_alloc(this); #endif strncpy (this, string + i, l_this); this[l_this] = '\0'; i = si; if (string[si]) i++; /* Get THAT. */ for (si = i; string[si] && string[si] != delimiter; si++); l_that = (si - i); that = (char *)Alloca (1 + l_that); #if NO_ALLOCA save_an_alloc(that); #endif strncpy (that, string + i, l_that); that[l_that] = '\0'; i = si; if (string[si]) i++; /* Ignore impossible cases. */ if (l_this > l_temp) goto cant_substitute; /* Find the first occurrence of THIS in TEMP. */ si = 0; for (; (si + l_this) <= l_temp; si++) if (strncmp (temp + si, this, l_this) == 0) { new_event = (char *)Alloca (1 + (l_that - l_this) + l_temp); #if NO_ALLOCA save_an_alloc(new_event); #endif strncpy (new_event, temp, si); strncpy (new_event + si, that, l_that); strncpy (new_event + si + l_that, temp + si + l_this, l_temp - (si + l_this)); new_event[(l_that - l_this) + l_temp] = '\0'; temp = new_event; if (substitute_globally) { si += l_that; l_temp = strlen (temp); substitute_globally++; continue; } goto hack_specials; } cant_substitute: if (substitute_globally > 1) { substitute_globally = 0; goto hack_specials; } goto event_not_found; } /* :# is the line so far. Note that we have to alloca () it since RESULT could be realloc ()'ed below in add_string. */ case '#': hack_pound_sign: if (result) { temp = (char *)Alloca (1 + strlen (result)); #if NO_ALLOCA save_an_alloc(temp); #endif strcpy (temp, result); } else temp = ""; next_special: i += 2; goto hack_specials; } } /* Believe it or not, we have to back the pointer up by one. */ --i; goto add_string; /* A regular character. Just add it to the output string. */ default: add_char: tt[0] = string[i]; temp = tt; goto do_add; add_string: modified++; do_add: j += strlen (temp); while (j > len) result = (char *)xrealloc (result, (len += 255)); strcpy (result + (j - strlen (temp)), temp); } } *output = result; if (only_printing) { add_history (result); #if NO_ALLOCA free_the_allocs(); #endif return (-1); } #if NO_ALLOCA free_the_allocs(); #endif return (modified != 0); } /* Return a consed string which is the word specified in SPEC, and found in FROM. NULL is returned if there is no spec. -1 is returned if the word specified cannot be found. CALLER_INDEX is the offset in SPEC to start looking; it is updated to point to just after the last character parsed. */ char * get_history_word_specifier (spec, from, caller_index) char *spec, *from; int *caller_index; { register int i = *caller_index; int first, last; int expecting_word_spec = 0; char *history_arg_extract (); /* The range of words to return doesn't exist yet. */ first = last = 0; /* If we found a colon, then this *must* be a word specification. If it isn't, then it is an error. */ if (spec[i] == ':') i++, expecting_word_spec++; /* Handle special cases first. */ /* `%' is the word last searched for. */ if (spec[i] == '%') { *caller_index = i + 1; if (search_string) return (savestring (search_string)); else return (savestring ("")); } /* `*' matches all of the arguments, but not the command. */ if (spec[i] == '*') { char *star_result; *caller_index = i + 1; star_result = history_arg_extract (1, '$', from); if (!star_result) star_result = savestring (""); return (star_result); } /* `$' is last arg. */ if (spec[i] == '$') { *caller_index = i + 1; return (history_arg_extract ('$', '$', from)); } /* Try to get FIRST and LAST figured out. */ if (spec[i] == '-' || spec[i] == '^') { first = 1; goto get_last; } get_first: if (digit (spec[i]) && expecting_word_spec) { sscanf (spec + i, "%d", &first); for (; digit (spec[i]); i++); } else return ((char *)NULL); get_last: if (spec[i] == '^') { i++; last = 1; goto get_args; } if (spec[i] != '-') { last = first; goto get_args; } i++; if (digit (spec[i])) { sscanf (spec + i, "%d", &last); for (; digit (spec[i]); i++); } else if (spec[i] == '$') { i++; last = '$'; } get_args: { char *result = (char *)NULL; *caller_index = i; if (last >= first) result = history_arg_extract (first, last, from); if (result) return (result); else return ((char *)-1); } } /* Extract the args specified, starting at FIRST, and ending at LAST. The args are taken from STRING. If either FIRST or LAST is < 0, then make that arg count from the right (subtract from the number of tokens, so that FIRST = -1 means the next to last token on the line). */ char * history_arg_extract (first, last, string) int first, last; char *string; { register int i, len; char *result = (char *)NULL; int size = 0, offset = 0; char **history_tokenize (), **list; if (!(list = history_tokenize (string))) return ((char *)NULL); for (len = 0; list[len]; len++); if (last < 0) last = len + last - 1; if (first < 0) first = len + first - 1; if (last == '$') last = len - 1; if (first == '$') first = len - 1; last++; if (first > len || last > len || first < 0 || last < 0) result = ((char *)NULL); else { for (i = first; i < last; i++) { int l = strlen (list[i]); if (!result) result = (char *)xmalloc ((size = (2 + l))); else result = (char *)xrealloc (result, (size += (2 + l))); strcpy (result + offset, list[i]); offset += l; if (i + 1 < last) { strcpy (result + offset, " "); offset++; } } } for (i = 0; i < len; i++) free (list[i]); free (list); return (result); } #define slashify_in_quotes "\\`\"$" /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ char ** history_tokenize (string) char *string; { char **result = (char **)NULL; register int i, start, result_index, size; int len; i = result_index = size = 0; /* Get a token, and stuff it into RESULT. The tokens are split exactly where the shell would split them. */ get_token: /* Skip leading whitespace. */ for (; string[i] && whitespace(string[i]); i++); start = i; if (!string[i] || string[i] == history_comment_char) return (result); if (member (string[i], "()\n")) { i++; goto got_token; } if (member (string[i], "<>;&|")) { int peek = string[i + 1]; if (peek == string[i]) { if (peek == '<') { if (string[1 + 2] == '-') i++; i += 2; goto got_token; } if (member (peek, ">:&|")) { i += 2; goto got_token; } } else { if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || ((peek == '>') && (string[i] == '&'))) { i += 2; goto got_token; } } i++; goto got_token; } /* Get word from string + i; */ { int delimiter = 0; if (member (string[i], "\"'`")) delimiter = string[i++]; for (;string[i]; i++) { if (string[i] == '\\') { if (string[i + 1] == '\n') { i++; continue; } else { if (delimiter != '\'') if ((delimiter != '"') || (member (string[i], slashify_in_quotes))) { i++; continue; } } } if (delimiter && string[i] == delimiter) { delimiter = 0; continue; } if (!delimiter && (member (string[i], " \t\n;&()|<>"))) goto got_token; if (!delimiter && member (string[i], "\"'`")) { delimiter = string[i]; continue; } } got_token: len = i - start; if (result_index + 2 >= size) { if (!size) result = (char **)xmalloc ((size = 10) * (sizeof (char *))); else result = (char **)xrealloc (result, ((size += 10) * (sizeof (char *)))); } result[result_index] = (char *)xmalloc (1 + len); strncpy (result[result_index], string + start, len); result[result_index][len] = '\0'; result_index++; result[result_index] = (char *)NULL; } if (string[i]) goto get_token; return (result); } #if defined (STATIC_MALLOC) /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp; if (!pointer) temp = (char *)xmalloc (bytes); else temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "history: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ /* **************************************************************** */ /* */ /* Test Code */ /* */ /* **************************************************************** */ #ifdef TEST main () { char line[1024], *t; int done = 0; line[0] = 0; while (!done) { fprintf (stdout, "history%% "); t = gets (line); if (!t) strcpy (line, "quit"); if (line[0]) { char *expansion; int result; using_history (); result = history_expand (line, &expansion); strcpy (line, expansion); free (expansion); if (result) fprintf (stderr, "%s\n", line); if (result < 0) continue; add_history (line); } if (strcmp (line, "quit") == 0) done = 1; if (strcmp (line, "save") == 0) write_history (0); if (strcmp (line, "read") == 0) read_history (0); if (strcmp (line, "list") == 0) { register HIST_ENTRY **the_list = history_list (); register int i; if (the_list) for (i = 0; the_list[i]; i++) fprintf (stdout, "%d: %s\n", i + history_base, the_list[i]->line); } if (strncmp (line, "delete", strlen ("delete")) == 0) { int which; if ((sscanf (line + strlen ("delete"), "%d", &which)) == 1) { HIST_ENTRY *entry = remove_history (which); if (!entry) fprintf (stderr, "No such entry %d\n", which); else { free (entry->line); free (entry); } } else { fprintf (stderr, "non-numeric arg given to `delete'\n"); } } } } #endif /* TEST */ /* * Local variables: * compile-command: "gcc -g -DTEST -o history history.c" * end: */ neuron-7.5/src/readline/history.h000077500000000000000000000112711323325274500171320ustar00rootroot00000000000000/* History.h -- the names of functions that you can call in history. */ typedef struct _hist_entry { char *line; char *data; } HIST_ENTRY; /* For convenience only. You set this when interpreting history commands. It is the logical offset of the first history element. */ extern int history_base; /* Begin a session in which the history functions might be used. This just initializes the interactive variables. */ extern void using_history (); /* Place STRING at the end of the history list. The associated data field (if any) is set to NULL. */ extern void add_history (); /* Returns the number which says what history element we are now looking at. */ extern int where_history (); /* Set the position in the history list to POS. */ int history_set_pos (); /* Search for STRING in the history list, starting at POS, an absolute index into the list. DIR, if negative, says to search backwards from POS, else forwards. Returns the absolute index of the history element where STRING was found, or -1 otherwise. */ extern int history_search_pos (); /* A reasonably useless function, only here for completeness. WHICH is the magic number that tells us which element to delete. The elements are numbered from 0. */ extern HIST_ENTRY *remove_history (); /* Stifle the history list, remembering only MAX number of entries. */ extern void stifle_history (); /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ extern int unstifle_history (); /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history (); /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history_range (); /* Append the current history to FILENAME. If FILENAME is NULL, then append the history list to ~/.history. Values returned are as in read_history (). */ extern int write_history (); /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (); /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ extern HIST_ENTRY *replace_history_entry (); /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY *current_history (); /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer. */ extern HIST_ENTRY *previous_history (); /* Move history_offset forward to the next item in the input_history, and return the a pointer to that entry. If there is no next entry, return a NULL pointer. */ extern HIST_ENTRY *next_history (); /* Return a NULL terminated array of HIST_ENTRY which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL. */ extern HIST_ENTRY **history_list (); /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ extern int history_search (); /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place -1) If there was an error in expansion. If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ extern int history_expand (); /* Extract a string segment consisting of the FIRST through LAST arguments present in STRING. Arguments are broken up as in the shell. */ extern char *history_arg_extract (); /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ extern int history_total_bytes (); neuron-7.5/src/readline/keymaps.c000077500000000000000000000077441323325274500171070ustar00rootroot00000000000000/* keymaps.c -- Functions and keymaps for the GNU Readline library. */ /* Copyright (C) 1988,1989 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "keymaps.h" #include "emacs_keymap.h" #ifdef VI_MODE #include "vi_keymap.h" #endif #if __STDC__ #include #endif /* Remove these declarations when we have a complete libgnu.a. */ #define STATIC_MALLOC #ifndef STATIC_MALLOC extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif /* **************************************************************** */ /* */ /* Functions for manipulating Keymaps. */ /* */ /* **************************************************************** */ /* Return a new, empty keymap. Free it with free() when you are done. */ Keymap rl_make_bare_keymap () { register int i; Keymap keymap = (Keymap)xmalloc (128 * sizeof (KEYMAP_ENTRY)); for (i = 0; i < 128; i++) { keymap[i].type = ISFUNC; keymap[i].function = (Function *)NULL; } for (i = 'A'; i < ('Z' + 1); i++) { keymap[i].type = ISFUNC; keymap[i].function = rl_do_lowercase_version; } return (keymap); } /* Return a new keymap which is a copy of MAP. */ Keymap rl_copy_keymap (map) Keymap map; { register int i; Keymap temp = rl_make_bare_keymap (); for (i = 0; i < 128; i++) { temp[i].type = map[i].type; temp[i].function = map[i].function; } return (temp); } /* Return a new keymap with the printing characters bound to rl_insert, the uppercase Meta characters bound to run their lowercase equivalents, and the Meta digits bound to produce numeric arguments. */ Keymap rl_make_keymap () { extern void rl_insert (), rl_rubout (); extern rl_do_lowercase_version (); extern rl_digit_argument (); register int i; Keymap newmap; newmap = rl_make_bare_keymap (); /* All printing characters are self-inserting. */ for (i = ' '; i < 126; i++) newmap[i].function = rl_insert; newmap[TAB].function = rl_insert; newmap[RUBOUT].function = rl_rubout; newmap[CTRL('H')].function = rl_rubout; return (newmap); } /* Free the storage associated with MAP. */ void rl_discard_keymap (map) Keymap (map); { int i; if (!map) return; for (i = 0; i < 128; i++) { switch (map[i].type) { case ISFUNC: break; case ISKMAP: rl_discard_keymap ((Keymap)map[i].function); break; case ISMACR: free ((char *)map[i].function); break; } } } #ifdef STATIC_MALLOC /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "readline: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ neuron-7.5/src/readline/keymaps.h000077500000000000000000000030011323325274500170720ustar00rootroot00000000000000/* keymaps.h -- Manipulation of readline keymaps. */ #ifndef _KEYMAPS_H_ #define _KEYMAPS_H_ #include "chardefs.h" #ifndef __FUNCTION_DEF typedef int Function (); #define __FUNCTION_DEF #endif /* A keymap contains one entry for each key in the ASCII set. Each entry consists of a type and a pointer. POINTER is the address of a function to run, or the address of a keymap to indirect through. TYPE says which kind of thing POINTER is. */ typedef struct _keymap_entry { char type; Function *function; } KEYMAP_ENTRY; /* I wanted to make the above structure contain a union of: union { Function *function; struct _keymap_entry *keymap; } value; but this made it impossible for me to create a static array. Maybe I need C lessons. */ typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[128]; typedef KEYMAP_ENTRY *Keymap; /* The values that TYPE can have in a keymap entry. */ #define ISFUNC 0 #define ISKMAP 1 #define ISMACR 2 extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap; extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap; /* Return a new, empty keymap. Free it with free() when you are done. */ Keymap rl_make_bare_keymap (); /* Return a new keymap which is a copy of MAP. */ Keymap rl_copy_keymap (); /* Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments. */ Keymap rl_make_keymap (); #endif /* _KEYMAPS_H_ */ neuron-7.5/src/readline/readline.c000077500000000000000000004333541323325274500172210ustar00rootroot00000000000000#include <../../nrnconf.h> /* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ /* Copyright (C) 1987,1989 Free Software Foundation, Inc. This file contains the Readline Library (the Library), a set of routines for providing Emacs style line input to programs that ask for it. The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #if 0 extern void debugfile(const char* format, ...); #endif #if SVR4 #define USG 1 #endif #if SYSV #define rindex strrchr #define index strchr #endif #if __STDC__ #if HAVE_MALLOC_H #include #endif #include typedef void(*SHand)(int); #ifndef SVR4 #define SVR4 1 #endif #endif /* Remove these declarations when we have a complete libgnu.a. */ #define STATIC_MALLOC #ifndef STATIC_MALLOC extern char *xmalloc (), *xrealloc (); #else static char *xmalloc (), *xrealloc (); #endif #ifdef sgi #define _BSD_SIGNALS #endif #include #include #include #include #include #include #ifdef HAVE_ALLOCA #ifdef HAVE_ALLOCA_H #include #endif #define NO_ALLOCA 0 #define Alloca alloca #else #define NO_ALLOCA 1 #define Alloca malloc #endif #if defined (HAVE_UNISTD_H) #include #endif #define NEW_TTY_DRIVER #define HAVE_BSD_SIGNALS extern char* rindex(); static char *strindex (); static int next_macro_key (); static with_macro_input (); static int substring_member_of_array (); /* Some USG machines have BSD signal handling (sigblock, sigsetmask, etc.) */ #if defined (USG) && !defined (hpux) #undef HAVE_BSD_SIGNALS #endif /* System V machines use termio. */ #if !defined (_POSIX_VERSION) #if defined (USG) || defined (hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (LINUX) #undef NEW_TTY_DRIVER #include #if !defined (TCOON) #define TCOON 1 #endif #endif /* USG | hpux | Xenix sgi | DUGX */ #endif /* !_POSIX_VERSION */ /* Posix systems use termios. */ #if defined (_POSIX_VERSION) #undef NEW_TTY_DRIVER #include #if !defined (O_NDELAY) #define O_NDELAY O_NONBLOCK /* Posix-style non-blocking i/o */ #endif /* O_NDELAY */ #endif /* Other (BSD) machines use sgtty. */ #if defined (NEW_TTY_DRIVER) #include #endif #include extern int errno; #include #include /* These next are for filename completion. Perhaps this belongs in a different place. */ #include #if defined (USG) struct passwd *getpwuid (), *getpwent (); #endif /* #define HACK_TERMCAP_MOTION */ #ifdef AIX #define USG #endif #ifdef HAVE_DIRENT_H #include #define direct dirent #define d_namlen d_reclen #endif #ifdef HAVE_NDIR_H #include #endif #ifdef HAVE_SYS_DIR_H #include #endif #ifdef HAVE_SYS_NDIR_H #include #endif #if 0 #if !defined (USG) #include #else /* USG */ #if defined (Xenix) #include #else #ifdef hpux #include #else #include #define direct dirent #define d_namlen d_reclen #endif /* hpux */ #endif /* xenix */ #endif /* USG */ #endif #if defined (USG) && defined (TIOCGWINSZ) #include # if defined (USGr4) || defined (USGr3) # include # endif /* USGr4 */ #endif /* USG && TIOCGWINSZ */ /* Some standard library routines. */ #include "readline.h" #include "history.h" extern void rl_prep_terminal (), rl_deprep_terminal (); #ifndef digit #define digit(c) ((c) >= '0' && (c) <= '9') #endif #ifndef isletter #define isletter(c) (((c) >= 'A' && (c) <= 'Z') || ((c) >= 'a' && (c) <= 'z')) #endif #ifndef digit_value #define digit_value(c) ((c) - '0') #endif #ifndef member char *index (); #define member(c, s) ((c) ? index ((s), (c)) : 0) #endif #ifndef isident #define isident(c) ((isletter(c) || digit(c) || c == '_')) #endif #ifndef exchange #define exchange(x, y) {int temp = x; x = y; y = temp;} #endif static void update_line (char *old, char *new, int current_line); static void output_character_function (); static void delete_chars (); static insert_some_chars (); #ifdef VOID_SIGHANDLER #define sighandler void #else #define sighandler int #endif /* This typedef is equivalant to the one for Function; it allows us to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ #if SVR4 typedef void SigHandler(int); #else typedef sighandler SigHandler (); #endif /* If on, then readline handles signals in a way that doesn't screw. */ #define HANDLE_SIGNALS /* **************************************************************** */ /* */ /* Line editing input utility */ /* */ /* **************************************************************** */ /* A pointer to the keymap that is currently in use. By default, it is the standard emacs keymap. */ Keymap keymap = emacs_standard_keymap; #define vi_mode 0 #define emacs_mode 1 /* The current style of editing. */ int rl_editing_mode = emacs_mode; /* Non-zero if the previous command was a kill command. */ static int last_command_was_kill = 0; /* The current value of the numeric argument specified by the user. */ int rl_numeric_arg = 1; /* Non-zero if an argument was typed. */ int rl_explicit_arg = 0; /* Temporary value used while generating the argument. */ static int arg_sign = 1; /* Non-zero means we have been called at least once before. */ static int rl_initialized = 0; /* If non-zero, this program is running in an EMACS buffer. */ static char *running_in_emacs = (char *)NULL; /* The current offset in the current input line. */ int rl_point; /* Mark in the current input line. */ int rl_mark; /* Length of the current input line. */ int rl_end; /* Make this non-zero to return the current input_line. */ int rl_done; /* The last function executed by readline. */ Function *rl_last_func = (Function *)NULL; /* Top level environment for readline_internal (). */ static jmp_buf readline_top_level; /* The streams we interact with. */ static FILE *in_stream, *out_stream; /* The names of the streams that we do input and output to. */ FILE *rl_instream /*= stdin*/, *rl_outstream /*= stdout*/; /* above setting now done in readline_initialize_everything () */ /* Non-zero means echo characters as they are read. */ int readline_echoing_p = 1; /* Current prompt. */ char *rl_prompt; /* The number of characters read in order to type this complete command. */ int rl_key_sequence_length = 0; /* If non-zero, then this is the address of a function to call just before readline_internal () prints the first prompt. */ Function *rl_startup_hook = (Function *)NULL; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ Function *rl_symbolic_link_hook = (Function *)NULL; /* What we use internally. You should always refer to RL_LINE_BUFFER. */ static char *the_line; /* The character that can generate an EOF. Really read from the terminal driver... just defaulted here. */ static int eof_char = CTRL ('D'); /* Non-zero makes this the next keystroke to read. */ int rl_pending_input = 0; /* Pointer to a useful terminal name. */ char *rl_terminal_name = (char *)NULL; /* Line buffer and maintenence. */ char *rl_line_buffer = (char *)NULL; static int rl_line_buffer_len = 0; #define DEFAULT_BUFFER_SIZE 256 /* **************************************************************** */ /* */ /* `Forward' declarations */ /* */ /* **************************************************************** */ /* Non-zero means do not parse any lines other than comments and parser directives. */ static unsigned char parsing_conditionalized_out = 0; /* Caseless strcmp (). */ #ifdef CYGWIN #undef stricmp #undef strnicmp #endif static int stricmp (), strnicmp(); /* Non-zero means to save keys that we dispatch on in a kbd macro. */ static int defining_kbd_macro = 0; /* **************************************************************** */ /* */ /* Top Level Functions */ /* */ /* **************************************************************** */ /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. A return value of NULL means that EOF was encountered. */ char * readline (prompt) char *prompt; { char *readline_internal (); char *value; rl_prompt = prompt; /* If we are at EOF return a NULL string. */ if (rl_pending_input == EOF) { rl_pending_input = 0; return ((char *)NULL); } rl_initialize (); rl_prep_terminal (); #ifdef HANDLE_SIGNALS rl_set_signals (); #endif value = readline_internal (); rl_deprep_terminal (); #ifdef HANDLE_SIGNALS rl_clear_signals (); #endif return (value); } void rl_dispatch (int key, Keymap map); void rl_digit_loop (); void move_vert (int to); void init_terminal_io (char *terminal_name); /* Read a line of input from the global rl_instream, doing output on the global rl_outstream. If rl_prompt is non-null, then that is our prompt. */ char * readline_internal () { int lastc, c, eof_found; in_stream = rl_instream; out_stream = rl_outstream; lastc = eof_found = 0; if (rl_startup_hook) (*rl_startup_hook) (); if (!readline_echoing_p) { if (rl_prompt) { fprintf (out_stream, "%s", rl_prompt); fflush (out_stream); } } else { rl_on_new_line (); rl_redisplay (); #ifdef VI_MODE if (rl_editing_mode == vi_mode) rl_vi_insertion_mode (); #endif /* VI_MODE */ } while (!rl_done) { int lk = last_command_was_kill; int code; code = setjmp (readline_top_level); if (code) rl_redisplay (); if (!rl_pending_input) { /* Then initialize the argument and number of keys read. */ rl_init_argument (); rl_key_sequence_length = 0; } c = rl_read_key (); /* EOF typed to a non-blank line is a . */ if (c == EOF && rl_end) c = NEWLINE; /* The character eof_char typed to blank line, and not as the previous character is interpreted as EOF. */ if (((c == eof_char && lastc != c) || c == EOF) && !rl_end) { eof_found = 1; break; } lastc = c; rl_dispatch (c, keymap); /* If there was no change in last_command_was_kill, then no kill has taken place. Note that if input is pending we are reading a prefix command, so nothing has changed yet. */ if (!rl_pending_input) { if (lk == last_command_was_kill) last_command_was_kill = 0; } #ifdef VI_MODE /* In vi mode, when you exit insert mode, the cursor moves back over the previous character. We explicitly check for that here. */ if (rl_editing_mode == vi_mode && keymap == vi_movement_keymap) rl_vi_check (); #endif if (!rl_done) rl_redisplay (); } /* Restore the original of this history line, iff the line that we are editing was originally in the history, AND the line has changed. */ { HIST_ENTRY *entry = current_history (); if (entry && rl_undo_list) { char *temp = savestring (the_line); rl_revert_line (); entry = replace_history_entry (where_history (), the_line, (HIST_ENTRY *)NULL); free_history_entry (entry); strcpy (the_line, temp); free (temp); } } /* At any rate, it is highly likely that this line has an undo list. Get rid of it now. */ if (rl_undo_list) free_undo_list (); if (eof_found) return (char *)NULL; else return (savestring (the_line)); } /* **************************************************************** */ /* */ /* Signal Handling */ /* */ /* **************************************************************** */ #ifdef SIGWINCH static SigHandler *old_sigwinch = (SigHandler *)NULL; #if SVR4 static void rl_handle_sigwinch (sig) int sig; #else static sighandler rl_handle_sigwinch (sig, code, scp) int sig, code; struct sigcontext *scp; #endif { char *term = rl_terminal_name, *getenv (); if (readline_echoing_p) { if (!term) term = getenv ("TERM"); if (!term) term = "dumb"; rl_reset_terminal (term); #ifdef NEVER crlf (); rl_forced_update_display (); #endif } if (old_sigwinch && old_sigwinch != (SigHandler *)SIG_IGN && old_sigwinch != (SigHandler *)SIG_DFL) #if SVR4 (*old_sigwinch)(sig); #else (*old_sigwinch)(sig, code, scp); #endif } #endif /* SIGWINCH */ #ifdef HANDLE_SIGNALS /* Interrupt handling. */ static SigHandler *old_int = (SigHandler *)NULL, *old_tstp = (SigHandler *)NULL, *old_ttou = (SigHandler *)NULL, *old_ttin = (SigHandler *)NULL, *old_cont = (SigHandler *)NULL; /* Handle an interrupt character. */ #if SVR4 static void rl_signal_handler (sig) int sig; #else static sighandler rl_signal_handler (sig, code, scp) int sig, code; struct sigcontext *scp; #endif { #if !defined (HAVE_BSD_SIGNALS) || defined (hpux) /* Since the signal will not be blocked while we are in the signal handler, ignore it until rl_clear_signals resets the catcher. */ if (sig == SIGINT) signal (sig, SIG_IGN); #endif /* !HAVE_BSD_SIGNALS || hpux */ switch (sig) { case SIGINT: free_undo_list (); rl_clear_message (); rl_init_argument (); #ifdef SIGTSTP case SIGTSTP: case SIGTTOU: case SIGTTIN: #endif rl_clean_up_for_exit (); rl_deprep_terminal (); rl_clear_signals (); rl_pending_input = 0; kill (getpid (), sig); #if defined (_POSIX_VERSION) { sigset_t set; sigemptyset (&set); sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); } #else #if defined (HAVE_BSD_SIGNALS) sigsetmask (0); #endif /* HAVE_BSD_SIGNALS */ #endif /* _POSIX_VERSION */ rl_prep_terminal (); rl_set_signals (); } } rl_set_signals () { old_int = (SigHandler *)signal (SIGINT, rl_signal_handler); if (old_int == (SigHandler *)SIG_IGN) signal (SIGINT, SIG_IGN); #ifdef SIGTSTP old_tstp = (SigHandler *)signal (SIGTSTP, rl_signal_handler); if (old_tstp == (SigHandler *)SIG_IGN) signal (SIGTSTP, SIG_IGN); #endif #ifdef SIGTTOU old_ttou = (SigHandler *)signal (SIGTTOU, rl_signal_handler); old_ttin = (SigHandler *)signal (SIGTTIN, rl_signal_handler); if (old_tstp == (SigHandler *)SIG_IGN) { signal (SIGTTOU, SIG_IGN); signal (SIGTTIN, SIG_IGN); } #endif #ifdef SIGWINCH old_sigwinch = (SigHandler *)signal (SIGWINCH, rl_handle_sigwinch); #endif } rl_clear_signals () { signal (SIGINT, old_int); #ifdef SIGTSTP signal (SIGTSTP, old_tstp); #endif #ifdef SIGTTOU signal (SIGTTOU, old_ttou); signal (SIGTTIN, old_ttin); #endif #ifdef SIGWINCH signal (SIGWINCH, old_sigwinch); #endif } #endif /* HANDLE_SIGNALS */ /* **************************************************************** */ /* */ /* Character Input Buffering */ /* */ /* **************************************************************** */ /* If the terminal was in xoff state when we got to it, then xon_char contains the character that is supposed to start it again. */ static int xon_char, xoff_state; static int pop_index = 0, push_index = 0, ibuffer_len = 511; static unsigned char ibuffer[512]; /* Non-null means it is a pointer to a function to run while waiting for character input. */ Function *rl_event_hook = (Function *)NULL; #define any_typein (push_index != pop_index) /* Add KEY to the buffer of characters to be read. */ rl_stuff_char (key) int key; { if (key == EOF) { key = NEWLINE; rl_pending_input = EOF; } ibuffer[push_index++] = key; if (push_index >= ibuffer_len) push_index = 0; } /* Return the amount of space available in the buffer for stuffing characters. */ int ibuffer_space () { if (pop_index > push_index) return (pop_index - push_index); else return (ibuffer_len - (push_index - pop_index)); } /* Get a key from the buffer of characters to be read. Return the key in KEY. Result is KEY if there was a key, or 0 if there wasn't. */ int rl_get_char (key) int *key; { if (push_index == pop_index) return (0); *key = ibuffer[pop_index++]; if (pop_index >= ibuffer_len) pop_index = 0; return (1); } /* Stuff KEY into the *front* of the input buffer. Returns non-zero if successful, zero if there is no space left in the buffer. */ int rl_unget_char (key) int key; { if (ibuffer_space ()) { pop_index--; if (pop_index < 0) pop_index = ibuffer_len - 1; ibuffer[pop_index] = key; return (1); } return (0); } /* If a character is available to be read, then read it and stuff it into IBUFFER. Otherwise, just return. */ void rl_gather_tyi () { int tty = fileno (in_stream); register int tem, result = -1; long chars_avail; char input; #if 0 && defined(FIONREAD) result = ioctl (tty, FIONREAD, &chars_avail); #endif if (result == -1) { fcntl (tty, F_SETFL, O_NDELAY); chars_avail = read (tty, &input, 1); fcntl (tty, F_SETFL, 0); if (chars_avail == -1 && errno == EAGAIN) return; } /* If there's nothing available, don't waste time trying to read something. */ if (chars_avail == 0) return; tem = ibuffer_space (); if (chars_avail > tem) chars_avail = tem; #if __alpha /* I think there is a bug in the dec alpha cc compiler since with chars_avail = 1 and tem=512 it still executes the body of the if above. */ chars_avail = 1; #endif /* One cannot read all of the available input. I can only read a single character at a time, or else programs which require input can be thwarted. If the buffer is larger than one character, I lose. Damn! */ if (tem < ibuffer_len) chars_avail = 0; if (result != -1) { while (chars_avail--) rl_stuff_char (rl_getc (in_stream)); } else { if (chars_avail) rl_stuff_char (input); } } /* Read a key, including pending input. */ int rl_read_key () { int c; rl_key_sequence_length++; if (rl_pending_input) { c = rl_pending_input; rl_pending_input = 0; } else { /* If input is coming from a macro, then use that. */ if (c = next_macro_key ()) return (c); /* If the user has an event function, then call it periodically. */ if (rl_event_hook) { #if defined(CYGWIN) int cnt=0; #endif while (rl_event_hook && !rl_get_char (&c)) { (*rl_event_hook) (); rl_gather_tyi (); #if defined(CYGWIN) /* when the rxvt is closed, then the symptom is that input is perpetually ready from the HandleStdin::inputReady but there are no characters. Apparently there is no direct test there that stdin is no longer available (errno, F_GETFL, F_GETFD do not change) so this kludge is used. */ if (++cnt > 1000) { #if 0 debugfile("cnt=%d\n", cnt); #endif rl_stuff_char(eof_char); break; } #endif } } else { if (!rl_get_char (&c)) c = rl_getc (in_stream); } } #ifdef NEVER /* This breaks supdup to 4.0.3c machines. */ #ifdef TIOCSTART /* Ugh. But I can't think of a better way. */ if (xoff_state && c == xon_char) { ioctl (fileno (in_stream), TIOCSTART, 0); xoff_state = 0; return (rl_read_key ()); } #endif /* TIOCSTART */ #endif return (c); } /* I'm beginning to hate the declaration rules for various compilers. */ static void add_macro_char (); /* Do the command associated with KEY in MAP. If the associated command is really a keymap, then read another key, and dispatch into that map. */ void rl_dispatch (key, map) register int key; Keymap map; { if (defining_kbd_macro) add_macro_char (key); if (key > 127 && key < 256) { if (map[ESC].type == ISKMAP) { map = (Keymap)map[ESC].function; key -= 128; rl_dispatch (key, map); } else ding (); return; } switch (map[key].type) { case ISFUNC: { Function *func = map[key].function; if (func != (Function *)NULL) { /* Special case rl_do_lowercase_version (). */ if (func == rl_do_lowercase_version) { rl_dispatch (to_lower (key), map); return; } (*map[key].function)(rl_numeric_arg * arg_sign, key); /* If we have input pending, then the last command was a prefix command. Don't change the state of rl_last_func. Otherwise, remember the last command executed in this variable. */ if (!rl_pending_input) rl_last_func = map[key].function; } else { rl_abort (); return; } } break; case ISKMAP: if (map[key].function != (Function *)NULL) { int newkey; rl_key_sequence_length++; newkey = rl_read_key (); rl_dispatch (newkey, (Keymap)map[key].function); } else { rl_abort (); return; } break; case ISMACR: if (map[key].function != (Function *)NULL) { char *macro = savestring ((char *)map[key].function); with_macro_input (macro); return; } break; } } /* **************************************************************** */ /* */ /* Hacking Keyboard Macros */ /* */ /* **************************************************************** */ /* The currently executing macro string. If this is non-zero, then it is a malloc ()'ed string where input is coming from. */ static char *executing_macro = (char *)NULL; /* The offset in the above string to the next character to be read. */ static int executing_macro_index = 0; /* The current macro string being built. Characters get stuffed in here by add_macro_char (). */ static char *current_macro = (char *)NULL; /* The size of the buffer allocated to current_macro. */ static int current_macro_size = 0; /* The index at which characters are being added to current_macro. */ static int current_macro_index = 0; /* A structure used to save nested macro strings. It is a linked list of string/index for each saved macro. */ struct saved_macro { struct saved_macro *next; char *string; int index; }; /* The list of saved macros. */ struct saved_macro *macro_list = (struct saved_macro *)NULL; /* Forward declarations of static functions. Thank you C. */ static void push_executing_macro (), pop_executing_macro (); /* This one has to be declared earlier in the file. */ /* static void add_macro_char (); */ /* Set up to read subsequent input from STRING. STRING is free ()'ed when we are done with it. */ static with_macro_input (string) char *string; { push_executing_macro (); executing_macro = string; executing_macro_index = 0; } /* Return the next character available from a macro, or 0 if there are no macro characters. */ static int next_macro_key () { if (!executing_macro) return (0); if (!executing_macro[executing_macro_index]) { pop_executing_macro (); return (next_macro_key ()); } return (executing_macro[executing_macro_index++]); } /* Save the currently executing macro on a stack of saved macros. */ static void push_executing_macro () { struct saved_macro *saver; saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro)); saver->next = macro_list; saver->index = executing_macro_index; saver->string = executing_macro; macro_list = saver; } /* Discard the current macro, replacing it with the one on the top of the stack of saved macros. */ static void pop_executing_macro () { if (executing_macro) free (executing_macro); executing_macro = (char *)NULL; executing_macro_index = 0; if (macro_list) { struct saved_macro *disposer = macro_list; executing_macro = macro_list->string; executing_macro_index = macro_list->index; macro_list = macro_list->next; free (disposer); } } /* Add a character to the macro being built. */ static void add_macro_char (c) int c; { if (current_macro_index + 1 >= current_macro_size) { if (!current_macro) current_macro = (char *)xmalloc (current_macro_size = 25); else current_macro = (char *)xrealloc (current_macro, current_macro_size += 25); } current_macro[current_macro_index++] = c; current_macro[current_macro_index] = '\0'; } /* Begin defining a keyboard macro. Keystrokes are recorded as they are executed. End the definition with rl_end_kbd_macro (). If a numeric argument was explicitly typed, then append this definition to the end of the existing macro, and start by re-executing the existing macro. */ rl_start_kbd_macro (ignore1, ignore2) int ignore1, ignore2; { if (defining_kbd_macro) rl_abort (); if (rl_explicit_arg) { if (current_macro) with_macro_input (savestring (current_macro)); } else current_macro_index = 0; defining_kbd_macro = 1; } /* Stop defining a keyboard macro. A numeric argument says to execute the macro right now, that many times, counting the definition as the first time. */ rl_end_kbd_macro (count, ignore) int count, ignore; { if (!defining_kbd_macro) rl_abort (); current_macro_index -= (rl_key_sequence_length - 1); current_macro[current_macro_index] = '\0'; defining_kbd_macro = 0; rl_call_last_kbd_macro (--count, 0); } /* Execute the most recently defined keyboard macro. COUNT says how many times to execute it. */ rl_call_last_kbd_macro (count, ignore) int count, ignore; { if (!current_macro) rl_abort (); while (count--) with_macro_input (savestring (current_macro)); } /* **************************************************************** */ /* */ /* Initializations */ /* */ /* **************************************************************** */ /* Initliaze readline (and terminal if not already). */ rl_initialize () { extern char *rl_display_prompt; /* If we have never been called before, initialize the terminal and data structures. */ if (!rl_initialized) { readline_initialize_everything (); rl_initialized++; } /* Initalize the current line information. */ rl_point = rl_end = 0; the_line = rl_line_buffer; the_line[0] = 0; /* We aren't done yet. We haven't even gotten started yet! */ rl_done = 0; /* Tell the history routines what is going on. */ start_using_history (); /* Make the display buffer match the state of the line. */ { extern char *rl_display_prompt; extern int forced_display; rl_on_new_line (); rl_display_prompt = rl_prompt ? rl_prompt : ""; forced_display = 1; } /* No such function typed yet. */ rl_last_func = (Function *)NULL; /* Parsing of key-bindings begins in an enabled state. */ parsing_conditionalized_out = 0; } /* Initialize the entire state of the world. */ readline_initialize_everything () { char* getenv(); rl_instream = stdin; rl_outstream = stdout; /* Find out if we are running in Emacs. */ running_in_emacs = getenv ("EMACS"); /* Allocate data structures. */ if (!rl_line_buffer) rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE); /* Initialize the terminal interface. */ init_terminal_io ((char *)NULL); /* Bind tty characters to readline functions. */ readline_default_bindings (); /* Initialize the function names. */ rl_initialize_funmap (); /* Read in the init file. */ rl_read_init_file ((char *)NULL); /* If the completion parser's default word break characters haven't been set yet, then do so now. */ { extern char *rl_completer_word_break_characters; extern char *rl_basic_word_break_characters; if (rl_completer_word_break_characters == (char *)NULL) rl_completer_word_break_characters = rl_basic_word_break_characters; } } /* If this system allows us to look at the values of the regular input editing characters, then bind them to their readline equivalents. */ readline_default_bindings () { #ifdef NEW_TTY_DRIVER struct sgttyb ttybuff; int tty = fileno (rl_instream); if (ioctl (tty, TIOCGETP, &ttybuff) != -1) { int erase = ttybuff.sg_erase, kill = ttybuff.sg_kill; if (erase != -1 && keymap[erase].type == ISFUNC) keymap[erase].function = rl_rubout; if (kill != -1 && keymap[kill].type == ISFUNC) keymap[kill].function = rl_unix_line_discard; } #ifdef TIOCGLTC { struct ltchars lt; if (ioctl (tty, TIOCGLTC, <) != -1) { int erase = lt.t_werasc, nextc = lt.t_lnextc; if (erase != -1 && keymap[erase].type == ISFUNC) keymap[erase].function = rl_unix_word_rubout; if (nextc != -1 && keymap[nextc].type == ISFUNC) keymap[nextc].function = rl_quoted_insert; } } #endif /* TIOCGLTC */ #else /* not NEW_TTY_DRIVER */ #if defined (_POSIX_VERSION) struct termios ttybuff; #else struct termio ttybuff; #endif /* POSIX */ int tty = fileno (rl_instream); #if defined (_POSIX_VERSION) if (tcgetattr (tty, &ttybuff) != -1) #else if (ioctl (tty, TCGETA, &ttybuff) != -1) #endif /* POSIX */ { int erase = ttybuff.c_cc[VERASE]; int kill = ttybuff.c_cc[VKILL]; if (erase != -1 && keymap[(unsigned char)erase].type == ISFUNC) keymap[(unsigned char)erase].function = rl_rubout; if (kill != -1 && keymap[(unsigned char)kill].type == ISFUNC) keymap[(unsigned char)kill].function = rl_unix_line_discard; } #endif /* NEW_TTY_DRIVER */ } /* **************************************************************** */ /* */ /* Numeric Arguments */ /* */ /* **************************************************************** */ /* Handle C-u style numeric args, as well as M--, and M-digits. */ /* Add the current digit to the argument in progress. */ rl_digit_argument (ignore, key) int ignore, key; { rl_pending_input = key; rl_digit_loop (); } /* What to do when you abort reading an argument. */ rl_discard_argument () { ding (); rl_clear_message (); rl_init_argument (); } /* Create a default argument. */ rl_init_argument () { rl_numeric_arg = arg_sign = 1; rl_explicit_arg = 0; } /* C-u, universal argument. Multiply the current argument by 4. Read a key. If the key has nothing to do with arguments, then dispatch on it. If the key is the abort character then abort. */ rl_universal_argument () { rl_numeric_arg *= 4; rl_digit_loop (); } void rl_digit_loop () { int key, c; while (1) { rl_message ("(arg: %d) ", arg_sign * rl_numeric_arg); key = c = rl_read_key (); if (keymap[c].type == ISFUNC && keymap[c].function == rl_universal_argument) { rl_numeric_arg *= 4; continue; } c = UNMETA (c); if (numeric (c)) { if (rl_explicit_arg) rl_numeric_arg = (rl_numeric_arg * 10) + (c - '0'); else rl_numeric_arg = (c - '0'); rl_explicit_arg = 1; } else { if (c == '-' && !rl_explicit_arg) { rl_numeric_arg = 1; arg_sign = -1; } else { rl_clear_message (); rl_dispatch (key, keymap); return; } } } } /* **************************************************************** */ /* */ /* Display stuff */ /* */ /* **************************************************************** */ /* This is the stuff that is hard for me. I never seem to write good display routines in C. Let's see how I do this time. */ /* (PWP) Well... Good for a simple line updater, but totally ignores the problems of input lines longer than the screen width. update_line and the code that calls it makes a multiple line, automatically wrapping line update. Carefull attention needs to be paid to the vertical position variables. handling of terminals with autowrap on (incl. DEC braindamage) could be improved a bit. Right now I just cheat and decrement screenwidth by one. */ /* Keep two buffers; one which reflects the current contents of the screen, and the other to draw what we think the new contents should be. Then compare the buffers, and make whatever changes to the screen itself that we should. Finally, make the buffer that we just drew into be the one which reflects the current contents of the screen, and place the cursor where it belongs. Commands that want to can fix the display themselves, and then let this function know that the display has been fixed by setting the RL_DISPLAY_FIXED variable. This is good for efficiency. */ /* Termcap variables: */ extern char *term_up, *term_dc, *term_cr; extern int screenheight, screenwidth, terminal_can_insert; /* What YOU turn on when you have handled all redisplay yourself. */ int rl_display_fixed = 0; /* The visible cursor position. If you print some text, adjust this. */ int last_c_pos = 0; int last_v_pos = 0; /* The last left edge of text that was displayed. This is used when doing horizontal scrolling. It shifts in thirds of a screenwidth. */ static int last_lmargin = 0; /* The line display buffers. One is the line currently displayed on the screen. The other is the line about to be displayed. */ static char *visible_line = (char *)NULL; static char *invisible_line = (char *)NULL; /* Number of lines currently on screen minus 1. */ int vis_botlin = 0; /* A buffer for `modeline' messages. */ char msg_buf[128]; /* Non-zero forces the redisplay even if we thought it was unnecessary. */ int forced_display = 0; /* The stuff that gets printed out before the actual text of the line. This is usually pointing to rl_prompt. */ char *rl_display_prompt = (char *)NULL; /* Default and initial buffer size. Can grow. */ static int line_size = 1024; /* Non-zero means to always use horizontal scrolling in line display. */ static int horizontal_scroll_mode = 0; /* Non-zero means to display an asterisk at the starts of history lines which have been modified. */ static int mark_modified_lines = 0; /* Non-zero means to use a visible bell if one is available rather than simply ringing the terminal bell. */ static int prefer_visible_bell = 0; /* I really disagree with this, but my boss (among others) insists that we support compilers that don't work. I don't think we are gaining by doing so; what is the advantage in producing better code if we can't use it? */ /* The following two declarations belong inside the function block, not here. */ static void move_cursor_relative (); static void output_some_chars (); static void output_character_function (); static int compare_strings (); /* Basic redisplay algorithm. */ void rl_redisplay () { register int in, out, c, linenum; register char *line = invisible_line; char *prompt_this_line; int c_pos = 0; int inv_botlin = 0; /* Number of lines in newly drawn buffer. */ extern int readline_echoing_p; if (!readline_echoing_p) return; if (!rl_display_prompt) rl_display_prompt = ""; if (!invisible_line) { visible_line = (char *)xmalloc (line_size); invisible_line = (char *)xmalloc (line_size); line = invisible_line; for (in = 0; in < line_size; in++) { visible_line[in] = 0; invisible_line[in] = 1; } rl_on_new_line (); } /* Draw the line into the buffer. */ c_pos = -1; /* Mark the line as modified or not. We only do this for history lines. */ out = 0; if (mark_modified_lines && current_history () && rl_undo_list) { line[out++] = '*'; line[out] = '\0'; } /* If someone thought that the redisplay was handled, but the currently visible line has a different modification state than the one about to become visible, then correct the callers misconception. */ if (visible_line[0] != invisible_line[0]) rl_display_fixed = 0; prompt_this_line = rindex (rl_display_prompt, '\n'); if (!prompt_this_line) prompt_this_line = rl_display_prompt; else { prompt_this_line++; if (forced_display) output_some_chars (rl_display_prompt, prompt_this_line - rl_display_prompt); } strncpy (line + out, prompt_this_line, strlen (prompt_this_line)); out += strlen (prompt_this_line); line[out] = '\0'; for (in = 0; in < rl_end; in++) { c = the_line[in]; if (out + 1 >= line_size) { line_size *= 2; visible_line = (char *)xrealloc (visible_line, line_size); invisible_line = (char *)xrealloc (invisible_line, line_size); line = invisible_line; } if (in == rl_point) c_pos = out; if (c > 127) { line[out++] = 'M'; line[out++] = '-'; line[out++] = c - 128; } #define DISPLAY_TABS #ifdef DISPLAY_TABS else if (c == '\t') { register int newout = (out | (int)7) + 1; while (out < newout) line[out++] = ' '; } #endif else if (c < 32) { line[out++] = 'C'; line[out++] = '-'; line[out++] = c + 64; } else line[out++] = c; } line[out] = '\0'; if (c_pos < 0) c_pos = out; /* PWP: now is when things get a bit hairy. The visible and invisible line buffers are really multiple lines, which would wrap every (screenwidth - 1) characters. Go through each in turn, finding the changed region and updating it. The line order is top to bottom. */ /* If we can move the cursor up and down, then use multiple lines, otherwise, let long lines display in a single terminal line, and horizontally scroll it. */ if (!horizontal_scroll_mode && term_up && *term_up) { int total_screen_chars = (screenwidth * screenheight); if (!rl_display_fixed || forced_display) { forced_display = 0; /* If we have more than a screenful of material to display, then only display a screenful. We should display the last screen, not the first. I'll fix this in a minute. */ if (out >= total_screen_chars) out = total_screen_chars - 1; /* Number of screen lines to display. */ inv_botlin = out / screenwidth; /* For each line in the buffer, do the updating display. */ for (linenum = 0; linenum <= inv_botlin; linenum++) update_line (linenum > vis_botlin ? "" : &visible_line[linenum * screenwidth], &invisible_line[linenum * screenwidth], linenum); /* We may have deleted some lines. If so, clear the left over blank ones at the bottom out. */ if (vis_botlin > inv_botlin) { char *tt; for (; linenum <= vis_botlin; linenum++) { tt = &visible_line[linenum * screenwidth]; move_vert (linenum); move_cursor_relative (0, tt); clear_to_eol ((linenum == vis_botlin)? strlen (tt) : screenwidth); } } vis_botlin = inv_botlin; /* Move the cursor where it should be. */ move_vert (c_pos / screenwidth); move_cursor_relative (c_pos % screenwidth, &invisible_line[(c_pos / screenwidth) * screenwidth]); } } else /* Do horizontal scrolling. */ { int lmargin; /* Always at top line. */ last_v_pos = 0; /* If the display position of the cursor would be off the edge of the screen, start the display of this line at an offset that leaves the cursor on the screen. */ if (c_pos - last_lmargin > screenwidth - 2) lmargin = (c_pos / (screenwidth / 3) - 2) * (screenwidth / 3); else if (c_pos - last_lmargin < 1) lmargin = ((c_pos - 1) / (screenwidth / 3)) * (screenwidth / 3); else lmargin = last_lmargin; /* If the first character on the screen isn't the first character in the display line, indicate this with a special character. */ if (lmargin > 0) line[lmargin] = '<'; if (lmargin + screenwidth < out) line[lmargin + screenwidth - 1] = '>'; if (!rl_display_fixed || forced_display || lmargin != last_lmargin) { forced_display = 0; update_line (&visible_line[last_lmargin], &invisible_line[lmargin], 0); move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]); last_lmargin = lmargin; } } fflush (out_stream); /* Swap visible and non-visible lines. */ { char *temp = visible_line; visible_line = invisible_line; invisible_line = temp; rl_display_fixed = 0; } } /* PWP: update_line() is based on finding the middle difference of each line on the screen; vis: /old first difference /beginning of line | /old last same /old EOL v v v v old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as new: eddie> Oh, my little buggy says to me, as lurgid as ^ ^ ^ ^ \beginning of line | \new last same \new end of line \new first difference All are character pointers for the sake of speed. Special cases for no differences, as well as for end of line additions must be handeled. Could be made even smarter, but this works well enough */ static void update_line (old, new, current_line) register char *old, *new; int current_line; { register char *ofd, *ols, *oe, *nfd, *nls, *ne; int lendiff, wsatend; /* Find first difference. */ for (ofd = old, nfd = new; (ofd - old < screenwidth) && *ofd && (*ofd == *nfd); ofd++, nfd++) ; /* Move to the end of the screen line. */ for (oe = ofd; ((oe - old) < screenwidth) && *oe; oe++); for (ne = nfd; ((ne - new) < screenwidth) && *ne; ne++); /* If no difference, continue to next line. */ if (ofd == oe && nfd == ne) return; wsatend = 1; /* flag for trailing whitespace */ ols = oe - 1; /* find last same */ nls = ne - 1; while ((ols > ofd) && (nls > nfd) && (*ols == *nls)) { if (*ols != ' ') wsatend = 0; ols--; nls--; } if (wsatend) { ols = oe; nls = ne; } else if (*ols != *nls) { if (*ols) /* don't step past the NUL */ ols++; if (*nls) nls++; } move_vert (current_line); move_cursor_relative (ofd - old, old); /* if (len (new) > len (old)) */ lendiff = (nls - nfd) - (ols - ofd); /* Insert (diff(len(old),len(new)) ch */ if (lendiff > 0) { if (terminal_can_insert) { extern char *term_IC; /* Sometimes it is cheaper to print the characters rather than use the terminal's capabilities. */ if ((2 * (ne - nfd)) < lendiff && !term_IC) { output_some_chars (nfd, (ne - nfd)); last_c_pos += (ne - nfd); } else { if (*ols) { insert_some_chars (nfd, lendiff); last_c_pos += lendiff; } else { /* At the end of a line the characters do not have to be "inserted". They can just be placed on the screen. */ output_some_chars (nfd, lendiff); last_c_pos += lendiff; } /* Copy (new) chars to screen from first diff to last match. */ if (((nls - nfd) - lendiff) > 0) { output_some_chars (&nfd[lendiff], ((nls - nfd) - lendiff)); last_c_pos += ((nls - nfd) - lendiff); } } } else { /* cannot insert chars, write to EOL */ output_some_chars (nfd, (ne - nfd)); last_c_pos += (ne - nfd); } } else /* Delete characters from line. */ { /* If possible and inexpensive to use terminal deletion, then do so. */ if (term_dc && (2 * (ne - nfd)) >= (-lendiff)) { if (lendiff) delete_chars (-lendiff); /* delete (diff) characters */ /* Copy (new) chars to screen from first diff to last match */ if ((nls - nfd) > 0) { output_some_chars (nfd, (nls - nfd)); last_c_pos += (nls - nfd); } } /* Otherwise, print over the existing material. */ else { output_some_chars (nfd, (ne - nfd)); last_c_pos += (ne - nfd); clear_to_eol ((oe - old) - (ne - new)); } } } /* (PWP) tell the update routines that we have moved onto a new (empty) line. */ rl_on_new_line () { if (visible_line) visible_line[0] = '\0'; last_c_pos = last_v_pos = 0; vis_botlin = last_lmargin = 0; } /* Actually update the display, period. */ rl_forced_update_display () { if (visible_line) { register char *temp = visible_line; while (*temp) *temp++ = '\0'; } rl_on_new_line (); forced_display++; rl_redisplay (); } /* Move the cursor from last_c_pos to NEW, which are buffer indices. DATA is the contents of the screen line of interest; i.e., where the movement is being done. */ static void move_cursor_relative (new, data) int new; char *data; { register int i; /* It may be faster to output a CR, and then move forwards instead of moving backwards. */ if (new + 1 < last_c_pos - new) { tputs (term_cr, 1, output_character_function); last_c_pos = 0; } if (last_c_pos == new) return; if (last_c_pos < new) { /* Move the cursor forward. We do it by printing the command to move the cursor forward if there is one, else print that portion of the output buffer again. Which is cheaper? */ /* The above comment is left here for posterity. It is faster to print one character (non-control) than to print a control sequence telling the terminal to move forward one character. That kind of control is for people who don't know what the data is underneath the cursor. */ #ifdef HACK_TERMCAP_MOTION extern char *term_forward_char; if (term_forward_char) for (i = last_c_pos; i < new; i++) tputs (term_forward_char, 1, output_character_function); else for (i = last_c_pos; i < new; i++) putc (data[i], out_stream); #else for (i = last_c_pos; i < new; i++) putc (data[i], out_stream); #endif /* HACK_TERMCAP_MOTION */ } else backspace (last_c_pos - new); last_c_pos = new; } /* PWP: move the cursor up or down. */ void move_vert (to) int to; { void output_character_function (); register int delta, i; if (last_v_pos == to) return; if (to > screenheight) return; if ((delta = to - last_v_pos) > 0) { for (i = 0; i < delta; i++) putc ('\n', out_stream); tputs (term_cr, 1, output_character_function); last_c_pos = 0; /* because crlf() will do \r\n */ } else { /* delta < 0 */ if (term_up && *term_up) for (i = 0; i < -delta; i++) tputs (term_up, 1, output_character_function); } last_v_pos = to; /* now to is here */ } /* Physically print C on out_stream. This is for functions which know how to optimize the display. */ rl_show_char (c) int c; { if (c > 127) { fprintf (out_stream, "M-"); c -= 128; } #ifdef DISPLAY_TABS if (c < 32 && c != '\t') #else if (c < 32) #endif { c += 64; } putc (c, out_stream); fflush (out_stream); } #ifdef DISPLAY_TABS int rl_character_len (c, pos) register int c, pos; { if (c < ' ' || c > 126) { if (c == '\t') return (((pos | (int)7) + 1) - pos); else return (3); } else return (1); } #else int rl_character_len (c) int c; { if (c < ' ' || c > 126) return (3); else return (1); } #endif /* DISPLAY_TAB */ /* How to print things in the "echo-area". The prompt is treated as a mini-modeline. */ rl_message (string, arg1, arg2) char *string; { sprintf (msg_buf, string, arg1, arg2); rl_display_prompt = msg_buf; rl_redisplay (); } /* How to clear things from the "echo-area". */ rl_clear_message () { rl_display_prompt = rl_prompt; rl_redisplay (); } /* **************************************************************** */ /* */ /* Terminal and Termcap */ /* */ /* **************************************************************** */ static char *term_buffer = (char *)NULL; static char *term_string_buffer = (char *)NULL; /* Non-zero means this terminal can't really do anything. */ int dumb_term = 0; /* Some strings to control terminal actions. These are output by tputs (). */ char *term_goto, *term_clreol, *term_cr, *term_clrpag, *term_backspace; int screenwidth, screenheight; /* Non-zero if we determine that the terminal can do character insertion. */ int terminal_can_insert = 0; /* How to insert characters. */ char *term_im, *term_ei, *term_ic, *term_ip, *term_IC; /* How to delete characters. */ char *term_dc, *term_DC; #ifdef HACK_TERMCAP_MOTION char *term_forward_char; #endif /* HACK_TERMCAP_MOTION */ /* How to go up a line. */ char *term_up; /* A visible bell, if the terminal can be made to flash the screen. */ char *visible_bell; /* Re-initialize the terminal considering that the TERM/TERMCAP variable has changed. */ rl_reset_terminal (terminal_name) char *terminal_name; { init_terminal_io (terminal_name); } void init_terminal_io (terminal_name) char *terminal_name; { char* getenv(); char *term = (terminal_name? terminal_name : getenv ("TERM")); char *tgetstr (), *buffer; #ifdef TIOCGWINSZ struct winsize window_size; #endif int tty; if (!term_string_buffer) term_string_buffer = (char *)xmalloc (2048); if (!term_buffer) term_buffer = (char *)xmalloc (2048); buffer = term_string_buffer; term_clrpag = term_cr = term_clreol = (char *)NULL; if (!term) term = "dumb"; #if defined(CYGWIN) /* some machines. eg. windows 98 se. hang for up to 30 seconds when HOME=/ because terminfo is looked for in $HOME/.terminfo and the // is a network call. So if TERMINFO is not an environment variable and term=xterm we set it to neuronhome/lib and get neuronhome/lib/x/xterm */ if (!getenv("TERMINFO") && strcmp(term, "xterm") == 0) { extern char* neuron_home; extern char* hoc_back2forward(); sprintf(term_buffer, "TERMINFO=%s/lib", hoc_back2forward(neuron_home)); putenv(term_buffer); } #endif if (tgetent (term_buffer, term) < 0) { dumb_term = 1; return; } tgetstr ("pc", &buffer); term_backspace = tgetstr ("le", &buffer); term_cr = tgetstr ("cr", &buffer); term_clreol = tgetstr ("ce", &buffer); term_clrpag = tgetstr ("cl", &buffer); if (!term_cr) term_cr = "\r"; #ifdef HACK_TERMCAP_MOTION term_forward_char = tgetstr ("nd", &buffer); #endif /* HACK_TERMCAP_MOTION */ if (rl_instream) tty = fileno (rl_instream); else tty = 0; screenwidth = screenheight = 0; #ifdef TIOCGWINSZ if (ioctl (tty, TIOCGWINSZ, &window_size) == 0) { screenwidth = (int) window_size.ws_col; screenheight = (int) window_size.ws_row; } #endif if (screenwidth <= 0 || screenheight <= 0) { screenwidth = tgetnum ("co"); screenheight = tgetnum ("li"); } screenwidth--; if (screenwidth <= 0) screenwidth = 79; if (screenheight <= 0) screenheight = 24; term_im = tgetstr ("im", &buffer); term_ei = tgetstr ("ei", &buffer); term_IC = tgetstr ("IC", &buffer); term_ic = tgetstr ("ic", &buffer); /* "An application program can assume that the terminal can do character insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is provided." But we can't do anything if only `ip' is provided, so... */ terminal_can_insert = (term_IC || term_im || term_ic); term_up = tgetstr ("up", &buffer); term_dc = tgetstr ("dc", &buffer); term_DC = tgetstr ("DC", &buffer); visible_bell = tgetstr ("vb", &buffer); } /* A function for the use of tputs () */ static void output_character_function (c) int c; { putc (c, out_stream); } /* Write COUNT characters from STRING to the output stream. */ static void output_some_chars (string, count) char *string; int count; { fwrite (string, 1, count, out_stream); } /* Delete COUNT characters from the display line. */ static void delete_chars (count) int count; { if (count > screenwidth) return; if (term_DC && *term_DC) { char *tgoto (), *buffer; buffer = tgoto (term_DC, 0, count); tputs (buffer, 1, output_character_function); } else { if (term_dc && *term_dc) while (count--) tputs (term_dc, 1, output_character_function); } } /* Insert COUNT characters from STRING to the output stream. */ static insert_some_chars (string, count) char *string; int count; { /* If IC is defined, then we do not have to "enter" insert mode. */ if (term_IC) { char *tgoto (), *buffer; buffer = tgoto (term_IC, 0, count); tputs (buffer, 1, output_character_function); output_some_chars (string, count); } else { register int i; /* If we have to turn on insert-mode, then do so. */ if (term_im && *term_im) tputs (term_im, 1, output_character_function); /* If there is a special command for inserting characters, then use that first to open up the space. */ if (term_ic && *term_ic) { for (i = count; i--; ) tputs (term_ic, 1, output_character_function); } /* Print the text. */ output_some_chars (string, count); /* If there is a string to turn off insert mode, we had best use it now. */ if (term_ei && *term_ei) tputs (term_ei, 1, output_character_function); } } /* Move the cursor back. */ backspace (count) int count; { register int i; if (term_backspace) for (i = 0; i < count; i++) tputs (term_backspace, 1, output_character_function); else for (i = 0; i < count; i++) putc ('\b', out_stream); } /* Move to the start of the next line. */ crlf () { tputs (term_cr, 1, output_character_function); putc ('\n', out_stream); } /* Clear to the end of the line. COUNT is the minimum number of character spaces to clear, */ clear_to_eol (count) int count; { if (term_clreol) { tputs (term_clreol, 1, output_character_function); } else { register int i; /* Do one more character space. */ count++; for (i = 0; i < count; i++) putc (' ', out_stream); backspace (count); } } /* **************************************************************** */ /* */ /* Saving and Restoring the TTY */ /* */ /* **************************************************************** */ /* Non-zero means that the terminal is in a prepped state. */ static int terminal_prepped = 0; #ifdef NEW_TTY_DRIVER /* Standard flags, including ECHO. */ static int original_tty_flags = 0; /* Local mode flags, like LPASS8. */ static int local_mode_flags = 0; /* Terminal characters. This has C-s and C-q in it. */ static struct tchars original_tchars; /* Local special characters. This has the interrupt characters in it. */ static struct ltchars original_ltchars; /* We use this to get and set the tty_flags. */ static struct sgttyb the_ttybuff; /* Put the terminal in CBREAK mode so that we can detect key presses. */ void rl_prep_terminal () { int tty = fileno (rl_instream); int oldmask = sigblock (sigmask (SIGINT)); if (!terminal_prepped) { /* We always get the latest tty values. Maybe stty changed them. */ ioctl (tty, TIOCGETP, &the_ttybuff); original_tty_flags = the_ttybuff.sg_flags; readline_echoing_p = (original_tty_flags & ECHO); #if defined (TIOCLGET) ioctl (tty, TIOCLGET, &local_mode_flags); #endif #if !defined (ANYP) #define ANYP (EVENP | ODDP) #endif /* If this terminal doesn't care how the 8th bit is used, then we can use it for the meta-key. We check by seeing if BOTH odd and even parity are allowed. */ if (the_ttybuff.sg_flags & ANYP) { #if defined (PASS8) the_ttybuff.sg_flags |= PASS8; #endif /* Hack on local mode flags if we can. */ #if defined (TIOCLGET) && defined (LPASS8) { int flags; flags = local_mode_flags | LPASS8; ioctl (tty, TIOCLSET, &flags); } #endif /* TIOCLGET && LPASS8 */ } #ifdef TIOCGETC { struct tchars temp; ioctl (tty, TIOCGETC, &original_tchars); temp = original_tchars; /* Get rid of C-s and C-q. We remember the value of startc (C-q) so that if the terminal is in xoff state, the user can xon it by pressing that character. */ xon_char = temp.t_startc; temp.t_stopc = -1; temp.t_startc = -1; /* If there is an XON character, bind it to restart the output. */ if (xon_char != -1) rl_bind_key (xon_char, rl_restart_output); /* If there is an EOF char, bind eof_char to it. */ if (temp.t_eofc != -1) eof_char = temp.t_eofc; #if defined (NOTDEF) /* Get rid of C-\ and C-c. */ temp.t_intrc = temp.t_quitc = -1; #endif /* NOTDEF */ ioctl (tty, TIOCSETC, &temp); } #endif /* TIOCGETC */ #ifdef TIOCGLTC { struct ltchars temp; ioctl (tty, TIOCGLTC, &original_ltchars); temp = original_ltchars; /* Make the interrupt keys go away. Just enough to make people happy. */ temp.t_dsuspc = -1; /* C-y */ temp.t_lnextc = -1; /* C-v */ ioctl (tty, TIOCSLTC, &temp); } #endif /* TIOCGLTC */ the_ttybuff.sg_flags &= (~ECHO|CRMOD); the_ttybuff.sg_flags |= CBREAK; ioctl (tty, TIOCSETN, &the_ttybuff); terminal_prepped = 1; } sigsetmask (oldmask); } /* Restore the terminal to its original state. */ rl_deprep_terminal () { int tty = fileno (rl_instream); int oldmask = sigblock (sigmask (SIGINT)); if (terminal_prepped) { the_ttybuff.sg_flags = original_tty_flags; ioctl (tty, TIOCSETN, &the_ttybuff); readline_echoing_p = 1; #if defined (TIOCLGET) ioctl (tty, TIOCLSET, &local_mode_flags); #endif #ifdef TIOCSLTC ioctl (tty, TIOCSLTC, &original_ltchars); #endif #ifdef TIOCSETC ioctl (tty, TIOCSETC, &original_tchars); #endif terminal_prepped = 0; } sigsetmask (oldmask); } #else /* !defined (NEW_TTY_DRIVER) */ #if !defined (VMIN) #define VMIN VEOF #endif #if !defined (VTIME) #define VTIME VEOL #endif #if defined (_POSIX_VERSION) static struct termios otio; #else static struct termio otio; #endif void rl_prep_terminal () { int tty = fileno (rl_instream); #if defined (_POSIX_VERSION) struct termios tio; #else struct termio tio; #endif /* If we are on a Posix system, block the delivery of SIGINT for a while. */ #if defined (_POSIX_VERSION) sigset_t set, oset; sigemptyset (&set); sigaddset (&set, SIGINT); sigprocmask (SIG_BLOCK, &set, &oset); #else # if defined (HAVE_BSD_SIGNALS) int oldmask = sigblock (sigmask (SIGINT)); # endif /* HAVE_BSD_SIGNALS */ #endif /* POSIX */ #if defined (_POSIX_VERSION) tcgetattr (tty, &tio); #else ioctl (tty, TCGETA, &tio); #endif /* POSIX */ otio = tio; readline_echoing_p = (tio.c_lflag & ECHO); tio.c_lflag &= ~(ICANON|ECHO); #if defined (IXANY) tio.c_iflag &= ~(IXON|IXOFF|IXANY); #else /* `strict' Posix systems do not define IXANY. */ tio.c_iflag &= ~(IXON|IXOFF); #endif /* IXANY */ /* Only turn this off if we are using all 8 bits. */ /* |ISTRIP|INPCK */ #if !defined (HANDLE_SIGNALS) tio.c_lflag &= ~ISIG; #else tio.c_lflag |= ISIG; /* shouldn't be needed, but... */ #endif tio.c_cc[VMIN] = 1; tio.c_cc[VTIME] = 0; /* Turn off characters that we need on Posix systems with job control, just to be sure. This includes ^Y and ^V. This should not really be necessary. */ #if defined (_POSIX_VERSION) && defined (_POSIX_JOB_CONTROL) #if !defined (_POSIX_VDISABLE) #define _POSIX_VDISABLE 0 #endif /* POSIX_VDISABLE */ #if defined (VLNEXT) tio.c_cc[VLNEXT] = _POSIX_VDISABLE; #endif #if defined (VDSUSP) tio.c_cc[VDSUSP] = _POSIX_VDISABLE; #endif #endif /* POSIX && JOB_CONTROL */ #if defined (_POSIX_VERSION) tcsetattr (tty, TCSADRAIN, &tio); tcflow (tty, TCOON); /* Simulate a ^Q. */ #else ioctl (tty, TCSETAW, &tio); ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ #endif /* POSIX */ #if defined (_POSIX_VERSION) sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); #else # if defined (HAVE_BSD_SIGNALS) sigsetmask (oldmask); # endif /* HAVE_BSD_SIGNALS */ #endif /* POSIX */ terminal_prepped = 1; } void rl_deprep_terminal () { int tty; /* If we are on a Posix system, block the delivery of SIGINT for a while. */ #if defined (_POSIX_VERSION) sigset_t set, oset; if (!terminal_prepped) return; sigemptyset (&set); sigaddset (&set, SIGINT); sigprocmask (SIG_BLOCK, &set, &oset); #else int oldmask; if (!terminal_prepped) return; # if defined (HAVE_BSD_SIGNALS) oldmask = sigblock (sigmask (SIGINT)); # endif /* HAVE_BSD_SIGNALS */ #endif /* POSIX */ tty = fileno (rl_instream); #if defined (_POSIX_VERSION) tcsetattr (tty, TCSADRAIN, &otio); tcflow (tty, TCOON); /* Simulate a ^Q. */ #else ioctl (tty, TCSETAW, &otio); ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ #endif /* POSIX */ #if defined (_POSIX_VERSION) sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); #else # if defined (HAVE_BSD_SIGNALS) sigsetmask (oldmask); # endif /* HAVE_BSD_SIGNALS */ #endif /* POSIX */ terminal_prepped = 0; } #endif /* NEW_TTY_DRIVER */ /* **************************************************************** */ /* */ /* Utility Functions */ /* */ /* **************************************************************** */ /* Return 0 if C is not a member of the class of characters that belong in words, or 1 if it is. */ int allow_pathname_alphabetic_chars = 0; char *pathname_alphabetic_chars = "/-_=~.#$"; int alphabetic (c) int c; { if (pure_alphabetic (c) || (numeric (c))) return (1); if (allow_pathname_alphabetic_chars) return (rindex (pathname_alphabetic_chars, c) != (char*)0); else return (0); } /* Return non-zero if C is a numeric character. */ int numeric (c) int c; { return (c >= '0' && c <= '9'); } /* Ring the terminal bell. */ int ding () { if (readline_echoing_p) { if (prefer_visible_bell && visible_bell) tputs (visible_bell, 1, output_character_function); else { fprintf (stderr, "\007"); fflush (stderr); } } return (-1); } /* How to abort things. */ rl_abort () { ding (); rl_clear_message (); rl_init_argument (); rl_pending_input = 0; defining_kbd_macro = 0; while (executing_macro) pop_executing_macro (); rl_last_func = (Function *)NULL; longjmp (readline_top_level, 1); } /* Return a copy of the string between FROM and TO. FROM is inclusive, TO is not. */ #if defined (sun) /* Yes, that's right, some crufty function in sunview is called rl_copy (). */ static #endif char * rl_copy (from, to) int from, to; { register int length; char *copy; /* Fix it if the caller is confused. */ if (from > to) { int t = from; from = to; to = t; } length = to - from; copy = (char *)xmalloc (1 + length); strncpy (copy, the_line + from, length); copy[length] = '\0'; return (copy); } /* **************************************************************** */ /* */ /* Insert and Delete */ /* */ /* **************************************************************** */ /* Insert a string of text into the line at point. This is the only way that you should do insertion. rl_insert () calls this function. */ rl_insert_text (string) char *string; { extern int doing_an_undo; register int i, l = strlen (string); while (rl_end + l >= rl_line_buffer_len) { rl_line_buffer = (char *)xrealloc (rl_line_buffer, rl_line_buffer_len += DEFAULT_BUFFER_SIZE); the_line = rl_line_buffer; } for (i = rl_end; i >= rl_point; i--) the_line[i + l] = the_line[i]; strncpy (the_line + rl_point, string, l); /* Remember how to undo this if we aren't undoing something. */ if (!doing_an_undo) { /* If possible and desirable, concatenate the undos. */ if ((strlen (string) == 1) && rl_undo_list && (rl_undo_list->what == UNDO_INSERT) && (rl_undo_list->end == rl_point) && (rl_undo_list->end - rl_undo_list->start < 20)) rl_undo_list->end++; else rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); } rl_point += l; rl_end += l; the_line[rl_end] = '\0'; } /* Delete the string between FROM and TO. FROM is inclusive, TO is not. */ rl_delete_text (from, to) int from, to; { extern int doing_an_undo; register char *text; /* Fix it if the caller is confused. */ if (from > to) { int t = from; from = to; to = t; } text = rl_copy (from, to); strncpy (the_line + from, the_line + to, rl_end - to); /* Remember how to undo this delete. */ if (!doing_an_undo) rl_add_undo (UNDO_DELETE, from, to, text); else free (text); rl_end -= (to - from); the_line[rl_end] = '\0'; } /* **************************************************************** */ /* */ /* Readline character functions */ /* */ /* **************************************************************** */ /* This is not a gap editor, just a stupid line input routine. No hair is involved in writing any of the functions, and none should be. */ /* Note that: rl_end is the place in the string that we would place '\0'; i.e., it is always safe to place '\0' there. rl_point is the place in the string where the cursor is. Sometimes this is the same as rl_end. Any command that is called interactively receives two arguments. The first is a count: the numeric arg pased to this command. The second is the key which invoked this command. */ /* **************************************************************** */ /* */ /* Movement Commands */ /* */ /* **************************************************************** */ /* Note that if you `optimize' the display for these functions, you cannot use said functions in other functions which do not do optimizing display. I.e., you will have to update the data base for rl_redisplay, and you might as well let rl_redisplay do that job. */ /* Move forward COUNT characters. */ void rl_forward (count) int count; { if (count < 0) rl_backward (-count); else while (count) { #ifdef VI_MODE if (rl_point == (rl_end - (rl_editing_mode == vi_mode))) #else if (rl_point == rl_end) #endif { ding (); return; } else rl_point++; --count; } } /* Move backward COUNT characters. */ void rl_backward (count) int count; { if (count < 0) rl_forward (-count); else while (count) { if (!rl_point) { ding (); return; } else --rl_point; --count; } } /* Move to the beginning of the line. */ rl_beg_of_line () { rl_point = 0; } /* Move to the end of the line. */ rl_end_of_line () { rl_point = rl_end; } /* Move forward a word. We do what Emacs does. */ void rl_forward_word (count) int count; { int c; if (count < 0) { rl_backward_word (-count); return; } while (count) { if (rl_point == rl_end) return; /* If we are not in a word, move forward until we are in one. Then, move forward until we hit a non-alphabetic character. */ c = the_line[rl_point]; if (!alphabetic (c)) { while (++rl_point < rl_end) { c = the_line[rl_point]; if (alphabetic (c)) break; } } if (rl_point == rl_end) return; while (++rl_point < rl_end) { c = the_line[rl_point]; if (!alphabetic (c)) break; } --count; } } /* Move backward a word. We do what Emacs does. */ void rl_backward_word (count) int count; { int c; if (count < 0) { rl_forward_word (-count); return; } while (count) { if (!rl_point) return; /* Like rl_forward_word (), except that we look at the characters just before point. */ c = the_line[rl_point - 1]; if (!alphabetic (c)) { while (--rl_point) { c = the_line[rl_point - 1]; if (alphabetic (c)) break; } } while (rl_point) { c = the_line[rl_point - 1]; if (!alphabetic (c)) break; else --rl_point; } --count; } } /* Clear the current line. Numeric argument to C-l does this. */ void rl_refresh_line () { int curr_line = last_c_pos / screenwidth; extern char *term_clreol; move_vert(curr_line); move_cursor_relative (0, the_line); /* XXX is this right */ if (term_clreol) tputs (term_clreol, 1, output_character_function); rl_forced_update_display (); rl_display_fixed = 1; } /* C-l typed to a line without quoting clears the screen, and then reprints the prompt and the current input line. Given a numeric arg, redraw only the current line. */ void rl_clear_screen () { extern char *term_clrpag; if (rl_explicit_arg) { rl_refresh_line (); return; } if (term_clrpag) tputs (term_clrpag, 1, output_character_function); else crlf (); rl_forced_update_display (); rl_display_fixed = 1; } void rl_arrow_keys(count,c) int count,c; { int ch = rl_read_key(); switch(ch) { case 'a': case 'A': rl_get_previous_history(count); return; case 'b': case 'B': rl_get_next_history(count); return; case 'c': case 'C': rl_forward(count); return; case 'd': case 'D': rl_backward(count); return; default: ding(); return; } } /* **************************************************************** */ /* */ /* Text commands */ /* */ /* **************************************************************** */ /* Insert the character C at the current location, moving point forward. */ void rl_insert (count, c) int count, c; { register int i; char *string; if (count <= 0) return; /* If we can optimize, then do it. But don't let people crash readline because of extra large arguments. */ if (count > 1 && count < 1024) { string = (char *)Alloca (1 + count); for (i = 0; i < count; i++) string[i] = c; string[i] = '\0'; rl_insert_text (string); #if NO_ALLOCA free(string); #endif return; } if (count > 1024) { int decreaser; string = (char *)Alloca (1024 + 1); for (i = 0; i < 1024; i++) string[i] = c; while (count) { decreaser = (count > 1024 ? 1024 : count); string[decreaser] = '\0'; rl_insert_text (string); count -= decreaser; } return; } /* We are inserting a single character. If there is pending input, then make a string of all of the pending characters that are bound to rl_insert, and insert them all. */ if (any_typein) { int key = 0, t; i = 0; string = (char *)Alloca (ibuffer_len + 1); string[i++] = c; while ((t = rl_get_char (&key)) && (keymap[key].type == ISFUNC && keymap[key].function == rl_insert)) string[i++] = key; if (t) rl_unget_char (key); string[i] = '\0'; rl_insert_text (string); return; } else { /* Inserting a single character. */ string = (char *)Alloca (2); string[1] = '\0'; string[0] = c; rl_insert_text (string); } #if NO_ALLOCA free(string); #endif } /* Insert the next typed character verbatim. */ rl_quoted_insert (count) int count; { int c = rl_read_key (); rl_insert (count, c); } /* Insert a tab character. */ rl_tab_insert (count) int count; { rl_insert (count, '\t'); } /* What to do when a NEWLINE is pressed. We accept the whole line. KEY is the key that invoked this command. I guess it could have meaning in the future. */ rl_newline (count, key) int count, key; { rl_done = 1; #ifdef VI_MODE { extern int vi_doing_insert; if (vi_doing_insert) { rl_end_undo_group (); vi_doing_insert = 0; } } #endif /* VI_MODE */ if (readline_echoing_p) { move_vert (vis_botlin); vis_botlin = 0; crlf (); fflush (out_stream); rl_display_fixed++; } } rl_clean_up_for_exit () { if (readline_echoing_p) { move_vert (vis_botlin); vis_botlin = 0; fflush (out_stream); rl_restart_output (); } } /* What to do for some uppercase characters, like meta characters, and some characters appearing in emacs_ctlx_keymap. This function is just a stub, you bind keys to it and the code in rl_dispatch () is special cased. */ rl_do_lowercase_version (ignore1, ignore2) int ignore1, ignore2; { } /* Rubout the character behind point. */ void rl_rubout (count) int count; { if (count < 0) { rl_delete (-count); return; } if (!rl_point) { ding (); return; } if (count > 1) { int orig_point = rl_point; rl_backward (count); rl_kill_text (orig_point, rl_point); } else { int c = the_line[--rl_point]; rl_delete_text (rl_point, rl_point + 1); if (rl_point == rl_end && alphabetic (c) && last_c_pos) { backspace (1); putc (' ', out_stream); backspace (1); last_c_pos--; visible_line[last_c_pos] = '\0'; rl_display_fixed++; } } } /* Delete the character under the cursor. Given a numeric argument, kill that many characters instead. */ void rl_delete (count, invoking_key) int count, invoking_key; { if (count < 0) { rl_rubout (-count); return; } if (rl_point == rl_end) { ding (); return; } if (count > 1) { int orig_point = rl_point; rl_forward (count); rl_kill_text (orig_point, rl_point); rl_point = orig_point; } else rl_delete_text (rl_point, rl_point + 1); } /* **************************************************************** */ /* */ /* Kill commands */ /* */ /* **************************************************************** */ /* The next two functions mimic unix line editing behaviour, except they save the deleted text on the kill ring. This is safer than not saving it, and since we have a ring, nobody should get screwed. */ /* This does what C-w does in Unix. We can't prevent people from using behaviour that they expect. */ rl_unix_word_rubout () { if (!rl_point) ding (); else { int orig_point = rl_point; while (rl_point && whitespace (the_line[rl_point - 1])) rl_point--; while (rl_point && !whitespace (the_line[rl_point - 1])) rl_point--; rl_kill_text (rl_point, orig_point); } } /* Here is C-u doing what Unix does. You don't *have* to use these key-bindings. We have a choice of killing the entire line, or killing from where we are to the start of the line. We choose the latter, because if you are a Unix weenie, then you haven't backspaced into the line at all, and if you aren't, then you know what you are doing. */ rl_unix_line_discard () { if (!rl_point) ding (); else { rl_kill_text (rl_point, 0); rl_point = 0; } } /* **************************************************************** */ /* */ /* Commands For Typos */ /* */ /* **************************************************************** */ /* Random and interesting things in here. */ /* **************************************************************** */ /* */ /* Changing Case */ /* */ /* **************************************************************** */ /* The three kinds of things that we know how to do. */ #define UpCase 1 #define DownCase 2 #define CapCase 3 /* Uppercase the word at point. */ rl_upcase_word (count) int count; { rl_change_case (count, UpCase); } /* Lowercase the word at point. */ rl_downcase_word (count) int count; { rl_change_case (count, DownCase); } /* Upcase the first letter, downcase the rest. */ rl_capitalize_word (count) int count; { rl_change_case (count, CapCase); } /* The meaty function. Change the case of COUNT words, performing OP on them. OP is one of UpCase, DownCase, or CapCase. If a negative argument is given, leave point where it started, otherwise, leave it where it moves to. */ rl_change_case (count, op) int count, op; { register int start = rl_point, end; int state = 0; rl_forward_word (count); end = rl_point; if (count < 0) { int temp = start; start = end; end = temp; } /* We are going to modify some text, so let's prepare to undo it. */ rl_modifying (start, end); for (; start < end; start++) { switch (op) { case UpCase: the_line[start] = to_upper (the_line[start]); break; case DownCase: the_line[start] = to_lower (the_line[start]); break; case CapCase: if (state == 0) { the_line[start] = to_upper (the_line[start]); state = 1; } else { the_line[start] = to_lower (the_line[start]); } if (!pure_alphabetic (the_line[start])) state = 0; break; default: abort (); } } rl_point = end; } /* **************************************************************** */ /* */ /* Transposition */ /* */ /* **************************************************************** */ /* Transpose the words at point. */ void rl_transpose_words (count) int count; { char *word1, *word2; int w1_beg, w1_end, w2_beg, w2_end; int orig_point = rl_point; if (!count) return; /* Find the two words. */ rl_forward_word (count); w2_end = rl_point; rl_backward_word (1); w2_beg = rl_point; rl_backward_word (count); w1_beg = rl_point; rl_forward_word (1); w1_end = rl_point; /* Do some check to make sure that there really are two words. */ if ((w1_beg == w2_beg) || (w2_beg < w1_end)) { ding (); rl_point = orig_point; return; } /* Get the text of the words. */ word1 = rl_copy (w1_beg, w1_end); word2 = rl_copy (w2_beg, w2_end); /* We are about to do many insertions and deletions. Remember them as one operation. */ rl_begin_undo_group (); /* Do the stuff at word2 first, so that we don't have to worry about word1 moving. */ rl_point = w2_beg; rl_delete_text (w2_beg, w2_end); rl_insert_text (word1); rl_point = w1_beg; rl_delete_text (w1_beg, w1_end); rl_insert_text (word2); /* This is exactly correct since the text before this point has not changed in length. */ rl_point = w2_end; /* I think that does it. */ rl_end_undo_group (); free (word1); free (word2); } /* Transpose the characters at point. If point is at the end of the line, then transpose the characters before point. */ void rl_transpose_chars (count) int count; { if (!count) return; if (!rl_point || rl_end < 2) { ding (); return; } while (count) { if (rl_point == rl_end) { int t = the_line[rl_point - 1]; the_line[rl_point - 1] = the_line[rl_point - 2]; the_line[rl_point - 2] = t; } else { int t = the_line[rl_point]; the_line[rl_point] = the_line[rl_point - 1]; the_line[rl_point - 1] = t; if (count < 0 && rl_point) rl_point--; else rl_point++; } if (count < 0) count++; else count--; } } /* **************************************************************** */ /* */ /* Bogus Flow Control */ /* */ /* **************************************************************** */ rl_restart_output (count, key) int count, key; { int fildes = fileno (stdin); #if defined (TIOCSTART) #if defined (apollo) ioctl (&fildes, TIOCSTART, 0); #else ioctl (fildes, TIOCSTART, 0); #endif /* apollo */ #else # if defined (TCXONC) ioctl (fildes, TCXONC, TCOON); # endif /* TCXONC */ #endif /* TIOCSTART */ } /* **************************************************************** */ /* */ /* Completion matching, from readline's point of view. */ /* */ /* **************************************************************** */ /* Pointer to the generator function for completion_matches (). NULL means to use filename_entry_function (), the default filename completer. */ Function *rl_completion_entry_function = (Function *)NULL; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. START and END are indices in RL_LINE_BUFFER saying what the boundaries of TEXT are. If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ PFunction *rl_attempted_completion_function = (PFunction *)NULL; /* Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see completion_matches ()). The default is to do filename completion. */ rl_complete (ignore, invoking_key) int ignore, invoking_key; { if (rl_last_func == rl_complete) rl_complete_internal ('?'); else rl_complete_internal (TAB); } /* List the possible completions. See description of rl_complete (). */ rl_possible_completions () { rl_complete_internal ('?'); } /* The user must press "y" or "n". Non-zero return means "y" pressed. */ get_y_or_n () { int c; loop: c = rl_read_key (); if (c == 'y' || c == 'Y') return (1); if (c == 'n' || c == 'N') return (0); if (c == ABORT_CHAR) rl_abort (); ding (); goto loop; } /* Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. */ int rl_completion_query_items = 100; /* The basic list of characters that signal a break between words for the completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ char *rl_basic_word_break_characters = " \t\n\"\\'`@$><="; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ char *rl_completer_word_break_characters = (char *)NULL; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ char *rl_special_prefixes = (char *)NULL; /* If non-zero, then disallow duplicates in the matches. */ int rl_ignore_completion_duplicates = 1; /* Non-zero means that the results of the matches are to be treated as filenames. This is ALWAYS zero on entry, and can only be changed within a completion entry finder function. */ int rl_filename_completion_desired = 0; /* This function, if defined, is called by the completer when real filename completion is done, after all the matching names have been generated. It is passed a (char**) known as matches in the code below. It consists of a NULL-terminated array of pointers to potential matching strings. The 1st element (matches[0]) is the maximal substring that is common to all matches. This function can re-arrange the list of matches as required, but all elements of the array must be free()'d if they are deleted. The main intent of this function is to implement FIGNORE a la SunOS csh. */ Function *rl_ignore_some_completions_function = (Function *)NULL; /* Complete the word at or before point. WHAT_TO_DO says what to do with the completion. `?' means list the possible completions. TAB means do standard completion. `*' means insert all of the possible completions. */ rl_complete_internal (what_to_do) int what_to_do; { char *filename_completion_function (); char **completion_matches (), **matches; Function *our_func; int start, end, delimiter = 0; char *text; if (rl_completion_entry_function) our_func = rl_completion_entry_function; else our_func = (int (*)())filename_completion_function; /* Only the completion entry function can change this. */ rl_filename_completion_desired = 0; /* We now look backwards for the start of a filename/variable word. */ end = rl_point; if (rl_point) { while (--rl_point && !rindex (rl_completer_word_break_characters, the_line[rl_point])); /* If we are at a word break, then advance past it. */ if (rindex (rl_completer_word_break_characters, (the_line[rl_point]))) { /* If the character that caused the word break was a quoting character, then remember it as the delimiter. */ if (rindex ("\"'", the_line[rl_point]) && (end - rl_point) > 1) delimiter = the_line[rl_point]; /* If the character isn't needed to determine something special about what kind of completion to perform, then advance past it. */ if (!rl_special_prefixes || !rindex (rl_special_prefixes, the_line[rl_point])) rl_point++; } } start = rl_point; rl_point = end; text = rl_copy (start, end); /* If the user wants to TRY to complete, but then wants to give up and use the default completion function, they set the variable rl_attempted_completion_function. */ if (rl_attempted_completion_function) { matches = (char **)(*rl_attempted_completion_function) (text, start, end); if (matches) { our_func = (Function *)NULL; goto after_usual_completion; } } matches = completion_matches (text, our_func); after_usual_completion: free (text); if (!matches) ding (); else { register int i; some_matches: /* It seems to me that in all the cases we handle we would like to ignore duplicate possiblilities. Scan for the text to insert being identical to the other completions. */ if (rl_ignore_completion_duplicates) { char *lowest_common; int j, newlen = 0; /* Sort the items. */ /* It is safe to sort this array, because the lowest common denominator found in matches[0] will remain in place. */ for (i = 0; matches[i]; i++); qsort (matches, i, sizeof (char *), compare_strings); /* Remember the lowest common denominator for it may be unique. */ lowest_common = savestring (matches[0]); for (i = 0; matches[i + 1]; i++) { if (strcmp (matches[i], matches[i + 1]) == 0) { free (matches[i]); matches[i] = (char *)-1; } else newlen++; } /* We have marked all the dead slots with (char *)-1. Copy all the non-dead entries into a new array. */ { char **temp_array = (char **)malloc ((3 + newlen) * sizeof (char *)); for (i = 1, j = 1; matches[i]; i++) { if (matches[i] != (char *)-1) temp_array[j++] = matches[i]; } temp_array[j] = (char *)NULL; if (matches[0] != (char *)-1) free (matches[0]); free (matches); matches = temp_array; } /* Place the lowest common denominator back in [0]. */ matches[0] = lowest_common; /* If there is one string left, and it is identical to the lowest common denominator, then the LCD is the string to insert. */ if (j == 2 && strcmp (matches[0], matches[1]) == 0) { free (matches[1]); matches[1] = (char *)NULL; } } switch (what_to_do) { case TAB: /* If we are matching filenames, then here is our chance to do clever processing by re-examining the list. Call the ignore function with the array as a parameter. It can munge the array, deleting matches as it desires */ if (rl_ignore_some_completions_function && our_func == (int (*)())filename_completion_function) (void)(*rl_ignore_some_completions_function)(matches); if (matches[0]) { rl_delete_text (start, rl_point); rl_point = start; rl_insert_text (matches[0]); } /* If there are more matches, ring the bell to indicate. If this was the only match, and we are hacking files, check the file to see if it was a directory. If so, add a '/' to the name. If not, and we are at the end of the line, then add a space. */ if (matches[1]) { ding (); /* There are other matches remaining. */ } else { char temp_string[2]; temp_string[0] = delimiter ? delimiter : ' '; temp_string[1] = '\0'; if (rl_filename_completion_desired) { struct stat finfo; char *tilde_expand (); char *filename = tilde_expand (matches[0]); if ((stat (filename, &finfo) == 0) && ((finfo.st_mode & S_IFMT) == S_IFDIR)) { if (the_line[rl_point] != '/') rl_insert_text ("/"); } else { if (rl_point == rl_end) rl_insert_text (temp_string); } free (filename); } else { if (rl_point == rl_end) rl_insert_text (temp_string); } } break; case '*': { int i = 1; rl_delete_text (start, rl_point); rl_point = start; rl_begin_undo_group (); if (matches[1]) { while (matches[i]) { rl_insert_text (matches[i++]); rl_insert_text (" "); } } else { rl_insert_text (matches[0]); rl_insert_text (" "); } rl_end_undo_group (); } break; case '?': { int len, count, limit, max = 0; int j, k, l; /* Handle simple case first. What if there is only one answer? */ if (!matches[1]) { char *temp; if (rl_filename_completion_desired) temp = rindex (matches[0], '/'); else temp = (char *)NULL; if (!temp) temp = matches[0]; else temp++; crlf (); fprintf (out_stream, "%s", temp); crlf (); goto restart; } /* There is more than one answer. Find out how many there are, and find out what the maximum printed length of a single entry is. */ for (i = 1; matches[i]; i++) { char *temp = (char *)NULL; /* If we are hacking filenames, then only count the characters after the last slash in the pathname. */ if (rl_filename_completion_desired) temp = rindex (matches[i], '/'); else temp = (char *)NULL; if (!temp) temp = matches[i]; else temp++; if (strlen (temp) > max) max = strlen (temp); } len = i; /* If there are many items, then ask the user if she really wants to see them all. */ if (len >= rl_completion_query_items) { crlf (); fprintf (out_stream, "There are %d possibilities. Do you really", len); crlf (); fprintf (out_stream, "wish to see them all? (y or n)"); fflush (out_stream); if (!get_y_or_n ()) { crlf (); goto restart; } } /* How many items of MAX length can we fit in the screen window? */ max += 2; limit = screenwidth / max; if (limit != 1 && (limit * max == screenwidth)) limit--; /* Avoid a possible floating exception. If max > screenwidth, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) limit = 1; /* How many iterations of the printing loop? */ count = (len + (limit - 1)) / limit; /* Watch out for special case. If LEN is less than LIMIT, then just do the inner printing loop. */ if (len < limit) count = 1; /* Sort the items if they are not already sorted. */ if (!rl_ignore_completion_duplicates) qsort (matches, len, sizeof (char *), compare_strings); /* Print the sorted items, up-and-down alphabetically, like ls might. */ crlf (); for (i = 1; i < count + 1; i++) { for (j = 0, l = i; j < limit; j++) { if (l > len || !matches[l]) { break; } else { char *temp = (char *)NULL; if (rl_filename_completion_desired) temp = rindex (matches[l], '/'); else temp = (char *)NULL; if (!temp) temp = matches[l]; else temp++; fprintf (out_stream, "%s", temp); for (k = 0; k < max - strlen (temp); k++) putc (' ', out_stream); } l += count; } crlf (); } restart: rl_on_new_line (); } break; default: abort (); } for (i = 0; matches[i]; i++) free (matches[i]); free (matches); } } /* Stupid comparison routine for qsort () ing strings. */ static int compare_strings (s1, s2) char **s1, **s2; { return (strcmp (*s1, *s2)); } /* A completion function for usernames. TEXT contains a partial username preceded by a random character (usually `~'). */ char * username_completion_function (text, state) int state; char *text; { static char *username = (char *)NULL; static struct passwd *entry; static int namelen, first_char, first_char_loc; if (!state) { if (username) free (username); first_char = *text; if (first_char == '~') first_char_loc = 1; else first_char_loc = 0; username = savestring (&text[first_char_loc]); namelen = strlen (username); setpwent (); } while (entry = getpwent ()) { if (strncmp (username, entry->pw_name, namelen) == 0) break; } if (!entry) { endpwent (); return ((char *)NULL); } else { char *value = (char *)xmalloc (2 + strlen (entry->pw_name)); *value = *text; strcpy (value + first_char_loc, entry->pw_name); if (first_char == '~') rl_filename_completion_desired = 1; return (value); } } /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ PFunction *rl_tilde_expander = (PFunction *)NULL; /* Expand FILENAME if it begins with a tilde. This always returns a new string. */ char * tilde_expand (filename) char *filename; { char *dirname = filename ? savestring (filename) : (char *)NULL; if (dirname && *dirname == '~') { char *temp_name; if (!dirname[1] || dirname[1] == '/') { /* Prepend $HOME to the rest of the string. */ char* getenv(); char *temp_home = getenv ("HOME"); temp_name = (char *)Alloca (1 + strlen (&dirname[1]) + (temp_home? strlen (temp_home) : 0)); temp_name[0] = '\0'; if (temp_home) strcpy (temp_name, temp_home); strcat (temp_name, &dirname[1]); free (dirname); dirname = savestring (temp_name); #if NO_ALLOCA free(temp_name); #endif } else { struct passwd *getpwnam (), *user_entry; char *username = (char *)Alloca (257); int i, c; for (i = 1; c = dirname[i]; i++) { if (c == '/') break; else username[i - 1] = c; } username[i - 1] = '\0'; if (!(user_entry = getpwnam (username))) { /* If the calling program has a special syntax for expanding tildes, and we couldn't find a standard expansion, then let them try. */ if (rl_tilde_expander) { char *expansion; expansion = (char *)(*rl_tilde_expander) (username); if (expansion) { temp_name = (char *)Alloca (1 + strlen (expansion) + strlen (&dirname[i])); strcpy (temp_name, expansion); strcat (temp_name, &dirname[i]); free (expansion); goto return_name; } } /* * We shouldn't report errors. */ } else { temp_name = (char *)Alloca (1 + strlen (user_entry->pw_dir) + strlen (&dirname[i])); strcpy (temp_name, user_entry->pw_dir); strcat (temp_name, &dirname[i]); return_name: free (dirname); dirname = savestring (temp_name); #if NO_ALLOCA free(temp_name); #endif } endpwent (); #if NO_ALLOCA free(username); #endif } } return (dirname); } /* **************************************************************** */ /* */ /* Undo, and Undoing */ /* */ /* **************************************************************** */ /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ int doing_an_undo = 0; /* The current undo list for THE_LINE. */ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; /* Remember how to undo something. Concatenate some undos if that seems right. */ rl_add_undo (what, start, end, text) enum undo_code what; int start, end; char *text; { UNDO_LIST *temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST)); temp->what = what; temp->start = start; temp->end = end; temp->text = text; temp->next = rl_undo_list; rl_undo_list = temp; } /* Free the existing undo list. */ free_undo_list () { while (rl_undo_list) { UNDO_LIST *release = rl_undo_list; rl_undo_list = rl_undo_list->next; if (release->what == UNDO_DELETE) free (release->text); free (release); } } /* Undo the next thing in the list. Return 0 if there is nothing to undo, or non-zero if there was. */ int rl_do_undo () { UNDO_LIST *release; int waiting_for_begin = 0; undo_thing: if (!rl_undo_list) return (0); doing_an_undo = 1; switch (rl_undo_list->what) { /* Undoing deletes means inserting some text. */ case UNDO_DELETE: rl_point = rl_undo_list->start; rl_insert_text (rl_undo_list->text); free (rl_undo_list->text); break; /* Undoing inserts means deleting some text. */ case UNDO_INSERT: rl_delete_text (rl_undo_list->start, rl_undo_list->end); rl_point = rl_undo_list->start; break; /* Undoing an END means undoing everything 'til we get to a BEGIN. */ case UNDO_END: waiting_for_begin++; break; /* Undoing a BEGIN means that we are done with this group. */ case UNDO_BEGIN: if (waiting_for_begin) waiting_for_begin--; else abort (); break; } doing_an_undo = 0; release = rl_undo_list; rl_undo_list = rl_undo_list->next; free (release); if (waiting_for_begin) goto undo_thing; return (1); } /* Begin a group. Subsequent undos are undone as an atomic operation. */ rl_begin_undo_group () { rl_add_undo (UNDO_BEGIN, 0, 0, 0); } /* End an undo group started with rl_begin_undo_group (). */ rl_end_undo_group () { rl_add_undo (UNDO_END, 0, 0, 0); } /* Save an undo entry for the text from START to END. */ rl_modifying (start, end) int start, end; { if (start > end) { int t = start; start = end; end = t; } if (start != end) { char *temp = rl_copy (start, end); rl_begin_undo_group (); rl_add_undo (UNDO_DELETE, start, end, temp); rl_add_undo (UNDO_INSERT, start, end, (char *)NULL); rl_end_undo_group (); } } /* Revert the current line to its previous state. */ rl_revert_line () { if (!rl_undo_list) ding (); else { while (rl_undo_list) rl_do_undo (); } } /* Do some undoing of things that were done. */ void rl_undo_command (count) { if (count < 0) return; /* Nothing to do. */ while (count) { if (rl_do_undo ()) { count--; } else { ding (); break; } } } /* **************************************************************** */ /* */ /* History Utilities */ /* */ /* **************************************************************** */ /* We already have a history library, and that is what we use to control the history features of readline. However, this is our local interface to the history mechanism. */ /* While we are editing the history, this is the saved version of the original line. */ HIST_ENTRY *saved_line_for_history = (HIST_ENTRY *)NULL; /* Set the history pointer back to the last entry in the history. */ start_using_history () { using_history (); if (saved_line_for_history) free_history_entry (saved_line_for_history); saved_line_for_history = (HIST_ENTRY *)NULL; } /* Free the contents (and containing structure) of a HIST_ENTRY. */ void free_history_entry (entry) HIST_ENTRY *entry; { if (!entry) return; if (entry->line) free (entry->line); free (entry); } /* Perhaps put back the current line if it has changed. */ maybe_replace_line () { HIST_ENTRY *temp = current_history (); /* If the current line has changed, save the changes. */ if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) { temp = replace_history_entry (where_history (), the_line, rl_undo_list); free (temp->line); free (temp); } } /* Put back the saved_line_for_history if there is one. */ maybe_unsave_line () { if (saved_line_for_history) { strcpy (the_line, saved_line_for_history->line); rl_undo_list = (UNDO_LIST *)saved_line_for_history->data; free_history_entry (saved_line_for_history); saved_line_for_history = (HIST_ENTRY *)NULL; rl_end = rl_point = strlen (the_line); } else { ding (); } } /* Save the current line in saved_line_for_history. */ maybe_save_line () { if (!saved_line_for_history) { saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); saved_line_for_history->line = savestring (the_line); saved_line_for_history->data = (char *)rl_undo_list; } } /* **************************************************************** */ /* */ /* History Commands */ /* */ /* **************************************************************** */ /* Meta-< goes to the start of the history. */ rl_beginning_of_history () { rl_get_previous_history (1 + where_history ()); } /* Meta-> goes to the end of the history. (The current line). */ rl_end_of_history () { maybe_replace_line (); using_history (); maybe_unsave_line (); } /* Move down to the next history line. */ void rl_get_next_history (count) int count; { HIST_ENTRY *temp = (HIST_ENTRY *)NULL; if (count < 0) { rl_get_previous_history (-count); return; } if (!count) return; maybe_replace_line (); while (count) { temp = next_history (); if (!temp) break; --count; } if (!temp) maybe_unsave_line (); else { strcpy (the_line, temp->line); rl_undo_list = (UNDO_LIST *)temp->data; rl_end = rl_point = strlen (the_line); } } /* Get the previous item out of our interactive history, making it the current line. If there is no previous history, just ding. */ void rl_get_previous_history (count) int count; { HIST_ENTRY *old_temp = (HIST_ENTRY *)NULL; HIST_ENTRY *temp = (HIST_ENTRY *)NULL; if (count < 0) { rl_get_next_history (-count); return; } if (!count) return; /* If we don't have a line saved, then save this one. */ maybe_save_line (); /* If the current line has changed, save the changes. */ maybe_replace_line (); while (count) { temp = previous_history (); if (!temp) break; else old_temp = temp; --count; } /* If there was a large argument, and we moved back to the start of the history, that is not an error. So use the last value found. */ if (!temp && old_temp) temp = old_temp; if (!temp) ding (); else { strcpy (the_line, temp->line); rl_undo_list = (UNDO_LIST *)temp->data; rl_end = rl_point = strlen (the_line); #ifdef VI_MODE if (rl_editing_mode == vi_mode) rl_point = 0; #endif /* VI_MODE */ } } /* There is a command in the K*rn shell which yanks into this line, the last word of the previous line. Here it is. We left it on M-. */ rl_yank_previous_last_arg (ignore) int ignore; { } /* **************************************************************** */ /* */ /* I-Search and Searching */ /* */ /* **************************************************************** */ /* Search backwards through the history looking for a string which is typed interactively. Start with the current line. */ rl_reverse_search_history (sign, key) int sign; int key; { rl_search_history (-sign, key); } /* Search forwards through the history looking for a string which is typed interactively. Start with the current line. */ rl_forward_search_history (sign, key) int sign; int key; { rl_search_history (sign, key); } /* Display the current state of the search in the echo-area. SEARCH_STRING contains the string that is being searched for, DIRECTION is zero for forward, or 1 for reverse, WHERE is the history list number of the current line. If it is -1, then this line is the starting one. */ rl_display_search (search_string, reverse_p, where) char *search_string; int reverse_p, where; { char *message = (char *)NULL; message = (char *)Alloca (1 + (search_string ? strlen (search_string) : 0) + 30); *message = '\0'; #ifdef NEVER if (where != -1) sprintf (message, "[%d]", where + history_base); #endif strcat (message, "("); if (reverse_p) strcat (message, "reverse-"); strcat (message, "i-search)`"); if (search_string) strcat (message, search_string); strcat (message, "': "); rl_message (message, 0, 0); rl_redisplay (); #if NO_ALLOCA free(message); #endif } /* Search through the history looking for an interactively typed string. This is analogous to i-search. We start the search in the current line. DIRECTION is which direction to search; > 0 means forward, < 0 means backwards. */ void rl_search_history (direction, invoking_key) int direction; int invoking_key; { /* The string that the user types in to search for. */ char *search_string = (char *)Alloca (128); /* The current length of SEARCH_STRING. */ int search_string_index; /* The list of lines to search through. */ char **lines; /* The length of LINES. */ int hlen; /* Where we get LINES from. */ HIST_ENTRY **hlist = history_list (); register int i = 0; int orig_point = rl_point; int orig_line = where_history (); int last_found_line = orig_line; int c, done = 0; /* The line currently being searched. */ char *sline; /* Offset in that line. */ int index; /* Non-zero if we are doing a reverse search. */ int reverse = (direction < 0); /* Create an arrary of pointers to the lines that we want to search. */ maybe_replace_line (); if (hlist) for (i = 0; hlist[i]; i++); /* Allocate space for this many lines, +1 for the current input line, and remember those lines. */ lines = (char **)Alloca ((1 + (hlen = i)) * sizeof (char *)); for (i = 0; i < hlen; i++) lines[i] = hlist[i]->line; if (saved_line_for_history) lines[i] = saved_line_for_history->line; else { #if defined(IRIX) || defined(SGI) /* alloca on the SGI can't be assigned to a "non-simple" variable */ char* cp; cp = (char *)Alloca (1 + strlen (the_line)); lines[i] = cp; #else /* So I have to type it in this way instead. */ lines[i] = (char *)Alloca (1 + strlen (the_line)); #endif strcpy (lines[i], &the_line[0]); } hlen++; /* The line where we start the search. */ i = orig_line; /* Initialize search parameters. */ *search_string = '\0'; search_string_index = 0; rl_display_search (search_string, reverse, -1); sline = the_line; index = rl_point; while (!done) { c = rl_read_key (); /* Hack C to Do What I Mean. */ { Function *f = (Function *)NULL; if (keymap[c].type == ISFUNC) f = keymap[c].function; if (f == rl_reverse_search_history) c = reverse ? -1 : -2; else if (f == rl_forward_search_history) c = !reverse ? -1 : -2; } switch (c) { case ESC: done = 1; continue; /* case invoking_key: */ case -1: goto search_again; /* switch directions */ case -2: direction = -direction; reverse = (direction < 0); goto do_search; case CTRL ('G'): strcpy (the_line, lines[orig_line]); rl_point = orig_point; rl_end = strlen (the_line); rl_clear_message (); #if NO_ALLOCA free(search_string); free(lines); if (!saved_line_for_history) free(lines[hlen-1]); #endif return; default: if (c < 32 || c > 126) { rl_execute_next (c); done = 1; continue; } else { search_string[search_string_index++] = c; search_string[search_string_index] = '\0'; goto do_search; search_again: if (!search_string_index) continue; else { if (reverse) --index; else if (index != strlen (sline)) ++index; else ding (); } do_search: while (1) { if (reverse) { while (index >= 0) if (strncmp (search_string, sline + index, search_string_index) == 0) goto string_found; else index--; } else { register int limit = (strlen (sline) - search_string_index) + 1; while (index < limit) { if (strncmp (search_string, sline + index, search_string_index) == 0) goto string_found; index++; } } next_line: i += direction; /* At limit for direction? */ if ((reverse && i < 0) || (!reverse && i == hlen)) goto search_failed; sline = lines[i]; if (reverse) index = strlen (sline); else index = 0; /* If the search string is longer than the current line, no match. */ if (search_string_index > strlen (sline)) goto next_line; /* Start actually searching. */ if (reverse) index -= search_string_index; } search_failed: /* We cannot find the search string. Ding the bell. */ ding (); i = last_found_line; break; string_found: /* We have found the search string. Just display it. But don't actually move there in the history list until the user accepts the location. */ strcpy (the_line, lines[i]); rl_point = index; rl_end = strlen (the_line); last_found_line = i; rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i); } } continue; } /* The searching is over. The user may have found the string that she was looking for, or else she may have exited a failing search. If INDEX is -1, then that shows that the string searched for was not found. We use this to determine where to place rl_point. */ { int now = last_found_line; /* First put back the original state. */ strcpy (the_line, lines[orig_line]); if (now < orig_line) rl_get_previous_history (orig_line - now); else rl_get_next_history (now - orig_line); /* If the index of the "matched" string is less than zero, then the final search string was never matched, so put point somewhere reasonable. */ if (index < 0) index = strlen (the_line); rl_point = index; rl_clear_message (); } #if NO_ALLOCA free(search_string); free(lines); if (!saved_line_for_history) free(lines[hlen-1]); #endif } /* Make C be the next command to be executed. */ rl_execute_next (c) int c; { rl_pending_input = c; } /* **************************************************************** */ /* */ /* Killing Mechanism */ /* */ /* **************************************************************** */ /* What we assume for a max number of kills. */ #define DEFAULT_MAX_KILLS 10 /* The real variable to look at to find out when to flush kills. */ int rl_max_kills = DEFAULT_MAX_KILLS; /* Where to store killed text. */ char **rl_kill_ring = (char **)NULL; /* Where we are in the kill ring. */ int rl_kill_index = 0; /* How many slots we have in the kill ring. */ int rl_kill_ring_length = 0; /* How to say that you only want to save a certain amount of kill material. */ rl_set_retained_kills (num) int num; {} /* The way to kill something. This appends or prepends to the last kill, if the last command was a kill command. if FROM is less than TO, then the text is appended, otherwise prepended. If the last command was not a kill command, then a new slot is made for this kill. */ void rl_kill_text (from, to) int from, to; { int slot; char *text = rl_copy (from, to); /* Is there anything to kill? */ if (from == to) { free (text); last_command_was_kill++; return; } /* Delete the copied text from the line. */ rl_delete_text (from, to); /* First, find the slot to work with. */ if (!last_command_was_kill) { /* Get a new slot. */ if (!rl_kill_ring) { /* If we don't have any defined, then make one. */ rl_kill_ring = (char **) xmalloc (((rl_kill_ring_length = 1) + 1) * sizeof (char *)); slot = 1; } else { /* We have to add a new slot on the end, unless we have exceeded the max limit for remembering kills. */ slot = rl_kill_ring_length; if (slot == rl_max_kills) { register int i; free (rl_kill_ring[0]); for (i = 0; i < slot; i++) rl_kill_ring[i] = rl_kill_ring[i + 1]; } else { rl_kill_ring = (char **) xrealloc (rl_kill_ring, ((slot = (rl_kill_ring_length += 1)) + 1) * sizeof (char *)); } } slot--; } else { slot = rl_kill_ring_length - 1; } /* If the last command was a kill, prepend or append. */ if (last_command_was_kill && rl_editing_mode != vi_mode) { char *old = rl_kill_ring[slot]; char *new = (char *)xmalloc (1 + strlen (old) + strlen (text)); if (from < to) { strcpy (new, old); strcat (new, text); } else { strcpy (new, text); strcat (new, old); } free (old); free (text); rl_kill_ring[slot] = new; } else { rl_kill_ring[slot] = text; } rl_kill_index = slot; last_command_was_kill++; } /* Now REMEMBER! In order to do prepending or appending correctly, kill commands always make rl_point's original position be the FROM argument, and rl_point's extent be the TO argument. */ /* **************************************************************** */ /* */ /* Killing Commands */ /* */ /* **************************************************************** */ /* Delete the word at point, saving the text in the kill ring. */ rl_kill_word (count) int count; { int orig_point = rl_point; if (count < 0) rl_backward_kill_word (-count); else { rl_forward_word (count); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; } } /* Rubout the word before point, placing it on the kill ring. */ rl_backward_kill_word (count) int count; { int orig_point = rl_point; if (count < 0) rl_kill_word (-count); else { rl_backward_word (count); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); } } /* Kill from here to the end of the line. If DIRECTION is negative, kill back to the line start instead. */ rl_kill_line (direction) int direction; { int orig_point = rl_point; if (direction < 0) rl_backward_kill_line (1); else { rl_end_of_line (); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; } } /* Kill backwards to the start of the line. If DIRECTION is negative, kill forwards to the line end instead. */ rl_backward_kill_line (direction) int direction; { int orig_point = rl_point; if (direction < 0) rl_kill_line (1); else { if (!rl_point) ding (); else { rl_beg_of_line (); rl_kill_text (orig_point, rl_point); } } } /* Yank back the last killed text. This ignores arguments. */ rl_yank () { if (!rl_kill_ring) rl_abort (); rl_insert_text (rl_kill_ring[rl_kill_index]); } /* If the last command was yank, or yank_pop, and the text just before point is identical to the current kill item, then delete that text from the line, rotate the index down, and yank back some other text. */ rl_yank_pop () { int l; if (((rl_last_func != rl_yank_pop) && (rl_last_func != rl_yank)) || !rl_kill_ring) { rl_abort (); } l = strlen (rl_kill_ring[rl_kill_index]); if (((rl_point - l) >= 0) && (strncmp (the_line + (rl_point - l), rl_kill_ring[rl_kill_index], l) == 0)) { rl_delete_text ((rl_point - l), rl_point); rl_point -= l; rl_kill_index--; if (rl_kill_index < 0) rl_kill_index = rl_kill_ring_length - 1; rl_yank (); } else rl_abort (); } /* Yank the COUNTth argument from the previous history line. */ void rl_yank_nth_arg (count, ignore) int count; { register HIST_ENTRY *entry = previous_history (); char *arg; if (entry) next_history (); else { ding (); return; } arg = history_arg_extract (count, count, entry->line); if (!arg || !*arg) { ding (); return; } rl_begin_undo_group (); if (rl_point && the_line[rl_point - 1] != ' ') rl_insert_text (" "); rl_insert_text (arg); free (arg); rl_end_undo_group (); } /* Vi Mode. */ #ifdef VI_MODE #include "vi_mode.c" #endif /* VI_MODE */ /* How to toggle back and forth between editing modes. */ rl_vi_editing_mode () { #ifdef VI_MODE rl_editing_mode = vi_mode; rl_vi_insertion_mode (); #endif /* VI_MODE */ } rl_emacs_editing_mode () { rl_editing_mode = emacs_mode; keymap = emacs_standard_keymap; } /* **************************************************************** */ /* */ /* Completion */ /* */ /* **************************************************************** */ /* Non-zero means that case is not significant in completion. */ int completion_case_fold = 0; /* Return an array of (char *) which is a list of completions for TEXT. If there are no completions, return a NULL pointer. The first entry in the returned array is the substitution for TEXT. The remaining entries are the possible completions. The array is terminated with a NULL pointer. ENTRY_FUNCTION is a function of two args, and returns a (char *). The first argument is TEXT. The second is a state argument; it should be zero on the first call, and non-zero on subsequent calls. It returns a NULL pointer to the caller when there are no more matches. */ char ** completion_matches (text, entry_function) char *text; char *(*entry_function) (); { /* Number of slots in match_list. */ int match_list_size; /* The list of matches. */ char **match_list = (char **)xmalloc (((match_list_size = 10) + 1) * sizeof (char *)); /* Number of matches actually found. */ int matches = 0; /* Temporary string binder. */ char *string; match_list[1] = (char *)NULL; while (string = (*entry_function) (text, matches)) { if (matches + 1 == match_list_size) match_list = (char **)xrealloc (match_list, ((match_list_size += 10) + 1) * sizeof (char *)); match_list[++matches] = string; match_list[matches + 1] = (char *)NULL; } /* If there were any matches, then look through them finding out the lowest common denominator. That then becomes match_list[0]. */ if (matches) { register int i = 1; int low = 100000; /* Count of max-matched characters. */ /* If only one match, just use that. */ if (matches == 1) { match_list[0] = match_list[1]; match_list[1] = (char *)NULL; } else { /* Otherwise, compare each member of the list with the next, finding out where they stop matching. */ while (i < matches) { register int c1, c2, si; if (completion_case_fold) { for (si = 0; (c1 = to_lower(match_list[i][si])) && (c2 = to_lower(match_list[i + 1][si])); si++) if (c1 != c2) break; } else { for (si = 0; (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++) if (c1 != c2) break; } if (low > si) low = si; i++; } match_list[0] = (char *)xmalloc (low + 1); strncpy (match_list[0], match_list[1], low); match_list[0][low] = '\0'; } } else /* There were no matches. */ { free (match_list); match_list = (char **)NULL; } return (match_list); } /* Okay, now we write the entry_function for filename completion. In the general case. Note that completion in the shell is a little different because of all the pathnames that must be followed when looking up the completion for a command. */ char * filename_completion_function (text, state) int state; char *text; { static DIR *directory; static char *filename = (char *)NULL; static char *dirname = (char *)NULL; static char *users_dirname = (char *)NULL; static int filename_len; struct direct *entry = (struct direct *)NULL; /* If we don't have any state, then do some initialization. */ if (!state) { char *temp; if (dirname) free (dirname); if (filename) free (filename); if (users_dirname) free (users_dirname); filename = savestring (text); if (!*text) text = "."; dirname = savestring (text); temp = rindex (dirname, '/'); if (temp) { strcpy (filename, ++temp); *temp = '\0'; } else strcpy (dirname, "."); /* We aren't done yet. We also support the "~user" syntax. */ /* Save the version of the directory that the user typed. */ users_dirname = savestring (dirname); { char *tilde_expand (), *temp_dirname = tilde_expand (dirname); free (dirname); dirname = temp_dirname; if (rl_symbolic_link_hook) (*rl_symbolic_link_hook) (&dirname); } directory = opendir (dirname); filename_len = strlen (filename); rl_filename_completion_desired = 1; } /* At this point we should entertain the possibility of hacking wildcarded filenames, like /usr/man*\/te. If the directory name contains globbing characters, then build an array of directories to glob on, and glob on the first one. */ /* Now that we have some state, we can read the directory. */ while (directory && (entry = readdir (directory))) { /* Special case for no filename. All entries except "." and ".." match. */ if (!filename_len) { if ((strcmp (entry->d_name, ".") != 0) && (strcmp (entry->d_name, "..") != 0)) break; } else { /* Otherwise, if these match upto the length of filename, then it is a match. */ #if defined(LINUX) || defined(CYGWIN) if ((strlen(entry->d_name) >= filename_len) && #else if (((int)entry->d_namlen >= filename_len) && #endif (strncmp (filename, entry->d_name, filename_len) == 0)) { break; } } } if (!entry) { if (directory) { closedir (directory); directory = (DIR *)NULL; } return (char *)NULL; } else { char *temp; if (dirname && (strcmp (dirname, ".") != 0)) { temp = (char *)xmalloc (1 + strlen (users_dirname) #if defined(LINUX) || defined(CYGWIN) + strlen(entry->d_name)); #else + entry->d_namlen); #endif strcpy (temp, users_dirname); strcat (temp, entry->d_name); } else { temp = (savestring (entry->d_name)); } return (temp); } } /* **************************************************************** */ /* */ /* Binding keys */ /* */ /* **************************************************************** */ /* rl_add_defun (char *name, Function *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ rl_add_defun (name, function, key) char *name; Function *function; int key; { if (key != -1) rl_bind_key (key, function); rl_add_funmap_entry (name, function); } /* Bind KEY to FUNCTION. Returns non-zero if KEY is out of range. */ int rl_bind_key (key, function) int key; Function *function; { if (key < 0) return (key); if (key > 127 && key < 256) { if (keymap[ESC].type == ISKMAP) { Keymap escmap = (Keymap)keymap[ESC].function; key -= 128; escmap[key].type = ISFUNC; escmap[key].function = function; return (0); } return (key); } keymap[key].type = ISFUNC; keymap[key].function = function; return (0); } /* Bind KEY to FUNCTION in MAP. Returns non-zero in case of invalid KEY. */ int rl_bind_key_in_map (key, function, map) int key; Function *function; Keymap map; { int result; Keymap oldmap = keymap; keymap = map; result = rl_bind_key (key, function); keymap = oldmap; return (result); } /* Make KEY do nothing in the currently selected keymap. Returns non-zero in case of error. */ int rl_unbind_key (key) int key; { return (rl_bind_key (key, (Function *)NULL)); } /* Make KEY do nothing in MAP. Returns non-zero in case of error. */ int rl_unbind_key_in_map (key, map) int key; Keymap map; { return (rl_bind_key_in_map (key, (Function *)NULL, map)); } /* Bind the key sequence represented by the string KEYSEQ to FUNCTION. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ rl_set_key (keyseq, function, map) char *keyseq; Function *function; Keymap map; { rl_generic_bind (ISFUNC, keyseq, function, map); } /* Bind the key sequence represented by the string KEYSEQ to the string of characters MACRO. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ void rl_macro_bind (keyseq, macro, map) char *keyseq, *macro; Keymap map; { char *macro_keys = (char *)xmalloc (2 * (strlen (macro))); int macro_keys_len; if (rl_translate_keyseq (macro, macro_keys, ¯o_keys_len)) { free (macro_keys); return; } rl_generic_bind (ISMACR, keyseq, macro_keys, map); } /* Bind the key sequence represented by the string KEYSEQ to the arbitrary pointer DATA. TYPE says what kind of data is pointed to by DATA, right now this can be a function (ISFUNC), a macro (ISMACR), or a keymap (ISKMAP). This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ void rl_generic_bind (type, keyseq, data, map) int type; char *keyseq, *data; Keymap map; { char *keys; int keys_len; register int i; /* If no keys to bind to, exit right away. */ if (!keyseq || !*keyseq) { if (type == ISMACR) free (data); return; } keys = (char *)Alloca (1 + (2 * strlen (keyseq))); /* Translate the ASCII representation of KEYSEQ into an array of characters. Stuff the characters into ARRAY, and the length of ARRAY into LENGTH. */ if (rl_translate_keyseq (keyseq, keys, &keys_len)) { #if NO_ALLOCA free (keys); #endif return; } /* Bind keys, making new keymaps as necessary. */ for (i = 0; i < keys_len; i++) { if (i + 1 < keys_len) { if (map[keys[i]].type != ISKMAP) { if (map[i].type == ISMACR) free ((char *)map[i].function); map[keys[i]].type = ISKMAP; map[keys[i]].function = (Function *)rl_make_bare_keymap (); } map = (Keymap)map[keys[i]].function; } else { if (map[keys[i]].type == ISMACR) free ((char *)map[keys[i]].function); map[keys[i]].function = (Function *)data; map[keys[i]].type = type; } } #if NO_ALLOCA free (keys); #endif } /* Translate the ASCII representation of SEQ, stuffing the values into ARRAY, an array of characters. LEN gets the final length of ARRAY. Return non-zero if there was an error parsing SEQ. */ rl_translate_keyseq (seq, array, len) char *seq, *array; int *len; { register int i, c, l = 0; for (i = 0; c = seq[i]; i++) { if (c == '\\') { c = seq[++i]; if (!c) break; if (((c == 'C' || c == 'M') && seq[i + 1] == '-') || (c == 'e')) { /* Handle special case of backwards define. */ if (strncmp (&seq[i], "C-\\M-", 5) == 0) { array[l++] = ESC; i += 5; array[l++] = CTRL (to_upper (seq[i])); if (!seq[i]) i--; continue; } switch (c) { case 'M': i++; array[l++] = ESC; break; case 'C': i += 2; array[l++] = CTRL (to_upper (seq[i])); break; case 'e': array[l++] = ESC; } continue; } } array[l++] = c; } *len = l; array[l] = '\0'; return (0); } /* Return a pointer to the function that STRING represents. If STRING doesn't have a matching function, then a NULL pointer is returned. */ Function * rl_named_function (string) char *string; { register int i; for (i = 0; funmap[i]; i++) if (stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); return ((Function *)NULL); } /* The last key bindings file read. */ static char *last_readline_init_file = "~/.inputrc"; /* Re-read the current keybindings file. */ rl_re_read_init_file (count, ignore) int count, ignore; { rl_read_init_file ((char *)NULL); } /* Do key bindings from a file. If FILENAME is NULL it defaults to `~/.inputrc'. If the file existed and could be opened and read, 0 is returned, otherwise errno is returned. */ int rl_read_init_file (filename) char *filename; { register int i; char *buffer, *openname, *line, *end; struct stat finfo; long size; int file; /* Default the filename. */ if (!filename) filename = last_readline_init_file; openname = tilde_expand (filename); if ((stat (openname, &finfo) < 0) || (file = open (openname, O_RDONLY, 0666)) < 0) { free (openname); return (errno); } else free (openname); last_readline_init_file = filename; /* on mac os x 10.3.2 with upgrades, gcc 3.3, G5, and st_size is an int64, any expression such as finfo.st_size + 2 always is 0. This means a 0 size memory request which later on generates an EXC_BAD_ACCESS during malloc. The following line works around that error. */ size = (long)finfo.st_size; /* Read the file into BUFFER. */ buffer = (char *)xmalloc (size + 1); i = read (file, buffer, size); close (file); if (i != size) return (errno); /* Loop over the lines in the file. Lines that start with `#' are comments; all other lines are commands for readline initialization. */ line = buffer; end = buffer + size; while (line < end) { /* Find the end of this line. */ for (i = 0; line + i != end && line[i] != '\n'; i++); /* Mark end of line. */ line[i] = '\0'; /* If the line is not a comment, then parse it. */ if (*line != '#') rl_parse_and_bind (line); /* Move to the next line. */ line += i + 1; } return (0); } /* **************************************************************** */ /* */ /* Parser Directives */ /* */ /* **************************************************************** */ /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ char *rl_readline_name = "other"; /* Stack of previous values of parsing_conditionalized_out. */ static unsigned char *if_stack = (unsigned char *)NULL; static int if_stack_depth = 0; static int if_stack_size = 0; /* Push parsing_conditionalized_out, and set parser state based on ARGS. */ parser_if (args) char *args; { register int i; /* Push parser state. */ if (if_stack_depth + 1 >= if_stack_size) { if (!if_stack) if_stack = (unsigned char *)xmalloc (if_stack_size = 20); else if_stack = (unsigned char *)xrealloc (if_stack, if_stack_size += 20); } if_stack[if_stack_depth++] = parsing_conditionalized_out; /* We only check to see if the first word in ARGS is the same as the value stored in rl_readline_name. */ /* Isolate first argument. */ for (i = 0; args[i] && !whitespace (args[i]); i++); if (args[i]) args[i++] = '\0'; /* Handle "if term=foo" construct. If this isn't term=foo, then check to see if the first word in ARGS is the same as the value stored in rl_readline_name. */ if (rl_terminal_name && strnicmp (args, "term=", 5) == 0) { char *tem, *tname; /* Terminals like "aaa-60" are equivalent to "aaa". */ tname = savestring (rl_terminal_name); tem = rindex (tname, '-'); if (tem) *tem = '\0'; if (stricmp (args + 5, tname) == 0) parsing_conditionalized_out = 1; else parsing_conditionalized_out = 0; } else if (stricmp (args, rl_readline_name) == 0) parsing_conditionalized_out = 0; else parsing_conditionalized_out = 1; } /* Invert the current parser state if there is anything on the stack. */ parser_else (args) char *args; { if (if_stack_depth) parsing_conditionalized_out = !parsing_conditionalized_out; else { /* *** What, no error message? *** */ } } /* Terminate a conditional, popping the value of parsing_conditionalized_out from the stack. */ parser_endif (args) char *args; { if (if_stack_depth) parsing_conditionalized_out = if_stack[--if_stack_depth]; else { /* *** What, no error message? *** */ } } /* Associate textual names with actual functions. */ static struct { char *name; Function *function; } parser_directives [] = { { "if", parser_if }, { "endif", parser_endif }, { "else", parser_else }, { (char *)0x0, (Function *)0x0 } }; /* Handle a parser directive. STATEMENT is the line of the directive without any leading `$'. */ static int handle_parser_directive (statement) char *statement; { register int i; char *directive, *args; /* Isolate the actual directive. */ /* Skip whitespace. */ for (i = 0; whitespace (statement[i]); i++); directive = &statement[i]; for (; statement[i] && !whitespace (statement[i]); i++); if (statement[i]) statement[i++] = '\0'; for (; statement[i] && whitespace (statement[i]); i++); args = &statement[i]; /* Lookup the command, and act on it. */ for (i = 0; parser_directives[i].name; i++) if (stricmp (directive, parser_directives[i].name) == 0) { (*parser_directives[i].function) (args); return (0); } /* *** Should an error message be output? */ return (1); } /* Read the binding command from STRING and perform it. A key binding command looks like: Keyname: function-name\0, a variable binding command looks like: set variable value. A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark. */ void rl_parse_and_bind (string) char *string; { extern char *possible_control_prefixes[], *possible_meta_prefixes[]; char *funname, *kname; register int c; int key, i; if (!string || !*string || *string == '#') return; /* If this is a parser directive, act on it. */ if (*string == '$') { handle_parser_directive (&string[1]); return; } /* If we are supposed to be skipping parsing right now, then do it. */ if (parsing_conditionalized_out) return; i = 0; /* If this keyname is a complex key expression surrounded by quotes, advance to after the matching close quote. */ if (*string == '"') { for (i = 1; c = string[i]; i++) { if (c == '"' && string[i - 1] != '\\') break; } } /* Advance to the colon (:) or whitespace which separates the two objects. */ for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ ); /* Mark the end of the command (or keyname). */ if (string[i]) string[i++] = '\0'; /* If this is a command to set a variable, then do that. */ if (stricmp (string, "set") == 0) { char *var = string + i; char *value; /* Make VAR point to start of variable name. */ while (*var && whitespace (*var)) var++; /* Make value point to start of value string. */ value = var; while (*value && !whitespace (*value)) value++; if (*value) *value++ = '\0'; while (*value && whitespace (*value)) value++; rl_variable_bind (var, value); return; } /* Skip any whitespace between keyname and funname. */ for (; string[i] && whitespace (string[i]); i++); funname = &string[i]; /* Now isolate funname. For straight function names just look for whitespace, since that will signify the end of the string. But this could be a macro definition. In that case, the string is quoted, so skip to the matching delimiter. */ if (*funname == '\'' || *funname == '"') { int delimiter = string[i++]; for (; c = string[i]; i++) { if (c == delimiter && string[i - 1] != '\\') break; } if (c) i++; } /* Advance to the end of the string. */ for (; string[i] && !whitespace (string[i]); i++); /* No extra whitespace at the end of the string. */ string[i] = '\0'; /* If this is a new-style key-binding, then do the binding with rl_set_key (). Otherwise, let the older code deal with it. */ if (*string == '"') { char *seq = (char *)Alloca (1 + strlen (string)); register int j, k = 0; for (j = 1; string[j]; j++) { if (string[j] == '"' && string[j - 1] != '\\') break; seq[k++] = string[j]; } seq[k] = '\0'; /* Binding macro? */ if (*funname == '\'' || *funname == '"') { j = strlen (funname); if (j && funname[j - 1] == *funname) funname[j - 1] = '\0'; rl_macro_bind (seq, &funname[1], keymap); } else rl_set_key (seq, rl_named_function (funname), keymap); #if NO_ALLOCA free (seq); #endif return; } /* Get the actual character we want to deal with. */ kname = rindex (string, '-'); if (!kname) kname = string; else kname++; key = glean_key_from_name (kname); /* Add in control and meta bits. */ if (substring_member_of_array (string, possible_control_prefixes)) key = CTRL (to_upper (key)); if (substring_member_of_array (string, possible_meta_prefixes)) key = META (key); /* Temporary. Handle old-style keyname with macro-binding. */ if (*funname == '\'' || *funname == '"') { char seq[2]; int fl = strlen (funname); seq[0] = key; seq[1] = '\0'; if (fl && funname[fl - 1] == *funname) funname[fl - 1] = '\0'; rl_macro_bind (seq, &funname[1], keymap); } else rl_bind_key (key, rl_named_function (funname)); } rl_variable_bind (name, value) char *name, *value; { if (stricmp (name, "editing-mode") == 0) { if (strnicmp (value, "vi", 2) == 0) { #ifdef VI_MODE keymap = vi_insertion_keymap; rl_editing_mode = vi_mode; #endif /* VI_MODE */ } else if (strnicmp (value, "emacs", 5) == 0) { keymap = emacs_standard_keymap; rl_editing_mode = emacs_mode; } } else if (stricmp (name, "horizontal-scroll-mode") == 0) { if (!*value || stricmp (value, "On") == 0) horizontal_scroll_mode = 1; else horizontal_scroll_mode = 0; } else if (stricmp (name, "mark-modified-lines") == 0) { if (!*value || stricmp (value, "On") == 0) mark_modified_lines = 1; else mark_modified_lines = 0; } else if (stricmp (name, "prefer-visible-bell") == 0) { if (!*value || stricmp (value, "On") == 0) prefer_visible_bell = 1; else prefer_visible_bell = 0; } } /* Return the character which matches NAME. For example, `Space' returns ' '. */ typedef struct { char *name; int value; } assoc_list; assoc_list name_key_alist[] = { { "Space", ' ' }, { "SPC", ' ' }, { "Rubout", 0x7f }, { "DEL", 0x7f }, { "Tab", 0x09 }, { "Newline", '\n' }, { "Return", '\r' }, { "RET", '\r' }, { "LFD", '\n' }, { "Escape", '\033' }, { "ESC", '\033' }, { (char *)0x0, 0 } }; int glean_key_from_name (name) char *name; { register int i; for (i = 0; name_key_alist[i].name; i++) if (stricmp (name, name_key_alist[i].name) == 0) return (name_key_alist[i].value); return (*name); } /* **************************************************************** */ /* */ /* String Utility Functions */ /* */ /* **************************************************************** */ /* Return non-zero if any members of ARRAY are a substring in STRING. */ static int substring_member_of_array (string, array) char *string, **array; { while (*array) { if (strindex (string, *array)) return (1); array++; } return (0); } /* Whoops, Unix doesn't have strnicmp. */ /* Compare at most COUNT characters from string1 to string2. Case doesn't matter. */ static int strnicmp (string1, string2, count) char *string1, *string2; { register char ch1, ch2; while (count) { ch1 = *string1++; ch2 = *string2++; if (to_upper(ch1) == to_upper(ch2)) count--; else break; } return (count); } /* strcmp (), but caseless. */ static int stricmp (string1, string2) char *string1, *string2; { register char ch1, ch2; while (*string1 && *string2) { ch1 = *string1++; ch2 = *string2++; if (to_upper(ch1) != to_upper(ch2)) return (1); } return (*string1 | *string2); } /* Determine if s2 occurs in s1. If so, return a pointer to the match in s1. The compare is case insensitive. */ static char * strindex (s1, s2) register char *s1, *s2; { register int i, l = strlen (s2); register int len = strlen (s1); for (i = 0; (len - i) >= l; i++) if (strnicmp (&s1[i], s2, l) == 0) return (s1 + i); return ((char *)NULL); } /* **************************************************************** */ /* */ /* USG (System V) Support */ /* */ /* **************************************************************** */ /* When compiling and running in the `Posix' environment, Ultrix does not restart system calls, so this needs to do it. */ int rl_getc (stream) FILE *stream; { int result; unsigned char c; while (1) { result = read (fileno (stream), &c, sizeof (char)); if (result == sizeof (char)) return (c); if (errno != EINTR) return (EOF); } } #ifdef STATIC_MALLOC /* **************************************************************** */ /* */ /* xmalloc and xrealloc () */ /* */ /* **************************************************************** */ static void memory_error_and_abort (); static char * xmalloc (bytes) int bytes; { char *temp = 0; temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static char * xrealloc (pointer, bytes) char *pointer; int bytes; { char *temp = (char *)realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "readline: Out of virtual memory!\n"); abort (); } #endif /* STATIC_MALLOC */ /* **************************************************************** */ /* */ /* Testing Readline */ /* */ /* **************************************************************** */ #if defined (TEST) main () { HIST_ENTRY **history_list (); char *temp = (char *)NULL; char *prompt = "readline% "; int done = 0; while (!done) { temp = readline (prompt); /* Test for EOF. */ if (!temp) exit (1); /* If there is anything on the line, print it and remember it. */ if (*temp) { fprintf (stderr, "%s\r\n", temp); add_history (temp); } /* Check for `command' that we handle. */ if (strcmp (temp, "quit") == 0) done = 1; if (strcmp (temp, "list") == 0) { HIST_ENTRY **list = history_list (); register int i; if (list) { for (i = 0; list[i]; i++) { fprintf (stderr, "%d: %s\r\n", i, list[i]->line); free (list[i]->line); } free (list); } } free (temp); } } #endif /* TEST */ /* * Local variables: * compile-command: "gcc -g -traditional -I. -I.. -DTEST -o readline readline.c keymaps.o funmap.o history.o -ltermcap" * end: */ neuron-7.5/src/readline/readline.h000077500000000000000000000172021323325274500172140ustar00rootroot00000000000000/* Readline.h -- the names of functions callable from within readline. */ #ifndef _READLINE_H_ #define _READLINE_H_ #include "keymaps.h" #ifndef __FUNCTION_DEF typedef int Function (); #define __FUNCTION_DEF #endif typedef void* PFunction (); extern void rl_forward (int count); extern void rl_backward (int count); extern void rl_forward_word (); extern void rl_backward_word (); extern void rl_clear_screen (); extern void rl_insert (int count, int c); extern void rl_redisplay (); extern void rl_rubout (); extern void rl_delete (); extern void rl_transpose_words(); extern void rl_transpose_chars(); extern void rl_undo_command (); extern void free_history_entry (); extern void rl_get_next_history (); extern void rl_get_previous_history (); extern void rl_search_history (int direction, int invoking_key); extern void rl_kill_text (int from, int to); extern void rl_yank_nth_arg (int count, int ignore); extern void rl_parse_and_bind (char *string); extern void rl_generic_bind (int type, char *keyseq, char *data, Keymap map); /* The functions for manipulating the text of the line within readline. Most of these functions are bound to keys by default. */ extern int rl_beg_of_line (), rl_end_of_line (), ding (), rl_newline (), rl_kill_line (), rl_quoted_insert (), rl_reverse_search_history (), rl_unix_line_discard (), rl_quoted_insert (), rl_unix_word_rubout (), rl_yank (), rl_kill_word (), rl_tab_insert (), rl_yank_pop (), rl_backward_kill_word (), rl_backward_kill_line (), rl_complete (), rl_possible_completions (), rl_do_lowercase_version (), rl_digit_argument (), rl_universal_argument (), rl_abort (), rl_revert_line (), rl_beginning_of_history (), rl_end_of_history (), rl_forward_search_history (), rl_upcase_word (), rl_downcase_word (), rl_capitalize_word (), rl_restart_output (), rl_re_read_init_file (); /* These are *both* defined even when VI_MODE is not. */ extern int rl_vi_editing_mode (), rl_emacs_editing_mode (); #ifdef VI_MODE /* Things for vi mode. */ extern int rl_vi_movement_mode (), rl_vi_insertion_mode (), rl_vi_arg_digit (), rl_vi_prev_word (), rl_vi_next_word (), rl_vi_char_search (), rl_vi_eof_maybe (), rl_vi_append_mode (), rl_vi_put (), rl_vi_append_eol (), rl_vi_insert_beg (), rl_vi_delete (), rl_vi_comment (), rl_vi_first_print (), rl_vi_fword (), rl_vi_fWord (), rl_vi_bword (), rl_vi_bWord (), rl_vi_eword (), rl_vi_eWord (), rl_vi_end_word (), rl_vi_change_case (), rl_vi_match (), rl_vi_bracktype (), rl_vi_change_char (), rl_vi_yank_arg (), rl_vi_search (), rl_vi_search_again (), rl_vi_dosearch (), rl_vi_subst (), rl_vi_overstrike (), rl_vi_overstrike_delete (), rl_vi_replace(), rl_vi_column (), rl_vi_delete_to (), rl_vi_change_to (), rl_vi_yank_to (), rl_vi_complete (); #endif /* VI_MODE */ /* Keyboard macro commands. */ extern int rl_start_kbd_macro (), rl_end_kbd_macro (), rl_call_last_kbd_macro (); extern void rl_arrow_keys(), rl_refresh_line (); /* Maintaining the state of undo. We remember individual deletes and inserts on a chain of things to do. */ /* The actions that undo knows how to undo. Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. I.e., the code tells undo what to undo, not how to undo it. */ enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; /* What an element of THE_UNDO_LIST looks like. */ typedef struct undo_list { struct undo_list *next; int start, end; /* Where the change took place. */ char *text; /* The text to insert, if undoing a delete. */ enum undo_code what; /* Delete, Insert, Begin, End. */ } UNDO_LIST; /* The current undo list for RL_LINE_BUFFER. */ extern UNDO_LIST *rl_undo_list; /* The data structure for mapping textual names to code addresses. */ typedef struct { char *name; Function *function; } FUNMAP; extern FUNMAP **funmap; /* **************************************************************** */ /* */ /* Well Published Variables */ /* */ /* **************************************************************** */ /* The name of the calling program. You should initialize this to whatever was in argv[0]. It is used when parsing conditionals. */ extern char *rl_readline_name; /* The line buffer that is in use. */ extern char *rl_line_buffer; /* The location of point, and end. */ extern int rl_point, rl_end; /* The name of the terminal to use. */ extern char *rl_terminal_name; /* The input and output streams. */ extern FILE *rl_instream, *rl_outstream; /* The basic list of characters that signal a break between words for the completer routine. The initial contents of this variable is what breaks words in the shell, i.e. "n\"\\'`@$>". */ extern char *rl_basic_word_break_characters; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ extern char *rl_completer_word_break_characters; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ extern char *rl_special_prefixes; /* Pointer to the generator function for completion_matches (). NULL means to use filename_entry_function (), the default filename completer. */ extern Function *rl_completion_entry_function; /* If rl_ignore_some_completions_function is non-NULL it is the address of a function to call after all of the possible matches have been generated, but before the actual completion is done to the input line. The function is called with one argument; a NULL terminated array of (char *). If your function removes any of the elements, they must be free()'ed. */ extern Function *rl_ignore_some_completions_function; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. START and END are indices in RL_LINE_BUFFER saying what the boundaries of TEXT are. If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ extern PFunction *rl_attempted_completion_function; /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ extern PFunction *rl_tilde_expander; /* If non-zero, then this is the address of a function to call just before readline_internal () prints the first prompt. */ extern Function *rl_startup_hook; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ extern Function *rl_symbolic_link_hook; /* Non-zero means that modified history lines are preceded with an asterisk. */ extern int rl_show_star; /* **************************************************************** */ /* */ /* Well Published Functions */ /* */ /* **************************************************************** */ /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ extern char *readline (); /* Return an array of strings which are the result of repeatadly calling FUNC with TEXT. */ extern char **completion_matches (); /* rl_add_defun (char *name, Function *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ extern int rl_add_defun (); #endif /* _READLINE_H_ */ neuron-7.5/src/readline/vi_keymap.h000077500000000000000000000424451323325274500174240ustar00rootroot00000000000000/* vi_keymap.c -- the keymap for vi_mode in readline (). */ /* Copyright (C) 1988,1989 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef BUFSIZ #include #endif /* BUFSIZ */ #include "readline.h" extern KEYMAP_ENTRY_ARRAY vi_escape_keymap; /* The keymap arrays for handling vi mode. */ KEYMAP_ENTRY_ARRAY vi_movement_keymap = { /* The regular control keys come first. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, (Function *)0x0 }, /* Control-a */ { ISFUNC, (Function *)0x0 }, /* Control-b */ { ISFUNC, (Function *)0x0 }, /* Control-c */ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ { ISFUNC, rl_emacs_editing_mode }, /* Control-e */ { ISFUNC, (Function *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ { ISFUNC, (Function *)0x0 }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, rl_clear_screen }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_get_next_history }, /* Control-n */ { ISFUNC, (Function *)0x0 }, /* Control-o */ { ISFUNC, rl_get_previous_history }, /* Control-p */ { ISFUNC, rl_quoted_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISFUNC, (Function *)0x0 }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, (Function *)0x0 }, /* Control-z */ { ISKMAP, (Function *)vi_escape_keymap }, /* Control-[ */ { ISFUNC, (Function *)0x0 }, /* Control-\ */ { ISFUNC, (Function *)0x0 }, /* Control-] */ { ISFUNC, (Function *)0x0 }, /* Control-^ */ { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_forward }, /* SPACE */ { ISFUNC, (Function *)0x0 }, /* ! */ { ISFUNC, (Function *)0x0 }, /* " */ { ISFUNC, rl_vi_comment }, /* # */ { ISFUNC, rl_end_of_line }, /* $ */ { ISFUNC, rl_vi_match }, /* % */ { ISFUNC, (Function *)0x0 }, /* & */ { ISFUNC, (Function *)0x0 }, /* ' */ { ISFUNC, (Function *)0x0 }, /* ( */ { ISFUNC, (Function *)0x0 }, /* ) */ { ISFUNC, rl_vi_complete }, /* * */ { ISFUNC, rl_get_next_history}, /* + */ { ISFUNC, rl_vi_char_search }, /* , */ { ISFUNC, rl_get_previous_history }, /* - */ { ISFUNC, (Function *)0x0 }, /* . */ { ISFUNC, rl_vi_search }, /* / */ /* Regular digits. */ { ISFUNC, rl_vi_arg_digit }, /* 0 */ { ISFUNC, rl_vi_arg_digit }, /* 1 */ { ISFUNC, rl_vi_arg_digit }, /* 2 */ { ISFUNC, rl_vi_arg_digit }, /* 3 */ { ISFUNC, rl_vi_arg_digit }, /* 4 */ { ISFUNC, rl_vi_arg_digit }, /* 5 */ { ISFUNC, rl_vi_arg_digit }, /* 6 */ { ISFUNC, rl_vi_arg_digit }, /* 7 */ { ISFUNC, rl_vi_arg_digit }, /* 8 */ { ISFUNC, rl_vi_arg_digit }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (Function *)0x0 }, /* : */ { ISFUNC, rl_vi_char_search }, /* ; */ { ISFUNC, (Function *)0x0 }, /* < */ { ISFUNC, (Function *)0x0 }, /* = */ { ISFUNC, (Function *)0x0 }, /* > */ { ISFUNC, rl_vi_search }, /* ? */ { ISFUNC, (Function *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_vi_append_eol }, /* A */ { ISFUNC, rl_vi_prev_word}, /* B */ { ISFUNC, rl_vi_change_to }, /* C */ { ISFUNC, rl_vi_delete_to }, /* D */ { ISFUNC, rl_vi_end_word }, /* E */ { ISFUNC, rl_vi_char_search }, /* F */ { ISFUNC, (Function *)0x0 }, /* G */ { ISFUNC, (Function *)0x0 }, /* H */ { ISFUNC, rl_vi_insert_beg }, /* I */ { ISFUNC, (Function *)0x0 }, /* J */ { ISFUNC, (Function *)0x0 }, /* K */ { ISFUNC, (Function *)0x0 }, /* L */ { ISFUNC, (Function *)0x0 }, /* M */ { ISFUNC, rl_vi_search_again }, /* N */ { ISFUNC, (Function *)0x0 }, /* O */ { ISFUNC, rl_vi_put }, /* P */ { ISFUNC, (Function *)0x0 }, /* Q */ { ISFUNC, rl_vi_replace }, /* R */ { ISFUNC, rl_vi_subst }, /* S */ { ISFUNC, rl_vi_char_search }, /* T */ { ISFUNC, rl_revert_line }, /* U */ { ISFUNC, (Function *)0x0 }, /* V */ { ISFUNC, rl_vi_next_word }, /* W */ { ISFUNC, rl_rubout }, /* X */ { ISFUNC, rl_vi_yank_to }, /* Y */ { ISFUNC, (Function *)0x0 }, /* Z */ /* Some more punctuation. */ { ISFUNC, (Function *)0x0 }, /* [ */ { ISFUNC, (Function *)0x0 }, /* \ */ { ISFUNC, (Function *)0x0 }, /* ] */ { ISFUNC, rl_vi_first_print }, /* ^ */ { ISFUNC, rl_vi_yank_arg }, /* _ */ { ISFUNC, (Function *)0x0 }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_vi_append_mode }, /* a */ { ISFUNC, rl_vi_prev_word }, /* b */ { ISFUNC, rl_vi_change_to }, /* c */ { ISFUNC, rl_vi_delete_to }, /* d */ { ISFUNC, rl_vi_end_word }, /* e */ { ISFUNC, rl_vi_char_search }, /* f */ { ISFUNC, (Function *)0x0 }, /* g */ { ISFUNC, rl_backward }, /* h */ { ISFUNC, rl_vi_insertion_mode }, /* i */ { ISFUNC, rl_get_next_history }, /* j */ { ISFUNC, rl_get_previous_history }, /* k */ { ISFUNC, rl_forward }, /* l */ { ISFUNC, (Function *)0x0 }, /* m */ { ISFUNC, rl_vi_search_again }, /* n */ { ISFUNC, (Function *)0x0 }, /* o */ { ISFUNC, rl_vi_put }, /* p */ { ISFUNC, (Function *)0x0 }, /* q */ { ISFUNC, rl_vi_change_char }, /* r */ { ISFUNC, rl_vi_subst }, /* s */ { ISFUNC, rl_vi_char_search }, /* t */ { ISFUNC, rl_undo_command }, /* u */ { ISFUNC, (Function *)0x0 }, /* v */ { ISFUNC, rl_vi_next_word }, /* w */ { ISFUNC, rl_vi_delete }, /* x */ { ISFUNC, rl_vi_yank_to }, /* y */ { ISFUNC, (Function *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (Function *)0x0 }, /* { */ { ISFUNC, rl_vi_column }, /* | */ { ISFUNC, (Function *)0x0 }, /* } */ { ISFUNC, rl_vi_change_case }, /* ~ */ { ISFUNC, rl_backward } /* RUBOUT */ }; KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { /* The regular control keys come first. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, rl_insert }, /* Control-a */ { ISFUNC, rl_insert }, /* Control-b */ { ISFUNC, rl_insert }, /* Control-c */ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ { ISFUNC, rl_insert }, /* Control-e */ { ISFUNC, rl_insert }, /* Control-f */ { ISFUNC, rl_insert }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ { ISFUNC, rl_complete }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_insert }, /* Control-k */ { ISFUNC, rl_insert }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_insert }, /* Control-n */ { ISFUNC, rl_insert }, /* Control-o */ { ISFUNC, rl_insert }, /* Control-p */ { ISFUNC, rl_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISFUNC, rl_insert }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, rl_insert }, /* Control-z */ { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ { ISFUNC, rl_insert }, /* Control-\ */ { ISFUNC, rl_insert }, /* Control-] */ { ISFUNC, rl_insert }, /* Control-^ */ { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_insert }, /* SPACE */ { ISFUNC, rl_insert }, /* ! */ { ISFUNC, rl_insert }, /* " */ { ISFUNC, rl_insert }, /* # */ { ISFUNC, rl_insert }, /* $ */ { ISFUNC, rl_insert }, /* % */ { ISFUNC, rl_insert }, /* & */ { ISFUNC, rl_insert }, /* ' */ { ISFUNC, rl_insert }, /* ( */ { ISFUNC, rl_insert }, /* ) */ { ISFUNC, rl_insert }, /* * */ { ISFUNC, rl_insert }, /* + */ { ISFUNC, rl_insert }, /* , */ { ISFUNC, rl_insert }, /* - */ { ISFUNC, rl_insert }, /* . */ { ISFUNC, rl_insert }, /* / */ /* Regular digits. */ { ISFUNC, rl_insert }, /* 0 */ { ISFUNC, rl_insert }, /* 1 */ { ISFUNC, rl_insert }, /* 2 */ { ISFUNC, rl_insert }, /* 3 */ { ISFUNC, rl_insert }, /* 4 */ { ISFUNC, rl_insert }, /* 5 */ { ISFUNC, rl_insert }, /* 6 */ { ISFUNC, rl_insert }, /* 7 */ { ISFUNC, rl_insert }, /* 8 */ { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ { ISFUNC, rl_insert }, /* : */ { ISFUNC, rl_insert }, /* ; */ { ISFUNC, rl_insert }, /* < */ { ISFUNC, rl_insert }, /* = */ { ISFUNC, rl_insert }, /* > */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_insert }, /* A */ { ISFUNC, rl_insert }, /* B */ { ISFUNC, rl_insert }, /* C */ { ISFUNC, rl_insert }, /* D */ { ISFUNC, rl_insert }, /* E */ { ISFUNC, rl_insert }, /* F */ { ISFUNC, rl_insert }, /* G */ { ISFUNC, rl_insert }, /* H */ { ISFUNC, rl_insert }, /* I */ { ISFUNC, rl_insert }, /* J */ { ISFUNC, rl_insert }, /* K */ { ISFUNC, rl_insert }, /* L */ { ISFUNC, rl_insert }, /* M */ { ISFUNC, rl_insert }, /* N */ { ISFUNC, rl_insert }, /* O */ { ISFUNC, rl_insert }, /* P */ { ISFUNC, rl_insert }, /* Q */ { ISFUNC, rl_insert }, /* R */ { ISFUNC, rl_insert }, /* S */ { ISFUNC, rl_insert }, /* T */ { ISFUNC, rl_insert }, /* U */ { ISFUNC, rl_insert }, /* V */ { ISFUNC, rl_insert }, /* W */ { ISFUNC, rl_insert }, /* X */ { ISFUNC, rl_insert }, /* Y */ { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ { ISFUNC, rl_insert }, /* [ */ { ISFUNC, rl_insert }, /* \ */ { ISFUNC, rl_insert }, /* ] */ { ISFUNC, rl_insert }, /* ^ */ { ISFUNC, rl_insert }, /* _ */ { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_insert }, /* a */ { ISFUNC, rl_insert }, /* b */ { ISFUNC, rl_insert }, /* c */ { ISFUNC, rl_insert }, /* d */ { ISFUNC, rl_insert }, /* e */ { ISFUNC, rl_insert }, /* f */ { ISFUNC, rl_insert }, /* g */ { ISFUNC, rl_insert }, /* h */ { ISFUNC, rl_insert }, /* i */ { ISFUNC, rl_insert }, /* j */ { ISFUNC, rl_insert }, /* k */ { ISFUNC, rl_insert }, /* l */ { ISFUNC, rl_insert }, /* m */ { ISFUNC, rl_insert }, /* n */ { ISFUNC, rl_insert }, /* o */ { ISFUNC, rl_insert }, /* p */ { ISFUNC, rl_insert }, /* q */ { ISFUNC, rl_insert }, /* r */ { ISFUNC, rl_insert }, /* s */ { ISFUNC, rl_insert }, /* t */ { ISFUNC, rl_insert }, /* u */ { ISFUNC, rl_insert }, /* v */ { ISFUNC, rl_insert }, /* w */ { ISFUNC, rl_insert }, /* x */ { ISFUNC, rl_insert }, /* y */ { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ { ISFUNC, rl_insert }, /* { */ { ISFUNC, rl_insert }, /* | */ { ISFUNC, rl_insert }, /* } */ { ISFUNC, rl_insert }, /* ~ */ { ISFUNC, rl_rubout } /* RUBOUT */ }; KEYMAP_ENTRY_ARRAY vi_escape_keymap = { /* The regular control keys come first. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ { ISFUNC, (Function *)0x0 }, /* Control-a */ { ISFUNC, (Function *)0x0 }, /* Control-b */ { ISFUNC, (Function *)0x0 }, /* Control-c */ { ISFUNC, (Function *)0x0 }, /* Control-d */ { ISFUNC, (Function *)0x0 }, /* Control-e */ { ISFUNC, (Function *)0x0 }, /* Control-f */ { ISFUNC, (Function *)0x0 }, /* Control-g */ { ISFUNC, (Function *)0x0 }, /* Control-h */ { ISFUNC, rl_tab_insert}, /* Control-i */ { ISFUNC, rl_emacs_editing_mode}, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, (Function *)0x0 }, /* Control-l */ { ISFUNC, rl_emacs_editing_mode}, /* Control-m */ { ISFUNC, (Function *)0x0 }, /* Control-n */ { ISFUNC, (Function *)0x0 }, /* Control-o */ { ISFUNC, (Function *)0x0 }, /* Control-p */ { ISFUNC, (Function *)0x0 }, /* Control-q */ { ISFUNC, (Function *)0x0 }, /* Control-r */ { ISFUNC, (Function *)0x0 }, /* Control-s */ { ISFUNC, (Function *)0x0 }, /* Control-t */ { ISFUNC, (Function *)0x0 }, /* Control-u */ { ISFUNC, (Function *)0x0 }, /* Control-v */ { ISFUNC, (Function *)0x0 }, /* Control-w */ { ISFUNC, (Function *)0x0 }, /* Control-x */ { ISFUNC, (Function *)0x0 }, /* Control-y */ { ISFUNC, (Function *)0x0 }, /* Control-z */ { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ { ISFUNC, (Function *)0x0 }, /* Control-\ */ { ISFUNC, (Function *)0x0 }, /* Control-] */ { ISFUNC, (Function *)0x0 }, /* Control-^ */ { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, (Function *)0x0 }, /* SPACE */ { ISFUNC, (Function *)0x0 }, /* ! */ { ISFUNC, (Function *)0x0 }, /* " */ { ISFUNC, (Function *)0x0 }, /* # */ { ISFUNC, (Function *)0x0 }, /* $ */ { ISFUNC, (Function *)0x0 }, /* % */ { ISFUNC, (Function *)0x0 }, /* & */ { ISFUNC, (Function *)0x0 }, /* ' */ { ISFUNC, (Function *)0x0 }, /* ( */ { ISFUNC, (Function *)0x0 }, /* ) */ { ISFUNC, (Function *)0x0 }, /* * */ { ISFUNC, (Function *)0x0 }, /* + */ { ISFUNC, (Function *)0x0 }, /* , */ { ISFUNC, (Function *)0x0 }, /* - */ { ISFUNC, (Function *)0x0 }, /* . */ { ISFUNC, (Function *)0x0 }, /* / */ /* Regular digits. */ { ISFUNC, rl_vi_arg_digit }, /* 0 */ { ISFUNC, rl_vi_arg_digit }, /* 1 */ { ISFUNC, rl_vi_arg_digit }, /* 2 */ { ISFUNC, rl_vi_arg_digit }, /* 3 */ { ISFUNC, rl_vi_arg_digit }, /* 4 */ { ISFUNC, rl_vi_arg_digit }, /* 5 */ { ISFUNC, rl_vi_arg_digit }, /* 6 */ { ISFUNC, rl_vi_arg_digit }, /* 7 */ { ISFUNC, rl_vi_arg_digit }, /* 8 */ { ISFUNC, rl_vi_arg_digit }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (Function *)0x0 }, /* : */ { ISFUNC, (Function *)0x0 }, /* ; */ { ISFUNC, (Function *)0x0 }, /* < */ { ISFUNC, (Function *)0x0 }, /* = */ { ISFUNC, (Function *)0x0 }, /* > */ { ISFUNC, (Function *)0x0 }, /* ? */ { ISFUNC, (Function *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* A */ { ISFUNC, rl_do_lowercase_version }, /* B */ { ISFUNC, rl_do_lowercase_version }, /* C */ { ISFUNC, rl_do_lowercase_version }, /* D */ { ISFUNC, rl_do_lowercase_version }, /* E */ { ISFUNC, rl_do_lowercase_version }, /* F */ { ISFUNC, rl_do_lowercase_version }, /* G */ { ISFUNC, rl_do_lowercase_version }, /* H */ { ISFUNC, rl_do_lowercase_version }, /* I */ { ISFUNC, rl_do_lowercase_version }, /* J */ { ISFUNC, rl_do_lowercase_version }, /* K */ { ISFUNC, rl_do_lowercase_version }, /* L */ { ISFUNC, rl_do_lowercase_version }, /* M */ { ISFUNC, rl_do_lowercase_version }, /* N */ { ISFUNC, rl_do_lowercase_version }, /* O */ { ISFUNC, rl_do_lowercase_version }, /* P */ { ISFUNC, rl_do_lowercase_version }, /* Q */ { ISFUNC, rl_do_lowercase_version }, /* R */ { ISFUNC, rl_do_lowercase_version }, /* S */ { ISFUNC, rl_do_lowercase_version }, /* T */ { ISFUNC, rl_do_lowercase_version }, /* U */ { ISFUNC, rl_do_lowercase_version }, /* V */ { ISFUNC, rl_do_lowercase_version }, /* W */ { ISFUNC, rl_do_lowercase_version }, /* X */ { ISFUNC, rl_do_lowercase_version }, /* Y */ { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ { ISFUNC, (Function *)0x0 }, /* [ */ { ISFUNC, (Function *)0x0 }, /* \ */ { ISFUNC, (Function *)0x0 }, /* ] */ { ISFUNC, (Function *)0x0 }, /* ^ */ { ISFUNC, (Function *)0x0 }, /* _ */ { ISFUNC, (Function *)0x0 }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, (Function *)0x0 }, /* a */ { ISFUNC, (Function *)0x0 }, /* b */ { ISFUNC, (Function *)0x0 }, /* c */ { ISFUNC, (Function *)0x0 }, /* d */ { ISFUNC, (Function *)0x0 }, /* e */ { ISFUNC, (Function *)0x0 }, /* f */ { ISFUNC, (Function *)0x0 }, /* g */ { ISFUNC, (Function *)0x0 }, /* h */ { ISFUNC, (Function *)0x0 }, /* i */ { ISFUNC, (Function *)0x0 }, /* j */ { ISFUNC, (Function *)0x0 }, /* k */ { ISFUNC, (Function *)0x0 }, /* l */ { ISFUNC, (Function *)0x0 }, /* m */ { ISFUNC, (Function *)0x0 }, /* n */ { ISFUNC, (Function *)0x0 }, /* o */ { ISFUNC, (Function *)0x0 }, /* p */ { ISFUNC, (Function *)0x0 }, /* q */ { ISFUNC, (Function *)0x0 }, /* r */ { ISFUNC, (Function *)0x0 }, /* s */ { ISFUNC, (Function *)0x0 }, /* t */ { ISFUNC, (Function *)0x0 }, /* u */ { ISFUNC, (Function *)0x0 }, /* v */ { ISFUNC, (Function *)0x0 }, /* w */ { ISFUNC, (Function *)0x0 }, /* x */ { ISFUNC, (Function *)0x0 }, /* y */ { ISFUNC, (Function *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (Function *)0x0 }, /* { */ { ISFUNC, (Function *)0x0 }, /* | */ { ISFUNC, (Function *)0x0 }, /* } */ { ISFUNC, (Function *)0x0 }, /* ~ */ { ISFUNC, rl_backward_kill_word } /* RUBOUT */ }; neuron-7.5/src/scopmath/000077500000000000000000000000001323325274500153065ustar00rootroot00000000000000neuron-7.5/src/scopmath/Makefile.am000077500000000000000000000017111323325274500173450ustar00rootroot00000000000000## Libraries that we make from this directory: lib_LTLIBRARIES = libscopmath.la libscopmath_la_SOURCES = abort.c adams.c adeuler.c adrunge.c advance.c \ boundary.c crank.c crout.c csoda.c csodabnc.c deflate.c \ dimplic.c scoperf.c euler.c expfit.c exprand.c f2cmisc.c factoria.c \ force.c gauss.c gear.c getmem.c harmonic.c heun.c hyperbol.c \ invert.c lag.c legendre.c newton.c normrand.c perpulse.c \ perstep.c poisrand.c poisson.c praxis.c pulse.c quad.c ramp.c \ revhyper.c revsawto.c revsigmo.c romberg.c runge.c \ sawtooth.c schedule.c seidel.c sigmoid.c simeq.c simplex.c \ sparse.c vsparse.c spline.c squarewa.c ssimplic.c step.c \ threshol.c tridiag.c sparse_thread.c newton_thread.c crout_thread.c \ ssimplic_thread.c ## Header files that need to be included in the distribution: noinst_HEADERS = errcodes.h f2c.h scopenv.h newton_struct.h EXTRA_DIST = scpmth.mak pkginclude_HEADERS = scoplib.h AM_CPPFLAGS = -DHOC=1 AM_CFLAGS = @MINGW_CFLAG@ neuron-7.5/src/scopmath/Makefile.in000066400000000000000000000745351323325274500173710ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/scopmath ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libscopmath_la_LIBADD = am_libscopmath_la_OBJECTS = abort.lo adams.lo adeuler.lo adrunge.lo \ advance.lo boundary.lo crank.lo crout.lo csoda.lo csodabnc.lo \ deflate.lo dimplic.lo scoperf.lo euler.lo expfit.lo exprand.lo \ f2cmisc.lo factoria.lo force.lo gauss.lo gear.lo getmem.lo \ harmonic.lo heun.lo hyperbol.lo invert.lo lag.lo legendre.lo \ newton.lo normrand.lo perpulse.lo perstep.lo poisrand.lo \ poisson.lo praxis.lo pulse.lo quad.lo ramp.lo revhyper.lo \ revsawto.lo revsigmo.lo romberg.lo runge.lo sawtooth.lo \ schedule.lo seidel.lo sigmoid.lo simeq.lo simplex.lo sparse.lo \ vsparse.lo spline.lo squarewa.lo ssimplic.lo step.lo \ threshol.lo tridiag.lo sparse_thread.lo newton_thread.lo \ crout_thread.lo ssimplic_thread.lo libscopmath_la_OBJECTS = $(am_libscopmath_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libscopmath_la_SOURCES) DIST_SOURCES = $(libscopmath_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libscopmath.la libscopmath_la_SOURCES = abort.c adams.c adeuler.c adrunge.c advance.c \ boundary.c crank.c crout.c csoda.c csodabnc.c deflate.c \ dimplic.c scoperf.c euler.c expfit.c exprand.c f2cmisc.c factoria.c \ force.c gauss.c gear.c getmem.c harmonic.c heun.c hyperbol.c \ invert.c lag.c legendre.c newton.c normrand.c perpulse.c \ perstep.c poisrand.c poisson.c praxis.c pulse.c quad.c ramp.c \ revhyper.c revsawto.c revsigmo.c romberg.c runge.c \ sawtooth.c schedule.c seidel.c sigmoid.c simeq.c simplex.c \ sparse.c vsparse.c spline.c squarewa.c ssimplic.c step.c \ threshol.c tridiag.c sparse_thread.c newton_thread.c crout_thread.c \ ssimplic_thread.c noinst_HEADERS = errcodes.h f2c.h scopenv.h newton_struct.h EXTRA_DIST = scpmth.mak pkginclude_HEADERS = scoplib.h AM_CPPFLAGS = -DHOC=1 AM_CFLAGS = @MINGW_CFLAG@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/scopmath/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/scopmath/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libscopmath.la: $(libscopmath_la_OBJECTS) $(libscopmath_la_DEPENDENCIES) $(EXTRA_libscopmath_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libscopmath_la_OBJECTS) $(libscopmath_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adeuler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adrunge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/advance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boundary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crank.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crout_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csoda.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csodabnc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deflate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dimplic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expfit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exprand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/f2cmisc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/factoria.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/force.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gauss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/harmonic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heun.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperbol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legendre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newton_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/normrand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perpulse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perstep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poisrand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poisson.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/praxis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pulse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ramp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/revhyper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/revsawto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/revsigmo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/romberg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sawtooth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schedule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scoperf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seidel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigmoid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simeq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparse_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/squarewa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssimplic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssimplic_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threshol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tridiag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsparse.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/scopmath/abort.c000077500000000000000000000062341323325274500165710ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: abort.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "abort.c,v 1.2 1997/08/30 14:32:00 hines Exp" ; #endif /*----------------------------------------------------------------------------- * * ABORT_RUN() * * Prints out an error message and returns to the main menu if a solver * routine returns a nonzero error code. * * Calling sequence: abort_run(code) * * Argument: code int flag for error * * Returns: * * Functions called: abs(), cls(), cursrpos(), puts(), gets() * * Files accessed: *---------------------------------------------------------------------------*/ #include #include #include "errcodes.h" extern void hoc_execerror(const char*, const char*); int abort_run(code) int code; { #ifndef MAC extern int abs(); #endif extern int _modl_cleanup(); #if HOC == 0 extern jmp_buf ibuf; #endif char tmpstr[4]; #if !HOC cls(); cursrpos(10, 0, 0); #endif switch (abs(code)) { case EXCEED_ITERS: puts("Convergence not achieved in maximum number of iterations"); break; case SINGULAR: puts("The matrix in the solution method is singular or ill-conditioned"); break; case PRECISION: puts("The increment in the independent variable is less than machine roundoff error"); break; case CORR_FAIL: puts("The corrector failed to satisfy the error check"); break; case DIVERGED: puts("The corrector iteration diverged"); break; case INCONSISTENT: puts("Inconsistent boundary conditions"); puts("Convergence not acheived in maximum number of iterations"); break; case BAD_START: puts("Poor starting estimate for initial conditions"); puts("The matrix in the solution method is singular or ill-conditioned"); break; case NODATA: puts("No data found in data file"); break; case NO_SOLN: puts("No solution was obtained for the coefficients"); break; case LOWMEM: puts("Insufficient memory to run the model"); break; case DIVCHECK: puts("Attempt to divide by zero"); break; case NOFORCE: puts("Could not open forcing function file\nThe model cannot be run without the forcing function"); break; case NEG_ARG: puts("Cannot compute factorial of negative argument"); break; case RANGE: puts("Value of variable is outside the range of the forcing function data table"); break; default: puts("Origin of error is unknown"); } #if HOC _modl_cleanup(); hoc_execerror("scopmath library error", (char*)0); #else puts("\nPress to abort the run"); gets(tmpstr); longjmp(ibuf, 0); #endif return 0; } /* define some routines needed for shared libraries to work */ #if HOC int prterr(const char* s) { hoc_execerror(s, "from prterr"); return 0; } #if 0 _modl_set_dt(newdt) double newdt; { printf("ssimplic.c :: _modl_set_dt can't be called\n"); exit(1); } #endif #endif neuron-7.5/src/scopmath/adams.c000077500000000000000000000152411323325274500165450ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: adams.c * * Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "adams.c,v 1.1.1.1 1994/10/12 17:22:18 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* Abstract: adams() */ /* */ /* Solves a system of first-order ordinary differential */ /* equations using an Adams-Bashforth predictor, an Adams- */ /* Moulton modifier, and a corrector iteration. The names */ /* of the state variables must appear in a single block in */ /* the variable file. The names of the time derivatives of */ /* the state variables must appear in a single block in the */ /* variable file in the same order as the corresponding */ /* state variables. On the first three entries to adams(), */ /* the state variables are extrapolated by runge(). This */ /* generates the history of derivative values needed to */ /* define the interpolating polynomial used by the Adams */ /* predictor and modifier formulas. */ /* */ /* Returns: int error code (always SUCCESS for adams) */ /* */ /* Calling sequence: */ /* */ /* adams(n, y, d, p, t, h, dy, work) */ /* */ /* Arguments: */ /* Input: n number of state variables */ /* */ /* y pointer to array of addresses of the */ /* state variables */ /* */ /* d pointer to array of addresses of the */ /* derivatives of the state variables */ /* */ /* p array of variable values. */ /* */ /* t pointer to the global independent */ /* variable (usually, time). */ /* */ /* h value of the time increment. */ /* */ /* dy name of the derivative evaluation */ /* function. */ /* */ /* *work pointer to storage for function values */ /* at previous time points. */ /* */ /* Output: p variables and derivatives are updated */ /* */ /* t time is incremented by h */ /* */ /* **work contains history of derivatives for the */ /* three most recent time points */ /* */ /* Functions called: runge */ /* */ /*--------------------------------------------------------------*/ #include "errcodes.h" int adams(_ninits, n, y, d, p, t, h, dy, work) int _ninits, n, (*dy) (); double p[], *t, h, **work; int y[]; int d[]; #define d_(arg) p[d[arg]] #define y_(arg) p[y[arg]] { static int _reset; int i, n2, n3, n4, n5; static int count = 0; double *scratch; extern int runge(); extern double *makevector(); n2 = n << 1; n3 = n2 + n; n4 = n << 2; n5 = n4 + n; if (*work == (double *) 0) *work = makevector(n5); if (_reset) { count = 0; _reset = 0; } switch (count) { case 0: /* First time through procedure */ /* Store current values of the derivatives */ (*dy) (p); for (i = 0; i < n; i++) (*work)[i] = d_(i); /* Storage for first history point */ /* Extrapolate to t = t0 + h */ scratch = *work + n3; runge(_ninits, n, y, d, p, t, h, dy, &scratch); count++; break; case 1: /* Second time through procedure */ /* Store current values of the derivatives */ (*dy) (p); for (i = 0; i < n; i++) (*work)[n + i] = d_(i); /* Storage for second history point */ /* Extrapolate to t = t0 + 2h */ scratch = *work + n3; runge(_ninits, n, y, d, p, t, h, dy, &scratch); count++; break; case 2: /* Third time through procedure */ /* Store current values of the derivatives */ (*dy) (p); for (i = 0; i < n; i++) (*work)[n2 + i] = d_(i); /* Storage for third history * point */ /* Extrapolate to t = t0 + 3h */ scratch = *work + n3; runge(_ninits, n, y, d, p, t, h, dy, &scratch); count++; break; default: /* Subsequent passes through procedure */ /* Generic step from t to t + h. Store starting y values */ for (i = 0; i < n; i++) (*work)[n3 + i] = y_(i); /* Use Adams-Bashforth predictor */ (*dy) (p); for (i = 0; i < n; i++) y_(i) += (h / 24.) * (55. * (d_(i)) - 59. * ((*work)[n2 + i]) + 37. * ((*work)[n + i]) - 9. * ((*work)[i])); *t +=h; /* Shift work array by one frame of width h */ for (i = 0; i < n; i++) { (*work)[i] = (*work)[n + i]; /* d(t - 2h) */ (*work)[n + i] = (*work)[n2 + i]; /* d(t - h) */ (*work)[n2 + i] = d_(i); /* d(t) */ } /* Use Adams-Moulton modifier */ (*dy) (p); for (i = 0; i < n; i++) (*work)[n3 + i] += (h / 24.) * (9. * (d_(i)) + 19. * ((*work)[n2 + i]) - 5. * ((*work)[n + i]) + (*work)[i]); /* * Corrector formula: a linear combination of the above two * estimates such that the most significant error terms cancel */ for (i = 0; i < n; i++) y_(i) = (19. * (y_(i)) + 251. * ((*work)[n3 + i])) / 270.; /* Restore original value of t -- updated in model() */ *t -= h; } return (SUCCESS); } neuron-7.5/src/scopmath/adeuler.c000077500000000000000000000103501323325274500170750ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: adeuler.c * * Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "adeuler.c,v 1.2 1999/01/04 12:46:40 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* Abstract: adeuler() */ /* Adaptive Euler integration subroutine for a set of */ /* first-order ordinary differential equations. Integrates */ /* from current time, t, to t + delta_t. */ /* */ /* Calling sequence: */ /* adeuler(neqn,var,der,p,t,delta_t,func,work,maxerror) */ /* */ /* Returns: int error code */ /* */ /* Arguments: */ /* Input: neqn, int, number of equations */ /* */ /* var, pointer to array of addresses of the */ /* state variables */ /* */ /* der, pointer to array of addresses of the */ /* derivatives of the state variables */ /* */ /* p, double precision variable array */ /* */ /* t, pointer to current time */ /* */ /* delta_t, double, time step for integration */ /* */ /* func, name of function which evaluates the */ /* derivatives of the dependent variables */ /* */ /* *work, pointer to double precision work array */ /* */ /* maxerror, double, maximum single-step error */ /* */ /* Output: time, the dependent variables, and the time */ /* derivatives of the dependent variables */ /* are updated */ /* */ /* Functions called: derivative function (named in call) must */ /* be supplied by user; call is func(p) */ /* */ /*--------------------------------------------------------------*/ #include #include "errcodes.h" int adeuler(_ninits, neqn, var, der, p, t, delta_t, func, work, maxerror) int _ninits; double p[], *t, delta_t, maxerror, **work; int var[]; int der[]; #define der_(arg) p[der[arg]] #define var_(arg) p[var[arg]] int neqn, (*func) (); { static int initialized = 0; int i; extern double *makevector(); double end_t, temp, Dderiv; static double dt; if (*work == (double *) 0) *work = makevector(neqn); if (initialized < _ninits) { if (delta_t < 0.01) dt = delta_t / 10.; else dt = 0.001; (*func) (p); initialized = _ninits; } end_t = *t + delta_t; for (; *t < end_t; *t += dt) { if (*t + dt > end_t) dt = end_t - *t; /* Update dependent variables and save derivatives */ for (i = 0; i < neqn; i++) { var_(i) += dt * (der_(i)); (*work)[i] = der_(i); } /* Calculate the derivatives at t + dt */ (*func) (p); Dderiv = 0.0; /* Estimate maximal second derivative */ for (i = 0; i < neqn; i++) if ((temp = fabs(der_(i) - (*work)[i]) / dt) > Dderiv) Dderiv = temp; /* Calculate the step size for the next integration step */ if (Dderiv != 0.0) dt = sqrt(2.0 * maxerror / Dderiv); } /* Restore original value of t -- updated in model() */ *t = end_t - delta_t; if (dt < ROUNDOFF) return (PRECISION); else return (SUCCESS); } neuron-7.5/src/scopmath/adrunge.c000077500000000000000000000072311323325274500171050ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: adrunge.c * * Copyright (c) 1989-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "adrunge.c,v 1.3 1999/01/04 12:46:41 hines Exp"; #endif /*-------------------------------------------------------------- * * Abstract: adrunge * * Solves simultaneous differential equations using a fourth * order Runge-Kutta algorithm with time step adjustment. * * Returns: int error code * * Calling sequence: adrunge(n, y, d, p, t, dt, dy, work, maxerror) * * Arguments * Input: n, int, number of differential equations * * y, pointer to array of addresses of the state * variables * * d, pointer to array of addresses of the derivatives * of the state variables * * p, double precision variable array * * t, pointer to current time * * dt, double, integration interval * * dy, name of function which evaluates the time * derivatives of the dependent variables * * *work, pointer to double precision work array * * maxerror, double, maximum single-step truncation * error * * Output: p[], double precision array containing the * values of the dependent variables and their * derivatives at time + h. * * Functions called: (*dy), which is derfunc(p) in SCoP, runge() * *--------------------------------------------------------------*/ #include #include "errcodes.h" #include "scoplib.h" int adrunge(_ninits, n, y, d, p, t, dt, dy, work, maxerror) int _ninits, n, (*dy) (); double p[], *t, dt, **work, maxerror; int y[]; int d[]; #define d_(arg) p[d[arg]] #define y_(arg) p[y[arg]] { int i; static int initialized = 0, steps; double T_err, temp, end_t; static double h, *ystore; extern double *makevector(); if (ystore == (double *) 0) ystore = makevector(n << 1); if (initialized < _ninits) { steps = -1; if (dt < 0.1) h = dt / 10.; else h = 0.01; initialized = _ninits; } end_t = *t + dt; for (; *t < end_t; *t += h) { /* Recalculate stepsize every ten integration steps */ if (++steps % 10 == 0) { /* * Store original values of state variables and take a double * time step. Make sure that end_t is not exceeded. */ for (i = 0; i < n; i++) ystore[i] = y_(i); if (*t + 2.*h > end_t) h = (end_t - *t) / 2.0; runge(_ninits, n, y, d, p, t, 2.0 * h, dy, work); /* Restore original state variable values */ for (i = 0; i < n; i++) { ystore[i + n] = y_(i); y_(i) = ystore[i]; } /* Take two single time steps */ runge(_ninits, n, y, d, p, t, h, dy, work); *t += h; runge(_ninits, n, y, d, p, t, h, dy, work); *t += h; steps++; /* * Calculate truncation error T_err and find optimal time step h */ T_err = 0.0; for (i = 0; i < n; i++) if ((temp = fabs(y_(i) - ystore[i + n]) / 30.) > T_err) T_err = temp; /* Guard against overflows due to roundoff error */ if (T_err < ROUNDOFF) T_err = 0.1 * maxerror; h = pow(maxerror * pow(h, 5.) / T_err, 0.25); if (h < ROUNDOFF) return (PRECISION); } /* * Generic integration step. Note that no step is taken if the step * size control algorithm has reached end_t. */ if (*t < end_t && *t + h > end_t) runge(_ninits, n, y, d, p, t, end_t - *t, dy, work); else if (*t + h <= end_t) runge(_ninits, n, y, d, p, t, h, dy, work); } /* Restore original value of time -- will be updated in model() */ *t = end_t - dt; return (SUCCESS); } neuron-7.5/src/scopmath/advance.c000077500000000000000000000126711323325274500170650ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: advance.c * * Copyright (c) 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "advance.c,v 1.3 1999/01/04 12:46:42 hines Exp" ; #endif #include #include #include "errcodes.h" #include "scoplib.h" static int oldsimeq(); /*----------------------------------------------------------------------------- * * _ADVANCE * * This is an experimental numerical method for SCoP-3 which integrates kinetic * rate equations. It is intended to be used only by models generated by MODL, * and its identity is meant to be concealed from the user. * */ int _advance(_ninits, n, s, d, p, t, dt, fun, pcoef, linflag) int n, _ninits, linflag; int (*fun) (); double *t, dt, *p, ***pcoef; int s[]; int d[]; #define d_(arg) p[d[arg]] #define s_(arg) p[s[arg]] { int i, j, ier; double err, **makematrix(), **coef; if (!*pcoef) { *pcoef = makematrix(n + 1, n + 1); } coef = *pcoef; for (i = 0; i < n; i++) { /* save old state */ d_(i) = s_(i); } #if 0 { int i, j; for (i = 0; i < n + 1; i++) { for (j = 0; j < n + 1; j++) { printf("%10.5g ", coef[i][j]); } printf("\n"); } } #endif for (err = 1, j = 0; err > CONVERGE; j++) { zero_matrix(coef, n + 1, n + 1); (*fun) (); if ((ier = oldsimeq(n, coef, coef[n]))) { return ier; /* answer in coef[n] */ } #if 0 { int i, j; for (i = 0; i < n + 1; i++) { for (j = 0; j < n + 1; j++) { printf("%10.5g ", coef[i][j]); } printf("\n"); } } #endif for (err = 0., i = 0; i < n; i++) { s_(i) += coef[n][i]; err += fabs(coef[n][i]); } if (j > MAXSTEPS) { return EXCEED_ITERS; } if (linflag) break; } zero_matrix(coef, n + 1, n + 1); (*fun) (); for (i = 0; i < n; i++) { /* restore Dstate at t+dt */ d_(i) = (s_(i) - d_(i)) / dt; } return SUCCESS; } /*--------------------------------------------------------------*/ /* */ /* OLSSIMEQ */ /* */ /* Solves simultaneous linear equations by Gaussian */ /* elimination, with partial pivoting (row interchange only). */ /* The oefficient matrix is destroyed in this subroutine. */ /* The indices for the pivot rows are stored in the vector */ /* perm[]; perm[i] is the index of the row to be used as the */ /* ith row of the matrix. Rows are not actually swapped. */ /* If a pivot or diagonal element is<= TOLER, currently set */ /* to 1.e-20, the matrix is considered singular or ill- */ /* conditioned. */ /* */ /* Returns: 0 if no error; 1 if matrix is singular or ill- */ /* conditioned */ /* */ /* Calling sequence: oldsimeq(n, coef, soln); */ /* */ /* Arguments: */ /* Input: coef[n][n+1] double augmented matrix of */ /* coefficients */ /* n int # of equations */ /* Output: soln[n] double solution vector */ /* */ /*--------------------------------------------------------------*/ static int oldsimeq(n, coef, soln) int n; double *coef[], soln[]; { int ipivot, isave=0, jrow, kcol, i, j, *perm; /* Create and initialize permutation vector */ perm = (int *) malloc((unsigned) (n * sizeof(int))); for (i = 0; i < n; i++) perm[i] = i; /* * The following loop is performed once for each row and implicitly * reduces the diagonal element to 1 and all elements below it to 0. To * save arithmetic operations, elements of the coefficient matrix which * will not later be used are not operated on (i.e., only values to the * right of the diagonal in a row are modified by the algorithm). */ for (j = 0; j < n; j++) { /* * First, find pivot row (i.e., row of the lower triangle which, when * transposed into the jth position, will put the largest column * element on the diagonal. Store pivot index in perm[]. */ ipivot = perm[j]; for (i = j + 1; i < n; i++) { jrow = perm[i]; if (fabs(coef[ipivot][j]) < fabs(coef[jrow][j])) { ipivot = jrow; isave = i; } } /* Now be sure the pivot found isn't too small */ if (fabs(coef[ipivot][j]) < ROUNDOFF) return (SINGULAR); /* Swap row indices in perm[] if pivot is not perm[j] */ if (ipivot != perm[j]) { perm[isave] = perm[j]; perm[j] = ipivot; } /* Row normalization */ for (kcol = j + 1; kcol <= n; kcol++) coef[ipivot][kcol] /= coef[ipivot][j]; /* Row reduction */ for (i = j + 1; i < n; i++) { jrow = perm[i]; for (kcol = j + 1; kcol <= n; kcol++) coef[jrow][kcol] -= coef[ipivot][kcol] * coef[jrow][j]; } } /* end loop over all rows */ /* Back substitution */ for (i = n - 1; i >= 0; i--) { jrow = perm[i]; soln[i] = coef[jrow][n]; for (j = i + 1; j < n; j++) soln[i] -= coef[jrow][j] * (soln[j]); } free(perm); return (SUCCESS); } neuron-7.5/src/scopmath/boundary.c000077500000000000000000000055311323325274500173040ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: boundary.c * * Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "boundary.c,v 1.1.1.1 1994/10/12 17:22:19 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* BOUNDARY */ /* */ /* Solution of the second order linear boundary value */ /* problem */ /* */ /* y" + f(x)y' + g(x)y = q(x) */ /* */ /* using the finite differences method with npts mesh points.*/ /* and user-supplied functions f, g, and q. */ /* y(x[0]) and y(x[npts-1]) are known, and boundary computes */ /* the values of y at the interior mesh points. */ /* */ /* Returns: 0 if no error; 2 if tridiagonal matrix is singular */ /* or ill-conditioned */ /* */ /* Calling sequence: boundary(npts, x, y, f, g, q) */ /* */ /* Arguments: */ /* Input: npts number of mesh points */ /* */ /* x double precision array of mesh points */ /* */ /* y double precision array of function */ /* values at the mesh points. Only the */ /* values at the terminal points are known */ /* */ /* f, g, names of user-supplied double precision */ /* q functions with argument (x[i]) */ /* */ /* Output: y the function values at the interior */ /* mesh points are included */ /* */ /* Functions called: makevector(),freevector(), tridiag(), */ /* f(xvalue), g(xvalue), q(xvalue) */ /* */ /*--------------------------------------------------------------*/ #include "scoplib.h" int boundary(npts, x, y, f, g, q) int npts; double x[], y[], (*f) (), (*g) (), (*q) (); { extern int diag(), freevector(); extern double *makevector(); int i, mesh, error; double *a, *b, *c, *d, h, temp; /* Calculate stepsize */ h = x[1] - x[0]; mesh = npts - 2; /* Allocate storage for tridiagonal system */ a = makevector(mesh); b = makevector(mesh); c = makevector(mesh); d = makevector(mesh); /* Evaluate tridiagonal matrix and constant vector */ for (i = 0; i < mesh; i++) { temp = (*f) (x[i + 1]) * h / 2.0; a[i] = 1. - temp; /* subdiagonal elements */ b[i] = -2. + (*g) (x[i + 1]) * h * h; /* diagonal elements */ c[i] = 1. + temp; /* superdiagonal elements */ d[i] = (*q) (x[i + 1]) * h * h; /* constant vector */ } /* Add end corrections */ d[0] -= a[0] * y[0]; d[mesh - 1] -= c[mesh - 1] * y[npts - 1]; /* Solve equations and load solution into y array */ error = tridiag(mesh, a, b, c, d, y + 1); freevector(a); freevector(b); freevector(c); freevector(d); return (error); } neuron-7.5/src/scopmath/crank.c000077500000000000000000000115511323325274500165560ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: crank.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "crank.c,v 1.1.1.1 1994/10/12 17:22:19 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* Abstract: crank() */ /* */ /* Sets up and solves the tridiagonal system of equations */ /* for solution of parabolic partial differential equations */ /* */ /* dy/dt = f(x, y, t)*d2y/dx2 + g(x, y, t) */ /* */ /* by the Crank-Nicolson method. */ /* */ /* A * y(t + dt) = B * y(t) + g(x, y, t) * dt */ /* */ /* where A and B are tridiagonal matrices whose elements are */ /* functions of the coefficient of the second order partial */ /* derivative in the differential equation to be solved. */ /* */ /* Returns: 0 if no error; 2 if tridiagonal matrix is singular */ /* or ill-conditioned */ /* */ /* Calling sequence: */ /* crank(n, y, fval, gval, dt, dx, t, bound) */ /* */ /* Arguments */ /* Input: n, int number of grid points */ /* */ /* *y, double current values of variables to */ /* be solved for */ /* */ /* *fval, double values of f(x, y, t) at x */ /* */ /* *gval, double values of g(x, y, t) at x */ /* */ /* dt, double time step */ /* */ /* dx, double spacing of grid points */ /* */ /* t, double value of independent variable */ /* else = 0 */ /* */ /* **bound, double boundary conditions */ /* */ /* Output: *y, double updated values of the state */ /* variable at the grid points */ /* */ /* Functions called: bounds(), tridiag(), makevector(), */ /* */ /*--------------------------------------------------------------*/ #include "scoplib.h" int crank(n, y, fval, gval, dt, dx, t, bound, pwork) int n; double y[], fval[], gval[], dt, dx, t, *bound[], **pwork; { extern int tridiag(); extern double *makevector(); int i, error, bounds(); double temp, r; double *main_diag, *sub_diag, *sup_diag, *const_vec; if (!*pwork) { *pwork = makevector(4*n); } main_diag = *pwork; sub_diag = main_diag + n; sup_diag = sub_diag + n; const_vec = sup_diag + n; temp = dt / (dx * dx); for (i = 0; i < n; i++) { r = temp * fval[i]; /* * Compute diagonals of tridiagonal matrix A. Note that sub_diag[0] * and sup_diag[n-1] are ignored in tridiag(). */ main_diag[i] = 2. + 2. * r; sub_diag[i] = sup_diag[i] = -r; /* Set up constant vector */ const_vec[i] = (2. - 2. * r) * (y[i]) + 2. * gval[i] * dt; if (i > 0) const_vec[i] += r * (y[i - 1]); if (i < n - 1) const_vec[i] += r * (y[i + 1]); } /* * If there are derivative constraints at the boundaries, correct the * values of matrix and constant vector elements at the terminal grid * points */ bounds(n, sub_diag, main_diag, sup_diag, const_vec, y, fval, dt, dx, bound); /* Solve tridiagonal system */ error = tridiag(n, sub_diag, main_diag, sup_diag, const_vec, y); return (error); } /*----------------------------------------------------------------------------- * * BOUNDS * * Calling sequence: bounds(n, a, b, c, d, y, fval, dt, dx, bound) * * Arguments: * n int number of mesh points * a[] double subdiagonal of tridiagonal matrix * b[] double diagonal of tridiagonal matrix * c[] double superdiagonal of tridiagonal matrix * d[] double constant vector * y[] double vector state variable * fval[] double vector of values of f(x, y, t) at x * dt double time step * dx double spacing of mesh points * **bound double boundary constraints * * Returns: * * Functions called: * * Files accessed: *---------------------------------------------------------------------------*/ int bounds(n, a, b, c, d, y, fval, dt, dx, bound) int n; double a[], b[], c[], d[], y[], fval[], dt, dx; double *bound[]; { int i; double temp; /* * Correct the matrix and constant vector elements corresponding to the * boundary conditions. */ temp = dt / (dx * dx); for (i = 0; i < 4; i++) { if (bound[i] == (double *) 0) continue; switch (i) { case 0: /* dy[0]/dx = value */ c[0] -= temp * fval[0]; d[0] += temp * fval[0] * (y[1] - 4. * dx * (*bound[0])); break; case 1: /* dy[n-1]/dx = value */ a[n - 1] -= temp * fval[n - 1]; d[n - 1] += temp * fval[n - 1] * (y[n - 2] + 4. * dx * (*bound[1])); break; case 2: /* y[0] = bound */ a[0] = 0.; b[0] = 1.; c[0] = 0.; d[0] = *bound[2]; break; case 3: /* y[n-1] = bound */ a[n-1] = 0.; b[n-1] = 1.; c[n-1] = 0.; d[n-1] = *bound[3]; break; } } return 0; } neuron-7.5/src/scopmath/crout.c000077500000000000000000000177571323325274500166320ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: crout.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "crout.c,v 1.2 1999/01/04 12:46:43 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* CROUT */ /* */ /* Performs an LU triangular factorization of a real matrix */ /* by the Crout algorithm using partial pivoting. Rows are */ /* not normalized; implicit equilibration is used. ROUNDOFF */ /* is the minimal value for a pivot element without its being*/ /* considered too close to zero (currently set to 1.0E-20). */ /* */ /* Returns: 0 if no error; 2 if matrix is singular or ill- */ /* conditioned */ /* */ /* Calling sequence: crout(n, a, perm) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of rows of the matrix */ /* */ /* a, double precision matrix to be factored */ /* */ /* Output: */ /* */ /* a, factors required to transform the constant */ /* vector in the set of simultaneous equations */ /* are stored in the lower triangle; factors for */ /* back substitution are stored in the upper */ /* triangle. */ /* */ /* perm, integer, permutation vector to store row */ /* interchanges */ /* */ /* Functions called: makevector(), freevector() */ /* */ /*--------------------------------------------------------------*/ #include #include "errcodes.h" int crout(n, a, perm) int n, perm[]; double *a[]; { extern int freevector(); extern double *makevector(); int i, j, k, r, pivot, irow, save_i=0, krow; double sum, *rowmax, equil_1, equil_2; /* Initialize permutation and rowmax vectors */ rowmax = makevector(n); for (i = 0; i < n; i++) { perm[i] = i; k = 0; for (j = 1; j < n; j++) if (fabs(a[i][j]) > fabs(a[i][k])) k = j; rowmax[i] = a[i][k]; } /* Loop over rows and columns r */ for (r = 0; r < n; r++) { /* * Operate on rth column. This produces the lower triangular matrix * of terms needed to transform the constant vector. */ for (i = r; i < n; i++) { sum = 0.0; irow = perm[i]; for (k = 0; k < r; k++) { krow = perm[k]; sum += a[irow][k] * a[krow][r]; } a[irow][r] -= sum; } /* Find row containing the pivot in the rth column */ pivot = perm[r]; equil_1 = fabs(a[pivot][r] / rowmax[pivot]); for (i = r + 1; i < n; i++) { irow = perm[i]; equil_2 = fabs(a[irow][r] / rowmax[irow]); if (equil_2 > equil_1) { /* make irow the new pivot row */ pivot = irow; save_i = i; equil_1 = equil_2; } } /* Interchange entries in permutation vector if necessary */ if (pivot != perm[r]) { perm[save_i] = perm[r]; perm[r] = pivot; } /* Check that pivot element is not too small */ if (fabs(a[pivot][r]) < ROUNDOFF) return (SINGULAR); /* * Operate on row in rth position. This produces the upper * triangular matrix whose diagonal elements are assumed to be unity. * This matrix is used in the back substitution algorithm. */ for (j = r + 1; j < n; j++) { sum = 0.0; for (k = 0; k < r; k++) { krow = perm[k]; sum += a[pivot][k] * a[krow][j]; } a[pivot][j] = (a[pivot][j] - sum) / a[pivot][r]; } } freevector(rowmax); return (SUCCESS); } /*--------------------------------------------------------------*/ /* */ /* SOLVE() */ /* */ /* Performs forward substitution algorithm to transform the */ /* constant vector in the linear simultaneous equations to */ /* be consistent with the factored matrix. Then performs */ /* back substitution to find the solution to the simultane- */ /* ous linear equations. */ /* */ /* Returns: no return variable */ /* */ /* Calling sequence: solve(n, a, b, perm, p, y) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of rows of the matrix */ /* */ /* a, double precision matrix containing the */ /* factored matrix of coefficients of the linear */ /* equations. */ /* */ /* b, vector of function values */ /* */ /* perm, integer, permutation vector to store row */ /* interchanges */ /* */ /* Output: */ /* */ /* p[y[i]] contains the solution vector */ /* */ /*--------------------------------------------------------------*/ int solve(n, a, b, perm, p, y) int n, perm[]; double *a[], *b, *p; int y[]; #define y_(arg) p[y[arg]] #define b_(arg) b[arg] { int i, j, pivot; double sum; /* Perform forward substitution with pivoting */ if (y) { for (i = 0; i < n; i++) { pivot = perm[i]; sum = 0.0; for (j = 0; j < i; j++) sum += a[pivot][j] * (y_(j)); y_(i) = (b_(pivot) - sum) / a[pivot][i]; } /* * Note that the y vector is already in the correct order for back * substitution. Perform back substitution, pivoting the matrix but not * the y vector. There is no need to divide by the diagonal element as * this is assumed to be unity. */ for (i = n - 1; i >= 0; i--) { pivot = perm[i]; sum = 0.0; for (j = i + 1; j < n; j++) sum += a[pivot][j] * (y_(j)); y_(i) -= sum; } }else{ for (i = 0; i < n; i++) { pivot = perm[i]; sum = 0.0; for (j = 0; j < i; j++) sum += a[pivot][j] * (p[j]); p[i] = (b_(pivot) - sum) / a[pivot][i]; } /* * Note that the y vector is already in the correct order for back * substitution. Perform back substitution, pivoting the matrix but not * the y vector. There is no need to divide by the diagonal element as * this is assumed to be unity. */ for (i = n - 1; i >= 0; i--) { pivot = perm[i]; sum = 0.0; for (j = i + 1; j < n; j++) sum += a[pivot][j] * (p[j]); p[i] -= sum; } } return 0; } neuron-7.5/src/scopmath/crout_thread.c000077500000000000000000000177111323325274500201470ustar00rootroot00000000000000#include <../../nrnconf.h> #include /****************************************************************************** * * File: crout.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "crout.c,v 1.2 1999/01/04 12:46:43 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* CROUT */ /* */ /* Performs an LU triangular factorization of a real matrix */ /* by the Crout algorithm using partial pivoting. Rows are */ /* not normalized; implicit equilibration is used. ROUNDOFF */ /* is the minimal value for a pivot element without its being*/ /* considered too close to zero (currently set to 1.0E-20). */ /* */ /* Returns: 0 if no error; 2 if matrix is singular or ill- */ /* conditioned */ /* */ /* Calling sequence: crout(n, a, perm) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of rows of the matrix */ /* */ /* a, double precision matrix to be factored */ /* */ /* Output: */ /* */ /* a, factors required to transform the constant */ /* vector in the set of simultaneous equations */ /* are stored in the lower triangle; factors for */ /* back substitution are stored in the upper */ /* triangle. */ /* */ /* perm, integer, permutation vector to store row */ /* interchanges */ /* */ /* Functions called: makevector(), freevector() */ /* */ /*--------------------------------------------------------------*/ #include #include "errcodes.h" int nrn_crout_thread(NewtonSpace* ns, int n, double** a, int* perm) { int i, j, k, r, pivot, irow, save_i=0, krow; double sum, *rowmax, equil_1, equil_2; /* Initialize permutation and rowmax vectors */ rowmax = ns->rowmax; for (i = 0; i < n; i++) { perm[i] = i; k = 0; for (j = 1; j < n; j++) if (fabs(a[i][j]) > fabs(a[i][k])) k = j; rowmax[i] = a[i][k]; } /* Loop over rows and columns r */ for (r = 0; r < n; r++) { /* * Operate on rth column. This produces the lower triangular matrix * of terms needed to transform the constant vector. */ for (i = r; i < n; i++) { sum = 0.0; irow = perm[i]; for (k = 0; k < r; k++) { krow = perm[k]; sum += a[irow][k] * a[krow][r]; } a[irow][r] -= sum; } /* Find row containing the pivot in the rth column */ pivot = perm[r]; equil_1 = fabs(a[pivot][r] / rowmax[pivot]); for (i = r + 1; i < n; i++) { irow = perm[i]; equil_2 = fabs(a[irow][r] / rowmax[irow]); if (equil_2 > equil_1) { /* make irow the new pivot row */ pivot = irow; save_i = i; equil_1 = equil_2; } } /* Interchange entries in permutation vector if necessary */ if (pivot != perm[r]) { perm[save_i] = perm[r]; perm[r] = pivot; } /* Check that pivot element is not too small */ if (fabs(a[pivot][r]) < ROUNDOFF) return (SINGULAR); /* * Operate on row in rth position. This produces the upper * triangular matrix whose diagonal elements are assumed to be unity. * This matrix is used in the back substitution algorithm. */ for (j = r + 1; j < n; j++) { sum = 0.0; for (k = 0; k < r; k++) { krow = perm[k]; sum += a[pivot][k] * a[krow][j]; } a[pivot][j] = (a[pivot][j] - sum) / a[pivot][r]; } } return (SUCCESS); } /*--------------------------------------------------------------*/ /* */ /* SOLVE() */ /* */ /* Performs forward substitution algorithm to transform the */ /* constant vector in the linear simultaneous equations to */ /* be consistent with the factored matrix. Then performs */ /* back substitution to find the solution to the simultane- */ /* ous linear equations. */ /* */ /* Returns: no return variable */ /* */ /* Calling sequence: solve(n, a, b, perm, p, y) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of rows of the matrix */ /* */ /* a, double precision matrix containing the */ /* factored matrix of coefficients of the linear */ /* equations. */ /* */ /* b, vector of function values */ /* */ /* perm, integer, permutation vector to store row */ /* interchanges */ /* */ /* Output: */ /* */ /* p[y[i]] contains the solution vector */ /* */ /*--------------------------------------------------------------*/ void nrn_scopmath_solve_thread(int n, double** a, double* b, int* perm, double* p, int* y) #define y_(arg) p[y[arg]] #define b_(arg) b[arg] { int i, j, pivot; double sum; /* Perform forward substitution with pivoting */ if (y) { for (i = 0; i < n; i++) { pivot = perm[i]; sum = 0.0; for (j = 0; j < i; j++) sum += a[pivot][j] * (y_(j)); y_(i) = (b_(pivot) - sum) / a[pivot][i]; } /* * Note that the y vector is already in the correct order for back * substitution. Perform back substitution, pivoting the matrix but not * the y vector. There is no need to divide by the diagonal element as * this is assumed to be unity. */ for (i = n - 1; i >= 0; i--) { pivot = perm[i]; sum = 0.0; for (j = i + 1; j < n; j++) sum += a[pivot][j] * (y_(j)); y_(i) -= sum; } }else{ for (i = 0; i < n; i++) { pivot = perm[i]; sum = 0.0; for (j = 0; j < i; j++) sum += a[pivot][j] * (p[j]); p[i] = (b_(pivot) - sum) / a[pivot][i]; } /* * Note that the y vector is already in the correct order for back * substitution. Perform back substitution, pivoting the matrix but not * the y vector. There is no need to divide by the diagonal element as * this is assumed to be unity. */ for (i = n - 1; i >= 0; i--) { pivot = perm[i]; sum = 0.0; for (j = i + 1; j < n; j++) sum += a[pivot][j] * (p[j]); p[i] -= sum; } } } neuron-7.5/src/scopmath/csoda.c000077500000000000000000005527341323325274500165660ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: csoda.c * * Fortran-77 original (LSODA) obtained from 'netlib@ornl.gov'. * Combined with supporting routines from Linpack and translated into C by * 'f2c' (obtained from 'netlib@att.research.com'). * ******************************************************************************/ #define d1mach_ csoda_d1mach #define daxpy_ csoda_daxpy #define ddot_ csoda_ddot #define dgbfa_ csoda_dgbfa #define dgbsl_ csoda_dgbsl #define dgefa_ csoda_dgefa #define dgesl_ csoda_dgesl #define dscal_ csoda_dscal #define idamax_ csoda_idamax #ifndef LINT static char RCSid[] = "csoda.c,v 1.1.1.1 1994/10/12 17:22:19 hines Exp" ; #endif /* -- translated by f2c (version of 4 June 1990 12:16:42). You must link the resulting object file with the libraries: -lF77 -lI77 -lm -lc (in that order) */ #include "f2c.h" /* Common Block Declarations */ struct ls0001_1_ { doublereal rowns[209], ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround; integer illin, init, lyh, lewt, lacor, lsavf, lwm, liwm, mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns[6], icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter, maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu; }; struct ls0001_2_ { doublereal rowns[209], ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround; integer iownd[14], iowns[6], icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter, maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu; }; struct ls0001_3_ { doublereal conit, crate, el[13], elco[156] /* was [13][12] */, hold, rmax, tesco[36] /* was [3][12] */, ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround; integer iownd[14], ialth, ipup, lmax, meo, nqnyh, nslp, icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter, maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu; }; struct ls0001_4_ { doublereal rowns[209], rcomm[9]; integer illin, iduma[10], ntrep, idumb[2], iowns[6], icomm[19]; }; #define ls0001_1 (*(struct ls0001_1_ *) &ls0001_) #define ls0001_2 (*(struct ls0001_2_ *) &ls0001_) #define ls0001_3 (*(struct ls0001_3_ *) &ls0001_) #define ls0001_4 (*(struct ls0001_4_ *) &ls0001_) union { struct { doublereal tsw, rowns2[20], pdnorm; integer insufr, insufi, ixpr, iowns2[2], jtyp, mused, mxordn, mxords; } _1; struct { doublereal rownd2, rowns2[20], pdnorm; integer iownd2[3], iowns2[2], jtyp, mused, mxordn, mxords; } _2; struct { doublereal rownd2, pdest, pdlast, ratio, cm1[12], cm2[5], pdnorm; integer iownd2[3], icount, irflag, jtyp, mused, mxordn, mxords; } _3; } lsa001_; #define lsa001_1 (lsa001_._1) #define lsa001_2 (lsa001_._2) #define lsa001_3 (lsa001_._3) struct eh0001_1_ { integer mesflg, lunit; }; #define eh0001_1 (*(struct eh0001_1_ *) &eh0001_) /* Initialized data */ struct { doublereal fill_1[218]; integer e_2; integer fill_3[10]; integer e_4; doublereal fill_5[14]; doublereal e_6; } ls0001_ = { {0}, 0, {0}, 0, {0}, 0. }; struct { integer e_1[2]; } eh0001_ = { 1, 6 }; /* Table of constant values */ static integer c__1 = 1; static integer c__60 = 60; static integer c__103 = 103; static integer c__0 = 0; static doublereal c_b136 = 0.; static integer c__50 = 50; static integer c__2 = 2; static integer c__104 = 104; static integer c__4 = 4; static integer c__101 = 101; static integer c__102 = 102; static integer c__105 = 105; static integer c__106 = 106; static integer c__107 = 107; static integer c__301 = 301; static integer c__201 = 201; static integer c__202 = 202; static integer c__203 = 203; static integer c__204 = 204; static integer c__205 = 205; static integer c__30 = 30; static integer c__206 = 206; static integer c__207 = 207; static integer c__3 = 3; static integer c__5 = 5; static integer c__6 = 6; static integer c__7 = 7; static integer c__8 = 8; static integer c__9 = 9; static integer c__10 = 10; static integer c__11 = 11; static integer c__12 = 12; static integer c__13 = 13; static integer c__40 = 40; static integer c__14 = 14; static integer c__15 = 15; static integer c__16 = 16; static integer c__17 = 17; static integer c__18 = 18; static integer c__19 = 19; static integer c__20 = 20; static integer c__21 = 21; static integer c__22 = 22; static integer c__23 = 23; static integer c__24 = 24; static integer c__25 = 25; static integer c__26 = 26; static integer c__27 = 27; static integer c__28 = 28; static integer c__29 = 29; static integer c__302 = 302; static integer c__303 = 303; static integer c__51 = 51; static integer c__52 = 52; doublereal d1mach_(idum) integer *idum; { /* System generated locals */ doublereal ret_val; /* Local variables */ static doublereal comp, u; /*-----------------------------------------------------------------------A UX00030*/ /*THIS ROUTINE COMPUTES THE UNIT ROUNDOFF OF THE MACHINE IN DOUBLE AU X00040*/ /*PRECISION. THIS IS DEFINED AS THE SMALLEST POSITIVE MACHINE NUMBER AU X00050*/ /*U SUCH THAT 1.0D0 + U .NE. 1.0D0 (IN DOUBLE PRECISION). AU X00060*/ /*-----------------------------------------------------------------------A UX00070*/ u = 1.; L10: u *= .5; comp = u + 1.; if (comp != 1.) { goto L10; } ret_val = u * 2.; return ret_val; /*----------------------- END OF FUNCTION D1MACH ------------------------A UX00150*/ } /* d1mach_ */ /* Subroutine */ int daxpy_(n, da, dx, incx, dy, incy) integer *n; doublereal *da, *dx; integer *incx; doublereal *dy; integer *incy; { /* System generated locals */ integer i_1; /* Local variables */ static integer i, m, ix, iy, mp1; /* AU X06830*/ /* CONSTANT TIMES A VECTOR PLUS A VECTOR. AU X06840*/ /* USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE. AU X06850*/ /* JACK DONGARRA, LINPACK, 3/11/78. AU X06860*/ /* AU X06870*/ /* AU X06900*/ /* Parameter adjustments */ --dy; --dx; /* Function Body */ if (*n <= 0) { return 0; } if (*da == 0.) { return 0; } if (*incx == 1 && *incy == 1) { goto L20; } /* AU X06940*/ /* CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS AU X06950*/ /* NOT EQUAL TO 1 AU X06960*/ /* AU X06970*/ ix = 1; iy = 1; if (*incx < 0) { ix = (-(*n) + 1) * *incx + 1; } if (*incy < 0) { iy = (-(*n) + 1) * *incy + 1; } i_1 = *n; for (i = 1; i <= i_1; ++i) { dy[iy] += *da * dx[ix]; ix += *incx; iy += *incy; /* L10: */ } return 0; /* AU X07080*/ /* CODE FOR BOTH INCREMENTS EQUAL TO 1 AU X07090*/ /* AU X07100*/ /* AU X07110*/ /* CLEAN-UP LOOP AU X07120*/ /* AU X07130*/ L20: m = *n % 4; if (m == 0) { goto L40; } i_1 = m; for (i = 1; i <= i_1; ++i) { dy[i] += *da * dx[i]; /* L30: */ } if (*n < 4) { return 0; } L40: mp1 = m + 1; i_1 = *n; for (i = mp1; i <= i_1; i += 4) { dy[i] += *da * dx[i]; dy[i + 1] += *da * dx[i + 1]; dy[i + 2] += *da * dx[i + 2]; dy[i + 3] += *da * dx[i + 3]; /* L50: */ } return 0; } /* daxpy_ */ doublereal ddot_(n, dx, incx, dy, incy) integer *n; doublereal *dx; integer *incx; doublereal *dy; integer *incy; { /* System generated locals */ integer i_1; doublereal ret_val; /* Local variables */ static integer i, m; static doublereal dtemp; static integer ix, iy, mp1; /* AU X07710*/ /* FORMS THE DOT PRODUCT OF TWO VECTORS. AU X07720*/ /* USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE. AU X07730*/ /* JACK DONGARRA, LINPACK, 3/11/78. AU X07740*/ /* AU X07750*/ /* AU X07780*/ /* Parameter adjustments */ --dy; --dx; /* Function Body */ ret_val = 0.; dtemp = 0.; if (*n <= 0) { return ret_val; } if (*incx == 1 && *incy == 1) { goto L20; } /* AU X07830*/ /* CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS AU X07840*/ /* NOT EQUAL TO 1 AU X07850*/ /* AU X07860*/ ix = 1; iy = 1; if (*incx < 0) { ix = (-(*n) + 1) * *incx + 1; } if (*incy < 0) { iy = (-(*n) + 1) * *incy + 1; } i_1 = *n; for (i = 1; i <= i_1; ++i) { dtemp += dx[ix] * dy[iy]; ix += *incx; iy += *incy; /* L10: */ } ret_val = dtemp; return ret_val; /* AU X07980*/ /* CODE FOR BOTH INCREMENTS EQUAL TO 1 AU X07990*/ /* AU X08000*/ /* AU X08010*/ /* CLEAN-UP LOOP AU X08020*/ /* AU X08030*/ L20: m = *n % 5; if (m == 0) { goto L40; } i_1 = m; for (i = 1; i <= i_1; ++i) { dtemp += dx[i] * dy[i]; /* L30: */ } if (*n < 5) { goto L60; } L40: mp1 = m + 1; i_1 = *n; for (i = mp1; i <= i_1; i += 5) { dtemp = dtemp + dx[i] * dy[i] + dx[i + 1] * dy[i + 1] + dx[i + 2] * dy[i + 2] + dx[i + 3] * dy[i + 3] + dx[i + 4] * dy[i + 4]; /* L50: */ } L60: ret_val = dtemp; return ret_val; } /* ddot_ */ /* Subroutine */ int dgbfa_(abd, lda, n, ml, mu, ipvt, info) doublereal *abd; integer *lda, *n, *ml, *mu, *ipvt, *info; { /* System generated locals */ integer abd_dim1, abd_offset, i_1, i_2, i_3, i_4; /* Local variables */ static integer i, j, k, l, m; static doublereal t; extern /* Subroutine */ int dscal_(), daxpy_(); static integer i0, j0, j1, lm, mm, ju; extern integer idamax_(); static integer jz, kp1, nm1; /* AU X03760*/ /* DGBFA FACTORS A DOUBLE PRECISION BAND MATRIX BY ELIMINATION. AU X03770*/ /* AU X03780*/ /* DGBFA IS USUALLY CALLED BY DGBCO, BUT IT CAN BE CALLED AU X03790*/ /* DIRECTLY WITH A SAVING IN TIME IF RCOND IS NOT NEEDED. AU X03800*/ /* AU X03810*/ /* ON ENTRY AU X03820*/ /* AU X03830*/ /* ABD DOUBLE PRECISION(LDA, N) AU X03840*/ /* CONTAINS THE MATRIX IN BAND STORAGE. THE COLUMNS AU X03850*/ /* OF THE MATRIX ARE STORED IN THE COLUMNS OF ABD AND AU X03860*/ /* THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS AU X03870*/ /* ML+1 THROUGH 2*ML+MU+1 OF ABD . AU X03880*/ /* SEE THE COMMENTS BELOW FOR DETAILS. AU X03890*/ /* AU X03900*/ /* LDA INTEGER AU X03910*/ /* THE LEADING DIMENSION OF THE ARRAY ABD . AU X03920*/ /* LDA MUST BE .GE. 2*ML + MU + 1 . AU X03930*/ /* AU X03940*/ /* N INTEGER AU X03950*/ /* THE ORDER OF THE ORIGINAL MATRIX. AU X03960*/ /* AU X03970*/ /* ML INTEGER AU X03980*/ /* NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL. AU X03990*/ /* 0 .LE. ML .LT. N . AU X04000*/ /* AU X04010*/ /* MU INTEGER AU X04020*/ /* NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL. AU X04030*/ /* 0 .LE. MU .LT. N . AU X04040*/ /* MORE EFFICIENT IF ML .LE. MU . AU X04050*/ /* ON RETURN AU X04060*/ /* AU X04070*/ /* ABD AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND AU X04080*/ /* THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT. AU X04090*/ /* THE FACTORIZATION CAN BE WRITTEN A = L*U WHERE AU X04100*/ /* L IS A PRODUCT OF PERMUTATION AND UNIT LOWER AU X04110*/ /* TRIANGULAR MATRICES AND U IS UPPER TRIANGULAR. AU X04120*/ /* AU X04130*/ /* IPVT INTEGER(N) AU X04140*/ /* AN INTEGER VECTOR OF PIVOT INDICES. AU X04150*/ /* AU X04160*/ /* INFO INTEGER AU X04170*/ /* = 0 NORMAL VALUE. AU X04180*/ /* = K IF U(K,K) .EQ. 0.0 . THIS IS NOT AN ERROR AU X04190*/ /* CONDITION FOR THIS SUBROUTINE, BUT IT DOES AU X04200*/ /* INDICATE THAT DGBSL WILL DIVIDE BY ZERO IF AU X04210*/ /* CALLED. USE RCOND IN DGBCO FOR A RELIABLE AU X04220*/ /* INDICATION OF SINGULARITY. AU X04230*/ /* AU X04240*/ /* BAND STORAGE AU X04250*/ /* AU X04260*/ /* IF A IS A BAND MATRIX, THE FOLLOWING PROGRAM SEGMENT AU X04270*/ /* WILL SET UP THE INPUT. AU X04280*/ /* AU X04290*/ /* ML = (BAND WIDTH BELOW THE DIAGONAL) AU X04300*/ /* MU = (BAND WIDTH ABOVE THE DIAGONAL) AU X04310*/ /* M = ML + MU + 1 AU X04320*/ /* DO 20 J = 1, N AU X04330*/ /* I1 = MAX0(1, J-MU) AU X04340*/ /* I2 = MIN0(N, J+ML) AU X04350*/ /* DO 10 I = I1, I2 AU X04360*/ /* K = I - J + M AU X04370*/ /* ABD(K,J) = A(I,J) AU X04380*/ /* 10 CONTINUE AU X04390*/ /* 20 CONTINUE AU X04400*/ /* AU X04410*/ /* THIS USES ROWS ML+1 THROUGH 2*ML+MU+1 OF ABD . AU X04420*/ /* IN ADDITION, THE FIRST ML ROWS IN ABD ARE USED FOR AU X04430*/ /* ELEMENTS GENERATED DURING THE TRIANGULARIZATION. AU X04440*/ /* THE TOTAL NUMBER OF ROWS NEEDED IN ABD IS 2*ML+MU+1 . AU X04450*/ /* THE ML+MU BY ML+MU UPPER LEFT TRIANGLE AND THE AU X04460*/ /* ML BY ML LOWER RIGHT TRIANGLE ARE NOT REFERENCED. AU X04470*/ /* AU X04480*/ /* LINPACK. THIS VERSION DATED 08/14/78 . AU X04490*/ /* CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB. AU X04500*/ /* AU X04510*/ /* SUBROUTINES AND FUNCTIONS AU X04520*/ /* AU X04530*/ /* BLAS DAXPY,DSCAL,IDAMAX AU X04540*/ /* FORTRAN MAX0,MIN0 AU X04550*/ /* AU X04560*/ /* INTERNAL VARIABLES AU X04570*/ /* AU X04580*/ /* AU X04610*/ /* AU X04620*/ /* Parameter adjustments */ --ipvt; abd_dim1 = *lda; abd_offset = abd_dim1 + 1; abd -= abd_offset; /* Function Body */ m = *ml + *mu + 1; *info = 0; /* AU X04650*/ /* ZERO INITIAL FILL-IN COLUMNS AU X04660*/ /* AU X04670*/ j0 = *mu + 2; j1 = min(*n,m) - 1; if (j1 < j0) { goto L30; } i_1 = j1; for (jz = j0; jz <= i_1; ++jz) { i0 = m + 1 - jz; i_2 = *ml; for (i = i0; i <= i_2; ++i) { abd[i + jz * abd_dim1] = 0.; /* L10: */ } /* L20: */ } L30: jz = j1; ju = 0; /* AU X04800*/ /* GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING AU X04810*/ /* AU X04820*/ nm1 = *n - 1; if (nm1 < 1) { goto L130; } i_1 = nm1; for (k = 1; k <= i_1; ++k) { kp1 = k + 1; /* AUX04870*/ /* ZERO NEXT FILL-IN COLUMN AUX04880*/ /* AUX04890*/ ++jz; if (jz > *n) { goto L50; } if (*ml < 1) { goto L50; } i_2 = *ml; for (i = 1; i <= i_2; ++i) { abd[i + jz * abd_dim1] = 0.; /* L40: */ } L50: /* AUX04970*/ /* FIND L = PIVOT INDEX AUX04980*/ /* AUX04990*/ /* Computing MIN */ i_2 = *ml, i_3 = *n - k; lm = min(i_2,i_3); i_2 = lm + 1; l = idamax_(&i_2, &abd[m + k * abd_dim1], &c__1) + m - 1; ipvt[k] = l + k - m; /* AUX05030*/ /* ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED AUX05040*/ /* AUX05050*/ if (abd[l + k * abd_dim1] == 0.) { goto L100; } /* AUX05070*/ /* INTERCHANGE IF NECESSARY AUX05080*/ /* AUX05090*/ if (l == m) { goto L60; } t = abd[l + k * abd_dim1]; abd[l + k * abd_dim1] = abd[m + k * abd_dim1]; abd[m + k * abd_dim1] = t; L60: /* AUX05150*/ /* COMPUTE MULTIPLIERS AUX05160*/ /* AUX05170*/ t = -1. / abd[m + k * abd_dim1]; dscal_(&lm, &t, &abd[m + 1 + k * abd_dim1], &c__1); /* AUX05200*/ /* ROW ELIMINATION WITH COLUMN INDEXING AUX05210*/ /* AUX05220*/ /* Computing MIN */ /* Computing MAX */ i_3 = ju, i_4 = *mu + ipvt[k]; i_2 = max(i_3,i_4); ju = min(i_2,*n); mm = m; if (ju < kp1) { goto L90; } i_2 = ju; for (j = kp1; j <= i_2; ++j) { --l; --mm; t = abd[l + j * abd_dim1]; if (l == mm) { goto L70; } abd[l + j * abd_dim1] = abd[mm + j * abd_dim1]; abd[mm + j * abd_dim1] = t; L70: daxpy_(&lm, &t, &abd[m + 1 + k * abd_dim1], &c__1, &abd[mm + 1 + j * abd_dim1], &c__1); /* L80: */ } L90: goto L110; L100: *info = k; L110: /* L120: */ ; } L130: ipvt[*n] = *n; if (abd[m + *n * abd_dim1] == 0.) { *info = *n; } return 0; } /* dgbfa_ */ /* Subroutine */ int dgbsl_(abd, lda, n, ml, mu, ipvt, b, job) doublereal *abd; integer *lda, *n, *ml, *mu, *ipvt; doublereal *b; integer *job; { /* System generated locals */ integer abd_dim1, abd_offset, i_1, i_2, i_3; /* Local variables */ extern doublereal ddot_(); static integer k, l, m; static doublereal t; extern /* Subroutine */ int daxpy_(); static integer kb, la, lb, lm, nm1; /* AU X05500*/ /* DGBSL SOLVES THE DOUBLE PRECISION BAND SYSTEM AU X05510*/ /* A * X = B OR TRANS(A) * X = B AU X05520*/ /* CALL DGBSL(ABD,LDA,N,ML,MU,IPVT,C(1,J),0) AU X06010*/ /* 10 CONTINUE AU X06020*/ /* AU X06030*/ /* LINPACK. THIS VERSION DATED 08/14/78 . AU X06040*/ /* CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB. AU X06050*/ /* AU X06060*/ /* SUBROUTINES AND FUNCTIONS AU X06070*/ /* AU X06080*/ /* BLAS DAXPY,DDOT AU X06090*/ /* FORTRAN MIN0 AU X06100*/ /* AU X06110*/ /* INTERNAL VARIABLES AU X06120*/ /* AU X06130*/ /* AU X06160*/ /* Parameter adjustments */ --b; --ipvt; abd_dim1 = *lda; abd_offset = abd_dim1 + 1; abd -= abd_offset; /* Function Body */ m = *mu + *ml + 1; nm1 = *n - 1; if (*job != 0) { goto L50; } /* AU X06200*/ /* JOB = 0 , SOLVE A * X = B AU X06210*/ /* FIRST SOLVE L*Y = B AU X06220*/ /* AU X06230*/ if (*ml == 0) { goto L30; } if (nm1 < 1) { goto L30; } i_1 = nm1; for (k = 1; k <= i_1; ++k) { /* Computing MIN */ i_2 = *ml, i_3 = *n - k; lm = min(i_2,i_3); l = ipvt[k]; t = b[l]; if (l == k) { goto L10; } b[l] = b[k]; b[k] = t; L10: daxpy_(&lm, &t, &abd[m + 1 + k * abd_dim1], &c__1, &b[k + 1], &c__1); /* L20: */ } L30: /* AU X06370*/ /* NOW SOLVE U*X = Y AU X06380*/ /* AU X06390*/ i_1 = *n; for (kb = 1; kb <= i_1; ++kb) { k = *n + 1 - kb; b[k] /= abd[m + k * abd_dim1]; lm = min(k,m) - 1; la = m - lm; lb = k - lm; t = -b[k]; daxpy_(&lm, &t, &abd[la + k * abd_dim1], &c__1, &b[lb], &c__1); /* L40: */ } goto L100; L50: /* AU X06510*/ /* JOB = NONZERO, SOLVE TRANS(A) * X = B AU X06520*/ /* FIRST SOLVE TRANS(U)*Y = B AU X06530*/ /* AU X06540*/ i_1 = *n; for (k = 1; k <= i_1; ++k) { lm = min(k,m) - 1; la = m - lm; lb = k - lm; t = ddot_(&lm, &abd[la + k * abd_dim1], &c__1, &b[lb], &c__1); b[k] = (b[k] - t) / abd[m + k * abd_dim1]; /* L60: */ } /* AU X06620*/ /* NOW SOLVE TRANS(L)*X = Y AU X06630*/ /* AU X06640*/ if (*ml == 0) { goto L90; } if (nm1 < 1) { goto L90; } i_1 = nm1; for (kb = 1; kb <= i_1; ++kb) { k = *n - kb; /* Computing MIN */ i_2 = *ml, i_3 = *n - k; lm = min(i_2,i_3); b[k] += ddot_(&lm, &abd[m + 1 + k * abd_dim1], &c__1, &b[k + 1], & c__1); l = ipvt[k]; if (l == k) { goto L70; } t = b[l]; b[l] = b[k]; b[k] = t; L70: /* L80: */ ; } L90: L100: return 0; } /* dgbsl_ */ /* Subroutine */ int dgefa_(a, lda, n, ipvt, info) doublereal *a; integer *lda, *n, *ipvt, *info; { /* System generated locals */ integer a_dim1, a_offset, i_1, i_2, i_3; /* Local variables */ static integer j, k, l; static doublereal t; extern /* Subroutine */ int dscal_(), daxpy_(); extern integer idamax_(); static integer kp1, nm1; /* AU X01560*/ /* DGEFA FACTORS A DOUBLE PRECISION MATRIX BY GAUSSIAN ELIMINATION. AU X01570*/ /* AU X01580*/ /* DGEFA IS USUALLY CALLED BY DGECO, BUT IT CAN BE CALLED AU X01590*/ /* DIRECTLY WITH A SAVING IN TIME IF RCOND IS NOT NEEDED. AU X01600*/ /* (TIME FOR DGECO) = (1 + 9/N)*(TIME FOR DGEFA) . AU X01610*/ /* AU X01620*/ /* ON ENTRY AU X01630*/ /* AU X01640*/ /* A DOUBLE PRECISION(LDA, N) AU X01650*/ /* THE MATRIX TO BE FACTORED. AU X01660*/ /* AU X01670*/ /* LDA INTEGER AU X01680*/ /* THE LEADING DIMENSION OF THE ARRAY A . AU X01690*/ /* AU X01700*/ /* N INTEGER AU X01710*/ /* THE ORDER OF THE MATRIX A . AU X01720*/ /* AU X01730*/ /* ON RETURN AU X01740*/ /* AU X01750*/ /* A AN UPPER TRIANGULAR MATRIX AND THE MULTIPLIERS AU X01760*/ /* WHICH WERE USED TO OBTAIN IT. AU X01770*/ /* THE FACTORIZATION CAN BE WRITTEN A = L*U WHERE AU X01780*/ /* L IS A PRODUCT OF PERMUTATION AND UNIT LOWER AU X01790*/ /* TRIANGULAR MATRICES AND U IS UPPER TRIANGULAR. AU X01800*/ /* AU X01810*/ /* IPVT INTEGER(N) AU X01820*/ /* AN INTEGER VECTOR OF PIVOT INDICES. AU X01830*/ /* AU X01840*/ /* INFO INTEGER AU X01850*/ /* = 0 NORMAL VALUE. AU X01860*/ /* = K IF U(K,K) .EQ. 0.0 . THIS IS NOT AN ERROR AU X01870*/ /* CONDITION FOR THIS SUBROUTINE, BUT IT DOES AU X01880*/ /* INDICATE THAT DGESL OR DGEDI WILL DIVIDE BY ZERO AU X01890*/ /* IF CALLED. USE RCOND IN DGECO FOR A RELIABLE AU X01900*/ /* INDICATION OF SINGULARITY. AU X01910*/ /* AU X01920*/ /* LINPACK. THIS VERSION DATED 08/14/78 . AU X01930*/ /* CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB. AU X01940*/ /* AU X01950*/ /* SUBROUTINES AND FUNCTIONS AU X01960*/ /* AU X01970*/ /* BLAS DAXPY,DSCAL,IDAMAX AU X01980*/ /* AU X01990*/ /* INTERNAL VARIABLES AU X02000*/ /* AU X02010*/ /* AU X02040*/ /* AU X02050*/ /* GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING AU X02060*/ /* AU X02070*/ /* Parameter adjustments */ --ipvt; a_dim1 = *lda; a_offset = a_dim1 + 1; a -= a_offset; /* Function Body */ *info = 0; nm1 = *n - 1; if (nm1 < 1) { goto L70; } i_1 = nm1; for (k = 1; k <= i_1; ++k) { kp1 = k + 1; /* AUX02130*/ /* FIND L = PIVOT INDEX AUX02140*/ /* AUX02150*/ i_2 = *n - k + 1; l = idamax_(&i_2, &a[k + k * a_dim1], &c__1) + k - 1; ipvt[k] = l; /* AUX02180*/ /* ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED AUX02190*/ /* AUX02200*/ if (a[l + k * a_dim1] == 0.) { goto L40; } /* AUX02220*/ /* INTERCHANGE IF NECESSARY AUX02230*/ /* AUX02240*/ if (l == k) { goto L10; } t = a[l + k * a_dim1]; a[l + k * a_dim1] = a[k + k * a_dim1]; a[k + k * a_dim1] = t; L10: /* AUX02300*/ /* COMPUTE MULTIPLIERS AUX02310*/ /* AUX02320*/ t = -1. / a[k + k * a_dim1]; i_2 = *n - k; dscal_(&i_2, &t, &a[k + 1 + k * a_dim1], &c__1); /* AUX02350*/ /* ROW ELIMINATION WITH COLUMN INDEXING AUX02360*/ /* AUX02370*/ i_2 = *n; for (j = kp1; j <= i_2; ++j) { t = a[l + j * a_dim1]; if (l == k) { goto L20; } a[l + j * a_dim1] = a[k + j * a_dim1]; a[k + j * a_dim1] = t; L20: i_3 = *n - k; daxpy_(&i_3, &t, &a[k + 1 + k * a_dim1], &c__1, &a[k + 1 + j * a_dim1], &c__1); /* L30: */ } goto L50; L40: *info = k; L50: /* L60: */ ; } L70: ipvt[*n] = *n; if (a[*n + *n * a_dim1] == 0.) { *info = *n; } return 0; } /* dgefa_ */ /* Subroutine */ int dgesl_(a, lda, n, ipvt, b, job) doublereal *a; integer *lda, *n, *ipvt; doublereal *b; integer *job; { /* System generated locals */ integer a_dim1, a_offset, i_1, i_2; /* Local variables */ extern doublereal ddot_(); static integer k, l; static doublereal t; extern /* Subroutine */ int daxpy_(); static integer kb, nm1; /* AU X02590*/ /* DGESL SOLVES THE DOUBLE PRECISION SYSTEM AU X02600*/ /* A * X = B OR TRANS(A) * X = B AU X02610*/ /* SUBROUTINES AND FUNCTIONS AU X03100*/ /* AU X03110*/ /* BLAS DAXPY,DDOT AU X03120*/ /* AU X03130*/ /* INTERNAL VARIABLES AU X03140*/ /* AU X03150*/ /* AU X03180*/ /* Parameter adjustments */ --b; --ipvt; a_dim1 = *lda; a_offset = a_dim1 + 1; a -= a_offset; /* Function Body */ nm1 = *n - 1; if (*job != 0) { goto L50; } /* AU X03210*/ /* JOB = 0 , SOLVE A * X = B AU X03220*/ /* FIRST SOLVE L*Y = B AU X03230*/ /* AU X03240*/ if (nm1 < 1) { goto L30; } i_1 = nm1; for (k = 1; k <= i_1; ++k) { l = ipvt[k]; t = b[l]; if (l == k) { goto L10; } b[l] = b[k]; b[k] = t; L10: i_2 = *n - k; daxpy_(&i_2, &t, &a[k + 1 + k * a_dim1], &c__1, &b[k + 1], &c__1); /* L20: */ } L30: /* AU X03360*/ /* NOW SOLVE U*X = Y AU X03370*/ /* AU X03380*/ i_1 = *n; for (kb = 1; kb <= i_1; ++kb) { k = *n + 1 - kb; b[k] /= a[k + k * a_dim1]; t = -b[k]; i_2 = k - 1; daxpy_(&i_2, &t, &a[k * a_dim1 + 1], &c__1, &b[1], &c__1); /* L40: */ } goto L100; L50: /* AU X03470*/ /* JOB = NONZERO, SOLVE TRANS(A) * X = B AU X03480*/ /* FIRST SOLVE TRANS(U)*Y = B AU X03490*/ /* AU X03500*/ i_1 = *n; for (k = 1; k <= i_1; ++k) { i_2 = k - 1; t = ddot_(&i_2, &a[k * a_dim1 + 1], &c__1, &b[1], &c__1); b[k] = (b[k] - t) / a[k + k * a_dim1]; /* L60: */ } /* AU X03550*/ /* NOW SOLVE TRANS(L)*X = Y AU X03560*/ /* AU X03570*/ if (nm1 < 1) { goto L90; } i_1 = nm1; for (kb = 1; kb <= i_1; ++kb) { k = *n - kb; i_2 = *n - k; b[k] += ddot_(&i_2, &a[k + 1 + k * a_dim1], &c__1, &b[k + 1], &c__1); l = ipvt[k]; if (l == k) { goto L70; } t = b[l]; b[l] = b[k]; b[k] = t; L70: /* L80: */ ; } L90: L100: return 0; } /* dgesl_ */ /* Subroutine */ int dscal_(n, da, dx, incx) integer *n; doublereal *da, *dx; integer *incx; { /* System generated locals */ integer i_1, i_2; /* Local variables */ static integer i, m, nincx, mp1; /* AU X07300*/ /* SCALES A VECTOR BY A CONSTANT. AU X07310*/ /* USES UNROLLED LOOPS FOR INCREMENT EQUAL TO ONE. AU X07320*/ /* JACK DONGARRA, LINPACK, 3/11/78. AU X07330*/ /* AU X07340*/ /* AU X07370*/ /* Parameter adjustments */ --dx; /* Function Body */ if (*n <= 0) { return 0; } if (*incx == 1) { goto L20; } /* AU X07400*/ /* CODE FOR INCREMENT NOT EQUAL TO 1 AU X07410*/ /* AU X07420*/ nincx = *n * *incx; i_1 = nincx; i_2 = *incx; for (i = 1; i_2 < 0 ? i >= i_1 : i <= i_1; i += i_2) { dx[i] = *da * dx[i]; /* L10: */ } return 0; /* AU X07480*/ /* CODE FOR INCREMENT EQUAL TO 1 AU X07490*/ /* AU X07500*/ /* AU X07510*/ /* CLEAN-UP LOOP AU X07520*/ /* AU X07530*/ L20: m = *n % 5; if (m == 0) { goto L40; } i_2 = m; for (i = 1; i <= i_2; ++i) { dx[i] = *da * dx[i]; /* L30: */ } if (*n < 5) { return 0; } L40: mp1 = m + 1; i_2 = *n; for (i = mp1; i <= i_2; i += 5) { dx[i] = *da * dx[i]; dx[i + 1] = *da * dx[i + 1]; dx[i + 2] = *da * dx[i + 2]; dx[i + 3] = *da * dx[i + 3]; dx[i + 4] = *da * dx[i + 4]; /* L50: */ } return 0; } /* dscal_ */ integer idamax_(n, dx, incx) integer *n; doublereal *dx; integer *incx; { /* System generated locals */ integer ret_val, i_1; doublereal d_1; /* Local variables */ static doublereal dmax_; static integer i, ix; /* AU X08190*/ /* FINDS THE INDEX OF ELEMENT HAVING MAX. ABSOLUTE VALUE. AU X08200*/ /* JACK DONGARRA, LINPACK, 3/11/78. AU X08210*/ /* AU X08220*/ /* AU X08250*/ /* Parameter adjustments */ --dx; /* Function Body */ ret_val = 0; if (*n < 1) { return ret_val; } ret_val = 1; if (*n == 1) { return ret_val; } if (*incx == 1) { goto L20; } /* AU X08310*/ /* CODE FOR INCREMENT NOT EQUAL TO 1 AU X08320*/ /* AU X08330*/ ix = 1; dmax_ = abs(dx[1]); ix += *incx; i_1 = *n; for (i = 2; i <= i_1; ++i) { if ((d_1 = dx[ix], abs(d_1)) <= dmax_) { goto L5; } ret_val = i; dmax_ = (d_1 = dx[ix], abs(d_1)); L5: ix += *incx; /* L10: */ } return ret_val; /* AU X08440*/ /* CODE FOR INCREMENT EQUAL TO 1 AU X08450*/ /* AU X08460*/ L20: dmax_ = abs(dx[1]); i_1 = *n; for (i = 2; i <= i_1; ++i) { if ((d_1 = dx[i], abs(d_1)) <= dmax_) { goto L30; } ret_val = i; dmax_ = (d_1 = dx[i], abs(d_1)); L30: ; } return ret_val; } /* idamax_ */ /* Subroutine */ int lsoda_(f, neq, y, t, tout, itol, rtol, atol, itask, istate, iopt, rwork, lrw, iwork, liw, jac, jt) /* Subroutine */ int (*f) (); integer *neq; doublereal *y, *t, *tout; integer *itol; doublereal *rtol, *atol; integer *itask, *istate, *iopt; doublereal *rwork; integer *lrw, *iwork, *liw; /* Subroutine */ int (*jac) (); integer *jt; { /* Initialized data */ static integer mord[2] = { 12,5 }; static integer mxstp0 = 500; static integer mxhnl0 = 10; /* System generated locals */ integer i_1; doublereal d_1, d_2; /* Builtin functions */ double sqrt(), d_sign(); /* Local variables */ extern /* Subroutine */ int prja_(); static doublereal hmax; static logical ihit; static doublereal ewti, size; static integer len1c, len1n, len1s, i, iflag; static doublereal atoli; static integer leniw, lenwm; extern /* Subroutine */ int stoda_(); static integer imxer; static doublereal tcrit; static integer lenrw; static doublereal h0; static integer i1, i2; static doublereal rtoli, tdist, tolsf; extern doublereal d1mach_(); static doublereal tnext; extern /* Subroutine */ int ewset_(), intdy_(); static doublereal w0; extern /* Subroutine */ int solsy_(); static integer ml; static doublereal rh; static integer mu; static doublereal tp; static integer leniwc, lenrwc, lf0, lenrwn, lenrws; extern doublereal vmnorm_(); extern /* Subroutine */ int xerrwv_(); static doublereal big; static integer kgo; static doublereal ayi, hmx, tol, sum; static integer len1, len2; /* ----------------------------------------------------------------------- */ /* this is the march 30, 1987 version of */ /* lsoda.. livermore solver for ordinary differential equations, with */ /* automatic method switching for stiff and nonstiff problems. */ /* jac = name of subroutine for jacobian matrix. */ /* use a dummy name. see also paragraph e below. */ /* jt = jacobian type indicator. set jt = 2. */ /* see also paragraph e below. */ /* note that the main program must declare arrays y, rwork, iwork, */ /* and possibly atol. */ /* c. the output from the first call (or any call) is.. */ /* y = array of computed values of y(t) vector. */ /* t = corresponding value of independent variable (normally tout). */ /* istate = 2 if lsoda was successful, negative otherwise. */ /* -1 means excess work done on this call (perhaps wrong jt). */ /* -2 means excess accuracy requested (tolerances too small). */ /* -3 means illegal input detected (see printed message). */ /* -4 means repeated error test failures (check all inputs). */ /* -5 means repeated convergence failures (perhaps bad jacobian */ /* supplied or wrong choice of jt or tolerances). */ /* -6 means error weight became zero during problem. (solution */ /* component i vanished, and atol or atol(i) = 0.) */ /* -7 means work space insufficient to finish (see messages). */ /* d. to continue the integration after a successful return, simply */ /* reset tout and call lsoda again. no other parameters need be reset. */ /* e. note.. if and when lsoda regards the problem as stiff, and */ /* switches methods accordingly, it must make use of the neq by neq */ /* jacobian matrix, j = df/dy. for the sake of simplicity, the */ /* inputs to lsoda recommended in paragraph b above cause lsoda to */ /* treat j as a full matrix, and to approximate it internally by */ /* difference quotients. alternatively, j can be treated as a band */ /* matrix (with great potential reduction in the size of the rwork */ /* array). also, in either the full or banded case, the user can supply */ /* j in closed form, with a routine whose name is passed as the jac */ /* argument. these alternatives are described in the paragraphs on */ /* rwork, jac, and jt in the full description of the call sequence below. */ /* ----------------------------------------------------------------------- */ /* example problem. */ /* the following is a simple example problem, with the coding */ /* needed for its solution by lsoda. the problem is from chemical */ /* kinetics, and consists of the following three rate equations.. */ /* dy1/dt = -.04*y1 + 1.e4*y2*y3 */ /* dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 */ /* dy3/dt = 3.e7*y2**2 */ /* on the interval from t = 0.0 to t = 4.e10, with initial conditions */ /* y1 = 1.0, y2 = y3 = 0. the problem is stiff. */ /* the following coding solves this problem with lsoda, */ /* printing results at t = .4, 4., ..., 4.e10. it uses */ /* itol = 2 and atol much smaller for y2 than y1 or y3 because */ /* y2 has much smaller values. */ /* at the end of the run, statistical quantities of interest are */ /* printed (see optional outputs in the full description below). */ /* external fex */ /* double precision atol, rtol, rwork, t, tout, y */ /* dimension y(3), atol(3), rwork(70), iwork(23) */ /* neq = 3 */ /* y(1) = 1.0d0 */ /* y(2) = 0.0d0 */ /* y(3) = 0.0d0 */ /* t = 0.0d0 */ /* tout = 0.4d0 */ /* itol = 2 */ /* rtol = 1.0d-4 */ /* atol(1) = 1.0d-6 */ /* atol(2) = 1.0d-10 */ /* atol(3) = 1.0d-6 */ /* itask = 1 */ /* istate = 1 */ /* iopt = 0 */ /* lrw = 70 */ /* liw = 23 */ /* jt = 2 */ /* do 40 iout = 1,12 */ /* call lsoda(fex,neq,y,t,tout,itol,rtol,atol,itask,istate, */ /* 1 iopt,rwork,lrw,iwork,liw,jdum,jt) */ /* write(6,20)t,y(1),y(2),y(3) */ /* 20 format(7h at t =,e12.4,6h y =,3e14.6) */ /* if (istate .lt. 0) go to 80 */ /* 40 tout = tout*10.0d0 */ /* write(6,60)iwork(11),iwork(12),iwork(13),iwork(19),rwork(15) */ /* 60 format(/12h no. steps =,i4,11h no. f-s =,i4,11h no. j-s =,i4/ */ /* 1 19h method last used =,i2,25h last switch was at t =,e12.4) */ /* stop */ /* 80 write(6,90)istate */ /* 90 format(///22h error halt.. istate =,i3) */ /* stop */ /* end */ /* subroutine fex (neq, t, y, ydot) */ /* double precision t, y, ydot */ /* dimension y(3), ydot(3) */ /* ydot(1) = -.04d0*y(1) + 1.0d4*y(2)*y(3) */ /* ydot(3) = 3.0d7*y(2)*y(2) */ /* ydot(2) = -ydot(1) - ydot(3) */ /* return */ /* end */ /* the output of this program (on a cdc-7600 in single precision) */ /* is as follows.. */ /* at t = 4.0000e-01 y = 9.851712e-01 3.386380e-05 1.479493e-02 */ /* at t = 4.0000e+00 y = 9.055333e-01 2.240655e-05 9.444430e-02 */ /* at t = 4.0000e+01 y = 7.158403e-01 9.186334e-06 2.841505e-01 */ /* at t = 4.0000e+02 y = 4.505250e-01 3.222964e-06 5.494717e-01 */ /* at t = 4.0000e+03 y = 1.831975e-01 8.941774e-07 8.168016e-01 */ /* at t = 4.0000e+04 y = 3.898730e-02 1.621940e-07 9.610125e-01 */ /* at t = 4.0000e+05 y = 4.936363e-03 1.984221e-08 9.950636e-01 */ /* at t = 4.0000e+06 y = 5.161831e-04 2.065786e-09 9.994838e-01 */ /* at t = 4.0000e+07 y = 5.179817e-05 2.072032e-10 9.999482e-01 */ /* at t = 4.0000e+08 y = 5.283401e-06 2.113371e-11 9.999947e-01 */ /* at t = 4.0000e+09 y = 4.659031e-07 1.863613e-12 9.999995e-01 */ /* at t = 4.0000e+10 y = 1.404280e-08 5.617126e-14 1.000000e+00 */ /* no. steps = 361 no. f-s = 693 no. j-s = 64 */ /* method last used = 2 last switch was at t = 6.0092e-03 */ /* ----------------------------------------------------------------------- */ /* full description of user interface to lsoda. */ /* the user interface to lsoda consists of the following parts. */ /* i. the call sequence to subroutine lsoda, which is a driver */ /* routine for the solver. this includes descriptions of both */ /* the call sequence arguments and of user-supplied routines. */ /* following these descriptions is a description of */ /* optional inputs available through the call sequence, and then */ /* a description of optional outputs (in the work arrays). */ /* ii. descriptions of other routines in the lsoda package that may be */ /* (optionally) called by the user. these provide the ability to */ /* alter error message handling, save and restore the internal */ /* common, and obtain specified derivatives of the solution y(t). */ /* iii. descriptions of common blocks to be declared in overlay */ /* or similar environments, or to be saved when doing an interrupt */ /* of the problem and continued solution later. */ /* iv. description of a subroutine in the lsoda package, */ /* which the user may replace with his own version, if desired. */ /* this relates to the measurement of errors. */ /* ----------------------------------------------------------------------- */ /* part i. call sequence. */ /* the call sequence parameters used for input only are */ /* f, neq, tout, itol, rtol, atol, itask, iopt, lrw, liw, jac, jt, */ /* and those used for both input and output are */ /* y, t, istate. */ /* the work arrays rwork and iwork are also used for conditional and */ /* optional inputs and optional outputs. (the term output here refers */ /* to the return from subroutine lsoda to the user-s calling program.) */ /* the legality of input parameters will be thoroughly checked on the */ /* initial call for the problem, but not checked thereafter unless a */ /* change in input parameters is flagged by istate = 3 on input. */ /* the descriptions of the call arguments are as follows. */ /* f = the name of the user-supplied subroutine defining the */ /* ode system. the system must be put in the first-order */ /* form dy/dt = f(t,y), where f is a vector-valued function */ /* of the scalar t and the vector y. subroutine f is to */ /* compute the function f. it is to have the form */ /* subroutine f (neq, t, y, ydot) */ /* dimension y(1), ydot(1) */ /* where neq, t, and y are input, and the array ydot = f(t,y) */ /* is output. y and ydot are arrays of length neq. */ /* (in the dimension statement above, 1 is a dummy */ /* dimension.. it can be replaced by any value.) */ /* subroutine f should not alter y(1),...,y(neq). */ /* f must be declared external in the calling program. */ /* subroutine f may access user-defined quantities in */ /* neq(2),... and/or in y(neq(1)+1),... if neq is an array */ /* (dimensioned in f) and/or y has length exceeding neq(1). */ /* see the descriptions of neq and y below. */ /* if quantities computed in the f routine are needed */ /* externally to lsoda, an extra call to f should be made */ /* for this purpose, for consistent and accurate results. */ /* if only the derivative dy/dt is needed, use intdy instead. */ /* neq = the size of the ode system (number of first order */ /* ordinary differential equations). used only for input. */ /* neq may be decreased, but not increased, during the problem. */ /* if neq is decreased (with istate = 3 on input), the */ /* remaining components of y should be left undisturbed, if */ /* these are to be accessed in f and/or jac. */ /* normally, neq is a scalar, and it is generally referred to */ /* as a scalar in this user interface description. however, */ /* neq may be an array, with neq(1) set to the system size. */ /* (the lsoda package accesses only neq(1).) in either case, */ /* this parameter is passed as the neq argument in all calls */ /* to f and jac. hence, if it is an array, locations */ /* neq(2),... may be used to store other integer data and pass */ /* it to f and/or jac. subroutines f and/or jac must include */ /* neq in a dimension statement in that case. */ /* y = a real array for the vector of dependent variables, of */ /* length neq or more. used for both input and output on the */ /* first call (istate = 1), and only for output on other calls. */ /* on the first call, y must contain the vector of initial */ /* values. on output, y contains the computed solution vector, */ /* evaluated at t. if desired, the y array may be used */ /* for other purposes between calls to the solver. */ /* this array is passed as the y argument in all calls to */ /* f and jac. hence its length may exceed neq, and locations */ /* y(neq+1),... may be used to store other real data and */ /* pass it to f and/or jac. (the lsoda package accesses only */ /* y(1),...,y(neq).) */ /* t = the independent variable. on input, t is used only on the */ /* first call, as the initial point of the integration. */ /* on output, after each call, t is the value at which a */ /* computed solution y is evaluated (usually the same as tout). */ /* on an error return, t is the farthest point reached. */ /* tout = the next value of t at which a computed solution is desired. */ /* used only for input. */ /* when starting the problem (istate = 1), tout may be equal */ /* to t for one call, then should .ne. t for the next call. */ /* for the initial t, an input value of tout .ne. t is used */ /* in order to determine the direction of the integration */ /* (i.e. the algebraic sign of the step sizes) and the rough */ /* scale of the problem. integration in either direction */ /* (forward or backward in t) is permitted. */ /* if itask = 2 or 5 (one-step modes), tout is ignored after */ /* the first call (i.e. the first call with tout .ne. t). */ /* otherwise, tout is required on every call. */ /* if itask = 1, 3, or 4, the values of tout need not be */ /* monotone, but a value of tout which backs up is limited */ /* to the current internal t interval, whose endpoints are */ /* tcur - hu and tcur (see optional outputs, below, for */ /* tcur and hu). */ /* itol = an indicator for the type of error control. see */ /* description below under atol. used only for input. */ /* rtol = a relative error tolerance parameter, either a scalar or */ /* an array of length neq. see description below under atol. */ /* input only. */ /* atol = an absolute error tolerance parameter, either a scalar or */ /* an array of length neq. input only. */ /* the input parameters itol, rtol, and atol determine */ /* the error control performed by the solver. the solver will */ /* control the vector e = (e(i)) of estimated local errors */ /* in y, according to an inequality of the form */ /* max-norm of ( e(i)/ewt(i) ) .le. 1, */ /* where ewt = (ewt(i)) is a vector of positive error weights. */ /* the values of rtol and atol should all be non-negative. */ /* the following table gives the types (scalar/array) of */ /* rtol and atol, and the corresponding form of ewt(i). */ /* itol rtol atol ewt(i) */ /* 1 scalar scalar rtol*abs(y(i)) + atol */ /* 2 scalar array rtol*abs(y(i)) + atol(i) */ /* 3 array scalar rtol(i)*abs(y(i)) + atol */ /* 4 array array rtol(i)*abs(y(i)) + atol(i) */ /* when either of these parameters is a scalar, it need not */ /* be dimensioned in the user-s calling program. */ /* if none of the above choices (with itol, rtol, and atol */ /* fixed throughout the problem) is suitable, more general */ /* error controls can be obtained by substituting a */ /* user-supplied routine for the setting of ewt. */ /* see part iv below. */ /* if global errors are to be estimated by making a repeated */ /* run on the same problem with smaller tolerances, then all */ /* components of rtol and atol (i.e. of ewt) should be scaled */ /* down uniformly. */ /* itask = an index specifying the task to be performed. */ /* input only. itask has the following values and meanings. */ /* 1 means normal computation of output values of y(t) at */ /* t = tout (by overshooting and interpolating). */ /* 2 means take one step only and return. */ /* 3 means stop at the first internal mesh point at or */ /* beyond t = tout and return. */ /* 4 means normal computation of output values of y(t) at */ /* t = tout but without overshooting t = tcrit. */ /* tcrit must be input as rwork(1). tcrit may be equal to */ /* or beyond tout, but not behind it in the direction of */ /* integration. this option is useful if the problem */ /* has a singularity at or beyond t = tcrit. */ /* 5 means take one step, without passing tcrit, and return. */ /* tcrit must be input as rwork(1). */ /* note.. if itask = 4 or 5 and the solver reaches tcrit */ /* (within roundoff), it will return t = tcrit (exactly) to */ /* indicate this (unless itask = 4 and tout comes before tcrit, */ /* in which case answers at t = tout are returned first). */ /* istate = an index used for input and output to specify the */ /* the state of the calculation. */ /* on input, the values of istate are as follows. */ /* 1 means this is the first call for the problem */ /* (initializations will be done). see note below. */ /* 2 means this is not the first call, and the calculation */ /* is to continue normally, with no change in any input */ /* parameters except possibly tout and itask. */ /* (if itol, rtol, and/or atol are changed between calls */ /* with istate = 2, the new values will be used but not */ /* tested for legality.) */ /* 3 means this is not the first call, and the */ /* calculation is to continue normally, but with */ /* a change in input parameters other than */ /* tout and itask. changes are allowed in */ /* neq, itol, rtol, atol, iopt, lrw, liw, jt, ml, mu, */ /* and any optional inputs except h0, mxordn, and mxords. */ /* (see iwork description for ml and mu.) */ /* note.. a preliminary call with tout = t is not counted */ /* as a first call here, as no initialization or checking of */ /* input is done. (such a call is sometimes useful for the */ /* purpose of outputting the initial conditions.) */ /* thus the first call for which tout .ne. t requires */ /* istate = 1 on input. */ /* on output, istate has the following values and meanings. */ /* 1 means nothing was done, as tout was equal to t with */ /* istate = 1 on input. (however, an internal counter was */ /* set to detect and prevent repeated calls of this type.) */ /* 2 means the integration was performed successfully. */ /* -1 means an excessive amount of work (more than mxstep */ /* steps) was done on this call, before completing the */ /* requested task, but the integration was otherwise */ /* successful as far as t. (mxstep is an optional input */ /* and is normally 500.) to continue, the user may */ /* simply reset istate to a value .gt. 1 and call again */ /* (the excess work step counter will be reset to 0). */ /* in addition, the user may increase mxstep to avoid */ /* this error return (see below on optional inputs). */ /* -2 means too much accuracy was requested for the precision */ /* of the machine being used. this was detected before */ /* completing the requested task, but the integration */ /* was successful as far as t. to continue, the tolerance */ /* parameters must be reset, and istate must be set */ /* to 3. the optional output tolsf may be used for this */ /* purpose. (note.. if this condition is detected before */ /* taking any steps, then an illegal input return */ /* (istate = -3) occurs instead.) */ /* -3 means illegal input was detected, before taking any */ /* integration steps. see written message for details. */ /* note.. if the solver detects an infinite loop of calls */ /* to the solver with illegal input, it will cause */ /* the run to stop. */ /* -4 means there were repeated error test failures on */ /* one attempted step, before completing the requested */ /* task, but the integration was successful as far as t. */ /* the problem may have a singularity, or the input */ /* may be inappropriate. */ /* -5 means there were repeated convergence test failures on */ /* one attempted step, before completing the requested */ /* task, but the integration was successful as far as t. */ /* this may be caused by an inaccurate jacobian matrix, */ /* if one is being used. */ /* -6 means ewt(i) became zero for some i during the */ /* integration. pure relative error control (atol(i)=0.0) */ /* was requested on a variable which has now vanished. */ /* the integration was successful as far as t. */ /* -7 means the length of rwork and/or iwork was too small to */ /* proceed, but the integration was successful as far as t. */ /* this happens when lsoda chooses to switch methods */ /* but lrw and/or liw is too small for the new method. */ /* note.. since the normal output value of istate is 2, */ /* it does not need to be reset for normal continuation. */ /* also, since a negative input value of istate will be */ /* regarded as illegal, a negative output value requires the */ /* user to change it, and possibly other inputs, before */ /* calling the solver again. */ /* iopt = an integer flag to specify whether or not any optional */ /* inputs are being used on this call. input only. */ /* the optional inputs are listed separately below. */ /* iopt = 0 means no optional inputs are being used. */ /* default values will be used in all cases. */ /* iopt = 1 means one or more optional inputs are being used. */ /* rwork = a real array (double precision) for work space, and (in the */ /* first 20 words) for conditional and optional inputs and */ /* optional outputs. */ /* as lsoda switches automatically between stiff and nonstiff */ /* methods, the required length of rwork can change during the */ /* problem. thus the rwork array passed to lsoda can either */ /* have a static (fixed) length large enough for both methods, */ /* or have a dynamic (changing) length altered by the calling */ /* program in response to output from lsoda. */ /* --- fixed length case --- */ /* if the rwork length is to be fixed, it should be at least */ /* max (lrn, lrs), */ /* where lrn and lrs are the rwork lengths required when the */ /* current method is nonstiff or stiff, respectively. */ /* the separate rwork length requirements lrn and lrs are */ /* as follows.. */ /* if neq is constant and the maximum method orders have */ /* their default values, then */ /* lrn = 20 + 16*neq, */ /* lrs = 22 + 9*neq + neq**2 if jt = 1 or 2, */ /* lrs = 22 + 10*neq + (2*ml+mu)*neq if jt = 4 or 5. */ /* under any other conditions, lrn and lrs are given by.. */ /* lrn = 20 + nyh*(mxordn+1) + 3*neq, */ /* lrs = 20 + nyh*(mxords+1) + 3*neq + lmat, */ /* where */ /* nyh = the initial value of neq, */ /* mxordn = 12, unless a smaller value is given as an */ /* optional input, */ /* mxords = 5, unless a smaller value is given as an */ /* optional input, */ /* lmat = length of matrix work space.. */ /* lmat = neq**2 + 2 if jt = 1 or 2, */ /* lmat = (2*ml + mu + 1)*neq + 2 if jt = 4 or 5. */ /* --- dynamic length case --- */ /* if the length of rwork is to be dynamic, then it should */ /* be at least lrn or lrs, as defined above, depending on the */ /* current method. initially, it must be at least lrn (since */ /* lsoda starts with the nonstiff method). on any return */ /* from lsoda, the optional output mcur indicates the current */ /* method. if mcur differs from the value it had on the */ /* previous return, or if there has only been one call to */ /* lsoda and mcur is now 2, then lsoda has switched */ /* methods during the last call, and the length of rwork */ /* should be reset (to lrn if mcur = 1, or to lrs if */ /* mcur = 2). (an increase in the rwork length is required */ /* if lsoda returned istate = -7, but not otherwise.) */ /* after resetting the length, call lsoda with istate = 3 */ /* to signal that change. */ /* lrw = the length of the array rwork, as declared by the user. */ /* (this will be checked by the solver.) */ /* iwork = an integer array for work space. */ /* as lsoda switches automatically between stiff and nonstiff */ /* methods, the required length of iwork can change during */ /* problem, between */ /* lis = 20 + neq and lin = 20, */ /* respectively. thus the iwork array passed to lsoda can */ /* either have a fixed length of at least 20 + neq, or have a */ /* dynamic length of at least lin or lis, depending on the */ /* current method. the comments on dynamic length under */ /* rwork above apply here. initially, this length need */ /* only be at least lin = 20. */ /* the first few words of iwork are used for conditional and */ /* optional inputs and optional outputs. */ /* the following 2 words in iwork are conditional inputs.. */ /* iwork(1) = ml these are the lower and upper */ /* iwork(2) = mu half-bandwidths, respectively, of the */ /* banded jacobian, excluding the main diagonal. */ /* the band is defined by the matrix locations */ /* (i,j) with i-ml .le. j .le. i+mu. ml and mu */ /* must satisfy 0 .le. ml,mu .le. neq-1. */ /* these are required if jt is 4 or 5, and */ /* ignored otherwise. ml and mu may in fact be */ /* the band parameters for a matrix to which */ /* df/dy is only approximately equal. */ /* liw = the length of the array iwork, as declared by the user. */ /* (this will be checked by the solver.) */ /* note.. the base addresses of the work arrays must not be */ /* altered between calls to lsoda for the same problem. */ /* the contents of the work arrays must not be altered */ /* between calls, except possibly for the conditional and */ /* optional inputs, and except for the last 3*neq words of rwork. */ /* the latter space is used for internal scratch space, and so is */ /* available for use by the user outside lsoda between calls, if */ /* desired (but not for use by f or jac). */ /* jac = the name of the user-supplied routine to compute the */ /* jacobian matrix, df/dy, if jt = 1 or 4. the jac routine */ /* is optional, but if the problem is expected to be stiff much */ /* of the time, you are encouraged to supply jac, for the sake */ /* of efficiency. (alternatively, set jt = 2 or 5 to have */ /* lsoda compute df/dy internally by difference quotients.) */ /* if and when lsoda uses df/dy, if treats this neq by neq */ /* matrix either as full (jt = 1 or 2), or as banded (jt = */ /* 4 or 5) with half-bandwidths ml and mu (discussed under */ /* iwork above). in either case, if jt = 1 or 4, the jac */ /* routine must compute df/dy as a function of the scalar t */ /* and the vector y. it is to have the form */ /* subroutine jac (neq, t, y, ml, mu, pd, nrowpd) */ /* dimension y(1), pd(nrowpd,1) */ /* where neq, t, y, ml, mu, and nrowpd are input and the array */ /* pd is to be loaded with partial derivatives (elements of */ /* the jacobian matrix) on output. pd must be given a first */ /* dimension of nrowpd. t and y have the same meaning as in */ /* subroutine f. (in the dimension statement above, 1 is a */ /* dummy dimension.. it can be replaced by any value.) */ /* in the full matrix case (jt = 1), ml and mu are */ /* ignored, and the jacobian is to be loaded into pd in */ /* columnwise manner, with df(i)/dy(j) loaded into pd(i,j). */ /* in the band matrix case (jt = 4), the elements */ /* within the band are to be loaded into pd in columnwise */ /* manner, with diagonal lines of df/dy loaded into the rows */ /* of pd. thus df(i)/dy(j) is to be loaded into pd(i-j+mu+1,j). */ /* ml and mu are the half-bandwidth parameters (see iwork). */ /* the locations in pd in the two triangular areas which */ /* correspond to nonexistent matrix elements can be ignored */ /* or loaded arbitrarily, as they are overwritten by lsoda. */ /* jac need not provide df/dy exactly. a crude */ /* approximation (possibly with a smaller bandwidth) will do. */ /* in either case, pd is preset to zero by the solver, */ /* so that only the nonzero elements need be loaded by jac. */ /* each call to jac is preceded by a call to f with the same */ /* arguments neq, t, and y. thus to gain some efficiency, */ /* intermediate quantities shared by both calculations may be */ /* saved in a user common block by f and not recomputed by jac, */ /* if desired. also, jac may alter the y array, if desired. */ /* jac must be declared external in the calling program. */ /* subroutine jac may access user-defined quantities in */ /* neq(2),... and/or in y(neq(1)+1),... if neq is an array */ /* (dimensioned in jac) and/or y has length exceeding neq(1). */ /* see the descriptions of neq and y above. */ /* jt = jacobian type indicator. used only for input. */ /* jt specifies how the jacobian matrix df/dy will be */ /* treated, if and when lsoda requires this matrix. */ /* jt has the following values and meanings.. */ /* 1 means a user-supplied full (neq by neq) jacobian. */ /* 2 means an internally generated (difference quotient) full */ /* jacobian (using neq extra calls to f per df/dy value). */ /* 4 means a user-supplied banded jacobian. */ /* 5 means an internally generated banded jacobian (using */ /* ml+mu+1 extra calls to f per df/dy evaluation). */ /* if jt = 1 or 4, the user must supply a subroutine jac */ /* (the name is arbitrary) as described above under jac. */ /* if jt = 2 or 5, a dummy argument can be used. */ /* ----------------------------------------------------------------------- */ /* optional inputs. */ /* the following is a list of the optional inputs provided for in the */ /* call sequence. (see also part ii.) for each such input variable, */ /* this table lists its name as used in this documentation, its */ /* location in the call sequence, its meaning, and the default value. */ /* the use of any of these inputs requires iopt = 1, and in that */ /* case all of these inputs are examined. a value of zero for any */ /* of these optional inputs will cause the default value to be used. */ /* thus to use a subset of the optional inputs, simply preload */ /* locations 5 to 10 in rwork and iwork to 0.0 and 0 respectively, and */ /* then set those of interest to nonzero values. */ /* name location meaning and default value */ /* h0 rwork(5) the step size to be attempted on the first step. */ /* the default value is determined by the solver. */ /* hmax rwork(6) the maximum absolute step size allowed. */ /* the default value is infinite. */ /* hmin rwork(7) the minimum absolute step size allowed. */ /* the default value is 0. (this lower bound is not */ /* enforced on the final step before reaching tcrit */ /* when itask = 4 or 5.) */ /* ixpr iwork(5) flag to generate extra printing at method switches. */ /* ixpr = 0 means no extra printing (the default). */ /* ixpr = 1 means print data on each switch. */ /* t, h, and nst will be printed on the same logical */ /* unit as used for error messages. */ /* mxstep iwork(6) maximum number of (internally defined) steps */ /* allowed during one call to the solver. */ /* the default value is 500. */ /* mxhnil iwork(7) maximum number of messages printed (per problem) */ /* warning that t + h = t on a step (h = step size). */ /* this must be positive to result in a non-default */ /* value. the default value is 10. */ /* mxordn iwork(8) the maximum order to be allowed for the nonstiff */ /* (adams) method. the default value is 12. */ /* if mxordn exceeds the default value, it will */ /* be reduced to the default value. */ /* mxordn is held constant during the problem. */ /* mxords iwork(9) the maximum order to be allowed for the stiff */ /* (bdf) method. the default value is 5. */ /* if mxords exceeds the default value, it will */ /* be reduced to the default value. */ /* mxords is held constant during the problem. */ /* ----------------------------------------------------------------------- */ /* optional outputs. */ /* as optional additional output from lsoda, the variables listed */ /* below are quantities related to the performance of lsoda */ /* which are available to the user. these are communicated by way of */ /* the work arrays, but also have internal mnemonic names as shown. */ /* except where stated otherwise, all of these outputs are defined */ /* on any successful return from lsoda, and on any return with */ /* istate = -1, -2, -4, -5, or -6. on an illegal input return */ /* (istate = -3), they will be unchanged from their existing values */ /* (if any), except possibly for tolsf, lenrw, and leniw. */ /* on any error return, outputs relevant to the error will be defined, */ /* as noted below. */ /* name location meaning */ /* hu rwork(11) the step size in t last used (successfully). */ /* hcur rwork(12) the step size to be attempted on the next step. */ /* tcur rwork(13) the current value of the independent variable */ /* which the solver has actually reached, i.e. the */ /* current internal mesh point in t. on output, tcur */ /* will always be at least as far as the argument */ /* t, but may be farther (if interpolation was done). */ /* tolsf rwork(14) a tolerance scale factor, greater than 1.0, */ /* computed when a request for too much accuracy was */ /* detected (istate = -3 if detected at the start of */ /* the problem, istate = -2 otherwise). if itol is */ /* left unaltered but rtol and atol are uniformly */ /* scaled up by a factor of tolsf for the next call, */ /* then the solver is deemed likely to succeed. */ /* (the user may also ignore tolsf and alter the */ /* tolerance parameters in any other way appropriate.) */ /* tsw rwork(15) the value of t at the time of the last method */ /* switch, if any. */ /* nst iwork(11) the number of steps taken for the problem so far. */ /* nfe iwork(12) the number of f evaluations for the problem so far. */ /* nje iwork(13) the number of jacobian evaluations (and of matrix */ /* lu decompositions) for the problem so far. */ /* nqu iwork(14) the method order last used (successfully). */ /* nqcur iwork(15) the order to be attempted on the next step. */ /* imxer iwork(16) the index of the component of largest magnitude in */ /* the weighted local error vector ( e(i)/ewt(i) ), */ /* on an error return with istate = -4 or -5. */ /* lenrw iwork(17) the length of rwork actually required, assuming */ /* that the length of rwork is to be fixed for the */ /* rest of the problem, and that switching may occur. */ /* this is defined on normal returns and on an illegal */ /* input return for insufficient storage. */ /* leniw iwork(18) the length of iwork actually required, assuming */ /* that the length of iwork is to be fixed for the */ /* rest of the problem, and that switching may occur. */ /* this is defined on normal returns and on an illegal */ /* input return for insufficient storage. */ /* mused iwork(19) the method indicator for the last successful step.. */ /* 1 means adams (nonstiff), 2 means bdf (stiff). */ /* mcur iwork(20) the current method indicator.. */ /* 1 means adams (nonstiff), 2 means bdf (stiff). */ /* this is the method to be attempted */ /* on the next step. thus it differs from mused */ /* only if a method switch has just been made. */ /* the following two arrays are segments of the rwork array which */ /* may also be of interest to the user as optional outputs. */ /* for each array, the table below gives its internal name, */ /* its base address in rwork, and its description. */ /* name base address description */ /* yh 21 the nordsieck history array, of size nyh by */ /* (nqcur + 1), where nyh is the initial value */ /* of neq. for j = 0,1,...,nqcur, column j+1 */ /* of yh contains hcur**j/factorial(j) times */ /* the j-th derivative of the interpolating */ /* polynomial currently representing the solution, */ /* evaluated at t = tcur. */ /* acor lacor array of size neq used for the accumulated */ /* (from common corrections on each step, scaled on output */ /* as noted) to represent the estimated local error in y */ /* on the last step. this is the vector e in */ /* the description of the error control. it is */ /* defined only on a successful return from lsoda. */ /* the base address lacor is obtained by */ /* including in the user-s program the */ /* following 3 lines.. */ /* double precision rls */ /* common /ls0001/ rls(218), ils(39) */ /* lacor = ils(5) */ /* ----------------------------------------------------------------------- */ /* part ii. other routines callable. */ /* the following are optional calls which the user may make to */ /* gain additional capabilities in conjunction with lsoda. */ /* (the routines xsetun and xsetf are designed to conform to the */ /* slatec error handling package.) */ /* form of call function */ /* call xsetun(lun) set the logical unit number, lun, for */ /* output of messages from lsoda, if */ /* the default is not desired. */ /* the default value of lun is 6. */ /* call xsetf(mflag) set a flag to control the printing of */ /* messages by lsoda. */ /* mflag = 0 means do not print. (danger.. */ /* this risks losing valuable information.) */ /* mflag = 1 means print (the default). */ /* either of the above calls may be made at */ /* any time and will take effect immediately. */ /* call srcma(rsav,isav,job) saves and restores the contents of */ /* the internal common blocks used by */ /* lsoda (see part iii below). */ /* rsav must be a real array of length 240 */ /* or more, and isav must be an integer */ /* array of length 50 or more. */ /* job=1 means save common into rsav/isav. */ /* job=2 means restore common from rsav/isav. */ /* srcma is useful if one is */ /* interrupting a run and restarting */ /* later, or alternating between two or */ /* more problems solved with lsoda. */ /* call intdy(,,,,,) provide derivatives of y, of various */ /* (see below) orders, at a specified point t, if */ /* desired. it may be called only after */ /* a successful return from lsoda. */ /* the detailed instructions for using intdy are as follows. */ /* the form of the call is.. */ /* call intdy (t, k, rwork(21), nyh, dky, iflag) */ /* the input parameters are.. */ /* t = value of independent variable where answers are desired */ /* (normally the same as the t last returned by lsoda). */ /* for valid results, t must lie between tcur - hu and tcur. */ /* (see optional outputs for tcur and hu.) */ /* k = integer order of the derivative desired. k must satisfy */ /* 0 .le. k .le. nqcur, where nqcur is the current order */ /* (see optional outputs). the capability corresponding */ /* to k = 0, i.e. computing y(t), is already provided */ /* by lsoda directly. since nqcur .ge. 1, the first */ /* derivative dy/dt is always available with intdy. */ /* rwork(21) = the base address of the history array yh. */ /* nyh = column length of yh, equal to the initial value of neq. */ /* the output parameters are.. */ /* dky = a real array of length neq containing the computed value */ /* of the k-th derivative of y(t). */ /* iflag = integer flag, returned as 0 if k and t were legal, */ /* -1 if k was illegal, and -2 if t was illegal. */ /* on an error return, a message is also written. */ /* ----------------------------------------------------------------------- */ /* part iii. common blocks. */ /* if lsoda is to be used in an overlay situation, the user */ /* must declare, in the primary overlay, the variables in.. */ /* (1) the call sequence to lsoda, */ /* (2) the three internal common blocks */ /* /ls0001/ of length 257 (218 double precision words */ /* followed by 39 integer words), */ /* /lsa001/ of length 31 (22 double precision words */ /* followed by 9 integer words), */ /* /eh0001/ of length 2 (integer words). */ /* if lsoda is used on a system in which the contents of internal */ /* common blocks are not preserved between calls, the user should */ /* declare the above common blocks in his main program to insure */ /* that their contents are preserved. */ /* if the solution of a given problem by lsoda is to be interrupted */ /* and then later continued, such as when restarting an interrupted run */ /* or alternating between two or more problems, the user should save, */ /* following the return from the last lsoda call prior to the */ /* interruption, the contents of the call sequence variables and the */ /* internal common blocks, and later restore these values before the */ /* next lsoda call for that problem. to save and restore the common */ /* blocks, use subroutine srcma (see part ii above). */ /* ----------------------------------------------------------------------- */ /* part iv. optionally replaceable solver routines. */ /* below is a description of a routine in the lsoda package which */ /* relates to the measurement of errors, and can be */ /* replaced by a user-supplied version, if desired. however, since such */ /* a replacement may have a major impact on performance, it should be */ /* done only when absolutely necessary, and only with great caution. */ /* (note.. the means by which the package version of a routine is */ /* superseded by the user-s version may be system-dependent.) */ /* (a) ewset. */ /* the following subroutine is called just before each internal */ /* integration step, and sets the array of error weights, ewt, as */ /* described under itol/rtol/atol above.. */ /* subroutine ewset (neq, itol, rtol, atol, ycur, ewt) */ /* where neq, itol, rtol, and atol are as in the lsoda call sequence, */ /* ycur contains the current dependent variable vector, and */ /* ewt is the array of weights set by ewset. */ /* if the user supplies this subroutine, it must return in ewt(i) */ /* (i = 1,...,neq) a positive quantity suitable for comparing errors */ /* in y(i) to. the ewt array returned by ewset is passed to the */ /* vmnorm routine, and also used by lsoda in the computation */ /* of the optional output imxer, and the increments for difference */ /* quotient jacobians. */ /* in the user-supplied version of ewset, it may be desirable to use */ /* the current values of derivatives of y. derivatives up to order nq */ /* are available from the history array yh, described above under */ /* optional outputs. in ewset, yh is identical to the ycur array, */ /* extended to nq + 1 columns with a column length of nyh and scale */ /* factors of h**j/factorial(j). on the first call for the problem, */ /* given by nst = 0, nq is 1 and h is temporarily set to 1.0. */ /* the quantities nq, nyh, h, and nst can be obtained by including */ /* in ewset the statements.. */ /* double precision h, rls */ /* common /ls0001/ rls(218),ils(39) */ /* nq = ils(35) */ /* nyh = ils(14) */ /* nst = ils(36) */ /* h = rls(212) */ /* thus, for example, the current value of dy/dt can be obtained as */ /* ycur(nyh+i)/h (i=1,...,neq) (and the division by h is */ /* unnecessary when nst = 0). */ /* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */ /* other routines in the lsoda package. */ /* in addition to subroutine lsoda, the lsoda package includes the */ /* following subroutines and function routines.. */ /* intdy computes an interpolated value of the y vector at t = tout. */ /* stoda is the core integrator, which does one step of the */ /* integration and the associated error control. */ /* cfode sets all method coefficients and test constants. */ /* prja computes and preprocesses the jacobian matrix j = df/dy */ /* and the newton iteration matrix p = i - h*l0*j. */ /* solsy manages solution of linear system in chord iteration. */ /* ewset sets the error weight vector ewt before each step. */ /* vmnorm computes the weighted max-norm of a vector. */ /* fnorm computes the norm of a full matrix consistent with the */ /* weighted max-norm on vectors. */ /* bnorm computes the norm of a band matrix consistent with the */ /* weighted max-norm on vectors. */ /* srcma is a user-callable routine to save and restore */ /* the contents of the internal common blocks. */ /* dgefa and dgesl are routines from linpack for solving full */ /* systems of linear algebraic equations. */ /* dgbfa and dgbsl are routines from linpack for solving banded */ /* linear systems. */ /* daxpy, dscal, idamax, and ddot are basic linear algebra modules */ /* (blas) used by the above linpack routines. */ /* d1mach computes the unit roundoff in a machine-independent manner. */ /* xerrwv, xsetun, and xsetf handle the printing of all error */ /* messages and warnings. xerrwv is machine-dependent. */ /* note.. vmnorm, fnorm, bnorm, idamax, ddot, and d1mach are function */ /* routines. all the others are subroutines. */ /* the intrinsic and external routines used by lsoda are.. */ /* dabs, dmax1, dmin1, dfloat, max0, min0, mod, dsign, dsqrt, and write. */ /* a block data subprogram is also included with the package, */ /* for loading some of the variables in internal common. */ /* ----------------------------------------------------------------------- */ /* the following card is for optimized compilation on lll compilers. */ /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */ /* the following two internal common blocks contain */ /* (a) variables which are local to any subroutine but whose values must */ /* be preserved between calls to the routine (own variables), and */ /* (b) variables which are communicated between subroutines. */ /* the structure of each block is as follows.. all real variables are */ /* listed first, followed by all integers. within each type, the */ /* variables are grouped with those local to subroutine lsoda first, */ /* then those local to subroutine stoda, and finally those used */ /* for communication. the block ls0001 is declared in subroutines */ /* lsoda, intdy, stoda, prja, and solsy. the block lsa001 is declared */ /* in subroutines lsoda, stoda, and prja. groups of variables are */ /* replaced by dummy arrays in the common declarations in routines */ /* where those variables are not used. */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --iwork; --rwork; --atol; --rtol; --y; --neq; /* Function Body */ /* ----------------------------------------------------------------------- */ /* block a. */ /* this code block is executed on every call. */ /* it tests istate and itask for legality and branches appropriately. */ /* if istate .gt. 1 but the flag init shows that initialization has */ /* not yet been done, an error return occurs. */ /* if istate = 1 and tout = t, jump to block g and return immediately. */ /* ----------------------------------------------------------------------- */ if (*istate < 1 || *istate > 3) { goto L601; } if (*itask < 1 || *itask > 5) { goto L602; } if (*istate == 1) { goto L10; } if (ls0001_1.init == 0) { goto L603; } if (*istate == 2) { goto L200; } goto L20; L10: ls0001_1.init = 0; if (*tout == *t) { goto L430; } L20: ls0001_1.ntrep = 0; /* ----------------------------------------------------------------------- */ /* block b. */ /* the next code block is executed for the initial call (istate = 1), */ /* or for a continuation call with parameter changes (istate = 3). */ /* it contains checking of all inputs and various initializations. */ /* first check legality of the non-optional inputs neq, itol, iopt, */ /* jt, ml, and mu. */ /* ----------------------------------------------------------------------- */ if (neq[1] <= 0) { goto L604; } if (*istate == 1) { goto L25; } if (neq[1] > ls0001_1.n) { goto L605; } L25: ls0001_1.n = neq[1]; if (*itol < 1 || *itol > 4) { goto L606; } if (*iopt < 0 || *iopt > 1) { goto L607; } if (*jt == 3 || *jt < 1 || *jt > 5) { goto L608; } lsa001_1.jtyp = *jt; if (*jt <= 2) { goto L30; } ml = iwork[1]; mu = iwork[2]; if (ml < 0 || ml >= ls0001_1.n) { goto L609; } if (mu < 0 || mu >= ls0001_1.n) { goto L610; } L30: /* next process and check the optional inputs. -------------------------- */ if (*iopt == 1) { goto L40; } lsa001_1.ixpr = 0; ls0001_1.mxstep = mxstp0; ls0001_1.mxhnil = mxhnl0; ls0001_1.hmxi = 0.; ls0001_1.hmin = 0.; if (*istate != 1) { goto L60; } h0 = 0.; lsa001_1.mxordn = mord[0]; lsa001_1.mxords = mord[1]; goto L60; L40: lsa001_1.ixpr = iwork[5]; if (lsa001_1.ixpr < 0 || lsa001_1.ixpr > 1) { goto L611; } ls0001_1.mxstep = iwork[6]; if (ls0001_1.mxstep < 0) { goto L612; } if (ls0001_1.mxstep == 0) { ls0001_1.mxstep = mxstp0; } ls0001_1.mxhnil = iwork[7]; if (ls0001_1.mxhnil < 0) { goto L613; } if (ls0001_1.mxhnil == 0) { ls0001_1.mxhnil = mxhnl0; } if (*istate != 1) { goto L50; } h0 = rwork[5]; lsa001_1.mxordn = iwork[8]; if (lsa001_1.mxordn < 0) { goto L628; } if (lsa001_1.mxordn == 0) { lsa001_1.mxordn = 100; } lsa001_1.mxordn = min(lsa001_1.mxordn,mord[0]); lsa001_1.mxords = iwork[9]; if (lsa001_1.mxords < 0) { goto L629; } if (lsa001_1.mxords == 0) { lsa001_1.mxords = 100; } lsa001_1.mxords = min(lsa001_1.mxords,mord[1]); if ((*tout - *t) * h0 < 0.) { goto L614; } L50: hmax = rwork[6]; if (hmax < 0.) { goto L615; } ls0001_1.hmxi = 0.; if (hmax > 0.) { ls0001_1.hmxi = 1. / hmax; } ls0001_1.hmin = rwork[7]; if (ls0001_1.hmin < 0.) { goto L616; } /* ----------------------------------------------------------------------- */ /* set work array pointers and check lengths lrw and liw. */ /* if istate = 1, meth is initialized to 1 here to facilitate the */ /* checking of work space lengths. */ /* pointers to segments of rwork and iwork are named by prefixing l to */ /* the name of the segment. e.g., the segment yh starts at rwork(lyh). */ /* segments of rwork (in order) are denoted yh, wm, ewt, savf, acor. */ /* if the lengths provided are insufficient for the current method, */ /* an error return occurs. this is treated as illegal input on the */ /* first call, but as a problem interruption with istate = -7 on a */ /* continuation call. if the lengths are sufficient for the current */ /* method but not for both methods, a warning message is sent. */ /* ----------------------------------------------------------------------- */ L60: if (*istate == 1) { ls0001_1.meth = 1; } if (*istate == 1) { ls0001_1.nyh = ls0001_1.n; } ls0001_1.lyh = 21; len1n = (lsa001_1.mxordn + 1) * ls0001_1.nyh + 20; len1s = (lsa001_1.mxords + 1) * ls0001_1.nyh + 20; ls0001_1.lwm = len1s + 1; if (*jt <= 2) { lenwm = ls0001_1.n * ls0001_1.n + 2; } if (*jt >= 4) { lenwm = ((ml << 1) + mu + 1) * ls0001_1.n + 2; } len1s += lenwm; len1c = len1n; if (ls0001_1.meth == 2) { len1c = len1s; } len1 = max(len1n,len1s); len2 = ls0001_1.n * 3; lenrw = len1 + len2; lenrwn = len1n + len2; lenrws = len1s + len2; lenrwc = len1c + len2; iwork[17] = lenrw; ls0001_1.liwm = 1; leniw = ls0001_1.n + 20; leniwc = 20; if (ls0001_1.meth == 2) { leniwc = leniw; } iwork[18] = leniw; if (*istate == 1 && *lrw < lenrwc) { goto L617; } if (*istate == 1 && *liw < leniwc) { goto L618; } if (*istate == 3 && *lrw < lenrwc) { goto L550; } if (*istate == 3 && *liw < leniwc) { goto L555; } ls0001_1.lewt = len1 + 1; lsa001_1.insufr = 0; if (*lrw >= lenrw) { goto L65; } lsa001_1.insufr = 2; ls0001_1.lewt = len1c + 1; xerrwv_("lsoda-- warning.. rwork length is sufficient for now, but ", & c__60, &c__103, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, & c_b136, 60L); xerrwv_(" may not be later. integration will proceed anyway. ", & c__60, &c__103, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, & c_b136, 60L); xerrwv_(" length needed is lenrw = i1, while lrw = i2.", &c__50, & c__103, &c__0, &c__2, &lenrw, lrw, &c__0, &c_b136, &c_b136, 50L); L65: ls0001_1.lsavf = ls0001_1.lewt + ls0001_1.n; ls0001_1.lacor = ls0001_1.lsavf + ls0001_1.n; lsa001_1.insufi = 0; if (*liw >= leniw) { goto L70; } lsa001_1.insufi = 2; xerrwv_("lsoda-- warning.. iwork length is sufficient for now, but ", & c__60, &c__104, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, & c_b136, 60L); xerrwv_(" may not be later. integration will proceed anyway. ", & c__60, &c__104, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, & c_b136, 60L); xerrwv_(" length needed is leniw = i1, while liw = i2.", &c__50, & c__104, &c__0, &c__2, &leniw, liw, &c__0, &c_b136, &c_b136, 50L); L70: /* check rtol and atol for legality. ------------------------------------ */ rtoli = rtol[1]; atoli = atol[1]; i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { if (*itol >= 3) { rtoli = rtol[i]; } if (*itol == 2 || *itol == 4) { atoli = atol[i]; } if (rtoli < 0.) { goto L619; } if (atoli < 0.) { goto L620; } /* L75: */ } if (*istate == 1) { goto L100; } /* if istate = 3, set flag to signal parameter changes to stoda. -------- */ ls0001_1.jstart = -1; if (ls0001_1.n == ls0001_1.nyh) { goto L200; } /* neq was reduced. zero part of yh to avoid undefined references. ----- */ i1 = ls0001_1.lyh + ls0001_1.l * ls0001_1.nyh; i2 = ls0001_1.lyh + (ls0001_1.maxord + 1) * ls0001_1.nyh - 1; if (i1 > i2) { goto L200; } i_1 = i2; for (i = i1; i <= i_1; ++i) { /* L95: */ rwork[i] = 0.; } goto L200; /* ----------------------------------------------------------------------- */ /* block c. */ /* the next block is for the initial call only (istate = 1). */ /* it contains all remaining initializations, the initial call to f, */ /* and the calculation of the initial step size. */ /* the error weights in ewt are inverted after being loaded. */ /* ----------------------------------------------------------------------- */ L100: ls0001_1.uround = d1mach_(&c__4); ls0001_1.tn = *t; lsa001_1.tsw = *t; ls0001_1.maxord = lsa001_1.mxordn; if (*itask != 4 && *itask != 5) { goto L110; } tcrit = rwork[1]; if ((tcrit - *tout) * (*tout - *t) < 0.) { goto L625; } if (h0 != 0. && (*t + h0 - tcrit) * h0 > 0.) { h0 = tcrit - *t; } L110: ls0001_1.jstart = 0; ls0001_1.nhnil = 0; ls0001_1.nst = 0; ls0001_1.nje = 0; ls0001_1.nslast = 0; ls0001_1.hu = 0.; ls0001_1.nqu = 0; lsa001_1.mused = 0; ls0001_1.miter = 0; ls0001_1.ccmax = .3; ls0001_1.maxcor = 3; ls0001_1.msbp = 20; ls0001_1.mxncf = 10; /* initial call to f. (lf0 points to yh(*,2).) ------------------------- */ lf0 = ls0001_1.lyh + ls0001_1.nyh; (*f)(&neq[1], t, &y[1], &rwork[lf0]); ls0001_1.nfe = 1; /* load the initial value vector in yh. --------------------------------- */ i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { /* L115: */ rwork[i + ls0001_1.lyh - 1] = y[i]; } /* load and invert the ewt array. (h is temporarily set to 1.0.) ------- */ ls0001_1.nq = 1; ls0001_1.h = 1.; ewset_(&ls0001_1.n, itol, &rtol[1], &atol[1], &rwork[ls0001_1.lyh], & rwork[ls0001_1.lewt]); i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { if (rwork[i + ls0001_1.lewt - 1] <= 0.) { goto L621; } /* L120: */ rwork[i + ls0001_1.lewt - 1] = 1. / rwork[i + ls0001_1.lewt - 1]; } /* ----------------------------------------------------------------------- */ /* the coding below computes the step size, h0, to be attempted on the */ /* first step, unless the user has supplied a value for this. */ /* first check that tout - t differs significantly from zero. */ /* a scalar tolerance quantity tol is computed, as max(rtol(i)) */ /* if this is positive, or max(atol(i)/abs(y(i))) otherwise, adjusted */ /* so as to be between 100*uround and 1.0e-3. */ /* then the computed value h0 is given by.. */ /* h0**(-2) = 1./(tol * w0**2) + tol * (norm(f))**2 */ /* where w0 = max ( abs(t), abs(tout) ), */ /* f = the initial value of the vector f(t,y), and */ /* norm() = the weighted vector norm used throughout, given by */ /* the vmnorm function routine, and weighted by the */ /* tolerances initially loaded into the ewt array. */ /* the sign of h0 is inferred from the initial values of tout and t. */ /* abs(h0) is made .le. abs(tout-t) in any case. */ /* ----------------------------------------------------------------------- */ if (h0 != 0.) { goto L180; } tdist = (d_1 = *tout - *t, abs(d_1)); /* Computing MAX */ d_1 = abs(*t), d_2 = abs(*tout); w0 = max(d_1,d_2); if (tdist < ls0001_1.uround * 2. * w0) { goto L622; } tol = rtol[1]; if (*itol <= 2) { goto L140; } i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { /* L130: */ /* Computing MAX */ d_1 = tol, d_2 = rtol[i]; tol = max(d_1,d_2); } L140: if (tol > 0.) { goto L160; } atoli = atol[1]; i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { if (*itol == 2 || *itol == 4) { atoli = atol[i]; } ayi = (d_1 = y[i], abs(d_1)); if (ayi != 0.) { /* Computing MAX */ d_1 = tol, d_2 = atoli / ayi; tol = max(d_1,d_2); } /* L150: */ } L160: /* Computing MAX */ d_1 = tol, d_2 = ls0001_1.uround * 100.; tol = max(d_1,d_2); tol = min(tol,.001); sum = vmnorm_(&ls0001_1.n, &rwork[lf0], &rwork[ls0001_1.lewt]); /* Computing 2nd power */ d_1 = sum; sum = 1. / (tol * w0 * w0) + tol * (d_1 * d_1); h0 = 1. / sqrt(sum); h0 = min(h0,tdist); d_1 = *tout - *t; h0 = d_sign(&h0, &d_1); /* adjust h0 if necessary to meet hmax bound. --------------------------- */ L180: rh = abs(h0) * ls0001_1.hmxi; if (rh > 1.) { h0 /= rh; } /* load h with h0 and scale yh(*,2) by h0. ------------------------------ */ ls0001_1.h = h0; i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { /* L190: */ rwork[i + lf0 - 1] = h0 * rwork[i + lf0 - 1]; } goto L270; /* ----------------------------------------------------------------------- */ /* block d. */ /* the next code block is for continuation calls only (istate = 2 or 3) */ /* and is to check stop conditions before taking a step. */ /* ----------------------------------------------------------------------- */ L200: ls0001_1.nslast = ls0001_1.nst; switch ((int)*itask) { case 1: goto L210; case 2: goto L250; case 3: goto L220; case 4: goto L230; case 5: goto L240; } L210: if ((ls0001_1.tn - *tout) * ls0001_1.h < 0.) { goto L250; } intdy_(tout, &c__0, &rwork[ls0001_1.lyh], &ls0001_1.nyh, &y[1], &iflag); if (iflag != 0) { goto L627; } *t = *tout; goto L420; L220: tp = ls0001_1.tn - ls0001_1.hu * (ls0001_1.uround * 100. + 1.); if ((tp - *tout) * ls0001_1.h > 0.) { goto L623; } if ((ls0001_1.tn - *tout) * ls0001_1.h < 0.) { goto L250; } *t = ls0001_1.tn; goto L400; L230: tcrit = rwork[1]; if ((ls0001_1.tn - tcrit) * ls0001_1.h > 0.) { goto L624; } if ((tcrit - *tout) * ls0001_1.h < 0.) { goto L625; } if ((ls0001_1.tn - *tout) * ls0001_1.h < 0.) { goto L245; } intdy_(tout, &c__0, &rwork[ls0001_1.lyh], &ls0001_1.nyh, &y[1], &iflag); if (iflag != 0) { goto L627; } *t = *tout; goto L420; L240: tcrit = rwork[1]; if ((ls0001_1.tn - tcrit) * ls0001_1.h > 0.) { goto L624; } L245: hmx = abs(ls0001_1.tn) + abs(ls0001_1.h); ihit = (d_1 = ls0001_1.tn - tcrit, abs(d_1)) <= ls0001_1.uround * 100. * hmx; if (ihit) { *t = tcrit; } if (ihit) { goto L400; } tnext = ls0001_1.tn + ls0001_1.h * (ls0001_1.uround * 4. + 1.); if ((tnext - tcrit) * ls0001_1.h <= 0.) { goto L250; } ls0001_1.h = (tcrit - ls0001_1.tn) * (1. - ls0001_1.uround * 4.); if (*istate == 2) { ls0001_1.jstart = -2; } /* ----------------------------------------------------------------------- */ /* block e. */ /* the next block is normally executed for all calls and contains */ /* the call to the one-step core integrator stoda. */ /* this is a looping point for the integration steps. */ /* first check for too many steps being taken, update ewt (if not at */ /* start of problem), check for too much accuracy being requested, and */ /* check for h below the roundoff level in t. */ /* ----------------------------------------------------------------------- */ L250: if (ls0001_1.meth == lsa001_1.mused) { goto L255; } if (lsa001_1.insufr == 1) { goto L550; } if (lsa001_1.insufi == 1) { goto L555; } L255: if (ls0001_1.nst - ls0001_1.nslast >= ls0001_1.mxstep) { goto L500; } ewset_(&ls0001_1.n, itol, &rtol[1], &atol[1], &rwork[ls0001_1.lyh], & rwork[ls0001_1.lewt]); i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { if (rwork[i + ls0001_1.lewt - 1] <= 0.) { goto L510; } /* L260: */ rwork[i + ls0001_1.lewt - 1] = 1. / rwork[i + ls0001_1.lewt - 1]; } L270: tolsf = ls0001_1.uround * vmnorm_(&ls0001_1.n, &rwork[ls0001_1.lyh], & rwork[ls0001_1.lewt]); if (tolsf <= .01) { goto L280; } tolsf *= 200.; if (ls0001_1.nst == 0) { goto L626; } goto L520; L280: if (ls0001_1.tn + ls0001_1.h != ls0001_1.tn) { goto L290; } ++ls0001_1.nhnil; if (ls0001_1.nhnil > ls0001_1.mxhnil) { goto L290; } xerrwv_("lsoda-- warning..internal t (=r1) and h (=r2) are", &c__50, & c__101, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" such that in the machine, t + h = t on the next step ", & c__60, &c__101, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, & c_b136, 60L); xerrwv_(" (h = step size). solver will continue anyway", &c__50, & c__101, &c__0, &c__0, &c__0, &c__0, &c__2, &ls0001_1.tn, & ls0001_1.h, 50L); if (ls0001_1.nhnil < ls0001_1.mxhnil) { goto L290; } xerrwv_("lsoda-- above warning has been issued i1 times. ", &c__50, & c__102, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" it will not be issued again for this problem", &c__50, & c__102, &c__0, &c__1, &ls0001_1.mxhnil, &c__0, &c__0, &c_b136, & c_b136, 50L); L290: /* ----------------------------------------------------------------------- */ /* call stoda(neq,y,yh,nyh,yh,ewt,savf,acor,wm,iwm,f,jac,prja,solsy) */ /* ----------------------------------------------------------------------- */ stoda_(&neq[1], &y[1], &rwork[ls0001_1.lyh], &ls0001_1.nyh, &rwork[ ls0001_1.lyh], &rwork[ls0001_1.lewt], &rwork[ls0001_1.lsavf], & rwork[ls0001_1.lacor], &rwork[ls0001_1.lwm], &iwork[ls0001_1.liwm] , f, jac, prja_, solsy_); kgo = 1 - ls0001_1.kflag; switch ((int)kgo) { case 1: goto L300; case 2: goto L530; case 3: goto L540; } /* ----------------------------------------------------------------------- */ /* block f. */ /* the following block handles the case of a successful return from the */ /* core integrator (kflag = 0). */ /* if a method switch was just made, record tsw, reset maxord, */ /* set jstart to -1 to signal stoda to complete the switch, */ /* and do extra printing of data if ixpr = 1. */ /* then, in any case, check for stop conditions. */ /* ----------------------------------------------------------------------- */ L300: ls0001_1.init = 1; if (ls0001_1.meth == lsa001_1.mused) { goto L310; } lsa001_1.tsw = ls0001_1.tn; ls0001_1.maxord = lsa001_1.mxordn; if (ls0001_1.meth == 2) { ls0001_1.maxord = lsa001_1.mxords; } if (ls0001_1.meth == 2) { rwork[ls0001_1.lwm] = sqrt(ls0001_1.uround); } lsa001_1.insufr = min(lsa001_1.insufr,1); lsa001_1.insufi = min(lsa001_1.insufi,1); ls0001_1.jstart = -1; if (lsa001_1.ixpr == 0) { goto L310; } if (ls0001_1.meth == 2) { xerrwv_("lsoda-- a switch to the bdf (stiff) method has occurred " , &c__60, &c__105, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 60L); } if (ls0001_1.meth == 1) { xerrwv_("lsoda-- a switch to the adams (nonstiff) method has occurred" , &c__60, &c__106, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 60L); } xerrwv_(" at t = r1, tentative step size h = r2, step nst = i1 ", & c__60, &c__107, &c__0, &c__1, &ls0001_1.nst, &c__0, &c__2, & ls0001_1.tn, &ls0001_1.h, 60L); L310: switch ((int)*itask) { case 1: goto L320; case 2: goto L400; case 3: goto L330; case 4: goto L340; case 5: goto L350; } /* itask = 1. if tout has been reached, interpolate. ------------------- */ L320: if ((ls0001_1.tn - *tout) * ls0001_1.h < 0.) { goto L250; } intdy_(tout, &c__0, &rwork[ls0001_1.lyh], &ls0001_1.nyh, &y[1], &iflag); *t = *tout; goto L420; /* itask = 3. jump to exit if tout was reached. ------------------------ */ L330: if ((ls0001_1.tn - *tout) * ls0001_1.h >= 0.) { goto L400; } goto L250; /* itask = 4. see if tout or tcrit was reached. adjust h if necessary. */ L340: if ((ls0001_1.tn - *tout) * ls0001_1.h < 0.) { goto L345; } intdy_(tout, &c__0, &rwork[ls0001_1.lyh], &ls0001_1.nyh, &y[1], &iflag); *t = *tout; goto L420; L345: hmx = abs(ls0001_1.tn) + abs(ls0001_1.h); ihit = (d_1 = ls0001_1.tn - tcrit, abs(d_1)) <= ls0001_1.uround * 100. * hmx; if (ihit) { goto L400; } tnext = ls0001_1.tn + ls0001_1.h * (ls0001_1.uround * 4. + 1.); if ((tnext - tcrit) * ls0001_1.h <= 0.) { goto L250; } ls0001_1.h = (tcrit - ls0001_1.tn) * (1. - ls0001_1.uround * 4.); ls0001_1.jstart = -2; goto L250; /* itask = 5. see if tcrit was reached and jump to exit. --------------- */ L350: hmx = abs(ls0001_1.tn) + abs(ls0001_1.h); ihit = (d_1 = ls0001_1.tn - tcrit, abs(d_1)) <= ls0001_1.uround * 100. * hmx; /* ----------------------------------------------------------------------- */ /* block g. */ /* the following block handles all successful returns from lsoda. */ /* if itask .ne. 1, y is loaded from yh and t is set accordingly. */ /* istate is set to 2, the illegal input counter is zeroed, and the */ /* optional outputs are loaded into the work arrays before returning. */ /* if istate = 1 and tout = t, there is a return with no action taken, */ /* except that if this has happened repeatedly, the run is terminated. */ /* ----------------------------------------------------------------------- */ L400: i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { /* L410: */ y[i] = rwork[i + ls0001_1.lyh - 1]; } *t = ls0001_1.tn; if (*itask != 4 && *itask != 5) { goto L420; } if (ihit) { *t = tcrit; } L420: *istate = 2; ls0001_1.illin = 0; rwork[11] = ls0001_1.hu; rwork[12] = ls0001_1.h; rwork[13] = ls0001_1.tn; rwork[15] = lsa001_1.tsw; iwork[11] = ls0001_1.nst; iwork[12] = ls0001_1.nfe; iwork[13] = ls0001_1.nje; iwork[14] = ls0001_1.nqu; iwork[15] = ls0001_1.nq; iwork[19] = lsa001_1.mused; iwork[20] = ls0001_1.meth; return 0; L430: ++ls0001_1.ntrep; if (ls0001_1.ntrep < 5) { return 0; } xerrwv_("lsoda-- repeated calls with istate = 1 and tout = t (=r1) ", & c__60, &c__301, &c__0, &c__0, &c__0, &c__0, &c__1, t, &c_b136, 60L); goto L800; /* ----------------------------------------------------------------------- */ /* block h. */ /* the following block handles all unsuccessful returns other than */ /* those for illegal input. first the error message routine is called. */ /* if there was an error test or convergence test failure, imxer is set. */ /* then y is loaded from yh, t is set to tn, and the illegal input */ /* counter illin is set to 0. the optional outputs are loaded into */ /* the work arrays before returning. */ /* ----------------------------------------------------------------------- */ /* the maximum number of steps was taken before reaching tout. ---------- */ L500: xerrwv_("lsoda-- at current t (=r1), mxstep (=i1) steps ", &c__50, & c__201, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" taken on this call before reaching tout ", &c__50, & c__201, &c__0, &c__1, &ls0001_1.mxstep, &c__0, &c__1, & ls0001_1.tn, &c_b136, 50L); *istate = -1; goto L580; /* ewt(i) .le. 0.0 for some i (not at start of problem). ---------------- */ L510: ewti = rwork[ls0001_1.lewt + i - 1]; xerrwv_("lsoda-- at t (=r1), ewt(i1) has become r2 .le. 0.", &c__50, & c__202, &c__0, &c__1, &i, &c__0, &c__2, &ls0001_1.tn, &ewti, 50L); *istate = -6; goto L580; /* too much accuracy requested for machine precision. ------------------- */ L520: xerrwv_("lsoda-- at t (=r1), too much accuracy requested ", &c__50, & c__203, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" for precision of machine.. see tolsf (=r2) ", &c__50, & c__203, &c__0, &c__0, &c__0, &c__0, &c__2, &ls0001_1.tn, &tolsf, 50L); rwork[14] = tolsf; *istate = -2; goto L580; /* kflag = -1. error test failed repeatedly or with abs(h) = hmin. ----- */ L530: xerrwv_("lsoda-- at t(=r1) and step size h(=r2), the error", &c__50, & c__204, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" test failed repeatedly or with abs(h) = hmin", &c__50, & c__204, &c__0, &c__0, &c__0, &c__0, &c__2, &ls0001_1.tn, & ls0001_1.h, 50L); *istate = -4; goto L560; /* kflag = -2. convergence failed repeatedly or with abs(h) = hmin. ---- */ L540: xerrwv_("lsoda-- at t (=r1) and step size h (=r2), the ", &c__50, & c__205, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" corrector convergence failed repeatedly ", &c__50, & c__205, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" or with abs(h) = hmin ", &c__30, &c__205, &c__0, &c__0, & c__0, &c__0, &c__2, &ls0001_1.tn, &ls0001_1.h, 30L); *istate = -5; goto L560; /* rwork length too small to proceed. ----------------------------------- */ L550: xerrwv_("lsoda-- at current t(=r1), rwork length too small", &c__50, & c__206, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" to proceed. the integration was otherwise successful.", & c__60, &c__206, &c__0, &c__0, &c__0, &c__0, &c__1, &ls0001_1.tn, & c_b136, 60L); *istate = -7; goto L580; /* iwork length too small to proceed. ----------------------------------- */ L555: xerrwv_("lsoda-- at current t(=r1), iwork length too small", &c__50, & c__207, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" to proceed. the integration was otherwise successful.", & c__60, &c__207, &c__0, &c__0, &c__0, &c__0, &c__1, &ls0001_1.tn, & c_b136, 60L); *istate = -7; goto L580; /* compute imxer if relevant. ------------------------------------------- */ L560: big = 0.; imxer = 1; i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { size = (d_1 = rwork[i + ls0001_1.lacor - 1] * rwork[i + ls0001_1.lewt - 1], abs(d_1)); if (big >= size) { goto L570; } big = size; imxer = i; L570: ; } iwork[16] = imxer; /* set y vector, t, illin, and optional outputs. ------------------------ */ L580: i_1 = ls0001_1.n; for (i = 1; i <= i_1; ++i) { /* L590: */ y[i] = rwork[i + ls0001_1.lyh - 1]; } *t = ls0001_1.tn; ls0001_1.illin = 0; rwork[11] = ls0001_1.hu; rwork[12] = ls0001_1.h; rwork[13] = ls0001_1.tn; rwork[15] = lsa001_1.tsw; iwork[11] = ls0001_1.nst; iwork[12] = ls0001_1.nfe; iwork[13] = ls0001_1.nje; iwork[14] = ls0001_1.nqu; iwork[15] = ls0001_1.nq; iwork[19] = lsa001_1.mused; iwork[20] = ls0001_1.meth; return 0; /* ----------------------------------------------------------------------- */ /* block i. */ /* the following block handles all error returns due to illegal input */ /* (istate = -3), as detected before calling the core integrator. */ /* first the error message routine is called. then if there have been */ /* 5 consecutive such returns just before this call to the solver, */ /* the run is halted. */ /* ----------------------------------------------------------------------- */ L601: xerrwv_("lsoda-- istate (=i1) illegal ", &c__30, &c__1, &c__0, &c__1, istate, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L602: xerrwv_("lsoda-- itask (=i1) illegal ", &c__30, &c__2, &c__0, &c__1, itask, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L603: xerrwv_("lsoda-- istate .gt. 1 but lsoda not initialized ", &c__50, & c__3, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); goto L700; L604: xerrwv_("lsoda-- neq (=i1) .lt. 1 ", &c__30, &c__4, &c__0, &c__1, & neq[1], &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L605: xerrwv_("lsoda-- istate = 3 and neq increased (i1 to i2) ", &c__50, & c__5, &c__0, &c__2, &ls0001_1.n, &neq[1], &c__0, &c_b136, &c_b136, 50L); goto L700; L606: xerrwv_("lsoda-- itol (=i1) illegal ", &c__30, &c__6, &c__0, &c__1, itol, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L607: xerrwv_("lsoda-- iopt (=i1) illegal ", &c__30, &c__7, &c__0, &c__1, iopt, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L608: xerrwv_("lsoda-- jt (=i1) illegal ", &c__30, &c__8, &c__0, &c__1, jt, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L609: xerrwv_("lsoda-- ml (=i1) illegal.. .lt.0 or .ge.neq (=i2)", &c__50, & c__9, &c__0, &c__2, &ml, &neq[1], &c__0, &c_b136, &c_b136, 50L); goto L700; L610: xerrwv_("lsoda-- mu (=i1) illegal.. .lt.0 or .ge.neq (=i2)", &c__50, & c__10, &c__0, &c__2, &mu, &neq[1], &c__0, &c_b136, &c_b136, 50L); goto L700; L611: xerrwv_("lsoda-- ixpr (=i1) illegal ", &c__30, &c__11, &c__0, &c__1, & lsa001_1.ixpr, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L612: xerrwv_("lsoda-- mxstep (=i1) .lt. 0 ", &c__30, &c__12, &c__0, &c__1, & ls0001_1.mxstep, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L613: xerrwv_("lsoda-- mxhnil (=i1) .lt. 0 ", &c__30, &c__13, &c__0, &c__1, & ls0001_1.mxhnil, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L614: xerrwv_("lsoda-- tout (=r1) behind t (=r2) ", &c__40, &c__14, &c__0, &c__0, &c__0, &c__0, &c__2, tout, t, 40L); xerrwv_(" integration direction is given by h0 (=r1) ", &c__50, & c__14, &c__0, &c__0, &c__0, &c__0, &c__1, &h0, &c_b136, 50L); goto L700; L615: xerrwv_("lsoda-- hmax (=r1) .lt. 0.0 ", &c__30, &c__15, &c__0, &c__0, & c__0, &c__0, &c__1, &hmax, &c_b136, 30L); goto L700; L616: xerrwv_("lsoda-- hmin (=r1) .lt. 0.0 ", &c__30, &c__16, &c__0, &c__0, & c__0, &c__0, &c__1, &ls0001_1.hmin, &c_b136, 30L); goto L700; L617: xerrwv_("lsoda-- rwork length needed, lenrw (=i1), exceeds lrw (=i2)", & c__60, &c__17, &c__0, &c__2, &lenrw, lrw, &c__0, &c_b136, &c_b136, 60L); goto L700; L618: xerrwv_("lsoda-- iwork length needed, leniw (=i1), exceeds liw (=i2)", & c__60, &c__18, &c__0, &c__2, &leniw, liw, &c__0, &c_b136, &c_b136, 60L); goto L700; L619: xerrwv_("lsoda-- rtol(i1) is r1 .lt. 0.0 ", &c__40, &c__19, &c__0, &c__1, &i, &c__0, &c__1, &rtoli, &c_b136, 40L); goto L700; L620: xerrwv_("lsoda-- atol(i1) is r1 .lt. 0.0 ", &c__40, &c__20, &c__0, &c__1, &i, &c__0, &c__1, &atoli, &c_b136, 40L); goto L700; L621: ewti = rwork[ls0001_1.lewt + i - 1]; xerrwv_("lsoda-- ewt(i1) is r1 .le. 0.0 ", &c__40, &c__21, &c__0, &c__1, &i, &c__0, &c__1, &ewti, &c_b136, 40L); goto L700; L622: xerrwv_("lsoda-- tout (=r1) too close to t(=r2) to start integration", & c__60, &c__22, &c__0, &c__0, &c__0, &c__0, &c__2, tout, t, 60L); goto L700; L623: xerrwv_("lsoda-- itask = i1 and tout (=r1) behind tcur - hu (= r2) ", & c__60, &c__23, &c__0, &c__1, itask, &c__0, &c__2, tout, &tp, 60L); goto L700; L624: xerrwv_("lsoda-- itask = 4 or 5 and tcrit (=r1) behind tcur (=r2) ", & c__60, &c__24, &c__0, &c__0, &c__0, &c__0, &c__2, &tcrit, & ls0001_1.tn, 60L); goto L700; L625: xerrwv_("lsoda-- itask = 4 or 5 and tcrit (=r1) behind tout (=r2) ", & c__60, &c__25, &c__0, &c__0, &c__0, &c__0, &c__2, &tcrit, tout, 60L); goto L700; L626: xerrwv_("lsoda-- at start of problem, too much accuracy ", &c__50, & c__26, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); xerrwv_(" requested for precision of machine.. see tolsf (=r1) ", & c__60, &c__26, &c__0, &c__0, &c__0, &c__0, &c__1, &tolsf, &c_b136, 60L); rwork[14] = tolsf; goto L700; L627: xerrwv_("lsoda-- trouble from intdy. itask = i1, tout = r1", &c__50, & c__27, &c__0, &c__1, itask, &c__0, &c__1, tout, &c_b136, 50L); goto L700; L628: xerrwv_("lsoda-- mxordn (=i1) .lt. 0 ", &c__30, &c__28, &c__0, &c__1, & lsa001_1.mxordn, &c__0, &c__0, &c_b136, &c_b136, 30L); goto L700; L629: xerrwv_("lsoda-- mxords (=i1) .lt. 0 ", &c__30, &c__29, &c__0, &c__1, & lsa001_1.mxords, &c__0, &c__0, &c_b136, &c_b136, 30L); L700: if (ls0001_1.illin == 5) { goto L710; } ++ls0001_1.illin; *istate = -3; return 0; L710: xerrwv_("lsoda-- repeated occurrences of illegal input ", &c__50, & c__302, &c__0, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); L800: xerrwv_("lsoda-- run aborted.. apparent infinite loop ", &c__50, & c__303, &c__2, &c__0, &c__0, &c__0, &c__0, &c_b136, &c_b136, 50L); return 0; /* ----------------------- end of subroutine lsoda ----------------------- */ } /* lsoda_ */ /* Subroutine */ int prja_(neq, y, yh, nyh, ewt, ftem, savf, wm, iwm, f, jac) integer *neq; doublereal *y, *yh; integer *nyh; doublereal *ewt, *ftem, *savf, *wm; integer *iwm; /* Subroutine */ int (*f) (), (*jac) (); { /* System generated locals */ integer yh_dim1, yh_offset, i_1, i_2, i_3, i_4; doublereal d_1, d_2; /* Local variables */ static integer lenp; static doublereal srur; extern /* Subroutine */ int dgbfa_(), dgefa_(); static integer i, j, mband; static doublereal r; extern doublereal bnorm_(), fnorm_(); static integer i1, i2, j1; static doublereal r0; static integer ii, jj, meband, ml, mu; static doublereal yi, yj, hl0; static integer ml3, np1; extern doublereal vmnorm_(); static doublereal fac; static integer mba, ier; static doublereal con, yjj; static integer meb1; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* prja is called by stoda to compute and process the matrix */ /* p = i - h*el(1)*j , where j is an approximation to the jacobian. */ /* here j is computed by the user-supplied routine jac if */ /* miter = 1 or 4 or by finite differencing if miter = 2 or 5. */ /* j, scaled by -h*el(1), is stored in wm. then the norm of j (the */ /* matrix norm consistent with the weighted max-norm on vectors given */ /* by vmnorm) is computed, and j is overwritten by p. p is then */ /* subjected to lu decomposition in preparation for later solution */ /* of linear systems with p as coefficient matrix. this is done */ /* by dgefa if miter = 1 or 2, and by dgbfa if miter = 4 or 5. */ /* in addition to variables described previously, communication */ /* with prja uses the following.. */ /* y = array containing predicted values on entry. */ /* ftem = work array of length n (acor in stoda). */ /* savf = array containing f evaluated at predicted y. */ /* wm = real work space for matrices. on output it contains the */ /* lu decomposition of p. */ /* storage of matrix elements starts at wm(3). */ /* wm also contains the following matrix-related data.. */ /* wm(1) = sqrt(uround), used in numerical jacobian increments. */ /* iwm = integer work space containing pivot information, starting at */ /* iwm(21). iwm also contains the band parameters */ /* ml = iwm(1) and mu = iwm(2) if miter is 4 or 5. */ /* el0 = el(1) (input). */ /* pdnorm= norm of jacobian matrix. (output). */ /* ierpj = output error flag, = 0 if no trouble, .gt. 0 if */ /* p matrix found to be singular. */ /* jcur = output flag = 1 to indicate that the jacobian matrix */ /* (or approximation) is now current. */ /* this routine also uses the common variables el0, h, tn, uround, */ /* miter, n, nfe, and nje. */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --iwm; --wm; --savf; --ftem; --ewt; yh_dim1 = *nyh; yh_offset = yh_dim1 + 1; yh -= yh_offset; --y; --neq; /* Function Body */ ++ls0001_2.nje; ls0001_2.ierpj = 0; ls0001_2.jcur = 1; hl0 = ls0001_2.h * ls0001_2.el0; switch ((int)ls0001_2.miter) { case 1: goto L100; case 2: goto L200; case 3: goto L300; case 4: goto L400; case 5: goto L500; } /* if miter = 1, call jac and multiply by scalar. ----------------------- */ L100: lenp = ls0001_2.n * ls0001_2.n; i_1 = lenp; for (i = 1; i <= i_1; ++i) { /* L110: */ wm[i + 2] = 0.; } (*jac)(&neq[1], &ls0001_2.tn, &y[1], &c__0, &c__0, &wm[3], &ls0001_2.n); con = -hl0; i_1 = lenp; for (i = 1; i <= i_1; ++i) { /* L120: */ wm[i + 2] *= con; } goto L240; /* if miter = 2, make n calls to f to approximate j. -------------------- */ L200: fac = vmnorm_(&ls0001_2.n, &savf[1], &ewt[1]); r0 = abs(ls0001_2.h) * 1e3 * ls0001_2.uround * (doublereal) ls0001_2.n * fac; if (r0 == 0.) { r0 = 1.; } srur = wm[1]; j1 = 2; i_1 = ls0001_2.n; for (j = 1; j <= i_1; ++j) { yj = y[j]; /* Computing MAX */ d_1 = srur * abs(yj), d_2 = r0 / ewt[j]; r = max(d_1,d_2); y[j] += r; fac = -hl0 / r; (*f)(&neq[1], &ls0001_2.tn, &y[1], &ftem[1]); i_2 = ls0001_2.n; for (i = 1; i <= i_2; ++i) { /* L220: */ wm[i + j1] = (ftem[i] - savf[i]) * fac; } y[j] = yj; j1 += ls0001_2.n; /* L230: */ } ls0001_2.nfe += ls0001_2.n; L240: /* compute norm of jacobian. -------------------------------------------- */ lsa001_2.pdnorm = fnorm_(&ls0001_2.n, &wm[3], &ewt[1]) / abs(hl0); /* add identity matrix. ------------------------------------------------- */ np1 = ls0001_2.n + 1; j = 3; i_1 = ls0001_2.n; for (i = 1; i <= i_1; ++i) { wm[j] += 1.; /* L250: */ j += np1; } /* do lu decomposition on p. -------------------------------------------- */ dgefa_(&wm[3], &ls0001_2.n, &ls0001_2.n, &iwm[21], &ier); if (ier != 0) { ls0001_2.ierpj = 1; } return 0; /* dummy block only, since miter is never 3 in this routine. ------------ */ L300: return 0; /* if miter = 4, call jac and multiply by scalar. ----------------------- */ L400: ml = iwm[1]; mu = iwm[2]; ml3 = ml + 3; mband = ml + mu + 1; meband = mband + ml; lenp = meband * ls0001_2.n; i_1 = lenp; for (i = 1; i <= i_1; ++i) { /* L410: */ wm[i + 2] = 0.; } (*jac)(&neq[1], &ls0001_2.tn, &y[1], &ml, &mu, &wm[ml3], &meband); con = -hl0; i_1 = lenp; for (i = 1; i <= i_1; ++i) { /* L420: */ wm[i + 2] *= con; } goto L570; /* if miter = 5, make mband calls to f to approximate j. ---------------- */ L500: ml = iwm[1]; mu = iwm[2]; mband = ml + mu + 1; mba = min(mband,ls0001_2.n); meband = mband + ml; meb1 = meband - 1; srur = wm[1]; fac = vmnorm_(&ls0001_2.n, &savf[1], &ewt[1]); r0 = abs(ls0001_2.h) * 1e3 * ls0001_2.uround * (doublereal) ls0001_2.n * fac; if (r0 == 0.) { r0 = 1.; } i_1 = mba; for (j = 1; j <= i_1; ++j) { i_2 = ls0001_2.n; i_3 = mband; for (i = j; i_3 < 0 ? i >= i_2 : i <= i_2; i += i_3) { yi = y[i]; /* Computing MAX */ d_1 = srur * abs(yi), d_2 = r0 / ewt[i]; r = max(d_1,d_2); /* L530: */ y[i] += r; } (*f)(&neq[1], &ls0001_2.tn, &y[1], &ftem[1]); i_3 = ls0001_2.n; i_2 = mband; for (jj = j; i_2 < 0 ? jj >= i_3 : jj <= i_3; jj += i_2) { y[jj] = yh[jj + yh_dim1]; yjj = y[jj]; /* Computing MAX */ d_1 = srur * abs(yjj), d_2 = r0 / ewt[jj]; r = max(d_1,d_2); fac = -hl0 / r; /* Computing MAX */ i_4 = jj - mu; i1 = max(i_4,1); /* Computing MIN */ i_4 = jj + ml; i2 = min(i_4,ls0001_2.n); ii = jj * meb1 - ml + 2; i_4 = i2; for (i = i1; i <= i_4; ++i) { /* L540: */ wm[ii + i] = (ftem[i] - savf[i]) * fac; } /* L550: */ } /* L560: */ } ls0001_2.nfe += mba; L570: /* compute norm of jacobian. -------------------------------------------- */ lsa001_2.pdnorm = bnorm_(&ls0001_2.n, &wm[3], &meband, &ml, &mu, &ewt[1]) / abs(hl0); /* add identity matrix. ------------------------------------------------- */ ii = mband + 2; i_1 = ls0001_2.n; for (i = 1; i <= i_1; ++i) { wm[ii] += 1.; /* L580: */ ii += meband; } /* do lu decomposition of p. -------------------------------------------- */ dgbfa_(&wm[3], &meband, &ls0001_2.n, &ml, &mu, &iwm[21], &ier); if (ier != 0) { ls0001_2.ierpj = 1; } return 0; /* ----------------------- end of subroutine prja ------------------------ */ } /* prja_ */ /* Subroutine */ int solsy_(wm, iwm, x, tem) doublereal *wm; integer *iwm; doublereal *x, *tem; { /* System generated locals */ integer i_1; /* Local variables */ static integer i; static doublereal r; extern /* Subroutine */ int dgbsl_(), dgesl_(); static doublereal di; static integer meband, ml, mu; static doublereal hl0, phl0; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* this routine manages the solution of the linear system arising from */ /* a chord iteration. it is called if miter .ne. 0. */ /* if miter is 1 or 2, it calls dgesl to accomplish this. */ /* if miter = 3 it updates the coefficient h*el0 in the diagonal */ /* matrix, and then computes the solution. */ /* if miter is 4 or 5, it calls dgbsl. */ /* communication with solsy uses the following variables.. */ /* wm = real work space containing the inverse diagonal matrix if */ /* miter = 3 and the lu decomposition of the matrix otherwise. */ /* storage of matrix elements starts at wm(3). */ /* wm also contains the following matrix-related data.. */ /* wm(1) = sqrt(uround) (not used here), */ /* wm(2) = hl0, the previous value of h*el0, used if miter = 3. */ /* iwm = integer work space containing pivot information, starting at */ /* iwm(21), if miter is 1, 2, 4, or 5. iwm also contains band */ /* parameters ml = iwm(1) and mu = iwm(2) if miter is 4 or 5. */ /* x = the right-hand side vector on input, and the solution vector */ /* on output, of length n. */ /* tem = vector of work space of length n, not used in this version. */ /* iersl = output flag (in common). iersl = 0 if no trouble occurred. */ /* iersl = 1 if a singular matrix arose with miter = 3. */ /* this routine also uses the common variables el0, h, miter, and n. */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --tem; --x; --iwm; --wm; /* Function Body */ ls0001_2.iersl = 0; switch ((int)ls0001_2.miter) { case 1: goto L100; case 2: goto L100; case 3: goto L300; case 4: goto L400; case 5: goto L400; } L100: dgesl_(&wm[3], &ls0001_2.n, &ls0001_2.n, &iwm[21], &x[1], &c__0); return 0; L300: phl0 = wm[2]; hl0 = ls0001_2.h * ls0001_2.el0; wm[2] = hl0; if (hl0 == phl0) { goto L330; } r = hl0 / phl0; i_1 = ls0001_2.n; for (i = 1; i <= i_1; ++i) { di = 1. - r * (1. - 1. / wm[i + 2]); if (abs(di) == 0.) { goto L390; } /* L320: */ wm[i + 2] = 1. / di; } L330: i_1 = ls0001_2.n; for (i = 1; i <= i_1; ++i) { /* L340: */ x[i] = wm[i + 2] * x[i]; } return 0; L390: ls0001_2.iersl = 1; return 0; L400: ml = iwm[1]; mu = iwm[2]; meband = (ml << 1) + mu + 1; dgbsl_(&wm[3], &meband, &ls0001_2.n, &ml, &mu, &iwm[21], &x[1], &c__0); return 0; /* ----------------------- end of subroutine solsy ----------------------- */ } /* solsy_ */ /* Subroutine */ int stoda_(neq, y, yh, nyh, yh1, ewt, savf, acor, wm, iwm, f, jac, pjac, slvs) integer *neq; doublereal *y, *yh; integer *nyh; doublereal *yh1, *ewt, *savf, *acor, *wm; integer *iwm; /* Subroutine */ int (*f) (), (*jac) (), (*pjac) (), (*slvs) (); { /* Initialized data */ static doublereal sm1[12] = { .5,.575,.55,.45,.35,.25,.2,.15,.1,.075,.05, .025 }; /* System generated locals */ integer yh_dim1, yh_offset, i_1, i_2; doublereal d_1, d_2, d_3; /* Builtin functions */ double pow_dd(); /* Local variables */ static doublereal dcon, delp; static integer lm1p1, lm2p1; static doublereal exdn, rhdn; static integer iret; static doublereal told, rate, rhsm; static integer newq; static doublereal exsm, rhup, exup, rh1it; static integer i, j, m; extern /* Subroutine */ int cfode_(); static doublereal r, alpha; static integer iredo, i1; static doublereal pnorm; static integer jb; static doublereal rh, rm, dm1, dm2; static integer lm1, lm2; extern doublereal vmnorm_(); static doublereal rh1, rh2, del, ddn; static integer ncf; static doublereal pdh, dsm, dup, exm1, exm2; static integer nqm1, nqm2; /* lll. optimize */ /* Parameter adjustments */ --iwm; --wm; --acor; --savf; --ewt; --yh1; yh_dim1 = *nyh; yh_offset = yh_dim1 + 1; yh -= yh_offset; --y; --neq; /* Function Body */ /* ----------------------------------------------------------------------- */ /* meth = 1 means adams method (nonstiff) */ /* meth = 2 means bdf method (stiff) */ /* meth may be reset by stoda. */ /* miter = corrector iteration method. */ /* miter = 0 means functional iteration. */ /* miter = jt .gt. 0 means a chord iteration corresponding */ /* to jacobian type jt. (the lsoda argument jt is */ /* communicated here as jtyp, but is not used in stoda */ /* except to load miter following a method switch.) */ /* miter may be reset by stoda. */ /* n = the number of first-order differential equations. */ /* ----------------------------------------------------------------------- */ ls0001_3.kflag = 0; told = ls0001_3.tn; ncf = 0; ls0001_3.ierpj = 0; ls0001_3.iersl = 0; ls0001_3.jcur = 0; ls0001_3.icf = 0; delp = 0.; if (ls0001_3.jstart > 0) { goto L200; } if (ls0001_3.jstart == -1) { goto L100; } if (ls0001_3.jstart == -2) { goto L160; } /* ----------------------------------------------------------------------- */ /* on the first call, the order is set to 1, and other variables are */ /* initialized. rmax is the maximum ratio by which h can be increased */ /* in a single step. it is initially 1.e4 to compensate for the small */ /* initial h, but then is normally equal to 10. if a failure */ /* occurs (in corrector convergence or error test), rmax is set at 2 */ /* for the next increase. */ /* cfode is called to get the needed coefficients for both methods. */ /* ----------------------------------------------------------------------- */ ls0001_3.lmax = ls0001_3.maxord + 1; ls0001_3.nq = 1; ls0001_3.l = 2; ls0001_3.ialth = 2; ls0001_3.rmax = 1e4; ls0001_3.rc = 0.; ls0001_3.el0 = 1.; ls0001_3.crate = .7; ls0001_3.hold = ls0001_3.h; ls0001_3.nslp = 0; ls0001_3.ipup = ls0001_3.miter; iret = 3; /* initialize switching parameters. meth = 1 is assumed initially. ----- */ lsa001_3.icount = 20; lsa001_3.irflag = 0; lsa001_3.pdest = 0.; lsa001_3.pdlast = 0.; lsa001_3.ratio = 5.; cfode_(&c__2, ls0001_3.elco, ls0001_3.tesco); for (i = 1; i <= 5; ++i) { /* L10: */ lsa001_3.cm2[i - 1] = ls0001_3.tesco[i * 3 - 2] * ls0001_3.elco[i + 1 + i * 13 - 14]; } cfode_(&c__1, ls0001_3.elco, ls0001_3.tesco); for (i = 1; i <= 12; ++i) { /* L20: */ lsa001_3.cm1[i - 1] = ls0001_3.tesco[i * 3 - 2] * ls0001_3.elco[i + 1 + i * 13 - 14]; } goto L150; /* ----------------------------------------------------------------------- */ /* the following block handles preliminaries needed when jstart = -1. */ /* ipup is set to miter to force a matrix update. */ /* if an order increase is about to be considered (ialth = 1), */ /* ialth is reset to 2 to postpone consideration one more step. */ /* if the caller has changed meth, cfode is called to reset */ /* the coefficients of the method. */ /* if h is to be changed, yh must be rescaled. */ /* if h or meth is being changed, ialth is reset to l = nq + 1 */ /* to prevent further changes in h for that many steps. */ /* ----------------------------------------------------------------------- */ L100: ls0001_3.ipup = ls0001_3.miter; ls0001_3.lmax = ls0001_3.maxord + 1; if (ls0001_3.ialth == 1) { ls0001_3.ialth = 2; } if (ls0001_3.meth == lsa001_3.mused) { goto L160; } cfode_(&ls0001_3.meth, ls0001_3.elco, ls0001_3.tesco); ls0001_3.ialth = ls0001_3.l; iret = 1; /* ----------------------------------------------------------------------- */ /* the el vector and related constants are reset */ /* whenever the order nq is changed, or at the start of the problem. */ /* ----------------------------------------------------------------------- */ L150: i_1 = ls0001_3.l; for (i = 1; i <= i_1; ++i) { /* L155: */ ls0001_3.el[i - 1] = ls0001_3.elco[i + ls0001_3.nq * 13 - 14]; } ls0001_3.nqnyh = ls0001_3.nq * *nyh; ls0001_3.rc = ls0001_3.rc * ls0001_3.el[0] / ls0001_3.el0; ls0001_3.el0 = ls0001_3.el[0]; ls0001_3.conit = .5 / (doublereal) (ls0001_3.nq + 2); switch ((int)iret) { case 1: goto L160; case 2: goto L170; case 3: goto L200; } /* ----------------------------------------------------------------------- */ /* if h is being changed, the h ratio rh is checked against */ /* rmax, hmin, and hmxi, and the yh array rescaled. ialth is set to */ /* l = nq + 1 to prevent a change of h for that many steps, unless */ /* forced by a convergence or error test failure. */ /* ----------------------------------------------------------------------- */ L160: if (ls0001_3.h == ls0001_3.hold) { goto L200; } rh = ls0001_3.h / ls0001_3.hold; ls0001_3.h = ls0001_3.hold; iredo = 3; goto L175; L170: /* Computing MAX */ d_1 = rh, d_2 = ls0001_3.hmin / abs(ls0001_3.h); rh = max(d_1,d_2); L175: rh = min(rh,ls0001_3.rmax); /* Computing MAX */ d_1 = 1., d_2 = abs(ls0001_3.h) * ls0001_3.hmxi * rh; rh /= max(d_1,d_2); /* ----------------------------------------------------------------------- */ /* if meth = 1, also restrict the new step size by the stability region. */ /* if this reduces h, set irflag to 1 so that if there are roundoff */ /* problems later, we can assume that is the cause of the trouble. */ /* ----------------------------------------------------------------------- */ if (ls0001_3.meth == 2) { goto L178; } lsa001_3.irflag = 0; /* Computing MAX */ d_1 = abs(ls0001_3.h) * lsa001_3.pdlast; pdh = max(d_1,1e-6); if (rh * pdh * 1.00001 < sm1[ls0001_3.nq - 1]) { goto L178; } rh = sm1[ls0001_3.nq - 1] / pdh; lsa001_3.irflag = 1; L178: r = 1.; i_1 = ls0001_3.l; for (j = 2; j <= i_1; ++j) { r *= rh; i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { /* L180: */ yh[i + j * yh_dim1] *= r; } } ls0001_3.h *= rh; ls0001_3.rc *= rh; ls0001_3.ialth = ls0001_3.l; if (iredo == 0) { goto L690; } /* ----------------------------------------------------------------------- */ /* this section computes the predicted values by effectively */ /* multiplying the yh array by the pascal triangle matrix. */ /* rc is the ratio of new to old values of the coefficient h*el(1). */ /* when rc differs from 1 by more than ccmax, ipup is set to miter */ /* to force pjac to be called, if a jacobian is involved. */ /* in any case, pjac is called at least every msbp steps. */ /* ----------------------------------------------------------------------- */ L200: if ((d_1 = ls0001_3.rc - 1., abs(d_1)) > ls0001_3.ccmax) { ls0001_3.ipup = ls0001_3.miter; } if (ls0001_3.nst >= ls0001_3.nslp + ls0001_3.msbp) { ls0001_3.ipup = ls0001_3.miter; } ls0001_3.tn += ls0001_3.h; i1 = ls0001_3.nqnyh + 1; i_2 = ls0001_3.nq; for (jb = 1; jb <= i_2; ++jb) { i1 -= *nyh; /* dir$ ivdep */ i_1 = ls0001_3.nqnyh; for (i = i1; i <= i_1; ++i) { /* L210: */ yh1[i] += yh1[i + *nyh]; } /* L215: */ } pnorm = vmnorm_(&ls0001_3.n, &yh1[1], &ewt[1]); /* ----------------------------------------------------------------------- */ /* up to maxcor corrector iterations are taken. a convergence test is */ /* made on the r.m.s. norm of each correction, weighted by the error */ /* weight vector ewt. the sum of the corrections is accumulated in the */ /* vector acor(i). the yh array is not altered in the corrector loop. */ /* ----------------------------------------------------------------------- */ L220: m = 0; rate = 0.; del = 0.; i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { /* L230: */ y[i] = yh[i + yh_dim1]; } (*f)(&neq[1], &ls0001_3.tn, &y[1], &savf[1]); ++ls0001_3.nfe; if (ls0001_3.ipup <= 0) { goto L250; } /* ----------------------------------------------------------------------- */ /* if indicated, the matrix p = i - h*el(1)*j is reevaluated and */ /* preprocessed before starting the corrector iteration. ipup is set */ /* to 0 as an indicator that this has been done. */ /* ----------------------------------------------------------------------- */ (*pjac)(&neq[1], &y[1], &yh[yh_offset], nyh, &ewt[1], &acor[1], &savf[1], &wm[1], &iwm[1], f, jac); ls0001_3.ipup = 0; ls0001_3.rc = 1.; ls0001_3.nslp = ls0001_3.nst; ls0001_3.crate = .7; if (ls0001_3.ierpj != 0) { goto L430; } L250: i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { /* L260: */ acor[i] = 0.; } L270: if (ls0001_3.miter != 0) { goto L350; } /* ----------------------------------------------------------------------- */ /* in the case of functional iteration, update y directly from */ /* the result of the last function evaluation. */ /* ----------------------------------------------------------------------- */ i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { savf[i] = ls0001_3.h * savf[i] - yh[i + (yh_dim1 << 1)]; /* L290: */ y[i] = savf[i] - acor[i]; } del = vmnorm_(&ls0001_3.n, &y[1], &ewt[1]); i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { y[i] = yh[i + yh_dim1] + ls0001_3.el[0] * savf[i]; /* L300: */ acor[i] = savf[i]; } goto L400; /* ----------------------------------------------------------------------- */ /* in the case of the chord method, compute the corrector error, */ /* and solve the linear system with that as right-hand side and */ /* p as coefficient matrix. */ /* ----------------------------------------------------------------------- */ L350: i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { /* L360: */ y[i] = ls0001_3.h * savf[i] - (yh[i + (yh_dim1 << 1)] + acor[i]); } (*slvs)(&wm[1], &iwm[1], &y[1], &savf[1]); if (ls0001_3.iersl < 0) { goto L430; } if (ls0001_3.iersl > 0) { goto L410; } del = vmnorm_(&ls0001_3.n, &y[1], &ewt[1]); i_2 = ls0001_3.n; for (i = 1; i <= i_2; ++i) { acor[i] += y[i]; /* L380: */ y[i] = yh[i + yh_dim1] + ls0001_3.el[0] * acor[i]; } /* ----------------------------------------------------------------------- */ /* test for convergence. if m.gt.0, an estimate of the convergence */ /* rate constant is stored in crate, and this is used in the test. */ /* we first check for a change of iterates that is the size of */ /* roundoff error. if this occurs, the iteration has converged, and a */ /* new rate estimate is not formed. */ /* in all other cases, force at least two iterations to estimate a */ /* local lipschitz constant estimate for adams methods. */ /* on convergence, form pdest = local maximum lipschitz constant */ /* estimate. pdlast is the most recent nonzero estimate. */ /* ----------------------------------------------------------------------- */ L400: if (del <= pnorm * 100. * ls0001_3.uround) { goto L450; } if (m == 0 && ls0001_3.meth == 1) { goto L405; } if (m == 0) { goto L402; } rm = 1024.; if (del <= delp * 1024.) { rm = del / delp; } rate = max(rate,rm); /* Computing MAX */ d_1 = ls0001_3.crate * .2; ls0001_3.crate = max(d_1,rm); L402: /* Computing MIN */ d_1 = 1., d_2 = ls0001_3.crate * 1.5; dcon = del * min(d_1,d_2) / (ls0001_3.tesco[ls0001_3.nq * 3 - 2] * ls0001_3.conit); if (dcon > 1.) { goto L405; } /* Computing MAX */ d_2 = lsa001_3.pdest, d_3 = rate / (d_1 = ls0001_3.h * ls0001_3.el[0], abs(d_1)); lsa001_3.pdest = max(d_2,d_3); if (lsa001_3.pdest != 0.) { lsa001_3.pdlast = lsa001_3.pdest; } goto L450; L405: ++m; if (m == ls0001_3.maxcor) { goto L410; } if (m >= 2 && del > delp * 2.) { goto L410; } delp = del; (*f)(&neq[1], &ls0001_3.tn, &y[1], &savf[1]); ++ls0001_3.nfe; goto L270; /* ----------------------------------------------------------------------- */ /* the corrector iteration failed to converge. */ /* if miter .ne. 0 and the jacobian is out of date, pjac is called for */ /* the next try. otherwise the yh array is retracted to its values */ /* before prediction, and h is reduced, if possible. if h cannot be */ /* reduced or mxncf failures have occurred, exit with kflag = -2. */ /* ----------------------------------------------------------------------- */ L410: if (ls0001_3.miter == 0 || ls0001_3.jcur == 1) { goto L430; } ls0001_3.icf = 1; ls0001_3.ipup = ls0001_3.miter; goto L220; L430: ls0001_3.icf = 2; ++ncf; ls0001_3.rmax = 2.; ls0001_3.tn = told; i1 = ls0001_3.nqnyh + 1; i_2 = ls0001_3.nq; for (jb = 1; jb <= i_2; ++jb) { i1 -= *nyh; /* dir$ ivdep */ i_1 = ls0001_3.nqnyh; for (i = i1; i <= i_1; ++i) { /* L440: */ yh1[i] -= yh1[i + *nyh]; } /* L445: */ } if (ls0001_3.ierpj < 0 || ls0001_3.iersl < 0) { goto L680; } if (abs(ls0001_3.h) <= ls0001_3.hmin * 1.00001) { goto L670; } if (ncf == ls0001_3.mxncf) { goto L670; } rh = .25; ls0001_3.ipup = ls0001_3.miter; iredo = 1; goto L170; /* ----------------------------------------------------------------------- */ /* the corrector has converged. jcur is set to 0 */ /* to signal that the jacobian involved may need updating later. */ /* the local error test is made and control passes to statement 500 */ /* if it fails. */ /* ----------------------------------------------------------------------- */ L450: ls0001_3.jcur = 0; if (m == 0) { dsm = del / ls0001_3.tesco[ls0001_3.nq * 3 - 2]; } if (m > 0) { dsm = vmnorm_(&ls0001_3.n, &acor[1], &ewt[1]) / ls0001_3.tesco[ ls0001_3.nq * 3 - 2]; } if (dsm > 1.) { goto L500; } /* ----------------------------------------------------------------------- */ /* after a successful step, update the yh array. */ /* decrease icount by 1, and if it is -1, consider switching methods. */ /* if a method switch is made, reset various parameters, */ /* rescale the yh array, and exit. if there is no switch, */ /* consider changing h if ialth = 1. otherwise decrease ialth by 1. */ /* if ialth is then 1 and nq .lt. maxord, then acor is saved for */ /* use in a possible order increase on the next step. */ /* if a change in h is considered, an increase or decrease in order */ /* by one is considered also. a change in h is made only if it is by a */ /* factor of at least 1.1. if not, ialth is set to 3 to prevent */ /* testing for that many steps. */ /* ----------------------------------------------------------------------- */ ls0001_3.kflag = 0; iredo = 0; ++ls0001_3.nst; ls0001_3.hu = ls0001_3.h; ls0001_3.nqu = ls0001_3.nq; lsa001_3.mused = ls0001_3.meth; i_2 = ls0001_3.l; for (j = 1; j <= i_2; ++j) { i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L460: */ yh[i + j * yh_dim1] += ls0001_3.el[j - 1] * acor[i]; } } --lsa001_3.icount; if (lsa001_3.icount >= 0) { goto L488; } if (ls0001_3.meth == 2) { goto L480; } /* ----------------------------------------------------------------------- */ /* we are currently using an adams method. consider switching to bdf. */ /* if the current order is greater than 5, assume the problem is */ /* not stiff, and skip this section. */ /* if the lipschitz constant and error estimate are not polluted */ /* by roundoff, go to 470 and perform the usual test. */ /* otherwise, switch to the bdf methods if the last step was */ /* restricted to insure stability (irflag = 1), and stay with adams */ /* method if not. when switching to bdf with polluted error estimates, */ /* in the absence of other information, double the step size. */ /* when the estimates are ok, we make the usual test by computing */ /* the step size we could have (ideally) used on this step, */ /* with the current (adams) method, and also that for the bdf. */ /* if nq .gt. mxords, we consider changing to order mxords on switching. */ /* compare the two step sizes to decide whether to switch. */ /* the step size advantage must be at least ratio = 5 to switch. */ /* ----------------------------------------------------------------------- */ if (ls0001_3.nq > 5) { goto L488; } if (dsm > pnorm * 100. * ls0001_3.uround && lsa001_3.pdest != 0.) { goto L470; } if (lsa001_3.irflag == 0) { goto L488; } rh2 = 2.; nqm2 = min(ls0001_3.nq,lsa001_3.mxords); goto L478; L470: exsm = 1. / (doublereal) ls0001_3.l; rh1 = 1. / (pow_dd(&dsm, &exsm) * 1.2 + 1.2e-6); rh1it = rh1 * 2.; pdh = lsa001_3.pdlast * abs(ls0001_3.h); if (pdh * rh1 > 1e-5) { rh1it = sm1[ls0001_3.nq - 1] / pdh; } rh1 = min(rh1,rh1it); if (ls0001_3.nq <= lsa001_3.mxords) { goto L474; } nqm2 = lsa001_3.mxords; lm2 = lsa001_3.mxords + 1; exm2 = 1. / (doublereal) lm2; lm2p1 = lm2 + 1; dm2 = vmnorm_(&ls0001_3.n, &yh[lm2p1 * yh_dim1 + 1], &ewt[1]) / lsa001_3.cm2[lsa001_3.mxords - 1]; rh2 = 1. / (pow_dd(&dm2, &exm2) * 1.2 + 1.2e-6); goto L476; L474: dm2 = dsm * (lsa001_3.cm1[ls0001_3.nq - 1] / lsa001_3.cm2[ls0001_3.nq - 1] ); rh2 = 1. / (pow_dd(&dm2, &exsm) * 1.2 + 1.2e-6); nqm2 = ls0001_3.nq; L476: if (rh2 < lsa001_3.ratio * rh1) { goto L488; } /* the switch test passed. reset relevant quantities for bdf. ---------- */ L478: rh = rh2; lsa001_3.icount = 20; ls0001_3.meth = 2; ls0001_3.miter = lsa001_3.jtyp; lsa001_3.pdlast = 0.; ls0001_3.nq = nqm2; ls0001_3.l = ls0001_3.nq + 1; goto L170; /* ----------------------------------------------------------------------- */ /* we are currently using a bdf method. consider switching to adams. */ /* compute the step size we could have (ideally) used on this step, */ /* with the current (bdf) method, and also that for the adams. */ /* if nq .gt. mxordn, we consider changing to order mxordn on switching. */ /* compare the two step sizes to decide whether to switch. */ /* the step size advantage must be at least 5/ratio = 1 to switch. */ /* if the step size for adams would be so small as to cause */ /* roundoff pollution, we stay with bdf. */ /* ----------------------------------------------------------------------- */ L480: exsm = 1. / (doublereal) ls0001_3.l; if (lsa001_3.mxordn >= ls0001_3.nq) { goto L484; } nqm1 = lsa001_3.mxordn; lm1 = lsa001_3.mxordn + 1; exm1 = 1. / (doublereal) lm1; lm1p1 = lm1 + 1; dm1 = vmnorm_(&ls0001_3.n, &yh[lm1p1 * yh_dim1 + 1], &ewt[1]) / lsa001_3.cm1[lsa001_3.mxordn - 1]; rh1 = 1. / (pow_dd(&dm1, &exm1) * 1.2 + 1.2e-6); goto L486; L484: dm1 = dsm * (lsa001_3.cm2[ls0001_3.nq - 1] / lsa001_3.cm1[ls0001_3.nq - 1] ); rh1 = 1. / (pow_dd(&dm1, &exsm) * 1.2 + 1.2e-6); nqm1 = ls0001_3.nq; exm1 = exsm; L486: rh1it = rh1 * 2.; pdh = lsa001_3.pdnorm * abs(ls0001_3.h); if (pdh * rh1 > 1e-5) { rh1it = sm1[nqm1 - 1] / pdh; } rh1 = min(rh1,rh1it); rh2 = 1. / (pow_dd(&dsm, &exsm) * 1.2 + 1.2e-6); if (rh1 * lsa001_3.ratio < rh2 * 5.) { goto L488; } alpha = max(.001,rh1); dm1 = pow_dd(&alpha, &exm1) * dm1; if (dm1 <= ls0001_3.uround * 1e3 * pnorm) { goto L488; } /* the switch test passed. reset relevant quantities for adams. -------- */ rh = rh1; lsa001_3.icount = 20; ls0001_3.meth = 1; ls0001_3.miter = 0; lsa001_3.pdlast = 0.; ls0001_3.nq = nqm1; ls0001_3.l = ls0001_3.nq + 1; goto L170; /* no method switch is being made. do the usual step/order selection. -- */ L488: --ls0001_3.ialth; if (ls0001_3.ialth == 0) { goto L520; } if (ls0001_3.ialth > 1) { goto L700; } if (ls0001_3.l == ls0001_3.lmax) { goto L700; } i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L490: */ yh[i + ls0001_3.lmax * yh_dim1] = acor[i]; } goto L700; /* ----------------------------------------------------------------------- */ /* the error test failed. kflag keeps track of multiple failures. */ /* restore tn and the yh array to their previous values, and prepare */ /* to try the step again. compute the optimum step size for this or */ /* one lower order. after 2 or more failures, h is forced to decrease */ /* by a factor of 0.2 or less. */ /* ----------------------------------------------------------------------- */ L500: --ls0001_3.kflag; ls0001_3.tn = told; i1 = ls0001_3.nqnyh + 1; i_1 = ls0001_3.nq; for (jb = 1; jb <= i_1; ++jb) { i1 -= *nyh; /* dir$ ivdep */ i_2 = ls0001_3.nqnyh; for (i = i1; i <= i_2; ++i) { /* L510: */ yh1[i] -= yh1[i + *nyh]; } /* L515: */ } ls0001_3.rmax = 2.; if (abs(ls0001_3.h) <= ls0001_3.hmin * 1.00001) { goto L660; } if (ls0001_3.kflag <= -3) { goto L640; } iredo = 2; rhup = 0.; goto L540; /* ----------------------------------------------------------------------- */ /* regardless of the success or failure of the step, factors */ /* rhdn, rhsm, and rhup are computed, by which h could be multiplied */ /* at order nq - 1, order nq, or order nq + 1, respectively. */ /* in the case of failure, rhup = 0.0 to avoid an order increase. */ /* the largest of these is determined and the new order chosen */ /* accordingly. if the order is to be increased, we compute one */ /* additional scaled derivative. */ /* ----------------------------------------------------------------------- */ L520: rhup = 0.; if (ls0001_3.l == ls0001_3.lmax) { goto L540; } i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L530: */ savf[i] = acor[i] - yh[i + ls0001_3.lmax * yh_dim1]; } dup = vmnorm_(&ls0001_3.n, &savf[1], &ewt[1]) / ls0001_3.tesco[ ls0001_3.nq * 3 - 1]; exup = 1. / (doublereal) (ls0001_3.l + 1); rhup = 1. / (pow_dd(&dup, &exup) * 1.4 + 1.4e-6); L540: exsm = 1. / (doublereal) ls0001_3.l; rhsm = 1. / (pow_dd(&dsm, &exsm) * 1.2 + 1.2e-6); rhdn = 0.; if (ls0001_3.nq == 1) { goto L550; } ddn = vmnorm_(&ls0001_3.n, &yh[ls0001_3.l * yh_dim1 + 1], &ewt[1]) / ls0001_3.tesco[ls0001_3.nq * 3 - 3]; exdn = 1. / (doublereal) ls0001_3.nq; rhdn = 1. / (pow_dd(&ddn, &exdn) * 1.3 + 1.3e-6); /* if meth = 1, limit rh according to the stability region also. -------- */ L550: if (ls0001_3.meth == 2) { goto L560; } /* Computing MAX */ d_1 = abs(ls0001_3.h) * lsa001_3.pdlast; pdh = max(d_1,1e-6); if (ls0001_3.l < ls0001_3.lmax) { /* Computing MIN */ d_1 = rhup, d_2 = sm1[ls0001_3.l - 1] / pdh; rhup = min(d_1,d_2); } /* Computing MIN */ d_1 = rhsm, d_2 = sm1[ls0001_3.nq - 1] / pdh; rhsm = min(d_1,d_2); if (ls0001_3.nq > 1) { /* Computing MIN */ d_1 = rhdn, d_2 = sm1[ls0001_3.nq - 2] / pdh; rhdn = min(d_1,d_2); } lsa001_3.pdest = 0.; L560: if (rhsm >= rhup) { goto L570; } if (rhup > rhdn) { goto L590; } goto L580; L570: if (rhsm < rhdn) { goto L580; } newq = ls0001_3.nq; rh = rhsm; goto L620; L580: newq = ls0001_3.nq - 1; rh = rhdn; if (ls0001_3.kflag < 0 && rh > 1.) { rh = 1.; } goto L620; L590: newq = ls0001_3.l; rh = rhup; if (rh < 1.1) { goto L610; } r = ls0001_3.el[ls0001_3.l - 1] / (doublereal) ls0001_3.l; i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L600: */ yh[i + (newq + 1) * yh_dim1] = acor[i] * r; } goto L630; L610: ls0001_3.ialth = 3; goto L700; /* if meth = 1 and h is restricted by stability, bypass 10 percent test. */ L620: if (ls0001_3.meth == 2) { goto L622; } if (rh * pdh * 1.00001 >= sm1[newq - 1]) { goto L625; } L622: if (ls0001_3.kflag == 0 && rh < 1.1) { goto L610; } L625: if (ls0001_3.kflag <= -2) { rh = min(rh,.2); } /* ----------------------------------------------------------------------- */ /* if there is a change of order, reset nq, l, and the coefficients. */ /* in any case h is reset according to rh and the yh array is rescaled. */ /* then exit from 690 if the step was ok, or redo the step otherwise. */ /* ----------------------------------------------------------------------- */ if (newq == ls0001_3.nq) { goto L170; } L630: ls0001_3.nq = newq; ls0001_3.l = ls0001_3.nq + 1; iret = 2; goto L150; /* ----------------------------------------------------------------------- */ /* control reaches this section if 3 or more failures have occured. */ /* if 10 failures have occurred, exit with kflag = -1. */ /* it is assumed that the derivatives that have accumulated in the */ /* yh array have errors of the wrong order. hence the first */ /* derivative is recomputed, and the order is set to 1. then */ /* h is reduced by a factor of 10, and the step is retried, */ /* until it succeeds or h reaches hmin. */ /* ----------------------------------------------------------------------- */ L640: if (ls0001_3.kflag == -10) { goto L660; } rh = .1; /* Computing MAX */ d_1 = ls0001_3.hmin / abs(ls0001_3.h); rh = max(d_1,rh); ls0001_3.h *= rh; i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L645: */ y[i] = yh[i + yh_dim1]; } (*f)(&neq[1], &ls0001_3.tn, &y[1], &savf[1]); ++ls0001_3.nfe; i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L650: */ yh[i + (yh_dim1 << 1)] = ls0001_3.h * savf[i]; } ls0001_3.ipup = ls0001_3.miter; ls0001_3.ialth = 5; if (ls0001_3.nq == 1) { goto L200; } ls0001_3.nq = 1; ls0001_3.l = 2; iret = 3; goto L150; /* ----------------------------------------------------------------------- */ /* all returns are made through this section. h is saved in hold */ /* to allow the caller to change h on the next step. */ /* ----------------------------------------------------------------------- */ L660: ls0001_3.kflag = -1; goto L720; L670: ls0001_3.kflag = -2; goto L720; L680: ls0001_3.kflag = -3; goto L720; L690: ls0001_3.rmax = 10.; L700: r = 1. / ls0001_3.tesco[ls0001_3.nqu * 3 - 2]; i_1 = ls0001_3.n; for (i = 1; i <= i_1; ++i) { /* L710: */ acor[i] *= r; } L720: ls0001_3.hold = ls0001_3.h; ls0001_3.jstart = 1; return 0; /* ----------------------- end of subroutine stoda ----------------------- */ } /* stoda_ */ doublereal vmnorm_(n, v, w) integer *n; doublereal *v, *w; { /* System generated locals */ integer i_1; doublereal ret_val, d_1, d_2, d_3; /* Local variables */ static integer i; static doublereal vm; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* this function routine computes the weighted max-norm */ /* of the vector of length n contained in the array v, with weights */ /* contained in the array w of length n.. */ /* vmnorm = max(i=1,...,n) abs(v(i))*w(i) */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --w; --v; /* Function Body */ vm = 0.; i_1 = *n; for (i = 1; i <= i_1; ++i) { /* L10: */ /* Computing MAX */ d_2 = vm, d_3 = (d_1 = v[i], abs(d_1)) * w[i]; vm = max(d_2,d_3); } ret_val = vm; return ret_val; /* ----------------------- end of function vmnorm ------------------------ */ } /* vmnorm_ */ /* Subroutine */ int xerrwv_(msg, nmes, nerr, level, ni, i1, i2, nr, r1, r2, unused) const char *msg; integer *nmes; integer *nerr; integer *level, *ni, *i1, *i2, *nr; doublereal *r1, *r2; integer unused; { /* Initialized data */ static integer ncpw = 4; /* Format strings */ static char fmt_10[] = "(1x,15a4)"; static char fmt_20[] = "(6x,\002in above message, i1 =\002,i10)"; static char fmt_30[] = "(6x,\002in above message, i1 =\002,i10,3x,\002i\ 2 =\002,i10)"; static char fmt_40[] = "(6x,\002in above message, r1 =\002,d21.13)"; static char fmt_50[] = "(6x,\002in above, r1 =\002,d21.13,3x,\002r2 \ =\002,d21.13)"; /* System generated locals */ integer i_1; /* Builtin functions */ integer s_wsfe(), do_fio(), e_wsfe(); /* Subroutine */ int s_stop(); /* Local variables */ static integer nwds, i, nch, lun; /* Fortran I/O blocks */ static cilist io__182 = { 0, 0, 0, fmt_10, 0 }; static cilist io__184 = { 0, 0, 0, fmt_20, 0 }; static cilist io__185 = { 0, 0, 0, fmt_30, 0 }; static cilist io__186 = { 0, 0, 0, fmt_40, 0 }; static cilist io__187 = { 0, 0, 0, fmt_50, 0 }; /* ----------------------------------------------------------------------- */ /* subroutines xerrwv, xsetf, and xsetun, as given here, constitute */ /* a simplified version of the slatec error handling package. */ /* written by a. c. hindmarsh at llnl. version of march 30, 1987. */ /* this version is in double precision. */ /* all arguments are input arguments. */ /* msg = the message (hollerith literal or integer array). */ /* nmes = the length of msg (number of characters). */ /* nerr = the error number (not used). */ /* level = the error level.. */ /* 0 or 1 means recoverable (control returns to caller). */ /* 2 means fatal (run is aborted--see note below). */ /* ni = number of integers (0, 1, or 2) to be printed with message. */ /* i1,i2 = integers to be printed, depending on ni. */ /* nr = number of reals (0, 1, or 2) to be printed with message. */ /* r1,r2 = reals to be printed, depending on nr. */ /* note.. this routine is machine-dependent and specialized for use */ /* in limited context, in the following ways.. */ /* 1. the number of hollerith characters stored per word, denoted */ /* by ncpw below, is a data-loaded constant. */ /* 2. the value of nmes is assumed to be at most 60. */ /* (multi-line messages are generated by repeated calls.) */ /* 3. if level = 2, control passes to the statement stop */ /* to abort the run. this statement may be machine-dependent. */ /* 4. r1 and r2 are assumed to be in double precision and are printed */ /* in d21.13 format. */ /* 5. the common block /eh0001/ below is data-loaded (a machine- */ /* dependent feature) with default values. */ /* this block is needed for proper retention of parameters used by */ /* this routine which the user can reset by calling xsetf or xsetun. */ /* the variables in this block are as follows.. */ /* mesflg = print control flag.. */ /* 1 means print all messages (the default). */ /* 0 means no printing. */ /* lunit = logical unit number for messages. */ /* the default is 6 (machine-dependent). */ /* ----------------------------------------------------------------------- */ /* the following are instructions for installing this routine */ /* in different machine environments. */ /* to change the default output unit, change the data statement */ /* in the block data subprogram below. */ /* for a different number of characters per word, change the */ /* data statement setting ncpw below, and format 10. alternatives for */ /* various computers are shown in comment cards. */ /* for a different run-abort command, change the statement following */ /* statement 100 at the end. */ /* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */ /* the following data-loaded value of ncpw is valid for the cdc-6600 */ /* and cdc-7600 computers. */ /* data ncpw/10/ */ /* the following is valid for the cray-1 computer. */ /* data ncpw/8/ */ /* the following is valid for the burroughs 6700 and 7800 computers. */ /* data ncpw/6/ */ /* the following is valid for the pdp-10 computer. */ /* data ncpw/5/ */ /* the following is valid for the vax computer with 4 bytes per integer, */ /* and for the ibm-360, ibm-370, ibm-303x, and ibm-43xx computers. */ /* Parameter adjustments */ --msg; /* Function Body */ /* the following is valid for the pdp-11, or vax with 2-byte integers. */ /* data ncpw/2/ */ /* ----------------------------------------------------------------------- */ if (eh0001_1.mesflg == 0) { goto L100; } /* get logical unit number. --------------------------------------------- */ lun = eh0001_1.lunit; /* get number of words in message. -------------------------------------- */ nch = min(*nmes,60); nwds = nch / ncpw; if (nch != nwds * ncpw) { ++nwds; } /* write the message. --------------------------------------------------- */ io__182.ciunit = lun; s_wsfe(&io__182); i_1 = nwds; for (i = 1; i <= i_1; ++i) { do_fio(&c__1, (char *)&msg[i], (ftnlen)sizeof(integer)); } e_wsfe(); /* ----------------------------------------------------------------------- */ /* the following format statement is to have the form */ /* 10 format(1x,mmann) */ /* where nn = ncpw and mm is the smallest integer .ge. 60/ncpw. */ /* the following is valid for ncpw = 10. */ /* 10 format(1x,6a10) */ /* the following is valid for ncpw = 8. */ /* 10 format(1x,8a8) */ /* the following is valid for ncpw = 6. */ /* 10 format(1x,10a6) */ /* the following is valid for ncpw = 5. */ /* 10 format(1x,12a5) */ /* the following is valid for ncpw = 4. */ /* the following is valid for ncpw = 2. */ /* 10 format(1x,30a2) */ /* ----------------------------------------------------------------------- */ if (*ni == 1) { io__184.ciunit = lun; s_wsfe(&io__184); do_fio(&c__1, (char *)&(*i1), (ftnlen)sizeof(integer)); e_wsfe(); } if (*ni == 2) { io__185.ciunit = lun; s_wsfe(&io__185); do_fio(&c__1, (char *)&(*i1), (ftnlen)sizeof(integer)); do_fio(&c__1, (char *)&(*i2), (ftnlen)sizeof(integer)); e_wsfe(); } if (*nr == 1) { io__186.ciunit = lun; s_wsfe(&io__186); do_fio(&c__1, (char *)&(*r1), (ftnlen)sizeof(doublereal)); e_wsfe(); } if (*nr == 2) { io__187.ciunit = lun; s_wsfe(&io__187); do_fio(&c__1, (char *)&(*r1), (ftnlen)sizeof(doublereal)); do_fio(&c__1, (char *)&(*r2), (ftnlen)sizeof(doublereal)); e_wsfe(); } /* abort the run if level = 2. ------------------------------------------ */ L100: if (*level != 2) { return 0; } s_stop("", 0L); return 0; /* ----------------------- end of subroutine xerrwv ---------------------- */ } /* xerrwv_ */ /* ----------------------------------------------------------------------- */ /* this data subprogram loads variables into the internal common */ /* blocks used by the odepack solvers. the variables are */ /* defined as follows.. */ /* illin = counter for the number of consecutive times the package */ /* was called with illegal input. the run is stopped when */ /* illin reaches 5. */ /* ntrep = counter for the number of consecutive times the package */ /* was called with istate = 1 and tout = t. the run is */ /* stopped when ntrep reaches 5. */ /* mesflg = flag to control printing of error messages. 1 means print, */ /* 0 means no printing. */ /* lunit = default value of logical unit number for printing of error */ /* messages. */ /* ----------------------------------------------------------------------- */ /* ----------------------- end of block data ----------------------------- */ doublereal bnorm_(n, a, nra, ml, mu, w) integer *n; doublereal *a; integer *nra, *ml, *mu; doublereal *w; { /* System generated locals */ integer a_dim1, a_offset, i_1, i_2; doublereal ret_val, d_1, d_2; /* Local variables */ static integer i, j, i1; static doublereal an; static integer jhi, jlo; static doublereal sum; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* this function computes the norm of a banded n by n matrix, */ /* stored in the array a, that is consistent with the weighted max-norm */ /* on vectors, with weights stored in the array w. */ /* ml and mu are the lower and upper half-bandwidths of the matrix. */ /* nra is the first dimension of the a array, nra .ge. ml+mu+1. */ /* in terms of the matrix elements a(i,j), the norm is given by.. */ /* bnorm = max(i=1,...,n) ( w(i) * sum(j=1,...,n) abs(a(i,j))/w(j) ) */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --w; a_dim1 = *nra; a_offset = a_dim1 + 1; a -= a_offset; /* Function Body */ an = 0.; i_1 = *n; for (i = 1; i <= i_1; ++i) { sum = 0.; i1 = i + *mu + 1; /* Computing MAX */ i_2 = i - *ml; jlo = max(i_2,1); /* Computing MIN */ i_2 = i + *mu; jhi = min(i_2,*n); i_2 = jhi; for (j = jlo; j <= i_2; ++j) { /* L10: */ sum += (d_1 = a[i1 - j + j * a_dim1], abs(d_1)) / w[j]; } /* Computing MAX */ d_1 = an, d_2 = sum * w[i]; an = max(d_1,d_2); /* L20: */ } ret_val = an; return ret_val; /* ----------------------- end of function bnorm ------------------------- */ } /* bnorm_ */ /* Subroutine */ int cfode_(meth, elco, tesco) integer *meth; doublereal *elco, *tesco; { /* System generated locals */ integer i_1; /* Local variables */ static doublereal ragq, pint, xpin, fnqm1; static integer i; static doublereal agamq, rqfac, tsign, rq1fac; static integer ib; static doublereal pc[12]; static integer nq; static doublereal fnq; static integer nqm1, nqp1; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* cfode is called by the integrator routine to set coefficients */ /* needed there. the coefficients for the current method, as */ /* given by the value of meth, are set for all orders and saved. */ /* the maximum order assumed here is 12 if meth = 1 and 5 if meth = 2. */ /* (a smaller value of the maximum order is also allowed.) */ /* cfode is called once at the beginning of the problem, */ /* and is not called again unless and until meth is changed. */ /* the elco array contains the basic method coefficients. */ /* the coefficients el(i), 1 .le. i .le. nq+1, for the method of */ /* order nq are stored in elco(i,nq). they are given by a genetrating */ /* polynomial, i.e., */ /* l(x) = el(1) + el(2)*x + ... + el(nq+1)*x**nq. */ /* for the implicit adams methods, l(x) is given by */ /* dl/dx = (x+1)*(x+2)*...*(x+nq-1)/factorial(nq-1), l(-1) = 0. */ /* for the bdf methods, l(x) is given by */ /* l(x) = (x+1)*(x+2)* ... *(x+nq)/k, */ /* where k = factorial(nq)*(1 + 1/2 + ... + 1/nq). */ /* the tesco array contains test constants used for the */ /* local error test and the selection of step size and/or order. */ /* at order nq, tesco(k,nq) is used for the selection of step */ /* size at order nq - 1 if k = 1, at order nq if k = 2, and at order */ /* nq + 1 if k = 3. */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ tesco -= 4; elco -= 14; /* Function Body */ switch ((int)*meth) { case 1: goto L100; case 2: goto L200; } L100: elco[14] = 1.; elco[15] = 1.; tesco[4] = 0.; tesco[5] = 2.; tesco[7] = 1.; tesco[39] = 0.; pc[0] = 1.; rqfac = 1.; for (nq = 2; nq <= 12; ++nq) { /* ------------------------------------------------------------------ ----- */ /* the pc array will contain the coefficients of the polynomial */ /* p(x) = (x+1)*(x+2)*...*(x+nq-1). */ /* initially, p(x) = 1. */ /* ------------------------------------------------------------------ ----- */ rq1fac = rqfac; rqfac /= (doublereal) nq; nqm1 = nq - 1; fnqm1 = (doublereal) nqm1; nqp1 = nq + 1; /* form coefficients of p(x)*(x+nq-1). ------------------------------ ---- */ pc[nq - 1] = 0.; i_1 = nqm1; for (ib = 1; ib <= i_1; ++ib) { i = nqp1 - ib; /* L110: */ pc[i - 1] = pc[i - 2] + fnqm1 * pc[i - 1]; } pc[0] = fnqm1 * pc[0]; /* compute integral, -1 to 0, of p(x) and x*p(x). ------------------- ---- */ pint = pc[0]; xpin = pc[0] / 2.; tsign = 1.; i_1 = nq; for (i = 2; i <= i_1; ++i) { tsign = -tsign; pint += tsign * pc[i - 1] / (doublereal) i; /* L120: */ xpin += tsign * pc[i - 1] / (doublereal) (i + 1); } /* store coefficients in elco and tesco. ---------------------------- ---- */ elco[nq * 13 + 1] = pint * rq1fac; elco[nq * 13 + 2] = 1.; i_1 = nq; for (i = 2; i <= i_1; ++i) { /* L130: */ elco[i + 1 + nq * 13] = rq1fac * pc[i - 1] / (doublereal) i; } agamq = rqfac * xpin; ragq = 1. / agamq; tesco[nq * 3 + 2] = ragq; if (nq < 12) { tesco[nqp1 * 3 + 1] = ragq * rqfac / (doublereal) nqp1; } tesco[nqm1 * 3 + 3] = ragq; /* L140: */ } return 0; L200: pc[0] = 1.; rq1fac = 1.; for (nq = 1; nq <= 5; ++nq) { /* ------------------------------------------------------------------ ----- */ /* the pc array will contain the coefficients of the polynomial */ /* p(x) = (x+1)*(x+2)*...*(x+nq). */ /* initially, p(x) = 1. */ /* ------------------------------------------------------------------ ----- */ fnq = (doublereal) nq; nqp1 = nq + 1; /* form coefficients of p(x)*(x+nq). -------------------------------- ---- */ pc[nqp1 - 1] = 0.; i_1 = nq; for (ib = 1; ib <= i_1; ++ib) { i = nq + 2 - ib; /* L210: */ pc[i - 1] = pc[i - 2] + fnq * pc[i - 1]; } pc[0] = fnq * pc[0]; /* store coefficients in elco and tesco. ---------------------------- ---- */ i_1 = nqp1; for (i = 1; i <= i_1; ++i) { /* L220: */ elco[i + nq * 13] = pc[i - 1] / pc[1]; } elco[nq * 13 + 2] = 1.; tesco[nq * 3 + 1] = rq1fac; tesco[nq * 3 + 2] = (doublereal) nqp1 / elco[nq * 13 + 1]; tesco[nq * 3 + 3] = (doublereal) (nq + 2) / elco[nq * 13 + 1]; rq1fac /= fnq; /* L230: */ } return 0; /* ----------------------- end of subroutine cfode ----------------------- */ } /* cfode_ */ /* Subroutine */ int ewset_(n, itol, rtol, atol, ycur, ewt) integer *n, *itol; doublereal *rtol, *atol, *ycur, *ewt; { /* System generated locals */ integer i_1; doublereal d_1; /* Local variables */ static integer i; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* this subroutine sets the error weight vector ewt according to */ /* ewt(i) = rtol(i)*abs(ycur(i)) + atol(i), i = 1,...,n, */ /* with the subscript on rtol and/or atol possibly replaced by 1 above, */ /* depending on the value of itol. */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --ewt; --ycur; --atol; --rtol; /* Function Body */ switch ((int)*itol) { case 1: goto L10; case 2: goto L20; case 3: goto L30; case 4: goto L40; } L10: i_1 = *n; for (i = 1; i <= i_1; ++i) { /* L15: */ ewt[i] = rtol[1] * (d_1 = ycur[i], abs(d_1)) + atol[1]; } return 0; L20: i_1 = *n; for (i = 1; i <= i_1; ++i) { /* L25: */ ewt[i] = rtol[1] * (d_1 = ycur[i], abs(d_1)) + atol[i]; } return 0; L30: i_1 = *n; for (i = 1; i <= i_1; ++i) { /* L35: */ ewt[i] = rtol[i] * (d_1 = ycur[i], abs(d_1)) + atol[1]; } return 0; L40: i_1 = *n; for (i = 1; i <= i_1; ++i) { /* L45: */ ewt[i] = rtol[i] * (d_1 = ycur[i], abs(d_1)) + atol[i]; } return 0; /* ----------------------- end of subroutine ewset ----------------------- */ } /* ewset_ */ doublereal fnorm_(n, a, w) integer *n; doublereal *a, *w; { /* System generated locals */ integer a_dim1, a_offset, i_1, i_2; doublereal ret_val, d_1, d_2; /* Local variables */ static integer i, j; static doublereal an, sum; /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* this function computes the norm of a full n by n matrix, */ /* stored in the array a, that is consistent with the weighted max-norm */ /* on vectors, with weights stored in the array w.. */ /* fnorm = max(i=1,...,n) ( w(i) * sum(j=1,...,n) abs(a(i,j))/w(j) ) */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --w; a_dim1 = *n; a_offset = a_dim1 + 1; a -= a_offset; /* Function Body */ an = 0.; i_1 = *n; for (i = 1; i <= i_1; ++i) { sum = 0.; i_2 = *n; for (j = 1; j <= i_2; ++j) { /* L10: */ sum += (d_1 = a[i + j * a_dim1], abs(d_1)) / w[j]; } /* Computing MAX */ d_1 = an, d_2 = sum * w[i]; an = max(d_1,d_2); /* L20: */ } ret_val = an; return ret_val; /* ----------------------- end of function fnorm ------------------------- */ } /* fnorm_ */ /* Subroutine */ int intdy_(t, k, yh, nyh, dky, iflag) doublereal *t; integer *k; doublereal *yh; integer *nyh; doublereal *dky; integer *iflag; { /* System generated locals */ integer yh_dim1, yh_offset, i_1, i_2; /* Builtin functions */ double pow_di(); /* Local variables */ static doublereal c; static integer i, j; static doublereal r, s; static integer ic, jb, jj; static doublereal tp; static integer jb2, jj1, jp1; extern /* Subroutine */ int xerrwv_(); /* lll. optimize */ /* ----------------------------------------------------------------------- */ /* intdy computes interpolated values of the k-th derivative of the */ /* dependent variable vector y, and stores it in dky. this routine */ /* is called within the package with k = 0 and t = tout, but may */ /* also be called by the user for any k up to the current order. */ /* (see detailed instructions in the usage documentation.) */ /* ----------------------------------------------------------------------- */ /* the computed values in dky are gotten by interpolation using the */ /* nordsieck history array yh. this array corresponds uniquely to a */ /* vector-valued polynomial of degree nqcur or less, and dky is set */ /* to the k-th derivative of this polynomial at t. */ /* the formula for dky is.. */ /* q */ /* dky(i) = sum c(j,k) * (t - tn)**(j-k) * h**(-j) * yh(i,j+1) */ /* j=k */ /* where c(j,k) = j*(j-1)*...*(j-k+1), q = nqcur, tn = tcur, h = hcur. */ /* the quantities nq = nqcur, l = nq+1, n = neq, tn, and h are */ /* communicated by common. the above sum is done in reverse order. */ /* iflag is returned negative if either k or t is out of bounds. */ /* ----------------------------------------------------------------------- */ /* Parameter adjustments */ --dky; yh_dim1 = *nyh; yh_offset = yh_dim1 + 1; yh -= yh_offset; /* Function Body */ *iflag = 0; if (*k < 0 || *k > ls0001_2.nq) { goto L80; } tp = ls0001_2.tn - ls0001_2.hu - ls0001_2.uround * 100. * (ls0001_2.tn + ls0001_2.hu); if ((*t - tp) * (*t - ls0001_2.tn) > 0.) { goto L90; } s = (*t - ls0001_2.tn) / ls0001_2.h; ic = 1; if (*k == 0) { goto L15; } jj1 = ls0001_2.l - *k; i_1 = ls0001_2.nq; for (jj = jj1; jj <= i_1; ++jj) { /* L10: */ ic *= jj; } L15: c = (doublereal) ic; i_1 = ls0001_2.n; for (i = 1; i <= i_1; ++i) { /* L20: */ dky[i] = c * yh[i + ls0001_2.l * yh_dim1]; } if (*k == ls0001_2.nq) { goto L55; } jb2 = ls0001_2.nq - *k; i_1 = jb2; for (jb = 1; jb <= i_1; ++jb) { j = ls0001_2.nq - jb; jp1 = j + 1; ic = 1; if (*k == 0) { goto L35; } jj1 = jp1 - *k; i_2 = j; for (jj = jj1; jj <= i_2; ++jj) { /* L30: */ ic *= jj; } L35: c = (doublereal) ic; i_2 = ls0001_2.n; for (i = 1; i <= i_2; ++i) { /* L40: */ dky[i] = c * yh[i + jp1 * yh_dim1] + s * dky[i]; } /* L50: */ } if (*k == 0) { return 0; } L55: i_1 = -(*k); r = pow_di(&ls0001_2.h, &i_1); i_1 = ls0001_2.n; for (i = 1; i <= i_1; ++i) { /* L60: */ dky[i] = r * dky[i]; } return 0; L80: xerrwv_("intdy-- k (=i1) illegal ", &c__30, &c__51, &c__0, &c__1, k, &c__0, &c__0, &c_b136, &c_b136, 0L); *iflag = -1; return 0; L90: xerrwv_("intdy-- t (=r1) illegal ", &c__30, &c__52, &c__0, &c__0, & c__0, &c__0, &c__1, t, &c_b136, 0L); xerrwv_(" t not in interval tcur - hu (= r1) to tcur (=r2) ", & c__60, &c__52, &c__0, &c__0, &c__0, &c__0, &c__2, &tp, & ls0001_2.tn, 0L); *iflag = -2; return 0; /* ----------------------- end of subroutine intdy ----------------------- */ } /* intdy_ */ neuron-7.5/src/scopmath/csodabnc.c000077500000000000000000000064171323325274500172410ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: csodabnc.c * * Copyright (c) 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "csodabnc.c,v 1.2 1997/08/30 14:32:02 hines Exp" ; #endif #include #include #include "scoplib.h" typedef long int integer; typedef double doublereal; static int g_neq; static double *_p; static int *g_slist, *g_dlist; #define g_slist_(arg) _p[g_slist[arg]] #define g_dlist_(arg) _p[g_dlist[arg]] static double *g_t; static int (*modl_fun)(); static int funct(); static void to_gear(); static void from_gear(); static void to_modl(); static void from_modl(); int clsoda(_ninits, n, slist, dlist, p, pt, dt, fun, ptemp, maxerr) /* Changed from gear() MDF */ int _ninits, n; double *p, *pt, dt, **ptemp, maxerr; int *slist, *dlist; int (*fun)(); { int i; double savet; static int ninitsav = -1; /* Local variables */ static doublereal atol; static integer jdum, itol, iopt; static doublereal rtol; static integer iout; static doublereal tout, *y=(doublereal *)0; extern /* Subroutine */ int lsoda_(); static integer itask, *iwork; static doublereal *rwork; static integer jt, istate; static integer neq, liw, lrw; if (_p != p) { _p = p; } if (g_slist != slist || g_neq != n) { if (y) { free((char *)y); y = (doublereal *)0; } if (rwork) { free((char *)rwork); rwork = (doublereal *)0; } if (iwork) { free((char *)iwork); iwork = (integer *)0; } if ((y = (doublereal *)malloc(sizeof(doublereal)*n)) == (doublereal *)0) { return 1; } lrw = 22 + n * ((16 > n+9)? 16: n+9) ; if ((rwork = (doublereal *)malloc(sizeof(doublereal)*lrw)) == (doublereal *)0) { return 1; } liw = 20 + n; if ((iwork = (integer *)malloc(sizeof(integer)*liw)) == (integer *)0) { return 1; } g_slist = slist; g_dlist = dlist; g_neq = n; g_t = pt; modl_fun = fun; } neq = n; itol = 1; rtol = maxerr; atol = maxerr; itask = 1; if (_ninits != ninitsav) { ninitsav = _ninits; istate = 1; }else{ istate = 2; } iopt = 0; jt = 2; tout = *pt + dt; savet = *pt; to_gear(y); lsoda_(funct, &neq, y, pt, &tout, &itol, &rtol, &atol, &itask, &istate, &iopt, rwork, &lrw, iwork, &liw, &jdum, &jt); from_gear(y); *pt = savet; return 0; } static int funct(neq, t, y, ydot) integer *neq; double *t, *y, *ydot; { to_modl(t, y); modl_fun(); from_modl(ydot); return 0; } static void to_gear(y) double *y; { int i; for (i=0; i /****************************************************************************** * * File: deflate.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "deflate.c,v 1.2 1999/01/04 12:46:44 hines Exp" ; #endif #include #include #include "errcodes.h" #include "scoplib.h" #define CONTINUE 0 /*----------------------------------------------------------------------------- * * DEFLATE() * * Finds the real roots of a polynomial with real coefficients * by Newtonian deflation. MAXITERS is the maximum number of * iterations of the Newton algorithm for root finding allowed * before exiting (currently set to 50). Convergence achieved * when value of polynomial (remainder) <= ZERO and the change * in the approximation to the root between successive iterations * is <= CONVERGE. * * r = approximation to root of p(x) * p(r) = remainder (= 0 at true root) * p(x)/(x - r) = q(x) * q(r) = slope * r' = new approximation to root * = r - remainder/slope * * Returns: * if successful: number of roots found * if unsucessful: negative of error code * * Calling sequence: deflate(degree, pcoeff, root) * * Arguments: * Input: degree double degree of polynomial * pcoeff[] double real coefficients of * array polynomial * Output: root[] double real roots of polynomial * array * * Functions called: makevector, freevector * *--------------------------------------------------------------------------*/ int deflate(degree, pcoeff, root) double degree, pcoeff[], root[]; { int n, ndeg, iter, i, status = CONTINUE; extern int freevector(); extern double *makevector(); double *qcoeff, r = 0.01, slope, remainder, rnew; /* r is the current approximation to the next root to be found */ ndeg = (int) (degree + 0.1); n = ndeg; qcoeff = makevector(ndeg); while (n > 1) { iter = 0; qcoeff[n - 1] = pcoeff[n]; /* Begin Newton iteration */ while (status == CONTINUE) { slope = qcoeff[n - 1]; for (i = n - 1; i > 0; i--) { /* * Compute values of polynomial (remainder) and quotient * (slope) by synthetic division using Horner's method */ qcoeff[i - 1] = pcoeff[i] + qcoeff[i] * r; slope = qcoeff[i - 1] + slope * r; } remainder = pcoeff[0] + qcoeff[0] * r; /* Check for error */ if (fabs(slope) < ROUNDOFF) { status = DIVCHECK; break; } else if (++iter >= MAXITERS) { status = EXCEED_ITERS; break; } if (status == CONTINUE) { /* Update approximation to root and test for convergence */ rnew = r - remainder / slope; if (fabs(remainder) <= ZERO && fabs(rnew - r) <= CONVERGE) break; r = rnew; } } /* End Newton iteration */ if (status != CONTINUE) break; root[ndeg - n] = r; /* * Put quotient coefficients into original polynomial coefficient * array and decrement the degree of the polynomial to deflate on the * next pass. */ for (i = 0; i < n; i++) pcoeff[i] = qcoeff[i]; n--; } /* End of loop over degrees > 1 */ if (n == ndeg) /* No roots found */ { freevector(qcoeff); return (-status); } /* Calculate final root */ root[ndeg - n] = -pcoeff[0] / pcoeff[1]; freevector(qcoeff); return (ndeg - n + 1); } neuron-7.5/src/scopmath/dimplic.c000077500000000000000000000013771323325274500171060ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: dimplic.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "dimplic.c,v 1.1.1.1 1994/10/12 17:22:20 hines Exp" ; #endif int derivimplicit(_ninits, n, slist, dlist, p, pt, dt, fun, ptemp) int n, _ninits; double *p, *pt, dt, **ptemp; int *slist, *dlist; int (*fun)(); { int i; (*fun)(); return 0; } int derivimplicit_thread(int n, int* slist, int* dlist, double* p, int(*fun)(double*, void*, void*, void*), void* ppvar, void* thread, void* nt) { (*fun)(p, ppvar, thread, nt); return 0; } neuron-7.5/src/scopmath/errcodes.h000077500000000000000000000017571323325274500173020ustar00rootroot00000000000000/****************************************************************************** * * File: errcodes.h * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * * errcodes.h,v 1.1.1.1 1994/10/12 17:22:18 hines Exp * ******************************************************************************/ extern int abort_run(int); #define ROUNDOFF 1.e-20 #define ZERO 1.e-8 #define STEP 1.e-6 #define CONVERGE 1.e-6 #define MAXCHANGE 0.05 #define INITSIMPLEX 0.25 #define MAXITERS 50 #define MAXSMPLXITERS 100 #define MAXSTEPS 20 #define MAXHALVE 15 #define MAXORDER 6 #define MAXTERMS 3 #define MAXFAIL 10 #define MAX_JAC_ITERS 20 #define MAX_GOOD_ORDER 2 #define MAX_GOOD_STEPS 3 #define SUCCESS 0 #define EXCEED_ITERS 1 #define SINGULAR 2 #define PRECISION 3 #define CORR_FAIL 4 #define INCONSISTENT 5 #define BAD_START 6 #define NODATA 7 #define NO_SOLN 8 #define LOWMEM 9 #define DIVCHECK 10 #define NOFORCE 11 #define DIVERGED 12 #define NEG_ARG 13 #define RANGE 14 neuron-7.5/src/scopmath/euler.c000077500000000000000000000065151323325274500166000ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: euler.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "euler.c,v 1.1.1.1 1994/10/12 17:22:20 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: euler() */ /* Euler integration subroutine for a set of first-order */ /* ordinary differential equations. */ /* */ /* Calling sequence: */ /* euler(neqn, var, der, p, t, dt, func, &work) */ /* */ /* Arguments: */ /* Input: neqn, int, number of equations */ /* */ /* var, pointer to array of addresses of the */ /* state variables */ /* */ /* der, pointer to array of addresses of the */ /* derivatives of the state variables */ /* */ /* p, double precision variable array */ /* */ /* t, pointer to current time */ /* */ /* dt, double, integration stepsize */ /* */ /* func, name of function which evaluates the */ /* derivatives of the dependent variables */ /* */ /* *work, pointer to work array; not used in euler */ /* but kept in call for consistency with */ /* other integrators */ /* */ /* Output: time, the dependent variables, and the time */ /* derivatives of the dependent variables */ /* are updated */ /* */ /* Functions called: derivative function (named in call) must */ /* be supplied by user; call is func(p) */ /* */ /* Returns: int error code (always SUCCESS for euler) */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #include "errcodes.h" /* ARGSUSED */ int euler(_ninits, neqn, var, der, p, t, dt, func, work) int _ninits; double p[], *t, dt, **work; int var[]; int der[]; #define der_(arg) p[der[arg]] #define var_(arg) p[var[arg]] int neqn, (*func) (); { int i; /* Calculate the derivatives */ (*func) (p); /* Update dependent variables */ for (i = 0; i < neqn; i++) var_(i) += dt * (der_(i)); return (SUCCESS); } neuron-7.5/src/scopmath/expfit.c000077500000000000000000000204421323325274500167560ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: expfit.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "expfit.c,v 1.3 1999/01/04 12:46:46 hines Exp"; #endif /**************************************************************** * * Abstract: expfit() * * Exponential curve peeling by Handscomb's modification of * Prony's method. Only the real poles are found; the * complex solutions are artifactual oscillatory components * resulting from trying to fit the noise in the data. The * data must be sampled at equal intervals and stored in a * reference data file. There must be at least two more data * points than the maximal number of exponentials to be fit * to the data. * * This function should be invoked in initmodel() and the function * * y = A[0]*exp(k[0]*t) + ... + A[terms-1]*exp(k[terms-1]*t) * * evaluated in model(). * * Calling sequence: expfit(terms, reffile, amplitude, lambda, error) * * Arguments: * Input: *terms double maximum number of terms * to try to fit. If terms * < 0, discard exponentials * with amplitudes < error. * *reffile char name of reference data file * Output: amplitude[] double pre-exponential coefficients * lambda[] double time constants (Note that * the zeroth elements of the * amplitude and time constant * arrays are used on return.) * *error double standard error of estimate * (Set to -1 if terms > 0) * * Functions called: expinit(), simeq(), deflate(), testfit(), * makevector(),freevector(),makematrix(),freematrix(), * abs() * * Returns: integer error code * * Files accessed: reffile * ****************************************************************/ #include #include #include #include "errcodes.h" #include "scoplib.h" int expfit(terms, reffile, amplitude, lambda, error) char *reffile; double *terms, amplitude[], lambda[], *error; { int i, j, k, npts, dimen, ierr, expinit(), testfit(); double h, *x, **L, *coeff, *work; extern int simeq(), deflate(), freematrix(), freevector(); extern double *makevector(), **makematrix(); /* * Read in data file; expinit() returns number of data points */ if ((npts = expinit(reffile, &h, &x)) <= 0) return (NODATA); if (*terms < 0.) dimen = (int) -(*terms - 0.1); else dimen = (int) (*terms + 0.1); /* Allocate storage for arrays */ L = makematrix(dimen, dimen + 1); work = makevector(dimen + 1); coeff = makevector(dimen + 1); /* Compute least squares matrix */ for (i = 0; i < dimen; i++) { for (j = 0; j <= i; j++) { L[i][j] = 0.0; for (k = 1; k <= npts - dimen; k++) L[i][j] += x[i + k] * x[j + k]; if (i != j) L[j][i] = L[i][j]; } /* Compute constant vector */ L[i][dimen] = 0.0; for (k = 1; k <= npts - dimen; k++) L[i][dimen] -= x[i + k] * x[k - 1]; } /* * Solve for coefficients of characteristic equation. Then solve * characteristic equation for values of basis functions stored in * lambda[0] to lambda[dimen-1]. Deflate() returns the number of * exponentials with real time constants. */ if ((ierr = simeq(dimen, L, work, (int *)0)) != SUCCESS) goto FINISH; coeff[0] = 1.0; for (i = 1; i <= dimen; i++) coeff[i] = work[i - 1]; if ((dimen = deflate((double) dimen, coeff, lambda)) < 0) { ierr = -dimen; goto FINISH; } else if (dimen == 0) { ierr = NO_SOLN; goto FINISH; } /* Set up least squares matrix for amplitudes */ for (i = 0; i < dimen; i++) { for (j = 0; j <= i; j++) { L[i][j] = 1.0; for (k = 1; k < npts - dimen; k++) L[i][j] += pow(lambda[i] * lambda[j], (double) k); if (i != j) L[j][i] = L[i][j]; } /* Compute constant vector */ L[i][dimen] = x[0]; for (k = 1; k < npts - dimen; k++) L[i][dimen] += pow(lambda[i], (double) k) * x[k]; } /* Solve for amplitudes */ if ((ierr = simeq(dimen, L, work, (int *)0)) != SUCCESS) goto FINISH; for (i = 0; i < dimen; i++) amplitude[i] = work[i]; /* Convert basis function values to time constants */ for (i = 0; i < dimen; i++) if (lambda[i] <= 0.0) /* Basis functions must be positive to take logarithm */ amplitude[i] = 0.0; else lambda[i] = log(lambda[i]) / h; /* * If trial number of exponential terms is negative, compute the standard * error of estimate and reject any exponential term with an amplitude * less than that error. */ if (*terms < 0.) testfit(npts, x, terms, amplitude, lambda, h, error); else *error = -1.0; if (*terms <= ZERO) ierr = NO_SOLN; FINISH: freevector(coeff); freevector(x); freevector(work); freematrix(L); return (ierr); } /*-------------------------------------------------------------------------- * expinit() * * Reads data file * * Calling sequence: expinit(filename, deltat, data) * * Arguments: * Input: * filename char* name of data file * Output: * deltat double * constant spacing of data points * data double ** array of ordinate values for curve * to be decomposed into exponentials * * Returns: * * Functions called: fopen(), fclose(), fgets() * * Files accessed: filename (input) *------------------------------------------------------------------------*/ int expinit(filename, deltat, data) char *filename; double *deltat, **data; { FILE *refdata, *fopen(); int i, npts = -6, fclose(); extern double *makevector(); double temp; char *fgets(), tmpstr[81]; /* * Open reference data file. Count data points and allocate storage for * data */ if ((refdata = fopen(filename, "r")) == NULL) return (0); while (fgets(tmpstr, 80, refdata) != NULL) npts++; *data = makevector(npts); rewind(refdata); for (i = 0; i < 7; i++) assert(fgets(tmpstr, 80, refdata)); sscanf(tmpstr, "%lf %lf", &temp, *data); assert(fgets(tmpstr, 80, refdata)); sscanf(tmpstr, "%lf %lf", deltat, *data + 1); *deltat -= temp; for (i = 2; i < npts; i++) { assert(fgets(tmpstr, 80, refdata)); sscanf(tmpstr, "%lf %lf", &temp, *data + i); } fclose(refdata); return (npts); } /*-------------------------------------------------------------------------- * testfit() * * Rejects exponentials whose amplitudes are less than the standard error * of estimate * * Calling sequence: * testfit(ndata, data, terms, amplitude, lambda, h, errfit) * * Arguments: * Input: * ndata int * number of data points * data double * array of ordinate values for curve to be * decomposed into exponentials * terms double* negative of number of exponential terms * amplitude double* array of amplitudes of exponentials * lambda double* array of decay constants of exponentials * h double spacing of data points * Output: * terms double* number of exponential terms with * amplitudes > standard error of estimate * errfit double* standard error of estimate * * Returns: * * Functions called: exp(), sqrt(), fabs() * * Files accessed: *------------------------------------------------------------------------*/ int testfit(ndata, data, terms, amplitude, lambda, h, errfit) int ndata; double *terms, data[], amplitude[], lambda[], h, *errfit; { int n, i, j; double temp; /* Compute standard error of estimate of the fit to the data */ n = (int) -(*terms - 0.1); *errfit = 0.0; for (i = 0; i < ndata; i++) { temp = 0.0; for (j = 0; j < n; j++) temp += amplitude[j] * exp(lambda[j] * i * h); temp -= data[i]; *errfit += temp * temp; } *errfit = sqrt(*errfit / (ndata - n - 1)); /* Reject any exponential with an amplitude less than the standard error */ for (i = 0; i < n; i++) { if (fabs(amplitude[i]) < *errfit) amplitude[i] = 0.0; if (fabs(amplitude[i]) <= ZERO) { /* Ripple down rest of amplitude and lambda arrays */ for (j = i; j < n; j++) { amplitude[j] = amplitude[j + 1]; lambda[j] = lambda[j + 1]; } amplitude[n] = 0.0; lambda[n] = 0.0; n--; } } *terms = (double) n; return 0; } neuron-7.5/src/scopmath/exprand.c000077500000000000000000000021161323325274500171160ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: exprand.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "exprand.c,v 1.2 1998/07/01 20:39:49 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: exprand() */ /* */ /* Random sample from the exponential distribution exp(-mean*x) */ /* */ /* Calling sequence: exprand() */ /* */ /* Arguments: */ /* Input: none */ /* */ /* Output: none */ /* */ /* Functions called: scop_random() */ /* */ /* Returns: Double precision number from the distribution */ /* */ /* Files accessed: none */ /* */ /* */ /****************************************************************/ double exprand(double mean) { extern double scop_random(), log(); return (-mean*log(scop_random())); } neuron-7.5/src/scopmath/f2c.h000077500000000000000000000105631323325274500161410ustar00rootroot00000000000000/****************************************************************************** * * File: f2c.h * * Support file for code generated by 'f2c'. Part of 'f2c' package obtained * from 'netlib@att.research.com'. * * f2c.h,v 1.2 1997/08/30 14:32:04 hines Exp * ******************************************************************************/ /* f2c.h -- Standard Fortran to C header file */ /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ #ifndef F2C_INCLUDE #define F2C_INCLUDE typedef long int integer; typedef char *address; typedef short int shortint; typedef float real; typedef double doublereal; typedef struct { real r, i; } complex; typedef struct { doublereal r, i; } doublecomplex; typedef long int logical; typedef short int shortlogical; #define TRUE_ (1) #define FALSE_ (0) /* Extern is for use with -E */ #ifndef Extern #define Extern extern #endif /* I/O stuff */ #ifdef f2c_i2 /* for -i2 */ typedef short flag; typedef short ftnlen; typedef short ftnint; #else typedef long flag; typedef long ftnlen; typedef long ftnint; #endif /*external read, write*/ typedef struct { flag cierr; ftnint ciunit; flag ciend; char *cifmt; ftnint cirec; } cilist; /*internal read, write*/ typedef struct { flag icierr; char *iciunit; flag iciend; char *icifmt; ftnint icirlen; ftnint icirnum; } icilist; /*open*/ typedef struct { flag oerr; ftnint ounit; char *ofnm; ftnlen ofnmlen; char *osta; char *oacc; char *ofm; ftnint orl; char *oblnk; } olist; /*close*/ typedef struct { flag cerr; ftnint cunit; char *csta; } cllist; /*rewind, backspace, endfile*/ typedef struct { flag aerr; ftnint aunit; } alist; /* inquire */ typedef struct { flag inerr; ftnint inunit; char *infile; ftnlen infilen; ftnint *inex; /*parameters in standard's order*/ ftnint *inopen; ftnint *innum; ftnint *innamed; char *inname; ftnlen innamlen; char *inacc; ftnlen inacclen; char *inseq; ftnlen inseqlen; char *indir; ftnlen indirlen; char *infmt; ftnlen infmtlen; char *inform; ftnint informlen; char *inunf; ftnlen inunflen; ftnint *inrecl; ftnint *innrec; char *inblank; ftnlen inblanklen; } inlist; #define VOID void union Multitype { /* for multiple entry points */ shortint h; integer i; real r; doublereal d; complex c; doublecomplex z; }; typedef union Multitype Multitype; typedef long Long; struct Vardesc { /* for Namelist */ char *name; char *addr; Long *dims; int type; }; typedef struct Vardesc Vardesc; struct Namelist { char *name; Vardesc **vars; int nvars; }; typedef struct Namelist Namelist; #ifdef MAC #undef abs #endif #define abs(x) ((x) >= 0 ? (x) : -(x)) #define dabs(x) (doublereal)abs(x) #define min(a,b) ((a) <= (b) ? (a) : (b)) #define max(a,b) ((a) >= (b) ? (a) : (b)) #define dmin(a,b) (doublereal)min(a,b) #define dmax(a,b) (doublereal)max(a,b) /* procedure parameter types for -A and -C++ */ #define F2C_proc_par_types 1 #ifdef __cplusplus typedef int /* Unknown procedure type */ (*U_fp)(...); typedef shortint (*J_fp)(...); typedef integer (*I_fp)(...); typedef real (*R_fp)(...); typedef doublereal (*D_fp)(...), (*E_fp)(...); typedef /* Complex */ VOID (*C_fp)(...); typedef /* Double Complex */ VOID (*Z_fp)(...); typedef logical (*L_fp)(...); typedef shortlogical (*K_fp)(...); typedef /* Character */ VOID (*H_fp)(...); typedef /* Subroutine */ int (*S_fp)(...); #else typedef int /* Unknown procedure type */ (*U_fp)(); typedef shortint (*J_fp)(); typedef integer (*I_fp)(); typedef real (*R_fp)(); typedef doublereal (*D_fp)(), (*E_fp)(); typedef /* Complex */ VOID (*C_fp)(); typedef /* Double Complex */ VOID (*Z_fp)(); typedef logical (*L_fp)(); typedef shortlogical (*K_fp)(); typedef /* Character */ VOID (*H_fp)(); typedef /* Subroutine */ int (*S_fp)(); #endif /* E_fp is for real functions when -R is not specified */ typedef VOID C_f; /* complex function */ typedef VOID H_f; /* character function */ typedef VOID Z_f; /* double complex function */ typedef doublereal E_f; /* real function with -R not specified */ /* undef any lower-case symbols that your C compiler predefines, e.g.: */ #ifndef Skip_f2c_Undefs #undef cray #undef gcos #undef mc68010 #undef mc68020 #undef mips #undef pdp11 #undef sgi #undef sparc #undef sun #undef sun2 #undef sun3 #undef sun4 #undef u370 #undef u3b #undef u3b2 #undef u3b5 #undef unix #undef vax #endif #endif neuron-7.5/src/scopmath/f2cmisc.c000077500000000000000000000021551323325274500170060ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: f2cmisc.c * * Copyright (c) 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "f2cmisc.c,v 1.1.1.1 1994/10/12 17:22:20 hines Exp" ; #endif /* Three functions are used by lsoda which are apparently from the f77 library. These are: double d_sign(&this,&that) this and that are doublereal double pow_dd(&this,&that) this and that are doublereal double pow_di(&this,&that) this is doublereal and that is int double sqrt(doublereal) Looks directly compatible with C sqrt */ #include double d_sign(input, sign) double input[1], sign[1]; { if (*sign >= 0. && *input >= 0.) return(*input); if (*sign <= 0. && *input <= 0.) return(*input); return(-(*input)); } double pow_dd(mantissa, exponent) double mantissa[1], exponent[1]; { return(pow(*mantissa, *exponent)); } double pow_di(mantissa, exponent) double mantissa[1]; int exponent[1]; { return(pow(*mantissa, (double) *exponent)); } neuron-7.5/src/scopmath/factoria.c000077500000000000000000000031311323325274500172430ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: factorial.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "factoria.c,v 1.2 1997/08/30 14:32:05 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: factorial() */ /* */ /* Calculates the factorial of an integer argument */ /* */ /* Calling sequence: factorial(n) */ /* */ /* Arguments */ /* Input: n, double number whose factorial is */ /* desired */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: none */ /* */ /* Returns: double precision value of the factorial. If the */ /* argument of the function is negative, function */ /* returns -1 as an error code. */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #include "errcodes.h" double factorial(n) double n; { #define two_pi 6.28318530 int i; double x, value; #ifndef MAC extern double exp(), pow(), sqrt(); #endif x = (int) (n + 0.1); if (x < 0) abort_run(NEG_ARG); if (x < 2) value = 1.0; else if (x < 20) { value = 1.0; for (i = n; i > 1; i--) value = value * i; } else { /* Use Stirling's approximation */ value = exp(-x) * pow(x, x) * sqrt(two_pi * x); } return (value); } neuron-7.5/src/scopmath/force.c000077500000000000000000000234331323325274500165600ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: force.c * * Copyright (c) 1987-1990 * Duke University * * This file contains the following routines, plus supporting routines: * force Reads file of data points and does spline interpolation * stepforce Like force, except it does not interpolate and returns * the y value for the next lowest x. * ******************************************************************************/ #ifndef LINT static char RCSid[] = "force.c,v 1.2 1997/08/30 14:32:06 hines Exp" ; #endif #include #include #include #include #include "errcodes.h" typedef struct Spline { struct Spline *next; /* link to next spline in list */ char *name; /* filename where spline came from */ int npts; /* number of base points in spline */ double *x; /* x-values of base points */ double *y; /* y-values of base points */ double *width; /* interval widths */ double *der; /* 2nd derivatives at base points */ } Spline; #define SP0 (Spline *)0 static Spline *splist = SP0; /* list of splines */ static Spline *steplist = SP0; /* list of steps */ static Spline *lastspline = SP0;/* the spline used on previous call */ static Spline *laststep = SP0;/* the step list used on previous call */ extern int DEFLT; /************************************************************************** * Abstract force() * * Reads a file containing the coordinates of a forcing function in * reference data file format; calls derivs() to evaluate the spacings * of the base points and the second derivatives at the interior base * points; calls spline to perform the interpolation. * * Returns: double precision value of interpolated spline function * * Calling sequence: force(t, filename) * * Arguments: * t, double, value of test variable at which interpoated value of forcing function is desired * filename, string, name of file containing coordinates of * forcing function * * Functions called: init_force(), getspline(), derivs() , spline() * * Files accessed: * **************************************************************************/ static int init_force(); double force(t, filename) double t; char *filename; { extern double spline(); Spline *sp; extern int _modl_cleanup(); /* Check if Spline structure already made */ for (sp = splist; sp; sp = sp->next) { if (strcmp(filename, sp->name) == 0) break; } if (sp == NULL) /* Read file and create Spline structure */ init_force(filename); else lastspline = sp; /* Check if interpolation point is outside range of base points */ if (t < lastspline->x[0]) /* Below 1st base point ?*/ { if ((lastspline->x[0] - t) > (0.1 * lastspline->width[0])) /* Low by more than 10% of the 1st interval? */ abort_run(RANGE); /* Yes, abort with error message. */ else /* No, do linear extrapolation */ { return(lastspline->y[0] - (lastspline->x[0] - t) * (lastspline->y[1] - lastspline->y[0]) / lastspline->width[0]); } } else if (t > lastspline->x[lastspline->npts-1]) /* Above last base point? */ { if ((t - lastspline->x[lastspline->npts-1]) > (0.1 * lastspline->width[lastspline->npts-2])) /* High by more than 10% of the last interval? */ abort_run(RANGE); /* Yes, abort with error message. */ else { int n; /* No, do linear interpolation. */ n = lastspline->npts; return(lastspline->y[n-1] + (t - lastspline->x[n-1]) * (lastspline->y[n-1] - lastspline->y[n-2]) / lastspline->width[n-2]); } } /* Within range; perform spline interpolation */ return (spline(lastspline->npts, lastspline->x, lastspline->y, lastspline->width, lastspline->der, t)); } /************************************************************************** * Abstract stepforce() * * Reads a file containing the coordinates of a forcing function in * reference data file format * * Returns: double precision value of function, the data value for * x <= t (without interpolation). * * Calling sequence: stepforce(t, filename, reset_integ, old_value) * * Arguments: * reset_integ, int *, flag output - set to 1 when a discontinuity * occurs * old_value, double *, storage for the last value produced by this * function; used for detecting discontinuities * t, double, value of test variable at which interpoated value * of forcing function is desired * filename, string, name of file containing coordinates of * forcing function * * Functions called: init_force(), getspline(), lookup() * * Files accessed: * **************************************************************************/ double stepforce(reset_integ, old_value, t, filename) double t, *old_value; char *filename; int *reset_integ; { double lookup(), return_val; Spline *sp; static int initialized = 0; extern int _ninits, _modl_cleanup(); /* Check if Spline structure already made */ /* Note: this function uses the Spline structure for storing */ /* data points, even though there is no interpolation. */ for (sp = splist; sp; sp = sp->next) { if (strcmp(filename, sp->name) == 0) break; } if (sp == NULL) /* Read file and create Spline structure */ init_force(filename); else lastspline = sp; /* Check if starting a new run */ if (initialized < _ninits) { initialized = _ninits; *old_value = 0.; } /* Check if interpolation point is outside range of base points */ if (t < (lastspline->x[0] - 0.1 * lastspline->width[0])) /* Below lower limit: Print message and return to main menu */ abort_run(RANGE); else if (t <= (lastspline->x[lastspline->npts-1] + 0.1 * lastspline->width[lastspline->npts - 2])) /* Within tolerance; use point at or below current t value */ { int i; for (i = 0; i <= (lastspline->npts - 2); ++i) if (t < lastspline->x[i+1]) break; return_val = lastspline->y[i]; if (return_val != *old_value) *reset_integ = 1; *old_value = return_val; return(return_val); } else /* Above upper limit; Print message and return to main menu */ abort_run(RANGE); return 0; } /*--------------------------------------------------------------------------- * init_force() * * Reads data file and fills Spline structure * * Calling sequence: init_force(filename) * * Argument: filename char* name of file of forcing function values * * Returns: * * Functions called: fopen(), rewind(), fclose(), fgets(), gets(), puts(), * derivs(), getspline(), abort_run() * * Files accessed: filename (input) *-------------------------------------------------------------------------*/ static int init_force(filename) char *filename; { FILE *fopen(), *pfile; extern char *fgets(), *gets(); char tmpstr[81]; int n, i, j = 0, jmove, error; float tempx, tempy; extern int derivs(), abort_run(); Spline *newspline, *getspline(); if ((pfile = fopen(filename, "r")) != NULL) { /* Count number of base points in data file */ for (n = -6; fgets(tmpstr, 81, pfile) != NULL; ++n); rewind(pfile); /* Create new Spline structure and link to existing ones */ newspline = getspline(filename, n); if (splist == NULL) splist = newspline; else lastspline->next = newspline; /* Make new spline the default spline */ lastspline = newspline; /* Skip first 6 lines of file */ for (i = 0; i < 6; ++i) assert(fgets(tmpstr, 81, pfile)); /* Read coordinates of forcing function */ while (fscanf(pfile, "%e %e", &tempx, &tempy) != EOF) { lastspline->x[j] = tempx; lastspline->y[j++] = tempy; } /* Sort base points in ascending order of x values */ for (j = 1; j < n; j++) { jmove = j; for (i = j - 1; i >= 0; i--) if (lastspline->x[i] > lastspline->x[j]) jmove = i; if (jmove == j) continue; tempx = lastspline->x[j]; tempy = lastspline->y[j]; /* Ripple base points with larger x values one location higher */ for (i = j; i > jmove; i--) { lastspline->x[i] = lastspline->x[i - 1]; lastspline->y[i] = lastspline->y[i - 1]; } /* Move current base point to proper location */ lastspline->x[i] = tempx; lastspline->y[i] = tempy; } /* Calculate spacings of base points and second derivatives */ fclose(pfile); if ((error = derivs(lastspline->npts, lastspline->x, lastspline->y, lastspline->width, lastspline->der)) != SUCCESS) { abort_run(error); } } else /* Forcing function file not found */ abort_run(NOFORCE); return 0; } /*--------------------------------------------------------------------------- * getspline() * * Allocates memory for Spline structure and loads in data * * Calling sequence: getspline(filename, ipt) * * Arguments: * filename char* name of forcing function file * ipt int number of data points in forcing function * * Returns: pointer to allocated Spline structure * * Functions called: malloc(), gets(), makevector(), strcpy(), abort_run() * * Files accessed: *-------------------------------------------------------------------------*/ Spline * getspline(filename, ipt) char *filename; int ipt; { #if 0 && !defined(MAC) extern char *strcpy(), *gets(); #endif extern int abort_run(); extern double *makevector(); Spline *newspline; /* Allocate memory for Spline structure */ if ((newspline = (Spline *) malloc((unsigned) sizeof(Spline))) == NULL) abort_run(LOWMEM); newspline->next = SP0; newspline->name = malloc((unsigned) strlen(filename) + 1); strcpy(newspline->name, filename); newspline->npts = ipt; newspline->x = makevector(ipt); newspline->y = makevector(ipt); newspline->width = makevector(ipt); newspline->der = makevector(ipt); return (newspline); } neuron-7.5/src/scopmath/gauss.c000077500000000000000000000030051323325274500165750ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: gauss.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "gauss.c,v 1.2 1997/08/30 14:32:06 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: gauss() */ /* */ /* Computes the value of a Gaussian probability density */ /* function at a particular x value given the mean and */ /* standard deviation */ /* */ /* Returns: Double precision value of the probability */ /* */ /* Calling sequence: gauss(x, mean, stddev) */ /* */ /* Arguments */ /* Input: x, double the independent variable */ /* */ /* mean, double mean of the distribution */ /* */ /* stddev, double standard deviation of the */ /* distribution */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double gauss(x, mean, stddev) double x, mean, stddev; { #define two_pi 6.28318530 double temp, value; #ifndef MAC extern double exp(), pow(), sqrt(); #endif temp = exp(-0.5 * pow((x - mean) / stddev, 2.)); value = temp / (sqrt(two_pi) * stddev); return (value); } neuron-7.5/src/scopmath/gear.c000077500000000000000000000402001323325274500163670ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: gear.c * * Copyright (c) 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "gear.c,v 1.4 1999/01/04 12:46:47 hines Exp"; #endif /*-------------------------------------------------------------- * * Abstract: gear * * Solves simultaneous differential equations using the stiffly * stable gear algorithm with time step adjustment. For an * explanation of the algorithm see L. O. Chua & P.-M. Lin, * "Computer Aided Analysis of Electronic Circuits," Prentice- * Hall, 1975, pp. 496--506, 524--534. * * Returns: int error code * * Calling sequence: gear(n, y, d, p, t, dt, dy, work, maxerror) * * Arguments * Input: n, int, number of differential equations * * y, pointer to array of addresses of the state * variables * * d, pointer to array of addresses of the derivatives * of the state variables * * p, double precision variable array * * t, pointer to current time * * dt, double, integration interval * * dy, name of function which evaluates the time * derivatives of the dependent variables * * *work, pointer to double precision work array * * maxerror, double, maximum single-step truncation * error * * Output: *y[], *d[], p[], double precision arrays containing * the values of the dependent variables and their * derivatives at t + dt. * * * Functions called: (*dy) * *--------------------------------------------------------------*/ #include #include #include #include "errcodes.h" #if MAC #define h mlhh #endif static int good_order, good_steps, jac_iters, order, *perm; int error_code; static double **Nord, **jacobian, h, *diff, *corr_fn, b[6] = {1., 2. / 3., 6. / 11., 12. / 25., 60. / 137., 60. / 147.}, coeff[6][7] = { {1., 1., 0., 0., 0., 0., 0.}, {2. / 3., 1., 1. / 3., 0., 0., 0., 0.}, {6. / 11., 1., 6. / 11., 1. / 11., 0., 0., 0.}, {24. / 50., 1., 35. / 50., 10. / 50., 1. / 50., 0., 0.}, {120. / 274., 1., 225. / 274., 85. / 274., 15. / 274., 1. / 274., 0.}, {720. / 1764., 1., 1624. / 1764., 735. / 1764., 175. / 1764., 21. / 1764., 1. / 1764.}, }, err_coeff[6] = {0.5, 4. / 9., 18. / 22., 288. / 125., 1200. / 137., 43200. / 1029.}; int gear(_ninits, n, y, d, p, t, dt, dy, work, maxerror) int _ninits, n, (*dy) (); double p[], *t, dt, **work, maxerror; int y[]; int d[]; #define d_(arg) p[d[arg]] #define y_(arg) p[y[arg]] { static int initialized = 0; int i, init_gear(), prep_jac(), predictor(), corrector(), interpolate(), change_order(), change_h(); double told, tend; told = *t; /* Store original value of independent * variable */ tend = *t + dt; /* Calculate next breakpoint value */ if (initialized != _ninits) { if ((error_code = init_gear(n, work, y, dy, p, d, tend, maxerror)) != SUCCESS) return (error_code); initialized = _ninits; } while (*t < tend && error_code == SUCCESS) if (*t + h >= tend) { interpolate(n, p, y, *t, tend); *t = tend; } else { /* Take generic step */ *t += h; predictor(n, *work); if ((error_code = corrector(n, y, d, p, dy, t, tend, maxerror, *work)) == SUCCESS) { /* Update state variables */ for (i = 0; i < n; i++) y_(i) = Nord[i][0]; /* * Increase order, calculate optimal integration step size, * and/or re-evaluate jacobian if appropriate number of * successful steps have been taken. */ if (++good_order >= MAX_GOOD_ORDER && order < MAXORDER) { change_order(1, n, *work); if (++good_steps >= order) error_code = change_h(1, n, maxerror, *work); } else if (++good_steps >= MAX_GOOD_STEPS) error_code = change_h(0, n, maxerror, *work); if (error_code == SUCCESS) if (++jac_iters >= MAX_JAC_ITERS) error_code = prep_jac(n, y, d, p, dy); } /* end of successful corrector section */ } /* end of integration step calculation */ /* Restore original value of t; it is updated in model() */ *t = told; return (error_code); } /*-------------------------------------------------------------- * * init_gear: initialize the gear algorithm when first starting * a simulation run, when the corrector iteration diverged, or * when a RESET command was issued. * *--------------------------------------------------------------*/ int init_gear(n, work, y, dy, p, d, tend, maxerror) int n, (*dy) (); double **work, p[], tend, maxerror; int y[]; int d[]; { extern double **makematrix(), *makevector(); int i, prep_jac(); double temp, max_y, max_der; if (*work == NULL) { /* * Required workspace is 7*n to store the n 7-dimensional Nordsieck * vectors prior to the current step and 2*n to store the backward * differences used in calculating the optimal step size. * * The Nord[n][7] matrix is packed into work by rows, followed by the n * backward differences at the start start of the integration step, * followed by the n backward differences at the end of the * integration step. */ *work = makevector(9 * n); /* Allocate arrays for gear algorithm. */ Nord = makematrix(n, 7); jacobian = makematrix(n, n); diff = makevector(n); corr_fn = makevector(n); if ((perm = (int *) calloc((unsigned) n, (unsigned) sizeof(int))) == NULL) error_code = LOWMEM; if (error_code != SUCCESS) return (error_code); } (*dy) (p); /* Calculate derivatives d_(i) */ /* Calculate initial step size */ max_y = max_der = 0.0; for (i = 0; i < n; i++) { if ((temp = fabs(y_(i))) > max_y) max_y = temp; if ((temp = fabs(d_(i))) > max_der) max_der = temp; } h = maxerror / ((temp = max_y / tend) > max_der ? temp : max_der); if (h <= ROUNDOFF) h = maxerror * tend; /* Initialize Nordsieck vectors and backwards differences */ for (i = 0; i < n; i++) { Nord[i][0] = y_(i); Nord[i][1] = d_(i) * h; (*work)[8 * n + i] = 0.0; } order = 1; good_steps = 0; good_order = 0; /* Calculate jacobian and triangularize */ error_code = prep_jac(n, y, d, p, dy); return (error_code); } /*-------------------------------------------------------------- * * prep_jac: calculate jacobian matrix, transform it into the * matrix I - b*h*J, and triangularize. * *--------------------------------------------------------------*/ int prep_jac(n, y, d, p, dy) int n, (*dy) (); double p[]; int y[]; int d[]; { extern int buildjacobian(), crout(); int i, j; double a; buildjacobian(n, y, p, dy, d, jacobian); a = -b[order - 1] * h; for (i = 0; i < n; i++) { for (j = 0; j < n; j++) jacobian[i][j] *= a; jacobian[i][i] += 1.0; } error_code = crout(n, jacobian, perm); jac_iters = 0; return (error_code); } /*-------------------------------------------------------------- * * predictor: project Nordsieck vectors to t + h by multiplying * by the Pascal triangle. * *--------------------------------------------------------------*/ int predictor(n, work) int n; double *work; { int i, j, k; /* Store current Nordsieck vectors and backwards differences */ for (i = 0; i < n; i++) { work[7 * n + i] = work[8 * n + i]; for (j = 0; j <= order; j++) work[7 * i + j] = Nord[i][j]; } /* * Multiply Nordsieck vectors by Pascal triangle to extrapolate to next * step's values. Note that highest order term is unchanged. */ for (i = 0; i < n; i++) for (j = 1; j <= order; j++) for (k = order - 1; k >= j - 1; k--) Nord[i][k] += Nord[i][k + 1]; return 0; } /*-------------------------------------------------------------- * * corrector: solve for corrector function vector by Gaussian * elimination until test for convergence is satisfied. * *--------------------------------------------------------------*/ int corrector(n, y, d, p, dy, t, tend, maxerror, work) int n, (*dy) (); double p[], *t, tend, maxerror, *work; int y[]; int d[]; { int i, j, terms, failures = 0, conv = NO_SOLN, conv_test(), retry_step(), init_gear(); double temp, norm, trunc_err; extern int solve(); while (conv == NO_SOLN) { terms = 0; do { /* Update state variables and calculate derivatives */ for (i = 0; i < n; i++) y_(i) = Nord[i][0]; (*dy) (p); /* * Calculate difference vector, and solve the linear equation * jacobian * corr_fn = diff for the corrector function vector. */ for (i = 0; i < n; i++) diff[i] = d_(i) * h - Nord[i][1]; solve(n, jacobian, diff, perm, corr_fn, (int *)0); /* Accumulate corrector terms */ for (i = 0; i < n; i++) for (j = 0; j <= order; j++) Nord[i][j] += corr_fn[i] * coeff[order - 1][j]; } while ((conv = conv_test(n, ++terms, maxerror)) == NO_SOLN); switch (conv) { case EXCEED_ITERS: /* * Corrector failed to converge in maximum iterations; reduce * order and step size and try again */ if (++failures < MAXFAIL) { if ((error_code = retry_step(n, t, y, d, p, dy, maxerror, work)) == SUCCESS) conv = NO_SOLN; } else error_code = EXCEED_ITERS; break; case DIVERGED: /* * Corrector diverged; reduce order and step size and try * again */ if (++failures < MAXFAIL) { if ((error_code = retry_step(n, t, y, d, p, dy, maxerror, work)) == SUCCESS) conv = NO_SOLN; } else error_code = DIVERGED; break; case SUCCESS: /* Calculate local truncation error */ for (norm = 0.0, i = 0; i < n; i++) { /* * Calculate backwards differences of highest order * elements of Nordsieck vectors */ temp = work[8 * n + i] = Nord[i][order] - work[7 * i + order]; norm += temp * temp; } norm = sqrt(norm / (double) n); trunc_err = err_coeff[order - 1] * norm; /* Reduce order to 1 if truncation error exceeds maxerror */ if (trunc_err > maxerror) { if (++failures < MAXFAIL) { /* * Retrieve values of state variables at start of * step */ for (i = 0; i < n; i++) y_(i) = work[7 * i]; if ((error_code = init_gear(n, &work, y, dy, p, d, tend, maxerror)) == SUCCESS) { predictor(n, work); conv = NO_SOLN; } } else error_code = CORR_FAIL; } } /* end of convergence test */ } /* end of corrector loop */ return (error_code); } /*-------------------------------------------------------------- * * conv_test: test for convergence of corrector iteration and * return status code. * *--------------------------------------------------------------*/ int conv_test(n, iter, maxerror) int n, iter; double maxerror; { int i; double temp, norm, pred_trunc_err; static double old_norm, conv_rate; /* Calculate norm of corr_fn and convergence rate */ if (iter == 1) { conv_rate = 0.7; old_norm = 1.0; } for (norm = 0.0, i = 0; i < n; i++) { temp = corr_fn[i]; norm += temp * temp; } norm = sqrt(norm / (double) n); conv_rate = (conv_rate *= 0.2) < (temp = norm / old_norm) ? temp : conv_rate; if (iter == 1) { old_norm = norm; return (NO_SOLN); } /* * Compute predicted value of the local truncation error on the next * iteration of the corrector and return status code */ pred_trunc_err = (temp = 1.5 * conv_rate) > 1.0 ? 1.0 : temp; pred_trunc_err *= 2.0 * norm * err_coeff[order - 1]; if (pred_trunc_err <= maxerror) /* Convergence achieved */ return (SUCCESS); else if (norm > 2.0 * old_norm) /* Corrector iteration diverged */ return (DIVERGED); else if (iter >= MAXTERMS) /* Exceeded maximum number of corrector * iterations */ return (EXCEED_ITERS); /* Solution not yet obtained; continue corrector iteration */ old_norm = norm; /* Save current norm for next iteration */ return (NO_SOLN); } /*-------------------------------------------------------------- * * interpolate: find state variables at next breakpoint by * interpolation of polynomial approximation given by the * power series in the Nordsieck vector. * *--------------------------------------------------------------*/ int interpolate(n, p, y, t, tend) int n; double *p, t, tend; int y[]; { int i, j; double s; s = (tend - t) / h; for (i = 0; i < n; i++) { y_(i) = 0.0; for (j = order; j >= 0; j--) y_(i) = Nord[i][j] + s * (y_(i)); } return 0; } /*-------------------------------------------------------------- * * retry_step: retreat to the last prediction, recompute the * jacobian, change order if necessary, and compute step size. * *--------------------------------------------------------------*/ int retry_step(n, t, y, d, p, dy, maxerror, work) int n, (*dy) (); double *t, p[], maxerror, *work; int y[]; int d[]; { int i, j, incr = 0, change_order(), change_h(), prep_jac(), predictor(); /* * Restore original values of state variables, Nordsieck vectors, and * backwards differences */ for (i = 0; i < n; i++) { y_(i) = work[7 * i]; work[8 * n + i] = work[7 * n + i]; for (j = 0; j <= order; j++) Nord[i][j] = work[7 * i + j]; } /* Reduce integration order and compute new step size */ if (order > 1) { change_order(-1, n, work); incr = -1; } *t -= h; if ((error_code = change_h(incr, n, maxerror, work)) == SUCCESS) { *t += h; /* Update jacobian matrix */ if (jac_iters > 0) error_code = prep_jac(n, y, d, p, dy); } if (error_code == SUCCESS) predictor(n, work); return (error_code); } /*-------------------------------------------------------------- * * change_order: increase or decrease integration order by one; * calculate next highest order terms of Nordsieck vectors if * if increasing order * *--------------------------------------------------------------*/ int change_order(incr, n, work) int incr, n; double *work; { int i; switch (incr) { case 1: /* Increase order by one */ /* Calculate next higher order elements of Nordsieck vectors */ order++; for (i = 0; i < n; i++) Nord[i][order] = work[8 * n + i] / (double) (order); break; case -1: /* Decrease order by one */ order--; break; } good_order = 0; return 0; } /*-------------------------------------------------------------- * * change_h: calculate optimal integration step size for current * order of gear integrator * *--------------------------------------------------------------*/ int change_h(incr, n, maxerror, work) int incr, n; double maxerror, *work; { int i, j, old_order; double temp, norm = 0.0, alpha=0.0, r = 1.0; switch (incr) { case 0: /* Order not changed */ /* Calculate norm of 1st backward differences */ for (i = 0; i < n; i++) { temp = work[8 * n + i]; norm += temp * temp; } norm = sqrt(norm / (double) n); alpha = maxerror / (err_coeff[order - 1] * norm); alpha = pow(alpha, 1. / (double) (order + 1)) / 1.2; break; case -1: /* Order was reduced */ old_order = order + 1; /* Compute norm of highest order terms of Nordsieck vectors */ for (i = 0; i < n; i++) { temp = Nord[i][old_order]; norm += temp * temp; } norm = sqrt(norm / (double) n); alpha = maxerror / ((double) old_order * err_coeff[old_order - 2] * norm); alpha = pow(alpha, 1. / (double) old_order) / 1.3; break; case 1: /* Order was increased */ old_order = order - 1; /* Calculate norm of 2nd backward differences */ for (i = 0; i < n; i++) { temp = work[8 * n + i] - work[7 * n + i]; norm += temp * temp; } norm = sqrt(norm / (double) n); alpha = (double) order *maxerror / (err_coeff[old_order] * norm); alpha = pow(alpha, 1. / (double) (order + 1)) / 1.4; } if ((h *= alpha) <= ROUNDOFF) return (PRECISION); /* Update Nordsieck vectors */ for (j = 1; j <= order; j++) { r *= alpha; for (i = 0; i < n; i++) Nord[i][j] *= r; } good_steps = 0; return (SUCCESS); } neuron-7.5/src/scopmath/getmem.c000077500000000000000000000043651323325274500167430ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: getmem.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "getmem.c,v 1.2 1997/08/30 14:32:09 hines Exp" ; #endif /****************************************************************/ /* */ /* This file contains routines to allocate and free memory */ /* from the heap for vectors and matrices used by SCoP numeri- */ /* cal methods routines. */ /* */ /****************************************************************/ #include #include #include "errcodes.h" double * makevector(nrows) int nrows; { double *vector; vector = (double *) malloc((unsigned) (nrows * sizeof(double))); if (vector == NULL) abort_run(LOWMEM); else return (vector); return (double*)0; } int freevector(vector) double *vector; { if (vector != NULL) free((char *) vector); return 0; } double ** makematrix(nrows, ncols) int nrows, ncols; { int i; double **matrix; matrix = (double **) malloc((unsigned) (nrows * sizeof(double *))); if (matrix == NULL) abort_run(LOWMEM); *matrix = (double *) malloc((unsigned) (nrows * ncols * sizeof(double))); if (*matrix == NULL) abort_run(LOWMEM); for (i = 1; i < nrows; i++) matrix[i] = matrix[i - 1] + ncols; return (matrix); } int freematrix(matrix) double **matrix; { if (matrix != NULL) { free((char *) *matrix); free((char *) matrix); } return 0; } /********************************************************** * * Routines for setting "malloced" array elements to 0.0 * *********************************************************/ int zero_matrix(matrix, rows, cols) double *matrix[]; int rows, cols; { int i, j; for (i = 0; i < rows; i++) for (j = 0; j < cols; j++) matrix[i][j] = 0.0; return 0; } int zero_vector(vector, n) double vector[]; int n; { int i; for (i = 0; i < n; i++) vector[i] = 0.0; return 0; } int zero_ptrvector(ptrvector, n) double *ptrvector[]; int n; { int i; for (i = 0; i < n; i++) *ptrvector[i] = 0.0; return 0; } neuron-7.5/src/scopmath/harmonic.c000077500000000000000000000030451323325274500172570ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: harmonic.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "harmonic.c,v 1.1.1.1 1994/10/12 17:22:21 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: harmonic() */ /* */ /* Generates a sine wave of specified period, amplitude, and */ /* offset */ /* */ /* Returns: Double precision value of the harmonic function */ /* */ /* Calling sequence: harmonic(t, period, amplitude, offset) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* period, double length of each cycle in same */ /* units as t */ /* */ /* amplitude, double */ /* positive amplitude of wave */ /* */ /* offset, double shift of waveform in same units */ /* as t */ /* */ /* Output: arguments unchanged */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #define TWO_PI 6.2831853 double harmonic(t, period, amplitude, offset) double t, period, amplitude, offset; { double value; extern double sin(); value = amplitude * sin(TWO_PI / period * (t + offset)); return (value); } neuron-7.5/src/scopmath/heun.c000077500000000000000000000110071323325274500164130ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: heun.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "heun.c,v 1.1.1.1 1994/10/12 17:22:21 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: heun() */ /* */ /* Predictor-corrector (modified Euler-Heun) integration */ /* subroutine for a set of first-order ordinary differential */ /* equations. */ /* */ /* Calling sequence: */ /* heun(neqn, var, der, p, t, dt, func, work) */ /* */ /* Returns: int error code (always SUCCESS for ;heun) */ /* */ /* Arguments: */ /* Input: neqn, int, number of equations */ /* */ /* var, pointer to array of addresses of the */ /* state variables */ /* */ /* der, pointer to array of addresses of the */ /* derivatives of the state variables */ /* */ /* p, double precision variable array */ /* */ /* t, pointer to current time */ /* */ /* dt, double, integration stepsize */ /* */ /* func, name of function which evaluates the */ /* time derivatives of the dependent */ /* variables */ /* */ /* *work, pointer to double precision work array */ /* */ /* Output: time, the dependent variables, and the time */ /* derivatives of the dependent variables */ /* are updated */ /* */ /* Functions called: derivative function (named in call) must */ /* be supplied by user; call is func(p) */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #include "errcodes.h" int heun(_ninits, neqn, var, der, p, t, dt, func, work) int _ninits; double p[], *t, dt, **work; int var[]; int der[]; #define der_(arg) p[der[arg]] #define var_(arg) p[var[arg]] int neqn, (*func) (); { static int _reset; int i, n2; double temp; extern double *makevector(); if (*work == (double *) 0) *work = makevector(3 * neqn); n2 = neqn << 1; (*func) (p); /* Get derivatives at current time point */ for (i = 0; i < neqn; i++) { /* Save current values of the derivatives and dependent variables */ (*work)[i] = der_(i); (*work)[neqn + i] = var_(i); } if (_reset) { /* If first integration step, use Euler method as predictor */ for (i = 0; i < neqn; i++) var_(i) += dt * (der_(i)); _reset = 0; } else /* Else use midpoint rule as predictor */ for (i = 0; i < neqn; i++) var_(i) = (*work)[n2 + i] + 2. * dt * (der_(i)); *t += dt; (*func) (p); /* Get derivatives at new time point */ for (i = 0; i < neqn; i++) { /* use Heun's rule for corrector */ temp = (*work)[neqn + i] + (dt / 2.) * ((*work)[i] + (der_(i))); /* * Reduce truncation error by taking weighted average of predicted * and corrected values */ var_(i) = 0.8 * temp + 0.2 * (var_(i)); /* * Save variable values at start of integration step for next * application of midpoint rule */ (*work)[n2 + i] = (*work)[neqn + i]; } /* Restore original value of t -- updated in model() */ *t -= dt; return (SUCCESS); } neuron-7.5/src/scopmath/hyperbol.c000077500000000000000000000025311323325274500173020ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: hyperbol.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "hyperbol.c,v 1.1.1.1 1994/10/12 17:22:21 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: hyperbol() */ /* */ /* Calculates the value of an hyperbolic function given the */ /* values of two constant parameters. */ /* */ /* Returns: Double precision value of the hyperbolic function */ /* */ /* Calling sequence: hyperbol(x, max, K) */ /* */ /* Arguments */ /* Input: x, double the independent variable */ /* */ /* max, double maximum value of the hyperbolic */ /* function */ /* */ /* K, double value of x for which the */ /* function value is max/2 */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double hyperbol(x, max, K) double x, max, K; { double value; value = (max * x) / (x + K); return (value); } neuron-7.5/src/scopmath/invert.c000077500000000000000000000112751323325274500167720ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: invert.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "invert.c,v 1.3 1999/01/04 12:46:47 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: invert(); */ /* */ /* Inverts a matrix by Gaussian elimination with partial */ /* pivoting (row interchange only). The zeroth row and */ /* column elements of the matrix are not used. The routine */ /* replaces the matrix by its inverse. The indices for the */ /* pivot rows are stored in the vector perm[]; perm[i] is the */ /* index of the row to be used as the ith row of the matrix. */ /* If the magnitude of a pivot element < ROUNDOFF, currently */ /* set to 1.e-20, the matrix is considered singular or ill- */ /* conditioned and the algorithm terminates. */ /* */ /* Returns: 0 if no error; 2 if matrix is singular or ill- */ /* conditioned */ /* */ /* Calling sequence: invert(n, matrix); */ /* */ /* Arguments: */ /* Input: matrix[n][n], double, matrix to be inverted */ /* n, int, # of equations */ /* Output: matrix[n][n], double, inverse matrix */ /* */ /* Functions called: makematrix(), freematrix() */ /* */ /* Files Accessed: none */ /* */ /****************************************************************/ #include #include #include "errcodes.h" int invert(n, matrix) int n; double *matrix[]; { extern int freematrix(); extern double **makematrix(); int ipivot, isave=0, jrow, krow, kcol, i, j, *perm; double **soln; /* Create and initialize solution matrix and permutation vector */ soln = makematrix(n, n); perm = (int *) malloc((unsigned) (n * sizeof(int))); for (i = 0; i < n; i++) { perm[i] = i; for (j = i; j < n; j++) if (i == j) soln[i][j] = 1.0; else soln[i][j] = soln[j][i] = 0.0; } /* * The following loop is performed once for each row and implicitly * reduces the diagonal element to 1 and all elements below it to 0. To * save arithmetic operations, elements of the coefficient matrix which * will not later be used are not operated on (i.e., only values to the * right of the diagonal in a row are modified by the algorithm). */ for (j = 0; j < n; j++) { /* * First, find pivot row (i.e., row of the lower triangle which, when * transposed into the jth position, will put the largest column * element on the diagonal. Store pivot index in perm[]. */ ipivot = perm[j]; for (i = j + 1; i < n; i++) { jrow = perm[i]; if (fabs(matrix[ipivot][j]) < fabs(matrix[jrow][j])) { ipivot = jrow; isave = i; } } /* Now be sure the pivot found isn't too small */ if (fabs(matrix[ipivot][j]) < ROUNDOFF) return (SINGULAR); /* Swap row indices in perm[] if pivot is not perm[j] */ if (ipivot != perm[j]) { perm[isave] = perm[j]; perm[j] = ipivot; } /* Row normalization */ for (kcol = j + 1; kcol < n; kcol++) matrix[ipivot][kcol] /= matrix[ipivot][j]; for (kcol = 0; kcol < n; kcol++) soln[ipivot][kcol] /= matrix[ipivot][j]; /* Row reduction */ for (i = j + 1; i < n; i++) { jrow = perm[i]; for (kcol = j + 1; kcol < n; kcol++) matrix[jrow][kcol] -= matrix[ipivot][kcol] * matrix[jrow][j]; for (kcol = 0; kcol < n; kcol++) soln[jrow][kcol] -= soln[ipivot][kcol] * matrix[jrow][j]; } } /* end loop over all rows */ /* Back substitution */ for (i = n - 1; i >= 0; i--) { jrow = perm[i]; for (kcol = 0; kcol < n; kcol++) for (j = i + 1; j < n; j++) { krow = perm[j]; soln[jrow][kcol] -= matrix[jrow][j] * soln[krow][kcol]; } } /* Copy solution into original matrix */ for (i = 0; i < n; i++) { jrow = perm[i]; for (j = 0; j < n; j++) matrix[i][j] = soln[jrow][j]; } free((char *) perm); freematrix(soln); return (SUCCESS); } neuron-7.5/src/scopmath/lag.c000077500000000000000000000145041323325274500162240ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: lag.c * * Copyright (c) 1988-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "lag.c,v 1.2 1997/08/30 14:32:11 hines Exp"; #endif /*************************************************************** * * Abstract: lag() * * This function has two independent variables, var and curt, * where var contains its value at curt, and a constant lagt. * It returns a pointer to the value of var at curt-lagt. * * lag(var(curt),lagt) = var(curt - lagt) * * Returns: Pointer to double for lagged value of var if * curt >= lagt or pointer to initial value if curt < lagt * * Calling sequence: lag(var, curt, lagt, vsize) * * Arguments: * Input: var *double pointer to variable whose * value at curt - lagt is desired * curt double current value of the monotonically * increasing independent variable * (usually time) * lagt double difference between curt and * the previous value of curt for * which we desire the value of var * vsize int dimension of var if a vector; * else <= 1 * * Functions called: makevar, freevars, makenode, freenode * * Files accessed: none * ***************************************************************/ #include #include #define CURVAL (listptr->curptr) #define LAGVAL (listptr->lagptr) #define VSIZE listptr->dimension #define INTERPVAL listptr->interpolate typedef struct node { double time; /* value of curt corresponding to node */ double *value; /* Pointer to block of storage for variable * value(s) */ struct node *next; /* Pointer to next node in data buffer */ } node; typedef struct varlist { double *varptr; /* Pointer to variable in p array */ int dimension; /* = 1 for scalars; = vsize for vectors */ double offset; /* lag in the independent variable = lagt */ struct node *curptr, *lagptr; /* Pointers to locations in data linked list */ double *interpolate; /* Pointer to allocated storage for * interpolated lagged value to be returned */ struct varlist *next; /* Pointer to next lagged variable */ } varlist; static void makevar(); static void makenode(); static void freevars(); static void freenode(); static int getinterpval(); double * lag(var, curt, lagt, vsize) double *var, curt, lagt; int vsize; { void makevar(), freevars(), makenode(), freenode(); static varlist *lagvars = NULL; varlist *listptr, *lastvar = NULL; node *nodeptr, *nextnode; extern int _ninits; static int initialized = 0; int i, interp = 0; if (initialized < _ninits) { /* A new run has been started. Free storage for the linked list */ freevars(lagvars); lagvars = NULL; initialized = _ninits; } /* Search for lag variable in list */ for (listptr = lagvars; listptr != NULL; listptr = listptr->next) if ((listptr->varptr == var) && (listptr->offset == lagt)) break; else lastvar = listptr; if (listptr == NULL) { /* Lag variable not listed; add to list of lagged variables */ makevar(&listptr, var, vsize, lagt); if (lastvar == NULL) lagvars = listptr; else lastvar->next = listptr; makenode(&CURVAL, curt, var, VSIZE); LAGVAL = CURVAL; } else if (curt == CURVAL->time) { /* * Time point already listed, e.g., for predictor-corrector integrators * Update value of variable in current node */ for (i = 0; i < VSIZE; i++) *(CURVAL->value + i) = *(var + i); interp = (curt - LAGVAL->time >= lagt); } else if (curt - LAGVAL->time >= lagt) { /* Lag period exceeded */ makenode(&(CURVAL->next), curt, var, VSIZE); CURVAL = CURVAL->next; for (nodeptr = LAGVAL; curt - (nodeptr->next)->time >= lagt; nodeptr = nextnode) { nextnode = nodeptr->next; freenode(nodeptr); } LAGVAL = nodeptr; interp = getinterpval(LAGVAL, LAGVAL->next, curt - lagt, INTERPVAL, VSIZE); } else if (curt > CURVAL->time) { /* Haven't exceeded lag period yet */ makenode(&(CURVAL->next), curt, var, VSIZE); CURVAL = CURVAL->next; } if (!interp) return (LAGVAL->value); else return (INTERPVAL); } static void makevar(newvar, address, size, delay) varlist **newvar; int size; double *address, delay; { /* Allocate storage for new element of varlist */ *newvar = (varlist *) malloc((unsigned) sizeof(varlist)); /* Store information about new lagged variable */ if (size < 1) size = 1; (*newvar)->varptr = address; (*newvar)->dimension = size; (*newvar)->offset = delay; (*newvar)->interpolate = (double *) malloc((unsigned) (size * sizeof(double))); (*newvar)->next = NULL; } static void freevars(list) varlist *list; { void freenode(); varlist *listptr, *nextptr; node *nodeptr, *nextnode; for (listptr = list; listptr != NULL; listptr = nextptr) { /* Free linked list of saved data */ for (nodeptr = LAGVAL; nodeptr != NULL; nodeptr = nextnode) { nextnode = nodeptr->next; freenode(nodeptr); } nextptr = listptr->next; free((char *) INTERPVAL); free((char *) listptr); } } static void makenode(nodeptr, t, dataptr, datasize) node **nodeptr; double t, *dataptr; int datasize; { int i; /* Allocate storage for node and data */ *nodeptr = (node *) malloc((unsigned) sizeof(node)); (*nodeptr)->value = (double *) malloc((unsigned) (datasize * sizeof(double))); /* Store data for later retrieval */ (*nodeptr)->time = t; for (i = 0; i < datasize; i++) *((*nodeptr)->value + i) = *(dataptr + i); (*nodeptr)->next = NULL; } static void freenode(nodeptr) node *nodeptr; { free((char *) nodeptr->value); free((char *) nodeptr); } static int getinterpval(start, end, t, interpval, dimension) node *start, *end; double t, *interpval; int dimension; { int i; double t_ratio; /* * Perform linear interpolation for lagged value over interval * Return 1 if interpolation is required, else return 0 */ if (t > start->time) { t_ratio = (t - start->time) / (end->time - start->time); for (i = 0; i < dimension; i++) *(interpval + i) = *(start->value + i) + t_ratio * (*(end->value + i) - *(start->value + i)); return (1); } else return (0); } neuron-7.5/src/scopmath/legendre.c000077500000000000000000000030771323325274500172510ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: legendre.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "legendre.c,v 1.1.1.1 1994/10/12 17:22:21 hines Exp" ; #endif /*************************************************************** * * Abstract: legendre * * Definite integral by Gauss-Legendre quadrature using * a 10th degree Legendre polynomial * * Calling sequence: legendre(a, b, func) * * Returns: Double precision value of the integral * * Arguments: * a, double beginning of the integration interval * b, double end of the integration interval * func name of the function to be integrated * * Functions called: func(x) supplied by user; x is the * independent variable of the function * * Files accessed: none * **************************************************************/ double zero[10] = {-0.9739065285, -0.8650633677, -0.6794095683, -0.4333953941, -0.1488743390, 0.1488743390, 0.4333953941, 0.6794095683, 0.8650633677, 0.9739065285}, weight[10] = {0.0666713443, 0.1494513492, 0.2190863625, 0.2692667193, 0.2955242247, 0.2955242247, 0.2692667193, 0.2190863625, 0.1494513492, 0.0666713443}; double legendre(a, b, func) double a, b, (*func) (); { int i; double integral = 0.0; for (i = 0; i < 10; i++) integral += weight[i] * func(0.5 * (zero[i] * (b - a) + a + b)); return (0.5 * (b - a) * integral); } neuron-7.5/src/scopmath/newton.c000077500000000000000000000227751323325274500170040ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: newton.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "newton.c,v 1.3 1999/01/04 12:46:48 hines Exp" ; #endif /*------------------------------------------------------------*/ /* */ /* NEWTON */ /* */ /* Iteratively solves simultaneous nonlinear equations by */ /* Newton's method, using a Jacobian matrix computed by */ /* finite differences. */ /* */ /* Returns: 0 if no error; 2 if matrix is singular or ill- */ /* conditioned; 1 if maximum */ /* iterations exceeded */ /* */ /* Calling sequence: newton(n, x, p, pfunc, value) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of variables to solve for. */ /* */ /* x, pointer to array of the solution */ /* vector elements possibly indexed by index */ /* */ /* p, array of parameter values */ /* */ /* pfunc, pointer to function which computes the */ /* deviation from zero of each equation in the */ /* model. */ /* */ /* value, pointer to array to array of */ /* the function values. */ /* */ /* Output: x contains the solution value or the most */ /* recent iteration's result in the event of */ /* an error. */ /* */ /* Functions called: makevector, freevector, makematrix, */ /* freematrix */ /* buildjacobian, crout, solve */ /* */ /*------------------------------------------------------------*/ #include #include #include "errcodes.h" int newton(n, index, x, pfunc, value) int n, (*pfunc) (); double x[], value[]; int *index; { extern int freevector(), freematrix(), crout(), solve(); extern double *makevector(), **makematrix(); int i, count = 0, error, buildjacobian(), *perm; double **jacobian, *delta_x, change = 1.0, max_dev, temp; /* * Create arrays for Jacobian, variable increments, function values, and * permutation vector */ delta_x = makevector(n); jacobian = makematrix(n, n); perm = (int *) malloc((unsigned) (n * sizeof(int))); /* Iteration loop */ while (count++ < MAXITERS) { if (change > MAXCHANGE) { /* * Recalculate Jacobian matrix if solution has changed by more * than MAXCHANGE */ buildjacobian(n, index, x, pfunc, value, jacobian); for (i = 0; i < n; i++) value[i] = - value[i]; /* Required correction to * function values */ if ((error = crout(n, jacobian, perm)) != SUCCESS) break; } solve(n, jacobian, value, perm, delta_x, (int *)0); /* Update solution vector and compute norms of delta_x and value */ change = 0.0; if (index) { for (i = 0; i < n; i++) { if (fabs(x[index[i]]) > ZERO && (temp = fabs(delta_x[i] / (x[index[i]]))) > change) change = temp; x[index[i]] += delta_x[i]; } }else{ for (i = 0; i < n; i++) { if (fabs(x[i]) > ZERO && (temp = fabs(delta_x[i] / (x[i]))) > change) change = temp; x[i] += delta_x[i]; } } (*pfunc) (); /* Evaluate function values with new solution */ max_dev = 0.0; for (i = 0; i < n; i++) { value[i] = - value[i]; /* Required correction to function * values */ if ((temp = fabs(value[i])) > max_dev) max_dev = temp; } /* Check for convergence or maximum iterations */ if (change <= CONVERGE && max_dev <= ZERO) break; if (count == MAXITERS) { error = EXCEED_ITERS; break; } } /* end of while loop */ free((char *) perm); freevector(delta_x); freematrix(jacobian); return (error); } /*------------------------------------------------------------*/ /* */ /* BUILDJACOBIAN */ /* */ /* Creates the Jacobian matrix by computing partial deriv- */ /* atives by finite central differences. If the column */ /* variable is nonzero, an increment of 2% of the variable */ /* is used. STEP is the minimum increment allowed; it is */ /* currently set to 1.0E-6. */ /* */ /* Returns: no return variable */ /* */ /* Calling sequence: */ /* buildjacobian(n, index, x, pfunc, value, jacobian) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of variables */ /* */ /* x, pointer to array of addresses of the solution */ /* vector elements */ /* */ /* p, array of parameter values */ /* */ /* pfunc, pointer to function which computes the */ /* deviation from zero of each equation */ /* in the model. */ /* */ /* value, pointer to array of addresses of function */ /* values */ /* */ /* Output: jacobian, double, computed jacobian matrix */ /* */ /* Functions called: user-supplied function with argument */ /* (p) to compute vector of function */ /* values for each equation. */ /* makevector(), freevector() */ /* */ /*------------------------------------------------------------*/ #define max(x, y) (fabs(x) > y ? x : y) int buildjacobian(n, index, x, pfunc, value, jacobian) int n, (*pfunc) (); double x[], value[], *jacobian[]; int *index; { extern int freevector(); extern double *makevector(); int i, j; double increment, *high_value, *low_value; high_value = makevector(n); low_value = makevector(n); /* Compute partial derivatives by central finite differences */ if (index) { for (j = 0; j < n; j++) { increment = max(fabs(0.02 * (x[index[j]])), STEP); x[index[j]] += increment; (*pfunc) (); for (i = 0; i < n; i++) high_value[i] = value[i]; x[index[j]] -= 2.0 * increment; (*pfunc) (); for (i = 0; i < n; i++) { low_value[i] = value[i]; /* Insert partials into jth column of Jacobian matrix */ jacobian[i][j] = (high_value[i] - low_value[i]) / (2.0 * increment); } /* Restore original variable and function values. */ x[index[j]] += increment; (*pfunc) (); } }else{ for (j = 0; j < n; j++) { increment = max(fabs(0.02 * (x[j])), STEP); x[j] += increment; (*pfunc) (); for (i = 0; i < n; i++) high_value[i] = value[i]; x[j] -= 2.0 * increment; (*pfunc) (); for (i = 0; i < n; i++) { low_value[i] = value[i]; /* Insert partials into jth column of Jacobian matrix */ jacobian[i][j] = (high_value[i] - low_value[i]) / (2.0 * increment); } /* Restore original variable and function values. */ x[j] += increment; (*pfunc) (); } } freevector(high_value); freevector(low_value); return 0; } int build_traj_jacob(n, index, x, pfunc, value, jacobian) int n, (*pfunc) (); double x[], *jacobian[]; int *index, *value; { extern int freevector(); extern double *makevector(); int i, j; double increment, *high_value, *low_value; high_value = makevector(n); low_value = makevector(n); /* Compute partial derivatives by central finite differences */ for (j = 0; j < n; j++) { increment = max(fabs(0.02 * (x[j])), STEP); x[index[j]] += increment; (*pfunc) (); for (i = 0; i < n; i++) high_value[i] = x[value[i]]; x[index[j]] -= 2.0 * increment; (*pfunc) (); for (i = 0; i < n; i++) { low_value[i] = x[value[i]]; /* Insert partials into jth column of Jacobian matrix */ jacobian[i][j] = (high_value[i] - low_value[i]) / (2.0 * increment); } /* Restore original variable and function values. */ x[index[j]] += increment; (*pfunc) (); } freevector(high_value); freevector(low_value); return 0; } neuron-7.5/src/scopmath/newton_struct.h000066400000000000000000000021721323325274500203770ustar00rootroot00000000000000#ifndef newton_struct_h #define newton_struct_h /* avoid incessant alloc/free memory */ typedef struct NewtonSpace { int n; double* delta_x; double** jacobian; int* perm; double* high_value; double* low_value; double* rowmax; } NewtonSpace; typedef int (*FUN)(double*, void*, void*, void*); extern void* hoc_Emalloc(unsigned long); extern void hoc_malchk(); #define emalloc(arg) hoc_Emalloc(arg); hoc_malchk() extern int freevector(); extern int freematrix(); extern double* makevector(int n); extern double** makematrix(int n, int m); extern int nrn_crout_thread(NewtonSpace* ns, int n, double** a, int* perm); extern void nrn_scopmath_solve_thread(int n, double** a, double* b, int* perm, double* p, int* y); extern int nrn_newton_thread(NewtonSpace* ns, int n, int* index, double* x, FUN pfunc, double* value, void* ppvar, void* thread, void* nt); static void nrn_buildjacobian_thread(NewtonSpace* ns, int n, int* index, double* x, FUN pfunc, double* value, double** jacobian, void* ppvar, void* thread, void* nt); extern NewtonSpace* nrn_cons_newtonspace(int n); extern void nrn_destroy_newtonspace(NewtonSpace* ns); #endif neuron-7.5/src/scopmath/newton_thread.c000077500000000000000000000221271323325274500203220ustar00rootroot00000000000000#include <../../nrnconf.h> #include /****************************************************************************** * * File: newton.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "newton.c,v 1.3 1999/01/04 12:46:48 hines Exp" ; #endif /*------------------------------------------------------------*/ /* */ /* NEWTON */ /* */ /* Iteratively solves simultaneous nonlinear equations by */ /* Newton's method, using a Jacobian matrix computed by */ /* finite differences. */ /* */ /* Returns: 0 if no error; 2 if matrix is singular or ill- */ /* conditioned; 1 if maximum */ /* iterations exceeded */ /* */ /* Calling sequence: newton(n, x, p, pfunc, value) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of variables to solve for. */ /* */ /* x, pointer to array of the solution */ /* vector elements possibly indexed by index */ /* */ /* p, array of parameter values */ /* */ /* pfunc, pointer to function which computes the */ /* deviation from zero of each equation in the */ /* model. */ /* */ /* value, pointer to array to array of */ /* the function values. */ /* */ /* Output: x contains the solution value or the most */ /* recent iteration's result in the event of */ /* an error. */ /* */ /* Functions called: makevector, freevector, makematrix, */ /* freematrix */ /* buildjacobian, crout, solve */ /* */ /*------------------------------------------------------------*/ #include #include #include "errcodes.h" int nrn_newton_thread(NewtonSpace* ns, int n, int* index, double* x, FUN pfunc, double* value, void* ppvar, void* thread, void* nt) { int i, count = 0, error, *perm; double **jacobian, *delta_x, change = 1.0, max_dev, temp; /* * Create arrays for Jacobian, variable increments, function values, and * permutation vector */ delta_x = ns->delta_x; jacobian = ns->jacobian; perm = ns->perm; /* Iteration loop */ while (count++ < MAXITERS) { if (change > MAXCHANGE) { /* * Recalculate Jacobian matrix if solution has changed by more * than MAXCHANGE */ nrn_buildjacobian_thread(ns, n, index, x, pfunc, value, jacobian, ppvar, thread, nt); for (i = 0; i < n; i++) value[i] = - value[i]; /* Required correction to * function values */ if ((error = nrn_crout_thread(ns, n, jacobian, perm)) != SUCCESS) break; } nrn_scopmath_solve_thread(n, jacobian, value, perm, delta_x, (int *)0); /* Update solution vector and compute norms of delta_x and value */ change = 0.0; if (index) { for (i = 0; i < n; i++) { if (fabs(x[index[i]]) > ZERO && (temp = fabs(delta_x[i] / (x[index[i]]))) > change) change = temp; x[index[i]] += delta_x[i]; } }else{ for (i = 0; i < n; i++) { if (fabs(x[i]) > ZERO && (temp = fabs(delta_x[i] / (x[i]))) > change) change = temp; x[i] += delta_x[i]; } } (*pfunc) (x, ppvar, thread, nt); /* Evaluate function values with new solution */ max_dev = 0.0; for (i = 0; i < n; i++) { value[i] = - value[i]; /* Required correction to function * values */ if ((temp = fabs(value[i])) > max_dev) max_dev = temp; } /* Check for convergence or maximum iterations */ if (change <= CONVERGE && max_dev <= ZERO) break; if (count == MAXITERS) { error = EXCEED_ITERS; break; } } /* end of while loop */ return (error); } /*------------------------------------------------------------*/ /* */ /* BUILDJACOBIAN */ /* */ /* Creates the Jacobian matrix by computing partial deriv- */ /* atives by finite central differences. If the column */ /* variable is nonzero, an increment of 2% of the variable */ /* is used. STEP is the minimum increment allowed; it is */ /* currently set to 1.0E-6. */ /* */ /* Returns: no return variable */ /* */ /* Calling sequence: */ /* buildjacobian(n, index, x, pfunc, value, jacobian) */ /* */ /* Arguments: */ /* */ /* Input: n, integer, number of variables */ /* */ /* x, pointer to array of addresses of the solution */ /* vector elements */ /* */ /* p, array of parameter values */ /* */ /* pfunc, pointer to function which computes the */ /* deviation from zero of each equation */ /* in the model. */ /* */ /* value, pointer to array of addresses of function */ /* values */ /* */ /* Output: jacobian, double, computed jacobian matrix */ /* */ /* Functions called: user-supplied function with argument */ /* (p) to compute vector of function */ /* values for each equation. */ /* makevector(), freevector() */ /* */ /*------------------------------------------------------------*/ #define max(x, y) (fabs(x) > y ? x : y) static void nrn_buildjacobian_thread(NewtonSpace* ns, int n, int* index, double* x, FUN pfunc, double* value, double** jacobian, void* ppvar, void* thread, void* nt) { int i, j; double increment, *high_value, *low_value; high_value = ns->high_value; low_value = ns->low_value; /* Compute partial derivatives by central finite differences */ if (index) { for (j = 0; j < n; j++) { increment = max(fabs(0.02 * (x[index[j]])), STEP); x[index[j]] += increment; (*pfunc) (x, ppvar, thread, nt); for (i = 0; i < n; i++) high_value[i] = value[i]; x[index[j]] -= 2.0 * increment; (*pfunc) (x, ppvar, thread, nt); for (i = 0; i < n; i++) { low_value[i] = value[i]; /* Insert partials into jth column of Jacobian matrix */ jacobian[i][j] = (high_value[i] - low_value[i]) / (2.0 * increment); } /* Restore original variable and function values. */ x[index[j]] += increment; (*pfunc) (x, ppvar, thread, nt); } }else{ for (j = 0; j < n; j++) { increment = max(fabs(0.02 * (x[j])), STEP); x[j] += increment; (*pfunc) (x, ppvar, thread, nt); for (i = 0; i < n; i++) high_value[i] = value[i]; x[j] -= 2.0 * increment; (*pfunc) (x, ppvar, thread, nt); for (i = 0; i < n; i++) { low_value[i] = value[i]; /* Insert partials into jth column of Jacobian matrix */ jacobian[i][j] = (high_value[i] - low_value[i]) / (2.0 * increment); } /* Restore original variable and function values. */ x[j] += increment; (*pfunc) (x, ppvar, thread, nt); } } } NewtonSpace* nrn_cons_newtonspace(int n) { NewtonSpace* ns = (NewtonSpace*)emalloc(sizeof(NewtonSpace)); ns->n = n; ns->delta_x = makevector(n); ns->jacobian = makematrix(n, n); ns->perm = (int *) emalloc((unsigned) (n * sizeof(int))); ns->high_value = makevector(n); ns->low_value = makevector(n); ns->rowmax = makevector(n); return ns; } void nrn_destroy_newtonspace(NewtonSpace* ns) { free((char *) ns->perm); freevector(ns->delta_x); freematrix(ns->jacobian); freevector(ns->high_value); freevector(ns->low_value); freevector(ns->rowmax); free ((char*) ns); } neuron-7.5/src/scopmath/normrand.c000077500000000000000000000026611323325274500173020ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: normrand.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "normrand.c,v 1.1.1.1 1994/10/12 17:22:22 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* NORMRAND */ /* */ /* Selects a random number from the normal distribution with */ /* specified mean and standard deviation */ /* */ /* Returns: Double precision number from the distribution */ /* */ /* Calling sequence: normrand(mean, std_dev) */ /* */ /* Arguments */ /* Input: mean, double mean of the distribution */ /* */ /* std_dev, double standard deviation of the */ /* distribution */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: random */ /* */ /*--------------------------------------------------------------*/ double normrand(mean, std_dev) double mean, std_dev; { double s, v1, v2; extern double sqrt(), log(), scop_random(); s = 1.0; while (s >= 1.0) { v1 = 2.0 * scop_random() - 1.0; v2 = 2.0 * scop_random() - 1.0; s = (v1 * v1) + (v2 * v2); } v2 = v1 * sqrt(-2.0 * log(s) / s); return (v2 * std_dev + mean); } neuron-7.5/src/scopmath/perpulse.c000077500000000000000000000037131323325274500173200ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: perpulse.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "perpulse.c,v 1.2 1997/08/30 14:32:13 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* Abstract: perpulse() */ /* */ /* Generates periodic pulses of specified height, duration, */ /* and delay between pulses */ /* */ /* Returns: Double precision value of the pulse height or zero */ /* */ /* Calling sequence: perpulse(t, lag, height, duration, delay) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* lag, double value of t at which first pulse */ /* begins */ /* */ /* height, double pulse height */ /* */ /* duration,double duration of the pulse */ /* */ /* delay, double delay between pulses */ /* */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /*--------------------------------------------------------------*/ double perpulse(reset_integ, old_value, t, lag, height, duration, delay) double *old_value, t, lag, height, duration, delay; int *reset_integ; { double temp, period, value; #ifndef MAC extern double modf(); #endif if (t < lag) value = 0.0; else { period = duration + delay; temp = modf((t - lag) / period, &value); if ((temp *= period) < duration) value = height; else value = 0.0; } if (*old_value != value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/perstep.c000077500000000000000000000035701323325274500171440ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: perstep.c * * Copyright (c) 1987-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "perstep.c,v 1.1.1.1 1994/10/12 17:22:22 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* PERSTEP */ /* */ /* Generates periodic jumps of specified height and duration */ /* in a constant function. */ /* */ /* Returns: Double precision value of the step function, zero */ /* before the first step is taken or the cumulative */ /* sum of step heights already taken */ /* */ /* Calling sequence: perstep(t, base, lag, period, jump) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* lag, double value of t at which stepping */ /* starts */ /* */ /* period, double duration of each step. First */ /* step taken */ /* */ /* jump, double step height */ /* */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /*--------------------------------------------------------------*/ double perstep(reset_integ, old_value, t, lag, period, jump) double *old_value, t, lag, period, jump; int *reset_integ; { int njumps; double value; if (t < lag) value = 0.0; else { njumps = (int) ((t - lag) / period) + 1; value = (double) njumps * jump; } if (*old_value != value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/poisrand.c000077500000000000000000000023061323325274500172750ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: poisrand.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "poisrand.c,v 1.1.1.1 1994/10/12 17:22:22 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* POISRAND() */ /* */ /* Selects a random number from the Poisson distribution */ /* with specified mean */ /* */ /* Returns: integer from the Poisson distribution */ /* */ /* Calling sequence: poisrand(mean) */ /* */ /* Arguments */ /* Input: mean, double mean of the distribution */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: random */ /* */ /*--------------------------------------------------------------*/ int poisrand(mean) double mean; { int n; double s, q; extern double exp(), scop_random(); n = 0; s = exp(-mean); q = 1.0; while (q >= s) { q = q * scop_random(); ++n; } return (n-1); } neuron-7.5/src/scopmath/poisson.c000077500000000000000000000024221323325274500171470ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: poisson.c * * Copyright (c) 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "poisson.c,v 1.2 1997/08/30 14:32:14 hines Exp" ; #endif /*--------------------------------------------------------------*/ /* */ /* POISSON() */ /* */ /* Computes the value of a Poisson probability density */ /* function at a particular x value given the mean */ /* */ /* Returns: Double precision value of the probability */ /* */ /* Calling sequence: poisson(x, mean) */ /* */ /* Arguments */ /* Input: x, int the independent variable */ /* */ /* mean, double mean of the distribution */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: factorial */ /* */ /*--------------------------------------------------------------*/ double poisson(x, mean) double x; double mean; { double value; #ifndef MAC extern double exp(), pow(); #endif extern double factorial(); value = (pow(mean, x) * exp(-mean)) / factorial(x); return (value); } neuron-7.5/src/scopmath/praxis.c000066400000000000000000001113061323325274500167620ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #undef small extern int stoprun; extern void hoc_execerror(const char*, const char*); extern void hoc_after_prax_quad(char*); static int minfit_(), min_(), sort_(), quad_(); static int vcprnt_(), print_(), maprnt_(); static double random_(), flin_(); /* modified for re-entrancy by Hines 5/20/98 */ extern char* hoc_Ecalloc(); /* -- translated by f2c (version of 23 May 1992 14:18:33). You must link the resulting object file with the libraries: -lF77 -lI77 -lm -lc (in that order) */ #if 0 #include "f2c.h" #else typedef long int integer; typedef float real; typedef double doublereal; typedef long int logical; #define TRUE_ (1) #define FALSE_ (0) #define dmax(arg1,arg2) ((arg1 > arg2) ? arg1 : arg2) #define dmin(arg1,arg2) ((arg1 < arg2) ? arg1 : arg2) #endif /* Common Block Declarations */ struct GlobalStruct{ doublereal fx, ldt, dmin_; integer nf, nl; doublereal *minfit_e, *flin_t; } *global_; static struct GlobalStruct* gstruct_alloc(sz) int sz; { struct GlobalStruct* gs = (struct GlobalStruct*)hoc_Ecalloc(1, sizeof(struct GlobalStruct)); gs->minfit_e = (doublereal*)hoc_Ecalloc(sz, sizeof(doublereal)); gs->flin_t = (doublereal*)hoc_Ecalloc(sz, sizeof(doublereal)); return gs; } static void gstruct_free(gs) struct GlobalStruct* gs; { if (gs) { free(gs->minfit_e); free(gs->flin_t); free(gs); } } #define global_1 (*global_) struct QStruct{ doublereal *v, *q0, *q1, qa, qb, qc, qd0, qd1, qf1; integer size; } *q_, *q_hoc; static struct QStruct* qstruct_alloc(sz) int sz; { struct QStruct* qs = (struct QStruct*)hoc_Ecalloc(1, sizeof(struct QStruct)); qs->size = sz; qs->v = (doublereal*)hoc_Ecalloc(sz*sz, sizeof(doublereal)); qs->q0 = (doublereal*)hoc_Ecalloc(sz, sizeof(doublereal)); qs->q1 = (doublereal*)hoc_Ecalloc(sz, sizeof(doublereal)); return qs; } static void qstruct_free(qs) struct QStruct* qs; { if (qs) { free(qs->v); free(qs->q0); free(qs->q1); free(qs); } } static doublereal* d_, *d_hoc; #define d d_ #define q_1 (*q_) static int praxstep = 0; /* if n returns after n iterations of main loop */ double praxis_pval(i) int i; { if (d_hoc) { if (i >= q_hoc->size || i < 0) { hoc_execerror("arg out of range", (char*)0); } return d_hoc[i]; }else{ hoc_execerror("fit_praxis hasn't been called", (char*)0); } return 0.; } double* praxis_paxis(i) int i; { if (q_hoc) { if (i >= q_hoc->size || i < 0) { hoc_execerror("arg out of range", (char*)0); } return q_hoc->v + q_hoc->size*i; }else{ hoc_execerror("fit_praxis hasn't been called", (char*)0); } return (double*)0; } int praxis_stop(i) int i; { int j = praxstep; praxstep = i; return j; } /* Table of constant values */ static integer c__1 = 1; static integer c__2 = 2; static integer c__0 = 0; static integer c__10 = 10; static integer c__4 = 4; static integer c__3 = 3; doublereal praxis(t0, machep, h0, nval, prin, x, f, fmin, after_quad) doublereal *t0, *machep, *h0; integer nval, *prin; doublereal *x; doublereal (*f) (); doublereal *fmin; char* after_quad; /* hoc statement */ { integer *n, nval1; /* System generated locals */ integer i__1, i__2, i__3; doublereal ret_val, d__1; /* Builtin functions */ integer pow_ii(); /* Local variables */ doublereal scbd; integer idim; logical illc; extern /* Subroutine */ int quad_(); integer klmk; extern /* Subroutine */ int sort_(); doublereal h, ldfac; integer i, j, k; doublereal s, t, *y, large, *z, small, value, f1; integer sz, sz1; extern /* Subroutine */ int print_(); integer k2; doublereal m2, m4, t2, df, dn; integer kl, ii; doublereal sf; integer kt; doublereal sl, vlarge; extern doublereal random_(); extern /* Subroutine */ int minfit_(); doublereal vsmall; extern /* Subroutine */ int maprnt_(); integer km1, im1; extern /* Subroutine */ int vcprnt_(); doublereal dni, lds; extern /* Subroutine */ int min_(); integer ktm; /* for re-entrancy*/ struct GlobalStruct* gsav; struct QStruct* qsav; double* dsav; sz = nval; sz1 = sz + 1; y = (doublereal*)hoc_Ecalloc(sz, sizeof(doublereal)); z = (doublereal*)hoc_Ecalloc(sz, sizeof(doublereal)); gsav = global_; qsav = q_; dsav = d_; global_ = gstruct_alloc(sz); q_ = qstruct_alloc(sz); d_ = (double*)hoc_Ecalloc(sz, sizeof(double)); *machep = 1e-11; /* LAST MODIFIED 3/1/73 */ /* PRAXIS RETURNS THE MINIMUM OF THE FUNCTION F(X,N) OF N VARIABLES */ /* USING THE PRINCIPAL AXIS METHOD. THE GRADIENT OF THE FUNCTION IS */ /* NOT REQUIRED. */ /* FOR A DESCRIPTION OF THE ALGORITHM, SEE CHAPTER SEVEN OF */ /* "ALGORITHMS FOR FINDING ZEROS AND EXTREMA OF FUNCTIONS WITHOUT */ /* CALCULATING DERIVATIVES" BY RICHARD P BRENT. */ /* THE PARAMETERS ARE: */ /* T0 IS A TOLERANCE. PRAXIS ATTEMPTS TO RETURN PRAXIS=F(X) */ /* SUCH THAT IF X0 IS THE TRUE LOCAL MINIMUM NEAR X, THEN */ /* NORM(X-X0) < T0 + SQUAREROOT(MACHEP)*NORM(X). */ /* MACHEP IS THE MACHINE PRECISION, THE SMALLEST NUMBER SUCH THAT */ /* 1 + MACHEP > 1. MACHEP SHOULD BE 16.**-13 (ABOUT */ /* 2.22D-16) FOR REAL*8 ARITHMETIC ON THE IBM 360. */ /* H0 IS THE MAXIMUM STEP SIZE. H0 SHOULD BE SET TO ABOUT THE */ /* MAXIMUM DISTANCE FROM THE INITIAL GUESS TO THE MINIMUM. */ /* (IF H0 IS SET TOO LARGE OR TOO SMALL, THE INITIAL RATE OF */ /* CONVERGENCE MAY BE SLOW.) */ /* N (AT LEAST TWO) IS THE NUMBER OF VARIABLES UPON WHICH */ /* THE FUNCTION DEPENDS. */ /* PRIN CONTROLS THE PRINTING OF INTERMEDIATE RESULTS. */ /* IF PRIN=0, NOTHING IS PRINTED. */ /* IF PRIN=1, F IS PRINTED AFTER EVERY N+1 OR N+2 LINEAR */ /* MINIMIZATIONS. FINAL X IS PRINTED, BUT INTERMEDIATE X IS */ /* PRINTED ONLY IF N IS AT MOST 4. */ /* IF PRIN=2, THE SCALE FACTORS AND THE PRINCIPAL VALUES OF */ /* THE APPROXIMATING QUADRATIC FORM ARE ALSO PRINTED. */ /* IF PRIN=3, X IS ALSO PRINTED AFTER EVERY FEW LINEAR */ /* MINIMIZATIONS. */ /* IF PRIN=4, THE PRINCIPAL VECTORS OF THE APPROXIMATING */ /* QUADRATIC FORM ARE ALSO PRINTED. */ /* X IS AN ARRAY CONTAINING ON ENTRY A GUESS OF THE POINT OF */ /* MINIMUM, ON RETURN THE ESTIMATED POINT OF MINIMUM. */ /* F(X,N) IS THE FUNCTION TO BE MINIMIZED. F SHOULD BE A REAL*8 */ /* FUNCTION DECLARED EXTERNAL IN THE CALLING PROGRAM. */ /* FMIN IS AN ESTIMATE OF THE MINIMUM, USED ONLY IN PRINTING */ /* INTERMEDIATE RESULTS. */ /* THE APPROXIMATING QUADRATIC FORM IS */ /* Q(X') = F(X,N) + (1/2) * (X'-X)-TRANSPOSE * A * (X'-X) */ /* WHERE X IS THE BEST ESTIMATE OF THE MINIMUM AND A IS */ /* INVERSE(V-TRANSPOSE) * D * INVERSE(V) */ /* (V(*,*) IS THE MATRIX OF SEARCH DIRECTIONS; D(*) IS THE ARRAY */ /* OF SECOND DIFFERENCES). IF F HAS CONTINUOUS SECOND DERIVATIVES */ /* NEAR X0, A WILL TEND TO THE HESSIAN OF F AT X0 AS X APPROACHES X0. */ /* IT IS ASSUMED THAT ON FLOATING-POINT UNDERFLOW THE RESULT IS SET */ /* TO ZERO. */ /* THE USER SHOULD OBSERVE THE COMMENT ON HEURISTIC NUMBERS AFTER */ /* THE INITIALIZATION OF MACHINE DEPENDENT NUMBERS. */ /* .....IF N>20 OR IF N<20 AND YOU NEED MORE SPACE, CHANGE '20' TO THE */ /* LARGEST VALUE OF N IN THE NEXT CARD, IN THE CARD 'IDIM=20', AND */ /* IN THE DIMENSION STATEMENTS IN SUBROUTINES MINFIT,MIN,FLIN,QUAD. */ nval1 = nval; n = &nval1; /* .....INITIALIZATION..... */ /* MACHINE DEPENDENT NUMBERS: */ /* Parameter adjustments */ --x; /* Function Body */ idim = sz; small = *machep * *machep; vsmall = small * small; large = 1. / small; vlarge = 1. / vsmall; m2 = sqrt(*machep); m4 = sqrt(m2); /* HEURISTIC NUMBERS: */ /* IF THE AXES MAY BE BADLY SCALED (WHICH IS TO BE AVOIDED IF */ /* POSSIBLE), THEN SET SCBD=10. OTHERWISE SET SCBD=1. */ /* IF THE PROBLEM IS KNOWN TO BE ILL-CONDITIONED, SET ILLC=TRUE. */ /* OTHERWISE SET ILLC=FALSE. */ /* KTM IS THE NUMBER OF ITERATIONS WITHOUT IMPROVEMENT BEFORE THE */ /* ALGORITHM TERMINATES. KTM=4 IS VERY CAUTIOUS; USUALLY KTM=1 */ /* IS SATISFACTORY. */ scbd = 1.; illc = FALSE_; ktm = 2; ldfac = .01; if (illc) { ldfac = .1; } kt = 0; global_1.nl = 0; global_1.nf = 1; global_1.fx = (*f)(&x[1], *n); if (stoprun) {goto ret_;} q_1.qf1 = global_1.fx; t = small + fabs(*t0); t2 = t; global_1.dmin_ = small; h = *h0; if (h < t * 100) { h = t * 100; } global_1.ldt = h; /* .....THE FIRST SET OF SEARCH DIRECTIONS V IS THE IDENTITY MATRIX..... */ i__1 = *n; for (i = 1; i <= i__1; ++i) { i__2 = *n; for (j = 1; j <= i__2; ++j) { /* L10: */ q_1.v[i + j * sz - sz1] = 0.; } /* L20: */ q_1.v[i + i * sz - sz1] = 1.; } d[0] = 0.; q_1.qd0 = 0.; i__1 = *n; for (i = 1; i <= i__1; ++i) { q_1.q0[i - 1] = x[i]; /* L30: */ q_1.q1[i - 1] = x[i]; } if (*prin > 0) { print_(n, &x[1], prin, fmin); } if (*n <= 0) { goto L400; } /* .....THE MAIN LOOP STARTS HERE..... */ L40: sf = d[0]; d[0] = 0.; s = 0.; /* .....MINIMIZE ALONG THE FIRST DIRECTION V(*,1). */ /* FX MUST BE PASSED TO MIN BY VALUE. */ value = global_1.fx; min_(n, &c__1, &c__2, d, &s, &value, &c__0, f, &x[1], &t, machep, &h); if (stoprun) {goto ret_;} if (s > 0.) { goto L50; } i__1 = *n; for (i = 1; i <= i__1; ++i) { /* L45: */ q_1.v[i - 1] = -q_1.v[i - 1]; } L50: if (sf > d[0] * .9 && sf * .9 < d[0]) { goto L70; } i__1 = *n; for (i = 2; i <= i__1; ++i) { /* L60: */ d[i - 1] = 0.; } /* .....THE INNER LOOP STARTS HERE..... */ L70: if (*n > 1) { i__1 = *n; for (k = 2; k <= i__1; ++k) { i__2 = *n; for (i = 1; i <= i__2; ++i) { /* L75: */ y[i - 1] = x[i]; } sf = global_1.fx; if (kt > 0) { illc = TRUE_; } L80: kl = k; df = 0.; /* .....A RANDOM STEP FOLLOWS (TO AVOID RESOLUTION VALLEYS). */ /* PRAXIS ASSUMES THAT RANDOM RETURNS A RANDOM NUMBER UNIFORMLY */ /* DISTRIBUTED IN (0,1). */ if (! illc) { goto L95; } i__2 = *n; for (i = 1; i <= i__2; ++i) { s = (global_1.ldt * .1 + t2 * pow(10., (double)kt)) * (random_(n) - .5); z[i - 1] = s; i__3 = *n; for (j = 1; j <= i__3; ++j) { /* L85: */ x[j] += s * q_1.v[j + i * sz - sz1]; } /* L90: */ } global_1.fx = (*f)(&x[1], *n); if (stoprun) {goto ret_;} ++global_1.nf; /* .....MINIMIZE ALONG THE "NON-CONJUGATE" DIRECTIONS V(*,K),...,V(*,N ) */ L95: i__2 = *n; for (k2 = k; k2 <= i__2; ++k2) { sl = global_1.fx; s = 0.; value = global_1.fx; min_(n, &k2, &c__2, &d[k2 - 1], &s, &value, &c__0, f, &x[1], &t, machep, &h); if (stoprun) {goto ret_;} if (illc) { goto L97; } s = sl - global_1.fx; goto L99; L97: /* Computing 2nd power */ d__1 = s + z[k2 - 1]; s = d[k2 - 1] * (d__1 * d__1); L99: if (df > s) { goto L105; } df = s; kl = k2; L105: ; } if (illc || df >= (d__1 = *machep * 100 * global_1.fx, fabs(d__1))) { goto L110; } /* .....IF THERE WAS NOT MUCH IMPROVEMENT ON THE FIRST TRY, SET */ /* ILLC=TRUE AND START THE INNER LOOP AGAIN..... */ illc = TRUE_; goto L80; L110: if (k == 2 && *prin > 1) { vcprnt_(&c__1, d, n); } /* .....MINIMIZE ALONG THE "CONJUGATE" DIRECTIONS V(*,1),...,V(*,K-1) */ km1 = k - 1; i__2 = km1; for (k2 = 1; k2 <= i__2; ++k2) { s = 0.; value = global_1.fx; min_(n, &k2, &c__2, &d[k2 - 1], &s, &value, &c__0, f, &x[1], &t, machep, &h); if (stoprun) {goto ret_;} /* L120: */ } f1 = global_1.fx; global_1.fx = sf; lds = 0.; i__2 = *n; for (i = 1; i <= i__2; ++i) { sl = x[i]; x[i] = y[i - 1]; sl -= y[i - 1]; y[i - 1] = sl; /* L130: */ lds += sl * sl; } lds = sqrt(lds); if (lds <= small) { goto L160; } /* .....DISCARD DIRECTION V(*,KL). */ /* IF NO RANDOM STEP WAS TAKEN, V(*,KL) IS THE "NON-CONJUGATE" */ /* DIRECTION ALONG WHICH THE GREATEST IMPROVEMENT WAS MADE..... */ klmk = kl - k; if (klmk < 1) { goto L141; } i__2 = klmk; for (ii = 1; ii <= i__2; ++ii) { i = kl - ii; i__3 = *n; for (j = 1; j <= i__3; ++j) { /* L135: */ q_1.v[j + (i + 1) * sz - sz1] = q_1.v[j + i * sz - sz1]; } /* L140: */ d[i] = d[i - 1]; } L141: d[k - 1] = 0.; i__2 = *n; for (i = 1; i <= i__2; ++i) { /* L145: */ q_1.v[i + k * sz - sz1] = y[i - 1] / lds; } /* .....MINIMIZE ALONG THE NEW "CONJUGATE" DIRECTION V(*,K), WHICH IS */ /* THE NORMALIZED VECTOR: (NEW X) - (0LD X)..... */ value = f1; min_(n, &k, &c__4, &d[k - 1], &lds, &value, &c__1, f, &x[1], &t, machep, &h); if (stoprun) {goto ret_;} if (lds > 0.) { goto L160; } lds = -lds; i__2 = *n; for (i = 1; i <= i__2; ++i) { /* L150: */ q_1.v[i + k * sz - sz1] = -q_1.v[i + k * sz - sz1]; } L160: global_1.ldt = ldfac * global_1.ldt; if (global_1.ldt < lds) { global_1.ldt = lds; } if (*prin > 0) { print_(n, &x[1], prin, fmin); } t2 = 0.; i__2 = *n; for (i = 1; i <= i__2; ++i) { /* L165: */ /* Computing 2nd power */ d__1 = x[i]; t2 += d__1 * d__1; } t2 = m2 * sqrt(t2) + t; /* .....SEE WHETHER THE LENGTH OF THE STEP TAKEN SINCE STARTING THE */ /* INNER LOOP EXCEEDS HALF THE TOLERANCE..... */ if (global_1.ldt > t2 * (float).5) { kt = -1; } ++kt; if (kt > ktm) { goto L400; } /* L170: */ } /* .....THE INNER LOOP ENDS HERE. */ /* TRY QUADRATIC EXTRAPOLATION IN CASE WE ARE IN A CURVED VALLEY. */ /* L171: */ quad_(n, f, &x[1], &t, machep, &h); if (stoprun) {goto ret_;} dn = 0.; i__1 = *n; for (i = 1; i <= i__1; ++i) { d[i - 1] = 1. / sqrt(d[i - 1]); if (dn < d[i - 1]) { dn = d[i - 1]; } /* L175: */ } if (*prin > 3) { maprnt_(&c__1, q_1.v, &idim, n); } i__1 = *n; for (j = 1; j <= i__1; ++j) { s = d[j - 1] / dn; i__2 = *n; for (i = 1; i <= i__2; ++i) { /* L180: */ q_1.v[i + j * sz - sz1] = s * q_1.v[i + j * sz - sz1]; } } /* .....SCALE THE AXES TO TRY TO REDUCE THE CONDITION NUMBER..... */ if (scbd <= 1.) { goto L200; } s = vlarge; i__2 = *n; for (i = 1; i <= i__2; ++i) { sl = 0.; i__1 = *n; for (j = 1; j <= i__1; ++j) { /* L182: */ sl += q_1.v[i + j * sz - sz1] * q_1.v[i + j * sz - sz1]; } z[i - 1] = sqrt(sl); if (z[i - 1] < m4) { z[i - 1] = m4; } if (s > z[i - 1]) { s = z[i - 1]; } /* L185: */ } i__2 = *n; for (i = 1; i <= i__2; ++i) { sl = s / z[i - 1]; z[i - 1] = 1. / sl; if (z[i - 1] <= scbd) { goto L189; } sl = 1. / scbd; z[i - 1] = scbd; L189: i__1 = *n; for (j = 1; j <= i__1; ++j) { /* L190: */ q_1.v[i + j * sz - sz1] = sl * q_1.v[i + j * sz - sz1]; } /* L195: */ } /* .....CALCULATE A NEW SET OF ORTHOGONAL DIRECTIONS BEFORE REPEATING */ /* THE MAIN LOOP. */ /* FIRST TRANSPOSE V FOR MINFIT: */ L200: i__2 = *n; for (i = 2; i <= i__2; ++i) { im1 = i - 1; i__1 = im1; for (j = 1; j <= i__1; ++j) { s = q_1.v[i + j * sz - sz1]; q_1.v[i + j * sz - sz1] = q_1.v[j + i * sz - sz1]; /* L210: */ q_1.v[j + i * sz - sz1] = s; } /* L220: */ } /* .....CALL MINFIT TO FIND THE SINGULAR VALUE DECOMPOSITION OF V. */ /* THIS GIVES THE PRINCIPAL VALUES AND PRINCIPAL DIRECTIONS OF THE */ /* APPROXIMATING QUADRATIC FORM WITHOUT SQUARING THE CONDITION */ /* NUMBER..... */ minfit_(&idim, n, machep, &vsmall, q_1.v, d, global_1.minfit_e); /* .....UNSCALE THE AXES..... */ if (scbd <= 1.) { goto L250; } i__2 = *n; for (i = 1; i <= i__2; ++i) { s = z[i - 1]; i__1 = *n; for (j = 1; j <= i__1; ++j) { /* L225: */ q_1.v[i + j * sz - sz1] = s * q_1.v[i + j * sz - sz1]; } /* L230: */ } i__2 = *n; for (i = 1; i <= i__2; ++i) { s = 0.; i__1 = *n; for (j = 1; j <= i__1; ++j) { /* L235: */ /* Computing 2nd power */ d__1 = q_1.v[j + i * sz - sz1]; s += d__1 * d__1; } s = sqrt(s); d[i - 1] = s * d[i - 1]; s = 1 / s; i__1 = *n; for (j = 1; j <= i__1; ++j) { /* L240: */ q_1.v[j + i * sz - sz1] = s * q_1.v[j + i * sz - sz1]; } /* L245: */ } L250: i__2 = *n; for (i = 1; i <= i__2; ++i) { dni = dn * d[i - 1]; if (dni > large) { goto L265; } if (dni < small) { goto L260; } d[i - 1] = 1 / (dni * dni); goto L270; L260: d[i - 1] = vlarge; goto L270; L265: d[i - 1] = vsmall; L270: ; } /* .....SORT THE EIGENVALUES AND EIGENVECTORS..... */ sort_(&idim, n, d, q_1.v); global_1.dmin_ = d[*n - 1]; if (global_1.dmin_ < small) { global_1.dmin_ = small; } illc = FALSE_; if (m2 * d[0] > global_1.dmin_) { illc = TRUE_; } }else{ if (fabs(s) < t) { goto L400; } } if (*prin > 1 && scbd > 1.) { vcprnt_(&c__2, z, n); } if (*prin > 1) { vcprnt_(&c__3, d, n); } if (*prin > 3) { maprnt_(&c__2, q_1.v, &idim, n); } if (after_quad) { struct QStruct* qsav; double* dsav; qsav = q_hoc; q_hoc = q_; dsav = d_hoc; d_hoc = d_; hoc_after_prax_quad(after_quad); q_hoc = qsav; d_hoc = dsav; } if (--praxstep == 0) { /* allows analysis of approach to fit by */ praxstep = 0; goto L400; } /* .....THE MAIN LOOP ENDS HERE..... */ goto L40; /* .....RETURN..... */ L400: if (*prin > 0) { vcprnt_(&c__3, d, n); maprnt_(&c__2, q_1.v, &idim, n); vcprnt_(&c__4, &x[1], n); } /* for re-entrancy */ ret_: ret_val = global_1.fx; gstruct_free(global_); global_ = gsav; if (q_hoc) { qstruct_free(q_hoc); free(d_hoc); } q_hoc = q_; d_hoc = d_; q_ = qsav; d_ = dsav; free(y); free(z); return ret_val; } /* praxis_ */ #undef d static /* Subroutine */ int minfit_(m, n, machep, tol, ab, q, e) integer *m, *n; doublereal *machep, *tol, *ab, *q, *e; { /* System generated locals */ integer ab_dim1, ab_offset, i__1, i__2, i__3; doublereal d__1, d__2; /* Builtin functions */ /* Local variables */ doublereal temp, c, f, g, h; integer i, j, k, l; doublereal s, x, y, z; integer l2, ii, kk, kt, ll2, lp1; doublereal eps; /* ...AN IMPROVED VERSION OF MINFIT (SEE GOLUB AND REINSCH, 1969) */ /* RESTRICTED TO M=N,P=0. */ /* THE SINGULAR VALUES OF THE ARRAY AB ARE RETURNED IN Q AND AB IS */ /* OVERWRITTEN WITH THE ORTHOGONAL MATRIX V SUCH THAT U.DIAG(Q) = AB.V, */ /* WHERE U IS ANOTHER ORTHOGONAL MATRIX. */ /* ...HOUSEHOLDER'S REDUCTION TO BIDIAGONAL FORM... */ /* Parameter adjustments */ --q; ab_dim1 = *m; ab_offset = ab_dim1 + 1; ab -= ab_offset; /* Function Body */ if (*n == 1) { goto L200; } eps = *machep; g = 0.; x = 0.; i__1 = *n; for (i = 1; i <= i__1; ++i) { e[i - 1] = g; s = 0.; l = i + 1; i__2 = *n; for (j = i; j <= i__2; ++j) { /* L1: */ /* Computing 2nd power */ d__1 = ab[j + i * ab_dim1]; s += d__1 * d__1; } g = 0.; if (s < *tol) { goto L4; } f = ab[i + i * ab_dim1]; g = sqrt(s); if (f >= 0.) { g = -g; } h = f * g - s; ab[i + i * ab_dim1] = f - g; if (l > *n) { goto L4; } i__2 = *n; for (j = l; j <= i__2; ++j) { f = 0.; i__3 = *n; for (k = i; k <= i__3; ++k) { /* L2: */ f += ab[k + i * ab_dim1] * ab[k + j * ab_dim1]; } f /= h; i__3 = *n; for (k = i; k <= i__3; ++k) { /* L3: */ ab[k + j * ab_dim1] += f * ab[k + i * ab_dim1]; } } L4: q[i] = g; s = 0.; if (i == *n) { goto L6; } i__3 = *n; for (j = l; j <= i__3; ++j) { /* L5: */ s += ab[i + j * ab_dim1] * ab[i + j * ab_dim1]; } L6: g = 0.; if (s < *tol) { goto L10; } if (i == *n) { goto L16; } f = ab[i + (i + 1) * ab_dim1]; L16: g = sqrt(s); if (f >= 0.) { g = -g; } h = f * g - s; if (i == *n) { goto L10; } ab[i + (i + 1) * ab_dim1] = f - g; i__3 = *n; for (j = l; j <= i__3; ++j) { /* L7: */ e[j - 1] = ab[i + j * ab_dim1] / h; } i__3 = *n; for (j = l; j <= i__3; ++j) { s = 0.; i__2 = *n; for (k = l; k <= i__2; ++k) { /* L8: */ s += ab[j + k * ab_dim1] * ab[i + k * ab_dim1]; } i__2 = *n; for (k = l; k <= i__2; ++k) { /* L9: */ ab[j + k * ab_dim1] += s * e[k - 1]; } } L10: y = (d__1 = q[i], fabs(d__1)) + (d__2 = e[i - 1], fabs(d__2)); /* L11: */ if (y > x) { x = y; } } /* ...ACCUMULATION OF RIGHT-HAND TRANSFORMATIONS... */ ab[*n + *n * ab_dim1] = 1.; g = e[*n - 1]; l = *n; i__1 = *n; for (ii = 2; ii <= i__1; ++ii) { i = *n - ii + 1; if (g == 0.) { goto L23; } h = ab[i + (i + 1) * ab_dim1] * g; i__2 = *n; for (j = l; j <= i__2; ++j) { /* L20: */ ab[j + i * ab_dim1] = ab[i + j * ab_dim1] / h; } i__2 = *n; for (j = l; j <= i__2; ++j) { s = 0.; i__3 = *n; for (k = l; k <= i__3; ++k) { /* L21: */ s += ab[i + k * ab_dim1] * ab[k + j * ab_dim1]; } i__3 = *n; for (k = l; k <= i__3; ++k) { /* L22: */ ab[k + j * ab_dim1] += s * ab[k + i * ab_dim1]; } } L23: i__3 = *n; for (j = l; j <= i__3; ++j) { ab[i + j * ab_dim1] = 0.; /* L24: */ ab[j + i * ab_dim1] = 0.; } ab[i + i * ab_dim1] = 1.; g = e[i - 1]; /* L25: */ l = i; } /* ...DIAGONALIZATION OF THE BIDIAGONAL FORM... */ /* L100: */ eps *= x; i__1 = *n; for (kk = 1; kk <= i__1; ++kk) { k = *n - kk + 1; kt = 0; L101: ++kt; if (kt <= 30) { goto L102; } e[k - 1] = 0.; printf("qr failed\n"); L102: i__3 = k; for (ll2 = 1; ll2 <= i__3; ++ll2) { l2 = k - ll2 + 1; l = l2; if ((d__1 = e[l - 1], fabs(d__1)) <= eps) { goto L120; } if (l == 1) { goto L103; } if ((d__1 = q[l - 1], fabs(d__1)) <= eps) { goto L110; } L103: ; } /* ...CANCELLATION OF E(L) IF L>1... */ L110: c = 0.; s = 1.; i__3 = k; for (i = l; i <= i__3; ++i) { f = s * e[i - 1]; e[i - 1] = c * e[i - 1]; if (fabs(f) <= eps) { goto L120; } g = q[i]; /* ...Q(I) = H = DSQRT(G*G + F*F)... */ if (fabs(f) < fabs(g)) { goto L113; } if (f != 0.) { goto L112; } else { goto L111; } L111: h = 0.; goto L114; L112: /* Computing 2nd power */ d__1 = g / f; h = fabs(f) * sqrt(d__1 * d__1 + 1); goto L114; L113: /* Computing 2nd power */ d__1 = f / g; h = fabs(g) * sqrt(d__1 * d__1 + 1); L114: q[i] = h; if (h != 0.) { goto L115; } g = 1.; h = 1.; L115: c = g / h; /* L116: */ s = -f / h; } /* ...TEST FOR CONVERGENCE... */ L120: z = q[k]; if (l == k) { goto L140; } /* ...SHIFT FROM BOTTOM 2*2 MINOR... */ x = q[l]; y = q[k - 1]; g = e[k - 2]; h = e[k - 1]; f = ((y - z) * (y + z) + (g - h) * (g + h)) / (h * 2 * y); g = sqrt(f * f + 1.); temp = f - g; if (f >= 0.) { temp = f + g; } f = ((x - z) * (x + z) + h * (y / temp - h)) / x; /* ...NEXT QR TRANSFORMATION... */ c = 1.; s = 1.; lp1 = l + 1; if (lp1 > k) { goto L133; } i__3 = k; for (i = lp1; i <= i__3; ++i) { g = e[i - 1]; y = q[i]; h = s * g; g *= c; if (fabs(f) < fabs(h)) { goto L123; } if (f != 0.) { goto L122; } else { goto L121; } L121: z = 0.; goto L124; L122: /* Computing 2nd power */ d__1 = h / f; z = fabs(f) * sqrt(d__1 * d__1 + 1); goto L124; L123: /* Computing 2nd power */ d__1 = f / h; z = fabs(h) * sqrt(d__1 * d__1 + 1); L124: e[i - 2] = z; if (z != 0.) { goto L125; } f = 1.; z = 1.; L125: c = f / z; s = h / z; f = x * c + g * s; g = -x * s + g * c; h = y * s; y *= c; i__2 = *n; for (j = 1; j <= i__2; ++j) { x = ab[j + (i - 1) * ab_dim1]; z = ab[j + i * ab_dim1]; ab[j + (i - 1) * ab_dim1] = x * c + z * s; /* L126: */ ab[j + i * ab_dim1] = -x * s + z * c; } if (fabs(f) < fabs(h)) { goto L129; } if (f != 0.) { goto L128; } else { goto L127; } L127: z = 0.; goto L130; L128: /* Computing 2nd power */ d__1 = h / f; z = fabs(f) * sqrt(d__1 * d__1 + 1); goto L130; L129: /* Computing 2nd power */ d__1 = f / h; z = fabs(h) * sqrt(d__1 * d__1 + 1); L130: q[i - 1] = z; if (z != 0.) { goto L131; } f = 1.; z = 1.; L131: c = f / z; s = h / z; f = c * g + s * y; /* L132: */ x = -s * g + c * y; } L133: e[l - 1] = 0.; e[k - 1] = f; q[k] = x; goto L101; /* ...CONVERGENCE: Q(K) IS MADE NON-NEGATIVE... */ L140: if (z >= 0.) { goto L150; } q[k] = -z; i__3 = *n; for (j = 1; j <= i__3; ++j) { /* L141: */ ab[j + k * ab_dim1] = -ab[j + k * ab_dim1]; } L150: ; } return 0; L200: q[1] = ab[ab_dim1 + 1]; ab[ab_dim1 + 1] = 1.; return 0; } /* minfit_ */ static /* Subroutine */ int min_(n, j, nits, d2, x1, f1, fk, f, x, t, machep, h) integer *n, *j, *nits; doublereal *d2, *x1, *f1; logical *fk; doublereal (*f) (); doublereal *x, *t, *machep, *h; { /* System generated locals */ integer i__1; doublereal d__1, d__2; /* Builtin functions */ /* Local variables */ extern doublereal flin_(); doublereal temp; integer i, k; integer sz, sz1; doublereal s, small, d1, f0, f2, m2, m4, t2, x2, fm; logical dz; doublereal xm, sf1, sx1; /* ...THE SUBROUTINE MIN MINIMIZES F FROM X IN THE DIRECTION V(*,J) UNLESS */ /* J IS LESS THAN 1, WHEN A QUADRATIC SEARCH IS MADE IN THE PLANE */ /* DEFINED BY Q0,Q1,X. */ /* D2 IS EITHER ZERO OR AN APPROXIMATION TO HALF F". */ /* ON ENTRY, X1 IS AN ESTIMATE OF THE DISTANCE FROM X TO THE MINIMUM */ /* ALONG V(*,J) (OR, IF J=0, A CURVE). ON RETURN, X1 IS THE DISTANCE */ /* FOUND. */ /* IF FK=.TRUE., THEN F1 IS FLIN(X1). OTHERWISE X1 AND F1 ARE IGNORED */ /* ON ENTRY UNLESS FINAL FX IS GREATER THAN F1. */ /* NITS CONTROLS THE NUMBER OF TIMES AN ATTEMPT WILL BE MADE TO HALVE */ /* THE INTERVAL. */ /* Parameter adjustments */ --x; /* Function Body */ sz = *n; sz1 = sz + 1; /* Computing 2nd power */ d__1 = *machep; small = d__1 * d__1; m2 = sqrt(*machep); m4 = sqrt(m2); sf1 = *f1; sx1 = *x1; k = 0; xm = 0.; fm = global_1.fx; f0 = global_1.fx; dz = *d2 < *machep; /* ...FIND THE STEP SIZE... */ s = 0.; i__1 = *n; for (i = 1; i <= i__1; ++i) { /* L1: */ /* Computing 2nd power */ d__1 = x[i]; s += d__1 * d__1; } s = sqrt(s); temp = *d2; if (dz) { temp = global_1.dmin_; } t2 = m4 * sqrt(fabs(global_1.fx) / temp + s * global_1.ldt) + m2 * global_1.ldt; s = m4 * s + *t; if (dz && t2 > s) { t2 = s; } t2 = dmax(t2,small); /* Computing MIN */ d__1 = t2; d__2 = *h * .01; t2 = dmin(d__1,d__2); if (! (*fk) || *f1 > fm) { goto L2; } xm = *x1; fm = *f1; L2: if (*fk && fabs(*x1) >= t2) { goto L3; } temp = 1.; if (*x1 < 0.) { temp = -1.; } *x1 = temp * t2; *f1 = flin_(n, j, x1, f, &x[1], &global_1.nf, global_1.flin_t); if (stoprun) {return global_1.fx; } L3: if (*f1 > fm) { goto L4; } xm = *x1; fm = *f1; L4: if (! dz) { goto L6; } /* ...EVALUATE FLIN AT ANOTHER POINT AND ESTIMATE THE SECOND DERIVATIVE... */ x2 = -(*x1); if (f0 >= *f1) { x2 = *x1 * 2.; } f2 = flin_(n, j, &x2, f, &x[1], &global_1.nf, global_1.flin_t); if (stoprun) {return global_1.fx; } if (f2 > fm) { goto L5; } xm = x2; fm = f2; L5: *d2 = (x2 * (*f1 - f0) - *x1 * (f2 - f0)) / (*x1 * x2 * (*x1 - x2)); /* ...ESTIMATE THE FIRST DERIVATIVE AT 0... */ L6: d1 = (*f1 - f0) / *x1 - *x1 * *d2; dz = TRUE_; /* ...PREDICT THE MINIMUM... */ if (*d2 > small) { goto L7; } x2 = *h; if (d1 >= 0.) { x2 = -x2; } goto L8; L7: x2 = d1 * -.5 / *d2; L8: if (fabs(x2) <= *h) { goto L11; } if (x2 <= 0.) { goto L9; } else { goto L10; } L9: x2 = -(*h); goto L11; L10: x2 = *h; /* ...EVALUATE F AT THE PREDICTED MINIMUM... */ L11: f2 = flin_(n, j, &x2, f, &x[1], &global_1.nf, global_1.flin_t); if (stoprun) {return global_1.fx; } if (k >= *nits || f2 <= f0) { goto L12; } /* ...NO SUCCESS, SO TRY AGAIN... */ ++k; if (f0 < *f1 && *x1 * x2 > 0.) { goto L4; } x2 *= .5; goto L11; /* ...INCREMENT THE ONE-DIMENSIONAL SEARCH COUNTER... */ L12: ++global_1.nl; if (f2 <= fm) { goto L13; } x2 = xm; goto L14; L13: fm = f2; /* ...GET A NEW ESTIMATE OF THE SECOND DERIVATIVE... */ L14: if ((d__1 = x2 * (x2 - *x1), fabs(d__1)) <= small) { goto L15; } *d2 = (x2 * (*f1 - f0) - *x1 * (fm - f0)) / (*x1 * x2 * (*x1 - x2)); goto L16; L15: if (k > 0) { *d2 = 0.; } L16: if (*d2 <= small) { *d2 = small; } *x1 = x2; global_1.fx = fm; if (sf1 >= global_1.fx) { goto L17; } global_1.fx = sf1; *x1 = sx1; /* ...UPDATE X FOR LINEAR BUT NOT PARABOLIC SEARCH... */ L17: if (*j == 0) { return 0; } i__1 = *n; for (i = 1; i <= i__1; ++i) { /* L18: */ x[i] += *x1 * q_1.v[i + *j * sz - sz1]; } return 0; } /* min_ */ static doublereal flin_(n, j, l, f, x, nf, t) integer *n, *j; doublereal *l; doublereal (*f) (); doublereal *x; integer *nf; doublereal *t; { /* System generated locals */ integer i__1; doublereal ret_val; /* Local variables */ integer i; integer sz, sz1; /* ...FLIN IS THE FUNCTION OF ONE REAL VARIABLE L THAT IS MINIMIZED */ /* BY THE SUBROUTINE MIN... */ /* Parameter adjustments */ --x; /* Function Body */ if (*j == 0) { goto L2; } /* ...THE SEARCH IS LINEAR... */ i__1 = *n; sz = i__1; sz1 = sz + 1; for (i = 1; i <= i__1; ++i) { /* L1: */ t[i - 1] = x[i] + *l * q_1.v[i + *j * sz - sz1]; } goto L4; /* ...THE SEARCH IS ALONG A PARABOLIC SPACE CURVE... */ L2: q_1.qa = *l * (*l - q_1.qd1) / (q_1.qd0 * (q_1.qd0 + q_1.qd1)); q_1.qb = (*l + q_1.qd0) * (q_1.qd1 - *l) / (q_1.qd0 * q_1.qd1); q_1.qc = *l * (*l + q_1.qd0) / (q_1.qd1 * (q_1.qd0 + q_1.qd1)); i__1 = *n; for (i = 1; i <= i__1; ++i) { /* L3: */ t[i - 1] = q_1.qa * q_1.q0[i - 1] + q_1.qb * x[i] + q_1.qc * q_1.q1[i - 1]; } /* ...THE FUNCTION EVALUATION COUNTER NF IS INCREMENTED... */ L4: ++(*nf); ret_val = (*f)(t, *n); return ret_val; } /* flin_ */ static /* Subroutine */ int sort_(m, n, d, v) integer *m, *n; doublereal *d, *v; { /* System generated locals */ integer v_dim1, v_offset, i__1, i__2; /* Local variables */ integer i, j, k; doublereal s; integer ip1, nm1; /* ...SORTS THE ELEMENTS OF D(N) INTO DESCENDING ORDER AND MOVES THE */ /* CORRESPONDING COLUMNS OF V(N,N). */ /* M IS THE ROW DIMENSION OF V AS DECLARED IN THE CALLING PROGRAM. */ /* Parameter adjustments */ v_dim1 = *m; v_offset = v_dim1 + 1; v -= v_offset; --d; /* Function Body */ if (*n == 1) { return 0; } nm1 = *n - 1; i__1 = nm1; for (i = 1; i <= i__1; ++i) { k = i; s = d[i]; ip1 = i + 1; i__2 = *n; for (j = ip1; j <= i__2; ++j) { if (d[j] <= s) { goto L1; } k = j; s = d[j]; L1: ; } if (k <= i) { goto L3; } d[k] = d[i]; d[i] = s; i__2 = *n; for (j = 1; j <= i__2; ++j) { s = v[j + i * v_dim1]; v[j + i * v_dim1] = v[j + k * v_dim1]; /* L2: */ v[j + k * v_dim1] = s; } L3: ; } return 0; } /* sort_ */ static /* Subroutine */ int quad_(n, f, x, t, machep, h) integer *n; doublereal (*f) (); doublereal *x, *t, *machep, *h; { /* System generated locals */ integer i__1; doublereal d__1; /* Builtin functions */ /* Local variables */ integer i; doublereal l, s, value; extern /* Subroutine */ int min_(); /* ...QUAD LOOKS FOR THE MINIMUM OF F ALONG A CURVE DEFINED BY Q0,Q1,X... */ /* Parameter adjustments */ --x; /* Function Body */ s = global_1.fx; global_1.fx = q_1.qf1; q_1.qf1 = s; q_1.qd1 = 0.; i__1 = *n; for (i = 1; i <= i__1; ++i) { s = x[i]; l = q_1.q1[i - 1]; x[i] = l; q_1.q1[i - 1] = s; /* L1: */ /* Computing 2nd power */ d__1 = s - l; q_1.qd1 += d__1 * d__1; } q_1.qd1 = sqrt(q_1.qd1); l = q_1.qd1; s = 0.; if (q_1.qd0 <= 0. || q_1.qd1 <= 0. || global_1.nl < *n * 3 * *n) { goto L2; } value = q_1.qf1; min_(n, &c__0, &c__2, &s, &l, &value, &c__1, f, &x[1], t, machep, h); if (stoprun) {return global_1.fx; } q_1.qa = l * (l - q_1.qd1) / (q_1.qd0 * (q_1.qd0 + q_1.qd1)); q_1.qb = (l + q_1.qd0) * (q_1.qd1 - l) / (q_1.qd0 * q_1.qd1); q_1.qc = l * (l + q_1.qd0) / (q_1.qd1 * (q_1.qd0 + q_1.qd1)); goto L3; L2: global_1.fx = q_1.qf1; q_1.qa = 0.; q_1.qb = q_1.qa; q_1.qc = 1.; L3: q_1.qd0 = q_1.qd1; i__1 = *n; for (i = 1; i <= i__1; ++i) { s = q_1.q0[i - 1]; q_1.q0[i - 1] = x[i]; /* L4: */ x[i] = q_1.qa * s + q_1.qb * x[i] + q_1.qc * q_1.q1[i - 1]; } return 0; } /* quad_ */ static /* Subroutine */ int vcprnt_(option, v, n) integer *option; doublereal *v; integer *n; { /* System generated locals */ integer i__1; /* Local variables */ integer i; /* Parameter adjustments */ --v; /* Function Body */ switch ((int)*option) { case 1: goto L1; case 2: goto L2; case 3: goto L3; case 4: goto L4; } L1: printf("The second difference array d[*] is :\n"); i__1 = *n; for (i = 1; i <= i__1; ++i) { printf("%g\n",v[i]); } return 0; L2: printf("The scale factors are:\n"); i__1 = *n; for (i = 1; i <= i__1; ++i) { printf("%g\n",v[i]); } return 0; L3: printf("The approximating quadratic form has the principal values:\n"); i__1 = *n; for (i = 1; i <= i__1; ++i) { printf("%g\n",v[i]); } return 0; L4: printf("x is:\n"); i__1 = *n; for (i = 1; i <= i__1; ++i) { printf("%g\n",v[i]); } return 0; } /* vcprnt_ */ static /* Subroutine */ int print_(n, x, prin, fmin) integer *n; doublereal *x; integer *prin; doublereal *fmin; { /* System generated locals */ integer i__1; doublereal d__1; /* Local variables */ integer i; doublereal ln; /* Parameter adjustments */ --x; /* Function Body */ printf("After "); printf("%ld",global_1.nl); printf(" linear searches, the function has been evaluated "); printf("%ld times.\n",global_1.nf); printf("The smallest value found is f(x) = "); printf("%g\n",global_1.fx); if (global_1.fx <= *fmin) { goto L1; } d__1 = global_1.fx - *fmin; ln = log10(d__1); printf("log (f(x)) - "); printf("%g",*fmin); printf(" = "); printf("%g\n",ln); goto L2; L1: printf("log (f(x)) -- "); printf("%g",*fmin); printf(" is undefined\n"); L2: if (*n > 4 && *prin <= 2) { return 0; } i__1 = *n; for (i = 1; i <= i__1; ++i) { printf("x is:"); printf("%g\n",x[i]); } return 0; } /* print_ */ static /* Subroutine */ int maprnt_(option, v, m, n) integer *option; doublereal *v; integer *m, *n; { /* System generated locals */ integer v_dim1, v_offset, i__1, i__2; /* Local variables */ integer i, j, low, upp; /* ...THE SUBROUTINE MAPRNT PRINTS THE COLUMNS OF THE NXN MATRIX V */ /* WITH A HEADING AS SPECIFIED BY OPTION. */ /* M IS THE ROW DIMENSION OF V AS DECLARED IN THE CALLING PROGRAM... */ /* Parameter adjustments */ v_dim1 = *m; v_offset = v_dim1 + 1; v -= v_offset; /* Function Body */ low = 1; upp = 5; switch ((int)*option) { case 1: goto L1; case 2: goto L2; } L1: printf("The new directions are:\n"); goto L3; L2: printf("and the principal axes:\n"); L3: if (*n < upp) { upp = *n; } i__1 = *n; for (i = 1; i <= i__1; ++i) { /* L4: */ printf("%3ld", i); i__2 = upp; for (j = low; j <= i__2; ++j) { printf(" %12g", v[i*v_dim1 + j]); } printf("\n"); } low += 5; if (*n < low) { return 0; } upp += 5; goto L3; } /* maprnt_ */ #include <../oc/mcran4.h> uint32_t nrn_praxis_ran_index; static doublereal random_(naught) integer *naught; { double x; return mcell_ran4(&nrn_praxis_ran_index, &x, 1, 1.); #if 0 /* Initialized data */ static logical init = FALSE_; /* System generated locals */ doublereal ret_val; /* Local variables */ static doublereal half; static integer i, j, q, r; static doublereal ran1; static integer ran2; static doublereal ran3[127]; if (init) { goto L3; } r = *naught % 8190 + 1; ran2 = 128; for (i = 1; i <= 127; ++i) { --ran2; ran1 = -36028797018963968.; for (j = 1; j <= 7; ++j) { r = r * 1756 % 8191; q = r / 32; /* L1: */ ran1 = (ran1 + q) * .00390625; } /* L2: */ ran3[ran2 - 1] = ran1; } init = TRUE_; L3: if (ran2 == 1) { ran2 = 128; } --ran2; ran1 += ran3[ran2 - 1]; half = .5; if (ran1 >= 0.) { half = -half; } ran1 += half; ran3[ran2 - 1] = ran1; ret_val = ran1 + .5; return ret_val; #endif } /* random_ */ neuron-7.5/src/scopmath/pulse.c000077500000000000000000000027161323325274500166130ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: pulse.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "pulse.c,v 1.1.1.1 1994/10/12 17:22:22 hines Exp" ; #endif /*----------------------------------------------------------------------------- * * PULSE() * * Generates a single pulse of specified height and duration * * Calling sequence: * * pulse(t, lag, height, duration) * * Arguments: * Input: t, double the independent variable, * usually time * * lag, double value of t at which pulse begins * * height, double pulse height * * duration,double duration of the pulse * * Output: reset_integ, *int set to 1 if discontinuity is * generated * old_value, *double saved value from previous * call * * Returns: * * Functions called: * * Files accessed: * none * */ double pulse(reset_integ, old_value, t, lag, height, duration) double *old_value, t, lag, height, duration; int *reset_integ; { double value = 0.0; if (t < lag) value = 0.0; else if (t < lag + duration) value = height; else value = 0.0; if (*old_value != value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/quad.c000077500000000000000000000021231323325274500164050ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: quad.c * * Copyright (c) 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "quad.c,v 1.1.1.1 1994/10/12 17:22:22 hines Exp" ; #endif /*-------------------------------------------------------------- * * Abstract: quadrature * * Numerical quadrature of tabulated function by composite * trapezoid rule * * Returns: value of integral * * Calling sequence: quadrature(npts, x, y) * * * Arguments: * npts, double number of points in tabulated function * x[], double array of independent variable values * y[], double array of dependent variable values * *--------------------------------------------------------------*/ double quadrature(npts, x, y) double npts, x[], y[]; { int n, i; double integral = 0.0; n = (int) (npts - 0.9); for (i = 0; i < n; i++) integral += 0.5 * (x[i + 1] - x[i]) * (y[i] + y[i + 1]); return (integral); } neuron-7.5/src/scopmath/ramp.c000077500000000000000000000033001323325274500164100ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: ramp.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "ramp.c,v 1.1.1.1 1994/10/12 17:22:23 hines Exp" ; #endif /*----------------------------------------------------------------------------- * * RAMP() * * Computes the value of a ramp function of specified height * and duration * * Calling sequence: * ramp(t, lag, height, duration) * * Arguments: * Input: t, double the independent variable, * usually time * * lag, double value of t at which ramp begins * * height, double ramp height * * duration,double duration of the ramp incline * * Output: reset_integ, *int set to 1 if discontinuity is * generated * old_value, *double saved value from previous * call * * Returns: * Double precision value of the ramp function * * Functions called: * none * * Files accessed: * none * */ double ramp(reset_integ, old_value, t, lag, height, duration) double *old_value, t, lag, height, duration; int *reset_integ; { if (t < lag) { if (*old_value != 0.) *reset_integ = 1; *old_value = 0.; return (0.0); } else if (t > lag + duration) { if (*old_value != height) *reset_integ = 1; *old_value = height; return (height); } else { if (*old_value == 0. || *old_value == height) *reset_integ = 1; *old_value = (t - lag) * height / duration; return (*old_value); } } neuron-7.5/src/scopmath/revhyper.c000077500000000000000000000026101323325274500173200ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: revhyper.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "revhyper.c,v 1.1.1.1 1994/10/12 17:22:23 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: revhyperbol() */ /* */ /* Calculates the value of a reverse hyperbolic function */ /* given the values of two constant parameters. */ /* */ /* Returns: Double precision value of the hyperbolic function */ /* */ /* Calling sequence: revhyperbol(x, max, K) */ /* */ /* Arguments */ /* Input: x, double the independent variable */ /* */ /* max, double maximum value of the hyperbolic */ /* function */ /* */ /* K, double value of x for which the */ /* function value is max/2 */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /* */ /****************************************************************/ double revhyperbol(x, max, K) double x, max, K; { double value; value = (max * K) / (x + K); return (value); } neuron-7.5/src/scopmath/revsawto.c000077500000000000000000000035401323325274500173310ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: revsawto.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "revsawto.c,v 1.2 1997/08/30 14:32:15 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: revsawtooth() */ /* */ /* Computes the value of a reverse sawtooth function (a */ /* periodic declining ramp) of specified amplitude and */ /* period */ /* */ /* Returns: Double precision value of the reverse sawtooth */ /* function */ /* */ /* Calling sequence: revsawtooth(t, period, amplitude) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* period, double duration of the ramp decline */ /* for each cycle */ /* */ /* amplitude, double */ /* ramp height for each cycle */ /* */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double revsawtooth(reset_integ, old_value, t, period, amplitude) double *old_value, t, period, amplitude; int *reset_integ; { double value; #ifndef MAC extern double modf(); #endif value = amplitude * (1.0 - modf(t / period, &value)); if (value != *old_value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/revsigmo.c000077500000000000000000000032411323325274500173100ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: revsigmo.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "revsigmo.c,v 1.2 1997/08/30 14:32:15 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: revsigmoid */ /* */ /* Calculates the value of a reverse sigmoidal function of */ /* one variable given the values of three constants in the */ /* function. */ /* */ /* Returns: Double precision value of the sigmoidal function */ /* */ /* Calling sequence: revsigmoid(x, max, K, n) */ /* */ /* Arguments */ /* Input: x, double the independent variable */ /* */ /* max, double maximum value the sigmoidal */ /* function can attain */ /* */ /* K, double the value for x at which the */ /* function value is max/2 */ /* */ /* n, double parameter controlling the */ /* steepness of the sigmoid curve. */ /* It is the power to which x and */ /* K are raised. */ /* */ /* Output: arguments are unchanged */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double revsigmoid(x, max, K, n) double x, max, K, n; { double value, temp; #ifndef MAC extern double pow(); #endif temp = pow(K, n); value = (max * temp) / (temp + pow(x, n)); return (value); } neuron-7.5/src/scopmath/romberg.c000077500000000000000000000047611323325274500171220ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: romberg.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "romberg.c,v 1.3 1999/01/04 12:46:50 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: romberg() */ /* */ /* Romberg quadrature over interval [a, b]. Toler is the */ /* convergence criterion. Func is the function to be inte- */ /* grated. The result is stored in integral. */ /* */ /* Calling sequence: romberg(a, b, func) */ /* */ /* Returns: value of the integral */ /* */ /* Arguments: */ /* Input: a, double beginning of the integration */ /* interval */ /* */ /* b, double end of the integration interval */ /* */ /* func name of the function to be */ /* integrated */ /* */ /* Functions called: func(x), supplied by user */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #include #include "errcodes.h" #define CONTINUE 0 double romberg(a, b, func) double a, b, (*func) (); { int i, nhalve, nsteps, status = CONTINUE; double h, FA, store1, store2, *T, integral; extern double *makevector(); extern int freevector(), abort_run(); /* Allocate storage for Romberg tableau */ T = makevector(MAXHALVE + 1); /* First estimate of integral from elementary trapezoid rule */ nhalve = 0; h = b - a; integral = T[0] = FA = ((*func) (a) + (*func) (b)) / 2.0; nsteps = 1; while (status == CONTINUE) { nhalve++; h /= 2.0; nsteps *= 2; store1 = T[0]; /* Get new estimate of integral by composite trapezoid rule */ T[0] = FA; for (i = 1; i < nsteps; i++) T[0] += (*func) (a + i * h); T[0] = h * T[0]; /* Richardson extrapolation */ for (i = 1; i <= nhalve; i++) { store2 = T[i]; T[i] = T[i - 1] + (T[i - 1] - store1) / (pow(4., (double) i) - 1.0); store1 = store2; } /* Check for convergence or maximum iterations */ if (fabs(T[nhalve] - integral) <= CONVERGE) status = SUCCESS; else if (nhalve >= MAXHALVE) status = EXCEED_ITERS; integral = T[nhalve]; } freevector(T); if (status != SUCCESS) { abort_run(status); } return (integral); } neuron-7.5/src/scopmath/runge.c000077500000000000000000000117641323325274500166060ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: runge.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "runge.c,v 1.1.1.1 1994/10/12 17:22:23 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: runge */ /* */ /* Solves simultaneous differential equations using a fourth */ /* order Runge-Kutta algorithm. The independent variable is */ /* assumed to be time. The dependent variables are indexed */ /* from 0 to n - 1; n = no. of differential equations. The */ /* state variables and their derivatives must each be in a */ /* contiguous block in the variable array and quantities */ /* refering to the same variable must appear in the same */ /* order in each block. */ /* */ /* Returns: int error code (aways SUCCESS for runge) */ /* */ /* Calling sequence: */ /* runge(n, y, d, p, t, h, dy, work) */ /* */ /* Arguments */ /* Input: n, int, number of differential equations */ /* */ /* y, pointer to array of addresses of the */ /* state variables */ /* */ /* d, pointer to array of addresses of the */ /* derivatives of the state variables */ /* */ /* p, double precision variable array */ /* */ /* t, pointer to current time */ /* */ /* h, double, integration step size = delta_t */ /* */ /* dy, name of function which evaluates the time */ /* derivatives of the dependent variables */ /* */ /* *work, pointer to double precision work array */ /* */ /* Output: p[], double precision array containing the */ /* values of the dependent variables and their */ /* derivatives at time + h. Time is also updated. */ /* */ /* Functions called: (*dy), which is derfunc(p) in SCoP */ /* */ /* Files accesses: none */ /* */ /****************************************************************/ #include "errcodes.h" int runge(_ninits, n, y, d, p, t, h, dy, work) int _ninits, n, (*dy) (); double p[], *t, h, **work; int y[]; int d[]; #define d_(arg) p[d[arg]] #define y_(arg) p[y[arg]] { int i; double temp; extern double *makevector(); if (*work == (double *) 0) *work = makevector(n << 1); /* Get derivatives at current time point */ (*dy) (p); for (i = 0; i < n; i++) { /* Store values of state variables at current time */ (*work)[i] = y_(i); /* Eulerian extrapolation for half a time step */ temp = (h / 2.0) * (d_(i)); y_(i) += temp; /* Update solution */ (*work)[n + i] = (*work)[i] + temp / 3.0; } /* Get derivatives at extrapolated values of variables at t + h/2 */ *t += h / 2.0; (*dy) (p); for (i = 0; i < n; i++) { /* Backwards Eulerian extrapolation for half a time step */ temp = h * (d_(i)); y_(i) = (*work)[i] + temp / 2.0; /* Update solution */ (*work)[n + i] += temp / 3.0; } /* Get derivatives at new extrapolated values of variables at t + h/2 */ (*dy) (p); for (i = 0; i < n; i++) { /* Extrapolation of variables for full time step, using midpoint rule */ temp = h * (d_(i)); y_(i) = (*work)[i] + temp; /* Update solution */ (*work)[n + i] += temp / 3.0; } /* Get derivatives at extrapolated values of variables at t + h */ *t += h / 2.0; (*dy) (p); for (i = 0; i < n; i++) /* Compute the values of the dependent variables at t + h */ y_(i) = (*work)[n + i] + (h / 6.0) * (d_(i)); /* Restore t to original value -- it will be updated in model() */ *t -= h; return (SUCCESS); } neuron-7.5/src/scopmath/sawtooth.c000077500000000000000000000035641323325274500173350ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: sawtooth.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "sawtooth.c,v 1.2 1997/08/30 14:32:17 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: sawtooth() */ /* */ /* Computes the value of a sawtooth function (periodic ramp) */ /* of specified amplitude and period */ /* */ /* Returns: Double precision value of the sawtooth function */ /* */ /* Calling sequence: sawtooth(t, period, amplitude) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* period, double duration of the ramp incline */ /* for each cycle */ /* */ /* amplitude, double */ /* ramp height for each cycle */ /* */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /* Author: Michael C. Kohn */ /* */ /* Date: 23 June 1987 */ /* */ /****************************************************************/ double sawtooth(reset_integ, old_value, t, period, amplitude) double t, period, amplitude, *old_value; int *reset_integ; { double value; #ifndef MAC extern double modf(); #endif value = amplitude * modf(t / period, &value); if (value != *old_value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/schedule.c000077500000000000000000000076361323325274500172650ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: schedule.c * * Copyright (c) 1990-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "schedule.c,v 1.2 1997/08/30 14:32:18 hines Exp"; #endif /*------------------------------------------------------------------------ * Abstract: schedule() * * Produces a train of Dirac delta functions of amplitudes stored in * a reference data file. The amplitudes may be of any height and * with any spacing. * * Calling sequence: schedule(t, filename) * * Arguments: t double value of variable to test for next * scheduled event * filename char* file containing scheduled event points * and corresponding amplitudes generated * old_value, *double saved value from previous call * * Returns: amplitude if event scheduled, zero otherwise * * Files accessed: reference data file containing schedule and amplitudes * *----------------------------------------------------------------------*/ #include #include #include #include "errcodes.h" typedef struct event { char *file; int nevent; int count; double *sched_t; double *ampl; struct event *next_event; } event_t; static void init_event(); double schedule(reset_integ, old_value, t, filename) double *old_value, t; int *reset_integ; char *filename; { static event_t *event_root = (event_t *) 0; /* Root of linked list of schedules */ event_t *curr_event; extern int _ninits; static int initialized = 0; if (initialized < _ninits) /* Re-initialize event counters */ { curr_event = event_root; while (curr_event != (event_t *) 0) { curr_event->count = 0; curr_event = curr_event->next_event; } initialized = _ninits; } /* Search for event schedule in linked list */ curr_event = event_root; while (curr_event != (event_t *) 0) if (curr_event->file == filename) break; else curr_event = curr_event->next_event; if (curr_event == (event_t *) 0) { init_event(&curr_event, filename); /* Create a new schedule */ if (event_root == (event_t *) 0) /* Make it the root */ event_root = curr_event; else /* Add new schedule to the list */ { event_t *search_ptr = event_root; while (search_ptr->next_event != (event_t *) 0) search_ptr = search_ptr->next_event; search_ptr->next_event = curr_event; } } /* See if next event is scheduled */ if (curr_event->count < curr_event->nevent && t >= curr_event->sched_t[curr_event->count]) { *reset_integ = 1; return (curr_event->ampl[curr_event->count++]); } else return (0.0); } static void init_event(new_event, filename) event_t **new_event; char *filename; { FILE *datafile, *fopen(); int nevent = -6, i; char buff[81]; #ifndef MAC extern char *fgets(); #endif extern double *makevector(); extern int abort_run(); if ((datafile = fopen(filename, "r")) == NULL) abort_run(NODATA); /* Count number of scheduled events */ while (fgets(buff, 80, datafile) != NULL) nevent++; rewind(datafile); /* Create event data structure */ if ((*new_event = (event_t *) malloc((unsigned) sizeof(event_t))) == (event_t *) 0) abort_run(LOWMEM); (*new_event)->file = filename; (*new_event)->nevent = nevent; (*new_event)->count = 0; (*new_event)->sched_t = makevector(nevent); (*new_event)->ampl = makevector(nevent); (*new_event)->next_event = (event_t *) 0; /* Put data into event structure */ for (i = 0; i < 6; i++) /* Skip first 6 lines */ assert(fgets(buff, 80, datafile)); for (i = 0; i < nevent; i++) { assert(fgets(buff, 80, datafile)); sscanf(buff, "%lf %lf", &((*new_event)->sched_t[i]), &((*new_event)->ampl[i])); } fclose(datafile); } neuron-7.5/src/scopmath/scopenv.h000077500000000000000000000045311323325274500171420ustar00rootroot00000000000000/****************************************************************************** * * File: scopenv.h * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 * Duke University * * scopenv.h,v 1.1.1.1 1994/10/12 17:22:18 hines Exp * ******************************************************************************/ /****************************************************************************/ /* */ /* Enable one of the following statements to define the program environment */ /* */ /****************************************************************************/ /* * Define the system environment by removing the initial "/*" for only one of * the definitions for VMS, BSD4_2, SYSTEMV, MSIBMPC, or TURBOIBMPC */ #define BSD4_2 /* For Berkeley UNIX or EUNICE */ /*#define SYSTEMV /* For Bell Labs SYSTEM V UNIX */ /*#define VMS /* For VAX-11 C under VMS */ /*define MSIBMPC /* For IBMPC with Microsoft C compiler */ /*#define TURBOIBMPC /* For Borland Turbo C */ /****************************************************************************/ /* Do NOT modify any of the following statements */ #ifdef MSIBMPC #define IBMPC #endif #ifdef TURBOIBMPC #define IBMPC #endif #ifdef VMS #define UNIX /* Always define UNIX if VMS is defined */ #endif #ifdef BSD4_2 #define UNIX /* Always define UNIX if BSD4_2 is defined */ #endif #ifdef SYSTEMV #define UNIX /* Always define UNIX if SYSTEM V is defined */ #endif /* * Default directory paths for SCoP and SCoPfit help files * You must edit the path strings if you want to put the help files * in another directory. Remember to use "\\" in the path string for * the IBM PC; a single '\' is the "escape" signal in the C language. */ #define VMSDIR "SCOP$LIB:" #define UNIXDIR "/usr/local/lib/scop/" #define MSDOSDIR "C:\\scop\\" #ifdef VMS /* For VMS environment */ #define DIRECTORY VMSDIR #else #ifdef UNIX /* For Unix envirnoment */ #define DIRECTORY UNIXDIR #else /* For IBM PC environment */ #define DIRECTORY MSDOSDIR #endif #endif neuron-7.5/src/scopmath/scoperf.c000077500000000000000000000026011323325274500171150ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: erf.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "erf.c,v 1.2 1999/01/04 12:46:45 hines Exp" ; #endif /************************************************************ * * Abstract: scop_erf() * * Normalized error function. * * erf(z) = (2/sqrt(PI)) * Integral from 0 to z of * exp(-t*t) dt * * Note that erf(-z) = -erf(z). To obtain the cumulative * Gaussian distribution function at z probits: * * z = (x - mean)/std_dev * cdf(z) = 0.5 * (1 + erf(z)) * * Calling sequence: erf(z) * * Argument: Input: z, double * * Functions called: none * * Returns: double precision value of error function is on * the interval [-1, 1] * * Files accessed: none * ***********************************************************/ #include #define a1 0.254829592 #define a2 -0.284496736 #define a3 1.421413741 #define a4 -1.453152027 #define a5 1.061405429 double scop_erf(z) double z; { double t, value; t = 1. / (1. + 0.3275911 * fabs(z)); value = 1. - (((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t) * exp(-z * z); if (z >= 0.0) return (value); else return (-value); } neuron-7.5/src/scopmath/scoplib.h000077500000000000000000000107131323325274500171170ustar00rootroot00000000000000 /****************************************************************************** * * File: scoplib.h * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 * Duke University * * scoplib.h,v 1.2 1997/04/18 14:42:13 hines Exp * ******************************************************************************/ /****************************************************************/ /* */ /* This file declares all the SCoP library functions that can */ /* be called by the user to describe or solve his model's */ /* equations. */ /* */ /****************************************************************/ /* Memory allocation routines */ double *makevector(); /* (length) */ int freevector(); /* (vector_address) */ double **makeptrvector(); /* (length) */ int freeptrvector(); /* (vector_address) */ double **makematrix(); /* (rows, columns) */ int freematrix(); /* (matrix_address) */ int zero_vector(); /* (vector, n) */ int zero_ptrvector(); /* (vector, n) */ int zero_matrix(); /* (matrix, rows, cols) */ int enqueue(), dequeue(); /* (&variable, vsize) */ /* Printing error messages */ int cls(), abort_run(), /* (error_code) */ prterr(); /* (message_string) */ /* Solution of first order ordinary differential equations */ int euler(), heun(), runge(), adams(), /* (neqn, &var, &der, p, indep, h, derfunc, * first_time, temp) */ adeuler(), adrunge(); /* (neqn, &var, &der, p, indep, h, derfunc, * first_time, temp, maxerror) */ /* Implicit backwards eulerian integration. Can find steady-state solution of * first-order odes by passing "infinite" time step h */ int _advance(); /* (n,&var,&der,&indep,h,derfunc,first_time,&p * coef,linflag) */ /* Solution of boundary value problems */ int boundary(), /* (npts, x, y, p, fval, gval, qval) */ shoot(); /* (nbound, indepindex, matchtime, matchvalue, * known, unknown, p, diff) */ /* Solution of parabolic partial differential equations */ int crank(); /* (n, y, fval, gval, p, dt, dx, first_time, * bound_string) */ /* Definite integrals */ int romberg(); /* (a, b, func, p, integral) */ double legendre(); /* (a, b, func, p) */ /* Solution of simultaneous algebraic equations */ int simeq(), seidel(), /* (n, coef, &soln) */ invert(), /* (n, matrix) */ crout(), /* (n, matrix, perm) */ solve(), /* (n, matrix, const_vect, perm, &soln) */ tridiag(), /* (n, super, diag, sub, const, &soln) */ newton(), /* (n, &soln, p, funcval, &value) */ simplex(), /* (n, &soln, p, funcval, &value) */ buildjacobian(); /* (n, &var, p, funcval, value, jacobian) */ /* Sensitivity analysis */ int linearsens(), /* (nvar,&var,p,param,funcval,coeff,newjac, * &sens) */ steadysens(), /* (nvar,&var,p,param,funcval,value,newjac, * &sens) */ trajecsens(), /* (nvar,&var,&der,param,first_time,newjac, * &sens,&Dsens) */ envelope(); /* (&var, vsize, param, uncert, &sens, &plus, * &minus) */ /* Curve-fitting and interpolation functions */ int derivs(); /* (nbase, x, y, mesh, der) */ double spline(); /* (nbase, x, y, mesh, der, x_inter) */ double force(); /* (t, filename) */ double stepforce(); /* (..., t, filename) */ #define deflate scoplib_deflate /* causes python gzip to fail if nrniv launched. i.e zlib declares global deflate */ int deflate(); /* (degree, coeff, root) */ int expfit(); /* (terms, reffile, amplitude, decay, * &fiterror) */ /* General modeling functions */ double hyperbol(), revhyperbol(), /* (x, max, K) */ sigmoid(), revsigmoid(), /* (x, max, K, n) */ *lag(); /* (var, curt, lagt, vsize) */ /* Forcing functions */ int threshold(); /* (x, limit, mode) */ double harmonic(), /* (t, period, amplitude, phase) */ squarewave(), /* (t, period, amplitude) */ sawtooth(), /* (t, period, amplitude) */ revsawtooth(), /* (t, period, amplitude) */ ramp(), /* (t, lag, height, duration) */ pulse(), /* (t, lag, height, duration) */ perpulse(), /* (t, lag, height, duration, delay) */ step(), /* (t, jump_time, jump_height) */ perstep(); /* (t, lag, period, jump_height) */ /* Probability functions */ int setseed(), /* (seed) */ poisrand(); /* (mean) */ double factorial(), /* (n) */ scop_random(), exprand(), normrand(), /* (mean, std_dev) */ poisson(), /* (x, mean) */ gauss(), /* (x, mean, std_dev) */ scop_erf(); /* (x) */ /* ANSI C Math Functions (that we must include in scoplib when the host system * does not yet support them). */ #if MAC #undef fmod #endif double fmod(); neuron-7.5/src/scopmath/scpmth.mak000077500000000000000000000015531323325274500173050ustar00rootroot00000000000000LIBR = /cygdrive/c/nrn/lib LNAME = $(LIBR)/libscpmt.a cc = gcc CFLAGS = -mno-cygwin -DHOC=1 -I/cygdrive/c/nrn/lib -I../mswin -I/cygdrive/c/nrn/mingw OBJ = \ abort.o\ adams.o\ adeuler.o\ adrunge.o\ advance.o\ boundary.o\ crank.o\ crout.o\ csoda.o\ csodabnc.o\ deflate.o\ dimplic.o\ euler.o\ expfit.o\ exprand.o\ f2cmisc.o\ factoria.o\ force.o\ gauss.o\ gear.o\ getmem.o\ harmonic.o\ heun.o\ hyperbol.o\ invert.o\ lag.o\ legendre.o\ newton.o\ normrand.o\ perpulse.o\ perstep.o\ poisrand.o\ poisson.o\ praxis.o\ pulse.o\ quad.o\ ramp.o\ revhyper.o\ revsawto.o\ revsigmo.o\ romberg.o\ runge.o\ sawtooth.o\ schedule.o\ seidel.o\ sigmoid.o\ simeq.o\ simplex.o\ sparse.o\ spline.o\ squarewa.o\ ssimplic.o\ step.o\ threshol.o\ tridiag.o .c.o: $(cc) -c $(CFLAGS) $*.c $(LNAME): $(OBJ) ar cr $(LNAME) *.o ranlib $(LNAME) neuron-7.5/src/scopmath/seidel.c000077500000000000000000000141011323325274500167170ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: seidel.c * * Copyright (c) 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "seidel.c,v 1.3 1999/01/04 12:46:50 hines Exp" ; #endif /****************************************************************/ /* */ /* seidel() */ /* */ /* Solves simultaneous linear equations by the Gauss-Seidel */ /* method with successive over-relaxation (w = 1.5). The */ /* coef array elements are transformed by this routine. If */ /* the maximal fractional change in the solution in succes- */ /* sive iterations is within CONVERGE (currently 1.e-6), the */ /* iterations are terminated. MAXITER is the maximal number */ /* (currently set to 50) of iterations before termination; */ /* 'TOLER' is the limit for considering diagonal elements as */ /* arbitrarily close to zero (currently set to 1.e-20), in */ /* which case the error flag (*perr) is set to 1 and control */ /* returns to the calling routine. This function skips over */ /* matrix elements that equal zero to save computation time */ /* for sparse matrices. */ /* */ /* Calling sequence: seidel(n, coef, soln) */ /* */ /* Arguments: */ /* Input: coef[n][n+1], double, augmented matrix of */ /* coefficients, maximum dimensions */ /* currently 50 x 51, controlled by */ /* '#define MAXCOLS 52' */ /* currently 201 x 202, controlled by */ /* '#define MAXCOLS 203' */ /* soln[n], double, initial estimate of solution */ /* n, int, # of equations */ /* Output: coef[n][n+1], double, transformed matrix of */ /* coefficients */ /* soln[n], double, solution vector */ /* */ /* Returns: 0 if no error; */ /* 1 if no convergence in MAXITERS iterations */ /* 2 if matrix is singular or ill-conditioned */ /* */ /* */ /* Functions called: makevector(), freevector() */ /* */ /* Files Accessed: none */ /* */ /****************************************************************/ #include #include #include "errcodes.h" #define w 1.5 int seidel(n, coef, soln, index) int n,*index; double *coef[], soln[]; { extern int freevector(); extern double *makevector(); int i, j, iter = 0, *buff; double change, maxchange, *last_value; struct rowstruct { int length; /* number of nonzero elements in row */ int *colindex; /* column indices of nonzero elements */ } *rowptr; last_value = makevector(n); buff = (int *) malloc((unsigned) (n * sizeof(int))); rowptr = (struct rowstruct *) malloc((unsigned) (n * sizeof(struct rowstruct))); /* Transform coefficient matrix and constant vector */ for (i = 0; i < n; i++) { if (fabs(coef[i][i]) < ROUNDOFF) /* Check for ill-conditioning */ return (SINGULAR); coef[i][n] *= w / coef[i][i]; /* Constant vector */ rowptr[i].length = 0; for (j = 0; j < n; j++) if (j != i && fabs(coef[i][j]) > ROUNDOFF) /* * Set up arrays of indices to nonzero off-diagonal matrix * elements */ { buff[rowptr[i].length] = j; rowptr[i].length++; coef[i][j] *= -w / coef[i][i]; } rowptr[i].colindex = (int *) malloc((unsigned) (rowptr[i].length * sizeof(int))); for (j = 0; j < rowptr[i].length; j++) rowptr[i].colindex[j] = buff[j]; } if (index) { int k; do /* Iterative refinement loop */ { for (i = 0; i < n; i++) { k = index[i]; last_value[i] = soln[k]; soln[k] = coef[i][n] + (1. - w) * (soln[k]); for (j = 0; j < rowptr[i].length; j++) /* Loop only over nonzero elements */ soln[k] += coef[i][*(rowptr[i].colindex + j)] * (soln[index[j]]); } iter++; /* * Calculate the maximal relative change in the solution and check * for convergence. */ maxchange = fabs(*last_value - soln[index[0]]); if (fabs(*last_value) > ROUNDOFF) maxchange /= fabs(*last_value); for (i = 1; i < n; i++) { change = fabs(last_value[i] - soln[index[i]]); if (fabs(last_value[i]) > ROUNDOFF) change /= fabs(last_value[i]); if (change > maxchange) maxchange = change; } } while (maxchange > CONVERGE && iter < MAXITERS); }else{ do /* Iterative refinement loop */ { for (i = 0; i < n; i++) { last_value[i] = soln[i]; soln[i] = coef[i][n] + (1. - w) * (soln[i]); for (j = 0; j < rowptr[i].length; j++) /* Loop only over nonzero elements */ soln[i] += coef[i][*(rowptr[i].colindex + j)] * (soln[j]); } iter++; /* * Calculate the maximal relative change in the solution and check * for convergence. */ maxchange = fabs(*last_value - *soln); if (fabs(*last_value) > ROUNDOFF) maxchange /= fabs(*last_value); for (i = 1; i < n; i++) { change = fabs(last_value[i] - soln[i]); if (fabs(last_value[i]) > ROUNDOFF) change /= fabs(last_value[i]); if (change > maxchange) maxchange = change; } } while (maxchange > CONVERGE && iter < MAXITERS); } freevector(last_value); for (i = 0; i < n; i++) free((char *) rowptr[i].colindex); free((char *) rowptr); free((char *) buff); if (iter >= MAXITERS) return (EXCEED_ITERS); else return (SUCCESS); } neuron-7.5/src/scopmath/sigmoid.c000077500000000000000000000032121323325274500171060ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: sigmoid.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "sigmoid.c,v 1.2 1997/08/30 14:32:20 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: sigmoid */ /* */ /* Calculates the value of a sigmoidal function of one */ /* variable given the values of three constants in the */ /* function. */ /* */ /* Calling sequence: sigmoid(x, max, K, n) */ /* */ /* Arguments */ /* Input: x, double the independent variable */ /* */ /* max, double maximum value the sigmoidal */ /* function can attain */ /* */ /* K, double the value for x at which the */ /* function value is max/2 */ /* */ /* n, double parameter controlling the */ /* steepness of the sigmoid curve. */ /* It is the power to which x and */ /* K are raised. */ /* */ /* Output: arguments are unchanged */ /* */ /* Returns: Double precision value of the sigmoidal function */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double sigmoid(x, max, K, n) double x, max, K, n; { double value, temp; #ifndef MAC extern double pow(); #endif temp = pow(x, n); value = (max * temp) / (temp + pow(K, n)); return (value); } neuron-7.5/src/scopmath/simeq.c000077500000000000000000000104331323325274500165740ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: simeq.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "simeq.c,v 1.3 1999/01/04 12:46:51 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: simeq(); */ /* */ /* Solves simultaneous linear equations by Gaussian */ /* elimination, with partial pivoting (row interchange only). */ /* The oefficient matrix is destroyed in this subroutine. */ /* The indices for the pivot rows are stored in the vector */ /* perm[]; perm[i] is the index of the row to be used as the */ /* ith row of the matrix. Rows are not actually swapped. */ /* If a pivot or diagonal element is < ROUNDOFF, currently */ /* set to 1.e-20, the matrix is considered singular or ill- */ /* conditioned. */ /* */ /* Calling sequence: simeq(n, coef, soln); */ /* */ /* Arguments: */ /* Input: coef[n][n+1] double augmented matrix of */ /* coefficients */ /* n int # of equations */ /* Output: *soln[n] double solution vector */ /* */ /* Returns: 0 if no error; 2 if matrix is singular or ill- */ /* conditioned */ /* */ /* Functions called: none */ /* */ /* Files Accessed: none */ /* */ /****************************************************************/ #include #include "errcodes.h" #include int simeq(n, coef, soln, index) int n, *index; double *coef[], soln[]; { int ipivot, isave=0, jrow, kcol, i, j; static int np; static int* perm; /* Create and initialize permutation vector */ if (np < n) { if (perm) { free((char*)perm); } perm = (int *) malloc((unsigned) (n * sizeof(int))); np = n; } for (i = 0; i < n; i++) { perm[i] = i; } /* * The following loop is performed once for each row and implicitly * reduces the diagonal element to 1 and all elements below it to 0. To * save arithmetic operations, elements of the coefficient matrix which * will not later be used are not operated on (i.e., only values to the * right of the diagonal in a row are modified by the algorithm). */ for (j = 0; j < n; j++) { /* * First, find pivot row (i.e., row of the lower triangle which, when * transposed into the jth position, will put the largest column * element on the diagonal. Store pivot index in perm[]. */ ipivot = perm[j]; for (i = j + 1; i < n; i++) { jrow = perm[i]; if (fabs(coef[ipivot][j]) < fabs(coef[jrow][j])) { ipivot = jrow; isave = i; } } /* Now be sure the pivot found isn't too small */ if (fabs(coef[ipivot][j]) < ROUNDOFF) return (SINGULAR); /* Swap row indices in perm[] if pivot is not perm[j] */ if (ipivot != perm[j]) { perm[isave] = perm[j]; perm[j] = ipivot; } /* Row normalization */ for (kcol = j + 1; kcol <= n; kcol++) coef[ipivot][kcol] /= coef[ipivot][j]; /* Row reduction */ for (i = j + 1; i < n; i++) { jrow = perm[i]; for (kcol = j + 1; kcol <= n; kcol++) coef[jrow][kcol] -= coef[ipivot][kcol] * coef[jrow][j]; } } /* end loop over all rows */ /* Back substitution */ if (index) { for (i = n - 1; i >= 0; i--) { jrow = perm[i]; soln[index[i]] = coef[jrow][n]; for (j = i + 1; j < n; j++) soln[index[i]] -= coef[jrow][j] * (soln[index[j]]); } }else{ for (i = n - 1; i >= 0; i--) { jrow = perm[i]; soln[i] = coef[jrow][n]; for (j = i + 1; j < n; j++) soln[i] -= coef[jrow][j] * (soln[j]); } } return (SUCCESS); } neuron-7.5/src/scopmath/simplex.c000077500000000000000000000163241323325274500171440ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: simplex.c * * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "simplex.c,v 1.3 1999/01/04 12:46:52 hines Exp"; #endif /*-------------------------------------------------------------- * * Abstract: simplex * * Finds those values of parameters which minimize the maximal * absolute value of the state functions. * * * Returns: int error code * * Calling sequence: simplex(nparms, parms, pp, pfunc, value) * * Arguments * Input: nparms int number of parameters * *parms[] double pointers to parameters * pp[] double vector of SCoP variables * (*pfunc)() int name of function to * evaluate state variables * *value[],double pointers to state function * values * * Output: *parms[] double contains optimal parameter values * * Functions called: (*pfunc) * *--------------------------------------------------------------*/ #include #include "errcodes.h" #if MAC #define v mlhv #endif #undef ALPHA # define FITFUN(vec) fitfun(vec,parms,pp,pfunc,value) # define ALPHA -1.0 # define BETA 0.5 # define GAMMA 2.0 static double **v; /* The Simplex */ static int n; /* Number of parameters to be optimized */ static double *y; /* Function value of simplex vectors */ static int high, next, low; /* Index of vector with largest, etc. value */ static double *vrefl, *vnew, *vcent, *v0; /* Work space vectors */ #define HOC 1 /* HOC not using limits at this time. Either make it global or do the job in the error function */ static double **limits; /* Limits on values of parameters */ int simplex(nparms, parms, pp, pfunc, value) int nparms, (*pfunc) (); double pp[]; int *parms, *value; #define parms_(arg) pp[parms[arg]] #define value_(arg) pp[value[arg]] { #if !HOC extern int arraysize, **p_to_prs; extern struct parrec { char name[21], valu[21], units[21]; int flag, vsize, pindex; } *prs; #endif extern double *makevector(), **makematrix(); int i, j, iter = 0, getcentroid(), reflect(), copyvec(), getminimum(); double fitfun(), y0, ysave; /* Initialize */ n = nparms; v = makematrix(n + 1, n); y = makevector(n + 1); v0 = makevector(n + 1); vrefl = makevector(n); vnew = makevector(n); vcent = makevector(n); limits = makematrix(n, 2); /* limits on parameter values */ /* * Form initial simplex of n+1 vectors. Initial guess is first vector */ for (j = 0; j < n; j++) { v0[j] = parms_(j); v[0][j] = v0[j]; } for (i = 1; i <= n; i++) { for (j = 0; j < n; j++) v[i][j] = v0[j]; if (v0[i - 1] < ROUNDOFF) v[i][i - 1] += STEP; else v[i][i - 1] += v0[i - 1] * INITSIMPLEX; } /* Get initial function values */ for (i = 0; i <= n; i++) y[i] = FITFUN(v[i]); #if !HOC /* Find limits on parameter values */ for (i = 0; i < n; i++) for (j = 0; j < arraysize - 2; j++) if (p_to_prs[j][0] == parms[i]) { sscanf(prs[p_to_prs[j][1]].valu, "%lf:%lf", &limits[i][0], &limits[i][1]); break; } #endif /* Main loop */ while (++iter) { /* Determine worst, next worst, and best point */ for (i = 1, high = low = 0; i <= n; i++) { if (y[low] > y[i]) low = i; if (y[high] < y[i]) high = i; } for (i = 0, next = low; i <= n; i++) if (i != high && y[next] < y[i]) next = i; /* * If maximum iterations exceeded, return parameters for vertex with * lowest y */ if (iter >= MAXSMPLXITERS) { getminimum(v[low], pp, parms); return (EXCEED_ITERS); } /* * If range of y values is < CONVERGE, return parameter values at * centroid or at v[low], whichever has lowest y value. */ if ((y[high] - y[low]) < CONVERGE) { getcentroid(v0, -1); y0 = FITFUN(v0); if ((y[high] - y0) < CONVERGE) { if (y0 > y[low]) { getminimum(v[low], pp, parms); return (SUCCESS); } else { getminimum(v0, pp, parms); return (SUCCESS); } } copyvec(v0, v[high]); y[high] = y0; continue; } /* Find centroid of all vectors except worst */ getcentroid(vcent, high); /* * Reflect the worst point through the centroid and decide if * improvement */ reflect(vcent, v[high], vrefl, ALPHA); ysave = y0 = FITFUN(vrefl); if (y0 < y[low]) /* Looks promising, try extending */ { reflect(vcent, vrefl, vnew, GAMMA); y0 = FITFUN(vnew); if (y0 < ysave) { copyvec(vnew, v[high]); y[high] = y0; continue; } copyvec(vrefl, v[high]); y[high] = ysave; continue; } if (y0 < y[next]) /* Use it */ { copyvec(vrefl, v[high]); y[high] = ysave; continue; } if (y0 > y[high]) { copyvec(v[high], vrefl); ysave = y[high]; } else { copyvec(vrefl, v[high]); y[high] = ysave; } /* Try a short projection */ reflect(vcent, vrefl, vnew, BETA); y0 = FITFUN(vnew); if (y0 < y[high]) { copyvec(vnew, v[high]); y[high] = y0; if (y0 < y[next]) /* Use it */ continue; } /* Shrink toward best point */ for (i = 0; i <= n; i++) if (i != low) { for (j = 0; j < n; j++) v[i][j] = (v[i][j] + v[low][j]) * BETA; y[i] = FITFUN(v[i]); } } return EXCEED_ITERS; } int getcentroid(vcent, ignore) double *vcent; int ignore; { int i, j; double *vp1, *vp2, fn; /* Centroid of all vectors except ignore in simplex */ if (ignore < 0 || ignore > n) fn = (double) (n + 1); else fn = (double) (n); for (j = 0, vp1 = vcent; j < n; j++) *vp1++ = 0.; for (i = 0; i <= n; i++) if (i != ignore) for (j = 0, vp1 = vcent, vp2 = v[i]; j < n; j++) *vp1++ += *vp2++; for (j = 0, vp1 = vcent; j < n; j++) *vp1++ /= fn; return 0; } int copyvec(v1, v2) /* Copy vector 1 into vector 2 */ double *v1, *v2; { int i; for (i = 0; i < n; i++) *v2++ = *v1++; return 0; } int reflect(v0, v1, v2, coef) /* Projection operator */ double *v0, *v1, *v2, coef; { int i; /* * project a vector from v0 to v2 through v1 with expansion coefficient * "coef" */ for (i = 0; i < n; i++, v2++) { *v2 = coef * (*v1++ - v0[i]) + v0[i]; #if !HOC /* Prevent projected value from exceeding limits */ if (*v2 < limits[i][0]) *v2 = limits[i][0]; else if (*v2 > limits[i][1]) *v2 = limits[i][1]; #endif } return 0; } double fitfun(vec, parms, pp, func, vals) double vec[], pp[];int *parms, *vals; int (*func) (); { int i; double temp = 0.0; /* Update parameters and evaluate state functions */ for (i = 0; i < n; i++) parms_(i) = vec[i]; (*func) (pp); /* Find largest element of vector of state functions */ for (i = 0; i < n; i++) if (temp < fabs(pp[vals[i]])) temp = fabs(pp[vals[i]]); return (temp); } int getminimum(vec,pp, parms) double vec[], *pp; int *parms; { extern int freevector(), freematrix(); int i; for (i = 0; i < n; i++) parms_(i) = vec[i]; freematrix(v); freevector(y); freevector(v0); freevector(vrefl); freevector(vnew); freevector(vcent); freematrix(limits); return 0; } neuron-7.5/src/scopmath/sparse.c000077500000000000000000000471651323325274500167670ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: sparse.c * * Copyright (c) 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "sparse.c,v 1.7 1998/03/12 13:17:17 hines Exp"; #endif #include #include "errcodes.h" extern void* emalloc(size_t n); /* 4/23/93 converted to object so many models can use it */ /*----------------------------------------------------------------------------- * * sparse() * * Abstract: * This is an experimental numerical method for SCoP-3 which integrates kinetic * rate equations. It is intended to be used only by models generated by MODL, * and its identity is meant to be concealed from the user. * * * Calling sequence: * sparse(n, s, d, t, dt, fun, prhs, linflag) * * Arguments: * n number of state variables * s array of pointers to the state variables * d array of pointers to the derivatives of states * t pointer to the independent variable * dt the time step * fun pointer to the function corresponding to the * kinetic block equations * prhs pointer to right hand side vector (answer on return) * does not have to be allocated by caller. * linflag solve as linear equations * when nonlinear, all states are forced >= 0 * * * Returns: nothing * * Functions called: IGNORE(), printf(), create_coef_list(), fabs() * * Files accessed: none * */ #if LINT #define IGNORE(arg) {if (arg);} #else #define IGNORE(arg) arg #endif #if __TURBOC__ || VMS #define Free(arg) free((void *)arg) #else #define Free(arg) free((char *)arg) #endif # define rowst spar_rowst # define diag spar_diag # define neqn spar_neqn # define varord spar_varord # define matsol spar_matsol # define getelm spar_getelm # define bksub spar_bksub # define prmat spar_prmat # define subrow spar_subrow # define remelm spar_remelm #include #include #include typedef struct Elm { unsigned row; /* Row location */ unsigned col; /* Column location */ double value; /* The value */ struct Elm *r_up; /* Link to element in same column */ struct Elm *r_down; /* in solution order */ struct Elm *c_left; /* Link to left element in same row */ struct Elm *c_right; /* in solution order (see getelm) */ } Elm; #define ELM0 (Elm *)0 typedef struct Item { Elm *elm; unsigned norder; /* order of a row */ struct Item *next; struct Item *prev; } Item; #define ITEM0 (Item *)0 typedef Item List; /* list of mixed items */ typedef struct SparseObj { /* all the state information */ Elm** rowst; Elm** diag; unsigned neqn; unsigned* varord; int (*oldfun)(); unsigned ngetcall; int phase; double** coef_list; /* don't really need the rest */ int nroworder; Item** roworder; List* orderlist; int do_flag; } SparseObj; static SparseObj* old_sparseobj; static SparseObj* create_sparseobj(); static void sparseobj2local(); static void local2sparseobj(); static Elm **rowst; /* link to first element in row (solution order)*/ static Elm **diag; /* link to pivot element in row (solution order)*/ static unsigned neqn; /* number of equations */ static unsigned *varord; /* row and column order for pivots */ static double *rhs; /* initially- right hand side finally - answer */ extern int numop; static unsigned ngetcall; /* counter for number of calls to _getelm */ static int phase; /* 0-solution phase; 1-count phase; 2-build list phase */ static double **coef_list; /* pointer to value in _getelm order */ static int nroworder; /* just for freeing */ static Item **roworder; /* roworder[i] is pointer to order item for row i. Does not have to be in orderlist */ static List *orderlist; /* list of rows sorted by norder that haven't been used */ static int do_flag; /* note: solution order refers to the following diag[varord[row]]->row = row = diag[varord[row]]->col rowst[varord[row]]->row = row varord[el->row] < varord[el->c_right->row] varord[el->col] < varord[el->r_down->col] */ static int matsol(); static Elm *getelm(); static void subrow(); static void bksub(); static void free_elm(); static void create_coef_list(); static void init_coef_list(); static void increase_order(); static void reduce_order(); static void spar_minorder(); static void get_next_pivot(); static void freelist(); static void check_assert(); static void re_link(); static void delete(); /* sparse matrix dynamic allocation: create_coef_list makes a list for fast setup, does minimum ordering and ensures all elements needed are present */ /* this could easily be made recursive but it isn't right now */ int sparse(v, n, s, d, p, t, dt, fun, prhs, linflag) void** v; int n, linflag; /* linflag was not explicitly declared */ int (*fun)(); double *t, dt, **prhs, *p; int *s, *d; #define s_(arg) p[s[arg]] #define d_(arg) p[d[arg]] { int i, j, ierr; double err; SparseObj* so; #if LINT /* unused args */ if (t); if (pcoef); #endif if (!*prhs) { *prhs = (double *)emalloc((n + 1)*sizeof(double)); } rhs = *prhs; so = (SparseObj*)(*v); if (!so) { so = create_sparseobj(); *v = (void*)so; } if (so != old_sparseobj) { sparseobj2local(so); } if (so->oldfun != fun) { so->oldfun = fun; create_coef_list(n, fun); /* calls fun twice */ local2sparseobj(so); } for (i=0; i CONVERGE; j++) { init_coef_list(); (*fun)(); if((ierr = spar_matsol())) { return ierr; } for (err=0.,i=1; i<=n; i++) {/* why oh why did I write it from 1 */ s_(i-1) += rhs[i]; #if 1 /* stability of nonlinear kinetic schemes sometimes requires this */ if (!linflag && s_(i-1) < 0.) { s_(i-1) = 0.; } #endif err += fabs(rhs[i]); } if (j > MAXSTEPS) { return EXCEED_ITERS; } if (linflag) break; } init_coef_list(); (*fun)(); for (i=0; ioldfun != fun) { so->oldfun = fun; create_coef_list(n, fun); /* calls fun twice */ local2sparseobj(so); } init_coef_list(); (*fun)(); if((ierr = spar_matsol())) { return ierr; } for (i=1; i<=n; i++) {/* why oh why did I write it from 1 */ x_(i-1) = rhs[i]; } return SUCCESS; } int numop; static int matsol() { register Elm *pivot, *el; unsigned i; /* Upper triangularization */ numop = 0; for (i=1 ; i <= neqn ; i++) { if (fabs((pivot = diag[i])->value) <= ROUNDOFF) { return SINGULAR; } /* Eliminate all elements in pivot column */ for (el = pivot->r_down ; el ; el = el->r_down) { subrow(pivot, el); } } bksub(); return(SUCCESS); } static void subrow(pivot, rowsub) Elm *pivot, *rowsub; { double r; register Elm *el; r = rowsub->value / pivot->value; rhs[rowsub->row] -= rhs[pivot->row] * r; numop++; for (el = pivot->c_right ; el ; el = el->c_right) { for (rowsub = rowsub->c_right; rowsub->col != el->col; rowsub = rowsub->c_right) { ; } rowsub->value -= el->value * r; numop++; } } static void bksub() { unsigned i; Elm *el; for (i = neqn ; i >= 1 ; i--) { for (el = diag[i]->c_right ; el ; el = el->c_right) { rhs[el->row] -= el->value * rhs[el->col]; numop++; } rhs[diag[i]->row] /= diag[i]->value; numop++; } } static void prmat() { unsigned i, j; Elm *el; IGNORE(printf("\n ")); for (i=10 ; i <= neqn ; i += 10) IGNORE(printf(" %1d", (i%100)/10)); IGNORE(printf("\n ")); for (i=1 ; i <= neqn; i++) IGNORE(printf("%1d", i%10)); IGNORE(printf("\n\n")); for (i=1 ; i <= neqn ; i++) { IGNORE(printf("%3d %3d ", diag[i]->row, i)); j = 0; for (el = rowst[i] ;el ; el = el->c_right) { for ( j++ ; j < varord[el->col] ; j++) IGNORE(printf(" ")); IGNORE(printf("*")); } IGNORE(printf("\n")); } IGNORE(fflush(stdin)); } static void initeqn(maxeqn) /* reallocate space for matrix */ unsigned maxeqn; { register unsigned i; if (maxeqn == neqn) return; free_elm(); if (rowst) Free(rowst); if (diag) Free(diag); if (varord) Free(varord); rowst = diag = (Elm **)0; varord = (unsigned *)0; rowst = (Elm **)emalloc((maxeqn + 1)*sizeof(Elm *)); diag = (Elm **)emalloc((maxeqn + 1)*sizeof(Elm *)); varord = (unsigned *)emalloc((maxeqn + 1)*sizeof(unsigned)); for (i=1 ; i<= maxeqn ; i++) { varord[i] = i; diag[i] = (Elm *)emalloc(sizeof(Elm)); rowst[i] = diag[i]; diag[i]->row = i; diag[i]->col = i; diag[i]->r_down = diag[i]->r_up = ELM0; diag[i]->c_right = diag[i]->c_left = ELM0; diag[i]->value = 0.; rhs[i] = 0.; } neqn = maxeqn; } static void free_elm() { unsigned i; Elm *el; /* free all elements */ for (i=1; i <= neqn; i++) { for (el = rowst[i]; el; el=el->c_right) Free(el); rowst[i] = ELM0; diag[i] = ELM0; } } /* see check_assert in minorder for info about how this matrix is supposed to look. In new is nonzero and an element would otherwise be created, new is used instead. This is because linking an element is highly nontrivial The biggest difference is that elements are no longer removed and this saves much time allocating and freeing during the solve phase */ static Elm * getelm(row, col, new) register Elm *new; unsigned row, col; /* return pointer to row col element maintaining order in rows */ { register Elm *el, *elnext; unsigned vrow, vcol; vrow = varord[row]; vcol = varord[col]; if (vrow == vcol) { return diag[vrow]; /* a common case */ } if (vrow > vcol) { /* in the lower triangle */ /* search downward from diag[vcol] */ for (el=diag[vcol]; ; el = elnext) { elnext = el->r_down; if (!elnext) { break; }else if (elnext->row == row) { /* found it */ return elnext; }else if (varord[elnext->row] > vrow) { break; } } /* insert below el */ if (!new) { new = (Elm *)emalloc(sizeof(Elm)); new->value = 0.; increase_order(row); } new->r_down = el->r_down; el->r_down = new; new->r_up = el; if (new->r_down) { new->r_down->r_up = new; } /* search leftward from diag[vrow] */ for (el=diag[vrow]; ; el = elnext) { elnext = el->c_left; if (!elnext) { break; } else if (varord[elnext->col] < vcol) { break; } } /* insert to left of el */ new->c_left = el->c_left; el->c_left = new; new->c_right = el; if (new->c_left) { new->c_left->c_right = new; }else{ rowst[vrow] = new; } } else { /* in the upper triangle */ /* search upward from diag[vcol] */ for (el=diag[vcol]; ; el = elnext) { elnext = el->r_up; if (!elnext) { break; }else if (elnext->row == row) { /* found it */ return elnext; }else if (varord[elnext->row] < vrow) { break; } } /* insert above el */ if (!new) { new = (Elm *)emalloc(sizeof(Elm)); new->value = 0.; increase_order(row); } new->r_up = el->r_up; el->r_up = new; new->r_down = el; if (new->r_up) { new->r_up->r_down = new; } /* search right from diag[vrow] */ for (el=diag[vrow]; ; el = elnext) { elnext = el->c_right; if (!elnext) { break; }else if (varord[elnext->col] > vcol) { break; } } /* insert to right of el */ new->c_right = el->c_right; el->c_right = new; new->c_left = el; if (new->c_right) { new->c_right->c_left = new; } } new->row = row; new->col = col; return new; } double * _getelm(row, col) int row, col; { Elm *el; if (!phase) { return coef_list[ngetcall++]; } el = getelm((unsigned)row, (unsigned)col, ELM0); if (phase ==1) { ngetcall++; }else{ coef_list[ngetcall++] = &el->value; } return &el->value; } static void create_coef_list(n, fun) int n; int (*fun)(); { initeqn((unsigned)n); phase = 1; ngetcall = 0; (*fun)(); if (coef_list) { free(coef_list); } coef_list = (double **)emalloc(ngetcall * sizeof(double *)); spar_minorder(); phase = 2; ngetcall = 0; (*fun)(); phase = 0; } static void init_coef_list() { unsigned i; Elm *el; ngetcall = 0; for (i=1; i<=neqn; i++) { for (el = rowst[i]; el; el = el->c_right) { el->value = 0.; } } } static Item *newitem(); static List *newlist(); static void insert(); static void init_minorder() { /* matrix has been set up. Construct the orderlist and orderfind vector. */ unsigned i, j; Elm *el; do_flag = 1; if (roworder) { for (i=1; i <= nroworder; ++i) { Free(roworder[i]); } Free(roworder); } roworder = (Item **)emalloc((neqn+1)*sizeof(Item *)); nroworder = neqn; if (orderlist) freelist(orderlist); orderlist = newlist(); for (i=1; i<=neqn; i++) { roworder[i] = newitem(); } for (i=1; i<=neqn; i++) { for (j=0, el = rowst[i]; el; el = el->c_right) { j++; } roworder[diag[i]->row]->elm = diag[i]; roworder[diag[i]->row]->norder = j; insert(roworder[diag[i]->row]); } } static void increase_order(row) unsigned row; { /* order of row increases by 1. Maintain the orderlist. */ Item *order; if(!do_flag) return; order = roworder[row]; delete(order); order->norder++; insert(order); } static void reduce_order(row) unsigned row; { /* order of row decreases by 1. Maintain the orderlist. */ Item *order; if(!do_flag) return; order = roworder[row]; delete(order); order->norder--; insert(order); } static void spar_minorder() { /* Minimum ordering algorithm to determine the order that the matrix should be solved. Also make sure all needed elements are present. This does not mess up the matrix */ unsigned i; check_assert(); init_minorder(); for (i=1; i<=neqn; i++) { get_next_pivot(i); } do_flag = 0; check_assert(); } static void get_next_pivot(i) unsigned i; { /* get varord[i], etc. from the head of the orderlist. */ Item *order; Elm *pivot, *el; unsigned j; order = orderlist->next; assert(order != orderlist); if ((j=varord[order->elm->row]) != i) { /* push order lists down by 1 and put new diag in empty slot */ assert(j > i); el = rowst[j]; for (; j > i; j--) { diag[j] = diag[j-1]; rowst[j] = rowst[j-1]; varord[diag[j]->row] = j; } diag[i] = order->elm; rowst[i] = el; varord[diag[i]->row] = i; /* at this point row links are out of order for diag[i]->col and col links are out of order for diag[i]->row */ re_link(i); } /* now make sure all needed elements exist */ for (el = diag[i]->r_down; el; el = el->r_down) { for (pivot = diag[i]->c_right; pivot; pivot = pivot->c_right) { IGNORE(getelm(el->row, pivot->col, ELM0)); } reduce_order(el->row); } #if 0 {int j; Item *or; printf("%d ", i); for (or = orderlist->next, j=0; j<5 && or != orderlist; j++, or=or->next) { printf("(%d, %d) ", or->elm->row, or->norder); } printf("\n"); } #endif delete(order); } /* The following routines support the concept of a list. modified from modl */ /* Implementation The list is a doubly linked list. A special item with element 0 is always at the tail of the list and is denoted as the List pointer itself. list->next point to the first item in the list and list->prev points to the last item in the list. i.e. the list is circular Note that in an empty list next and prev points to itself. It is intended that this implementation be hidden from the user via the following function calls. */ static Item * newitem() { Item *i; i = (Item *)emalloc(sizeof(Item)); i->prev = ITEM0; i->next = ITEM0; i->norder = 0; i->elm = (Elm *)0; return i; } static List * newlist() { Item *i; i = newitem(); i->prev = i; i->next = i; return (List *)i; } static void freelist(list) /*free the list but not the elements*/ List *list; { Item *i1, *i2; for (i1 = list->next; i1 != list; i1 = i2) { i2 = i1->next; Free(i1); } Free(list); } static void linkitem(item, i) /*link i before item*/ Item *item; Item *i; { i->prev = item->prev; i->next = item; item->prev = i; i->prev->next = i; } static void insert(item) Item *item; { Item *i; for (i = orderlist->next; i != orderlist; i = i->next) { if (i->norder >= item->norder) { break; } } linkitem(i, item); } static void delete(item) Item *item; { item->next->prev = item->prev; item->prev->next = item->next; item->prev = ITEM0; item->next = ITEM0; } static void check_assert() { /* check that all links are consistent */ unsigned i; Elm *el; for (i=1; i<=neqn; i++) { assert(diag[i]); assert(diag[i]->row == diag[i]->col); assert(varord[diag[i]->row] == i); assert(rowst[i]->row == diag[i]->row); for (el = rowst[i]; el; el = el->c_right) { if (el == rowst[i]) { assert(el->c_left == ELM0); }else{ assert(el->c_left->c_right == el); assert(varord[el->c_left->col] < varord[el->col]); } } for (el = diag[i]->r_down; el; el = el->r_down) { assert(el->r_up->r_down == el); assert(varord[el->r_up->row] < varord[el->row]); } for (el = diag[i]->r_up; el; el = el->r_up) { assert(el->r_down->r_up == el); assert(varord[el->r_down->row] > varord[el->row]); } } } /* at this point row links are out of order for diag[i]->col and col links are out of order for diag[i]->row */ static void re_link(i) unsigned i; { Elm *el, *dright, *dleft, *dup, *ddown, *elnext; for (el=rowst[i]; el; el = el->c_right) { /* repair hole */ if (el->r_up) el->r_up->r_down = el->r_down; if (el->r_down) el->r_down->r_up = el->r_up; } for (el=diag[i]->r_down; el; el = el->r_down) { /* repair hole */ if (el->c_right) el->c_right->c_left = el->c_left; if (el->c_left) el->c_left->c_right = el->c_right; else rowst[varord[el->row]] = el->c_right; } for (el=diag[i]->r_up; el; el = el->r_up) { /* repair hole */ if (el->c_right) el->c_right->c_left = el->c_left; if (el->c_left) el->c_left->c_right = el->c_right; else rowst[varord[el->row]] = el->c_right; } /* matrix is consistent except that diagonal row elements are unlinked from their columns and the diagonal column elements are unlinked from their rows. For simplicity discard all knowledge of links and use getelm to relink */ rowst[i] = diag[i]; dright = diag[i]->c_right; dleft = diag[i]->c_left; dup = diag[i]->r_up; ddown = diag[i]->r_down; diag[i]->c_right = diag[i]->c_left = ELM0; diag[i]->r_up = diag[i]->r_down = ELM0; for (el=dright; el; el = elnext) { elnext = el->c_right; IGNORE(getelm(el->row, el->col, el)); } for (el=dleft; el; el = elnext) { elnext = el->c_left; IGNORE(getelm(el->row, el->col, el)); } for (el=dup; el; el = elnext) { elnext = el->r_up; IGNORE(getelm(el->row, el->col, el)); } for (el=ddown; el; el = elnext){ elnext = el->r_down; IGNORE(getelm(el->row, el->col, el)); } } static SparseObj* create_sparseobj() { SparseObj* so; so = emalloc(sizeof(SparseObj)); so->rowst = 0; so->diag = 0; so->neqn = 0; so->varord = 0; so->oldfun = 0; so->ngetcall = 0; so->phase = 0; so->coef_list = 0; so->roworder = 0; so->nroworder = 0; so->orderlist = 0; so->do_flag = 0; return so; } static void sparseobj2local(so) SparseObj* so; { rowst = so->rowst; diag = so->diag; neqn = so->neqn; varord = so->varord; ngetcall = so->ngetcall; phase = so->phase; coef_list = so->coef_list; roworder = so->roworder; nroworder = so->nroworder; orderlist = so->orderlist; do_flag = so->do_flag; } static void local2sparseobj(so) SparseObj* so; { so->rowst = rowst; so->diag = diag; so->neqn = neqn; so->varord = varord; so->ngetcall = ngetcall; so->phase = phase; so->coef_list = coef_list; so->roworder = roworder; so->nroworder = nroworder; so->orderlist = orderlist; so->do_flag = do_flag; } neuron-7.5/src/scopmath/sparse_thread.c000066400000000000000000000524251323325274500203060ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: sparse.c * * Copyright (c) 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "sparse.c,v 1.7 1998/03/12 13:17:17 hines Exp"; #endif #include #include "errcodes.h" /* Jan 2008 thread safe */ /* 4/23/93 converted to object so many models can use it */ /*----------------------------------------------------------------------------- * * sparse() * * Abstract: * This is an experimental numerical method for SCoP-3 which integrates kinetic * rate equations. It is intended to be used only by models generated by MODL, * and its identity is meant to be concealed from the user. * * * Calling sequence: * sparse(n, s, d, t, dt, fun, prhs, linflag) * * Arguments: * n number of state variables * s array of pointers to the state variables * d array of pointers to the derivatives of states * t pointer to the independent variable * dt the time step * fun pointer to the function corresponding to the * kinetic block equations * prhs pointer to right hand side vector (answer on return) * does not have to be allocated by caller. * linflag solve as linear equations * when nonlinear, all states are forced >= 0 * * * Returns: nothing * * Functions called: IGNORE(), printf(), create_coef_list(), fabs() * * Files accessed: none * */ #if LINT #define IGNORE(arg) {if (arg);} #else #define IGNORE(arg) arg #endif #if __TURBOC__ || VMS #define Free(arg) myfree((void *)arg) #else #define Free(arg) myfree((char *)arg) #endif extern void nrn_malloc_lock(); extern void nrn_malloc_unlock(); extern void* nrn_pool_create(long count, int itemsize); extern void nrn_pool_delete(void* pool); extern void nrn_pool_freeall(void* pool); extern void* nrn_pool_alloc(void* pool); #include #include #include #include typedef int (*FUN)(void*, double*, double*, void*, void*, void*); typedef struct Elm { unsigned row; /* Row location */ unsigned col; /* Column location */ double value; /* The value */ struct Elm *r_up; /* Link to element in same column */ struct Elm *r_down; /* in solution order */ struct Elm *c_left; /* Link to left element in same row */ struct Elm *c_right; /* in solution order (see getelm) */ } Elm; #define ELM0 (Elm *)0 typedef struct Item { Elm *elm; unsigned norder; /* order of a row */ struct Item *next; struct Item *prev; } Item; #define ITEM0 (Item *)0 typedef Item List; /* list of mixed items */ typedef struct SparseObj { /* all the state information */ Elm** rowst; /* link to first element in row (solution order)*/ Elm** diag; /* link to pivot element in row (solution order)*/ void* elmpool; /* no interthread cache line sharing for elements */ unsigned neqn; /* number of equations */ unsigned* varord; /* row and column order for pivots */ double* rhs; /* initially- right hand side finally - answer */ FUN oldfun; unsigned ngetcall; /* counter for number of calls to _getelm */ int phase; /* 0-solution phase; 1-count phase; 2-build list phase */ int numop; double** coef_list; /* pointer to value in _getelm order */ /* don't really need the rest */ int nroworder; /* just for freeing */ Item** roworder; /* roworder[i] is pointer to order item for row i. Does not have to be in orderlist */ List* orderlist; /* list of rows sorted by norder that haven't been used */ int do_flag; } SparseObj; /* note: solution order refers to the following diag[varord[row]]->row = row = diag[varord[row]]->col rowst[varord[row]]->row = row varord[el->row] < varord[el->c_right->row] varord[el->col] < varord[el->r_down->col] */ static int matsol(SparseObj* so); static void subrow(SparseObj* so,Elm* pivot, Elm* rowsub); static void bksub(SparseObj* so); static void prmat(SparseObj* so); static void initeqn(SparseObj* so, unsigned maxeqn); static void free_elm(SparseObj* so); static Elm* getelm(SparseObj* so,unsigned row, unsigned col, Elm* new); double* _nrn_thread_getelm(SparseObj* so, int row, int col); static void create_coef_list(SparseObj* so, int n, FUN fun, double* p, void* ppvar, void* thread, void* nt); static void init_coef_list(SparseObj* so); static void init_minorder(SparseObj* so); static void increase_order(SparseObj* so, unsigned row); static void reduce_order(SparseObj* so, unsigned row); static void spar_minorder(SparseObj* so); static void get_next_pivot(SparseObj* so, unsigned i); static Item* newitem(); static List* newlist(); static void freelist(List* list); static void linkitem(Item* item, Item* i); static void insert(SparseObj* so, Item* item); static void delete(Item* item); static void *emalloc(unsigned n); static void myfree(void*); static void check_assert(); static void re_link(SparseObj* so, unsigned i); static SparseObj* create_sparseobj(); void _nrn_destroy_sparseobj_thread(SparseObj* so); /* sparse matrix dynamic allocation: create_coef_list makes a list for fast setup, does minimum ordering and ensures all elements needed are present */ /* this could easily be made recursive but it isn't right now */ int sparse_thread(v, n, s, d, p, t, dt, fun, linflag, ppvar, thread, nt) void** v; int n, linflag; /* linflag was not explicitly declared */ FUN fun; double *t, dt, *p; int *s, *d; void* ppvar; void* thread; void* nt; #define s_(arg) p[s[arg]] #define d_(arg) p[d[arg]] { int i, j, ierr; double err; SparseObj* so; so = (SparseObj*)(*v); if (!so) { so = create_sparseobj(); *v = (void*)so; } if (so->oldfun != fun) { so->oldfun = fun; create_coef_list(so, n, fun, p, ppvar, thread, nt); /* calls fun twice */ } for (i=0; i CONVERGE; j++) { init_coef_list(so); (*fun)(so, so->rhs, p, ppvar, thread, nt); if((ierr = matsol(so))) { return ierr; } for (err=0.,i=1; i<=n; i++) {/* why oh why did I write it from 1 */ s_(i-1) += so->rhs[i]; #if 1 /* stability of nonlinear kinetic schemes sometimes requires this */ if (!linflag && s_(i-1) < 0.) { s_(i-1) = 0.; } #endif err += fabs(so->rhs[i]); } if (j > MAXSTEPS) { return EXCEED_ITERS; } if (linflag) break; } init_coef_list(so); (*fun)(so, so->rhs, p, ppvar, thread, nt); for (i=0; ioldfun != fun) { so->oldfun = fun; create_coef_list(so, n, fun, p, ppvar, thread, nt); /* calls fun twice */ } init_coef_list(so); (*fun)(so, so->rhs, p, ppvar, thread, nt); if((ierr = matsol(so))) { return ierr; } for (i=1; i<=n; i++) {/* why oh why did I write it from 1 */ x_(i-1) = so->rhs[i]; } return SUCCESS; } static int matsol(SparseObj* so) { register Elm *pivot, *el; unsigned i; /* Upper triangularization */ so->numop = 0; for (i=1 ; i <= so->neqn ; i++) { if (fabs((pivot = so->diag[i])->value) <= ROUNDOFF) { return SINGULAR; } /* Eliminate all elements in pivot column */ for (el = pivot->r_down ; el ; el = el->r_down) { subrow(so, pivot, el); } } bksub(so); return(SUCCESS); } static void subrow(SparseObj* so, Elm* pivot, Elm* rowsub) { double r; register Elm *el; r = rowsub->value / pivot->value; so->rhs[rowsub->row] -= so->rhs[pivot->row] * r; so->numop++; for (el = pivot->c_right ; el ; el = el->c_right) { for (rowsub = rowsub->c_right; rowsub->col != el->col; rowsub = rowsub->c_right) { ; } rowsub->value -= el->value * r; so->numop++; } } static void bksub(SparseObj* so) { unsigned i; Elm *el; for (i = so->neqn ; i >= 1 ; i--) { for (el = so->diag[i]->c_right ; el ; el = el->c_right) { so->rhs[el->row] -= el->value * so->rhs[el->col]; so->numop++; } so->rhs[so->diag[i]->row] /= so->diag[i]->value; so->numop++; } } static void prmat(SparseObj* so) { unsigned i, j; Elm *el; IGNORE(printf("\n ")); for (i=10 ; i <= so->neqn ; i += 10) IGNORE(printf(" %1d", (i%100)/10)); IGNORE(printf("\n ")); for (i=1 ; i <= so->neqn; i++) IGNORE(printf("%1d", i%10)); IGNORE(printf("\n\n")); for (i=1 ; i <= so->neqn ; i++) { IGNORE(printf("%3d %3d ", so->diag[i]->row, i)); j = 0; for (el = so->rowst[i] ;el ; el = el->c_right) { for ( j++ ; j < so->varord[el->col] ; j++) IGNORE(printf(" ")); IGNORE(printf("*")); } IGNORE(printf("\n")); } IGNORE(fflush(stdin)); } static void initeqn(SparseObj* so, unsigned maxeqn) /* reallocate space for matrix */ { register unsigned i; if (maxeqn == so->neqn) return; free_elm(so); if (so->rowst) Free(so->rowst); if (so->diag) Free(so->diag); if (so->varord) Free(so->varord); if (so->rhs) Free(so->rhs); so->rowst = so->diag = (Elm **)0; so->varord = (unsigned *)0; so->rowst = (Elm **)emalloc((maxeqn + 1)*sizeof(Elm *)); so->diag = (Elm **)emalloc((maxeqn + 1)*sizeof(Elm *)); so->varord = (unsigned *)emalloc((maxeqn + 1)*sizeof(unsigned)); so->rhs = (double *)emalloc((maxeqn + 1)*sizeof(double)); for (i=1 ; i<= maxeqn ; i++) { so->varord[i] = i; so->diag[i] = (Elm *)nrn_pool_alloc(so->elmpool); so->rowst[i] = so->diag[i]; so->diag[i]->row = i; so->diag[i]->col = i; so->diag[i]->r_down = so->diag[i]->r_up = ELM0; so->diag[i]->c_right = so->diag[i]->c_left = ELM0; so->diag[i]->value = 0.; so->rhs[i] = 0.; } so->neqn = maxeqn; } static void free_elm(SparseObj* so) { unsigned i; Elm *el, *elnext; /* free all elements */ nrn_pool_freeall(so->elmpool); for (i=1; i <= so->neqn; i++) { so->rowst[i] = ELM0; so->diag[i] = ELM0; } } /* see check_assert in minorder for info about how this matrix is supposed to look. In new is nonzero and an element would otherwise be created, new is used instead. This is because linking an element is highly nontrivial The biggest difference is that elements are no longer removed and this saves much time allocating and freeing during the solve phase */ static Elm* getelm(SparseObj* so, unsigned row, unsigned col, Elm* new) /* return pointer to row col element maintaining order in rows */ { register Elm *el, *elnext; unsigned vrow, vcol; vrow = so->varord[row]; vcol = so->varord[col]; if (vrow == vcol) { return so->diag[vrow]; /* a common case */ } if (vrow > vcol) { /* in the lower triangle */ /* search downward from diag[vcol] */ for (el=so->diag[vcol]; ; el = elnext) { elnext = el->r_down; if (!elnext) { break; }else if (elnext->row == row) { /* found it */ return elnext; }else if (so->varord[elnext->row] > vrow) { break; } } /* insert below el */ if (!new) { new = (Elm *)nrn_pool_alloc(so->elmpool); new->value = 0.; increase_order(so, row); } new->r_down = el->r_down; el->r_down = new; new->r_up = el; if (new->r_down) { new->r_down->r_up = new; } /* search leftward from diag[vrow] */ for (el=so->diag[vrow]; ; el = elnext) { elnext = el->c_left; if (!elnext) { break; } else if (so->varord[elnext->col] < vcol) { break; } } /* insert to left of el */ new->c_left = el->c_left; el->c_left = new; new->c_right = el; if (new->c_left) { new->c_left->c_right = new; }else{ so->rowst[vrow] = new; } } else { /* in the upper triangle */ /* search upward from diag[vcol] */ for (el=so->diag[vcol]; ; el = elnext) { elnext = el->r_up; if (!elnext) { break; }else if (elnext->row == row) { /* found it */ return elnext; }else if (so->varord[elnext->row] < vrow) { break; } } /* insert above el */ if (!new) { new = (Elm *)nrn_pool_alloc(so->elmpool); new->value = 0.; increase_order(so, row); } new->r_up = el->r_up; el->r_up = new; new->r_down = el; if (new->r_up) { new->r_up->r_down = new; } /* search right from diag[vrow] */ for (el=so->diag[vrow]; ; el = elnext) { elnext = el->c_right; if (!elnext) { break; }else if (so->varord[elnext->col] > vcol) { break; } } /* insert to right of el */ new->c_right = el->c_right; el->c_right = new; new->c_left = el; if (new->c_right) { new->c_right->c_left = new; } } new->row = row; new->col = col; return new; } double* _nrn_thread_getelm(SparseObj* so, int row, int col) { Elm *el; if (!so->phase) { return so->coef_list[so->ngetcall++]; } el = getelm(so, (unsigned)row, (unsigned)col, ELM0); if (so->phase ==1) { so->ngetcall++; }else{ so->coef_list[so->ngetcall++] = &el->value; } return &el->value; } static void create_coef_list(SparseObj* so, int n, FUN fun, double* p, void* ppvar, void* thread, void* nt) { initeqn(so, (unsigned)n); so->phase = 1; so->ngetcall = 0; (*fun)(so, so->rhs, p, ppvar, thread, nt); if (so->coef_list) { free(so->coef_list); } so->coef_list = (double **)emalloc(so->ngetcall * sizeof(double *)); spar_minorder(so); so->phase = 2; so->ngetcall = 0; (*fun)(so, so->rhs, p, ppvar, thread, nt); so->phase = 0; } static void init_coef_list(SparseObj* so) { unsigned i; Elm *el; so->ngetcall = 0; for (i=1; i<=so->neqn; i++) { for (el = so->rowst[i]; el; el = el->c_right) { el->value = 0.; } } } static void init_minorder(SparseObj* so) { /* matrix has been set up. Construct the orderlist and orderfind vector. */ unsigned i, j; Elm *el; so->do_flag = 1; if (so->roworder) { for (i=1; i <= so->nroworder; ++i) { Free(so->roworder[i]); } Free(so->roworder); } so->roworder = (Item **)emalloc((so->neqn+1)*sizeof(Item *)); so->nroworder = so->neqn; if (so->orderlist) freelist(so->orderlist); so->orderlist = newlist(); for (i=1; i<=so->neqn; i++) { so->roworder[i] = newitem(); } for (i=1; i<=so->neqn; i++) { for (j=0, el = so->rowst[i]; el; el = el->c_right) { j++; } so->roworder[so->diag[i]->row]->elm = so->diag[i]; so->roworder[so->diag[i]->row]->norder = j; insert(so, so->roworder[so->diag[i]->row]); } } static void increase_order(SparseObj* so, unsigned row) { /* order of row increases by 1. Maintain the orderlist. */ Item *order; if(!so->do_flag) return; order = so->roworder[row]; delete(order); order->norder++; insert(so, order); } static void reduce_order(SparseObj* so, unsigned row) { /* order of row decreases by 1. Maintain the orderlist. */ Item *order; if(!so->do_flag) return; order = so->roworder[row]; delete(order); order->norder--; insert(so, order); } static void spar_minorder(SparseObj* so) { /* Minimum ordering algorithm to determine the order that the matrix should be solved. Also make sure all needed elements are present. This does not mess up the matrix */ unsigned i; check_assert(so); init_minorder(so); for (i=1; i<=so->neqn; i++) { get_next_pivot(so, i); } so->do_flag = 0; check_assert(so); } static void get_next_pivot(SparseObj* so, unsigned i) { /* get varord[i], etc. from the head of the orderlist. */ Item *order; Elm *pivot, *el; unsigned j; order = so->orderlist->next; assert(order != so->orderlist); if ((j=so->varord[order->elm->row]) != i) { /* push order lists down by 1 and put new diag in empty slot */ assert(j > i); el = so->rowst[j]; for (; j > i; j--) { so->diag[j] = so->diag[j-1]; so->rowst[j] = so->rowst[j-1]; so->varord[so->diag[j]->row] = j; } so->diag[i] = order->elm; so->rowst[i] = el; so->varord[so->diag[i]->row] = i; /* at this point row links are out of order for diag[i]->col and col links are out of order for diag[i]->row */ re_link(so, i); } /* now make sure all needed elements exist */ for (el = so->diag[i]->r_down; el; el = el->r_down) { for (pivot = so->diag[i]->c_right; pivot; pivot = pivot->c_right) { IGNORE(getelm(so, el->row, pivot->col, ELM0)); } reduce_order(so, el->row); } #if 0 {int j; Item *or; printf("%d ", i); for (or = so->orderlist->next, j=0; j<5 && or != so->orderlist; j++, or=or->next) { printf("(%d, %d) ", or->elm->row, or->norder); } printf("\n"); } #endif delete(order); } /* The following routines support the concept of a list. modified from modl */ /* Implementation The list is a doubly linked list. A special item with element 0 is always at the tail of the list and is denoted as the List pointer itself. list->next point to the first item in the list and list->prev points to the last item in the list. i.e. the list is circular Note that in an empty list next and prev points to itself. It is intended that this implementation be hidden from the user via the following function calls. */ static Item* newitem() { Item *i; i = (Item *)emalloc(sizeof(Item)); i->prev = ITEM0; i->next = ITEM0; i->norder = 0; i->elm = (Elm *)0; return i; } static List* newlist() { Item *i; i = newitem(); i->prev = i; i->next = i; return (List *)i; } static void freelist(List* list) /*free the list but not the elements*/ { Item *i1, *i2; for (i1 = list->next; i1 != list; i1 = i2) { i2 = i1->next; Free(i1); } Free(list); } static void linkitem(Item* item, Item* i) /*link i before item*/ { i->prev = item->prev; i->next = item; item->prev = i; i->prev->next = i; } static void insert(SparseObj* so, Item* item) { Item *i; for (i = so->orderlist->next; i != so->orderlist; i = i->next) { if (i->norder >= item->norder) { break; } } linkitem(i, item); } static void delete(Item* item) { item->next->prev = item->prev; item->prev->next = item->next; item->prev = ITEM0; item->next = ITEM0; } static void *emalloc(unsigned n) { /* check return from malloc */ void *p; nrn_malloc_lock(); p = malloc(n); nrn_malloc_unlock(); if (p == (void *)0) { abort_run(LOWMEM); } return (void *)p; } void myfree(void* ptr) { nrn_malloc_lock(); free(ptr); nrn_malloc_unlock(); } static void check_assert(SparseObj* so) { /* check that all links are consistent */ unsigned i; Elm *el; for (i=1; i<=so->neqn; i++) { assert(so->diag[i]); assert(so->diag[i]->row == so->diag[i]->col); assert(so->varord[so->diag[i]->row] == i); assert(so->rowst[i]->row == so->diag[i]->row); for (el = so->rowst[i]; el; el = el->c_right) { if (el == so->rowst[i]) { assert(el->c_left == ELM0); }else{ assert(el->c_left->c_right == el); assert(so->varord[el->c_left->col] < so->varord[el->col]); } } for (el = so->diag[i]->r_down; el; el = el->r_down) { assert(el->r_up->r_down == el); assert(so->varord[el->r_up->row] < so->varord[el->row]); } for (el = so->diag[i]->r_up; el; el = el->r_up) { assert(el->r_down->r_up == el); assert(so->varord[el->r_down->row] > so->varord[el->row]); } } } /* at this point row links are out of order for diag[i]->col and col links are out of order for diag[i]->row */ static void re_link(SparseObj* so, unsigned i) { Elm *el, *dright, *dleft, *dup, *ddown, *elnext; for (el=so->rowst[i]; el; el = el->c_right) { /* repair hole */ if (el->r_up) el->r_up->r_down = el->r_down; if (el->r_down) el->r_down->r_up = el->r_up; } for (el=so->diag[i]->r_down; el; el = el->r_down) { /* repair hole */ if (el->c_right) el->c_right->c_left = el->c_left; if (el->c_left) el->c_left->c_right = el->c_right; else so->rowst[so->varord[el->row]] = el->c_right; } for (el=so->diag[i]->r_up; el; el = el->r_up) { /* repair hole */ if (el->c_right) el->c_right->c_left = el->c_left; if (el->c_left) el->c_left->c_right = el->c_right; else so->rowst[so->varord[el->row]] = el->c_right; } /* matrix is consistent except that diagonal row elements are unlinked from their columns and the diagonal column elements are unlinked from their rows. For simplicity discard all knowledge of links and use getelm to relink */ so->rowst[i] = so->diag[i]; dright = so->diag[i]->c_right; dleft = so->diag[i]->c_left; dup = so->diag[i]->r_up; ddown = so->diag[i]->r_down; so->diag[i]->c_right = so->diag[i]->c_left = ELM0; so->diag[i]->r_up = so->diag[i]->r_down = ELM0; for (el=dright; el; el = elnext) { elnext = el->c_right; IGNORE(getelm(so, el->row, el->col, el)); } for (el=dleft; el; el = elnext) { elnext = el->c_left; IGNORE(getelm(so, el->row, el->col, el)); } for (el=dup; el; el = elnext) { elnext = el->r_up; IGNORE(getelm(so, el->row, el->col, el)); } for (el=ddown; el; el = elnext){ elnext = el->r_down; IGNORE(getelm(so, el->row, el->col, el)); } } static SparseObj* create_sparseobj() { SparseObj* so; so = emalloc(sizeof(SparseObj)); nrn_malloc_lock(); so->elmpool = nrn_pool_create(100, sizeof(Elm)); nrn_malloc_unlock(); so->rowst = 0; so->diag = 0; so->neqn = 0; so->varord = 0; so->rhs = 0; so->oldfun = 0; so->ngetcall = 0; so->phase = 0; so->coef_list = 0; so->roworder = 0; so->nroworder = 0; so->orderlist = 0; so->do_flag = 0; return so; } void _nrn_destroy_sparseobj_thread(SparseObj* so) { int i; if (!so) { return; } nrn_pool_delete(so->elmpool); if (so->rowst) Free(so->rowst); if (so->diag) Free(so->diag); if (so->varord) Free(so->varord); if (so->rhs) Free(so->rhs); if (so->coef_list) Free(so->coef_list); if (so->roworder) { for (i=1; i <= so->nroworder; ++i) { Free(so->roworder[i]); } Free(so->roworder); } if (so->orderlist) freelist(so->orderlist); Free(so); } neuron-7.5/src/scopmath/spline.c000077500000000000000000000107221323325274500167510ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: spline.c * * Copyright (c) 1987-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "spline.c,v 1.1.1.1 1994/10/12 17:22:24 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: derivs() */ /* */ /* Computes the second derivatives at the base points for */ /* cubic spline interpolation. Call this function once */ /* prior to calling spline for each interpolation. Note */ /* that the second derivatives for the terminal base points */ /* are assumed to be zero, i.e., a "natural" spline. The */ /* base points must be stored in a vector variable in */ /* ascending order of numerical value. */ /* */ /* Calling sequence: derivs(nbase, x, y, h, der) */ /* */ /* Arguments: */ /* Input: nbase, int number of base points */ /* x, double x values at the base points */ /* y, double y values at the base points */ /* */ /* Output: h, double spacing of base points */ /* der, double second derivatives at the */ /* base points */ /* */ /* Returns: 0 if no error; 2 if tridiagonal matrix is singular */ /* or ill-conditioned */ /* */ /* Functions called: tridiag(), makevector(), freevector(), */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ int derivs(nbase, x, y, h, der) int nbase; double x[], y[], h[], der[]; { int i, error; double *a, *b, *c, *d; extern int tridiag(), freevector(); extern double *makevector(); /* * Set up tridagonal matrix, arrays a, b, and c, and the constant vector * d and allocate storage for the derivative pointer array */ a = makevector(nbase); b = makevector(nbase); c = makevector(nbase); d = makevector(nbase); for (i = 0; i < nbase - 1; i++) { h[i] = x[i + 1] - x[i]; d[i] = (y[i + 1] - y[i]) / h[i]; } for (i = 0; i < nbase - 2; i++) { b[i] = 2.0; c[i] = h[i + 1] / (h[i] + h[i + 1]); a[i] = 1.0 - c[i]; d[i] = 6.0 * (d[i + 1] - d[i]) / (h[i] + h[i + 1]); } /* * Solve for second derivatives at interior base points and return in der * array */ error = tridiag(nbase - 2, a, b, c, d, der+1); der[0] = 0.0; der[nbase - 1] = 0.0; freevector(a); freevector(b); freevector(c); freevector(d); return (error); } /****************************************************************/ /* */ /* Abstract: spline() */ /* */ /* Evaluates the cubic function at the point for which an */ /* interpolation is desired. Call this function once for */ /* each interpolation to be performed. */ /* */ /* Calling sequence: spline(nbase, x, y, h, der, x_inter) */ /* */ /* Arguments: */ /* Input: nbase, int number of base points */ /* x, double x values at the base points */ /* y, double y values at the base points */ /* h, double separations of the base points */ /* der, double second derivatives at the */ /* base points */ /* x_inter, double value at which interpolation */ /* is desired */ /* */ /* Returns: double precision value of the cubic spline on the */ /* appropriate subinterval. Returns -1.e35 if the */ /* interpolation point is outside the range spanned */ /* by the base points. */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /****************************************************************/ double spline(nbase, x, y, h, der, x_inter) int nbase; double x[], y[], h[], der[], x_inter; { int i; double factor, factor1, y_inter; /* find subinterval containing point at which interpolation is desired */ if ((x_inter < x[0]) || (x_inter > x[nbase - 1])) return (-1.e35); for (i = 0; i < nbase - 1; i++) if ((x_inter >= x[i]) && (x_inter <= x[i + 1])) break; /* Perform interpolation */ factor = x_inter - x[i]; factor1 = x[i + 1] - x_inter; y_inter = (der[i] * factor1 * factor1 * factor1) / (6.0 * h[i]); y_inter += (der[i + 1] * factor * factor * factor) / (6.0 * h[i]); y_inter += (y[i + 1] / h[i] - der[i + 1] * h[i] / 6.0) * factor; y_inter += (y[i] / h[i] - der[i] * h[i] / 6.0) * factor1; return (y_inter); } neuron-7.5/src/scopmath/squarewa.c000077500000000000000000000036571323325274500173200ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: squarewa.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "squarewa.c,v 1.2 1997/08/30 14:32:22 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: squarewave() */ /* */ /* Generates a sqare wave of specified amplitude and period */ /* */ /* Calling sequence: squarewave(t, period, amplitude) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* period, double length of each cycle, including */ /* positive and negative phases */ /* */ /* amplitude, double */ /* positive amplitude of wave */ /* */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /* Returns: Double precision value of the square wave function */ /* Positive amplitude is first half of cycle, and */ /* negative amplitude is second half of cycle. */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double squarewave(reset_integ, old_value, t, period, amplitude) double *old_value, t, period, amplitude; int *reset_integ; { double temp, value; #ifndef MAC extern double modf(); #endif temp = modf(t / period, &temp); if (temp < 0.5) value = amplitude; else value = -amplitude; if (value != *old_value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/ssimplic.c000077500000000000000000000041011323325274500172740ustar00rootroot00000000000000#include <../../nrnconf.h> #include "errcodes.h" #define s_(arg) p[s[arg]] extern void _modl_set_dt(double); extern int _advance(); extern int sparse(); extern int derivimplicit(); static int check_state(); int _ss__advance(_ninits, n, s, d, p, t, dt, fun, pcoef, linflag) int n, _ninits, linflag; int (*fun) (); double *t, dt, *p, ***pcoef; int s[]; int d[]; { int err, i; double ss_dt; ss_dt=1e9; _modl_set_dt(ss_dt); if (linflag) { /*iterate linear solution*/ err = _advance(_ninits, n, s, d, p, t, ss_dt, fun, pcoef, 0); } else { #define NIT 7 for (i = 0; i < NIT; i++) { err = _advance(_ninits, n, s, d, p, t, ss_dt, fun, pcoef, 1); if (err) { break; /* perhaps we should re-start */ } if (check_state(n, s, p)) { err = _advance(_ninits, n, s, d, p, t, ss_dt, fun, pcoef, 0); break; } } if (i >= NIT) { err = 1; } } _modl_set_dt(dt); return err; } int _ss_sparse(v, n, s, d, p, t, dt, fun, pcoef, linflag) void** v; int n, linflag; int (*fun)(); double *t, dt, **pcoef, *p; int *s, *d; { int err, i; double ss_dt; ss_dt=1e9; _modl_set_dt(ss_dt); if (linflag) { /*iterate linear solution*/ err = sparse(v, n, s, d, p, t, ss_dt, fun, pcoef, 0); } else { #define NIT 7 for (i = 0; i < NIT; i++) { err = sparse(v, n, s, d, p, t, ss_dt, fun, pcoef, 1); if (err) { break; /* perhaps we should re-start */ } if (check_state(n, s, p)) { err = sparse(v, n, s, d, p, t, ss_dt, fun, pcoef, 0); break; } } if (i >= NIT) { err = 1; } } _modl_set_dt(dt); return err; } int _ss_derivimplicit(_ninits, n, slist, dlist, p, pt, dt, fun, ptemp) int n, _ninits; double *p, *pt, dt, **ptemp; int *slist, *dlist; int (*fun)(); { int err, i; double ss_dt; ss_dt=1e9; _modl_set_dt(ss_dt); err = derivimplicit(_ninits, n, slist, dlist, p, pt, ss_dt, fun, ptemp); _modl_set_dt(dt); return err; } static int check_state(n, s, p) int n, *s; double *p; { int i, flag; flag = 1; for (i=0; i #include "errcodes.h" #define s_(arg) p[s[arg]] extern double _modl_get_dt_thread(void*); extern void _modl_set_dt_thread(double, void*); extern int sparse_thread(); extern int derivimplicit_thread(); static int check_state(); int _ss_sparse_thread(v, n, s, d, p, t, dt, fun, linflag, ppvar, thread, nt) void** v; int n, linflag; int (*fun)(); double *t, dt, *p; int *s, *d; void* ppvar; void* thread; void* nt; { int err, i; double ss_dt; ss_dt = 1e9; _modl_set_dt_thread(ss_dt, nt); if (linflag) { /*iterate linear solution*/ err = sparse_thread(v, n, s, d, p, t, ss_dt, fun, 0, ppvar, thread, nt); } else { #define NIT 7 for (i = 0; i < NIT; i++) { err = sparse_thread(v, n, s, d, p, t, ss_dt, fun, 1, ppvar, thread, nt); if (err) { break; /* perhaps we should re-start */ } if (check_state(n, s, p)) { err = sparse_thread(v, n, s, d, p, t, ss_dt, fun, 0, ppvar, thread, nt); break; } } if (i >= NIT) { err = 1; } } _modl_set_dt_thread(dt, nt); return err; } int _ss_derivimplicit_thread(int n, int* slist, int* dlist, double* p, int (*fun)(double*, void*, void*, void*), void* ppvar, void* thread, void* nt) { int err, i; double dtsav; dtsav = _modl_get_dt_thread(nt); _modl_set_dt_thread(1e-9, nt); err = derivimplicit_thread(n, slist, dlist, p, fun, ppvar, thread, nt); _modl_set_dt_thread(dtsav, nt); return err; } static int check_state(n, s, p) int n, *s; double *p; { int i, flag; flag = 1; for (i=0; i /****************************************************************************** * * File: step.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "step.c,v 1.1.1.1 1994/10/12 17:22:25 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: step() */ /* */ /* Generates a single jump of specified height and duration */ /* in a constant function. */ /* */ /* Calling sequence: step(t, jumpt, jump) */ /* */ /* Arguments */ /* Input: t, double the independent variable, */ /* usually time */ /* */ /* jumpt, double value of t at which step occurs */ /* */ /* jump, double step height */ /* */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /* Returns: Double precision value of the step function, zero */ /* before the step is taken or the step height after */ /* the step is taken */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ double step(reset_integ, old_value, t, jumpt, jump) double *old_value, t, jumpt, jump; int *reset_integ; { double value; if (t >= jumpt) value = jump; else value = 0.0; if (*old_value != value) *reset_integ = 1; *old_value = value; return (value); } neuron-7.5/src/scopmath/threshol.c000077500000000000000000000043561323325274500173150ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: threshol.c * * Copyright (c) 1984-1991 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "threshol.c,v 1.1.1.1 1994/10/12 17:22:25 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: threshold() */ /* */ /* Switches between inactive and active states */ /* */ /* Calling sequence: */ /* threshold(reset_integ, old_value, x, limit, mode) */ /* */ /* Arguments */ /* Input: x, double test variable for switch */ /* */ /* limit, double threshold switch point */ /* */ /* mode, pointer *mode = "min" indicates limit is*/ /* to a minimum value for active state */ /* string *mode = "max" indicates limit is*/ /* maximum value for active state */ /* Output: reset_integ, *int set to 1 if discontinuity is */ /* generated */ /* old_value, *double saved value from previous */ /* call */ /* */ /* Returns: 0 if argument is below (or above, depending on */ /* mode)threshold limit, 1 otherwise. Returns -1 if */ /* input error detected. Values are doubles. */ /* */ /* Output: *mode string is forced to be in lower case */ /* also see reset_integ and old_value above */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #include double threshold(reset_integ, old_value, x, limit, mode) double x, limit, *old_value; int *reset_integ; char *mode; { extern int strcmp(); int i; double ret_val; for (i = 0; *(mode + i) != '\0'; i++) if (isupper(*(mode + i))) *(mode + i) = tolower(*(mode + i)); if (strcmp(mode, "min") == 0) { if (x >= limit) ret_val = 1.; else ret_val = 0.; } else if (strcmp(mode, "max") == 0) { if (x <= limit) ret_val = 1.; else ret_val = 0.; } else ret_val = -1.; if (*old_value != ret_val) *reset_integ = 1; *old_value = ret_val; return(ret_val); } neuron-7.5/src/scopmath/tridiag.c000077500000000000000000000045771323325274500171150ustar00rootroot00000000000000#include <../../nrnconf.h> /****************************************************************************** * * File: tridiag.c * * Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "tridiag.c,v 1.2 1999/01/04 12:46:53 hines Exp" ; #endif /****************************************************************/ /* */ /* Abstract: tridiag() */ /* */ /* Solves a system of simultaneous linear equations whose */ /* coefficients form a tridiagonal matrix. The vectors */ /* containing the elements of the three diagonals are */ /* destroyed in the process. TOLER is the minimal value a */ /* diagonal element can be without being considered zero */ /* (currently set to 1.e-20). */ /* */ /* Calling sequence: tridiag(n, a, b, c, d, soln) */ /* */ /* Arguments: */ /* Input: abs(n), int number of equations; if n > 0, */ /* perform LU decomposition first */ /* a[], double elements of the subdiagonal */ /* b[], double elements of the main diagonal */ /* c[], double elements of the superdiagonal */ /* d[], double elements of constant vector */ /* */ /* Returns: 0 if no error; 2 if tridiagonal matrix is singular */ /* or ill-conditioned */ /* */ /* Output: *soln[], double solution vector */ /* */ /* Functions called: none */ /* */ /* Files accessed: none */ /* */ /****************************************************************/ #include #include #include "errcodes.h" int tridiag(n, a, b, c, d, soln) int n; double a[], b[], c[], d[], soln[]; { int k, nn; double denom; nn = abs(n); /* Perform LU decomposition on tridiagonal matrix */ for (k = 1; k < nn; ++k) { /* Check for singularity */ denom = b[k - 1]; if (fabs(denom) < ROUNDOFF) return (SINGULAR); /* Skip lower triangle if matrix unchanged */ if (n > 0) { /* Note that a[0] and c[nn-2] are not present in matrix */ a[k] /= denom; b[k] -= a[k] * c[k - 1]; } /* Transform constant vector */ d[k] -= a[k] * d[k - 1]; } /* Perform back substitution */ soln[nn - 1] = d[nn - 1] / b[nn - 1]; for (k = nn - 2; k >= 0; --k) soln[k] = (d[k] - c[k] * (soln[k + 1])) / b[k]; return (SUCCESS); } neuron-7.5/src/scopmath/vsparse.c000077500000000000000000000677241323325274500171600ustar00rootroot00000000000000#include <../../nrnconf.h> /* * Last edited: Aug 5 17:37 1994 (ngoddard) */ /* vector_sparse for solving vectorized kinetic blocks */ /****************************************************************************** * * File: sparse.c * * Copyright (c) 1989, 1990 * Duke University * ******************************************************************************/ #ifndef LINT static char RCSid[] = "vsparse.c,v 1.5 1999/01/04 12:46:53 hines Exp"; #endif #include "errcodes.h" #include #include #include #include #if defined(HAVE_MALLOC_H) #include #endif extern void _modl_set_dt(double); #define SW_DATA 0 #define SOLVE 0 #define _INSTANCE_LOOP for (_ix = _ix1; _ix < _ix2; ++_ix) #define BIG_INSTANCE_LOOP for (_ix = 0; _ix < count; ++_ix) # define rowst vec_spar_rowst # define diag vec_spar_diag # define neqn vec_spar_neqn # define varord vec_spar_varord # define matsol vec_spar_matsol # define getelm vec_spar_getelm # define bksub vec_spar_bksub # define prmat vec_spar_prmat # define subrow vec_spar_subrow # define remelm vec_spar_remelm /* NOTE THIS! Element rows and columns go from 1 to neqn+1 But the jacobian rows and cols go from 0 to neqn !! */ typedef struct Elm { unsigned row; /* Row location */ unsigned col; /* Column location */ double *value; /* The value */ struct Elm *r_up; /* Link to element in same column */ struct Elm *r_down; /* in solution order */ struct Elm *c_left; /* Link to left element in same row */ struct Elm *c_right; /* in solution order (see getelm) */ } Elm; #define ELM0 (Elm *)0 typedef struct Item { Elm *elm; unsigned norder; /* order of a row */ struct Item *next; struct Item *prev; } Item; #define ITEM0 (Item *)0 typedef Item List; /* list of mixed items */ typedef struct SparseObj { /* all the state information */ Elm** rowst; Elm** diag; unsigned neqn; unsigned* varord; int (*oldfun)(); int phase; /* don't really need the rest */ Item** roworder; List* orderlist; int do_flag; /* new stuff for vectorization */ int ninst; /* number of instances in this sparse object */ double ** jacob; /* jacobian elements */ double ** rhs; /* right hand side */ double ** space; /* work space in caller */ double * err; /* error for each instance */ int * converged; /* 0 until converged */ double * r_subrow; /* work space in subrow() */ } SparseObj; static Elm **rowst;/* link to first element in row (solution order) 1..n+1*/ static Elm **diag;/* link to pivot element in row (solution order) 1..n+1*/ static unsigned neqn; /* number of equations */ static unsigned *varord; /* row and column order for pivots */ static double **rhs; /* initially- right hand side finally - answer 0..n*/ static int phase; /* 0-solution phase; 1-count phase; 2-build list phase */ static double **jacob; /* jacobian values for all instances indexed jacob[row*neqn+col][instance] */ static double *r_subrow; /* workspace for subrow routine allocated in crea_spar_obj*/ static Item **roworder; /* roworder[i] is pointer to order item for row i. Does not have to be in orderlist 1..n+1*/ static List *orderlist; /* list of rows sorted by norder that haven't been used */ static int do_flag; static int ninst; /* note: solution order refers to the following diag[varord[row]]->row = row = diag[varord[row]]->col rowst[varord[row]]->row = row varord[el->row] < varord[el->c_right->row] varord[el->col] < varord[el->r_down->col] */ extern void *emalloc(); /* in sparse.c */ static int vector_matsol(); static Elm *getelm(); static void sparseobj2local(); static void local2sparseobj(); static double d; double * _vector_getelm( row, col) int row, col; { row++; col++; /* note: start at 1, not 0 */ if (!phase) { fprintf(stderr, "vector_getelm called in phase 0.. abort\n"); abort(); } return &(getelm( (unsigned)row, (unsigned)col, ELM0)->value[0]); } SparseObj * create_sparseobj(ninst,neqn,linflag) int ninst,neqn,linflag; { int i, j, k; SparseObj * so = (SparseObj *) malloc (sizeof(SparseObj)); double ** t; /* from sparse.c */ so->rowst = 0; so->diag = 0; so->neqn = 0; so->varord = 0; so->oldfun = 0; so->phase = 0; so->roworder = 0; so->orderlist = 0; so->do_flag = 0; /* end */ so->ninst = ninst; /* to enable check on growth */ /* allocate the jacobians */ k = (neqn)*(neqn); so->jacob = t = (double **) malloc(k*sizeof(double*)); t[0] = (double *) calloc(ninst*k, sizeof(double)); #if CRAY #pragma _CRI ivdep #endif for (i = 0; i < k; i++) /* t[i] = (double *) calloc(ninst, sizeof(double));*/ t[i] = t[0] + ninst*i; /*********************************/ /* allocate the right hand sides */ k = neqn; so->rhs = t = (double **) malloc((neqn)*sizeof(double*)); t[0] = (double *) calloc( k*ninst, sizeof(double)); #if CRAY #pragma _CRI ivdep #endif for (i = 0; i < k; i++) /* t[i] = (double *) calloc(ninst, sizeof(double)); */ t[i] = t[0] + ninst * i ; /*********************************/ /* allocate the workspace */ k = neqn; so->space = t = (double **) malloc( (neqn)*sizeof(double*)); #if CRAY #pragma _CRI ivdep #endif for (i = 0; i < k; i++) t[i] = (double *) calloc(ninst, sizeof(double)); if (!linflag) /**************************************************/ /* allocate the error vector and converged vector */ { so->err = (double *) calloc(ninst,sizeof(double)); so->converged = (int *) calloc(ninst,sizeof(int)); } /* allocate the temporary space needed in subrow() */ so->r_subrow = (double *) calloc( ninst, sizeof(double) ); /* initialize oldfun */ so->oldfun = NULL; return so; } static void subrow(); static void bksub(); static void free_elm(); static void create_coef_list(); static void init_coef_list(); static void increase_order(); static void reduce_order(); static void spar_minorder(); static void get_next_pivot(); static void freelist(); static void check_assert(); static void re_link(); static void delete(); /*----------------------------------------------------------------------------- * THIS NEEDS UPDATING * sparse() * * Abstract: * This is an experimental numerical method for SCoP-3 which integrates kinetic * rate equations. It is intended to be used only by models generated by MODL, * and its identity is meant to be concealed from the user. * * * Calling sequence: * sparse(n, s, d, t, dt, fun, prhs, linflag) * * Arguments: * n number of state variables * s array of pointers to the state variables * d array of pointers to the derivatives of states * t pointer to the independent variable * dt the time step * fun pointer to the function corresponding to the * kinetic block equations * prhs pointer to right hand side vector (answer on return) * does not have to be allocated by caller. * linflag solve as linear equations * when nonlinear, all states are forced >= 0 * * * Returns: nothing * * Functions called: IGNORE(), printf(), create_coef_list(), fabs() * * Files accessed: none * */ int _vector_sparse(base, bound, count, jacobp, spacep, sparseobj, neqns, state, deriv, data, t, delta_t, vfun, fun, rhsp, linflag) int base; /* first instances */ int bound; /* last instance + 1 */ int count; /* total number of instances */ double *** jacobp; /* pointer to list of jacobians */ /* accessed as *jacobp[element][instance] */ double *** spacep; /* pointer to workpace */ /* accessed as *spacep[variable][instance] */ void ** sparseobj; /* pointer to sparse obj for this mechanism */ int neqns; /* number of state variables */ int state[]; /* index of state vars in data */ int deriv[]; /* index of derivs in data */ double * data[]; /* list of intance data, inst is first idx! */ /* accessed as data[instance][parameter] */ double * t; /* pointer to time */ double delta_t; /* delta t */ int (*vfun)(); /* function to compute jacobian entries */ int (*fun)(); /* function which calls _vector_getelm */ double *** rhsp; /* pointer to list of right hand sides */ /* accessed as *rhsp[variable][instance] */ int linflag; /* if != 0 then linear */ { int i, j, k, ierr; double * err=0; SparseObj* so; int nconverged = 0; int * converged=0; int zero = 0; static SparseObj* old_sparseobj = NULL; so = (SparseObj *) *sparseobj; /* translater uses void pointer */ ninst = count; if (!so) { /* first time in this mechanism */ so = create_sparseobj(ninst,neqns,linflag); *sparseobj = (void *) so; /* so that it is set on next call */ *jacobp = so->jacob; jacob = so->jacob; *rhsp = so->rhs; rhs = so->rhs; *spacep = so->space; } else /* check that haven't increased size */ if (so->ninst < bound) /* only care about ones being used here */ { fprintf(stderr, "**Fatal error: number of instances increased in vector_sparse\n"); abort(); } if (so != old_sparseobj) { sparseobj2local(so); old_sparseobj = so; } if (so->oldfun != fun) { so->oldfun = fun; create_coef_list(base,bound, count,neqns, fun); /* calls fun twice */ local2sparseobj(so); } if (!linflag) { err = so->err; converged = so->converged; } /*=====================================================*/ /*==================================================== */ /* performance evaluation stuff */ /*==================================================== */ #if 1 /**/ #define FLOWMARK(arg) /**/ #endif /**/ /**/ #if SW_DATA /**/ #define data1(i,j) data[j][i] /**/ #else /**/ #define data1(i,j) data[i][j] /**/ #endif /**/ /*==================================================== */ /*==================================================== */ for (i=0; i MAXSTEPS) { return EXCEED_ITERS; } } init_coef_list(base,bound); (*vfun)(base,bound); for (i=0; ivalue[_ix] ) <= ROUNDOFF) return SINGULAR; } /* Eliminate all elements in pivot column */ for (el = pivot->r_down ; el ; el = el->r_down) subrow(_ix1, _ix2, pivot, el); } bksub(_ix1,_ix2); return(SUCCESS); } static void subrow(_ix1, _ix2, pivot, rowsub) int _ix1, _ix2; Elm *pivot, *rowsub; { int _ix; register Elm *el; _INSTANCE_LOOP { r_subrow[_ix] = (rowsub->value)[_ix] / (pivot->value)[_ix]; rhs[rowsub->row-1][_ix] -= rhs[pivot->row-1][_ix] * r_subrow[_ix]; } for (el = pivot->c_right ; el ; el = el->c_right) { for (rowsub = rowsub->c_right; rowsub->col != el->col; rowsub = rowsub->c_right) { ; } _INSTANCE_LOOP rowsub->value[_ix] -= el->value[_ix] * r_subrow[_ix]; } } static void bksub(_ix1, _ix2) int _ix1, _ix2; { int _ix; unsigned i; Elm *el; for (i = neqn ; i >= 1 ; i--) { for (el = diag[i]->c_right ; el ; el = el->c_right) { _INSTANCE_LOOP rhs[el->row-1][_ix] -= (el->value)[_ix]* rhs[el->col-1][_ix]; } _INSTANCE_LOOP rhs[diag[i]->row-1][_ix] /= (diag[i]->value)[_ix]; } } static void prmat() { unsigned i, j; Elm *el; IGNORE(printf("\n ")); for (i=10 ; i <= neqn ; i += 10) IGNORE(printf(" %1d", (i%100)/10)); IGNORE(printf("\n ")); for (i=1 ; i <= neqn; i++) IGNORE(printf("%1d", i%10)); IGNORE(printf("\n\n")); for (i=1 ; i <= neqn ; i++) { IGNORE(printf("%3d %3d ", diag[i]->row, i)); j = 0; for (el = rowst[i] ;el ; el = el->c_right) { for ( j++ ; j < varord[el->col] ; j++) IGNORE(printf(" ")); IGNORE(printf("*")); } IGNORE(printf("\n")); } IGNORE(fflush(stdin)); } static void initeqn(_ix1, _ix2, count, maxeqn) /* reallocate space for matrix */ int _ix1, _ix2, count ; unsigned maxeqn; { int _ix = _ix1; register unsigned i; double *val; if (maxeqn == neqn) return; free_elm(); if (rowst) Free(rowst); if (diag) Free(diag); if (varord) Free(varord); rowst = diag = (Elm **)0; varord = (unsigned *)0; rowst = (Elm **)emalloc((maxeqn + 1)*sizeof(Elm *)); diag = (Elm **)emalloc((maxeqn + 1)*sizeof(Elm *)); varord = (unsigned *)emalloc((maxeqn + 1)*sizeof(unsigned)); for (i=1 ; i<= maxeqn ; i++) { varord[i] = i; diag[i] = (Elm *)emalloc(sizeof(Elm)); diag[i]->value = (jacob[(i-1)*(maxeqn+1)]); /* = row*maxeqn+col */ rowst[i] = diag[i]; diag[i]->row = i; diag[i]->col = i; diag[i]->r_down = diag[i]->r_up = ELM0; diag[i]->c_right = diag[i]->c_left = ELM0; BIG_INSTANCE_LOOP{ /* ??? NHG */ diag[i]->value[_ix] = 0.; rhs[i-1][_ix] = 0.; } } neqn = maxeqn; } static void free_elm() { unsigned i; Elm *el; /* free all elements */ for (i=1; i <= neqn; i++) { for (el = rowst[i]; el; el=el->c_right) Free(el); rowst[i] = ELM0; diag[i] = ELM0; } } /* see check_assert in minorder for info about how this matrix is supposed to look. In new is nonzero and an element would otherwise be created, new is used instead. This is because linking an element is highly nontrivial The biggest difference is that elements are no longer removed and this saves much time allocating and freeing during the solve phase */ static Elm * getelm( row, col, new) register Elm *new; unsigned row, col; /* 1..n+1 */ /* return pointer to row col element maintaining order in rows */ { int _ix = 0; register Elm *el, *elnext; unsigned vrow, vcol; vrow = varord[row]; vcol = varord[col]; if (vrow == vcol) { return diag[vrow]; /* a common case */ } if (vrow > vcol) { /* in the lower triangle */ /* search downward from diag[vcol] */ for (el=diag[vcol]; ; el = elnext) { elnext = el->r_down; if (!elnext) { break; }else if (elnext->row == row) { /* found it */ return elnext; }else if (varord[elnext->row] > vrow) { break; } } /* insert below el */ if (!new) { new = (Elm *)emalloc(sizeof(Elm)); new->value = jacob[(row-1)*neqn + col-1]; increase_order(row); } new->r_down = el->r_down; el->r_down = new; new->r_up = el; if (new->r_down) { new->r_down->r_up = new; } /* search leftward from diag[vrow] */ for (el=diag[vrow]; ; el = elnext) { elnext = el->c_left; if (!elnext) { break; } else if (varord[elnext->col] < vcol) { break; } } /* insert to left of el */ new->c_left = el->c_left; el->c_left = new; new->c_right = el; if (new->c_left) { new->c_left->c_right = new; }else{ rowst[vrow] = new; } } else { /* in the upper triangle */ /* search upward from diag[vcol] */ for (el=diag[vcol]; ; el = elnext) { elnext = el->r_up; if (!elnext) { break; }else if (elnext->row == row) { /* found it */ return elnext; }else if (varord[elnext->row] < vrow) { break; } } /* insert above el */ if (!new) { new = (Elm *)emalloc(sizeof(Elm)); new->value = jacob[(row-1)*neqn + col-1]; increase_order(row); } new->r_up = el->r_up; el->r_up = new; new->r_down = el; if (new->r_up) { new->r_up->r_down = new; } /* search right from diag[vrow] */ for (el=diag[vrow]; ; el = elnext) { elnext = el->c_right; if (!elnext) { break; }else if (varord[elnext->col] > vcol) { break; } } /* insert to right of el */ new->c_right = el->c_right; el->c_right = new; new->c_left = el; if (new->c_right) { new->c_right->c_left = new; } } new->row = row; new->col = col; return new; } static void create_coef_list(_ix1, _ix2, count, n, fun) int _ix1, _ix2, n, count; int (*fun)(); { initeqn(_ix1, _ix2, count, (unsigned)n); phase = 1; (*fun)(_ix1, _ix2); spar_minorder(); phase = 2; (*fun)(_ix1, _ix2); phase = 0; } static void init_coef_list(_ix1, _ix2) int _ix1, _ix2; { int _ix; unsigned i; Elm *el; for (i=1; i<=neqn; i++) { for (el = rowst[i]; el; el = el->c_right) { _INSTANCE_LOOP (el->value)[_ix] = 0.; } } } static Item *newitem(); static List *newlist(); static void insert(); static void init_minorder() { /* matrix has been set up. Construct the orderlist and orderfind vector. */ unsigned i, j; Elm *el; do_flag = 1; if (roworder) Free(roworder); roworder = (Item **)emalloc((neqn+1)*sizeof(Item *)); if (orderlist) freelist(orderlist); orderlist = newlist(); for (i=1; i<=neqn; i++) { roworder[i] = newitem(); } for (i=1; i<=neqn; i++) { for (j=0, el = rowst[i]; el; el = el->c_right) { j++; } roworder[diag[i]->row]->elm = diag[i]; roworder[diag[i]->row]->norder = j; insert(roworder[diag[i]->row]); } } static void increase_order(row) unsigned row; { /* order of row increases by 1. Maintain the orderlist. */ Item *order; if(!do_flag) return; order = roworder[row]; delete(order); order->norder++; insert(order); } static void reduce_order(row) unsigned row; { /* order of row decreases by 1. Maintain the orderlist. */ Item *order; if(!do_flag) return; order = roworder[row]; delete(order); order->norder--; insert(order); } static void spar_minorder() { /* Minimum ordering algorithm to determine the order that the matrix should be solved. Also make sure all needed elements are present. This does not mess up the matrix */ unsigned i; check_assert(); init_minorder(); for (i=1; i<=neqn; i++) { get_next_pivot(i); } do_flag = 0; check_assert(); } static void get_next_pivot(i) unsigned i; { /* get varord[i], etc. from the head of the orderlist. */ Item *order; Elm *pivot, *el; unsigned j; order = orderlist->next; assert(order != orderlist); if ((j=varord[order->elm->row]) != i) { /* push order lists down by 1 and put new diag in empty slot */ assert(j > i); el = rowst[j]; for (; j > i; j--) { diag[j] = diag[j-1]; rowst[j] = rowst[j-1]; varord[diag[j]->row] = j; } diag[i] = order->elm; rowst[i] = el; varord[diag[i]->row] = i; /* at this point row links are out of order for diag[i]->col and col links are out of order for diag[i]->row */ re_link(i); } /* now make sure all needed elements exist */ for (el = diag[i]->r_down; el; el = el->r_down) { for (pivot = diag[i]->c_right; pivot; pivot = pivot->c_right) { IGNORE(getelm(el->row, pivot->col, ELM0)); } reduce_order(el->row); } #if 0 {int j; Item *or; printf("%d ", i); for (or = orderlist->next, j=0; j<5 && or != orderlist; j++, or=or->next) { printf("(%d, %d) ", or->elm->row, or->norder); } printf("\n"); } #endif delete(order); } /* The following routines support the concept of a list. modified from modl */ /* Implementation The list is a doubly linked list. A special item with element 0 is always at the tail of the list and is denoted as the List pointer itself. list->next point to the first item in the list and list->prev points to the last item in the list. i.e. the list is circular Note that in an empty list next and prev points to itself. It is intended that this implementation be hidden from the user via the following function calls. */ static Item * newitem() { Item *i; i = (Item *)emalloc(sizeof(Item)); i->prev = ITEM0; i->next = ITEM0; i->norder = 0; i->elm = (Elm *)0; return i; } static List * newlist() { Item *i; i = newitem(); i->prev = i; i->next = i; return (List *)i; } static void freelist(list) /*free the list but not the elements*/ List *list; { Item *i1, *i2; for (i1 = list->next; i1 != list; i1 = i2) { i2 = i1->next; Free(i1); } Free(list); } static void linkitem(item, i) /*link i before item*/ Item *item; Item *i; { i->prev = item->prev; i->next = item; item->prev = i; i->prev->next = i; } static void insert(item) Item *item; { Item *i; for (i = orderlist->next; i != orderlist; i = i->next) { if (i->norder >= item->norder) { break; } } linkitem(i, item); } static void delete(item) Item *item; { item->next->prev = item->prev; item->prev->next = item->next; item->prev = ITEM0; item->next = ITEM0; } static void check_assert() { /* check that all links are consistent */ unsigned i; Elm *el; for (i=1; i<=neqn; i++) { assert(diag[i]); assert(diag[i]->row == diag[i]->col); assert(varord[diag[i]->row] == i); assert(rowst[i]->row == diag[i]->row); for (el = rowst[i]; el; el = el->c_right) { if (el == rowst[i]) { assert(el->c_left == ELM0); }else{ assert(el->c_left->c_right == el); assert(varord[el->c_left->col] < varord[el->col]); } } for (el = diag[i]->r_down; el; el = el->r_down) { assert(el->r_up->r_down == el); assert(varord[el->r_up->row] < varord[el->row]); } for (el = diag[i]->r_up; el; el = el->r_up) { assert(el->r_down->r_up == el); assert(varord[el->r_down->row] > varord[el->row]); } } } /* at this point row links are out of order for diag[i]->col and col links are out of order for diag[i]->row */ static void re_link(i) unsigned i; { Elm *el, *dright, *dleft, *dup, *ddown, *elnext; for (el=rowst[i]; el; el = el->c_right) { /* repair hole */ if (el->r_up) el->r_up->r_down = el->r_down; if (el->r_down) el->r_down->r_up = el->r_up; } for (el=diag[i]->r_down; el; el = el->r_down) { /* repair hole */ if (el->c_right) el->c_right->c_left = el->c_left; if (el->c_left) el->c_left->c_right = el->c_right; else rowst[varord[el->row]] = el->c_right; } for (el=diag[i]->r_up; el; el = el->r_up) { /* repair hole */ if (el->c_right) el->c_right->c_left = el->c_left; if (el->c_left) el->c_left->c_right = el->c_right; else rowst[varord[el->row]] = el->c_right; } /* matrix is consistent except that diagonal row elements are unlinked from their columns and the diagonal column elements are unlinked from their rows. For simplicity discard all knowledge of links and use getelm to relink */ rowst[i] = diag[i]; dright = diag[i]->c_right; dleft = diag[i]->c_left; dup = diag[i]->r_up; ddown = diag[i]->r_down; diag[i]->c_right = diag[i]->c_left = ELM0; diag[i]->r_up = diag[i]->r_down = ELM0; for (el=dright; el; el = elnext) { elnext = el->c_right; IGNORE(getelm(el->row, el->col, el)); } for (el=dleft; el; el = elnext) { elnext = el->c_left; IGNORE(getelm(el->row, el->col, el)); } for (el=dup; el; el = elnext) { elnext = el->r_up; IGNORE(getelm(el->row, el->col, el)); } for (el=ddown; el; el = elnext){ elnext = el->r_down; IGNORE(getelm(el->row, el->col, el)); } } static void sparseobj2local(so) SparseObj* so; { rowst = so->rowst; diag = so->diag; neqn = so->neqn; varord = so->varord; phase = so->phase; roworder = so->roworder; orderlist = so->orderlist; do_flag = so->do_flag; /*******************************/ /* new stuff for vectorization */ jacob = so->jacob; rhs = so->rhs; r_subrow = so->r_subrow; } static void local2sparseobj(so) SparseObj* so; { so->rowst = rowst; so->diag = diag; so->neqn = neqn; so->varord = varord; so->phase = phase; so->roworder = roworder; so->orderlist = orderlist; so->do_flag = do_flag; /*******************************/ /* new stuff for vectorization */ so->jacob = jacob; so->rhs = rhs; so->r_subrow = r_subrow; } /* copied from scopmath/ssimplic.c */ static int check_state(base, bound, n, s, data) int n, *s, base, bound; double **data; { int i, flag, k; flag = 1; for (i=0; i= NIT) err = 1; } _modl_set_dt(delta_t); return err; } neuron-7.5/src/sparse/000077500000000000000000000000001323325274500147655ustar00rootroot00000000000000neuron-7.5/src/sparse/Makefile.am000077500000000000000000000002441323325274500170240ustar00rootroot00000000000000# This makefile does nothing except to copy some .c and .h files into # the distribution tar file. EXTRA_DIST = bksub.c getelm.c lineq.c lineq.h prmat.c subrows.c neuron-7.5/src/sparse/Makefile.in000066400000000000000000000374201323325274500170400ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This makefile does nothing except to copy some .c and .h files into # the distribution tar file. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/sparse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ EXTRA_DIST = bksub.c getelm.c lineq.c lineq.h prmat.c subrows.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sparse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sparse/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/sparse/bksub.c000077500000000000000000000005271323325274500162460ustar00rootroot00000000000000#include <../../nrnconf.h> #include "lineq.h" void bksub(void) { int i; struct elm *el, *pivot=0; for (i = neqn ; i >= 1 ; i--) { for (el = rowst[eqord[i]] ; el != NULL ; el = el->c_right) { if (el->col == varord[i]) pivot = el; else rhs[el->row] -= el->value * rhs[el->col]; } rhs[eqord[i]] /= pivot->value; } } neuron-7.5/src/sparse/getelm.c000077500000000000000000000023671323325274500164210ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include "lineq.h" #define diag(s) hoc_execerror(s, (char*)0); struct elm* getelm(struct elm* el, unsigned row, unsigned col) /* return pointer to row col element maintaining order in rows */ { register struct elm *new; if (el == ELM0) el = rowst[row]; /*EMPTY*/ if (el == ELM0); else if (el->col > col) el = ELM0; else { while ( el->c_right != ELM0 && el->c_right->col <= col) el = el->c_right; if (el->col == col) return(el); } if ( (new = (struct elm *)malloc(sizeof(struct elm))) == (struct elm *)0) diag("out of space for elements"); new->row = row; new->col = col; new->value = 0.; { new->r_up = ELM0; /* place new element first in column list */ new->r_down = colst[col]; if (colst[col] != ELM0) colst[col]->r_up = new; colst[col] = new; } if (el == ELM0) /* the new elm belongs at the beginning */ { /* of the row list */ new->c_left = ELM0; new->c_right = rowst[row]; if (rowst[row] != ELM0) rowst[row]->c_left = new; rowst[row] = new; } else /* the new elm belongs after el */ { new->c_left = el; new->c_right = el->c_right; el->c_right = new; if (new->c_right != ELM0) new->c_right->c_left = new; } return(new); } neuron-7.5/src/sparse/lineq.c000077500000000000000000000031521323325274500162450ustar00rootroot00000000000000#include <../../nrnconf.h> /*LINTLIBRARY*/ #include "lineq.h" #include struct elm **rowst; /* link to first element in row */ struct elm **colst; /* link to a column element */ unsigned neqn; /* number of equations */ unsigned *eqord; /* row order for pivots */ unsigned *varord; /* column order for pivots */ double *rhs; /* initially- right hand side finally - answer */ #define SMALL 0. int matsol(void) { register struct elm *pivot; register struct elm *el; struct elm *hold; int i, j; double max; /* Upper triangularization */ for (i=1 ; i <= neqn ; i++) { if (fabs((pivot = getelm(ELM0, eqord[i], varord[i]))->value) <= SMALL) { /* use max row element as pivot */ remelm(pivot); max = SMALL; pivot = ELM0; for (el = rowst[eqord[i]] ; el != ELM0 ; el = el->c_right) if (fabs(el->value) > max) max = fabs((pivot = el)->value); if (pivot == ELM0) return(0); else { for (j = i; j<= neqn ; j++) if (varord[j] == pivot->col) break; varord[j] = varord[i]; varord[i] = pivot->col; } } /* Eliminate all elements in pivot column */ for (el = colst[pivot->col] ; el != ELM0 ; el = hold) { hold = el->r_down; /* el will be freed below */ if (el != pivot) { subrow(pivot, el); remelm(el); } } /* Remove pivot row from further upper triangle work */ for (el = rowst[pivot->row] ; el != ELM0 ; el = el->c_right) { if (el->r_up != ELM0) el->r_up->r_down = el->r_down; else colst[el->col] = el->r_down; if (el->r_down != ELM0) el->r_down->r_up = el->r_up; } } bksub(); return(1); } neuron-7.5/src/sparse/lineq.h000077500000000000000000000024041323325274500162510ustar00rootroot00000000000000# define rowst spar_rowst # define colst spar_colst # define neqn spar_neqn # define eqord spar_eqord # define varord spar_varord # define rhs spar_rhs # define matsol spar_matsol # define getelm spar_getelm # define bksub spar_bksub # define prmat spar_prmat # define subrow spar_subrow # define remelm spar_remelm #include struct elm { unsigned row; /* Row location */ unsigned col; /* Column location */ double value; /* The value */ struct elm *r_up; /* Link to element in same column */ struct elm *r_down; /* not ordered list */ struct elm *c_left; /* Link to left element in same row */ struct elm *c_right; /* this list is ordered (see getelm) */ }; #define ELM0 (struct elm *)0 extern struct elm **rowst; /* link to first element in row */ extern struct elm **colst; /* link to a column element */ extern unsigned neqn; /* number of equations */ extern unsigned *eqord; /* row order for pivots */ extern unsigned *varord; /* column order for pivots */ extern double *rhs; /* initially- right hand side finally - answer */ extern int matsol(void); extern struct elm *getelm(struct elm*, unsigned, unsigned); extern void remelm(struct elm*); extern void subrow(struct elm*, struct elm*); extern void bksub(void); extern void prmat(void); neuron-7.5/src/sparse/prmat.c000077500000000000000000000012161323325274500162570ustar00rootroot00000000000000#include <../../nrnconf.h> /*LINTLIBRARY*/ #if LINT #define IGNORE(arg) {if(arg);} #else #define IGNORE(arg) arg #endif #include "lineq.h" void prmat(void) { int i, j; struct elm *el; IGNORE(printf("\n\n ")); for (i=10 ; i <= neqn ; i += 10) IGNORE(printf(" %1d", (i%100)/10)); IGNORE(printf("\n ")); for (i=1 ; i <= neqn; i++) IGNORE(printf("%1d", i%10)); IGNORE(printf("\n\n")); for (i=1 ; i <= neqn ; i++) { IGNORE(printf("%3d ", i)); j = 0; for (el = rowst[i] ;el != ELM0 ; el = el->c_right) { for ( j++ ; j < el->col ; j++) IGNORE(putchar(' ')); IGNORE(putchar('*')); } IGNORE(putchar('\n')); } } neuron-7.5/src/sparse/subrows.c000077500000000000000000000014561323325274500166460ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include "lineq.h" void subrow(struct elm *pivot, struct elm*rowsub) { unsigned row; double r; register struct elm *el; r = rowsub->value / pivot->value; rhs[rowsub->row] -= rhs[pivot->row] * r; row = rowsub->row; rowsub = ELM0; for (el = rowst[pivot->row] ; el != ELM0 ; el = el->c_right) if (el != pivot) (rowsub = getelm(rowsub, row, el->col))->value -= el->value * r; } void remelm(struct elm *el) { if (el->c_right != ELM0) (el->c_right)->c_left = el->c_left; if (el->c_left != ELM0) (el->c_left)->c_right = el->c_right; else rowst[el->row] = el->c_right; if (el->r_down != ELM0) (el->r_down)->r_up = el->r_up; if (el->r_up != ELM0) (el->r_up)->r_down = el->r_down; else colst[el->col] = el->r_down; free((char *)el); } neuron-7.5/src/sparse13/000077500000000000000000000000001323325274500151315ustar00rootroot00000000000000neuron-7.5/src/sparse13/Makefile.am000077500000000000000000000005371323325274500171750ustar00rootroot00000000000000## The library that we make: lib_LTLIBRARIES = libsparse13.la AM_CFLAGS = @MINGW_CFLAG@ libsparse13_la_SOURCES = spalloc.c spbuild.c spfactor.c spoutput.c \ spsolve.c sputils.c \ cspalloc.c cspbuild.c cspfactor.c cspoutput.c \ cspsolve.c csputils.c pkginclude_HEADERS = spmatrix.h spconfig.h cspmatrix.h cspredef.h noinst_HEADERS = spdefs.h neuron-7.5/src/sparse13/Makefile.in000066400000000000000000000635451323325274500172130ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/sparse13 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libsparse13_la_LIBADD = am_libsparse13_la_OBJECTS = spalloc.lo spbuild.lo spfactor.lo \ spoutput.lo spsolve.lo sputils.lo cspalloc.lo cspbuild.lo \ cspfactor.lo cspoutput.lo cspsolve.lo csputils.lo libsparse13_la_OBJECTS = $(am_libsparse13_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libsparse13_la_SOURCES) DIST_SOURCES = $(libsparse13_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ lib_LTLIBRARIES = libsparse13.la AM_CFLAGS = @MINGW_CFLAG@ libsparse13_la_SOURCES = spalloc.c spbuild.c spfactor.c spoutput.c \ spsolve.c sputils.c \ cspalloc.c cspbuild.c cspfactor.c cspoutput.c \ cspsolve.c csputils.c pkginclude_HEADERS = spmatrix.h spconfig.h cspmatrix.h cspredef.h noinst_HEADERS = spdefs.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sparse13/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sparse13/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libsparse13.la: $(libsparse13_la_OBJECTS) $(libsparse13_la_DEPENDENCIES) $(EXTRA_libsparse13_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libsparse13_la_OBJECTS) $(libsparse13_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cspalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cspbuild.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cspfactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cspoutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cspsolve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csputils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spbuild.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spfactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spoutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spsolve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sputils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/sparse13/cspalloc.c000077500000000000000000000000541323325274500170770ustar00rootroot00000000000000#define cmplx_spPrefix #include "spalloc.c" neuron-7.5/src/sparse13/cspbuild.c000077500000000000000000000000551323325274500171050ustar00rootroot00000000000000#define cmplx_spPrefix #include "spbuild.c" neuron-7.5/src/sparse13/cspfactor.c000077500000000000000000000000561323325274500172650ustar00rootroot00000000000000#define cmplx_spPrefix #include "spfactor.c" neuron-7.5/src/sparse13/cspmatrix.h000077500000000000000000000000551323325274500173170ustar00rootroot00000000000000#define cmplx_spPrefix #include "spmatrix.h" neuron-7.5/src/sparse13/cspoutput.c000077500000000000000000000000561323325274500173470ustar00rootroot00000000000000#define cmplx_spPrefix #include "spoutput.c" neuron-7.5/src/sparse13/cspredef.h000077500000000000000000000036441323325274500171070ustar00rootroot00000000000000/* mostly generated from cat temp | /usr/bin/tr -cs "[:alpha:]" "[\n*]" | sort | uniq | grep '^sp' > sp_redef.h where temp is the last part of spmatrix.h */ #define spClear cmplx_spClear #define spCondition cmplx_spCondition #define spCreate cmplx_spCreate #define spDeleteRowAndCol cmplx_spDeleteRowAndCol #define spDestroy cmplx_spDestroy #define spDeterminant cmplx_spDeterminant #define spElementCount cmplx_spElementCount #define spError cmplx_spError #define spFactor cmplx_spFactor #define spFileMatrix cmplx_spFileMatrix #define spFileStats cmplx_spFileStats #define spFileVector cmplx_spFileVector #define spFillinCount cmplx_spFillinCount #define spGetAdmittance cmplx_spGetAdmittance #define spGetElement cmplx_spGetElement #define spGetInitInfo cmplx_spGetInitInfo #define spGetOnes cmplx_spGetOnes #define spGetQuad cmplx_spGetQuad #define spGetSize cmplx_spGetSize #define spInitialize cmplx_spInitialize #define spInstallInitInfo cmplx_spInstallInitInfo #define spLargestElement cmplx_spLargestElement #define spMNA_Preorder cmplx_spMNA_Preorder #define spMultTransposed cmplx_spMultTransposed #define spMultiply cmplx_spMultiply #define spNorm cmplx_spNorm #define spOrderAndFactor cmplx_spOrderAndFactor #define spPartition cmplx_spPartition #define spPrint cmplx_spPrint #define spPseudoCondition cmplx_spPseudoCondition #define spRoundoff cmplx_spRoundoff #define spScale cmplx_spScale #define spSetComplex cmplx_spSetComplex #define spSetReal cmplx_spSetReal #define spSolve cmplx_spSolve #define spSolveTransposed cmplx_spSolveTransposed #define spStripFills cmplx_spStripFills #define spWhereSingular cmplx_spWhereSingular #define spcGetFillin cmplx_spcGetFillin #define spcGetElement cmplx_spcGetElement #define spcLinkRows cmplx_spcLinkRows #define spcFindElementInCol cmplx_spcFindElementInCol #define spcCreateElement cmplx_spcCreateElement #define spcRowExchange cmplx_spcRowExchange #define spcColExchange cmplx_spcColExchange neuron-7.5/src/sparse13/cspsolve.c000077500000000000000000000000551323325274500171360ustar00rootroot00000000000000#define cmplx_spPrefix #include "spsolve.c" neuron-7.5/src/sparse13/csputils.c000077500000000000000000000000551323325274500171460ustar00rootroot00000000000000#define cmplx_spPrefix #include "sputils.c" neuron-7.5/src/sparse13/spalloc.c000077500000000000000000000524631323325274500167470ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * MATRIX ALLOCATION MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the allocation and deallocation routines for the * sparse matrix routines. * * >>> User accessible functions contained in this file: * spCreate * spDestroy * spError * spWhereSingular * spGetSize * spSetReal * spSetComplex * spFillinCount * spElementCount * * >>> Other functions contained in this file: * spcGetElement * InitializeElementBlocks * spcGetFillin * RecordAllocation * AllocateBlockOfAllocationList * EnlargeMatrix * ExpandTranslationArrays */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef lint static char copyright[] = "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"; static char RCSid[] = "@(#)$Header$"; #endif /* * IMPORTS * * >>> Import descriptions: * spconfig.h * Macros that customize the sparse matrix routines. * spmatrix.h * Macros and declarations to be imported by the user. * spdefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "spmatrix.h" #include "spdefs.h" /* avoid "declared implicitly `extern' and later `static' " warnings. */ static void InitializeElementBlocks(); static void RecordAllocation(); static void AllocateBlockOfAllocationList(); /* * MATRIX ALLOCATION * * Allocates and initializes the data structures associated with a matrix. * * >>> Returned: * A pointer to the matrix is returned cast into the form of a pointer to * a character. This pointer is then passed and used by the other matrix * routines to refer to a particular matrix. If an error occurs, the NULL * pointer is returned. * * >>> Arguments: * Size (int) * Size of matrix or estimate of size of matrix if matrix is EXPANDABLE. * Complex (int) * Type of matrix. If Complex is 0 then the matrix is real, otherwise * the matrix will be complex. Note that if the routines are not set up * to handle the type of matrix requested, then a spPANIC error will occur. * Further note that if a matrix will be both real and complex, it must * be specified here as being complex. * pError (int *) * Returns error flag, needed because function spError() will not work * correctly if spCreate() returns NULL. * * >>> Local variables: * AllocatedSize (int) * The size of the matrix being allocated. * Matrix (MatrixPtr) * A pointer to the matrix frame being created. * * >>> Possible errors: * spNO_MEMORY * spPANIC * Error is cleared in this routine. */ char * spCreate( int Size, BOOLEAN Complex, int* pError ) { register unsigned SizePlusOne; register MatrixPtr Matrix; register int I; int AllocatedSize; /* Begin `spCreate'. */ /* Clear error flag. */ *pError = spOKAY; /* Test for valid size. */ if ((Size < 0) OR (Size == 0 AND NOT EXPANDABLE)) { *pError = spPANIC; return NULL; } /* Test for valid type. */ #if NOT spCOMPLEX if (Complex) { *pError = spPANIC; return NULL; } #endif #if NOT REAL if (NOT Complex) { *pError = spPANIC; return NULL; } #endif /* Create Matrix. */ AllocatedSize = MAX( Size, MINIMUM_ALLOCATED_SIZE ); SizePlusOne = (unsigned)(AllocatedSize + 1); if ((Matrix = ALLOC(struct MatrixFrame, 1)) == NULL) { *pError = spNO_MEMORY; return NULL; } /* Initialize matrix */ Matrix->ID = SPARSE_ID; Matrix->Complex = Complex; Matrix->PreviousMatrixWasComplex = Complex; Matrix->Factored = NO; Matrix->Elements = 0; Matrix->Error = *pError; Matrix->Fillins = 0; Matrix->Reordered = NO; Matrix->NeedsOrdering = YES; Matrix->NumberOfInterchangesIsOdd = NO; Matrix->Partitioned = NO; Matrix->RowsLinked = NO; Matrix->InternalVectorsAllocated = NO; Matrix->SingularCol = 0; Matrix->SingularRow = 0; Matrix->Size = Size; Matrix->AllocatedSize = AllocatedSize; Matrix->ExtSize = Size; Matrix->AllocatedExtSize = AllocatedSize; Matrix->CurrentSize = 0; Matrix->ExtToIntColMap = NULL; Matrix->ExtToIntRowMap = NULL; Matrix->IntToExtColMap = NULL; Matrix->IntToExtRowMap = NULL; Matrix->MarkowitzRow = NULL; Matrix->MarkowitzCol = NULL; Matrix->MarkowitzProd = NULL; Matrix->DoCmplxDirect = NULL; Matrix->DoRealDirect = NULL; Matrix->Intermediate = NULL; Matrix->RelThreshold = DEFAULT_THRESHOLD; Matrix->AbsThreshold = 0.0; Matrix->TopOfAllocationList = NULL; Matrix->RecordsRemaining = 0; Matrix->ElementsRemaining = 0; Matrix->FillinsRemaining = 0; RecordAllocation( Matrix, (char *)Matrix ); if (Matrix->Error == spNO_MEMORY) goto MemoryError; /* Take out the trash. */ Matrix->TrashCan.Real = 0.0; #if spCOMPLEX Matrix->TrashCan.Imag = 0.0; #endif Matrix->TrashCan.Row = 0; Matrix->TrashCan.Col = 0; Matrix->TrashCan.NextInRow = NULL; Matrix->TrashCan.NextInCol = NULL; #if INITIALIZE Matrix->TrashCan.pInitInfo = NULL; #endif /* Allocate space in memory for Diag pointer vector. */ CALLOC( Matrix->Diag, ElementPtr, SizePlusOne); if (Matrix->Diag == NULL) goto MemoryError; /* Allocate space in memory for FirstInCol pointer vector. */ CALLOC( Matrix->FirstInCol, ElementPtr, SizePlusOne); if (Matrix->FirstInCol == NULL) goto MemoryError; /* Allocate space in memory for FirstInRow pointer vector. */ CALLOC( Matrix->FirstInRow, ElementPtr, SizePlusOne); if (Matrix->FirstInRow == NULL) goto MemoryError; /* Allocate space in memory for IntToExtColMap vector. */ if (( Matrix->IntToExtColMap = ALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Allocate space in memory for IntToExtRowMap vector. */ if (( Matrix->IntToExtRowMap = ALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Initialize MapIntToExt vectors. */ for (I = 1; I <= AllocatedSize; I++) { Matrix->IntToExtRowMap[I] = I; Matrix->IntToExtColMap[I] = I; } #if TRANSLATE /* Allocate space in memory for ExtToIntColMap vector. */ if (( Matrix->ExtToIntColMap = ALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Allocate space in memory for ExtToIntRowMap vector. */ if (( Matrix->ExtToIntRowMap = ALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Initialize MapExtToInt vectors. */ for (I = 1; I <= AllocatedSize; I++) { Matrix->ExtToIntColMap[I] = -1; Matrix->ExtToIntRowMap[I] = -1; } Matrix->ExtToIntColMap[0] = 0; Matrix->ExtToIntRowMap[0] = 0; #endif /* Allocate space for fill-ins and initial set of elements. */ InitializeElementBlocks( Matrix, SPACE_FOR_ELEMENTS*AllocatedSize, SPACE_FOR_FILL_INS*AllocatedSize ); if (Matrix->Error == spNO_MEMORY) goto MemoryError; return (char *)Matrix; MemoryError: /* Deallocate matrix and return no pointer to matrix if there is not enough memory. */ *pError = spNO_MEMORY; spDestroy( (char *)Matrix); return NULL; } /* * ELEMENT ALLOCATION * * This routine allocates space for matrix elements. It requests large blocks * of storage from the system and doles out individual elements as required. * This technique, as opposed to allocating elements individually, tends to * speed the allocation process. * * >>> Returned: * A pointer to an element. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * * >>> Local variables: * pElement (ElementPtr) * A pointer to the first element in the group of elements being allocated. * * >>> Possible errors: * spNO_MEMORY */ ElementPtr spcGetElement( Matrix ) MatrixPtr Matrix; { ElementPtr pElement; /* Begin `spcGetElement'. */ /* Allocate block of MatrixElements if necessary. */ if (Matrix->ElementsRemaining == 0) { pElement = ALLOC(struct MatrixElement, ELEMENTS_PER_ALLOCATION); RecordAllocation( Matrix, (char *)pElement ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->ElementsRemaining = ELEMENTS_PER_ALLOCATION; Matrix->NextAvailElement = pElement; } /* Update Element counter and return pointer to Element. */ Matrix->ElementsRemaining--; return Matrix->NextAvailElement++; } /* * ELEMENT ALLOCATION INITIALIZATION * * This routine allocates space for matrix fill-ins and an initial set of * elements. Besides being faster than allocating space for elements one * at a time, it tends to keep the fill-ins physically close to the other * matrix elements in the computer memory. This keeps virtual memory paging * to a minimum. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * InitialNumberOfElements (int) * This number is used as the size of the block of memory, in * MatrixElements, reserved for elements. If more than this number of * elements are generated, then more space is allocated later. * NumberOfFillinsExpected (int) * This number is used as the size of the block of memory, in * MatrixElements, reserved for fill-ins. If more than this number of * fill-ins are generated, then more space is allocated, but they may * not be physically close in computer's memory. * * >>> Local variables: * pElement (ElementPtr) * A pointer to the first element in the group of elements being allocated. * * >>> Possible errors: * spNO_MEMORY */ static void InitializeElementBlocks( Matrix, InitialNumberOfElements, NumberOfFillinsExpected ) MatrixPtr Matrix; int InitialNumberOfElements, NumberOfFillinsExpected; { ElementPtr pElement; /* Begin `InitializeElementBlocks'. */ /* Allocate block of MatrixElements for elements. */ pElement = ALLOC(struct MatrixElement, InitialNumberOfElements); RecordAllocation( Matrix, (char *)pElement ); if (Matrix->Error == spNO_MEMORY) return; Matrix->ElementsRemaining = InitialNumberOfElements; Matrix->NextAvailElement = pElement; /* Allocate block of MatrixElements for fill-ins. */ pElement = ALLOC(struct MatrixElement, NumberOfFillinsExpected); RecordAllocation( Matrix, (char *)pElement ); if (Matrix->Error == spNO_MEMORY) return; Matrix->FillinsRemaining = NumberOfFillinsExpected; Matrix->NextAvailFillin = pElement; /* Allocate a fill-in list structure. */ Matrix->FirstFillinListNode = ALLOC(struct FillinListNodeStruct,1); RecordAllocation( Matrix, (char *)Matrix->FirstFillinListNode ); if (Matrix->Error == spNO_MEMORY) return; Matrix->LastFillinListNode = Matrix->FirstFillinListNode; Matrix->FirstFillinListNode->pFillinList = pElement; Matrix->FirstFillinListNode->NumberOfFillinsInList =NumberOfFillinsExpected; Matrix->FirstFillinListNode->Next = NULL; return; } /* * FILL-IN ALLOCATION * * This routine allocates space for matrix fill-ins. It requests large blocks * of storage from the system and doles out individual elements as required. * This technique, as opposed to allocating elements individually, tends to * speed the allocation process. * * >>> Returned: * A pointer to the fill-in. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * * >>> Possible errors: * spNO_MEMORY */ ElementPtr spcGetFillin( Matrix ) MatrixPtr Matrix; { struct FillinListNodeStruct *pListNode; ElementPtr pFillins; /* Begin `spcGetFillin'. */ #if NOT STRIP OR LINT if (Matrix->FillinsRemaining == 0) return spcGetElement( Matrix ); #endif #if STRIP OR LINT if (Matrix->FillinsRemaining == 0) { pListNode = Matrix->LastFillinListNode; /* First see if there are any stripped fill-ins left. */ if (pListNode->Next != NULL) { Matrix->LastFillinListNode = pListNode = pListNode->Next; Matrix->FillinsRemaining = pListNode->NumberOfFillinsInList; Matrix->NextAvailFillin = pListNode->pFillinList; } else { /* Allocate block of fill-ins. */ pFillins = ALLOC(struct MatrixElement, ELEMENTS_PER_ALLOCATION); RecordAllocation( Matrix, (char *)pFillins ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->FillinsRemaining = ELEMENTS_PER_ALLOCATION; Matrix->NextAvailFillin = pFillins; /* Allocate a fill-in list structure. */ pListNode->Next = ALLOC(struct FillinListNodeStruct,1); RecordAllocation( Matrix, (char *)pListNode->Next ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->LastFillinListNode = pListNode = pListNode->Next; pListNode->pFillinList = pFillins; pListNode->NumberOfFillinsInList = ELEMENTS_PER_ALLOCATION; pListNode->Next = NULL; } } #endif /* Update Fill-in counter and return pointer to Fill-in. */ Matrix->FillinsRemaining--; return Matrix->NextAvailFillin++; } /* * RECORD A MEMORY ALLOCATION * * This routine is used to record all memory allocations so that the memory * can be freed later. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * AllocatedPtr (char *) * The pointer returned by malloc or calloc. These pointers are saved in * a list so that they can be easily freed. * * >>> Possible errors: * spNO_MEMORY */ static void RecordAllocation( Matrix, AllocatedPtr ) MatrixPtr Matrix; char *AllocatedPtr; { /* Begin `RecordAllocation'. */ /* * If Allocated pointer is NULL, assume that malloc returned a NULL pointer, * which indicates a spNO_MEMORY error. */ if (AllocatedPtr == NULL) { Matrix->Error = spNO_MEMORY; return; } /* Allocate block of MatrixElements if necessary. */ if (Matrix->RecordsRemaining == 0) { AllocateBlockOfAllocationList( Matrix ); if (Matrix->Error == spNO_MEMORY) { FREE(AllocatedPtr); return; } } /* Add Allocated pointer to Allocation List. */ (++Matrix->TopOfAllocationList)->AllocatedPtr = AllocatedPtr; Matrix->RecordsRemaining--; return; } /* * ADD A BLOCK OF SLOTS TO ALLOCATION LIST * * This routine increases the size of the allocation list. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * * >>> Local variables: * ListPtr (AllocationListPtr) * Pointer to the list that contains the pointers to segments of memory * that were allocated by the operating system for the current matrix. * * >>> Possible errors: * spNO_MEMORY */ static void AllocateBlockOfAllocationList( Matrix ) MatrixPtr Matrix; { register int I; register AllocationListPtr ListPtr; /* Begin `AllocateBlockOfAllocationList'. */ /* Allocate block of records for allocation list. */ ListPtr = ALLOC(struct AllocationRecord, (ELEMENTS_PER_ALLOCATION+1)); if (ListPtr == NULL) { Matrix->Error = spNO_MEMORY; return; } /* String entries of allocation list into singly linked list. List is linked such that any record points to the one before it. */ ListPtr->NextRecord = Matrix->TopOfAllocationList; Matrix->TopOfAllocationList = ListPtr; ListPtr += ELEMENTS_PER_ALLOCATION; for (I = ELEMENTS_PER_ALLOCATION; I > 0; I--) { ListPtr->NextRecord = ListPtr - 1; ListPtr--; } /* Record allocation of space for allocation list on allocation list. */ Matrix->TopOfAllocationList->AllocatedPtr = (char *)ListPtr; Matrix->RecordsRemaining = ELEMENTS_PER_ALLOCATION; return; } /* * MATRIX DEALLOCATION * * Deallocates pointers and elements of Matrix. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix frame which is to be removed from memory. * * >>> Local variables: * ListPtr (AllocationListPtr) * Pointer into the linked list of pointers to allocated data structures. * Points to pointer to structure to be freed. * NextListPtr (AllocationListPtr) * Pointer into the linked list of pointers to allocated data structures. * Points to the next pointer to structure to be freed. This is needed * because the data structure to be freed could include the current node * in the allocation list. */ void spDestroy( eMatrix ) register char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register AllocationListPtr ListPtr, NextListPtr; /* Begin `spDestroy'. */ ASSERT( IS_SPARSE( Matrix ) ); /* Deallocate the vectors that are located in the matrix frame. */ FREE( Matrix->IntToExtColMap ); FREE( Matrix->IntToExtRowMap ); FREE( Matrix->ExtToIntColMap ); FREE( Matrix->ExtToIntRowMap ); FREE( Matrix->Diag ); FREE( Matrix->FirstInRow ); FREE( Matrix->FirstInCol ); FREE( Matrix->MarkowitzRow ); FREE( Matrix->MarkowitzCol ); FREE( Matrix->MarkowitzProd ); FREE( Matrix->DoCmplxDirect ); FREE( Matrix->DoRealDirect ); FREE( Matrix->Intermediate ); /* Sequentially step through the list of allocated pointers freeing pointers * along the way. */ ListPtr = Matrix->TopOfAllocationList; while (ListPtr != NULL) { NextListPtr = ListPtr->NextRecord; FREE( ListPtr->AllocatedPtr ); ListPtr = NextListPtr; } return; } /* * RETURN MATRIX ERROR STATUS * * This function is used to determine the error status of the given matrix. * * >>> Returned: * The error status of the given matrix. * * >>> Arguments: * eMatrix (char *) * The matrix for which the error status is desired. */ int spError( eMatrix ) char *eMatrix; { /* Begin `spError'. */ if (eMatrix != NULL) { ASSERT(((MatrixPtr)eMatrix)->ID == SPARSE_ID); return ((MatrixPtr)eMatrix)->Error; } else return spNO_MEMORY; /* This error may actually be spPANIC, * no way to tell. */ } /* * WHERE IS MATRIX SINGULAR * * This function returns the row and column number where the matrix was * detected as singular or where a zero was detected on the diagonal. * * >>> Arguments: * eMatrix (char *) * The matrix for which the error status is desired. * pRow (int *) * The row number. * pCol (int *) * The column number. */ void spWhereSingular( eMatrix, pRow, pCol ) char *eMatrix; int *pRow, *pCol; { MatrixPtr Matrix = (MatrixPtr)eMatrix; /* Begin `spWhereSingular'. */ ASSERT( IS_SPARSE( Matrix ) ); if (Matrix->Error == spSINGULAR OR Matrix->Error == spZERO_DIAG) { *pRow = Matrix->SingularRow; *pCol = Matrix->SingularCol; } else *pRow = *pCol = 0; return; } /* * MATRIX SIZE * * Returns the size of the matrix. Either the internal or external size of * the matrix is returned. * * >>> Arguments: * eMatrix (char *) * Pointer to matrix. * External (BOOLEAN) * If External is set true, the external size , i.e., the value of the * largest external row or column number encountered is returned. * Otherwise the true size of the matrix is returned. These two sizes * may differ if the TRANSLATE option is set true. */ int spGetSize( eMatrix, External ) char *eMatrix; BOOLEAN External; { MatrixPtr Matrix = (MatrixPtr)eMatrix; /* Begin `spGetSize'. */ ASSERT( IS_SPARSE( Matrix ) ); #if TRANSLATE if (External) return Matrix->ExtSize; else return Matrix->Size; #else return Matrix->Size; #endif } /* * SET MATRIX COMPLEX OR REAL * * Forces matrix to be either real or complex. * * >>> Arguments: * eMatrix (char *) * Pointer to matrix. */ void spSetReal( eMatrix ) char *eMatrix; { /* Begin `spSetReal'. */ ASSERT( IS_SPARSE( (MatrixPtr)eMatrix ) AND REAL); ((MatrixPtr)eMatrix)->Complex = NO; return; } void spSetComplex( eMatrix ) char *eMatrix; { /* Begin `spSetComplex'. */ ASSERT( IS_SPARSE( (MatrixPtr)eMatrix ) AND spCOMPLEX); ((MatrixPtr)eMatrix)->Complex = YES; return; } /* * ELEMENT OR FILL-IN COUNT * * Two functions used to return simple statistics. Either the number * of total elements, or the number of fill-ins can be returned. * * >>> Arguments: * eMatrix (char *) * Pointer to matrix. */ int spFillinCount( eMatrix ) char *eMatrix; { /* Begin `spFillinCount'. */ ASSERT( IS_SPARSE( (MatrixPtr)eMatrix ) ); return ((MatrixPtr)eMatrix)->Fillins; } int spElementCount( eMatrix ) char *eMatrix; { /* Begin `spElementCount'. */ ASSERT( IS_SPARSE( (MatrixPtr)eMatrix ) ); return ((MatrixPtr)eMatrix)->Elements; } neuron-7.5/src/sparse13/spbuild.c000077500000000000000000000770031323325274500167510ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * MATRIX BUILD MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the routines associated with clearing, loading and * preprocessing the matrix for the sparse matrix routines. * * >>> User accessible functions contained in this file: * spClear * spGetElement * spGetAdmittance * spGetQuad * spGetOnes * spInstallInitInfo * spGetInitInfo * spInitialize * * >>> Other functions contained in this file: * spcFindElementInCol * Translate * spcCreateElement * spcLinkRows * EnlargeMatrix * ExpandTranslationArrays */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef lint static char copyright[] = "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"; static char RCSid[] = "@(#)$Header$"; #endif /* * IMPORTS * * >>> Import descriptions: * spconfig.h * Macros that customize the sparse matrix routines. * spmatrix.h * Macros and declarations to be imported by the user. * spdefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "spmatrix.h" #include "spdefs.h" /* avoid "declared implicitly `extern' and later `static' " warnings. */ static void Translate(); static void EnlargeMatrix(); static void ExpandTranslationArrays(); /* * CLEAR MATRIX * * Sets every element of the matrix to zero and clears the error flag. * * >>> Arguments: * Matrix (char *) * Pointer to matrix that is to be cleared. * * >>> Local variables: * pElement (ElementPtr) * A pointer to the element being cleared. */ void spClear( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register int I; /* Begin `spClear'. */ ASSERT( IS_SPARSE( Matrix ) ); /* Clear matrix. */ #if spCOMPLEX if (Matrix->PreviousMatrixWasComplex OR Matrix->Complex) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real = 0.0; pElement->Imag = 0.0; pElement = pElement->NextInCol; } } } else #endif { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real = 0.0; pElement = pElement->NextInCol; } } } /* Empty the trash. */ Matrix->TrashCan.Real = 0.0; #if spCOMPLEX Matrix->TrashCan.Imag = 0.0; #endif Matrix->Error = spOKAY; Matrix->Factored = NO; Matrix->SingularCol = 0; Matrix->SingularRow = 0; Matrix->PreviousMatrixWasComplex = Matrix->Complex; return; } /* * SINGLE ELEMENT ADDITION TO MATRIX BY INDEX * * Finds element [Row,Col] and returns a pointer to it. If element is * not found then it is created and spliced into matrix. This routine * is only to be used after spCreate() and before spMNA_Preorder(), * spFactor() or spOrderAndFactor(). Returns a pointer to the * Real portion of a MatrixElement. This pointer is later used by * spADD_xxx_ELEMENT to directly access element. * * >>> Returns: * Returns a pointer to the element. This pointer is then used to directly * access the element during successive builds. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that the element is to be added to. * Row (int) * Row index for element. Must be in the range of [0..Size] unless * the options EXPANDABLE or TRANSLATE are used. Elements placed in * row zero are discarded. In no case may Row be less than zero. * Col (int) * Column index for element. Must be in the range of [0..Size] unless * the options EXPANDABLE or TRANSLATE are used. Elements placed in * column zero are discarded. In no case may Col be less than zero. * * >>> Local variables: * pElement (RealNumber *) * Pointer to the element. * * >>> Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ RealNumber * spGetElement( eMatrix, Row, Col ) char *eMatrix; int Row, Col; { MatrixPtr Matrix = (MatrixPtr)eMatrix; RealNumber *pElement; ElementPtr spcFindElementInCol(); /* Begin `spGetElement'. */ ASSERT( IS_SPARSE( Matrix ) AND Row >= 0 AND Col >= 0 ); if ((Row == 0) OR (Col == 0)) return &Matrix->TrashCan.Real; #if NOT TRANSLATE ASSERT(Matrix->NeedsOrdering); #endif #if TRANSLATE Translate( Matrix, &Row, &Col ); if (Matrix->Error == spNO_MEMORY) return NULL; #endif #if NOT TRANSLATE #if NOT EXPANDABLE ASSERT(Row <= Matrix->Size AND Col <= Matrix->Size); #endif #if EXPANDABLE /* Re-size Matrix if necessary. */ if ((Row > Matrix->Size) OR (Col > Matrix->Size)) EnlargeMatrix( Matrix, MAX(Row, Col) ); if (Matrix->Error == spNO_MEMORY) return NULL; #endif #endif /* * The condition part of the following if statement tests to see if the * element resides along the diagonal, if it does then it tests to see * if the element has been created yet (Diag pointer not NULL). The * pointer to the element is then assigned to Element after it is cast * into a pointer to a RealNumber. This casting makes the pointer into * a pointer to Real. This statement depends on the fact that Real * is the first record in the MatrixElement structure. */ if ((Row != Col) OR ((pElement = (RealNumber *)Matrix->Diag[Row]) == NULL)) { /* * Element does not exist or does not reside along diagonal. Search * column for element. As in the if statement above, the pointer to the * element which is returned by spcFindElementInCol is cast into a * pointer to Real, a RealNumber. */ pElement = (RealNumber*)spcFindElementInCol( Matrix, &(Matrix->FirstInCol[Col]), Row, Col, YES ); } return pElement; } /* * FIND ELEMENT BY SEARCHING COLUMN * * Searches column starting at element specified at PtrAddr and finds element * in Row. If Element does not exists, it is created. The pointer to the * element is returned. * * >>> Returned: * A pointer to the desired element: * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to Matrix. * LastAddr (ElementPtr *) * Address of pointer that initially points to the element in Col at which * the search is started. The pointer in this location may be changed if * a fill-in is required in and adjacent element. For this reason it is * important that LastAddr be the address of a FirstInCol or a NextInCol * rather than a temporary variable. * Row (int) * Row being searched for. * Col (int) * Column being searched. * CreateIfMissing (BOOLEAN) * Indicates what to do if element is not found, create one or return a * NULL pointer. * * Local variables: * pElement (ElementPtr) * Pointer used to search through matrix. */ ElementPtr spcFindElementInCol( Matrix, LastAddr, Row, Col, CreateIfMissing ) MatrixPtr Matrix; register ElementPtr *LastAddr; register int Row; int Col; BOOLEAN CreateIfMissing; { register ElementPtr pElement; ElementPtr spcCreateElement(); /* Begin `spcFindElementInCol'. */ pElement = *LastAddr; /* Search for element. */ while (pElement != NULL) { if (pElement->Row < Row) { /* Have not reached element yet. */ LastAddr = &(pElement->NextInCol); pElement = pElement->NextInCol; } else if (pElement->Row == Row) { /* Reached element. */ return pElement; } else break; /* while loop */ } /* Element does not exist and must be created. */ if (CreateIfMissing) return spcCreateElement( Matrix, Row, Col, LastAddr, NO ); else return NULL; } #if TRANSLATE /* * TRANSLATE EXTERNAL INDICES TO INTERNAL * * Convert internal row and column numbers to internal row and column numbers. * Also updates Ext/Int maps. * * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Row (int *) * Upon entry Row is either a external row number of an external node * number. Upon entry, the internal equivalent is supplied. * Col (int *) * Upon entry Column is either a external column number of an external node * number. Upon entry, the internal equivalent is supplied. * * >>> Local variables: * ExtCol (int) * Temporary variable used to hold the external column or node number * during the external to internal column number translation. * ExtRow (int) * Temporary variable used to hold the external row or node number during * the external to internal row number translation. * IntCol (int) * Temporary variable used to hold the internal column or node number * during the external to internal column number translation. * IntRow (int) * Temporary variable used to hold the internal row or node number during * the external to internal row number translation. */ static void Translate( Matrix, Row, Col ) MatrixPtr Matrix; int *Row, *Col; { register int IntRow, IntCol, ExtRow, ExtCol; /* Begin `Translate'. */ ExtRow = *Row; ExtCol = *Col; /* Expand translation arrays if necessary. */ if ((ExtRow > Matrix->AllocatedExtSize) OR (ExtCol > Matrix->AllocatedExtSize)) { ExpandTranslationArrays( Matrix, MAX(ExtRow, ExtCol) ); if (Matrix->Error == spNO_MEMORY) return; } /* Set ExtSize if necessary. */ if ((ExtRow > Matrix->ExtSize) OR (ExtCol > Matrix->ExtSize)) Matrix->ExtSize = MAX(ExtRow, ExtCol); /* Translate external row or node number to internal row or node number. */ if ((IntRow = Matrix->ExtToIntRowMap[ExtRow]) == -1) { Matrix->ExtToIntRowMap[ExtRow] = ++Matrix->CurrentSize; Matrix->ExtToIntColMap[ExtRow] = Matrix->CurrentSize; IntRow = Matrix->CurrentSize; #if NOT EXPANDABLE ASSERT(IntRow <= Matrix->Size); #endif #if EXPANDABLE /* Re-size Matrix if necessary. */ if (IntRow > Matrix->Size) EnlargeMatrix( Matrix, IntRow ); if (Matrix->Error == spNO_MEMORY) return; #endif Matrix->IntToExtRowMap[IntRow] = ExtRow; Matrix->IntToExtColMap[IntRow] = ExtRow; } /* Translate external column or node number to internal column or node number.*/ if ((IntCol = Matrix->ExtToIntColMap[ExtCol]) == -1) { Matrix->ExtToIntRowMap[ExtCol] = ++Matrix->CurrentSize; Matrix->ExtToIntColMap[ExtCol] = Matrix->CurrentSize; IntCol = Matrix->CurrentSize; #if NOT EXPANDABLE ASSERT(IntCol <= Matrix->Size); #endif #if EXPANDABLE /* Re-size Matrix if necessary. */ if (IntCol > Matrix->Size) EnlargeMatrix( Matrix, IntCol ); if (Matrix->Error == spNO_MEMORY) return; #endif Matrix->IntToExtRowMap[IntCol] = ExtCol; Matrix->IntToExtColMap[IntCol] = ExtCol; } *Row = IntRow; *Col = IntCol; return; } #endif #if QUAD_ELEMENT /* * ADDITION OF ADMITTANCE TO MATRIX BY INDEX * * Performs same function as spGetElement except rather than one * element, all four Matrix elements for a floating component are * added. This routine also works if component is grounded. Positive * elements are placed at [Node1,Node2] and [Node2,Node1]. This * routine is only to be used after spCreate() and before * spMNA_Preorder(), spFactor() or spOrderAndFactor(). * * >>> Returns: * Error code. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that component is to be entered in. * Node1 (int) * Row and column indices for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Node zero is the * ground node. In no case may Node1 be less than zero. * Node2 (int) * Row and column indices for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Node zero is the * ground node. In no case may Node2 be less than zero. * Template (struct spTemplate *) * Collection of pointers to four elements that are later used to directly * address elements. User must supply the template, this routine will * fill it. * * Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ int spGetAdmittance( Matrix, Node1, Node2, Template ) char *Matrix; int Node1, Node2; struct spTemplate *Template; { /* Begin `spGetAdmittance'. */ Template->Element1 = spGetElement(Matrix, Node1, Node1 ); Template->Element2 = spGetElement(Matrix, Node2, Node2 ); Template->Element3Negated = spGetElement( Matrix, Node2, Node1 ); Template->Element4Negated = spGetElement( Matrix, Node1, Node2 ); if ( (Template->Element1 == NULL) OR (Template->Element2 == NULL) OR (Template->Element3Negated == NULL) OR (Template->Element4Negated == NULL) ) return spNO_MEMORY; if (Node1 == 0) SWAP( RealNumber*, Template->Element1, Template->Element2 ); return spOKAY; } #endif /* QUAD_ELEMENT */ #if QUAD_ELEMENT /* * ADDITION OF FOUR ELEMENTS TO MATRIX BY INDEX * * Similar to spGetAdmittance, except that spGetAdmittance only * handles 2-terminal components, whereas spGetQuad handles simple * 4-terminals as well. These 4-terminals are simply generalized * 2-terminals with the option of having the sense terminals different * from the source and sink terminals. spGetQuad adds four * elements to the matrix. Positive elements occur at Row1,Col1 * Row2,Col2 while negative elements occur at Row1,Col2 and Row2,Col1. * The routine works fine if any of the rows and columns are zero. * This routine is only to be used after spCreate() and before * spMNA_Preorder(), spFactor() or spOrderAndFactor() * unless TRANSLATE is set true. * * >>> Returns: * Error code. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that component is to be entered in. * Row1 (int) * First row index for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Row1 be less than zero. * Row2 (int) * Second row index for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Row2 be less than zero. * Col1 (int) * First column index for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground column. In no case may Col1 be less than zero. * Col2 (int) * Second column index for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground column. In no case may Col2 be less than zero. * Template (struct spTemplate *) * Collection of pointers to four elements that are later used to directly * address elements. User must supply the template, this routine will * fill it. * Real (RealNumber) * Real data to be added to elements. * Imag (RealNumber) * Imag data to be added to elements. If matrix is real, this argument * may be deleted. * * Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ int spGetQuad( Matrix, Row1, Row2, Col1, Col2, Template ) char *Matrix; int Row1, Row2, Col1, Col2; struct spTemplate *Template; { /* Begin `spGetQuad'. */ Template->Element1 = spGetElement( Matrix, Row1, Col1); Template->Element2 = spGetElement( Matrix, Row2, Col2 ); Template->Element3Negated = spGetElement( Matrix, Row2, Col1 ); Template->Element4Negated = spGetElement( Matrix, Row1, Col2 ); if ( (Template->Element1 == NULL) OR (Template->Element2 == NULL) OR (Template->Element3Negated == NULL) OR (Template->Element4Negated == NULL) ) return spNO_MEMORY; if (Template->Element1 == &((MatrixPtr)Matrix)->TrashCan.Real) SWAP( RealNumber *, Template->Element1, Template->Element2 ); return spOKAY; } #endif /* QUAD_ELEMENT */ #if QUAD_ELEMENT /* * ADDITION OF FOUR STRUCTURAL ONES TO MATRIX BY INDEX * * Performs similar function to spGetQuad() except this routine is * meant for components that do not have an admittance representation. * * The following stamp is used: * Pos Neg Eqn * Pos [ . . 1 ] * Neg [ . . -1 ] * Eqn [ 1 -1 . ] * * >>> Returns: * Error code. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that component is to be entered in. * Pos (int) * See stamp above. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Pos be less than zero. * Neg (int) * See stamp above. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Neg be less than zero. * Eqn (int) * See stamp above. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Eqn be less than zero. * Template (struct spTemplate *) * Collection of pointers to four elements that are later used to directly * address elements. User must supply the template, this routine will * fill it. * * Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ int spGetOnes(Matrix, Pos, Neg, Eqn, Template) char *Matrix; int Pos, Neg, Eqn; struct spTemplate *Template; { /* Begin `spGetOnes'. */ Template->Element4Negated = spGetElement( Matrix, Neg, Eqn ); Template->Element3Negated = spGetElement( Matrix, Eqn, Neg ); Template->Element2 = spGetElement( Matrix, Pos, Eqn ); Template->Element1 = spGetElement( Matrix, Eqn, Pos ); if ( (Template->Element1 == NULL) OR (Template->Element2 == NULL) OR (Template->Element3Negated == NULL) OR (Template->Element4Negated == NULL) ) return spNO_MEMORY; spADD_REAL_QUAD( *Template, 1.0 ); return spOKAY; } #endif /* QUAD_ELEMENT */ /* * * CREATE AND SPLICE ELEMENT INTO MATRIX * * This routine is used to create new matrix elements and splice them into the * matrix. * * >>> Returned: * A pointer to the element that was created is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Row (int) * Row index for element. * Col (int) * Column index for element. * LastAddr (ElementPtr *) * This contains the address of the pointer to the element just above the * one being created. It is used to speed the search and it is updated with * address of the created element. * Fillin (BOOLEAN) * Flag that indicates if created element is to be a fill-in. * * >>> Local variables: * pElement (ElementPtr) * Pointer to an element in the matrix. It is used to refer to the newly * created element and to restring the pointers of the element's row and * column. * pLastElement (ElementPtr) * Pointer to the element in the matrix that was just previously pointed * to by pElement. It is used to restring the pointers of the element's * row and column. * pCreatedElement (ElementPtr) * Pointer to the desired element, the one that was just created. * * >>> Possible errors: * spNO_MEMORY */ ElementPtr spcCreateElement( Matrix, Row, Col, LastAddr, Fillin ) MatrixPtr Matrix; int Row; register int Col; register ElementPtr *LastAddr; BOOLEAN Fillin; { register ElementPtr pElement, pLastElement; ElementPtr pCreatedElement, spcGetElement(), spcGetFillin(); /* Begin `spcCreateElement'. */ if (Matrix->RowsLinked) { /* Row pointers cannot be ignored. */ if (Fillin) { pElement = spcGetFillin( Matrix ); Matrix->Fillins++; } else { pElement = spcGetElement( Matrix ); Matrix->NeedsOrdering = YES; } if (pElement == NULL) return NULL; /* If element is on diagonal, store pointer in Diag. */ if (Row == Col) Matrix->Diag[Row] = pElement; /* Initialize Element. */ pCreatedElement = pElement; pElement->Row = Row; pElement->Col = Col; pElement->Real = 0.0; #if spCOMPLEX pElement->Imag = 0.0; #endif #if INITIALIZE pElement->pInitInfo = NULL; #endif /* Splice element into column. */ pElement->NextInCol = *LastAddr; *LastAddr = pElement; /* Search row for proper element position. */ pElement = Matrix->FirstInRow[Row]; pLastElement = NULL; while (pElement != NULL) { /* Search for element row position. */ if (pElement->Col < Col) { /* Have not reached desired element. */ pLastElement = pElement; pElement = pElement->NextInRow; } else pElement = NULL; } /* Splice element into row. */ pElement = pCreatedElement; if (pLastElement == NULL) { /* Element is first in row. */ pElement->NextInRow = Matrix->FirstInRow[Row]; Matrix->FirstInRow[Row] = pElement; } else /* Element is not first in row. */ { pElement->NextInRow = pLastElement->NextInRow; pLastElement->NextInRow = pElement; } } else { /* * Matrix has not been factored yet. Thus get element rather than fill-in. * Also, row pointers can be ignored. */ /* Allocate memory for Element. */ pElement = spcGetElement( Matrix ); if (pElement == NULL) return NULL; /* If element is on diagonal, store pointer in Diag. */ if (Row == Col) Matrix->Diag[Row] = pElement; /* Initialize Element. */ pCreatedElement = pElement; pElement->Row = Row; #if DEBUG pElement->Col = Col; #endif pElement->Real = 0.0; #if spCOMPLEX pElement->Imag = 0.0; #endif #if INITIALIZE pElement->pInitInfo = NULL; #endif /* Splice element into column. */ pElement->NextInCol = *LastAddr; *LastAddr = pElement; } Matrix->Elements++; return pCreatedElement; } /* * * LINK ROWS * * This routine is used to generate the row links. The spGetElement() * routines do not create row links, which are needed by the spFactor() * routines. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * * >>> Local variables: * pElement (ElementPtr) * Pointer to an element in the matrix. * FirstInRowEntry (ElementPtr *) * A pointer into the FirstInRow array. Points to the FirstInRow entry * currently being operated upon. * FirstInRowArray (ArrayOfElementPtrs) * A pointer to the FirstInRow array. Same as Matrix->FirstInRow but * resides in a register and requires less indirection so is faster to * use. * Col (int) * Column currently being operated upon. */ void spcLinkRows( Matrix ) MatrixPtr Matrix; { register ElementPtr pElement, *FirstInRowEntry; register ArrayOfElementPtrs FirstInRowArray; register int Col; /* Begin `spcLinkRows'. */ FirstInRowArray = Matrix->FirstInRow; for (Col = Matrix->Size; Col >= 1; Col--) { /* Generate row links for the elements in the Col'th column. */ pElement = Matrix->FirstInCol[Col]; while (pElement != NULL) { pElement->Col = Col; FirstInRowEntry = &FirstInRowArray[pElement->Row]; pElement->NextInRow = *FirstInRowEntry; *FirstInRowEntry = pElement; pElement = pElement->NextInCol; } } Matrix->RowsLinked = YES; return; } /* * ENLARGE MATRIX * * Increases the size of the matrix. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * NewSize (int) * The new size of the matrix. * * >>> Local variables: * OldAllocatedSize (int) * The allocated size of the matrix before it is expanded. */ static void EnlargeMatrix( Matrix, NewSize ) MatrixPtr Matrix; register int NewSize; { register int I, OldAllocatedSize = Matrix->AllocatedSize; /* Begin `EnlargeMatrix'. */ Matrix->Size = NewSize; if (NewSize <= OldAllocatedSize) return; /* Expand the matrix frame. */ NewSize = MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); Matrix->AllocatedSize = NewSize; if (( REALLOC(Matrix->IntToExtColMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( REALLOC(Matrix->IntToExtRowMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( REALLOC(Matrix->Diag, ElementPtr, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( REALLOC(Matrix->FirstInCol, ElementPtr, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( REALLOC(Matrix->FirstInRow, ElementPtr, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } /* * Destroy the Markowitz and Intermediate vectors, they will be recreated * in spOrderAndFactor(). */ FREE( Matrix->MarkowitzRow ); FREE( Matrix->MarkowitzCol ); FREE( Matrix->MarkowitzProd ); FREE( Matrix->DoRealDirect ); FREE( Matrix->DoCmplxDirect ); FREE( Matrix->Intermediate ); Matrix->InternalVectorsAllocated = NO; /* Initialize the new portion of the vectors. */ for (I = OldAllocatedSize+1; I <= NewSize; I++) { Matrix->IntToExtColMap[I] = I; Matrix->IntToExtRowMap[I] = I; Matrix->Diag[I] = NULL; Matrix->FirstInRow[I] = NULL; Matrix->FirstInCol[I] = NULL; } return; } #if TRANSLATE /* * EXPAND TRANSLATION ARRAYS * * Increases the size arrays that are used to translate external to internal * row and column numbers. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * NewSize (int) * The new size of the translation arrays. * * >>> Local variables: * OldAllocatedSize (int) * The allocated size of the translation arrays before being expanded. */ static void ExpandTranslationArrays( Matrix, NewSize ) MatrixPtr Matrix; register int NewSize; { register int I, OldAllocatedSize = Matrix->AllocatedExtSize; /* Begin `ExpandTranslationArrays'. */ Matrix->ExtSize = NewSize; if (NewSize <= OldAllocatedSize) return; /* Expand the translation arrays ExtToIntRowMap and ExtToIntColMap. */ NewSize = MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); Matrix->AllocatedExtSize = NewSize; if (( REALLOC(Matrix->ExtToIntRowMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( REALLOC(Matrix->ExtToIntColMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } /* Initialize the new portion of the vectors. */ for (I = OldAllocatedSize+1; I <= NewSize; I++) { Matrix->ExtToIntRowMap[I] = -1; Matrix->ExtToIntColMap[I] = -1; } return; } #endif #if INITIALIZE /* * INITIALIZE MATRIX * * With the INITIALIZE compiler option (see spconfig.h) set true, * Sparse allows the user to keep initialization information with each * structurally nonzero matrix element. Each element has a pointer * that is set and used by the user. The user can set this pointer * using spInstallInitInfo and may be read using spGetInitInfo. Both * may be used only after the element exists. The function * spInitialize() is a user customizable way to initialize the matrix. * Passed to this routine is a function pointer. spInitialize() sweeps * through every element in the matrix and checks the pInitInfo * pointer (the user supplied pointer). If the pInitInfo is NULL, * which is true unless the user changes it (almost always true for * fill-ins), then the element is zeroed. Otherwise, the function * pointer is called and passed the pInitInfo pointer as well as the * element pointer and the external row and column numbers. If the * user sets the value of each element, then spInitialize() replaces * spClear(). * * The user function is expected to return a nonzero integer if there * is a fatal error and zero otherwise. Upon encountering a nonzero * return code, spInitialize() terminates and returns the error code. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * * >>> Possible Errors: * Returns nonzero if error, zero otherwise. */ void spInstallInitInfo( pElement, pInitInfo ) RealNumber *pElement; char *pInitInfo; { /* Begin `spInstallInitInfo'. */ ASSERT(pElement != NULL); ((ElementPtr)pElement)->pInitInfo = pInitInfo; } char * spGetInitInfo( pElement ) RealNumber *pElement; { /* Begin `spGetInitInfo'. */ ASSERT(pElement != NULL); return (char *)((ElementPtr)pElement)->pInitInfo; } int spInitialize( eMatrix, pInit ) char *eMatrix; int (*pInit)(); { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; int J, Error, Col; /* Begin `spInitialize'. */ ASSERT( IS_SPARSE( Matrix ) ); #if spCOMPLEX /* Clear imaginary part of matrix if matrix is real but was complex. */ if (Matrix->PreviousMatrixWasComplex AND NOT Matrix->Complex) { for (J = Matrix->Size; J > 0; J--) { pElement = Matrix->FirstInCol[J]; while (pElement != NULL) { pElement->Imag = 0.0; pElement = pElement->NextInCol; } } } #endif /* spCOMPLEX */ /* Initialize the matrix. */ for (J = Matrix->Size; J > 0; J--) { pElement = Matrix->FirstInCol[J]; Col = Matrix->IntToExtColMap[J]; while (pElement != NULL) { if (pElement->pInitInfo == NULL) { pElement->Real = 0.0; # if spCOMPLEX pElement->Imag = 0.0; # endif } else { Error = (*pInit)((RealNumber *)pElement, pElement->pInitInfo, Matrix->IntToExtRowMap[pElement->Row], Col); if (Error) { Matrix->Error = spFATAL; return Error; } } pElement = pElement->NextInCol; } } /* Empty the trash. */ Matrix->TrashCan.Real = 0.0; #if spCOMPLEX Matrix->TrashCan.Imag = 0.0; #endif Matrix->Error = spOKAY; Matrix->Factored = NO; Matrix->SingularCol = 0; Matrix->SingularRow = 0; Matrix->PreviousMatrixWasComplex = Matrix->Complex; return 0; } #endif /* INITIALIZE */ neuron-7.5/src/sparse13/spconfig.h000066400000000000000000000540461323325274500171230ustar00rootroot00000000000000/* * CONFIGURATION MACRO DEFINITIONS for sparse matrix routines * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * U.C. Berkeley * * This file contains macros for the sparse matrix routines that are used * to define the personality of the routines. The user is expected to * modify this file to maximize the performance of the routines with * his/her matrices. * * Macros are distinguished by using solely capital letters in their * identifiers. This contrasts with C defined identifiers which are * strictly lower case, and program variable and procedure names which use * both upper and lower case. */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. * * $Date: 2003-02-11 19:36:05 +0100 (Tue, 11 Feb 2003) $ * $Revision: 3 $ */ #ifndef spCONFIG_DEFS #define spCONFIG_DEFS #if defined(cmplx_spPrefix) #include "cspredef.h" #endif #ifdef spINSIDE_SPARSE /* * OPTIONS * * These are compiler options. Set each option to one to compile that * section of the code. If a feature is not desired, set the macro * to NO. Recommendations are given in brackets, [ignore them]. * * >>> Option descriptions: * Arithmetic Precision * The precision of the arithmetic used by Sparse can be set by * changing changing the spREAL macro. This macro is * contained in the file spMatrix.h. It is strongly suggested to * used double precision with circuit simulators. Note that * because C always performs arithmetic operations in double * precision, the only benefit to using single precision is that * less storage is required. There is often a noticeable speed * penalty when using single precision. Sparse internally refers * to a spREAL as a RealNumber. * REAL * This specifies that the routines are expected to handle real * systems of equations. The routines can be compiled to handle * both real and complex systems at the same time, but there is a * slight speed and memory advantage if the routines are complied * to handle only real systems of equations. * spCOMPLEX * This specifies that the routines will be complied to handle * complex systems of equations. * EXPANDABLE * Setting this compiler flag true (1) makes the matrix * expandable before it has been factored. If the matrix is * expandable, then if an element is added that would be * considered out of bounds in the current matrix, the size of * the matrix is increased to hold that element. As a result, * the size of the matrix need not be known before the matrix is * built. The matrix can be allocated with size zero and * expanded. * TRANSLATE * This option allows the set of external row and column numbers * to be non-packed. In other words, the row and column numbers * do not have to be contiguous. The priced paid for this * flexibility is that when TRANSLATE is set true, the time * required to initially build the matrix will be greater because * the external row and column number must be translated into * internal equivalents. This translation brings about other * benefits though. First, the spGetElement() and * spGetAdmittance() routines may be used after the matrix has * been factored. Further, elements, and even rows and columns, * may be added to the matrix, and row and columns may be deleted * from the matrix, after it has been factored. Note that when * the set of row and column number is not a packed set, neither * are the RHS and Solution vectors. Thus the size of these * vectors must be at least as large as the external size, which * is the value of the largest given row or column numbers. * INITIALIZE * Causes the spInitialize(), spGetInitInfo(), and * spInstallInitInfo() routines to be compiled. These routines * allow the user to store and read one pointer in each nonzero * element in the matrix. spInitialize() then calls a user * specified function for each structural nonzero in the matrix, * and includes this pointer as well as the external row and * column numbers as arguments. This allows the user to write * custom matrix initialization routines. * DIAGONAL_PIVOTING * Many matrices, and in particular node- and modified-node * admittance matrices, tend to be nearly symmetric and nearly * diagonally dominant. For these matrices, it is a good idea to * select pivots from the diagonal. With this option enabled, * this is exactly what happens, though if no satisfactory pivot * can be found on the diagonal, an off-diagonal pivot will be * used. If this option is disabled, Sparse does not * preferentially search the diagonal. Because of this, Sparse * has a wider variety of pivot candidates available, and so * presumably fewer fill-ins will be created. However, the * initial pivot selection process will take considerably longer. * If working with node admittance matrices, or other matrices * with a strong diagonal, it is probably best to use * DIAGONAL_PIVOTING for two reasons. First, accuracy will be * better because pivots will be chosen from the large diagonal * elements, thus reducing the chance of growth. Second, a near * optimal ordering will be chosen quickly. If the class of * matrices you are working with does not have a strong diagonal, * do not use DIAGONAL_PIVOTING, but consider using a larger * threshold. When DIAGONAL_PIVOTING is turned off, the following * options and constants are not used: MODIFIED_MARKOWITZ, * MAX_MARKOWITZ_TIES, and TIES_MULTIPLIER. * ARRAY_OFFSET * This determines whether arrays start at an index of zero or one. * This option is necessitated by the fact that standard C * convention dictates that arrays begin with an index of zero but * the standard mathematic convention states that arrays begin with * an index of one. So if you prefer to start your arrays with * zero, or your calling Sparse from FORTRAN, set ARRAY_OFFSET to * NO or 0. Otherwise, set ARRAY_OFFSET to YES or 1. Note that if * you use an offset of one, the arrays that you pass to Sparse * must have an allocated length of one plus the size of the * matrix. ARRAY_OFFSET must be either 0 or 1, no other offsets * are valid. * spSEPARATED_COMPLEX_VECTORS * This specifies the format for complex vectors. If this is set * false then a complex vector is made up of one double sized * array of RealNumber's in which the real and imaginary numbers * are placed in the alternately array in the array. In other * words, the first entry would be Complex[1].Real, then comes * Complex[1].Imag, then Complex[1].Real, etc. If * spSEPARATED_COMPLEX_VECTORS is set true, then each complex * vector is represented by two arrays of RealNumbers, one with * the real terms, the other with the imaginary. [NO] * MODIFIED_MARKOWITZ * This specifies that the modified Markowitz method of pivot * selection is to be used. The modified Markowitz method differs * from standard Markowitz in two ways. First, under modified * Markowitz, the search for a pivot can be terminated early if a * adequate (in terms of sparsity) pivot candidate is found. * Thus, when using modified Markowitz, the initial factorization * can be faster, but at the expense of a suboptimal pivoting * order that may slow subsequent factorizations. The second * difference is in the way modified Markowitz breaks Markowitz * ties. When two or more elements are pivot candidates and they * all have the same Markowitz product, then the tie is broken by * choosing the element that is best numerically. The numerically * best element is the one with the largest ratio of its magnitude * to the magnitude of the largest element in the same column, * excluding itself. The modified Markowitz method results in * marginally better accuracy. This option is most appropriate * for use when working with very large matrices where the initial * factor time represents an unacceptable burden. [NO] * DELETE * This specifies that the spDeleteRowAndCol() routine * should be compiled. Note that for this routine to be * compiled, both DELETE and TRANSLATE should be set true. * STRIP * This specifies that the spStripFills() routine should be compiled. * MODIFIED_NODAL * This specifies that the routine that preorders modified node * admittance matrices should be compiled. This routine results * in greater speed and accuracy if used with this type of * matrix. * QUAD_ELEMENT * This specifies that the routines that allow four related * elements to be entered into the matrix at once should be * compiled. These elements are usually related to an * admittance. The routines affected by QUAD_ELEMENT are the * spGetAdmittance, spGetQuad and spGetOnes routines. * TRANSPOSE * This specifies that the routines that solve the matrix as if * it was transposed should be compiled. These routines are * useful when performing sensitivity analysis using the adjoint * method. * SCALING * This specifies that the routine that performs scaling on the * matrix should be complied. Scaling is not strongly * supported. The routine to scale the matrix is provided, but * no routines are provided to scale and descale the RHS and * Solution vectors. It is suggested that if scaling is desired, * it only be preformed when the pivot order is being chosen [in * spOrderAndFactor()]. This is the only time scaling has * an effect. The scaling may then either be removed from the * solution by the user or the scaled factors may simply be * thrown away. [NO] * DOCUMENTATION * This specifies that routines that are used to document the * matrix, such as spPrint() and spFileMatrix(), should be * compiled. * DETERMINANT * This specifies that the routine spDeterminant() should be complied. * STABILITY * This specifies that spLargestElement() and spRoundoff() should * be compiled. These routines are used to check the stability (and * hence the quality of the pivoting) of the factorization by * computing a bound on the size of the element is the matrix E = * A - LU. If this bound is very high after applying * spOrderAndFactor(), then the pivot threshold should be raised. * If the bound increases greatly after using spFactor(), then the * matrix should probably be reordered. * CONDITION * This specifies that spCondition() and spNorm(), the code that * computes a good estimate of the condition number of the matrix, * should be compiled. * PSEUDOCONDITION * This specifies that spPseudoCondition(), the code that computes * a crude and easily fooled indicator of ill-conditioning in the * matrix, should be compiled. * MULTIPLICATION * This specifies that the routines to multiply the unfactored * matrix by a vector should be compiled. * FORTRAN * This specifies that the FORTRAN interface routines should be * compiled. When interfacing to FORTRAN programs, the ARRAY_OFFSET * options should be set to NO. * DEBUG * This specifies that additional error checking will be compiled. * The type of error checked are those that are common when the * matrix routines are first integrated into a user's program. Once * the routines have been integrated in and are running smoothly, this * option should be turned off. */ /* Begin options. */ #define REAL YES #define EXPANDABLE YES #if defined(cmplx_spPrefix) /* NEURON's nonlinz.cpp uses cmplx_spGetElement after previous use of matrix */ #define TRANSLATE YES #else #define TRANSLATE NO /* instead of YES */ #endif #define INITIALIZE NO /* instead of YES */ #define DIAGONAL_PIVOTING YES #define ARRAY_OFFSET NOT FORTRAN #define MODIFIED_MARKOWITZ NO #define DELETE YES #define STRIP YES #define MODIFIED_NODAL YES #define QUAD_ELEMENT YES #define TRANSPOSE YES #define SCALING YES #define DOCUMENTATION YES #define MULTIPLICATION YES #define DETERMINANT YES #define STABILITY YES #define CONDITION YES #define PSEUDOCONDITION YES #define FORTRAN NO #define DEBUG YES /* * The following options affect Sparse exports and so are exported as a * side effect. For this reason they use the `sp' prefix. The bool * constants YES an NO are not defined in spMatrix.h to avoid conflicts * with user code, so use 0 for NO and 1 for YES. */ #endif /* spINSIDE_SPARSE */ #if defined(cmplx_spPrefix) #define spCOMPLEX 1 #define spSEPARATED_COMPLEX_VECTORS 1 #else #define spCOMPLEX 0 /* instead of 1 */ #define spSEPARATED_COMPLEX_VECTORS 0 #endif #ifdef spINSIDE_SPARSE /* * MATRIX CONSTANTS * * These constants are used throughout the sparse matrix routines. They * should be set to suit the type of matrix being solved. Recommendations * are given in brackets. * * Some terminology should be defined. The Markowitz row count is the number * of non-zero elements in a row excluding the one being considered as pivot. * There is one Markowitz row count for every row. The Markowitz column * is defined similarly for columns. The Markowitz product for an element * is the product of its row and column counts. It is a measure of how much * work would be required on the next step of the factorization if that * element were chosen to be pivot. A small Markowitz product is desirable. * * >>> Constants descriptions: * DEFAULT_THRESHOLD * The relative threshold used if the user enters an invalid * threshold. Also the threshold used by spFactor() when * calling spOrderAndFactor(). The default threshold should * not be less than or equal to zero nor larger than one. [0.001] * DIAG_PIVOTING_AS_DEFAULT * This indicates whether spOrderAndFactor() should use diagonal * pivoting as default. This issue only arises when * spOrderAndFactor() is called from spFactor(). * SPACE_FOR_ELEMENTS * This number multiplied by the size of the matrix equals the number * of elements for which memory is initially allocated in * spCreate(). [6] * SPACE_FOR_FILL_INS * This number multiplied by the size of the matrix equals the number * of elements for which memory is initially allocated and specifically * reserved for fill-ins in spCreate(). [4] * ELEMENTS_PER_ALLOCATION * The number of matrix elements requested from the malloc utility on * each call to it. Setting this value greater than 1 reduces the * amount of overhead spent in this system call. On a virtual memory * machine, its good to allocate slightly less than a page worth of * elements at a time (or some multiple thereof). * [For the VAX, for real only use 41, otherwise use 31] * MINIMUM_ALLOCATED_SIZE * The minimum allocated size of a matrix. Note that this does not * limit the minimum size of a matrix. This just prevents having to * resize a matrix many times if the matrix is expandable, large and * allocated with an estimated size of zero. This number should not * be less than one. * EXPANSION_FACTOR * The amount the allocated size of the matrix is increased when it * is expanded. * MAX_MARKOWITZ_TIES * This number is used for two slightly different things, both of which * relate to the search for the best pivot. First, it is the maximum * number of elements that are Markowitz tied that will be sifted * through when trying to find the one that is numerically the best. * Second, it creates an upper bound on how large a Markowitz product * can be before it eliminates the possibility of early termination * of the pivot search. In other words, if the product of the smallest * Markowitz product yet found and TIES_MULTIPLIER is greater than * MAX_MARKOWITZ_TIES, then no early termination takes place. * Set MAX_MARKOWITZ_TIES to some small value if no early termination of * the pivot search is desired. An array of RealNumbers is allocated * of size MAX_MARKOWITZ_TIES so it must be positive and shouldn't * be too large. Active when MODIFIED_MARKOWITZ is 1 (true). [100] * TIES_MULTIPLIER * Specifies the number of Markowitz ties that are allowed to occur * before the search for the pivot is terminated early. Set to some * large value if no early termination of the pivot search is desired. * This number is multiplied times the Markowitz product to determine * how many ties are required for early termination. This means that * more elements will be searched before early termination if a large * number of fill-ins could be created by accepting what is currently * considered the best choice for the pivot. Active when * MODIFIED_MARKOWITZ is 1 (true). Setting this number to zero * effectively eliminates all pivoting, which should be avoided. * This number must be positive. TIES_MULTIPLIER is also used when * diagonal pivoting breaks down. [5] * DEFAULT_PARTITION * Which partition mode is used by spPartition() as default. * Possibilities include * spDIRECT_PARTITION -- each row used direct addressing, best for * a few relatively dense matrices. * spINDIRECT_PARTITION -- each row used indirect addressing, best * for a few very sparse matrices. * spAUTO_PARTITION -- direct or indirect addressing is chosen on * a row-by-row basis, carries a large overhead, but speeds up * both dense and sparse matrices, best if there is a large * number of matrices that can use the same ordering. */ /* Begin constants. */ #define DEFAULT_THRESHOLD 1.0e-3 #define DIAG_PIVOTING_AS_DEFAULT YES /*#define SPACE_FOR_ELEMENTS 6*/ /*#define SPACE_FOR_FILL_INS 4*/ #define SPACE_FOR_ELEMENTS 3 #define SPACE_FOR_FILL_INS 1 #define ELEMENTS_PER_ALLOCATION 31 #define MINIMUM_ALLOCATED_SIZE 6 #define EXPANSION_FACTOR 1.5 #define MAX_MARKOWITZ_TIES 100 #define TIES_MULTIPLIER 5 #define DEFAULT_PARTITION spAUTO_PARTITION /* * PRINTER WIDTH * * This macro characterize the printer for the spPrint() routine. * * >>> Macros: * PRINTER_WIDTH * The number of characters per page width. Set to 80 for terminal, * 132 for line printer. */ /* Begin printer constants. */ #define PRINTER_WIDTH 80 /* * MACHINE CONSTANTS * * These numbers must be updated when the program is ported to a new machine. */ /* Begin machine constants. */ #ifdef notdef /* __STDC__ */ /* * This code is currently deleted because most ANSI standard C compilers * do not provide the standard header files yet. */ #endif #if defined(HAVE_LIMITS_H) # include # include # define MACHINE_RESOLUTION DBL_EPSILON # define LARGEST_REAL DBL_MAX # define SMALLEST_REAL DBL_MIN # define LARGEST_SHORT_INTEGER SHRT_MAX # define LARGEST_LONG_INTEGER LONG_MAX #else /* do not have limits.h */ /* NOT defined(__STDC__) */ /* VAX machine constants */ #ifdef vax # define MACHINE_RESOLUTION 6.93889e-18 # define LARGEST_REAL 1.70141e+38 # define SMALLEST_REAL 2.938743e-39 # define LARGEST_SHORT_INTEGER 32766 # define LARGEST_LONG_INTEGER 2147483646 #endif /* hp9000 machine constants */ #ifdef hpux /* These values are correct for hp9000/300. Should be correct for others. */ # define MACHINE_RESOLUTION 8.9e-15 # define LARGEST_REAL 1.79769313486231e+308 # define SMALLEST_REAL 2.22507385850721e-308 # define LARGEST_SHORT_INTEGER 32766 # define LARGEST_LONG_INTEGER 2147483646 #endif /* Sun machine constants */ #ifdef sun /* These values are rumored to be the correct values. */ # define MACHINE_RESOLUTION 8.9e-15 # define LARGEST_REAL 1.79769313486231e+308 # define SMALLEST_REAL 2.22507385850721e-308 # define LARGEST_SHORT_INTEGER 32766 # define LARGEST_LONG_INTEGER 2147483646 #endif #endif /* NOT defined(__STDC__) */ /* * ANNOTATION * * This macro changes the amount of annotation produced by the matrix * routines. The annotation is used as a debugging aid. Change the number * associated with ANNOTATE to change the amount of annotation produced by * the program. */ /* Begin annotation definitions. */ #define ANNOTATE NONE #define NONE 0 #define ON_STRANGE_BEHAVIOR 1 #define FULL 2 #endif /* spINSIDE_SPARSE */ #endif /* spCONFIG_DEFS */ neuron-7.5/src/sparse13/spdefs.h000077500000000000000000001007561323325274500166020ustar00rootroot00000000000000/* * DATA STRUCTURE AND MACRO DEFINITIONS for Sparse. * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains common type definitions and macros for the sparse * matrix routines. These definitions are of no interest to the user. */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. * * $Date: 2004-04-24 23:28:33 +0200 (Sat, 24 Apr 2004) $ * $Revision: 616 $ */ /* * IMPORTS */ #include /* * If running lint, change some of the compiler options to get a more * complete inspection. */ #ifdef lint #undef REAL #undef spCOMPLEX #undef EXPANDABLE #undef TRANSLATE #undef INITIALIZE #undef DELETE #undef STRIP #undef MODIFIED_NODAL #undef QUAD_ELEMENT #undef TRANSPOSE #undef SCALING #undef DOCUMENTATION #undef MULTIPLICATION #undef DETERMINANT #undef CONDITION #undef PSEUDOCONDITION #undef FORTRAN #undef DEBUG #define REAL YES #define spCOMPLEX YES #define EXPANDABLE YES #define TRANSLATE YES #define INITIALIZE YES #define DELETE YES #define STRIP YES #define MODIFIED_NODAL YES #define QUAD_ELEMENT YES #define TRANSPOSE YES #define SCALING YES #define DOCUMENTATION YES #define MULTIPLICATION YES #define DETERMINANT YES #define CONDITION YES #define PSEUDOCONDITION YES #define FORTRAN YES #define DEBUG YES #define LINT YES #else /* not lint */ #define LINT NO #endif /* not lint */ /* * MACRO DEFINITIONS * * Macros are distinguished by using solely capital letters in their * identifiers. This contrasts with C defined identifiers which are strictly * lower case, and program variable and procedure names which use both upper * and lower case. */ /* Begin macros. */ /* Boolean data type */ #define BOOLEAN int #define NO 0 #define YES 1 #define NOT ! #define AND && #define OR || /* NULL pointer */ #ifndef NULL #define NULL 0 #endif #define SPARSE_ID 0x772773 /* Arbitrary (is Sparse on phone). */ #define IS_SPARSE(matrix) ((matrix) != NULL && \ (matrix)->ID == SPARSE_ID) #define IS_VALID(matrix) ((matrix) != NULL && \ (matrix)->ID == SPARSE_ID && \ (matrix)->Error >= spOKAY && \ (matrix)->Error < spFATAL) #define IS_FACTORED(matrix) ((matrix)->Factored && !(matrix)->NeedsOrdering) /* Macro commands */ /* Macro functions that return the maximum or minimum independent of type. */ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) /* Macro function that returns the absolute value of a floating point number. */ #define ABS(a) ((a) < 0.0 ? -(a) : (a)) /* Macro function that returns the square of a number. */ #define SQR(a) ((a)*(a)) /* Macro procedure that swaps two entities. */ #define SWAP(type, a, b) {type swapx; swapx = a; a = b; b = swapx;} /* Macro function that returns the approx absolute value of a complex number. */ #if spCOMPLEX #define ELEMENT_MAG(ptr) (ABS((ptr)->Real) + ABS((ptr)->Imag)) #else #define ELEMENT_MAG(ptr) ((ptr)->Real < 0.0 ? -(ptr)->Real : (ptr)->Real) #endif /* Complex assignment statements. */ #define CMPLX_ASSIGN(to,from) \ { (to).Real = (from).Real; \ (to).Imag = (from).Imag; \ } #define CMPLX_CONJ_ASSIGN(to,from) \ { (to).Real = (from).Real; \ (to).Imag = -(from).Imag; \ } #define CMPLX_NEGATE_ASSIGN(to,from) \ { (to).Real = -(from).Real; \ (to).Imag = -(from).Imag; \ } #define CMPLX_CONJ_NEGATE_ASSIGN(to,from) \ { (to).Real = -(from).Real; \ (to).Imag = (from).Imag; \ } #define CMPLX_CONJ(a) (a).Imag = -(a).Imag #define CMPLX_NEGATE(a) \ { (a).Real = -(a).Real; \ (a).Imag = -(a).Imag; \ } /* Macro that returns the approx magnitude (L-1 norm) of a complex number. */ #define CMPLX_1_NORM(a) (ABS((a).Real) + ABS((a).Imag)) /* Macro that returns the approx magnitude (L-infinity norm) of a complex. */ #define CMPLX_INF_NORM(a) (MAX (ABS((a).Real),ABS((a).Imag))) /* Macro function that returns the magnitude (L-2 norm) of a complex number. */ #define CMPLX_2_NORM(a) (sqrt((a).Real*(a).Real + (a).Imag*(a).Imag)) /* Macro function that performs complex addition. */ #define CMPLX_ADD(to,from_a,from_b) \ { (to).Real = (from_a).Real + (from_b).Real; \ (to).Imag = (from_a).Imag + (from_b).Imag; \ } /* Macro function that performs complex subtraction. */ #define CMPLX_SUBT(to,from_a,from_b) \ { (to).Real = (from_a).Real - (from_b).Real; \ (to).Imag = (from_a).Imag - (from_b).Imag; \ } /* Macro function that is equivalent to += operator for complex numbers. */ #define CMPLX_ADD_ASSIGN(to,from) \ { (to).Real += (from).Real; \ (to).Imag += (from).Imag; \ } /* Macro function that is equivalent to -= operator for complex numbers. */ #define CMPLX_SUBT_ASSIGN(to,from) \ { (to).Real -= (from).Real; \ (to).Imag -= (from).Imag; \ } /* Macro function that multiplies a complex number by a scalar. */ #define SCLR_MULT(to,sclr,cmplx) \ { (to).Real = (sclr) * (cmplx).Real; \ (to).Imag = (sclr) * (cmplx).Imag; \ } /* Macro function that multiply-assigns a complex number by a scalar. */ #define SCLR_MULT_ASSIGN(to,sclr) \ { (to).Real *= (sclr); \ (to).Imag *= (sclr); \ } /* Macro function that multiplies two complex numbers. */ #define CMPLX_MULT(to,from_a,from_b) \ { (to).Real = (from_a).Real * (from_b).Real - \ (from_a).Imag * (from_b).Imag; \ (to).Imag = (from_a).Real * (from_b).Imag + \ (from_a).Imag * (from_b).Real; \ } /* Macro function that implements to *= from for complex numbers. */ #define CMPLX_MULT_ASSIGN(to,from) \ { RealNumber to_real_ = (to).Real; \ (to).Real = to_real_ * (from).Real - \ (to).Imag * (from).Imag; \ (to).Imag = to_real_ * (from).Imag + \ (to).Imag * (from).Real; \ } /* Macro function that multiplies two complex numbers, the first of which is * conjugated. */ #define CMPLX_CONJ_MULT(to,from_a,from_b) \ { (to).Real = (from_a).Real * (from_b).Real + \ (from_a).Imag * (from_b).Imag; \ (to).Imag = (from_a).Real * (from_b).Imag - \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to = add + mult_a * mult_b */ #define CMPLX_MULT_ADD(to,mult_a,mult_b,add) \ { (to).Real = (mult_a).Real * (mult_b).Real - \ (mult_a).Imag * (mult_b).Imag + (add).Real; \ (to).Imag = (mult_a).Real * (mult_b).Imag + \ (mult_a).Imag * (mult_b).Real + (add).Imag; \ } /* Macro function that subtracts the product of two complex numbers from * another. to = subt - mult_a * mult_b */ #define CMPLX_MULT_SUBT(to,mult_a,mult_b,subt) \ { (to).Real = (subt).Real - (mult_a).Real * (mult_b).Real + \ (mult_a).Imag * (mult_b).Imag; \ (to).Imag = (subt).Imag - (mult_a).Real * (mult_b).Imag - \ (mult_a).Imag * (mult_b).Real; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to = add + mult_a* * mult_b where mult_a* represents mult_a * conjugate. */ #define CMPLX_CONJ_MULT_ADD(to,mult_a,mult_b,add) \ { (to).Real = (mult_a).Real * (mult_b).Real + \ (mult_a).Imag * (mult_b).Imag + (add).Real; \ (to).Imag = (mult_a).Real * (mult_b).Imag - \ (mult_a).Imag * (mult_b).Real + (add).Imag; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to += mult_a * mult_b */ #define CMPLX_MULT_ADD_ASSIGN(to,from_a,from_b) \ { (to).Real += (from_a).Real * (from_b).Real - \ (from_a).Imag * (from_b).Imag; \ (to).Imag += (from_a).Real * (from_b).Imag + \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then subtracts them * from another. */ #define CMPLX_MULT_SUBT_ASSIGN(to,from_a,from_b) \ { (to).Real -= (from_a).Real * (from_b).Real - \ (from_a).Imag * (from_b).Imag; \ (to).Imag -= (from_a).Real * (from_b).Imag + \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then adds them * to the destination. to += from_a* * from_b where from_a* represents from_a * conjugate. */ #define CMPLX_CONJ_MULT_ADD_ASSIGN(to,from_a,from_b) \ { (to).Real += (from_a).Real * (from_b).Real + \ (from_a).Imag * (from_b).Imag; \ (to).Imag += (from_a).Real * (from_b).Imag - \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then subtracts them * from the destination. to -= from_a* * from_b where from_a* represents from_a * conjugate. */ #define CMPLX_CONJ_MULT_SUBT_ASSIGN(to,from_a,from_b) \ { (to).Real -= (from_a).Real * (from_b).Real + \ (from_a).Imag * (from_b).Imag; \ (to).Imag -= (from_a).Real * (from_b).Imag - \ (from_a).Imag * (from_b).Real; \ } /* * Macro functions that provide complex division. */ /* Complex division: to = num / den */ #define CMPLX_DIV(to,num,den) \ { RealNumber r_, s_; \ if (((den).Real >= (den).Imag AND (den).Real > -(den).Imag) OR \ ((den).Real < (den).Imag AND (den).Real <= -(den).Imag)) \ { r_ = (den).Imag / (den).Real; \ s_ = (den).Real + r_*(den).Imag; \ (to).Real = ((num).Real + r_*(num).Imag)/s_; \ (to).Imag = ((num).Imag - r_*(num).Real)/s_; \ } \ else \ { r_ = (den).Real / (den).Imag; \ s_ = (den).Imag + r_*(den).Real; \ (to).Real = (r_*(num).Real + (num).Imag)/s_; \ (to).Imag = (r_*(num).Imag - (num).Real)/s_; \ } \ } /* Complex division and assignment: num /= den */ #define CMPLX_DIV_ASSIGN(num,den) \ { RealNumber r_, s_, t_; \ if (((den).Real >= (den).Imag AND (den).Real > -(den).Imag) OR \ ((den).Real < (den).Imag AND (den).Real <= -(den).Imag)) \ { r_ = (den).Imag / (den).Real; \ s_ = (den).Real + r_*(den).Imag; \ t_ = ((num).Real + r_*(num).Imag)/s_; \ (num).Imag = ((num).Imag - r_*(num).Real)/s_; \ (num).Real = t_; \ } \ else \ { r_ = (den).Real / (den).Imag; \ s_ = (den).Imag + r_*(den).Real; \ t_ = (r_*(num).Real + (num).Imag)/s_; \ (num).Imag = (r_*(num).Imag - (num).Real)/s_; \ (num).Real = t_; \ } \ } /* Complex reciprocation: to = 1.0 / den */ #define CMPLX_RECIPROCAL(to,den) \ { RealNumber r_; \ if (((den).Real >= (den).Imag AND (den).Real > -(den).Imag) OR \ ((den).Real < (den).Imag AND (den).Real <= -(den).Imag)) \ { r_ = (den).Imag / (den).Real; \ (to).Imag = -r_*((to).Real = 1.0/((den).Real + r_*(den).Imag)); \ } \ else \ { r_ = (den).Real / (den).Imag; \ (to).Real = -r_*((to).Imag = -1.0/((den).Imag + r_*(den).Real));\ } \ } /* * ASSERT and ABORT * * Macro used to assert that if the code is working correctly, then * a condition must be true. If not, then execution is terminated * and an error message is issued stating that there is an internal * error and giving the file and line number. These assertions are * not evaluated unless the DEBUG flag is true. */ #if DEBUG #define ASSERT(condition) if (NOT(condition)) ABORT() #else #define ASSERT(condition) #endif #if DEBUG #define ABORT() \ { (void)fflush(stdout); \ (void)fprintf(stderr, "sparse: panic in file `%s' at line %d.\n", \ __FILE__, __LINE__); \ (void)fflush(stderr); \ abort(); \ } #else #define ABORT() #endif /* * IMAGINARY VECTORS * * The imaginary vectors iRHS and iSolution are only needed when the * options spCOMPLEX and spSEPARATED_COMPLEX_VECTORS are set. The following * macro makes it easy to include or exclude these vectors as needed. */ #if spCOMPLEX AND spSEPARATED_COMPLEX_VECTORS #define IMAG_VECTORS , iRHS, iSolution #define IMAG_RHS , iRHS #else #define IMAG_VECTORS #define IMAG_RHS #endif /* * MEMORY ALLOCATION */ #if 1 #include #else #if !defined(__MWERKS__) extern char *malloc(), *calloc(), *realloc(); #ifdef ultrix extern void free(); extern void abort(); #else extern free(); extern abort(); #endif #endif #endif #define ALLOC(type,number) ((type *)malloc((unsigned)(sizeof(type)*(number)))) #define REALLOC(ptr,type,number) \ ptr = (type *)realloc((char *)ptr,(unsigned)(sizeof(type)*(number))) /* prevent setting an already freed value to NULL */ #define FREE(ptr) { if ((ptr) != NULL) {char* p = (char*)(ptr); (ptr) = NULL; free(p);} } /* Calloc that properly handles allocating a cleared vector. */ #define CALLOC(ptr,type,number) \ { int i; ptr = ALLOC(type, number); \ if (ptr != (type *)NULL) \ for(i=(number)-1;i>=0; i--) ptr[i] = (type) 0; \ } /* * REAL NUMBER */ /* Begin `RealNumber'. */ typedef spREAL RealNumber, *RealVector; /* * COMPLEX NUMBER DATA STRUCTURE * * >>> Structure fields: * Real (RealNumber) * The real portion of the number. Real must be the first * field in this structure. * Imag (RealNumber) * The imaginary portion of the number. This field must follow * immediately after Real. */ /* Begin `ComplexNumber'. */ typedef struct { RealNumber Real; RealNumber Imag; } ComplexNumber, *ComplexVector; /* * MATRIX ELEMENT DATA STRUCTURE * * Every nonzero element in the matrix is stored in a dynamically allocated * MatrixElement structure. These structures are linked together in an * orthogonal linked list. Two different MatrixElement structures exist. * One is used when only real matrices are expected, it is missing an entry * for imaginary data. The other is used if complex matrices are expected. * It contains an entry for imaginary data. * * >>> Structure fields: * Real (RealNumber) * The real portion of the value of the element. Real must be the first * field in this structure. * Imag (RealNumber) * The imaginary portion of the value of the element. If the matrix * routines are not compiled to handle complex matrices, then this * field does not exist. If it exists, it must follow immediately after * Real. * Row (int) * The row number of the element. * Col (int) * The column number of the element. * NextInRow (struct MatrixElement *) * NextInRow contains a pointer to the next element in the row to the * right of this element. If this element is the last nonzero in the * row then NextInRow contains NULL. * NextInCol (struct MatrixElement *) * NextInCol contains a pointer to the next element in the column below * this element. If this element is the last nonzero in the column then * NextInCol contains NULL. * pInitInfo (char *) * Pointer to user data used for initialization of the matrix element. * Initialized to NULL. * * >>> Type definitions: * ElementPtr * A pointer to a MatrixElement. * ArrayOfElementPtrs * An array of ElementPtrs. Used for FirstInRow, FirstInCol and * Diag pointer arrays. */ /* Begin `MatrixElement'. */ struct MatrixElement { RealNumber Real; #if spCOMPLEX RealNumber Imag; #endif int Row; int Col; struct MatrixElement *NextInRow; struct MatrixElement *NextInCol; #if INITIALIZE char *pInitInfo; #endif }; typedef struct MatrixElement *ElementPtr; typedef ElementPtr *ArrayOfElementPtrs; /* * ALLOCATION DATA STRUCTURE * * The sparse matrix routines keep track of all memory that is allocated by * the operating system so the memory can later be freed. This is done by * saving the pointers to all the chunks of memory that are allocated to a * particular matrix in an allocation list. That list is organized as a * linked list so that it can grow without a priori bounds. * * >>> Structure fields: * AllocatedPtr (char *) * Pointer to chunk of memory that has been allocated for the matrix. * NextRecord (struct AllocationRecord *) * Pointer to the next allocation record. */ /* Begin `AllocationRecord'. */ struct AllocationRecord { char *AllocatedPtr; struct AllocationRecord *NextRecord; }; typedef struct AllocationRecord *AllocationListPtr; /* * FILL-IN LIST DATA STRUCTURE * * The sparse matrix routines keep track of all fill-ins separately from * user specified elements so they may be removed by spStripFills(). Fill-ins * are allocated in bunched in what is called a fill-in lists. The data * structure defined below is used to organize these fill-in lists into a * linked-list. * * >>> Structure fields: * pFillinList (ElementPtr) * Pointer to a fill-in list, or a bunch of fill-ins arranged contiguously * in memory. * NumberOfFillinsInList (int) * Seems pretty self explanatory to me. * Next (struct FillinListNodeStruct *) * Pointer to the next fill-in list structures. */ /* Begin `FillinListNodeStruct'. */ struct FillinListNodeStruct { ElementPtr pFillinList; int NumberOfFillinsInList; struct FillinListNodeStruct *Next; }; /* * MATRIX FRAME DATA STRUCTURE * * This structure contains all the pointers that support the orthogonal * linked list that contains the matrix elements. Also included in this * structure are other numbers and pointers that are used globally by the * sparse matrix routines and are associated with one particular matrix. * * >>> Type definitions: * MatrixPtr * A pointer to MatrixFrame. Essentially, a pointer to the matrix. * * >>> Structure fields: * AbsThreshold (RealNumber) * The absolute magnitude an element must have to be considered as a * pivot candidate, except as a last resort. * AllocatedExtSize (int) * The allocated size of the arrays used to translate external row and * column numbers to their internal values. * AllocatedSize (int) * The currently allocated size of the matrix; the size the matrix can * grow to when EXPANDABLE is set true and AllocatedSize is the largest * the matrix can get without requiring that the matrix frame be * reallocated. * Complex (BOOLEAN) * The flag which indicates whether the matrix is complex (true) or * real. * CurrentSize (int) * This number is used during the building of the matrix when the * TRANSLATE option is set true. It indicates the number of internal * rows and columns that have elements in them. * Diag (ArrayOfElementPtrs) * Array of pointers that points to the diagonal elements. * DoCmplxDirect (BOOLEAN *) * Array of flags, one for each column in matrix. If a flag is true * then corresponding column in a complex matrix should be eliminated * in spFactor() using direct addressing (rather than indirect * addressing). * DoRealDirect (BOOLEAN *) * Array of flags, one for each column in matrix. If a flag is true * then corresponding column in a real matrix should be eliminated * in spFactor() using direct addressing (rather than indirect * addressing). * Elements (int) * The number of original elements (total elements minus fill ins) * present in matrix. * Error (int) * The error status of the sparse matrix package. * ExtSize (int) * The value of the largest external row or column number encountered. * ExtToIntColMap (int []) * An array that is used to convert external columns number to internal * external column numbers. Present only if TRANSLATE option is set true. * ExtToIntRowMap (int []) * An array that is used to convert external row numbers to internal * external row numbers. Present only if TRANSLATE option is set true. * Factored (BOOLEAN) * Indicates if matrix has been factored. This flag is set true in * spFactor() and spOrderAndFactor() and set false in spCreate() * and spClear(). * Fillins (int) * The number of fill-ins created during the factorization the matrix. * FirstInCol (ArrayOfElementPtrs) * Array of pointers that point to the first nonzero element of the * column corresponding to the index. * FirstInRow (ArrayOfElementPtrs) * Array of pointers that point to the first nonzero element of the row * corresponding to the index. * ID (unsigned long int) * A constant that provides the sparse data structure with a signature. * When DEBUG is true, all externally available sparse routines check * this signature to assure they are operating on a valid matrix. * Intermediate (RealVector) * Temporary storage used in the spSolve routines. Intermediate is an * array used during forward and backward substitution. It is * commonly called y when the forward and backward substitution process is * denoted Ax = b => Ly = b and Ux = y. * InternalVectorsAllocated (BOOLEAN) * A flag that indicates whether the markowitz vectors and the * Intermediate vector have been created. * These vectors are created in CreateInternalVectors(). * IntToExtColMap (int []) * An array that is used to convert internal column numbers to external * external column numbers. * IntToExtRowMap (int []) * An array that is used to convert internal row numbers to external * external row numbers. * MarkowitzCol (int []) * An array that contains the count of the non-zero elements excluding * the pivots for each column. Used to generate and update MarkowitzProd. * MarkowitzProd (long []) * The array of the products of the Markowitz row and column counts. The * element with the smallest product is the best pivot to use to maintain * sparsity. * MarkowitzRow (int []) * An array that contains the count of the non-zero elements excluding * the pivots for each row. Used to generate and update MarkowitzProd. * MaxRowCountInLowerTri (int) * The maximum number of off-diagonal element in the rows of L, the * lower triangular matrix. This quantity is used when computing an * estimate of the roundoff error in the matrix. * NeedsOrdering (BOOLEAN) * This is a flag that signifies that the matrix needs to be ordered * or reordered. NeedsOrdering is set true in spCreate() and * spGetElement() or spGetAdmittance() if new elements are added to the * matrix after it has been previously factored. It is set false in * spOrderAndFactor(). * NumberOfInterchangesIsOdd (BOOLEAN) * Flag that indicates the sum of row and column interchange counts * is an odd number. Used when determining the sign of the determinant. * Partitioned (BOOLEAN) * This flag indicates that the columns of the matrix have been * partitioned into two groups. Those that will be addressed directly * and those that will be addressed indirectly in spFactor(). * PivotsOriginalCol (int) * Column pivot was chosen from. * PivotsOriginalRow (int) * Row pivot was chosen from. * PivotSelectionMethod (char) * Character that indicates which pivot search method was successful. * PreviousMatrixWasComplex (BOOLEAN) * This flag in needed to determine how to clear the matrix. When * dealing with real matrices, it is important that the imaginary terms * in the matrix elements be zero. Thus, if the previous matrix was * complex, then the current matrix will be cleared as if it were complex * even if it is real. * RelThreshold (RealNumber) * The magnitude an element must have relative to others in its row * to be considered as a pivot candidate, except as a last resort. * Reordered (BOOLEAN) * This flag signifies that the matrix has been reordered. It * is cleared in spCreate(), set in spMNA_Preorder() and * spOrderAndFactor() and is used in spPrint(). * RowsLinked (BOOLEAN) * A flag that indicates whether the row pointers exist. The AddByIndex * routines do not generate the row pointers, which are needed by some * of the other routines, such as spOrderAndFactor() and spScale(). * The row pointers are generated in the function spcLinkRows(). * SingularCol (int) * Normally zero, but if matrix is found to be singular, SingularCol is * assigned the external column number of pivot that was zero. * SingularRow (int) * Normally zero, but if matrix is found to be singular, SingularRow is * assigned the external row number of pivot that was zero. * Singletons (int) * The number of singletons available for pivoting. Note that if row I * and column I both contain singletons, only one of them is counted. * Size (int) * Number of rows and columns in the matrix. Does not change as matrix * is factored. * TrashCan (MatrixElement) * This is a dummy MatrixElement that is used to by the user to stuff * data related to the zero row or column. In other words, when the user * adds an element in row zero or column zero, then the matrix returns * a pointer to TrashCan. In this way the user can have a uniform way * data into the matrix independent of whether a component is connected * to ground. * * >>> The remaining fields are related to memory allocation. * TopOfAllocationList (AllocationListPtr) * Pointer which points to the top entry in a list. The list contains * all the pointers to the segments of memory that have been allocated * to this matrix. This is used when the memory is to be freed on * deallocation of the matrix. * RecordsRemaining (int) * Number of slots left in the list of allocations. * NextAvailElement (ElementPtr) * Pointer to the next available element which has been allocated but as * yet is unused. Matrix elements are allocated in groups of * ELEMENTS_PER_ALLOCATION in order to speed element allocation and * freeing. * ElementsRemaining (int) * Number of unused elements left in last block of elements allocated. * NextAvailFillin (ElementPtr) * Pointer to the next available fill-in which has been allocated but * as yet is unused. Fill-ins are allocated in a group in order to keep * them physically close in memory to the rest of the matrix. * FillinsRemaining (int) * Number of unused fill-ins left in the last block of fill-ins * allocated. * FirstFillinListNode (FillinListNodeStruct *) * A pointer to the head of the linked-list that keeps track of the * lists of fill-ins. * LastFillinListNode (FillinListNodeStruct *) * A pointer to the tail of the linked-list that keeps track of the * lists of fill-ins. */ /* Begin `MatrixFrame'. */ struct MatrixFrame { RealNumber AbsThreshold; int AllocatedSize; int AllocatedExtSize; BOOLEAN Complex; int CurrentSize; ArrayOfElementPtrs Diag; BOOLEAN *DoCmplxDirect; BOOLEAN *DoRealDirect; int Elements; int Error; int ExtSize; int *ExtToIntColMap; int *ExtToIntRowMap; BOOLEAN Factored; int Fillins; ArrayOfElementPtrs FirstInCol; ArrayOfElementPtrs FirstInRow; unsigned long ID; RealVector Intermediate; BOOLEAN InternalVectorsAllocated; int *IntToExtColMap; int *IntToExtRowMap; int *MarkowitzRow; int *MarkowitzCol; long *MarkowitzProd; int MaxRowCountInLowerTri; BOOLEAN NeedsOrdering; BOOLEAN NumberOfInterchangesIsOdd; BOOLEAN Partitioned; int PivotsOriginalCol; int PivotsOriginalRow; char PivotSelectionMethod; BOOLEAN PreviousMatrixWasComplex; RealNumber RelThreshold; BOOLEAN Reordered; BOOLEAN RowsLinked; int SingularCol; int SingularRow; int Singletons; int Size; struct MatrixElement TrashCan; AllocationListPtr TopOfAllocationList; int RecordsRemaining; ElementPtr NextAvailElement; int ElementsRemaining; ElementPtr NextAvailFillin; int FillinsRemaining; struct FillinListNodeStruct *FirstFillinListNode; struct FillinListNodeStruct *LastFillinListNode; }; typedef struct MatrixFrame *MatrixPtr; neuron-7.5/src/sparse13/spfactor.c000077500000000000000000003055021323325274500171260ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * MATRIX FACTORIZATION MODULE * * Author: Advising Professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the routines to factor the matrix into LU form. * * >>> User accessible functions contained in this file: * spOrderAndFactor * spFactor * spPartition * * >>> Other functions contained in this file: * FactorComplexMatrix CreateInternalVectors * CountMarkowitz MarkowitzProducts * SearchForPivot SearchForSingleton * QuicklySearchDiagonal SearchDiagonal * SearchEntireMatrix FindLargestInCol * FindBiggestInColExclude ExchangeRowsAndCols * spcRowExchange spcColExchange * ExchangeColElements ExchangeRowElements * RealRowColElimination ComplexRowColElimination * UpdateMarkowitzNumbers CreateFillin * MatrixIsSingular ZeroPivot * WriteStatus */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef lint static char copyright[] = "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"; static char RCSid[] = "@(#)$Header$"; #endif /* * IMPORTS * * >>> Import descriptions: * spconfig.h * Macros that customize the sparse matrix routines. * spmatrix.h * Macros and declarations to be imported by the user. * spdefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "spmatrix.h" #include "spdefs.h" /* avoid "declared implicitly `extern' and later `static' " warnings. */ static int FactorComplexMatrix(); static void CreateInternalVectors(); static void CountMarkowitz(); static void MarkowitzProducts(); static ElementPtr SearchForPivot(); static ElementPtr SearchForSingleton(); static ElementPtr QuicklySearchDiagonal(); static ElementPtr SearchDiagonal(); static ElementPtr SearchEntireMatrix(); static RealNumber FindLargestInCol(); static RealNumber FindBiggestInColExclude(); static void ExchangeRowsAndCols(); static void ExchangeColElements(); static void ExchangeRowElements(); static void RealRowColElimination(); static void ComplexRowColElimination(); static void UpdateMarkowitzNumbers(); static ElementPtr CreateFillin(); static int MatrixIsSingular(); static int ZeroPivot(); /* * ORDER AND FACTOR MATRIX * * This routine chooses a pivot order for the matrix and factors it * into LU form. It handles both the initial factorization and subsequent * factorizations when a reordering is desired. This is handled in a manner * that is transparent to the user. The routine uses a variation of * Gauss's method where the pivots are associated with L and the * diagonal terms of U are one. * * >>> Returned: * The error code is returned. Possible errors are listed below. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * Representative right-hand side vector that is used to determine * pivoting order when the right hand side vector is sparse. If * RHS is a NULL pointer then the RHS vector is assumed to * be full and it is not used when determining the pivoting * order. * RelThreshold (RealNumber) * This number determines what the pivot relative threshold will * be. It should be between zero and one. If it is one then the * pivoting method becomes complete pivoting, which is very slow * and tends to fill up the matrix. If it is set close to zero * the pivoting method becomes strict Markowitz with no * threshold. The pivot threshold is used to eliminate pivot * candidates that would cause excessive element growth if they * were used. Element growth is the cause of roundoff error. * Element growth occurs even in well-conditioned matrices. * Setting the RelThreshold large will reduce element growth and * roundoff error, but setting it too large will cause execution * time to be excessive and will result in a large number of * fill-ins. If this occurs, accuracy can actually be degraded * because of the large number of operations required on the * matrix due to the large number of fill-ins. A good value seems * to be 0.001. The default is chosen by giving a value larger * than one or less than or equal to zero. This value should be * increased and the matrix resolved if growth is found to be * excessive. Changing the pivot threshold does not improve * performance on matrices where growth is low, as is often the * case with ill-conditioned matrices. Once a valid threshold is * given, it becomes the new default. The default value of * RelThreshold was choosen for use with nearly diagonally * dominant matrices such as node- and modified-node admittance * matrices. For these matrices it is usually best to use * diagonal pivoting. For matrices without a strong diagonal, it * is usually best to use a larger threshold, such as 0.01 or * 0.1. * AbsThreshold (RealNumber) * The absolute magnitude an element must have to be considered * as a pivot candidate, except as a last resort. This number * should be set significantly smaller than the smallest diagonal * element that is is expected to be placed in the matrix. If * there is no reasonable prediction for the lower bound on these * elements, then AbsThreshold should be set to zero. * AbsThreshold is used to reduce the possibility of choosing as a * pivot an element that has suffered heavy cancellation and as a * result mainly consists of roundoff error. Once a valid * threshold is given, it becomes the new default. * DiagPivoting (BOOLEAN) * A flag indicating that pivot selection should be confined to the * diagonal if possible. If DiagPivoting is nonzero and if * DIAGONAL_PIVOTING is enabled pivots will be chosen only from * the diagonal unless there are no diagonal elements that satisfy * the threshold criteria. Otherwise, the entire reduced * submatrix is searched when looking for a pivot. The diagonal * pivoting in Sparse is efficient and well refined, while the * off-diagonal pivoting is not. For symmetric and near symmetric * matrices, it is best to use diagonal pivoting because it * results in the best performance when reordering the matrix and * when factoring the matrix without ordering. If there is a * considerable amount of nonsymmetry in the matrix, then * off-diagonal pivoting may result in a better equation ordering * simply because there are more pivot candidates to choose from. * A better ordering results in faster subsequent factorizations. * However, the initial pivot selection process takes considerably * longer for off-diagonal pivoting. * * >>> Local variables: * pPivot (ElementPtr) * Pointer to the element being used as a pivot. * ReorderingRequired (BOOLEAN) * Flag that indicates whether reordering is required. * * >>> Possible errors: * spNO_MEMORY * spSINGULAR * spSMALL_PIVOT * Error is cleared in this function. */ extern void spcLinkRows(MatrixPtr); int spOrderAndFactor( eMatrix, RHS, RelThreshold, AbsThreshold, DiagPivoting ) char *eMatrix; RealNumber RHS[], RelThreshold, AbsThreshold; BOOLEAN DiagPivoting; { MatrixPtr Matrix = (MatrixPtr)eMatrix; ElementPtr pPivot; int Step, Size, ReorderingRequired; RealNumber LargestInCol, FindLargestInCol(); /* Begin `spOrderAndFactor'. */ ASSERT( IS_VALID(Matrix) AND NOT Matrix->Factored); Matrix->Error = spOKAY; Size = Matrix->Size; if (RelThreshold <= 0.0) RelThreshold = Matrix->RelThreshold; if (RelThreshold > 1.0) RelThreshold = Matrix->RelThreshold; Matrix->RelThreshold = RelThreshold; if (AbsThreshold < 0.0) AbsThreshold = Matrix->AbsThreshold; Matrix->AbsThreshold = AbsThreshold; ReorderingRequired = NO; if (NOT Matrix->NeedsOrdering) { /* Matrix has been factored before and reordering is not required. */ for (Step = 1; Step <= Size; Step++) { pPivot = Matrix->Diag[Step]; LargestInCol = FindLargestInCol(pPivot->NextInCol); if ((LargestInCol * RelThreshold < ELEMENT_MAG(pPivot))) { if (Matrix->Complex) ComplexRowColElimination( Matrix, pPivot ); else RealRowColElimination( Matrix, pPivot ); } else { ReorderingRequired = YES; break; /* for loop */ } } if (NOT ReorderingRequired) goto Done; else { /* * A pivot was not large enough to maintain accuracy, * so a partial reordering is required. */ #if ANNOTATE >= ON_STRANGE_BEHAVIOR printf("Reordering, Step = %1d\n", Step); #endif } } /* End of if(NOT Matrix->NeedsOrdering) */ else { /* * This is the first time the matrix has been factored. These few statements * indicate to the rest of the code that a full reodering is required rather * than a partial reordering, which occurs during a failure of a fast * factorization. */ Step = 1; if (NOT Matrix->RowsLinked) spcLinkRows( Matrix ); if (NOT Matrix->InternalVectorsAllocated) CreateInternalVectors( Matrix ); if (Matrix->Error >= spFATAL) return Matrix->Error; } /* Form initial Markowitz products. */ CountMarkowitz( Matrix, RHS, Step ); MarkowitzProducts( Matrix, Step ); Matrix->MaxRowCountInLowerTri = -1; /* Perform reordering and factorization. */ for (; Step <= Size; Step++) { pPivot = SearchForPivot( Matrix, Step, DiagPivoting ); if (pPivot == NULL) return MatrixIsSingular( Matrix, Step ); ExchangeRowsAndCols( Matrix, pPivot, Step ); if (Matrix->Complex) ComplexRowColElimination( Matrix, pPivot ); else RealRowColElimination( Matrix, pPivot ); if (Matrix->Error >= spFATAL) return Matrix->Error; UpdateMarkowitzNumbers( Matrix, pPivot ); #if ANNOTATE == FULL WriteStatus( Matrix, Step ); #endif } Done: Matrix->NeedsOrdering = NO; Matrix->Reordered = YES; Matrix->Factored = YES; return Matrix->Error; } /* * FACTOR MATRIX * * This routine is the companion routine to spOrderAndFactor(). * Unlike spOrderAndFactor(), spFactor() cannot change the ordering. * It is also faster than spOrderAndFactor(). The standard way of * using these two routines is to first use spOrderAndFactor() for the * initial factorization. For subsequent factorizations, spFactor() * is used if there is some assurance that little growth will occur * (say for example, that the matrix is diagonally dominant). If * spFactor() is called for the initial factorization of the matrix, * then spOrderAndFactor() is automatically called with the default * threshold. This routine uses "row at a time" LU factorization. * Pivots are associated with the lower triangular matrix and the * diagonals of the upper triangular matrix are ones. * * >>> Returned: * The error code is returned. Possible errors are listed below. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * * >>> Possible errors: * spNO_MEMORY * spSINGULAR * spZERO_DIAG * spSMALL_PIVOT * Error is cleared in this function. */ int spFactor( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register ElementPtr pColumn; register int Step, Size; RealNumber Mult; /* Begin `spFactor'. */ ASSERT( IS_VALID(Matrix) AND NOT Matrix->Factored); if (Matrix->NeedsOrdering) { return spOrderAndFactor( eMatrix, (RealVector)NULL, 0.0, 0.0, DIAG_PIVOTING_AS_DEFAULT ); } if (NOT Matrix->Partitioned) spPartition( eMatrix, spDEFAULT_PARTITION ); #if spCOMPLEX if (Matrix->Complex) return FactorComplexMatrix( Matrix ); #endif #if REAL Size = Matrix->Size; if (Matrix->Diag[1]->Real == 0.0) return ZeroPivot( Matrix, 1 ); Matrix->Diag[1]->Real = 1.0 / Matrix->Diag[1]->Real; /* Start factorization. */ for (Step = 2; Step <= Size; Step++) { if (Matrix->DoRealDirect[Step]) { /* Update column using direct addressing scatter-gather. */ register RealNumber *Dest = (RealNumber *)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { Dest[pElement->Row] = pElement->Real; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; pColumn->Real = Dest[pColumn->Row] * pElement->Real; while ((pElement = pElement->NextInCol) != NULL) Dest[pElement->Row] -= pColumn->Real * pElement->Real; pColumn = pColumn->NextInCol; } /* Gather. */ pElement = Matrix->Diag[Step]->NextInCol; while (pElement != NULL) { pElement->Real = Dest[pElement->Row]; pElement = pElement->NextInCol; } /* Check for singular matrix. */ if (Dest[Step] == 0.0) return ZeroPivot( Matrix, Step ); Matrix->Diag[Step]->Real = 1.0 / Dest[Step]; } else { /* Update column using indirect addressing scatter-gather. */ register RealNumber **pDest = (RealNumber **)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { pDest[pElement->Row] = &pElement->Real; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; Mult = (*pDest[pColumn->Row] *= pElement->Real); while ((pElement = pElement->NextInCol) != NULL) *pDest[pElement->Row] -= Mult * pElement->Real; pColumn = pColumn->NextInCol; } /* Check for singular matrix. */ if (Matrix->Diag[Step]->Real == 0.0) return ZeroPivot( Matrix, Step ); Matrix->Diag[Step]->Real = 1.0 / Matrix->Diag[Step]->Real; } } Matrix->Factored = YES; return (Matrix->Error = spOKAY); #endif /* REAL */ } #if spCOMPLEX /* * FACTOR COMPLEX MATRIX * * This routine is the companion routine to spFactor(), it * handles complex matrices. It is otherwise identical. * * >>> Returned: * The error code is returned. Possible errors are listed below. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * * >>> Possible errors: * spSINGULAR * Error is cleared in this function. */ static int FactorComplexMatrix( Matrix ) MatrixPtr Matrix; { register ElementPtr pElement; register ElementPtr pColumn; register int Step, Size; ComplexNumber Mult, Pivot; /* Begin `FactorComplexMatrix'. */ ASSERT(Matrix->Complex); Size = Matrix->Size; pElement = Matrix->Diag[1]; if (ELEMENT_MAG(pElement) == 0.0) return ZeroPivot( Matrix, 1 ); /* Cmplx expr: *pPivot = 1.0 / *pPivot. */ CMPLX_RECIPROCAL( *pElement, *pElement ); /* Start factorization. */ for (Step = 2; Step <= Size; Step++) { if (Matrix->DoCmplxDirect[Step]) { /* Update column using direct addressing scatter-gather. */ register ComplexNumber *Dest; Dest = (ComplexNumber *)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { Dest[pElement->Row] = *(ComplexNumber *)pElement; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; /* Cmplx expr: Mult = Dest[pColumn->Row] * (1.0 / *pPivot). */ CMPLX_MULT(Mult, Dest[pColumn->Row], *pElement); CMPLX_ASSIGN(*pColumn, Mult); while ((pElement = pElement->NextInCol) != NULL) { /* Cmplx expr: Dest[pElement->Row] -= Mult * pElement */ CMPLX_MULT_SUBT_ASSIGN(Dest[pElement->Row],Mult,*pElement); } pColumn = pColumn->NextInCol; } /* Gather. */ pElement = Matrix->Diag[Step]->NextInCol; while (pElement != NULL) { *(ComplexNumber *)pElement = Dest[pElement->Row]; pElement = pElement->NextInCol; } /* Check for singular matrix. */ Pivot = Dest[Step]; if (CMPLX_1_NORM(Pivot) == 0.0) return ZeroPivot( Matrix, Step ); CMPLX_RECIPROCAL( *Matrix->Diag[Step], Pivot ); } else { /* Update column using direct addressing scatter-gather. */ register ComplexNumber **pDest; pDest = (ComplexNumber **)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { pDest[pElement->Row] = (ComplexNumber *)pElement; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; /* Cmplx expr: Mult = *pDest[pColumn->Row] * (1.0 / *pPivot). */ CMPLX_MULT(Mult, *pDest[pColumn->Row], *pElement); CMPLX_ASSIGN(*pDest[pColumn->Row], Mult); while ((pElement = pElement->NextInCol) != NULL) { /* Cmplx expr: *pDest[pElement->Row] -= Mult * pElement */ CMPLX_MULT_SUBT_ASSIGN(*pDest[pElement->Row],Mult,*pElement); } pColumn = pColumn->NextInCol; } /* Check for singular matrix. */ pElement = Matrix->Diag[Step]; if (ELEMENT_MAG(pElement) == 0.0) return ZeroPivot( Matrix, Step ); CMPLX_RECIPROCAL( *pElement, *pElement ); } } Matrix->Factored = YES; return (Matrix->Error = spOKAY); } #endif /* spCOMPLEX */ /* * PARTITION MATRIX * * This routine determines the cost to factor each row using both * direct and indirect addressing and decides, on a row-by-row basis, * which addressing mode is fastest. This information is used in * spFactor() to speed the factorization. * * When factoring a previously ordered matrix using spFactor(), Sparse * operates on a row-at-a-time basis. For speed, on each step, the * row being updated is copied into a full vector and the operations * are performed on that vector. This can be done one of two ways, * either using direct addressing or indirect addressing. Direct * addressing is fastest when the matrix is relatively dense and * indirect addressing is best when the matrix is quite sparse. The * user selects the type of partition used with Mode. If Mode is set * to spDIRECT_PARTITION, then the all rows are placed in the direct * addressing partition. Similarly, if Mode is set to * spINDIRECT_PARTITION, then the all rows are placed in the indirect * addressing partition. By setting Mode to spAUTO_PARTITION, the * user allows Sparse to select the partition for each row * individually. spFactor() generally runs faster if Sparse is * allowed to choose its own partitioning, however choosing a * partition is expensive. The time required to choose a partition is * of the same order of the cost to factor the matrix. If you plan to * factor a large number of matrices with the same structure, it is * best to let Sparse choose the partition. Otherwise, you should * choose the partition based on the predicted density of the matrix. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * Mode (int) * Mode must be one of three special codes: spDIRECT_PARTITION, * spINDIRECT_PARTITION, or spAUTO_PARTITION. */ void spPartition( eMatrix, Mode ) char *eMatrix; int Mode; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement, pColumn; register int Step, Size; register int *Nc, *No, *Nm; BOOLEAN *DoRealDirect, *DoCmplxDirect; /* Begin `spPartition'. */ ASSERT( IS_SPARSE( Matrix ) ); if (Matrix->Partitioned) return; Size = Matrix->Size; DoRealDirect = Matrix->DoRealDirect; DoCmplxDirect = Matrix->DoCmplxDirect; Matrix->Partitioned = YES; /* If partition is specified by the user, this is easy. */ if (Mode == spDEFAULT_PARTITION) Mode = DEFAULT_PARTITION; if (Mode == spDIRECT_PARTITION) { for (Step = 1; Step <= Size; Step++) #if REAL DoRealDirect[Step] = YES; #endif #if spCOMPLEX DoCmplxDirect[Step] = YES; #endif return; } else if (Mode == spINDIRECT_PARTITION) { for (Step = 1; Step <= Size; Step++) #if REAL DoRealDirect[Step] = NO; #endif #if spCOMPLEX DoCmplxDirect[Step] = NO; #endif return; } else ASSERT( Mode == spAUTO_PARTITION ); /* Otherwise, count all operations needed in when factoring matrix. */ Nc = (int *)Matrix->MarkowitzRow; No = (int *)Matrix->MarkowitzCol; Nm = (int *)Matrix->MarkowitzProd; /* Start mock-factorization. */ for (Step = 1; Step <= Size; Step++) { Nc[Step] = No[Step] = Nm[Step] = 0; pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { Nc[Step]++; pElement = pElement->NextInCol; } pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; Nm[Step]++; while ((pElement = pElement->NextInCol) != NULL) No[Step]++; pColumn = pColumn->NextInCol; } } for (Step = 1; Step <= Size; Step++) { /* * The following are just estimates based on a count on the number of * machine instructions used on each machine to perform the various * tasks. It was assumed that each machine instruction required the * same amount of time (I don't believe this is true for the VAX, and * have no idea if this is true for the 68000 family). For optimum * performance, these numbers should be tuned to the machine. * Nc is the number of nonzero elements in the column. * Nm is the number of multipliers in the column. * No is the number of operations in the inner loop. */ #define generic #ifdef hp9000s300 #if REAL DoRealDirect[Step] = (Nm[Step] + No[Step] > 3*Nc[Step] - 2*Nm[Step]); #endif #if spCOMPLEX /* On the hp350, it is never profitable to use direct for complex. */ DoCmplxDirect[Step] = NO; #endif #undef generic #endif #ifdef vax #if REAL DoRealDirect[Step] = (Nm[Step] + No[Step] > 3*Nc[Step] - 2*Nm[Step]); #endif #if spCOMPLEX DoCmplxDirect[Step] = (Nm[Step] + No[Step] > 7*Nc[Step] - 4*Nm[Step]); #endif #undef generic #endif #ifdef generic #if REAL DoRealDirect[Step] = (Nm[Step] + No[Step] > 3*Nc[Step] - 2*Nm[Step]); #endif #if spCOMPLEX DoCmplxDirect[Step] = (Nm[Step] + No[Step] > 7*Nc[Step] - 4*Nm[Step]); #endif #undef generic #endif } #if (ANNOTATE == FULL) { int Ops = 0; for (Step = 1; Step <= Size; Step++) Ops += No[Step]; printf("Operation count for inner loop of factorization = %d.\n", Ops); } #endif return; } /* * CREATE INTERNAL VECTORS * * Creates the Markowitz and Intermediate vectors. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * * >>> Local variables: * SizePlusOne (unsigned) * Size of the arrays to be allocated. * * >>> Possible errors: * spNO_MEMORY */ static void CreateInternalVectors( Matrix ) MatrixPtr Matrix; { int Size; /* Begin `CreateInternalVectors'. */ /* Create Markowitz arrays. */ Size= Matrix->Size; if (Matrix->MarkowitzRow == NULL) { if (( Matrix->MarkowitzRow = ALLOC(int, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } if (Matrix->MarkowitzCol == NULL) { if (( Matrix->MarkowitzCol = ALLOC(int, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } if (Matrix->MarkowitzProd == NULL) { if (( Matrix->MarkowitzProd = ALLOC(long, Size+2)) == NULL) Matrix->Error = spNO_MEMORY; } /* Create DoDirect vectors for use in spFactor(). */ #if REAL if (Matrix->DoRealDirect == NULL) { if (( Matrix->DoRealDirect = ALLOC(BOOLEAN, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } #endif #if spCOMPLEX if (Matrix->DoCmplxDirect == NULL) { if (( Matrix->DoCmplxDirect = ALLOC(BOOLEAN, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } #endif /* Create Intermediate vectors for use in MatrixSolve. */ #if spCOMPLEX if (Matrix->Intermediate == NULL) { if ((Matrix->Intermediate = ALLOC(RealNumber,2*(Size+1))) == NULL) Matrix->Error = spNO_MEMORY; } #else if (Matrix->Intermediate == NULL) { if ((Matrix->Intermediate = ALLOC(RealNumber, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } #endif if (Matrix->Error != spNO_MEMORY) Matrix->InternalVectorsAllocated = YES; return; } /* * COUNT MARKOWITZ * * Scans Matrix to determine the Markowitz counts for each row and column. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * RHS (RealVector) * Representative right-hand side vector that is used to determine * pivoting order when the right hand side vector is sparse. If * RHS is a NULL pointer then the RHS vector is assumed to be full * and it is not used when determining the pivoting order. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * Count (int) * Temporary counting variable. * ExtRow (int) * The external row number that corresponds to I. * pElement (ElementPtr) * Pointer to matrix elements. * Size (int) * The size of the matrix. */ static void CountMarkowitz( Matrix, RHS, Step ) MatrixPtr Matrix; register RealVector RHS; int Step; { register int Count, I, Size = Matrix->Size; register ElementPtr pElement; int ExtRow; /* Begin `CountMarkowitz'. */ /* Correct array pointer for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET #if spSEPARATED_COMPLEX_VECTORS OR NOT spCOMPLEX if (RHS != NULL) --RHS; #else if (RHS != NULL) { if (Matrix->Complex) RHS -= 2; else --RHS; } #endif #endif /* Generate MarkowitzRow Count for each row. */ for (I = Step; I <= Size; I++) { /* Set Count to -1 initially to remove count due to pivot element. */ Count = -1; pElement = Matrix->FirstInRow[I]; while (pElement != NULL AND pElement->Col < Step) pElement = pElement->NextInRow; while (pElement != NULL) { Count++; pElement = pElement->NextInRow; } /* Include nonzero elements in the RHS vector. */ ExtRow = Matrix->IntToExtRowMap[I]; #if spSEPARATED_COMPLEX_VECTORS OR NOT spCOMPLEX if (RHS != NULL) if (RHS[ExtRow] != 0.0) Count++; #else if (RHS != NULL) { if (Matrix->Complex) { if ((RHS[2*ExtRow] != 0.0) OR (RHS[2*ExtRow+1] != 0.0)) Count++; } else if (RHS[I] != 0.0) Count++; } #endif Matrix->MarkowitzRow[I] = Count; } /* Generate the MarkowitzCol count for each column. */ for (I = Step; I <= Size; I++) { /* Set Count to -1 initially to remove count due to pivot element. */ Count = -1; pElement = Matrix->FirstInCol[I]; while (pElement != NULL AND pElement->Row < Step) pElement = pElement->NextInCol; while (pElement != NULL) { Count++; pElement = pElement->NextInCol; } Matrix->MarkowitzCol[I] = Count; } return; } /* * MARKOWITZ PRODUCTS * * Calculates MarkowitzProduct for each diagonal element from the Markowitz * counts. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local Variables: * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. Is used to * sequentially access entries quickly. * pMarkowitzRow (int *) * Pointer that points into MarkowitzRow array. Is used to sequentially * access entries quickly. * pMarkowitzCol (int *) * Pointer that points into MarkowitzCol array. Is used to sequentially * access entries quickly. * Product (long) * Temporary storage for Markowitz product./ * Size (int) * The size of the matrix. */ static void MarkowitzProducts( Matrix, Step ) MatrixPtr Matrix; int Step; { register int I, *pMarkowitzRow, *pMarkowitzCol; register long Product, *pMarkowitzProduct; register int Size = Matrix->Size; double fProduct; /* Begin `MarkowitzProducts'. */ Matrix->Singletons = 0; pMarkowitzProduct = &(Matrix->MarkowitzProd[Step]); pMarkowitzRow = &(Matrix->MarkowitzRow[Step]); pMarkowitzCol = &(Matrix->MarkowitzCol[Step]); for (I = Step; I <= Size; I++) { /* If chance of overflow, use real numbers. */ if ((*pMarkowitzRow > LARGEST_SHORT_INTEGER AND *pMarkowitzCol != 0) OR (*pMarkowitzCol > LARGEST_SHORT_INTEGER AND *pMarkowitzRow != 0)) { fProduct = (double)(*pMarkowitzRow++) * (double)(*pMarkowitzCol++); if (fProduct >= LARGEST_LONG_INTEGER) *pMarkowitzProduct++ = LARGEST_LONG_INTEGER; else *pMarkowitzProduct++ = fProduct; } else { Product = *pMarkowitzRow++ * *pMarkowitzCol++; if ((*pMarkowitzProduct++ = Product) == 0) Matrix->Singletons++; } } return; } /* * SEARCH FOR BEST PIVOT * * Performs a search to determine the element with the lowest Markowitz * Product that is also acceptable. An acceptable element is one that is * larger than the AbsThreshold and at least as large as RelThreshold times * the largest element in the same column. The first step is to look for * singletons if any exist. If none are found, then all the diagonals are * searched. The diagonal is searched once quickly using the assumption that * elements on the diagonal are large compared to other elements in their * column, and so the pivot can be chosen only on the basis of the Markowitz * criterion. After a element has been chosen to be pivot on the basis of * its Markowitz product, it is checked to see if it is large enough. * Waiting to the end of the Markowitz search to check the size of a pivot * candidate saves considerable time, but is not guaranteed to find an * acceptable pivot. Thus if unsuccessful a second pass of the diagonal is * made. This second pass checks to see if an element is large enough during * the search, not after it. If still no acceptable pivot candidate has * been found, the search expands to cover the entire matrix. * * >>> Returned: * A pointer to the element chosen to be pivot. If every element in the * matrix is zero, then NULL is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * The row and column number of the beginning of the reduced submatrix. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to element that has been chosen to be the pivot. * * >>> Possible errors: * spSINGULAR * spSMALL_PIVOT */ static ElementPtr SearchForPivot( Matrix, Step, DiagPivoting ) MatrixPtr Matrix; int Step, DiagPivoting; { register ElementPtr ChosenPivot; ElementPtr SearchForSingleton(); ElementPtr QuicklySearchDiagonal(); ElementPtr SearchDiagonal(); ElementPtr SearchEntireMatrix(); /* Begin `SearchForPivot'. */ /* If singletons exist, look for an acceptable one to use as pivot. */ if (Matrix->Singletons) { ChosenPivot = SearchForSingleton( Matrix, Step ); if (ChosenPivot != NULL) { Matrix->PivotSelectionMethod = 's'; return ChosenPivot; } } #if DIAGONAL_PIVOTING if (DiagPivoting) { /* * Either no singletons exist or they weren't acceptable. Take quick first * pass at searching diagonal. First search for element on diagonal of * remaining submatrix with smallest Markowitz product, then check to see * if it okay numerically. If not, QuicklySearchDiagonal fails. */ ChosenPivot = QuicklySearchDiagonal( Matrix, Step ); if (ChosenPivot != NULL) { Matrix->PivotSelectionMethod = 'q'; return ChosenPivot; } /* * Quick search of diagonal failed, carefully search diagonal and check each * pivot candidate numerically before even tentatively accepting it. */ ChosenPivot = SearchDiagonal( Matrix, Step ); if (ChosenPivot != NULL) { Matrix->PivotSelectionMethod = 'd'; return ChosenPivot; } } #endif /* DIAGONAL_PIVOTING */ /* No acceptable pivot found yet, search entire matrix. */ ChosenPivot = SearchEntireMatrix( Matrix, Step ); Matrix->PivotSelectionMethod = 'e'; return ChosenPivot; } /* * SEARCH FOR SINGLETON TO USE AS PIVOT * * Performs a search to find a singleton to use as the pivot. The * first acceptable singleton is used. A singleton is acceptable if * it is larger in magnitude than the AbsThreshold and larger * than RelThreshold times the largest of any other elements in the same * column. It may seem that a singleton need not satisfy the * relative threshold criterion, however it is necessary to prevent * excessive growth in the RHS from resulting in overflow during the * forward and backward substitution. A singleton does not need to * be on the diagonal to be selected. * * >>> Returned: * A pointer to the singleton chosen to be pivot. In no singleton is * acceptable, return NULL. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to element that has been chosen to be the pivot. * PivotMag (RealNumber) * Magnitude of ChosenPivot. * Singletons (int) * The count of the number of singletons that can be used as pivots. * A local version of Matrix->Singletons. * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. */ static ElementPtr SearchForSingleton( Matrix, Step ) MatrixPtr Matrix; int Step; { register ElementPtr ChosenPivot; register int I; register long *pMarkowitzProduct; int Singletons; RealNumber PivotMag, FindBiggestInColExclude(); /* Begin `SearchForSingleton'. */ /* Initialize pointer that is to scan through MarkowitzProduct vector. */ pMarkowitzProduct = &(Matrix->MarkowitzProd[Matrix->Size+1]); Matrix->MarkowitzProd[Matrix->Size+1] = Matrix->MarkowitzProd[Step]; /* Decrement the count of available singletons, on the assumption that an * acceptable one will be found. */ Singletons = Matrix->Singletons--; /* * Assure that following while loop will always terminate, this is just * preventive medicine, if things are working right this should never * be needed. */ Matrix->MarkowitzProd[Step-1] = 0; while (Singletons-- > 0) { /* Singletons exist, find them. */ /* * This is tricky. Am using a pointer to sequentially step through the * MarkowitzProduct array. Search terminates when singleton (Product = 0) * is found. Note that the conditional in the while statement * ( *pMarkowitzProduct ) is true as long as the MarkowitzProduct is not * equal to zero. The row (and column) index on the diagonal is then * calculated by subtracting the pointer to the Markowitz product of * the first diagonal from the pointer to the Markowitz product of the * desired element, the singleton. * * Search proceeds from the end (high row and column numbers) to the * beginning (low row and column numbers) so that rows and columns with * large Markowitz products will tend to be move to the bottom of the * matrix. However, choosing Diag[Step] is desirable because it would * require no row and column interchanges, so inspect it first by * putting its Markowitz product at the end of the MarkowitzProd * vector. */ while ( *pMarkowitzProduct-- ) { /* * N bottles of beer on the wall; * N bottles of beer. * you take one down and pass it around; * N-1 bottles of beer on the wall. */ } I = pMarkowitzProduct - Matrix->MarkowitzProd + 1; /* Assure that I is valid. */ if (I < Step) break; /* while (Singletons-- > 0) */ if (I > Matrix->Size) I = Step; /* Singleton has been found in either/both row or/and column I. */ if ((ChosenPivot = Matrix->Diag[I]) != NULL) { /* Singleton lies on the diagonal. */ PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold AND PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; } else { /* Singleton does not lie on diagonal, find it. */ if (Matrix->MarkowitzCol[I] == 0) { ChosenPivot = Matrix->FirstInCol[I]; while ((ChosenPivot != NULL) AND (ChosenPivot->Row < Step)) ChosenPivot = ChosenPivot->NextInCol; PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold AND PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; else { if (Matrix->MarkowitzRow[I] == 0) { ChosenPivot = Matrix->FirstInRow[I]; while((ChosenPivot != NULL) AND (ChosenPivot->ColNextInRow; PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold AND PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; } } } else { ChosenPivot = Matrix->FirstInRow[I]; while ((ChosenPivot != NULL) AND (ChosenPivot->Col < Step)) ChosenPivot = ChosenPivot->NextInRow; PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold AND PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; } } /* Singleton not acceptable (too small), try another. */ } /* end of while(lSingletons>0) */ /* * All singletons were unacceptable. Restore Matrix->Singletons count. * Initial assumption that an acceptable singleton would be found was wrong. */ Matrix->Singletons++; return NULL; } #if DIAGONAL_PIVOTING #if MODIFIED_MARKOWITZ /* * QUICK SEARCH OF DIAGONAL FOR PIVOT WITH MODIFIED MARKOWITZ CRITERION * * Searches the diagonal looking for the best pivot. For a pivot to be * acceptable it must be larger than the pivot RelThreshold times the largest * element in its reduced column. Among the acceptable diagonals, the * one with the smallest MarkowitzProduct is sought. Search terminates * early if a diagonal is found with a MarkowitzProduct of one and its * magnitude is larger than the other elements in its row and column. * Since its MarkowitzProduct is one, there is only one other element in * both its row and column, and, as a condition for early termination, * these elements must be located symmetricly in the matrix. If a tie * occurs between elements of equal MarkowitzProduct, then the element with * the largest ratio between its magnitude and the largest element in its * column is used. The search will be terminated after a given number of * ties have occurred and the best (largest ratio) of the tied element will * be used as the pivot. The number of ties that will trigger an early * termination is MinMarkowitzProduct * TIES_MULTIPLIER. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no diagonal is * acceptable, a NULL is returned. * * >>> Arguments: * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * LargestOffDiagonal (RealNumber) * Magnitude of the largest of the off-diagonal terms associated with * a diagonal with MarkowitzProduct equal to one. * Magnitude (RealNumber) * Absolute value of diagonal element. * MaxRatio (RealNumber) * Among the elements tied with the smallest Markowitz product, MaxRatio * is the best (smallest) ratio of LargestInCol to the diagonal Magnitude * found so far. The smaller the ratio, the better numerically the * element will be as pivot. * MinMarkowitzProduct (long) * Smallest Markowitz product found of pivot candidates that lie along * diagonal. * NumberOfTies (int) * A count of the number of Markowitz ties that have occurred at current * MarkowitzProduct. * pDiag (ElementPtr) * Pointer to current diagonal element. * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. * Ratio (RealNumber) * For the current pivot candidate, Ratio is the ratio of the largest * element in its column (excluding itself) to its magnitude. * TiedElements (ElementPtr[]) * Array of pointers to the elements with the minimum Markowitz * product. * pOtherInCol (ElementPtr) * When there is only one other element in a column other than the * diagonal, pOtherInCol is used to point to it. Used when Markowitz * product is to determine if off diagonals are placed symmetricly. * pOtherInRow (ElementPtr) * When there is only one other element in a row other than the diagonal, * pOtherInRow is used to point to it. Used when Markowitz product is * to determine if off diagonals are placed symmetricly. */ static ElementPtr QuicklySearchDiagonal( Matrix, Step ) MatrixPtr Matrix; int Step; { register long MinMarkowitzProduct, *pMarkowitzProduct; register ElementPtr pDiag, pOtherInRow, pOtherInCol; int I, NumberOfTies; ElementPtr ChosenPivot, TiedElements[MAX_MARKOWITZ_TIES + 1]; RealNumber Magnitude, LargestInCol, Ratio, MaxRatio; RealNumber LargestOffDiagonal; RealNumber FindBiggestInColExclude(); /* Begin `QuicklySearchDiagonal'. */ NumberOfTies = -1; MinMarkowitzProduct = LARGEST_LONG_INTEGER; pMarkowitzProduct = &(Matrix->MarkowitzProd[Matrix->Size+2]); Matrix->MarkowitzProd[Matrix->Size+1] = Matrix->MarkowitzProd[Step]; /* Assure that following while loop will always terminate. */ Matrix->MarkowitzProd[Step-1] = -1; /* * This is tricky. Am using a pointer in the inner while loop to * sequentially step through the MarkowitzProduct array. Search * terminates when the Markowitz product of zero placed at location * Step-1 is found. The row (and column) index on the diagonal is then * calculated by subtracting the pointer to the Markowitz product of * the first diagonal from the pointer to the Markowitz product of the * desired element. The outer for loop is infinite, broken by using * break. * * Search proceeds from the end (high row and column numbers) to the * beginning (low row and column numbers) so that rows and columns with * large Markowitz products will tend to be move to the bottom of the * matrix. However, choosing Diag[Step] is desirable because it would * require no row and column interchanges, so inspect it first by * putting its Markowitz product at the end of the MarkowitzProd * vector. */ for(;;) /* Endless for loop. */ { while (MinMarkowitzProduct < *(--pMarkowitzProduct)) { /* * N bottles of beer on the wall; * N bottles of beer. * You take one down and pass it around; * N-1 bottles of beer on the wall. */ } I = pMarkowitzProduct - Matrix->MarkowitzProd; /* Assure that I is valid; if I < Step, terminate search. */ if (I < Step) break; /* Endless for loop */ if (I > Matrix->Size) I = Step; if ((pDiag = Matrix->Diag[I]) == NULL) continue; /* Endless for loop */ if ((Magnitude = ELEMENT_MAG(pDiag)) <= Matrix->AbsThreshold) continue; /* Endless for loop */ if (*pMarkowitzProduct == 1) { /* Case where only one element exists in row and column other than diagonal. */ /* Find off diagonal elements. */ pOtherInRow = pDiag->NextInRow; pOtherInCol = pDiag->NextInCol; if (pOtherInRow == NULL AND pOtherInCol == NULL) { pOtherInRow = Matrix->FirstInRow[I]; while(pOtherInRow != NULL) { if (pOtherInRow->Col >= Step AND pOtherInRow->Col != I) break; pOtherInRow = pOtherInRow->NextInRow; } pOtherInCol = Matrix->FirstInCol[I]; while(pOtherInCol != NULL) { if (pOtherInCol->Row >= Step AND pOtherInCol->Row != I) break; pOtherInCol = pOtherInCol->NextInCol; } } /* Accept diagonal as pivot if diagonal is larger than off diagonals and the * off diagonals are placed symmetricly. */ if (pOtherInRow != NULL AND pOtherInCol != NULL) { if (pOtherInRow->Col == pOtherInCol->Row) { LargestOffDiagonal = MAX(ELEMENT_MAG(pOtherInRow), ELEMENT_MAG(pOtherInCol)); if (Magnitude >= LargestOffDiagonal) { /* Accept pivot, it is unlikely to contribute excess error. */ return pDiag; } } } } if (*pMarkowitzProduct < MinMarkowitzProduct) { /* Notice strict inequality in test. This is a new smallest MarkowitzProduct. */ TiedElements[0] = pDiag; MinMarkowitzProduct = *pMarkowitzProduct; NumberOfTies = 0; } else { /* This case handles Markowitz ties. */ if (NumberOfTies < MAX_MARKOWITZ_TIES) { TiedElements[++NumberOfTies] = pDiag; if (NumberOfTies >= MinMarkowitzProduct * TIES_MULTIPLIER) break; /* Endless for loop */ } } } /* End of endless for loop. */ /* Test to see if any element was chosen as a pivot candidate. */ if (NumberOfTies < 0) return NULL; /* Determine which of tied elements is best numerically. */ ChosenPivot = NULL; MaxRatio = 1.0 / Matrix->RelThreshold; for (I = 0; I <= NumberOfTies; I++) { pDiag = TiedElements[I]; Magnitude = ELEMENT_MAG(pDiag); LargestInCol = FindBiggestInColExclude( Matrix, pDiag, Step ); Ratio = LargestInCol / Magnitude; if (Ratio < MaxRatio) { ChosenPivot = pDiag; MaxRatio = Ratio; } } return ChosenPivot; } #else /* Not MODIFIED_MARKOWITZ */ /* * QUICK SEARCH OF DIAGONAL FOR PIVOT WITH CONVENTIONAL MARKOWITZ * CRITERION * * Searches the diagonal looking for the best pivot. For a pivot to be * acceptable it must be larger than the pivot RelThreshold times the largest * element in its reduced column. Among the acceptable diagonals, the * one with the smallest MarkowitzProduct is sought. Search terminates * early if a diagonal is found with a MarkowitzProduct of one and its * magnitude is larger than the other elements in its row and column. * Since its MarkowitzProduct is one, there is only one other element in * both its row and column, and, as a condition for early termination, * these elements must be located symmetricly in the matrix. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no diagonal is * acceptable, a NULL is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * LargestOffDiagonal (RealNumber) * Magnitude of the largest of the off-diagonal terms associated with * a diagonal with MarkowitzProduct equal to one. * Magnitude (RealNumber) * Absolute value of diagonal element. * MinMarkowitzProduct (long) * Smallest Markowitz product found of pivot candidates which are * acceptable. * pDiag (ElementPtr) * Pointer to current diagonal element. * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. * pOtherInCol (ElementPtr) * When there is only one other element in a column other than the * diagonal, pOtherInCol is used to point to it. Used when Markowitz * product is to determine if off diagonals are placed symmetricly. * pOtherInRow (ElementPtr) * When there is only one other element in a row other than the diagonal, * pOtherInRow is used to point to it. Used when Markowitz product is * to determine if off diagonals are placed symmetricly. */ static ElementPtr QuicklySearchDiagonal( Matrix, Step ) MatrixPtr Matrix; int Step; { register long MinMarkowitzProduct, *pMarkowitzProduct; register ElementPtr pDiag; int I; ElementPtr ChosenPivot, pOtherInRow, pOtherInCol; RealNumber Magnitude, LargestInCol, LargestOffDiagonal; RealNumber FindBiggestInColExclude(); /* Begin `QuicklySearchDiagonal'. */ ChosenPivot = NULL; MinMarkowitzProduct = LARGEST_LONG_INTEGER; pMarkowitzProduct = &(Matrix->MarkowitzProd[Matrix->Size+2]); Matrix->MarkowitzProd[Matrix->Size+1] = Matrix->MarkowitzProd[Step]; /* Assure that following while loop will always terminate. */ Matrix->MarkowitzProd[Step-1] = -1; /* * This is tricky. Am using a pointer in the inner while loop to * sequentially step through the MarkowitzProduct array. Search * terminates when the Markowitz product of zero placed at location * Step-1 is found. The row (and column) index on the diagonal is then * calculated by subtracting the pointer to the Markowitz product of * the first diagonal from the pointer to the Markowitz product of the * desired element. The outer for loop is infinite, broken by using * break. * * Search proceeds from the end (high row and column numbers) to the * beginning (low row and column numbers) so that rows and columns with * large Markowitz products will tend to be move to the bottom of the * matrix. However, choosing Diag[Step] is desirable because it would * require no row and column interchanges, so inspect it first by * putting its Markowitz product at the end of the MarkowitzProd * vector. */ for (;;) /* Endless for loop. */ { while (*(--pMarkowitzProduct) >= MinMarkowitzProduct) { /* Just passing through. */ } I = pMarkowitzProduct - Matrix->MarkowitzProd; /* Assure that I is valid; if I < Step, terminate search. */ if (I < Step) break; /* Endless for loop */ if (I > Matrix->Size) I = Step; if ((pDiag = Matrix->Diag[I]) == NULL) continue; /* Endless for loop */ if ((Magnitude = ELEMENT_MAG(pDiag)) <= Matrix->AbsThreshold) continue; /* Endless for loop */ if (*pMarkowitzProduct == 1) { /* Case where only one element exists in row and column other than diagonal. */ /* Find off-diagonal elements. */ pOtherInRow = pDiag->NextInRow; pOtherInCol = pDiag->NextInCol; if (pOtherInRow == NULL AND pOtherInCol == NULL) { pOtherInRow = Matrix->FirstInRow[I]; while(pOtherInRow != NULL) { if (pOtherInRow->Col >= Step AND pOtherInRow->Col != I) break; pOtherInRow = pOtherInRow->NextInRow; } pOtherInCol = Matrix->FirstInCol[I]; while(pOtherInCol != NULL) { if (pOtherInCol->Row >= Step AND pOtherInCol->Row != I) break; pOtherInCol = pOtherInCol->NextInCol; } } /* Accept diagonal as pivot if diagonal is larger than off-diagonals and the * off-diagonals are placed symmetricly. */ if (pOtherInRow != NULL AND pOtherInCol != NULL) { if (pOtherInRow->Col == pOtherInCol->Row) { LargestOffDiagonal = MAX(ELEMENT_MAG(pOtherInRow), ELEMENT_MAG(pOtherInCol)); if (Magnitude >= LargestOffDiagonal) { /* Accept pivot, it is unlikely to contribute excess error. */ return pDiag; } } } } MinMarkowitzProduct = *pMarkowitzProduct; ChosenPivot = pDiag; } /* End of endless for loop. */ if (ChosenPivot != NULL) { LargestInCol = FindBiggestInColExclude( Matrix, ChosenPivot, Step ); if( ELEMENT_MAG(ChosenPivot) <= Matrix->RelThreshold * LargestInCol ) ChosenPivot = NULL; } return ChosenPivot; } #endif /* Not MODIFIED_MARKOWITZ */ /* * SEARCH DIAGONAL FOR PIVOT WITH MODIFIED MARKOWITZ CRITERION * * Searches the diagonal looking for the best pivot. For a pivot to be * acceptable it must be larger than the pivot RelThreshold times the largest * element in its reduced column. Among the acceptable diagonals, the * one with the smallest MarkowitzProduct is sought. If a tie occurs * between elements of equal MarkowitzProduct, then the element with * the largest ratio between its magnitude and the largest element in its * column is used. The search will be terminated after a given number of * ties have occurred and the best (smallest ratio) of the tied element will * be used as the pivot. The number of ties that will trigger an early * termination is MinMarkowitzProduct * TIES_MULTIPLIER. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no diagonal is * acceptable, a NULL is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * Size (int) * Local version of size which is placed in a register to increase speed. * Magnitude (RealNumber) * Absolute value of diagonal element. * MinMarkowitzProduct (long) * Smallest Markowitz product found of those pivot candidates which are * acceptable. * NumberOfTies (int) * A count of the number of Markowitz ties that have occurred at current * MarkowitzProduct. * pDiag (ElementPtr) * Pointer to current diagonal element. * pMarkowitzProduct (long*) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. * Ratio (RealNumber) * For the current pivot candidate, Ratio is the * Ratio of the largest element in its column to its magnitude. * RatioOfAccepted (RealNumber) * For the best pivot candidate found so far, RatioOfAccepted is the * Ratio of the largest element in its column to its magnitude. */ static ElementPtr SearchDiagonal( Matrix, Step ) MatrixPtr Matrix; register int Step; { register int J; register long MinMarkowitzProduct, *pMarkowitzProduct; register int I; register ElementPtr pDiag; int NumberOfTies=0, Size = Matrix->Size; ElementPtr ChosenPivot; RealNumber Magnitude, Ratio, RatioOfAccepted=0.0, LargestInCol; RealNumber FindBiggestInColExclude(); /* Begin `SearchDiagonal'. */ ChosenPivot = NULL; MinMarkowitzProduct = LARGEST_LONG_INTEGER; pMarkowitzProduct = &(Matrix->MarkowitzProd[Size+2]); Matrix->MarkowitzProd[Size+1] = Matrix->MarkowitzProd[Step]; /* Start search of diagonal. */ for (J = Size+1; J > Step; J--) { if (*(--pMarkowitzProduct) > MinMarkowitzProduct) continue; /* for loop */ if (J > Matrix->Size) I = Step; else I = J; if ((pDiag = Matrix->Diag[I]) == NULL) continue; /* for loop */ if ((Magnitude = ELEMENT_MAG(pDiag)) <= Matrix->AbsThreshold) continue; /* for loop */ /* Test to see if diagonal's magnitude is acceptable. */ LargestInCol = FindBiggestInColExclude( Matrix, pDiag, Step ); if (Magnitude <= Matrix->RelThreshold * LargestInCol) continue; /* for loop */ if (*pMarkowitzProduct < MinMarkowitzProduct) { /* Notice strict inequality in test. This is a new smallest MarkowitzProduct. */ ChosenPivot = pDiag; MinMarkowitzProduct = *pMarkowitzProduct; RatioOfAccepted = LargestInCol / Magnitude; NumberOfTies = 0; } else { /* This case handles Markowitz ties. */ NumberOfTies++; Ratio = LargestInCol / Magnitude; if (Ratio < RatioOfAccepted) { ChosenPivot = pDiag; RatioOfAccepted = Ratio; } if (NumberOfTies >= MinMarkowitzProduct * TIES_MULTIPLIER) return ChosenPivot; } } /* End of for(Step) */ return ChosenPivot; } #endif /* DIAGONAL_PIVOTING */ /* * SEARCH ENTIRE MATRIX FOR BEST PIVOT * * Performs a search over the entire matrix looking for the acceptable * element with the lowest MarkowitzProduct. If there are several that * are tied for the smallest MarkowitzProduct, the tie is broken by using * the ratio of the magnitude of the element being considered to the largest * element in the same column. If no element is acceptable then the largest * element in the reduced submatrix is used as the pivot and the * matrix is declared to be spSMALL_PIVOT. If the largest element is * zero, the matrix is declared to be spSINGULAR. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no element is * found, then NULL is returned and the matrix is spSINGULAR. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * LargestElementMag (RealNumber) * Magnitude of the largest element yet found in the reduced submatrix. * Size (int) * Local version of Size; placed in a register for speed. * Magnitude (RealNumber) * Absolute value of diagonal element. * MinMarkowitzProduct (long) * Smallest Markowitz product found of pivot candidates which are * acceptable. * NumberOfTies (int) * A count of the number of Markowitz ties that have occurred at current * MarkowitzProduct. * pElement (ElementPtr) * Pointer to current element. * pLargestElement (ElementPtr) * Pointer to the largest element yet found in the reduced submatrix. * Product (long) * Markowitz product for the current row and column. * Ratio (RealNumber) * For the current pivot candidate, Ratio is the * Ratio of the largest element in its column to its magnitude. * RatioOfAccepted (RealNumber) * For the best pivot candidate found so far, RatioOfAccepted is the * Ratio of the largest element in its column to its magnitude. * * >>> Possible errors: * spSINGULAR * spSMALL_PIVOT */ static ElementPtr SearchEntireMatrix( Matrix, Step ) MatrixPtr Matrix; int Step; { register int I, Size = Matrix->Size; register ElementPtr pElement; int NumberOfTies=0; long Product, MinMarkowitzProduct; ElementPtr ChosenPivot, pLargestElement=0; RealNumber Magnitude, LargestElementMag, Ratio, RatioOfAccepted=0.0, LargestInCol; RealNumber FindLargestInCol(); /* Begin `SearchEntireMatrix'. */ ChosenPivot = NULL; LargestElementMag = 0.0; MinMarkowitzProduct = LARGEST_LONG_INTEGER; /* Start search of matrix on column by column basis. */ for (I = Step; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL AND pElement->Row < Step) pElement = pElement->NextInCol; if((LargestInCol = FindLargestInCol(pElement)) == 0.0) continue; /* for loop */ while (pElement != NULL) { /* Check to see if element is the largest encountered so far. If so, record its magnitude and address. */ if ((Magnitude = ELEMENT_MAG(pElement)) > LargestElementMag) { LargestElementMag = Magnitude; pLargestElement = pElement; } /* Calculate element's MarkowitzProduct. */ Product = Matrix->MarkowitzRow[pElement->Row] * Matrix->MarkowitzCol[pElement->Col]; /* Test to see if element is acceptable as a pivot candidate. */ if ((Product <= MinMarkowitzProduct) AND (Magnitude > Matrix->RelThreshold * LargestInCol) AND (Magnitude > Matrix->AbsThreshold)) { /* Test to see if element has lowest MarkowitzProduct yet found, or whether it is tied with an element found earlier. */ if (Product < MinMarkowitzProduct) { /* Notice strict inequality in test. This is a new smallest MarkowitzProduct. */ ChosenPivot = pElement; MinMarkowitzProduct = Product; RatioOfAccepted = LargestInCol / Magnitude; NumberOfTies = 0; } else { /* This case handles Markowitz ties. */ NumberOfTies++; Ratio = LargestInCol / Magnitude; if (Ratio < RatioOfAccepted) { ChosenPivot = pElement; RatioOfAccepted = Ratio; } if (NumberOfTies >= MinMarkowitzProduct * TIES_MULTIPLIER) return ChosenPivot; } } pElement = pElement->NextInCol; } /* End of while(pElement != NULL) */ } /* End of for(Step) */ if (ChosenPivot != NULL) return ChosenPivot; if (LargestElementMag == 0.0) { Matrix->Error = spSINGULAR; return NULL; } Matrix->Error = spSMALL_PIVOT; return pLargestElement; } /* * DETERMINE THE MAGNITUDE OF THE LARGEST ELEMENT IN A COLUMN * * This routine searches a column and returns the magnitude of the largest * element. This routine begins the search at the element pointed to by * pElement, the parameter. * * The search is conducted by starting at the element specified by a pointer, * which should be one below the diagonal, and moving down the column. On * the way down the column, the magnitudes of the elements are tested to see * if they are the largest yet found. * * >>> Returned: * The magnitude of the largest element in the column below and including * the one pointed to by the input parameter. * * >>> Arguments: * pElement (ElementPtr) * The pointer to the first element to be tested. Also, used by the * routine to access all lower elements in the column. * * >>> Local variables: * Largest (RealNumber) * The magnitude of the largest element. * Magnitude (RealNumber) * The magnitude of the currently active element. */ static RealNumber FindLargestInCol( pElement ) register ElementPtr pElement; { RealNumber Magnitude, Largest = 0.0; /* Begin `FindLargestInCol'. */ /* Search column for largest element beginning at Element. */ while (pElement != NULL) { if ((Magnitude = ELEMENT_MAG(pElement)) > Largest) Largest = Magnitude; pElement = pElement->NextInCol; } return Largest; } /* * DETERMINE THE MAGNITUDE OF THE LARGEST ELEMENT IN A COLUMN * EXCLUDING AN ELEMENT * * This routine searches a column and returns the magnitude of the largest * element. One given element is specifically excluded from the search. * * The search is conducted by starting at the first element in the column * and moving down the column until the active part of the matrix is entered, * i.e. the reduced submatrix. The rest of the column is then traversed * looking for the largest element. * * >>> Returned: * The magnitude of the largest element in the active portion of the column, * excluding the specified element, is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * pElement (ElementPtr) * The pointer to the element that is to be excluded from search. Column * to be searched is one that contains this element. Also used to * access the elements in the column. * Step (int) * Index of the diagonal currently being eliminated. Indicates where * the active part of the matrix begins. * * >>> Local variables: * Col (int) * The number of the column to be searched. Also the column number of * the element to be avoided in the search. * Largest (RealNumber) * The magnitude of the largest element. * Magnitude (RealNumber) * The magnitude of the currently active element. * Row (int) * The row number of element to be excluded from the search. */ static RealNumber FindBiggestInColExclude( Matrix, pElement, Step ) MatrixPtr Matrix; register ElementPtr pElement; register int Step; { register int Row; int Col; RealNumber Largest, Magnitude; /* Begin `FindBiggestInColExclude'. */ Row = pElement->Row; Col = pElement->Col; pElement = Matrix->FirstInCol[Col]; /* Travel down column until reduced submatrix is entered. */ while ((pElement != NULL) AND (pElement->Row < Step)) pElement = pElement->NextInCol; /* Initialize the variable Largest. */ if (pElement->Row != Row) Largest = ELEMENT_MAG(pElement); else Largest = 0.0; /* Search rest of column for largest element, avoiding excluded element. */ while ((pElement = pElement->NextInCol) != NULL) { if ((Magnitude = ELEMENT_MAG(pElement)) > Largest) { if (pElement->Row != Row) Largest = Magnitude; } } return Largest; } /* * EXCHANGE ROWS AND COLUMNS * * Exchanges two rows and two columns so that the selected pivot is moved to * the upper left corner of the remaining submatrix. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * Col (int) * Column where the pivot was found. * Row (int) * Row where the pivot was found. * OldMarkowitzProd_Col (long) * Markowitz product associated with the diagonal element in the row * the pivot was found in. * OldMarkowitzProd_Row (long) * Markowitz product associated with the diagonal element in the column * the pivot was found in. * OldMarkowitzProd_Step (long) * Markowitz product associated with the diagonal element that is being * moved so that the pivot can be placed in the upper left-hand corner * of the reduced submatrix. */ extern void spcRowExchange(); extern void spcColExchange(); static void ExchangeRowsAndCols( Matrix, pPivot, Step ) MatrixPtr Matrix; ElementPtr pPivot; register int Step; { register int Row, Col; long OldMarkowitzProd_Step, OldMarkowitzProd_Row, OldMarkowitzProd_Col; ElementPtr spcFindElementInCol(); /* Begin `ExchangeRowsAndCols'. */ Row = pPivot->Row; Col = pPivot->Col; Matrix->PivotsOriginalRow = Row; Matrix->PivotsOriginalCol = Col; if ((Row == Step) AND (Col == Step)) return; /* Exchange rows and columns. */ if (Row == Col) { spcRowExchange( Matrix, Step, Row ); spcColExchange( Matrix, Step, Col ); SWAP( long, Matrix->MarkowitzProd[Step], Matrix->MarkowitzProd[Row] ); SWAP( ElementPtr, Matrix->Diag[Row], Matrix->Diag[Step] ); } else { /* Initialize variables that hold old Markowitz products. */ OldMarkowitzProd_Step = Matrix->MarkowitzProd[Step]; OldMarkowitzProd_Row = Matrix->MarkowitzProd[Row]; OldMarkowitzProd_Col = Matrix->MarkowitzProd[Col]; /* Exchange rows. */ if (Row != Step) { spcRowExchange( Matrix, Step, Row ); Matrix->NumberOfInterchangesIsOdd = NOT Matrix->NumberOfInterchangesIsOdd; Matrix->MarkowitzProd[Row] = Matrix->MarkowitzRow[Row] * Matrix->MarkowitzCol[Row]; /* Update singleton count. */ if ((Matrix->MarkowitzProd[Row]==0) != (OldMarkowitzProd_Row==0)) { if (OldMarkowitzProd_Row == 0) Matrix->Singletons--; else Matrix->Singletons++; } } /* Exchange columns. */ if (Col != Step) { spcColExchange( Matrix, Step, Col ); Matrix->NumberOfInterchangesIsOdd = NOT Matrix->NumberOfInterchangesIsOdd; Matrix->MarkowitzProd[Col] = Matrix->MarkowitzCol[Col] * Matrix->MarkowitzRow[Col]; /* Update singleton count. */ if ((Matrix->MarkowitzProd[Col]==0) != (OldMarkowitzProd_Col==0)) { if (OldMarkowitzProd_Col == 0) Matrix->Singletons--; else Matrix->Singletons++; } Matrix->Diag[Col] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Col, Col, Col, NO ); } if (Row != Step) { Matrix->Diag[Row] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Row, Row, Row, NO ); } Matrix->Diag[Step] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Step, Step, Step, NO ); /* Update singleton count. */ Matrix->MarkowitzProd[Step] = Matrix->MarkowitzCol[Step] * Matrix->MarkowitzRow[Step]; if ((Matrix->MarkowitzProd[Step]==0) != (OldMarkowitzProd_Step==0)) { if (OldMarkowitzProd_Step == 0) Matrix->Singletons--; else Matrix->Singletons++; } } return; } /* * EXCHANGE ROWS * * Performs all required operations to exchange two rows. Those operations * include: swap FirstInRow pointers, fixing up the NextInCol pointers, * swapping row indexes in MatrixElements, and swapping Markowitz row * counts. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Row1 (int) * Row index of one of the rows, becomes the smallest index. * Row2 (int) * Row index of the other row, becomes the largest index. * * Local variables: * Column (int) * Column in which row elements are currently being exchanged. * Row1Ptr (ElementPtr) * Pointer to an element in Row1. * Row2Ptr (ElementPtr) * Pointer to an element in Row2. * Element1 (ElementPtr) * Pointer to the element in Row1 to be exchanged. * Element2 (ElementPtr) * Pointer to the element in Row2 to be exchanged. */ void spcRowExchange( Matrix, Row1, Row2 ) MatrixPtr Matrix; int Row1, Row2; { register ElementPtr Row1Ptr, Row2Ptr; int Column; ElementPtr Element1, Element2; /* Begin `spcRowExchange'. */ if (Row1 > Row2) SWAP(int, Row1, Row2); Row1Ptr = Matrix->FirstInRow[Row1]; Row2Ptr = Matrix->FirstInRow[Row2]; while (Row1Ptr != NULL OR Row2Ptr != NULL) { /* Exchange elements in rows while traveling from left to right. */ if (Row1Ptr == NULL) { Column = Row2Ptr->Col; Element1 = NULL; Element2 = Row2Ptr; Row2Ptr = Row2Ptr->NextInRow; } else if (Row2Ptr == NULL) { Column = Row1Ptr->Col; Element1 = Row1Ptr; Element2 = NULL; Row1Ptr = Row1Ptr->NextInRow; } else if (Row1Ptr->Col < Row2Ptr->Col) { Column = Row1Ptr->Col; Element1 = Row1Ptr; Element2 = NULL; Row1Ptr = Row1Ptr->NextInRow; } else if (Row1Ptr->Col > Row2Ptr->Col) { Column = Row2Ptr->Col; Element1 = NULL; Element2 = Row2Ptr; Row2Ptr = Row2Ptr->NextInRow; } else /* Row1Ptr->Col == Row2Ptr->Col */ { Column = Row1Ptr->Col; Element1 = Row1Ptr; Element2 = Row2Ptr; Row1Ptr = Row1Ptr->NextInRow; Row2Ptr = Row2Ptr->NextInRow; } ExchangeColElements( Matrix, Row1, Element1, Row2, Element2, Column); } /* end of while(Row1Ptr != NULL OR Row2Ptr != NULL) */ if (Matrix->InternalVectorsAllocated) SWAP( int, Matrix->MarkowitzRow[Row1], Matrix->MarkowitzRow[Row2]); SWAP( ElementPtr, Matrix->FirstInRow[Row1], Matrix->FirstInRow[Row2]); SWAP( int, Matrix->IntToExtRowMap[Row1], Matrix->IntToExtRowMap[Row2]); #if TRANSLATE Matrix->ExtToIntRowMap[ Matrix->IntToExtRowMap[Row1] ] = Row1; Matrix->ExtToIntRowMap[ Matrix->IntToExtRowMap[Row2] ] = Row2; #endif return; } /* * EXCHANGE COLUMNS * * Performs all required operations to exchange two columns. Those operations * include: swap FirstInCol pointers, fixing up the NextInRow pointers, * swapping column indexes in MatrixElements, and swapping Markowitz * column counts. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Col1 (int) * Column index of one of the columns, becomes the smallest index. * Col2 (int) * Column index of the other column, becomes the largest index * * Local variables: * Row (int) * Row in which column elements are currently being exchanged. * Col1Ptr (ElementPtr) * Pointer to an element in Col1. * Col2Ptr (ElementPtr) * Pointer to an element in Col2. * Element1 (ElementPtr) * Pointer to the element in Col1 to be exchanged. * Element2 (ElementPtr) * Pointer to the element in Col2 to be exchanged. */ void spcColExchange( Matrix, Col1, Col2 ) MatrixPtr Matrix; int Col1, Col2; { register ElementPtr Col1Ptr, Col2Ptr; int Row; ElementPtr Element1, Element2; /* Begin `spcColExchange'. */ if (Col1 > Col2) SWAP(int, Col1, Col2); Col1Ptr = Matrix->FirstInCol[Col1]; Col2Ptr = Matrix->FirstInCol[Col2]; while (Col1Ptr != NULL OR Col2Ptr != NULL) { /* Exchange elements in rows while traveling from top to bottom. */ if (Col1Ptr == NULL) { Row = Col2Ptr->Row; Element1 = NULL; Element2 = Col2Ptr; Col2Ptr = Col2Ptr->NextInCol; } else if (Col2Ptr == NULL) { Row = Col1Ptr->Row; Element1 = Col1Ptr; Element2 = NULL; Col1Ptr = Col1Ptr->NextInCol; } else if (Col1Ptr->Row < Col2Ptr->Row) { Row = Col1Ptr->Row; Element1 = Col1Ptr; Element2 = NULL; Col1Ptr = Col1Ptr->NextInCol; } else if (Col1Ptr->Row > Col2Ptr->Row) { Row = Col2Ptr->Row; Element1 = NULL; Element2 = Col2Ptr; Col2Ptr = Col2Ptr->NextInCol; } else /* Col1Ptr->Row == Col2Ptr->Row */ { Row = Col1Ptr->Row; Element1 = Col1Ptr; Element2 = Col2Ptr; Col1Ptr = Col1Ptr->NextInCol; Col2Ptr = Col2Ptr->NextInCol; } ExchangeRowElements( Matrix, Col1, Element1, Col2, Element2, Row); } /* end of while(Col1Ptr != NULL OR Col2Ptr != NULL) */ if (Matrix->InternalVectorsAllocated) SWAP( int, Matrix->MarkowitzCol[Col1], Matrix->MarkowitzCol[Col2]); SWAP( ElementPtr, Matrix->FirstInCol[Col1], Matrix->FirstInCol[Col2]); SWAP( int, Matrix->IntToExtColMap[Col1], Matrix->IntToExtColMap[Col2]); #if TRANSLATE Matrix->ExtToIntColMap[ Matrix->IntToExtColMap[Col1] ] = Col1; Matrix->ExtToIntColMap[ Matrix->IntToExtColMap[Col2] ] = Col2; #endif return; } /* * EXCHANGE TWO ELEMENTS IN A COLUMN * * Performs all required operations to exchange two elements in a column. * Those operations are: restring NextInCol pointers and swapping row indexes * in the MatrixElements. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Row1 (int) * Row of top element to be exchanged. * Element1 (ElementPtr) * Pointer to top element to be exchanged. * Row2 (int) * Row of bottom element to be exchanged. * Element2 (ElementPtr) * Pointer to bottom element to be exchanged. * Column (int) * Column that exchange is to take place in. * * >>> Local variables: * ElementAboveRow1 (ElementPtr *) * Location of pointer which points to the element above Element1. This * pointer is modified so that it points to correct element on exit. * ElementAboveRow2 (ElementPtr *) * Location of pointer which points to the element above Element2. This * pointer is modified so that it points to correct element on exit. * ElementBelowRow1 (ElementPtr) * Pointer to element below Element1. * ElementBelowRow2 (ElementPtr) * Pointer to element below Element2. * pElement (ElementPtr) * Pointer used to traverse the column. */ static void ExchangeColElements( Matrix, Row1, Element1, Row2, Element2, Column ) MatrixPtr Matrix; register ElementPtr Element1, Element2; int Row1, Row2, Column; { ElementPtr *ElementAboveRow1, *ElementAboveRow2; ElementPtr ElementBelowRow1, ElementBelowRow2; register ElementPtr pElement; /* Begin `ExchangeColElements'. */ /* Search to find the ElementAboveRow1. */ ElementAboveRow1 = &(Matrix->FirstInCol[Column]); pElement = *ElementAboveRow1; while (pElement->Row < Row1) { ElementAboveRow1 = &(pElement->NextInCol); pElement = *ElementAboveRow1; } if (Element1 != NULL) { ElementBelowRow1 = Element1->NextInCol; if (Element2 == NULL) { /* Element2 does not exist, move Element1 down to Row2. */ if ( ElementBelowRow1 != NULL AND ElementBelowRow1->Row < Row2 ) { /* Element1 must be removed from linked list and moved. */ *ElementAboveRow1 = ElementBelowRow1; /* Search column for Row2. */ pElement = ElementBelowRow1; do { ElementAboveRow2 = &(pElement->NextInCol); pElement = *ElementAboveRow2; } while (pElement != NULL AND pElement->Row < Row2); /* Place Element1 in Row2. */ *ElementAboveRow2 = Element1; Element1->NextInCol = pElement; *ElementAboveRow1 =ElementBelowRow1; } Element1->Row = Row2; } else { /* Element2 does exist, and the two elements must be exchanged. */ if ( ElementBelowRow1->Row == Row2) { /* Element2 is just below Element1, exchange them. */ Element1->NextInCol = Element2->NextInCol; Element2->NextInCol = Element1; *ElementAboveRow1 = Element2; } else { /* Element2 is not just below Element1 and must be searched for. */ pElement = ElementBelowRow1; do { ElementAboveRow2 = &(pElement->NextInCol); pElement = *ElementAboveRow2; } while (pElement->Row < Row2); ElementBelowRow2 = Element2->NextInCol; /* Switch Element1 and Element2. */ *ElementAboveRow1 = Element2; Element2->NextInCol = ElementBelowRow1; *ElementAboveRow2 = Element1; Element1->NextInCol = ElementBelowRow2; } Element1->Row = Row2; Element2->Row = Row1; } } else { /* Element1 does not exist. */ ElementBelowRow1 = pElement; /* Find Element2. */ if (ElementBelowRow1->Row != Row2) { do { ElementAboveRow2 = &(pElement->NextInCol); pElement = *ElementAboveRow2; } while (pElement->Row < Row2); ElementBelowRow2 = Element2->NextInCol; /* Move Element2 to Row1. */ *ElementAboveRow2 = Element2->NextInCol; *ElementAboveRow1 = Element2; Element2->NextInCol = ElementBelowRow1; } Element2->Row = Row1; } return; } /* * EXCHANGE TWO ELEMENTS IN A ROW * * Performs all required operations to exchange two elements in a row. * Those operations are: restring NextInRow pointers and swapping column * indexes in the MatrixElements. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Col1 (int) * Col of left-most element to be exchanged. * Element1 (ElementPtr) * Pointer to left-most element to be exchanged. * Col2 (int) * Col of right-most element to be exchanged. * Element2 (ElementPtr) * Pointer to right-most element to be exchanged. * Row (int) * Row that exchange is to take place in. * * >>> Local variables: * ElementLeftOfCol1 (ElementPtr *) * Location of pointer which points to the element to the left of * Element1. This pointer is modified so that it points to correct * element on exit. * ElementLeftOfCol2 (ElementPtr *) * Location of pointer which points to the element to the left of * Element2. This pointer is modified so that it points to correct * element on exit. * ElementRightOfCol1 (ElementPtr) * Pointer to element right of Element1. * ElementRightOfCol2 (ElementPtr) * Pointer to element right of Element2. * pElement (ElementPtr) * Pointer used to traverse the row. */ static void ExchangeRowElements( Matrix, Col1, Element1, Col2, Element2, Row ) MatrixPtr Matrix; int Col1, Col2, Row; register ElementPtr Element1, Element2; { ElementPtr *ElementLeftOfCol1, *ElementLeftOfCol2; ElementPtr ElementRightOfCol1, ElementRightOfCol2; register ElementPtr pElement; /* Begin `ExchangeRowElements'. */ /* Search to find the ElementLeftOfCol1. */ ElementLeftOfCol1 = &(Matrix->FirstInRow[Row]); pElement = *ElementLeftOfCol1; while (pElement->Col < Col1) { ElementLeftOfCol1 = &(pElement->NextInRow); pElement = *ElementLeftOfCol1; } if (Element1 != NULL) { ElementRightOfCol1 = Element1->NextInRow; if (Element2 == NULL) { /* Element2 does not exist, move Element1 to right to Col2. */ if ( ElementRightOfCol1 != NULL AND ElementRightOfCol1->Col < Col2 ) { /* Element1 must be removed from linked list and moved. */ *ElementLeftOfCol1 = ElementRightOfCol1; /* Search Row for Col2. */ pElement = ElementRightOfCol1; do { ElementLeftOfCol2 = &(pElement->NextInRow); pElement = *ElementLeftOfCol2; } while (pElement != NULL AND pElement->Col < Col2); /* Place Element1 in Col2. */ *ElementLeftOfCol2 = Element1; Element1->NextInRow = pElement; *ElementLeftOfCol1 =ElementRightOfCol1; } Element1->Col = Col2; } else { /* Element2 does exist, and the two elements must be exchanged. */ if ( ElementRightOfCol1->Col == Col2) { /* Element2 is just right of Element1, exchange them. */ Element1->NextInRow = Element2->NextInRow; Element2->NextInRow = Element1; *ElementLeftOfCol1 = Element2; } else { /* Element2 is not just right of Element1 and must be searched for. */ pElement = ElementRightOfCol1; do { ElementLeftOfCol2 = &(pElement->NextInRow); pElement = *ElementLeftOfCol2; } while (pElement->Col < Col2); ElementRightOfCol2 = Element2->NextInRow; /* Switch Element1 and Element2. */ *ElementLeftOfCol1 = Element2; Element2->NextInRow = ElementRightOfCol1; *ElementLeftOfCol2 = Element1; Element1->NextInRow = ElementRightOfCol2; } Element1->Col = Col2; Element2->Col = Col1; } } else { /* Element1 does not exist. */ ElementRightOfCol1 = pElement; /* Find Element2. */ if (ElementRightOfCol1->Col != Col2) { do { ElementLeftOfCol2 = &(pElement->NextInRow); pElement = *ElementLeftOfCol2; } while (pElement->Col < Col2); ElementRightOfCol2 = Element2->NextInRow; /* Move Element2 to Col1. */ *ElementLeftOfCol2 = Element2->NextInRow; *ElementLeftOfCol1 = Element2; Element2->NextInRow = ElementRightOfCol1; } Element2->Col = Col1; } return; } /* * PERFORM ROW AND COLUMN ELIMINATION ON REAL MATRIX * * Eliminates a single row and column of the matrix and leaves single row of * the upper triangular matrix and a single column of the lower triangular * matrix in its wake. Uses Gauss's method. * * >>> Argument: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * * >>> Local variables: * pLower (ElementPtr) * Points to matrix element in lower triangular column. * pSub (ElementPtr) * Points to elements in the reduced submatrix. * Row (int) * Row index. * pUpper (ElementPtr) * Points to matrix element in upper triangular row. * * >>> Possible errors: * spNO_MEMORY */ static void RealRowColElimination( Matrix, pPivot ) MatrixPtr Matrix; register ElementPtr pPivot; { #if REAL register ElementPtr pSub; register int Row; register ElementPtr pLower, pUpper; extern ElementPtr CreateFillin(); /* Begin `RealRowColElimination'. */ /* Test for zero pivot. */ if (ABS(pPivot->Real) == 0.0) { (void)MatrixIsSingular( Matrix, pPivot->Row ); return; } pPivot->Real = 1.0 / pPivot->Real; pUpper = pPivot->NextInRow; while (pUpper != NULL) { /* Calculate upper triangular element. */ pUpper->Real *= pPivot->Real; pSub = pUpper->NextInCol; pLower = pPivot->NextInCol; while (pLower != NULL) { Row = pLower->Row; /* Find element in row that lines up with current lower triangular element. */ while (pSub != NULL AND pSub->Row < Row) pSub = pSub->NextInCol; /* Test to see if desired element was not found, if not, create fill-in. */ if (pSub == NULL OR pSub->Row > Row) { pSub = CreateFillin( Matrix, Row, pUpper->Col ); if (pSub == NULL) { Matrix->Error = spNO_MEMORY; return; } } pSub->Real -= pUpper->Real * pLower->Real; pSub = pSub->NextInCol; pLower = pLower->NextInCol; } pUpper = pUpper->NextInRow; } return; #endif /* REAL */ } /* * PERFORM ROW AND COLUMN ELIMINATION ON COMPLEX MATRIX * * Eliminates a single row and column of the matrix and leaves single row of * the upper triangular matrix and a single column of the lower triangular * matrix in its wake. Uses Gauss's method. * * >>> Argument: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * * >>> Local variables: * pLower (ElementPtr) * Points to matrix element in lower triangular column. * pSub (ElementPtr) * Points to elements in the reduced submatrix. * Row (int) * Row index. * pUpper (ElementPtr) * Points to matrix element in upper triangular row. * * Possible errors: * spNO_MEMORY */ static void ComplexRowColElimination( Matrix, pPivot ) MatrixPtr Matrix; register ElementPtr pPivot; { #if spCOMPLEX register ElementPtr pSub; register int Row; register ElementPtr pLower, pUpper; ElementPtr CreateFillin(); /* Begin `ComplexRowColElimination'. */ /* Test for zero pivot. */ if (ELEMENT_MAG(pPivot) == 0.0) { (void)MatrixIsSingular( Matrix, pPivot->Row ); return; } CMPLX_RECIPROCAL(*pPivot, *pPivot); pUpper = pPivot->NextInRow; while (pUpper != NULL) { /* Calculate upper triangular element. */ /* Cmplx expr: *pUpper = *pUpper * (1.0 / *pPivot). */ CMPLX_MULT_ASSIGN(*pUpper, *pPivot); pSub = pUpper->NextInCol; pLower = pPivot->NextInCol; while (pLower != NULL) { Row = pLower->Row; /* Find element in row that lines up with current lower triangular element. */ while (pSub != NULL AND pSub->Row < Row) pSub = pSub->NextInCol; /* Test to see if desired element was not found, if not, create fill-in. */ if (pSub == NULL OR pSub->Row > Row) { pSub = CreateFillin( Matrix, Row, pUpper->Col ); if (pSub == NULL) { Matrix->Error = spNO_MEMORY; return; } } /* Cmplx expr: pElement -= *pUpper * pLower. */ CMPLX_MULT_SUBT_ASSIGN(*pSub, *pUpper, *pLower); pSub = pSub->NextInCol; pLower = pLower->NextInCol; } pUpper = pUpper->NextInRow; } return; #endif /* spCOMPLEX */ } /* * UPDATE MARKOWITZ NUMBERS * * Updates the Markowitz numbers after a row and column have been eliminated. * Also updates singleton count. * * >>> Argument: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * * >>> Local variables: * Row (int) * Row index. * Col (int) * Column index. * ColPtr (ElementPtr) * Points to matrix element in upper triangular column. * RowPtr (ElementPtr) * Points to matrix element in lower triangular row. */ static void UpdateMarkowitzNumbers( Matrix, pPivot ) MatrixPtr Matrix; ElementPtr pPivot; { register int Row, Col; register ElementPtr ColPtr, RowPtr; register int *MarkoRow = Matrix->MarkowitzRow, *MarkoCol = Matrix->MarkowitzCol; double Product; /* Begin `UpdateMarkowitzNumbers'. */ /* Update Markowitz numbers. */ for (ColPtr = pPivot->NextInCol; ColPtr != NULL; ColPtr = ColPtr->NextInCol) { Row = ColPtr->Row; --MarkoRow[Row]; /* Form Markowitz product while being cautious of overflows. */ if ((MarkoRow[Row] > LARGEST_SHORT_INTEGER AND MarkoCol[Row] != 0) OR (MarkoCol[Row] > LARGEST_SHORT_INTEGER AND MarkoRow[Row] != 0)) { Product = MarkoCol[Row] * MarkoRow[Row]; if (Product >= LARGEST_LONG_INTEGER) Matrix->MarkowitzProd[Row] = LARGEST_LONG_INTEGER; else Matrix->MarkowitzProd[Row] = Product; } else Matrix->MarkowitzProd[Row] = MarkoRow[Row] * MarkoCol[Row]; if (MarkoRow[Row] == 0) Matrix->Singletons++; } for (RowPtr = pPivot->NextInRow; RowPtr != NULL; RowPtr = RowPtr->NextInRow) { Col = RowPtr->Col; --MarkoCol[Col]; /* Form Markowitz product while being cautious of overflows. */ if ((MarkoRow[Col] > LARGEST_SHORT_INTEGER AND MarkoCol[Col] != 0) OR (MarkoCol[Col] > LARGEST_SHORT_INTEGER AND MarkoRow[Col] != 0)) { Product = MarkoCol[Col] * MarkoRow[Col]; if (Product >= LARGEST_LONG_INTEGER) Matrix->MarkowitzProd[Col] = LARGEST_LONG_INTEGER; else Matrix->MarkowitzProd[Col] = Product; } else Matrix->MarkowitzProd[Col] = MarkoRow[Col] * MarkoCol[Col]; if ((MarkoCol[Col] == 0) AND (MarkoRow[Col] != 0)) Matrix->Singletons++; } return; } /* * CREATE FILL-IN * * This routine is used to create fill-ins and splice them into the * matrix. * * >>> Returns: * Pointer to fill-in. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Col (int) * Column index for element. * Row (int) * Row index for element. * * >>> Local variables: * pElement (ElementPtr) * Pointer to an element in the matrix. * ppElementAbove (ElementPtr *) * This contains the address of the pointer to the element just above the * one being created. It is used to speed the search and it is updated * with address of the created element. * * >>> Possible errors: * spNO_MEMORY */ static ElementPtr CreateFillin( Matrix, Row, Col ) MatrixPtr Matrix; register int Row; int Col; { register ElementPtr pElement, *ppElementAbove; ElementPtr spcCreateElement(); /* Begin `CreateFillin'. */ /* Find Element above fill-in. */ ppElementAbove = &Matrix->FirstInCol[Col]; pElement = *ppElementAbove; while (pElement != NULL) { if (pElement->Row < Row) { ppElementAbove = &pElement->NextInCol; pElement = *ppElementAbove; } else break; /* while loop */ } /* End of search, create the element. */ pElement = spcCreateElement( Matrix, Row, Col, ppElementAbove, YES ); /* Update Markowitz counts and products. */ Matrix->MarkowitzProd[Row] = ++Matrix->MarkowitzRow[Row] * Matrix->MarkowitzCol[Row]; if ((Matrix->MarkowitzRow[Row] == 1) AND (Matrix->MarkowitzCol[Row] != 0)) Matrix->Singletons--; Matrix->MarkowitzProd[Col] = ++Matrix->MarkowitzCol[Col] * Matrix->MarkowitzRow[Col]; if ((Matrix->MarkowitzRow[Col] != 0) AND (Matrix->MarkowitzCol[Col] == 1)) Matrix->Singletons--; return pElement; } /* * ZERO PIVOT ENCOUNTERED * * This routine is called when a singular matrix is found. It then * records the current row and column and exits. * * >>> Returned: * The error code spSINGULAR or spZERO_DIAG is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of diagonal that is zero. */ static int MatrixIsSingular( Matrix, Step ) MatrixPtr Matrix; int Step; { /* Begin `MatrixIsSingular'. */ Matrix->SingularRow = Matrix->IntToExtRowMap[ Step ]; Matrix->SingularCol = Matrix->IntToExtColMap[ Step ]; return (Matrix->Error = spSINGULAR); } static int ZeroPivot( Matrix, Step ) MatrixPtr Matrix; int Step; { /* Begin `ZeroPivot'. */ Matrix->SingularRow = Matrix->IntToExtRowMap[ Step ]; Matrix->SingularCol = Matrix->IntToExtColMap[ Step ]; return (Matrix->Error = spZERO_DIAG); } #if ANNOTATE == FULL /* * * WRITE STATUS * * Write a summary of important variables to standard output. */ static void WriteStatus( Matrix, Step ) MatrixPtr Matrix; int Step; { int I; /* Begin `WriteStatus'. */ printf("Step = %1d ", Step); printf("Pivot found at %1d,%1d using ", Matrix->PivotsOriginalRow, Matrix->PivotsOriginalCol); switch(Matrix->PivotSelectionMethod) { case 's': printf("SearchForSingleton\n"); break; case 'q': printf("QuicklySearchDiagonal\n"); break; case 'd': printf("SearchDiagonal\n"); break; case 'e': printf("SearchEntireMatrix\n"); break; } printf("MarkowitzRow = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->MarkowitzRow[I]); printf("\n"); printf("MarkowitzCol = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->MarkowitzCol[I]); printf("\n"); printf("MarkowitzProduct = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->MarkowitzProd[I]); printf("\n"); printf("Singletons = %2d\n", Matrix->Singletons); printf("IntToExtRowMap = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->IntToExtRowMap[I]); printf("\n"); printf("IntToExtColMap = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->IntToExtColMap[I]); printf("\n"); printf("ExtToIntRowMap = "); for (I = 1; I <= Matrix->ExtSize; I++) printf("%2d ", Matrix->ExtToIntRowMap[I]); printf("\n"); printf("ExtToIntColMap = "); for (I = 1; I <= Matrix->ExtSize; I++) printf("%2d ", Matrix->ExtToIntColMap[I]); printf("\n\n"); /* spPrint((char *)Matrix, NO, YES); */ return; } #endif /* ANNOTATE == FULL */ neuron-7.5/src/sparse13/spmatrix.h000077500000000000000000000305711323325274500171620ustar00rootroot00000000000000/* * EXPORTS for sparse matrix routines. * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains definitions that are useful to the calling * program. In particular, this file contains error keyword * definitions, some macro functions that are used to quickly enter * data into the matrix and the type definition of a data structure * that acts as a template for entering admittances into the matrix. * Also included is the type definitions for the various functions * available to the user. */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. * * $Date: 2003-02-11 19:36:05 +0100 (Tue, 11 Feb 2003) $ * $Revision: 3 $ */ #ifndef spOKAY /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. */ #include "spconfig.h" /* * ERROR KEYWORDS * * The actual numbers used in the error codes are not sacred, they can be * changed under the condition that the codes for the nonfatal errors are * less than the code for spFATAL and similarly the codes for the fatal * errors are greater than that for spFATAL. * * >>> Error descriptions: * spOKAY * No error has occurred. * spSMALL_PIVOT * When reordering the matrix, no element was found which satisfies the * absolute threshold criteria. The largest element in the matrix was * chosen as pivot. Non-fatal. * spZERO_DIAG * Fatal error. A zero was encountered on the diagonal the matrix. This * does not necessarily imply that the matrix is singular. When this * error occurs, the matrix should be reconstructed and factored using * spOrderAndFactor(). * spSINGULAR * Fatal error. Matrix is singular, so no unique solution exists. * spNO_MEMORY * Fatal error. Indicates that not enough memory is available to handle * the matrix. * spPANIC * Fatal error indicating that the routines are not prepared to * handle the matrix that has been requested. This may occur when * the matrix is specified to be real and the routines are not * compiled for real matrices, or when the matrix is specified to * be complex and the routines are not compiled to handle complex * matrices. * spFATAL * Not an error flag, but rather the dividing line between fatal errors * and warnings. */ /* Begin error macros. */ #define spOKAY 0 #define spSMALL_PIVOT 1 #define spZERO_DIAG 2 #define spSINGULAR 3 #define spNO_MEMORY 4 #define spPANIC 5 #define spFATAL 2 /* * KEYWORD DEFINITIONS * * Here we define what precision arithmetic Sparse will use. Double * precision is suggested as being most appropriate for circuit * simulation and for C. However, it is possible to change spREAL * to a float for single precision arithmetic. Note that in C, single * precision arithmetic is often slower than double precision. Sparse * internally refers to spREALs as RealNumbers. * * Some C compilers, notably the old VMS compiler, do not handle the keyword * "void" correctly. If this is true for your compiler, remove the * comment delimiters from the redefinition of void to int below. */ #define spREAL double /* #define void int */ /* * PARTITION TYPES * * When factoring a previously ordered matrix using spFactor(), Sparse * operates on a row-at-a-time basis. For speed, on each step, the row * being updated is copied into a full vector and the operations are * performed on that vector. This can be done one of two ways, either * using direct addressing or indirect addressing. Direct addressing * is fastest when the matrix is relatively dense and indirect addressing * is quite sparse. The user can select which partitioning mode is used. * The following keywords are passed to spPartition() and indicate that * Sparse should use only direct addressing, only indirect addressing, or * that it should choose the best mode on a row-by-row basis. The time * required to choose a partition is of the same order of the cost to factor * the matrix. * * If you plan to factor a large number of matrices with the same structure, * it is best to let Sparse choose the partition. Otherwise, you should * choose the partition based on the predicted density of the matrix. */ /* Begin partition keywords. */ #define spDEFAULT_PARTITION 0 #define spDIRECT_PARTITION 1 #define spINDIRECT_PARTITION 2 #define spAUTO_PARTITION 3 /* * MACRO FUNCTION DEFINITIONS * * >>> Macro descriptions: * spADD_REAL_ELEMENT * Macro function that adds data to a real element in the matrix by a * pointer. * spADD_IMAG_ELEMENT * Macro function that adds data to a imaginary element in the matrix by * a pointer. * spADD_COMPLEX_ELEMENT * Macro function that adds data to a complex element in the matrix by a * pointer. * spADD_REAL_QUAD * Macro function that adds data to each of the four real matrix elements * specified by the given template. * spADD_IMAG_QUAD * Macro function that adds data to each of the four imaginary matrix * elements specified by the given template. * spADD_COMPLEX_QUAD * Macro function that adds data to each of the four complex matrix * elements specified by the given template. */ /* Begin Macros. */ #define spADD_REAL_ELEMENT(element,real) *(element) += real #define spADD_IMAG_ELEMENT(element,imag) *(element+1) += imag #define spADD_COMPLEX_ELEMENT(element,real,imag) \ { *(element) += real; \ *(element+1) += imag; \ } #define spADD_REAL_QUAD(template,real) \ { *((template).Element1) += real; \ *((template).Element2) += real; \ *((template).Element3Negated) -= real; \ *((template).Element4Negated) -= real; \ } #define spADD_IMAG_QUAD(template,imag) \ { *((template).Element1+1) += imag; \ *((template).Element2+1) += imag; \ *((template).Element3Negated+1) -= imag; \ *((template).Element4Negated+1) -= imag; \ } #define spADD_COMPLEX_QUAD(template,real,imag) \ { *((template).Element1) += real; \ *((template).Element2) += real; \ *((template).Element3Negated) -= real; \ *((template).Element4Negated) -= real; \ *((template).Element1+1) += imag; \ *((template).Element2+1) += imag; \ *((template).Element3Negated+1) -= imag; \ *((template).Element4Negated+1) -= imag; \ } /* * TYPE DEFINITION FOR COMPONENT TEMPLATE * * This data structure is used to hold pointers to four related elements in * matrix. It is used in conjunction with the routines * spGetAdmittance * spGetQuad * spGetOnes * These routines stuff the structure which is later used by the spADD_QUAD * macro functions above. It is also possible for the user to collect four * pointers returned by spGetElement and stuff them into the template. * The spADD_QUAD routines stuff data into the matrix in locations specified * by Element1 and Element2 without changing the data. The data is negated * before being placed in Element3 and Element4. */ /* Begin `spTemplate'. */ struct spTemplate { spREAL *Element1 ; spREAL *Element2 ; spREAL *Element3Negated; spREAL *Element4Negated; }; /* * FUNCTION TYPE DEFINITIONS * * The type of every user accessible function is declared here. */ /* Begin function declarations. */ #if defined(__STDC__) || defined(__cplusplus) /* For compilers that understand function prototypes. */ extern void spClear( char* ); extern spREAL spCondition( char*, spREAL, int* ); extern char *spCreate( int, int, int* ); extern void spDeleteRowAndCol( char*, int, int ); extern void spDestroy( char* ); extern int spElementCount( char* ); extern int spError( char* ); extern int spFactor( char* ); extern int spFileMatrix( char*, char*, char*, int, int, int ); extern int spFileStats( char*, char*, char* ); extern int spFillinCount( char* ); extern int spGetAdmittance( char*, int, int, struct spTemplate* ); extern spREAL *spGetElement( char*, int, int ); extern char *spGetInitInfo( spREAL* ); extern int spGetOnes( char*, int, int, int, struct spTemplate* ); extern int spGetQuad( char*, int, int, int, int, struct spTemplate* ); extern int spGetSize( char*, int ); extern int spInitialize( char*, int (*)() ); extern void spInstallInitInfo( spREAL*, char* ); extern spREAL spLargestElement( char* ); extern void spMNA_Preorder( char* ); extern spREAL spNorm( char* ); extern int spOrderAndFactor( char*, spREAL[], spREAL, spREAL, int ); extern void spPartition( char*, int ); extern void spPrint( char*, int, int, int ); extern spREAL spPseudoCondition( char* ); extern spREAL spRoundoff( char*, spREAL ); extern void spScale( char*, spREAL[], spREAL[] ); extern void spSetComplex( char* ); extern void spSetReal( char* ); extern void spStripFills( char* ); extern void spWhereSingular( char*, int*, int* ); /* Functions with argument lists that are dependent on options. */ #if spCOMPLEX extern void spDeterminant ( char*, int*, spREAL*, spREAL* ); #else /* NOT spCOMPLEX */ extern void spDeterminant ( char*, int*, spREAL* ); #endif /* NOT spCOMPLEX */ #if spCOMPLEX && spSEPARATED_COMPLEX_VECTORS extern int spFileVector( char*, char* , spREAL[], spREAL[]); extern void spMultiply( char*, spREAL[], spREAL[], spREAL[], spREAL[] ); extern void spMultTransposed(char*,spREAL[],spREAL[],spREAL[],spREAL[]); extern void spSolve( char*, spREAL[], spREAL[], spREAL[], spREAL[] ); extern void spSolveTransposed(char*,spREAL[],spREAL[],spREAL[],spREAL[]); #else /* NOT (spCOMPLEX && spSEPARATED_COMPLEX_VECTORS) */ extern int spFileVector( char*, char* , spREAL[] ); extern void spMultiply( char*, spREAL[], spREAL[] ); extern void spMultTransposed( char*, spREAL[], spREAL[] ); extern void spSolve( char*, spREAL[], spREAL[] ); extern void spSolveTransposed( char*, spREAL[], spREAL[] ); #endif /* NOT (spCOMPLEX && spSEPARATED_COMPLEX_VECTORS) */ #else /* NOT defined(__STDC__) */ /* For compilers that do not understand function prototypes. */ extern void spClear(); extern spREAL spCondition(); extern char *spCreate(); extern void spDeleteRowAndCol(); extern void spDestroy(); extern void spDeterminant (); extern int spElementCount(); extern int spError(); extern int spFactor(); extern int spFileMatrix(); extern int spFileStats(); extern int spFileVector(); extern int spFillinCount(); extern int spGetAdmittance(); extern spREAL *spGetElement(); extern char *spGetInitInfo(); extern int spGetOnes(); extern int spGetQuad(); extern int spGetSize(); extern int spInitialize(); extern void spInstallInitInfo(); extern spREAL spLargestElement(); extern void spMNA_Preorder(); extern void spMultiply(); extern void spMultTransposed(); extern spREAL spNorm(); extern int spOrderAndFactor(); extern void spPartition(); extern void spPrint(); extern spREAL spPseudoCondition(); extern spREAL spRoundoff(); extern void spScale(); extern void spSetComplex(); extern void spSetReal(); extern void spSolve(); extern void spSolveTransposed(); extern void spStripFills(); extern void spWhereSingular(); #endif /* defined(__STDC__) */ #endif /* spOKAY */ neuron-7.5/src/sparse13/spoutput.c000077500000000000000000000555621323325274500172200ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * MATRIX OUTPUT MODULE * * Author: Advisor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the output-to-file and output-to-screen routines for * the matrix package. * * >>> User accessible functions contained in this file: * spPrint * spFileMatrix * spFileVector * spFileStats * * >>> Other functions contained in this file: */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef lint static char copyright[] = "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"; static char RCSid[] = "$Header$"; #endif /* * IMPORTS * * >>> Import descriptions: * spconfig.h * Macros that customize the sparse matrix routines. * spmatrix.h * Macros and declarations to be imported by the user. * spdefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "spmatrix.h" #include "spdefs.h" #if DOCUMENTATION /* * PRINT MATRIX * * Formats and send the matrix to standard output. Some elementary * statistics are also output. The matrix is output in a format that is * readable by people. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * PrintReordered (int) * Indicates whether the matrix should be printed out in its original * form, as input by the user, or whether it should be printed in its * reordered form, as used by the matrix routines. A zero indicates that * the matrix should be printed as inputed, a one indicates that it * should be printed reordered. * Data (int) * Boolean flag that when false indicates that output should be * compressed such that only the existence of an element should be * indicated rather than giving the actual value. Thus 11 times as * many can be printed on a row. A zero signifies that the matrix * should be printed compressed. A one indicates that the matrix * should be printed in all its glory. * Header (int) * Flag indicating that extra information should be given, such as row * and column numbers. * * >>> Local variables: * Col (int) * Column being printed. * ElementCount (int) * Variable used to count the number of nonzero elements in the matrix. * LargestElement (RealNumber) * The magnitude of the largest element in the matrix. * LargestDiag (RealNumber) * The magnitude of the largest diagonal in the matrix. * Magnitude (RealNumber) * The absolute value of the matrix element being printed. * PrintOrdToIntColMap (int []) * A translation array that maps the order that columns will be * printed in (if not PrintReordered) to the internal column numbers. * PrintOrdToIntRowMap (int []) * A translation array that maps the order that rows will be * printed in (if not PrintReordered) to the internal row numbers. * pElement (ElementPtr) * Pointer to the element in the matrix that is to be printed. * pImagElements (ElementPtr [ ]) * Array of pointers to elements in the matrix. These pointers point * to the elements whose real values have just been printed. They are * used to quickly access those same elements so their imaginary values * can be printed. * Row (int) * Row being printed. * Size (int) * The size of the matrix. * SmallestDiag (RealNumber) * The magnitude of the smallest diagonal in the matrix. * SmallestElement (RealNumber) * The magnitude of the smallest element in the matrix excluding zero * elements. * StartCol (int) * The column number of the first column to be printed in the group of * columns currently being printed. * StopCol (int) * The column number of the last column to be printed in the group of * columns currently being printed. * Top (int) * The largest expected external row or column number. */ void spPrint( eMatrix, PrintReordered, Data, Header ) char *eMatrix; int PrintReordered, Data, Header; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int J = 0; int I, Row, Col, Size, Top, StartCol = 1, StopCol, Columns, ElementCount = 0; double Magnitude, SmallestDiag, SmallestElement; double LargestElement = 0.0, LargestDiag = 0.0; ElementPtr pElement, pImagElements[PRINTER_WIDTH/10+1]; int *PrintOrdToIntRowMap, *PrintOrdToIntColMap; /* Begin `spPrint'. */ ASSERT( IS_SPARSE( Matrix ) ); Size = Matrix->Size; /* Create a packed external to internal row and column translation array. */ # if TRANSLATE Top = Matrix->AllocatedExtSize; #else Top = Matrix->AllocatedSize; #endif CALLOC( PrintOrdToIntRowMap, int, Top + 1 ); CALLOC( PrintOrdToIntColMap, int, Top + 1 ); if ( PrintOrdToIntRowMap == NULL OR PrintOrdToIntColMap == NULL) { Matrix->Error = spNO_MEMORY; return; } for (I = 1; I <= Size; I++) { PrintOrdToIntRowMap[ Matrix->IntToExtRowMap[I] ] = I; PrintOrdToIntColMap[ Matrix->IntToExtColMap[I] ] = I; } /* Pack the arrays. */ for (J = 1, I = 1; I <= Top; I++) { if (PrintOrdToIntRowMap[I] != 0) PrintOrdToIntRowMap[ J++ ] = PrintOrdToIntRowMap[ I ]; } for (J = 1, I = 1; I <= Top; I++) { if (PrintOrdToIntColMap[I] != 0) PrintOrdToIntColMap[ J++ ] = PrintOrdToIntColMap[ I ]; } /* Print header. */ if (Header) { printf("MATRIX SUMMARY\n\n"); printf("Size of matrix = %1u x %1u.\n", Size, Size); if ( Matrix->Reordered AND PrintReordered ) printf("Matrix has been reordered.\n"); printf("\n"); if ( Matrix->Factored ) printf("Matrix after factorization:\n"); else printf("Matrix before factorization:\n"); SmallestElement = LARGEST_REAL; SmallestDiag = SmallestElement; } /* Determine how many columns to use. */ Columns = PRINTER_WIDTH; if (Header) Columns -= 5; if (Data) Columns = (Columns+1) / 10; /* * Print matrix by printing groups of complete columns until all the columns * are printed. */ J = 0; while ( J <= Size ) /* Calculate index of last column to printed in this group. */ { StopCol = StartCol + Columns - 1; if (StopCol > Size) StopCol = Size; /* Label the columns. */ if (Header) { if (Data) { printf(" "); for (I = StartCol; I <= StopCol; I++) { if (PrintReordered) Col = I; else Col = PrintOrdToIntColMap[I]; printf(" %9d", Matrix->IntToExtColMap[ Col ]); } printf("\n\n"); } else { if (PrintReordered) printf("Columns %1d to %1d.\n",StartCol,StopCol); else { printf("Columns %1d to %1d.\n", Matrix->IntToExtColMap[ PrintOrdToIntColMap[StartCol] ], Matrix->IntToExtColMap[ PrintOrdToIntColMap[StopCol] ]); } } } /* Print every row ... */ for (I = 1; I <= Size; I++) { if (PrintReordered) Row = I; else Row = PrintOrdToIntRowMap[I]; if (Header) { if (PrintReordered AND NOT Data) printf("%4d", I); else printf("%4d", Matrix->IntToExtRowMap[ Row ]); if (NOT Data) printf(" "); } /* ... in each column of the group. */ for (J = StartCol; J <= StopCol; J++) { if (PrintReordered) Col = J; else Col = PrintOrdToIntColMap[J]; pElement = Matrix->FirstInCol[Col]; while(pElement != NULL AND pElement->Row != Row) pElement = pElement->NextInCol; if (Data) pImagElements[J - StartCol] = pElement; if (pElement != NULL) /* Case where element exists */ { if (Data) printf(" %9.3lg", (double)pElement->Real); else printf("x"); /* Update status variables */ if ( (Magnitude = ELEMENT_MAG(pElement)) > LargestElement ) LargestElement = Magnitude; if ((Magnitude < SmallestElement) AND (Magnitude != 0.0)) SmallestElement = Magnitude; ElementCount++; } /* Case where element is structurally zero */ else { if (Data) printf(" ..."); else printf("."); } } printf("\n"); #if spCOMPLEX if (Matrix->Complex AND Data) { printf(" "); for (J = StartCol; J <= StopCol; J++) { if (pImagElements[J - StartCol] != NULL) { printf(" %8.2lgj", (double)pImagElements[J-StartCol]->Imag); } else printf(" "); } printf("\n"); } #endif /* spCOMPLEX */ } /* Calculate index of first column in next group. */ StartCol = StopCol; StartCol++; printf("\n"); } if (Header) { printf("\nLargest element in matrix = %-1.4lg.\n", LargestElement); printf("Smallest element in matrix = %-1.4lg.\n", SmallestElement); /* Search for largest and smallest diagonal values */ for (I = 1; I <= Size; I++) { if (Matrix->Diag[I] != NULL) { Magnitude = ELEMENT_MAG( Matrix->Diag[I] ); if ( Magnitude > LargestDiag ) LargestDiag = Magnitude; if ( Magnitude < SmallestDiag ) SmallestDiag = Magnitude; } } /* Print the largest and smallest diagonal values */ if ( Matrix->Factored ) { printf("\nLargest diagonal element = %-1.4lg.\n", LargestDiag); printf("Smallest diagonal element = %-1.4lg.\n", SmallestDiag); } else { printf("\nLargest pivot element = %-1.4lg.\n", LargestDiag); printf("Smallest pivot element = %-1.4lg.\n", SmallestDiag); } /* Calculate and print sparsity and number of fill-ins created. */ printf("\nDensity = %2.2lf%%.\n", ((double)(ElementCount * 100)) / ((double)(Size * Size))); if (NOT Matrix->NeedsOrdering) printf("Number of fill-ins = %1d.\n", Matrix->Fillins); } printf("\n"); (void)fflush(stdout); FREE(PrintOrdToIntColMap); FREE(PrintOrdToIntRowMap); return; } /* * OUTPUT MATRIX TO FILE * * Writes matrix to file in format suitable to be read back in by the * matrix test program. * * >>> Returns: * One is returned if routine was successful, otherwise zero is returned. * The calling function can query errno (the system global error variable) * as to the reason why this routine failed. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * File (char *) * Name of file into which matrix is to be written. * Label (char *) * String that is transferred to file and is used as a label. * Reordered (BOOLEAN) * Specifies whether matrix should be output in reordered form, * or in original order. * Data (BOOLEAN) * Indicates that the element values should be output along with * the indices for each element. This parameter must be true if * matrix is to be read by the sparse test program. * Header (BOOLEAN) * Indicates that header is desired. This parameter must be true if * matrix is to be read by the sparse test program. * * >>> Local variables: * Col (int) * The original column number of the element being output. * pElement (ElementPtr) * Pointer to an element in the matrix. * pMatrixFile (FILE *) * File pointer to the matrix file. * Row (int) * The original row number of the element being output. * Size (int) * The size of the matrix. */ int spFileMatrix( eMatrix, File, Label, Reordered, Data, Header ) char *eMatrix, *Label, *File; int Reordered, Data, Header; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int I, Size; register ElementPtr pElement; int Row, Col, Err=0; FILE *pMatrixFile, *fopen(); /* Begin `spFileMatrix'. */ ASSERT( IS_SPARSE( Matrix ) ); /* Open file matrix file in write mode. */ if ((pMatrixFile = fopen(File, "w")) == NULL) return 0; /* Output header. */ Size = Matrix->Size; if (Header) { if (Matrix->Factored AND Data) { Err = fprintf ( pMatrixFile, "Warning : The following matrix is factored in to LU form.\n" ); } if (Err < 0) return 0; if (fprintf(pMatrixFile, "%s\n", Label) < 0) return 0; Err = fprintf( pMatrixFile, "%d\t%s\n", Size, (Matrix->Complex ? "complex" : "real")); if (Err < 0) return 0; } /* Output matrix. */ if (NOT Data) { for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { if (Reordered) { Row = pElement->Row; Col = I; } else { Row = Matrix->IntToExtRowMap[pElement->Row]; Col = Matrix->IntToExtColMap[I]; } pElement = pElement->NextInCol; if (fprintf(pMatrixFile, "%d\t%d\n", Row, Col) < 0) return 0; } } /* Output terminator, a line of zeros. */ if (Header) if (fprintf(pMatrixFile, "0\t0\n") < 0) return 0; } #if spCOMPLEX if (Data AND Matrix->Complex) { for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { if (Reordered) { Row = pElement->Row; Col = I; } else { Row = Matrix->IntToExtRowMap[pElement->Row]; Col = Matrix->IntToExtColMap[I]; } Err = fprintf ( pMatrixFile,"%d\t%d\t%-.15lg\t%-.15lg\n", Row, Col, (double)pElement->Real, (double)pElement->Imag ); if (Err < 0) return 0; pElement = pElement->NextInCol; } } /* Output terminator, a line of zeros. */ if (Header) if (fprintf(pMatrixFile,"0\t0\t0.0\t0.0\n") < 0) return 0; } #endif /* spCOMPLEX */ #if REAL if (Data AND NOT Matrix->Complex) { for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { Row = Matrix->IntToExtRowMap[pElement->Row]; Col = Matrix->IntToExtColMap[I]; Err = fprintf ( pMatrixFile,"%d\t%d\t%-.15lg\n", Row, Col, (double)pElement->Real ); if (Err < 0) return 0; pElement = pElement->NextInCol; } } /* Output terminator, a line of zeros. */ if (Header) if (fprintf(pMatrixFile,"0\t0\t0.0\n") < 0) return 0; } #endif /* REAL */ /* Close file. */ if (fclose(pMatrixFile) < 0) return 0; return 1; } /* * OUTPUT SOURCE VECTOR TO FILE * * Writes vector to file in format suitable to be read back in by the * matrix test program. This routine should be executed after the function * spFileMatrix. * * >>> Returns: * One is returned if routine was successful, otherwise zero is returned. * The calling function can query errno (the system global error variable) * as to the reason why this routine failed. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * File (char *) * Name of file into which matrix is to be written. * RHS (RealNumber []) * Right-hand side vector. This is only the real portion if * spSEPARATED_COMPLEX_VECTORS is true. * iRHS (RealNumber []) * Right-hand side vector, imaginary portion. Not necessary if matrix * is real or if spSEPARATED_COMPLEX_VECTORS is set false. * * >>> Local variables: * pMatrixFile (FILE *) * File pointer to the matrix file. * Size (int) * The size of the matrix. * * >>> Obscure Macros * IMAG_RHS * Replaces itself with `, iRHS' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ int spFileVector( eMatrix, File, RHS IMAG_RHS ) char *eMatrix, *File; RealVector RHS IMAG_RHS; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int I, Size, Err; FILE *pMatrixFile; FILE *fopen(); /* Begin `spFileVector'. */ ASSERT( IS_SPARSE( Matrix ) AND RHS != NULL) /* Open File in append mode. */ if ((pMatrixFile = fopen(File,"a")) == NULL) return 0; /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET #if spCOMPLEX if (Matrix->Complex) { #if spSEPARATED_COMPLEX_VECTORS ASSERT(iRHS != NULL) --RHS; --iRHS; #else RHS -= 2; #endif } else #endif /* spCOMPLEX */ --RHS; #endif /* NOT ARRAY_OFFSET */ /* Output vector. */ Size = Matrix->Size; #if spCOMPLEX if (Matrix->Complex) { #if spSEPARATED_COMPLEX_VECTORS for (I = 1; I <= Size; I++) { Err = fprintf ( pMatrixFile, "%-.15lg\t%-.15lg\n", (double)RHS[I], (double)iRHS[I] ); if (Err < 0) return 0; } #else for (I = 1; I <= Size; I++) { Err = fprintf ( pMatrixFile, "%-.15lg\t%-.15lg\n", (double)RHS[2*I], (double)RHS[2*I+1] ); if (Err < 0) return 0; } #endif } #endif /* spCOMPLEX */ #if REAL AND spCOMPLEX else #endif #if REAL { for (I = 1; I <= Size; I++) { if (fprintf(pMatrixFile, "%-.15lg\n", (double)RHS[I]) < 0) return 0; } } #endif /* REAL */ /* Close file. */ if (fclose(pMatrixFile) < 0) return 0; return 1; } /* * OUTPUT STATISTICS TO FILE * * Writes useful information concerning the matrix to a file. Should be * executed after the matrix is factored. * * >>> Returns: * One is returned if routine was successful, otherwise zero is returned. * The calling function can query errno (the system global error variable) * as to the reason why this routine failed. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * File (char *) * Name of file into which matrix is to be written. * Label (char *) * String that is transferred to file and is used as a label. * * >>> Local variables: * Data (RealNumber) * The value of the matrix element being output. * LargestElement (RealNumber) * The largest element in the matrix. * NumberOfElements (int) * Number of nonzero elements in the matrix. * pElement (ElementPtr) * Pointer to an element in the matrix. * pStatsFile (FILE *) * File pointer to the statistics file. * Size (int) * The size of the matrix. * SmallestElement (RealNumber) * The smallest element in the matrix excluding zero elements. */ int spFileStats( eMatrix, File, Label ) char *eMatrix, *File, *Label; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int Size, I; register ElementPtr pElement; int NumberOfElements; RealNumber Data, LargestElement, SmallestElement; FILE *pStatsFile, *fopen(); /* Begin `spFileStats'. */ ASSERT( IS_SPARSE( Matrix ) ); /* Open File in append mode. */ if ((pStatsFile = fopen(File, "a")) == NULL) return 0; /* Output statistics. */ Size = Matrix->Size; if (NOT Matrix->Factored) fprintf(pStatsFile, "Matrix has not been factored.\n"); fprintf(pStatsFile, "||| Starting new matrix |||\n"); fprintf(pStatsFile, "%s\n", Label); if (Matrix->Complex) fprintf(pStatsFile, "Matrix is complex.\n"); else fprintf(pStatsFile, "Matrix is real.\n"); fprintf(pStatsFile," Size = %d\n",Size); /* Search matrix. */ NumberOfElements = 0; LargestElement = 0.0; SmallestElement = LARGEST_REAL; for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { NumberOfElements++; Data = ELEMENT_MAG(pElement); if (Data > LargestElement) LargestElement = Data; if (Data < SmallestElement AND Data != 0.0) SmallestElement = Data; pElement = pElement->NextInCol; } } SmallestElement = MIN( SmallestElement, LargestElement ); /* Output remaining statistics. */ fprintf(pStatsFile, " Initial number of elements = %d\n", NumberOfElements - Matrix->Fillins); fprintf(pStatsFile, " Initial average number of elements per row = %lf\n", (double)(NumberOfElements - Matrix->Fillins) / (double)Size); fprintf(pStatsFile, " Fill-ins = %d\n",Matrix->Fillins); fprintf(pStatsFile, " Average number of fill-ins per row = %lf%%\n", (double)Matrix->Fillins / (double)Size); fprintf(pStatsFile, " Total number of elements = %d\n", NumberOfElements); fprintf(pStatsFile, " Average number of elements per row = %lf\n", (double)NumberOfElements / (double)Size); fprintf(pStatsFile," Density = %lf%%\n", (double)(100.0*NumberOfElements)/(double)(Size*Size)); fprintf(pStatsFile," Relative Threshold = %e\n", Matrix->RelThreshold); fprintf(pStatsFile," Absolute Threshold = %e\n", Matrix->AbsThreshold); fprintf(pStatsFile," Largest Element = %e\n", LargestElement); fprintf(pStatsFile," Smallest Element = %e\n\n\n", SmallestElement); /* Close file. */ (void)fclose(pStatsFile); return 1; } #endif /* DOCUMENTATION */ neuron-7.5/src/sparse13/spsolve.c000077500000000000000000000543271323325274500170060ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * MATRIX SOLVE MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the forward and backward substitution routines for * the sparse matrix routines. * * >>> User accessible functions contained in this file: * spSolve * spSolveTransposed * * >>> Other functions contained in this file: * SolveComplexMatrix * SolveComplexTransposedMatrix */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef lint static char copyright[] = "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"; static char RCSid[] = "@(#)$Header$"; #endif /* * IMPORTS * * >>> Import descriptions: * spconfig.h * Macros that customize the sparse matrix routines. * spmatrix.h * Macros and declarations to be imported by the user. * spdefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "spmatrix.h" #include "spdefs.h" /* avoid "declared implicitly `extern' and later `static' " warnings. */ static void SolveComplexMatrix(); static void SolveComplexTransposedMatrix(); /* * SOLVE MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and factored matrix. This * routine assumes that the pivots are associated with the lower * triangular (L) matrix and that the diagonal of the upper triangular * (U) matrix consists of ones. This routine arranges the computation * in different way than is traditionally used in order to exploit the * sparsity of the right-hand side. See the reference in spRevision. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the input data array, the right hand side. This data is * undisturbed and may be reused for other solves. * Solution (RealVector) * Solution is the output data array. This routine is constructed such that * RHS and Solution can be the same array. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * This argument is only necessary if matrix is complex and if * spSEPARATED_COMPLEX_VECTOR is set true. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. This argument is only necessary if matrix is complex * and if spSEPARATED_COMPLEX_VECTOR is set true. * * >>> Local variables: * Intermediate (RealVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c Local version of * Matrix->Intermediate, which was created during the initial * factorization in function CreateInternalVectors() in the matrix * factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtColMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (RealNumber) * Temporary storage for entries in arrays. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ /*VARARGS3*/ void spSolve( eMatrix, RHS, Solution IMAG_VECTORS ) char *eMatrix; RealVector RHS, Solution IMAG_VECTORS; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register RealVector Intermediate; register RealNumber Temp; register int I, *pExtOrder, Size; ElementPtr pPivot; /* Begin `spSolve'. */ ASSERT( IS_VALID(Matrix) AND IS_FACTORED(Matrix) ); #if spCOMPLEX if (Matrix->Complex) { SolveComplexMatrix( Matrix, RHS, Solution IMAG_VECTORS ); return; } #endif #if REAL Intermediate = Matrix->Intermediate; Size = Matrix->Size; /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET --RHS; --Solution; #endif /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; for (I = Size; I > 0; I--) Intermediate[I] = RHS[*(pExtOrder--)]; /* Forward elimination. Solves Lc = b.*/ for (I = 1; I <= Size; I++) { /* This step of the elimination is skipped if Temp equals zero. */ if ((Temp = Intermediate[I]) != 0.0) { pPivot = Matrix->Diag[I]; Intermediate[I] = (Temp *= pPivot->Real); pElement = pPivot->NextInCol; while (pElement != NULL) { Intermediate[pElement->Row] -= Temp * pElement->Real; pElement = pElement->NextInCol; } } } /* Backward Substitution. Solves Ux = c.*/ for (I = Size; I > 0; I--) { Temp = Intermediate[I]; pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { Temp -= pElement->Real * Intermediate[pElement->Col]; pElement = pElement->NextInRow; } Intermediate[I] = Temp; } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; for (I = Size; I > 0; I--) Solution[*(pExtOrder--)] = Intermediate[I]; return; #endif /* REAL */ } #if spCOMPLEX /* * SOLVE COMPLEX MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and factored matrix. This * routine assumes that the pivots are associated with the lower * triangular (L) matrix and that the diagonal of the upper triangular * (U) matrix consists of ones. This routine arranges the computation * in different way than is traditionally used in order to exploit the * sparsity of the right-hand side. See the reference in spRevision. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the real portion of the input data array, the right hand * side. This data is undisturbed and may be reused for other solves. * Solution (RealVector) * Solution is the real portion of the output data array. This routine * is constructed such that RHS and Solution can be the same * array. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * If spSEPARATED_COMPLEX_VECTOR is set false, there is no need to * supply this array. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. If spSEPARATED_COMPLEX_VECTOR is set false, there is no * need to supply this array. * * >>> Local variables: * Intermediate (ComplexVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c. * Local version of Matrix->Intermediate, which was created during * the initial factorization in function CreateInternalVectors() in the * matrix factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtColMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (ComplexNumber) * Temporary storage for entries in arrays. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ static void SolveComplexMatrix( Matrix, RHS, Solution IMAG_VECTORS ) MatrixPtr Matrix; RealVector RHS, Solution IMAG_VECTORS; { register ElementPtr pElement; register ComplexVector Intermediate; register int I, *pExtOrder, Size; ElementPtr pPivot; register ComplexVector ExtVector; ComplexNumber Temp; /* Begin `SolveComplexMatrix'. */ Size = Matrix->Size; Intermediate = (ComplexVector)Matrix->Intermediate; /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET #if spSEPARATED_COMPLEX_VECTORS --RHS; --iRHS; --Solution; --iSolution; #else RHS -= 2; Solution -= 2; #endif #endif /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; #if spSEPARATED_COMPLEX_VECTORS for (I = Size; I > 0; I--) { Intermediate[I].Real = RHS[*(pExtOrder)]; Intermediate[I].Imag = iRHS[*(pExtOrder--)]; } #else ExtVector = (ComplexVector)RHS; for (I = Size; I > 0; I--) Intermediate[I] = ExtVector[*(pExtOrder--)]; #endif /* Forward substitution. Solves Lc = b.*/ for (I = 1; I <= Size; I++) { Temp = Intermediate[I]; /* This step of the substitution is skipped if Temp equals zero. */ if ((Temp.Real != 0.0) OR (Temp.Imag != 0.0)) { pPivot = Matrix->Diag[I]; /* Cmplx expr: Temp *= (1.0 / Pivot). */ CMPLX_MULT_ASSIGN(Temp, *pPivot); Intermediate[I] = Temp; pElement = pPivot->NextInCol; while (pElement != NULL) { /* Cmplx expr: Intermediate[Element->Row] -= Temp * *Element. */ CMPLX_MULT_SUBT_ASSIGN(Intermediate[pElement->Row], Temp, *pElement); pElement = pElement->NextInCol; } } } /* Backward Substitution. Solves Ux = c.*/ for (I = Size; I > 0; I--) { Temp = Intermediate[I]; pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: Temp -= *Element * Intermediate[Element->Col]. */ CMPLX_MULT_SUBT_ASSIGN(Temp, *pElement,Intermediate[pElement->Col]); pElement = pElement->NextInRow; } Intermediate[I] = Temp; } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; #if spSEPARATED_COMPLEX_VECTORS for (I = Size; I > 0; I--) { Solution[*(pExtOrder)] = Intermediate[I].Real; iSolution[*(pExtOrder--)] = Intermediate[I].Imag; } #else ExtVector = (ComplexVector)Solution; for (I = Size; I > 0; I--) ExtVector[*(pExtOrder--)] = Intermediate[I]; #endif return; } #endif /* spCOMPLEX */ #if TRANSPOSE /* * SOLVE TRANSPOSED MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and transposed factored * matrix. This routine is useful when performing sensitivity analysis * on a circuit using the adjoint method. This routine assumes that * the pivots are associated with the untransposed lower triangular * (L) matrix and that the diagonal of the untransposed upper * triangular (U) matrix consists of ones. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the input data array, the right hand side. This data is * undisturbed and may be reused for other solves. * Solution (RealVector) * Solution is the output data array. This routine is constructed such that * RHS and Solution can be the same array. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * If spSEPARATED_COMPLEX_VECTOR is set false, or if matrix is real, there * is no need to supply this array. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. If spSEPARATED_COMPLEX_VECTOR is set false, or if * matrix is real, there is no need to supply this array. * * >>> Local variables: * Intermediate (RealVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c. Local version of * Matrix->Intermediate, which was created during the initial * factorization in function CreateInternalVectors() in the matrix * factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtRowMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (RealNumber) * Temporary storage for entries in arrays. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ /*VARARGS3*/ void spSolveTransposed( eMatrix, RHS, Solution IMAG_VECTORS ) char *eMatrix; RealVector RHS, Solution IMAG_VECTORS; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register RealVector Intermediate; register int I, *pExtOrder, Size; ElementPtr pPivot; RealNumber Temp; /* Begin `spSolveTransposed'. */ ASSERT( IS_VALID(Matrix) AND IS_FACTORED(Matrix) ); #if spCOMPLEX if (Matrix->Complex) { SolveComplexTransposedMatrix( Matrix, RHS, Solution IMAG_VECTORS ); return; } #endif #if REAL Size = Matrix->Size; Intermediate = Matrix->Intermediate; /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET --RHS; --Solution; #endif /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; for (I = Size; I > 0; I--) Intermediate[I] = RHS[*(pExtOrder--)]; /* Forward elimination. */ for (I = 1; I <= Size; I++) { /* This step of the elimination is skipped if Temp equals zero. */ if ((Temp = Intermediate[I]) != 0.0) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { Intermediate[pElement->Col] -= Temp * pElement->Real; pElement = pElement->NextInRow; } } } /* Backward Substitution. */ for (I = Size; I > 0; I--) { pPivot = Matrix->Diag[I]; Temp = Intermediate[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { Temp -= pElement->Real * Intermediate[pElement->Row]; pElement = pElement->NextInCol; } Intermediate[I] = Temp * pPivot->Real; } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; for (I = Size; I > 0; I--) Solution[*(pExtOrder--)] = Intermediate[I]; return; #endif /* REAL */ } #endif /* TRANSPOSE */ #if TRANSPOSE AND spCOMPLEX /* * SOLVE COMPLEX TRANSPOSED MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and transposed factored * matrix. This routine is useful when performing sensitivity analysis * on a circuit using the adjoint method. This routine assumes that * the pivots are associated with the untransposed lower triangular * (L) matrix and that the diagonal of the untransposed upper * triangular (U) matrix consists of ones. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the input data array, the right hand * side. This data is undisturbed and may be reused for other solves. * This vector is only the real portion if the matrix is complex and * spSEPARATED_COMPLEX_VECTORS is set true. * Solution (RealVector) * Solution is the real portion of the output data array. This routine * is constructed such that RHS and Solution can be the same array. * This vector is only the real portion if the matrix is complex and * spSEPARATED_COMPLEX_VECTORS is set true. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * If either spCOMPLEX or spSEPARATED_COMPLEX_VECTOR is set false, there * is no need to supply this array. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. If spCOMPLEX or spSEPARATED_COMPLEX_VECTOR is set * false, there is no need to supply this array. * * >>> Local variables: * Intermediate (ComplexVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c. Local version of * Matrix->Intermediate, which was created during * the initial factorization in function CreateInternalVectors() in the * matrix factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtColMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (ComplexNumber) * Temporary storage for entries in arrays. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ static void SolveComplexTransposedMatrix(Matrix, RHS, Solution IMAG_VECTORS ) MatrixPtr Matrix; RealVector RHS, Solution IMAG_VECTORS; { register ElementPtr pElement; register ComplexVector Intermediate; register int I, *pExtOrder, Size; register ComplexVector ExtVector; ElementPtr pPivot; ComplexNumber Temp; /* Begin `SolveComplexTransposedMatrix'. */ Size = Matrix->Size; Intermediate = (ComplexVector)Matrix->Intermediate; /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET #if spSEPARATED_COMPLEX_VECTORS --RHS; --iRHS; --Solution; --iSolution; #else RHS -= 2; Solution -= 2; #endif #endif /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; #if spSEPARATED_COMPLEX_VECTORS for (I = Size; I > 0; I--) { Intermediate[I].Real = RHS[*(pExtOrder)]; Intermediate[I].Imag = iRHS[*(pExtOrder--)]; } #else ExtVector = (ComplexVector)RHS; for (I = Size; I > 0; I--) Intermediate[I] = ExtVector[*(pExtOrder--)]; #endif /* Forward elimination. */ for (I = 1; I <= Size; I++) { Temp = Intermediate[I]; /* This step of the elimination is skipped if Temp equals zero. */ if ((Temp.Real != 0.0) OR (Temp.Imag != 0.0)) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: Intermediate[Element->Col] -= Temp * *Element. */ CMPLX_MULT_SUBT_ASSIGN( Intermediate[pElement->Col], Temp, *pElement); pElement = pElement->NextInRow; } } } /* Backward Substitution. */ for (I = Size; I > 0; I--) { pPivot = Matrix->Diag[I]; Temp = Intermediate[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { /* Cmplx expr: Temp -= Intermediate[Element->Row] * *Element. */ CMPLX_MULT_SUBT_ASSIGN(Temp,Intermediate[pElement->Row],*pElement); pElement = pElement->NextInCol; } /* Cmplx expr: Intermediate = Temp * (1.0 / *pPivot). */ CMPLX_MULT(Intermediate[I], Temp, *pPivot); } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; #if spSEPARATED_COMPLEX_VECTORS for (I = Size; I > 0; I--) { Solution[*(pExtOrder)] = Intermediate[I].Real; iSolution[*(pExtOrder--)] = Intermediate[I].Imag; } #else ExtVector = (ComplexVector)Solution; for (I = Size; I > 0; I--) ExtVector[*(pExtOrder--)] = Intermediate[I]; #endif return; } #endif /* TRANSPOSE AND spCOMPLEX */ neuron-7.5/src/sparse13/sputils.c000077500000000000000000002042331323325274500170070ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include <../../nrnconf.h> #endif /* * MATRIX UTILITY MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains various optional utility routines. * * >>> User accessible functions contained in this file: * spMNA_Preorder * spScale * spMultiply * spMultTransposed * spDeterminant * spStrip * spDeleteRowAndCol * spPseudoCondition * spCondition * spNorm * spLargestElement * spRoundoff * * >>> Other functions contained in this file: * CountTwins * SwapCols * ScaleComplexMatrix * ComplexMatrixMultiply * ComplexCondition */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef lint static char copyright[] = "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"; static char RCSid[] = "@(#)$Header$"; #endif /* * IMPORTS * * >>> Import descriptions: * spconfig.h * Macros that customize the sparse matrix routines. * spmatrix.h * Macros and declarations to be imported by the user. * spdefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "spmatrix.h" #include "spdefs.h" extern void spcLinkRows(MatrixPtr); extern void spcRowExchange(MatrixPtr, int row1, int row2); extern void spcColExchange(MatrixPtr, int col1, int col2); /* avoid "declared implicitly `extern' and later `static' " warnings. */ static int CountTwins(); static void SwapCols(); static void ScaleComplexMatrix(); static void ComplexMatrixMultiply(); static void ComplexTransposedMatrixMultiply(); static RealNumber ComplexCondition(); #if MODIFIED_NODAL /* * PREORDER MODIFIED NODE ADMITTANCE MATRIX TO REMOVE ZEROS FROM DIAGONAL * * This routine massages modified node admittance matrices to remove * zeros from the diagonal. It takes advantage of the fact that the * row and column associated with a zero diagonal usually have * structural ones placed symmetricly. This routine should be used * only on modified node admittance matrices and should be executed * after the matrix has been built but before the factorization * begins. It should be executed for the initial factorization only * and should be executed before the rows have been linked. Thus it * should be run before using spScale(), spMultiply(), * spDeleteRowAndCol(), or spNorm(). * * This routine exploits the fact that the structural ones are placed * in the matrix in symmetric twins. For example, the stamps for * grounded and a floating voltage sources are * grounded: floating: * [ x x 1 ] [ x x 1 ] * [ x x ] [ x x -1 ] * [ 1 ] [ 1 -1 ] * Notice for the grounded source, there is one set of twins, and for * the floating, there are two sets. We remove the zero from the diagonal * by swapping the rows associated with a set of twins. For example: * grounded: floating 1: floating 2: * [ 1 ] [ 1 -1 ] [ x x 1 ] * [ x x ] [ x x -1 ] [ 1 -1 ] * [ x x 1 ] [ x x 1 ] [ x x -1 ] * * It is important to deal with any zero diagonals that only have one * set of twins before dealing with those that have more than one because * swapping row destroys the symmetry of any twins in the rows being * swapped, which may limit future moves. Consider * [ x x 1 ] * [ x x -1 1 ] * [ 1 -1 ] * [ 1 ] * There is one set of twins for diagonal 4 and two for diagonal 3. * Dealing with diagonal 4 first requires swapping rows 2 and 4. * [ x x 1 ] * [ 1 ] * [ 1 -1 ] * [ x x -1 1 ] * We can now deal with diagonal 3 by swapping rows 1 and 3. * [ 1 -1 ] * [ 1 ] * [ x x 1 ] * [ x x -1 1 ] * And we are done, there are no zeros left on the diagonal. However, if * we originally dealt with diagonal 3 first, we could swap rows 2 and 3 * [ x x 1 ] * [ 1 -1 ] * [ x x -1 1 ] * [ 1 ] * Diagonal 4 no longer has a symmetric twin and we cannot continue. * * So we always take care of lone twins first. When none remain, we * choose arbitrarily a set of twins for a diagonal with more than one set * and swap the rows corresponding to that twin. We then deal with any * lone twins that were created and repeat the procedure until no * zero diagonals with symmetric twins remain. * * In this particular implementation, columns are swapped rather than rows. * The algorithm used in this function was developed by Ken Kundert and * Tom Quarles. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix to be preordered. * * >>> Local variables; * J (int) * Column with zero diagonal being currently considered. * pTwin1 (ElementPtr) * Pointer to the twin found in the column belonging to the zero diagonal. * pTwin2 (ElementPtr) * Pointer to the twin found in the row belonging to the zero diagonal. * belonging to the zero diagonal. * AnotherPassNeeded (BOOLEAN) * Flag indicating that at least one zero diagonal with symmetric twins * remain. * StartAt (int) * Column number of first zero diagonal with symmetric twins. * Swapped (BOOLEAN) * Flag indicating that columns were swapped on this pass. * Twins (int) * Number of symmetric twins corresponding to current zero diagonal. */ void spMNA_Preorder( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int J, Size; ElementPtr pTwin1=0, pTwin2=0; int Twins, StartAt = 1; BOOLEAN Swapped, AnotherPassNeeded; /* Begin `spMNA_Preorder'. */ ASSERT( IS_VALID(Matrix) AND NOT Matrix->Factored ); if (Matrix->RowsLinked) return; Size = Matrix->Size; Matrix->Reordered = YES; do { AnotherPassNeeded = Swapped = NO; /* Search for zero diagonals with lone twins. */ for (J = StartAt; J <= Size; J++) { if (Matrix->Diag[J] == NULL) { Twins = CountTwins( Matrix, J, &pTwin1, &pTwin2 ); if (Twins == 1) { /* Lone twins found, swap rows. */ SwapCols( Matrix, pTwin1, pTwin2 ); Swapped = YES; } else if ((Twins > 1) AND NOT AnotherPassNeeded) { AnotherPassNeeded = YES; StartAt = J; } } } /* All lone twins are gone, look for zero diagonals with multiple twins. */ if (AnotherPassNeeded) { for (J = StartAt; NOT Swapped AND (J <= Size); J++) { if (Matrix->Diag[J] == NULL) { Twins = CountTwins( Matrix, J, &pTwin1, &pTwin2 ); SwapCols( Matrix, pTwin1, pTwin2 ); Swapped = YES; } } } } while (AnotherPassNeeded); return; } /* * COUNT TWINS * * This function counts the number of symmetric twins associated with * a zero diagonal and returns one set of twins if any exist. The * count is terminated early at two. */ static int CountTwins( Matrix, Col, ppTwin1, ppTwin2 ) MatrixPtr Matrix; int Col; ElementPtr *ppTwin1, *ppTwin2; { int Row, Twins = 0; ElementPtr pTwin1, pTwin2; /* Begin `CountTwins'. */ pTwin1 = Matrix->FirstInCol[Col]; while (pTwin1 != NULL) { if (ABS(pTwin1->Real) == 1.0) { Row = pTwin1->Row; pTwin2 = Matrix->FirstInCol[Row]; while ((pTwin2 != NULL) AND (pTwin2->Row != Col)) pTwin2 = pTwin2->NextInCol; if ((pTwin2 != NULL) AND (ABS(pTwin2->Real) == 1.0)) { /* Found symmetric twins. */ if (++Twins >= 2) return Twins; (*ppTwin1 = pTwin1)->Col = Col; (*ppTwin2 = pTwin2)->Col = Row; } } pTwin1 = pTwin1->NextInCol; } return Twins; } /* * SWAP COLUMNS * * This function swaps two columns and is applicable before the rows are * linked. */ static void SwapCols( Matrix, pTwin1, pTwin2 ) MatrixPtr Matrix; ElementPtr pTwin1, pTwin2; { int Col1 = pTwin1->Col, Col2 = pTwin2->Col; /* Begin `SwapCols'. */ SWAP (ElementPtr, Matrix->FirstInCol[Col1], Matrix->FirstInCol[Col2]); SWAP (int, Matrix->IntToExtColMap[Col1], Matrix->IntToExtColMap[Col2]); #if TRANSLATE Matrix->ExtToIntColMap[Matrix->IntToExtColMap[Col2]]=Col2; Matrix->ExtToIntColMap[Matrix->IntToExtColMap[Col1]]=Col1; #endif Matrix->Diag[Col1] = pTwin2; Matrix->Diag[Col2] = pTwin1; Matrix->NumberOfInterchangesIsOdd = NOT Matrix->NumberOfInterchangesIsOdd; return; } #endif /* MODIFIED_NODAL */ #if SCALING /* * SCALE MATRIX * * This function scales the matrix to enhance the possibility of * finding a good pivoting order. Note that scaling enhances accuracy * of the solution only if it affects the pivoting order, so it makes * no sense to scale the matrix before spFactor(). If scaling is * desired it should be done before spOrderAndFactor(). There * are several things to take into account when choosing the scale * factors. First, the scale factors are directly multiplied against * the elements in the matrix. To prevent roundoff, each scale factor * should be equal to an integer power of the number base of the * machine. Since most machines operate in base two, scale factors * should be a power of two. Second, the matrix should be scaled such * that the matrix of element uncertainties is equilibrated. Third, * this function multiplies the scale factors by the elements, so if * one row tends to have uncertainties 1000 times smaller than the * other rows, then its scale factor should be 1024, not 1/1024. * Fourth, to save time, this function does not scale rows or columns * if their scale factors are equal to one. Thus, the scale factors * should be normalized to the most common scale factor. Rows and * columns should be normalized separately. For example, if the size * of the matrix is 100 and 10 rows tend to have uncertainties near * 1e-6 and the remaining 90 have uncertainties near 1e-12, then the * scale factor for the 10 should be 1/1,048,576 and the scale factors * for the remaining 90 should be 1. Fifth, since this routine * directly operates on the matrix, it is necessary to apply the scale * factors to the RHS and Solution vectors. It may be easier to * simply use spOrderAndFactor() on a scaled matrix to choose the * pivoting order, and then throw away the matrix. Subsequent * factorizations, performed with spFactor(), will not need to have * the RHS and Solution vectors descaled. Lastly, this function * should not be executed before the function spMNA_Preorder. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix to be scaled. * SolutionScaleFactors (RealVector) * The array of Solution scale factors. These factors scale the columns. * All scale factors are real valued. * RHS_ScaleFactors (RealVector) * The array of RHS scale factors. These factors scale the rows. * All scale factors are real valued. * * >>> Local variables: * lSize (int) * Local version of the size of the matrix. * pElement (ElementPtr) * Pointer to an element in the matrix. * pExtOrder (int *) * Pointer into either IntToExtRowMap or IntToExtColMap vector. Used to * compensate for any row or column swaps that have been performed. * ScaleFactor (RealNumber) * The scale factor being used on the current row or column. */ void spScale( eMatrix, RHS_ScaleFactors, SolutionScaleFactors ) char *eMatrix; register RealVector RHS_ScaleFactors, SolutionScaleFactors; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register int I, lSize, *pExtOrder; RealNumber ScaleFactor; /* Begin `spScale'. */ ASSERT( IS_VALID(Matrix) AND NOT Matrix->Factored ); if (NOT Matrix->RowsLinked) spcLinkRows( Matrix ); #if spCOMPLEX if (Matrix->Complex) { ScaleComplexMatrix( Matrix, RHS_ScaleFactors, SolutionScaleFactors ); return; } #endif #if REAL lSize = Matrix->Size; /* Correct pointers to arrays for ARRAY_OFFSET */ #if NOT ARRAY_OFFSET --RHS_ScaleFactors; --SolutionScaleFactors; #endif /* Scale Rows */ pExtOrder = &Matrix->IntToExtRowMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = RHS_ScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInRow[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement = pElement->NextInRow; } } } /* Scale Columns */ pExtOrder = &Matrix->IntToExtColMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = SolutionScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement = pElement->NextInCol; } } } return; #endif /* REAL */ } #endif /* SCALING */ #if spCOMPLEX AND SCALING /* * SCALE COMPLEX MATRIX * * This function scales the matrix to enhance the possibility of * finding a good pivoting order. Note that scaling enhances accuracy * of the solution only if it affects the pivoting order, so it makes * no sense to scale the matrix before spFactor(). If scaling is * desired it should be done before spOrderAndFactor(). There * are several things to take into account when choosing the scale * factors. First, the scale factors are directly multiplied against * the elements in the matrix. To prevent roundoff, each scale factor * should be equal to an integer power of the number base of the * machine. Since most machines operate in base two, scale factors * should be a power of two. Second, the matrix should be scaled such * that the matrix of element uncertainties is equilibrated. Third, * this function multiplies the scale factors by the elements, so if * one row tends to have uncertainties 1000 times smaller than the * other rows, then its scale factor should be 1024, not 1/1024. * Fourth, to save time, this function does not scale rows or columns * if their scale factors are equal to one. Thus, the scale factors * should be normalized to the most common scale factor. Rows and * columns should be normalized separately. For example, if the size * of the matrix is 100 and 10 rows tend to have uncertainties near * 1e-6 and the remaining 90 have uncertainties near 1e-12, then the * scale factor for the 10 should be 1/1,048,576 and the scale factors * for the remaining 90 should be 1. Fifth, since this routine * directly operates on the matrix, it is necessary to apply the scale * factors to the RHS and Solution vectors. It may be easier to * simply use spOrderAndFactor() on a scaled matrix to choose the * pivoting order, and then throw away the matrix. Subsequent * factorizations, performed with spFactor(), will not need to have * the RHS and Solution vectors descaled. Lastly, this function * should not be executed before the function spMNA_Preorder. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix to be scaled. * SolutionScaleFactors (RealVector) * The array of Solution scale factors. These factors scale the columns. * All scale factors are real valued. * RHS_ScaleFactors (RealVector) * The array of RHS scale factors. These factors scale the rows. * All scale factors are real valued. * * >>> Local variables: * lSize (int) * Local version of the size of the matrix. * pElement (ElementPtr) * Pointer to an element in the matrix. * pExtOrder (int *) * Pointer into either IntToExtRowMap or IntToExtColMap vector. Used to * compensate for any row or column swaps that have been performed. * ScaleFactor (RealNumber) * The scale factor being used on the current row or column. */ static void ScaleComplexMatrix( Matrix, RHS_ScaleFactors, SolutionScaleFactors ) MatrixPtr Matrix; register RealVector RHS_ScaleFactors, SolutionScaleFactors; { register ElementPtr pElement; register int I, lSize, *pExtOrder; RealNumber ScaleFactor; /* Begin `ScaleComplexMatrix'. */ lSize = Matrix->Size; /* Correct pointers to arrays for ARRAY_OFFSET */ #if NOT ARRAY_OFFSET --RHS_ScaleFactors; --SolutionScaleFactors; #endif /* Scale Rows */ pExtOrder = &Matrix->IntToExtRowMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = RHS_ScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInRow[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement->Imag *= ScaleFactor; pElement = pElement->NextInRow; } } } /* Scale Columns */ pExtOrder = &Matrix->IntToExtColMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = SolutionScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement->Imag *= ScaleFactor; pElement = pElement->NextInCol; } } } return; } #endif /* SCALING AND spCOMPLEX */ #if MULTIPLICATION /* * MATRIX MULTIPLICATION * * Multiplies matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. It should not be used * before spMNA_Preorder(). * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ void spMultiply( eMatrix, RHS, Solution IMAG_VECTORS ) char *eMatrix; RealVector RHS, Solution IMAG_VECTORS; { register ElementPtr pElement; register RealVector Vector; register RealNumber Sum; register int I, *pExtOrder; MatrixPtr Matrix = (MatrixPtr)eMatrix; /* Begin `spMultiply'. */ ASSERT( IS_SPARSE( Matrix ) AND NOT Matrix->Factored ); if (NOT Matrix->RowsLinked) spcLinkRows(Matrix); #if spCOMPLEX if (Matrix->Complex) { ComplexMatrixMultiply( Matrix, RHS, Solution IMAG_VECTORS ); return; } #endif #if REAL #if NOT ARRAY_OFFSET /* Correct array pointers for ARRAY_OFFSET. */ --RHS; --Solution; #endif /* Initialize Intermediate vector with reordered Solution vector. */ Vector = Matrix->Intermediate; pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) Vector[I] = Solution[*(pExtOrder--)]; pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; Sum = 0.0; while (pElement != NULL) { Sum += pElement->Real * Vector[pElement->Col]; pElement = pElement->NextInRow; } RHS[*pExtOrder--] = Sum; } return; #endif /* REAL */ } #endif /* MULTIPLICATION */ #if spCOMPLEX AND MULTIPLICATION /* * COMPLEX MATRIX MULTIPLICATION * * Multiplies matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * This is only the real portion of the right-hand side if the matrix * is complex and spSEPARATED_COMPLEX_VECTORS is set true. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. This is only * the real portion if the matrix is complex and * spSEPARATED_COMPLEX_VECTORS is set true. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ static void ComplexMatrixMultiply( Matrix, RHS, Solution IMAG_VECTORS ) MatrixPtr Matrix; RealVector RHS, Solution IMAG_VECTORS; { register ElementPtr pElement; register ComplexVector Vector; register ComplexNumber Sum; register int I, *pExtOrder; /* Begin `ComplexMatrixMultiply'. */ /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET #if spSEPARATED_COMPLEX_VECTORS --RHS; --iRHS; --Solution; --iSolution; #else RHS -= 2; Solution -= 2; #endif #endif /* Initialize Intermediate vector with reordered Solution vector. */ Vector = (ComplexVector)Matrix->Intermediate; pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; #if spSEPARATED_COMPLEX_VECTORS for (I = Matrix->Size; I > 0; I--) { Vector[I].Real = Solution[*pExtOrder]; Vector[I].Imag = iSolution[*(pExtOrder--)]; } #else for (I = Matrix->Size; I > 0; I--) Vector[I] = ((ComplexVector)Solution)[*(pExtOrder--)]; #endif pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; Sum.Real = Sum.Imag = 0.0; while (pElement != NULL) { /* Cmplx expression : Sum += Element * Vector[Col] */ CMPLX_MULT_ADD_ASSIGN( Sum, *pElement, Vector[pElement->Col] ); pElement = pElement->NextInRow; } #if spSEPARATED_COMPLEX_VECTORS RHS[*pExtOrder] = Sum.Real; iRHS[*pExtOrder--] = Sum.Imag; #else ((ComplexVector)RHS)[*pExtOrder--] = Sum; #endif } return; } #endif /* spCOMPLEX AND MULTIPLICATION */ #if MULTIPLICATION AND TRANSPOSE /* * TRANSPOSED MATRIX MULTIPLICATION * * Multiplies transposed matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. It should not be used * before spMNA_Preorder(). * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ void spMultTransposed( eMatrix, RHS, Solution IMAG_VECTORS ) char *eMatrix; RealVector RHS, Solution IMAG_VECTORS; { register ElementPtr pElement; register RealVector Vector; register RealNumber Sum; register int I, *pExtOrder; MatrixPtr Matrix = (MatrixPtr)eMatrix; /* Begin `spMultTransposed'. */ ASSERT( IS_SPARSE( Matrix ) AND NOT Matrix->Factored ); #if spCOMPLEX if (Matrix->Complex) { ComplexTransposedMatrixMultiply( Matrix, RHS, Solution IMAG_VECTORS ); return; } #endif #if REAL #if NOT ARRAY_OFFSET /* Correct array pointers for ARRAY_OFFSET. */ --RHS; --Solution; #endif /* Initialize Intermediate vector with reordered Solution vector. */ Vector = Matrix->Intermediate; pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) Vector[I] = Solution[*(pExtOrder--)]; pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; Sum = 0.0; while (pElement != NULL) { Sum += pElement->Real * Vector[pElement->Row]; pElement = pElement->NextInCol; } RHS[*pExtOrder--] = Sum; } return; #endif /* REAL */ } #endif /* MULTIPLICATION AND TRANSPOSE */ #if spCOMPLEX AND MULTIPLICATION AND TRANSPOSE /* * COMPLEX TRANSPOSED MATRIX MULTIPLICATION * * Multiplies transposed matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * This is only the real portion of the right-hand side if the matrix * is complex and spSEPARATED_COMPLEX_VECTORS is set true. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. This is only * the real portion if the matrix is complex and * spSEPARATED_COMPLEX_VECTORS is set true. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. This is only necessary if the matrix is * complex and spSEPARATED_COMPLEX_VECTORS is true. * * >>> Obscure Macros * IMAG_VECTORS * Replaces itself with `, iRHS, iSolution' if the options spCOMPLEX and * spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears * without a trace. */ static void ComplexTransposedMatrixMultiply( Matrix, RHS, Solution IMAG_VECTORS ) MatrixPtr Matrix; RealVector RHS, Solution IMAG_VECTORS; { register ElementPtr pElement; register ComplexVector Vector; register ComplexNumber Sum; register int I, *pExtOrder; /* Begin `ComplexMatrixMultiply'. */ /* Correct array pointers for ARRAY_OFFSET. */ #if NOT ARRAY_OFFSET #if spSEPARATED_COMPLEX_VECTORS --RHS; --iRHS; --Solution; --iSolution; #else RHS -= 2; Solution -= 2; #endif #endif /* Initialize Intermediate vector with reordered Solution vector. */ Vector = (ComplexVector)Matrix->Intermediate; pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; #if spSEPARATED_COMPLEX_VECTORS for (I = Matrix->Size; I > 0; I--) { Vector[I].Real = Solution[*pExtOrder]; Vector[I].Imag = iSolution[*(pExtOrder--)]; } #else for (I = Matrix->Size; I > 0; I--) Vector[I] = ((ComplexVector)Solution)[*(pExtOrder--)]; #endif pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; Sum.Real = Sum.Imag = 0.0; while (pElement != NULL) { /* Cmplx expression : Sum += Element * Vector[Row] */ CMPLX_MULT_ADD_ASSIGN( Sum, *pElement, Vector[pElement->Row] ); pElement = pElement->NextInCol; } #if spSEPARATED_COMPLEX_VECTORS RHS[*pExtOrder] = Sum.Real; iRHS[*pExtOrder--] = Sum.Imag; #else ((ComplexVector)RHS)[*pExtOrder--] = Sum; #endif } return; } #endif /* spCOMPLEX AND MULTIPLICATION AND TRANSPOSE */ #if DETERMINANT /* * CALCULATE DETERMINANT * * This routine in capable of calculating the determinant of the * matrix once the LU factorization has been performed. Hence, only * use this routine after spFactor() and before spClear(). * The determinant equals the product of all the diagonal elements of * the lower triangular matrix L, except that this product may need * negating. Whether the product or the negative product equals the * determinant is determined by the number of row and column * interchanges performed. Note that the determinants of matrices can * be very large or very small. On large matrices, the determinant * can be far larger or smaller than can be represented by a floating * point number. For this reason the determinant is scaled to a * reasonable value and the logarithm of the scale factor is returned. * * >>> Arguments: * eMatrix (char *) * A pointer to the matrix for which the determinant is desired. * pExponent (int *) * The logarithm base 10 of the scale factor for the determinant. To find * the actual determinant, Exponent should be added to the exponent of * Determinant. * pDeterminant (RealNumber *) * The real portion of the determinant. This number is scaled to be * greater than or equal to 1.0 and less than 10.0. * piDeterminant (RealNumber *) * The imaginary portion of the determinant. When the matrix is real * this pointer need not be supplied, nothing will be returned. This * number is scaled to be greater than or equal to 1.0 and less than 10.0. * * >>> Local variables: * Norm (RealNumber) * L-infinity norm of a complex number. * Size (int) * Local storage for Matrix->Size. Placed in a register for speed. * Temp (RealNumber) * Temporary storage for real portion of determinant. */ #if spCOMPLEX void spDeterminant( eMatrix, pExponent, pDeterminant, piDeterminant ) RealNumber *piDeterminant; #else void spDeterminant( eMatrix, pExponent, pDeterminant ) #endif char *eMatrix; register RealNumber *pDeterminant; int *pExponent; { register MatrixPtr Matrix = (MatrixPtr)eMatrix; register int I, Size; RealNumber Norm, nr, ni; ComplexNumber Pivot, cDeterminant; #define NORM(a) (nr = ABS((a).Real), ni = ABS((a).Imag), MAX (nr,ni)) /* Begin `spDeterminant'. */ ASSERT( IS_SPARSE( Matrix ) AND IS_FACTORED(Matrix) ); *pExponent = 0; if (Matrix->Error == spSINGULAR) { *pDeterminant = 0.0; #if spCOMPLEX if (Matrix->Complex) *piDeterminant = 0.0; #endif return; } Size = Matrix->Size; I = 0; #if spCOMPLEX if (Matrix->Complex) /* Complex Case. */ { cDeterminant.Real = 1.0; cDeterminant.Imag = 0.0; while (++I <= Size) { CMPLX_RECIPROCAL( Pivot, *Matrix->Diag[I] ); CMPLX_MULT_ASSIGN( cDeterminant, Pivot ); /* Scale Determinant. */ Norm = NORM( cDeterminant ); if (Norm != 0.0) { while (Norm >= 1.0e12) { cDeterminant.Real *= 1.0e-12; cDeterminant.Imag *= 1.0e-12; *pExponent += 12; Norm = NORM( cDeterminant ); } while (Norm < 1.0e-12) { cDeterminant.Real *= 1.0e12; cDeterminant.Imag *= 1.0e12; *pExponent -= 12; Norm = NORM( cDeterminant ); } } } /* Scale Determinant again, this time to be between 1.0 <= x < 10.0. */ Norm = NORM( cDeterminant ); if (Norm != 0.0) { while (Norm >= 10.0) { cDeterminant.Real *= 0.1; cDeterminant.Imag *= 0.1; (*pExponent)++; Norm = NORM( cDeterminant ); } while (Norm < 1.0) { cDeterminant.Real *= 10.0; cDeterminant.Imag *= 10.0; (*pExponent)--; Norm = NORM( cDeterminant ); } } if (Matrix->NumberOfInterchangesIsOdd) CMPLX_NEGATE( cDeterminant ); *pDeterminant = cDeterminant.Real; *piDeterminant = cDeterminant.Imag; } #endif /* spCOMPLEX */ #if REAL AND spCOMPLEX else #endif #if REAL { /* Real Case. */ *pDeterminant = 1.0; while (++I <= Size) { *pDeterminant /= Matrix->Diag[I]->Real; /* Scale Determinant. */ if (*pDeterminant != 0.0) { while (ABS(*pDeterminant) >= 1.0e12) { *pDeterminant *= 1.0e-12; *pExponent += 12; } while (ABS(*pDeterminant) < 1.0e-12) { *pDeterminant *= 1.0e12; *pExponent -= 12; } } } /* Scale Determinant again, this time to be between 1.0 <= x < 10.0. */ if (*pDeterminant != 0.0) { while (ABS(*pDeterminant) >= 10.0) { *pDeterminant *= 0.1; (*pExponent)++; } while (ABS(*pDeterminant) < 1.0) { *pDeterminant *= 10.0; (*pExponent)--; } } if (Matrix->NumberOfInterchangesIsOdd) *pDeterminant = -*pDeterminant; } #endif /* REAL */ } #endif /* DETERMINANT */ #if STRIP /* * STRIP FILL-INS FROM MATRIX * * Strips the matrix of all fill-ins. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix to be stripped. * * >>> Local variables: * pElement (ElementPtr) * Pointer that is used to step through the matrix. * ppElement (ElementPtr *) * Pointer to the location of an ElementPtr. This location will be * updated if a fill-in is stripped from the matrix. * pFillin (ElementPtr) * Pointer used to step through the lists of fill-ins while marking them. * pLastFillin (ElementPtr) * A pointer to the last fill-in in the list. Used to terminate a loop. * pListNode (struct FillinListNodeStruct *) * A pointer to a node in the FillinList linked-list. */ void spStripFills( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; struct FillinListNodeStruct *pListNode; /* Begin `spStripFills'. */ ASSERT( IS_SPARSE( Matrix ) ); if (Matrix->Fillins == 0) return; Matrix->NeedsOrdering = YES; Matrix->Elements -= Matrix->Fillins; Matrix->Fillins = 0; /* Mark the fill-ins. */ { register ElementPtr pFillin, pLastFillin; pListNode = Matrix->LastFillinListNode = Matrix->FirstFillinListNode; Matrix->FillinsRemaining = pListNode->NumberOfFillinsInList; Matrix->NextAvailFillin = pListNode->pFillinList; while (pListNode != NULL) { pFillin = pListNode->pFillinList; pLastFillin = &(pFillin[ pListNode->NumberOfFillinsInList - 1 ]); while (pFillin <= pLastFillin) (pFillin++)->Row = 0; pListNode = pListNode->Next; } } /* Unlink fill-ins by searching for elements marked with Row = 0. */ { register ElementPtr pElement, *ppElement; register int I, Size = Matrix->Size; /* Unlink fill-ins in all columns. */ for (I = 1; I <= Size; I++) { ppElement = &(Matrix->FirstInCol[I]); while ((pElement = *ppElement) != NULL) { if (pElement->Row == 0) { *ppElement = pElement->NextInCol; /* Unlink fill-in. */ if (Matrix->Diag[pElement->Col] == pElement) Matrix->Diag[pElement->Col] = NULL; } else ppElement = &pElement->NextInCol; /* Skip element. */ } } /* Unlink fill-ins in all rows. */ for (I = 1; I <= Size; I++) { ppElement = &(Matrix->FirstInRow[I]); while ((pElement = *ppElement) != NULL) { if (pElement->Row == 0) *ppElement = pElement->NextInRow; /* Unlink fill-in. */ else ppElement = &pElement->NextInRow; /* Skip element. */ } } } return; } #endif #if TRANSLATE AND DELETE /* * DELETE A ROW AND COLUMN FROM THE MATRIX * * Deletes a row and a column from a matrix. * * Sparse will abort if an attempt is made to delete a row or column that * doesn't exist. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix in which the row and column are to be deleted. * Row (int) * Row to be deleted. * Col (int) * Column to be deleted. * * >>> Local variables: * ExtCol (int) * The external column that is being deleted. * ExtRow (int) * The external row that is being deleted. * pElement (ElementPtr) * Pointer to an element in the matrix. Used when scanning rows and * columns in order to eliminate elements from the last row or column. * ppElement (ElementPtr *) * Pointer to the location of an ElementPtr. This location will be * filled with a NULL pointer if it is the new last element in its row * or column. * pElement (ElementPtr) * Pointer to an element in the last row or column of the matrix. * Size (int) * The local version Matrix->Size, the size of the matrix. */ void spDeleteRowAndCol( eMatrix, Row, Col ) char *eMatrix; int Row, Col; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement, *ppElement, pLastElement; int Size, ExtRow, ExtCol; ElementPtr spcFindElementInCol(); /* Begin `spDeleteRowAndCol'. */ ASSERT( IS_SPARSE(Matrix) AND Row > 0 AND Col > 0 ); ASSERT( Row <= Matrix->ExtSize AND Col <= Matrix->ExtSize ); Size = Matrix->Size; ExtRow = Row; ExtCol = Col; if (NOT Matrix->RowsLinked) spcLinkRows( Matrix ); Row = Matrix->ExtToIntRowMap[Row]; Col = Matrix->ExtToIntColMap[Col]; ASSERT( Row > 0 AND Col > 0 ); /* Move Row so that it is the last row in the matrix. */ if (Row != Size) spcRowExchange( Matrix, Row, Size ); /* Move Col so that it is the last column in the matrix. */ if (Col != Size) spcColExchange( Matrix, Col, Size ); /* Correct Diag pointers. */ if (Row == Col) SWAP( ElementPtr, Matrix->Diag[Row], Matrix->Diag[Size] ) else { Matrix->Diag[Row] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Row, Row, Row, NO ); Matrix->Diag[Col] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Col, Col, Col, NO ); } /* * Delete last row and column of the matrix. */ /* Break the column links to every element in the last row. */ pLastElement = Matrix->FirstInRow[ Size ]; while (pLastElement != NULL) { ppElement = &(Matrix->FirstInCol[ pLastElement->Col ]); while ((pElement = *ppElement) != NULL) { if (pElement == pLastElement) *ppElement = NULL; /* Unlink last element in column. */ else ppElement = &pElement->NextInCol; /* Skip element. */ } pLastElement = pLastElement->NextInRow; } /* Break the row links to every element in the last column. */ pLastElement = Matrix->FirstInCol[ Size ]; while (pLastElement != NULL) { ppElement = &(Matrix->FirstInRow[ pLastElement->Row ]); while ((pElement = *ppElement) != NULL) { if (pElement == pLastElement) *ppElement = NULL; /* Unlink last element in row. */ else ppElement = &pElement->NextInRow; /* Skip element. */ } pLastElement = pLastElement->NextInCol; } /* Clean up some details. */ Matrix->Size = Size - 1; Matrix->Diag[Size] = NULL; Matrix->FirstInRow[Size] = NULL; Matrix->FirstInCol[Size] = NULL; Matrix->CurrentSize--; Matrix->ExtToIntRowMap[ExtRow] = -1; Matrix->ExtToIntColMap[ExtCol] = -1; Matrix->NeedsOrdering = YES; return; } #endif #if PSEUDOCONDITION /* * CALCULATE PSEUDOCONDITION * * Computes the magnitude of the ratio of the largest to the smallest * pivots. This quantity is an indicator of ill-conditioning in the * matrix. If this ratio is large, and if the matrix is scaled such * that uncertainties in the RHS and the matrix entries are * equilibrated, then the matrix is ill-conditioned. However, a small * ratio does not necessarily imply that the matrix is * well-conditioned. This routine must only be used after a matrix has * been factored by spOrderAndFactor() or spFactor() and before it is * cleared by spClear() or spInitialize(). The pseudocondition is * faster to compute than the condition number calculated by * spCondition(), but is not as informative. * * >>> Returns: * The magnitude of the ratio of the largest to smallest pivot used during * previous factorization. If the matrix was singular, zero is returned. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. */ RealNumber spPseudoCondition( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int I; register ArrayOfElementPtrs Diag; RealNumber MaxPivot, MinPivot, Mag; /* Begin `spPseudoCondition'. */ ASSERT( IS_SPARSE(Matrix) AND IS_FACTORED(Matrix) ); if (Matrix->Error == spSINGULAR OR Matrix->Error == spZERO_DIAG) return 0.0; Diag = Matrix->Diag; MaxPivot = MinPivot = ELEMENT_MAG( Diag[1] ); for (I = 2; I <= Matrix->Size; I++) { Mag = ELEMENT_MAG( Diag[I] ); if (Mag > MaxPivot) MaxPivot = Mag; else if (Mag < MinPivot) MinPivot = Mag; } ASSERT( MaxPivot > 0.0); return MaxPivot / MinPivot; } #endif #if CONDITION /* * ESTIMATE CONDITION NUMBER * * Computes an estimate of the condition number using a variation on * the LINPACK condition number estimation algorithm. This quantity is * an indicator of ill-conditioning in the matrix. To avoid problems * with overflow, the reciprocal of the condition number is returned. * If this number is small, and if the matrix is scaled such that * uncertainties in the RHS and the matrix entries are equilibrated, * then the matrix is ill-conditioned. If the this number is near * one, the matrix is well conditioned. This routine must only be * used after a matrix has been factored by spOrderAndFactor() or * spFactor() and before it is cleared by spClear() or spInitialize(). * * Unlike the LINPACK condition number estimator, this routines * returns the L infinity condition number. This is an artifact of * Sparse placing ones on the diagonal of the upper triangular matrix * rather than the lower. This difference should be of no importance. * * References: * A.K. Cline, C.B. Moler, G.W. Stewart, J.H. Wilkinson. An estimate * for the condition number of a matrix. SIAM Journal on Numerical * Analysis. Vol. 16, No. 2, pages 368-375, April 1979. * * J.J. Dongarra, C.B. Moler, J.R. Bunch, G.W. Stewart. LINPACK * User's Guide. SIAM, 1979. * * Roger G. Grimes, John G. Lewis. Condition number estimation for * sparse matrices. SIAM Journal on Scientific and Statistical * Computing. Vol. 2, No. 4, pages 384-388, December 1981. * * Dianne Prost O'Leary. Estimating matrix condition numbers. SIAM * Journal on Scientific and Statistical Computing. Vol. 1, No. 2, * pages 205-209, June 1980. * * >>> Returns: * The reciprocal of the condition number. If the matrix was singular, * zero is returned. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. * NormOfMatrix (RealNumber) * The L-infinity norm of the unfactored matrix as computed by * spNorm(). * pError (int *) * Used to return error code. * * >>> Possible errors: * spSINGULAR * spNO_MEMORY */ RealNumber spCondition( eMatrix, NormOfMatrix, pError ) char *eMatrix; RealNumber NormOfMatrix; int *pError; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register RealVector T, Tm; register int I, K, Row; ElementPtr pPivot; int Size; RealNumber E, Em, Wp, Wm, ASp, ASm, ASw, ASy, ASv, ASz, MaxY, ScaleFactor; RealNumber Linpack, OLeary, InvNormOfInverse; #define SLACK 1e4 /* Begin `spCondition'. */ ASSERT( IS_SPARSE(Matrix) AND IS_FACTORED(Matrix) ); *pError = Matrix->Error; if (Matrix->Error >= spFATAL) return 0.0; if (NormOfMatrix == 0.0) { *pError = spSINGULAR; return 0.0; } #if spCOMPLEX if (Matrix->Complex) return ComplexCondition( Matrix, NormOfMatrix, pError ); #endif #if REAL Size = Matrix->Size; T = Matrix->Intermediate; #if spCOMPLEX Tm = Matrix->Intermediate + Size; #else Tm = ALLOC( RealNumber, Size+1 ); if (Tm == NULL) { *pError = spNO_MEMORY; return 0.0; } #endif for (I = Size; I > 0; I--) T[I] = 0.0; /* * Part 1. Ay = e. * Solve Ay = LUy = e where e consists of +1 and -1 terms with the sign * chosen to maximize the size of w in Lw = e. Since the terms in w can * get very large, scaling is used to avoid overflow. */ /* Forward elimination. Solves Lw = e while choosing e. */ E = 1.0; for (I = 1; I <= Size; I++) { pPivot = Matrix->Diag[I]; if (T[I] < 0.0) Em = -E; else Em = E; Wm = (Em + T[I]) * pPivot->Real; if (ABS(Wm) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(Wm) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; E *= ScaleFactor; Em *= ScaleFactor; Wm = (Em + T[I]) * pPivot->Real; } Wp = (T[I] - Em) * pPivot->Real; ASp = ABS(T[I] - Em); ASm = ABS(Em + T[I]); /* Update T for both values of W, minus value is placed in Tm. */ pElement = pPivot->NextInCol; while (pElement != NULL) { Row = pElement->Row; Tm[Row] = T[Row] - (Wm * pElement->Real); T[Row] -= (Wp * pElement->Real); ASp += ABS(T[Row]); ASm += ABS(Tm[Row]); pElement = pElement->NextInCol; } /* If minus value causes more growth, overwrite T with its values. */ if (ASm > ASp) { T[I] = Wm; pElement = pPivot->NextInCol; while (pElement != NULL) { T[pElement->Row] = Tm[pElement->Row]; pElement = pElement->NextInCol; } } else T[I] = Wp; } /* Compute 1-norm of T, which now contains w, and scale ||T|| to 1/SLACK. */ for (ASw = 0.0, I = Size; I > 0; I--) ASw += ABS(T[I]); ScaleFactor = 1.0 / (SLACK * ASw); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) T[I] *= ScaleFactor; E *= ScaleFactor; } /* Backward Substitution. Solves Uy = w.*/ for (I = Size; I >= 1; I--) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { T[I] -= pElement->Real * T[pElement->Col]; pElement = pElement->NextInRow; } if (ABS(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(T[I]) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; E *= ScaleFactor; } } /* Compute 1-norm of T, which now contains y, and scale ||T|| to 1/SLACK. */ for (ASy = 0.0, I = Size; I > 0; I--) ASy += ABS(T[I]); ScaleFactor = 1.0 / (SLACK * ASy); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) T[I] *= ScaleFactor; ASy = 1.0 / SLACK; E *= ScaleFactor; } /* Compute infinity-norm of T for O'Leary's estimate. */ for (MaxY = 0.0, I = Size; I > 0; I--) if (MaxY < ABS(T[I])) MaxY = ABS(T[I]); /* * Part 2. A* z = y where the * represents the transpose. * Recall that A = LU implies A* = U* L*. */ /* Forward elimination, U* v = y. */ for (I = 1; I <= Size; I++) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { T[pElement->Col] -= T[I] * pElement->Real; pElement = pElement->NextInRow; } if (ABS(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(T[I]) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains v, and scale ||T|| to 1/SLACK. */ for (ASv = 0.0, I = Size; I > 0; I--) ASv += ABS(T[I]); ScaleFactor = 1.0 / (SLACK * ASv); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) T[I] *= ScaleFactor; ASy *= ScaleFactor; } /* Backward Substitution, L* z = v. */ for (I = Size; I >= 1; I--) { pPivot = Matrix->Diag[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { T[I] -= pElement->Real * T[pElement->Row]; pElement = pElement->NextInCol; } T[I] *= pPivot->Real; if (ABS(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(T[I]) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains z. */ for (ASz = 0.0, I = Size; I > 0; I--) ASz += ABS(T[I]); #if NOT spCOMPLEX FREE( Tm ); #endif Linpack = ASy / ASz; OLeary = E / MaxY; InvNormOfInverse = MIN( Linpack, OLeary ); return InvNormOfInverse / NormOfMatrix; #endif /* REAL */ } #if spCOMPLEX /* * ESTIMATE CONDITION NUMBER * * Complex version of spCondition(). * * >>> Returns: * The reciprocal of the condition number. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * NormOfMatrix (RealNumber) * The L-infinity norm of the unfactored matrix as computed by * spNorm(). * pError (int *) * Used to return error code. * * >>> Possible errors: * spNO_MEMORY */ static RealNumber ComplexCondition( Matrix, NormOfMatrix, pError ) MatrixPtr Matrix; RealNumber NormOfMatrix; int *pError; { register ElementPtr pElement; register ComplexVector T, Tm; register int I, K, Row; ElementPtr pPivot; int Size; RealNumber E, Em, ASp, ASm, ASw, ASy, ASv, ASz, MaxY, ScaleFactor; RealNumber Linpack, OLeary, InvNormOfInverse; ComplexNumber Wp, Wm; /* Begin `ComplexCondition'. */ Size = Matrix->Size; T = (ComplexVector)Matrix->Intermediate; Tm = ALLOC( ComplexNumber, Size+1 ); if (Tm == NULL) { *pError = spNO_MEMORY; return 0.0; } for (I = Size; I > 0; I--) T[I].Real = T[I].Imag = 0.0; /* * Part 1. Ay = e. * Solve Ay = LUy = e where e consists of +1 and -1 terms with the sign * chosen to maximize the size of w in Lw = e. Since the terms in w can * get very large, scaling is used to avoid overflow. */ /* Forward elimination. Solves Lw = e while choosing e. */ E = 1.0; for (I = 1; I <= Size; I++) { pPivot = Matrix->Diag[I]; if (T[I].Real < 0.0) Em = -E; else Em = E; Wm = T[I]; Wm.Real += Em; ASm = CMPLX_1_NORM( Wm ); CMPLX_MULT_ASSIGN( Wm, *pPivot ); if (CMPLX_1_NORM(Wm) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(Wm) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); E *= ScaleFactor; Em *= ScaleFactor; ASm *= ScaleFactor; SCLR_MULT_ASSIGN( Wm, ScaleFactor ); } Wp = T[I]; Wp.Real -= Em; ASp = CMPLX_1_NORM( Wp ); CMPLX_MULT_ASSIGN( Wp, *pPivot ); /* Update T for both values of W, minus value is placed in Tm. */ pElement = pPivot->NextInCol; while (pElement != NULL) { Row = pElement->Row; /* Cmplx expr: Tm[Row] = T[Row] - (Wp * *pElement). */ CMPLX_MULT_SUBT( Tm[Row], Wm, *pElement, T[Row] ); /* Cmplx expr: T[Row] -= Wp * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[Row], Wm, *pElement ); ASp += CMPLX_1_NORM(T[Row]); ASm += CMPLX_1_NORM(Tm[Row]); pElement = pElement->NextInCol; } /* If minus value causes more growth, overwrite T with its values. */ if (ASm > ASp) { T[I] = Wm; pElement = pPivot->NextInCol; while (pElement != NULL) { T[pElement->Row] = Tm[pElement->Row]; pElement = pElement->NextInCol; } } else T[I] = Wp; } /* Compute 1-norm of T, which now contains w, and scale ||T|| to 1/SLACK. */ for (ASw = 0.0, I = Size; I > 0; I--) ASw += CMPLX_1_NORM(T[I]); ScaleFactor = 1.0 / (SLACK * ASw); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) SCLR_MULT_ASSIGN( T[I], ScaleFactor ); E *= ScaleFactor; } /* Backward Substitution. Solves Uy = w.*/ for (I = Size; I >= 1; I--) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: T[I] -= T[pElement->Col] * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[I], T[pElement->Col], *pElement ); pElement = pElement->NextInRow; } if (CMPLX_1_NORM(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(T[I]) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); E *= ScaleFactor; } } /* Compute 1-norm of T, which now contains y, and scale ||T|| to 1/SLACK. */ for (ASy = 0.0, I = Size; I > 0; I--) ASy += CMPLX_1_NORM(T[I]); ScaleFactor = 1.0 / (SLACK * ASy); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) SCLR_MULT_ASSIGN( T[I], ScaleFactor ); ASy = 1.0 / SLACK; E *= ScaleFactor; } /* Compute infinity-norm of T for O'Leary's estimate. */ for (MaxY = 0.0, I = Size; I > 0; I--) if (MaxY < CMPLX_1_NORM(T[I])) MaxY = CMPLX_1_NORM(T[I]); /* * Part 2. A* z = y where the * represents the transpose. * Recall that A = LU implies A* = U* L*. */ /* Forward elimination, U* v = y. */ for (I = 1; I <= Size; I++) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: T[pElement->Col] -= T[I] * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[pElement->Col], T[I], *pElement ); pElement = pElement->NextInRow; } if (CMPLX_1_NORM(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(T[I]) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains v, and scale ||T|| to 1/SLACK. */ for (ASv = 0.0, I = Size; I > 0; I--) ASv += CMPLX_1_NORM(T[I]); ScaleFactor = 1.0 / (SLACK * ASv); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) SCLR_MULT_ASSIGN( T[I], ScaleFactor ); ASy *= ScaleFactor; } /* Backward Substitution, L* z = v. */ for (I = Size; I >= 1; I--) { pPivot = Matrix->Diag[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { /* Cmplx expr: T[I] -= T[pElement->Row] * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[I], T[pElement->Row], *pElement ); pElement = pElement->NextInCol; } CMPLX_MULT_ASSIGN( T[I], *pPivot ); if (CMPLX_1_NORM(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(T[I]) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains z. */ for (ASz = 0.0, I = Size; I > 0; I--) ASz += CMPLX_1_NORM(T[I]); FREE( Tm ); Linpack = ASy / ASz; OLeary = E / MaxY; InvNormOfInverse = MIN( Linpack, OLeary ); return InvNormOfInverse / NormOfMatrix; } #endif /* spCOMPLEX */ /* * L-INFINITY MATRIX NORM * * Computes the L-infinity norm of an unfactored matrix. It is a fatal * error to pass this routine a factored matrix. * * One difficulty is that the rows may not be linked. * * >>> Returns: * The largest absolute row sum of matrix. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. */ RealNumber spNorm( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register int I; RealNumber Max = 0.0, AbsRowSum; /* Begin `spNorm'. */ ASSERT( IS_SPARSE(Matrix) AND NOT IS_FACTORED(Matrix) ); if (NOT Matrix->RowsLinked) spcLinkRows( Matrix ); /* Compute row sums. */ #if REAL if (NOT Matrix->Complex) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; AbsRowSum = 0.0; while (pElement != NULL) { AbsRowSum += ABS( pElement->Real ); pElement = pElement->NextInRow; } if (Max < AbsRowSum) Max = AbsRowSum; } } #endif #if spCOMPLEX if (Matrix->Complex) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; AbsRowSum = 0.0; while (pElement != NULL) { AbsRowSum += CMPLX_1_NORM( *pElement ); pElement = pElement->NextInRow; } if (Max < AbsRowSum) Max = AbsRowSum; } } #endif return Max; } #endif /* CONDITION */ #if STABILITY /* * STABILITY OF FACTORIZATION * * The following routines are used to gauge the stability of a * factorization. If the factorization is determined to be too unstable, * then the matrix should be reordered. The routines compute quantities * that are needed in the computation of a bound on the error attributed * to any one element in the matrix during the factorization. In other * words, there is a matrix E = [e_ij] of error terms such that A+E = LU. * This routine finds a bound on |e_ij|. Erisman & Reid [1] showed that * |e_ij| < 3.01 u rho m_ij, where u is the machine rounding unit, * rho = max a_ij where the max is taken over every row i, column j, and * step k, and m_ij is the number of multiplications required in the * computation of l_ij if i > j or u_ij otherwise. Barlow [2] showed that * rho < max_i || l_i ||_p max_j || u_j ||_q where 1/p + 1/q = 1. * * The first routine finds the magnitude on the largest element in the * matrix. If the matrix has not yet been factored, the largest * element is found by direct search. If the matrix is factored, a * bound on the largest element in any of the reduced submatrices is * computed using Barlow with p = oo and q = 1. The ratio of these * two numbers is the growth, which can be used to determine if the * pivoting order is adequate. A large growth implies that * considerable error has been made in the factorization and that it * is probably a good idea to reorder the matrix. If a large growth * in encountered after using spFactor(), reconstruct the matrix and * refactor using spOrderAndFactor(). If a large growth is * encountered after using spOrderAndFactor(), refactor using * spOrderAndFactor() with the pivot threshold increased, say to 0.1. * * Using only the size of the matrix as an upper bound on m_ij and * Barlow's bound, the user can estimate the size of the matrix error * terms e_ij using the bound of Erisman and Reid. The second routine * computes a tighter bound (with more work) based on work by Gear * [3], |e_ij| < 1.01 u rho (t c^3 + (1 + t)c^2) where t is the * threshold and c is the maximum number of off-diagonal elements in * any row of L. The expensive part of computing this bound is * determining the maximum number of off-diagonals in L, which changes * only when the order of the matrix changes. This number is computed * and saved, and only recomputed if the matrix is reordered. * * [1] A. M. Erisman, J. K. Reid. Monitoring the stability of the * triangular factorization of a sparse matrix. Numerische * Mathematik. Vol. 22, No. 3, 1974, pp 183-186. * * [2] J. L. Barlow. A note on monitoring the stability of triangular * decomposition of sparse matrices. "SIAM Journal of Scientific * and Statistical Computing." Vol. 7, No. 1, January 1986, pp 166-168. * * [3] I. S. Duff, A. M. Erisman, J. K. Reid. "Direct Methods for Sparse * Matrices." Oxford 1986. pp 99. */ /* * LARGEST ELEMENT IN MATRIX * * >>> Returns: * If matrix is not factored, returns the magnitude of the largest element in * the matrix. If the matrix is factored, a bound on the magnitude of the * largest element in any of the reduced submatrices is returned. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. */ RealNumber spLargestElement( eMatrix ) char *eMatrix; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register int I; RealNumber Mag, AbsColSum, Max = 0.0, MaxRow = 0.0, MaxCol = 0.0; RealNumber Pivot; ComplexNumber cPivot; register ElementPtr pElement, pDiag; /* Begin `spLargestElement'. */ ASSERT( IS_SPARSE(Matrix) ); #if REAL if (Matrix->Factored AND NOT Matrix->Complex) { if (Matrix->Error == spSINGULAR) return 0.0; /* Find the bound on the size of the largest element over all factorization. */ for (I = 1; I <= Matrix->Size; I++) { pDiag = Matrix->Diag[I]; /* Lower triangular matrix. */ Pivot = 1.0 / pDiag->Real; Mag = ABS( Pivot ); if (Mag > MaxRow) MaxRow = Mag; pElement = Matrix->FirstInRow[I]; while (pElement != pDiag) { Mag = ABS( pElement->Real ); if (Mag > MaxRow) MaxRow = Mag; pElement = pElement->NextInRow; } /* Upper triangular matrix. */ pElement = Matrix->FirstInCol[I]; AbsColSum = 1.0; /* Diagonal of U is unity. */ while (pElement != pDiag) { AbsColSum += ABS( pElement->Real ); pElement = pElement->NextInCol; } if (AbsColSum > MaxCol) MaxCol = AbsColSum; } } else if (NOT Matrix->Complex) { for (I = 1; I <= Matrix->Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { Mag = ABS( pElement->Real ); if (Mag > Max) Max = Mag; pElement = pElement->NextInCol; } } return Max; } #endif #if spCOMPLEX if (Matrix->Factored AND Matrix->Complex) { if (Matrix->Error == spSINGULAR) return 0.0; /* Find the bound on the size of the largest element over all factorization. */ for (I = 1; I <= Matrix->Size; I++) { pDiag = Matrix->Diag[I]; /* Lower triangular matrix. */ CMPLX_RECIPROCAL( cPivot, *pDiag ); Mag = CMPLX_1_NORM( cPivot ); if (Mag > MaxRow) MaxRow = Mag; pElement = Matrix->FirstInRow[I]; while (pElement != pDiag) { Mag = CMPLX_1_NORM( *pElement ); if (Mag > MaxRow) MaxRow = Mag; pElement = pElement->NextInRow; } /* Upper triangular matrix. */ pElement = Matrix->FirstInCol[I]; AbsColSum = 1.0; /* Diagonal of U is unity. */ while (pElement != pDiag) { AbsColSum += CMPLX_1_NORM( *pElement ); pElement = pElement->NextInCol; } if (AbsColSum > MaxCol) MaxCol = AbsColSum; } } else if (Matrix->Complex) { for (I = 1; I <= Matrix->Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { Mag = CMPLX_1_NORM( *pElement ); if (Mag > Max) Max = Mag; pElement = pElement->NextInCol; } } return Max; } #endif return MaxRow * MaxCol; } /* * MATRIX ROUNDOFF ERROR * * >>> Returns: * Returns a bound on the magnitude of the largest element in E = A - LU. * * >>> Arguments: * eMatrix (char *) * Pointer to the matrix. * Rho (RealNumber) * The bound on the magnitude of the largest element in any of the * reduced submatrices. This is the number computed by the function * spLargestElement() when given a factored matrix. If this number is * negative, the bound will be computed automatically. */ RealNumber spRoundoff( eMatrix, Rho ) char *eMatrix; RealNumber Rho; { MatrixPtr Matrix = (MatrixPtr)eMatrix; register ElementPtr pElement; register int Count, I, MaxCount = 0; RealNumber Reid, Gear; /* Begin `spRoundoff'. */ ASSERT( IS_SPARSE(Matrix) AND IS_FACTORED(Matrix) ); /* Compute Barlow's bound if it is not given. */ if (Rho < 0.0) Rho = spLargestElement( eMatrix ); /* Find the maximum number of off-diagonals in L if not previously computed. */ if (Matrix->MaxRowCountInLowerTri < 0) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; Count = 0; while (pElement->Col < I) { Count++; pElement = pElement->NextInRow; } if (Count > MaxCount) MaxCount = Count; } Matrix->MaxRowCountInLowerTri = MaxCount; } else MaxCount = Matrix->MaxRowCountInLowerTri; /* Compute error bound. */ Gear = 1.01*((MaxCount + 1) * Matrix->RelThreshold + 1.0) * SQR(MaxCount); Reid = 3.01 * Matrix->Size; if (Gear < Reid) return (MACHINE_RESOLUTION * Rho * Gear); else return (MACHINE_RESOLUTION * Rho * Reid); } #endif neuron-7.5/src/sundials/000077500000000000000000000000001323325274500153125ustar00rootroot00000000000000neuron-7.5/src/sundials/Makefile.am000077500000000000000000000006401323325274500173510ustar00rootroot00000000000000SUBDIRS = shared cvodes ida # prefer the following but on max osx, libtoold links the libraries # twice causing multiply defined names. So use the lo files instead. #SUBLIBS = shared/libshared.la cvodes/libcvodes.la ida/libida.la SUBLIBS = shared/*.lo cvodes/*.lo ida/*.lo AM_CFLAGS = @MINGW_CFLAG@ lib_LTLIBRARIES = libsundials.la libsundials_la_SOURCES = libsundials_la_LIBADD = $(SUBLIBS) EXTRA_DIST = README neuron-7.5/src/sundials/Makefile.in000066400000000000000000000660741323325274500173740ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/sundials ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libsundials_la_DEPENDENCIES = $(SUBLIBS) am_libsundials_la_OBJECTS = libsundials_la_OBJECTS = $(am_libsundials_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libsundials_la_SOURCES) DIST_SOURCES = $(libsundials_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)sundials_config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/sundials_config.h.in \ README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ SUBDIRS = shared cvodes ida # prefer the following but on max osx, libtoold links the libraries # twice causing multiply defined names. So use the lo files instead. #SUBLIBS = shared/libshared.la cvodes/libcvodes.la ida/libida.la SUBLIBS = shared/*.lo cvodes/*.lo ida/*.lo AM_CFLAGS = @MINGW_CFLAG@ lib_LTLIBRARIES = libsundials.la libsundials_la_SOURCES = libsundials_la_LIBADD = $(SUBLIBS) EXTRA_DIST = README all: sundials_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sundials/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sundials/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): sundials_config.h: stamp-h13 @test -f $@ || rm -f stamp-h13 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h13 stamp-h13: $(srcdir)/sundials_config.h.in $(top_builddir)/config.status @rm -f stamp-h13 cd $(top_builddir) && $(SHELL) ./config.status src/sundials/sundials_config.h distclean-hdr: -rm -f sundials_config.h stamp-h13 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libsundials.la: $(libsundials_la_OBJECTS) $(libsundials_la_DEPENDENCIES) $(EXTRA_libsundials_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libsundials_la_OBJECTS) $(libsundials_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) sundials_config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/sundials/README000077500000000000000000000071121323325274500161760ustar00rootroot00000000000000Below is the original Readme from the sundials/README file. The orginal sundials package was obtained from http://www.llnl.gov/CASC/sundials/ For purposes of incorporating cvodes and ida into NEURON I have simplified the directory structure by combining source and include files into the cvodes, and ida directories and combined nvec_ser, nvec_par, shared/include, and shared/src *.[ch] files into the shared subdirectory, eliminated the doc, kinsol, cvode directories and other subdirectories, and replaced the Makefile.in files with Makefile.am files. The reason that the sensitivity version of cvode is used is that the previous version of cvode did not support the tstop functionality needed by at_time. Note that the version 2.0 now has tstop functionality for cvode but due to inertia we still use cvodes. Also version 2.0 incorporates autoconf (although configure.in is not distributed in the sundials.tar.gz file) so we make use of config.hin. It is conceivable that the sundials.tar.gz with all its subdirectory structure along with configure could be used now. But for least porting, cvs, Makefile.am and distribution difficulty we retain the previous subdirectory structure. ----------------------------------------------------------------------------- SUNDIALS SUite of Nonlinear and DIfferential/ALgebraic equation Solvers Release 2.0.1, January 2005 Peter Brown, Aaron Collier, Keith Grant, Alan Hindmarsh, Steve Lee, Radu Serban, Dan Shumaker, Carol Woodward Center for Applied Scientific Computing, LLNL The family of solvers referred to as SUNDIALS consists of solvers CVODE (for ODE systems), CVODES (ODE with sensitivity analysis capabilities), IDA (for differential-algebraic systems), and KINSOL (for nonlinear algebraic systems), The various solvers of this family share many subordinate modules. For this reason, it is organized as a family, with a directory structure that exploits that sharing. Each individual solver includes documentation on installation, along with full usage documentation. The following is a list of the solver packages presently available. CVODE: A solver for stiff and nonstiff ODE systems y' = f(t,y), with serial and parallel versions. CVODES: A solver for stiff and non-stiff ODE systems with sensitivity analysis capabilities, with serial and parallel versions. IDA: A solver for differential-algebraic systems F(t,y,y') = 0, with serial and parallel versions. KINSOL: A solver for nonlinear algebraic systems F(u) = 0, with serial and parallel versions. Warning to users who receive more than one of these individual solvers at different times: The mixing of old and new versions SUNDIALS may fail. To avoid such failures, obtain all desired solvers at the same time. For installation directions see the file INSTALL_NOTES. For additional information on a particular solver, see the README file in the solver directory. Release history +----------+------------------------------------------------------+ | | SUNDIALS | Solver version | | Date | +----------+----------+----------+----------+ | | release | CVODE | CVODES | IDA | KINSOL | +----------+----------+----------+----------+----------+----------+ | Jul 2002 | 1.0 | 2.0 | 1.0 | 2.0 | 2.0 | | Dec 2004 | 2.0 | 2.2.0 | 2.1.0 | 2.2.0 | 2.2.0 | | Jan 2005 | 2.0.1 | 2.2.1 | 2.1.1 | 2.2.1 | 2.2.1 | +----------+----------+----------+----------+----------+----------+ neuron-7.5/src/sundials/cvodes/000077500000000000000000000000001323325274500165755ustar00rootroot00000000000000neuron-7.5/src/sundials/cvodes/Makefile.am000077500000000000000000000010501323325274500206300ustar00rootroot00000000000000noinst_LTLIBRARIES = libcvodes.la nsrc=$(top_srcdir)/src includes = -I$(nsrc)/sundials/shared AM_CPPFLAGS = $(includes) AM_CFLAGS = @MINGW_CFLAG@ libcvodes_la_SOURCES = \ cvband.c \ cvbandpre.c \ cvbbdpre.c \ cvdense.c \ cvdiag.c \ cvodea.c \ cvodes.c \ cvodesio.c \ cvspgmr.c noinst_HEADERS = \ cvband.h \ cvband_impl.h \ cvbandpre.h \ cvbandpre_impl.h \ cvbbdpre.h \ cvbbdpre_impl.h \ cvdense.h \ cvdense_impl.h \ cvdiag.h \ cvdiag_impl.h \ cvodea.h \ cvodea_impl.h \ cvodes.h \ cvodes_impl.h \ cvspgmr.h \ cvspgmr_impl.h neuron-7.5/src/sundials/cvodes/Makefile.in000066400000000000000000000546551323325274500206610ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/sundials/cvodes ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcvodes_la_LIBADD = am_libcvodes_la_OBJECTS = cvband.lo cvbandpre.lo cvbbdpre.lo \ cvdense.lo cvdiag.lo cvodea.lo cvodes.lo cvodesio.lo \ cvspgmr.lo libcvodes_la_OBJECTS = $(am_libcvodes_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcvodes_la_SOURCES) DIST_SOURCES = $(libcvodes_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ noinst_LTLIBRARIES = libcvodes.la nsrc = $(top_srcdir)/src includes = -I$(nsrc)/sundials/shared AM_CPPFLAGS = $(includes) AM_CFLAGS = @MINGW_CFLAG@ libcvodes_la_SOURCES = \ cvband.c \ cvbandpre.c \ cvbbdpre.c \ cvdense.c \ cvdiag.c \ cvodea.c \ cvodes.c \ cvodesio.c \ cvspgmr.c noinst_HEADERS = \ cvband.h \ cvband_impl.h \ cvbandpre.h \ cvbandpre_impl.h \ cvbbdpre.h \ cvbbdpre_impl.h \ cvdense.h \ cvdense_impl.h \ cvdiag.h \ cvdiag_impl.h \ cvodea.h \ cvodea_impl.h \ cvodes.h \ cvodes_impl.h \ cvspgmr.h \ cvspgmr_impl.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sundials/cvodes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sundials/cvodes/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcvodes.la: $(libcvodes_la_OBJECTS) $(libcvodes_la_DEPENDENCIES) $(EXTRA_libcvodes_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcvodes_la_OBJECTS) $(libcvodes_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvband.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvbandpre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvbbdpre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvdense.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvdiag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvodea.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvodes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvodesio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvspgmr.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/sundials/cvodes/cvband.c000077500000000000000000000413021323325274500202010ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the CVBAND linear solver. * ----------------------------------------------------------------- */ #include #include #include "cvband_impl.h" #include "cvodes_impl.h" #include "sundialsmath.h" /* Other Constants */ #define MIN_INC_MULT RCONST(1000.0) #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define TWO RCONST(2.0) /* CVBAND linit, lsetup, lsolve, and lfree routines */ static int CVBandInit(CVodeMem cv_mem); static int CVBandSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3); static int CVBandSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur); static void CVBandFree(CVodeMem cv_mem); /* CVBAND DQJac routine */ static void CVBandDQJac(long int n, long int mupper, long int mlower, BandMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* Readability Replacements */ #define lmm (cv_mem->cv_lmm) #define f (cv_mem->cv_f) #define f_data (cv_mem->cv_f_data) #define uround (cv_mem->cv_uround) #define nst (cv_mem->cv_nst) #define tn (cv_mem->cv_tn) #define h (cv_mem->cv_h) #define gamma (cv_mem->cv_gamma) #define gammap (cv_mem->cv_gammap) #define gamrat (cv_mem->cv_gamrat) #define ewt (cv_mem->cv_ewt) #define nfe (cv_mem->cv_nfe) #define errfp (cv_mem->cv_errfp) #define linit (cv_mem->cv_linit) #define lsetup (cv_mem->cv_lsetup) #define lsolve (cv_mem->cv_lsolve) #define lfree (cv_mem->cv_lfree) #define lmem (cv_mem->cv_lmem) #define vec_tmpl (cv_mem->cv_tempv) #define setupNonNull (cv_mem->cv_setupNonNull) #define n (cvband_mem->b_n) #define jac (cvband_mem->b_jac) #define M (cvband_mem->b_M) #define mu (cvband_mem->b_mu) #define ml (cvband_mem->b_ml) #define storage_mu (cvband_mem->b_storage_mu) #define pivots (cvband_mem->b_pivots) #define savedJ (cvband_mem->b_savedJ) #define nstlj (cvband_mem->b_nstlj) #define nje (cvband_mem->b_nje) #define nfeB (cvband_mem->b_nfeB) #define J_data (cvband_mem->b_J_data) #define last_flag (cvband_mem->b_last_flag) /* * ----------------------------------------------------------------- * CVBand * ----------------------------------------------------------------- * This routine initializes the memory record and sets various function * fields specific to the band linear solver module. CVBand first calls * the existing lfree routine if this is not NULL. It then sets the * cv_linit, cv_lsetup, cv_lsolve, and cv_lfree fields in (*cvode_mem) * to be CVBandInit, CVBandSetup, CVBandSolve, and CVBandFree, * respectively. It allocates memory for a structure of type * CVBandMemRec and sets the cv_lmem field in (*cvode_mem) to the * address of this structure. It sets setupNonNull in (*cvode_mem) to be * TRUE, b_mu to be mupper, b_ml to be mlower, and the b_jac field to be * CVBandDQJac. * Finally, it allocates memory for M, savedJ, and pivot. The CVBand * return value is SUCCESS = 0, LMEM_FAIL = -1, or LIN_ILL_INPUT = -2. * * NOTE: The band linear solver assumes a serial implementation * of the NVECTOR package. Therefore, CVBand will first * test for compatible a compatible N_Vector internal * representation by checking that the function * N_VGetArrayPointer exists. * ----------------------------------------------------------------- */ int CVBand(void *cvode_mem, long int N, long int mupper, long int mlower) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Test if the NVECTOR package is compatible with the BAND solver */ if (vec_tmpl->ops->nvgetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_BAD_NVECTOR); return(CVBAND_ILL_INPUT); } if (lfree != NULL) lfree(cv_mem); /* Set four main function fields in cv_mem */ linit = CVBandInit; lsetup = CVBandSetup; lsolve = CVBandSolve; lfree = CVBandFree; /* Get memory for CVBandMemRec */ cvband_mem = (CVBandMem) malloc(sizeof(CVBandMemRec)); if (cvband_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); return(CVBAND_MEM_FAIL); } /* Set default Jacobian routine and Jacobian data */ jac = CVBandDQJac; J_data = cvode_mem; last_flag = CVBAND_SUCCESS; setupNonNull = TRUE; /* Load problem dimension */ n = N; /* Load half-bandwiths in cvband_mem */ ml = mlower; mu = mupper; /* Test ml and mu for legality */ if ((ml < 0) || (mu < 0) || (ml >= N) || (mu >= N)) { if(errfp!=NULL) fprintf(errfp, MSGB_BAD_SIZES); return(CVBAND_ILL_INPUT); } /* Set extended upper half-bandwith for M (required for pivoting) */ storage_mu = MIN(N-1, mu + ml); /* Allocate memory for M, savedJ, and pivot arrays */ M = BandAllocMat(N, mu, ml, storage_mu); if (M == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); return(CVBAND_MEM_FAIL); } savedJ = BandAllocMat(N, mu, ml, mu); if (savedJ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); BandFreeMat(M); return(CVBAND_MEM_FAIL); } pivots = BandAllocPiv(N); if (pivots == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); BandFreeMat(M); BandFreeMat(savedJ); return(CVBAND_MEM_FAIL); } /* Attach linear solver memory to integrator memory */ lmem = cvband_mem; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandSetJacFn * ----------------------------------------------------------------- */ int CVBandSetJacFn(void *cvode_mem, CVBandJacFn bjac) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_SETGET_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(CVBAND_LMEM_NULL); } cvband_mem = (CVBandMem) lmem; jac = bjac; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandSetJacData * ----------------------------------------------------------------- */ int CVBandSetJacData(void *cvode_mem, void *jac_data) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_SETGET_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(CVBAND_LMEM_NULL); } cvband_mem = (CVBandMem) lmem; J_data = jac_data; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandGetWorkSpace * ----------------------------------------------------------------- */ int CVBandGetWorkSpace(void *cvode_mem, long int *lenrwB, long int *leniwB) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_SETGET_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(CVBAND_LMEM_NULL); } cvband_mem = (CVBandMem) lmem; *lenrwB = n*(storage_mu + mu + 2*ml + 2); *leniwB = n; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandGetNumJacEvals * ----------------------------------------------------------------- */ int CVBandGetNumJacEvals(void *cvode_mem, long int *njevalsB) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_SETGET_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(CVBAND_LMEM_NULL); } cvband_mem = (CVBandMem) lmem; *njevalsB = nje; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandGetNumRhsEvals * ----------------------------------------------------------------- */ int CVBandGetNumRhsEvals(void *cvode_mem, long int *nfevalsB) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_SETGET_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(CVBAND_LMEM_NULL); } cvband_mem = (CVBandMem) lmem; *nfevalsB = nfeB; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandGetLastFlag * ----------------------------------------------------------------- */ int CVBandGetLastFlag(void *cvode_mem, int *flag) { CVodeMem cv_mem; CVBandMem cvband_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGB_SETGET_CVMEM_NULL); return(CVBAND_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(CVBAND_LMEM_NULL); } cvband_mem = (CVBandMem) lmem; *flag = last_flag; return(CVBAND_SUCCESS); } /* * ----------------------------------------------------------------- * CVBandInit * ----------------------------------------------------------------- * This routine does remaining initializations specific to the band * linear solver. * ----------------------------------------------------------------- */ static int CVBandInit(CVodeMem cv_mem) { CVBandMem cvband_mem; cvband_mem = (CVBandMem) lmem; nje = 0; nfeB = 0; nstlj = 0; if (jac == NULL) { jac = CVBandDQJac; J_data = cv_mem; } last_flag = CVBAND_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVBandSetup * ----------------------------------------------------------------- * This routine does the setup operations for the band linear solver. * It makes a decision whether or not to call the Jacobian evaluation * routine based on various state variables, and if not it uses the * saved copy. In any case, it constructs the Newton matrix * M = I - gamma*J, updates counters, and calls the band LU * factorization routine. * ----------------------------------------------------------------- */ static int CVBandSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3) { booleantype jbad, jok; realtype dgamma; long int ier; CVBandMem cvband_mem; cvband_mem = (CVBandMem) lmem; /* Use nst, gamma/gammap, and convfail to set J eval. flag jok */ dgamma = ABS((gamma/gammap) - ONE); jbad = (nst == 0) || (nst > nstlj + CVB_MSBJ) || ((convfail == CV_FAIL_BAD_J) && (dgamma < CVB_DGMAX)) || (convfail == CV_FAIL_OTHER); jok = !jbad; if (jok) { /* If jok = TRUE, use saved copy of J */ *jcurPtr = FALSE; BandCopy(savedJ, M, mu, ml); } else { /* If jok = FALSE, call jac routine for new J value */ nje++; nstlj = nst; *jcurPtr = TRUE; BandZero(M); jac(n, mu, ml, M, tn, ypred, fpred, J_data, vtemp1, vtemp2, vtemp3); BandCopy(M, savedJ, mu, ml); } /* Scale and add I to get M = I - gamma*J */ BandScale(-gamma, M); BandAddI(M); /* Do LU factorization of M */ ier = BandFactor(M, pivots); /* Return 0 if the LU was complete; otherwise return 1 */ if (ier > 0) { last_flag = ier; return(1); } last_flag = CVBAND_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVBandSolve * ----------------------------------------------------------------- * This routine handles the solve operation for the band linear solver * by calling the band backsolve routine. The return value is 0. * ----------------------------------------------------------------- */ static int CVBandSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur) { CVBandMem cvband_mem; realtype *bd; cvband_mem = (CVBandMem) lmem; bd = N_VGetArrayPointer(b); BandBacksolve(M, pivots, bd); /* If CV_BDF, scale the correction to account for change in gamma */ if ((lmm == CV_BDF) && (gamrat != ONE)) { N_VScale(TWO/(ONE + gamrat), b, b); } last_flag = CVBAND_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVBandFree * ----------------------------------------------------------------- * This routine frees memory specific to the band linear solver. * ----------------------------------------------------------------- */ static void CVBandFree(CVodeMem cv_mem) { CVBandMem cvband_mem; cvband_mem = (CVBandMem) lmem; BandFreeMat(M); BandFreeMat(savedJ); BandFreePiv(pivots); free(cvband_mem); } /* * ----------------------------------------------------------------- * CVBandDQJac * ----------------------------------------------------------------- * This routine generates a banded difference quotient approximation to * the Jacobian of f(t,y). It assumes that a band matrix of type * BandMat is stored column-wise, and that elements within each column * are contiguous. This makes it possible to get the address of a column * of J via the macro BAND_COL and to write a simple for loop to set * each of the elements of a column in succession. * ----------------------------------------------------------------- */ static void CVBandDQJac(long int N, long int mupper, long int mlower, BandMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { realtype fnorm, minInc, inc, inc_inv, srur; N_Vector ftemp, ytemp; long int group, i, j, width, ngroups, i1, i2; realtype *col_j, *ewt_data, *fy_data, *ftemp_data, *y_data, *ytemp_data; CVodeMem cv_mem; CVBandMem cvband_mem; /* jac_dat points to cvode_mem */ cv_mem = (CVodeMem) jac_data; cvband_mem = (CVBandMem) lmem; /* Rename work vectors for use as temporary values of y and f */ ftemp = tmp1; ytemp = tmp2; /* Obtain pointers to the data for ewt, fy, ftemp, y, ytemp */ ewt_data = N_VGetArrayPointer(ewt); fy_data = N_VGetArrayPointer(fy); ftemp_data = N_VGetArrayPointer(ftemp); y_data = N_VGetArrayPointer(y); ytemp_data = N_VGetArrayPointer(ytemp); /* Load ytemp with y = predicted y vector */ N_VScale(ONE, y, ytemp); /* Set minimum increment based on uround and norm of f */ srur = RSqrt(uround); fnorm = N_VWrmsNorm(fy, ewt); minInc = (fnorm != ZERO) ? (MIN_INC_MULT * ABS(h) * uround * N * fnorm) : ONE; /* Set bandwidth and number of column groups for band differencing */ width = mlower + mupper + 1; ngroups = MIN(width, N); for (group=1; group <= ngroups; group++) { /* Increment all y_j in group */ for(j=group-1; j < N; j+=width) { inc = MAX(srur*ABS(y_data[j]), minInc/ewt_data[j]); ytemp_data[j] += inc; } /* Evaluate f with incremented y */ f(tn, ytemp, ftemp, f_data); /* Restore ytemp, then form and load difference quotients */ for (j=group-1; j < N; j+=width) { ytemp_data[j] = y_data[j]; col_j = BAND_COL(J,j); inc = MAX(srur*ABS(y_data[j]), minInc/ewt_data[j]); inc_inv = ONE/inc; i1 = MAX(0, j-mupper); i2 = MIN(j+mlower, N-1); for (i=i1; i <= i2; i++) BAND_COL_ELEM(col_j,i,j) = inc_inv * (ftemp_data[i] - fy_data[i]); } } /* Increment counter nfeB */ nfeB += ngroups; } neuron-7.5/src/sundials/cvodes/cvband.h000077500000000000000000000177141323325274500202200ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the header file for the CVODE/CVODES band linear * solver, CVBAND. * ----------------------------------------------------------------- */ #ifndef _CVBAND_H #define _CVBAND_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "band.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * CVBAND solver constants * ----------------------------------------------------------------- * CVB_MSBJ : maximum number of steps between band Jacobian * evaluations * * CVB_DGMAX : maximum change in gamma between band Jacobian * evaluations * ----------------------------------------------------------------- */ #define CVB_MSBJ 50 #define CVB_DGMAX RCONST(0.2) /* * ----------------------------------------------------------------- * Type : CVBandJacFn * ----------------------------------------------------------------- * A band Jacobian approximation function Jac must have the * prototype given below. Its parameters are: * * N is the length of all vector arguments. * * mupper is the upper half-bandwidth of the approximate banded * Jacobian. This parameter is the same as the mupper parameter * passed by the user to the CVBand function. * * mlower is the lower half-bandwidth of the approximate banded * Jacobian. This parameter is the same as the mlower parameter * passed by the user to the CVBand function. * * J is the band matrix (of type BandMat) that will be loaded * by a CVBandJacFn with an approximation to the Jacobian matrix * J = (df_i/dy_j) at the point (t,y). * J is preset to zero, so only the nonzero elements need to be * loaded. Three efficient ways to load J are: * * (1) (with macros - no explicit data structure references) * for (j=0; j < n; j++) { * col_j = BAND_COL(J,j); * for (i=j-mupper; i <= j+mlower; i++) { * generate J_ij = the (i,j)th Jacobian element * BAND_COL_ELEM(col_j,i,j) = J_ij; * } * } * * (2) (with BAND_COL macro, but without BAND_COL_ELEM macro) * for (j=0; j < n; j++) { * col_j = BAND_COL(J,j); * for (k=-mupper; k <= mlower; k++) { * generate J_ij = the (i,j)th Jacobian element, i=j+k * col_j[k] = J_ij; * } * } * * (3) (without macros - explicit data structure references) * offset = J->smu; * for (j=0; j < n; j++) { * col_j = ((J->data)[j])+offset; * for (k=-mupper; k <= mlower; k++) { * generate J_ij = the (i,j)th Jacobian element, i=j+k * col_j[k] = J_ij; * } * } * Caution: J->smu is generally NOT the same as mupper. * * The BAND_ELEM(A,i,j) macro is appropriate for use in small * problems in which efficiency of access is NOT a major concern. * * t is the current value of the independent variable. * * y is the current value of the dependent variable vector, * namely the predicted value of y(t). * * fy is the vector f(t,y). * * jac_data is a pointer to user data - the same as the jac_data * parameter passed to CVBand. * * NOTE: If the user's Jacobian routine needs other quantities, * they are accessible as follows: hcur (the current stepsize) * and ewt (the error weight vector) are accessible through * CVodeGetCurrentStep and CVodeGetErrWeights, respectively * (see cvode.h). The unit roundoff is available as * UNIT_ROUNDOFF defined in sundialstypes.h * * tmp1, tmp2, and tmp3 are pointers to memory allocated for * vectors of length N which can be used by a CVBandJacFn * as temporary storage or work space. * ----------------------------------------------------------------- */ typedef void (*CVBandJacFn)(long int N, long int mupper, long int mlower, BandMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* * ----------------------------------------------------------------- * Function : CVBand * ----------------------------------------------------------------- * A call to the CVBand function links the main CVODE integrator * with the CVBAND linear solver. * * cvode_mem is the pointer to the integrator memory returned by * CVodeCreate. * * N is the size of the ODE system. * * mupper is the upper bandwidth of the band Jacobian * approximation. * * mlower is the lower bandwidth of the band Jacobian * approximation. * * The return value of CVBand is one of: * CVBAND_SUCCESS if successful * CVBAND_MEM_NULL if the cvode memory was NULL * CVBAND_MEM_FAIL if there was a memory allocation failure * CVBAND_ILL_INPUT if a required vector operation is missing or * if a bandwidth has an illegal value. * ----------------------------------------------------------------- */ int CVBand(void *cvode_mem, long int N, long int mupper, long int mlower); /* * ----------------------------------------------------------------- * Optional inputs to the CVBAND linear solver * ----------------------------------------------------------------- * * CVBandSetJacFn specifies the band Jacobian approximation * routine to be used. A user-supplied bjac routine * must be of type CVBandJacFn. By default, a difference * quotient routine CVBandDQJac, supplied with this * solver is used. * CVBandSetJacData specifies a pointer to user data which is * passed to the bjac routine every time it is * called. * * The return value of CVBandSet* is one of: * CVBAND_SUCCESS if successful * CVBAND_MEM_NULL if the cvode memory was NULL * CVBAND_LMEM_NULL if the cvband memory was NULL * ----------------------------------------------------------------- */ int CVBandSetJacFn(void *cvode_mem, CVBandJacFn bjac); int CVBandSetJacData(void *cvode_mem, void *jac_data); /* * ----------------------------------------------------------------- * Optional outputs from the CVBAND linear solver * ----------------------------------------------------------------- * * CVBandGetWorkSpace returns the real and integer workspace used * by CVBAND. * CVBandGetNumJacEvals returns the number of calls made to the * Jacobian evaluation routine bjac. * CVBandGetNumRhsEvals returns the number of calls to the user * f routine due to finite difference Jacobian * evaluation. * CVBandGetLastFlag returns the last error flag set by any of * the CVBAND interface functions. * * The return value of CVBandGet* is one of: * CVBAND_SUCCESS if successful * CVBAND_MEM_NULL if the cvode memory was NULL * CVBAND_LMEM_NULL if the cvband memory was NULL * ----------------------------------------------------------------- */ int CVBandGetWorkSpace(void *cvode_mem, long int *lenrwB, long int *leniwB); int CVBandGetNumJacEvals(void *cvode_mem, long int *njevalsB); int CVBandGetNumRhsEvals(void *cvode_mem, long int *nfevalsB); int CVBandGetLastFlag(void *cvode_mem, int *flag); /* CVBAND return values */ #define CVBAND_SUCCESS 0 #define CVBAND_MEM_NULL -1 #define CVBAND_LMEM_NULL -2 #define CVBAND_ILL_INPUT -3 #define CVBAND_MEM_FAIL -4 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvband_impl.h000077500000000000000000000062761323325274500212420ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the band linear solver, CVBAND. * ----------------------------------------------------------------- */ #ifndef _CVBAND_IMPL_H #define _CVBAND_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "band.h" #include "cvband.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types: CVBandMemRec, CVBandMem * ----------------------------------------------------------------- * The type CVBandMem is pointer to a CVBandMemRec. * This structure contains CVBand solver-specific data. * ----------------------------------------------------------------- */ typedef struct { long int b_n; /* N = problem dimension */ CVBandJacFn b_jac; /* jac = Jacobian routine to be called */ long int b_ml; /* b_ml = lower bandwidth of savedJ */ long int b_mu; /* b_mu = upper bandwidth of savedJ */ long int b_storage_mu; /* upper bandwith of M = MIN(N-1,b_mu+b_ml) */ BandMat b_M; /* M = I - gamma J, gamma = h / l1 */ long int *b_pivots; /* pivots = pivot array for PM = LU */ BandMat b_savedJ; /* savedJ = old Jacobian */ long int b_nstlj; /* nstlj = nst at last Jacobian eval. */ long int b_nje; /* nje = no. of calls to jac */ long int b_nfeB; /* nfeB = no. of calls to f due to difference quotient band Jacobian approximation */ void *b_J_data; /* J_data is passed to jac */ int b_last_flag; /* last error return flag */ } CVBandMemRec, *CVBandMem; /* Error Messages */ #define _CVBAND_ "CVBand-- " #define MSGB_MEM_FAIL _CVBAND_ "A memory request failed.\n\n" #define MSGB_BAD_SIZES_1 _CVBAND_ "Illegal bandwidth parameter(s)." #define MSGB_BAD_SIZES_2 "Must have 0 <= ml, mu <= N-1.\n\n" #define MSGB_BAD_SIZES MSGB_BAD_SIZES_1 MSGB_BAD_SIZES_2 #define MSGB_BAD_NVECTOR _CVBAND_ "A required vector operation is not implemented.\n\n" #define MSGB_CVMEM_NULL _CVBAND_ "Integrator memory is NULL.\n\n" #define MSGB_SETGET_CVMEM_NULL "CVBandSet*/CVBandGet*-- Integrator memory is NULL.\n\n" #define MSGB_SETGET_LMEM_NULL "CVBandSet*/CVBandGet*-- CVBAND memory is NULL.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvbandpre.c000077500000000000000000000331561323325274500207200ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This file contains implementations of the banded difference * quotient Jacobian-based preconditioner and solver routines for * use with CVSpgmr. * ----------------------------------------------------------------- */ #include #include #include "cvbandpre_impl.h" #include "cvodes_impl.h" #include "cvspgmr_impl.h" #include "sundialsmath.h" #define MIN_INC_MULT RCONST(1000.0) #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* Prototypes of CVBandPrecSetup and CVBandPrecSolve */ static int CVBandPrecSetup(realtype t, N_Vector y, N_Vector fy, booleantype jok, booleantype *jcurPtr, realtype gamma, void *bp_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); static int CVBandPrecSolve(realtype t, N_Vector y, N_Vector fy, N_Vector r, N_Vector z, realtype gamma, realtype delta, int lr, void *bp_data, N_Vector tmp); /* Prototype for difference quotient Jacobian calculation routine */ static void CVBandPDQJac(CVBandPrecData pdata, realtype t, N_Vector y, N_Vector fy, N_Vector ftemp, N_Vector ytemp); /* Redability replacements */ #define vec_tmpl (cv_mem->cv_tempv) #define errfp (cv_mem->cv_errfp) /* * ----------------------------------------------------------------- * Malloc, Free, and Get Functions * NOTE: The band linear solver assumes a serial implementation * of the NVECTOR package. Therefore, CVBandPrecAlloc will * first test for compatible a compatible N_Vector internal * representation by checking that the function * N_VGetArrayPointer exists * ----------------------------------------------------------------- */ void *CVBandPrecAlloc(void *cvode_mem, long int N, long int mu, long int ml) { CVodeMem cv_mem; CVBandPrecData pdata; long int mup, mlp, storagemu; if (cvode_mem == NULL) { fprintf(stderr, MSGBP_CVMEM_NULL); return(NULL); } cv_mem = (CVodeMem) cvode_mem; /* Test if the NVECTOR package is compatible with the BAND preconditioner */ if(vec_tmpl->ops->nvgetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGBP_BAD_NVECTOR); return(NULL); } pdata = (CVBandPrecData) malloc(sizeof *pdata); /* Allocate data memory */ if (pdata == NULL) return(NULL); /* Load pointers and bandwidths into pdata block. */ pdata->cvode_mem = cvode_mem; pdata->N = N; pdata->mu = mup = MIN( N-1, MAX(0,mu) ); pdata->ml = mlp = MIN( N-1, MAX(0,ml) ); /* Initialize nfeBP counter */ pdata->nfeBP = 0; /* Allocate memory for saved banded Jacobian approximation. */ pdata->savedJ = BandAllocMat(N, mup, mlp, mup); if (pdata->savedJ == NULL) { free(pdata); return(NULL); } /* Allocate memory for banded preconditioner. */ storagemu = MIN( N-1, mup + mlp); pdata->savedP = BandAllocMat(N, mup, mlp, storagemu); if (pdata->savedP == NULL) { BandFreeMat(pdata->savedJ); free(pdata); return(NULL); } /* Allocate memory for pivot array. */ pdata->pivots = BandAllocPiv(N); if (pdata->savedJ == NULL) { BandFreeMat(pdata->savedP); BandFreeMat(pdata->savedJ); free(pdata); return(NULL); } return((void *) pdata); } int CVBPSpgmr(void *cvode_mem, int pretype, int maxl, void *p_data) { int flag; if ( p_data == NULL ) { fprintf(stderr, MSGBP_NO_PDATA); return(CV_PDATA_NULL); } flag = CVSpgmr(cvode_mem, pretype, maxl); if(flag != CVSPGMR_SUCCESS) return(flag); flag = CVSpgmrSetPrecData(cvode_mem, p_data); if(flag != CVSPGMR_SUCCESS) return(flag); flag = CVSpgmrSetPrecSetupFn(cvode_mem, CVBandPrecSetup); if(flag != CVSPGMR_SUCCESS) return(flag); flag = CVSpgmrSetPrecSolveFn(cvode_mem, CVBandPrecSolve); if(flag != CVSPGMR_SUCCESS) return(flag); return(CVSPGMR_SUCCESS); } void CVBandPrecFree(void *bp_data) { CVBandPrecData pdata; if ( bp_data != NULL ) { pdata = (CVBandPrecData) bp_data; BandFreeMat(pdata->savedJ); BandFreeMat(pdata->savedP); BandFreePiv(pdata->pivots); free(pdata); } } int CVBandPrecGetWorkSpace(void *bp_data, long int *lenrwBP, long int *leniwBP) { CVBandPrecData pdata; long int N, ml, mu, smu; if ( bp_data == NULL ) { fprintf(stderr, MSGBP_PDATA_NULL); return(CV_PDATA_NULL); } pdata = (CVBandPrecData) bp_data; N = pdata->N; mu = pdata->mu; ml = pdata->ml; smu = MIN( N-1, mu + ml); *leniwBP = pdata->N; *lenrwBP = N * ( 2*ml + smu + mu + 2 ); return(CV_SUCCESS); } int CVBandPrecGetNumRhsEvals(void *bp_data, long int *nfevalsBP) { CVBandPrecData pdata; if ( bp_data == NULL ) { fprintf(stderr, MSGBP_PDATA_NULL); return(CV_PDATA_NULL); } pdata = (CVBandPrecData) bp_data; *nfevalsBP = pdata->nfeBP; return(CV_SUCCESS); } /* Readability Replacements */ #define N (pdata->N) #define mu (pdata->mu) #define ml (pdata->ml) #define pivots (pdata->pivots) #define savedJ (pdata->savedJ) #define savedP (pdata->savedP) #define nfeBP (pdata->nfeBP) /* * ----------------------------------------------------------------- * CVBandPrecSetup * ----------------------------------------------------------------- * Together CVBandPrecSetup and CVBandPrecSolve use a banded * difference quotient Jacobian to create a preconditioner. * CVBandPrecSetup calculates a new J, if necessary, then * calculates P = I - gamma*J, and does an LU factorization of P. * * The parameters of CVBandPrecSetup are as follows: * * t is the current value of the independent variable. * * y is the current value of the dependent variable vector, * namely the predicted value of y(t). * * fy is the vector f(t,y). * * jok is an input flag indicating whether Jacobian-related * data needs to be recomputed, as follows: * jok == FALSE means recompute Jacobian-related data * from scratch. * jok == TRUE means that Jacobian data from the * previous PrecSetup call will be reused * (with the current value of gamma). * A CVBandPrecSetup call with jok == TRUE should only * occur after a call with jok == FALSE. * * *jcurPtr is a pointer to an output integer flag which is * set by CVBandPrecond as follows: * *jcurPtr = TRUE if Jacobian data was recomputed. * *jcurPtr = FALSE if Jacobian data was not recomputed, * but saved data was reused. * * gamma is the scalar appearing in the Newton matrix. * * bp_data is a pointer to preconditoner data - the same as the * bp_data parameter passed to CVSpgmr. * * tmp1, tmp2, and tmp3 are pointers to memory allocated * for vectors of length N for work space. This * routine uses only tmp1 and tmp2. * * * The value to be returned by the CVBandPrecSetup function is * 0 if successful, or * 1 if the band factorization failed. * * ----------------------------------------------------------------- */ static int CVBandPrecSetup(realtype t, N_Vector y, N_Vector fy, booleantype jok, booleantype *jcurPtr, realtype gamma, void *bp_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { long int ier; CVBandPrecData pdata; /* Assume matrix and pivots have already been allocated. */ pdata = (CVBandPrecData) bp_data; if (jok) { /* If jok = TRUE, use saved copy of J. */ *jcurPtr = FALSE; BandCopy(savedJ, savedP, mu, ml); } else { /* If jok = FALSE, call CVBandPDQJac for new J value. */ *jcurPtr = TRUE; BandZero(savedJ); CVBandPDQJac(pdata, t, y, fy, tmp1, tmp2); BandCopy(savedJ, savedP, mu, ml); } /* Scale and add I to get savedP = I - gamma*J. */ BandScale(-gamma, savedP); BandAddI(savedP); /* Do LU factorization of matrix. */ ier = BandFactor(savedP, pivots); /* Return 0 if the LU was complete; otherwise return 1. */ if (ier > 0) return(1); return(0); } /* * ----------------------------------------------------------------- * CVBandPrecSolve * ----------------------------------------------------------------- * CVBandPrecSolve solves a linear system P z = r, where P is the * matrix computed by CVBandPrecond. * * The parameters of CVBandPrecSolve used here are as follows: * * r is the right-hand side vector of the linear system. * * bp_data is a pointer to preconditioner data - the same as the * bp_data parameter passed to CVSpgmr. * * z is the output vector computed by CVBandPrecSolve. * * The value returned by the CVBandPrecSolve function is always 0, * indicating success. * ----------------------------------------------------------------- */ static int CVBandPrecSolve(realtype t, N_Vector y, N_Vector fy, N_Vector r, N_Vector z, realtype gamma, realtype delta, int lr, void *bp_data, N_Vector tmp) { CVBandPrecData pdata; realtype *zd; /* Assume matrix and pivots have already been allocated. */ pdata = (CVBandPrecData) bp_data; /* Copy r to z. */ N_VScale(ONE, r, z); /* Do band backsolve on the vector z. */ zd = N_VGetArrayPointer(z); BandBacksolve(savedP, pivots, zd); return(0); } /* * ----------------------------------------------------------------- * CVBandPDQJac * ----------------------------------------------------------------- * This routine generates a banded difference quotient approximation to * the Jacobian of f(t,y). It assumes that a band matrix of type * BandMat is stored column-wise, and that elements within each column * are contiguous. This makes it possible to get the address of a column * of J via the macro BAND_COL and to write a simple for loop to set * each of the elements of a column in succession. * ----------------------------------------------------------------- */ #define ewt (cv_mem->cv_ewt) #define uround (cv_mem->cv_uround) #define h (cv_mem->cv_h) #define f (cv_mem->cv_f) #define f_data (cv_mem->cv_f_data) static void CVBandPDQJac(CVBandPrecData pdata, realtype t, N_Vector y, N_Vector fy, N_Vector ftemp, N_Vector ytemp) { CVodeMem cv_mem; realtype fnorm, minInc, inc, inc_inv, srur; long int group, i, j, width, ngroups, i1, i2; realtype *col_j, *ewt_data, *fy_data, *ftemp_data, *y_data, *ytemp_data; cv_mem = (CVodeMem) pdata->cvode_mem; /* Obtain pointers to the data for ewt, fy, ftemp, y, ytemp. */ ewt_data = N_VGetArrayPointer(ewt); fy_data = N_VGetArrayPointer(fy); ftemp_data = N_VGetArrayPointer(ftemp); y_data = N_VGetArrayPointer(y); ytemp_data = N_VGetArrayPointer(ytemp); /* Load ytemp with y = predicted y vector. */ N_VScale(ONE, y, ytemp); /* Set minimum increment based on uround and norm of f. */ srur = RSqrt(uround); fnorm = N_VWrmsNorm(fy, ewt); minInc = (fnorm != ZERO) ? (MIN_INC_MULT * ABS(h) * uround * N * fnorm) : ONE; /* Set bandwidth and number of column groups for band differencing. */ width = ml + mu + 1; ngroups = MIN(width, N); for (group = 1; group <= ngroups; group++) { /* Increment all y_j in group. */ for(j = group-1; j < N; j += width) { inc = MAX(srur*ABS(y_data[j]), minInc/ewt_data[j]); ytemp_data[j] += inc; } /* Evaluate f with incremented y. */ f(t, ytemp, ftemp, f_data); nfeBP++; /* Restore ytemp, then form and load difference quotients. */ for (j = group-1; j < N; j += width) { ytemp_data[j] = y_data[j]; col_j = BAND_COL(savedJ,j); inc = MAX(srur*ABS(y_data[j]), minInc/ewt_data[j]); inc_inv = ONE/inc; i1 = MAX(0, j-mu); i2 = MIN(j+ml, N-1); for (i=i1; i <= i2; i++) BAND_COL_ELEM(col_j,i,j) = inc_inv * (ftemp_data[i] - fy_data[i]); } } } neuron-7.5/src/sundials/cvodes/cvbandpre.h000077500000000000000000000146461323325274500207300ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Michael Wittman, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the header file for the CVBANDPRE module, which * provides a banded difference quotient Jacobian-based * preconditioner and solver routines for use with CVSPGMR. * * Summary: * These routines provide a band matrix preconditioner based on * difference quotients of the ODE right-hand side function f. * The user supplies parameters * mu = upper half-bandwidth (number of super-diagonals) * ml = lower half-bandwidth (number of sub-diagonals) * The routines generate a band matrix of bandwidth ml + mu + 1 * and use this to form a preconditioner for use with the Krylov * linear solver in CVSPGMR. Although this matrix is intended * to approximate the Jacobian df/dy, it may be a very crude * approximation. The true Jacobian need not be banded, or its * true bandwith may be larger than ml + mu + 1, as long as the * banded approximation generated here is sufficiently accurate * to speed convergence as a preconditioner. * * Usage: * The following is a summary of the usage of this module. * Details of the calls to CVodeCreate, CVodeMalloc, CVSpgmr, * and CVode are available in the User Guide. * To use these routines, the sequence of calls in the user * main program should be as follows: * * #include "cvbandpre.h" * #include "nvector_serial.h" * ... * void *bp_data; * ... * Set y0 * ... * cvode_mem = CVodeCreate(...); * ier = CVodeMalloc(...); * ... * bp_data = CVBandPrecAlloc(cvode_mem, N, mu, ml); * ... * flag = CVBPSpgmr(cvode_mem, pretype, maxl, bp_data); * ... * flag = CVode(...); * ... * CVBandPrecFree(bp_data); * ... * Free y0 * ... * CVodeFree(cvode_mem); * * Notes: * (1) Include this file for the CVBandPrecData type definition. * (2) In the CVBandPrecAlloc call, the arguments N is the same * as in the call to CVodeMalloc. * (3) In the CVBPSpgmr call, the user is free to specify the input * pretype and the optional input maxl. The last argument * must be the pointer returned by CVBandPrecAlloc. * ----------------------------------------------------------------- */ #ifndef _CVBANDPRE_H #define _CVBANDPRE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif /* * ----------------------------------------------------------------- * Function : CVBandPrecAlloc * ----------------------------------------------------------------- * CVBandPrecAlloc allocates and initializes a CVBandPrecData * structure to be passed to CVSpgmr (and subsequently used by * CVBandPrecSetup and CVBandPrecSolve). * * The parameters of CVBandPrecAlloc are as follows: * * cvode_mem is the pointer to CVODE memory returned by CVodeCreate. * * N is the problem size. * * mu is the upper half bandwidth. * * ml is the lower half bandwidth. * * CVBandPrecAlloc returns the storage pointer of type * CVBandPrecData, or NULL if the request for storage cannot be * satisfied. * * NOTE: The band preconditioner assumes a serial implementation * of the NVECTOR package. Therefore, CVBandPrecAlloc will * first test for a compatible N_Vector internal * representation by checking for required functions. * ----------------------------------------------------------------- */ void *CVBandPrecAlloc(void *cvode_mem, long int N, long int mu, long int ml); /* * ----------------------------------------------------------------- * Function : CVBPSpgmr * ----------------------------------------------------------------- * CVBPSpgmr links the CVBANDPPRE preconditioner to the CVSPGMR * linear solver. It performs the following actions: * 1) Calls the CVSPGMR specification routine and attaches the * CVSPGMR linear solver to the integrator memory; * 2) Sets the preconditioner data structure for CVSPGMR * 3) Sets the preconditioner setup routine for CVSPGMR * 4) Sets the preconditioner solve routine for CVSPGMR * * Its first 3 arguments are the same as for CVSpgmr (see * cvspgmr.h). The last argument is the pointer to the CVBANDPPRE * memory block returned by CVBandPrecAlloc. * Note that the user need not call CVSpgmr. * * Possible return values are: * CVSPGMR_SUCCESS if successful * CVSPGMR_MEM_NULL if the cvode memory was NULL * CVSPGMR_LMEM_NULL if the cvspgmr memory was NULL * CVSPGMR_MEM_FAIL if there was a memory allocation failure * CVSPGMR_ILL_INPUT if a required vector operation is missing * CV_PDATA_NULL if the bp_data was NULL * ----------------------------------------------------------------- */ int CVBPSpgmr(void *cvode_mem, int pretype, int maxl, void *p_data); /* * ----------------------------------------------------------------- * Function : CVBandPrecFree * ----------------------------------------------------------------- * CVBandPrecFree frees the memory allocated by CVBandPrecAlloc * in the argument pdata. * ----------------------------------------------------------------- */ void CVBandPrecFree(void *bp_data); /* * ----------------------------------------------------------------- * Optional output functions : CVBandPrecGet* * ----------------------------------------------------------------- * CVBandPrecGetWorkSpace returns the real and integer workspace used * by CVBANDPRE. * CVBandPrecGetNumRhsEvals returns the number of calls made from * CVBANDPRE to the user's right hand side * routine f. * * The return value of CVBandPrecGet* is one of: * CV_SUCCESS if successful * CV_PDATA_NULL if the bp_data memory was NULL * ----------------------------------------------------------------- */ int CVBandPrecGetWorkSpace(void *bp_data, long int *lenrwBP, long int *leniwBP); int CVBandPrecGetNumRhsEvals(void *bp_data, long int *nfevalsBP); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvbandpre_impl.h000077500000000000000000000035101323325274500217350ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Michael Wittman, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the CVBANDPRE module. * ----------------------------------------------------------------- */ #ifndef _CVBANDPRE_IMPL_H #define _CVBANDPRE_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "cvbandpre.h" #include "band.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Type: CVBandPrecData * ----------------------------------------------------------------- */ typedef struct { /* Data set by user in CVBandPrecAlloc: */ long int N; long int ml, mu; /* Data set by CVBandPrecSetup: */ BandMat savedJ; BandMat savedP; long int *pivots; /* Rhs calls */ long int nfeBP; /* Pointer to cvode_mem */ void *cvode_mem; } *CVBandPrecData; /* Error Messages */ #define _CVBALLOC_ "CVBandPreAlloc-- " #define MSGBP_CVMEM_NULL _CVBALLOC_ "Integrator memory is NULL.\n\n" #define MSGBP_BAD_NVECTOR _CVBALLOC_ "A required vector operation is not implemented.\n\n" #define MSGBP_PDATA_NULL "CVBandPrecGet*-- BandPrecData is NULL.\n\n" #define MSGBP_NO_PDATA "CVBPSpgmr-- BandPrecData is NULL.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvbbdpre.c000077500000000000000000000400531323325274500205350ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Michael Wittman, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This file contains implementations of routines for a * band-block-diagonal preconditioner, i.e. a block-diagonal * matrix with banded blocks, for use with CVODES, CVSpgmr, and * the parallel implementation of NVECTOR. * ----------------------------------------------------------------- */ #include #include #include "cvbbdpre_impl.h" #include "cvodes_impl.h" #include "cvspgmr_impl.h" #include "sundialsmath.h" #define MIN_INC_MULT RCONST(1000.0) #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* Prototypes of functions CVBBDPrecSetup and CVBBDPrecSolve */ static int CVBBDPrecSetup(realtype t, N_Vector y, N_Vector fy, booleantype jok, booleantype *jcurPtr, realtype gamma, void *bbd_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); static int CVBBDPrecSolve(realtype t, N_Vector y, N_Vector fy, N_Vector r, N_Vector z, realtype gamma, realtype delta, int lr, void *bbd_data, N_Vector tmp); /* Prototype for difference quotient Jacobian calculation routine */ static void CVBBDDQJac(CVBBDPrecData pdata, realtype t, N_Vector y, N_Vector gy, N_Vector ytemp, N_Vector gtemp); /* Redability replacements */ #define errfp (cv_mem->cv_errfp) #define uround (cv_mem->cv_uround) #define vec_tmpl (cv_mem->cv_tempv) /* * ----------------------------------------------------------------- * User-Callable Functions: malloc, reinit, and free * ----------------------------------------------------------------- */ void *CVBBDPrecAlloc(void *cvode_mem, long int Nlocal, long int mudq, long int mldq, long int mukeep, long int mlkeep, realtype dqrely, CVLocalFn gloc, CVCommFn cfn) { CVodeMem cv_mem; CVBBDPrecData pdata; long int muk, mlk, storage_mu; if (cvode_mem == NULL) { fprintf(stderr, MSGBBDP_CVMEM_NULL); return(NULL); } cv_mem = (CVodeMem) cvode_mem; /* Test if the NVECTOR package is compatible with the BLOCK BAND preconditioner */ if(vec_tmpl->ops->nvgetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGBBDP_BAD_NVECTOR); return(NULL); } /* Allocate data memory */ pdata = (CVBBDPrecData) malloc(sizeof *pdata); if (pdata == NULL) return(NULL); /* Set pointers to gloc and cfn; load half-bandwidths */ pdata->cvode_mem = cvode_mem; pdata->gloc = gloc; pdata->cfn = cfn; pdata->mudq = MIN( Nlocal-1, MAX(0,mudq) ); pdata->mldq = MIN( Nlocal-1, MAX(0,mldq) ); muk = MIN( Nlocal-1, MAX(0,mukeep) ); mlk = MIN( Nlocal-1, MAX(0,mlkeep) ); pdata->mukeep = muk; pdata->mlkeep = mlk; /* Allocate memory for saved Jacobian */ pdata->savedJ = BandAllocMat(Nlocal, muk, mlk, muk); if (pdata->savedJ == NULL) { free(pdata); return(NULL); } /* Allocate memory for preconditioner matrix */ storage_mu = MIN(Nlocal-1, muk + mlk); pdata->savedP = BandAllocMat(Nlocal, muk, mlk, storage_mu); if (pdata->savedP == NULL) { BandFreeMat(pdata->savedJ); free(pdata); return(NULL); } /* Allocate memory for pivots */ pdata->pivots = BandAllocPiv(Nlocal); if (pdata->savedJ == NULL) { BandFreeMat(pdata->savedP); BandFreeMat(pdata->savedJ); free(pdata); return(NULL); } /* Set pdata->dqrely based on input dqrely (0 implies default). */ pdata->dqrely = (dqrely > ZERO) ? dqrely : RSqrt(uround); /* Store Nlocal to be used in CVBBDPrecSetup */ pdata->n_local = Nlocal; /* Set work space sizes and initialize nge */ pdata->rpwsize = Nlocal*(muk + 2*mlk + storage_mu + 2); pdata->ipwsize = Nlocal; pdata->nge = 0; return((void *)pdata); } int CVBBDSpgmr(void *cvode_mem, int pretype, int maxl, void *bbd_data) { int flag; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBDP_NO_PDATA); return(CV_PDATA_NULL); } flag = CVSpgmr(cvode_mem, pretype, maxl); if(flag != CVSPGMR_SUCCESS) return(flag); flag = CVSpgmrSetPrecData(cvode_mem, bbd_data); if(flag != CVSPGMR_SUCCESS) return(flag); flag = CVSpgmrSetPrecSetupFn(cvode_mem, CVBBDPrecSetup); if(flag != CVSPGMR_SUCCESS) return(flag); flag = CVSpgmrSetPrecSolveFn(cvode_mem, CVBBDPrecSolve); if(flag != CVSPGMR_SUCCESS) return(flag); return(CVSPGMR_SUCCESS); } int CVBBDPrecReInit(void *bbd_data, long int mudq, long int mldq, realtype dqrely, CVLocalFn gloc, CVCommFn cfn) { CVBBDPrecData pdata; CVodeMem cv_mem; long int Nlocal; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBDP_NO_PDATA); return(CV_PDATA_NULL); } pdata = (CVBBDPrecData) bbd_data; cv_mem = (CVodeMem) pdata->cvode_mem; /* Set pointers to gloc and cfn; load half-bandwidths */ pdata->gloc = gloc; pdata->cfn = cfn; Nlocal = pdata->n_local; pdata->mudq = MIN( Nlocal-1, MAX(0,mudq) ); pdata->mldq = MIN( Nlocal-1, MAX(0,mldq) ); /* Set pdata->dqrely based on input dqrely (0 implies default). */ pdata->dqrely = (dqrely > ZERO) ? dqrely : RSqrt(uround); /* Re-initialize nge */ pdata->nge = 0; return(CV_SUCCESS); } void CVBBDPrecFree(void *bbd_data) { CVBBDPrecData pdata; if ( bbd_data != NULL ) { pdata = (CVBBDPrecData) bbd_data; BandFreeMat(pdata->savedJ); BandFreeMat(pdata->savedP); BandFreePiv(pdata->pivots); free(pdata); } } int CVBBDPrecGetWorkSpace(void *bbd_data, long int *lenrwBBDP, long int *leniwBBDP) { CVBBDPrecData pdata; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBDP_PDATA_NULL); return(CV_PDATA_NULL); } pdata = (CVBBDPrecData) bbd_data; *lenrwBBDP = pdata->rpwsize; *leniwBBDP = pdata->ipwsize; return(CV_SUCCESS); } int CVBBDPrecGetNumGfnEvals(void *bbd_data, long int *ngevalsBBDP) { CVBBDPrecData pdata; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBDP_PDATA_NULL); return(CV_PDATA_NULL); } pdata = (CVBBDPrecData) bbd_data; *ngevalsBBDP = pdata->nge; return(CV_SUCCESS); } /* Readability Replacements */ #define Nlocal (pdata->n_local) #define mudq (pdata->mudq) #define mldq (pdata->mldq) #define mukeep (pdata->mukeep) #define mlkeep (pdata->mlkeep) #define dqrely (pdata->dqrely) #define gloc (pdata->gloc) #define cfn (pdata->cfn) #define savedJ (pdata->savedJ) #define savedP (pdata->savedP) #define pivots (pdata->pivots) #define nge (pdata->nge) /* * ----------------------------------------------------------------- * Function : CVBBDPrecSetup * ----------------------------------------------------------------- * CVBBDPrecSetup generates and factors a banded block of the * preconditioner matrix on each processor, via calls to the * user-supplied gloc and cfn functions. It uses difference * quotient approximations to the Jacobian elements. * * CVBBDPrecSetup calculates a new J,if necessary, then calculates * P = I - gamma*J, and does an LU factorization of P. * * The parameters of CVBBDPrecSetup used here are as follows: * * t is the current value of the independent variable. * * y is the current value of the dependent variable vector, * namely the predicted value of y(t). * * fy is the vector f(t,y). * * jok is an input flag indicating whether Jacobian-related * data needs to be recomputed, as follows: * jok == FALSE means recompute Jacobian-related data * from scratch. * jok == TRUE means that Jacobian data from the * previous CVBBDPrecon call can be reused * (with the current value of gamma). * A CVBBDPrecon call with jok == TRUE should only occur * after a call with jok == FALSE. * * jcurPtr is a pointer to an output integer flag which is * set by CVBBDPrecon as follows: * *jcurPtr = TRUE if Jacobian data was recomputed. * *jcurPtr = FALSE if Jacobian data was not recomputed, * but saved data was reused. * * gamma is the scalar appearing in the Newton matrix. * * bbd_data is a pointer to user data - the same as the P_data * parameter passed to CVSpgmr. For CVBBDPrecon, this * should be of type CVBBDData. * * tmp1, tmp2, and tmp3 are pointers to memory allocated * for NVectors which are be used by CVBBDPrecSetup * as temporary storage or work space. * * * Return value: * The value returned by this CVBBDPrecSetup function is the int * 0 if successful, * 1 for a recoverable error (step will be retried). * ----------------------------------------------------------------- */ static int CVBBDPrecSetup(realtype t, N_Vector y, N_Vector fy, booleantype jok, booleantype *jcurPtr, realtype gamma, void *bbd_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { long int ier; CVBBDPrecData pdata; pdata = (CVBBDPrecData) bbd_data; if (jok) { /* If jok = TRUE, use saved copy of J */ *jcurPtr = FALSE; BandCopy(savedJ, savedP, mukeep, mlkeep); } else { /* Otherwise call CVBBDDQJac for new J value */ *jcurPtr = TRUE; BandZero(savedJ); CVBBDDQJac(pdata, t, y, tmp1, tmp2, tmp3); nge += 1 + MIN(mldq + mudq + 1, Nlocal); BandCopy(savedJ, savedP, mukeep, mlkeep); } /* Scale and add I to get P = I - gamma*J */ BandScale(-gamma, savedP); BandAddI(savedP); /* Do LU factorization of P in place */ ier = BandFactor(savedP, pivots); /* Return 0 if the LU was complete; otherwise return 1 */ if (ier > 0) return(1); return(0); } /* * ----------------------------------------------------------------- * Function : CVBBDPrecSolve * ----------------------------------------------------------------- * CVBBDPrecSolve solves a linear system P z = r, with the * band-block-diagonal preconditioner matrix P generated and * factored by CVBBDPrecSetup. * * The parameters of CVBBDPrecSolve used here are as follows: * * r is the right-hand side vector of the linear system. * * bbd_data is a pointer to the preconditioner data returned by * CVBBDPrecAlloc. * * z is the output vector computed by CVBBDPrecSolve. * * The value returned by the CVBBDPrecSolve function is always 0, * indicating success. * ----------------------------------------------------------------- */ static int CVBBDPrecSolve(realtype t, N_Vector y, N_Vector fy, N_Vector r, N_Vector z, realtype gamma, realtype delta, int lr, void *bbd_data, N_Vector tmp) { CVBBDPrecData pdata; realtype *zd; pdata = (CVBBDPrecData) bbd_data; /* Copy r to z, then do backsolve and return */ N_VScale(ONE, r, z); zd = N_VGetArrayPointer(z); BandBacksolve(savedP, pivots, zd); return(0); } /* * ----------------------------------------------------------------- * CVBBDDQJac * ----------------------------------------------------------------- * This routine generates a banded difference quotient approximation to * the local block of the Jacobian of g(t,y). It assumes that a band * matrix of type BandMat is stored columnwise, and that elements within * each column are contiguous. All matrix elements are generated as * difference quotients, by way of calls to the user routine gloc. * By virtue of the band structure, the number of these calls is * bandwidth + 1, where bandwidth = mldq + mudq + 1. * But the band matrix kept has bandwidth = mlkeep + mukeep + 1. * This routine also assumes that the local elements of a vector are * stored contiguously. * ----------------------------------------------------------------- */ #define ewt (cv_mem->cv_ewt) #define h (cv_mem->cv_h) #define f_data (cv_mem->cv_f_data) static void CVBBDDQJac(CVBBDPrecData pdata, realtype t, N_Vector y, N_Vector gy, N_Vector ytemp, N_Vector gtemp) { CVodeMem cv_mem; realtype gnorm, minInc, inc, inc_inv; long int group, i, j, width, ngroups, i1, i2; realtype *y_data, *ewt_data, *gy_data, *gtemp_data, *ytemp_data, *col_j; cv_mem = (CVodeMem) pdata->cvode_mem; /* Load ytemp with y = predicted solution vector */ N_VScale(ONE, y, ytemp); /* Call cfn and gloc to get base value of g(t,y) */ if (cfn != NULL) cfn (Nlocal, t, y, f_data); gloc(Nlocal, t, ytemp, gy, f_data); /* Obtain pointers to the data for various vectors */ y_data = N_VGetArrayPointer(y); gy_data = N_VGetArrayPointer(gy); ewt_data = N_VGetArrayPointer(ewt); ytemp_data = N_VGetArrayPointer(ytemp); gtemp_data = N_VGetArrayPointer(gtemp); /* Set minimum increment based on uround and norm of g */ gnorm = N_VWrmsNorm(gy, ewt); minInc = (gnorm != ZERO) ? (MIN_INC_MULT * ABS(h) * uround * Nlocal * gnorm) : ONE; /* Set bandwidth and number of column groups for band differencing */ width = mldq + mudq + 1; ngroups = MIN(width, Nlocal); /* Loop over groups */ for (group=1; group <= ngroups; group++) { /* Increment all y_j in group */ for(j=group-1; j < Nlocal; j+=width) { inc = MAX(dqrely*ABS(y_data[j]), minInc/ewt_data[j]); ytemp_data[j] += inc; } /* Evaluate g with incremented y */ gloc(Nlocal, t, ytemp, gtemp, f_data); /* Restore ytemp, then form and load difference quotients */ for (j=group-1; j < Nlocal; j+=width) { ytemp_data[j] = y_data[j]; col_j = BAND_COL(savedJ,j); inc = MAX(dqrely*ABS(y_data[j]), minInc/ewt_data[j]); inc_inv = ONE/inc; i1 = MAX(0, j-mukeep); i2 = MIN(j+mlkeep, Nlocal-1); for (i=i1; i <= i2; i++) BAND_COL_ELEM(col_j,i,j) = inc_inv * (gtemp_data[i] - gy_data[i]); } } } neuron-7.5/src/sundials/cvodes/cvbbdpre.h000077500000000000000000000277041323325274500205520ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Michael Wittman, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the header file for the CVBBDPRE module, for a * band-block-diagonal preconditioner, i.e. a block-diagonal * matrix with banded blocks, for use with CVSpgmr, and * the parallel implementation of the NVECTOR module. * * Summary: * * These routines provide a preconditioner matrix that is * block-diagonal with banded blocks. The blocking corresponds * to the distribution of the dependent variable vector y among * the processors. Each preconditioner block is generated from * the Jacobian of the local part (on the current processor) of a * given function g(t,y) approximating f(t,y). The blocks are * generated by a difference quotient scheme on each processor * independently. This scheme utilizes an assumed banded * structure with given half-bandwidths, mudq and mldq. * However, the banded Jacobian block kept by the scheme has * half-bandwiths mukeep and mlkeep, which may be smaller. * * The user's calling program should have the following form: * * #include "nvector_parallel.h" * #include "cvbbdpre.h" * ... * void *cvode_mem; * void *bbd_data; * ... * Set y0 * ... * cvode_mem = CVodeCreate(...); * ier = CVodeMalloc(...); * ... * bbd_data = CVBBDPrecAlloc(cvode_mem, Nlocal, mudq ,mldq, * mukeep, mlkeep, dqrely, gloc, cfn); * flag = CVBBDSpgmr(cvode_mem, pretype, maxl, bbd_data); * ... * ier = CVode(...); * ... * CVBBDPrecFree(bbd_data); * ... * CVodeFree(...); * * Free y0 * * The user-supplied routines required are: * * f = function defining the ODE right-hand side f(t,y). * * gloc = function defining the approximation g(t,y). * * cfn = function to perform communication need for gloc. * * Notes: * * 1) This header file is included by the user for the definition * of the CVBBDData type and for needed function prototypes. * * 2) The CVBBDPrecAlloc call includes half-bandwiths mudq and mldq * to be used in the difference-quotient calculation of the * approximate Jacobian. They need not be the true * half-bandwidths of the Jacobian of the local block of g, * when smaller values may provide a greater efficiency. * Also, the half-bandwidths mukeep and mlkeep of the retained * banded approximate Jacobian block may be even smaller, * to reduce storage and computation costs further. * For all four half-bandwidths, the values need not be the * same on every processor. * * 3) The actual name of the user's f function is passed to * CVodeMalloc, and the names of the user's gloc and cfn * functions are passed to CVBBDPrecAlloc. * * 4) The pointer to the user-defined data block f_data, which is * set through CVodeSetFdata is also available to the user in * gloc and cfn. * * 5) For the CVSpgmr solver, the Gram-Schmidt type gstype, is * left to the user to specify through CVSpgmrSetGStype. * * 6) Optional outputs specific to this module are available by * way of routines listed below. These include work space sizes * and the cumulative number of gloc calls. The costs * associated with this module also include nsetups banded LU * factorizations, nlinsetups cfn calls, and npsolves banded * backsolve calls, where nlinsetups and npsolves are * integrator/CVSPGMR optional outputs. * ----------------------------------------------------------------- */ #ifndef _CVBBDPRE_H #define _CVBBDPRE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Type : CVLocalFn * ----------------------------------------------------------------- * The user must supply a function g(t,y) which approximates the * right-hand side function f for the system y'=f(t,y), and which * is computed locally (without inter-processor communication). * (The case where g is mathematically identical to f is allowed.) * The implementation of this function must have type CVLocalFn. * * This function takes as input the local vector size Nlocal, the * independent variable value t, the local real dependent * variable vector y, and a pointer to the user-defined data * block f_data. It is to compute the local part of g(t,y) and * store this in the vector g. * (Allocation of memory for y and g is handled within the * preconditioner module.) * The f_data parameter is the same as that specified by the user * through the CVodeSetFdata routine. * A CVLocalFn gloc does not have a return value. * ----------------------------------------------------------------- */ typedef void (*CVLocalFn)(long int Nlocal, realtype t, N_Vector y, N_Vector g, void *f_data); /* * ----------------------------------------------------------------- * Type : CVCommFn * ----------------------------------------------------------------- * The user may supply a function of type CVCommFn which performs * all inter-processor communication necessary to evaluate the * approximate right-hand side function described above. * * This function takes as input the local vector size Nlocal, * the independent variable value t, the dependent variable * vector y, and a pointer to the user-defined data block f_data. * The f_data parameter is the same as that specified by the user * through the CVodeSetFdata routine. The CVCommFn cfn is * expected to save communicated data in space defined within the * structure f_data. Note: A CVCommFn cfn does not have a return value. * * Each call to the CVCommFn cfn is preceded by a call to the * RhsFn f with the same (t,y) arguments. Thus cfn can omit any * communications done by f if relevant to the evaluation of g. * If all necessary communication was done by f, the user can * pass NULL for cfn in CVBBDPrecAlloc (see below). * ----------------------------------------------------------------- */ typedef void (*CVCommFn)(long int Nlocal, realtype t, N_Vector y, void *f_data); /* * ----------------------------------------------------------------- * Function : CVBBDPrecAlloc * ----------------------------------------------------------------- * CVBBDPrecAlloc allocates and initializes a CVBBDData structure * to be passed to CVSpgmr (and used by CVBBDPrecSetup and * and CVBBDPrecSolve. * * The parameters of CVBBDPrecAlloc are as follows: * * cvode_mem is the pointer to the integrator memory. * * Nlocal is the length of the local block of the vectors y etc. * on the current processor. * * mudq, mldq are the upper and lower half-bandwidths to be used * in the difference-quotient computation of the local * Jacobian block. * * mukeep, mlkeep are the upper and lower half-bandwidths of the * retained banded approximation to the local Jacobian * block. * * dqrely is an optional input. It is the relative increment * in components of y used in the difference quotient * approximations. To specify the default, pass 0. * The default is dqrely = sqrt(unit roundoff). * * gloc is the name of the user-supplied function g(t,y) that * approximates f and whose local Jacobian blocks are * to form the preconditioner. * * cfn is the name of the user-defined function that performs * necessary inter-processor communication for the * execution of gloc. * * CVBBDPrecAlloc returns the storage allocated (type *void), * or NULL if the request for storage cannot be satisfied. * ----------------------------------------------------------------- */ void *CVBBDPrecAlloc(void *cvode_mem, long int Nlocal, long int mudq, long int mldq, long int mukeep, long int mlkeep, realtype dqrely, CVLocalFn gloc, CVCommFn cfn); /* * ----------------------------------------------------------------- * Function : CVBBDSpgmr * ----------------------------------------------------------------- * CVBBDSpgmr links the CVBBDPRE preconditioner to the CVSPGMR * linear solver. It performs the following actions: * 1) Calls the CVSPGMR specification routine and attaches the * CVSPGMR linear solver to the integrator memory; * 2) Sets the preconditioner data structure for CVSPGMR * 3) Sets the preconditioner setup routine for CVSPGMR * 4) Sets the preconditioner solve routine for CVSPGMR * * Its first 3 arguments are the same as for CVSpgmr (see * cvspgmr.h). The last argument is the pointer to the CVBBDPRE * memory block returned by CVBBDPrecAlloc. * Note that the user need not call CVSpgmr. * * Possible return values are: * CVSPGMR_SUCCESS if successful * CVSPGMR_MEM_NULL if the cvode memory was NULL * CVSPGMR_LMEM_NULL if the cvspgmr memory was NULL * CVSPGMR_MEM_FAIL if there was a memory allocation failure * CVSPGMR_ILL_INPUT if a required vector operation is missing * CV_PDATA_NULL if the bbd_data was NULL * ----------------------------------------------------------------- */ int CVBBDSpgmr(void *cvode_mem, int pretype, int maxl, void *bbd_data); /* * ----------------------------------------------------------------- * Function : CVBBDPrecReInit * ----------------------------------------------------------------- * CVBBDPrecReInit re-initializes the BBDPRE module when solving a * sequence of problems of the same size with CVSPGMR/CVBBDPRE, * provided there is no change in Nlocal, mukeep, or mlkeep. * After solving one problem, and after calling CVodeReInit to * re-initialize the integrator for a subsequent problem, call * CVBBDPrecReInit. Then call CVSpgmrSet* functions if necessary * for any changes to CVSpgmr parameters, before calling CVode. * * The first argument to CVBBDPrecReInit must be the pointer pdata * that was returned by CVBBDPrecAlloc. All other arguments have * the same names and meanings as those of CVBBDPrecAlloc. * * The return value of CVBBDPrecReInit is CV_SUCCESS, indicating * success, or CV_PDATA_NULL if bbd_data was NULL. * ----------------------------------------------------------------- */ int CVBBDPrecReInit(void *bbd_data, long int mudq, long int mldq, realtype dqrely, CVLocalFn gloc, CVCommFn cfn); /* * ----------------------------------------------------------------- * Function : CVBBDPrecFree * ----------------------------------------------------------------- * CVBBDPrecFree frees the memory block bbd_data allocated by the * call to CVBBDAlloc. * ----------------------------------------------------------------- */ void CVBBDPrecFree(void *bbd_data); /* * ----------------------------------------------------------------- * BBDPRE optional output extraction routines * ----------------------------------------------------------------- * CVBBDPrecGetWorkSpace returns the BBDPRE real and integer workspace * sizes. * CVBBDPrecGetNumGfnEvals returns the number of calls to gfn. * * The return value of CVBBDPrecGet* is one of: * CV_SUCCESS if successful * CV_PDATA_NULL if the bbd_data memory was NULL * ----------------------------------------------------------------- */ int CVBBDPrecGetWorkSpace(void *bbd_data, long int *lenrwBBDP, long int *leniwBBDP); int CVBBDPrecGetNumGfnEvals(void *bbd_data, long int *ngevalsBBDP); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvbbdpre_impl.h000077500000000000000000000040741323325274500215660ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Michael Wittman, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the CVBBDPRE module. * ----------------------------------------------------------------- */ #ifndef _CVBBDPRE_IMPL_H #define _CVBBDPRE_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "cvbbdpre.h" #include "band.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Type: CVBBDPrecData * ----------------------------------------------------------------- */ typedef struct { /* passed by user to CVBBDPrecAlloc, used by PrecSetup/PrecSolve */ long int mudq, mldq, mukeep, mlkeep; realtype dqrely; CVLocalFn gloc; CVCommFn cfn; /* set by CVBBDPrecSetup and used by CVBBDPrecSolve */ BandMat savedJ; BandMat savedP; long int *pivots; /* set by CVBBDPrecAlloc and used by CVBBDPrecSetup */ long int n_local; /* available for optional output: */ long int rpwsize; long int ipwsize; long int nge; /* Pointer to cvode_mem */ void *cvode_mem; } *CVBBDPrecData; /* Error Messages */ #define _CVBBDALLOC_ "CVBBDAlloc-- " #define MSGBBDP_CVMEM_NULL _CVBBDALLOC_ "Integrator memory is NULL.\n\n" #define MSGBBDP_BAD_NVECTOR _CVBBDALLOC_ "A required vector operation is not implemented.\n\n" #define MSGBBDP_PDATA_NULL "CVBBDPrecGet*-- BBDPrecData is NULL.\n\n" #define MSGBBDP_NO_PDATA "CVBBDSpgmr-- BBDPrecData is NULL.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvdense.c000077500000000000000000000373071323325274500204050ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the CVDENSE linear solver. * ----------------------------------------------------------------- */ #include #include #include "cvdense_impl.h" #include "cvodes_impl.h" #include "sundialsmath.h" /* Other Constants */ #define MIN_INC_MULT RCONST(1000.0) #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define TWO RCONST(2.0) /* CVDENSE linit, lsetup, lsolve, and lfree routines */ static int CVDenseInit(CVodeMem cv_mem); static int CVDenseSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3); static int CVDenseSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur); static void CVDenseFree(CVodeMem cv_mem); /* CVDENSE DQJac routine */ static void CVDenseDQJac(long int n, DenseMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* Readability Replacements */ #define lmm (cv_mem->cv_lmm) #define f (cv_mem->cv_f) #define f_data (cv_mem->cv_f_data) #define uround (cv_mem->cv_uround) #define nst (cv_mem->cv_nst) #define tn (cv_mem->cv_tn) #define h (cv_mem->cv_h) #define gamma (cv_mem->cv_gamma) #define gammap (cv_mem->cv_gammap) #define gamrat (cv_mem->cv_gamrat) #define ewt (cv_mem->cv_ewt) #define errfp (cv_mem->cv_errfp) #define linit (cv_mem->cv_linit) #define lsetup (cv_mem->cv_lsetup) #define lsolve (cv_mem->cv_lsolve) #define lfree (cv_mem->cv_lfree) #define lmem (cv_mem->cv_lmem) #define vec_tmpl (cv_mem->cv_tempv) #define setupNonNull (cv_mem->cv_setupNonNull) #define n (cvdense_mem->d_n) #define jac (cvdense_mem->d_jac) #define M (cvdense_mem->d_M) #define pivots (cvdense_mem->d_pivots) #define savedJ (cvdense_mem->d_savedJ) #define nstlj (cvdense_mem->d_nstlj) #define nje (cvdense_mem->d_nje) #define nfeD (cvdense_mem->d_nfeD) #define J_data (cvdense_mem->d_J_data) #define last_flag (cvdense_mem->d_last_flag) /* * ----------------------------------------------------------------- * CVDense * ----------------------------------------------------------------- * This routine initializes the memory record and sets various function * fields specific to the dense linear solver module. CVDense first * calls the existing lfree routine if this is not NULL. Then it sets * the cv_linit, cv_lsetup, cv_lsolve, cv_lfree fields in (*cvode_mem) * to be CVDenseInit, CVDenseSetup, CVDenseSolve, and CVDenseFree, * respectively. It allocates memory for a structure of type * CVDenseMemRec and sets the cv_lmem field in (*cvode_mem) to the * address of this structure. It sets setupNonNull in (*cvode_mem) to * TRUE, and the d_jac field to the default CVDenseDQJac. * Finally, it allocates memory for M, savedJ, and pivots. * The return value is SUCCESS = 0, or LMEM_FAIL = -1. * * NOTE: The dense linear solver assumes a serial implementation * of the NVECTOR package. Therefore, CVDense will first * test for compatible a compatible N_Vector internal * representation by checking that N_VGetArrayPointer and * N_VSetArrayPointer exist. * ----------------------------------------------------------------- */ int CVDense(void *cvode_mem, long int N) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Test if the NVECTOR package is compatible with the DENSE solver */ if (vec_tmpl->ops->nvgetarraypointer == NULL || vec_tmpl->ops->nvsetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_BAD_NVECTOR); return(CVDENSE_ILL_INPUT); } if (lfree !=NULL) lfree(cv_mem); /* Set four main function fields in cv_mem */ linit = CVDenseInit; lsetup = CVDenseSetup; lsolve = CVDenseSolve; lfree = CVDenseFree; /* Get memory for CVDenseMemRec */ cvdense_mem = (CVDenseMem) malloc(sizeof(CVDenseMemRec)); if (cvdense_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_MEM_FAIL); return(CVDENSE_MEM_FAIL); } /* Set default Jacobian routine and Jacobian data */ jac = CVDenseDQJac; J_data = cvode_mem; last_flag = CVDENSE_SUCCESS; setupNonNull = TRUE; /* Set problem dimension */ n = N; /* Allocate memory for M, savedJ, and pivot array */ M = DenseAllocMat(N); if (M == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_MEM_FAIL); return(CVDENSE_MEM_FAIL); } savedJ = DenseAllocMat(N); if (savedJ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_MEM_FAIL); DenseFreeMat(M); return(CVDENSE_MEM_FAIL); } pivots = DenseAllocPiv(N); if (pivots == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_MEM_FAIL); DenseFreeMat(M); DenseFreeMat(savedJ); return(CVDENSE_MEM_FAIL); } /* Attach linear solver memory to integrator memory */ lmem = cvdense_mem; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseSetJacFn * ----------------------------------------------------------------- */ int CVDenseSetJacFn(void *cvode_mem, CVDenseJacFn djac) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_SETGET_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_SETGET_LMEM_NULL); return(CVDENSE_LMEM_NULL); } cvdense_mem = (CVDenseMem) lmem; jac = djac; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseSetJacData * ----------------------------------------------------------------- */ int CVDenseSetJacData(void *cvode_mem, void *jac_data) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_SETGET_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_SETGET_LMEM_NULL); return(CVDENSE_LMEM_NULL); } cvdense_mem = (CVDenseMem) lmem; J_data = jac_data; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseGetWorkSpace * ----------------------------------------------------------------- */ int CVDenseGetWorkSpace(void *cvode_mem, long int *lenrwD, long int *leniwD) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_SETGET_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_SETGET_LMEM_NULL); return(CVDENSE_LMEM_NULL); } cvdense_mem = (CVDenseMem) lmem; *lenrwD = 2*n*n; *leniwD = n; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseGetNumJacEvals * ----------------------------------------------------------------- */ int CVDenseGetNumJacEvals(void *cvode_mem, long int *njevalsD) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_SETGET_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_SETGET_LMEM_NULL); return(CVDENSE_LMEM_NULL); } cvdense_mem = (CVDenseMem) lmem; *njevalsD = nje; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseGetNumRhsEvals * ----------------------------------------------------------------- */ int CVDenseGetNumRhsEvals(void *cvode_mem, long int *nfevalsD) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_SETGET_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_SETGET_LMEM_NULL); return(CVDENSE_LMEM_NULL); } cvdense_mem = (CVDenseMem) lmem; *nfevalsD = nfeD; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseGetLastFlag * ----------------------------------------------------------------- */ int CVDenseGetLastFlag(void *cvode_mem, int *flag) { CVodeMem cv_mem; CVDenseMem cvdense_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDS_SETGET_CVMEM_NULL); return(CVDENSE_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDS_SETGET_LMEM_NULL); return(CVDENSE_LMEM_NULL); } cvdense_mem = (CVDenseMem) lmem; *flag = last_flag; return(CVDENSE_SUCCESS); } /* * ----------------------------------------------------------------- * CVDenseInit * ----------------------------------------------------------------- * This routine does remaining initializations specific to the dense * linear solver. * ----------------------------------------------------------------- */ static int CVDenseInit(CVodeMem cv_mem) { CVDenseMem cvdense_mem; cvdense_mem = (CVDenseMem) lmem; nje = 0; nfeD = 0; nstlj = 0; if (jac == NULL) { jac = CVDenseDQJac; J_data = cv_mem; } last_flag = CVDENSE_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVDenseSetup * ----------------------------------------------------------------- * This routine does the setup operations for the dense linear solver. * It makes a decision whether or not to call the Jacobian evaluation * routine based on various state variables, and if not it uses the * saved copy. In any case, it constructs the Newton matrix * M = I - gamma*J, updates counters, and calls the dense LU * factorization routine. * ----------------------------------------------------------------- */ static int CVDenseSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3) { booleantype jbad, jok; realtype dgamma; long int ier; CVDenseMem cvdense_mem; cvdense_mem = (CVDenseMem) lmem; /* Use nst, gamma/gammap, and convfail to set J eval. flag jok */ dgamma = ABS((gamma/gammap) - ONE); jbad = (nst == 0) || (nst > nstlj + CVD_MSBJ) || ((convfail == CV_FAIL_BAD_J) && (dgamma < CVD_DGMAX)) || (convfail == CV_FAIL_OTHER); jok = !jbad; if (jok) { /* If jok = TRUE, use saved copy of J */ *jcurPtr = FALSE; DenseCopy(savedJ, M); } else { /* If jok = FALSE, call jac routine for new J value */ nje++; nstlj = nst; *jcurPtr = TRUE; DenseZero(M); jac(n, M, tn, ypred, fpred, J_data, vtemp1, vtemp2, vtemp3); DenseCopy(M, savedJ); } /* Scale and add I to get M = I - gamma*J */ DenseScale(-gamma, M); DenseAddI(M); /* Do LU factorization of M */ ier = DenseFactor(M, pivots); /* Return 0 if the LU was complete; otherwise return 1 */ last_flag = ier; if (ier > 0) return(1); return(0); } /* * ----------------------------------------------------------------- * CVDenseSolve * ----------------------------------------------------------------- * This routine handles the solve operation for the dense linear solver * by calling the dense backsolve routine. The returned value is 0. * ----------------------------------------------------------------- */ static int CVDenseSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur) { CVDenseMem cvdense_mem; realtype *bd; cvdense_mem = (CVDenseMem) lmem; bd = N_VGetArrayPointer(b); DenseBacksolve(M, pivots, bd); /* If CV_BDF, scale the correction to account for change in gamma */ if ((lmm == CV_BDF) && (gamrat != ONE)) { N_VScale(TWO/(ONE + gamrat), b, b); } last_flag = CVDENSE_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVDenseFree * ----------------------------------------------------------------- * This routine frees memory specific to the dense linear solver. * ----------------------------------------------------------------- */ static void CVDenseFree(CVodeMem cv_mem) { CVDenseMem cvdense_mem; cvdense_mem = (CVDenseMem) lmem; DenseFreeMat(M); DenseFreeMat(savedJ); DenseFreePiv(pivots); free(cvdense_mem); } /* * ----------------------------------------------------------------- * CVDenseDQJac * ----------------------------------------------------------------- * This routine generates a dense difference quotient approximation to * the Jacobian of f(t,y). It assumes that a dense matrix of type * DenseMat is stored column-wise, and that elements within each column * are contiguous. The address of the jth column of J is obtained via * the macro DENSE_COL and this pointer is associated with an N_Vector * using the N_VGetArrayPointer/N_VSetArrayPointer functions. * Finally, the actual computation of the jth column of the Jacobian is * done with a call to N_VLinearSum. * ----------------------------------------------------------------- */ static void CVDenseDQJac(long int N, DenseMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { realtype fnorm, minInc, inc, inc_inv, yjsaved, srur; realtype *tmp2_data, *y_data, *ewt_data; N_Vector ftemp, jthCol; long int j; CVodeMem cv_mem; CVDenseMem cvdense_mem; /* jac_data points to cvode_mem */ cv_mem = (CVodeMem) jac_data; cvdense_mem = (CVDenseMem) lmem; /* Save pointer to the array in tmp2 */ tmp2_data = N_VGetArrayPointer(tmp2); /* Rename work vectors for readibility */ ftemp = tmp1; jthCol = tmp2; /* Obtain pointers to the data for ewt, y */ ewt_data = N_VGetArrayPointer(ewt); y_data = N_VGetArrayPointer(y); /* Set minimum increment based on uround and norm of f */ srur = RSqrt(uround); fnorm = N_VWrmsNorm(fy, ewt); minInc = (fnorm != ZERO) ? (MIN_INC_MULT * ABS(h) * uround * N * fnorm) : ONE; /* This is the only for loop for 0..N-1 in CVODE */ for (j = 0; j < N; j++) { /* Generate the jth col of J(tn,y) */ N_VSetArrayPointer(DENSE_COL(J,j), jthCol); yjsaved = y_data[j]; inc = MAX(srur*ABS(yjsaved), minInc/ewt_data[j]); y_data[j] += inc; f(tn, y, ftemp, f_data); y_data[j] = yjsaved; inc_inv = ONE/inc; N_VLinearSum(inc_inv, ftemp, -inc_inv, fy, jthCol); DENSE_COL(J,j) = N_VGetArrayPointer(jthCol); } /* Restore original array pointer in tmp2 */ N_VSetArrayPointer(tmp2_data, tmp2); /* Increment counter nfeD */ nfeD += N; } neuron-7.5/src/sundials/cvodes/cvdense.h000077500000000000000000000156611323325274500204110ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the header file for the CVODE/CVODES dense linear * solver, CVDENSE. * ----------------------------------------------------------------- */ #ifndef _CVDENSE_H #define _CVDENSE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "dense.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * CVDENSE solver constants * ----------------------------------------------------------------- * CVD_MSBJ : maximum number of steps between dense Jacobian * evaluations * * CVD_DGMAX : maximum change in gamma between dense Jacobian * evaluations * ----------------------------------------------------------------- */ #define CVD_MSBJ 50 #define CVD_DGMAX RCONST(0.2) /* * ----------------------------------------------------------------- * Type : CVDenseJacFn * ----------------------------------------------------------------- * A dense Jacobian approximation function Jac must have the * prototype given below. Its parameters are: * * N is the problem size. * * J is the dense matrix (of type DenseMat) that will be loaded * by a CVDenseJacFn with an approximation to the Jacobian matrix * J = (df_i/dy_j) at the point (t,y). * J is preset to zero, so only the nonzero elements need to be * loaded. Two efficient ways to load J are: * * (1) (with macros - no explicit data structure references) * for (j=0; j < n; j++) { * col_j = DENSE_COL(J,j); * for (i=0; i < n; i++) { * generate J_ij = the (i,j)th Jacobian element * col_j[i] = J_ij; * } * } * * (2) (without macros - explicit data structure references) * for (j=0; j < n; j++) { * col_j = (J->data)[j]; * for (i=0; i < n; i++) { * generate J_ij = the (i,j)th Jacobian element * col_j[i] = J_ij; * } * } * * The DENSE_ELEM(A,i,j) macro is appropriate for use in small * problems in which efficiency of access is NOT a major concern. * * t is the current value of the independent variable. * * y is the current value of the dependent variable vector, * namely the predicted value of y(t). * * fy is the vector f(t,y). * * jac_data is a pointer to user data - the same as the jac_data * parameter passed to CVDense. * * NOTE: If the user's Jacobian routine needs other quantities, * they are accessible as follows: hcur (the current stepsize) * and ewt (the error weight vector) are accessible through * CVodeGetCurrentStep and CVodeGetErrWeights, respectively * (see cvode.h). The unit roundoff is available as * UNIT_ROUNDOFF defined in sundialstypes.h. * * tmp1, tmp2, and tmp3 are pointers to memory allocated for * vectors of length N which can be used by a CVDenseJacFn * as temporary storage or work space. * ----------------------------------------------------------------- */ typedef void (*CVDenseJacFn)(long int N, DenseMat J, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* * ----------------------------------------------------------------- * Function : CVDense * ----------------------------------------------------------------- * A call to the CVDense function links the main integrator with * the CVDENSE linear solver. * * cvode_mem is the pointer to the integrator memory returned by * CVodeCreate. * * N is the size of the ODE system. * * The return value of CVDense is one of: * CVDENSE_SUCCESS if successful * CVDENSE_MEM_NULL if the cvode memory was NULL * CVDENSE_MEM_FAIL if there was a memory allocation failure * CVDENSE_ILL_INPUT if a required vector operation is missing * ----------------------------------------------------------------- */ int CVDense(void *cvode_mem, long int N); /* * ----------------------------------------------------------------- * Optional inputs to the CVDENSE linear solver * ----------------------------------------------------------------- * * CVDenseSetJacFn specifies the dense Jacobian approximation * routine to be used. A user-supplied djac routine * must be of type CVDenseJacFn. By default, a * difference quotient routine CVDenseDQJac, supplied * with this solver is used. * CVDenseSetJacData specifies a pointer to user data which is * passed to the djac routine every time it is called. * * The return value of CVDenseSet* is one of: * CVDENSE_SUCCESS if successful * CVDENSE_MEM_NULL if the cvode memory was NULL * CVDENSE_LMEM_NULL if the cvdense memory was NULL * ----------------------------------------------------------------- */ int CVDenseSetJacFn(void *cvode_mem, CVDenseJacFn djac); int CVDenseSetJacData(void *cvode_mem, void *jac_data); /* * ----------------------------------------------------------------- * Optional outputs from the CVDENSE linear solver * ----------------------------------------------------------------- * * CVDenseGetWorkSpace returns the real and integer workspace used * by CVDENSE. * CVDenseGetNumJacEvals returns the number of calls made to the * Jacobian evaluation routine djac. * CVDenseGetNumRhsEvals returns the number of calls to the user * f routine due to finite difference Jacobian * evaluation. * CVDenseGetLastFlag returns the last error flag set by any of * the CVDENSE interface functions. * * The return value of CVDenseGet* is one of: * CVDENSE_SUCCESS if successful * CVDENSE_MEM_NULL if the cvode memory was NULL * CVDENSE_LMEM_NULL if the cvdense memory was NULL * ----------------------------------------------------------------- */ int CVDenseGetWorkSpace(void *cvode_mem, long int *lenrwD, long int *leniwD); int CVDenseGetNumJacEvals(void *cvode_mem, long int *njevalsD); int CVDenseGetNumRhsEvals(void *cvode_mem, long int *nfevalsD); int CVDenseGetLastFlag(void *cvode_mem, int *flag); /* CVDENSE return values */ #define CVDENSE_SUCCESS 0 #define CVDENSE_MEM_NULL -1 #define CVDENSE_LMEM_NULL -2 #define CVDENSE_ILL_INPUT -3 #define CVDENSE_MEM_FAIL -4 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvdense_impl.h000077500000000000000000000052111323325274500214200ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the dense linear solver, CVDENSE. * ----------------------------------------------------------------- */ #ifndef _CVDENSE_IMPL_H #define _CVDENSE_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "cvdense.h" #include "dense.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types : CVDenseMemRec, CVDenseMem * ----------------------------------------------------------------- * The type CVDenseMem is pointer to a CVDenseMemRec. * This structure contains CVDense solver-specific data. * ----------------------------------------------------------------- */ typedef struct { long int d_n; /* problem dimension */ CVDenseJacFn d_jac; /* jac = Jacobian routine to be called */ DenseMat d_M; /* M = I - gamma J, gamma = h / l1 */ long int *d_pivots; /* pivots = pivot array for PM = LU */ DenseMat d_savedJ; /* savedJ = old Jacobian */ long int d_nstlj; /* nstlj = nst at last Jacobian eval. */ long int d_nje; /* nje = no. of calls to jac */ long int d_nfeD; /* nfeD = no. of calls to f due to difference quotient approximation of J */ void *d_J_data; /* J_data is passed to jac */ int d_last_flag; /* last error return flag */ } CVDenseMemRec, *CVDenseMem; /* Error Messages */ #define _CVDENSE_ "CVDense-- " #define MSGDS_CVMEM_NULL _CVDENSE_ "Integrator memory is NULL.\n\n" #define MSGDS_BAD_NVECTOR _CVDENSE_ "A required vector operation is not implemented.\n\n" #define MSGDS_MEM_FAIL _CVDENSE_ "A memory request failed.\n\n" #define MSGDS_SETGET_CVMEM_NULL "CVDenseSet*/CVDenseGet*-- Integrator memory is NULL.\n\n" #define MSGDS_SETGET_LMEM_NULL "CVDenseSet*/CVDenseGet*-- cvdense memory is NULL.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvdiag.c000077500000000000000000000246051323325274500202100ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the CVDIAG linear solver. * ----------------------------------------------------------------- */ #include #include #include "cvdiag_impl.h" #include "cvodes_impl.h" /* Other Constants */ #define FRACT RCONST(0.1) #define ONE RCONST(1.0) /* CVDIAG linit, lsetup, lsolve, and lfree routines */ static int CVDiagInit(CVodeMem cv_mem); static int CVDiagSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3); static int CVDiagSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur); static void CVDiagFree(CVodeMem cv_mem); /* Readability Replacements */ #define lrw1 (cv_mem->cv_lrw1) #define liw1 (cv_mem->cv_liw1) #define f (cv_mem->cv_f) #define f_data (cv_mem->cv_f_data) #define uround (cv_mem->cv_uround) #define tn (cv_mem->cv_tn) #define h (cv_mem->cv_h) #define rl1 (cv_mem->cv_rl1) #define gamma (cv_mem->cv_gamma) #define ewt (cv_mem->cv_ewt) #define nfe (cv_mem->cv_nfe) #define errfp (cv_mem->cv_errfp) #define zn (cv_mem->cv_zn) #define linit (cv_mem->cv_linit) #define lsetup (cv_mem->cv_lsetup) #define lsolve (cv_mem->cv_lsolve) #define lfree (cv_mem->cv_lfree) #define lmem (cv_mem->cv_lmem) #define vec_tmpl (cv_mem->cv_tempv) #define setupNonNull (cv_mem->cv_setupNonNull) #define gammasv (cvdiag_mem->di_gammasv) #define M (cvdiag_mem->di_M) #define bit (cvdiag_mem->di_bit) #define bitcomp (cvdiag_mem->di_bitcomp) #define nfeDI (cvdiag_mem->di_nfeDI) #define last_flag (cvdiag_mem->di_last_flag) /* * ----------------------------------------------------------------- * CVDiag * ----------------------------------------------------------------- * This routine initializes the memory record and sets various function * fields specific to the diagonal linear solver module. CVDense first * calls the existing lfree routine if this is not NULL. Then it sets * the cv_linit, cv_lsetup, cv_lsolve, cv_lfree fields in (*cvode_mem) * to be CVDiagInit, CVDiagSetup, CVDiagSolve, and CVDiagFree, * respectively. It allocates memory for a structure of type * CVDiagMemRec and sets the cv_lmem field in (*cvode_mem) to the * address of this structure. It sets setupNonNull in (*cvode_mem) to * TRUE. Finally, it allocates memory for M, bit, and bitcomp. * The CVDiag return value is SUCCESS = 0, LMEM_FAIL = -1, or * LIN_ILL_INPUT=-2. * ----------------------------------------------------------------- */ int CVDiag(void *cvode_mem) { CVodeMem cv_mem; CVDiagMem cvdiag_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDG_CVMEM_NULL); return(CVDIAG_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Check if N_VCompare and N_VInvTest are present */ if(vec_tmpl->ops->nvcompare == NULL || vec_tmpl->ops->nvinvtest == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_BAD_NVECTOR); return(CVDIAG_ILL_INPUT); } if (lfree != NULL) lfree(cv_mem); /* Set four main function fields in cv_mem */ linit = CVDiagInit; lsetup = CVDiagSetup; lsolve = CVDiagSolve; lfree = CVDiagFree; /* Get memory for CVDiagMemRec */ cvdiag_mem = (CVDiagMem) malloc(sizeof(CVDiagMemRec)); if (cvdiag_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_MEM_FAIL); return(CVDIAG_MEM_FAIL); } last_flag = CVDIAG_SUCCESS; /* Set flag setupNonNull = TRUE */ setupNonNull = TRUE; /* Allocate memory for M, bit, and bitcomp */ M = N_VClone(vec_tmpl); if (M == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_MEM_FAIL); return(CVDIAG_MEM_FAIL); } bit = N_VClone(vec_tmpl); if (bit == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_MEM_FAIL); N_VDestroy(M); return(CVDIAG_MEM_FAIL); } bitcomp = N_VClone(vec_tmpl); if (bitcomp == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_MEM_FAIL); N_VDestroy(M); N_VDestroy(bit); return(CVDIAG_MEM_FAIL); } /* Attach linear solver memory to integrator memory */ lmem = cvdiag_mem; return(CVDIAG_SUCCESS); } /* * ----------------------------------------------------------------- * CVDiagGetWorkSpace * ----------------------------------------------------------------- */ int CVDiagGetWorkSpace(void *cvode_mem, long int *lenrwDI, long int *leniwDI) { CVodeMem cv_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDG_SETGET_CVMEM_NULL); return(CVDIAG_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *lenrwDI = 3*lrw1; *leniwDI = 3*liw1; return(CVDIAG_SUCCESS); } /* * ----------------------------------------------------------------- * CVDiagGetNumRhsEvals * ----------------------------------------------------------------- */ int CVDiagGetNumRhsEvals(void *cvode_mem, long int *nfevalsDI) { CVodeMem cv_mem; CVDiagMem cvdiag_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDG_SETGET_CVMEM_NULL); return(CVDIAG_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_SETGET_LMEM_NULL); return(CVDIAG_LMEM_NULL); } cvdiag_mem = (CVDiagMem) lmem; *nfevalsDI = nfeDI; return(CVDIAG_SUCCESS); } /* * ----------------------------------------------------------------- * CVDiagGetLastFlag * ----------------------------------------------------------------- */ int CVDiagGetLastFlag(void *cvode_mem, int *flag) { CVodeMem cv_mem; CVDiagMem cvdiag_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGDG_SETGET_CVMEM_NULL); return(CVDIAG_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGDG_SETGET_LMEM_NULL); return(CVDIAG_LMEM_NULL); } cvdiag_mem = (CVDiagMem) lmem; *flag = last_flag; return(CVDIAG_SUCCESS); } /* * ----------------------------------------------------------------- * CVDiagInit * ----------------------------------------------------------------- * This routine does remaining initializations specific to the diagonal * linear solver. * ----------------------------------------------------------------- */ static int CVDiagInit(CVodeMem cv_mem) { CVDiagMem cvdiag_mem; cvdiag_mem = (CVDiagMem) lmem; nfeDI = 0; last_flag = CVDIAG_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVDiagSetup * ----------------------------------------------------------------- * This routine does the setup operations for the diagonal linear * solver. It constructs a diagonal approximation to the Newton matrix * M = I - gamma*J, updates counters, and inverts M. * ----------------------------------------------------------------- */ static int CVDiagSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3) { realtype r; N_Vector ftemp, y; booleantype invOK; CVDiagMem cvdiag_mem; cvdiag_mem = (CVDiagMem) lmem; /* Rename work vectors for use as temporary values of y and f */ ftemp = vtemp1; y = vtemp2; /* Form y with perturbation = FRACT*(func. iter. correction) */ r = FRACT * rl1; N_VLinearSum(h, fpred, -ONE, zn[1], ftemp); N_VLinearSum(r, ftemp, ONE, ypred, y); /* Evaluate f at perturbed y */ f(tn, y, M, f_data); nfeDI++; /* Construct M = I - gamma*J with J = diag(deltaf_i/deltay_i) */ N_VLinearSum(ONE, M, -ONE, fpred, M); N_VLinearSum(FRACT, ftemp, -h, M, M); N_VProd(ftemp, ewt, y); /* Protect against deltay_i being at roundoff level */ N_VCompare(uround, y, bit); N_VAddConst(bit, -ONE, bitcomp); N_VProd(ftemp, bit, y); N_VLinearSum(FRACT, y, -ONE, bitcomp, y); N_VDiv(M, y, M); N_VProd(M, bit, M); N_VLinearSum(ONE, M, -ONE, bitcomp, M); /* Invert M with test for zero components */ invOK = N_VInvTest(M, M); if (!invOK) { last_flag = CVDIAG_INV_FAIL; return(1); } /* Set jcur = TRUE, save gamma in gammasv, and return */ *jcurPtr = TRUE; gammasv = gamma; last_flag = CVDIAG_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVDiagSolve * ----------------------------------------------------------------- * This routine performs the solve operation for the diagonal linear * solver. If necessary it first updates gamma in M = I - gamma*J. * ----------------------------------------------------------------- */ static int CVDiagSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur) { booleantype invOK; realtype r; CVDiagMem cvdiag_mem; cvdiag_mem = (CVDiagMem) lmem; /* If gamma has changed, update factor in M, and save gamma value */ if (gammasv != gamma) { r = gamma / gammasv; N_VInv(M, M); N_VAddConst(M, -ONE, M); N_VScale(r, M, M); N_VAddConst(M, ONE, M); invOK = N_VInvTest(M, M); if (!invOK) { last_flag = CVDIAG_INV_FAIL; return (1); } gammasv = gamma; } /* Apply M-inverse to b */ N_VProd(b, M, b); last_flag = CVDIAG_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVDiagFree * ----------------------------------------------------------------- * This routine frees memory specific to the diagonal linear solver. * ----------------------------------------------------------------- */ static void CVDiagFree(CVodeMem cv_mem) { CVDiagMem cvdiag_mem; cvdiag_mem = (CVDiagMem) lmem; N_VDestroy(M); N_VDestroy(bit); N_VDestroy(bitcomp); free(cvdiag_mem); } neuron-7.5/src/sundials/cvodes/cvdiag.h000077500000000000000000000061771323325274500202210ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the header file for the CVODE/CVODES diagonal linear * solver, CVDIAG. * ----------------------------------------------------------------- */ #ifndef _CVDIAG_H #define _CVDIAG_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Function : CVDiag * ----------------------------------------------------------------- * A call to the CVDiag function links the main integrator with * the CVDIAG linear solver. * * cvode_mem is the pointer to the integrator memory returned by * CVodeCreate. * * The return value of CVDiag is one of: * CVDIAG_SUCCESS if successful * CVDIAG_MEM_NULL if the cvode memory was NULL * CVDIAG_MEM_FAIL if there was a memory allocation failure * CVDIAG_ILL_INPUT if a required vector operation is missing * ----------------------------------------------------------------- */ int CVDiag(void *cvode_mem); /* * ----------------------------------------------------------------- * Optional outputs from the CVDIAG linear solver * ----------------------------------------------------------------- * * CVDiagGetWorkSpace returns the real and integer workspace used * by CVDIAG. * CVDiagGetNumRhsEvals returns the number of calls to the user * f routine due to finite difference Jacobian * evaluation. * Note: The number of diagonal approximate * Jacobians formed is equal to the number of * CVDiagSetup calls. This number is available * through CVodeGetNumLinSolvSetups. * CVDiagGetLastFlag returns the last error flag set by any of * the CVDIAG interface functions. * * The return value of CVDiagGet* is one of: * CVDIAG_SUCCESS if successful * CVDIAG_MEM_NULL if the cvode memory was NULL * CVDIAG_LMEM_NULL if the cvdiag memory was NULL * ----------------------------------------------------------------- */ int CVDiagGetWorkSpace(void *cvode_mem, long int *lenrwDI, long int *leniwDI); int CVDiagGetNumRhsEvals(void *cvode_mem, long int *nfevalsDI); int CVDiagGetLastFlag(void *cvode_mem, int *flag); #define CVDIAG_SUCCESS 0 #define CVDIAG_MEM_NULL -1 #define CVDIAG_LMEM_NULL -2 #define CVDIAG_ILL_INPUT -3 #define CVDIAG_MEM_FAIL -4 #define CVDIAG_INV_FAIL 1 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvdiag_impl.h000077500000000000000000000046151323325274500212350ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the diagonal linear solver, CVDIAG. * ----------------------------------------------------------------- */ #ifndef _CVDIAG_IMPL_H #define _CVDIAG_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "cvdiag.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types: CVDiagMemRec, CVDiagMem * ----------------------------------------------------------------- * The type CVDiagMem is pointer to a CVDiagMemRec. * This structure contains CVDiag solver-specific data. * ----------------------------------------------------------------- */ typedef struct { realtype di_gammasv; /* gammasv = gamma at the last call to setup */ /* or solve */ N_Vector di_M; /* M = (I - gamma J)^{-1} , gamma = h / l1 */ N_Vector di_bit; /* temporary storage vector */ N_Vector di_bitcomp; /* temporary storage vector */ long int di_nfeDI; /* no. of calls to f due to difference quotient diagonal Jacobian approximation */ int di_last_flag; /* last error return flag */ } CVDiagMemRec, *CVDiagMem; /* Error Messages */ #define _CVDIAG_ "CVDiag-- " #define MSGDG_CVMEM_NULL _CVDIAG_ "Integrator memory is NULL.\n\n" #define MSGDG_BAD_NVECTOR _CVDIAG_ "A required vector operation is not implemented.\n\n" #define MSGDG_MEM_FAIL _CVDIAG_ "A memory request failed.\n\n" #define MSGDG_SETGET_CVMEM_NULL "CVDiagGet*-- Integrator memory is NULL.\n\n" #define MSGDG_SETGET_LMEM_NULL "CVDiagGet*-- cvdiag memory is NULL.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvodea.c000077500000000000000000001530511323325274500202120ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the CVODEA adjoint integrator. * ----------------------------------------------------------------- */ /*=================================================================*/ /*BEGIN Import Header Files */ /*=================================================================*/ #include #include #include "cvdiag.h" #include "cvodea_impl.h" #include "sundialsmath.h" #include "sundialstypes.h" /*=================================================================*/ /*BEGIN Macros */ /*=================================================================*/ /* Macro: loop */ #define loop for(;;) /*=================================================================*/ /*BEGIN CVODEA Private Constants */ /*=================================================================*/ #define ZERO RCONST(0.0) /* real 0.0 */ #define ONE RCONST(1.0) /* real 1.0 */ #define TWO RCONST(2.0) /* real 2.0 */ #define FUZZ_FACTOR RCONST(1000000.0) /* fuzz factor for CVadjGetY */ /*=================================================================*/ /*BEGIN Private Functions Prototypes */ /*=================================================================*/ static CkpntMem CVAckpntInit(CVodeMem cv_mem); static CkpntMem CVAckpntNew(CVodeMem cv_mem); static void CVAckpntDelete(CkpntMem *ck_memPtr); static DtpntMem *CVAdataMalloc(CVodeMem cv_mem, long int steps); static void CVAdataFree(DtpntMem *dt_mem, long int steps); static int CVAdataStore(CVadjMem ca_mem, CkpntMem ck_mem); static int CVAckpntGet(CVodeMem cv_mem, CkpntMem ck_mem); static void CVAhermitePrepare(CVadjMem ca_mem, DtpntMem *dt_mem, long int i); static void CVAhermiteInterpolate(CVadjMem ca_mem, DtpntMem *dt_mem, long int i, realtype t, N_Vector y); /* Wrappers */ static void CVArhs(realtype t, N_Vector yB, N_Vector yBdot, void *cvadj_mem); static void CVAdenseJac(long int nB, DenseMat JB, realtype t, N_Vector yB, N_Vector fyB, void *cvadj_mem, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B); static void CVAbandJac(long int nB, long int mupperB, long int mlowerB, BandMat JB, realtype t, N_Vector yB, N_Vector fyB, void *cvadj_mem, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B); static int CVAspgmrPrecSetup(realtype t, N_Vector yB, N_Vector fyB, booleantype jokB, booleantype *jcurPtrB, realtype gammaB, void *cvadj_mem, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B); static int CVAspgmrPrecSolve(realtype t, N_Vector yB, N_Vector fyB, N_Vector rB, N_Vector zB, realtype gammaB, realtype deltaB, int lrB, void *cvadj_mem, N_Vector tmpB); static int CVAspgmrJacTimesVec(N_Vector vB, N_Vector JvB, realtype t, N_Vector yB, N_Vector fyB, void *cvadj_mem, N_Vector tmpB); static void CVArhsQ(realtype t, N_Vector yB, N_Vector qBdot, void *cvadj_mem); static void CVAgloc(long int NlocalB, realtype t, N_Vector yB, N_Vector gB, void *cvadj_mem); static void CVAcfn(long int NlocalB, realtype t, N_Vector yB, void *cvadj_mem); /*=================================================================*/ /*END Private Functions Prototypes */ /*=================================================================*/ /*=================================================================*/ /*BEGIN Readibility Constants */ /*=================================================================*/ #define uround (ca_mem->ca_uround) #define tinitial (ca_mem->ca_tinitial) #define tfinal (ca_mem->ca_tfinal) #define nckpnts (ca_mem->ca_nckpnts) #define nsteps (ca_mem->ca_nsteps) #define ckpntData (ca_mem->ca_ckpntData) #define newData (ca_mem->ca_newData) #define np (ca_mem->ca_np) #define delta (ca_mem->ca_delta) #define Y0 (ca_mem->ca_Y0) #define Y1 (ca_mem->ca_Y1) #define ytmp (ca_mem->ca_ytmp) #define f_B (ca_mem->ca_fB) #define f_data_B (ca_mem->ca_f_dataB) #define djac_B (ca_mem->ca_djacB) #define bjac_B (ca_mem->ca_bjacB) #define jtimes_B (ca_mem->ca_jtimesB) #define jac_data_B (ca_mem->ca_jac_dataB) #define pset_B (ca_mem->ca_psetB) #define psolve_B (ca_mem->ca_psolveB) #define P_data_B (ca_mem->ca_P_dataB) #define fQ_B (ca_mem->ca_fQB) #define fQ_data_B (ca_mem->ca_fQ_dataB) #define gloc_B (ca_mem->ca_glocB) #define cfn_B (ca_mem->ca_cfnB) #define bbd_data_B (ca_mem->ca_bbd_dataB) #define bp_data_B (ca_mem->ca_bp_dataB) #define t_for_quad (ca_mem->ca_t_for_quad) #define zn (cv_mem->cv_zn) #define nst (cv_mem->cv_nst) #define q (cv_mem->cv_q) #define qprime (cv_mem->cv_qprime) #define qwait (cv_mem->cv_qwait) #define L (cv_mem->cv_L) #define gammap (cv_mem->cv_gammap) #define h (cv_mem->cv_h) #define hprime (cv_mem->cv_hprime) #define hscale (cv_mem->cv_hscale) #define eta (cv_mem->cv_eta) #define etamax (cv_mem->cv_etamax) #define tn (cv_mem->cv_tn) #define tau (cv_mem->cv_tau) #define tq (cv_mem->cv_tq) #define l (cv_mem->cv_l) #define saved_tq5 (cv_mem->cv_saved_tq5) #define forceSetup (cv_mem->cv_forceSetup) #define f (cv_mem->cv_f) #define lmm (cv_mem->cv_lmm) #define iter (cv_mem->cv_iter) #define itol (cv_mem->cv_itol) #define reltol (cv_mem->cv_reltol) #define abstol (cv_mem->cv_abstol) #define f_data (cv_mem->cv_f_data) #define errfp (cv_mem->cv_errfp) #define h0u (cv_mem->cv_h0u) #define quadr (cv_mem->cv_quadr) #define errconQ (cv_mem->cv_errconQ) #define znQ (cv_mem->cv_znQ) #define itolQ (cv_mem->cv_itolQ) #define reltolQ (cv_mem->cv_reltolQ) #define abstolQ (cv_mem->cv_abstolQ) #define fQ (cv_mem->cv_fQ) #define tempv (cv_mem->cv_tempv) #define tempvQ (cv_mem->cv_tempvQ) #define t0_ (ck_mem->ck_t0) #define t1_ (ck_mem->ck_t1) #define zn_ (ck_mem->ck_zn) #define znQ_ (ck_mem->ck_znQ) #define quadr_ (ck_mem->ck_quadr) #define zqm_ (ck_mem->ck_zqm) #define nst_ (ck_mem->ck_nst) #define q_ (ck_mem->ck_q) #define qprime_ (ck_mem->ck_qprime) #define qwait_ (ck_mem->ck_qwait) #define L_ (ck_mem->ck_L) #define gammap_ (ck_mem->ck_gammap) #define h_ (ck_mem->ck_h) #define hprime_ (ck_mem->ck_hprime) #define hscale_ (ck_mem->ck_hscale) #define eta_ (ck_mem->ck_eta) #define etamax_ (ck_mem->ck_etamax) #define tau_ (ck_mem->ck_tau) #define tq_ (ck_mem->ck_tq) #define l_ (ck_mem->ck_l) #define saved_tq5_ (ck_mem->ck_saved_tq5) #define next_ (ck_mem->ck_next) /*=================================================================*/ /*END Readibility Constants */ /*=================================================================*/ /*=================================================================*/ /*BEGIN Exported Functions */ /*=================================================================*/ /*------------------ CVadjMalloc --------------------------*/ /* This routine allocates space for the global CVODEA memory structure. */ /*-----------------------------------------------------------------*/ void *CVadjMalloc(void *cvode_mem, long int steps) { CVadjMem ca_mem; CVodeMem cv_mem; /* Check arguments */ if (cvode_mem == NULL) { fprintf(stderr, MSGAM_NO_MEM); return(NULL); } if (steps <= 0) { fprintf(stderr, MSGAM_BAD_STEPS); return(NULL); } /* Allocate memory block */ ca_mem = (CVadjMem) malloc(sizeof(struct CVadjMemRec)); if (ca_mem == NULL) { fprintf(stderr, MSGAM_MEM_FAIL); return(NULL); } /* Attach CVODE memory for forward runs */ cv_mem = (CVodeMem)cvode_mem; ca_mem->cv_mem = cv_mem; /* Initialize Check Points linked list */ ca_mem->ck_mem = CVAckpntInit(cv_mem); if (ca_mem->ck_mem == NULL) { free(ca_mem); fprintf(stderr, MSGAM_MEM_FAIL); return(NULL); } /* Allocate Data Points memory */ ca_mem->dt_mem = CVAdataMalloc(cv_mem, steps); if (ca_mem->dt_mem == NULL) { CVAckpntDelete(&(ca_mem->ck_mem)); free(ca_mem); fprintf(stderr, MSGAM_MEM_FAIL); return(NULL); } /* Workspace memory */ Y0 = N_VClone(tempv); if (Y0 == NULL) { CVAdataFree(ca_mem->dt_mem, steps); CVAckpntDelete(&(ca_mem->ck_mem)); free(ca_mem); fprintf(stderr, MSGAM_MEM_FAIL); return(NULL); } Y1 = N_VClone(tempv); if (Y1 == NULL) { N_VDestroy(Y0); CVAdataFree(ca_mem->dt_mem, steps); CVAckpntDelete(&(ca_mem->ck_mem)); free(ca_mem); fprintf(stderr, MSGAM_MEM_FAIL); return(NULL); } ytmp = N_VClone(tempv); if (ytmp == NULL) { N_VDestroy(Y0); N_VDestroy(Y1); CVAdataFree(ca_mem->dt_mem, steps); CVAckpntDelete(&(ca_mem->ck_mem)); free(ca_mem); fprintf(stderr, MSGAM_MEM_FAIL); return(NULL); } /* Other entries in ca_mem */ uround = cv_mem->cv_uround; nsteps = steps; tinitial = tn; /* Initialize nckpnts to ZERO */ nckpnts = 0; /* Initialize backward cvode memory to NULL */ ca_mem->cvb_mem = NULL; ca_mem->ca_f_dataB = NULL; ca_mem->ca_fQ_dataB = NULL; ca_mem->ca_jac_dataB = NULL; ca_mem->ca_P_dataB = NULL; ca_mem->ca_bp_dataB = NULL; ca_mem->ca_bbd_dataB = NULL; return((void *)ca_mem); } /*=================================================================*/ /*BEGIN Wrappers for CVODEA */ /*=================================================================*/ /*------------------ CVodeF --------------------------*/ /* This routine integrates to tout and returns solution into yout. In the same time, it stores check point data every 'steps' steps. CVodeF can be called repeatedly by the user. ncheckPtr points to the number of check points stored so far. */ /*-----------------------------------------------------------------*/ int CVodeF(void *cvadj_mem, realtype tout, N_Vector yout, realtype *tret, int itask, int *ncheckPtr) { CVadjMem ca_mem; CVodeMem cv_mem; CkpntMem tmp; DtpntMem *dt_mem; int cv_itask, flag; booleantype iret, istop; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cv_mem = ca_mem->cv_mem; dt_mem = ca_mem->dt_mem; iret = TRUE; cv_itask = CV_ONE_STEP; /* Interpret itask */ switch (itask) { case CV_NORMAL: iret = FALSE; istop = FALSE; cv_itask = CV_ONE_STEP; break; case CV_ONE_STEP: iret = TRUE; istop = FALSE; cv_itask = CV_ONE_STEP; break; case CV_NORMAL_TSTOP: iret = FALSE; istop = TRUE; cv_itask = CV_ONE_STEP_TSTOP; break; case CV_ONE_STEP_TSTOP: iret = TRUE; istop = TRUE; cv_itask = CV_ONE_STEP_TSTOP; break; } /* On the first step, load dt_mem[0] */ if ( nst == 0) { dt_mem[0]->t = ca_mem->ck_mem->ck_t0; N_VScale(ONE, ca_mem->ck_mem->ck_zn[0], dt_mem[0]->y); N_VScale(ONE, ca_mem->ck_mem->ck_zn[1], dt_mem[0]->yd); } /* Integrate to tout (in CV_ONE_STEP mode) while loading check points */ loop { /* Perform one step of the integration */ flag = CVode(cv_mem, tout, yout, tret, cv_itask); if (flag < 0) break; /* Test if a new check point is needed */ if ( nst % nsteps == 0 ) { ca_mem->ck_mem->ck_t1 = *tret; /* Create a new check point, load it, and append it to the list */ tmp = CVAckpntNew(cv_mem); if (tmp == NULL) { flag = CV_MEM_FAIL; break; } tmp->ck_next = ca_mem->ck_mem; ca_mem->ck_mem = tmp; nckpnts++; forceSetup = TRUE; /* Reset i=0 and load dt_mem[0] */ dt_mem[0]->t = ca_mem->ck_mem->ck_t0; N_VScale(ONE, ca_mem->ck_mem->ck_zn[0], dt_mem[0]->y); N_VScale(ONE, ca_mem->ck_mem->ck_zn[1], dt_mem[0]->yd); } else { /* Load next point in dt_mem */ dt_mem[nst%nsteps]->t = *tret; N_VScale(ONE, yout, dt_mem[nst%nsteps]->y); CVodeGetDky(cv_mem, *tret, 1, dt_mem[nst%nsteps]->yd); } /* Set t1 field of the current ckeck point structure for the case in which there will be no future check points */ ca_mem->ck_mem->ck_t1 = *tret; /* tfinal is now set to *tret */ tfinal = *tret; /* Return if in CV_ONE_STEP mode */ if (iret) break; /* Return if tout reached */ if ( (*tret - tout)*h >= ZERO ) { *tret = tout; CVodeGetDky(cv_mem, tout, 0, yout); break; } } /* end of loop() */ /* Get ncheck from ca_mem */ *ncheckPtr = nckpnts; /* Data is available for the last interval */ newData = TRUE; ckpntData = ca_mem->ck_mem; np = nst % nsteps + 1; return(flag); } /*-- CVodeCreateB, CVodeSet*B, CVodeMallocB, and CVodeReInitB -----*/ /*-----------------------------------------------------------------*/ int CVodeCreateB(void *cvadj_mem, int lmmB, int iterB) { CVadjMem ca_mem; void *cvode_mem; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = CVodeCreate(lmmB, iterB); if (cvode_mem == NULL) return(CV_MEM_FAIL); ca_mem->cvb_mem = (CVodeMem) cvode_mem; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetIterTypeB(void *cvadj_mem, int iterB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetIterType(cvode_mem, iterB); return(flag); } int CVodeSetFdataB(void *cvadj_mem, void *f_dataB) { CVadjMem ca_mem; ca_mem = (CVadjMem) cvadj_mem; f_data_B = f_dataB; return(CV_SUCCESS); } int CVodeSetErrFileB(void *cvadj_mem, FILE *errfpB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetErrFile(cvode_mem, errfpB); return(flag); } int CVodeSetMaxOrdB(void *cvadj_mem, int maxordB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetMaxOrd(cvode_mem, maxordB); return(flag); } int CVodeSetMaxNumStepsB(void *cvadj_mem, long int mxstepsB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetMaxNumSteps(cvode_mem, mxstepsB); return(flag); } int CVodeSetStabLimDetB(void *cvadj_mem, booleantype stldetB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetStabLimDet(cvode_mem, stldetB); return(flag); } int CVodeSetInitStepB(void *cvadj_mem, realtype hinB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetInitStep(cvode_mem, hinB); return(flag); } int CVodeSetMinStepB(void *cvadj_mem, realtype hminB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetMinStep(cvode_mem, hminB); return(flag); } int CVodeSetMaxStepB(void *cvadj_mem, realtype hmaxB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetMaxStep(cvode_mem, hmaxB); return(flag); } /*-----------------------------------------------------------------*/ int CVodeMallocB(void *cvadj_mem, CVRhsFnB fB, realtype tB0, N_Vector yB0, int itolB, realtype *reltolB, void *abstolB) { CVadjMem ca_mem; void *cvode_mem; int sign, flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; sign = (tfinal - tinitial > ZERO) ? 1 : -1; if ( (sign*(tB0-tinitial) < ZERO) || (sign*(tfinal-tB0) < ZERO) ) return(CV_BAD_TB0); f_B = fB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVodeMalloc(cvode_mem, CVArhs, tB0, yB0, itolB, reltolB, abstolB); if (flag != CV_SUCCESS) return(flag); CVodeSetMaxHnilWarns(cvode_mem, -1); CVodeSetFdata(cvode_mem, cvadj_mem); return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeReInitB(void *cvadj_mem, CVRhsFnB fB, realtype tB0, N_Vector yB0, int itolB, realtype *reltolB, void *abstolB) { CVadjMem ca_mem; void *cvode_mem; int sign, flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; sign = (tfinal - tinitial > ZERO) ? 1 : -1; if ( (sign*(tB0-tinitial) < ZERO) || (sign*(tfinal-tB0) < ZERO) ) return(CV_BAD_TB0); f_B = fB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVodeReInit(cvode_mem, CVArhs, tB0, yB0, itolB, reltolB, abstolB); if (flag != CV_SUCCESS) return(flag); CVodeSetMaxHnilWarns(cvode_mem, -1); CVodeSetFdata(cvode_mem, cvadj_mem); return(CV_SUCCESS); } /*-- CVodeSetQuad*B, CVodeQuadMallocB, and CVodeQuadReInitB -------*/ /*-----------------------------------------------------------------*/ int CVodeSetQuadErrConB(void *cvadj_mem, booleantype errconQB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetQuadErrCon(cvode_mem, errconQB); return(flag); } int CVodeSetQuadFdataB(void *cvadj_mem, void *fQ_dataB) { CVadjMem ca_mem; ca_mem = (CVadjMem) cvadj_mem; fQ_data_B = fQ_dataB; return(CV_SUCCESS); } int CVodeSetQuadTolerancesB(void *cvadj_mem, int itolQB, realtype *reltolQB, void *abstolQB) { CVadjMem ca_mem; void *cvode_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *)ca_mem->cvb_mem; flag = CVodeSetQuadTolerances(cvode_mem, itolQB, reltolQB, abstolQB); return(flag); } /*-----------------------------------------------------------------*/ int CVodeQuadMallocB(void *cvadj_mem, CVQuadRhsFnB fQB, N_Vector yQB0) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; fQ_B = fQB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVodeQuadMalloc(cvode_mem, CVArhsQ, yQB0); if (flag != CV_SUCCESS) return(flag); flag = CVodeSetQuadFdata(cvode_mem, cvadj_mem); return(flag); } /*-----------------------------------------------------------------*/ int CVodeQuadReInitB(void *cvadj_mem, CVQuadRhsFnB fQB, N_Vector yQB0) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; fQ_B = fQB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVodeQuadReInit(cvode_mem, CVArhsQ, yQB0); return(flag); } /*--------- CVDenseB and CVdenseSet*B -------------------------*/ /*-----------------------------------------------------------------*/ int CVDenseB(void *cvadj_mem, long int nB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVDense(cvode_mem, nB); return(flag); } int CVDenseSetJacFnB(void *cvadj_mem, CVDenseJacFnB djacB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; djac_B = djacB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVDenseSetJacData(cvode_mem, cvadj_mem); if (flag != CVDENSE_SUCCESS) return(flag); CVDenseSetJacFn(cvode_mem, CVAdenseJac); return(CVDENSE_SUCCESS); } int CVDenseSetJacDataB(void *cvadj_mem, void *jac_dataB) { CVadjMem ca_mem; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; jac_data_B = jac_dataB; return(CVDENSE_SUCCESS); } /*----------------- CVDiagB -----------------------------------*/ /*-----------------------------------------------------------------*/ int CVDiagB(void *cvadj_mem) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVDiag(cvode_mem); return(flag); } /*----------- CVBandB and CVBandSet*B -----------------------*/ /*-----------------------------------------------------------------*/ int CVBandB(void *cvadj_mem, long int nB, long int mupperB, long int mlowerB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVBand(cvode_mem, nB, mupperB, mlowerB); return(flag); } int CVBandSetJacFnB(void *cvadj_mem, CVBandJacFnB bjacB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; bjac_B = bjacB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVBandSetJacData(cvode_mem, cvadj_mem); if (flag != CVBAND_SUCCESS) return(flag); CVBandSetJacFn(cvode_mem, CVAbandJac); return(CVBAND_SUCCESS); } int CVBandSetJacDataB(void *cvadj_mem, void *jac_dataB) { CVadjMem ca_mem; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; jac_data_B = jac_dataB; return(CVBAND_SUCCESS); } /*------------ CVSpgmrB and CVSpgmrSet*B ---------------------*/ /*-----------------------------------------------------------------*/ int CVSpgmrB(void *cvadj_mem, int pretypeB, int maxlB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmr(cvode_mem, pretypeB, maxlB); return(flag); } int CVSpgmrSetPrecTypeB(void *cvadj_mem, int pretypeB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmrSetPrecType(cvode_mem, pretypeB); return(flag); } int CVSpgmrSetGSTypeB(void *cvadj_mem, int gstypeB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmrSetGSType(cvode_mem,gstypeB); return(flag); } int CVSpgmrSetDeltB(void *cvadj_mem, realtype deltB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmrSetDelt(cvode_mem,deltB); return(flag); } int CVSpgmrSetPrecSetupFnB(void *cvadj_mem, CVSpgmrPrecSetupFnB psetB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; pset_B = psetB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmrSetPrecData(cvode_mem, cvadj_mem); if (flag != CVSPGMR_SUCCESS) return(flag); CVSpgmrSetPrecSetupFn(cvode_mem, CVAspgmrPrecSetup); return(CVSPGMR_SUCCESS); } int CVSpgmrSetPrecSolveFnB(void *cvadj_mem, CVSpgmrPrecSolveFnB psolveB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; psolve_B = psolveB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmrSetPrecData(cvode_mem, cvadj_mem); if (flag != CVSPGMR_SUCCESS) return(flag); CVSpgmrSetPrecSolveFn(cvode_mem, CVAspgmrPrecSolve); return(CVSPGMR_SUCCESS); } int CVSpgmrSetJacTimesVecFnB(void *cvadj_mem, CVSpgmrJacTimesVecFnB jtimesB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; jtimes_B = jtimesB; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVSpgmrSetJacData(cvode_mem, cvadj_mem); if (flag != CVSPGMR_SUCCESS) return(flag); CVSpgmrSetJacTimesVecFn(cvode_mem, CVAspgmrJacTimesVec); return(CVSPGMR_SUCCESS); } int CVSpgmrSetPrecDataB(void *cvadj_mem, void *P_dataB) { CVadjMem ca_mem; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; P_data_B = P_dataB; return(CVSPGMR_SUCCESS); } int CVSpgmrSetJacDataB(void *cvadj_mem, void *jac_dataB) { CVadjMem ca_mem; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; jac_data_B = jac_dataB; return(CVSPGMR_SUCCESS); } /*- CVBandPrecAllocB, CVBPSpgmrB, CVBandPrecFreeB -*/ /*----------------------------------------------------------------------*/ int CVBandPrecAllocB(void *cvadj_mem, long int nB, long int muB, long int mlB) { CVadjMem ca_mem; void *cvode_mem; void *bp_dataB; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; bp_dataB = CVBandPrecAlloc(cvode_mem, nB, muB, mlB); if (bp_dataB == NULL) return(CV_PDATA_NULL); bp_data_B = bp_dataB; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVBPSpgmrB(void *cvadj_mem, int pretypeB, int maxlB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVBPSpgmr(cvode_mem, pretypeB, maxlB, bp_data_B); return(flag); } /*- CVBBDPrecAllocB, CVBPSpgmrB, CVBandPrecFreeB -*/ /*----------------------------------------------------------------------*/ int CVBBDPrecAllocB(void *cvadj_mem, long int NlocalB, long int mudqB, long int mldqB, long int mukeepB, long int mlkeepB, realtype dqrelyB, CVLocalFnB glocB, CVCommFnB cfnB) { CVadjMem ca_mem; void *cvode_mem; void *bbd_dataB; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; gloc_B = glocB; cfn_B = cfnB; bbd_dataB = CVBBDPrecAlloc(cvode_mem, NlocalB, mudqB, mldqB, mukeepB, mlkeepB, dqrelyB, CVAgloc, CVAcfn); if (bbd_dataB == NULL) return(CV_PDATA_NULL); bbd_data_B = bbd_dataB; return(CV_SUCCESS); } int CVBBDSpgmrB(void *cvadj_mem, int pretypeB, int maxlB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVBBDSpgmr(cvode_mem, pretypeB, maxlB, bbd_data_B); return(flag); } int CVBBDPrecReInitB(void *cvadj_mem, long int mudqB, long int mldqB, realtype dqrelyB, CVLocalFnB glocB, CVCommFnB cfnB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; gloc_B = glocB; cfn_B = cfnB; flag = CVBBDPrecReInit(bbd_data_B, mudqB, mldqB, dqrelyB, CVAgloc, CVAcfn); return(flag); } /*------------------ CVodeB --------------------------*/ /* This routine performs the backward integration towards tBout. When necessary, it performs a forward integration between two consecutive check points to update interpolation data. itask can be CV_NORMAL or CV_ONE_STEP only. */ /*-----------------------------------------------------------------*/ int CVodeB(void *cvadj_mem, realtype tBout, N_Vector yBout, realtype *tBret, int itaskB) { CVadjMem ca_mem; CkpntMem ck_mem; CVodeMem cvb_mem; int sign, flag, cv_itask; realtype tBn; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvb_mem = ca_mem->cvb_mem; if (cvb_mem == NULL) return(CV_BCKMEM_NULL); if (itaskB == CV_NORMAL) cv_itask = CV_NORMAL_TSTOP; else if (itaskB == CV_ONE_STEP) cv_itask = CV_ONE_STEP_TSTOP; else return(CV_BAD_ITASK); ck_mem = ca_mem->ck_mem; sign = (tfinal - tinitial > ZERO) ? 1 : -1; if ( (sign*(tBout-tinitial) < ZERO) || (sign*(tfinal-tBout) < ZERO) ) return(CV_BAD_TBOUT); tBn = cvb_mem->cv_tn; while ( sign*(tBn - t0_) <= ZERO ) ck_mem = next_; loop { /* Store interpolation data if not available */ if (ck_mem != ckpntData) { flag = CVAdataStore(ca_mem, ck_mem); if (flag != CV_SUCCESS) return(flag); } /* Backward integration */ CVodeSetStopTime((void *)cvb_mem, t0_); flag = CVode(cvb_mem, tBout, yBout, tBret, cv_itask); /* If an error occured, return now */ if (flag < 0) return(flag); /* Set the time at which CVodeGetQuadB will evaluate any quadratures */ t_for_quad = *tBret; /* If in CV_ONE_STEP mode, return now (flag=CV_SUCCESS or flag=CV_TSTOP_RETURN) */ if (itaskB == CV_ONE_STEP) return(flag); /* If succesfully reached tBout, return now */ if (*tBret == tBout) return(flag); /* Move check point in linked list to next one */ ck_mem = next_; } return(CV_SUCCESS); } /*------------------ CVodeGetQuadB ------------------------------*/ /*-----------------------------------------------------------------*/ int CVodeGetQuadB(void *cvadj_mem, N_Vector qB) { CVadjMem ca_mem; void *cvode_mem; int flag; if (cvadj_mem == NULL) return(CV_ADJMEM_NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; flag = CVodeGetQuad(cvode_mem, t_for_quad, qB); return(flag); } /*=================================================================*/ /*END Wrappers for CVODEA */ /*=================================================================*/ /*------------------ CVAdjFree --------------------------*/ /* This routine frees the memory allocated by CVadjMalloc. */ /*-----------------------------------------------------------------*/ void CVadjFree(void *cvadj_mem) { CVadjMem ca_mem; ca_mem = (CVadjMem) cvadj_mem; /* Delete check points one by one */ while (ca_mem->ck_mem != NULL) { CVAckpntDelete(&(ca_mem->ck_mem)); } /* Free vectors at each data point */ CVAdataFree(ca_mem->dt_mem, nsteps); free(ca_mem->dt_mem); /* Free vectors in ca_mem */ N_VDestroy(Y0); N_VDestroy(Y1); N_VDestroy(ytmp); /* Free CVODES memory for backward run */ CVodeFree(ca_mem->cvb_mem); /* Free preconditioner data (the routines below check for non-NULL data) */ CVBandPrecFree(bp_data_B); CVBBDPrecFree(bbd_data_B); /* Free CVODEA memory */ free(ca_mem); } /*------------------ CVadjGetCVodeBmem --------------------------*/ /* CVadjGetCVodeBmem returns a (void *) pointer to the CVODES memory allocated for the backward problem. This pointer can then be used to call any of the CVodeGet* CVODES routines to extract optional output for the backward integration phase. */ /*-----------------------------------------------------------------*/ void *CVadjGetCVodeBmem(void *cvadj_mem) { CVadjMem ca_mem; void *cvode_mem; if (cvadj_mem == NULL) return(NULL); ca_mem = (CVadjMem) cvadj_mem; cvode_mem = (void *) ca_mem->cvb_mem; return(cvode_mem); } /*------------------ CVAdjGetY --------------------------*/ /* This routine uses cubic piece-wise Hermite interpolation for the forward solution vector. It is typically called by the wrapper routines before calling user provided routines (fB, djacB, bjacB, jtimesB, psolB) but can be directly called by the user if memory for the bacward run is allocated through CVODE calls and not through CVODEA calls. */ /*-----------------------------------------------------------------*/ int CVadjGetY(void *cvadj_mem, realtype t, N_Vector y) { CVadjMem ca_mem; DtpntMem *dt_mem; static long int i; long int inew; int sign; booleantype to_left, to_right; realtype troundoff; ca_mem = (CVadjMem) cvadj_mem; dt_mem = ca_mem->dt_mem; sign = (tfinal - tinitial > ZERO) ? 1 : -1; if ( newData ) { i = np-1; CVAhermitePrepare(ca_mem, dt_mem, i); newData = FALSE; } /* Search for inew starting from last i */ to_left = ( sign*(t - dt_mem[i-1]->t) < ZERO); to_right = ( sign*(t - dt_mem[i]->t) > ZERO); /* Test if t is beyond left limit */ if ( (to_left) && (i==1) ) { /*troundoff = FUZZ_FACTOR*uround*(ABS(dt_mem[0]->t)+ABS(dt_mem[1]->t));*/ troundoff = FUZZ_FACTOR*uround; if ( ABS(t - dt_mem[0]->t) <= troundoff ) { N_VScale(ONE, dt_mem[0]->y, y); return(CV_SUCCESS); } else { printf("\n TROUBLE IN GETY\n "); #if defined(SUNDIALS_EXTENDED_PRECISION) printf("%Lg = ABS(t-dt_mem[0]->t) > troundoff = %Lg uround = %Lg\n", ABS(t - dt_mem[0]->t), troundoff, uround); #elif defined(SUNDIALS_DOUBLE_PRECISION) printf("%lg = ABS(t-dt_mem[0]->t) > troundoff = %lg uround = %lg\n", ABS(t - dt_mem[0]->t), troundoff, uround); #else printf("%g = ABS(t-dt_mem[0]->t) > troundoff = %g uround = %g\n", ABS(t - dt_mem[0]->t), troundoff, uround); #endif return(CV_GETY_BADT); } } inew = i; if ( to_left ) { /* Search to the left */ inew--; loop { if ( inew == 1 ) break; if ( sign*(t - dt_mem[inew-1]->t) <= ZERO) inew--; else break; } } else if ( to_right ) { /* Search to the right */ inew++; loop { if ( sign*(t - dt_mem[inew]->t) > ZERO) inew++; else break; } } if ( inew != i ) CVAhermitePrepare(ca_mem, dt_mem, inew); CVAhermiteInterpolate(ca_mem, dt_mem, inew, t, y); i = inew; return(CV_SUCCESS); } /*------------------ CVAdjGetCheckPointsList ---------------------*/ /* This routine lists the linked list of check point structures. For debugging.... */ /*-----------------------------------------------------------------*/ void CVadjGetCheckPointsList(void *cvadj_mem) { CVadjMem ca_mem; CkpntMem ck_mem; int i; ca_mem = (CVadjMem) cvadj_mem; ck_mem = ca_mem->ck_mem; i = 0; while (ck_mem != NULL) { #if defined(SUNDIALS_EXTENDED_PRECISION) printf("%2d addr: %p time = [ %9.3Le %9.3Le ] next: %p\n", nckpnts-i, (void *)ck_mem, t0_, t1_, (void *)next_ ); #elif defined(SUNDIALS_DOUBLE_PRECISION) printf("%2d addr: %p time = [ %9.3le %9.3le ] next: %p\n", nckpnts-i, (void *)ck_mem, t0_, t1_, (void *)next_ ); #else printf("%2d addr: %p time = [ %9.3e %9.3e ] next: %p\n", nckpnts-i, (void *)ck_mem, t0_, t1_, (void *)next_ ); #endif ck_mem = next_; i++; } } /*------------------ CVAdjGetStoredData ------------------------*/ /* This routine returns the solution stored in the data structure at the 'which' data point. For debugging.... */ /*-----------------------------------------------------------------*/ void CVadjGetStoredData(void *cvadj_mem, long int which, realtype *t, N_Vector yout, N_Vector ydout) { CVadjMem ca_mem; DtpntMem *dt_mem; ca_mem = (CVadjMem) cvadj_mem; dt_mem = ca_mem->dt_mem; *t = dt_mem[which]->t; if (yout != NULL) N_VScale(ONE, dt_mem[which]->y, yout); if (ydout != NULL) N_VScale(ONE, dt_mem[which]->yd, ydout); } /*=================================================================*/ /*BEGIN Exported Functions */ /*=================================================================*/ /*=================================================================*/ /*BEGIN Private Functions Implementation */ /*=================================================================*/ /*------------------ CVAckpntInit --------------------------*/ /* This routine initializes the check point linked list with information from the initial time. */ /*-----------------------------------------------------------------*/ static CkpntMem CVAckpntInit(CVodeMem cv_mem) { CkpntMem ck_mem; /* Allocate space for ckdata */ ck_mem = (CkpntMem) malloc(sizeof(struct CkpntMemRec)); zn_[0] = N_VClone(tempv); zn_[1] = N_VClone(tempv); /* zn_[qmax] was not allocated */ zqm_ = 0; /* Load ckdata from cv_mem */ N_VScale(ONE, zn[0], zn_[0]); t0_ = tn; q_ = 1; /* Compute zn_[1] by calling the user f routine */ f(t0_, zn_[0], zn_[1], f_data); /* Do we need to carry quadratures */ quadr_ = quadr && errconQ; if (quadr_) { znQ_[0] = N_VClone(tempvQ); N_VScale(ONE, znQ[0], znQ_[0]); } /* Next in list */ next_ = NULL; return(ck_mem); } /*------------------ CVAckpntNew --------------------------*/ /* This routine allocates space for a new check point and sets its data from current values in cv_mem. */ /*-----------------------------------------------------------------*/ static CkpntMem CVAckpntNew(CVodeMem cv_mem) { CkpntMem ck_mem; int j; int qmax; /* Allocate space for ckdata */ ck_mem = (CkpntMem) malloc(sizeof(struct CkpntMemRec)); if (ck_mem == NULL) return(NULL); /* Test if we need to allocate space for the last zn. NOTE: zn(qmax) may be needed for a hot restart, if an order increase is deemed necessary at the first step after a check point */ qmax = cv_mem->cv_qmax; zqm_ = (q < qmax) ? qmax : 0; for (j=0; j<=q; j++) { zn_[j] = N_VClone(tempv); if(zn_[j] == NULL) return(NULL); } if ( q < qmax) { zn_[qmax] = N_VClone(tempv); if ( zn_[qmax] == NULL ) return(NULL); } /* Test if we need to carry quadratures */ quadr_ = quadr && errconQ; if (quadr_) { for (j=0; j<=q; j++) { znQ_[j] = N_VClone(tempvQ); if(znQ_[j] == NULL) return(NULL); } if ( q < qmax) { znQ_[qmax] = N_VClone(tempvQ); if ( znQ_[qmax] == NULL ) return(NULL); } } /* Load check point data from cv_mem */ for (j=0; j<=q; j++) N_VScale(ONE, zn[j], zn_[j]); if ( q < qmax ) N_VScale(ONE, zn[qmax], zn_[qmax]); if(quadr_) { for (j=0; j<=q; j++) N_VScale(ONE, znQ[j], znQ_[j]); if ( q < qmax ) N_VScale(ONE, znQ[qmax], znQ_[qmax]); } for (j=0; j<=L_MAX; j++) tau_[j] = tau[j]; for (j=0; j<=NUM_TESTS; j++) tq_[j] = tq[j]; for (j=0; j<=q; j++) l_[j] = l[j]; nst_ = nst; q_ = q; qprime_ = qprime; qwait_ = qwait; L_ = L; gammap_ = gammap; h_ = h; hprime_ = hprime; hscale_ = hscale; eta_ = eta; etamax_ = etamax; t0_ = tn; saved_tq5_ = saved_tq5; return(ck_mem); } /*------------------ CVAckpntDelete --------------------------*/ /* This routine deletes the first check point in list. */ /*-----------------------------------------------------------------*/ static void CVAckpntDelete(CkpntMem *ck_memPtr) { CkpntMem tmp; int j; if (*ck_memPtr != NULL) { /* store head of list */ tmp = *ck_memPtr; /* move head of list */ *ck_memPtr = (*ck_memPtr)->ck_next; /* free N_Vectors in tmp */ for (j=0;j<=tmp->ck_q;j++) N_VDestroy(tmp->ck_zn[j]); if (tmp->ck_zqm != 0) N_VDestroy(tmp->ck_zn[tmp->ck_zqm]); /* free N_Vectors for quadratures in tmp Note that at the check point at t_initial, only znQ_[0] was allocated*/ if(tmp->ck_quadr) { if(tmp->ck_next != NULL) { for (j=0;j<=tmp->ck_q;j++) N_VDestroy(tmp->ck_znQ[j]); if (tmp->ck_zqm != 0) N_VDestroy(tmp->ck_znQ[tmp->ck_zqm]); } else { N_VDestroy(tmp->ck_znQ[0]); } } free(tmp); } } /*------------------ CVAdataMalloc --------------------------*/ /* This routine allocates memory for storing information at all intermediate points between two consecutive check points. This data is then used to interpolate the forward solution at any other time. */ /*-----------------------------------------------------------------*/ static DtpntMem *CVAdataMalloc(CVodeMem cv_mem, long int steps) { DtpntMem *dt_mem; long int i; dt_mem = (DtpntMem *)malloc((steps+1)*sizeof(struct DtpntMemRec *)); for (i=0; i<=steps; i++) { dt_mem[i] = (DtpntMem)malloc(sizeof(struct DtpntMemRec)); dt_mem[i]->y = N_VClone(tempv); dt_mem[i]->yd = N_VClone(tempv); } return(dt_mem); } /*------------------ CVAdataFree --------------------------*/ /* This routine frees the memeory allocated for data storage. */ /*-----------------------------------------------------------------*/ static void CVAdataFree(DtpntMem *dt_mem, long int steps) { long int i; for (i=0; i<=steps; i++) { N_VDestroy(dt_mem[i]->y); N_VDestroy(dt_mem[i]->yd); free(dt_mem[i]); } } /*------------------ CVAdataStore --------------------------*/ /* This routine integrates the forward model starting at the check point ck_mem and stores y and yprime at all intermediate steps. Return values: CV_SUCCESS CV_REIFWD_FAIL CV_FWD_FAIL */ /*-----------------------------------------------------------------*/ int CVAdataStore(CVadjMem ca_mem, CkpntMem ck_mem) { CVodeMem cv_mem; DtpntMem *dt_mem; realtype t; long int i; int flag; cv_mem = ca_mem->cv_mem; dt_mem = ca_mem->dt_mem; /* Initialize cv_mem with data from ck_mem */ flag = CVAckpntGet(cv_mem, ck_mem); if (flag != CV_SUCCESS) return(CV_REIFWD_FAIL); /* Set first structure in dt_mem[0] */ dt_mem[0]->t = t0_; N_VScale(ONE, zn_[0], dt_mem[0]->y); N_VScale(ONE, zn_[1], dt_mem[0]->yd); /* Run CVode to set following structures in dt_mem[i] */ i = 1; do { flag = CVode(cv_mem, t1_, dt_mem[i]->y, &t, CV_ONE_STEP); if (flag < 0) return(CV_FWD_FAIL); dt_mem[i]->t = t; flag = CVodeGetDky(cv_mem, t, 1, dt_mem[i]->yd); if (flag != CV_SUCCESS) return(CV_FWD_FAIL); i++; } while (tcv_qmax; /* Copy parameters from check point data structure */ nst = nst_; q = q_; qprime = qprime_; qwait = qwait_; L = L_; gammap = gammap_; h = h_; hprime = hprime_; hscale = hscale_; eta = eta_; etamax = etamax_; tn = t0_; saved_tq5 = saved_tq5_; /* Copy the arrays from check point data structure */ for (j=0; j<=q; j++) N_VScale(ONE, zn_[j], zn[j]); if ( q < qmax ) N_VScale(ONE, zn_[qmax], zn[qmax]); if(quadr_) { for (j=0; j<=q; j++) N_VScale(ONE, znQ_[j], znQ[j]); if ( q < qmax ) N_VScale(ONE, znQ_[qmax], znQ[qmax]); } for (j=0; j<=L_MAX; j++) tau[j] = tau_[j]; for (j=0; j<=NUM_TESTS; j++) tq[j] = tq_[j]; for (j=0; j<=q; j++) l[j] = l_[j]; /* Force a call to setup */ forceSetup = TRUE; } return(CV_SUCCESS); } /*------------------ CVAhermitePrepare --------------------------*/ /* This routine computes quantities required by the Hermite interpolation that are independent of the interpolation point. */ /*-----------------------------------------------------------------*/ static void CVAhermitePrepare(CVadjMem ca_mem, DtpntMem *dt_mem, long int i) { realtype t0, t1; N_Vector y0, y1, yd0, yd1; t0 = dt_mem[i-1]->t; y0 = dt_mem[i-1]->y; yd0 = dt_mem[i-1]->yd; t1 = dt_mem[i]->t; y1 = dt_mem[i]->y; yd1 = dt_mem[i]->yd; delta = t1 - t0; N_VLinearSum(ONE, y1, -ONE, y0, Y0); N_VLinearSum(ONE, yd1, ONE, yd0, Y1); N_VLinearSum(delta, Y1, -TWO, Y0, Y1); N_VLinearSum(ONE, Y0, -delta, yd0, Y0); } /*------------------ CVAhermiteInterpolate ----------------------*/ /* This routine performs the Hermite interpolation. */ /*-----------------------------------------------------------------*/ static void CVAhermiteInterpolate(CVadjMem ca_mem, DtpntMem *dt_mem, long int i, realtype t, N_Vector y) { realtype t0, t1; N_Vector y0, yd0; realtype factor; t0 = dt_mem[i-1]->t; t1 = dt_mem[i]->t; y0 = dt_mem[i-1]->y; yd0 = dt_mem[i-1]->yd; factor = t - t0; N_VLinearSum(ONE, y0, factor, yd0, y); factor = factor/delta; factor = factor*factor; N_VLinearSum(ONE, y, factor, Y0, y); factor = factor*(t-t1)/delta; N_VLinearSum(ONE, y, factor, Y1, y); } /*=================================================================*/ /*BEGIN Wrappers for adjoint system */ /*=================================================================*/ /*------------------ CVArhs --------------------------*/ /* This routine interfaces to the CVRhsFnB routine provided by the user. NOTE: f_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static void CVArhs(realtype t, N_Vector yB, N_Vector yBdot, void *cvadj_mem) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint RHS routine */ f_B(t, ytmp, yB, yBdot, f_data_B); } /*------------------ CVArhsQ --------------------------*/ /* This routine interfaces to the CVQuadRhsFnB routine provided by the user. NOTE: fQ_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static void CVArhsQ(realtype t, N_Vector yB, N_Vector qBdot, void *cvadj_mem) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint RHS routine */ fQ_B(t, ytmp, yB, qBdot, fQ_data_B); } /*------------------ CVAdenseJac --------------------------*/ /* This routine interfaces to the CVDenseJacFnB routine provided by the user. NOTE: jac_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static void CVAdenseJac(long int nB, DenseMat JB, realtype t, N_Vector yB, N_Vector fyB, void *cvadj_mem, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint dense djacB routine */ djac_B(nB, JB, t, ytmp, yB, fyB, jac_data_B, tmp1B, tmp2B, tmp3B); } /*------------------ CVAbandJac --------------------------*/ /* This routine interfaces to the CVBandJacFnB routine provided by the user. NOTE: jac_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static void CVAbandJac(long int nB, long int mupperB, long int mlowerB, BandMat JB, realtype t, N_Vector yB, N_Vector fyB, void *cvadj_mem, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint band bjacB routine */ bjac_B(nB, mupperB, mlowerB, JB, t, ytmp, yB, fyB, jac_data_B, tmp1B, tmp2B, tmp3B); } /*------------------ CVAspgmrPrecSetup ------------------------*/ /* This routine interfaces to the CVSpgmrPrecSetupFnB routine provided by the user. NOTE: p_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static int CVAspgmrPrecSetup(realtype t, N_Vector yB, N_Vector fyB, booleantype jokB, booleantype *jcurPtrB, realtype gammaB, void *cvadj_mem, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint precondB routine */ flag = pset_B(t, ytmp, yB, fyB, jokB, jcurPtrB, gammaB, P_data_B, tmp1B, tmp2B, tmp3B); return(flag); } /*---------------- CVAspgmrPrecSolve -------------------------*/ /* This routine interfaces to the CVSpgmrPrecSolveFnB routine provided by the user. NOTE: p_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static int CVAspgmrPrecSolve(realtype t, N_Vector yB, N_Vector fyB, N_Vector rB, N_Vector zB, realtype gammaB, realtype deltaB, int lrB, void *cvadj_mem, N_Vector tmpB) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint psolveB routine */ flag = psolve_B(t, ytmp, yB, fyB, rB, zB, gammaB, deltaB, lrB, P_data_B, tmpB); return(flag); } /*------------------ CVAspgmrJacTimesVec ---------------------*/ /* This routine interfaces to the CVSpgmrJacTimesVecFnB routine provided by the user. NOTE: jac_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static int CVAspgmrJacTimesVec(N_Vector vB, N_Vector JvB, realtype t, N_Vector yB, N_Vector fyB, void *cvadj_mem, N_Vector tmpB) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint jtimesB routine */ flag = jtimes_B(vB, JvB, t, ytmp, yB, fyB, jac_data_B, tmpB); return(flag); } /*------------------- CVAgloc --------------------------------*/ /* This routine interfaces to the CVLocalFnB routine provided by the user. NOTE: f_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static void CVAgloc(long int NlocalB, realtype t, N_Vector yB, N_Vector gB, void *cvadj_mem) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint glocB routine */ gloc_B(NlocalB, t, ytmp, yB, gB, f_data_B); } /*------------------- CVAcfn ---------------------------------*/ /* This routine interfaces to the CVCommFnB routine provided by the user. NOTE: f_data actually contains cvadj_mem */ /*-----------------------------------------------------------------*/ static void CVAcfn(long int NlocalB, realtype t, N_Vector yB, void *cvadj_mem) { CVadjMem ca_mem; int flag; ca_mem = (CVadjMem) cvadj_mem; /* Forward solution from Hermite interpolation */ flag = CVadjGetY(ca_mem, t, ytmp); if (flag != CV_SUCCESS) { printf("\n\nBad t in interpolation\n\n"); exit(1); } /* Call user's adjoint cfnB routine */ if(cfn_B != NULL) cfn_B(NlocalB, t, ytmp, yB, f_data_B); } /*=================================================================*/ /*END Wrappers for adjoint system */ /*=================================================================*/ /*=================================================================*/ /*END Private Functions Implementation */ /*=================================================================*/ neuron-7.5/src/sundials/cvodes/cvodea.h000077500000000000000000000403731323325274500202210ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the interface file for the CVODEA adjoint integrator. * * Function types: * CVRhsFnB * CVQuadRhsFnB * CVDenseJacFnB * CVBandJacFnB * CVSpgmrPrecSetupFnB * CVSpgmrPrecSolveB * CVSpgmrJacTimesVecFnB * Exported functions prototypes: * CVadjMalloc * CVodeF * CVodeCreateB * CVodeMallocB * CVDenseB * CVBandB * CVSpgmrB * CVBandPrecAllocB * CVBPSpgmrB * CVBBDPrecAllocB * CVBBDPrecReInit * CVBBDSpgmrB * CVodeB * CVadjFree * CVadjGetY * CVadjCheckPointsList * CVadjDataExtract * Type definitions: * struct CkpntMemRec, CkpntMem * struct DtpntMemRec, DtpntMem * struct CVadjMemRec, CVadjMem * ----------------------------------------------------------------- */ #ifndef _CVODEA_H #define _CVODEA_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "dense.h" #include "band.h" #include "spgmr.h" #include "sundialstypes.h" #include "nvector.h" /* * ----------------------------------------------------------------- * Type : CVRhsFnB * ----------------------------------------------------------------- * The fB function which defines the right hand side of the * ODE systems to be integrated backwards must have type CVRhsFnB. * ----------------------------------------------------------------- */ typedef void (*CVRhsFnB)(realtype t, N_Vector y, N_Vector yB, N_Vector yBdot, void *f_dataB); /* * ----------------------------------------------------------------- * Type : CVQuadRhsFnB * ----------------------------------------------------------------- * The fQB function which defines the quadratures to be integrated * backwards must have type CVQuadRhsFnB. * ----------------------------------------------------------------- */ typedef void (*CVQuadRhsFnB)(realtype t, N_Vector y, N_Vector yB, N_Vector qBdot, void *fQ_dataB); /* * ----------------------------------------------------------------- * Type : CVDenseJacFnB * ----------------------------------------------------------------- * A dense Jacobian approximation function djacB for the backward * integration must have the prototype given below. * ----------------------------------------------------------------- */ typedef void (*CVDenseJacFnB)(long int nB, DenseMat JB, realtype t, N_Vector y, N_Vector yB, N_Vector fyB, void *jac_dataB, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B); /* * ----------------------------------------------------------------- * Type : CVBandJacFnB * ----------------------------------------------------------------- * A band Jacobian approximation function bjacB for the backward * integration must have the prototype given below. * ----------------------------------------------------------------- */ typedef void (*CVBandJacFnB)(long int nB, long int mupperB, long int mlowerB, BandMat JB, realtype t, N_Vector y, N_Vector yB, N_Vector fyB, void *jac_dataB, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B); /* * ----------------------------------------------------------------- * Type : CVSpgmrPrecSetupFnB * ----------------------------------------------------------------- * A preconditioner setup function precondB for the backward * integration must have the prototype given below. * ----------------------------------------------------------------- */ typedef int (*CVSpgmrPrecSetupFnB)(realtype t, N_Vector y, N_Vector yB, N_Vector fyB, booleantype jokB, booleantype *jcurPtrB, realtype gammaB, void *P_dataB, N_Vector tmp1B, N_Vector tmp2B, N_Vector tmp3B); /* * ----------------------------------------------------------------- * Type : CVSpgmrPrecSolveFnB * ----------------------------------------------------------------- * A preconditioner solve function psolveB for the backward * integration must have the prototype given below. * ----------------------------------------------------------------- */ typedef int (*CVSpgmrPrecSolveFnB)(realtype t, N_Vector y, N_Vector yB, N_Vector fyB, N_Vector rB, N_Vector zB, realtype gammaB, realtype deltaB, int lrB, void *P_dataB, N_Vector tmpB); /* * ----------------------------------------------------------------- * Type : CVSpgmrJacTimesVecFnB * ----------------------------------------------------------------- * A Jacobian times vector function jtimesB for the backward * integration must have the prototype given below. * ----------------------------------------------------------------- */ typedef int (*CVSpgmrJacTimesVecFnB)(N_Vector vB, N_Vector JvB, realtype t, N_Vector y, N_Vector yB, N_Vector fyB, void *jac_dataB, N_Vector tmpB); /* * ----------------------------------------------------------------- * Type : CVLocalFnB and CVCommFnB * ----------------------------------------------------------------- * Local approximation function and inter-process communication * function for the BBD preconditioner on the backward phase. * ----------------------------------------------------------------- */ typedef void (*CVLocalFnB)(long int NlocalB, realtype t, N_Vector y, N_Vector yB, N_Vector gB, void *f_dataB); typedef void (*CVCommFnB)(long int NlocalB, realtype t, N_Vector y, N_Vector yB, void *f_dataB); /* * ----------------------------------------------------------------- * Function : CVadjMalloc * ----------------------------------------------------------------- * CVadjMalloc space for the global CVODEA memory structure. * ----------------------------------------------------------------- */ void *CVadjMalloc(void *cvode_mem, long int steps); /* * ----------------------------------------------------------------- * Function : CVodeF * ----------------------------------------------------------------- * CVodeF integrates towards tout and returns solution into yout. * In the same time, it stores check point data every 'steps'. * * CVodeF can be called repeatedly by the user. * * ncheckPtr points to the number of check points stored so far. * * Return values: * SUCCESS * CVADJ_MEM_FAIL * any CVode return value * ----------------------------------------------------------------- */ int CVodeF(void *cvadj_mem, realtype tout, N_Vector yout, realtype *tret, int itask, int *ncheckPtr); /* * ----------------------------------------------------------------- * Function : CVodeCreateB, CVodeMallocB, CVodeSet*B * ----------------------------------------------------------------- * These functions are just wrappers around the corresponding * functions in cvodes.h, with some particularizations for the * backward integration. * ----------------------------------------------------------------- */ int CVodeCreateB(void *cvadj_mem, int lmmB, int iterB); int CVodeSetIterTypeB(void *cvadj_mem, int iterB); int CVodeSetFdataB(void *cvadj_mem, void *f_dataB); int CVodeSetErrFileB(void *cvadj_mem, FILE *errfpB); int CVodeSetMaxOrdB(void *cvadj_mem, int maxordB); int CVodeSetMaxNumStepsB(void *cvadj_mem, long int mxstepsB); int CVodeSetStabLimDetB(void *cvadj_mem, booleantype stldetB); int CVodeSetInitStepB(void *cvadj_mem, realtype hinB); int CVodeSetMinStepB(void *cvadj_mem, realtype hminB); int CVodeSetMaxStepB(void *cvadj_mem, realtype hmaxB); int CVodeMallocB(void *cvadj_mem, CVRhsFnB fB, realtype tB0, N_Vector yB0, int itolB, realtype *reltolB, void *abstolB); int CVodeReInitB(void *cvadj_mem, CVRhsFnB fB, realtype tB0, N_Vector yB0, int itolB, realtype *reltolB, void *abstolB); /* * ----------------------------------------------------------------- * Function : CVodeSetQuad*B, CVodeQuadMallocB, CVodeQuadReInitB * ----------------------------------------------------------------- */ int CVodeSetQuadFdataB(void *cvadj_mem, void *fQ_dataB); int CVodeSetQuadErrConB(void *cvadj_mem, int errconQB); int CVodeSetQuadTolerancesB(void *cvadj_mem, int itolQB, realtype *reltolQB, void *abstolQB); int CVodeQuadMallocB(void *cvadj_mem, CVQuadRhsFnB fQB, N_Vector yQB0); int CVodeQuadReInitB(void *cvadj_mem, CVQuadRhsFnB fQB, N_Vector yQB0); /* * ----------------------------------------------------------------- * Function : CVDenseB, CVDenseSet*B * ----------------------------------------------------------------- * CVDenseB links the main CVODE integrator with the CVDENSE * linear solver for the backward integration. * ----------------------------------------------------------------- */ int CVDenseB(void *cvadj_mem, long int nB); int CVDenseSetJacFnB(void *cvadj_mem, CVDenseJacFnB djacB); int CVDenseSetJacDataB(void *cvadj_mem, void *jac_dataB); /* * ----------------------------------------------------------------- * Function : CVDiagB * ----------------------------------------------------------------- * CVDiagB links the main CVODE integrator with the CVDIAG * linear solver for the backward integration. * ----------------------------------------------------------------- */ int CVDiagB(void *cvadj_mem); /* * ----------------------------------------------------------------- * Function : CVBandB, CVBandSet*B * ----------------------------------------------------------------- * CVBandB links the main CVODE integrator with the CVBAND * linear solver for the backward integration. * ----------------------------------------------------------------- */ int CVBandB(void *cvadj_mem, long int nB, long int mupperB, long int mlowerB); int CVBandSetJacFnB(void *cvadj_mem, CVBandJacFnB bjacB); int CVBandSetJacDataB(void *cvadj_mem, void *jac_dataB); /* * ----------------------------------------------------------------- * Function : CVSpgmrB, CVSpgmrSet*B * ----------------------------------------------------------------- * CVSpgmrB links the main CVODE integrator with the CVSPGMR * linear solver for the backward integration. * ----------------------------------------------------------------- */ int CVSpgmrB(void *cvadj_mem, int pretypeB, int maxlB); int CVSpgmrSetPrecTypeB(void *cvadj_mem, int pretypeB); int CVSpgmrSetGSTypeB(void *cvadj_mem, int gstypeB); int CVSpgmrSetDeltB(void *cvadj_mem, realtype deltB); int CVSpgmrSetPrecSetupFnB(void *cvadj_mem, CVSpgmrPrecSetupFnB psetB); int CVSpgmrSetPrecSolveFnB(void *cvadj_mem, CVSpgmrPrecSolveFnB psolveB); int CVSpgmrSetJacTimesVecFnB(void *cvadj_mem, CVSpgmrJacTimesVecFnB jtimesB); int CVSpgmrSetPrecDataB(void *cvadj_mem, void *P_dataB); int CVSpgmrSetJacDataB(void *cvadj_mem, void *jac_dataB); /* * ----------------------------------------------------------------- * Function: CVBandPrecAllocB, CVBPSpgmrB * ----------------------------------------------------------------- * CVBandPrecAllocB interfaces to the CVBANDPRE preconditioner for * the backward integration. The pointer to the structure * returned by this routine should then be used in the call to * CVBPSpgmrB which interfaces to CVBPSpgmr. * ----------------------------------------------------------------- */ int CVBandPrecAllocB(void *cvadj_mem, long int nB, long int muB, long int mlB); int CVBPSpgmrB(void *cvadj_mem, int pretypeB, int maxlB); /* * ----------------------------------------------------------------- * Functions: CVBBDPrecAllocB, CVBBDSpgmrB, CVBBDPrecReInit * ----------------------------------------------------------------- * Interface functions for the BBD preconditioner to be used on * the backward phase. * ----------------------------------------------------------------- */ int CVBBDPrecAllocB(void *cvadj_mem, long int NlocalB, long int mudqB, long int mldqB, long int mukeepB, long int mlkeepB, realtype dqrelyB, CVLocalFnB glocB, CVCommFnB cfnB); int CVBBDSpgmrB(void *cvadj_mem, int pretypeB, int maxlB); int CVBBDPrecReInitB(void *cvadj_mem, long int mudqB, long int mldqB, realtype dqrelyB, CVLocalFnB glocB, CVCommFnB cfnB); /* * ----------------------------------------------------------------- * Function : CVodeB * ----------------------------------------------------------------- * CVodeB performs the backward integration from tfinal to * tinitial through a sequence of forward-backward runs in * between consecutive check points. It returns the values of * the adjoint variables and any existing quadrature variables * at tinitial. * ----------------------------------------------------------------- */ int CVodeB(void *cvadj_mem, realtype tBout, N_Vector yBout, realtype *tBret, int itaskB); /* * ----------------------------------------------------------------- * Function : CVodeGetQuadB * ----------------------------------------------------------------- * CVodeGetQuadB extracts values for quadrature variables in * the N_Vector qB. * ----------------------------------------------------------------- */ int CVodeGetQuadB(void *cvadj_mem, N_Vector qB); /* * ----------------------------------------------------------------- * Function : CVadjFree * ----------------------------------------------------------------- * CVadjFree frees the memory allocated by CVadjMalloc. * ----------------------------------------------------------------- */ void CVadjFree(void *cvadj_mem); /* * ----------------------------------------------------------------- * Function : CVadjGetCVodeBmem * ----------------------------------------------------------------- * CVadjGetCVodeBmem returns a (void *) pointer to the CVODES * memory allocated for the backward problem. This pointer can * then be used to call any of the CVodeGet* CVODES routines to * extract optional output for the backward integration phase. * ----------------------------------------------------------------- */ void *CVadjGetCVodeBmem(void *cvadj_mem); /* * ----------------------------------------------------------------- * Function : CVadjGetY * ----------------------------------------------------------------- * This routine uses cubic piece-wise Hermite interpolation for * the forward solution vector. * ----------------------------------------------------------------- */ int CVadjGetY(void *cvadj_mem, realtype t, N_Vector y); /* * ----------------------------------------------------------------- * Function : CVadjGetCheckPointsList * ----------------------------------------------------------------- */ void CVadjGetCheckPointsList(void *cvadj_mem); /* * ----------------------------------------------------------------- * Function : CVadjGetStoredData * ----------------------------------------------------------------- */ void CVadjGetStoredData(void *cvadj_mem, long int which, realtype *t, N_Vector yout, N_Vector ydout); /* * ----------------------------------------------------------------- * CVODEA return values * ----------------------------------------------------------------- */ #define CV_ADJMEM_NULL -101 #define CV_BAD_TB0 -103 #define CV_BCKMEM_NULL -104 #define CV_REIFWD_FAIL -105 #define CV_FWD_FAIL -106 #define CV_BAD_ITASK -107 #define CV_BAD_TBOUT -108 #define CV_GETY_BADT -109 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvodea_impl.h000077500000000000000000000131361323325274500212370ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the CVODEA adjoint integrator. * ----------------------------------------------------------------- */ #ifndef _CVODEA_IMPL_H #define _CVODEA_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "cvodea.h" #include "cvodes_impl.h" #include "cvdense_impl.h" #include "cvband_impl.h" #include "cvspgmr_impl.h" #include "cvbandpre_impl.h" #include "cvbbdpre_impl.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types : struct CkpntMemRec, CkpntMem * ----------------------------------------------------------------- * The type CkpntMem is type pointer to struct CkpntMemRec. * This structure contains fields to store all information at a * check point that is needed to 'hot' start cvodes. * ----------------------------------------------------------------- */ typedef struct CkpntMemRec { /* Integration limits */ realtype ck_t0; realtype ck_t1; /* Nordsieck History Array */ N_Vector ck_zn[L_MAX]; /* Nordsieck History Array for quadratures */ N_Vector ck_znQ[L_MAX]; /* Do we need to carry quadratures? */ booleantype ck_quadr; /* Was ck_zn[qmax] allocated? ck_zqm = 0 - no ck_zqm = qmax - yes */ int ck_zqm; /* Step data */ long int ck_nst; int ck_q; int ck_qprime; int ck_qwait; int ck_L; realtype ck_gammap; realtype ck_h; realtype ck_hprime; realtype ck_hscale; realtype ck_eta; realtype ck_etamax; realtype ck_tau[L_MAX+1]; realtype ck_tq[NUM_TESTS+1]; realtype ck_l[L_MAX]; /* Saved values */ realtype ck_saved_tq5; /* Pointer to next structure in list */ struct CkpntMemRec *ck_next; } *CkpntMem; /* * ----------------------------------------------------------------- * Types : struct DtpntMemRec, DtpntMem * ----------------------------------------------------------------- * The type DtpntMem is type pointer to struct DtpntMemRec. * This structure contains fields to store all information at a * data point that is needed to interpolate solution of forward * simulations. * ----------------------------------------------------------------- */ typedef struct DtpntMemRec { /* time */ realtype t; /* solution */ N_Vector y; /* solution derivative */ N_Vector yd; } *DtpntMem; /* * ----------------------------------------------------------------- * Types : struct CVadjMemRec, CVadjMem * ----------------------------------------------------------------- * The type CVadjMem is type pointer to struct CVadjMemRec. * This structure contins fields to store all information * necessary for adjoint sensitivity analysis. * ----------------------------------------------------------------- */ typedef struct CVadjMemRec { /* CVODE memory for forward runs */ struct CVodeMemRec *cv_mem; /* CVODE memory for backward run */ struct CVodeMemRec *cvb_mem; /* Storage for check point information */ struct CkpntMemRec *ck_mem; /* Storage for data from forward runs */ struct DtpntMemRec **dt_mem; /* Right hand side function (fB) for backward run */ CVRhsFnB ca_fB; /* Right hand side quadrature function (fQB) for backward run */ CVQuadRhsFnB ca_fQB; /* Dense Jacobian function (djacB) for backward run */ CVDenseJacFnB ca_djacB; /* Banded Jacobian function (bjacB) for backward run */ CVBandJacFnB ca_bjacB; /* Jac times vec routine (jtimesB) for backward run */ CVSpgmrJacTimesVecFnB ca_jtimesB; /* Preconditioner routines (precondB and psolveB) for backward run */ CVSpgmrPrecSetupFnB ca_psetB; CVSpgmrPrecSolveFnB ca_psolveB; /* BBD user functions (glocB and cfnB) for backward run */ CVLocalFnB ca_glocB; CVCommFnB ca_cfnB; /* User f_dataB */ void *ca_f_dataB; /* User fQ_dataB */ void *ca_fQ_dataB; /* User jac_dataB */ void *ca_jac_dataB; /* User P_dataB */ void *ca_P_dataB; /* BP prec data */ void *ca_bp_dataB; /* BBD prec data */ void *ca_bbd_dataB; /* Unit roundoff */ realtype ca_uround; /* Integration interval */ realtype ca_tinitial, ca_tfinal; /* Time at which to extract quadratures */ realtype ca_t_for_quad; /* Number of check points */ int ca_nckpnts; /* Number of steps between 2 check points */ long int ca_nsteps; /* Flag to indicate that data in dt_mem is new */ booleantype ca_newData; /* address of the check point structure for which data is available */ struct CkpntMemRec *ca_ckpntData; /* Actual number of data points saved in current dt_mem */ /* Commonly, np = nsteps+1 */ long int ca_np; /* Temporary space used by the Hermite interpolation */ realtype ca_delta; N_Vector ca_Y0, ca_Y1; N_Vector ca_ytmp; } *CVadjMem; /* Error Messages */ #define _CVAM_ "CVadjMalloc-- " #define MSGAM_NO_MEM _CVAM_ "cvode_mem = NULL illegal.\n\n" #define MSGAM_BAD_STEPS _CVAM_ "Steps non-positive illegal.\n\n" #define MSGAM_MEM_FAIL _CVAM_ "A memory request failed.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvodes.c000077500000000000000000005416321323325274500202420ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the main CVODES integrator * with sensitivity analysis capabilities. * It is independent of the CVODES linear solver in use. * ----------------------------------------------------------------- */ /*=================================================================*/ /* Import Header Files */ /*=================================================================*/ #include #include #include "cvodes_impl.h" #include "sundialsmath.h" #include "sundialstypes.h" /*=================================================================*/ /* Macros */ /*=================================================================*/ /* Macro: loop */ #define loop for(;;) /*=================================================================*/ /* CVODES Private Constants */ /*=================================================================*/ #define ZERO RCONST(0.0) /* real 0.0 */ #define TINY RCONST(1.0e-10) /* small number */ #define TENTH RCONST(0.1) /* real 0.1 */ #define FOURTH RCONST(0.25) /* real 0.25 */ #define HALF RCONST(0.5) /* real 0.5 */ #define ONE RCONST(1.0) /* real 1.0 */ #define TWO RCONST(2.0) /* real 2.0 */ #define THREE RCONST(3.0) /* real 3.0 */ #define FOUR RCONST(4.0) /* real 4.0 */ #define FIVE RCONST(5.0) /* real 5.0 */ #define TWELVE RCONST(12.0) /* real 12.0 */ #define HUN RCONST(100.0) /* real 100.0 */ /*=================================================================*/ /* CVODES Default Constants */ /*=================================================================*/ #define HMIN_DEFAULT ZERO /* hmin default value */ #define HMAX_INV_DEFAULT ZERO /* hmax_inv default value */ #define MXHNIL_DEFAULT 10 /* mxhnil default value */ #define MXSTEP_DEFAULT 500 /* mxstep default value */ /*=================================================================*/ /* CVODES Routine-Specific Constants */ /*=================================================================*/ /* CVodeGetDky and CVStep */ #define FUZZ_FACTOR RCONST(100.0) /* CVHin */ #define HLB_FACTOR RCONST(100.0) #define HUB_FACTOR RCONST(0.1) #define H_BIAS HALF #define MAX_ITERS 4 /* CVSet */ #define CORTES RCONST(0.1) /* CVStep return values */ #define SUCCESS_STEP 0 #define REP_ERR_FAIL -1 #define REP_CONV_FAIL -2 #define SETUP_FAILED -3 #define SOLVE_FAILED -4 /* CVStep control constants */ #define PREDICT_AGAIN -5 #define DO_ERROR_TEST 1 /* CVStep */ #define THRESH RCONST(1.5) #define ETAMX1 RCONST(10000.0) #define ETAMX2 RCONST(10.0) #define ETAMX3 RCONST(10.0) #define ETAMXF RCONST(0.2) #define ETAMIN RCONST(0.1) #define ETACF RCONST(0.25) #define ADDON RCONST(0.000001) #define BIAS1 RCONST(6.0) #define BIAS2 RCONST(6.0) #define BIAS3 RCONST(10.0) #define ONEPSM RCONST(1.000001) #define SMALL_NST 10 /* nst > SMALL_NST => use ETAMX3 */ #define MXNCF 10 /* max no. of convergence failures during one step try */ #define MXNEF 7 /* max no. of error test failures during one step try */ #define MXNEF1 3 /* max no. of error test failures before forcing a reduction of order */ #define SMALL_NEF 2 /* if an error failure occurs and SMALL_NEF <= nef <= MXNEF1, then reset eta = MIN(eta, ETAMXF) */ #define LONG_WAIT 10 /* number of steps to wait before considering an order change when q==1 and MXNEF1 error test failures have occurred */ /* CVNls return values */ #define SOLVED 0 #define CONV_FAIL -1 #define SETUP_FAIL_UNREC -2 #define SOLVE_FAIL_UNREC -3 /* CVNls input flags */ #define FIRST_CALL 0 #define PREV_CONV_FAIL -1 #define PREV_ERR_FAIL -2 /* CVNls other constants */ #define NLS_MAXCOR 3 /* maximum no. of corrector iterations for the nonlinear solver */ #define CRDOWN RCONST(0.3) /* constant used in the estimation of the convergence rate (crate) of the iterates for the nonlinear equation */ #define DGMAX RCONST(0.3) /* iter == CV_NEWTON, |gamma/gammap-1| > DGMAX => call lsetup */ #define RDIV TWO /* declare divergence if ratio del/delp > RDIV */ #define MSBP 20 /* max no. of steps between lsetup calls */ #define TRY_AGAIN 99 /* control constant for CVNlsNewton - should be distinct from CVNls return values */ /* CVRcheck* return values */ #define INITROOT -1 #define CLOSERT -2 #define RTFOUND 1 /* CVSensRhs1DQ finite difference methods */ #define CENTERED1 0 #define CENTERED2 1 #define FORWARD1 2 #define FORWARD2 3 /*=================================================================*/ /* Private Helper Functions Prototypes */ /*=================================================================*/ static booleantype CVCheckNvector(N_Vector tmpl); static int CVInitialSetup(CVodeMem cv_mem); static booleantype CVAllocVectors(CVodeMem cv_mem, N_Vector tmpl); static void CVFreeVectors(CVodeMem cv_mem); static booleantype CVEwtSet(CVodeMem cv_mem, N_Vector ycur); static booleantype CVEwtSetSS(CVodeMem cv_mem, N_Vector ycur); static booleantype CVEwtSetSV(CVodeMem cv_mem, N_Vector ycur); static booleantype CVHin(CVodeMem cv_mem, realtype tout); static realtype CVUpperBoundH0(CVodeMem cv_mem, realtype tdist); static realtype CVYddNorm(CVodeMem cv_mem, realtype hg); static int CVStep(CVodeMem cv_mem); static int CVsldet(CVodeMem cv_mem); static void CVAdjustParams(CVodeMem cv_mem); static void CVAdjustOrder(CVodeMem cv_mem, int deltaq); static void CVAdjustAdams(CVodeMem cv_mem, int deltaq); static void CVAdjustBDF(CVodeMem cv_mem, int deltaq); static void CVIncreaseBDF(CVodeMem cv_mem); static void CVDecreaseBDF(CVodeMem cv_mem); static void CVRescale(CVodeMem cv_mem); static void CVPredict(CVodeMem cv_mem); static void CVSet(CVodeMem cv_mem); static void CVSetAdams(CVodeMem cv_mem); static realtype CVAdamsStart(CVodeMem cv_mem, realtype m[]); static void CVAdamsFinish(CVodeMem cv_mem, realtype m[], realtype M[], realtype hsum); static realtype CVAltSum(int iend, realtype a[], int k); static void CVSetBDF(CVodeMem cv_mem); static void CVSetTqBDF(CVodeMem cv_mem, realtype hsum, realtype alpha0, realtype alpha0_hat, realtype xi_inv, realtype xistar_inv); static int CVNls(CVodeMem cv_mem, int nflag); static int CVNlsFunctional(CVodeMem cv_mem); static int CVNlsNewton(CVodeMem cv_mem, int nflag); static int CVNewtonIteration(CVodeMem cv_mem); static int CVHandleNFlag(CVodeMem cv_mem, int *nflagPtr, realtype saved_t, int *ncfPtr, long int *ncfnPtr); static void CVRestore(CVodeMem cv_mem, realtype saved_t); static booleantype CVDoErrorTest(CVodeMem cv_mem, int *nflagPtr, int *kflagPtr, realtype saved_t, int *nefPtr, realtype *dsmPtr); static void CVCompleteStep(CVodeMem cv_mem); static void CVPrepareNextStep(CVodeMem cv_mem, realtype dsm); static void CVSetEta(CVodeMem cv_mem); static realtype CVComputeEtaqm1(CVodeMem cv_mem); static realtype CVComputeEtaqp1(CVodeMem cv_mem); static void CVChooseEta(CVodeMem cv_mem); static void CVBDFStab(CVodeMem cv_mem); static int CVHandleFailure(CVodeMem cv_mem,int kflag); /*----------------*/ static int CVRcheck1(CVodeMem cv_mem); static int CVRcheck2(CVodeMem cv_mem); static int CVRcheck3(CVodeMem cv_mem); static int CVRootfind(CVodeMem cv_mem); /*----------------*/ static booleantype CVQuadAllocVectors(CVodeMem cv_mem, N_Vector tmpl); static booleantype CVQuadEwtSet(CVodeMem cv_mem, N_Vector qcur); static booleantype CVQuadEwtSetSS(CVodeMem cv_mem, N_Vector qcur); static booleantype CVQuadEwtSetSV(CVodeMem cv_mem, N_Vector qcur); static void CVQuadFreeVectors(CVodeMem cv_mem); /*----------------*/ static booleantype CVQuadDoErrorTest(CVodeMem cv_mem, int *nflagPtr, int *kflagPtr, realtype saved_t, int *nefQPtr, realtype *dsmQPtr); /*----------------*/ static realtype CVQuadUpdateNorm(CVodeMem cv_mem, realtype old_nrm, N_Vector xQ, N_Vector wQ); static realtype CVQuadUpdateDsm(CVodeMem cv_mem, realtype old_dsm, realtype dsmQ); /*----------------*/ static int CVSensTestTolerances(CVodeMem cv_mem); static int CVSensSetTolerances(CVodeMem cv_mem); static booleantype CVSensAllocAtol(CVodeMem cv_mem, void **atolSPtr); static void CVSensFreeAtol(CVodeMem cv_mem, void *atolS); static booleantype CVSensSetAtolSS(CVodeMem cv_mem, realtype *atolS); static booleantype CVSensSetAtolSV(CVodeMem cv_mem, N_Vector *atolS); /*----------------*/ static booleantype CVSensAllocVectors(CVodeMem cv_mem, N_Vector tmpl); static void CVSensFreeVectors(CVodeMem cv_mem); /*----------------*/ static booleantype CVSensEwtSet(CVodeMem cv_mem, N_Vector *yScur); static booleantype CVSensEwtSetSS(CVodeMem cv_mem, N_Vector *yScur); static booleantype CVSensEwtSetSV(CVodeMem cv_mem, N_Vector *yScur); /*----------------*/ static int CVStgrNls(CVodeMem cv_mem); static int CVStgrNlsFunctional(CVodeMem cv_mem); static int CVStgrNlsNewton(CVodeMem cv_mem); static int CVStgrNewtonIteration(CVodeMem cv_mem); static int CVStgr1Nls(CVodeMem cv_mem, int is); static int CVStgr1NlsFunctional(CVodeMem cv_mem, int is); static int CVStgr1NlsNewton(CVodeMem cv_mem, int is); static int CVStgr1NewtonIteration(CVodeMem cv_mem, int is); static booleantype CVStgrDoErrorTest(CVodeMem cv_mem, int *nflagPtr, int *kflagPtr, realtype saved_t, int *nefSPtr, realtype *dsmSPtr); /*----------------*/ static realtype CVSensNorm(CVodeMem cv_mem, N_Vector *xS, N_Vector *wS); static realtype CVSensUpdateNorm(CVodeMem cv_mem, realtype old_nrm, N_Vector *xS, N_Vector *wS); static realtype CVStgrUpdateDsm(CVodeMem cv_mem, realtype old_dsm, realtype dsmS); /*----------------*/ static void CVSensRhs(CVodeMem cv_mem, realtype time, N_Vector ycur, N_Vector fcur, N_Vector *yScur, N_Vector *fScur, N_Vector temp1, N_Vector temp2); static void CVSensRhs1(CVodeMem cv_mem, realtype time, N_Vector ycur, N_Vector fcur, int is, N_Vector yScur, N_Vector fScur, N_Vector temp1, N_Vector temp2); /*=================================================================*/ /* EXPORTED FUNCTIONS IMPLEMENTATION */ /*=================================================================*/ /* * CVodeCreate * * CVodeCreate creates an internal memory block for a problem to * be solved by CVODES. * If successful, CVodeCreate returns a pointer to the problem memory. * This pointer should be passed to CVodeMalloc. * If an initialization error occurs, CVodeCreate prints an error * message to standard err and returns NULL. */ void *CVodeCreate(int lmm, int iter) { int maxord; CVodeMem cv_mem; /* Test inputs */ if ((lmm != CV_ADAMS) && (lmm != CV_BDF)) { fprintf(stderr, MSGCVS_BAD_LMM); return (NULL); } if ((iter != CV_FUNCTIONAL) && (iter != CV_NEWTON)) { fprintf(stderr, MSGCVS_BAD_ITER); return (NULL); } cv_mem = (CVodeMem) malloc(sizeof(struct CVodeMemRec)); if (cv_mem == NULL) { fprintf(stderr, MSGCVS_CVMEM_FAIL); return (NULL); } maxord = (lmm == CV_ADAMS) ? ADAMS_Q_MAX : BDF_Q_MAX; /* copy input parameters into cv_mem */ cv_mem->cv_lmm = lmm; cv_mem->cv_iter = iter; /* Set uround */ cv_mem->cv_uround = UNIT_ROUNDOFF; /* Set default values for integrator optional inputs */ cv_mem->cv_f = NULL; cv_mem->cv_f_data = NULL; cv_mem->cv_errfp = stderr; cv_mem->cv_qmax = maxord; cv_mem->cv_mxstep = MXSTEP_DEFAULT; cv_mem->cv_mxhnil = MXHNIL_DEFAULT; cv_mem->cv_sldeton = FALSE; cv_mem->cv_hin = ZERO; cv_mem->cv_hmin = HMIN_DEFAULT; cv_mem->cv_hmax_inv = HMAX_INV_DEFAULT; cv_mem->cv_tstopset = FALSE; cv_mem->cv_maxcor = NLS_MAXCOR; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; /* Set default values for quad. optional inputs */ cv_mem->cv_quadr = FALSE; cv_mem->cv_fQ = NULL; cv_mem->cv_fQ_data = NULL; cv_mem->cv_errconQ = FALSE; cv_mem->cv_reltolQ = NULL; cv_mem->cv_abstolQ = NULL; /* Set default values for sensi. optional inputs */ cv_mem->cv_sensi = FALSE; cv_mem->cv_fS_data = (void *)cv_mem; cv_mem->cv_fS = CVSensRhsDQ; cv_mem->cv_fS1 = CVSensRhs1DQ; cv_mem->cv_fSDQ = TRUE; cv_mem->cv_ifS = CV_ONESENS; cv_mem->cv_rhomax = ZERO; cv_mem->cv_pbar = NULL; cv_mem->cv_plist = NULL; cv_mem->cv_errconS = FALSE; cv_mem->cv_maxcorS = NLS_MAXCOR; cv_mem->cv_ncfS1 = NULL; cv_mem->cv_ncfnS1 = NULL; cv_mem->cv_nniS1 = NULL; /* By default, CVODES sets sensi tolerances */ cv_mem->cv_setSensTol = TRUE; cv_mem->cv_atolSallocated = FALSE; cv_mem->cv_testSensTol = FALSE; cv_mem->cv_reltolS = NULL; cv_mem->cv_abstolS = NULL; /* No mallocs have been done yet */ cv_mem->cv_MallocDone = FALSE; cv_mem->cv_quadMallocDone = FALSE; cv_mem->cv_sensMallocDone = FALSE; /* Return pointer to CVODES memory block */ return((void *)cv_mem); } /*-----------------------------------------------------------------*/ #define iter (cv_mem->cv_iter) #define lmm (cv_mem->cv_lmm) #define errfp (cv_mem->cv_errfp) /*-----------------------------------------------------------------*/ /* * CVodeMalloc * * CVodeMalloc allocates and initializes memory for a problem. All * problem inputs are checked for errors. If any error occurs during * initialization, it is reported to the file whose file pointer is * errfp and an error flag is returned. Otherwise, it returns CV_SUCCESS */ int CVodeMalloc(void *cvode_mem, CVRhsFn f, realtype t0, N_Vector y0, int itol, realtype *reltol, void *abstol) { CVodeMem cv_mem; booleantype nvectorOK, allocOK, neg_abstol; long int lrw1, liw1; int i,k; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_CVM_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Check for legal input parameters */ if (y0==NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_Y0_NULL); return(CV_ILL_INPUT); } if ((itol != CV_SS) && (itol != CV_SV)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ITOL); return(CV_ILL_INPUT); } if (f == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_F_NULL); return(CV_ILL_INPUT); } if (reltol == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_RELTOL_NULL); return(CV_ILL_INPUT); } if (*reltol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_RELTOL); return(CV_ILL_INPUT); } if (abstol == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_ABSTOL_NULL); return(CV_ILL_INPUT); } /* Test if all required vector operations are implemented */ nvectorOK = CVCheckNvector(y0); if(!nvectorOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_NVECTOR); return(CV_ILL_INPUT); } /* Test absolute tolerances */ if (itol == CV_SS) { neg_abstol = (*((realtype *)abstol) < ZERO); } else { neg_abstol = (N_VMin((N_Vector)abstol) < ZERO); } if (neg_abstol) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ABSTOL); return(CV_ILL_INPUT); } /* Set space requirements for one N_Vector */ if (y0->ops->nvspace != NULL) { N_VSpace(y0, &lrw1, &liw1); } else { lrw1 = 0; liw1 = 0; } cv_mem->cv_lrw1 = lrw1; cv_mem->cv_liw1 = liw1; /* Allocate the vectors (using y0 as a template) */ allocOK = CVAllocVectors(cv_mem, y0); if (!allocOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_MEM_FAIL); return(CV_MEM_FAIL); } /* Copy tolerances into memory */ cv_mem->cv_itol = itol; cv_mem->cv_reltol = reltol; cv_mem->cv_abstol = abstol; /* All error checking is complete at this point */ /* Copy the input parameters into CVODES state */ cv_mem->cv_f = f; cv_mem->cv_tn = t0; /* Set step parameters */ cv_mem->cv_q = 1; cv_mem->cv_L = 2; cv_mem->cv_qwait = cv_mem->cv_L; cv_mem->cv_etamax = ETAMX1; cv_mem->cv_qu = 0; cv_mem->cv_hu = ZERO; cv_mem->cv_tolsf = ONE; /* Set the linear solver addresses to NULL. (We check != NULL later, in CVode, if using CV_NEWTON.) */ cv_mem->cv_linit = NULL; cv_mem->cv_lsetup = NULL; cv_mem->cv_lsolve = NULL; cv_mem->cv_lfree = NULL; cv_mem->cv_lmem = NULL; /* Set forceSetup to FALSE */ cv_mem->cv_forceSetup = FALSE; /* Initialize zn[0] in the history array */ N_VScale(ONE, y0, cv_mem->cv_zn[0]); /* Initialize all the counters */ cv_mem->cv_nst = 0; cv_mem->cv_nfe = 0; cv_mem->cv_ncfn = 0; cv_mem->cv_netf = 0; cv_mem->cv_nni = 0; cv_mem->cv_nsetups = 0; cv_mem->cv_nhnil = 0; cv_mem->cv_nstlp = 0; cv_mem->cv_nscon = 0; cv_mem->cv_nge = 0; /* Initialize root finding variables */ cv_mem->cv_glo = NULL; cv_mem->cv_ghi = NULL; cv_mem->cv_groot = NULL; cv_mem->cv_iroots = NULL; cv_mem->cv_gfun = NULL; cv_mem->cv_g_data = NULL; cv_mem->cv_nrtfn = 0; /* Initialize Stablilty Limit Detection data */ /* NOTE: We do this even if stab lim det was not turned on yet. This way, the user can turn it on at any time */ cv_mem->cv_nor = 0; for (i = 1; i <= 5; i++) for (k = 1; k <= 3; k++) cv_mem->cv_ssdat[i-1][k-1] = ZERO; /* Problem has been successfully initialized */ cv_mem->cv_MallocDone = TRUE; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVodeReInit * * CVodeReInit re-initializes CVODES' memory for a problem, assuming * it has already been allocated in a prior CVodeMalloc call. * All problem specification inputs are checked for errors. * If any error occurs during initialization, it is reported to the * file whose file pointer is errfp. * The return value is CV_SUCCESS = 0 if no errors occurred, or * a negative value otherwise. */ int CVodeReInit(void *cvode_mem, CVRhsFn f, realtype t0, N_Vector y0, int itol, realtype *reltol, void *abstol) { CVodeMem cv_mem; booleantype neg_abstol; int i,k; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_CVM_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Check if cvode_mem was allocated */ if (cv_mem->cv_MallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_CVREI_NO_MALLOC); return(CV_NO_MALLOC); } /* Check for legal input parameters */ if (y0 == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_Y0_NULL); return (CV_ILL_INPUT); } if ((itol != CV_SS) && (itol != CV_SV)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ITOL); return (CV_ILL_INPUT); } if (f == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_F_NULL); return (CV_ILL_INPUT); } if (reltol == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_RELTOL_NULL); return (CV_ILL_INPUT); } if (*reltol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_RELTOL); return (CV_ILL_INPUT); } if (abstol == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_ABSTOL_NULL); return (CV_ILL_INPUT); } if (itol == CV_SS) { neg_abstol = (*((realtype *)abstol) < ZERO); } else { neg_abstol = (N_VMin((N_Vector)abstol) < ZERO); } if (neg_abstol) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ABSTOL); return (CV_ILL_INPUT); } /* Copy tolerances into memory and set the ewt vector */ cv_mem->cv_itol = itol; cv_mem->cv_reltol = reltol; cv_mem->cv_abstol = abstol; /* All error checking is complete at this point */ /* Copy the input parameters into CVODE state */ cv_mem->cv_f = f; cv_mem->cv_tn = t0; /* Set step parameters */ cv_mem->cv_q = 1; cv_mem->cv_L = 2; cv_mem->cv_qwait = cv_mem->cv_L; cv_mem->cv_etamax = ETAMX1; cv_mem->cv_qu = 0; cv_mem->cv_hu = ZERO; cv_mem->cv_tolsf = ONE; /* Set forceSetup to FALSE */ cv_mem->cv_forceSetup = FALSE; /* Initialize zn[0] in the history array */ N_VScale(ONE, y0, cv_mem->cv_zn[0]); /* Initialize all the counters */ cv_mem->cv_nst = 0; cv_mem->cv_nfe = 0; cv_mem->cv_ncfn = 0; cv_mem->cv_netf = 0; cv_mem->cv_nni = 0; cv_mem->cv_nsetups = 0; cv_mem->cv_nhnil = 0; cv_mem->cv_nstlp = 0; cv_mem->cv_nscon = 0; cv_mem->cv_nge = 0; /* Initialize Stablilty Limit Detection data */ cv_mem->cv_nor = 0; for (i = 1; i <= 5; i++) for (k = 1; k <= 3; k++) cv_mem->cv_ssdat[i-1][k-1] = ZERO; /* Problem has been successfully re-initialized */ return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ #define gfun (cv_mem->cv_gfun) #define glo (cv_mem->cv_glo) #define ghi (cv_mem->cv_ghi) #define groot (cv_mem->cv_groot) #define iroots (cv_mem->cv_iroots) /*-----------------------------------------------------------------*/ /* * CVodeRootInit * * CVodeRootInit initializes a rootfinding problem to be solved * during the integration of the ODE system. It loads the root * function pointer and the number of root functions, and allocates * workspace memory. The return value is CV_SUCCESS = 0 if no errors * occurred, or a negative value otherwise. */ int CVodeRootInit(void *cvode_mem, CVRootFn g, int nrtfn) { CVodeMem cv_mem; int nrt; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stdout, MSGCVS_ROOT_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; nrt = (nrtfn < 0) ? 0 : nrtfn; /* If rerunning CVodeRootInit() with a different number of root functions (changing number of gfun components), then free currently held memory resources */ if ((nrt != cv_mem->cv_nrtfn) && (cv_mem->cv_nrtfn > 0)) { free(glo); free(ghi); free(groot); free(iroots); /* Linux version of free() routine doesn't set pointer to NULL */ glo = ghi = groot = NULL; iroots = NULL; } /* If CVodeRootInit() was called with nrtfn == 0, then set cv_nrtfn to zero and cv_gfun to NULL before returning */ if (nrt == 0) { cv_mem->cv_nrtfn = nrt; gfun = NULL; return(CV_SUCCESS); } /* If rerunning CVodeRootInit() with the same number of root functions (not changing number of gfun components), then check if the root function argument has changed */ /* If g != NULL then return as currently reserved memory resources will suffice */ if (nrt == cv_mem->cv_nrtfn) { if (g != gfun) { if (g == NULL) { free(glo); free(ghi); free(groot); free(iroots); fprintf(errfp, MSGCVS_ROOT_FUNC_NULL); return(CV_RTFUNC_NULL); } else { gfun = g; return(CV_SUCCESS); } } else return(CV_SUCCESS); } /* Set variable values in CVode memory block */ cv_mem->cv_nrtfn = nrt; if (g == NULL) { fprintf(errfp, MSGCVS_ROOT_FUNC_NULL); return(CV_RTFUNC_NULL); } else gfun = g; /* Allocate necessary memory and return */ glo = (realtype *) malloc(nrt*sizeof(realtype)); if (glo == NULL) { fprintf(stdout, MSGCVS_ROOT_MEM_FAIL); return(CV_MEM_FAIL); } ghi = (realtype *) malloc(nrt*sizeof(realtype)); if (ghi == NULL) { free(glo); fprintf(stdout, MSGCVS_ROOT_MEM_FAIL); return(CV_MEM_FAIL); } groot = (realtype *) malloc(nrt*sizeof(realtype)); if (groot == NULL) { free(glo); free(ghi); fprintf(stdout, MSGCVS_ROOT_MEM_FAIL); return(CV_MEM_FAIL); } iroots = (int *) malloc(nrt*sizeof(int)); if (iroots == NULL) { free(glo); free(ghi); free(groot); fprintf(stdout, MSGCVS_ROOT_MEM_FAIL); return(CV_MEM_FAIL); } return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVodeQuadMalloc * * CVodeQuadMalloc allocates and initializes quadrature related * memory for a problem. All problem specification inputs are * checked for errors. If any error occurs during initialization, * it is reported to the file whose file pointer is errfp. * The return value is CV_SUCCESS = 0 if no errors occurred, or * a negative value otherwise. */ int CVodeQuadMalloc(void *cvode_mem, CVQuadRhsFn fQ, N_Vector yQ0) { CVodeMem cv_mem; booleantype allocOK; long int lrw1Q, liw1Q; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_QCVM_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Set space requirements for one N_Vector */ N_VSpace(yQ0, &lrw1Q, &liw1Q); cv_mem->cv_lrw1Q = lrw1Q; cv_mem->cv_liw1Q = liw1Q; /* Allocate the vectors (using yQ0 as a template) */ allocOK = CVQuadAllocVectors(cv_mem, yQ0); if (!allocOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_QCVM_MEM_FAIL); return(CV_MEM_FAIL); } /* Initialize znQ[0] in the history array */ N_VScale(ONE, yQ0, cv_mem->cv_znQ[0]); /* Copy the input parameters into CVODES state */ cv_mem->cv_fQ = fQ; /* Initialize counters */ cv_mem->cv_nfQe = 0; cv_mem->cv_netfQ = 0; /* Quadrature integration turned ON */ cv_mem->cv_quadr = TRUE; cv_mem->cv_quadMallocDone = TRUE; /* Quadrature initialization was successfull */ return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVodeQuadReInit * * CVodeQuadReInit re-initializes CVODES' quadrature related memory * for a problem, assuming it has already been allocated in prior * calls to CVodeMalloc and CvodeQuadMalloc. * All problem specification inputs are checked for errors. * If any error occurs during initialization, it is reported to the * file whose file pointer is errfp. * The return value is CV_SUCCESS = 0 if no errors occurred, or * a negative value otherwise. */ int CVodeQuadReInit(void *cvode_mem, CVQuadRhsFn fQ, N_Vector yQ0) { CVodeMem cv_mem; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_QCVM_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Ckeck if quadrature was initialized? */ if (cv_mem->cv_quadMallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_QREI_NO_QUAD); return(CV_NO_QUAD); } /* Initialize znQ[0] in the history array */ N_VScale(ONE, yQ0, cv_mem->cv_znQ[0]); /* Copy the input parameters into CVODE state */ cv_mem->cv_fQ = fQ; /* Initialize counters */ cv_mem->cv_nfQe = 0; cv_mem->cv_netfQ = 0; /* Quadrature integration turned ON */ cv_mem->cv_quadr = TRUE; /* Quadrature re-initialization was successfull */ return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ #define ifS (cv_mem->cv_ifS) #define fSDQ (cv_mem->cv_fSDQ) #define stgr1alloc (cv_mem->cv_stgr1alloc) #define nniS1 (cv_mem->cv_nniS1) #define ncfnS1 (cv_mem->cv_ncfnS1) #define ncfS1 (cv_mem->cv_ncfS1) /*-----------------------------------------------------------------*/ /* * CVodeSenMalloc * * CVodeSensMalloc allocates and initializes sensitivity related * memory for a problem. All problem specification inputs are * checked for errors. If any error occurs during initialization, * it is reported to the file whose file pointer is errfp. * The return value is CV_SUCCESS = 0 if no errors occurred, or * a negative value otherwise. */ int CVodeSensMalloc(void *cvode_mem, int Ns, int ism, realtype *p, int *plist, N_Vector *yS0) { CVodeMem cv_mem; booleantype allocOK; int is; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SCVM_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Check if Ns is legal */ if (Ns<=0) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_NS); return(CV_ILL_INPUT); } cv_mem->cv_Ns = Ns; /* Check if ism is legal */ if ((ism!=CV_SIMULTANEOUS) && (ism!=CV_STAGGERED) && (ism!=CV_STAGGERED1)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ISM); return(CV_ILL_INPUT); } cv_mem->cv_ism = ism; /* Check if p is non-null */ if (p==NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_P_NULL); return(CV_ILL_INPUT); } cv_mem->cv_p = p; cv_mem->cv_plist = plist; /* Check if yS0 is non-null */ if ((cv_mem->cv_yS = yS0) == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_YS0_NULL); return(CV_ILL_INPUT); } /* Allocate ncfS1, ncfnS1, and nniS1 if needed */ if (ism == CV_STAGGERED1) { stgr1alloc = TRUE; ncfS1 = (int*)malloc(Ns*sizeof(int)); ncfnS1 = (long int*)malloc(Ns*sizeof(long int)); nniS1 = (long int*)malloc(Ns*sizeof(long int)); if ( (ncfS1 == NULL) || (ncfnS1 == NULL) || (nniS1 == NULL) ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SCVM_MEM_FAIL); return(CV_MEM_FAIL); } } else { stgr1alloc = FALSE; } /* Allocate the vectors (using yS0[0] as a template) */ allocOK = CVSensAllocVectors(cv_mem, yS0[0]); if (!allocOK) { if (stgr1alloc) { free(ncfS1); free(ncfnS1); free(nniS1); } if(errfp!=NULL) fprintf(errfp, MSGCVS_SCVM_MEM_FAIL); return(CV_MEM_FAIL); } /*---------------------------------------------- All error checking is complete at this point -----------------------------------------------*/ /* Initialize znS[0] in the history array */ for (is=0; iscv_znS[0][is]); /* Initialize all sensitivity related counters */ cv_mem->cv_nfSe = 0; cv_mem->cv_nfeS = 0; cv_mem->cv_ncfnS = 0; cv_mem->cv_netfS = 0; cv_mem->cv_nniS = 0; cv_mem->cv_nsetupsS = 0; if (ism==CV_STAGGERED1) for (is=0; iscv_sensi = TRUE; cv_mem->cv_sensMallocDone = TRUE; /* Sensitivity initialization was successfull */ return (CV_SUCCESS); } /*-----------------------------------------------------------------*/ #define Ns (cv_mem->cv_Ns) /*-----------------------------------------------------------------*/ /* * CVodeSensReInit * * CVodeSensReInit re-initializes CVODES' sensitivity related memory * for a problem, assuming it has already been allocated in prior * calls to CVodeMalloc and CVodeSensMalloc. * All problem specification inputs are checked for errors. * The number of sensitivities Ns is assumed to be unchanged since * the previous call to CVodeSensMalloc. * If any error occurs during initialization, it is reported to the * file whose file pointer is errfp. * The return value is CV_SUCCESS = 0 if no errors occurred, or * a negative value otherwise. */ int CVodeSensReInit(void *cvode_mem, int ism, realtype *p, int *plist, N_Vector *yS0) { CVodeMem cv_mem; int is; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SCVM_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Was sensitivity initialized? */ if (cv_mem->cv_sensMallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SREI_NO_SENSI); return(CV_NO_SENS); } /* Check if ism is legal */ if ((ism!=CV_SIMULTANEOUS) && (ism!=CV_STAGGERED) && (ism!=CV_STAGGERED1)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ISM); return(CV_ILL_INPUT); } cv_mem->cv_ism = ism; /* Check if p is non-null */ if (p==NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_P_NULL); return(CV_ILL_INPUT); } cv_mem->cv_p = p; cv_mem->cv_plist = plist; /* Check if yS0 is non-null */ if (yS0 == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_YS0_NULL); return(CV_ILL_INPUT); } /* Allocate ncfS1, ncfnS1, and nniS1 if needed */ if ( (ism==CV_STAGGERED1) && (stgr1alloc==FALSE) ) { stgr1alloc = TRUE; ncfS1 = (int*)malloc(Ns*sizeof(int)); ncfnS1 = (long int*)malloc(Ns*sizeof(long int)); nniS1 = (long int*)malloc(Ns*sizeof(long int)); if ( (ncfS1==NULL) || (ncfnS1==NULL) || (nniS1==NULL) ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SCVM_MEM_FAIL); return(CV_MEM_FAIL); } } /*---------------------------------------------- All error checking is complete at this point -----------------------------------------------*/ /* Initialize znS[0] in the history array */ for (is=0; iscv_znS[0][is]); /* Initialize all sensitivity related counters */ cv_mem->cv_nfSe = 0; cv_mem->cv_nfeS = 0; cv_mem->cv_ncfnS = 0; cv_mem->cv_netfS = 0; cv_mem->cv_nniS = 0; cv_mem->cv_nsetupsS = 0; if (ism==CV_STAGGERED1) for (is=0; iscv_sensi = TRUE; return (CV_SUCCESS); } /* * CVodeSensToggle * * CVodeSensToggle activates or deactivates sensitivity calculations. * It does NOT deallocate sensitivity-related memory. * It is allowed to set sensi=TRUE only if CVodeSensMalloc has been * previously called. */ int CVodeSensToggle(void *cvode_mem, booleantype sensi) { CVodeMem cv_mem; /* Check cvode_mem */ if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SCVT_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Disable sensitivities */ if (sensi == FALSE) { cv_mem->cv_sensi = FALSE; return (CV_SUCCESS); } /* Re-enable sensitivities */ if (cv_mem->cv_sensMallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SCVT_NO_SENSI); return(CV_NO_SENS); } cv_mem->cv_sensi = TRUE; return (CV_SUCCESS); } /*=================================================================*/ /* Readibility Constants */ /*=================================================================*/ #define f (cv_mem->cv_f) #define f_data (cv_mem->cv_f_data) #define g_data (cv_mem->cv_g_data) #define qmax (cv_mem->cv_qmax) #define mxstep (cv_mem->cv_mxstep) #define mxhnil (cv_mem->cv_mxhnil) #define sldeton (cv_mem->cv_sldeton) #define hin (cv_mem->cv_hin) #define hmin (cv_mem->cv_hmin) #define hmax_inv (cv_mem->cv_hmax_inv) #define tstop (cv_mem->cv_tstop) #define tstopset (cv_mem->cv_tstopset) #define maxnef (cv_mem->cv_maxnef) #define maxncf (cv_mem->cv_maxncf) #define maxcor (cv_mem->cv_maxcor) #define nlscoef (cv_mem->cv_nlscoef) #define itol (cv_mem->cv_itol) #define reltol (cv_mem->cv_reltol) #define abstol (cv_mem->cv_abstol) #define fQ (cv_mem->cv_fQ) #define fQ_data (cv_mem->cv_fQ_data) #define errconQ (cv_mem->cv_errconQ) #define itolQ (cv_mem->cv_itolQ) #define reltolQ (cv_mem->cv_reltolQ) #define abstolQ (cv_mem->cv_abstolQ) #define fS (cv_mem->cv_fS) #define fS1 (cv_mem->cv_fS1) #define fS_data (cv_mem->cv_fS_data) #define rhomax (cv_mem->cv_rhomax) #define pbar (cv_mem->cv_pbar) #define errconS (cv_mem->cv_errconS) #define maxcorS (cv_mem->cv_maxcorS) #define itolS (cv_mem->cv_itolS) #define reltolS (cv_mem->cv_reltolS) #define abstolS (cv_mem->cv_abstolS) #define ism (cv_mem->cv_ism) #define p (cv_mem->cv_p) #define plist (cv_mem->cv_plist) #define uround (cv_mem->cv_uround) #define zn (cv_mem->cv_zn) #define ewt (cv_mem->cv_ewt) #define y (cv_mem->cv_y) #define acor (cv_mem->cv_acor) #define tempv (cv_mem->cv_tempv) #define ftemp (cv_mem->cv_ftemp) #define q (cv_mem->cv_q) #define qprime (cv_mem->cv_qprime) #define next_q (cv_mem->cv_next_q) #define qwait (cv_mem->cv_qwait) #define L (cv_mem->cv_L) #define h (cv_mem->cv_h) #define hprime (cv_mem->cv_hprime) #define next_h (cv_mem->cv_next_h) #define eta (cv_mem->cv_eta) #define etaqm1 (cv_mem->cv_etaqm1) #define etaq (cv_mem->cv_etaq) #define etaqp1 (cv_mem->cv_etaqp1) #define nscon (cv_mem->cv_nscon) #define hscale (cv_mem->cv_hscale) #define tn (cv_mem->cv_tn) #define tau (cv_mem->cv_tau) #define tq (cv_mem->cv_tq) #define l (cv_mem->cv_l) #define rl1 (cv_mem->cv_rl1) #define gamma (cv_mem->cv_gamma) #define gammap (cv_mem->cv_gammap) #define gamrat (cv_mem->cv_gamrat) #define crate (cv_mem->cv_crate) #define acnrm (cv_mem->cv_acnrm) #define mnewt (cv_mem->cv_mnewt) #define etamax (cv_mem->cv_etamax) #define nst (cv_mem->cv_nst) #define nfe (cv_mem->cv_nfe) #define ncfn (cv_mem->cv_ncfn) #define netf (cv_mem->cv_netf) #define nni (cv_mem->cv_nni) #define nsetups (cv_mem->cv_nsetups) #define nhnil (cv_mem->cv_nhnil) #define lrw1 (cv_mem->cv_lrw1) #define liw1 (cv_mem->cv_liw1) #define lrw (cv_mem->cv_lrw) #define liw (cv_mem->cv_liw) #define linit (cv_mem->cv_linit) #define lsetup (cv_mem->cv_lsetup) #define lsolve (cv_mem->cv_lsolve) #define lfree (cv_mem->cv_lfree) #define lmem (cv_mem->cv_lmem) #define qu (cv_mem->cv_qu) #define nstlp (cv_mem->cv_nstlp) #define h0u (cv_mem->cv_h0u) #define hu (cv_mem->cv_hu) #define saved_tq5 (cv_mem->cv_saved_tq5) #define jcur (cv_mem->cv_jcur) #define tolsf (cv_mem->cv_tolsf) #define setupNonNull (cv_mem->cv_setupNonNull) #define forceSetup (cv_mem->cv_forceSetup) #define nor (cv_mem->cv_nor) #define ssdat (cv_mem->cv_ssdat) #define nrtfn (cv_mem->cv_nrtfn) #define tlo (cv_mem->cv_tlo) #define thi (cv_mem->cv_thi) #define tretlast (cv_mem->cv_tretlast) #define toutc (cv_mem->cv_toutc) #define troot (cv_mem->cv_troot) #define ttol (cv_mem->cv_ttol) #define taskc (cv_mem->cv_taskc) #define irfnd (cv_mem->cv_irfnd) #define nge (cv_mem->cv_nge) #define sensi (cv_mem->cv_sensi) #define znS (cv_mem->cv_znS) #define ewtS (cv_mem->cv_ewtS) #define acorS (cv_mem->cv_acorS) #define yS (cv_mem->cv_yS) #define tempvS (cv_mem->cv_tempvS) #define ftempS (cv_mem->cv_ftempS) #define crateS (cv_mem->cv_crateS) #define acnrmS (cv_mem->cv_acnrmS) #define nfSe (cv_mem->cv_nfSe) #define nfeS (cv_mem->cv_nfeS) #define nniS (cv_mem->cv_nniS) #define ncfnS (cv_mem->cv_ncfnS) #define netfS (cv_mem->cv_netfS) #define nsetupsS (cv_mem->cv_nsetupsS) #define stgr1alloc (cv_mem->cv_stgr1alloc) #define setSensTol (cv_mem->cv_setSensTol) #define testSensTol (cv_mem->cv_testSensTol) #define atolSallocated (cv_mem->cv_atolSallocated) #define sensMallocDone (cv_mem->cv_sensMallocDone) #define quadr (cv_mem->cv_quadr) #define znQ (cv_mem->cv_znQ) #define ewtQ (cv_mem->cv_ewtQ) #define acorQ (cv_mem->cv_acorQ) #define yQ (cv_mem->cv_yQ) #define tempvQ (cv_mem->cv_tempvQ) #define acnrmQ (cv_mem->cv_acnrmQ) #define nfQe (cv_mem->cv_nfQe) #define netfQ (cv_mem->cv_netfQ) #define lrw1Q (cv_mem->cv_lrw1Q) #define liw1Q (cv_mem->cv_liw1Q) #define quadMallocDone (cv_mem->cv_quadMallocDone) /*-----------------------------------------------------------------*/ /* * CVode * * This routine is the main driver of the CVODE package. * * It integrates over a time interval defined by the user, by calling * CVStep to do internal time steps. * * The first time that CVode is called for a successfully initialized * problem, it computes a tentative initial step size h. * * CVode supports four modes, specified by itask: CV_NORMAL, CV_ONE_STEP, * CV_NORMAL_TSTOP, and CV_ONE_STEP_TSTOP. * In the CV_NORMAL mode, the solver steps until it reaches or passes tout * and then interpolates to obtain y(tout). * In the CV_ONE_STEP mode, it takes one internal step and returns. * CV_NORMAL_TSTOP and CV_ONE_STEP_TSTOP are similar to CV_NORMAL and CV_ONE_STEP, * respectively, but the integration never proceeds past tstop (which * must have been defined through a call to CVodeSetStopTime). */ int CVode(void *cvode_mem, realtype tout, N_Vector yout, realtype *tret, int itask) { CVodeMem cv_mem; N_Vector wrk1, wrk2; long int nstloc; int kflag, istate, ier, task, irfndp; booleantype istop, hOK, ewtsetOK, ewtSsetOK, ewtQsetOK; int is; realtype troundoff, rh, nrm; /* Check if cvode_mem exists */ if (cvode_mem == NULL) { fprintf(stderr, MSGCVS_CVODE_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Check if cvode_mem was allocated */ if (cv_mem->cv_MallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_CVODE_NO_MALLOC); return(CV_NO_MALLOC); } /* Check for yout != NULL */ if ((y = yout) == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_YOUT_NULL); return (CV_ILL_INPUT); } /* Check for tret != NULL */ if (tret == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_TRET_NULL); return (CV_ILL_INPUT); } tretlast = *tret = tn; /* Check for valid itask */ if ((itask != CV_NORMAL) && (itask != CV_ONE_STEP) && (itask != CV_NORMAL_TSTOP) && (itask != CV_ONE_STEP_TSTOP) ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ITASK); return (CV_ILL_INPUT); } /* Split itask into task and istop */ if ((itask == CV_NORMAL_TSTOP) || (itask == CV_ONE_STEP_TSTOP)) { if ( tstopset == FALSE ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_NO_TSTOP); return(CV_ILL_INPUT); } istop = TRUE; } else { istop = FALSE; } if ((itask == CV_NORMAL) || (itask == CV_NORMAL_TSTOP)) { task = CV_NORMAL; toutc = tout; } else { task = CV_ONE_STEP; } taskc = task; /* If doing FSA, deal with the sensitivity tolerances */ if (sensi) { if (testSensTol) { ier = CVSensTestTolerances(cv_mem); if (ier != CV_SUCCESS) return (ier); testSensTol = FALSE; } if (setSensTol) { ier = CVSensSetTolerances(cv_mem); if (ier != CV_SUCCESS) return (ier); setSensTol = FALSE; } } /* Begin first call block */ if (nst == 0) { /* Check inputs for corectness */ ier = CVInitialSetup(cv_mem); if (ier!= CV_SUCCESS) return (ier); /* Call f at (t0,y0), set zn[1] = y'(t0), set initial h (from H0 or CVHin), and scale zn[1] by h. Also check for zeros of root function g at and near t0. If computing sensitivities, call fS at (t0,y0,yS0), set znS[1][is] = yS'(t0), is=1,...,Ns, and scale znS[1][is] by h. If computing any quadratures, call fQ at (t0,znQ[0]), set znQ[1] = fQ, and scale znQ[1] by h. */ f(tn, zn[0], zn[1], f_data); nfe++; if (sensi) { wrk1 = tempv; wrk2 = ftemp; CVSensRhs(cv_mem, tn, zn[0], zn[1], znS[0], znS[1], tempv, ftemp); } if (quadr) { fQ(tn, zn[0], znQ[1], fQ_data); nfQe++; } h = hin; if ( (h != ZERO) && ((tout-tn)*h < ZERO) ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_H0); return (CV_ILL_INPUT); } if (h == ZERO) { hOK = CVHin(cv_mem, tout); if (!hOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_TOO_CLOSE); return (CV_ILL_INPUT); } } rh = ABS(h)*hmax_inv; if (rh > ONE) h /= rh; if (ABS(h) < hmin) h *= hmin/ABS(h); /* Check for approach to tstop */ if (istop) { if ( (tstop - tn)*h < ZERO ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_TSTOP, tn); return(CV_ILL_INPUT); } if ( (tn + h - tstop)*h > ZERO ) h = tstop - tn; } hscale = h; h0u = h; hprime = h; N_VScale(h, zn[1], zn[1]); if (sensi) for (is=0; is 0) { ier = CVRcheck1(cv_mem); if (ier != CV_SUCCESS) { fprintf(errfp, MSGCVS_BAD_INIT_ROOT); return(CV_ILL_INPUT); } } } /* end first call block */ /* At following steps, perform stop tests */ if (nst > 0) { /* First check for a root in the last step taken, other than the last root found, if any. If task = CV_ONE_STEP and y(tn) was not returned because of an intervening root, return y(tn) now. */ if (nrtfn > 0) { irfndp = irfnd; ier = CVRcheck2(cv_mem); if (ier == CLOSERT) { tretlast = *tret = tlo; fprintf(errfp, MSGCVS_CLOSE_ROOTS, tlo); return(CV_ILL_INPUT); } if (ier == RTFOUND) { tretlast = *tret = tlo; return(CV_ROOT_RETURN); } if (tn != tretlast) { /* Check remaining interval for roots */ ier = CVRcheck3(cv_mem); if (ier == CV_SUCCESS) { /* no root found */ irfnd = 0; if (irfndp == 1 && task == CV_ONE_STEP) { tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); return(CV_SUCCESS); } } if (ier == RTFOUND) { /* a new root was found */ irfnd = 1; tretlast = *tret = tlo; return(CV_ROOT_RETURN); } } } /* end of root stop check */ /* Test for tn past tstop */ if ( istop && ((tstop - tn)*h < ZERO) ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_TSTOP, tn); return (CV_ILL_INPUT); } /* In CV_NORMAL mode, test if tout was reached */ if ( (task == CV_NORMAL) && ((tn-tout)*h >= ZERO) ) { tretlast = *tret = tout; ier = CVodeGetDky(cv_mem, tout, 0, yout); if (ier != CV_SUCCESS) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_TOUT, tout); return (CV_ILL_INPUT); } return (CV_SUCCESS); } /* In CV_ONE_STEP mode, test if tn was returned */ if (task == CV_ONE_STEP && tretlast != tn) { tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); return(CV_SUCCESS); } /* Test for tn at tstop or near tstop */ if ( istop ) { troundoff = FUZZ_FACTOR*uround*(ABS(tn) + ABS(h)); if ( ABS(tn - tstop) <= troundoff) { ier = CVodeGetDky(cv_mem, tstop, 0, yout); if (ier != CV_SUCCESS) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_TSTOP, tn); return (CV_ILL_INPUT); } tretlast = *tret = tstop; tn = tstop; return (CV_TSTOP_RETURN); } if ( (tn + hprime - tstop)*h > ZERO ) { hprime = tstop - tn; eta = hprime/h; } } /* end of istop tests block */ } /* end stopping tests block at nst>0 */ /* Start looping for internal steps */ nstloc = 0; loop { next_h = h; next_q = q; /* Reset and check ewt */ if (nst > 0) { ewtsetOK = CVEwtSet(cv_mem, zn[0]); if (sensi) ewtSsetOK = CVSensEwtSet(cv_mem, znS[0]); else ewtSsetOK = TRUE; if (quadr && errconQ) ewtQsetOK = CVQuadEwtSet(cv_mem, znQ[0]); else ewtQsetOK = TRUE; if ( (!ewtsetOK) || (!ewtSsetOK) || (!ewtQsetOK) ) { if(!ewtsetOK) if(errfp!=NULL) fprintf(errfp, MSGCVS_EWT_NOW_BAD, tn); if(!ewtSsetOK) if(errfp!=NULL) fprintf(errfp, MSGCVS_EWTS_NOW_BAD, tn); if(!ewtQsetOK) if(errfp!=NULL) fprintf(errfp, MSGCVS_EWTQ_NOW_BAD, tn); istate = CV_ILL_INPUT; tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); break; } } /* Check for too many steps */ if (nstloc >= mxstep) { if(errfp!=NULL) fprintf(errfp, MSGCVS_MAX_STEPS, tn); istate = CV_TOO_MUCH_WORK; tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); break; } /* Check for too much accuracy requested */ nrm = N_VWrmsNorm(zn[0], ewt); if (quadr && errconQ) { nrm = CVQuadUpdateNorm(cv_mem, nrm, znQ[0], ewtQ); } if (sensi && errconS) { nrm = CVSensUpdateNorm(cv_mem, nrm, znS[0], ewtS); } tolsf = uround * nrm; if (tolsf > ONE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_TOO_MUCH_ACC, tn); istate = CV_TOO_MUCH_ACC; tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); tolsf *= TWO; break; } else { tolsf = ONE; } /* Check for h below roundoff level in tn */ if (tn + hprime == tn) { nhnil++; if (nhnil <= mxhnil) if(errfp!=NULL) fprintf(errfp, MSGCVS_HNIL, tn, hprime); if (nhnil == mxhnil) if(errfp!=NULL) fprintf(errfp, MSGCVS_HNIL_DONE); } /* Call CVStep to take a step */ kflag = CVStep(cv_mem); /* Process failed step cases, and exit loop */ if (kflag != SUCCESS_STEP) { istate = CVHandleFailure(cv_mem, kflag); tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); break; } nstloc++; /* Check for root in last step taken. */ if (nrtfn > 0) { ier = CVRcheck3(cv_mem); if (ier == RTFOUND) { /* a new root was found */ irfnd = 1; tretlast = *tret = tlo; return(CV_ROOT_RETURN); } } /* Check if tn is at tstop or near tstop */ if ( istop ) { troundoff = FUZZ_FACTOR*uround*(ABS(tn) + ABS(h)); if ( ABS(tn - tstop) <= troundoff) { (void) CVodeGetDky(cv_mem, tstop, 0, yout); tretlast = *tret = tstop; tn = tstop; istate = CV_TSTOP_RETURN; break; } if ( (tn + hprime - tstop)*h > ZERO ) { hprime = tstop - tn; eta = hprime/h; } } /* Check if in one-step mode, and if so copy y and exit loop */ if (task == CV_ONE_STEP) { istate = CV_SUCCESS; tretlast = *tret = tn; N_VScale(ONE, zn[0], yout); next_q = qprime; next_h = hprime; break; } /* Check if tout reached, and if so interpolate and exit loop */ if ((tn-tout)*h >= ZERO) { istate = CV_SUCCESS; tretlast = *tret = tout; (void) CVodeGetDky(cv_mem, tout, 0, yout); next_q = qprime; next_h = hprime; break; } } /* end looping for internal steps */ /* Load optional output */ if (sensi && (ism==CV_STAGGERED1)) { nniS = 0; ncfnS = 0; for (is=0; is q)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_K); return (CV_BAD_K); } /* Allow for some slack */ tfuzz = FUZZ_FACTOR * uround * (ABS(tn) + ABS(hu)); if (hu < ZERO) tfuzz = -tfuzz; tp = tn - hu - tfuzz; tn1 = tn + tfuzz; if ((t-tp)*(t-tn1) > ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_T, t, tn-hu, tn); return (CV_BAD_T); } /* Sum the differentiated interpolating polynomial */ s = (t - tn) / h; for (j=q; j >= k; j--) { c = ONE; for (i=j; i >= j-k+1; i--) c *= i; if (j == q) { N_VScale(c, zn[q], dky); } else { N_VLinearSum(c, zn[j], s, dky, dky); } } if (k == 0) return (CV_SUCCESS); r = RPowerI(h,-k); N_VScale(r, dky, dky); return (CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVodeGetQuad * * This routine extracts quadrature solution into yQout. * This is just a wrapper that calls CvodeGEtQuadDky with k=0 */ int CVodeGetQuad(void *cvode_mem, realtype t, N_Vector yQout) { return (CVodeGetQuadDky(cvode_mem,t,0,yQout)); } /*-----------------------------------------------------------------*/ /* * CVodeGetQuadDky * * CVodeQuadDky computes the kth derivative of the yQ function at * time t, where tn-hu <= t <= tn, tn denotes the current * internal time reached, and hu is the last internal step size * successfully used by the solver. The user may request * k=0, 1, ..., qu, where qu is the current order. * The derivative vector is returned in dky. This vector * must be allocated by the caller. It is only legal to call this * function after a successful return from CVode with quadrature * computation enabled. */ int CVodeGetQuadDky(void *cvode_mem, realtype t, int k, N_Vector dkyQ) { realtype s, c, r; realtype tfuzz, tp, tn1; int i, j; CVodeMem cv_mem; /* Check all inputs for legality */ if (cvode_mem == NULL) { fprintf(stderr, MSGCVS_QDKY_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if(quadr != TRUE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_QDKY_NO_QUAD); return (CV_NO_QUAD); } if (dkyQ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_QBAD_DKY); return (CV_BAD_DKY); } if ((k < 0) || (k > q)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_QBAD_K); return (CV_BAD_K); } /* Allow for some slack */ tfuzz = FUZZ_FACTOR * uround * (ABS(tn) + ABS(hu)); if (hu < ZERO) tfuzz = -tfuzz; tp = tn - hu - tfuzz; tn1 = tn + tfuzz; if ((t-tp)*(t-tn1) > ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_QBAD_T, t, tn-hu, tn); return (CV_BAD_T); } /* Sum the differentiated interpolating polynomial */ s = (t - tn) / h; for (j=q; j >= k; j--) { c = ONE; for (i=j; i >= j-k+1; i--) c *= i; if (j == q) { N_VScale(c, znQ[q], dkyQ); } else { N_VLinearSum(c, znQ[j], s, dkyQ, dkyQ); } } if (k == 0) return (CV_SUCCESS); r = RPowerI(h,-k); N_VScale(r, dkyQ, dkyQ); return (CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVodeGetSens * * This routine extracts sensitivity solution into ySout. * This is just a wrapper that calls CvodeSensDky with k=0 */ int CVodeGetSens(void *cvode_mem, realtype t, N_Vector *ySout) { return (CVodeGetSensDky(cvode_mem,t,0,ySout)); } /*-----------------------------------------------------------------*/ /* * CVodeGetSens1 * * This routine extracts the is-th sensitivity solution into ySout. * This is just a wrapper that calls CvodeSensDky1 with k=0 */ int CVodeGetSens1(void *cvode_mem, realtype t, int is, N_Vector ySout) { return (CVodeGetSensDky1(cvode_mem,t,0,is,ySout)); } /*-----------------------------------------------------------------*/ /* * CVodeGetSensDky * * If the user calls directly CVodeSensDky then s must be allocated * prior to this call. When CVodeSensDky is called by * CVodeGetSens, only ier=CV_SUCCESS, ier=CV_NO_SENS, or * ier=CV_BAD_T are possible. */ int CVodeGetSensDky(void *cvode_mem, realtype t, int k, N_Vector *dkyS) { int ier=CV_SUCCESS; int is; CVodeMem cv_mem; if (cvode_mem == NULL) { fprintf(stderr, MSGCVS_SDKY_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (dkyS == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SBAD_DKYA); return (CV_BAD_DKY); } for (is=0; is q)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SBAD_K); return (CV_BAD_K); } if ((is < 1) || (is > Ns)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SBAD_IS); return (CV_BAD_IS); } is--; /* Allow for some slack */ tfuzz = FUZZ_FACTOR * uround * (ABS(tn) + ABS(hu)); if (hu < ZERO) tfuzz = -tfuzz; tp = tn - hu - tfuzz; tn1 = tn + tfuzz; if ((t-tp)*(t-tn1) > ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SBAD_T); return (CV_BAD_T); } /* Sum the differentiated interpolating polynomial */ s = (t - tn) / h; for (j=q; j >= k; j--) { c = ONE; for (i=j; i >= j-k+1; i--) c *= i; if (j == q) { N_VScale(c, znS[q][is], dkyS); } else { N_VLinearSum(c, znS[j][is], s, dkyS, dkyS); } } if (k == 0) return (CV_SUCCESS); r = RPowerI(h,-k); N_VScale(r, dkyS, dkyS); return (CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVodeFree * * This routine frees the problem memory allocated by CVodeMalloc. * Such memory includes all the vectors allocated by CVAllocVectors, * and the memory lmem for the linear solver (deallocated by a call * to lfree), as well as (if Ns!=0) all memory allocated for * sensitivity computations by CVodeSensMalloc. */ void CVodeFree(void *cvode_mem) { CVodeMem cv_mem; cv_mem = (CVodeMem) cvode_mem; if (cvode_mem == NULL) return; CVFreeVectors(cv_mem); CVodeQuadFree(cv_mem); CVodeSensFree(cv_mem); if (iter == CV_NEWTON && lfree != NULL) lfree(cv_mem); if (nrtfn > 0) { free(glo); free(ghi); free(groot); free(iroots); } free(cv_mem); } /*-----------------------------------------------------------------*/ /* * CVodeQuadFree * * CVodeQuadFree frees the problem memory in cvode_mem allocated * for quadrature integration. Its only argument is the pointer * cvode_mem returned by CVodeCreate. */ void CVodeQuadFree(void *cvode_mem) { CVodeMem cv_mem; if (cvode_mem == NULL) return; cv_mem = (CVodeMem) cvode_mem; if(quadMallocDone) { CVQuadFreeVectors(cv_mem); quadMallocDone = FALSE; quadr = FALSE; } } /*-----------------------------------------------------------------*/ /* * CVodeSensFree * * CVodeSensFree frees the problem memory in cvode_mem allocated * for sensitivity analysis. Its only argument is the pointer * cvode_mem returned by CVodeCreate. */ void CVodeSensFree(void *cvode_mem) { CVodeMem cv_mem; if (cvode_mem == NULL) return; cv_mem = (CVodeMem) cvode_mem; if(sensMallocDone) { if (atolSallocated) { CVSensFreeAtol(cv_mem, abstolS); atolSallocated = FALSE; } if (stgr1alloc) { free(ncfS1); free(ncfnS1); free(nniS1); stgr1alloc = FALSE; } CVSensFreeVectors(cv_mem); sensMallocDone = FALSE; sensi = FALSE; } } /*=================================================================*/ /* PRIVATE FUNCTIONS IMPLEMENTATION */ /*=================================================================*/ /* * CVCheckNvector * This routine checks if all required vector operations are present. * If any of them is missing it returns FALSE. */ static booleantype CVCheckNvector(N_Vector tmpl) { if((tmpl->ops->nvclone == NULL) || (tmpl->ops->nvdestroy == NULL) || (tmpl->ops->nvlinearsum == NULL) || (tmpl->ops->nvconst == NULL) || (tmpl->ops->nvprod == NULL) || (tmpl->ops->nvdiv == NULL) || (tmpl->ops->nvscale == NULL) || (tmpl->ops->nvabs == NULL) || (tmpl->ops->nvinv == NULL) || (tmpl->ops->nvaddconst == NULL) || (tmpl->ops->nvmaxnorm == NULL) || (tmpl->ops->nvwrmsnorm == NULL) || (tmpl->ops->nvmin == NULL)) return(FALSE); else return(TRUE); } /*-----------------------------------------------------------------*/ /* * CVAllocVectors * * This routine allocates the CVODE vectors ewt, acor, tempv, ftemp, and * zn[0], ..., zn[maxord]. The length of the vectors is the input * parameter neq and the maximum order (needed to allocate zn) is the * input parameter maxord. If all memory allocations are successful, * CVAllocVectors returns TRUE. Otherwise all allocated memory is freed * and CVAllocVectors returns FALSE. * This routine also sets the optional outputs lrw and liw, which are * (respectively) the lengths of the real and integer work spaces * allocated here. */ static booleantype CVAllocVectors(CVodeMem cv_mem, N_Vector tmpl) { int i, j; /* Allocate ewt, acor, tempv, ftemp */ ewt = N_VClone(tmpl); if (ewt == NULL) return (FALSE); acor = N_VClone(tmpl); if (acor == NULL) { N_VDestroy(ewt); return (FALSE); } tempv = N_VClone(tmpl); if (tempv == NULL) { N_VDestroy(ewt); N_VDestroy(acor); return (FALSE); } ftemp = N_VClone(tmpl); if (ftemp == NULL) { N_VDestroy(tempv); N_VDestroy(ewt); N_VDestroy(acor); return (FALSE); } /* Allocate zn[0] ... zn[maxord] */ for (j=0; j <= qmax; j++) { zn[j] = N_VClone(tmpl); if (zn[j] == NULL) { N_VDestroy(ewt); N_VDestroy(acor); N_VDestroy(tempv); N_VDestroy(ftemp); for (i=0; i < j; i++) N_VDestroy(zn[i]); return (FALSE); } } /* Set solver workspace lengths */ lrw = (qmax + 5)*lrw1; liw = (qmax + 5)*liw1; return (TRUE); } /*-----------------------------------------------------------------*/ /* * CVFreeVectors * * This routine frees the CVODE vectors allocated in CVAllocVectors. */ static void CVFreeVectors(CVodeMem cv_mem) { int j; N_VDestroy(ewt); N_VDestroy(acor); N_VDestroy(tempv); N_VDestroy(ftemp); for (j=0; j <= qmax; j++) N_VDestroy(zn[j]); } /*-----------------------------------------------------------------*/ /* * CVInitialSetup * * This routine performs input consistency checks at the first step. * If needed, it also checks the linear solver module and calls the * linear solver initialization routine. */ static int CVInitialSetup(CVodeMem cv_mem) { int ier; booleantype ewtsetOK; /* Solver initial setup */ ewtsetOK = CVEwtSet(cv_mem, zn[0]); if (!ewtsetOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_EWT); return(CV_ILL_INPUT); } /* Quadrature initial setup */ if (quadr && errconQ) { if ( (reltolQ == NULL) || (abstolQ == NULL) ) { if(errfp!=NULL) fprintf(errfp, MSGCVS_NO_QUADTOL); return(CV_ILL_INPUT); } /* Load ewtQ */ ewtsetOK = CVQuadEwtSet(cv_mem, znQ[0]); if (!ewtsetOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_EWTQ); return (CV_ILL_INPUT); } } if (!quadr) errconQ = FALSE; /* Forward sensitivity initial setup */ if (sensi) { /* Check if ism and ifS agree */ if ((ism==CV_STAGGERED1) && (ifS==CV_ALLSENS)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ISM_IFS); return (CV_ILL_INPUT); } /* Load ewtS */ ewtsetOK = CVSensEwtSet(cv_mem, znS[0]); if (!ewtsetOK) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_EWTS); return (CV_ILL_INPUT); } } if (!sensi) errconS = FALSE; /* Check if lsolve function exists (if needed) and call linit function (if it exists) */ if (iter == CV_NEWTON) { if (lsolve == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_LSOLVE_NULL); return (CV_ILL_INPUT); } if (linit != NULL) { ier = linit(cv_mem); if (ier != 0) { if(errfp!=NULL) fprintf(errfp, MSGCVS_LINIT_FAIL); return (CV_ILL_INPUT); } } } return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVEwtSet * * This routine is responsible for setting the error weight vector ewt, * according to tol_type, as follows: * * (1) ewt[i] = 1 / (*rtol * ABS(ycur[i]) + *atol), i=0,...,neq-1 * if tol_type = CV_SS * (2) ewt[i] = 1 / (*rtol * ABS(ycur[i]) + atol[i]), i=0,...,neq-1 * if tol_type = CV_SV * * CVEwtSet returns TRUE if ewt is successfully set as above to a * positive vector and FALSE otherwise. In the latter case, ewt is * considered undefined after the FALSE return from CVEwtSet. * * All the real work is done in the routines CVEwtSetSS, CVEwtSetSV. */ static booleantype CVEwtSet(CVodeMem cv_mem, N_Vector ycur) { booleantype flag=TRUE; switch (itol) { case CV_SS: flag = CVEwtSetSS(cv_mem, ycur); break; case CV_SV: flag = CVEwtSetSV(cv_mem, ycur); break; } return(flag); } /*-----------------------------------------------------------------*/ /* * CVEwtSetSS * * This routine sets ewt as decribed above in the case tol_type = CV_SS. * It tests for non-positive components before inverting. CVEwtSetSS * returns TRUE if ewt is successfully set to a positive vector * and FALSE otherwise. In the latter case, ewt is considered * undefined after the FALSE return from CVEwtSetSS. */ static booleantype CVEwtSetSS(CVodeMem cv_mem, N_Vector ycur) { realtype rtoli, atoli; rtoli = *reltol; atoli = *((realtype *)abstol); N_VAbs(ycur, tempv); N_VScale(rtoli, tempv, tempv); N_VAddConst(tempv, atoli, tempv); if (N_VMin(tempv) <= ZERO) return (FALSE); N_VInv(tempv, ewt); return (TRUE); } /*-----------------------------------------------------------------*/ /* * CVEwtSetSV * * This routine sets ewt as decribed above in the case tol_type = CV_SV. * It tests for non-positive components before inverting. CVEwtSetSV * returns TRUE if ewt is successfully set to a positive vector * and FALSE otherwise. In the latter case, ewt is considered * undefined after the FALSE return from CVEwtSetSV. */ static booleantype CVEwtSetSV(CVodeMem cv_mem, N_Vector ycur) { realtype rtoli; rtoli = *reltol; N_VAbs(ycur, tempv); N_VLinearSum(rtoli, tempv, ONE, (N_Vector)abstol, tempv); if (N_VMin(tempv) <= ZERO) return (FALSE); N_VInv(tempv, ewt); return (TRUE); } /* * ----------------------------------------------------------------- * PRIVATE FUNCTIONS FOR QUADRATURES * ----------------------------------------------------------------- */ /* * CVodeQuadAllocVectors * * NOTE: Space for ewtQ is allocated even when errconQ=FALSE, * although in this case, ewtQ is never used. The reason for this * decision is to allow the user to re-initialize the quadrature * computation with errconQ=TRUE, after an initialization with * errconQ=FALSE, without new memory allocation within * CVodeQuadReInit. */ static booleantype CVQuadAllocVectors(CVodeMem cv_mem, N_Vector tmpl) { int i, j; /* Allocate ewtQ */ ewtQ = N_VClone(tmpl); if (ewtQ == NULL) { return (FALSE); } /* Allocate acorQ */ acorQ = N_VClone(tmpl); if (acorQ == NULL) { N_VDestroy(ewtQ); return (FALSE); } /* Allocate yQ */ yQ = N_VClone(tmpl); if (yQ == NULL) { N_VDestroy(ewtQ); N_VDestroy(acorQ); return (FALSE); } /* Allocate tempvQ */ tempvQ = N_VClone(tmpl); if (tempvQ == NULL) { N_VDestroy(ewtQ); N_VDestroy(acorQ); N_VDestroy(yQ); return (FALSE); } /* Allocate zQn[0] ... zQn[maxord] */ for (j=0; j <= qmax; j++) { znQ[j] = N_VClone(tmpl); if (znQ[j] == NULL) { N_VDestroy(ewtQ); N_VDestroy(acorQ); N_VDestroy(yQ); N_VDestroy(tempvQ); for (i=0; i < j; i++) N_VDestroy(znQ[i]); return (FALSE); } } /* Update solver workspace lengths */ lrw += (qmax + 5)*lrw1Q; liw += (qmax + 5)*liw1Q; return(TRUE); } /*-----------------------------------------------------------------*/ static booleantype CVQuadEwtSet(CVodeMem cv_mem, N_Vector qcur) { booleantype flag=TRUE; switch (itolQ) { case CV_SS: flag = CVQuadEwtSetSS(cv_mem, qcur); break; case CV_SV: flag = CVQuadEwtSetSV(cv_mem, qcur); break; } return(flag); } /*-----------------------------------------------------------------*/ static booleantype CVQuadEwtSetSS(CVodeMem cv_mem, N_Vector qcur) { realtype rtoli, atoli; rtoli = *reltolQ; atoli = *((realtype *)abstolQ); N_VAbs(qcur, tempvQ); N_VScale(rtoli, tempvQ, tempvQ); N_VAddConst(tempvQ, atoli, tempvQ); if (N_VMin(tempvQ) <= ZERO) return (FALSE); N_VInv(tempvQ, ewtQ); return (TRUE); } /*-----------------------------------------------------------------*/ static booleantype CVQuadEwtSetSV(CVodeMem cv_mem, N_Vector qcur) { realtype rtoli; rtoli = *reltolQ; N_VAbs(qcur, tempvQ); N_VLinearSum(rtoli, tempvQ, ONE, (N_Vector)abstolQ, tempvQ); if (N_VMin(tempvQ) <= ZERO) return (FALSE); N_VInv(tempvQ, ewtQ); return (TRUE); } /*-----------------------------------------------------------------*/ static void CVQuadFreeVectors(CVodeMem cv_mem) { int j; N_VDestroy(ewtQ); N_VDestroy(acorQ); N_VDestroy(yQ); N_VDestroy(tempvQ); for (j=0; j<=qmax; j++) N_VDestroy(znQ[j]); } /* * ----------------------------------------------------------------- * PRIVATE FUNCTIONS FOR SENSITIVITY ANALYSIS * ----------------------------------------------------------------- */ static int CVSensTestTolerances(CVodeMem cv_mem) { int is; booleantype neg_abstol; realtype *atolSS; N_Vector *atolSV; neg_abstol = FALSE; if (*reltolS ZERO) ? 1 : -1; tdist = ABS(tdiff); tround = uround * MAX(ABS(tn), ABS(tout)); if (tdist < TWO*tround) return (FALSE); /* Set lower and upper bounds on h0, and take geometric mean Exit with this value if the bounds cross each other */ hlb = HLB_FACTOR * tround; hub = CVUpperBoundH0(cv_mem, tdist); hg = RSqrt(hlb*hub); if (hub < hlb) { if (sign == -1) hg = -hg; h = hg; return (TRUE); } /* Loop up to MAX_ITERS times to find h0. Stop if new and previous values differ by a factor < 2. Stop if hnew/hg > 2 after one iteration, as this probably means that the ydd value is bad because of cancellation error. */ count = 0; loop { hgs = hg*sign; yddnrm = CVYddNorm(cv_mem, hgs); hnew = (yddnrm*hub*hub > TWO) ? RSqrt(TWO/yddnrm) : RSqrt(hg*hub); count++; if (count >= MAX_ITERS) break; hrat = hnew/hg; if ((hrat > HALF) && (hrat < TWO)) break; if ((count >= 2) && (hrat > TWO)) { hnew = hg; break; } hg = hnew; } /* Apply bounds, bias factor, and attach sign */ h0 = H_BIAS*hnew; if (h0 < hlb) h0 = hlb; if (h0 > hub) h0 = hub; if (sign == -1) h0 = -h0; h = h0; return (TRUE); } /*-----------------------------------------------------------------*/ /* * CVUpperBoundH0 * * This routine sets an upper bound on abs(h0) based on * tdist = tn - t0 and the values of y[i]/y'[i]. */ static realtype CVUpperBoundH0(CVodeMem cv_mem, realtype tdist) { booleantype vectorAtol, vectorAtolQ, vectorAtolS; realtype atoli, hub_inv, hub; N_Vector temp1, temp2; realtype hubQ_inv; N_Vector tempQ1, tempQ2; realtype *atolSS=NULL, hubS_inv; N_Vector *atolSV=NULL; int is; vectorAtol = (itol == CV_SV); temp1 = tempv; temp2 = acor; N_VAbs(zn[0], temp1); N_VAbs(zn[1], temp2); if (vectorAtol) { N_VLinearSum(HUB_FACTOR, temp1, ONE, (N_Vector)abstol, temp1); } else { atoli = *((realtype *) abstol); N_VScale(HUB_FACTOR, temp1, temp1); N_VAddConst(temp1, atoli, temp1); } N_VDiv(temp2, temp1, temp1); hub_inv = N_VMaxNorm(temp1); if (quadr && errconQ) { vectorAtolQ = (itolQ == CV_SV); tempQ1 = tempvQ; tempQ2 = acorQ; N_VAbs(znQ[0], tempQ1); N_VAbs(znQ[1], tempQ2); if (vectorAtolQ) { N_VLinearSum(HUB_FACTOR, tempQ1, ONE, (N_Vector)abstolQ, tempQ1); } else { atoli = *((realtype *) abstolQ); N_VScale(HUB_FACTOR, tempQ1, tempQ1); N_VAddConst(tempQ1, atoli, tempQ1); } N_VDiv(tempQ2, tempQ1, tempQ1); hubQ_inv = N_VMaxNorm(tempQ1); if (hubQ_inv > hub_inv) hub_inv = hubQ_inv; } if (sensi && errconS) { vectorAtolS = (itolS == CV_SV); if (vectorAtolS) atolSV = (N_Vector *)abstolS; else atolSS = (realtype *)abstolS; for (is=0; is hub_inv) hub_inv = hubS_inv; } } hub = HUB_FACTOR*tdist; if (hub*hub_inv > ONE) hub = ONE/hub_inv; return (hub); } /*-----------------------------------------------------------------*/ /* * CVYddNorm * * This routine computes an estimate of the second derivative of y * using a difference quotient, and returns its WRMS norm. */ static realtype CVYddNorm(CVodeMem cv_mem, realtype hg) { realtype yddnrm; int is; N_Vector wrk1, wrk2; /* y <- h*y'(t) + y(t) */ N_VLinearSum(hg, zn[1], ONE, zn[0], y); if (sensi && errconS) for (is=0; is 0) && (hprime != h)) CVAdjustParams(cv_mem); /* Looping point for attempts to take a step */ loop { CVPredict(cv_mem); CVSet(cv_mem); nflag = CVNls(cv_mem, nflag); kflag = CVHandleNFlag(cv_mem, &nflag, saved_t, &ncf, &ncfn); /* Go back in loop if we need to predict again */ if (kflag == PREDICT_AGAIN) continue; /* Return if nonlinear solve failed and recovery not possible. */ if (kflag != DO_ERROR_TEST) return (kflag); passed = CVDoErrorTest(cv_mem, &nflag, &kflag, saved_t, &nef, &dsm); /* Return if error test failed and recovery not possible. */ if ((!passed) && (kflag == REP_ERR_FAIL)) return (kflag); /* Retry step if error test failed, nflag == PREV_ERR_FAIL */ if (!passed) continue; /* passed = TRUE, kflag = DO_ERROR_TEST, nflag = SOLVED */ /* Correct the quadrature variables */ if (quadr) { /* Save quadrature correction in acorQ */ fQ(tn, y, acorQ, fQ_data); N_VLinearSum(h, acorQ, -ONE, znQ[1], acorQ); N_VScale(rl1, acorQ, acorQ); /* Apply correction to quadrature variables */ N_VLinearSum(ONE, znQ[0], ONE, acorQ, yQ); /* Error test on quadratures */ if (errconQ) { acnrmQ = N_VWrmsNorm(acorQ, ewtQ); passed = CVQuadDoErrorTest(cv_mem, &nflag, &kflag, saved_t, &nefQ, &dsmQ); if ((!passed) && (kflag == REP_ERR_FAIL)) return (kflag); if (!passed) continue; /* update 'dsm' with 'dsmQ' (to be used in CVPrepareNextStep) */ dsm = CVQuadUpdateDsm(cv_mem, dsm, dsmQ); } } /* CV_STAGGERED approach for sensitivities */ if (do_sensi_stg) { /* Reset counters for states */ ncf = nef = 0; /* Evaluate f at converged y */ f(tn, y, ftemp, f_data); nfe++; /* Nonlinear solve for sensitivities (all-at-once) */ nflag = CVStgrNls(cv_mem); kflag = CVHandleNFlag(cv_mem, &nflag, saved_t, &ncfS, &ncfnS); if (kflag == PREDICT_AGAIN) continue; if (kflag != DO_ERROR_TEST) return (kflag); /* Error test on sensitivities */ if (errconS) { passed = CVStgrDoErrorTest(cv_mem,&nflag,&kflag,saved_t,&nefS,&dsmS); if ((!passed) && (kflag == REP_ERR_FAIL)) return (kflag); if (!passed) continue; /* update 'dsm' with 'dsmS' (to be used in CVPrepareNextStep) */ dsm = CVStgrUpdateDsm(cv_mem, dsm, dsmS); } } /* CV_STAGGERED1 approach for sensitivities */ if (do_sensi_stg1) { /* Reset counters for states */ ncf = nef = 0; /* Evaluate f at converged y */ f(tn, y, ftemp, f_data); nfe++; /* Nonlinear solve for sensitivities (one-by-one) */ for (is=0; is xi_0 = 0 */ for (i=0; i <= qmax; i++) l[i] = ZERO; l[1] = ONE; hsum = ZERO; for (j=1; j <= q-2; j++) { hsum += tau[j]; xi = hsum / hscale; for (i=j+1; i >= 1; i--) l[i] = l[i]*xi + l[i-1]; } for (j=1; j <= q-2; j++) l[j+1] = q * (l[j] / (j+1)); for (j=2; j < q; j++) N_VLinearSum(-l[j], zn[q], ONE, zn[j], zn[j]); if (quadr) for (j=2; j < q; j++) N_VLinearSum(-l[j], znQ[q], ONE, znQ[j], znQ[j]); if (sensi) for (is=0; is 1) { for (j=1; j < q; j++) { hsum += tau[j+1]; xi = hsum / hscale; prod *= xi; alpha0 -= ONE / (j+1); alpha1 += ONE / xi; for (i=j+2; i >= 2; i--) l[i] = l[i]*xiold + l[i-1]; xiold = xi; } } A1 = (-alpha0 - alpha1) / prod; /* zn[qmax] contains the value Delta_n = y_n - y_n(0) This value was stored there at the previous successful step (in CVCompleteStep) A1 contains dbar = (1/xi* - 1/xi_q)/prod(xi_j) */ N_VScale(A1, zn[qmax], zn[L]); for (j=2; j <= q; j++) N_VLinearSum(l[j], zn[L], ONE, zn[j], zn[j]); if (quadr) { N_VScale(A1, znQ[qmax], znQ[L]); for (j=2; j <= q; j++) N_VLinearSum(l[j], znQ[L], ONE, znQ[j], znQ[j]); } if (sensi) { for (is=0; is= 2; i--) l[i] = l[i]*xi + l[i-1]; } for (j=2; j < q; j++) N_VLinearSum(-l[j], zn[q], ONE, zn[j], zn[j]); if (quadr) { for (j=2; j < q; j++) N_VLinearSum(-l[j], znQ[q], ONE, znQ[j], znQ[j]); } if (sensi) { for (is=0; is= k; j--) N_VLinearSum(ONE, zn[j-1], ONE, zn[j], zn[j-1]); if (quadr) { for (k = 1; k <= q; k++) for (j = q; j >= k; j--) N_VLinearSum(ONE, znQ[j-1], ONE, znQ[j], znQ[j-1]); } if (sensi) { for (is=0; is= k; j--) N_VLinearSum(ONE, znS[j-1][is], ONE, znS[j][is], znS[j-1][is]); } } } /*-----------------------------------------------------------------*/ /* * CVSet * * This routine is a high level routine which calls CVSetAdams or * CVSetBDF to set the polynomial l, the test quantity array tq, * and the related variables rl1, gamma, and gamrat. */ static void CVSet(CVodeMem cv_mem) { switch(lmm) { case CV_ADAMS: CVSetAdams(cv_mem); break; case CV_BDF: CVSetBDF(cv_mem); break; } rl1 = ONE / l[1]; gamma = h * rl1; if (nst == 0) gammap = gamma; gamrat = (nst > 0) ? gamma / gammap : ONE; /* protect x / x != 1.0 */ } /*-----------------------------------------------------------------*/ /* * CVSetAdams * * This routine handles the computation of l and tq for the * case lmm == CV_ADAMS. * * The components of the array l are the coefficients of a * polynomial Lambda(x) = l_0 + l_1 x + ... + l_q x^q, given by * q-1 * (d/dx) Lambda(x) = c * PRODUCT (1 + x / xi_i) , where * i=1 * Lambda(-1) = 0, Lambda(0) = 1, and c is a normalization factor. * Here xi_i = [t_n - t_(n-i)] / h. * * The array tq is set to test quantities used in the convergence * test, the error test, and the selection of h at a new order. */ static void CVSetAdams(CVodeMem cv_mem) { realtype m[L_MAX], M[3], hsum; if (q == 1) { l[0] = l[1] = tq[1] = tq[5] = ONE; tq[2] = TWO; tq[3] = TWELVE; tq[4] = nlscoef * tq[2]; /* = 0.1 * tq[2] */ return; } hsum = CVAdamsStart(cv_mem, m); M[0] = CVAltSum(q-1, m, 1); M[1] = CVAltSum(q-1, m, 2); CVAdamsFinish(cv_mem, m, M, hsum); } /*-----------------------------------------------------------------*/ /* * CVAdamsStart * * This routine generates in m[] the coefficients of the product * polynomial needed for the Adams l and tq coefficients for q > 1. */ static realtype CVAdamsStart(CVodeMem cv_mem, realtype m[]) { realtype hsum, xi_inv, sum; int i, j; hsum = h; m[0] = ONE; for (i=1; i <= q; i++) m[i] = ZERO; for (j=1; j < q; j++) { if ((j==q-1) && (qwait == 1)) { sum = CVAltSum(q-2, m, 2); tq[1] = m[q-2] / (q * sum); } xi_inv = h / hsum; for (i=j; i >= 1; i--) m[i] += m[i-1] * xi_inv; hsum += tau[j]; /* The m[i] are coefficients of product(1 to j) (1 + x/xi_i) */ } return (hsum); } /*-----------------------------------------------------------------*/ /* * CVAdamsFinish * * This routine completes the calculation of the Adams l and tq. */ static void CVAdamsFinish(CVodeMem cv_mem, realtype m[], realtype M[], realtype hsum) { int i; realtype M0_inv, xi, xi_inv; M0_inv = ONE / M[0]; l[0] = ONE; for (i=1; i <= q; i++) l[i] = M0_inv * (m[i-1] / i); xi = hsum / h; xi_inv = ONE / xi; tq[2] = xi * M[0] / M[1]; tq[5] = xi / l[q]; if (qwait == 1) { for (i=q; i >= 1; i--) m[i] += m[i-1] * xi_inv; M[2] = CVAltSum(q, m, 2); tq[3] = L * M[0] / M[2]; } tq[4] = nlscoef * tq[2]; } /*-----------------------------------------------------------------*/ /* * CVAltSum * * CVAltSum returns the value of the alternating sum * sum (i= 0 ... iend) [ (-1)^i * (a[i] / (i + k)) ]. * If iend < 0 then CVAltSum returns 0. * This operation is needed to compute the integral, from -1 to 0, * of a polynomial x^(k-1) M(x) given the coefficients of M(x). */ static realtype CVAltSum(int iend, realtype a[], int k) { int i, sign; realtype sum; if (iend < 0) return (ZERO); sum = ZERO; sign = 1; for (i=0; i <= iend; i++) { sum += sign * (a[i] / (i+k)); sign = -sign; } return (sum); } /*-----------------------------------------------------------------*/ /* * CVSetBDF * * This routine computes the coefficients l and tq in the case * lmm == CV_BDF. CVSetBDF calls CVSetTqBDF to set the test * quantity array tq. * * The components of the array l are the coefficients of a * polynomial Lambda(x) = l_0 + l_1 x + ... + l_q x^q, given by * q-1 * Lambda(x) = (1 + x / xi*_q) * PRODUCT (1 + x / xi_i) , where * i=1 * xi_i = [t_n - t_(n-i)] / h. * * The array tq is set to test quantities used in the convergence * test, the error test, and the selection of h at a new order. */ static void CVSetBDF(CVodeMem cv_mem) { realtype alpha0, alpha0_hat, xi_inv, xistar_inv, hsum; int i,j; l[0] = l[1] = xi_inv = xistar_inv = ONE; for (i=2; i <= q; i++) l[i] = ZERO; alpha0 = alpha0_hat = -ONE; hsum = h; if (q > 1) { for (j=2; j < q; j++) { hsum += tau[j-1]; xi_inv = h / hsum; alpha0 -= ONE / j; for (i=j; i >= 1; i--) l[i] += l[i-1]*xi_inv; /* The l[i] are coefficients of product(1 to j) (1 + x/xi_i) */ } /* j = q */ alpha0 -= ONE / q; xistar_inv = -l[1] - alpha0; hsum += tau[q-1]; xi_inv = h / hsum; alpha0_hat = -l[1] - xi_inv; for (i=q; i >= 1; i--) l[i] += l[i-1]*xistar_inv; } CVSetTqBDF(cv_mem, hsum, alpha0, alpha0_hat, xi_inv, xistar_inv); } /*-----------------------------------------------------------------*/ /* * CVSetTqBDF * * This routine sets the test quantity array tq in the case * lmm == CV_BDF. */ static void CVSetTqBDF(CVodeMem cv_mem, realtype hsum, realtype alpha0, realtype alpha0_hat, realtype xi_inv, realtype xistar_inv) { realtype A1, A2, A3, A4, A5, A6; realtype C, CPrime, CPrimePrime; A1 = ONE - alpha0_hat + alpha0; A2 = ONE + q * A1; tq[2] = ABS(alpha0 * (A2 / A1)); tq[5] = ABS((A2) / (l[q] * xi_inv/xistar_inv)); if (qwait == 1) { C = xistar_inv / l[q]; A3 = alpha0 + ONE / q; A4 = alpha0_hat + xi_inv; CPrime = A3 / (ONE - A4 + A3); tq[1] = ABS(CPrime / C); hsum += tau[q]; xi_inv = h / hsum; A5 = alpha0 - (ONE / (q+1)); A6 = alpha0_hat - xi_inv; CPrimePrime = A2 / (ONE - A6 + A5); tq[3] = ABS(CPrimePrime * xi_inv * (q+2) * A5); } tq[4] = nlscoef * tq[2]; } /*-----------------------------------------------------------------*/ /* * CVnls * * This routine attempts to solve the nonlinear system associated * with a single implicit step of the linear multistep method. * Depending on iter, it calls CVNlsFunctional or CVNlsNewton * to do the work. */ static int CVNls(CVodeMem cv_mem, int nflag) { int flag=SOLVED; switch(iter) { case CV_FUNCTIONAL: flag = CVNlsFunctional(cv_mem); break; case CV_NEWTON: flag = CVNlsNewton(cv_mem, nflag); break; } return(flag); } /*-----------------------------------------------------------------*/ /* * CVNlsFunctional * * This routine attempts to solve the nonlinear system using * functional iteration (no matrices involved). * * This routine also handles the functional iteration of the * combined system (states + sensitivities) when sensitivities are * computed using the CV_SIMULTANEOUS approach. */ static int CVNlsFunctional(CVodeMem cv_mem) { int m; realtype del, delS=0.0, Del, Delp=0.0, dcon; int is; booleantype do_sensi_sim; N_Vector wrk1, wrk2; /* Are we computing sensitivities with the CV_SIMULTANEOUS approach? */ do_sensi_sim = (sensi && (ism==CV_SIMULTANEOUS)); /* Initialize counter and evaluate f at predicted y */ crate = ONE; m = 0; f(tn, zn[0], tempv, f_data); nfe++; if (do_sensi_sim) { wrk1 = ftemp; wrk2 = ftempS[0]; CVSensRhs(cv_mem, tn, zn[0], tempv, znS[0], tempvS, wrk1, wrk2); } /* Initialize correction to zero */ N_VConst(ZERO, acor); if (do_sensi_sim) { for (is=0; is 0, an estimate of the convergence rate constant is stored in crate, and used in the test. Recall that, even when errconS=FALSE, all variables are used in the convergence test. Hence, we use Del (and not del). However, acnrm is used in the error test and thus it has different forms depending on errconS (and this explains why we have to carry around del and delS) */ Del = (do_sensi_sim) ? delS : del; if (m > 0) crate = MAX(CRDOWN * crate, Del / Delp); dcon = Del * MIN(ONE, crate) / tq[4]; if (dcon <= ONE) { if (m == 0) if (do_sensi_sim && errconS) acnrm = delS; else acnrm = del; else { acnrm = N_VWrmsNorm(acor, ewt); if (do_sensi_sim && errconS) acnrm = CVSensUpdateNorm(cv_mem, acnrm, acorS, ewtS); } return (SOLVED); /* Convergence achieved */ } /* Stop at maxcor iterations or if iter. seems to be diverging */ m++; if ((m==maxcor) || ((m >= 2) && (Del > RDIV * Delp))) return (CONV_FAIL); /* Save norm of correction, evaluate f, and loop again */ Delp = Del; f(tn, y, tempv, f_data); nfe++; if (do_sensi_sim) { wrk1 = ftemp; wrk2 = ftempS[0]; CVSensRhs(cv_mem, tn, y, tempv, yS, tempvS, wrk1, wrk2); } } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVNlsNewton * * This routine handles the Newton iteration. It calls lsetup if * indicated, calls CVNewtonIteration to perform the iteration, and * retries a failed attempt at Newton iteration if that is indicated. * See return values at top of this file. * * This routine also handles the Newton iteration of the combined * system when sensitivities are computed using the CV_SIMULTANEOUS * approach. Since in that case we use a quasi-Newton on the * combined system (by approximating the Jacobian matrix by its * block diagonal) and thus only solve linear systems with * multiple right hand sides (all sharing the same coefficient * matrix - whatever iteration matrix we decide on) we set-up * the linear solver to handle N equations at a time. */ static int CVNlsNewton(CVodeMem cv_mem, int nflag) { N_Vector vtemp1, vtemp2, vtemp3, wrk1, wrk2; int convfail, ier; booleantype callSetup, do_sensi_sim; int is; /* Are we computing sensitivities with the CV_SIMULTANEOUS approach? */ do_sensi_sim = (sensi && (ism==CV_SIMULTANEOUS)); vtemp1 = acor; /* rename acor as vtemp1 for readability */ vtemp2 = y; /* rename y as vtemp2 for readability */ vtemp3 = tempv; /* rename tempv as vtemp3 for readability */ /* Set flag convfail, input to lsetup for its evaluation decision */ convfail = ((nflag == FIRST_CALL) || (nflag == PREV_ERR_FAIL)) ? CV_NO_FAILURES : CV_FAIL_OTHER; /* Decide whether or not to call setup routine (if one exists) */ if (setupNonNull) { callSetup = (nflag == PREV_CONV_FAIL) || (nflag == PREV_ERR_FAIL) || (nst == 0) || (nst >= nstlp + MSBP) || (ABS(gamrat-ONE) > DGMAX); /* Decide whether to force a call to setup */ if (forceSetup) { callSetup = TRUE; convfail = CV_FAIL_OTHER; } } else { crate = ONE; crateS = ONE; /* if NO lsetup all conv. rates are set to ONE */ callSetup = FALSE; } /* Looping point for the solution of the nonlinear system. Evaluate f at the predicted y, call lsetup if indicated, and call CVNewtonIteration for the Newton iteration itself. */ loop { f(tn, zn[0], ftemp, f_data); nfe++; if (do_sensi_sim) { wrk1 = tempv; wrk2 = tempvS[0]; CVSensRhs(cv_mem, tn, zn[0], ftemp, znS[0], ftempS, wrk1, wrk2); } if (callSetup) { ier = lsetup(cv_mem, convfail, zn[0], ftemp, &jcur, vtemp1, vtemp2, vtemp3); nsetups++; callSetup = FALSE; forceSetup = FALSE; gamrat = ONE; gammap = gamma; crate = ONE; crateS = ONE; /* after lsetup all conv. rates are reset to ONE */ nstlp = nst; /* Return if lsetup failed */ if (ier < 0) return (SETUP_FAIL_UNREC); if (ier > 0) return (CONV_FAIL); } /* Set acor to zero and load prediction into y vector */ N_VConst(ZERO, acor); N_VScale(ONE, zn[0], y); if (do_sensi_sim) for (is=0; is 0) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } /* Solve the sensitivity linear systems and do the same tests on the return value of lsolve. */ if (do_sensi_sim) { for (is=0; is 0) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } } } /* Get WRMS norm of correction; add correction to acor and y */ del = N_VWrmsNorm(b, ewt); N_VLinearSum(ONE, acor, ONE, b, acor); N_VLinearSum(ONE, zn[0], ONE, acor, y); if (do_sensi_sim) { delS = CVSensUpdateNorm(cv_mem, del, bS, ewtS); for (is=0; is 0, an estimate of the convergence rate constant is stored in crate, and used in the test. */ Del = (do_sensi_sim) ? delS : del; if (m > 0) crate = MAX(CRDOWN * crate, Del/Delp); dcon = Del * MIN(ONE, crate) / tq[4]; if (dcon <= ONE) { if (m == 0) if (do_sensi_sim && errconS) acnrm = delS; else acnrm = del; else { acnrm = N_VWrmsNorm(acor, ewt); if (do_sensi_sim && errconS) acnrm = CVSensUpdateNorm(cv_mem, acnrm, acorS, ewtS); } jcur = FALSE; return (SOLVED); /* Convergence achieved */ } mnewt = ++m; /* Stop at maxcor iterations or if iter. seems to be diverging. If still not converged and Jacobian data is not current, signal to try the solution again */ if ((m == maxcor) || ((m >= 2) && (Del > RDIV * Delp))) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } /* Save norm of correction, evaluate f, and loop again */ Delp = Del; f(tn, y, ftemp, f_data); nfe++; if (do_sensi_sim) { wrk1 = tempv; wrk2 = tempvS[0]; CVSensRhs(cv_mem, tn, y, ftemp, yS, ftempS, wrk1, wrk2); } } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVHandleFlag * * This routine takes action on the return value nflag = *nflagPtr * returned by CVNls, as follows: * * If CVNls succeeded in solving the nonlinear system, then * CVHandleNFlag returns the constant DO_ERROR_TEST, which tells CVStep * to perform the error test. * * If the nonlinear system was not solved successfully, then ncfn and * ncf = *ncfPtr are incremented and Nordsieck array zn is restored. * * If the solution of the nonlinear system failed due to an * unrecoverable failure by setup, we return the value SETUP_FAILED. * * If it failed due to an unrecoverable failure in solve, then we return * the value SOLVE_FAILED. * * Otherwise, a recoverable failure occurred when solving the * nonlinear system (CVNls returned nflag == CONV_FAIL). * In this case, we return the value REP_CONV_FAIL if ncf is now * equal to maxncf or |h| = hmin. * If not, we set *nflagPtr = PREV_CONV_FAIL and return the value * PREDICT_AGAIN, telling CVStep to reattempt the step. */ static int CVHandleNFlag(CVodeMem cv_mem, int *nflagPtr, realtype saved_t, int *ncfPtr, long int *ncfnPtr) { int nflag; nflag = *nflagPtr; if (nflag == SOLVED) return (DO_ERROR_TEST); /* The nonlinear soln. failed; increment ncfn and restore zn */ (*ncfnPtr)++; CVRestore(cv_mem, saved_t); /* Return if lsetup or lsolve failed unrecoverably */ if (nflag == SETUP_FAIL_UNREC) return (SETUP_FAILED); if (nflag == SOLVE_FAIL_UNREC) return (SOLVE_FAILED); /* At this point, nflag == CONV_FAIL; increment ncf */ (*ncfPtr)++; etamax = ONE; /* If we had maxncf failures or |h| = hmin, return REP_CONV_FAIL */ if ((ABS(h) <= hmin*ONEPSM) || (*ncfPtr == maxncf)) return (REP_CONV_FAIL); /* Reduce step size; return to reattempt the step */ eta = MAX(ETACF, hmin / ABS(h)); *nflagPtr = PREV_CONV_FAIL; CVRescale(cv_mem); return (PREDICT_AGAIN); } /*-----------------------------------------------------------------*/ /* * CVRestore * * This routine restores the value of tn to saved_t and undoes the * prediction. After execution of CVRestore, the Nordsieck array zn has * the same values as before the call to CVPredict. */ static void CVRestore(CVodeMem cv_mem, realtype saved_t) { int j, k; int is; tn = saved_t; for (k = 1; k <= q; k++) for (j = q; j >= k; j--) N_VLinearSum(ONE, zn[j-1], -ONE, zn[j], zn[j-1]); if (quadr) { for (k = 1; k <= q; k++) for (j = q; j >= k; j--) N_VLinearSum(ONE, znQ[j-1], -ONE, znQ[j], znQ[j-1]); } if (sensi) { for (is=0; is= k; j--) N_VLinearSum(ONE, znS[j-1][is], -ONE, znS[j][is], znS[j-1][is]); } } } /*-----------------------------------------------------------------*/ /* * CVDoErrorTest * * This routine performs the local error test. * The weighted local error norm dsm is loaded into *dsmPtr, and * the test dsm ?<= 1 is made. * * If the test passes, CVDoErrorTest returns TRUE. * * If the test fails, we undo the step just taken (call CVRestore), * set *nflagPtr to PREV_ERR_FAIL, and return FALSE. * * If maxnef error test failures have occurred or if ABS(h) = hmin, * we set *kflagPtr = REP_ERR_FAIL. (Otherwise *kflagPtr has the * value last returned by CVHandleNFlag.) * * If more than MXNEF1 error test failures have occurred, an order * reduction is forced. If already at order 1 restart by reloading * zn from scratch. Note that if sensitivities are computed, znS is * also reloaded, no matter what 'ism' or 'errconS' are. Same for * quadratures. */ static booleantype CVDoErrorTest(CVodeMem cv_mem, int *nflagPtr, int *kflagPtr, realtype saved_t, int *nefPtr, realtype *dsmPtr) { realtype dsm; int is; N_Vector wrk1, wrk2; dsm = acnrm / tq[2]; /* If est. local error norm dsm passes test, return TRUE */ *dsmPtr = dsm; if (dsm <= ONE) return (TRUE); /* Test failed; increment counters, set nflag, and restore zn array */ (*nefPtr)++; netf++; *nflagPtr = PREV_ERR_FAIL; CVRestore(cv_mem, saved_t); /* At maxnef failures or |h| = hmin, return with kflag = REP_ERR_FAIL */ if ((ABS(h) <= hmin*ONEPSM) || (*nefPtr == maxnef)) { *kflagPtr = REP_ERR_FAIL; return (FALSE); } /* Set etamax = 1 to prevent step size increase at end of this step */ etamax = ONE; /* Set h ratio eta from dsm, rescale, and return for retry of step */ if (*nefPtr <= MXNEF1) { eta = ONE / (RPowerR(BIAS2*dsm,ONE/L) + ADDON); eta = MAX(ETAMIN, MAX(eta, hmin / ABS(h))); if (*nefPtr >= SMALL_NEF) eta = MIN(eta, ETAMXF); CVRescale(cv_mem); return (FALSE); } /* After MXNEF1 failures, force an order reduction and retry step */ if (q > 1) { eta = MAX(ETAMIN, hmin / ABS(h)); CVAdjustOrder(cv_mem,-1); L = q; q--; qwait = L; CVRescale(cv_mem); return (FALSE); } /* If already at order 1, restart: reload zn from scratch */ eta = MAX(ETAMIN, hmin / ABS(h)); h *= eta; hscale = h; qwait = LONG_WAIT; nscon = 0; f(tn, zn[0], tempv, f_data); nfe++; N_VScale(h, tempv, zn[1]); if (quadr) { fQ(tn, zn[0], tempvQ, fQ_data); nfQe++; N_VScale(h, tempvQ, znQ[1]); } if (sensi) { wrk1 = ftemp; wrk2 = ftempS[0]; CVSensRhs(cv_mem, tn, zn[0], tempv, znS[0], tempvS, wrk1, wrk2); for (is=0; is= SMALL_NEF) eta = MIN(eta, ETAMXF); CVRescale(cv_mem); return (FALSE); } /* After MXNEF1 failures, force an order reduction and retry step */ if (q > 1) { eta = MAX(ETAMIN, hmin / ABS(h)); CVAdjustOrder(cv_mem,-1); L = q; q--; qwait = L; CVRescale(cv_mem); return (FALSE); } /* If already at order 1, restart: reload zn and znQ from scratch */ eta = MAX(ETAMIN, hmin / ABS(h)); h *= eta; hscale = h; qwait = LONG_WAIT; nscon = 0; f(tn, zn[0], tempv, f_data); nfe++; N_VScale(h, tempv, zn[1]); fQ(tn, zn[0], tempvQ, fQ_data); nfQe++; N_VScale(h, tempvQ, znQ[1]); if (sensi) { wrk1 = ftemp; wrk2 = ftempS[0]; CVSensRhs(cv_mem, tn, zn[0], tempv, znS[0], tempvS, wrk1, wrk2); for (is=0; is 0, an estimate of the convergence rate constant is stored in crateS, and used in the test. acnrmS contains the norm of the corrections (yS_n-yS_n(0)) and will be used in the error test (if errconS==TRUE) */ if (m > 0) crateS = MAX(CRDOWN * crateS, Del / Delp); dcon = Del * MIN(ONE, crateS) / tq[4]; if (dcon <= ONE) { if (errconS) acnrmS = (m==0)? Del : CVSensNorm(cv_mem, acorS, ewtS); return (SOLVED); /* Convergence achieved */ } /* Stop at maxcor iterations or if iter. seems to be diverging */ m++; if ((m==maxcorS) || ((m >= 2) && (Del > RDIV * Delp))) return (CONV_FAIL); /* Save norm of correction, evaluate f, and loop again */ Delp = Del; wrk1 = tempv; wrk2 = ftempS[0]; CVSensRhs(cv_mem, tn, y, ftemp, yS, tempvS, wrk1, wrk2); } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVStgrNlsNewton * * This routine attempts to solve the sensitivity linear systems using * Newton iteration. It calls CVStgrNlsNewton to perform the actual * iteration. If the Newton iteration fails with out-of-date Jacobian * data (ier=TRY_AGAIN), it calls lsetup and retries the Newton iteration. * This second try is unlikely to happen when using a Krylov linear solver. * * Possible return values: * SOLVED * CONV_FAIL * SOLVE_FAIL_UNREC * SETUP_FAIL_UNREC */ static int CVStgrNlsNewton(CVodeMem cv_mem) { int is; int convfail, ier; booleantype callSetup; N_Vector vtemp1, vtemp2, vtemp3, wrk1, wrk2; callSetup = FALSE; loop { /* Set acorS to zero and load prediction into yS vector */ for (is=0; is 0) return (CONV_FAIL); } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVstgrNewtonIteration * * This routine performs the Newton iteration for all sensitivities. * If the iteration succeeds, it returns the value SOLVED. * If not, it may signal the CVStgrNlsNewton routine to call lsetup and * reattempt the iteration, by returning the value TRY_AGAIN. (In this case, * CVStgrNlsNewton must set convfail to CV_FAIL_BAD_J before calling setup again). * Otherwise, this routine returns one of the appropriate values * SOLVE_FAIL_UNREC or CONV_FAIL back to CVStgrNlsNewton. */ static int CVStgrNewtonIteration(CVodeMem cv_mem) { int m, ret; realtype Del, Delp=0.0, dcon; N_Vector *bS, wrk1, wrk2; int is; m = 0; /* ftemp <- f(t_n, y_n) y <- y_n ftempS <- fS(t_n, y_n(0), s_n(0)) acorS <- 0 yS <- yS_n(0) */ loop { /* Evaluate the residual of the nonlinear systems */ for (is=0; is 0) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } } /* Get norm of correction; add correction to acorS and yS */ Del = CVSensNorm(cv_mem, bS, ewtS); for (is=0; is 0, an estimate of the convergence rate constant is stored in crateS, and used in the test. */ if (m > 0) crateS = MAX(CRDOWN * crateS, Del/Delp); dcon = Del * MIN(ONE, crateS) / tq[4]; if (dcon <= ONE) { if (errconS) acnrmS = (m==0) ? Del : CVSensNorm(cv_mem, acorS, ewtS); jcur = FALSE; return (SOLVED); /* Convergence achieved */ } m++; /* Stop at maxcor iterations or if iter. seems to be diverging. If still not converged and Jacobian data is not current, signal to try the solution again */ if ((m == maxcorS) || ((m >= 2) && (Del > RDIV * Delp))) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } /* Save norm of correction, evaluate fS, and loop again */ Delp = Del; wrk1 = tempv; wrk2 = tempvS[0]; CVSensRhs(cv_mem, tn, y, ftemp, yS, ftempS, wrk1, wrk2); } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVStgr1Nls * * This is a high-level routine that attempts to solve the i-th * sensitivity linear system using nonlinear iterations (CV_FUNCTIONAL * or CV_NEWTON - depending on the value of iter) once the states y_n * were obtained and passed the error test. */ static int CVStgr1Nls(CVodeMem cv_mem, int is) { int flag=SOLVED; switch(iter) { case CV_FUNCTIONAL: flag = CVStgr1NlsFunctional(cv_mem,is); break; case CV_NEWTON: flag = CVStgr1NlsNewton(cv_mem,is); break; } return(flag); } /*-----------------------------------------------------------------*/ /* * CVStgr1NlsFunctional * * This routine attempts to solve the i-th sensitivity linear system * using functional iteration (no matrices involved). * * Possible return values: * SOLVED * CONV_FAIL */ static int CVStgr1NlsFunctional(CVodeMem cv_mem, int is) { int m; realtype Del, Delp=0.0, dcon; N_Vector wrk1, wrk2; /* Initialize estimated conv. rate and counter */ crateS = ONE; m = 0; /* Evaluate fS at predicted yS but with converged y (and corresponding f) */ wrk1 = tempv; wrk2 = ftempS[0]; CVSensRhs1(cv_mem, tn, y, ftemp, is, znS[0][is], tempvS[is], wrk1, wrk2); /* Initialize correction to zero */ N_VConst(ZERO,acorS[is]); /* Loop until convergence; accumulate corrections in acorS */ loop { nniS1[is]++; /* Correct yS from last fS value */ N_VLinearSum(h, tempvS[is], -ONE, znS[1][is], tempvS[is]); N_VScale(rl1, tempvS[is], tempvS[is]); N_VLinearSum(ONE, znS[0][is], ONE, tempvS[is], yS[is]); /* Get WRMS norm of current correction to use in convergence test */ N_VLinearSum(ONE, tempvS[is], -ONE, acorS[is], acorS[is]); Del = N_VWrmsNorm(acorS[is], ewtS[is]); N_VScale(ONE, tempvS[is], acorS[is]); /* Test for convergence. If m > 0, an estimate of the convergence rate constant is stored in crateS, and used in the test. */ if (m > 0) crateS = MAX(CRDOWN * crateS, Del / Delp); dcon = Del * MIN(ONE, crateS) / tq[4]; if (dcon <= ONE) { return (SOLVED); /* Convergence achieved */ } /* Stop at maxcor iterations or if iter. seems to be diverging */ m++; if ((m==maxcorS) || ((m >= 2) && (Del > RDIV * Delp))) return (CONV_FAIL); /* Save norm of correction, evaluate f, and loop again */ Delp = Del; wrk1 = tempv; wrk2 = ftempS[0]; CVSensRhs1(cv_mem, tn, y, ftemp, is, yS[is], tempvS[is], wrk1, wrk2); } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVStgr1NlsNewton * * This routine attempts to solve the i-th sensitivity linear system * using Newton iteration. It calls CVStgr1NlsNewton to perform the * actual iteration. If the Newton iteration fails with out-of-date * Jacobian data (ier=TRY_AGAIN), it calls lsetup and retries the * Newton iteration. This second try is unlikely to happen when * using a Krylov linear solver. * * Possible return values: * SOLVED * CONV_FAIL * SOLVE_FAIL_UNREC * SETUP_FAIL_UNREC */ static int CVStgr1NlsNewton(CVodeMem cv_mem, int is) { int convfail, ier; booleantype callSetup; N_Vector vtemp1, vtemp2, vtemp3, wrk1, wrk2; callSetup = FALSE; loop { /* Set acorS to zero and load prediction into yS vector */ N_VConst(ZERO, acorS[is]); N_VScale(ONE, znS[0][is], yS[is]); /* Evaluate fS at predicted yS but with converged y (and corresponding f) */ wrk1 = tempv; wrk2 = tempvS[0]; CVSensRhs1(cv_mem, tn, y, ftemp, is, yS[is], ftempS[is], wrk1, wrk2); /* Do the Newton iteration */ ier = CVStgr1NewtonIteration(cv_mem, is); /* If the solve was successful (ier=SOLVED) or if an error that cannot be fixed by a call to lsetup occured (ier = SOLVE_FAIL_UNREC or CONV_FAIL) return */ if (ier != TRY_AGAIN) return (ier); /* There was a convergence failure and the Jacobian-related data appears not to be current. Call lsetup with convfail=CV_FAIL_BAD_J and then loop again */ callSetup = TRUE; convfail = CV_FAIL_BAD_J; /* Rename some vectors for readibility */ vtemp1 = tempv; vtemp2 = yS[0]; vtemp3 = ftempS[0]; /* Call linear solver setup at converged y */ ier = lsetup(cv_mem, convfail, y, ftemp, &jcur, vtemp1, vtemp2, vtemp3); nsetups++; nsetupsS++; gamrat = ONE; crate = ONE; crateS = ONE; /* after lsetup all conv. rates are reset to ONE */ gammap = gamma; nstlp = nst; /* Return if lsetup failed */ if (ier < 0) return (SETUP_FAIL_UNREC); if (ier > 0) return (CONV_FAIL); } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVStgr1Newtoniteration * * This routine performs the Newton iteration for the i-th sensitivity. * If the iteration succeeds, it returns the value SOLVED. * If not, it may signal the CVStgr1NlsNewton routine to call lsetup * and reattempt the iteration, by returning the value TRY_AGAIN. * (In this case, CVStgr1NlsNewton must set convfail to CV_FAIL_BAD_J * before calling setup again). Otherwise, this routine returns one * of the appropriate values SOLVE_FAIL_UNREC or CONV_FAIL back to * CVStgr1NlsNewton. */ static int CVStgr1NewtonIteration(CVodeMem cv_mem, int is) { int m, ret; realtype Del, Delp=0.0, dcon; N_Vector *bS, wrk1, wrk2; m = 0; /* ftemp <- f(t_n, y_n) y <- y_n ftempS[is] <- fS(is, t_n, y_n(0), s_n(0)) acorS[is] <- 0 yS[is] <- yS_n(0)[is] */ loop { /* Evaluate the residual of the nonlinear systems */ N_VLinearSum(rl1, znS[1][is], ONE, acorS[is], tempvS[is]); N_VLinearSum(gamma, ftempS[is], -ONE, tempvS[is], tempvS[is]); /* Call the lsolve function */ bS = tempvS; nniS1[is]++; ret = lsolve(cv_mem, bS[is], ewtS[is], y, ftemp); /* Unrecoverable error in lsolve */ if (ret < 0) return (SOLVE_FAIL_UNREC); /* Recoverable error in lsolve and Jacobian data not current */ if (ret > 0) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } /* Get norm of correction; add correction to acorS and yS */ Del = N_VWrmsNorm(bS[is], ewtS[is]); N_VLinearSum(ONE, acorS[is], ONE, bS[is], acorS[is]); N_VLinearSum(ONE, znS[0][is], ONE, acorS[is], yS[is]); /* Test for convergence. If m > 0, an estimate of the convergence rate constant is stored in crateS, and used in the test. */ if (m > 0) crateS = MAX(CRDOWN * crateS, Del/Delp); dcon = Del * MIN(ONE, crateS) / tq[4]; if (dcon <= ONE) { jcur = FALSE; return (SOLVED); /* Convergence achieved */ } m++; /* Stop at maxcor iterations or if iter. seems to be diverging. If still not converged and Jacobian data is not current, signal to try the solution again */ if ((m == maxcorS) || ((m >= 2) && (Del > RDIV * Delp))) { if ((!jcur) && (setupNonNull)) return (TRY_AGAIN); return (CONV_FAIL); } /* Save norm of correction, evaluate fS, and loop again */ Delp = Del; wrk1 = tempv; wrk2 = tempvS[0]; CVSensRhs1(cv_mem, tn, y, ftemp, is, yS[is], ftempS[is], wrk1, wrk2); } /* end loop */ } /*-----------------------------------------------------------------*/ /* * CVStgrDoErrorTest (CV_STAGGERED or CV_STAGGERED1 approach) * * This routine performs the local error test on the sensitivity vars. * The local error norm is loaded into dsmS, and the test dsmS ?<= 1 * is made. * * If the test passes for all sensitivities, CVStgrDoErrorTest returns * TRUE. * * If the test fails, we proceed like in CVDoErrorTest. */ static booleantype CVStgrDoErrorTest(CVodeMem cv_mem, int *nflagPtr, int *kflagPtr, realtype saved_t, int *nefSPtr, realtype *dsmSPtr) { int is; realtype dsmS; N_Vector wrk1, wrk2; dsmS = acnrmS / tq[2]; /* If dsmS passes test, return TRUE */ *dsmSPtr = dsmS; if (dsmS <= ONE) return (TRUE); /* Test failed; increment counters, set nflag, and restore zn, znS arrays */ (*nefSPtr)++; netfS++; *nflagPtr = PREV_ERR_FAIL; CVRestore(cv_mem, saved_t); /* At maxnef failures or |h| = hmin, return with nflag = REP_ERR_FAIL */ if ((ABS(h) <= hmin*ONEPSM) || ( (*nefSPtr) == maxnef)) { *kflagPtr = REP_ERR_FAIL; return (FALSE); } /* Set etamax = 1 to prevent step size increase at end of this step */ etamax = ONE; /* Set h ratio eta from dsmS, rescale, and return for retry of step */ if ((*nefSPtr) <= MXNEF1) { eta = ONE / (RPowerR(BIAS2*dsmS,ONE/L) + ADDON); eta = MAX(ETAMIN, MAX(eta, hmin / ABS(h))); if ( (*nefSPtr) >= SMALL_NEF) eta = MIN(eta, ETAMXF); CVRescale(cv_mem); return (FALSE); } /* After MXNEF1 failures, force an order reduction and retry step */ if (q > 1) { eta = MAX(ETAMIN, hmin / ABS(h)); CVAdjustOrder(cv_mem,-1); L = q; q--; qwait = L; CVRescale(cv_mem); return (FALSE); } /* If already at order 1, restart: reload zn from scratch */ eta = MAX(ETAMIN, hmin / ABS(h)); h *= eta; hscale = h; qwait = LONG_WAIT; nscon = 0; f(tn, zn[0], tempv, f_data); nfe++; N_VScale(h, tempv, zn[1]); if (quadr) { fQ(tn, zn[0], tempvQ, fQ_data); nfQe++; N_VScale(h, tempvQ, znQ[1]); } wrk1 = ftemp; wrk2 = ftempS[0]; CVSensRhs(cv_mem, tn, zn[0], tempv, znS[0], tempvS, wrk1, wrk2); for (is=0; is= 2; i--) tau[i] = tau[i-1]; if ((q==1) && (nst > 1)) tau[2] = tau[1]; tau[1] = h; /* Apply correction to column j of zn: l_j * Delta_n */ for (j=0; j <= q; j++) N_VLinearSum(l[j], acor, ONE, zn[j], zn[j]); if (quadr) { for (j=0; j <= q; j++) N_VLinearSum(l[j], acorQ, ONE, znQ[j], znQ[j]); } if (sensi) { for (is=0; is 1) { ddn = N_VWrmsNorm(zn[q], ewt); if ( quadr && errconQ) { ddn = CVQuadUpdateNorm(cv_mem, ddn, znQ[q], ewtQ); } if ( sensi && errconS ) { ddn = CVSensUpdateNorm(cv_mem, ddn, znS[q], ewtS); } ddn = ddn/tq[1]; etaqm1 = ONE/(RPowerR(BIAS1*ddn, ONE/q) + ADDON); } return (etaqm1); } /*-----------------------------------------------------------------*/ /* * CVComputeEtaqp1 * * This routine computes and returns the value of etaqp1 for a * possible increase in order by 1. */ static realtype CVComputeEtaqp1(CVodeMem cv_mem) { realtype dup, cquot; int is; etaqp1 = ZERO; if (q != qmax) { cquot = (tq[5] / saved_tq5) * RPowerI(h/tau[2], L); N_VLinearSum(-cquot, zn[qmax], ONE, acor, tempv); dup = N_VWrmsNorm(tempv, ewt); if ( quadr && errconQ ) { N_VLinearSum(-cquot, znQ[qmax], ONE, acorQ, tempvQ); dup = CVQuadUpdateNorm(cv_mem, dup, tempvQ, ewtQ); } if ( sensi && errconS ) { for (is=0; is= 3) { for (k = 1; k <= 3; k++) for (i = 5; i >= 2; i--) ssdat[i][k] = ssdat[i-1][k]; factorial = 1; for (i = 1; i <= q-1; i++) factorial *= i; sq = factorial*q*(q+1)*acnrm/tq[5]; sqm1 = factorial*q*N_VWrmsNorm(zn[q], ewt); sqm2 = factorial*N_VWrmsNorm(zn[q-1], ewt); ssdat[1][1] = sqm2*sqm2; ssdat[1][2] = sqm1*sqm1; ssdat[1][3] = sq*sq; } if (qprime >= q) { /* If order is 3 or greater, and enough ssdat has been saved, nscon >= q+5, then call stability limit detection routine. */ if ( (q >= 3) && (nscon >= q+5) ) { ldflag = CVsldet(cv_mem); if (ldflag > 3) { /* A stability limit violation is indicated by a return flag of 4, 5, or 6. Reduce new order. */ qprime = q-1; eta = etaqm1; eta = MIN(eta,etamax); eta = eta/MAX(ONE,ABS(h)*hmax_inv*eta); hprime = h*eta; nor = nor + 1; } } } else { /* Otherwise, let order increase happen, and reset stability limit counter, nscon. */ nscon = 0; } } /*-----------------------------------------------------------------*/ /* * CVsldet * * This routine detects stability limitation using stored scaled * derivatives data. CVsldet returns the magnitude of the * dominate characteristic root, rr. The presents of a stability * limit is indicated by rr > "something a little less then 1.0", * and a positive kflag. This routine should only be called if * order is greater than or equal to 3, and data has been collected * for 5 time steps. * * Returned values: * kflag = 1 -> Found stable characteristic root, normal matrix case * kflag = 2 -> Found stable characteristic root, quartic solution * kflag = 3 -> Found stable characteristic root, quartic solution, * with Newton correction * kflag = 4 -> Found stability violation, normal matrix case * kflag = 5 -> Found stability violation, quartic solution * kflag = 6 -> Found stability violation, quartic solution, * with Newton correction * * kflag < 0 -> No stability limitation, * or could not compute limitation. * * kflag = -1 -> Min/max ratio of ssdat too small. * kflag = -2 -> For normal matrix case, vmax > vrrt2*vrrt2 * kflag = -3 -> For normal matrix case, The three ratios * are inconsistent. * kflag = -4 -> Small coefficient prevents elimination of quartics. * kflag = -5 -> R value from quartics not consistent. * kflag = -6 -> No corrected root passes test on qk values * kflag = -7 -> Trouble solving for sigsq. * kflag = -8 -> Trouble solving for B, or R via B. * kflag = -9 -> R via sigsq[k] disagrees with R from data. */ static int CVsldet(CVodeMem cv_mem) { int i, k, j, it, kmin=0, kflag=0; realtype rat[5][4], rav[4], qkr[4], sigsq[4], smax[4], ssmax[4]; realtype drr[4], rrc[4],sqmx[4], qjk[4][4], vrat[5], qc[6][4], qco[6][4]; realtype rr, rrcut, vrrtol, vrrt2, sqtol, rrtol; realtype smink, smaxk, sumrat, sumrsq, vmin, vmax, drrmax, adrr; realtype small, tem, sqmax, saqk, qp, s, sqmaxk, saqj, sqmin; realtype rsa, rsb, rsc, rsd, rse, rd1a, rd1b, rd1c, rd1d; realtype rd2a, rd2b, rd2c, rd3a, rd3b, cest1, corr1; realtype ratp, ratm, qfac1, qfac2, bb, rrb; /* The following are cutoffs and tolerances used by this routine */ rrcut = RCONST(0.98); vrrtol = RCONST(1.0e-4); vrrt2 = RCONST(5.0e-4); sqtol = RCONST(1.0e-3); rrtol = RCONST(1.0e-2); rr = ZERO; /* Index k corresponds to the degree of the interpolating polynomial. */ /* k = 1 -> q-1 */ /* k = 2 -> q */ /* k = 3 -> q+1 */ /* Index i is a backward-in-time index, i = 1 -> current time, */ /* i = 2 -> previous step, etc */ /* get maxima, minima, and variances, and form quartic coefficients */ for (k=1; k<=3; k++) { smink = ssdat[1][k]; smaxk = ZERO; for (i=1; i<=5; i++) { smink = MIN(smink,ssdat[i][k]); smaxk = MAX(smaxk,ssdat[i][k]); } if (smink < TINY*smaxk) { kflag = -1; return (kflag); } smax[k] = smaxk; ssmax[k] = smaxk*smaxk; sumrat = ZERO; sumrsq = ZERO; for (i=1; i<=4; i++) { rat[i][k] = ssdat[i][k]/ssdat[i+1][k]; sumrat = sumrat + rat[i][k]; sumrsq = sumrsq + rat[i][k]*rat[i][k]; } rav[k] = FOURTH*sumrat; vrat[k] = ABS(FOURTH*sumrsq - rav[k]*rav[k]); qc[5][k] = ssdat[1][k]*ssdat[3][k] - ssdat[2][k]*ssdat[2][k]; qc[4][k] = ssdat[2][k]*ssdat[3][k] - ssdat[1][k]*ssdat[4][k]; qc[3][k] = ZERO; qc[2][k] = ssdat[2][k]*ssdat[5][k] - ssdat[3][k]*ssdat[4][k]; qc[1][k] = ssdat[4][k]*ssdat[4][k] - ssdat[3][k]*ssdat[5][k]; for (i=1; i<=5; i++) { qco[i][k] = qc[i][k]; } } /* End of k loop */ /* Isolate normal or nearly-normal matrix case. Three quartic will have common or nearly-common roots in this case. Return a kflag = 1 if this procedure works. If three root differ more than vrrt2, return error kflag = -3. */ vmin = MIN(vrat[1],MIN(vrat[2],vrat[3])); vmax = MAX(vrat[1],MAX(vrat[2],vrat[3])); if (vmin < vrrtol*vrrtol) { if (vmax > vrrt2*vrrt2) { kflag = -2; return (kflag); } else { rr = (rav[1] + rav[2] + rav[3])/THREE; drrmax = ZERO; for (k = 1;k<=3;k++) { adrr = ABS(rav[k] - rr); drrmax = MAX(drrmax, adrr); } if (drrmax > vrrt2) kflag = -3; kflag = 1; /* can compute charactistic root, drop to next section */ } } else { /* use the quartics to get rr. */ if (ABS(qco[1][1]) < TINY*ssmax[1]) { small = qco[1][1]; kflag = -4; return (kflag); } tem = qco[1][2]/qco[1][1]; for (i=2; i<=5; i++) { qco[i][2] = qco[i][2] - tem*qco[i][1]; } qco[1][2] = ZERO; tem = qco[1][3]/qco[1][1]; for (i=2; i<=5; i++) { qco[i][3] = qco[i][3] - tem*qco[i][1]; } qco[1][3] = ZERO; if (ABS(qco[2][2]) < TINY*ssmax[2]) { small = qco[2][2]; kflag = -4; return (kflag); } tem = qco[2][3]/qco[2][2]; for (i=3; i<=5; i++) { qco[i][3] = qco[i][3] - tem*qco[i][2]; } if (ABS(qco[4][3]) < TINY*ssmax[3]) { small = qco[4][3]; kflag = -4; return (kflag); } rr = -qco[5][3]/qco[4][3]; if (rr < TINY || rr > HUN) { kflag = -5; return (kflag); } for (k=1; k<=3; k++) { qkr[k] = qc[5][k] + rr*(qc[4][k] + rr*rr*(qc[2][k] + rr*qc[1][k])); } sqmax = ZERO; for (k=1; k<=3; k++) { saqk = ABS(qkr[k])/ssmax[k]; if (saqk > sqmax) sqmax = saqk; } if (sqmax < sqtol) { kflag = 2; /* can compute charactistic root, drop to "given rr,etc" */ } else { /* do Newton corrections to improve rr. */ for (it=1; it<=3; it++) { for (k=1; k<=3; k++) { qp = qc[4][k] + rr*rr*(THREE*qc[2][k] + rr*FOUR*qc[1][k]); drr[k] = ZERO; if (ABS(qp) > TINY*ssmax[k]) drr[k] = -qkr[k]/qp; rrc[k] = rr + drr[k]; } for (k=1; k<=3; k++) { s = rrc[k]; sqmaxk = ZERO; for (j=1; j<=3; j++) { qjk[j][k] = qc[5][j] + s*(qc[4][j] + s*s*(qc[2][j] + s*qc[1][j])); saqj = ABS(qjk[j][k])/ssmax[j]; if (saqj > sqmaxk) sqmaxk = saqj; } sqmx[k] = sqmaxk; } sqmin = sqmx[1] + ONE; for (k=1; k<=3; k++) { if (sqmx[k] < sqmin) { kmin = k; sqmin = sqmx[k]; } } rr = rrc[kmin]; if (sqmin < sqtol) { kflag = 3; /* can compute charactistic root */ /* break out of Newton correction loop and drop to "given rr,etc" */ break; } else { for (j=1; j<=3; j++) { qkr[j] = qjk[j][kmin]; } } } /* end of Newton correction loop */ if (sqmin > sqtol) { kflag = -6; return (kflag); } } /* end of if (sqmax < sqtol) else */ } /* end of if (vmin < vrrtol*vrrtol) else, quartics to get rr. */ /* given rr, find sigsq[k] and verify rr. */ /* All positive kflag drop to this section */ for (k=1; k<=3; k++) { rsa = ssdat[1][k]; rsb = ssdat[2][k]*rr; rsc = ssdat[3][k]*rr*rr; rsd = ssdat[4][k]*rr*rr*rr; rse = ssdat[5][k]*rr*rr*rr*rr; rd1a = rsa - rsb; rd1b = rsb - rsc; rd1c = rsc - rsd; rd1d = rsd - rse; rd2a = rd1a - rd1b; rd2b = rd1b - rd1c; rd2c = rd1c - rd1d; rd3a = rd2a - rd2b; rd3b = rd2b - rd2c; if (ABS(rd1b) < TINY*smax[k]) { kflag = -7; return (kflag); } cest1 = -rd3a/rd1b; if (cest1 < TINY || cest1 > FOUR) { kflag = -7; return (kflag); } corr1 = (rd2b/cest1)/(rr*rr); sigsq[k] = ssdat[3][k] + corr1; } if (sigsq[2] < TINY) { kflag = -8; return (kflag); } ratp = sigsq[3]/sigsq[2]; ratm = sigsq[1]/sigsq[2]; qfac1 = FOURTH*(q*q - ONE); qfac2 = TWO/(q - ONE); bb = ratp*ratm - ONE - qfac1*ratp; tem = ONE - qfac2*bb; if (ABS(tem) < TINY) { kflag = -8; return (kflag); } rrb = ONE/tem; if (ABS(rrb - rr) > rrtol) { kflag = -9; return (kflag); } /* Check to see if rr is above cutoff rrcut */ if (rr > rrcut) { if (kflag == 1) kflag = 4; if (kflag == 2) kflag = 5; if (kflag == 3) kflag = 6; } /* All positive kflag returned at this point */ return (kflag); } /*=================================================================*/ /* Root finding */ /*=================================================================*/ /*-----------------------------------------------------------------*/ /* * CVRcheck1 * * This routine completes the initialization of rootfinding memory * information, and checks whether g has a zero both at and very near * the initial point of the IVP. * * This routine returns an int equal to: * INITROOT = -1 if a close pair of zeros was found, and * CV_SUCCESS = 0 otherwise. */ static int CVRcheck1(CVodeMem cv_mem) { int i; realtype smallh, hratio; booleantype zroot; for (i = 0; i < nrtfn; i++) iroots[i] = 0; tlo = tn; ttol = (ABS(tn) + ABS(h))*uround*HUN; /* Evaluate g at initial t and check for zero values. */ gfun (tlo, zn[0], glo, g_data); nge = 1; zroot = FALSE; for (i = 0; i < nrtfn; i++) { if (ABS(glo[i]) == ZERO) zroot = TRUE; } if (!zroot) return(CV_SUCCESS); /* Some g_i is zero at t0; look at g at t0+(small increment). */ smallh = (h > ZERO) ? ttol : -ttol; tlo += smallh; hratio = smallh/h; N_VLinearSum(ONE, zn[0], hratio, zn[1], y); gfun (tlo, y, glo, g_data); nge++; zroot = FALSE; for (i = 0; i < nrtfn; i++) { if (ABS(glo[i]) == ZERO) { zroot = TRUE; iroots[i] = 1; } } if (zroot) return(INITROOT); return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVRcheck2 * * This routine checks for exact zeros of g at the last root found, * if the last return was a root. It then checks for a close * pair of zeros (an error condition), and for a new root at a * nearby point. The left endpoint (tlo) of the search interval * is adjusted if necessary to assure that all g_i are nonzero * there, before returning to do a root search in the interval. * * On entry, tlo = tretlast is the last value of tret returned by * CVode. This may be the previous tn, the previous tout value, or * the last root location. * * This routine returns an int equal to: * CLOSERT = -2 if a close pair of zeros was found, * RTFOUND = 1 if a new zero of g was found near tlo, or * CV_SUCCESS = 0 otherwise. */ static int CVRcheck2(CVodeMem cv_mem) { int i; realtype smallh, hratio; booleantype zroot; if (irfnd == 0) return (CV_SUCCESS); (void) CVodeGetDky(cv_mem, tlo, 0, y); gfun (tlo, y, glo, g_data); nge++; zroot = FALSE; for (i = 0; i < nrtfn; i++) iroots[i] = 0; for (i = 0; i < nrtfn; i++) { if (ABS(glo[i]) == ZERO) { zroot = TRUE; iroots[i] = 1; } } if (!zroot) return(CV_SUCCESS); /* One or more g_i has a zero at tlo. Check g at tlo+smallh. */ ttol = (ABS(tn) + ABS(h))*uround*HUN; smallh = (h > ZERO) ? ttol : -ttol; tlo += smallh; if ( (tlo - tn)*h >= ZERO) { hratio = smallh/h; N_VLinearSum(ONE, y, hratio, zn[1], y); } else { (void) CVodeGetDky(cv_mem, tlo, 0, y); } gfun (tlo, y, glo, g_data); nge++; zroot = FALSE; for (i = 0; i < nrtfn; i++) { if (ABS(glo[i]) == ZERO) { if (iroots[i] == 1) return(CLOSERT); zroot = TRUE; iroots[i] = 1; } } if (zroot) return(RTFOUND); return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ /* * CVRcheck3 * * This routine interfaces to CVRootfind to look for a root of g * between tlo and either tn or tout, whichever comes first. * Only roots beyond tlo in the direction of integration are sought. * * This routine returns an int equal to: * RTFOUND = 1 if a root of g was found, or * CV_SUCCESS = 0 otherwise. */ static int CVRcheck3(CVodeMem cv_mem) { int i, ier; /* Set thi = tn or tout, whichever comes first; set y = y(thi). */ if (taskc == CV_ONE_STEP) { thi = tn; N_VScale(ONE, zn[0], y); } if (taskc == CV_NORMAL) { if ( (toutc - tn)*h >= ZERO) { thi = tn; N_VScale(ONE, zn[0], y); } else { thi = toutc; (void) CVodeGetDky(cv_mem, thi, 0, y); } } /* Set ghi = g(thi) and call CVRootfind to search (tlo,thi) for roots. */ gfun (thi, y, ghi, g_data); nge++; ttol = (ABS(tn) + ABS(h))*uround*HUN; ier = CVRootfind(cv_mem); tlo = troot; for (i = 0; i < nrtfn; i++) glo[i] = groot[i]; /* If no root found, return CV_SUCCESS. */ if (ier == CV_SUCCESS) return(CV_SUCCESS); /* If a root was found, interpolate to get y(troot) and return. */ (void) CVodeGetDky(cv_mem, troot, 0, y); return (RTFOUND); } /*-----------------------------------------------------------------*/ /* * CVRootFind * * This routine solves for a root of g(t) between tlo and thi, if * one exists. Only roots of odd multiplicity (i.e. with a change * of sign in one of the g_i), or exact zeros, are found. * Here the sign of tlo - thi is arbitrary, but if multiple roots * are found, the one closest to tlo is returned. * * The method used is the Illinois algorithm, a modified secant method. * Reference: Kathie L. Hiebert and Lawrence F. Shampine, Implicitly * Defined Output Points for Solutions of ODEs, Sandia National * Laboratory Report SAND80-0180, February 1980. * * This routine uses the following parameters for communication: * * nrtfn = number of functions g_i, or number of components of * the vector-valued function g(t). Input only. * * gfun = user-defined function for g(t). Its form is * (void) gfun(t, y, gt, g_data) * * nge = cumulative counter for gfun calls. * * ttol = a convergence tolerance for troot. Input only. * When a root at troot is found, it is located only to * within a tolerance of ttol. Typically, ttol should * be set to a value on the order of * 100 * UROUND * max (ABS(tlo), ABS(thi)) * where UROUND is the unit roundoff of the machine. * * tlo, thi = endpoints of the interval in which roots are sought. * On input, and must be distinct, but tlo - thi may * be of either sign. The direction of integration is * assumed to be from tlo to thi. On return, tlo and thi * are the endpoints of the final relevant interval. * * glo, ghi = arrays of length nrtfn containing the vectors g(tlo) * and g(thi) respectively. Input and output. On input, * none of the glo[i] should be zero. * * troot = root location, if a root was found, or thi if not. * Output only. If a root was found other than an exact * zero of g, troot is the endpoint thi of the final * interval bracketing the root, with size at most ttol. * * groot = array of length nrtfn containing g(troot) on return. * * iroots = int array of length nrtfn with root information. * Output only. If a root was found, iroots indicates * which components g_i have a root at troot. For * i = 0, ..., nrtfn-1, iroots[i] = 1 if g_i has a root * and iroots[i] = 0 otherwise. * * This routine returns an int equal to: * RTFOUND = 1 if a root of g was found, or * CV_SUCCESS = 0 otherwise. */ static int CVRootfind(CVodeMem cv_mem) { realtype alpha, tmid, gfrac, maxfrac, fracint, fracsub; int i, imax, side, sideprev; booleantype zroot, sgnchg; imax = 0; /* First check for change in sign in ghi or for a zero in ghi. */ maxfrac = ZERO; zroot = FALSE; sgnchg = FALSE; for (i = 0; i < nrtfn; i++) { if (ABS(ghi[i]) == ZERO) { zroot = TRUE; } else { if (glo[i]*ghi[i] < ZERO) { gfrac = ABS(ghi[i]/(ghi[i] - glo[i])); if (gfrac > maxfrac) { sgnchg = TRUE; maxfrac = gfrac; imax = i; } } } } /* If no sign change was found, reset troot and groot. Then return CV_SUCCESS if no zero was found, or set iroots and return RTFOUND. */ if (!sgnchg) { troot = thi; for (i = 0; i < nrtfn; i++) groot[i] = ghi[i]; if (!zroot) return (CV_SUCCESS); for (i = 0; i < nrtfn; i++) { iroots[i] = 0; if (ABS(ghi[i]) == ZERO) iroots[i] = 1; } return(RTFOUND); } /* A sign change was found. Loop to locate nearest root. */ side = 0; sideprev = -1; loop { /* Looping point */ /* Set weight alpha. On the first two passes, set alpha = 1. Thereafter, reset alpha according to the side (low vs high) of the subinterval in which the sign change was found in the previous two passes. If the sides were opposite, set alpha = 1. If the sides were the same, then double alpha (if high side), or halve alpha (if low side). The next guess tmid is the secant method value if alpha = 1, but is closer to tlo if alpha < 1, and closer to thi if alpha > 1. */ if (sideprev == side) { alpha = (side == 2) ? alpha*TWO : alpha*HALF; } else { alpha = ONE; } /* Set next root approximation tmid and get g(tmid). If tmid is too close to tlo or thi, adjust it inward, by a fractional distance that is between 0.1 and 0.5. */ tmid = thi - (thi - tlo)*ghi[imax]/(ghi[imax] - alpha*glo[imax]); if (ABS(tmid - tlo) < HALF*ttol) { fracint = ABS(thi - tlo)/ttol; fracsub = (fracint > FIVE) ? TENTH : HALF/fracint; tmid = tlo + fracsub*(thi - tlo); } if (ABS(thi - tmid) < HALF*ttol) { fracint = ABS(thi - tlo)/ttol; fracsub = (fracint > FIVE) ? TENTH : HALF/fracint; tmid = thi - fracsub*(thi - tlo); } (void) CVodeGetDky(cv_mem, tmid, 0, y); gfun (tmid, y, groot, g_data); nge++; /* Check to see in which subinterval g changes sign, and reset imax. Set side = 1 if sign change is on low side, or 2 if on high side. */ maxfrac = ZERO; zroot = FALSE; sgnchg = FALSE; sideprev = side; for (i = 0; i < nrtfn; i++) { if (ABS(groot[i]) == ZERO) { zroot = TRUE; } else { if (glo[i]*groot[i] < ZERO) { gfrac = ABS(groot[i]/(groot[i] - glo[i])); if (gfrac > maxfrac) { sgnchg = TRUE; maxfrac = gfrac; imax = i; } } } } if (sgnchg) { /* Sign change found in (tlo,tmid); replace thi with tmid. */ thi = tmid; for (i = 0; i < nrtfn; i++) ghi[i] = groot[i]; side = 1; /* Stop at root thi if converged; otherwise loop. */ if (ABS(thi - tlo) <= ttol) break; continue; /* Return to looping point. */ } if (zroot) { /* No sign change in (tlo,tmid), but g = 0 at tmid; return root tmid. */ thi = tmid; for (i = 0; i < nrtfn; i++) ghi[i] = groot[i]; break; } /* No sign change in (tlo,tmid), and no zero at tmid. Sign change must be in (tmid,thi). Replace tlo with tmid. */ tlo = tmid; for (i = 0; i < nrtfn; i++) glo[i] = groot[i]; side = 2; /* Stop at root thi if converged; otherwise loop back. */ if (ABS(thi - tlo) <= ttol) break; } /* End of root-search loop */ /* Reset troot and groot, set iroots, and return RTFOUND. */ troot = thi; for (i = 0; i < nrtfn; i++) { groot[i] = ghi[i]; iroots[i] = 0; if (ABS(ghi[i]) == ZERO) iroots[i] = 1; if (glo[i]*ghi[i] < ZERO) iroots[i] = 1; } return(RTFOUND); } /*=================================================================*/ /* Combined norms */ /*=================================================================*/ /* * CVQuadUpdateNorm * * Updates the norm old_nrm to account for all quadratures. */ static realtype CVQuadUpdateNorm(CVodeMem cv_mem, realtype old_nrm, N_Vector xQ, N_Vector wQ) { realtype qnrm; qnrm = N_VWrmsNorm(xQ, wQ); if (old_nrm > qnrm) return(old_nrm); else return(qnrm); } /*-----------------------------------------------------------------*/ /* * CVQuadUpdateDsm * * Usage : dms = CVQuadUpdateDsm(cv_mem, dsm, dsmQ); * * This routine updates the local error norm dsm with quadrature * related information. Used only if quadratures are computed * with FULL error control. * * Returns the maximum over the wheighted local error norms. */ static realtype CVQuadUpdateDsm(CVodeMem cv_mem, realtype old_dsm, realtype dsmQ) { if ( old_dsm > dsmQ ) return (old_dsm); else return (dsmQ); } /*-----------------------------------------------------------------*/ /* * CVSensNorm * * This routine returns the maximum over the weighted root mean * square norm of xS with weight vectors wS: * * max { wrms(xS[0],wS[0]) ... wrms(xS[Ns-1],wS[Ns-1]) } * * Called by CVSensUpdateNorm or directly in the CV_STAGGERED approach * during the NLS solution and before the error test. */ static realtype CVSensNorm(CVodeMem cv_mem, N_Vector *xS, N_Vector *wS) { int is; realtype nrm, snrm; nrm = N_VWrmsNorm(xS[0],wS[0]); for (is=1; is nrm ) nrm = snrm; } return (nrm); } /*-----------------------------------------------------------------*/ /* * CVSensUpdateNorm * * Updates the norm old_nrm to account for all sensitivities. */ static realtype CVSensUpdateNorm(CVodeMem cv_mem, realtype old_nrm, N_Vector *xS, N_Vector *wS) { realtype snrm; snrm = CVSensNorm(cv_mem, xS, wS); if (old_nrm > snrm) return(old_nrm); else return(snrm); } /*-----------------------------------------------------------------*/ /* * CVStgrUpdateNorm * * Usage : dms = CVStgrUpdateDsm(cv_mem, old_dsm, dsmS); * * This routine updates the local error norm old_dsm with sensitivity * related information. Used only in the CV_STAGGERED or CV_STAGGERED1 * approach with FULL error control.This value is consistent with * the one computed in CVDoErrorTest when ism=CV_SIMULTANEOUS and * errconS=TRUE. * * Returns the maximum over the wheighted local error norms. */ static realtype CVStgrUpdateDsm(CVodeMem cv_mem, realtype old_dsm, realtype dsmS) { if ( old_dsm > dsmS ) return (old_dsm); else return (dsmS); } /*=================================================================*/ /* Sensitivity RHS Routines */ /*=================================================================*/ /* * CVSensRhs * * CVSensRhs is a high level routine that returns right hand side * of sensitivity equations. Depending on the 'ifS' flag, it either * calls directly the fS routine (ifS=CV_ALLSENS) or (if ifS=CV_ONESENS) * calls the fS1 routine in a loop over all sensitivities. * * CVSensRhs is called: * (*) by Cvode at the first step * (*) by CVYddNorm if errcon=TRUE * (*) by CVnlsFunctional, CVnlsNewton, and CVNewtonIteration * if ism=CV_SIMULTANEOUS * (*) by CVDoErrorTest when restarting from scratch * (*) in the corrector loop if ism=CV_STAGGERED * (*) by CVStgrDoErrorTest when restarting from scratch */ static void CVSensRhs(CVodeMem cv_mem, realtype time, N_Vector ycur, N_Vector fcur, N_Vector *yScur, N_Vector *fScur, N_Vector temp1, N_Vector temp2) { int is; if (ifS==CV_ALLSENS) { fS(Ns, time, ycur, fcur, yScur, fScur, fS_data, temp1, temp2); nfSe++; } else { for (is=0; is= ZERO) ? CENTERED1 : FORWARD1; else method = (rhomax > ZERO) ? CENTERED2 : FORWARD2; switch(method) { case CENTERED1: Delta = MIN(Deltay, Deltap); r2Delta = HALF/Delta; N_VLinearSum(ONE,y,Delta,yS,ytemp); p[which] = psave + Delta; f(t, ytemp, ySdot, f_data); nfel++; N_VLinearSum(ONE,y,-Delta,yS,ytemp); p[which] = psave - Delta; f(t, ytemp, ftemp, f_data); nfel++; N_VLinearSum(r2Delta,ySdot,-r2Delta,ftemp,ySdot); break; case CENTERED2: r2Deltap = HALF/Deltap; r2Deltay = HALF/Deltay; N_VLinearSum(ONE,y,Deltay,yS,ytemp); f(t, ytemp, ySdot, f_data); nfel++; N_VLinearSum(ONE,y,-Deltay,yS,ytemp); f(t, ytemp, ftemp, f_data); nfel++; N_VLinearSum(r2Deltay, ySdot, -r2Deltay, ftemp, ySdot); if (!skipFP) { p[which] = psave + Deltap; f(t, y, ytemp, f_data); nfel++; p[which] = psave - Deltap; f(t, y, ftemp, f_data); nfel++; N_VLinearSum(r2Deltap,ytemp,-r2Deltap,ftemp,ftemp); N_VLinearSum(ONE,ySdot,ONE,ftemp,ySdot); } break; case FORWARD1: Delta = MIN(Deltay, Deltap); rDelta = ONE/Delta; N_VLinearSum(ONE,y,Delta,yS,ytemp); p[which] = psave + Delta; f(t, ytemp, ySdot, f_data); nfel++; N_VLinearSum(rDelta,ySdot,-rDelta,ydot,ySdot); break; case FORWARD2: N_VLinearSum(ONE,y,Deltay,yS,ytemp); f(t, ytemp, ySdot, f_data); nfel++; N_VLinearSum(rDeltay, ySdot, -rDeltay, ydot, ySdot); if (!skipFP) { p[which] = psave + Deltap; f(t, y, ytemp, f_data); nfel++; N_VLinearSum(rDeltap,ytemp,-rDeltap,ydot,ftemp); N_VLinearSum(ONE,ySdot,ONE,ftemp,ySdot); } break; } p[which] = psave; /* Increment counter nfeS */ nfeS += nfel; } neuron-7.5/src/sundials/cvodes/cvodes.h000066400000000000000000001674731323325274500202530ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban * and Dan Shumaker @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the interface file for the main CVODES integrator. * ----------------------------------------------------------------- */ #ifndef _CVODES_H #define _CVODES_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "sundialstypes.h" #include "nvector.h" /* * ----------------------------------------------------------------- * CVODES is used to solve numerically the ordinary initial value * problem: * * y' = f(t,y), * y(t0) = y0, * * where t0, y0 in R^N, and f: R x R^N -> R^N are given. * * Optionally, CVODES can perform forward sensitivity analysis * to find sensitivities of the solution y with respect to * parameters in the right hand side f and/or in the initial * conditions y0. * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Enumerations for inputs to CVodeCreate, CVodeMalloc, * CVodeReInit, CVodeSensMalloc, CVodeSensReInit, CvodeQuadMalloc, * CVodeQuadReInit, CVodeSet*, and CVode. * ----------------------------------------------------------------- * Symbolic constants for the lmm, iter, and itol input * parameters to CVodeMalloc and CVodeReInit, as well as the * input parameter itask to CVode, are given below. * * lmm: The user of the CVODES package specifies whether to use * the CV_ADAMS or CV_BDF (backward differentiation formula) * linear multistep method. The BDF method is recommended * for stiff problems, and the CV_ADAMS method is recommended * for nonstiff problems. * * iter: At each internal time step, a nonlinear equation must * be solved. The user can specify either CV_FUNCTIONAL * iteration, which does not require linear algebra, or a * CV_NEWTON iteration, which requires the solution of linear * systems. In the CV_NEWTON case, the user also specifies a * CVODE linear solver. CV_NEWTON is recommended in case of * stiff problems. * * itol: This parameter specifies the relative and absolute * tolerance types to be used. The CV_SS tolerance type means * a scalar relative and absolute tolerance, while the CV_SV * tolerance type means a scalar relative tolerance and a * vector absolute tolerance (a potentially different * absolute tolerance for each vector component). * * itolQ: Same as itol for quadrature variables. * * ism: This parameter specifies the sensitivity corrector type * to be used. In the CV_SIMULTANEOUS case, the nonlinear * systems for states and all sensitivities are solved * simultaneously. In the CV_STAGGERED case, the nonlinear * system for states is solved first and then, the * nonlinear systems for all sensitivities are solved * at the same time. Finally, in the CV_STAGGERED1 approach * all nonlinear systems are solved in a sequence. * * itask: The itask input parameter to CVode indicates the job * of the solver for the next user step. The CV_NORMAL * itask is to have the solver take internal steps until * it has reached or just passed the user specified tout * parameter. The solver then interpolates in order to * return an approximate value of y(tout). The CV_ONE_STEP * option tells the solver to just take one internal step * and return the solution at the point reached by that * step. The CV_NORMAL_TSTOP and CV_ONE_STEP_TSTOP modes are * similar to CV_NORMAL and CV_ONE_STEP, respectively, except * that the integration never proceeds past the value * tstop (specified through the routine CVodeSetStopTime). * ----------------------------------------------------------------- */ /* lmm */ #define CV_ADAMS 1 #define CV_BDF 2 /* iter */ #define CV_FUNCTIONAL 1 #define CV_NEWTON 2 /* itol */ #define CV_SS 1 #define CV_SV 2 #define CV_EE 3 /* itask */ #define CV_NORMAL 1 #define CV_ONE_STEP 2 #define CV_NORMAL_TSTOP 3 #define CV_ONE_STEP_TSTOP 4 /* ism */ #define CV_SIMULTANEOUS 1 #define CV_STAGGERED 2 #define CV_STAGGERED1 3 /* * ================================================================= * F U N C T I O N T Y P E S * ================================================================= */ /* * ----------------------------------------------------------------- * Type : CVRhsFn * ----------------------------------------------------------------- * The f function which defines the right hand side of the ODE * system y' = f(t,y) must have type CVRhsFn. * f takes as input the independent variable value t, and the * dependent variable vector y. It stores the result of f(t,y) * in the vector ydot. The y and ydot arguments are of type * N_Vector. * (Allocation of memory for ydot is handled within CVODES) * The f_data parameter is the same as the f_data * parameter set by the user through the CVodeSetFdata routine. * This user-supplied pointer is passed to the user's f function * every time it is called. * A CVRhsFn f does not have a return value. * ----------------------------------------------------------------- */ typedef void (*CVRhsFn)(realtype t, N_Vector y, N_Vector ydot, void *f_data); /* * ----------------------------------------------------------------- * Type : CVRootFn * ----------------------------------------------------------------- * A function g, which defines a set of functions g_i(t,y) whose * roots are sought during the integration, must have type CVRootFn. * The function g takes as input the independent variable value * t, and the dependent variable vector y. It stores the nrtfn * values g_i(t,y) in the realtype array gout. * (Allocation of memory for gout is handled within CVODE.) * The g_data parameter is the same as that passed by the user * to the CVodeSetGdata routine. This user-supplied pointer is * passed to the user's g function every time it is called. * A CVRootFn g does not have a return value. * ----------------------------------------------------------------- */ typedef void (*CVRootFn)(realtype t, N_Vector y, realtype *gout, void *g_data); /* * ----------------------------------------------------------------- * Type : CVSensRhsFn * ----------------------------------------------------------------- * The fS function which defines the right hand side of the * sensitivity ODE systems s' = f_y * s + f_p must have type * CVSensRhsFn. * fS takes as input the number of sensitivities Ns, the * independent variable value t, the states y and the * corresponding value of f(t,y) in ydot, and the dependent * sensitivity vectors yS. It stores the result of fS in ySdot. * (Allocation of memory for ySdot is handled within CVODES) * The fS_data parameter is the same as the fS_data parameter * set by the user through the CVodeSetSensFdata routine and is * passed to the fS function every time it is called. * A CVSensRhsFn function does not have a return value. * ----------------------------------------------------------------- */ typedef void (*CVSensRhsFn)(int Ns, realtype t, N_Vector y, N_Vector ydot, N_Vector *yS, N_Vector *ySdot, void *fS_data, N_Vector tmp1, N_Vector tmp2); /* * ----------------------------------------------------------------- * Type : CVSensRhs1Fn * ----------------------------------------------------------------- * The fS1 function which defines the right hand side of the i-th * sensitivity ODE system s_i' = f_y * s_i + f_p must have type * CVSensRhs1Fn. * fS1 takes as input the number of sensitivities Ns, the current * sensitivity iS, the independent variable value t, the states y * and the corresponding value of f(t,y) in ydot, and the * dependent sensitivity vector yS. It stores the result of fS in * ySdot. * (Allocation of memory for ySdot is handled within CVODES) * The fS_data parameter is the same as the fS_data parameter * set by the user through the CVodeSetSensFdata routine and is * passed to the fS1 function every time it is called. * A CVSensRhs1Fn function does not have a return value. * ----------------------------------------------------------------- */ typedef void (*CVSensRhs1Fn)(int Ns, realtype t, N_Vector y, N_Vector ydot, int iS, N_Vector yS, N_Vector ySdot, void *fS_data, N_Vector tmp1, N_Vector tmp2); /* * ----------------------------------------------------------------- * Type : CVQuadRhsFn * ----------------------------------------------------------------- * The fQ function which defines the right hand side of the * quadrature equations yQ' = fQ(t,y) must have type CVQuadRhsFn. * fQ takes as input the value of the independent variable t, * the vector of states y and must store the result of fQ in * yQdot. (Allocation of memory for yQdot is handled by CVODES). * The fQ_data parameter is the same as the fQ_data parameter * set by the user through the CVodeSetQuadFdata routine and is * passed to the fQ function every time it is called. * A CVQuadRhsFn function does not have a return value. * ----------------------------------------------------------------- */ typedef void (*CVQuadRhsFn)(realtype t, N_Vector y, N_Vector yQdot, void *fQ_data); /* * ================================================================= * U S E R - C A L L A B L E R O U T I N E S * ================================================================= */ /* * ----------------------------------------------------------------- * Function : CVodeCreate * ----------------------------------------------------------------- * CVodeCreate creates an internal memory block for a problem to * be solved by CVODES. * * lmm is the type of linear multistep method to be used. * The legal values are CV_ADAMS and CV_BDF (see previous * description). * * iter is the type of iteration used to solve the nonlinear * system that arises during each internal time step. * The legal values are CV_FUNCTIONAL and CV_NEWTON. * * If successful, CVodeCreate returns a pointer to initialized * problem memory. This pointer should be passed to CVodeMalloc. * If an initialization error occurs, CVodeCreate prints an error * message to standard err and returns NULL. * ----------------------------------------------------------------- */ void *CVodeCreate(int lmm, int iter); /* * ----------------------------------------------------------------- * Integrator optional input specification functions * ----------------------------------------------------------------- * The following functions can be called to set optional inputs * to values other than the defaults given below: * * Function | Optional input / [ default value ] * ----------------------------------------------------------------- * | * CVodeSetErrFile | the file pointer for an error file * | where all CVODES warning and error * | messages will be written. This parameter * | can be stdout (standard output), stderr * | (standard error), a file pointer * | (corresponding to a user error file * | opened for writing) returned by fopen. * | If not called, then all messages will * | be written to standard output. * | [stderr] * | * CVodeSetFdata | a pointer to user data that will be * | passed to the user's f function every * | time f is called. * | [NULL] * | * CVodeSetGdata | a pointer to user data that will be * | passed to the user's g function every * | time g is called. * | [NULL] * | * CVodeSetMaxOrd | maximum lmm order to be used by the * | solver. * | [12 for Adams , 5 for BDF] * | * CVodeSetMaxNumSteps | maximum number of internal steps to be * | taken by the solver in its attempt to * | reach tout. * | [500] * | * CVodeSetMaxHnilWarns | maximum number of warning messages * | issued by the solver that t+h==t on the * | next internal step. A value of -1 means * | no such messages are issued. * | [10] * | * CVodeSetStabLimDet | flag to turn on/off stability limit * | detection (TRUE = on, FALSE = off). * | When BDF is used and order is 3 or * | greater, CVsldet is called to detect * | stability limit. If limit is detected, * | the order is reduced. * | [FALSE] * | * CVodeSetInitStep | initial step size. * | [estimated by CVODES] * | * CVodeSetMinStep | minimum absolute value of step size * | allowed. * | [0.0] * | * CVodeSetMaxStep | maximum absolute value of step size * | allowed. * | [infinity] * | * CVodeSetStopTime | the independent variable value past * | which the solution is not to proceed. * | [infinity] * | * CVodeSetMaxErrTestFails | Maximum number of error test failures * | in attempting one step. * | [7] * | * CVodeSetMaxNonlinIters | Maximum number of nonlinear solver * | iterations at one solution. * | [3] * | * CVodeSetMaxConvFails | Maximum number of allowable conv. * | failures in attempting one step. * | [10] * | * CVodeSetNonlinConvCoef | Coeficient in the nonlinear conv. * | test. * | [0.1] * | * ----------------------------------------------------------------- * | * CVodeSetIterType | Changes the current nonlinear iteration * | type. * | [set by CVodecreate] * | * CVodeSetTolerances | Changes the integration tolerances * | between calls to CVode(). * | [set by CVodeMalloc/CVodeReInit] * | * ----------------------------------------------------------------- * Return flag: * CV_SUCCESS if successful * CV_MEM_NULL if the cvode memory is NULL * CV_ILL_INPUT if an argument has an illegal value * ----------------------------------------------------------------- */ int CVodeSetErrFile(void *cvode_mem, FILE *errfp); int CVodeSetFdata(void *cvode_mem, void *f_data); int CVodeSetGdata(void *cvode_mem, void *g_data); int CVodeSetMaxOrd(void *cvode_mem, int maxord); int CVodeSetMaxNumSteps(void *cvode_mem, long int mxsteps); int CVodeSetMaxHnilWarns(void *cvode_mem, int mxhnil); int CVodeSetStabLimDet(void *cvode_mem, booleantype stldet); int CVodeSetInitStep(void *cvode_mem, realtype hin); int CVodeSetMinStep(void *cvode_mem, realtype hmin); int CVodeSetMaxStep(void *cvode_mem, realtype hmax); int CVodeSetStopTime(void *cvode_mem, realtype tstop); int CVodeSetMaxErrTestFails(void *cvode_mem, int maxnef); int CVodeSetMaxNonlinIters(void *cvode_mem, int maxcor); int CVodeSetMaxConvFails(void *cvode_mem, int maxncf); int CVodeSetNonlinConvCoef(void *cvode_mem, realtype nlscoef); int CVodeSetIterType(void *cvode_mem, int iter); int CVodeSetTolerances(void *cvode_mem, int itol, realtype *reltol, void *abstol); /* * ----------------------------------------------------------------- * Function : CVodeMalloc * ----------------------------------------------------------------- * CVodeMalloc allocates and initializes memory for a problem to * to be solved by CVODES. * * cvode_mem is pointer to CVODES memory returned by CVodeCreate. * * f is the right hand side function in y' = f(t,y). * * t0 is the initial value of t. * * y0 is the initial condition vector y(t0). * * itol is the type of tolerances to be used. * The legal values are: * CV_SS (scalar relative and absolute tolerances), * CV_SV (scalar relative tolerance and vector * absolute tolerance). * * reltol is a pointer to the relative tolerance scalar. * * abstol is a pointer to the absolute tolerance scalar or * an N_Vector of absolute tolerances. * * The parameters itol, reltol, and abstol define a vector of * error weights, ewt, with components * ewt[i] = 1/(reltol*abs(y[i]) + abstol) (if itol = CV_SS), or * ewt[i] = 1/(reltol*abs(y[i]) + abstol[i]) (if itol = CV_SV). * This vector is used in all error and convergence tests, which * use a weighted RMS norm on all error-like vectors v: * WRMSnorm(v) = sqrt( (1/N) sum(i=1..N) (v[i]*ewt[i])^2 ), * where N is the problem dimension. * * Note: The tolerance values may be changed in between calls to * CVode for the same problem. These values refer to * (*reltol) and either (*abstol), for a scalar absolute * tolerance, or the components of abstol, for a vector * absolute tolerance. * * If successful, CVodeMalloc returns SUCCESS. If an argument has * an illegal value, CVodeMalloc prints an error message to the * file specified by errfp and returns one of the error flags * defined below. * ----------------------------------------------------------------- */ int CVodeMalloc(void *cvode_mem, CVRhsFn f, realtype t0, N_Vector y0, int itol, realtype *reltol, void *abstol); /* * ----------------------------------------------------------------- * Function : CVodeReInit * ----------------------------------------------------------------- * CVodeReInit re-initializes CVode for the solution of a problem, * where a prior call to CVodeMalloc has been made with the same * problem size N. CVodeReInit performs the same input checking * and initializations that CVodeMalloc does. * But it does no memory allocation, assuming that the existing * internal memory is sufficient for the new problem. * * The use of CVodeReInit requires that the maximum method order, * maxord, is no larger for the new problem than for the problem * specified in the last call to CVodeMalloc. This condition is * automatically fulfilled if the multistep method parameter lmm * is unchanged (or changed from CV_ADAMS to CV_BDF) and the default * value for maxord is specified. * * The first argument to CVodeReInit is: * * cvode_mem = pointer to CVODES memory returned by CVodeCreate. * * All the remaining arguments to CVodeReInit have names and * meanings identical to those of CVodeMalloc. * * The return value of CVodeReInit is equal to CV_SUCCESS = 0 if * there were no errors; otherwise it is a negative int equal to: * CV_MEM_NULL indicating cvode_mem was NULL (i.e., * CVodeCreate has not been called). * CV_NO_MALLOC indicating that cvode_mem has not been * allocated (i.e., CVodeMalloc has not been * called). * CV_ILL_INPUT indicating an input argument was illegal * (including an attempt to increase maxord). * In case of an error return, an error message is also printed. * ----------------------------------------------------------------- */ int CVodeReInit(void *cvode_mem, CVRhsFn f, realtype t0, N_Vector y0, int itol, realtype *reltol, void *abstol); /* * ----------------------------------------------------------------- * Function : CVodeRootInit * ----------------------------------------------------------------- * CVodeRootInit initializes a rootfinding problem to be solved * during the integration of the ODE system. It must be called * after CVodeCreate, and before CVode. The arguments are: * * cvode_mem = pointer to CVODE memory returned by CVodeCreate. * * g = name of user-supplied function, of type CVRootFn, * defining the functions g_i whose roots are sought. * * nrtfn = number of functions g_i, an int >= 0. * * If a new problem is to be solved with a call to CVodeReInit, * where the new problem has no root functions but the prior one * did, then call CVodeRootInit with nrtfn = 0. * * The return value of CVodeRootInit is CV_SUCCESS = 0 if there were * no errors; otherwise it is a negative int equal to: * CV_MEM_NULL indicating cvode_mem was NULL, or * CV_MEM_FAIL indicating a memory allocation failed. * (including an attempt to increase maxord). * CV_RTFUNC_NULL indicating nrtfn > 0 but g = NULL. * In case of an error return, an error message is also printed. * ----------------------------------------------------------------- */ int CVodeRootInit(void *cvode_mem, CVRootFn g, int nrtfn); /* * ----------------------------------------------------------------- * Quadrature optional input specification functions * ----------------------------------------------------------------- * The following functions can be called to set optional inputs * to values other than the defaults given below: * * Function | Optional input / [ default value ] * -------------------------------------------------------------- * | * CVodeSetQuadErrCon | are quadrature variables considered in * | the error control? * | [FALSE] * | * CVodeSetQuadFdata | a pointer to user data that will be * | passed to the user's fQ function every * | time fQ is called. * | [NULL] * | *CVodeSetQuadTolerances| set tolerances for quadrature * | integration. Only needed if errconQ=TRUE * | [no default] * ----------------------------------------------------------------- * If successful, these functions return CV_SUCCESS. If an argument * has an illegal value, they print an error message to the * file specified by errfp and return one of the error flags * defined for the CVodeSet* routines. * ----------------------------------------------------------------- */ int CVodeSetQuadFdata(void *cvode_mem, void *fQ_data); int CVodeSetQuadErrCon(void *cvode_mem, booleantype errconQ); int CVodeSetQuadTolerances(void *cvode_mem, int itolQ, realtype *reltolQ, void *abstolQ); /* * ----------------------------------------------------------------- * Function : CVodeQuadMalloc * ----------------------------------------------------------------- * CVodeQuadMalloc allocates and initializes memory related to * quadrature integration. * * cvode_mem is a pointer to CVODES memory returned by CVodeCreate * * fQ is the user-provided integrand routine. * * yQ0 is an N_Vector with initial values for quadratures * (typically yQ0 has all zero components). * * Return values: * CV_SUCCESS if successful * CV_MEM_NULL if the cvode memory was NULL * CV_MEM_FAIL if a memory allocation failed * ----------------------------------------------------------------- */ int CVodeQuadMalloc(void *cvode_mem, CVQuadRhsFn fQ, N_Vector yQ0); /* * ----------------------------------------------------------------- * Function : CVodeQuadReInit * ----------------------------------------------------------------- * CVodeQuadReInit re-initializes CVODES's quadrature related * memory for a problem, assuming it has already been allocated * in prior calls to CVodeMalloc and CvodeQuadMalloc. * * All problem specification inputs are checked for errors. * The number of quadratures Nq is assumed to be unchanged * since the previous call to CVodeQuadMalloc. * * Return values: * CV_SUCCESS if successful * CV_MEM_NULL if the cvode memory was NULL * CV_NO_QUAD if quadratures were not initialized * ----------------------------------------------------------------- */ int CVodeQuadReInit(void *cvode_mem, CVQuadRhsFn fQ, N_Vector yQ0); /* * ----------------------------------------------------------------- * Forward sensitivity optional input specification functions * ----------------------------------------------------------------- * The following functions can be called to set optional inputs * to other values than the defaults given below: * * Function | Optional input / [ default value ] * ----------------------------------------------------------------- * | * CVodeSetSensRhsFn | sensitivity right hand side function. * | This function must compute right hand * | sides for all sensitivity equations. * | [CVODES difference quotient approx.] * | * CVodeSetSensRhs1Fn | the sensitivity right hand side. * | This function must compute right hand * | sides for one sensitivity equation at a * | time. * | [CVODES difference quotient approx.] * | * CVodeSetSensRho | controls the selection of finite * | difference schemes used in evaluating * | the sensitivity right hand sides. * | [0.0] * | * CVodeSetSensPbar | a pointer to scaling factors used in * | computing sensitivity absolute * | tolerances as well as by the CVODES * | difference quotient routines for * | sensitivty right hand sides. pbar[i] * | must give the order of magnitude of * | parameter p[i]. Typically, if p[i] is * | nonzero, pbar[i]=p[i]. * | [p_i = 1.0, for all i] * | * CVodeSetSensFdata | a pointer to user data that will be * | passed to the user's fS function every * | time fS is called. * | [NULL] * | * CVodeSetSensErrCon | are sensitivity variables considered in * | the error control? * | [FALSE] * | * CVodeSetSensTolerances | type of sensi absolute tolernaces. * | * | pointer to the sensiti relative * | tolerance scalar. * | * | pointer to the array of sensi * | abs tol scalars or a pointer * | to the array of N_Vector sensi * | absolute tolerances. * | [itolS = itol] * | [reltolS = reltol] * | [abstolS estimated by CVODES] * | * CVodeSetSensMaxNonlinIters | Maximum number of nonlinear solver * | iterations at one solution. * | [3] * | * ----------------------------------------------------------------- * The return values are the same as for CVodeSet* * ----------------------------------------------------------------- */ int CVodeSetSensRhsFn(void *cvode_mem, CVSensRhsFn fS); int CVodeSetSensRhs1Fn(void *cvode_mem, CVSensRhs1Fn fS); int CVodeSetSensRho(void *cvode_mem, realtype rho); int CVodeSetSensPbar(void *cvode_mem, realtype *pbar); int CVodeSetSensFdata(void *cvode_mem, void *fS_data); int CVodeSetSensErrCon(void *cvode_mem, booleantype errconS); int CVodeSetSensTolerances(void *cvode_mem, int itolS, realtype *reltolS, void *abstolS); int CVodeSetSensMaxNonlinIters(void *cvode_mem, int maxcorS); /* * ----------------------------------------------------------------- * Function : CVodeSensMalloc * ----------------------------------------------------------------- * CVodeSensMalloc allocates and initializes memory related to * sensitivity computations. * * cvode_mem is pointer to CVODES memory returned by CVodeCreate * * Ns is the number of sensitivities to be computed. * * ism is the type of corrector used in sensitivity * analysis. The legal values are: CV_SIMULTANEOUS, * CV_STAGGERED, and CV_STAGGERED1 (see previous description) * * p is a pointer to problem parameters with respect to * which sensitivities may be computed (see description * of plist below). If the right hand sides of the * sensitivity equations are to be evaluated by the * difference quotient routines provided with CVODES, * then p must also be a field in the user data * structure pointed to by f_data. * * plist is a pointer to a list of parameters with respect to * which sensitivities are to be computed. * If plist[j]=i, then sensitivities with respect to * the i-th parameter (i.e. p[i-1]) will be computed. * A negative plist entry also indicates that the * corresponding parameter affects only the initial * conditions of the ODE and not its right hand side. * * yS0 is the array of initial condition vectors for * sensitivity variables. * * Return values: * CV_SUCCESS * CV_MEM_NULL * CV_ILL_INPUT * CV_MEM_FAIL * ----------------------------------------------------------------- */ int CVodeSensMalloc(void *cvode_mem, int Ns, int ism, realtype *p, int *plist, N_Vector *yS0); /* * ----------------------------------------------------------------- * Function : CVodeSensReInit * ----------------------------------------------------------------- * CVodeSensReInit re-initializes CVODES's sensitivity related * memory for a problem, assuming it has already been allocated * in prior calls to CVodeMalloc and CvodeSensMalloc. * * All problem specification inputs are checked for errors. * The number of sensitivities Ns is assumed to be unchanged * since the previous call to CVodeSensMalloc. * If any error occurs during initialization, it is reported to * the file whose file pointer is errfp. * * CVodeSensReInit potentially does some minimal memory allocation * (for the sensitivity absolute tolerance and for arrays of * counters used by the CV_STAGGERED1 method). * * The return value is equal to CV_SUCCESS = 0 if there were no * errors; otherwise it is a negative int equal to: * CV_MEM_NULL indicating cvode_mem was NULL, or * CV_NO_SENS indicating there was not a prior call to * CVodeSensMalloc. * CV_ILL_INPUT indicating an input argument was illegal * (including an attempt to increase maxord). * CV_MEM_FAIL indicating a memory request failed. * In case of an error return, an error message is also printed. * ----------------------------------------------------------------- */ int CVodeSensReInit(void *cvode_mem, int ism, realtype *p, int *plist, N_Vector *yS0); /* * ----------------------------------------------------------------- * Function : CVodeSensToggle * ----------------------------------------------------------------- * CVodeSensToggle activates or deactivates sensitivity calculations. * It does NOT deallocate sensitivity-related memory. * It is allowed to set sensi=TRUE only if CVodeSensMalloc has been * previously called. * * The return value is equal to CV_SUCCESS = 0 if there were no * errors; otherwise it is a negative int equal to: * CV_MEM_NULL indicating cvode_mem was NULL * CV_NO_SENS indicating there was not a prior call to * CVodeSensMalloc. * ----------------------------------------------------------------- */ int CVodeSensToggle(void *cvode_mem, booleantype sensi); /* * ----------------------------------------------------------------- * Function : CVode * ----------------------------------------------------------------- * CVode integrates the ODE over an interval in t. * If itask is CV_NORMAL, then the solver integrates from its * current internal t value to a point at or beyond tout, then * interpolates to t = tout and returns y(tout) in the user- * allocated vector yout. If itask is CV_ONE_STEP, then the solver * takes one internal time step and returns in yout the value of * y at the new internal time. In this case, tout is used only * during the first call to CVode to determine the direction of * integration and the rough scale of the problem. In either * case, the time reached by the solver is placed in (*t). The * user is responsible for allocating the memory for this value. * * cvode_mem is the pointer to CVODES memory returned by * CVodeCreate. * * tout is the next time at which a computed solution is desired. * * yout is the computed solution vector. In CV_NORMAL mode with no * errors and no roots found, yout=y(tout). * * tret is a pointer to a real location. CVode sets (*tret) to * the time reached by the solver and returns yout=y(*tret). * * itask is CV_NORMAL, CV_ONE_STEP, CV_NORMAL_TSTOP, or CV_ONE_STEP_TSTOP. * These four modes are described above. * * Here is a brief description of each return value: * * CV_SUCCESS: CVode succeeded and no roots were found. * * CV_ROOT_RETURN: CVode succeeded, and found one or more roots. * If nrtfn > 1, call CVodeGetRootInfo to see * which g_i were found to have a root at (*tret). * * CV_TSTOP_RETURN: CVode succeded and returned at tstop. * * CV_MEM_NULL: The cvode_mem argument was NULL. * * CV_NO_MALLOC: cvode_mem was not allocated. * * CV_ILL_INPUT: One of the inputs to CVode is illegal. This * includes the situation when a component of the * error weight vectors becomes < 0 during * internal time-stepping. The ILL_INPUT flag * will also be returned if the linear solver * routine CV--- (called by the user after * calling CVodeCreate) failed to set one of the * linear solver-related fields in cvode_mem or * if the linear solver's init routine failed. In * any case, the user should see the printed * error message for more details. * * CV_TOO_MUCH_WORK: The solver took mxstep internal steps but * could not reach tout. The default value for * mxstep is MXSTEP_DEFAULT = 500. * * CV_TOO_MUCH_ACC: The solver could not satisfy the accuracy * demanded by the user for some internal step. * * CV_ERR_FAILURE: Error test failures occurred too many times * (= MXNEF = 7) during one internal time step or * occurred with |h| = hmin. * * CV_CONV_FAILURE: Convergence test failures occurred too many * times (= MXNCF = 10) during one internal time * step or occurred with |h| = hmin. * * CV_LSETUP_FAIL: The linear solver's setup routine failed in an * unrecoverable manner. * * CV_LSOLVE_FAIL: The linear solver's solve routine failed in an * unrecoverable manner. * ----------------------------------------------------------------- */ int CVode(void *cvode_mem, realtype tout, N_Vector yout, realtype *tret, int itask); /* * ----------------------------------------------------------------- * Function : CVodeGetDky * ----------------------------------------------------------------- * CVodeGetDky computes the kth derivative of the y function at * time t, where tn-hu <= t <= tn, tn denotes the current * internal time reached, and hu is the last internal step size * successfully used by the solver. The user may request * k=0, 1, ..., qu, where qu is the current order. The * derivative vector is returned in dky. This vector must be * allocated by the caller. It is only legal to call this * function after a successful return from CVode. * * cvode_mem is the pointer to CVODES memory returned by * CVodeCreate. * * t is the time at which the kth derivative of y is evaluated. * The legal range for t is [tn-hu,tn] as described above. * * k is the order of the derivative of y to be computed. The * legal range for k is [0,qu] as described above. * * dky is the output derivative vector [(D_k)y](t). * * The return values for CVodeGetDky are defined below. * Here is a brief description of each return value: * * CV_SUCCESS: CVodeGetDky succeeded. * * CV_BAD_K : k is not in the range 0, 1, ..., qu. * * CV_BAD_T : t is not in the interval [tn-hu,tn]. * * CV_BAD_DKY : The dky argument was NULL. * * CV_MEM_NULL : The cvode_mem argument was NULL. * ----------------------------------------------------------------- */ int CVodeGetDky(void *cvode_mem, realtype t, int k, N_Vector dky); /* * ----------------------------------------------------------------- * Integrator optional output extraction functions * ----------------------------------------------------------------- * The following functions can be called to get optional outputs * and statistics related to the main integrator. * ----------------------------------------------------------------- * CVodeGetWorkSpace returns the CVODES real and integer workspaces * CVodeGetNumSteps returns the cumulative number of internal * steps taken by the solver * CVodeGetNumRhsEvals returns the number of calls to the user's * f function * CVodeGetNumLinSolvSetups returns the number of calls made to * the linear solver's setup routine * CVodeGetNumErrTestFails returns the number of local error test * failures that have occured * CVodeGetLastOrder returns the order used during the last * internal step * CVodeGetCurrentOrder returns the order to be used on the next * internal step * CVodeGetNumStabLimOrderReds returns the number of order * reductions due to stability limit * detection * CVodeGetActualInitStep returns the actual initial step size * used by CVODES * CVodeGetLastStep returns the step size for the last internal * step * CVodeGetCurrentStep returns the step size to be attempted on * the next internal step * CVodeGetCurrentTime returns the current internal time reached * by the solver * CVodeGetTolScaleFactor returns a suggested factor by which the * user's tolerances should be scaled when * too much accuracy has been requested for * some internal step * CVodeGetErrWeights returns the state error weight vector. * The user need not allocate space for ewt. * CVodeGetEstLocalErrors returns the vector of estimated local * errors. The user need not allocate space * for ele. * CVodeGetNumGEvals returns the number of calls to the user's * g function (for rootfinding) * CVodeGetRootInfo returns an array of int's showing the indices * for which g_i was found to have a root. * For i = 0 ... nrtfn-1, rootsfound[i] = 1 if g_i * has a root, and = 0 if not. * * CVodeGet* return values: * CV_SUCCESS if succesful * CV_MEM_NULL if the cvode memory was NULL * CV_NO_SLDET if stability limit was not turned on * ----------------------------------------------------------------- */ int CVodeGetWorkSpace(void *cvode_mem, long int *lenrw, long int *leniw); int CVodeGetNumSteps(void *cvode_mem, long int *nsteps); int CVodeGetNumRhsEvals(void *cvode_mem, long int *nfevals); int CVodeGetNumLinSolvSetups(void *cvode_mem, long int *nlinsetups); int CVodeGetNumErrTestFails(void *cvode_mem, long int *netfails); int CVodeGetLastOrder(void *cvode_mem, int *qlast); int CVodeGetCurrentOrder(void *cvode_mem, int *qcur); int CVodeGetNumStabLimOrderReds(void *cvode_mem, long int *nslred); int CVodeGetActualInitStep(void *cvode_mem, realtype *hinused); int CVodeGetLastStep(void *cvode_mem, realtype *hlast); int CVodeGetCurrentStep(void *cvode_mem, realtype *hcur); int CVodeGetCurrentTime(void *cvode_mem, realtype *tcur); int CVodeGetTolScaleFactor(void *cvode_mem, realtype *tolsfac); int CVodeGetErrWeights(void *cvode_mem, N_Vector *eweight); int CVodeGetEstLocalErrors(void *cvode_mem, N_Vector *ele); int CVodeGetNumGEvals(void *cvode_mem, long int *ngevals); int CVodeGetRootInfo(void *cvode_mem, int **rootsfound); /* * ----------------------------------------------------------------- * As a convenience, the following functions provides the * optional outputs in one group. * ----------------------------------------------------------------- */ int CVodeGetIntegratorStats(void *cvode_mem, long int *nsteps, long int *nfevals, long int *nlinsetups, long int *netfails, int *qlast, int *qcur, realtype *hinused, realtype *hlast, realtype *hcur, realtype *tcur); /* * ----------------------------------------------------------------- * Nonlinear solver optional output extraction functions * ----------------------------------------------------------------- * The following functions can be called to get optional outputs * and statistics related to the nonlinear solver. * ----------------------------------------------------------------- * CVodeGetNumNonlinSolvIters returns the number of nonlinear * solver iterations performed. * CVodeGetNumNonlinSolvConvFails returns the number of nonlinear * convergence failures. * ----------------------------------------------------------------- */ int CVodeGetNumNonlinSolvIters(void *cvode_mem, long int *nniters); int CVodeGetNumNonlinSolvConvFails(void *cvode_mem, long int *nncfails); /* * ----------------------------------------------------------------- * As a convenience, the following function provides the * optional outputs in a group. * ----------------------------------------------------------------- */ int CVodeGetNonlinSolvStats(void *cvode_mem, long int *nniters, long int *nncfails); /* * ----------------------------------------------------------------- * Quadrature integration solution extraction routines * ----------------------------------------------------------------- * The following functions can be called to obtain the quadrature * variables after a successful integration step. * If quadratures were not computed, they return CV_NO_QUAD. * ----------------------------------------------------------------- */ int CVodeGetQuad(void *cvode_mem, realtype t, N_Vector yQout); int CVodeGetQuadDky(void *cvode_mem, realtype t, int k, N_Vector dky); /* * ----------------------------------------------------------------- * Quadrature integration optional output extraction routines * ----------------------------------------------------------------- * The following functions can be called to get optional outputs * and statistics related to the integration of quadratures. * ----------------------------------------------------------------- * CVodeGetQuadNumRhsEvals returns the number of calls to the * user function fQ defining the right hand * side of the quadrature variables. * CVodeGetQuadNumErrTestFails returns the number of local error * test failures for quadrature variables. * CVodeGetQuadErrWeights returns the vector of error weights for * the quadrature variables. The user need not * allocate space for ewtQ. * ----------------------------------------------------------------- */ int CVodeGetQuadNumRhsEvals(void *cvode_mem, long int *nfQevals); int CVodeGetQuadNumErrTestFails(void *cvode_mem, long int *nQetfails); int CVodeGetQuadErrWeights(void *cvode_mem, N_Vector *eQweight); /* * ----------------------------------------------------------------- * As a convenience, the following function provides the * optional outputs in a group. * ----------------------------------------------------------------- */ int CVodeGetQuadStats(void *cvode_mem, long int *nfQevals, long int *nQetfails); /* * ----------------------------------------------------------------- * Forward sensitivity solution extraction routines * ----------------------------------------------------------------- * CVodeGetSensDky1 computes the kth derivative of the is-th * sensitivity (is=1, 2, ..., Ns) of the y function at time t, * where tn-hu <= t <= tn, tn denotes the current internal time * reached, and hu is the last internal step size successfully * used by the solver. The user may request k=0, 1, ..., qu, * where qu is the current order. * The is-th sensitivity derivative vector is returned in dky. * This vector must be allocated by the caller. It is only legal * to call this function after a successful return from CVode * with sensitivty computations enabled. * Arguments have the same meaning as in CVodeDky. * * CVodeGetSensDky computes the k-th derivative of all * sensitivities of the y function at time t. It repeatedly calls * CVodeGetSensDky. The argument dkyA must be a pointer to * N_Vector and must be allocated by the user to hold at least Ns * vectors. * * CVodeGetSens1 returns the is-th sensitivity of the y function * at the time t. The argument ySout must be an N_Vector and must * be allocated by the user. * * CVodeGetSens returns sensitivities of the y function at * the time t. The argument ySout must be a pointer to N_Vector * and must be allocated by the user to hold at least Ns vectors. * * Return values are similar to those of CVodeDky. Additionally, * CVodeSensDky can return CV_NO_SENS if sensitivities were * not computed and CV_BAD_IS if is < 0 or is >= Ns. * ----------------------------------------------------------------- */ int CVodeGetSens(void *cvode_mem, realtype t, N_Vector *ySout); int CVodeGetSens1(void *cvode_mem, realtype t, int is, N_Vector ySout); int CVodeGetSensDky(void *cvode_mem, realtype t, int k, N_Vector *dkyA); int CVodeGetSensDky1(void *cvode_mem, realtype t, int k, int is, N_Vector dky); /* * ----------------------------------------------------------------- * Forward sensitivity optional output extraction routines * ----------------------------------------------------------------- * The following functions can be called to get optional outputs * and statistics related to the integration of sensitivities. * ----------------------------------------------------------------- * CVodeGetNumSensRhsEvals returns the number of calls to the * sensitivity right hand side routine. * CVodeGetNumRhsEvalsSens returns the number of calls to the * user f routine due to finite difference * evaluations of the sensitivity equations. * CVodeGetNumSensErrTestFails returns the number of local error * test failures for sensitivity variables. * CVodeGetNumSensLinSolvSetups returns the number of calls made * to the linear solver's setup routine * due to sensitivity computations. * CVodeGetSensErrWeights returns the sensitivity error weight * vectors. The user need not allocate space * for ewtS. * ----------------------------------------------------------------- */ int CVodeGetNumSensRhsEvals(void *cvode_mem, long int *nfSevals); int CVodeGetNumRhsEvalsSens(void *cvode_mem, long int *nfevalsS); int CVodeGetNumSensErrTestFails(void *cvode_mem, long int *nSetfails); int CVodeGetNumSensLinSolvSetups(void *cvode_mem, long int *nlinsetupsS); int CVodeGetSensErrWeights(void *cvode_mem, N_Vector_S *eSweight); /* * ----------------------------------------------------------------- * As a convenience, the following function provides the * optional outputs in a group. * ----------------------------------------------------------------- */ int CVodeGetSensStats(void *cvode_mem, long int *nfSevals, long int *nfevalsS, long int *nSetfails, long int *nlinsetupsS); /* * ----------------------------------------------------------------- * Sensitivity nonlinear solver optional output extraction * ----------------------------------------------------------------- * The following functions can be called to get optional outputs * and statistics related to the sensitivity nonlinear solver. * ----------------------------------------------------------------- * CVodeGetNumSensNonlinSolvIters returns the total number of * nonlinear iterations for sensitivity * variables. * CVodeGetNumSensNonlinSolvConvFails returns the total number of * nonlinear convergence failures * for sensitivity variables * CVodeGetNumStgrSensNonlinSolvIters returns a vector of Ns * nonlinear iteration counters * for sensitivity variables * in the CV_STAGGERED1 method. * CVodeGetNumStgrSensNonlinSolvConvFails returns a vector of Ns * nonlinear solver convergence * failure counters for * sensitivity variables in * the CV_STAGGERED1 method. * ----------------------------------------------------------------- */ int CVodeGetNumSensNonlinSolvIters(void *cvode_mem, long int *nSniters); int CVodeGetNumSensNonlinSolvConvFails(void *cvode_mem, long int *nSncfails); int CVodeGetNumStgrSensNonlinSolvIters(void *cvode_mem, long int *nSTGR1niters); int CVodeGetNumStgrSensNonlinSolvConvFails(void *cvode_mem, long int *nSTGR1ncfails); /* * ----------------------------------------------------------------- * As a convenience, the following two functions provide the * optional outputs in groups. * ----------------------------------------------------------------- */ int CVodeGetSensNonlinSolvStats(void *cvode_mem, long int *nSniters, long int *nSncfails); int CVodeGetStgrSensNonlinSolvStats(void *cvode_mem, long int *nSTGR1niters, long int *nSTGR1ncfails); /* * ----------------------------------------------------------------- * Function : CVodeFree * ----------------------------------------------------------------- * CVodeFree frees the problem memory cvode_mem allocated by * CVodeMalloc. Its only argument is the pointer cvode_mem * returned by CVodeCreate. * ----------------------------------------------------------------- */ void CVodeFree(void *cvode_mem); /* * ----------------------------------------------------------------- * Function : CVodeQuadFree * ----------------------------------------------------------------- * CVodeQuadFree frees the problem memory in cvode_mem allocated * for quadrature integration. Its only argument is the pointer * cvode_mem returned by CVodeCreate. * ----------------------------------------------------------------- */ void CVodeQuadFree(void *cvode_mem); /* * ----------------------------------------------------------------- * Function : CVodeSensFree * ----------------------------------------------------------------- * CVodeSensFree frees the problem memory in cvode_mem allocated * for sensitivity analysis. Its only argument is the pointer * cvode_mem returned by CVodeCreate. * ----------------------------------------------------------------- */ void CVodeSensFree(void *cvode_mem); /* * ---------------------------------------- * CVODES return flags * ---------------------------------------- */ #define CV_SUCCESS 0 #define CV_TSTOP_RETURN 1 #define CV_ROOT_RETURN 2 #define CV_MEM_NULL -1 #define CV_ILL_INPUT -2 #define CV_NO_MALLOC -3 #define CV_TOO_MUCH_WORK -4 #define CV_TOO_MUCH_ACC -5 #define CV_ERR_FAILURE -6 #define CV_CONV_FAILURE -7 #define CV_LINIT_FAIL -8 #define CV_LSETUP_FAIL -9 #define CV_LSOLVE_FAIL -10 #define CV_MEM_FAIL -11 #define CV_RTFUNC_NULL -12 #define CV_NO_SLDET -13 #define CV_BAD_K -14 #define CV_BAD_T -15 #define CV_BAD_DKY -16 #define CV_PDATA_NULL -17 #define CV_BAD_IS -18 #define CV_NO_QUAD -19 #define CV_NO_SENS -20 /* * ================================================================= * I N T E R F A C E T O L I N E A R S O L V E R S * ================================================================= */ /* * ----------------------------------------------------------------- * Communication between CVODE and a CVODE Linear Solver * ----------------------------------------------------------------- * convfail (input to cv_lsetup) * * CV_NO_FAILURES : Either this is the first cv_setup call for this * step, or the local error test failed on the * previous attempt at this step (but the Newton * iteration converged). * * CV_FAIL_BAD_J : This value is passed to cv_lsetup if * * (a) The previous Newton corrector iteration * did not converge and the linear solver's * setup routine indicated that its Jacobian- * related data is not current * or * (b) During the previous Newton corrector * iteration, the linear solver's solve routine * failed in a recoverable manner and the * linear solver's setup routine indicated that * its Jacobian-related data is not current. * * CV_FAIL_OTHER : During the current internal step try, the * previous Newton iteration failed to converge * even though the linear solver was using current * Jacobian-related data. * ----------------------------------------------------------------- */ /* Constants for convfail (input to cv_lsetup) */ #define CV_NO_FAILURES 0 #define CV_FAIL_BAD_J 1 #define CV_FAIL_OTHER 2 /* * ----------------------------------------------------------------- * int (*cv_linit)(CVodeMem cv_mem); * ----------------------------------------------------------------- * The purpose of cv_linit is to complete initializations for a * specific linear solver, such as counters and statistics. * An LInitFn should return 0 if it has successfully initialized the * CVODE linear solver and a negative value otherwise. * If an error does occur, an appropriate message should be sent to * (cv_mem->errfp) * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * int (*cv_lsetup)(CVodeMem cv_mem, int convfail, N_Vector ypred, * N_Vector fpred, booleantype *jcurPtr, * N_Vector vtemp1, N_Vector vtemp2, * N_Vector vtemp3); * ----------------------------------------------------------------- * The job of cv_lsetup is to prepare the linear solver for * subsequent calls to cv_lsolve. It may recompute Jacobian- * related data is it deems necessary. Its parameters are as * follows: * * cv_mem - problem memory pointer of type CVodeMem. See the big * typedef earlier in this file. * * convfail - a flag to indicate any problem that occurred during * the solution of the nonlinear equation on the * current time step for which the linear solver is * being used. This flag can be used to help decide * whether the Jacobian data kept by a CVODE linear * solver needs to be updated or not. * Its possible values have been documented above. * * ypred - the predicted y vector for the current CVODE internal * step. * * fpred - f(tn, ypred). * * jcurPtr - a pointer to a bool to be filled in by cv_lsetup. * The function should set *jcurPtr=TRUE if its Jacobian * data is current after the call and should set * *jcurPtr=FALSE if its Jacobian data is not current. * Note: If cv_lsetup calls for re-evaluation of * Jacobian data (based on convfail and CVODE state * data), it should return *jcurPtr=TRUE always; * otherwise an infinite loop can result. * * vtemp1 - temporary N_Vector provided for use by cv_lsetup. * * vtemp3 - temporary N_Vector provided for use by cv_lsetup. * * vtemp3 - temporary N_Vector provided for use by cv_lsetup. * * The cv_lsetup routine should return 0 if successful, a positive * value for a recoverable error, and a negative value for an * unrecoverable error. * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * int (*cv_lsolve)(CVodeMem cv_mem, N_Vector b, N_Vector weight, * N_Vector ycur, N_Vector fcur); * ----------------------------------------------------------------- * cv_lsolve must solve the linear equation P x = b, where * P is some approximation to (I - gamma J), J = (df/dy)(tn,ycur) * and the RHS vector b is input. The N-vector ycur contains * the solver's current approximation to y(tn) and the vector * fcur contains the N_Vector f(tn,ycur). The solution is to be * returned in the vector b. cv_lsolve returns a positive value * for a recoverable error and a negative value for an * unrecoverable error. Success is indicated by a 0 return value. * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * void (*cv_lfree)(CVodeMem cv_mem); * ----------------------------------------------------------------- * cv_lfree should free up any memory allocated by the linear * solver. This routine is called once a problem has been * completed and the linear solver is no longer needed. * ----------------------------------------------------------------- */ #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvodes_impl.h000077500000000000000000000777431323325274500212770ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Dan Shumaker @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the main CVODES integrator. * ----------------------------------------------------------------- */ #ifndef _CVODES_IMPL_H #define _CVODES_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "cvodes.h" #include "nvector.h" #include "sundialstypes.h" /* Prototypes for internal sensitivity rhs DQ functions */ void CVSensRhsDQ(int Ns, realtype t, N_Vector y, N_Vector ydot, N_Vector *yS, N_Vector *ySdot, void *fS_data, N_Vector tempv, N_Vector ftemp); void CVSensRhs1DQ(int Ns, realtype t, N_Vector y, N_Vector ydot, int is, N_Vector yS, N_Vector ySdot, void *fS_data, N_Vector tempv, N_Vector ftemp); /* * ================================================================= * M A I N I N T E G R A T O R M E M O R Y B L O C K * ================================================================= */ /* Basic CVODES constants */ #define ADAMS_Q_MAX 12 /* max value of q for lmm == ADAMS */ #define BDF_Q_MAX 5 /* max value of q for lmm == BDF */ #define Q_MAX ADAMS_Q_MAX /* max value of q for either lmm */ #define L_MAX (Q_MAX+1) /* max value of L for either lmm */ #define NUM_TESTS 5 /* number of error test quantities */ /* * ifS is the type of the function returning the sensitivity * right-hand side. ifS can be either CV_ALLSENS if the function * (of type CVSensRhsFn) returns right hand sides for all * sensitivity systems at once, or CV_ONESENS if the function * (of type SensRhs1Fn) returns the right hand side of one * sensitivity system at a time. */ #define CV_ONESENS 1 #define CV_ALLSENS 2 /* * ----------------------------------------------------------------- * Types: struct CVodeMemRec, CVodeMem * ----------------------------------------------------------------- * The type CVodeMem is type pointer to struct CVodeMemRec. * This structure contains fields to keep track of problem state. * ----------------------------------------------------------------- */ typedef struct CVodeMemRec { realtype cv_uround; /* machine unit roundoff */ /*-------------------------- Problem Specification Data --------------------------*/ CVRhsFn cv_f; /* y' = f(t,y(t)) */ void *cv_f_data; /* user pointer passed to f */ int cv_lmm; /* lmm = ADAMS or BDF */ int cv_iter; /* iter = FUNCTIONAL or NEWTON */ int cv_itol; /* itol = SS or SV */ realtype *cv_reltol; /* ptr to relative tolerance */ void *cv_abstol; /* ptr to absolute tolerance */ /*----------------------- Quadrature Related Data -----------------------*/ booleantype cv_quadr; /* TRUE if integrating quadratures */ CVQuadRhsFn cv_fQ; int cv_itolQ; realtype *cv_reltolQ; /* ptr to relative tolerance for quad */ void *cv_abstolQ; /* ptr to absolute tolerance for quad */ booleantype cv_errconQ; void *cv_fQ_data; /* user pointer passed to fQ */ /*------------------------ Sensitivity Related Data ------------------------*/ booleantype cv_sensi; /* TRUE if computing sensitivities */ int cv_Ns; /* Number of sensitivities */ CVSensRhsFn cv_fS; /* fS = (df/dy)*yS + (df/dp) */ CVSensRhs1Fn cv_fS1; /* fS1 = (df/dy)*yS_i + (df/dp) */ booleantype cv_fSDQ; int cv_ifS; /* ifS = ALLSENS or ONESENS */ int cv_ism; /* ism = SIMULTANEOUS or STAGGERED */ realtype *cv_p; /* parameters in f(t,y,p) */ realtype *cv_pbar; /* scale factors for parameters */ int *cv_plist; /* list of sensitivities */ realtype cv_rhomax; /* cut-off value for centered/forward finite differences */ booleantype cv_errconS; /* TRUE if sensitivities are in err. control */ void *cv_fS_data; /* user pointer passed to fS */ int cv_itolS; realtype *cv_reltolS; /* ptr to relative tolerance for sensi */ void *cv_abstolS; /* ptr to absolute tolerance for sensi */ booleantype cv_testSensTol; /* flag to indicate if sensi. tolerances must be checked now */ booleantype cv_setSensTol; /* flag to indicate if sensi. tolerances must be set now */ booleantype cv_atolSallocated; /* TRUE if CVODES has allocated space for sensitivity absolute tolerances */ /*----------------------- Nordsieck History Array -----------------------*/ N_Vector cv_zn[L_MAX]; /* Nordsieck array, of size N x (q+1). zn[j] is a vector of length N (j=0,...,q) zn[j] = [1/factorial(j)] * h^j * (jth derivative of the interpolating polynomial */ /*------------------- Vectors of length N -------------------*/ N_Vector cv_ewt; /* error weight vector */ N_Vector cv_y; /* y is used as temporary storage by the solver. The memory is provided by the user to CVode where the vector is named yout. */ N_Vector cv_acor; /* In the context of the solution of the nonlinear equation, acor = y_n(m) - y_n(0). On return, this vector is scaled to give the estimated local error in y. */ N_Vector cv_tempv; /* temporary storage vector */ N_Vector cv_ftemp; /* temporary storage vector */ /*-------------------------- Quadrature Related Vectors --------------------------*/ N_Vector cv_znQ[L_MAX]; /* Nordsieck arrays for sensitivities */ N_Vector cv_ewtQ; /* error weight vector for quadratures */ N_Vector cv_yQ; /* Unlike y, yQ is not allocated by the user */ N_Vector cv_acorQ; /* acorQ = yQ_n(m) - yQ_n(0) */ N_Vector cv_tempvQ; /* temporary storage vector (~ tempv) */ /*--------------------------- Sensitivity Related Vectors ---------------------------*/ N_Vector *cv_znS[L_MAX]; /* Nordsieck arrays for sensitivities */ N_Vector *cv_ewtS; /* error weight vectors for sensitivities */ N_Vector *cv_yS; /* yS=yS0 (allocated by the user) */ N_Vector *cv_acorS; /* acorS = yS_n(m) - yS_n(0) */ N_Vector *cv_tempvS; /* temporary storage vector (~ tempv) */ N_Vector *cv_ftempS; /* temporary storage vector (~ ftemp) */ /*----------------------------------------------- Does CVodeSensMalloc allocate additional space? -----------------------------------------------*/ booleantype cv_stgr1alloc; /* Are ncfS1, ncfnS1, and nniS1 allocated by CVODES? */ /*----------------- Tstop information -----------------*/ booleantype cv_tstopset; realtype cv_tstop; /*--------- Step Data ---------*/ int cv_q; /* current order */ int cv_qprime; /* order to be used on the next step */ /* = q-1, q, or q+1 */ int cv_next_q; /* order to be used on the next step */ int cv_qwait; /* number of internal steps to wait before */ /* considering a change in q */ int cv_L; /* L = q + 1 */ realtype cv_hin; realtype cv_h; /* current step size */ realtype cv_hprime; /* step size to be used on the next step */ realtype cv_next_h; /* step size to be used on the next step */ realtype cv_eta; /* eta = hprime / h */ realtype cv_hscale; /* value of h used in zn */ realtype cv_tn; /* current internal value of t */ realtype cv_tau[L_MAX+1]; /* array of previous q+1 successful step sizes indexed from 1 to q+1 */ realtype cv_tq[NUM_TESTS+1]; /* array of test quantities indexed from 1 to NUM_TESTS(=5) */ realtype cv_l[L_MAX]; /* coefficients of l(x) (degree q poly) */ realtype cv_rl1; /* 1 / l[1] */ realtype cv_gamma; /* gamma = h * rl1 */ realtype cv_gammap; /* gamma at the last setup call */ realtype cv_gamrat; /* gamma / gammap */ realtype cv_crate; /* est. corrector conv. rate in Nls */ realtype cv_crateS; /* est. corrector conv. rate in NlsStgr */ realtype cv_acnrm; /* | acor | */ realtype cv_acnrmS; /* | acorS | */ realtype cv_acnrmQ; /* | acorQ | */ realtype cv_nlscoef; /* coeficient in nonlinear convergence test */ int cv_mnewt; /* Newton iteration counter */ int *cv_ncfS1; /* Array of Ns local counters for conv. failures (used in CVStep for STAGGERED1) */ /*------ Limits ------*/ int cv_qmax; /* q <= qmax */ long int cv_mxstep; /* maximum number of internal steps for one user call */ int cv_maxcor; /* maximum number of corrector iterations for the solution of the nonlinear equation */ int cv_maxcorS; int cv_mxhnil; /* maximum number of warning messages issued to the user that t + h == t for the next internal step */ int cv_maxnef; /* maximum number of error test failures */ int cv_maxncf; /* maximum number of nonlinear conv. failures */ realtype cv_hmin; /* |h| >= hmin */ realtype cv_hmax_inv; /* |h| <= 1/hmax_inv */ realtype cv_etamax; /* eta <= etamax */ /*---------- Counters ----------*/ long int cv_nst; /* number of internal steps taken */ long int cv_nfe; /* number of f calls */ long int cv_nfSe; /* number of fS calls */ long int cv_nfQe; /* number of fQ calls */ long int cv_nfeS; /* number of f calls from sensi DQ */ long int cv_ncfn; /* number of corrector convergence failures */ long int cv_ncfnS; /* number of total sensi. corr. conv. failures */ long int *cv_ncfnS1; /* number of sensi. corrector conv. failures */ long int cv_nni; /* number of nonlinear iterations performed */ long int cv_nniS; /* number of total sensi. nonlinear iterations */ long int *cv_nniS1; /* number of sensi. nonlinear iterations */ long int cv_netf; /* number of error test failures */ long int cv_netfS; /* number of sensi. error test failures */ long int cv_netfQ; /* number of quadr. error test failures */ long int cv_nsetups; /* number of setup calls */ long int cv_nsetupsS; /* number of setup calls due to sensitivities */ int cv_nhnil; /* number of messages issued to the user that t + h == t for the next iternal step */ /*----------------------------- Space requirements for CVODES -----------------------------*/ long int cv_lrw1; /* no. of realtype words in 1 N_Vector y */ long int cv_liw1; /* no. of integer words in 1 N_Vector y */ long int cv_lrw1Q; /* no. of realtype words in 1 N_Vector yQ */ long int cv_liw1Q; /* no. of integer words in 1 N_Vector yQ */ long int cv_lrw; /* no. of realtype words in CVODES work vectors */ long int cv_liw; /* no. of integer words in CVODES work vectors */ /*---------------- Step size ratios ----------------*/ realtype cv_etaqm1; /* ratio of new to old h for order q-1 */ realtype cv_etaq; /* ratio of new to old h for order q */ realtype cv_etaqp1; /* ratio of new to old h for order q+1 */ /*------------------ Linear Solver Data ------------------*/ /* Linear Solver functions to be called */ int (*cv_linit)(struct CVodeMemRec *cv_mem); int (*cv_lsetup)(struct CVodeMemRec *cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3); int (*cv_lsolve)(struct CVodeMemRec *cv_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector fcur); void (*cv_lfree)(struct CVodeMemRec *cv_mem); /* Linear Solver specific memory */ void *cv_lmem; /* Flag to request a call to the setup routine */ booleantype cv_forceSetup; /*------------ Saved Values ------------*/ int cv_qu; /* last successful q value used */ long int cv_nstlp; /* step number of last setup call */ realtype cv_h0u; /* actual initial stepsize */ realtype cv_hu; /* last successful h value used */ realtype cv_saved_tq5; /* saved value of tq[5] */ booleantype cv_jcur; /* Is the Jacobian info used by linear solver current? */ realtype cv_tolsf; /* tolerance scale factor */ booleantype cv_setupNonNull; /* Does setup do something? */ /*-------------------------------------------------------------------- Flags turned ON by CVodeMalloc, CVodeSensMalloc, and CVodeQuadMalloc and read by CVodeReInit, CVodeSensReInit, and CVodeQuadReInit --------------------------------------------------------------------*/ booleantype cv_MallocDone; booleantype cv_sensMallocDone; booleantype cv_quadMallocDone; /*---------- Error File ----------*/ FILE *cv_errfp; /* CVODE error messages are sent to errfp */ /*------------------------- Stability Limit Detection -------------------------*/ booleantype cv_sldeton; /* Is Stability Limit Detection on? */ realtype cv_ssdat[6][4]; /* scaled data array for STALD */ int cv_nscon; /* counter for STALD method */ long int cv_nor; /* counter for number of order reductions */ /*---------------- Rootfinding Data ----------------*/ CVRootFn cv_gfun; /* Function g for roots sought */ int cv_nrtfn; /* number of components of g */ void *cv_g_data; /* pointer to user data for g */ int *cv_iroots; /* int array for root information */ realtype cv_tlo; /* nearest endpoint of interval in root search */ realtype cv_thi; /* farthest endpoint of interval in root search */ realtype cv_troot; /* approximate root location */ realtype *cv_glo; /* saved array of g values at t = tlo */ realtype *cv_ghi; /* saved array of g values at t = thi */ realtype *cv_groot; /* array of g values at t = troot */ realtype cv_tretlast; /* last value of t returned */ realtype cv_toutc; /* copy of tout (if NORMAL mode) */ realtype cv_ttol; /* tolerance on root location troot */ int cv_taskc; /* copy of parameter task */ int cv_irfnd; /* flag showing whether last step had a root */ int cv_nge; /* counter for g evaluations */ /*------------------------- Complex step memory block -------------------------*/ void *cv_csmem; } *CVodeMem; /* * ================================================================= * C V O D E S E R R O R M E S S A G E S * ================================================================= */ #if defined(SUNDIALS_EXTENDED_PRECISION) #define MSG_TIME "t = %Lg" #define MSG_TIME_H "t = %Lg and h = %Lg" #define MSG_TIME_INT "t = %Lg is not between tcur - hu = %Lg and tcur = %Lg.\n\n" #define MSG_TIME_TOUT "tout = %Lg" #elif defined(SUNDIALS_DOUBLE_PRECISION) #define MSG_TIME "t = %lg" #define MSG_TIME_H "t = %lg and h = %lg" #define MSG_TIME_INT "t = %lg is not between tcur - hu = %lg and tcur = %lg.\n\n" #define MSG_TIME_TOUT "tout = %lg" #else #define MSG_TIME "t = %g" #define MSG_TIME_H "t = %g and h = %g" #define MSG_TIME_INT "t = %g is not between tcur - hu = %g and tcur = %g.\n\n" #define MSG_TIME_TOUT "tout = %g" #endif /* CvodeCreate Error Messages */ #define _CVC_ "CVodeCreate-- " #define MSGCVS_BAD_LMM1 _CVC_ "Illegal value for lmm.\n" #define MSGCVS_BAD_LMM2 "The legal values are CV_ADAMS and CV_BDF.\n\n" #define MSGCVS_BAD_LMM MSGCVS_BAD_LMM1 MSGCVS_BAD_LMM2 #define MSGCVS_BAD_ITER1 _CVC_ "Illegal value for iter.\n" #define MSGCVS_BAD_ITER2 "The legal values are CV_FUNCTIONAL " #define MSGCVS_BAD_ITER3 "and CV_NEWTON.\n\n" #define MSGCVS_BAD_ITER MSGCVS_BAD_ITER1 MSGCVS_BAD_ITER2 MSGCVS_BAD_ITER3 #define MSGCVS_CVMEM_FAIL _CVC_ "Allocation of cv_mem failed.\n\n" /* CVodeSet* Error Messages */ #define MSGCVS_SET_NO_MEM "cvode_mem = NULL in a CVodeSet routine illegal.\n\n" #define MSGCVS_SET_BAD_ITER1 "CVodeSetIterType-- Illegal value for iter.\n" #define MSGCVS_SET_BAD_ITER2 "The legal values are CV_FUNCTIONAL " #define MSGCVS_SET_BAD_ITER3 "and CV_NEWTON.\n\n" #define MSGCVS_SET_BAD_ITER MSGCVS_SET_BAD_ITER1 MSGCVS_SET_BAD_ITER2 MSGCVS_SET_BAD_ITER3 #define MSGCVS_SET_NEG_MAXORD "CVodeSetMaxOrd-- maxord <= 0 illegal.\n\n" #define MSGCVS_SET_BAD_MAXORD1 "CVodeSetMaxOrd-- Illegal attempt to increase " #define MSGCVS_SET_BAD_MAXORD2 "maximum method order.\n\n" #define MSGCVS_SET_BAD_MAXORD MSGCVS_SET_BAD_MAXORD1 MSGCVS_SET_BAD_MAXORD2 #define MSGCVS_SET_NEG_MXSTEPS "CVodeSetMaxNumSteps-- mxsteps <= 0 illegal.\n\n" #define MSGCVS_SET_SLDET1 "CVodeSetStabLimDet-- Attempt to use stability " #define MSGCVS_SET_SLDET2 "limit detection with the CV_ADAMS method illegal.\n\n" #define MSGCVS_SET_SLDET MSGCVS_SET_SLDET1 MSGCVS_SET_SLDET2 #define MSGCVS_SET_NEG_HMIN "CVodeSetMinStep-- hmin <= 0 illegal.\n\n" #define MSGCVS_SET_NEG_HMAX "CVodeSetMaxStep-- hmax <= 0 illegal.\n\n" #define MSGCVS_SET_BAD_HMM1 "CVodeSetMinStep/CVodeSetMaxStep-- Inconsistent\n" #define MSGCVS_SET_BAD_HMM2 "step size limits: hmin > hmax.\n\n" #define MSGCVS_SET_BAD_HMIN_HMAX MSGCVS_SET_BAD_HMM1 MSGCVS_SET_BAD_HMM2 #define _CVSET_TOL_ "CVodeSetTolerances-- " #define MSGCVS_SET_BAD_ITOL1 _CVSET_TOL_ "Illegal value for itol.\n" #define MSGCVS_SET_BAD_ITOL2 "The legal values are CV_SS and CV_SV.\n\n" #define MSGCVS_SET_BAD_ITOL MSGCVS_SET_BAD_ITOL1 MSGCVS_SET_BAD_ITOL2 #define MSGCVS_SET_BAD_RELTOL _CVSET_TOL_ "*reltol < 0 illegal.\n\n" #define MSGCVS_SET_ABSTOL_NULL _CVSET_TOL_ "abstol = NULL illegal.\n\n" #define MSGCVS_SET_BAD_ABSTOL _CVSET_TOL_ "abstol has negative component(s) (illegal).\n\n" /* CVodeMalloc/CVodeReInit Error Messages */ #define _CVM_ "CVodeMalloc/CVodeReInit-- " #define MSGCVS_CVM_NO_MEM _CVM_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_Y0_NULL _CVM_ "y0 = NULL illegal.\n\n" #define MSGCVS_BAD_ITOL1 _CVM_ "Illegal value for itol.\n" #define MSGCVS_BAD_ITOL2 "The legal values are CV_SS and CV_SV.\n\n" #define MSGCVS_BAD_ITOL MSGCVS_BAD_ITOL1 MSGCVS_BAD_ITOL2 #define MSGCVS_F_NULL _CVM_ "f = NULL illegal.\n\n" #define MSGCVS_RELTOL_NULL _CVM_ "reltol = NULL illegal.\n\n" #define MSGCVS_BAD_RELTOL _CVM_ "*reltol < 0 illegal.\n\n" #define MSGCVS_ABSTOL_NULL _CVM_ "abstol = NULL illegal.\n\n" #define MSGCVS_BAD_ABSTOL _CVM_ "abstol has negative component(s) (illegal).\n\n" #define MSGCVS_BAD_NVECTOR _CVM_ "A required vector operation is not implemented.\n\n" #define MSGCVS_MEM_FAIL _CVM_ "A memory request failed.\n\n" #define MSGCVS_CVREI_NO_MALLOC "CVodeReInit-- Attempt to call before CVodeMalloc.\n\n" /* CVodeRootInit Error Messages */ #define _CVRT_ "CVodeRootInit-- " #define MSGCVS_ROOT_NO_MEM _CVRT_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_ROOT_MEM_FAIL _CVRT_ "A memory request failed.\n\n" #define MSGCVS_ROOT_FUNC_NULL _CVRT_ "g = NULL illegal.\n\n" /* CVodeQuadMalloc/CVodeQuadReInit Error Messages */ #define MSGCVS_BAD_ITOLQ1 "CVodeSetQuadTolerances-- Illegal value for itolQ.\n" #define MSGCVS_BAD_ITOLQ2 "The legal values are CV_SS and CV_SV.\n\n" #define MSGCVS_BAD_ITOLQ MSGCVS_BAD_ITOLQ1 MSGCVS_BAD_ITOLQ2 #define MSGCVS_RELTOLQ_NULL "CVodeSetQuadTolerances-- reltolQ = NULL illegal.\n\n" #define MSGCVS_ABSTOLQ_NULL "CVodeSetQuadTolerances-- abstolQ = NULL illegal.\n\n" #define MSGCVS_BAD_RELTOLQ "CVodeSetQuadTolerances-- *reltolQ < 0 illegal.\n\n" #define MSGCVS_BAD_ABSTOLQ "CVodeSetQuadTolerances-- abstolQ has negative component(s) (illegal).\n\n" #define MSGCVS_QCVM_NO_MEM "CVodeQuadMalloc/CVodeQuadReInit-- cvode_mem = NULL illegal.\n\n" #define MSGCVS_QCVM_MEM_FAIL "CVodeQuadMalloc/CVodeQuadReInit-- A memory request failed.\n\n" #define MSGCVS_QREI_QUAD1 "CVodeQuadReInit-- Illegal attempt to call before " #define MSGCVS_QREI_QUAD2 "calling CVodeQuadMalloc.\n\n" #define MSGCVS_QREI_NO_QUAD MSGCVS_QREI_QUAD1 MSGCVS_QREI_QUAD2 /* CVodeSetSens* /CVodeSensMalloc/CVodeSensReInit Error Messages */ #define MSGCVS_BAD_ITOLS1 "CVodeSetSensTolerances-- Illegal value for itolS.\n" #define MSGCVS_BAD_ITOLS2 "The legal values are CV_SS, CV_SV, and CV_EE.\n\n" #define MSGCVS_BAD_ITOLS MSGCVS_BAD_ITOLS1 MSGCVS_BAD_ITOLS2 #define MSGCVS_RELTOLS_NULL "CVodeSetSensTolerances-- reltolS = NULL illegal.\n\n" #define MSGCVS_ABSTOLS_NULL "CVodeSetSensTolerances-- abstolS = NULL illegal.\n\n" #define _SCVM_ "CVodeSensMalloc/CVodeSensReInit-- " #define MSGCVS_SCVM_NO_MEM _SCVM_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_SCVM_MEM_FAIL _SCVM_ "A memory request failed.\n\n" #define MSGCVS_BAD_NS _SCVM_ "NS <= 0 illegal.\n\n" #define MSGCVS_P_NULL _SCVM_ "p = NULL illegal.\n\n" #define MSGCVS_YS0_NULL _SCVM_ "yS0 = NULL illegal.\n\n" #define MSGCVS_BAD_ISM1 _SCVM_ "Illegal value for ism.\n" #define MSGCVS_BAD_ISM2 "The legal values are: " #define MSGCVS_BAD_ISM3 "CV_SIMULTANEOUS, CV_STAGGERED and CV_STAGGERED1.\n\n" #define MSGCVS_BAD_ISM MSGCVS_BAD_ISM1 MSGCVS_BAD_ISM2 MSGCVS_BAD_ISM3 #define MSGCVS_SREI_SENSI1 "CVodeSensReInit-- Illegal attempt to call before " #define MSGCVS_SREI_SENSI2 "calling CVodeSensMalloc.\n\n" #define MSGCVS_SREI_NO_SENSI MSGCVS_SREI_SENSI1 MSGCVS_SREI_SENSI2 #define MSGCVS_SCVT_NO_MEM "CVodeSensToggle-- cvode_mem = NULL illegal.\n\n" #define MSGCVS_SCVT_SENSI1 "CVodeSensToggle-- Illegal attempt to call before " #define MSGCVS_SCVT_SENSI2 "calling CVodeSensMalloc.\n\n" #define MSGCVS_SCVT_NO_SENSI MSGCVS_SCVT_SENSI1 MSGCVS_SCVT_SENSI2 /* CVode Error Messages */ #define _CVODE_ "CVode-- " #define _CVIS_ "Initial Setup: " #define MSGCVS_CVODE_NO_MEM _CVODE_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_CVODE_NO_MALLOC _CVODE_ "CVodeMalloc has not been called yet.\n\n" #define MSGCVS_BAD_RELTOLS _CVODE_ "*reltolS < 0 illegal.\n\n" #define MSGCVS_BAD_ABSTOLS _CVODE_ "abstolS has negative component(s) (illegal).\n\n" #define MSGCVS_ATOLS_MEM_FAIL _CVODE_ "A memory request failed (abstolS).\n\n" #define MSGCVS_BAD_PBAR _CVODE_ "pbar has component(s) equal to zero (illegal).\n\n" #define MSGCVS_BAD_EWT _CVODE_ _CVIS_ "Initial ewt has component(s) equal to zero (illegal).\n\n" #define MSGCVS_NO_QUADTOL _CVODE_ _CVIS_ "No quad tolerances set. Illegal for errconQ = TRUE.\n\n" #define MSGCVS_BAD_EWTQ _CVODE_ _CVIS_ "Initial ewtQ has component(s) equal to zero (illegal).\n\n" #define MSGCVS_BAD_ISM_IFS _CVODE_ _CVIS_ "Illegal sens. rhs for ism = CV_STAGGERED1.\n\n" #define MSGCVS_BAD_EWTS _CVODE_ _CVIS_ "Initial ewtS has component(s) equal to zero (illegal).\n\n" #define MSGCVS_LSOLVE_NULL _CVODE_ _CVIS_ "The linear solver's solve routine is NULL.\n\n" #define MSGCVS_LINIT_FAIL _CVODE_ _CVIS_ "The linear solver's init routine failed.\n\n" #define MSGCVS_YOUT_NULL _CVODE_ "yout = NULL illegal.\n\n" #define MSGCVS_TRET_NULL _CVODE_ "tret = NULL illegal.\n\n" #define MSGCVS_BAD_ITASK _CVODE_ "Illegal value for itask.\n" #define MSGCVS_NO_TSTOP1 _CVODE_ "itask = CV_NORMAL_TSTOP or itask = CV_ONE_STEP_TSTOP " #define MSGCVS_NO_TSTOP2 "but tstop was not set.\n\n" #define MSGCVS_NO_TSTOP MSGCVS_NO_TSTOP1 MSGCVS_NO_TSTOP2 #define MSGCVS_BAD_H0 _CVODE_ "h0 and tout - t0 are inconsistent.\n\n" #define MSGCVS_HNIL_DONE_1 _CVODE_ "The above warning has been issued mxhnil times " #define MSGCVS_HNIL_DONE_2 "and will not be\nissued again for this problem.\n\n" #define MSGCVS_HNIL_DONE MSGCVS_HNIL_DONE_1 MSGCVS_HNIL_DONE_2 #define MSGCVS_TOO_CLOSE_1 _CVODE_ "tout too close to t0 to start" #define MSGCVS_TOO_CLOSE_2 " integration.\n\n" #define MSGCVS_TOO_CLOSE MSGCVS_TOO_CLOSE_1 MSGCVS_TOO_CLOSE_2 #define MSGCVS_BAD_INIT_ROOT _CVODE_ "Root found at and very near initial t.\n\n" #define MSGCVS_BAD_TOUT_1 _CVODE_ "Trouble interpolating at" MSG_TIME_TOUT ".\n" #define MSGCVS_BAD_TOUT_2 "tout too far back in direction of integration.\n\n" #define MSGCVS_BAD_TOUT MSGCVS_BAD_TOUT_1 MSGCVS_BAD_TOUT_2 #define MSGCVS_MAX_STEPS_1 _CVODE_ "At " MSG_TIME ", mxstep steps taken" #define MSGCVS_MAX_STEPS_2 "before reaching tout.\n\n" #define MSGCVS_MAX_STEPS MSGCVS_MAX_STEPS_1 MSGCVS_MAX_STEPS_2 #define MSGCVS_EWT_NOW_BAD_1 _CVODE_ "At " MSG_TIME ", a component of ewt has become <= 0.\n\n" #define MSGCVS_EWT_NOW_BAD MSGCVS_EWT_NOW_BAD_1 #define MSGCVS_EWTS_NOW_BAD_1 _CVODE_ "At " MSG_TIME ", a component of ewtS has become <= 0.\n\n" #define MSGCVS_EWTS_NOW_BAD MSGCVS_EWTS_NOW_BAD_1 #define MSGCVS_EWTQ_NOW_BAD_1 _CVODE_ "At " MSG_TIME ", a component of ewtQ has become <= 0.\n\n" #define MSGCVS_EWTQ_NOW_BAD MSGCVS_EWTQ_NOW_BAD_1 #define MSGCVS_TOO_MUCH_ACC _CVODE_ "At " MSG_TIME ", too much accuracy requested.\n\n" #define MSGCVS_HNIL_1 _CVODE_ "Warning: Internal " MSG_TIME_H #define MSGCVS_HNIL_2 "\nare such that t + h = t on the next step.\n" #define MSGCVS_HNIL_3 "The solver will continue anyway.\n\n" #define MSGCVS_HNIL MSGCVS_HNIL_1 MSGCVS_HNIL_2 MSGCVS_HNIL_3 #define MSGCVS_ERR_FAILS_1 _CVODE_ "At " MSG_TIME_H ", the error test\n" #define MSGCVS_ERR_FAILS_2 "failed repeatedly or with |h| = hmin.\n\n" #define MSGCVS_ERR_FAILS MSGCVS_ERR_FAILS_1 MSGCVS_ERR_FAILS_2 #define MSGCVS_CONV_FAILS_1 _CVODE_ "At " MSG_TIME_H ", the corrector\n" #define MSGCVS_CONV_FAILS_2 "convergence failed repeatedly or " #define MSGCVS_CONV_FAILS_3 "with |h| = hmin.\n\n" #define MSGCVS_CONV_FAILS MSGCVS_CONV_FAILS_1 MSGCVS_CONV_FAILS_2 MSGCVS_CONV_FAILS_3 #define MSGCVS_SETUP_FAILED_1 _CVODE_ "At " MSG_TIME ", the setup routine failed " #define MSGCVS_SETUP_FAILED_2 "in an unrecoverable manner.\n\n" #define MSGCVS_SETUP_FAILED MSGCVS_SETUP_FAILED_1 MSGCVS_SETUP_FAILED_2 #define MSGCVS_SOLVE_FAILED_1 _CVODE_ "At " MSG_TIME ", the solve routine failed in an " #define MSGCVS_SOLVE_FAILED_2 "unrecoverable manner.\n\n" #define MSGCVS_SOLVE_FAILED MSGCVS_SOLVE_FAILED_1 MSGCVS_SOLVE_FAILED_2 #define MSGCVS_BAD_TSTOP_1 _CVODE_ "tstop is behind current " MSG_TIME #define MSGCVS_BAD_TSTOP_2 "\nin the direction of integration.\n\n" #define MSGCVS_BAD_TSTOP MSGCVS_BAD_TSTOP_1 MSGCVS_BAD_TSTOP_2 #define MSGCVS_CLOSE_ROOTS _CVODE_ "Root found at and very near current " MSG_TIME ".\n\n" /* CVodeGetDky Error Messages */ #define _DKY_ "CVodeGetDky-- " #define MSGCVS_DKY_NO_MEM _DKY_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_BAD_K _DKY_ "Illegal value for k.\n\n" #define MSGCVS_BAD_DKY _DKY_ "dky = NULL illegal.\n\n" #define MSGCVS_BAD_T1 _DKY_ "Illegal value for t.\n" #define MSGCVS_BAD_T2 MSG_TIME_INT #define MSGCVS_BAD_T MSGCVS_BAD_T1 MSGCVS_BAD_T2 /* CVodeGetSens/CVodeGetSens1/CVodeGetSensDky1/CVodeGetSensDky Error Messages */ #define _SDKY_ "CVodeGetSens/CVodeGetSens1/CVodeGetSensDky/CVodeGetSensDky1-- " #define MSGCVS_SDKY_NO_MEM _SDKY_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_SDKY_SENSI_1 "Illegal attempt to call before " #define MSGCVS_SDKY_SENSI_2 "calling CVodeSensMalloc.\n\n" #define MSGCVS_SDKY_NO_SENSI _SDKY_ MSGCVS_SDKY_SENSI_1 MSGCVS_SDKY_SENSI_2 #define MSGCVS_SBAD_IS _SDKY_ "Illegal value for is.\n\n" #define MSGCVS_SBAD_K _SDKY_ "Illegal value for k.\n\n" #define MSGCVS_SBAD_T_1 _SDKY_ "Illegal value for t.\n" #define MSGCVS_SBAD_T_2 "t not in interval tcur - hu to tcur.\n\n" #define MSGCVS_SBAD_T MSGCVS_SBAD_T_1 MSGCVS_SBAD_T_2 #define MSGCVS_SBAD_DKYA _SDKY_ "dkyA = NULL illegal.\n\n" #define MSGCVS_SBAD_DKY _SDKY_ "dky = NULL illegal.\n\n" /* CVodeGetQuad/CVodeGetQuadDky Error Messages */ #define _QDKY_ "CVodeGetQuad/CVodeGetQuadDky-- " #define MSGCVS_QDKY_NO_MEM _QDKY_ "cvode_mem = NULL illegal.\n\n" #define MSGCVS_QDKY_QUAD_1 "Illegal attempt to call before " #define MSGCVS_QDKY_QUAD_2 "calling CVodeQuadMalloc.\n\n" #define MSGCVS_QDKY_NO_QUAD _QDKY_ MSGCVS_QDKY_QUAD_1 MSGCVS_QDKY_QUAD_2 #define MSGCVS_QBAD_DKY _QDKY_ "dky = NULL illegal.\n\n" #define MSGCVS_QBAD_K _QDKY_ "Illegal value for k.\n\n" #define MSGCVS_QBAD_T_1 _QDKY_ "Illegal value for t.\n" #define MSGCVS_QBAD_T_2 MSG_TIME_INT #define MSGCVS_QBAD_T MSGCVS_QBAD_T_1 MSGCVS_QBAD_T_2 /* CVodeGet* Error Messages */ #define MSGCVS_GET_NO_MEM "cvode_mem = NULL in a CVodeGet routine illegal. \n\n" #define MSGCVS_GET_NO_SLDET1 "CVodeGetNumStabLimOrderReds-- Illegal attempt " #define MSGCVS_GET_NO_SLDET2 "to call without enabling SLDET.\n\n" #define MSGCVS_GET_NO_SLDET MSGCVS_GET_NO_SLDET1 MSGCVS_GET_NO_SLDET2 #define MSGCVS_GET_NO_QUAD1 "CVodeGetQuad*-- Illegal attempt to call before " #define MSGCVS_GET_NO_QUAD2 "calling CVodeQuadMalloc.\n\n" #define MSGCVS_GET_NO_QUAD MSGCVS_GET_NO_QUAD1 MSGCVS_GET_NO_QUAD2 #define MSGCVS_GET_NO_SENSI1 "CVodeGetSens*-- Illegal attempt to call before " #define MSGCVS_GET_NO_SENSI2 "calling CVodeSensMalloc.\n\n" #define MSGCVS_GET_NO_SENSI MSGCVS_GET_NO_SENSI1 MSGCVS_GET_NO_SENSI2 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvodesio.c000077500000000000000000001005041323325274500205570ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the optional input and output * functions for the CVODES solver. * ----------------------------------------------------------------- */ #include #include #include "cvodes_impl.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* * ================================================================= * CVODE optional input functions * ================================================================= */ /* * CVodeSetErrFile * * Specifies the FILE pointer for output (NULL means no messages) */ int CVodeSetErrFile(void *cvode_mem, FILE *errfp) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_errfp = errfp; return(CV_SUCCESS); } #define errfp (cv_mem->cv_errfp) /* * CVodeSetIterType * * Specifies the iteration type (CV_FUNCTIONAL or CV_NEWTON) */ int CVodeSetIterType(void *cvode_mem, int iter) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if ((iter != CV_FUNCTIONAL) && (iter != CV_NEWTON)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_ITER); return (CV_ILL_INPUT); } cv_mem->cv_iter = iter; return(CV_SUCCESS); } /* * CVodeSetFdata * * Specifies the user data pointer for f */ int CVodeSetFdata(void *cvode_mem, void *f_data) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_f_data = f_data; return(CV_SUCCESS); } /* * CVodeSetGdata * * Specifies the user data pointer for g */ int CVodeSetGdata(void *cvode_mem, void *g_data) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_g_data = g_data; return(CV_SUCCESS); } /* * CVodeSetMaxOrd * * Specifies the maximum method order */ int CVodeSetMaxOrd(void *cvode_mem, int maxord) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (maxord <= 0) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_NEG_MAXORD); return(CV_ILL_INPUT); } if (maxord > cv_mem->cv_qmax) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_MAXORD); return(CV_ILL_INPUT); } cv_mem->cv_qmax = maxord; return(CV_SUCCESS); } /* * CVodeSetMaxNumSteps * * Specifies the maximum number of integration steps */ int CVodeSetMaxNumSteps(void *cvode_mem, long int mxsteps) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (mxsteps<=0) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_NEG_MXSTEPS); return(CV_ILL_INPUT); } cv_mem->cv_mxstep = mxsteps; return(CV_SUCCESS); } /* * CVodeSetMaxHnilWarns * * Specifies the maximum number of warnings for small h */ int CVodeSetMaxHnilWarns(void *cvode_mem, int mxhnil) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_mxhnil = mxhnil; return(CV_SUCCESS); } /* *CVodeSetStabLimDet * * Turns on/off the stability limit detection algorithm */ int CVodeSetStabLimDet(void *cvode_mem, booleantype sldet) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if(cv_mem->cv_lmm != CV_BDF) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_SLDET); return(CV_ILL_INPUT); } cv_mem->cv_sldeton = sldet; return(CV_SUCCESS); } /* * CVodeSetInitStep * * Specifies the initial step size */ int CVodeSetInitStep(void *cvode_mem, realtype hin) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_hin = hin; return(CV_SUCCESS); } /* * CVodeSetMinStep * * Specifies the minimum step size */ int CVodeSetMinStep(void *cvode_mem, realtype hmin) { realtype hmax; CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (hmin<=0) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_NEG_HMIN); return(CV_ILL_INPUT); } if (hmin * cv_mem->cv_hmax_inv > ONE) { hmax = ONE/cv_mem->cv_hmax_inv; if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_HMIN_HMAX); return(CV_ILL_INPUT); } cv_mem->cv_hmin = hmin; return(CV_SUCCESS); } /* * CVodeSetMaxStep * * Specifies the maximum step size */ int CVodeSetMaxStep(void *cvode_mem, realtype hmax) { realtype hmax_inv; CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (hmax <= 0) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_NEG_HMAX); return(CV_ILL_INPUT); } hmax_inv = ONE/hmax; if (hmax_inv * cv_mem->cv_hmin > ONE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_HMIN_HMAX); return(CV_ILL_INPUT); } cv_mem->cv_hmax_inv = hmax_inv; return(CV_SUCCESS); } /* * CVodeSetStopTime * * Specifies the time beyond which the integration is not to * proceed */ int CVodeSetStopTime(void *cvode_mem, realtype tstop) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_tstop = tstop; cv_mem->cv_tstopset = TRUE; return(CV_SUCCESS); } /* * CVodeSetMaxErrTestFails * * Specifies the maximum number of error test failures during one * step try. */ int CVodeSetMaxErrTestFails(void *cvode_mem, int maxnef) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_maxnef = maxnef; return(CV_SUCCESS); } /* * CVodeSetMaxConvFails * * Specifies the maximum number of nonlinear convergence failures * during one step try. */ int CVodeSetMaxConvFails(void *cvode_mem, int maxncf) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_maxncf = maxncf; return(CV_SUCCESS); } /* * CVodeSetMaxNonlinIters * * Specifies the maximum number of nonlinear iterations during * one solve. */ int CVodeSetMaxNonlinIters(void *cvode_mem, int maxcor) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_maxcor = maxcor; return(CV_SUCCESS); } /* * CVodeSetNonlinConvCoef * * Specifies the coeficient in the nonlinear solver convergence * test */ int CVodeSetNonlinConvCoef(void *cvode_mem, realtype nlscoef) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_nlscoef = nlscoef; return(CV_SUCCESS); } /* * CVodeSetTolerances * * Changes te integration tolerances between calls to CVode() */ int CVodeSetTolerances(void *cvode_mem, int itol, realtype *reltol, void *abstol) { CVodeMem cv_mem; booleantype neg_abstol; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if ((itol != CV_SS) && (itol != CV_SV)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_ITOL); return(CV_ILL_INPUT); } if (*reltol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_RELTOL); return(CV_ILL_INPUT); } if (abstol == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_ABSTOL_NULL); return(CV_ILL_INPUT); } if (itol == CV_SS) { neg_abstol = (*((realtype *)abstol) < ZERO); } else { neg_abstol = (N_VMin((N_Vector)abstol) < ZERO); } if (neg_abstol) { if(errfp!=NULL) fprintf(errfp, MSGCVS_SET_BAD_ABSTOL); return(CV_ILL_INPUT); } cv_mem->cv_itol = itol; cv_mem->cv_reltol = reltol; cv_mem->cv_abstol = abstol; return(CV_SUCCESS); } /* * ================================================================= * Quadrature optional input functions * ================================================================= */ int CVodeSetQuadFdata(void *cvode_mem, void *fQ_data) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_fQ_data = fQ_data; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetQuadErrCon(void *cvode_mem, booleantype errconQ) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_errconQ = errconQ; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetQuadTolerances(void *cvode_mem, int itolQ, realtype *reltolQ, void *abstolQ) { CVodeMem cv_mem; booleantype neg_abstol; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if ((itolQ != CV_SS) && (itolQ != CV_SV)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ITOLQ); return(CV_ILL_INPUT); } if (reltolQ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_RELTOLQ_NULL); return(CV_ILL_INPUT); } if (*reltolQ < ZERO) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_RELTOLQ); return(CV_ILL_INPUT); } if (abstolQ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_ABSTOLQ_NULL); return(CV_ILL_INPUT); } if (itolQ == CV_SS) { neg_abstol = (*((realtype *)abstolQ) < ZERO); } else { neg_abstol = (N_VMin((N_Vector)abstolQ) < ZERO); } if (neg_abstol) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ABSTOLQ); return(CV_ILL_INPUT); } cv_mem->cv_itolQ = itolQ; cv_mem->cv_reltolQ = reltolQ; cv_mem->cv_abstolQ = abstolQ; return(CV_SUCCESS); } /* * ================================================================= * FSA optional input functions * ================================================================= */ int CVodeSetSensRhsFn(void *cvode_mem, CVSensRhsFn fS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_ifS = CV_ALLSENS; if (fS != NULL) { cv_mem->cv_fS = fS; cv_mem->cv_fSDQ = FALSE; } else { cv_mem->cv_fS = CVSensRhsDQ; cv_mem->cv_fS_data = cvode_mem; cv_mem->cv_fSDQ = TRUE; } return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensRhs1Fn(void *cvode_mem, CVSensRhs1Fn fS1) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_ifS = CV_ONESENS; if(fS1 != NULL) { cv_mem->cv_fS1 = fS1; cv_mem->cv_fSDQ = FALSE; } else { cv_mem->cv_fS1 = CVSensRhs1DQ; cv_mem->cv_fS_data = cvode_mem; cv_mem->cv_fSDQ = TRUE; } return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensFdata(void *cvode_mem, void *fS_data) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_fS_data = fS_data; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensRho(void *cvode_mem, realtype rho) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_rhomax = rho; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensPbar(void *cvode_mem, realtype *pbar) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_pbar = pbar; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensErrCon(void *cvode_mem, booleantype errconS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_errconS = errconS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensMaxNonlinIters(void *cvode_mem, int maxcorS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return (CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; cv_mem->cv_maxcorS = maxcorS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeSetSensTolerances(void *cvode_mem, int itolS, realtype *reltolS, void *abstolS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_SET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if ((itolS != CV_SS) && (itolS != CV_SV) && (itolS != CV_EE)) { if(errfp!=NULL) fprintf(errfp, MSGCVS_BAD_ITOLS); return(CV_ILL_INPUT); } if (itolS == CV_EE) { /* CVODES will set tolerances */ cv_mem->cv_setSensTol = TRUE; cv_mem->cv_testSensTol = FALSE; } else { /* Test user-supplied tolerances */ if (reltolS == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_RELTOLS_NULL); return(CV_ILL_INPUT); } if (abstolS == NULL) { if(errfp!=NULL) fprintf(errfp, MSGCVS_ABSTOLS_NULL); return(CV_ILL_INPUT); } cv_mem->cv_itolS = itolS; cv_mem->cv_reltolS = reltolS; cv_mem->cv_abstolS = abstolS; cv_mem->cv_setSensTol = FALSE; cv_mem->cv_testSensTol = TRUE; } return(CV_SUCCESS); } /* * ================================================================= * CVODE optional output functions * ================================================================= */ /* * Readability constants */ #define nst (cv_mem->cv_nst) #define nfe (cv_mem->cv_nfe) #define ncfn (cv_mem->cv_ncfn) #define netf (cv_mem->cv_netf) #define nni (cv_mem->cv_nni) #define nsetups (cv_mem->cv_nsetups) #define q (cv_mem->cv_q) #define next_q (cv_mem->cv_next_q) #define ewt (cv_mem->cv_ewt) #define h (cv_mem->cv_h) #define next_h (cv_mem->cv_next_h) #define h0u (cv_mem->cv_h0u) #define tolsf (cv_mem->cv_tolsf) #define acor (cv_mem->cv_acor) #define lrw (cv_mem->cv_lrw) #define liw (cv_mem->cv_liw) #define nge (cv_mem->cv_nge) #define iroots (cv_mem->cv_iroots) #define nor (cv_mem->cv_nor) #define sldeton (cv_mem->cv_sldeton) #define tn (cv_mem->cv_tn) /* * CVodeGetNumSteps * * Returns the current number of integration steps */ int CVodeGetNumSteps(void *cvode_mem, long int *nsteps) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nsteps = nst; return(CV_SUCCESS); } /* * CVodeGetNumRhsEvals * * Returns the current number of calls to f */ int CVodeGetNumRhsEvals(void *cvode_mem, long int *nfevals) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nfevals = nfe; return(CV_SUCCESS); } /* * CVodeGetNumLinSolvSetups * * Returns the current number of calls to the linear solver setup routine */ int CVodeGetNumLinSolvSetups(void *cvode_mem, long int *nlinsetups) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nlinsetups = nsetups; return(CV_SUCCESS); } /* * CVodeGetNumErrTestFails * * Returns the current number of error test failures */ int CVodeGetNumErrTestFails(void *cvode_mem, long int *netfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *netfails = netf; return(CV_SUCCESS); } /* * CVodeGetLastOrder * * Returns the order on the last succesful step */ int CVodeGetLastOrder(void *cvode_mem, int *qlast) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *qlast = q; return(CV_SUCCESS); } /* * CVodeGetCurrentOrder * * Returns the order to be attempted on the next step */ int CVodeGetCurrentOrder(void *cvode_mem, int *qcur) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *qcur = next_q; return(CV_SUCCESS); } /* * CVodeGetNumStabLimOrderReds * * Returns the number of order reductions triggered by the stability * limit detection algorithm */ int CVodeGetNumStabLimOrderReds(void *cvode_mem, long int *nslred) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sldeton==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SLDET); return(CV_NO_SLDET); } *nslred = nor; return(CV_SUCCESS); } /* * CVodeGetActualInitStep * * Returns the step size used on the first step */ int CVodeGetActualInitStep(void *cvode_mem, realtype *hinused) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *hinused = h0u; return(CV_SUCCESS); } /* * CVodeGetLastStep * * Returns the step size used on the last successful step */ int CVodeGetLastStep(void *cvode_mem, realtype *hlast) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *hlast = h; return(CV_SUCCESS); } /* * CVodeGetCurrentStep * * Returns the step size to be attempted on the next step */ int CVodeGetCurrentStep(void *cvode_mem, realtype *hcur) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *hcur = next_h; return(CV_SUCCESS); } /* * CVodeGetCurrentTime * * Returns the current value of the independent variable */ int CVodeGetCurrentTime(void *cvode_mem, realtype *tcur) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *tcur = tn; return(CV_SUCCESS); } /* * CVodeGetTolScaleFactor * * Returns a suggested factor for scaling tolerances */ int CVodeGetTolScaleFactor(void *cvode_mem, realtype *tolsfact) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *tolsfact = tolsf; return(CV_SUCCESS); } /* * CVodeGetErrWeights * * This routine returns the current weight vector for y in weight. * Note that weight need not be allocated by the user. */ int CVodeGetErrWeights(void *cvode_mem, N_Vector *eweight) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *eweight = ewt; return(CV_SUCCESS); } /* * CVodeGetEstLocalErrors * * Returns an estimate of the local error */ int CVodeGetEstLocalErrors(void *cvode_mem, N_Vector *ele) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *ele = acor; return(CV_SUCCESS); } /* * CVodeGetWorkSpace * * Returns integrator work space requirements */ int CVodeGetWorkSpace(void *cvode_mem, long int *lenrw, long int *leniw) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *leniw = liw; *lenrw = lrw; return(CV_SUCCESS); } /* * CVodeGetIntegratorStats * * Returns integrator statistics */ int CVodeGetIntegratorStats(void *cvode_mem, long int *nsteps, long int *nfevals, long int *nlinsetups, long int *netfails, int *qlast, int *qcur, realtype *hinused, realtype *hlast, realtype *hcur, realtype *tcur) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nsteps = nst; *nfevals = nfe; *nlinsetups = nsetups; *netfails = netf; *qlast = q; *qcur = next_q; *hinused = h0u; *hlast = h; *hcur = next_h; *tcur = tn; return(CV_SUCCESS); } /* * CVodeGetNumGEvals * * Returns the current number of calls to g (for rootfinding) */ int CVodeGetNumGEvals(void *cvode_mem, long int *ngevals) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *ngevals = nge; return(CV_SUCCESS); } /* * CVodeGetRootInfo * * Returns pointer to array rootsfound showing roots found */ int CVodeGetRootInfo(void *cvode_mem, int **rootsfound) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *rootsfound = iroots; return(CV_SUCCESS); } /* * CVodeGetNumNonlinSolvIters * * Returns the current number of iterations in the nonlinear solver */ int CVodeGetNumNonlinSolvIters(void *cvode_mem, long int *nniters) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nniters = nni; return(CV_SUCCESS); } /* * CVodeGetNumNonlinSolvConvFails * * Returns the current number of convergence failures in the * nonlinear solver */ int CVodeGetNumNonlinSolvConvFails(void *cvode_mem, long int *nncfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nncfails = ncfn; return(CV_SUCCESS); } /* * CVodeGetNonlinSolvStats * * Returns nonlinear solver statistics */ int CVodeGetNonlinSolvStats(void *cvode_mem, long int *nniters, long int *nncfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; *nniters = nni; *nncfails = ncfn; return(CV_SUCCESS); } /* * ================================================================= * Quadrature optional output functions * ================================================================= */ /* * Readability constants */ #define quadr (cv_mem->cv_quadr) #define nfQe (cv_mem->cv_nfQe) #define netfQ (cv_mem->cv_netfQ) #define ewtQ (cv_mem->cv_ewtQ) #define errconQ (cv_mem->cv_errconQ) /*-----------------------------------------------------------------*/ int CVodeGetQuadNumRhsEvals(void *cvode_mem, long int *nfQevals) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (quadr==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_QUAD); return(CV_NO_QUAD); } *nfQevals = nfQe; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetQuadNumErrTestFails(void *cvode_mem, long int *nQetfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (quadr==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_QUAD); return(CV_NO_QUAD); } *nQetfails = netfQ; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetQuadErrWeights(void *cvode_mem, N_Vector *eQweight) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (quadr==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_QUAD); return(CV_NO_QUAD); } if(errconQ) *eQweight = ewtQ; else *eQweight = NULL; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetQuadStats(void *cvode_mem, long int *nfQevals, long int *nQetfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (quadr==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_QUAD); return(CV_NO_QUAD); } *nfQevals = nfQe; *nQetfails = netfQ; return(CV_SUCCESS); } /* * ================================================================= * FSA optional output functions * ================================================================= */ /* * Readability constants */ #define sensi (cv_mem->cv_sensi) #define ism (cv_mem->cv_ism) #define ewtS (cv_mem->cv_ewtS) #define nfSe (cv_mem->cv_nfSe) #define nfeS (cv_mem->cv_nfeS) #define nniS (cv_mem->cv_nniS) #define ncfnS (cv_mem->cv_ncfnS) #define netfS (cv_mem->cv_netfS) #define nsetupsS (cv_mem->cv_nsetupsS) #define nniS1 (cv_mem->cv_nniS1) #define ncfnS1 (cv_mem->cv_ncfnS1) #define ncfS1 (cv_mem->cv_ncfS1) /*-----------------------------------------------------------------*/ int CVodeGetNumSensRhsEvals(void *cvode_mem, long int *nfSevals) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nfSevals = nfSe; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumRhsEvalsSens(void *cvode_mem, long int *nfevalsS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nfevalsS = nfeS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumSensErrTestFails(void *cvode_mem, long int *nSetfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nSetfails = netfS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumSensLinSolvSetups(void *cvode_mem, long int *nlinsetupsS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nlinsetupsS = nsetupsS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetSensErrWeights(void *cvode_mem, N_Vector_S *eSweight) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *eSweight = ewtS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetSensStats(void *cvode_mem, long int *nfSevals, long int *nfevalsS, long int *nSetfails, long int *nlinsetupsS) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nfSevals = nfSe; *nfevalsS = nfeS; *nSetfails = netfS; *nlinsetupsS = nsetupsS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumSensNonlinSolvIters(void *cvode_mem, long int *nSniters) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nSniters = nniS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumSensNonlinSolvConvFails(void *cvode_mem, long int *nSncfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nSncfails = ncfnS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumStgrSensNonlinSolvIters(void *cvode_mem, long int *nSTGR1niters) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } if(ism==CV_STAGGERED1) nSTGR1niters = nniS1; else nSTGR1niters = NULL; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetNumStgrSensNonlinSolvConvFails(void *cvode_mem, long int *nSTGR1ncfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } if(ism==CV_STAGGERED1) nSTGR1ncfails = ncfnS1; else nSTGR1ncfails = NULL; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetSensNonlinSolvStats(void *cvode_mem, long int *nSniters, long int *nSncfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } *nSniters = nniS; *nSncfails = ncfnS; return(CV_SUCCESS); } /*-----------------------------------------------------------------*/ int CVodeGetStgrSensNonlinSolvStats(void *cvode_mem, long int *nSTGR1niters, long int *nSTGR1ncfails) { CVodeMem cv_mem; if (cvode_mem==NULL) { fprintf(stderr, MSGCVS_GET_NO_MEM); return(CV_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (sensi==FALSE) { if(errfp!=NULL) fprintf(errfp, MSGCVS_GET_NO_SENSI); return(CV_NO_SENS); } if(ism==CV_STAGGERED1) { nSTGR1niters = nniS1; nSTGR1ncfails = ncfnS1; } else { nSTGR1niters = NULL; nSTGR1ncfails = NULL; } return(CV_SUCCESS); } neuron-7.5/src/sundials/cvodes/cvspgmr.c000077500000000000000000000670471323325274500204430ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the CVSPGMR linear solver. * ----------------------------------------------------------------- */ #include #include #include "cvspgmr_impl.h" #include "cvodes_impl.h" #include "sundialsmath.h" /* Other Constants */ #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* CVSPGMR linit, lsetup, lsolve, and lfree routines */ static int CVSpgmrInit(CVodeMem cv_mem); static int CVSpgmrSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3); static int CVSpgmrSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ynow, N_Vector fnow); static void CVSpgmrFree(CVodeMem cv_mem); /* CVSPGMR Atimes and PSolve routines called by generic SPGMR solver */ static int CVSpgmrAtimes(void *cv_mem, N_Vector v, N_Vector z); static int CVSpgmrPSolve(void *cv_mem, N_Vector r, N_Vector z, int lr); /* CVSPGMR difference quotient routine for J*v */ static int CVSpgmrDQJtimes(N_Vector v, N_Vector Jv, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector work); /* Readability Replacements */ #define lrw1 (cv_mem->cv_lrw1) #define liw1 (cv_mem->cv_liw1) #define uround (cv_mem->cv_uround) #define tq (cv_mem->cv_tq) #define nst (cv_mem->cv_nst) #define tn (cv_mem->cv_tn) #define h (cv_mem->cv_h) #define gamma (cv_mem->cv_gamma) #define gammap (cv_mem->cv_gammap) #define nfe (cv_mem->cv_nfe) #define f (cv_mem->cv_f) #define f_data (cv_mem->cv_f_data) #define ewt (cv_mem->cv_ewt) #define errfp (cv_mem->cv_errfp) #define mnewt (cv_mem->cv_mnewt) #define ropt (cv_mem->cv_ropt) #define linit (cv_mem->cv_linit) #define lsetup (cv_mem->cv_lsetup) #define lsolve (cv_mem->cv_lsolve) #define lfree (cv_mem->cv_lfree) #define lmem (cv_mem->cv_lmem) #define vec_tmpl (cv_mem->cv_tempv) #define setupNonNull (cv_mem->cv_setupNonNull) #define sqrtN (cvspgmr_mem->g_sqrtN) #define ytemp (cvspgmr_mem->g_ytemp) #define x (cvspgmr_mem->g_x) #define ycur (cvspgmr_mem->g_ycur) #define fcur (cvspgmr_mem->g_fcur) #define delta (cvspgmr_mem->g_delta) #define deltar (cvspgmr_mem->g_deltar) #define npe (cvspgmr_mem->g_npe) #define nli (cvspgmr_mem->g_nli) #define nps (cvspgmr_mem->g_nps) #define ncfl (cvspgmr_mem->g_ncfl) #define nstlpre (cvspgmr_mem->g_nstlpre) #define njtimes (cvspgmr_mem->g_njtimes) #define nfeSG (cvspgmr_mem->g_nfeSG) #define spgmr_mem (cvspgmr_mem->g_spgmr_mem) #define last_flag (cvspgmr_mem->g_last_flag) /* * ----------------------------------------------------------------- * CVSpgmr * ----------------------------------------------------------------- * This routine initializes the memory record and sets various function * fields specific to the Spgmr linear solver module. CVSpgmr first * calls the existing lfree routine if this is not NULL. It then sets * the cv_linit, cv_lsetup, cv_lsolve, cv_lfree fields in (*cvode_mem) * to be CVSpgmrInit, CVSpgmrSetup, CVSpgmrSolve, and CVSpgmrFree, * respectively. It allocates memory for a structure of type * CVSpgmrMemRec and sets the cv_lmem field in (*cvode_mem) to the * address of this structure. It sets setupNonNull in (*cvode_mem), * and sets the following fields in the CVSpgmrMemRec structure: * g_pretype = pretype * g_gstype = gstype * g_maxl = MIN(N,CVSPGMR_MAXL) if maxl <= 0 * = maxl if maxl > 0 * g_delt = CVSPGMR_DELT if delt == 0.0 * = delt if delt != 0.0 * g_P_data = P_data * g_pset = pset * g_psolve = psolve * g_jtimes = input parameter jtimes if jtimes != NULL * = CVSpgmrDQJtimes otherwise * g_j_data = input parameter jac_data * Finally, CVSpgmr allocates memory for ytemp and x, and calls * SpgmrMalloc to allocate memory for the Spgmr solver. * ----------------------------------------------------------------- */ int CVSpgmr(void *cvode_mem, int pretype, int maxl) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; int mxl; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; /* Check if N_VDotProd is present */ if(vec_tmpl->ops->nvdotprod == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_BAD_NVECTOR); return(CVSPGMR_ILL_INPUT); } if (lfree != NULL) lfree(cv_mem); /* Set four main function fields in cv_mem */ linit = CVSpgmrInit; lsetup = CVSpgmrSetup; lsolve = CVSpgmrSolve; lfree = CVSpgmrFree; /* Get memory for CVSpgmrMemRec */ cvspgmr_mem = (CVSpgmrMem) malloc(sizeof(CVSpgmrMemRec)); if (cvspgmr_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); return(CVSPGMR_MEM_FAIL); } /* Set Spgmr parameters that have been passed in call sequence */ cvspgmr_mem->g_pretype = pretype; mxl = cvspgmr_mem->g_maxl = (maxl <= 0) ? CVSPGMR_MAXL : maxl; /* Set default values for the rest of the Spgmr parameters */ cvspgmr_mem->g_gstype = MODIFIED_GS; cvspgmr_mem->g_delt = CVSPGMR_DELT; cvspgmr_mem->g_P_data = NULL; cvspgmr_mem->g_pset = NULL; cvspgmr_mem->g_psolve = NULL; cvspgmr_mem->g_jtimes = CVSpgmrDQJtimes; cvspgmr_mem->g_j_data = cvode_mem; cvspgmr_mem->g_last_flag = CVSPGMR_SUCCESS; setupNonNull = FALSE; /* Check for legal pretype */ if ((pretype != PREC_NONE) && (pretype != PREC_LEFT) && (pretype != PREC_RIGHT) && (pretype != PREC_BOTH)) { if(errfp!=NULL) fprintf(errfp, MSGS_BAD_PRETYPE); return(CVSPGMR_ILL_INPUT); } /* Allocate memory for ytemp and x */ ytemp = N_VClone(vec_tmpl); if (ytemp == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); return(CVSPGMR_MEM_FAIL); } x = N_VClone(vec_tmpl); if (x == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); N_VDestroy(ytemp); return(CVSPGMR_MEM_FAIL); } /* Compute sqrtN from a dot product */ N_VConst(ONE, ytemp); sqrtN = RSqrt( N_VDotProd(ytemp, ytemp) ); /* Call SpgmrMalloc to allocate workspace for Spgmr */ spgmr_mem = SpgmrMalloc(mxl, vec_tmpl); if (spgmr_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); N_VDestroy(ytemp); N_VDestroy(x); return(CVSPGMR_MEM_FAIL); } /* Attach linear solver memory to integrator memory */ lmem = cvspgmr_mem; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetPrecType * ----------------------------------------------------------------- */ int CVSpgmrSetPrecType(void *cvode_mem, int pretype) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; /* Check for legal pretype */ if ((pretype != PREC_NONE) && (pretype != PREC_LEFT) && (pretype != PREC_RIGHT) && (pretype != PREC_BOTH)) { if(errfp!=NULL) fprintf(errfp, MSGS_SET_BAD_PRETYPE); return(CVSPGMR_ILL_INPUT); } cvspgmr_mem->g_pretype = pretype; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetGSType * ----------------------------------------------------------------- */ int CVSpgmrSetGSType(void *cvode_mem, int gstype) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; /* Check for legal gstype */ if ((gstype != MODIFIED_GS) && (gstype != CLASSICAL_GS)) { if(errfp!=NULL) fprintf(errfp, MSGS_SET_BAD_GSTYPE); return(CVSPGMR_ILL_INPUT); } cvspgmr_mem->g_gstype = gstype; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetDelt * ----------------------------------------------------------------- */ int CVSpgmrSetDelt(void *cvode_mem, realtype delt) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; /* Check for legal delt */ if(delt < ZERO) { if(errfp!=NULL) fprintf(errfp, MSGS_SET_BAD_DELT); return(CVSPGMR_ILL_INPUT); } cvspgmr_mem->g_delt = (delt == ZERO) ? CVSPGMR_DELT : delt; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetPrecSetupFn * ----------------------------------------------------------------- */ int CVSpgmrSetPrecSetupFn(void *cvode_mem, CVSpgmrPrecSetupFn pset) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; cvspgmr_mem->g_pset = pset; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetPrecSolveFn * ----------------------------------------------------------------- */ int CVSpgmrSetPrecSolveFn(void *cvode_mem, CVSpgmrPrecSolveFn psolve) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; cvspgmr_mem->g_psolve = psolve; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetPrecData * ----------------------------------------------------------------- */ int CVSpgmrSetPrecData(void *cvode_mem, void *P_data) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; cvspgmr_mem->g_P_data = P_data; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetJacTimesVecFn * ----------------------------------------------------------------- */ int CVSpgmrSetJacTimesVecFn(void *cvode_mem, CVSpgmrJacTimesVecFn jtimes) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; cvspgmr_mem->g_jtimes = jtimes; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrSetJacData * ----------------------------------------------------------------- */ int CVSpgmrSetJacData(void *cvode_mem, void *jac_data) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; cvspgmr_mem->g_j_data = jac_data; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetWorkSpace * ----------------------------------------------------------------- */ int CVSpgmrGetWorkSpace(void *cvode_mem, long int *lenrwSG, long int *leniwSG) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; int maxl; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; maxl = cvspgmr_mem->g_maxl; *lenrwSG = lrw1*(maxl + 5) + maxl*(maxl + 4) + 1; *leniwSG = liw1*(maxl + 5); return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetNumPrecEvals * ----------------------------------------------------------------- */ int CVSpgmrGetNumPrecEvals(void *cvode_mem, long int *npevals) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *npevals = npe; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetNumPrecSolves * ----------------------------------------------------------------- */ int CVSpgmrGetNumPrecSolves(void *cvode_mem, long int *npsolves) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *npsolves = nps; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetNumLinIters * ----------------------------------------------------------------- */ int CVSpgmrGetNumLinIters(void *cvode_mem, long int *nliters) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *nliters = nli; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetNumConvFails * ----------------------------------------------------------------- */ int CVSpgmrGetNumConvFails(void *cvode_mem, long int *nlcfails) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *nlcfails = ncfl; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetNumJtimesEvals * ----------------------------------------------------------------- */ int CVSpgmrGetNumJtimesEvals(void *cvode_mem, long int *njvevals) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *njvevals = njtimes; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetNumRhsEvals * ----------------------------------------------------------------- */ int CVSpgmrGetNumRhsEvals(void *cvode_mem, long int *nfevalsSG) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *nfevalsSG = nfeSG; return(CVSPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * CVSpgmrGetLastFlag * ----------------------------------------------------------------- */ int CVSpgmrGetLastFlag(void *cvode_mem, int *flag) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; /* Return immediately if cvode_mem is NULL */ if (cvode_mem == NULL) { fprintf(stderr, MSGS_SETGET_CVMEM_NULL); return(CVSPGMR_MEM_NULL); } cv_mem = (CVodeMem) cvode_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(CVSPGMR_LMEM_NULL); } cvspgmr_mem = (CVSpgmrMem) lmem; *flag = last_flag; return(CVSPGMR_SUCCESS); } /* Additional readability Replacements */ #define pretype (cvspgmr_mem->g_pretype) #define gstype (cvspgmr_mem->g_gstype) #define delt (cvspgmr_mem->g_delt) #define maxl (cvspgmr_mem->g_maxl) #define psolve (cvspgmr_mem->g_psolve) #define pset (cvspgmr_mem->g_pset) #define P_data (cvspgmr_mem->g_P_data) #define jtimes (cvspgmr_mem->g_jtimes) #define j_data (cvspgmr_mem->g_j_data) /* * ----------------------------------------------------------------- * CVSpgmrInit * ----------------------------------------------------------------- * This routine does remaining initializations specific to the Spgmr * linear solver. * ----------------------------------------------------------------- */ static int CVSpgmrInit(CVodeMem cv_mem) { CVSpgmrMem cvspgmr_mem; cvspgmr_mem = (CVSpgmrMem) lmem; /* Initialize counters */ npe = nli = nps = ncfl = nstlpre = 0; njtimes = nfeSG = 0; /* Check for legal combination pretype - psolve */ if ((pretype != PREC_NONE) && (psolve == NULL)) { if(errfp!=NULL) fprintf(errfp, MSGS_PSOLVE_REQ); last_flag = -1; return(-1); } /* Set setupNonNull = TRUE iff there is preconditioning (pretype != PREC_NONE) and there is a preconditioning setup phase (pset != NULL) */ setupNonNull = (pretype != PREC_NONE) && (pset != NULL); /* If jtimes is NULL at this time, set it to DQ */ if (jtimes == NULL) { jtimes = CVSpgmrDQJtimes; j_data = cv_mem; } last_flag = CVSPGMR_SUCCESS; return(0); } /* * ----------------------------------------------------------------- * CVSpgmrSetup * ----------------------------------------------------------------- * This routine does the setup operations for the Spgmr linear solver. * It makes a decision as to whether or not to signal for re-evaluation * of Jacobian data in the pset routine, based on various state * variables, then it calls pset. If we signal for re-evaluation, * then we reset jcur = *jcurPtr to TRUE, regardless of the pset output. * In any case, if jcur == TRUE, we increment npe and save nst in nstlpre. * ----------------------------------------------------------------- */ static int CVSpgmrSetup(CVodeMem cv_mem, int convfail, N_Vector ypred, N_Vector fpred, booleantype *jcurPtr, N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3) { booleantype jbad, jok; realtype dgamma; int ier; CVSpgmrMem cvspgmr_mem; cvspgmr_mem = (CVSpgmrMem) lmem; /* Use nst, gamma/gammap, and convfail to set J eval. flag jok */ dgamma = ABS((gamma/gammap) - ONE); jbad = (nst == 0) || (nst > nstlpre + CVSPGMR_MSBPRE) || ((convfail == CV_FAIL_BAD_J) && (dgamma < CVSPGMR_DGMAX)) || (convfail == CV_FAIL_OTHER); *jcurPtr = jbad; jok = !jbad; /* Call pset routine and possibly reset jcur */ ier = pset(tn, ypred, fpred, jok, jcurPtr, gamma, P_data, vtemp1, vtemp2, vtemp3); if (jbad) *jcurPtr = TRUE; /* If jcur = TRUE, increment npe and save nst value */ if (*jcurPtr) { npe++; nstlpre = nst; } /* Return the same value ier that pset returned */ last_flag = ier; return(ier); } /* * ----------------------------------------------------------------- * CVSpgmrSolve * ----------------------------------------------------------------- * This routine handles the call to the generic solver SpgmrSolve * for the solution of the linear system Ax = b with the SPGMR method, * without restarts. The solution x is returned in the vector b. * * If the WRMS norm of b is small, we return x = b (if this is the first * Newton iteration) or x = 0 (if a later Newton iteration). * * Otherwise, we set the tolerance parameter and initial guess (x = 0), * call SpgmrSolve, and copy the solution x into b. The x-scaling and * b-scaling arrays are both equal to weight, and no restarts are allowed. * * The counters nli, nps, and ncfl are incremented, and the return value * is set according to the success of SpgmrSolve. The success flag is * returned if SpgmrSolve converged, or if this is the first Newton * iteration and the residual norm was reduced below its initial value. * ----------------------------------------------------------------- */ static int CVSpgmrSolve(CVodeMem cv_mem, N_Vector b, N_Vector weight, N_Vector ynow, N_Vector fnow) { realtype bnorm, res_norm; CVSpgmrMem cvspgmr_mem; int nli_inc, nps_inc, ier; cvspgmr_mem = (CVSpgmrMem) lmem; /* Test norm(b); if small, return x = 0 or x = b */ deltar = delt*tq[4]; bnorm = N_VWrmsNorm(b, weight); if (bnorm <= deltar) { if (mnewt > 0) N_VConst(ZERO, b); return(0); } /* Set vectors ycur and fcur for use by the Atimes and Psolve routines */ ycur = ynow; fcur = fnow; /* Set inputs delta and initial guess x = 0 to SpgmrSolve */ delta = deltar * sqrtN; N_VConst(ZERO, x); /* Call SpgmrSolve and copy x to b */ ier = SpgmrSolve(spgmr_mem, cv_mem, x, b, pretype, gstype, delta, 0, cv_mem, weight, weight, CVSpgmrAtimes, CVSpgmrPSolve, &res_norm, &nli_inc, &nps_inc); N_VScale(ONE, x, b); /* Increment counters nli, nps, and ncfl */ nli += nli_inc; nps += nps_inc; if (ier != 0) ncfl++; /* Set return value to -1, 0, or 1 */ last_flag = ier; if (ier < 0) return(-1); if ((ier == SPGMR_SUCCESS) || ((ier == SPGMR_RES_REDUCED) && (mnewt == 0))) return(0); return(1); } /* * ----------------------------------------------------------------- * CVSpgmrFree * ----------------------------------------------------------------- * This routine frees memory specific to the Spgmr linear solver. * ----------------------------------------------------------------- */ static void CVSpgmrFree(CVodeMem cv_mem) { CVSpgmrMem cvspgmr_mem; cvspgmr_mem = (CVSpgmrMem) lmem; N_VDestroy(ytemp); N_VDestroy(x); SpgmrFree(spgmr_mem); free(cvspgmr_mem); } /* * ----------------------------------------------------------------- * CVSpgmrAtimes * ----------------------------------------------------------------- * This routine generates the matrix-vector product z = Mv, where * M = I - gamma*J. The product J*v is obtained by calling the jtimes * routine. It is then scaled by -gamma and added to v to obtain M*v. * The return value is the same as the value returned by jtimes -- * 0 if successful, nonzero otherwise. * ----------------------------------------------------------------- */ static int CVSpgmrAtimes(void *cvode_mem, N_Vector v, N_Vector z) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; int jtflag; cv_mem = (CVodeMem) cvode_mem; cvspgmr_mem = (CVSpgmrMem) lmem; jtflag = jtimes(v, z, tn, ycur, fcur, j_data, ytemp); njtimes++; if (jtflag != 0) return(jtflag); N_VLinearSum(ONE, v, -gamma, z, z); return(0); } /* * ----------------------------------------------------------------- * CVSpgmrPSolve * ----------------------------------------------------------------- * This routine interfaces between the generic SpgmrSolve routine and * the user's psolve routine. It passes to psolve all required state * information from cvode_mem. Its return value is the same as that * returned by psolve. Note that the generic SPGMR solver guarantees * that CVSpgmrPSolve will not be called in the case in which * preconditioning is not done. This is the only case in which the * user's psolve routine is allowed to be NULL. * ----------------------------------------------------------------- */ static int CVSpgmrPSolve(void *cvode_mem, N_Vector r, N_Vector z, int lr) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; int ier; cv_mem = (CVodeMem) cvode_mem; cvspgmr_mem = (CVSpgmrMem)lmem; ier = psolve(tn, ycur, fcur, r, z, gamma, delta, lr, P_data, ytemp); /* This call is counted in nps within the CVSpgmrSolve routine */ return(ier); } /* * ----------------------------------------------------------------- * CVSpgmrDQJtimes * ----------------------------------------------------------------- * This routine generates a difference quotient approximation to * the Jacobian times vector f_y(t,y) * v. The approximation is * Jv = vnrm[f(y + v/vnrm) - f(y)], where vnrm = (WRMS norm of v) is * input, i.e. the WRMS norm of v/vnrm is 1. * ----------------------------------------------------------------- */ static int CVSpgmrDQJtimes(N_Vector v, N_Vector Jv, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector work) { CVodeMem cv_mem; CVSpgmrMem cvspgmr_mem; realtype vnrm; /* jac_data is cvode_mem */ cv_mem = (CVodeMem) jac_data; cvspgmr_mem = (CVSpgmrMem) lmem; /* Evaluate norm of v */ vnrm = N_VWrmsNorm(v, ewt); /* Set work = y + (1/vnrm) v */ N_VLinearSum(ONE/vnrm, v, ONE, y, work); /* Set Jv = f(tn, work) */ f(t, work, Jv, f_data); nfeSG++; /* Replace Jv by vnrm*(Jv - fy) */ N_VLinearSum(ONE, Jv, -ONE, fy, Jv); N_VScale(vnrm, Jv, Jv); return(0); } neuron-7.5/src/sundials/cvodes/cvspgmr.h000077500000000000000000000400011323325274500204250ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * This is the header file for the CVODE/CVODES scaled, * preconditioned GMRES linear solver, CVSPGMR. * ----------------------------------------------------------------- */ #ifndef _CVSPGMR_H #define _CVSPGMR_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "spgmr.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * CVSPGMR solver constants * ----------------------------------------------------------------- * CVSPGMR_MAXL : default value for the maximum Krylov * dimension * * CVSPGMR_MSBPRE : maximum number of steps between * preconditioner evaluations * * CVSPGMR_DGMAX : maximum change in gamma between * preconditioner evaluations * * CVSPGMR_DELT : default value for factor by which the * tolerance on the nonlinear iteration is * multiplied to get a tolerance on the linear * iteration * ----------------------------------------------------------------- */ #define CVSPGMR_MAXL 5 #define CVSPGMR_MSBPRE 50 #define CVSPGMR_DGMAX RCONST(0.2) #define CVSPGMR_DELT RCONST(0.05) /* * ----------------------------------------------------------------- * Type : CVSpgmrPrecSetupFn * ----------------------------------------------------------------- * The user-supplied preconditioner setup function PrecSetup and * the user-supplied preconditioner solve function PrecSolve * together must define left and right preconditoner matrices * P1 and P2 (either of which may be trivial), such that the * product P1*P2 is an approximation to the Newton matrix * M = I - gamma*J. Here J is the system Jacobian J = df/dy, * and gamma is a scalar proportional to the integration step * size h. The solution of systems P z = r, with P = P1 or P2, * is to be carried out by the PrecSolve function, and PrecSetup * is to do any necessary setup operations. * * The user-supplied preconditioner setup function PrecSetup * is to evaluate and preprocess any Jacobian-related data * needed by the preconditioner solve function PrecSolve. * This might include forming a crude approximate Jacobian, * and performing an LU factorization on the resulting * approximation to M. This function will not be called in * advance of every call to PrecSolve, but instead will be called * only as often as necessary to achieve convergence within the * Newton iteration. If the PrecSolve function needs no * preparation, the PrecSetup function can be NULL. * * For greater efficiency, the PrecSetup function may save * Jacobian-related data and reuse it, rather than generating it * from scratch. In this case, it should use the input flag jok * to decide whether to recompute the data, and set the output * flag *jcurPtr accordingly. * * Each call to the PrecSetup function is preceded by a call to * the RhsFn f with the same (t,y) arguments. Thus the PrecSetup * function can use any auxiliary data that is computed and * saved by the f function and made accessible to PrecSetup. * * A function PrecSetup must have the prototype given below. * Its parameters are as follows: * * t is the current value of the independent variable. * * y is the current value of the dependent variable vector, * namely the predicted value of y(t). * * fy is the vector f(t,y). * * jok is an input flag indicating whether Jacobian-related * data needs to be recomputed, as follows: * jok == FALSE means recompute Jacobian-related data * from scratch. * jok == TRUE means that Jacobian data, if saved from * the previous PrecSetup call, can be reused * (with the current value of gamma). * A Precset call with jok == TRUE can only occur after * a call with jok == FALSE. * * jcurPtr is a pointer to an output integer flag which is * to be set by PrecSetup as follows: * Set *jcurPtr = TRUE if Jacobian data was recomputed. * Set *jcurPtr = FALSE if Jacobian data was not recomputed, * but saved data was reused. * * gamma is the scalar appearing in the Newton matrix. * * P_data is a pointer to user data - the same as the P_data * parameter passed to CVSpgmr. * * tmp1, tmp2, and tmp3 are pointers to memory allocated * for N_Vectors which can be used by * CVSpgmrPrecSetupFn as temporary storage or * work space. * * NOTE: If the user's preconditioner needs other quantities, * they are accessible as follows: hcur (the current stepsize) * and ewt (the error weight vector) are accessible through * CVodeGetCurrentStep and CVodeGetErrWeights, respectively). * The unit roundoff is available as UNIT_ROUNDOFF defined in * sundialstypes.h. * * Returned value: * The value to be returned by the PrecSetup function is a flag * indicating whether it was successful. This value should be * 0 if successful, * > 0 for a recoverable error (step will be retried), * < 0 for an unrecoverable error (integration is halted). * ----------------------------------------------------------------- */ typedef int (*CVSpgmrPrecSetupFn)(realtype t, N_Vector y, N_Vector fy, booleantype jok, booleantype *jcurPtr, realtype gamma, void *P_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* * ----------------------------------------------------------------- * Type : CVSpgmrPrecSolveFn * ----------------------------------------------------------------- * The user-supplied preconditioner solve function PrecSolve * is to solve a linear system P z = r in which the matrix P is * one of the preconditioner matrices P1 or P2, depending on the * type of preconditioning chosen. * * A function PrecSolve must have the prototype given below. * Its parameters are as follows: * * t is the current value of the independent variable. * * y is the current value of the dependent variable vector. * * fy is the vector f(t,y). * * r is the right-hand side vector of the linear system. * * z is the output vector computed by PrecSolve. * * gamma is the scalar appearing in the Newton matrix. * * delta is an input tolerance for use by PSolve if it uses * an iterative method in its solution. In that case, * the residual vector Res = r - P z of the system * should be made less than delta in weighted L2 norm, * i.e., sqrt [ Sum (Res[i]*ewt[i])^2 ] < delta. * Note: the error weight vector ewt can be obtained * through a call to the routine CVodeGetErrWeights. * * lr is an input flag indicating whether PrecSolve is to use * the left preconditioner P1 or right preconditioner * P2: lr = 1 means use P1, and lr = 2 means use P2. * * P_data is a pointer to user data - the same as the P_data * parameter passed to CVSpgmr. * * tmp is a pointer to memory allocated for an N_Vector * which can be used by PSolve for work space. * * Returned value: * The value to be returned by the PrecSolve function is a flag * indicating whether it was successful. This value should be * 0 if successful, * positive for a recoverable error (step will be retried), * negative for an unrecoverable error (integration is halted). * ----------------------------------------------------------------- */ typedef int (*CVSpgmrPrecSolveFn)(realtype t, N_Vector y, N_Vector fy, N_Vector r, N_Vector z, realtype gamma, realtype delta, int lr, void *P_data, N_Vector tmp); /* * ----------------------------------------------------------------- * Type : CVSpgmrJacTimesVecFn * ----------------------------------------------------------------- * The user-supplied function jtimes is to generate the product * J*v for given v, where J is the Jacobian df/dy, or an * approximation to it, and v is a given vector. It should return * 0 if successful and a nonzero int otherwise. * * A function jtimes must have the prototype given below. Its * parameters are as follows: * * v is the N_Vector to be multiplied by J. * * Jv is the output N_Vector containing J*v. * * t is the current value of the independent variable. * * y is the current value of the dependent variable * vector. * * fy is the vector f(t,y). * * jac_data is a pointer to user Jacobian data, the same as the * pointer passed to CVSpgmr. * * tmp is a pointer to memory allocated for an N_Vector * which can be used by Jtimes for work space. * ----------------------------------------------------------------- */ typedef int (*CVSpgmrJacTimesVecFn)(N_Vector v, N_Vector Jv, realtype t, N_Vector y, N_Vector fy, void *jac_data, N_Vector tmp); /* * ----------------------------------------------------------------- * Function : CVSpgmr * ----------------------------------------------------------------- * A call to the CVSpgmr function links the main CVODE integrator * with the CVSPGMR linear solver. * * cvode_mem is the pointer to the integrator memory returned by * CVodeCreate. * * pretype is the type of user preconditioning to be done. * This must be one of the four enumeration constants * NONE, LEFT, RIGHT, or BOTH defined in iterative.h. * These correspond to no preconditioning, * left preconditioning only, right preconditioning * only, and both left and right preconditioning, * respectively. * * maxl is the maximum Krylov dimension. This is an * optional input to the CVSPGMR solver. Pass 0 to * use the default value CVSPGMR_MAXL=5. * * The return value of CVSpgmr is one of: * CVSPGMR_SUCCESS if successful * CVSPGMR_MEM_NULL if the cvode memory was NULL * CVSPGMR_MEM_FAIL if there was a memory allocation failure * CVSPGMR_ILL_INPUT if a required vector operation is missing * ----------------------------------------------------------------- */ int CVSpgmr(void *cvode_mem, int pretype, int maxl); /* * ----------------------------------------------------------------- * Function: CVSpgmrSetPrecType * ----------------------------------------------------------------- * CVSpgmrSetPrecType resets the type of preconditioner, pretype, * from the value set in a prior call to CVSpgmr. * This must be one of NONE, LEFT, RIGHT, or BOTH. * ----------------------------------------------------------------- */ int CVSpgmrSetPrecType(void *cvode_mem, int pretype); /* * ----------------------------------------------------------------- * Optional inputs to the CVSPGMR linear solver * ----------------------------------------------------------------- * CVSpgmrSetGSType specifies the type of Gram-Schmidt * orthogonalization to be used. This must be one of * the two enumeration constants MODIFIED_GS or * CLASSICAL_GS defined in iterative.h. These correspond * to using modified Gram-Schmidt and classical * Gram-Schmidt, respectively. * Default value is MODIFIED_GS. * CVSpgmrSetDelt specifies the factor by which the tolerance on * the nonlinear iteration is multiplied to get a * tolerance on the linear iteration. This is an * optional input to the CVSPGMR solver. * Default value is 0.05. * CVSpgmrSetPrecSetupFn specifies the PrecSetup function. * Default is NULL. * CVSpgmrSetPrecSolveFn specifies the PrecSolve function. * Default is NULL. * CVSpgmrSetPrecData specifies a pointer to user preconditioner * data. This pointer is passed to PrecSetup and * PrecSolve every time these routines are called. * Default is NULL. * CVSpgmrSetJacTimesVecFn specifies the jtimes function. * Default is to use an internal finite * difference approximation routine. * CVSpgmrSetJacData specifies a pointer to user Jacobian data. * This pointer is passed to jtimes every time this * routine is called. * Default is NULL. * * The return value of CVSpgmrSet* is one of: * CVSPGMR_SUCCESS if successful * CVSPGMR_MEM_NULL if the cvode memory was NULL * CVSPGMR_LMEM_NULL if the cvspgmr memory was NULL * CVSPGMR_ILL_INPUT if an input has an illegal value * ----------------------------------------------------------------- */ int CVSpgmrSetGSType(void *cvode_mem, int gstype); int CVSpgmrSetDelt(void *cvode_mem, realtype delt); int CVSpgmrSetPrecSetupFn(void *cvode_mem, CVSpgmrPrecSetupFn pset); int CVSpgmrSetPrecSolveFn(void *cvode_mem, CVSpgmrPrecSolveFn psolve); int CVSpgmrSetPrecData(void *cvode_mem, void *P_data); int CVSpgmrSetJacTimesVecFn(void *cvode_mem, CVSpgmrJacTimesVecFn jtimes); int CVSpgmrSetJacData(void *cvode_mem, void *jac_data); /* * ----------------------------------------------------------------- * Optional outputs from the CVSPGMR linear solver * ----------------------------------------------------------------- * CVSpgmrGetWorkSpace returns the real and integer workspace used * by CVSPGMR. * CVSpgmrGetNumPrecEvals returns the number of preconditioner * evaluations, i.e. the number of calls made * to PrecSetup with jok==FALSE. * CVSpgmrGetNumPrecSolves returns the number of calls made to * PrecSolve. * CVSpgmrGetNumLinIters returns the number of linear iterations. * CVSpgmrGetNumConvFails returns the number of linear * convergence failures. * CVSpgmrGetNumJtimesEvals returns the number of calls to jtimes. * CVSpgmrGetNumRhsEvals returns the number of calls to the user * f routine due to finite difference Jacobian * times vector evaluation. * CVSpgmrGetLastFlag returns the last error flag set by any of * the CVSPGMR interface functions. * * The return value of CVSpgmrGet* is one of: * CVSPGMR_SUCCESS if successful * CVSPGMR_MEM_NULL if the cvode memory was NULL * CVSPGMR_LMEM_NULL if the cvspgmr memory was NULL * ----------------------------------------------------------------- */ int CVSpgmrGetWorkSpace(void *cvode_mem, long int *lenrwSG, long int *leniwSG); int CVSpgmrGetNumPrecEvals(void *cvode_mem, long int *npevals); int CVSpgmrGetNumPrecSolves(void *cvode_mem, long int *npsolves); int CVSpgmrGetNumLinIters(void *cvode_mem, long int *nliters); int CVSpgmrGetNumConvFails(void *cvode_mem, long int *nlcfails); int CVSpgmrGetNumJtimesEvals(void *cvode_mem, long int *njvevals); int CVSpgmrGetNumRhsEvals(void *cvode_mem, long int *nfevalsSG); int CVSpgmrGetLastFlag(void *cvode_mem, int *flag); /* CVSPGMR return values */ #define CVSPGMR_SUCCESS 0 #define CVSPGMR_MEM_NULL -1 #define CVSPGMR_LMEM_NULL -2 #define CVSPGMR_ILL_INPUT -3 #define CVSPGMR_MEM_FAIL -4 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/cvodes/cvspgmr_impl.h000077500000000000000000000122761323325274500214630ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/cvodes/LICENSE. * ----------------------------------------------------------------- * Implementation header file for the scaled, preconditioned GMRES * linear solver, CVSPGMR. * ----------------------------------------------------------------- */ #ifndef _CVSPGMR_IMPL_H #define _CVSPGMR_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "cvspgmr.h" #include "spgmr.h" #include "iterative.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types : CVSpgmrMemRec, CVSpgmrMem * ----------------------------------------------------------------- * The type CVSpgmrMem is pointer to a CVSpgmrMemRec. * This structure contains CVSpgmr solver-specific data. * ----------------------------------------------------------------- */ typedef struct { int g_pretype; /* type of preconditioning */ int g_gstype; /* type of Gram-Schmidt orthogonalization */ realtype g_sqrtN; /* sqrt(N) */ realtype g_delt; /* delt = user specified or DELT_DEFAULT */ realtype g_deltar; /* deltar = delt * tq4 */ realtype g_delta; /* delta = deltar * sqrtN */ int g_maxl; /* maxl = maximum dimension of the Krylov space */ long int g_nstlpre; /* value of nst at the last pset call */ long int g_npe; /* npe = total number of pset calls */ long int g_nli; /* nli = total number of linear iterations */ long int g_nps; /* nps = total number of psolve calls */ long int g_ncfl; /* ncfl = total number of convergence failures */ long int g_njtimes; /* njtimes = total number of calls to jtimes */ long int g_nfeSG; /* nfeSG = total number of calls to f for difference quotient Jacobian-vector products */ N_Vector g_ytemp; /* temp vector passed to jtimes and psolve */ N_Vector g_x; /* temp vector used by CVSpgmrSolve */ N_Vector g_ycur; /* CVODE current y vector in Newton Iteration */ N_Vector g_fcur; /* fcur = f(tn, ycur) */ CVSpgmrPrecSetupFn g_pset; /* pset = user-supplied routine to compute */ /* a preconditioner */ CVSpgmrPrecSolveFn g_psolve; /* psolve = user-supplied routine to solve */ /* preconditioner linear system */ void *g_P_data; /* P_data passed to psolve and pset */ SpgmrMem g_spgmr_mem; /* spgmr_mem is memory used by the */ /* generic Spgmr solver */ CVSpgmrJacTimesVecFn g_jtimes; /* jtimes = Jacobian * vector routine */ void *g_j_data; /* j_data is passed to jtimes */ int g_last_flag; /* last error flag returned by any function */ } CVSpgmrMemRec, *CVSpgmrMem; /* Error Messages */ #define _CVSPGMR_ "CVSpgmr-- " #define MSGS_CVMEM_NULL _CVSPGMR_ "Integrator memory is NULL.\n\n" #define MSGS_MEM_FAIL _CVSPGMR_ "A memory request failed.\n\n" #define MSGS_BAD_PRETYPE1 _CVSPGMR_ "Illegal value for pretype.\n" #define MSGS_BAD_PRETYPE2 "The legal values are PREC_NONE, PREC_LEFT, " #define MSGS_BAD_PRETYPE3 "PREC_RIGHT, and PREC_BOTH.\n\n" #define MSGS_BAD_PRETYPE MSGS_BAD_PRETYPE1 MSGS_BAD_PRETYPE2 MSGS_BAD_PRETYPE3 #define MSGS_PSOLVE_REQ _CVSPGMR_ "pretype != PREC_NONE, but PSOLVE = NULL is illegal.\n\n" #define MSGS_BAD_NVECTOR _CVSPGMR_ "A required vector operation is not implemented.\n\n" #define MSGS_SETGET_CVMEM_NULL "CVSpgmrSet*/CVSpgmrGet*-- Integrator memory is NULL.\n\n" #define MSGS_SETGET_LMEM_NULL "CVSpgmrSet*/CVSpgmrGet*-- cvspgmr memory is NULL.\n\n" #define MSGS_SET_BAD_PRETYPE1 "CVSpgmrSetPrecType-- Illegal value for pretype.\n" #define MSGS_SET_BAD_PRETYPE2 "The legal values are PREC_NONE, PREC_LEFT, " #define MSGS_SET_BAD_PRETYPE3 "PREC_RIGHT, and PREC_BOTH.\n\n" #define MSGS_SET_BAD_PRETYPE MSGS_SET_BAD_PRETYPE1 MSGS_SET_BAD_PRETYPE2 MSGS_SET_BAD_PRETYPE3 #define MSGS_SET_BAD_GSTYPE1 "CVSpgmrSetGSType-- Illegal value for gstype.\n" #define MSGS_SET_BAD_GSTYPE2 "The legal values are MODIFIED_GS and " #define MSGS_SET_BAD_GSTYPE3 "CLASSICAL_GS.\n\n" #define MSGS_SET_BAD_GSTYPE MSGS_SET_BAD_GSTYPE1 MSGS_SET_BAD_GSTYPE2 MSGS_SET_BAD_GSTYPE3 #define MSGS_SET_BAD_DELT "CVSpgmrSetDelt-- delt < 0 illegal.\n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/000077500000000000000000000000001323325274500160475ustar00rootroot00000000000000neuron-7.5/src/sundials/ida/Makefile.am000077500000000000000000000006511323325274500201100ustar00rootroot00000000000000noinst_LTLIBRARIES = libida.la nsrc=$(top_srcdir)/src includes = -I$(nsrc)/sundials/shared AM_CPPFLAGS = $(includes) AM_CFLAGS = @MINGW_CFLAG@ libida_la_SOURCES = \ idaband.c \ idabbdpre.c \ ida.c \ idadense.c \ idaic.c \ idaio.c \ idaspgmr.c noinst_HEADERS = \ idaband.h \ idaband_impl.h \ idabbdpre.h \ idabbdpre_impl.h \ idadense.h \ idadense_impl.h \ ida.h \ ida_impl.h \ idaspgmr.h \ idaspgmr_impl.h neuron-7.5/src/sundials/ida/Makefile.in000066400000000000000000000541201323325274500201160ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/sundials/ida ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libida_la_LIBADD = am_libida_la_OBJECTS = idaband.lo idabbdpre.lo ida.lo idadense.lo \ idaic.lo idaio.lo idaspgmr.lo libida_la_OBJECTS = $(am_libida_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libida_la_SOURCES) DIST_SOURCES = $(libida_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ noinst_LTLIBRARIES = libida.la nsrc = $(top_srcdir)/src includes = -I$(nsrc)/sundials/shared AM_CPPFLAGS = $(includes) AM_CFLAGS = @MINGW_CFLAG@ libida_la_SOURCES = \ idaband.c \ idabbdpre.c \ ida.c \ idadense.c \ idaic.c \ idaio.c \ idaspgmr.c noinst_HEADERS = \ idaband.h \ idaband_impl.h \ idabbdpre.h \ idabbdpre_impl.h \ idadense.h \ idadense_impl.h \ ida.h \ ida_impl.h \ idaspgmr.h \ idaspgmr_impl.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sundials/ida/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sundials/ida/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libida.la: $(libida_la_OBJECTS) $(libida_la_DEPENDENCIES) $(EXTRA_libida_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libida_la_OBJECTS) $(libida_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ida.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idaband.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idabbdpre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idadense.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idaic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idaio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idaspgmr.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/sundials/ida/ida.c000077500000000000000000001760741323325274500167720ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/ida/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the main IDA solver. * It is independent of the linear solver in use. * ----------------------------------------------------------------- */ #include #include #include "ida_impl.h" #include "sundialsmath.h" /* * ----------------------------------------------------------------- * private constants * ----------------------------------------------------------------- */ #define ZERO RCONST(0.0) /* real 0.0 */ #define HALF RCONST(0.5) /* real 0.5 */ #define QUARTER RCONST(0.25) /* real 0.25 */ #define TWOTHIRDS RCONST(0.667) /* real 2/3 */ #define ONE RCONST(1.0) /* real 1.0 */ #define ONEPT5 RCONST(1.5) /* real 1.5 */ #define TWO RCONST(2.0) /* real 2.0 */ #define TWOPT5 RCONST(2.5) /* real 2.5 */ #define TEN RCONST(10.0) /* real 10.0 */ #define TWELVE RCONST(12.0) /* real 12.0 */ #define TWENTY RCONST(20.0) /* real 20.0 */ #define HUNDRED RCONST(100.0) /* real 100.0 */ #define PT9 RCONST(0.9) /* real 0.9 */ #define PT99 RCONST(0.99) /* real 0.99 */ #define PT1 RCONST(0.1) /* real 0.1 */ #define PT01 RCONST(0.01) /* real 0.01 */ #define PT001 RCONST(0.001) /* real 0.001 */ #define PT0001 RCONST(0.0001) /* real 0.0001 */ /* * ----------------------------------------------------------------- * default constants * ----------------------------------------------------------------- */ #define MXSTEP_DEFAULT 500 /* mxstep default value */ #define MAXORD_DEFAULT 5 /* maxord default value */ #define MXNCF 10 /* max number of convergence failures allowed */ #define MXNEF 10 /* max number of error test failures allowed */ #define MAXNH 5 /* max. number of h tries in IC calc. */ #define MAXNJ 4 /* max. number of J tries in IC calc. */ #define MAXNI 10 /* max. Newton iterations in IC calc. */ #define EPCON RCONST(0.33) /* Newton convergence test constant */ /* * ----------------------------------------------------------------- * routine-specific constants * ----------------------------------------------------------------- */ /* IDAStep control constants */ #define PREDICT_AGAIN 20 /* IDANewtonIter constants */ #define MAXIT 4 #define RATEMAX RCONST(0.9) #define XRATE RCONST(0.25) /* Return values for lower level routines used by IDASolve */ #define IDA_RES_RECVR +1 #define IDA_LSETUP_RECVR +2 #define IDA_LSOLVE_RECVR +3 #define IDA_NCONV_RECVR +4 #define IDA_CONSTR_RECVR +5 #define CONTINUE_STEPS +99 /* IDACompleteStep constants */ #define UNSET -1 #define LOWER 1 #define RAISE 2 #define MAINTAIN 3 /* IDATestError constants */ #define ERROR_TEST_FAIL +7 /* Macro: loop */ #define loop for(;;) /* * ----------------------------------------------------------------- * private helper function prototypes * ----------------------------------------------------------------- */ static booleantype IDACheckNvector(N_Vector tmpl); static booleantype IDAAllocVectors(IDAMem IDA_mem, N_Vector tmpl); static void IDAFreeVectors(IDAMem IDA_mem); realtype IDAWrmsNorm(IDAMem IDA_mem, N_Vector x, N_Vector w, booleantype mask); int IDAInitialSetup(IDAMem IDA_mem); booleantype IDAEwtSet(IDAMem IDA_mem, N_Vector ycur); static booleantype IDAEwtSetSS(IDAMem IDA_mem, N_Vector ycur); static booleantype IDAEwtSetSV(IDAMem IDA_mem, N_Vector ycur); static int IDAStopTest1(IDAMem IDA_mem, realtype tout,realtype *tret, N_Vector yret, N_Vector ypret, int itask); static int IDAStopTest2(IDAMem IDA_mem, realtype tout, realtype *tret, N_Vector yret, N_Vector ypret, int itask); static int IDAHandleFailure(IDAMem IDA_mem, int sflag); static int IDAStep(IDAMem IDA_mem); static void IDASetCoeffs(IDAMem IDA_mem, realtype *ck); static int IDAnls(IDAMem IDA_mem); static int IDAPredict(IDAMem IDA_mem); static int IDANewtonIter(IDAMem IDA_mem); static int IDATestError(IDAMem IDA_mem, realtype *ck, realtype *est, realtype *terk, realtype *terkm1, realtype *erkm1); static int IDAHandleNFlag(IDAMem IDA_mem, int nflag, realtype saved_t, int *ncfPtr, int *nefPtr, realtype *est); static int IDACompleteStep(IDAMem IDA_mem, realtype *est, realtype *terk, realtype *terkm1, realtype *erkm1); /* * ----------------------------------------------------------------- * user-callable functions * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * IDACreate * ----------------------------------------------------------------- * IDACreate creates an internal memory block for a problem to * be solved by IDA. * If successful, IDACreate returns a pointer to the problem memory. * This pointer should be passed to IDAMalloc. * If an initialization error occurs, IDACreate prints an error * message to standard err and returns NULL. * ----------------------------------------------------------------- */ void *IDACreate(void) { IDAMem IDA_mem; IDA_mem = (IDAMem) malloc(sizeof(struct IDAMemRec)); if (IDA_mem == NULL) { fprintf(stderr, MSG_MEM_FAIL); return (NULL); } /* Set unit roundoff in IDA_mem */ IDA_mem->ida_uround = UNIT_ROUNDOFF; /* Set default values for integrator optional inputs */ IDA_mem->ida_rdata = NULL; IDA_mem->ida_errfp = stderr; IDA_mem->ida_maxord = MAXORD_DEFAULT; IDA_mem->ida_mxstep = MXSTEP_DEFAULT; IDA_mem->ida_hmax_inv = ZERO; IDA_mem->ida_hin = ZERO; IDA_mem->ida_epcon = EPCON; IDA_mem->ida_maxnef = MXNEF; IDA_mem->ida_maxncf = MXNCF; IDA_mem->ida_maxcor = MAXIT; IDA_mem->ida_suppressalg = FALSE; IDA_mem->ida_id = NULL; IDA_mem->ida_constraints = NULL; IDA_mem->ida_tstopset = FALSE; /* Set default values for IC optional inputs */ IDA_mem->ida_epiccon = PT01 * EPCON; IDA_mem->ida_maxnh = MAXNH; IDA_mem->ida_maxnj = MAXNJ; IDA_mem->ida_maxnit = MAXNI; IDA_mem->ida_lsoff = FALSE; IDA_mem->ida_steptol = RPowerR(IDA_mem->ida_uround, TWOTHIRDS); /* No mallocs have been done yet */ IDA_mem->ida_MallocDone = FALSE; /* Return pointer to IDA memory block */ return((void *)IDA_mem); } /*-----------------------------------------------------------------*/ #define errfp (IDA_mem->ida_errfp) /*-----------------------------------------------------------------*/ /* * ----------------------------------------------------------------- * IDAMalloc * ----------------------------------------------------------------- * IDAMalloc allocates and initializes memory for a problem. All * problem specification inputs are checked for errors. If any * error occurs during initialization, it is reported to the file * whose file pointer is errfp and an error flag is returned. * ----------------------------------------------------------------- */ int IDAMalloc(void *ida_mem, IDAResFn res, realtype t0, N_Vector yy0, N_Vector yp0, int itol, realtype *rtol, void *atol) { IDAMem IDA_mem; booleantype nvectorOK, allocOK, neg_atol; long int lrw1, liw1; /* Check ida_mem */ if (ida_mem == NULL) { fprintf(stderr, MSG_IDAM_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Check for legal input parameters */ if (yy0 == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_Y0_NULL); return(IDA_ILL_INPUT); } if (yp0 == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_YP0_NULL); return(IDA_ILL_INPUT); } if ((itol != IDA_SS) && (itol != IDA_SV)) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_ITOL); return(IDA_ILL_INPUT); } if (res == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_RES_NULL); return(IDA_ILL_INPUT); } if (rtol == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_RTOL_NULL); return(IDA_ILL_INPUT); } if (*rtol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_RTOL); return(IDA_ILL_INPUT); } if (atol == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_ATOL_NULL); return(IDA_ILL_INPUT); } /* Test if all required vector operations are implemented */ nvectorOK = IDACheckNvector(yy0); if(!nvectorOK) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_NVECTOR); return(IDA_ILL_INPUT); } /* Test absolute tolerances */ if (itol == IDA_SS) { neg_atol = (*((realtype *)atol) < ZERO); } else { neg_atol = (N_VMin((N_Vector)atol) < ZERO); } if (neg_atol) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_ATOL); return(IDA_ILL_INPUT); } /* Set space requirements for one N_Vector */ if (yy0->ops->nvspace != NULL) { N_VSpace(yy0, &lrw1, &liw1); } else { lrw1 = 0; liw1 = 0; } IDA_mem->ida_lrw1 = lrw1; IDA_mem->ida_liw1 = liw1; /* Allocate the vectors (using yy0 as a template) */ allocOK = IDAAllocVectors(IDA_mem, yy0); if (!allocOK) { if(errfp!=NULL) fprintf(errfp, MSG_MEM_FAIL); return(IDA_MEM_FAIL); } /* All error checking is complete at this point */ /* Copy the input parameters into IDA memory block */ IDA_mem->ida_res = res; IDA_mem->ida_tn = t0; IDA_mem->ida_y0 = yy0; IDA_mem->ida_yp0 = yp0; IDA_mem->ida_itol = itol; IDA_mem->ida_rtol = rtol; IDA_mem->ida_atol = atol; /* Set the linear solver addresses to NULL */ IDA_mem->ida_linit = NULL; IDA_mem->ida_lsetup = NULL; IDA_mem->ida_lsolve = NULL; IDA_mem->ida_lperf = NULL; IDA_mem->ida_lfree = NULL; IDA_mem->ida_lmem = NULL; /* Initialize the phi array */ N_VScale(ONE, yy0, IDA_mem->ida_phi[0]); N_VScale(ONE, yp0, IDA_mem->ida_phi[1]); /* Initialize all the counters and other optional output values */ IDA_mem->ida_nst = 0; IDA_mem->ida_nre = 0; IDA_mem->ida_ncfn = 0; IDA_mem->ida_netf = 0; IDA_mem->ida_nni = 0; IDA_mem->ida_nsetups = 0; IDA_mem->ida_kused = 0; IDA_mem->ida_hused = ZERO; IDA_mem->ida_tolsf = ONE; /* Initial setup not done yet */ IDA_mem->ida_SetupDone = FALSE; /* Problem memory has been successfully allocated */ IDA_mem->ida_MallocDone = TRUE; return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAReInit * ----------------------------------------------------------------- * IDAReInit re-initializes IDA's memory for a problem, assuming * it has already beeen allocated in a prior IDAMalloc call. * All problem specification inputs are checked for errors. * The problem size Neq is assumed to be unchaged since the call * to IDAMalloc, and the maximum order maxord must not be larger. * If any error occurs during reinitialization, it is reported to * the file whose file pointer is errfp. * The return value is IDA_SUCCESS = 0 if no errors occurred, or * a negative value otherwise. * ----------------------------------------------------------------- */ int IDAReInit(void *ida_mem, IDAResFn res, realtype t0, N_Vector yy0, N_Vector yp0, int itol, realtype *rtol, void *atol) { IDAMem IDA_mem; booleantype neg_atol; /* Check for legal input parameters */ if (ida_mem == NULL) { fprintf(stderr, MSG_IDAM_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Check if problem was malloc'ed */ if (IDA_mem->ida_MallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSG_REI_NO_MALLOC); return(IDA_NO_MALLOC); } /* Check for legal input parameters */ if (yy0 == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_Y0_NULL); return(IDA_ILL_INPUT); } if (yp0 == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_YP0_NULL); return(IDA_ILL_INPUT); } if ((itol != IDA_SS) && (itol != IDA_SV)) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_ITOL); return(IDA_ILL_INPUT); } if (res == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_RES_NULL); return(IDA_ILL_INPUT); } if (rtol == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_RTOL_NULL); return(IDA_ILL_INPUT); } if (*rtol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_RTOL); return(IDA_ILL_INPUT); } if (atol == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_ATOL_NULL); return(IDA_ILL_INPUT); } if (itol == IDA_SS) { neg_atol = (*((realtype *)atol) < ZERO); } else { neg_atol = (N_VMin((N_Vector)atol) < ZERO); } if (neg_atol) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_ATOL); return(IDA_ILL_INPUT); } /* All error checking is complete at this point */ /* Copy the input parameters into IDA memory block */ IDA_mem->ida_res = res; IDA_mem->ida_y0 = yy0; IDA_mem->ida_yp0 = yp0; IDA_mem->ida_tn = t0; IDA_mem->ida_itol = itol; IDA_mem->ida_rtol = rtol; IDA_mem->ida_atol = atol; /* Initialize the phi array */ N_VScale(ONE, yy0, IDA_mem->ida_phi[0]); N_VScale(ONE, yp0, IDA_mem->ida_phi[1]); /* Initialize all the counters and other optional output values */ IDA_mem->ida_nst = 0; IDA_mem->ida_nre = 0; IDA_mem->ida_ncfn = 0; IDA_mem->ida_netf = 0; IDA_mem->ida_nni = 0; IDA_mem->ida_nsetups = 0; IDA_mem->ida_kused = 0; IDA_mem->ida_hused = ZERO; IDA_mem->ida_tolsf = ONE; /* Initial setup not done yet */ IDA_mem->ida_SetupDone = FALSE; /* Problem has been successfully re-initialized */ return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * readability constants * ----------------------------------------------------------------- */ #define res (IDA_mem->ida_res) #define y0 (IDA_mem->ida_y0) #define yp0 (IDA_mem->ida_yp0) #define itol (IDA_mem->ida_itol) #define rtol (IDA_mem->ida_rtol) #define atol (IDA_mem->ida_atol) #define rdata (IDA_mem->ida_rdata) #define maxord (IDA_mem->ida_maxord) #define mxstep (IDA_mem->ida_mxstep) #define hin (IDA_mem->ida_hin) #define hmax_inv (IDA_mem->ida_hmax_inv) #define tstop (IDA_mem->ida_tstop) #define tstopset (IDA_mem->ida_tstopset) #define epcon (IDA_mem->ida_epcon) #define maxnef (IDA_mem->ida_maxnef) #define maxncf (IDA_mem->ida_maxncf) #define maxcor (IDA_mem->ida_maxcor) #define suppressalg (IDA_mem->ida_suppressalg) #define id (IDA_mem->ida_id) #define constraints (IDA_mem->ida_constraints) #define epiccon (IDA_mem->ida_epiccon) #define maxnh (IDA_mem->ida_maxnh) #define maxnj (IDA_mem->ida_maxnj) #define maxnit (IDA_mem->ida_maxnit) #define lsoff (IDA_mem->ida_lsoff) #define steptol (IDA_mem->ida_steptol) #define uround (IDA_mem->ida_uround) #define phi (IDA_mem->ida_phi) #define ewt (IDA_mem->ida_ewt) #define yy (IDA_mem->ida_yy) #define yp (IDA_mem->ida_yp) #define delta (IDA_mem->ida_delta) #define mm (IDA_mem->ida_mm) #define ee (IDA_mem->ida_ee) #define savres (IDA_mem->ida_savres) #define tempv1 (IDA_mem->ida_tempv1) #define tempv2 (IDA_mem->ida_tempv2) #define kk (IDA_mem->ida_kk) #define hh (IDA_mem->ida_hh) #define h0u (IDA_mem->ida_h0u) #define tn (IDA_mem->ida_tn) #define tretp (IDA_mem->ida_tretp) #define cj (IDA_mem->ida_cj) #define cjold (IDA_mem->ida_cjold) #define cjratio (IDA_mem->ida_cjratio) #define cjlast (IDA_mem->ida_cjlast) #define nbacktr (IDA_mem->ida_nbacktr) #define nst (IDA_mem->ida_nst) #define nre (IDA_mem->ida_nre) #define ncfn (IDA_mem->ida_ncfn) #define netf (IDA_mem->ida_netf) #define nni (IDA_mem->ida_nni) #define nsetups (IDA_mem->ida_nsetups) #define ns (IDA_mem->ida_ns) #define lrw1 (IDA_mem->ida_lrw1) #define liw1 (IDA_mem->ida_liw1) #define lrw (IDA_mem->ida_lrw) #define liw (IDA_mem->ida_liw) #define linit (IDA_mem->ida_linit) #define lsetup (IDA_mem->ida_lsetup) #define lsolve (IDA_mem->ida_lsolve) #define lperf (IDA_mem->ida_lperf) #define lfree (IDA_mem->ida_lfree) #define lmem (IDA_mem->ida_lmem) #define knew (IDA_mem->ida_knew) #define kused (IDA_mem->ida_kused) #define hused (IDA_mem->ida_hused) #define tolsf (IDA_mem->ida_tolsf) #define phase (IDA_mem->ida_phase) #define epsNewt (IDA_mem->ida_epsNewt) #define toldel (IDA_mem->ida_toldel) #define ss (IDA_mem->ida_ss) #define rr (IDA_mem->ida_rr) #define psi (IDA_mem->ida_psi) #define alpha (IDA_mem->ida_alpha) #define beta (IDA_mem->ida_beta) #define sigma (IDA_mem->ida_sigma) #define gamma (IDA_mem->ida_gamma) #define setupNonNull (IDA_mem->ida_setupNonNull) #define constraintsSet (IDA_mem->ida_constraintsSet) /* * ----------------------------------------------------------------- * IDASolve * ----------------------------------------------------------------- * This routine is the main driver of the IDA package. * * It integrates over an independent variable interval defined by the user, * by calling IDAStep to take internal independent variable steps. * * The first time that IDASolve is called for a successfully initialized * problem, it computes a tentative initial step size. * * IDASolve supports four modes, specified by itask: * IDA_NORMAL, IDA_ONE_STEP, IDA_NORMAL_TSTOP, and IDA_ONE_STEP_TSTOP. * In the IDA_NORMAL and IDA_NORMAL_TSTOP modes, the solver steps until it * passes tout and then interpolates to obtain y(tout) and yp(tout). * In the IDA_ONE_STEP and IDA_ONE_STEP_TSTOP modes, it takes one internal step * and returns. In the IDA_NORMAL_TSTOP and IDA_ONE_STEP_TSTOP modes, it also * takes steps so as to reach tstop exactly and never to go past it. * * IDASolve returns integer values corresponding to success and failure as below: * * successful returns: * * IDA_SUCCESS * IDA_TSTOP_RETURN * * failed returns: * * IDA_ILL_INPUT * IDA_TOO_MUCH_WORK * IDA_MEM_NULL * IDA_TOO_MUCH_ACC * IDA_CONV_FAIL * IDA_LSETUP_FAIL * IDA_LSOLVE_FAIL * IDA_CONSTR_FAIL * IDA_ERR_FAIL * IDA_REP_RES_ERR * IDA_RES_FAIL * ----------------------------------------------------------------- */ int IDASolve(void *ida_mem, realtype tout, realtype *tret, N_Vector yret, N_Vector ypret, int itask) { long int nstloc; int sflag, istate, ier; realtype tdist, troundoff, ypnorm, rh, nrm; booleantype istop, ewtsetOK; IDAMem IDA_mem; /* Check for legal inputs in all cases. */ if (ida_mem == NULL) { fprintf(stderr, MSG_IDA_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Check if problem was malloc'ed */ if (IDA_mem->ida_MallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSG_NO_MALLOC); return(IDA_NO_MALLOC); } /* Check for legal arguments */ if (yret == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_YRET_NULL); return(IDA_ILL_INPUT); } yy = yret; if (ypret == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_YPRET_NULL); return(IDA_ILL_INPUT); } yp = ypret; if (tret == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_TRET_NULL); return(IDA_ILL_INPUT); } *tret = tretp = tn; /* Set tret now in case of illegal-input return. */ if ((itask < IDA_NORMAL) || (itask > IDA_ONE_STEP_TSTOP)) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_ITASK); return(IDA_ILL_INPUT); } if ( (itask == IDA_NORMAL_TSTOP) || (itask == IDA_ONE_STEP_TSTOP) ) { if ( tstopset == FALSE ) { if(errfp!=NULL) fprintf(errfp, MSG_NO_TSTOP); return(IDA_ILL_INPUT); } istop = TRUE; } else { istop = FALSE; } if (nst == 0) { /* THIS IS THE FIRST CALL */ /* Check inputs to the IDA for correctness and consistency */ if (IDA_mem->ida_SetupDone == FALSE) { ier = IDAInitialSetup(IDA_mem); if(ier != IDA_SUCCESS) return(IDA_ILL_INPUT); IDA_mem->ida_SetupDone = TRUE; } /* On the first call, check for tout - tn too small, set initial hh, check for approach to tstop, and scale phi[1] by hh. */ tdist = ABS(tout - tn); troundoff = TWO*uround*(ABS(tn) + ABS(tout)); if (tdist < troundoff) { if(errfp!=NULL) fprintf(errfp, MSG_TOO_CLOSE); return(IDA_ILL_INPUT); } hh = hin; if ( (hh != ZERO) && ((tout-tn)*hh < ZERO) ) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_HINIT); return(IDA_ILL_INPUT); } if (hh == ZERO) { hh = PT001*tdist; ypnorm = IDAWrmsNorm(IDA_mem, phi[1], ewt, suppressalg); if (ypnorm > HALF/hh) hh = HALF/ypnorm; if(tout < tn) hh = -hh; } rh = ABS(hh)*hmax_inv; if (rh > ONE) hh /= rh; if(istop) { if ( (tstop - tn)*hh < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TSTOP, tn); return(IDA_ILL_INPUT); } if ( (tn + hh - tstop)*hh > ZERO) hh = tstop - tn; } h0u = hh; N_VScale(hh, phi[1], phi[1]); kk = 0; kused = 0; /* set in case of an error return before a step */ /* Set the convergence test constants epsNewt and toldel */ epsNewt = epcon; toldel = PT0001 * epsNewt; } /* end of first-call block. */ /* Call lperf function and set nstloc for later performance testing. */ if (lperf != NULL) lperf(IDA_mem, 0); nstloc = 0; /* If not the first call, check for stop conditions. */ if (nst > 0) { istate = IDAStopTest1(IDA_mem, tout, tret, yret, ypret, itask); if (istate != CONTINUE_STEPS) return(istate); } /* Looping point for internal steps. */ loop { /* Check for too many steps taken. */ if (nstloc >= mxstep) { if(errfp!=NULL) fprintf(errfp, MSG_MAX_STEPS, tn); istate = IDA_TOO_MUCH_WORK; *tret = tretp = tn; break; /* Here yy=yret and yp=ypret already have the current solution. */ } /* Call lperf to generate warnings of poor performance. */ if (lperf != NULL) lperf(IDA_mem, 1); /* Reset and check ewt (if not first call). */ if (nst > 0) { ewtsetOK = IDAEwtSet(IDA_mem, phi[0]); if (!ewtsetOK) { if(errfp!=NULL) fprintf(errfp, MSG_EWT_NOW_BAD, tn); istate = IDA_ILL_INPUT; ier = IDAGetSolution(IDA_mem, tn, yret, ypret); *tret = tretp = tn; break; } } /* Check for too much accuracy requested. */ nrm = IDAWrmsNorm(IDA_mem, phi[0], ewt, suppressalg); tolsf = uround * nrm; if (tolsf > ONE) { tolsf *= TEN; if(errfp!=NULL) fprintf(errfp, MSG_TOO_MUCH_ACC, tn); istate = IDA_TOO_MUCH_ACC; *tret = tretp = tn; if (nst > 0) ier = IDAGetSolution(IDA_mem, tn, yret, ypret); break; } /* Call IDAStep to take a step. */ sflag = IDAStep(IDA_mem); /* Process all failed-step cases, and exit loop. */ if (sflag != IDA_SUCCESS) { istate = IDAHandleFailure(IDA_mem, sflag); *tret = tretp = tn; ier = IDAGetSolution(IDA_mem, tn, yret, ypret); break; } nstloc++; /* After successful step, check for stop conditions; continue or break. */ istate = IDAStopTest2(IDA_mem, tout, tret, yret, ypret, itask); if (istate != CONTINUE_STEPS) break; } /* End of step loop */ return(istate); } /* * ----------------------------------------------------------------- * IDAGetSolution * ----------------------------------------------------------------- * This routine evaluates y(t) and y'(t) as the value and derivative of * the interpolating polynomial at the independent variable t, and stores * the results in the vectors yret and ypret. It uses the current * independent variable value, tn, and the method order last used, kused. * This function is called by IDASolve with t = tout, t = tn, or t = tstop. * * If kused = 0 (no step has been taken), or if t = tn, then the order used * here is taken to be 1, giving yret = phi[0], ypret = phi[1]/psi[0]. * * The return values are: * IDA_SUCCESS if t is legal, or * IDA_BAD_T if t is not within the interval of the last step taken. * ----------------------------------------------------------------- */ int IDAGetSolution(void *ida_mem, realtype t, N_Vector yret, N_Vector ypret) { IDAMem IDA_mem; realtype tfuzz, tp, delt, c, d, gam; int j, kord; if (ida_mem == NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return (IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Check t for legality. Here tn - hused is t_{n-1}. */ tfuzz = HUNDRED * uround * (tn + hh); tp = tn - hused - tfuzz; if ( (t - tp)*hh < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_IDAG_BAD_T, t, tn-hused, tn); return(IDA_BAD_T); } /* Initialize yret = phi[0], ypret = 0, and kord = (kused or 1). */ N_VScale (ONE, phi[0], yret); N_VConst (ZERO, ypret); kord = kused; if (kused == 0) kord = 1; /* Accumulate multiples of columns phi[j] into yret and ypret. */ delt = t - tn; c = ONE; d = ZERO; gam = delt/psi[0]; for (j=1; j <= kord; j++) { d = d*gam + c/psi[j-1]; c = c*gam; gam = (delt + psi[j-1])/psi[j]; N_VLinearSum(ONE, yret, c, phi[j], yret); N_VLinearSum(ONE, ypret, d, phi[j], ypret); } return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAFree * ----------------------------------------------------------------- * This routine frees the problem memory allocated by IDAMalloc * Such memory includes all the vectors allocated by IDAAllocVectors, * and the memory lmem for the linear solver (deallocated by a call * to lfree). * ----------------------------------------------------------------- */ void IDAFree(void *ida_mem) { IDAMem IDA_mem; if (ida_mem == NULL) return; IDA_mem = (IDAMem) ida_mem; IDAFreeVectors(IDA_mem); if (lfree != NULL) lfree(IDA_mem); free(IDA_mem); } /* * ----------------------------------------------------------------- * private helper functions * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * IDACheckNvector * ----------------------------------------------------------------- * This routine checks if all required vector operations are present. * If any of them is missing it returns FALSE. * ----------------------------------------------------------------- */ static booleantype IDACheckNvector(N_Vector tmpl) { if((tmpl->ops->nvclone == NULL) || (tmpl->ops->nvdestroy == NULL) || (tmpl->ops->nvlinearsum == NULL) || (tmpl->ops->nvconst == NULL) || (tmpl->ops->nvprod == NULL) || (tmpl->ops->nvscale == NULL) || (tmpl->ops->nvabs == NULL) || (tmpl->ops->nvinv == NULL) || (tmpl->ops->nvaddconst == NULL) || (tmpl->ops->nvwrmsnorm == NULL) || (tmpl->ops->nvmin == NULL)) return(FALSE); else return(TRUE); } /* * ----------------------------------------------------------------- * IDAAllocVectors * ----------------------------------------------------------------- * This routine allocates the IDA vectors ewt, tempv1, tempv2, and * phi[0], ..., phi[maxord]. The length of the vectors is the input * parameter Neq and the maximum order (needed to allocate phi) is the * input parameter maxord. If all memory allocations are successful, * IDAAllocVectors returns TRUE. Otherwise all allocated memory is freed * and IDAAllocVectors returns FALSE. * This routine also sets the optional outputs lrw and liw, which are * (respectively) the lengths of the real and integer work spaces * allocated here. * ----------------------------------------------------------------- */ static booleantype IDAAllocVectors(IDAMem IDA_mem, N_Vector tmpl) { int i, j, maxcol; /* Allocate ewt, ee, delta, tempv1, tempv2 */ ewt = N_VClone(tmpl); if (ewt == NULL) return(FALSE); ee = N_VClone(tmpl); if (ee == NULL) { N_VDestroy(ewt); return(FALSE); } delta = N_VClone(tmpl); if (delta == NULL) { N_VDestroy(ewt); N_VDestroy(ee); return(FALSE); } tempv1 = N_VClone(tmpl); if (tempv1 == NULL) { N_VDestroy(ewt); N_VDestroy(ee); N_VDestroy(delta); return(FALSE); } tempv2= N_VClone(tmpl); if (tempv2 == NULL) { N_VDestroy(ewt); N_VDestroy(ee); N_VDestroy(delta); N_VDestroy(tempv1); return(FALSE); } savres = tempv1; /* Allocate phi[0] ... phi[maxord]. Make sure phi[2] and phi[3] are allocated (for use as temporary vectors), regardless of maxord. */ maxcol = MAX(maxord,3); for (j=0; j <= maxcol; j++) { phi[j] = N_VClone(tmpl); if (phi[j] == NULL) { N_VDestroy(ewt); N_VDestroy(ee); N_VDestroy(delta); N_VDestroy(tempv1); N_VDestroy(tempv2); for (i=0; i < j; i++) N_VDestroy(phi[i]); return(FALSE); } } /* Set solver workspace lengths */ lrw = (maxcol + 6) * lrw1; liw = (maxcol + 6) * liw1; return(TRUE); } /* * ----------------------------------------------------------------- * IDAfreeVectors * ----------------------------------------------------------------- * This routine frees the IDA vectors allocated in IDAAllocVectors. * ----------------------------------------------------------------- */ static void IDAFreeVectors(IDAMem IDA_mem) { int j, maxcol; N_VDestroy(ewt); N_VDestroy(ee); N_VDestroy(delta); N_VDestroy(tempv1); N_VDestroy(tempv2); maxcol = MAX(maxord,3); for(j=0; j <= maxcol; j++) N_VDestroy(phi[j]); } /* * ----------------------------------------------------------------- * IDAInitialSetup * ----------------------------------------------------------------- * This routine is called by IDASolve once at the first step. It performs * all checks on optional inputs and inputs to IDAMalloc/IDAReInit that * could not be done before. * * If no merror is encountered, IDAInitialSetup returns IDA_SUCCESS. Otherwise, * it returns an error flag and prints a message to errfp. * ----------------------------------------------------------------- */ int IDAInitialSetup(IDAMem IDA_mem) { realtype temptest; booleantype ewtsetOK, conOK; int ier; /* Test for more vector operations, depending on options */ if (suppressalg) if (id->ops->nvwrmsnormmask == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_NVECTOR); return(IDA_ILL_INPUT); } if (constraints != NULL) if (constraints->ops->nvdiv == NULL || constraints->ops->nvmaxnorm == NULL || constraints->ops->nvcompare == NULL || constraints->ops->nvconstrmask == NULL || constraints->ops->nvminquotient == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_NVECTOR); return(IDA_ILL_INPUT); } /* Test id vector for legality */ if(suppressalg && (id==NULL)){ if(errfp!=NULL) fprintf(errfp, MSG_MISSING_ID); return(IDA_ILL_INPUT); } /* Load ewt */ ewtsetOK = IDAEwtSet(IDA_mem, y0); if (!ewtsetOK) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_EWT); return(IDA_ILL_INPUT); } /* Check the constraints pointer and vector */ if (constraints == NULL) constraintsSet = FALSE; else { constraintsSet = TRUE; temptest = N_VMaxNorm(constraints); if(temptest > TWOPT5){ if(errfp!=NULL) fprintf(errfp, MSG_BAD_CONSTRAINTS); return(IDA_ILL_INPUT); } else if(temptest < HALF) constraintsSet = FALSE; /* constraints empty */ } /* Check to see if y0 satisfies constraints. */ if (constraintsSet) { conOK = N_VConstrMask (constraints, y0, tempv2); if (!conOK) { if(errfp!=NULL) fprintf(errfp, MSG_Y0_FAIL_CONSTR); return(IDA_ILL_INPUT); } } /* Check that lsolve exists and call linit function if it exists. */ if (lsolve == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_LSOLVE_NULL); return(IDA_ILL_INPUT); } if (linit != NULL) { ier = linit(IDA_mem); if (ier < 0) { if(errfp!=NULL) fprintf(errfp, MSG_LINIT_FAIL); return(IDA_LINIT_FAIL); } } return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAEwtSet * ----------------------------------------------------------------- * This routine is responsible for loading the error weight vector * ewt, according to itol, as follows: * (1) ewt[i] = 1 / (*rtol * ABS(ycur[i]) + *atol), i=0,...,Neq-1 * if itol = IDA_SS * (2) ewt[i] = 1 / (*rtol * ABS(ycur[i]) + atol[i]), i=0,...,Neq-1 * if itol = IDA_SV * * IDAEwtSet returns TRUE if ewt is successfully set as above to a * positive vector and FALSE otherwise. In the latter case, ewt is * considered undefined after the FALSE return from IDAEwtSet. * * All the real work is done in the routines IDAEwtSetSS, IDAEwtSetSV. * ----------------------------------------------------------------- */ booleantype IDAEwtSet(IDAMem IDA_mem, N_Vector ycur) { booleantype ewtsetOK=TRUE; switch(itol) { case IDA_SS: ewtsetOK = IDAEwtSetSS(IDA_mem, ycur); break; case IDA_SV: ewtsetOK = IDAEwtSetSV(IDA_mem, ycur); break; } return(ewtsetOK); } /* * ----------------------------------------------------------------- * IDAEwtSetSS * ----------------------------------------------------------------- * This routine sets ewt as decribed above in the case itol=IDA_SS. * It tests for non-positive components before inverting. IDAEwtSetSS * returns TRUE if ewt is successfully set to a positive vector * and FALSE otherwise. In the latter case, ewt is considered * undefined after the FALSE return from IDAEwtSetSS. * ----------------------------------------------------------------- */ static booleantype IDAEwtSetSS(IDAMem IDA_mem, N_Vector ycur) { realtype rtoli, *atoli; rtoli = *rtol; atoli = (realtype *)atol; N_VAbs(ycur, tempv1); N_VScale(rtoli, tempv1, tempv1); N_VAddConst(tempv1, *atoli, tempv1); if (N_VMin(tempv1) <= ZERO) return(FALSE); N_VInv(tempv1, ewt); return(TRUE); } /* * ----------------------------------------------------------------- * IDAEwtSetSV * ----------------------------------------------------------------- * This routine sets ewt as decribed above in the case itol=IDA_SV. * It tests for non-positive components before inverting. IDAEwtSetSV * returns TRUE if ewt is successfully set to a positive vector * and FALSE otherwise. In the latter case, ewt is considered * undefined after the FALSE return from IDAEwtSetSV. * ----------------------------------------------------------------- */ static booleantype IDAEwtSetSV(IDAMem IDA_mem, N_Vector ycur) { realtype rtoli; N_Vector atoli; rtoli = *rtol; atoli = (N_Vector)atol; N_VAbs(ycur, tempv1); N_VLinearSum(rtoli, tempv1, ONE, atoli, tempv1); if (N_VMin(tempv1) <= ZERO) return(FALSE); N_VInv(tempv1, ewt); return(TRUE); } /* * ----------------------------------------------------------------- * IDAStopTest1 * ----------------------------------------------------------------- * This routine tests for stop conditions before taking a step. * The tests depend on the value of itask. * The variable tretp is the previously returned value of tret. * * The return values are: * CONTINUE_STEPS if no stop conditions were found * IDA_SUCCESS for a normal return to the user * IDA_TSTOP_RETURN for a tstop-reached return to the user * IDA_ILL_INPUT for an illegal-input return to the user * * In the tstop cases, this routine may adjust the stepsize hh to cause * the next step to reach tstop exactly. * ----------------------------------------------------------------- */ static int IDAStopTest1(IDAMem IDA_mem, realtype tout, realtype *tret, N_Vector yret, N_Vector ypret, int itask) { int ier; realtype troundoff; switch (itask) { case IDA_NORMAL: /* Test for tout = tretp, and for tn past tout. */ if (tout == tretp) { *tret = tretp = tout; return(IDA_SUCCESS); } if ( (tn - tout)*hh >= ZERO) { ier = IDAGetSolution(IDA_mem, tout, yret, ypret); if (ier != IDA_SUCCESS) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TOUT, tout); return(IDA_ILL_INPUT); } *tret = tretp = tout; return(IDA_SUCCESS); } return(CONTINUE_STEPS); case IDA_ONE_STEP: /* Test for tn past tretp. */ if ( (tn - tretp)*hh > ZERO) { ier = IDAGetSolution(IDA_mem, tn, yret, ypret); *tret = tretp = tn; return(IDA_SUCCESS); } return(CONTINUE_STEPS); case IDA_NORMAL_TSTOP: /* Test for tn past tstop, tn = tretp, tn past tout, tn near tstop. */ if ( (tn - tstop)*hh > ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TSTOP, tn); return(IDA_ILL_INPUT); } if (tout == tretp) { *tret = tretp = tout; return(IDA_SUCCESS); } if ( (tn - tout)*hh >= ZERO) { ier = IDAGetSolution(IDA_mem, tout, yret, ypret); if (ier != IDA_SUCCESS) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TOUT, tout); return(IDA_ILL_INPUT); } *tret = tretp = tout; return(IDA_SUCCESS); } troundoff = HUNDRED*uround*(ABS(tn) + ABS(hh)); if ( ABS(tn - tstop) <= troundoff) { ier = IDAGetSolution(IDA_mem, tstop, yret, ypret); if (ier != IDA_SUCCESS) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TSTOP, tn); return(IDA_ILL_INPUT); } *tret = tretp = tstop; return(IDA_TSTOP_RETURN); } if ( (tn + hh - tstop)*hh > ZERO) hh = tstop - tn; return(CONTINUE_STEPS); case IDA_ONE_STEP_TSTOP: /* Test for tn past tstop, tn past tretp, and tn near tstop. */ if ( (tn - tstop)*hh > ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TSTOP, tn); return(IDA_ILL_INPUT); } if ( (tn - tretp)*hh > ZERO) { ier = IDAGetSolution(IDA_mem, tn, yret, ypret); *tret = tretp = tn; return(IDA_SUCCESS); } troundoff = HUNDRED*uround*(ABS(tn) + ABS(hh)); if ( ABS(tn - tstop) <= troundoff) { ier = IDAGetSolution(IDA_mem, tstop, yret, ypret); if (ier != IDA_SUCCESS) { if(errfp!=NULL) fprintf(errfp, MSG_BAD_TSTOP, tn); return(IDA_ILL_INPUT); } *tret = tretp = tstop; return(IDA_TSTOP_RETURN); } if ( (tn + hh - tstop)*hh > ZERO) hh = tstop - tn; return(CONTINUE_STEPS); } return(-99); } /* * ----------------------------------------------------------------- * IDAStopTest2 * ----------------------------------------------------------------- * This routine tests for stop conditions after taking a step. * The tests depend on the value of itask. * * The return values are: * CONTINUE_STEPS if no stop conditions were found * IDA_SUCCESS for a normal return to the user * IDA_TSTOP_RETURN for a tstop-reached return to the user * * In the two cases with tstop, this routine may reset the stepsize hh * to cause the next step to reach tstop exactly. * * In the two cases with ONE_STEP mode, no interpolation to tn is needed * because yret and ypret already contain the current y and y' values. * * Note: No test is made for an error return from IDAGetSolution here, * because the same test was made prior to the step. * ----------------------------------------------------------------- */ static int IDAStopTest2(IDAMem IDA_mem, realtype tout, realtype *tret, N_Vector yret, N_Vector ypret, int itask) { int ier; realtype troundoff; switch (itask) { case IDA_NORMAL: /* Test for tn past tout. */ if ( (tn - tout)*hh >= ZERO) { ier = IDAGetSolution(IDA_mem, tout, yret, ypret); *tret = tretp = tout; return(IDA_SUCCESS); } return(CONTINUE_STEPS); case IDA_ONE_STEP: *tret = tretp = tn; return(IDA_SUCCESS); case IDA_NORMAL_TSTOP: /* Test for tn at tstop, for tn past tout, and for tn near tstop. */ troundoff = HUNDRED*uround*(ABS(tn) + ABS(hh)); if ( ABS(tn - tstop) <= troundoff) { ier = IDAGetSolution(IDA_mem, tstop, yret, ypret); *tret = tretp = tstop; return(IDA_TSTOP_RETURN); } if ( (tn - tout)*hh >= ZERO) { ier = IDAGetSolution(IDA_mem, tout, yret, ypret); *tret = tretp = tout; return(IDA_SUCCESS); } if ( (tn + hh - tstop)*hh > ZERO) hh = tstop - tn; return(CONTINUE_STEPS); case IDA_ONE_STEP_TSTOP: /* Test for tn at tstop. */ troundoff = HUNDRED*uround*(ABS(tn) + ABS(hh)); if ( ABS(tn - tstop) <= troundoff) { ier = IDAGetSolution(IDA_mem, tstop, yret, ypret); *tret = tretp = tstop; return(IDA_TSTOP_RETURN); } if ( (tn + hh - tstop)*hh > ZERO) hh = tstop - tn; *tret = tretp = tn; return(IDA_SUCCESS); } return -99; } /* * ----------------------------------------------------------------- * IDAHandleFailure * ----------------------------------------------------------------- * This routine prints error messages for all cases of failure by * IDAStep. It returns to IDASolve the value that it is to return to * the user. * ----------------------------------------------------------------- */ static int IDAHandleFailure(IDAMem IDA_mem, int sflag) { /* Depending on sflag, print error message and return error flag */ switch (sflag) { case IDA_ERR_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_ERR_FAILS, tn, hh); return(IDA_ERR_FAIL); case IDA_CONV_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_CONV_FAILS, tn, hh); return(IDA_CONV_FAIL); case IDA_LSETUP_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_SETUP_FAILED, tn); return(IDA_LSETUP_FAIL); case IDA_LSOLVE_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_SOLVE_FAILED, tn); return(IDA_LSOLVE_FAIL); case IDA_REP_RES_ERR: if(errfp!=NULL) fprintf(errfp, MSG_REP_RES_ERR, tn); return(IDA_REP_RES_ERR); case IDA_RES_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_RES_NONRECOV, tn); return(IDA_RES_FAIL); case IDA_CONSTR_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_FAILED_CONSTR, tn); return(IDA_CONSTR_FAIL); } return -99; } /* * ----------------------------------------------------------------- * IDAStep * ----------------------------------------------------------------- * This routine performs one internal IDA step, from tn to tn + hh. * It calls other routines to do all the work. * * It solves a system of differential/algebraic equations of the form * F(t,y,y') = 0, for one step. In IDA, tt is used for t, * yy is used for y, and yp is used for y'. The function F is supplied as 'res' * by the user. * * The methods used are modified divided difference, fixed leading * coefficient forms of backward differentiation formulas. * The code adjusts the stepsize and order to control the local error per step. * * The main operations done here are as follows: * * initialize various quantities; * * setting of multistep method coefficients; * * solution of the nonlinear system for yy at t = tn + hh; * * deciding on order reduction and testing the local error; * * attempting to recover from failure in nonlinear solver or error test; * * resetting stepsize and order for the next step. * * updating phi and other state data if successful; * * On a failure in the nonlinear system solution or error test, the * step may be reattempted, depending on the nature of the failure. * * Variables or arrays (all in the IDAMem structure) used in IDAStep are: * * tt -- Independent variable. * yy -- Solution vector at tt. * yp -- Derivative of solution vector after successful stelp. * res -- User-supplied function to evaluate the residual. See the * description given in file ida.h . * lsetup -- Routine to prepare for the linear solver call. It may either * save or recalculate quantities used by lsolve. (Optional) * lsolve -- Routine to solve a linear system. A prior call to lsetup * may be required. * hh -- Appropriate step size for next step. * ewt -- Vector of weights used in all convergence tests. * phi -- Array of divided differences used by IDAStep. This array is composed * of (maxord+1) nvectors (each of size Neq). (maxord+1) is the maximum * order for the problem, maxord, plus 1. * * Return values are: * IDA_SUCCESS IDA_RES_FAIL LSETUP_ERROR_NONRECVR * IDA_LSOLVE_FAIL IDA_ERR_FAIL * IDA_CONSTR_FAIL IDA_CONV_FAIL * IDA_REP_RES_ERR * ----------------------------------------------------------------- */ static int IDAStep(IDAMem IDA_mem) { realtype saved_t, ck, est=0.0; realtype terk=0.0, terkm1=0.0, erkm1=0.0; int ncf, nef, nflag, kflag; saved_t = tn; ncf = nef = 0; if(nst == ZERO){ kk = 1; kused = 0; hused = ZERO; psi[0] = hh; cj = ONE/hh; phase = 0; ns = 0; } /* Looping point for attempts to take a step */ loop { IDASetCoeffs(IDA_mem, &ck); kflag = IDA_SUCCESS; nflag = IDAnls(IDA_mem); if(nflag == IDA_SUCCESS) nflag = IDATestError(IDA_mem, &ck, &est, &terk, &terkm1, &erkm1); if(nflag != IDA_SUCCESS) kflag = IDAHandleNFlag(IDA_mem, nflag, saved_t, &ncf, &nef, &est); if (kflag == PREDICT_AGAIN) continue; else if(kflag == IDA_SUCCESS) break; else return(kflag); } /* Nonlinear system solve and error test were both successful; update data, and consider change of step and/or order */ IDACompleteStep(IDA_mem, &est, &terk, &terkm1, &erkm1); return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDASetCoeffs * ----------------------------------------------------------------- * This routine computes the coefficients relevant to the current step. * The counter ns counts the number of consecutive steps taken at * constant stepsize h and order k, up to a maximum of k + 2. * Then the first ns components of beta will be one, and on a step * with ns = k + 2, the coefficients alpha, etc. need not be reset here. * Also, IDACompleteStep prohibits an order increase until ns = k + 2. * ----------------------------------------------------------------- */ static void IDASetCoeffs(IDAMem IDA_mem, realtype *ck) { int i; realtype temp1, temp2, alpha0, alphas; /* Set coefficients for the current stepsize h */ if(hh != hused || kk != kused) ns = 0; ns = MIN(ns+1,kused+2); if(kk+1 >= ns){ beta[0] = ONE; alpha[0] = ONE; temp1 = hh; gamma[0] = ZERO; sigma[0] = ONE; for(i=1;i<=kk;i++){ temp2 = psi[i-1]; psi[i-1] = temp1; beta[i] = beta[i-1] * psi[i-1] / temp2; temp1 = temp2 + hh; alpha[i] = hh / temp1; sigma[i] = i * sigma[i-1] * alpha[i]; gamma[i] = gamma[i-1] + alpha[i-1] / hh; } psi[kk] = temp1; } /* compute alphas, alpha0 */ alphas = ZERO; alpha0 = ZERO; for(i=0;i temp2) callSetup = TRUE;} {if(cj != cjlast) ss=HUNDRED;} } /* Begin the main loop. This loop is traversed at most twice. The second pass only occurs when the first pass had a recoverable failure with old Jacobian data */ loop{ /* Compute predicted values for yy and yp, and compute residual there. */ ier = IDAPredict(IDA_mem); retval = res(tn, yy, yp, delta, rdata); nre++; if(retval < 0) return(IDA_RES_FAIL); if(retval > 0) return(IDA_RES_RECVR); /* If indicated, call linear solver setup function and reset parameters. */ if(callSetup){ nsetups++; retval = lsetup(IDA_mem, yy, yp, delta, tempv1, tempv2, tempv3); cjold = cj; cjratio = ONE; ss = TWENTY; if (retval < 0) return(IDA_LSETUP_FAIL); if (retval > 0) return(IDA_LSETUP_RECVR); } /* Call the Newton iteration routine. */ retval = IDANewtonIter(IDA_mem); /* Retry the current step on recoverable failure with old Jacobian data. */ tryAgain = (retval>0)&&(setupNonNull) &&(!callSetup); if(tryAgain){ callSetup = TRUE; continue; } else break; } /* end of loop */ if(retval != IDA_SUCCESS) return(retval); /* If otherwise successful, check and enforce inequality constraints. */ if(constraintsSet){ /* Check constraints and get mask vector mm, set where constraints failed */ constraintsPassed = N_VConstrMask(constraints,yy,mm); if(constraintsPassed) return(IDA_SUCCESS); else { N_VCompare(ONEPT5, constraints, tempv1); /* a , where a[i] =1. when |c[i]| = 2 , c the vector of constraints */ N_VProd(tempv1, constraints, tempv1); /* a * c */ N_VDiv(tempv1, ewt, tempv1); /* a * c * wt */ N_VLinearSum(ONE, yy, -PT1, tempv1, tempv1);/* y - 0.1 * a * c * wt */ N_VProd(tempv1, mm, tempv1); /* v = mm*(y-.1*a*c*wt) */ vnorm = IDAWrmsNorm(IDA_mem, tempv1, ewt, FALSE); /* ||v|| */ /* If vector v of constraint corrections is small in norm, correct and accept this step */ if(vnorm <= epsNewt){ N_VLinearSum(ONE, ee, -ONE, tempv1, ee); /* ee <- ee - v */ return(IDA_SUCCESS); } else { /* Constraints not met -- reduce h by computing rr = h'/h */ N_VLinearSum(ONE, phi[0], -ONE, yy, tempv1); N_VProd(mm, tempv1, tempv1); rr = PT9*N_VMinQuotient(phi[0], tempv1); rr = MAX(rr,PT1); return(IDA_CONSTR_RECVR); } } } return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAPredict * ----------------------------------------------------------------- * This routine predicts the new values for vectors yy and yp. * ----------------------------------------------------------------- */ static int IDAPredict(IDAMem IDA_mem) { int j; N_VScale(ONE, phi[0], yy); N_VConst(ZERO, yp); for(j=1; j<=kk; j++) { N_VLinearSum(ONE, phi[j], ONE, yy, yy); N_VLinearSum(gamma[j], phi[j], ONE, yp, yp); } return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDANewtonIter * ----------------------------------------------------------------- * This routine performs the Newton iteration. * It assumes that delta contains the initial residual vector on entry. * If the iteration succeeds, it returns the value IDA_SUCCESS = 0. * If not, it returns either: * a positive value (for a recoverable failure), namely one of: * IDA_RES_RECVR * IDA_LSOLVE_RECVR * IDA_NCONV_RECVR * or * a negative value (for a nonrecoverable failure), namely one of: * IDA_RES_FAIL * IDA_LSOLVE_FAIL * * NOTE: This routine uses N_Vector savres, which is preset to tempv1. * ----------------------------------------------------------------- */ static int IDANewtonIter(IDAMem IDA_mem) { int mnewt, retval; realtype delnrm, oldnrm, rate; /* Initialize counter mnewt and cumulative correction vector ee. */ mnewt = 0; N_VConst (ZERO, ee); /* Looping point for Newton iteration. Break out on any error. */ loop { nni++; /* Save a copy of the residual vector in savres. */ N_VScale(ONE, delta, savres); /* Call the lsolve function to get correction vector delta. */ retval = lsolve(IDA_mem, delta, ewt, yy, yp, savres); if(retval < 0) return(IDA_LSOLVE_FAIL); if(retval > 0) return(IDA_LSOLVE_RECVR); /* Apply delta to yy, yp, and ee, and get norm(delta). */ N_VLinearSum(ONE, yy, -ONE, delta, yy); N_VLinearSum(ONE, ee, -ONE, delta, ee); N_VLinearSum(ONE, yp, -cj, delta, yp); delnrm = IDAWrmsNorm(IDA_mem, delta, ewt, FALSE); /* Test for convergence, first directly, then with rate estimate. */ if (mnewt == 0){ oldnrm = delnrm; if (delnrm <= toldel) return(IDA_SUCCESS); } else { rate = RPowerR( delnrm/oldnrm, ONE/mnewt ); if (rate > RATEMAX) return(IDA_NCONV_RECVR); ss = rate/(ONE - rate); } if (ss*delnrm <= epsNewt) return(IDA_SUCCESS); /* Not yet converged. Increment mnewt and test for max allowed. */ mnewt++; if (mnewt >= maxcor) {retval = IDA_NCONV_RECVR; break;} /* Call res for new residual and check error flag from res. */ retval = res(tn, yy, yp, delta, rdata); nre++; if(retval < 0) return(IDA_RES_FAIL); if(retval > 0) return(IDA_RES_RECVR); /* Loop for next iteration. */ } /* end of Newton iteration loop */ /* All error returns exit here. */ return(retval); } /* * ----------------------------------------------------------------- * IDATestError * ----------------------------------------------------------------- * This routine estimates errors at orders k, k-1, k-2, decides whether * or not to reduce order, and performs the local error test. * * IDATestError returns either IDA_SUCCESS or ERROR_TEST_FAIL * ----------------------------------------------------------------- */ static int IDATestError(IDAMem IDA_mem, realtype *ck, realtype *est, realtype *terk, realtype *terkm1, realtype *erkm1) { int retval; realtype enorm; realtype terkm2; realtype erk, erkm2; /* Compute error for order k. */ enorm = IDAWrmsNorm(IDA_mem, ee, ewt, suppressalg); erk = sigma[kk] * enorm; *terk = (kk+1) * erk; *est = erk; knew = kk; /* Now compute the errors for orders k-1 and k-2, and decide whether to reduce the order k to k-1 */ if(kk > 1){ N_VLinearSum(ONE, phi[kk], ONE, ee, delta); *erkm1 = sigma[kk-1] * IDAWrmsNorm(IDA_mem, delta, ewt, suppressalg); *terkm1 = kk * *erkm1; { if(kk > 2){ N_VLinearSum(ONE, phi[kk-1], ONE, delta, delta); erkm2 = sigma[kk-2] * IDAWrmsNorm(IDA_mem, delta, ewt, suppressalg); terkm2 = (kk-1) * erkm2; if(MAX(*terkm1, terkm2) > *terk) goto evaltest; } else if(*terkm1 > (HALF * (*terk))) goto evaltest; /* executed for kk=2 only */ } /* end of "kk>2" if/else block */ knew = kk-1; *est = *erkm1; } /* end kk>1 if block */ evaltest: retval = IDA_SUCCESS; if ((*ck * enorm) > ONE) retval = ERROR_TEST_FAIL; return(retval); } /* * ----------------------------------------------------------------- * IDAHandleNFlag * ----------------------------------------------------------------- * This routine handles failures indicated by the input variable nflag. * Positive values indicate various recoverable failures while negative * values indicate nonrecoverable failures. This routine adjusts the * step size for recoverable failures. * * Possible nflag values (input): * * --convergence failures-- * IDA_RES_RECVR > 0 * IDA_LSOLVE_RECVR > 0 * IDA_CONSTR_RECVR > 0 * IDA_NCONV_RECVR > 0 * IDA_RES_FAIL < 0 * IDA_LSOLVE_FAIL < 0 * IDA_LSETUP_FAIL < 0 * * --error test failure-- * ERROR_TEST_FAIL > 0 * * Possible kflag values (output): * * --recoverable-- * PREDICT_AGAIN * * --nonrecoverable-- * IDA_CONSTR_FAIL * IDA_REP_RES_ERR * IDA_ERR_FAIL * IDA_CONV_FAIL * IDA_RES_FAIL * IDA_LSETUP_FAIL * IDA_LSOLVE_FAIL * ----------------------------------------------------------------- */ static int IDAHandleNFlag(IDAMem IDA_mem, int nflag, realtype saved_t, int *ncfPtr, int *nefPtr, realtype *est) { int j; int *ncf, *nef; ncf = ncfPtr; nef = nefPtr; phase = 1; /* restore tn, phi, and psi */ tn = saved_t; for (j = ns; j <= kk; j++) N_VScale(ONE/beta[j], phi[j], phi[j]); for (j = 1; j <= kk; j++) psi[j-1] = psi[j] - hh; /* NLS FAILURE */ if (nflag != ERROR_TEST_FAIL) { (*ncf)++; ncfn++; /* Nonrecoverable failure */ if (nflag < 0) return(nflag); /* If there were too many convergence failures */ if (*ncf >= maxncf) { if (nflag == IDA_RES_RECVR) return(IDA_REP_RES_ERR); if (nflag == IDA_CONSTR_RECVR) return(IDA_CONSTR_FAIL); return(IDA_CONV_FAIL); } /* Prepare to predict again */ rr = QUARTER; hh *= rr; } /* ERROR TEST FAILURE */ else { (*nef)++; netf++; /* If there were too many error test failures */ if (*nef >= maxnef) return(IDA_ERR_FAIL); /* Prepare to predict again */ if (*nef == 1){ /* On first error test failure, keep current order or lower order by one. Compute new stepsize based on differences of the solution. */ kk = knew; rr = PT9 * RPowerR( TWO*(*est) + PT0001,(-ONE/(kk+1)) ); rr = MAX(QUARTER, MIN(PT9,rr)); hh *=rr; /* adjust step size */ } else if (*nef == 2){ /* On second error test failure, use current order or decrease order by one. Reduce stepsize by factor of 1/4. */ kk = knew; rr = QUARTER; hh *= rr; } else if (*nef > 2){ /* On third and subsequent error test failures, set order to 1 and reduce stepsize h by factor of 1/4. */ kk = 1; rr = QUARTER; hh *= rr; } } /* end of nflag if block */ if (nst == 0){ psi[0] = hh; N_VScale(rr, phi[1], phi[1]); } return(PREDICT_AGAIN); } /* * ----------------------------------------------------------------- * IDACompleteStep * ----------------------------------------------------------------- * This routine completes a successful step. It increments nst, * saves the stepsize and order used, makes the final selection of * stepsize and order for the next step, and updates the phi array. * Its return value is IDA_SUCCESS= 0. * ----------------------------------------------------------------- */ static int IDACompleteStep(IDAMem IDA_mem, realtype *est, realtype *terk, realtype *terkm1, realtype *erkm1) { int j, kdiff, action; realtype terkp1, erkp1, temp, hnew; nst++; kdiff = kk - kused; kused = kk; hused = hh; if ( (knew == kk-1) || (kk == maxord) ) phase = 1; /* For the first few steps, until either a step fails, or the order is reduced, or the order reaches its maximum, we raise the order and double the stepsize. During these steps, phase = 0. Thereafter, phase = 1, and stepsize and order are set by the usual local error algorithm. Note that, after the first step, the order is not increased, as not all of the neccessary information is available yet. */ if (phase == 0) { if (nst > 1) { kk++; hnew = TWO * hh; hh = hnew; } } else { action = UNSET; /* Set action = LOWER/MAINTAIN/RAISE to specify order decision */ if (knew == kk-1) {action = LOWER; goto takeaction;} if (kk == maxord) {action = MAINTAIN; goto takeaction;} if ( (kk+1 >= ns ) || (kdiff == 1)) {action = MAINTAIN;goto takeaction;} /* Estimate the error at order k+1, unless already decided to reduce order, or already using maximum order, or stepsize has not been constant, or order was just raised. */ N_VLinearSum (ONE, ee, -ONE, phi[kk+1], delta); terkp1 = IDAWrmsNorm(IDA_mem, delta, ewt, suppressalg); erkp1= terkp1/(kk+2); /* Choose among orders k-1, k, k+1 using local truncation error norms. */ if (kk == 1) { if (terkp1 >= HALF * (*terk)) {action = MAINTAIN; goto takeaction;} else {action = RAISE; goto takeaction;} } else { if (*terkm1 <= MIN(*terk, terkp1)) {action = LOWER; goto takeaction;} if (terkp1 >= *terk) {action = MAINTAIN; goto takeaction;} action = RAISE; goto takeaction; } takeaction: /* On change of order, reset kk and the estimated error norm. */ if (action == RAISE) { kk++; *est = erkp1;} else if (action == LOWER) { kk--; *est = *erkm1;} /* Compute rr = tentative ratio hnew/hh from error norm. Reduce hh if rr <= 1, double hh if rr >= 2, else leave hh as is. If hh is reduced, hnew/hh is restricted to be between .5 and .9. */ hnew = hh; rr = RPowerR( (TWO * (*est) + PT0001) , (-ONE/(kk+1) ) ); if (rr >= TWO) { hnew = TWO * hh; if( (temp = ABS(hnew)*hmax_inv) > ONE ) hnew /= temp; } else if (rr <= ONE ) { rr = MAX(HALF, MIN(PT9,rr)); hnew = hh * rr; } hh = hnew; } /* end of phase if block */ /* Save ee for possible order increase on next step; update phi array. */ if (kused < maxord) N_VScale(ONE, ee, phi[kused+1]); N_VLinearSum(ONE, ee, ONE, phi[kused], phi[kused]); for (j= kused-1; j>=0; j--) N_VLinearSum(ONE, phi[j], ONE, phi[j+1], phi[j]); return (IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAWrmsNorm * ----------------------------------------------------------------- * Returns the WRMS norm of vector x with weights w. * If mask = TRUE, the weight vector w is masked by id, i.e., * nrm = N_VWrmsNormMask(x,w,id); * Otherwise, * nrm = N_VWrmsNorm(x,w); * * mask = FALSE when the call is made from the nonlinear solver. * mask = suppressalg otherwise. * ----------------------------------------------------------------- */ realtype IDAWrmsNorm(IDAMem IDA_mem, N_Vector x, N_Vector w, booleantype mask) { realtype nrm; if (mask) nrm = N_VWrmsNormMask(x, w, id); else nrm = N_VWrmsNorm(x, w); return(nrm); } neuron-7.5/src/sundials/ida/ida.h000066400000000000000000001364631323325274500167720ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Allan G. Taylor, Alan C. Hindmarsh, and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the header (include) file for the main IDA solver. * ----------------------------------------------------------------- */ #ifndef _IDA_H #define _IDA_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "sundialstypes.h" #include "nvector.h" /* * ----------------------------------------------------------------- * IDA is used to solve numerically the initial value problem * for the differential algebraic equation (DAE) system * F(t,y,y') = 0, * given initial conditions * y(t0) = y0, y'(t0) = yp0. * Here y and F are vectors of length N. * ----------------------------------------------------------------- */ /* * ---------------------------------------------------------------- * Type : IDAResFn * ---------------------------------------------------------------- * The F function which defines the DAE system F(t,y,y')=0 * must have type IDAResFn. * Symbols are as follows: * t <-> t y <-> yy * y' <-> yp F <-> rr * A IDAResFn takes as input the independent variable value t, * the dependent variable vector yy, and the derivative (with * respect to t) of the yy vector, yp. It stores the result of * F(t,y,y') in the vector rr. The yy, yp, and rr arguments are of * type N_Vector. The res_data parameter is the pointer res_data * passed by the user to the IDASetRdata routine. This user-supplied * pointer is passed to the user's res function every time it is called, * to provide access in res to user data. * * A IDAResFn res should return a value of 0 if successful, a positive * value if a recoverable error occured (e.g. yy has an illegal value), * or a negative value if a nonrecoverable error occured. In the latter * case, the program halts. If a recoverable error occured, the integrator * will attempt to correct and retry. * ---------------------------------------------------------------- */ typedef int (*IDAResFn)(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, void *res_data); /* * ---------------------------------------------------------------- * Inputs to IDAMalloc, IDAReInit, IDACalcIC, and IDASolve. * ---------------------------------------------------------------- */ /* itol */ #define IDA_SS 1 #define IDA_SV 2 /* itask */ #define IDA_NORMAL 1 #define IDA_ONE_STEP 2 #define IDA_NORMAL_TSTOP 3 #define IDA_ONE_STEP_TSTOP 4 /* icopt */ #define IDA_YA_YDP_INIT 1 #define IDA_Y_INIT 2 /* * ================================================================ * U S E R - C A L L A B L E R O U T I N E S * ================================================================ */ /* * ---------------------------------------------------------------- * Function : IDACreate * ---------------------------------------------------------------- * IDACreate creates an internal memory block for a problem to * be solved by IDA. * * If successful, IDACreate returns a pointer to initialized * problem memory. This pointer should be passed to IDAMalloc. * If an initialization error occurs, IDACreate prints an error * message to standard err and returns NULL. * * ---------------------------------------------------------------- */ void *IDACreate(void); /* * ---------------------------------------------------------------- * Integrator optional input specification functions * ---------------------------------------------------------------- * The following functions can be called to set optional inputs * to values other than the defaults given below: * * | * Function | Optional input / [ default value ] * | * ---------------------------------------------------------------- * | * IDASetRdata | a pointer to user data that will be * | passed to the user's res function every * | time res is called. * | [NULL] * | * IDASetErrFile | the file pointer for an error file * | where all IDA warning and error * | messages will be written. This parameter * | can be stdout (standard output), stderr * | (standard error), a file pointer * | (corresponding to a user error file * | opened for writing) returned by fopen. * | If not called, then all messages will * | be written to standard output. * | [NULL] * | * IDASetMaxOrd | maximum lmm order to be used by the * | solver. * | [5] * | * IDASetMaxNumSteps | maximum number of internal steps to be * | taken by the solver in its attempt to * | reach tout. * | [500] * | * IDASetInitStep | initial step size. * | [estimated by IDA] * | * IDASetMaxStep | maximum absolute value of step size * | allowed. * | [infinity] * | * IDASetStopTime | the independent variable value past * | which the solution is not to proceed. * | [infinity] * | * IDASetNonlinConvCoef | Newton convergence test constant * | for use during integration. * | [0.33] * | * IDASetMaxErrTestFails| Maximum number of error test failures * | in attempting one step. * | [10] * | * IDASetMaxNonlinIters | Maximum number of nonlinear solver * | iterations at one solution. * | [4] * | * IDASetMaxConvFails | Maximum number of allowable conv. * | failures in attempting one step. * | [10] * | * IDASetSuppressAlg | flag to indicate whether or not to * | suppress algebraic variables in the * | local error tests: * | FALSE = do not suppress; * | TRUE = do suppress; * | [FALSE] * | NOTE: if suppressed algebraic variables * | is selected, the nvector 'id' must be * | supplied for identification of those * | algebraic components (see IDASetId). * | * IDASetId | an N_Vector, which states a given * | element to be either algebraic or * | differential. * | A value of 1.0 indicates a differential * | variable while a 0.0 indicates an * | algebraic variable. 'id' is required * | if optional input SUPPRESSALG is set, * | or if IDACalcIC is to be called with * | icopt = IDA_YA_YDP_INIT. * | * IDASetConstraints | an N_Vector defining inequality * | constraints for each component of the * | solution vector y. If a given element * | of this vector has values +2 or -2, * | then the corresponding component of y * | will be constrained to be > 0.0 or * | <0.0, respectively, while if it is +1 * | or -1, the y component is constrained * | to be >= 0.0 or <= 0.0, respectively. * | If a component of constraints is 0.0, * | then no constraint is imposed on the * | corresponding component of y. * | The presence of a non-NULL constraints * | vector that is not 0.0 (ZERO) in all * | components will cause constraint * | checking to be performed. * | * ----------------------------------------------------------------- * | * IDASetTolerances | Changes the integration tolerances * | between calls to IDASolve(). * | [set by IDAMalloc/IDAReInit] * | * ---------------------------------------------------------------- * Return flag: * IDA_SUCCESS if successful * IDA_MEM_NULL if the ida memory is NULL * IDA_ILL_INPUT if an argument has an illegal value * * ---------------------------------------------------------------- */ int IDASetRdata(void *ida_mem, void *res_data); int IDASetErrFile(void *ida_mem, FILE *errfp); int IDASetMaxOrd(void *ida_mem, int maxord); int IDASetMaxNumSteps(void *ida_mem, long int mxsteps); int IDASetInitStep(void *ida_mem, realtype hin); int IDASetMaxStep(void *ida_mem, realtype hmax); int IDASetStopTime(void *ida_mem, realtype tstop); int IDASetNonlinConvCoef(void *ida_mem, realtype epcon); int IDASetMaxErrTestFails(void *ida_mem, int maxnef); int IDASetMaxNonlinIters(void *ida_mem, int maxcor); int IDASetMaxConvFails(void *ida_mem, int maxncf); int IDASetSuppressAlg(void *ida_mem, booleantype suppressalg); int IDASetId(void *ida_mem, N_Vector id); int IDASetConstraints(void *ida_mem, N_Vector constraints); int IDASetTolerances(void *cvode_mem, int itol, realtype *rtol, void *atol); /* * ---------------------------------------------------------------- * Function : IDAMalloc * ---------------------------------------------------------------- * IDAMalloc allocates and initializes memory for a problem to * to be solved by IDA. * * res is the residual function F in F(t,y,y') = 0. * * t0 is the initial value of t, the independent variable. * * yy0 is the initial condition vector y(t0). * * yp0 is the initial condition vector y'(t0) * * itol is the type of tolerances to be used. * The legal values are: * SS (scalar relative and absolute tolerances), * SV (scalar relative tolerance and vector * absolute tolerance). * * rtol is a pointer to the relative tolerance scalar. * * atol is a pointer (void) to the absolute tolerance scalar or * an N_Vector tolerance. * (ewt) * Both rtol and atol are used to compute the error weight * vector, ewt. The error test required of a correction * delta is that the weighted-RMS norm of delta be less * than or equal to 1.0. Other convergence tests use the * same norm. The weighting vector used in this norm is * ewt. The components of ewt are defined by * ewt[i] = 1.0/(rtol*yy[i] + atol[i]). Here, yy is the * current approximate solution. See the routine * N_VWrmsNorm for the norm used in this error test. * * Note: The tolerance values may be changed in between calls to * IDASolve for the same problem. These values refer to * (*rtol) and either (*atol), for a scalar absolute * tolerance, or the components of atol, for a vector * absolute tolerance. * * IDA_SUCCESS if successful * IDA_MEM_NULL if the ida memory was NULL * IDA_MEM_FAIL if a memory allocation failed * IDA_ILL_INPUT f an argument has an illegal value. * * ---------------------------------------------------------------- */ int IDAMalloc(void *ida_mem, IDAResFn res, realtype t0, N_Vector yy0, N_Vector yp0, int itol, realtype *rtol, void *atol); /* * ---------------------------------------------------------------- * Function : IDAReInit * ---------------------------------------------------------------- * IDAReInit re-initializes IDA for the solution of a problem, * where a prior call to IDAMalloc has been made. * IDAReInit performs the same input checking and initializations * that IDAMalloc does. * But it does no memory allocation, assuming that the existing * internal memory is sufficient for the new problem. * * The use of IDAReInit requires that the maximum method order, * maxord, is no larger for the new problem than for the problem * specified in the last call to IDAMalloc. This condition is * automatically fulfilled if the default value for maxord is * specified. * * Following the call to IDAReInit, a call to the linear solver * specification routine is necessary if a different linear solver * is chosen, but may not be otherwise. If the same linear solver * is chosen, and there are no changes in its input parameters, * then no call to that routine is needed. * * The first argument to IDAReInit is: * * ida_mem = pointer to IDA memory returned by IDACreate. * * All the remaining arguments to IDAReInit have names and * meanings identical to those of IDAMalloc. * * The return value of IDAReInit is equal to SUCCESS = 0 if there * were no errors; otherwise it is a negative int equal to: * IDA_MEM_NULL indicating ida_mem was NULL, or * IDA_NO_MALLOC indicating that ida_mem was not allocated. * IDA_ILL_INPUT indicating an input argument was illegal * (including an attempt to increase maxord). * In case of an error return, an error message is also printed. * ---------------------------------------------------------------- */ int IDAReInit(void *ida_mem, IDAResFn res, realtype t0, N_Vector yy0, N_Vector yp0, int itol, realtype *rtol, void *atol); /* ---------------------------------------------------------------- * Initial Conditions optional input specification functions * ---------------------------------------------------------------- * The following functions can be called to set optional inputs * to control the initial conditions calculations. * * | * Function | Optional input / [ default value ] * | * -------------------------------------------------------------- * | * IDASetNonlinConvCoefIC | positive coeficient in the Newton * | convergence test. This test uses a * | weighted RMS norm (with weights * | defined by the tolerances, as in * | IDASolve). For new initial value * | vectors y and y' to be accepted, the * | norm of J-inverse F(t0,y,y') is * | required to be less than epiccon, * | where J is the system Jacobian. * | [0.01 * 0.33] * | * IDASetMaxNumStepsIC | maximum number of values of h allowed * | when icopt = IDA_YA_YDP_INIT, where * | h appears in the system Jacobian, * | J = dF/dy + (1/h)dF/dy'. * | [5] * | * IDASetMaxNumJacsIC | maximum number of values of the * | approximate Jacobian or preconditioner * | allowed, when the Newton iterations * | appear to be slowly converging. * | [4] * | * IDASetMaxNumItersIC | maximum number of Newton iterations * | allowed in any one attempt to solve * | the IC problem. * | [10] * | * IDASetLineSearchOffIC | a bool flag to turn off the * | linesearch algorithm. * | [FALSE] * | * IDASetStepToleranceIC | positive lower bound on the norm of * | a Newton step. * | [(unit roundoff)^(2/3) * * ---------------------------------------------------------------- * Return flag: * IDA_SUCCESS if successful * IDA_MEM_NULL if the ida memory is NULL * IDA_ILL_INPUT if an argument has an illegal value * * ---------------------------------------------------------------- */ int IDASetNonlinConvCoefIC(void *ida_mem, realtype epiccon); int IDASetMaxNumStepsIC(void *ida_mem, int maxnh); int IDASetMaxNumJacsIC(void *ida_mem, int maxnj); int IDASetMaxNumItersIC(void *ida_mem, int maxnit); int IDASetLineSearchOffIC(void *ida_mem, booleantype lsoff); int IDASetStepToleranceIC(void *ida_mem, realtype steptol); /* * ---------------------------------------------------------------- * Function : IDACalcIC * ---------------------------------------------------------------- * IDACalcIC calculates corrected initial conditions for the DAE * system for a class of index-one problems of semi-implicit form. * It uses Newton iteration combined with a Linesearch algorithm. * Calling IDACalcIC is optional. It is only necessary when the * initial conditions do not solve the given system. I.e., if * y0 and yp0 are known to satisfy F(t0, y0, yp0) = 0, then * a call to IDACalcIC is NOT necessary (for index-one problems). * * A call to IDACalcIC must be preceded by a successful call to * IDAMalloc or IDAReInit for the given DAE problem, and by a * successful call to the linear system solver specification * routine. * In addition, IDACalcIC assumes that the vectors y0, yp0, and * (if relevant) id and constraints that were set through * IDASetConstraints remain unaltered since that call. * * The call to IDACalcIC should precede the call(s) to IDASolve * for the given problem. * * The arguments to IDACalcIC are as follows. The first three -- * ida_mem, icopt, tout1 -- are required; the others are optional. * A zero value passed for any optional input specifies that the * default value is to be used. * * IDA_mem is the pointer to IDA memory returned by IDACreate. * * icopt is the option of IDACalcIC to be used. * icopt = IDA_YA_YDP_INIT directs IDACalcIC to compute * the algebraic components of y and differential * components of y', given the differential * components of y. This option requires that the * N_Vector id was set through a call to IDASetId * specifying the differential and algebraic * components. * icopt = IDA_Y_INIT directs IDACalcIC to compute all * components of y, given y'. id is not required. * * tout1 is the first value of t at which a soluton will be * requested (from IDASolve). (This is needed here to * determine the direction of integration and rough scale * in the independent variable t. * * * IDACalcIC returns an int flag. Its symbolic values and their * meanings are as follows. (The numerical return values are set * above in this file.) All unsuccessful returns give a negative * return value. If IFACalcIC failed, y0 and yp0 contain * (possibly) altered values, computed during the attempt. * * SUCCESS IDACalcIC was successful. The corrected * initial value vectors are in y0 and yp0. * * IDA_MEM_NULL The argument ida_mem was NULL. * * IDA_ILL_INPUT One of the input arguments was illegal. * See printed message. * * IDA_LINIT_FAIL The linear solver's init routine failed. * * IDA_BAD_EWT Some component of the error weight vector * is zero (illegal), either for the input * value of y0 or a corrected value. * * IDA_RES_FAIL The user's residual routine returned * a non-recoverable error flag. * * IDA_FIRST_RES_FAIL The user's residual routine returned * a recoverable error flag on the first call, * but IDACalcIC was unable to recover. * * IDA_LSETUP_FAIL The linear solver's setup routine had a * non-recoverable error. * * IDA_LSOLVE_FAIL The linear solver's solve routine had a * non-recoverable error. * * IDA_NO_RECOVERY The user's residual routine, or the linear * solver's setup or solve routine had a * recoverable error, but IDACalcIC was * unable to recover. * * IDA_CONSTR_FAIL IDACalcIC was unable to find a solution * satisfying the inequality constraints. * * IDA_LINESEARCH_FAIL The Linesearch algorithm failed to find a * solution with a step larger than steptol * in weighted RMS norm. * * IDA_CONV_FAIL IDACalcIC failed to get convergence of the * Newton iterations. * * ---------------------------------------------------------------- */ int IDACalcIC (void *ida_mem, int icopt, realtype tout1); /* * ---------------------------------------------------------------- * Function : IDASolve * ---------------------------------------------------------------- * IDASolve integrates the DAE over an interval in t, the * independent variable. If itask is NORMAL, then the solver * integrates from its current internal t value to a point at or * beyond tout, then interpolates to t = tout and returns y(tret) * in the user-allocated vector yret. In general, tret = tout. * If itask is ONE_STEP, then the solver takes one internal step * of the independent variable and returns in yret the value of y * at the new internal independent variable value. In this case, * tout is used only during the first call to IDASolve to * determine the direction of integration and the rough scale of * the problem. In either case, the independent variable value * reached by the solver is placed in (*tret). The user is * responsible for allocating the memory for this value. * * IDA_mem is the pointer (void) to IDA memory returned by * IDACreate. * * tout is the next independent variable value at which a * computed solution is desired. * * *tret is the actual independent variable value corresponding * to the solution vector yret. * * yret is the computed solution vector. With no errors, * yret = y(tret). * * ypret is the derivative of the computed solution at t = tret. * * Note: yret and ypret may be the same N_Vectors as y0 and yp0 * in the call to IDAMalloc or IDAReInit. * * itask is NORMAL, NORMAL_TSTOP, ONE_STEP, or ONE_STEP_TSTOP. * These modes are described above. * * * The return values for IDASolve are described below. * (The numerical return values are defined above in this file.) * All unsuccessful returns give a negative return value. * * IDA_SUCCESS * IDASolve succeeded. * * IDA_TSTOP_RETURN: * IDASolve returns computed results for the independent variable * value tstop. That is, tstop was reached. * * IDA_MEM_NULL: * The IDA_mem argument was NULL. * * IDA_ILL_INPUT: * One of the inputs to IDASolve is illegal. This includes the * situation when a component of the error weight vectors * becomes < 0 during internal stepping. The ILL_INPUT flag * will also be returned if the linear solver function IDA * (called by the user after calling IDACreate) failed to set one * of the linear solver-related fields in IDA_mem or if the linear * solver's init routine failed. In any case, the user should see * the printed error message for more details. * * IDA_TOO_MUCH_WORK: * The solver took mxstep internal steps but could not reach tout. * The default value for mxstep is MXSTEP_DEFAULT = 500. * * IDA_TOO_MUCH_ACC: * The solver could not satisfy the accuracy demanded by the user * for some internal step. * * IDA_ERR_FAIL: * Error test failures occurred too many times (=MXETF = 10) during * one internal step. * * IDA_CONV_FAIL: * Convergence test failures occurred too many times (= MXNCF = 10) * during one internal step. * * IDA_LSETUP_FAIL: * The linear solver's setup routine failed * in an unrecoverable manner. * * IDA_LSOLVE_FAIL: * The linear solver's solve routine failed * in an unrecoverable manner. * * IDA_CONSTR_FAIL: * The inequality constraints were violated, * and the solver was unable to recover. * * IDA_REP_RES_ERR: * The user's residual function repeatedly returned a recoverable * error flag, but the solver was unable to recover. * * IDA_RES_FAIL: * The user's residual function returned a nonrecoverable error * flag. * * ---------------------------------------------------------------- */ int IDASolve(void *ida_mem, realtype tout, realtype *tret, N_Vector yret, N_Vector ypret, int itask); /* * ---------------------------------------------------------------- * Function: IDAGetSolution * ---------------------------------------------------------------- * * This routine evaluates y(t) and y'(t) as the value and * derivative of the interpolating polynomial at the independent * variable t, and stores the results in the vectors yret and * ypret. It uses the current independent variable value, tn, * and the method order last used, kused. This function is * called by IDASolve with t = tout, t = tn, or t = tstop. * * If kused = 0 (no step has been taken), or if t = tn, then the * order used here is taken to be 1, giving yret = phi[0], * ypret = phi[1]/psi[0]. * * The return values are: * IDA_SUCCESS: succeess. * IDA_BAD_T: t is not in the interval [tn-hu,tn]. * IDA_MEM_NULL: The ida_mem argument was NULL. * * ---------------------------------------------------------------- */ int IDAGetSolution(void *ida_mem, realtype t, N_Vector yret, N_Vector ypret); /* ---------------------------------------------------------------- * Integrator optional output extraction functions * ---------------------------------------------------------------- * * The following functions can be called to get optional outputs * and statistics related to the main integrator. * ---------------------------------------------------------------- * * IDAGetWorkSpace returns the IDA real and integer workspace sizes * IDAGetNumSteps returns the cumulative number of internal * steps taken by the solver * IDAGetNumRhsEvals returns the number of calls to the user's * res function * IDAGetNumLinSolvSetups returns the number of calls made to * the linear solver's setup routine * IDAGetNumErrTestFails returns the number of local error test * failures that have occured * IDAGetNumBacktrackOps returns the number of backtrack * operations done in the linesearch algorithm in IDACalcIC * IDAGetLastOrder returns the order used during the last * internal step * IDAGetCurentOrder returns the order to be used on the next * internal step * IDAGetActualInitStep returns the actual initial step size * used by IDA * IDAGetLAstStep returns the step size for the last internal * step (if from IDASolve), or the last value of the * artificial step size h (if from IDACalcIC) * IDAGetCurrentStep returns the step size to be attempted on the * next internal step * IDAGetCurrentTime returns the current internal time reached * by the solver * IDAGetTolScaleFactor returns a suggested factor by which the * user's tolerances should be scaled when too much * accuracy has been requested for some internal step * IDAGetErrWeights returns the state error weight vector. * The user need not allocate space for ewt. * IDAGetEstLocalErrors returns the vector of estimated local * errors. The user need not allocate space for ele. * * IDAGet* return values: * IDA_SUCCESS if succesful * IDA_MEM_NULL if the ida memory was NULL * * ---------------------------------------------------------------- */ int IDAGetWorkSpace(void *ida_mem, long int *lenrw, long int *leniw); int IDAGetNumSteps(void *ida_mem, long int *nsteps); int IDAGetNumResEvals(void *ida_mem, long int *nrevals); int IDAGetNumLinSolvSetups(void *ida_mem, long int *nlinsetups); int IDAGetNumErrTestFails(void *ida_mem, long int *netfails); int IDAGetNumBacktrackOps(void *ida_mem, long int *nbacktr); int IDAGetLastOrder(void *ida_mem, int *klast); int IDAGetCurrentOrder(void *ida_mem, int *kcur); int IDAGetActualInitStep(void *ida_mem, realtype *hinused); int IDAGetLastStep(void *ida_mem, realtype *hlast); int IDAGetCurrentStep(void *ida_mem, realtype *hcur); int IDAGetCurrentTime(void *ida_mem, realtype *tcur); int IDAGetTolScaleFactor(void *ida_mem, realtype *tolsfact); int IDAGetErrWeights(void *ida_mem, N_Vector *eweight); int IDAGetIntegratorStats(void *ida_mem, long int *nsteps, long int *nrevals, long int *nlinsetups, long int *netfails, int *qlast, int *qcur, realtype *hlast, realtype *hcur, realtype *tcur); /* * ---------------------------------------------------------------- * Nonlinear solver optional output extraction functions * ---------------------------------------------------------------- * * The following functions can be called to get optional outputs * and statistics related to the nonlinear solver. * -------------------------------------------------------------- * * IDAGetNumNonlinSolvIters returns the number of nonlinear * solver iterations performed. * IDAGetNumNonlinSolvConvFails returns the number of nonlinear * convergence failures. * * ---------------------------------------------------------------- */ int IDAGetNumNonlinSolvIters(void *ida_mem, long int *nniters); int IDAGetNumNonlinSolvConvFails(void *ida_mem, long int *nncfails); /* * ---------------------------------------------------------------- * As a convenience, the following function provides the * optional outputs in a group. * ---------------------------------------------------------------- */ int IDAGetNonlinSolvStats(void *ida_mem, long int *nniters, long int *nncfails); /* * ---------------------------------------------------------------- * Function : IDAFree * ---------------------------------------------------------------- * IDAFree frees the problem memory IDA_mem allocated by * IDAMalloc. Its only argument is the pointer idamem * returned by IDAMalloc. * ---------------------------------------------------------------- */ void IDAFree(void *ida_mem); /* * ---------------------------------------- * IDA return flags * ---------------------------------------- */ #define IDA_SUCCESS 0 #define IDA_TSTOP_RETURN 1 #define IDA_MEM_NULL -1 #define IDA_ILL_INPUT -2 #define IDA_NO_MALLOC -3 #define IDA_TOO_MUCH_WORK -4 #define IDA_TOO_MUCH_ACC -5 #define IDA_ERR_FAIL -6 #define IDA_CONV_FAIL -7 #define IDA_LINIT_FAIL -8 #define IDA_LSETUP_FAIL -9 #define IDA_LSOLVE_FAIL -10 #define IDA_RES_FAIL -11 #define IDA_CONSTR_FAIL -12 #define IDA_REP_RES_ERR -13 #define IDA_MEM_FAIL -14 #define IDA_BAD_T -15 #define IDA_BAD_EWT -16 #define IDA_FIRST_RES_FAIL -17 #define IDA_LINESEARCH_FAIL -18 #define IDA_NO_RECOVERY -19 #define IDA_PDATA_NULL -20 /* * ================================================================= * I N T E R F A C E T O L I N E A R S O L V E R S * ================================================================= */ /* * ----------------------------------------------------------------- * int (*ida_linit)(IDAMem IDA_mem); * ----------------------------------------------------------------- * The purpose of ida_linit is to allocate memory for the * solver-specific fields in the structure *(idamem->ida_lmem) and * perform any needed initializations of solver-specific memory, * such as counters/statistics. An (*ida_linit) should return * 0 if it has successfully initialized the IDA linear solver and * a negative value otherwise. If an error does occur, an * appropriate message should be sent to (idamem->errfp). * ---------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * int (*ida_lsetup)(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp, * N_Vector resp, * N_Vector tempv1, N_Vector tempv2, N_Vector tempv3); * ----------------------------------------------------------------- * The job of ida_lsetup is to prepare the linear solver for * subsequent calls to ida_lsolve. Its parameters are as follows: * * idamem - problem memory pointer of type IDAMem. See the big * typedef earlier in this file. * * * yyp - the predicted y vector for the current IDA internal * step. * * ypp - the predicted y' vector for the current IDA internal * step. * * resp - F(tn, yyp, ypp). * * tempv1, tempv2, tempv3 - temporary N_Vectors provided for use * by ida_lsetup. * * The ida_lsetup routine should return 0 if successful, * a positive value for a recoverable error, and a negative value * for an unrecoverable error. * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * int (*ida_lsolve)(IDAMem IDA_mem, N_Vector b, N_Vector weight, * N_Vector ycur, N_Vector ypcur, N_Vector rescur); * ----------------------------------------------------------------- * ida_lsolve must solve the linear equation P x = b, where * P is some approximation to the system Jacobian * J = (dF/dy) + cj (dF/dy') * evaluated at (tn,ycur,ypcur) and the RHS vector b is input. * The N-vector ycur contains the solver's current approximation * to y(tn), ypcur contains that for y'(tn), and the vector rescur * contains the N-vector residual F(tn,ycur,ypcur). * The solution is to be returned in the vector b. * * The ida_lsolve routine should return 0 if successful, * a positive value for a recoverable error, and a negative value * for an unrecoverable error. * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * int (*ida_lperf)(IDAMem IDA_mem, int perftask); * ----------------------------------------------------------------- * ida_lperf is called two places in IDA where linear solver * performance data is required by IDA. For perftask = 0, an * initialization of performance variables is performed, while for * perftask = 1, the performance is evaluated. * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * int (*ida_lfree)(IDAMem IDA_mem); * ----------------------------------------------------------------- * ida_lfree should free up any memory allocated by the linear * solver. This routine is called once a problem has been * completed and the linear solver is no longer needed. * ----------------------------------------------------------------- */ #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/ida_impl.h000077500000000000000000000427351323325274500200140ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Allan G. Taylor, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/ida/LICENSE. * ----------------------------------------------------------------- * This is the header file (private version) for the main IDA solver. * ----------------------------------------------------------------- */ #ifndef _IDA_IMPL_H #define _IDA_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "ida.h" #include "sundialstypes.h" #include "nvector.h" /* Basic IDA constants */ #define MXORDP1 6 /* max. number of N_Vectors kept in the phi array */ /****************************************************************** * Types : struct IDAMemRec, IDAMem * *----------------------------------------------------------------* * The type IDAMem is type pointer to struct IDAMemRec. This * * structure contains fields to keep track of problem state. * * * ******************************************************************/ typedef struct IDAMemRec { realtype ida_uround; /* machine unit roundoff */ /* Problem Specification Data */ IDAResFn ida_res; /* F(t,y(t),y'(t))=0; the function F */ void *ida_rdata; /* user pointer passed to res */ int ida_itol; /* itol = SS or SV */ realtype *ida_rtol; /* ptr to relative tolerance */ void *ida_atol; /* ptr to absolute tolerance */ booleantype ida_setupNonNull; /* Does setup do something? */ booleantype ida_constraintsSet; /* constraints vector present: do constraints calc */ booleantype ida_suppressalg; /* true means suppress algebraic vars in local error tests */ /* Divided differences array and associated minor arrays */ N_Vector ida_phi[MXORDP1]; /* phi = (maxord+1) arrays of divided differences */ realtype ida_psi[MXORDP1]; /* differences in t (sums of recent step sizes) */ realtype ida_alpha[MXORDP1]; /* ratios of current stepsize to psi values */ realtype ida_beta[MXORDP1]; /* ratios of current to previous product of psi's */ realtype ida_sigma[MXORDP1]; /* product successive alpha values and factorial */ realtype ida_gamma[MXORDP1]; /* sum of reciprocals of psi values */ /* N_Vectors */ N_Vector ida_ewt; /* error weight vector */ N_Vector ida_y0; /* initial y vector (user-supplied) */ N_Vector ida_yp0; /* initial y' vector (user-supplied) */ N_Vector ida_yy; /* work space for y vector (= user's yret) */ N_Vector ida_yp; /* work space for y' vector (= user's ypret) */ N_Vector ida_delta; /* residual vector */ N_Vector ida_id; /* bit vector for diff./algebraic components */ N_Vector ida_constraints; /* vector of inequality constraint options */ N_Vector ida_savres; /* saved residual vector (= tempv1) */ N_Vector ida_ee; /* accumulated corrections to y */ N_Vector ida_mm; /* mask vector in constraints tests (= tempv2) */ N_Vector ida_tempv1; /* work space vector */ N_Vector ida_tempv2; /* work space vector */ N_Vector ida_ynew; /* work vector for y in IDACalcIC (= tempv2) */ N_Vector ida_ypnew; /* work vector for yp in IDACalcIC (= ee) */ N_Vector ida_delnew; /* work vector for delta in IDACalcIC (= phi[2]) */ N_Vector ida_dtemp; /* work vector in IDACalcIC (= phi[3]) */ /* Scalars for use by IDACalcIC*/ int ida_icopt; /* IC calculation user option */ booleantype ida_lsoff; /* IC calculation linesearch turnoff option */ int ida_maxnh; /* max. number of h tries in IC calculation */ int ida_maxnj; /* max. number of J tries in IC calculation */ int ida_maxnit; /* max. number of Netwon iterations in IC calc. */ int ida_nbacktr; /* number of IC linesearch backtrack operations */ int ida_sysindex; /* computed system index (0 or 1) */ realtype ida_epiccon; /* IC nonlinear convergence test constant */ realtype ida_steptol; /* minimum Newton step size in IC calculation */ realtype ida_tscale; /* time scale factor = abs(tout1 - t0) */ /* Tstop information */ booleantype ida_tstopset; realtype ida_tstop; /* Step Data */ int ida_kk; /* current BDF method order */ int ida_kused; /* method order used on last successful step */ int ida_knew; /* order for next step from order decrease decision */ int ida_phase; /* flag to trigger step doubling in first few steps */ int ida_ns; /* counts steps at fixed stepsize and order */ realtype ida_hin; /* initial step */ realtype ida_h0u; /* actual initial stepsize */ realtype ida_hh; /* current step size h */ realtype ida_hused; /* step size used on last successful step */ realtype ida_rr; /* rr = hnext / hused */ realtype ida_tn; /* current internal value of t */ realtype ida_tretp; /* value of tret previously returned by IDASolve */ realtype ida_cj; /* current value of scalar (-alphas/hh) in Jacobian */ realtype ida_cjlast; /* cj value saved from last successful step */ realtype ida_cjold; /* cj value saved from last call to lsetup */ realtype ida_cjratio; /* ratio of cj values: cj/cjold */ realtype ida_ss; /* scalar used in Newton iteration convergence test */ realtype ida_epsNewt; /* test constant in Newton convergence test */ realtype ida_epcon; /* coeficient of the Newton covergence test */ realtype ida_toldel; /* tolerance in direct test on Newton corrections */ /* Limits */ int ida_maxncf; /* max numer of convergence failures */ int ida_maxcor; /* max number of Newton corrections */ int ida_maxnef; /* max number of error test failures */ int ida_maxord; /* max value of method order k: */ long int ida_mxstep; /* max number of internal steps for one user call */ realtype ida_hmax_inv; /* inverse of max. step size hmax (default = 0.0) */ /* Counters */ long int ida_nst; /* number of internal steps taken */ long int ida_nre; /* number of function (res) calls */ long int ida_ncfn; /* number of corrector convergence failures */ long int ida_netf; /* number of error test failures */ long int ida_nni; /* number of Newton iterations performed */ long int ida_nsetups; /* number of lsetup calls */ /* Space requirements for IDA */ long int ida_lrw1; /* no. of realtype words in 1 N_Vector */ long int ida_liw1; /* no. of integer words in 1 N_Vector */ long int ida_lrw; /* number of realtype words in IDA work vectors */ long int ida_liw; /* no. of integer words in IDA work vectors */ realtype ida_tolsf; /* tolerance scale factor (saved value) */ FILE *ida_errfp; /* IDA error messages are sent to errfp */ /* Flags to verify correct calling sequence */ booleantype ida_SetupDone; /* set to FALSE by IDAMalloc and IDAReInit */ /* set to TRUE by IDACalcIC or IDASolve */ booleantype ida_MallocDone; /* set to FALSE by IDACreate */ /* set to TRUE by IDAMAlloc */ /* tested by IDAReInit and IDASolve */ /* Linear Solver Data */ /* Linear Solver functions to be called */ int (*ida_linit)(struct IDAMemRec *idamem); int (*ida_lsetup)(struct IDAMemRec *idamem, N_Vector yyp, N_Vector ypp, N_Vector resp, N_Vector tempv1, N_Vector tempv2, N_Vector tempv3); int (*ida_lsolve)(struct IDAMemRec *idamem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector ypcur, N_Vector rescur); int (*ida_lperf)(struct IDAMemRec *idamem, int perftask); int (*ida_lfree)(struct IDAMemRec *idamem); /* Linear Solver specific memory */ void *ida_lmem; /* Flag to indicate successful ida_linit call */ booleantype ida_linitOK; } *IDAMem; /* *---------------------------------------------------------------- * IDA Error Messages *---------------------------------------------------------------- */ #if defined(SUNDIALS_EXTENDED_PRECISION) #define MSG_TIME "at t = %Lg, " #define MSG_TIME_H "at t = %Lg and h = %Lg, " #define MSG_TIME_INT "t is not between tcur - hu = %Lg and tcur = %Lg.\n\n" #define MSG_TIME_TOUT "tout = %Lg" #elif defined(SUNDIALS_DOUBLE_PRECISION) #define MSG_TIME "at t = %lg, " #define MSG_TIME_H "at t = %lg and h = %lg, " #define MSG_TIME_INT "t is not between tcur - hu = %lg and tcur = %lg.\n\n" #define MSG_TIME_TOUT "tout = %lg" #else #define MSG_TIME "at t = %g, " #define MSG_TIME_H "at t = %g and h = %g, " #define MSG_TIME_INT "t is not between tcur - hu = %g and tcur = %g.\n\n" #define MSG_TIME_TOUT "tout = %g" #endif /* IDACreate error messages */ #define MSG_IDAMEM_FAIL "IDACreate-- allocation of ida_mem failed. \n\n" /* IDAMalloc/IDAReInit error messages */ #define _IDAM_ "IDAMalloc/IDAReInit-- " #define MSG_IDAM_NO_MEM _IDAM_ "ida_mem = NULL illegal.\n\n" #define MSG_Y0_NULL _IDAM_ "y0 = NULL illegal.\n\n" #define MSG_YP0_NULL _IDAM_ "yp0 = NULL illegal.\n\n" #define MSG_BAD_ITOL _IDAM_ "itol has an illegal value.\n" #define MSG_RES_NULL _IDAM_ "res = NULL illegal.\n\n" #define MSG_RTOL_NULL _IDAM_ "reltol = NULL illegal.\n\n" #define MSG_BAD_RTOL _IDAM_ "*reltol < 0 illegal.\n\n" #define MSG_ATOL_NULL _IDAM_ "abstol = NULL illegal.\n\n" #define MSG_BAD_ATOL _IDAM_ "some abstol component < 0.0 illegal.\n\n" #define MSG_BAD_NVECTOR _IDAM_ "a required vector operation is not implemented.\n\n" #define MSG_MEM_FAIL _IDAM_ "a memory request failed.\n\n" #define MSG_REI_NO_MALLOC "IDAReInit-- attempt to call before IDAMalloc. \n\n" /* IDAInitialSetup error messages -- called from IDACalcIC or IDASolve */ #define _IDAIS_ "Initial setup-- " #define MSG_MISSING_ID _IDAIS_ "id = NULL but suppressalg option on.\n\n" #define MSG_BAD_EWT _IDAIS_ "some initial ewt component = 0.0 illegal.\n\n" #define MSG_BAD_CONSTRAINTS _IDAIS_ "illegal values in constraints vector.\n\n" #define MSG_Y0_FAIL_CONSTR _IDAIS_ "y0 fails to satisfy constraints.\n\n" #define MSG_LSOLVE_NULL _IDAIS_ "the linear solver's solve routine is NULL.\n\n" #define MSG_LINIT_FAIL _IDAIS_ "the linear solver's init routine failed.\n\n" /* IDASolve error messages */ #define _IDASLV_ "IDASolve-- " #define MSG_IDA_NO_MEM _IDASLV_ "ida_mem = NULL illegal.\n\n" #define MSG_NO_MALLOC _IDASLV_ "attempt to call before IDAMalloc. \n\n" #define MSG_BAD_HINIT _IDASLV_ "initial step is not towards tout.\n\n" #define MSG_BAD_TOUT1 _IDASLV_ "trouble interpolating at " MSG_TIME_TOUT ".\n" #define MSG_BAD_TOUT2 "tout too far back in direction of integration.\n\n" #define MSG_BAD_TOUT MSG_BAD_TOUT1 MSG_BAD_TOUT2 #define MSG_BAD_TSTOP _IDASLV_ MSG_TIME "tstop is behind.\n\n" #define MSG_MAX_STEPS _IDASLV_ MSG_TIME "maximum number of steps reached.\n\n" #define MSG_EWT_NOW_BAD _IDASLV_ MSG_TIME "some ewt component has become <= 0.0.\n\n" #define MSG_TOO_MUCH_ACC _IDASLV_ MSG_TIME "too much accuracy requested.\n\n" #define MSG_ERR_FAILS1 "the error test\nfailed repeatedly or with |h| = hmin.\n\n" #define MSG_ERR_FAILS _IDASLV_ MSG_TIME_H MSG_ERR_FAILS1 #define MSG_CONV_FAILS1 "the corrector convergence\nfailed repeatedly.\n\n" #define MSG_CONV_FAILS _IDASLV_ MSG_TIME_H MSG_CONV_FAILS1 #define MSG_SETUP_FAILED1 "the linear solver setup failed unrecoverably.\n\n" #define MSG_SETUP_FAILED _IDASLV_ MSG_TIME MSG_SETUP_FAILED1 #define MSG_SOLVE_FAILED1 "the linear solver solve failed unrecoverably.\n\n" #define MSG_SOLVE_FAILED _IDASLV_ MSG_TIME MSG_SOLVE_FAILED1 #define MSG_TOO_CLOSE _IDASLV_ "tout too close to t0 to start integration.\n\n" #define MSG_YRET_NULL _IDASLV_ "yret = NULL illegal.\n\n" #define MSG_YPRET_NULL _IDASLV_ "ypret = NULL illegal.\n\n" #define MSG_TRET_NULL _IDASLV_ "tret = NULL illegal.\n\n" #define MSG_BAD_ITASK _IDASLV_ "itask has an illegal value.\n\n" #define MSG_NO_TSTOP _IDASLV_ "tstop not set for this itask. \n\n" #define MSG_REP_RES_ERR1 "repeated recoverable residual errors.\n\n" #define MSG_REP_RES_ERR _IDASLV_ MSG_TIME MSG_REP_RES_ERR1 #define MSG_RES_NONRECOV1 "the residual function failed unrecoverably. \n\n" #define MSG_RES_NONRECOV _IDASLV_ MSG_TIME MSG_RES_NONRECOV1 #define MSG_FAILED_CONSTR1 "unable to satisfy inequality constraints. \n\n" #define MSG_FAILED_CONSTR _IDASLV_ MSG_TIME MSG_FAILED_CONSTR1 /* IDACalcIC error messages */ #define _IDAIC_ "IDACalcIC-- " #define MSG_IC_NO_MEM _IDAIC_ "IDA_mem = NULL illegal.\n\n" #define MSG_IC_NO_MALLOC _IDAIC_ "attempt to call before IDAMalloc. \n\n" #define MSG_IC_BAD_ICOPT _IDAIC_ "icopt has an illegal value.\n\n" #define MSG_IC_MISSING_ID _IDAIC_ "id = NULL conflicts with icopt.\n\n" #define MSG_IC_BAD_ID _IDAIC_ "id has illegal values.\n\n" #define MSG_IC_TOO_CLOSE1 _IDAIC_ "tout1 too close to t0 to attempt " #define MSG_IC_TOO_CLOSE2 "initial condition calculation.\n\n" #define MSG_IC_TOO_CLOSE MSG_IC_TOO_CLOSE1 MSG_IC_TOO_CLOSE2 #define MSG_IC_BAD_EWT _IDAIC_ "some ewt component = 0.0 illegal.\n\n" #define MSG_IC_RES_NONR1 "the residual function failed unrecoverably. \n\n" #define MSG_IC_RES_NONREC _IDAIC_ MSG_IC_RES_NONR1 #define MSG_IC_RES_FAIL1 "the residual function failed at the first call. \n\n" #define MSG_IC_RES_FAIL _IDAIC_ MSG_IC_RES_FAIL1 #define MSG_IC_SETUP_FAIL1 "the linear solver setup failed unrecoverably.\n\n" #define MSG_IC_SETUP_FAIL _IDAIC_ MSG_IC_SETUP_FAIL1 #define MSG_IC_SOLVE_FAIL1 "the linear solver solve failed unrecoverably.\n\n" #define MSG_IC_SOLVE_FAIL _IDAIC_ MSG_IC_SOLVE_FAIL1 #define MSG_IC_NO_RECOV1 _IDAIC_ "The residual routine or the linear" #define MSG_IC_NO_RECOV2 " setup or solve routine had a recoverable" #define MSG_IC_NO_RECOV3 " error, but IDACalcIC was unable to recover.\n\n" #define MSG_IC_NO_RECOVERY MSG_IC_NO_RECOV1 MSG_IC_NO_RECOV2 MSG_IC_NO_RECOV3 #define MSG_IC_FAIL_CON1 "Unable to satisfy the inequality constraints.\n\n" #define MSG_IC_FAIL_CONSTR _IDAIC_ MSG_IC_FAIL_CON1 #define MSG_IC_FAILED_LS1 "the linesearch algorithm failed with too small a step.\n\n" #define MSG_IC_FAILED_LINS _IDAIC_ MSG_IC_FAILED_LS1 #define MSG_IC_CONV_FAIL1 "Newton/Linesearch algorithm failed to converge.\n\n" #define MSG_IC_CONV_FAILED _IDAIC_ MSG_IC_CONV_FAIL1 /* IDASet* error messages */ #define MSG_IDAS_NO_MEM "IDASet*-- ida_mem = NULL illegal. \n\n" #define MSG_IDAS_NEG_MAXORD "IDASetMaxOrd-- maxord<=0 illegal. \n\n" #define MSG_IDAS_BAD_MAXORD "IDASetMaxOrd-- illegal to increase maximum order.\n\n" #define MSG_IDAS_NEG_MXSTEPS "IDASetMaxNumSteps-- mxsteps <= 0 illegal. \n\n" #define MSG_IDAS_NEG_HMAX "IDASetMaxStep-- hmax <= 0 illegal. \n\n" #define MSG_IDAS_NEG_EPCON "IDASetNonlinConvCoef-- epcon < 0.0 illegal. \n\n" #define MSG_IDAS_BAD_ITOL "IDASetTolerances-- itol has an illegal value.\n\n" #define MSG_IDAS_RTOL_NULL "IDASetTolerances-- rtol = NULL illegal.\n\n" #define MSG_IDAS_BAD_RTOL "IDASetTolerances-- *rtol < 0 illegal.\n\n" #define MSG_IDAS_ATOL_NULL "IDASetTolerances-- atol = NULL illegal.\n\n" #define MSG_IDAS_BAD_ATOL "IDASetTolerances-- some atol component < 0.0 illegal.\n\n" #define MSG_IDAS_BAD_EPICCON "IDASetNonlinConvCoefIC-- epiccon < 0.0 illegal.\n\n" #define MSG_IDAS_BAD_MAXNH "IDASetMaxNumStepsIC-- maxnh < 0 illegal.\n\n" #define MSG_IDAS_BAD_MAXNJ "IDASetMaxNumJacsIC-- maxnj < 0 illegal.\n\n" #define MSG_IDAS_BAD_MAXNIT "IDASetMaxNumItersIC-- maxnit < 0 illegal.\n\n" #define MSG_IDAS_BAD_STEPTOL "IDASetLineSearchOffIC-- steptol < 0.0 illegal.\n\n" /* IDAGet* Error Messages */ #define MSG_IDAG_NO_MEM "IDAGet*-- ida_mem = NULL illegal. \n\n" #define MSG_IDAG_BAD_T1 "IDAGetSolution-- " #define MSG_IDAG_BAD_T MSG_IDAG_BAD_T1 MSG_TIME MSG_TIME_INT #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idaband.c000077500000000000000000000415411323325274500176050ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/ida/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the IDA banded linear * solver module, IDABAND. This module uses standard banded * matrix techniques to solve the linear systems generated by the * (nonlinear) Newton iteration process. The user may either * supply a banded Jacobian routine or use the routine supplied * with this module (IDABandDQJac). * ----------------------------------------------------------------- */ #include #include #include #include "ida_impl.h" #include "idaband_impl.h" #include "sundialsmath.h" /* Constants */ #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define TWO RCONST(2.0) /* IDABAND linit, lsetup, lsolve, and lfree routines */ static int IDABandInit(IDAMem IDA_mem); static int IDABandSetup(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp, N_Vector rrp, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); static int IDABandSolve(IDAMem IDA_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector ypcur, N_Vector rrcur); static int IDABandFree(IDAMem IDA_mem); static int IDABandDQJac(long int Neq, long int mupper, long int mlower, realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *jac_data, BandMat Jac, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* Readability Replacements */ #define res (IDA_mem->ida_res) #define rdata (IDA_mem->ida_rdata) #define uround (IDA_mem->ida_uround) #define tn (IDA_mem->ida_tn) #define hh (IDA_mem->ida_hh) #define cj (IDA_mem->ida_cj) #define cjratio (IDA_mem->ida_cjratio) #define ewt (IDA_mem->ida_ewt) #define constraints (IDA_mem->ida_constraints) #define nre (IDA_mem->ida_nre) #define errfp (IDA_mem->ida_errfp) #define iopt (IDA_mem->ida_iopt) #define linit (IDA_mem->ida_linit) #define lsetup (IDA_mem->ida_lsetup) #define lsolve (IDA_mem->ida_lsolve) #define lperf (IDA_mem->ida_lperf) #define lfree (IDA_mem->ida_lfree) #define lmem (IDA_mem->ida_lmem) #define setupNonNull (IDA_mem->ida_setupNonNull) #define vec_tmpl (IDA_mem->ida_tempv1) #define neq (idaband_mem->b_neq) #define ml (idaband_mem->b_mlower) #define mu (idaband_mem->b_mupper) #define jac (idaband_mem->b_jac) #define JJ (idaband_mem->b_J) #define storage_mu (idaband_mem->b_storage_mu) #define pivots (idaband_mem->b_pivots) #define nje (idaband_mem->b_nje) #define nreB (idaband_mem->b_nreB) #define jacdata (idaband_mem->b_jdata) #define last_flag (idaband_mem->b_last_flag) /* * ----------------------------------------------------------------- * IDABand * ----------------------------------------------------------------- * This routine initializes the memory record and sets various function * fields specific to the IDABAND linear solver module. * IDABand first calls the existing lfree routine if this is not NULL. * Then it sets the ida_linit, ida_lsetup, ida_lsolve, ida_lperf, and * ida_lfree fields in (*IDA_mem) to be IDABandInit, IDABandSetup, * IDABandSolve, NULL, and IDABandFree, respectively. * It allocates memory for a structure of type IDABandMemRec and sets * the ida_lmem field in (*IDA_mem) to the address of this structure. * It sets setupNonNull in (*IDA_mem) to TRUE, sets the b_jdata field in * the IDABandMemRec structure to be the input parameter jdata, and sets * the b_jac field to be: * (1) the input parameter bjac, if bjac != NULL, or * (2) IDABandDQJac, if bjac == NULL. * Finally, it allocates memory for JJ and pivots. * IDABand returns IDABAND_SUCCESS = 0, IDABAND_LMEM_FAIL = -1, * or IDABAND_ILL_INPUT = -2. * * NOTE: The band linear solver assumes a serial implementation * of the NVECTOR package. Therefore, IDABand will first * test for a compatible N_Vector internal representation by * checking that the N_VGetArrayPointer function exists * ----------------------------------------------------------------- */ int IDABand(void *ida_mem, long int Neq, long int mupper, long int mlower) { IDAMem IDA_mem; IDABandMem idaband_mem; int flag; /* Return immediately if ida_mem is NULL. */ if (ida_mem == NULL) { fprintf(stderr, MSGB_MEM_FAIL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Test if the NVECTOR package is compatible with the BAND solver */ if(vec_tmpl->ops->nvgetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_BAD_NVECTOR); return(IDABAND_ILL_INPUT); } if (lfree != NULL) flag = lfree((IDAMem) ida_mem); /* Set five main function fields in ida_mem. */ linit = IDABandInit; lsetup = IDABandSetup; lsolve = IDABandSolve; lperf = NULL; lfree = IDABandFree; /* Get memory for IDABandMemRec. */ idaband_mem = (IDABandMem) malloc(sizeof(IDABandMemRec)); if (idaband_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); return(IDABAND_MEM_FAIL); } /* Set default Jacobian routine and Jacobian data */ jac = IDABandDQJac; jacdata = IDA_mem; last_flag = IDABAND_SUCCESS; setupNonNull = TRUE; /* Store problem size */ neq = Neq; /* Test mlower and mupper for legality and load in memory. */ if ((mlower < 0) || (mupper < 0) || (mlower >= Neq) || (mupper >= Neq)) { if(errfp!=NULL) fprintf(errfp, MSGB_BAD_SIZES); return(IDABAND_ILL_INPUT); } idaband_mem->b_mlower = mlower; idaband_mem->b_mupper = mupper; /* Set extended upper half-bandwidth for JJ (required for pivoting). */ storage_mu = MIN(Neq-1, mupper + mlower); /* Allocate memory for JJ and pivot array. */ JJ = BandAllocMat(Neq, mupper, mlower, storage_mu); if (JJ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); return(IDABAND_MEM_FAIL); } pivots = BandAllocPiv(Neq); if (pivots == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_MEM_FAIL); BandFreeMat(JJ); return(IDABAND_MEM_FAIL); } /* Attach linear solver memory to the integrator memory */ lmem = idaband_mem; return(IDABAND_SUCCESS); } /* * ----------------------------------------------------------------- * IDABandSet* and IDABandGet* * ----------------------------------------------------------------- */ int IDABandSetJacFn(void *ida_mem, IDABandJacFn bjac) { IDAMem IDA_mem; IDABandMem idaband_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGB_SETGET_IDAMEM_NULL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(IDABAND_LMEM_NULL); } idaband_mem = (IDABandMem) lmem; jac = bjac; return(IDABAND_SUCCESS); } int IDABandSetJacData(void *ida_mem, void *jac_data) { IDAMem IDA_mem; IDABandMem idaband_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGB_SETGET_IDAMEM_NULL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(IDABAND_LMEM_NULL); } idaband_mem = (IDABandMem) lmem; jacdata = jac_data; return(IDABAND_SUCCESS); } int IDABandGetWorkSpace(void *ida_mem, long int *lenrwB, long int *leniwB) { IDAMem IDA_mem; IDABandMem idaband_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGB_SETGET_IDAMEM_NULL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(IDABAND_LMEM_NULL); } idaband_mem = (IDABandMem) lmem; *lenrwB = neq*(storage_mu + ml + 1); *leniwB = neq; return(IDABAND_SUCCESS); } int IDABandGetNumJacEvals(void *ida_mem, long int *njevalsB) { IDAMem IDA_mem; IDABandMem idaband_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGB_SETGET_IDAMEM_NULL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(IDABAND_LMEM_NULL); } idaband_mem = (IDABandMem) lmem; *njevalsB = nje; return(IDABAND_SUCCESS); } int IDABandGetNumResEvals(void *ida_mem, long int *nrevalsB) { IDAMem IDA_mem; IDABandMem idaband_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGB_SETGET_IDAMEM_NULL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(IDABAND_LMEM_NULL); } idaband_mem = (IDABandMem) lmem; *nrevalsB = nreB; return(IDABAND_SUCCESS); } int IDABandGetLastFlag(void *ida_mem, int *flag) { IDAMem IDA_mem; IDABandMem idaband_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGB_SETGET_IDAMEM_NULL); return(IDABAND_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGB_SETGET_LMEM_NULL); return(IDABAND_LMEM_NULL); } idaband_mem = (IDABandMem) lmem; *flag = last_flag; return(IDABAND_SUCCESS); } /* * ----------------------------------------------------------------- * IDABAND interface functions * ----------------------------------------------------------------- */ /* This routine does remaining initializations specific to the IDABAND linear solver module. It returns 0. */ static int IDABandInit(IDAMem IDA_mem) { IDABandMem idaband_mem; idaband_mem = (IDABandMem) lmem; /* Initialize nje and nreB */ nje = 0; nreB = 0; if (jac == NULL) { jac = IDABandDQJac; jacdata = IDA_mem; } last_flag = 0; return(0); } /* This routine does the setup operations for the IDABAND linear solver module. It calls the Jacobian evaluation routine, updates counters, and calls the band LU factorization routine. The return value is either IDABAND_SUCCESS = 0 if successful, +1 if the jac routine failed recoverably or the LU factorization failed, or -1 if the jac routine failed unrecoverably. */ static int IDABandSetup(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp, N_Vector rrp, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { int retval; long int retfac; IDABandMem idaband_mem; idaband_mem = (IDABandMem) lmem; /* Increment nje counter. */ nje++; /* Zero out JJ; call Jacobian routine jac; return if it failed. */ BandZero(JJ); retval = jac(neq, mu, ml, tn, yyp, ypp, rrp, cj, jacdata, JJ, tmp1, tmp2, tmp3); last_flag = retval; if (retval < 0) return(-1); if (retval > 0) return(+1); /* Do LU factorization of JJ; return success or fail flag. */ retfac = BandFactor(JJ, pivots); if (retfac != 0) { last_flag = 1; return(+1); } last_flag = 0; return(0); } /* This routine handles the solve operation for the IDABAND linear solver module. It calls the band backsolve routine, scales the solution vector according to cjratio, then returns IDABAND_SUCCESS = 0. */ static int IDABandSolve(IDAMem IDA_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector ypcur, N_Vector rrcur) { IDABandMem idaband_mem; realtype *bd; idaband_mem = (IDABandMem) lmem; bd = N_VGetArrayPointer(b); BandBacksolve(JJ, pivots, bd); /* Scale the correction to account for change in cj. */ if (cjratio != ONE) N_VScale(TWO/(ONE + cjratio), b, b); last_flag = 0; return(0); } /* This routine frees memory specific to the IDABAND linear solver. */ static int IDABandFree(IDAMem IDA_mem) { IDABandMem idaband_mem; idaband_mem = (IDABandMem) lmem; BandFreeMat(JJ); BandFreePiv(pivots); free(lmem); return(0); } /* * ----------------------------------------------------------------- * IDABAND private routines * ----------------------------------------------------------------- */ /* This routine generates a banded difference quotient approximation JJ to the DAE system Jacobian J. It assumes that a band matrix of type BandMat is stored column-wise, and that elements within each column are contiguous. The address of the jth column of JJ is obtained via the macros BAND_COL and BAND_COL_ELEM. The columns of the Jacobian are constructed using mupper + mlower + 1 calls to the res routine, and appropriate differencing. The return value is either IDABAND_SUCCESS = 0, or the nonzero value returned by the res routine, if any. */ static int IDABandDQJac(long int Neq, long int mupper, long int mlower, realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *jac_data, BandMat Jac, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { realtype inc, inc_inv, yj, ypj, srur, conj, ewtj; realtype *y_data, *yp_data, *ewt_data, *cns_data = NULL; realtype *ytemp_data, *yptemp_data, *rtemp_data, *r_data, *col_j; int group; N_Vector rtemp, ytemp, yptemp; long int i, j, i1, i2, width, ngroups; int retval = IDABAND_SUCCESS; IDAMem IDA_mem; IDABandMem idaband_mem; /* jac_data points to IDA_mem */ IDA_mem = (IDAMem) jac_data; idaband_mem = (IDABandMem) lmem; rtemp = tmp1; /* Rename work vector for use as the perturbed residual. */ ytemp = tmp2; /* Rename work vector for use as a temporary for yy. */ yptemp= tmp3; /* Rename work vector for use as a temporary for yp. */ /* Obtain pointers to the data for all eight vectors used. */ ewt_data = N_VGetArrayPointer(ewt); r_data = N_VGetArrayPointer(rr); y_data = N_VGetArrayPointer(yy); yp_data = N_VGetArrayPointer(yp); rtemp_data = N_VGetArrayPointer(rtemp); ytemp_data = N_VGetArrayPointer(ytemp); yptemp_data = N_VGetArrayPointer(yptemp); if (constraints != NULL) cns_data = N_VGetArrayPointer(constraints); /* Initialize ytemp and yptemp. */ N_VScale(ONE, yy, ytemp); N_VScale(ONE, yp, yptemp); /* Compute miscellaneous values for the Jacobian computation. */ srur = RSqrt(uround); width = mlower + mupper + 1; ngroups = MIN(width, neq); /* Loop over column groups. */ for (group=1; group <= ngroups; group++) { /* Increment all yy[j] and yp[j] for j in this group. */ for (j=group-1; j #include "band.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Type : IDABandJacFn * ----------------------------------------------------------------- * A banded Jacobian approximation function bjac must have the * prototype given below. Its parameters are: * * Neq is the problem size, and length of all vector arguments. * * mupper is the upper bandwidth of the banded Jacobian matrix. * * mlower is the lower bandwidth of the banded Jacobian matrix. * * tt is the current value of the independent variable t. * * yy is the current value of the dependent variable vector, * namely the predicted value of y(t). * * yp is the current value of the derivative vector y', * namely the predicted value of y'(t). * * rr is the residual vector F(tt,yy,yp). * * c_j is the scalar in the system Jacobian, proportional to 1/hh. * * jac_data is a pointer to user Jacobian data - the same as the * jdata parameter passed to IDABand. * * Jac is the band matrix (of type BandMat) to be loaded by * an IDABandJacFn routine with an approximation to the * system Jacobian matrix * J = dF/dy + cj*dF/dy' * at the given point (t,y,y'), where the DAE system is * given by F(t,y,y') = 0. Jac is preset to zero, so only * the nonzero elements need to be loaded. See note below. * * tmp1, tmp2, tmp3 are pointers to memory allocated for * N_Vectors which can be used by an IDABandJacFn routine * as temporary storage or work space. * * NOTE: The following are two efficient ways to load Jac: * * (1) (with macros - no explicit data structure references) * for (j=0; j < Neq; j++) { * col_j = BAND_COL(Jac,j); * for (i=j-mupper; i <= j+mlower; i++) { * generate J_ij = the (i,j)th Jacobian element * BAND_COL_ELEM(col_j,i,j) = J_ij; * } * } * * (2) (with BAND_COL macro, but without BAND_COL_ELEM macro) * for (j=0; j < Neq; j++) { * col_j = BAND_COL(Jac,j); * for (k=-mupper; k <= mlower; k++) { * generate J_ij = the (i,j)th Jacobian element, i=j+k * col_j[k] = J_ij; * } * } * * NOTE: If the user's Jacobian routine needs other quantities, * they are accessible as follows: hcur (the current stepsize) * and ewt (the error weight vector) are accessible through * IDAGetCurrentStep and IDAGetErrWeights, respectively (see * ida.h). The unit roundoff is available as * UNIT_ROUNDOFF defined in sundialstypes.h * * A third way, using the BAND_ELEM(A,i,j) macro, is much less * efficient in general. It is only appropriate for use in small * problems in which efficiency of access is NOT a major concern. * * The IDABandJacFn should return * 0 if successful, * a positive int if a recoverable error occurred, or * a negative int if a nonrecoverable error occurred. * In the case of a recoverable error return, the integrator will * attempt to recover by reducing the stepsize (which changes cj). * ----------------------------------------------------------------- */ typedef int (*IDABandJacFn)(long int Neq, long int mupper, long int mlower, realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *jac_data, BandMat Jac, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* * ----------------------------------------------------------------- * Function : IDABand * ----------------------------------------------------------------- * A call to the IDABand function links the main integrator * with the IDABAND linear solver module. * * ida_mem is the pointer to the integrator memory returned by * IDACreate. * * mupper is the upper bandwidth of the banded Jacobian matrix. * * mlower is the lower bandwidth of the banded Jacobian matrix. * * The return values of IDABand are: * IDABAND_SUCCESS = 0 if successful * IDABAND_LMEM_FAIL = -1 if there was a memory allocation failure * IDABAND_ILL_INPUT = -2 if the input was illegal or NVECTOR bad. * * NOTE: The band linear solver assumes a serial implementation * of the NVECTOR package. Therefore, IDABand will first * test for a compatible N_Vector internal representation * by checking that the N_VGetArrayPointer function exists. * ----------------------------------------------------------------- */ int IDABand(void *ida_mem, long int Neq, long int mupper, long int mlower); /* * ----------------------------------------------------------------- * Optional inputs to the IDABAND linear solver * ----------------------------------------------------------------- * * IDABandSetJacFn specifies the dense Jacobian approximation * routine to be used. A user-supplied djac routine must * be of type IDABandJacFn. * By default, a difference quotient routine IDABandDQJac, * supplied with this solver is used. * IDABandSetJacData specifies a pointer to user data which is * passed to the bjac routine every time it is called. * * The return value of IDABandSet* is one of: * IDABAND_SUCCESS if successful * IDABAND_MEM_NULL if the ida memory was NULL * IDABAND_LMEM_NULL if the idaband memory was NULL * ----------------------------------------------------------------- */ int IDABandSetJacFn(void *ida_mem, IDABandJacFn bjac); int IDABandSetJacData(void *ida_mem, void *jac_data); /* * ----------------------------------------------------------------- * Optional outputs from the IDABAND linear solver * ----------------------------------------------------------------- * * IDABandGetWorkSpace returns the real and integer workspace used * by IDABAND. * IDABandGetNumJacEvals returns the number of calls made to the * Jacobian evaluation routine bjac. * IDABandGetNumResEvals returns the number of calls to the user * res routine due to finite difference Jacobian evaluation. * IDABandGetLastFlag returns the last error flag set by any of * the IDABAND interface functions. * * The return value of IDABandGet* is one of: * IDABAND_SUCCESS if successful * IDABAND_MEM_NULL if the ida memory was NULL * IDABAND_LMEM_NULL if the idaband memory was NULL * ----------------------------------------------------------------- */ int IDABandGetWorkSpace(void *ida_mem, long int *lenrwB, long int *leniwB); int IDABandGetNumJacEvals(void *ida_mem, long int *njevalsB); int IDABandGetNumResEvals(void *ida_mem, long int *nrevalsB); int IDABandGetLastFlag(void *ida_mem, int *flag); /* IDABAND return values */ #define IDABAND_SUCCESS 0 #define IDABAND_MEM_NULL -1 #define IDABAND_LMEM_NULL -2 #define IDABAND_ILL_INPUT -3 #define IDABAND_MEM_FAIL -4 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idaband_impl.h000077500000000000000000000065121323325274500206320ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh, and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/idas/LICENSE * ----------------------------------------------------------------- * This is the header file (private version) for the IDA/IDAS band * linear solver module, IDABAND. It interfaces between the band * module and the integrator when a banded linear solver is * appropriate. * ----------------------------------------------------------------- */ #ifndef _IDABAND_IMPL_H #define _IDABAND_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "idaband.h" #include "band.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types : IDABandMemRec, IDABandMem * ----------------------------------------------------------------- */ typedef struct { long int b_neq; /* Neq = problem size */ IDABandJacFn b_jac; /* jac = banded Jacobian routine to be called */ BandMat b_J; /* J = dF/dy + cj*dF/dy', banded approximation. */ long int b_mupper; /* mupper = upper bandwidth of Jacobian matrix. */ long int b_mlower; /* mlower = lower bandwidth of Jacobian matrix. */ long int b_storage_mu; /* storage_mu = upper bandwidth with storage for factoring = min(Neq-1, mupper+mlower). */ long int *b_pivots; /* pivots = pivot array for PJ = LU */ long int b_nje; /* nje = no. of calls to jac */ long int b_nreB; /* nreB = no. of calls to res due to difference quotient Jacobian evaluation */ void *b_jdata; /* jdata = data structure required by jac. */ int b_last_flag; /* last error return flag */ } IDABandMemRec, *IDABandMem; /* * ----------------------------------------------------------------- * Error Messages * ----------------------------------------------------------------- */ #define _IDABAND_ "IDABand-- " #define MSGB_IDAMEM_NULL _IDABAND_ "Integrator memory is NULL.\n\n" #define MSGB_BAD_SIZES1 _IDABAND_ "illegal bandwidth parameter(s) " #define MSGB_BAD_SIZES2 "Must have 0 <= mlower, mupper <= N-1.\n\n" #define MSGB_BAD_SIZES MSGB_BAD_SIZES1 MSGB_BAD_SIZES2 #define MSGB_MEM_FAIL _IDABAND_ "a memory request failed.\n\n" #define MSGB_BAD_NVECTOR _IDABAND_ "a required vector operation is not implemented.\n\n" #define MSGB_WRONG_NVEC _IDABAND_ "incompatible NVECTOR implementation.\n\n" #define MSGB_SETGET_IDAMEM_NULL "IDABandSet*/IDABandGet*-- integrator memory is NULL. \n\n" #define MSGB_SETGET_LMEM_NULL "IDABandSet*/IDABandGet*-- IDABAND memory is NULL. \n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idabbdpre.c000077500000000000000000000401501323325274500201320ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh, and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This file contains implementations of routines for a * band-block-diagonal preconditioner, i.e. a block-diagonal * matrix with banded blocks, for use with IDA and IDASpgmr. * NOTE: with only one processor in use, a banded matrix results * rather than a block-diagonal matrix with banded blocks. * Diagonal blocking occurs at the processor level. * ----------------------------------------------------------------- */ #include #include #include #include "ida_impl.h" #include "idabbdpre_impl.h" #include "idaspgmr_impl.h" #include "sundialsmath.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define TWO RCONST(2.0) /* Prototype for difference quotient Jacobian calculation routine */ static int IBBDDQJac(IBBDPrecData pdata, realtype tt, realtype cj, N_Vector yy, N_Vector yp, N_Vector gref, N_Vector ytemp, N_Vector yptemp, N_Vector gtemp); /* Readability Replacements */ #define errfp (IDA_mem->ida_errfp) #define uround (IDA_mem->ida_uround) #define vec_tmpl (IDA_mem->ida_tempv1) /* * ----------------------------------------------------------------- * User-Callable Functions: malloc, reinit, and free * ----------------------------------------------------------------- */ void *IDABBDPrecAlloc(void *ida_mem, long int Nlocal, long int mudq, long int mldq, long int mukeep, long int mlkeep, realtype dq_rel_yy, IDABBDLocalFn Gres, IDABBDCommFn Gcomm) { IDAMem IDA_mem; IBBDPrecData pdata; N_Vector tempv4; long int muk, mlk, storage_mu; if (ida_mem == NULL) { fprintf(stderr, MSGBBD_IDAMEM_NULL); return(NULL); } IDA_mem = (IDAMem) ida_mem; /* Test if the NVECTOR package is compatible with BLOCK BAND preconditioner */ if(vec_tmpl->ops->nvgetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGBBD_BAD_NVECTOR); return(NULL); } /* Allocate data memory. */ pdata = (IBBDPrecData) malloc(sizeof *pdata); if (pdata == NULL) return(NULL); /* Set pointers to glocal and gcomm; load half-bandwidths. */ pdata->IDA_mem = IDA_mem; pdata->glocal = Gres; pdata->gcomm = Gcomm; pdata->mudq = MIN( Nlocal-1, MAX(0,mudq) ); pdata->mldq = MIN( Nlocal-1, MAX(0,mldq) ); muk = MIN( Nlocal-1, MAX(0,mukeep) ); mlk = MIN( Nlocal-1, MAX(0,mlkeep) ); pdata->mukeep = muk; pdata->mlkeep = mlk; /* Set extended upper half-bandwidth for PP (required for pivoting). */ storage_mu = MIN(Nlocal-1, muk + mlk); /* Allocate memory for preconditioner matrix. */ pdata->PP = BandAllocMat(Nlocal, muk, mlk, storage_mu); if (pdata->PP == NULL) { free(pdata); return(NULL); } /* Allocate memory for pivots. */ pdata->pivots = BandAllocPiv(Nlocal); if (pdata->PP == NULL) { BandFreeMat(pdata->PP); free(pdata); return(NULL); } /* Allocate tempv4 for use by IBBDDQJac */ tempv4 = N_VClone(vec_tmpl); if (tempv4 == NULL){ BandFreeMat(pdata->PP); BandFreePiv(pdata->pivots); free(pdata); return(NULL); } pdata->tempv4 = tempv4; /* Set rel_yy based on input value dq_rel_yy (0 implies default). */ pdata->rel_yy = (dq_rel_yy > ZERO) ? dq_rel_yy : RSqrt(uround); /* Store Nlocal to be used in IDABBDPrecSetup */ pdata->n_local = Nlocal; /* Set work space sizes and initialize nge. */ pdata->rpwsize = Nlocal*(mlk + storage_mu + 1); pdata->ipwsize = Nlocal; pdata->nge = 0; return((void *)pdata); } int IDABBDSpgmr(void *ida_mem, int maxl, void *bbd_data) { int flag; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBD_NO_PDATA); return(IDA_PDATA_NULL); } flag = IDASpgmr(ida_mem, maxl); if(flag != IDASPGMR_SUCCESS) return(flag); flag = IDASpgmrSetPrecData(ida_mem, bbd_data); if(flag != IDASPGMR_SUCCESS) return(flag); flag = IDASpgmrSetPrecSetupFn(ida_mem, IDABBDPrecSetup); if(flag != IDASPGMR_SUCCESS) return(flag); flag = IDASpgmrSetPrecSolveFn(ida_mem, IDABBDPrecSolve); if(flag != IDASPGMR_SUCCESS) return(flag); return(IDASPGMR_SUCCESS); } int IDABBDPrecReInit(void *bbd_data, long int mudq, long int mldq, realtype dq_rel_yy, IDABBDLocalFn Gres, IDABBDCommFn Gcomm) { IBBDPrecData pdata; IDAMem IDA_mem; long int Nlocal; pdata =(IBBDPrecData) bbd_data; IDA_mem = pdata->IDA_mem; Nlocal = pdata->n_local; /* Set pointers to res_data, glocal, and gcomm; load half-bandwidths. */ pdata->mudq = MIN( Nlocal-1, MAX(0,mudq) ); pdata->mldq = MIN( Nlocal-1, MAX(0,mldq) ); pdata->glocal = Gres; pdata->gcomm = Gcomm; /* Set rel_yy based on input value dq_rel_yy (0 implies default). */ pdata->rel_yy = (dq_rel_yy > ZERO) ? dq_rel_yy : RSqrt(uround); /* Re-initialize nge */ pdata->nge = 0; return(0); } void IDABBDPrecFree(void *bbd_data) { IBBDPrecData pdata; if ( bbd_data != NULL ) { pdata = (IBBDPrecData) bbd_data; BandFreeMat(pdata->PP); BandFreePiv(pdata->pivots); N_VDestroy(pdata->tempv4); free(pdata); } } int IDABBDPrecGetWorkSpace(void *bbd_data, long int *lenrwBBDP, long int *leniwBBDP) { IBBDPrecData pdata; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBD_PDATA_NULL); return(IDA_PDATA_NULL); } pdata = (IBBDPrecData) bbd_data; *lenrwBBDP = pdata->rpwsize; *leniwBBDP = pdata->ipwsize; return(IDA_SUCCESS); } int IDABBDPrecGetNumGfnEvals(void *bbd_data, long int *ngevalsBBDP) { IBBDPrecData pdata; if ( bbd_data == NULL ) { fprintf(stderr, MSGBBD_PDATA_NULL); return(IDA_PDATA_NULL); } pdata = (IBBDPrecData) bbd_data; *ngevalsBBDP = pdata->nge; return(IDA_SUCCESS); } /* Readability Replacements */ #define Nlocal (pdata->n_local) #define mudq (pdata->mudq) #define mldq (pdata->mldq) #define mukeep (pdata->mukeep) #define mlkeep (pdata->mlkeep) #define glocal (pdata->glocal) #define gcomm (pdata->gcomm) #define pivots (pdata->pivots) #define PP (pdata->PP) #define nge (pdata->nge) #define rel_yy (pdata->rel_yy) /* * ----------------------------------------------------------------- * Function : IDABBDPrecSetup *---------------------------------------------------------------- * IDABBDPrecSetup generates a band-block-diagonal preconditioner * matrix, where the local block (on this processor) is a band * matrix. Each local block is computed by a difference quotient * scheme via calls to the user-supplied routines glocal, gcomm. * After generating the block in the band matrix PP, this routine * does an LU factorization in place in PP. * * The IDABBDPrecSetup parameters used here are as follows: * * tt is the current value of the independent variable t. * * yy is the current value of the dependent variable vector, * namely the predicted value of y(t). * * yp is the current value of the derivative vector y', * namely the predicted value of y'(t). * * c_j is the scalar in the system Jacobian, proportional to 1/hh. * * prec_data is a pointer to user preconditioner data - the same as * the p_data parameter passed to IDASpgmr. * * tmp1, tmp2, tmp3 are pointers to vectors of type * N_Vector, used for temporary storage or work space. * * The arguments Neq, rr, res, uround, and nrePtr are not used. * * Return value: * The value returned by this IDABBDPrecSetup function is a int * flag indicating whether it was successful. This value is * 0 if successful, * > 0 for a recoverable error (step will be retried). * < 0 for a nonrecoverable error (step fails). * * ----------------------------------------------------------------- */ int IDABBDPrecSetup(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *prec_data, N_Vector tempv1, N_Vector tempv2, N_Vector tempv3) { long int retfac; int retval; IBBDPrecData pdata; pdata =(IBBDPrecData) prec_data; /* Call IBBDDQJac for a new Jacobian calculation and store in PP. */ BandZero(PP); retval = IBBDDQJac(pdata, tt, c_j, yy, yp, tempv1, tempv2, tempv3, pdata->tempv4); if (retval < 0) return(-1); if (retval > 0) return(+1); /* Do LU factorization of preconditioner block in place (in PP). */ retfac = BandFactor(PP, pivots); /* Return 0 if the LU was complete, or +1 otherwise. */ if (retfac > 0) return(+1); return(0); } /* * ----------------------------------------------------------------- * Function: IDABBDPrecSolve *---------------------------------------------------------------- * The function IDABBDPrecSolve computes a solution to the linear * system P z = r, where P is the left preconditioner defined by * the routine IDABBDPrecSetup. * * The IDABBDPrecSolve parameters used here are as follows: * * rvec is the input right-hand side vector r. * * zvec is the computed solution vector z. * * prec_data is a pointer to user preconditioner data - the same as * the p_data parameter passed to IDASpgmr. * * The arguments tt, yy, yp, rr, c_j, delta, and tmp are NOT used. * * IDABBDPrecSolve always returns 0, indicating success. * * ----------------------------------------------------------------- */ int IDABBDPrecSolve(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector rvec, N_Vector zvec, realtype c_j, realtype delta, void *prec_data, N_Vector tmp) { IBBDPrecData pdata; realtype *zd; pdata = (IBBDPrecData) prec_data; /* Copy rvec to zvec, do the backsolve, and return. */ N_VScale(ONE, rvec, zvec); zd = N_VGetArrayPointer(zvec); BandBacksolve(PP, pivots, zd); return(0); } /* * ----------------------------------------------------------------- * IBBDDQJac * ----------------------------------------------------------------- * This routine generates a banded difference quotient approximation to * the local block of the Jacobian of G(t,y,y'). It assumes that a * band matrix of type BandMat is stored column-wise, and that elements * within each column are contiguous. * * All matrix elements are generated as difference quotients, by way * of calls to the user routine glocal. * By virtue of the band structure, the number of these calls is * bandwidth + 1, where bandwidth = mldq + mudq + 1. * But the band matrix kept has bandwidth = mlkeep + mukeep + 1. * This routine also assumes that the local elements of a vector are * stored contiguously. * * Return values are: 0 (success), > 0 (recoverable error), * or < 0 (nonrecoverable error). * ----------------------------------------------------------------- */ #define ewt (IDA_mem->ida_ewt) #define res_data (IDA_mem->ida_rdata) #define hh (IDA_mem->ida_hh) #define constraints (IDA_mem->ida_constraints) static int IBBDDQJac(IBBDPrecData pdata, realtype tt, realtype cj, N_Vector yy, N_Vector yp, N_Vector gref, N_Vector ytemp, N_Vector yptemp, N_Vector gtemp) { IDAMem IDA_mem; realtype inc, inc_inv; int retval; long int group, i, j, width, ngroups, i1, i2; realtype *ydata, *ypdata, *ytempdata, *yptempdata, *grefdata, *gtempdata; realtype *cnsdata = NULL, *ewtdata; realtype *col_j, conj, yj, ypj, ewtj; IDA_mem = pdata->IDA_mem; /* Initialize ytemp and yptemp. */ N_VScale(ONE, yy, ytemp); N_VScale(ONE, yp, yptemp); /* Obtain pointers as required to the data array of vectors. */ ydata = N_VGetArrayPointer(yy); ypdata = N_VGetArrayPointer(yp); gtempdata = N_VGetArrayPointer(gtemp); ewtdata = N_VGetArrayPointer(ewt); if (constraints != NULL) cnsdata = N_VGetArrayPointer(constraints); ytempdata = N_VGetArrayPointer(ytemp); yptempdata= N_VGetArrayPointer(yptemp); grefdata = N_VGetArrayPointer(gref); /* Call gcomm and glocal to get base value of G(t,y,y'). */ if (gcomm != NULL) { retval = gcomm(Nlocal, tt, yy, yp, res_data); if (retval != 0) return(retval); } retval = glocal(Nlocal, tt, yy, yp, gref, res_data); nge++; if (retval != 0) return(retval); /* Set bandwidth and number of column groups for band differencing. */ width = mldq + mudq + 1; ngroups = MIN(width, Nlocal); /* Loop over groups. */ for(group = 1; group <= ngroups; group++) { /* Loop over the components in this group. */ for(j = group-1; j < Nlocal; j += width) { yj = ydata[j]; ypj = ypdata[j]; ewtj = ewtdata[j]; /* Set increment inc to yj based on rel_yy*abs(yj), with adjustments using ypj and ewtj if this is small, and a further adjustment to give it the same sign as hh*ypj. */ inc = rel_yy*MAX(ABS(yj), MAX( ABS(hh*ypj), ONE/ewtj)); if (hh*ypj < ZERO) inc = -inc; inc = (yj + inc) - yj; /* Adjust sign(inc) again if yj has an inequality constraint. */ if (constraints != NULL) { conj = cnsdata[j]; if (ABS(conj) == ONE) {if ((yj+inc)*conj < ZERO) inc = -inc;} else if (ABS(conj) == TWO) {if ((yj+inc)*conj <= ZERO) inc = -inc;} } /* Increment yj and ypj. */ ytempdata[j] += inc; yptempdata[j] += cj*inc; } /* Evaluate G with incremented y and yp arguments. */ retval = glocal(Nlocal, tt, ytemp, yptemp, gtemp, res_data); nge++; if (retval != 0) return(retval); /* Loop over components of the group again; restore ytemp and yptemp. */ for(j = group-1; j < Nlocal; j += width) { yj = ytempdata[j] = ydata[j]; ypj = yptempdata[j] = ypdata[j]; ewtj = ewtdata[j]; /* Set increment inc as before .*/ inc = rel_yy*MAX(ABS(yj), MAX( ABS(hh*ypj), ONE/ewtj)); if (hh*ypj < ZERO) inc = -inc; inc = (yj + inc) - yj; if (constraints != NULL) { conj = cnsdata[j]; if (ABS(conj) == ONE) {if ((yj+inc)*conj < ZERO) inc = -inc;} else if (ABS(conj) == TWO) {if ((yj+inc)*conj <= ZERO) inc = -inc;} } /* Form difference quotients and load into PP. */ inc_inv = ONE/inc; col_j = BAND_COL(PP,j); i1 = MAX(0, j-mukeep); i2 = MIN(j+mlkeep, Nlocal-1); for(i = i1; i <= i2; i++) BAND_COL_ELEM(col_j,i,j) = inc_inv * (gtempdata[i] - grefdata[i]); } } return(0); } neuron-7.5/src/sundials/ida/idabbdpre.h000077500000000000000000000417241323325274500201470ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the header file for the IDABBDPRE module, for a * band-block-diagonal preconditioner, i.e. a block-diagonal * matrix with banded blocks, for use with IDA/IDAS and IDASpgmr. * * Summary: * * These routines provide a preconditioner matrix that is * block-diagonal with banded blocks. The blocking corresponds * to the distribution of the dependent variable vector y among * the processors. Each preconditioner block is generated from * the Jacobian of the local part (on the current processor) of a * given function G(t,y,y') approximating F(t,y,y'). The blocks * are generated by a difference quotient scheme on each processor * independently. This scheme utilizes an assumed banded * structure with given half-bandwidths, mudq and mldq. * However, the banded Jacobian block kept by the scheme has * half-bandwiths mukeep and mlkeep, which may be smaller. * * The user's calling program should have the following form: * * #include "idabbdpre.h" * #include "nvector_parallel.h" * ... * void *p_data; * ... * y0 = N_VNew_Parallel(...); * yp0 = N_VNew_Parallel(...); * ... * ida_mem = IDACreate(...); * ier = IDAMalloc(...); * ... * p_data = IDABBDPrecAlloc(ida_mem, Nlocal, mudq, mldq, * mukeep, mlkeep, dq_rel_yy, Gres, Gcomm); * flag = IDABBDSpgmr(ida_mem, maxl, p_data); * ... * ier = IDASolve(...); * ... * IDABBDFree(p_data); * ... * IDAFree(...); * * N_VDestroy(y0); * N_VDestroy(yp0); * * The user-supplied routines required are: * * res is the function F(t,y,y') defining the DAE system to * be solved: F(t,y,y') = 0. * * Gres is the function defining a local approximation * G(t,y,y') to F, for the purposes of the preconditioner. * * Gcomm is the function performing communication needed * for Glocal. * * * Notes: * * 1) This header file is included by the user for the definition * of the IBBDPrecData type and for needed function prototypes. * * 2) The IDABBDPrecAlloc call includes half-bandwidths mudq and * mldq to be used in the approximate Jacobian. They need * not be the true half-bandwidths of the Jacobian of the * local block of G, when smaller values may provide a greater * efficiency. Similarly, mukeep and mlkeep, specifying the * bandwidth kept for the approximate Jacobian, need not be * the true half-bandwidths. Also, mukeep, mlkeep, mudq, and * mldq need not be the same on every processor. * * 3) The actual name of the user's res function is passed to * IDAMalloc, and the names of the user's Gres and Gcomm * functions are passed to IDABBDPrecAlloc. * * 4) The pointer to the user-defined data block res_data, which * is set through IDASetRdata is also available to the user * in glocal and gcomm. * * 5) Optional outputs specific to this module are available by * way of routines listed below. These include work space sizes * and the cumulative number of glocal calls. The costs * associated with this module also include nsetups banded LU * factorizations, nsetups gcomm calls, and nps banded * backsolve calls, where nsetups and nps are integrator * optional outputs. * ----------------------------------------------------------------- */ #ifndef _IBBDPRE_H #define _IBBDPRE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" #include "nvector.h" #include "band.h" /* * ----------------------------------------------------------------- * Type : IDABBDLocalFn *----------------------------------------------------------------* * The user must supply a function G(t,y,y') which approximates * the function F for the system F(t,y,y') = 0, and which is * computed locally (without inter-processor communication). * (The case where G is mathematically identical to F is allowed.) * The implementation of this function must have type IDABBDLocalFn. * * This function takes as input the independent variable value tt, * the current solution vector yy, the current solution * derivative vector yp, and a pointer to the user-defined data * block res_data. It is to compute the local part of G(t,y,y') * and store it in the vector gval. (Providing memory for yy and * gval is handled within this preconditioner module.) It is * expected that this routine will save communicated data in work * space defined by the user, and made available to the * preconditioner function for the problem. The res_data * parameter is the same as that passed by the user to the * IDAMalloc routine. * * An IDABBDLocalFn Gres is to return an int, defined in the same * way as for the residual function: 0 (success), +1 or -1 (fail). * ----------------------------------------------------------------- */ typedef int (*IDABBDLocalFn)(long int Nlocal, realtype tt, N_Vector yy, N_Vector yp, N_Vector gval, void *res_data); /* * ----------------------------------------------------------------- * Type : IDABBDCommFn *---------------------------------------------------------------- * The user may supply a function of type IDABBDCommFn which * performs all inter-processor communication necessary to * evaluate the approximate system function described above. * * This function takes as input the solution vectors yy and yp, * and a pointer to the user-defined data block res_data. The * res_data parameter is the same as that passed by the user to * the IDAMalloc routine. * * The IDABBDCommFn Gcomm is expected to save communicated data in * space defined with the structure *res_data. * * A IDABBDCommFn Gcomm returns an int value equal to 0 (success), * > 0 (recoverable error), or < 0 (unrecoverable error). * * Each call to the IDABBDCommFn is preceded by a call to the system * function res with the same vectors yy and yp. Thus the * IDABBDCommFn gcomm can omit any communications done by res if * relevant to the evaluation of the local function glocal. * A NULL communication function can be passed to IDABBDPrecAlloc * if all necessary communication was done by res. * ----------------------------------------------------------------- */ typedef int (*IDABBDCommFn)(long int Nlocal, realtype tt, N_Vector yy, N_Vector yp, void *res_data); /* * ----------------------------------------------------------------- * Function : IDABBDPrecAlloc *---------------------------------------------------------------- * IDABBDPrecAlloc allocates and initializes an IBBDPrecData * structure to be passed to IDASpgmr (and used by * IDABBDPrecSetup and IDABBDPrecSol). * * The parameters of IDABBDPrecAlloc are as follows: * * ida_mem is a pointer to the memory blockreturned by IDACreate. * * Nlocal is the length of the local block of the vectors yy etc. * on the current processor. * * mudq, mldq are the upper and lower half-bandwidths to be used * in the computation of the local Jacobian blocks. * * mukeep, mlkeep are the upper and lower half-bandwidths to be * used in saving the Jacobian elements in the local * block of the preconditioner matrix PP. * * dq_rel_yy is an optional input. It is the relative increment * to be used in the difference quotient routine for * Jacobian calculation in the preconditioner. The * default is sqrt(unit roundoff), and specified by * passing dq_rel_yy = 0. * * Gres is the name of the user-supplied function G(t,y,y') * that approximates F and whose local Jacobian blocks * are to form the preconditioner. * * Gcomm is the name of the user-defined function that performs * necessary inter-processor communication for the * execution of glocal. * * IDABBDPrecAlloc returns the storage allocated (type *void), * or NULL if the request for storage cannot be satisfied. * ----------------------------------------------------------------- */ void *IDABBDPrecAlloc(void *ida_mem, long int Nlocal, long int mudq, long int mldq, long int mukeep, long int mlkeep, realtype dq_rel_yy, IDABBDLocalFn Gres, IDABBDCommFn Gcomm); /* * ----------------------------------------------------------------- * Function : IDABBDSpgmr *---------------------------------------------------------------- * IDABBDSpgmr links the IDABBDPRE preconditioner to the IDASPGMR * linear solver. It performs the following actions: * 1) Calls the IDASPGMR specification routine and attaches the * IDASPGMR linear solver to the IDA solver; * 2) Sets the preconditioner data structure for IDASPGMR * 3) Sets the preconditioner setup routine for IDASPGMR * 4) Sets the preconditioner solve routine for IDASPGMR * * Its first 2 arguments are the same as for IDASpgmr (see * idaspgmr.h). The last argument is the pointer to the IDABBDPRE * memory block returned by IDABBDPrecAlloc. * * Note that the user need not call IDASpgmr anymore. * * Possible return values are: * IDASPGMR_SUCCESS if successful * IDASPGMR_MEM_NULL if the ida memory was NULL * IDASPGMR_MEM_FAIL if there was a memory allocation failure * IDASPGMR_ILL_INPUT if there was illegal input. * IDA_PDATA_NULL if p_data was NULL. * ----------------------------------------------------------------- */ int IDABBDSpgmr(void *ida_mem, int maxl, void *bbd_data); /* * ----------------------------------------------------------------- * Function : IDABBDPrecReInit *---------------------------------------------------------------- * IDABBDPrecReInit re-initializes the IDABBDPRE module when * solving a sequence of problems of the same size with * IDASPGMR/IDABBDPRE provided there is no change in Nlocal, * mukeep, or mlkeep. After solving one problem, and after * calling IDAReInit to re-initialize the integrator for a * subsequent problem, call IDABBDPrecReInit. * Then call IDAReInitSpgmr or IDASpgmr, if necessary, to * re-initialize the Spgmr linear solver, depending on changes * made in its input parameters, before calling IDASolve. * * The first argument to IDABBDPrecReInit must be the pointer * bbd_data that was returned by IDABBDPrecAlloc. All other * arguments have the same names and meanings as those of * IDABBDPrecAlloc. * * The return value of IDABBDPrecReInit is 0, indicating success. * ----------------------------------------------------------------- */ int IDABBDPrecReInit(void *bbd_data, long int mudq, long int mldq, realtype dq_rel_yy, IDABBDLocalFn Gres, IDABBDCommFn Gcomm); /* * ----------------------------------------------------------------- * Function : IDABBDPrecFree *---------------------------------------------------------------- * IDABBDPrecFree frees the memory block bbd_data allocated by the * call to IDABBDPrecAlloc. * ----------------------------------------------------------------- */ void IDABBDPrecFree(void *bbd_data); /* * ----------------------------------------------------------------- * Optional outputs for IDABBDPRE *---------------------------------------------------------------- * * IDABBDPrecGetWorkSpace returns the real and integer workspace for * IBBDPRE. * IDABBDPrecGetNumGfnEvals returns the number of calls to the * uer Gres function. * * ----------------------------------------------------------------- */ int IDABBDPrecGetWorkSpace(void *bbd_data, long int *lenrwBBDP, long int *leniwBBDP); int IDABBDPrecGetNumGfnEvals(void *bbd_data, long int *ngevalsBBDP); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idabbdpre_impl.h000077500000000000000000000060361323325274500211650ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the header file (private version) for the IDABBDPRE * module, for a band-block-diagonal preconditioner, i.e. a * block-diagonal matrix with banded blocks, for use with IDA/IDAS * and IDASpgmr. * ----------------------------------------------------------------- */ #ifndef _IBBDPRE_IMPL_H #define _IBBDPRE_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "idabbdpre.h" #include "band.h" #include "iterative.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Prototypes of IDABBDPrecSetup and IDABBDPrecSolve * ----------------------------------------------------------------- */ int IDABBDPrecSetup(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *prec_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); int IDABBDPrecSolve(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector rvec, N_Vector zvec, realtype c_j, realtype delta, void *prec_data, N_Vector tmp); /* * ----------------------------------------------------------------- * Definition of IBBDPrecData * ----------------------------------------------------------------- */ typedef struct { /* passed by user to IDABBDPrecAlloc, used by IDABBDPrecSetup/IDABBDPrecSolve functions: */ long int mudq, mldq, mukeep, mlkeep; realtype rel_yy; IDABBDLocalFn glocal; IDABBDCommFn gcomm; /* allocated for use by IDABBDPrecSetup */ N_Vector tempv4; /* set by IDABBDPrecon and used by IDABBDPrecSolve: */ BandMat PP; long int *pivots; /* set by IDABBDPrecAlloc and used by IDABBDPrecSetup */ long int n_local; /* available for optional output: */ long int rpwsize; long int ipwsize; long int nge; /* Pointer to ida_mem */ IDAMem IDA_mem; } *IBBDPrecData; /* * ----------------------------------------------------------------- * Error Messages * ----------------------------------------------------------------- */ #define MSGBBD_IDAMEM_NULL "IBBDPrecAlloc-- integrator memory is NULL.\n\n" #define MSGBBD_BAD_NVECTOR "IBBDPrecAlloc-- a required vector operation is not implemented.\n\n" #define MSGBBD_WRONG_NVEC "IBBDPrecAlloc-- incompatible NVECTOR implementation.\n\n" #define MSGBBD_PDATA_NULL "IBBDPrecGet*-- BBDPrecData is NULL. \n\n" #define MSGBBD_NO_PDATA "IBBDSpgmr-- BBDPrecData is NULL. \n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idadense.c000077500000000000000000000355761323325274500200120ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/ida/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the IDA dense linear * solver module, IDADENSE. * ----------------------------------------------------------------- */ #include #include #include #include "ida_impl.h" #include "idadense_impl.h" #include "sundialsmath.h" /* Constants */ #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define TWO RCONST(2.0) /* IDADENSE linit, lsetup, lsolve, and lfree routines */ static int IDADenseInit(IDAMem IDA_mem); static int IDADenseSetup(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp, N_Vector rrp, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); static int IDADenseSolve(IDAMem IDA_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector ypcur, N_Vector rrcur); static int IDADenseFree(IDAMem IDA_mem); static int IDADenseDQJac(long int Neq, realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *jac_data, DenseMat Jac, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* Readability Replacements */ #define res (IDA_mem->ida_res) #define rdata (IDA_mem->ida_rdata) #define uround (IDA_mem->ida_uround) #define tn (IDA_mem->ida_tn) #define hh (IDA_mem->ida_hh) #define cj (IDA_mem->ida_cj) #define cjratio (IDA_mem->ida_cjratio) #define ewt (IDA_mem->ida_ewt) #define constraints (IDA_mem->ida_constraints) #define nre (IDA_mem->ida_nre) #define errfp (IDA_mem->ida_errfp) #define iopt (IDA_mem->ida_iopt) #define linit (IDA_mem->ida_linit) #define lsetup (IDA_mem->ida_lsetup) #define lsolve (IDA_mem->ida_lsolve) #define lperf (IDA_mem->ida_lperf) #define lfree (IDA_mem->ida_lfree) #define lmem (IDA_mem->ida_lmem) #define setupNonNull (IDA_mem->ida_setupNonNull) #define vec_tmpl (IDA_mem->ida_tempv1) #define neq (idadense_mem->d_neq) #define jac (idadense_mem->d_jac) #define JJ (idadense_mem->d_J) #define pivots (idadense_mem->d_pivots) #define nje (idadense_mem->d_nje) #define nreD (idadense_mem->d_nreD) #define jacdata (idadense_mem->d_jdata) #define last_flag (idadense_mem->d_last_flag) /* * ----------------------------------------------------------------- * IDADense * ----------------------------------------------------------------- * This routine initializes the memory record and sets various function * fields specific to the IDADENSE linear solver module. * IDADense first calls the existing lfree routine if this is not NULL. * Then it sets the ida_linit, ida_lsetup, ida_lsolve, ida_lperf, and * ida_lfree fields in (*IDA_mem) to be IDADenseInit, IDADenseSetup, * IDADenseSolve, NULL, and IDADenseFree, respectively. * It allocates memory for a structure of type IDADenseMemRec and sets * the ida_lmem field in (*IDA_mem) to the address of this structure. * It sets setupNonNull in (*IDA_mem) to TRUE, sets the d_jdata field * in the IDADenseMemRec structure to be the input parameter jdata, * and sets the d_jac field to be: * (1) the input parameter djac, if djac != NULL, or * (2) IDADenseDQJac, if djac == NULL. * Finally, it allocates memory for JJ and pivots. * The return value is IDADENSE_SUCCESS = 0, IDADENSE_LMEM_FAIL = -1, * or IDADENSE_ILL_INPUT = -2. * * NOTE: The dense linear solver assumes a serial implementation * of the NVECTOR package. Therefore, IDADense will first * test for a compatible N_Vector internal * representation by checking that the functions N_VGetArrayPointer * and N_VSetArrayPointer exist. * ----------------------------------------------------------------- */ int IDADense(void *ida_mem, long int Neq) { IDAMem IDA_mem; IDADenseMem idadense_mem; int flag; /* Return immediately if ida_mem is NULL. */ if (ida_mem == NULL) { fprintf(stderr, MSGD_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Test if the NVECTOR package is compatible with the DENSE solver */ if(vec_tmpl->ops->nvgetarraypointer == NULL || vec_tmpl->ops->nvsetarraypointer == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_BAD_NVECTOR); return(IDADENSE_ILL_INPUT); } if (lfree != NULL) flag = lfree(IDA_mem); /* Set five main function fields in IDA_mem. */ linit = IDADenseInit; lsetup = IDADenseSetup; lsolve = IDADenseSolve; lperf = NULL; lfree = IDADenseFree; /* Get memory for IDADenseMemRec. */ idadense_mem = (IDADenseMem) malloc(sizeof(IDADenseMemRec)); if (idadense_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_MEM_FAIL); return(IDADENSE_MEM_FAIL); } /* Set default Jacobian routine and Jacobian data */ jac = IDADenseDQJac; jacdata = IDA_mem; last_flag = IDADENSE_SUCCESS; setupNonNull = TRUE; /* Store problem size */ neq = Neq; /* Allocate memory for JJ and pivot array. */ JJ = DenseAllocMat(Neq); if (JJ == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_MEM_FAIL); return(IDADENSE_MEM_FAIL); } pivots = DenseAllocPiv(Neq); if (pivots == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_MEM_FAIL); DenseFreeMat(JJ); return(IDADENSE_MEM_FAIL); } /* Attach linear solver memory to the integrator memory */ lmem = idadense_mem; return(IDADENSE_SUCCESS); } /* * ----------------------------------------------------------------- * IDADenseSet* and IDADenseGet* * ----------------------------------------------------------------- */ int IDADenseSetJacFn(void *ida_mem, IDADenseJacFn djac) { IDAMem IDA_mem; IDADenseMem idadense_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGD_SETGET_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_SETGET_LMEM_NULL); return(IDADENSE_LMEM_NULL); } idadense_mem = (IDADenseMem) lmem; jac = djac; return(IDADENSE_SUCCESS); } int IDADenseSetJacData(void *ida_mem, void *jac_data) { IDAMem IDA_mem; IDADenseMem idadense_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGD_SETGET_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_SETGET_LMEM_NULL); return(IDADENSE_LMEM_NULL); } idadense_mem = (IDADenseMem) lmem; jacdata = jac_data; return(IDADENSE_SUCCESS); } int IDADenseGetWorkSpace(void *ida_mem, long int *lenrwD, long int *leniwD) { IDAMem IDA_mem; IDADenseMem idadense_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGD_SETGET_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_SETGET_LMEM_NULL); return(IDADENSE_LMEM_NULL); } idadense_mem = (IDADenseMem) lmem; *lenrwD = neq*neq; *leniwD = neq; return(IDADENSE_SUCCESS); } int IDADenseGetNumJacEvals(void *ida_mem, long int *njevalsD) { IDAMem IDA_mem; IDADenseMem idadense_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGD_SETGET_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_SETGET_LMEM_NULL); return(IDADENSE_LMEM_NULL); } idadense_mem = (IDADenseMem) lmem; *njevalsD = nje; return(IDADENSE_SUCCESS); } int IDADenseGetNumResEvals(void *ida_mem, long int *nrevalsD) { IDAMem IDA_mem; IDADenseMem idadense_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGD_SETGET_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_SETGET_LMEM_NULL); return(IDADENSE_LMEM_NULL); } idadense_mem = (IDADenseMem) lmem; *nrevalsD = nreD; return(IDADENSE_SUCCESS); } int IDADenseGetLastFlag(void *ida_mem, int *flag) { IDAMem IDA_mem; IDADenseMem idadense_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGD_SETGET_IDAMEM_NULL); return(IDADENSE_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGD_SETGET_LMEM_NULL); return(IDADENSE_LMEM_NULL); } idadense_mem = (IDADenseMem) lmem; *flag = last_flag; return(IDADENSE_SUCCESS); } /* * ----------------------------------------------------------------- * IDADENSE interface functions * ----------------------------------------------------------------- */ /* This routine does remaining initializations specific to the IDADENSE linear solver module. It returns 0. */ static int IDADenseInit(IDAMem IDA_mem) { IDADenseMem idadense_mem; idadense_mem = (IDADenseMem) lmem; nje = 0; nreD = 0; if (jac == NULL) { jac = IDADenseDQJac; jacdata = IDA_mem; } last_flag = 0; return(0); } /* This routine does the setup operations for the IDADENSE linear solver module. It calls the Jacobian evaluation routine, updates counters, and calls the dense LU factorization routine. The return value is either IDADENSE_SUCCESS = 0 if successful, +1 if the jac routine failed recoverably or the LU factorization failed, or -1 if the jac routine failed unrecoverably. */ static int IDADenseSetup(IDAMem IDA_mem, N_Vector yyp, N_Vector ypp, N_Vector rrp, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { int retval; long int retfac; IDADenseMem idadense_mem; idadense_mem = (IDADenseMem) lmem; /* Increment nje counter. */ nje++; /* Zero out JJ; call Jacobian routine jac; return if it failed. */ DenseZero(JJ); retval = jac(neq, tn, yyp, ypp, rrp, cj, jacdata, JJ, tmp1, tmp2, tmp3); last_flag = retval; if (retval < 0) return(-1); if (retval > 0) return(+1); /* Do LU factorization of JJ; return success or fail flag. */ retfac = DenseFactor(JJ, pivots); if (retfac != 0) { last_flag = 1; return(+1); } last_flag = 0; return(0); } /* This routine handles the solve operation for the IDADENSE linear solver module. It calls the dense backsolve routine, scales the solution vector according to cjratio, then returns IDADENSE_SUCCESS = 0. */ static int IDADenseSolve(IDAMem IDA_mem, N_Vector b, N_Vector weight, N_Vector ycur, N_Vector ypcur, N_Vector rrcur) { IDADenseMem idadense_mem; realtype *bd; idadense_mem = (IDADenseMem) lmem; bd = N_VGetArrayPointer(b); DenseBacksolve(JJ, pivots, bd); /* Scale the correction to account for change in cj. */ if (cjratio != ONE) N_VScale(TWO/(ONE + cjratio), b, b); last_flag = 0; return(0); } /* This routine frees memory specific to the IDADENSE linear solver. */ static int IDADenseFree(IDAMem IDA_mem) { IDADenseMem idadense_mem; idadense_mem = (IDADenseMem) lmem; DenseFreeMat(JJ); DenseFreePiv(pivots); free(lmem); return(0); } /* * ----------------------------------------------------------------- * IDADENSE private routines * ----------------------------------------------------------------- */ /* This routine generates a dense difference quotient approximation Jac to the DAE system Jacobian J. It assumes that a dense matrix of type DenseMat is stored column-wise, and that elements within each column are contiguous. The address of the jth column of Jac is obtained via the macro DENSE_COL and this pointer is associated with an N_Vector using the N_VGetArrayPointer/N_VSetArrayPointer functions. The jth column of the Jacobian is constructed using a call to the res routine, and a call to N_VLinearSum. The return value is either IDADENSE_SUCCESS = 0, or the nonzero value returned by the res routine, if any. */ static int IDADenseDQJac(long int Neq, realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *jac_data, DenseMat Jac, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { realtype inc, inc_inv, yj, ypj, srur, conj; realtype *tmp2_data, *y_data, *yp_data, *ewt_data, *cns_data = NULL; N_Vector rtemp, jthCol; long int j; int retval=0; IDAMem IDA_mem; IDADenseMem idadense_mem; /* jac_data points to IDA_mem */ IDA_mem = (IDAMem) jac_data; idadense_mem = (IDADenseMem) lmem; /* Save pointer to the array in tmp2 */ tmp2_data = N_VGetArrayPointer(tmp2); /* Rename work vectors for readibility */ rtemp = tmp1; jthCol = tmp2; /* Obtain pointers to the data for ewt, yy, yp. */ ewt_data = N_VGetArrayPointer(ewt); y_data = N_VGetArrayPointer(yy); yp_data = N_VGetArrayPointer(yp); if(constraints!=NULL) cns_data = N_VGetArrayPointer(constraints); srur = RSqrt(uround); for (j=0; j < Neq; j++) { /* Generate the jth col of J(tt,yy,yp) as delta(F)/delta(y_j). */ /* Set data address of jthCol, and save y_j and yp_j values. */ N_VSetArrayPointer(DENSE_COL(Jac,j), jthCol); yj = y_data[j]; ypj = yp_data[j]; /* Set increment inc to y_j based on sqrt(uround)*abs(y_j), with adjustments using yp_j and ewt_j if this is small, and a further adjustment to give it the same sign as hh*yp_j. */ inc = srur*MAX(ABS(yj),MAX( ABS(hh*ypj), ONE/ewt_data[j])); if (hh*ypj < ZERO) inc = -inc; inc = (yj + inc) - yj; /* Adjust sign(inc) again if y_j has an inequality constraint. */ if (constraints != NULL) { conj = cns_data[j]; if (ABS(conj) == ONE) {if((yj+inc)*conj < ZERO) inc = -inc;} else if (ABS(conj) == TWO) {if((yj+inc)*conj <= ZERO) inc = -inc;} } /* Increment y_j and yp_j, call res, and break on error return. */ y_data[j] += inc; yp_data[j] += c_j*inc; retval = res(tt, yy, yp, rtemp, rdata); nreD++; if (retval != IDADENSE_SUCCESS) break; /* Construct difference quotient in jthCol */ inc_inv = ONE/inc; N_VLinearSum(inc_inv, rtemp, -inc_inv, rr, jthCol); DENSE_COL(Jac,j) = N_VGetArrayPointer(jthCol); /* reset y_j, yp_j */ y_data[j] = yj; yp_data[j] = ypj; } /* Restore original array pointer in tmp2 */ N_VSetArrayPointer(tmp2_data, tmp2); return(retval); } neuron-7.5/src/sundials/ida/idadense.h000077500000000000000000000233571323325274500200110ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/ida/LICENSE. * ----------------------------------------------------------------- * This is the header file for the IDA/IDAS dense linear solver * module, IDADENSE. * ----------------------------------------------------------------- */ #ifndef _IDADENSE_H #define _IDADENSE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "dense.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Type : IDADenseJacFn * ----------------------------------------------------------------- * A dense Jacobian approximation function djac must have the * prototype given below. Its parameters are: * * Neq is the problem size, and length of all vector arguments. * * tt is the current value of the independent variable t. * * yy is the current value of the dependent variable vector, * namely the predicted value of y(t). * * yp is the current value of the derivative vector y', * namely the predicted value of y'(t). * * rr is the residual vector F(tt,yy,yp). * * c_j is the scalar in the system Jacobian, proportional to 1/hh. * * jac_data is a pointer to user Jacobian data - the same as the * jdata parameter passed to IDADense. * * Jac is the dense matrix (of type DenseMat) to be loaded by * an IDADenseJacFn routine with an approximation to the * system Jacobian matrix * J = dF/dy + c_j*dF/dy' * at the given point (t,y,y'), where the DAE system is * given by F(t,y,y') = 0. Jac is preset to zero, so only * the nonzero elements need to be loaded. See note below. * * tmp1, tmp2, tmp3 are pointers to memory allocated for * N_Vectors which can be used by an IDADenseJacFn routine * as temporary storage or work space. * * NOTE: The following are two efficient ways to load Jac: * (1) (with macros - no explicit data structure references) * for (j=0; j < Neq; j++) { * col_j = DENSE_COL(Jac,j); * for (i=0; i < Neq; i++) { * generate J_ij = the (i,j)th Jacobian element * col_j[i] = J_ij; * } * } * (2) (without macros - explicit data structure references) * for (j=0; j < Neq; j++) { * col_j = (Jac->data)[j]; * for (i=0; i < Neq; i++) { * generate J_ij = the (i,j)th Jacobian element * col_j[i] = J_ij; * } * } * A third way, using the DENSE_ELEM(A,i,j) macro, is much less * efficient in general. It is only appropriate for use in small * problems in which efficiency of access is NOT a major concern. * * NOTE: If the user's Jacobian routine needs other quantities, * they are accessible as follows: hcur (the current stepsize) * and ewt (the error weight vector) are accessible through * IDAGetCurrentStep and IDAGetErrWeights, respectively (see * ida.h). The unit roundoff is available as * UNIT_ROUNDOFF defined in sundialstypes.h * * The IDADenseJacFn should return * 0 if successful, * a positive int if a recoverable error occurred, or * a negative int if a nonrecoverable error occurred. * In the case of a recoverable error return, the integrator will * attempt to recover by reducing the stepsize (which changes cj). * ----------------------------------------------------------------- */ typedef int (*IDADenseJacFn)(long int Neq, realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *jac_data, DenseMat Jac, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* * ----------------------------------------------------------------- * Function : IDADense * ----------------------------------------------------------------- * A call to the IDADense function links the main integrator * with the IDADENSE linear solver module. * * ida_mem is the pointer to integrator memory returned by * IDACreate. * * Neq is the problem size * * IDADense returns: * IDADENSE_SUCCESS = 0 if successful * IDADENSE_LMEM_FAIL = -1 if there was a memory allocation failure * IDADENSE_ILL_INPUT = -2 if NVECTOR found incompatible * * NOTE: The dense linear solver assumes a serial implementation * of the NVECTOR package. Therefore, IDADense will first * test for a compatible N_Vector internal representation * by checking that the functions N_VGetArrayPointer and * N_VSetArrayPointer exist. * ----------------------------------------------------------------- */ int IDADense(void *ida_mem, long int Neq); /* * ----------------------------------------------------------------- * Optional inputs to the IDADENSE linear solver * ----------------------------------------------------------------- * IDADenseSetJacFn specifies the dense Jacobian approximation * routine to be used. A user-supplied djac routine must * be of type IDADenseJacFn. * By default, a difference quotient routine IDADenseDQJac, * supplied with this solver is used. * IDADenseSetJacData specifies a pointer to user data which is * passed to the djac routine every time it is called. * * The return value of IDADenseSet* is one of: * IDADENSE_SUCCESS if successful * IDADENSE_MEM_NULL if the ida memory was NULL * IDaDENSE_LMEM_NULL if the idadense memory was NULL * ----------------------------------------------------------------- */ int IDADenseSetJacFn(void *ida_mem, IDADenseJacFn djac); int IDADenseSetJacData(void *ida_mem, void *jac_data); /* * ----------------------------------------------------------------- * Optional outputs from the IDADENSE linear solver * ----------------------------------------------------------------- * IDADenseGetWorkSpace returns the real and integer workspace used * by IDADENSE. * IDADenseGetNumJacEvals returns the number of calls made to the * Jacobian evaluation routine djac. * IDADenseGetNumResEvals returns the number of calls to the user * res routine due to finite difference Jacobian evaluation. * IDADenseGetLastFlag returns the last error flag set by any of * the IDADENSE interface functions. * * The return value of IDADenseGet* is one of: * IDADENSE_SUCCESS if successful * IDADENSE_MEM_NULL if the ida memory was NULL * IDaDENSE_LMEM_NULL if the idadense memory was NULL * ----------------------------------------------------------------- */ int IDADenseGetWorkSpace(void *ida_mem, long int *lenrwD, long int *leniwD); int IDADenseGetNumJacEvals(void *ida_mem, long int *njevalsD); int IDADenseGetNumResEvals(void *ida_mem, long int *nrevalsD); int IDADenseGetLastFlag(void *ida_mem, int *flag); /* IDADENSE return values */ #define IDADENSE_SUCCESS 0 #define IDADENSE_MEM_NULL -1 #define IDADENSE_LMEM_NULL -2 #define IDADENSE_ILL_INPUT -3 #define IDADENSE_MEM_FAIL -4 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idadense_impl.h000077500000000000000000000051111323325274500210160ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/idas/LICENSE * ----------------------------------------------------------------- * This is the header file (private version) for the IDA/IDAS dense * linear solver module, IDADENSE. * ----------------------------------------------------------------- */ #ifndef _IDADENSE_IMPL_H #define _IDADENSE_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "idadense.h" #include "dense.h" #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Types : IDADenseMemRec, IDADenseMem * ----------------------------------------------------------------- */ typedef struct { long int d_neq; /* Neq = problem dimension */ IDADenseJacFn d_jac; /* jac = Jacobian routine to be called */ DenseMat d_J; /* J = dF/dy + cj*dF/dy' */ long int *d_pivots; /* pivots = pivot array for PJ = LU */ long int d_nje; /* nje = no. of calls to jac */ long int d_nreD; /* nreD = no. of calls to res due to diff. quotient Jacobian evaluation */ void *d_jdata; /* jdata is passed to jac */ int d_last_flag; /* last error return flag */ } IDADenseMemRec, *IDADenseMem; /* * ----------------------------------------------------------------- * Error Messages * ----------------------------------------------------------------- */ #define MSGD_IDAMEM_NULL "IDADense-- integrator memory is NULL.\n\n" #define MSGD_MEM_FAIL "IDADense-- a memory request failed.\n\n" #define MSGD_BAD_NVECTOR "IDADense-- a required vector operation is not implemented.\n\n" #define MSGD_WRONG_NVEC "IDADense-- incompatible NVECTOR implementation.\n\n" #define MSGD_SETGET_IDAMEM_NULL "IDADenseSet*/IDADenseGet*-- integrator memory is NULL. \n\n" #define MSGD_SETGET_LMEM_NULL "IDADenseSet*/IDADenseGet*-- IDADENSE memory is NULL. \n\n" #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idaic.c000077500000000000000000000546651323325274500173070ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh, and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the implementation file for the IC calculation for IDA. * It is independent of the linear solver in use. * ----------------------------------------------------------------- */ #include #include #include "ida_impl.h" #include "sundialsmath.h" /* Macro: loop */ #define loop for(;;) /* * ================================================================= * IDA Constants * ================================================================= */ /* Private Constants */ #define ZERO RCONST(0.0) /* real 0.0 */ #define HALF RCONST(0.5) /* real 0.5 */ #define ONE RCONST(1.0) /* real 1.0 */ #define TWO RCONST(2.0) /* real 2.0 */ #define PT99 RCONST(0.99) /* real 0.99 */ #define PT1 RCONST(0.1) /* real 0.1 */ #define PT001 RCONST(0.001) /* real 0.001 */ /* IDACalcIC control constants */ #define ICRATEMAX RCONST(0.9) /* max. Newton conv. rate */ #define ALPHALS RCONST(0.0001) /* alpha in linesearch conv. test */ /* Return values for lower level routines used by IDACalcIC */ #define IC_FAIL_RECOV 1 #define IC_CONSTR_FAILED 2 #define IC_LINESRCH_FAILED 3 #define IC_CONV_FAIL 4 #define IC_SLOW_CONVRG 5 /* * ================================================================= * Private Helper Functions Prototypes * ================================================================= */ extern int IDAInitialSetup(IDAMem IDA_mem); extern booleantype IDAEwtSet(IDAMem IDA_mem, N_Vector ycur); extern realtype IDAWrmsNorm(IDAMem IDA_mem, N_Vector x, N_Vector w, booleantype mask); static int IDAnlsIC (IDAMem IDA_mem); static int IDANewtonIC (IDAMem IDA_mem); static int IDALineSrch (IDAMem IDA_mem, realtype *delnorm, realtype *fnorm); static int IDAfnorm (IDAMem IDA_mem, realtype *fnorm); static int IDANewyyp (IDAMem IDA_mem, realtype lambda); static int IDANewy (IDAMem IDA_mem); static int IDAICFailFlag (IDAMem IDA_mem, int retval); /* * ================================================================= * Readibility Constants * ================================================================= */ #define errfp (IDA_mem->ida_errfp) #define rdata (IDA_mem->ida_rdata) #define res (IDA_mem->ida_res) #define y0 (IDA_mem->ida_y0) #define yp0 (IDA_mem->ida_yp0) #define uround (IDA_mem->ida_uround) #define phi (IDA_mem->ida_phi) #define ewt (IDA_mem->ida_ewt) #define delta (IDA_mem->ida_delta) #define ee (IDA_mem->ida_ee) #define savres (IDA_mem->ida_savres) #define tempv2 (IDA_mem->ida_tempv2) #define hh (IDA_mem->ida_hh) #define tn (IDA_mem->ida_tn) #define cj (IDA_mem->ida_cj) #define cjratio (IDA_mem->ida_cjratio) #define nbacktr (IDA_mem->ida_nbacktr) #define nre (IDA_mem->ida_nre) #define ncfn (IDA_mem->ida_ncfn) #define nni (IDA_mem->ida_nni) #define nsetups (IDA_mem->ida_nsetups) #define ns (IDA_mem->ida_ns) #define lsetup (IDA_mem->ida_lsetup) #define lsolve (IDA_mem->ida_lsolve) #define hused (IDA_mem->ida_hused) #define epsNewt (IDA_mem->ida_epsNewt) #define id (IDA_mem->ida_id) #define setupNonNull (IDA_mem->ida_setupNonNull) #define suppressalg (IDA_mem->ida_suppressalg) #define constraints (IDA_mem->ida_constraints) #define constraintsSet (IDA_mem->ida_constraintsSet) #define epiccon (IDA_mem->ida_epiccon) #define maxnh (IDA_mem->ida_maxnh) #define maxnj (IDA_mem->ida_maxnj) #define maxnit (IDA_mem->ida_maxnit) #define lsoff (IDA_mem->ida_lsoff) #define steptol (IDA_mem->ida_steptol) /* * ================================================================= * EXPORTED FUNCTIONS IMPLEMENTATION * ================================================================= */ /* * ----------------------------------------------------------------- * IDACalcIC * ----------------------------------------------------------------- * IDACalcIC computes consistent initial conditions, given the * user's initial guess for unknown components of y0 and/or yp0. * * The return value is IDA_SUCCESS = 0 if no error occurred. * * The error return values (fully described in ida.h) are: * IDA_MEM_NULL ida_mem is NULL * IDA_NO_MALLOC ida_mem was not allocated * IDA_ILL_INPUT bad value for icopt, tout1, or id * IDA_LINIT_FAIL the linear solver linit routine failed * IDA_BAD_EWT zero value of some component of ewt * IDA_RES_FAIL res had a non-recoverable error * IDA_FIRST_RES_FAIL res failed recoverably on the first call * IDA_LSETUP_FAIL lsetup had a non-recoverable error * IDA_LSOLVE_FAIL lsolve had a non-recoverable error * IDA_NO_RECOVERY res, lsetup, or lsolve had a recoverable * error, but IDACalcIC could not recover * IDA_CONSTR_FAIL the inequality constraints could not be met * IDA_LINESEARCH_FAIL the linesearch failed (on steptol test) * IDA_CONV_FAIL the Newton iterations failed to converge * ----------------------------------------------------------------- */ int IDACalcIC (void *ida_mem, int icopt, realtype tout1) { booleantype ewtsetOK; int ier, nwt, nh, mxnh, icret, retval=0; realtype tdist, troundoff, minid, hic, ypnorm; IDAMem IDA_mem; /* Check if IDA memory exists */ if (ida_mem == NULL) { fprintf(stderr, MSG_IC_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Check if problem was malloc'ed */ if (IDA_mem->ida_MallocDone == FALSE) { if(errfp!=NULL) fprintf(errfp, MSG_IC_NO_MALLOC); return(IDA_NO_MALLOC); } /* Check inputs to IDA for correctness and consistency */ ier = IDAInitialSetup(IDA_mem); if (ier != IDA_SUCCESS) return(IDA_ILL_INPUT); IDA_mem->ida_SetupDone = TRUE; /* Check legality of input arguments, and set IDA memory copies. */ if (icopt < IDA_YA_YDP_INIT || icopt > IDA_Y_INIT) { if(errfp!=NULL) fprintf(errfp, MSG_IC_BAD_ICOPT); return(IDA_ILL_INPUT); } IDA_mem->ida_icopt = icopt; if (icopt == IDA_YA_YDP_INIT && (id == NULL)) { if(errfp!=NULL) fprintf(errfp, MSG_IC_MISSING_ID); return(IDA_ILL_INPUT); } tdist = ABS(tout1 - tn); troundoff = TWO*uround*(ABS(tn) + ABS(tout1)); if (tdist < troundoff) { if(errfp!=NULL) fprintf(errfp, MSG_IC_TOO_CLOSE); return(IDA_ILL_INPUT); } /* For use in the IDA_YA_YP_INIT case, set sysindex and tscale. */ IDA_mem->ida_sysindex = 1; IDA_mem->ida_tscale = tdist; if (icopt == IDA_YA_YDP_INIT) { minid = N_VMin(id); if (minid < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_IC_BAD_ID); return(IDA_ILL_INPUT); } if (minid > HALF) IDA_mem->ida_sysindex = 0; } /* Set the test constant in the Newton convergence test */ IDA_mem->ida_epsNewt = epiccon; /* Initializations: cjratio = 1 (for use in direct linear solvers); set nbacktr = 0; */ cjratio = ONE; nbacktr = 0; /* Set hic, hh, cj, and mxnh. */ hic = PT001*tdist; ypnorm = IDAWrmsNorm(IDA_mem, yp0, ewt, suppressalg); if (ypnorm > HALF/hic) hic = HALF/ypnorm; if( tout1 < tn) hic = -hic; hh = hic; if (icopt == IDA_YA_YDP_INIT) { cj = ONE/hic; mxnh = maxnh; } else { cj = ZERO; mxnh = 1; } /* Loop over nwt = number of evaluations of ewt vector. */ for (nwt = 1; nwt <= 2; nwt++) { /* Loop over nh = number of h values. */ for (nh = 1; nh <= mxnh; nh++) { /* Call the IC nonlinear solver function. */ retval = IDAnlsIC(IDA_mem); /* Cut h and loop on recoverable IDA_YA_YDP_INIT failure; else break. */ if (retval == IDA_SUCCESS) break; ncfn++; if (retval < 0) break; if (nh == mxnh) break; /* If looping to try again, reset y0 and yp0 if not converging. */ if (retval != IC_SLOW_CONVRG) { N_VScale (ONE, phi[0], y0); N_VScale (ONE, phi[1], yp0); } hic *= PT1; cj = ONE/hic; hh = hic; } /* End of nh loop */ /* Break on failure; else reset ewt, save y0,yp0 in phi, and loop. */ if (retval != IDA_SUCCESS) break; ewtsetOK = IDAEwtSet(IDA_mem, y0); if (!ewtsetOK) { retval = IDA_BAD_EWT; break; } N_VScale (ONE, y0, phi[0]); N_VScale (ONE, yp0, phi[1]); } /* End of nwt loop */ /* Load the optional outputs. */ if (icopt == IDA_YA_YDP_INIT) hused = hic; /* On any failure, print message and return proper flag. */ if (retval != IDA_SUCCESS) { icret = IDAICFailFlag(IDA_mem, retval); return(icret); } /* Otherwise return success flag. */ return(IDA_SUCCESS); } /* * ================================================================= * PRIVATE FUNCTIONS IMPLEMENTATION * ================================================================= */ #define icopt (IDA_mem->ida_icopt) #define sysindex (IDA_mem->ida_sysindex) #define tscale (IDA_mem->ida_tscale) #define ynew (IDA_mem->ida_ynew) #define ypnew (IDA_mem->ida_ypnew) #define delnew (IDA_mem->ida_delnew) #define dtemp (IDA_mem->ida_dtemp) /* * ----------------------------------------------------------------- * IDAnlsIC * ----------------------------------------------------------------- * IDAnlsIC solves a nonlinear system for consistent initial * conditions. It calls IDANewtonIC to do most of the work. * * The return value is IDA_SUCCESS = 0 if no error occurred. * The error return values (positive) considered recoverable are: * IC_FAIL_RECOV if res, lsetup, or lsolve failed recoverably * IC_CONSTR_FAILED if the constraints could not be met * IC_LINESRCH_FAILED if the linesearch failed (on steptol test) * IC_CONV_FAIL if the Newton iterations failed to converge * IC_SLOW_CONVRG if the iterations are converging slowly * (failed the convergence test, but showed * norm reduction or convergence rate < 1) * The error return values (negative) considered non-recoverable are: * IDA_RES_FAIL if res had a non-recoverable error * IDA_FIRST_RES_FAIL if res failed recoverably on the first call * SETUP_FAILURE if lsetup had a non-recoverable error * IDA_LSOLVE_FAIL if lsolve had a non-recoverable error * ----------------------------------------------------------------- */ static int IDAnlsIC (IDAMem IDA_mem) { int retval, nj; N_Vector tv1, tv2, tv3; tv1 = ee; tv2 = tempv2; tv3 = phi[2]; retval = res(tn, y0, yp0, delta, rdata); nre++; if(retval < 0) return(IDA_RES_FAIL); if(retval > 0) return(IDA_FIRST_RES_FAIL); N_VScale (ONE, delta, savres); /* Loop over nj = number of linear solve Jacobian setups. */ for (nj = 1; nj <= maxnj; nj++) { /* If there is a setup routine, call it. */ if (setupNonNull) { nsetups++; retval = lsetup(IDA_mem, y0, yp0, delta, tv1, tv2, tv3); if(retval < 0) return(IDA_LSETUP_FAIL); if(retval > 0) return(IC_FAIL_RECOV); } /* Call the Newton iteration routine, and return if successful. */ retval = IDANewtonIC(IDA_mem); if (retval == IDA_SUCCESS) return(IDA_SUCCESS); /* If converging slowly and lsetup is nontrivial, retry. */ if (retval == IC_SLOW_CONVRG && setupNonNull) { N_VScale (ONE, savres, delta); continue; } else { return(retval); } } /* End of nj loop */ /* No convergence after maxnj tries; return with retval=IC_SLOW_CONVRG */ return(retval); } /* * ----------------------------------------------------------------- * IDANewtonIC * ----------------------------------------------------------------- * IDANewtonIC performs the Newton iteration to solve for consistent * initial conditions. It calls IDALineSrch within each iteration. * On return, savres contains the current residual vector. * * The return value is IDA_SUCCESS = 0 if no error occurred. * The error return values (positive) considered recoverable are: * IC_FAIL_RECOV if res or lsolve failed recoverably * IC_CONSTR_FAILED if the constraints could not be met * IC_LINESRCH_FAILED if the linesearch failed (on steptol test) * IC_CONV_FAIL if the Newton iterations failed to converge * IC_SLOW_CONVRG if the iterations appear to be converging slowly. * They failed the convergence test, but showed * an overall norm reduction (by a factor of < 0.1) * or a convergence rate <= ICRATEMAX). * The error return values (negative) considered non-recoverable are: * IDA_RES_FAIL if res had a non-recoverable error * IDA_LSOLVE_FAIL if lsolve had a non-recoverable error * ----------------------------------------------------------------- */ static int IDANewtonIC (IDAMem IDA_mem) { int retval, mnewt; realtype delnorm, fnorm, fnorm0, oldfnrm, rate=0.0; /* Set pointer for vector delnew */ delnew = phi[2]; /* Call the linear solve function to get the Newton step, delta. */ retval = lsolve(IDA_mem, delta, ewt, y0, yp0, savres); if(retval < 0) return(IDA_LSOLVE_FAIL); if(retval > 0) return(IC_FAIL_RECOV); /* Compute the norm of the step; return now if this is small. */ fnorm = IDAWrmsNorm(IDA_mem, delta, ewt, FALSE); if (sysindex == 0) fnorm *= tscale*ABS(cj); if (fnorm <= epsNewt) return(IDA_SUCCESS); fnorm0 = fnorm; /* Newton iteration loop */ for (mnewt = 0; mnewt < maxnit; mnewt++) { nni++; delnorm = fnorm; oldfnrm = fnorm; /* Call the Linesearch function and return if it failed. */ retval = IDALineSrch(IDA_mem, &delnorm, &fnorm); if (retval != IDA_SUCCESS) return(retval); /* Set the observed convergence rate and test for convergence. */ rate = fnorm/oldfnrm; if (fnorm <= epsNewt) return(IDA_SUCCESS); /* If not converged, copy new step vector, and loop. */ N_VScale(ONE, delnew, delta); } /* End of Newton iteration loop */ /* Return either IC_SLOW_CONVRG or recoverable fail flag. */ if (rate <= ICRATEMAX || fnorm < PT1*fnorm0) return(IC_SLOW_CONVRG); return(IC_CONV_FAIL); } /* * ----------------------------------------------------------------- * IDALineSrch * ----------------------------------------------------------------- * IDALineSrch performs the Linesearch algorithm with the * calculation of consistent initial conditions. * * On entry, y0 and yp0 are the current values of y and y', the * Newton step is delta, the current residual vector F is savres, * delnorm is WRMS-norm(delta), and fnorm is the norm of the vector * J-inverse F. * * On a successful return, y0, yp0, and savres have been updated, * delnew contains the current value of J-inverse F, and fnorm is * WRMS-norm(delnew). * * The return value is IDA_SUCCESS = 0 if no error occurred. * The error return values (positive) considered recoverable are: * IC_FAIL_RECOV if res or lsolve failed recoverably * IC_CONSTR_FAILED if the constraints could not be met * IC_LINESRCH_FAILED if the linesearch failed (on steptol test) * The error return values (negative) considered non-recoverable are: * IDA_RES_FAIL if res had a non-recoverable error * IDA_LSOLVE_FAIL if lsolve had a non-recoverable error * ----------------------------------------------------------------- */ static int IDALineSrch (IDAMem IDA_mem, realtype *delnorm, realtype *fnorm) { booleantype conOK; int retval; realtype f1norm, fnormp, f1normp, ratio, lambda, minlam, slpi; N_Vector mc; /* Initialize work space pointers, f1norm, ratio. (Use of mc in constraint check does not conflict with ypnew.) */ mc = ee; dtemp = phi[3]; ynew = tempv2; ypnew = ee; f1norm = (*fnorm)*(*fnorm)*HALF; ratio = ONE; /* If there are constraints, check and reduce step if necessary. */ if (constraintsSet) { /* Update y and check constraints. */ IDANewy(IDA_mem); conOK = N_VConstrMask (constraints, ynew, mc); if (!conOK) { /* Not satisfied. Compute scaled step to satisfy constraints. */ N_VProd (mc, delta, dtemp); ratio = PT99*N_VMinQuotient (y0, dtemp); (*delnorm) *= ratio; if ((*delnorm) <= steptol) return(IC_CONSTR_FAILED); N_VScale (ratio, delta, delta); } } /* End of constraints check */ slpi = -TWO*f1norm*ratio; minlam = steptol/(*delnorm); lambda = ONE; /* In IDA_Y_INIT case, set ypnew = yp0 (fixed) for linesearch. */ if (icopt == IDA_Y_INIT) N_VScale (ONE, yp0, ypnew); /* Loop on linesearch variable lambda. */ loop { /* Get new (y,y') = (ynew,ypnew) and norm of new function value. */ IDANewyyp(IDA_mem, lambda); retval = IDAfnorm(IDA_mem, &fnormp); if (retval != IDA_SUCCESS) return(retval); /* If lsoff option is on, break out. */ if (lsoff) break; /* Do alpha-condition test. */ f1normp = fnormp*fnormp*HALF; if (f1normp <= f1norm + ALPHALS*slpi*lambda) break; if (lambda < minlam) return(IC_LINESRCH_FAILED); lambda /= TWO; nbacktr++; } /* End of breakout linesearch loop */ /* Update y0, yp0, and fnorm, then return. */ N_VScale (ONE, ynew, y0); if (icopt == IDA_YA_YDP_INIT) N_VScale (ONE, ypnew, yp0); *fnorm = fnormp; return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAfnorm * ----------------------------------------------------------------- * IDAfnorm computes the norm of the current function value, by * evaluating the DAE residual function, calling the linear * system solver, and computing a WRMS-norm. * * On return, savres contains the current residual vector F, and * delnew contains J-inverse F. * * The return value is IDA_SUCCESS = 0 if no error occurred, or * IC_FAIL_RECOV if res or lsolve failed recoverably, or * IDA_RES_FAIL if res had a non-recoverable error, or * IDA_LSOLVE_FAIL if lsolve had a non-recoverable error. * ----------------------------------------------------------------- */ static int IDAfnorm (IDAMem IDA_mem, realtype *fnorm) { int retval; /* Get residual vector F, return if failed, and save F in savres. */ retval = res(tn, ynew, ypnew, delnew, rdata); nre++; if(retval < 0) return(IDA_RES_FAIL); if(retval > 0) return(IC_FAIL_RECOV); N_VScale (ONE, delnew, savres); /* Call the linear solve function to get J-inverse F; return if failed. */ retval = lsolve(IDA_mem, delnew, ewt, ynew, ypnew, savres); if(retval < 0) return(IDA_LSOLVE_FAIL); if(retval > 0) return(IC_FAIL_RECOV); /* Compute the WRMS-norm; rescale if index = 0. */ *fnorm = IDAWrmsNorm(IDA_mem, delnew, ewt, FALSE); if (sysindex == 0) (*fnorm) *= tscale*ABS(cj); return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDANewyyp * ----------------------------------------------------------------- * IDANewyyp updates the vectors ynew and ypnew from y0 and yp0, * using the current step vector lambda*delta, in a manner * depending on icopt and the input id vector. * * The return value is always IDA_SUCCESS = 0. * ----------------------------------------------------------------- */ static int IDANewyyp (IDAMem IDA_mem, realtype lambda) { /* IDA_YA_YDP_INIT case: ynew = y0 - lambda*delta where id_i = 0 ypnew = yp0 - cj*lambda*delta where id_i = 1. */ if (icopt == IDA_YA_YDP_INIT) { N_VProd (id, delta, dtemp); N_VLinearSum (ONE, yp0, -cj*lambda, dtemp, ypnew); N_VLinearSum (ONE, delta, -ONE, dtemp, dtemp); N_VLinearSum (ONE, y0, -lambda, dtemp, ynew); return(IDA_SUCCESS); } /* IDA_Y_INIT case: ynew = y0 - lambda*delta. (ypnew = yp0 preset.) */ N_VLinearSum (ONE, y0, -lambda, delta, ynew); return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDANewy * ----------------------------------------------------------------- * IDANewy updates the vector ynew from y0, * using the current step vector delta, in a manner * depending on icopt and the input id vector. * * The return value is always IDA_SUCCESS = 0. * ----------------------------------------------------------------- */ static int IDANewy (IDAMem IDA_mem) { /* IDA_YA_YDP_INIT case: ynew = y0 - delta where id_i = 0. */ if (icopt == IDA_YA_YDP_INIT) { N_VProd (id, delta, dtemp); N_VLinearSum (ONE, delta, -ONE, dtemp, dtemp); N_VLinearSum (ONE, y0, -ONE, dtemp, ynew); return(IDA_SUCCESS); } /* IDA_Y_INIT case: ynew = y0 - delta. */ N_VLinearSum (ONE, y0, -ONE, delta, ynew); return(IDA_SUCCESS); } /* * ----------------------------------------------------------------- * IDAICFailFlag * ----------------------------------------------------------------- * IDAICFailFlag prints a message and sets the IDACalcIC return * value appropriate to the flag retval returned by IDAnlsIC. * ----------------------------------------------------------------- */ static int IDAICFailFlag (IDAMem IDA_mem, int retval) { /* Depending on retval, print error message and return error flag. */ switch (retval) { case IDA_RES_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_IC_RES_NONREC); return(IDA_RES_FAIL); case IDA_FIRST_RES_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_IC_RES_FAIL); return(IDA_FIRST_RES_FAIL); case IDA_LSETUP_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_IC_SETUP_FAIL); return(IDA_LSETUP_FAIL); case IDA_LSOLVE_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_IC_SOLVE_FAIL); return(IDA_LSOLVE_FAIL); case IC_FAIL_RECOV: if(errfp!=NULL) fprintf(errfp, MSG_IC_NO_RECOVERY); return(IDA_NO_RECOVERY); case IC_CONSTR_FAILED: if(errfp!=NULL) fprintf(errfp, MSG_IC_FAIL_CONSTR); return(IDA_CONSTR_FAIL); case IC_LINESRCH_FAILED: if(errfp!=NULL) fprintf(errfp, MSG_IC_FAILED_LINS); return(IDA_LINESEARCH_FAIL); case IC_CONV_FAIL: if(errfp!=NULL) fprintf(errfp, MSG_IC_CONV_FAILED); return(IDA_CONV_FAIL); case IC_SLOW_CONVRG: if(errfp!=NULL) fprintf(errfp, MSG_IC_CONV_FAILED); return(IDA_CONV_FAIL); case IDA_BAD_EWT: if(errfp!=NULL) fprintf(errfp, MSG_IC_BAD_EWT); return(IDA_BAD_EWT); } return -99; } neuron-7.5/src/sundials/ida/idaio.c000077500000000000000000000415151323325274500173110ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh, and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the implementation file for the optional inputs and * outputs for the IDA solver. * ----------------------------------------------------------------- */ #include #include #include "ida_impl.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* * ================================================================= * IDA optional input functions * ================================================================= */ int IDASetErrFile(void *ida_mem, FILE *errfp) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_errfp = errfp; return(IDA_SUCCESS); } #define errfp (IDA_mem->ida_errfp) /*-----------------------------------------------------------------*/ int IDASetRdata(void *ida_mem, void *res_data) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_rdata = res_data; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxOrd(void *ida_mem, int maxord) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (maxord <= 0) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_NEG_MAXORD); return(IDA_ILL_INPUT); } if (maxord > IDA_mem->ida_maxord) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_MAXORD); return(IDA_ILL_INPUT); } IDA_mem->ida_maxord = maxord; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxNumSteps(void *ida_mem, long int mxsteps) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (mxsteps <= 0) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_NEG_MXSTEPS); return(IDA_ILL_INPUT); } IDA_mem->ida_mxstep = mxsteps; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetInitStep(void *ida_mem, realtype hin) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_hin = hin; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxStep(void *ida_mem, realtype hmax) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (hmax <= 0) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_NEG_HMAX); return(IDA_ILL_INPUT); } IDA_mem->ida_hmax_inv = ONE/hmax; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetStopTime(void *ida_mem, realtype tstop) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_tstop = tstop; IDA_mem->ida_tstopset = TRUE; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetNonlinConvCoef(void *ida_mem, realtype epcon) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (epcon < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_NEG_EPCON); return(IDA_ILL_INPUT); } IDA_mem->ida_epcon = epcon; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxErrTestFails(void *ida_mem, int maxnef) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return (IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_maxnef = maxnef; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxConvFails(void *ida_mem, int maxncf) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return (IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_maxncf = maxncf; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxNonlinIters(void *ida_mem, int maxcor) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return (IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_maxcor = maxcor; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetSuppressAlg(void *ida_mem, booleantype suppressalg) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_suppressalg = suppressalg; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetId(void *ida_mem, N_Vector id) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_id = id; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetConstraints(void *ida_mem, N_Vector constraints) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_constraints = constraints; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetTolerances(void *ida_mem, int itol, realtype *rtol, void *atol) { IDAMem IDA_mem; booleantype neg_atol; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if ((itol != IDA_SS) && (itol != IDA_SV)) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_ITOL); return(IDA_ILL_INPUT); } if (rtol == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_RTOL_NULL); return(IDA_ILL_INPUT); } if (*rtol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_RTOL); return(IDA_ILL_INPUT); } if (atol == NULL) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_ATOL_NULL); return(IDA_ILL_INPUT); } /* Test absolute tolerances */ if (itol == IDA_SS) { neg_atol = (*((realtype *)atol) < ZERO); } else { neg_atol = (N_VMin((N_Vector)atol) < ZERO); } if (neg_atol) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_ATOL); return(IDA_ILL_INPUT); } IDA_mem->ida_itol = itol; IDA_mem->ida_rtol = rtol; IDA_mem->ida_atol = atol; return(IDA_SUCCESS); } /* * ================================================================= * IDA IC optional input functions * ================================================================= */ int IDASetNonlinConvCoefIC(void *ida_mem, realtype epiccon) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (epiccon < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_EPICCON); return(IDA_ILL_INPUT); } IDA_mem->ida_epiccon = epiccon; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxNumStepsIC(void *ida_mem, int maxnh) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (maxnh < 0) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_MAXNH); return(IDA_ILL_INPUT); } IDA_mem->ida_maxnh = maxnh; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxNumJacsIC(void *ida_mem, int maxnj) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (maxnj < 0) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_MAXNJ); return(IDA_ILL_INPUT); } IDA_mem->ida_maxnj = maxnj; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetMaxNumItersIC(void *ida_mem, int maxnit) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (maxnit < 0) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_MAXNIT); return(IDA_ILL_INPUT); } IDA_mem->ida_maxnit = maxnit; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetLineSearchOffIC(void *ida_mem, booleantype lsoff) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; IDA_mem->ida_lsoff = lsoff; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDASetStepToleranceIC(void *ida_mem, realtype steptol) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAS_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (steptol < ZERO) { if(errfp!=NULL) fprintf(errfp, MSG_IDAS_BAD_STEPTOL); return(IDA_ILL_INPUT); } IDA_mem->ida_steptol = steptol; return(IDA_SUCCESS); } /* * ================================================================= * Readability constants * ================================================================= */ #define ewt (IDA_mem->ida_ewt) #define kk (IDA_mem->ida_kk) #define hh (IDA_mem->ida_hh) #define h0u (IDA_mem->ida_h0u) #define tn (IDA_mem->ida_tn) #define nbacktr (IDA_mem->ida_nbacktr) #define nst (IDA_mem->ida_nst) #define nre (IDA_mem->ida_nre) #define ncfn (IDA_mem->ida_ncfn) #define netf (IDA_mem->ida_netf) #define nni (IDA_mem->ida_nni) #define nsetups (IDA_mem->ida_nsetups) #define lrw (IDA_mem->ida_lrw) #define liw (IDA_mem->ida_liw) #define kused (IDA_mem->ida_kused) #define hused (IDA_mem->ida_hused) #define tolsf (IDA_mem->ida_tolsf) /* * ================================================================= * IDA optional input functions * ================================================================= */ int IDAGetNumSteps(void *ida_mem, long int *nsteps) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nsteps = nst; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNumResEvals(void *ida_mem, long int *nrevals) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nrevals = nre; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNumLinSolvSetups(void *ida_mem, long int *nlinsetups) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nlinsetups = nsetups; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNumErrTestFails(void *ida_mem, long int *netfails) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *netfails = netf; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNumBacktrackOps(void *ida_mem, long int *nbacktracks) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nbacktracks = nbacktr; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetLastOrder(void *ida_mem, int *klast) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *klast = kused; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetCurrentOrder(void *ida_mem, int *kcur) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *kcur = kk; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetActualInitStep(void *ida_mem, realtype *hinused) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *hinused = h0u; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetLastStep(void *ida_mem, realtype *hlast) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *hlast = hused; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetCurrentStep(void *ida_mem, realtype *hcur) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *hcur = hh; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetCurrentTime(void *ida_mem, realtype *tcur) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *tcur = tn; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetTolScaleFactor(void *ida_mem, realtype *tolsfact) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *tolsfact = tolsf; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetErrWeights(void *ida_mem, N_Vector *eweight) { IDAMem IDA_mem; if (ida_mem == NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return (IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *eweight = ewt; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetWorkSpace(void *ida_mem, long int *lenrw, long int *leniw) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *leniw = liw; *lenrw = lrw; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetIntegratorStats(void *ida_mem, long int *nsteps, long int *nrevals, long int *nlinsetups, long int *netfails, int *klast, int *kcur, realtype *hlast, realtype *hcur, realtype *tcur) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nsteps = nst; *nrevals = nre; *nlinsetups = nsetups; *netfails = netf; *klast = kused; *kcur = kk; *hlast = hused; *hcur = hh; *tcur = tn; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNumNonlinSolvIters(void *ida_mem, long int *nniters) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nniters = nni; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNumNonlinSolvConvFails(void *ida_mem, long int *nncfails) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nncfails = ncfn; return(IDA_SUCCESS); } /*-----------------------------------------------------------------*/ int IDAGetNonlinSolvStats(void *ida_mem, long int *nniters, long int *nncfails) { IDAMem IDA_mem; if (ida_mem==NULL) { fprintf(stderr, MSG_IDAG_NO_MEM); return(IDA_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; *nniters = nni; *nncfails = ncfn; return(IDA_SUCCESS); } neuron-7.5/src/sundials/ida/idaspgmr.c000077500000000000000000000627241323325274500200370ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh, and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the implementation file for the IDA Scaled * Preconditioned GMRES linear solver module, IDASPGMR. * ----------------------------------------------------------------- */ #include #include #include "ida_impl.h" #include "idaspgmr_impl.h" #include "sundialsmath.h" /* Constants */ #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define PT9 RCONST(0.9) #define PT05 RCONST(0.05) #define IDA_SPGMR_MAXL 5 #define IDA_SPGMR_MAXRS 5 /* IDASPGMR linit, lsetup, lsolve, lperf, and lfree routines */ static int IDASpgmrInit(IDAMem IDA_mem); static int IDASpgmrSetup(IDAMem IDA_mem, N_Vector yy_p, N_Vector yp_p, N_Vector rr_p, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); static int IDASpgmrSolve(IDAMem IDA_mem, N_Vector bb, N_Vector weight, N_Vector yy_now, N_Vector yp_now, N_Vector rr_now); static int IDASpgmrPerf(IDAMem IDA_mem, int perftask); static int IDASpgmrFree(IDAMem IDA_mem); /* IDASPGMR Atimes and PSolve routines called by generic SPGMR solver */ static int IDASpgmrAtimes(void *ida_mem, N_Vector v, N_Vector z); static int IDASpgmrPSolve(void *ida_mem, N_Vector r, N_Vector z, int lr); /* Difference quotient approximation for Jac times vector */ static int IDASpgmrDQJtimes(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector v, N_Vector Jv, realtype c_j, void *jac_data, N_Vector work1, N_Vector work2); /* Readability Replacements */ #define lrw1 (IDA_mem->ida_lrw1) #define liw1 (IDA_mem->ida_liw1) #define nst (IDA_mem->ida_nst) #define tn (IDA_mem->ida_tn) #define cj (IDA_mem->ida_cj) #define epsNewt (IDA_mem->ida_epsNewt) #define nre (IDA_mem->ida_nre) #define res (IDA_mem->ida_res) #define rdata (IDA_mem->ida_rdata) #define ewt (IDA_mem->ida_ewt) #define errfp (IDA_mem->ida_errfp) #define iopt (IDA_mem->ida_iopt) #define linit (IDA_mem->ida_linit) #define lsetup (IDA_mem->ida_lsetup) #define lsolve (IDA_mem->ida_lsolve) #define lperf (IDA_mem->ida_lperf) #define lfree (IDA_mem->ida_lfree) #define lmem (IDA_mem->ida_lmem) #define nni (IDA_mem->ida_nni) #define ncfn (IDA_mem->ida_ncfn) #define setupNonNull (IDA_mem->ida_setupNonNull) #define vec_tmpl (IDA_mem->ida_tempv1) #define sqrtN (idaspgmr_mem->g_sqrtN) #define epslin (idaspgmr_mem->g_epslin) #define ytemp (idaspgmr_mem->g_ytemp) #define yptemp (idaspgmr_mem->g_yptemp) #define xx (idaspgmr_mem->g_xx) #define ycur (idaspgmr_mem->g_ycur) #define ypcur (idaspgmr_mem->g_ypcur) #define rcur (idaspgmr_mem->g_rcur) #define resflag (idaspgmr_mem->g_resflag) #define npe (idaspgmr_mem->g_npe) #define nli (idaspgmr_mem->g_nli) #define nps (idaspgmr_mem->g_nps) #define ncfl (idaspgmr_mem->g_ncfl) #define nst0 (idaspgmr_mem->g_nst0) #define nni0 (idaspgmr_mem->g_nni0) #define nli0 (idaspgmr_mem->g_nli0) #define ncfn0 (idaspgmr_mem->g_ncfn0) #define ncfl0 (idaspgmr_mem->g_ncfl0) #define nwarn (idaspgmr_mem->g_nwarn) #define njtimes (idaspgmr_mem->g_njtimes) #define nreSG (idaspgmr_mem->g_nreSG) #define spgmr_mem (idaspgmr_mem->g_spgmr_mem) #define last_flag (idaspgmr_mem->g_last_flag) /* * ----------------------------------------------------------------- * IDASpgmr * ----------------------------------------------------------------- * * This routine initializes the memory record and sets various function * fields specific to the IDASPGMR linear solver module. * * IDASpgmr first calls the existing lfree routine if this is not NULL. * It then sets the ida_linit, ida_lsetup, ida_lsolve, ida_lperf, and * ida_lfree fields in (*IDA_mem) to be IDASpgmrInit, IDASpgmrSetup, * IDASpgmrSolve, IDASpgmrPerf, and IDASpgmrFree, respectively. * It allocates memory for a structure of type IDASpgmrMemRec and sets * the ida_lmem field in (*IDA_mem) to the address of this structure. * It sets setupNonNull in (*IDA_mem). It then sets the following * fields in the IDASpgmrMemRec structure: * g_gstype = gstype * g_maxl = MIN(Neq,IDA_SPGMR_MAXL) if maxl <= 0, else MIN(Neq,maxl) * g_maxrs = 0 if maxrs < 0, MIN(5,Neq/g_maxl) if maxrs = 0, and * MIN(maxrs,Neq/g_maxl) if maxrs > 0. * g_eplifac = 0.05 if eplifac = 0.0, else eplifac * g_dqincfac = 1.0 if dqincfac = 0.0, else dqincfac * g_pdata = NULL * g_pset = NULL * g_psolve = NULL * g_jtimes = NULL * g_jdata = NULL * Finally, IDASpgmr allocates memory for ytemp, yptemp, and xx, and * calls SpgmrMalloc to allocate memory for the Spgmr solver. * * The return value of IDASpgmr is: * IDASPGMR_SUCCESS = 0 if successful * IDASPGMR_MEM_FAIL = -1 if IDA_mem is NULL or a memory allocation failed * IDASPGMR_ILL_INPUT = -2 if the gstype argument is illegal. * * ----------------------------------------------------------------- */ int IDASpgmr(void *ida_mem, int maxl) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; int flag, maxl1; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; /* Check if N_VDotProd is present */ if(vec_tmpl->ops->nvdotprod == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_BAD_NVECTOR); return(IDASPGMR_ILL_INPUT); } if (lfree != NULL) flag = lfree((IDAMem) ida_mem); /* Set five main function fields in ida_mem */ linit = IDASpgmrInit; lsetup = IDASpgmrSetup; lsolve = IDASpgmrSolve; lperf = IDASpgmrPerf; lfree = IDASpgmrFree; /* Get memory for IDASpgmrMemRec */ idaspgmr_mem = (IDASpgmrMem) malloc(sizeof(IDASpgmrMemRec)); if (idaspgmr_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); return(IDASPGMR_MEM_FAIL); } /* Set SPGMR parameters that were passed in call sequence */ maxl1 = (maxl <= 0) ? IDA_SPGMR_MAXL : maxl; idaspgmr_mem->g_maxl = maxl1; /* Set default values for the rest of the Spgmr parameters */ idaspgmr_mem->g_gstype = MODIFIED_GS; idaspgmr_mem->g_maxrs = IDA_SPGMR_MAXRS; idaspgmr_mem->g_eplifac = PT05; idaspgmr_mem->g_dqincfac = ONE; idaspgmr_mem->g_pset = NULL; idaspgmr_mem->g_psolve = NULL; idaspgmr_mem->g_pdata = NULL; idaspgmr_mem->g_jtimes = IDASpgmrDQJtimes; idaspgmr_mem->g_jdata = ida_mem; idaspgmr_mem->g_last_flag = IDASPGMR_SUCCESS; /* Set setupNonNull to FALSE */ setupNonNull = FALSE; /* Allocate memory for ytemp, yptemp, and xx */ ytemp = N_VClone(vec_tmpl); if (ytemp == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); return(IDASPGMR_MEM_FAIL); } yptemp = N_VClone(vec_tmpl); if (yptemp == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); N_VDestroy(ytemp); return(IDASPGMR_MEM_FAIL); } xx = N_VClone(vec_tmpl); if (xx == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); N_VDestroy(ytemp); N_VDestroy(yptemp); return(IDASPGMR_MEM_FAIL); } /* Compute sqrtN from a dot product */ N_VConst(ONE, ytemp); sqrtN = RSqrt( N_VDotProd(ytemp, ytemp) ); /* Call SpgmrMalloc to allocate workspace for Spgmr */ spgmr_mem = SpgmrMalloc(maxl1, vec_tmpl); if (spgmr_mem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_MEM_FAIL); N_VDestroy(ytemp); N_VDestroy(yptemp); N_VDestroy(xx); return(IDASPGMR_MEM_FAIL); } /* Attach linear solver memory to the integrator memory */ lmem = idaspgmr_mem; return(IDASPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * IDASpgmrSet* and IDASpgmrGet* * ----------------------------------------------------------------- */ int IDASpgmrSetGSType(void *ida_mem, int gstype) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; /* Check for legal gstype */ if ((gstype != MODIFIED_GS) && (gstype != CLASSICAL_GS)) { if(errfp!=NULL) fprintf(errfp, MSGS_BAD_GSTYPE); return(IDASPGMR_ILL_INPUT); } idaspgmr_mem->g_gstype = gstype; return(IDASPGMR_SUCCESS); } int IDASpgmrSetMaxRestarts(void *ida_mem, int maxrs) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; /* Check for legal maxrs */ if (maxrs < 0) { if(errfp!=NULL) fprintf(errfp, MSGS_IDAS_NEG_MAXRS); return(IDASPGMR_ILL_INPUT); } idaspgmr_mem->g_maxrs = maxrs; return(IDASPGMR_SUCCESS); } int IDASpgmrSetEpsLin(void *ida_mem, realtype eplifac) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; /* Check for legal maxrs */ if (eplifac < ZERO) { if(errfp!=NULL) fprintf(errfp, MSGS_IDAS_NEG_EPLIFAC); return(IDASPGMR_ILL_INPUT); } if (eplifac == 0) idaspgmr_mem->g_eplifac = PT05; else idaspgmr_mem->g_eplifac = eplifac; return(IDASPGMR_SUCCESS); } int IDASpgmrSetIncrementFactor(void *ida_mem, realtype dqincfac) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; /* Check for legal maxrs */ if (dqincfac <= ZERO) { if(errfp!=NULL) fprintf(errfp, MSGS_IDAS_NEG_DQINCFAC); return(IDASPGMR_ILL_INPUT); } idaspgmr_mem->g_dqincfac = dqincfac; return(IDASPGMR_SUCCESS); } int IDASpgmrSetPrecSetupFn(void *ida_mem, IDASpgmrPrecSetupFn pset) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; idaspgmr_mem->g_pset = pset; return(IDASPGMR_SUCCESS); } int IDASpgmrSetPrecSolveFn(void *ida_mem, IDASpgmrPrecSolveFn psolve) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; idaspgmr_mem->g_psolve = psolve; return(IDASPGMR_SUCCESS); } int IDASpgmrSetPrecData(void *ida_mem, void *prec_data) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; idaspgmr_mem->g_pdata = prec_data; return(IDASPGMR_SUCCESS); } int IDASpgmrSetJacTimesVecFn(void *ida_mem, IDASpgmrJacTimesVecFn jtimes) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; idaspgmr_mem->g_jtimes = jtimes; return(IDASPGMR_SUCCESS); } int IDASpgmrSetJacData(void *ida_mem, void *jac_data) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; idaspgmr_mem->g_jdata = jac_data; return(IDASPGMR_SUCCESS); } int IDASpgmrGetWorkSpace(void *ida_mem, long int *lenrwSG, long int *leniwSG) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; int maxl; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; maxl = idaspgmr_mem->g_maxl; *lenrwSG = lrw1*(maxl + 6) + maxl*(maxl + 4) + 1; *leniwSG = liw1*(maxl + 6); return(IDASPGMR_SUCCESS); } int IDASpgmrGetNumPrecEvals(void *ida_mem, long int *npevals) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *npevals = npe; return(IDASPGMR_SUCCESS); } int IDASpgmrGetNumPrecSolves(void *ida_mem, long int *npsolves) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *npsolves = nps; return(IDASPGMR_SUCCESS); } int IDASpgmrGetNumLinIters(void *ida_mem, long int *nliters) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *nliters = nli; return(IDASPGMR_SUCCESS); } int IDASpgmrGetNumConvFails(void *ida_mem, long int *nlcfails) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *nlcfails = ncfl; return(IDASPGMR_SUCCESS); } int IDASpgmrGetNumJtimesEvals(void *ida_mem, long int *njvevals) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *njvevals = njtimes; return(IDASPGMR_SUCCESS); } int IDASpgmrGetNumResEvals(void *ida_mem, long int *nrevalsSG) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *nrevalsSG = nreSG; return(IDASPGMR_SUCCESS); } int IDASpgmrGetLastFlag(void *ida_mem, int *flag) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; /* Return immediately if ida_mem is NULL */ if (ida_mem == NULL) { fprintf(stderr, MSGS_SETGET_IDAMEM_NULL); return(IDASPGMR_MEM_NULL); } IDA_mem = (IDAMem) ida_mem; if (lmem == NULL) { if(errfp!=NULL) fprintf(errfp, MSGS_SETGET_LMEM_NULL); return(IDASPGMR_LMEM_NULL); } idaspgmr_mem = (IDASpgmrMem) lmem; *flag = last_flag; return(IDASPGMR_SUCCESS); } /* * ----------------------------------------------------------------- * IDASPGMR interface routines * ----------------------------------------------------------------- */ /* Additional readability Replacements */ #define gstype (idaspgmr_mem->g_gstype) #define maxl (idaspgmr_mem->g_maxl) #define maxrs (idaspgmr_mem->g_maxrs) #define eplifac (idaspgmr_mem->g_eplifac) #define dqincfac (idaspgmr_mem->g_dqincfac) #define psolve (idaspgmr_mem->g_psolve) #define pset (idaspgmr_mem->g_pset) #define pdata (idaspgmr_mem->g_pdata) #define jtimes (idaspgmr_mem->g_jtimes) #define jdata (idaspgmr_mem->g_jdata) static int IDASpgmrInit(IDAMem IDA_mem) { IDASpgmrMem idaspgmr_mem; idaspgmr_mem = (IDASpgmrMem) lmem; /* Initialize counters */ npe = nli = nps = ncfl = 0; njtimes = nreSG = 0; /* Set setupNonNull to TRUE iff there is preconditioning with setup */ setupNonNull = (psolve != NULL) && (pset != NULL); /* If jtimes is NULL at this time, set it to DQ */ if (jtimes == NULL) { jtimes = IDASpgmrDQJtimes; jdata = IDA_mem; } last_flag = IDASPGMR_SUCCESS; return(0); } static int IDASpgmrSetup(IDAMem IDA_mem, N_Vector yy_p, N_Vector yp_p, N_Vector rr_p, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { int retval; IDASpgmrMem idaspgmr_mem; idaspgmr_mem = (IDASpgmrMem) lmem; /* Call user setup routine pset and update counter npe. */ retval = pset(tn, yy_p, yp_p, rr_p, cj, pdata, tmp1, tmp2, tmp3); npe++; last_flag = retval; /* Return flag showing success or failure of pset. */ if (retval < 0) return(-1); if (retval > 0) return(+1); return(0); } /* * The x-scaling and b-scaling arrays are both equal to weight. * * We set the initial guess, x = 0, then call SpgmrSolve. * We copy the solution x into b, and update the counters nli, nps, ncfl. * If SpgmrSolve returned nli_inc = 0 (hence x = 0), we take the SPGMR * vtemp vector (= P_inverse F) as the correction vector instead. * Finally, we set the return value according to the success of SpgmrSolve. */ static int IDASpgmrSolve(IDAMem IDA_mem, N_Vector bb, N_Vector weight, N_Vector yy_now, N_Vector yp_now, N_Vector rr_now) { IDASpgmrMem idaspgmr_mem; int pretype, nli_inc, nps_inc, retval; realtype res_norm; idaspgmr_mem = (IDASpgmrMem) lmem; /* Set SpgmrSolve convergence test constant epslin, in terms of the Newton convergence test constant epsNewt and safety factors. The factor sqrt(Neq) assures that the GMRES convergence test is applied to the WRMS norm of the residual vector, rather than the weighted L2 norm. */ epslin = sqrtN*eplifac*epsNewt; /* Set vectors ycur, ypcur, and rcur for use by the Atimes and Psolve */ ycur = yy_now; ypcur = yp_now; rcur = rr_now; /* Set SpgmrSolve inputs pretype and initial guess xx = 0. */ pretype = (psolve == NULL) ? PREC_NONE : PREC_LEFT; N_VConst(ZERO, xx); /* Call SpgmrSolve and copy xx to bb. */ retval = SpgmrSolve(spgmr_mem, IDA_mem, xx, bb, pretype, gstype, epslin, maxrs, IDA_mem, weight, weight, IDASpgmrAtimes, IDASpgmrPSolve, &res_norm, &nli_inc, &nps_inc); last_flag = retval; if (nli_inc == 0) N_VScale(ONE, SPGMR_VTEMP(spgmr_mem), bb); else N_VScale(ONE, xx, bb); /* Increment counters nli, nps, and return if successful. */ nli += nli_inc; nps += nps_inc; if (retval == 0) return(0); /* If not successful, increment ncfl and return appropriate flag. */ ncfl++; if (retval > 0) return(+1); if (retval != -2) return(-1); if (resflag > 0) return(+1); return(-1); } /* * This routine handles performance monitoring specific to the IDASPGMR * linear solver. When perftask = 0, it saves values of various counters. * When perftask = 1, it examines difference quotients in these counters, * and depending on their values, it prints up to three warning messages. * Messages are printed up to a maximum of 10 times. */ static int IDASpgmrPerf(IDAMem IDA_mem, int perftask) { IDASpgmrMem idaspgmr_mem; realtype avdim, rcfn, rcfl; long int nstd, nnid; booleantype lavd, lcfn, lcfl; idaspgmr_mem = (IDASpgmrMem) lmem; if (perftask == 0) { nst0 = nst; nni0 = nni; nli0 = nli; ncfn0 = ncfn; ncfl0 = ncfl; nwarn = 0; return(0); } nstd = nst - nst0; nnid = nni - nni0; if (nstd == 0 || nnid == 0) return(0); avdim = (nli - nli0)/( (realtype) nnid); rcfn = (ncfn - ncfn0)/( (realtype) nstd); rcfl = (ncfl - ncfl0)/( (realtype) nnid); lavd = (avdim > ( (realtype) maxl ) ); lcfn = (rcfn > PT9); lcfl = (rcfl > PT9); if (!(lavd || lcfn || lcfl)) return(0); nwarn++; if (nwarn > 10) return(1); if (lavd) if(errfp!=NULL) fprintf(errfp, MSGS_AVD_WARN, tn, avdim); if (lcfn) if(errfp!=NULL) fprintf(errfp, MSGS_CFN_WARN, tn, rcfn); if (lcfl) if(errfp!=NULL) fprintf(errfp, MSGS_CFL_WARN, tn, rcfl); return(0); } static int IDASpgmrFree(IDAMem IDA_mem) { IDASpgmrMem idaspgmr_mem; idaspgmr_mem = (IDASpgmrMem) lmem; N_VDestroy(ytemp); N_VDestroy(xx); SpgmrFree(spgmr_mem); free(lmem); return(0); } /* * ----------------------------------------------------------------- * IDASPGMR private functions * ----------------------------------------------------------------- */ /* * This routine generates the matrix-vector product z = Jv, where * J is the system Jacobian, by calling either the user provided * routine or the internal DQ routine. */ static int IDASpgmrAtimes(void *ida_mem, N_Vector v, N_Vector z) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; int jtflag; IDA_mem = (IDAMem) ida_mem; idaspgmr_mem = (IDASpgmrMem) lmem; jtflag = jtimes(tn, ycur, ypcur, rcur, v, z, cj, jdata, ytemp, yptemp); njtimes++; return(jtflag); } /* * This routine interfaces between the generic SpgmrSolve routine and * the user's psolve routine. It passes to psolve all required state * information from ida_mem. Its return value is the same as that * returned by psolve. Note that the generic SPGMR solver guarantees * that IDASpgmrPSolve will not be called in the case psolve = NULL. */ static int IDASpgmrPSolve(void *ida_mem, N_Vector r, N_Vector z, int lr) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; int retval; IDA_mem = (IDAMem) ida_mem; idaspgmr_mem = (IDASpgmrMem) lmem; retval = psolve(tn, ycur, ypcur, rcur, r, z, cj, epslin, pdata, ytemp); /* This call is counted in nps within the IDASpgmrSolve routine */ return(retval); } /* * This routine generates the matrix-vector product z = Jv, where * J is the system Jacobian, by using a difference quotient approximation. * The approximation is * Jv = [F(t,y1,yp1) - F(t,y,yp)]/sigma, where * y1 = y + sigma*v, yp1 = yp + cj*sigma*v, * sigma = sqrt(Neq)*dqincfac. * The return value from the call to res is saved in order to set the * return flag from IDASpgmrSolve. */ static int IDASpgmrDQJtimes(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector v, N_Vector Jv, realtype c_j, void *jac_data, N_Vector tmp1, N_Vector tmp2) { IDAMem IDA_mem; IDASpgmrMem idaspgmr_mem; N_Vector y_tmp, yp_tmp; realtype sig, siginv; int ires; /* jac_data is ida_mem */ IDA_mem = (IDAMem) jac_data; idaspgmr_mem = (IDASpgmrMem) lmem; sig = sqrtN*dqincfac; /* Rename tmp1 and tmp2 for readibility */ y_tmp = tmp1; yp_tmp = tmp2; /* Set y_tmp = yy + sig*v, yp_tmp = yp + cj*sig*v. */ N_VLinearSum(sig, v, ONE, yy, ytemp); N_VLinearSum(c_j*sig, v, ONE, yp, yptemp); /* Call res for Jv = F(t, y_tmp, yp_tmp), and return if it failed. */ ires = res(tt, y_tmp, yp_tmp, Jv, rdata); nreSG++; resflag = ires; if (ires != 0) return(ires); /* Set Jv to [Jv - rr]/sig and return. */ siginv = ONE/sig; N_VLinearSum(siginv, Jv, -siginv, rr, Jv); return(0); } neuron-7.5/src/sundials/ida/idaspgmr.h000077500000000000000000000462121323325274500200360ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California * Produced at the Lawrence Livermore National Laboratory * All rights reserved * For details, see sundials/ida/LICENSE * ----------------------------------------------------------------- * This is the header file for the Scaled Preconditioned GMRES * linear solver module, IDASPGMR. * ----------------------------------------------------------------- */ #ifndef _IDASPGMR_H #define _IDASPGMR_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "sundialstypes.h" #include "spgmr.h" #include "nvector.h" /* * ----------------------------------------------------------------- * * Type : IDASpgmrPrecSetupFn *---------------------------------------------------------------- * The optional user-supplied functions PrecSetup and PrecSolve * together must define the left preconditoner matrix P * approximating the system Jacobian matrix * J = dF/dy + c_j*dF/dy' * (where the DAE system is F(t,y,y') = 0), and solve the linear * systems P z = r. PrecSetup is to do any necessary setup * operations, and PrecSolve is to compute the solution of * P z = r. * * The preconditioner setup function PrecSetup is to evaluate and * preprocess any Jacobian-related data needed by the * preconditioner solve function PrecSolve. This might include * forming a crude approximate Jacobian, and performing an LU * factorization on it. This function will not be called in * advance of every call to PrecSolve, but instead will be called * only as often as necessary to achieve convergence within the * Newton iteration. If the PrecSolve function needs no * preparation, the PrecSetup function can be NULL. * * Each call to the PrecSetup function is preceded by a call to * the system function res with the same (t,y,y') arguments. * Thus the PrecSetup function can use any auxiliary data that is * computed and saved by the res function and made accessible * to PrecSetup. * * A preconditioner setup function PrecSetup must have the * prototype given below. Its parameters are as follows: * * tt is the current value of the independent variable t. * * yy is the current value of the dependent variable vector, * namely the predicted value of y(t). * * yp is the current value of the derivative vector y', * namely the predicted value of y'(t). * * rr is the current value of the residual vector F(t,y,y'). * * c_j is the scalar in the system Jacobian, proportional to 1/hh. * * prec_data is a pointer to user preconditioner data - the same as * the pdata parameter passed to IDASpgmr. * * tmp1, tmp2, tmp3 are pointers to vectors of type N_Vector * which can be used by an IDASpgmrPrecSetupFn routine * as temporary storage or work space. * * NOTE: If the user's preconditioner needs other quantities, * they are accessible as follows: hcur (the current stepsize) * and ewt (the error weight vector) are accessible through * IDAGetCurrentStep and IDAGetErrWeights, respectively (see * ida.h). The unit roundoff is available as * UNIT_ROUNDOFF defined in sundialstypes.h * * The IDASpgmrPrecSetupFn should return * 0 if successful, * a positive int if a recoverable error occurred, or * a negative int if a nonrecoverable error occurred. * In the case of a recoverable error return, the integrator will * attempt to recover by reducing the stepsize (which changes cj). * ----------------------------------------------------------------- */ typedef int (*IDASpgmrPrecSetupFn)(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, realtype c_j, void *prec_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); /* * ----------------------------------------------------------------- * * Type : IDASpgmrPrecSolveFn *---------------------------------------------------------------- * The optional user-supplied function PrecSolve must compute a * solution to the linear system P z = r, where P is the left * preconditioner defined by the user. If no preconditioning * is desired, pass NULL for PrecSolve to IDASpgmr. * * A preconditioner solve function PrecSolve must have the * prototype given below. Its parameters are as follows: * * tt is the current value of the independent variable t. * * yy is the current value of the dependent variable vector y. * * yp is the current value of the derivative vector y'. * * rr is the current value of the residual vector F(t,y,y'). * * rvec is the input right-hand side vector r. * * zvec is the computed solution vector z. * * c_j is the scalar in the system Jacobian, proportional to 1/hh. * * delta is an input tolerance for use by PrecSolve if it uses an * iterative method in its solution. In that case, the * the residual vector r - P z of the system should be * made less than delta in weighted L2 norm, i.e., * sqrt [ Sum (Res[i]*ewt[i])^2 ] < delta . * Note: the error weight vector ewt can be obtained * through a call to the routine IDAGetErrWeights. * * prec_data is a pointer to user preconditioner data - the same as * the pdata parameter passed to IDASpgmr. * * tmp is an N_Vector which can be used by the PrecSolve * routine as temporary storage or work space. * * * The IDASpgmrPrecSolveFn should return * 0 if successful, * a positive int if a recoverable error occurred, or * a negative int if a nonrecoverable error occurred. * Following a recoverable error, the integrator will attempt to * recover by updating the preconditioner and/or reducing the * stepsize. * * ----------------------------------------------------------------- */ typedef int (*IDASpgmrPrecSolveFn)(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector rvec, N_Vector zvec, realtype c_j, realtype delta, void *prec_data, N_Vector tmp); /* * ----------------------------------------------------------------- * * Type : IDASpgmrJacTimesVecFn *---------------------------------------------------------------- * The user-supplied function jtimes is to generate the product * J*v for given v, where J is the Jacobian matrix * J = dF/dy + c_j*dF/dy' * or an approximation to it, and v is a given vector. * It should return 0 if successful and a nonzero int otherwise. * * A function jtimes must have the prototype given below. Its * parameters are as follows: * * tt is the current value of the independent variable. * * yy is the current value of the dependent variable vector, * namely the predicted value of y(t). * * yp is the current value of the derivative vector y', * namely the predicted value of y'(t). * * rr is the current value of the residual vector F(t,y,y'). * * v is the N_Vector to be multiplied by J. * * Jv is the output N_Vector containing J*v. * * c_j is the scalar in the system Jacobian, proportional * to 1/hh. * * jac_data is a pointer to user Jacobian data, the same as the * pointer passed to CVSpgmr. * * tmp1, tmp2 are two N_Vectors which can be used by Jtimes for * work space. * * ----------------------------------------------------------------- */ typedef int (*IDASpgmrJacTimesVecFn)(realtype tt, N_Vector yy, N_Vector yp, N_Vector rr, N_Vector v, N_Vector Jv, realtype c_j, void *jac_data, N_Vector tmp1, N_Vector tmp2); /* * ----------------------------------------------------------------- * * Function : IDASpgmr *---------------------------------------------------------------- * A call to the IDASpgmr function links the main integrator with * the IDASPGMR linear solver module. Its parameters are as * follows: * * IDA_mem is the pointer to memory block returned by IDACreate. * * maxl is the maximum Krylov subspace dimension, an * optional input. Pass 0 to use the default value, * MIN(Neq, 5). Otherwise pass a positive integer. * * The return values of IDASpgmr are: * IDASPGMR_SUCCESS if successful * IDASPGMR_MEM_NULL if the ida memory was NULL * IDASPGMR_MEM_FAIL if there was a memory allocation failure * IDASPGMR_ILL_INPUT if there was illegal input. * * ----------------------------------------------------------------- */ int IDASpgmr(void *ida_mem, int maxl); /* * ----------------------------------------------------------------- * Optional inputs to the IDASPGMR linear solver *---------------------------------------------------------------- * * IDASpgmrSetPrecSolveFn specifies the PrecSolve function. * Default is NULL. * IDASpgmrSetPrecSetupFn specifies the PrecSetup function. * Default is NULL. * IDASpgmrSetPrecData specifies a pointer to user preconditioner * data. This pointer is passed to PrecSetup and * PrecSolve every time these routines are called. * Default is NULL. * IDASpgmrSetJacTimesVecFn specifies the jtimes function. * Default is to use an internal finite difference * approximation routine. * IDASpgmrSetJacData specifies a pointer to user Jacobian data. * This pointer is passed to jtimes every time this * routine is called. * Default is NULL. * IDASpgmrSetGSType specifies the type of Gram-Schmidt * orthogonalization to be used. This must be one of * the two enumeration constants MODIFIED_GS or * CLASSICAL_GS defined in iterativ.h. These correspond * to using modified Gram-Schmidt and classical * Gram-Schmidt, respectively. * Default value is MODIFIED_GS. * IDASpgmrSetMaxRestarts specifies the maximum number of restarts * to be used in the GMRES algorithm. maxrs must be a * non-negative integer. Pass 0 to specify no restarts. * Default is 5. * IDASpgmrSetEpsLin specifies the factor in the linear iteration * convergence test constant. * Default is 0.05 * IDASpgmrSetIncrementFactor specifies a factor in the increments * to yy used in the difference quotient approximations * to matrix-vector products Jv. * Default is 1.0 * * The return value of IDASpgmrSet* is one of: * IDASPGMR_SUCCESS if successful * IDASPGMR_MEM_NULL if the ida memory was NULL * IDASPGMR_LMEM_NULL if the idaspgmr memory was NULL * ----------------------------------------------------------------- */ int IDASpgmrSetPrecSolveFn(void *ida_mem, IDASpgmrPrecSolveFn psolve); int IDASpgmrSetPrecSetupFn(void *ida_mem, IDASpgmrPrecSetupFn pset); int IDASpgmrSetPrecData(void *ida_mem, void *prec_data); int IDASpgmrSetJacTimesVecFn(void *ida_mem, IDASpgmrJacTimesVecFn jtimes); int IDASpgmrSetJacData(void *ida_mem, void *jac_data); int IDASpgmrSetGSType(void *ida_mem, int gstype); int IDASpgmrSetMaxRestarts(void *ida_mem, int maxrs); int IDASpgmrSetEpsLin(void *ida_mem, realtype eplifac); int IDASpgmrSetIncrementFactor(void *ida_mem, realtype dqincfac); /* * ----------------------------------------------------------------- * Optional outputs from the IDASPGMR linear solver *---------------------------------------------------------------- * * IDASpgmrGetWorkSpace returns the real and integer workspace used * by IDASPGMR. * IDASpgmrGetNumPrecEvals returns the number of preconditioner * evaluations, i.e. the number of calls made to PrecSetup * with jok==FALSE. * IDASpgmrGetNumPrecSolves returns the number of calls made to * PrecSolve. * IDASpgmrGetNumLinIters returns the number of linear iterations. * IDASpgmrGetNumConvFails returns the number of linear * convergence failures. * IDASpgmrGetNumJtimesEvals returns the number of calls to jtimes * IDASpgmrGetNumResEvals returns the number of calls to the user * res routine due to finite difference Jacobian times vector * evaluation. * IDASpgmrGetLastFlag returns the last error flag set by any of * the IDASPGMR interface functions. * * The return value of IDASpgmrGet* is one of: * IDASPGMR_SUCCESS if successful * IDASPGMR_MEM_NULL if the ida memory was NULL * IDASPGMR_LMEM_NULL if the idaspgmr memory was NULL * ----------------------------------------------------------------- */ int IDASpgmrGetWorkSpace(void *ida_mem, long int *lenrwSG, long int *leniwSG); int IDASpgmrGetNumPrecEvals(void *ida_mem, long int *npevals); int IDASpgmrGetNumPrecSolves(void *ida_mem, long int *npsolves); int IDASpgmrGetNumLinIters(void *ida_mem, long int *nliters); int IDASpgmrGetNumConvFails(void *ida_mem, long int *nlcfails); int IDASpgmrGetNumJtimesEvals(void *ida_mem, long int *njvevals); int IDASpgmrGetNumResEvals(void *ida_mem, long int *nrevalsSG); int IDASpgmrGetLastFlag(void *ida_mem, int *flag); /* IDASPGMR return values */ #define IDASPGMR_SUCCESS 0 #define IDASPGMR_MEM_NULL -1 #define IDASPGMR_LMEM_NULL -2 #define IDASPGMR_ILL_INPUT -3 #define IDASPGMR_MEM_FAIL -4 #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/ida/idaspgmr_impl.h000077500000000000000000000147141323325274500210610ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmers: Alan C. Hindmarsh and Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/idas/LICENSE. * ----------------------------------------------------------------- * This is the header file (private version) for the Scaled * Preconditioned GMRES linear solver module, IDASPGMR. * ----------------------------------------------------------------- */ #ifndef _IDASPGMR_IMPL_H #define _IDASPGMR_IMPL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #include "idaspgmr.h" #include "spgmr.h" #include "iterative.h" #include "sundialstypes.h" #include "nvector.h" /* * ----------------------------------------------------------------- * Types : IDASpgmrMemRec, IDASpgmrMem * ----------------------------------------------------------------- */ typedef struct { int g_gstype; /* type of Gram-Schmidt orthogonalization */ realtype g_sqrtN; /* sqrt(N) */ int g_maxl; /* maxl = maximum dimension of the Krylov space */ int g_maxrs; /* maxrs = max. number of GMRES restarts */ realtype g_eplifac; /* eplifac = linear convergence factor */ realtype g_dqincfac; /* dqincfac = optional increment factor in Jv */ realtype g_epslin; /* SpgrmSolve tolerance parameter */ int g_resflag; /* flag from last res call */ long int g_npe; /* npe = total number of precond calls */ long int g_nli; /* nli = total number of linear iterations */ long int g_nps; /* nps = total number of psolve calls */ long int g_ncfl; /* ncfl = total number of convergence failures */ long int g_nreSG; /* nreSG = total number of calls to res */ long int g_njtimes; /* njtimes = total number of calls to jtimes */ long int g_nst0; /* nst0 = saved nst (for performance monitor) */ long int g_nni0; /* nni0 = saved nni (for performance monitor) */ long int g_nli0; /* nli0 = saved nli (for performance monitor) */ long int g_ncfn0; /* ncfn0 = saved ncfn (for performance monitor) */ long int g_ncfl0; /* ncfl0 = saved ncfl (for performance monitor) */ long int g_nwarn; /* nwarn = no. of warnings (for perf. monitor) */ N_Vector g_ytemp; /* temp vector used by IDAAtimesDQ */ N_Vector g_yptemp; /* temp vector used by IDAAtimesDQ */ N_Vector g_xx; /* temp vector used by IDASpgmrSolve */ N_Vector g_ycur; /* current y vector in Newton iteration */ N_Vector g_ypcur; /* current yp vector in Newton iteration */ N_Vector g_rcur; /* rcur = F(tn, ycur, ypcur) */ IDASpgmrPrecSetupFn g_pset; /* pset = user-supplied routine */ /* to compute a preconditioner */ IDASpgmrPrecSolveFn g_psolve; /* psolve = user-supplied routine to */ /* solve preconditioner linear system*/ void *g_pdata; /* pdata passed to psolve and precond*/ SpgmrMem g_spgmr_mem; /* spgmr_mem is memory used by the */ /* generic Spgmr solver */ IDASpgmrJacTimesVecFn g_jtimes; /* Jacobian*vector routine */ void *g_jdata; /* data passed to Jtimes */ int g_last_flag; /* last error return flag */ } IDASpgmrMemRec, *IDASpgmrMem; /* * ----------------------------------------------------------------- * Error and Warning Messages * ----------------------------------------------------------------- */ #if defined(SUNDIALS_EXTENDED_PRECISION) #define MSGS_TIME "at t = %Lg, " #elif defined(SUNDIALS_DOUBLE_PRECISION) #define MSGS_TIME "at t = %lg, " #else #define MSGS_TIME "at t = %g, " #endif /* Error Messages */ #define MSGS_IDAMEM_NULL "IDASpgmr-- integrator memory is NULL.\n\n" #define MSGS_MEM_FAIL "IDASpgmr-- a memory request failed.\n\n" #define MSGS_BAD_NVECTOR "IDASpgmr-- a required vector operation is not implemented.\n\n" #define MSGS_SETGET_IDAMEM_NULL "IDASpgmrSet*/IDASpgmrGet*-- integrator memory is NULL. \n\n" #define MSGS_SETGET_LMEM_NULL "IDASpgmrSet*/IDASpgmrGet*-- IDASPGMR memory is NULL. \n\n" #define MSGS_BAD_GSTYPE "IDASpgmrSetGSType-- gstype has an illegal value.\n" #define MSGS_IDAS_NEG_MAXRS "IDASpgmrSetMaxRestarts-- maxrs < 0 illegal. \n\n" #define MSGS_IDAS_NEG_EPLIFAC "IDASpgmrSetEpsLin-- eplifac < 0.0 illegal. \n\n" #define MSGS_IDAS_NEG_DQINCFAC "IDASpgmrSetIncrementFactor-- dqincfac < 0.0 illegal. \n\n" /* Warning Messages */ #define MSGS_WARN1 "Warning. Poor iterative algorithm performance\n" #define MSGS_WARN "IDASpgmrPerf-- " MSGS_TIME MSGS_WARN1 #if defined(SUNDIALS_EXTENDED_PRECISION) #define MSGS_AVD_WARN1 "Average number of linear iterations is %Le.\n\n" #define MSGS_AVD_WARN MSGS_WARN MSGS_AVD_WARN1 #define MSGS_CFN_WARN1 "Nonlinear convergence failure rate is %Le.\n\n" #define MSGS_CFN_WARN MSGS_WARN MSGS_CFN_WARN1 #define MSGS_CFL_WARN1 "Linear convergence failure rate is %Le.\n\n" #define MSGS_CFL_WARN MSGS_WARN MSGS_CFL_WARN1 #elif defined(SUNDIALS_DOUBLE_PRECISION) #define MSGS_AVD_WARN1 "Average number of linear iterations is %le.\n\n" #define MSGS_AVD_WARN MSGS_WARN MSGS_AVD_WARN1 #define MSGS_CFN_WARN1 "Nonlinear convergence failure rate is %le.\n\n" #define MSGS_CFN_WARN MSGS_WARN MSGS_CFN_WARN1 #define MSGS_CFL_WARN1 "Linear convergence failure rate is %le.\n\n" #define MSGS_CFL_WARN MSGS_WARN MSGS_CFL_WARN1 #else #define MSGS_AVD_WARN1 "Average number of linear iterations is %e.\n\n" #define MSGS_AVD_WARN MSGS_WARN MSGS_AVD_WARN1 #define MSGS_CFN_WARN1 "Nonlinear convergence failure rate is %e.\n\n" #define MSGS_CFN_WARN MSGS_WARN MSGS_CFN_WARN1 #define MSGS_CFL_WARN1 "Linear convergence failure rate is %e.\n\n" #define MSGS_CFL_WARN MSGS_WARN MSGS_CFL_WARN1 #endif #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/000077500000000000000000000000001323325274500165605ustar00rootroot00000000000000neuron-7.5/src/sundials/shared/Makefile.am000077500000000000000000000011511323325274500206150ustar00rootroot00000000000000noinst_LTLIBRARIES = libshared.la PARSRC = nvector_parallel.c PARINC = nvector_parallel.h if BUILD_PARANEURON PARSRC1 = $(PARSRC) PARINC1 = $(PARINC) else PARSRC1 = PARINC1 = EXTRA_DIST = $(PARSRC) $(PARINC) endif if BUILD_NRNMPI_DYNAMIC includes = -I$(top_srcdir)/src/nrnmpi else includes = endif AM_CFLAGS = @MINGW_CFLAG@ $(includes) libshared_la_SOURCES = band.c dense.c iterative.c \ nvector.c nvector_serial.c smalldense.c spgmr.c sundialsmath.c \ $(PARSRC1) noinst_HEADERS = band.h dense.h iterative.h \ nvector.h nvector_serial.h smalldense.h spgmr.h \ sundialsmath.h sundialstypes.h \ $(PARINC1) neuron-7.5/src/sundials/shared/Makefile.in000066400000000000000000000560261323325274500206360ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/sundials/shared ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libshared_la_LIBADD = am__libshared_la_SOURCES_DIST = band.c dense.c iterative.c nvector.c \ nvector_serial.c smalldense.c spgmr.c sundialsmath.c \ nvector_parallel.c am__objects_1 = nvector_parallel.lo @BUILD_PARANEURON_TRUE@am__objects_2 = $(am__objects_1) am_libshared_la_OBJECTS = band.lo dense.lo iterative.lo nvector.lo \ nvector_serial.lo smalldense.lo spgmr.lo sundialsmath.lo \ $(am__objects_2) libshared_la_OBJECTS = $(am_libshared_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libshared_la_SOURCES) DIST_SOURCES = $(am__libshared_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__noinst_HEADERS_DIST = band.h dense.h iterative.h nvector.h \ nvector_serial.h smalldense.h spgmr.h sundialsmath.h \ sundialstypes.h nvector_parallel.h HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ noinst_LTLIBRARIES = libshared.la PARSRC = nvector_parallel.c PARINC = nvector_parallel.h @BUILD_PARANEURON_FALSE@PARSRC1 = @BUILD_PARANEURON_TRUE@PARSRC1 = $(PARSRC) @BUILD_PARANEURON_FALSE@PARINC1 = @BUILD_PARANEURON_TRUE@PARINC1 = $(PARINC) @BUILD_PARANEURON_FALSE@EXTRA_DIST = $(PARSRC) $(PARINC) @BUILD_NRNMPI_DYNAMIC_FALSE@includes = @BUILD_NRNMPI_DYNAMIC_TRUE@includes = -I$(top_srcdir)/src/nrnmpi AM_CFLAGS = @MINGW_CFLAG@ $(includes) libshared_la_SOURCES = band.c dense.c iterative.c \ nvector.c nvector_serial.c smalldense.c spgmr.c sundialsmath.c \ $(PARSRC1) noinst_HEADERS = band.h dense.h iterative.h \ nvector.h nvector_serial.h smalldense.h spgmr.h \ sundialsmath.h sundialstypes.h \ $(PARINC1) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sundials/shared/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sundials/shared/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libshared.la: $(libshared_la_OBJECTS) $(libshared_la_DEPENDENCIES) $(EXTRA_libshared_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libshared_la_OBJECTS) $(libshared_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/band.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dense.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterative.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector_parallel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvector_serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smalldense.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spgmr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sundialsmath.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/sundials/shared/band.c000077500000000000000000000200061323325274500176310ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a generic BAND linear * solver package. * ----------------------------------------------------------------- */ #include #include #include "band.h" #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define ROW(i,j,smu) (i-j+smu) /* Implementation */ BandMat BandAllocMat(long int N, long int mu, long int ml, long int smu) { BandMat A; if (N <= 0) return(NULL); A = (BandMat) malloc(sizeof *A); if (A == NULL) return (NULL); A->data = bandalloc(N, smu, ml); if (A->data == NULL) { free(A); return(NULL); } A->size = N; A->mu = mu; A->ml = ml; A->smu = smu; return(A); } long int *BandAllocPiv(long int N) { if (N <= 0) return(NULL); return((long int *) malloc(N * sizeof(long int))); } long int BandFactor(BandMat A, long int *p) { return(gbfa(A->data, A->size, A->mu, A->ml, A->smu, p)); } void BandBacksolve(BandMat A, long int *p, realtype *b) { gbsl(A->data, A->size, A->smu, A->ml, p, b); } void BandZero(BandMat A) { bandzero(A->data, A->size, A->mu, A->ml, A->smu); } void BandCopy(BandMat A, BandMat B, long int copymu, long int copyml) { bandcopy(A->data, B->data, A->size, A->smu, B->smu, copymu, copyml); } void BandScale(realtype c, BandMat A) { bandscale(c, A->data, A->size, A->mu, A->ml, A->smu); } void BandAddI(BandMat A) { bandaddI(A->data, A->size, A->smu); } void BandFreeMat(BandMat A) { bandfree(A->data); free(A); } void BandFreePiv(long int *p) { free(p); } void BandPrint(BandMat A) { bandprint(A->data, A->size, A->mu, A->ml, A->smu); } realtype **bandalloc(long int n, long int smu, long int ml) { realtype **a; long int j, colSize; if (n <= 0) return(NULL); a = (realtype **) malloc(n * sizeof(realtype *)); if (a == NULL) return(NULL); colSize = smu + ml + 1; a[0] = (realtype *) malloc(n * colSize * sizeof(realtype)); if (a[0] == NULL) { free(a); return(NULL); } for (j=1; j < n; j++) a[j] = a[0] + j * colSize; return(a); } long int *bandallocpiv(long int n) { if (n <= 0) return(NULL); return((long int *) malloc(n * sizeof(long int))); } long int gbfa(realtype **a, long int n, long int mu, long int ml, long int smu, long int *p) { long int c, r, num_rows; long int i, j, k, l, storage_l, storage_k, last_col_k, last_row_k; realtype *a_c, *col_k, *diag_k, *sub_diag_k, *col_j, *kptr, *jptr; realtype max, temp, mult, a_kj; booleantype swap; /* zero out the first smu - mu rows of the rectangular array a */ num_rows = smu - mu; if (num_rows > 0) { for (c=0; c < n; c++) { a_c = a[c]; for (r=0; r < num_rows; r++) { a_c[r] = ZERO; } } } /* k = elimination step number */ for (k=0; k < n-1; k++, p++) { col_k = a[k]; diag_k = col_k + smu; sub_diag_k = diag_k + 1; last_row_k = MIN(n-1,k+ml); /* find l = pivot row number */ l=k; max = ABS(*diag_k); for (i=k+1, kptr=sub_diag_k; i <= last_row_k; i++, kptr++) { if (ABS(*kptr) > max) { l=i; max = ABS(*kptr); } } storage_l = ROW(l, k, smu); *p = l; /* check for zero pivot element */ if (col_k[storage_l] == ZERO) return(k+1); /* swap a(l,k) and a(k,k) if necessary */ if ( (swap = (l != k) )) { temp = col_k[storage_l]; col_k[storage_l] = *diag_k; *diag_k = temp; } /* Scale the elements below the diagonal in */ /* column k by -1.0 / a(k,k). After the above swap, */ /* a(k,k) holds the pivot element. This scaling */ /* stores the pivot row multipliers -a(i,k)/a(k,k) */ /* in a(i,k), i=k+1, ..., MIN(n-1,k+ml). */ mult = -ONE / (*diag_k); for (i=k+1, kptr = sub_diag_k; i <= last_row_k; i++, kptr++) (*kptr) *= mult; /* row_i = row_i - [a(i,k)/a(k,k)] row_k, i=k+1, ..., MIN(n-1,k+ml) */ /* row k is the pivot row after swapping with row l. */ /* The computation is done one column at a time, */ /* column j=k+1, ..., MIN(k+smu,n-1). */ last_col_k = MIN(k+smu,n-1); for (j=k+1; j <= last_col_k; j++) { col_j = a[j]; storage_l = ROW(l,j,smu); storage_k = ROW(k,j,smu); a_kj = col_j[storage_l]; /* Swap the elements a(k,j) and a(k,l) if l!=k. */ if (swap) { col_j[storage_l] = col_j[storage_k]; col_j[storage_k] = a_kj; } /* a(i,j) = a(i,j) - [a(i,k)/a(k,k)]*a(k,j) */ /* a_kj = a(k,j), *kptr = - a(i,k)/a(k,k), *jptr = a(i,j) */ if (a_kj != ZERO) { for (i=k+1, kptr=sub_diag_k, jptr=col_j+ROW(k+1,j,smu); i <= last_row_k; i++, kptr++, jptr++) (*jptr) += a_kj * (*kptr); } } } /* set the last pivot row to be n-1 and check for a zero pivot */ *p = n-1; if (a[n-1][smu] == ZERO) return(n); /* return 0 to indicate success */ return(0); } void gbsl(realtype **a, long int n, long int smu, long int ml, long int *p, realtype *b) { long int k, l, i, first_row_k, last_row_k; realtype mult, *diag_k; /* Solve Ly = Pb, store solution y in b */ for (k=0; k < n-1; k++) { l = p[k]; mult = b[l]; if (l != k) { b[l] = b[k]; b[k] = mult; } diag_k = a[k]+smu; last_row_k = MIN(n-1,k+ml); for (i=k+1; i <= last_row_k; i++) b[i] += mult * diag_k[i-k]; } /* Solve Ux = y, store solution x in b */ for (k=n-1; k >= 0; k--) { diag_k = a[k]+smu; first_row_k = MAX(0,k-smu); b[k] /= (*diag_k); mult = -b[k]; for (i=first_row_k; i <= k-1; i++) b[i] += mult*diag_k[i-k]; } } void bandzero(realtype **a, long int n, long int mu, long int ml, long int smu) { long int i, j, colSize; realtype *col_j; colSize = mu + ml + 1; for (j=0; j < n; j++) { col_j = a[j]+smu-mu; for (i=0; i < colSize; i++) col_j[i] = ZERO; } } void bandcopy(realtype **a, realtype **b, long int n, long int a_smu, long int b_smu, long int copymu, long int copyml) { long int i, j, copySize; realtype *a_col_j, *b_col_j; copySize = copymu + copyml + 1; for (j=0; j < n; j++) { a_col_j = a[j]+a_smu-copymu; b_col_j = b[j]+b_smu-copymu; for (i=0; i < copySize; i++) b_col_j[i] = a_col_j[i]; } } void bandscale(realtype c, realtype **a, long int n, long int mu, long int ml, long int smu) { long int i, j, colSize; realtype *col_j; colSize = mu + ml + 1; for(j=0; j < n; j++) { col_j = a[j]+smu-mu; for (i=0; i < colSize; i++) col_j[i] *= c; } } void bandaddI(realtype **a, long int n, long int smu) { long int j; for(j=0; j < n; j++) a[j][smu] += ONE; } void bandfreepiv(long int *p) { free(p); } void bandfree(realtype **a) { free(a[0]); free(a); } void bandprint(realtype **a, long int n, long int mu, long int ml, long int smu) { long int i, j, start, finish; printf("\n"); for (i=0; i < n; i++) { start = MAX(0,i-ml); finish = MIN(n-1,i+mu); for (j=0; j < start; j++) printf("%10s",""); for (j=start; j <= finish; j++) { #if defined(SUNDIALS_EXTENDED_PRECISION) printf("%10Lg", a[j][i-j+smu]); #elif defined(SUNDIALS_DOUBLE_PRECISION) printf("%10lg", a[j][i-j+smu]); #else printf("%10g", a[j][i-j+smu]); #endif } printf("\n"); } printf("\n"); } neuron-7.5/src/sundials/shared/band.h000077500000000000000000000615141323325274500176470ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for a generic BAND linear solver * package. There are two sets of band solver routines listed in * this file: one set uses type BandMat defined below and the * other set uses the type realtype ** for band matrix arguments. * The two sets of band solver routines make it easy to work * with two types of band matrices: * * (1) The BandMat type is intended for use with large * band matrices whose elements/columns may be stored in * non-contiguous memory locations or even distributed across * different process memory spaces. This type may be modified * to include such distribution information. If this is done, * then all the routines that use BandMat must be modified to * reflect the new data structure. * * (2) The set of routines that use realtype ** (and NOT the * BandMat type) is intended for use with small matrices * which can easily be allocated within a contiguous block of * memory for a single process. * * Routines that work with the type BandMat begin with "Band". * The BandAllocMat function allocates a band matrix for use in * the other matrix routines listed in this file. Matrix storage * details are given in the documentation for the type BandMat. * The BandAllocPiv function allocates memory for pivot * information. The storage allocated by BandAllocMat and * BandAllocPiv is deallocated by the routines BandFreeMat and * BandFreePiv, respectively. The BandFactor and BandBacksolve * routines perform the actual solution of a band linear system. * * Routines that work with realtype ** begin with "band" (except * for the factor and solve routines which are called gbfa and * gbsl, respectively). The underlying matrix storage is * described in the documentation for bandalloc. * ----------------------------------------------------------------- */ #ifndef _BAND_H #define _BAND_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Type: BandMat * ----------------------------------------------------------------- * The type BandMat is the type of a large (possibly distributed) * band matrix. It is defined to be a pointer to a structure * with the following fields: * * size is the number of columns (== number of rows) * * mu is the upper bandwidth, 0 <= mu <= size-1 * * ml is the lower bandwidth, 0 <= ml <= size-1 * * smu is the storage upper bandwidth, mu <= smu <= size-1. * The BandFactor routine writes the LU factors * into the storage for A. The upper triangular factor U, * however, may have an upper bandwidth as big as * MIN(size-1,mu+ml) because of partial pivoting. The smu * field holds the upper bandwidth allocated for A. * * data is a two dimensional array used for component storage. * The elements of a band matrix of type BandMat are * stored columnwise (i.e. columns are stored one on top * of the other in memory). Only elements within the * specified bandwidths are stored. * * If we number rows and columns in the band matrix starting * from 0, then * * data[0] is a pointer to (smu+ml+1)*size contiguous locations * which hold the elements within the band of A * * data[j] is a pointer to the uppermost element within the band * in the jth column. This pointer may be treated as * an array indexed from smu-mu (to access the * uppermost element within the band in the jth * column) to smu+ml (to access the lowest element * within the band in the jth column). (Indices from 0 * to smu-mu-1 give access to extra storage elements * required by BandFactor.) * * data[j][i-j+smu] is the (i,j)th element, j-mu <= i <= j+ml. * * The macros below allow a user to access individual matrix * elements without writing out explicit data structure * references and without knowing too much about the underlying * element storage. The only storage assumption needed is that * elements are stored columnwise and that a pointer into the jth * column of elements can be obtained via the BAND_COL macro. The * BAND_COL_ELEM macro selects an element from a column which has * already been isolated via BAND_COL. BAND_COL_ELEM allows the * user to avoid the translation from the matrix location (i,j) * to the index in the array returned by BAND_COL at which the * (i,j)th element is stored. See the documentation for BAND_COL * and BAND_COL_ELEM for usage details. Users should use these * macros whenever possible. * ----------------------------------------------------------------- */ typedef struct _BandMat { long int size; long int mu, ml, smu; realtype **data; } *BandMat; /* BandMat accessor macros */ /* * ----------------------------------------------------------------- * Macro : BAND_ELEM * ----------------------------------------------------------------- * Usage : BAND_ELEM(A,i,j) = a_ij; OR * a_ij = BAND_ELEM(A,i,j); * ----------------------------------------------------------------- * BAND_ELEM(A,i,j) references the (i,j)th element of the * N by N band matrix A, where 0 <= i,j <= N-1. The location * (i,j) should further satisfy j-(A->mu) <= i <= j+(A->ml). * ----------------------------------------------------------------- */ #define BAND_ELEM(A,i,j) ((A->data)[j][i-j+(A->smu)]) /* * ----------------------------------------------------------------- * Macro : BAND_COL * ----------------------------------------------------------------- * Usage : col_j = BAND_COL(A,j); * ----------------------------------------------------------------- * BAND_COL(A,j) references the diagonal element of the jth * column of the N by N band matrix A, 0 <= j <= N-1. The type of * the expression BAND_COL(A,j) is realtype *. The pointer * returned by the call BAND_COL(A,j) can be treated as an array * which is indexed from -(A->mu) to (A->ml). * ----------------------------------------------------------------- */ #define BAND_COL(A,j) (((A->data)[j])+(A->smu)) /* * ----------------------------------------------------------------- * Macro : BAND_COL_ELEM * ----------------------------------------------------------------- * Usage : col_j = BAND_COL(A,j); * BAND_COL_ELEM(col_j,i,j) = a_ij; OR * a_ij = BAND_COL_ELEM(col_j,i,j); * ----------------------------------------------------------------- * This macro references the (i,j)th entry of the band matrix A * when used in conjunction with BAND_COL as shown above. The * index (i,j) should satisfy j-(A->mu) <= i <= j+(A->ml). * ----------------------------------------------------------------- */ #define BAND_COL_ELEM(col_j,i,j) (col_j[i-j]) /* Functions that use the BandMat representation for a band matrix */ /* * ----------------------------------------------------------------- * Function : BandAllocMat * ----------------------------------------------------------------- * Usage : A = BandAllocMat(N, mu, ml, smu); * if (A == NULL) ... memory request failed * ----------------------------------------------------------------- * BandAllocMat allocates memory for an N by N band matrix with * upper bandwidth mu, lower bandwidth ml, and storage upper * bandwidth smu. Pass smu as follows depending on whether A will * be factored by BandFactor: * * (1) Pass smu = mu if A will not be factored. * * (2) Pass smu = MIN(N-1,mu+ml) if A will be factored. * * BandAllocMat returns the storage allocated (type BandMat) or * NULL if the request for matrix storage cannot be satisfied. * See the documentation for the type BandMat for matrix storage * details. * ----------------------------------------------------------------- */ BandMat BandAllocMat(long int N, long int mu, long int ml, long int smu); /* * ----------------------------------------------------------------- * Function : BandAllocPiv * ----------------------------------------------------------------- * Usage : p = BandAllocPiv(N); * if (p == NULL) ... memory request failed * ----------------------------------------------------------------- * BandAllocPiv allocates memory for pivot information to be * filled in by the BandFactor routine during the factorization * of an N by N band matrix. The underlying type for pivot * information is an array of N integers and this routine returns * the pointer to the memory it allocates. If the request for * pivot storage cannot be satisfied, BandAllocPiv returns NULL. * ----------------------------------------------------------------- */ long int *BandAllocPiv(long int N); /* * ----------------------------------------------------------------- * Function : BandFactor * ----------------------------------------------------------------- * Usage : ier = BandFactor(A, p); * if (ier != 0) ... A is singular * ----------------------------------------------------------------- * BandFactor performs the LU factorization of the N by N band * matrix A. This is done using standard Gaussian elimination * with partial pivoting. * * A successful LU factorization leaves the "matrix" A and the * pivot array p with the following information: * * (1) p[k] contains the row number of the pivot element chosen * at the beginning of elimination step k, k=0, 1, ..., N-1. * * (2) If the unique LU factorization of A is given by PA = LU, * where P is a permutation matrix, L is a lower triangular * matrix with all 1's on the diagonal, and U is an upper * triangular matrix, then the upper triangular part of A * (including its diagonal) contains U and the strictly lower * triangular part of A contains the multipliers, I-L. * * BandFactor returns 0 if successful. Otherwise it encountered * a zero diagonal element during the factorization. In this case * it returns the column index (numbered from one) at which * it encountered the zero. * * Important Note: A must be allocated to accommodate the increase * in upper bandwidth that occurs during factorization. If * mathematically, A is a band matrix with upper bandwidth mu and * lower bandwidth ml, then the upper triangular factor U can * have upper bandwidth as big as smu = MIN(n-1,mu+ml). The lower * triangular factor L has lower bandwidth ml. Allocate A with * call A = BandAllocMat(N,mu,ml,smu), where mu, ml, and smu are * as defined above. The user does not have to zero the "extra" * storage allocated for the purpose of factorization. This will * handled by the BandFactor routine. * ----------------------------------------------------------------- */ long int BandFactor(BandMat A, long int *p); /* * ----------------------------------------------------------------- * Function : BandBacksolve * ----------------------------------------------------------------- * Usage : BandBacksolve(A, p, b); * ----------------------------------------------------------------- * BandBacksolve solves the N-dimensional system A x = b using * the LU factorization in A and the pivot information in p * computed in BandFactor. The solution x is returned in b. This * routine cannot fail if the corresponding call to BandFactor * did not fail. * ----------------------------------------------------------------- */ void BandBacksolve(BandMat A, long int *p, realtype *b); /* * ----------------------------------------------------------------- * Function : BandZero * ----------------------------------------------------------------- * Usage : BandZero(A); * ----------------------------------------------------------------- * A(i,j) <- 0.0, j-(A->mu) <= i <= j+(A->ml). * ----------------------------------------------------------------- */ void BandZero(BandMat A); /* * ----------------------------------------------------------------- * Function : BandCopy * ----------------------------------------------------------------- * Usage : BandCopy(A, B, copymu, copyml); * ----------------------------------------------------------------- * BandCopy copies the submatrix with upper and lower bandwidths * copymu, copyml of the N by N band matrix A into the N by N * band matrix B. * ----------------------------------------------------------------- */ void BandCopy(BandMat A, BandMat B, long int copymu, long int copyml); /* * ----------------------------------------------------------------- * Function: BandScale * ----------------------------------------------------------------- * Usage : BandScale(c, A); * ----------------------------------------------------------------- * A(i,j) <- c*A(i,j), j-(A->mu) <= i <= j+(A->ml). * ----------------------------------------------------------------- */ void BandScale(realtype c, BandMat A); /* * ----------------------------------------------------------------- * Function : BandAddI * ----------------------------------------------------------------- * Usage : BandAddI(A); * ----------------------------------------------------------------- * A(j,j) <- A(j,j)+1.0, 0 <= j <= (A->size)-1. * ----------------------------------------------------------------- */ void BandAddI(BandMat A); /* * ----------------------------------------------------------------- * Function : BandFreeMat * ----------------------------------------------------------------- * Usage : BandFreeMat(A); * ----------------------------------------------------------------- * BandFreeMat frees the memory allocated by BandAllocMat for * the band matrix A. * ----------------------------------------------------------------- */ void BandFreeMat(BandMat A); /* * ----------------------------------------------------------------- * Function : BandFreePiv * ----------------------------------------------------------------- * Usage : BandFreePiv(p); * ----------------------------------------------------------------- * BandFreePiv frees the memory allocated by BandAllocPiv for * the pivot information array p. * ----------------------------------------------------------------- */ void BandFreePiv(long int *p); /* * ----------------------------------------------------------------- * Function : BandPrint * ----------------------------------------------------------------- * Usage : BandPrint(A); * ----------------------------------------------------------------- * This routine prints the N by N band matrix A (upper and lower * bandwidths A->mu and A->ml, respectively) to standard output * as it would normally appear on paper. It is intended as a * debugging tool with small values of N. The elements are * printed using the %g/lg/Lg option. A blank line is printed * before and after the matrix. * ----------------------------------------------------------------- */ void BandPrint(BandMat A); /* Functions that use the realtype ** representation for a band matrix */ /* * ----------------------------------------------------------------- * Function : bandalloc * ----------------------------------------------------------------- * Usage : realtype **a; * a = bandalloc(n, smu, ml); * if (a == NULL) ... memory request failed * ----------------------------------------------------------------- * bandalloc(n, smu, ml) allocates storage for an n by n band * matrix A with storage upper bandwidth smu and lower bandwidth * ml. It returns a pointer to the newly allocated storage if * successful. If the memory request cannot be satisfied, then * bandalloc returns NULL. If, mathematically, A has upper and * lower bandwidths mu and ml, respectively, then the value * passed to bandalloc for smu may need to be greater than mu. * The gbfa routine writes the LU factors into the storage (named * "a" in the above usage documentation) for A (thus destroying * the original elements of A). The upper triangular factor U, * however, may have a larger upper bandwidth than the upper * bandwidth mu of A. Thus some "extra" storage for A must be * allocated if A is to be factored by gbfa. Pass smu as follows: * * (1) Pass smu = mu if A will not be factored. * * (2) Pass smu = MIN(n-1,mu+ml) if A will be factored. * * The underlying type of the band matrix returned is realtype**. * If we allocate a band matrix A in realtype **a by * a = bandalloc(n,smu,ml), then a[0] is a pointer to * n * (smu + ml + 1) contiguous storage locations and a[j] is a * pointer to the uppermost element in the storage for the jth * column. The expression a[j][i-j+smu] references the (i,j)th * element of A, where 0 <= i,j <= n-1 and j-mu <= i <= j+ml. * (The elements a[j][0], a[j][1], ..., a[j][smu-mu-1] are used * by gbfa and gbsl.) * ----------------------------------------------------------------- */ realtype **bandalloc(long int n, long int smu, long int ml); /* * ----------------------------------------------------------------- * Function : bandallocpiv * ----------------------------------------------------------------- * Usage : long int *pivot; * pivot = bandallocpiv(n); * if (pivot == NULL) ... memory request failed * ----------------------------------------------------------------- * bandallocpiv(n) allocates an array of n integers. It returns a * pointer to the first element in the array if successful. It * returns NULL if the memory request could not be satisfied. * ----------------------------------------------------------------- */ long int *bandallocpiv(long int n); /* * ----------------------------------------------------------------- * Function : gbfa * ----------------------------------------------------------------- * Usage : long int ier; * ier = gbfa(a,n,mu,ml,smu,p); * if (ier > 0) ... zero element encountered during * the factorization * ----------------------------------------------------------------- * gbfa(a,n,mu,ml,smu,p) factors the n by n band matrix A (upper * and lower bandwidths mu and ml, storage upper bandwidth smu) * stored in "a". It overwrites the elements of A with the LU * factors and it keeps track of the pivot rows chosen in the * pivot array p. * * A successful LU factorization leaves a and pivot array p with * the following information: * * (1) p[k] contains the row number of the pivot element chosen * at the beginning of elimination step k, k=0, 1, ..., n-1. * * (2) If the unique LU factorization of A is given by PA = LU, * where P is a permutation matrix, L is a lower triangular * matrix with all 1's on the diagonal, and U is an upper * triangular matrix, then the upper triangular part of A * (including its diagonal) contains U and the strictly lower * triangular part of A contains the multipliers, I-L. * * gbfa returns 0 if successful. Otherwise it encountered a zero * diagonal element during the factorization. In this case it * returns the column index (numbered from one) at which it * encountered the zero. * * IMPORTANT NOTE: Suppose A is a band matrix with upper * bandwidth mu and lower bandwidth ml, then the upper triangular * factor U can have upper bandwidth as big as MIN(n-1,mu+ml) * because of partial pivoting. The lower triangular factor L has * lower bandwidth ml. Thus, if A is to be factored and * backsolved using gbfa and gbsl, then it should be allocated * as a = bandalloc(n,smu,ml), where smu = MIN(n-1,mu+ml). The * call to gbfa is ier = gbfa(a,n,mu,ml,smu,p). The corresponding * call to gbsl is gbsl(a,n,smu,ml,p,b). The user does not need * to zero the "extra" storage allocated for the purpose of * factorization. This is handled by the gbfa routine. If A is * not going to be factored and backsolved, then it can be * allocated as a = bandalloc(n,smu,ml). In either case, all * routines in this section use the parameter name smu for a * parameter which must be the "storage upper bandwidth" which * was passed to bandalloc. * ----------------------------------------------------------------- */ long int gbfa(realtype **a, long int n, long int mu, long int ml, long int smu, long int *p); /* * ----------------------------------------------------------------- * Function : gbsl * ----------------------------------------------------------------- * Usage : realtype *b; * ier = gbfa(a,n,mu,ml,smu,p); * if (ier == 0) gbsl(a,n,smu,ml,p,b); * ----------------------------------------------------------------- * gbsl(a,n,smu,ml,p,b) solves the n by n linear system * Ax = b, where A is band matrix stored in "a" with storage * upper bandwidth smu and lower bandwidth ml. It assumes that A * has been LU factored and the pivot array p has been set by a * successful call gbfa(a,n,mu,ml,smu,p). The solution x is * written into the b array. * ----------------------------------------------------------------- */ void gbsl(realtype **a, long int n, long int smu, long int ml, long int *p, realtype *b); /* * ----------------------------------------------------------------- * Function : bandzero * ----------------------------------------------------------------- * Usage : bandzero(a,n,mu,ml,smu); * ----------------------------------------------------------------- * a(i,j) <- 0.0, 0 <= i,j <= n-1, j-mu <= i <= j+ml. * ----------------------------------------------------------------- */ void bandzero(realtype **a, long int n, long int mu, long int ml, long int smu); /* * ----------------------------------------------------------------- * Function : bandcopy * ----------------------------------------------------------------- * Usage : bandcopy(a,b,n,a_smu,b_smu,copymu,copyml); * ----------------------------------------------------------------- * b(i,j) <- a(i,j), 0 <= i,j <= n-1, j-copymu <= i <= j+copyml. * ----------------------------------------------------------------- */ void bandcopy(realtype **a, realtype **b, long int n, long int a_smu, long int b_smu, long int copymu, long int copyml); /* * ----------------------------------------------------------------- * Function : bandscale * ----------------------------------------------------------------- * Usage : bandscale(c,a,n,mu,ml); * ----------------------------------------------------------------- * a(i,j) <- c*a(i,j), 0 <= i,j <= n-1, j-mu <= i <= j+ml. * ----------------------------------------------------------------- */ void bandscale(realtype c, realtype **a, long int n, long int mu, long int ml, long int smu); /* * ----------------------------------------------------------------- * Function : bandaddI * ----------------------------------------------------------------- * Usage : bandaddI(a,n,smu); * ----------------------------------------------------------------- * a(j,j) <- a(j,j)+1.0, 0 <= j <= n-1. * ----------------------------------------------------------------- */ void bandaddI(realtype **a, long int n, long int smu); /* * ----------------------------------------------------------------- * Function : bandfreepiv * ----------------------------------------------------------------- * Usage : bandfreepiv(p); * ----------------------------------------------------------------- * bandfreepiv(p) frees the pivot array p allocated by * bandallocpiv. * ----------------------------------------------------------------- */ void bandfreepiv(long int *p); /* * ----------------------------------------------------------------- * Function : bandfree * ----------------------------------------------------------------- * Usage : bandfree(a); * ----------------------------------------------------------------- * bandfree(a) frees the band matrix a allocated by bandalloc. * ----------------------------------------------------------------- */ void bandfree(realtype **a); /* * ----------------------------------------------------------------- * Function : bandprint * ----------------------------------------------------------------- * Usage : bandprint(a,n,mu,ml,smu); * ----------------------------------------------------------------- * bandprint(a,n,mu,ml,smu) prints the n by n band matrix stored * in a (with upper bandwidth mu and lower bandwidth ml) to * standard output as it would normally appear on paper. It is * intended as a debugging tool with small values of n. The * elements are printed using the %g/lg/Lg option. A blank line * is printed before and after the matrix. * ----------------------------------------------------------------- */ void bandprint(realtype **a, long int n, long int mu, long int ml, long int smu); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/dense.c000077500000000000000000000037741323325274500200400ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a generic DENSE linear * solver package. * ----------------------------------------------------------------- */ #include #include #include "dense.h" #include "smalldense.h" #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* Implementation */ DenseMat DenseAllocMat(long int N) { DenseMat A; if (N <= 0) return(NULL); A = (DenseMat) malloc(sizeof *A); if (A==NULL) return (NULL); A->data = denalloc(N); if (A->data == NULL) { free(A); return(NULL); } A->size = N; return(A); } long int *DenseAllocPiv(long int N) { if (N <= 0) return(NULL); return((long int *) malloc(N * sizeof(long int))); } long int DenseFactor(DenseMat A, long int *p) { return(gefa(A->data, A->size, p)); } void DenseBacksolve(DenseMat A, long int *p, realtype *b) { gesl(A->data, A->size, p, b); } void DenseZero(DenseMat A) { denzero(A->data, A->size); } void DenseCopy(DenseMat A, DenseMat B) { dencopy(A->data, B->data, A->size); } void DenseScale(realtype c, DenseMat A) { denscale(c, A->data, A->size); } void DenseAddI(DenseMat A) { denaddI(A->data, A->size); } void DenseFreeMat(DenseMat A) { denfree(A->data); free(A); } void DenseFreePiv(long int *p) { free(p); } void DensePrint(DenseMat A) { denprint(A->data, A->size); } neuron-7.5/src/sundials/shared/dense.h000077500000000000000000000272011323325274500200340ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for a generic DENSE linear solver * package. The routines listed in this file all use type * DenseMat, defined below, for matrices. These routines in turn * call routines in the smalldense.h/smalldense.c module, which * use the type realtype** for matrices. This separation allows * for possible modifications in which matrices of type DenseMat * may not be stored contiguously, while small matrices can still * be treated with the routines in smalldense. * * Routines that work with the type DenseMat begin with "Dense". * The DenseAllocMat function allocates a dense matrix for use in * the other DenseMat routines listed in this file. Matrix * storage details are given in the documentation for the type * DenseMat. The DenseAllocPiv function allocates memory for * pivot information. The storage allocated by DenseAllocMat and * DenseAllocPiv is deallocated by the routines DenseFreeMat and * DenseFreePiv, respectively. The DenseFactor and DenseBacksolve * routines perform the actual solution of a dense linear system. * * Routines that work with realtype** begin with "den" (except for * the factor and solve routines which are called gefa and gesl, * respectively). The underlying matrix storage is described in * the documentation for denalloc in smalldense.h * ----------------------------------------------------------------- */ #ifndef _DENSE_H #define _DENSE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" #include "smalldense.h" /* * ----------------------------------------------------------------- * Type : DenseMat * ----------------------------------------------------------------- * The type DenseMat is defined to be a pointer to a structure * with a size and a data field. The size field indicates the * number of columns (== number of rows) of a dense matrix, while * the data field is a two dimensional array used for component * storage. The elements of a dense matrix are stored columnwise * (i.e columns are stored one on top of the other in memory). If * A is of type DenseMat, then the (i,j)th element of A (with * 0 <= i,j <= size-1) is given by the expression (A->data)[j][i] * or by the expression (A->data)[0][j*n+i]. The macros below * allow a user to access efficiently individual matrix * elements without writing out explicit data structure * references and without knowing too much about the underlying * element storage. The only storage assumption needed is that * elements are stored columnwise and that a pointer to the jth * column of elements can be obtained via the DENSE_COL macro. * Users should use these macros whenever possible. * ----------------------------------------------------------------- */ typedef struct _DenseMat { long int size; realtype **data; } *DenseMat; /* DenseMat accessor macros */ /* * ----------------------------------------------------------------- * Macro : DENSE_ELEM * ----------------------------------------------------------------- * Usage : DENSE_ELEM(A,i,j) = a_ij; OR * a_ij = DENSE_ELEM(A,i,j); * ----------------------------------------------------------------- * DENSE_ELEM(A,i,j) references the (i,j)th element of the N by N * DenseMat A, 0 <= i,j <= N-1. * ----------------------------------------------------------------- */ #define DENSE_ELEM(A,i,j) ((A->data)[j][i]) /* * ----------------------------------------------------------------- * Macro : DENSE_COL * ----------------------------------------------------------------- * Usage : col_j = DENSE_COL(A,j); * ----------------------------------------------------------------- * DENSE_COL(A,j) references the jth column of the N by N * DenseMat A, 0 <= j <= N-1. The type of the expression * DENSE_COL(A,j) is realtype *. After the assignment in the usage * above, col_j may be treated as an array indexed from 0 to N-1. * The (i,j)th element of A is referenced by col_j[i]. * ----------------------------------------------------------------- */ #define DENSE_COL(A,j) ((A->data)[j]) /* Functions that use the DenseMat representation for a dense matrix */ /* * ----------------------------------------------------------------- * Function : DenseAllocMat * ----------------------------------------------------------------- * Usage : A = DenseAllocMat(N); * if (A == NULL) ... memory request failed * ----------------------------------------------------------------- * DenseAllocMat allocates memory for an N by N dense matrix and * returns the storage allocated (type DenseMat). DenseAllocMat * returns NULL if the request for matrix storage cannot be * satisfied. See the above documentation for the type DenseMat * for matrix storage details. * ----------------------------------------------------------------- */ DenseMat DenseAllocMat(long int N); /* * ----------------------------------------------------------------- * Function : DenseAllocPiv * ----------------------------------------------------------------- * Usage : p = DenseAllocPiv(N); * if (p == NULL) ... memory request failed * ----------------------------------------------------------------- * DenseAllocPiv allocates memory for pivot information to be * filled in by the DenseFactor routine during the factorization * of an N by N dense matrix. The underlying type for pivot * information is an array of N integers and this routine returns * the pointer to the memory it allocates. If the request for * pivot storage cannot be satisfied, DenseAllocPiv returns NULL. * ----------------------------------------------------------------- */ long int *DenseAllocPiv(long int N); /* * ----------------------------------------------------------------- * Function : DenseFactor * ----------------------------------------------------------------- * Usage : ier = DenseFactor(A, p); * if (ier != 0) ... A is singular * ----------------------------------------------------------------- * DenseFactor performs the LU factorization of the N by N dense * matrix A. This is done using standard Gaussian elimination * with partial pivoting. * * A successful LU factorization leaves the matrix A and the * pivot array p with the following information: * * (1) p[k] contains the row number of the pivot element chosen * at the beginning of elimination step k, k=0, 1, ..., N-1. * * (2) If the unique LU factorization of A is given by PA = LU, * where P is a permutation matrix, L is a lower triangular * matrix with all 1's on the diagonal, and U is an upper * triangular matrix, then the upper triangular part of A * (including its diagonal) contains U and the strictly lower * triangular part of A contains the multipliers, I-L. * * DenseFactor returns 0 if successful. Otherwise it encountered * a zero diagonal element during the factorization. In this case * it returns the column index (numbered from one) at which * it encountered the zero. * ----------------------------------------------------------------- */ long int DenseFactor(DenseMat A, long int *p); /* * ----------------------------------------------------------------- * Function : DenseBacksolve * ----------------------------------------------------------------- * Usage : DenseBacksolve(A, p, b); * ----------------------------------------------------------------- * DenseBacksolve solves the N-dimensional system A x = b using * the LU factorization in A and the pivot information in p * computed in DenseFactor. The solution x is returned in b. This * routine cannot fail if the corresponding call to DenseFactor * did not fail. * ----------------------------------------------------------------- */ void DenseBacksolve(DenseMat A, long int *p, realtype *b); /* * ----------------------------------------------------------------- * Function : DenseZero * ----------------------------------------------------------------- * Usage : DenseZero(A); * ----------------------------------------------------------------- * DenseZero sets all the elements of the N by N matrix A to 0.0. * ----------------------------------------------------------------- */ void DenseZero(DenseMat A); /* * ----------------------------------------------------------------- * Function : DenseCopy * ----------------------------------------------------------------- * Usage : DenseCopy(A, B); * ----------------------------------------------------------------- * DenseCopy copies the contents of the N by N matrix A into the * N by N matrix B. * ----------------------------------------------------------------- */ void DenseCopy(DenseMat A, DenseMat B); /* * ----------------------------------------------------------------- * Function: DenseScale * ----------------------------------------------------------------- * Usage : DenseScale(c, A); * ----------------------------------------------------------------- * DenseScale scales the elements of the N by N matrix A by the * constant c and stores the result back in A. * ----------------------------------------------------------------- */ void DenseScale(realtype c, DenseMat A); /* * ----------------------------------------------------------------- * Function : DenseAddI * ----------------------------------------------------------------- * Usage : DenseAddI(A); * ----------------------------------------------------------------- * DenseAddI adds the identity matrix to A and stores the result * back in A. * ----------------------------------------------------------------- */ void DenseAddI(DenseMat A); /* * ----------------------------------------------------------------- * Function : DenseFreeMat * ----------------------------------------------------------------- * Usage : DenseFreeMat(A); * ----------------------------------------------------------------- * DenseFreeMat frees the memory allocated by DenseAllocMat for * the N by N matrix A. * ----------------------------------------------------------------- */ void DenseFreeMat(DenseMat A); /* * ----------------------------------------------------------------- * Function : DenseFreePiv * ----------------------------------------------------------------- * Usage : DenseFreePiv(p); * ----------------------------------------------------------------- * DenseFreePiv frees the memory allocated by DenseAllocPiv for * the pivot information array p. * ----------------------------------------------------------------- */ void DenseFreePiv(long int *p); /* * ----------------------------------------------------------------- * Function : DensePrint * ----------------------------------------------------------------- * Usage : DensePrint(A); * ----------------------------------------------------------------- * This routine prints the N by N dense matrix A to standard * output as it would normally appear on paper. It is intended * as a debugging tool with small values of N. The elements are * printed using the %g/lg/Lg option. A blank line is printed * before and after the matrix. * ----------------------------------------------------------------- */ void DensePrint(DenseMat A); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/iterative.c000077500000000000000000000170421323325274500207270ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the iterative.h header * file. It contains the implementation of functions that may be * useful for many different iterative solvers of A x = b. * ----------------------------------------------------------------- */ #include #include "iterative.h" #include "nvector.h" #include "sundialsmath.h" #include "sundialstypes.h" #define FACTOR RCONST(1000.0) #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* * ----------------------------------------------------------------- * Function : ModifiedGS * ----------------------------------------------------------------- * This implementation of ModifiedGS is a slight modification of a * previous modified Gram-Schmidt routine (called mgs) written by * Milo Dorr. * ----------------------------------------------------------------- */ int ModifiedGS(N_Vector *v, realtype **h, int k, int p, realtype *new_vk_norm) { int i, k_minus_1, i0; realtype new_norm_2, new_product, vk_norm, temp; vk_norm = RSqrt(N_VDotProd(v[k],v[k])); k_minus_1 = k - 1; i0 = MAX(k-p, 0); /* Perform modified Gram-Schmidt */ for (i=i0; i < k; i++) { h[i][k_minus_1] = N_VDotProd(v[i], v[k]); N_VLinearSum(ONE, v[k], -h[i][k_minus_1], v[i], v[k]); } /* Compute the norm of the new vector at v[k] */ *new_vk_norm = RSqrt(N_VDotProd(v[k], v[k])); /* If the norm of the new vector at v[k] is less than FACTOR (== 1000) times unit roundoff times the norm of the input vector v[k], then the vector will be reorthogonalized in order to ensure that nonorthogonality is not being masked by a very small vector length. */ temp = FACTOR * vk_norm; if ((temp + (*new_vk_norm)) != temp) return(0); new_norm_2 = ZERO; for (i=i0; i < k; i++) { new_product = N_VDotProd(v[i], v[k]); temp = FACTOR * h[i][k_minus_1]; if ((temp + new_product) == temp) continue; h[i][k_minus_1] += new_product; N_VLinearSum(ONE, v[k],-new_product, v[i], v[k]); new_norm_2 += SQR(new_product); } if (new_norm_2 != ZERO) { new_product = SQR(*new_vk_norm) - new_norm_2; *new_vk_norm = (new_product > ZERO) ? RSqrt(new_product) : ZERO; } return(0); } /* * ----------------------------------------------------------------- * Function : ClassicalGS * ----------------------------------------------------------------- * This implementation of ClassicalGS was contributed by Homer Walker * and Peter Brown. * ----------------------------------------------------------------- */ int ClassicalGS(N_Vector *v, realtype **h, int k, int p, realtype *new_vk_norm, N_Vector temp, realtype *s) { int i, k_minus_1, i0; realtype vk_norm; k_minus_1 = k - 1; /* Perform Classical Gram-Schmidt */ vk_norm = RSqrt(N_VDotProd(v[k], v[k])); i0 = MAX(k-p, 0); for (i=i0; i < k; i++) { h[i][k_minus_1] = N_VDotProd(v[i], v[k]); } for (i=i0; i < k; i++) { N_VLinearSum(ONE, v[k], -h[i][k_minus_1], v[i], v[k]); } /* Compute the norm of the new vector at v[k] */ *new_vk_norm = RSqrt(N_VDotProd(v[k], v[k])); /* Reorthogonalize if necessary */ if ((FACTOR * (*new_vk_norm)) < vk_norm) { for (i=i0; i < k; i++) { s[i] = N_VDotProd(v[i], v[k]); } if (i0 < k) { N_VScale(s[i0], v[i0], temp); h[i0][k_minus_1] += s[i0]; } for (i=i0+1; i < k; i++) { N_VLinearSum(s[i], v[i], ONE, temp, temp); h[i][k_minus_1] += s[i]; } N_VLinearSum(ONE, v[k], -ONE, temp, v[k]); *new_vk_norm = RSqrt(N_VDotProd(v[k],v[k])); } return(0); } /* * ----------------------------------------------------------------- * Function : QRfact * ----------------------------------------------------------------- * This implementation of QRfact is a slight modification of a * previous routine (called qrfact) written by Milo Dorr. * ----------------------------------------------------------------- */ int QRfact(int n, realtype **h, realtype *q, int job) { realtype c, s, temp1, temp2, temp3; int i, j, k, q_ptr, n_minus_1, code=0; switch (job) { case 0: /* Compute a new factorization of H */ code = 0; for (k=0; k < n; k++) { /* Multiply column k by the previous k-1 Givens rotations */ for (j=0; j < k-1; j++) { i = 2*j; temp1 = h[j][k]; temp2 = h[j+1][k]; c = q[i]; s = q[i+1]; h[j][k] = c*temp1 - s*temp2; h[j+1][k] = s*temp1 + c*temp2; } /* Compute the Givens rotation components c and s */ q_ptr = 2*k; temp1 = h[k][k]; temp2 = h[k+1][k]; if( temp2 == ZERO) { c = ONE; s = ZERO; } else if (ABS(temp2) >= ABS(temp1)) { temp3 = temp1/temp2; s = -ONE/RSqrt(ONE+SQR(temp3)); c = -s*temp3; } else { temp3 = temp2/temp1; c = ONE/RSqrt(ONE+SQR(temp3)); s = -c*temp3; } q[q_ptr] = c; q[q_ptr+1] = s; if( (h[k][k] = c*temp1 - s*temp2) == ZERO) code = k+1; } break; default: /* Update the factored H to which a new column has been added */ n_minus_1 = n - 1; code = 0; /* Multiply the new column by the previous n-1 Givens rotations */ for (k=0; k < n_minus_1; k++) { i = 2*k; temp1 = h[k][n_minus_1]; temp2 = h[k+1][n_minus_1]; c = q[i]; s = q[i+1]; h[k][n_minus_1] = c*temp1 - s*temp2; h[k+1][n_minus_1] = s*temp1 + c*temp2; } /* Compute new Givens rotation and multiply it times the last two entries in the new column of H. Note that the second entry of this product will be 0, so it is not necessary to compute it. */ temp1 = h[n_minus_1][n_minus_1]; temp2 = h[n][n_minus_1]; if (temp2 == ZERO) { c = ONE; s = ZERO; } else if (ABS(temp2) >= ABS(temp1)) { temp3 = temp1/temp2; s = -ONE/RSqrt(ONE+SQR(temp3)); c = -s*temp3; } else { temp3 = temp2/temp1; c = ONE/RSqrt(ONE+SQR(temp3)); s = -c*temp3; } q_ptr = 2*n_minus_1; q[q_ptr] = c; q[q_ptr+1] = s; if ((h[n_minus_1][n_minus_1] = c*temp1 - s*temp2) == ZERO) code = n; } return (code); } /* * ----------------------------------------------------------------- * Function : QRsol * ----------------------------------------------------------------- * This implementation of QRsol is a slight modification of a * previous routine (called qrsol) written by Milo Dorr. * ----------------------------------------------------------------- */ int QRsol(int n, realtype **h, realtype *q, realtype *b) { realtype c, s, temp1, temp2; int i, k, q_ptr, code=0; /* Compute Q*b */ for (k=0; k < n; k++) { q_ptr = 2*k; c = q[q_ptr]; s = q[q_ptr+1]; temp1 = b[k]; temp2 = b[k+1]; b[k] = c*temp1 - s*temp2; b[k+1] = s*temp1 + c*temp2; } /* Solve R*x = Q*b */ for (k=n-1; k >= 0; k--) { if (h[k][k] == ZERO) { code = k + 1; break; } b[k] /= h[k][k]; for (i=0; i < k; i++) b[i] -= b[k]*h[i][k]; } return (code); } neuron-7.5/src/sundials/shared/iterative.h000077500000000000000000000315001323325274500207270ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen and Alan C. Hindmarsh @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This header file contains declarations intended for use by * generic iterative solvers of Ax = b. The enumeration gives * symbolic names for the type of preconditioning to be used. * The function type declarations give the prototypes for the * functions to be called within an iterative linear solver, that * are responsible for * multiplying A by a given vector v (ATimesFn), and * solving the preconditioner equation Pz = r (PSolveFn). * ----------------------------------------------------------------- */ #ifndef _ITERATIVE_H #define _ITERATIVE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" #include "nvector.h" /* * ----------------------------------------------------------------- * enum : types of preconditioning * ----------------------------------------------------------------- * PREC_NONE : The iterative linear solver should not use * preconditioning. * * PREC_LEFT : The iterative linear solver uses preconditioning on * the left only. * * PREC_RIGHT : The iterative linear solver uses preconditioning on * the right only. * * PREC_BOTH : The iterative linear solver uses preconditioning on * both the left and the right. * ----------------------------------------------------------------- */ enum { PREC_NONE, PREC_LEFT, PREC_RIGHT, PREC_BOTH }; /* * ----------------------------------------------------------------- * enum : types of Gram-Schmidt routines * ----------------------------------------------------------------- * MODIFIED_GS : The iterative solver uses the modified * Gram-Schmidt routine ModifiedGS listed in this * file. * * CLASSICAL_GS : The iterative solver uses the classical * Gram-Schmidt routine ClassicalGS listed in this * file. * ----------------------------------------------------------------- */ enum { MODIFIED_GS = 1, CLASSICAL_GS = 2 }; /* * ----------------------------------------------------------------- * Type: ATimesFn * ----------------------------------------------------------------- * An ATimesFn multiplies Av and stores the result in z. The * caller is responsible for allocating memory for the z vector. * The parameter A_data is a pointer to any information about A * which the function needs in order to do its job. The vector v * is unchanged. An ATimesFn returns 0 if successful and a * non-zero value if unsuccessful. * ----------------------------------------------------------------- */ typedef int (*ATimesFn)(void *A_data, N_Vector v, N_Vector z); /* * ----------------------------------------------------------------- * Type: PSolveFn * ----------------------------------------------------------------- * A PSolveFn solves the preconditioner equation Pz = r for the * vector z. The caller is responsible for allocating memory for * the z vector. The parameter P_data is a pointer to any * information about P which the function needs in order to do * its job. The parameter lr is input, and indicates whether P * is to be taken as the left preconditioner or the right * preconditioner: lr = 1 for left and lr = 2 for right. * If preconditioning is on one side only, lr can be ignored. * The vector r is unchanged. * A PSolveFn returns 0 if successful and a non-zero value if * unsuccessful. On a failure, a negative return value indicates * an unrecoverable condition, while a positive value indicates * a recoverable one, in which the calling routine may reattempt * the solution after updating preconditioner data. * ----------------------------------------------------------------- */ typedef int (*PSolveFn)(void *P_data, N_Vector r, N_Vector z, int lr); /* * ----------------------------------------------------------------- * Function: ModifiedGS * ----------------------------------------------------------------- * ModifiedGS performs a modified Gram-Schmidt orthogonalization * of the N_Vector v[k] against the p unit N_Vectors at * v[k-1], v[k-2], ..., v[k-p]. * * v is an array of (k+1) N_Vectors v[i], i=0, 1, ..., k. * v[k-1], v[k-2], ..., v[k-p] are assumed to have L2-norm * equal to 1. * * h is the output k by k Hessenberg matrix of inner products. * This matrix must be allocated row-wise so that the (i,j)th * entry is h[i][j]. The inner products (v[i],v[k]), * i=i0, i0+1, ..., k-1, are stored at h[i][k-1]. Here * i0=MAX(0,k-p). * * k is the index of the vector in the v array that needs to be * orthogonalized against previous vectors in the v array. * * p is the number of previous vectors in the v array against * which v[k] is to be orthogonalized. * * new_vk_norm is a pointer to memory allocated by the caller to * hold the Euclidean norm of the orthogonalized vector v[k]. * * If (k-p) < 0, then ModifiedGS uses p=k. The orthogonalized * v[k] is NOT normalized and is stored over the old v[k]. Once * the orthogonalization has been performed, the Euclidean norm * of v[k] is stored in (*new_vk_norm). * * ModifiedGS returns 0 to indicate success. It cannot fail. * ----------------------------------------------------------------- */ int ModifiedGS(N_Vector *v, realtype **h, int k, int p, realtype *new_vk_norm); /* * ----------------------------------------------------------------- * Function: ClassicalGS * ----------------------------------------------------------------- * ClassicalGS performs a classical Gram-Schmidt * orthogonalization of the N_Vector v[k] against the p unit * N_Vectors at v[k-1], v[k-2], ..., v[k-p]. The parameters v, h, * k, p, and new_vk_norm are as described in the documentation * for ModifiedGS. * * temp is an N_Vector which can be used as workspace by the * ClassicalGS routine. * * s is a length k array of realtype which can be used as * workspace by the ClassicalGS routine. * * ClassicalGS returns 0 to indicate success. It cannot fail. * ----------------------------------------------------------------- */ int ClassicalGS(N_Vector *v, realtype **h, int k, int p, realtype *new_vk_norm, N_Vector temp, realtype *s); /* * ----------------------------------------------------------------- * Function: QRfact * ----------------------------------------------------------------- * QRfact performs a QR factorization of the Hessenberg matrix H. * * n is the problem size; the matrix H is (n+1) by n. * * h is the (n+1) by n Hessenberg matrix H to be factored. It is * stored row-wise. * * q is an array of length 2*n containing the Givens rotations * computed by this function. A Givens rotation has the form: * | c -s | * | s c |. * The components of the Givens rotations are stored in q as * (c, s, c, s, ..., c, s). * * job is a control flag. If job==0, then a new QR factorization * is performed. If job!=0, then it is assumed that the first * n-1 columns of h have already been factored and only the last * column needs to be updated. * * QRfact returns 0 if successful. If a zero is encountered on * the diagonal of the triangular factor R, then QRfact returns * the equation number of the zero entry, where the equations are * numbered from 1, not 0. If QRsol is subsequently called in * this situation, it will return an error because it could not * divide by the zero diagonal entry. * ----------------------------------------------------------------- */ int QRfact(int n, realtype **h, realtype *q, int job); /* * ----------------------------------------------------------------- * Function: QRsol * ----------------------------------------------------------------- * QRsol solves the linear least squares problem * * min (b - H*x, b - H*x), x in R^n, * * where H is a Hessenberg matrix, and b is in R^(n+1). * It uses the QR factors of H computed by QRfact. * * n is the problem size; the matrix H is (n+1) by n. * * h is a matrix (computed by QRfact) containing the upper * triangular factor R of the original Hessenberg matrix H. * * q is an array of length 2*n (computed by QRfact) containing * the Givens rotations used to factor H. * * b is the (n+1)-vector appearing in the least squares problem * above. * * On return, b contains the solution x of the least squares * problem, if QRsol was successful. * * QRsol returns a 0 if successful. Otherwise, a zero was * encountered on the diagonal of the triangular factor R. * In this case, QRsol returns the equation number (numbered * from 1, not 0) of the zero entry. * ----------------------------------------------------------------- */ int QRsol(int n, realtype **h, realtype *q, realtype *b); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/nvector.c000077500000000000000000000101741323325274500204120ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a generic NVECTOR package. * It contains the implementation of the N_Vector kernels listed in * nvector.h. * ----------------------------------------------------------------- */ #include #include "nvector.h" /* * ----------------------------------------------------------------- * Functions in the 'ops' structure * ----------------------------------------------------------------- */ N_Vector N_VClone(N_Vector w) { N_Vector v; v = w->ops->nvclone(w); return(v); } void N_VDestroy(N_Vector v) { v->ops->nvdestroy(v); } void N_VSpace(N_Vector v, long int *lrw, long int *liw) { v->ops->nvspace(v, lrw, liw); } realtype *N_VGetArrayPointer(N_Vector v) { realtype *data; data = v->ops->nvgetarraypointer(v); return(data); } void N_VSetArrayPointer(realtype *v_data, N_Vector v) { v->ops->nvsetarraypointer(v_data, v); } void N_VLinearSum(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { z->ops->nvlinearsum(a, x, b, y, z); } void N_VConst(realtype c, N_Vector z) { z->ops->nvconst(c, z); } void N_VProd(N_Vector x, N_Vector y, N_Vector z) { z->ops->nvprod(x, y, z); } void N_VDiv(N_Vector x, N_Vector y, N_Vector z) { z->ops->nvdiv(x, y, z); } void N_VScale(realtype c, N_Vector x, N_Vector z) { z->ops->nvscale(c, x, z); } void N_VAbs(N_Vector x, N_Vector z) { z->ops->nvabs(x, z); } void N_VInv(N_Vector x, N_Vector z) { z->ops->nvinv(x, z); } void N_VAddConst(N_Vector x, realtype b, N_Vector z) { z->ops->nvaddconst(x, b, z); } realtype N_VDotProd(N_Vector x, N_Vector y) { realtype prod; prod = y->ops->nvdotprod(x, y); return(prod); } realtype N_VMaxNorm(N_Vector x) { realtype norm; norm = x->ops->nvmaxnorm(x); return(norm); } realtype N_VWrmsNorm(N_Vector x, N_Vector w) { realtype norm; norm = x->ops->nvwrmsnorm(x, w); return(norm); } realtype N_VWrmsNormMask(N_Vector x, N_Vector w, N_Vector id) { realtype norm; norm = x->ops->nvwrmsnormmask(x, w, id); return(norm); } realtype N_VMin(N_Vector x) { realtype minval; minval = x->ops->nvmin(x); return(minval); } realtype N_VWL2Norm(N_Vector x, N_Vector w) { realtype norm; norm = x->ops->nvwl2norm(x, w); return(norm); } realtype N_VL1Norm(N_Vector x) { realtype norm; norm = x->ops->nvl1norm(x); return(norm); } void N_VCompare(realtype c, N_Vector x, N_Vector z) { z->ops->nvcompare(c, x, z); } booleantype N_VInvTest(N_Vector x, N_Vector z) { booleantype flag; flag = z->ops->nvinvtest(x, z); return(flag); } booleantype N_VConstrMask(N_Vector c, N_Vector x, N_Vector m) { booleantype flag; flag = x->ops->nvconstrmask(c, x, m); return(flag); } realtype N_VMinQuotient(N_Vector num, N_Vector denom) { realtype quotient; quotient = num->ops->nvminquotient(num, denom); return(quotient); } /* * ----------------------------------------------------------------- * Additional functions exported by the generic NVECTOR: * N_VCloneVectorArray * N_VDestroyVectorArray * ----------------------------------------------------------------- */ N_Vector *N_VCloneVectorArray(int count, N_Vector w) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0 and * msk[i] = 0.0 if id[i] < 0 * * N_VMin * Returns the smallest element of x: * min (i=0 to N-1) x[i] * * N_VWL2Norm * Returns the weighted Euclidean L2 norm of x with weight * vector w: * sqrt [(sum (i=0 to N-1) {(x[i] * w[i])^2}) ] * * N_VL1Norm * Returns the L1 norm of x: * sum (i=0 to N-1) {ABS(x[i])} * * N_VCompare * Performs the operation * z[i] = 1.0 if |x[i]| >= c i = 0, 1, ..., N-1 * 0.0 otherwise * * N_VInvTest * Performs the operation z[i] = 1.0 / x[i] with a test for * x[i]==0.0 before inverting x[i]. * This routine returns TRUE if all components of x are non-zero * (successful inversion) and returns FALSE otherwise. * * N_VConstrMask * Performs the operation : * m[i] = 1.0 if constraint test fails for x[i] * m[i] = 0.0 if constraint test passes for x[i] * where the constraint tests are as follows: * If c[i] = 2.0, then x[i] must be > 0.0. * If c[i] = 1.0, then x[i] must be >= 0.0. * If c[i] = -1.0, then x[i] must be <= 0.0. * If c[i] = -2.0, then x[i] must be < 0.0. * This routine returns a bool FALSE if any element failed * the constraint test, TRUE if all passed. It also sets a * mask vector m, with elements equal to 1.0 where the * corresponding constraint test failed, and equal to 0.0 * where the constraint test passed. * This routine is specialized in that it is used only for * constraint checking. * * N_VMinQuotient * Performs the operation : * minq = min ( num[i]/denom[i]) over all i such that * denom[i] != 0. * This routine returns the minimum of the quotients obtained * by term-wise dividing num[i] by denom[i]. A zero element * in denom will be skipped. If no such quotients are found, * then the large value 1.0e99 is returned. * * ----------------------------------------------------------------- * * The following table lists the vector functions used by * different modules in SUNDIALS. The symbols in the table * have the following meaning: * S - called by the solver; * D - called by the dense linear solver module * B - called by the band linear solver module * Di - called by the diagonal linear solver module * I - called by the iterative linear solver module * BP - called by the band preconditioner module * BBDP - called by the band-block diagonal preconditioner module * F - called by the Fortran-to-C interface * * ------------------------------------------------ * MODULES * NVECTOR ------------------------------------------------ * FUNCTIONS CVODE/CVODES IDA KINSOL * ----------------------------------------------------------------- * N_VClone S Di I S I BBDP S I BBDP * ----------------------------------------------------------------- * N_VDestroy S Di I S I BBDP S I BBDP * ----------------------------------------------------------------- * N_VSpace S S S * ----------------------------------------------------------------- * N_VGetArrayPointer D B BP BBDP F D B BBDP BBDP F * ----------------------------------------------------------------- * N_VSetArrayPointer D F D F * ----------------------------------------------------------------- * N_VLinearSum S D Di I S D I S I * ----------------------------------------------------------------- * N_VConst S I S I I * ----------------------------------------------------------------- * N_VProd S Di I S I S I * ----------------------------------------------------------------- * N_VDiv S Di I S I S I * ----------------------------------------------------------------- * N_VScale S D B Di I BP BBDP S D B I BBDP S I BBDP * ----------------------------------------------------------------- * N_VAbs S S S * ----------------------------------------------------------------- * N_VInv S Di S S * ----------------------------------------------------------------- * N_VAddConst S Di S * ----------------------------------------------------------------- * N_VDotProd I I I * ----------------------------------------------------------------- * N_VMaxNorm S S S * ----------------------------------------------------------------- * N_VWrmsNorm S D B I BP BBDP S * ----------------------------------------------------------------- * N_VWrmsNormMask S * ----------------------------------------------------------------- * N_VMin S S S * ----------------------------------------------------------------- * N_VWL2Norm S I * ----------------------------------------------------------------- * N_VL1Norm * ----------------------------------------------------------------- * N_VCompare Di S * ----------------------------------------------------------------- * N_VInvTest Di * ----------------------------------------------------------------- * N_VConstrMask S S * ----------------------------------------------------------------- * N_VMinQuotient S S * ----------------------------------------------------------------- */ N_Vector N_VClone(N_Vector w); void N_VDestroy(N_Vector v); void N_VSpace(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer(N_Vector v); void N_VSetArrayPointer(realtype *v_data, N_Vector v); void N_VLinearSum(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst(realtype c, N_Vector z); void N_VProd(N_Vector x, N_Vector y, N_Vector z); void N_VDiv(N_Vector x, N_Vector y, N_Vector z); void N_VScale(realtype c, N_Vector x, N_Vector z); void N_VAbs(N_Vector x, N_Vector z); void N_VInv(N_Vector x, N_Vector z); void N_VAddConst(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd(N_Vector x, N_Vector y); realtype N_VMaxNorm(N_Vector x); realtype N_VWrmsNorm(N_Vector x, N_Vector w); realtype N_VWrmsNormMask(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin(N_Vector x); realtype N_VWL2Norm(N_Vector x, N_Vector w); realtype N_VL1Norm(N_Vector x); void N_VCompare(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest(N_Vector x, N_Vector z); booleantype N_VConstrMask(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient(N_Vector num, N_Vector denom); /* * ----------------------------------------------------------------- * Additional functions exported by nvector * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * N_VCloneVectorArray * Creates (by cloning from 'w') an array of 'count' N_Vectors * * N_VDestroyVectorArray * Frees memory for an array of 'count' N_Vectors that was * created by cloning with N_VCloneVectorArray * * These functions are used by the SPGMR iterative linear solver * module and by the CVODES and IDAS solvers. * ----------------------------------------------------------------- */ N_Vector *N_VCloneVectorArray(int count, N_Vector w); void N_VDestroyVectorArray(N_Vector *vs, int count); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/nvector_parallel.c000077500000000000000000000571411323325274500222730ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a parallel MPI implementation * of the NVECTOR package. * ----------------------------------------------------------------- */ #include #include /* for NRNMPI_DYNAMICLOAD */ #include #if NRNMPI_DYNAMICLOAD extern void nrnmpi_dbl_allreduce_vec(double* src, double* dest, int cnt, int type); extern void nrnmpi_long_allreduce_vec(long* src, long* dest, int cnt, int type); extern int nrnmpi_numprocs; #endif #include "nvector_parallel.h" #if NRNMPI_DYNAMICLOAD #else extern MPI_Comm nrnmpi_comm; #endif #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define HALF RCONST(0.5) #define ONE RCONST(1.0) #define ONEPT5 RCONST(1.5) /* Error Message */ #define BAD_N1 "N_VNew_Parallel -- Sum of local vector lengths differs from " #define BAD_N2 "input global length. \n\n" #define BAD_N BAD_N1 BAD_N2 /* Private function prototypes */ /* Reduction operations add/max/min over the processor group */ static realtype VAllReduce_Parallel(realtype d, int op, MPI_Comm comm); /* z=x */ static void VCopy_Parallel(N_Vector x, N_Vector z); /* z=x+y */ static void VSum_Parallel(N_Vector x, N_Vector y, N_Vector z); /* z=x-y */ static void VDiff_Parallel(N_Vector x, N_Vector y, N_Vector z); /* z=-x */ static void VNeg_Parallel(N_Vector x, N_Vector z); /* z=c(x+y) */ static void VScaleSum_Parallel(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=c(x-y) */ static void VScaleDiff_Parallel(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=ax+y */ static void VLin1_Parallel(realtype a, N_Vector x, N_Vector y, N_Vector z); /* z=ax-y */ static void VLin2_Parallel(realtype a, N_Vector x, N_Vector y, N_Vector z); /* y <- ax+y */ static void Vaxpy_Parallel(realtype a, N_Vector x, N_Vector y); /* x <- ax */ static void VScaleBy_Parallel(realtype a, N_Vector x); /* * ----------------------------------------------------------------- * exported functions * ----------------------------------------------------------------- */ /* ---------------------------------------------------------------- * Function to create a new parallel vector with empty data array */ N_Vector N_VNewEmpty_Parallel(MPI_Comm comm, long int local_length, long int global_length) { N_Vector v; N_Vector_Ops ops; N_VectorContent_Parallel content; long int n, Nsum; /* Compute global length as sum of local lengths */ n = local_length; #if NRNMPI_DYNAMICLOAD nrnmpi_long_allreduce_vec(&n, &Nsum, 1, 1); #else comm = nrnmpi_comm; MPI_Allreduce(&n, &Nsum, 1, PVEC_INTEGER_MPI_TYPE, MPI_SUM, comm); #endif if (Nsum != global_length) { printf(BAD_N); return(NULL); } /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) { free(v); return(NULL); } ops->nvclone = N_VClone_Parallel; ops->nvdestroy = N_VDestroy_Parallel; ops->nvspace = N_VSpace_Parallel; ops->nvgetarraypointer = N_VGetArrayPointer_Parallel; ops->nvsetarraypointer = N_VSetArrayPointer_Parallel; ops->nvlinearsum = N_VLinearSum_Parallel; ops->nvconst = N_VConst_Parallel; ops->nvprod = N_VProd_Parallel; ops->nvdiv = N_VDiv_Parallel; ops->nvscale = N_VScale_Parallel; ops->nvabs = N_VAbs_Parallel; ops->nvinv = N_VInv_Parallel; ops->nvaddconst = N_VAddConst_Parallel; ops->nvdotprod = N_VDotProd_Parallel; ops->nvmaxnorm = N_VMaxNorm_Parallel; ops->nvwrmsnormmask = N_VWrmsNormMask_Parallel; ops->nvwrmsnorm = N_VWrmsNorm_Parallel; ops->nvmin = N_VMin_Parallel; ops->nvwl2norm = N_VWL2Norm_Parallel; ops->nvl1norm = N_VL1Norm_Parallel; ops->nvcompare = N_VCompare_Parallel; ops->nvinvtest = N_VInvTest_Parallel; ops->nvconstrmask = N_VConstrMask_Parallel; ops->nvminquotient = N_VMinQuotient_Parallel; /* Create content */ content = (N_VectorContent_Parallel) malloc(sizeof(struct _N_VectorContent_Parallel)); if (content == NULL) { free(ops); free(v); return(NULL); } /* Attach lengths and communicator */ content->local_length = local_length; content->global_length = global_length; content->comm = comm; content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------- * Function to create a new parallel vector */ N_Vector N_VNew_Parallel(MPI_Comm comm, long int local_length, long int global_length) { N_Vector v; realtype *data; v = N_VNewEmpty_Parallel(comm, local_length, global_length); if (v == NULL) return(NULL); /* Create data */ if(local_length > 0) { /* Allocate memory */ data = (realtype *) malloc(local_length * sizeof(realtype)); if(data == NULL) {N_VDestroy_Parallel(v);return(NULL);} /* Attach data */ NV_OWN_DATA_P(v) = TRUE; NV_DATA_P(v) = data; } return(v); } /* ---------------------------------------------------------------------------- * Function to clone from a template a new vector with empty (NULL) data array */ N_Vector N_VCloneEmpty_Parallel(N_Vector w) { N_Vector v; N_Vector_Ops ops; N_VectorContent_Parallel content; if (w == NULL) return(NULL); /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) { free(v); return(NULL); } ops->nvclone = w->ops->nvclone; ops->nvdestroy = w->ops->nvdestroy; ops->nvspace = w->ops->nvspace; ops->nvgetarraypointer = w->ops->nvgetarraypointer; ops->nvsetarraypointer = w->ops->nvsetarraypointer; ops->nvlinearsum = w->ops->nvlinearsum; ops->nvconst = w->ops->nvconst; ops->nvprod = w->ops->nvprod; ops->nvdiv = w->ops->nvdiv; ops->nvscale = w->ops->nvscale; ops->nvabs = w->ops->nvabs; ops->nvinv = w->ops->nvinv; ops->nvaddconst = w->ops->nvaddconst; ops->nvdotprod = w->ops->nvdotprod; ops->nvmaxnorm = w->ops->nvmaxnorm; ops->nvwrmsnormmask = w->ops->nvwrmsnormmask; ops->nvwrmsnorm = w->ops->nvwrmsnorm; ops->nvmin = w->ops->nvmin; ops->nvwl2norm = w->ops->nvwl2norm; ops->nvl1norm = w->ops->nvl1norm; ops->nvcompare = w->ops->nvcompare; ops->nvinvtest = w->ops->nvinvtest; ops->nvconstrmask = w->ops->nvconstrmask; ops->nvminquotient = w->ops->nvminquotient; /* Create content */ content = (N_VectorContent_Parallel) malloc(sizeof(struct _N_VectorContent_Parallel)); if (content == NULL) { free(ops); free(v); return(NULL); } /* Attach lengths and communicator */ content->local_length = NV_LOCLENGTH_P(w); content->global_length = NV_GLOBLENGTH_P(w); content->comm = NV_COMM_P(w); content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------- * Function to create a parallel N_Vector with user data component */ N_Vector N_VMake_Parallel(MPI_Comm comm, long int local_length, long int global_length, realtype *v_data) { N_Vector v; v = N_VNewEmpty_Parallel(comm, local_length, global_length); if (v == NULL) return(NULL); if (local_length > 0) { /* Attach data */ NV_OWN_DATA_P(v) = FALSE; NV_DATA_P(v) = v_data; } return(v); } /* ---------------------------------------------------------------- * Function to create an array of new parallel vectors. */ N_Vector *N_VNewVectorArray_Parallel(int count, MPI_Comm comm, long int local_length, long int global_length) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0) { /* Allocate memory */ data = (realtype *) malloc(local_length * sizeof(realtype)); if(data == NULL) {N_VDestroy_Parallel(v);return(NULL);} /* Attach data */ NV_OWN_DATA_P(v) = TRUE; NV_DATA_P(v) = data; } return(v); } void N_VDestroy_Parallel(N_Vector v) { if ( (NV_OWN_DATA_P(v) == TRUE) && (NV_DATA_P(v) != NULL) ) free(NV_DATA_P(v)); free(v->content); free(v->ops); free(v); } void N_VSpace_Parallel(N_Vector v, long int *lrw, long int *liw) { MPI_Comm comm; int npes; comm = NV_COMM_P(v); #if NRNMPI_DYNAMICLOAD npes = nrnmpi_numprocs; #else MPI_Comm_size(comm, &npes); #endif *lrw = NV_GLOBLENGTH_P(v); *liw = 2 * npes; } realtype *N_VGetArrayPointer_Parallel(N_Vector v) { realtype *v_data; v_data = NV_DATA_P(v); return(v_data); } void N_VSetArrayPointer_Parallel(realtype *v_data, N_Vector v) { if (NV_LOCLENGTH_P(v) > 0) NV_DATA_P(v) = v_data; } void N_VLinearSum_Parallel(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { long int i, N; realtype c, *xd, *yd, *zd; N_Vector v1, v2; booleantype test; if ((b == ONE) && (z == y)) { /* BLAS usage: axpy y <- ax+y */ Vaxpy_Parallel(a,x,y); return; } if ((a == ONE) && (z == x)) { /* BLAS usage: axpy x <- by+x */ Vaxpy_Parallel(b,y,x); return; } /* Case: a == b == 1.0 */ if ((a == ONE) && (b == ONE)) { VSum_Parallel(x, y, z); return; } /* Cases: (1) a == 1.0, b = -1.0, (2) a == -1.0, b == 1.0 */ if ((test = ((a == ONE) && (b == -ONE))) || ((a == -ONE) && (b == ONE))) { v1 = test ? y : x; v2 = test ? x : y; VDiff_Parallel(v2, v1, z); return; } /* Cases: (1) a == 1.0, b == other or 0.0, (2) a == other or 0.0, b == 1.0 */ /* if a or b is 0.0, then user should have called N_VScale */ if ((test = (a == ONE)) || (b == ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin1_Parallel(c, v1, v2, z); return; } /* Cases: (1) a == -1.0, b != 1.0, (2) a != 1.0, b == -1.0 */ if ((test = (a == -ONE)) || (b == -ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin2_Parallel(c, v1, v2, z); return; } /* Case: a == b */ /* catches case both a and b are 0.0 - user should have called N_VConst */ if (a == b) { VScaleSum_Parallel(a, x, y, z); return; } /* Case: a == -b */ if (a == -b) { VScaleDiff_Parallel(a, x, y, z); return; } /* Do all cases not handled above: (1) a == other, b == 0.0 - user should have called N_VScale (2) a == 0.0, b == other - user should have called N_VScale (3) a,b == other, a !=b, a != -b */ N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + b * (*yd++); } void N_VConst_Parallel(realtype c, N_Vector z) { long int i, N; realtype *zd; N = NV_LOCLENGTH_P(z); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = c; } void N_VProd_Parallel(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = (*xd++) * (*yd++); } void N_VDiv_Parallel(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = (*xd++) / (*yd++); } void N_VScale_Parallel(realtype c, N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; if (z == x) { /* BLAS usage: scale x <- cx */ VScaleBy_Parallel(c, x); return; } if (c == ONE) { VCopy_Parallel(x, z); } else if (c == -ONE) { VNeg_Parallel(x, z); } else { N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = c * (*xd++); } } void N_VAbs_Parallel(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); for (i=0; i < N; i++, xd++, zd++) *zd = ABS(*xd); } void N_VInv_Parallel(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = ONE / (*xd++); } void N_VAddConst_Parallel(N_Vector x, realtype b, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = (*xd++) + b; } realtype N_VDotProd_Parallel(N_Vector x, N_Vector y) { long int i, N; realtype sum = ZERO, *xd, *yd, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); comm = NV_COMM_P(x); for (i=0; i < N; i++) sum += xd[i] * yd[i]; gsum = VAllReduce_Parallel(sum, 1, comm); return(gsum); } realtype N_VMaxNorm_Parallel(N_Vector x) { long int i, N; realtype max, *xd, gmax; MPI_Comm comm; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); comm = NV_COMM_P(x); max = ZERO; for (i=0; i < N; i++, xd++) { if (ABS(*xd) > max) max = ABS(*xd); } gmax = VAllReduce_Parallel(max, 2, comm); return(gmax); } realtype N_VWrmsNorm_Parallel(N_Vector x, N_Vector w) { long int i, N, N_global; realtype sum = ZERO, prodi, *xd, *wd, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P(x); N_global = NV_GLOBLENGTH_P(x); xd = NV_DATA_P(x); wd = NV_DATA_P(w); comm = NV_COMM_P(x); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } gsum = VAllReduce_Parallel(sum, 1, comm); return(RSqrt(gsum / N_global)); } realtype N_VWrmsNormMask_Parallel(N_Vector x, N_Vector w, N_Vector id) { long int i, N, N_global; realtype sum = ZERO, prodi, *xd, *wd, *idd, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P(x); N_global = NV_GLOBLENGTH_P(x); xd = NV_DATA_P(x); wd = NV_DATA_P(w); idd = NV_DATA_P(id); comm = NV_COMM_P(x); for (i=0; i < N; i++) { if (idd[i] > ZERO) { prodi = xd[i] * wd[i]; sum += prodi * prodi; } } gsum = VAllReduce_Parallel(sum, 1, comm); return(RSqrt(gsum / N_global)); } realtype N_VMin_Parallel(N_Vector x) { long int i, N; realtype min, *xd, gmin; MPI_Comm comm; N = NV_LOCLENGTH_P(x); comm = NV_COMM_P(x); min = BIG_REAL; if (N > 0) { xd = NV_DATA_P(x); min = xd[0]; xd++; for (i=1; i < N; i++, xd++) { if ((*xd) < min) min = *xd; } } gmin = VAllReduce_Parallel(min, 3, comm); return(gmin); } realtype N_VWL2Norm_Parallel(N_Vector x, N_Vector w) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd, gsum; MPI_Comm comm; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); wd = NV_DATA_P(w); comm = NV_COMM_P(x); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } gsum = VAllReduce_Parallel(sum, 1, comm); return(RSqrt(gsum)); } realtype N_VL1Norm_Parallel(N_Vector x) { long int i, N; realtype sum = ZERO, gsum, *xd; MPI_Comm comm; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); comm = NV_COMM_P(x); for (i=0; i= c) ? ONE : ZERO; } } booleantype N_VInvTest_Parallel(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd, val, gval; MPI_Comm comm; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); comm = NV_COMM_P(x); val = ONE; for (i=0; i < N; i++) { if (*xd == ZERO) val = ZERO; else *zd++ = ONE / (*xd++); } gval = VAllReduce_Parallel(val, 3, comm); if (gval == ZERO) return(FALSE); else return(TRUE); } booleantype N_VConstrMask_Parallel(N_Vector c, N_Vector x, N_Vector m) { long int i, N; booleantype test; realtype *cd, *xd, *md; MPI_Comm comm; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); cd = NV_DATA_P(c); md = NV_DATA_P(m); comm = NV_COMM_P(x); test = TRUE; for (i=0; i ONEPT5 || (*cd) < -ONEPT5) { if ( (*xd)*(*cd) <= ZERO) {test = FALSE; *md = ONE; } continue; } if ( (*cd) > HALF || (*cd) < -HALF) { if ( (*xd)*(*cd) < ZERO ) {test = FALSE; *md = ONE; } } } return((booleantype)VAllReduce_Parallel((realtype)test, 3, comm)); } realtype N_VMinQuotient_Parallel(N_Vector num, N_Vector denom) { booleantype notEvenOnce; long int i, N; realtype *nd, *dd, min=0.0; MPI_Comm comm; N = NV_LOCLENGTH_P(num); nd = NV_DATA_P(num); dd = NV_DATA_P(denom); comm = NV_COMM_P(num); notEvenOnce = TRUE; for (i = 0; i < N; i++, nd++, dd++) { if (*dd == ZERO) continue; else { if (notEvenOnce) { min = *nd / *dd ; notEvenOnce = FALSE; } else min = MIN(min, (*nd) / (*dd)); } } if (notEvenOnce || (N == 0)) min = BIG_REAL; return(VAllReduce_Parallel(min, 3, comm)); } /* * ----------------------------------------------------------------- * private functions * ----------------------------------------------------------------- */ static realtype VAllReduce_Parallel(realtype d, int op, MPI_Comm comm) { /* * This function does a global reduction. The operation is * sum if op = 1, * max if op = 2, * min if op = 3. * The operation is over all processors in the communicator */ realtype out; #if NRNMPI_DYNAMICLOAD nrnmpi_dbl_allreduce_vec(&d, &out, 1, op); #else switch (op) { case 1: MPI_Allreduce(&d, &out, 1, PVEC_REAL_MPI_TYPE, MPI_SUM, comm); break; case 2: MPI_Allreduce(&d, &out, 1, PVEC_REAL_MPI_TYPE, MPI_MAX, comm); break; case 3: MPI_Allreduce(&d, &out, 1, PVEC_REAL_MPI_TYPE, MPI_MIN, comm); break; default: break; } #endif return(out); } static void VCopy_Parallel(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = *xd++; } static void VSum_Parallel(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = (*xd++) + (*yd++); } static void VDiff_Parallel(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = (*xd++) - (*yd++); } static void VNeg_Parallel(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = -(*xd++); } static void VScaleSum_Parallel(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) + (*yd++)); } static void VScaleDiff_Parallel(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) - (*yd++)); } static void VLin1_Parallel(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + (*yd++); } static void VLin2_Parallel(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); zd = NV_DATA_P(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) - (*yd++); } static void Vaxpy_Parallel(realtype a, N_Vector x, N_Vector y) { long int i, N; realtype *xd, *yd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); yd = NV_DATA_P(y); if (a == ONE) { for (i=0; i < N; i++) *yd++ += (*xd++); return; } if (a == -ONE) { for (i=0; i < N; i++) *yd++ -= (*xd++); return; } for (i=0; i < N; i++) *yd++ += a * (*xd++); } static void VScaleBy_Parallel(realtype a, N_Vector x) { long int i, N; realtype *xd; N = NV_LOCLENGTH_P(x); xd = NV_DATA_P(x); for (i=0; i < N; i++) *xd++ *= a; } neuron-7.5/src/sundials/shared/nvector_parallel.h000077500000000000000000000301601323325274500222700ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the main header file for the MPI-enabled implementation * of the NVECTOR module. * * Part I contains declarations specific to the parallel * implementation of the supplied NVECTOR module. * * Part II defines accessor macros that allow the user to efficiently * use the type N_Vector without making explicit references to the * underlying data structure. * * Part III contains the prototype for the constructor * N_VNew_Parallel as well as implementation-specific prototypes * for various useful vector operations. * * Notes: * * - The definition of the generic N_Vector structure can be * found in the header file shared/include/nvector.h. * * - The definition of the type realtype can be found in the * header file shared/include/sundialstypes.h, and it may be * changed (at the configuration stage) according to the user's * needs. The sundialstypes.h file also contains the definition * for the type booleantype. * * - N_Vector arguments to arithmetic vector operations need not * be distinct. For example, the following call: * * N_VLinearSum_Parallel(a,x,b,y,y); * * (which stores the result of the operation a*x+b*y in y) * is legal. * ----------------------------------------------------------------- */ #ifndef _NVECTOR_PARALLEL_H #define _NVECTOR_PARALLEL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include #if NRNMPI_DYNAMICLOAD #define MPI_DOUBLE double #define MPI_LONG long #define MPI_Comm int #else #include #endif #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * PART I: PARALLEL implementation of N_Vector * ----------------------------------------------------------------- */ /* define MPI data types */ #if defined(SUNDIALS_SINGLE_PRECISION) #define PVEC_REAL_MPI_TYPE MPI_FLOAT #elif defined(SUNDIALS_DOUBLE_PRECISION) #define PVEC_REAL_MPI_TYPE MPI_DOUBLE #elif defined(SUNDIALS_EXTENDED_PRECISION) #define PVEC_REAL_MPI_TYPE MPI_LONG_DOUBLE #endif #define PVEC_INTEGER_MPI_TYPE MPI_LONG /* parallel implementation of the N_Vector 'content' structure contains the global and local lengths of the vector, a pointer to an array of realtype components, the MPI communicator, and a flag indicating ownership of the data */ struct _N_VectorContent_Parallel { long int local_length; /* local vector length */ long int global_length; /* global vector length */ booleantype own_data; /* ownership of data */ realtype *data; /* local data array */ MPI_Comm comm; /* pointer to MPI communicator */ }; typedef struct _N_VectorContent_Parallel *N_VectorContent_Parallel; /* * ----------------------------------------------------------------- * PART II: macros NV_CONTENT_P, NV_DATA_P, NV_OWN_DATA_P, * NV_LOCLENGTH_P, NV_GLOBLENGTH_P,NV_COMM_P, and NV_Ith_P * ----------------------------------------------------------------- * In the descriptions below, the following user declarations * are assumed: * * N_Vector v; * long int v_len, s_len, i; * * (1) NV_CONTENT_P * * This routines gives access to the contents of the parallel * vector N_Vector. * * The assignment v_cont = NV_CONTENT_P(v) sets v_cont to be * a pointer to the parallel N_Vector content structure. * * (2) NV_DATA_P, NV_OWN_DATA_P, NV_LOCLENGTH_P, NV_GLOBLENGTH_P, * and NV_COMM_P * * These routines give access to the individual parts of * the content structure of a parallel N_Vector. * * The assignment v_data = NV_DATA_P(v) sets v_data to be * a pointer to the first component of the local data for * the vector v. The assignment NV_DATA_P(v) = data_v sets * the component array of v to be data_V by storing the * pointer data_v. * * The assignment v_llen = NV_LOCLENGTH_P(v) sets v_llen to * be the length of the local part of the vector v. The call * NV_LOCLENGTH_P(v) = llen_v sets the local length * of v to be llen_v. * * The assignment v_glen = NV_GLOBLENGTH_P(v) sets v_glen to * be the global length of the vector v. The call * NV_GLOBLENGTH_P(v) = glen_v sets the global length of v to * be glen_v. * * The assignment v_comm = NV_COMM_P(v) sets v_comm to be the * MPI communicator of the vector v. The assignment * NV_COMM_C(v) = comm_v sets the MPI communicator of v to be * comm_v. * * (3) NV_Ith_P * * In the following description, the components of the * local part of an N_Vector are numbered 0..n-1, where n * is the local length of (the local part of) v. * * The assignment r = NV_Ith_P(v,i) sets r to be the value * of the ith component of the local part of the vector v. * The assignment NV_Ith_P(v,i) = r sets the value of the * ith local component of v to be r. * * Note: When looping over the components of an N_Vector v, it is * more efficient to first obtain the component array via * v_data = NV_DATA_P(v) and then access v_data[i] within the * loop than it is to use NV_Ith_P(v,i) within the loop. * ----------------------------------------------------------------- */ #define NV_CONTENT_P(v) ( (N_VectorContent_Parallel)(v->content) ) #define NV_LOCLENGTH_P(v) ( NV_CONTENT_P(v)->local_length ) #define NV_GLOBLENGTH_P(v) ( NV_CONTENT_P(v)->global_length ) #define NV_OWN_DATA_P(v) ( NV_CONTENT_P(v)->own_data ) #define NV_DATA_P(v) ( NV_CONTENT_P(v)->data ) #define NV_COMM_P(v) ( NV_CONTENT_P(v)->comm ) #define NV_Ith_P(v,i) ( NV_DATA_P(v)[i] ) /* * ----------------------------------------------------------------- * PART III: functions exported by nvector_parallel * * CONSTRUCTORS: * N_VNew_Parallel * N_VNewEmpty_Parallel * N_VClone_Parallel * N_VCloneEmpty_Parallel * N_VMake_Parallel * N_VNewVectorArray_Parallel * N_VNewVectorArrayEmpty_Parallel * DESTRUCTORS: * N_VDestroy_Parallel * N_VDestroyVectorArray_Parallel * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Function : N_VNew_Parallel * ----------------------------------------------------------------- * This function creates and allocates memory for a parallel vector. * ----------------------------------------------------------------- */ N_Vector N_VNew_Parallel(MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VNewEmpty_Parallel * ----------------------------------------------------------------- * This function creates a new parallel N_Vector with an empty * (NULL) data array. * ----------------------------------------------------------------- */ N_Vector N_VNewEmpty_Parallel(MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VCloneEmpty_Parallel * ----------------------------------------------------------------- * This function creates a new parallel N_Vector with an empty (NULL) * data array using the vector w as a template * (sets own_data = FALSE). * ----------------------------------------------------------------- */ N_Vector N_VCloneEmpty_Parallel(N_Vector w); /* * ----------------------------------------------------------------- * Function : N_VMake_Parallel * ----------------------------------------------------------------- * This function creates and allocates memory for a parallel vector * with a user-supplied data array. * ----------------------------------------------------------------- */ N_Vector N_VMake_Parallel(MPI_Comm comm, long int local_length, long int global_length, realtype *v_data); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArray_Parallel * ----------------------------------------------------------------- * This function creates an array of 'count' parallel vectors. This * array of N_Vectors can be freed using N_VDestroyVectorArray * (defined by the generic NVECTOR module). * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArray_Parallel(int count, MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArrayEmpty_Parallel * ----------------------------------------------------------------- * This function creates an array of 'count' parallel vectors each * with an empty (NULL) data array. * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArrayEmpty_Parallel(int count, MPI_Comm comm, long int local_length, long int global_length); /* * ----------------------------------------------------------------- * Function : N_VDestroyVectorArray_Parallel * ----------------------------------------------------------------- * This function frees an array of N_Vector created with * N_VNewVectorArray_Parallel. * ----------------------------------------------------------------- */ void N_VDestroyVectorArray_Parallel(N_Vector *vs, int count); /* * ----------------------------------------------------------------- * Function : N_VPrint_Parallel * ----------------------------------------------------------------- * This function prints the content of a parallel vector to stdout. * ----------------------------------------------------------------- */ void N_VPrint_Parallel(N_Vector v); /* * ----------------------------------------------------------------- * parallel implementations of the vector operations * ----------------------------------------------------------------- */ N_Vector N_VClone_Parallel(N_Vector w); void N_VDestroy_Parallel(N_Vector v); void N_VSpace_Parallel(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer_Parallel(N_Vector v); void N_VSetArrayPointer_Parallel(realtype *v_data, N_Vector v); void N_VLinearSum_Parallel(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst_Parallel(realtype c, N_Vector z); void N_VProd_Parallel(N_Vector x, N_Vector y, N_Vector z); void N_VDiv_Parallel(N_Vector x, N_Vector y, N_Vector z); void N_VScale_Parallel(realtype c, N_Vector x, N_Vector z); void N_VAbs_Parallel(N_Vector x, N_Vector z); void N_VInv_Parallel(N_Vector x, N_Vector z); void N_VAddConst_Parallel(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd_Parallel(N_Vector x, N_Vector y); realtype N_VMaxNorm_Parallel(N_Vector x); realtype N_VWrmsNorm_Parallel(N_Vector x, N_Vector w); realtype N_VWrmsNormMask_Parallel(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin_Parallel(N_Vector x); realtype N_VWL2Norm_Parallel(N_Vector x, N_Vector w); realtype N_VL1Norm_Parallel(N_Vector x); void N_VCompare_Parallel(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest_Parallel(N_Vector x, N_Vector z); booleantype N_VConstrMask_Parallel(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient_Parallel(N_Vector num, N_Vector denom); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/nvector_serial.c000077500000000000000000000477221323325274500217620ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 2212 $ * $Date: 2008-09-08 16:32:26 +0200 (Mon, 08 Sep 2008) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a serial implementation * of the NVECTOR package. * ----------------------------------------------------------------- */ #include <../../../nrnconf.h> #if HAVE_POSIX_MEMALIGN #define HAVE_MEMALIGN 1 #endif #if HAVE_MEMALIGN #define _XOPEN_SOURCE 600 #endif #include #include #include "nvector_serial.h" #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define HALF RCONST(0.5) #define ONE RCONST(1.0) #define ONEPT5 RCONST(1.5) /* Private function prototypes */ /* z=x */ static void VCopy_Serial(N_Vector x, N_Vector z); /* z=x+y */ static void VSum_Serial(N_Vector x, N_Vector y, N_Vector z); /* z=x-y */ static void VDiff_Serial(N_Vector x, N_Vector y, N_Vector z); /* z=-x */ static void VNeg_Serial(N_Vector x, N_Vector z); /* z=c(x+y) */ static void VScaleSum_Serial(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=c(x-y) */ static void VScaleDiff_Serial(realtype c, N_Vector x, N_Vector y, N_Vector z); /* z=ax+y */ static void VLin1_Serial(realtype a, N_Vector x, N_Vector y, N_Vector z); /* z=ax-y */ static void VLin2_Serial(realtype a, N_Vector x, N_Vector y, N_Vector z); /* y <- ax+y */ static void Vaxpy_Serial(realtype a, N_Vector x, N_Vector y); /* x <- ax */ static void VScaleBy_Serial(realtype a, N_Vector x); /* * ----------------------------------------------------------------- * exported functions * ----------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- * Function to create a new empty serial vector */ N_Vector N_VNewEmpty_Serial(long int length) { N_Vector v; N_Vector_Ops ops; N_VectorContent_Serial content; /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = N_VClone_Serial; ops->nvdestroy = N_VDestroy_Serial; ops->nvspace = N_VSpace_Serial; ops->nvgetarraypointer = N_VGetArrayPointer_Serial; ops->nvsetarraypointer = N_VSetArrayPointer_Serial; ops->nvlinearsum = N_VLinearSum_Serial; ops->nvconst = N_VConst_Serial; ops->nvprod = N_VProd_Serial; ops->nvdiv = N_VDiv_Serial; ops->nvscale = N_VScale_Serial; ops->nvabs = N_VAbs_Serial; ops->nvinv = N_VInv_Serial; ops->nvaddconst = N_VAddConst_Serial; ops->nvdotprod = N_VDotProd_Serial; ops->nvmaxnorm = N_VMaxNorm_Serial; ops->nvwrmsnormmask = N_VWrmsNormMask_Serial; ops->nvwrmsnorm = N_VWrmsNorm_Serial; ops->nvmin = N_VMin_Serial; ops->nvwl2norm = N_VWL2Norm_Serial; ops->nvl1norm = N_VL1Norm_Serial; ops->nvcompare = N_VCompare_Serial; ops->nvinvtest = N_VInvTest_Serial; ops->nvconstrmask = N_VConstrMask_Serial; ops->nvminquotient = N_VMinQuotient_Serial; /* Create content */ content = (N_VectorContent_Serial) malloc(sizeof(struct _N_VectorContent_Serial)); if (content == NULL) {free(ops);free(v);return(NULL);} content->length = length; content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a new serial vector */ N_Vector N_VNew_Serial(long int length) { N_Vector v; realtype *data; v = N_VNewEmpty_Serial(length); if (v == NULL) return(NULL); /* Create data */ if (length > 0) { /* Allocate memory */ #if HAVE_MEMALIGN if (posix_memalign((void**)&data, 64, length*sizeof(realtype)) != 0) { N_VDestroy_Serial(v);return(NULL); } #else data = (realtype *) malloc(length * sizeof(realtype)); #endif if(data == NULL) {N_VDestroy_Serial(v);return(NULL);} /* Attach data */ NV_OWN_DATA_S(v) = TRUE; NV_DATA_S(v) = data; } return(v); } /* ---------------------------------------------------------------------------- * Function to clone from a template a new vector with empty (NULL) data array */ N_Vector N_VCloneEmpty_Serial(N_Vector w) { N_Vector v; N_Vector_Ops ops; N_VectorContent_Serial content; if (w == NULL) return(NULL); /* Create vector */ v = (N_Vector) malloc(sizeof *v); if (v == NULL) return(NULL); /* Create vector operation structure */ ops = (N_Vector_Ops) malloc(sizeof(struct _generic_N_Vector_Ops)); if (ops == NULL) {free(v);return(NULL);} ops->nvclone = w->ops->nvclone; ops->nvdestroy = w->ops->nvdestroy; ops->nvspace = w->ops->nvspace; ops->nvgetarraypointer = w->ops->nvgetarraypointer; ops->nvsetarraypointer = w->ops->nvsetarraypointer; ops->nvlinearsum = w->ops->nvlinearsum; ops->nvconst = w->ops->nvconst; ops->nvprod = w->ops->nvprod; ops->nvdiv = w->ops->nvdiv; ops->nvscale = w->ops->nvscale; ops->nvabs = w->ops->nvabs; ops->nvinv = w->ops->nvinv; ops->nvaddconst = w->ops->nvaddconst; ops->nvdotprod = w->ops->nvdotprod; ops->nvmaxnorm = w->ops->nvmaxnorm; ops->nvwrmsnormmask = w->ops->nvwrmsnormmask; ops->nvwrmsnorm = w->ops->nvwrmsnorm; ops->nvmin = w->ops->nvmin; ops->nvwl2norm = w->ops->nvwl2norm; ops->nvl1norm = w->ops->nvl1norm; ops->nvcompare = w->ops->nvcompare; ops->nvinvtest = w->ops->nvinvtest; ops->nvconstrmask = w->ops->nvconstrmask; ops->nvminquotient = w->ops->nvminquotient; /* Create content */ content = (N_VectorContent_Serial) malloc(sizeof(struct _N_VectorContent_Serial)); if (content == NULL) {free(ops);free(v);return(NULL);} content->length = NV_LENGTH_S(w); content->own_data = FALSE; content->data = NULL; /* Attach content and ops */ v->content = content; v->ops = ops; return(v); } /* ---------------------------------------------------------------------------- * Function to create a serial N_Vector with user data component */ N_Vector N_VMake_Serial(long int length, realtype *v_data) { N_Vector v; v = N_VNewEmpty_Serial(length); if (v == NULL) return(NULL); if (length > 0) { /* Attach data */ NV_OWN_DATA_S(v) = FALSE; NV_DATA_S(v) = v_data; } return(v); } /* ---------------------------------------------------------------------------- * Function to create an array of new serial vectors. */ N_Vector *N_VNewVectorArray_Serial(int count, long int length) { N_Vector *vs; int j; if (count <= 0) return(NULL); vs = (N_Vector *) malloc(count * sizeof(N_Vector)); if(vs == NULL) return(NULL); for (j=0; j 0) { /* Allocate memory */ #if HAVE_MEMALIGN if (posix_memalign((void**)&data, 64, length*sizeof(realtype)) != 0) { N_VDestroy_Serial(v);return(NULL); } #else data = (realtype *) malloc(length * sizeof(realtype)); #endif if(data == NULL) {N_VDestroy_Serial(v);return(NULL);} /* Attach data */ NV_OWN_DATA_S(v) = TRUE; NV_DATA_S(v) = data; } return(v); } void N_VDestroy_Serial(N_Vector v) { if (NV_OWN_DATA_S(v) == TRUE) free(NV_DATA_S(v)); free(v->content); free(v->ops); free(v); } void N_VSpace_Serial(N_Vector v, long int *lrw, long int *liw) { *lrw = NV_LENGTH_S(v); *liw = 1; } realtype *N_VGetArrayPointer_Serial(N_Vector v) { realtype *v_data; v_data = NV_DATA_S(v); return(v_data); } void N_VSetArrayPointer_Serial(realtype *v_data, N_Vector v) { if (NV_LENGTH_S(v) > 0) NV_DATA_S(v) = v_data; } void N_VLinearSum_Serial(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z) { long int i, N; realtype c, *xd, *yd, *zd; N_Vector v1, v2; booleantype test; if ((b == ONE) && (z == y)) { /* BLAS usage: axpy y <- ax+y */ Vaxpy_Serial(a,x,y); return; } if ((a == ONE) && (z == x)) { /* BLAS usage: axpy x <- by+x */ Vaxpy_Serial(b,y,x); return; } /* Case: a == b == 1.0 */ if ((a == ONE) && (b == ONE)) { VSum_Serial(x, y, z); return; } /* Cases: (1) a == 1.0, b = -1.0, (2) a == -1.0, b == 1.0 */ if ((test = ((a == ONE) && (b == -ONE))) || ((a == -ONE) && (b == ONE))) { v1 = test ? y : x; v2 = test ? x : y; VDiff_Serial(v2, v1, z); return; } /* Cases: (1) a == 1.0, b == other or 0.0, (2) a == other or 0.0, b == 1.0 */ /* if a or b is 0.0, then user should have called N_VScale */ if ((test = (a == ONE)) || (b == ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin1_Serial(c, v1, v2, z); return; } /* Cases: (1) a == -1.0, b != 1.0, (2) a != 1.0, b == -1.0 */ if ((test = (a == -ONE)) || (b == -ONE)) { c = test ? b : a; v1 = test ? y : x; v2 = test ? x : y; VLin2_Serial(c, v1, v2, z); return; } /* Case: a == b */ /* catches case both a and b are 0.0 - user should have called N_VConst */ if (a == b) { VScaleSum_Serial(a, x, y, z); return; } /* Case: a == -b */ if (a == -b) { VScaleDiff_Serial(a, x, y, z); return; } /* Do all cases not handled above: (1) a == other, b == 0.0 - user should have called N_VScale (2) a == 0.0, b == other - user should have called N_VScale (3) a,b == other, a !=b, a != -b */ N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + b * (*yd++); } void N_VConst_Serial(realtype c, N_Vector z) { long int i, N; realtype *zd; N = NV_LENGTH_S(z); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = c; } void N_VProd_Serial(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = (*xd++) * (*yd++); } void N_VDiv_Serial(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = (*xd++) / (*yd++); } void N_VScale_Serial(realtype c, N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; if (z == x) { /* BLAS usage: scale x <- cx */ VScaleBy_Serial(c, x); return; } if (c == ONE) { VCopy_Serial(x, z); } else if (c == -ONE) { VNeg_Serial(x, z); } else { N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = c * (*xd++); } } void N_VAbs_Serial(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++, xd++, zd++) *zd = ABS(*xd); } void N_VInv_Serial(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = ONE / (*xd++); } void N_VAddConst_Serial(N_Vector x, realtype b, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = (*xd++) + b; } realtype N_VDotProd_Serial(N_Vector x, N_Vector y) { long int i, N; realtype sum = ZERO, *xd, *yd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); for (i=0; i < N; i++) sum += (*xd++) * (*yd++); return(sum); } realtype N_VMaxNorm_Serial(N_Vector x) { long int i, N; realtype max = ZERO, *xd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); for (i=0; i < N; i++, xd++) { if (ABS(*xd) > max) max = ABS(*xd); } return(max); } realtype N_VWrmsNorm_Serial(N_Vector x, N_Vector w) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return(RSqrt(sum / N)); } realtype N_VWrmsNormMask_Serial(N_Vector x, N_Vector w, N_Vector id) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd, *idd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); idd = NV_DATA_S(id); for (i=0; i < N; i++) { if (idd[i] > ZERO) { prodi = xd[i] * wd[i]; sum += prodi * prodi; } } return(RSqrt(sum / N)); } realtype N_VMin_Serial(N_Vector x) { long int i, N; realtype min, *xd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); min = xd[0]; xd++; for (i=1; i < N; i++, xd++) { if ((*xd) < min) min = *xd; } return(min); } realtype N_VWL2Norm_Serial(N_Vector x, N_Vector w) { long int i, N; realtype sum = ZERO, prodi, *xd, *wd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); wd = NV_DATA_S(w); for (i=0; i < N; i++) { prodi = (*xd++) * (*wd++); sum += prodi * prodi; } return(RSqrt(sum)); } realtype N_VL1Norm_Serial(N_Vector x) { long int i, N; realtype sum = ZERO, *xd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); for (i=0; i= c) ? ONE : ZERO; } } booleantype N_VInvTest_Serial(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++) { if (*xd == ZERO) return(FALSE); *zd++ = ONE / (*xd++); } return(TRUE); } booleantype N_VConstrMask_Serial(N_Vector c, N_Vector x, N_Vector m) { long int i, N; booleantype test; realtype *cd, *xd, *md; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); cd = NV_DATA_S(c); md = NV_DATA_S(m); test = TRUE; for (i=0; i ONEPT5 || (*cd) < -ONEPT5) { if ( (*xd)*(*cd) <= ZERO) {test = FALSE; *md = ONE; } continue; } if ( (*cd) > HALF || (*cd) < -HALF) { if ( (*xd)*(*cd) < ZERO ) {test = FALSE; *md = ONE; } } } return(test); } realtype N_VMinQuotient_Serial(N_Vector num, N_Vector denom) { booleantype notEvenOnce; long int i, N; realtype *nd, *dd, min=0.0; N = NV_LENGTH_S(num); nd = NV_DATA_S(num); dd = NV_DATA_S(denom); notEvenOnce = TRUE; for (i = 0; i < N; i++, nd++, dd++) { if (*dd == ZERO) continue; else { if (notEvenOnce) { min = *nd / *dd ; notEvenOnce = FALSE; } else min = MIN(min, (*nd) / (*dd)); } } if (notEvenOnce || (N == 0)) min = BIG_REAL; return(min); } /* * ----------------------------------------------------------------- * private functions * ----------------------------------------------------------------- */ static void VCopy_Serial(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = *xd++; } static void VSum_Serial(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = (*xd++) + (*yd++); } static void VDiff_Serial(N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = (*xd++) - (*yd++); } static void VNeg_Serial(N_Vector x, N_Vector z) { long int i, N; realtype *xd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = -(*xd++); } static void VScaleSum_Serial(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) + (*yd++)); } static void VScaleDiff_Serial(realtype c, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = c * ((*xd++) - (*yd++)); } static void VLin1_Serial(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) + (*yd++); } static void VLin2_Serial(realtype a, N_Vector x, N_Vector y, N_Vector z) { long int i, N; realtype *xd, *yd, *zd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); zd = NV_DATA_S(z); for (i=0; i < N; i++) *zd++ = a * (*xd++) - (*yd++); } static void Vaxpy_Serial(realtype a, N_Vector x, N_Vector y) { long int i, N; realtype *xd, *yd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); yd = NV_DATA_S(y); if (a == ONE) { for (i=0; i < N; i++) *yd++ += (*xd++); return; } if (a == -ONE) { for (i=0; i < N; i++) *yd++ -= (*xd++); return; } for (i=0; i < N; i++) *yd++ += a * (*xd++); } static void VScaleBy_Serial(realtype a, N_Vector x) { long int i, N; realtype *xd; N = NV_LENGTH_S(x); xd = NV_DATA_S(x); for (i=0; i < N; i++) *xd++ *= a; } neuron-7.5/src/sundials/shared/nvector_serial.h000077500000000000000000000233701323325274500217600ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh, Radu Serban, * and Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for the serial implementation of the * NVECTOR module. * * Part I contains declarations specific to the serial * implementation of the supplied NVECTOR module. * * Part II defines accessor macros that allow the user to * efficiently use the type N_Vector without making explicit * references to the underlying data structure. * * Part III contains the prototype for the constructor N_VNew_Serial * as well as implementation-specific prototypes for various useful * vector operations. * * Notes: * * - The definition of the generic N_Vector structure can be found * in the header file shared/include/nvector.h. * * - The definition of the type realtype can be found in the * header file shared/include/sundialstypes.h, and it may be * changed (at the configuration stage) according to the user's * needs. The sundialstypes.h file also contains the definition * for the type booleantype. * * - N_Vector arguments to arithmetic vector operations need not * be distinct. For example, the following call: * * N_VLinearSum_Serial(a,x,b,y,y); * * (which stores the result of the operation a*x+b*y in y) * is legal. * ----------------------------------------------------------------- */ #ifndef _NVECTOR_SERIAL_H #define _NVECTOR_SERIAL_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "nvector.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * PART I: SERIAL implementation of N_Vector * ----------------------------------------------------------------- */ /* serial implementation of the N_Vector 'content' structure contains the length of the vector, a pointer to an array of realtype components, and a flag indicating ownership of the data */ struct _N_VectorContent_Serial { long int length; booleantype own_data; realtype *data; }; typedef struct _N_VectorContent_Serial *N_VectorContent_Serial; /* * ----------------------------------------------------------------- * PART II: macros NV_CONTENT_S, NV_DATA_S, NV_OWN_DATA_S, * NV_LENGTH_S, and NV_Ith_S * ----------------------------------------------------------------- * In the descriptions below, the following user declarations * are assumed: * * N_Vector v; * long int i; * * (1) NV_CONTENT_S * * This routines gives access to the contents of the serial * vector N_Vector. * * The assignment v_cont = NV_CONTENT_S(v) sets v_cont to be * a pointer to the serial N_Vector content structure. * * (2) NV_DATA_S NV_OWN_DATA_S and NV_LENGTH_S * * These routines give access to the individual parts of * the content structure of a serial N_Vector. * * The assignment v_data = NV_DATA_S(v) sets v_data to be * a pointer to the first component of v. The assignment * NV_DATA_S(v) = data_V sets the component array of v to * be data_v by storing the pointer data_v. * * The assignment v_len = NV_LENGTH_S(v) sets v_len to be * the length of v. The call NV_LENGTH_S(v) = len_v sets * the length of v to be len_v. * * (3) NV_Ith_S * * In the following description, the components of an * N_Vector are numbered 0..n-1, where n is the length of v. * * The assignment r = NV_Ith_S(v,i) sets r to be the value of * the ith component of v. The assignment NV_Ith_S(v,i) = r * sets the value of the ith component of v to be r. * * Note: When looping over the components of an N_Vector v, it is * more efficient to first obtain the component array via * v_data = NV_DATA_S(v) and then access v_data[i] within the * loop than it is to use NV_Ith_S(v,i) within the loop. * ----------------------------------------------------------------- */ #define NV_CONTENT_S(v) ( (N_VectorContent_Serial)(v->content) ) #define NV_LENGTH_S(v) ( NV_CONTENT_S(v)->length ) #define NV_OWN_DATA_S(v) ( NV_CONTENT_S(v)->own_data ) #define NV_DATA_S(v) ( NV_CONTENT_S(v)->data ) #define NV_Ith_S(v,i) ( NV_DATA_S(v)[i] ) /* * ----------------------------------------------------------------- * PART III: functions exported by nvector_serial * * CONSTRUCTORS: * N_VNew_Serial * N_VNewEmpty_Serial * N_VClone_Serial * N_VCloneEmpty_Serial * N_VMake_Serial * N_VNewVectorArray_Serial * N_VNewVectorArrayEmpty_Serial * DESTRUCTORS: * N_VDestroy_Serial * N_VDestroyVectorArray_Serial * ----------------------------------------------------------------- */ /* * ----------------------------------------------------------------- * Function : N_VNew_Serial * ----------------------------------------------------------------- * This function creates and allocates memory for a serial vector. * ----------------------------------------------------------------- */ N_Vector N_VNew_Serial(long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VNewEmpty_Serial * ----------------------------------------------------------------- * This function creates a new serial N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VNewEmpty_Serial(long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VCloneEmpty_Serial * ----------------------------------------------------------------- * This function creates a new serial N_Vector with an empty (NULL) * data array. * ----------------------------------------------------------------- */ N_Vector N_VCloneEmpty_Serial(N_Vector w); /* * ----------------------------------------------------------------- * Function : N_VMake_Serial * ----------------------------------------------------------------- * This function creates and allocates memory for a serial vector * with a user-supplied data array. * ----------------------------------------------------------------- */ N_Vector N_VMake_Serial(long int vec_length, realtype *v_data); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArray_Serial * ----------------------------------------------------------------- * This function creates an array of 'count' serial vectors. This * array of N_Vectors can be freed using N_VDestroyVectorArray * (defined by the generic NVECTOR module). * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArray_Serial(int count, long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VNewVectorArrayEmpty_Serial * ----------------------------------------------------------------- * This function creates an array of 'count' serial vectors each * with an empty (NULL) data array. * ----------------------------------------------------------------- */ N_Vector *N_VNewVectorArrayEmpty_Serial(int count, long int vec_length); /* * ----------------------------------------------------------------- * Function : N_VDestroyVectorArray_Serial * ----------------------------------------------------------------- * This function frees an array of N_Vector created with * N_VNewVectorArray_Serial. * ----------------------------------------------------------------- */ void N_VDestroyVectorArray_Serial(N_Vector *vs, int count); /* * ----------------------------------------------------------------- * Function : N_VPrint_Serial * ----------------------------------------------------------------- * This function prints the content of a serial vector to stdout. * ----------------------------------------------------------------- */ void N_VPrint_Serial(N_Vector v); /* * ----------------------------------------------------------------- * serial implementations of various useful vector operations * ----------------------------------------------------------------- */ N_Vector N_VClone_Serial(N_Vector w); void N_VDestroy_Serial(N_Vector v); void N_VSpace_Serial(N_Vector v, long int *lrw, long int *liw); realtype *N_VGetArrayPointer_Serial(N_Vector v); void N_VSetArrayPointer_Serial(realtype *v_data, N_Vector v); void N_VLinearSum_Serial(realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z); void N_VConst_Serial(realtype c, N_Vector z); void N_VProd_Serial(N_Vector x, N_Vector y, N_Vector z); void N_VDiv_Serial(N_Vector x, N_Vector y, N_Vector z); void N_VScale_Serial(realtype c, N_Vector x, N_Vector z); void N_VAbs_Serial(N_Vector x, N_Vector z); void N_VInv_Serial(N_Vector x, N_Vector z); void N_VAddConst_Serial(N_Vector x, realtype b, N_Vector z); realtype N_VDotProd_Serial(N_Vector x, N_Vector y); realtype N_VMaxNorm_Serial(N_Vector x); realtype N_VWrmsNorm_Serial(N_Vector x, N_Vector w); realtype N_VWrmsNormMask_Serial(N_Vector x, N_Vector w, N_Vector id); realtype N_VMin_Serial(N_Vector x); realtype N_VWL2Norm_Serial(N_Vector x, N_Vector w); realtype N_VL1Norm_Serial(N_Vector x); void N_VCompare_Serial(realtype c, N_Vector x, N_Vector z); booleantype N_VInvTest_Serial(N_Vector x, N_Vector z); booleantype N_VConstrMask_Serial(N_Vector c, N_Vector x, N_Vector m); realtype N_VMinQuotient_Serial(N_Vector num, N_Vector denom); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/smalldense.c000077500000000000000000000117321323325274500210620ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen and Alan C. Hindmarsh @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a generic DENSE linear * solver package, intended for small dense matrices. * ----------------------------------------------------------------- */ #include #include #include "smalldense.h" #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* Implementation */ realtype **denalloc(long int n) { long int j; realtype **a; if (n <= 0) return(NULL); a = (realtype **) malloc(n * sizeof(realtype *)); if (a == NULL) return(NULL); a[0] = (realtype *) malloc(n * n * sizeof(realtype)); if (a[0] == NULL) { free(a); return(NULL); } for (j=1; j < n; j++) a[j] = a[0] + j * n; return(a); } long int *denallocpiv(long int n) { if (n <= 0) return(NULL); return((long int *) malloc(n * sizeof(long int))); } long int gefa(realtype **a, long int n, long int *p) { long int i, j, k, l; realtype *col_j, *col_k, *diag_k; realtype temp, mult, a_kj; booleantype swap; /* k = elimination step number */ for (k=0; k < n-1; k++, p++) { col_k = a[k]; diag_k = col_k + k; /* find l = pivot row number */ l=k; for (i=k+1; i < n; i++) if (ABS(col_k[i]) > ABS(col_k[l])) l=i; *p = l; /* check for zero pivot element */ if (col_k[l] == ZERO) return(k+1); /* swap a(l,k) and a(k,k) if necessary */ if ( (swap = (l != k) )) { temp = col_k[l]; col_k[l] = *diag_k; *diag_k = temp; } /* Scale the elements below the diagonal in */ /* column k by -1.0 / a(k,k). After the above swap, */ /* a(k,k) holds the pivot element. This scaling */ /* stores the pivot row multipliers -a(i,k)/a(k,k) */ /* in a(i,k), i=k+1, ..., n-1. */ mult = -ONE / (*diag_k); for(i=k+1; i < n; i++) col_k[i] *= mult; /* row_i = row_i - [a(i,k)/a(k,k)] row_k, i=k+1, ..., n-1 */ /* row k is the pivot row after swapping with row l. */ /* The computation is done one column at a time, */ /* column j=k+1, ..., n-1. */ for (j=k+1; j < n; j++) { col_j = a[j]; a_kj = col_j[l]; /* Swap the elements a(k,j) and a(k,l) if l!=k. */ if (swap) { col_j[l] = col_j[k]; col_j[k] = a_kj; } /* a(i,j) = a(i,j) - [a(i,k)/a(k,k)]*a(k,j) */ /* a_kj = a(k,j), col_k[i] = - a(i,k)/a(k,k) */ if (a_kj != ZERO) { for (i=k+1; i < n; i++) col_j[i] += a_kj * col_k[i]; } } } /* set the last pivot row to be n-1 and check for a zero pivot */ *p = n-1; if (a[n-1][n-1] == ZERO) return(n); /* return 0 to indicate success */ return(0); } void gesl(realtype **a, long int n, long int *p, realtype *b) { long int k, l, i; realtype mult, *col_k; /* Solve Ly = Pb, store solution y in b */ for (k=0; k < n-1; k++) { l = p[k]; mult = b[l]; if (l != k) { b[l] = b[k]; b[k] = mult; } col_k = a[k]; for (i=k+1; i < n; i++) b[i] += mult*col_k[i]; } /* Solve Ux = y, store solution x in b */ for (k=n-1; k >= 0; k--) { col_k = a[k]; b[k] /= col_k[k]; mult = -b[k]; for (i=0; i < k; i++) b[i] += mult*col_k[i]; } } void denzero(realtype **a, long int n) { long int i, j; realtype *col_j; for (j=0; j < n; j++) { col_j = a[j]; for (i=0; i < n; i++) col_j[i] = ZERO; } } void dencopy(realtype **a, realtype **b, long int n) { long int i, j; realtype *a_col_j, *b_col_j; for (j=0; j < n; j++) { a_col_j = a[j]; b_col_j = b[j]; for (i=0; i < n; i++) b_col_j[i] = a_col_j[i]; } } void denscale(realtype c, realtype **a, long int n) { long int i, j; realtype *col_j; for (j=0; j < n; j++) { col_j = a[j]; for (i=0; i < n; i++) col_j[i] *= c; } } void denaddI(realtype **a, long int n) { long int i; for (i=0; i < n; i++) a[i][i] += ONE; } void denfreepiv(long int *p) { free(p); } void denfree(realtype **a) { free(a[0]); free(a); } void denprint(realtype **a, long int n) { long int i, j; printf("\n"); for (i=0; i < n; i++) { for (j=0; j < n; j++) { #if defined(SUNDIALS_EXTENDED_PRECISION) printf("%10Lg", a[j][i]); #elif defined(SUNDIALS_DOUBLE_PRECISION) printf("%10lg", a[j][i]); #else printf("%10g", a[j][i]); #endif } printf("\n"); } printf("\n"); } neuron-7.5/src/sundials/shared/smalldense.h000077500000000000000000000205271323325274500210710ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen and Alan C. Hindmarsh @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for a generic DENSE linear solver * package, intended for small dense matrices. These routines * use the type realtype** for dense matrix arguments. * * These routines begin with "den" (except for the factor and * solve routines which are called gefa and gesl, respectively). * The underlying matrix storage is described in the * documentation for denalloc. * ----------------------------------------------------------------- */ #ifndef _SMALLDENSE_H #define _SMALLDENSE_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Function : denalloc * ----------------------------------------------------------------- * Usage : realtype **a; * a = denalloc(n); * if (a == NULL) ... memory request failed * ----------------------------------------------------------------- * denalloc(n) allocates storage for an n by n dense matrix. It * returns a pointer to the newly allocated storage if * successful. If the memory request cannot be satisfied, then * denalloc returns NULL. The underlying type of the dense matrix * returned is realtype **. If we allocate a dense matrix * realtype **a by a = denalloc(n), then a[j][i] references the * (i,j)th element of the matrix a, 0 <= i,j <= n-1, and a[j] is * a pointer to the first element in the jth column of a. * The location a[0] contains a pointer to n^2 contiguous * locations which contain the elements of a. * ----------------------------------------------------------------- */ realtype **denalloc(long int n); /* * ----------------------------------------------------------------- * Function : denallocpiv * ----------------------------------------------------------------- * Usage : long int *pivot; * pivot = denallocpiv(n); * if (pivot == NULL) ... memory request failed * ----------------------------------------------------------------- * denallocpiv(n) allocates an array of n long int. It returns * a pointer to the first element in the array if successful. * It returns NULL if the memory request could not be satisfied. * ----------------------------------------------------------------- */ long int *denallocpiv(long int n); /* * ----------------------------------------------------------------- * Function : gefa * ----------------------------------------------------------------- * Usage : long int ier; * ier = gefa(a,n,p); * if (ier > 0) ... zero element encountered during * the factorization * ----------------------------------------------------------------- * gefa(a,n,p) factors the n by n dense matrix a. It overwrites * the elements of a with its LU factors and keeps track of the * pivot rows chosen in the pivot array p. * * A successful LU factorization leaves the matrix a and the * pivot array p with the following information: * * (1) p[k] contains the row number of the pivot element chosen * at the beginning of elimination step k, k=0, 1, ..., n-1. * * (2) If the unique LU factorization of a is given by Pa = LU, * where P is a permutation matrix, L is a lower triangular * matrix with all 1's on the diagonal, and U is an upper * triangular matrix, then the upper triangular part of a * (including its diagonal) contains U and the strictly lower * triangular part of a contains the multipliers, I-L. * * gefa returns 0 if successful. Otherwise it encountered a zero * diagonal element during the factorization. In this case it * returns the column index (numbered from one) at which it * encountered the zero. * ----------------------------------------------------------------- */ long int gefa(realtype **a, long int n, long int *p); /* * ----------------------------------------------------------------- * Function : gesl * ----------------------------------------------------------------- * Usage : realtype *b; * ier = gefa(a,n,p); * if (ier == 0) gesl(a,n,p,b); * ----------------------------------------------------------------- * gesl(a,n,p,b) solves the n by n linear system ax = b. It * assumes that a has been LU factored and the pivot array p has * been set by a successful call to gefa(a,n,p). The solution x * is written into the b array. * ----------------------------------------------------------------- */ void gesl(realtype **a, long int n, long int *p, realtype *b); /* * ----------------------------------------------------------------- * Function : denzero * ----------------------------------------------------------------- * Usage : denzero(a,n); * ----------------------------------------------------------------- * denzero(a,n) sets all the elements of the n by n dense matrix * a to be 0.0. * ----------------------------------------------------------------- */ void denzero(realtype **a, long int n); /* * ----------------------------------------------------------------- * Function : dencopy * ----------------------------------------------------------------- * Usage : dencopy(a,b,n); * ----------------------------------------------------------------- * dencopy(a,b,n) copies the n by n dense matrix a into the * n by n dense matrix b. * ----------------------------------------------------------------- */ void dencopy(realtype **a, realtype **b, long int n); /* * ----------------------------------------------------------------- * Function : denscale * ----------------------------------------------------------------- * Usage : denscale(c,a,n); * ----------------------------------------------------------------- * denscale(c,a,n) scales every element in the n by n dense * matrix a by c. * ----------------------------------------------------------------- */ void denscale(realtype c, realtype **a, long int n); /* * ----------------------------------------------------------------- * Function : denaddI * ----------------------------------------------------------------- * Usage : denaddI(a,n); * ----------------------------------------------------------------- * denaddI(a,n) increments the n by n dense matrix a by the * identity matrix. * ----------------------------------------------------------------- */ void denaddI(realtype **a, long int n); /* * ----------------------------------------------------------------- * Function : denfreepiv * ----------------------------------------------------------------- * Usage : denfreepiv(p); * ----------------------------------------------------------------- * denfreepiv(p) frees the pivot array p allocated by * denallocpiv. * ----------------------------------------------------------------- */ void denfreepiv(long int *p); /* * ----------------------------------------------------------------- * Function : denfree * ----------------------------------------------------------------- * Usage : denfree(a); * ----------------------------------------------------------------- * denfree(a) frees the dense matrix a allocated by denalloc. * ----------------------------------------------------------------- */ void denfree(realtype **a); /* * ----------------------------------------------------------------- * Function : denprint * ----------------------------------------------------------------- * Usage : denprint(a,n); * ----------------------------------------------------------------- * denprint(a,n) prints the n by n dense matrix a to standard * output as it would normally appear on paper. It is intended as * a debugging tool with small values of n. The elements are * printed using the %g/lg/Lg option. A blank line is printed * before and after the matrix. * ----------------------------------------------------------------- */ void denprint(realtype **a, long int n); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/spgmr.c000077500000000000000000000273201323325274500200630ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for the scaled preconditioned * GMRES (SPGMR) iterative linear solver. * ----------------------------------------------------------------- */ #include #include #include "iterative.h" #include "nvector.h" #include "spgmr.h" #include "sundialsmath.h" #include "sundialstypes.h" /* * ----------------------------------------------------------------- * private constants * ----------------------------------------------------------------- */ #define ZERO RCONST(0.0) #define ONE RCONST(1.0) /* * ----------------------------------------------------------------- * Function : SpgmrMalloc * ----------------------------------------------------------------- */ SpgmrMem SpgmrMalloc(int l_max, N_Vector vec_tmpl) { SpgmrMem mem; N_Vector *V, xcor, vtemp; realtype **Hes, *givens, *yg; int k, i; /* Check the input parameters. */ if (l_max <= 0) return(NULL); /* Get memory for the Krylov basis vectors V[0], ..., V[l_max]. */ V = N_VCloneVectorArray(l_max+1, vec_tmpl); if (V == NULL) return(NULL); /* Get memory for the Hessenberg matrix Hes. */ Hes = (realtype **) malloc((l_max+1)*sizeof(realtype *)); if (Hes == NULL) { N_VDestroyVectorArray(V, l_max+1); return(NULL); } for (k = 0; k <= l_max; k++) { Hes[k] = (realtype *) malloc(l_max*sizeof(realtype)); if (Hes[k] == NULL) { for (i = 0; i < k; i++) free(Hes[i]); N_VDestroyVectorArray(V, l_max+1); return(NULL); } } /* Get memory for Givens rotation components. */ givens = (realtype *) malloc(2*l_max*sizeof(realtype)); if (givens == NULL) { for (i = 0; i <= l_max; i++) free(Hes[i]); N_VDestroyVectorArray(V, l_max+1); return(NULL); } /* Get memory to hold the correction to z_tilde. */ xcor = N_VClone(vec_tmpl); if (xcor == NULL) { free(givens); for (i = 0; i <= l_max; i++) free(Hes[i]); N_VDestroyVectorArray(V, l_max+1); return(NULL); } /* Get memory to hold SPGMR y and g vectors. */ yg = (realtype *) malloc((l_max+1)*sizeof(realtype)); if (yg == NULL) { N_VDestroy(xcor); free(givens); for (i = 0; i <= l_max; i++) free(Hes[i]); N_VDestroyVectorArray(V, l_max+1); return(NULL); } /* Get an array to hold a temporary vector. */ vtemp = N_VClone(vec_tmpl); if (vtemp == NULL) { free(yg); N_VDestroy(xcor); free(givens); for (i = 0; i <= l_max; i++) free(Hes[i]); N_VDestroyVectorArray(V, l_max+1); return(NULL); } /* Get memory for an SpgmrMemRec containing SPGMR matrices and vectors. */ mem = (SpgmrMem) malloc(sizeof(SpgmrMemRec)); if (mem == NULL) { N_VDestroy(vtemp); free(yg); N_VDestroy(xcor); free(givens); for (i = 0; i <= l_max; i++) free(Hes[i]); N_VDestroyVectorArray(V, l_max+1); return(NULL); } /* Set the fields of mem. */ mem->l_max = l_max; mem->V = V; mem->Hes = Hes; mem->givens = givens; mem->xcor = xcor; mem->yg = yg; mem->vtemp = vtemp; /* Return the pointer to SPGMR memory. */ return(mem); } /* * ----------------------------------------------------------------- * Function : SpgmrSolve * ----------------------------------------------------------------- */ int SpgmrSolve(SpgmrMem mem, void *A_data, N_Vector x, N_Vector b, int pretype, int gstype, realtype delta, int max_restarts, void *P_data, N_Vector s1, N_Vector s2, ATimesFn atimes, PSolveFn psolve, realtype *res_norm, int *nli, int *nps) { N_Vector *V, xcor, vtemp; realtype **Hes, *givens, *yg; realtype beta, rotation_product, r_norm, s_product, rho=0.0; booleantype preOnLeft, preOnRight, scale2, scale1, converged; int i, j, k, l, l_plus_1, l_max, krydim, ier, ntries; if (mem == NULL) return(SPGMR_MEM_NULL); /* Initialize some variables */ l_plus_1 = 0; krydim = 0; /* Make local copies of mem variables. */ l_max = mem->l_max; V = mem->V; Hes = mem->Hes; givens = mem->givens; xcor = mem->xcor; yg = mem->yg; vtemp = mem->vtemp; *nli = *nps = 0; /* Initialize counters */ converged = FALSE; /* Initialize converged flag */ if (max_restarts < 0) max_restarts = 0; if ((pretype != PREC_LEFT) && (pretype != PREC_RIGHT) && (pretype != PREC_BOTH)) pretype = PREC_NONE; preOnLeft = ((pretype == PREC_LEFT) || (pretype == PREC_BOTH)); preOnRight = ((pretype == PREC_RIGHT) || (pretype == PREC_BOTH)); scale1 = (s1 != NULL); scale2 = (s2 != NULL); /* Set vtemp and V[0] to initial (unscaled) residual r_0 = b - A*x_0. */ if (N_VDotProd(x, x) == ZERO) { N_VScale(ONE, b, vtemp); } else { if (atimes(A_data, x, vtemp) != 0) return(SPGMR_ATIMES_FAIL); N_VLinearSum(ONE, b, -ONE, vtemp, vtemp); } N_VScale(ONE, vtemp, V[0]); /* Apply left preconditioner and left scaling to V[0] = r_0. */ if (preOnLeft) { ier = psolve(P_data, V[0], vtemp, PREC_LEFT); (*nps)++; if (ier != 0) return((ier < 0) ? SPGMR_PSOLVE_FAIL_UNREC : SPGMR_PSOLVE_FAIL_REC); } else { N_VScale(ONE, V[0], vtemp); } if (scale1) { N_VProd(s1, vtemp, V[0]); } else { N_VScale(ONE, vtemp, V[0]); } /* Set r_norm = beta to L2 norm of V[0] = s1 P1_inv r_0, and return if small. */ *res_norm = r_norm = beta = RSqrt(N_VDotProd(V[0], V[0])); if (r_norm <= delta) return(SPGMR_SUCCESS); /* Set xcor = 0. */ N_VConst(ZERO, xcor); /* Begin outer iterations: up to (max_restarts + 1) attempts. */ for (ntries = 0; ntries <= max_restarts; ntries++) { /* Initialize the Hessenberg matrix Hes and Givens rotation product. Normalize the initial vector V[0]. */ for (i = 0; i <= l_max; i++) for (j = 0; j < l_max; j++) Hes[i][j] = ZERO; rotation_product = ONE; N_VScale(ONE/r_norm, V[0], V[0]); /* Inner loop: generate Krylov sequence and Arnoldi basis. */ for (l = 0; l < l_max; l++) { (*nli)++; krydim = l_plus_1 = l + 1; /* Generate A-tilde V[l], where A-tilde = s1 P1_inv A P2_inv s2_inv. */ /* Apply right scaling: vtemp = s2_inv V[l]. */ if (scale2) N_VDiv(V[l], s2, vtemp); else N_VScale(ONE, V[l], vtemp); /* Apply right preconditioner: vtemp = P2_inv s2_inv V[l]. */ if (preOnRight) { N_VScale(ONE, vtemp, V[l_plus_1]); ier = psolve(P_data, V[l_plus_1], vtemp, PREC_RIGHT); (*nps)++; if (ier != 0) return((ier < 0) ? SPGMR_PSOLVE_FAIL_UNREC : SPGMR_PSOLVE_FAIL_REC); } /* Apply A: V[l+1] = A P2_inv s2_inv V[l]. */ if (atimes(A_data, vtemp, V[l_plus_1] ) != 0) return(SPGMR_ATIMES_FAIL); /* Apply left preconditioning: vtemp = P1_inv A P2_inv s2_inv V[l]. */ if (preOnLeft) { ier = psolve(P_data, V[l_plus_1], vtemp, PREC_LEFT); (*nps)++; if (ier != 0) return((ier < 0) ? SPGMR_PSOLVE_FAIL_UNREC : SPGMR_PSOLVE_FAIL_REC); } else { N_VScale(ONE, V[l_plus_1], vtemp); } /* Apply left scaling: V[l+1] = s1 P1_inv A P2_inv s2_inv V[l]. */ if (scale1) { N_VProd(s1, vtemp, V[l_plus_1]); } else { N_VScale(ONE, vtemp, V[l_plus_1]); } /* Orthogonalize V[l+1] against previous V[i]: V[l+1] = w_tilde. */ if (gstype == CLASSICAL_GS) { if (ClassicalGS(V, Hes, l_plus_1, l_max, &(Hes[l_plus_1][l]), vtemp, yg) != 0) return(SPGMR_GS_FAIL); } else { if (ModifiedGS(V, Hes, l_plus_1, l_max, &(Hes[l_plus_1][l])) != 0) return(SPGMR_GS_FAIL); } /* Update the QR factorization of Hes. */ if(QRfact(krydim, Hes, givens, l) != 0 ) return(SPGMR_QRFACT_FAIL); /* Update residual norm estimate; break if convergence test passes. */ rotation_product *= givens[2*l+1]; *res_norm = rho = ABS(rotation_product*r_norm); if (rho <= delta) { converged = TRUE; break; } /* Normalize V[l+1] with norm value from the Gram-Schmidt routine. */ N_VScale(ONE/Hes[l_plus_1][l], V[l_plus_1], V[l_plus_1]); } /* Inner loop is done. Compute the new correction vector xcor. */ /* Construct g, then solve for y. */ yg[0] = r_norm; for (i = 1; i <= krydim; i++) yg[i]=ZERO; if (QRsol(krydim, Hes, givens, yg) != 0) return(SPGMR_QRSOL_FAIL); /* Add correction vector V_l y to xcor. */ for (k = 0; k < krydim; k++) N_VLinearSum(yg[k], V[k], ONE, xcor, xcor); /* If converged, construct the final solution vector x and return. */ if (converged) { /* Apply right scaling and right precond.: vtemp = P2_inv s2_inv xcor. */ if (scale2) N_VDiv(xcor, s2, xcor); if (preOnRight) { ier = psolve(P_data, xcor, vtemp, PREC_RIGHT); (*nps)++; if (ier != 0) return((ier < 0) ? SPGMR_PSOLVE_FAIL_UNREC : SPGMR_PSOLVE_FAIL_REC); } else { N_VScale(ONE, xcor, vtemp); } /* Add vtemp to initial x to get final solution x, and return */ N_VLinearSum(ONE, x, ONE, vtemp, x); return(SPGMR_SUCCESS); } /* Not yet converged; if allowed, prepare for restart. */ if (ntries == max_restarts) break; /* Construct last column of Q in yg. */ s_product = ONE; for (i = krydim; i > 0; i--) { yg[i] = s_product*givens[2*i-2]; s_product *= givens[2*i-1]; } yg[0] = s_product; /* Scale r_norm and yg. */ r_norm *= s_product; for (i = 0; i <= krydim; i++) yg[i] *= r_norm; r_norm = ABS(r_norm); /* Multiply yg by V_(krydim+1) to get last residual vector; restart. */ N_VScale(yg[0], V[0], V[0]); for (k = 1; k <= krydim; k++) N_VLinearSum(yg[k], V[k], ONE, V[0], V[0]); } /* Failed to converge, even after allowed restarts. If the residual norm was reduced below its initial value, compute and return x anyway. Otherwise return failure flag. */ if (rho < beta) { /* Apply right scaling and right precond.: vtemp = P2_inv s2_inv xcor. */ if (scale2) N_VDiv(xcor, s2, xcor); if (preOnRight) { ier = psolve(P_data, xcor, vtemp, PREC_RIGHT); (*nps)++; if (ier != 0) return((ier < 0) ? SPGMR_PSOLVE_FAIL_UNREC : SPGMR_PSOLVE_FAIL_REC); } else { N_VScale(ONE, xcor, vtemp); } /* Add vtemp to initial x to get final solution x, and return. */ N_VLinearSum(ONE, x, ONE, vtemp, x); return(SPGMR_RES_REDUCED); } return(SPGMR_CONV_FAIL); } /* * ----------------------------------------------------------------- * Function : SpgmrFree * ----------------------------------------------------------------- */ void SpgmrFree(SpgmrMem mem) { int i, l_max; realtype **Hes; if (mem == NULL) return; l_max = mem->l_max; Hes = mem->Hes; N_VDestroyVectorArray(mem->V, l_max+1); for (i = 0; i <= l_max; i++) free(Hes[i]); free(Hes); free(mem->givens); N_VDestroy(mem->xcor); free(mem->yg); N_VDestroy(mem->vtemp); free(mem); } neuron-7.5/src/sundials/shared/spgmr.h000077500000000000000000000274621323325274500200770ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Radu Serban @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for the implementation of SPGMR Krylov * iterative linear solver. The SPGMR algorithm is based on the * Scaled Preconditioned GMRES (Generalized Minimal Residual) * method. * * The SPGMR algorithm solves a linear system A x = b. * Preconditioning is allowed on the left, right, or both. * Scaling is allowed on both sides, and restarts are also allowed. * We denote the preconditioner and scaling matrices as follows: * P1 = left preconditioner * P2 = right preconditioner * S1 = diagonal matrix of scale factors for P1-inverse b * S2 = diagonal matrix of scale factors for P2 x * The matrices A, P1, and P2 are not required explicitly; only * routines that provide A, P1-inverse, and P2-inverse as * operators are required. * * In this notation, SPGMR applies the underlying GMRES method to * the equivalent transformed system * Abar xbar = bbar , where * Abar = S1 (P1-inverse) A (P2-inverse) (S2-inverse) , * bbar = S1 (P1-inverse) b , and xbar = S2 P2 x . * * The scaling matrices must be chosen so that vectors S1 * P1-inverse b and S2 P2 x have dimensionless components. * If preconditioning is done on the left only (P2 = I), by a * matrix P, then S2 must be a scaling for x, while S1 is a * scaling for P-inverse b, and so may also be taken as a scaling * for x. Similarly, if preconditioning is done on the right only * (P1 = I, P2 = P), then S1 must be a scaling for b, while S2 is * a scaling for P x, and may also be taken as a scaling for b. * * The stopping test for the SPGMR iterations is on the L2 norm of * the scaled preconditioned residual: * || bbar - Abar xbar ||_2 < delta * with an input test constant delta. * * The usage of this SPGMR solver involves supplying two routines * and making three calls. The user-supplied routines are * atimes (A_data, x, y) to compute y = A x, given x, * and * psolve (P_data, x, y, lr) * to solve P1 x = y or P2 x = y for x, given y. * The three user calls are: * mem = SpgmrMalloc(lmax, vec_tmpl); * to initialize memory, * flag = SpgmrSolve(mem,A_data,x,b,..., * P_data,s1,s2,atimes,psolve,...); * to solve the system, and * SpgmrFree(mem); * to free the memory created by SpgmrMalloc. * Complete details for specifying atimes and psolve and for the * usage calls are given in the paragraphs below and in iterative.h. * ----------------------------------------------------------------- */ #ifndef _SPGMR_H #define _SPGMR_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" #include "iterative.h" #include "nvector.h" /* * ----------------------------------------------------------------- * Types: SpgmrMemRec, SpgmrMem * ----------------------------------------------------------------- * SpgmrMem is a pointer to an SpgmrMemRec which contains * the memory needed by SpgmrSolve. The SpgmrMalloc routine * returns a pointer of type SpgmrMem which should then be passed * in subsequent calls to SpgmrSolve. The SpgmrFree routine frees * the memory allocated by SpgmrMalloc. * * l_max is the maximum Krylov dimension that SpgmrSolve will be * permitted to use. * * V is the array of Krylov basis vectors v_1, ..., v_(l_max+1), * stored in V[0], ..., V[l_max], where l_max is the second * parameter to SpgmrMalloc. Each v_i is a vector of type * N_Vector. * * Hes is the (l_max+1) x l_max Hessenberg matrix. It is stored * row-wise so that the (i,j)th element is given by Hes[i][j]. * * givens is a length 2*l_max array which represents the * Givens rotation matrices that arise in the algorithm. The * Givens rotation matrices F_0, F_1, ..., F_j, where F_i is * * 1 * 1 * c_i -s_i <--- row i * s_i c_i * 1 * 1 * * are represented in the givens vector as * givens[0]=c_0, givens[1]=s_0, givens[2]=c_1, givens[3]=s_1, * ..., givens[2j]=c_j, givens[2j+1]=s_j. * * xcor is a vector (type N_Vector) which holds the scaled, * preconditioned correction to the initial guess. * * yg is a length (l_max+1) array of realtype used to hold "short" * vectors (e.g. y and g). * * vtemp is a vector (type N_Vector) used as temporary vector * storage during calculations. * ----------------------------------------------------------------- */ typedef struct _SpgmrMemRec { int l_max; N_Vector *V; realtype **Hes; realtype *givens; N_Vector xcor; realtype *yg; N_Vector vtemp; } SpgmrMemRec, *SpgmrMem; /* * ----------------------------------------------------------------- * Function : SpgmrMalloc * ----------------------------------------------------------------- * SpgmrMalloc allocates the memory used by SpgmrSolve. It * returns a pointer of type SpgmrMem which the user of the * SPGMR package should pass to SpgmrSolve. The parameter l_max * is the maximum Krylov dimension that SpgmrSolve will be * permitted to use. The parameter vec_tmpl is a pointer to an * N_Vector used as a template to create new vectors by duplication. * This routine returns NULL if there is a memory request failure. * ----------------------------------------------------------------- */ SpgmrMem SpgmrMalloc(int l_max, N_Vector vec_tmpl); /* * ----------------------------------------------------------------- * Function : SpgmrSolve * ----------------------------------------------------------------- * SpgmrSolve solves the linear system Ax = b using the SPGMR * method. The return values are given by the symbolic constants * below. The first SpgmrSolve parameter is a pointer to memory * allocated by a prior call to SpgmrMalloc. * * mem is the pointer returned by SpgmrMalloc to the structure * containing the memory needed by SpgmrSolve. * * A_data is a pointer to information about the coefficient * matrix A. This pointer is passed to the user-supplied function * atimes. * * x is the initial guess x_0 upon entry and the solution * N_Vector upon exit with return value SPGMR_SUCCESS or * SPGMR_RES_REDUCED. For all other return values, the output x * is undefined. * * b is the right hand side N_Vector. It is undisturbed by this * function. * * pretype is the type of preconditioning to be used. Its * legal possible values are enumerated in iterativ.h. These * values are PREC_NONE=0, PREC_LEFT=1, PREC_RIGHT=2, and * PREC_BOTH=3. * * gstype is the type of Gram-Schmidt orthogonalization to be * used. Its legal values are enumerated in iterativ.h. These * values are MODIFIED_GS=0 and CLASSICAL_GS=1. * * delta is the tolerance on the L2 norm of the scaled, * preconditioned residual. On return with value SPGMR_SUCCESS, * this residual satisfies || s1 P1_inv (b - Ax) ||_2 <= delta. * * max_restarts is the maximum number of times the algorithm is * allowed to restart. * * P_data is a pointer to preconditioner information. This * pointer is passed to the user-supplied function psolve. * * s1 is an N_Vector of positive scale factors for P1-inv b, where * P1 is the left preconditioner. (Not tested for positivity.) * Pass NULL if no scaling on P1-inv b is required. * * s2 is an N_Vector of positive scale factors for P2 x, where * P2 is the right preconditioner. (Not tested for positivity.) * Pass NULL if no scaling on P2 x is required. * * atimes is the user-supplied function which performs the * operation of multiplying A by a given vector. Its description * is given in iterative.h. * * psolve is the user-supplied function which solves a * preconditioner system Pz = r, where P is P1 or P2. Its full * description is given in iterativ.h. The psolve function will * not be called if pretype is NONE; in that case, the user * should pass NULL for psolve. * * res_norm is a pointer to the L2 norm of the scaled, * preconditioned residual. On return with value SPGMR_SUCCESS or * SPGMR_RES_REDUCED, (*res_norm) contains the value * || s1 P1_inv (b - Ax) ||_2 for the computed solution x. * For all other return values, (*res_norm) is undefined. The * caller is responsible for allocating the memory (*res_norm) * to be filled in by SpgmrSolve. * * nli is a pointer to the number of linear iterations done in * the execution of SpgmrSolve. The caller is responsible for * allocating the memory (*nli) to be filled in by SpgmrSolve. * * nps is a pointer to the number of calls made to psolve during * the execution of SpgmrSolve. The caller is responsible for * allocating the memory (*nps) to be filled in by SpgmrSolve. * * Note: Repeated calls can be made to SpgmrSolve with varying * input arguments. If, however, the problem size N or the * maximum Krylov dimension l_max changes, then a call to * SpgmrMalloc must be made to obtain new memory for SpgmrSolve * to use. * ----------------------------------------------------------------- */ int SpgmrSolve(SpgmrMem mem, void *A_data, N_Vector x, N_Vector b, int pretype, int gstype, realtype delta, int max_restarts, void *P_data, N_Vector s1, N_Vector s2, ATimesFn atimes, PSolveFn psolve, realtype *res_norm, int *nli, int *nps); /* Return values for SpgmrSolve */ #define SPGMR_SUCCESS 0 /* Converged */ #define SPGMR_RES_REDUCED 1 /* Did not converge, but reduced norm of residual */ #define SPGMR_CONV_FAIL 2 /* Failed to converge */ #define SPGMR_QRFACT_FAIL 3 /* QRfact found singular matrix */ #define SPGMR_PSOLVE_FAIL_REC 4 /* psolve failed recoverably */ #define SPGMR_MEM_NULL -1 /* mem argument is NULL */ #define SPGMR_ATIMES_FAIL -2 /* atimes returned failure flag */ #define SPGMR_PSOLVE_FAIL_UNREC -3 /* psolve failed unrecoverably */ #define SPGMR_GS_FAIL -4 /* Gram-Schmidt routine returned failure flag */ #define SPGMR_QRSOL_FAIL -5 /* QRsol found singular R */ /* * ----------------------------------------------------------------- * Function : SpgmrFree * ----------------------------------------------------------------- * SpgmrMalloc frees the memory allocated by SpgmrMalloc. It is * illegal to use the pointer mem after a call to SpgmrFree. * ----------------------------------------------------------------- */ void SpgmrFree(SpgmrMem mem); /* * ----------------------------------------------------------------- * Macro: SPGMR_VTEMP * ----------------------------------------------------------------- * This macro provides access to the work vector vtemp in the * memory block of the SPGMR module. The argument mem is the * memory pointer returned by SpgmrMalloc, of type SpgmrMem, * and the macro value is of type N_Vector. * On a return from SpgmrSolve with *nli = 0, this vector * contains the scaled preconditioned initial residual, * s1 * P1_inverse * (b - A x_0). * ----------------------------------------------------------------- */ #define SPGMR_VTEMP(mem) (mem->vtemp) #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/sundialsmath.c000077500000000000000000000044131323325274500214250ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the implementation file for a simple C-language math * library. * ----------------------------------------------------------------- */ #include #include #include #include "sundialsmath.h" #include "sundialstypes.h" #define ZERO RCONST(0.0) #define ONE RCONST(1.0) #define TWO RCONST(2.0) realtype RPowerI(realtype base, int exponent) { int i, expt; realtype prod; prod = ONE; expt = abs(exponent); for(i = 1; i <= expt; i++) prod *= base; if (exponent < 0) prod = ONE/prod; return(prod); } realtype RPowerR(realtype base, realtype exponent) { if (base <= ZERO) return(ZERO); #if defined(SUNDIALS_USE_GENERIC_MATH) return((realtype) pow((double) base, (double) exponent)); #elif defined(SUNDIALS_SINGLE_PRECISION) return(powf(base, exponent)); #elif defined(SUNDIALS_EXTENDED_PRECISION) return(powl(base, exponent)); #endif } realtype RSqrt(realtype x) { if (x <= ZERO) return(ZERO); #if defined(SUNDIALS_USE_GENERIC_MATH) return((realtype) sqrt((double) x)); #elif defined(SUNDIALS_SINGLE_PRECISION) return(sqrtf(x)); #elif defined(SUNDIALS_EXTENDED_PRECISION) return(sqrtl(x)); #endif } realtype RAbs(realtype x) { #if defined(SUNDIALS_USE_GENERIC_MATH) return((realtype) fabs((double) x)); #elif defined(SUNDIALS_SINGLE_PRECISION) return(fabsf(x)); #elif defined(SUNDIALS_EXTENDED_PRECISION) return(fabsl(x)); #endif } realtype RPower2(realtype x) { #if defined(SUNDIALS_USE_GENERIC_MATH) return((realtype) pow((double) x, 2.0)); #elif defined(SUNDIALS_SINGLE_PRECISION) return(powf(x, TWO)); #elif defined(SUNDIALS_EXTENDED_PRECISION) return(powl(x, TWO)); #endif } neuron-7.5/src/sundials/shared/sundialsmath.h000077500000000000000000000100351323325274500214270ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and * Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. * ----------------------------------------------------------------- * This is the header file for a simple C-language math library. The * routines listed here work with the type realtype as defined in * the header file shared/include/sundialstypes.h. * ----------------------------------------------------------------- */ #ifndef _SUNDIALSMATH_H #define _SUNDIALSMATH_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #include "sundialstypes.h" /* * ----------------------------------------------------------------- * Macros : MIN and MAX * ----------------------------------------------------------------- * MIN(A,B) returns the minimum of A and B * * MAX(A,B) returns the maximum of A and B * ----------------------------------------------------------------- */ #ifndef MIN #define MIN(A, B) ((A) < (B) ? (A) : (B)) #endif #ifndef MAX #define MAX(A, B) ((A) > (B) ? (A) : (B)) #endif #ifndef ABS #define ABS RAbs #endif #ifndef SQR #define SQR RPower2 #endif /* * ----------------------------------------------------------------- * Function : RPowerI * ----------------------------------------------------------------- * Usage : int exponent; * realtype base, ans; * ans = RPowerI(base,exponent); * ----------------------------------------------------------------- * RPowerI returns the value of base^exponent, where base is of type * realtype and exponent is of type int. * ----------------------------------------------------------------- */ realtype RPowerI(realtype base, int exponent); /* * ----------------------------------------------------------------- * Function : RPowerR * ----------------------------------------------------------------- * Usage : realtype base, exponent, ans; * ans = RPowerR(base,exponent); * ----------------------------------------------------------------- * RPowerR returns the value of base^exponent, where both base and * exponent are of type realtype. If base < ZERO, then RPowerR * returns ZERO. * ----------------------------------------------------------------- */ realtype RPowerR(realtype base, realtype exponent); /* * ----------------------------------------------------------------- * Function : RSqrt * ----------------------------------------------------------------- * Usage : realtype sqrt_x; * sqrt_x = RSqrt(x); * ----------------------------------------------------------------- * RSqrt(x) returns the square root of x. If x < ZERO, then RSqrt * returns ZERO. * ----------------------------------------------------------------- */ realtype RSqrt(realtype x); /* * ----------------------------------------------------------------- * Function : RAbs (a.k.a. ABS) * ----------------------------------------------------------------- * Usage : realtype abs_x; * abs_x = RAbs(x); * ----------------------------------------------------------------- * RAbs(x) returns the absolute value of x. * ----------------------------------------------------------------- */ realtype RAbs(realtype x); /* * ----------------------------------------------------------------- * Function : RPower2 (a.k.a. SQR) * ----------------------------------------------------------------- * Usage : realtype sqr_x; * sqr_x = RPower2(x); * ----------------------------------------------------------------- * RPower2(x) returns x^2. * ----------------------------------------------------------------- */ realtype RPower2(realtype x); #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/shared/sundialstypes.h000066400000000000000000000066541323325274500216530ustar00rootroot00000000000000/* * ----------------------------------------------------------------- * $Revision: 855 $ * $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $ * ----------------------------------------------------------------- * Programmer(s): Scott Cohen, Alan Hindmarsh, Radu Serban, and * Aaron Collier @ LLNL * ----------------------------------------------------------------- * Copyright (c) 2002, The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * All rights reserved. * For details, see sundials/shared/LICENSE. *------------------------------------------------------------------ * This header file exports two types: realtype and booleantype, * as well as the constants TRUE and FALSE. * * Users should include the header file sundialstypes.h in every * program file and use the exported name realtype instead of * float, double or long double. * * The constants SUNDIALS_SINGLE_PRECISION, SUNDIALS_DOUBLE_PRECISION * and SUNDIALS_LONG_DOUBLE_PRECISION indicate the underlying data * type of realtype. It is set at the configuration stage. * * The legal types for realtype are float, double and long double. * * The macro RCONST gives the user a convenient way to define * real-valued constants. To use the constant 1.0, for example, * the user should write the following: * * #define ONE RCONST(1.0) * * If realtype is defined as a double, then RCONST(1.0) expands * to 1.0. If realtype is defined as a float, then RCONST(1.0) * expands to 1.0F. If realtype is defined as a long double, * then RCONST(1.0) expands to 1.0L. There is never a need to * explicitly cast 1.0 to (realtype). *------------------------------------------------------------------ */ #ifndef _SUNDIALSTYPES_H #define _SUNDIALSTYPES_H #ifdef __cplusplus /* wrapper to enable C++ usage */ extern "C" { #endif #ifndef _SUNDIALS_CONFIG_H #define _SUNDIALS_CONFIG_H #include "sundials_config.h" #endif #include #if defined(SUNDIALS_SINGLE_PRECISION) typedef float realtype; #define RCONST(x) x##F #define BIG_REAL FLT_MAX #define SMALL_REAL FLT_MIN #define UNIT_ROUNDOFF FLT_EPSILON #elif defined(SUNDIALS_DOUBLE_PRECISION) typedef double realtype; #define RCONST(x) x #define BIG_REAL DBL_MAX #define SMALL_REAL DBL_MIN #define UNIT_ROUNDOFF DBL_EPSILON #elif defined(SUNDIALS_EXTENDED_PRECISION) typedef long double realtype; #define RCONST(x) x##L #define BIG_REAL LDBL_MAX #define SMALL_REAL LDBL_MIN #define UNIT_ROUNDOFF LDBL_EPSILON #endif /* *------------------------------------------------------------------ * Type : booleantype *------------------------------------------------------------------ * Constants : FALSE and TRUE *------------------------------------------------------------------ * ANSI C does not have a built-in bool data type. Below is the * definition for a new type called booleantype. The advantage of * using the name booleantype (instead of int) is an increase in * code readability. It also allows the programmer to make a * distinction between int and bool data. Variables of type * booleantype are intended to have only the two values FALSE and * TRUE which are defined below to be equal to 0 and 1, * respectively. *------------------------------------------------------------------ */ #ifndef booleantype #define booleantype int #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifdef __cplusplus } #endif #endif neuron-7.5/src/sundials/sundials_config.h.in000077500000000000000000000053231323325274500212450ustar00rootroot00000000000000/* config.hin. Generated from configure.ac by autoheader. */ /* FCMIX: Define name-mangling macro */ #undef F77_FUNC /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of a `double', as computed by sizeof. */ #undef SIZEOF_DOUBLE /* The size of a `float', as computed by sizeof. */ #undef SIZEOF_FLOAT /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of a `long double', as computed by sizeof. */ #undef SIZEOF_LONG_DOUBLE /* The size of a `long int', as computed by sizeof. */ #undef SIZEOF_LONG_INT /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* FCMIX: Make function names lowercase */ #undef SUNDIALS_CASE_LOWER /* FCMIX: Make function names uppercase */ #undef SUNDIALS_CASE_UPPER /* Define SUNDIALS data type 'realtype' as 'double' */ #undef SUNDIALS_DOUBLE_PRECISION /* Define SUNDIALS data type 'realtype' as 'long double' */ #undef SUNDIALS_EXTENDED_PRECISION /* Define SUNDIALS data type 'realtype' as 'float' */ #undef SUNDIALS_SINGLE_PRECISION /* FCMIX: Do NOT append any underscores to functions names */ #undef SUNDIALS_UNDERSCORE_NONE /* FCMIX: Append ONE underscore to function names */ #undef SUNDIALS_UNDERSCORE_ONE /* FCMIX: Append TWO underscores to function names */ #undef SUNDIALS_UNDERSCORE_TWO /* Use generic math functions */ #undef SUNDIALS_USE_GENERIC_MATH neuron-7.5/src/uxnrnbbs/000077500000000000000000000000001323325274500153315ustar00rootroot00000000000000neuron-7.5/src/uxnrnbbs/Makefile.am000077500000000000000000000003661323325274500173750ustar00rootroot00000000000000# the nrnbbs has been abandoned and mos2nrn no longer uses it # and is stand alone IV_INCLUDES = @IV_INCLUDE@ includes = $(IV_INCLUDES) AM_CPPFLAGS = $(includes) bin_PROGRAMS = mos2nrn mos2nrn_SOURCES = mos2nrn.cpp noinst_HEADERS = nrnbbs.h neuron-7.5/src/uxnrnbbs/Makefile.in000066400000000000000000000567201323325274500174100ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # the nrnbbs has been abandoned and mos2nrn no longer uses it # and is stand alone VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mos2nrn$(EXEEXT) subdir = src/uxnrnbbs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ivcheck.m4 $(top_srcdir)/m4/java_support.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nrnbg.m4 \ $(top_srcdir)/m4/nrnjava.m4 $(top_srcdir)/m4/nrnpython.m4 \ $(top_srcdir)/m4/nrnrt.m4 $(top_srcdir)/m4/oddities.m4 \ $(top_srcdir)/m4/parcon.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/withmpi.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/nmodlconf.h \ $(top_builddir)/src/nrnpython/nrnpython_config.h \ $(top_builddir)/nrnconf.h \ $(top_builddir)/src/nrnoc/nrnconfigargs.h \ $(top_builddir)/src/oc/nrnmpiuse.h \ $(top_builddir)/src/oc/nrnrtuse.h \ $(top_builddir)/src/oc/nrnpthread.h \ $(top_builddir)/src/parallel/bbsconf.h \ $(top_builddir)/src/nrnjava/njconf.h \ $(top_builddir)/src/nrncvode/nrnneosm.h \ $(top_builddir)/src/ivos/ivstream.h \ $(top_builddir)/src/sundials/sundials_config.h CONFIG_CLEAN_FILES = mos2nrn.h CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mos2nrn_OBJECTS = mos2nrn.$(OBJEXT) mos2nrn_OBJECTS = $(am_mos2nrn_OBJECTS) mos2nrn_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/src/nrnpython -I$(top_builddir)/src/nrnoc -I$(top_builddir)/src/oc -I$(top_builddir)/src/parallel -I$(top_builddir)/src/nrnjava -I$(top_builddir)/src/nrncvode -I$(top_builddir)/src/ivos -I$(top_builddir)/src/sundials depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(mos2nrn_SOURCES) DIST_SOURCES = $(mos2nrn_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/mos2nrn.h.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_RX3D = @BUILD_RX3D@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ CYTHON = @CYTHON@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_CYGWIN_FLAGS = @EXTRA_CYGWIN_FLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IVHINES = @IVHINES@ IVOS_DIR = @IVOS_DIR@ IVOS_LIB = @IVOS_LIB@ IV_INCLUDE = @IV_INCLUDE@ IV_LIBDIR = @IV_LIBDIR@ IV_LIBS = @IV_LIBS@ IV_LIBS_LIBTOOL = @IV_LIBS_LIBTOOL@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JDKDIR = @JDKDIR@ JNI_INCLUDE_FLAGS = @JNI_INCLUDE_FLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOLTAG = @LIBTOOLTAG@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMACSLIB = @MEMACSLIB@ MEMACSLIBLA = @MEMACSLIBLA@ METISINCLUDE = @METISINCLUDE@ METISLIB = @METISLIB@ METISLIBADD = @METISLIBADD@ METISOBJADD = @METISOBJADD@ MINGW_CFLAG = @MINGW_CFLAG@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPICCnrnmpi = @MPICCnrnmpi@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ MUSIC_INCDIR = @MUSIC_INCDIR@ MUSIC_LIBDIR = @MUSIC_LIBDIR@ MUSIC_LIBLA = @MUSIC_LIBLA@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ NCURSES_LIBS = @NCURSES_LIBS@ NIDDK = @NIDDK@ NM = @NM@ NMEDIT = @NMEDIT@ NRNJAVA_DEP = @NRNJAVA_DEP@ NRNJAVA_LIBLA = @NRNJAVA_LIBLA@ NRNJAVA_LIBS = @NRNJAVA_LIBS@ NRNNI_DEP = @NRNNI_DEP@ NRNNI_LIBLA = @NRNNI_LIBLA@ NRNNI_LIBS = @NRNNI_LIBS@ NRNPYTHON_DEFINES = @NRNPYTHON_DEFINES@ NRNPYTHON_DEP = @NRNPYTHON_DEP@ NRNPYTHON_EXEC = @NRNPYTHON_EXEC@ NRNPYTHON_INCLUDES = @NRNPYTHON_INCLUDES@ NRNPYTHON_LIBLA = @NRNPYTHON_LIBLA@ NRNPYTHON_LIBS = @NRNPYTHON_LIBS@ NRNPYTHON_PYLIBLINK = @NRNPYTHON_PYLIBLINK@ NRNPYTHON_PYMAJOR = @NRNPYTHON_PYMAJOR@ NRNPYTHON_PYVER = @NRNPYTHON_PYVER@ NRN_LIBDIR = @NRN_LIBDIR@ NRN_READLINE_DEP = @NRN_READLINE_DEP@ NRN_READLINE_LIBS = @NRN_READLINE_LIBS@ NRN_REALTIME_INCLUDE = @NRN_REALTIME_INCLUDE@ NRN_SRCDIR = @NRN_SRCDIR@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PVM_INCLUDES = @PVM_INCLUDES@ PVM_LIBS = @PVM_LIBS@ PVM_XTRA_LIBS = @PVM_XTRA_LIBS@ PY2TO3 = @PY2TO3@ PYTHON = @PYTHON@ PYTHON_BLD = @PYTHON_BLD@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RPM_ARGS = @RPM_ARGS@ RPM_CONFIGURE_ARGS = @RPM_CONFIGURE_ARGS@ RPM_DIR = @RPM_DIR@ RPM_PROG = @RPM_PROG@ RPM_RELEASE = @RPM_RELEASE@ RPM_TARBALL = @RPM_TARBALL@ RPM_TARGET = @RPM_TARGET@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TERMCAP_CFLAGS = @TERMCAP_CFLAGS@ TERMCAP_LIB = @TERMCAP_LIB@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ _ACJNI_JAVAC = @_ACJNI_JAVAC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_pysetup = @ac_pysetup@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ binsuffix = @binsuffix@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dos_marshal_dir = @dos_marshal_dir@ dvidir = @dvidir@ enable_carbon = @enable_carbon@ exec_prefix = @exec_prefix@ have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ marshal_dir = @marshal_dir@ mkdir_p = @mkdir_p@ modsubdir = @modsubdir@ npy_NRNPYTHON_INCLUDES = @npy_NRNPYTHON_INCLUDES@ npy_apiver = @npy_apiver@ npy_pyver10 = @npy_pyver10@ nrndef_mac = @nrndef_mac@ nrndef_mswin = @nrndef_mswin@ nrndef_unix = @nrndef_unix@ nrnskip_rebase = @nrnskip_rebase@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ rxd_mingw_args = @rxd_mingw_args@ sbindir = @sbindir@ setup_extra_link_args = @setup_extra_link_args@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uudecode = @uudecode@ IV_INCLUDES = @IV_INCLUDE@ includes = $(IV_INCLUDES) AM_CPPFLAGS = $(includes) mos2nrn_SOURCES = mos2nrn.cpp noinst_HEADERS = nrnbbs.h all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/uxnrnbbs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/uxnrnbbs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mos2nrn.h: $(top_builddir)/config.status $(srcdir)/mos2nrn.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list mos2nrn$(EXEEXT): $(mos2nrn_OBJECTS) $(mos2nrn_DEPENDENCIES) $(EXTRA_mos2nrn_DEPENDENCIES) @rm -f mos2nrn$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(mos2nrn_OBJECTS) $(mos2nrn_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2nrn.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: neuron-7.5/src/uxnrnbbs/mos2nrn.cpp000077500000000000000000000030171323325274500174370ustar00rootroot00000000000000#include <../../nrnconf.h> #include #include #include #include "mos2nrn.h" static void getdname(char* dname); #include const char* back2forward(const char*); const char* basefile(const char*); int main(int argc, char** argv) { char buf[256]; char dname[256]; if (argc != 2 ) { fprintf(stderr, "Usage: mos2nrn [hocfile | nrnzipfile]\n"); return 1; } FILE* f = fopen(argv[1], "r"); if (!f) { return 1; } if (fread(buf, 1, 5, f) < 2) { return 1; } fclose(f); if (strncmp(buf, "PK", 2) == 0) { // its a nrnzip file getdname(dname); sprintf(buf, "xterm -sb -e %s/mos2nrn2.sh %s %s %d", NEURON_BIN_DIR, argv[1], dname, 0); int i = system(buf); if (i) { return i; } }else{ // its a hoc file sprintf(buf, "xterm -sb -e %s/nrniv %s -", NEURON_BIN_DIR, argv[1]); int i = system(buf); if (i) { return i; } } return 0; } const char* back2forward(const char* back) { static char forward[256]; char *cp; strcpy(forward, back); for (cp = forward; *cp; ++cp) { if (*cp == '\\') { *cp = '/'; } } return forward; } const char* basefile(const char* path) { const char* cp; for (cp = path + strlen(path) - 1; cp >= path; --cp) { if (*cp == '\\' || *cp == ':' || *cp == '/') { return cp+1; } } return path; } static void getdname(char* dname) { int fd; const char* tdir; if ((tdir = getenv("TEMP")) == NULL) { tdir = "/tmp"; } sprintf(dname, "%s/nrnXXXXXX", tdir); #if HAVE_MKSTEMP fd = mkstemp(dname); close(fd); #else mktemp(dname); #endif } neuron-7.5/src/uxnrnbbs/mos2nrn.h.in000077500000000000000000000000611323325274500175050ustar00rootroot00000000000000#define NEURON_BIN_DIR "@prefix@/@host_cpu@/bin" neuron-7.5/src/uxnrnbbs/nrnbbs.h000066400000000000000000000015111323325274500167640ustar00rootroot00000000000000#ifndef nrnbbs_h #define nrnbbs_h typedef void (*NrnBBSCallback)(const char*); #if defined(__cplusplus) extern "C" { #endif bool nrnbbs_connect(); void nrnbbs_disconnect(); bool nrnbbs_connected(); void nrnbbs_post(const char*); void nrnbbs_post_int(const char*, int); void nrnbbs_post_string(const char*, const char*); bool nrnbbs_take(const char*); bool nrnbbs_take_int(const char*, int*); bool nrnbbs_take_string(const char*, char*); bool nrnbbs_look(const char*); void nrnbbs_exec(const char*); void nrnbbs_notify(const char*, NrnBBSCallback); // return when *pflag = true or one step wait if no arg void nrnbbs_wait(bool* pflag = (bool*)0); /* for debugging and bbs management */ #if 0 void nrnbbs_clean(); void nnrbbs_quit(); int nrnbbs_count(); bool nrnbbs_query(long index); #endif #if defined(__cplusplus) } #endif #endif neuron-7.5/ylwrap000077500000000000000000000153121323325274500141470ustar00rootroot00000000000000#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2013-01-12.17; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . get_dirname () { case $1 in */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; # Otherwise, we want the empty string (not "."). esac } # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. guard () { printf '%s\n' "$1" \ | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ -e 's/__*/_/g' } # quote_for_sed [STRING] # ---------------------- # Return STRING (or stdin) quoted to be used as a sed pattern. quote_for_sed () { case $# in 0) cat;; 1) printf '%s\n' "$1";; esac \ | sed -e 's|[][\\.*]|\\&|g' } case "$1" in '') echo "$0: No files given. Try '$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot=false if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot=true fi # The parser itself, the first file, is the destination of the .y.c # rule in the Makefile. parser=$1 # A sed program to s/FROM/TO/g for all the FROM/TO so that, for # instance, we rename #include "y.tab.h" into #include "parse.h" # during the conversion from y.tab.c to parse.c. sed_fix_filenames= # Also rename header guards, as Bison 2.7 for instance uses its header # guard in its implementation file. sed_fix_header_guards= while test $# -ne 0; do if test x"$1" = x"--"; then shift break fi from=$1 # Handle y_tab.c and y_tab.h output by DOS if $y_tab_nodot; then case $from in "y.tab.c") from=y_tab.c;; "y.tab.h") from=y_tab.h;; esac fi shift to=$1 shift sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" done # The program to run. prog=$1 shift # Make any relative path in $prog absolute. case $prog in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog=`pwd`/$prog ;; esac dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then for from in * do to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless # recompilations. Always update the parser itself: it is the # destination of the .y.c rule in the Makefile. Divert the # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi # Munge "#line" or "#" directives. Don't let the resulting # debug information point at an absolute srcdir. Use the real # output file name, not yy.lex.c for instance. Adjust the # include guards too. sed -e "/^#/!b" \ -e "s|$input_rx|$input_sub_rx|" \ -e "$sed_fix_filenames" \ -e "$sed_fix_header_guards" \ "$from" >"$target" || ret=$? # Check whether files must be updated. if test "$from" != "$parser"; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$to is unchanged" rm -f "$target" else echo "updating $to" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the parser. This is a # blatant hack to let us support using "yacc -d". If -d is not # specified, don't fail when the header file is "missing". if test "$from" = "$parser"; then ret=1 fi fi done fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: